diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 3a27fde..b5b0b12 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -54,7 +54,7 @@ jobs: git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" - git add dist/game.min.js dist/metadata.json + git add dist/manifest.json dist/game.min.js dist/metadata.json git add dist/public-game.min.js 2>/dev/null || true if git diff --cached --quiet; then diff --git a/CLAUDE.md b/CLAUDE.md index 2402755..643f476 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,7 +10,10 @@ The Play Origin extension (in `ProdigyPXP/ProdigyOrigin`, formerly "Prodigy Orig ### Architecture -- **src/patch.ts** — Core patcher. Fetches game files, applies regex-based patches, writes output. +- **src/patch.ts** — Orchestrator. Fetches game files, runs rules via `src/patches.ts` for VERIFICATION, builds the prefix/suffix via `src/wrappers.ts`, assembles `dist/manifest.json` (primary artifact) + `dist/game.min.js` (verification copy) + `dist/metadata.json`. +- **src/patches.ts** — `PatchRule` type, `RULES` array, `applyRules`, `hashRules`. +- **src/wrappers.ts** — `buildPrefix(version)`, `buildSuffix(version, displayImages)`; `buildSuffix` reads `window.__ORIGIN_MENU_URL__`, which is provided via `manifest.defaultMenuUrl`. +- **src/manifest.ts** — `Manifest` type, `buildManifest`, `hashManifest`. - **src/constants.ts** — URLs, version, GUI link. - **src/displayImages.ts** — Console splash images. - **build.mjs** — esbuild build script. @@ -45,6 +48,7 @@ node dist/patch.js # Run patcher locally ## Output The patcher writes to the output directory: -- `game.min.js` — Patched game with injected hack entry points -- `metadata.json` — Build metadata (version, hash, degraded status) -- `public-game.min.js` — Patched public game file (if available) +- `manifest.json` — **Primary artifact.** Consumed by the Play Origin extension. +- `game.min.js` — Verification copy of the patched bundle (not loaded by the extension at runtime). +- `metadata.json` — Per-run metadata: version, hash, perRuleCounts, degraded status. +- `public-game.min.js` — Patched public game file (if available). diff --git a/README.md b/README.md index b4aff2e..76c3f1f 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,25 @@ P-NP is the static patch pipeline that powers **Play Origin** (the browser-exten The repository no longer runs an HTTP server. Instead, a GitHub Action fetches current Prodigy assets, applies the patcher logic, and pushes the patched files to a dedicated `patched` branch so they can be served from `raw.githubusercontent.com`. +## Architecture (v4.4.0+) + +The patcher's primary artifact is `dist/manifest.json` — a small JSON file containing: + +- `schemaVersion` — manifest schema version for compatibility checks. +- `patcherVersion` — version of this patcher that produced the manifest. +- `rules` — ordered list of regex find/replace rules applied to `game.min.js`. +- `prefix` — pre-rendered JS string prepended to the patched game. +- `suffix` — pre-rendered JS string appended after the patched game. +- `defaultMenuUrl` — default menu/loader URL used by consumers when patching. +- `hash` — content hash of `{rules, prefix, suffix, defaultMenuUrl}` for cache invalidation. + +The Play Origin extension fetches this manifest, fetches the original `game.min.js` +from `code.prodigygame.com`, applies the rules locally in its background service +worker, wraps with prefix/suffix, and caches the result in `chrome.storage.local`. + +`dist/game.min.js` is still produced as a verification copy so this repo's history +stays auditable, but the extension no longer fetches it. + ## How It Works 1. `.github/workflows/patch.yml` runs every 2 hours (cron) and on manual dispatch. diff --git a/dist/game.min.js b/dist/game.min.js index 69b720f..f6d260a 100644 --- a/dist/game.min.js +++ b/dist/game.min.js @@ -1,7 +1,7 @@ -// game.min.js v2026.26.0 +// game.min.js v2026.26.0 (verification copy — extension uses manifest.json) -/** P-NP Patcher v4.3.0 — Prefix **/ +/** P-NP Patcher v4.4.1 — Prefix **/ const _getBox=(o,t)=>({string:"+",style:"font-size: 1px; padding: 0 "+Math.floor(o/2)+"px; line-height: "+t+"px;"}); console.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t); console.log("%c"+n.string,n.style+"background: url("+o+"); background-size: "+e.width*t+"px " @@ -92,12 +92,12 @@ if (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphor try{let q="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},K=(new q.Error).stack;K&&(q._sentryDebugIds=q._sentryDebugIds||{},q._sentryDebugIds[K]="09a978bc-599c-4c44-96ef-441143a695be",q._sentryDebugIdIdentifier="sentry-dbid-09a978bc-599c-4c44-96ef-441143a695be")}catch(e){}{let q="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};q._sentryModuleMetadata=q._sentryModuleMetadata||{},q._sentryModuleMetadata[(new q.Error).stack]=Object.assign({},q._sentryModuleMetadata[(new q.Error).stack],{dsn:"https://a84188f8494e47ea9adc6469ec4f4deb@o94449.ingest.us.sentry.io/1217080",release:"2026.26.0",project:"prodigy-game"})}{let q="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};q.SENTRY_RELEASE={id:"2026.26.0"}}(()=>{var __webpack_modules__={51151:function(q,K,z){var Y,Q,X;Q=[z(26946)],void 0===(X="function"==typeof(Y=function(q){"use strict";var K=q.Reader,z=q.Writer,Y=q.util,Q=q.roots.default||(q.roots.default={});return Q.Spell=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.id=q.int32();break;case 2:X.element=q.string();break;case 3:X.tier=q.int32();break;case 4:X.energyCost=q.int32();break;case 5:X.target=q.int32();break;case 6:X.type=q.string();break;case 7:X.locked=q.bool();break;case 8:X.unlockLevel=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.id&&q.hasOwnProperty("id")&&!Y.isInteger(q.id)?"id: integer expected":null!=q.element&&q.hasOwnProperty("element")&&!Y.isString(q.element)?"element: string expected":null!=q.tier&&q.hasOwnProperty("tier")&&!Y.isInteger(q.tier)?"tier: integer expected":null!=q.energyCost&&q.hasOwnProperty("energyCost")&&!Y.isInteger(q.energyCost)?"energyCost: integer expected":null!=q.target&&q.hasOwnProperty("target")&&!Y.isInteger(q.target)?"target: integer expected":null!=q.type&&q.hasOwnProperty("type")&&!Y.isString(q.type)?"type: string expected":null!=q.locked&&q.hasOwnProperty("locked")&&"boolean"!=typeof q.locked?"locked: boolean expected":null!=q.unlockLevel&&q.hasOwnProperty("unlockLevel")&&!Y.isInteger(q.unlockLevel)?"unlockLevel: integer expected":null},X.fromObject=function(q){if(q instanceof Q.Spell)return q;var K=new Q.Spell;return null!=q.id&&(K.id=0|q.id),null!=q.element&&(K.element=String(q.element)),null!=q.tier&&(K.tier=0|q.tier),null!=q.energyCost&&(K.energyCost=0|q.energyCost),null!=q.target&&(K.target=0|q.target),null!=q.type&&(K.type=String(q.type)),null!=q.locked&&(K.locked=Boolean(q.locked)),null!=q.unlockLevel&&(K.unlockLevel=0|q.unlockLevel),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.id=0,z.element="",z.tier=0,z.energyCost=0,z.target=0,z.type="",z.locked=!1,z.unlockLevel=0),null!=q.id&&q.hasOwnProperty("id")&&(z.id=q.id),null!=q.element&&q.hasOwnProperty("element")&&(z.element=q.element),null!=q.tier&&q.hasOwnProperty("tier")&&(z.tier=q.tier),null!=q.energyCost&&q.hasOwnProperty("energyCost")&&(z.energyCost=q.energyCost),null!=q.target&&q.hasOwnProperty("target")&&(z.target=q.target),null!=q.type&&q.hasOwnProperty("type")&&(z.type=q.type),null!=q.locked&&q.hasOwnProperty("locked")&&(z.locked=q.locked),null!=q.unlockLevel&&q.hasOwnProperty("unlockLevel")&&(z.unlockLevel=q.unlockLevel),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.Name=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.last=q.int32();break;case 2:X.first=q.int32();break;case 3:X.middle=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.last&&q.hasOwnProperty("last")&&!Y.isInteger(q.last)?"last: integer expected":null!=q.first&&q.hasOwnProperty("first")&&!Y.isInteger(q.first)?"first: integer expected":null!=q.middle&&q.hasOwnProperty("middle")&&!Y.isInteger(q.middle)?"middle: integer expected":null},X.fromObject=function(q){if(q instanceof Q.Name)return q;var K=new Q.Name;return null!=q.last&&(K.last=0|q.last),null!=q.first&&(K.first=0|q.first),null!=q.middle&&(K.middle=0|q.middle),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.last=0,z.first=0,z.middle=0),null!=q.last&&q.hasOwnProperty("last")&&(z.last=q.last),null!=q.first&&q.hasOwnProperty("first")&&(z.first=q.first),null!=q.middle&&q.hasOwnProperty("middle")&&(z.middle=q.middle),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.Hair=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.color=q.int32();break;case 2:X.style=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.color&&q.hasOwnProperty("color")&&!Y.isInteger(q.color)?"color: integer expected":null!=q.style&&q.hasOwnProperty("style")&&!Y.isInteger(q.style)?"style: integer expected":null},X.fromObject=function(q){if(q instanceof Q.Hair)return q;var K=new Q.Hair;return null!=q.color&&(K.color=0|q.color),null!=q.style&&(K.style=0|q.style),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.color=0,z.style=0),null!=q.color&&q.hasOwnProperty("color")&&(z.color=q.color),null!=q.style&&q.hasOwnProperty("style")&&(z.style=q.style),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.WizardAppearance=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.name=Q.Name.decode(q,q.uint32());break;case 2:X.hair=Q.Hair.decode(q,q.uint32());break;case 3:X.face=q.int32();break;case 4:X.gender=q.string();break;case 5:X.eyeColor=q.int32();break;case 6:X.skinColor=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.name&&q.hasOwnProperty("name")&&(K=Q.Name.verify(q.name))?"name."+K:null!=q.hair&&q.hasOwnProperty("hair")&&(K=Q.Hair.verify(q.hair))?"hair."+K:null!=q.face&&q.hasOwnProperty("face")&&!Y.isInteger(q.face)?"face: integer expected":null!=q.gender&&q.hasOwnProperty("gender")&&!Y.isString(q.gender)?"gender: string expected":null!=q.eyeColor&&q.hasOwnProperty("eyeColor")&&!Y.isInteger(q.eyeColor)?"eyeColor: integer expected":null!=q.skinColor&&q.hasOwnProperty("skinColor")&&!Y.isInteger(q.skinColor)?"skinColor: integer expected":null;var K},X.fromObject=function(q){if(q instanceof Q.WizardAppearance)return q;var K=new Q.WizardAppearance;if(null!=q.name){if("object"!=typeof q.name)throw TypeError(".WizardAppearance.name: object expected");K.name=Q.Name.fromObject(q.name)}if(null!=q.hair){if("object"!=typeof q.hair)throw TypeError(".WizardAppearance.hair: object expected");K.hair=Q.Hair.fromObject(q.hair)}return null!=q.face&&(K.face=0|q.face),null!=q.gender&&(K.gender=String(q.gender)),null!=q.eyeColor&&(K.eyeColor=0|q.eyeColor),null!=q.skinColor&&(K.skinColor=0|q.skinColor),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.name=null,z.hair=null,z.face=0,z.gender="",z.eyeColor=0,z.skinColor=0),null!=q.name&&q.hasOwnProperty("name")&&(z.name=Q.Name.toObject(q.name,K)),null!=q.hair&&q.hasOwnProperty("hair")&&(z.hair=Q.Hair.toObject(q.hair,K)),null!=q.face&&q.hasOwnProperty("face")&&(z.face=q.face),null!=q.gender&&q.hasOwnProperty("gender")&&(z.gender=q.gender),null!=q.eyeColor&&q.hasOwnProperty("eyeColor")&&(z.eyeColor=q.eyeColor),null!=q.skinColor&&q.hasOwnProperty("skinColor")&&(z.skinColor=q.skinColor),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.Affix=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.type=q.string();break;case 2:X.amount=q.float();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.type&&q.hasOwnProperty("type")&&!Y.isString(q.type)?"type: string expected":null!=q.amount&&q.hasOwnProperty("amount")&&"number"!=typeof q.amount?"amount: number expected":null},X.fromObject=function(q){if(q instanceof Q.Affix)return q;var K=new Q.Affix;return null!=q.type&&(K.type=String(q.type)),null!=q.amount&&(K.amount=Number(q.amount)),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.type="",z.amount=0),null!=q.type&&q.hasOwnProperty("type")&&(z.type=q.type),null!=q.amount&&q.hasOwnProperty("amount")&&(z.amount=K.json&&!isFinite(q.amount)?String(q.amount):q.amount),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.Appearance=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.ID=q.int32();break;case 2:X.wizardAppearance=Q.WizardAppearance.decode(q,q.uint32());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";var K={};if(null!=q.ID&&q.hasOwnProperty("ID")&&(K.appearance=1,!Y.isInteger(q.ID)))return"ID: integer expected";if(null!=q.wizardAppearance&&q.hasOwnProperty("wizardAppearance")){if(1===K.appearance)return"appearance: multiple values";K.appearance=1;var z=Q.WizardAppearance.verify(q.wizardAppearance);if(z)return"wizardAppearance."+z}return null},X.fromObject=function(q){if(q instanceof Q.Appearance)return q;var K=new Q.Appearance;if(null!=q.ID&&(K.ID=0|q.ID),null!=q.wizardAppearance){if("object"!=typeof q.wizardAppearance)throw TypeError(".Appearance.wizardAppearance: object expected");K.wizardAppearance=Q.WizardAppearance.fromObject(q.wizardAppearance)}return K},X.toObject=function(q,K){K||(K={});var z={};return null!=q.ID&&q.hasOwnProperty("ID")&&(z.ID=q.ID,K.oneofs&&(z.appearance="ID")),null!=q.wizardAppearance&&q.hasOwnProperty("wizardAppearance")&&(z.wizardAppearance=Q.WizardAppearance.toObject(q.wizardAppearance,K),K.oneofs&&(z.appearance="wizardAppearance")),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.Equipment=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 0:X.key=q.int32();break;case 1:X.follow=q.int32();break;case 2:X.hat=q.int32();break;case 3:X.outfit=q.int32();break;case 4:X.weapon=q.int32();break;case 5:X.spellRelic=q.int32();break;case 6:X.boots=q.int32();break;case 7:X.mount=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";var K={};return null!=q.key&&q.hasOwnProperty("key")&&(K._key=1,!Y.isInteger(q.key))?"key: integer expected":null!=q.follow&&q.hasOwnProperty("follow")&&(K._follow=1,!Y.isInteger(q.follow))?"follow: integer expected":null!=q.hat&&q.hasOwnProperty("hat")&&(K._hat=1,!Y.isInteger(q.hat))?"hat: integer expected":null!=q.outfit&&q.hasOwnProperty("outfit")&&(K._outfit=1,!Y.isInteger(q.outfit))?"outfit: integer expected":null!=q.weapon&&q.hasOwnProperty("weapon")&&(K._weapon=1,!Y.isInteger(q.weapon))?"weapon: integer expected":null!=q.spellRelic&&q.hasOwnProperty("spellRelic")&&(K._spellRelic=1,!Y.isInteger(q.spellRelic))?"spellRelic: integer expected":null!=q.boots&&q.hasOwnProperty("boots")&&(K._boots=1,!Y.isInteger(q.boots))?"boots: integer expected":null!=q.mount&&q.hasOwnProperty("mount")&&(K._mount=1,!Y.isInteger(q.mount))?"mount: integer expected":null},X.fromObject=function(q){if(q instanceof Q.Equipment)return q;var K=new Q.Equipment;return null!=q.key&&(K.key=0|q.key),null!=q.follow&&(K.follow=0|q.follow),null!=q.hat&&(K.hat=0|q.hat),null!=q.outfit&&(K.outfit=0|q.outfit),null!=q.weapon&&(K.weapon=0|q.weapon),null!=q.spellRelic&&(K.spellRelic=0|q.spellRelic),null!=q.boots&&(K.boots=0|q.boots),null!=q.mount&&(K.mount=0|q.mount),K},X.toObject=function(q,K){K||(K={});var z={};return null!=q.key&&q.hasOwnProperty("key")&&(z.key=q.key,K.oneofs&&(z._key="key")),null!=q.follow&&q.hasOwnProperty("follow")&&(z.follow=q.follow,K.oneofs&&(z._follow="follow")),null!=q.hat&&q.hasOwnProperty("hat")&&(z.hat=q.hat,K.oneofs&&(z._hat="hat")),null!=q.outfit&&q.hasOwnProperty("outfit")&&(z.outfit=q.outfit,K.oneofs&&(z._outfit="outfit")),null!=q.weapon&&q.hasOwnProperty("weapon")&&(z.weapon=q.weapon,K.oneofs&&(z._weapon="weapon")),null!=q.spellRelic&&q.hasOwnProperty("spellRelic")&&(z.spellRelic=q.spellRelic,K.oneofs&&(z._spellRelic="spellRelic")),null!=q.boots&&q.hasOwnProperty("boots")&&(z.boots=q.boots,K.oneofs&&(z._boots="boots")),null!=q.mount&&q.hasOwnProperty("mount")&&(z.mount=q.mount,K.oneofs&&(z._mount="mount")),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.Unit=function(){function X(q){if(this.affixes=[],this.spells=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.level=q.int32();break;case 2:X.health=q.int32();break;case 3:X.affixes&&X.affixes.length||(X.affixes=[]),X.affixes.push(Q.Affix.decode(q,q.uint32()));break;case 4:X.type=q.string();break;case 5:X.appearance=Q.Appearance.decode(q,q.uint32());break;case 7:X.accuracy=q.float();break;case 8:X.criticalHitChance=q.float();break;case 9:X.criticalHitBonusDamage=q.float();break;case 10:X.spells&&X.spells.length||(X.spells=[]),X.spells.push(Q.Spell.decode(q,q.uint32()));break;case 11:X.powerStat=q.int32();break;case 12:X.healthStat=q.int32();break;case 13:X.element=q.string();break;case 14:X.nickname=q.string();break;case 15:X.equipment=Q.Equipment.decode(q,q.uint32());break;case 16:X.maxHealth=q.int32();break;case 17:X.name=q.string();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";var K={};if(null!=q.level&&q.hasOwnProperty("level")&&!Y.isInteger(q.level))return"level: integer expected";if(null!=q.health&&q.hasOwnProperty("health")&&!Y.isInteger(q.health))return"health: integer expected";if(null!=q.affixes&&q.hasOwnProperty("affixes")){if(!Array.isArray(q.affixes))return"affixes: array expected";for(var z=0;z>>3){case 1:X.energy=q.int32();break;case 2:X.units&&X.units.length||(X.units=[]),X.units.push(Q.Unit.decode(q,q.uint32()));break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.energy&&q.hasOwnProperty("energy")&&!Y.isInteger(q.energy))return"energy: integer expected";if(null!=q.units&&q.hasOwnProperty("units")){if(!Array.isArray(q.units))return"units: array expected";for(var K=0;K>>3){case 1:X.min=q.int32();break;case 2:X.max=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.min&&q.hasOwnProperty("min")&&!Y.isInteger(q.min)?"min: integer expected":null!=q.max&&q.hasOwnProperty("max")&&!Y.isInteger(q.max)?"max: integer expected":null},X.fromObject=function(q){if(q instanceof Q.UnitLevel)return q;var K=new Q.UnitLevel;return null!=q.min&&(K.min=0|q.min),null!=q.max&&(K.max=0|q.max),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.min=0,z.max=0),null!=q.min&&q.hasOwnProperty("min")&&(z.min=q.min),null!=q.max&&q.hasOwnProperty("max")&&(z.max=q.max),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.TeamLimit=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 0:X.limit=Q.TeamLimit.Limit.decode(q,q.uint32());break;case 1:X.units=Q.TeamLimit.Units.decode(q,q.uint32());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.limit&&q.hasOwnProperty("limit")&&(K=Q.TeamLimit.Limit.verify(q.limit))?"limit."+K:null!=q.units&&q.hasOwnProperty("units")&&(K=Q.TeamLimit.Units.verify(q.units))?"units."+K:null;var K},X.fromObject=function(q){if(q instanceof Q.TeamLimit)return q;var K=new Q.TeamLimit;if(null!=q.limit){if("object"!=typeof q.limit)throw TypeError(".TeamLimit.limit: object expected");K.limit=Q.TeamLimit.Limit.fromObject(q.limit)}if(null!=q.units){if("object"!=typeof q.units)throw TypeError(".TeamLimit.units: object expected");K.units=Q.TeamLimit.Units.fromObject(q.units)}return K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.limit=null,z.units=null),null!=q.limit&&q.hasOwnProperty("limit")&&(z.limit=Q.TeamLimit.Limit.toObject(q.limit,K)),null!=q.units&&q.hasOwnProperty("units")&&(z.units=Q.TeamLimit.Units.toObject(q.units,K)),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X.Limit=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.min=q.int32();break;case 2:X.max=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.min&&q.hasOwnProperty("min")&&!Y.isInteger(q.min)?"min: integer expected":null!=q.max&&q.hasOwnProperty("max")&&!Y.isInteger(q.max)?"max: integer expected":null},X.fromObject=function(q){if(q instanceof Q.TeamLimit.Limit)return q;var K=new Q.TeamLimit.Limit;return null!=q.min&&(K.min=0|q.min),null!=q.max&&(K.max=0|q.max),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.min=0,z.max=0),null!=q.min&&q.hasOwnProperty("min")&&(z.min=q.min),null!=q.max&&q.hasOwnProperty("max")&&(z.max=q.max),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),X.Units=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.min=q.int32();break;case 2:X.max=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.min&&q.hasOwnProperty("min")&&!Y.isInteger(q.min)?"min: integer expected":null!=q.max&&q.hasOwnProperty("max")&&!Y.isInteger(q.max)?"max: integer expected":null},X.fromObject=function(q){if(q instanceof Q.TeamLimit.Units)return q;var K=new Q.TeamLimit.Units;return null!=q.min&&(K.min=0|q.min),null!=q.max&&(K.max=0|q.max),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.min=0,z.max=0),null!=q.min&&q.hasOwnProperty("min")&&(z.min=q.min),null!=q.max&&q.hasOwnProperty("max")&&(z.max=q.max),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),X}(),Q.Battle=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.id=q.string();break;case 2:X.userId=q.int32();break;case 3:X.status=q.string();break;case 4:X.homeState=Q.TeamState.decode(q,q.uint32());break;case 5:X.awayState=Q.TeamState.decode(q,q.uint32());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.id&&q.hasOwnProperty("id")&&!Y.isString(q.id)?"id: string expected":null!=q.userId&&q.hasOwnProperty("userId")&&!Y.isInteger(q.userId)?"userId: integer expected":null!=q.status&&q.hasOwnProperty("status")&&!Y.isString(q.status)?"status: string expected":null!=q.homeState&&q.hasOwnProperty("homeState")&&(K=Q.TeamState.verify(q.homeState))?"homeState."+K:null!=q.awayState&&q.hasOwnProperty("awayState")&&(K=Q.TeamState.verify(q.awayState))?"awayState."+K:null;var K},X.fromObject=function(q){if(q instanceof Q.Battle)return q;var K=new Q.Battle;if(null!=q.id&&(K.id=String(q.id)),null!=q.userId&&(K.userId=0|q.userId),null!=q.status&&(K.status=String(q.status)),null!=q.homeState){if("object"!=typeof q.homeState)throw TypeError(".Battle.homeState: object expected");K.homeState=Q.TeamState.fromObject(q.homeState)}if(null!=q.awayState){if("object"!=typeof q.awayState)throw TypeError(".Battle.awayState: object expected");K.awayState=Q.TeamState.fromObject(q.awayState)}return K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.id="",z.userId=0,z.status="",z.homeState=null,z.awayState=null),null!=q.id&&q.hasOwnProperty("id")&&(z.id=q.id),null!=q.userId&&q.hasOwnProperty("userId")&&(z.userId=q.userId),null!=q.status&&q.hasOwnProperty("status")&&(z.status=q.status),null!=q.homeState&&q.hasOwnProperty("homeState")&&(z.homeState=Q.TeamState.toObject(q.homeState,K)),null!=q.awayState&&q.hasOwnProperty("awayState")&&(z.awayState=Q.TeamState.toObject(q.awayState,K)),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.TargetData=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 0:X.deltaHealth=q.int32();break;case 1:X.finalHealth=q.int32();break;case 2:X.effect=q.int32();break;case 3:X.targetUnit=q.int32();break;case 4:X.deltaEnergy=q.int32();break;case 5:X.finalEnergy=q.int32();break;case 6:X.index=q.int32();break;case 7:X.nFactor=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";var K={};return null!=q.deltaHealth&&q.hasOwnProperty("deltaHealth")&&!Y.isInteger(q.deltaHealth)?"deltaHealth: integer expected":null!=q.finalHealth&&q.hasOwnProperty("finalHealth")&&!Y.isInteger(q.finalHealth)?"finalHealth: integer expected":null!=q.effect&&q.hasOwnProperty("effect")&&(K._effect=1,!Y.isInteger(q.effect))?"effect: integer expected":null!=q.targetUnit&&q.hasOwnProperty("targetUnit")&&(K._targetUnit=1,!Y.isInteger(q.targetUnit))?"targetUnit: integer expected":null!=q.deltaEnergy&&q.hasOwnProperty("deltaEnergy")&&(K._deltaEnergy=1,!Y.isInteger(q.deltaEnergy))?"deltaEnergy: integer expected":null!=q.finalEnergy&&q.hasOwnProperty("finalEnergy")&&(K._finalEnergy=1,!Y.isInteger(q.finalEnergy))?"finalEnergy: integer expected":null!=q.index&&q.hasOwnProperty("index")&&(K._index=1,!Y.isInteger(q.index))?"index: integer expected":null!=q.nFactor&&q.hasOwnProperty("nFactor")&&!Y.isInteger(q.nFactor)?"nFactor: integer expected":null},X.fromObject=function(q){if(q instanceof Q.TargetData)return q;var K=new Q.TargetData;return null!=q.deltaHealth&&(K.deltaHealth=0|q.deltaHealth),null!=q.finalHealth&&(K.finalHealth=0|q.finalHealth),null!=q.effect&&(K.effect=0|q.effect),null!=q.targetUnit&&(K.targetUnit=0|q.targetUnit),null!=q.deltaEnergy&&(K.deltaEnergy=0|q.deltaEnergy),null!=q.finalEnergy&&(K.finalEnergy=0|q.finalEnergy),null!=q.index&&(K.index=0|q.index),null!=q.nFactor&&(K.nFactor=0|q.nFactor),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.deltaHealth=0,z.finalHealth=0,z.nFactor=0),null!=q.deltaHealth&&q.hasOwnProperty("deltaHealth")&&(z.deltaHealth=q.deltaHealth),null!=q.finalHealth&&q.hasOwnProperty("finalHealth")&&(z.finalHealth=q.finalHealth),null!=q.effect&&q.hasOwnProperty("effect")&&(z.effect=q.effect,K.oneofs&&(z._effect="effect")),null!=q.targetUnit&&q.hasOwnProperty("targetUnit")&&(z.targetUnit=q.targetUnit,K.oneofs&&(z._targetUnit="targetUnit")),null!=q.deltaEnergy&&q.hasOwnProperty("deltaEnergy")&&(z.deltaEnergy=q.deltaEnergy,K.oneofs&&(z._deltaEnergy="deltaEnergy")),null!=q.finalEnergy&&q.hasOwnProperty("finalEnergy")&&(z.finalEnergy=q.finalEnergy,K.oneofs&&(z._finalEnergy="finalEnergy")),null!=q.index&&q.hasOwnProperty("index")&&(z.index=q.index,K.oneofs&&(z._index="index")),null!=q.nFactor&&q.hasOwnProperty("nFactor")&&(z.nFactor=q.nFactor),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.Action=function(){function X(q){if(this.targetData=[],q)for(var K=Object.keys(q),z=0;z>>3){case 0:X.team=q.int32();break;case 1:X.type=q.string();break;case 2:X.id=q.int32();break;case 3:X.targetData&&X.targetData.length||(X.targetData=[]),X.targetData.push(Q.TargetData.decode(q,q.uint32()));break;case 4:X.epicID=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.team&&q.hasOwnProperty("team")&&!Y.isInteger(q.team))return"team: integer expected";if(null!=q.type&&q.hasOwnProperty("type")&&!Y.isString(q.type))return"type: string expected";if(null!=q.id&&q.hasOwnProperty("id")&&!Y.isInteger(q.id))return"id: integer expected";if(null!=q.targetData&&q.hasOwnProperty("targetData")){if(!Array.isArray(q.targetData))return"targetData: array expected";for(var K=0;K>>3){case 0:X.ID=q.int32();break;case 1:X.type=q.string();break;case 2:X.quantity=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";var K={};return null!=q.ID&&q.hasOwnProperty("ID")&&(K._ID=1,!Y.isInteger(q.ID))?"ID: integer expected":null!=q.type&&q.hasOwnProperty("type")&&(K._type=1,!Y.isString(q.type))?"type: string expected":null!=q.quantity&&q.hasOwnProperty("quantity")&&(K._quantity=1,!Y.isInteger(q.quantity))?"quantity: integer expected":null},X.fromObject=function(q){if(q instanceof Q.LootItem)return q;var K=new Q.LootItem;return null!=q.ID&&(K.ID=0|q.ID),null!=q.type&&(K.type=String(q.type)),null!=q.quantity&&(K.quantity=0|q.quantity),K},X.toObject=function(q,K){K||(K={});var z={};return null!=q.ID&&q.hasOwnProperty("ID")&&(z.ID=q.ID,K.oneofs&&(z._ID="ID")),null!=q.type&&q.hasOwnProperty("type")&&(z.type=q.type,K.oneofs&&(z._type="type")),null!=q.quantity&&q.hasOwnProperty("quantity")&&(z.quantity=q.quantity,K.oneofs&&(z._quantity="quantity")),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.BattleAction=function(){function X(q){if(this.actions=[],this.lootSecure=[],this.lootUnSecure=[],q)for(var K=Object.keys(q),z=0;z>>3){case 0:X.id=q.string();break;case 1:X.userId=q.int32();break;case 2:X.status=q.string();break;case 3:X.actionID=q.string();break;case 4:X.actions&&X.actions.length||(X.actions=[]),X.actions.push(Q.Action.decode(q,q.uint32()));break;case 5:X.lootSecure&&X.lootSecure.length||(X.lootSecure=[]),X.lootSecure.push(Q.LootItem.decode(q,q.uint32()));break;case 6:X.lootUnSecure&&X.lootUnSecure.length||(X.lootUnSecure=[]),X.lootUnSecure.push(Q.LootItem.decode(q,q.uint32()));break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.id&&q.hasOwnProperty("id")&&!Y.isString(q.id))return"id: string expected";if(null!=q.userId&&q.hasOwnProperty("userId")&&!Y.isInteger(q.userId))return"userId: integer expected";if(null!=q.status&&q.hasOwnProperty("status")&&!Y.isString(q.status))return"status: string expected";if(null!=q.actionID&&q.hasOwnProperty("actionID")&&!Y.isString(q.actionID))return"actionID: string expected";if(null!=q.actions&&q.hasOwnProperty("actions")){if(!Array.isArray(q.actions))return"actions: array expected";for(var K=0;K>>3){case 1:X.userId=q.int32();break;case 2:X.runs&&X.runs.length||(X.runs=[]),X.runs.push(Q.Run.decode(q,q.uint32()));break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.userId&&q.hasOwnProperty("userId")&&!Y.isInteger(q.userId))return"userId: integer expected";if(null!=q.runs&&q.hasOwnProperty("runs")){if(!Array.isArray(q.runs))return"runs: array expected";for(var K=0;K>>3){case 1:X.bounties&&X.bounties.length||(X.bounties=[]),X.bounties.push(Q.Bounty.decode(q,q.uint32()));break;case 2:if(X.pets&&X.pets.length||(X.pets=[]),2==(7&Z))for(var J=q.uint32()+q.pos;q.pos>>3){case 1:X.name=q.string();break;case 2:X.statBonus=Q.StatBonus.decode(q,q.uint32());break;case 3:X.isMember=q.bool();break;case 4:X.petID=q.int32();break;case 5:X.bountyLoot&&X.bountyLoot.length||(X.bountyLoot=[]),X.bountyLoot.push(Q.BountyRunLoot.decode(q,q.uint32()));break;case 6:if(X.randomLootItemTableIds&&X.randomLootItemTableIds.length||(X.randomLootItemTableIds=[]),2==(7&Z))for(var J=q.uint32()+q.pos;q.pos>>3){case 1:X.ID=q.int32();break;case 2:X.quantity=q.int32();break;case 3:X.weight=q.float();break;case 4:X.type=q.string();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";var K={};return null!=q.ID&&q.hasOwnProperty("ID")&&!Y.isInteger(q.ID)?"ID: integer expected":null!=q.quantity&&q.hasOwnProperty("quantity")&&(K._quantity=1,!Y.isInteger(q.quantity))?"quantity: integer expected":null!=q.weight&&q.hasOwnProperty("weight")&&(K._weight=1,"number"!=typeof q.weight)?"weight: number expected":null!=q.type&&q.hasOwnProperty("type")&&(K._type=1,!Y.isString(q.type))?"type: string expected":null},X.fromObject=function(q){if(q instanceof Q.BountyRunLoot)return q;var K=new Q.BountyRunLoot;return null!=q.ID&&(K.ID=0|q.ID),null!=q.quantity&&(K.quantity=0|q.quantity),null!=q.weight&&(K.weight=Number(q.weight)),null!=q.type&&(K.type=String(q.type)),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.ID=0),null!=q.ID&&q.hasOwnProperty("ID")&&(z.ID=q.ID),null!=q.quantity&&q.hasOwnProperty("quantity")&&(z.quantity=q.quantity,K.oneofs&&(z._quantity="quantity")),null!=q.weight&&q.hasOwnProperty("weight")&&(z.weight=K.json&&!isFinite(q.weight)?String(q.weight):q.weight,K.oneofs&&(z._weight="weight")),null!=q.type&&q.hasOwnProperty("type")&&(z.type=q.type,K.oneofs&&(z._type="type")),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.StatBonus=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.type=q.string();break;case 2:X.amount=q.float();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.type&&q.hasOwnProperty("type")&&!Y.isString(q.type)?"type: string expected":null!=q.amount&&q.hasOwnProperty("amount")&&"number"!=typeof q.amount?"amount: number expected":null},X.fromObject=function(q){if(q instanceof Q.StatBonus)return q;var K=new Q.StatBonus;return null!=q.type&&(K.type=String(q.type)),null!=q.amount&&(K.amount=Number(q.amount)),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.type="",z.amount=0),null!=q.type&&q.hasOwnProperty("type")&&(z.type=q.type),null!=q.amount&&q.hasOwnProperty("amount")&&(z.amount=K.json&&!isFinite(q.amount)?String(q.amount):q.amount),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.Character=function(){function X(q){if(this.loadouts=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userId=q.int32();break;case 2:X.gameVersion=q.string();break;case 3:X.dataVersion=q.int32();break;case 4:X.inventory=Q.Inventory.decode(q,q.uint32());break;case 5:X.loadouts&&X.loadouts.length||(X.loadouts=[]),X.loadouts.push(Q.Loadout.decode(q,q.uint32()));break;case 6:X.membership=Q.Membership.decode(q,q.uint32());break;case 7:X.egInfo=Q.EgInfo.decode(q,q.uint32());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.userId&&q.hasOwnProperty("userId")&&!Y.isInteger(q.userId))return"userId: integer expected";if(null!=q.gameVersion&&q.hasOwnProperty("gameVersion")&&!Y.isString(q.gameVersion))return"gameVersion: string expected";if(null!=q.dataVersion&&q.hasOwnProperty("dataVersion")&&!Y.isInteger(q.dataVersion))return"dataVersion: integer expected";if(null!=q.inventory&&q.hasOwnProperty("inventory")&&(z=Q.Inventory.verify(q.inventory)))return"inventory."+z;if(null!=q.loadouts&&q.hasOwnProperty("loadouts")){if(!Array.isArray(q.loadouts))return"loadouts: array expected";for(var K=0;K>>3){case 1:X.orb&&X.orb.length||(X.orb=[]),X.orb.push(Q.Item.decode(q,q.uint32()));break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.orb&&q.hasOwnProperty("orb")){if(!Array.isArray(q.orb))return"orb: array expected";for(var K=0;K>>3){case 1:X.ID=q.int32();break;case 2:X.quantity=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";var K={};return null!=q.ID&&q.hasOwnProperty("ID")&&!Y.isInteger(q.ID)?"ID: integer expected":null!=q.quantity&&q.hasOwnProperty("quantity")&&(K._quantity=1,!Y.isInteger(q.quantity))?"quantity: integer expected":null},X.fromObject=function(q){if(q instanceof Q.Item)return q;var K=new Q.Item;return null!=q.ID&&(K.ID=0|q.ID),null!=q.quantity&&(K.quantity=0|q.quantity),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.ID=0),null!=q.ID&&q.hasOwnProperty("ID")&&(z.ID=q.ID),null!=q.quantity&&q.hasOwnProperty("quantity")&&(z.quantity=q.quantity,K.oneofs&&(z._quantity="quantity")),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.Loadout=function(){function X(q){if(this.orbs=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:if(X.orbs&&X.orbs.length||(X.orbs=[]),2==(7&Z))for(var J=q.uint32()+q.pos;q.pos>>3){case 1:X.active=q.bool();break;case 2:X.memberStartDate=q.int32();break;case 3:X.memberEndDate=q.int32();break;case 4:X.membershipStartTs=q.double();break;case 5:X.membershipEndTs=q.double();break;case 6:X.features&&X.features.length||(X.features=[]),X.features.push(q.string());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.active&&q.hasOwnProperty("active")&&"boolean"!=typeof q.active)return"active: boolean expected";if(null!=q.memberStartDate&&q.hasOwnProperty("memberStartDate")&&!Y.isInteger(q.memberStartDate))return"memberStartDate: integer expected";if(null!=q.memberEndDate&&q.hasOwnProperty("memberEndDate")&&!Y.isInteger(q.memberEndDate))return"memberEndDate: integer expected";if(null!=q.membershipStartTs&&q.hasOwnProperty("membershipStartTs")&&"number"!=typeof q.membershipStartTs)return"membershipStartTs: number expected";if(null!=q.membershipEndTs&&q.hasOwnProperty("membershipEndTs")&&"number"!=typeof q.membershipEndTs)return"membershipEndTs: number expected";if(null!=q.features&&q.hasOwnProperty("features")){if(!Array.isArray(q.features))return"features: array expected";for(var K=0;K>>3){case 1:X.tier=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.tier&&q.hasOwnProperty("tier")&&!Y.isInteger(q.tier)?"tier: integer expected":null},X.fromObject=function(q){if(q instanceof Q.EgInfo)return q;var K=new Q.EgInfo;return null!=q.tier&&(K.tier=0|q.tier),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.tier=0),null!=q.tier&&q.hasOwnProperty("tier")&&(z.tier=q.tier),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.CoOpTeamProto=function(){function X(q){if(this.teamMembers=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.hostID=q.double();break;case 2:X.teamMembers&&X.teamMembers.length||(X.teamMembers=[]),X.teamMembers.push(Q.CoOpTeamMemberProto.decode(q,q.uint32()));break;case 3:X.battleStreak=q.double();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.hostID&&q.hasOwnProperty("hostID")&&"number"!=typeof q.hostID)return"hostID: number expected";if(null!=q.teamMembers&&q.hasOwnProperty("teamMembers")){if(!Array.isArray(q.teamMembers))return"teamMembers: array expected";for(var K=0;K>>3){case 1:X.hostID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.hostID&&q.hasOwnProperty("hostID")&&"number"!=typeof q.hostID?"hostID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.CoOpTeamDisbandedProto)return q;var K=new Q.CoOpTeamDisbandedProto;return null!=q.hostID&&(K.hostID=Number(q.hostID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.hostID=0),null!=q.hostID&&q.hasOwnProperty("hostID")&&(z.hostID=K.json&&!isFinite(q.hostID)?String(q.hostID):q.hostID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.CoOpTeamJoinRequestProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.CoOpTeamJoinRequestProto)return q;var K=new Q.CoOpTeamJoinRequestProto;return null!=q.userID&&(K.userID=Number(q.userID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.CoOpTeamErrorProto=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.reason=q.string();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.reason&&q.hasOwnProperty("reason")&&!Y.isString(q.reason)?"reason: string expected":null},X.fromObject=function(q){if(q instanceof Q.CoOpTeamErrorProto)return q;var K=new Q.CoOpTeamErrorProto;return null!=q.reason&&(K.reason=String(q.reason)),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.reason=""),null!=q.reason&&q.hasOwnProperty("reason")&&(z.reason=q.reason),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.CoOpTeamJoinSuccessProto=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.socketRoomID=q.string();break;case 2:X.team=Q.CoOpTeamProto.decode(q,q.uint32());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.socketRoomID&&q.hasOwnProperty("socketRoomID")&&!Y.isString(q.socketRoomID))return"socketRoomID: string expected";if(null!=q.team&&q.hasOwnProperty("team")){var K=Q.CoOpTeamProto.verify(q.team);if(K)return"team."+K}return null},X.fromObject=function(q){if(q instanceof Q.CoOpTeamJoinSuccessProto)return q;var K=new Q.CoOpTeamJoinSuccessProto;if(null!=q.socketRoomID&&(K.socketRoomID=String(q.socketRoomID)),null!=q.team){if("object"!=typeof q.team)throw TypeError(".CoOpTeamJoinSuccessProto.team: object expected");K.team=Q.CoOpTeamProto.fromObject(q.team)}return K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.socketRoomID="",z.team=null),null!=q.socketRoomID&&q.hasOwnProperty("socketRoomID")&&(z.socketRoomID=q.socketRoomID),null!=q.team&&q.hasOwnProperty("team")&&(z.team=Q.CoOpTeamProto.toObject(q.team,K)),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.CoOpTeamMatchDetailsProto=function(){function X(q){if(this.teammates=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.hostID=q.double();break;case 2:X.type=q.string();break;case 3:X.teammates&&X.teammates.length||(X.teammates=[]),X.teammates.push(Q.PlayerProto.decode(q,q.uint32()));break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.hostID&&q.hasOwnProperty("hostID")&&"number"!=typeof q.hostID)return"hostID: number expected";if(null!=q.type&&q.hasOwnProperty("type")&&!Y.isString(q.type))return"type: string expected";if(null!=q.teammates&&q.hasOwnProperty("teammates")){if(!Array.isArray(q.teammates))return"teammates: array expected";for(var K=0;K>>3){case 1:X.userID=q.double();break;case 2:X.ready=q.bool();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null!=q.ready&&q.hasOwnProperty("ready")&&"boolean"!=typeof q.ready?"ready: boolean expected":null},Y.fromObject=function(q){if(q instanceof Q.CoOpTeamMemberProto)return q;var K=new Q.CoOpTeamMemberProto;return null!=q.userID&&(K.userID=Number(q.userID)),null!=q.ready&&(K.ready=Boolean(q.ready)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0,z.ready=!1),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),null!=q.ready&&q.hasOwnProperty("ready")&&(z.ready=q.ready),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.CoOpTeamReadyUpProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.CoOpTeamReadyUpProto)return q;var K=new Q.CoOpTeamReadyUpProto;return null!=q.userID&&(K.userID=Number(q.userID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.PlayerProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;case 2:X.appearance=Q.PlayerAppearanceProto.decode(q,q.uint32());break;case 3:X.equipment=Q.PlayerEquipmentProto.decode(q,q.uint32());break;case 4:X.name=Q.PlayerNameProto.decode(q,q.uint32());break;case 5:X.level=q.double();break;case 6:X.member=q.double();break;case 7:X.team=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null!=q.appearance&&q.hasOwnProperty("appearance")&&(K=Q.PlayerAppearanceProto.verify(q.appearance))?"appearance."+K:null!=q.equipment&&q.hasOwnProperty("equipment")&&(K=Q.PlayerEquipmentProto.verify(q.equipment))?"equipment."+K:null!=q.name&&q.hasOwnProperty("name")&&(K=Q.PlayerNameProto.verify(q.name))?"name."+K:null!=q.level&&q.hasOwnProperty("level")&&"number"!=typeof q.level?"level: number expected":null!=q.member&&q.hasOwnProperty("member")&&"number"!=typeof q.member?"member: number expected":null!=q.team&&q.hasOwnProperty("team")&&"number"!=typeof q.team?"team: number expected":null;var K},Y.fromObject=function(q){if(q instanceof Q.PlayerProto)return q;var K=new Q.PlayerProto;if(null!=q.userID&&(K.userID=Number(q.userID)),null!=q.appearance){if("object"!=typeof q.appearance)throw TypeError(".PlayerProto.appearance: object expected");K.appearance=Q.PlayerAppearanceProto.fromObject(q.appearance)}if(null!=q.equipment){if("object"!=typeof q.equipment)throw TypeError(".PlayerProto.equipment: object expected");K.equipment=Q.PlayerEquipmentProto.fromObject(q.equipment)}if(null!=q.name){if("object"!=typeof q.name)throw TypeError(".PlayerProto.name: object expected");K.name=Q.PlayerNameProto.fromObject(q.name)}return null!=q.level&&(K.level=Number(q.level)),null!=q.member&&(K.member=Number(q.member)),null!=q.team&&(K.team=Number(q.team)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0,z.appearance=null,z.equipment=null,z.name=null,z.level=0,z.member=0,z.team=0),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),null!=q.appearance&&q.hasOwnProperty("appearance")&&(z.appearance=Q.PlayerAppearanceProto.toObject(q.appearance,K)),null!=q.equipment&&q.hasOwnProperty("equipment")&&(z.equipment=Q.PlayerEquipmentProto.toObject(q.equipment,K)),null!=q.name&&q.hasOwnProperty("name")&&(z.name=Q.PlayerNameProto.toObject(q.name,K)),null!=q.level&&q.hasOwnProperty("level")&&(z.level=K.json&&!isFinite(q.level)?String(q.level):q.level),null!=q.member&&q.hasOwnProperty("member")&&(z.member=K.json&&!isFinite(q.member)?String(q.member):q.member),null!=q.team&&q.hasOwnProperty("team")&&(z.team=K.json&&!isFinite(q.team)?String(q.team):q.team),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.PlayerAppearanceProto=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.faceID=q.double();break;case 2:X.hair=Q.PlayerHairProto.decode(q,q.uint32());break;case 3:X.skinColorID=q.double();break;case 4:X.eyeColorID=q.double();break;case 5:X.gender=q.string();break;case 6:X.morph=Q.MorphProto.decode(q,q.uint32());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.faceID&&q.hasOwnProperty("faceID")&&"number"!=typeof q.faceID?"faceID: number expected":null!=q.hair&&q.hasOwnProperty("hair")&&(K=Q.PlayerHairProto.verify(q.hair))?"hair."+K:null!=q.skinColorID&&q.hasOwnProperty("skinColorID")&&"number"!=typeof q.skinColorID?"skinColorID: number expected":null!=q.eyeColorID&&q.hasOwnProperty("eyeColorID")&&"number"!=typeof q.eyeColorID?"eyeColorID: number expected":null!=q.gender&&q.hasOwnProperty("gender")&&!Y.isString(q.gender)?"gender: string expected":null!=q.morph&&q.hasOwnProperty("morph")&&(K=Q.MorphProto.verify(q.morph))?"morph."+K:null;var K},X.fromObject=function(q){if(q instanceof Q.PlayerAppearanceProto)return q;var K=new Q.PlayerAppearanceProto;if(null!=q.faceID&&(K.faceID=Number(q.faceID)),null!=q.hair){if("object"!=typeof q.hair)throw TypeError(".PlayerAppearanceProto.hair: object expected");K.hair=Q.PlayerHairProto.fromObject(q.hair)}if(null!=q.skinColorID&&(K.skinColorID=Number(q.skinColorID)),null!=q.eyeColorID&&(K.eyeColorID=Number(q.eyeColorID)),null!=q.gender&&(K.gender=String(q.gender)),null!=q.morph){if("object"!=typeof q.morph)throw TypeError(".PlayerAppearanceProto.morph: object expected");K.morph=Q.MorphProto.fromObject(q.morph)}return K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.faceID=0,z.hair=null,z.skinColorID=0,z.eyeColorID=0,z.gender="",z.morph=null),null!=q.faceID&&q.hasOwnProperty("faceID")&&(z.faceID=K.json&&!isFinite(q.faceID)?String(q.faceID):q.faceID),null!=q.hair&&q.hasOwnProperty("hair")&&(z.hair=Q.PlayerHairProto.toObject(q.hair,K)),null!=q.skinColorID&&q.hasOwnProperty("skinColorID")&&(z.skinColorID=K.json&&!isFinite(q.skinColorID)?String(q.skinColorID):q.skinColorID),null!=q.eyeColorID&&q.hasOwnProperty("eyeColorID")&&(z.eyeColorID=K.json&&!isFinite(q.eyeColorID)?String(q.eyeColorID):q.eyeColorID),null!=q.gender&&q.hasOwnProperty("gender")&&(z.gender=q.gender),null!=q.morph&&q.hasOwnProperty("morph")&&(z.morph=Q.MorphProto.toObject(q.morph,K)),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.MorphProto=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.type=q.string();break;case 2:X.ID=q.double();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.type&&q.hasOwnProperty("type")&&!Y.isString(q.type)?"type: string expected":null!=q.ID&&q.hasOwnProperty("ID")&&"number"!=typeof q.ID?"ID: number expected":null},X.fromObject=function(q){if(q instanceof Q.MorphProto)return q;var K=new Q.MorphProto;return null!=q.type&&(K.type=String(q.type)),null!=q.ID&&(K.ID=Number(q.ID)),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.type="",z.ID=0),null!=q.type&&q.hasOwnProperty("type")&&(z.type=q.type),null!=q.ID&&q.hasOwnProperty("ID")&&(z.ID=K.json&&!isFinite(q.ID)?String(q.ID):q.ID),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.PlayerEquipmentProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.hatID=q.double();break;case 2:X.outfitID=q.double();break;case 3:X.weaponID=q.double();break;case 4:X.bootsID=q.double();break;case 5:X.costumeID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.hatID&&q.hasOwnProperty("hatID")&&"number"!=typeof q.hatID?"hatID: number expected":null!=q.outfitID&&q.hasOwnProperty("outfitID")&&"number"!=typeof q.outfitID?"outfitID: number expected":null!=q.weaponID&&q.hasOwnProperty("weaponID")&&"number"!=typeof q.weaponID?"weaponID: number expected":null!=q.bootsID&&q.hasOwnProperty("bootsID")&&"number"!=typeof q.bootsID?"bootsID: number expected":null!=q.costumeID&&q.hasOwnProperty("costumeID")&&"number"!=typeof q.costumeID?"costumeID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.PlayerEquipmentProto)return q;var K=new Q.PlayerEquipmentProto;return null!=q.hatID&&(K.hatID=Number(q.hatID)),null!=q.outfitID&&(K.outfitID=Number(q.outfitID)),null!=q.weaponID&&(K.weaponID=Number(q.weaponID)),null!=q.bootsID&&(K.bootsID=Number(q.bootsID)),null!=q.costumeID&&(K.costumeID=Number(q.costumeID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.hatID=0,z.outfitID=0,z.weaponID=0,z.bootsID=0,z.costumeID=0),null!=q.hatID&&q.hasOwnProperty("hatID")&&(z.hatID=K.json&&!isFinite(q.hatID)?String(q.hatID):q.hatID),null!=q.outfitID&&q.hasOwnProperty("outfitID")&&(z.outfitID=K.json&&!isFinite(q.outfitID)?String(q.outfitID):q.outfitID),null!=q.weaponID&&q.hasOwnProperty("weaponID")&&(z.weaponID=K.json&&!isFinite(q.weaponID)?String(q.weaponID):q.weaponID),null!=q.bootsID&&q.hasOwnProperty("bootsID")&&(z.bootsID=K.json&&!isFinite(q.bootsID)?String(q.bootsID):q.bootsID),null!=q.costumeID&&q.hasOwnProperty("costumeID")&&(z.costumeID=K.json&&!isFinite(q.costumeID)?String(q.costumeID):q.costumeID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.PlayerHairProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.styleID=q.double();break;case 2:X.colorID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.styleID&&q.hasOwnProperty("styleID")&&"number"!=typeof q.styleID?"styleID: number expected":null!=q.colorID&&q.hasOwnProperty("colorID")&&"number"!=typeof q.colorID?"colorID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.PlayerHairProto)return q;var K=new Q.PlayerHairProto;return null!=q.styleID&&(K.styleID=Number(q.styleID)),null!=q.colorID&&(K.colorID=Number(q.colorID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.styleID=0,z.colorID=0),null!=q.styleID&&q.hasOwnProperty("styleID")&&(z.styleID=K.json&&!isFinite(q.styleID)?String(q.styleID):q.styleID),null!=q.colorID&&q.hasOwnProperty("colorID")&&(z.colorID=K.json&&!isFinite(q.colorID)?String(q.colorID):q.colorID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.PlayerNameProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.first=q.double();break;case 2:X.middle=q.double();break;case 3:X.last=q.double();break;case 4:X.nick=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.first&&q.hasOwnProperty("first")&&"number"!=typeof q.first?"first: number expected":null!=q.middle&&q.hasOwnProperty("middle")&&"number"!=typeof q.middle?"middle: number expected":null!=q.last&&q.hasOwnProperty("last")&&"number"!=typeof q.last?"last: number expected":null!=q.nick&&q.hasOwnProperty("nick")&&"number"!=typeof q.nick?"nick: number expected":null},Y.fromObject=function(q){if(q instanceof Q.PlayerNameProto)return q;var K=new Q.PlayerNameProto;return null!=q.first&&(K.first=Number(q.first)),null!=q.middle&&(K.middle=Number(q.middle)),null!=q.last&&(K.last=Number(q.last)),null!=q.nick&&(K.nick=Number(q.nick)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.first=0,z.middle=0,z.last=0,z.nick=0),null!=q.first&&q.hasOwnProperty("first")&&(z.first=K.json&&!isFinite(q.first)?String(q.first):q.first),null!=q.middle&&q.hasOwnProperty("middle")&&(z.middle=K.json&&!isFinite(q.middle)?String(q.middle):q.middle),null!=q.last&&q.hasOwnProperty("last")&&(z.last=K.json&&!isFinite(q.last)?String(q.last):q.last),null!=q.nick&&q.hasOwnProperty("nick")&&(z.nick=K.json&&!isFinite(q.nick)?String(q.nick):q.nick),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.PlayerPetProto=function(){function X(q){if(this.foreignSpells=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.ID=q.double();break;case 2:X.stars=q.double();break;case 3:X.team=q.double();break;case 4:X.level=q.double();break;case 5:X.levelCaught=q.double();break;case 6:if(X.foreignSpells&&X.foreignSpells.length||(X.foreignSpells=[]),2==(7&Z))for(var J=q.uint32()+q.pos;q.pos>>3){case 1:X.matchDetails=Q.CoOpTeamMatchDetailsProto.decode(q,q.uint32());break;case 2:X.titanNetworkID=q.double();break;case 3:X.titanAssetID=q.double();break;case 4:X.titanHP=q.double();break;case 5:X.crystalHP=q.double();break;case 6:X.titanXPBounty=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.matchDetails&&q.hasOwnProperty("matchDetails")){var K=Q.CoOpTeamMatchDetailsProto.verify(q.matchDetails);if(K)return"matchDetails."+K}return null!=q.titanNetworkID&&q.hasOwnProperty("titanNetworkID")&&"number"!=typeof q.titanNetworkID?"titanNetworkID: number expected":null!=q.titanAssetID&&q.hasOwnProperty("titanAssetID")&&"number"!=typeof q.titanAssetID?"titanAssetID: number expected":null!=q.titanHP&&q.hasOwnProperty("titanHP")&&"number"!=typeof q.titanHP?"titanHP: number expected":null!=q.crystalHP&&q.hasOwnProperty("crystalHP")&&"number"!=typeof q.crystalHP?"crystalHP: number expected":null!=q.titanXPBounty&&q.hasOwnProperty("titanXPBounty")&&"number"!=typeof q.titanXPBounty?"titanXPBounty: number expected":null},Y.fromObject=function(q){if(q instanceof Q.StartCoOpTitanMatchProto)return q;var K=new Q.StartCoOpTitanMatchProto;if(null!=q.matchDetails){if("object"!=typeof q.matchDetails)throw TypeError(".StartCoOpTitanMatchProto.matchDetails: object expected");K.matchDetails=Q.CoOpTeamMatchDetailsProto.fromObject(q.matchDetails)}return null!=q.titanNetworkID&&(K.titanNetworkID=Number(q.titanNetworkID)),null!=q.titanAssetID&&(K.titanAssetID=Number(q.titanAssetID)),null!=q.titanHP&&(K.titanHP=Number(q.titanHP)),null!=q.crystalHP&&(K.crystalHP=Number(q.crystalHP)),null!=q.titanXPBounty&&(K.titanXPBounty=Number(q.titanXPBounty)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.matchDetails=null,z.titanNetworkID=0,z.titanAssetID=0,z.titanHP=0,z.crystalHP=0,z.titanXPBounty=0),null!=q.matchDetails&&q.hasOwnProperty("matchDetails")&&(z.matchDetails=Q.CoOpTeamMatchDetailsProto.toObject(q.matchDetails,K)),null!=q.titanNetworkID&&q.hasOwnProperty("titanNetworkID")&&(z.titanNetworkID=K.json&&!isFinite(q.titanNetworkID)?String(q.titanNetworkID):q.titanNetworkID),null!=q.titanAssetID&&q.hasOwnProperty("titanAssetID")&&(z.titanAssetID=K.json&&!isFinite(q.titanAssetID)?String(q.titanAssetID):q.titanAssetID),null!=q.titanHP&&q.hasOwnProperty("titanHP")&&(z.titanHP=K.json&&!isFinite(q.titanHP)?String(q.titanHP):q.titanHP),null!=q.crystalHP&&q.hasOwnProperty("crystalHP")&&(z.crystalHP=K.json&&!isFinite(q.crystalHP)?String(q.crystalHP):q.crystalHP),null!=q.titanXPBounty&&q.hasOwnProperty("titanXPBounty")&&(z.titanXPBounty=K.json&&!isFinite(q.titanXPBounty)?String(q.titanXPBounty):q.titanXPBounty),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.CoOpTitanHostReadyCheckProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.CoOpTitanHostReadyCheckProto)return q;var K=new Q.CoOpTitanHostReadyCheckProto;return null!=q.userID&&(K.userID=Number(q.userID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.CoOpTitanHostReadyResponseProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.currentTitanHP=q.double();break;case 2:X.currentCrystalHP=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.currentTitanHP&&q.hasOwnProperty("currentTitanHP")&&"number"!=typeof q.currentTitanHP?"currentTitanHP: number expected":null!=q.currentCrystalHP&&q.hasOwnProperty("currentCrystalHP")&&"number"!=typeof q.currentCrystalHP?"currentCrystalHP: number expected":null},Y.fromObject=function(q){if(q instanceof Q.CoOpTitanHostReadyResponseProto)return q;var K=new Q.CoOpTitanHostReadyResponseProto;return null!=q.currentTitanHP&&(K.currentTitanHP=Number(q.currentTitanHP)),null!=q.currentCrystalHP&&(K.currentCrystalHP=Number(q.currentCrystalHP)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.currentTitanHP=0,z.currentCrystalHP=0),null!=q.currentTitanHP&&q.hasOwnProperty("currentTitanHP")&&(z.currentTitanHP=K.json&&!isFinite(q.currentTitanHP)?String(q.currentTitanHP):q.currentTitanHP),null!=q.currentCrystalHP&&q.hasOwnProperty("currentCrystalHP")&&(z.currentCrystalHP=K.json&&!isFinite(q.currentCrystalHP)?String(q.currentCrystalHP):q.currentCrystalHP),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.CoOpTitanPlayerAttackedProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;case 2:X.missed=q.bool();break;case 3:X.titanHealth=q.double();break;case 4:X.damage=q.double();break;case 5:X.spellID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null!=q.missed&&q.hasOwnProperty("missed")&&"boolean"!=typeof q.missed?"missed: boolean expected":null!=q.titanHealth&&q.hasOwnProperty("titanHealth")&&"number"!=typeof q.titanHealth?"titanHealth: number expected":null!=q.damage&&q.hasOwnProperty("damage")&&"number"!=typeof q.damage?"damage: number expected":null!=q.spellID&&q.hasOwnProperty("spellID")&&"number"!=typeof q.spellID?"spellID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.CoOpTitanPlayerAttackedProto)return q;var K=new Q.CoOpTitanPlayerAttackedProto;return null!=q.userID&&(K.userID=Number(q.userID)),null!=q.missed&&(K.missed=Boolean(q.missed)),null!=q.titanHealth&&(K.titanHealth=Number(q.titanHealth)),null!=q.damage&&(K.damage=Number(q.damage)),null!=q.spellID&&(K.spellID=Number(q.spellID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0,z.missed=!1,z.titanHealth=0,z.damage=0,z.spellID=0),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),null!=q.missed&&q.hasOwnProperty("missed")&&(z.missed=q.missed),null!=q.titanHealth&&q.hasOwnProperty("titanHealth")&&(z.titanHealth=K.json&&!isFinite(q.titanHealth)?String(q.titanHealth):q.titanHealth),null!=q.damage&&q.hasOwnProperty("damage")&&(z.damage=K.json&&!isFinite(q.damage)?String(q.damage):q.damage),null!=q.spellID&&q.hasOwnProperty("spellID")&&(z.spellID=K.json&&!isFinite(q.spellID)?String(q.spellID):q.spellID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.CoOpTitanTitanAttackedProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.missed=q.bool();break;case 2:X.crystalHP=q.double();break;case 3:X.damage=q.double();break;case 4:X.spellID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.missed&&q.hasOwnProperty("missed")&&"boolean"!=typeof q.missed?"missed: boolean expected":null!=q.crystalHP&&q.hasOwnProperty("crystalHP")&&"number"!=typeof q.crystalHP?"crystalHP: number expected":null!=q.damage&&q.hasOwnProperty("damage")&&"number"!=typeof q.damage?"damage: number expected":null!=q.spellID&&q.hasOwnProperty("spellID")&&"number"!=typeof q.spellID?"spellID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.CoOpTitanTitanAttackedProto)return q;var K=new Q.CoOpTitanTitanAttackedProto;return null!=q.missed&&(K.missed=Boolean(q.missed)),null!=q.crystalHP&&(K.crystalHP=Number(q.crystalHP)),null!=q.damage&&(K.damage=Number(q.damage)),null!=q.spellID&&(K.spellID=Number(q.spellID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.missed=!1,z.crystalHP=0,z.damage=0,z.spellID=0),null!=q.missed&&q.hasOwnProperty("missed")&&(z.missed=q.missed),null!=q.crystalHP&&q.hasOwnProperty("crystalHP")&&(z.crystalHP=K.json&&!isFinite(q.crystalHP)?String(q.crystalHP):q.crystalHP),null!=q.damage&&q.hasOwnProperty("damage")&&(z.damage=K.json&&!isFinite(q.damage)?String(q.damage):q.damage),null!=q.spellID&&q.hasOwnProperty("spellID")&&(z.spellID=K.json&&!isFinite(q.spellID)?String(q.spellID):q.spellID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.CoOpTitanQuestionAnsweredProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;case 2:X.correct=q.bool();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null!=q.correct&&q.hasOwnProperty("correct")&&"boolean"!=typeof q.correct?"correct: boolean expected":null},Y.fromObject=function(q){if(q instanceof Q.CoOpTitanQuestionAnsweredProto)return q;var K=new Q.CoOpTitanQuestionAnsweredProto;return null!=q.userID&&(K.userID=Number(q.userID)),null!=q.correct&&(K.correct=Boolean(q.correct)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0,z.correct=!1),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),null!=q.correct&&q.hasOwnProperty("correct")&&(z.correct=q.correct),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.Mail=function(){function X(q){if(this.emails=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.emails&&X.emails.length||(X.emails=[]),X.emails.push(Q.MailData.decode(q,q.uint32()));break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.emails&&q.hasOwnProperty("emails")){if(!Array.isArray(q.emails))return"emails: array expected";for(var K=0;K>>3){case 1:X.id=q.double();break;case 2:X.rawData=Q.MailData.decode(q,q.uint32());break;case 3:X.userID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.id&&q.hasOwnProperty("id")&&"number"!=typeof q.id)return"id: number expected";if(null!=q.rawData&&q.hasOwnProperty("rawData")){var K=Q.MailData.verify(q.rawData);if(K)return"rawData."+K}return null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.OpenMailData)return q;var K=new Q.OpenMailData;if(null!=q.id&&(K.id=Number(q.id)),null!=q.rawData){if("object"!=typeof q.rawData)throw TypeError(".OpenMailData.rawData: object expected");K.rawData=Q.MailData.fromObject(q.rawData)}return null!=q.userID&&(K.userID=Number(q.userID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.id=0,z.rawData=null,z.userID=0),null!=q.id&&q.hasOwnProperty("id")&&(z.id=K.json&&!isFinite(q.id)?String(q.id):q.id),null!=q.rawData&&q.hasOwnProperty("rawData")&&(z.rawData=Q.MailData.toObject(q.rawData,K)),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.MailData=function(){function X(q){if(this.attachments=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.id=q.double();break;case 2:X.isOpened=q.bool();break;case 3:X.subject=q.string();break;case 4:X.image=q.string();break;case 5:X.vImage=q.int32();break;case 6:X.message=q.string();break;case 7:X.attachments&&X.attachments.length||(X.attachments=[]),X.attachments.push(Q.Attachment.decode(q,q.uint32()));break;case 8:X.gameMethod=Q.GameMethod.decode(q,q.uint32());break;case 9:X.splitTest=q.string();break;case 10:X.membership=q.int32();break;case 11:X.userName=q.string();break;case 12:X.expiryDate=q.string();break;case 13:X.sendDate=q.string();break;case 14:X.name=q.string();break;case 15:X.extension=Q.ExtensionData.decode(q,q.uint32());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.id&&q.hasOwnProperty("id")&&"number"!=typeof q.id)return"id: number expected";if(null!=q.isOpened&&q.hasOwnProperty("isOpened")&&"boolean"!=typeof q.isOpened)return"isOpened: boolean expected";if(null!=q.subject&&q.hasOwnProperty("subject")&&!Y.isString(q.subject))return"subject: string expected";if(null!=q.image&&q.hasOwnProperty("image")&&!Y.isString(q.image))return"image: string expected";if(null!=q.vImage&&q.hasOwnProperty("vImage")&&!Y.isInteger(q.vImage))return"vImage: integer expected";if(null!=q.message&&q.hasOwnProperty("message")&&!Y.isString(q.message))return"message: string expected";if(null!=q.attachments&&q.hasOwnProperty("attachments")){if(!Array.isArray(q.attachments))return"attachments: array expected";for(var K=0;K>>3){case 1:X.ID=q.double();break;case 2:X.type=q.string();break;case 3:X.N=q.int32();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.ID&&q.hasOwnProperty("ID")&&"number"!=typeof q.ID?"ID: number expected":null!=q.type&&q.hasOwnProperty("type")&&!Y.isString(q.type)?"type: string expected":null!=q.N&&q.hasOwnProperty("N")&&!Y.isInteger(q.N)?"N: integer expected":null},X.fromObject=function(q){if(q instanceof Q.Attachment)return q;var K=new Q.Attachment;return null!=q.ID&&(K.ID=Number(q.ID)),null!=q.type&&(K.type=String(q.type)),null!=q.N&&(K.N=0|q.N),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.ID=0,z.type="",z.N=0),null!=q.ID&&q.hasOwnProperty("ID")&&(z.ID=K.json&&!isFinite(q.ID)?String(q.ID):q.ID),null!=q.type&&q.hasOwnProperty("type")&&(z.type=q.type),null!=q.N&&q.hasOwnProperty("N")&&(z.N=q.N),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.GameMethod=function(){function X(q){if(this.params=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.name=q.string();break;case 2:X.buttonText=q.string();break;case 3:X.params&&X.params.length||(X.params=[]),X.params.push(q.string());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.name&&q.hasOwnProperty("name")&&!Y.isString(q.name))return"name: string expected";if(null!=q.buttonText&&q.hasOwnProperty("buttonText")&&!Y.isString(q.buttonText))return"buttonText: string expected";if(null!=q.params&&q.hasOwnProperty("params")){if(!Array.isArray(q.params))return"params: array expected";for(var K=0;K>>3){case 1:X.name=q.string();break;case 2:X.unOpenedFrame=q.string();break;case 3:X.openedFrame=q.string();break;case 4:X.trashButtonVisible=q.bool();break;case 5:X.deleteMailOnClose=q.bool();break;case 6:X.params&&X.params.length||(X.params=[]),X.params.push(q.string());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.name&&q.hasOwnProperty("name")&&!Y.isString(q.name))return"name: string expected";if(null!=q.unOpenedFrame&&q.hasOwnProperty("unOpenedFrame")&&!Y.isString(q.unOpenedFrame))return"unOpenedFrame: string expected";if(null!=q.openedFrame&&q.hasOwnProperty("openedFrame")&&!Y.isString(q.openedFrame))return"openedFrame: string expected";if(null!=q.trashButtonVisible&&q.hasOwnProperty("trashButtonVisible")&&"boolean"!=typeof q.trashButtonVisible)return"trashButtonVisible: boolean expected";if(null!=q.deleteMailOnClose&&q.hasOwnProperty("deleteMailOnClose")&&"boolean"!=typeof q.deleteMailOnClose)return"deleteMailOnClose: boolean expected";if(null!=q.params&&q.hasOwnProperty("params")){if(!Array.isArray(q.params))return"params: array expected";for(var K=0;K>>3){case 1:X.roomID=q.string();break;case 2:X.userID=q.double();break;case 3:X.appearance=Q.PlayerAppearanceProto.decode(q,q.uint32());break;case 4:X.equipment=Q.PlayerEquipmentProto.decode(q,q.uint32());break;case 5:X.name=Q.PlayerNameProto.decode(q,q.uint32());break;case 6:X.level=q.double();break;case 7:X.member=q.double();break;case 8:X.team=q.double();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.roomID&&q.hasOwnProperty("roomID")&&!Y.isString(q.roomID)?"roomID: string expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null!=q.appearance&&q.hasOwnProperty("appearance")&&(K=Q.PlayerAppearanceProto.verify(q.appearance))?"appearance."+K:null!=q.equipment&&q.hasOwnProperty("equipment")&&(K=Q.PlayerEquipmentProto.verify(q.equipment))?"equipment."+K:null!=q.name&&q.hasOwnProperty("name")&&(K=Q.PlayerNameProto.verify(q.name))?"name."+K:null!=q.level&&q.hasOwnProperty("level")&&"number"!=typeof q.level?"level: number expected":null!=q.member&&q.hasOwnProperty("member")&&"number"!=typeof q.member?"member: number expected":null!=q.team&&q.hasOwnProperty("team")&&"number"!=typeof q.team?"team: number expected":null;var K},X.fromObject=function(q){if(q instanceof Q.DuelInviteProto)return q;var K=new Q.DuelInviteProto;if(null!=q.roomID&&(K.roomID=String(q.roomID)),null!=q.userID&&(K.userID=Number(q.userID)),null!=q.appearance){if("object"!=typeof q.appearance)throw TypeError(".DuelInviteProto.appearance: object expected");K.appearance=Q.PlayerAppearanceProto.fromObject(q.appearance)}if(null!=q.equipment){if("object"!=typeof q.equipment)throw TypeError(".DuelInviteProto.equipment: object expected");K.equipment=Q.PlayerEquipmentProto.fromObject(q.equipment)}if(null!=q.name){if("object"!=typeof q.name)throw TypeError(".DuelInviteProto.name: object expected");K.name=Q.PlayerNameProto.fromObject(q.name)}return null!=q.level&&(K.level=Number(q.level)),null!=q.member&&(K.member=Number(q.member)),null!=q.team&&(K.team=Number(q.team)),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.roomID="",z.userID=0,z.appearance=null,z.equipment=null,z.name=null,z.level=0,z.member=0,z.team=0),null!=q.roomID&&q.hasOwnProperty("roomID")&&(z.roomID=q.roomID),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),null!=q.appearance&&q.hasOwnProperty("appearance")&&(z.appearance=Q.PlayerAppearanceProto.toObject(q.appearance,K)),null!=q.equipment&&q.hasOwnProperty("equipment")&&(z.equipment=Q.PlayerEquipmentProto.toObject(q.equipment,K)),null!=q.name&&q.hasOwnProperty("name")&&(z.name=Q.PlayerNameProto.toObject(q.name,K)),null!=q.level&&q.hasOwnProperty("level")&&(z.level=K.json&&!isFinite(q.level)?String(q.level):q.level),null!=q.member&&q.hasOwnProperty("member")&&(z.member=K.json&&!isFinite(q.member)?String(q.member):q.member),null!=q.team&&q.hasOwnProperty("team")&&(z.team=K.json&&!isFinite(q.team)?String(q.team):q.team),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.DuelRejectionProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.DuelRejectionProto)return q;var K=new Q.DuelRejectionProto;return null!=q.userID&&(K.userID=Number(q.userID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.DuelCancellationProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.DuelCancellationProto)return q;var K=new Q.DuelCancellationProto;return null!=q.userID&&(K.userID=Number(q.userID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.PvPReadyProto=function(){function Y(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID?"userID: number expected":null},Y.fromObject=function(q){if(q instanceof Q.PvPReadyProto)return q;var K=new Q.PvPReadyProto;return null!=q.userID&&(K.userID=Number(q.userID)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.userID=0),null!=q.userID&&q.hasOwnProperty("userID")&&(z.userID=K.json&&!isFinite(q.userID)?String(q.userID):q.userID),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.PvPTeamProto=function(){function X(q){if(this.pets=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.userID=q.double();break;case 2:X.pets&&X.pets.length||(X.pets=[]),X.pets.push(Q.PlayerPetProto.decode(q,q.uint32()));break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.userID&&q.hasOwnProperty("userID")&&"number"!=typeof q.userID)return"userID: number expected";if(null!=q.pets&&q.hasOwnProperty("pets")){if(!Array.isArray(q.pets))return"pets: array expected";for(var K=0;K>>3){case 1:tt.id=q.double();break;case 2:tt.type=q.string();break;case 4:tt.answers&&tt.answers.length||(tt.answers=[]),tt.answers.push(Q.SurveyAnswerData.decode(q,q.uint32()));break;case 5:tt.questionText===Y.emptyObject&&(tt.questionText={});var it=q.uint32()+q.pos;for(X="",Z="";q.pos>>3){case 1:X=q.string();break;case 2:Z=q.string();break;default:q.skipType(7&st)}}tt.questionText[X]=Z;break;default:q.skipType(7&et)}}return tt},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.id&&q.hasOwnProperty("id")&&"number"!=typeof q.id)return"id: number expected";if(null!=q.type&&q.hasOwnProperty("type")&&!Y.isString(q.type))return"type: string expected";if(null!=q.answers&&q.hasOwnProperty("answers")){if(!Array.isArray(q.answers))return"answers: array expected";for(var K=0;K>>3){case 1:X.randomizeAnswers=q.bool();break;default:q.skipType(7&Z)}}return X},Y.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.randomizeAnswers&&q.hasOwnProperty("randomizeAnswers")&&"boolean"!=typeof q.randomizeAnswers?"randomizeAnswers: boolean expected":null},Y.fromObject=function(q){if(q instanceof Q.SurveySettings)return q;var K=new Q.SurveySettings;return null!=q.randomizeAnswers&&(K.randomizeAnswers=Boolean(q.randomizeAnswers)),K},Y.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.randomizeAnswers=!1),null!=q.randomizeAnswers&&q.hasOwnProperty("randomizeAnswers")&&(z.randomizeAnswers=q.randomizeAnswers),z},Y.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},Y}(),Q.SurveyReward=function(){function X(q){if(q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.ID=q.double();break;case 2:X.N=q.double();break;case 3:X.type=q.string();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.ID&&q.hasOwnProperty("ID")&&"number"!=typeof q.ID?"ID: number expected":null!=q.N&&q.hasOwnProperty("N")&&"number"!=typeof q.N?"N: number expected":null!=q.type&&q.hasOwnProperty("type")&&!Y.isString(q.type)?"type: string expected":null},X.fromObject=function(q){if(q instanceof Q.SurveyReward)return q;var K=new Q.SurveyReward;return null!=q.ID&&(K.ID=Number(q.ID)),null!=q.N&&(K.N=Number(q.N)),null!=q.type&&(K.type=String(q.type)),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.ID=0,z.N=0,z.type=""),null!=q.ID&&q.hasOwnProperty("ID")&&(z.ID=K.json&&!isFinite(q.ID)?String(q.ID):q.ID),null!=q.N&&q.hasOwnProperty("N")&&(z.N=K.json&&!isFinite(q.N)?String(q.N):q.N),null!=q.type&&q.hasOwnProperty("type")&&(z.type=q.type),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q.SurveyData=function(){function X(q){if(this.data=[],this.rewards=[],q)for(var K=Object.keys(q),z=0;z>>3){case 1:X.id=q.double();break;case 2:X.name=q.string();break;case 3:X.data&&X.data.length||(X.data=[]),X.data.push(Q.SurveyQuestionData.decode(q,q.uint32()));break;case 4:X.startDate=q.string();break;case 5:X.endDate=q.string();break;case 6:X.rewards&&X.rewards.length||(X.rewards=[]),X.rewards.push(Q.SurveyReward.decode(q,q.uint32()));break;case 7:X.settings=Q.SurveySettings.decode(q,q.uint32());break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.id&&q.hasOwnProperty("id")&&"number"!=typeof q.id)return"id: number expected";if(null!=q.name&&q.hasOwnProperty("name")&&!Y.isString(q.name))return"name: string expected";if(null!=q.data&&q.hasOwnProperty("data")){if(!Array.isArray(q.data))return"data: array expected";for(var K=0;K>>3){case 1:tt.id=q.string();break;case 3:tt.text===Y.emptyObject&&(tt.text={});var it=q.uint32()+q.pos;for(X="",Z="";q.pos>>3){case 1:X=q.string();break;case 2:Z=q.string();break;default:q.skipType(7&st)}}tt.text[X]=Z;break;case 4:tt.image=Q.SurveyAnswerImage.decode(q,q.uint32());break;default:q.skipType(7&et)}}return tt},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.id&&q.hasOwnProperty("id")&&!Y.isString(q.id))return"id: string expected";if(null!=q.text&&q.hasOwnProperty("text")){if(!Y.isObject(q.text))return"text: object expected";for(var K=Object.keys(q.text),z=0;z>>3){case 1:X.data&&X.data.length||(X.data=[]),X.data.push(Q.SurveyData.decode(q,q.uint32()));break;case 2:X.lastAnswerDate=q.string();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){if("object"!=typeof q||null===q)return"object expected";if(null!=q.data&&q.hasOwnProperty("data")){if(!Array.isArray(q.data))return"data: array expected";for(var K=0;K>>3){case 1:X.label=q.string();break;default:q.skipType(7&Z)}}return X},X.verify=function(q){return"object"!=typeof q||null===q?"object expected":null!=q.label&&q.hasOwnProperty("label")&&!Y.isString(q.label)?"label: string expected":null},X.fromObject=function(q){if(q instanceof Q.SurveyAnswerImage)return q;var K=new Q.SurveyAnswerImage;return null!=q.label&&(K.label=String(q.label)),K},X.toObject=function(q,K){K||(K={});var z={};return K.defaults&&(z.label=""),null!=q.label&&q.hasOwnProperty("label")&&(z.label=q.label),z},X.prototype.toJSON=function(){return this.constructor.toObject(this,q.util.toJSONOptions)},X}(),Q})?Y.apply(K,Q):Y)||(q.exports=X)},8157:(q,K,z)=>{"use strict";z.d(K,{wh:()=>Y,aG:()=>Q,Q1:()=>rt,cj:()=>ht,qU:()=>X,mj:()=>Z,bC:()=>lt,pw:()=>J,Dr:()=>tt,bJ:()=>se,eE:()=>nt,QL:()=>st,_C:()=>et,Aq:()=>dt,I9:()=>ut,W0:()=>ft});var Y=(q=>(q[q.Region=0]="Region",q[q.BoundingBox=1]="BoundingBox",q[q.Mesh=2]="Mesh",q[q.LinkedMesh=3]="LinkedMesh",q[q.Path=4]="Path",q[q.Point=5]="Point",q[q.Clipping=6]="Clipping",q))(Y||{});class Q{constructor(q,K=new Array,z=0,Y=new DataView(q.buffer)){this.strings=K,this.index=z,this.buffer=Y}readByte(){return this.buffer.getInt8(this.index++)}readUnsignedByte(){return this.buffer.getUint8(this.index++)}readShort(){const q=this.buffer.getInt16(this.index);return this.index+=2,q}readInt32(){const q=this.buffer.getInt32(this.index);return this.index+=4,q}readInt(q){let K=this.readByte(),z=127&K;return 0!=(128&K)&&(K=this.readByte(),z|=(127&K)<<7,0!=(128&K)&&(K=this.readByte(),z|=(127&K)<<14,0!=(128&K)&&(K=this.readByte(),z|=(127&K)<<21,0!=(128&K)&&(K=this.readByte(),z|=(127&K)<<28)))),q?z:z>>>1^-(1&z)}readStringRef(){const q=this.readInt(!0);return 0==q?null:this.strings[q-1]}readString(){let q=this.readInt(!0);switch(q){case 0:return null;case 1:return""}q--;let K="";for(let z=0;z>4){case 12:case 13:K+=String.fromCharCode((31&q)<<6|63&this.readByte()),z+=2;break;case 14:K+=String.fromCharCode((15&q)<<12|(63&this.readByte())<<6|63&this.readByte()),z+=3;break;default:K+=String.fromCharCode(q),z++}}return K}readFloat(){const q=this.buffer.getFloat32(this.index);return this.index+=4,q}readBoolean(){return 0!=this.readByte()}}var X=(q=>(q[q.setup=0]="setup",q[q.first=1]="first",q[q.replace=2]="replace",q[q.add=3]="add",q))(X||{}),Z=(q=>(q[q.mixIn=0]="mixIn",q[q.mixOut=1]="mixOut",q))(Z||{}),J=(q=>(q[q.Fixed=0]="Fixed",q[q.Percent=1]="Percent",q))(J||{}),tt=(q=>(q[q.Tangent=0]="Tangent",q[q.Chain=1]="Chain",q[q.ChainScale=2]="ChainScale",q))(tt||{}),et=(q=>(q[q.Normal=0]="Normal",q[q.OnlyTranslation=1]="OnlyTranslation",q[q.NoRotationOrReflection=2]="NoRotationOrReflection",q[q.NoScale=3]="NoScale",q[q.NoScaleOrReflection=4]="NoScaleOrReflection",q))(et||{}),it=z(22478);class st{constructor(){this.size=null,this.names=null,this.values=null,this.renderObject=null}get width(){const q=this.texture;return q.trim?q.trim.width:q.orig.width}get height(){const q=this.texture;return q.trim?q.trim.height:q.orig.height}get u(){return this.texture._uvs.x0}get v(){return this.texture._uvs.y0}get u2(){return this.texture._uvs.x2}get v2(){return this.texture._uvs.y2}get offsetX(){const q=this.texture;return q.trim?q.trim.x:0}get offsetY(){return this.spineOffsetY}get pixiOffsetY(){const q=this.texture;return q.trim?q.trim.y:0}get spineOffsetY(){const q=this.texture;return this.originalHeight-this.height-(q.trim?q.trim.y:0)}get originalWidth(){return this.texture.orig.width}get originalHeight(){return this.texture.orig.height}get x(){return this.texture.frame.x}get y(){return this.texture.frame.y}get rotate(){return 0!==this.texture.rotate}get degrees(){return(360-45*this.texture.rotate)%360}}class nt{constructor(){this.entries={},this.size=0}add(q){const K=this.entries[q];return this.entries[q]=!0,!K&&(this.size++,!0)}addAll(q){const K=this.size;for(let z=0,Y=q.length;z1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(q,K){q.r=((4278190080&K)>>>24)/255,q.g=((16711680&K)>>>16)/255,q.b=((65280&K)>>>8)/255,q.a=(255&K)/255}static rgb888ToColor(q,K){q.r=((16711680&K)>>>16)/255,q.g=((65280&K)>>>8)/255,q.b=(255&K)/255}static fromString(q){return(new at).setFromString(q)}};let rt=at;rt.WHITE=new at(1,1,1,1),rt.RED=new at(1,0,0,1),rt.GREEN=new at(0,1,0,1),rt.BLUE=new at(0,0,1,1),rt.MAGENTA=new at(1,0,1,1);const ot=class{static clamp(q,K,z){return qz?z:q}static cosDeg(q){return Math.cos(q*ot.degRad)}static sinDeg(q){return Math.sin(q*ot.degRad)}static signum(q){return Math.sign(q)}static toInt(q){return q>0?Math.floor(q):Math.ceil(q)}static cbrt(q){const K=Math.pow(Math.abs(q),1/3);return q<0?-K:K}static randomTriangular(q,K){return ot.randomTriangularWith(q,K,.5*(q+K))}static randomTriangularWith(q,K,z){const Y=Math.random(),Q=K-q;return Y<=(z-q)/Q?q+Math.sqrt(Y*Q*(z-q)):K-Math.sqrt((1-Y)*Q*(K-z))}static isPowerOfTwo(q){return q&&0==(q&q-1)}};let ht=ot;ht.PI=3.1415927,ht.PI2=2*ot.PI,ht.radiansToDegrees=180/ot.PI,ht.radDeg=ot.radiansToDegrees,ht.degreesToRadians=ot.PI/180,ht.degRad=ot.degreesToRadians;const ct=class{static arrayCopy(q,K,z,Y,Q){for(let X=K,Z=Y;X=K?q:ct.setArraySize(q,K,z)}static newArray(q,K){const z=new Array(q);for(let Y=0;Y0?this.items.pop():this.instantiator()}free(q){q.reset&&q.reset(),this.items.push(q)}freeAll(q){for(let K=0;K=Y&&pt.x=Q&&pt.y=0&&J>=0&&Q>=0&&X>=0))return void(K.length=0);const tt=Math.ceil(2.3*Math.sqrt(Z+J)),et=8*tt+(Q?4:0)+(X?4:0);if(K.length=et,0===et)return;if(0===tt)return K.length=8,K[0]=K[6]=z+Q,K[1]=K[3]=Y+X,K[2]=K[4]=z-Q,void(K[5]=K[7]=Y-X);let st=0,nt=4*tt+(Q?2:0)+2,at=nt,rt=et;{const q=Q+Z,J=X,tt=z+q,et=z-q,it=Y+J;if(K[st++]=tt,K[st++]=it,K[--nt]=it,K[--nt]=et,X){const q=Y-J;K[at++]=et,K[at++]=q,K[--rt]=q,K[--rt]=tt}}for(let it=1;it0||K&&Y<=0){const K=z/2;for(let Y=K+K%2;Y=6){Ot(z,!1);const q=[];for(let Q=0;Q=0&&X>=0&&Z.push(z,Y,z+Q,Y,z+Q,Y+X,z,Y+X)},triangulate(q,K){const z=q.points,Y=K.points;if(0===z.length)return;const Q=Y.length/2;Y.push(z[0],z[1],z[2],z[3],z[6],z[7],z[4],z[5]),K.indices.push(Q,Q+1,Q+2,Q+1,Q+2,Q+3)}},Rt={build(q){Ct.build(q)},triangulate(q,K){Ct.triangulate(q,K)}};var Pt=(q=>(q.MITER="miter",q.BEVEL="bevel",q.ROUND="round",q))(Pt||{}),Mt=(q=>(q.BUTT="butt",q.ROUND="round",q.SQUARE="square",q))(Mt||{});const Nt={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(q,K=20){if(!this.adaptive||!q||isNaN(q))return K;let z=Math.ceil(q/this.maxLength);return zthis.maxSegments&&(z=this.maxSegments),z}};class xt{static curveTo(q,K,z,Y,Q,X){const Z=X[X.length-2],J=X[X.length-1]-K,tt=Z-q,et=Y-K,it=z-q,st=Math.abs(J*it-tt*et);if(st<1e-8||0===Q)return(X[X.length-2]!==q||X[X.length-1]!==K)&&X.push(q,K),null;const nt=J*J+tt*tt,at=et*et+it*it,rt=J*et+tt*it,ot=Q*Math.sqrt(nt)/st,ht=Q*Math.sqrt(at)/st,ct=ot*rt/nt,dt=ht*rt/at,lt=ot*it+ht*tt,ut=ot*et+ht*J,ft=tt*(ht+ct),bt=J*(ht+ct),pt=it*(ot+dt),vt=et*(ot+dt);return{cx:lt+q,cy:ut+K,radius:Q,startAngle:Math.atan2(bt-ut,ft-lt),endAngle:Math.atan2(vt-ut,pt-lt),anticlockwise:tt*et>it*J}}static arc(q,K,z,Y,Q,X,Z,J,tt){const et=Z-X,st=Nt._segmentsCount(Math.abs(et)*Q,40*Math.ceil(Math.abs(et)/it.TO)),nt=et/(2*st),at=2*nt,rt=Math.cos(nt),ot=Math.sin(nt),ht=st-1,ct=ht%1/ht;for(let it=0;it<=ht;++it){const q=nt+X+at*(it+ct*it),K=Math.cos(q),Z=-Math.sin(q);tt.push((rt*K+ot*Z)*Q+z,(rt*-Z+ot*K)*Q+Y)}}}class Lt{static curveLength(q,K,z,Y,Q,X,Z,J){let tt=0,et=0,it=0,st=0,nt=0,at=0,rt=0,ot=0,ht=0,ct=0,dt=0,lt=q,ut=K;for(let ft=1;ft<=10;++ft)et=ft/10,it=et*et,st=it*et,nt=1-et,at=nt*nt,rt=at*nt,ot=rt*q+3*at*et*z+3*nt*it*Q+st*Z,ht=rt*K+3*at*et*Y+3*nt*it*X+st*J,ct=lt-ot,dt=ut-ht,lt=ot,ut=ht,tt+=Math.sqrt(ct*ct+dt*dt);return tt}static curveTo(q,K,z,Y,Q,X,Z){const J=Z[Z.length-2],tt=Z[Z.length-1];Z.length-=2;const et=Nt._segmentsCount(Lt.curveLength(J,tt,q,K,z,Y,Q,X));let it=0,st=0,nt=0,at=0,rt=0;Z.push(J,tt);for(let ot=1,ht=0;ot<=et;++ot)ht=ot/et,it=1-ht,st=it*it,nt=st*it,at=ht*ht,rt=at*ht,Z.push(nt*J+3*st*ht*q+3*it*at*z+rt*Q,nt*tt+3*st*ht*K+3*it*at*Y+rt*X)}}function kt(q,K,z,Y,Q,X,Z,J){let tt,et;Z?(tt=Y,et=-z):(tt=-Y,et=z);const it=q-z*Q+tt,st=K-Y*Q+et,nt=q+z*X+tt,at=K+Y*X+et;return J.push(it,st,nt,at),2}function Bt(q,K,z,Y,Q,X,Z,J){const tt=z-q,et=Y-K;let it=Math.atan2(tt,et),st=Math.atan2(Q-q,X-K);J&&itst&&(st+=2*Math.PI);let nt=it;const at=st-it,rt=Math.abs(at),ot=Math.sqrt(tt*tt+et*et),ht=1+(15*rt*Math.sqrt(ot)/Math.PI>>0),ct=at/ht;if(nt+=ct,J){Z.push(q,K,z,Y);for(let z=1,Y=nt;z=0&&(X.join===Pt.ROUND?at+=Bt(ut,ft,ut-vt*wt,ft-gt*wt,ut-mt*wt,ft-yt*wt,st,!1)+4:at+=2,st.push(ut-mt*Tt,ft-yt*Tt,ut+mt*wt,ft+yt*wt));continue}const et=(-vt+dt)*(-gt+ft)-(-vt+ut)*(-gt+lt),nt=(-mt+bt)*(-yt+ft)-(-mt+ut)*(-yt+pt),rt=(q*nt-z*et)/J,Et=(Q*et-K*nt)/J,St=(rt-ut)*(rt-ut)+(Et-ft)*(Et-ft),At=ut+(rt-ut)*wt,Ct=ft+(Et-ft)*wt,Ot=ut-(rt-ut)*Tt,It=ft-(Et-ft)*Tt,Dt=tt?wt:Tt,Rt=St<=Math.min(q*q+K*K,z*z+Q*Q)+Dt*Dt*ht;let Mt=X.join;if(Mt===Pt.MITER&&St/ht>ct&&(Mt=Pt.BEVEL),Rt)switch(Mt){case Pt.MITER:st.push(At,Ct,Ot,It);break;case Pt.BEVEL:tt?st.push(At,Ct,ut+vt*Tt,ft+gt*Tt,At,Ct,ut+mt*Tt,ft+yt*Tt):st.push(ut-vt*wt,ft-gt*wt,Ot,It,ut-mt*wt,ft-yt*wt,Ot,It),at+=2;break;case Pt.ROUND:tt?(st.push(At,Ct,ut+vt*Tt,ft+gt*Tt),at+=Bt(ut,ft,ut+vt*Tt,ft+gt*Tt,ut+mt*Tt,ft+yt*Tt,st,!0)+4,st.push(At,Ct,ut+mt*Tt,ft+yt*Tt)):(st.push(ut-vt*wt,ft-gt*wt,Ot,It),at+=Bt(ut,ft,ut-vt*wt,ft-gt*wt,ut-mt*wt,ft-yt*wt,st,!1)+4,st.push(ut-mt*wt,ft-yt*wt,Ot,It))}else{switch(st.push(ut-vt*wt,ft-gt*wt,ut+vt*Tt,ft+gt*Tt),Mt){case Pt.MITER:tt?st.push(Ot,It,Ot,It):st.push(At,Ct,At,Ct),at+=2;break;case Pt.ROUND:at+=tt?Bt(ut,ft,ut+vt*Tt,ft+gt*Tt,ut+mt*Tt,ft+yt*Tt,st,!0)+2:Bt(ut,ft,ut-vt*wt,ft-gt*wt,ut-mt*wt,ft-yt*wt,st,!1)+2}st.push(ut-mt*wt,ft-yt*wt,ut+mt*Tt,ft+yt*Tt),at+=2}}dt=Y[2*(nt-2)],lt=Y[2*(nt-2)+1],ut=Y[2*(nt-1)],ft=Y[2*(nt-1)+1],vt=-(lt-ft),gt=dt-ut,_t=Math.sqrt(vt*vt+gt*gt),vt/=_t,gt/=_t,vt*=ot,gt*=ot,st.push(ut-vt*wt,ft-gt*wt,ut+vt*Tt,ft+gt*Tt),tt||(X.cap===Mt.ROUND?at+=Bt(ut-vt*(wt-Tt)*.5,ft-gt*(wt-Tt)*.5,ut-vt*wt,ft-gt*wt,ut+vt*Tt,ft+gt*Tt,st,!1)+2:X.cap===Mt.SQUARE&&(at+=kt(ut,ft,vt,gt,wt,Tt,!1,st)));const St=K.indices,At=Nt.epsilon*Nt.epsilon;for(let it=rt;it0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(q,K=null,z=null,Y=null){const Q=new Ht(q,K,z,Y);return this.graphicsData.push(Q),this.dirty++,this}drawHole(q,K=null){if(!this.graphicsData.length)return null;const z=new Ht(q,null,null,K),Y=this.graphicsData[this.graphicsData.length-1];return z.lineStyle=Y.lineStyle,Y.holes.push(z),this.dirty++,this}destroy(){super.destroy();for(let q=0;q0&&(z=this.batches[this.batches.length-1],Y=z.style);for(let J=this.shapeIndex;J65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&Z===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=Z?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(q,K){return!(!q||!K||q.texture.baseTexture!==K.texture.baseTexture||q.color+q.alpha!==K.color+K.alpha||!!q.native!=!!K.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let q=0,K=this.graphicsData.length;q131070)return!1;const K=this.batches;for(let q=0;q0&&(Y=$t.pop(),Y||(Y=new it.hq,Y.texArray=new it.cc),this.drawCalls.push(Y)),Y.start=et,Y.size=0,Y.texArray.count=0,Y.type=tt),ot.touched=1,ot._batchEnabled=q,ot._batchLocation=Q,ot.wrapMode=it.uR.REPEAT,Y.texArray.elements[Y.texArray.count++]=ot,Q++)),Y.size+=nt.size,et+=nt.size,Z=ot._batchLocation,this.addColors(K,rt.color,rt.alpha,nt.attribSize,nt.attribStart),this.addTextureIds(z,Z,nt.attribSize,nt.attribStart)}it.t5._globalBatch=q,this.packAttributes()}packAttributes(){const q=this.points,K=this.uvs,z=this.colors,Y=this.textureIds,Q=new ArrayBuffer(3*q.length*4),X=new Float32Array(Q),Z=new Uint32Array(Q);let J=0;for(let tt=0;tt0&&q.alpha>0;return z?(q.matrix&&(q.matrix=q.matrix.clone(),q.matrix.invert()),Object.assign(this._lineStyle,{visible:z},q)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const q=this.currentPath.points,K=this.currentPath.points.length;K>2&&(this.drawShape(this.currentPath),this.currentPath=new it.tS,this.currentPath.closeStroke=!1,this.currentPath.points.push(q[K-2],q[K-1]))}else this.currentPath=new it.tS,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(q,K){return this.startPoly(),this.currentPath.points[0]=q,this.currentPath.points[1]=K,this}lineTo(q,K){this.currentPath||this.moveTo(0,0);const z=this.currentPath.points,Y=z[z.length-2],Q=z[z.length-1];return(Y!==q||Q!==K)&&z.push(q,K),this}_initCurve(q=0,K=0){this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[q,K]):this.moveTo(q,K)}quadraticCurveTo(q,K,z,Y){this._initCurve();const Q=this.currentPath.points;return 0===Q.length&&this.moveTo(0,0),Ft.curveTo(q,K,z,Y,Q),this}bezierCurveTo(q,K,z,Y,Q,X){return this._initCurve(),Lt.curveTo(q,K,z,Y,Q,X,this.currentPath.points),this}arcTo(q,K,z,Y,Q){this._initCurve(q,K);const X=this.currentPath.points,Z=xt.curveTo(q,K,z,Y,Q,X);if(Z){const{cx:q,cy:K,radius:z,startAngle:Y,endAngle:Q,anticlockwise:X}=Z;this.arc(q,K,z,Y,Q,X)}return this}arc(q,K,z,Y,Q,X=!1){if(Y===Q)return this;if(!X&&Q<=Y?Q+=it.TO:X&&Y<=Q&&(Y+=it.TO),Q-Y==0)return this;const Z=q+Math.cos(Y)*z,J=K+Math.sin(Y)*z,tt=this._geometry.closePointEps;let et=this.currentPath?this.currentPath.points:null;if(et){const q=Math.abs(et[et.length-2]-Z),K=Math.abs(et[et.length-1]-J);q0;return z?(q.matrix&&(q.matrix=q.matrix.clone(),q.matrix.invert()),Object.assign(this._fillStyle,{visible:z},q)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(q,K,z,Y){return this.drawShape(new it.M_(q,K,z,Y))}drawRoundedRect(q,K,z,Y,Q){return this.drawShape(new it.TE(q,K,z,Y,Q))}drawCircle(q,K,z){return this.drawShape(new it.jl(q,K,z))}drawEllipse(q,K,z,Y){return this.drawShape(new it.Pp(q,K,z,Y))}drawPolygon(...q){let K,z=!0;const Y=q[0];Y.points?(z=Y.closeStroke,K=Y.points):K=Array.isArray(q[0])?q[0]:q;const Q=new it.tS(K);return Q.closeStroke=z,this.drawShape(Q),this}drawShape(q){return this._holeMode?this._geometry.drawHole(q,this._matrix):this._geometry.drawShape(q,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const q=this._geometry.graphicsData;return!(1!==q.length||q[0].shape.type!==it.HY.RECT||q[0].matrix||q[0].holes.length||q[0].lineStyle.visible&&q[0].lineStyle.width)}_render(q){this.finishPoly();const K=this._geometry;K.updateBatches(),K.batchable?(this.batchDirty!==K.batchDirty&&this._populateBatches(),this._renderBatched(q)):(q.batch.flush(),this._renderDirect(q))}_populateBatches(){const q=this._geometry,K=this.blendMode,z=q.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=q.batchDirty,this.batches.length=z,this.vertexData=new Float32Array(q.points);for(let Y=0;YK&&(q=K),this.state.update(q),this.state.apply(this.skeleton),!this.skeleton)return;this.skeleton.updateWorldTransform();const z=this.skeleton.slots,Q=this.color;let X=null,Z=null;Q?(X=Q.light,Z=Q.dark):X=this.tintRgb;for(let st=0,nt=z.length;st{"use strict";z.d(K,{qd:()=>Gt,Qb:()=>at,MR:()=>Zt,yE:()=>te});var Y=z(8157);class Q{constructor(q){if(!q)throw new Error("name cannot be null.");this.name=q}}const X=class extends Q{constructor(q){super(q),this.id=X.nextID++,this.bones=null,this.vertices=[],this.worldVerticesLength=0,this.timelineAttachment=this}computeWorldVerticesOld(q,K){this.computeWorldVertices(q,0,this.worldVerticesLength,K,0,2)}computeWorldVertices(q,K,z,Y,Q,X){z=Q+(z>>1)*X;const Z=q.bone.skeleton,J=q.deform;let tt=this.vertices;const et=this.bones;if(!et){J.length>0&&(tt=J);const Z=q.bone.matrix,et=Z.tx,it=Z.ty,st=Z.a,nt=Z.c,at=Z.b,rt=Z.d;for(let q=K,J=Q;J=this.regions.length&&(z=this.regions.length-1);const Y=this.regions[z];K.region!=Y&&(K.region=Y)}getPath(q,K){let z=q;const Y=(this.start+K).toString();for(let Q=this.digits-Y.length;Q>0;Q--)z+="0";return z+=Y,z}static nextID(){return rt._nextID++}};let ot=rt;ot._nextID=0;var ht=(q=>(q[q.hold=0]="hold",q[q.once=1]="once",q[q.loop=2]="loop",q[q.pingpong=3]="pingpong",q[q.onceReverse=4]="onceReverse",q[q.loopReverse=5]="loopReverse",q[q.pingpongReverse=6]="pingpongReverse",q))(ht||{});const ct=[0,1,2,3,4,5,6];class dt{constructor(q,K,z){if(this.timelines=[],this.timelineIds=new Y.eE,!q)throw new Error("name cannot be null.");this.name=q,this.setTimelines(K),this.duration=z}setTimelines(q){if(!q)throw new Error("timelines cannot be null.");this.timelines=q,this.timelineIds.clear();for(let K=0;K0&&(K%=this.duration));const tt=this.timelines;for(let et=0,it=tt.length;etK)return Y-1;return z-1}static search(q,K,z){const Y=q.length;for(let Q=z;QK)return Q-z;return Y-z}}class gt extends vt{constructor(q,K,z){super(q,z),this.curves=Y.Aq.newFloatArray(q+18*K),this.curves[q-1]=1}setLinear(q){this.curves[q]=0}setStepped(q){this.curves[q]=1}shrink(q){const K=this.getFrameCount()+18*q;if(this.curves.length>K){const q=Y.Aq.newFloatArray(K);Y.Aq.arrayCopy(this.curves,0,q,0,K),this.curves=q}}setBezier(q,K,z,Y,Q,X,Z,J,tt,et,it){const st=this.curves;let nt=this.getFrameCount()+18*q;0==z&&(st[K]=2+nt);const at=.03*(Y-2*X+J),rt=.03*(Q-2*Z+tt),ot=.006*(3*(X-J)-Y+et),ht=.006*(3*(Z-tt)-Q+it);let ct=2*at+ot,dt=2*rt+ht,lt=.3*(X-Y)+at+.16666667*ot,ut=.3*(Z-Q)+rt+.16666667*ht,ft=Y+lt,bt=Q+ut;for(let pt=nt+18;ntq){const X=this.frames[K],Z=this.frames[K+z];return Z+(q-X)/(Q[Y]-X)*(Q[Y+1]-Z)}const X=Y+18;for(Y+=2;Y=q){const K=Q[Y-2],z=Q[Y-1];return z+(q-K)/(Q[Y]-K)*(Q[Y+1]-z)}K+=this.getFrameEntries();const Z=Q[X-2],J=Q[X-1];return J+(q-Z)/(this.frames[K]-Z)*(this.frames[K+z]-J)}}class mt extends gt{constructor(q,K,z){super(q,K,[z])}getFrameEntries(){return 2}setFrame(q,K,z){q<<=1,this.frames[q]=K,this.frames[q+1]=z}getCurveValue(q){const K=this.frames;let z=K.length-2;for(let Q=2;Q<=z;Q+=2)if(K[Q]>q){z=Q-2;break}const Y=this.curves[z>>1];switch(Y){case 0:const Y=K[z],Q=K[z+1];return Q+(q-Y)/(K[z+2]-Y)*(K[z+2+1]-Q);case 1:return K[z+1]}return this.getBezierValue(q,z,1,Y-2)}}class yt extends mt{constructor(q,K,z){super(q,K,`${lt}|${z}`),this.boneIndex=0,this.boneIndex=z}apply(q,K,z,Q,X,Z,J){const tt=q.bones[this.boneIndex];if(!tt.active)return;if(zz)this.apply(q,K,Number.MAX_VALUE,Y,Q,X,Z),K=-1;else if(K>=J[tt-1])return;if(z0&&J[et-1]==q;)et--}for(;et=J[et];et++)Y.push(this.events[et])}};let wt=Et;wt.propertyIds=[`${ft}`];const Tt=class extends vt{constructor(q){super(q,Tt.propertyIds),this.drawOrders=new Array(q)}getFrameCount(){return this.frames.length}setFrame(q,K,z){this.frames[q]=K,this.drawOrders[q]=z}apply(q,K,z,Q,X,Z,J){if(J==Y.mj.mixOut)return void(Z==Y.qU.setup&&Y.Aq.arrayCopy(q.slots,0,q.drawOrder,0,q.slots.length));if(z>4;const ut=this.attachment.sequence.regions.length,ft=ct[15&ot];if(ft!=ht.hold)switch(lt+=(z-rt)/dt+1e-5|0,ft){case ht.once:lt=Math.min(ut-1,lt);break;case ht.loop:lt%=ut;break;case ht.pingpong:{const q=(ut<<1)-2;lt=0==q?0:lt%q,lt>=ut&&(lt=q-lt);break}case ht.onceReverse:lt=Math.max(ut-1-lt,0);break;case ht.loopReverse:lt=ut-1-lt%ut;break;case ht.pingpongReverse:{const q=(ut<<1)-2;lt=0==q?0:(lt+ut-1)%q,lt>=ut&&(lt=q-lt)}}et.sequenceIndex=lt}};let Ct=At;Ct.ENTRIES=3,Ct.MODE=1,Ct.DELAY=2;const Ot=class{constructor(q){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Pt(this),this.propertyIDs=new Y.eE,this.animationsChanged=!1,this.trackEntryPool=new Y.bC((()=>new Rt)),this.data=q}static emptyAnimation(){return Ot._emptyAnimation}update(q){q*=this.timeScale;const K=this.tracks;for(let z=0,Y=K.length;z0){if(Y.delay-=Q,Y.delay>0)continue;Q=-Y.delay,Y.delay=0}let X=Y.next;if(X){const K=Y.trackLast-X.delay;if(K>=0){for(X.delay=0,X.trackTime+=0==Y.timeScale?0:(K/Y.timeScale+q)*X.timeScale,Y.trackTime+=Q,this.setCurrent(z,X,!0);X.mixingFrom;)X.mixTime+=q,X=X.mixingFrom;continue}}else if(Y.trackLast>=Y.trackEnd&&!Y.mixingFrom){K[z]=null,this.queue.end(Y),this.clearNext(Y);continue}if(Y.mixingFrom&&this.updateMixingFrom(Y,q)){let q=Y.mixingFrom;for(Y.mixingFrom=null,q&&(q.mixingTo=null);q;)this.queue.end(q),q=q.mixingFrom}Y.trackTime+=Q}this.queue.drain()}updateMixingFrom(q,K){const z=q.mixingFrom;if(!z)return!0;const Y=this.updateMixingFrom(z,K);return z.animationLast=z.nextAnimationLast,z.trackLast=z.nextTrackLast,q.mixTime>0&&q.mixTime>=q.mixDuration?(0!=z.totalAlpha&&0!=q.mixDuration||(q.mixingFrom=z.mixingFrom,z.mixingFrom&&(z.mixingFrom.mixingTo=q),q.interruptAlpha=z.interruptAlpha,this.queue.end(z)),Y):(z.trackTime+=K*z.timeScale,q.mixTime+=K,!1)}apply(q){if(!q)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();const K=this.events,z=this.tracks;let Q=!1;for(let J=0,tt=z.length;J0)continue;Q=!0;const Z=0==J?Y.qU.first:X.mixBlend;let tt=X.alpha;X.mixingFrom?tt*=this.applyMixingFrom(X,q,Z):X.trackTime>=X.trackEnd&&!X.next&&(tt=0);const et=X.animationLast,it=X.getAnimationTime();let st=it,nt=K;X.reverse&&(st=X.animation.duration-st,nt=null);const at=X.animation.timelines,rt=at.length;if(0==J&&1==tt||Z==Y.qU.add)for(let K=0;K1&&(X=1),z!=Y.qU.first&&(z=Q.mixBlend));const Z=X0&&this.queueEvents(Q,at),this.events.length=0,Q.nextAnimationLast=at,Q.nextTrackLast=Q.trackTime,X}applyAttachmentTimeline(q,K,z,Q,X){const Z=K.slots[q.slotIndex];Z.bone.active&&(z0;let Q=q>=0;Y.cj.signum(K)!=Y.cj.signum(at)&&Math.abs(K)<=90&&(Math.abs(q)>180&&(q+=360*Y.cj.signum(q)),Q=z),nt=at+q-q%360,Q!=z&&(nt+=360*Y.cj.signum(q)),Z[J]=nt}Z[J+1]=at,et.rotation=it+nt*Q}queueEvents(q,K){const z=q.animationStart,Y=q.animationEnd,Q=Y-z,X=q.trackLast%Q,Z=this.events;let J=0;const tt=Z.length;for(;JY||this.queue.event(q,K)}let et=!1;for(et=q.loop?0==Q||X>q.trackTime%Q:K>=Y&&q.animationLast=this.tracks.length)return;const K=this.tracks[q];if(!K)return;this.queue.end(K),this.clearNext(K);let z=K;for(;;){const q=z.mixingFrom;if(!q)break;this.queue.end(q),z.mixingFrom=null,z.mixingTo=null,z=q}this.tracks[K.trackIndex]=null,this.queue.drain()}setCurrent(q,K,z){const Y=this.expandToIndex(q);this.tracks[q]=K,K.previous=null,Y&&(z&&this.queue.interrupt(Y),K.mixingFrom=Y,Y.mixingTo=K,K.mixTime=0,Y.mixingFrom&&Y.mixDuration>0&&(K.interruptAlpha*=Math.min(1,Y.mixTime/Y.mixDuration)),Y.timelinesRotation.length=0),this.queue.start(K)}setAnimation(q,K,z=!1){const Y=this.data.skeletonData.findAnimation(K);if(!Y)throw new Error(`Animation not found: ${K}`);return this.setAnimationWith(q,Y,z)}setAnimationWith(q,K,z=!1){if(!K)throw new Error("animation cannot be null.");let Y=!0,Q=this.expandToIndex(q);Q&&(-1==Q.nextTrackLast?(this.tracks[q]=Q.mixingFrom,this.queue.interrupt(Q),this.queue.end(Q),this.clearNext(Q),Q=Q.mixingFrom,Y=!1):this.clearNext(Q));const X=this.trackEntry(q,K,z,Q);return this.setCurrent(q,X,Y),this.queue.drain(),X}addAnimation(q,K,z=!1,Y=0){const Q=this.data.skeletonData.findAnimation(K);if(!Q)throw new Error(`Animation not found: ${K}`);return this.addAnimationWith(q,Q,z,Y)}addAnimationWith(q,K,z=!1,Y=0){if(!K)throw new Error("animation cannot be null.");let Q=this.expandToIndex(q);if(Q)for(;Q.next;)Q=Q.next;const X=this.trackEntry(q,K,z,Q);return Q?(Q.next=X,X.previous=Q,Y<=0&&(Y+=Q.getTrackComplete()-X.mixDuration)):(this.setCurrent(q,X,!0),this.queue.drain()),X.delay=Y,X}setEmptyAnimation(q,K=0){const z=this.setAnimationWith(q,Ot.emptyAnimation(),!1);return z.mixDuration=K,z.trackEnd=K,z}addEmptyAnimation(q,K=0,z=0){const Y=this.addAnimationWith(q,Ot.emptyAnimation(),!1,z);return z<=0&&(Y.delay+=Y.mixDuration-K),Y.mixDuration=K,Y.trackEnd=K,Y}setEmptyAnimations(q=0){const K=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let z=0,Y=this.tracks.length;z0){Q[J]=Bt,X[J]=z;continue q}break}Q[J]=kt}else Q[J]=Nt}}getCurrent(q){return q>=this.tracks.length?null:this.tracks[q]}addListener(q){if(!q)throw new Error("listener cannot be null.");this.listeners.push(q)}removeListener(q){const K=this.listeners.indexOf(q);K>=0&&this.listeners.splice(K,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}setAnimationByName(q,K,z){Ot.deprecatedWarning1||(Ot.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(q,K,z)}addAnimationByName(q,K,z,Y){Ot.deprecatedWarning2||(Ot.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(q,K,z,Y)}hasAnimation(q){return null!==this.data.skeletonData.findAnimation(q)}hasAnimationByName(q){return Ot.deprecatedWarning3||(Ot.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(q)}};let It=Ot;It._emptyAnimation=new dt("",[],0),It.deprecatedWarning1=!1,It.deprecatedWarning2=!1,It.deprecatedWarning3=!1;const Dt=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=Y.qU.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){const q=this.animationEnd-this.animationStart;return 0==q?this.animationStart:this.trackTime%q+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(q){this.animationLast=q,this.nextAnimationLast=q}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){const q=this.animationEnd-this.animationStart;if(0!=q){if(this.loop)return q*(1+(this.trackTime/q|0));if(this.trackTime(q[q.start=0]="start",q[q.interrupt=1]="interrupt",q[q.end=2]="end",q[q.dispose=3]="dispose",q[q.complete=4]="complete",q[q.event=5]="event",q))(Mt||{});const Nt=0,xt=1,Lt=2,kt=3,Bt=4,Ut=1,Ft=2;class Gt{constructor(q){this.atlas=q}loadSequence(q,K,z){const Y=z.regions;for(let Q=0,X=Y.length;Q1e-4?(q=Math.abs(nt*ot-at*rt)/q,nt/=it,rt/=st,at=rt*q,ot=nt*q,K=Math.atan2(rt,nt)*Y.cj.radDeg):(nt=0,rt=0,K=90-Math.atan2(ot,at)*Y.cj.radDeg);const tt=z+Z-K,ht=z+J-K+90,ct=Y.cj.cosDeg(tt)*Q,dt=Y.cj.cosDeg(ht)*X,lt=Y.cj.sinDeg(tt)*Q,ut=Y.cj.sinDeg(ht)*X;et.a=nt*ct-at*lt,et.c=nt*dt-at*ut,et.b=rt*ct+ot*lt,et.d=rt*dt+ot*ut;break}case Y._C.NoScale:case Y._C.NoScaleOrReflection:{const q=Y.cj.cosDeg(z),K=Y.cj.sinDeg(z);let tt=(nt*q+at*K)/it,ht=(rt*q+ot*K)/st,ct=Math.sqrt(tt*tt+ht*ht);ct>1e-5&&(ct=1/ct),tt*=ct,ht*=ct,ct=Math.sqrt(tt*tt+ht*ht),this.data.transformMode==Y._C.NoScale&&nt*ot-at*rt<0!=(it<0!=st<0)&&(ct=-ct);const dt=Math.PI/2+Math.atan2(ht,tt),lt=Math.cos(dt)*ct,ut=Math.sin(dt)*ct,ft=Y.cj.cosDeg(Z)*Q,bt=Y.cj.cosDeg(90+J)*X,pt=Y.cj.sinDeg(Z)*Q,vt=Y.cj.sinDeg(90+J)*X;et.a=tt*ft+lt*pt,et.c=tt*bt+lt*vt,et.b=ht*ft+ut*pt,et.d=ht*bt+ut*vt;break}}et.a*=it,et.c*=it,et.b*=st,et.d*=st}setToSetupPose(){const q=this.data;this.x=q.x,this.y=q.y,this.rotation=q.rotation,this.scaleX=q.scaleX,this.scaleY=q.scaleY,this.shearX=q.shearX,this.shearY=q.shearY}getWorldRotationX(){return Math.atan2(this.matrix.b,this.matrix.a)*Y.cj.radDeg}getWorldRotationY(){return Math.atan2(this.matrix.d,this.matrix.c)*Y.cj.radDeg}getWorldScaleX(){const q=this.matrix;return Math.sqrt(q.a*q.a+q.b*q.b)}getWorldScaleY(){const q=this.matrix;return Math.sqrt(q.c*q.c+q.d*q.d)}updateAppliedTransform(){const q=this.parent,K=this.matrix;if(!q)return this.ax=K.tx-this.skeleton.x,this.ay=K.ty-this.skeleton.y,this.arotation=Math.atan2(K.b,K.a)*Y.cj.radDeg,this.ascaleX=Math.sqrt(K.a*K.a+K.b*K.b),this.ascaleY=Math.sqrt(K.c*K.c+K.d*K.d),this.ashearX=0,void(this.ashearY=Math.atan2(K.a*K.c+K.b*K.d,K.a*K.d-K.b*K.c)*Y.cj.radDeg);const z=q.matrix,Q=1/(z.a*z.d-z.b*z.c),X=K.tx-z.tx,Z=K.ty-z.ty;this.ax=X*z.d*Q-Z*z.c*Q,this.ay=Z*z.a*Q-X*z.b*Q;const J=Q*z.d,tt=Q*z.a,et=Q*z.c,it=Q*z.b,st=J*K.a-et*K.b,nt=J*K.c-et*K.d,at=tt*K.b-it*K.a,rt=tt*K.d-it*K.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(st*st+at*at),this.ascaleX>1e-4){const q=st*rt-nt*at;this.ascaleY=q/this.ascaleX,this.ashearY=Math.atan2(st*nt+at*rt,q)*Y.cj.radDeg,this.arotation=Math.atan2(at,st)*Y.cj.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(nt*nt+rt*rt),this.ashearY=0,this.arotation=90-Math.atan2(rt,nt)*Y.cj.radDeg}worldToLocal(q){const K=this.matrix,z=K.a,Y=K.c,Q=K.b,X=K.d,Z=1/(z*X-Y*Q),J=q.x-K.tx,tt=q.y-K.ty;return q.x=J*X*Z-tt*Y*Z,q.y=tt*z*Z-J*Q*Z,q}localToWorld(q){const K=this.matrix,z=q.x,Y=q.y;return q.x=z*K.a+Y*K.c+K.tx,q.y=z*K.b+Y*K.d+K.ty,q}worldToLocalRotation(q){const K=Y.cj.sinDeg(q),z=Y.cj.cosDeg(q),Q=this.matrix;return Math.atan2(Q.a*K-Q.b*z,Q.d*z-Q.c*K)*Y.cj.radDeg}localToWorldRotation(q){q-=this.rotation-this.shearX;const K=Y.cj.sinDeg(q),z=Y.cj.cosDeg(q),Q=this.matrix;return Math.atan2(z*Q.b+K*Q.d,z*Q.a+K*Q.c)*Y.cj.radDeg}rotateWorld(q){const K=this.matrix,z=K.a,Q=K.c,X=K.b,Z=K.d,J=Y.cj.cosDeg(q),tt=Y.cj.sinDeg(q);K.a=J*z-tt*X,K.c=J*Q-tt*Z,K.b=tt*z+J*X,K.d=tt*Q+J*Z}}class Ht{constructor(q,K){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,!q)throw new Error("data cannot be null.");if(!K)throw new Error("skeleton cannot be null.");this.data=q,this.mix=q.mix,this.softness=q.softness,this.bendDirection=q.bendDirection,this.compress=q.compress,this.stretch=q.stretch,this.bones=new Array;for(let Y=0;Y180?at-=360:at<-180&&(at+=360);let dt=q.ascaleX,lt=q.ascaleY;if(Q||X){switch(q.data.transformMode){case Y._C.NoScale:case Y._C.NoScaleOrReflection:rt=K-q.worldX,ot=z-q.worldY}const tt=q.data.length*dt,et=Math.sqrt(rt*rt+ot*ot);if(Q&&ettt&&tt>1e-4){const q=(et/tt-1)*J+1;dt*=q,Z&&(lt*=q)}}q.updateWorldTransformWith(q.ax,q.ay,q.arotation+at*J,dt,lt,q.ashearX,q.ashearY)}apply2(q,K,z,Q,X,Z,J,tt,et){const it=q.ax,st=q.ay;let nt=q.ascaleX,at=q.ascaleY,rt=nt,ot=at,ht=K.ascaleX;const ct=q.matrix;let dt=0,lt=0,ut=0;nt<0?(nt=-nt,dt=180,ut=-1):(dt=0,ut=1),at<0&&(at=-at,ut=-ut),ht<0?(ht=-ht,lt=180):lt=0;const ft=K.ax;let bt=0,pt=0,vt=0,gt=ct.a,mt=ct.c,yt=ct.b,_t=ct.d;const Et=Math.abs(nt-at)<=1e-4;!Et||Z?(bt=0,pt=gt*ft+ct.tx,vt=yt*ft+ct.ty):(bt=K.ay,pt=gt*ft+mt*bt+ct.tx,vt=yt*ft+_t*bt+ct.ty);const wt=q.parent.matrix;if(!wt)throw new Error("IK parent must itself have a parent.");gt=wt.a,mt=wt.c,yt=wt.b,_t=wt.d;const Tt=1/(gt*_t-mt*yt);let St=pt-wt.tx,At=vt-wt.ty;const Ct=(St*_t-At*mt)*Tt-it,Ot=(At*gt-St*yt)*Tt-st,It=Math.sqrt(Ct*Ct+Ot*Ot);let Dt,Rt,Pt=K.data.length*ht;if(It<1e-4)return this.apply1(q,z,Q,!1,Z,!1,et),void K.updateWorldTransformWith(ft,bt,0,K.ascaleX,K.ascaleY,K.ashearX,K.ashearY);St=z-wt.tx,At=Q-wt.ty;let Mt=(St*_t-At*mt)*Tt-it,Nt=(At*gt-St*yt)*Tt-st,xt=Mt*Mt+Nt*Nt;if(0!=tt){tt*=nt*(ht+1)*.5;const q=Math.sqrt(xt),K=q-It-Pt*nt+tt;if(K>0){let z=Math.min(1,K/(2*tt))-1;z=(K-tt*(1-z*z))/q,Mt-=z*Mt,Nt-=z*Nt,xt=Mt*Mt+Nt*Nt}}q:if(Et){Pt*=nt;let q=(xt-It*It-Pt*Pt)/(2*It*Pt);q<-1?(q=-1,Rt=Math.PI*X):q>1?(q=1,Rt=0,Z&&(gt=(Math.sqrt(xt)/(It+Pt)-1)*et+1,rt*=gt,J&&(ot*=gt))):Rt=Math.acos(q)*X,gt=It+Pt*q,mt=Pt*Math.sin(Rt),Dt=Math.atan2(Nt*gt-Mt*mt,Mt*gt+Nt*mt)}else{gt=nt*Pt,mt=at*Pt;const q=gt*gt,K=mt*mt,z=Math.atan2(Nt,Mt);yt=K*It*It+q*xt-q*K;const Q=-2*K*It,Z=K-q;if(_t=Q*Q-4*Z*yt,_t>=0){let q=Math.sqrt(_t);Q<0&&(q=-q),q=.5*-(Q+q);const K=q/Z,Y=yt/q,J=Math.abs(K)=-1&&yt<=1&&(yt=Math.acos(yt),St=gt*Math.cos(yt)+It,At=mt*Math.sin(yt),_t=St*St+At*At,_tot&&(st=yt,ot=_t,rt=St,ht=At)),xt<=.5*(et+ot)?(Dt=z-Math.atan2(it*X,tt),Rt=J*X):(Dt=z-Math.atan2(ht*X,rt),Rt=st*X)}const Lt=Math.atan2(bt,ft)*ut;let kt=q.arotation;Dt=(Dt-Lt)*Y.cj.radDeg+dt-kt,Dt>180?Dt-=360:Dt<-180&&(Dt+=360),q.updateWorldTransformWith(it,st,kt+Dt*et,rt,ot,0,0),kt=K.arotation,Rt=((Rt+Lt)*Y.cj.radDeg-K.ashearX)*ut+lt-kt,Rt>180?Rt-=360:Rt<-180&&(Rt+=360),K.updateWorldTransformWith(ft,bt,kt+Rt*et,K.ascaleX,K.ascaleY,K.ashearX,K.ashearY)}}var Vt=(q=>(q[q.Length=0]="Length",q[q.Fixed=1]="Fixed",q[q.Percent=2]="Percent",q[q.Proportional=3]="Proportional",q))(Vt||{});const Wt=class{constructor(q,K){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!q)throw new Error("data cannot be null.");if(!K)throw new Error("skeleton cannot be null.");this.data=q,this.bones=new Array;for(let Y=0,Q=q.bones.length;Y0){q=st/q*rt;for(let K=1;K0?Y.cj.degRad:-Y.cj.degRad}for(let it=0,ut=3;it0){const z=X.a,Q=X.c,J=X.b,tt=X.d;let et=0,st=0,at=0;if(et=Z?ot[ut-1]:0==nt[it+1]?ot[ut+2]:Math.atan2(ft,rt),et-=Math.atan2(J,z),lt){st=Math.cos(et),at=Math.sin(et);const Y=q.data.length;ht+=(Y*(st*z-at*J)-rt)*K,ct+=(Y*(at*z+st*J)-ft)*K}else et+=dt;et>Y.cj.PI?et-=Y.cj.PI2:et<-Y.cj.PI&&(et+=Y.cj.PI2),et*=K,st=Math.cos(et),at=Math.sin(et),X.a=st*z-at*J,X.c=st*Q-at*tt,X.b=at*z+st*J,X.d=at*Q+st*tt}q.updateAppliedTransform()}}computeWorldPositions(q,K,z){const Q=this.target;let X=this.position;const Z=this.spaces,J=Y.Aq.setArraySize(this.positions,3*K+2);let tt=this.world;const et=q.closed;let it=q.worldVerticesLength,st=it/6,nt=Wt.NONE;if(!q.constantSpeed){const at=q.lengths;st-=et?1:2;const rt=at[st];let ot;switch(this.data.positionMode==Y.pw.Percent&&(X*=rt),this.data.spacingMode){case Vt.Percent:ot=rt;break;case Vt.Proportional:ot=rt/K;break;default:ot=1}tt=Y.Aq.setArraySize(this.world,8);for(let Y=0,ht=0,ct=0;Yrt){nt!=Wt.AFTER&&(nt=Wt.AFTER,q.computeWorldVertices(Q,it-6,4,tt,0,2)),this.addAfterPosition(dt-rt,tt,0,J,ht);continue}}for(;;ct++){const q=at[ct];if(!(dt>q)){if(0==ct)dt/=q;else{const K=at[ct-1];dt=(dt-K)/(q-K)}break}}ct!=nt&&(nt=ct,et&&ct==st?(q.computeWorldVertices(Q,it-4,4,tt,0,2),q.computeWorldVertices(Q,0,4,tt,4,2)):q.computeWorldVertices(Q,6*ct+2,8,tt,0,2)),this.addCurvePosition(dt,tt[0],tt[1],tt[2],tt[3],tt[4],tt[5],tt[6],tt[7],J,ht,z||Y>0&&0==K)}return J}et?(it+=2,tt=Y.Aq.setArraySize(this.world,it),q.computeWorldVertices(Q,2,it-4,tt,0,2),q.computeWorldVertices(Q,0,2,tt,it-4,2),tt[it-2]=tt[0],tt[it-1]=tt[1]):(st--,it-=4,tt=Y.Aq.setArraySize(this.world,it),q.computeWorldVertices(Q,2,it,tt,0,2));const at=Y.Aq.setArraySize(this.curves,st);let rt,ot=0,ht=tt[0],ct=tt[1],dt=0,lt=0,ut=0,ft=0,bt=0,pt=0,vt=0,gt=0,mt=0,yt=0,_t=0,Et=0,wt=0,Tt=0;for(let Y=0,Ct=2;Yot){this.addAfterPosition(K-ot,tt,it-4,J,Ct);continue}}for(;;Ot++){const q=at[Ot];if(!(K>q)){if(0==Ot)K/=q;else{const z=at[Ot-1];K=(K-z)/(q-z)}break}}if(Ot!=nt){nt=Ot;let q=6*Ot;for(ht=tt[q],ct=tt[q+1],dt=tt[q+2],lt=tt[q+3],ut=tt[q+4],ft=tt[q+5],bt=tt[q+6],pt=tt[q+7],vt=.03*(ht-2*dt+ut),gt=.03*(ct-2*lt+ft),mt=.006*(3*(dt-ut)-ht+bt),yt=.006*(3*(lt-ft)-ct+pt),_t=2*vt+mt,Et=2*gt+yt,wt=.3*(dt-ht)+vt+.16666667*mt,Tt=.3*(lt-ct)+gt+.16666667*yt,At=Math.sqrt(wt*wt+Tt*Tt),St[0]=At,q=1;q<8;q++)wt+=_t,Tt+=Et,_t+=mt,Et+=yt,At+=Math.sqrt(wt*wt+Tt*Tt),St[q]=At;wt+=_t,Tt+=Et,At+=Math.sqrt(wt*wt+Tt*Tt),St[8]=At,wt+=_t+mt,Tt+=Et+yt,At+=Math.sqrt(wt*wt+Tt*Tt),St[9]=At,It=0}for(K*=At;;It++){const q=St[It];if(!(K>q)){if(0==It)K/=q;else{const z=St[It-1];K=It+(K-z)/(q-z)}break}}this.addCurvePosition(.1*K,ht,ct,dt,lt,ut,ft,bt,pt,J,Ct,z||Y>0&&0==q)}return J}addBeforePosition(q,K,z,Y,Q){const X=K[z],Z=K[z+1],J=K[z+2]-X,tt=K[z+3]-Z,et=Math.atan2(tt,J);Y[Q]=X+q*Math.cos(et),Y[Q+1]=Z+q*Math.sin(et),Y[Q+2]=et}addAfterPosition(q,K,z,Y,Q){const X=K[z+2],Z=K[z+3],J=X-K[z],tt=Z-K[z+1],et=Math.atan2(tt,J);Y[Q]=X+q*Math.cos(et),Y[Q+1]=Z+q*Math.sin(et),Y[Q+2]=et}addCurvePosition(q,K,z,Y,Q,X,Z,J,tt,et,it,st){if(0==q||isNaN(q))return et[it]=K,et[it+1]=z,void(et[it+2]=Math.atan2(Q-z,Y-K));const nt=q*q,at=nt*q,rt=1-q,ot=rt*rt,ht=ot*rt,ct=rt*q,dt=3*ct,lt=rt*dt,ut=dt*q,ft=K*ht+Y*lt+X*ut+J*at,bt=z*ht+Q*lt+Z*ut+tt*at;et[it]=ft,et[it+1]=bt,st&&(et[it+2]=q<.001?Math.atan2(Q-z,Y-K):Math.atan2(bt-(z*ot+Q*ct*2+Z*nt),ft-(K*ot+Y*ct*2+X*nt)))}};let qt=Wt;qt.NONE=-1,qt.BEFORE=-2,qt.AFTER=-3,qt.epsilon=1e-5;class Kt{constructor(q,K){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!q)throw new Error("data cannot be null.");if(!K)throw new Error("bone cannot be null.");this.data=q,this.bone=K,this.color=new Y.Q1,this.darkColor=q.darkColor?new Y.Q1:null,this.setToSetupPose(),this.blendMode=this.data.blendMode}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(q){this.attachment!=q&&(q instanceof Z&&this.attachment instanceof Z&&q.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=q,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}}class zt{constructor(q,K){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new Y.I9,this.active=!1,!q)throw new Error("data cannot be null.");if(!K)throw new Error("skeleton cannot be null.");this.data=q,this.mixRotate=q.mixRotate,this.mixX=q.mixX,this.mixY=q.mixY,this.mixScaleX=q.mixScaleX,this.mixScaleY=q.mixScaleY,this.mixShearY=q.mixShearY,this.bones=new Array;for(let Y=0;Y0?Y.cj.degRad:-Y.cj.degRad,ot=this.data.offsetRotation*rt,ht=this.data.offsetShearY*rt,ct=this.bones;for(let dt=0,lt=ct.length;dtY.cj.PI?Z-=Y.cj.PI2:Z<-Y.cj.PI&&(Z+=Y.cj.PI2),Z*=q;const J=Math.cos(Z),tt=Math.sin(Z);rt.a=J*K-tt*Q,rt.c=J*z-tt*X,rt.b=tt*K+J*Q,rt.d=tt*z+J*X}if(J){const q=this.temp;tt.localToWorld(q.set(this.data.offsetX,this.data.offsetY)),rt.tx+=(q.x-rt.tx)*K,rt.ty+=(q.y-rt.ty)*z}if(0!=Q){let q=Math.sqrt(rt.a*rt.a+rt.b*rt.b);0!=q&&(q=(q+(Math.sqrt(it*it+nt*nt)-q+this.data.offsetScaleX)*Q)/q),rt.a*=q,rt.b*=q}if(0!=X){let q=Math.sqrt(rt.c*rt.c+rt.d*rt.d);0!=q&&(q=(q+(Math.sqrt(st*st+at*at)-q+this.data.offsetScaleY)*X)/q),rt.c*=q,rt.d*=q}if(Z>0){const q=rt.c,K=rt.d,z=Math.atan2(K,q);let Q=Math.atan2(at,st)-Math.atan2(nt,it)-(z-Math.atan2(rt.b,rt.a));Q>Y.cj.PI?Q-=Y.cj.PI2:Q<-Y.cj.PI&&(Q+=Y.cj.PI2),Q=z+(Q+ht)*Z;const X=Math.sqrt(q*q+K*K);rt.c=Math.cos(Q)*X,rt.d=Math.sin(Q)*X}et.updateAppliedTransform()}}applyRelativeWorld(){const q=this.mixRotate,K=this.mixX,z=this.mixY,Q=this.mixScaleX,X=this.mixScaleY,Z=this.mixShearY,J=0!=K||0!=z,tt=this.target,et=tt.matrix,it=et.a,st=et.c,nt=et.b,at=et.d,rt=it*at-st*nt>0?Y.cj.degRad:-Y.cj.degRad,ot=this.data.offsetRotation*rt,ht=this.data.offsetShearY*rt,ct=this.bones;for(let dt=0,lt=ct.length;dtY.cj.PI?Z-=Y.cj.PI2:Z<-Y.cj.PI&&(Z+=Y.cj.PI2),Z*=q;const J=Math.cos(Z),tt=Math.sin(Z);rt.a=J*K-tt*Q,rt.c=J*z-tt*X,rt.b=tt*K+J*Q,rt.d=tt*z+J*X}if(J){const q=this.temp;tt.localToWorld(q.set(this.data.offsetX,this.data.offsetY)),rt.tx+=q.x*K,rt.ty+=q.y*z}if(0!=Q){const q=(Math.sqrt(it*it+nt*nt)-1+this.data.offsetScaleX)*Q+1;rt.a*=q,rt.b*=q}if(0!=X){const q=(Math.sqrt(st*st+at*at)-1+this.data.offsetScaleY)*X+1;rt.c*=q,rt.d*=q}if(Z>0){let q=Math.atan2(at,st)-Math.atan2(nt,it);q>Y.cj.PI?q-=Y.cj.PI2:q<-Y.cj.PI&&(q+=Y.cj.PI2);const K=rt.c,z=rt.d;q=Math.atan2(z,K)+(q-Y.cj.PI/2+ht)*Z;const Q=Math.sqrt(K*K+z*z);rt.c=Math.cos(q)*Q,rt.d=Math.sin(q)*Q}et.updateAppliedTransform()}}applyAbsoluteLocal(){const q=this.mixRotate,K=this.mixX,z=this.mixY,Y=this.mixScaleX,Q=this.mixScaleY,X=this.mixShearY,Z=this.target,J=this.bones;for(let tt=0,et=J.length;tt=Y.length&&(Y.length=q+1),Y[q]||(Y[q]={}),Y[q][K]=z}addSkin(q){for(let z=0;z{"use strict";z.d(K,{B9:()=>J,t5:()=>Si,hq:()=>Ai,JH:()=>xi,cc:()=>As,hp:()=>Oi,jl:()=>$i,Q1:()=>Ce,Td:()=>Bi,_4:()=>tt,Pp:()=>Hi,Ag:()=>ci,dJ:()=>Rs,V2:()=>Ni,vg:()=>ut,uq:()=>qi,oA:()=>es,TO:()=>Li,bR:()=>Fi,tS:()=>Vi,BP:()=>_s,bO:()=>ki,M_:()=>ji,TE:()=>Wi,HY:()=>Ui,$f:()=>la,Mt:()=>Ts,Uw:()=>vi,QE:()=>st,gP:()=>$s,NW:()=>nn,Rv:()=>Yn,dL:()=>ss,k2:()=>ws,A5:()=>fa,uR:()=>rt,Eo:()=>Jn,MT:()=>Zn,XO:()=>ui,W0:()=>pt,Wp:()=>Y});var Y={};z.r(Y),z.d(Y,{BaseTextureCache:()=>Ze,BoundingBox:()=>Ye,CanvasRenderTarget:()=>ei,DATA_URI:()=>ke,EventEmitter:()=>Lt(),ProgramCache:()=>Qe,TextureCache:()=>Xe,clearTextureCache:()=>ti,correctBlendMode:()=>Me,createIndicesForQuads:()=>Be,decomposeDataUri:()=>ri,deprecation:()=>Gt,destroyTextureCache:()=>Je,detectVideoAlphaMode:()=>Kt,determineCrossOrigin:()=>oi,earcut:()=>Bt(),getBufferType:()=>Ue,getCanvasBoundingBox:()=>ni,getResolutionOfUrl:()=>hi,hex2rgb:()=>Oe,hex2string:()=>Ie,interleaveTypedArrays:()=>Ge,isMobile:()=>Nt,isPow2:()=>$e,isWebGLSupported:()=>Qt,log2:()=>He,nextPow2:()=>je,path:()=>Vt,premultiplyBlendMode:()=>Pe,premultiplyRgba:()=>Ne,premultiplyTint:()=>xe,premultiplyTintToRgba:()=>Le,removeItems:()=>Ve,rgb2hex:()=>Re,sayHello:()=>Yt,sign:()=>We,skipHello:()=>zt,string2hex:()=>De,trimCanvas:()=>ai,uid:()=>Ke,url:()=>jt});var Q=(q=>(q[q.WEBGL_LEGACY=0]="WEBGL_LEGACY",q[q.WEBGL=1]="WEBGL",q[q.WEBGL2=2]="WEBGL2",q))(Q||{}),X=(q=>(q[q.UNKNOWN=0]="UNKNOWN",q[q.WEBGL=1]="WEBGL",q[q.CANVAS=2]="CANVAS",q))(X||{}),Z=(q=>(q[q.COLOR=16384]="COLOR",q[q.DEPTH=256]="DEPTH",q[q.STENCIL=1024]="STENCIL",q))(Z||{}),J=(q=>(q[q.NORMAL=0]="NORMAL",q[q.ADD=1]="ADD",q[q.MULTIPLY=2]="MULTIPLY",q[q.SCREEN=3]="SCREEN",q[q.OVERLAY=4]="OVERLAY",q[q.DARKEN=5]="DARKEN",q[q.LIGHTEN=6]="LIGHTEN",q[q.COLOR_DODGE=7]="COLOR_DODGE",q[q.COLOR_BURN=8]="COLOR_BURN",q[q.HARD_LIGHT=9]="HARD_LIGHT",q[q.SOFT_LIGHT=10]="SOFT_LIGHT",q[q.DIFFERENCE=11]="DIFFERENCE",q[q.EXCLUSION=12]="EXCLUSION",q[q.HUE=13]="HUE",q[q.SATURATION=14]="SATURATION",q[q.COLOR=15]="COLOR",q[q.LUMINOSITY=16]="LUMINOSITY",q[q.NORMAL_NPM=17]="NORMAL_NPM",q[q.ADD_NPM=18]="ADD_NPM",q[q.SCREEN_NPM=19]="SCREEN_NPM",q[q.NONE=20]="NONE",q[q.SRC_OVER=0]="SRC_OVER",q[q.SRC_IN=21]="SRC_IN",q[q.SRC_OUT=22]="SRC_OUT",q[q.SRC_ATOP=23]="SRC_ATOP",q[q.DST_OVER=24]="DST_OVER",q[q.DST_IN=25]="DST_IN",q[q.DST_OUT=26]="DST_OUT",q[q.DST_ATOP=27]="DST_ATOP",q[q.ERASE=26]="ERASE",q[q.SUBTRACT=28]="SUBTRACT",q[q.XOR=29]="XOR",q))(J||{}),tt=(q=>(q[q.POINTS=0]="POINTS",q[q.LINES=1]="LINES",q[q.LINE_LOOP=2]="LINE_LOOP",q[q.LINE_STRIP=3]="LINE_STRIP",q[q.TRIANGLES=4]="TRIANGLES",q[q.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",q[q.TRIANGLE_FAN=6]="TRIANGLE_FAN",q))(tt||{}),et=(q=>(q[q.RGBA=6408]="RGBA",q[q.RGB=6407]="RGB",q[q.RG=33319]="RG",q[q.RED=6403]="RED",q[q.RGBA_INTEGER=36249]="RGBA_INTEGER",q[q.RGB_INTEGER=36248]="RGB_INTEGER",q[q.RG_INTEGER=33320]="RG_INTEGER",q[q.RED_INTEGER=36244]="RED_INTEGER",q[q.ALPHA=6406]="ALPHA",q[q.LUMINANCE=6409]="LUMINANCE",q[q.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",q[q.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",q[q.DEPTH_STENCIL=34041]="DEPTH_STENCIL",q))(et||{}),it=(q=>(q[q.TEXTURE_2D=3553]="TEXTURE_2D",q[q.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",q[q.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",q[q.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",q[q.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",q[q.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",q[q.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",q[q.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",q[q.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",q))(it||{}),st=(q=>(q[q.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",q[q.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",q[q.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",q[q.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",q[q.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",q[q.UNSIGNED_INT=5125]="UNSIGNED_INT",q[q.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",q[q.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",q[q.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",q[q.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",q[q.BYTE=5120]="BYTE",q[q.SHORT=5122]="SHORT",q[q.INT=5124]="INT",q[q.FLOAT=5126]="FLOAT",q[q.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",q[q.HALF_FLOAT=36193]="HALF_FLOAT",q))(st||{}),nt=(q=>(q[q.FLOAT=0]="FLOAT",q[q.INT=1]="INT",q[q.UINT=2]="UINT",q))(nt||{}),at=(q=>(q[q.NEAREST=0]="NEAREST",q[q.LINEAR=1]="LINEAR",q))(at||{}),rt=(q=>(q[q.CLAMP=33071]="CLAMP",q[q.REPEAT=10497]="REPEAT",q[q.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",q))(rt||{}),ot=(q=>(q[q.OFF=0]="OFF",q[q.POW2=1]="POW2",q[q.ON=2]="ON",q[q.ON_MANUAL=3]="ON_MANUAL",q))(ot||{}),ht=(q=>(q[q.NPM=0]="NPM",q[q.UNPACK=1]="UNPACK",q[q.PMA=2]="PMA",q[q.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",q[q.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",q[q.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",q))(ht||{}),ct=(q=>(q[q.NO=0]="NO",q[q.YES=1]="YES",q[q.AUTO=2]="AUTO",q[q.BLEND=0]="BLEND",q[q.CLEAR=1]="CLEAR",q[q.BLIT=2]="BLIT",q))(ct||{}),dt=(q=>(q[q.AUTO=0]="AUTO",q[q.MANUAL=1]="MANUAL",q))(dt||{}),lt=(q=>(q.LOW="lowp",q.MEDIUM="mediump",q.HIGH="highp",q))(lt||{}),ut=(q=>(q[q.NONE=0]="NONE",q[q.SCISSOR=1]="SCISSOR",q[q.STENCIL=2]="STENCIL",q[q.SPRITE=3]="SPRITE",q[q.COLOR=4]="COLOR",q))(ut||{}),ft=(q=>(q[q.NONE=0]="NONE",q[q.LOW=2]="LOW",q[q.MEDIUM=4]="MEDIUM",q[q.HIGH=8]="HIGH",q))(ft||{}),bt=(q=>(q[q.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",q[q.ARRAY_BUFFER=34962]="ARRAY_BUFFER",q[q.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",q))(bt||{});const pt={ADAPTER:{createCanvas:(q,K)=>{const z=document.createElement("canvas");return z.width=q,z.height=K,z},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(q,K)=>fetch(q,K),parseXML:q=>(new DOMParser).parseFromString(q,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var vt=/iPhone/i,gt=/iPod/i,mt=/iPad/i,yt=/\biOS-universal(?:.+)Mac\b/i,_t=/\bAndroid(?:.+)Mobile\b/i,Et=/Android/i,wt=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Tt=/Silk/i,St=/Windows Phone/i,At=/\bWindows(?:.+)ARM\b/i,Ct=/BlackBerry/i,Ot=/BB10/i,It=/Opera Mini/i,Dt=/\b(CriOS|Chrome)(?:.+)Mobile/i,Rt=/Mobile(?:.+)Firefox\b/i,Pt=function(q){return void 0!==q&&"MacIntel"===q.platform&&"number"==typeof q.maxTouchPoints&&q.maxTouchPoints>1&&"undefined"==typeof MSStream};function Mt(q){var K={userAgent:"",platform:"",maxTouchPoints:0};q||"undefined"==typeof navigator?"string"==typeof q?K.userAgent=q:q&&q.userAgent&&(K={userAgent:q.userAgent,platform:q.platform,maxTouchPoints:q.maxTouchPoints||0}):K={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var z=K.userAgent,Y=z.split("[FBAN");void 0!==Y[1]&&(z=Y[0]),void 0!==(Y=z.split("Twitter"))[1]&&(z=Y[0]);var Q=function(q){return function(K){return K.test(q)}}(z),X={apple:{phone:Q(vt)&&!Q(St),ipod:Q(gt),tablet:!Q(vt)&&(Q(mt)||Pt(K))&&!Q(St),universal:Q(yt),device:(Q(vt)||Q(gt)||Q(mt)||Q(yt)||Pt(K))&&!Q(St)},amazon:{phone:Q(wt),tablet:!Q(wt)&&Q(Tt),device:Q(wt)||Q(Tt)},android:{phone:!Q(St)&&Q(wt)||!Q(St)&&Q(_t),tablet:!Q(St)&&!Q(wt)&&!Q(_t)&&(Q(Tt)||Q(Et)),device:!Q(St)&&(Q(wt)||Q(Tt)||Q(_t)||Q(Et))||Q(/\bokhttp\b/i)},windows:{phone:Q(St),tablet:Q(At),device:Q(St)||Q(At)},other:{blackberry:Q(Ct),blackberry10:Q(Ot),opera:Q(It),firefox:Q(Rt),chrome:Q(Dt),device:Q(Ct)||Q(Ot)||Q(It)||Q(Rt)||Q(Dt)},any:!1,phone:!1,tablet:!1};return X.any=X.apple.device||X.android.device||X.windows.device||X.other.device,X.phone=X.apple.phone||X.android.phone||X.windows.phone,X.tablet=X.apple.tablet||X.android.tablet||X.windows.tablet,X}const Nt=(Mt.default??Mt)(globalThis.navigator);pt.RETINA_PREFIX=/@([0-9\.]+)x/,pt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var xt=z(30228),Lt=z.n(xt),kt=z(1858),Bt=z.n(kt),Ut=z(88835);const Ft={};function Gt(q,K,z=3){if(Ft[K])return;let Y=(new Error).stack;typeof Y>"u"?console.warn("PixiJS Deprecation Warning: ",`${K}\nDeprecated since v${q}`):(Y=Y.split("\n").splice(z).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${K}\nDeprecated since v${q}`),console.warn(Y),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${K}\nDeprecated since v${q}`),console.warn(Y))),Ft[K]=!0}const jt={get parse(){return Gt("7.3.0","utils.url.parse is deprecated, use native URL API instead."),Ut.qg},get format(){return Gt("7.3.0","utils.url.format is deprecated, use native URL API instead."),Ut.GP},get resolve(){return Gt("7.3.0","utils.url.resolve is deprecated, use native URL API instead."),Ut.hd}};function $t(q){if("string"!=typeof q)throw new TypeError(`Path must be a string. Received ${JSON.stringify(q)}`)}function Ht(q){return q.split("?")[0].split("#")[0]}const Vt={toPosix(q){return K="\\",z="/",q.replace(new RegExp(K.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),z);var K,z},isUrl(q){return/^https?:/.test(this.toPosix(q))},isDataUrl:q=>/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(q),isBlobUrl:q=>q.startsWith("blob:"),hasProtocol(q){return/^[^/:]+:/.test(this.toPosix(q))},getProtocol(q){$t(q),q=this.toPosix(q);const K=/^file:\/\/\//.exec(q);if(K)return K[0];const z=/^[^/:]+:\/{0,2}/.exec(q);return z?z[0]:""},toAbsolute(q,K,z){if($t(q),this.isDataUrl(q)||this.isBlobUrl(q))return q;const Y=Ht(this.toPosix(K??pt.ADAPTER.getBaseUrl())),Q=Ht(this.toPosix(z??this.rootname(Y)));return(q=this.toPosix(q)).startsWith("/")?Vt.join(Q,q.slice(1)):this.isAbsolute(q)?q:this.join(Y,q)},normalize(q){if($t(q),0===q.length)return".";if(this.isDataUrl(q)||this.isBlobUrl(q))return q;let K="";const z=(q=this.toPosix(q)).startsWith("/");this.hasProtocol(q)&&(K=this.rootname(q),q=q.slice(K.length));const Y=q.endsWith("/");return(q=function(q,K){let z="",Y=0,Q=-1,X=0,Z=-1;for(let J=0;J<=q.length;++J){if(J2){const q=z.lastIndexOf("/");if(q!==z.length-1){-1===q?(z="",Y=0):(z=z.slice(0,q),Y=z.length-1-z.lastIndexOf("/")),Q=J,X=0;continue}}else if(2===z.length||1===z.length){z="",Y=0,Q=J,X=0;continue}K&&(z.length>0?z+="/..":z="..",Y=2)}else z.length>0?z+=`/${q.slice(Q+1,J)}`:z=q.slice(Q+1,J),Y=J-Q-1;Q=J,X=0}else 46===Z&&-1!==X?++X:X=-1}return z}(q,!1)).length>0&&Y&&(q+="/"),z?`/${q}`:K+q},isAbsolute(q){return $t(q),q=this.toPosix(q),!!this.hasProtocol(q)||q.startsWith("/")},join(...q){if(0===q.length)return".";let K;for(let z=0;z0)if(void 0===K)K=Y;else{const Q=q[z-1]??"";this.joinExtensions.includes(this.extname(Q).toLowerCase())?K+=`/../${Y}`:K+=`/${Y}`}}return void 0===K?".":this.normalize(K)},dirname(q){if($t(q),0===q.length)return".";let K=(q=this.toPosix(q)).charCodeAt(0);const z=47===K;let Y=-1,Q=!0;const X=this.getProtocol(q),Z=q;for(let J=(q=q.slice(X.length)).length-1;J>=1;--J)if(K=q.charCodeAt(J),47===K){if(!Q){Y=J;break}}else Q=!1;return-1===Y?z?"/":this.isUrl(Z)?X+q:X:z&&1===Y?"//":X+q.slice(0,Y)},rootname(q){$t(q);let K="";if(K=(q=this.toPosix(q)).startsWith("/")?"/":this.getProtocol(q),this.isUrl(q)){const z=q.indexOf("/",K.length);K=-1!==z?q.slice(0,z):q,K.endsWith("/")||(K+="/")}return K},basename(q,K){$t(q),K&&$t(K),q=Ht(this.toPosix(q));let z,Y=0,Q=-1,X=!0;if(void 0!==K&&K.length>0&&K.length<=q.length){if(K.length===q.length&&K===q)return"";let Z=K.length-1,J=-1;for(z=q.length-1;z>=0;--z){const tt=q.charCodeAt(z);if(47===tt){if(!X){Y=z+1;break}}else-1===J&&(X=!1,J=z+1),Z>=0&&(tt===K.charCodeAt(Z)?-1==--Z&&(Q=z):(Z=-1,Q=J))}return Y===Q?Q=J:-1===Q&&(Q=q.length),q.slice(Y,Q)}for(z=q.length-1;z>=0;--z)if(47===q.charCodeAt(z)){if(!X){Y=z+1;break}}else-1===Q&&(X=!1,Q=z+1);return-1===Q?"":q.slice(Y,Q)},extname(q){$t(q);let K=-1,z=0,Y=-1,Q=!0,X=0;for(let Z=(q=Ht(this.toPosix(q))).length-1;Z>=0;--Z){const J=q.charCodeAt(Z);if(47!==J)-1===Y&&(Q=!1,Y=Z+1),46===J?-1===K?K=Z:1!==X&&(X=1):-1!==K&&(X=-1);else if(!Q){z=Z+1;break}}return-1===K||-1===Y||0===X||1===X&&K===Y-1&&K===z+1?"":q.slice(K,Y)},parse(q){$t(q);const K={root:"",dir:"",base:"",ext:"",name:""};if(0===q.length)return K;let z=(q=Ht(this.toPosix(q))).charCodeAt(0);const Y=this.isAbsolute(q);let Q;K.root=this.rootname(q),Q=Y||this.hasProtocol(q)?1:0;let X=-1,Z=0,J=-1,tt=!0,et=q.length-1,it=0;for(;et>=Q;--et)if(z=q.charCodeAt(et),47!==z)-1===J&&(tt=!1,J=et+1),46===z?-1===X?X=et:1!==it&&(it=1):-1!==X&&(it=-1);else if(!tt){Z=et+1;break}return-1===X||-1===J||0===it||1===it&&X===J-1&&X===Z+1?-1!==J&&(K.base=K.name=0===Z&&Y?q.slice(1,J):q.slice(Z,J)):(0===Z&&Y?(K.name=q.slice(1,X),K.base=q.slice(1,J)):(K.name=q.slice(Z,X),K.base=q.slice(Z,J)),K.ext=q.slice(X,J)),K.dir=this.dirname(q),K},sep:"/",delimiter:":",joinExtensions:[".html"]};let Wt,qt;async function Kt(){return Wt??(Wt=(async()=>{const q=document.createElement("canvas").getContext("webgl");if(!q)return ht.UNPACK;const K=await new Promise((q=>{const K=document.createElement("video");K.onloadeddata=()=>q(K),K.onerror=()=>q(null),K.autoplay=!1,K.crossOrigin="anonymous",K.preload="auto",K.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",K.load()}));if(!K)return ht.UNPACK;const z=q.createTexture();q.bindTexture(q.TEXTURE_2D,z);const Y=q.createFramebuffer();q.bindFramebuffer(q.FRAMEBUFFER,Y),q.framebufferTexture2D(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,q.TEXTURE_2D,z,0),q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),q.pixelStorei(q.UNPACK_COLORSPACE_CONVERSION_WEBGL,q.NONE),q.texImage2D(q.TEXTURE_2D,0,q.RGBA,q.RGBA,q.UNSIGNED_BYTE,K);const Q=new Uint8Array(4);return q.readPixels(0,0,1,1,q.RGBA,q.UNSIGNED_BYTE,Q),q.deleteFramebuffer(Y),q.deleteTexture(z),q.getExtension("WEBGL_lose_context")?.loseContext(),Q[0]<=Q[3]?ht.PMA:ht.UNPACK})()),Wt}function zt(){Gt("7.0.0","skipHello is deprecated, please use settings.RENDER_OPTIONS.hello")}function Yt(){Gt("7.0.0",'sayHello is deprecated, please use Renderer\'s "hello" option')}function Qt(){return typeof qt>"u"&&(qt=function(){const q={stencil:!0,failIfMajorPerformanceCaveat:pt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!pt.ADAPTER.getWebGLRenderingContext())return!1;const K=pt.ADAPTER.createCanvas();let z=K.getContext("webgl",q)||K.getContext("experimental-webgl",q);const Y=!!z?.getContextAttributes()?.stencil;if(z){const q=z.getExtension("WEBGL_lose_context");q&&q.loseContext()}return z=null,Y}catch{return!1}}()),qt}var Xt={grad:.9,turn:360,rad:360/(2*Math.PI)},Zt=function(q){return"string"==typeof q?q.length>0:"number"==typeof q},Jt=function(q,K,z){return void 0===K&&(K=0),void 0===z&&(z=Math.pow(10,K)),Math.round(z*q)/z+0},te=function(q,K,z){return void 0===K&&(K=0),void 0===z&&(z=1),q>z?z:q>K?q:K},ee=function(q){return(q=isFinite(q)?q%360:0)>0?q:q+360},ie=function(q){return{r:te(q.r,0,255),g:te(q.g,0,255),b:te(q.b,0,255),a:te(q.a)}},se=function(q){return{r:Jt(q.r),g:Jt(q.g),b:Jt(q.b),a:Jt(q.a,3)}},ne=/^#([0-9a-f]{3,8})$/i,ae=function(q){var K=q.toString(16);return K.length<2?"0"+K:K},re=function(q){var K=q.r,z=q.g,Y=q.b,Q=q.a,X=Math.max(K,z,Y),Z=X-Math.min(K,z,Y),J=Z?X===K?(z-Y)/Z:X===z?2+(Y-K)/Z:4+(K-z)/Z:0;return{h:60*(J<0?J+6:J),s:X?Z/X*100:0,v:X/255*100,a:Q}},oe=function(q){var K=q.h,z=q.s,Y=q.v,Q=q.a;K=K/360*6,z/=100,Y/=100;var X=Math.floor(K),Z=Y*(1-z),J=Y*(1-(K-X)*z),tt=Y*(1-(1-K+X)*z),et=X%6;return{r:255*[Y,J,Z,Z,tt,Y][et],g:255*[tt,Y,Y,J,Z,Z][et],b:255*[Z,Z,tt,Y,Y,J][et],a:Q}},he=function(q){return{h:ee(q.h),s:te(q.s,0,100),l:te(q.l,0,100),a:te(q.a)}},ce=function(q){return{h:Jt(q.h),s:Jt(q.s),l:Jt(q.l),a:Jt(q.a,3)}},de=function(q){return oe((z=(K=q).s,{h:K.h,s:(z*=((Y=K.l)<50?Y:100-Y)/100)>0?2*z/(Y+z)*100:0,v:Y+z,a:K.a}));var K,z,Y},le=function(q){return{h:(K=re(q)).h,s:(Q=(200-(z=K.s))*(Y=K.v)/100)>0&&Q<200?z*Y/100/(Q<=100?Q:200-Q)*100:0,l:Q/2,a:K.a};var K,z,Y,Q},ue=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fe=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,be=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,pe=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ve={string:[[function(q){var K=ne.exec(q);return K?(q=K[1]).length<=4?{r:parseInt(q[0]+q[0],16),g:parseInt(q[1]+q[1],16),b:parseInt(q[2]+q[2],16),a:4===q.length?Jt(parseInt(q[3]+q[3],16)/255,2):1}:6===q.length||8===q.length?{r:parseInt(q.substr(0,2),16),g:parseInt(q.substr(2,2),16),b:parseInt(q.substr(4,2),16),a:8===q.length?Jt(parseInt(q.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(q){var K=be.exec(q)||pe.exec(q);return K?K[2]!==K[4]||K[4]!==K[6]?null:ie({r:Number(K[1])/(K[2]?100/255:1),g:Number(K[3])/(K[4]?100/255:1),b:Number(K[5])/(K[6]?100/255:1),a:void 0===K[7]?1:Number(K[7])/(K[8]?100:1)}):null},"rgb"],[function(q){var K=ue.exec(q)||fe.exec(q);if(!K)return null;var z,Y,Q=he({h:(z=K[1],Y=K[2],void 0===Y&&(Y="deg"),Number(z)*(Xt[Y]||1)),s:Number(K[3]),l:Number(K[4]),a:void 0===K[5]?1:Number(K[5])/(K[6]?100:1)});return de(Q)},"hsl"]],object:[[function(q){var K=q.r,z=q.g,Y=q.b,Q=q.a,X=void 0===Q?1:Q;return Zt(K)&&Zt(z)&&Zt(Y)?ie({r:Number(K),g:Number(z),b:Number(Y),a:Number(X)}):null},"rgb"],[function(q){var K=q.h,z=q.s,Y=q.l,Q=q.a,X=void 0===Q?1:Q;if(!Zt(K)||!Zt(z)||!Zt(Y))return null;var Z=he({h:Number(K),s:Number(z),l:Number(Y),a:Number(X)});return de(Z)},"hsl"],[function(q){var K=q.h,z=q.s,Y=q.v,Q=q.a,X=void 0===Q?1:Q;if(!Zt(K)||!Zt(z)||!Zt(Y))return null;var Z=function(q){return{h:ee(q.h),s:te(q.s,0,100),v:te(q.v,0,100),a:te(q.a)}}({h:Number(K),s:Number(z),v:Number(Y),a:Number(X)});return oe(Z)},"hsv"]]},ge=function(q,K){for(var z=0;z=.5},q.prototype.toHex=function(){return K=(q=se(this.rgba)).r,z=q.g,Y=q.b,X=(Q=q.a)<1?ae(Jt(255*Q)):"","#"+ae(K)+ae(z)+ae(Y)+X;var q,K,z,Y,Q,X},q.prototype.toRgb=function(){return se(this.rgba)},q.prototype.toRgbString=function(){return K=(q=se(this.rgba)).r,z=q.g,Y=q.b,(Q=q.a)<1?"rgba("+K+", "+z+", "+Y+", "+Q+")":"rgb("+K+", "+z+", "+Y+")";var q,K,z,Y,Q},q.prototype.toHsl=function(){return ce(le(this.rgba))},q.prototype.toHslString=function(){return K=(q=ce(le(this.rgba))).h,z=q.s,Y=q.l,(Q=q.a)<1?"hsla("+K+", "+z+"%, "+Y+"%, "+Q+")":"hsl("+K+", "+z+"%, "+Y+"%)";var q,K,z,Y,Q},q.prototype.toHsv=function(){return q=re(this.rgba),{h:Jt(q.h),s:Jt(q.s),v:Jt(q.v),a:Jt(q.a,3)};var q},q.prototype.invert=function(){return Te({r:255-(q=this.rgba).r,g:255-q.g,b:255-q.b,a:q.a});var q},q.prototype.saturate=function(q){return void 0===q&&(q=.1),Te(ye(this.rgba,q))},q.prototype.desaturate=function(q){return void 0===q&&(q=.1),Te(ye(this.rgba,-q))},q.prototype.grayscale=function(){return Te(ye(this.rgba,-1))},q.prototype.lighten=function(q){return void 0===q&&(q=.1),Te(Ee(this.rgba,q))},q.prototype.darken=function(q){return void 0===q&&(q=.1),Te(Ee(this.rgba,-q))},q.prototype.rotate=function(q){return void 0===q&&(q=15),this.hue(this.hue()+q)},q.prototype.alpha=function(q){return"number"==typeof q?Te({r:(K=this.rgba).r,g:K.g,b:K.b,a:q}):Jt(this.rgba.a,3);var K},q.prototype.hue=function(q){var K=le(this.rgba);return"number"==typeof q?Te({h:q,s:K.s,l:K.l,a:K.a}):Jt(K.h)},q.prototype.isEqual=function(q){return this.toHex()===Te(q).toHex()},q}(),Te=function(q){return q instanceof we?q:new we(q)},Se=[];!function(q){q.forEach((function(q){Se.indexOf(q)<0&&(q(we,ve),Se.push(q))}))}([function(q,K){var z={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},Y={};for(var Q in z)Y[z[Q]]=Q;var X={};q.prototype.toName=function(K){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var Q,Z,J=Y[this.toHex()];if(J)return J;if(null==K?void 0:K.closest){var tt=this.toRgb(),et=1/0,it="black";if(!X.length)for(var st in z)X[st]=new q(z[st]).toRgb();for(var nt in z){var at=(Q=tt,Z=X[nt],Math.pow(Q.r-Z.r,2)+Math.pow(Q.g-Z.g,2)+Math.pow(Q.b-Z.b,2));atq===K[z]));if(null!==q&&null!==K){const z=Object.keys(q),Y=Object.keys(K);return z.length===Y.length&&z.every((z=>q[z]===K[z]))}return q===K}toRgba(){const[q,K,z,Y]=this._components;return{r:q,g:K,b:z,a:Y}}toRgb(){const[q,K,z]=this._components;return{r:q,g:K,b:z}}toRgbaString(){const[q,K,z]=this.toUint8RgbArray();return`rgba(${q},${K},${z},${this.alpha})`}toUint8RgbArray(q){const[K,z,Y]=this._components;return(q=q??[])[0]=Math.round(255*K),q[1]=Math.round(255*z),q[2]=Math.round(255*Y),q}toRgbArray(q){q=q??[];const[K,z,Y]=this._components;return q[0]=K,q[1]=z,q[2]=Y,q}toNumber(){return this._int}toLittleEndianNumber(){const q=this._int;return(q>>16)+(65280&q)+((255&q)<<16)}multiply(K){const[z,Y,Q,X]=q.temp.setValue(K)._components;return this._components[0]*=z,this._components[1]*=Y,this._components[2]*=Q,this._components[3]*=X,this.refreshInt(),this._value=null,this}premultiply(q,K=!0){return K&&(this._components[0]*=q,this._components[1]*=q,this._components[2]*=q),this._components[3]=q,this.refreshInt(),this._value=null,this}toPremultiplied(q,K=!0){if(1===q)return(255<<24)+this._int;if(0===q)return K?0:this._int;let z=this._int>>16&255,Y=this._int>>8&255,Q=255&this._int;return K&&(z=z*q+.5|0,Y=Y*q+.5|0,Q=Q*q+.5|0),(255*q<<24)+(z<<16)+(Y<<8)+Q}toHex(){const q=this._int.toString(16);return`#${"000000".substring(0,6-q.length)+q}`}toHexa(){const q=Math.round(255*this._components[3]).toString(16);return this.toHex()+"00".substring(0,2-q.length)+q}setAlpha(q){return this._components[3]=this._clamp(q),this}round(q){const[K,z,Y]=this._components;return this._components[0]=Math.round(K*q)/q,this._components[1]=Math.round(z*q)/q,this._components[2]=Math.round(Y*q)/q,this.refreshInt(),this._value=null,this}toArray(q){q=q??[];const[K,z,Y,Q]=this._components;return q[0]=K,q[1]=z,q[2]=Y,q[3]=Q,q}normalize(K){let z,Y,Q,X;if(("number"==typeof K||K instanceof Number)&&K>=0&&K<=16777215){z=(K>>16&255)/255,Y=(K>>8&255)/255,Q=(255&K)/255,X=1}else if((Array.isArray(K)||K instanceof Float32Array)&&K.length>=3&&K.length<=4)K=this._clamp(K),[z,Y,Q,X=1]=K;else if((K instanceof Uint8Array||K instanceof Uint8ClampedArray)&&K.length>=3&&K.length<=4)K=this._clamp(K,0,255),[z,Y,Q,X=255]=K,z/=255,Y/=255,Q/=255,X/=255;else if("string"==typeof K||"object"==typeof K){if("string"==typeof K){const z=q.HEX_PATTERN.exec(K);z&&(K=`#${z[2]}`)}const Z=Te(K);Z.isValid()&&(({r:z,g:Y,b:Q,a:X}=Z.rgba),z/=255,Y/=255,Q/=255)}if(void 0===z)throw new Error(`Unable to convert color ${K}`);this._components[0]=z,this._components[1]=Y,this._components[2]=Q,this._components[3]=X,this.refreshInt()}refreshInt(){this._clamp(this._components);const[q,K,z]=this._components;this._int=(255*q<<16)+(255*K<<8)+(255*z|0)}_clamp(q,K=0,z=1){return"number"==typeof q?Math.min(Math.max(q,K),z):(q.forEach(((Y,Q)=>{q[Q]=Math.min(Math.max(Y,K),z)})),q)}};Ae.shared=new Ae,Ae.temp=new Ae,Ae.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Ce=Ae;function Oe(q,K=[]){return Gt("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Ce.shared.setValue(q).toRgbArray(K)}function Ie(q){return Gt("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),Ce.shared.setValue(q).toHex()}function De(q){return Gt("7.2.0","utils.string2hex is deprecated, use Color#toNumber instead"),Ce.shared.setValue(q).toNumber()}function Re(q){return Gt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Ce.shared.setValue(q).toNumber()}const Pe=function(){const q=[],K=[];for(let Y=0;Y<32;Y++)q[Y]=Y,K[Y]=Y;q[J.NORMAL_NPM]=J.NORMAL,q[J.ADD_NPM]=J.ADD,q[J.SCREEN_NPM]=J.SCREEN,K[J.NORMAL]=J.NORMAL_NPM,K[J.ADD]=J.ADD_NPM,K[J.SCREEN]=J.SCREEN_NPM;const z=[];return z.push(K),z.push(q),z}();function Me(q,K){return Pe[K?1:0][q]}function Ne(q,K,z,Y=!0){return Gt("7.2.0","utils.premultiplyRgba has moved to Color.premultiply"),Ce.shared.setValue(q).premultiply(K,Y).toArray(z??new Float32Array(4))}function xe(q,K){return Gt("7.2.0","utils.premultiplyTint has moved to Color.toPremultiplied"),Ce.shared.setValue(q).toPremultiplied(K)}function Le(q,K,z,Y=!0){return Gt("7.2.0","utils.premultiplyTintToRgba has moved to Color.premultiply"),Ce.shared.setValue(q).premultiply(K,Y).toArray(z??new Float32Array(4))}const ke=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function Be(q,K=null){const z=6*q;if((K=K||new Uint16Array(z)).length!==z)throw new Error(`Out buffer length is incorrect, got ${K.length} and expected ${z}`);for(let Y=0,Q=0;Y>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,(q|=q>>>16)+1}function $e(q){return!(q&q-1||!q)}function He(q){let K=(q>65535?1:0)<<4,z=((q>>>=K)>255?1:0)<<3;return K|=z,z=((q>>>=z)>15?1:0)<<2,K|=z,z=((q>>>=z)>3?1:0)<<1,K|=z,K|(q>>>=z)>>1}function Ve(q,K,z){const Y=q.length;let Q;if(K>=Y||0===z)return;const X=Y-(z=K+z>Y?Y-K:z);for(Q=K;Q(q.Renderer="renderer",q.Application="application",q.RendererSystem="renderer-webgl-system",q.RendererPlugin="renderer-webgl-plugin",q.CanvasRendererSystem="renderer-canvas-system",q.CanvasRendererPlugin="renderer-canvas-plugin",q.Asset="asset",q.LoadParser="load-parser",q.ResolveParser="resolve-parser",q.CacheParser="cache-parser",q.DetectionParser="detection-parser",q))(ci||{});const di=q=>{if("function"==typeof q||"object"==typeof q&&q.extension){if(!q.extension)throw new Error("Extension class must have an extension object");q={..."object"!=typeof q.extension?{type:q.extension}:q.extension,ref:q}}if("object"!=typeof q)throw new Error("Invalid extension type");return"string"==typeof(q={...q}).type&&(q.type=[q.type]),q},li=(q,K)=>di(q).priority??K,ui={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...q){return q.map(di).forEach((q=>{q.type.forEach((K=>this._removeHandlers[K]?.(q)))})),this},add(...q){return q.map(di).forEach((q=>{q.type.forEach((K=>{const z=this._addHandlers,Y=this._queue;z[K]?z[K]?.(q):(Y[K]=Y[K]||[],Y[K]?.push(q))}))})),this},handle(q,K,z){const Y=this._addHandlers,Q=this._removeHandlers;if(Y[q]||Q[q])throw new Error(`Extension type ${q} already has a handler`);Y[q]=K,Q[q]=z;const X=this._queue;return X[q]&&(X[q]?.forEach((q=>K(q))),delete X[q]),this},handleByMap(q,K){return this.handle(q,(q=>{q.name&&(K[q.name]=q.ref)}),(q=>{q.name&&delete K[q.name]}))},handleByList(q,K,z=-1){return this.handle(q,(q=>{K.includes(q.ref)||(K.push(q.ref),K.sort(((q,K)=>li(K,z)-li(q,z))))}),(q=>{const z=K.indexOf(q.ref);-1!==z&&K.splice(z,1)}))}};class fi{constructor(q){"number"==typeof q?this.rawBinaryData=new ArrayBuffer(q):q instanceof Uint8Array?this.rawBinaryData=q.buffer:this.rawBinaryData=q,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(q){return this[`${q}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(q){switch(q){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${q} isn't a valid view type`)}}}const bi=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function pi(q){let K="";for(let z=0;z0&&(K+="\nelse "),z=0;--Y){const Q=gi[Y];if(Q.test&&Q.test(q,z))return new Q(q,K)}throw new Error("Unrecognized source type to auto-detect Resource")}class yi{constructor(q){this.items=[],this._name=q,this._aliasCount=0}emit(q,K,z,Y,Q,X,Z,J){if(arguments.length>8)throw new Error("max arguments reached");const{name:tt,items:et}=this;this._aliasCount++;for(let it=0,st=et.length;it0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(q){return q[this._name]&&(this.ensureNonAliasedItems(),this.remove(q),this.items.push(q)),this}remove(q){const K=this.items.indexOf(q);return-1!==K&&(this.ensureNonAliasedItems(),this.items.splice(K,1)),this}contains(q){return this.items.includes(q)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return 0===this.items.length}get name(){return this._name}}Object.defineProperties(yi.prototype,{dispatch:{value:yi.prototype.emit},run:{value:yi.prototype.emit}});class _i{constructor(q=0,K=0){this._width=q,this._height=K,this.destroyed=!1,this.internal=!1,this.onResize=new yi("setRealSize"),this.onUpdate=new yi("update"),this.onError=new yi("onError")}bind(q){this.onResize.add(q),this.onUpdate.add(q),this.onError.add(q),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(q){this.onResize.remove(q),this.onUpdate.remove(q),this.onError.remove(q)}resize(q,K){(q!==this._width||K!==this._height)&&(this._width=q,this._height=K,this.onResize.emit(q,K))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(q,K,z){return!1}dispose(){}destroy(){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)}static test(q,K){return!1}}class Ei extends _i{constructor(q,K){const{width:z,height:Y}=K||{};if(!z||!Y)throw new Error("BufferResource width or height invalid");super(z,Y),this.data=q,this.unpackAlignment=K.unpackAlignment??4}upload(q,K,z){const Y=q.gl;Y.pixelStorei(Y.UNPACK_ALIGNMENT,this.unpackAlignment),Y.pixelStorei(Y.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.alphaMode===ht.UNPACK);const Q=K.realWidth,X=K.realHeight;return z.width===Q&&z.height===X?Y.texSubImage2D(K.target,0,0,0,Q,X,K.format,z.type,this.data):(z.width=Q,z.height=X,Y.texImage2D(K.target,0,z.internalFormat,Q,X,0,K.format,z.type,this.data)),!0}dispose(){this.data=null}static test(q){return null===q||q instanceof Int8Array||q instanceof Uint8Array||q instanceof Uint8ClampedArray||q instanceof Int16Array||q instanceof Uint16Array||q instanceof Int32Array||q instanceof Uint32Array||q instanceof Float32Array}}const wi={scaleMode:at.NEAREST,alphaMode:ht.NPM},Ti=class q extends(Lt()){constructor(K=null,z=null){super(),z=Object.assign({},q.defaultOptions,z);const{alphaMode:Y,mipmap:Q,anisotropicLevel:X,scaleMode:Z,width:J,height:tt,wrapMode:et,format:it,type:st,target:nt,resolution:at,resourceOptions:rt}=z;K&&!(K instanceof _i)&&((K=mi(K,rt)).internal=!0),this.resolution=at||pt.RESOLUTION,this.width=Math.round((J||0)*this.resolution)/this.resolution,this.height=Math.round((tt||0)*this.resolution)/this.resolution,this._mipmap=Q,this.anisotropicLevel=X,this._wrapMode=et,this._scaleMode=Z,this.format=it,this.type=st,this.target=nt,this.alphaMode=Y,this.uid=Ke(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=J>0&&tt>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(K)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(q){this._mipmap!==q&&(this._mipmap=q,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(q){this._scaleMode!==q&&(this._scaleMode=q,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(q){this._wrapMode!==q&&(this._wrapMode=q,this.dirtyStyleId++)}setStyle(q,K){let z;return void 0!==q&&q!==this.scaleMode&&(this.scaleMode=q,z=!0),void 0!==K&&K!==this.mipmap&&(this.mipmap=K,z=!0),z&&this.dirtyStyleId++,this}setSize(q,K,z){return z=z||this.resolution,this.setRealSize(q*z,K*z,z)}setRealSize(q,K,z){return this.resolution=z||this.resolution,this.width=Math.round(q)/this.resolution,this.height=Math.round(K)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=$e(this.realWidth)&&$e(this.realHeight)}setResolution(q){const K=this.resolution;return K===q||(this.resolution=q,this.valid&&(this.width=Math.round(this.width*K)/q,this.height=Math.round(this.height*K)/q,this.emit("update",this)),this._refreshPOT()),this}setResource(q){if(this.resource===q)return this;if(this.resource)throw new Error("Resource can be set only once");return q.bind(this),this.resource=q,this}update(){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))}onError(q){this.emit("error",this,q)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Ze[this.cacheId],delete Xe[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),q.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(K,z,Y=pt.STRICT_TEXTURE_CACHE){const Q="string"==typeof K;let X=null;if(Q)X=K;else{if(!K._pixiId){const q=z?.pixiIdPrefix||"pixiid";K._pixiId=`${q}_${Ke()}`}X=K._pixiId}let Z=Ze[X];if(Q&&Y&&!Z)throw new Error(`The cacheId "${X}" does not exist in BaseTextureCache.`);return Z||(Z=new q(K,z),Z.cacheId=X,q.addToCache(Z,X)),Z}static fromBuffer(K,z,Y,Q){K=K||new Float32Array(z*Y*4);const X=new Ei(K,{width:z,height:Y,...Q?.resourceOptions});let Z,J;return K instanceof Float32Array?(Z=et.RGBA,J=st.FLOAT):K instanceof Int32Array?(Z=et.RGBA_INTEGER,J=st.INT):K instanceof Uint32Array?(Z=et.RGBA_INTEGER,J=st.UNSIGNED_INT):K instanceof Int16Array?(Z=et.RGBA_INTEGER,J=st.SHORT):K instanceof Uint16Array?(Z=et.RGBA_INTEGER,J=st.UNSIGNED_SHORT):K instanceof Int8Array?(Z=et.RGBA,J=st.BYTE):(Z=et.RGBA,J=st.UNSIGNED_BYTE),X.internal=!0,new q(X,Object.assign({},wi,{type:J,format:Z},Q))}static addToCache(q,K){K&&(q.textureCacheIds.includes(K)||q.textureCacheIds.push(K),Ze[K]&&Ze[K]!==q&&console.warn(`BaseTexture added to the cache with an id [${K}] that already had an entry`),Ze[K]=q)}static removeFromCache(q){if("string"==typeof q){const K=Ze[q];if(K){const z=K.textureCacheIds.indexOf(q);return z>-1&&K.textureCacheIds.splice(z,1),delete Ze[q],K}}else if(q?.textureCacheIds){for(let K=0;K1){for(let q=0;q(q[q.POLY=0]="POLY",q[q.RECT=1]="RECT",q[q.CIRC=2]="CIRC",q[q.ELIP=3]="ELIP",q[q.RREC=4]="RREC",q))(Ui||{});class Fi{constructor(q=0,K=0){this.x=0,this.y=0,this.x=q,this.y=K}clone(){return new Fi(this.x,this.y)}copyFrom(q){return this.set(q.x,q.y),this}copyTo(q){return q.set(this.x,this.y),q}equals(q){return q.x===this.x&&q.y===this.y}set(q=0,K=q){return this.x=q,this.y=K,this}}Fi.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const Gi=[new Fi,new Fi,new Fi,new Fi];class ji{constructor(q=0,K=0,z=0,Y=0){this.x=Number(q),this.y=Number(K),this.width=Number(z),this.height=Number(Y),this.type=Ui.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new ji(0,0,0,0)}clone(){return new ji(this.x,this.y,this.width,this.height)}copyFrom(q){return this.x=q.x,this.y=q.y,this.width=q.width,this.height=q.height,this}copyTo(q){return q.x=this.x,q.y=this.y,q.width=this.width,q.height=this.height,q}contains(q,K){return!(this.width<=0||this.height<=0)&&(q>=this.x&&q=this.y&&Kq.right?q.right:this.right)<=K)return!1;const z=this.yq.bottom?q.bottom:this.bottom)>z}const z=this.left,Y=this.right,Q=this.top,X=this.bottom;if(Y<=z||X<=Q)return!1;const Z=Gi[0].set(q.left,q.top),J=Gi[1].set(q.left,q.bottom),tt=Gi[2].set(q.right,q.top),et=Gi[3].set(q.right,q.bottom);if(tt.x<=Z.x||J.y<=Z.y)return!1;const it=Math.sign(K.a*K.d-K.b*K.c);if(0===it||(K.apply(Z,Z),K.apply(J,J),K.apply(tt,tt),K.apply(et,et),Math.max(Z.x,J.x,tt.x,et.x)<=z||Math.min(Z.x,J.x,tt.x,et.x)>=Y||Math.max(Z.y,J.y,tt.y,et.y)<=Q||Math.min(Z.y,J.y,tt.y,et.y)>=X))return!1;const st=it*(J.y-Z.y),nt=it*(Z.x-J.x),at=st*z+nt*Q,rt=st*Y+nt*Q,ot=st*z+nt*X,ht=st*Y+nt*X;if(Math.max(at,rt,ot,ht)<=st*Z.x+nt*Z.y||Math.min(at,rt,ot,ht)>=st*et.x+nt*et.y)return!1;const ct=it*(Z.y-tt.y),dt=it*(tt.x-Z.x),lt=ct*z+dt*Q,ut=ct*Y+dt*Q,ft=ct*z+dt*X,bt=ct*Y+dt*X;return!(Math.max(lt,ut,ft,bt)<=ct*Z.x+dt*Z.y||Math.min(lt,ut,ft,bt)>=ct*et.x+dt*et.y)}pad(q=0,K=q){return this.x-=q,this.y-=K,this.width+=2*q,this.height+=2*K,this}fit(q){const K=Math.max(this.x,q.x),z=Math.min(this.x+this.width,q.x+q.width),Y=Math.max(this.y,q.y),Q=Math.min(this.y+this.height,q.y+q.height);return this.x=K,this.width=Math.max(z-K,0),this.y=Y,this.height=Math.max(Q-Y,0),this}ceil(q=1,K=.001){const z=Math.ceil((this.x+this.width-K)*q)/q,Y=Math.ceil((this.y+this.height-K)*q)/q;return this.x=Math.floor((this.x+K)*q)/q,this.y=Math.floor((this.y+K)*q)/q,this.width=z-this.x,this.height=Y-this.y,this}enlarge(q){const K=Math.min(this.x,q.x),z=Math.max(this.x+this.width,q.x+q.width),Y=Math.min(this.y,q.y),Q=Math.max(this.y+this.height,q.y+q.height);return this.x=K,this.width=z-K,this.y=Y,this.height=Q-Y,this}}ji.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class $i{constructor(q=0,K=0,z=0){this.x=q,this.y=K,this.radius=z,this.type=Ui.CIRC}clone(){return new $i(this.x,this.y,this.radius)}contains(q,K){if(this.radius<=0)return!1;const z=this.radius*this.radius;let Y=this.x-q,Q=this.y-K;return Y*=Y,Q*=Q,Y+Q<=z}getBounds(){return new ji(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)}}$i.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class Hi{constructor(q=0,K=0,z=0,Y=0){this.x=q,this.y=K,this.width=z,this.height=Y,this.type=Ui.ELIP}clone(){return new Hi(this.x,this.y,this.width,this.height)}contains(q,K){if(this.width<=0||this.height<=0)return!1;let z=(q-this.x)/this.width,Y=(K-this.y)/this.height;return z*=z,Y*=Y,z+Y<=1}getBounds(){return new ji(this.x-this.width,this.y-this.height,this.width,this.height)}}Hi.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Vi{constructor(...q){let K=Array.isArray(q[0])?q[0]:q;if("number"!=typeof K[0]){const q=[];for(let z=0,Y=K.length;zK!=tt>K&&q<(K-Z)/(tt-Z)*(J-Y)+Y&&(z=!z)}return z}}Vi.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce(((q,K)=>`${q}, ${K}`),"")}]`};class Wi{constructor(q=0,K=0,z=0,Y=0,Q=20){this.x=q,this.y=K,this.width=z,this.height=Y,this.radius=Q,this.type=Ui.RREC}clone(){return new Wi(this.x,this.y,this.width,this.height,this.radius)}contains(q,K){if(this.width<=0||this.height<=0)return!1;if(q>=this.x&&q<=this.x+this.width&&K>=this.y&&K<=this.y+this.height){const z=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(K>=this.y+z&&K<=this.y+this.height-z||q>=this.x+z&&q<=this.x+this.width-z)return!0;let Y=q-(this.x+z),Q=K-(this.y+z);const X=z*z;if(Y*Y+Q*Q<=X||(Y=q-(this.x+this.width-z),Y*Y+Q*Q<=X)||(Q=K-(this.y+this.height-z),Y*Y+Q*Q<=X)||(Y=q-(this.x+z),Y*Y+Q*Q<=X))return!0}return!1}}Wi.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class qi{constructor(q=1,K=0,z=0,Y=1,Q=0,X=0){this.array=null,this.a=q,this.b=K,this.c=z,this.d=Y,this.tx=Q,this.ty=X}fromArray(q){this.a=q[0],this.b=q[1],this.c=q[3],this.d=q[4],this.tx=q[2],this.ty=q[5]}set(q,K,z,Y,Q,X){return this.a=q,this.b=K,this.c=z,this.d=Y,this.tx=Q,this.ty=X,this}toArray(q,K){this.array||(this.array=new Float32Array(9));const z=K||this.array;return q?(z[0]=this.a,z[1]=this.b,z[2]=0,z[3]=this.c,z[4]=this.d,z[5]=0,z[6]=this.tx,z[7]=this.ty,z[8]=1):(z[0]=this.a,z[1]=this.c,z[2]=this.tx,z[3]=this.b,z[4]=this.d,z[5]=this.ty,z[6]=0,z[7]=0,z[8]=1),z}apply(q,K){K=K||new Fi;const z=q.x,Y=q.y;return K.x=this.a*z+this.c*Y+this.tx,K.y=this.b*z+this.d*Y+this.ty,K}applyInverse(q,K){K=K||new Fi;const z=1/(this.a*this.d+this.c*-this.b),Y=q.x,Q=q.y;return K.x=this.d*z*Y+-this.c*z*Q+(this.ty*this.c-this.tx*this.d)*z,K.y=this.a*z*Q+-this.b*z*Y+(-this.ty*this.a+this.tx*this.b)*z,K}translate(q,K){return this.tx+=q,this.ty+=K,this}scale(q,K){return this.a*=q,this.d*=K,this.c*=q,this.b*=K,this.tx*=q,this.ty*=K,this}rotate(q){const K=Math.cos(q),z=Math.sin(q),Y=this.a,Q=this.c,X=this.tx;return this.a=Y*K-this.b*z,this.b=Y*z+this.b*K,this.c=Q*K-this.d*z,this.d=Q*z+this.d*K,this.tx=X*K-this.ty*z,this.ty=X*z+this.ty*K,this}append(q){const K=this.a,z=this.b,Y=this.c,Q=this.d;return this.a=q.a*K+q.b*Y,this.b=q.a*z+q.b*Q,this.c=q.c*K+q.d*Y,this.d=q.c*z+q.d*Q,this.tx=q.tx*K+q.ty*Y+this.tx,this.ty=q.tx*z+q.ty*Q+this.ty,this}setTransform(q,K,z,Y,Q,X,Z,J,tt){return this.a=Math.cos(Z+tt)*Q,this.b=Math.sin(Z+tt)*Q,this.c=-Math.sin(Z-J)*X,this.d=Math.cos(Z-J)*X,this.tx=q-(z*this.a+Y*this.c),this.ty=K-(z*this.b+Y*this.d),this}prepend(q){const K=this.tx;if(1!==q.a||0!==q.b||0!==q.c||1!==q.d){const K=this.a,z=this.c;this.a=K*q.a+this.b*q.c,this.b=K*q.b+this.b*q.d,this.c=z*q.a+this.d*q.c,this.d=z*q.b+this.d*q.d}return this.tx=K*q.a+this.ty*q.c+q.tx,this.ty=K*q.b+this.ty*q.d+q.ty,this}decompose(q){const K=this.a,z=this.b,Y=this.c,Q=this.d,X=q.pivot,Z=-Math.atan2(-Y,Q),J=Math.atan2(z,K),tt=Math.abs(Z+J);return tt<1e-5||Math.abs(Li-tt)<1e-5?(q.rotation=J,q.skew.x=q.skew.y=0):(q.rotation=0,q.skew.x=Z,q.skew.y=J),q.scale.x=Math.sqrt(K*K+z*z),q.scale.y=Math.sqrt(Y*Y+Q*Q),q.position.x=this.tx+(X.x*K+X.y*Y),q.position.y=this.ty+(X.x*z+X.y*Q),q}invert(){const q=this.a,K=this.b,z=this.c,Y=this.d,Q=this.tx,X=q*Y-K*z;return this.a=Y/X,this.b=-K/X,this.c=-z/X,this.d=q/X,this.tx=(z*this.ty-Y*Q)/X,this.ty=-(q*this.ty-K*Q)/X,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const q=new qi;return q.a=this.a,q.b=this.b,q.c=this.c,q.d=this.d,q.tx=this.tx,q.ty=this.ty,q}copyTo(q){return q.a=this.a,q.b=this.b,q.c=this.c,q.d=this.d,q.tx=this.tx,q.ty=this.ty,q}copyFrom(q){return this.a=q.a,this.b=q.b,this.c=q.c,this.d=q.d,this.tx=q.tx,this.ty=q.ty,this}static get IDENTITY(){return new qi}static get TEMP_MATRIX(){return new qi}}qi.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const Ki=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],zi=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Yi=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Qi=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Xi=[],Zi=[],Ji=Math.sign;!function(){for(let q=0;q<16;q++){const K=[];Xi.push(K);for(let z=0;z<16;z++){const Y=Ji(Ki[q]*Ki[z]+Yi[q]*zi[z]),Q=Ji(zi[q]*Ki[z]+Qi[q]*zi[z]),X=Ji(Ki[q]*Yi[z]+Yi[q]*Qi[z]),Z=Ji(zi[q]*Yi[z]+Qi[q]*Qi[z]);for(let q=0;q<16;q++)if(Ki[q]===Y&&zi[q]===Q&&Yi[q]===X&&Qi[q]===Z){K.push(q);break}}}for(let q=0;q<16;q++){const K=new qi;K.set(Ki[q],zi[q],Yi[q],Qi[q],0,0),Zi.push(K)}}();const ts={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:q=>Ki[q],uY:q=>zi[q],vX:q=>Yi[q],vY:q=>Qi[q],inv:q=>8&q?15&q:7&-q,add:(q,K)=>Xi[q][K],sub:(q,K)=>Xi[q][ts.inv(K)],rotate180:q=>4^q,isVertical:q=>2==(3&q),byDirection:(q,K)=>2*Math.abs(q)<=Math.abs(K)?K>=0?ts.S:ts.N:2*Math.abs(K)<=Math.abs(q)?q>0?ts.E:ts.W:K>0?q>0?ts.SE:ts.SW:q>0?ts.NE:ts.NW,matrixAppendRotationInv:(q,K,z=0,Y=0)=>{const Q=Zi[ts.inv(K)];Q.tx=z,Q.ty=Y,q.append(Q)}};class es{constructor(q,K,z=0,Y=0){this._x=z,this._y=Y,this.cb=q,this.scope=K}clone(q=this.cb,K=this.scope){return new es(q,K,this._x,this._y)}set(q=0,K=q){return(this._x!==q||this._y!==K)&&(this._x=q,this._y=K,this.cb.call(this.scope)),this}copyFrom(q){return(this._x!==q.x||this._y!==q.y)&&(this._x=q.x,this._y=q.y,this.cb.call(this.scope)),this}copyTo(q){return q.set(this._x,this._y),q}equals(q){return q.x===this._x&&q.y===this._y}get x(){return this._x}set x(q){this._x!==q&&(this._x=q,this.cb.call(this.scope))}get y(){return this._y}set y(q){this._y!==q&&(this._y=q,this.cb.call(this.scope))}}es.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const is=class{constructor(){this.worldTransform=new qi,this.localTransform=new qi,this.position=new es(this.onChange,this,0,0),this.scale=new es(this.onChange,this,1,1),this.pivot=new es(this.onChange,this,0,0),this.skew=new es(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}onChange(){this._localID++}updateSkew(){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++}updateLocalTransform(){const q=this.localTransform;this._localID!==this._currentLocalID&&(q.a=this._cx*this.scale.x,q.b=this._sx*this.scale.x,q.c=this._cy*this.scale.y,q.d=this._sy*this.scale.y,q.tx=this.position.x-(this.pivot.x*q.a+this.pivot.y*q.c),q.ty=this.position.y-(this.pivot.x*q.b+this.pivot.y*q.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(q){const K=this.localTransform;if(this._localID!==this._currentLocalID&&(K.a=this._cx*this.scale.x,K.b=this._sx*this.scale.x,K.c=this._cy*this.scale.y,K.d=this._sy*this.scale.y,K.tx=this.position.x-(this.pivot.x*K.a+this.pivot.y*K.c),K.ty=this.position.y-(this.pivot.x*K.b+this.pivot.y*K.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==q._worldID){const z=q.worldTransform,Y=this.worldTransform;Y.a=K.a*z.a+K.b*z.c,Y.b=K.a*z.b+K.b*z.d,Y.c=K.c*z.a+K.d*z.c,Y.d=K.c*z.b+K.d*z.d,Y.tx=K.tx*z.a+K.ty*z.c+z.tx,Y.ty=K.tx*z.b+K.ty*z.d+z.ty,this._parentID=q._worldID,this._worldID++}}setFromMatrix(q){q.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(q){this._rotation!==q&&(this._rotation=q,this.updateSkew())}};is.IDENTITY=new is;let ss=is;ss.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};const ns=[{test:q=>"float"===q.type&&1===q.size&&!q.isArray,code:q=>`\n if(uv["${q}"] !== ud["${q}"].value)\n {\n ud["${q}"].value = uv["${q}"]\n gl.uniform1f(ud["${q}"].location, uv["${q}"])\n }\n `},{test:(q,K)=>!("sampler2D"!==q.type&&"samplerCube"!==q.type&&"sampler2DArray"!==q.type||1!==q.size||q.isArray||null!=K&&void 0===K.castToBaseTexture),code:q=>`t = syncData.textureCount++;\n\n renderer.texture.bind(uv["${q}"], t);\n\n if(ud["${q}"].value !== t)\n {\n ud["${q}"].value = t;\n gl.uniform1i(ud["${q}"].location, t);\n; // eslint-disable-line max-len\n }`},{test:(q,K)=>"mat3"===q.type&&1===q.size&&!q.isArray&&void 0!==K.a,code:q=>`\n gl.uniformMatrix3fv(ud["${q}"].location, false, uv["${q}"].toArray(true));\n `,codeUbo:q=>`\n var ${q}_matrix = uv.${q}.toArray(true);\n\n data[offset] = ${q}_matrix[0];\n data[offset+1] = ${q}_matrix[1];\n data[offset+2] = ${q}_matrix[2];\n \n data[offset + 4] = ${q}_matrix[3];\n data[offset + 5] = ${q}_matrix[4];\n data[offset + 6] = ${q}_matrix[5];\n \n data[offset + 8] = ${q}_matrix[6];\n data[offset + 9] = ${q}_matrix[7];\n data[offset + 10] = ${q}_matrix[8];\n `},{test:(q,K)=>"vec2"===q.type&&1===q.size&&!q.isArray&&void 0!==K.x,code:q=>`\n cv = ud["${q}"].value;\n v = uv["${q}"];\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["${q}"].location, v.x, v.y);\n }`,codeUbo:q=>`\n v = uv.${q};\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n `},{test:q=>"vec2"===q.type&&1===q.size&&!q.isArray,code:q=>`\n cv = ud["${q}"].value;\n v = uv["${q}"];\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["${q}"].location, v[0], v[1]);\n }\n `},{test:(q,K)=>"vec4"===q.type&&1===q.size&&!q.isArray&&void 0!==K.width,code:q=>`\n cv = ud["${q}"].value;\n v = uv["${q}"];\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["${q}"].location, v.x, v.y, v.width, v.height)\n }`,codeUbo:q=>`\n v = uv.${q};\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n data[offset+2] = v.width;\n data[offset+3] = v.height;\n `},{test:(q,K)=>"vec4"===q.type&&1===q.size&&!q.isArray&&void 0!==K.red,code:q=>`\n cv = ud["${q}"].value;\n v = uv["${q}"];\n\n if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)\n {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n cv[3] = v.alpha;\n gl.uniform4f(ud["${q}"].location, v.red, v.green, v.blue, v.alpha)\n }`,codeUbo:q=>`\n v = uv.${q};\n\n data[offset] = v.red;\n data[offset+1] = v.green;\n data[offset+2] = v.blue;\n data[offset+3] = v.alpha;\n `},{test:(q,K)=>"vec3"===q.type&&1===q.size&&!q.isArray&&void 0!==K.red,code:q=>`\n cv = ud["${q}"].value;\n v = uv["${q}"];\n\n if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)\n {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n \n gl.uniform3f(ud["${q}"].location, v.red, v.green, v.blue)\n }`,codeUbo:q=>`\n v = uv.${q};\n\n data[offset] = v.red;\n data[offset+1] = v.green;\n data[offset+2] = v.blue;\n `},{test:q=>"vec4"===q.type&&1===q.size&&!q.isArray,code:q=>`\n cv = ud["${q}"].value;\n v = uv["${q}"];\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["${q}"].location, v[0], v[1], v[2], v[3])\n }`}],as={float:"\n if (cv !== v)\n {\n cu.value = 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\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:"\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(location, v[0], v[1], v[2], v[3]);\n }",int:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",ivec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",ivec3:"\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.uniform3i(location, v[0], v[1], v[2]);\n }",ivec4:"\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.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",uint:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1ui(location, v);\n }",uvec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2ui(location, v[0], v[1]);\n }",uvec3:"\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.uniform3ui(location, v[0], v[1], v[2]);\n }",uvec4:"\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.uniform4ui(location, v[0], v[1], v[2], v[3]);\n }",bool:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1i(location, v);\n }",bvec2:"\n if (cv[0] != v[0] || cv[1] != v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",bvec3:"\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.uniform3i(location, v[0], v[1], v[2]);\n }",bvec4:"\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.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",samplerCube:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",sampler2DArray:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }"},rs={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)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(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)"};const os={};let hs,cs=os;function ds(){if(!hs){hs=lt.MEDIUM;const q=function(){if(cs===os||cs?.isContextLost()){const q=pt.ADAPTER.createCanvas();let K;pt.PREFER_ENV>=Q.WEBGL2&&(K=q.getContext("webgl2",{})),K||(K=q.getContext("webgl",{})||q.getContext("experimental-webgl",{}),K?K.getExtension("WEBGL_draw_buffers"):K=null),cs=K}return cs}();if(q&&q.getShaderPrecisionFormat){const K=q.getShaderPrecisionFormat(q.FRAGMENT_SHADER,q.HIGH_FLOAT);K&&(hs=K.precision?lt.HIGH:lt.MEDIUM)}}return hs}const ls={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function us(q){return ls[q]}let fs=null;const bs={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",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 ps(q,K){if(!fs){const K=Object.keys(bs);fs={};for(let z=0;z0&&(K+="\nelse "),zthis.size&&this.flush(),this._vertexCount+=q.vertexData.length/2,this._indexCount+=q.indices.length,this._bufferedTextures[this._bufferSize]=q._texture.baseTexture,this._bufferedElements[this._bufferSize++]=q)}buildTexturesAndDrawCalls(){const{_bufferedTextures:K,maxTextures:z}=this,Y=q._textureArrayPool,Q=this.renderer.batch,X=this._tempBoundTextures,Z=this.renderer.textureGC.count;let J=++Si._globalBatch,tt=0,et=Y[0],it=0;Q.copyBoundTextures(X,z);for(let q=0;q=z&&(Q.boundArray(et,X,J,z),this.buildDrawCalls(et,it,q),it=q,et=Y[++tt],++J),st._batchEnabled=J,st.touched=Z,et.elements[et.count++]=st)}et.count>0&&(Q.boundArray(et,X,J,z),this.buildDrawCalls(et,it,this._bufferSize),++tt,++J);for(let q=0;q0);for(let rt=0;rt=0;--Y)q[Y]=z[Y]||null,q[Y]&&(q[Y]._batchLocation=Y)}boundArray(q,K,z,Y){const{elements:Q,ids:X,count:Z}=q;let J=0;for(let tt=0;tt=0&&Z=Q.WEBGL2&&(z=q.getContext("webgl2",K)),z)this.webGLVersion=2;else if(this.webGLVersion=1,z=q.getContext("webgl",K)||q.getContext("experimental-webgl",K),!z)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=z,this.getExtensions(),this.gl}getExtensions(){const{gl:q}=this,K={loseContext:q.getExtension("WEBGL_lose_context"),anisotropicFiltering:q.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:q.getExtension("OES_texture_float_linear"),s3tc:q.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:q.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:q.getExtension("WEBGL_compressed_texture_etc"),etc1:q.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:q.getExtension("WEBGL_compressed_texture_pvrtc")||q.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:q.getExtension("WEBGL_compressed_texture_atc"),astc:q.getExtension("WEBGL_compressed_texture_astc"),bptc:q.getExtension("EXT_texture_compression_bptc")};1===this.webGLVersion?Object.assign(this.extensions,K,{drawBuffers:q.getExtension("WEBGL_draw_buffers"),depthTexture:q.getExtension("WEBGL_depth_texture"),vertexArrayObject:q.getExtension("OES_vertex_array_object")||q.getExtension("MOZ_OES_vertex_array_object")||q.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:q.getExtension("OES_element_index_uint"),floatTexture:q.getExtension("OES_texture_float"),floatTextureLinear:q.getExtension("OES_texture_float_linear"),textureHalfFloat:q.getExtension("OES_texture_half_float"),textureHalfFloatLinear:q.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,K,{colorBufferFloat:q.getExtension("EXT_color_buffer_float")})}handleContextLost(q){q.preventDefault(),setTimeout((()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()}),0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const q=this.renderer.view;this.renderer=null,void 0!==q.removeEventListener&&(q.removeEventListener("webglcontextlost",this.handleContextLost),q.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(q){const K=q.getContextAttributes(),z="WebGL2RenderingContext"in globalThis&&q instanceof globalThis.WebGL2RenderingContext;z&&(this.webGLVersion=2),K&&!K.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const Y=z||!!q.getExtension("OES_element_index_uint");this.supports.uint32Indices=Y,Y||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}xs.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},xs.extension={type:ci.RendererSystem,name:"context"},ui.add(xs);class Ls{constructor(q,K){if(this.width=Math.round(q),this.height=Math.round(K),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");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 yi("disposeFramebuffer"),this.multisample=ft.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(q=0,K){return this.colorTextures[q]=K||new Si(null,{scaleMode:at.NEAREST,resolution:1,mipmap:ot.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(q){return this.depthTexture=q||new Si(null,{scaleMode:at.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:ot.OFF,format:et.DEPTH_COMPONENT,type:st.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(q,K){if(q=Math.round(q),K=Math.round(K),!q||!K)throw new Error("Framebuffer width and height must not be zero");if(q!==this.width||K!==this.height){this.width=q,this.height=K,this.dirtyId++,this.dirtySize++;for(let z=0;z{const z=this.source;this.url=z.src;const Y=()=>{this.destroyed||(z.onload=null,z.onerror=null,this.update(),this._load=null,this.createBitmap?q(this.process()):q(this))};z.complete&&z.src?Y():(z.onload=Y,z.onerror=q=>{K(q),this.onError.emit(q)})}))),this._load}process(){const q=this.source;if(null!==this._process)return this._process;if(null!==this.bitmap||!globalThis.createImageBitmap)return Promise.resolve(this);const K=globalThis.createImageBitmap,z=!q.crossOrigin||"anonymous"===q.crossOrigin;return this._process=fetch(q.src,{mode:z?"cors":"no-cors"}).then((q=>q.blob())).then((z=>K(z,0,0,q.width,q.height,{premultiplyAlpha:null===this.alphaMode||this.alphaMode===ht.UNPACK?"premultiply":"none"}))).then((q=>this.destroyed?Promise.reject():(this.bitmap=q,this.update(),this._process=null,Promise.resolve(this)))),this._process}upload(q,K,z){if("number"==typeof this.alphaMode&&(K.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(q,K,z);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(q,K,z,this.bitmap),!this.preserveBitmap){let q=!0;const Y=K._glTextures;for(const Q in Y){const X=Y[Q];if(X!==z&&X.dirtyId!==K.dirtyId){q=!1;break}}q&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(q){return typeof HTMLImageElement<"u"&&("string"==typeof q||q instanceof HTMLImageElement)}}class Fs{constructor(){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)}set(q,K,z){const Y=K.width,Q=K.height;if(z){const K=q.width/2/Y,X=q.height/2/Q,Z=q.x/Y+K,J=q.y/Q+X;z=ts.add(z,ts.NW),this.x0=Z+K*ts.uX(z),this.y0=J+X*ts.uY(z),z=ts.add(z,2),this.x1=Z+K*ts.uX(z),this.y1=J+X*ts.uY(z),z=ts.add(z,2),this.x2=Z+K*ts.uX(z),this.y2=J+X*ts.uY(z),z=ts.add(z,2),this.x3=Z+K*ts.uX(z),this.y3=J+X*ts.uY(z)}else this.x0=q.x/Y,this.y0=q.y/Q,this.x1=(q.x+q.width)/Y,this.y1=q.y/Q,this.x2=(q.x+q.width)/Y,this.y2=(q.y+q.height)/Q,this.x3=q.x/Y,this.y3=(q.y+q.height)/Q;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}}Fs.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const Gs=new Fs;function js(q){q.destroy=function(){},q.on=function(){},q.once=function(){},q.emit=function(){}}class $s extends(Lt()){constructor(q,K,z,Y,Q,X,Z){if(super(),this.noFrame=!1,K||(this.noFrame=!0,K=new ji(0,0,1,1)),q instanceof $s&&(q=q.baseTexture),this.baseTexture=q,this._frame=K,this.trim=Y,this.valid=!1,this.destroyed=!1,this._uvs=Gs,this.uvMatrix=null,this.orig=z||K,this._rotate=Number(Q||0),!0===Q)this._rotate=2;else if(this._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=X?new Fi(X.x,X.y):new Fi(0,0),this.defaultBorders=Z,this._updateID=0,this.textureCacheIds=[],q.valid?this.noFrame?q.valid&&this.onBaseTextureUpdated(q):this.frame=K:q.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&q.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(q){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=q.width,this._frame.height=q.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(q){if(this.baseTexture){if(q){const{resource:q}=this.baseTexture;q?.url&&Xe[q.url]&&$s.removeFromCache(q.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,$s.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){const q=this._frame.clone(),K=this._frame===this.orig?q:this.orig.clone(),z=new $s(this.baseTexture,!this.noFrame&&q,K,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(z._frame=q),z}updateUvs(){this._uvs===Gs&&(this._uvs=new Fs),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(q,K={},z=pt.STRICT_TEXTURE_CACHE){const Y="string"==typeof q;let Q=null;if(Y)Q=q;else if(q instanceof Si){if(!q.cacheId){const z=K?.pixiIdPrefix||"pixiid";q.cacheId=`${z}-${Ke()}`,Si.addToCache(q,q.cacheId)}Q=q.cacheId}else{if(!q._pixiId){const z=K?.pixiIdPrefix||"pixiid";q._pixiId=`${z}_${Ke()}`}Q=q._pixiId}let X=Xe[Q];if(Y&&z&&!X)throw new Error(`The cacheId "${Q}" does not exist in TextureCache.`);return X||q instanceof Si?!X&&q instanceof Si&&(X=new $s(q),$s.addToCache(X,Q)):(K.resolution||(K.resolution=hi(q)),X=new $s(new Si(q,K)),X.baseTexture.cacheId=Q,Si.addToCache(X.baseTexture,Q),$s.addToCache(X,Q)),X}static fromURL(q,K){const z=Object.assign({autoLoad:!1},K?.resourceOptions),Y=$s.from(q,Object.assign({resourceOptions:z},K),!1),Q=Y.baseTexture.resource;return Y.baseTexture.valid?Promise.resolve(Y):Q.load().then((()=>Promise.resolve(Y)))}static fromBuffer(q,K,z,Y){return new $s(Si.fromBuffer(q,K,z,Y))}static fromLoader(q,K,z,Y){const Q=new Si(q,Object.assign({scaleMode:Si.defaultOptions.scaleMode,resolution:hi(K)},Y)),{resource:X}=Q;X instanceof Us&&(X.url=K);const Z=new $s(Q);return z||(z=K),Si.addToCache(Z.baseTexture,z),$s.addToCache(Z,z),z!==K&&(Si.addToCache(Z.baseTexture,K),$s.addToCache(Z,K)),Z.baseTexture.valid?Promise.resolve(Z):new Promise((q=>{Z.baseTexture.once("loaded",(()=>q(Z)))}))}static addToCache(q,K){K&&(q.textureCacheIds.includes(K)||q.textureCacheIds.push(K),Xe[K]&&Xe[K]!==q&&console.warn(`Texture added to the cache with an id [${K}] that already had an entry`),Xe[K]=q)}static removeFromCache(q){if("string"==typeof q){const K=Xe[q];if(K){const z=K.textureCacheIds.indexOf(q);return z>-1&&K.textureCacheIds.splice(z,1),delete Xe[q],K}}else if(q?.textureCacheIds){for(let K=0;Kthis.baseTexture.width,Z=z+Q>this.baseTexture.height;if(X||Z){const q=X&&Z?"and":"or",J=`X: ${K} + ${Y} = ${K+Y} > ${this.baseTexture.width}`,tt=`Y: ${z} + ${Q} = ${z+Q} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${J} ${q} ${tt}`)}this.valid=Y&&Q&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=q),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(q){this._rotate=q,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return $s._EMPTY||($s._EMPTY=new $s(new Si),js($s._EMPTY),js($s._EMPTY.baseTexture)),$s._EMPTY}static get WHITE(){if(!$s._WHITE){const q=pt.ADAPTER.createCanvas(16,16),K=q.getContext("2d");q.width=16,q.height=16,K.fillStyle="white",K.fillRect(0,0,16,16),$s._WHITE=new $s(Si.from(q)),js($s._WHITE),js($s._WHITE.baseTexture)}return $s._WHITE}}class Hs extends $s{constructor(q,K){super(q,K),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(q){this.framebuffer.multisample=q}resize(q,K,z=!0){const Y=this.baseTexture.resolution,Q=Math.round(q*Y)/Y,X=Math.round(K*Y)/Y;this.valid=Q>0&&X>0,this._frame.width=this.orig.width=Q,this._frame.height=this.orig.height=X,z&&this.baseTexture.resize(Q,X),this.updateUvs()}setResolution(q){const{baseTexture:K}=this;K.resolution!==q&&(K.setResolution(q),this.resize(K.width,K.height,!1))}static create(q){return new Hs(new ks(q))}}class Vs{constructor(q){this.texturePool={},this.textureOptions=q||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(q,K,z=ft.NONE){const Y=new ks(Object.assign({width:q,height:K,resolution:1,multisample:z},this.textureOptions));return new Hs(Y)}getOptimalTexture(q,K,z=1,Y=ft.NONE){let Q;q=Math.max(Math.ceil(q*z-1e-6),1),K=Math.max(Math.ceil(K*z-1e-6),1),this.enableFullScreen&&q===this._pixelsWidth&&K===this._pixelsHeight?Q=Y>1?-Y:-1:(Q=((65535&(q=je(q)))<<16|65535&(K=je(K)))>>>0,Y>1&&(Q+=4294967296*Y)),this.texturePool[Q]||(this.texturePool[Q]=[]);let X=this.texturePool[Q].pop();return X||(X=this.createTexture(q,K,Y)),X.filterPoolKey=Q,X.setResolution(z),X}getFilterTexture(q,K,z){const Y=this.getOptimalTexture(q.width,q.height,K||q.resolution,z||ft.NONE);return Y.filterFrame=q.filterFrame,Y}returnTexture(q){const K=q.filterPoolKey;q.filterFrame=null,this.texturePool[K].push(q)}returnFilterTexture(q){this.returnTexture(q)}clear(q){if(q=!1!==q)for(const K in this.texturePool){const q=this.texturePool[K];if(q)for(let K=0;K0&&q.height>0;for(const q in this.texturePool){if(!(Number(q)<0))continue;const K=this.texturePool[q];if(K)for(let q=0;q1&&(Y=this.getOptimalFilterTexture(q.width,q.height,K.resolution),Y.filterFrame=q.filterFrame),z[Q].apply(this,q,Y,ct.CLEAR,K);const X=q;q=Y,Y=X}z[Q].apply(this,q,J.renderTexture,ct.BLEND,K),Q>1&&K.multisample>1&&this.returnFilterTexture(K.renderTexture),this.returnFilterTexture(q),this.returnFilterTexture(Y)}K.clear(),this.statePool.push(K)}bindAndClear(q,K=ct.CLEAR){const{renderTexture:z,state:Y}=this.renderer;if(q===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,q?.filterFrame){const K=this.tempRect;K.x=0,K.y=0,K.width=q.filterFrame.width,K.height=q.filterFrame.height,z.bind(q,q.filterFrame,K)}else q!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?z.bind(q):this.renderer.renderTexture.bind(q,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const Q=1&Y.stateId||this.forceClear;(K===ct.CLEAR||K===ct.BLIT&&Q)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(q,K,z,Y){const Q=this.renderer;Q.state.set(q.state),this.bindAndClear(z,Y),q.uniforms.uSampler=K,q.uniforms.filterGlobals=this.globalUniforms,Q.shader.bind(q),q.legacy=!!q.program.attributeData.aTextureCoord,q.legacy?(this.quadUv.map(K._frame,K.filterFrame),Q.geometry.bind(this.quadUv),Q.geometry.draw(tt.TRIANGLES)):(Q.geometry.bind(this.quad),Q.geometry.draw(tt.TRIANGLE_STRIP))}calculateSpriteMatrix(q,K){const{sourceFrame:z,destinationFrame:Y}=this.activeState,{orig:Q}=K._texture,X=q.set(Y.width,0,0,Y.height,z.x,z.y),Z=K.worldTransform.copyTo(qi.TEMP_MATRIX);return Z.invert(),X.prepend(Z),X.scale(1/Q.width,1/Q.height),X.translate(K.anchor.x,K.anchor.y),X}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(q,K,z=1,Y=ft.NONE){return this.texturePool.getOptimalTexture(q,K,z,Y)}getFilterTexture(q,K,z){if("number"==typeof q){const z=q;q=K,K=z}q=q||this.activeState.renderTexture;const Y=this.texturePool.getOptimalTexture(q.width,q.height,K||q.resolution,z||ft.NONE);return Y.filterFrame=q.filterFrame,Y}returnFilterTexture(q){this.texturePool.returnTexture(q)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(q,K){const z=zs[0],Y=zs[1],Q=zs[2],X=zs[3];z.set(K.left,K.top),Y.set(K.left,K.bottom),Q.set(K.right,K.top),X.set(K.right,K.bottom),q.apply(z,z),q.apply(Y,Y),q.apply(Q,Q),q.apply(X,X);const Z=Math.min(z.x,Y.x,Q.x,X.x),J=Math.min(z.y,Y.y,Q.y,X.y),tt=Math.max(z.x,Y.x,Q.x,X.x),et=Math.max(z.y,Y.y,Q.y,X.y);K.x=Z,K.y=J,K.width=tt-Z,K.height=et-J}roundFrame(q,K,z,Y,Q){if(!(q.width<=0||q.height<=0||z.width<=0||z.height<=0)){if(Q){const{a:q,b:K,c:z,d:Y}=Q;if((Math.abs(K)>1e-4||Math.abs(z)>1e-4)&&(Math.abs(q)>1e-4||Math.abs(Y)>1e-4))return}(Q=Q?Ys.copyFrom(Q):Ys.identity()).translate(-z.x,-z.y).scale(Y.width/z.width,Y.height/z.height).translate(Y.x,Y.y),this.transformAABB(Q,q),q.ceil(K),this.transformAABB(Q.invert(),q)}}}Qs.extension={type:ci.RendererSystem,name:"filter"},ui.add(Qs);class Xs{constructor(q){this.framebuffer=q,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ft.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Zs=new ji;class Js{constructor(q){this.renderer=q,this.managedFramebuffers=[],this.unknownFramebuffer=new Ls(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const q=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ji,this.hasMRT=!0,this.writeDepthTexture=!0,1===this.renderer.context.webGLVersion){let K=this.renderer.context.extensions.drawBuffers,z=this.renderer.context.extensions.depthTexture;pt.PREFER_ENV===Q.WEBGL_LEGACY&&(K=null,z=null),K?q.drawBuffers=q=>K.drawBuffersWEBGL(q):(this.hasMRT=!1,q.drawBuffers=()=>{}),z||(this.writeDepthTexture=!1)}else this.msaaSamples=q.getInternalformatParameter(q.RENDERBUFFER,q.RGBA8,q.SAMPLES)}bind(q,K,z=0){const{gl:Y}=this;if(q){const Q=q.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(q);this.current!==q&&(this.current=q,Y.bindFramebuffer(Y.FRAMEBUFFER,Q.framebuffer)),Q.mipLevel!==z&&(q.dirtyId++,q.dirtyFormat++,Q.mipLevel=z),Q.dirtyId!==q.dirtyId&&(Q.dirtyId=q.dirtyId,Q.dirtyFormat!==q.dirtyFormat?(Q.dirtyFormat=q.dirtyFormat,Q.dirtySize=q.dirtySize,this.updateFramebuffer(q,z)):Q.dirtySize!==q.dirtySize&&(Q.dirtySize=q.dirtySize,this.resizeFramebuffer(q)));for(let K=0;K>z,Y=K.height>>z,Q=q/K.width;this.setViewport(K.x*Q,K.y*Q,q,Y)}else{const K=q.width>>z,Y=q.height>>z;this.setViewport(0,0,K,Y)}}else this.current&&(this.current=null,Y.bindFramebuffer(Y.FRAMEBUFFER,null)),K?this.setViewport(K.x,K.y,K.width,K.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(q,K,z,Y){const Q=this.viewport;q=Math.round(q),K=Math.round(K),z=Math.round(z),Y=Math.round(Y),(Q.width!==z||Q.height!==Y||Q.x!==q||Q.y!==K)&&(Q.x=q,Q.y=K,Q.width=z,Q.height=Y,this.gl.viewport(q,K,z,Y))}get size(){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}}clear(q,K,z,Y,Q=Z.COLOR|Z.DEPTH){const{gl:X}=this;X.clearColor(q,K,z,Y),X.clear(Q)}initFramebuffer(q){const{gl:K}=this,z=new Xs(K.createFramebuffer());return z.multisample=this.detectSamples(q.multisample),q.glFramebuffers[this.CONTEXT_UID]=z,this.managedFramebuffers.push(q),q.disposeRunner.add(this),z}resizeFramebuffer(q){const{gl:K}=this,z=q.glFramebuffers[this.CONTEXT_UID];if(z.stencil){let Y;K.bindRenderbuffer(K.RENDERBUFFER,z.stencil),Y=1===this.renderer.context.webGLVersion?K.DEPTH_STENCIL:q.depth&&q.stencil?K.DEPTH24_STENCIL8:q.depth?K.DEPTH_COMPONENT24:K.STENCIL_INDEX8,z.msaaBuffer?K.renderbufferStorageMultisample(K.RENDERBUFFER,z.multisample,Y,q.width,q.height):K.renderbufferStorage(K.RENDERBUFFER,Y,q.width,q.height)}const Y=q.colorTextures;let Q=Y.length;K.drawBuffers||(Q=Math.min(Q,1));for(let X=0;X1&&this.canMultisampleFramebuffer(q)?Y.msaaBuffer=Y.msaaBuffer||z.createRenderbuffer():Y.msaaBuffer&&(z.deleteRenderbuffer(Y.msaaBuffer),Y.msaaBuffer=null,Y.blitFramebuffer&&(Y.blitFramebuffer.dispose(),Y.blitFramebuffer=null));const Z=[];for(let J=0;J1&&z.drawBuffers(Z),q.depthTexture&&this.writeDepthTexture){const Y=q.depthTexture;this.renderer.texture.bind(Y,0),z.framebufferTexture2D(z.FRAMEBUFFER,z.DEPTH_ATTACHMENT,z.TEXTURE_2D,Y._glTextures[this.CONTEXT_UID].texture,K)}if(!q.stencil&&!q.depth||q.depthTexture&&this.writeDepthTexture)Y.stencil&&(z.deleteRenderbuffer(Y.stencil),Y.stencil=null);else{let K,Q;Y.stencil=Y.stencil||z.createRenderbuffer(),1===this.renderer.context.webGLVersion?(K=z.DEPTH_STENCIL_ATTACHMENT,Q=z.DEPTH_STENCIL):q.depth&&q.stencil?(K=z.DEPTH_STENCIL_ATTACHMENT,Q=z.DEPTH24_STENCIL8):q.depth?(K=z.DEPTH_ATTACHMENT,Q=z.DEPTH_COMPONENT24):(K=z.STENCIL_ATTACHMENT,Q=z.STENCIL_INDEX8),z.bindRenderbuffer(z.RENDERBUFFER,Y.stencil),Y.msaaBuffer?z.renderbufferStorageMultisample(z.RENDERBUFFER,Y.multisample,Q,q.width,q.height):z.renderbufferStorage(z.RENDERBUFFER,Q,q.width,q.height),z.framebufferRenderbuffer(z.FRAMEBUFFER,K,z.RENDERBUFFER,Y.stencil)}}canMultisampleFramebuffer(q){return 1!==this.renderer.context.webGLVersion&&q.colorTextures.length<=1&&!q.depthTexture}detectSamples(q){const{msaaSamples:K}=this;let z=ft.NONE;if(q<=1||null===K)return z;for(let Y=0;Y=0&&this.managedFramebuffers.splice(Q,1),q.disposeRunner.remove(this),K||(Y.deleteFramebuffer(z.framebuffer),z.msaaBuffer&&Y.deleteRenderbuffer(z.msaaBuffer),z.stencil&&Y.deleteRenderbuffer(z.stencil)),z.blitFramebuffer&&this.disposeFramebuffer(z.blitFramebuffer,K)}disposeAll(q){const K=this.managedFramebuffers;this.managedFramebuffers=[];for(let z=0;zK.createVertexArrayOES(),q.bindVertexArray=q=>K.bindVertexArrayOES(q),q.deleteVertexArray=q=>K.deleteVertexArrayOES(q)):(this.hasVao=!1,q.createVertexArray=()=>null,q.bindVertexArray=()=>null,q.deleteVertexArray=()=>null)}if(2!==K.webGLVersion){const K=q.getExtension("ANGLE_instanced_arrays");K?(q.vertexAttribDivisor=(q,z)=>K.vertexAttribDivisorANGLE(q,z),q.drawElementsInstanced=(q,z,Y,Q,X)=>K.drawElementsInstancedANGLE(q,z,Y,Q,X),q.drawArraysInstanced=(q,z,Y,Q)=>K.drawArraysInstancedANGLE(q,z,Y,Q)):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===K.webGLVersion||!!K.extensions.uint32ElementIndex}bind(q,K){K=K||this.renderer.shader.shader;const{gl:z}=this;let Y=q.glVertexArrayObjects[this.CONTEXT_UID],Q=!1;Y||(this.managedGeometries[q.id]=q,q.disposeRunner.add(this),q.glVertexArrayObjects[this.CONTEXT_UID]=Y={},Q=!0);const X=Y[K.program.id]||this.initGeometryVao(q,K,Q);this._activeGeometry=q,this._activeVao!==X&&(this._activeVao=X,this.hasVao?z.bindVertexArray(X):this.activateVao(q,K.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const q=this._activeGeometry,K=this.renderer.buffer;for(let z=0;z"u"?.5:K,this.isSimple=!1}get texture(){return this._texture}set texture(q){this._texture=q,this._textureID=-1}multiplyUvs(q,K){void 0===K&&(K=q);const z=this.mapCoord;for(let Y=0;Y0?this.maskStack[this.maskStack.length-1]._colorMask:15;z!==K&&this.renderer.gl.colorMask(0!=(1&z),0!=(2&z),0!=(4&z),0!=(8&z))}destroy(){this.renderer=null}}on.extension={type:ci.RendererSystem,name:"mask"},ui.add(on);class hn{constructor(q){this.renderer=q,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(q){const{gl:K}=this.renderer,z=this.getStackLength();this.maskStack=q;const Y=this.getStackLength();Y!==z&&(0===Y?K.disable(this.glConst):(K.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const cn=new qi,dn=[],ln=class q extends hn{constructor(q){super(q),this.glConst=pt.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const q=this.maskStack[this.maskStack.length-1];return q?q._scissorCounter:0}calcScissorRect(q){if(q._scissorRectLocal)return;const K=q._scissorRect,{maskObject:z}=q,{renderer:Y}=this,Q=Y.renderTexture,X=z.getBounds(!0,dn.pop()??new ji);this.roundFrameToPixels(X,Q.current?Q.current.resolution:Y.resolution,Q.sourceFrame,Q.destinationFrame,Y.projection.transform),K&&X.fit(K),q._scissorRectLocal=X}static isMatrixRotated(q){if(!q)return!1;const{a:K,b:z,c:Y,d:Q}=q;return(Math.abs(z)>1e-4||Math.abs(Y)>1e-4)&&(Math.abs(K)>1e-4||Math.abs(Q)>1e-4)}testScissor(K){const{maskObject:z}=K;if(!z.isFastRect||!z.isFastRect()||q.isMatrixRotated(z.worldTransform)||q.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(K);const Y=K._scissorRectLocal;return Y.width>0&&Y.height>0}roundFrameToPixels(K,z,Y,Q,X){q.isMatrixRotated(X)||((X=X?cn.copyFrom(X):cn.identity()).translate(-Y.x,-Y.y).scale(Q.width/Y.width,Q.height/Y.height).translate(Q.x,Q.y),this.renderer.filter.transformAABB(X,K),K.fit(Q),K.x=Math.round(K.x*z),K.y=Math.round(K.y*z),K.width=Math.round(K.width*z),K.height=Math.round(K.height*z))}push(q){q._scissorRectLocal||this.calcScissorRect(q);const{gl:K}=this.renderer;q._scissorRect||K.enable(K.SCISSOR_TEST),q._scissorCounter++,q._scissorRect=q._scissorRectLocal,this._useCurrent()}pop(q){const{gl:K}=this.renderer;q&&dn.push(q._scissorRectLocal),this.getStackLength()>0?this._useCurrent():K.disable(K.SCISSOR_TEST)}_useCurrent(){const q=this.maskStack[this.maskStack.length-1]._scissorRect;let K;K=this.renderer.renderTexture.current?q.y:this.renderer.height-q.height-q.y,this.renderer.gl.scissor(q.x,K,q.width,q.height)}};ln.extension={type:ci.RendererSystem,name:"scissor"};let un=ln;ui.add(un);class fn extends hn{constructor(q){super(q),this.glConst=pt.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const q=this.maskStack[this.maskStack.length-1];return q?q._stencilCounter:0}push(q){const K=q.maskObject,{gl:z}=this.renderer,Y=q._stencilCounter;0===Y&&(this.renderer.framebuffer.forceStencil(),z.clearStencil(0),z.clear(z.STENCIL_BUFFER_BIT),z.enable(z.STENCIL_TEST)),q._stencilCounter++;const Q=q._colorMask;0!==Q&&(q._colorMask=0,z.colorMask(!1,!1,!1,!1)),z.stencilFunc(z.EQUAL,Y,4294967295),z.stencilOp(z.KEEP,z.KEEP,z.INCR),K.renderable=!0,K.render(this.renderer),this.renderer.batch.flush(),K.renderable=!1,0!==Q&&(q._colorMask=Q,z.colorMask(0!=(1&Q),0!=(2&Q),0!=(4&Q),0!=(8&Q))),this._useCurrent()}pop(q){const K=this.renderer.gl;if(0===this.getStackLength())K.disable(K.STENCIL_TEST);else{const z=0!==this.maskStack.length?this.maskStack[this.maskStack.length-1]:null,Y=z?z._colorMask:15;0!==Y&&(z._colorMask=0,K.colorMask(!1,!1,!1,!1)),K.stencilOp(K.KEEP,K.KEEP,K.DECR),q.renderable=!0,q.render(this.renderer),this.renderer.batch.flush(),q.renderable=!1,0!==Y&&(z._colorMask=Y,K.colorMask(0!=(1&Y),0!=(2&Y),0!=(4&Y),0!=(8&Y))),this._useCurrent()}}_useCurrent(){const q=this.renderer.gl;q.stencilFunc(q.EQUAL,this.getStackLength(),4294967295),q.stencilOp(q.KEEP,q.KEEP,q.KEEP)}}fn.extension={type:ci.RendererSystem,name:"stencil"},ui.add(fn);class bn{constructor(q){this.renderer=q,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get:()=>(Gt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),q.extract)},prepare:{enumerable:!1,get:()=>(Gt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),q.prepare)},interaction:{enumerable:!1,get:()=>(Gt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),q.events)}})}init(){const q=this.rendererPlugins;for(const K in q)this.plugins[K]=new q[K](this.renderer)}destroy(){for(const q in this.plugins)this.plugins[q].destroy(),this.plugins[q]=null}}bn.extension={type:[ci.RendererSystem,ci.CanvasRendererSystem],name:"_plugin"},ui.add(bn);class pn{constructor(q){this.renderer=q,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new qi,this.transform=null}update(q,K,z,Y){this.destinationFrame=q||this.destinationFrame||this.defaultFrame,this.sourceFrame=K||this.sourceFrame||q,this.calculateProjection(this.destinationFrame,this.sourceFrame,z,Y),this.transform&&this.projectionMatrix.append(this.transform);const Q=this.renderer;Q.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,Q.globalUniforms.update(),Q.shader.shader&&Q.shader.syncUniformGroup(Q.shader.shader.uniforms.globals)}calculateProjection(q,K,z,Y){const Q=this.projectionMatrix,X=Y?-1:1;Q.identity(),Q.a=1/K.width*2,Q.d=X*(1/K.height*2),Q.tx=-1-K.x*Q.a,Q.ty=-X-K.y*Q.d}setTransform(q){}destroy(){this.renderer=null}}pn.extension={type:ci.RendererSystem,name:"projection"},ui.add(pn);const vn=new ss,gn=new ji;class mn{constructor(q){this.renderer=q,this._tempMatrix=new qi}generateTexture(q,K){const{region:z,...Y}=K||{},Q=z?.copyTo(gn)||q.getLocalBounds(gn,!0),X=Y.resolution||this.renderer.resolution;Q.width=Math.max(Q.width,1/X),Q.height=Math.max(Q.height,1/X),Y.width=Q.width,Y.height=Q.height,Y.resolution=X,Y.multisample??(Y.multisample=this.renderer.multisample);const Z=Hs.create(Y);this._tempMatrix.tx=-Q.x,this._tempMatrix.ty=-Q.y;const J=q.transform;return q.transform=vn,this.renderer.render(q,{renderTexture:Z,transform:this._tempMatrix,skipUpdateTransform:!!q.parent,blit:!0}),q.transform=J,Z}destroy(){}}mn.extension={type:[ci.RendererSystem,ci.CanvasRendererSystem],name:"textureGenerator"},ui.add(mn);const yn=new ji,_n=new ji;class En{constructor(q){this.renderer=q,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ji,this.destinationFrame=new ji,this.viewportFrame=new ji}contextChange(){const q=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(q&&q.alpha&&q.premultipliedAlpha)}bind(q=null,K,z){const Y=this.renderer;let Q,X,Z;this.current=q,q?(Q=q.baseTexture,Z=Q.resolution,K||(yn.width=q.frame.width,yn.height=q.frame.height,K=yn),z||(_n.x=q.frame.x,_n.y=q.frame.y,_n.width=K.width,_n.height=K.height,z=_n),X=Q.framebuffer):(Z=Y.resolution,K||(yn.width=Y._view.screen.width,yn.height=Y._view.screen.height,K=yn),z||((z=yn).width=K.width,z.height=K.height));const J=this.viewportFrame;J.x=z.x*Z,J.y=z.y*Z,J.width=z.width*Z,J.height=z.height*Z,q||(J.y=Y.view.height-(J.y+J.height)),J.ceil(),this.renderer.framebuffer.bind(X,J),this.renderer.projection.update(z,K,Z,!X),q?this.renderer.mask.setMaskStack(Q.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(K),this.destinationFrame.copyFrom(z)}clear(q,K){const z=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,Y=Ce.shared.setValue(q||z);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&Y.premultiply(Y.alpha);const Q=this.destinationFrame,X=this.current?this.current.baseTexture:this.renderer._view.screen,Z=Q.width!==X.width||Q.height!==X.height;if(Z){let{x:q,y:K,width:z,height:Y}=this.viewportFrame;q=Math.round(q),K=Math.round(K),z=Math.round(z),Y=Math.round(Y),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(q,K,z,Y)}this.renderer.framebuffer.clear(Y.red,Y.green,Y.blue,Y.alpha,K),Z&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}En.extension={type:ci.RendererSystem,name:"renderTexture"},ui.add(En);class wn{constructor(q,K){this.program=q,this.uniformData=K,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function Tn(q,K,z){const Y=q.createShader(K);return q.shaderSource(Y,z),q.compileShader(Y),Y}function Sn(q){const K=new Array(q);for(let z=0;z`${K}: ${q}`)),Y=q.getShaderInfoLog(K),Q=Y.split("\n"),X={},Z=Q.map((q=>parseFloat(q.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1")))).filter((q=>!(!q||X[q])&&(X[q]=!0,!0))),J=[""];Z.forEach((q=>{z[q-1]=`%c${z[q-1]}%c`,J.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")}));const tt=z.join("\n");J[0]=tt,console.error(Y),console.groupCollapsed("click to view full shader code"),console.warn(...J),console.groupEnd()}function On(q,K){const z=Tn(q,q.VERTEX_SHADER,K.vertexSrc),Y=Tn(q,q.FRAGMENT_SHADER,K.fragmentSrc),Q=q.createProgram();q.attachShader(Q,z),q.attachShader(Q,Y);const X=K.extra?.transformFeedbackVaryings;if(X&&("function"!=typeof q.transformFeedbackVaryings?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):q.transformFeedbackVaryings(Q,X.names,"separate"===X.bufferMode?q.SEPARATE_ATTRIBS:q.INTERLEAVED_ATTRIBS)),q.linkProgram(Q),q.getProgramParameter(Q,q.LINK_STATUS)||function(q,K,z,Y){q.getProgramParameter(K,q.LINK_STATUS)||(q.getShaderParameter(z,q.COMPILE_STATUS)||Cn(q,z),q.getShaderParameter(Y,q.COMPILE_STATUS)||Cn(q,Y),console.error("PixiJS Error: Could not initialize shader."),""!==q.getProgramInfoLog(K)&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",q.getProgramInfoLog(K)))}(q,Q,z,Y),K.attributeData=function(q,K){const z={},Y=K.getProgramParameter(q,K.ACTIVE_ATTRIBUTES);for(let Q=0;Qq>K?1:-1));for(let Y=0;Yq.index-K.index)),z}(q.uniforms,K),{uboElements:Y,size:Q}=function(q){const K=q.map((q=>({data:q,offset:0,dataLen:0,dirty:0})));let z=0,Y=0,Q=0;for(let X=0;X1&&(z=Math.max(z,16)*q.data.size),q.dataLen=z,Y%z!=0&&Y<16){const q=Y%z%16;Y+=q,Q+=q}Y+z>16?(Q=16*Math.ceil(Q/16),q.offset=Q,Q+=z,Y=z):(q.offset=Q,Y+=z,Q+=z)}return Q=16*Math.ceil(Q/16),{uboElements:K,size:Q}}(z),X=["\n var v = null;\n var v2 = null;\n var cv = null;\n var t = 0;\n var gl = renderer.gl\n var index = 0;\n var data = buffer.data;\n "];for(let Z=0;Z1){const q=us(K.data.type),z=Math.max(Rn[K.data.type]/16,1),Y=q/z,Z=(4-Y%4)%4;X.push(`\n cv = ud.${Q}.value;\n v = uv.${Q};\n offset = ${K.offset/4};\n\n t = 0;\n\n for(var i=0; i < ${K.data.size*z}; i++)\n {\n for(var j = 0; j < ${Y}; j++)\n {\n data[offset++] = v[t++];\n }\n offset += ${Z};\n }\n\n `)}else{const q=Dn[K.data.type];X.push(`\n cv = ud.${Q}.value;\n v = uv.${Q};\n offset = ${K.offset/4};\n ${q};\n `)}}return X.push("\n renderer.buffer.update(buffer);\n "),{size:Q,syncFunc:new Function("ud","uv","renderer","syncData","buffer",X.join("\n"))}}let Mn;let Nn=0;const xn={textureCount:0,uboCount:0};class Ln{constructor(q){this.destroyed=!1,this.renderer=q,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Nn++}systemCheck(){if(!function(){if("boolean"==typeof Mn)return Mn;try{Mn=!0===new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")}catch{Mn=!1}return Mn}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(q){this.gl=q,this.reset()}bind(q,K){q.disposeRunner.add(this),q.uniforms.globals=this.renderer.globalUniforms;const z=q.program,Y=z.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(q);return this.shader=q,this.program!==z&&(this.program=z,this.gl.useProgram(Y.program)),K||(xn.textureCount=0,xn.uboCount=0,this.syncUniformGroup(q.uniformGroup,xn)),Y}setUniforms(q){const K=this.shader.program,z=K.glPrograms[this.renderer.CONTEXT_UID];K.syncUniforms(z.uniformData,q,this.renderer)}syncUniformGroup(q,K){const z=this.getGlProgram();(!q.static||q.dirtyId!==z.uniformDirtyGroups[q.id])&&(z.uniformDirtyGroups[q.id]=q.dirtyId,this.syncUniforms(q,z,K))}syncUniforms(q,K,z){(q.syncUniforms[this.shader.program.id]||this.createSyncGroups(q))(K.uniformData,q.uniforms,this.renderer,z)}createSyncGroups(q){const K=this.getSignature(q,this.shader.program.uniformData,"u");return this.cache[K]||(this.cache[K]=function(q,K){const z=["\n var v = null;\n var cv = null;\n var cu = null;\n var t = 0;\n var gl = renderer.gl;\n "];for(const Y in q.uniforms){const Q=K[Y];if(!Q){!0===q.uniforms[Y]?.group&&(q.uniforms[Y].ubo?z.push(`\n renderer.shader.syncUniformBufferGroup(uv.${Y}, '${Y}');\n `):z.push(`\n renderer.shader.syncUniformGroup(uv.${Y}, syncData);\n `));continue}const X=q.uniforms[Y];let Z=!1;for(let q=0;q>=1,z++;this.stateId=q.data}for(let K=0;Kq.systems[K])),z=[...K,...Object.keys(q.systems).filter((q=>!K.includes(q)))];for(const Y of z)this.addSystem(q.systems[Y],Y)}addRunners(...q){q.forEach((q=>{this.runners[q]=new yi(q)}))}addSystem(q,K){const z=new q(this);if(this[K])throw new Error(`Whoops! The name "${K}" is already in use`);this[K]=z,this._systemsHash[K]=z;for(const Y in this.runners)this.runners[Y].add(z);return this}emitWithCustomOptions(q,K){const z=Object.keys(this._systemsHash);q.items.forEach((Y=>{const Q=z.find((q=>this._systemsHash[q]===Y));Y[q.name](K[Q])}))}destroy(){Object.values(this.runners).forEach((q=>{q.destroy()})),this._systemsHash={}}}const Gn=class q{constructor(K){this.renderer=K,this.count=0,this.checkCount=0,this.maxIdle=q.defaultMaxIdle,this.checkCountMax=q.defaultCheckCountMax,this.mode=q.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==dt.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const q=this.renderer.texture,K=q.managedTextures;let z=!1;for(let Y=0;Ythis.maxIdle&&(q.destroyTexture(Q,!0),K[Y]=null,z=!0)}if(z){let q=0;for(let z=0;z=0;Y--)this.unload(q.children[Y])}destroy(){this.renderer=null}};Gn.defaultMode=dt.AUTO,Gn.defaultMaxIdle=3600,Gn.defaultCheckCountMax=600,Gn.extension={type:ci.RendererSystem,name:"textureGC"};let jn=Gn;ui.add(jn);class $n{constructor(q){this.texture=q,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=st.UNSIGNED_BYTE,this.internalFormat=et.RGBA,this.samplerType=0}}class Hn{constructor(q){this.renderer=q,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Si,this.hasIntegerTextures=!1}contextChange(){const q=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=function(q){let K;return K="WebGL2RenderingContext"in globalThis&&q instanceof globalThis.WebGL2RenderingContext?{[st.UNSIGNED_BYTE]:{[et.RGBA]:q.RGBA8,[et.RGB]:q.RGB8,[et.RG]:q.RG8,[et.RED]:q.R8,[et.RGBA_INTEGER]:q.RGBA8UI,[et.RGB_INTEGER]:q.RGB8UI,[et.RG_INTEGER]:q.RG8UI,[et.RED_INTEGER]:q.R8UI,[et.ALPHA]:q.ALPHA,[et.LUMINANCE]:q.LUMINANCE,[et.LUMINANCE_ALPHA]:q.LUMINANCE_ALPHA},[st.BYTE]:{[et.RGBA]:q.RGBA8_SNORM,[et.RGB]:q.RGB8_SNORM,[et.RG]:q.RG8_SNORM,[et.RED]:q.R8_SNORM,[et.RGBA_INTEGER]:q.RGBA8I,[et.RGB_INTEGER]:q.RGB8I,[et.RG_INTEGER]:q.RG8I,[et.RED_INTEGER]:q.R8I},[st.UNSIGNED_SHORT]:{[et.RGBA_INTEGER]:q.RGBA16UI,[et.RGB_INTEGER]:q.RGB16UI,[et.RG_INTEGER]:q.RG16UI,[et.RED_INTEGER]:q.R16UI,[et.DEPTH_COMPONENT]:q.DEPTH_COMPONENT16},[st.SHORT]:{[et.RGBA_INTEGER]:q.RGBA16I,[et.RGB_INTEGER]:q.RGB16I,[et.RG_INTEGER]:q.RG16I,[et.RED_INTEGER]:q.R16I},[st.UNSIGNED_INT]:{[et.RGBA_INTEGER]:q.RGBA32UI,[et.RGB_INTEGER]:q.RGB32UI,[et.RG_INTEGER]:q.RG32UI,[et.RED_INTEGER]:q.R32UI,[et.DEPTH_COMPONENT]:q.DEPTH_COMPONENT24},[st.INT]:{[et.RGBA_INTEGER]:q.RGBA32I,[et.RGB_INTEGER]:q.RGB32I,[et.RG_INTEGER]:q.RG32I,[et.RED_INTEGER]:q.R32I},[st.FLOAT]:{[et.RGBA]:q.RGBA32F,[et.RGB]:q.RGB32F,[et.RG]:q.RG32F,[et.RED]:q.R32F,[et.DEPTH_COMPONENT]:q.DEPTH_COMPONENT32F},[st.HALF_FLOAT]:{[et.RGBA]:q.RGBA16F,[et.RGB]:q.RGB16F,[et.RG]:q.RG16F,[et.RED]:q.R16F},[st.UNSIGNED_SHORT_5_6_5]:{[et.RGB]:q.RGB565},[st.UNSIGNED_SHORT_4_4_4_4]:{[et.RGBA]:q.RGBA4},[st.UNSIGNED_SHORT_5_5_5_1]:{[et.RGBA]:q.RGB5_A1},[st.UNSIGNED_INT_2_10_10_10_REV]:{[et.RGBA]:q.RGB10_A2,[et.RGBA_INTEGER]:q.RGB10_A2UI},[st.UNSIGNED_INT_10F_11F_11F_REV]:{[et.RGB]:q.R11F_G11F_B10F},[st.UNSIGNED_INT_5_9_9_9_REV]:{[et.RGB]:q.RGB9_E5},[st.UNSIGNED_INT_24_8]:{[et.DEPTH_STENCIL]:q.DEPTH24_STENCIL8},[st.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[et.DEPTH_STENCIL]:q.DEPTH32F_STENCIL8}}:{[st.UNSIGNED_BYTE]:{[et.RGBA]:q.RGBA,[et.RGB]:q.RGB,[et.ALPHA]:q.ALPHA,[et.LUMINANCE]:q.LUMINANCE,[et.LUMINANCE_ALPHA]:q.LUMINANCE_ALPHA},[st.UNSIGNED_SHORT_5_6_5]:{[et.RGB]:q.RGB},[st.UNSIGNED_SHORT_4_4_4_4]:{[et.RGBA]:q.RGBA},[st.UNSIGNED_SHORT_5_5_5_1]:{[et.RGBA]:q.RGBA}},K}(q),this.samplerTypes=function(q){let K;return K="WebGL2RenderingContext"in globalThis&&q instanceof globalThis.WebGL2RenderingContext?{[q.RGB]:nt.FLOAT,[q.RGBA]:nt.FLOAT,[q.ALPHA]:nt.FLOAT,[q.LUMINANCE]:nt.FLOAT,[q.LUMINANCE_ALPHA]:nt.FLOAT,[q.R8]:nt.FLOAT,[q.R8_SNORM]:nt.FLOAT,[q.RG8]:nt.FLOAT,[q.RG8_SNORM]:nt.FLOAT,[q.RGB8]:nt.FLOAT,[q.RGB8_SNORM]:nt.FLOAT,[q.RGB565]:nt.FLOAT,[q.RGBA4]:nt.FLOAT,[q.RGB5_A1]:nt.FLOAT,[q.RGBA8]:nt.FLOAT,[q.RGBA8_SNORM]:nt.FLOAT,[q.RGB10_A2]:nt.FLOAT,[q.RGB10_A2UI]:nt.FLOAT,[q.SRGB8]:nt.FLOAT,[q.SRGB8_ALPHA8]:nt.FLOAT,[q.R16F]:nt.FLOAT,[q.RG16F]:nt.FLOAT,[q.RGB16F]:nt.FLOAT,[q.RGBA16F]:nt.FLOAT,[q.R32F]:nt.FLOAT,[q.RG32F]:nt.FLOAT,[q.RGB32F]:nt.FLOAT,[q.RGBA32F]:nt.FLOAT,[q.R11F_G11F_B10F]:nt.FLOAT,[q.RGB9_E5]:nt.FLOAT,[q.R8I]:nt.INT,[q.R8UI]:nt.UINT,[q.R16I]:nt.INT,[q.R16UI]:nt.UINT,[q.R32I]:nt.INT,[q.R32UI]:nt.UINT,[q.RG8I]:nt.INT,[q.RG8UI]:nt.UINT,[q.RG16I]:nt.INT,[q.RG16UI]:nt.UINT,[q.RG32I]:nt.INT,[q.RG32UI]:nt.UINT,[q.RGB8I]:nt.INT,[q.RGB8UI]:nt.UINT,[q.RGB16I]:nt.INT,[q.RGB16UI]:nt.UINT,[q.RGB32I]:nt.INT,[q.RGB32UI]:nt.UINT,[q.RGBA8I]:nt.INT,[q.RGBA8UI]:nt.UINT,[q.RGBA16I]:nt.INT,[q.RGBA16UI]:nt.UINT,[q.RGBA32I]:nt.INT,[q.RGBA32UI]:nt.UINT,[q.DEPTH_COMPONENT16]:nt.FLOAT,[q.DEPTH_COMPONENT24]:nt.FLOAT,[q.DEPTH_COMPONENT32F]:nt.FLOAT,[q.DEPTH_STENCIL]:nt.FLOAT,[q.DEPTH24_STENCIL8]:nt.FLOAT,[q.DEPTH32F_STENCIL8]:nt.FLOAT}:{[q.RGB]:nt.FLOAT,[q.RGBA]:nt.FLOAT,[q.ALPHA]:nt.FLOAT,[q.LUMINANCE]:nt.FLOAT,[q.LUMINANCE_ALPHA]:nt.FLOAT,[q.DEPTH_STENCIL]:nt.FLOAT},K}(q);const K=q.getParameter(q.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=K;for(let Y=0;Y=0;--Q){const q=K[Q];q&&q._glTextures[Y].samplerType!==nt.FLOAT&&this.renderer.texture.unbind(q)}}initTexture(q){const K=new $n(this.gl.createTexture());return K.dirtyId=-1,q._glTextures[this.CONTEXT_UID]=K,this.managedTextures.push(q),q.on("dispose",this.destroyTexture,this),K}initTextureType(q,K){K.internalFormat=this.internalFormats[q.type]?.[q.format]??q.format,K.samplerType=this.samplerTypes[K.internalFormat]??nt.FLOAT,2===this.webGLVersion&&q.type===st.HALF_FLOAT?K.type=this.gl.HALF_FLOAT:K.type=q.type}updateTexture(q){const K=q._glTextures[this.CONTEXT_UID];if(!K)return;const z=this.renderer;if(this.initTextureType(q,K),q.resource?.upload(z,q,K))K.samplerType!==nt.FLOAT&&(this.hasIntegerTextures=!0);else{const Y=q.realWidth,Q=q.realHeight,X=z.gl;(K.width!==Y||K.height!==Q||K.dirtyId<0)&&(K.width=Y,K.height=Q,X.texImage2D(q.target,0,K.internalFormat,Y,Q,0,q.format,K.type,null))}q.dirtyStyleId!==K.dirtyStyleId&&this.updateTextureStyle(q),K.dirtyId=q.dirtyId}destroyTexture(q,K){const{gl:z}=this;if((q=q.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(q),z.deleteTexture(q._glTextures[this.CONTEXT_UID].texture),q.off("dispose",this.destroyTexture,this),delete q._glTextures[this.CONTEXT_UID],!K)){const K=this.managedTextures.indexOf(q);-1!==K&&Ve(this.managedTextures,K,1)}}updateTextureStyle(q){const K=q._glTextures[this.CONTEXT_UID];K&&(q.mipmap!==ot.POW2&&2===this.webGLVersion||q.isPowerOfTwo?K.mipmap=q.mipmap>=1:K.mipmap=!1,2===this.webGLVersion||q.isPowerOfTwo?K.wrapMode=q.wrapMode:K.wrapMode=rt.CLAMP,q.resource?.style(this.renderer,q,K)||this.setStyle(q,K),K.dirtyStyleId=q.dirtyStyleId)}setStyle(q,K){const z=this.gl;if(K.mipmap&&q.mipmap!==ot.ON_MANUAL&&z.generateMipmap(q.target),z.texParameteri(q.target,z.TEXTURE_WRAP_S,K.wrapMode),z.texParameteri(q.target,z.TEXTURE_WRAP_T,K.wrapMode),K.mipmap){z.texParameteri(q.target,z.TEXTURE_MIN_FILTER,q.scaleMode===at.LINEAR?z.LINEAR_MIPMAP_LINEAR:z.NEAREST_MIPMAP_NEAREST);const K=this.renderer.context.extensions.anisotropicFiltering;if(K&&q.anisotropicLevel>0&&q.scaleMode===at.LINEAR){const Y=Math.min(q.anisotropicLevel,z.getParameter(K.MAX_TEXTURE_MAX_ANISOTROPY_EXT));z.texParameterf(q.target,K.TEXTURE_MAX_ANISOTROPY_EXT,Y)}}else z.texParameteri(q.target,z.TEXTURE_MIN_FILTER,q.scaleMode===at.LINEAR?z.LINEAR:z.NEAREST);z.texParameteri(q.target,z.TEXTURE_MAG_FILTER,q.scaleMode===at.LINEAR?z.LINEAR:z.NEAREST)}destroy(){this.renderer=null}}Hn.extension={type:ci.RendererSystem,name:"texture"},ui.add(Hn);class Vn{constructor(q){this.renderer=q}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(q){const{gl:K,CONTEXT_UID:z}=this,Y=q._glTransformFeedbacks[z]||this.createGLTransformFeedback(q);K.bindTransformFeedback(K.TRANSFORM_FEEDBACK,Y)}unbind(){const{gl:q}=this;q.bindTransformFeedback(q.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(q,K){const{gl:z,renderer:Y}=this;K&&Y.shader.bind(K),z.beginTransformFeedback(q)}endTransformFeedback(){const{gl:q}=this;q.endTransformFeedback()}createGLTransformFeedback(q){const{gl:K,renderer:z,CONTEXT_UID:Y}=this,Q=K.createTransformFeedback();q._glTransformFeedbacks[Y]=Q,K.bindTransformFeedback(K.TRANSFORM_FEEDBACK,Q);for(let X=0;XSi.defaultOptions.wrapMode,set(q){Gt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Si.defaultOptions.wrapMode=q}},SCALE_MODE:{get:()=>Si.defaultOptions.scaleMode,set(q){Gt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Si.defaultOptions.scaleMode=q}},MIPMAP_TEXTURES:{get:()=>Si.defaultOptions.mipmap,set(q){Gt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Si.defaultOptions.mipmap=q}},ANISOTROPIC_LEVEL:{get:()=>Si.defaultOptions.anisotropicLevel,set(q){Gt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Si.defaultOptions.anisotropicLevel=q}},FILTER_RESOLUTION:{get:()=>(Gt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Rs.defaultResolution),set(q){Rs.defaultResolution=q}},FILTER_MULTISAMPLE:{get:()=>(Gt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Rs.defaultMultisample),set(q){Rs.defaultMultisample=q}},SPRITE_MAX_TEXTURES:{get:()=>Is.defaultMaxTextures,set(q){Gt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),Is.defaultMaxTextures=q}},SPRITE_BATCH_SIZE:{get:()=>Is.defaultBatchSize,set(q){Gt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),Is.defaultBatchSize=q}},CAN_UPLOAD_SAME_BUFFER:{get:()=>Is.canUploadSameBuffer,set(q){Gt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),Is.canUploadSameBuffer=q}},GC_MODE:{get:()=>jn.defaultMode,set(q){Gt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),jn.defaultMode=q}},GC_MAX_IDLE:{get:()=>jn.defaultMaxIdle,set(q){Gt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),jn.defaultMaxIdle=q}},GC_MAX_CHECK_COUNT:{get:()=>jn.defaultCheckCountMax,set(q){Gt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),jn.defaultCheckCountMax=q}},PRECISION_VERTEX:{get:()=>_s.defaultVertexPrecision,set(q){Gt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),_s.defaultVertexPrecision=q}},PRECISION_FRAGMENT:{get:()=>_s.defaultFragmentPrecision,set(q){Gt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),_s.defaultFragmentPrecision=q}}});var qn=(q=>(q[q.INTERACTION=50]="INTERACTION",q[q.HIGH=25]="HIGH",q[q.NORMAL=0]="NORMAL",q[q.LOW=-25]="LOW",q[q.UTILITY=-50]="UTILITY",q))(qn||{});class Kn{constructor(q,K=null,z=0,Y=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=q,this.context=K,this.priority=z,this.once=Y}match(q,K=null){return this.fn===q&&this.context===K}emit(q){this.fn&&(this.context?this.fn.call(this.context,q):this.fn(q));const K=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),K}connect(q){this.previous=q,q.next&&(q.next.previous=this),this.next=q.next,q.next=this}destroy(q=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const K=this.next;return this.next=q?null:K,this.previous=null,K}}const zn=class q{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Kn(null,null,1/0),this.deltaMS=1/q.targetFPMS,this.elapsedMS=1/q.targetFPMS,this._tick=q=>{this._requestId=null,this.started&&(this.update(q),this.started&&null===this._requestId&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(q,K,z=qn.NORMAL){return this._addListener(new Kn(q,K,z))}addOnce(q,K,z=qn.NORMAL){return this._addListener(new Kn(q,K,z,!0))}_addListener(q){let K=this._head.next,z=this._head;if(K){for(;K;){if(q.priority>K.priority){q.connect(z);break}z=K,K=K.next}q.previous||q.connect(z)}else q.connect(z);return this._startIfPossible(),this}remove(q,K){let z=this._head.next;for(;z;)z=z.match(q,K)?z.destroy():z.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let q=0,K=this._head;for(;K=K.next;)q++;return q}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let q=this._head.next;for(;q;)q=q.destroy(!0);this._head.destroy(),this._head=null}}update(K=performance.now()){let z;if(K>this.lastTime){if(z=this.elapsedMS=K-this.lastTime,z>this._maxElapsedMS&&(z=this._maxElapsedMS),z*=this.speed,this._minElapsedMS){const q=K-this._lastFrame|0;if(qYn.targetFPMS,set(q){Gt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Yn.targetFPMS=q}}});class Qn{static init(q){q=Object.assign({autoStart:!0,sharedTicker:!1},q),Object.defineProperty(this,"ticker",{set(q){this._ticker&&this._ticker.remove(this.render,this),this._ticker=q,q&&q.add(this.render,this,qn.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=q.sharedTicker?Yn.shared:new Yn,q.autoStart&&this.start()}static destroy(){if(this._ticker){const q=this._ticker;this.ticker=null,q.destroy()}}}Qn.extension=ci.Application,ui.add(Qn);const Xn=[];ui.handleByList(ci.Renderer,Xn);const Zn="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}",Jn="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";class ta{constructor(q){this.renderer=q}contextChange(q){let K;if(1===this.renderer.context.webGLVersion){const z=q.getParameter(q.FRAMEBUFFER_BINDING);q.bindFramebuffer(q.FRAMEBUFFER,null),K=q.getParameter(q.SAMPLES),q.bindFramebuffer(q.FRAMEBUFFER,z)}else{const z=q.getParameter(q.DRAW_FRAMEBUFFER_BINDING);q.bindFramebuffer(q.DRAW_FRAMEBUFFER,null),K=q.getParameter(q.SAMPLES),q.bindFramebuffer(q.DRAW_FRAMEBUFFER,z)}K>=ft.HIGH?this.multisample=ft.HIGH:K>=ft.MEDIUM?this.multisample=ft.MEDIUM:K>=ft.LOW?this.multisample=ft.LOW:this.multisample=ft.NONE}destroy(){}}ta.extension={type:ci.RendererSystem,name:"_multisample"},ui.add(ta);class ea{constructor(q){this.buffer=q||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class ia{constructor(q){this.renderer=q,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(q){const{gl:K,CONTEXT_UID:z}=this,Y=q._glBuffers[z]||this.createGLBuffer(q);K.bindBuffer(q.type,Y.buffer)}unbind(q){const{gl:K}=this;K.bindBuffer(q,null)}bindBufferBase(q,K){const{gl:z,CONTEXT_UID:Y}=this;if(this.boundBufferBases[K]!==q){const Q=q._glBuffers[Y]||this.createGLBuffer(q);this.boundBufferBases[K]=q,z.bindBufferBase(z.UNIFORM_BUFFER,K,Q.buffer)}}bindBufferRange(q,K,z){const{gl:Y,CONTEXT_UID:Q}=this;z=z||0;const X=q._glBuffers[Q]||this.createGLBuffer(q);Y.bindBufferRange(Y.UNIFORM_BUFFER,K||0,X.buffer,256*z,256)}update(q){const{gl:K,CONTEXT_UID:z}=this,Y=q._glBuffers[z]||this.createGLBuffer(q);if(q._updateID!==Y.updateID)if(Y.updateID=q._updateID,K.bindBuffer(q.type,Y.buffer),Y.byteLength>=q.data.byteLength)K.bufferSubData(q.type,0,q.data);else{const z=q.static?K.STATIC_DRAW:K.DYNAMIC_DRAW;Y.byteLength=q.data.byteLength,K.bufferData(q.type,q.data,z)}}dispose(q,K){if(!this.managedBuffers[q.id])return;delete this.managedBuffers[q.id];const z=q._glBuffers[this.CONTEXT_UID],Y=this.gl;q.disposeRunner.remove(this),z&&(K||Y.deleteBuffer(z.buffer),delete q._glBuffers[this.CONTEXT_UID])}disposeAll(q){const K=Object.keys(this.managedBuffers);for(let z=0;zq.resource)).filter((q=>q)).map((q=>q.load()));return this._load=Promise.all(q).then((()=>{const{realWidth:q,realHeight:K}=this.items[0];return this.resize(q,K),this.update(),Promise.resolve(this)})),this._load}}const oa=class q extends ra{constructor(K,z){const{width:Y,height:Q,autoLoad:X,linkBaseTexture:Z}=z||{};if(K&&K.length!==q.SIDES)throw new Error(`Invalid length. Got ${K.length}, expected 6`);super(6,{width:Y,height:Q});for(let J=0;J0){if(!q.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(q.resource,K)}else q.target=it.TEXTURE_CUBE_MAP_POSITIVE_X+K,q.parentTextureArray=this.baseTexture,this.items[K]=q;return q.valid&&!this.valid&&this.resize(q.realWidth,q.realHeight),this.items[K]=q,this}upload(K,z,Y){const Q=this.itemDirtyIds;for(let X=0;X{if(null!==this.url)try{const K=await pt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const z=await K.blob();if(this.destroyed)return;const Y=await createImageBitmap(z,{premultiplyAlpha:null===this.alphaMode||this.alphaMode===ht.UNPACK?"premultiply":"none"});if(this.destroyed)return void Y.close();this.source=Y,this.update(),q(this)}catch(te){if(this.destroyed)return;K(te),this.onError.emit(te)}else q(this)}))),this._load}upload(q,K,z){return this.source instanceof ImageBitmap?("number"==typeof this.alphaMode&&(K.alphaMode=this.alphaMode),super.upload(q,K,z)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(q){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&("string"==typeof q||q instanceof ImageBitmap)}static get EMPTY(){return ca._EMPTY=ca._EMPTY??pt.ADAPTER.createCanvas(0,0),ca._EMPTY}}const da=class q extends Bs{constructor(q,K){K=K||{},super(pt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=q,this.scale=K.scale||1,this._overrideWidth=K.width,this._overrideHeight=K.height,this._resolve=null,this._crossorigin=K.crossorigin,this._load=null,!1!==K.autoLoad&&this.load()}load(){return this._load||(this._load=new Promise((K=>{if(this._resolve=()=>{this.update(),K(this)},q.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}))),this._load}_loadSvg(){const q=new Image;Bs.crossOrigin(q,this.svg,this._crossorigin),q.src=this.svg,q.onerror=K=>{this._resolve&&(q.onerror=null,this.onError.emit(K))},q.onload=()=>{if(!this._resolve)return;const K=q.width,z=q.height;if(!K||!z)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let Y=K*this.scale,Q=z*this.scale;(this._overrideWidth||this._overrideHeight)&&(Y=this._overrideWidth||this._overrideHeight/z*K,Q=this._overrideHeight||this._overrideWidth/K*z),Y=Math.round(Y),Q=Math.round(Q);const X=this.source;X.width=Y,X.height=Q,X._pixiId=`canvas_${Ke()}`,X.getContext("2d").drawImage(q,0,0,K,z,0,0,Y,Q),this._resolve(),this._resolve=null}}static getSize(K){const z=q.SVG_SIZE.exec(K),Y={};return z&&(Y[z[1]]=Math.round(parseFloat(z[3])),Y[z[5]]=Math.round(parseFloat(z[7]))),Y}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(K,z){return"svg"===z||"string"==typeof K&&K.startsWith("data:image/svg+xml")||"string"==typeof K&&q.SVG_XML.test(K)}};da.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let la=da;const ua=class q extends Bs{constructor(K,z){if(z=z||{},!(K instanceof HTMLVideoElement)){const Y=document.createElement("video");!1!==z.autoLoad&&Y.setAttribute("preload","auto"),!1!==z.playsinline&&(Y.setAttribute("webkit-playsinline",""),Y.setAttribute("playsinline","")),!0===z.muted&&(Y.setAttribute("muted",""),Y.muted=!0),!0===z.loop&&Y.setAttribute("loop",""),!1!==z.autoPlay&&Y.setAttribute("autoplay",""),"string"==typeof K&&(K=[K]);const Q=K[0].src||K[0];Bs.crossOrigin(Y,Q,z.crossorigin);for(let z=0;z{this.valid?K(this):(this._resolve=K,this._reject=z,q.load())})),this._load}_onError(q){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(q),this._reject&&(this._reject(q),this._reject=null,this._resolve=null)}_isSourcePlaying(){const q=this.source;return!q.paused&&!q.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const q=this.source;q.removeEventListener("canplay",this._onCanPlay),q.removeEventListener("canplaythrough",this._onCanPlay);const K=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!K&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&q.play()}dispose(){this._configureAutoUpdate();const q=this.source;q&&(q.removeEventListener("play",this._onPlayStart),q.removeEventListener("pause",this._onPlayStop),q.removeEventListener("seeked",this._onSeeked),q.removeEventListener("canplay",this._onCanPlay),q.removeEventListener("canplaythrough",this._onCanPlay),q.removeEventListener("error",this._onError,!0),q.pause(),q.src="",q.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(q){q!==this._autoUpdate&&(this._autoUpdate=q,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(q){q!==this._updateFPS&&(this._updateFPS=q,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(Yn.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),null===this._videoFrameRequestCallbackHandle&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(null!==this._videoFrameRequestCallbackHandle&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Yn.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(null!==this._videoFrameRequestCallbackHandle&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Yn.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(K,z){return globalThis.HTMLVideoElement&&K instanceof HTMLVideoElement||q.TYPES.includes(z)}};ua.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],ua.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let fa=ua;gi.push(ca,Us,class extends Bs{constructor(q){super(q)}static test(q){const{OffscreenCanvas:K}=globalThis;return!!(K&&q instanceof K)||globalThis.HTMLCanvasElement&&q instanceof HTMLCanvasElement}},fa,class extends Bs{constructor(q){super(q)}static test(q){return!!globalThis.VideoFrame&&q instanceof globalThis.VideoFrame}},la,Ei,ha,class extends ra{constructor(q,K){const{width:z,height:Y}=K||{};let Q,X;Array.isArray(q)?(Q=q,X=q.length):X=q,super(X,{width:z,height:Y}),Q&&this.initFromArray(Q,K)}addBaseTextureAt(q,K){if(!q.resource)throw new Error("ArrayResource does not support RenderTexture");return this.addResourceAt(q.resource,K),this}bind(q){super.bind(q),q.target=it.TEXTURE_2D_ARRAY}upload(q,K,z){const{length:Y,itemDirtyIds:Q,items:X}=this,{gl:Z}=q;z.dirtyId<0&&Z.texImage3D(Z.TEXTURE_2D_ARRAY,0,z.internalFormat,this._width,this._height,Y,0,K.format,z.type,null);for(let J=0;J{"use strict";z.d(K,{cz:()=>Q,mc:()=>it,q9:()=>X});var Y=z(22478);class Q{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(q){return this.minX>this.maxX||this.minY>this.maxY?Y.M_.EMPTY:((q=q||new Y.M_(0,0,1,1)).x=this.minX,q.y=this.minY,q.width=this.maxX-this.minX,q.height=this.maxY-this.minY,q)}addPoint(q){this.minX=Math.min(this.minX,q.x),this.maxX=Math.max(this.maxX,q.x),this.minY=Math.min(this.minY,q.y),this.maxY=Math.max(this.maxY,q.y)}addPointMatrix(q,K){const{a:z,b:Y,c:Q,d:X,tx:Z,ty:J}=q,tt=z*K.x+Q*K.y+Z,et=Y*K.x+X*K.y+J;this.minX=Math.min(this.minX,tt),this.maxX=Math.max(this.maxX,tt),this.minY=Math.min(this.minY,et),this.maxY=Math.max(this.maxY,et)}addQuad(q){let K=this.minX,z=this.minY,Y=this.maxX,Q=this.maxY,X=q[0],Z=q[1];K=XY?X:Y,Q=Z>Q?Z:Q,X=q[2],Z=q[3],K=XY?X:Y,Q=Z>Q?Z:Q,X=q[4],Z=q[5],K=XY?X:Y,Q=Z>Q?Z:Q,X=q[6],Z=q[7],K=XY?X:Y,Q=Z>Q?Z:Q,this.minX=K,this.minY=z,this.maxX=Y,this.maxY=Q}addFrame(q,K,z,Y,Q){this.addFrameMatrix(q.worldTransform,K,z,Y,Q)}addFrameMatrix(q,K,z,Y,Q){const X=q.a,Z=q.b,J=q.c,tt=q.d,et=q.tx,it=q.ty;let st=this.minX,nt=this.minY,at=this.maxX,rt=this.maxY,ot=X*K+J*z+et,ht=Z*K+tt*z+it;st=otat?ot:at,rt=ht>rt?ht:rt,ot=X*Y+J*z+et,ht=Z*Y+tt*z+it,st=otat?ot:at,rt=ht>rt?ht:rt,ot=X*K+J*Q+et,ht=Z*K+tt*Q+it,st=otat?ot:at,rt=ht>rt?ht:rt,ot=X*Y+J*Q+et,ht=Z*Y+tt*Q+it,st=otat?ot:at,rt=ht>rt?ht:rt,this.minX=st,this.minY=nt,this.maxX=at,this.maxY=rt}addVertexData(q,K,z){let Y=this.minX,Q=this.minY,X=this.maxX,Z=this.maxY;for(let J=K;JX?K:X,Z=z>Z?z:Z}this.minX=Y,this.minY=Q,this.maxX=X,this.maxY=Z}addVertices(q,K,z,Y){this.addVerticesMatrix(q.worldTransform,K,z,Y)}addVerticesMatrix(q,K,z,Y,Q=0,X=Q){const Z=q.a,J=q.b,tt=q.c,et=q.d,it=q.tx,st=q.ty;let nt=this.minX,at=this.minY,rt=this.maxX,ot=this.maxY;for(let ht=z;htY?q.maxX:Y,this.maxY=q.maxY>Q?q.maxY:Q}addBoundsMask(q,K){const z=q.minX>K.minX?q.minX:K.minX,Y=q.minY>K.minY?q.minY:K.minY,Q=q.maxXZ?Q:Z,this.maxY=X>J?X:J}}addBoundsMatrix(q,K){this.addFrameMatrix(K,q.minX,q.minY,q.maxX,q.maxY)}addBoundsArea(q,K){const z=q.minX>K.x?q.minX:K.x,Y=q.minY>K.y?q.minY:K.y,Q=q.maxXZ?Q:Z,this.maxY=X>J?X:J}}pad(q=0,K=q){this.isEmpty()||(this.minX-=q,this.maxX+=q,this.minY-=K,this.maxY+=K)}addFramePad(q,K,z,Y,Q,X){q-=Q,K-=X,z+=Q,Y+=X,this.minX=this.minXz?this.maxX:z,this.minY=this.minYY?this.maxY:Y}}class X extends Y.Wp.EventEmitter{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Y.dL,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Q,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(q){const K=Object.keys(q);for(let z=0;z1)for(let K=0;Kthis.children.length)throw new Error(`${q}addChildAt: The index ${K} supplied is out of bounds ${this.children.length}`);return q.parent&&q.parent.removeChild(q),q.parent=this,this.sortDirty=!0,q.transform._parentID=-1,this.children.splice(K,0,q),this._boundsID++,this.onChildrenChange(K),q.emit("added",this),this.emit("childAdded",q,this,K),q}swapChildren(q,K){if(q===K)return;const z=this.getChildIndex(q),Y=this.getChildIndex(K);this.children[z]=K,this.children[Y]=q,this.onChildrenChange(z=this.children.length)throw new Error(`The index ${K} supplied is out of bounds ${this.children.length}`);const z=this.getChildIndex(q);Y.Wp.removeItems(this.children,z,1),this.children.splice(K,0,q),this.onChildrenChange(K)}getChildAt(q){if(q<0||q>=this.children.length)throw new Error(`getChildAt: Index (${q}) does not exist.`);return this.children[q]}removeChild(...q){if(q.length>1)for(let K=0;K0&&Y<=K){Q=this.children.splice(z,Y);for(let q=0;q1&&this.children.sort(tt),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let q=0,K=this.children.length;q0&&z.height>0))return;let Y,Q;this.cullArea?(Y=this.cullArea,Q=this.worldTransform):this._render!==q.prototype._render&&(Y=this.getBounds(!0));const X=K.projection.transform;if(X&&(Q?(Q=J.copyFrom(Q),Q.prepend(X)):Q=X),Y&&z.intersects(Y,Q))this._render(K);else if(this.cullArea)return;for(let q=0,Z=this.children.length;qit.defaultSortableChildren,set(q){Y.Wp.deprecation("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),it.defaultSortableChildren=q}}})},20136:(q,K,z)=>{"use strict";z.d(K,{Z:()=>Q});var Y=z(22478);class Q extends Y.dJ{constructor(q=1){super(Y.MT,"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.alpha=q}get alpha(){return this.uniforms.uAlpha}set alpha(q){this.uniforms.uAlpha=q}}},58268:(q,K,z)=>{"use strict";z.d(K,{N:()=>Q});var Y=z(22478);class Q extends Y.dJ{constructor(){const q={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};super(Y.Eo,"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",q),this.alpha=1}_loadMatrix(q,K=!1){let z=q;K&&(this._multiply(z,this.uniforms.m,q),z=this._colorMatrix(z)),this.uniforms.m=z}_multiply(q,K,z){return q[0]=K[0]*z[0]+K[1]*z[5]+K[2]*z[10]+K[3]*z[15],q[1]=K[0]*z[1]+K[1]*z[6]+K[2]*z[11]+K[3]*z[16],q[2]=K[0]*z[2]+K[1]*z[7]+K[2]*z[12]+K[3]*z[17],q[3]=K[0]*z[3]+K[1]*z[8]+K[2]*z[13]+K[3]*z[18],q[4]=K[0]*z[4]+K[1]*z[9]+K[2]*z[14]+K[3]*z[19]+K[4],q[5]=K[5]*z[0]+K[6]*z[5]+K[7]*z[10]+K[8]*z[15],q[6]=K[5]*z[1]+K[6]*z[6]+K[7]*z[11]+K[8]*z[16],q[7]=K[5]*z[2]+K[6]*z[7]+K[7]*z[12]+K[8]*z[17],q[8]=K[5]*z[3]+K[6]*z[8]+K[7]*z[13]+K[8]*z[18],q[9]=K[5]*z[4]+K[6]*z[9]+K[7]*z[14]+K[8]*z[19]+K[9],q[10]=K[10]*z[0]+K[11]*z[5]+K[12]*z[10]+K[13]*z[15],q[11]=K[10]*z[1]+K[11]*z[6]+K[12]*z[11]+K[13]*z[16],q[12]=K[10]*z[2]+K[11]*z[7]+K[12]*z[12]+K[13]*z[17],q[13]=K[10]*z[3]+K[11]*z[8]+K[12]*z[13]+K[13]*z[18],q[14]=K[10]*z[4]+K[11]*z[9]+K[12]*z[14]+K[13]*z[19]+K[14],q[15]=K[15]*z[0]+K[16]*z[5]+K[17]*z[10]+K[18]*z[15],q[16]=K[15]*z[1]+K[16]*z[6]+K[17]*z[11]+K[18]*z[16],q[17]=K[15]*z[2]+K[16]*z[7]+K[17]*z[12]+K[18]*z[17],q[18]=K[15]*z[3]+K[16]*z[8]+K[17]*z[13]+K[18]*z[18],q[19]=K[15]*z[4]+K[16]*z[9]+K[17]*z[14]+K[18]*z[19]+K[19],q}_colorMatrix(q){const K=new Float32Array(q);return K[4]/=255,K[9]/=255,K[14]/=255,K[19]/=255,K}brightness(q,K){const z=[q,0,0,0,0,0,q,0,0,0,0,0,q,0,0,0,0,0,1,0];this._loadMatrix(z,K)}tint(q,K){const[z,Q,X]=Y.Q1.shared.setValue(q).toArray(),Z=[z,0,0,0,0,0,Q,0,0,0,0,0,X,0,0,0,0,0,1,0];this._loadMatrix(Z,K)}greyscale(q,K){const z=[q,q,q,0,0,q,q,q,0,0,q,q,q,0,0,0,0,0,1,0];this._loadMatrix(z,K)}blackAndWhite(q){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],q)}hue(q,K){q=(q||0)/180*Math.PI;const z=Math.cos(q),Y=Math.sin(q),Q=1/3,X=(0,Math.sqrt)(Q),Z=[z+(1-z)*Q,Q*(1-z)-X*Y,Q*(1-z)+X*Y,0,0,Q*(1-z)+X*Y,z+Q*(1-z),Q*(1-z)-X*Y,0,0,Q*(1-z)-X*Y,Q*(1-z)+X*Y,z+Q*(1-z),0,0,0,0,0,1,0];this._loadMatrix(Z,K)}contrast(q,K){const z=(q||0)+1,Y=-.5*(z-1),Q=[z,0,0,0,Y,0,z,0,0,Y,0,0,z,0,Y,0,0,0,1,0];this._loadMatrix(Q,K)}saturate(q=0,K){const z=2*q/3+1,Y=-.5*(z-1),Q=[z,Y,Y,0,0,Y,z,Y,0,0,Y,Y,z,0,0,0,0,0,1,0];this._loadMatrix(Q,K)}desaturate(){this.saturate(-1)}negative(q){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],q)}sepia(q){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],q)}technicolor(q){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],q)}polaroid(q){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],q)}toBGR(q){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],q)}kodachrome(q){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],q)}browni(q){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],q)}vintage(q){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],q)}colorTone(q,K,z,Q,X){q=q||.2,K=K||.15,z=z||16770432,Q=Q||3375104;const Z=Y.Q1.shared,[J,tt,et]=Z.setValue(z).toArray(),[it,st,nt]=Z.setValue(Q).toArray(),at=[.3,.59,.11,0,0,J,tt,et,q,0,it,st,nt,K,0,J-it,tt-st,et-nt,0,0];this._loadMatrix(at,X)}night(q,K){const z=[-2*(q=q||.1),-q,0,0,0,-q,0,q,0,0,0,q,2*q,0,0,0,0,0,1,0];this._loadMatrix(z,K)}predator(q,K){const z=[11.224130630493164*q,-4.794486999511719*q,-2.8746118545532227*q,0*q,.40342438220977783*q,-3.6330697536468506*q,9.193157196044922*q,-2.951810836791992*q,0*q,-1.316135048866272*q,-3.2184197902679443*q,-4.2375030517578125*q,7.476448059082031*q,0*q,.8044459223747253*q,0,0,0,1,0];this._loadMatrix(z,K)}lsd(q){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],q)}reset(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)}get matrix(){return this.uniforms.m}set matrix(q){this.uniforms.m=q}get alpha(){return this.uniforms.uAlpha}set alpha(q){this.uniforms.uAlpha=q}}Q.prototype.grayscale=Q.prototype.greyscale},37692:(q,K,z)=>{"use strict";z.d(K,{N:()=>X});var Y=z(22478),Q="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float epsilon;\n\nconst int MAX_COLORS = %maxColors%;\n\nuniform vec3 originalColors[MAX_COLORS];\nuniform vec3 targetColors[MAX_COLORS];\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n\n float alpha = gl_FragColor.a;\n if (alpha < 0.0001)\n {\n return;\n }\n\n vec3 color = gl_FragColor.rgb / alpha;\n\n for(int i = 0; i < MAX_COLORS; i++)\n {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0)\n {\n break;\n }\n vec3 colorDiff = origColor - color;\n if (length(colorDiff) < epsilon)\n {\n vec3 targetColor = targetColors[i];\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\n return;\n }\n }\n}\n";class X extends Y.dJ{constructor(q,K=.05,z=q.length){super("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}",Q.replace(/%maxColors%/g,z.toFixed(0))),this._replacements=[],this._maxColors=0,this.epsilon=K,this._maxColors=z,this.uniforms.originalColors=new Float32Array(3*z),this.uniforms.targetColors=new Float32Array(3*z),this.replacements=q}set replacements(q){const K=this.uniforms.originalColors,z=this.uniforms.targetColors,Q=q.length;if(Q>this._maxColors)throw new Error(`Length of replacements (${Q}) exceeds the maximum colors length (${this._maxColors})`);K[3*Q]=-1;for(let X=0;X{"use strict";let Y;function Q(){return Y}z.d(K,{AB:()=>bt,s3:()=>ve,kx:()=>pe});var X=z(22478);let Z=0;const J=class extends X.Wp.EventEmitter{constructor(q){super(),this.id=Z++,this.init(q)}set(q,K){if(void 0===this[q])throw new Error(`Property with name ${q} does not exist.`);switch(q){case"speed":this.speed=K;break;case"volume":this.volume=K;break;case"paused":this.paused=K;break;case"loop":this.loop=K;break;case"muted":this.muted=K}return this}get progress(){const{currentTime:q}=this._source;return q/this._duration}get paused(){return this._paused}set paused(q){this._paused=q,this.refreshPaused()}_onPlay(){this._playing=!0}_onPause(){this._playing=!1}init(q){this._playing=!1,this._duration=q.source.duration;const K=this._source=q.source.cloneNode(!1);K.src=q.parent.url,K.onplay=this._onPlay.bind(this),K.onpause=this._onPause.bind(this),q.context.on("refresh",this.refresh,this),q.context.on("refreshPaused",this.refreshPaused,this),this._media=q}_internalStop(){this._source&&this._playing&&(this._source.onended=null,this._source.pause())}stop(){this._internalStop(),this._source&&this.emit("stop")}get speed(){return this._speed}set speed(q){this._speed=q,this.refresh()}get volume(){return this._volume}set volume(q){this._volume=q,this.refresh()}get loop(){return this._loop}set loop(q){this._loop=q,this.refresh()}get muted(){return this._muted}set muted(q){this._muted=q,this.refresh()}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(q){console.warn("HTML Audio does not support filters")}refresh(){const q=this._media.context,K=this._media.parent;this._source.loop=this._loop||K.loop;const z=q.volume*(q.muted?0:1),Y=K.volume*(K.muted?0:1),Q=this._volume*(this._muted?0:1);this._source.volume=Q*z*Y,this._source.playbackRate=this._speed*q.speed*K.speed}refreshPaused(){const q=this._media.context,K=this._media.parent,z=this._paused||K.paused||q.paused;z!==this._pausedReal&&(this._pausedReal=z,z?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._source.currentTime,end:this._end,volume:this._volume,speed:this._speed,loop:this._loop})),this.emit("pause",z))}play(q){const{start:K,end:z,speed:Y,loop:Q,volume:Z,muted:tt}=q;z&&console.assert(z>K,"End time is before start time"),this._speed=Y,this._volume=Z,this._loop=!!Q,this._muted=tt,this.refresh(),this.loop&&null!==z&&(console.warn('Looping not support when specifying an "end" time'),this.loop=!1),this._start=K,this._end=z||this._duration,this._start=Math.max(0,this._start-J.PADDING),this._end=Math.min(this._end+J.PADDING,this._duration),this._source.onloadedmetadata=()=>{this._source&&(this._source.currentTime=K,this._source.onloadedmetadata=null,this.emit("progress",K,this._duration),X.Rv.shared.add(this._onUpdate,this))},this._source.onended=this._onComplete.bind(this),this._source.play(),this.emit("start")}_onUpdate(){this.emit("progress",this.progress,this._duration),this._source.currentTime>=this._end&&!this._source.loop&&this._onComplete()}_onComplete(){X.Rv.shared.remove(this._onUpdate,this),this._internalStop(),this.emit("progress",1,this._duration),this.emit("end",this)}destroy(){X.Rv.shared.remove(this._onUpdate,this),this.removeAllListeners();const q=this._source;q&&(q.onended=null,q.onplay=null,q.onpause=null,this._internalStop()),this._source=null,this._speed=1,this._volume=1,this._loop=!1,this._end=null,this._start=0,this._duration=0,this._playing=!1,this._pausedReal=!1,this._paused=!1,this._muted=!1,this._media&&(this._media.context.off("refresh",this.refresh,this),this._media.context.off("refreshPaused",this.refreshPaused,this),this._media=null)}toString(){return`[HTMLAudioInstance id=${this.id}]`}};let tt=J;tt.PADDING=.1;class et extends X.Wp.EventEmitter{init(q){this.parent=q,this._source=q.options.source||new Audio,q.url&&(this._source.src=q.url)}create(){return new tt(this)}get isPlayable(){return!!this._source&&4===this._source.readyState}get duration(){return this._source.duration}get context(){return this.parent.context}get filters(){return null}set filters(q){console.warn("HTML Audio does not support filters")}destroy(){this.removeAllListeners(),this.parent=null,this._source&&(this._source.src="",this._source.load(),this._source=null)}get source(){return this._source}load(q){const K=this._source,z=this.parent;if(4===K.readyState){z.isLoaded=!0;const K=z.autoPlayStart();return void(q&&setTimeout((()=>{q(null,z,K)}),0))}if(!z.url)return void q(new Error("sound.url or sound.source must be set"));K.src=z.url;const Y=()=>{Z(),z.isLoaded=!0;const K=z.autoPlayStart();q&&q(null,z,K)},Q=()=>{Z(),q&&q(new Error("Sound loading has been aborted"))},X=()=>{Z();const z=`Failed to load audio element (code: ${K.error.code})`;q?q(new Error(z)):console.error(z)},Z=()=>{K.removeEventListener("canplaythrough",Y),K.removeEventListener("load",Y),K.removeEventListener("abort",Q),K.removeEventListener("error",X)};K.addEventListener("canplaythrough",Y,!1),K.addEventListener("load",Y,!1),K.addEventListener("abort",Q,!1),K.addEventListener("error",X,!1),K.load()}}class it{constructor(q,K){this.parent=q,Object.assign(this,K),this.duration=this.end-this.start,console.assert(this.duration>0,"End time must be after start time")}play(q){return this.parent.play({complete:q,speed:this.speed||this.parent.speed,end:this.end,start:this.start,loop:this.loop})}destroy(){this.parent=null}}const st=["ogg","oga","opus","m4a","mp3","mpeg","wav","aiff","wma","mid","caf"],nt=["audio/mpeg","audio/ogg"],at={};!function(q){const K={m4a:"audio/mp4",oga:"audio/ogg",opus:'audio/ogg; codecs="opus"',caf:'audio/x-caf; codecs="opus"',...q||{}},z=document.createElement("audio"),Y={},Q=/^no$/;st.forEach((q=>{const X=z.canPlayType(`audio/${q}`).replace(Q,""),Z=K[q]?z.canPlayType(K[q]).replace(Q,""):"";Y[q]=!!X||!!Z})),Object.assign(at,Y)}();class rt{static setParamValue(q,K){if(q.setValueAtTime){const z=Q().context;q.setValueAtTime(K,z.audioContext.currentTime)}else q.value=K;return K}}let ot=0;class ht extends X.Wp.EventEmitter{constructor(q){super(),this.id=ot++,this._media=null,this._paused=!1,this._muted=!1,this._elapsed=0,this.init(q)}set(q,K){if(void 0===this[q])throw new Error(`Property with name ${q} does not exist.`);switch(q){case"speed":this.speed=K;break;case"volume":this.volume=K;break;case"muted":this.muted=K;break;case"loop":this.loop=K;break;case"paused":this.paused=K}return this}stop(){this._source&&(this._internalStop(),this.emit("stop"))}get speed(){return this._speed}set speed(q){this._speed=q,this.refresh(),this._update(!0)}get volume(){return this._volume}set volume(q){this._volume=q,this.refresh()}get muted(){return this._muted}set muted(q){this._muted=q,this.refresh()}get loop(){return this._loop}set loop(q){this._loop=q,this.refresh()}get filters(){return this._filters}set filters(q){this._filters&&(this._filters?.filter((q=>q)).forEach((q=>q.disconnect())),this._filters=null,this._source.connect(this._gain)),this._filters=q?.length?q.slice(0):null,this.refresh()}refresh(){if(!this._source)return;const q=this._media.context,K=this._media.parent;this._source.loop=this._loop||K.loop;const z=q.volume*(q.muted?0:1),Y=K.volume*(K.muted?0:1),Q=this._volume*(this._muted?0:1);rt.setParamValue(this._gain.gain,Q*Y*z),rt.setParamValue(this._source.playbackRate,this._speed*K.speed*q.speed),this.applyFilters()}applyFilters(){if(this._filters?.length){this._source.disconnect();let q=this._source;this._filters.forEach((K=>{q.connect(K.destination),q=K})),q.connect(this._gain)}}refreshPaused(){const q=this._media.context,K=this._media.parent,z=this._paused||K.paused||q.paused;z!==this._pausedReal&&(this._pausedReal=z,z?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._elapsed%this._duration,end:this._end,speed:this._speed,loop:this._loop,volume:this._volume})),this.emit("pause",z))}play(q){const{start:K,end:z,speed:Y,loop:Q,volume:X,muted:Z,filters:J}=q;z&&console.assert(z>K,"End time is before start time"),this._paused=!1;const{source:tt,gain:et}=this._media.nodes.cloneBufferSource();this._source=tt,this._gain=et,this._speed=Y,this._volume=X,this._loop=!!Q,this._muted=Z,this._filters=J,this.refresh();const it=this._source.buffer.duration;this._duration=it,this._end=z,this._lastUpdate=this._now(),this._elapsed=K,this._source.onended=this._onComplete.bind(this),this._loop?(this._source.loopEnd=z,this._source.loopStart=K,this._source.start(0,K)):z?this._source.start(0,K,z-K):this._source.start(0,K),this.emit("start"),this._update(!0),this.enableTicker(!0)}enableTicker(q){X.Rv.shared.remove(this._updateListener,this),q&&X.Rv.shared.add(this._updateListener,this)}get progress(){return this._progress}get paused(){return this._paused}set paused(q){this._paused=q,this.refreshPaused()}destroy(){this.removeAllListeners(),this._internalStop(),this._gain&&(this._gain.disconnect(),this._gain=null),this._media&&(this._media.context.events.off("refresh",this.refresh,this),this._media.context.events.off("refreshPaused",this.refreshPaused,this),this._media=null),this._filters?.forEach((q=>q.disconnect())),this._filters=null,this._end=null,this._speed=1,this._volume=1,this._loop=!1,this._elapsed=0,this._duration=0,this._paused=!1,this._muted=!1,this._pausedReal=!1}toString(){return`[WebAudioInstance id=${this.id}]`}_now(){return this._media.context.audioContext.currentTime}_updateListener(){this._update()}_update(q=!1){if(this._source){const K=this._now(),z=K-this._lastUpdate;if(z>0||q){const q=this._source.playbackRate.value;this._elapsed+=z*q,this._lastUpdate=K;const Y=this._duration;let Q;if(this._source.loopStart){const q=this._source.loopEnd-this._source.loopStart;Q=(this._source.loopStart+this._elapsed%q)/Y}else Q=this._elapsed%Y/Y;this._progress=Q,this.emit("progress",this._progress,Y)}}}init(q){this._media=q,q.context.events.on("refresh",this.refresh,this),q.context.events.on("refreshPaused",this.refreshPaused,this)}_internalStop(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.stop(0),this._source.disconnect();try{this._source.buffer=null}catch(q){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",q)}this._source=null}}_onComplete(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.disconnect();try{this._source.buffer=null}catch(q){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",q)}}this._source=null,this._progress=1,this.emit("progress",1,this._duration),this.emit("end",this)}}class ct{constructor(q,K){this._output=K,this._input=q}get destination(){return this._input}get filters(){return this._filters}set filters(q){if(this._filters&&(this._filters.forEach((q=>{q&&q.disconnect()})),this._filters=null,this._input.connect(this._output)),q&&q.length){this._filters=q.slice(0),this._input.disconnect();let K=null;q.forEach((q=>{null===K?this._input.connect(q.destination):K.connect(q.destination),K=q})),K.connect(this._output)}}destroy(){this.filters=null,this._input=null,this._output=null}}const dt=class extends ct{constructor(q){const K=q.audioContext,z=K.createBufferSource(),Y=K.createGain(),Q=K.createAnalyser();z.connect(Q),Q.connect(Y),Y.connect(q.destination),super(Q,Y),this.context=q,this.bufferSource=z,this.gain=Y,this.analyser=Q}get script(){return this._script||(this._script=this.context.audioContext.createScriptProcessor(dt.BUFFER_SIZE),this._script.connect(this.context.destination)),this._script}destroy(){super.destroy(),this.bufferSource.disconnect(),this._script&&this._script.disconnect(),this.gain.disconnect(),this.analyser.disconnect(),this.bufferSource=null,this._script=null,this.gain=null,this.analyser=null,this.context=null}cloneBufferSource(){const q=this.bufferSource,K=this.context.audioContext.createBufferSource();K.buffer=q.buffer,rt.setParamValue(K.playbackRate,q.playbackRate.value),K.loop=q.loop;const z=this.context.audioContext.createGain();return K.connect(z),z.connect(this.destination),{source:K,gain:z}}get bufferSize(){return this.script.bufferSize}};let lt=dt;lt.BUFFER_SIZE=0;class ut{init(q){this.parent=q,this._nodes=new lt(this.context),this._source=this._nodes.bufferSource,this.source=q.options.source}destroy(){this.parent=null,this._nodes.destroy(),this._nodes=null;try{this._source.buffer=null}catch(q){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",q)}this._source=null,this.source=null}create(){return new ht(this)}get context(){return this.parent.context}get isPlayable(){return!!this._source&&!!this._source.buffer}get filters(){return this._nodes.filters}set filters(q){this._nodes.filters=q}get duration(){return console.assert(this.isPlayable,"Sound not yet playable, no duration"),this._source.buffer.duration}get buffer(){return this._source.buffer}set buffer(q){this._source.buffer=q}get nodes(){return this._nodes}load(q){this.source?this._decode(this.source,q):this.parent.url?this._loadUrl(q):q?q(new Error("sound.url or sound.source must be set")):console.error("sound.url or sound.source must be set")}async _loadUrl(q){const K=this.parent.url,z=await X.W0.ADAPTER.fetch(K);this._decode(await z.arrayBuffer(),q)}_decode(q,K){const z=(q,z)=>{if(q)K&&K(q);else{this.parent.isLoaded=!0,this.buffer=z;const q=this.parent.autoPlayStart();K&&K(null,this.parent,q)}};if(q instanceof AudioBuffer)z(null,q);else{this.parent.context.decode(q,z)}}}const ft=class{static from(q){let K={};"string"==typeof q?K.url=q:q instanceof ArrayBuffer||q instanceof AudioBuffer||q instanceof HTMLAudioElement?K.source=q:Array.isArray(q)?K.url=q:K=q,K={autoPlay:!1,singleInstance:!1,url:null,source:null,preload:!1,volume:1,speed:1,complete:null,loaded:null,loop:!1,...K},Object.freeze(K);const z=Q().useLegacy?new et:new ut;return new ft(z,K)}constructor(q,K){this.media=q,this.options=K,this._instances=[],this._sprites={},this.media.init(this);const z=K.complete;this._autoPlayOptions=z?{complete:z}:null,this.isLoaded=!1,this._preloadQueue=null,this.isPlaying=!1,this.autoPlay=K.autoPlay,this.singleInstance=K.singleInstance,this.preload=K.preload||this.autoPlay,this.url=Array.isArray(K.url)?this.preferUrl(K.url):K.url,this.speed=K.speed,this.volume=K.volume,this.loop=K.loop,K.sprites&&this.addSprites(K.sprites),this.preload&&this._preload(K.loaded)}preferUrl(q){const[K]=q.map((q=>({url:q,ext:X.Wp.path.extname(q).slice(1)}))).filter((({ext:q})=>at[q])).sort(((q,K)=>st.indexOf(q.ext)-st.indexOf(K.ext)));if(!K)throw new Error("No supported file type found");return K.url}get context(){return Q().context}pause(){return this.isPlaying=!1,this.paused=!0,this}resume(){return this.isPlaying=this._instances.length>0,this.paused=!1,this}get paused(){return this._paused}set paused(q){this._paused=q,this.refreshPaused()}get speed(){return this._speed}set speed(q){this._speed=q,this.refresh()}get filters(){return this.media.filters}set filters(q){this.media.filters=q}addSprites(q,K){if("object"==typeof q){const K={};for(const z in q)K[z]=this.addSprites(z,q[z]);return K}console.assert(!this._sprites[q],`Alias ${q} is already taken`);const z=new it(this,K);return this._sprites[q]=z,z}destroy(){this._removeInstances(),this.removeSprites(),this.media.destroy(),this.media=null,this._sprites=null,this._instances=null}removeSprites(q){if(q){const K=this._sprites[q];void 0!==K&&(K.destroy(),delete this._sprites[q])}else for(const K in this._sprites)this.removeSprites(K);return this}get isPlayable(){return this.isLoaded&&this.media&&this.media.isPlayable}stop(){if(!this.isPlayable)return this.autoPlay=!1,this._autoPlayOptions=null,this;this.isPlaying=!1;for(let q=this._instances.length-1;q>=0;q--)this._instances[q].stop();return this}play(q,K){let z;if("string"==typeof q){z={sprite:q,loop:this.loop,complete:K}}else"function"==typeof q?(z={},z.complete=q):z=q;if(z={complete:null,loaded:null,sprite:null,end:null,start:0,volume:1,speed:1,muted:!1,loop:!1,...z||{}},z.sprite){const q=z.sprite;console.assert(!!this._sprites[q],`Alias ${q} is not available`);const K=this._sprites[q];z.start=K.start+(z.start||0),z.end=K.end,z.speed=K.speed||1,z.loop=K.loop||z.loop,delete z.sprite}if(z.offset&&(z.start=z.offset),!this.isLoaded)return this._preloadQueue?new Promise((q=>{this._preloadQueue.push((()=>{q(this.play(z))}))})):(this._preloadQueue=[],this.autoPlay=!0,this._autoPlayOptions=z,new Promise(((q,K)=>{this._preload(((Y,Q,X)=>{this._preloadQueue.forEach((q=>q())),this._preloadQueue=null,Y?K(Y):(z.loaded&&z.loaded(Y,Q,X),q(X))}))})));(this.singleInstance||z.singleInstance)&&this._removeInstances();const Y=this._createInstance();return this._instances.push(Y),this.isPlaying=!0,Y.once("end",(()=>{z.complete&&z.complete(this),this._onComplete(Y)})),Y.once("stop",(()=>{this._onComplete(Y)})),Y.play(z),Y}refresh(){const q=this._instances.length;for(let K=0;K=0;q--)this._poolInstance(this._instances[q]);this._instances.length=0}_onComplete(q){if(this._instances){const K=this._instances.indexOf(q);K>-1&&this._instances.splice(K,1),this.isPlaying=this._instances.length>0}this._poolInstance(q)}_createInstance(){if(ft._pool.length>0){const q=ft._pool.pop();return q.init(this.media),q}return this.media.create()}_poolInstance(q){q.destroy(),ft._pool.indexOf(q)<0&&ft._pool.push(q)}};let bt=ft;bt._pool=[];class pt extends X.Wp.EventEmitter{constructor(){super(...arguments),this.speed=1,this.muted=!1,this.volume=1,this.paused=!1}refresh(){this.emit("refresh")}refreshPaused(){this.emit("refreshPaused")}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(q){console.warn("HTML Audio does not support filters")}get audioContext(){return console.warn("HTML Audio does not support audioContext"),null}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this.paused}destroy(){this.removeAllListeners()}}class vt extends ct{constructor(){const q=window,K=new vt.AudioContext,z=K.createDynamicsCompressor(),Y=K.createAnalyser();Y.connect(z),z.connect(K.destination),super(Y,z),this.autoPause=!0,this._ctx=K,this._offlineCtx=new vt.OfflineAudioContext(1,2,q.OfflineAudioContext?Math.max(8e3,Math.min(96e3,K.sampleRate)):44100),this.compressor=z,this.analyser=Y,this.events=new X.Wp.EventEmitter,this.volume=1,this.speed=1,this.muted=!1,this.paused=!1,this._locked="suspended"===K.state&&("ontouchstart"in globalThis||"onclick"in globalThis),this._locked&&(this._unlock(),this._unlock=this._unlock.bind(this),document.addEventListener("mousedown",this._unlock,!0),document.addEventListener("touchstart",this._unlock,!0),document.addEventListener("touchend",this._unlock,!0)),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),globalThis.addEventListener("focus",this.onFocus),globalThis.addEventListener("blur",this.onBlur)}onFocus(){if(!this.autoPause)return;const q=this._ctx.state;"suspended"!==q&&"interrupted"!==q&&this._locked||(this.paused=this._pausedOnBlur,this.refreshPaused())}onBlur(){this.autoPause&&(this._locked||(this._pausedOnBlur=this._paused,this.paused=!0,this.refreshPaused()))}_unlock(){this._locked&&(this.playEmptySound(),"running"===this._ctx.state&&(document.removeEventListener("mousedown",this._unlock,!0),document.removeEventListener("touchend",this._unlock,!0),document.removeEventListener("touchstart",this._unlock,!0),this._locked=!1))}playEmptySound(){const q=this._ctx.createBufferSource();q.buffer=this._ctx.createBuffer(1,1,22050),q.connect(this._ctx.destination),q.start(0,0,0),"suspended"===q.context.state&&q.context.resume()}static get AudioContext(){const q=window;return q.AudioContext||q.webkitAudioContext||null}static get OfflineAudioContext(){const q=window;return q.OfflineAudioContext||q.webkitOfflineAudioContext||null}destroy(){super.destroy();const q=this._ctx;void 0!==q.close&&q.close(),globalThis.removeEventListener("focus",this.onFocus),globalThis.removeEventListener("blur",this.onBlur),this.events.removeAllListeners(),this.analyser.disconnect(),this.compressor.disconnect(),this.analyser=null,this.compressor=null,this.events=null,this._offlineCtx=null,this._ctx=null}get audioContext(){return this._ctx}get offlineContext(){return this._offlineCtx}set paused(q){q&&"running"===this._ctx.state?this._ctx.suspend():q||"suspended"!==this._ctx.state||this._ctx.resume(),this._paused=q}get paused(){return this._paused}refresh(){this.events.emit("refresh")}refreshPaused(){this.events.emit("refreshPaused")}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this._paused}decode(q,K){const z=q=>{K(new Error(q?.message||"Unable to decode file"))},Y=this._offlineCtx.decodeAudioData(q,(q=>{K(null,q)}),z);Y&&Y.catch(z)}}class gt{constructor(q,K){this.init(q,K)}init(q,K){this.destination=q,this.source=K||q}connect(q){this.source?.connect(q)}disconnect(){this.source?.disconnect()}destroy(){this.disconnect(),this.destination=null,this.source=null}}const mt=class extends gt{constructor(q=0,K=0,z=0,Y=0,X=0,Z=0,J=0,tt=0,et=0,it=0){let st=[];const nt=[{f:mt.F32,type:"lowshelf",gain:q},{f:mt.F64,type:"peaking",gain:K},{f:mt.F125,type:"peaking",gain:z},{f:mt.F250,type:"peaking",gain:Y},{f:mt.F500,type:"peaking",gain:X},{f:mt.F1K,type:"peaking",gain:Z},{f:mt.F2K,type:"peaking",gain:J},{f:mt.F4K,type:"peaking",gain:tt},{f:mt.F8K,type:"peaking",gain:et},{f:mt.F16K,type:"highshelf",gain:it}];Q().useLegacy||(st=nt.map((q=>{const K=Q().context.audioContext.createBiquadFilter();return K.type=q.type,rt.setParamValue(K.Q,1),K.frequency.value=q.f,rt.setParamValue(K.gain,q.gain),K}))),super(st[0],st[st.length-1]),this.bands=st,this.bandsMap={};for(let Q=0;Q0&&this.bands[Q-1].connect(q),this.bandsMap[q.frequency.value]=q}}setGain(q,K=0){if(!this.bandsMap[q])throw new Error(`No band found for frequency ${q}`);rt.setParamValue(this.bandsMap[q].gain,K)}getGain(q){if(!this.bandsMap[q])throw new Error(`No band found for frequency ${q}`);return this.bandsMap[q].gain.value}set f32(q){this.setGain(mt.F32,q)}get f32(){return this.getGain(mt.F32)}set f64(q){this.setGain(mt.F64,q)}get f64(){return this.getGain(mt.F64)}set f125(q){this.setGain(mt.F125,q)}get f125(){return this.getGain(mt.F125)}set f250(q){this.setGain(mt.F250,q)}get f250(){return this.getGain(mt.F250)}set f500(q){this.setGain(mt.F500,q)}get f500(){return this.getGain(mt.F500)}set f1k(q){this.setGain(mt.F1K,q)}get f1k(){return this.getGain(mt.F1K)}set f2k(q){this.setGain(mt.F2K,q)}get f2k(){return this.getGain(mt.F2K)}set f4k(q){this.setGain(mt.F4K,q)}get f4k(){return this.getGain(mt.F4K)}set f8k(q){this.setGain(mt.F8K,q)}get f8k(){return this.getGain(mt.F8K)}set f16k(q){this.setGain(mt.F16K,q)}get f16k(){return this.getGain(mt.F16K)}reset(){this.bands.forEach((q=>{rt.setParamValue(q.gain,0)}))}destroy(){this.bands.forEach((q=>{q.disconnect()})),this.bands=null,this.bandsMap=null}};let yt=mt;yt.F32=32,yt.F64=64,yt.F125=125,yt.F250=250,yt.F500=500,yt.F1K=1e3,yt.F2K=2e3,yt.F4K=4e3,yt.F8K=8e3,yt.F16K=16e3;const _t={loader:X.Ag.LoadParser,resolver:X.Ag.ResolveParser,cache:X.Ag.CacheParser,detection:X.Ag.DetectionParser};X.XO.handle(X.Ag.Asset,(q=>{const K=q.ref;Object.entries(_t).filter((([q])=>!!K[q])).forEach((([q,z])=>X.XO.add(Object.assign(K[q],{extension:K[q].extension??z}))))}),(q=>{const K=q.ref;Object.keys(_t).filter((q=>!!K[q])).forEach((q=>X.XO.remove(K[q])))}));class Et{constructor(q,K=!1){this._loader=q,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=K}add(q){q.forEach((q=>{this._assetList.push(q)})),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const q=[],K=Math.min(this._assetList.length,this._maxConcurrent);for(let z=0;z(Array.isArray(q)||(q=[q]),K?q.map((q=>"string"==typeof q||z?K(q):q)):q);const St=new class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(q){return this._cache.has(q)}get(q){const K=this._cache.get(q);return K||console.warn(`[Assets] Asset id ${q} was not found in the Cache`),K}set(q,K){const z=Tt(q);let Y;for(let X=0;X{Y[q]=K})));const Q=Object.keys(Y),Z={cacheKeys:Q,keys:z};if(z.forEach((q=>{this._cacheMap.set(q,Z)})),Q.forEach((q=>{this._cache.has(q)&&this._cache.get(q)!==K&&console.warn("[Cache] already has key:",q),this._cache.set(q,Y[q])})),K instanceof X.gP){const q=K;z.forEach((K=>{q.baseTexture!==X.gP.EMPTY.baseTexture&&X.t5.addToCache(q.baseTexture,K),X.gP.addToCache(q,K)}))}}remove(q){if(!this._cacheMap.has(q))return void console.warn(`[Assets] Asset id ${q} was not found in the Cache`);const K=this._cacheMap.get(q);K.cacheKeys.forEach((q=>{this._cache.delete(q)})),K.keys.forEach((q=>{this._cacheMap.delete(q)}))}get parsers(){return this._parsers}},At=q=>!Array.isArray(q);class Ct{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(q,K,z)=>(this._parsersValidated=!1,q[K]=z,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(q,K){const z={promise:null,parser:null};return z.promise=(async()=>{let Y=null,Q=null;if(K.loadParser&&(Q=this._parserHash[K.loadParser],Q||console.warn(`[Assets] specified load parser "${K.loadParser}" not found while loading ${q}`)),!Q){for(let z=0;z({alias:[q],src:q}))),J=Z.length,tt=Z.map((async q=>{const Q=X.Wp.path.toAbsolute(q.src);if(!Y[q.src])try{this.promiseCache[Q]||(this.promiseCache[Q]=this._getLoadPromiseAndParser(Q,q)),Y[q.src]=await this.promiseCache[Q].promise,K&&K(++z/J)}catch(e){throw delete this.promiseCache[Q],delete Y[q.src],new Error(`[Loader.load] Failed to load ${Q}.\n${e}`)}}));return await Promise.all(tt),Q?Y[Z[0].src]:Y}async unload(q){const K=Tt(q,(q=>({alias:[q],src:q}))).map((async q=>{const K=X.Wp.path.toAbsolute(q.src),z=this.promiseCache[K];if(z){const Y=await z.promise;delete this.promiseCache[K],z.parser?.unload?.(Y,q,this)}}));await Promise.all(K)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter((q=>q.name)).reduce(((q,K)=>(q[K.name]&&console.warn(`[Assets] loadParser name conflict "${K.name}"`),{...q,[K.name]:K})),{})}}var Ot=(q=>(q[q.Low=0]="Low",q[q.Normal=1]="Normal",q[q.High=2]="High",q))(Ot||{});function It(q,K){if(Array.isArray(K)){for(const z of K)if(q.startsWith(`data:${z}`))return!0;return!1}return q.startsWith(`data:${K}`)}const Dt={extension:{type:X.Ag.LoadParser,priority:Ot.Low},name:"loadJson",test:q=>It(q,"application/json")||wt(q,".json"),load:async q=>await(await X.W0.ADAPTER.fetch(q)).json()};X.XO.add(Dt);const Rt={name:"loadTxt",extension:{type:X.Ag.LoadParser,priority:Ot.Low},test:q=>It(q,"text/plain")||wt(q,".txt"),load:async q=>await(await X.W0.ADAPTER.fetch(q)).text()};X.XO.add(Rt);const Pt=["normal","bold","100","200","300","400","500","600","700","800","900"],Mt=[".ttf",".otf",".woff",".woff2"],Nt=["font/ttf","font/otf","font/woff","font/woff2"],xt=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;const Lt=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;const kt={extension:{type:X.Ag.LoadParser,priority:Ot.Low},name:"loadWebFont",test:q=>It(q,Nt)||wt(q,Mt),async load(q,K){const z=X.W0.ADAPTER.getFontFaceSet();if(z){const Q=[],Z=K.data?.family??function(q){const K=X.Wp.path.extname(q),z=X.Wp.path.basename(q,K).replace(/(-|_)/g," ").toLowerCase().split(" ").map((q=>q.charAt(0).toUpperCase()+q.slice(1)));let Y=z.length>0;for(const X of z)if(!X.match(xt)){Y=!1;break}let Q=z.join(" ");return Y||(Q=`"${Q.replace(/[\\"]/g,"\\$&")}"`),Q}(q),J=K.data?.weights?.filter((q=>Pt.includes(q)))??["normal"],tt=K.data??{};for(let K=0;KX.W0.ADAPTER.getFontFaceSet().delete(q)))}};X.XO.add(kt);let Bt=null;class Ut{constructor(){Bt||(Bt=URL.createObjectURL(new Blob(['(function() {\n "use strict";\n const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";\n async function checkImageBitmap() {\n try {\n if (typeof createImageBitmap != "function")\n return !1;\n const imageBlob = await (await fetch(WHITE_PNG)).blob(), imageBitmap = await createImageBitmap(imageBlob);\n return imageBitmap.width === 1 && imageBitmap.height === 1;\n } catch {\n return !1;\n }\n }\n checkImageBitmap().then((result) => {\n self.postMessage(result);\n });\n})();\n'],{type:"application/javascript"}))),this.worker=new Worker(Bt)}}Ut.revokeObjectURL=function(){Bt&&(URL.revokeObjectURL(Bt),Bt=null)};let Ft=null;class Gt{constructor(){Ft||(Ft=URL.createObjectURL(new Blob(['(function() {\n "use strict";\n async function loadImageBitmap(url) {\n const response = await fetch(url);\n if (!response.ok)\n throw new Error(`[WorkerManager.loadImageBitmap] Failed to fetch ${url}: ${response.status} ${response.statusText}`);\n const imageBlob = await response.blob();\n return await createImageBitmap(imageBlob);\n }\n self.onmessage = async (event) => {\n try {\n const imageBitmap = await loadImageBitmap(event.data.data[0]);\n self.postMessage({\n data: imageBitmap,\n uuid: event.data.uuid,\n id: event.data.id\n }, [imageBitmap]);\n } catch (e) {\n self.postMessage({\n error: e,\n uuid: event.data.uuid,\n id: event.data.id\n });\n }\n };\n})();\n'],{type:"application/javascript"}))),this.worker=new Worker(Ft)}}Gt.revokeObjectURL=function(){Ft&&(URL.revokeObjectURL(Ft),Ft=null)};let jt,$t=0;const Ht=new class{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return void 0!==this._isImageBitmapSupported||(this._isImageBitmapSupported=new Promise((q=>{const{worker:K}=new Ut;K.addEventListener("message",(z=>{K.terminate(),Ut.revokeObjectURL(),q(z.data)}))}))),this._isImageBitmapSupported}loadImageBitmap(q){return this._run("loadImageBitmap",[q])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){void 0===jt&&(jt=navigator.hardwareConcurrency||4);let q=this.workerPool.pop();return!q&&this._createdWorkers{this.complete(q.data),this.returnWorker(q.target),this.next()}))),q}returnWorker(q){this.workerPool.push(q)}complete(q){void 0!==q.error?this.resolveHash[q.uuid].reject(q.error):this.resolveHash[q.uuid].resolve(q.data),this.resolveHash[q.uuid]=null}async _run(q,K){await this._initWorkers();const z=new Promise(((z,Y)=>{this.queue.push({id:q,arguments:K,resolve:z,reject:Y})}));return this.next(),z}next(){if(!this.queue.length)return;const q=this.getWorker();if(!q)return;const K=this.queue.pop(),z=K.id;this.resolveHash[$t]={resolve:K.resolve,reject:K.reject},q.postMessage({data:K.arguments,uuid:$t++,id:z})}};function Vt(q,K,z){q.resource.internal=!0;const Y=new X.gP(q),Q=()=>{delete K.promiseCache[z],St.has(z)&&St.remove(z)};return Y.baseTexture.once("destroyed",(()=>{z in K.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),Q())})),Y.once("destroyed",(()=>{q.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),Q())})),Y}const Wt=[".jpeg",".jpg",".png",".webp",".avif"],qt=["image/jpeg","image/png","image/webp","image/avif"];const Kt={name:"loadTextures",extension:{type:X.Ag.LoadParser,priority:Ot.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test:q=>It(q,qt)||wt(q,Wt),async load(q,K,z){const Y=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let Q;Q=Y?this.config.preferWorkers&&await Ht.isImageBitmapSupported()?await Ht.loadImageBitmap(q):await async function(q){const K=await X.W0.ADAPTER.fetch(q);if(!K.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${q}: ${K.status} ${K.statusText}`);const z=await K.blob();return await createImageBitmap(z)}(q):await new Promise(((K,z)=>{const Y=new Image;Y.crossOrigin=this.config.crossOrigin,Y.src=q,Y.complete?K(Y):(Y.onload=()=>K(Y),Y.onerror=q=>z(q))}));const Z={...K.data};Z.resolution??(Z.resolution=X.Wp.getResolutionOfUrl(q)),Y&&void 0===Z.resourceOptions?.ownsImageBitmap&&(Z.resourceOptions={...Z.resourceOptions},Z.resourceOptions.ownsImageBitmap=!0);const J=new X.t5(Q,Z);return J.resource.src=q,Vt(J,z,q)},unload(q){q.destroy(!0)}};X.XO.add(Kt);const zt={extension:{type:X.Ag.LoadParser,priority:Ot.High},name:"loadSVG",test:q=>It(q,"image/svg+xml")||wt(q,".svg"),testParse:async q=>X.$f.test(q),async parse(q,K,z){const Y=new X.$f(q,K?.data?.resourceOptions);await Y.load();const Q=new X.t5(Y,{resolution:X.Wp.getResolutionOfUrl(q),...K?.data});return Q.resource.src=K.src,Vt(Q,z,K.src)},load:async(q,K)=>(await X.W0.ADAPTER.fetch(q)).text(),unload:Kt.unload};X.XO.add(zt);const Yt=[".mp4",".m4v",".webm",".ogv"],Qt=["video/mp4","video/webm","video/ogg"],Xt={name:"loadVideo",extension:{type:X.Ag.LoadParser,priority:Ot.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test:q=>It(q,Qt)||wt(q,Yt),async load(q,K,z){let Y;const Q=await(await X.W0.ADAPTER.fetch(q)).blob(),Z=URL.createObjectURL(Q);try{const Q={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...K?.data?.resourceOptions,autoLoad:!0},J=new X.A5(Z,Q);await J.load();const tt=new X.t5(J,{alphaMode:await X.Wp.detectVideoAlphaMode(),resolution:X.Wp.getResolutionOfUrl(q),...K?.data});tt.resource.src=q,Y=Vt(tt,z,q),Y.baseTexture.once("destroyed",(()=>{URL.revokeObjectURL(Z)}))}catch(e){throw URL.revokeObjectURL(Z),e}return Y},unload(q){q.destroy(!0)}};function Zt(q,K,z,Y,Q){const X=K[z];for(let Z=0;Z{const K=q.substring(1,q.length-1).split(",");Y.push(K)})),Zt(q,Y,0,K,z)}else z.push(q);return z}X.XO.add(Xt);class te{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(q,K)=>`${q}${this._bundleIdConnector}${K}`,extractAssetIdFromBundle:(q,K)=>K.replace(`${q}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(q){if(this._bundleIdConnector=q.connector??this._bundleIdConnector,this._createBundleAssetId=q.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=q.extractAssetIdFromBundle??this._extractAssetIdFromBundle,"bar"!==this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar")))throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...q){q.forEach((q=>{this._preferredOrder.push(q),q.priority||(q.priority=Object.keys(q.params))})),this._resolverHash={}}set basePath(q){this._basePath=q}get basePath(){return this._basePath}set rootPath(q){this._rootPath=q}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(q){if("string"==typeof q)this._defaultSearchParams=q;else{const K=q;this._defaultSearchParams=Object.keys(K).map((q=>`${encodeURIComponent(q)}=${encodeURIComponent(K[q])}`)).join("&")}}getAlias(q){const{alias:K,name:z,src:Y,srcs:Q}=q;return Tt(K||z||Y||Q,(q=>"string"==typeof q?q:Array.isArray(q)?q.map((q=>q?.src??q?.srcs??q)):q?.src||q?.srcs?q.src??q.srcs:q),!0)}addManifest(q){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=q,q.bundles.forEach((q=>{this.addBundle(q.name,q.assets)}))}addBundle(q,K){const z=[];Array.isArray(K)?K.forEach((K=>{const Y=K.src??K.srcs,Q=K.alias??K.name;let X;if("string"==typeof Q){const K=this._createBundleAssetId(q,Q);z.push(K),X=[Q,K]}else{const K=Q.map((K=>this._createBundleAssetId(q,K)));z.push(...K),X=[...Q,...K]}this.add({...K,alias:X,src:Y})})):Object.keys(K).forEach((Y=>{const Q=[Y,this._createBundleAssetId(q,Y)];if("string"==typeof K[Y])this.add({alias:Q,src:K[Y]});else if(Array.isArray(K[Y]))this.add({alias:Q,src:K[Y]});else{const q=K[Y],z=q.src??q.srcs;this.add({...q,alias:Q,src:Array.isArray(z)?z:[z]})}z.push(...Q)})),this._bundles[q]=z}add(q,K,z,Y,Q){const Z=[];let J;"string"==typeof q||Array.isArray(q)&&"string"==typeof q[0]?(X.Wp.deprecation("7.2.0","Assets.add now uses an object instead of individual parameters.\nPlease use Assets.add({ alias, src, data, format, loadParser }) instead."),Z.push({alias:q,src:K,data:z,format:Y,loadParser:Q})):Array.isArray(q)?Z.push(...q):Z.push(q),J=q=>{this.hasKey(q)&&console.warn(`[Resolver] already has key: ${q} overwriting`)},Tt(Z).forEach((q=>{const{src:K,srcs:z}=q;let{data:Y,format:Q,loadParser:X}=q;const Z=Tt(K||z).map((q=>"string"==typeof q?Jt(q):Array.isArray(q)?q:[q])),tt=this.getAlias(q);Array.isArray(tt)?tt.forEach(J):J(tt);const et=[];Z.forEach((q=>{q.forEach((q=>{let K={};if("object"!=typeof q){K.src=q;for(let z=0;z{this._assetMap[q]=et}))}))}resolveBundle(q){const K=At(q);q=Tt(q);const z={};return q.forEach((q=>{const K=this._bundles[q];if(K){const Y=this.resolve(K),Q={};for(const K in Y){const z=Y[K];Q[this._extractAssetIdFromBundle(q,K)]=z}z[q]=Q}})),K?z[q[0]]:z}resolveUrl(q){const K=this.resolve(q);if("string"!=typeof q){const q={};for(const z in K)q[z]=K[z].src;return q}return K.src}resolve(q){const K=At(q);q=Tt(q);const z={};return q.forEach((q=>{if(!this._resolverHash[q])if(this._assetMap[q]){let K=this._assetMap[q];const z=K[0],Y=this._getPreferredOrder(K);Y?.priority.forEach((q=>{Y.params[q].forEach((z=>{const Y=K.filter((K=>!!K[q]&&K[q]===z));Y.length&&(K=Y)}))})),this._resolverHash[q]=K[0]??z}else this._resolverHash[q]=this.buildResolvedAsset({alias:[q],src:q},{});z[q]=this._resolverHash[q]})),K?z[q[0]]:z}hasKey(q){return!!this._assetMap[q]}hasBundle(q){return!!this._bundles[q]}_getPreferredOrder(q){for(let K=0;Kq.params.format.includes(K.format)));if(z)return z}return this._preferredOrder[0]}_appendDefaultSearchParams(q){if(!this._defaultSearchParams)return q;return`${q}${/\?/.test(q)?"&":"?"}${this._defaultSearchParams}`}buildResolvedAsset(q,K){const{aliases:z,data:Y,loadParser:Q,format:Z}=K;return(this._basePath||this._rootPath)&&(q.src=X.Wp.path.toAbsolute(q.src,this._basePath,this._rootPath)),q.alias=z??q.alias??[q.src],q.src=this._appendDefaultSearchParams(q.src),q.data={...Y||{},...q.data},q.loadParser=Q??q.loadParser,q.format=Z??q.format??X.Wp.path.extname(q.src).slice(1),q.srcs=q.src,q.name=q.alias,q}}const ee=new class{constructor(){this._detections=[],this._initialized=!1,this.resolver=new te,this.loader=new Ct,this.cache=St,this._backgroundLoader=new Et(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(q={}){if(this._initialized)return void console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");if(this._initialized=!0,q.defaultSearchParams&&this.resolver.setDefaultSearchParams(q.defaultSearchParams),q.basePath&&(this.resolver.basePath=q.basePath),q.bundleIdentifier&&this.resolver.setBundleIdentifier(q.bundleIdentifier),q.manifest){let K=q.manifest;"string"==typeof K&&(K=await this.load(K)),this.resolver.addManifest(K)}const K=q.texturePreference?.resolution??1,z="number"==typeof K?[K]:K,Y=await this._detectFormats({preferredFormats:q.texturePreference?.format,skipDetections:q.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:Y,resolution:z}}),q.preferences&&this.setPreferences(q.preferences)}add(q,K,z,Y,Q){this.resolver.add(q,K,z,Y,Q)}async load(q,K){this._initialized||await this.init();const z=At(q),Y=Tt(q).map((q=>{if("string"!=typeof q){const K=this.resolver.getAlias(q);return K.some((q=>!this.resolver.hasKey(q)))&&this.add(q),Array.isArray(K)?K[0]:K}return this.resolver.hasKey(q)||this.add({alias:q,src:q}),q})),Q=this.resolver.resolve(Y),X=await this._mapLoadToResolve(Q,K);return z?X[Y[0]]:X}addBundle(q,K){this.resolver.addBundle(q,K)}async loadBundle(q,K){this._initialized||await this.init();let z=!1;"string"==typeof q&&(z=!0,q=[q]);const Y=this.resolver.resolveBundle(q),Q={},X=Object.keys(Y);let Z=0,J=0;const tt=()=>{K?.(++Z/J)},et=X.map((q=>{const K=Y[q];return J+=Object.keys(K).length,this._mapLoadToResolve(K,tt).then((K=>{Q[q]=K}))}));return await Promise.all(et),z?Q[q[0]]:Q}async backgroundLoad(q){this._initialized||await this.init(),"string"==typeof q&&(q=[q]);const K=this.resolver.resolve(q);this._backgroundLoader.add(Object.values(K))}async backgroundLoadBundle(q){this._initialized||await this.init(),"string"==typeof q&&(q=[q]);const K=this.resolver.resolveBundle(q);Object.values(K).forEach((q=>{this._backgroundLoader.add(Object.values(q))}))}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(q){if("string"==typeof q)return St.get(q);const K={};for(let z=0;z{const z=Q[q.src],Z=[q.src];q.alias&&Z.push(...q.alias),X[Y[K]]=z,St.set(Z,z)})),X}async unload(q){this._initialized||await this.init();const K=Tt(q).map((q=>"string"!=typeof q?q.src:q)),z=this.resolver.resolve(K);await this._unloadFromResolved(z)}async unloadBundle(q){this._initialized||await this.init(),q=Tt(q);const K=this.resolver.resolveBundle(q),z=Object.keys(K).map((q=>this._unloadFromResolved(K[q])));await Promise.all(z)}async _unloadFromResolved(q){const K=Object.values(q);K.forEach((q=>{St.remove(q.src)})),await this.loader.unload(K)}async _detectFormats(q){let K=[];q.preferredFormats&&(K=Array.isArray(q.preferredFormats)?q.preferredFormats:[q.preferredFormats]);for(const z of q.detections)q.skipDetections||await z.test()?K=await z.add(K):q.skipDetections||(K=await z.remove(K));return K=K.filter(((q,z)=>K.indexOf(q)===z)),K}get detections(){return this._detections}get preferWorkers(){return Kt.config.preferWorkers}set preferWorkers(q){X.Wp.deprecation("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:q})}setPreferences(q){this.loader.parsers.forEach((K=>{K.config&&Object.keys(K.config).filter((K=>K in q)).forEach((z=>{K.config[z]=q[z]}))}))}};X.XO.handleByList(X.Ag.LoadParser,ee.loader.parsers).handleByList(X.Ag.ResolveParser,ee.resolver.parsers).handleByList(X.Ag.CacheParser,ee.cache.parsers).handleByList(X.Ag.DetectionParser,ee.detections);const ie={extension:X.Ag.CacheParser,test:q=>Array.isArray(q)&&q.every((q=>q instanceof X.gP)),getCacheableAssets:(q,K)=>{const z={};return q.forEach((q=>{K.forEach(((K,Y)=>{z[q+(0===Y?"":Y+1)]=K}))})),z}};async function se(q){if("Image"in globalThis)return new Promise((K=>{const z=new Image;z.onload=()=>{K(!0)},z.onerror=()=>{K(!1)},z.src=q}));if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const K=await(await fetch(q)).blob();await createImageBitmap(K)}catch{return!1}return!0}return!1}X.XO.add(ie);const ne={extension:{type:X.Ag.DetectionParser,priority:1},test:async()=>se("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async q=>[...q,"avif"],remove:async q=>q.filter((q=>"avif"!==q))};X.XO.add(ne);const ae={extension:{type:X.Ag.DetectionParser,priority:0},test:async()=>se("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async q=>[...q,"webp"],remove:async q=>q.filter((q=>"webp"!==q))};X.XO.add(ae);const re=["png","jpg","jpeg"],oe={extension:{type:X.Ag.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async q=>[...q,...re],remove:async q=>q.filter((q=>!re.includes(q)))};X.XO.add(oe);const he="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function ce(q){return!he&&""!==document.createElement("video").canPlayType(q)}const de={extension:{type:X.Ag.DetectionParser,priority:0},test:async()=>ce("video/webm"),add:async q=>[...q,"webm"],remove:async q=>q.filter((q=>"webm"!==q))};X.XO.add(de);const le={extension:{type:X.Ag.DetectionParser,priority:0},test:async()=>ce("video/mp4"),add:async q=>[...q,"mp4","m4v"],remove:async q=>q.filter((q=>"mp4"!==q&&"m4v"!==q))};X.XO.add(le);const ue={extension:{type:X.Ag.DetectionParser,priority:0},test:async()=>ce("video/ogg"),add:async q=>[...q,"ogv"],remove:async q=>q.filter((q=>"ogv"!==q))};X.XO.add(ue);const fe={extension:X.Ag.ResolveParser,test:Kt.test,parse:q=>({resolution:parseFloat(X.W0.RETINA_PREFIX.exec(q)?.[1]??"1"),format:X.Wp.path.extname(q).slice(1),src:q})};X.XO.add(fe);const be=q=>{const K=q.src;return q?.alias?.[0]??X.Wp.path.basename(K,X.Wp.path.extname(K))},pe={extension:X.Ag.Asset,detection:{test:async()=>!0,add:async q=>[...q,...st.filter((q=>at[q]))],remove:async q=>q.filter((K=>q.includes(K)))},loader:{extension:{type:[X.Ag.LoadParser],priority:Ot.High},test(q){const K=X.Wp.path.extname(q).slice(1);return!!at[K]||nt.some((K=>q.startsWith(`data:${K}`)))},async load(q,K){const z=await new Promise(((z,Y)=>bt.from({...K.data,url:q,preload:!0,loaded(q,Q){q?Y(q):z(Q),K.data?.loaded?.(q,Q)}})));return Q().add(be(K),z),z},async unload(q,K){Q().remove(be(K))}}};X.XO.add(pe);const ve=function(q){return Y=q,q}(new class{constructor(){this.init()}init(){return this.supported&&(this._webAudioContext=new vt),this._htmlAudioContext=new pt,this._sounds={},this.useLegacy=!this.supported,this}get context(){return this._context}get filtersAll(){return this.useLegacy?[]:this._context.filters}set filtersAll(q){this.useLegacy||(this._context.filters=q)}get supported(){return null!==vt.AudioContext}add(q,K){if("object"==typeof q){const z={};for(const Y in q){const Q=this._getOptions(q[Y],K);z[Y]=this.add(Y,Q)}return z}if(console.assert(!this._sounds[q],`Sound with alias ${q} already exists.`),K instanceof bt)return this._sounds[q]=K,K;const z=this._getOptions(K),Y=bt.from(z);return this._sounds[q]=Y,Y}_getOptions(q,K){let z;return z="string"==typeof q||Array.isArray(q)?{url:q}:q instanceof ArrayBuffer||q instanceof AudioBuffer||q instanceof HTMLAudioElement?{source:q}:q,z={...z,...K||{}},z}get useLegacy(){return this._useLegacy}set useLegacy(q){this._useLegacy=q,this._context=!q&&this.supported?this._webAudioContext:this._htmlAudioContext}get disableAutoPause(){return!this._webAudioContext.autoPause}set disableAutoPause(q){this._webAudioContext.autoPause=!q}remove(q){return this.exists(q,!0),this._sounds[q].destroy(),delete this._sounds[q],this}get volumeAll(){return this._context.volume}set volumeAll(q){this._context.volume=q,this._context.refresh()}get speedAll(){return this._context.speed}set speedAll(q){this._context.speed=q,this._context.refresh()}togglePauseAll(){return this._context.togglePause()}pauseAll(){return this._context.paused=!0,this._context.refreshPaused(),this}resumeAll(){return this._context.paused=!1,this._context.refreshPaused(),this}toggleMuteAll(){return this._context.toggleMute()}muteAll(){return this._context.muted=!0,this._context.refresh(),this}unmuteAll(){return this._context.muted=!1,this._context.refresh(),this}removeAll(){for(const q in this._sounds)this._sounds[q].destroy(),delete this._sounds[q];return this}stopAll(){for(const q in this._sounds)this._sounds[q].stop();return this}exists(q,K=!1){const z=!!this._sounds[q];return K&&console.assert(z,`No sound matching alias '${q}'.`),z}isPlaying(){for(const q in this._sounds)if(this._sounds[q].isPlaying)return!0;return!1}find(q){return this.exists(q,!0),this._sounds[q]}play(q,K){return this.find(q).play(K)}stop(q){return this.find(q).stop()}pause(q){return this.find(q).pause()}resume(q){return this.find(q).resume()}volume(q,K){const z=this.find(q);return void 0!==K&&(z.volume=K),z.volume}speed(q,K){const z=this.find(q);return void 0!==K&&(z.speed=K),z.speed}duration(q){return this.find(q).duration}close(){return this.removeAll(),this._sounds=null,this._webAudioContext&&(this._webAudioContext.destroy(),this._webAudioContext=null),this._htmlAudioContext&&(this._htmlAudioContext.destroy(),this._htmlAudioContext=null),this._context=null,this}})},1858:q=>{"use strict";function K(q,K,Y){Y=Y||2;var X,Z,J,tt,st,nt,rt,ot=K&&K.length,ht=ot?K[0]*Y:q.length,ct=z(q,0,ht,Y,!0),dt=[];if(!ct||ct.next===ct.prev)return dt;if(ot&&(ct=function(q,K,Y,Q){var X,Z,J,tt=[];for(X=0,Z=K.length;X80*Y){X=J=q[0],Z=tt=q[1];for(var lt=Y;ltJ&&(J=st),nt>tt&&(tt=nt);rt=0!==(rt=Math.max(J-X,tt-Z))?32767/rt:0}return Q(ct,dt,Y,X,Z,rt,0),dt}function z(q,K,z,Y,Q){var X,Z;if(Q===mt(q,K,z,Y)>0)for(X=K;X=K;X-=Y)Z=pt(X,q[X],q[X+1],Z);return Z&&ct(Z,Z.next)&&(vt(Z),Z=Z.next),Z}function Y(q,K){if(!q)return q;K||(K=q);var z,Y=q;do{if(z=!1,Y.steiner||!ct(Y,Y.next)&&0!==ht(Y.prev,Y,Y.next))Y=Y.next;else{if(vt(Y),(Y=K=Y.prev)===Y.next)break;z=!0}}while(z||Y!==K);return K}function Q(q,K,z,et,it,st,at){if(q){!at&&st&&function(q,K,z,Y){var Q=q;do{0===Q.z&&(Q.z=nt(Q.x,Q.y,K,z,Y)),Q.prevZ=Q.prev,Q.nextZ=Q.next,Q=Q.next}while(Q!==q);Q.prevZ.nextZ=null,Q.prevZ=null,function(q){var K,z,Y,Q,X,Z,J,tt,et=1;do{for(z=q,q=null,X=null,Z=0;z;){for(Z++,Y=z,J=0,K=0;K0||tt>0&&Y;)0!==J&&(0===tt||!Y||z.z<=Y.z)?(Q=z,z=z.nextZ,J--):(Q=Y,Y=Y.nextZ,tt--),X?X.nextZ=Q:q=Q,Q.prevZ=X,X=Q;z=Y}X.nextZ=null,et*=2}while(Z>1)}(Q)}(q,et,it,st);for(var rt,ot,ht=q;q.prev!==q.next;)if(rt=q.prev,ot=q.next,st?Z(q,et,it,st):X(q))K.push(rt.i/z|0),K.push(q.i/z|0),K.push(ot.i/z|0),vt(q),q=ot.next,ht=ot.next;else if((q=ot)===ht){at?1===at?Q(q=J(Y(q),K,z),K,z,et,it,st,2):2===at&&tt(q,K,z,et,it,st):Q(Y(q),K,z,et,it,st,1);break}}}function X(q){var K=q.prev,z=q,Y=q.next;if(ht(K,z,Y)>=0)return!1;for(var Q=K.x,X=z.x,Z=Y.x,J=K.y,tt=z.y,et=Y.y,it=QX?Q>Z?Q:Z:X>Z?X:Z,at=J>tt?J>et?J:et:tt>et?tt:et,ot=Y.next;ot!==K;){if(ot.x>=it&&ot.x<=nt&&ot.y>=st&&ot.y<=at&&rt(Q,J,X,tt,Z,et,ot.x,ot.y)&&ht(ot.prev,ot,ot.next)>=0)return!1;ot=ot.next}return!0}function Z(q,K,z,Y){var Q=q.prev,X=q,Z=q.next;if(ht(Q,X,Z)>=0)return!1;for(var J=Q.x,tt=X.x,et=Z.x,it=Q.y,st=X.y,at=Z.y,ot=Jtt?J>et?J:et:tt>et?tt:et,lt=it>st?it>at?it:at:st>at?st:at,ut=nt(ot,ct,K,z,Y),ft=nt(dt,lt,K,z,Y),bt=q.prevZ,pt=q.nextZ;bt&&bt.z>=ut&&pt&&pt.z<=ft;){if(bt.x>=ot&&bt.x<=dt&&bt.y>=ct&&bt.y<=lt&&bt!==Q&&bt!==Z&&rt(J,it,tt,st,et,at,bt.x,bt.y)&&ht(bt.prev,bt,bt.next)>=0)return!1;if(bt=bt.prevZ,pt.x>=ot&&pt.x<=dt&&pt.y>=ct&&pt.y<=lt&&pt!==Q&&pt!==Z&&rt(J,it,tt,st,et,at,pt.x,pt.y)&&ht(pt.prev,pt,pt.next)>=0)return!1;pt=pt.nextZ}for(;bt&&bt.z>=ut;){if(bt.x>=ot&&bt.x<=dt&&bt.y>=ct&&bt.y<=lt&&bt!==Q&&bt!==Z&&rt(J,it,tt,st,et,at,bt.x,bt.y)&&ht(bt.prev,bt,bt.next)>=0)return!1;bt=bt.prevZ}for(;pt&&pt.z<=ft;){if(pt.x>=ot&&pt.x<=dt&&pt.y>=ct&&pt.y<=lt&&pt!==Q&&pt!==Z&&rt(J,it,tt,st,et,at,pt.x,pt.y)&&ht(pt.prev,pt,pt.next)>=0)return!1;pt=pt.nextZ}return!0}function J(q,K,z){var Q=q;do{var X=Q.prev,Z=Q.next.next;!ct(X,Z)&&dt(X,Q,Q.next,Z)&&ft(X,Z)&&ft(Z,X)&&(K.push(X.i/z|0),K.push(Q.i/z|0),K.push(Z.i/z|0),vt(Q),vt(Q.next),Q=q=Z),Q=Q.next}while(Q!==q);return Y(Q)}function tt(q,K,z,X,Z,J){var tt=q;do{for(var et=tt.next.next;et!==tt.prev;){if(tt.i!==et.i&&ot(tt,et)){var it=bt(tt,et);return tt=Y(tt,tt.next),it=Y(it,it.next),Q(tt,K,z,X,Z,J,0),void Q(it,K,z,X,Z,J,0)}et=et.next}tt=tt.next}while(tt!==q)}function et(q,K){return q.x-K.x}function it(q,K){var z=function(q,K){var z,Y=K,Q=q.x,X=q.y,Z=-1/0;do{if(X<=Y.y&&X>=Y.next.y&&Y.next.y!==Y.y){var J=Y.x+(X-Y.y)*(Y.next.x-Y.x)/(Y.next.y-Y.y);if(J<=Q&&J>Z&&(Z=J,z=Y.x=Y.x&&Y.x>=it&&Q!==Y.x&&rt(Xz.x||Y.x===z.x&&st(z,Y)))&&(z=Y,at=tt)),Y=Y.next}while(Y!==et);return z}(q,K);if(!z)return K;var Q=bt(z,q);return Y(Q,Q.next),Y(z,z.next)}function st(q,K){return ht(q.prev,q,K.prev)<0&&ht(K.next,q,q.next)<0}function nt(q,K,z,Y,Q){return(q=1431655765&((q=858993459&((q=252645135&((q=16711935&((q=(q-z)*Q|0)|q<<8))|q<<4))|q<<2))|q<<1))|(K=1431655765&((K=858993459&((K=252645135&((K=16711935&((K=(K-Y)*Q|0)|K<<8))|K<<4))|K<<2))|K<<1))<<1}function at(q){var K=q,z=q;do{(K.x=(q-Z)*(X-J)&&(q-Z)*(Y-J)>=(z-Z)*(K-J)&&(z-Z)*(X-J)>=(Q-Z)*(Y-J)}function ot(q,K){return q.next.i!==K.i&&q.prev.i!==K.i&&!function(q,K){var z=q;do{if(z.i!==q.i&&z.next.i!==q.i&&z.i!==K.i&&z.next.i!==K.i&&dt(z,z.next,q,K))return!0;z=z.next}while(z!==q);return!1}(q,K)&&(ft(q,K)&&ft(K,q)&&function(q,K){var z=q,Y=!1,Q=(q.x+K.x)/2,X=(q.y+K.y)/2;do{z.y>X!=z.next.y>X&&z.next.y!==z.y&&Q<(z.next.x-z.x)*(X-z.y)/(z.next.y-z.y)+z.x&&(Y=!Y),z=z.next}while(z!==q);return Y}(q,K)&&(ht(q.prev,q,K.prev)||ht(q,K.prev,K))||ct(q,K)&&ht(q.prev,q,q.next)>0&&ht(K.prev,K,K.next)>0)}function ht(q,K,z){return(K.y-q.y)*(z.x-K.x)-(K.x-q.x)*(z.y-K.y)}function ct(q,K){return q.x===K.x&&q.y===K.y}function dt(q,K,z,Y){var Q=ut(ht(q,K,z)),X=ut(ht(q,K,Y)),Z=ut(ht(z,Y,q)),J=ut(ht(z,Y,K));return Q!==X&&Z!==J||(!(0!==Q||!lt(q,z,K))||(!(0!==X||!lt(q,Y,K))||(!(0!==Z||!lt(z,q,Y))||!(0!==J||!lt(z,K,Y)))))}function lt(q,K,z){return K.x<=Math.max(q.x,z.x)&&K.x>=Math.min(q.x,z.x)&&K.y<=Math.max(q.y,z.y)&&K.y>=Math.min(q.y,z.y)}function ut(q){return q>0?1:q<0?-1:0}function ft(q,K){return ht(q.prev,q,q.next)<0?ht(q,K,q.next)>=0&&ht(q,q.prev,K)>=0:ht(q,K,q.prev)<0||ht(q,q.next,K)<0}function bt(q,K){var z=new gt(q.i,q.x,q.y),Y=new gt(K.i,K.x,K.y),Q=q.next,X=K.prev;return q.next=K,K.prev=q,z.next=Q,Q.prev=z,Y.next=z,z.prev=Y,X.next=Y,Y.prev=X,Y}function pt(q,K,z,Y){var Q=new gt(q,K,z);return Y?(Q.next=Y.next,Q.prev=Y,Y.next.prev=Q,Y.next=Q):(Q.prev=Q,Q.next=Q),Q}function vt(q){q.next.prev=q.prev,q.prev.next=q.next,q.prevZ&&(q.prevZ.nextZ=q.nextZ),q.nextZ&&(q.nextZ.prevZ=q.prevZ)}function gt(q,K,z){this.i=q,this.x=K,this.y=z,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function mt(q,K,z,Y){for(var Q=0,X=K,Z=z-Y;X0&&(Y+=q[Q-1].length,z.holes.push(Y))}return z}},15369:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.catalystSDK=void 0;var Y=z(83387),Q=z(52931),X=z(71195),Z=z(6818),J=z(37367),tt=z(24445),et=z(2895),it=z(83976),st=z(79140),nt=function(){function q(){}return Object.defineProperty(q.prototype,"genericRequest",{get:function(){return this._genericRequest.reset(),this._genericRequest},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"cloudScript",{get:function(){return new Y.CloudScript(this._genericRequest)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"featureAccess",{get:function(){return this._featureAccess.reset(),this._featureAccess},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"authHandler",{get:function(){return this._authHandler.reset(),this._authHandler},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"mailer",{get:function(){return this._mailer.reset(),this._mailer},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"gameAssetsExperiments",{get:function(){return this._gameAssetsExperiments.reset(),this._gameAssetsExperiments},enumerable:!1,configurable:!0}),q.prototype.init=function(q,K){if(0===q.length){throw{name:"CatalystSdk.init error",message:"No Client ID"}}Q.CommonInfo.init(q,K),this._http=new it.HttpRequest,this._authHandler=new st.AuthHandler,this._genericRequest=new et.GenericRequest(this._http,this.authHandler).useAuthorization(),this.leaderboard=new J.Leaderboard(this._genericRequest),this._featureAccess=new X.FeatureAccess(this._genericRequest,this._authHandler),this._mailer=new tt.Mailer(this._genericRequest),this._gameAssetsExperiments=new Z.GameAssetsExperiments(this._genericRequest)},q.prototype.setToken=function(q,K,z){void 0===z&&(z={header:!0,body:!1}),Q.CommonInfo.setToken(q,K,z)},q}();K.catalystSDK=new nt},32943:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.CatalystSdkError=void 0;var Y=z(95912),Q=z(6556),X=function(q){function K(z,Y,Q,X){var Z=this;return K.isCloudScriptErrorResponse(z,Q)?(Z=q.call(this,Q.result.message)||this).errorInfo=Q:Z=q.call(this,Q)||this,Y&&(Z.name=Y),Z.code=z,Z.httpStatus=X,Z}return(0,Y.__extends)(K,q),K.isCloudScriptErrorResponse=function(q,K){return q===Q.EErrorCode.ScriptError||q===Q.EErrorCode.CloudScriptRequestError},K.fromHttpStatus=function(q,z,Y){var X;switch(q){case 412:X=Q.EErrorCode.PreconditionFailed,console.warn("HTTP 412 Precondition Failed detected: ".concat(z||"Read-only Character enabled"),{httpStatus:q,message:z,name:Y,timestamp:(new Date).toISOString()});break;case 401:case 403:X=Q.EErrorCode.ReauthenticationRequired;break;case 408:case 504:X=Q.EErrorCode.RequestTimeout;break;case 429:X=Q.EErrorCode.RetryRequired;break;case 501:case 502:case 503:X=Q.EErrorCode.NotImplemented;break;default:X=q>=400&&q<500?Q.EErrorCode.RequestError:q>=500?Q.EErrorCode.ConnectionFail:Q.EErrorCode.Unknown}return new K(X,Y||"HTTP ".concat(q," Error"),z||"Request failed with status ".concat(q),q)},K.stringify=function(q){var K;return q instanceof Error?"".concat(null!==(K=q.stack)&&void 0!==K?K:q.message):JSON.stringify(q)},K.prototype.isPreconditionFailed=function(){return this.code===Q.EErrorCode.PreconditionFailed||412===this.httpStatus},K.prototype.isHttpStatus=function(q){return this.httpStatus===q},K.prototype.getUserFriendlyMessage=function(){switch(this.code){case Q.EErrorCode.PreconditionFailed:return"The request could not be completed due to a precondition failure.";case Q.EErrorCode.ReauthenticationRequired:return"Your session has expired. Please log in again.";case Q.EErrorCode.RequestTimeout:return"The request timed out. Please check your connection and try again.";case Q.EErrorCode.ConnectionFail:return"Unable to connect to the server. Please check your internet connection.";case Q.EErrorCode.RetryRequired:return"The server is busy. Please try again in a moment.";case Q.EErrorCode.GameTokenNotPresent:return"Authentication token is missing. Please log in again.";default:return this.message||"An unexpected error occurred. Please try again."}},K}(Error);K.CatalystSdkError=X},69016:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},83387:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.CloudScript=void 0;var Y=z(95912),Q=z(32943),X=z(27596),Z=z(85262),J=z(52931),tt=z(32009),et=z(6962),it=function(q){function K(K){var z=q.call(this,K)||this;return z.setServiceUrlVersion(z.getVersion()),z}return(0,Y.__extends)(K,q),K.prototype.execute=function(q,K,z){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var Q,X,Z;return(0,Y.__generator)(this,(function(Y){switch(Y.label){case 0:Q={scriptName:q,params:K},Y.label=1;case 1:return Y.trys.push([1,3,,4]),X=this.extractResponse,[4,this.request(tt.EHttpRequestType.POST,this._serviceURL,Q,z)];case 2:return[2,X.apply(this,[Y.sent()])];case 3:return Z=Y.sent(),[2,Promise.reject(Z)];case 4:return[2]}}))}))},K.prototype.extractResponse=function(q){var K=new et.HttpResponse;if(K.status=q.status,K.isOK()){var z=q.data;if(et.HttpResponse.isStatusOK(z.status))return K.data=z.result,K;throw new Q.CatalystSdkError(X.EErrorCode.ScriptError,"".concat(q.status),q.data)}if(et.HttpResponse.isClientError(K.status)){var Y=q.data;throw new Q.CatalystSdkError(X.EErrorCode.CloudScriptRequestError,"".concat(q.status),void 0!==Y.result?Y:{result:q.data})}throw new Q.CatalystSdkError(X.EErrorCode.CloudScriptRequestError,"".concat(q.status),q.data)},K.prototype.setServiceUrlVersion=function(K){return q.prototype.setVersion.call(this,K),this._serviceURL="".concat(J.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/cloudscripts.execute"),this},K.prototype.reset=function(){return q.prototype.reset.call(this),this.setServiceUrlVersion("v2"),this},K}(Z.BaseRequest);K.CloudScript=it},51901:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),(0,z(95912).__exportStar)(z(83387),K)},85262:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BaseRequest=void 0;var Y=z(95912),Q=z(2895),X=function(){function q(q){this._version="v1",this._request=null!=q?q:new Q.GenericRequest,this.reset()}return q.prototype.reset=function(){return this._request.reset(),this},q.prototype.timeoutMS=function(q){return this._request.requestTimeoutMS(q),this},q.prototype.useIdempotency=function(q){return this._request.useIdempotency(q),this},q.prototype.requestID=function(q){return this._request.requestID(q),this},q.prototype.useTokenInBody=function(q){return this._request.useTokenInBody(q),this},q.prototype.useRetry=function(q){return this._request.useRetry(q),this},q.prototype.setRetryOption=function(q){return this._request.setRetryOption(q),this},q.prototype.setVersion=function(q){return this._version=q,this},q.prototype.getVersion=function(){return this._version},q.prototype.getRetryOption=function(){return this._request.getRetryOption()},q.prototype.useCredentials=function(){return this._request.useCredentials(),this},q.prototype.request=function(q,K,z,Q,X){return(0,Y.__awaiter)(this,void 0,void 0,(function(){return(0,Y.__generator)(this,(function(Y){return[2,this._request.request(q,K,z,Q,X)]}))}))},q}();K.BaseRequest=X},52931:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.CommonInfo=void 0;var Y=z(54770),Q=function(){function q(){}return q.init=function(K,z){var Q,X;q.Tokens=new Map,q.Tokens.set("header",new Map),q.Tokens.set("body",new Map),q.ClientID=K,q.ServiceRootURL=z.serviceRootURL,q.RequestTimeout=null!==(Q=z.requestTimeout)&&void 0!==Q?Q:Y.Constants.DefaultTimeoutMS,q.UseIdempotency=null!==(X=z.useIdempotency)&&void 0!==X?X:q.UseIdempotency,(null==z?void 0:z.retryOption)&&(q.RetryOption=z.retryOption)},Object.defineProperty(q,"headerToken",{get:function(){return q.Tokens.get("header")},enumerable:!1,configurable:!0}),Object.defineProperty(q,"bodyToken",{get:function(){return q.Tokens.get("body")},enumerable:!1,configurable:!0}),q.setToken=function(K,z,Y){var Q,X;void 0===Y&&(Y={header:!0,body:!1}),Y.header&&(null===(Q=q.headerToken)||void 0===Q||Q.set(K,z)),Y.body&&(null===(X=q.bodyToken)||void 0===X||X.set(K,z))},q.UseIdempotency=!1,q}();K.CommonInfo=Q},54770:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.Constants=void 0;var z=function(){function q(){}return q.DefaultTimeoutMS=3e4,q.DefaultRetryDelayMS=5e3,q.DefaultRetryMaxDelayMS=15e3,q.DefaultRetryRequiredStatusCodes=new Set([202,408,500,502,503,504]),q.ReauthenticationRequiredStatusCodes=new Set([401]),q}();K.Constants=z},6556:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.EErrorCode=void 0,function(q){q[q.NoError=0]="NoError",q[q.Unknown=1]="Unknown",q[q.InvalidMethodType=2]="InvalidMethodType",q[q.RequestTimeout=3]="RequestTimeout",q[q.ConnectionFail=4]="ConnectionFail",q[q.RetryRequired=5]="RetryRequired",q[q.IdempotencyError=6]="IdempotencyError",q[q.NotImplemented=7]="NotImplemented",q[q.CloudScriptRequestError=8]="CloudScriptRequestError",q[q.ScriptError=9]="ScriptError",q[q.RequestError=10]="RequestError",q[q.ReauthenticationRequired=11]="ReauthenticationRequired",q[q.GameTokenNotPresent=12]="GameTokenNotPresent",q[q.PreconditionFailed=13]="PreconditionFailed"}(K.EErrorCode||(K.EErrorCode={}))},27596:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(95912);(0,Y.__exportStar)(z(85262),K),(0,Y.__exportStar)(z(52931),K),(0,Y.__exportStar)(z(54770),K),(0,Y.__exportStar)(z(6556),K)},71195:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.FeatureAccess=void 0;var Y=z(95912),Q=z(32943),X=z(27596),Z=z(85262),J=z(52931),tt=z(32009),et=function(q){function K(K,z){var Y=q.call(this,K)||this;return Y._authHandler=z,Y.setServiceUrlVersion("v2"),Y}return(0,Y.__extends)(K,q),K.prototype.getFeatures=function(){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var q,z;return(0,Y.__generator)(this,(function(Y){switch(Y.label){case 0:this.setEndpoint(K.GetFeaturesEndpoint),this.setServiceUrlEndpoint(K.GetFeaturesEndpoint),Y.label=1;case 1:return Y.trys.push([1,3,,4]),[4,this.request(tt.EHttpRequestType.GET,this._serviceURL,{clientID:J.CommonInfo.ClientID})];case 2:return q=Y.sent(),[3,4];case 3:throw z=Y.sent(),new Q.CatalystSdkError(X.EErrorCode.Unknown,"Error calling ".concat(this._serviceURL),Q.CatalystSdkError.stringify(z));case 4:if(q.isOK())return[2,q];throw new Q.CatalystSdkError(X.EErrorCode.RequestError,"Call to ".concat(this._serviceURL," failed with status ").concat(q.status),JSON.stringify(q))}}))}))},K.prototype.update=function(){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var q,z;return(0,Y.__generator)(this,(function(Y){switch(Y.label){case 0:this.setEndpoint(K.UpdateEndpoint),this.setServiceUrlEndpoint(K.UpdateEndpoint),Y.label=1;case 1:return Y.trys.push([1,3,,4]),[4,this.request(tt.EHttpRequestType.POST,this._serviceURL,{clientID:J.CommonInfo.ClientID,identityToken:this._authHandler.getIdentityToken()})];case 2:return q=Y.sent(),[3,4];case 3:throw z=Y.sent(),new Q.CatalystSdkError(X.EErrorCode.Unknown,"Error calling ".concat(this._serviceURL),Q.CatalystSdkError.stringify(z));case 4:return q.isOK()?[4,this._authHandler.renewJWT()]:[3,6];case 5:return Y.sent(),[2,q];case 6:throw new Q.CatalystSdkError(X.EErrorCode.RequestError,"Call to ".concat(this._serviceURL," failed with status ").concat(q.status),JSON.stringify(q))}}))}))},K.prototype.setEndpoint=function(q){return this._currentEndpoint=q,this},K.prototype.getEndpoint=function(){return this._currentEndpoint},K.prototype.setServiceUrlVersion=function(K){return q.prototype.setVersion.call(this,K),this._serviceURL="".concat(J.CommonInfo.ServiceRootURL,"/game-cortex-server/v2/featureAccess.").concat(this.getEndpoint()),this},K.prototype.setServiceUrlEndpoint=function(q){return this.setEndpoint(q),this._serviceURL="".concat(J.CommonInfo.ServiceRootURL,"/game-cortex-server/v2/featureAccess.").concat(this.getEndpoint()),this},K.prototype.reset=function(){return q.prototype.reset.call(this),this.setServiceUrlVersion("v2"),this},K.GetFeaturesEndpoint="getFeatures",K.UpdateEndpoint="update",K}(Z.BaseRequest);K.FeatureAccess=et},79543:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),(0,z(95912).__exportStar)(z(71195),K)},92571:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.GameAssetsExperiments=K.SourceType=void 0;var Y=z(95912),Q=z(27596),X=z(41093);!function(q){q.CMS="CMS",q.LocalAssets="LocalAssets",q.GlobalEntities="GlobalEntities"}(K.SourceType||(K.SourceType={}));var Z=function(q){function K(K){var z=q.call(this,K)||this;return q.prototype.setVersion.call(z,"v2"),z}return(0,Y.__extends)(K,q),K.prototype.getAllExperimentsWithCustomData=function(q){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var K;return(0,Y.__generator)(this,(function(z){return K="".concat(Q.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/cloudscripts.execute"),[2,this.request(X.EHttpRequestType.POST,K,{userID:q,scriptName:"assetExperiments.getAllExperimentsWithCustomData"})]}))}))},K.prototype.getAssetsForExperimentsVariations=function(q,K,z){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var Z,J;return(0,Y.__generator)(this,(function(Y){return Z="".concat(Q.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/cloudscripts.execute"),J={sourceType:q,experimentVariations:z},[2,this.request(X.EHttpRequestType.POST,Z,{userID:K,scriptName:"assetExperiments.getAssetsForExperimentsVariations",params:J})]}))}))},K}(Q.BaseRequest);K.GameAssetsExperiments=Z},6818:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),(0,z(95912).__exportStar)(z(92571),K)},79600:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(95912);(0,Y.__exportStar)(z(15369),K),(0,Y.__exportStar)(z(32943),K),(0,Y.__exportStar)(z(69016),K),(0,Y.__exportStar)(z(51901),K),(0,Y.__exportStar)(z(27596),K),(0,Y.__exportStar)(z(79543),K),(0,Y.__exportStar)(z(91801),K),(0,Y.__exportStar)(z(85108),K),(0,Y.__exportStar)(z(41093),K),(0,Y.__exportStar)(z(56230),K),(0,Y.__exportStar)(z(6818),K)},85108:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),(0,z(95912).__exportStar)(z(37367),K)},37367:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.Leaderboard=void 0;var Y=z(95912),Q=z(52931),X=function(){function q(q){this._genericRequest=q}return q.prototype.getUsers=function(){console.log("Leaderboard.getUsers"),this.call()},q.prototype.call=function(){return(0,Y.__awaiter)(this,void 0,void 0,(function(){return(0,Y.__generator)(this,(function(K){switch(K.label){case 0:return[4,this._genericRequest.request("get","".concat(Q.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(q.Version,"/call"))];case 1:return[2,K.sent()]}}))}))},q.Version="v1",q}();K.Leaderboard=X},24445:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.Mailer=void 0;var Y=z(95912),Q=z(27596),X=z(85262),Z=z(41093),J=function(q){function K(K){var z=q.call(this,K)||this;return z.setServiceUrlVersion("v1"),z}return(0,Y.__extends)(K,q),K.prototype.setServiceUrlVersion=function(K){return q.prototype.setVersion.call(this,K),this},K.prototype.listMail=function(q,K,z,X,J,tt){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var et;return(0,Y.__generator)(this,(function(Y){return et="".concat(Q.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/mailer.listMail"),[2,this.request(Z.EHttpRequestType.GET,et,{userID:q,templateID:K,limit:z,offset:X,sortBy:J,sortDirection:tt})]}))}))},K}(X.BaseRequest);K.Mailer=J},91801:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),(0,z(95912).__exportStar)(z(24445),K)},32009:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.EHttpRequestType=void 0,function(q){q.POST="post",q.GET="get",q.PUT="put",q.PATCH="patch",q.DELETE="delete",q.HEAD="head"}(K.EHttpRequestType||(K.EHttpRequestType={}))},2895:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.GenericRequest=void 0;var Y=z(95912),Q=z(32943),X=z(52931),Z=z(54770),J=z(6556),tt=z(32009),et=z(83976),it=z(61068),st=function(){function q(q,K){this._newBodyTokens=new Array,this._shouldIncludeCredentials=!1,this._shouldIncludeAuthorization=!1,this._idempotencyKeyName="Idempotency-Key",this._http=null!=q?q:new et.HttpRequest,this._authHandler=K}return Object.defineProperty(q.prototype,"idempotency",{get:function(){return this._idempotency},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"lastRequestID",{get:function(){return this._lastRequestID},enumerable:!1,configurable:!0}),q.prototype.reset=function(){var q,K,z;this._timeoutMS=X.CommonInfo.RequestTimeout,this._idempotency=X.CommonInfo.UseIdempotency,this._useRetry=(null===(q=X.CommonInfo.RetryOption)||void 0===q?void 0:q.retryCount)>0;var Y=null===(z=null===(K=X.CommonInfo.RetryOption)||void 0===K?void 0:K.retryRequiredStatusCodes)||void 0===z?void 0:z.length;return this._retryRequiredStatusCodes=Y&&Y>0?new Set(X.CommonInfo.RetryOption.retryRequiredStatusCodes):Z.Constants.DefaultRetryRequiredStatusCodes,this._lastRequestID="",this},q.prototype.requestTimeoutMS=function(q){return this._timeoutMS=q,this},q.prototype.useIdempotency=function(q){return this._idempotency=q,this},q.prototype.requestID=function(q){return this._idempotency=!0,this._newRequestID=q,this},q.prototype.useTokenInBody=function(q){var K,z;(null===(K=X.CommonInfo.headerToken)||void 0===K?void 0:K.has(q))?(null===(z=X.CommonInfo.headerToken)||void 0===z?void 0:z.get(q))?this._newBodyTokens.push(q):console.log("The token[".concat(q,"] has no value.")):console.log("Cannot find the token[".concat(q,"]"));return this},q.prototype.useRetry=function(q){return this._useRetry=q,this},q.prototype.useCredentials=function(){return this._shouldIncludeCredentials=!0,this},q.prototype.useAuthorization=function(){return this._shouldIncludeAuthorization=!0,this},q.prototype.setRetryOption=function(q){return this._useRetry=!0,this._retryOption=q,void 0!==q.retryRequiredStatusCodes&&q.retryRequiredStatusCodes.forEach(this._retryRequiredStatusCodes.add,this._retryRequiredStatusCodes),this},q.prototype.getRetryOption=function(){var q;if(this._useRetry)return null!==(q=this._retryOption)&&void 0!==q?q:X.CommonInfo.RetryOption},q.prototype.request=function(q,K,z,Q,X){var Z;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var tt,et;return(0,Y.__generator)(this,(function(Y){switch(Y.label){case 0:tt="string"==typeof q?this.stringToHttpRequestType(q):q,this._idempotency&&(this._lastRequestID=null!==(Z=this._newRequestID)&&void 0!==Z?Z:this.uuidv4(),this._newRequestID=void 0),Y.label=1;case 1:return Y.trys.push([1,3,,6]),[4,this.sendRequest(tt,K,z,Q,X)];case 2:return[2,Y.sent()];case 3:return(et=Y.sent()).code===J.EErrorCode.ReauthenticationRequired&&this._authHandler?[4,this._authHandler.renewJWT()]:[3,5];case 4:return Y.sent(),[2,this.sendRequest(tt,K,z,Q,X)];case 5:throw et;case 6:return[2]}}))}))},q.prototype.sendRequest=function(q,K,z,X,Z){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var tt,et,st,nt,at;return(0,Y.__generator)(this,(function(rt){switch(rt.label){case 0:if((tt=new it.HttpRequestInfo(q,K)).timeoutMS=this._timeoutMS,tt.shouldIncludeCredentials=this._shouldIncludeCredentials,this._shouldIncludeAuthorization){if(!this._authHandler)throw new Q.CatalystSdkError(J.EErrorCode.GameTokenNotPresent,void 0,"Attempt to call SDK while request does not have access to auth handler");if(!(et=this._authHandler.getGameJWT()))throw st=0===this._authHandler.getUserID()?"user is not logged in yet":"user is logged out",new Q.CatalystSdkError(J.EErrorCode.GameTokenNotPresent,void 0,"Attempt to call SDK while ".concat(st));tt.addHeader("Authorization",et)}return nt=z,this._idempotency&&(nt=(0,Y.__assign)((0,Y.__assign)({},nt),{requestID:this._lastRequestID}),tt.addHeader(this._idempotencyKeyName,this._lastRequestID)),this._newBodyTokens.length>0&&this._newBodyTokens.forEach((function(q){return tt.useTokenInBody(q)})),nt&&tt.setBody(nt),Z&&tt.setUrlSearchParamsBody(Z),(at=null!=X?X:this.getRetryOption())&&(tt.retryOption=at,tt.retryRequiredStatusCodes=this._retryRequiredStatusCodes),[4,this._http.send(tt)];case 1:return[2,rt.sent()]}}))}))},q.prototype.stringToHttpRequestType=function(q){var K=tt.EHttpRequestType.POST;switch(q.toLowerCase()){case"get":K=tt.EHttpRequestType.GET;break;case"post":K=tt.EHttpRequestType.POST;break;default:throw new Q.CatalystSdkError(J.EErrorCode.InvalidMethodType,"GenericRequest.stringToHttpRequestType","undefined request method type: ".concat(q))}return K},q.prototype.uuidv4=function(){return"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,(function(q){return(parseInt(q)^crypto.getRandomValues(new Uint8Array(1))[0]&15>>parseInt(q)/4).toString(16)}))},q}();K.GenericRequest=st},83976:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.HttpRequest=void 0;var Y=z(95912),Q=z(32943),X=z(54770),Z=z(6556),J=z(6962),tt=function(){function q(){}return q.prototype.send=function(q){var K,z,Q,J;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var tt,et;return(0,Y.__generator)(this,(function(Y){switch(Y.label){case 0:void 0!==q&&(this._requestInfo=q,this._retryCount=null!==(z=null===(K=this._requestInfo.retryOption)||void 0===K?void 0:K.retryCount)&&void 0!==z?z:0,this._retryDelayMS=null!==(J=null===(Q=this._requestInfo.retryOption)||void 0===Q?void 0:Q.retryIntervalMS)&&void 0!==J?J:X.Constants.DefaultRetryDelayMS),Y.label=1;case 1:return Y.trys.push([1,3,,7]),[4,this.fetch(this._requestInfo)];case 2:return[2,Y.sent()];case 3:if(tt=Y.sent(),et=!1,void 0!==tt.code)switch(tt.code){case Z.EErrorCode.RequestTimeout:case Z.EErrorCode.RetryRequired:et=!0}else et=!0;return et&&this._retryCount>0?(--this._retryCount,[4,this.waitInterval(this._retryDelayMS)]):[3,5];case 4:return Y.sent(),this.updateRetryInterval(),[2,this.send()];case 5:return[2,Promise.reject(tt)];case 6:return[3,7];case 7:return[2]}}))}))},q.prototype.fetch=function(q){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var K;return(0,Y.__generator)(this,(function(z){switch(z.label){case 0:return[4,Promise.race([fetch(q.getURL(),q.getRequestInit()),this.waitInterval(q.timeoutMS)])];case 1:if(K=z.sent(),clearTimeout(this._timerID),K instanceof Response){if(X.Constants.ReauthenticationRequiredStatusCodes.has(K.status))throw new Q.CatalystSdkError(Z.EErrorCode.ReauthenticationRequired,"".concat(K.status),"the status ".concat(K.status," requires reauthentication."));if(this.isRetryRequired(K.status))throw new Q.CatalystSdkError(Z.EErrorCode.RetryRequired,"".concat(K.status),"the status ".concat(K.status," requires retry."));return[2,(new J.HttpResponse).set(K)]}throw"number"==typeof K?new Q.CatalystSdkError(Z.EErrorCode.RequestTimeout):new Q.CatalystSdkError(Z.EErrorCode.Unknown)}}))}))},q.prototype.waitInterval=function(q){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var K=this;return(0,Y.__generator)(this,(function(z){return[2,new Promise((function(z){K._timerID=setTimeout((function(){return z(0)}),q)}))]}))}))},q.prototype.updateRetryInterval=function(){var q,K,z,Y;this._retryDelayMS=Math.min(this._retryDelayMS+(null!==(K=null===(q=this._requestInfo.retryOption)||void 0===q?void 0:q.retryIncreamentMS)&&void 0!==K?K:0),null!==(Y=null===(z=this._requestInfo.retryOption)||void 0===z?void 0:z.retryMaxDelayMS)&&void 0!==Y?Y:X.Constants.DefaultRetryMaxDelayMS)},q.prototype.isRetryRequired=function(q){var K;return null===(K=this._requestInfo.retryRequiredStatusCodes)||void 0===K?void 0:K.has(q)},q}();K.HttpRequest=tt},61068:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.HttpRequestInfo=void 0;var Y=z(95912),Q=z(52931),X=z(32009),Z=function(){function q(q,K,z){var Y,X=this;this.timeoutMS=Q.CommonInfo.RequestTimeout,this._queryParameters=new Map,this._newBodyTokens=new Map,this.shouldIncludeCredentials=!1,this._method=q,this._url=this.ensureUrlHasProtocol(K),this._header=null!=z?z:{},null===(Y=Q.CommonInfo.headerToken)||void 0===Y||Y.forEach((function(q,K){X._header[K]=q}))}return q.prototype.addHeader=function(q,K){return this._header[q]=K,this},q.prototype.getHeader=function(q){return this._header[q]},q.prototype.useTokenInBody=function(q){var K,z;if(null===(K=Q.CommonInfo.headerToken)||void 0===K?void 0:K.has(q)){var Y=null===(z=Q.CommonInfo.headerToken)||void 0===z?void 0:z.get(q);Y?this._newBodyTokens.set(q,Y):console.log("The token[".concat(q,"] has no value."))}else console.log("Cannot find the token[".concat(q,"]"));return this},q.prototype.addQueryParameter=function(q,K){return this._queryParameters.set(q,K),this},q.prototype.setBody=function(q){var K,z=(0,Y.__assign)((0,Y.__assign)({},q),{clientID:Q.CommonInfo.ClientID});if(null===(K=Q.CommonInfo.bodyToken)||void 0===K||K.forEach((function(q,K){z[K]=q})),this._newBodyTokens.size>0&&this._newBodyTokens.forEach((function(q,K){return z[K]=q})),this._method===X.EHttpRequestType.GET)for(var Z in z)"object"!=typeof z[Z]&&(void 0!==z[Z]&&this.addQueryParameter(Z,z[Z]),delete z[Z]);return 0!==Object.keys(z).length&&(this.addHeader("Content-Type","application/json"),this._body=z),this},q.prototype.setUrlSearchParamsBody=function(q){this._method!==X.EHttpRequestType.GET&&this.addHeader("Content-Type","application/x-www-form-urlencoded"),this._body=q},q.prototype.getBody=function(){return JSON.stringify(this._body)},q.prototype.getURL=function(){var q=this._url;if(this._queryParameters.size>0){var K=[];this._queryParameters.forEach((function(q,z){K.push("".concat(encodeURIComponent(z),"=").concat(encodeURIComponent(q)))})),q+="".concat(-1!==this._url.indexOf("?")?"&":"?").concat(K.join("&"))}return q},q.prototype.getRequestInit=function(){var q={method:this._method,headers:this._header,redirect:"follow"};return this.shouldIncludeCredentials&&(q.credentials="include"),void 0!==this._body&&("application/json"===this._header["Content-Type"]?q.body=JSON.stringify(this._body):("application/x-www-form-urlencoded"===this._header["Content-Type"]&&(q.headers={"Content-Type":"application/x-www-form-urlencoded"},q.credentials="omit"),q.body=this._body)),q},q.prototype.ensureUrlHasProtocol=function(q){return/^https?/.exec(q)?q:"https://".concat(q)},q}();K.HttpRequestInfo=Z},20153:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},6962:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.HttpResponse=void 0;var Y=z(95912),Q=z(32943),X=z(6556),Z=function(){function q(){}return q.prototype.set=function(q){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var K,z,Z;return(0,Y.__generator)(this,(function(Y){switch(Y.label){case 0:return this.status=q.status,K=this,[4,this.obtainArrayBuffer(q)];case 1:if(K._body=Y.sent(),z=this._body.byteLength>0?this.decodeData(this._body):"",null==(Z=q.headers.get("Content-Type"))?void 0:Z.startsWith("application/json"))this.data=JSON.parse(z);else if("application/octet-stream"===Z)throw new Q.CatalystSdkError(X.EErrorCode.NotImplemented,"HttpResponse.set","Not implemented yet. ".concat(Z));return[2,this]}}))}))},Object.defineProperty(q.prototype,"requestID",{get:function(){var q;return null===(q=this.data)||void 0===q?void 0:q.requestID},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),q.prototype.isOK=function(){return q.isStatusOK(this.status)},q.prototype.obtainArrayBuffer=function(q){return(0,Y.__awaiter)(this,void 0,void 0,(function(){return(0,Y.__generator)(this,(function(K){return[2,q.arrayBuffer()]}))}))},q.prototype.decodeData=function(q){try{return(new TextDecoder).decode(q)}catch(K){return(new(z(40537).TextDecoder)).decode(q)}},q.isStatusOK=function(q){return"number"==typeof q&&(q>=200&&q<300)},q.isClientError=function(q){return q>=400&&q<500},q}();K.HttpResponse=Z},41093:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(95912);(0,Y.__exportStar)(z(32009),K),(0,Y.__exportStar)(z(2895),K),(0,Y.__exportStar)(z(83976),K),(0,Y.__exportStar)(z(61068),K),(0,Y.__exportStar)(z(20153),K),(0,Y.__exportStar)(z(6962),K)},79140:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.AuthHandler=void 0;var Y,Q=z(95912),X=(0,Q.__importStar)(z(78686)),Z=z(32943),J=z(27596),tt=z(85262),et=z(52931),it=z(32009),st=(0,Q.__importStar)(z(33770));!function(q){q.Login="coreGame.login",q.RenewJWT="coreGame.renewJWT",q.RenewIdentity="/oauth/token",q.SetSession="coreGame.setSession"}(Y||(Y={}));var nt=function(q){function K(K){var z=q.call(this,K)||this;z.IsWorkerEnabled=!1,z._authInfo=null,z._serviceWorkerName="jwt-renewal-worker",z._renewJWTTimerID=null,z._renewIdentityTimerID=null,z._callbacks={},z._identityUri="";try{X.defaults.storage=sessionStorage,z._worker=st.createServiceWorker(z._serviceWorkerName),z.IsWorkerEnabled=!0,z.registerWorkerListener()}catch(Y){z.IsWorkerEnabled=!1,console.log("Could not create Worker",Y)}return z}return(0,Q.__extends)(K,q),K.prototype.reset=function(){return q.prototype.reset.call(this),this.setServiceUrlVersion(K.Version),this},K.prototype.setAuthInfo=function(q){this._authInfo=q},K.prototype.getUserID=function(){var q,K;return null!==(K=null===(q=this._authInfo)||void 0===q?void 0:q.userID)&&void 0!==K?K:0},K.prototype.getIdentityToken=function(){var q,K;return null!==(K=null===(q=this._authInfo)||void 0===q?void 0:q.identityToken)&&void 0!==K?K:""},K.prototype.setIdentityToken=function(q){this._authInfo&&(this._authInfo.identityToken=q)},K.prototype.getRefreshToken=function(){var q,K;return null!==(K=null===(q=this._authInfo)||void 0===q?void 0:q.refreshToken)&&void 0!==K?K:""},K.prototype.setRefreshToken=function(q){this._authInfo&&(this._authInfo.refreshToken=q)},K.prototype.getAuthToken=function(){var q,K;return null!==(K=null===(q=this._authInfo)||void 0===q?void 0:q.authToken)&&void 0!==K?K:""},K.prototype.getPremises=function(){var q,K;return null!==(K=null===(q=this._authInfo)||void 0===q?void 0:q.premises)&&void 0!==K?K:""},K.prototype.setIdentityUri=function(q){this._identityUri=q},K.prototype.getIdentityUri=function(){return this._identityUri},K.prototype.getTimeToExpireMS=function(q){var z=q.exp,Y=q.iat;if(!z||0===Y&&isNaN(Y))return K.TimeToExpireDefaultMS;var Q=1e3*(z-Y);return Math.max(Q-K.TokenExpiryTimeOffsetMS,K.TokenExpiryTimeOffsetMS)},K.prototype.handleRequestError=function(q,K,z){var Y,Q,X,tt;if(q instanceof Z.CatalystSdkError)return 412===q.httpStatus&&(null===(Q=(Y=this._callbacks).onPreconditionFailed)||void 0===Q||Q.call(Y,q)),q;if(q instanceof TypeError&&q.message.includes("Failed to fetch"))return new Z.CatalystSdkError(J.EErrorCode.ConnectionFail,K,"Network error: Failed to fetch ".concat(z));if(q&&"object"==typeof q&&"status"in q){var et=q,it=et.message||et.statusText||"Request to ".concat(z," failed"),st=Z.CatalystSdkError.fromHttpStatus(et.status,it,K);return 412===et.status&&(null===(tt=(X=this._callbacks).onPreconditionFailed)||void 0===tt||tt.call(X,st)),st}return new Z.CatalystSdkError(J.EErrorCode.Unknown,K,"Unknown error: ".concat(Z.CatalystSdkError.stringify(q)))},K.prototype.login=function(q){var z,X;return(0,Q.__awaiter)(this,void 0,void 0,(function(){var Z,J,tt,et,st,nt;return(0,Q.__generator)(this,(function(at){switch(at.label){case 0:J=this.getRequestURL(Y.Login),tt=null;try{tt=null!==(z=this.getSessionCodeFromUrl())&&void 0!==z?z:window.localStorage.getItem(K.SessionCodeKey)}catch(rt){console.log("error getting session code from local storage",rt)}et={metadata:{}},tt&&(et.code=tt),q&&(et.metadata=(0,Q.__assign)({},q)),(st=null!==(X=localStorage.getItem("ajs_anonymous_id"))&&void 0!==X?X:void 0)&&(et.metadata.anonymousID=st),at.label=1;case 1:return at.trys.push([1,3,,4]),this._request.useCredentials(),[4,this.request(it.EHttpRequestType.POST,J,et)];case 2:return Z=at.sent(),[3,4];case 3:throw nt=at.sent(),this.handleRequestError(nt,"LoginError",J);case 4:return this.processTokenResponse(Z,J),[2,Z]}}))}))},K.prototype.logout=function(){var q,K;this.clearRenewTimer(this._renewJWTTimerID),this.clearRenewTimer(this._renewIdentityTimerID),this.IsWorkerEnabled?this._worker.terminate():(this._renewIdentityTimerID=null,this._renewJWTTimerID=null),X.forget(),this._authInfo=null,null===(K=(q=this._callbacks).onLogout)||void 0===K||K.call(q)},K.prototype.isLoggedIn=function(){var q=X.remember();return this.isValid(q)},K.prototype.setSession=function(){var q,K;return(0,Q.__awaiter)(this,void 0,void 0,(function(){var z,X,tt,st,nt,at;return(0,Q.__generator)(this,(function(Q){switch(Q.label){case 0:if(!this._authInfo)throw new Z.CatalystSdkError(J.EErrorCode.Unknown,"AuthHandler.setSession()","setSession() called without authInfo");X=this.getRequestRetryOptions(),tt=this.getRequestURL(Y.SetSession),st={client_id:et.CommonInfo.ClientID,identity_uri:this.getIdentityUri(),identity_token:this.getIdentityToken(),refresh_token:this.getRefreshToken(),profile:{premises:this.getPremises()}},Q.label=1;case 1:return Q.trys.push([1,3,,4]),[4,this.setServiceUrlVersion("v1").setRetryOption(X).request(it.EHttpRequestType.POST,tt,st)];case 2:return z=Q.sent(),[3,4];case 3:throw nt=Q.sent(),this.handleRequestError(nt,"SetSessionError",tt);case 4:if(!(null==z?void 0:z.isOK()))throw(at=Z.CatalystSdkError.fromHttpStatus((null==z?void 0:z.status)||0,"Call to ".concat(tt," failed"),"SetSessionError")).isPreconditionFailed()&&(null===(K=(q=this._callbacks).onPreconditionFailed)||void 0===K||K.call(q,at)),at;return[2,z]}}))}))},K.prototype.renewJWT=function(){var q,K;return(0,Q.__awaiter)(this,void 0,void 0,(function(){var z,tt,et,st,nt,at,rt,ot,ht;return(0,Q.__generator)(this,(function(Q){switch(Q.label){case 0:this.clearRenewTimer(this._renewJWTTimerID),Q.label=1;case 1:if(Q.trys.push([1,6,,7]),!this._authInfo)throw new Z.CatalystSdkError(J.EErrorCode.Unknown,"AuthHandler.renewJWT()","renewJWT() is called without authInfo");z=void 0,tt=this._authInfo,et=tt.userID,st=tt.authToken,this.setServiceUrlVersion("v2"),nt=this.getRequestURL("".concat(Y.RenewJWT,"/").concat(et)),Q.label=2;case 2:return Q.trys.push([2,4,,5]),at=this.getRequestRetryOptions(),[4,this.setRetryOption(at).request(it.EHttpRequestType.POST,nt,{token:st})];case 3:return z=Q.sent(),[3,5];case 4:throw rt=Q.sent(),this.handleRequestError(rt,"RenewJWTError",nt);case 5:return this.processTokenResponse(z,nt),[3,7];case 6:throw ot=Q.sent(),X.forget(),ht=ot instanceof Z.CatalystSdkError?ot:this.handleRequestError(ot,"RenewJWTError","renewJWT"),null===(K=(q=this._callbacks).onRenewJWTError)||void 0===K||K.call(q,ht),ot;case 7:return[2]}}))}))},K.prototype.renewIdentityJWT=function(){var q,K;return(0,Q.__awaiter)(this,void 0,void 0,(function(){var z,Y,X,J,tt,et,st,nt;return(0,Q.__generator)(this,(function(Q){switch(Q.label){case 0:this.clearRenewTimer(this._renewIdentityTimerID),this.IsWorkerEnabled||(this._renewIdentityTimerID=null),Q.label=1;case 1:Q.trys.push([1,6,,7]),z=void 0,Y=this.getIdentityTokenRenewalRequest(),X=Y.url,J=Y.params,X.searchParams.append("version","1"),Q.label=2;case 2:return Q.trys.push([2,4,,5]),tt=this.getRequestRetryOptions(),[4,this.request(it.EHttpRequestType.POST,X.toString(),{},tt,J)];case 3:return z=Q.sent(),[3,5];case 4:throw et=Q.sent(),this.handleRequestError(et,"RenewIdentityJWTError",X.toString());case 5:return this.processIdentityResponse(z),[3,7];case 6:throw st=Q.sent(),nt=st instanceof Z.CatalystSdkError?st:this.handleRequestError(st,"RenewIdentityJWTError","renewIdentityJWT"),null===(K=(q=this._callbacks).onRenewJWTError)||void 0===K||K.call(q,nt),st;case 7:return[2]}}))}))},K.prototype.getRequestRetryOptions=function(){return{retryCount:10,retryIncreamentMS:2e3,retryMaxDelayMS:K.TokenExpiryTimeOffsetMS}},K.prototype.setServiceUrlVersion=function(K){return q.prototype.setVersion.call(this,K),this._serviceURL="".concat(et.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/"),this},K.prototype.getRequestURL=function(q){return"".concat(this._serviceURL).concat(q)},K.prototype.getJWT=function(){var q,K;return null!==(K=null===(q=this._authInfo)||void 0===q?void 0:q.token)&&void 0!==K?K:""},K.prototype.validateAndExtractJWT=function(q){var K=X.read(q);if(this.isValid(K))return K;throw new Z.CatalystSdkError(J.EErrorCode.Unknown,"AuthHandler.processJWT()","jwtSessions is invalid")},K.prototype.setGameJWT=function(q){var K,z,Q,Z;if(!q.data.token)return!1;try{var J=this.validateAndExtractJWT(q.data.token),tt=J.claim;X.keep(J);var et=this.getUserID(),it={userID:et,token:this.getAuthToken()};this.setServiceUrlVersion("v2");var st=this.getRequestURL("".concat(Y.RenewJWT,"/").concat(et));return this.IsWorkerEnabled?this.setRenewJWTTimer(tt):this._renewJWTTimerID=this.setRenewJWTTimerWithSetInterval(tt,it,st,this._renewJWTTimerID,void 0),null===(z=(K=this._callbacks).onSetJWT)||void 0===z||z.call(K,"Bearer ".concat(q.data.token)),!0}catch(nt){return null===(Z=(Q=this._callbacks).onSetJWTError)||void 0===Z||Z.call(Q,nt),!1}},K.prototype.getGameJWT=function(){return X.get()},K.prototype.processTokenResponse=function(q,z){var Y,Q;if(!(null==q?void 0:q.isOK())){var X=Z.CatalystSdkError.fromHttpStatus((null==q?void 0:q.status)||0,"Call to ".concat(z," failed with status ").concat(null==q?void 0:q.status),"processTokenResponse");throw 412===(null==q?void 0:q.status)&&(null===(Q=(Y=this._callbacks).onPreconditionFailed)||void 0===Q||Q.call(Y,X)),X}if(!this.setGameJWT(q))throw new Z.CatalystSdkError(J.EErrorCode.RequestError,"Failed to set JWT ".concat(q.data.token));if(void 0!==q.data.userID){var tt=q;this.setAuthInfo(tt.data),et.CommonInfo.setToken(K.TokenKeyUserID,"".concat(tt.data.userID),{header:!1,body:!0}),et.CommonInfo.IdentityClientId=tt.data.identityClientId,this.setIdentityUri(tt.data.identityUri),this.setIdentityJWT(tt.data.identityToken)}},K.prototype.setIdentityJWT=function(q){if(!q)return!1;try{var z=this.validateAndExtractJWT(q).claim;et.CommonInfo.setToken(K.TokenKeyIdentity,q,{header:!1,body:!1});var Y=this.getTimeToExpireMS(z);return this.IsWorkerEnabled?this._worker.postMessage({message:"setIdentityJWT",expireTime:Y,timerId:this._renewIdentityTimerID}):this._renewIdentityTimerID=window.setTimeout(this.renewIdentityJWT.bind(this),Y),!0}catch(Q){return!1}},K.prototype.getIdentityTokenRenewalRequest=function(){var q={client_id:et.CommonInfo.IdentityClientId,grant_type:K.IdentityRefreshTokenGrantType,refresh_token:this.getRefreshToken()},z=new URL("".concat(this.getIdentityUri()).concat(Y.RenewIdentity)),Q=new URLSearchParams;return Q.append("client_id",q.client_id),Q.append("refresh_token",q.refresh_token),Q.append("grant_type",q.grant_type),{url:z,params:Q}},K.prototype.processIdentityResponse=function(q){var K,z;if(!(null==q?void 0:q.isOK()))throw new Z.CatalystSdkError(J.EErrorCode.RequestError,"Call to set identityJWT with status ".concat(null==q?void 0:q.status),Z.CatalystSdkError.stringify(q));this.setIdentityJWT(q.data.access_token)&&(this.setRefreshToken(q.data.refresh_token),this.setIdentityToken(q.data.access_token),null===(z=(K=this._callbacks).onSetIdentityJWT)||void 0===z||z.call(K,q.data.access_token))},K.prototype.setRenewJWTTimer=function(q){var K=this.getTimeToExpireMS(q);return this._worker.postMessage({message:"setRenewJWT",expireTime:K,timerId:this._renewJWTTimerID}),!0},K.prototype.setRenewJWTTimerWithSetInterval=function(q,K,z,Y,Q){var X=this,Z=this.getTimeToExpireMS(q);return window.setTimeout((function(){return X.renewJWT()}),Z)},K.prototype.clearRenewTimer=function(q){q&&window.clearTimeout(q)},K.prototype.isValid=function(q){var K=null==q?void 0:q.claim;if(void 0!==K&&0!==K.iat&&!isNaN(K.iat)){var z=K.iat/1e3,Y=!K.exp||K.exp>z,Q=!K.nbf||K.nbf{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.createServiceWorker=void 0;var Y=z(32943),Q=z(27596);K.createServiceWorker=function(q){try{var K=new Blob(["\nonmessage = function (event) {\n if (event && event.data) {\n var message = event.data.message;\n if (message === 'setRenewJWT' || message === 'setIdentityJWT') {\n var expireTime = event.data.expireTime;\n var timerIdEvent = event.data.timerId;\n \n \n var initTimer = function (message, expireTime) {\n var timerId = self.setInterval(function () {\n var obj = {message, command: 'timer-started'}\n postMessage(obj);\n }, expireTime)\n postMessage({ timerId, message, command: 'timer-init' });\n }\n if(timerIdEvent && timerIdEvent >= 0) {\n self.clearInterval(timerIdEvent);\n }\n \n initTimer(message, expireTime);\n }\n }\n }"],{type:"application/javascript"}),z=URL.createObjectURL(K);return new Worker(z,{name:q})}catch(e){throw new Y.CatalystSdkError(Q.EErrorCode.Unknown,"Could not create Worker",Y.CatalystSdkError.stringify(e))}}},22042:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},56230:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(95912);(0,Y.__exportStar)(z(79140),K),(0,Y.__exportStar)(z(33770),K),(0,Y.__exportStar)(z(22042),K)},95912:(q,K,z)=>{"use strict";z.r(K),z.d(K,{__assign:()=>X,__asyncDelegator:()=>ft,__asyncGenerator:()=>ut,__asyncValues:()=>bt,__await:()=>lt,__awaiter:()=>it,__classPrivateFieldGet:()=>yt,__classPrivateFieldSet:()=>_t,__createBinding:()=>nt,__decorate:()=>J,__exportStar:()=>at,__extends:()=>Q,__generator:()=>st,__importDefault:()=>mt,__importStar:()=>gt,__makeTemplateObject:()=>pt,__metadata:()=>et,__param:()=>tt,__read:()=>ot,__rest:()=>Z,__spread:()=>ht,__spreadArray:()=>dt,__spreadArrays:()=>ct,__values:()=>rt});var Y=function(q,K){return(Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(q,K){q.__proto__=K}||function(q,K){for(var z in K)Object.prototype.hasOwnProperty.call(K,z)&&(q[z]=K[z])})(q,K)};function Q(q,K){if("function"!=typeof K&&null!==K)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function z(){this.constructor=q}Y(q,K),q.prototype=null===K?Object.create(K):(z.prototype=K.prototype,new z)}var X=function(){return(X=Object.assign||function(q){for(var K,z=1,Y=arguments.length;z=0;J--)(Q=q[J])&&(Z=(X<3?Q(Z):X>3?Q(K,z,Z):Q(K,z))||Z);return X>3&&Z&&Object.defineProperty(K,z,Z),Z}function tt(q,K){return function(z,Y){K(z,Y,q)}}function et(q,K){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(q,K)}function it(q,K,z,Y){return new(z||(z=Promise))((function(Q,X){function Z(q){try{tt(Y.next(q))}catch(e){X(e)}}function J(q){try{tt(Y.throw(q))}catch(e){X(e)}}function tt(q){var K;q.done?Q(q.value):(K=q.value,K instanceof z?K:new z((function(q){q(K)}))).then(Z,J)}tt((Y=Y.apply(q,K||[])).next())}))}function st(q,K){var z,Y,Q,X,Z={label:0,sent:function(){if(1&Q[0])throw Q[1];return Q[1]},trys:[],ops:[]};return X={next:J(0),throw:J(1),return:J(2)},"function"==typeof Symbol&&(X[Symbol.iterator]=function(){return this}),X;function J(X){return function(J){return function(X){if(z)throw new TypeError("Generator is already executing.");for(;Z;)try{if(z=1,Y&&(Q=2&X[0]?Y.return:X[0]?Y.throw||((Q=Y.return)&&Q.call(Y),0):Y.next)&&!(Q=Q.call(Y,X[1])).done)return Q;switch(Y=0,Q&&(X=[2&X[0],Q.value]),X[0]){case 0:case 1:Q=X;break;case 4:return Z.label++,{value:X[1],done:!1};case 5:Z.label++,Y=X[1],X=[0];continue;case 7:X=Z.ops.pop(),Z.trys.pop();continue;default:if(!(Q=Z.trys,(Q=Q.length>0&&Q[Q.length-1])||6!==X[0]&&2!==X[0])){Z=0;continue}if(3===X[0]&&(!Q||X[1]>Q[0]&&X[1]=q.length&&(q=void 0),{value:q&&q[Y++],done:!q}}};throw new TypeError(K?"Object is not iterable.":"Symbol.iterator is not defined.")}function ot(q,K){var z="function"==typeof Symbol&&q[Symbol.iterator];if(!z)return q;var Y,Q,X=z.call(q),Z=[];try{for(;(void 0===K||K-- >0)&&!(Y=X.next()).done;)Z.push(Y.value)}catch(J){Q={error:J}}finally{try{Y&&!Y.done&&(z=X.return)&&z.call(X)}finally{if(Q)throw Q.error}}return Z}function ht(){for(var q=[],K=0;K1||J(q,K)}))})}function J(q,K){try{(z=Q[q](K)).value instanceof lt?Promise.resolve(z.value.v).then(tt,et):it(X[0][2],z)}catch(e){it(X[0][3],e)}var z}function tt(q){J("next",q)}function et(q){J("throw",q)}function it(q,K){q(K),X.shift(),X.length&&J(X[0][0],X[0][1])}}function ft(q){var K,z;return K={},Y("next"),Y("throw",(function(q){throw q})),Y("return"),K[Symbol.iterator]=function(){return this},K;function Y(Y,Q){K[Y]=q[Y]?function(K){return(z=!z)?{value:lt(q[Y](K)),done:"return"===Y}:Q?Q(K):K}:Q}}function bt(q){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var K,z=q[Symbol.asyncIterator];return z?z.call(q):(q=rt(q),K={},Y("next"),Y("throw"),Y("return"),K[Symbol.asyncIterator]=function(){return this},K);function Y(z){K[z]=q[z]&&function(K){return new Promise((function(Y,Q){(function(q,K,z,Y){Promise.resolve(Y).then((function(K){q({value:K,done:z})}),K)})(Y,Q,(K=q[z](K)).done,K.value)}))}}}function pt(q,K){return Object.defineProperty?Object.defineProperty(q,"raw",{value:K}):q.raw=K,q}var vt=Object.create?function(q,K){Object.defineProperty(q,"default",{enumerable:!0,value:K})}:function(q,K){q.default=K};function gt(q){if(q&&q.__esModule)return q;var K={};if(null!=q)for(var z in q)"default"!==z&&Object.prototype.hasOwnProperty.call(q,z)&&nt(K,q,z);return vt(K,q),K}function mt(q){return q&&q.__esModule?q:{default:q}}function yt(q,K,z,Y){if("a"===z&&!Y)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof K?q!==K||!Y:!K.has(q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===z?Y:"a"===z?Y.call(q):Y?Y.value:K.get(q)}function _t(q,K,z,Y,Q){if("m"===Y)throw new TypeError("Private method is not writable");if("a"===Y&&!Q)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof K?q!==K||!Q:!K.has(q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===Y?Q.call(q,z):Q?Q.value=z:K.set(q,z),z}},57530:(q,K,z)=>{"use strict";z.d(K,{i:()=>st});var Y=z(8674),Q=z(68910),X=z(64527),Z=z(823),J=z(40794),tt=z(15740),et=z(61806),it=z(43501);class st extends J.u{static get main(){return st._main}get viewportSize(){return this._viewportSize}get cameraMatrixID(){return this.recalculateViewMatrix(),this._transformWorldID}get viewMatrix(){return this.recalculateViewMatrix(),this._cameraMatrix}constructor(){super(),this.onViewportChanged=new tt.H,this._viewportSize=new X.o(et.W.instance.game.world.width,et.W.instance.game.world.height),this._cameraMatrix=new Q.Matrix,this._transformWorldID=-1,this._attachedTransform=null,st._main||(st._main=this)}create(){super.create(),this.GameObject.transform?this.attachToTransform():this.GameObject.onComponentAdded.add(this.componentWasAdded,this)}destroy(){st._main===this&&(st._main=null),this.GameObject.transform&&this.GameObject.transform.OnDestroy.remove(this.transformDestroyed,this),this.GameObject.onComponentAdded.remove(this.componentWasAdded,this),this.onViewportChanged.dispose(),super.destroy()}reset(){const q=this.GameObject.transform;q.setPosition(0,0),q.setScale(1,1),q.setRotation(0)}setViewportSize(q,K){if(this._viewportSize.setTo(q,K),this._attachedTransform){this._attachedTransform.pixiTransform._worldID++}this.onViewportChanged.dispatch()}setCameraActive(q,K){const z=K.projection;q!==(z.transform===this._cameraMatrix)&&(K.batch.flush(),z.transform=q?this.viewMatrix:null,z.update(z.destinationFrame,z.sourceFrame,K.resolution,!K.renderTexture.current))}attachToTransform(){null===this._attachedTransform&&(this._attachedTransform=this.GameObject.transform,this._attachedTransform.OnDestroy.add(this.transformDestroyed,this))}transformDestroyed(){this._cameraMatrix.identity(),this._attachedTransform=null}componentWasAdded(q){q instanceof it.d&&(this.GameObject.onComponentAdded.remove(this.componentWasAdded,this),this.attachToTransform())}}(0,Y.Cg)([(0,Z.oB)(),(0,Y.Sn)("design:type",X.o)],st.prototype,"_viewportSize",void 0)},40794:(q,K,z)=>{"use strict";z.d(K,{X:()=>et,u:()=>it});var Y,Q=z(8674),X=z(79687),Z=z(32154),J=z(15740),tt=z(89683);const et={};let it=Y=class{constructor(){this.gameObject=null,this.updateFunction=this.firstUpdate,this.onActiveChanged=new J.H,this.onDestroy=new J.H,this.isActive=!0,this._isCreated=!1}get GameObject(){return this.gameObject}set GameObject(q){!Z.A.isDefined(this.gameObject)&&Z.A.isDefined(q)&&(this.gameObject=q,tt.G.addObject(this))}get OnActiveChanged(){return this.onActiveChanged}get IsActiveInHierarchy(){return this.Active&&Boolean(this.GameObject)&&this.GameObject.activeInHierarchy}get OnDestroy(){return this.onDestroy}get Active(){return this.isActive}set Active(q){this.isActive!==q&&(this.isActive=q,q?this.onEnable():this.onDisable(),this.onActiveChanged.dispatch())}get isCreated(){return this._isCreated}create(){this._isCreated=!0,this.registerComponent()}postCreate(){}firstUpdate(){this.updateFunction=this.update,this.update()}update(){}onEnable(){}onDisable(){}static customSerialize(q,K,z){}customDeserialize(q){}preDeserialize(q){}postDeserialize(){}destroy(){tt.G.removeObject(this),this.isActive&&this.onDisable(),this.onActiveChanged.dispose(),this.onDestroy.dispatch(this),this.onDestroy.dispose(),this.unregisterComponent(),this.gameObject=null}getInjectedValue(q){return z(78178).U.getInjectedValue(this.gameObject,q)}registerComponent(){if(!Y._enableRegistry)return;const q=this.constructor.name;Y._componentRegistry.has(q)||Y._componentRegistry.set(q,new Set),Y._componentRegistry.get(q).add(this)}unregisterComponent(){const q=this.constructor.name,K=Y._componentRegistry.get(q);null==K||K.delete(this)}static getComponents(q){const K=q.name,z=Y._componentRegistry.get(K);return z?Array.from(z):[]}static getComponentsByString(q){return Y.getComponents(et[q])}static toggleComponentRegistryStatus(q){Y._enableRegistry=q}};it._enableRegistry=!1,it._componentRegistry=new Map,it=Y=(0,Q.Cg)([(0,X.injectable)()],it)},29658:(q,K,z)=>{"use strict";z.d(K,{EV:()=>X,S1:()=>tt,YH:()=>J,s0:()=>Z});var Y=z(40794),Q=z(49769);const X=(q,K,z)=>X=>{Y.X[q]=X,Y.X[q].alias=q,Q.Er[Q.ml.PATHS]||(Q.Er[Q.ml.PATHS]={},Q.Er[Q.ml.TOOL_TIPS]={}),Q.Er[Q.ml.PATHS][q]=K,Q.Er[Q.ml.TOOL_TIPS][q]=z},Z=q=>K=>{Q.oD[q]=K};var J;!function(q){q.root="",q.animation="Animation",q.filter="Filter",q.injection="Injection",q.input="Input",q.map="Map",q.motion="Motion",q.primitive="Primitive",q.physics="Physics",q.render="Render",q.saving="Saving",q.streaming="Streaming",q.tiled="Tiled",q.transform="Transform",q.transition="Transition",q.ui="UI",q.uiLayout="UI/Layout"}(J||(J={}));const tt=()=>q=>{-1===Q.Jr.indexOf(q.name)&&Q.Jr.push(q.name)}},49769:(q,K,z)=>{"use strict";var Y;z.d(K,{Bk:()=>Z,EL:()=>X,Er:()=>Q,Jr:()=>tt,ml:()=>Y,oD:()=>J}),function(q){q[q.PATHS=0]="PATHS",q[q.TOOL_TIPS=1]="TOOL_TIPS"}(Y||(Y={}));const Q={},X={},Z={},J={},tt=[]},53924:(q,K,z)=>{"use strict";z.d(K,{W:()=>Q,a:()=>X});var Y=z(49769);function Q(q){return K=>{Y.EL[K.name]=q}}function X(q){return K=>{Y.Bk[q]=K}}},82538:(q,K,z)=>{"use strict";var Y;z.d(K,{e:()=>Y}),function(q){q.Vertical="vertical",q.Horizontal="horizontal"}(Y||(Y={}))},83793:(q,K,z)=>{"use strict";z.d(K,{G:()=>Q});const Y="custom:annotations:editorFunctions",Q=()=>(q,K)=>{let z=[K];if(Reflect.hasMetadata(Y,q.constructor)){const Q=Reflect.getMetadata(Y,q.constructor);if(Q.indexOf(K)>=0)return;z=Q.concat(z)}Reflect.defineMetadata(Y,z,q.constructor)}},55366:(q,K,z)=>{"use strict";z.d(K,{Y:()=>J});var Y=z(8674),Q=z(79687),X=z(80267),Z=z(5191);let J=class{get frameTimeElapsed(){return this._now()-this._frameStartTime}get frameBudgetRemaining(){return this.frameBudget-this.frameTimeElapsed}constructor(q){this._frameStartTime=0,this._frameWorkDone=!1,this._workPromises=[],this.frameBudget=q,"undefined"!=typeof performance&&"function"==typeof performance.now?this._now=performance.now.bind(performance):"function"==typeof Date.now?this._now=Date.now.bind(Date):"function"==typeof Date.prototype.getTime?this._now=()=>(new Date).getTime():(this._now=()=>0,X.V.log("FrameWorkManager: None of the expected timing functions are available",Z.$.Error))}markFrameStart(){this._frameStartTime=this._now(),this._frameWorkDone=!1}markFrameEnd(){for(;this._workPromises.length>0&&(this.frameBudgetRemaining>0||!this._frameWorkDone);)this._frameWorkDone=!0,this._workPromises[0][0]()&&this._workPromises.shift()}flushWorkQueue(){for(;this._workPromises.length>0;)this._frameWorkDone=!0,this._workPromises[0][0]()&&this._workPromises.shift()}cancelWork(){var q;for(const K of this._workPromises)null===(q=K[1])||void 0===q||q.call(K);this._workPromises=[]}awaitFreeTime(q,K){this._workPromises.push([q,K]),1===this._workPromises.length&&this.markFrameEnd()}};J=(0,Y.Cg)([(0,Q.injectable)(),(0,Y.Sn)("design:paramtypes",[Number])],J)},61806:(q,K,z)=>{"use strict";z.d(K,{W:()=>Y});class Y{static get instance(){return this._instance}get game(){return this._game}constructor(q,K,z){this.prefabLoaderInstance=null,this.getWorkerURL=null,Y._instance||(Y._instance=this),this._game=q,this.loader=K,this.prefabLoaderInstance=z}destroy(){Y._instance=null,this._game=null}}},42979:(q,K,z)=>{"use strict";z.d(K,{Z:()=>mt});var Y=z(68910),Q=z(36361),X=z(57530);class Z{constructor(){this._cameraColliders=[]}get cameraColliders(){return this._cameraColliders}addCollider(q){this._cameraColliders.push({collider:q,bounds:this.getColliderBounds(q)})}removeCollider(q){const K=this._cameraColliders.length,z=this._cameraColliders.findIndex((K=>K.collider===q));return z>-1&&this._cameraColliders.splice(z,1),this._cameraColliders.lengthK.collider===q));K&&(K.bounds=this.getColliderBounds(q))}getColliderBounds(q){var K,z,Q;const Z=X.i.main.viewportSize,J=q.getBounds(),tt=null!==(Q=null===(z=null===(K=q.GameObject.parent)||void 0===K?void 0:K.transform)||void 0===z?void 0:z.worldMatrix)&&void 0!==Q?Q:Y.Matrix.IDENTITY,et=q.GameObject.transform.worldScale,it=new Y.Matrix(1/et.x,0,0,1/et.y,0,0).append(tt),st=it.apply({x:J.left-Z.getHalfWidth(),y:J.top-Z.getHalfHeight()}),nt=it.apply({x:J.right+Z.getHalfWidth(),y:J.bottom+Z.getHalfHeight()});return J.left=st.x,J.top=st.y,J.right=nt.x,J.bottom=nt.y,J}}var J=z(6686),tt=z(32154),et=z(61806);class it{constructor(){this._queue=null,this._maxDeletesPerFrame=500,this._queue=new Set}processDestroyQueue(){let q=0;const K=[...this._queue];for(;this._queue.size>0&&q-1){const K=[`\n %c %c %c PixiJS ${Y.VERSION} - ✰ renderType: ${q} ✰ %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;"];window.console.log(...K)}else window.console&&window.console.log(`PixiJS ${Y.VERSION} - ${q} - http://www.pixijs.com/`)}destroy(){var q;null===(q=this._device)||void 0===q||q.cleanUp(),this._onPause.dispose(),this._onResume.dispose(),this.state.destroy(),this.sound.destroy(),this.stage.destroy(),this.tweens.destroy(),this._time.removeAll(),this._destroyQueue.destroy(),this._rootContainer.unbindAll(),this._state=null,this._sound=null,this._stage=null,this._tweens=null,this._cache=null,this._load=null,this._time=null,this._cameraCollisions=null,this._destroyQueue=null,this._rootContainer=null,this._app.ticker.remove(this.update,this),this.app.destroy(!0),this.isBooted=!1}pauseGame(q){q?(this._paused||(this._paused=q,this._sound.muteOnPause&&this._sound.setMute(),this._time.gamePaused(),this.onPause.dispatch()),this._pausedByCode=!0):(this._paused&&(this._paused=q,this._sound.unsetMute(),this._time.gameResumed(),this.onResume.dispatch()),this._pausedByCode=!1)}gamePaused(q){this._paused||(this._paused=!0,this.time.gamePaused(),this.sound.muteOnPause&&this.sound.setMute(),this.onPause.dispatch(q))}gameResumed(q){this._paused&&(this._paused=!1,this.time.gameResumed(),this.sound.muteOnPause&&this.sound.unsetMute(),this.onResume.dispatch(q))}focusLoss(q){this.stage.disableVisibilityChange||this.gamePaused(q)}focusGain(q){window.focus&&window.focus(),this.stage.disableVisibilityChange||this.gameResumed(q)}createApp(q,K){let z;Y.settings.ROUND_PIXELS=!!tt.A.isDefined(q.roundPixels)&&q.roundPixels,Y.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!tt.A.isDefined(q.failIfMajorPerformanceCaveat)||q.failIfMajorPerformanceCaveat,Y.settings.SCALE_MODE=K.antialias?Y.SCALE_MODES.LINEAR:Y.SCALE_MODES.NEAREST,void 0!==K.filterResolution&&(Y.settings.FILTER_RESOLUTION=K.filterResolution),this._width=tt.A.isDefined(q.width)?q.width:mt.DEFAULT_WIDTH,this._height=tt.A.isDefined(q.height)?q.height:mt.DEFAULT_HEIGHT,this._app=new Y.Application({width:this._width,height:this._height,view:document.createElement("canvas"),autoStart:!!K.autoStart&&K.autoStart,autoDensity:!K.autoDensity||K.autoDensity,preserveDrawingBuffer:K.preserveDrawingBuffer,antialias:K.antialias,backgroundAlpha:K.backgroundAlpha,sharedTicker:!K.sharedTicker||K.sharedTicker,resolution:K.resolution,forceCanvas:K.forceCanvas,backgroundColor:K.backgroundColor,clearBeforeRender:K.clearBeforeRender,powerPreference:K.powerPreference,resizeTo:K.resizeTo}),Y.TextMetrics.nextLineHeightBehavior=!1,z=tt.A.isDefined(q.parent)?q.parent instanceof HTMLElement?q.parent:document.getElementById(q.parent):document.createElement("div"),vt.D.addToDOM(this.canvas,z),Y.Texture.addToCache=(q,K)=>{},Y.BaseTexture.addToCache=(q,K)=>{},Y.Texture.removeFromCache=q=>null,Y.BaseTexture.removeFromCache=q=>null}createSystems(){this._add=new st.W(this),this._sound=new ot.x(this),this._load=new dt.a,this._cache=new ct.l(this),this._time=new bt.g(this),this._device=new pt.p,this._state=new ft.f(null),this._tweens=new rt.$(this),this._rnd=new lt.b,this._cameraCollisions=new Z,this._destroyQueue=new it,this._rootContainer=new Q.r(null),this._triggerSystem=new J.G,this._useElaNavMeshSystem?this._navMeshSystem=new at.s:this._navMeshSystem=new nt.k}bootSystems(){this._time.boot(),this._sound.boot()}}mt.DEFAULT_WIDTH=1280,mt.DEFAULT_HEIGHT=720,mt.DEFAULT_FPS=60,mt.DEFAULT_SPF=1/mt.DEFAULT_FPS},27780:(q,K,z)=>{"use strict";z.d(K,{_:()=>rt});var Y=z(95891),Q=z(5191),X=z(80267),Z=z(87987),J=z(62481),tt=z(32154),et=(z(49769),z(61806)),it=z(44716),st=z(43501),nt=z(15740),at=z(89683);class rt{get name(){return this._name}set name(q){this._name=q}get components(){return this._components}get layer(){return this._layer?this._layer:this._parent?this._parent.layer:Z.W.DEFAULT_NAME}set layer(q){this.setLayer(q,!1)}set parent(q){this.removeFromParent(),this.setParent(q),q&&q.onChildAdded.dispatch(this)}get parent(){return this._parent}get children(){return this._children}get isMarkedForDestruction(){return this._markedForDestruction}get active(){return this._isActive}set active(q){this._isActive!==q&&(this._isActive=q,this.onActiveChanged.dispatch(),this.activeInHierarchyChanged())}get activeInHierarchy(){return this._isActiveInHierarchy}get legacyTransform(){return null===this._legacyTransform&&(this._legacyTransform=this.findComponent(it.K)),this._legacyTransform}get isDestroyed(){return this._destroyed}get transform(){return null===this._transform&&(this._transform=this.findComponent(st.d)),this._transform}constructor(q=null){this.onActiveChanged=new nt.H,this.onActiveInHierarchyChanged=new nt.H,this.onHierarchyChanged=new nt.H,this.onChildAdded=new nt.H,this.onChildRemoved=new nt.H,this.onLayerChanged=new nt.H,this.onComponentAdded=new nt.H,this.onComponentRemoved=new nt.H,this.onComponentAddedToHierarchy=new nt.H,this.onDestroy=new nt.H,this._markedForDestruction=!1,this.updateFunction=this.firstUpdate,this._parent=null,this._isActive=!0,this._components=[],this._children=[],this._isActiveInHierarchy=!0,this._legacyTransform=null,this._transform=null,this._name="",this._destroyed=!1,this.setParent(q),at.G.addObject(this)}addChild(q){q.removeFromParent(),q.setParent(this),this.onChildAdded.dispatch(q)}addChildAt(q,K){q.removeFromParent(),q.setParent(this,K),this.onChildAdded.dispatch(q)}getRenderOrder(){return this._parent._children.indexOf(this)}isInFront(){const q=this._parent._children;return q[q.length-1]===this}isInBack(){return this._parent._children[0]===this}sendToBack(){const q=this._parent._children.indexOf(this);-1!==q?(this._parent._children.splice(q,1),this._parent._children.unshift(this),this._parent.onHierarchyChanged.dispatch()):X.V.log("Parent did not have this game object in its list of children!",Q.$.Error)}setRenderOrder(q){const K=this._parent._children.indexOf(this);-1!==K?(this._parent._children.splice(K,1),this._parent._children.splice(q,0,this),this._parent.onHierarchyChanged.dispatch()):X.V.log("Parent did not have this game object in its list of children!",Q.$.Error)}firstUpdate(){this.updateFunction=this.update,this.update()}update(){if(this.activeInHierarchy&&!this._markedForDestruction){for(let q=this._components.length-1;q>=0;--q){const K=this._components[q];K.Active&&K.updateFunction()}for(let q=this._children.length-1;q>=0;--q)this._children[q].updateFunction()}}addComponent(q,K=!0){const z=new q;this._components.push(z),z.GameObject=this,z.OnDestroy.addOnce(this.removeComponent.bind(this)),K&&(z.create(),z.Active&&z.onEnable(),z.postCreate()),this.onComponentAdded.dispatch(z);const Y=this._children.length;for(let Q=0;QK instanceof q));return tt.A.isDefined(K)?K:null}findComponents(q){return this._components.filter((K=>K instanceof q))}hasComponent(q){return tt.A.isDefined(this.findComponent(q))}bringToFront(){const q=this._parent._children.indexOf(this);-1!==q?q!==this._parent.children.length-1&&(this._parent._children.splice(q,1),this._parent._children.push(this),this._parent.onHierarchyChanged.dispatch()):X.V.log("Parent did not have this game object in its list of children!",Q.$.Error)}destroy(){var q;if(this._destroyed=!0,this.onDestroy.dispatch(),!this._markedForDestruction){for(let K=this._children.length-1;K>=0;--K)null===(q=this._children[K])||void 0===q||q.destroy();this._children.length=0}for(let z=this._components.length-1;z>=0;--z)try{this._components[z].destroy()}catch(K){J.R.logError(K,"Failed to destroy component")}this._components.length=0,this.removeFromParent(),at.G.removeObject(this),this.onComponentAdded.dispose(),this.onComponentRemoved.dispose(),this.onComponentAddedToHierarchy.dispose(),this.onChildAdded.dispose(),this.onChildRemoved.dispose(),this.onActiveChanged.dispose(),this.onActiveInHierarchyChanged.dispose(),this.onHierarchyChanged.dispose(),this.onDestroy.dispose(),this.onLayerChanged.dispose()}destroyDeferred(){var q;const K=this._children.length;for(let z=0;z=0))return void X.V.log(`index ${K} out-of-bounds of child array length ${q._children.length}`,Q.$.Error);q._children.splice(K,0,this)}else q._children.push(this);this._parent=q,this._parent.onActiveInHierarchyChanged.add(this.activeInHierarchyChanged,this),this._parent.onHierarchyChanged.add(this.onHierarchyChanged.dispatch,this.onHierarchyChanged)}this.onHierarchyChanged.dispatch();const z=this.isActiveInHierarchy();z!==this._isActiveInHierarchy&&(this._isActiveInHierarchy=z,this.onActiveInHierarchyChanged.dispatch())}activeInHierarchyChanged(){this._isActiveInHierarchy=this.isActiveInHierarchy();const q=this._components.length;for(let K=0;K{"use strict";z.d(K,{W:()=>J});var Y=z(68910),Q=z(61806),X=z(16649),Z=z(71392);class J{constructor(q){this.game=null,this.stage=null,this.game=q,this.stage=q.stage}existing(q){return this.stage.addChild(q)}tween(q,K,z=!0){return this.game.tweens.create(q,K,z)}audio(q="",K=1,z=!1,Y){return this.sound(q,K,z,Y)}sound(q="",K=1,z=!1,Y){return this.game.sound.add(q,K,z,Y)}text(q=0,K=0,z="",Q,X=this.stage){const Z=new Y.Text(z,Q);return Z.x=q,Z.y=K,X.addChild(Z),Z}graphics(q=0,K=0,z=this.stage){const Q=new Y.Graphics;return Q.position.set(q,K),z.addChild(Q),Q}spine(q,K,z,Y){const Q=new X.y(z);return Q.setToSetupPose(),Q.position.x=q,Q.position.y=K,Y?Y.addChild(Q):this.game.stage.addChild(Q),Q}simpleMesh(q){return new Y.SimpleMesh(null==q?void 0:q.texture,null==q?void 0:q.vertices,null==q?void 0:q.uvs,null==q?void 0:q.indices,null==q?void 0:q.drawMode)}texture(q,K){return new Y.Texture(q,null==K?void 0:K.frame,null==K?void 0:K.orig,null==K?void 0:K.trim,null==K?void 0:K.rotate,null==K?void 0:K.anchor)}container(q,K="container",z=!1){const Y=new Z.m;return Y.name=K,z?(Q.W.instance.game.stage.addChild(Y),Y.zIndex=Q.W.instance.game.stage.children.length):q&&(q.addChild(Y),Y.zIndex=q.children.length),Y}sprite(q=0,K=0,z,X,Z,J){const tt=J||(z?Q.W.instance.game.cache.getTexture(z,X):Y.Texture.EMPTY),et=new Y.Sprite(tt);return et.position.set(q,K),Z?Z.addChild(et):Q.W.instance.game.stage.addChild(et),et}renderTexture(q=100,K=100,z,X=!1){const Z={width:q,height:K,resolution:1},J=new Y.BaseRenderTexture(Z),tt=new Y.RenderTexture(J);return X&&Q.W.instance.game.cache.addRenderTexture(z||Q.W.instance.game.rnd.uuid(),tt),tt}}},57056:(q,K,z)=>{"use strict";z.d(K,{D:()=>Q});var Y=z(22494);const Q=()=>(q,K)=>{const z="function"==typeof q?q:q.constructor;Y.Q.addProperty("custom:annotations:ignoreInEditor",z,K)}},44716:(q,K,z)=>{"use strict";z.d(K,{K:()=>dt});var Y=z(8674),Q=z(80267),X=z(5191),Z=z(15308),J=z(71392);class tt extends J.m{constructor(){super(...arguments),this.placeholderBounds=new Z.M(0,0,0,0),this._vertexData=new Float32Array([0,0,0,0,0,0,0,0])}set width(q){this.placeholderBounds.width=q,this._vertexData[2]=q,this._vertexData[4]=q}get width(){return this.placeholderBounds.width}set height(q){this.placeholderBounds.height=q,this._vertexData[5]=q,this._vertexData[7]=q}get height(){return this.placeholderBounds.height}_calculateBounds(){this._bounds.addQuad(this._vertexData)}}var et,it=z(32154),st=z(27179),nt=z(8490),at=z(823),rt=z(40794),ot=z(29658),ht=z(61806),ct=z(53924);let dt=et=class extends rt.u{get group(){return this._group}set RoundRelativeValues(q){this.roundRelativeValues=q}get RoundRelativeValues(){return this.roundRelativeValues}set GameObject(q){!it.A.isDefined(this.GameObject)&&it.A.isDefined(q)&&(this.gameObject=q,q.parent&&q.parent.legacyTransform&&q.parent.legacyTransform.group.addChild(this._group))}get GameObject(){return this.gameObject}set x(q){this.cachedRelativeX=null,this._group.x=q}get x(){return this._group.x}set y(q){this.cachedRelativeY=null,this._group.y=q}get y(){return this._group.y}set relativeX(q){const K=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.width:0;this.x=et.applyScaleValue(K,q,this.roundRelativeValues),this.cachedRelativeX=q}get relativeX(){let q=0;return it.A.isDefined(this.cachedRelativeX)?q=this.cachedRelativeX:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(q=et.determineScaleValue(this._group.x,this.GameObject.parent.legacyTransform.width,this.roundRelativeValues)),q}set relativeY(q){const K=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.height:0;this.y=et.applyScaleValue(K,q,this.roundRelativeValues),this.cachedRelativeY=q}get relativeY(){let q=0;return it.A.isDefined(this.cachedRelativeY)?q=this.cachedRelativeY:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(q=et.determineScaleValue(this._group.y,this.GameObject.parent.legacyTransform.height,this.roundRelativeValues)),q}set roundedX(q){this.x=Math.round(q)}get roundedX(){return Math.round(this.x)}set roundedY(q){this.y=Math.round(q)}get roundedY(){return Math.round(this.y)}set width(q){this.cachedRelativeWidth=null,this.dimensionPlaceholder&&(this.dimensionPlaceholder.width=q),this._group.width=q,this.updatePivotXFromAnchorX(),this.reapplyChildRelativeValues()}get width(){return this._group.width}set height(q){this.cachedRelativeHeight=null,this.dimensionPlaceholder&&(this.dimensionPlaceholder.height=q),this._group.height=q,this.updatePivotYFromAnchorY(),this.reapplyChildRelativeValues()}get height(){return this._group.height}set relativeWidth(q){const K=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.width:0;this.width=et.applyScaleValue(K,q,this.roundRelativeValues),this.cachedRelativeWidth=q}get relativeWidth(){let q=0;return it.A.isDefined(this.cachedRelativeWidth)?q=this.cachedRelativeWidth:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(q=et.determineScaleValue(this.width,this.GameObject.parent.legacyTransform.width,!1)),q}set relativeHeight(q){const K=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.height:0;this.height=et.applyScaleValue(K,q,this.roundRelativeValues),this.cachedRelativeHeight=q}get relativeHeight(){let q=0;return it.A.isDefined(this.cachedRelativeHeight)?q=this.cachedRelativeHeight:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(q=et.determineScaleValue(this.height,this.GameObject.parent.legacyTransform.height,!1)),q}set roundedWidth(q){this.width=Math.round(q)}get roundedWidth(){return Math.round(this.width)}set roundedHeight(q){this.height=Math.round(q)}get roundedHeight(){return Math.round(this.height)}set anchorX(q){this.anchor.x=q,this.updatePivotXFromAnchorX()}get anchorX(){return this.anchor.x}set anchorY(q){this.anchor.y=q,this.updatePivotYFromAnchorY()}get anchorY(){return this.anchor.y}set scaleX(q){this._group.scale.x=q}get scaleX(){return this._group.scale.x}set scaleY(q){this._group.scale.y=q}get scaleY(){return this._group.scale.y}customDeserialize(q){this.dimensionPlaceholder||(this.dimensionPlaceholder=this._group.addChild(new tt),this.dimensionPlaceholder.name=`${this.GameObject.name}-dimensionalPlaceholder`);const K=q.width;it.A.isDefined(K)&&(this.width=K);const z=q.height;if(it.A.isDefined(z)&&(this.height=z),it.A.isDefined(this.GameObject.parent)){const K=this.GameObject.parent.legacyTransform,z=q.relativeWidth;it.A.isDefined(z)&&(this.dimensionPlaceholder.width=et.applyScaleValue(K?K.width:0,z,this.roundRelativeValues),this.cachedRelativeWidth=z);const Y=q.relativeHeight;it.A.isDefined(Y)&&(this.dimensionPlaceholder.height=et.applyScaleValue(K?K.height:0,Y,this.roundRelativeValues),this.cachedRelativeHeight=Y)}const Y=q.anchorX;it.A.isDefined(Y)&&(this.anchorX=Y);const Q=q.anchorY;it.A.isDefined(Q)&&(this.anchorY=Q);const X=q.scaleX;it.A.isDefined(X)&&(this.scaleX=X);const Z=q.scaleY;it.A.isDefined(Z)&&(this.scaleY=Z),super.customDeserialize(q)}reapplyChildRelativeValues(){const q=this.GameObject.children;for(let K=0;K{q(),this.GameObject&&!this.GameObject.parent&&this.GameObject.updateFunction()},this.group.visible=this.GameObject.activeInHierarchy}destroy(){this.GameObject.onActiveInHierarchyChanged.remove(this.updateGroupVisibility,this),this.GameObject.onHierarchyChanged.remove(this.updateParentGroup,this),this._group.gameObjectRef=null,super.destroy(),this._group.destroy(),this._group=null}updateGroupVisibility(){this._group&&!this._group.destroyed&&(this._group.visible=this.GameObject.activeInHierarchy,this._group.worldVisible&&this._group.parent?this._group.updateTransform():this._group.worldVisible&&!this._group.parent&&Q.V.log("Attempting to update a group that has no parent but is set to visible",X.$.Warning))}updateParentGroup(){this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.group.addChild(this._group):ht.W.instance.game.world.addChild(this._group)}static applyScaleValue(q,K,z){const Y=q*K;return et.roundIfNeeded(Y,z)}static determineScaleValue(q,K,z){const Y=q/K;return et.roundIfNeeded(Y,z)}static roundIfNeeded(q,K){return K?Math.round(q):q}};(0,Y.Cg)([(0,at.vk)(),(0,Y.Sn)("design:type",Boolean)],dt.prototype,"roundRelativeValues",void 0),(0,Y.Cg)([(0,at.g1)(),(0,Y.Sn)("design:type",Number),(0,Y.Sn)("design:paramtypes",[Number])],dt.prototype,"x",null),(0,Y.Cg)([(0,at.g1)(),(0,Y.Sn)("design:type",Number),(0,Y.Sn)("design:paramtypes",[Number])],dt.prototype,"y",null),(0,Y.Cg)([(0,at.g1)(),(0,Y.Sn)("design:type",Number),(0,Y.Sn)("design:paramtypes",[Number])],dt.prototype,"relativeX",null),(0,Y.Cg)([(0,at.g1)(),(0,Y.Sn)("design:type",Number),(0,Y.Sn)("design:paramtypes",[Number])],dt.prototype,"relativeY",null),(0,Y.Cg)([(0,at.g1)(),(0,Y.Sn)("design:type",Number),(0,Y.Sn)("design:paramtypes",[Number])],dt.prototype,"scaleX",null),(0,Y.Cg)([(0,at.g1)(),(0,Y.Sn)("design:type",Number),(0,Y.Sn)("design:paramtypes",[Number])],dt.prototype,"scaleY",null),dt=et=(0,Y.Cg)([(0,ot.EV)("LegacyTransform",ot.YH.transform,"Works with the position and scale of the game object
to which it is attached (deprecated)"),(0,ct.W)(nt.L),(0,Y.Sn)("design:paramtypes",[])],dt)},70028:(q,K,z)=>{"use strict";z.d(K,{k:()=>nt});var Y=z(8674),Q=z(68910),X=z(5191),Z=z(80267),J=z(2136),tt=z(27179),et=z(94341),it=z(15073),st=z(61806);class nt{getNavMeshConstructor(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._navMeshConstructorWorker){const q=st.W.instance.getWorkerURL("NavMeshConstructor");this._navMeshConstructorWorker=it.p.createWorker(J.b,q)}return this._navMeshConstructorWorker.start()}))}constructor(){this.navMesh=null,this._blockPolygonIDs=new Map,this._globalPolygonIDs=[],this._navMeshConstructorWorker=null,this._globalWalkableAreas=[],this._globalNonWalkableAreas=[],this._currentStreamedMap=null,this._streamedBlockMeshes=new Map;this.navMesh=new et.L([],0,10)}destroy(){this._navMeshConstructorWorker.stop(),this._navMeshConstructorWorker=null}findPath(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.navMesh){let z=this.navMesh.findPath(q,K);if((null==z?void 0:z.length)>0)return z;if(yield this._currentStreamedMap.loadingPromiseQueueHead,z=this.navMesh.findPath(q,K),(null==z?void 0:z.length)>0)return z;Z.V.log(`Failed to find path in navmesh at source ${q} with destination ${K}`,X.$.Error)}return[]}))}addWalkableArea(q){this._globalWalkableAreas.concat(q),this.buildNavMeshFromGlobalPolys().then((q=>{const K=this._globalPolygonIDs;this._globalPolygonIDs=[],this.modifyNavMesh(q,K)})).catch((()=>{Z.V.log("Error while building NavMesh from global polys",X.$.Error)}))}addNonWalkableArea(q){for(const z of q)this._globalNonWalkableAreas.push(z);const K=[];for(const z of q){const q=z.GameObject.transform.worldPosition;for(const z of this._streamedBlockMeshes.values())z.block.block.containsPoint(q)&&K.push(z.block)}K.length>0&&this.onStreamedMapBlocksChanged(K,[]),this.buildNavMeshFromGlobalPolys().then((q=>{const K=this._globalPolygonIDs;this._globalPolygonIDs=[],this.modifyNavMesh(q,K)})).catch((()=>{Z.V.log("Error while building NavMesh after adding ColliderPolygon",X.$.Error)}))}buildNavMeshFromGlobalPolys(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=[];for(const z of this._globalWalkableAreas)q.push(this.getPolyBoolPoly(z));const K=[];for(const z of this._globalNonWalkableAreas)K.push(this.getPolyBoolPoly(z));return(yield this.getNavMeshConstructor()).constructNavMesh(void 0,q,K)}))}modifyNavMesh(q,K,z){if(K)for(const Y of K)this.navMesh.removePolygon(Y);if(q){const K=q.regions.map((q=>q.map((q=>new tt.I(q[0],q[1])))));for(const q of K)q.length>0&&this._globalPolygonIDs.push(this.navMesh.addPolygon(q))}if(z)for(const Y of z){const q=Y[0];this._blockPolygonIDs.has(q)&&(this._blockPolygonIDs.get(q).forEach((q=>{this.navMesh.removePolygon(q)})),this._blockPolygonIDs.delete(q));const K=[],z=Y[1].regions.map((q=>q.map((q=>new tt.I(q[0],q[1])))));for(const Y of z)Y.length>0&&K.push(this.navMesh.addPolygon(Y));K.length>0&&this._blockPolygonIDs.set(Y[0],K)}}bindStreamedMap(q){this._currentStreamedMap=q,this._currentStreamedMap.onLoadedBlocksChanged.add(this.onStreamedMapBlocksChanged,this),this._currentStreamedMap.onStreamedBlockChanged.add(this.reloadStreamedBlock,this)}releaseStreamedMap(){if(this._currentStreamedMap){this._currentStreamedMap.onLoadedBlocksChanged.remove(this.onStreamedMapBlocksChanged,this),this._currentStreamedMap.onStreamedBlockChanged.remove(this.reloadStreamedBlock,this),this._currentStreamedMap=null;for(const q of this._blockPolygonIDs)for(const K of q[1])this.navMesh.removePolygon(K);this._blockPolygonIDs.clear(),this._streamedBlockMeshes.clear()}}onStreamedMapBlocksChanged(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){let z=[];for(const q of K)z=z.concat(this.unloadStreamedBlock(q));const Y=new Map;for(const K of q){const q=this.generateBlockID(K);this._blockPolygonIDs.has(q)&&(z=z.concat(this.unloadStreamedBlock(K)));const Q=K.block,X=Object.assign({block:K},Q.getNavData());this._streamedBlockMeshes.set(q,X);for(const K of this._globalNonWalkableAreas)Q.containsPoint(K.GameObject.transform.worldPosition)&&X.nonWalkableAreas.push(this.getPolyBoolPoly(K));const Z=yield this.constructBlockMesh(X);Y.set(q,Z)}this.modifyNavMesh(void 0,Array.from(z.values()),Y),q.forEach((q=>{q.block.resolveNavMeshConstructionPromise()}))}))}getPolyBoolPoly(q){const K=q.GameObject.transform.worldMatrix,z=new Q.Point;return{inverted:!1,regions:[q.points.map((q=>(K.apply(q,z),[z.x,z.y])))]}}constructBlockMesh(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.getNavMeshConstructor(),z=q.block.block.getBoundsPoly();try{return yield K.constructNavMesh(z,q.walkableAreas,q.nonWalkableAreas)}catch(e){Z.V.log(`Error while constructing NavMesh for block at ${JSON.stringify(q.block.block)} ${e}`,X.$.Error)}}))}unloadStreamedBlock(q){const K=this.generateBlockID(q);let z=[];return this._streamedBlockMeshes.delete(K),this._blockPolygonIDs.has(K)&&(z=this._blockPolygonIDs.get(K),this._blockPolygonIDs.delete(K)),z}reloadStreamedBlock(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.onStreamedMapBlocksChanged([q],[q])}))}generateBlockID(q){const K=q.x,z=q.y;return(K+z)*(K+z+1)*.5+z}}},8460:(q,K,z)=>{"use strict";z.d(K,{s:()=>rt});var Y=z(8674),Q=z(80267),X=z(5191),Z=z(12915);class J{constructNavMesh(q,K,z){try{if(!q||q.length<=0)return[];const Y=this.convertToPolyBoolPoly(q);let Q=Z.segments(Y[0]);const X=Y.length;for(let q=1;q({regions:[q.map((q=>[q.x,q.y]))],inverted:!1})))}}var tt,et=z(94341),it=z(15073),st=z(15740),nt=z(39002),at=z(61806);!function(q){q.Walkable="walkable",q.NonWalkable="non-walkable"}(tt||(tt={}));class rt{get isRebuildingNavMesh(){return this._isRebuildingNavMesh}constructor(){this.navMesh=null,this.onNavMeshChanged=new st.H,this.onFlushCompleted=new st.H,this._navMeshConstructorWorker=null,this._gridResolution=1200,this._nextPolygonID=1,this._nextBlockID=1,this._navMeshBlocks=[],this._updateBlockIdQueue=[],this._polyBlockMapping=new Map,this._queueRequestCount=0,this._isRebuildingNavMesh=!1;this.navMesh=new et.L([],0,10)}destroy(){this.onNavMeshChanged.dispose(),this.onFlushCompleted.dispose(),this._navMeshConstructorWorker.stop(),this._navMeshConstructorWorker=null,this._navMeshBlocks.forEach((q=>{q.onBuildComplete.dispose()})),this.navMesh.destroy()}findPath(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.navMesh){const z=this.navMesh.findPath(q,K);if((null==z?void 0:z.length)>0)return z;if(this._isRebuildingNavMesh)return new Promise((q=>{this.onNavMeshChanged.addOnce(void 0)}))}return[]}))}setNavMeshConstructorWorker(q){this._navMeshConstructorWorker=q}getNavMeshConstructor(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._navMeshConstructorWorker){const q=at.W.instance.getWorkerURL("NavMeshConstructor");this._navMeshConstructorWorker=it.p.createWorker(J,q)}return this._navMeshConstructorWorker.start()}))}setGridResolution(q){return(0,Y.sH)(this,void 0,void 0,(function*(){this._gridResolution=q;let K=this._navMeshBlocks.reduce(((q,K)=>(q.push(...K.polygons),q)),[]);K=K.filter(((q,z)=>z===K.findIndex((K=>K.ID===q.ID)))),this.beginNavMeshUpdateQueue(),this._navMeshBlocks.forEach((q=>{q.navMeshPolygonIDs.forEach((q=>this.navMesh.removePolygon(q)))})),this._polyBlockMapping.clear(),this._navMeshBlocks=[];const z=K.length;for(let q=0;q{this.removePolygon(q)})),this.flushNavMeshUpdateQueue()}removePolygon(q){return this.removePolygonFromNavMesh(q)}beginNavMeshUpdateQueue(){++this._queueRequestCount}flushNavMeshUpdateQueue(){return(0,Y.sH)(this,void 0,void 0,(function*(){return--this._queueRequestCount,this._queueRequestCount>0||this._isRebuildingNavMesh?new Promise((q=>{this.onFlushCompleted.addOnce(q)})):this._updateBlockIdQueue.length>0?this.rebuildAllBlocksInQueue():void 0}))}rebuildAllBlocksInQueue(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this.getBlocks(this._updateBlockIdQueue);this._updateBlockIdQueue=[],this._isRebuildingNavMesh=!0;const K=q.length;for(let z=0;z0)return this.rebuildAllBlocksInQueue();this.onFlushCompleted.dispatch()}))}getBlocksForNavPoly(q){const K=nt.c.getAABBforPoints(q.poly),z=Math.floor(K.left/this._gridResolution),Y=Math.floor(K.top/this._gridResolution),Q=Math.ceil(K.right/this._gridResolution),X=Math.ceil(K.bottom/this._gridResolution),Z=[];for(let J=z;J0){this.getBlocks(z).forEach((K=>{const z=K.polygons.findIndex((K=>K.ID===q));z>-1?K.polygons.splice(z,1):Q.V.log(`Polygon with id ${q} was not found in block with ID ${K.ID}, but was expected`,X.$.Warning),this.updateNavMeshBlock(K)})),this._polyBlockMapping.delete(q)}}createBlockNavPoly(q,K){return{ID:this._nextPolygonID++,type:K,poly:q}}addPolygonsToNavMesh(q,K){this.beginNavMeshUpdateQueue();const z=q.map((q=>{const z=this.createBlockNavPoly(q,K);return this.addPolygonToNavMesh(z),z.ID}));return this.flushNavMeshUpdateQueue(),z}addPolygonToNavMesh(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this.getBlocksForNavPoly(q);this._polyBlockMapping.set(q.ID,K.map((q=>q.ID))),yield Promise.all(K.map((K=>(0,Y.sH)(this,void 0,void 0,(function*(){return K.polygons.push(q),this.updateNavMeshBlock(K)})))))}))}updateNavMeshBlock(q){return(0,Y.sH)(this,void 0,void 0,(function*(){this._queueRequestCount>0?-1===this._updateBlockIdQueue.indexOf(q.ID)&&this._updateBlockIdQueue.push(q.ID):(yield this.rebuildNavMeshBlock(q),this.onNavMeshChanged.dispatch())}))}rebuildNavMeshBlock(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(q.isBuilding)return new Promise((K=>{q.onBuildComplete.addOnce((()=>{this.rebuildNavMeshBlock(q).then(K)}))}));q.isBuilding=!0,q.navMeshPolygonIDs.length>0&&(q.navMeshPolygonIDs.forEach((q=>{this.navMesh.removePolygon(q)})),q.navMeshPolygonIDs=[]);const K=q.x*this._gridResolution,z=q.y*this._gridResolution,Y={left:K,top:z,right:K+this._gridResolution,bottom:z+this._gridResolution},Q=yield this.getNavMeshConstructor(),X=[],Z=[];q.polygons.forEach((q=>{q.poly.forEach((q=>{q.x=this.alignValuesSmallerThanEpsilon(q.x,K),q.y=this.alignValuesSmallerThanEpsilon(q.y,z),q.x=this.alignValuesSmallerThanEpsilon(q.x,Y.right),q.y=this.alignValuesSmallerThanEpsilon(q.y,Y.bottom)})),q.type===tt.Walkable?X.push(q):q.type===tt.NonWalkable&&Z.push(q)}));const J=yield Q.constructNavMesh(X.map((q=>q.poly)),Z.map((q=>q.poly)),Y);q.navMeshPolygonIDs=J.map((q=>this.navMesh.addPolygon(q))),q.isBuilding=!1,q.onBuildComplete.dispatch()}))}alignValuesSmallerThanEpsilon(q,K){return q!==K&&Math.abs(q-K)<1?K:q}getGridBlock(q,K){const z=this._navMeshBlocks.findIndex((z=>z.x===q&&z.y===K));if(z>-1)return this._navMeshBlocks[z];const Y={ID:this._nextBlockID++,x:q,y:K,polygons:[],navMeshPolygonIDs:[],isBuilding:!1,onBuildComplete:new st.H};return this._navMeshBlocks.push(Y),Y}getBlocks(q){return q.map((q=>this._navMeshBlocks.find((K=>K.ID===q)))).filter((q=>!!q))}}},82119:(q,K,z)=>{"use strict";z.d(K,{l:()=>Y});const Y={}},563:(q,K,z)=>{"use strict";z.d(K,{X:()=>nt});var Y,Q=z(8674),X=z(64527),Z=z(27179),J=z(823),tt=z(29658),et=z(43501),it=z(15740),st=z(39002);let nt=Y=class extends et.d{constructor(){super(...arguments),this._anchorMin=new Z.I(.5,.5),this._anchorMax=new Z.I(.5,.5),this._anchoredPivotOffset=new Z.I,this._sizeDelta=new X.o,this._pivot=new Z.I(.5,.5),this._rectTransformDimensions=new X.o,this._isTransformRectDirty=!0,this._onRecalculatedBounds=new it.H,this._onDimensionsChanged=new it.H}get anchorMin(){return this._anchorMin}set anchorMin(q){this.setAnchorMin(q.x,q.y)}get anchorMax(){return this._anchorMax}set anchorMax(q){this.setAnchorMax(q.x,q.y)}get localPosition(){return this._anchoredPivotOffset}set localPosition(q){this.setAnchoredPivotOffset(q.x,q.y)}get left(){return-this._sizeDelta.width*this._pivot.x+this._anchoredPivotOffset.x}set left(q){this.setSizeDelta(-this.right-q,this._sizeDelta.height),this.setAnchoredPivotOffset(this._sizeDelta.width*this._pivot.x+q,this._anchoredPivotOffset.y)}get right(){return-(this._sizeDelta.width*(1-this._pivot.x)+this._anchoredPivotOffset.x)}set right(q){this.setSizeDelta(-this.left-q,this._sizeDelta.height),this.setAnchoredPivotOffset(-(this._sizeDelta.width*(1-this._pivot.x)+q),this._anchoredPivotOffset.y)}get top(){return-this._sizeDelta.height*this._pivot.y+this._anchoredPivotOffset.y}set top(q){this.setSizeDelta(this._sizeDelta.width,-this.bottom-q),this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,this._sizeDelta.height*this._pivot.y+q)}get bottom(){return-(this._sizeDelta.height*(1-this._pivot.y)+this._anchoredPivotOffset.y)}set bottom(q){this.setSizeDelta(this._sizeDelta.width,-this.top-q),this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,-(this._sizeDelta.height*(1-this._pivot.y)+q))}get posX(){return this._anchoredPivotOffset.x}set posX(q){this.setAnchoredPivotOffset(q,this._anchoredPivotOffset.y)}get posY(){return this._anchoredPivotOffset.y}set posY(q){this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,q)}get widthDelta(){return this._sizeDelta.width}set widthDelta(q){this.setSizeDelta(q,this._sizeDelta.height)}get heightDelta(){return this._sizeDelta.height}set heightDelta(q){this.setSizeDelta(this._sizeDelta.width,q)}get rectTransformDimensions(){return this.recalculateRectTransform(),this._rectTransformDimensions}get pivot(){return this._pivot}set pivot(q){this.setPivot(q.x,q.y)}get anchoredPivotOffset(){return this._anchoredPivotOffset}set anchoredPivotOffset(q){this.setAnchoredPivotOffset(q.x,q.y)}get sizeDelta(){return this._sizeDelta}set sizeDelta(q){this.setSizeDelta(q.width,q.height)}get fullWidth(){return this.rectTransformDimensions.width}set fullWidth(q){const K=this.rectTransformDimensions.width-this._sizeDelta.width;this._sizeDelta.width=q-K,this.markRectTransformDirty()}get fullHeight(){return this.rectTransformDimensions.height}set fullHeight(q){const K=this.rectTransformDimensions.height-this._sizeDelta.height;this._sizeDelta.height=q-K,this.markRectTransformDirty()}get onRecalculatedBounds(){return this._onRecalculatedBounds}get onDimensionsChanged(){return this._onDimensionsChanged}create(){super.create(),this._isTransformRectDirty=!0,this._previousParent&&(this._previousParent.onComponentAdded.add(this.parentComponentAddedOrRemoved,this),this._previousParent.onComponentRemoved.add(this.parentComponentAddedOrRemoved,this))}destroy(){var q,K,z,Y;this._onRecalculatedBounds.dispose(),this._onDimensionsChanged.dispose(),null===(K=null===(q=this._previousParent)||void 0===q?void 0:q.onComponentAdded)||void 0===K||K.remove(this.parentComponentAddedOrRemoved,this),null===(Y=null===(z=this._previousParent)||void 0===z?void 0:z.onComponentRemoved)||void 0===Y||Y.remove(this.parentComponentAddedOrRemoved,this),super.destroy()}preDeserialize(q){super.preDeserialize(q),null==q||delete q.localPosition}setAnchorMin(q,K){st.c.isNearlyEqual(this._anchorMin.x,q)&&st.c.isNearlyEqual(this._anchorMin.y,K)||(this._anchorMin.x=q,this._anchorMin.y=K,this.markRectTransformDirty())}setAnchorMax(q,K){st.c.isNearlyEqual(this._anchorMax.x,q)&&st.c.isNearlyEqual(this._anchorMax.y,K)||(this._anchorMax.x=q,this._anchorMax.y=K,this.markRectTransformDirty())}setAnchoredPivotOffset(q,K){this._anchoredPivotOffset.isNearlyEqualToValues(q,K)||(this._anchoredPivotOffset.x=q,this._anchoredPivotOffset.y=K,this.markRectTransformDirty())}setPosition(q,K){this.setAnchoredPivotOffset(q,K)}setPositionX(q){this.setAnchoredPivotOffset(q,this._anchoredPivotOffset.y)}setPositionY(q){this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,q)}setSizeDelta(q,K){this._sizeDelta.isNearlyEqualToValues(q,K)||(this._sizeDelta.width=q,this._sizeDelta.height=K,this.markRectTransformDirty())}setPivot(q,K){this._pivot.isNearlyEqualToValues(q,K)||(this._pivot.x=q,this._pivot.y=K,this.markRectTransformDirty())}postDeserialize(){super.postDeserialize(),this._isTransformRectDirty=!0}recalculateTransform(){this.recalculateRectTransform(),super.recalculateTransform()}recalculateWorldTransform(){this.recalculateRectTransform(),super.recalculateWorldTransform()}parentComponentAddedOrRemoved(q){q instanceof et.d&&this.markRectTransformDirty()}hierarchyUpdated(){var q,K;this.GameObject.parent!==this._previousParent&&(this._previousParent&&(this._previousParent.onComponentAdded.remove(this.parentComponentAddedOrRemoved,this),this._previousParent.onComponentRemoved.remove(this.parentComponentAddedOrRemoved,this)),null===(q=this.GameObject.parent)||void 0===q||q.onComponentAdded.add(this.parentComponentAddedOrRemoved,this),null===(K=this.GameObject.parent)||void 0===K||K.onComponentRemoved.add(this.parentComponentAddedOrRemoved,this),this.markRectTransformDirty()),super.hierarchyUpdated()}recalculateRectTransform(){if(this._isTransformRectDirty){const q=this.GameObject.parent,K=q?q.findComponent(Y):null,z=K?K.rectTransformDimensions:X.o.ZERO,Q=new Z.I(this._anchorMin.x*z.width,this._anchorMin.y*z.height),J=new Z.I(this._anchorMax.x*z.width,this._anchorMax.y*z.height),tt=new X.o(J.x-Q.x,J.y-Q.y),et=new Z.I(0,0),it=this._rectTransformDimensions.width,st=this._rectTransformDimensions.height;K&&(et.x=z.width*K.pivot.x,et.y=z.height*K.pivot.y),this._rectTransformDimensions.width=tt.width+this._sizeDelta.width,this._rectTransformDimensions.height=tt.height+this._sizeDelta.height,super.setPosition(Q.x+tt.width*this._pivot.x+this._anchoredPivotOffset.x-et.x,Q.y+tt.height*this._pivot.y+this._anchoredPivotOffset.y-et.y),this._isTransformRectDirty=!1,this._onRecalculatedBounds.dispatch(),it===this._rectTransformDimensions.width&&st===this._rectTransformDimensions.height||this._onDimensionsChanged.dispatch()}}markRectTransformDirty(){if(!this._isTransformRectDirty){this._isTransformRectDirty=!0;const q=this.GameObject.children;if(!q)return;const K=q.length;for(let z=0;z to place values dynamically")],nt)},96352:(q,K,z)=>{"use strict";z.d(K,{M:()=>X});var Y=z(80267),Q=z(5191);class X{constructor(q){this._gl=q}destroy(){this._gl.deleteProgram(this._program)}useProgram(){this._gl.useProgram(this._program)}compileProgram(q,K){const z=this._gl,X=this.compileFragmentShader(z,K),Z=this.compileVertexShader(z,q);if(!X||!Z)return null;const J=z.createProgram();return z.attachShader(J,Z),z.attachShader(J,X),z.linkProgram(J),z.getProgramParameter(J,z.LINK_STATUS)?this._program=J:(Y.V.log(`Could not initialize shaders:\n${z.getProgramInfoLog(J)}`,Q.$.Error),null)}compileVertexShader(q,K){return this.compileShader(q,K,q.VERTEX_SHADER)}compileFragmentShader(q,K){return this.compileShader(q,K,q.FRAGMENT_SHADER)}compileShader(q,K,z){const X=q.createShader(z);return q.shaderSource(X,K),q.compileShader(X),q.getShaderParameter(X,q.COMPILE_STATUS)?X:(Y.V.log(`Could not compile shader of type ${z}:\n${q.getShaderInfoLog(X)}`,Q.$.Error),null)}}},43501:(q,K,z)=>{"use strict";z.d(K,{d:()=>st});var Y=z(8674),Q=z(68910),X=z(823),Z=z(71082),J=z(40794),tt=z(29658),et=z(15740),it=z(39002);let st=class extends J.u{constructor(){super(...arguments),this._previousParent=null,this.onWorldMatrixChanged=new et.H,this._worldPosition=new Q.Point,this._worldScale=new Q.Point(1,1),this._pixiTransform=new Q.Transform,this._worldScaleID=0}get localPosition(){return this._pixiTransform.position}set localPosition(q){this.setPixiTransformPosition(q.x,q.y)}get localScale(){return this._pixiTransform.scale}set localScale(q){this.setScale(q.x,q.y)}get localRotation(){return it.c.radiansToDegrees(this._pixiTransform.rotation)}set localRotation(q){this.setRotation(q)}get localMatrix(){return this.recalculateTransform(),this._pixiTransform.localTransform}get worldMatrix(){return this.recalculateWorldTransform(),this._pixiTransform.worldTransform}get worldPosition(){this.recalculateWorldTransform();const q=this._pixiTransform.worldTransform;return this._worldPosition.set(q.tx,q.ty),this._worldPosition}set worldPosition(q){var K;const z=null===(K=this.GameObject.parent)||void 0===K?void 0:K.transform;if(z){const K=z.worldMatrix.applyInverse(q);this.setPixiTransformPosition(K.x,K.y)}else this.localPosition=q}get worldScale(){var q,K;this.recalculateWorldTransform();const z=this._pixiTransform._worldID;if(this._worldScaleID!==z){this._worldScale.copyFrom(this._pixiTransform.scale);let Y=null===(q=this.GameObject.parent)||void 0===q?void 0:q.transform;for(;Y;)Z.C.multiplyPointData(this._worldScale,Y.localScale),Y=null===(K=Y.GameObject.parent)||void 0===K?void 0:K.transform;this._worldScaleID=z}return this._worldScale}set worldScale(q){var K;const z=null===(K=this.GameObject.parent)||void 0===K?void 0:K.transform;if(z){const K=z.worldScale;this.setScale(q.x/K.x,q.y/K.y)}else this.setScale(q.x,q.y)}get pixiTransform(){return this.recalculateWorldTransform(),this._pixiTransform}create(){super.create(),this._previousParent=this.GameObject.parent,this.GameObject.onHierarchyChanged.add(this.hierarchyUpdated,this),this.appendObservablePointCallback(this._pixiTransform.position,(()=>{this.markChildTransformsDirty()})),this.appendObservablePointCallback(this._pixiTransform.scale,(()=>{this.markChildTransformsDirty()})),this.appendObservablePointCallback(this._pixiTransform.pivot,(()=>{this.markChildTransformsDirty()})),this.appendObservablePointCallback(this._pixiTransform.skew,(()=>{this.markChildTransformsDirty()}))}destroy(){var q,K;null===(K=null===(q=this.GameObject)||void 0===q?void 0:q.onHierarchyChanged)||void 0===K||K.remove(this.hierarchyUpdated,this),this.onWorldMatrixChanged.dispose(),super.destroy()}setPosition(q,K){this.setPixiTransformPosition(q,K)}setPositionX(q){this._pixiTransform.position.x=q}setPositionY(q){this._pixiTransform.position.y=q}setPixiTransformPosition(q,K){this._pixiTransform.position.set(q,K)}setScale(q,K=q){this._pixiTransform.scale.set(q,K)}setSkew(q,K=q){this._pixiTransform.skew.set(it.c.degreesToRadians(q),it.c.degreesToRadians(K))}setRotation(q){this._pixiTransform.rotation=it.c.degreesToRadians(q)}recalculateWorldTransform(){this._pixiTransform.updateTransform(this.getParentTransform())}recalculateTransform(){this._pixiTransform.updateLocalTransform()}getParentTransform(){var q,K;const z=null===(K=null===(q=this.GameObject)||void 0===q?void 0:q.parent)||void 0===K?void 0:K.transform;return z?z.pixiTransform:(this._fakeParentTransform||(this._fakeParentTransform=new Q.Transform),this._fakeParentTransform)}markChildTransformsDirty(){var q,K,z;this._pixiTransform._worldID++,this.onWorldMatrixChanged.dispatch();const Y=null!==(K=null===(q=this.GameObject)||void 0===q?void 0:q.children)&&void 0!==K?K:[],Q=Y.length;for(let X=0;X{z.call(Y),K()}}};(0,Y.Cg)([(0,X._H)(),(0,Y.Sn)("design:type",Object),(0,Y.Sn)("design:paramtypes",[Object])],st.prototype,"localPosition",null),(0,Y.Cg)([(0,X._H)(),(0,Y.Sn)("design:type",Object),(0,Y.Sn)("design:paramtypes",[Object])],st.prototype,"localScale",null),(0,Y.Cg)([(0,X.g1)(),(0,Y.Sn)("design:type",Number),(0,Y.Sn)("design:paramtypes",[Number])],st.prototype,"localRotation",null),st=(0,Y.Cg)([(0,tt.EV)("Transform",tt.YH.transform,"A basic transform that only holds position rotation and scale")],st)},55539:(q,K,z)=>{"use strict";var Y;z.d(K,{C:()=>Y}),function(q){q[q.TOP_LEFT=0]="TOP_LEFT",q[q.TOP_CENTER=1]="TOP_CENTER",q[q.TOP_RIGHT=2]="TOP_RIGHT",q[q.LEFT_TOP=3]="LEFT_TOP",q[q.LEFT_CENTER=4]="LEFT_CENTER",q[q.LEFT_BOTTOM=5]="LEFT_BOTTOM",q[q.CENTER=6]="CENTER",q[q.RIGHT_TOP=7]="RIGHT_TOP",q[q.RIGHT_CENTER=8]="RIGHT_CENTER",q[q.RIGHT_BOTTOM=9]="RIGHT_BOTTOM",q[q.BOTTOM_LEFT=10]="BOTTOM_LEFT",q[q.BOTTOM_CENTER=11]="BOTTOM_CENTER",q[q.BOTTOM_RIGHT=12]="BOTTOM_RIGHT"}(Y||(Y={}))},30290:(q,K,z)=>{"use strict";var Y;z.d(K,{G:()=>Q,J:()=>Y}),function(q){q.None="none",q.Easy="power1",q.Strong="power2",q.VeryStrong="power3",q.SuperStrong="power4",q.Back="back",q.Elastic="elastic"}(Y||(Y={}));class Q{static generateCustomElasticEase(q=1,K=.3,z=!1,Y=!0){let X;return X=z?Y?{value:`elastic.inOut(${q}, ${K})`}:{value:`elastic.in(${q}, ${K})`}:Y?{value:`elastic.out(${q}, ${K})`}:Q.Linear.None,X}static generateCustomBackEase(q=2,K=!0,z=!1){let Y;return Y=K?z?{value:`back.inOut(${q})`}:{value:`back.in(${q})`}:z?{value:`back.out(${q})`}:Q.Linear.None,Y}static generateSteppedEase(q=16){return{value:`steps (${q})`}}static generateSlowMoEase(q=.5,K=.5,z=!1){return{value:`slow (${q}, ${K}, ${z})`}}static generateRoughEase(q=1,K=20,z=!0,Y=!1,X=!0,Z=!0,J=Q.Linear.None){let tt="none";return X?tt=Z?"both":"in":Z&&(tt="out"),{value:`rough ({ template: ${J}, strength: ${q}, points: ${K}, randomize: ${z}, clamp: ${Y}, taper: ${tt})`}}}Q.Back={In:{value:"back.in(2) "},Out:{value:"back.out(2) "},InOut:{value:"back.inOut(2)"}},Q.Bounce={In:{value:"bounce.in"},Out:{value:"bounce.out"},InOut:{value:"bounce.inOut"}},Q.Circular={In:{value:"circ.in"},Out:{value:"circ.out"},InOut:{value:"circ.inOut"}},Q.Cubic={In:{value:"power2.in"},Out:{value:"power2.out"},InOut:{value:"power2.inOut"}},Q.Elastic={In:{value:"elastic.in(1, 0.3)"},Out:{value:"elastic.out(1, 0.3)"},InOut:{value:"elastic.inOut(1, 0.3)"}},Q.Exponential={In:{value:"expo.in"},Out:{value:"expo.out"},InOut:{value:"expo.inOut"}},Q.Linear={None:{value:"none"}},Q.Quadratic={In:{value:"power1.in"},Out:{value:"power1.out"},InOut:{value:"power1.inOut"}},Q.Quintic={In:{value:"power4.in"},Out:{value:"power4.out"},InOut:{value:"power4.inOut"}},Q.Quartic={In:{value:"power3.in"},Out:{value:"power3.out"},InOut:{value:"power3.inOut"}},Q.Sinusoidal={In:{value:"sine.in"},Out:{value:"sine.out"},InOut:{value:"sine.inOut"}}},29104:(q,K,z)=>{"use strict";z.d(K,{K:()=>et});var Y=z(85880),Q=z(80267),X=z(5191),Z=z(32154),J=z(15740),tt=z(30290);class et{get onLoop(){return this.onRepeat}get isRunning(){return this._timeline.isActive()}get isPaused(){return this._timeline.paused()}get timeScale(){return this._timeline.timeScale()}set timeScale(q){this.checkInitialized("timeScale"),this._timeline.timeScale(q)}get properties(){return this.checkInitialized("get properties"),this._rootTween.vars}get reverse(){return this.checkInitialized("get reverse"),this._timeline.reversed()}set reverse(q){this.checkInitialized("set reverse"),this._timeline.reversed(q)}getDuration(){return this.checkInitialized("get duration"),1e3*this._rootTween.duration()}duration(q){return this.checkInitialized("set duration"),this._rootTween.duration(.001*q),this}getDelay(){return this.checkInitialized("get delay"),1e3*this._timeline.delay()}delay(q){return this.checkInitialized("set delay"),this._timeline.delay(.001*q),this}getRepeat(){return this.checkInitialized("get repeat"),this._timeline.repeat()}repeat(q){return this.checkInitialized("set repeat"),this._timeline=this._timeline.repeat(q),this}getYoyo(){return this.checkInitialized("get yoyo"),this._timeline.yoyo()}yoyo(q){return this.checkInitialized("set yoyo"),this._timeline.yoyo(q),this}get totalDuration(){return this.checkInitialized("get totalDuration"),1e3*this._timeline.duration()}get target(){return this._target}constructor(q,K,z,Q){this._tweenInitialized=!1,this.chainedTween=null,this.pendingDelete=!1,this.killed=!1,this.isDestroyed=!1,this._target=q,this.game=K,this.manager=Q,this.owner=z,this.onTweenComplete=new J.H,this.onChildComplete=new J.H,this.onRepeat=new J.H,this.onUpdate=new J.H,this.onStart=new J.H,this.onDestroy=new J.H,this._timeline=Y.os.timeline({onComplete:()=>{this.onCompleteCallback()},onRepeat:()=>{this.onRepeat.dispatch()},onUpdate:()=>{this.onUpdate.dispatch()},onStart:()=>{this.onStart.dispatch()}}),this._rootTween=Y.os.set(this._target,{})}fixDeprecatedRelativeValues(q){const K=Object.keys(q);for(let z=0;z=0?(st.delay=.001*it,this._timeline.to(this._target,st)):this._timeline.add(this._rootTween),this._timeline.paused(!Q),Z.A.isDefined(K)&&this.duration(K),Z.A.isDefined(J)&&this.repeat(J),Z.A.isDefined(X)&&this.delay(X),Z.A.isDefined(et)&&this.yoyo(et),this}from(q,K,z=tt.G.Linear.None,Q=!1,X,J,et,it=-1){const st=this.fixDeprecatedRelativeValues(q);return st.ease=z.value,this._rootTween=Y.os.from(this._target,st),this._tweenInitialized=!0,it>=0?(st.delay=.001*it,this._timeline.to(this._target,st)):this._timeline.add(this._rootTween),this._timeline.paused(!Q),Z.A.isDefined(K)&&this.duration(K),Z.A.isDefined(J)&&this.repeat(J),Z.A.isDefined(X)&&this.delay(X),Z.A.isDefined(et)&&this.yoyo(et),this}onCompleteCallback(){this.game&&(this.onTweenComplete.dispatch(),this.chainedTween&&this.chainedTween.start())}onUpdateCallback(q,K){return this.onUpdate.add(q,K),this}chain(...q){let K=q.length;for(;--K>=0;)q[K].onTweenComplete.add((()=>{this.game&&this.onChildComplete.dispatch()}),this,Number.MAX_SAFE_INTEGER),K>0?q[K-1].chainedTween=q[K]:this.chainedTween=q[K];return this}pause(){return this._timeline&&(this._timeline=this._timeline.pause()),this}loop(q){return this._timeline=this._timeline.repeat(q?-1:0),this}repeatDelay(q){return this._timeline=this._timeline.repeatDelay(.001*q),this}resume(){var q;return this._timeline=null===(q=this._timeline)||void 0===q?void 0:q.resume(),this}start(){return this._timeline=this._timeline.restart(!0),this}stop(q=!1){return this._timeline&&(this._timeline=this._timeline.pause(),q&&(this._timeline=this._timeline.progress(1,!1))),this}remove(){this._timeline&&this._timeline.kill(),this._rootTween&&this._rootTween.kill(),this.pendingDelete=!0,this.killed=!0}destroy(){this.isDestroyed?Q.V.log("Tween destroy called, but tween is already destroyed",X.$.Warning):(this._timeline&&(this.killed||this._timeline.kill(),this._timeline=null),this._rootTween&&(this.killed||this._rootTween.kill(),this._rootTween=null),this.killed=!0,this.onStart.dispose(),this.onTweenComplete.dispose(),this.onChildComplete.dispose(),this.onUpdate.dispose(),this.onRepeat.dispose(),this.game=null,this.manager=null,this.owner=null,this.chainedTween=null,this.onTweenComplete=null,this.onChildComplete=null,this.onRepeat=null,this.onUpdate=null,this.onStart=null,this.isDestroyed=!0,this.onDestroy.dispatch(),this.onDestroy.dispose(),this.onDestroy=null)}checkInitialized(q){this._tweenInitialized||Q.V.log(`Please call Tween.to/from before calling ${q}, the value has not been set!`,X.$.Error)}}},78821:(q,K,z)=>{"use strict";z.d(K,{$:()=>J});var Y=z(85880),Q=z(80267),X=z(5191),Z=z(29104);class J{constructor(q){this._tweens=[],this._owners=new Map,this.game=q,this.game.onPause.add(this.pauseAll,this),this.game.onResume.add(this.resumeAll,this)}getAll(){return this._tweens}removeAll(){this._tweens.forEach((q=>{q.pendingDelete=!0,q.remove()}))}removeFrom(q,K=!0){let z,Y;if(Array.isArray(q))for(Y=q.length,z=0;z{z&&(q.pendingDelete=!0)}),this,-Number.MAX_SAFE_INTEGER),q}create(q,K,z=!0){const Y=new Z.K(q,this.game,K);return this.add(Y,K,z),Y}remove(q){const K=this._tweens.indexOf(q);-1!==K&&(this._tweens[K].pendingDelete=!0,this._tweens[K].remove())}update(){for(let q=this._tweens.length-1;q>=0;q--){const K=this._tweens[q];if(!1!=!!K)if(K.isDestroyed){this._tweens.splice(q,1);const z=this.findOwnerForTween(K);null!==z?Q.V.log(`Attempted to update a destroyed tween, owner: ${z.constructor.name}`,X.$.Warning):Q.V.log("Attempted to update a destroyed tween.",X.$.Warning)}else K.pendingDelete&&(K.isRunning&&K.stop(!1),this.removeTweenFromOwner(K),K.destroy(),this._tweens.splice(q,1));else this._tweens.splice(q,1)}return this._tweens.length>0}pauseAll(){this._tweens.forEach((q=>{q.pendingDelete||q.pause()}))}resumeAll(){this._tweens.forEach((q=>{q.pendingDelete||q.resume()}))}removeAllFromOwner(q){if(!this._owners.has(q))return;this._owners.get(q).forEach((q=>{q.remove(),q.pendingDelete=!0})),this._owners.delete(q)}removeTweenFromOwner(q){let K=!1;if(this._owners.has(q.owner)){const z=this._owners.get(q.owner);z.has(q)&&(z.delete(q),0===z.size&&this._owners.delete(q.owner),K=!0)}return K}findOwnerForTween(q){let K=null;if(null!==q.owner)K=q.owner;else for(const[z,Y]of this._owners.entries())if(Y.has(q)){K=z;break}return K}destroy(){this.game.onPause.remove(this.pauseAll,this),this.game.onResume.remove(this.resumeAll,this),this.game=null,this._tweens=null}static setGlobalTimeScale(q){Y.os.globalTimeline.timeScale(q)}}},50740:(q,K,z)=>{"use strict";z.d(K,{K:()=>J});var Y=z(5191),Q=z(80267),X=z(15740),Z=z(39002);class J{get isDestroyed(){return this._destroyed}get isLoaded(){return this.sound.isLoaded}set isLoaded(q){this.sound.isLoaded=q}get isPlaying(){return this.sound.isPlaying}set isPlaying(q){this.sound.isPlaying=q}get autoPlay(){return this.sound.autoPlay}set autoPlay(q){this.sound.autoPlay=q}get singleInstance(){return this.sound.singleInstance}set singleInstance(q){this.sound.singleInstance=q}get preload(){return this.sound.preload}set preload(q){this.sound.preload=q}get paused(){return this.sound.paused}set paused(q){this.sound.paused=q}get muted(){return this.sound.muted}set muted(q){this.instancesValid()&&(this.sound.muted=q)}get mute(){return this.muted}set mute(q){this.muted=q}get loop(){return this.sound.loop}set loop(q){this.instancesValid()&&(this.sound.loop=q)}get url(){return this.sound.url}set url(q){this.sound.url=q}get options(){return this.sound.options}set options(q){this.sound.options=q}get media(){return this.sound.media}set media(q){this.sound.media=q}get speed(){return this.sound.speed}set speed(q){this.instancesValid()&&(this.sound.speed=q)}get filters(){return this.sound.filters}set filters(q){this.sound.filters=q}get volume(){return this.sound.volume}set volume(q){this.instancesValid()&&(this.sound.volume=q)}get context(){return this.sound.context}get instances(){return this.sound.instances}get sprites(){return this.sound.sprites}get duration(){return this.sound.duration}get isPlayable(){return this.sound.isPlayable}get isDecoding(){return!this.sound.isLoaded}get onPlay(){return this._onPlay}get onStop(){return this._onStop}get onComplete(){return this._onComplete}get onPause(){return this._onPause}get onResume(){return this._onResume}constructor(q,K,z,Z){this._destroyed=!1,this._onPlay=new X.H,this._onStop=new X.H,this._onComplete=new X.H,this._onPause=new X.H,this._onResume=new X.H,this.sound=q,this.game=K,this.key=z,this.usingAudioTag=Z,q?this.singleInstance=!1:Q.V.log("PIXISound constructor called without a sound.",Y.$.Error)}instancesValid(){let q=!0;return this.sound.instances||(q=!1,Q.V.log(`Sound instances invalid for key ${this.key}`,Y.$.Warning)),q}pause(){return this.isPlaying&&(this.onPause.dispatch(),this.sound.pause()),this}resume(){return this.paused&&(this.onResume.dispatch(),this.sound.resume()),this}addSprites(q,K){return this.sound.addSprites(q,K)}destroy(){this._destroyed=!0,this._onComplete.dispose(),this._onStop.dispose(),this._onPlay.dispose(),this._onPause.dispose(),this._onResume.dispose(),this.game.sound.remove(this),this.sound&&(this.sound.instances&&this.sound.destroy(),this.sound=null)}removeSprites(q){return this.sound.removeSprites(q),this}stop(){return this.sound&&(this.isPlaying||this.paused)&&(this._onStop.dispatch(),this.sound.stop()),this}play(q,K){return this.onPlay.dispatch(),this.sound.play(q,(q=>{this.onComplete.dispatch(),K&&K(q)})),this}playWithOptions(q={start:0}){return this.onPlay.dispatch(),this.sound.play(q,(q=>{this.onComplete.dispatch()})),this}refresh(){this.sound.refresh()}refreshPaused(){this.sound.refreshPaused()}autoPlayStart(){return this.sound.autoPlayStart()}addMarker(q,K,z,Y=null){null!==Y&&(this.volume=Y);const Q={start:K,end:K+z},X=this.sound.sprites[q];return X?Object.assign(X,Q):this.sound.addSprites(q,Q),this}playMarker(q,K=0,z=null,X=null,J=!1,tt){const et=this.sprites[q];if(et){const Y=Z.c.clamp(K,0,1);et.start=Z.c.linear(et.start,et.end,Y),null!==z&&(this.volume=z),null!==X&&(this.loop=X),J&&this.stop(),this.play(q,tt)}else Q.V.log(`Cannot find sound ${q} so cannot play it.`,Y.$.Error);return this}removeMarker(q){return this.sound.removeSprites(q),this}}},78321:(q,K,z)=>{"use strict";z.d(K,{x:()=>et});var Y=z(8674),Q=z(34711),X=z(22070),Z=z(30615),J=z(15740),tt=z(50740);class et{get mute(){return this._muted}set mute(q){if(q){if(this._muted)return;this._codeMuted=!0,this.setMute()}else{if(!this._muted)return;this._codeMuted=!1,this.unsetMute()}}get volume(){return Q.s3.volumeAll}set volume(q){const K=Math.min(Math.max(q,0),1);if(Q.s3.volumeAll!==K){Q.s3.volumeAll=K;for(let q=0;q{this.setTouchUnlock(),this.resumeWebAudio()},void 0===this._unlockSource.start?this._unlockSource.noteOn(0):this._unlockSource.start(0),this.resumeWebAudio())),!0}stopAll(){this.noAudio||Q.s3.stopAll()}pauseAll(){this.noAudio||Q.s3.pauseAll()}resumeAll(){this.noAudio||Q.s3.resumeAll()}setDecodedCallback(q,K,z){let Y=q;"string"==typeof Y&&(Y=[Y]),this._watchList.reset();for(let Q=0;Q0;)if(this._sounds[K]===q)return this._sounds.splice(K,1),!0;return!1}removeAll(){Q.s3.removeAll(),this._sounds.length=0}removeByKey(q){let K=this._sounds.length,z=0;for(Q.s3.remove(q);K-- >0;)this._sounds[K].key===q&&(this._sounds.splice(K,1),z++);return z}play(q="",K=1,z=!1){if(this.noAudio)return null;const Y=this.add(q,K,z);return Y.play(),Y}setMute(){this._muted||(this._muted=!0,Q.s3.muteAll(),this.onMute.dispatch())}unsetMute(){this._muted&&!this._codeMuted&&(this._muted=!1,Q.s3.unmuteAll(),this.onUnMute.dispatch())}destroy(){var q,K;this.removeAll(),this.onSoundDecode.dispose(),this.onVolumeChange.dispose(),this.onMute.dispose(),this.onUnMute.dispose(),this.onTouchUnlock.dispose(),this.game.canvas.removeEventListener("click",this._resumeWebAudioOnClick),null===(K=null===(q=this.context)||void 0===q?void 0:q.close)||void 0===K||K.call(q),this._sounds=null,this._watchList=null,Q.s3.close()}_onResumeWebAudioOnClick(){this.resumeWebAudio(),this.game.canvas.removeEventListener("click",this._resumeWebAudioOnClick)}}},48368:(q,K,z)=>{"use strict";z.d(K,{q:()=>Z});var Y=z(68910),Q=z(5191),X=z(80267);class Z{static setSmoothed(q,K){(null==q?void 0:q.baseTexture)?(q.baseTexture.scaleMode=K?Y.SCALE_MODES.LINEAR:Y.SCALE_MODES.NEAREST,q.baseTexture.update()):X.V.log("Object not found, cannot set smoothing",Q.$.Warning)}static getSmoothed(q){return q.baseTexture.scaleMode===Y.SCALE_MODES.LINEAR}}},15740:(q,K,z)=>{"use strict";z.d(K,{H:()=>J});var Y=z(8674),Q=z(41560),X=z(32154);class Z{get listener(){return this._listener}get context(){return this._context}get callCount(){return this._callCount}constructor(q,K=null,z=!1,Y=0,Q){this.isOnce=!1,this.priority=0,this.active=!0,this._callCount=0,this._listener=q,this._context=K,this.isOnce=z,this.priority=Y,this._args=Q}isBound(){return!!this._listener}execute(q){var K;let z;if(this.active&&this.isBound()){++this._callCount;let Y=[];q.length>0&&(Y=Y.concat(q)),(null===(K=this._args)||void 0===K?void 0:K.length)>0&&(Y=Y.concat(this._args)),z=this._listener.apply(this.context,Y)}return z}destroy(){this._listener=null,this._context=null,this._args=null}toString(){return`[SignalBinding isOnce: ${String(this.isOnce)}, isBound: ${String(this.isBound())}, active: ${String(this.active)}]`}}class J{constructor(){this._bindings=[],this._shouldPropagate=!0,this.active=!0,this._dispatchCount=0}get dispatchCount(){return this._dispatchCount}add(q,K=null,z=0,...Y){return this.validateListener(q,"add"),this.addBinding(q,K,!1,z,Y)}addOnce(q,K=null,z=0,...Y){return this.validateListener(q,"addOnce"),this.addBinding(q,K,!0,z,Y)}asPromise(){return(0,Y.sH)(this,void 0,void 0,(function*(){return X.A.isDefined(this._promise)||(this._promise=new Q.b,this.addOnce(((...q)=>{var K;null===(K=this._promise)||void 0===K||K.resolve(q),this._promise=null}))),this._promise}))}remove(q,K=null){if(!q)return;this.validateListener(q,"remove");const z=this.indexOfListener(q,K);-1!==z&&this.removeAtIndex(z)}removeAll(q=null){for(let K=this._bindings.length-1;K>=0;--K)q&&q!==this._bindings[K].context||this.removeAtIndex(K)}has(q,K=null){return-1!==this.indexOfListener(q,K)}halt(){this._shouldPropagate=!1}dispatch(...q){this.active&&this.dispatchInternal(q)}dispatchAsync(...q){return(0,Y.sH)(this,void 0,void 0,(function*(){this.active&&(yield Promise.all(this.dispatchInternal(q)))}))}dispatchInternal(q){this._shouldPropagate=!0;const K=[...this._bindings],z=[];for(let Y=K.length-1;Y>=0&&this._shouldPropagate;--Y){const Q=K[Y];z.push(Q.execute(q)),Q.isOnce&&Q.isBound()&&this.remove(Q.listener,Q.context)}return this._dispatchCount++,z}dispose(){var q;null===(q=this._promise)||void 0===q||q.reject(`Signal disposed before firing. ${this.toString()}`),this.removeAll(),this._bindings.length=0}getBindingsCount(){return this._bindings.length}toString(){return`[Signal bindings count: ${this.getBindingsCount()}, active: ${String(this.active)}]`}validateListener(q,K){if("function"!=typeof q)throw new Error(`Signal: listener is a required param of ${K}() and must be a function.`)}addBinding(q,K=null,z=!1,Y=0,Q){const X=this.indexOfListener(q,K);let J;if(X>=0){if(J=this._bindings[X],J.isOnce!==z)throw new Error(`You cannot add ${z?"":"Once"}() then add ${z?"Once":""}() the same listener without removing the relationship first`)}else{J=new Z(q,K,z,Y,Q);let X=0;for(let q=this._bindings.length-1;q>=0;--q)if(this._bindings[q].priorityz.listener===q&&z.context===K))}}},9938:(q,K,z)=>{"use strict";var Y,Q,X,Z;z.d(K,{bX:()=>Y}),function(q){q.PointerDown="pointerdown",q.PointerCancel="pointercancel",q.PointerUp="pointerup",q.PointerTap="pointertap",q.PointerUpOutside="pointerupoutside",q.PointerMove="pointermove",q.PointerOver="pointerover",q.PointerOut="pointerout"}(Y||(Y={})),function(q){q.TouchStart="touchstart",q.TouchCancel="touchcancel",q.TouchEnd="touchend",q.TouchEndOutside="touchendoutside",q.TouchMove="touchmove",q.Tap="tap"}(Q||(Q={})),function(q){q.RightDown="rightdown",q.MouseDown="mousedown",q.RightUp="rightup",q.MouseUp="mouseup",q.RightClick="rightclick",q.Click="click",q.RightUpOutside="rightupoutside",q.MouseUpOutside="mouseupoutside",q.MouseMove="mousemove",q.MouseOver="mouseover",q.MouseOut="mouseout"}(X||(X={})),function(q){q.Added="added",q.Removed="removed"}(Z||(Z={}))},86766:(q,K,z)=>{"use strict";z.d(K,{S:()=>ht});var Y=z(8674),Q=z(27179),X=z(823),Z=z(4697),J=z(52751),tt=z(62481),et=z(93337),it=z(57530),st=z(40794),nt=z(29658),at=z(61806),rt=z(15740),ot=z(9938);let ht=class extends st.u{constructor(){super(...arguments),this.onDown=new rt.H,this.onRelease=new rt.H,this.onReleaseOutside=new rt.H,this.onHoverEnter=new rt.H,this.onHoverExit=new rt.H,this.onHoverMove=new rt.H,this.onHold=new rt.H,this.onClick=new rt.H,this._holdDelay=1e3,this.debounceTimeMs=0,this.allowContinuousHold=!1,this._pointerDown=!1,this._touchDuration=0,this._holdSent=!1,this._isTargetInput=!1,this._lastClickTime=0,this.onInputEnabledChanged=new rt.H,this._inputEnabled=!0,this.attachToCamera=!1,this.disableWhileAwaitingListeners=!1,this.sendClickLocationWithPointerSignals=!0,this._awaitingListeners=!1,this._renderComponent=null,this._displayObject=null}get inputEnabled(){return this._inputEnabled}set inputEnabled(q){this._inputEnabled=q,this.applyInputEnabledSetting(q),this.onInputEnabledChanged.dispatch()}set useHandCursor(q){this._useHandCursor=q,this.applyUseHandCursorSetting(q)}get useHandCursor(){return this._useHandCursor}set awaitingListeners(q){this._awaitingListeners=q,this.applyInputEnabledSetting(!q)}get renderComponent(){return this._renderComponent}set renderComponent(q){this._renderComponent=q,this._renderComponent?this.updateRenderComponent(this._renderComponent):this.updateRenderComponent(null)}create(){super.create(),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerUpOutside=this.onPointerUpOutside.bind(this),this.onPointerOver=this.onPointerOver.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onPointerMove=this.onPointerMove.bind(this)}postCreate(){super.postCreate(),this.updateRenderComponent(this._renderComponent)}hasContainsPoint(q){return void 0!==q.containsPoint}hasOriginalContainsPoint(q){return void 0!==q.originalContainsPoint}overrideContainsPoint(q){if(!this.hasContainsPoint(q))return;let K;this.hasOriginalContainsPoint(q)?K=q.originalContainsPoint.bind(q):(K=q.containsPoint.bind(q),q.originalContainsPoint=K),q.containsPoint=q=>{let z=this.attachToCamera||J.w.getActiveScene().getLayer(this._renderComponent.GameObject.layer).attachToCamera||!it.i.main;return K(z?q:it.i.main.viewMatrix.applyInverse(q))}}recursiveOverrideContainsPoint(q){if(this.overrideContainsPoint(q),void 0!==q.children&&!1!==Array.isArray(q.children))for(let K=0;K{var q,K;null===(K=null===(q=this.gameObject)||void 0===q?void 0:q.isDestroyed)||void 0===K||K||(this.awaitingListeners=!1)}))):this.onClick.dispatch(...this.sendClickLocationWithPointerSignals?[K]:[])),this._isTargetInput=!1,this._holdSent=!1,this._pointerDown=!1}onPointerUpOutside(q){(0,et.H)(q)||(this.onReleaseOutside.dispatch(),this._holdSent=!1,this._pointerDown=!1)}onPointerOver(q){(0,et.H)(q)||this.onHoverEnter.dispatch()}onPointerOut(q){(0,et.H)(q)||(this._isTargetInput=!1,this._touchDuration=0,this.onHoverExit.dispatch())}onPointerMove(q){if((0,et.H)(q))return;const K=new Q.I(q.global.x,q.global.y);this.onHoverMove.dispatch(K)}applyUseHandCursorSetting(q){this._displayObject&&(this._displayObject.cursor=q?"pointer":"auto")}applyInputEnabledSetting(q){this._displayObject&&(this._displayObject.eventMode=q?"static":"auto")}enableInteractiveChildrenOnHierarchy(q){var K;const z=q.parent;z&&(z.interactiveChildCount=(null!==(K=z.interactiveChildCount)&&void 0!==K?K:0)+1,z.interactiveChildren=!0,this.enableInteractiveChildrenOnHierarchy(z))}disableInteractiveChildrenOnHierarchy(q){const K=q.parent;K&&K.interactiveChildCount>0&&(--K.interactiveChildCount,K.interactiveChildren=K.interactiveChildCount>0,this.disableInteractiveChildrenOnHierarchy(K))}shouldDebounce(){return!this.inputEnabled||this._awaitingListeners||this.debounceTimeMs>0&&Date.now(){"use strict";z.d(K,{l:()=>ut});var Y=z(68910),Q=z(5191),X=z(80267),Z=z(32154),J=z(61806),tt=z(39688),et=z(66032),it=z(52777),st=z(88651);class nt extends st.${constructor(q,K,z,Y){super(q,K),this.bitmapData=z,this.frameData=Y}destroy(){this.game.cache.removeBitmapData(this.key),super.destroy()}}var at=z(37950),rt=z(37061);class ot extends st.${constructor(q,K,z,Y){super(q,K),this.renderTexture=z,this.frameData=Y}destroy(){this.game.cache.removeRenderTexture(this.key),super.destroy()}}var ht=z(89460);class ct extends st.${get spineData(){return this._spineData}constructor(q,K){super(J.W.instance.game,q),this._spineData=K}destroy(){this._spineData=null,super.destroy()}}var dt=z(49356),lt=z(90157);class ut{get game(){return this._game}static getAssetTypeIDs(){return Object.keys(it.r).filter((q=>!isNaN(Number(it.r[q])))).map((q=>it.r[q]))}addAtlasAlias(q,K,z){this._atlasFrameAlias.set(q,{atlasGuid:K,atlasFrame:z})}removeAtlasAlias(q){this._atlasFrameAlias.delete(q)}getAtlasAlias(q){return this._atlasFrameAlias.has(q)?this._atlasFrameAlias.get(q):null}addSliceData(q,K){this._sliceData.set(q,K)}getSliceData(q){return this._sliceData.get(q)}get cacheMap(){return this._cacheMap}constructor(q){this._atlasFrameAlias=new Map,this._sliceData=new Map,this._game=q,this._cacheMap=new Map,this._cacheMap.set(it.r.IMAGE,new Map),this._cacheMap.set(it.r.TEXTURE_ATLAS,new Map),this._cacheMap.set(it.r.JSON,new Map),this._cacheMap.set(it.r.SOUND,new Map),this._cacheMap.set(it.r.TEXT,new Map),this._cacheMap.set(it.r.RENDER_TEXTURE,new Map),this._cacheMap.set(it.r.BITMAPDATA,new Map),this._cacheMap.set(it.r.SPINE,new Map)}getKeys(q){return this.hasMap(q)?Array.from(this._cacheMap.get(q).keys()):[]}getSpine(q){const K=this.getMap(it.r.SPINE);if(!K.has(q))return null;let z=!0;const Y=K.get(q),Q=Y.spineData;return Y.destroyed&&!Q&&(z=!1),z?Q:(this.deleteStaleCache(K,q,it.e.SPINE),this.deleteStaleCache(K,q,it.e.TEXT),this.deleteStaleCache(K,`${q}Atlas`,it.e.JSON),null)}getImage(q){const K=this.getMap(it.r.IMAGE);if(!K.has(q))return null;const z=K.get(q),Y=z.image;return z.destroyed||!Y?(this.deleteStaleCache(K,q,it.e.IMAGE),null):Y}getTexture(q,K){let z=q,Q=K;const X=this.getMap(it.r.IMAGE),J=this.getAtlasAlias(q);if(J&&(z=J.atlasGuid,Q=J.atlasFrame),X.has(z)){const q=X.get(z);if(q.destroyed||!q.image&&q.texture.baseTexture.resource)this.deleteStaleCache(X,z,it.e.IMAGE);else{if(Z.A.isDefined(Q)){const K=q.subTextures[Q];if(K&&null!==K.textureCacheIds&&K.baseTexture&&!K.baseTexture.destroyed)return K}const K=q.texture;if(K&&null!==K.textureCacheIds&&K.baseTexture&&!K.baseTexture.destroyed)return K;this.deleteStaleCache(X,z,it.e.IMAGE)}}return Y.Texture.EMPTY}getFrameData(q,K=it.r.TEXTURE_ATLAS){const z=this.getMap(K);if(!z.has(q))return null;const Y=z.get(q),Q=Y.frameData;return Y.destroyed||!Z.A.isDefined(Q)||Q.destroyed?(this.deleteStaleCache(z,q,Object.values(it.e)[K]),null):Q}getFrameByName(q,K,z=it.r.TEXTURE_ATLAS){const Y=this.getFrameData(q,z);return Y?(K||X.V.log(`Cache getFrameByName called with no frame name: ${q}`,Q.$.Error),Y.getFrameByName(K)):null}getJSON(q){const K=this.getMap(it.r.JSON);if(!K.has(q))return null;const z=K.get(q),Y=z.json;return z.destroyed||!Z.A.isDefined(Y)?(this.deleteStaleCache(K,q,it.e.JSON),null):Y}getSound(q){const K=this.getMap(it.r.SOUND);if(!K.has(q))return null;const z=K.get(q),Y=z.sound;return z.destroyed||!Y||Y.isDestroyed||!Y.sound?(this.deleteStaleCache(K,q,it.e.SOUND),null):Y}getText(q){const K=this.getMap(it.r.TEXT);if(!K.has(q))return null;const z=K.get(q),Y=z.text;return z.destroyed||!Z.A.isDefined(Y)?(this.deleteStaleCache(K,q,it.e.TEXT),null):Y}getRenderTexture(q){const K=this.getMap(it.r.RENDER_TEXTURE);if(!K.has(q))return null;const z=K.get(q),Y=z.renderTexture;return z.destroyed||!Y||null===Y.textureCacheIds?(this.deleteStaleCache(K,q,it.e.RENDER_TEXTURE),null):Y}getBitmapData(q){const K=this.getMap(it.r.BITMAPDATA);if(!K.has(q))return null;const z=K.get(q),Y=z.bitmapData;return z.destroyed||!Y||null===Y.textureCacheIds?(this.deleteStaleCache(K,q,it.e.BITMAPDATA),null):Y}getTextureAtlas(q){const K=this.getMap(it.r.TEXTURE_ATLAS);if(!K.has(q))return null;const z=K.get(q);return z.destroyed?(this.deleteStaleCache(K,q,it.e.TEXTURE_ATLAS),null):z}addSpine(q,K){this.addItem(q,it.r.SPINE,new ct(q,K))}addImage(q,K,z){const Y=this.getMap(it.r.IMAGE).get(q);if(Y&&Z.A.isDefined(z)){const Z=`${z}`;return Y.subTextures[Z]&&X.V.log(`Warning: The frame key ${Z} already exists as a subtexture in the texture key ${q}. Overwritting...`,Q.$.Warning),void(Y.subTextures[Z]=K)}const J=new at.E(this._game,q,K);this.addItem(q,it.r.IMAGE,J)}addTextureAtlas(q,K,z){const Y=new lt.Z(this._game,q,q,z);this.addItem(q,it.r.TEXTURE_ATLAS,Y)}addBitmapData(q,K,z){let Y=z;return void 0===Y&&(Y=new et.o,Y.addFrame(new tt.w(0,K.frame.x,K.frame.y,K.frame.width,K.frame.height,q))),this.addItem(q,it.r.BITMAPDATA,new nt(J.W.instance.game,q,K,Y)),K}addRenderTexture(q,K){const z=new et.o;z.addFrame(new tt.w(0,0,0,K.width,K.height,"")),this.addItem(q,it.r.RENDER_TEXTURE,new ot(J.W.instance.game,q,K,z))}addJSON(q,K){this.addItem(q,it.r.JSON,new rt.F(this._game,q,K))}addSound(q,K){this.addItem(q,it.r.SOUND,new ht.I(this._game,q,K))}addText(q,K){this.addItem(q,it.r.TEXT,new dt.q(this._game,q,K))}checkKey(q){for(const K of this._cacheMap.values())if(K.has(q))return!0;return!1}checkImageKey(q){return null!==this.getImage(q)}checkTextureAtlasKey(q){return null!==this.getTextureAtlas(q)}checkRenderTextureKey(q){return null!==this.getRenderTexture(q)}checkBitmapDataKey(q){return null!==this.getBitmapData(q)}checkJSONKey(q){return null!==this.getJSON(q)}checkSoundKey(q){return null!==this.getSound(q)}checkTextKey(q){return null!==this.getText(q)}checkFrameData(q){return null!==this.getFrameData(q)}checkSpineKey(q){return null!==this.getSpine(q)}removeSpine(q){this.removeItem(q,it.r.SPINE)}removeImage(q){this.removeItem(q,it.r.IMAGE)}removeJSON(q){this.removeItem(q,it.r.JSON)}removeSound(q){this.removeItem(q,it.r.SOUND)}removeText(q){this.removeItem(q,it.r.TEXT)}removeTextureAtlas(q){this.removeItem(q,it.r.TEXTURE_ATLAS)}removeBitmapData(q){this.removeItem(q,it.r.BITMAPDATA)}removeRenderTexture(q){this.removeItem(q,it.r.RENDER_TEXTURE)}destroy(){this.removeAllItems(),this._cacheMap.clear()}getMap(q){return this._cacheMap.get(q)}addItem(q,K,z){this._cacheMap.get(K).set(q,z)}removeItem(q,K){const z=this._cacheMap.get(K);z.has(q)&&(z.get(q).destroy(),z.delete(q))}removeAllItemsOfType(q){this.getKeys(q).forEach((K=>{this.removeItem(K,q)}))}removeAllItems(){ut.getAssetTypeIDs().forEach((q=>{this.removeAllItemsOfType(q)}))}hasMap(q){return this._cacheMap.has(q)}isSoundDecoded(q){const K=this.getMap(it.r.SOUND).get(q);if(K){const q=K.sound;if(q)return q.isLoaded}return!1}deleteStaleCache(q,K,z){X.V.log(`--- ${z} ${ut.CACHE_WARNING} ${K} ---`,Q.$.Warning),q.delete(K)}}ut.CACHE_WARNING="found in cache that has been destroyed. Clearing cache for: "},52777:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{e:()=>Q,r:()=>Y}),function(q){q[q.BITMAPDATA=0]="BITMAPDATA",q[q.IMAGE=1]="IMAGE",q[q.JSON=2]="JSON",q[q.RENDER_TEXTURE=3]="RENDER_TEXTURE",q[q.SOUND=4]="SOUND",q[q.SPINE=5]="SPINE",q[q.TEXT=6]="TEXT",q[q.TEXTURE_ATLAS=7]="TEXTURE_ATLAS"}(Y||(Y={})),function(q){q.BITMAPDATA="BitmapData",q.IMAGE="Image",q.JSON="Json",q.RENDER_TEXTURE="RenderTexture",q.SOUND="Sound",q.SPINE="Spine",q.TEXT="Text",q.TEXTURE_ATLAS="TextureAtlas"}(Q||(Q={}))},72077:(q,K,z)=>{"use strict";z.d(K,{a:()=>rt});var Y,Q=z(8674),X=z(34711),Z=z(68910),J=z(5191),tt=z(80267),et=z(62481),it=z(61806),st=z(50740),nt=z(15740),at=z(66032);!function(q){q.JSON="json",q.IMAGE="image",q.AUDIO="audio",q.ATLAS="atlas",q.SPINE="spine",q.SPRITESHEET="spritesheet"}(Y||(Y={}));class rt{static renameJSONKeys(q,K){const z=Object.keys(q).map((z=>({[K.get(z)||z]:q[z]})));return Object.assign({},...z)}get crossOrigin(){return this._crossOrigin}set crossOrigin(q){this._crossOrigin=q}get baseURL(){return Z.Assets.resolver.basePath}set baseURL(q){Z.Assets.resolver.basePath=q}get isLoading(){return this._isloading}totalQueuedFiles(){return this._loadingDictionary.size}constructor(){this._queue=[],this._immediateQueue=[],this._loadingDictionary=new Map,this._wasFail=!1,this._isLoading=!1,this.onLoadComplete=new nt.H,this.onFileStart=new nt.H,this.onFileComplete=new nt.H,this.onFileLoadComplete=new nt.H,this.onFilesLoaded=new nt.H,this._isloading=!1,this.onReset=new nt.H,this._crossOrigin="anonymous",Z.Assets.resolver.basePath="",Z.loadTextures.config={preferWorkers:!1,preferCreateImageBitmap:!1,crossOrigin:"anonymous"},Z.extensions.add(X.kx)}removeFromLoadingQueue(q){if(this._loadingDictionary.has(q)){const K=this._loadingDictionary.get(q);return this._loadingDictionary.delete(q),K}return null}isInQueue(q){return this._queue.some((K=>K.key===q))}isInImmediateQueue(q){return this._immediateQueue.some((K=>K.key===q))}isInLoadingQueue(q){return this._loadingDictionary.has(q)}start(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._isLoading){for(let q=0;q(0,Q.sH)(this,void 0,void 0,(function*(){const K=Object.keys(q);let z=0;for(let Q=0;Q{this._wasFail=!0,this._isloading=!1;const K=Array.from(this._loadingDictionary.keys()),z=et.R.stringify(q);K.forEach((q=>{const K=this._loadingDictionary.get(q).url.split(/\?\w+=/)[0];if(z.includes(K)){this.removeFromLoadingQueue(q);this.onFileLoadComplete.dispatch(q,!1)}})),et.R.logError(q,"Promise rejected while loading assets in framework loader"),this.finalizeLoad()}))}))}finalizeLoad(){if(this._immediateQueue.length>0){for(let q=0;q{const K=q.metaData;K.frameWidth=z,K.frameHeight=Q,K.extruded=X,K.spritesheetMargin=Z,K.spritesheetSpacing=J}))}audio(q,K,z=!0,Q){if(0===K.length)return;let X=`${K[0].substring(0,K[0].lastIndexOf(".")+1)}{${K[0].substr(K[0].lastIndexOf(".")+1)}`;for(let Y=1;Y{q.metaData.spineAtlasSuffix=Q}))}destroy(){this.onFileComplete.dispose(),this.onFileStart.dispose(),this.onFileLoadComplete.dispose(),this.onLoadComplete.dispose(),this.onReset.dispose(),this.onFilesLoaded.dispose()}getResourceData(q){var K;return null!==(K=this._loadingDictionary.get(q))&&void 0!==K?K:null}addFile(q,K,z,Y,Q){if(this.isInLoadingQueue(K)||this.isInQueue(K)||this.isInImmediateQueue(K))return;const X={type:q,key:K,url:z,onAssetQueuedCallback:Q,parentResourceKey:Y,isLoading:!1,metaData:{}};this._isLoading?this._queue.push(X):this.addFileToInternalLoader(X)}addFileToInternalLoader(q){this._loadingDictionary.set(q.key,q),q.type===Y.JSON?Z.Assets.add({alias:q.key,src:q.url,loadParser:"loadJson"}):Z.Assets.add({alias:q.key,src:q.url}),q.onAssetQueuedCallback&&q.onAssetQueuedCallback(this._loadingDictionary.get(q.key))}processJSON(q,K,z){q.addJSON(z,K)}processImage(q,K,z){q.addImage(z,K)}processSound(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){let Y=K;K.instances||(Y=yield new Promise(((q,z)=>X.AB.from({url:K.url,preload:!0,loaded(K,Y){K?z(K):q(Y)}}))));const Q=new st.K(Y,it.W.instance.game,z,X.s3.useLegacy);q.addSound(z,Q)}))}processTextureAtlas(q,K,z){const Y={frames:{}};let Q;(null==K?void 0:K.baseTexture)&&(Q=new Z.Texture(K.baseTexture)),Q?q.addImage(z,Q):tt.V.log(`Atlas resource with key ${z} has no texture.`,J.$.Warning),K.textures?Object.keys(K.textures).forEach((Q=>{const X=K.textures[Q],J=K._frames[Q];if(Y.frames[Q]=J,X.baseTexture)q.addImage(z,X,Q);else{const Y=new Z.Texture(K.baseTexture);Y.frame=new Z.Rectangle(J.frame.x,J.frame.y,J.frame.w,J.frame.h),q.addImage(z,Y,Q)}})):tt.V.log(`Atlas resource with key ${z} has no textures array.`,J.$.Warning),q.addTextureAtlas(z,Q,at.o.configToFrameData(Y))}processSpine(q,K,z){q.addSpine(z,K)}processSpritesheet(q,K,z,Y){var Q,X;const J={frames:{}},tt=Y.metaData,et=tt.frameWidth,it=tt.frameHeight,st=K.width/et,nt=K.height/it,rt=tt.extruded,ot=rt?null!==(Q=tt.spritesheetMargin)&&void 0!==Q?Q:1:0,ht=rt?null!==(X=tt.spritesheetSpacing)&&void 0!==X?X:2:0,ct=K.height/(it+ht)|0,dt=K.width/(et+ht)|0;let lt=ot,ut=ot,ft=0;for(let at=0;at{"use strict";z.d(K,{E:()=>tt});var Y=z(8674),Q=z(68910),X=z(80267),Z=z(5191),J=z(88651);class tt extends J.${constructor(q,K,z){var Y,Q;super(q,K),this.texture=z,this.subTextures={},z||X.V.log(`CachedImageResource texture is null for key: ${K}`,Z.$.Error),this.image=null===(Q=null===(Y=z.baseTexture)||void 0===Y?void 0:Y.resource)||void 0===Q?void 0:Q.source}destroy(){const q=Object.create(null,{destroy:{get:()=>super.destroy}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield Q.Assets.unload(this.key),Object.values(this.subTextures).forEach((q=>{q.destroy()})),this.subTextures={},this.texture.destroy(),this.texture=null,q.destroy.call(this)}))}}},37061:(q,K,z)=>{"use strict";z.d(K,{F:()=>Q});var Y=z(88651);class Q extends Y.${constructor(q,K,z){super(q,K),this.json=z}destroy(){this.json=null,super.destroy()}}},88651:(q,K,z)=>{"use strict";z.d(K,{$:()=>Y});class Y{get destroyed(){return this._destroyed}constructor(q,K){this._destroyed=!1,this.game=q,this.key=K}destroy(){this._destroyed=!0}}},89460:(q,K,z)=>{"use strict";z.d(K,{I:()=>Q});var Y=z(88651);class Q extends Y.${constructor(q,K,z){super(q,K),this.sound=z}destroy(){this.game.sound.remove(this.sound),this.sound=null,super.destroy()}}},49356:(q,K,z)=>{"use strict";z.d(K,{q:()=>Q});var Y=z(88651);class Q extends Y.${constructor(q,K,z){super(q,K),this.text=z}destroy(){this.text=null,super.destroy()}}},90157:(q,K,z)=>{"use strict";z.d(K,{Z:()=>Q});var Y=z(88651);class Q extends Y.${constructor(q,K,z,Y){super(q,K),this.imageKey=z,this.frameData=Y}destroy(){this.game.cache.removeImage(this.imageKey),super.destroy()}}},49415:(q,K,z)=>{"use strict";z.d(K,{J:()=>X});var Y=z(55539),Q=z(39002);class X{static getOffsetX(q){return(void 0!==q.anchor?q.anchor.x:0)*Math.abs(q.width)}static getOffsetY(q){return(void 0!==q.anchor?q.anchor.y:0)*Math.abs(q.height)}static getCenterX(q){let K=q.x+.5*Math.abs(q.width);return void 0!==q.getLocalBounds&&(K+=q.getLocalBounds().x),void 0!==q.offsetX&&(K-=q.offsetX),K}static setCenterX(q,K){q.x+=K-this.getCenterX(q)}static getCenterY(q){let K=q.y+.5*Math.abs(q.height);return void 0!==q.getLocalBounds&&(K+=q.getLocalBounds().y),void 0!==q.offsetY&&(K-=q.offsetY),K}static setCenterY(q,K){q.y+=K-this.getCenterY(q)}static getLeft(q){let K=q.x;return void 0!==q.getLocalBounds&&(K+=q.getLocalBounds().x),void 0!==q.offsetX&&(K-=q.offsetX),K}static setLeft(q,K){q.x+=K-this.getLeft(q)}static getRight(q){let K=q.x+Math.abs(q.width);return void 0!==q.getLocalBounds&&(K+=q.getLocalBounds().x),void 0!==q.offsetX&&(K-=q.offsetX),K}static setRight(q,K){q.x+=K-this.getRight(q)}static getTop(q){let K=q.y;return void 0!==q.getLocalBounds&&(K+=q.getLocalBounds().y),void 0!==q.offsetY&&(K-=q.offsetY),K}static setTop(q,K){q.y+=K-this.getTop(q)}static getBottom(q){let K=q.y+Math.abs(q.height);return void 0!==q.getLocalBounds&&(K+=q.getLocalBounds().y),void 0!==q.offsetY&&(K-=q.offsetY),K}static setBottom(q,K){q.y+=K-this.getBottom(q)}static alignIn(q,K,z=Y.C.TOP_LEFT,Q=0,Z=0){switch(z){default:case Y.C.TOP_LEFT:X.setLeft(K,q.left-Q),X.setTop(K,q.top-Z);break;case Y.C.TOP_CENTER:X.setCenterX(K,q.centerX+Q),X.setTop(K,q.top-Z);break;case Y.C.TOP_RIGHT:X.setRight(K,q.right+Z),X.setTop(K,q.top-Z);break;case Y.C.LEFT_CENTER:X.setLeft(K,q.left-Q),X.setCenterY(K,q.centerY+Z);break;case Y.C.CENTER:X.setCenterX(K,q.centerX+Q),X.setCenterY(K,q.centerY+Z);break;case Y.C.RIGHT_CENTER:X.setRight(K,q.right+Q),X.setCenterY(K,q.centerY+Z);break;case Y.C.BOTTOM_LEFT:X.setLeft(K,q.left-Q),X.setBottom(K,q.bottom+Z);break;case Y.C.BOTTOM_CENTER:X.setCenterX(K,q.centerX+Q),X.setBottom(K,q.bottom+Z);break;case Y.C.BOTTOM_RIGHT:X.setRight(K,q.right+Q),X.setBottom(K,q.bottom+Z)}}static alignTo(q,K,z=Y.C.TOP_LEFT,Q=0,Z=0){switch(z){default:case Y.C.TOP_LEFT:X.setLeft(K,q.left-Q),X.setBottom(K,q.top-Z);break;case Y.C.TOP_CENTER:X.setCenterX(K,q.centerX+Q),X.setBottom(K,q.top-Z);break;case Y.C.TOP_RIGHT:X.setRight(K,q.right+Q),X.setBottom(K,q.top-Z);break;case Y.C.LEFT_TOP:X.setRight(K,q.left-Q),X.setTop(K,q.top-Z);break;case Y.C.LEFT_CENTER:X.setRight(K,q.left-Q),X.setCenterY(K,q.centerY+Z);break;case Y.C.LEFT_BOTTOM:X.setRight(K,q.left-Q),X.setBottom(K,q.bottom+Z);break;case Y.C.RIGHT_TOP:X.setLeft(K,q.right+Q),X.setTop(K,q.top-Z);break;case Y.C.RIGHT_CENTER:X.setLeft(K,q.right+Q),X.setCenterY(K,q.centerY+Z);break;case Y.C.RIGHT_BOTTOM:X.setLeft(K,q.right+Q),X.setBottom(K,q.bottom+Z);break;case Y.C.BOTTOM_LEFT:X.setLeft(K,q.left-Q),X.setTop(K,q.bottom+Z);break;case Y.C.BOTTOM_CENTER:X.setCenterX(K,q.centerX+Q),X.setTop(K,q.bottom+Z);break;case Y.C.BOTTOM_RIGHT:X.setRight(K,q.right+Q),X.setTop(K,q.bottom+Z)}}static applyMatrixToBounds(q,K){const z=K.apply({x:q.left,y:q.top}),Y=K.apply({x:q.right,y:q.bottom});return{left:z.x,right:Y.x,top:z.y,bottom:Y.y}}static applyInverseMatrixToBounds(q,K){const z=K.applyInverse({x:q.left,y:q.top}),Y=K.applyInverse({x:q.right,y:q.bottom});return{left:z.x,right:Y.x,top:z.y,bottom:Y.y}}static mergeBounds(q,K){return q.left=Math.min(q.left,K.left),q.right=Math.max(q.right,K.right),q.top=Math.min(q.top,K.top),q.bottom=Math.max(q.bottom,K.bottom),q}static intersectBounds(q,K){q.left=Math.max(q.left,K.left),q.right=Math.min(q.right,K.right),q.top=Math.max(q.top,K.top),q.bottom=Math.min(q.bottom,K.bottom)}static areEqual(q,K,z){return Q.c.isNearlyEqual(q.left,K.left,z)&&Q.c.isNearlyEqual(q.right,K.right,z)&&Q.c.isNearlyEqual(q.top,K.top,z)&&Q.c.isNearlyEqual(q.bottom,K.bottom,z)}}},39002:(q,K,z)=>{"use strict";z.d(K,{_:()=>Y,c:()=>Z});var Y,Q=z(95891),X=z(68910);!function(q){q.X="x",q.Y="y",q.Z="z"}(Y||(Y={}));class Z{static degreesToRadians(q){return q*Z.DEGREES_TO_RAD}static radiansToDegrees(q){return q*Z.RAD_TO_DEGREES}static isNearlyEqual(q,K,z=1e-5){return Math.abs(q-K)0&&0==(q&q-1))return q;{let K=1;for(;K0&&0==(q&q-1)&&K>0&&0==(K&K-1)}static random(q=0,K=1){return q===K?q:Math.random()*(K-q)+q}static between(q=0,K=1){let z=q,Y=K;return z===Y?z:(z=Math.round(z),Y=Math.round(Y),Math.floor(Math.random()*(Y-z+1))+z)}static fuzzyEqual(q,K,z=Z.EPSILON){return Math.abs(q-K)K-z}static average(...q){let K=0;for(let z=0;z=Z.PI2-z?Y=Q:(Math.abs(Q-Y)>Math.PI&&(QY?Y+=z:QK[Y]&&(Y=z);return K[Y]}static minProperty(q,...K){const z=Q.flatten(K);let Y=1,X=0;const Z=z.length;for(;Yz[X][q]&&(X=Y);return z[X][q]}static wrapAngle(q,K){return K?this.wrap(q,-Math.PI,Math.PI):this.wrap(q,-180,180)}static linearInterpolation(q,K){const z=q.length-1,Y=z*K,Q=Math.floor(Y);return K<0?this.linear(q[0],q[1],Y):K>1?this.linear(q[z],q[z-1],z-Y):this.linear(q[Q],q[Q+1>z?z:Q+1],Y-Q)}static bezierInterpolation(q,K){let z=0;const Y=q.length-1;for(let Q=0;Q<=Y;Q++)z+=Math.pow(1-K,Y-Q)*Math.pow(K,Q)*q[Q]*this.bernstein(Y,Q);return z}static catmullRomInterpolation(q,K){const z=q.length-1;let Y=z*K,Q=Math.floor(Y);return q[0]===q[z]?(K<0&&(Q=Math.floor(Y=z*(K+1))),this.catmullRom(q[(Q-1+z)%z],q[Q],q[(Q+1)%z],q[(Q+2)%z],Y-Q)):K<0?q[0]-(this.catmullRom(q[0],q[0],q[1],q[1],-Y)-q[0]):K>1?q[z]-(this.catmullRom(q[z],q[z],q[z-1],q[z-1],Y-z)-q[z]):this.catmullRom(q[Q>0?Q-1:0],q[Q],q[z0;)K*=z;return this.clamp(K,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}static catmullRom(q,K,z,Y,Q){const X=.5*(z-q),Z=.5*(Y-K),J=Q*Q;return(2*K-2*z+X+Z)*(Q*J)+(-3*K+3*z-2*X-Z)*J+X*Q+K}static difference(q,K){return Math.abs(q-K)}static roundAwayFromZero(q){return q>0?Math.ceil(q):Math.floor(q)}static sinCosGenerator(q,K=1,z=1,Y=1){let Q=K,X=z;const Z=Y*Math.PI/q,J=[],tt=[];for(let et=0;et0?1:0}static percent(q,K,z=0){return q>K||z>K?1:qq?0:(q-z)/K}static circumferencePoint(q,K,z,Y=-1,Q=!0){const J=Y>0?.5*Y:1;let tt=z;Q||(tt=Z.degToRad(z));const et=new X.Point;return et.x=q+J*Math.cos(tt),et.y=K+J*Math.sin(tt),et}static clampedLerp(q,K,z){let Y=z<0?0:z;return Y=Y>1?1:Y,q+(K-q)*Y}static inverseLerp(q,K,z){return(z-q)/(K-q)}static validateInt(q,K=0){if("number"!=typeof q){const z=parseInt(q,10);return Number.isNaN(z)?K:z}return Number.isNaN(q)?K:q}static normalizeRange(q,K,z){return K>q?(z-q)/(K-q):KK.left&&q.topK.top}static getAABBforPoints(q){const K={left:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,top:Number.POSITIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};return q.forEach((q=>{K.left=Math.min(q.x,K.left),K.right=Math.max(q.x,K.right),K.top=Math.min(q.y,K.top),K.bottom=Math.max(q.y,K.bottom)})),K}}Z.DEGREES_TO_RAD=Math.PI/180,Z.RAD_TO_DEGREES=180/Math.PI,Z.EPSILON=1e-4,Z.PI2=2*Math.PI,Z.TAU=2*Math.PI,Z.PHI=1.61803398875,Z.DEG_TO_RAD=Math.PI/180,Z.RAD_TO_DEG=180/Math.PI},13409:(q,K,z)=>{"use strict";z.d(K,{b:()=>Q});var Y=z(32154);class Q{constructor(q=[]){this.c=1,this.s0=0,this.s1=0,this.s2=0,"string"==typeof q?this.state(q):this.sow(q)}rnd(){const q=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|q,this.s0=this.s1,this.s1=this.s2,this.s2=q-this.c,this.s2}sow(q){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,q)for(let K=0;K>>0,K-=Y,K*=Y,Y=K>>>0,K-=Y,Y+=4294967296*K;return 2.3283064365386963e-10*(Y>>>0)}integer(){return 4294967296*this.rnd.apply(this)}frac(){return this.rnd.apply(this)+11102230246251565e-32*(2097152*this.rnd.apply(this)|0)}real(){return this.integer()+this.frac()}integerInRange(q,K){return Math.floor(this.realInRange(0,K-q+1)+q)}realInRange(q,K){return this.frac()*(K-q)+q}normal(){return 1-2*this.frac()}pick(q){return q[this.integerInRange(0,q.length-1)]}sign(){return this.pick([-1,1])}weightedPick(q){return q[~~(Math.pow(this.frac(),2)*(q.length-1)+.5)]}angle(){return this.integerInRange(-180,180)}shuffle(q){const K=q.length-1;for(let z=K;z>0;z--){const Y=Math.floor(this.frac()*(K+1)),Q=q[Y];q[Y]=q[z],q[z]=Q}return q}state(q=""){if(q.match(/^!rnd/)){const K=q.split(",");this.c=parseFloat(K[1]),this.s0=parseFloat(K[2]),this.s1=parseFloat(K[3]),this.s2=parseFloat(K[4])}return["!rnd",this.c,this.s0,this.s1,this.s2].join(",")}uuid(){let q,K=0;for(q="";K++<36;q+=(~K%5|3*K&4)>0?((15^K)>0?8^this.frac()*((20^K)>0?16:4):4).toString(16):"-");return q}}},15308:(q,K,z)=>{"use strict";z.d(K,{M:()=>J});var Y=z(68910),Q=z(80267),X=z(5191),Z=z(32154);class J extends Y.Rectangle{get offsetX(){return this.x+.5*this.width}set offsetX(q){this.x=q-.5*this.width}get offsetY(){return this.y+.5*this.height}set offsetY(q){this.y=q-.5*this.height}get anchor(){return new Y.Point(0,0)}get bottomRight(){return new Y.Point(this.right,this.bottom)}set bottomRight(q){this.x=q.x-this.width,this.y=q.y-this.height}get bottomLeft(){return new Y.Point(this.x,this.bottom)}set bottomLeft(q){this.x=q.x,this.y=q.y-this.height}get centerX(){return this.x+this.halfWidth}set centerX(q){this.x=q-this.halfWidth}get centerY(){return this.y+this.halfHeight}set centerY(q){this.y=q-this.halfHeight}get empty(){return!Z.A.isDefined(this.width)||!Z.A.isDefined(this.height)}set empty(q){q&&this.setTo(0,0,0,0)}get halfHeight(){return Math.round(this.height/2)}get halfWidth(){return Math.round(this.width/2)}get topLeft(){return new Y.Point(this.x,this.y)}set topLeft(q){this.x=q.x,this.y=q.y}get topRight(){return new Y.Point(this.x+this.width,this.y)}set topRight(q){this.x=q.x-this.width,this.y=q.y}setTo(q,K,z,Y){return this.x=q,this.y=K,this.width=z,this.height=Y,this}resize(q,K){return this.width=q,this.height=K,this}setPosition(q,K){this.x=q,this.y=K}intersectsRectValues(q,K,z,Y){return J.intersects(this,new J(q,K,z,Y))}static intersects(q,K){return!(q.width<=0||q.height<=0||K.width<=0||K.height<=0)&&!(q.rightK.right||q.y>K.bottom)}static clone(q){return q?new J(q.x,q.y,q.width,q.height):(Q.V.log("Clone failed. Rect does not exist.",X.$.Error),null)}static sameDimensions(q,K){return q.width===K.width&&q.height===K.height}static containsRaw(q,K,z,Y,Q,X){return Q>=q&&Q=K&&X{"use strict";var Y;z.d(K,{Q:()=>Q,y:()=>Y}),function(q){q[q.BLACK=0]="BLACK",q[q.RED=16711680]="RED",q[q.ORANGE=16750848]="ORANGE",q[q.YELLOW=16776960]="YELLOW",q[q.GREEN=65280]="GREEN",q[q.AQUA=65535]="AQUA",q[q.BLUE=255]="BLUE",q[q.VIOLET=16711935]="VIOLET",q[q.WHITE=16777215]="WHITE",q[q.GRAY=6710886]="GRAY"}(Y||(Y={}));class Q{static numberToHexString(q){let K="";return q>16777215?(K+=`0${((4278190080&q)>>>24).toString(16)}`.slice(-2),K+=`0${((16711680&q)>>>16).toString(16)}`.slice(-2),K+=`0${((65280&q)>>>8).toString(16)}`.slice(-2),K+=`0${(255&q).toString(16)}`.slice(-2)):(K+=`0${((16711680&q)>>>16).toString(16)}`.slice(-2),K+=`0${((65280&q)>>>8).toString(16)}`.slice(-2),K+=`0${(255&q).toString(16)}`.slice(-2),K+="FF"),`#${K.toUpperCase()}`}static convertPixelToGreyscale(q,K,z){return.3*q+.59*K+.11*z}static createColor(q=0,K=0,z=0,Y=1,X=0,Z=0,J=0,tt=0){const et={r:q,g:K,b:z,a:Y,h:X,s:Z,l:J,v:tt,color:0,color32:0,rgba:""};return Q.updateColor(et)}static updateColor(q){return q.rgba=`rgba(${q.r.toFixed()},${q.g.toFixed()},${q.b.toFixed()},${q.a.toString()})`,q.color=Q.getColor(q.r,q.g,q.b),q.color32=Q.getColor32(255*q.a,q.r,q.g,q.b),q}static getColor32(q,K,z,Y){return q<<24|K<<16|z<<8|Y}static getColor(q,K,z){return q<<16|K<<8|z}static hexToRGB(q){const K=Q.hexToColor(q);if(K)return Q.getColor32(K.a,K.r,K.g,K.b)}static hexToColor(q,K){const z=q.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,((q,K,z,Y)=>K+K+z+z+Y+Y)),Y=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(z);if(Y){const q=parseInt(Y[1],16),z=parseInt(Y[2],16),X=parseInt(Y[3],16);if(!K)return Q.createColor(q,z,X);K.r=q,K.g=z,K.b=X}return K}static hexToRGBArray(q){return[(q>>16&255)/255,(q>>8&255)/255,(255&q)/255]}static RGBArrayToHex(q){return(255*q[0]<<16)+(255*q[1]<<8)+255*q[2]}static getRGB(q){return q>16777215?{alpha:q>>>24,red:q>>16&255,green:q>>8&255,blue:255&q,a:q>>>24,r:q>>16&255,g:q>>8&255,b:255&q}:{alpha:255,red:q>>16&255,green:q>>8&255,blue:255&q,a:255,r:q>>16&255,g:q>>8&255,b:255&q}}}},39688:(q,K,z)=>{"use strict";z.d(K,{w:()=>tt});var Y=z(68910),Q=z(80267),X=z(5191),Z=z(39002),J=z(15308);class tt extends Y.Rectangle{constructor(q,K,z,Y,J,tt){super(K,z,Y,J),this.index=q,0!==this.width&&0!==this.height||Q.V.log(`Frame: Frame ${this.name} has a width or height of zero`,X.$.Warning),this.name=tt,this.centerX=Math.floor(Y/2),this.centerY=Math.floor(J/2),this.distance=Z.c.distance(0,0,Y,J),this.sourceSizeW=Y,this.sourceSizeH=J}resize(q,K){this.width=q,this.height=K,this.centerX=Math.floor(q/2),this.centerY=Math.floor(K/2),this.distance=Z.c.distance(0,0,q,K),this.sourceSizeW=q,this.sourceSizeH=K}setTrim(q,K,z,Y,Q,X,Z){this.trimmed=q,q&&(this.sourceSizeW=K,this.sourceSizeH=z,this.centerX=Math.floor(K/2),this.centerY=Math.floor(z/2),this.spriteSourceSizeX=Y,this.spriteSourceSizeY=Q,this.spriteSourceSizeW=X,this.spriteSourceSizeH=Z)}clone(){const q=new tt(this.index,this.x,this.y,this.width,this.height,this.name);for(const K in this)this.hasOwnProperty(K)&&(q[K]=this[K]);return q}getRect(q){let K=q;return null==K?K=new J.M(this.x,this.y,this.width,this.height):K.setTo(this.x,this.y,this.width,this.height),K}}},66032:(q,K,z)=>{"use strict";z.d(K,{o:()=>J});var Y=z(80267),Q=z(5191),X=z(32154),Z=z(39688);class J{constructor(){this._frames=[],this._frameNames=new Map,this._destroyed=!1}get destroyed(){return this._destroyed}get total(){return this._frames.length}addFrame(q){return q.index=this._frames.length,this._frames.push(q),X.A.isDefined(q.name)&&""!==q.name&&this._frameNames.set(q.name,q.index),q}getFrame(q){return"string"==typeof q?(q||Y.V.log(`frame name get with no name: ${q}`,Q.$.Error),this.getFrameByName(q)):this._frames[q>=this._frames.length?0:q]}getFrameByName(q){if("number"==typeof q)return this.getFrame(q);const K=this._frameNames.get(q);return"number"==typeof K?this._frames[K]:(Y.V.log(`Frame does not exist with name: ${q}`,Q.$.Warning),null)}checkFrameName(q){return this._frameNames.has(q)}clone(){const q=new J;for(let K=0;K{"use strict";z.d(K,{B:()=>J});var Y,Q=z(68910),X=z(57530),Z=z(71392);!function(q){q.BLUR="blur",q.PAGE_HIDE="pagehide",q.CLICK="click",q.FOCUS="focus",q.PAGE_SHOW="pageshow",q.PAUSE="pause",q.RESUME="resume"}(Y||(Y={}));class J extends Z.m{setBackgroundColor(q){this.game.app.renderer.background.backgroundColor.setValue(q),this.game.app.view.parentElement.style.backgroundColor=Q.Color.shared.setValue(q).toHex()}get game(){return this._game}get width(){return this.game.width}get height(){return this.game.height}get camera(){return X.i.main}constructor(q){super(),this.disableVisibilityChange=!1,this._hiddenVar="hidden",this._game=q,this.name="_stage_root",this.game.stage=this,this.interactiveChildren=!0,this.game.config&&this.parseConfig(this.game.config),q.app.stage&&(q.app.stage.addChild(this),this.zIndex=q.app.stage.children.length)}parseConfig(q){q.disableVisibilityChange&&(this.disableVisibilityChange=q.disableVisibilityChange)}boot(){this.checkVisibility()}checkVisibility(){const q=document;void 0!==q.hidden?this._hiddenVar="visibilitychange":void 0!==q.webkitHidden?this._hiddenVar="webkitvisibilitychange":void 0!==q.mozHidden?this._hiddenVar="mozvisibilitychange":void 0!==q.msHidden?this._hiddenVar="msvisibilitychange":this._hiddenVar=null,this._onChange=q=>{this.visibilityChange(q)},this._onChangePause=()=>{this._onChange({type:Y.PAUSE})},this._onChangeResume=()=>{this._onChange({type:Y.RESUME})},this._onClick=q=>{void 0===document.hasFocus||document.hasFocus()||this.visibilityChange(q)},this._hiddenVar&&document.addEventListener(this._hiddenVar,this._onChange,!1),window.onblur=this._onChange,window.onfocus=this._onChange,window.onpagehide=this._onChange,window.onpageshow=this._onChange,window.addEventListener(Y.CLICK,this._onClick)}visibilityChange(q){switch(q.type){case Y.BLUR:case Y.PAGE_HIDE:return void this.game.focusLoss(q);case Y.CLICK:case Y.FOCUS:case Y.PAGE_SHOW:return void this.game.focusGain(q)}if(this.disableVisibilityChange)return;const K=document;K.hidden||K.mozHidden||K.msHidden||K.webkitHidden||q.type===Y.PAUSE?this.game.gamePaused(q):this.game.gameResumed(q)}destroy(){this._hiddenVar&&document.removeEventListener(this._hiddenVar,this._onChange,!1),window.onpagehide=null,window.onpageshow=null,window.onblur=null,window.onfocus=null,window.removeEventListener(Y.CLICK,this._onClick),super.destroy({children:!0,texture:!0,baseTexture:!0})}}},16649:(q,K,z)=>{"use strict";z.d(K,{b:()=>Y,y:()=>tt});var Y,Q=z(85999),X=z(61806),Z=z(15740),J=z(71392);!function(q){q.Spine="spine",q.Pixi="pixi",q.Component="component"}(Y||(Y={}));class tt extends J.m{get paused(){return this._paused}set paused(q){this._paused!==q&&(this._paused=q,q?(this._wasSpineUpdateOnPause=this._updateMethod===Y.Spine)&&(this._updateMethod=Y.Pixi):(this._wasSpineUpdateOnPause&&(this._updateMethod=Y.Spine),this._wasSpineUpdateOnPause=void 0))}get game(){return X.W.instance.game}get pixiSpine(){return this._pixiSpine}get skeleton(){return this._pixiSpine.skeleton}get state(){return this._pixiSpine.state}constructor(q){super(),this.pendingDestroy=!1,this._updateMethod=Y.Pixi,this._paused=!1,this.onStart=new Z.H,this.onComplete=new Z.H,this.onEnd=new Z.H,this.onEvent=new Z.H,this.name=q;const K=this.game.cache.getSpine(q),z=K.spineAtlas,X=(new Q.qd(z),K.spineData);this._pixiSpine=new Q.yE(X),this._pixiSpine.state.addListener({start:this.onSpineStart.bind(this),event:this.onSpineEvent.bind(this),complete:this.onSpineComplete.bind(this),end:this.onSpineEnd.bind(this)}),this._pixiSpine.renderable=!0,this._pixiSpine.autoUpdate=!0,this._pixiSpine.eventMode="none",this.addChild(this._pixiSpine)}onSpineStart(q){this.onStart.dispatch(q)}onSpineComplete(q){this.onComplete.dispatch(q)}onSpineEnd(q){this.onEnd.dispatch(q)}onSpineEvent(q,K){this.onEvent.dispatch(q.trackIndex,K)}setTint(q){this._pixiSpine.tint=q}set updateMethod(q){this._paused&&(this._wasSpineUpdateOnPause=q===Y.Spine),this._pixiSpine.autoUpdate=q===Y.Spine,this._updateMethod=q}get updateMethod(){return this._updateMethod}update(){this.updateSpine(!1)}updateFromComponent(){this.updateSpine(!0)}updateSpine(q){this._pixiSpine.autoUpdate||this.paused||this._updateMethod===Y.Component!==q||this._pixiSpine.update(.001*this.game.app.ticker.deltaMS),this.pendingDestroy&&this.destroy()}destroy(q){this._pixiSpine&&(this._pixiSpine.autoUpdate=!1,this._pixiSpine.state.clearListeners(),this._pixiSpine.state.clearListenerNotifications(),this.removeChild(this._pixiSpine),this._pixiSpine.destroy(q),this._pixiSpine=null),this.onComplete&&(this.onComplete.dispose(),this.onComplete=null),this.onEnd&&(this.onEnd.dispose(),this.onEnd=null),this.onEvent&&(this.onEvent.dispose(),this.onEvent=null),this.onStart&&(this.onStart.dispose(),this.onStart=null),this.pendingDestroy=!1,super.destroy(q)}setAnimationByName(q,K,z=!1){var Y;const Q=this._pixiSpine.state.setAnimation(q,K,z);return(null===(Y=null==Q?void 0:Q.animation)||void 0===Y?void 0:Y.duration)>0&&this._pixiSpine.update(0),Q}addAnimationByName(q,K,z=!1,Y=0){this._pixiSpine.state.addAnimation(q,K,z,Y)}setAnimationMix(q,K,z){this._pixiSpine.stateData.setMix(q,K,z)}setSkinByName(q){this._pixiSpine.skeleton.setSkinByName(q)}setSkin(q){this._pixiSpine.skeleton.setSkin(q)}setToSetupPose(q=!1){q&&(this._pixiSpine.lastTime=null),this._pixiSpine.skeleton.setToSetupPose()}getSlotContainer(q){return this.getSlotContainerByIndex(q.data.index)}getSlotContainerByIndex(q){return this._pixiSpine.slotContainers[q]}}},12033:(q,K,z)=>{"use strict";z.d(K,{f:()=>tt});var Y=z(5191),Q=z(80267),X=z(71082),Z=z(61806),J=z(15740);class tt{get current(){return this._current.key}getCurrentState(){return this._current}get states(){return this._states}get game(){return Z.W.instance.game}get onStateChange(){return this._onStateChange}get onStateLoaded(){return this._onStateLoaded}constructor(q){this._onStateChange=new J.H,this._onStateLoaded=new J.H,this._states=new Map,this._pendingState=q||null,this._current=null}boot(){this.game.onPause.add(this.pause,this),this.game.onResume.add(this.resume,this),this._pendingState&&this.add(this._pendingState.key,this._pendingState,!0)}add(q,K,z=!1){return K.key=q,this._states.set(q,K),z&&(this._pendingState=K),K}remove(q){this._current&&this._current.key===q&&(this._current=null),this._states.delete(q)}start(q,K=!0,...z){this._states.has(q)?(this._pendingState=this._states.get(q),this._clearWorld=K,this._initArgs=z):Q.V.log("Invalid key passed to start method",Y.$.Warning)}preUpdate(){if(this._pendingState){const q=this._current?this.current:null;if(this.clearCurrentState(),this.setCurrentState(this._pendingState.key),this._onStateChange.dispatch(this._current,q||""),this.current&&this.current!==this._pendingState.key)return;this._pendingState=null,this._current.preload(),this._current.create(),this._onStateLoaded.dispatch(this._current,q||"")}}update(){this._current.update()}get(q){return this.states.has(q)?this.states.get(q):null}loadComplete(){this._current.create()}clearCurrentState(){var q;this._current&&(this._current.shutdown(),this.game.tweens.removeAll(),this.game.time.removeAll(),null===(q=this.game.stage.camera)||void 0===q||q.reset(),this._clearWorld&&X.C.removeAllChildren(this.game.world,!0),this._current=null,this.game.load.reset(!0))}setCurrentState(q){this._current=this._states.get(q),this._current.init(...this._initArgs),q===this._pendingState.key&&(this._initArgs=[])}pause(){this._current&&this._current.paused()}resume(){this._current&&this._current.resumed()}destroy(){this._clearWorld=!0,this.clearCurrentState(),this._pendingState=null,this._onStateChange.dispose(),this._onStateLoaded.dispose()}}},65321:(q,K,z)=>{"use strict";z.d(K,{g:()=>Q});var Y=z(84215);class Q{get timeMS(){return this._timeMS}get deltaMS(){return this._deltaMS}get deltaMultiplier(){return this._deltaMultiplier}get events(){return this._events}constructor(q){this._timeMS=0,this._deltaMS=0,this._deltaMultiplier=1,this._events=null,this._timers=[],this._game=q,this._events=new Y.M(this._game,!1)}boot(){this.updateTime(),this._events.start()}add(q){return this._timers.includes(q)||this._timers.push(q),q}create(q=!0){return this.add(new Y.M(this._game,q))}removeAll(){this._timers.forEach((q=>q.destroy())),this._timers=[],this._events.removeAll()}destroy(q){if(!q)return;q.destroy();const K=this._timers.indexOf(q);-1!==K&&this._timers.splice(K,1)}update(){if(this.updateTime(),!this._game.paused){this._events.update();for(let q=this._timers.length-1;q>=0;--q){const K=this._timers[q];K.update(),K.canDestroy()&&(K.destroy(),this._timers.splice(q,1))}}}gamePaused(){this._events.pause(),this._timers.forEach((q=>q.pause()))}gameResumed(){this.updateTime(),this._events.resume(),this._timers.forEach((q=>q.resume()))}updateTime(){this._timeMS=this._game.app.ticker.lastTime,this._deltaMS=this._game.app.ticker.deltaMS,this._deltaMultiplier=this._deltaMS/16.6666666666667}}},84215:(q,K,z)=>{"use strict";z.d(K,{M:()=>J});var Y=z(80267),Q=z(5191),X=z(15740);class Z{get callbackArgs(){return this._callbackArgs}get markedForDelete(){return this._markedForDelete}constructor(q,K,z,Y,Q,...X){this._markedForDelete=!1,this.delayMS=q,this.tick=K,this.runCount=z,this.callback=Y,this.callbackContext=Q,this._callbackArgs=X}markForDeletion(){this._markedForDelete=!0}}class J{constructor(q,K=!0){this._state="stopped",this._expired=!1,this._events=[],this.onComplete=new X.H,this._updateTimeThreshold=1e3,this._timeAtLastUpdate=0,this._game=q,this._destroyOnExpire=K}start(q=0){if("running"===this._state)return void Y.V.log("Timer is already running.",Q.$.Warning);if("paused"===this._state)return void Y.V.log("Timer is currently paused. Call resume() instead.",Q.$.Warning);const K=this.getGameTime();this._timeAtLastUpdate=K;const z=K+q;this._state="running",this._events.forEach((q=>q.tick=z+q.delayMS))}stop(q=!0,K=!1){this._state="stopped",q?this.removeAll(K):K&&this.onComplete.removeAll()}removeAll(q=!0){for(let K=this._events.length-1;K>=0;--K)this.removeAtIndex(K);q&&this.onComplete.removeAll()}addTimer(q,K,z,...Y){return this.createTimer(q,1,K,z,...Y)}repeat(q,K,z,Y,...Q){return this.createTimer(q,K,z,Y,...Q)}loop(q,K,z,...Y){return this.createTimer(q,-1,K,z,...Y)}createTimer(q,K,z,Y,...Q){const X=Math.round(q),J=X+(0===this._timeAtLastUpdate?this.getGameTime():this._timeAtLastUpdate),tt=new Z(X,J,K,z,Y,...Q);return this._events.push(tt),this.sortEvents(),this._expired=!1,tt}remove(q){return this.removeAtIndex(this._events.indexOf(q))}removeAtIndex(q){return q>=0&&qq.tick-K.tick))}update(){if("running"!==this._state)return;const q=this.getGameTime(),K=q-this._timeAtLastUpdate;K>this._updateTimeThreshold&&this.offsetEventTimers(K);const z=[];let Y=!1;for(let Q=0;Q0&&0==--K.runCount?K.markForDeletion():(K.tick+=K.delayMS,Y=!0),z.push(K)}if(z.length>0){for(let q=0;qK.tick+=q))}getGameTime(){return this._game.time.timeMS}destroy(){this.removeAll(!0),this.onComplete.dispose(),this._state="stopped",this._expired=!0,this._events=[]}}J.MINUTE=6e4,J.SECOND=1e3,J.HALF_SECOND=500,J.QUARTER_SECOND=250},42687:(q,K,z)=>{"use strict";z.d(K,{p:()=>J});var Y=z(80267),Q=z(5191),X=z(77120),Z=z(15740);class J{constructor(){this.deviceReadyAt=0,this.callbacks=[],this.rotationEvent=new Z.H}get isInitialized(){return this.deviceReadyAt>0}whenReady(q){this.isInitialized?q():(this.callbacks.push(q),X.D.isReady?this.initialize():X.D.addDOMContentLoadedListener(this.initialize.bind(this)))}initialize(){"orientation"in screen&&screen.orientation.addEventListener("change",this.onDeviceRotation.bind(this)),this.deviceReadyAt=Date.now(),X.D.removeDOMContentLoadedListener(this.initialize.bind(this)),this.callbacks.forEach((q=>{q()})),this.callbacks=[]}onDeviceRotation(){Y.V.log(`onDeviceRotation: ${screen.orientation.type}`,Q.$.Verbose),this.rotationEvent.dispatch(screen.orientation.type.startsWith("landscape"))}cleanUp(){this.rotationEvent.dispose(),"orientation"in screen&&screen.orientation.removeEventListener("change",this.onDeviceRotation)}}},71392:(q,K,z)=>{"use strict";z.d(K,{m:()=>et});var Y=z(68910),Q=z(61806),X=z(15740),Z=z(35192);Z.q9.prototype.name=null,Z.mc.prototype.getChildByName=function(q,K){for(let z=0,Y=this.children.length;z=0;--K){const z=this.children[K];if(z&&!z.destroyed&&!1!==z.exists&&"function"==typeof z.update)try{z.update(Q.W.instance.game.time.deltaMS)}catch(q){J.R.logError(q,"Exception updating child container")}}}destroy(q){var K,z;this.destroyed||(null===(K=this.onDestroy)||void 0===K||K.dispatch(),null===(z=this.onDestroy)||void 0===z||z.dispose(),this.onDestroy=null,this.exists=!1,super.destroy(q))}render(q){tt.C.canContainerRender(this)&&super.render(q)}}},86787:(q,K,z)=>{"use strict";z.d(K,{CL:()=>Ce.C,lv:()=>Oe,J6:()=>te.J,l2:()=>Zt.l,r0:()=>Jt.r,i7:()=>Y.i,YP:()=>J,jl:()=>ie,Q1:()=>re.Q,uA:()=>tt.u,XF:()=>tt.X,oD:()=>nt.oD,mc:()=>ue.m,DX:()=>Ie.D,yQ:()=>re.y,YH:()=>X.YH,e$:()=>jt.e,b:()=>he.b,GS:()=>vt.G,bT:()=>kt,sV:()=>Yt,wI:()=>oe.w,YA:()=>fe.Y,W$:()=>ce.W,Zt:()=>be.Z,_m:()=>pe._,Wz:()=>ge.W,mk:()=>de,Sj:()=>Xt.S,K1:()=>ye.K,cj:()=>qt.c,bs:()=>ae.b,XV:()=>dt.X,M_:()=>Kt.M,HN:()=>it.H,qF:()=>zt.q,gX:()=>le.g,Kf:()=>gt,dL:()=>Ae.d,K:()=>Wt.K,EV:()=>X.EV,s0:()=>X.s0,WR:()=>ot.W,GO:()=>Gt.G,aw:()=>ot.a,DT:()=>me.D,x4:()=>_e,Og:()=>we,Wf:()=>Se,S1:()=>X.S1});var Y=z(57530),Q=z(8674),X=z(29658);let Z=class extends Y.i{recalculateViewMatrix(){if(!this._attachedTransform)return;const q=this._attachedTransform.pixiTransform._worldID;if(q!==this._transformWorldID){const K=this._attachedTransform.worldMatrix,z=this._attachedTransform.worldScale,Y=K.a/z.x,Q=K.c/z.y;this._cameraMatrix.set(Y,Q,-Q,Y,-K.tx*Y- -K.ty*Q+this._viewportSize.getHalfWidth(),-K.tx*Q+-K.ty*Y+this._viewportSize.getHalfHeight()),this._transformWorldID=q}}};Z=(0,Q.Cg)([(0,X.EV)("CameraEla",X.YH.root,"Represents an ELA version camera and provides a matrix from translating
from world space into view space")],Z);let J=class extends Y.i{recalculateViewMatrix(){if(!this._attachedTransform)return;const q=this._attachedTransform.pixiTransform._worldID;q!==this._transformWorldID&&(this._attachedTransform.worldMatrix.clone().invert().translate(this._viewportSize.getHalfWidth(),this._viewportSize.getHalfHeight()).copyTo(this._cameraMatrix),this._transformWorldID=q)}};J=(0,Q.Cg)([(0,X.EV)("Camera",X.YH.root,"Represents a camera and provides a matrix from translating
from world space into view space")],J);var tt=z(40794),et=z(823),it=z(15740);let st=class extends tt.u{constructor(){super(...arguments),this.onCreate=new it.H,this.onPostCreate=new it.H,this.onUpdate=new it.H,this.onOnEnable=new it.H,this.onOnDisable=new it.H,this.onPostDeserialize=new it.H}create(){super.create(),this.onCreate.dispatch()}destroy(){this.onCreate.dispose(),this.onPostCreate.dispose(),this.onUpdate.dispose(),this.onOnEnable.dispose(),this.onOnDisable.dispose(),this.onPostDeserialize.dispose(),super.destroy()}postCreate(){super.postCreate(),this.onPostCreate.dispatch()}update(){super.update(),this.onUpdate.dispatch()}onEnable(){super.onEnable(),this.onOnEnable.dispatch()}onDisable(){super.onDisable(),this.onOnDisable.dispatch()}postDeserialize(){super.postDeserialize(),this.onPostDeserialize.dispatch()}};(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],st.prototype,"onCreate",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],st.prototype,"onPostCreate",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],st.prototype,"onUpdate",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],st.prototype,"onOnEnable",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],st.prototype,"onOnDisable",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],st.prototype,"onPostDeserialize",void 0),st=(0,Q.Cg)([(0,X.EV)("ComponentEvents",X.YH.root,"Provides signals fired with component lifecycle events")],st);var nt=z(49769),at=z(5191),rt=z(80267),ot=z(53924),ht=z(85880),ct=z(95891),dt=z(563),lt=z(43234),ut=z(21979),ft=z(59859),bt=z(4697),pt=z(32154),vt=z(30290);class gt{constructor(q){this._defaultEase=vt.G.Linear.None,this._listOfTransformHolders={},this._createdFilters=new Map,this._originalRenderValuesMap=new Map,this.new(q)}new(q={}){const{startDelay:K=0,loopCount:z=0,yoyo:Y=!1,loopDelay:Q=0,onStart:X,onComplete:Z}=q;pt.A.isDefined(this._timeline)&&this.destroyTimeline(),this._timeline=new ht.os.core.Timeline({delay:K,yoyo:Y,repeat:z,repeatDelay:Q}),ht.os.config({nullTargetWarn:!1}),this._timeline.eventCallback("onStart",(()=>{this.update(),null==X||X()})),this._timeline.eventCallback("onUpdate",(()=>{this.update()})),this._onCompleteCallback=Z,this._timeline.eventCallback("onComplete",(()=>{this.internalOnComplete()})),this._timeline.pause()}to(q,K,z,Y=this._defaultEase,Q,X){if(!this.canAnimate(q))return this;const Z="string"==typeof Y?Y:Y.value;return this._timeline.to(q,Object.assign(Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},z),X)),{duration:K,ease:Z}),Q),this}convertToGSAPCompatibleProps(q,K){const z={};for(const Y in q)"number"!=typeof q[Y]&&"string"!=typeof q[Y]||(z[Y]=K?`+=${q[Y]}`:q[Y]),"stagger"===Y&&(z[Y]=q[Y]);return z}from(q,K,z,Y=this._defaultEase,Q,X){if(!this.canAnimate(q))return this;const Z="string"==typeof Y?Y:Y.value;return this._timeline.from(q,Object.assign(Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},z),X)),{duration:K,ease:Z}),Q),this}fromTo(q,K,z,Y,Q=this._defaultEase,X,Z){if(!this.canAnimate(q))return this;const J="string"==typeof Q?Q:Q.value;return this._timeline.fromTo(q,Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},z),Z)),Object.assign(Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},Y),Z)),{duration:K,ease:J}),X),this}restart(){var q;return null===(q=this._timeline)||void 0===q||q.restart(),this}play(q=0){var K;return null===(K=this._timeline)||void 0===K||K.play(q),this}pause(){var q;return null===(q=this._timeline)||void 0===q||q.pause(),this}resume(){var q;return null===(q=this._timeline)||void 0===q||q.paused(!1),this}isPaused(){var q,K;return null!==(K=null===(q=this._timeline)||void 0===q?void 0:q.paused())&&void 0!==K&&K}onComplete(q){return this._onCompleteCallback=q,this}internalOnComplete(){var q;this.clearFiltersFromAnimatingObject(),null===(q=this._onCompleteCallback)||void 0===q||q.call(this)}clearFiltersFromAnimatingObject(q=!1){var K;if(!(null===(K=this._timeline)||void 0===K?void 0:K.repeat()))for(const[z,Y]of this._createdFilters){if(!q){const q=this._originalRenderValuesMap.get(z);if(q&&(q.alpha!==z.alpha||q.tintStrength!==z.tintStrength||q.tintColor!==z.tintColor||q.blendMode!==z.blendMode))continue}if(z.filters&&(z.filters.baseFilter=void 0),z.filters=void 0,z.components.rootContainer.filters){const q=z.components.rootContainer.filters.indexOf(Y);q>-1&&z.components.rootContainer.filters.splice(q,1)}}}get objectCount(){return Object.keys(this._listOfTransformHolders).length}addGameObject(q){const K=Object.values(this._listOfTransformHolders).find((K=>K.GameObjectLink===q)),z=K||this.addNewAnimatedObject(q);if(!K&&z){const q=pt.A.generateGUID();this._listOfTransformHolders[q]=z,this._originalRenderValuesMap.has(z)||this._originalRenderValuesMap.set(z,{alpha:z.alpha,tintStrength:z.tintStrength,tintColor:z.tintColor,blendMode:z.blendMode})}return z}addGameObjects(q){return q.map((q=>this.addGameObject(q)))}destroyTimeline(q){var K;q&&this.complete(),null===(K=this._timeline)||void 0===K||K.kill(),this._timeline=null}resetToStart(){var q;return null===(q=this._timeline)||void 0===q||q.seek(0).pause(),this.update(),this}complete(){var q;return null===(q=this._timeline)||void 0===q||q.progress(1).pause(),this.update(),this}addNewAnimatedObject(q){var K,z,Y;const Q=[];if(!q)return null;if(q.legacyTransform)return Q.push("Game Object has a legacy transform, animations might not play. Please use Transform /Rect transform."),{warningLog:Q};const X=q.activeInHierarchy,Z=q.transform,J=q.transform instanceof dt.X?q.transform:null,tt=q.findComponent(bt.y),et=q.findComponent(ft.j),it={alpha:tt?et?et.alpha:1:null,tintStrength:tt?1:null,tintColor:tt?"rgba(255,255,255,1)":null,blendMode:tt?"Multiply":null};et&&(it.alpha=et.alpha,it.tintStrength=et.tintIntensity,it.tintColor=et.tintColor,it.blendMode=et.tintBlendMode);const st=null===(K=q.parent)||void 0===K?void 0:K.findComponent(ut.P);st&&Q.push("Position changes are not yet supported for objects with a parent that has a layout component.");const nt=J||Z;return Object.assign(Object.assign({rotation:null==nt?void 0:nt.localRotation,x:null==nt?void 0:nt.localPosition.x,y:null==nt?void 0:nt.localPosition.y,scaleX:null!==(z=null==nt?void 0:nt.localScale.x)&&void 0!==z?z:1,scaleY:null!==(Y=null==nt?void 0:nt.localScale.y)&&void 0!==Y?Y:1,skewX:0,skewY:0},it),{visible:X,GameObjectLink:q,components:{transformComponent:nt,parentLayoutComponent:st},warningLog:Q})}updateAnimatedGameObjects(q){var K,z;(null==q?void 0:q.GameObjectLink)&&(this.updateGeometryPass(q),(K=q.components).renderComponent||(K.renderComponent=q.GameObjectLink.findComponent(bt.y)),q.components.renderComponent&&((z=q.components).rootContainer||(z.rootContainer=q.components.renderComponent.getRootContainer()),q.components.rootContainer&&this.updateRenderPass(q)))}updateGeometryPass(q){const K=q.components.transformComponent;(null==K?void 0:K.GameObject)&&(q.components.parentLayoutComponent||K.setPosition(q.x,q.y),K.setRotation(q.rotation),K.setScale(q.scaleX,q.scaleY),K.setSkew(q.skewX,q.skewY))}updateRenderPass(q){var K;const z=this.setupFilters(q);if((null===(K=q.filters)||void 0===K?void 0:K.baseFilter)&&(pt.A.isDefined(q.alpha)&&(q.filters.baseFilter.alpha=q.alpha),pt.A.isDefined(q.tintStrength)&&(q.filters.baseFilter.tintIntensity=q.tintStrength),pt.A.isDefined(q.blendMode)&&(q.filters.baseFilter.blend=parseInt(lt.P[q.blendMode])),pt.A.isDefined(q.tintColor))){const[K=255,z=255,Y=255]=ht.os.utils.splitColor(q.tintColor);q.filters.baseFilter.tintColor=[K/255,z/255,Y/255]}q.components.rootContainer.filters=z}setupFilters(q){const K=q.components.rootContainer.filters||[];if(!(pt.A.isDefined(q.alpha)||pt.A.isDefined(q.tintStrength)||pt.A.isDefined(q.blendMode)||pt.A.isDefined(q.tintColor)))return K;if(!q.filters){const z=["alpha","tintStrength","tintColor","blendMode"];q.filters={},q.filters.baseFilter||z.forEach((z=>{void 0!==q[z]&&(q.filters.baseFilter=K.find((q=>q instanceof lt.o))||this._createdFilters.get(q),q.filters.baseFilter||(q.filters.baseFilter=new lt.o,this._createdFilters.set(q,q.filters.baseFilter)),K.includes(q.filters.baseFilter)||K.push(q.filters.baseFilter))}))}return K}update(){Object.keys(this._listOfTransformHolders).forEach((q=>{const K=this._listOfTransformHolders[q];this.updateAnimatedGameObjects(K)}))}updateObjects(q){q instanceof Array?(0,ct.forEach)(q,(q=>{this.updateAnimatedGameObjects(q)})):this.updateAnimatedGameObjects(q)}canAnimate(q){return null!==this._timeline&&null!==q}destroy(){this._onCompleteCallback=void 0,this.destroyTimeline(),this.clearFiltersFromAnimatingObject(!0),this._createdFilters.clear(),this._originalRenderValuesMap.clear()}}var mt,yt,_t=z(26731),Et=z(15887),wt=z(32928),Tt=z(32357),St=z(23664),At=z(900),Ct=z(46386),Ot=z(42149),It=z(56761),Dt=z(33431),Rt=z(84893),Pt=z(5440),Mt=z(84097);!function(q){q.From="From",q.To="To",q.FromTo="From To"}(mt||(mt={})),function(q){q.From="from",q.To="to",q.FromTo="fromTo"}(yt||(yt={}));const Nt=["#817","#a35","#c66","#e94","#ed0","#9d5","#4d8","#2cb","#0bc","#09c","#36b","#639"];class xt extends _t.${constructor(){super(...arguments),this.easyTweenUI=[],this._hasValidTweenData=!1,this._lastClipboardContent=null,this.firstFocus=!0,this.infoBoxNodes=[],this.activeKeyRequiresRenderComponent=null,this.activeGUID=null,this.activeSelectedSelf=!1,this.lastRegenerationTime=null,this.regenerationMinimumIntervalMS=700,this.allowRegeneration=!1,this.jestTesting=!1,this.uiNodeSize1="1of12",this.uiNodeSize2="2of12",this.uiNodeSize3="3of12",this.uiNodeSize4="4of12",this.uiNodeSize6="6of12",this.uiNodeSize8="8of12",this.uiNodeSize9="9of12",this.uiNodeSize12="12of12",this.terminalIDPreviewAnimation="preview-animation"}generate(q,K){var z;return this.currentState=q,this.firstRunDoChecks(),this.checkClipboardForTweenData(),!this.jestTesting&&!this.allowRegeneration&&this.lastRegenerationTime&&Date.now()-this.lastRegenerationTime0){const q=this.currentState.selectedTween;this.activeSelectedSelf="self"===(null===(z=this.currentState.timeline.tweens[q])||void 0===z?void 0:z.GameObjectLinks.join()),this.activeGUID=this.currentState.gameObjectRecords[q],this.addSectionTargetPicker(),(this.activeGUID||this.activeSelectedSelf)&&(this.addSectionPropertySettings(),this.addSectionTweenType(),this.addSectionFromToValues(),this.addSectionEasingType(),this.addTweenGameObjectInfo())}this.addSectionSequenceSettings(),this.addSectionInfo()}}addSectionPreviewMode(){const q=Tt.X.create({buttonText:this.currentState.playMode?"STOP":"Preview Sequence",tooltip:this.currentState.playMode?"Stop the animation preview":"Start the animation preview in the editor's game view",id:this.terminalIDPreviewAnimation,nodeSize:this.uiNodeSize12,buttonIcon:this.currentState.playMode?Pt.a2.Stop:Pt.a2.Play,buttonType:this.currentState.playMode?Pt.VQ.Highlight:Pt.VQ.Prodigy,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{playMode:!this.currentState.playMode})}}),K=Tt.X.create({buttonText:"Docs",tooltip:"Open the Easy Tween documentation",id:"info-button",nodeSize:this.uiNodeSize6,buttonIcon:Pt.a2.Copy,onClick:()=>{this._editorAPI.openLinkInDefaultBrowser("https://prodigygame.atlassian.net/wiki/spaces/GD/pages/5048729640/EasyTween")}}),z=Et.X.createHorizontal([q,K],{spacing:4});this.easyTweenUI.push(z),this.easyTweenUI=this.easyTweenUI.concat(this.createTimelinePreview())}createTimelinePreview(){var q;const K=[];if(!(null===(q=this.currentState.timeline)||void 0===q?void 0:q.tweens)||0===this.currentState.timeline.tweens.length)return K;let z=0;return this.currentState.timeline.tweens.forEach((q=>{const K=(q.how.delay||0)+q.how.duration;z=Math.max(z,K)})),K.push(Dt.l.create({id:"easy-tween-duration",labelValue:`Total Duration: ${z}s`})),0===z||this.currentState.timeline.tweens.forEach(((q,Y)=>{const Q=q.how.delay||0,X=Q+q.how.duration,Z=Q/z*100,J=100-X/z*100,tt=this.getTweenColor(Y),et=Object.assign(St._.line(`timeline-preview-${Y}`),{style:{borderLeft:`1px solid ${tt}`,borderRight:`1px solid ${tt}`,marginLeft:`${Z}%`,marginRight:`${J}%`,marginTop:"1px",marginBottom:"1px",height:"6px",backgroundColor:tt,opacity:this.currentState.selectedTween===Y?1:.6,width:"unset",alignSelf:"unset"}});K.push(et)})),K}getTweenColor(q){return Nt[q%Nt.length]}addSectionAddRemoveTween(){var q,K,z;const Y=Math.min(null!==(z=null===(K=null===(q=this.currentState.timeline)||void 0===q?void 0:q.tweens)||void 0===K?void 0:K.length)&&void 0!==z?z:0,Lt.maximumTweensAllowed-1),Q=[];for(let J=0;J0){const q=`${X}of12`;Q.push(Tt.X.create({buttonText:"",id:"tweens-filler",nodeSize:q,buttonDisabled:!0}))}const Z=Et.X.createHorizontal(this.createTweenClipboardButtons());this.easyTweenUI.push(Et.X.createVertical([Et.X.createHorizontal(Q),Z],{isContainer:!0,title:"Tweens"}))}addSectionTargetPicker(){const q=this.currentState.selectedTween,K=Et.X.createHorizontal([],{isContainer:!0,title:`Tween ${q+1} Target`}),z=Tt.X.create({buttonText:"SELF",tooltip:"Tween a different Game Object, currently targeting the object this component is attached to",id:this.terminalIDPreviewAnimation,nodeSize:this.uiNodeSize3,buttonIcon:Pt.a2.None,buttonType:this.activeSelectedSelf?Pt.VQ.Prodigy:Pt.VQ.Default,onClick:this.userClickSelf.bind(this)}),Y=Tt.X.create({id:"select-game-object-button",nodeSize:this.uiNodeSize2,buttonType:Pt.VQ.Prodigy,tooltip:"Tween this Game Object, currently targeting an arbitrary object",onClick:()=>{this.activeGUID&&this._editorAPI.selectGameObject(this.activeGUID)},buttonText:"",buttonIcon:Pt.a2.ArrowPointer});K.elements.push(z),this.activeSelectedSelf||(K.elements.push(Ct.W.create({id:`gameObjectRecords${this.currentState.selectedTween.toString()}`,propertyPath:["gameObjectRecords",this.currentState.selectedTween.toString()],gameObjectGuid:this.activeGUID,onChange:this.userClickPickGameObject.bind(this)})),this.activeGUID&&K.elements.push(Y)),this.easyTweenUI.push(K)}addSectionPropertySettings(){var q,K;const z=this.createTextBox("Property","Pick the property to animate",this.uiNodeSize3),Y=At._.create({id:"propertyGroup",nodeSize:this.uiNodeSize9,selectValue:null!==(K=null===(q=this.currentState.timeline.tweens[this.currentState.selectedTween].customData)||void 0===q?void 0:q.propertyGroup)&&void 0!==K?K:"Position",propertyPath:["timeline","tweens",this.currentState.selectedTween.toString(),"customData","propertyGroup"],selectOptions:Object.keys(Lt.propertyGroups),onChange:()=>{this.resetActiveTweenProperties()}}),Q=this.createTextBox("Duration","The length of the animation, in seconds",this.uiNodeSize3),X=this.createHowInput("duration",this.uiNodeSize9),Z=this.createTextBox("Delay","Initial delay before animation starts",this.uiNodeSize3),J=this.createHowInput("delay",this.uiNodeSize9);this.easyTweenUI.push(Et.X.createHorizontal([z,Y]),Et.X.createHorizontal([Q,X]),Et.X.createHorizontal([Z,J]))}createCheckboxGroup(q,K,z,Y=!0){return wt.G.checkboxGroup({id:`${this.currentState.selectedTween.toString()}-${q}`,readonly:!Y,labelValue:q,labelPosition:Pt.G5.Right,inputValue:K,onChange:(q,K)=>{"boolean"==typeof K&&z(K)}})}addSectionTweenType(){var q,K,z,Y,Q;const X=[{label:mt.From,value:yt.From},{label:mt.To,value:yt.To},{label:mt.FromTo,value:yt.FromTo}],Z=this.currentState.selectedTween,J=this.currentState.timeline.tweens[Z],tt=At._.create({id:`${Z.toString()}-${yt.FromTo}`,selectOptions:X.map((q=>q.label)),selectValue:null!==(K=null===(q=J.customData)||void 0===q?void 0:q.fromTo)&&void 0!==K?K:mt.To,propertyPath:["timeline","tweens",Z.toString(),"customData","fromTo"],onChange:()=>{this.resetActiveTweenProperties()}}),et=!(!(null===(z=J.customData)||void 0===z?void 0:z.useTargetFrom)&&!(null===(Y=J.customData)||void 0===Y?void 0:Y.useTargetTo)),it=this.createCheckboxGroup("Relative",J.how.relative,(q=>{J.how.relative=q,this.safelyModifyTimeline()}),!et),st=this.createCheckboxGroup("Tween children",null===(Q=J.customData)||void 0===Q?void 0:Q.tweenChildren,(q=>{J.customData.tweenChildren=q,this.safelyModifyTimeline()}));this.easyTweenUI.push(Et.X.createVertical([Et.X.createHorizontal([tt,it,st],{style:{width:"100%"}})],{isContainer:!0,title:"Tween Type"}))}addSectionFromToValues(){var q,K,z,Y,Q,X,Z,J,tt;const et=this.currentState.selectedTween,it=this.currentState.timeline.tweens[et],st=null===(q=it.customData)||void 0===q?void 0:q.propertyGroup,nt=Lt.propertyGroups[st],at=Et.X.createVertical([],{isContainer:!0}),rt=Et.X.createVertical([],{isContainer:!0}),ot=this.createTextBox(mt.From,"The value to start from",this.uiNodeSize6),ht=this.createTextBox(mt.To,"The value to go towards",this.uiNodeSize6),ct=Tt.X.create({buttonText:"Match Target Object",id:"use-target-from",tooltip:"Match the starting value to the target object's value for this property",nodeSize:this.uiNodeSize6,buttonIcon:Pt.a2.None,buttonType:(null===(K=it.customData)||void 0===K?void 0:K.useTargetFrom)?Pt.VQ.Prodigy:Pt.VQ.Default,onClick:()=>{var q,K;(null===(q=it.customData)||void 0===q?void 0:q.useTargetFrom)||(this.currentState.timeline.tweens[et].how.relative=!1),this.currentState.timeline.tweens[et].customData.useTargetFrom=!(null===(K=it.customData)||void 0===K?void 0:K.useTargetFrom),this.safelyModifyTimeline()}}),dt=Tt.X.create({buttonText:"Match Target Object",id:"use-target-to",tooltip:"Match the ending value to the target objects value for this property",nodeSize:this.uiNodeSize6,buttonIcon:Pt.a2.None,buttonType:(null===(z=it.customData)||void 0===z?void 0:z.useTargetTo)?Pt.VQ.Prodigy:Pt.VQ.Default,onClick:()=>{var q,K;(null===(q=it.customData)||void 0===q?void 0:q.useTargetTo)||(this.currentState.timeline.tweens[et].how.relative=!1),this.currentState.timeline.tweens[et].customData.useTargetTo=!(null===(K=it.customData)||void 0===K?void 0:K.useTargetTo),this.safelyModifyTimeline()}}),lt=null===(Y=it.customData)||void 0===Y?void 0:Y.fromTo,ut=lt===mt.From||lt===mt.FromTo,ft=lt===mt.To||lt===mt.FromTo;ut&&at.elements.push(Et.X.createHorizontal([ot,ct])),ft&&rt.elements.push(Et.X.createHorizontal([ht,dt])),this.activeKeyRequiresRenderComponent=null;for(const bt in nt){Lt.renderKeys.includes(bt)&&(this.activeKeyRequiresRenderComponent=bt);const q=nt[bt];ut&&!(null===(Q=it.customData)||void 0===Q?void 0:Q.useTargetFrom)&&ut&&at.elements.push(this.createFromToInput(bt,q,yt.From)),ft&&!(null===(X=it.customData)||void 0===X?void 0:X.useTargetTo)&&rt.elements.push(this.createFromToInput(bt,q,yt.To))}(null===(Z=it.customData)||void 0===Z?void 0:Z.useTargetFrom)&&at.elements.push(Ct.W.create({id:`gameObjectRecordsFrom${this.currentState.selectedTween.toString()}`,propertyPath:["gameObjectRecordsFrom",this.currentState.selectedTween.toString()],gameObjectGuid:this.currentState.gameObjectRecordsFrom[this.currentState.selectedTween]})),(null===(J=it.customData)||void 0===J?void 0:J.useTargetTo)&&rt.elements.push(Ct.W.create({id:`gameObjectRecordsTo${this.currentState.selectedTween.toString()}`,propertyPath:["gameObjectRecordsTo",this.currentState.selectedTween.toString()],gameObjectGuid:this.currentState.gameObjectRecordsTo[this.currentState.selectedTween]})),(null===(tt=this.currentState.timeline.tweens[this.currentState.selectedTween].customData)||void 0===tt?void 0:tt.tweenChildren)&&(ut&&at.elements.push(this.createFromToInput("stagger",0,yt.From,!1)),ft&&rt.elements.push(this.createFromToInput("stagger",0,yt.To,!1))),ut&&this.easyTweenUI.push(at),ft&&this.easyTweenUI.push(rt)}addSectionEasingType(){var q,K,z,Y,Q,X,Z,J;const tt=[],et=this.currentState.timeline.tweens[this.currentState.selectedTween],it="string"==typeof(null==et?void 0:et.ease)?et.ease:(null===(q=null==et?void 0:et.ease)||void 0===q?void 0:q.value)||"none",st={};for(const lt in vt.J)st[vt.J[lt]]=lt;const nt=(null===(z=null===(K=null==it?void 0:it.split(".")[0])||void 0===K?void 0:K.match(/\w+$/))||void 0===z?void 0:z[0])||"none",at=(null===(Q=null===(Y=null==it?void 0:it.split(".")[1])||void 0===Y?void 0:Y.match(/^\w+/))||void 0===Q?void 0:Q[0])||"out",rt=(null===(X=null==it?void 0:it.match(/[+-]?\d+(\.\d+)?/g))||void 0===X?void 0:X.map((function(q){return parseFloat(q)})))||[],ot=At._.create({id:`${this.currentState.selectedTween}-ease`,nodeSize:this.uiNodeSize8,selectValue:st[nt],selectOptions:Object.keys(vt.J),onChange:q=>{const K=q.toLowerCase()===vt.J.None?"":`.${at}`;this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${vt.J[q]}${K}`,this.safelyModifyTimeline()}}),ht=At._.create({id:`${this.currentState.selectedTween}-easeInOut`,nodeSize:this.uiNodeSize4,selectValue:at,selectOptions:["in","out","inOut"],onChange:q=>{this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${nt}.${q}`,this.safelyModifyTimeline()}});tt.push(ot),nt!==vt.J.None&&tt.push(ht),this.easyTweenUI.push(Et.X.createVertical([Et.X.createHorizontal(tt)],{isContainer:!0,title:"Easing"}));const ct=nt===vt.J.Back,dt=nt===vt.J.Elastic;if(ct||dt){const q=[];q.push(Dt.l.create({id:"back-overshoot-label",labelValue:"Overshoot",nodeSize:this.uiNodeSize3}),It.f.create({id:`${this.currentState.selectedTween}-back--overshoot`,inputType:"number",inputValue:null!==(Z=rt[0])&&void 0!==Z?Z:1,inputUpdateMode:Pt.JG.OnTheFly,nodeSize:this.uiNodeSize3,onChange:(q,K)=>{var z,Y;rt[0]=K;const Q=ct?`${rt[0]}`:`${null!==(z=rt[0])&&void 0!==z?z:1}, ${null!==(Y=rt[1])&&void 0!==Y?Y:1}`;this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${nt}.${at}(${Q})`,this.safelyModifyTimeline()}})),dt&&q.push(Dt.l.create({id:"back-amplitude-label",labelValue:"Amplitude",nodeSize:this.uiNodeSize3}),It.f.create({id:`${this.currentState.selectedTween}-back--amplitude`,inputType:"number",inputValue:null!==(J=rt[1])&&void 0!==J?J:1,inputUpdateMode:Pt.JG.OnTheFly,nodeSize:this.uiNodeSize3,onChange:(q,K)=>{var z,Y;rt[1]=K;const Q=ct?`${rt[0]}`:`${null!==(z=rt[0])&&void 0!==z?z:1}, ${null!==(Y=rt[1])&&void 0!==Y?Y:1}`;this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${nt}.${at}(${Q})`,this.safelyModifyTimeline()}})),this.easyTweenUI.push(Et.X.createVertical([Et.X.createHorizontal(q)]))}}createTweenButtons(q){var K;const z=q===this.currentState.selectedTween;let Y=!1;this.currentState.timeline&&(Y=q<(null===(K=this.currentState.timeline.tweens)||void 0===K?void 0:K.length));return[Tt.X.create({buttonText:Y?"-":"+",tooltip:Y?"Remove this tween layer":"Add a new tween layer",id:`${this._componentGuid}-tween-add-remove-${q}`,nodeSize:this.uiNodeSize1,buttonType:Y?Pt.VQ.Default:Pt.VQ.Highlight,onClick:()=>{this.userClickAddRemoveTween(q)}}),Tt.X.create({buttonText:[q+1].toString(),id:`tween-${q}`,tooltip:`Select Tween ${q+1}`,nodeSize:this.uiNodeSize1,buttonDisabled:!Y,buttonType:z?Pt.VQ.Prodigy:Pt.VQ.Default,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{selectedTween:q})},style:{backgroundColor:Y?this.getTweenColor(q):void 0,opacity:z?1:.6,borderColor:z?"#FFFFFF":"transparent",borderWidth:"1px",borderStyle:"solid",color:"white",textShadow:"-1px -1px 0 black, \n 1px -1px 0 black, \n -1px 1px 0 black, \n 1px 1px 0 black"}})]}addTweenGameObjectInfo(){var q,K;let z=null;this.activeSelectedSelf?z=null===(q=this._editorAPI.getComponent(this._componentGuid))||void 0===q?void 0:q.GameObject:this.activeGUID&&(z=this._editorAPI.getGameObject(this.activeGUID));if(null!==(K=null==z?void 0:z.hasComponent(bt.y))&&void 0!==K&&K||!this.activeKeyRequiresRenderComponent)return;const Y=Et.X.createVertical([],{isContainer:!0,title:"Tween Info"});Y.elements.push(Ot.b.create({id:"no-render-component-warning",iconType:Pt.AT.Question,message:`Uh oh! It looks like you\`re trying to tween ${this.activeKeyRequiresRenderComponent} but that requires a RenderComponent.\nWould you like to create a basic render component?`})),Y.elements.push(Tt.X.create({buttonText:"Yes, add a BaseRender",id:"add-base-render-btn",tooltip:"Add a basic render component to this Game Object so the selected property can be tweened",onClick:()=>{z&&(this.activeSelectedSelf||this._editorAPI.selectGameObject(this.activeGUID),this._editorAPI.addComponent("BaseRender"))}})),0!==Y.elements.length&&this.easyTweenUI.push(Y)}addSectionSequenceSettings(){var q,K,z,Y;const Q=(null===(K=null===(q=this.currentState.timeline)||void 0===q?void 0:q.tweens)||void 0===K?void 0:K.length)>0,X=Tt.X.create({buttonText:"Save Motion to File",id:"save-motion",tooltip:"Save the current animation timeline to a file for later use",buttonTextWrap:Pt.K3.Wrap,style:{paddingRight:"1px"},onClick:Q?this.userClickSaveAnimation.bind(this):null}),Z=Tt.X.create({buttonText:"Load Motion from File",id:"load-motion",tooltip:"Load an animation timeline from a file",buttonTextWrap:Pt.K3.Wrap,style:{paddingLeft:"1px"},onClick:this.userClickLoadAnimation.bind(this)}),J=Et.X.createHorizontal([this.createTextBox("Loop Count","The number of times the animation will loop",this.uiNodeSize4),It.f.create({id:"loopCount",inputType:"number",nodeSize:this.uiNodeSize4,inputValue:0|(null===(z=this.currentState.timeline)||void 0===z?void 0:z.loopCount),propertyPath:["timeline","loopCount"],inputUpdateMode:Pt.JG.OnTheFly}),wt.G.checkboxGroup({id:"yoyo",labelPosition:Pt.G5.Right,inputValue:(null===(Y=this.currentState.timeline)||void 0===Y?void 0:Y.yoyo)||!1,labelValue:"yoyo",onChange:(q,K)=>{this.currentState.timeline.yoyo=K,this.safelyModifyTimeline()}})]),tt=Et.X.createVertical([Et.X.createVertical([this.createPlaybackButton("Autoplay Tween","playbackPlayOnEnable","Play the tween automatically when the prefab is enabled/created"),this.createPlaybackButton("Destroy Object On Complete","playbackKillOnComplete","Destroy the GameObject with this component when the tween finishes playing"),Et.X.createHorizontal([X,Z],{spacing:10}),St._.line(),Rt.N.create({id:"onTweenComplete",label:"On Tween Complete",signalValue:this.currentState.onTweenComplete,componentGUID:this._componentGuid})])],{isContainer:!0,title:"Sequence settings",isCollapsible:!0,spacing:4});this.currentState.timeline&&tt.elements.unshift(J),this.easyTweenUI.push(tt)}addSectionInfo(){var q,K,z,Y,Q;this.infoBoxNodes.length=0;const X=null!==(z=null===(K=null===(q=this.currentState.timeline)||void 0===q?void 0:q.tweens)||void 0===K?void 0:K.length)&&void 0!==z?z:0;for(let J=0;J0)for(const z of K.warningLog)this.createWarning(`Tween ${J+1}: ${z}`,Pt.AT.Warning)}}else this.createWarning(`Tween ${J+1} has no target! Nothing will play for it :(`,Pt.AT.Warning)}0===X&&this.createWarning("Click on the + icon to add a tween to animate!",Pt.AT.Info),this.createWarning(`Tween will play on prefab enable: ${this.currentState.playbackPlayOnEnable}`,Pt.AT.Info),this.createWarning(`Tween will get destroyed on completion: ${this.currentState.playbackKillOnComplete}`,Pt.AT.Info);const Z=Et.X.createVertical(this.infoBoxNodes,{isContainer:!0,title:"Timeline Info"});this.easyTweenUI.push(Z)}createTextBox(q,K,z){return Dt.l.create({id:`${q}-label`,labelTextWrap:Pt.K3.Wrap,labelTooltip:K,labelValue:q,nodeSize:z})}createWarning(q,K){this.infoBoxNodes.push(Ot.b.create({id:`infoBox${this.infoBoxNodes.length}`,iconType:K,message:q})),this.allowRegeneration=!0}createPlaybackButton(q,K,z){return Tt.X.create({buttonText:q,id:K,buttonTextWrap:Pt.K3.Wrap,nodeSize:this.uiNodeSize2,buttonType:this.currentState[K]?Pt.VQ.Prodigy:Pt.VQ.Default,tooltip:z,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{[K]:!this.currentState[K]})}})}createHowInput(q,K){const z=this.currentState.selectedTween,Y=this.currentState.timeline.tweens[z];return It.f.create({id:`${this._componentGuid.toString()}--selectedTween.toString()}-how-${q}`,propertyPath:["timeline","tweens",this.currentState.selectedTween.toString(),"how",q],inputType:"number",inputValue:Y.how[q],inputUpdateMode:Pt.JG.OnTheFly,nodeSize:K})}createFromToInput(q,K,z,Y=!0){const Q=this.currentState.selectedTween,X=this.currentState.timeline.tweens[Q],Z=Y&&X.how.relative?":+=":":",J=X[z]||{},tt="undefined"!==J[q]?J[q]:K,et={labelValue:`${q}${Z}`,id:`${this._componentGuid.toString()}-${z}-${q}`,propertyPath:["timeline","tweens",this.currentState.selectedTween.toString(),z,q],inputUpdateMode:Pt.JG.OnTheFly};return"tintColor"===q?It.f.create(Object.assign(Object.assign({},et),{inputType:"color",inputValue:"#"===tt[0]?tt:"#ffffff"})):"blendMode"===q?At._.create(Object.assign(Object.assign({},et),{selectOptions:Object.keys(lt.P).filter((q=>isNaN(Number(q)))),selectValue:tt})):It.f.create(Object.assign(Object.assign({},et),{inputType:"number",inputValue:tt}))}resetActiveTweenProperties(){var q,K;const z=this.currentState.selectedTween,Y=null===(q=this.currentState.timeline.tweens[z].customData)||void 0===q?void 0:q.propertyGroup,Q=null===(K=this.currentState.timeline.tweens[z].customData)||void 0===K?void 0:K.fromTo;Q===mt.From?(delete this.currentState.timeline.tweens[z].to,this.currentState.timeline.tweens[z].from=Object.assign({},Lt.propertyGroups[Y])):Q===mt.To?(delete this.currentState.timeline.tweens[z].from,this.currentState.timeline.tweens[z].to=Object.assign({},Lt.propertyGroups[Y])):(this.currentState.timeline.tweens[z].from=Object.assign({},Lt.propertyGroups[Y]),this.currentState.timeline.tweens[z].to=Object.assign({},Lt.propertyGroups[Y])),this.safelyModifyTimeline()}firstRunDoChecks(){this.firstFocus&&(this._editorAPI.isPlayMode()||(this.currentState.playMode=!1),this.firstFocus=!1)}userClickSelf(){const q=this.currentState.selectedTween;this.activeSelectedSelf="self"===this.currentState.timeline.tweens[q].GameObjectLinks.join(),this.currentState.gameObjectRecords[q]=null,this.currentState.timeline.tweens[this.currentState.selectedTween].GameObjectLinks=this.activeSelectedSelf?[]:["self"],this.safelyModifyTimeline(),this._editorAPI.modifyComponent(this._componentGuid,{gameObjectRecords:this.cleanGORecords()})}userClickPickGameObject(){this._editorAPI.getComponent(this._componentGuid).GameObject===this._editorAPI.getGameObject(this.activeGUID)&&(this.currentState.timeline.tweens[this.currentState.selectedTween].GameObjectLinks=["self"],this.safelyModifyTimeline())}userClickAddRemoveTween(q){if(this.currentState.timeline||(this.currentState.timeline={timelineID:this._componentGuid,tweens:[]},this.safelyModifyTimeline()),this.currentState.timeline.timelineID!==this._componentGuid)return;const K=this.currentState.timeline.tweens.length,z=qLt.maximumTweensAllowed,Y=!z,Q=K+(Y?1:-1);if(Y){const q={GameObjectLinks:["self"],to:Object.assign({},Lt.propertyGroups[Lt.defaultPropertyGroup]),how:Object.assign({},Lt.how),ease:`${vt.J[Lt.ease]}.${Lt.direction}`,customData:{propertyGroup:Lt.defaultPropertyGroup,fromTo:Lt.fromTo}};this.currentState.timeline.tweens.push(q)}else if(z&&K>0){this.currentState.timeline.tweens.splice(q,1);const K=12;for(let z=q;z{q?this._editorAPI.showPopup(`Animation saved!\n${q}`):rt.V.log("Save operation was cancelled.",at.$.Info)})).catch((q=>{this._editorAPI.showPopup("Error during save operation. Please contact TNT Team!")}))}userClickLoadAnimation(){this._editorAPI.showFileDialog(Mt.r.Load,"Load Your File","example","animation").then((q=>{if(q)try{const K=JSON.parse(q);if(null==K?void 0:K.tweens)return void this.processTimeline(K);this._editorAPI.showPopup("Invalid or incomplete animation data.")}catch(K){this._editorAPI.showPopup("Invalid JSON. Please contact TNT Team!")}else rt.V.log("Load operation was cancelled.",at.$.Info)})).catch((q=>{this._editorAPI.showPopup("Error during load operation. Please contact TNT Team!")}))}processTimeline(q){this.currentState.selectedTween=0,this.activeGUID=null,this.currentState.gameObjectRecords={},this._editorAPI.modifyComponent(this._componentGuid,{gameObjectRecords:this.cleanGORecords()}),this.currentState.timeline=q,this.currentState.timeline.timelineID=this._componentGuid,this.safelyModifyTimeline()}cleanGORecords(){const q={};for(const K in this.currentState.gameObjectRecords)this.currentState.gameObjectRecords[K]&&(q[K]=this.currentState.gameObjectRecords[K]);return q}safelyModifyTimeline(){this.currentState.timeline.timelineID===this._componentGuid&&this._editorAPI.modifyComponent(this._componentGuid,{timeline:this.currentState.timeline})}checkClipboardForTweenData(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;try{const z=yield navigator.clipboard.readText();if(z!==this._lastClipboardContent){this._lastClipboardContent=z;try{const K=JSON.parse(z);this._hasValidTweenData=void 0!==(null===(q=null==K?void 0:K.easyTween)||void 0===q?void 0:q.tween)}catch(K){this._hasValidTweenData=!1}}}catch(z){this._hasValidTweenData=!1}}))}copyTweenToClipboard(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;if(void 0===this.currentState.selectedTween||!(null===(q=this.currentState.timeline)||void 0===q?void 0:q.tweens))return;const K=this.currentState.timeline.tweens[this.currentState.selectedTween];if(!K)return;const z={easyTween:{tween:Object.assign(Object.assign({},K),{GameObjectLinks:[]})}};try{yield navigator.clipboard.writeText(JSON.stringify(z,null,2)),rt.V.log("Tween copied to clipboard",at.$.Info)}catch(Y){rt.V.log("Failed to copy tween to clipboard",at.$.Error)}}))}pasteTweenFromClipboard(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;try{if(void 0===this.currentState.selectedTween)return void rt.V.log("Please select a tween to paste into",at.$.Error);const K=yield navigator.clipboard.readText(),z=JSON.parse(K);if(null===(q=null==z?void 0:z.easyTween)||void 0===q?void 0:q.tween){const q=z.easyTween.tween;this.currentState.timeline.tweens||(this.currentState.timeline.tweens=[]),this.currentState.timeline.tweens[this.currentState.selectedTween]=Object.assign(Object.assign({},q),{GameObjectLinks:["self"]}),this.safelyModifyTimeline(),rt.V.log("Tween pasted from clipboard",at.$.Info)}}catch(K){rt.V.log("Failed to paste tween from clipboard",at.$.Error)}}))}shiftTween(q){var K;if(void 0===this.currentState.selectedTween||!(null===(K=this.currentState.timeline)||void 0===K?void 0:K.tweens))return;const z=this.currentState.selectedTween,Y=this.currentState.timeline.tweens.length-1,Q=z+(q?1:-1);if(Q<0||Q>Y)return;const X=this.currentState.timeline.tweens,Z=X[z];X[z]=X[Q],X[Q]=Z,this._editorAPI.modifyComponent(this._componentGuid,{selectedTween:Q}),this.safelyModifyTimeline()}createTweenClipboardButtons(){var q,K,z;return[Tt.X.create({id:"shift-left",buttonText:"←",tooltip:"Shift the selected tween one layer lower",nodeSize:this.uiNodeSize1,buttonType:Pt.VQ.Default,buttonDisabled:void 0===this.currentState.selectedTween||!(null===(q=this.currentState.timeline)||void 0===q?void 0:q.tweens)||this.currentState.selectedTween<=0,onClick:()=>{this.shiftTween(!1)}}),Tt.X.create({id:"copy-tween",buttonText:"Copy",tooltip:"Copy the selected tween to the clipboard",nodeSize:this.uiNodeSize2,buttonType:Pt.VQ.Default,buttonDisabled:void 0===this.currentState.selectedTween||!(null===(K=this.currentState.timeline)||void 0===K?void 0:K.tweens),onClick:()=>{this.copyTweenToClipboard()}}),Tt.X.create({id:"paste-tween",buttonText:"Paste",tooltip:"Paste tween data from the clipboard into the selected tween",nodeSize:this.uiNodeSize2,buttonType:Pt.VQ.Default,buttonDisabled:!this._hasValidTweenData,onClick:()=>{this.pasteTweenFromClipboard()}}),Tt.X.create({id:"shift-right",buttonText:"→",tooltip:"Shift the selected tween one layer higher",nodeSize:this.uiNodeSize1,buttonType:Pt.VQ.Default,buttonDisabled:void 0===this.currentState.selectedTween||!(null===(z=this.currentState.timeline)||void 0===z?void 0:z.tweens)||this.currentState.selectedTween>=this.currentState.timeline.tweens.length-1,onClick:()=>{this.shiftTween(!0)}})]}}const Lt={propertyGroups:{Position:{x:0,y:0},Rotation:{rotation:0},Scale:{scaleX:1,scaleY:1},Skew:{skewX:0,skewY:0},Alpha:{alpha:1},Tint:{tintColor:"rgba(255,255,255,1)",tintStrength:1,blendMode:"Multiply"}},renderKeys:["alpha","tintStrength","tintColor"],ease:"Easy",fromTo:"To",direction:"out",defaultPropertyGroup:"Position",how:{duration:1,delay:0,relative:!1},maximumTweensAllowed:12};let kt=class extends tt.u{constructor(){super(...arguments),this.playMode=!1,this.playbackPlayOnEnable=!0,this.playbackKillOnComplete=!1,this.gameObjectRecords={},this.gameObjectRecordsFrom={},this.gameObjectRecordsTo={},this.timeline=null,this.selectedTween=-1,this.onTweenComplete=new it.H}get _animationWrapper(){return this._animation||this.reloadAnimation(),this._animation}create(){super.create(),this.checkAndTriggerAnimation()}checkForAGameObjectEditor(){let q=0;const K=()=>{var z;editorAPI.getGameObjectGuid(this.GameObject)?this.isCurrentlySelected()?this.checkAndTriggerAnimation():null===(z=this._animation)||void 0===z||z.destroyTimeline():++q<100&&window.setTimeout(K,100)};window.setTimeout(K,100)}isCurrentlySelected(){return!1}checkAndTriggerAnimation(){var q;if(!(null===(q=this.GameObject)||void 0===q?void 0:q.active))return;this.playbackPlayOnEnable&&this.playAnimation()}playAnimation(q=0){this._animationWrapper.play(q)}pauseAnimation(){this._animationWrapper.pause()}resumeAnimation(){this._animationWrapper.resume()}completeAnimation(){this._animationWrapper.complete()}resetToStart(){this._animationWrapper.resetToStart()}reloadAnimation(){var q,K,z,Y,Q,X,Z,J;this._animation&&this._animation.destroy(),this._animation=new gt({loopCount:null!==(K=null===(q=this.timeline)||void 0===q?void 0:q.loopCount)&&void 0!==K?K:0,yoyo:null!==(Y=null===(z=this.timeline)||void 0===z?void 0:z.yoyo)&&void 0!==Y&&Y}),this._animation.onComplete((()=>{var q,K;null===(q=this.onTweenComplete)||void 0===q||q.dispatch(),this.playbackKillOnComplete&&(null===(K=this._animation)||void 0===K||K.destroy(),this._animation=null)}));const tt=this.timeline;if(!tt)return void rt.V.log("Easy Tween: not loaded properly",at.$.Error);const et=tt.tweens.length;if(0!==et)for(let it=0;it0)){rt.V.log(`Easy Tween: tween ${it} has no children to animate`,at.$.Info);continue}et=this._animation.addGameObjects(Y.children)}if(q.to&&(null===(Z=q.customData)||void 0===Z?void 0:Z.useTargetTo)&&this.gameObjectRecordsTo[it]){const K=this._animation.addGameObject(this.gameObjectRecordsTo[it]);Object.keys(q.to).forEach((z=>{z in K&&(q.to[z]=K[z])}))}if(q.from&&(null===(J=q.customData)||void 0===J?void 0:J.useTargetFrom)&&this.gameObjectRecordsFrom[it]){const K=this._animation.addGameObject(this.gameObjectRecordsFrom[it]);Object.keys(q.from).forEach((z=>{z in K&&(q.from[z]=K[z])}))}q.from&&q.to?this._animation.fromTo(et,q.how.duration,q.from,q.to,q.ease,q.how.delay,q.how.relative):q.to?this._animation.to(et,q.how.duration,q.to,q.ease,q.how.delay,q.how.relative):q.from&&this._animation.from(et,q.how.duration,q.from,q.ease,q.how.delay,q.how.relative)}else rt.V.log("Easy Tween: No tweens to animate",at.$.Info)}destroy(){var q,K;null===(q=this._animation)||void 0===q||q.destroy(),null===(K=this.onTweenComplete)||void 0===K||K.dispose(),super.destroy()}};(0,Q.Cg)([(0,et.vk)(),(0,Q.Sn)("design:type",Boolean)],kt.prototype,"playMode",void 0),(0,Q.Cg)([(0,et.vk)(),(0,Q.Sn)("design:type",Boolean)],kt.prototype,"playbackPlayOnEnable",void 0),(0,Q.Cg)([(0,et.vk)(),(0,Q.Sn)("design:type",Boolean)],kt.prototype,"playbackKillOnComplete",void 0),(0,Q.Cg)([(0,et.Om)(),(0,et.ER)(),(0,Q.Sn)("design:type",Object)],kt.prototype,"gameObjectRecords",void 0),(0,Q.Cg)([(0,et.Om)(),(0,et.ER)(),(0,Q.Sn)("design:type",Object)],kt.prototype,"gameObjectRecordsFrom",void 0),(0,Q.Cg)([(0,et.Om)(),(0,et.ER)(),(0,Q.Sn)("design:type",Object)],kt.prototype,"gameObjectRecordsTo",void 0),(0,Q.Cg)([(0,et.np)(),(0,et.SZ)(),(0,Q.Sn)("design:type",Object)],kt.prototype,"timeline",void 0),(0,Q.Cg)([(0,et.g1)(),(0,Q.Sn)("design:type",Number)],kt.prototype,"selectedTween",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],kt.prototype,"onTweenComplete",void 0),kt=(0,Q.Cg)([(0,X.EV)("EasyTween",X.YH.animation),(0,ot.W)(xt)],kt);let Bt=class extends tt.u{constructor(){super(...arguments),this.separator=" ",this.buildStringOnCreate=!0,this.chunks=[],this.onStringChanged=new it.H,this.onStringBuilt=new it.H,this._originalChunks=[]}create(){super.create(),this.buildStringOnCreate&&this.buildString(),this._originalChunks=[...this.chunks]}addChunk(q,K){if(pt.A.isDefined(K)){const z=K<0?this.chunks.length+K:K;if(z<0||z>this.chunks.length)return void rt.V.log(`StringBuilderComponent: Index out of bounds trying to add string "${q}" at index ${K}`,at.$.Error);this.chunks.splice(z,0,q)}else this.chunks.push(q);this.onStringChanged.dispatch(this.getString())}setChunk(q,K){const z=K<0?this.chunks.length+K:K;z<0||z>=this.chunks.length?rt.V.log(`StringBuilderComponent: Index out of bounds trying to set chunk to "${q}" at index ${K}`,at.$.Error):this.chunks[z]!==q&&(this.chunks[z]=q,this.onStringChanged.dispatch(this.getString()))}deleteChunk(q){const K=q<0?this.chunks.length+q:q;K<0||K>=this.chunks.length?rt.V.log(`StringBuilderComponent: Index out of bounds trying to delete string at index ${q}`,at.$.Error):(this.chunks.splice(K,1),this.onStringChanged.dispatch(this.getString()))}reset(){const q=this.getString();this.chunks=[...this._originalChunks],this.getString()!==q&&this.onStringChanged.dispatch(this.getString())}buildString(){this.onStringBuilt.dispatch(this.getString())}getString(){return this.chunks.filter((q=>(null==q?void 0:q.length)>0)).join(this.separator)}destroy(){this.onStringChanged.dispose(),this.onStringBuilt.dispose(),super.destroy()}};(0,Q.Cg)([(0,et.W_)(),(0,Q.Sn)("design:type",String)],Bt.prototype,"separator",void 0),(0,Q.Cg)([(0,et.vk)(),(0,Q.Sn)("design:type",Boolean)],Bt.prototype,"buildStringOnCreate",void 0),(0,Q.Cg)([(0,et.W_)(),(0,et.SZ)(),(0,Q.Sn)("design:type",Array)],Bt.prototype,"chunks",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],Bt.prototype,"onStringChanged",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],Bt.prototype,"onStringBuilt",void 0),Bt=(0,Q.Cg)([(0,X.EV)("StringBuilder",X.YH.ui)],Bt);class Ut extends _t.${generate(q,K){const z=[];return z.push(wt.G.componentPickerGroup({id:"source",labelValue:"Source",componentType:"Component",componentGuid:q.source})),z.push(wt.G.componentPickerGroup({id:"target",labelValue:"Target",componentType:"Component",componentGuid:q.target})),z.push(wt.G.checkboxGroup({id:"copyOnCreate",labelValue:"Copy on Create",labelPosition:Pt.G5.Left,inputValue:q.copyOnCreate})),z.push(Rt.N.create({id:"beforeCopy",label:"Before Copy",signalValue:q.beforeCopy,componentGUID:this._componentGuid})),z.push(Rt.N.create({id:"onCopy",label:"On Copy",signalValue:q.onCopy,componentGUID:this._componentGuid})),z.push(St._.blankLine("divider")),z.push(this.buildPropertiesSection(q)),Et.X.createVertical(z)}buildPropertiesSection(q){var K,z,Y;const Q=[];if(!q.source||!q.target)return Q.push(Ot.b.create({id:"property-cloner-empty",iconType:Pt.AT.Info,message:"Select source and target to see common properties."})),Et.X.createVertical(Q,{isContainer:!0,title:"Properties to copy"});const X=this.getCommonProperties(q.source,q.target),Z=new Set(null!==(K=q.propertiesToCopy)&&void 0!==K?K:[]),J=new Set(X),tt=(null!==(z=q.propertiesToCopy)&&void 0!==z?z:[]).filter((q=>J.has(q)));if(tt.length!==(null!==(Y=q.propertiesToCopy)&&void 0!==Y?Y:[]).length){this._editorAPI.modifyComponent(this._componentGuid,{propertiesToCopy:tt});for(const q of Z)J.has(q)||Z.delete(q)}if(0===X.length)Q.push(Ot.b.create({id:"property-cloner-no-common",iconType:Pt.AT.Info,message:"Source and target have no public properties in common."}));else for(const et of X)Q.push(wt.G.checkboxGroup({id:`prop-${et}`,labelValue:et,labelPosition:Pt.G5.Left,inputValue:Z.has(et),onChange:(q,K)=>{if("boolean"!=typeof K)return;const z=new Set(Z);K?z.add(et):z.delete(et);const Y=X.filter((q=>z.has(q)));this._editorAPI.modifyComponent(this._componentGuid,{propertiesToCopy:Y})}}));return Et.X.createVertical(Q,{isContainer:!0,title:"Properties to copy",isCollapsible:!0})}getCommonProperties(q,K){const z=this._editorAPI.getComponent(q),Y=this._editorAPI.getComponent(K);if(!z||!Y)return[];const Q=z,X=Y,Z=new Set(this.collectPublicKeys(Y));return this.collectPublicKeys(z).filter((q=>Z.has(q))).filter((q=>typeof Q[q]==typeof X[q])).filter((q=>"function"!=typeof Q[q])).sort(((q,K)=>q.localeCompare(K)))}collectPublicKeys(q){const K=new Set;let z=q;for(;z&&Object.getPrototypeOf(z);){const q=Object.getOwnPropertyDescriptors(z);for(const z of Object.keys(q)){if(K.has(z)||z.startsWith("_"))continue;const Y=q[z];"function"!=typeof Y.value&&"object"!=typeof Y.value&&K.add(z)}z=Object.getPrototypeOf(z)}return[...K]}}let Ft=class extends tt.u{constructor(){super(...arguments),this.source=null,this.target=null,this.copyOnCreate=!1,this.propertiesToCopy=[],this.beforeCopy=new it.H,this.onCopy=new it.H}create(){super.create(),this.copyOnCreate&&this.copy()}copy(){if(!this.source||!this.target)return;this.beforeCopy.dispatch();const q=this.source,K=this.target;for(const z of this.propertiesToCopy){if(!(z in q)||!(z in K))continue;const Y=q[z];typeof Y==typeof K[z]&&("function"!=typeof Y&&(K[z]=Y))}this.onCopy.dispatch()}destroy(){this.beforeCopy.dispose(),this.onCopy.dispose(),super.destroy()}};(0,Q.Cg)([(0,et.Mn)(tt.u),(0,Q.Sn)("design:type",tt.u)],Ft.prototype,"source",void 0),(0,Q.Cg)([(0,et.Mn)(tt.u),(0,Q.Sn)("design:type",tt.u)],Ft.prototype,"target",void 0),(0,Q.Cg)([(0,et.vk)(),(0,Q.Sn)("design:type",Boolean)],Ft.prototype,"copyOnCreate",void 0),(0,Q.Cg)([(0,et.W_)(),(0,et.SZ)(),(0,Q.Sn)("design:type",Array)],Ft.prototype,"propertiesToCopy",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],Ft.prototype,"beforeCopy",void 0),(0,Q.Cg)([(0,et.bb)(),(0,Q.Sn)("design:type",it.H)],Ft.prototype,"onCopy",void 0),Ft=(0,Q.Cg)([(0,X.EV)("PropertyCloner",X.YH.root,"Copies matching public properties from a source component to a target component"),(0,ot.W)(Ut)],Ft);var Gt=z(83793),jt=z(82538),$t=(z(55539),z(10673));class Ht{constructor(q,K){this.onStart=new it.H,this.onStop=new it.H,this.key=q,this.loop=K}destroy(){this.onStart.dispose(),this.onStop.dispose()}play(q,K){K.isLoaded?this.playInternal(K.getSpine()):K.OnLoaded.addOnce((()=>{this.playInternal(K.getSpine())})),this.onStop.addOnce(q.onAnimationStateStop,q)}playInternal(q){var K;q.setAnimationByName(0,this.key,this.loop),null===(K=this.onStart)||void 0===K||K.dispatch(),this.loop||q.onComplete.addOnce((()=>{this.sendStopSignal()}))}sendStopSignal(){this.onStop.dispatch()}}let Vt=class extends tt.u{constructor(){super(...arguments),this._states=new Map,this._currentState=null,this._defaultState=null}get CurrentStateKey(){return this._currentState?this._currentState.key:this._defaultState?this._defaultState.key:""}destroy(){this._states.forEach((q=>{q.destroy()})),this._states=null,super.destroy()}setDefaultAnimationState(q,K){this.addAnimationState(q,K)&&(this._defaultState=this._states.get(q),this._currentState||this._defaultState.play(this,this._spineComponent))}addAnimationState(q,K){if(!this._states.has(q)){const z=new Ht(q,K);return this._states.set(q,z),!0}return!1}setAnimationState(q){var K;this._states.has(q)&&this.CurrentStateKey!==q?(null===(K=this._currentState)||void 0===K||K.sendStopSignal(),this._currentState=this._states.get(q),this._currentState.play(this,this._spineComponent),this._currentState.onStop.addOnce(this.onAnimationStateStop,this)):rt.V.log(`Spine animation for key ${q} does not exist on this controller`,at.$.Error)}onAnimationStateStop(){var q;this._currentState=null,null===(q=this._defaultState)||void 0===q||q.play(this,this._spineComponent)}};(0,Q.Cg)([(0,et.Mn)($t.v),(0,Q.Sn)("design:type",$t.v)],Vt.prototype,"_spineComponent",void 0),Vt=(0,Q.Cg)([(0,X.EV)("SpineAnimationController",X.YH.animation,"A controller to manage animation states for a given SpineComponent")],Vt);var Wt=z(29104),qt=(z(78821),z(50740),z(78321),z(39002));var Kt=z(15308);z(68910);var zt=z(48368);class Yt{constructor(q){this.onAddedToGroup=new it.H,this.onRemovedFromGroup=new it.H,this.onRemovedFromWorld=new it.H,this.onOutOfBounds=new it.H,this.onEnterBounds=new it.H,this.onInputOver=new it.H,this.onInputOut=new it.H,this.onInputDown=new it.H,this.onInputUp=new it.H,this.onDestroy=new it.H,this.onDragStart=new it.H,this.onDragStop=new it.H,this.onDragUpdate=new it.H,this.onAnimationStart=new it.H,this.onAnimationComplete=new it.H,this.onAnimationLoop=new it.H,this.parent=q}destroy(){this.parent=null,this.onDestroy.dispose(),this.onAddedToGroup.dispose(),this.onRemovedFromGroup.dispose(),this.onEnterBounds.dispose(),this.onOutOfBounds.dispose(),this.onInputOver.dispose(),this.onInputOut.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose(),this.onDragStart.dispose(),this.onDragUpdate.dispose(),this.onDragStop.dispose(),this.onAnimationStart.dispose(),this.onAnimationComplete.dispose(),this.onAnimationLoop.dispose(),this.onRemovedFromWorld.dispose()}}z(9938);var Qt,Xt=z(86766),Zt=z(48011),Jt=(z(37950),z(37061),z(89460),z(49356),z(90157),z(52777));!function(q){q[q.JSON_HASH=0]="JSON_HASH",q[q.JSON_ARRAY=1]="JSON_ARRAY"}(Qt||(Qt={}));z(72077);var te=z(49415),ee=z(27179);class ie{get diameter(){return this._diameter}set diameter(q){q>0?(this._diameter=q,this._radius=.5*q):rt.V.log(`Circle diameter must be greater than 0. You provided: ${q}`,at.$.Warning)}get radius(){return this._radius}set radius(q){q>0?(this._radius=q,this._diameter=2*q):rt.V.log(`Circle radius must be greater than 0. You provided: ${q}`,at.$.Warning)}constructor(q=0,K=0,z=0){this._diameter=0,this._radius=0,this.setTo(q,K,z)}get circumference(){return Math.PI*this._radius*2}circumferencePoint(q,K=!1,z=new ee.I){return K&&(q=qt.c.degToRad(q)),z.x=this.x+this.radius*Math.cos(q),z.y=this.y+this.radius*Math.sin(q),z}getBounds(){return new Kt.M(this.x-this.radius,this.y-this.radius,this.diameter,this.diameter)}setTo(q,K,z){return this.x=q,this.y=K,this.diameter=z,this}}var se,ne,ae=z(13409),re=z(99414),oe=z(39688);z(66032),z(16883);!function(q){q[q.NORMAL=0]="NORMAL",q[q.ADD=1]="ADD",q[q.MULTIPLY=2]="MULTIPLY",q[q.SCREEN=3]="SCREEN",q[q.OVERLAY=4]="OVERLAY",q[q.DARKEN=5]="DARKEN",q[q.LIGHTEN=6]="LIGHTEN",q[q.COLOR_DODGE=7]="COLOR_DODGE",q[q.COLOR_BURN=8]="COLOR_BURN",q[q.HARD_LIGHT=9]="HARD_LIGHT",q[q.SOFT_LIGHT=10]="SOFT_LIGHT",q[q.DIFFERENCE=11]="DIFFERENCE",q[q.EXCLUSION=12]="EXCLUSION",q[q.HUE=13]="HUE",q[q.SATURATION=14]="SATURATION",q[q.COLOR=15]="COLOR",q[q.LUMINOSITY=16]="LUMINOSITY"}(se||(se={})),function(q){q[q.DEFAULT=0]="DEFAULT",q[q.LINEAR=1]="LINEAR",q[q.NEAREST=2]="NEAREST"}(ne||(ne={}));var he=z(16649),ce=z(61806);class de{static DUMMY_METHOD(){}get add(){return ce.W.instance.game.add}get game(){return ce.W.instance.game}get stage(){return ce.W.instance.game.stage}get key(){return this._key}set key(q){this._key=q}init(...q){de.DUMMY_METHOD()}preload(){de.DUMMY_METHOD()}create(){de.DUMMY_METHOD()}update(){de.DUMMY_METHOD()}shutdown(){de.DUMMY_METHOD()}paused(){de.DUMMY_METHOD()}resumed(){de.DUMMY_METHOD()}}z(12033);var le=z(65321),ue=(z(84215),z(42687),z(71392)),fe=z(55366),be=z(42979),pe=z(27780);let ve=class extends tt.u{get onGameObjectActiveChanged(){return this.gameObject.onActiveChanged}get onGameObjectActiveInHierarchyChanged(){return this.gameObject.onActiveInHierarchyChanged}get onGameObjectHierarchyChanged(){return this.gameObject.onHierarchyChanged}get onGameObjectChildAdded(){return this.gameObject.onChildAdded}get onGameObjectChildRemoved(){return this.gameObject.onChildRemoved}get onGameObjectLayerChanged(){return this.gameObject.onLayerChanged}get onGameObjectComponentAdded(){return this.gameObject.onComponentAdded}get onGameObjectComponentRemoved(){return this.gameObject.onComponentRemoved}get onGameObjectComponentAddedToHierarchy(){return this.gameObject.onComponentAddedToHierarchy}get onGameObjectDestroy(){return this.gameObject.onDestroy}};(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("activeChanged"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectActiveChanged",null),(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("activeInHierarchyChanged"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectActiveInHierarchyChanged",null),(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("hierarchyChanged"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectHierarchyChanged",null),(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("childAdded"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectChildAdded",null),(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("childRemoved"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectChildRemoved",null),(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("layerChanged"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectLayerChanged",null),(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("componentAdded"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectComponentAdded",null),(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("componentRemoved"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectComponentRemoved",null),(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("componentAddedToHierarchy"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectComponentAddedToHierarchy",null),(0,Q.Cg)([(0,et.bb)(),(0,et.Lr)(0),(0,et.nK)("destroy"),(0,Q.Sn)("design:type",it.H),(0,Q.Sn)("design:paramtypes",[])],ve.prototype,"onGameObjectDestroy",null),ve=(0,Q.Cg)([(0,X.EV)("GameObjectEvents",X.YH.root,"Provides access to signals dispatched by GameObject")],ve);var ge=z(17400),me=z(57056),ye=z(44716);z(70028),z(8460);const _e=(q,K)=>(z,Y)=>{(0,et.E8)()(z,Y),(0,et.Lr)(K)(z,Y),(0,et.nK)(q)(z,Y)};var Ee=z(82119);const we=(q,K)=>z=>{const Y={ctor:z};K&&(Y.category=K),Ee.l[q]=Y};z(96352);var Te=z(22494);const Se=()=>(q,K)=>{Te.Q.addProperty("custom:annotations:skipMapExport",q.constructor,K)};var Ae=z(43501),Ce=z(30615);class Oe{static getRandomItem(q,K=0,z=0){let Y=z;if(!q)return null;z<1&&(Y=q.length);const Q=K+Math.floor(Math.random()*Y);return void 0===q[Q]?null:q[Q]}}z(89683);var Ie=z(77120)},30615:(q,K,z)=>{"use strict";z.d(K,{C:()=>Y});class Y{get list(){return this._list}set list(q){this.reset(),this._list=q}constructor(q=[]){this._cursor=0,this._list=[],this._list=q}get total(){return this._list.length}get first(){return this._cursor=0,this._list.length>0?this._list[0]:null}get next(){var q;return this._cursorz[q]===K)))&&void 0!==z?z:null}exists(q){return this._list.indexOf(q)>-1}reset(){this._list=[],this._cursor=0}remove(q){const K=this._list.indexOf(q);if(K>-1)return this._list.splice(K,1),q}setAll(q,K){this._list.forEach((z=>{z[q]=K}))}callAll(q,...K){this._list.forEach((z=>{z[q].apply(z,K)}))}removeAll(q=!1){q&&this._list.forEach((q=>{q.destroy()})),this.reset()}}},89683:(q,K,z)=>{"use strict";z.d(K,{G:()=>Y});class Y{static addObject(q){this.enabled&&this.objects.push(q)}static removeObject(q){if(this.enabled){const K=this.objects.indexOf(q);K>=0&&this.objects.splice(K,1)}}static getPropertiesFromObject(q,K){const z={};for(const Q in K)Object.keys(K[Q]).length>0?z[Q]=Y.getPropertiesFromObject(q[Q],K[Q]):q&&null!==q[Q]&&void 0!==q[Q]?z[Q]=q[Q]:z[Q]=K[Q];return z}static getPropertiesFromComponent(q,K){return this.getPropertiesFromObject(q,K)}}Y.enabled=!1,Y.objects=[]},77120:(q,K,z)=>{"use strict";z.d(K,{D:()=>Q});var Y=z(95891);class Q{static get width(){return Math.max(window.innerWidth,document.documentElement.clientWidth)}static get height(){return Math.max(window.innerHeight,document.documentElement.clientHeight)}static get isReady(){return Y.includes(["complete","interactive"],document.readyState)}static addDOMContentLoadedListener(q){document.addEventListener("DOMContentLoaded",q)}static removeDOMContentLoadedListener(q){document.removeEventListener("DOMContentLoaded",q)}static isFullScreen(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}static addToDOM(q,K,z=!0){const Y=null!=K?K:document.body;z&&Y.style&&(Y.style.overflow="hidden"),Y.appendChild(q)}}},81071:(q,K,z)=>{"use strict";z.d(K,{n:()=>J});var Y=z(40794),Q=z(27179),X=z(32469),Z=z(823);class J{static getDefaultsForComponent(q){const K=Y.X[q],z=Reflect.getMetadata(Z.UW,K);if(!z)return{};const J=z.map((q=>Reflect.getMetadata(Z.fY,K,q))),tt=new K,et={};return J.forEach((q=>{var K;const z=null!==(K=q.alias)&&void 0!==K?K:q.property;if(q.type===X.b.Signal)return;let Y;try{Y=q.type!==X.b.Vector||q.isArray||q.isReorderableList?tt[q.property]:new Q.I(tt[q.property].x,tt[q.property].y)}catch(e){switch(q.type){case X.b.Vector:Y={x:0,y:0};break;case X.b.Size:Y={width:0,height:0}}}et[z]=Y})),et}}},26731:(q,K,z)=>{"use strict";z.d(K,{$:()=>Y});class Y{initialize(q,K){this._componentGuid=q,this._editorAPI=K}}},15887:(q,K,z)=>{"use strict";z.d(K,{X:()=>X});var Y,Q=z(32154);!function(q){q[q.Vertical=0]="Vertical",q[q.Horizontal=1]="Horizontal"}(Y||(Y={}));class X{constructor(q,K,z){if(this.nodeSize="auto",this.isContainer=!1,this.title="",this.isCollapsible=!1,this.startCollapsed=!1,this.spacing=0,this.style={},this.type=q,this.elements=K,Q.A.isDefined(z)){if(Q.A.isDefined(z.nodeSize)&&(this.nodeSize=z.nodeSize),Q.A.isDefined(z.isContainer)&&!0===z.isContainer&&(this.isContainer=z.isContainer),z.title&&(this.isContainer=!0,this.title=z.title),Q.A.isDefined(z.isCollapsible)&&!0===z.isCollapsible&&(this.isContainer=!0,this.isCollapsible=z.isCollapsible),Q.A.isDefined(z.startCollapsed)&&!0===z.startCollapsed&&(this.isContainer=!0,this.isCollapsible=!0,this.startCollapsed=z.startCollapsed),Q.A.isDefined(z.isContainer)&&this.isContainer!==z.isContainer)throw new Error("Value for isContainer set to false, but other container options were set.");if(Q.A.isDefined(z.isCollapsible)&&this.isCollapsible!==z.isCollapsible)throw new Error("Value for isCollapsible set to false, but startCollapsed was set to true.");Q.A.isDefined(z.spacing)&&(this.spacing=z.spacing),Q.A.isDefined(z.style)&&(this.style=z.style)}}static createHorizontal(q,K){return new X(Y.Horizontal,q,K)}static createVertical(q,K){return new X(Y.Vertical,q,K)}static createVerticalContainer(q,K){const z=Object.assign(Object.assign({},K),{isContainer:!0});return X.createVertical(q,z)}static createHorizontalContainer(q,K){const z=Object.assign(Object.assign({},K),{isContainer:!0});return X.createHorizontal(q,z)}}},32928:(q,K,z)=>{"use strict";z.d(K,{G:()=>at});var Y=z(15887),Q=z(32357),X=z(1596),Z=z(900),J=z(47681),tt=z(46386),et=z(31042),it=z(56761),st=z(33431),nt=z(76814);class at{static checkboxGroup(q){const K=this.createLabelTerminal(q,"11of12"),z=it.f.create({id:q.id,inputType:"checkbox",inputValue:q.inputValue,onChange:q.onChange,readonly:q.readonly,nodeSize:"1of12"});return Y.X.createHorizontal([K,z])}static numberGroup(q){const K=this.createLabelTerminal(q),z=it.f.create({id:q.id,inputValue:q.inputValue,inputType:"number",inputUpdateMode:q.inputUpdateMode,showDeleteButton:q.showDeleteButton,readonly:q.readonly,onChange:q.onChange});return Y.X.createHorizontal([K,z])}static textGroup(q){const K=this.createLabelTerminal(q),z=it.f.create({id:q.id,inputValue:q.inputValue,inputType:"text",inputUpdateMode:q.inputUpdateMode,showDeleteButton:q.showDeleteButton,readonly:q.readonly,onChange:q.onChange});return Y.X.createHorizontal([K,z])}static colorPickerGroup(q){const K=this.createLabelTerminal(q),z=it.f.create({id:q.id,inputValue:q.inputValue,inputType:"color",inputUpdateMode:q.inputUpdateMode,readonly:q.readonly,onChange:q.onChange});return Y.X.createHorizontal([K,z])}static vectorGroup(q){var K,z,Q,X;const Z=this.createLabelTerminal(q),J=it.f.create({labelValue:"x:",id:null!==(K=q.xKey)&&void 0!==K?K:`${q.id}X`,propertyPath:q.xKey?[q.xKey]:[q.id,"x"],inputValue:null===(z=q.vectorValue)||void 0===z?void 0:z.x,inputType:"number",inputUpdateMode:q.inputUpdateMode,readonly:q.readonly,showDeleteButton:q.showDeleteButton,onChange:q.onChange}),tt=it.f.create({labelValue:"y:",id:null!==(Q=q.yKey)&&void 0!==Q?Q:`${q.id}Y`,propertyPath:q.yKey?[q.yKey]:[q.id,"y"],inputValue:null===(X=q.vectorValue)||void 0===X?void 0:X.y,inputType:"number",inputUpdateMode:q.inputUpdateMode,readonly:q.readonly,showDeleteButton:q.showDeleteButton,onChange:q.onChange});return Y.X.createHorizontal([Z,Y.X.createVertical([J,tt])])}static sizeGroup(q){var K,z,Q,X;const Z=this.createLabelTerminal(q),J=it.f.create({labelValue:"w:",id:null!==(K=q.widthKey)&&void 0!==K?K:`${q.id}W`,propertyPath:q.widthKey?[q.widthKey]:[q.id,"width"],inputValue:null===(z=q.sizeValue)||void 0===z?void 0:z.width,inputType:"number",inputUpdateMode:q.inputUpdateMode,readonly:q.readonly,showDeleteButton:q.showDeleteButton,onChange:q.onChange}),tt=it.f.create({labelValue:"h:",id:null!==(Q=q.heightKey)&&void 0!==Q?Q:`${q.id}H`,propertyPath:q.heightKey?[q.heightKey]:[q.id,"height"],inputValue:null===(X=q.sizeValue)||void 0===X?void 0:X.height,inputType:"number",inputUpdateMode:q.inputUpdateMode,readonly:q.readonly,showDeleteButton:q.showDeleteButton,onChange:q.onChange});return Y.X.createHorizontal([Z,Y.X.createVertical([J,tt])])}static fourDimensionGroup(q){var K,z,Q,X,Z,J,tt,et;const st=this.createLabelTerminal(q),nt=it.f.create({labelValue:`${q.xKey?q.xKey:"X"}:`,id:null!==(K=q.xKey)&&void 0!==K?K:`${q.id}Top`,propertyPath:q.xKey?[q.xKey]:[q.id,"x"],inputValue:null===(z=q.fourInputValue)||void 0===z?void 0:z.top,inputType:"number",inputUpdateMode:q.inputUpdateMode,readonly:q.readonly,showDeleteButton:q.showDeleteButton,onChange:q.onChange}),at=it.f.create({labelValue:`${q.yKey?q.yKey:"Y"}:`,id:null!==(Q=q.yKey)&&void 0!==Q?Q:`${q.id}Bottom`,propertyPath:q.yKey?[q.yKey]:[q.id,"y"],inputValue:null===(X=q.fourInputValue)||void 0===X?void 0:X.bottom,inputType:"number",inputUpdateMode:q.inputUpdateMode,readonly:q.readonly,showDeleteButton:q.showDeleteButton,onChange:q.onChange}),rt=it.f.create({labelValue:`${q.zKey?q.zKey:"Z"}:`,id:null!==(Z=q.zKey)&&void 0!==Z?Z:`${q.id}Right`,propertyPath:q.zKey?[q.zKey]:[q.id,"z"],inputValue:null===(J=q.fourInputValue)||void 0===J?void 0:J.right,inputType:"number",inputUpdateMode:q.inputUpdateMode,readonly:q.readonly,showDeleteButton:q.showDeleteButton,onChange:q.onChange}),ot=it.f.create({labelValue:`${q.wKey?q.wKey:"W"}:`,id:null!==(tt=q.wKey)&&void 0!==tt?tt:`${q.id}Left`,propertyPath:q.wKey?[q.wKey]:[q.id,"w"],inputValue:null===(et=q.fourInputValue)||void 0===et?void 0:et.left,inputType:"number",inputUpdateMode:q.inputUpdateMode,readonly:q.readonly,showDeleteButton:q.showDeleteButton,onChange:q.onChange});return Y.X.createVertical([st,Y.X.createHorizontal([nt,at]),Y.X.createHorizontal([rt,ot])])}static dropdownGroup(q){const K=this.createLabelTerminal(q),z=Z._.create({id:q.id,selectOptions:q.selectOptions,selectValue:q.selectValue,readonly:q.readonly,onChange:q.onChange});return Y.X.createHorizontal([K,z])}static enumGroup(q,K){const z=Object.keys(K).filter((q=>isNaN(q))).map((q=>({label:q,value:K[q]})));return this.dropdownGroup(Object.assign(Object.assign({},q),{selectOptions:z}))}static presetGroup(q){const K=this.createLabelTerminal(q),z=nt.E.create(q);return Y.X.createHorizontal([K,z])}static buttonGroup(q){const K=this.createLabelTerminal(q),z=Q.X.create({id:q.id,buttonText:q.buttonText,buttonIcon:q.buttonIcon,buttonType:q.buttonType,onClick:q.onClick,buttonDisabled:q.buttonDisabled});return Y.X.createHorizontal([K,z])}static componentPickerGroup(q){const K=this.createLabelTerminal(q),z=X.G.create({id:q.id,componentType:q.componentType,componentGuid:q.componentGuid,readonly:q.readonly,onChange:q.onChange});return Y.X.createHorizontal([K,z])}static gameObjectPickerGroup(q){const K=this.createLabelTerminal(q),z=tt.W.create({id:q.id,gameObjectGuid:q.gameObjectGuid,readonly:q.readonly,onChange:q.onChange});return Y.X.createHorizontal([K,z])}static filePickerGroup(q){const K=this.createLabelTerminal(q),z=J.H.create({id:q.id,path:q.path,onChange:q.onChange,allowedExtensions:q.allowedExtensions});return Y.X.createHorizontal([K,z])}static imagePickerGroup(q){const K=this.createLabelTerminal(q),z=et.A.create({id:q.id,guid:q.guid,onChange:q.onChange});return Y.X.createHorizontal([K,z])}static createLabelTerminal(q,K="4of12"){return st.l.create({id:`${q.id}-label`,labelTooltip:q.labelTooltip,labelValue:q.labelValue,labelTextWrap:q.labelTextWrap,nodeSize:K})}}},97573:(q,K,z)=>{"use strict";z.d(K,{H:()=>Q});var Y=z(81071);class Q{constructor(){this.oldType="LegacyTransform",this.newType="RectTransform"}convert(q){const K=Object.assign(Object.assign({},Y.n.getDefaultsForComponent(this.oldType)),{x:0,y:0,relativeX:0,relativeY:0,width:0,height:0,relativeWidth:0,relativeHeight:0,anchorX:0,anchorY:0,scaleX:1,scaleY:1}),z=Object.assign({},q);Object.keys(z).forEach((q=>{void 0===z[q]&&delete z[q]})),"relativeX"in z&&delete z.x,"relativeY"in z&&delete z.y,"relativeWidth"in z&&delete z.width,"relativeHeight"in z&&delete z.height;const Q=Object.assign(Object.assign({},K),z),X=Y.n.getDefaultsForComponent(this.newType);return Object.assign(Object.assign({},X),{localPosition:{x:Q.x,y:Q.y},localRotation:0,localScale:{x:Q.scaleX,y:Q.scaleY},anchorMin:{x:Q.relativeX-Q.relativeWidth*Q.anchorX,y:Q.relativeY-Q.relativeHeight*Q.anchorY},anchorMax:{x:Q.relativeX+Q.relativeWidth*(1-Q.anchorX),y:Q.relativeY+Q.relativeHeight*(1-Q.anchorY)},anchoredPivotOffset:{x:Q.x,y:Q.y},sizeDelta:{width:Q.width,height:Q.height},pivot:{x:Q.anchorX,y:Q.anchorY}})}}},8490:(q,K,z)=>{"use strict";z.d(K,{L:()=>st});var Y=z(26731),Q=z(15887),X=z(32928),Z=z(23664),J=z(5440),tt=z(32357),et=z(97573),it=z(62131);class st extends Y.${handleValueChange(q,K,z,Y){null!==Y&&st.exclusiveMap[z]&&K.modifyComponent(q,{[st.exclusiveMap[z]]:null})}generate(q,K){const z=[];return z.push(X.G.vectorGroup({id:"position",labelValue:"Position",showDeleteButton:!0,vectorValue:{x:q.x,y:q.y},xKey:"x",yKey:"y",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),z.push(Z._.halfBlankLine()),z.push(X.G.vectorGroup({id:"relativePosition",labelValue:"Relative Pos",showDeleteButton:!0,vectorValue:{x:q.relativeX,y:q.relativeY},xKey:"relativeX",yKey:"relativeY",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),z.push(Z._.halfBlankLine()),z.push(X.G.sizeGroup({id:"size",labelValue:"Size",showDeleteButton:!0,sizeValue:{width:q.width,height:q.height},widthKey:"width",heightKey:"height",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),z.push(Z._.halfBlankLine()),z.push(X.G.sizeGroup({id:"relativeSize",labelValue:"Relative Size",showDeleteButton:!0,sizeValue:{width:q.relativeWidth,height:q.relativeHeight},widthKey:"relativeWidth",heightKey:"relativeHeight",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),z.push(Z._.halfBlankLine()),z.push(X.G.vectorGroup({id:"anchor",labelValue:"Anchor",showDeleteButton:!0,vectorValue:{x:q.anchorX,y:q.anchorY},xKey:"anchorX",yKey:"anchorY"})),z.push(Z._.halfBlankLine()),z.push(X.G.vectorGroup({id:"scale",labelValue:"Scale",showDeleteButton:!0,vectorValue:{x:q.scaleX,y:q.scaleY},xKey:"scaleX",yKey:"scaleY"})),this._editorAPI.isFeatureEnabled(it.b.ConvertLegacyTransformButton)&&(z.push(Z._.halfBlankLine()),z.push(tt.X.create({id:"convert-button",buttonText:"Convert to RectTransform",buttonIcon:J.a2.Bolt,buttonType:J.VQ.Highlight,onClick:()=>{this._editorAPI.convertComponent(this._componentGuid,new et.H)}}))),Q.X.createVertical(z)}}st.exclusiveMap={x:"relativeX",y:"relativeY",relativeX:"x",relativeY:"y",width:"relativeWidth",height:"relativeHeight",relativeWidth:"width",relativeHeight:"height"}},140:(q,K,z)=>{"use strict";z.d(K,{I:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){var K;super(q),this.label=q.label,this.arrayType=q.arrayType,this.enumeration=q.enumeration,this.value=q.value,this.isReorderable=null===(K=q.isReorderable)||void 0===K||K,this.insertElementCallbacks=q.insertElementCallbacks,this.onChange=q.onChange,this.getElementInspector=q.getElementInspector}static create(q){return new Q(q)}}},32357:(q,K,z)=>{"use strict";z.d(K,{X:()=>X});var Y=z(5440),Q=z(49860);class X extends Q.A{constructor(q){var K;super(q),this.onClick=q.onClick,this.buttonText=q.buttonText,this.buttonIcon=q.buttonIcon,this.buttonType=q.buttonType,this.disabled=q.buttonDisabled,this.buttonTextWrap=null!==(K=q.buttonTextWrap)&&void 0!==K?K:Y.K3.Wrap,this.tooltip=q.tooltip}static create(q){return new X(q)}}},1596:(q,K,z)=>{"use strict";z.d(K,{G:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){var K,z;super(q),this.componentType="string"==typeof q.componentType?q.componentType:null===(K=q.componentType)||void 0===K?void 0:K.name,this.componentGuid=q.componentGuid,this.readonly=null!==(z=q.readonly)&&void 0!==z&&z,this.onChange=q.onChange}static create(q){return new Q(q)}}},23664:(q,K,z)=>{"use strict";z.d(K,{_:()=>X});var Y=z(5440),Q=z(49860);class X extends Q.A{constructor(q){super(q),this.dividerType=q.dividerType}static line(q=""){return new X({id:q,dividerType:Y.gY.Line})}static blankLine(q=""){return new X({id:q,dividerType:Y.gY.Blank})}static halfBlankLine(q=""){return new X({id:q,dividerType:Y.gY.HalfBlank})}static verticalLine(q=""){return new X({id:q,dividerType:Y.gY.VerticalLine})}static verticalBlank(q=""){return new X({id:q,dividerType:Y.gY.VerticalBlank})}}},900:(q,K,z)=>{"use strict";z.d(K,{_:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){var K;super(q),this.selectOptions=q.selectOptions,this.selectValue=q.selectValue,this.readonly=null!==(K=q.readonly)&&void 0!==K&&K,this.onChange=q.onChange}static create(q){const K=q.selectOptions.length>0&&"string"==typeof q.selectOptions[0]?q.selectOptions.map((q=>({label:q,value:q}))):q.selectOptions;return new Q(Object.assign(Object.assign({},q),{selectOptions:K}))}}},47681:(q,K,z)=>{"use strict";z.d(K,{H:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){super(q),this.path=q.path,this.onChange=q.onChange,this.allowedExtensions=q.allowedExtensions}static create(q){return new Q(q)}}},46386:(q,K,z)=>{"use strict";z.d(K,{W:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){var K;super(q),this.gameObjectGuid=q.gameObjectGuid,this.readonly=null!==(K=q.readonly)&&void 0!==K&&K,this.onChange=q.onChange}static create(q){return new Q(q)}}},31042:(q,K,z)=>{"use strict";z.d(K,{A:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){super(q),this.guid=q.guid,this.onChange=q.onChange}static create(q){return new Q(q)}}},42149:(q,K,z)=>{"use strict";z.d(K,{b:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){super(q),this.message=q.message.replace(/\n/gm," "),this.iconType=q.iconType}static create(q){return new Q(q)}}},56761:(q,K,z)=>{"use strict";z.d(K,{f:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){var K;super(q),this.label=q.labelValue,this.value=q.inputValue,this.type=q.inputType,this.onChange=q.onChange,this.updateMode=q.inputUpdateMode,this.readOnly=q.readonly,this.showDeleteButton=null!==(K=q.showDeleteButton)&&void 0!==K&&K}static create(q){return new Q(q)}}},49860:(q,K,z)=>{"use strict";z.d(K,{A:()=>Y});class Y{constructor(q){var K,z;this.id=q.id,this.nodeSize=null!==(K=q.nodeSize)&&void 0!==K?K:"auto",this.propertyPath=q.propertyPath&&q.propertyPath.length>0?q.propertyPath:[this.id],this.style=null!==(z=q.style)&&void 0!==z?z:{}}static create(q){throw new Error("Implement the create function")}}},33431:(q,K,z)=>{"use strict";z.d(K,{l:()=>X});var Y=z(5440),Q=z(49860);class X extends Q.A{constructor(q){var K,z,Q;super(q),this.labelValue=q.labelValue,this.labelTooltip=null!==(K=q.labelTooltip)&&void 0!==K?K:"",this.labelPosition=null!==(z=q.labelPosition)&&void 0!==z?z:Y.G5.Left,this.labelTextWrap=null!==(Q=q.labelTextWrap)&&void 0!==Q?Q:Y.K3.Wrap}static create(q){return new X(q)}}},76814:(q,K,z)=>{"use strict";z.d(K,{E:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){super(q)}static create(q){return new Q(q)}}},84893:(q,K,z)=>{"use strict";z.d(K,{N:()=>Q});var Y=z(49860);class Q extends Y.A{constructor(q){super(q),this.label=q.label,this.signalValue=q.signalValue,this.componentGUID=q.componentGUID}static create(q){return new Q(q)}}},74786:(q,K,z)=>{"use strict";z.d(K,{Iq:()=>Y.I,X9:()=>Q.X,_L:()=>X._,_6:()=>Z._,Hn:()=>J.H,WV:()=>et.W,bl:()=>it.b,fq:()=>st.f,ly:()=>nt.l,T7:()=>ot,Ny:()=>at.N,IC:()=>rt});var Y=z(140),Q=z(32357),X=(z(1596),z(23664)),Z=z(900),J=z(47681),tt=z(49860);tt.A;var et=z(46386);tt.A;z(31042);var it=z(42149),st=z(56761),nt=z(33431),at=(z(76814),z(84893));class rt extends tt.A{constructor(q){super(q),this.guid=q.guid,this.onChange=q.onChange}static create(q){return new rt(q)}}class ot extends tt.A{constructor(q){super(q),this.guid=q.guid,this.onChange=q.onChange}static create(q){return new ot(q)}}},62131:(q,K,z)=>{"use strict";var Y;z.d(K,{b:()=>Y}),function(q){q.ConvertLegacyTransformButton="convertLegacyTransformButton",q.PreserveWorldPositionOnHierarchyChange="preserveWorldPositionOnHierarchyChange"}(Y||(Y={}))},5440:(q,K,z)=>{"use strict";var Y,Q,X,Z,J,tt,et;z.d(K,{AT:()=>Z,G5:()=>Y,JG:()=>et,K3:()=>Q,VQ:()=>J,a2:()=>tt,gY:()=>X}),function(q){q.Left="left",q.Right="right",q.Center="center"}(Y||(Y={})),function(q){q.None="none",q.Wrap="wrap"}(Q||(Q={})),function(q){q.HalfBlank="halfBlank",q.Blank="blank",q.Line="line",q.VerticalLine="verticalLine",q.VerticalBlank="verticalBlank"}(X||(X={})),function(q){q.Info="info",q.Warning="warning",q.Error="error",q.Verbose="verbose",q.Question="question"}(Z||(Z={})),function(q){q.Default="default",q.Highlight="highlight",q.Danger="danger",q.Prodigy="prodigy"}(J||(J={})),function(q){q.None="none",q.Eraser="eraser",q.Image="image",q.Pencil="pencil",q.Trash="trash",q.Bolt="bolt",q.Gear="gear",q.ArrowUp="arrow-up",q.ArrowDown="arrow-down",q.ArrowLeft="arrow-left",q.ArrowRight="arrow-right",q.Smiley="face-smile",q.FloppyDisk="floppy-disk",q.VolumeOn="volume",q.VolumeOff="volume-xmark",q.EyeOpen="eye",q.EyeClosed="eye-slash",q.Folder="folder",q.Copy="copy",q.Cut="scissors",q.Paste="paste",q.Play="play",q.Pause="pause",q.Stop="stop",q.Rewind="backward",q.FastForward="forward",q.Record="record-vinyl",q.StepForward="forward-step",q.StepBackward="backward-step",q.ArrowPointer="arrow-pointer",q.Add="plus",q.Spinner="spinner"}(tt||(tt={})),function(q){q.OnTheFly="onTheFly",q.Confirm="confirm"}(et||(et={}))},43234:(q,K,z)=>{"use strict";z.d(K,{P:()=>Y,o:()=>X});var Y,Q=z(68910);!function(q){q[q.Add=0]="Add",q[q.Average=1]="Average",q[q.Darken=2]="Darken",q[q.Difference=3]="Difference",q[q.Exclusion=4]="Exclusion",q[q.Lighten=5]="Lighten",q[q.Multiply=6]="Multiply",q[q.Negation=7]="Negation",q[q.Phoenix=8]="Phoenix",q[q.Screen=9]="Screen",q[q.Subtract=10]="Subtract"}(Y||(Y={}));class X extends Q.Filter{get tintIntensity(){return this.uniforms.tintIntensity}set tintIntensity(q){this.uniforms.tintIntensity=q}get alpha(){return this.uniforms.alpha}set alpha(q){this.uniforms.alpha=q}get blend(){return Y[this.uniforms.blend]}set blend(q){this.uniforms.blend=q}get tintColor(){return Q.Color.shared.setValue(this.uniforms.color).toRgbArray()}set tintColor(q){this.uniforms.color=q}constructor(q={}){const K=Object.assign(Object.assign({},X.defaultOptions),q);super(null,X.FRAGMENT_SHADER,{alpha:K.alpha,blend:K.blend,tintIntensity:K.tintIntensity,color:Q.Color.shared.setValue(K.color).toRgbArray()})}}X.defaultOptions={color:111,tintIntensity:0,blend:Y.Multiply,alpha:1},X.FRAGMENT_SHADER="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform vec3 color;\n uniform float alpha;\n uniform float tintIntensity;\n uniform int blend;\n \n void main() {\n // set overall alpha on image first, we can affect children this way.\n vec4 processedColor = texture2D( uSampler, vTextureCoord ) * alpha;\n\n // apply tint\n if(tintIntensity>0.0){\n vec3 a = processedColor.rgb/processedColor.a;\n vec3 b = color;\n\n // blend modes\n if (blend == 0) { // add\n processedColor.rgb = min(a + b, vec3(1.0));\n } else if (blend == 1) { // average\n processedColor.rgb = (a + b) * 0.5;\n } else if (blend == 2) { // darken\n processedColor.rgb = min(a, b);\n } else if (blend == 3) { // difference\n processedColor.rgb = abs(a - b);\n } else if (blend == 4) { // exclusion\n processedColor.rgb = a + b - 2.0 * a * b;\n } else if (blend == 5) { // lighten\n processedColor.rgb = max(a, b);\n } else if (blend == 6) { // multiply\n processedColor.rgb = a * b;\n } else if (blend == 7) { // negation\n processedColor.rgb = vec3(1.0) - abs(vec3(1.0) - a - b);\n } else if (blend == 8) { // phoenix\n processedColor.rgb = min(a, b) - max(a, b) + vec3(1.0);\n } else if (blend == 9) { // screen\n processedColor.rgb = 1.0 - ((1.0 - a) * (1.0 - b));\n } else if (blend == 10) { // subtract\n processedColor.rgb = max(a + b - vec3(1.0), vec3(0.0));\n };\n processedColor.rgb = mix(a, processedColor.rgb, tintIntensity);\n processedColor.rgb*=processedColor.a;\n }\n\n // cleanup\n processedColor = clamp(processedColor, 0.0, 1.0);\n gl_FragColor = processedColor;\n }"},47131:(q,K,z)=>{"use strict";z.d(K,{d:()=>Q});var Y=z(40794);class Q extends Y.u{}},300:(q,K,z)=>{"use strict";z.d(K,{db:()=>at,X2:()=>ot,oW:()=>bt.o,Pz:()=>bt.P});var Y=z(8674),Q=z(68910),X=z(29658),Z=z(823),J=z(47131);let tt=class extends J.d{constructor(){super(...arguments),this.alpha=1}createFilter(){return new Q.filters.AlphaFilter(this.alpha)}};(0,Y.Cg)([(0,Z.g1)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"alpha",void 0),tt=(0,Y.Cg)([(0,X.EV)("AlphaFilter",X.YH.filter,"A component for a alpha filter")],tt);var et=z(61806),it=z(5191),st=z(80267),nt=z(32154);class at{constructor(){this.filters=[]}bake(q){if(!nt.A.isDefined(q))return st.V.log("No Texture provided for BakeStep",it.$.Error),null;if(q.width*q.height==0)return st.V.log("Texture in BakeTexture does not have a proper width or height",it.$.Error),null;at._sprite.texture=q,at._sprite.filters=this.filters,at._sprite.width=q.width,at._sprite.height=q.height,at._sprite.position.set(0,0);const K={width:q.width,height:q.height},z=et.W.instance.game.renderer.generateTexture(at._sprite,Object.assign({region:q.frame},K));return at._sprite.texture=null,at._sprite.filters=null,z}}at._sprite=new Q.Sprite;class rt{constructor(){this.decals=[]}bake(q){rt._sprite.texture=q;for(const z of this.decals)for(const q of z.transforms){const K=new Q.Sprite(z.texture);rt._sprite.addChild(K),K.transform=q}const K=et.W.instance.game.renderer.generateTexture(rt._sprite);for(let z=rt._sprite.children.length-1;z>=0;z--)rt._sprite.children[z].destroy();return rt._sprite.texture=null,K}}rt._sprite=new Q.Sprite;class ot extends Q.Texture{constructor(q,K=[]){super(q.baseTexture,q.frame,q.orig,q.trim,q.rotate,q.defaultAnchor),this.original=this.baseTexture,this.bakeSteps=K,this.bakeSteps.length&&this.bake()}bake(){this.baseTexture=this.original.castToBaseTexture();for(const q of this.bakeSteps)this.baseTexture=q.bake(this).baseTexture}addStep(q){this.bakeSteps.push(q),this.baseTexture=q.bake(this).baseTexture}destroy(q){this.original.dispose(),q&&this.original.destroy(),this.bakeSteps=[],super.destroy(q)}}var ht=z(53924),ct=z(26731),dt=z(15887),lt=z(32928);class ut extends ct.${generate(q,K){const z=lt.G.numberGroup({id:"strength",labelValue:"strength",inputValue:q.strength}),Y=lt.G.numberGroup({id:"quality",labelValue:"quality",inputValue:q.quality}),Q=lt.G.numberGroup({id:"resolution",labelValue:"resolution",inputValue:q.resolution}),X=lt.G.dropdownGroup({id:"kernelSize",labelValue:"kernelSize",selectOptions:[5,7,9,11,13,15].map((q=>({label:q.toString(),value:q}))),selectValue:q.kernelSize});return dt.X.createVertical([z,Y,Q,X])}}let ft=class extends J.d{constructor(){super(...arguments),this.strength=8,this.quality=4,this.resolution=Q.settings.FILTER_RESOLUTION,this.kernelSize=5}createFilter(){return new Q.filters.BlurFilter(this.strength,this.quality,this.resolution,this.kernelSize)}};(0,Y.Cg)([(0,Z.g1)(),(0,Y.Sn)("design:type",Number)],ft.prototype,"strength",void 0),(0,Y.Cg)([(0,Z.g1)(),(0,Y.Sn)("design:type",Number)],ft.prototype,"quality",void 0),(0,Y.Cg)([(0,Z.g1)(),(0,Y.Sn)("design:type",Number)],ft.prototype,"resolution",void 0),(0,Y.Cg)([(0,Z.g1)(),(0,Y.Sn)("design:type",Number)],ft.prototype,"kernelSize",void 0),ft=(0,Y.Cg)([(0,X.EV)("BlurFilter",X.YH.filter,"A component for a blur filter"),(0,ht.W)(ut)],ft);var bt=z(43234);class pt extends Q.Filter{get y(){return this.uniforms.ySample}set y(q){this.uniforms.ySample=q}get LUT(){return this.uniforms.uLUT}set LUT(q){this.uniforms.uLUT=q}constructor(q,K=.5){super(null,pt.fragmentShader,{ySample:K,uLUT:null!=q?q:Q.Texture.WHITE})}}pt.fragmentShader="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform sampler2D uLUT;\n uniform float ySample;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n vec4 l = texture2D( uLUT, vec2(c.r/c.a, ySample) );\n c.rgb = l.rgb;\n c.rgb *= c.a;\n gl_FragColor = c;\n }";var vt=z(37692);let gt=class extends J.d{constructor(){super(...arguments),this.replacementArray=[],this.tolerance=.05,this.maxColors=null}createFilter(){return new vt.N(this.replacementArray,this.tolerance,this.maxColors)}};(0,Y.Cg)([(0,Z.SZ)(),(0,Y.Sn)("design:type",Array)],gt.prototype,"replacementArray",void 0),(0,Y.Cg)([(0,Z.g1)(),(0,Y.Sn)("design:type",Number)],gt.prototype,"tolerance",void 0),(0,Y.Cg)([(0,Z.g1)(),(0,Y.Sn)("design:type",Number)],gt.prototype,"maxColors",void 0),gt=(0,Y.Cg)([(0,X.EV)("ColorReplaceFilter",X.YH.filter)],gt);class mt extends Q.Filter{get y(){return this.uniforms.ySample}set y(q){this.uniforms.ySample=q}get LUT(){return this.uniforms.uLUT}set LUT(q){this.uniforms.uLUT=q}constructor(q,K=.5){super(null,mt.fragmentShader,{ySample:K,uLUT:null!=q?q:Q.Texture.WHITE})}}mt.fragmentShader="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform sampler2D uLUT;\n uniform float ySample;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n c.rgb /= c.a;\n c.r = texture2D( uLUT, vec2(c.r, ySample) ).r;\n c.g = texture2D( uLUT, vec2(c.g, ySample) ).g;\n c.b = texture2D( uLUT, vec2(c.b, ySample) ).b;\n c.rgb *= c.a;\n gl_FragColor = c;\n }";let yt=class extends J.d{constructor(){super(...arguments),this.noise=.5,this.seed=1}createFilter(){return new Q.filters.NoiseFilter(this.noise,this.seed)}};(0,Y.Cg)([(0,Z.g1)(),(0,Y.Sn)("design:type",Number)],yt.prototype,"noise",void 0),(0,Y.Cg)([(0,Z.g1)(),(0,Y.Sn)("design:type",Number)],yt.prototype,"seed",void 0),yt=(0,Y.Cg)([(0,X.EV)("NoiseFilter",X.YH.filter,"A component for a noise filter")],yt)},62459:(q,K,z)=>{"use strict";z.d(K,{rcl:()=>Ze,BKH:()=>os,CLt:()=>rt.CL,IqD:()=>Ve.Iq,lv2:()=>rt.lv,dbg:()=>Ye.db,X2n:()=>Ye.X2,oWr:()=>Ye.oW,dTp:()=>us,jsv:()=>zi.j,OQO:()=>Wt,J6z:()=>rt.J6,a2l:()=>Nt.a2,X9M:()=>Ve.X9,l2R:()=>rt.l2,r05:()=>rt.r0,i7d:()=>rt.i7,YPZ:()=>rt.YP,kBN:()=>ie,jlt:()=>rt.jl,ESH:()=>Do,Q1f:()=>rt.Q1,TZp:()=>Gt,uAl:()=>rt.uA,XFX:()=>rt.XF,AY_:()=>bn,Crq:()=>bs,oDK:()=>rt.oD,mcf:()=>rt.mc,Fid:()=>Mi,$KW:()=>Ot.$,nvu:()=>no,o5U:()=>Kt.o,_Lw:()=>Ve._L,DX_:()=>rt.DX,_6c:()=>Ve._6,iO0:()=>ls,PzZ:()=>Ye.Pz,yQ0:()=>rt.yQ,YH6:()=>rt.YH,Z$z:()=>ms.Z$,dBt:()=>ce,EQV:()=>le,vLr:()=>de,DEw:()=>hs,If$:()=>fe,t5G:()=>nt,ZIW:()=>Wi,$Zn:()=>js,e$E:()=>rt.e$,bJb:()=>ms.bJ,ba$:()=>rt.b,iXQ:()=>_r,KZk:()=>gr,GS3:()=>rt.GS,bTj:()=>rt.bT,RQr:()=>zt.R,sVA:()=>rt.sV,rPI:()=>Ii,zL:()=>Oi,CQn:()=>ui,myN:()=>wr,wvl:()=>It,Hnb:()=>Ve.Hn,wIr:()=>rt.wI,YAt:()=>rt.YA,W$e:()=>rt.W$,Zt2:()=>rt.Zt,$Bt:()=>at,_mx:()=>rt._m,bE_:()=>Pi.b,WzQ:()=>rt.Wz,WVg:()=>Ve.WV,Htv:()=>Yt,mk0:()=>rt.mk,KDe:()=>go,Ff4:()=>Qt,vYh:()=>Oe,JTA:()=>rs,Sz7:()=>ds,wGs:()=>Bn,ATc:()=>Nt.AT,bl1:()=>Ve.bl,s3P:()=>Fi,JTX:()=>Ui,Uoy:()=>Xt.U,Eci:()=>qi,Sjx:()=>rt.Sj,fqe:()=>Ve.fq,JGO:()=>Nt.JG,XRp:()=>Dt.X,PQK:()=>Bi,rrh:()=>Ri.r,AA4:()=>Or,UvC:()=>Cr,XKG:()=>Tr,_A9:()=>Sr,ly:()=>Ve.ly,I6z:()=>Fo.I,PEP:()=>as.P,K16:()=>rt.K1,mZY:()=>mn,Oap:()=>fs,$bb:()=>ct.$,VyI:()=>ht.V,cj9:()=>rt.cj,E1D:()=>Wn.E1,pV3:()=>Gn,iyL:()=>Pr,uFJ:()=>Nr,m$y:()=>xr,wPU:()=>Lr,nbL:()=>io,ibt:()=>kr,d53:()=>Br,s1c:()=>Ur,Ayx:()=>so,Qgu:()=>Gr,ZxM:()=>jr,mYY:()=>$r,CIs:()=>Hr,f84:()=>Vr,Lzo:()=>Wr,hQR:()=>qr,U8B:()=>Xr,l_K:()=>Zr,l28:()=>Fr,okU:()=>eo,KhP:()=>$n,lx6:()=>Mo,C1c:()=>ee.C,Uuu:()=>fn,wNP:()=>co,T7t:()=>Ve.T7,iNH:()=>oo,sG1:()=>un,H12:()=>po,Egh:()=>se,LkC:()=>ms.Lk,bsf:()=>rt.bs,XVE:()=>rt.XV,M_G:()=>rt.M_,Lom:()=>No,y4o:()=>jt.y,bnh:()=>ne.b,v14:()=>re,aSj:()=>ae,pH6:()=>xo,Tyz:()=>yt,ey1:()=>pt,eXg:()=>bt,wa5:()=>ft.w,Mnj:()=>oe,HN0:()=>rt.HN,NyS:()=>Ve.Ny,or0:()=>Wn.or,hQi:()=>Lo,CxD:()=>Yi,V09:()=>Uo,qFr:()=>rt.qF,xTJ:()=>yr,Nj:()=>be.N,v2j:()=>Qr.v,a5k:()=>wo,ICs:()=>Ve.IC,E3R:()=>pe.E,Ee5:()=>vn,uFU:()=>Vt,Phd:()=>xn,i4g:()=>Ms,DXe:()=>vs,tJn:()=>Nn,w4d:()=>ws,Gme:()=>Ut.G,EYj:()=>ve,BSH:()=>ks,gXL:()=>rt.gX,Kfn:()=>rt.Kf,dLy:()=>rt.dL,zFe:()=>Vi,Kak:()=>rt.K,Aq$:()=>ut.A,I9Y:()=>Wn.I9,u1k:()=>Ar,ba9:()=>ti,nKb:()=>ms.nK,Bak:()=>et.B,EVk:()=>rt.EV,s0Z:()=>rt.s0,WR4:()=>rt.WR,i0J:()=>ms.i0,GO0:()=>rt.GO,aw3:()=>rt.aw,xkT:()=>Zt.x,DTs:()=>rt.DT,Cdj:()=>Li,IJn:()=>Ni,vQZ:()=>xi,fFd:()=>ki,lu3:()=>ms.lu,x4W:()=>rt.x4,Og1:()=>rt.Og,Lr6:()=>ms.Lr,okD:()=>ms.ok,Pqz:()=>ms.Pq,SZi:()=>ms.SZ,vkK:()=>ms.vk,iEU:()=>ms.iE,MnK:()=>ms.Mn,gfw:()=>ms.gf,ERr:()=>ms.ER,npj:()=>ms.np,vCS:()=>ms.vC,tW2:()=>ms.tW,Mts:()=>ms.Mt,g11:()=>ms.g1,OmD:()=>ms.Om,g8Q:()=>ms.g8,bbQ:()=>ms.bb,W_S:()=>ms.W_,_Hz:()=>ms._H,Wf4:()=>rt.Wf,V84:()=>qt,YLv:()=>ms.YL,S1F:()=>rt.S1,tfT:()=>ms.tf});var Y={};z.r(Y),z.d(Y,{Decoder:()=>hr,Encoder:()=>rr,PacketType:()=>ar,protocol:()=>nr});var Q,X=z(8674),Z=z(40794),J=z(29658),tt=z(61806),et=z(41444),it=z(823);let st=Q=class extends Z.u{constructor(){super(...arguments),this._sound=null,this._key="",this._startTime=0,this._duration=0,this._playOnAwake=!1,this._stopOnDestroy=!1,this._volume=1,this._loop=!1,this._pausedWhenHidden=!1}set key(q){this._key=q,this.createSound()}get key(){return this._key}set volume(q){this._volume=q}get volume(){return this._volume}set loop(q){this._loop=q}get loop(){return this._loop}get isPlaying(){return!!this._sound&&this._sound.isPlaying}create(){super.create(),this.createSound(),this._playOnAwake&&this.play(),this.handlePauseOnEvent=this.handlePauseOnEvent.bind(this),Q.PAUSE_ON_EVENTS.forEach((q=>{document.addEventListener(q,this.handlePauseOnEvent)}))}handlePauseOnEvent(){var q;document.hidden?(null===(q=this._sound.sound)||void 0===q?void 0:q.paused)||(this._pausedWhenHidden=!0,this._sound.pause()):this._pausedWhenHidden&&(this._pausedWhenHidden=!1,this._sound.resume())}createSound(){this._key&&(this._sound=tt.W.instance.game.sound.add(this._key,this.volume,this.loop))}play(q=null){if(this._sound){let K=null;this._duration>0&&(K="play",this._sound.addMarker(K,this._startTime,this._duration)),this._sound.volume=this.volume,this._sound.loop=this.loop,this._sound.play(K,q)}}pause(){this._sound&&this._sound.pause()}resume(){this._sound&&this._sound.resume()}stop(){this._sound&&this._sound.stop()}destroy(){var q;this._sound&&((null===(q=this._sound.sound)||void 0===q?void 0:q.sprites.play)&&this._sound.removeMarker("play"),this._stopOnDestroy&&this.stop()),this._sound=null,Q.PAUSE_ON_EVENTS.forEach((q=>{document.removeEventListener(q,this.handlePauseOnEvent)})),super.destroy()}};var nt,at;st.PAUSE_ON_EVENTS=["visibilitychange","webkitvisibilitychange","mozvisibilitychange","msvisibilitychange"],(0,X.Cg)([(0,et.B)(),(0,it.W_)(),(0,X.Sn)("design:type",String)],st.prototype,"_key",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],st.prototype,"_startTime",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],st.prototype,"_duration",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],st.prototype,"_playOnAwake",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],st.prototype,"_stopOnDestroy",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],st.prototype,"_volume",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],st.prototype,"_loop",void 0),st=Q=(0,X.Cg)([(0,J.EV)("Sound",J.YH.root,"Lowest level audio component")],st),function(q){q.PrefabService="PrefabService",q.PrefabDataProvider="PrefabDataProvider",q.AssetLoader="AssetLoader",q.FrameWorkManager="FrameWorkManager"}(nt||(nt={})),function(q){q.IFSMController="IFSMController",q.FSMFactories="FSMFactories",q.FSMDataProvider="FSMDataProvider",q.FSMService="FSMService",q.LocalizationData="LocalizationData",q.LocalizationService="LocalizationService",q.LoggerService="LoggerService"}(at||(at={}));var rt=z(86787),ot=z(57056),ht=z(80267),ct=z(5191),dt=z(95891);class lt{constructor(){this._bitFieldArray=[],this._bitLength=0}static fromBase64(q){const K=q.length,z=new lt;z.reserveSize(K*lt.BITS_PER_BASE64_CHAR);let Y=0;for(let Q=0;Q=this._bitLength)&&this.getUnchecked(q)}set(q,K){this.reserveSize(q+1),this.setUnchecked(q,K)}getUnchecked(q){const K=Math.floor(q/lt.BITS_PER_FIELD),z=1<=0?Q:Y.push(K)-1}getBitField(){var q,K;return null!==(q=this._bitField)&&void 0!==q?q:this._bitField=lt.fromBase64(null!==(K=this.baseGetData())&&void 0!==K?K:"")}getBitIndex(q){const K=this._registeredComponents.indexOf(q);return K<0&&ht.V.log(`No component is registered for guid ${q}. Re-saving the prefab may fix this problem.`,ct.$.Error),K}};(0,X.Cg)([(0,ot.D)(),(0,it.SZ)(),(0,it.W_)(),(0,X.Sn)("design:type",Array)],gt.prototype,"_registeredComponents",void 0),gt=(0,X.Cg)([(0,J.EV)("BitFieldSaveData",J.YH.saving,"Reads and writes bits to a datastore using its guid as a key")],gt);let mt=class extends Z.u{setBit(q){this._bitFieldSaveDataComponent.setBit(this._index,q)}getBit(){return this._bitFieldSaveDataComponent.getBit(this._index)}static customSerialize(q,K,z){super.customSerialize(q,K,z);const Y=z.getComponentPropertyValue(q.guid,"bitFieldSaveDataComponent");Y?q.properties.index=gt.registerComponent(z.getNormalizedComponentByGuid(Y),q.guid):ht.V.log("BitFieldBitComponent has no bitFieldSaveDataComponent set.",ct.$.Warning)}};(0,X.Cg)([(0,it.g8)(gt),(0,X.Sn)("design:type",gt)],mt.prototype,"_bitFieldSaveDataComponent",void 0),(0,X.Cg)([(0,ot.D)(),(0,it.g1)(),(0,X.Sn)("design:type",Number)],mt.prototype,"_index",void 0),mt=(0,X.Cg)([(0,J.EV)("BitFieldBit",J.YH.saving,"Represents one bit of the bit field save data")],mt);let yt=class extends vt{setData(q){this.baseSetData(q)}getData(){return this.baseGetData()}};yt=(0,X.Cg)([(0,J.EV)("SaveData",J.YH.saving,"Reads and writes data to a datastore using its guid as a key")],yt);var _t=z(68910),Et=z(57530),wt=z(39002),Tt=z(563),St=z(64527),At=z(27179);class Ct{static drawTransformDirectionVectors(q,K,z={}){const Y=dt.merge(Ct.DEFAULT_TRANSFORM_DIRECTION_VECTOR_STYLE,z),Q=new _t.Matrix;if(Q.copyFrom(q.worldMatrix),Y.drawRightVector){const q=new At.I(Q.a,Q.c);q.normalize(),Ct.drawDirectionVector(new At.I(Q.tx,Q.ty),q,K,Y.rightVectorStyle)}if(Y.drawUpVector){const q=new At.I(Q.b,Q.d);q.normalize(),Ct.drawDirectionVector(new At.I(Q.tx,Q.ty),q,K,Y.upVectorStyle)}}static drawDirectionVector(q,K,z,Y={}){const Q=dt.merge(Ct.DEFAULT_DIRECTION_VECTOR_STYLE,Y);Ct.drawArrow(new At.I(q.x+K.x*(Y.arrowHeightPx+Y.bodyHeightPx),q.y+K.y*(Y.arrowHeightPx+Y.bodyHeightPx)),wt.c.radiansToDegrees(Math.atan2(K.y,K.x)),z,Q)}static drawTransformAnchor(q,K,z={}){const Y=dt.merge(Ct.DEFAULT_TRANSFORM_ANCHOR_STYLE,z),Q=this.calculateTransformPosition(q);"square"===Y.shapeType&&(Q.x-=.5*Y.shape.sizePx,Q.y-=.5*Y.shape.sizePx),K.beginFill(Y.shape.fill.color,Y.shape.fill.alpha),"circle"===Y.shapeType?K.drawCircle(Q.x,Q.y,Y.shape.sizePx):K.drawRect(Q.x,Q.y,Y.shape.sizePx,Y.shape.sizePx),K.endFill(),Y.shape.outline&&Y.shape.outline.thicknessPx>0&&(K.lineStyle(Y.shape.outline.thicknessPx,Y.shape.outline.color,Y.shape.outline.alpha),"circle"===Y.shapeType?K.drawCircle(Q.x,Q.y,Y.shape.sizePx):K.drawRect(Q.x,Q.y,Y.shape.sizePx,Y.shape.sizePx),K.lineStyle(0))}static calculateTransformPosition(q,K=!0){const z=new _t.Matrix;return z.copyFrom(q.worldMatrix),K&&Et.i.main&&z.prepend(Et.i.main.viewMatrix),new At.I(z.tx,z.ty)}static drawRectTransformOutline(q,K,z={},Y=!0){const Q=dt.merge(Ct.DEFAULT_RECT_TRANSFORM_OUTLINE_STYLE,z),X=this.calculateRectTransformCorners(q,Y);K.lineStyle(Q.thicknessPx,Q.color,Q.alpha),K.moveTo(X[0].x,X[0].y),K.lineTo(X[1].x,X[1].y),K.lineTo(X[2].x,X[2].y),K.lineTo(X[3].x,X[3].y),K.lineTo(X[0].x,X[0].y),K.lineStyle(0)}static drawRectTransformCorners(q,K,z={},Y=!0){const Q=dt.merge(Ct.DEFAULT_RECT_TRANSFORM_OUTLINE_STYLE,z),X=this.calculateRectTransformCorners(q,Y);this.drawArrow(X[0],45,K,{fill:Q},Y),this.drawArrow(X[1],135,K,{fill:Q},Y),this.drawArrow(X[2],225,K,{fill:Q},Y),this.drawArrow(X[3],315,K,{fill:Q},Y)}static calculateRectTransformCorners(q,K=!0){const z=q.rectTransformDimensions,Y=[new _t.Point(-z.width*q.pivot.x,-z.height*q.pivot.y),new _t.Point(z.width*(1-q.pivot.x),-z.height*q.pivot.y),new _t.Point(z.width*(1-q.pivot.x),z.height*(1-q.pivot.y)),new _t.Point(-z.width*q.pivot.x,z.height*(1-q.pivot.y))],Q=new _t.Matrix;Q.copyFrom(q.worldMatrix),K&&Et.i.main&&Q.prepend(Et.i.main.viewMatrix);for(let X=0;X<4;++X)Y[X]=Q.apply(Y[X]);return Y}static drawRectTransformAnchors(q,K,z={},Y=!0){const Q=dt.merge(Ct.DEFAULT_TRIANGLE_STYLE,{widthPx:8,heightPx:18},z);let X=St.o.ZERO,Z=0;const J=new _t.Matrix;q.GameObject.parent&&q.GameObject.parent.transform&&(q.GameObject.parent.transform instanceof Tt.X&&(X=q.GameObject.parent.transform.rectTransformDimensions),Z=Math.atan2(q.GameObject.parent.transform.worldMatrix.b,q.GameObject.parent.transform.worldMatrix.d)*(180/Math.PI),J.copyFrom(q.GameObject.parent.transform.worldMatrix));const tt=new St.o(X.width*(q.anchorMax.x-q.anchorMin.x),X.height*(q.anchorMax.y-q.anchorMin.y)),et=new At.I(q.localMatrix.tx-tt.width*q.pivot.x,q.localMatrix.ty-tt.height*q.pivot.y),it=new At.I(q.localMatrix.tx+tt.width*(1-q.pivot.x),q.localMatrix.ty+tt.height*(1-q.pivot.y));it.x-=q.localPosition.x,it.y-=q.localPosition.y,et.x-=q.localPosition.x,et.y-=q.localPosition.y,Ct.drawTriangle(J.apply(new At.I(it.x,it.y)),Z-50,K,Q,Y),Ct.drawTriangle(J.apply(new At.I(et.x,it.y)),Z+50,K,Q,Y),Ct.drawTriangle(J.apply(new At.I(it.x,et.y)),Z-130,K,Q,Y),Ct.drawTriangle(J.apply(new At.I(et.x,et.y)),Z+130,K,Q,Y)}static drawArrow(q,K,z,Y={},Q=!0){const X=dt.merge(Ct.DEFAULT_ARROW_STYLE,Y),Z=[new _t.Point(0,0),new _t.Point(-X.arrowHeightPx,.5*X.arrowWidthPx),new _t.Point(-X.arrowHeightPx,-.5*X.arrowWidthPx),new _t.Point(-X.arrowHeightPx,-.5*X.bodyWidthPx),new _t.Point(-X.arrowHeightPx,.5*X.bodyWidthPx),new _t.Point(-X.arrowHeightPx-X.bodyHeightPx,-.5*X.bodyWidthPx),new _t.Point(-X.arrowHeightPx-X.bodyHeightPx,.5*X.bodyWidthPx)],J=new _t.Matrix;J.rotate(wt.c.degreesToRadians(K)),J.translate(q.x,q.y),Q&&Et.i.main&&J.prepend(Et.i.main.viewMatrix);const tt=Z.length;for(let et=0;et0&&(z.lineStyle(Y.outline.thicknessPx,Y.outline.color,Y.outline.alpha),z.drawPolygon([...J,new _t.Point(Z.x,Z.y)]),z.lineStyle(0))}}Ct.DEFAULT_TRANSFORM_ANCHOR_STYLE={shapeType:"circle",shape:{sizePx:20,fill:{color:16777215,alpha:.4},outline:{color:16777215,alpha:1,thicknessPx:2}}},Ct.DEFAULT_ARROW_STYLE={fill:{color:16777215,alpha:1},arrowWidthPx:20,arrowHeightPx:10,bodyHeightPx:30,bodyWidthPx:5},Ct.DEFAULT_TRANSFORM_DIRECTION_VECTOR_STYLE={drawRightVector:!0,rightVectorStyle:{fill:{color:16711680,alpha:1},arrowWidthPx:15,arrowHeightPx:10,bodyWidthPx:5,bodyHeightPx:30},drawUpVector:!0,upVectorStyle:{fill:{color:65280,alpha:1},arrowWidthPx:15,arrowHeightPx:10,bodyWidthPx:5,bodyHeightPx:30}},Ct.DEFAULT_DIRECTION_VECTOR_STYLE={arrowWidthPx:15,arrowHeightPx:10,bodyWidthPx:5,bodyHeightPx:30,fill:{color:16777215,alpha:1}},Ct.DEFAULT_RECT_TRANSFORM_OUTLINE_STYLE={thicknessPx:2,color:16777215,alpha:1},Ct.DEFAULT_TRIANGLE_STYLE={fill:{color:16777215,alpha:1},outline:null,widthPx:15,heightPx:20};z(81071),z(97573);var Ot=z(26731);class It{initialize(q,K){this._fileGuid=q,this._editorAPI=K}}var Dt=z(15887),Rt=z(53924),Pt=z(32357),Mt=z(56761),Nt=z(5440);class xt extends Ot.${generate(q,K){const z=[];return z.push(this.generateGrid(4,3)),z.push(this.generateStaggeredRows()),z.push(this.generateStaggeredGrid()),Dt.X.createVertical(z)}generateGrid(q,K){const z=[];for(let Y=0;Y0?Q.push(Ut.G.dropdownGroup({id:"font",labelValue:"Font",selectValue:q.font,selectOptions:X})):Q.push(Ut.G.enumGroup({id:"font",labelValue:"Font",selectValue:q.font},ce)),Q.push(Ut.G.enumGroup({id:"fontStyle",labelValue:"Style",selectValue:q.fontStyle},le)),Q.push(Ut.G.enumGroup({id:"fontWeight",labelValue:"Weight",selectValue:q.fontWeight},de)),Q.push(Ut.G.textGroup({id:"fontSize",inputValue:q.fontSize>0?`${q.fontSize}`:"",labelValue:"Size",onChange:(q,K)=>{let z=parseInt(K);(isNaN(z)||z<0)&&(z=0),this._editorAPI.modifyComponent(this._componentGuid,{fontSize:z})}})),Y.push(Dt.X.createVertical(Q,{isContainer:!0,title:`Font '${q.font}' (${q.fontSize})`,isCollapsible:!0}));const Z=[];if(Z.push(Ut.G.checkboxGroup({id:"smooth",labelValue:"Smooth",inputValue:q.smooth,labelTooltip:"When true, sets scale mode to linear. Reduces pixelation but can cause blurriness."})),Z.push(Ut.G.checkboxGroup({id:"roundPixels",labelValue:"Round Pixels",inputValue:q.roundPixels,labelTooltip:"When true, rounds the pixel values when rendering."})),Z.push(Ut.G.enumGroup({id:"blendMode",labelValue:"Blend Mode",selectValue:q.blendMode},_t.BLEND_MODES)),Z.push(Ut.G.colorPickerGroup({id:"tint",labelValue:"Tint",inputValue:q.tint})),Z.push(Ut.G.numberGroup({id:"strokeThickness",labelValue:"Stroke Thickness",inputValue:q.strokeThickness})),q.strokeThickness>0&&Z.push(Ut.G.colorPickerGroup({id:"stroke",labelValue:"Stoke Color",inputValue:q.stroke})),Z.push(Ut.G.checkboxGroup({id:"underline",labelValue:"Underline",inputValue:q.underline})),q.underline){const K=[];K.push(Ut.G.numberGroup({id:"underlineStartIndex",labelValue:"Start Index",inputValue:q.underlineStartIndex})),K.push(Ut.G.numberGroup({id:"underlineEndIndex",labelValue:"End Index",inputValue:q.underlineEndIndex})),Z.push(Dt.X.createVertical(K,{isContainer:!0}))}if(Z.push(Ut.G.checkboxGroup({id:"dropShadow",labelValue:"Drop Shadow",inputValue:q.dropShadow})),q.dropShadow){const K=[];K.push(Ut.G.numberGroup({id:"dropShadowAlpha",labelValue:"Alpha",inputValue:q.dropShadowAlpha})),K.push(Ut.G.numberGroup({id:"dropShadowAngle",labelValue:"Angle",inputValue:q.dropShadowAngle})),K.push(Ut.G.colorPickerGroup({id:"dropShadowColor",labelValue:"Color",inputValue:q.dropShadowColor})),K.push(Ut.G.numberGroup({id:"dropShadowBlur",labelValue:"Blur",inputValue:q.dropShadowBlur})),K.push(Ut.G.numberGroup({id:"dropShadowDistance",labelValue:"Distance",inputValue:q.dropShadowDistance})),K.push(Ut.G.numberGroup({id:"dropShadowPadding",labelValue:"Padding",inputValue:q.dropShadowPadding})),Z.push(Dt.X.createVertical(K,{isContainer:!0}))}Y.push(Dt.X.createVertical(Z,{isContainer:!0,title:"Effects",isCollapsible:!0,startCollapsed:!1}));const J=[];if(q.scaleToFitRectTransform||J.push(Ut.G.checkboxGroup({id:"resizeRectTransform",labelValue:"Resize RectTransform",inputValue:q.resizeRectTransform})),q.resizeRectTransform||q.textOverflow&&q.textOverflowUseRectTransformSize||J.push(Ut.G.checkboxGroup({id:"scaleToFitRectTransform",labelValue:"Scale To Fit RectTransform",inputValue:q.scaleToFitRectTransform})),q.scaleToFitRectTransform||(J.push(Ut.G.checkboxGroup({id:"textOverflow",labelValue:"Text Overflow",inputValue:q.textOverflow})),q.textOverflow&&(J.push(Ut.G.checkboxGroup({id:"textOverflowUseRectTransformSize",labelValue:"Use RectTransform Size",inputValue:q.textOverflowUseRectTransformSize})),q.textOverflowUseRectTransformSize||J.push(Ut.G.numberGroup({id:"textOverflowWidth",labelValue:"Overflow Width",inputValue:q.textOverflowWidth})))),J.push(Ut.G.checkboxGroup({id:"wordWrap",labelValue:"Word Wrap",inputValue:q.wordWrap})),q.wordWrap){const K=[];K.push(Ut.G.checkboxGroup({id:"wrapToRectTransformWidth",labelValue:"Wrap To RectTransform Width",inputValue:q.wrapToRectTransformWidth})),q.wrapToRectTransformWidth||K.push(Ut.G.numberGroup({id:"wordWrapWidth",labelValue:"Width",inputValue:q.wordWrapWidth})),J.push(Dt.X.createVertical(K,{isContainer:!0}))}return J.push(Ut.G.numberGroup({id:"lineSpacing",labelValue:"Line Spacing",inputValue:q.lineSpacing})),J.push(Ut.G.enumGroup({id:"align",labelValue:"Align",selectValue:q.align},fe)),J.push(Ut.G.enumGroup({id:"boundsAlignH",labelValue:"Bounds Align H",selectValue:q.boundsAlignH},fe)),J.push(Ut.G.enumGroup({id:"boundsAlignV",labelValue:"Bounds Align V",selectValue:q.boundsAlignV},ue)),J.push(Ut.G.vectorGroup({id:"padding",labelValue:"Padding",vectorValue:{x:q.paddingX,y:q.paddingY},xKey:"paddingX",yKey:"paddingY"})),Y.push(Dt.X.createVertical(J,{isContainer:!0,title:"Layout",isCollapsible:!0,startCollapsed:!1})),z.push(Dt.X.createVertical(Y,{isContainer:!0,title:"Advanced",isCollapsible:!0,startCollapsed:!0})),Dt.X.createVertical(z)}}class Gt{static validateHTMLHexColor(q,K="#",z=!1){return new RegExp(`^${K}[A-Fa-f0-9]{6}${z?"|[A-Fa-f0-9]{8}":""}$`).test(q)}static decimalToHex(q,K="#",z=!1){return`${K}${q.toString(16).padStart(z?8:6,"0")}`}static hexToDecimal(q,K="#"){return parseInt(q.replace(K,""),16)}static rgbToHsv(q){const K=q.r/255,z=q.g/255,Y=q.b/255,Q=Math.max(K,z,Y),X=Q-Math.min(K,z,Y);return 0===X?{h:0,s:0,v:Q}:Q===K?{h:(z-Y)/X%6/6,s:X/Q,v:Q}:Q===z?{h:((Y-K)/X+2)/6,s:X/Q,v:Q}:{h:((K-z)/X+4)/6,s:X/Q,v:Q}}static hsvToRgb(q){const K=6*q.h;let z;z=K<0?K%6+6:K%6;const Y=z-Math.floor(z),Q=q.v*(1-q.s),X=q.v*(1-Y*q.s),Z=q.v*(1-(1-Y)*q.s);let J;return J=z<1?{r:q.v,g:Z,b:Q}:z<2?{r:X,g:q.v,b:Q}:z<3?{r:Q,g:q.v,b:Z}:z<4?{r:Q,g:X,b:q.v}:z<5?{r:Z,g:Q,b:q.v}:{r:q.v,g:Q,b:X},J.r=255*J.r|0,J.g=255*J.g|0,J.b=255*J.b|0,J}static rgbToXyz(q){let K=q.r/255,z=q.g/255,Y=q.b/255;K=K>.04045?Math.pow((K+.055)/1.055,2.4):K/12.92,z=z>.04045?Math.pow((z+.055)/1.055,2.4):z/12.92,Y=Y>.04045?Math.pow((Y+.055)/1.055,2.4):Y/12.92;return{x:.49*K+.31*z+.2*Y,y:.176*K+.812*z+.01*Y,z:0*K+.01*z+.99*Y}}static xyzToRgb(q){const K=q.x,z=q.y,Y=q.z;let Q=2.364*K-.896*z-.468*Y,X=-.515*K+1.426*z+.088*Y,Z=.005*K-.014*z+1.009*Y;return Q=Q>.0031308?1.055*Math.pow(Q,1/2.4)-.055:12.92*Q,X=X>.0031308?1.055*Math.pow(X,1/2.4)-.055:12.92*X,Z=Z>.0031308?1.055*Math.pow(Z,1/2.4)-.055:12.92*Z,Q=Math.min(Math.max(255*Q|0,0),255),X=Math.min(Math.max(255*X|0,0),255),Z=Math.min(Math.max(255*Z|0,0),255),{r:Q,g:X,b:Z}}static xyzToLab(q){const K=q=>q>.008856?Math.cbrt(q):(903.3*q+16)/116;return{l:116*K(q.y/100)-16,a:500*(K(q.x/95.0489)-K(q.y/100)),b:200*(K(q.y/100)-K(q.z/108.884))}}static labToXyz(q){const K=6/29,z=q=>q>K?q*q*q:3*K*K*(q-4/29);return{x:95.0489*z((q.l+16)/116+q.a/500),y:100*z((q.l+16)/116),z:108.884*z((q.l+16)/116-q.b/200)}}static labToLch(q){return{l:q.l,c:Math.sqrt(q.a*q.a+q.b*q.b),h:Math.atan2(q.b,q.a)}}static lchToLab(q){return{l:q.l,a:q.c*Math.cos(q.h),b:q.c*Math.sin(q.h)}}static rgbToLch(q){return Gt.labToLch(Gt.xyzToLab(Gt.rgbToXyz(q)))}static lchToRgb(q){return Gt.xyzToRgb(Gt.labToXyz(Gt.lchToLab(q)))}static rgbInterpolate(q,K,z){return{r:q.r+(K.r-q.r)*z,g:q.g+(K.g-q.g)*z,b:q.b+(K.b-q.b)*z}}static circularInterpolate(q,K,z){let Y,Q=q,X=K,Z=z,J=X-Q;if(Q>X){const q=X;X=Q,Q=q,J=-J,Z=1-Z}return J>.5?(Q+=1,Y=(Q+Z*(X-Q))%1):Y=Q+Z*J,Y}static hsvInterpolate(q,K,z){const Y=Gt.rgbToHsv(q),Q=Gt.rgbToHsv(K),X=this.circularInterpolate(Y.h,Q.h,z),Z=Y.s+z*(Q.s-Y.s),J=Y.v+z*(Q.v-Y.v);return Gt.hsvToRgb({h:X,s:Z,v:J})}static lchInterpolate(q,K,z){const Y=Gt.rgbToLch(q),Q=Gt.rgbToLch(K),X=this.circularInterpolate(Y.h,Q.h,z),Z=Y.c+z*(Q.c-Y.c),J=Y.l+z*(Q.l-Y.l);return Gt.lchToRgb({l:J,c:Z,h:X})}static stringToRgb(q){const K=q.replace(/^#/,"");return{r:parseInt(K.substring(0,2),16)/255,g:parseInt(K.substring(2,4),16)/255,b:parseInt(K.substring(4,6),16)/255}}static rgbToNumber(q){return(q.r<<16)+(q.g<<8)+q.b}}var jt=z(4697),$t=z(15740);class Ht{constructor(){this.onTextChanged=new $t.H}get OnTextChanged(){return this.onTextChanged}cleanUp(){this.onTextChanged.dispose()}}class Vt extends Ht{constructor(q){super(),this.source=null,this.setText(q)}getText(){return this.source}setText(q){this.source=q,this.OnTextChanged.dispatch(this,q)}}class Wt{static areBitsSet(q,K){return(q&K)===K}static isBitSet(q,K){return Wt.areBitsSet(q,1<{}}var Kt=z(22070),zt=z(62481);class Yt{static getWidth(q){if(q.legacyTransform)return q.legacyTransform.width;if(q.transform){const K=q.transform;if(K instanceof Tt.X)return K.rectTransformDimensions.width}return 0}static getHeight(q){if(q.legacyTransform)return q.legacyTransform.height;if(q.transform){const K=q.transform;if(K instanceof Tt.X)return K.rectTransformDimensions.height}return 0}}class Qt{static completeGenerator(q){let K;do{K=q.next()}while(!K.done);return K.value}static completeGeneratorAsync(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){if(K)return Qt.processGeneratorStepFrameWorkManager(q,K);let z;do{z=q.next()}while(!z.done);return z.value}))}static processGeneratorStepFrameWorkManager(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){return new Promise(((z,Y)=>{K.awaitFreeTime((()=>{const K=q.next();return K.done&&z(K.value),K.done}),Y)}))}))}}var Xt=z(78178),Zt=z(22494),Jt=z(32469),te=z(6e4);var ee=z(71082);class ie{get promise(){return this._promise}get[Symbol.toStringTag](){return"CancelablePromise"}get cancelled(){return this._cancelled}constructor(q){this._cancelled=!1,this._promise=new Promise(q)}cancel(){this._cancelled=!0}then(q,K){return this._promise.then((K=>{if(!this._cancelled)return null==q?void 0:q(K)}),(q=>{if(!this._cancelled)return null==K?void 0:K(q)})),this}catch(q){return this._promise.catch((K=>{if(!this._cancelled)return null==q?void 0:q(K)})),this}}class se{static timeout(q){return(0,X.sH)(this,void 0,void 0,(function*(){return new Promise((K=>{window.setTimeout(K,q)}))}))}static cancelableTimeout(q){return new ie((K=>{window.setTimeout(K,q)}))}static autoRetry(q){return(0,X.sH)(this,arguments,void 0,(function*(q,K=3,z=100){let Y=z;for(let X=0;XK.size?K:q,Q=q.size>K.size?q:K;for(const X of Y)Q.has(X)&&z.add(X);return z}static getSymmetricDifference(q,K){const z=q.size>K.size?K:q,Y=q.size>K.size?q:K,Q=new Set(Y);for(const X of z)Q.has(X)?Q.delete(X):Q.add(X);return Q}static isSuperset(q,K){for(const z of K)if(!q.has(z))return!1;return!0}static getDifference(q,K){const z=new Set(q);for(const Y of K)z.delete(Y);return z}static addAll(q,K){if(ut.A.isDefined(K))for(const z of K)this.addEntry(q,z)}static addEntry(q,K){ut.A.isDefined(K)&&q.add(K)}}var he,ce,de,le,ue,fe,be=z(21695),pe=(z(22300),z(548));!function(q){q.ABeeZee="ABeeZee",q.LuckiestGuy="Luckiest Guy",q.FredokaOne="Fredoka One",q.PaytoneOne="Paytone One"}(ce||(ce={})),function(q){q.Normal="normal",q.Lighter="lighter",q.Bold="bold",q.Bolder="bolder"}(de||(de={})),function(q){q.Normal="normal",q.Italic="italic",q.Oblique="oblique"}(le||(le={})),function(q){q.Bottom="bottom",q.Middle="middle",q.Top="top"}(ue||(ue={})),function(q){q.Left="left",q.Center="center",q.Right="right"}(fe||(fe={}));let ve=he=class extends jt.y{get TextObject(){return this.createTextObject(),this.textObject}set Source(q){this.isCreated?(null!==this.textSource&&this.textSource.OnTextChanged.removeAll(this),this.textSource=q,this.textSource.OnTextChanged.add(this.updateText,this),this.updateText()):this._preCreateCacheValues.text=q}get Source(){if(!this.isCreated){const q=this._preCreateCacheValues.text;return q&&q instanceof Ht?q:null}return this.textSource}set text(q){this.isCreated?this.Source instanceof Vt&&this.Source.getText()===q||(this.Source=new Vt(this.localize(q))):this._preCreateCacheValues.text=q}get text(){if(!this.isCreated){const q=this._preCreateCacheValues.text;return q?q instanceof Ht?q.getText():q:""}return this.TextObject.text}set font(q){this.isCreated?(this.textObject.style.fontFamily=q,this.handleTextOverflow()):this._preCreateCacheValues.fontFamily=q}get font(){var q;return this.isCreated?this.textObject.style.fontFamily:null!==(q=this._preCreateCacheValues.fontFamily)&&void 0!==q?q:""}set fontStyle(q){this.isCreated?(this.setInternalFontStyle(q),this.handleTextOverflow()):this._preCreateCacheValues.fontStyle=q}get fontStyle(){var q;return this.isCreated?this.TextObject.style.fontStyle:null!==(q=this._preCreateCacheValues.fontStyle)&&void 0!==q?q:le.Normal}setInternalFontStyle(q){const K=""===q?le.Normal:q;switch(K){case le.Normal:case le.Italic:case le.Oblique:this.textObject.style.fontStyle=K;break;default:ht.V.log(`Font style '${K}' is not valid.`,ct.$.Warning)}}set fontWeight(q){this.isCreated?(this.setInternalFontWeight(q),this.handleTextOverflow()):this._preCreateCacheValues.fontWeight=q}get fontWeight(){var q;return this.isCreated?this.TextObject.style.fontWeight:null!==(q=this._preCreateCacheValues.fontWeight)&&void 0!==q?q:de.Normal}setInternalFontWeight(q){switch(q){case de.Normal:case de.Lighter:case de.Bold:case de.Bolder:this.textObject.style.fontWeight=q;break;default:ht.V.log(`Font weight '${q}' is not valid.`,ct.$.Warning)}}get fontSize(){var q;return this.isCreated?this._fontSize:null!==(q=this._preCreateCacheValues.fontSize)&&void 0!==q?q:1}set fontSize(q){this.isCreated?(this._fontSize=q,this.updateTextSize()):this._preCreateCacheValues.fontSize=q}set textObjectFontSize(q){this.isCreated?(this.setInternalTextObjectFontSize(q),this.handleTextOverflow()):this._preCreateCacheValues.fontSize=q}get textObjectFontSize(){var q;return this.isCreated?this.TextObject.style.fontSize:null!==(q=this._preCreateCacheValues.fontSize)&&void 0!==q?q:1}setInternalTextObjectFontSize(q){this.textObject.style.fontSize=q>0?q:1}set fill(q){this.isCreated?this.isValidColor(q)&&(this.textObject.style.fill=q):this._preCreateCacheValues.fill=q}get fill(){var q;return this.isCreated?this.TextObject.style.fill:null!==(q=this._preCreateCacheValues.fill)&&void 0!==q?q:""}set align(q){this.isCreated?this.textObject.style.align=q:this._preCreateCacheValues.align=q}get align(){var q;return this.isCreated?this.TextObject.style.align:null!==(q=this._preCreateCacheValues.align)&&void 0!==q?q:fe.Center}set boundsAlignH(q){this.isCreated?(this._boundsAlignH=q,this.applyTextPivot()):this._preCreateCacheValues.boundsAlignH=q}get boundsAlignH(){var q;return this.isCreated?this._boundsAlignH:null!==(q=this._preCreateCacheValues.boundsAlignH)&&void 0!==q?q:fe.Center}set boundsAlignV(q){this.isCreated?(this._boundsAlignV=q,this.applyTextPivot()):this._preCreateCacheValues.boundsAlignV=q}get boundsAlignV(){var q;return this.isCreated?this._boundsAlignV:null!==(q=this._preCreateCacheValues.boundsAlignV)&&void 0!==q?q:ue.Middle}set stroke(q){this.isCreated?this.isValidColor(q)&&(this.textObject.style.stroke=q):this._preCreateCacheValues.stroke=q}get stroke(){var q;return this.isCreated?this.TextObject.style.stroke:null!==(q=this._preCreateCacheValues.stroke)&&void 0!==q?q:""}set strokeThickness(q){this.isCreated?this.textObject.style.strokeThickness=q:this._preCreateCacheValues.strokeThickness=q}get strokeThickness(){var q;return this.isCreated?this.TextObject.style.strokeThickness:null!==(q=this._preCreateCacheValues.strokeThickness)&&void 0!==q?q:0}set wordWrap(q){this.isCreated?this.textObject.style.wordWrap=q:this._preCreateCacheValues.wordWrap=q}get wordWrap(){var q;return this.isCreated?this.TextObject.style.wordWrap:null!==(q=this._preCreateCacheValues.wordWrap)&&void 0!==q&&q}set wordWrapWidth(q){this.isCreated?this.textObject.style.wordWrapWidth=q:this._preCreateCacheValues.wordWrapWidth=q}get wordWrapWidth(){var q;return this.isCreated?this.TextObject.style.wordWrapWidth:null!==(q=this._preCreateCacheValues.wordWrapWidth)&&void 0!==q?q:0}set wrapToRectTransformWidth(q){this.isCreated?(this._wrapToRectTransformWidth=q,this.updateWrapToRectTransform()):this._preCreateCacheValues.wrapToRectTransformWidth=q}get wrapToRectTransformWidth(){var q;return this.isCreated?this._wrapToRectTransformWidth:null!==(q=this._preCreateCacheValues.wrapToRectTransformWidth)&&void 0!==q&&q}set blendMode(q){this.isCreated?this.TextObject.blendMode=q:this._preCreateCacheValues.blendMode=q}get blendMode(){var q;return this.isCreated?this.TextObject.blendMode:null!==(q=this._preCreateCacheValues.blendMode)&&void 0!==q?q:_t.BLEND_MODES.NORMAL}set lineSpacing(q){this.isCreated?this.textObject.style.leading=q:this._preCreateCacheValues.leading=q}get lineSpacing(){var q;return this.isCreated?this.TextObject.style.leading:null!==(q=this._preCreateCacheValues.leading)&&void 0!==q?q:0}set paddingX(q){this._paddingX=q}get paddingX(){return this._paddingX}set paddingY(q){this._paddingY=q}get paddingY(){return this._paddingY}set dropShadow(q){this.isCreated?this.TextObject.style.dropShadow=q:this._preCreateCacheValues.dropShadow=q}get dropShadow(){var q;return this.isCreated?this.TextObject.style.dropShadow:null!==(q=this._preCreateCacheValues.dropShadow)&&void 0!==q&&q}set dropShadowAlpha(q){this.isCreated?this.TextObject.style.dropShadowAlpha=q:this._preCreateCacheValues.dropShadowAlpha=q}get dropShadowAlpha(){var q;return this.isCreated?this.TextObject.style.dropShadowAlpha:null!==(q=this._preCreateCacheValues.dropShadowAlpha)&&void 0!==q?q:0}set dropShadowAngle(q){this.isCreated?this.TextObject.style.dropShadowAngle=q:this._preCreateCacheValues.dropShadowAngle=q}get dropShadowAngle(){var q;return this.isCreated?this.TextObject.style.dropShadowAngle:null!==(q=this._preCreateCacheValues.dropShadowAngle)&&void 0!==q?q:0}set dropShadowColor(q){this.isCreated?this.isValidColor(q)&&(this.TextObject.style.dropShadowColor=q):this._preCreateCacheValues.dropShadowColor=q}get dropShadowColor(){var q;return this.isCreated?this.TextObject.style.dropShadowColor:null!==(q=this._preCreateCacheValues.dropShadowColor)&&void 0!==q?q:""}set dropShadowBlur(q){this.isCreated?this.TextObject.style.dropShadowBlur=q:this._preCreateCacheValues.dropShadowBlur=q}get dropShadowBlur(){var q;return this.isCreated?this.TextObject.style.dropShadowBlur:null!==(q=this._preCreateCacheValues.dropShadowBlur)&&void 0!==q?q:0}set dropShadowDistance(q){this.isCreated?this.TextObject.style.dropShadowDistance=q:this._preCreateCacheValues.dropShadowDistance=q}get dropShadowDistance(){var q;return this.isCreated?this.TextObject.style.dropShadowDistance:null!==(q=this._preCreateCacheValues.dropShadowDistance)&&void 0!==q?q:0}set dropShadowPadding(q){this.isCreated?this.TextObject.style.padding=q:this._preCreateCacheValues.padding=q}get dropShadowPadding(){var q;return this.isCreated?this.TextObject.style.padding:null!==(q=this._preCreateCacheValues.padding)&&void 0!==q?q:0}set tint(q){this.isCreated?this.TextObject.tint=q:this._preCreateCacheValues.tint=q}get tint(){var q;return this.isCreated?this.TextObject.tint:null!==(q=this._preCreateCacheValues.tint)&&void 0!==q?q:0}set alpha(q){this.isCreated?this.textObject.alpha=q:this._preCreateCacheValues.alpha=q}get alpha(){var q;return this.isCreated?this.textObject.alpha:null!==(q=this._preCreateCacheValues.alpha)&&void 0!==q?q:1}set underline(q){this._underline=q}get underline(){return this._underline}set underlineStartIndex(q){this._underlineStartIndex=q}get underlineStartIndex(){return this._underlineStartIndex}set underlineEndIndex(q){this._underlineEndIndex=q}get underlineEndIndex(){return this._underlineEndIndex}get scaleToFitRectTransform(){var q;return this.isCreated?this._scaleToFitRectTransform:null!==(q=this._preCreateCacheValues.scaleToFitRectTransform)&&void 0!==q&&q}set scaleToFitRectTransform(q){this.isCreated?(this._scaleToFitRectTransform=q,this.updateScaleToRectTransform()):this._preCreateCacheValues.scaleToFitRectTransform=q}set roundPixels(q){this.isCreated?this.textObject.roundPixels=q:this._preCreateCacheValues.roundPixels=q}get roundPixels(){var q;return this.isCreated?this.textObject.roundPixels:null!==(q=this._preCreateCacheValues.roundPixels)&&void 0!==q&&q}constructor(){super(),this.textSource=null,this._underlines=[],this._boundsAlignH=fe.Left,this._boundsAlignV=ue.Top,this._paddingX=0,this._paddingY=0,this._preCreateCacheValues={},this.textObject=null,this._wrapToRectTransformWidth=!1,this._underline=!1,this._underlineStartIndex=null,this._underlineEndIndex=null,this.resizeRectTransform=!1,this._scaleToFitRectTransform=!1,this.textOverflow=!1,this.textOverflowUseRectTransformSize=!0,this._isLocKey=!0,this._textSize=new St.o,this._smooth=!0}create(){var q,K;super.create(),this.createTextObject(),this.assignCacheValuesToComponent()||this.phaserTextObjectSetup();if(""!==this.textObject.text||this.updateTextSize(),this.textObject.visible=this.Active,this.GameObject.onActiveInHierarchyChanged.add((()=>{this.IsActiveInHierarchy&&this.applyTextPivot()})),this.OnActiveChanged.add((()=>this.textObject.visible=this.Active)),this.setUpDisplayObject(this.textObject),this.gameObject.legacyTransform){const q=this.gameObject.legacyTransform;0!==q.width&&0!==q.height&&this.textObject.position.set(he.LEGACY_STYLE_PADDING),this._textBounds=new _t.Rectangle(0,0,q.width,q.height)}if(this.applyTextPivot(),this._underline){const z=null!==(q=this.underlineStartIndex)&&void 0!==q?q:0,Y=null!==(K=this.underlineEndIndex)&&void 0!==K?K:this.textObject.text.length;this.drawUnderline(z,Y)}this._preCreateCacheValues=void 0}assignCacheValuesToComponent(){var q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft;return!!this._preCreateCacheValues&&(this.dropShadowPadding=null!==(q=this._preCreateCacheValues.padding)&&void 0!==q?q:this.dropShadowPadding,this.textObject.style.fontFamily=null!==(K=this._preCreateCacheValues.fontFamily)&&void 0!==K?K:this.textObject.style.fontFamily,void 0!==this._preCreateCacheValues.fontStyle&&this.setInternalFontStyle(this._preCreateCacheValues.fontStyle),void 0!==this._preCreateCacheValues.fontWeight&&this.setInternalFontWeight(this._preCreateCacheValues.fontWeight),this.fill=null!==(z=this._preCreateCacheValues.fill)&&void 0!==z?z:this.fill,this.stroke=null!==(Y=this._preCreateCacheValues.stroke)&&void 0!==Y?Y:this.stroke,this.strokeThickness=null!==(Q=this._preCreateCacheValues.strokeThickness)&&void 0!==Q?Q:this.strokeThickness,this.wordWrapWidth=null!==(X=this._preCreateCacheValues.wordWrapWidth)&&void 0!==X?X:this.wordWrapWidth,this.wordWrap=null!==(Z=this._preCreateCacheValues.wordWrap)&&void 0!==Z?Z:this.wordWrap,this.align=null!==(J=this._preCreateCacheValues.align)&&void 0!==J?J:this.align,this._boundsAlignH=null!==(tt=this._preCreateCacheValues.boundsAlignH)&&void 0!==tt?tt:this._boundsAlignH,this._boundsAlignV=null!==(et=this._preCreateCacheValues.boundsAlignV)&&void 0!==et?et:this._boundsAlignV,this.roundPixels=null!==(it=this._preCreateCacheValues.roundPixels)&&void 0!==it?it:this.roundPixels,this._scaleToFitRectTransform=null!==(st=this._preCreateCacheValues.scaleToFitRectTransform)&&void 0!==st?st:this._scaleToFitRectTransform,this.alpha=null!==(nt=this._preCreateCacheValues.alpha)&&void 0!==nt?nt:this.alpha,this.tint=null!==(at=this._preCreateCacheValues.tint)&&void 0!==at?at:this.tint,this.blendMode=null!==(rt=this._preCreateCacheValues.blendMode)&&void 0!==rt?rt:this.blendMode,void 0!==this._preCreateCacheValues.fontSize&&(this._fontSize=this._preCreateCacheValues.fontSize,this.setInternalTextObjectFontSize(this._preCreateCacheValues.fontSize)),this.dropShadow=null!==(ot=this._preCreateCacheValues.dropShadow)&&void 0!==ot?ot:this.dropShadow,this.dropShadowAlpha=null!==(ht=this._preCreateCacheValues.dropShadowAlpha)&&void 0!==ht?ht:this.dropShadowAlpha,this.dropShadowAngle=null!==(ct=this._preCreateCacheValues.dropShadowAngle)&&void 0!==ct?ct:this.dropShadowAngle,this.dropShadowColor=null!==(dt=this._preCreateCacheValues.dropShadowColor)&&void 0!==dt?dt:this.dropShadowColor,this.dropShadowBlur=null!==(lt=this._preCreateCacheValues.dropShadowBlur)&&void 0!==lt?lt:this.dropShadowBlur,this.dropShadowDistance=null!==(ut=this._preCreateCacheValues.dropShadowDistance)&&void 0!==ut?ut:this.dropShadowDistance,this.lineSpacing=null!==(ft=this._preCreateCacheValues.leading)&&void 0!==ft?ft:this.lineSpacing,void 0!==this._preCreateCacheValues.wrapToRectTransformWidth&&(this.wrapToRectTransformWidth=this._preCreateCacheValues.wrapToRectTransformWidth),this.phaserTextObjectSetup(),void 0!==this._preCreateCacheValues.text&&(this._preCreateCacheValues.text instanceof Ht?this.Source=this._preCreateCacheValues.text:this.text=this._preCreateCacheValues.text),!0)}phaserTextObjectSetup(){this.textObject.style.leading+=6,this.textObject.style.lineJoin="round"}applyScalingToTransform(q,K,z){const Y=q.rectTransformDimensions;let Q=-Y.width*q.pivot.x,X=-Y.height*q.pivot.y;this._boundsAlignH===fe.Center?Q+=Y.getHalfWidth()-K.getHalfWidth():this._boundsAlignH===fe.Right&&(Q+=Y.width-K.width),this._boundsAlignV===ue.Middle?X+=Y.getHalfHeight()-K.getHalfHeight():this._boundsAlignV===ue.Bottom&&(X+=Y.height-K.height),z.position.set(Q,X)}applyToMatrix(q,K){K.append(q)}getDimensions(){return this._textSize}createPixiTransformOverride(){const q=super.createPixiTransformOverride();return q.setCustomRectTransformScaling(this),q}localize(q){var K;if(!this._isLocKey||!q||"string"!=typeof q||!this.isCreated)return q;try{const K=this.getInjectedValue(at.LocalizationService);if(!K)throw new Error("No localization service available");const z=K.getText(q);if(z&&z!==q)return z}catch(z){zt.R.logError(z,`Text Component on GameObject '${null===(K=this.GameObject)||void 0===K?void 0:K.name}' failed to localize text '${q}'`)}return q}createTextObject(){this.textObject||(this.isCreated||ht.V.log("Making the textObject before create() is not recommended",ct.$.Warning),this.textObject=new _t.Text(""),this.textObject.style.fontFamily=ce.ABeeZee,this.textObject.style.fill=Bt.y.BLACK,this.textObject.style.stroke=Bt.y.BLACK,this.textObject.style.dropShadowColor=Bt.y.BLACK,this.updateSmooth())}updateText(){if(!this.isCreated)return;const q=this.textObject.text;this.textObject.text=this.Source.getText(),this.updateTextSize(),this.Source&&this.Source.getText()!==q&&this.applyTextPivot()}applyTextPivot(){if(!this._textBounds||this.textObject.destroyed)return;let q=this._textBounds.x,K=this._textBounds.y;const z=this.textObject.resolution,Y=he.LEGACY_STYLE_PADDING;this._boundsAlignH===fe.Right?(q+=this._textBounds.width-this.textObject.canvas.width/z-this._paddingX,this.gameObject.legacyTransform&&this.gameObject.legacyTransform.width!==this.textObject.canvas.width&&(q+=2*Y)):this._boundsAlignH===fe.Center?(q+=Math.ceil(.5*(this._textBounds.width-this.textObject.canvas.width/z)),this.gameObject.legacyTransform&&this.gameObject.legacyTransform.width!==this.textObject.canvas.width&&(q+=Y)):q+=this._paddingX,this._boundsAlignV===ue.Bottom?K+=this._textBounds.height-this.textObject.canvas.height/z-this._paddingY:this._boundsAlignV===ue.Middle?K+=Math.ceil(.5*(this._textBounds.height-this.textObject.canvas.height/z)):K+=this._paddingY,this.textObject.position.set(q,K)}drawUnderline(q,K){const z=Math.max(q,0),Y=Math.max(K,0);if(z===Y)return;if(!this.isCreated)return this.underlineStartIndex=z,this.underlineEndIndex=Y,void(this._underline=!0);const Q=this.text.substring(z,Math.min(Y,this.text.length)),X=_t.TextMetrics.measureText(Q,this.textObject.style),Z=_t.TextMetrics.measureText(this.text.substring(0,z),this.textObject.style).width,J=X.height,et=tt.W.instance.game.add.graphics(Z,J),it=parseInt(this.fill.substr(1),16)<<8,st=Math.abs(it/256);et.lineStyle(2,st,1,1),et.moveTo(0,0),et.lineTo(X.width,0),this._underlines.push(et),this.textObject.addChild(et)}isValidColor(q){return Gt.validateHTMLHexColor(q,"#",!0)}customDeserialize(q){var K;this._isLocKey=!1!==q.isLocKey;let z=!1;ut.A.isDefined(q.dropShadowAlpha)?z=!0:this.dropShadowAlpha=q.dropShadowAlpha=0,ut.A.isDefined(q.dropShadowAngle)?z=!0:this.dropShadowAngle=q.dropShadowAngle=0,ut.A.isDefined(q.dropShadowBlur)?z=!0:this.dropShadowBlur=q.dropShadowBlur=0,ut.A.isDefined(q.dropShadowDistance)?z=!0:this.dropShadowDistance=q.dropShadowDistance=0,ut.A.isDefined(q.dropShadowColor)?(this.dropShadowColor=q.dropShadowColor="black"===q.dropShadowColor?"#000000":q.dropShadowColor,z=!0):this.dropShadowColor=q.dropShadowColor="#000000",ut.A.isDefined(q.dropShadowPadding)?z=!0:this.dropShadowPadding=q.dropShadowPadding=3,this.dropShadow=q.dropShadow=null!==(K=q.dropShadow)&&void 0!==K?K:z,super.customDeserialize(q)}destroy(){var q,K;this._underlines.forEach((q=>{q.destroy()})),this._underlines=[],null===(q=this.textSource)||void 0===q||q.cleanUp(),(null===(K=this.textObject)||void 0===K?void 0:K.texture)&&this.textObject.destroy(),this.textObject=null,super.destroy()}updateTextSize(){this.updateScaleToRectTransform(),this._textSize.setTo(this.textObject.width,this.textObject.height),this.resizeRectTransformUponTextChange(),this.handleTextOverflow()}resizeRectTransformUponTextChange(){this.resizeRectTransform&&this.GameObject.transform instanceof Tt.X&&this.GameObject.transform.setSizeDelta(this._textSize.width,this._textSize.height)}handleTextOverflow(){var q,K,z;const Y=this.textOverflowUseRectTransformSize?null===(z=null===(K=null===(q=this.GameObject)||void 0===q?void 0:q.transform)||void 0===K?void 0:K.sizeDelta)||void 0===z?void 0:z.width:this.textOverflowWidth;if(this.textOverflow&&Y&&this._textSize.width>Y&&this.text.length>3){let q=_t.TextMetrics.measureText(this.text,this.textObject.style),K=this.text,z=!0;for(;q.width>Y&&K.length>3;)K=`${K.slice(0,-(z?1:4))}...`,q=_t.TextMetrics.measureText(K,this.textObject.style),z=!1;this.text=K}}updateWrapToRectTransform(){this.gameObject.transform instanceof Tt.X&&(this.gameObject.transform.onDimensionsChanged.remove(this.updateWrapToRectTransform,this),this.wrapToRectTransformWidth&&(this.wordWrapWidth=this.gameObject.transform.fullWidth,this.gameObject.transform.onDimensionsChanged.add(this.updateWrapToRectTransform,this),this.resizeRectTransform=!1))}updateScaleToRectTransform(){if(this.textObjectFontSize=this._fontSize,this.gameObject.transform instanceof Tt.X&&(this.gameObject.transform.onDimensionsChanged.removeAll(this),this.scaleToFitRectTransform)){const q=this.gameObject.transform,K=Math.min(q.fullWidth/this.textObject.width,q.fullHeight/this.textObject.height,1);this.textObjectFontSize=this._fontSize*K,this.gameObject.transform.onDimensionsChanged.add(this.updateScaleToRectTransform,this)}}canRootContainerRender(){var q;const K=null===(q=this.textObject)||void 0===q?void 0:q.text;return!!(null==K?void 0:K.trim())&&super.canRootContainerRender()}static customSerialize(q,K,z){super.customSerialize(q,K,z);!1!==q.properties.isLocKey&&(delete q.properties.isLocKey,z.setComponentPropertyValue(q.guid,"isLocKey",void 0))}};ve.LEGACY_STYLE_PADDING=3,(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"text",null),(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"font",null),(0,X.Cg)([(0,it.gf)(le),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"fontStyle",null),(0,X.Cg)([(0,it.gf)(de),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"fontWeight",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],ve.prototype,"_fontSize",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"fill",null),(0,X.Cg)([(0,it.gf)(fe),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"align",null),(0,X.Cg)([(0,it.gf)(fe),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"boundsAlignH",null),(0,X.Cg)([(0,it.gf)(ue),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"boundsAlignV",null),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"stroke",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"strokeThickness",null),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean),(0,X.Sn)("design:paramtypes",[Boolean])],ve.prototype,"wordWrap",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"wordWrapWidth",null),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean),(0,X.Sn)("design:paramtypes",[Boolean])],ve.prototype,"wrapToRectTransformWidth",null),(0,X.Cg)([(0,it.gf)(_t.BLEND_MODES),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"blendMode",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"lineSpacing",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"paddingX",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"paddingY",null),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean),(0,X.Sn)("design:paramtypes",[Boolean])],ve.prototype,"dropShadow",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"dropShadowAlpha",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"dropShadowAngle",null),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],ve.prototype,"dropShadowColor",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"dropShadowBlur",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"dropShadowDistance",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"dropShadowPadding",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"tint",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],ve.prototype,"alpha",null),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],ve.prototype,"_underline",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],ve.prototype,"_underlineStartIndex",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],ve.prototype,"_underlineEndIndex",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],ve.prototype,"resizeRectTransform",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean),(0,X.Sn)("design:paramtypes",[Boolean])],ve.prototype,"scaleToFitRectTransform",null),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],ve.prototype,"textOverflow",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],ve.prototype,"textOverflowUseRectTransformSize",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],ve.prototype,"textOverflowWidth",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean),(0,X.Sn)("design:paramtypes",[Boolean])],ve.prototype,"roundPixels",null),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],ve.prototype,"_isLocKey",void 0),ve=he=(0,X.Cg)([(0,J.EV)("Text",J.YH.ui,"Draws a web font on the screen as a child of the parent game object"),(0,Rt.W)(Ft),(0,X.Sn)("design:paramtypes",[])],ve);var ge=z(140),me=z(42149),ye=z(33431);class _e extends Ot.${generate(q,K){const z=ge.I.create({id:"numberArray",label:"Number Array",arrayType:Jt.b.Number,value:q.numberArray,insertElementCallbacks:new Map([["Value: 10",()=>10],["Value: 5",()=>5],["This should fail",()=>""]])}),Y=ge.I.create({id:"stringArray",label:"String Array",arrayType:Jt.b.String,value:q.stringArray,isReorderable:!1}),Q=ge.I.create({id:"booleanArray",label:"Boolean Array",arrayType:Jt.b.Boolean,value:q.booleanArray}),X=ge.I.create({id:"enumArray",label:"Enum Array",arrayType:Jt.b.Enum,value:q.enumArray}),Z=ge.I.create({id:"reducedEnumArray",label:"Reduced Enum Array",arrayType:Jt.b.Enum,value:q.reducedEnumArray,enumeration:{Bold:de.Bold,Normal:de.Normal}}),J=ge.I.create({id:"componentArray",label:"Component Array",arrayType:Jt.b.ComponentReference,value:q.componentArray}),tt=ge.I.create({id:"gameObjectArray",label:"GameObject Array",arrayType:Jt.b.GameObjectReference,value:q.gameObjectArray}),et=ge.I.create({id:"colorArray",label:"Color Array",arrayType:Jt.b.String,value:q.colorArray}),it=ge.I.create({id:"jsonFileArray",label:"Json File Array",arrayType:Jt.b.String,value:q.jsonFileArray}),st=ge.I.create({id:"jsonArray",label:"JSON Array",arrayType:Jt.b.JSON,value:q.jsonArray}),nt=ge.I.create({id:"customInspectorArray",label:"Custom Inspector Array",arrayType:Jt.b.GenericObject,value:q.customInspectorArray,insertElementCallbacks:new Map([["color",()=>({label:"a color element",color:"#660000"})],["bool",()=>({label:"a bool element",bool:!0})],["color + bool",()=>({label:"a color + bool element",color:"#66BB00",bool:!0})],["neither",()=>({label:"neither color nor bool"})]]),getElementInspector:(q,K)=>{const z=[];return z.push(ye.l.create({id:`label-${K}`,labelValue:q.label})),q.color&&z.push(Mt.f.create({id:`color-${K}`,inputType:"color",inputValue:q.color,propertyPath:[`${K}`,"color"]})),ut.A.isDefined(q.bool)&&z.push(Mt.f.create({id:`boolean-${K}`,inputType:"checkbox",inputValue:q.bool,propertyPath:[`${K}`,"bool"]})),ut.A.isDefined(q.bool)||q.color||z.push(me.b.create({id:`boolean-${K}`,message:"Object contains neither color nor bool",iconType:Nt.AT.Warning})),Dt.X.createVertical(z)}}),at=this.getDemoEnemyGenericObjectArrayTerminal(q);return Dt.X.createVertical([z,Y,Q,X,Z,J,tt,et,it,st,at,nt])}getDemoEnemyGenericObjectArrayTerminal(q){let K;!function(q){q.Goblin="Goblin",q.Orc="Orc",q.Troll="Troll"}(K||(K={}));const z=new Map([[K.Goblin,{name:K.Goblin,hp:5,spawnRate:1,dropIds:[{id:1,name:"Sword"},{id:2,name:"Hammer"}]}],[K.Orc,{name:K.Orc,hp:10,spawnRate:.8,dropIds:[{id:2,name:"Hammer"},{id:3,name:"Shield"},{id:4,name:"Helmet"}]}],[K.Troll,{name:K.Troll,hp:50,spawnRate:.2,dropIds:[{id:5,name:"Club"},{id:4,name:"Helmet"}]}]]),Y=new Map;for(const Q of Object.values(K))Y.set(Q,(()=>z.get(Q)));return ge.I.create({id:"genericObjectArray",label:"Generic Object Array",arrayType:Jt.b.GenericObject,value:q.genericObjectArray,insertElementCallbacks:Y})}}let Ee=class extends Z.u{constructor(){super(...arguments),this._numberArray=[1,2,3],this._stringArray=["a","b","c"],this._booleanArray=[!0,!1,!0],this._enumArray=[],this._reducedEnumArray=[],this._componentArray=[],this._gameObjectArray=[],this._colorArray=[],this._jsonFileArray=[],this._jsonArray=[{name:"jsonTest1",id:1},{name:"jsonTest2",id:2}],this._customInspectorArray=[{label:"An object with a color",color:"#660000"},{label:"An object with a bool",bool:!0},{label:"An object with color and a bool",color:"#66BB00",bool:!0},{label:"An object with neither color nor bool"}]}};(0,X.Cg)([(0,it.g1)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_numberArray",void 0),(0,X.Cg)([(0,it.W_)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_stringArray",void 0),(0,X.Cg)([(0,it.vk)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_booleanArray",void 0),(0,X.Cg)([(0,it.gf)(de),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_enumArray",void 0),(0,X.Cg)([(0,it.gf)(de),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_reducedEnumArray",void 0),(0,X.Cg)([(0,it.Mn)(kt.d),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_componentArray",void 0),(0,X.Cg)([(0,it.ER)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_gameObjectArray",void 0),(0,X.Cg)([(0,it.iE)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_colorArray",void 0),(0,X.Cg)([(0,it.tW)("gear"),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_jsonFileArray",void 0),(0,X.Cg)([(0,it.np)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_genericObjectArray",void 0),(0,X.Cg)([(0,it.vC)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_jsonArray",void 0),(0,X.Cg)([(0,it.np)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Ee.prototype,"_customInspectorArray",void 0),Ee=(0,X.Cg)([(0,J.EV)("DemoArray"),(0,Rt.W)(_e)],Ee);class we extends Ot.${generate(q,K){const z=[];return z.push(this.generateButtonsByType()),z.push(this.generateButtonsByIcon()),z.push(this.generateButtonsByState()),z.push(this.generateButtonsWordWrap()),z.push(this.generateStandaloneButton(q)),Dt.X.createVertical(z)}generateButtonsByType(){const q=[];return Object.keys(Nt.VQ).forEach((K=>{const z=Nt.VQ[K],Y=Ut.G.buttonGroup({id:`button-${z}`,buttonText:K,buttonType:z,labelValue:K});q.push(Y)})),Dt.X.createVertical(q,{isContainer:!0,title:"Button Types",isCollapsible:!0})}generateButtonsByIcon(){const q=[];return Object.keys(Nt.a2).forEach((K=>{const z=Nt.a2[K],Y=Ut.G.buttonGroup({id:`button-${z}`,buttonText:K,buttonIcon:z,labelValue:K});q.push(Y)})),Dt.X.createVertical(q,{isContainer:!0,title:"Button Icons",isCollapsible:!0})}generateButtonsByState(){const q=[Ut.G.buttonGroup({id:"button-enabled",buttonText:"Enabled",labelValue:"Enabled"}),Ut.G.buttonGroup({id:"button-disabled",buttonText:"Disabled",labelValue:"Disabled",buttonDisabled:!0})];return Dt.X.createVertical(q,{isContainer:!0,title:"Button States",isCollapsible:!0})}generateStandaloneButton(q){const K=[me.b.create({id:"info-box--button-standalone",iconType:Nt.AT.Info,message:"Standalone button. Another way to create buttons when TerminalGroup.buttonGroup() doesn't suit your needs."}),Pt.X.create({id:"button-standalone",buttonText:"Standalone Button",onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{lastClickTime:(new Date).toLocaleString()})}}),ye.l.create({id:"last-click-label",labelValue:q.lastClickTime?`Last Click at: ${q.lastClickTime}`:"Click the Standalone Button!",labelTextWrap:Nt.K3.Wrap})];return Dt.X.createVertical(K,{isContainer:!0,title:"Standalone Button",isCollapsible:!0})}generateButtonsWordWrap(){const q=[Pt.X.create({id:"button-no-wrap",buttonText:"This is a whole lot of text that will get cut off becaue word wrapping is off.",buttonTextWrap:Nt.K3.None}),Pt.X.create({id:"button-text-wrap",buttonText:"This is a whole lot of text that will get wrapped into multiple lines because word wrapping is turned on.",buttonTextWrap:Nt.K3.Wrap})];return Dt.X.createVertical(q,{isContainer:!0,title:"Text Wrap on Buttons",isCollapsible:!0})}}let Te=class extends Z.u{};(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],Te.prototype,"_lastClickTime",void 0),Te=(0,X.Cg)([(0,J.EV)("DemoButtonsComponent"),(0,Rt.W)(we)],Te);var Se,Ae=z(44716);!function(q){q.Scale="scale",q.Stop="stop",q.ClipInner="clip-inner",q.ClipHigh="clip-high"}(Se||(Se={}));class Ce extends _t.NineSlicePlane{constructor(){super(...arguments),this._shrinkHorizontal=Se.Scale,this._shrinkVertical=Se.Scale}get shrinkHorizontal(){return this._shrinkHorizontal}set shrinkHorizontal(q){this._shrinkHorizontal!==q&&(this._shrinkHorizontal=q,this._refresh())}get shrinkVertical(){return this._shrinkVertical}set shrinkVertical(q){this._shrinkVertical!==q&&(this._shrinkVertical=q,this._refresh())}setShrinkModes(q,K){this._shrinkHorizontal===q&&this._shrinkVertical===K||(this._shrinkHorizontal=q,this._shrinkVertical=K,this._refresh())}_refresh(){if(this.destroyed)return;const q=this.texture,K=q.orig.width,z=q.orig.height,Y=q.trim||{x:0,y:0,width:K,height:z},Q=Y.y,X=z-Y.height-Y.y,Z=Q/z,J=X/z,tt=Math.max(this._topHeight-Q,0),et=Math.max(this._bottomHeight-X,0),it=Y.x,st=K-Y.width-Y.x,nt=it/K,at=st/K,rt=Math.max(this._leftWidth-it,0),ot=Math.max(this._rightWidth-st,0),ht=this._getMinScale(),ct=this.vertices,dt=this.geometry.buffers[1].data;let lt,ut,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt,St,At,Ct;switch(this._shrinkHorizontal){case Se.Stop:lt=it,ut=it+rt,this.width0?(lt=it,ut=it+rt*ht):lt=ut=this._width*nt,ot>0?(ft=this._width-st-ot*ht,bt=this._width-st):ft=bt=this._width*(1-at),yt=nt,_t=nt+rt/K,Et=1-at-ot/K,wt=1-at}switch(this._shrinkVertical){case Se.Stop:pt=Q,vt=Q+tt,this.height0?(pt=Q,vt=Q+tt*ht):pt=vt=this._height*Z,Tt=Z,St=Z+tt/z,et>0?(gt=this._height-X-et*ht,mt=this._height-X):gt=mt=this._height*(1-J),At=1-J-et/z,Ct=1-J}ct[0]=ct[8]=ct[16]=ct[24]=lt,ct[2]=ct[10]=ct[18]=ct[26]=ut,ct[4]=ct[12]=ct[20]=ct[28]=ft,ct[6]=ct[14]=ct[22]=ct[30]=bt,ct[1]=ct[3]=ct[5]=ct[7]=pt,ct[9]=ct[11]=ct[13]=ct[15]=vt,ct[17]=ct[19]=ct[21]=ct[23]=gt,ct[25]=ct[27]=ct[29]=ct[31]=mt,dt[0]=dt[8]=dt[16]=dt[24]=yt,dt[2]=dt[10]=dt[18]=dt[26]=_t,dt[4]=dt[12]=dt[20]=dt[28]=Et,dt[6]=dt[14]=dt[22]=dt[30]=wt,dt[1]=dt[3]=dt[5]=dt[7]=Tt,dt[9]=dt[11]=dt[13]=dt[15]=St,dt[17]=dt[19]=dt[21]=dt[23]=At,dt[25]=dt[27]=dt[29]=dt[31]=Ct,this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}let Oe=class extends jt.y{constructor(){super(...arguments),this.image=null,this._alpha=1,this._shrinkHorizontal=Se.Scale,this._shrinkVertical=Se.Scale,this.atlas="",this.frame="",this._imageID=null,this._tint="#FFFFFF",this._imageDimensions=new St.o}get alpha(){return this._alpha}set alpha(q){this._alpha=q,this.image&&(this.image.alpha=q)}get shrinkHorizontal(){return this._shrinkHorizontal}get shrinkVertical(){return this._shrinkVertical}get atlasKey(){return this.atlas}set tint(q){this._tint=_t.Color.shared.setValue(q).toHex(),this.image&&(this.image.tint=q)}get sliceData(){return this._sliceData}create(){super.create();let q="",K="";this._imageID?K=this._imageID:(K=this.atlas,q=this.frame),this.updateAssetInternal(K,q)}destroy(){this.image&&!this.image.destroyed&&this.image.destroy(),this.image=null,super.destroy()}getDimensions(){return this._sliceData?new St.o(this.image.width,this.image.height):this._imageDimensions}updateAsset(q,K){var z;this.isCreated?this.atlas===q&&this.frame===K||(null===(z=this.image)||void 0===z?void 0:z.destroyed)||this.updateAssetInternal(q,K):this._onCreateAction.addOnce(this.updateAsset,this,void 0,q,K)}updateAssetInternal(q,K){this.atlas=q,this.frame=K,this._sliceData=tt.W.instance.game.cache.getSliceData(q),(this._sliceData&&this.image instanceof _t.Sprite||!this._sliceData&&this.image instanceof Ce)&&(this.image.destroy(),this.image=null);const z=tt.W.instance.game.cache.getTexture(q,K);this.image?(this.image.texture=z,this.image instanceof Ce&&(this.image.leftWidth=this._sliceData.left,this.image.topHeight=this._sliceData.top,this.image.rightWidth=this._sliceData.right,this.image.bottomHeight=this._sliceData.bottom),this.updateSmooth()):(this._sliceData?(this.image=new Ce(z,this._sliceData.left,this._sliceData.top,this._sliceData.right,this._sliceData.bottom),this.image.setShrinkModes(this._shrinkHorizontal,this._shrinkVertical)):this.image=new _t.Sprite,this.image.texture=z,this.image.tint=_t.utils.string2hex(this._tint),this.image.alpha=this._alpha,this.setRootContainer(this.image)),this.image.roundPixels=!0,this._imageDimensions.width=this.image.width,this._imageDimensions.height=this.image.height}setTexture(q){this.image.texture=q,this._imageDimensions.width=this.image.width,this._imageDimensions.height=this.image.height}setAnchor(q,K){this.image instanceof _t.Sprite&&this.image.anchor.set(q,K)}setAngle(q){this.image.angle=q}setScale(q,K){this.image.scale.set(q,K)}setAlpha(q){this.image.alpha=q}setBlend(q){this.image.blendMode=q}setShrinkModes(q,K){this._shrinkHorizontal=q,this._shrinkVertical=K,this.image instanceof Ce&&this.image.setShrinkModes(q,K)}createPixiTransformOverride(){const q=super.createPixiTransformOverride();return this._sliceData&&q.setCustomRectTransformScaling(this),q}applyScalingToTransform(q,K,z){if(!this._sliceData){const Y=q.rectTransformDimensions,Q=Y.width/K.width,X=Y.height/K.height,Z=-K.width*q.pivot.x*Q,J=-K.height*q.pivot.y*X;return z.scale.set(Q,X),void z.position.set(Z,J)}this.image.width=q.rectTransformDimensions.width,this.image.height=q.rectTransformDimensions.height,z.position.set(-q.rectTransformDimensions.width*q.pivot.x,-q.rectTransformDimensions.height*q.pivot.y)}applyToMatrix(q,K){K.append(q)}sizeToSourceImage(){const q=this.gameObject.transform;q instanceof Tt.X?(q.fullWidth=this.image.width,q.fullHeight=this.image.height):ht.V.log("Graphic: Cannot size to source image due to missing RectTransform.",ct.$.Verbose)}isValid(){return!(!this.image||this.image.destroyed)&&(!(this.image instanceof _t.Sprite&&!this.image.texture)&&!(this.image instanceof Ce&&!this.image.shader))}};(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Oe.prototype,"_alpha",void 0),(0,X.Cg)([(0,it.gf)(Se),(0,X.Sn)("design:type",String)],Oe.prototype,"_shrinkHorizontal",void 0),(0,X.Cg)([(0,it.gf)(Se),(0,X.Sn)("design:type",String)],Oe.prototype,"_shrinkVertical",void 0),(0,X.Cg)([(0,et.B)(),(0,it.W_)(),(0,X.Sn)("design:type",String)],Oe.prototype,"atlas",void 0),(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],Oe.prototype,"frame",void 0),(0,X.Cg)([(0,et.B)(),(0,it.W_)(),(0,it.nK)("singleImageID"),(0,X.Sn)("design:type",String)],Oe.prototype,"_imageID",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String)],Oe.prototype,"_tint",void 0),Oe=(0,X.Cg)([(0,J.EV)("Graphic",J.YH.ui,"Lowest level graphic component")],Oe);class Ie extends Ot.${generate(q,K){const z=[];return z.push(Ut.G.componentPickerGroup({id:"componentPickerText",labelValue:"Text Component",componentType:ve,componentGuid:q.componentPickerText})),z.push(Ut.G.componentPickerGroup({id:"componentPickerGraphic",labelValue:"Graphic Component",componentType:Oe,componentGuid:q.componentPickerGraphic,readonly:!0})),z.push(Ut.G.componentPickerGroup({id:"componentPickerRectTransform",labelValue:"RectTransform Component",componentType:Tt.X,componentGuid:q.componentPickerRectTransform})),z.push(Ut.G.componentPickerGroup({id:"componentPickerLegacyTransform",labelValue:"LegacyTransform Component",componentType:Ae.K,componentGuid:q.componentPickerLegacyTransform})),Dt.X.createVertical(z)}}let De=class extends Z.u{};(0,X.Cg)([(0,it.Mn)(ve),(0,X.Sn)("design:type",ve)],De.prototype,"_componentPickerText",void 0),(0,X.Cg)([(0,it.Mn)(Oe),(0,X.Sn)("design:type",Oe)],De.prototype,"_componentPickerGraphic",void 0),(0,X.Cg)([(0,it.Mn)(Tt.X),(0,X.Sn)("design:type",Tt.X)],De.prototype,"_componentPickerRectTransform",void 0),(0,X.Cg)([(0,it.Mn)(Ae.K),(0,X.Sn)("design:type",Ae.K)],De.prototype,"_componentPickerLegacyTransform",void 0),De=(0,X.Cg)([(0,J.EV)("DemoComponentPickerComponent"),(0,Rt.W)(Ie)],De);var Re=z(47681);class Pe extends Ot.${generate(q,K){const z=[];return z.push(this.generateGenericPicker()),z.push(this.generateInitialPathPicker()),z.push(this.generateFilteredPicker()),z.push(this.generateOnChangeButton(q)),Dt.X.createVertical(z)}generateGenericPicker(){const q=[Ut.G.filePickerGroup({id:"demoGenericPicker",labelValue:"Generic Picker"}),ye.l.create({id:"demoGenericPickerStandaloneLabel",labelValue:"Standalone Picker"}),Re.H.create({id:"demoGenericPickerStandalone"})];return Dt.X.createVertical(q,{isContainer:!0,title:"Generic Picker",isCollapsible:!0})}generateInitialPathPicker(){const q=[Ut.G.filePickerGroup({id:"demoInitialPathPicker",labelValue:"Initial Path",path:"test/fake/path/image.png"})];return Dt.X.createVertical(q,{isContainer:!0,title:"Initial Path Picker",isCollapsible:!0})}generateFilteredPicker(){const q=[Ut.G.filePickerGroup({id:"demoFilteredPickerPng",labelValue:"PNG Picker",allowedExtensions:["png"]}),Ut.G.filePickerGroup({id:"demoFilteredPickerImages",labelValue:"Images Picker",allowedExtensions:["png","jpg","jpeg","webp","jfif","tiff","drwg"]}),Ut.G.filePickerGroup({id:"demoFilteredPickerGear",labelValue:"Gear Picker",allowedExtensions:["gear"]}),Ut.G.filePickerGroup({id:"demoFilteredPickerDefault",labelValue:"Default Filtering",allowedExtensions:[]})];return Dt.X.createVertical(q,{isContainer:!0,title:"Filtered Picker",isCollapsible:!0})}generateOnChangeButton(q){var K;const z=[Ut.G.filePickerGroup({id:"demoOnChangePicker",labelValue:"On Change Picker",onChange:q=>{this._editorAPI.modifyComponent(this._componentGuid,{lastPickedPath:q})}}),ye.l.create({id:"demoOnChangeLabel",labelValue:null!==(K=q.lastPickedPath)&&void 0!==K?K:"No path picked yet",labelTextWrap:Nt.K3.Wrap})];return Dt.X.createVertical(z,{isContainer:!0,title:"OnChange Picker",isCollapsible:!0})}}let Me=class extends Z.u{};(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],Me.prototype,"_lastPickedPath",void 0),Me=(0,X.Cg)([(0,J.EV)("DemoFilePickerComponent"),(0,Rt.W)(Pe)],Me);var Ne=z(27780);class xe extends Ot.${generate(q,K){const z=[];return z.push(Ut.G.gameObjectPickerGroup({id:"targetGameObjectA",labelValue:"Target A Game Object",gameObjectGuid:q.targetGameObjectA})),z.push(Ut.G.gameObjectPickerGroup({id:"targetGameObjectB",labelValue:"Target B Game Object",gameObjectGuid:q.targetGameObjectB,readonly:q.targetGameObjectBReadonly})),z.push(Ut.G.checkboxGroup({id:"targetGameObjectBReadonly",labelValue:"Target B is Readonly",inputValue:q.targetGameObjectBReadonly})),Dt.X.createVertical(z)}}let Le=class extends Z.u{constructor(){super(...arguments),this._targetGameObjectA=null,this._targetGameObjectB=null,this._targetGameObjectBReadonly=!1}};(0,X.Cg)([(0,it.ER)(),(0,X.Sn)("design:type",Ne._)],Le.prototype,"_targetGameObjectA",void 0),(0,X.Cg)([(0,it.ER)(),(0,X.Sn)("design:type",Ne._)],Le.prototype,"_targetGameObjectB",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],Le.prototype,"_targetGameObjectBReadonly",void 0),Le=(0,X.Cg)([(0,J.EV)("DemoGameObjectPickerComponent"),(0,Rt.W)(xe)],Le);z(8490);var ke=z(23664),Be=z(84893);const Ue="Change the values below to test the info box. ";class Fe extends Ot.${generate(q,K){let z="";switch(q.testDropdown){case"Long":z+=`${Ue}${Ue}${Ue}${Ue}`;case"Medium":z+=`${Ue}${Ue}`;case"Short":default:z+=Ue}let Y="";switch(q.testUpdateMode){case Nt.JG.OnTheFly:Y="Updates occur regularly on a short delay after user input is detected.";break;case Nt.JG.Confirm:Y="Updates occur only after user confirms input with Enter or when focus is lost."}return Dt.X.createVertical([Ut.G.checkboxGroup({id:"readonly",labelValue:"Readonly",inputValue:K.readonly,onChange:(q,z)=>{z?this._editorAPI.saveComponentMetadata(this._componentGuid,{readonly:!K.readonly}):this._editorAPI.deleteComponentMetadata(this._componentGuid,["readonly"])}}),ke._.blankLine(),Ut.G.textGroup({id:"testString",labelValue:"String Test",inputValue:q.testString,readonly:K.readonly}),Ut.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:q.testNumber,readonly:K.readonly}),Ut.G.colorPickerGroup({id:"testColorStr",labelValue:"Color Test (String)",inputValue:q.testColorStr,readonly:K.readonly}),Ut.G.colorPickerGroup({id:"testColorNum",labelValue:"Color Test (Number)",inputValue:q.testColorNum,readonly:K.readonly}),Ut.G.buttonGroup({id:"randomButton",buttonText:"Ok",labelValue:"Randomize",onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{testString:ut.A.generateGUID(),testNumber:Math.floor(1e3*Math.random()),testColorStr:`#${(16777215*Math.random()*1e6).toString(16).slice(0,6)}`,testColorNum:Gt.hexToDecimal(`#${(16777215*Math.random()*1e6).toString(16).slice(0,6)}`)})}}),ke._.blankLine(),Ut.G.checkboxGroup({id:"testBoolean",labelValue:"Checkbox Test",inputValue:q.testBoolean,readonly:K.readonly}),Ut.G.vectorGroup({id:"testVector",labelValue:"Vector Test",vectorValue:q.testVector,readonly:K.readonly}),Ut.G.sizeGroup({id:"testSize",labelValue:"Size Test",sizeValue:q.testSize,readonly:K.readonly}),ke._.blankLine(),ye.l.create({id:"longLabel",labelValue:"This is some very long text that is definitely going to wrap basically no matter how wide the inspector panel.",labelTextWrap:Nt.K3.Wrap}),ye.l.create({id:"longLabelNoWrap",labelValue:"Same but nowrap. This is some very long text that is definitely going to wrap basically no matter how wide the inspector panel.",labelTextWrap:Nt.K3.None}),Pt.X.create({id:"longButton",buttonText:"This is some more very long text designed to not fit on the button and be forced to word wrap. I bet it even works.",buttonTextWrap:Nt.K3.Wrap}),Pt.X.create({id:"longButtonNoWrap",buttonText:"Same but nowrap. This is some more very long text designed to not fit on the button and be forced to word wrap. I bet it even works.",buttonTextWrap:Nt.K3.None}),ke._.blankLine(),me.b.create({id:"infoBox",iconType:q.testEnum,message:z}),ke._.halfBlankLine(),Ut.G.enumGroup({id:"testEnum",labelValue:"Icon Type",selectValue:q.testEnum,readonly:K.readonly},Nt.AT),Ut.G.dropdownGroup({id:"testDropdown",labelValue:"Info Box Size",selectOptions:["Short","Medium","Long"],selectValue:q.testDropdown,readonly:K.readonly}),ke._.blankLine(),Be.N.create({id:"testSignal",label:"Test Signal",signalValue:q.testSignal,componentGUID:this._componentGuid}),ke._.blankLine(),Dt.X.createVertical([Ut.G.textGroup({id:"testString",labelValue:"String A",inputValue:q.testString,readonly:K.readonly}),Ut.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:q.testNumber,readonly:K.readonly})],{isContainer:!0,isCollapsible:!0,title:"Collapsible"}),Dt.X.createVertical([Ut.G.textGroup({id:"testString",labelValue:"String A",inputValue:q.testString,readonly:K.readonly}),Ut.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:q.testNumber,readonly:K.readonly})],{isContainer:!0,title:"Not Collapsible"}),Dt.X.createVertical([Ut.G.textGroup({id:"testString",labelValue:"String A",inputValue:q.testString,readonly:K.readonly}),Ut.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:q.testNumber,readonly:K.readonly})],{isContainer:!0,title:"Start Collapsed",isCollapsible:!0,startCollapsed:!0}),ke._.line(),Dt.X.createVertical([me.b.create({id:"updateModeInfoBox",iconType:Nt.AT.Verbose,message:Y}),ke._.halfBlankLine(),Ut.G.enumGroup({id:"testUpdateMode",labelValue:"Mode",selectValue:q.testUpdateMode},Nt.JG),Ut.G.textGroup({id:"testUpdateModeInput",labelValue:"Input",inputValue:q.testUpdateModeInput,inputUpdateMode:q.testUpdateMode}),Ut.G.textGroup({id:"testUpdateModeOutput",labelValue:"Output",inputValue:q.testUpdateModeInput,readonly:!0})],{isContainer:!0,isCollapsible:!0,title:"Update Modes"}),ke._.line(),Ut.G.filePickerGroup({id:"testFilePicker",labelValue:"File Picker",allowedExtensions:["png"],onChange:q=>{console.log(`****** picked: ${q}`)}})])}}let Ge=class extends Z.u{constructor(){super(...arguments),this._testVector=new At.I,this._testSize=new St.o,this._testEnum=Nt.AT.Info,this._testUpdateMode=Nt.JG.Confirm}destroy(){var q;super.destroy(),null===(q=this._testSignal)||void 0===q||q.dispose()}};(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],Ge.prototype,"_testString",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Ge.prototype,"_testNumber",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String)],Ge.prototype,"_testColorStr",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",Number)],Ge.prototype,"_testColorNum",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],Ge.prototype,"_testBoolean",void 0),(0,X.Cg)([(0,it._H)(),(0,X.Sn)("design:type",At.I)],Ge.prototype,"_testVector",void 0),(0,X.Cg)([(0,it.oB)(),(0,X.Sn)("design:type",St.o)],Ge.prototype,"_testSize",void 0),(0,X.Cg)([(0,it.gf)(Nt.AT),(0,X.Sn)("design:type",String)],Ge.prototype,"_testEnum",void 0),(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],Ge.prototype,"_testDropdown",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],Ge.prototype,"_testSignal",void 0),(0,X.Cg)([(0,it.gf)(Nt.JG),(0,X.Sn)("design:type",String)],Ge.prototype,"_testUpdateMode",void 0),(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],Ge.prototype,"_testUpdateModeInput",void 0),Ge=(0,X.Cg)([(0,J.EV)("TestComponent"),(0,Rt.W)(Fe)],Ge);class je{static fromSliceFile(q){const K=new je,z=JSON.parse(q);return K.sliceData={top:z.top,bottom:z.bottom,right:z.right,left:z.left},K.sliceImage=z.image,K}static toSliceFile(q){return JSON.stringify({top:q.sliceData.top,bottom:q.sliceData.bottom,right:q.sliceData.right,left:q.sliceData.left,image:q.sliceImage})}}let $e=class extends It{constructor(){super(...arguments),this._slice=new je}initialize(q,K){super.initialize(q,K);const z=this._editorAPI.getFilePath(this._fileGuid);z?(this._path=z,this._slice=je.fromSliceFile(this._editorAPI.readFileSync(this._path).toString())):ht.V.log(`Failed to get filepath for ${this._fileGuid}`,ct.$.Error)}generateImageGuidInspector(){return Mt.f.create({id:`image-guid-picker-${this._fileGuid}`,labelValue:"Image",inputValue:this._slice.sliceImage,inputType:"text",onChange:q=>{this._slice.sliceImage=q,this._editorAPI.writeToPath(this._path,je.toSliceFile(this._slice)),this._editorAPI.redrawCustomInspector()}})}generateNineSliceInspector(){return Ut.G.fourDimensionGroup({id:`slice-inspector-${this._fileGuid}`,labelValue:"Slice Data",xKey:"top",yKey:"bottom",zKey:"right",wKey:"left",labelTooltip:"The slice data for the image",fourInputValue:this._slice.sliceData,inputUpdateMode:Nt.JG.Confirm,onChange:(q,K)=>{this._slice.sliceData=Object.assign(Object.assign({},this._slice.sliceData),{[q]:K}),this._editorAPI.writeToPath(this._path,je.toSliceFile(this._slice)),this._editorAPI.redrawCustomInspector()}})}generate(){return this._path?Dt.X.createVertical([this.generateNineSliceInspector(),this.generateImageGuidInspector()]):me.b.create({id:`failed-slice-path-${this._fileGuid}`,iconType:Nt.AT.Error,message:`Failed to get filepath for ${this._fileGuid} (likely a race condition with the editors internal file structure). Please re-select the file.`})}};$e=(0,X.Cg)([(0,rt.aw)("slice")],$e);class He extends Ot.${generate(q,K){const z=[],Y=[];Y.push(Ut.G.colorPickerGroup({id:"tintDefault",labelValue:"Tint Default",inputValue:q.tintDefault}),Ut.G.numberGroup({id:"tintIntensityDefault",labelValue:"Tint Intensity Default",inputValue:q.tintIntensityDefault})),Y.push(Ut.G.colorPickerGroup({id:"tintOver",labelValue:"Tint Over",inputValue:q.tintOver}),Ut.G.numberGroup({id:"tintIntensityOver",labelValue:"Tint Intensity Over",inputValue:q.tintIntensityOver})),Y.push(Ut.G.colorPickerGroup({id:"tintDown",labelValue:"Tint Down",inputValue:q.tintDown}),Ut.G.numberGroup({id:"tintIntensityDown",labelValue:"Tint Intensity Down",inputValue:q.tintIntensityDown})),Y.push(Ut.G.colorPickerGroup({id:"tintFocus",labelValue:"Tint Focus",inputValue:q.tintFocus}),Ut.G.numberGroup({id:"tintIntensityFocus",labelValue:"Tint Intensity Focus",inputValue:q.tintIntensityFocus})),Y.push(Ut.G.colorPickerGroup({id:"tintDisable",labelValue:"Tint Disable",inputValue:q.tintDisable}),Ut.G.numberGroup({id:"tintIntensityDisable",labelValue:"Tint Intensity Disable",inputValue:q.tintIntensityDisable}));const Q=[];Q.push(Ut.G.numberGroup({id:"alphaDefault",labelValue:"Alpha Default",inputValue:q.alphaDefault}),Ut.G.numberGroup({id:"alphaOver",labelValue:"Alpha Over",inputValue:q.alphaOver}),Ut.G.numberGroup({id:"alphaDown",labelValue:"Alpha Down",inputValue:q.alphaDown}),Ut.G.numberGroup({id:"alphaFocus",labelValue:"Alpha Focus",inputValue:q.alphaFocus}),Ut.G.numberGroup({id:"alphaDisable",labelValue:"Alpha Disable",inputValue:q.alphaDisable}));const X=[];X.push(Ut.G.vectorGroup({id:"scaleDefault",labelValue:"Vector Default",vectorValue:q.scaleDefault}),Ut.G.vectorGroup({id:"scaleOver",labelValue:"Vector Over",vectorValue:q.scaleOver}),Ut.G.vectorGroup({id:"scaleDown",labelValue:"Vector Down",vectorValue:q.scaleDown}),Ut.G.vectorGroup({id:"testFocus",labelValue:"Vector Focus",vectorValue:q.scaleFocus}),Ut.G.vectorGroup({id:"testDisable",labelValue:"Vector Disable",vectorValue:q.scaleDisable}));const Z=[];return Z.push(Ut.G.imagePickerGroup({id:"assetDefault",labelValue:"Asset Default",guid:q.assetDefault}),Ut.G.imagePickerGroup({id:"assetOver",labelValue:"Asset Over",guid:q.assetOver}),Ut.G.imagePickerGroup({id:"assetDown",labelValue:"Asset Down",guid:q.assetDown}),Ut.G.imagePickerGroup({id:"assetFocus",labelValue:"Asset Focus",guid:q.assetFocus}),Ut.G.imagePickerGroup({id:"assetDisable",labelValue:"Asset Disable",guid:q.assetDisable})),z.push(Dt.X.createVertical(Y,{isContainer:!0,title:"Tint",isCollapsible:!0,startCollapsed:!0}),Dt.X.createVertical(Q,{isContainer:!0,title:"Alpha",isCollapsible:!0,startCollapsed:!0}),Dt.X.createVertical(X,{isContainer:!0,title:"Scale",isCollapsible:!0,startCollapsed:!0}),Dt.X.createVertical(Z,{isContainer:!0,title:"Asset",isCollapsible:!0,startCollapsed:!0})),Dt.X.createVertical(z)}}var Ve=z(74786),We=(z(62131),z(83793));let qe=class extends Z.u{constructor(){super(...arguments),this.imageGuids=[],this._targetGraphic=new Oe,this.onImageChanged=new $t.H}postCreate(){super.postCreate(),this._currentIndex=0,this.imageGuids.length&&this.updateImage()}nextImage(){0!==this.imageGuids.length?(this._currentIndex++,this._currentIndex%=this.imageGuids.length,this.updateImage()):ht.V.log("There are no images in imageGuids to display",ct.$.Error)}previousImage(){0!==this.imageGuids.length?(this._currentIndex+=this.imageGuids.length-1,this._currentIndex%=this.imageGuids.length,this.updateImage()):ht.V.log("There are no images in imageGuids to display",ct.$.Error)}updateImage(){const q=this.imageGuids[this._currentIndex];this._targetGraphic.updateAsset(q),this.onImageChanged.dispatch(q)}destroy(){this.onImageChanged.dispose(),super.destroy()}};(0,X.Cg)([(0,it.SZ)(),(0,it.W_)(),(0,X.Sn)("design:type",Array)],qe.prototype,"imageGuids",void 0),(0,X.Cg)([(0,it.Mn)(Oe),(0,X.Sn)("design:type",Oe)],qe.prototype,"_targetGraphic",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],qe.prototype,"onImageChanged",void 0),(0,X.Cg)([(0,We.G)(),(0,X.Sn)("design:type",Function),(0,X.Sn)("design:paramtypes",[]),(0,X.Sn)("design:returntype",void 0)],qe.prototype,"nextImage",null),(0,X.Cg)([(0,We.G)(),(0,X.Sn)("design:type",Function),(0,X.Sn)("design:paramtypes",[]),(0,X.Sn)("design:returntype",void 0)],qe.prototype,"previousImage",null),qe=(0,X.Cg)([(0,J.EV)("ImageCycle",J.YH.ui)],qe);var Ke=z(30290);let ze=class extends Z.u{constructor(){super(...arguments),this._speed=250,this.onTweenStarted=new $t.H,this.onTweenStopped=new $t.H,this._isReturning=!1}toggleTween(){const q=this.gameObject.transform;this._movementTween?(this._movementTween.onRepeat.removeAll(),this._movementTween.remove(),this._movementTween=null,this.resetPosition(),this.onTweenStopped.dispatch()):(this.resetPosition(),this._movementTween=tt.W.instance.game.add.tween(q.localPosition,this),this._movementTween.to({x:this._endPosition.localPosition.x,y:this._endPosition.localPosition.y},this.getTravelDuration(),Ke.G.Linear.None,!0,0,-1,!0),this._movementTween.onRepeat.add((()=>{this._isReturning=!this._isReturning,this.faceDirection()})),this.onTweenStarted.dispatch())}resetPosition(){this.gameObject.transform.localPosition=this._startPosition.localPosition,this._isReturning=!1,this.faceDirection()}faceDirection(){if(this.gameObject){const q=this.gameObject.transform,K=this._isReturning?this._startPosition:this._endPosition,z=Math.sign(K.localPosition.x-q.localPosition.x);0!==z&&this.gameObject.transform.setScale(z,q.localScale.y)}}getTravelDuration(){return wt.c.distance(this.gameObject.transform.localPosition.x,this.gameObject.transform.localPosition.y,this._endPosition.localPosition.x,this._endPosition.localPosition.y)/this._speed*1e3}destroy(){this.onTweenStarted.dispose(),this.onTweenStopped.dispose(),super.destroy()}};(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],ze.prototype,"_speed",void 0),(0,X.Cg)([(0,it.Mn)(kt.d),(0,X.Sn)("design:type",kt.d)],ze.prototype,"_startPosition",void 0),(0,X.Cg)([(0,it.Mn)(kt.d),(0,X.Sn)("design:type",kt.d)],ze.prototype,"_endPosition",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],ze.prototype,"onTweenStarted",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],ze.prototype,"onTweenStopped",void 0),ze=(0,X.Cg)([(0,J.EV)("TransformYoyo",J.YH.motion,"Transform patrol between two points")],ze);var Ye=z(300),Qe=z(79687);let Xe=class{constructor(){this.fsmFactories=null,this.data=null,this.variables=null,this.currentState=null,this.onComplete=new $t.H}get OnComplete(){return this.onComplete}init(q,K,z){this.fsmFactories=q,this.data=K,this.variables=z}execute(q=!1){this.currentState||this.executeNext(q)}executeWithData(q,K){this.currentState=q;const z=this.fsmFactories.createState(q,this.variables);z.OnComplete.addOnce((()=>{this.onStateCompleted(K)}),this),z.execute(K)}executeWithName(q,K){for(let z=0;z0){for(let K=0;K0){let q=!0;for(let K=0;K1)switch(q.charAt(0)){case"$":z=this.findVariable(q.substr(1),K);break;case"#":z=ft.w.getActiveScene().container.get(q.substr(1))}return z}if(q.constructor===Array){const z=[];for(let Y=0;YK=>{Je[q]=K};var ei;let ii=ei=class{deserializeCollection(q){return ei.deserializeCollection(q,this.deserialize)}serializeCollection(q){return ei.serializeCollection(q,this.serialize)}static deserializeCollection(q,K){const z=[];if(q)for(let Y=0;YK;default:return!1}}};Ai=(0,X.Cg)([(0,Qe.injectable)()],Ai);let Ci=class{constructor(){this.fsmFactories=null,this.data=null,this.variables=null,this.actions=[],this.actionsCompleted=0,this.onComplete=new $t.H}get OnComplete(){return this.onComplete}init(q,K,z){this.fsmFactories=q,this.data=K,this.variables=z}execute(q=!1){if(q&&ht.V.log(`Executing STATE ${this.data.name}`,ct.$.Verbose),this.data.actions.length>0){for(let K=0;K(K,z)=>{const Y=q.container.resolve(Xe);return Y.init(this,K,z),Y})),this.add(Ci,(q=>(K,z)=>{const Y=q.container.resolve(Ci);return Y.init(this,K,z),Y})),this.add(Ze,(q=>(K,z)=>{const Y=K.Type;if(Je.hasOwnProperty(Y)){const Q=q.container.resolve(Je[Y]);return Q.init(K,z),Q}return null})),this.add(Ai,(q=>(K,z)=>{const Y=q.container.resolve(Ai);return Y.init(K,z),Y}))}createStateMachine(q,K){return this.create(Xe,q,K)}createState(q,K){return this.create(Ci,q,K)}createAction(q,K){return this.create(Ze,q,K)}createCondition(q,K){return this.create(Ai,q,K)}};Oi=(0,X.Cg)([(0,Qe.injectable)()],Oi);let Ii=class{constructor(q){this.fsmFactories=null,this.fsmFactories=q}execute(q,K,z=null){this.createStateMachine(q,K,z).execute()}createStateMachine(q,K,z){const Y=this.fsmFactories.createStateMachine(q,K);return z&&Y.OnComplete.addOnce(z),Y}};Ii=(0,X.Cg)([(0,Qe.injectable)(),(0,X.Qj)(0,(0,Qe.inject)(at.FSMFactories)),(0,X.Sn)("design:paramtypes",[Oi])],Ii);let Di=class extends Ii{execute(q,K,z=null){this.createStateMachine(q,K,z).execute(!0)}};Di=(0,X.Cg)([(0,Qe.injectable)()],Di);z(3004);var Ri=z(36361),Pi=z(18830);let Mi=class extends Z.u{constructor(){super(...arguments),this.components=[],this.identifier=null,this.context=null}get Identifier(){return this.identifier}set Identifier(q){const K=this.GameObject.findComponentInParent(Pi.b);null!==K&&null!==this.components&&(null!==this.identifier&&K.Container.unbind(this.identifier),null!==q&&this.bindComponents(q,this.components)),this.identifier=q}get Components(){return this.components}set Components(q){const K=this.GameObject.findComponentInParent(Pi.b);null!==K&&null!==this.identifier&&(null!==this.components&&K.Container.unbind(this.identifier),null!==q&&this.bindComponents(this.identifier,q)),this.components=q}get Context(){return null!==this.context?this.context:this.GameObject.findComponentInParent(Pi.b)}set Context(q){null!==this.context&&this.context.Container.unbind(this.identifier),this.context=q,null!==this.identifier&&null!==this.components&&this.bindComponents(this.identifier,this.components)}create(){super.create(),null!==this.identifier&&null!==this.components&&this.bindComponents(this.identifier,this.components)}destroy(){if(null!==this.identifier){const q=this.Context;null!==q&&q.Container.unbind(this.identifier)}super.destroy()}bindComponents(q,K){const z=this.Context;null!==z&&(1===K.length?z.Container.bind(q).toConstantValue(K[0]):K.length>1&&z.Container.bind(q).toConstantValue(K))}};(0,X.Cg)([(0,it.E8)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],Mi.prototype,"components",void 0),(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],Mi.prototype,"identifier",void 0),(0,X.Cg)([(0,it.Mn)(Pi.b),(0,X.Sn)("design:type",Pi.b)],Mi.prototype,"context",void 0),Mi=(0,X.Cg)([(0,J.EV)("ContextBinding",J.YH.injection,"Context binding component is a way of pushing binding up the chain of GameObjects")],Mi);const Ni=(q,K,z)=>{const Y=`INJECTION_PARAMS_${K}`,Q=z.value;z.value=function(...K){const z=Reflect.getMetadata(Y,q);if(Array.isArray(z))for(let q=0;q(K,z,Y)=>{const Q=`INJECTION_PARAMS_${z}`,X=Reflect.getMetadata(Q,K);Array.isArray(X)?X.push({identifier:q,index:Y}):Reflect.defineMetadata(Q,[{identifier:q,index:Y}],K)},Li=(q,K=!0)=>(z,Y)=>{Object.defineProperty(z,Y,{get(){const z=Xt.U.getInjectedValue(this.gameObject,q);return K&&null!==z&&Object.defineProperty(this,Y,{get:()=>z}),z},configurable:!0})},ki=(q,K=!0)=>(z,Y)=>{Object.defineProperty(z,Y,{get(){const z=this.getInjectedValue(q);return K&&null!==z&&Object.defineProperty(this,Y,{get:()=>z}),z},configurable:!0})};class Bi{constructor(){this.container=null,this._isInstalled=!1}get Container(){return this.container}install(q){this.container=q,this._isInstalled||(this.installBindings(),this._isInstalled=!0)}cleanup(){}}class Ui extends Z.u{getInjectedValue(q){return Xt.U.getInjectedValue(this.gameObject,q)}}class Fi{constructor(q){this.container=null,this.container=q}getInjectedValue(q){return this.container.get(q)}}let Gi=class extends Z.u{constructor(){super(...arguments),this.installers=[]}get Installers(){return this.installers}create(){super.create(),this.installers.length>0&&this.runInstallers()}runInstallers(){for(let q=0;q0){const q=ft.w.getActiveScene().container;q.hasBinding(this._identifier)||q.bind(this._identifier).toConstantValue(1===this._components.length?this._components[0]:this._components)}}destroy(){if(null!==this._identifier){const q=1===this._components.length?this._components[0]:this._components;ft.w.getActiveScene().container.get(this._identifier)===q&&ft.w.getActiveScene().container.unbind(this._identifier)}super.destroy()}};(0,X.Cg)([(0,it.Mn)(Z.u),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],ji.prototype,"_components",void 0),(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],ji.prototype,"_identifier",void 0),ji=(0,X.Cg)([(0,J.EV)("SceneContextBinding",J.YH.injection,"Binds the list of components to the scene container")],ji);var $i=z(86766),Hi=z(93337);let Vi=class extends Z.u{setState(q){}};var Wi;Vi=(0,X.Cg)([(0,J.EV)("TransitionComponent (abstract)")],Vi),function(q){q[q.Default=0]="Default",q[q.Over=1]="Over",q[q.Down=2]="Down",q[q.Focus=3]="Focus",q[q.Disabled=4]="Disabled"}(Wi||(Wi={}));let qi=class extends $i.S{constructor(){super(...arguments),this._transitions=[],this._useHandCursor=!0,this.allowDisabledInput=!1,this._isButtonEnabled=!0,this.alwaysTransition=!1,this._currentState=Wi.Default}get isButtonEnabled(){return this._isButtonEnabled}get _canTransition(){return this._currentState!==Wi.Disabled||this.alwaysTransition}get currentState(){return this._currentState}set awaitingListeners(q){this._awaitingListeners=q,this.applyInputEnabledSetting(!q),this.setState(q?Wi.Disabled:Wi.Default)}create(){super.create(),this._transitions=this.GameObject.findComponentsInChildren(Vi)}destroy(){this._transitions=[],super.destroy()}firstUpdate(){super.firstUpdate(),this.setState(this._currentState)}setButtonEnabled(q=!0){q!==this._isButtonEnabled&&(this._isButtonEnabled=q,this.allowDisabledInput||(this.inputEnabled=q,this.applyUseHandCursorSetting(!!q&&this._useHandCursor)),this.setState(q?Wi.Default:Wi.Disabled))}onPointerDown(q){(0,Hi.H)(q)||this.shouldDebounce()||(this._canTransition&&this.setState(Wi.Down),super.onPointerDown(q))}onPointerUp(q){(0,Hi.H)(q)||this.shouldDebounce()||(this._canTransition&&(this._isOver?this.setState(Wi.Over):this.setState(this._isButtonEnabled?Wi.Default:Wi.Disabled)),super.onPointerUp(q))}onPointerUpOutside(q){(0,Hi.H)(q)||(this._canTransition&&this.setState(this._isButtonEnabled?Wi.Default:Wi.Disabled),super.onPointerUpOutside(q))}onPointerOver(q){(0,Hi.H)(q)||(this._canTransition&&this.setState(Wi.Over),this._isOver=!0,super.onPointerOver(q))}onPointerOut(q){(0,Hi.H)(q)||(this._canTransition&&this.setState(this._isButtonEnabled?Wi.Default:Wi.Disabled),this._isOver=!1,super.onPointerOut(q))}setState(q){this._currentState=q;for(let K=0;K0){const q=tt.W.instance.game.cache.getTexture(Y);q&&(Z.image.texture=q)}Z.tint=X,Z.setAlpha(z),this.gameObject.transform.setScale(q.x,q.y);break;case this._defaultRenderComponent instanceof Yi:const J=this._defaultRenderComponent;(null==Y?void 0:Y.length)>0&&J.setSlicedImage(Y),J.slicedImage.tint=X,J.slicedImage.alpha=z,this.gameObject.transform.setScale(q.x,q.y);break;case this._defaultRenderComponent instanceof ve:(null==Y?void 0:Y.length)>0&&ht.V.log("Associated RenderComponent (Text) is not a supported type for image transitions",ct.$.Warning);const et=this._defaultRenderComponent;et.tint=X,et.alpha=z,this.gameObject.transform.setScale(q.x,q.y);break;case this._defaultRenderComponent instanceof zi.j:const it=this._defaultRenderComponent;it.tintColor=K,it.alpha=z,it.tintIntensity=Q,this.gameObject.transform.setScale(q.x,q.y),it.updateFilter();break;default:const st=this._defaultRenderComponent.getRootContainer();st&&(st.alpha=z),this.gameObject.transform.setScale(q.x,q.y),ht.V.log("Associated RenderComponent is not a supported type for tint or image transitions",ct.$.Warning)}}};(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String)],Qi.prototype,"_tintDefault",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String)],Qi.prototype,"_tintOver",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String)],Qi.prototype,"_tintDown",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String)],Qi.prototype,"_tintFocus",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String)],Qi.prototype,"_tintDisable",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"tintIntensityDefault",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"tintIntensityOver",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"tintIntensityDown",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"tintIntensityFocus",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"tintIntensityDisable",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"alphaDefault",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"alphaOver",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"alphaDown",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"alphaFocus",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Qi.prototype,"alphaDisable",void 0),(0,X.Cg)([(0,it._H)(),(0,X.Sn)("design:type",At.I)],Qi.prototype,"_scaleDefault",void 0),(0,X.Cg)([(0,it._H)(),(0,X.Sn)("design:type",At.I)],Qi.prototype,"_scaleOver",void 0),(0,X.Cg)([(0,it._H)(),(0,X.Sn)("design:type",At.I)],Qi.prototype,"_scaleDown",void 0),(0,X.Cg)([(0,it._H)(),(0,X.Sn)("design:type",At.I)],Qi.prototype,"_scaleFocus",void 0),(0,X.Cg)([(0,it._H)(),(0,X.Sn)("design:type",At.I)],Qi.prototype,"_scaleDisable",void 0),(0,X.Cg)([(0,it.i0)(Ki.Z.SingleImage),(0,X.Sn)("design:type",String)],Qi.prototype,"_assetDefault",void 0),(0,X.Cg)([(0,it.i0)(Ki.Z.SingleImage),(0,X.Sn)("design:type",String)],Qi.prototype,"_assetOver",void 0),(0,X.Cg)([(0,it.i0)(Ki.Z.SingleImage),(0,X.Sn)("design:type",String)],Qi.prototype,"_assetDown",void 0),(0,X.Cg)([(0,it.i0)(Ki.Z.SingleImage),(0,X.Sn)("design:type",String)],Qi.prototype,"_assetFocus",void 0),(0,X.Cg)([(0,it.i0)(Ki.Z.SingleImage),(0,X.Sn)("design:type",String)],Qi.prototype,"_assetDisable",void 0),(0,X.Cg)([(0,te.Pq)(jt.y),(0,X.Sn)("design:type",jt.y)],Qi.prototype,"_defaultRenderComponent",void 0),Qi=(0,X.Cg)([(0,J.EV)("RenderableTransition",J.YH.transition),(0,Rt.W)(He)],Qi);let Xi=class extends Z.u{constructor(){super(...arguments),this.ratio=1}get rectTransform(){return this._rectTransform}};(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Xi.prototype,"ratio",void 0),(0,X.Cg)([(0,te.Pq)(Tt.X),(0,X.Sn)("design:type",Tt.X)],Xi.prototype,"_rectTransform",void 0),Xi=(0,X.Cg)([(0,J.EV)("FlexGrow",J.YH.uiLayout,"A data component that tells `FlexContainerComponent` that this child object should grow.")],Xi);const Zi=(q,K)=>q+K;var Ji,ts,es;!function(q){q[q.Rows=0]="Rows",q[q.Columns=1]="Columns"}(Ji||(Ji={})),function(q){q[q.Gutter=0]="Gutter",q[q.Centered=1]="Centered",q[q.SpaceEvenly=2]="SpaceEvenly"}(ts||(ts={})),function(q){q[q.Top=0]="Top",q[q.Center=1]="Center",q[q.Bottom=2]="Bottom"}(es||(es={}));let is=class extends Z.u{constructor(){super(...arguments),this.onChildrenRearranged=new $t.H,this.resizeContainer=!0,this.minWidth=0,this.minHeight=0,this.wrap=!1,this.direction=Ji.Rows,this.gutter=0,this.rowGutter=0,this.useRowGutter=!1,this.spacing=ts.Gutter,this.align=es.Top,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.paddingLeft=0,this._shouldRearrangeChildren=!0}getSizeOfRectForDirection(q,K=!1){return this.direction===Ji.Columns?K?q.widthDelta:q.heightDelta:K?q.heightDelta:q.widthDelta}rowSizeOfChildren(q){return q.reduce(((q,K)=>q+this.getSizeOfRectForDirection(K.findComponent(Tt.X))),0)+(q.length-1)*this.gutter}resizeChildrenForRow(q,K){const z=q.reduce(((q,K)=>{const z=K.findComponent(Xi);if(z){const{rectTransform:K}=z;this.direction===Ji.Rows?K.setSizeDelta(0,K.heightDelta):K.setSizeDelta(K.widthDelta,0),q.push(z)}return q}),[]),Y=Math.max(K-this.rowSizeOfChildren(q),0),Q=z.map((q=>q.ratio)).reduce(Zi,0);z.forEach((q=>{const{rectTransform:K}=q,z=Y/Q*q.ratio+this.getSizeOfRectForDirection(K);this.direction===Ji.Rows?K.setSizeDelta(z,K.heightDelta):K.setSizeDelta(K.widthDelta,z)}))}distributeChildrenOnRow(q,K,z){this.resizeChildrenForRow(q,K);const Y=q.map((q=>q.findComponent(Tt.X))),Q=Y.map((q=>this.getSizeOfRectForDirection(q))).reduce(Zi,0),X=(()=>this.spacing===ts.SpaceEvenly?Math.max(this.gutter,(K-Q)/(q.length-1)):this.gutter)();let Z=this.direction===Ji.Rows?this.paddingLeft:this.paddingTop;if(this.spacing===ts.Centered){Z+=Math.max(K-this.rowSizeOfChildren(q),0)/2}const J=Y.map((q=>this.getSizeOfRectForDirection(q,!0))).reduce(((q,K)=>Math.max(q,K)),0);for(const tt of Y){let q=z;const K=this.getSizeOfRectForDirection(tt,!0);this.align===es.Center?q+=(J-K)/2:this.align===es.Bottom&&(q+=J-K),this.direction===Ji.Columns?tt.setPosition(q,Z):tt.setPosition(Z,q),Z+=this.getSizeOfRectForDirection(tt)+X}return J}arrangeChildren(){const q=this.gameObject.children.filter((q=>q.active));if(0===q.length)return;const K=(()=>this.direction===Ji.Columns?this._rectTransform.fullHeight-this.paddingBottom-this.paddingTop:this._rectTransform.fullWidth-this.paddingLeft-this.paddingRight)();let z=this.direction===Ji.Rows?this.paddingTop:this.paddingLeft;const Y=[];if(this.wrap)for(const X of q){const q=this.getSizeOfRectForDirection(X.findComponent(Tt.X));if(this.rowSizeOfChildren(Y)+q+this.gutter>K){z+=this.distributeChildrenOnRow(Y,K,z)+(this.useRowGutter?this.rowGutter:this.gutter),Y.length=0}Y.push(X)}else Y.push(...q);const Q=this.distributeChildrenOnRow(Y,K,z);if(this.resizeContainer){const q=Q+z+(this.direction===Ji.Rows?this.paddingBottom:this.paddingRight);this.direction===Ji.Rows?this._rectTransform.setSizeDelta(this._rectTransform.widthDelta,Math.max(this.minHeight,q)):this.direction===Ji.Columns&&this._rectTransform.setSizeDelta(Math.max(this.minWidth,q),this._rectTransform.heightDelta)}}triggerRearrange(){this._shouldRearrangeChildren=!0}postCreate(){super.postCreate(),this._rectTransform||(this._rectTransform=this.gameObject.findComponent(Tt.X)||this.gameObject.addComponent(Tt.X)),this._rectTransform.onDimensionsChanged.add(this.arrangeChildren,this);const q=q=>{q.onActiveChanged.add(this.triggerRearrange,this);const K=q.findComponent(Tt.X);if(!K)throw new Error("Children of FlexContainerComponent must have a RectTransform");K.onDimensionsChanged.add(this.triggerRearrange,this),this.triggerRearrange()};this.gameObject.children.forEach(q),this.gameObject.onChildAdded.add(q),this.gameObject.onChildRemoved.add((q=>{var K;q.onActiveChanged.remove(this.triggerRearrange,this),null===(K=q.findComponent(Tt.X))||void 0===K||K.onDimensionsChanged.remove(this.triggerRearrange,this),this.triggerRearrange()}))}destroy(){this._rectTransform.onDimensionsChanged.remove(this.arrangeChildren,this),super.destroy()}update(){this._shouldRearrangeChildren&&(this.arrangeChildren(),this._shouldRearrangeChildren=!1,this.onChildrenRearranged.dispatch())}setMinHeight(q){this.minHeight=q,this.resizeContainerToMins()}resizeContainerToMins(){this._rectTransform.setSizeDelta(Math.max(this.minWidth,this._rectTransform.widthDelta),Math.max(this.minHeight,this._rectTransform.heightDelta))}};(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],is.prototype,"onChildrenRearranged",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],is.prototype,"resizeContainer",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],is.prototype,"minWidth",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],is.prototype,"minHeight",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],is.prototype,"wrap",void 0),(0,X.Cg)([(0,it.gf)(Ji),(0,X.Sn)("design:type",Number)],is.prototype,"direction",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],is.prototype,"gutter",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],is.prototype,"rowGutter",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],is.prototype,"useRowGutter",void 0),(0,X.Cg)([(0,it.gf)(ts),(0,X.Sn)("design:type",Number)],is.prototype,"spacing",void 0),(0,X.Cg)([(0,it.gf)(es),(0,X.Sn)("design:type",Number)],is.prototype,"align",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],is.prototype,"paddingTop",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],is.prototype,"paddingRight",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],is.prototype,"paddingBottom",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],is.prototype,"paddingLeft",void 0),(0,X.Cg)([(0,te.Pq)(Tt.X),(0,X.Sn)("design:type",Tt.X)],is.prototype,"_rectTransform",void 0),is=(0,X.Cg)([(0,J.EV)("FlexContainer",J.YH.uiLayout,"`FlexContainerComponent` will automatically arrange its children into rows or columns based on the size of the its and the child's `RectTransform`.")],is);var ss,ns=z(82538),as=z(21979);!function(q){q[q.Start=0]="Start",q[q.Center=1]="Center",q[q.End=2]="End"}(ss||(ss={}));let rs=class extends as.P{constructor(){super(...arguments),this._fixedRowCount=0,this._fixedColumnCount=0,this._dynamicRowHeight=!1,this._dynamicColumnWidth=!1,this._rowSpacing=0,this._columnSpacing=0,this._xPositionOffset=0,this._yPositionOffset=0,this._alignmentAnchorX=0,this._alignmentAnchorY=0,this._fillPriority=ns.e.Horizontal,this._reverseFillRow=!1,this._reverseFillColumn=!1,this._indexOffset=0,this.onUpdated=new $t.H,this._lastLineAlignment=ss.Start}get fixedRowCount(){return this._fixedRowCount}get fixedColumnCount(){return this._fixedColumnCount}get dynamicRowHeight(){return this._dynamicRowHeight}get dynamicColumnWidth(){return this._dynamicColumnWidth}get rowSpacing(){return this._rowSpacing}get columnSpacing(){return this._columnSpacing}get xPositionOffset(){return this._xPositionOffset}get yPositionOffset(){return this._yPositionOffset}get alignmentAnchorX(){return this._alignmentAnchorX}get alignmentAnchorY(){return this._alignmentAnchorY}get fillPriority(){return this._fillPriority}get indexOffset(){return this._indexOffset}set indexOffset(q){this._indexOffset=q}postDeserialize(){super.postDeserialize(),this._fixedRowCount<1&&this._fixedColumnCount<1?(ht.V.log("At least one direction in grid needs to be a fixed size",ct.$.Error),this._fixedRowCount=1,this._fixedColumnCount=1):this._fixedRowCount<1&&this._fixedColumnCount>=1?(this._fillPriority=ns.e.Horizontal,this._reverseFillRow=!1):this._fixedRowCount>=1&&this._fixedColumnCount<1&&(this._fillPriority=ns.e.Vertical,this._reverseFillColumn=!1)}destroy(){this.onUpdated.dispose(),super.destroy()}setFixedColumnCount(q){this._fixedColumnCount=q,this.updateAll()}setFixedRowCount(q){this._fixedRowCount=q,this.updateAll()}setXOffset(q){this._xPositionOffset=q,this.updateAll()}setYOffset(q){this._yPositionOffset=q,this.updateAll()}getLayoutPositionX(q){const K=this.getColumn(q+this._indexOffset),z=this.getTotalCellCount(),Y=this.getGameObjectList().length;if(this.fillPriority===ns.e.Vertical||1===this.getColumnCount()||this._dynamicColumnWidth||Y===z||q+this._indexOffset=1&&(K=this._fixedRowCount-1-K),K}getColumn(q){let K;return K=this._fillPriority===ns.e.Horizontal?q%this._fixedColumnCount:Math.floor(q/this._fixedRowCount),this._reverseFillColumn&&this._fixedColumnCount>=1&&(K=this._fixedColumnCount-1-K),K}getRowCount(){const q=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===ns.e.Horizontal?Math.ceil(q/this._fixedColumnCount):Math.min(q,this._fixedRowCount)}getColumnCount(){const q=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===ns.e.Horizontal?Math.min(q,this._fixedColumnCount):Math.ceil(q/this._fixedRowCount)}getTotalCellCount(){if(this._fixedRowCount>0&&this._fixedColumnCount>0)return this._fixedRowCount*this._fixedColumnCount}isFilled(){return this._fixedRowCount>=1&&this._fixedColumnCount>=1&&this.getGameObjectList().length>=this._fixedRowCount*this._fixedColumnCount}isEmpty(){return this.getGameObjectList().length<=0}setRowSpacing(q){this._rowSpacing=q,this.updateAll()}setColumnSpacing(q){this._columnSpacing=q,this.updateAll()}updateAll(q=!0){const K=this.updateCachedDimensions();super.updateAll(q),this.onUpdated.dispatch(K)}updateCachedDimensions(){const q=Math.max(1,this.getRowCount()),K=Math.max(1,this.getColumnCount()),z=new Array(q).fill(0),Y=new Array(K).fill(0),Q=this.getGameObjectList();for(let J=Q.length-1;J>=0;--J){const q=this.getRow(J),K=this.getColumn(J),X=Q[J],Z=Yt.getWidth(X),tt=Yt.getHeight(X);z[q]=Math.max(z[q],tt),Y[K]=Math.max(Y[K],Z)}this._cachedColumnX=new Array(K),this._cachedRowY=new Array(q);let X=this._xPositionOffset,Z=this._yPositionOffset;for(let J=0;J0){return this.getColumn(q+this.indexOffset)%this.fixedRowCount%2==0?this.alignmentAnchorX:this._alternateAnchorX}return this.alignmentAnchorX}getLayoutAnchorY(q){if(ut.A.isDefined(this._alternateAnchorY)&&this.fixedColumnCount>0){return this.getColumn(q+this.indexOffset)%this.fixedColumnCount%2==0?this.alignmentAnchorY:this._alternateAnchorY}return this.alignmentAnchorY}};var hs,cs;(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],os.prototype,"_alternateAnchorX",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],os.prototype,"_alternateAnchorY",void 0),os=(0,X.Cg)([(0,J.EV)("AlternatingAnchorGridLayout",J.YH.uiLayout,"A custom grid layout component")],os),function(q){q[q.Start=0]="Start",q[q.Center=1]="Center",q[q.End=2]="End"}(hs||(hs={})),function(q){q[q.None=0]="None",q[q.SpaceAround=1]="SpaceAround",q[q.SpaceBetween=2]="SpaceBetween"}(cs||(cs={}));let ds=class extends as.P{constructor(){super(...arguments),this.resizeRectTransform=!1,this.fixedRowCount=0,this.fixedColumnCount=0,this.dynamicRowHeight=!1,this.dynamicColumnWidth=!1,this.justifyRowSpacing=cs.None,this.justifyColumnSpacing=cs.None,this.rowHeight=0,this.columnWidth=0,this._rowSpacing=0,this._columnSpacing=0,this.childAlignmentX=.5,this.childAlignmentY=.5,this.applyChildPivotX=!1,this.applyChildPivotY=!1,this.childPivotX=.5,this.childPivotY=.5,this._fillPriority=ns.e.Horizontal,this.reverseFillRow=!1,this.reverseFillColumn=!1,this.beginningEmptyCells=0,this.lastLineAlignment=hs.Start,this.onUpdated=new $t.H}get rowSpacing(){return this._rowSpacing}set rowSpacing(q){this._rowSpacing=q,this.updateAll()}get columnSpacing(){return this._columnSpacing}set columnSpacing(q){this._columnSpacing=q,this.updateAll()}get fillPriority(){return this.fixedRowCount<1&&this.fixedColumnCount>=1?ns.e.Horizontal:this.fixedRowCount>=1&&this.fixedColumnCount<1?ns.e.Vertical:this._fillPriority}set fillPriority(q){this._fillPriority=q,this.updateAll()}destroy(){this.onUpdated.dispose(),super.destroy()}getLayoutAnchorX(q){var K;if(this.applyChildPivotX)return this.childPivotX;const z=null===(K=this.getGameObjectList()[q])||void 0===K?void 0:K.transform;return z instanceof Tt.X?z.pivot.x:0}getLayoutAnchorY(q){var K;if(this.applyChildPivotY)return this.childPivotY;const z=null===(K=this.getGameObjectList()[q])||void 0===K?void 0:K.transform;return z instanceof Tt.X?z.pivot.y:0}getLayoutPositionX(q){const K=this.getColumn(q+this.beginningEmptyCells);return!this._cachedLastLinePositions||this.fillPriority===ns.e.Vertical||q+this.beginningEmptyCells=1&&(z=K-1-z),z}getColumn(q){const K=this.getColumnCount();let z;return z=this.fillPriority===ns.e.Horizontal?q%K:Math.floor(q/this.getRowCount()),this.reverseFillColumn&&K>=1&&(z=K-1-z),z}getRowCount(){const q=this.getGameObjectList().length+this.beginningEmptyCells;return this.fillPriority===ns.e.Vertical?this.fixedRowCount>0?this.fixedRowCount:Math.max(1,q):this.fixedColumnCount>=1?Math.max(1,this.fixedRowCount,Math.ceil(q/this.fixedColumnCount)):1}getColumnCount(){const q=this.getGameObjectList().length+this.beginningEmptyCells;return this.fillPriority===ns.e.Horizontal?this.fixedColumnCount>0?this.fixedColumnCount:Math.max(1,q):this.fixedRowCount>=1?Math.max(1,this.fixedColumnCount,Math.ceil(q/this.fixedRowCount)):1}getTotalCellCount(){return this.getRowCount()*this.getColumnCount()}isFilled(){return this.fixedRowCount>=1&&this.fixedColumnCount>=1&&this.getGameObjectList().length+this.beginningEmptyCells>=this.fixedRowCount*this.fixedColumnCount}isEmpty(){return this.getGameObjectList().length+this.beginningEmptyCells<=0}updateByIndex(q){var K;const z=null===(K=this.getGameObjectList()[q])||void 0===K?void 0:K.transform;z instanceof Tt.X&&(z.setAnchorMin(.5,.5),z.setAnchorMax(.5,.5)),super.updateByIndex(q)}updateAll(q=!0){const K=this.updateCachedDimensions();super.updateAll(q),q&&this.resizeRectTransform&&this.gameObject.transform instanceof Tt.X&&(this.gameObject.transform.fullWidth=K.width,this.gameObject.transform.fullHeight=K.height),this.onUpdated.dispatch(K)}updateCachedDimensions(){const q=this.getRowCount(),K=this.getColumnCount(),z=new Array(q).fill(this.rowHeight),Y=new Array(K).fill(this.columnWidth),Q=this.getGameObjectList();if(this.dynamicColumnWidth||this.dynamicRowHeight)for(let at=Q.length-1;at>=0;--at){const q=this.getRow(at+this.beginningEmptyCells),K=this.getColumn(at+this.beginningEmptyCells),X=Q[at],Z=X.transform instanceof Tt.X?X.transform:null;if(this.dynamicColumnWidth&&(!Z||Z.anchorMax.x===Z.anchorMin.x)){const q=Yt.getWidth(X);Y[K]=Math.max(Y[K],q)}if(this.dynamicRowHeight&&(!Z||Z.anchorMax.y===Z.anchorMin.y)){const K=Yt.getHeight(X);z[q]=Math.max(z[q],K)}}if(this.GameObject.children.length>1&&this.justifyRowSpacing!==cs.None&&this.GameObject.transform instanceof Tt.X){const K=dt.sum(z),Y=this.justifyRowSpacing===cs.SpaceAround?q+1:q-1;this._rowSpacing=Math.max(0,(this.GameObject.transform.sizeDelta.height-K)/Y)}if(this.GameObject.children.length>1&&this.justifyColumnSpacing!==cs.None&&this.GameObject.transform instanceof Tt.X){const q=dt.sum(Y),z=this.justifyColumnSpacing===cs.SpaceAround?K+1:K-1;this._columnSpacing=Math.max(0,(this.GameObject.transform.sizeDelta.width-q)/z)}this._cachedColumnX=new Array(K),this._cachedRowY=new Array(q);const X=dt.sum(Y)+(K-1)*this._columnSpacing,Z=dt.sum(z)+(q-1)*this._rowSpacing;let J=.5,tt=.5,et=X,it=Z;this.gameObject.transform instanceof Tt.X&&(J=this.gameObject.transform.pivot.x,tt=this.gameObject.transform.pivot.y,this.resizeRectTransform||(et=this.gameObject.transform.fullWidth,it=this.gameObject.transform.fullHeight));let st=Math.round(J*-X+(J-.5)*et),nt=Math.round(tt*-Z+(tt-.5)*it);for(let at=0;at1&&q>1){const z=this.fillPriority===ns.e.Horizontal,Y=(Q.length+this.beginningEmptyCells)%(z?K:q);if(Y>0)if(this.lastLineAlignment===hs.Center){const q=z?this._columnSpacing:this._rowSpacing;let K=-q;const X=z?this.dynamicColumnWidth?Yt.getWidth:()=>0:this.dynamicRowHeight?Yt.getHeight:()=>0,Z=dt.takeRight(Q,Y).map((z=>{const Y=X(z);return K+=Y+q,K})),J=Z[0],tt=K;this._cachedLastLinePositions=Z.map((q=>q-J+this.childPivotX*J-(tt>>1)))}else this._cachedLastLinePositions=dt.takeRight(z?this._cachedColumnX:this._cachedRowY,Y)}return new St.o(X,Z)}};var ls;(0,X.Cg)([(0,it.vk)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Boolean)],ds.prototype,"resizeRectTransform",void 0),(0,X.Cg)([(0,it.g1)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"fixedRowCount",void 0),(0,X.Cg)([(0,it.g1)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"fixedColumnCount",void 0),(0,X.Cg)([(0,it.vk)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Boolean)],ds.prototype,"dynamicRowHeight",void 0),(0,X.Cg)([(0,it.vk)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Boolean)],ds.prototype,"dynamicColumnWidth",void 0),(0,X.Cg)([(0,it.gf)(cs),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"justifyRowSpacing",void 0),(0,X.Cg)([(0,it.gf)(cs),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"justifyColumnSpacing",void 0),(0,X.Cg)([(0,it.g1)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"rowHeight",void 0),(0,X.Cg)([(0,it.g1)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"columnWidth",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],ds.prototype,"_rowSpacing",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],ds.prototype,"_columnSpacing",void 0),(0,X.Cg)([(0,it.g1)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"childAlignmentX",void 0),(0,X.Cg)([(0,it.g1)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"childAlignmentY",void 0),(0,X.Cg)([(0,it.vk)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Boolean)],ds.prototype,"applyChildPivotX",void 0),(0,X.Cg)([(0,it.vk)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Boolean)],ds.prototype,"applyChildPivotY",void 0),(0,X.Cg)([(0,it.g1)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"childPivotX",void 0),(0,X.Cg)([(0,it.g1)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"childPivotY",void 0),(0,X.Cg)([(0,it.gf)(ns.e),(0,X.Sn)("design:type",String)],ds.prototype,"_fillPriority",void 0),(0,X.Cg)([(0,it.vk)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Boolean)],ds.prototype,"reverseFillRow",void 0),(0,X.Cg)([(0,it.vk)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Boolean)],ds.prototype,"reverseFillColumn",void 0),(0,X.Cg)([(0,it.g1)(),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"beginningEmptyCells",void 0),(0,X.Cg)([(0,it.gf)(hs),(0,Zt.x)("updateAll"),(0,X.Sn)("design:type",Number)],ds.prototype,"lastLineAlignment",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],ds.prototype,"onUpdated",void 0),ds=(0,X.Cg)([(0,J.EV)("GridLayoutNew",J.YH.uiLayout,"Grid layout component for UI")],ds),function(q){q[q.JSON=0]="JSON",q[q.Image=1]="Image",q[q.Atlas=2]="Atlas",q[q.Music=3]="Music",q[q.Sound=4]="Sound",q[q.Spine=5]="Spine",q[q.Binary=6]="Binary"}(ls||(ls={}));let us=class{constructor(){this.dataSource=null,this.onDataSourceUpdated=new $t.H}setDataSource(q){this.dataSource=q,this.onDataSourceUpdated.dispatch()}destroy(){this.onDataSourceUpdated.dispose()}};us=(0,X.Cg)([(0,Qe.injectable)()],us);let fs=class extends us{getText(q,...K){if(ut.A.isDefined(q)&&""===q.trim())return q;if(ut.A.isDefined(this.dataSource)){let z=this.dataSource.getValue(q);if(ut.A.isDefined(z)){for(let q=0;q=this._minimumLogLevel&&(this._shouldColorCodeLogs?console.log(`%c[${ct.$[K].toUpperCase()}]%c ${q}`,this.getLogStyle(K),this.getTextStyle(),...z):console.log(`[${ct.$[K].toUpperCase()}] ${q}`,...z),K===this._stackTraceLogLevel&&(console.groupCollapsed(`Error: ${q}`),console.trace(),console.groupEnd()))}table(q,K,z){"object"==typeof q?K>=this._minimumLogLevel&&console.table(q,z):this.log("Message must be an object or array to be logged as a table",ct.$.Warning)}setLogLevel(q){this._minimumLogLevel=q}setColoredLogsEnabled(q){this._shouldColorCodeLogs=q}getLogStyle(q){switch(q){case ct.$.Verbose:return"background: #009688; color: #EEEEEE; padding: 2px";case ct.$.Warning:return"background: #FEEFB3; color: #9F6000; padding: 2px";case ct.$.Error:return"background: #FFD2D2; color: #D8000C; padding: 2px";default:return""}}getTextStyle(){return"color: #000; background-color: #FFF; padding: 0"}}bs.CSS_HIGHLIGHT_PINK="display: inline-block ; background-color: #e0005a ; color: #ffffff ; font-weight: bold ; padding: 3px 7px 3px 7px ; border-radius: 3px 3px 3px 3px ;",bs.CSS_HIGHLIGHT_GOLD="display: inline-block ; background-color: gold ; color: black ; font-weight: bold ; padding: 3px 7px 3px 7px ; border-radius: 3px 3px 3px 3px ;",bs.CSS_HIGHLIGHT_GREEN="display: inline-block ; background-color: #2ffa62 ; color: black ; font-weight: bold ; padding: 3px 7px 3px 7px ; border-radius: 3px 3px 3px 3px ;",bs.CSS_BOLD="font-weight: bold ;";var ps,vs,gs=z(49415),ms=z(80473);class ys extends Z.u{constructor(){super(...arguments),this.image=null,this.animationData=[],this.isPlaying=!1,this.frameTimeElapsed=0,this.frameIndex=0}create(){super.create(),this.image=this.GameObject.findComponent(Oe)}update(){if(super.update(),this.isPlaying){this.frameTimeElapsed+=tt.W.instance.game.time.deltaMS;let q=this.animationData[this.frameIndex].duration,K=this.frameIndex;for(;this.frameTimeElapsed>=q;)++K,this.frameTimeElapsed-=q,K>=this.animationData.length&&(K=0),q=this.animationData[K].duration;K!==this.frameIndex&&(this.frameIndex=K,this.image.updateAsset(this.image.atlasKey,`${this.animationData[this.frameIndex].frame}`))}}playAnimation(){null!==this.image&&(this.isPlaying=!0)}stopAnimation(){this.isPlaying=!1}}class _s extends Z.u{constructor(){super(...arguments),this.tiles=[]}addTile(q){this.tiles.push(q),q.OnDestroy.add(this.removeTile,this)}destroy(){var q;for(const K of this.tiles)K.OnDestroy.remove(this.removeTile,this),null===(q=K.GameObject)||void 0===q||q.destroy();super.destroy()}setTileGroupVisibility(q,K,z=1){const Y=K?1:0,Q={tiles:[],alpha:1-Y};for(let X=0;X{for(let q=0;q(0,X.sH)(this,void 0,void 0,(function*(){return ps.loadTilesets(q)})))).then((q=>this.parseMap(K,q,z,Y,Q))).catch((q=>{ht.V.log(`TMXMapLoader: ${zt.R.stringify(q)}`,ct.$.Warning)})).then((K=>(0,X.sH)(this,void 0,void 0,(function*(){this.optimizeMapLayer(K,Y),this.optimizeMapLayer(K,Q),this._loadedMap=K,this.onMapLoaded.dispatch(q)}))))}static loadMapFileFromUrl(q){return(0,X.sH)(this,void 0,void 0,(function*(){return tt.W.instance.loader.assignAssetData(q,{type:"json",fullURL:q}),ps.loadMapFile(q)}))}static loadMapFile(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=tt.W.instance.game;return tt.W.instance.loader.isLoaded(q,ls.JSON)?K.cache.getJSON(q):tt.W.instance.loader.loadAssets([q]).then((()=>(0,X.sH)(this,void 0,void 0,(function*(){return Promise.resolve(dt.cloneDeep(K.cache.getJSON(q)))}))))}))}static loadTilesets(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=q.tilesets.map((q=>q.name));return K.every((q=>tt.W.instance.loader.isLoaded(q,ls.JSON)))?Promise.resolve(q):tt.W.instance.loader.loadAssets(K).then((()=>(0,X.sH)(this,void 0,void 0,(function*(){return Promise.resolve(q)}))))}))}parseMap(q,K,z,Y,Q){const X=q.addComponent(_s);for(const Z of K.layers){let q=Z.visible,J=Y;if(Z.properties){ut.A.isDefined(Z.properties.isAbove)?J=Q:ut.A.isDefined(Z.properties.content)&&(J=z);const K=dt.get(Z,"properties.toggle",-1);K>-1&&this._disabledToggleGroups.includes(K)&&(q=!1),ut.A.isDefined(Z.properties.reference)&&(q=!1)}if(q){const q=this.createLayer(J,Z,K.tilesets);for(const K of q)X.addTile(K)}}return X}createLayer(q,K,z){const Y=new Ne._(q);return Y.name=K.name,Y.addComponent(this.useLegacyTransforms?Ae.K:kt.d),ut.A.isDefined(K.objects)?this.createObjectLayer(Y,K,z):this.createTiledLayer(Y,K,z)}createObjectLayer(q,K,z){var Y,Q,X;const Z=[],J=ps.TILE_SIZE>>1;for(const tt of K.objects){const et=dt.get(K,"properties.dynamicToggle",-1),it=this.createTile(q,tt.gid,tt.x,tt.y,z,et,null,null===(Y=K.properties)||void 0===Y?void 0:Y.tag,K.opacity);if(ut.A.isDefined(it)){if(this.useLegacyTransforms)null===(Q=it.GameObject.legacyTransform)||void 0===Q||Q.group.position.set(tt.x+J,tt.y-J),it.GameObject.findComponent(Oe).setAnchor(.5,.5);else{const q=tt.x+J+Math.sin(tt.rotation*Math.PI/180)*ps.TILE_SIZE,K=tt.y-J,z=it.GameObject.transform;z.setPosition(q,K),z.setRotation(null!==(X=tt.rotation)&&void 0!==X?X:0)}Z.push(it)}}return Z}createTiledLayer(q,K,z){var Y;const Q=ut.A.isDefined(K.properties)&&K.properties.useAnimDuration,X=dt.get(K,"properties.dynamicToggle",-1),Z=[];let J=0;const tt=K.height,et=K.width;for(let it=0;it({isLoaded:q=>tt.W.instance.loader.isLoaded(q,ls.Image)})}),ct.updateAsset(rt.name,`${it}`),ct.setAlpha(et);const lt=!!(null==ht?void 0:ht.animation);if(lt){const q=tt.W.instance.game,K=[],z=ot.addComponent(ys);for(const Y of ht.animation)K.push(q.cache.getTexture(rt.name,Y.tileid)),z.animationData.push({frame:`${Y.tileid}`,duration:Z?Y.duration:250});z.playAnimation()}ot.addComponent(Es).rotate(nt,st,at);const ft=ot.addComponent(ws);return ut.A.isDefined(X)&&(ft.hasToggleGroup=X>-1,ft.groupID=X,ft.isAnimated=lt,ft.tag=J,this._disabledToggleGroups.includes(X)&&ct.setAlpha(0)),ft}static getTileData(q,K){let z=q;z&=~vs.all;const Y=ps.getTileset(K,z);return ut.A.isDefined(Y)&&ut.A.isDefined(z)?(z-=Y.firstgid,{tileset:Y,id:z,transform:q&vs.all}):null}static getTileset(q,K){for(const z of q)if(K>=z.firstgid&&K the tiles into the target game objects that are assigned.")],Ts),function(q){q[q.none=0]="none",q[q.flippedVertically=1073741824]="flippedVertically",q[q.flippedHorizontally=2147483648]="flippedHorizontally",q[q.flippedDiagonally=536870912]="flippedDiagonally",q[q.all=-536870912]="all"}(Ss||(Ss={}));class As{constructor(q,K){this._currentTileCount=0,this._tileIDLocations=new Map,this._nextTileID=1;const z=tt.W.instance.game;this.mesh=z.add.simpleMesh({texture:z.add.texture(z.cache.getTexture(q).baseTexture)}),this.mesh.autoUpdate=!1,this.mesh.tint=K,this.mesh.shader.batchable=!1,this.mesh.drawMode=_t.DRAW_MODES.TRIANGLES,this.mesh.visible=!1}destroy(){this.mesh.destroy(),this._tileIDLocations.clear(),this._indexBuffer=null,this._vertexBuffer=null,this._uvBuffer=null}addTiles(q){return this.addTilesAtIndex(q,this._currentTileCount)}addTilesAtIndex(q,K){const z=q.length;if(this.ensureBufferSize(this._currentTileCount+z),K{q>=K&&this._tileIDLocations.set(Y,this._tileIDLocations.get(Y)+z)}))}const Y=[];for(let Q=0;Qthis._tileIDLocations.has(q))).sort(((q,K)=>this._tileIDLocations.get(q)-this._tileIDLocations.get(K))),z=K.length;let Y=0;for(;Ythis._tileIDLocations.get(K)===q+z),Y),Q=q*As.FLOATS_PER_TILE,X=z*As.FLOATS_PER_TILE;this._vertexBuffer.set(this._vertexBuffer.subarray(Q+X),Q),this._uvBuffer.set(this._uvBuffer.subarray(Q+X),Q);const Z=K.slice(Y,Y+z);this._tileIDLocations.forEach(((K,Y)=>{Z.indexOf(Y)>-1?this._tileIDLocations.delete(Y):K>q&&this._tileIDLocations.set(Y,this._tileIDLocations.get(Y)-z)})),Y+=z}this.mesh.verticesBuffer.update(this._vertexBuffer),this.mesh.uvBuffer.update(this._uvBuffer),this.mesh.size-=z*As.INDICES_PER_TILE,this.mesh.visible=this.mesh.size>0,this._currentTileCount-=z}addTileVertexDataAtIndex(q,K){const z=K*As.FLOATS_PER_TILE;this._vertexBuffer.set([q.x,q.y,q.x+q.width,q.y,q.x+q.width,q.y+q.height,q.x,q.y+q.height],z);const Y=this.mesh.texture;ut.A.isGuid(q.tileset)||ht.V.log(`${q.tileset} needs its metadata GUID in the name property, not a string for ELA game compatibility.`,ct.$.Error);const Q=tt.W.instance.game.cache.getTextureAtlas(q.tileset).frameData.getFrame(q.frame),X=[{u:Q.x/Y.width,v:Q.y/Y.height},{u:(Q.x+Q.width)/Y.width,v:Q.y/Y.height},{u:(Q.x+Q.width)/Y.width,v:(Q.y+Q.height)/Y.height},{u:Q.x/Y.width,v:(Q.y+Q.height)/Y.height}];0!=(q.transform&Ss.flippedDiagonally)&&ut.A.swapArrayIndex(X,1,3),0!=(q.transform&Ss.flippedHorizontally)&&(ut.A.swapArrayIndex(X,0,1),ut.A.swapArrayIndex(X,2,3)),0!=(q.transform&Ss.flippedVertically)&&(ut.A.swapArrayIndex(X,0,3),ut.A.swapArrayIndex(X,1,2)),this._uvBuffer.set([X[0].u,X[0].v,X[1].u,X[1].v,X[2].u,X[2].v,X[3].u,X[3].v],z)}ensureBufferSize(q){var K,z,Y,Q;const X=q*As.FLOATS_PER_TILE;if((null!==(z=null===(K=this._vertexBuffer)||void 0===K?void 0:K.length)&&void 0!==z?z:0){q.tileMesh.destroy()})),this._meshTargets=[],this._externalTileIDs.clear()}addTiles(q){const K=this.addTilesToMeshTargets(q),z=new Array(q.length);return K.forEach(((q,K)=>{const Y=this._nextTileID++;q.externalID=Y,this._externalTileIDs.set(Y,q),z[K]=Y})),z}addHiddenTiles(q){const K=new Array(q.length);return q.forEach(((q,z)=>{this._hiddenTiles.has(q.dynamicToggleID)||this._hiddenTiles.set(q.dynamicToggleID,[]);const Y=this._nextTileID++;this._hiddenTiles.get(q.dynamicToggleID).push({meshID:null,tileID:null,tileData:q,externalID:Y}),K[z]=Y})),K}removeTiles(q){const K=q.map((q=>this._externalTileIDs.get(q))).filter((q=>!!q)).sort(((q,K)=>q.meshID-K.meshID));let z=0;const Y=K.length;for(;zK.meshID===q),z),Q=this._meshTargets.find((K=>K.ID===q)),X=K.slice(z,z+Y),Z=X.map((q=>q.tileID));Q.tileMesh.removeTiles(Z);const J=X.reduce(((q,K)=>{var z;const Y=K.tileData.layerIndex;return q[Y]=(null!==(z=q[Y])&&void 0!==z?z:0)+1,q}),{}),tt=Object.keys(J).map((q=>parseInt(q,10))),et=tt.length;for(let K=0;K{const Y=K.filter((K=>-1===q.indexOf(K.externalID)));Y.length>0?this._hiddenTiles.set(z,Y):this._hiddenTiles.delete(z)})),this.cleanMeshInstances()}setToggleLayerVisibility(q,K){if(K){if(this._hiddenTiles.has(q)){const K=this._hiddenTiles.get(q),z=this.addTilesToMeshTargets(K.map((q=>q.tileData)));K.forEach(((q,K)=>{const Y=z[K];Y.externalID=q.externalID,this._externalTileIDs.set(q.externalID,Y)})),this._hiddenTiles.delete(q)}}else{const K=Array.from(this._externalTileIDs.values()).filter((K=>K.tileData.dynamicToggleID===q));this._hiddenTiles.set(q,K),this.removeTiles(K.map((q=>q.externalID)))}}addTilesToMeshTargets(q){var K;const z=q.slice().sort(((q,K)=>q.tileset!==K.tileset?q.tileset.localeCompare(K.tileset):q.layerIndex-K.layerIndex)),Y=[];z.forEach((q=>{const K={0:q.tileset,1:q.tint},z=q.layerIndex;-1===Y.findIndex((q=>this.isConfigurationEqual(q,K)&&q.layer===z))&&Y.push(Object.assign(Object.assign({},K),{layer:z}))})),Y.forEach((q=>{this.createMeshTarget(q,q.layer)}));let Q=0;const X=z.length,Z=[];for(;Qq.tileset===Y&&q.tint===X&&q.layerIndex===J),Q),et=this.getMeshTarget({0:Y,1:X},J),it=z.slice(Q,Q+tt),st=et.tileMesh.addTilesAtIndex(it,this.getTileOffsetForLayer(et,J)).map(((q,K)=>({tileID:q,meshID:et.ID,tileData:it[K],externalID:null})));et.layerTileCount[J]=(null!==(K=et.layerTileCount[J])&&void 0!==K?K:0)+tt,Z.push(...st),Q+=tt}const J=new Array(Z.length);return Z.forEach((K=>{J[q.indexOf(K.tileData)]=K})),J}hasMeshTarget(q,K){return this._meshTargets.findIndex((z=>this.isConfigurationEqual(q,z.config)&&z.layerRange.min<=K&&z.layerRange.max>=K))>-1}createMeshTarget(q,K){if(this.hasMeshTarget(q,K))return;const z=this._meshTargets.filter((K=>this.isConfigurationEqual(K.config,q))),Y=[null,null];if(z.forEach((q=>{q.layerRange.maxq.layerRange.max?Y[0]:q:Y[1]=Y[1]&&Y[1].layerRange.minq.layerRange.min!==q.layerRange.max));z.length>0&&z.forEach((q=>{this.splitMeshAtLayer(q,K)})),this.createTileMeshTarget(q,K,K)}}getMeshTarget(q,K){return this._meshTargets.find((z=>this.isConfigurationEqual(q,z.config)&&z.layerRange.min<=K&&z.layerRange.max>=K))}getTargetsBetweenLayers(q,K){return this._meshTargets.filter((z=>z.layerRange.min>q&&z.layerRange.minq&&z.layerRange.maxK))}splitMeshAtLayer(q,K){const z=q.layerRange.max;q.layerRange.max=K;const Y=this.createTileMeshTarget(q.config,K+1,z),Q=Object.keys(q.layerTileCount).map((q=>parseInt(q,10))).filter((q=>q>K)),X=Q.length;for(let Z=0;Z=this._meshTargets[tt].layerRange.max&&z<=(null!==(Q=null===(Y=this._meshTargets[tt+1])||void 0===Y?void 0:Y.layerRange.min)&&void 0!==Q?Q:Number.POSITIVE_INFINITY)&&(J=tt+1);return this.meshContainer.addChildAt(X.tileMesh.mesh,J),this._meshTargets.splice(J,0,X),X}getTileOffsetForLayer(q,K){const z=Object.keys(q.layerTileCount).map((q=>parseInt(q,10)));let Y=0;const Q=z.length;for(let X=0;X0;--q){Object.values(this._meshTargets[q].layerTileCount).reduce(((q,K)=>q+K),0)<=0&&(this._meshTargets[q].tileMesh.destroy(),this._meshTargets.splice(q,1))}for(let q=this._meshTargets.length-1;q>0;--q){const K=this._meshTargets[q-1],z=this._meshTargets[q];if(this.isConfigurationEqual(z.config,K.config)){const Y=Object.keys(z.layerTileCount).map((q=>parseInt(q,10))),Q=Y.length;for(let q=0;qK.meshID===q.ID&&K.tileData.layerIndex===z)),X=K.tileMesh.addTilesAtIndex(Q.map((q=>q.tileData)),this.getTileOffsetForLayer(K,z));q.tileMesh.removeTiles(Q.map((q=>q.tileID))),K.layerTileCount[z]=(null!==(Y=K.layerTileCount[z])&&void 0!==Y?Y:0)+Q.length,q.layerTileCount[z]=0,Q.forEach(((q,z)=>{q.meshID=K.ID,q.tileID=X[z]}))}isConfigurationEqual(q,K){for(let z=0;z<2;++z)if(q[z]!==K[z])return!1;return!0}}class Os{constructor(){this._toggleLayerVisibility={},this._tileMultiMesh=new Cs}destroy(){this._tileMultiMesh.destroy()}clear(){this._tileMultiMesh.clear()}setParentContainer(q){q.addChild(this._tileMultiMesh.meshContainer)}addTilesToBatch(q){const K=[],z=[];q.forEach((q=>{var Y;null===(Y=this._toggleLayerVisibility[q.dynamicToggleID])||void 0===Y||Y?K.push(q):z.push(q)}));const Y=this._tileMultiMesh.addTiles(K),Q=this._tileMultiMesh.addHiddenTiles(z),X=new Array(q.length);return Y.forEach(((z,Y)=>{X[q.indexOf(K[Y])]=z})),Q.forEach(((K,Y)=>{X[q.indexOf(z[Y])]=K})),X}removeTilesFromBatch(q){this._tileMultiMesh.removeTiles(q)}setToggleLayerVisibility(q,K){this._toggleLayerVisibility[q]=K,this._tileMultiMesh.setToggleLayerVisibility(q,K)}}class Is{constructor(q,K){this._batchedTiles=new Map,this._nextTileID=1,this._toggleLayerVisibility={},this._renderOffset=q,this._renderTextureDimensions=K}destroy(){this.resetRenderTexture(),this._batchedTiles.clear()}clear(){this.resetRenderTexture(),this._renderTextureSprite=null,this._currentRenderTexture=null,this._toggleLayerVisibility={},this._batchedTiles.clear()}setParentContainer(q){this._parentContainer=q,this._renderTextureSprite&&this._parentContainer.addChild(this._renderTextureSprite)}addTilesToBatch(q){const K=this.createIDsForBatchedTiles(q);return this.redrawTileBatch(),K}removeTilesFromBatch(q){const K=q.length;for(let z=0;zq.layerIndex!==K.layerIndex?q.layerIndex-K.layerIndex:q.tileset!==K.tileset?q.tileset.localeCompare(K.tileset):q.frame!==K.frame?q.frame-K.frame:q.tint!==K.tint?q.tint-K.tint:q.transform-K.transform)),Z=null!==(q=tt.W.instance.game.renderer)&&void 0!==q?q:_t.autoDetectRenderer(),J=tt.W.instance.game.cache;null===(K=this._renderTextureSprite)||void 0===K||K.destroy(),null===(z=this._currentRenderTexture)||void 0===z||z.destroy(!0),this._currentRenderTexture=_t.RenderTexture.create(this._renderTextureDimensions);const et=new _t.Sprite,it=new _t.Matrix,st=new _t.Matrix;let nt=Ss.none;const at=X.length;for(let tt=0;tt{q.destroy()})),this._gridRenderers=[],this._currentTileData=[]}setParentContainer(q){this._parentContainer=q;const K=this._gridRenderers.length;for(let z=0;z0){const K={width:q[0].width,height:q[0].height},z=this.getRenderTextureDimensions(K),Y=this.getTileDrawData(q.concat(this._currentTileData.map((q=>q.sourceTileData)))),Q={width:Math.ceil(Y.size.width/z.width),height:Math.ceil(Y.size.height/z.height)};this.updateRendererBufferForGrid(Y.offset,Q,z);const X=this.renderTiles(q,z,Q);return this.updateTextureGridPositions(z,Q),X.map((q=>q.externalID))}return[]}removeTilesFromBatch(q){const K=[];q.forEach((q=>{const z=this._currentTileData.find((K=>K.externalID===q));z&&K.push(z)}));const z=this._gridRenderers.length;for(let Y=0;Yq.rendererIndex===Y));q.length>0&&this._gridRenderers[Y].removeTilesFromBatch(q.map((q=>q.internalID)))}this._currentTileData=this._currentTileData.filter((q=>-1===K.indexOf(q)))}clear(){this._gridRenderers.forEach((q=>{q.destroy()})),this._gridRenderers=[],this._textureGridSize={width:0,height:0},this._currentTileData=[]}setToggleLayerVisibility(q,K){this._toggleLayerVisibility[q]=K,this._gridRenderers.forEach((z=>{z.setToggleLayerVisibility(q,K)})),this.updateTextureGridPositions(this._renderTextureDimensions,this._textureGridSize)}getGridSprites(){return this._gridRenderers.map((q=>q.getTextureSprite()))}getRenderTextureDimensions(q){return{width:Math.floor(Ds.MAX_RENDER_TEXTURE_SIZE/q.width)*q.width,height:Math.floor(Ds.MAX_RENDER_TEXTURE_SIZE/q.height)*q.height}}getTileDrawData(q){const K=q[0];let z=K.x,Y=K.y,Q=K.x+K.width,X=K.y+K.height;const Z=q.length;for(let J=0;JparseInt(q,10))).filter((q=>!this._toggleLayerVisibility[q]));this._gridRenderers.forEach((q=>{X.forEach((K=>{q.setToggleLayerVisibility(K,!1)}))})),this._textureGridSize=K,this._renderTextureDimensions=z,this._renderTextureOffset=q;const Z=this._currentTileData.splice(0);this._currentTileData=[];const J=this.renderTiles(Z.map((q=>q.sourceTileData)),z,K),tt=this._currentTileData.length;for(let q=0;qK.sourceTileData===J[q].sourceTileData)).externalID}}renderTiles(q,K,z){const Y=[],Q=this._gridRenderers.length;for(let J=0;J0){const K=this._gridRenderers[J].addTilesToBatch(q.map((q=>Object.assign(Object.assign({},q.sourceTileData),{x:q.tilePosition.x,y:q.tilePosition.y})))),z=K.length;for(let Y=0;Y{q.destroy()})),this._pooledTiles=[],this._tileBatch.forEach((q=>{q.sprite.destroy()})),this._tileBatch=[]}setParentContainer(q){this._parentContainer=q;const K=this._tileBatch.length;for(let z=0;zK.id===q[z])),Y=this._tileBatch[K],Q=Y.sprite;Q.visible=!1,--this._layerTileCount[Y.layer],this._parentContainer.removeChildAt(this._parentContainer.getChildIndex(Q)),this._pooledTiles.push(Q),this._tileBatch.splice(K,1)}}clear(){this._tileBatch.forEach((q=>{q.sprite.visible=!1,this._pooledTiles.push(q.sprite)})),this._tileBatch=[],this._layerTileCount={}}setToggleLayerVisibility(q,K){-1!==q&&(this._toggleLayerVisibility[q]=K,this._tileBatch.forEach((z=>{z.toggleLayerID===q&&(z.sprite.visible=K)})))}getCanvasTile(){return 0===this._pooledTiles.length&&this.addTilesToPool(Math.ceil(this._tileBatch.length*Rs.POOL_GROW_RATIO)),this._pooledTiles.pop()}addTilesToPool(q){for(let K=0;Kq.name===K));if(z)return z.value}}return z}}class Ms{constructor(q){this.setMapData(q)}getSize(){return this.getLayerDimensions(this.getActiveLayers())}getLayers(){return this._mapJSON.layers}getActiveLayers(){return this.filterActiveLayers(this._mapJSON.layers)}getTileDimensions(){var q,K;return{width:null!==(q=this._mapJSON.tilewidth)&&void 0!==q?q:Ms.DEFAULT_TILE_SIZE,height:null!==(K=this._mapJSON.tileheight)&&void 0!==K?K:Ms.DEFAULT_TILE_SIZE}}getMapDimensions(){var q,K;return{width:null!==(q=this._mapJSON.width)&&void 0!==q?q:0,height:null!==(K=this._mapJSON.height)&&void 0!==K?K:0}}getTilesetNames(){var q,K;return null!==(K=null===(q=this._mapJSON.tilesets)||void 0===q?void 0:q.map((q=>q.name)))&&void 0!==K?K:[]}getTilesets(){return this._mapJSON.tilesets}getTileData(q){let K=q;K&=~Ss.all;const z=this.getTilesetForTile(K);return z?(K-=z.firstgid,{tileset:z,id:K,transform:q&Ss.all}):null}getTileRenderDataForGrid(q,K){var z,Y;if(q<0||K<0||q>this._mapJSON.width||K>this._mapJSON.height)return[];const Q=[],X=this._renderableLayers.length;for(let Z=0;Z=q.firstgid&&K{if(K.layers){const z=this.filterActiveLayers(K.layers);z.length>0&&q.push(Object.assign(Object.assign({},K),{layers:z}))}else this.isLayerActive(K)&&q.push(K);return q}),[])}isLayerActive(q){return q.visible&&q.data&&q.width>0&&q.height>0&&!Ps.readPropertyValue(q.properties,"reference")}parseRenderableLayers(q){var K;const z=[],Y=null!==(K=null==q?void 0:q.length)&&void 0!==K?K:0;for(let Q=0;Q{this._mapDataArray.push(q),this._mapDataFiles.set(tt,q),K.push(Ts.loadTilesets(q))})));yield Promise.all(q),yield Promise.all(K);const z=[],Y={firstgid:1,name:`tileset-${ut.A.generateGUID()}`,tilecount:0,tiles:z},Q=new Map,X=[],Z=(q,K)=>{if(q&&q.id>=0){const z=q.id,Z=`${q.tileset.name}#${z}`;let J=Q.get(Z);return ut.A.isDefined(J)||(Q.set(Z,J=X.length),X.push(q),++Y.tilecount),K?J+1|q.transform:J}return K?0:-1};for(const tt of this._mapDataArray){for(let K=0;K=0;--K){const z=Ts.getTileData(q.data[K],tt.tilesets);q.data[K]=Z(z,!0)}if(q.objects)for(let K=q.objects.length-1;K>=0;--K){const z=q.objects[K],Y=Ts.getTileData(z.gid,tt.tilesets);z.gid=Z(Y,!0),z.x=Math.floor(z.x),z.y=Math.floor(z.y)}}}const q=(q,K,Y)=>{const Q={animation:[]};if(ut.A.isDefined(q)){const K={tileset:Y,id:q,transform:vs.none};Q.id=Z(K,!1)}for(const z of K){const q={tileset:Y,id:z.tileid,transform:vs.none};Q.animation.push({duration:z.duration,tileid:Z(q,!1)})}z.push(Q)};for(const K of tt.tilesets)if(K.tiles)if(Array.isArray(K.tiles))for(const z of K.tiles)z.animation&&q(z.id,z.animation,K);else for(const z in K.tiles){const Y=K.tiles[z];Y.animation&&q(Number(z),Y.animation,K)}tt.tilesets=[Y]}const J=Math.floor(Math.sqrt(X.length)),et=Math.ceil(X.length/J),it=J*(Ts.TILE_SIZE+2)+1,st=et*(Ts.TILE_SIZE+2)+1,nt=tt.W.instance.game.add.renderTexture(it,st,Y.name,!0);yield Promise.all(K);const at=tt.W.instance.game.cache.cacheMap.get(Ns.r.RENDER_TEXTURE).get(Y.name);(tt.W.instance.game.renderer.type===_t.RENDERER_TYPE.WEBGL?this.renderWebGl:this.renderCanvas)(X,J,nt,at),this._enableDebugDrawCombinerAtlas&&this.renderDebugText(X,J,nt);const rt=tt.W.instance.loader;return rt.assignAssetData(Y.name,{type:"tileset",key:Y.name,w:Ts.TILE_SIZE,h:Ts.TILE_SIZE,forceExtruded:!0}),yield rt.loadAssets([Y.name]),Y.name}))}renderWebGl(q,K,z,Y){const Q={};q.forEach(((q,z)=>{var Y;const X=q.tileset.name,Z=`${q.id}`;(null!==(Y=Q[X])&&void 0!==Y?Y:Q[X]=[]).push({id:Z,newId:z,x:z%K*(Ts.TILE_SIZE+2)+1,y:Math.floor(z/K)*(Ts.TILE_SIZE+2)+1})}));const X=tt.W.instance.game.cache,Z=new _t.SimpleMesh(void 0,void 0,void 0,void 0,_t.DRAW_MODES.TRIANGLE_STRIP);for(const J of Object.keys(Q)){const q=Q[J],K=new _t.Texture(X.getTexture(J).baseTexture);Z.texture=K;const tt=new Float32Array(4*q.length*2),et=new Float32Array(4*q.length*2),it=new Uint16Array(6*q.length-1);let st=-1;for(let z=0;z0&&(it[++st]=ht),it[++st]=ht,it[++st]=ht+1,it[++st]=ht+2,it[++st]=ht+3,it[++st]=ht+3,Y.frameData.addFrame(new xs.w(Q.newId,Q.x,Q.y,Ts.TILE_SIZE,Ts.TILE_SIZE,Q.newId.toString()))}Z.geometry.getIndex().update(it),Z.verticesBuffer.update(tt),Z.uvBuffer.update(et),Z.size=st,ee.C.renderRawXY(z,Z,0,0,!1)}}renderCanvas(q,K,z,Y){const Q=tt.W.instance.game.add.sprite(0,0,"");Q.parent=null;const X=q.length;for(let Z=0;Z{this.onMapLoaded.dispatch()})),this._mapLoader.loadMap(this.mapID,this.map,this.content,this.background,this.foreground)}destroy(){this.onMapLoaded.dispose(),super.destroy()}};(0,X.Cg)([(0,it.W_)(),(0,et.B)(),(0,X.Sn)("design:type",String)],ks.prototype,"mapID",void 0),(0,X.Cg)([(0,it.Mn)(Ts),(0,X.Sn)("design:type",Ts)],ks.prototype,"_mapLoader",void 0),(0,X.Cg)([(0,it.ER)(),(0,X.Sn)("design:type",Ne._)],ks.prototype,"map",void 0),(0,X.Cg)([(0,it.ER)(),(0,X.Sn)("design:type",Ne._)],ks.prototype,"background",void 0),(0,X.Cg)([(0,it.ER)(),(0,X.Sn)("design:type",Ne._)],ks.prototype,"foreground",void 0),(0,X.Cg)([(0,it.ER)(),(0,X.Sn)("design:type",Ne._)],ks.prototype,"content",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],ks.prototype,"_loadOnCreate",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],ks.prototype,"_animateInEditor",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],ks.prototype,"onMapLoaded",void 0),ks=(0,X.Cg)([(0,J.EV)("TileMapLoader",void 0,"Loads a tilemap onto serialized GameObject layers")],ks);let Bs=class extends jt.y{create(){super.create(),this._mapContainer=tt.W.instance.game.add.container(),this._mapContainer.interactiveChildren=!1,this.setRootContainer(this._mapContainer),this._tileBatchRenderMode=Ps.getBestBatchRenderMode(),this._tileBatchRenderMode.setParentContainer(this._mapContainer);const q=tt.W.instance.game.cache.getJSON(this._tiledMapAsset);if(q){const K=new Ms(q);this._tileBatchRenderMode.addTilesToBatch(K.getMapTilesRenderData())}}destroy(){this._mapContainer.destroy(),super.destroy()}};(0,X.Cg)([(0,it.i0)(Ki.Z.TiledMap),(0,X.Sn)("design:type",String)],Bs.prototype,"_tiledMapAsset",void 0),Bs=(0,X.Cg)([(0,J.EV)("TiledMap",J.YH.tiled)],Bs);let Us=class extends jt.y{constructor(){super(...arguments),this._tileBorderBuffer=3,this._tileLoadedLeft=-1/0,this._tileLoadedTop=-1/0,this._mapSize=new St.o,this._cachedWorldScale={x:1,y:1}}create(){if(super.create(),this._mapContainer=tt.W.instance.game.add.container(),this._mapContainer.interactiveChildren=!1,this.setRootContainer(this._mapContainer),this._tileBatchRenderer=Ps.getBestBatchRenderMode(),this._tileBatchRenderer.setParentContainer(this._mapContainer),this.tiledMap){const q=tt.W.instance.game.cache.getJSON(this.tiledMap);q&&this.setMapData(new Ms(q))}}destroy(){this._mapContainer.destroy(),this._mapContainer=null,this._tileBatchRenderer.destroy(),this._tileBatchRenderer=null,super.destroy()}update(){if(super.update(),this._mapData){const q=this.GameObject.transform.worldScale;this._cachedWorldScale.x===q.x&&this._cachedWorldScale.y===q.y||this.setStreamingDimensions(Et.i.main.viewportSize),this.setStreamingCenter(Et.i.main.GameObject.transform.worldPosition)}}setStreamingDimensions(q){this._cachedWorldScale=Object.assign({},this.GameObject.transform.worldScale);const K={width:q.width/this._cachedWorldScale.x,height:q.height/this._cachedWorldScale.y},z=2*this._tileBorderBuffer;this._streamingDimensions=K,this._gridWidth=Math.floor(K.width/this._tileDimensions.width)+z,this._gridHeight=Math.floor(K.height/this._tileDimensions.height)+z,this._tileBatchRenderer.clear(),this._tileLoadedLeft=Number.NEGATIVE_INFINITY,this._tileLoadedTop=Number.NEGATIVE_INFINITY,this._renderedTiles=new Array(this._gridWidth);for(let Y=0;Y0&&(z.push(...K),this._renderedTiles[Y][q]=[])}}}if(0!==K){const Q=this._gridWidth-Y,X=q<0?0:Y;for(let q=0;q0&&(z.push(...X),this._renderedTiles[Y][K]=[])}}}if(z.length>0&&this._tileBatchRenderer.removeTilesFromBatch(z),0!==q&&(q<0?this._renderedTiles.unshift(...this._renderedTiles.splice(this._renderedTiles.length+q)):this._renderedTiles.push(...this._renderedTiles.splice(0,q))),0!==K)for(let q=0;q0?this._gridWidth-q:0;for(let q=0;q0&&(X.push(...K),Q.push({indexX:z,indexY:q,count:K.length}))}}}if(0!==K){const z=this._gridWidth-Math.abs(q),Y=q>0?0:Z;for(let q=0;q0?this._gridHeight-K:0,J=Math.abs(K);for(let q=0;q0&&(X.push(...Y),Q.push({indexX:z,indexY:K,count:Y.length}))}}}if(X.length>0){const q=[...this._tileBatchRenderer.addTilesToBatch(X)];for(;Q.length>0;){const K=Q.shift();this._renderedTiles[K.indexX][K.indexY]=q.splice(0,K.count)}}}}getDimensions(){return this._mapSize}setMapData(q){this._mapData=q,this._tileDimensions=q.getTileDimensions(),this._tileBatchRenderer.clear();const K=q.getTileDimensions(),z=q.getMapDimensions();this._mapSize.setTo(K.width*z.width,K.height*z.height),this.setStreamingDimensions(Et.i.main.viewportSize)}};(0,X.Cg)([(0,it.i0)(Ki.Z.TiledMap),(0,X.Sn)("design:type",String)],Us.prototype,"tiledMap",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Us.prototype,"_tileBorderBuffer",void 0),Us=(0,X.Cg)([(0,J.EV)("StreamedTiledMapEla",J.YH.tiled)],Us);let Fs=class extends jt.y{constructor(){super(...arguments),this._width=100,this._height=100}getDimensions(){return new St.o(this._width,this._height)}};(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Fs.prototype,"_width",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Fs.prototype,"_height",void 0),Fs=(0,X.Cg)([(0,J.EV)("BoundsExpander","Map","An empty RenderComponent that will cause the export bounds to grow")],Fs);let Gs=class extends Z.u{constructor(){super(...arguments),this._cameraCollisions=null}create(){super.create(),this._cameraCollisions=tt.W.instance.game.cameraCollisions,this._cameraCollisions.addCollider(this)}destroy(){this._cameraCollisions.removeCollider(this),super.destroy()}getBounds(){return this.rectTransform.getBounds()}};var js;(0,X.Cg)([(0,te.Pq)(Tt.X),(0,X.Sn)("design:type",Tt.X)],Gs.prototype,"rectTransform",void 0),Gs=(0,X.Cg)([(0,J.EV)("CameraCollider",J.YH.map,"Prevents the LoadAreaCameraFollowController from viewing an area")],Gs),function(q){q.AwaitMapCombiner="AwaitMapCombiner",q.Localization="Localization",q.MainPlayerGameObject="MainPlayerGameObject",q.PopupHandler="PopupHandler",q.PlayerPathfinder="PlayerPathfinder",q.StreamedMap="StreamedMap",q.StreamedMapEla="StreamedMapEla",q.GameObjectReference="GameObjectReference",q.GameObjectBounds="GameObjectBounds",q.InitDataPlayFsm="InitData-playFSM",q.InitDataSpawnLocationName="InitData-spawnLocationName",q.InitDataSpawnPosition="InitData-spawnPosition",q.InitDataSpawnFacingDirection="InitData-spawnFacingDirection"}(js||(js={}));let $s=class extends Z.u{create(){super.create();{const q=Et.i.main;this._cameraTransform=q.GameObject.transform,this._cameraTransform.onWorldMatrixChanged.add(this.cull,this),this.cull()}}destroy(){this._cameraTransform.onWorldMatrixChanged.remove(this.cull,this),super.destroy()}cull(){const q=this._bounds;if(q){const K=Et.i.main,z=K.viewportSize.getHalfWidth(),Y=K.viewportSize.getHalfHeight(),Q=this._cameraTransform.worldPosition;this.gameObject.active=q.leftQ.x-z&&q.topQ.y-Y}}};(0,X.Cg)([Li(js.GameObjectBounds),(0,X.Sn)("design:type",Object)],$s.prototype,"_bounds",void 0),$s=(0,X.Cg)([(0,J.EV)("CameraCulling",J.YH.map,"Deactivates the attached game object when offscreen")],$s);let Hs=class extends Z.u{constructor(){super(...arguments),this.onOffsetChanged=new $t.H,this._cameraCollisions=null,this.maxCameraMovePerMs=1/0,this._offset={x:0,y:0},this.target=null,this._cameraSpeedVector=new At.I}set offset(q){this._offset=q,this.onOffsetChanged.dispatch()}get offset(){return this._offset}create(){if(super.create(),this._cameraCollisions=tt.W.instance.game.cameraCollisions,this.target){ft.w.getActiveScene().onPostUpdate.add(this);{const q=this.target.transform.worldPosition;Et.i.main.GameObject.transform.worldPosition=q}}}destroy(){this.target&&(ft.w.getActiveScene().onPostUpdate.remove(this),this.target=null),this._cameraCollisions=null,this.onOffsetChanged.dispose(),super.destroy()}postUpdate(){const q=Et.i.main.GameObject.transform,K=this.target.transform,z={x:K.worldPosition.x+this._offset.x,y:K.worldPosition.y+this._offset.y};if(this.IsActiveInHierarchy){const Y=new At.I(q.worldPosition.x,q.worldPosition.y);if(z.x/=K.worldScale.x,z.y/=K.worldScale.y,this._cameraCollisions)for(const q of this._cameraCollisions.cameraColliders){const K=q.bounds.left-z.x,Y=q.bounds.right-z.x,Q=q.bounds.top-z.y,X=q.bounds.bottom-z.y,Z=K<0&&Y>0?-K0?-QX*X&&(Q.normalize(),this._cameraSpeedVector.set(X,X),Q.multiply(this._cameraSpeedVector),z.x=Y.x+Q.x,z.y=Y.y+Q.y),q.worldPosition={x:Math.round(z.x),y:Math.round(z.y)}}}};(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Hs.prototype,"maxCameraMovePerMs",void 0),(0,X.Cg)([(0,it.vC)(),(0,X.Sn)("design:type",Object)],Hs.prototype,"_offset",void 0),(0,X.Cg)([(0,it.ER)(),(0,X.Sn)("design:type",Ne._)],Hs.prototype,"target",void 0),Hs=(0,X.Cg)([(0,J.EV)("CameraFollowController",J.YH.map,"Simplified camera follow controller that follows a target within bounds without
requiring a streamed map or camera collider components")],Hs);var Vs,Ws=z(55366),qs=z(42979),Ks=z(49769);class zs extends si{constructor(){super(...arguments),this.injectionName=null,this.type=null,this.required=null,this.injectionLinks=[]}get InjectionName(){return this.injectionName}set InjectionName(q){this.injectionName=q}get Type(){return this.type}set Type(q){this.type=q}get Required(){return this.required}set Required(q){this.required=q}get InjectionLinks(){return this.injectionLinks}set InjectionLinks(q){this.injectionLinks=q}}class Ys extends si{constructor(){super(...arguments),this.propertyName=null,this.componentGUID=null}get PropertyName(){return this.propertyName}set PropertyName(q){this.propertyName=q}get ComponentGUID(){return this.componentGUID}set ComponentGUID(q){this.componentGUID=q}}class Qs extends si{constructor(){super(...arguments),this.guid=null,this.type=null,this.properties={}}get GUID(){return this.guid}set GUID(q){this.guid=q}get Type(){return this.type}set Type(q){this.type=q}get Properties(){return this.properties}set Properties(q){this.properties=q}}class Xs extends si{constructor(){super(...arguments),this.guid=null,this.tuid=null,this.properties={}}get GUID(){return this.guid}set GUID(q){this.guid=q}get TUID(){return this.tuid}set TUID(q){this.tuid=q}get Properties(){return this.properties}set Properties(q){this.properties=q}}class Zs extends si{constructor(){super(...arguments),this.name=null,this.layer=null,this.guid=null,this.components=[],this.children=[],this.active=null,this.injections=[]}get Name(){return this.name}set Name(q){this.name=q}get Layer(){return this.layer}set Layer(q){this.layer=q}get GUID(){return this.guid}set GUID(q){this.guid=q}get Components(){return this.components}set Components(q){this.components=q}get Children(){return this.children}set Children(q){this.children=q}get Active(){return this.active}set Active(q){this.active=q}get Injections(){return this.injections}set Injections(q){this.injections=q}}class Js extends Zs{constructor(){super(...arguments),this.tuid=null}get TUID(){return this.tuid}set TUID(q){this.tuid=q}}class tn extends Zs{constructor(){super(...arguments),this.template=null,this.templateKey=null}}let en=Vs=class extends ii{deserialize(q){return Vs.deserializePrefab(q)}serialize(q){return Vs.serializePrefab(q)}static deserializePrefab(q){let K=null;if(Vs.isPrefabSchemaTemplate(q)){const z=new tn;z.template=q.template,z.templateKey=q.templateKey,K=z}else if(Vs.isPrefabSchemaOverride(q)){const z=new Js;z.TUID=q.tuid,K=z}else K=new Zs;return K.Name=q.name,K.Layer=q.layer,K.Active=q.active,K.GUID=q.guid,K.Components=ii.deserializeCollection(q.components,Vs.deserializeComponent),K.Children=ii.deserializeCollection(q.children,Vs.deserializePrefab),K.Injections=ii.deserializeCollection(q.injections,Vs.deserializeInjection),K}static serializePrefab(q){return Vs.isPrefabDataTemplate(q)?{name:q.Name,layer:q.Layer,guid:q.GUID,template:q.template,components:ii.serializeCollection(q.Components,Vs.serializeComponent),children:ii.serializeCollection(q.Children,Vs.prototype.serialize)}:Vs.isPrefabDataOverride(q)?{name:q.Name,layer:q.Layer,guid:q.GUID,tuid:q.TUID,components:ii.serializeCollection(q.Components,Vs.serializeComponent),children:ii.serializeCollection(q.Children,Vs.prototype.serialize)}:{name:q.Name,layer:q.Layer,guid:q.GUID,components:ii.serializeCollection(q.Components,Vs.serializeComponent),children:ii.serializeCollection(q.Children,Vs.prototype.serialize)}}static restoreArrayObjects(q){return(null==q?void 0:q.properties)?(Object.keys(q.properties).forEach((K=>{if(!Array.isArray(q.properties[K]))return;const z=q.properties[K];if(0===z.length||"object"!=typeof z[0])return;const Y=z;Y.forEach(((q,K)=>{if((null==q?void 0:q.__type)&&Ks.oD[null==q?void 0:q.__type]){const z=new Ks.oD[q.__type];Object.keys(q).forEach((K=>{z[K]=q[K]})),Y[K]=z}})),q.properties[K]=Y})),q.properties):null}static deserializeComponent(q){if(q&&(q.properties=Vs.restoreArrayObjects(q)),Vs.isComponentSchemaOverride(q)){const K=new Xs;return K.GUID=q.guid,K.TUID=q.tuid,K.Properties=q.properties,K}if(q){const K=new Qs;return K.GUID=q.guid,K.Type=q.type,K.Properties=q.properties,K}}static serializeComponent(q){return Vs.isComponentDataOverride(q)?{guid:q.GUID,tuid:q.TUID,properties:q.Properties}:{guid:q.GUID,type:q.Type,properties:q.Properties}}static deserializeInjectionLink(q){const K=new Ys;return K.ComponentGUID=q.componentGuid,K.PropertyName=q.propertyName,K}static deserializeInjection(q){const K=new zs;return K.InjectionName=q.injectionName,K.Type=q.type,K.Required=q.required,K.InjectionLinks=ii.deserializeCollection(q.injectionLinks,Vs.deserializeInjectionLink),K}static isPrefabSchemaTemplate(q){return q.hasOwnProperty("template")||q.hasOwnProperty("templateKey")}static isPrefabDataTemplate(q){return q instanceof tn}static isPrefabSchemaOverride(q){return null==q?void 0:q.hasOwnProperty("tuid")}static isPrefabDataOverride(q){return q instanceof Js}static isComponentSchemaOverride(q){return q&&q.hasOwnProperty("tuid")}static isComponentDataOverride(q){return q instanceof Xs}};en=Vs=(0,X.Cg)([(0,Qe.injectable)()],en);let sn=class extends Z.u{constructor(){super(...arguments),this.points=[{x:0,y:0},{x:100,y:0},{x:100,y:100},{x:0,y:100}]}};(0,X.Cg)([(0,it.vC)(),(0,X.Sn)("design:type",Array)],sn.prototype,"points",void 0),sn=(0,X.Cg)([(0,J.EV)("ColliderPolygon",J.YH.map,"A polygon defining a non-walkable area")],sn);let nn=class extends Z.u{constructor(){super(...arguments),this.points=[{x:0,y:0},{x:100,y:0},{x:100,y:100},{x:0,y:100}]}};(0,X.Cg)([(0,it.vC)(),(0,X.Sn)("design:type",Array)],nn.prototype,"points",void 0),nn=(0,X.Cg)([(0,J.EV)("NavMeshPolygon",J.YH.map,"A navigation mesh polygon that the player can walk on")],nn);class an{get isLoaded(){return this._loaded}constructor(q){this._gameObjects=[],this._loaded=!1,this.names=q}addGameObject(q){return(0,X.sH)(this,void 0,void 0,(function*(){return this._gameObjects.push(q),this._loaded?q.addReference().catch((q=>{ht.V.log(`ConditionGroup: Error in addGameObject. The error is ${q.message} and stack trace is: ${q.stack}`,ct.$.Error)})):null}))}removeGameObject(q){const K=this._gameObjects.indexOf(q);return!!(K>=0&&(this._gameObjects.splice(K,1),this._loaded))&&(q.removeReference(),!0)}getGameObjects(){return this._gameObjects}getGameObjectComponents(q){let K=[];return this._loaded&&this._gameObjects.forEach((z=>{const Y=z.getGameObject();Y&&(K=K.concat(Y.findComponentsInChildren(q)))})),K}isActive(q){return this.names.every((K=>q.isConditionActive(K)))}loadIfActive(q){return(0,X.sH)(this,void 0,void 0,(function*(){this.isActive(q)?(this._loaded=!0,yield Promise.all(this._gameObjects.map((q=>(0,X.sH)(this,void 0,void 0,(function*(){return q.addReference()})))))):this._loaded&&this.unload()}))}unload(){this._loaded&&(this._gameObjects.forEach((q=>{q.removeReference()})),this._loaded=!1)}}class rn{constructor(q,K){this.onBlockChanged=new $t.H,this._conditionGroups=[],this._map=q,this._bounds=K}destroy(){this.unloadAssets(),this.onBlockChanged.dispose()}loadAssets(){return(0,X.sH)(this,void 0,void 0,(function*(){return ut.A.isDefined(this._currentLoadingPromise)?this._currentLoadingPromise:this._currentLoadingPromise=Promise.all(this._conditionGroups.map((q=>(0,X.sH)(this,void 0,void 0,(function*(){return q.loadIfActive(this._map)}))))).then((()=>{this._currentLoadingPromise=null}))}))}unloadAssets(){for(const q of this._conditionGroups)q.unload()}addGameObject(q,K=[]){let z=!1;for(const Y of this._conditionGroups)if(ut.A.equalArrayContents(Y.names,K)){Y.addGameObject(q).catch((()=>{ht.V.log("Error while adding game object reference",ct.$.Error)})),z=!0;break}if(!z){const z=new an(K);z.addGameObject(q).catch((()=>{ht.V.log("Error while adding game object reference",ct.$.Error)})),this._conditionGroups.push(z)}}removeGameObject(q){let K=!1;for(const z of this._conditionGroups)z.removeGameObject(q)&&(K=!0)}getGameObjectComponents(q){let K=[];return this._conditionGroups.forEach((z=>{z.isActive(this._map)&&(K=K.concat(z.getGameObjectComponents(q)))})),K}setConditionGroupActive(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){ut.A.isDefined(this._currentLoadingPromise)&&(yield this._currentLoadingPromise);const z=this._conditionGroups.filter((K=>K.names.indexOf(q)>=0));if(z.length<=0)return!1;if(K)yield this._currentLoadingPromise=Promise.all(z.map((q=>(0,X.sH)(this,void 0,void 0,(function*(){return q.loadIfActive(this._map)}))))),this._currentLoadingPromise=null;else for(const q of z)q.unload();return!0}))}getBounds(){return this._bounds}}class on extends rn{constructor(q,K){super(q,K),this._navmeshDirty=!1,this._constructNavmeshPromise=null,this._polyListeners=new Set}containsPoint(q){return q.x>this._bounds.left&&q.xthis._bounds.top&&q.y{ht.V.log("Error while adding game object reference",ct.$.Error)})),z=!0;break}if(!z){const z=new an(K);z.addGameObject(q).catch((()=>{ht.V.log("Error while adding game object reference",ct.$.Error)})),this._conditionGroups.push(z)}q.onNavigationChange.add(this.requestNavMeshRecalculation,this),q.onLoaded.add(this.requestNavMeshRecalculation,this),q.onUnloaded.add(this.requestNavMeshRecalculation,this)}removeGameObject(q){var K;let z=!1;for(const Y of this._conditionGroups)Y.removeGameObject(q)&&(z=!0);q.onNavigationChange.remove(this.requestNavMeshRecalculation,this),q.onLoaded.remove(this.requestNavMeshRecalculation,this),q.onUnloaded.remove(this.requestNavMeshRecalculation,this),z&&(null===(K=this.requestNavMeshRecalculation())||void 0===K||K.catch((()=>{ht.V.log("Error while recalculating navMesh after removing gameobject",ct.$.Error)})))}getActiveGameObjectComponents(q){let K=[];return this._conditionGroups.forEach((z=>{z.isActive(this._map)&&(K=K.concat(z.getGameObjectComponents(q).filter((q=>q.Active&&q.GameObject.activeInHierarchy))))})),K}isReconstructingNavMesh(){return!!this._constructNavmeshPromise}getReconstructionCompletionPromise(){return(0,X.sH)(this,void 0,void 0,(function*(){this._constructNavmeshPromise&&(yield this._constructNavmeshPromise)}))}getNavData(){const q=[];for(const z of this.getActiveGameObjectComponents(nn)){this._polyListeners.has(z)||(z.OnActiveChanged.add(this.requestNavMeshRecalculation,this),z.GameObject.onActiveInHierarchyChanged.add(this.requestNavMeshRecalculation,this),this._polyListeners.add(z));const K=z.GameObject.transform.worldMatrix,Y=new _t.Point,Q={inverted:!1,regions:[z.points.map((q=>(K.apply(q,Y),[Y.x,Y.y])))]};q.push(Q)}const K=[];for(const z of this.getActiveGameObjectComponents(sn)){this._polyListeners.has(z)||(z.OnActiveChanged.add(this.requestNavMeshRecalculation,this),z.GameObject.onActiveInHierarchyChanged.add(this.requestNavMeshRecalculation,this),this._polyListeners.add(z));const q=z.GameObject.transform.worldMatrix,Y=new _t.Point,Q={inverted:!1,regions:[z.points.map((K=>(q.apply(K,Y),[Y.x,Y.y])))]};K.push(Q)}return{walkableAreas:q,nonWalkableAreas:K}}}on.isInitialLoading=!1;class hn{get bounds(){return this._bounds}get gameObject(){return this._gameObject}constructor(q,K){this.onNavigationChange=new $t.H,this.onLoaded=new $t.H,this.onUnloaded=new $t.H,this._referenceCount=0,this._loadPromise=null,this._gameObject=q,this._bounds=K}destroy(){this.onNavigationChange.dispose(),this.onLoaded.dispose(),this.onUnloaded.dispose()}addReference(){return(0,X.sH)(this,void 0,void 0,(function*(){if(1==++this._referenceCount){if(this._loadPromise=this.load(),null!==this._loadPromise&&!this._loadPromise.cancelled)try{yield this._loadPromise.then((q=>{this._gameObject=q,this._loadPromise=null,this.onLoaded.dispatch()})).catch((()=>{this._loadPromise=null})).promise}catch(q){ht.V.log(`Error in GameObjectReference.addReference: ${q}`,ct.$.Error)}}else if(null!==this._loadPromise&&!this._loadPromise.cancelled)try{yield this._loadPromise.promise}catch(q){ht.V.log(`Error in GameObjectReference.addReference else block: ${q}`,ct.$.Error)}}))}removeReference(){var q;0==--this._referenceCount&&(null===(q=this._loadPromise)||void 0===q||q.cancel(),this.unload(),this.onUnloaded.dispatch())}load(){return null}unload(){}getGameObject(){return this._gameObject}}class cn extends hn{constructor(q,K,z=!1){super(null,q.bounds),this._definition=q,this._parentObject=K,this._usingLegacyStreamedMap=z}load(){const q=new en,K=tt.W.instance.prefabLoaderInstance,z=new Ne._;z.addComponent(Pi.b).Container.bind(js.GameObjectBounds).toConstantValue(this.bounds);const Y=this._usingLegacyStreamedMap?K.loadFromJSONWithDependencies(q.deserialize(this._definition.prefab),z,!0):K.loadFromJSONProject(q.deserialize(this._definition.prefab),z,!0);return Y.then((q=>{var K;const z=null!==(K=q.findComponent(Pi.b))&&void 0!==K?K:q.addComponent(Pi.b);z.Container.rebind(js.GameObjectBounds).toConstantValue(this.bounds),z.Container.bind(js.GameObjectReference).toConstantValue(this),q.parent=this._parentObject})).catch((q=>{ht.V.log(`Failed to load from GameObjectReference: ${q}\n${JSON.stringify(this._definition.prefab)}`,ct.$.Error)})),Y}unload(){var q;null===(q=this._gameObject)||void 0===q||q.destroy(),this._gameObject=null}}class dn{get onLoadedBlocksChanged(){return this._onLoadedBlocksChanged}get onStreamedBlockChanged(){return this._onStreamedBlockChanged}get offset(){return this._offset}get blockSize(){return this._blockSize}get loadingPromiseQueueHead(){return this._loadingPromiseQueue.head}constructor(q,K,z){this._onLoadedBlocksChanged=new $t.H,this._globalObjects=[],this._offset={x:0,y:0},this._conditions={},this._loadedBlocks=[],this._gameObjectReferences=[],this._loadingPromiseQueue=new ae,this._onStreamedBlockChanged=new $t.H,this._isLegacy=!1,this.parent=q,this._blockSize=K}destroy(){for(const q of this._blocks)for(const K of q)K.destroy();for(const q of this._gameObjectReferences)q.destroy();this._onLoadedBlocksChanged.dispose(),this._onStreamedBlockChanged.dispose()}addGlobalObject(q){q.parent=this.parent,this._globalObjects.push(q)}addGameObjectReference(q){const K=function(q){return!!q.gameObject}(q)?new hn(q.gameObject,q.bounds):new cn(q,this.parent,this._isLegacy);return this.getBlocksInBounds(q.bounds).forEach((z=>{z.block.addGameObject(K,q.conditionGroups)})),this._gameObjectReferences.push(K),K}removeGameObjectReference(q){this.getBlocksInBounds(q.bounds).forEach((K=>{K.block.removeGameObject(q)})),dt.pull(this._gameObjectReferences,q),q.destroy()}isConditionActive(q){var K;return!ut.A.isDefined(q)||(null===(K=this._conditions[q])||void 0===K?void 0:K.active)}unloadBlocks(){this._loadedBlocks.forEach((q=>{q.block.unloadAssets()})),this._loadedBlocks=[]}getBlocksInBounds(q){const K=[],z=wt.c.clamp(Math.floor((q.left-this._offset.x)/this._blockSize),0,this._blockCountX-1),Y=wt.c.clamp(Math.floor((q.right-this._offset.x)/this._blockSize),0,this._blockCountX-1),Q=wt.c.clamp(Math.floor((q.top-this._offset.y)/this._blockSize),0,this._blockCountY-1),X=wt.c.clamp(Math.floor((q.bottom-this._offset.y)/this._blockSize),0,this._blockCountY-1);for(let Z=z;Z<=Y;++Z)for(let q=Q;q<=X;++q)K.push({block:this._blocks[Z][q],x:Z,y:q,size:this._blockSize});return K}loadBlocks(q){return(0,X.sH)(this,void 0,void 0,(function*(){}))}}class ln extends dn{constructor(q,K,z){super(q,K,z),this._isLegacy=!0,tt.W.instance.game.navMeshSystem.bindStreamedMap(this),this._offset.x=z.left,this._offset.y=z.top;const Y=z.right-z.left,Q=z.bottom-z.top;on.isInitialLoading=!0,this._blockCountX=Math.ceil(Y/K),this._blockCountY=Math.ceil(Q/K),this._blocks=[],this._blocks.length=this._blockCountX;for(let X=0;X{this._onStreamedBlockChanged.dispatch({block:z,x:X,y:q})}))}}}destroy(){tt.W.instance.game.navMeshSystem.releaseStreamedMap(),super.destroy()}static createFromData(q,K,z){return(0,X.sH)(this,void 0,void 0,(function*(){const Y=new ln(q,K,z.bounds);z.globalObjects&&(yield Promise.all(z.globalObjects.map((q=>(0,X.sH)(this,void 0,void 0,(function*(){return Y.addGlobalObjectPrefab(q).promise}))))));for(const q of z.mapObjects)Y.addGameObjectReference(q);return Y}))}addGlobalObjectPrefab(q){const K=new en,z=tt.W.instance.prefabLoaderInstance.loadFromJSONWithDependencies(K.deserialize(q),null,!0);return z.then((q=>{this.addGlobalObject(q)})).catch((K=>{ht.V.log(`Failed to load map global object: ${K}\n${JSON.stringify(q)}`,ct.$.Error)})),z}setConditionActive(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){const z=yield this._loadingPromiseQueue.push();if(ut.A.isDefined(q)){const Y=this._conditions[q];if(Y){if(Y.active===K)return void z();Y.active=K}else this._conditions[q]={active:K};yield Promise.all(this._loadedBlocks.map((z=>(0,X.sH)(this,void 0,void 0,(function*(){return z.block.setConditionGroupActive(q,K).then((q=>(0,X.sH)(this,void 0,void 0,(function*(){q&&(yield this.buildBlockNavMesh(z))}))))})))))}z()}))}loadBlocks(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=yield this._loadingPromiseQueue.push(),z=(q,K)=>q.x===K.x&&q.y===K.y,Y=this.getBlocksInBounds(q),Q=ut.A.removeMultipleFromArray(this._loadedBlocks,Y,z),Z=ut.A.removeMultipleFromArray(Y,this._loadedBlocks,z);if(Q.forEach((q=>{q.block.unloadAssets()})),yield Promise.all(Z.map((q=>(0,X.sH)(this,void 0,void 0,(function*(){yield q.block.loadAssets(),on.isInitialLoading||(yield this.buildBlockNavMesh(q))}))))),this._loadedBlocks=Y,on.isInitialLoading){on.isInitialLoading=!1;const K=[];this.getBlocksInBounds(q).forEach((q=>{K.push(this.buildBlockNavMesh(q))})),yield Promise.all(K)}(Z.length>0||Q.length>0)&&this._onLoadedBlocksChanged.dispatch(Z,Q),K()}))}buildBlockNavMesh(q){return(0,X.sH)(this,void 0,void 0,(function*(){yield q.block.requestNavMeshRecalculation()}))}}class un extends jt.y{}let fn=class extends un{constructor(){super(...arguments),this._filled=!0,this._color="#393939",this._alpha=1,this._points=[],this._graphics=null}get filled(){return this._filled}set filled(q){this._filled=q,this.drawPolygon()}get color(){return this._color}set color(q){this._color=q,this.drawPolygon()}get alpha(){return this._alpha}set alpha(q){this._alpha=q,this.drawPolygon()}get points(){return this._points}set points(q){this._points=q,this.drawPolygon()}create(){super.create(),this._graphics=tt.W.instance.game.add.graphics(0,0),this.setUpDisplayObject(this._graphics),this._points.length>0&&this.drawPolygon()}destroy(){var q;null===(q=this._graphics)||void 0===q||q.destroy(),this._graphics=null,super.destroy()}drawPolygon(){if(!this._graphics)return;this._graphics.clear();const q=parseInt(this._color.substr(1),16);this._filled?this._graphics.beginFill(q,this._alpha):this._graphics.lineStyle(2,q,this._alpha),this._graphics.drawPolygon(this._points),this._filled?this._graphics.endFill():this._graphics.lineStyle(0)}getGraphics(){return this._graphics}};(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],fn.prototype,"_filled",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String)],fn.prototype,"_color",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],fn.prototype,"_alpha",void 0),(0,X.Cg)([(0,it.SZ)(),(0,it._H)(),(0,X.Sn)("design:type",Array)],fn.prototype,"_points",void 0),fn=(0,X.Cg)([(0,J.EV)("PolygonPrimitive",J.YH.primitive,"Draws a box using the PIXI Graphics library")],fn);class bn extends Z.u{}class pn extends Ui{constructor(){super(...arguments),this.blockSize=400,this.onMapLoaded=new $t.H,this._conditionGroupEvaluators=[],this._navMeshGameObjects=[],this._blockBoundGameObjects=[],this._loadPromise=new ne.b,this._enableDebugMesh=!1,this._enableDebugDrawBlocks=!1,this._navmeshDirty=!1}set EnableDebugMesh(q){this._enableDebugMesh=q}set EnableDebugDrawBlocks(q){this._enableDebugDrawBlocks=q}create(){super.create(),ft.w.getActiveScene().container.bind(js.StreamedMap).toConstantValue(this)}destroy(){var q;null===(q=this.map)||void 0===q||q.destroy(),this.onMapLoaded.dispose(),delete window.toggleNavMesh,this._debugParent&&this._debugParent.destroy(),super.destroy()}awaitLoaded(){return(0,X.sH)(this,void 0,void 0,(function*(){return this._loadPromise}))}update(){super.update(),this._navmeshDirty&&(this.drawNavMesh(),this._navmeshDirty=!1)}drawNavMesh(q){this._debugParent||(this._debugParent=new Ne._(this.GameObject),q||this._debugParent.addComponent(kt.d),this._debugParent.layer="debug"),this._navMeshGameObjects.forEach((q=>{q.destroy()})),this._blockBoundGameObjects.forEach((q=>{q.destroy()})),this._navMeshGameObjects=[],this._blockBoundGameObjects=[];for(const K of tt.W.instance.game.navMeshSystem.navMesh.getPolygons()){const q=K.getPoints(),z=new Ne._(this._debugParent);z.addComponent(kt.d);const Y=new Ne._(z);Y.addComponent(kt.d);const Q=Y.addComponent(fn,!1);Q.alpha=.2,Q.color="#3333AA",Q.filled=!0,Q.points=[...q,q[0]],Q.create();const X=new Ne._(z);X.addComponent(kt.d);const Z=X.addComponent(fn,!1);Z.alpha=.5,Z.color="#3333AA",Z.filled=!1,Z.points=[...q,q[0]],Z.create();for(const J of K.neighbours){const q=new Ne._(z);q.addComponent(kt.d);const Y=q.addComponent(fn,!1);Y.alpha=.5,Y.color="#AA3333",Y.filled=!1,Y.points=[K.centroid,J.centroid],Y.create()}this._navMeshGameObjects.push(z)}if(this._enableDebugDrawBlocks){const q=Et.i.main.GameObject.transform,K=Et.i.main.viewportSize,z=q.worldPosition.x-K.getHalfWidth(),Y=q.worldPosition.x+K.getHalfWidth(),Q=q.worldPosition.y-K.getHalfHeight(),X=q.worldPosition.y+K.getHalfHeight();for(let Z=Math.floor(z/this.blockSize)*this.blockSize;Z{ht.V.log(`StreamedMapComponent: Error in create. The error is ${q.message} and stack trace is: ${q.stack}`,ct.$.Error)}))}createAsync(){return(0,X.sH)(this,void 0,void 0,(function*(){if(!this.mapData&&(yield tt.W.instance.loader.loadAssets([this.mapDataPath]).then((()=>{this.mapData=tt.W.instance.game.cache.getJSON(this.mapDataPath)})),!this.mapData))throw new Error(`Couldn't load streamed map ${this.mapDataPath}`);if(this.map=yield ln.createFromData(this.GameObject,this.blockSize,this.mapData),this._conditionGroupEvaluators){const q=[];for(const K of this._conditionGroupEvaluators)for(const z of K.getActiveConditions())q.push(this.map.setConditionActive(z,!0));yield Promise.all(q)}let q=null;window.toggleNavMesh=()=>{q?(this.map.onStreamedBlockChanged.remove(q),q=null,this._debugParent&&(this._debugParent.destroy(),this._debugParent=null),this._navMeshGameObjects=[]):(this.map.onStreamedBlockChanged.add(q=()=>{this._navmeshDirty=!0}),this.drawNavMesh())},this._enableDebugMesh&&window.toggleNavMesh(),this.onMapLoaded.dispatch(),this._loadPromise.resolve()}))}drawNavMesh(){super.drawNavMesh(!0)}};var gn;vn=(0,X.Cg)([(0,J.EV)("StreamedMap",J.YH.map,"Allows a streamed map to be added as a component")],vn);let mn=gn=class extends Ui{constructor(){super(...arguments),this._cameraCollisions=null,this.horizontalLoadDistance=940,this.verticalLoadDistance=660,this.deadZoneSize=100,this.maxCameraMovePerMs=1/0,this.shouldFollow=!0,this._offset={x:0,y:0},this._target=null,this._frameWorkManagerNormalBudget=qs.Z.DEFAULT_FPS,this._loadingBlocks=!1,this._enableDebugStreaming=!1}set EnableDebugStreaming(q){this._enableDebugStreaming=q}set Offset(q){this._offset=q}create(){super.create(),this._cameraCollisions=tt.W.instance.game.cameraCollisions,this._lastLoadPosition=new At.I(1/0,1/0);const q=this._target.transform.worldPosition;this._loadedBounds={left:q.x,right:q.x,top:q.y,bottom:q.y},this._deadZoneSizeSq=this.deadZoneSize*this.deadZoneSize,this._frameWorkManager&&(this._frameWorkManagerNormalBudget=this._frameWorkManager.frameBudget),this._target&&ft.w.getActiveScene().onPostUpdate.add(this)}destroy(){this._frameWorkManager&&(this._frameWorkManager.frameBudget=this._frameWorkManagerNormalBudget),super.destroy()}postUpdate(){var q;const K=Et.i.main.GameObject.transform;if(this._enableDebugStreaming)K.setPosition(Math.round(this._target.transform.worldPosition.x+this._offset.x),Math.round(this._target.transform.worldPosition.y+this._offset.y));else{let z=wt.c.clamp(this._target.transform.worldPosition.x,this._loadedBounds.left,this._loadedBounds.right)+this._offset.x,Y=wt.c.clamp(this._target.transform.worldPosition.y,this._loadedBounds.top,this._loadedBounds.bottom)+this._offset.y;if(this.shouldFollow){const Q=new At.I(K.worldPosition.x,K.worldPosition.y);for(const K of null===(q=this._cameraCollisions)||void 0===q?void 0:q.cameraColliders){const q=K.bounds.left-z,Q=K.bounds.right-z,X=K.bounds.top-Y,Z=K.bounds.bottom-Y,J=q<0&&Q>0?-q0?-XZ*Z&&this._lastLoadPosition.x!==1/0&&(X.normalize(),X.multiply(new At.I(Z,Z)),z=Q.x+X.x,Y=Q.y+X.y),K.setPosition(Math.round(z),Math.round(Y))}const Q=Math.min(z-this._loadedBounds.left,this._loadedBounds.right-z,Y-this._loadedBounds.top,this._loadedBounds.bottom-Y);this._frameWorkManager.frameBudget=wt.c.clampedLerp(gn._frameWorkManagerLargeBudget,this._frameWorkManagerNormalBudget,Q/gn._frameWorkManagerBudgetRampDistance)}if(!this._loadingBlocks){const q=this._target.transform.worldPosition;if(new At.I(q.x-this._lastLoadPosition.x,q.y-this._lastLoadPosition.y).getMagnitudeSq()>=this._deadZoneSizeSq){const K=this.getLoadBounds();this._loadingBlocks=!0,this._loadedBounds.left=Math.max(this._loadedBounds.left,K.left),this._loadedBounds.right=Math.min(this._loadedBounds.right,K.right),this._loadedBounds.top=Math.max(this._loadedBounds.top,K.top),this._loadedBounds.bottom=Math.min(this._loadedBounds.bottom,K.bottom),this.mapComponent.map?this.mapComponent.map.loadBlocks(K).then((()=>{const q=Et.i.main.viewportSize;this._loadedBounds.left=K.left+q.getHalfWidth(),this._loadedBounds.right=K.right-q.getHalfWidth(),this._loadedBounds.top=K.top+q.getHalfHeight(),this._loadedBounds.bottom=K.bottom-q.getHalfHeight(),this._loadingBlocks=!1})).catch((()=>{this._loadingBlocks=!1})):this._loadingBlocks=!1,this._lastLoadPosition.copyFrom(q)}}}getLoadBounds(){const q=this._target.transform.worldPosition;return{top:q.y-this.verticalLoadDistance,bottom:q.y+this.verticalLoadDistance,left:q.x-this.horizontalLoadDistance,right:q.x+this.horizontalLoadDistance}}};mn._frameWorkManagerLargeBudget=200,mn._frameWorkManagerBudgetRampDistance=500,(0,X.Cg)([(0,it.Mn)(vn),(0,X.Sn)("design:type",vn)],mn.prototype,"mapComponent",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],mn.prototype,"horizontalLoadDistance",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],mn.prototype,"verticalLoadDistance",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],mn.prototype,"deadZoneSize",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],mn.prototype,"maxCameraMovePerMs",void 0),(0,X.Cg)([(0,it.ER)(),(0,X.Sn)("design:type",Ne._)],mn.prototype,"_target",void 0),(0,X.Cg)([ki(nt.FrameWorkManager),(0,X.Sn)("design:type",Ws.Y)],mn.prototype,"_frameWorkManager",void 0),mn=gn=(0,X.Cg)([(0,Qe.injectable)(),(0,J.EV)("LoadAreaCameraFollowController",J.YH.map,"A camera follow controller that follows a target and informs asset loading in a legacy StreamedMap")],mn);let yn=class extends Z.u{constructor(){super(...arguments),this._enableFollowControllerAfter=!1,this._panTimeMs=1e3,this.onFinish=new $t.H}create(){super.create(),this._cameraFollowController=this._mainPlayer.findComponentInChildren(mn)}destroy(){this.onFinish.dispose(),super.destroy()}run(){const q=Et.i.main.GameObject.transform,K=new At.I;K.copyFrom(q.localPosition);const z=new At.I;z.copyFrom(this._targetTransform.worldPosition),z.subtract(q.worldPosition);const Y={percent:0};this.setCameraControllerEnabled(!1),tt.W.instance.game.add.tween(Y,this).to({percent:1},this._panTimeMs,Ke.G.Quadratic.InOut,!0).onUpdateCallback((()=>{q.setPosition(Math.round(K.x+z.x*Y.percent),Math.round(K.y+z.y*Y.percent))})).onTweenComplete.addOnce((()=>{q.setPosition(K.x+z.x,K.y+z.y),this._enableFollowControllerAfter&&this.setCameraControllerEnabled(!0),this.onFinish.dispatch()}))}setCameraControllerEnabled(q){this._cameraFollowController&&(this._cameraFollowController.shouldFollow=q)}};(0,X.Cg)([Li(js.MainPlayerGameObject),(0,X.Sn)("design:type",Ne._)],yn.prototype,"_mainPlayer",void 0),(0,X.Cg)([(0,it.Mn)(kt.d),(0,X.Sn)("design:type",kt.d)],yn.prototype,"_targetTransform",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],yn.prototype,"_enableFollowControllerAfter",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],yn.prototype,"_panTimeMs",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],yn.prototype,"onFinish",void 0),yn=(0,X.Cg)([(0,J.EV)("CameraPan",J.YH.motion,"Pans the camera to a target location")],yn);let _n=class extends Z.u{};_n=(0,X.Cg)([(0,J.EV)("GlobalExport",J.YH.map,"Adds the attached prefab to a list of prefabs to always be loaded within a streamed map")],_n);class En extends dn{constructor(q,K,z){super(q,K,z),this.onBoundsLoaded=new $t.H,this._offset.x=z.left,this._offset.y=z.top;const Y=z.right-z.left,Q=z.bottom-z.top;this._blockCountX=Math.ceil(Y/K),this._blockCountY=Math.ceil(Q/K),this._blocks=[],this._blocks.length=this._blockCountX;for(let X=0;X{this._onStreamedBlockChanged.dispatch({block:z,x:X,y:q})}))}}}destroy(){super.destroy(),this.onBoundsLoaded.dispose()}static createFromData(q,K,z){return(0,X.sH)(this,void 0,void 0,(function*(){const Y=new En(q,K,z.bounds);z.globalObjects&&(yield Promise.all(z.globalObjects.map((q=>(0,X.sH)(this,void 0,void 0,(function*(){return Y.addGlobalObjectPrefab(q).promise}))))));for(const q of z.mapObjects)Y.addGameObjectReference(q);return Y}))}addGlobalObjectPrefab(q){const K=new en,z=tt.W.instance.prefabLoaderInstance.loadFromJSONProject(K.deserialize(q),null,!0);return z.then((q=>{this.addGlobalObject(q)})).catch((K=>{ht.V.log(`Failed to load map global object: ${K}\n${JSON.stringify(q)}`,ct.$.Error)})),z}setConditionActive(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){const z=yield this._loadingPromiseQueue.push();if(ut.A.isDefined(q)){let Y=this._conditions[q];if(Y){if(Y.active===K)return void z();Y.active=K}else Y=this._conditions[q]={active:K};yield Promise.all(this._loadedBlocks.map((z=>(0,X.sH)(this,void 0,void 0,(function*(){return z.block.setConditionGroupActive(q,K)})))))}z()}))}loadBlocks(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=yield this._loadingPromiseQueue.push(),z=(q,K)=>q.x===K.x&&q.y===K.y,Y=this.getBlocksInBounds(q),Q=ut.A.removeMultipleFromArray(this._loadedBlocks,Y,z),Z=ut.A.removeMultipleFromArray(Y,this._loadedBlocks,z);Q.forEach((q=>{q.block.unloadAssets()})),yield Promise.all(Z.map((q=>(0,X.sH)(this,void 0,void 0,(function*(){return q.block.loadAssets()}))))),this._loadedBlocks=Y,K(),(Z.length>0||Q.length>0)&&this._onLoadedBlocksChanged.dispatch(Z,Q,q)}))}}let wn=class extends pn{constructor(){super(...arguments),this._navMeshPolyIDs=[]}create(){super.create(),this._streamedMapAsset&&this.loadMap()}loadMap(){return(0,X.sH)(this,void 0,void 0,(function*(){const q=tt.W.instance.game.cache.getJSON(this._streamedMapAsset);if(this.map=yield En.createFromData(this.GameObject,this.blockSize,q),this._conditionGroupEvaluators){const q=[];for(const K of this._conditionGroupEvaluators)for(const z of K.getActiveConditions())q.push(this.map.setConditionActive(z,!0));yield Promise.all(q)}this._navMeshPolyIDs=tt.W.instance.game.navMeshSystem.addWalkablePolygons(q.navMesh);let K=null;window.toggleNavMesh=()=>{const q=tt.W.instance.game.navMeshSystem;K?(q.onNavMeshChanged.remove(K),K=null,this._debugParent&&(this._debugParent.destroy(),this._debugParent=null),this._navMeshGameObjects=[]):(q.onNavMeshChanged.add(K=()=>{this._navmeshDirty=!0}),this.drawNavMesh())},this._enableDebugMesh&&window.toggleNavMesh(),this.onMapLoaded.dispatch(),this._loadPromise.resolve()}))}destroy(){this._navMeshPolyIDs.length>0&&(tt.W.instance.game.navMeshSystem.removePolygons(this._navMeshPolyIDs),this._navMeshPolyIDs=[]),super.destroy()}};(0,X.Cg)([(0,it.i0)(Ki.Z.StreamedMapEla),(0,X.Sn)("design:type",String)],wn.prototype,"_streamedMapAsset",void 0),wn=(0,X.Cg)([(0,J.EV)("StreamedMapEla",J.YH.map,"Allows an ELA version streamed map to be added as a component")],wn);let Tn=class extends Z.u{constructor(){super(...arguments),this._horizontalLoadPadding=300,this._verticalLoadPadding=300,this.onStreamingBoundsChanged=new $t.H,this._deadZoneSize=100,this._lastLoadPosition=new At.I(1/0,1/0)}create(){super.create(),this._deadZoneSizeSq=this._deadZoneSize*this._deadZoneSize,this._target&&ft.w.getActiveScene().onPostUpdate.add(this)}destroy(){this._target&&ft.w.getActiveScene().onPostUpdate.remove(this),this.onStreamingBoundsChanged.dispose(),this._target=null,super.destroy()}postUpdate(){if(!this.GameObject.activeInHierarchy)return;const q=this._target.worldPosition,K=new At.I(q.x-this._lastLoadPosition.x,q.y-this._lastLoadPosition.y),z=Et.i.main.viewportSize,Y=this.GameObject.transform.worldScale,Q=z.getHalfWidth()+this._horizontalLoadPadding*Y.x,X=z.getHalfHeight()+this._verticalLoadPadding*Y.y;if(K.getMagnitudeSq()>=this._deadZoneSizeSq){const q=this._target.worldPosition;this.onStreamingBoundsChanged.dispatch({top:q.y-X,bottom:q.y+X,left:q.x-Q,right:q.x+Q}),this._lastLoadPosition.copyFrom(q)}}getTarget(){var q;return null!==(q=this._target)&&void 0!==q?q:null}};(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Tn.prototype,"_horizontalLoadPadding",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Tn.prototype,"_verticalLoadPadding",void 0),(0,X.Cg)([(0,it.Mn)(kt.d),(0,X.Sn)("design:type",kt.d)],Tn.prototype,"_target",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],Tn.prototype,"onStreamingBoundsChanged",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Tn.prototype,"_deadZoneSize",void 0),Tn=(0,X.Cg)([(0,J.EV)("StreamingBoundsEla",J.YH.streaming)],Tn);let Sn=class extends Z.u{constructor(){super(...arguments),this.onLoadedAreaChanged=new $t.H,this._loadedBounds=null}create(){var q;super.create(),null===(q=this._streamingBounds)||void 0===q||q.onStreamingBoundsChanged.add(this.streamingAreaChanged,this)}destroy(){var q;null===(q=this._streamingBounds)||void 0===q||q.onStreamingBoundsChanged.remove(this.streamingAreaChanged,this),this.onLoadedAreaChanged.dispose(),this._streamedMap=null,this._streamingBounds=null,this._loadedBounds=null,super.destroy()}getLoadedBounds(){return this._loadedBounds?this.convertBoundsToWorld(this._loadedBounds):null}streamingAreaChanged(q){if(this._streamedMap){const K=this._streamedMap.GameObject.transform.worldMatrix,z=gs.J.applyInverseMatrixToBounds(q,K);this._loadedBounds&&gs.J.intersectBounds(this._loadedBounds,z),this._streamedMap.map.loadBlocks(gs.J.applyInverseMatrixToBounds(q,K)).then((()=>{this._loadedBounds=z,this.onLoadedAreaChanged.dispatch(this.convertBoundsToWorld(this._loadedBounds))}))}}convertBoundsToWorld(q){const K=this._streamedMap.GameObject.transform.worldMatrix;return gs.J.applyMatrixToBounds(q,K)}};var An,Cn;(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],Sn.prototype,"onLoadedAreaChanged",void 0),(0,X.Cg)([(0,it.Mn)(Tn),(0,X.Sn)("design:type",Tn)],Sn.prototype,"_streamingBounds",void 0),(0,X.Cg)([(0,it.Mn)(wn),(0,X.Sn)("design:type",wn)],Sn.prototype,"_streamedMap",void 0),Sn=(0,X.Cg)([(0,J.EV)("StreamingLoadedAreaEla",J.YH.streaming)],Sn),function(q){q[q.Left=0]="Left",q[q.Right=1]="Right",q[q.Top=2]="Top",q[q.Bottom=3]="Bottom"}(Cn||(Cn={}));let On=An=class extends Z.u{create(){var q;super.create(),Et.i.main.onViewportChanged.add(this.loadedAreaChanged,this),null===(q=this._loadedArea)||void 0===q||q.onLoadedAreaChanged.add(this.loadedAreaChanged,this)}destroy(){var q;Et.i.main.onViewportChanged.remove(this.loadedAreaChanged,this),null===(q=this._loadedArea)||void 0===q||q.onLoadedAreaChanged.remove(this.loadedAreaChanged,this),this._cameraColliders=[],this._cameraBounds=[],this._loadedArea=null,super.destroy()}loadedAreaChanged(q){if(!q)return;this._cameraBounds||this.createCameraBounds();const K=Et.i.main.viewportSize,z=this.GameObject.transform.worldScale,Y=new St.o(K.width/z.x,K.height/z.y),Q=this.GameObject.transform.worldMatrix.applyInverse({x:.5*(q.right-q.left)+q.left,y:.5*(q.bottom-q.top)+q.top}),X=.5*Math.max(q.right-q.left,K.width)/z.x,Z=.5*Math.max(q.bottom-q.top,K.height)/z.y,J=Q.x-X,et=Q.x+X,it=Q.y-Z,st=Q.y+Z,nt=st-it,at={width:et-J+2*Y.width,height:nt+2*Y.height};this._cameraBounds[Cn.Left].setAnchoredPivotOffset(J-An.HALF_COLLIDER_SIZE,Q.y),this._cameraBounds[Cn.Left].setSizeDelta(An.COLLIDER_SIZE,at.height),this._cameraBounds[Cn.Right].setAnchoredPivotOffset(et+An.HALF_COLLIDER_SIZE,Q.y),this._cameraBounds[Cn.Right].setSizeDelta(An.COLLIDER_SIZE,at.height),this._cameraBounds[Cn.Top].setAnchoredPivotOffset(Q.x,it-An.HALF_COLLIDER_SIZE),this._cameraBounds[Cn.Top].setSizeDelta(at.width,An.COLLIDER_SIZE),this._cameraBounds[Cn.Bottom].setAnchoredPivotOffset(Q.x,st+An.HALF_COLLIDER_SIZE),this._cameraBounds[Cn.Bottom].setSizeDelta(at.width,An.COLLIDER_SIZE);const rt=tt.W.instance.game.cameraCollisions;this._cameraColliders.forEach((q=>{rt.updateColliderBounds(q)}))}createCameraBounds(){this._cameraBounds=[],this._cameraColliders=[];for(let q=0;q0&&(this._indices[++q]=K.vertexIndex),this._indices[++q]=K.vertexIndex,this._indices[++q]=K.vertexIndex+1,this._indices[++q]=K.vertexIndex+2,this._indices[++q]=K.vertexIndex+3,this._indices[++q]=K.vertexIndex+3);q>0?(this._mesh.visible=!0,this._mesh.geometry.getIndex().update(this._indices),this._mesh.verticesBuffer.update(this._vertices),this._mesh.uvBuffer.update(this._uvs),this._mesh.size=q):this._mesh.visible=!1,this._isGeometryDirty=!1}setUpTile(q,K,z,Y,Q,X,Z){let J=q;const et=0!=(J&vs.flippedHorizontally),it=0!=(J&vs.flippedVertically),st=0!=(J&vs.flippedDiagonally);J&=~vs.all;const nt=Ts.getTileset(this._mapData.tilesets,J);if(!nt||!ut.A.isDefined(J))return null;J-=nt.firstgid;const at=this._streamer.getOrCreateTile(),rt=at.uvs,ot=tt.W.instance.game.cache.getFrameByName(nt.name,`${J}`,Ns.r.RENDER_TEXTURE),ht=ot.x/this._texture.width,ct=ot.right/this._texture.width,dt=ot.y/this._texture.height,lt=ot.bottom/this._texture.height;rt[0].x=ht,rt[0].y=dt,rt[1].x=ct,rt[1].y=dt,rt[2].x=ht,rt[2].y=lt,rt[3].x=ct,rt[3].y=lt;const ft=Math.max(0,Y),bt=Math.min(0,Y),pt=Math.max(0,Q),vt=Math.min(0,Q),gt=-bt/this._texture.width,mt=-ft/this._texture.width,yt=-vt/this._texture.height,_t=-pt/this._texture.height;let Et=[1,0,0,1];st&&(this.swap(rt,1,2),Et=[0,1,1,0]),et&&(this.swap(rt,0,1),this.swap(rt,2,3),Et[0]*=-1,Et[2]*=-1),it&&(this.swap(rt,0,2),this.swap(rt,1,3),Et[1]*=-1,Et[3]*=-1),rt[0].x+=gt*Et[0]+yt*Et[2],rt[0].y+=gt*Et[1]+yt*Et[3],rt[1].x+=mt*Et[0]+yt*Et[2],rt[1].y+=mt*Et[1]+yt*Et[3],rt[2].x+=gt*Et[0]+_t*Et[2],rt[2].y+=gt*Et[1]+_t*Et[3],rt[3].x+=mt*Et[0]+_t*Et[2],rt[3].y+=mt*Et[1]+_t*Et[3];const wt=K+ft,Tt=K+Ts.TILE_SIZE+bt,St=z+pt,At=z+Ts.TILE_SIZE+vt;let Ct=at.vertexIndex*Pn.FLOATS_PER_VERTEX;return[[wt,rt[0].x],[St,rt[0].y],[Tt,rt[1].x],[St,rt[1].y],[wt,rt[2].x],[At,rt[2].y],[Tt,rt[3].x],[At,rt[3].y]].forEach((q=>{this._vertices[Ct]=q[0],this._uvs[Ct]=q[1],++Ct})),at.toggleGroup=X,at.active=!(X>-1)||this._streamer.isToggleGroupVisible(X),this._isGeometryDirty=!0,at}swap(q,K,z){const Y=q[K];q[K]=q[z],q[z]=Y}createGenericTile(){this.ensureBufferAvailable(1+(this._nextTileVertex>>2));const q={vertexIndex:this._nextTileVertex,uvs:[{x:0,y:0},{x:0,y:0},{x:0,y:0},{x:0,y:0}],toggleGroup:-1,active:!0};return this._nextTileVertex+=Pn.VERTICES_PER_TILE,q}releaseTile(q){this._isGeometryDirty=!0}ensureBufferAvailable(q){var K,z,Y,Q;const X=q*Pn.FLOATS_PER_TILE;if((null!==(z=null===(K=this._vertices)||void 0===K?void 0:K.length)&&void 0!==z?z:0){ht.V.log(`TMXMapStreamer#loadMapByFilename: ${q}`,ct.$.Error)}))}loadMapByAsset(q){Ts.loadMapFile(q).then(this.loadMapFromData.bind(this)).catch((q=>{ht.V.log(`TMXMapStreamer#loadMapByAsset: ${q}`,ct.$.Error)}))}loadMapFromData(q){return(0,X.sH)(this,void 0,void 0,(function*(){return Ts.loadTilesets(this.mapData=q).then((()=>(0,X.sH)(this,void 0,void 0,(function*(){return this.setup()})))).catch((q=>{ht.V.log(`TMXMapStreamer#loadMapFromData: ${q}`,ct.$.Error)})).then((()=>(0,X.sH)(this,void 0,void 0,(function*(){this.onMapLoaded.dispatch()}))))}))}setup(){var q;const K=this.GameObject.addComponent(_s);for(let Y=0;Y0;--Y)this.releaseTile(this.createGenericTile());return K}update(){if(super.update(),this._setupComplete){const q=Et.i.main.GameObject.transform.worldPosition,K=Math.floor((q.x-Et.i.main.viewportSize.getHalfWidth()-this.GameObject.transform.worldPosition.x)/Ts.TILE_SIZE+.5)-Mn.OFFSCREEN_TILE_PRELOAD,z=Math.floor((q.y-Et.i.main.viewportSize.getHalfHeight()-this.GameObject.transform.worldPosition.y)/Ts.TILE_SIZE+.5)-Mn.OFFSCREEN_TILE_PRELOAD,Y=wt.c.clamp(K-this._tileLoadedLeft,-this._tileGridWidth,this._tileGridWidth),Q=Math.sign(Y);if(0!==Y)for(let J=Y;0!==J;J-=Q){const q=J>0?J-1:J;for(let K=0;K0?J+Y:J;for(let K=X;0!==K;K-=Z){const z=K>0?K-1:K;this.releaseGridCell(q,z)}}if(this._tileGridLeftIndex+=Y,this._tileGridTopIndex+=X,this._tileLoadedLeft=K,this._tileLoadedTop=z,0!==Y)for(let J=-Y;0!==J;J+=Q){const q=J>0?J-1:J;for(let K=0;K0?J:J-Y;for(let K=-X;0!==K;K+=Z){const z=K>0?K-1:K;this.setUpTilesForLayers(q,z)}}this._renderer.update()}}setUpTilesForLayers(q,K){const z=this.getTileGridCell(q,K),Y=this.screenToTmxIndex(q,K),Q=this.screenToLocalPosition(q,K),X=this._layerData.length;for(let Z=0;Z=q.width||Y.y>=q.height))if(q.data){const K=q.data[q.width*Y.y+Y.x];if(Boolean(K)){const Y=this.setUpTileForLayer(K,Q.x,Q.y,0,0,q);Y&&z.tiles.push(Y)}}else if(q.objects){const K=this._objectsByLayer[`${Z}|${Y.x},${Y.y}`];if(K)for(const Y of K){const K=this.setUpTileForLayer(Y.gid,Q.x,Q.y,Y.x-Q.x,Y.y-Q.y,q);K&&z.tiles.push(K)}}}}setUpTileForLayer(q,K,z,Y,Q,X){const Z=dt.get(X,"properties.dynamicToggle",-1),J=ut.A.isDefined(X.properties)&&X.properties.useAnimDuration;return this._renderer.setUpTile(q,K,z,Y,Q,Z,J)}createGenericTile(){const q=this._renderer.createGenericTile();return this._createdTiles.push(q),this._activeTiles.push(q),q}releaseGridCell(q,K){const z=this.getTileGridCell(q,K);for(const Y of z.tiles)this.releaseTile(Y),z.tiles=[]}releaseTile(q){this._renderer.releaseTile(q),this._activeTiles.splice(this._activeTiles.indexOf(q),1),this._tilePool.push(q)}getPooledTile(){const q=this._tilePool.pop();return q&&this._activeTiles.push(q),q}getOrCreateTile(){var q;return null!==(q=this.getPooledTile())&&void 0!==q?q:this.createGenericTile()}screenToTileGridIndex(q,K){return{x:ut.A.wrapArrayIndex(this._tileGridLeftIndex+q,this._tileGridWidth),y:ut.A.wrapArrayIndex(this._tileGridTopIndex+K,this._tileGridHeight)}}screenToTmxIndex(q,K){return{x:this._tileLoadedLeft+ut.A.wrapArrayIndex(q,this._tileGridWidth),y:this._tileLoadedTop+ut.A.wrapArrayIndex(K,this._tileGridHeight)}}screenToLocalPosition(q,K){const z=this.screenToTmxIndex(q,K);return z.x=z.x*Ts.TILE_SIZE,z.y=z.y*Ts.TILE_SIZE,z}getTileGridCell(q,K){const z=this.screenToTileGridIndex(q,K);return this._tileGrid[z.x][z.y]}setToggleGroupVisible(q,K){var z;this._toggleGroupState[q]=K,null===(z=this._renderer)||void 0===z||z.setToggleGroupVisible(q,K)}isToggleGroupVisible(q){var K;return null===(K=this._toggleGroupState[q])||void 0===K||K}};Nn.OFFSCREEN_TILE_PRELOAD=3,Nn.STREAMER_POOL_BUFFER_SCALE=.25,(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],Nn.prototype,"fileName",void 0),(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String)],Nn.prototype,"asset",void 0),Nn=Mn=(0,X.Cg)([(0,J.EV)("TMXMapStreamer",J.YH.tiled,"Handles the creation of on-screen tiles for the streaming system"),(0,ot.D)()],Nn);let xn=class extends Z.u{constructor(){super(...arguments),this._hasCombinedMaps=!1,this.onMapsCombined=new $t.H,this._enableDebugDrawCombinerAtlas=!1}set EnableDebugDrawCombinerAtlas(q){this._enableDebugDrawCombinerAtlas=q}postCreate(){super.postCreate(),this.loadAndCombineMapData().catch((q=>{ht.V.log(`TMXMapCombiner: Error in load and combine map data. The error is ${q.message} and stack trace is: ${q.stack}`,ct.$.Error)}))}destroy(){this.onMapsCombined.dispose(),super.destroy()}loadAndCombineMapData(){return(0,X.sH)(this,void 0,void 0,(function*(){const q=this.GameObject.findComponentsInChildren(Nn);if(q){const K=new Ls,z=[];for(const Q of q)Q.mapData?K.addMapData(Q.mapData):ut.A.isDefined(Q.asset)?(z.push(Nn.loadMapFile(Q.asset).then((q=>(0,X.sH)(this,void 0,void 0,(function*(){return Ts.loadTilesets(q)})))).then((q=>{Q.mapData=q,K.addMapData(q)}))),Q.fileName=Q.asset=void 0):ut.A.isDefined(Q.fileName)?(z.push(Nn.loadMapFileFromUrl(Q.fileName).then((q=>(0,X.sH)(this,void 0,void 0,(function*(){return Ts.loadTilesets(q)})))).then((q=>{Q.mapData=q,K.addMapData(q)}))),Q.fileName=Q.asset=void 0):ht.V.log("TMXMapCombiner: Data is not defined for a streamer",ct.$.Error);yield Promise.all(z);const Y=yield K.combine();for(const Q of q)Q.loadMapFromData(Q.mapData).catch((q=>{ht.V.log(`TMXMapCombiner: Error loading map from data. The error is ${q.message} and stack trace is: ${q.stack}`,ct.$.Error)}));if(this._hasCombinedMaps=!0,this.onMapsCombined.dispatch(),this._enableDebugDrawCombinerAtlas){const q=tt.W.instance.game,K=tt.W.instance.game.add.sprite(0,0,void 0,void 0,void 0,q.cache.getRenderTexture(Y));K.fixedToCamera=!0;const z=tt.W.instance.game.height;let Q=K.width,X=K.height;if(X>z){const q=z/X;Q*=q,X=z,K.scale.set(q,q)}const Z=tt.W.instance.game.add.graphics(0,0);Z.beginFill(65535,1).drawRect(0,0,Q,X).endFill();const J=tt.W.instance.game.add.renderTexture(Q,X);ee.C.clear(J),ee.C.renderRawXY(J,Z,0,0),ee.C.renderXY(J,K,0,0),q.world.addChild(K)}}}))}hasCombinedMaps(){return this._hasCombinedMaps}};var Ln;xn=(0,X.Cg)([(0,J.EV)("TMXMapCombiner",J.YH.tiled,"Runs TMXMapDataCombiner on TMXMapStreamers in children to generate a shared atlas
and remap the tile data")],xn);let kn=Ln=class extends Ts{create(){super.create(),""!==this.tiledMap?this._generatedAssetTag=ut.A.generateGUID():this._generatedAssetTag=this.tiledMap,(this.inGameAsset||this.tiledMap)&&this.reloadMapFile(!1)}destroy(){this._container&&this._container.destroy(),super.destroy()}reloadMapFile(q=!0){if(this._container&&this._container.destroy(),super.create(),this._container=new Ne._(this.GameObject),this._container.onDestroy.addOnce((()=>{this._container=null})),this._container.addComponent(kt.d),q){const q=tt.W.instance.game.cache;q.checkJSONKey(this.tiledMap)&&q.removeJSON(this.tiledMap)}else{const q=Ln.spriteCache.get(this.tiledMap);if(q){const K=new Ne._(this._container);K.addComponent(kt.d);return void K.addComponent(Oe).setTexture(q)}}this.loadMap()}loadMap(){Ts.loadMapFile(this._generatedAssetTag).then((q=>(0,X.sH)(this,void 0,void 0,(function*(){return Ts.loadTilesets(q)})))).then((q=>(0,X.sH)(this,void 0,void 0,(function*(){return this.createFlatImage(q)})))).catch((q=>{ht.V.log(`TMXMapEditorComponent#loadMap: ${q}`,ct.$.Error)})).then((()=>(0,X.sH)(this,void 0,void 0,(function*(){this.onMapLoaded.dispatch(this._generatedAssetTag)}))))}createFlatImage(q){return(0,X.sH)(this,void 0,void 0,(function*(){var K;let z=0,Y=0;for(let tt=0;tt0&&K.height>0&&(K.properties&&ut.A.isDefined(K.properties.reference)||(z=Math.max(z,K.width),Y=Math.max(Y,K.height)))}const Q=tt.W.instance.game.add.renderTexture(z*Nn.TILE_SIZE,Y*Nn.TILE_SIZE),X=new Ne._;X.addComponent(Ae.K);const Z=X.addComponent(Oe);Object.defineProperty(Z,"assetLoader",{get:()=>({isLoaded:q=>tt.W.instance.loader.isLoaded(q,ls.Image)})});const J=X.addComponent(Es);let et=vs.none;for(let tt=0;tt0&&it.height>0))continue;if(it.properties&&ut.A.isDefined(it.properties.reference))continue;Z.setAlpha(null!==(K=it.opacity)&&void 0!==K?K:1);const st=new Map;for(let K=0;K<=Y;++K)for(let Y=0;Y<=z;++Y){const z=Ts.getTileData(it.data[it.width*K+Y],q.tilesets);if(z&&z.id>=0){z.x=Y*Ts.TILE_SIZE,z.y=K*Ts.TILE_SIZE;let q=st.get(z.tileset.name);q||st.set(z.tileset.name,q=new Map),q.has(z.id)?q.get(z.id).push(z):q.set(z.id,[z])}}if(st.size<=0)continue;const nt=.5*Nn.TILE_SIZE;for(const[q,K]of st.entries())for(const[z,Y]of K.entries()){Z.updateAsset(q,`${z}`);for(const q of Y)et!==q.transform&&(J.rotate(0!=(q.transform&vs.flippedVertically),0!=(q.transform&vs.flippedHorizontally),0!=(q.transform&vs.flippedDiagonally)),et=q.transform),X.legacyTransform.group.updateTransform(),ee.C.renderRawXY(Q,X.legacyTransform.group,q.x+nt,q.y+nt,!1)}}X.destroy();const it=new Ne._(this._container);it.addComponent(kt.d);it.addComponent(Oe).setTexture(Q),Ln.spriteCache.set(this.tiledMap,Q)}))}};kn.spriteCache=new Map,(0,X.Cg)([(0,it.W_)(),(0,it.nK)("asset"),(0,X.Sn)("design:type",String)],kn.prototype,"inGameAsset",void 0),(0,X.Cg)([(0,it.i0)(Ki.Z.TiledMap),(0,X.Sn)("design:type",String)],kn.prototype,"tiledMap",void 0),(0,X.Cg)([(0,We.G)(),(0,X.Sn)("design:type",Function),(0,X.Sn)("design:paramtypes",[Boolean]),(0,X.Sn)("design:returntype",void 0)],kn.prototype,"reloadMapFile",null),kn=Ln=(0,X.Cg)([(0,J.EV)("TiledMap",J.YH.tiled,"Loads and displays a Tiled map file in editor")],kn);let Bn=class extends Z.u{findPath(q,K){throw new Error("Not implemented")}findPathAsync(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){throw new Error("Not implemented")}))}};var Un;Bn=(0,X.Cg)([(0,J.EV)("IPathfinderComponent",void 0,"A component that pathfinds")],Bn),function(q){q.MovePlayer="Prodigy.Events.PlayerLocomotion.MOVE_PLAYER",q.StopPlayer="Prodigy.Events.PlayerLocomotion.STOP_PLAYER",q.GetTarget="Prodigy.Events.PlayerLocomotion.GET_TARGET"}(Un||(Un={}));let Fn=class extends Ui{constructor(){super(...arguments),this._deltaPos=new At.I,this._targetNavMesh=null,this.speed=.25,this._onMoveStart=new $t.H,this._onMoveEnd=new $t.H,this._onPathComplete=new $t.H}get deltaPos(){return this._deltaPos}get onMoveStart(){return this._onMoveStart}get onMoveEnd(){return this._onMoveEnd}get onPathComplete(){return this._onPathComplete}get targetNavMesh(){return null===this._targetNavMesh?tt.W.instance.game.navMeshSystem.navMesh:this._targetNavMesh}set targetNavMesh(q){this._targetNavMesh=q}create(){super.create(),this._lastTarget=new At.I,this._lastTarget.copyFrom(this.GameObject.transform.worldPosition),tt.W.instance.game.stage.addListener(Un.StopPlayer,this.stop.bind(this),this),tt.W.instance.game.stage.addListener(Un.GetTarget,this.onGetTarget.bind(this),this)}onDisable(){super.onDisable(),this.stop()}pathTo(q){if(this.Active){const K=this.GameObject.transform.worldPosition,z=this.targetNavMesh.findPath(new At.I(K.x,K.y),q);if(z)return this.foundPath(z),!0}return!1}foundPath(q){this.currentPath=q,this.currentPathSegment=-1,this.currentPathSegmentLength=0,this.currentPathSegmentRemaining=0,this._onMoveStart.dispatch()}update(){if(super.update(),this.currentPath){let q=this.speed*tt.W.instance.game.time.deltaMS,K=this.currentPath[this.currentPathSegment],z=this.currentPath[this.currentPathSegment+1];for(;q>=this.currentPathSegmentRemaining;){if(q-=this.currentPathSegmentRemaining,++this.currentPathSegment>=this.currentPath.length-1)return this.stop(),this._onPathComplete.dispatch(),void this.GameObject.transform.setPosition(z.x,z.y);K=z,z=this.currentPath[this.currentPathSegment+1],this.currentPathSegmentLength=this.currentPathSegmentRemaining=K.getDistance(z)}this.currentPathSegmentRemaining-=q;const Y=this.currentPathSegmentRemaining/this.currentPathSegmentLength,Q=new At.I(wt.c.linear(z.x,K.x,Y),wt.c.linear(z.y,K.y,Y)),X=this.GameObject.transform.worldPosition;this._deltaPos.setTo(Q.x-X.x,Q.y-X.y),this.GameObject.transform.setPosition(Q.x,Q.y)}else this._deltaPos.copyFrom(At.I.ZERO)}stop(){this.currentPath=null,this.currentPathSegment=-1,this.currentPathSegmentLength=0,this.currentPathSegmentRemaining=0,this._deltaPos.copyFrom(At.I.ZERO),this._onMoveEnd.dispatch()}onGetTarget(q=!1){if(q){const q=this.GameObject.transform.worldPosition;return{x:q.x,y:q.y}}return{x:this._lastTarget.x,y:this._lastTarget.y}}destroy(){tt.W.instance.game.stage.removeListener(Un.StopPlayer),tt.W.instance.game.stage.removeListener(Un.GetTarget),this._onMoveStart.dispose(),this._onMoveEnd.dispose(),this._onPathComplete.dispose(),super.destroy()}};(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],Fn.prototype,"_onMoveStart",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],Fn.prototype,"_onMoveEnd",void 0),Fn=(0,X.Cg)([(0,J.EV)("NavMeshLocomotion",void 0,"Handles movement across a NavMesh")],Fn);let Gn=class extends Bn{findPath(q,K){var z;return null===(z=tt.W.instance.game.navMeshSystem.navMesh)||void 0===z?void 0:z.findPath(q,K)}findPathAsync(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){return this.findPath(q,K)}))}};var jn;Gn=(0,X.Cg)([(0,J.EV)("NavMeshPathfinder",J.YH.motion,"Hooks into the nav mesh and finds a path from the source to the target location")],Gn);let $n=jn=class extends Z.u{constructor(){super(...arguments),this.deltaPos=new At.I,this.speed=.25,this._autoScaleSpeed=!1,this.onPathStart=new $t.H,this.onPathEnd=new $t.H,this.onPathComplete=new $t.H,this.onTargetSelected=new $t.H}get currentPathSegment(){return this._currentPathSegment}get target(){var q,K;const z=null!==(K=null===(q=this._currentPath)||void 0===q?void 0:q[this._currentPath.length-1])&&void 0!==K?K:this.gameObject.transform.localPosition;return{x:z.x,y:z.y}}destroy(){this.onPathStart.dispose(),this.onPathEnd.dispose(),this.onPathComplete.dispose(),this.onTargetSelected.dispose(),super.destroy()}onDisable(){super.onDisable(),this.stop()}getPath(){return this._currentPath}setPath(q){this._currentPath=q,this._currentPathSegment=-1,this._currentPathSegmentLength=0,this._currentPathSegmentRemaining=0,this.onPathStart.dispatch(),this.onTargetSelected.dispatch(q[q.length-1])}update(){if(super.update(),this._currentPath){let q=this.speed;this._autoScaleSpeed&&(q*=this.gameObject.transform.worldScale.x);let K=q*Math.min(tt.W.instance.game.time.deltaMS,jn.MAX_ELAPSED_MS),z=this._currentPath[this._currentPathSegment],Y=this._currentPath[this._currentPathSegment+1];for(;K>=this._currentPathSegmentRemaining;){if(K-=this._currentPathSegmentRemaining,++this._currentPathSegment>=this._currentPath.length-1)return this.stop(),this.onPathComplete.dispatch(),void(Y&&this.updatePos(Y));z=Y,Y=this._currentPath[this._currentPathSegment+1],this._currentPathSegmentLength=this._currentPathSegmentRemaining=ee.C.getDistance(z,Y)}this._currentPathSegmentRemaining-=K;const Q=this._currentPathSegmentRemaining/this._currentPathSegmentLength,X=new At.I(wt.c.linear(Y.x,z.x,Q),wt.c.linear(Y.y,z.y,Q));this.updatePos(X)}else this.deltaPos.copyFrom(At.I.ZERO)}updatePos(q){const K=this.gameObject.transform;this.deltaPos.copyFrom(q),this.deltaPos.subtract(K.localPosition),K.worldPosition=q}stop(){this._currentPath&&(this._currentPath=null,this._currentPathSegment=-1,this._currentPathSegmentLength=0,this._currentPathSegmentRemaining=0,this.deltaPos.copyFrom(At.I.ZERO),this.onPathEnd.dispatch())}};$n.MAX_ELAPSED_MS=200,(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],$n.prototype,"speed",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],$n.prototype,"_autoScaleSpeed",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],$n.prototype,"onPathStart",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],$n.prototype,"onPathEnd",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],$n.prototype,"onPathComplete",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],$n.prototype,"onTargetSelected",void 0),$n=jn=(0,X.Cg)([(0,J.S1)(),(0,J.EV)("PathLocomotion",J.YH.motion,"Takes in a path of points and moves the GameObject transform along that given path")],$n);var Hn=z(96352);class Vn extends Hn.M{constructor(q){super(q);const K=this.compileProgram(Vn.VERTEX_SRC,Vn.FRAGMENT_SRC);this.useProgram(),this.uSamplerLocation=q.getUniformLocation(K,"uSampler"),this.uCameraMatrixLocation=q.getUniformLocation(K,"cameraMatrix"),this.aVertexPositionLocation=q.getAttribLocation(K,"aVertexPosition"),this.aTextureCoordPositionLocation=q.getAttribLocation(K,"aTextureCoord")}}Vn.VERTEX_SRC="\n precision highp float;\n attribute vec2 aVertexPosition;\n attribute vec2 aTextureCoord;\n\n uniform mat3 cameraMatrix;\n\n varying vec2 vTextureCoord;\n\n void main(void) {\n gl_Position = vec4(cameraMatrix * vec3(aVertexPosition, 1.0), 1.0);\n vTextureCoord = aTextureCoord;\n }\n ",Vn.FRAGMENT_SRC="\n precision highp float;\n varying vec2 vTextureCoord;\n\n uniform sampler2D uSampler;\n\n void main(void) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n }\n ";z(2136);var Wn=z(40008);z(94341);class qn extends nn{constructor(){super(...arguments),this._navMeshPolygonID=null}postCreate(){super.postCreate(),this.addPolygon(),this.GameObject.transform.onWorldMatrixChanged.add(this.refreshPolygonData,this),this.OnActiveChanged.add(this.refreshPolygonData,this)}destroy(){this.GameObject.transform.onWorldMatrixChanged.remove(this.refreshPolygonData,this),this.OnActiveChanged.remove(this.refreshPolygonData,this),this.removePolygon(),super.destroy()}updatePolygonPoints(q){this.points=q,this.refreshPolygonData()}refreshPolygonData(){const q=tt.W.instance.game.navMeshSystem;q.beginNavMeshUpdateQueue(),this.removePolygon(),this.addPolygon(),q.flushNavMeshUpdateQueue()}removePolygon(){null!==this._navMeshPolygonID&&(this.removePolygonFromNavMeshSystem(this._navMeshPolygonID),this._navMeshPolygonID=null)}addPolygon(){this.Active&&null===this._navMeshPolygonID&&(this._navMeshPolygonID=this.addPolygonToNavMeshSystem(this.getPointsInWorldSpace()))}getPointsInWorldSpace(){const q=this.GameObject.transform.worldMatrix.clone(),K=this.GameObject.transform.worldScale;return q.scale(1/K.x,1/K.y),this.points.map((K=>q.apply(K)))}}let Kn=class extends qn{removePolygonFromNavMeshSystem(q){tt.W.instance.game.navMeshSystem.removePolygon(q)}addPolygonToNavMeshSystem(q){return tt.W.instance.game.navMeshSystem.addWalkablePolygon(q)}};Kn=(0,X.Cg)([(0,J.EV)("NavMeshPolygonEla",J.YH.map,"A navigation mesh polygon that the player can walk on")],Kn);z(87945);let zn=class extends qn{removePolygonFromNavMeshSystem(q){tt.W.instance.game.navMeshSystem.removePolygon(q)}addPolygonToNavMeshSystem(q){return tt.W.instance.game.navMeshSystem.addNonWalkablePolygon(q)}};zn=(0,X.Cg)([(0,J.EV)("ColliderPolygonEla",J.YH.map,"A polygon defining a non-walkable area")],zn);z(66570),z(59004);const Yn=Object.create(null);Yn.open="0",Yn.close="1",Yn.ping="2",Yn.pong="3",Yn.message="4",Yn.upgrade="5",Yn.noop="6";const Qn=Object.create(null);Object.keys(Yn).forEach((q=>{Qn[Yn[q]]=q}));const Xn={type:"error",data:"parser error"},Zn="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Jn="function"==typeof ArrayBuffer,ta=q=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(q):q&&q.buffer instanceof ArrayBuffer,ea=({type:q,data:K},z,Y)=>Zn&&K instanceof Blob?z?Y(K):ia(K,Y):Jn&&(K instanceof ArrayBuffer||ta(K))?z?Y(K):ia(new Blob([K]),Y):Y(Yn[q]+(K||"")),ia=(q,K)=>{const z=new FileReader;return z.onload=function(){const q=z.result.split(",")[1];K("b"+(q||""))},z.readAsDataURL(q)};function sa(q){return q instanceof Uint8Array?q:q instanceof ArrayBuffer?new Uint8Array(q):new Uint8Array(q.buffer,q.byteOffset,q.byteLength)}let na;const aa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ra="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let $o=0;$o{if("string"!=typeof q)return{type:"message",data:da(q,K)};const z=q.charAt(0);if("b"===z)return{type:"message",data:ca(q.substring(1),K)};return Qn[z]?q.length>1?{type:Qn[z],data:q.substring(1)}:{type:Qn[z]}:Xn},ca=(q,K)=>{if(oa){const z=(q=>{let K,z,Y,Q,X,Z=.75*q.length,J=q.length,tt=0;"="===q[q.length-1]&&(Z--,"="===q[q.length-2]&&Z--);const et=new ArrayBuffer(Z),it=new Uint8Array(et);for(K=0;K>4,it[tt++]=(15&Y)<<4|Q>>2,it[tt++]=(3&Q)<<6|63&X;return et})(q);return da(z,K)}return{base64:!0,data:q}},da=(q,K)=>{switch(K){case"blob":return q instanceof Blob?q:new Blob([q]);case"arraybuffer":default:return q instanceof ArrayBuffer?q:q.buffer}},la=String.fromCharCode(30);function ua(){return new TransformStream({transform(q,K){!function(q,K){Zn&&q.data instanceof Blob?q.data.arrayBuffer().then(sa).then(K):Jn&&(q.data instanceof ArrayBuffer||ta(q.data))?K(sa(q.data)):ea(q,!1,(q=>{na||(na=new TextEncoder),K(na.encode(q))}))}(q,(z=>{const Y=z.length;let Q;if(Y<126)Q=new Uint8Array(1),new DataView(Q.buffer).setUint8(0,Y);else if(Y<65536){Q=new Uint8Array(3);const q=new DataView(Q.buffer);q.setUint8(0,126),q.setUint16(1,Y)}else{Q=new Uint8Array(9);const q=new DataView(Q.buffer);q.setUint8(0,127),q.setBigUint64(1,BigInt(Y))}q.data&&"string"!=typeof q.data&&(Q[0]|=128),K.enqueue(Q),K.enqueue(z)}))}})}let fa;function ba(q){return q.reduce(((q,K)=>q+K.length),0)}function pa(q,K){if(q[0].length===K)return q.shift();const z=new Uint8Array(K);let Y=0;for(let Q=0;QPromise.resolve().then(q):(q,K)=>K(q,0),ma="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function ya(q,...K){return K.reduce(((K,z)=>(q.hasOwnProperty(z)&&(K[z]=q[z]),K)),{})}const _a=ma.setTimeout,Ea=ma.clearTimeout;function wa(q,K){K.useNativeTimers?(q.setTimeoutFn=_a.bind(ma),q.clearTimeoutFn=Ea.bind(ma)):(q.setTimeoutFn=ma.setTimeout.bind(ma),q.clearTimeoutFn=ma.clearTimeout.bind(ma))}function Ta(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class Sa extends Error{constructor(q,K,z){super(q),this.description=K,this.context=z,this.type="TransportError"}}class Aa extends va{constructor(q){super(),this.writable=!1,wa(this,q),this.opts=q,this.query=q.query,this.socket=q.socket,this.supportsBinary=!q.forceBase64}onError(q,K,z){return super.emitReserved("error",new Sa(q,K,z)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(q){"open"===this.readyState&&this.write(q)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(q){const K=ha(q,this.socket.binaryType);this.onPacket(K)}onPacket(q){super.emitReserved("packet",q)}onClose(q){this.readyState="closed",super.emitReserved("close",q)}pause(q){}createUri(q,K={}){return q+"://"+this._hostname()+this._port()+this.opts.path+this._query(K)}_hostname(){const q=this.opts.hostname;return-1===q.indexOf(":")?q:"["+q+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(q){const K=function(q){let K="";for(let z in q)q.hasOwnProperty(z)&&(K.length&&(K+="&"),K+=encodeURIComponent(z)+"="+encodeURIComponent(q[z]));return K}(q);return K.length?"?"+K:""}}class Ca extends Aa{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(q){this.readyState="pausing";const K=()=>{this.readyState="paused",q()};if(this._polling||!this.writable){let q=0;this._polling&&(q++,this.once("pollComplete",(function(){--q||K()}))),this.writable||(q++,this.once("drain",(function(){--q||K()})))}else K()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(q){((q,K)=>{const z=q.split(la),Y=[];for(let Q=0;Q{if("opening"===this.readyState&&"open"===q.type&&this.onOpen(),"close"===q.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(q)})),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const q=()=>{this.write([{type:"close"}])};"open"===this.readyState?q():this.once("open",q)}write(q){this.writable=!1,((q,K)=>{const z=q.length,Y=new Array(z);let Q=0;q.forEach(((q,X)=>{ea(q,!1,(q=>{Y[X]=q,++Q===z&&K(Y.join(la))}))}))})(q,(q=>{this.doWrite(q,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const q=this.opts.secure?"https":"http",K=this.query||{};return!1!==this.opts.timestampRequests&&(K[this.opts.timestampParam]=Ta()),this.supportsBinary||K.sid||(K.b64=1),this.createUri(q,K)}}let Oa=!1;try{Oa="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(jo){}const Ia=Oa;function Da(){}class Ra extends Ca{constructor(q){if(super(q),"undefined"!=typeof location){const K="https:"===location.protocol;let z=location.port;z||(z=K?"443":"80"),this.xd="undefined"!=typeof location&&q.hostname!==location.hostname||z!==q.port}}doWrite(q,K){const z=this.request({method:"POST",data:q});z.on("success",K),z.on("error",((q,K)=>{this.onError("xhr post error",q,K)}))}doPoll(){const q=this.request();q.on("data",this.onData.bind(this)),q.on("error",((q,K)=>{this.onError("xhr poll error",q,K)})),this.pollXhr=q}}class Pa extends va{constructor(q,K,z){super(),this.createRequest=q,wa(this,z),this._opts=z,this._method=z.method||"GET",this._uri=K,this._data=void 0!==z.data?z.data:null,this._create()}_create(){var q;const K=ya(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");K.xdomain=!!this._opts.xd;const z=this._xhr=this.createRequest(K);try{z.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){z.setDisableHeaderCheck&&z.setDisableHeaderCheck(!0);for(let q in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(q)&&z.setRequestHeader(q,this._opts.extraHeaders[q])}}catch(e){}if("POST"===this._method)try{z.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{z.setRequestHeader("Accept","*/*")}catch(e){}null===(q=this._opts.cookieJar)||void 0===q||q.addCookies(z),"withCredentials"in z&&(z.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(z.timeout=this._opts.requestTimeout),z.onreadystatechange=()=>{var q;3===z.readyState&&(null===(q=this._opts.cookieJar)||void 0===q||q.parseCookies(z.getResponseHeader("set-cookie"))),4===z.readyState&&(200===z.status||1223===z.status?this._onLoad():this.setTimeoutFn((()=>{this._onError("number"==typeof z.status?z.status:0)}),0))},z.send(this._data)}catch(e){return void this.setTimeoutFn((()=>{this._onError(e)}),0)}"undefined"!=typeof document&&(this._index=Pa.requestsCount++,Pa.requests[this._index]=this)}_onError(q){this.emitReserved("error",q,this._xhr),this._cleanup(!0)}_cleanup(q){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Da,q)try{this._xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Pa.requests[this._index],this._xhr=null}}_onLoad(){const q=this._xhr.responseText;null!==q&&(this.emitReserved("data",q),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Pa.requestsCount=0,Pa.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Ma);else if("function"==typeof addEventListener){addEventListener("onpagehide"in ma?"pagehide":"unload",Ma,!1)}function Ma(){for(let q in Pa.requests)Pa.requests.hasOwnProperty(q)&&Pa.requests[q].abort()}const Na=function(){const q=xa({xdomain:!1});return q&&null!==q.responseType}();function xa(q){const K=q.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!K||Ia))return new XMLHttpRequest}catch(e){}if(!K)try{return new(ma[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}const La="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class ka extends Aa{get name(){return"websocket"}doOpen(){const q=this.uri(),K=this.opts.protocols,z=La?{}:ya(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(z.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(q,K,z)}catch(jo){return this.emitReserved("error",jo)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=q=>this.onClose({description:"websocket connection closed",context:q}),this.ws.onmessage=q=>this.onData(q.data),this.ws.onerror=q=>this.onError("websocket error",q)}write(q){this.writable=!1;for(let K=0;K{try{this.doWrite(z,q)}catch(e){}Y&&ga((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const q=this.opts.secure?"wss":"ws",K=this.query||{};return this.opts.timestampRequests&&(K[this.opts.timestampParam]=Ta()),this.supportsBinary||(K.b64=1),this.createUri(q,K)}}const Ba=ma.WebSocket||ma.MozWebSocket;const Ua={websocket:class extends ka{createSocket(q,K,z){return La?new Ba(q,K,z):K?new Ba(q,K):new Ba(q)}doWrite(q,K){this.ws.send(K)}},webtransport:class extends Aa{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(jo){return this.emitReserved("error",jo)}this._transport.closed.then((()=>{this.onClose()})).catch((q=>{this.onError("webtransport error",q)})),this._transport.ready.then((()=>{this._transport.createBidirectionalStream().then((q=>{const K=function(q,K){fa||(fa=new TextDecoder);const z=[];let Y=0,Q=-1,X=!1;return new TransformStream({transform(Z,J){for(z.push(Z);;){if(0===Y){if(ba(z)<1)break;const q=pa(z,1);X=128==(128&q[0]),Q=127&q[0],Y=Q<126?3:126===Q?1:2}else if(1===Y){if(ba(z)<2)break;const q=pa(z,2);Q=new DataView(q.buffer,q.byteOffset,q.length).getUint16(0),Y=3}else if(2===Y){if(ba(z)<8)break;const q=pa(z,8),K=new DataView(q.buffer,q.byteOffset,q.length),X=K.getUint32(0);if(X>Math.pow(2,21)-1){J.enqueue(Xn);break}Q=X*Math.pow(2,32)+K.getUint32(4),Y=3}else{if(ba(z)q){J.enqueue(Xn);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),z=q.readable.pipeThrough(K).getReader(),Y=ua();Y.readable.pipeTo(q.writable),this._writer=Y.writable.getWriter();const Q=()=>{z.read().then((({done:q,value:K})=>{q||(this.onPacket(K),Q())})).catch((q=>{}))};Q();const X={type:"open"};this.query.sid&&(X.data=`{"sid":"${this.query.sid}"}`),this._writer.write(X).then((()=>this.onOpen()))}))}))}write(q){this.writable=!1;for(let K=0;K{Y&&ga((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var q;null===(q=this._transport)||void 0===q||q.close()}},polling:class extends Ra{constructor(q){super(q);const K=q&&q.forceBase64;this.supportsBinary=Na&&!K}request(q={}){return Object.assign(q,{xd:this.xd},this.opts),new Pa(xa,this.uri(),q)}}},Fa=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ga=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ja(q){if(q.length>8e3)throw"URI too long";const K=q,z=q.indexOf("["),Y=q.indexOf("]");-1!=z&&-1!=Y&&(q=q.substring(0,z)+q.substring(z,Y).replace(/:/g,";")+q.substring(Y,q.length));let Q=Fa.exec(q||""),X={},Z=14;for(;Z--;)X[Ga[Z]]=Q[Z]||"";return-1!=z&&-1!=Y&&(X.source=K,X.host=X.host.substring(1,X.host.length-1).replace(/;/g,":"),X.authority=X.authority.replace("[","").replace("]","").replace(/;/g,":"),X.ipv6uri=!0),X.pathNames=function(q,K){const z=/\/{2,9}/g,Y=K.replace(z,"/").split("/");"/"!=K.slice(0,1)&&0!==K.length||Y.splice(0,1);"/"==K.slice(-1)&&Y.splice(Y.length-1,1);return Y}(0,X.path),X.queryKey=function(q,K){const z={};return K.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(q,K,Y){K&&(z[K]=Y)})),z}(0,X.query),X}const $a="function"==typeof addEventListener&&"function"==typeof removeEventListener,Ha=[];$a&&addEventListener("offline",(()=>{Ha.forEach((q=>q()))}),!1);class Va extends va{constructor(q,K){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,q&&"object"==typeof q&&(K=q,q=null),q){const z=ja(q);K.hostname=z.host,K.secure="https"===z.protocol||"wss"===z.protocol,K.port=z.port,z.query&&(K.query=z.query)}else K.host&&(K.hostname=ja(K.host).host);wa(this,K),this.secure=null!=K.secure?K.secure:"undefined"!=typeof location&&"https:"===location.protocol,K.hostname&&!K.port&&(K.port=this.secure?"443":"80"),this.hostname=K.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=K.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},K.transports.forEach((q=>{const K=q.prototype.name;this.transports.push(K),this._transportsByName[K]=q})),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},K),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(q){let K={},z=q.split("&");for(let Y=0,Q=z.length;Y{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ha.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(q){const K=Object.assign({},this.opts.query);K.EIO=4,K.transport=q,this.id&&(K.sid=this.id);const z=Object.assign({},this.opts,{query:K,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[q]);return new this._transportsByName[q](z)}_open(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);const q=this.opts.rememberUpgrade&&Va.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const K=this.createTransport(q);K.open(),this.setTransport(K)}setTransport(q){this.transport&&this.transport.removeAllListeners(),this.transport=q,q.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(q=>this._onClose("transport close",q)))}onOpen(){this.readyState="open",Va.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(q){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",q),this.emitReserved("heartbeat"),q.type){case"open":this.onHandshake(JSON.parse(q.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const K=new Error("server error");K.code=q.data,this._onError(K);break;case"message":this.emitReserved("data",q.data),this.emitReserved("message",q.data)}}onHandshake(q){this.emitReserved("handshake",q),this.id=q.sid,this.transport.query.sid=q.sid,this._pingInterval=q.pingInterval,this._pingTimeout=q.pingTimeout,this._maxPayload=q.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const q=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+q,this._pingTimeoutTimer=this.setTimeoutFn((()=>{this._onClose("ping timeout")}),q),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const q=this._getWritablePackets();this.transport.send(q),this._prevBufferLen=q.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let q=1;for(let z=0;z=57344?z+=3:(Y++,z+=4);return z}(K):Math.ceil(1.33*(K.byteLength||K.size))),z>0&&q>this._maxPayload)return this.writeBuffer.slice(0,z);q+=2}var K;return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const q=Date.now()>this._pingTimeoutTime;return q&&(this._pingTimeoutTime=0,ga((()=>{this._onClose("ping timeout")}),this.setTimeoutFn)),q}write(q,K,z){return this._sendPacket("message",q,K,z),this}send(q,K,z){return this._sendPacket("message",q,K,z),this}_sendPacket(q,K,z,Y){if("function"==typeof K&&(Y=K,K=void 0),"function"==typeof z&&(Y=z,z=null),"closing"===this.readyState||"closed"===this.readyState)return;(z=z||{}).compress=!1!==z.compress;const Q={type:q,data:K,options:z};this.emitReserved("packetCreate",Q),this.writeBuffer.push(Q),Y&&this.once("flush",Y),this.flush()}close(){const q=()=>{this._onClose("forced close"),this.transport.close()},K=()=>{this.off("upgrade",K),this.off("upgradeError",K),q()},z=()=>{this.once("upgrade",K),this.once("upgradeError",K)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?z():q()})):this.upgrading?z():q()),this}_onError(q){if(Va.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",q),this._onClose("transport error",q)}_onClose(q,K){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),$a&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const q=Ha.indexOf(this._offlineEventListener);-1!==q&&Ha.splice(q,1)}this.readyState="closed",this.id=null,this.emitReserved("close",q,K),this.writeBuffer=[],this._prevBufferLen=0}}}Va.protocol=4;class Wa extends Va{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let q=0;q{z||(K.send([{type:"ping",data:"probe"}]),K.once("packet",(q=>{if(!z)if("pong"===q.type&&"probe"===q.data){if(this.upgrading=!0,this.emitReserved("upgrading",K),!K)return;Va.priorWebsocketSuccess="websocket"===K.name,this.transport.pause((()=>{z||"closed"!==this.readyState&&(et(),this.setTransport(K),K.send([{type:"upgrade"}]),this.emitReserved("upgrade",K),K=null,this.upgrading=!1,this.flush())}))}else{const q=new Error("probe error");q.transport=K.name,this.emitReserved("upgradeError",q)}})))};function Q(){z||(z=!0,et(),K.close(),K=null)}const X=q=>{const z=new Error("probe error: "+q);z.transport=K.name,Q(),this.emitReserved("upgradeError",z)};function Z(){X("transport closed")}function J(){X("socket closed")}function tt(q){K&&q.name!==K.name&&Q()}const et=()=>{K.removeListener("open",Y),K.removeListener("error",X),K.removeListener("close",Z),this.off("close",J),this.off("upgrading",tt)};K.once("open",Y),K.once("error",X),K.once("close",Z),this.once("close",J),this.once("upgrading",tt),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==q?this.setTimeoutFn((()=>{z||K.open()}),200):K.open()}onHandshake(q){this._upgrades=this._filterUpgrades(q.upgrades),super.onHandshake(q)}_filterUpgrades(q){const K=[];for(let z=0;zUa[q])).filter((q=>!!q))),super(q,z)}}const Ka="function"==typeof ArrayBuffer,za=Object.prototype.toString,Ya="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===za.call(Blob),Qa="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===za.call(File);function Xa(q){return Ka&&(q instanceof ArrayBuffer||(q=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(q):q.buffer instanceof ArrayBuffer)(q))||Ya&&q instanceof Blob||Qa&&q instanceof File}function Za(q,K){if(!q||"object"!=typeof q)return!1;if(Array.isArray(q)){for(let K=0,z=q.length;K=0&&q.num{delete this.acks[q];for(let K=0;K{this.io.clearTimeoutFn(Q),K.apply(this,q)};X.withError=!0,this.acks[q]=X}emitWithAck(q,...K){return new Promise(((z,Y)=>{const Q=(q,K)=>q?Y(q):z(K);Q.withError=!0,K.push(Q),this.emit(q,...K)}))}_addToQueue(q){let K;"function"==typeof q[q.length-1]&&(K=q.pop());const z={id:this._queueSeq++,tryCount:0,pending:!1,args:q,flags:Object.assign({fromQueue:!0},this.flags)};q.push(((q,...Y)=>{if(z!==this._queue[0])return;return null!==q?z.tryCount>this._opts.retries&&(this._queue.shift(),K&&K(q)):(this._queue.shift(),K&&K(null,...Y)),z.pending=!1,this._drainQueue()})),this._queue.push(z),this._drainQueue()}_drainQueue(q=!1){if(!this.connected||0===this._queue.length)return;const K=this._queue[0];K.pending&&!q||(K.pending=!0,K.tryCount++,this.flags=K.flags,this.emit.apply(this,K.args))}packet(q){q.nsp=this.nsp,this.io._packet(q)}onopen(){"function"==typeof this.auth?this.auth((q=>{this._sendConnectPacket(q)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(q){this.packet({type:ar.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},q):q})}onerror(q){this.connected||this.emitReserved("connect_error",q)}onclose(q,K){this.connected=!1,delete this.id,this.emitReserved("disconnect",q,K),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((q=>{if(!this.sendBuffer.some((K=>String(K.id)===q))){const K=this.acks[q];delete this.acks[q],K.withError&&K.call(this,new Error("socket has been disconnected"))}}))}onpacket(q){if(q.nsp===this.nsp)switch(q.type){case ar.CONNECT:q.data&&q.data.sid?this.onconnect(q.data.sid,q.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ar.EVENT:case ar.BINARY_EVENT:this.onevent(q);break;case ar.ACK:case ar.BINARY_ACK:this.onack(q);break;case ar.DISCONNECT:this.ondisconnect();break;case ar.CONNECT_ERROR:this.destroy();const K=new Error(q.data.message);K.data=q.data.data,this.emitReserved("connect_error",K)}}onevent(q){const K=q.data||[];null!=q.id&&K.push(this.ack(q.id)),this.connected?this.emitEvent(K):this.receiveBuffer.push(Object.freeze(K))}emitEvent(q){if(this._anyListeners&&this._anyListeners.length){const K=this._anyListeners.slice();for(const z of K)z.apply(this,q)}super.emit.apply(this,q),this._pid&&q.length&&"string"==typeof q[q.length-1]&&(this._lastOffset=q[q.length-1])}ack(q){const K=this;let z=!1;return function(...Y){z||(z=!0,K.packet({type:ar.ACK,id:q,data:Y}))}}onack(q){const K=this.acks[q.id];"function"==typeof K&&(delete this.acks[q.id],K.withError&&q.data.unshift(null),K.apply(this,q.data))}onconnect(q,K){this.id=q,this.recovered=K&&this._pid===K,this._pid=K,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((q=>this.emitEvent(q))),this.receiveBuffer=[],this.sendBuffer.forEach((q=>{this.notifyOutgoingListeners(q),this.packet(q)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((q=>q())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ar.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(q){return this.flags.compress=q,this}get volatile(){return this.flags.volatile=!0,this}timeout(q){return this.flags.timeout=q,this}onAny(q){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(q),this}prependAny(q){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(q),this}offAny(q){if(!this._anyListeners)return this;if(q){const K=this._anyListeners;for(let z=0;z0&&q.jitter<=1?q.jitter:0,this.attempts=0}fr.prototype.duration=function(){var q=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var K=Math.random(),z=Math.floor(K*this.jitter*q);q=0==(1&Math.floor(10*K))?q-z:q+z}return 0|Math.min(q,this.max)},fr.prototype.reset=function(){this.attempts=0},fr.prototype.setMin=function(q){this.ms=q},fr.prototype.setMax=function(q){this.max=q},fr.prototype.setJitter=function(q){this.jitter=q};class br extends va{constructor(q,K){var z;super(),this.nsps={},this.subs=[],q&&"object"==typeof q&&(K=q,q=void 0),(K=K||{}).path=K.path||"/socket.io",this.opts=K,wa(this,K),this.reconnection(!1!==K.reconnection),this.reconnectionAttempts(K.reconnectionAttempts||1/0),this.reconnectionDelay(K.reconnectionDelay||1e3),this.reconnectionDelayMax(K.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(z=K.randomizationFactor)&&void 0!==z?z:.5),this.backoff=new fr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==K.timeout?2e4:K.timeout),this._readyState="closed",this.uri=q;const Q=K.parser||Y;this.encoder=new Q.Encoder,this.decoder=new Q.Decoder,this._autoConnect=!1!==K.autoConnect,this._autoConnect&&this.open()}reconnection(q){return arguments.length?(this._reconnection=!!q,q||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(q){return void 0===q?this._reconnectionAttempts:(this._reconnectionAttempts=q,this)}reconnectionDelay(q){var K;return void 0===q?this._reconnectionDelay:(this._reconnectionDelay=q,null===(K=this.backoff)||void 0===K||K.setMin(q),this)}randomizationFactor(q){var K;return void 0===q?this._randomizationFactor:(this._randomizationFactor=q,null===(K=this.backoff)||void 0===K||K.setJitter(q),this)}reconnectionDelayMax(q){var K;return void 0===q?this._reconnectionDelayMax:(this._reconnectionDelayMax=q,null===(K=this.backoff)||void 0===K||K.setMax(q),this)}timeout(q){return arguments.length?(this._timeout=q,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(q){if(~this._readyState.indexOf("open"))return this;this.engine=new qa(this.uri,this.opts);const K=this.engine,z=this;this._readyState="opening",this.skipReconnect=!1;const Y=dr(K,"open",(function(){z.onopen(),q&&q()})),Q=K=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",K),q?q(K):this.maybeReconnectOnOpen()},X=dr(K,"error",Q);if(!1!==this._timeout){const q=this._timeout,z=this.setTimeoutFn((()=>{Y(),Q(new Error("timeout")),K.close()}),q);this.opts.autoUnref&&z.unref(),this.subs.push((()=>{this.clearTimeoutFn(z)}))}return this.subs.push(Y),this.subs.push(X),this}connect(q){return this.open(q)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const q=this.engine;this.subs.push(dr(q,"ping",this.onping.bind(this)),dr(q,"data",this.ondata.bind(this)),dr(q,"error",this.onerror.bind(this)),dr(q,"close",this.onclose.bind(this)),dr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(q){try{this.decoder.add(q)}catch(e){this.onclose("parse error",e)}}ondecoded(q){ga((()=>{this.emitReserved("packet",q)}),this.setTimeoutFn)}onerror(q){this.emitReserved("error",q)}socket(q,K){let z=this.nsps[q];return z?this._autoConnect&&!z.active&&z.connect():(z=new ur(this,q,K),this.nsps[q]=z),z}_destroy(q){const K=Object.keys(this.nsps);for(const z of K){if(this.nsps[z].active)return}this._close()}_packet(q){const K=this.encoder.encode(q);for(let z=0;zq())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(q,K){var z;this.cleanup(),null===(z=this.engine)||void 0===z||z.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",q,K),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const q=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const K=this.backoff.duration();this._reconnecting=!0;const z=this.setTimeoutFn((()=>{q.skipReconnect||(this.emitReserved("reconnect_attempt",q.backoff.attempts),q.skipReconnect||q.open((K=>{K?(q._reconnecting=!1,q.reconnect(),this.emitReserved("reconnect_error",K)):q.onreconnect()})))}),K);this.opts.autoUnref&&z.unref(),this.subs.push((()=>{this.clearTimeoutFn(z)}))}}onreconnect(){const q=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",q)}}const pr={};function vr(q,K){"object"==typeof q&&(K=q,q=void 0);const z=function(q,K="",z){let Y=q;z=z||"undefined"!=typeof location&&location,null==q&&(q=z.protocol+"//"+z.host),"string"==typeof q&&("/"===q.charAt(0)&&(q="/"===q.charAt(1)?z.protocol+q:z.host+q),/^(https?|wss?):\/\//.test(q)||(q=void 0!==z?z.protocol+"//"+q:"https://"+q),Y=ja(q)),Y.port||(/^(http|ws)$/.test(Y.protocol)?Y.port="80":/^(http|ws)s$/.test(Y.protocol)&&(Y.port="443")),Y.path=Y.path||"/";const Q=-1!==Y.host.indexOf(":")?"["+Y.host+"]":Y.host;return Y.id=Y.protocol+"://"+Q+":"+Y.port+K,Y.href=Y.protocol+"://"+Q+(z&&z.port===Y.port?"":":"+Y.port),Y}(q,(K=K||{}).path||"/socket.io"),Y=z.source,Q=z.id,X=z.path,Z=pr[Q]&&X in pr[Q].nsps;let J;return K.forceNew||K["force new connection"]||!1===K.multiplex||Z?J=new br(Y,K):(pr[Q]||(pr[Q]=new br(Y,K)),J=pr[Q]),z.query&&!K.query&&(K.query=z.queryKey),J.socket(z.path,K)}var gr,mr;Object.assign(vr,{Manager:br,Socket:ur,io:vr,connect:vr}),function(q){q.Disconnect="disconnect",q.Reconnecting="reconnecting",q.Reconnect="reconnect",q.Message="message",q.PlayerJoined="playerJoined",q.PlayerLeft="playerLeft",q.PlayerList="playerList",q.Connect="connect",q.ConnectFailed="connect_failed",q.Error="error",q.ConnectError="connect_error",q.ReconnectAttempt="reconnect_attempt",q.ReconnectError="reconnect_error",q.ReconnectFailed="reconnect_failed",q.AnalyticsInfo="INFO",q.AnalyticsError="ERROR",q.Matched="matched",q.WaitTimeExhausted="waitTimeExhausted"}(gr||(gr={}));let yr=mr=class{get id(){return this.socket?this.socket.id:null}connect(q,K=null,z={}){if(!ut.A.isDefined(this.socket)){let Y=q;null!==K&&(Y=`${Y}:${K}`),this.socket=vr(Y,(0,dt.merge)({forceNew:!0,transports:["websocket","xhr-polling","jsonp-polling","htmlfile"]},z))}}disconnect(){ut.A.isDefined(this.socket)&&(!this.socket.connected&&this.socket.disconnected||this.socket.disconnect(),this.socket=null)}addListener(q,K){if(ut.A.isDefined(this.socket))if(-1!==mr.IO_EVENTS.indexOf(q)){const z=q;this.socket.io.on(z,K)}else this.socket.on(q,K)}removeListener(q,K){if(ut.A.isDefined(this.socket))if(-1!==mr.IO_EVENTS.indexOf(q)){const z=q;this.socket.io.off(z,K)}else this.socket.off(q,K)}emitEvent(q,K){ut.A.isDefined(this.socket)&&this.socket.emit(q,K)}setQuery(q){ut.A.isDefined(this.socket)&&(this.socket.io.opts.query=q)}isConnected(){return ut.A.isDefined(this.socket)&&this.socket.connected}};var _r;yr.IO_EVENTS=[gr.Reconnect,gr.ReconnectAttempt,gr.ReconnectError,gr.ReconnectFailed],yr=mr=(0,X.Cg)([(0,Qe.injectable)()],yr),function(q){q.Get="GET",q.Post="POST",q.Put="PUT",q.Patch="PATCH",q.Delete="DELETE",q.Head="HEAD"}(_r||(_r={}));class Er{constructor(){this._httpStatusCode=0,this._headers=new Map,this._body=null,this._data=null,this._errorMessage=null}setHttpStatusCode(q){return this._httpStatusCode=q,this}getHttpStatusCode(){return this._httpStatusCode}setHeader(q,K,z=!0){const Y=q.toLowerCase();return!z&&this._headers.has(Y)?ht.V.log(`Could not set response header ${q} because it was already set`,ct.$.Warning):this._headers.set(Y,K),this}getHeader(q){const K=q.toLowerCase();return this._headers.has(K)?this._headers.get(K):null}setBody(q){return this._body=q,this}getBody(){return this._body}setErrorMessage(q){return this._errorMessage=q,this}getErrorMessage(){return this._errorMessage}wasSuccessful(){return this._httpStatusCode>=200&&this._httpStatusCode<=299&&null===this._errorMessage}setData(q){return this._data=q,this}getData(){return this._data}}let wr=class{constructor(){this._baseURI=null,this._defaultHeaders=new Map,this._defaultResponseHandler=new Map}setDefaultHeader(q,K,z=!0){!z&&this._defaultHeaders.has(q)?ht.V.log(`Could not set header ${q} as it already has a value`,ct.$.Warning):this._defaultHeaders.set(q,K)}getDefaultHeaders(){return this._defaultHeaders}setBaseURI(q){this._baseURI=q}getBaseURI(){return this._baseURI}setDefaultResponseHandler(q,K,z=null){const Y=`${q}`;this._defaultResponseHandler.has(Y)?ht.V.log(`Could not set default handler for ${Y} responses as one already exists`,ct.$.Warning):this._defaultResponseHandler.set(Y,{context:z,func:K})}clearDefaultResponseHandler(q){const K=`${q}`;this._defaultResponseHandler.has(K)&&this._defaultResponseHandler.delete(K)}sendRequest(q){return(0,X.sH)(this,void 0,void 0,(function*(){q.getRequestInterceptors().forEach((K=>{K.func.call(K.context,q)})),q.getBaseURI()||q.setBaseURI(this._baseURI);const K=q.getHeaders();return this._defaultHeaders.forEach(((z,Y)=>{K.has(Y)||q.setHeader(Y,z)})),new Promise((K=>{this.sendFetchRequest(q,this.getRequestInitData(q),K)}))}))}getRequestInitData(q){const K={method:q.getMethod(),headers:{}},z=q.getHeaders();z.size>0&&z.forEach(((q,z)=>{K.headers[z]=q}));q.shouldIncludeCredentials()&&(K.credentials="include");const Y=q.getBody();return Y&&(q.getMethod()!==_r.Get&&q.getMethod()!==_r.Head?(K.headers["Content-Type"]=Y.getContentType(),K.body=Y.getData()):ht.V.log(`Cannot send a body for ${q.getMethod()} ${q.getFullURI()}`,ct.$.Warning)),K}sendFetchRequest(q,K,z){return(0,X.sH)(this,arguments,void 0,(function*(q,K,z,Y=1){let Q=!1;const X=window.setTimeout((()=>{Q=!0,this.retryRequest(q,K,z,Y)||z((new Er).setHttpStatusCode(408).setErrorMessage("The request has timed out."))}),q.getTimeout());let Z=null;try{Z=yield fetch(q.getFullURI(),K)}catch(e){this.retryRequest(q,K,z,Y)||z((new Er).setHttpStatusCode(0).setErrorMessage(`Request could not be sent - ${e.message}`))}if(window.clearTimeout(X),Z&&!Q){const K=new Er;if(K.setHttpStatusCode(Z.status),Z.headers.forEach(((q,z)=>{K.setHeader(z,q,!0)})),K.setBody(yield Z.arrayBuffer()),q.getResponseInterceptors().forEach((q=>{q.func.call(q.context,K)})),q.shouldUseDefaultResponseHandlers()&&this._defaultResponseHandler.size>0){let q=K.getHttpStatusCode().toString();for(let z=q.length-1;z>=0;--z){if(this._defaultResponseHandler.has(q)){const z=this._defaultResponseHandler.get(q);z.func.call(z.context,K);break}q=`${q.substr(0,z)}*${q.substr(z+1)}`}}z(K)}}))}retryRequest(q,K,z,Y){const Q=()=>{this.sendFetchRequest(q,K,z,Y+1)};return Y<=q.getRetryCount()&&(q.retryDelayMS>0||q.retryIncrementMS>0?(window.setTimeout(Q,q.retryDelayMS),q.retryDelayMS=Math.min(q.retryDelayMS+q.retryIncrementMS,q.retryMaxDelayMS)):Q(),!0)}};wr=(0,X.Cg)([(0,Qe.injectable)()],wr);class Tr{constructor(){}static convertToJson(q){const K=new Uint8Array(q.getBody());if(K.length>0){const z=ut.A.bufferToUtf8String(K);try{q.setData(JSON.parse(z))}catch(e){ht.V.log(`Malformed JSON in response: ${z}`,ct.$.Error),q.setErrorMessage("No JSON body due to malformed payload")}}}}class Sr{constructor(q=null){this._jsonObject=null,this.setJson(q)}setJson(q){this._jsonObject=q}getJson(){return this._jsonObject}getData(){return this._jsonObject?JSON.stringify(this._jsonObject):null}getContentType(){return"application/json"}}class Ar{constructor(){this._baseURI=null,this._requestURI=null,this._method=_r.Get,this._headers=new Map,this._queryParameters=new Map,this._shouldUseDefaultResponseHandlers=!0,this._requestInterceptors=[],this._responseInterceptors=[],this._body=null,this._retryCount=0,this._includeCredentials=!1,this._retryDelayMS=1e3,this._retryIncrementMS=2e3,this._retryMaxDelayMS=15e3,this._timeout=1e4}get retryDelayMS(){return this._retryDelayMS}set retryDelayMS(q){this._retryDelayMS=q}get retryIncrementMS(){return this._retryIncrementMS}set retryIncrementMS(q){this._retryIncrementMS=q}get retryMaxDelayMS(){return this._retryMaxDelayMS}set retryMaxDelayMS(q){this._retryMaxDelayMS=q}setHeader(q,K,z=!0){return!z&&this._headers.has(q)?ht.V.log(`Could not set header ${q} because an existing value for it already exists.`,ct.$.Warning):this._headers.set(q,K),this}getHeaders(){return this._headers}setUseDefaultResponseHandlers(q){return this._shouldUseDefaultResponseHandlers=q,this}shouldUseDefaultResponseHandlers(){return this._shouldUseDefaultResponseHandlers}setBaseURI(q){return this._baseURI=q,this}getBaseURI(){return this._baseURI}setRequestURI(q){return this._requestURI=q,this}getRequestURI(){return this._requestURI}setQueryParameter(q,K,z=!0){return!z&&this._queryParameters.has(q)?ht.V.log(`Could not set query parameter '${q}' as it already has a value`,ct.$.Warning):this._queryParameters.set(q,K),this}getQueryParameters(){return this._queryParameters}getFullURI(){let q=null;if(ut.A.isDefined(this._requestURI)?q=ut.A.isDefined(this._baseURI)?`${this._baseURI}/${this._requestURI}`:this._requestURI:ut.A.isDefined(this._baseURI)&&(q=this._baseURI),null!==q&&this._queryParameters.size>0){let K="";this._queryParameters.forEach(((q,z)=>{K+=`${encodeURIComponent(z)}=${encodeURIComponent(q)}&`})),q=`${q}?${K.substr(0,K.length-1)}`}return q}setMethod(q){return this._method=q,this}getMethod(){return this._method}addRequestInterceptor(q,K=null){return this._requestInterceptors.push({context:K,func:q}),this}removeRequestInterceptor(q,K=null){const z=this._requestInterceptors.findIndex((z=>z.func===q&&z.context===K));return z>-1&&this._requestInterceptors.splice(z,1),this}getRequestInterceptors(){return this._requestInterceptors}addResponseInterceptor(q,K=null){return this._responseInterceptors.push({func:q,context:K}),this}removeResponseInterceptor(q,K=null){const z=this._responseInterceptors.findIndex((z=>z.func===q&&z.context===K));return z>-1&&this._responseInterceptors.splice(z,1),this}getResponseInterceptors(){return this._responseInterceptors}setRetryCount(q){return this._retryCount=q,this}getRetryCount(){return this._retryCount}setTimeout(q){return this._timeout=q,this}getTimeout(){return this._timeout}setIncludeCredentials(q){return this._includeCredentials=q,this}shouldIncludeCredentials(){return this._includeCredentials}setBody(q){return this._body=q,this}getBody(){return this._body}}var Cr;!function(q){q[q.Stepped=0]="Stepped",q[q.Random=1]="Random",q[q.PhasePerSample=2]="PhasePerSample",q[q.Fixed=3]="Fixed"}(Cr||(Cr={}));class Or{set type(q){q!==this._type&&(this._type=q,this._getValueFunction=Or.GET_VALUE_FUNCTIONS[q])}get type(){return this._type}constructor(q=Cr.Random){this.min=0,this.max=1,this.step=.5,this.offset=0,this.onSetMinMax=new $t.H,this._value=0,this._getValueFunction=this.getValueRandom,this._type=Cr.Fixed,this._value=this.offset,this.type=q}setMinMax(q=0,K=1){this.min=q,this.max=K,this.onSetMinMax.dispatch()}getValue(){return this._getValueFunction()}getValueStepped(){return this._value+=this.step,this._value%=this.max-this.min,this._value+this.min}getValueRandom(){return Math.random()*(this.max-this.min)+this.min}getValuePhasePerSample(){return this._value+=this.step,this._value%=1,wt.c.linear(this.min,this.max,this._value)}getValueFixed(){return this.min}destroy(){this.onSetMinMax.dispose(),this.onSetMinMax=null}}Or.GET_VALUE_FUNCTIONS={[Cr.Stepped]:Or.prototype.getValueStepped,[Cr.Random]:Or.prototype.getValueRandom,[Cr.PhasePerSample]:Or.prototype.getValuePhasePerSample,[Cr.Fixed]:Or.prototype.getValueFixed};class Ir{get life(){return this._life}set life(q){this._life=q,this._lifePercentage=this.life/this.startingLife}get lifePercentage(){return this._lifePercentage}constructor(){this._life=1,this.startingLife=1,this.color=Bt.y.WHITE,this.alpha=1,this.startingAlpha=1,this.velocity=new At.I(0,0),this.position=new At.I(0,0),this.initialWorldPosition=new At.I(0,0),this.rotationalVelocity=0,this.rotation=0,this.scale=new At.I(1,1),this.startingScale=new At.I(1,1),this.reset()}reset(){this.life=1,this.color=Bt.y.WHITE,this.alpha=1,this.velocity.set(0,0),this.position.set(0,0),this.rotation=0,this.rotationalVelocity=0,this.scale.set(1,1)}}class Dr{get next(){return this._next}set next(q){this._next&&(this._next._prev=null),this._next=q,q&&(q._prev=this)}get prev(){return this._prev}set prev(q){this._prev&&(this._prev._next=null),this._prev=q,q&&(q._next=this)}constructor(q){this.object=q}}class Rr{addObjectToList(q){this.addToList(new Dr(q))}addToList(q){q.next=this.head,q.prev=null,this.head=q}removeFirst(){if(!this.head)return null;const q=this.head;return this.head=q.next,q.next=null,q}removeFromList(q){return this.removeObjectFromList(q.object)}removeObjectFromList(q){if(!this.head)return null;let K=this.head;if(K.object===q)return this.head=this.head.next,K.next=K.prev=null,K;let z=this.head.next;for(;z;){if(z.object===q){const q=z.next;return z.next=z.prev=null,K.next=q,z}K=z,z=K.next}return null}getLength(){let q=0,K=this.head;for(;K;)q++,K=K.next;return q}forEach(q){let K=this.head;for(;K;)q(K.object),K=K.next}generateArray(){const q=[];let K=this.head;for(;K;)q.push(K.object),K=K.next;return q}}class Pr{get autoRecycleOnDisable(){return this._autoRecycleOnDisable}set autoRecycleOnDisable(q){q!==this._autoRecycleOnDisable&&(q?(this.aliveList.forEach(this.addActiveChangeListener.bind(this)),this.deadList.forEach(this.addActiveChangeListener.bind(this))):(this.aliveList.forEach((q=>{q.onActiveChanged.removeAll(this)})),this.deadList.forEach((q=>{q.onActiveChanged.removeAll(this)}))),this._autoRecycleOnDisable=q)}constructor(q,K=null,z=null){this._autoRecycleOnDisable=!0,this.create=q,this.reset=K,this.die=z,this.deadList=new Rr,this.aliveList=new Rr}allocate(q){for(let K=0;K{q.active||this.recycleObject(q)}),this)}createNewObject(){const q=this.create();return this._autoRecycleOnDisable&&this.addActiveChangeListener(q),q.onDestroy.add((()=>{this.removeObject(q)}),this),this.aliveList.addObjectToList(q),q}recycleObject(q){const K=this.aliveList.removeObjectFromList(q);K?(this.deadList.addToList(K),this.die&&this.die(q)):this.log("recycleObject - Not recycling, object not found in alive stack!")}removeListeners(q){q.onActiveChanged.removeAll(this),q.onDestroy.removeAll(this)}removeObject(q){let K=this.deadList.removeObjectFromList(q);K||(K=this.aliveList.removeObjectFromList(q),K)?this.removeListeners(q):this.log("removeObject - Not removing, object not found in dead or alive stack!")}flush(q=!1){const K=[];for(;this.deadList.head;){const q=this.deadList.head.object;K.push(q),this.deadList.removeFirst(),this.removeListeners(q)}if(q)for(let z=0;zsuper.create}});return(0,X.sH)(this,void 0,void 0,(function*(){yield K.create.call(this,q),this.imageGuid&&(yield tt.W.instance.loader.loadAssets([this.imageGuid]).catch(zt.R.createHandler(`Failed to load image for ParticleInitializeImage - ${this.imageGuid}`)))}))}initialize(q){if(q.atlas=this.imageGuid,q.frame=this.frame,!q.renderComponent){const K=q.gameObject.addComponent(Oe);K.smooth=!0,K.setAnchor(.5,.5),q.renderComponent=K}q.renderComponent.updateAsset(this.imageGuid,this.frame)}}class jr extends Fr{constructor(){super(...arguments),this.life=new Or}initialize(q){q.life=this.life.getValue()}}class $r extends Fr{constructor(){super(...arguments),this.point1=new At.I,this.point2=new At.I,this.lineLocation=new Or}initialize(q){const K=this.lineLocation.getValue();q.position.add(new At.I(wt.c.linear(this.point1.x,this.point2.x,K),wt.c.linear(this.point1.y,this.point2.y,K)))}}class Hr extends Fr{constructor(){super(...arguments),this.xLocation=new Or,this.yLocation=new Or}initialize(q){q.position.add(new At.I(this.xLocation.getValue(),this.yLocation.getValue()))}}class Vr extends Fr{constructor(){super(...arguments),this.rotation=new Or}initialize(q){q.rotation+=this.rotation.getValue()}}class Wr extends Fr{constructor(){super(...arguments),this.speed=new Or}initialize(q){q.rotationalVelocity+=this.speed.getValue()}}class qr extends Fr{constructor(){super(...arguments),this.scale=new Or}initialize(q){const K=this.scale.getValue();q.scale.set(q.scale.x*K,q.scale.y*K)}}var Kr,zr,Yr,Qr=z(10673);!function(q){q.RGB="rgb",q.HSV="hsv",q.LCH="lch"}(Kr||(Kr={}));class Xr extends Fr{constructor(){super(...arguments),this.angle=new Or,this.speed=new Or,this.followWorldTransform=!1}initialize(q){var K,z,Y;const Q=this.angle.getValue()*wt.c.DEG_TO_RAD,X=this.speed.getValue(),Z=new At.I(Math.sin(Q)*X,Math.cos(Q)*X);if(this.followWorldTransform){const Q=null!==(Y=null===(z=null===(K=q.gameObject.parent)||void 0===K?void 0:K.parent)||void 0===z?void 0:z.transform.worldScale)&&void 0!==Y?Y:new At.I(1,1);q.velocity.add(new At.I(Z.x*Q.x,Z.y*Q.y))}else q.velocity.add(Z)}}class Zr extends Fr{constructor(){super(...arguments),this.x=new Or,this.y=new Or,this.followWorldTransform=!1}initialize(q){var K,z,Y;const Q=this.x.getValue(),X=this.y.getValue();if(this.followWorldTransform){const Z=null!==(Y=null===(z=null===(K=q.gameObject.parent)||void 0===K?void 0:K.parent)||void 0===z?void 0:z.transform.worldScale)&&void 0!==Y?Y:new At.I(1,1);q.velocity.add(new At.I(Q*Z.x,X*Z.y))}else q.velocity.add(new At.I(Q,X))}}!function(q){q.PositionRect="PositionRect",q.PositionLine="PositionLine",q.Image="Image",q.ImageList="ImageList",q.Alpha="Alpha",q.Life="Life",q.Rotation="Rotation",q.Scale="Scale",q.Velocity="Velocity",q.VelocityXY="VelocityXY",q.RotateWithVelocity="RotateWithVelocity",q.RotationalVelocity="RotationalVelocity",q.Spine="Spine",q.SpineRandomAnimation="SpineRandomAnimation",q.Tint="Tint"}(zr||(zr={})),function(q){q.Alpha="Alpha",q.AlphaMax="AlphaMax",q.Dampen="Dampen",q.Flipbook="Flipbook",q.LifeFromPosition="LifeFromPosition",q.RotateWithVelocity="RotateWithVelocity",q.Immortal="Immortal",q.Scale="Scale",q.Attract="Attract",q.Jitter="Jitter"}(Yr||(Yr={}));class Jr{static getInitializer(q){const K=Jr.InitializerConstructors.get(q)();return K.__type=q,K}static getBehaviour(q){const K=Jr.BehaviourConstructors.get(q)();return K.__type=q,K}static createInitializer(q,K){const z=new q;return z.__type=K,z}static createBehaviour(q,K){const z=new q;return z.__type=K,z}static getBehaviourNames(){return Array.from(Jr.BehaviourConstructors.keys())}static getInitializerNames(){return Array.from(Jr.InitializerConstructors.keys())}}Jr.InitializerConstructors=new Map([[zr.Image,Jr.createInitializer.bind(Jr,Gr,zr.Image)],[zr.ImageList,Jr.createInitializer.bind(Jr,class extends Fr{constructor(){super(...arguments),this.imageGuids=["c108638e-c0db-414f-859f-bc33c6a4dbca"],this.randomize=!0,this._currentImageIndex=-1}create(q){const K=Object.create(null,{create:{get:()=>super.create}});return(0,X.sH)(this,void 0,void 0,(function*(){yield K.create.call(this,q),this.imageGuids&&(yield tt.W.instance.loader.loadAssets(this.imageGuids).catch(zt.R.createHandler(`Failed to load image for ParticleInitializeImage - ${this.imageGuids.join(", ")}`)))}))}initialize(q){if(this.randomize?this._currentImageIndex=Math.floor(Math.random()*this.imageGuids.length):this._currentImageIndex=(this._currentImageIndex+1)%this.imageGuids.length,q.atlas=this.imageGuids[this._currentImageIndex],!q.renderComponent){const K=q.gameObject.addComponent(Oe);K.smooth=!0,K.setAnchor(.5,.5),q.renderComponent=K}q.renderComponent.updateAsset(q.atlas)}},zr.ImageList)],[zr.Rotation,Jr.createInitializer.bind(Jr,Vr,zr.Rotation)],[zr.Scale,Jr.createInitializer.bind(Jr,qr,zr.Scale)],[zr.Life,Jr.createInitializer.bind(Jr,jr,zr.Life)],[zr.Alpha,Jr.createInitializer.bind(Jr,class extends Fr{constructor(){super(...arguments),this.alpha=new Or}initialize(q){q.alpha=this.alpha.getValue()}},zr.Alpha)],[zr.Tint,Jr.createInitializer.bind(Jr,class extends Fr{constructor(){super(...arguments),this.colorA="#ffaaff",this.colorB="#ff00ff",this.mode=Kr.RGB,this.mix=new Or}initialize(q){if(q.renderComponent){const K=Gt.stringToRgb(this.colorA),z=Gt.stringToRgb(this.colorB),Y=this.mix.getValue();let Q;switch(this.mode){case Kr.HSV:Q=Gt.hsvInterpolate(K,z,Y);break;case Kr.LCH:Q=Gt.lchInterpolate(K,z,Y);break;case Kr.RGB:default:Q=Gt.rgbInterpolate(K,z,Y)}q.renderComponent.tint=_t.Color.shared.setValue([Q.r,Q.g,Q.b]).toNumber()}}},zr.Tint)],[zr.Velocity,Jr.createInitializer.bind(Jr,Xr,zr.Velocity)],[zr.VelocityXY,Jr.createInitializer.bind(Jr,Zr,zr.VelocityXY)],[zr.RotateWithVelocity,Jr.createInitializer.bind(Jr,class extends Fr{initialize(q){const K=Math.atan2(q.velocity.y,q.velocity.x);q.rotation=K*wt.c.RAD_TO_DEG}},zr.RotateWithVelocity)],[zr.RotationalVelocity,Jr.createInitializer.bind(Jr,Wr,zr.RotationalVelocity)],[zr.PositionRect,Jr.createInitializer.bind(Jr,Hr,zr.PositionRect)],[zr.PositionLine,Jr.createInitializer.bind(Jr,$r,zr.PositionLine)],[zr.Spine,Jr.createInitializer.bind(Jr,class extends Fr{constructor(){super(...arguments),this.asset="",this.animationName="",this.loopAnimation=!0}initialize(q){var K,z;if(!(null===(K=this.asset)||void 0===K?void 0:K.length))return;let Y;q.renderComponent?Y=q.renderComponent:(Y=q.gameObject.addComponent(Qr.v),q.renderComponent=Y),Y.setAsset(this.asset),(null===(z=this.animationName)||void 0===z?void 0:z.length)&&Y.setAnimationByName(0,this.animationName,this.loopAnimation)}},zr.Spine)],[zr.SpineRandomAnimation,Jr.createInitializer.bind(Jr,class extends Fr{constructor(){super(...arguments),this.loopAnimation=!0}initialize(q){const K=q.renderComponent;if(!K)return void ht.V.log("No Spine Found On Particle!!",ct.$.Error);const z=K.getSpine().skeleton.data.animations,Y=Math.floor(Math.random()*z.length);K.setAnimationByName(0,z[Y].name,this.loopAnimation)}},zr.SpineRandomAnimation)]]),Jr.BehaviourConstructors=new Map([[Yr.Alpha,Jr.createBehaviour.bind(Jr,xr,Yr.Alpha)],[Yr.AlphaMax,Jr.createBehaviour.bind(Jr,Lr,Yr.AlphaMax)],[Yr.Scale,Jr.createBehaviour.bind(Jr,Ur,Yr.Scale)],[Yr.Dampen,Jr.createBehaviour.bind(Jr,class extends Nr{constructor(){super(...arguments),this.xDampen=.9,this.yDampen=.9,this.rotationalDampen=.9}update(q,K,z){q.rotationalVelocity*=Math.pow(this.rotationalDampen,z),q.velocity.x*=Math.pow(this.xDampen,z),q.velocity.y*=Math.pow(this.yDampen,z)}},Yr.Dampen)],[Yr.Flipbook,Jr.createBehaviour.bind(Jr,kr,Yr.Flipbook)],[Yr.LifeFromPosition,Jr.createBehaviour.bind(Jr,Br,Yr.LifeFromPosition)],[Yr.Immortal,Jr.createBehaviour.bind(Jr,class extends Nr{constructor(){super(...arguments),this.minimumLife=1}update(q,K){q.life=Math.max(this.minimumLife,q.life)}},Yr.Immortal)],[Yr.Attract,Jr.createBehaviour.bind(Jr,class extends Nr{constructor(){super(...arguments),this.targetName="target",this.strength=.1,this.maxVelocity=20,this.velocityLerp=.1}create(q){var K;this._target=null===(K=q.GameObject.findChildByName(this.targetName))||void 0===K?void 0:K.findComponent(kt.d)}update(q,K,z){if(!this._target)return;const Y=this._target.localPosition,Q=this._target.worldScale;Y.x*=Q.x,Y.y*=Q.y;const X=new At.I((Y.x-q.position.x)*this.strength,(Y.y-q.position.y)*this.strength);X.getMagnitude()>this.maxVelocity&&(X.normalize(),X.multiply({x:this.maxVelocity,y:this.maxVelocity})),X.multiply({x:z,y:z});const Z=this.velocityLerp*z;X.x=wt.c.linear(q.velocity.x,X.x,Z),X.y=wt.c.linear(q.velocity.y,X.y,Z),q.velocity=X}},Yr.Attract)],[Yr.Jitter,Jr.createBehaviour.bind(Jr,class extends Nr{constructor(){super(...arguments),this.strength=5}update(q,K){q.position.x+=wt.c.random(-this.strength,this.strength),q.position.y+=wt.c.random(-this.strength,this.strength)}},Yr.Jitter)],[Yr.RotateWithVelocity,Jr.createBehaviour.bind(Jr,class extends Nr{constructor(){super(...arguments),this.additionalRotation=0,this.smoothing=0}update(q,K,z){const Y=Math.atan2(q.velocity.y,q.velocity.x)*wt.c.RAD_TO_DEG+this.additionalRotation;q.rotation=wt.c.linear(Y,q.rotation,this.smoothing*z)}},Yr.RotateWithVelocity)]]);class to extends Ot.${constructor(){super(...arguments),this.autoUpdateCache=!0,this.iteratedNumberKeys=["min","max","step","offset"],this.vectorKeys=["_x","_y"]}generate(q,K){this._initializerOptions||(this._initializerOptions=Jr.getInitializerNames()),this._behaviorOptions||(this._behaviorOptions=Jr.getBehaviourNames());const z=this.getSystem();if(!z)return Dt.X.createVertical([me.b.create({id:"no-particle-system",message:"No Particle System found, try refreshing"}),Pt.X.create({id:"refresh-button",buttonText:"Refresh",onClick:()=>{this._editorAPI.redrawCustomInspector()}})]);const Y=[];return Y.push(Pt.X.create({id:"reset-all-button",buttonText:"Reset All",onClick:()=>{let q=this.getSystem().GameObject;for(;q.parent;)q=q.parent;const K=q.findComponentsInChildren(eo);for(const z of K)z.reset()}})),Y.push(Pt.X.create({id:"reset-button",buttonText:"Reset",onClick:()=>{this.getSystem().reset()}})),Y.push(Pt.X.create({id:"emit-button",buttonText:"Emit 1",onClick:()=>{this.getSystem().emit()}})),this.autoUpdateCache||Y.push(Pt.X.create({id:"write-cache",buttonText:"Write Cache",onClick:()=>{this.updateCache(!0)}})),Y.push(Ut.G.checkboxGroup({id:"autoUpdateCache",labelValue:"Auto Update Cache",inputValue:this.autoUpdateCache,onChange:(q,K)=>{this.autoUpdateCache=K,this._editorAPI.redrawCustomInspector()}})),Y.push(Ut.G.checkboxGroup({id:"world-space",labelValue:"World Space",inputValue:z.worldSpace,onChange:(q,K)=>{this.getSystem().worldSpace=K,this.updateCache()}})),Y.push(Ut.G.checkboxGroup({id:"spawn-in-back",labelValue:"Spawn In Back",inputValue:z.spawnInBack,onChange:(q,K)=>{this.getSystem().spawnInBack=K,this.updateCache()}})),Y.push(Ut.G.checkboxGroup({id:"paused-system",labelValue:"Paused",inputValue:z.paused,onChange:(q,K)=>{this.getSystem().paused=K,this.updateCache()}})),Y.push(Ut.G.checkboxGroup({id:"pause-emission",labelValue:"Pause Emission",inputValue:z.pauseEmission,onChange:(q,K)=>{this.getSystem().pauseEmission=K,this.updateCache()}})),Y.push(Ut.G.numberGroup({id:"max-particles",labelValue:"Max Particles",inputValue:z.maxParticles,onChange:(q,K)=>{this.getSystem().maxParticles=K,this.updateCache()}})),Y.push(Ut.G.numberGroup({id:"total-particles",labelValue:"Total Particles",inputValue:z.totalParticles,onChange:(q,K)=>{this.getSystem().totalParticles=K,this.updateCache()}})),Y.push(this.getTopLevelIteratedNumberInspector(z.emitPerSecond,"emitPerSecond")),Y.push(Ut.G.numberGroup({id:"prewarm",labelValue:"Prewarm (Seconds)",inputValue:z.prewarm,inputUpdateMode:Nt.JG.Confirm,onChange:(q,K)=>{this.getSystem().prewarm=K,this.updateCache()}})),Y.push(ke._.line()),Y.push(this.createInitializersEditor(z.initializers)),Y.push(Ut.G.dropdownGroup({labelValue:"Add Initializer",id:"add-end-initializers",selectValue:0,selectOptions:this._initializerOptions,onChange:q=>{this.getSystem().initializers.push(Jr.InitializerConstructors.get(q)()),this.updateCache()}})),Y.push(ke._.line()),Y.push(this.createBehavioursEditor(z.behaviours)),Y.push(Ut.G.dropdownGroup({labelValue:"Add Behaviour",id:"add-end-behaviours",selectValue:0,selectOptions:this._behaviorOptions,onChange:q=>{this.getSystem().behaviours.push(Jr.BehaviourConstructors.get(q)()),this.updateCache()}})),Dt.X.createVertical(Y)}getSystem(){return this._editorAPI.getComponent(this._componentGuid)}updateCache(q=!1){if(!this.autoUpdateCache&&!q)return void this._editorAPI.redrawCustomInspector();const K=this.getSystem();K.create();const z=K.initializers.map(this.serializeStep.bind(this)),Y=K.behaviours.map(this.serializeStep.bind(this));this._editorAPI.modifyComponent(this._componentGuid,{initializers:z,behaviours:Y,emitPerSecond:{type:K.emitPerSecond.type,min:K.emitPerSecond.min,max:K.emitPerSecond.max,step:K.emitPerSecond.step,offset:K.emitPerSecond.offset},spawnInBack:K.spawnInBack,maxParticles:K.maxParticles,worldSpace:K.worldSpace,totalParticles:K.totalParticles,pauseEmission:K.pauseEmission,paused:K.paused})}serializeStep(q){const K=Object.keys(q),z={};for(const Y of K)if(!Y.startsWith("_"))if("object"==typeof q[Y]){const K=Object.keys(q[Y]);this.iteratedNumberKeys.every((q=>K.includes(q)))?z[Y]={type:q[Y].type,min:q[Y].min,max:q[Y].max,step:q[Y].step,offset:q[Y].offset}:this.vectorKeys.every((q=>K.includes(q)))?z[Y]={x:q[Y].x,y:q[Y].y}:Array.isArray(q[Y])&&(z[Y]=q[Y])}else z[Y]=q[Y];return z.__type=q.__type,z}createInitializersEditor(q){const K=[];for(let z=0;z{const z=this.getSystem(),Y=z[K][q-1];z[K][q-1]=z[K][q],z[K][q]=Y,this.updateCache()}})),z.push(Pt.X.create({id:`move-down-${K}-${q}`,buttonText:"⬇️",buttonDisabled:q===this.getSystem()[K].length-1,onClick:()=>{const z=this.getSystem(),Y=z[K][q+1];z[K][q+1]=z[K][q],z[K][q]=Y,this.updateCache()}})),z.push(Mr._.create({id:`add-${K}-${q}`,selectValue:0,selectOptions:"behaviours"===K?this._behaviorOptions:this._initializerOptions,onChange:z=>{const Y=this.getSystem();"behaviours"===K?Y.behaviours.splice(q,0,Jr.BehaviourConstructors.get(z)()):Y.initializers.splice(q,0,Jr.InitializerConstructors.get(z)()),this.updateCache()}})),z.push(ye.l.create({id:`break-${q}`,labelValue:" "})),z.push(Pt.X.create({id:`delete-${K}-${q}`,buttonText:"❌",onClick:()=>{this.getSystem()[K].splice(q,1),this.updateCache()}})),Dt.X.createHorizontal(z)}getParticleStepInspector(q,K,z){const Y=[this.getParticleStepHeader(K,z)];return Object.keys(q).filter((q=>!q.startsWith("_"))).forEach((Q=>{const X=(q,Y)=>{this.getSystem()[z][K][Q]=Y,this.updateCache()},Z={id:Q+Math.random(),labelValue:Q,inputUpdateMode:Nt.JG.Confirm};if("object"==typeof q[Q]){const X=Object.keys(q[Q]);if(this.iteratedNumberKeys.every((q=>X.includes(q))))Y.push(this.getIteratedNumberInspector(q,Q,K,z));else if(this.vectorKeys.every((q=>X.includes(q))))Y.push(Dt.X.createVertical([ye.l.create(Z),Ut.G.numberGroup(Object.assign(Object.assign({},Z),{id:`x-${Z.id}`,labelValue:"x",inputValue:q[Q]._x,onChange:(Y,X)=>{q[Q]._x=X;this.getSystem()[z][K]=q,this.updateCache()}})),Ut.G.numberGroup(Object.assign(Object.assign({},Z),{id:`y-${Z.id}`,labelValue:"y",inputValue:q[Q]._y,onChange:(Y,X)=>{q[Q]._y=X;this.getSystem()[z][K]=q,this.updateCache()}}))]));else if("imageGuids"===Q)for(let J=0;J<8;J++){const X=q[Q][J];Y.push(Ut.G.imagePickerGroup(Object.assign(Object.assign({},Z),{id:`image-guid-${Z.id}-${J}`,labelValue:`Image ${J}`,guid:X,onChange:Y=>{q[Q][J]=Y.length?Y:void 0;this.getSystem()[z][K]=q,this.updateCache()}})))}else Y.push(ye.l.create({id:Math.random().toString(),labelValue:`Unknown object ${Q} - ${JSON.stringify(q[Q])}. Please update ParticleSystemInspector`}))}else if("imageGuid"===Q)Y.push(Ut.G.imagePickerGroup(Object.assign(Object.assign({},Z),{id:`image-guid-${Z.id}`,labelValue:"Image",guid:q[Q],onChange:Y=>{q[Q]=Y;this.getSystem()[z][K]=q,this.updateCache()}})));else switch(Z.inputValue=q[Q],Z.onChange=X,typeof q[Q]){case"string":Y.push(Ut.G.textGroup(Z));break;case"boolean":Y.push(Ut.G.checkboxGroup(Z));break;case"number":Y.push(Ut.G.numberGroup(Z));break;case"function":break;default:Y.push(ye.l.create({id:Math.random().toString(),labelValue:`Unknown parameter ${Q} - ${typeof q[Q]}. Please update ParticleSystemInspector`}))}})),Dt.X.createVertical(Y,{isCollapsible:!0,title:q.__type})}getIteratedNumberInspector(q,K,z,Y){const Q={id:K+Math.random(),labelValue:K,inputUpdateMode:Nt.JG.Confirm},X={title:`${K} - Iterated Number`,isContainer:!0},Z=Ut.G.enumGroup(Object.assign(Object.assign({},Q),{id:`type-${Q.id}`,labelValue:"type",selectValue:q[K].type,onChange:Q=>{q[K].type=Q;this.getSystem()[Y][z]=q,this.updateCache()}}),Cr),J=Ut.G.numberGroup(Object.assign(Object.assign({},Q),{id:`min-${Q.id}`,labelValue:q[K].type===Cr.Fixed?"value":"min",inputValue:q[K].min,onChange:(Q,X)=>{q[K].min=X;this.getSystem()[Y][z]=q,this.updateCache()}}));if(q[K].type===Cr.Fixed)return Dt.X.createVertical([Z,J],X);const tt=Ut.G.numberGroup(Object.assign(Object.assign({},Q),{id:`max-${Q.id}`,labelValue:"max",inputValue:q[K].max,onChange:(Q,X)=>{q[K].max=X;this.getSystem()[Y][z]=q,this.updateCache()}}));return q[K].type===Cr.Random?Dt.X.createVertical([Z,J,tt],X):Dt.X.createVertical([Z,J,tt,Ut.G.numberGroup(Object.assign(Object.assign({},Q),{id:`step-${Q.id}`,labelValue:"step",inputValue:q[K].step,onChange:(Q,X)=>{q[K].step=X;this.getSystem()[Y][z]=q,this.updateCache()}})),Ut.G.numberGroup(Object.assign(Object.assign({},Q),{id:`offset-${Q.id}`,labelValue:"offset",inputValue:q[K].offset,onChange:(Q,X)=>{q[K].offset=X;this.getSystem()[Y][z]=q,this.updateCache()}}))],X)}getTopLevelIteratedNumberInspector(q,K){const z={id:K+Math.random(),labelValue:K,inputUpdateMode:Nt.JG.Confirm},Y={title:`${K} - Iterated Number`,isContainer:!0},Q=Ut.G.enumGroup(Object.assign(Object.assign({},z),{id:`type-${z.id}`,labelValue:"type",selectValue:q.type,onChange:z=>{q.type=z.valueOf();this.getSystem()[K]=q,this.updateCache()}}),Cr),X=Ut.G.numberGroup(Object.assign(Object.assign({},z),{id:`min-${z.id}`,labelValue:q.type===Cr.Fixed?"value":"min",inputValue:q.min,onChange:(z,Y)=>{q.min=Y;this.getSystem()[K]=q,this.updateCache()}}));if(q.type===Cr.Fixed)return Dt.X.createVertical([Q,X],Y);const Z=Ut.G.numberGroup(Object.assign(Object.assign({},z),{id:`max-${z.id}`,labelValue:"max",inputValue:q.max,onChange:(z,Y)=>{q.max=Y;this.getSystem()[K]=q,this.updateCache()}}));return q.type===Cr.Random?Dt.X.createVertical([Q,X,Z],Y):Dt.X.createVertical([Q,X,Z,Ut.G.numberGroup(Object.assign(Object.assign({},z),{id:`step-${z.id}`,labelValue:"step",inputValue:q.step,onChange:(z,Y)=>{q.step=Y;this.getSystem()[K]=q,this.updateCache()}})),Ut.G.numberGroup(Object.assign(Object.assign({},z),{id:`offset-${z.id}`,labelValue:"offset",inputValue:q.offset,onChange:(z,Y)=>{q.offset=Y;this.getSystem()[K]=q,this.updateCache()}}))],Y)}}let eo=class extends Z.u{constructor(){super(),this.initializers=[],this.behaviours=[],this.maxParticles=100,this.worldSpace=!0,this.worldSpaceScaling=!0,this.totalParticles=-1,this.emitPerSecond=new Or,this.pauseEmission=!1,this.paused=!1,this.spawnInBack=!0,this.prewarm=0,this.onAllParticlesDead=new $t.H,this._nextBurstTime=0,this._emitCount=0,this._lastEmit=0,this._nextEmit=0,this._time=0,this._created=!1,this._particles=new Pr(this.createParticle.bind(this),this.resetParticle.bind(this),this.killParticle.bind(this))}create(){if(this._created)return;this._created=!0,super.create();const q=new Or;q.max=this.emitPerSecond.max,q.min=this.emitPerSecond.min,q.step=this.emitPerSecond.step,q.offset=this.emitPerSecond.offset,q.type=this.emitPerSecond.type,this.emitPerSecond=q,this.emitPerSecond.onSetMinMax.add(this.onEmitPerSecondUpdate.bind(this));const K=[];this.initializers=this.initializers.map((q=>{const z=Jr.getInitializer(q.__type);return this.applySerializedObject(z,q),K.push(z.create(this)),z})),this.behaviours=this.behaviours.map((q=>{const K=Jr.getBehaviour(q.__type);return this.applySerializedObject(K,q),K.create(this),K})),this.prewarm>0&&Promise.all(K).then((()=>{this.runForward(this.prewarm)})).catch(zt.R.createHandler("Failed to prewarm particle system"))}applySerializedObject(q,K){for(const z in K)if("object"==typeof K[z])this.applySerializedObject(q[z],K[z]);else{let Y=z;"_"===z.charAt(0)&&(Y=z.slice(1));const Q=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(q),Y);if((null==Q?void 0:Q.get)&&!(null==Q?void 0:Q.set))continue;q[Y]=K[z]}}destroy(){var q;super.destroy(),this._particles.destroy(!0),null===(q=this.emitPerSecond)||void 0===q||q.destroy(),this.emitPerSecond=null,this.initializers=null,this.behaviours=null,this.onAllParticlesDead.dispatch(),this.onAllParticlesDead.dispose()}reset(){this._emitCount=0,this._lastEmit=0,this._time=0,this._nextEmit=1/this.emitPerSecond.getValue(),this._particles.flush(!0),this._particles.aliveList.forEach((q=>{q.active=!1}))}warmUp(q=this.maxParticles,K){if(K){const z=this.initializers;this.initializers=K,this.emit(q),this.initializers=z}else this.emit(q)}runForward(q){this._created||this.create();let K=q;for(;K>0;){const q=Math.min(K,qs.Z.DEFAULT_SPF);this.progressBurstTime(),this.pauseEmission||(this._time+=q,this._lastEmit+=q,(this.totalParticles<0||this.totalParticles>this._emitCount)&&this._particles.aliveList.getLength()=this._nextEmit&&(this._particles.getObject(),this._lastEmit-=this._nextEmit,this._nextEmit=1/this.emitPerSecond.getValue())),this.updateParticles(q),K-=q}}emit(q=1){for(let K=Math.min(q,this.maxParticles-this._particles.aliveList.getLength());K>0;--K)this._particles.getObject()}killParticle(q){const K=q.particle.renderComponent;K&&(K.destroy(),q.particle.renderComponent=void 0),0===this._particles.aliveList.getLength()&&this.onAllParticlesDead.dispatch()}createParticle(){const q=new Ne._(this.gameObject);q.addComponent(kt.d);const K=new Ir;return K.gameObject=q,q.particle=K,this.initializeParticle(q.particle),q}resetParticle(q){q.particle.reset(),this.initializeParticle(q.particle)}initializeParticle(q){var K;q.initialWorldPosition.copyFrom(this.gameObject.transform.worldPosition),this.initializers.forEach((K=>{var z;null===(z=K.initialize)||void 0===z||z.call(K,q)})),q.startingLife=q.life,q.startingScale.copyFrom(q.scale),q.startingAlpha=q.alpha,this._emitCount++;const z=null===(K=q.renderComponent)||void 0===K?void 0:K.getRootContainer();z&&(this.spawnInBack?z.parent.setChildIndex(z,0):z.parent.setChildIndex(z,z.parent.children.length-1))}onEnable(){super.onEnable(),this._time=0,this._nextEmit=1/this.emitPerSecond.getValue(),this._emitCount=0,this.burstTime&&(this._nextBurstTime=this._time+this.burstTime.getValue()),this.gameObject.transform.onWorldMatrixChanged.add(this.updateTransform,this)}onDisable(){var q,K;null===(K=null===(q=this.gameObject)||void 0===q?void 0:q.transform)||void 0===K||K.onWorldMatrixChanged.removeAll(this),super.onDisable()}updateTransform(){var q;this.worldSpace&&this.worldSpaceScaling&&(null===(q=this.gameObject.parent)||void 0===q?void 0:q.transform)&&this.gameObject.transform.setScale(1/this.gameObject.parent.transform.worldScale.x,1/this.gameObject.parent.transform.worldScale.y)}onEmitPerSecondUpdate(){(this._nextEmitthis.emitPerSecond.max)&&(this._nextEmit=1/this.emitPerSecond.getValue())}update(){if(this._created||this.create(),super.update(),this.paused)return;const q=Math.min(.001*tt.W.instance.game.time.deltaMS,qs.Z.DEFAULT_SPF);if(!this.pauseEmission&&(this._time+=q,this._lastEmit+=q,this.totalParticles<0||this.totalParticles>this._emitCount)){let q=0;for(;this._particles.aliveList.getLength()this._nextEmit;)if(this._particles.getObject(),this._lastEmit-=this._nextEmit,q+=this._nextEmit,this._nextEmit=1/this.emitPerSecond.getValue(),q>.034){this._lastEmit%=this._nextEmit;break}}this.updateParticles(q),this.progressBurstTime()}updateParticles(q){const K=q/qs.Z.DEFAULT_SPF,z=new At.I,Y=[];this._particles.aliveList.forEach((Q=>{const X=Q.particle;X.life-=q,X.life<0?Y.push(Q):(X.scale.copyFrom(X.startingScale),this.behaviours.forEach((q=>{const z=(X.lifePercentage-q.startAtLifePercentage)/(q.endAtLifePercentage-q.startAtLifePercentage);z>=0&&z<=1&&q.update&&q.update(X,z,K)})),z.setTo(X.velocity.x*q,X.velocity.y*q),X.position.add(z),X.rotation+=X.rotationalVelocity*q,Q.transform.setScale(X.scale.x,X.scale.y),this.worldSpace?Q.transform.localPosition=new At.I(X.position.x+(X.initialWorldPosition.x-this.gameObject.transform.worldPosition.x),X.position.y+(X.initialWorldPosition.y-this.gameObject.transform.worldPosition.y)):Q.transform.localPosition=X.position,Q.transform.localRotation=X.rotation,X.renderComponent&&(X.renderComponent.getRootContainer().alpha=X.startingAlpha*X.alpha))}));for(let Q=Y.length-1;Q>=0;--Q){Y[Q].active=!1}}progressBurstTime(){this.burstTime&&this._time>this._nextBurstTime&&(this._nextBurstTime=this._time+this.burstTime.getValue(),this._emitCount=0)}};(0,X.Cg)([(0,it.np)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],eo.prototype,"initializers",void 0),(0,X.Cg)([(0,it.np)(),(0,it.SZ)(),(0,X.Sn)("design:type",Array)],eo.prototype,"behaviours",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],eo.prototype,"maxParticles",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],eo.prototype,"worldSpace",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],eo.prototype,"totalParticles",void 0),(0,X.Cg)([(0,it.np)(),(0,X.Sn)("design:type",Or)],eo.prototype,"emitPerSecond",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],eo.prototype,"pauseEmission",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],eo.prototype,"paused",void 0),(0,X.Cg)([(0,it.np)(),(0,X.Sn)("design:type",Or)],eo.prototype,"burstTime",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],eo.prototype,"spawnInBack",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],eo.prototype,"prewarm",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],eo.prototype,"onAllParticlesDead",void 0),eo=(0,X.Cg)([(0,Rt.W)(to),(0,J.EV)("ParticleSystem","Particle System","A particle system and controller"),(0,J.S1)(),(0,X.Sn)("design:paramtypes",[])],eo);class io extends Nr{update(q,K){this.callback(q,K)}}class so extends Fr{initialize(q){this.callback(q)}}class no{constructor(q){this._dependencyData=null,this._dependencyData=q}getPrefabDependencyList(q,K){var z;if(!this._dependencyData)return new Set;const Y=tt.W.instance.game.cache,Q=null!=K?K:new Set;if(Q.has(q))return Q;if(Q.add(q),null===(z=this._dependencyData[q])||void 0===z?void 0:z.dependencies){const K=this._dependencyData[q].dependencies;for(let q=0;q{(()=>(0,X.sH)(this,void 0,void 0,(function*(){var X;const et=ho.isPrefabTemplate(q)?new ro:null,it=new ro,st=z?this._frameWorkManager:void 0;if(this._dependencyMapper){const K=this._dependencyMapper.getPrefabDependencyList(null!=Q?Q:q.GUID);yield this._assetLoader.loadAssets(Array.from(K))}if(yield Qt.completeGeneratorAsync(this.instantiatePrefab(it,q,K,et),st),Z.cancelled||!ut.A.isDefined(it.Root))return void tt("PrefabLoader.loadFromJSONWithDependencies: promise cancelled or root undefined at instantiatePrefab");const nt=this.gatherInstantiatedComponents(it.Root),at=this.convertInjectionDataToInjectionLinkData(null!==(X=q.Injections)&&void 0!==X?X:[],null!=Y?Y:[]);null!==at?(yield Qt.completeGeneratorAsync(this.mapPrefab(it,q,it.Root,et,at),st),Z.cancelled?tt("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at mapPrefab"):(yield this.preloadAssets(it.Root),Z.cancelled?tt("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at preloadAssets"):(yield Qt.completeGeneratorAsync(this.createPrefab(nt),st),Z.cancelled?tt("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at createPrefab"):(yield Qt.completeGeneratorAsync(this.postCreatePrefab(nt),st),Z.cancelled?tt("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at postCreatePrefab"):J(it.Root))))):tt("PrefabLoader.loadFromJSONAsync: injectionLinkData is null")})))().catch((q=>{tt(zt.R.stringify(q))}))}));return Z}preloadFromGUIDWithDependencies(q,K=!1,z){const Y=this._prefabService.getPrefabFromGuid(q);return this.preloadFromJSONWithDependencies(Y,K,z,q)}preloadFromJSONWithDependencies(q,K=!1,z,Y){let Q;const Z=q=>{q.components.length=0;for(const K of q.children)Z(K)},J=()=>{Q&&(Z(Q),Q.destroy(),Q=null)},tt=new ie(((Z,et)=>{(()=>(0,X.sH)(this,void 0,void 0,(function*(){var X;const J=ho.isPrefabTemplate(q)?new ro:null,it=new ro,st=K?this._frameWorkManager:void 0;if(this._dependencyMapper){const K=this._dependencyMapper.getPrefabDependencyList(null!=Y?Y:q.GUID);yield this._assetLoader.loadAssets(Array.from(K))}const nt=new Ne._;if(nt.active=!1,Q=yield Qt.completeGeneratorAsync(this.instantiatePrefab(it,q,nt,J),st),tt.cancelled||!ut.A.isDefined(it.Root))return void et("PrefabLoader.preloadFromJSONWithDependencies: promise cancelled or root undefined at instantiatePrefab");const at=this.convertInjectionDataToInjectionLinkData(null!==(X=q.Injections)&&void 0!==X?X:[],null!=z?z:[]);null!==at?(yield Qt.completeGeneratorAsync(this.mapPrefab(it,q,it.Root,J,at),st),tt.cancelled?et("PrefabLoader.preloadFromJSONWithDependencies: promise cancelled at mapPrefab"):(yield this.preloadAssets(it.Root),Z())):et("PrefabLoader.loadFromJSONAsync: injectionLinkData is null")})))().catch((q=>{et(zt.R.stringify(q))})).finally(J)}));return tt}loadFromJSONProject(q,K,z=!1,Y){const Q=new ie(((Z,J)=>{(()=>(0,X.sH)(this,void 0,void 0,(function*(){var X;const tt=ho.isPrefabTemplate(q)?new ro:null,et=new ro,it=z?this._frameWorkManager:void 0;if(yield Qt.completeGeneratorAsync(this.instantiatePrefab(et,q,K,tt),it),!ut.A.isDefined(et.Root))return void J("PrefabLoader.loadFromJSONProject: promise cancelled at instantiatePrefab");const st=this.gatherInstantiatedComponents(et.Root),nt=this.convertInjectionDataToInjectionLinkData(null!==(X=q.Injections)&&void 0!==X?X:[],null!=Y?Y:[]);null!==nt?(yield Qt.completeGeneratorAsync(this.mapPrefab(et,q,et.Root,tt,nt),it),Q.cancelled?J("PrefabLoader.loadFromJSONProject: promise cancelled at mapPrefab"):(yield this.preloadAssetsProject(et.Root),Q.cancelled?J("PrefabLoader.loadFromJSONProject: promise cancelled at preloadAssetsProject"):(yield Qt.completeGeneratorAsync(this.createPrefab(st),it),Q.cancelled?J("PrefabLoader.loadFromJSONProject: promise cancelled at completeGeneratorAsync - createPrefab"):(yield Qt.completeGeneratorAsync(this.postCreatePrefab(st),it),Q.cancelled?J("PrefabLoader.loadFromJSONProject: promise cancelled at completeGeneratorAsync - postCreatePrefab"):Z(et.Root))))):J("PrefabLoader.loadFromJSONAsync: injectionLinkData is null")})))().catch((q=>{J(zt.R.stringify(q))}))}));return Q}getLastPrefabMap(){return this._lastPrefabMap}*instantiatePrefab(q,K,z,Y){var Q;const X=this.generateUniqueGUID(q,K.GUID);if(!ut.A.isDefined(X))return ho.logError(`Attempting to instantiate the same object twice: ${K.GUID}.`,ct.$.Error),null;yield;let J=null,tt=Y,et=K.Name,it=!1;if(ho.isPrefabTemplate(K)){tt=new ro;let Y=null;if(Y=K.templateKey?this._prefabService.getPrefabFromGuid(K.templateKey):this._prefabService.getPrefab(K.template),!ut.A.isDefined(Y))return ho.logError(`Attempting to instantiate a template that does not exist: ${K.template}.`,ct.$.Error),null;K.Layer&&(Y.Layer=K.Layer),yield*this.instantiatePrefab(tt,Y,z,null),J=tt.Root,K.templateKey?(q.TemplatesKeyed[K.templateKey]||(q.TemplatesKeyed[K.templateKey]=[]),q.TemplatesKeyed[K.templateKey].push(tt)):(q.Templates[K.template]||(q.Templates[K.template]=[]),q.Templates[K.template].push(tt))}else if(ho.isPrefabOverride(K)){if(!tt.Map.hasOwnProperty(K.TUID))return ho.logError(`Attempting to map a templated prefab that does not exist: ${K.TUID}.`,ct.$.Error),null;if(!(tt.Map[K.TUID]instanceof Ne._))return ho.logError(`Attempting to map a templated prefab to a non-prefab: ${K.TUID}.`,ct.$.Error),null;J=tt.Map[K.TUID],ut.A.isDefined(et)&&""!==et||(et=J.name)}else J=new Ne._(z),it=!0;ut.A.isDefined(K.Name)&&""!==K.Name&&(J.name=et),K.Layer&&(J.layer=K.Layer),ut.A.isDefined(K.Active)&&(J.active=K.Active),q.Map[X]=J,ut.A.isDefined(q.Root)||ut.A.isDefined(q.GUID)||(q.Root=J,q.GUID=X),K.Components||(K.Components=[]);for(let st=0;st0&&z.Properties){Y.preDeserialize(z.Properties);for(const K of ot){const Q=K.alias?K.alias:K.property;let Z=z.Properties[Q];const J=[];if(X.hasOwnProperty(Q))if(K.type===Jt.b.Signal){let q=X[Q];Array.isArray(q)||(q=[q]);for(const K of q)"function"==typeof K?J.push(K):ht.V.log(`Signal injection for ${Q} of ${z.GUID} is not a function`,ct.$.Error);J.length>0&&!Z&&(Z=[])}else Z=X[Q];if(ut.A.isDefined(Z)){const z=K.isRecord?Y[K.property]:Y,Q=K.isRecord?Z:{[K.property]:Z};Object.keys(Q).forEach((Y=>{switch(K.type){case Jt.b.ComponentReference:case Jt.b.UnknownObject:case Jt.b.GameObjectReference:ho.mapObjectReference(q.Map,z,Y,K.isArray,Q[Y]);break;case Jt.b.SceneObjectReference:ho.mapSceneObjectReference(z,Y,K.isArray,Q[Y]);break;case Jt.b.Signal:ho.mapSignal(q.Map,z,Y,Q[Y],J);break;case Jt.b.PrefabConstructable:ho.mapPrefabConstructable(z,Y,K.isArray,K.isReorderableList,Q[Y]);break;default:ho.mapField(z,Y,Q[Y])}}))}}Y.customDeserialize(z.Properties),Y.postDeserialize()}}for(let Z=0;Z{this._assetLoader.loadTypedAssets(this.generateTypeMap(q),K)}))}))}gatherInstantiatedComponents(q,K=[]){const z=q.components;for(let Q=z.length-1;Q>=0;--Q)K.push(z[Q]);const Y=q.children;for(let Q=0;Q{for(const Y of q.components){const q=et.ih.getAssetProperties(Y);if(q)for(const[Q,X]of q){const q=Y[Q];if(q)for(const Y of Array.isArray(q)?q:[q]){const q=X&&Y[X]?Y[X]:Y,Q=K.getAtlasAlias(q);Q?z.add(Q.atlasGuid):z.add(q)}}}for(const K of q.children)Y(K)};return Y(q),this._assetLoader.loadAssets(Array.from(z))}))}getTemplate(q,K){const z=q.Templates[K.template],Y=q.TemplatesKeyed[K.templateKey];let Q=null;return(null==z?void 0:z.length)>0?(Q=z.shift(),z.push(Q)):(null==Y?void 0:Y.length)>0&&(Q=Y.shift()),Q}getOverride(q,K){const z=q[K];return z instanceof Ne._?z:null}*createPrefab(q){for(const z of q)if(yield,!z.isCreated&&z.GameObject)try{z.create()}catch(K){this.handleLoadException(K)}}*postCreatePrefab(q){for(const z of q)if(z.GameObject){yield;try{z.postCreate()}catch(K){this.handleLoadException(K)}}}generateUniqueGUID(q,K){let z=K;if(ut.A.isDefined(z)&&""!==z)q.Map.hasOwnProperty(z)&&(z=null);else do{z=ut.A.generateGUID()}while(q.Map.hasOwnProperty(z));return z}getSerializableProperties(q){if(this._cachedSerializableProperties.has(q.constructor))return this._cachedSerializableProperties.get(q.constructor);{let K=null;const z=Reflect.getMetadata(it.UW,q.constructor);return z&&z.length>0&&(K=z.map((K=>Reflect.getMetadata(it.fY,q.constructor,K))),K=dt.orderBy(K,["priority"],["desc"]),this._cachedSerializableProperties.set(q.constructor,K)),K}}handleLoadException(q){ht.V.log("Error when loading prefab:\n",ct.$.Error),ht.V.log(q,ct.$.Error),ht.V.log(null==q?void 0:q.stack,ct.$.Error)}static mapObjectReference(q,K,z,Y,Q){if(Array.isArray(K[z])||Y)if(Array.isArray(Q)){K[z].length>0&&(K[z]=[]);const Y=K[z];for(let K=0;Kz.call(Q,...q,...K)),Q):Z.add(((...K)=>z.call(Q,q,...K)),Q):Z.add(z,Q)}else ho.logError(`Attempting to deserialize a Signal property with an undefined handler ${Y.functionName}.`,ct.$.Error)}else if(Y.propertyName){const q=Y.args;void 0!==q?K[z].add((()=>{Q[Y.propertyName]=q}),Q):Z.add((q=>{void 0!==q?Q[Y.propertyName]=q:ho.logError(`Attempting to update a property ${Y.propertyName} from a Signal with undefined dispatch params.`,ct.$.Error)}))}}for(const tt of Q)Z.add(tt)}static mapField(q,K,z){if(z instanceof Object&&"function"!=typeof z){q[K]||(q[K]=Array.isArray(z)?[]:{});const Y=q[K];for(const q in z)ho.mapField(Y,q,z[q])}else q[K]=z}static resolveRequiredComponents(q){const K=te.QW.getProperties(q);for(const z of K){const K=te.QW.getPropertyInfo(q,z).ctor,Y=q.GameObject.findComponent(K);Y?q[z]=Y:ht.V.log(`Missing ${K.name} component required by ${q.constructor.name} component`,ct.$.Error)}}static mapPrefabConstructable(q,K,z,Y,Q){const X=q=>{const K=ao.l[q];return K?new K.ctor:(ho.logError(`Attempting to construct instance of non-prefabConstructable class ${q}`,ct.$.Error),null)};if(z||Y){const z=[];for(const q of Q){const K=X(q);K&&z.push(K)}q[K]=z}else q[K]=X(Q)}static isPrefabTemplate(q){return q instanceof tn}static isPrefabOverride(q){return q instanceof Js}static isComponentOverride(q){return q instanceof Xs}static logError(q,K){0}};var lo,uo;(0,X.Cg)([ki(nt.PrefabService),(0,X.Sn)("design:type",oo)],co.prototype,"_prefabService",void 0),(0,X.Cg)([ki(nt.AssetLoader),(0,X.Sn)("design:type",Object)],co.prototype,"_assetLoader",void 0),(0,X.Cg)([ki(nt.FrameWorkManager),(0,X.Sn)("design:type",Ws.Y)],co.prototype,"_frameWorkManager",void 0),co=ho=(0,X.Cg)([(0,Qe.injectable)()],co),function(q){q[q.Individual=0]="Individual",q[q.Combined=1]="Combined"}(lo||(lo={})),function(q){q[q.RejectPromise=0]="RejectPromise",q[q.DispatchSignal=1]="DispatchSignal"}(uo||(uo={}));class fo{constructor(){this._loader=null,this._config=null,this._prefabDependencyData=null,this._loader=tt.W.instance.game.load}loadProjectConfigData(q,K,z){return(0,X.sH)(this,void 0,void 0,(function*(){let Y=new URL("projectConfig/assetPathConfig.json",window.location.origin),Q=new URL("projectConfig/dependencyMap.json",window.location.origin);q&&(Y="string"!=typeof q?q:new URL(q)),K&&(Q="string"!=typeof K?K:new URL(K));const X=this.fetchConfig(Y.href).then((q=>{this.loadServerAssetConfig(q,z)})),Z=this.fetchConfig(Q.href).then((q=>{this.loadPrefabDependencyJson(q)}));yield Promise.all([X,Z]).catch((q=>{zt.R.logError(q,"Error loading project configs")}))}))}loadServerAssetConfig(q,K){this._config=Object.assign(Object.assign({},JSON.parse(q)),K||{});const z=Object.keys(this._config.assetData);for(let Y=0;Y{const Y=new XMLHttpRequest;Y.onload=()=>{(null==Y?void 0:Y.responseText)?K(Y.responseText):z(new Error(`No response text found for ${q}`))},Y.onerror=K=>{z(new Error(`Error fetching config from ${q}`))},Y.onabort=K=>{z(new Error(`Request aborted for ${q}`))},Y.open("get",q,!0),Y.send()}))}))}fetchPrefabData(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=this.getAssetData(q);if(K){if("prefab"===K.type)return new Promise(((q,z)=>{const Y=new XMLHttpRequest;Y.onload=()=>{Y.response?q(Y.response):z(null)},Y.onerror=q=>{z(null)},Y.onabort=q=>{z(null)},Y.responseType="json";const Q=ut.A.appendPathToURL(K.path,this.getURL());Y.open("get",Q.href,!0),Y.send()}));ht.V.log(`Asset at ${q} is type ${K.type} expected to be "prefab"`,ct.$.Warning)}return null}))}preloadAssetsForPrefab(q){return(0,X.sH)(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}preloadAssetsForPrefabs(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=[];for(const z of q)K.push(this.preloadAssetsForPrefab(z));yield Promise.all(K)}))}loadTypedAssets(q,K){throw new Error("Method not implemented.")}isLoaded(q,K){throw new Error("Method not implemented.")}loadAssets(q){return(0,X.sH)(this,void 0,void 0,(function*(){throw new Error("use loadTypedAssets for projects")}))}getAsset(q,K){throw{name:"NotImplementedError",message:"Not yet implemented"}}assignAssetData(q,K){throw{name:"NotImplementedError",message:"Not yet implemented"}}getAssetData(q){var K;if(null===(K=this._config)||void 0===K?void 0:K.assetData){if(this._config.assetData[q])return this._config.assetData[q];ht.V.log(`Could not find ${q} in asset map`,ct.$.Warning)}else this.logNotInstantiated();return null}logNotInstantiated(){ht.V.log("AssetLoader returned an empty URL as either no config was loaded or no server URL was found in the config.",ct.$.Warning)}}let bo=class extends fo{constructor(){super(...arguments),this._prefabsPreloaded=!1,this.imageRatioFileSuffix="",this.onLoadFailed=new $t.H,this._dependenciesByGuid=new Map,this._dependenciesBeingProcessed=new Set}fetchPrefabDataSync(q){return this.prefabLoadingBehaviour===lo.Individual?JSON.parse(tt.W.instance.game.cache.getJSON(q)):tt.W.instance.game.cache.getJSON(q)}getUrlForAsset(q,K){const z=this.getAssetData(q);if(z){const q=ut.A.appendPathToURL(z.path,this.getURL());if(K){let K;return q.href.endsWith(".png")?K=".png":q.href.endsWith(".json")&&(K=".json"),new URL(this.appendImageRatioSuffix(q.href,K))}return q}return null}appendImageRatioSuffix(q,K){return q.replace(K,`${this.imageRatioFileSuffix}${K}`)}loadTypedAssets(q,K){const z=[];Object.keys(q).forEach((K=>{z.push(...Array.from(q[K].values()).map((q=>this.checkForAtlasLink(q))))})),this.loadAssetsWithGUIDs(z).then((()=>{K()}))}preloadAssetsForPrefab(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=this.getPrefabDependencyList(q);return this.loadAssetsWithGUIDs(Array.from(K.values()))}))}loadAssetsWithGUIDs(q){return(0,X.sH)(this,arguments,void 0,(function*(q,K=!0){return this.prefabLoadingBehaviour===lo.Combined&&K&&!this._prefabsPreloaded?new Promise(((K,z)=>{this.loadAssetsWithGUIDs(["prefabs"],!1).then((()=>{const z=tt.W.instance.game.cache.getJSON("prefabs");Object.keys(z).forEach((q=>{tt.W.instance.game.cache.addJSON(q,z[q])})),this._prefabsPreloaded=!0,this.loadAssetsWithGUIDs(q).then((()=>{K()}))})).catch((q=>{z(q)}))})):new Promise(((K,z)=>{const Y=new Set,Q=new Set,X=()=>{if(0===Y.size){let q=!0;if(0===Q.size)K();else switch(this.failureBehaviour){case uo.DispatchSignal:q=!1,this.onLoadFailed.dispatch(Array.from(Q.values()));break;case uo.RejectPromise:default:z(new Error(`${Q.size} assets failed to load`))}q&&this._loader.onFileLoadComplete.remove(Z)}},Z=(q,K)=>{Y.has(q)?(Y.delete(q),K||Q.add(q),X()):Q.has(q)&&K&&(Q.delete(q),X())};let J=!1;q.forEach((q=>{!this.isCached(q)&&this.resolveLoadSingle(q)&&(Y.add(q),J=!0)})),J?(this._loader.onFileLoadComplete.add(Z),this._loader.start()):K()}))}))}checkForAtlasLink(q){var K,z;const Y=this._config.assetData[q];return null!==(z=null===(K=null==Y?void 0:Y.atlasLink)||void 0===K?void 0:K.guid)&&void 0!==z?z:q}getPrefabDependencyList(q){var K;const z=new Set,Y=this.checkForAtlasLink(q);if(this._config.assetData[Y]&&z.add(Y),!(null===(K=this._prefabDependencyData[Y])||void 0===K?void 0:K.dependencies))return z;if(this._dependenciesByGuid.has(q))return this._dependenciesByGuid.get(q);if(this._dependenciesBeingProcessed.has(q))return z;this._dependenciesBeingProcessed.add(q);const Q=this._prefabDependencyData[Y].dependencies;for(let X=0;X0&&J>0,tt,J);break;default:return ht.V.log(`DynamicAssetLoader cannot handle asset of type ${Q}`,ct.$.Warning),!1}return!0}return!1}isLoaded(q,K){const z=tt.W.instance.game.cache;return K===Ki.Z.Prefab||K===Ki.Z.TiledMap||K===Ki.Z.StreamedMapEla||K===Ki.Z.Json?z.checkJSONKey(q):K===Ki.Z.Atlas?z.checkTextureAtlasKey(q):K===Ki.Z.Spine?z.checkSpineKey(q):"singleImage"===K||K===Ki.Z.SingleImage?z.checkImageKey(q):K===Ki.Z.Audio||K===Ki.Z.Sfx||K===Ki.Z.Bgm?z.checkSoundKey(q):K===Ki.Z.Tileset&&z.checkTextureAtlasKey(q)}};bo=(0,X.Cg)([(0,Qe.injectable)()],bo);let po=class extends fo{fetchPrefabDataSync(q){return JSON.parse(tt.W.instance.game.cache.getJSON(q))}loadTypedAssets(q,K){K&&this._loader.onLoadComplete.addOnce(K);const z=Object.keys(q);for(let Y=0;Y{this._loader.onLoadComplete.addOnce((()=>{K()}));this.getPrefabDependencyList(q).forEach((q=>{this.resolveLoadSingle(q)})),this._loader.start()}))}))}getPrefabDependencyList(q){var K,z,Y;const Q=new Set;if(this._config.assetData[q]&&Q.add(q),null===(K=this._prefabDependencyData[q])||void 0===K?void 0:K.dependencies){const K=this._prefabDependencyData[q].dependencies;for(let q=0;q{var Y;return{name:K,imageGuid:q.imageIDs[z],transform:null===(Y=q.transforms)||void 0===Y?void 0:Y[z]}})),z}static toGearFile(q){const K=[],z=[],Y=[];for(let X=0;X{if(null==q?void 0:q.length){const K=tt.W.instance.game.cache.getJSON(q);if(!K)return;const z=go.fromGearFile(K);z&&this.addGear(z,!1).catch(zt.R.createHandler("Could not add gear in getFromGear"))}})),this.autoRefresh&&this.refresh().catch(zt.R.createHandler(`Could not refresh ${this.gameObject.name} gear in getFromGear`))}addGear(q){return(0,X.sH)(this,arguments,void 0,(function*(q,K=!0){this.gearElements.push(q),K&&(yield this.refresh().catch(zt.R.createHandler(`Could not refresh ${this.gameObject.name} gear in addGear`)))}))}setGearAt(q,K){return(0,X.sH)(this,arguments,void 0,(function*(q,K,z=!0){this.gearElements[q]=K;for(let Y=0;Y<=q;Y++)void 0===this.gearElements[Y]&&(this.gearElements[Y]=null);z&&(yield this.refresh().catch(zt.R.createHandler(`Could not refresh ${this.gameObject.name} gear in setGearAt`)))}))}removeGear(q,K=!0){const z=this.gearElements.indexOf(q);-1!==z&&(this.gearElements.splice(z,1),K&&this.refresh().catch(zt.R.createHandler(`Could not refresh ${this.gameObject.name} gear in removeGear`)))}shouldRecolorSlot(q){return!this._slotsToNotRecolor.has(q)}refresh(){return(0,X.sH)(this,void 0,void 0,(function*(){var q;if(!this.spine&&(this.hookSpineComponent(),!this.spine))throw new Error(`Could not find SpineComponent on ${this.gameObject.name} in SpineManagerComponent`);const K=[];for(let z=this.gearElements.length-1;z>=0;z--){const q=this.gearElements[z];if(!ut.A.isDefined(q))continue;const Y=q.attachments.map((q=>q.imageGuid));this._allCurrentImageGuids.push(...Y),K.push(this.loadImages(Y))}K.length&&(yield Promise.all(K)),this._skin.clear(),this._hiddenSlots.clear(),this._slotsToNotRecolor.clear(),this.attachmentTextureIdMap.clear(),this._activeAttachments=[],this._allCurrentImageGuids=[];for(let z=this.gearElements.length-1;z>=0;z--){const K=this.gearElements[z];ut.A.isDefined(K)&&(K.hiddenSlots.forEach((q=>{this.hideSlotBySlotName(q)})),K.slotsToNotRecolor.forEach((q=>{this._slotsToNotRecolor.add(q)})),null===(q=K.attachments)||void 0===q||q.forEach((q=>this.applyTextureByAttachment(q))))}this.updateHiddenSlots(),this.updateSkin(),this.onLoadComplete.dispatch()}))}updateSkin(){var q;this.spine.pixiSpine.skeleton.setSkin(this._skin),this.spine.pixiSpine.skeleton.setSlotsToSetupPose(),null===(q=this.spine.pixiSpine.animationState)||void 0===q||q.apply(this.spine.pixiSpine.skeleton)}applyTextureByAttachment(q){const K=tt.W.instance.game.cache.getTexture(q.imageGuid);if(!(null==K?void 0:K.baseTexture))return void ht.V.log(`Could not find texture with guid ${q.imageGuid} for attachment ${q.name}`,ct.$.Error);Eo.q.setSmoothed(K,!0);this.getSlotNames(q.name).forEach((z=>{this.applyTextureToSlot(z,q,K)})),-1===this._activeAttachments.indexOf(q.name)&&this._activeAttachments.push(q.name),this.attachmentTextureIdMap.set(q.name,q.imageGuid)}applyTextureToSlot(q,K,z){var Y;if(this._hiddenSlots.has(q))return;const Q=this.spine.skeleton,X=Q.findSlot(q);if(!X)return void ht.V.log(`Could not find slot ${q} for attachment ${K.name}`,ct.$.Error);const Z=X.data;if(!Z)return void ht.V.log(`Could not find data for slot ${q} for attachment ${K.name}`,ct.$.Error);const J=Q.findSlotIndex(q),tt=Q.data.defaultSkin.getAttachment(J,K.name);if(tt.type===mo.Region||tt.type===mo.Mesh){const q=tt.copy(),Q=(0,dt.clone)(q.region);Q.names=q.region.names,Q.values=q.region.values,Q.texture=z,Q.size=this.getSizeForAttachment(tt,z.orig),Q.size=this.applyTransform(K.transform,null!==(Y=Q.size)&&void 0!==Y?Y:z.orig),q.region=Q,tt.type===mo.Region&&K.transform&&(q.x=K.transform.x,q.y=K.transform.y),this._skin.setAttachment(Z.index,K.name,q)}}applyTransform(q,K){if(!q)return K;const z=K.clone();return z.x+=q.x,z.y+=q.y,z.width*=q.scaleX,z.height*=q.scaleY,z}getSizeForAttachment(q,K){return K}hideSlotBySlotName(q){const K=this.spine.skeleton.findSlot(q);K?this._hiddenSlots.has(q)||this._hiddenSlots.set(q,K):ht.V.log(`Slot ${q} not found on spine ${this.spine.name}`,ct.$.Warning)}updateHiddenSlots(){Array.from(this._hiddenSlots.values()).forEach((q=>{const K=this.getAttachmentName(q.data.name);K&&this._skin.setAttachment(q.data.index,K,wo.hiddenAttachment)}))}isHiddenSlot(q){return this._hiddenSlots.has(q)}destroy(){this.onLoadComplete.dispose(),super.destroy()}getAttachmentName(q){return this.slotToAttachmentMap.has(q)?this.slotToAttachmentMap.get(q):q}getSlotNames(q){return this.attachmentToSlotMap.has(q)?this.attachmentToSlotMap.get(q):[q]}}wo.defaultTextures=new Map,(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],wo.prototype,"autoRefresh",void 0),(0,X.Cg)([(0,it.SZ)(),(0,it.tW)("gear"),(0,X.Sn)("design:type",Array)],wo.prototype,"gear",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],wo.prototype,"onLoadComplete",void 0),(0,X.Cg)([(0,We.G)(),(0,X.Sn)("design:type",Function),(0,X.Sn)("design:paramtypes",[]),(0,X.Sn)("design:returntype",void 0)],wo.prototype,"getFromGear",null);var To,So=z(64425);class Ao{}Ao.markups={pause:{apply:(q,K,z)=>(z.delay+=q.delay,z),dataDefault:{delay:1e3}},"scale-in":{apply:(q,K,z)=>{const Y=tt.W.instance.game.tweens.create(K.scale,K),Q=q.ease.split(".");return Y.from({x:0,y:0},q.time,Ke.G[Q[0]][Q[1]],!0,z.delay+q.delay),Y.start(),z.delay+=q.delay,z},dataDefault:{time:400,delay:25,ease:"Back.Out"}},shake:{apply:(q,K,z)=>{const Y=K.position.clone(),Q=tt.W.instance.game.tweens.create(K.position,K);return Q.onUpdate.add((()=>{K.position.set(Y.x+Math.random()*q.strength-q.strength,Y.y+Math.random()*q.strength-q.strength)})),Q.from({},1e3),Q.loop(!0),Q.start(),z},dataDefault:{strength:5}},circular:{apply:(q,K,z)=>{const Y=K.position.clone(),Q={phase:0},X=(Y.x+3*Y.y)/K.style.fontSize*q.freq,Z=tt.W.instance.game.tweens.create(Q,K);return Z.onUpdate.add((()=>{K.position.set(Y.x+Math.cos(Q.phase+X)*q.yStrength,Y.y+Math.sin(Q.phase+X)*q.xStrength)})),Z.from({phase:2*Math.PI},q.time),Z.loop(!0),Z.start(),z},dataDefault:{xStrength:5,yStrength:5,time:2e3,freq:.2}},wave:{apply:(q,K,z)=>{const Y=K.position.clone(),Q={phase:0},X=(Y.x+3*Y.y)/K.style.fontSize*q.freq,Z=tt.W.instance.game.tweens.create(Q,K);return Z.onUpdate.add((()=>{K.position.set(Y.x,Y.y+Math.sin(Q.phase+X)*q.strength)})),Z.from({phase:2*Math.PI},q.time),Z.loop(!0),Z.start(),z},dataDefault:{strength:5,time:2e3,freq:.2}},rock:{apply:(q,K,z)=>{const Y={phase:0},Q=(K.position.x+3*K.position.y)/K.style.fontSize*q.freq,X=tt.W.instance.game.tweens.create(Y,K);return X.onUpdate.add((()=>{K.rotation=Math.sin(Y.phase+Q)*q.strength})),X.from({phase:2*Math.PI},q.time),X.loop(!0),X.start(),z},dataDefault:{strength:.4,time:2e3,freq:.2}},b:{applyStyle:q=>(q.fontWeight="bold",q)},i:{applyStyle:q=>(q.fontStyle="italic",q.padding=5,q)},red:{applyStyle:q=>(q.fill=To.red,q)},yellow:{applyStyle:q=>(q.fill=To.yellow,q)},green:{applyStyle:q=>(q.fill=To.green,q)},cyan:{applyStyle:q=>(q.fill=To.cyan,q)},blue:{applyStyle:q=>(q.fill=To.blue,q)},pink:{applyStyle:q=>(q.fill=To.pink,q)},sunset:{applyStyle:q=>(q.fill=[0,8913083,11158528],q)}},function(q){q[q.red=11730944]="red",q[q.yellow=11580160]="yellow",q[q.green=45824]="green",q[q.cyan=46003]="cyan",q[q.blue=179]="blue",q[q.pink=11731123]="pink"}(To||(To={}));class Co{constructor(q,K,z){if(this._markup=Ao.markups[q],!this._markup)return ht.V.log(`Text markup ${q} does not exist, either add it or check your spelling`,ct.$.Error),void(this.start=Number.POSITIVE_INFINITY);this.type=q,this.start=z,this.data=Object.assign({},this._markup.dataDefault);const Y=Object.keys(K);for(let Q=0;Q, perhaps use `Text` instead?",ct.$.Info),this._text=q,this.onFinish(null)):this._parser.parse(q)}onText(q){q.value&&(this._textIndex+=q.value.length,this._text+=q.value)}onFinish(q){this._callback&&this._callback()}onOpenTag(q){const K={};for(let Y=0;Y=0;K--){const z=this.markups[K];if(z.type===q.tagName&&void 0===z.end){z.start===this._textIndex?z.start=z.end=this._textIndex-1:z.end=this._textIndex;break}}}onError(q){ht.V.log(`Text markup error ${q.code} at ${q.pos}! ${q.message}`,ct.$.Error)}}let Io=class extends ve{constructor(){super(...arguments),this._texts=[]}set text(q){this.createTextObject(),this.Source instanceof Vt?this.Source.setText(q):this.Source=new Vt(q)}get text(){var q;return null===(q=this.Source)||void 0===q?void 0:q.getText()}set lineSpacing(q){ht.V.log(`Cannot set line spacing to ${q} on TextMoney, line spacing is not yet implemented.`,ct.$.Warning)}get lineSpacing(){return ht.V.log("Cannot get line spacing from TextMoney, line spacing is not implemented.",ct.$.Warning),0}set underline(q){ht.V.log("Underline not supported on TextMoney",ct.$.Error)}create(){super.create(),this._parser||(this._parser=new Oo),this._parent.visible=this.Active,this.OnActiveChanged.add((()=>this._parent.visible=this.Active)),this.setRootContainer(this._parent),this._parent.position.y-=3,this.calculateBoundsAlign()}setRootContainer(q){q===this._parent&&super.setRootContainer(q)}createTextObject(){super.createTextObject(),this.textObject.visible=!1,this._parent||(this._parent=new _t.Container)}updateText(){if(null===this._parent||null===this.Source)ht.V.log("Trying to update the text on a Text component before the text object was created.",ct.$.Warning);else{const q=this.Source.getText();this._parser||(this._parser=new Oo),this._parser.parse(q,this.onParserFinish.bind(this))}}onParserFinish(){this.resetForNextText();const q=this._parser.text.split(" ");let K=0,z=0,Y=0,Q=q.length;for(let X=0;Xthis.wordWrapWidth&&(this.position.x=0,this.position.y+=this.getTextObjectStyle().fontSize)}getStyleIndex(q){for(;this._nextStyleIndex=q;K--)this._parent.removeChild(this._texts[K]),tt.W.instance.game.tweens.removeAllFromOwner(this._texts[K]),this._texts[K].destroy(),this._texts.pop()}loopMarkups(q,K,z){var Y;let Q=0;const X=[];for(let Z=this._parser.markups.length-1;Z>=0;Z--){const J=this._parser.markups[Z];if(q>=J.start&&-1===X.indexOf(J.type)&&(q=0;K--)this._parent.removeChild(this._texts[K]),tt.W.instance.game.tweens.removeAllFromOwner(this._texts[K]),this._texts[K].destroy(),this._texts.pop();this._parent&&this._parent.destroy(),this._parent=null,this._texts=[],super.destroy()}};(0,X.Cg)([(0,it.W_)(),(0,X.Sn)("design:type",String),(0,X.Sn)("design:paramtypes",[String])],Io.prototype,"text",null),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number),(0,X.Sn)("design:paramtypes",[Number])],Io.prototype,"lineSpacing",null),Io=(0,X.Cg)([(0,J.EV)("TextMoney",J.YH.ui,"Draws a web font on the screen as a child of the parent game object")],Io);let Do=class extends un{constructor(){super(...arguments),this._filled=!0,this._color="#393939",this._radius=50,this._alpha=1,this._strokeThickness=2,this._graphics=null,this._size=new St.o}get filled(){return this._filled}set filled(q){this._filled=q,this.drawCircle()}get color(){return this._color}set color(q){this._color=q,this.drawCircle()}get radius(){return this._radius}set radius(q){this._radius=q;const K=2*q;this._size.setTo(K,K),this.drawCircle()}get alpha(){return this._alpha}set alpha(q){this._alpha=q,this.drawCircle()}get strokeThickness(){return this._strokeThickness}set strokeThickness(q){this._strokeThickness=q,this.drawCircle()}create(){super.create(),this._graphics=tt.W.instance.game.add.graphics(0,0);const q=2*this._radius;this._size.setTo(q,q),this.setUpDisplayObject(this._graphics),this.drawCircle()}destroy(){var q;null===(q=this._graphics)||void 0===q||q.destroy(),this._graphics=null,super.destroy()}getDimensions(){return this._size}drawCircle(){if(!this._graphics)return;this._graphics.clear();const q=parseInt(this._color.substr(1),16);this._filled?this._graphics.beginFill(q,this._alpha):this._graphics.lineStyle(this._strokeThickness,q,this._alpha),this._graphics.drawCircle(this._radius,this._radius,this._radius),this._filled?this._graphics.endFill():this._graphics.lineStyle(0)}getGraphics(){return this._graphics}};(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],Do.prototype,"_filled",void 0),(0,X.Cg)([(0,it.iE)(),(0,X.Sn)("design:type",String)],Do.prototype,"_color",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Do.prototype,"_radius",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Do.prototype,"_alpha",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Do.prototype,"_strokeThickness",void 0),Do=(0,X.Cg)([(0,J.EV)("CirclePrimitive",J.YH.primitive,"Draws a circle using the PIXI Graphics library")],Do);let Ro=class extends jt.y{constructor(){super(...arguments),this._dashLength=100,this._dashRadius=20,this._dashGapSize=20,this._dashColor="#FFFFFF",this._isVertical=!1}create(){super.create(),this._graphics=new _t.Graphics,this.setUpDisplayObject(this._graphics),this._rectTransform=this.GameObject.findComponent(Tt.X),this._rectTransform?(this._rectTransform.onRecalculatedBounds.add(this.renderDashedLine,this),this.renderDashedLine()):ht.V.log("DashedLineComponent must be attached to a RectTransform!",ct.$.Error)}destroy(){var q,K;null===(K=null===(q=this._rectTransform)||void 0===q?void 0:q.onRecalculatedBounds)||void 0===K||K.remove(this.renderDashedLine,this),this._graphics.destroy(),this._rectTransform=null,this._graphics=null,super.destroy()}getDimensions(){return this._rectTransform.rectTransformDimensions}renderDashedLine(){this._graphics.clear();const q=this._rectTransform.rectTransformDimensions;if(this._isVertical){const K=new _t.Matrix;K.rotate(wt.c.degreesToRadians(90)).translate(q.width,0),this._graphics.setMatrix(K)}this._graphics.beginFill(parseInt(this._dashColor.substring(1),16));const K=this._dashLength+this._dashGapSize,z=this._isVertical?q.height:q.width,Y=this._isVertical?q.width:q.height,Q=Math.max(Math.floor(z/K),this._dashLength<=z?1:0);let X=Math.floor(.5*(z-(K*Q-this._dashGapSize)));for(let Z=0;Zq||Q)&&(q=tt.right),(tt.leftz||Q)&&(z=tt.bottom),(tt.top{this.GameObject.transform instanceof Tt.X&&this.GameObject.transform.onRecalculatedBounds.remove(this.resizeToMatchRectTransform,this)}))}postCreate(){super.postCreate(),this.GameObject.transform instanceof Tt.X&&this.GameObject.transform.onRecalculatedBounds.add(this.resizeToMatchRectTransform,this)}createAndPlaceImages(){const q=this.GameObject.legacyTransform;let K,z;if(q)K=q.width/q.scaleX,z=q.height/q.scaleY;else if(this.GameObject.transform instanceof Tt.X){const q=this.GameObject.transform.rectTransformDimensions;K=q.width,z=q.height}else K=0,z=0,ht.V.log("Sliced Graphic is missing valid transform. Setting size to 0",ct.$.Error);this.center?(this._tiling&&!this.is9Slice()?this.imgCenter=this.createAndInitializeMesh(this.center):(this.imgCenter=this.createAndInitializeSprite(this.center),this.imgCenter.anchor.x=.5,this.imgCenter.anchor.y=.5),this.is9Slice()?this.create9Slice(K,z):this.is3Slice()?this.create3Slice(K,z):ht.V.log("Invalid SlicedGraphic arrangement was attempted.",ct.$.Error)):ht.V.log("SlicedGraphic has center undefined.",ct.$.Error),this.updateSmooth()}is9Slice(){return!!(this.topLeft&&this.topRight&&this.bottomLeft&&this.bottomRight)}is3Slice(){return!(this.topLeft||this.topRight||this.bottomLeft||this.bottomRight)}isHorizontal3Slice(){return!(!this.leftCenter||!this.rightCenter||this.topCenter||this.bottomCenter)}isVertical3Slice(){return!(!this.topCenter||!this.bottomCenter||this.leftCenter||this.rightCenter)}adjustImgCenterPositionWithOffset(q,K){this.imgCenter.position.x+=q,this.imgCenter.position.y+=K}createAndInitializeSprite(q){const K=new _t.Sprite(tt.W.instance.game.cache.getTexture(q.atlas,q.frame));return K.name=q.frame,this.setElementProperties(K,q),this.elementsGroup.addChild(K),K}createAndInitializeMesh(q){const K=tt.W.instance.game.cache.getTexture(this.center.atlas,this.center.frame),z=new _t.SimpleMesh(K,void 0,void 0,void 0,_t.DRAW_MODES.TRIANGLE_STRIP);return z.visible=!1,this.setElementProperties(z,q),this.elementsGroup.addChild(z),z}performTilingInOneDirection(q,K,z,Y){const Q=q===ns.e.Horizontal;z.visible=!1;const X=z.texture.frame,Z=Q?X.width:X.height,J=Q?X.height:X.width,tt=K/Z;if(tt>0){const K=tt%1>ko.EPSILON?tt%1:0,Q=K>0?Math.ceil(tt):Math.floor(tt),X=new Uint16Array(6*Q-2),et=new Float32Array(4*Q*2),it=new Float32Array(4*Q*2);let st=-1;for(let q=0;q<4*Q;q+=4)0!==q&&(X[++st]=q),X[++st]=q,X[++st]=q+1,X[++st]=q+2,X[++st]=q+3,q!==4*Q-4&&(X[++st]=q+3);let nt=Y;const at=Z;if(q===ns.e.Horizontal)for(let q=0;q<4*Q*2;q+=8)et[q]=nt,et[q+1]=0,it[q]=0,it[q+1]=0,et[q+4]=nt,et[q+5]=J,it[q+4]=0,it[q+5]=1,q===4*Q*2-8&&K>0?(et[q+2]=nt+Z*K,et[q+3]=0,it[q+2]=K,it[q+3]=0,et[q+6]=nt+Z*K,et[q+7]=J,it[q+6]=K,it[q+7]=1):(et[q+2]=nt+Z,et[q+3]=0,it[q+2]=1,it[q+3]=0,et[q+6]=nt+Z,et[q+7]=J,it[q+6]=1,it[q+7]=1),nt+=at;else for(let q=0;q<4*Q*2;q+=8)et[q]=0,et[q+1]=nt,it[q]=0,it[q+1]=0,et[q+2]=J,et[q+3]=nt,it[q+2]=1,it[q+3]=0,q===4*Q*2-8&&K>0?(et[q+4]=0,et[q+5]=nt+Z*K,it[q+4]=0,it[q+5]=K,et[q+6]=J,et[q+7]=nt+Z*K,it[q+6]=1,it[q+7]=K):(et[q+4]=0,et[q+5]=nt+Z,it[q+4]=0,it[q+5]=1,et[q+6]=J,et[q+7]=nt+Z,it[q+6]=1,it[q+7]=1),nt+=at;z.geometry.getIndex().update(X),z.verticesBuffer.update(et),z.uvBuffer.update(it),z.visible=!0}}create3Slice(q,K){this.isHorizontal3Slice()?(this.imgLeftCenter=this.createAndInitializeSprite(this.leftCenter),this.imgRightCenter=this.createAndInitializeSprite(this.rightCenter),this.resize3Slice(q,K)):this.isVertical3Slice()?(this.imgTopCenter=this.createAndInitializeSprite(this.topCenter),this.imgBottomCenter=this.createAndInitializeSprite(this.bottomCenter),this.resize3Slice(q,K)):ht.V.log("Invalid SlicedGraphic arrangement was attempted.",ct.$.Error)}resize3Slice(q,K){const z=this.imgCenter.texture.orig;if(this.isHorizontal3Slice()){const K=q-this.getHorizontalLength(this.imgLeftCenter,this.leftCenter)-this.getHorizontalLength(this.imgRightCenter,this.rightCenter);if(this._tiling&&this.imgCenter instanceof _t.SimpleMesh){this.performTilingInOneDirection(ns.e.Horizontal,K,this.imgCenter,this.getHorizontalLength(this.imgLeftCenter,this.leftCenter));const q=this.getHorizontalLength(this.imgLeftCenter,this.leftCenter)+.5*K,z=.5*this.imgCenter.texture.frame.height;this.imgLeftCenter.position.x=-.5*(K+this.getHorizontalLength(this.imgLeftCenter,this.leftCenter))+q,this.imgLeftCenter.position.y=z,this.imgRightCenter.position.x=.5*(K+this.getHorizontalLength(this.imgRightCenter,this.rightCenter))+q,this.imgRightCenter.position.y=z}else{this.imgCenter.width=K,this.imgCenter.height=z?z.height:this.imgCenter.texture.height;const q=this.getHorizontalLength(this.imgLeftCenter,this.leftCenter)+.5*this.imgCenter.width,Y=.5*this.imgCenter.height;this.adjustImgCenterPositionWithOffset(q,Y),this.imgLeftCenter.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgLeftCenter,this.leftCenter))+q,this.imgLeftCenter.position.y=Y,this.imgRightCenter.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgRightCenter,this.rightCenter))+q,this.imgRightCenter.position.y=Y}}else if(this.isVertical3Slice()){const q=K-this.getVerticalLength(this.imgTopCenter,this.topCenter)-this.getVerticalLength(this.imgBottomCenter,this.bottomCenter);if(this._tiling&&this.imgCenter instanceof _t.SimpleMesh){this.performTilingInOneDirection(ns.e.Vertical,q,this.imgCenter,this.getVerticalLength(this.imgTopCenter,this.topCenter));const K=.5*this.imgCenter.texture.frame.width,z=this.getVerticalLength(this.imgTopCenter,this.topCenter)+.5*this.imgCenter.height;this.imgTopCenter.position.x=K,this.imgTopCenter.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopCenter,this.topCenter))+z,this.imgBottomCenter.position.x=K,this.imgBottomCenter.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomCenter,this.bottomCenter))+z}else{this.imgCenter.width=z?z.width:this.imgCenter.texture.width,this.imgCenter.height=q;const K=.5*this.imgCenter.width,Y=this.getVerticalLength(this.imgTopCenter,this.topCenter)+.5*this.imgCenter.height;this.adjustImgCenterPositionWithOffset(K,Y),this.imgTopCenter.position.x=K,this.imgTopCenter.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopCenter,this.topCenter))+Y,this.imgBottomCenter.position.x=K,this.imgBottomCenter.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomCenter,this.bottomCenter))+Y}}}create9Slice(q,K){this.imgTopLeft=this.createAndInitializeSprite(this.topLeft),this.imgTopRight=this.createAndInitializeSprite(this.topRight),this.imgBottomLeft=this.createAndInitializeSprite(this.bottomLeft),this.imgBottomRight=this.createAndInitializeSprite(this.bottomRight),this.topCenter&&this.bottomCenter&&this.leftCenter&&this.rightCenter?(this.imgTopCenter=this.createAndInitializeSprite(this.topCenter),this.imgBottomCenter=this.createAndInitializeSprite(this.bottomCenter),this.imgLeftCenter=this.createAndInitializeSprite(this.leftCenter),this.imgRightCenter=this.createAndInitializeSprite(this.rightCenter),this.resize9Slice(q,K)):ht.V.log("SlicedGraphic has sides undefined.",ct.$.Error)}resize9Slice(q,K){this.imgCenter.width=q-this.getHorizontalLength(this.imgTopLeft,this.topLeft)-this.getHorizontalLength(this.imgTopRight,this.topRight),this.imgCenter.height=K-this.getVerticalLength(this.imgTopLeft,this.topLeft)-this.getVerticalLength(this.imgBottomLeft,this.bottomLeft);const z=this.getHorizontalLength(this.imgTopLeft,this.topLeft)+.5*this.imgCenter.width,Y=this.getVerticalLength(this.imgTopLeft,this.topLeft)+.5*this.imgCenter.height;this.adjustImgCenterPositionWithOffset(z,Y),this.imgTopLeft.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgTopLeft,this.topLeft))+z,this.imgTopLeft.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopLeft,this.topLeft))+Y,this.imgTopRight.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgTopRight,this.topRight))+z,this.imgTopRight.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopRight,this.topRight))+Y,this.imgBottomLeft.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgBottomLeft,this.bottomLeft))+z,this.imgBottomLeft.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomLeft,this.bottomLeft))+Y,this.imgBottomRight.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgBottomRight,this.bottomRight))+z,this.imgBottomRight.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomRight,this.bottomRight))+Y,this.topCenter&&this.bottomCenter&&this.leftCenter&&this.rightCenter?(this.imgTopCenter.position.x=z,this.imgTopCenter.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopCenter,this.topCenter))+Y,this.imgBottomCenter.position.x=z,this.imgBottomCenter.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomCenter,this.bottomCenter))+Y,this.imgLeftCenter.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgLeftCenter,this.leftCenter))+z,this.imgLeftCenter.position.y=Y,this.imgRightCenter.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgRightCenter,this.rightCenter))+z,this.imgRightCenter.position.y=Y,this.isOrientationChanged(this.topCenter)?this.imgTopCenter.height=this.imgCenter.width:this.imgTopCenter.width=this.imgCenter.width,this.isOrientationChanged(this.bottomCenter)?this.imgBottomCenter.height=this.imgCenter.width:this.imgBottomCenter.width=this.imgCenter.width,this.isOrientationChanged(this.leftCenter)?this.imgLeftCenter.width=this.imgCenter.height:this.imgLeftCenter.height=this.imgCenter.height,this.isOrientationChanged(this.rightCenter)?this.imgRightCenter.width=this.imgCenter.height:this.imgRightCenter.height=this.imgCenter.height):ht.V.log("SlicedGraphic has sides undefined.",ct.$.Error)}resizeToMatchRectTransform(){if(this.GameObject.transform instanceof Tt.X){const q=this.GameObject.transform.rectTransformDimensions,K=q.width,z=q.height;if(!this.isCenterValid())return;this.imgCenter.position.set(0,0),this.is9Slice()?this.resize9Slice(K,z):this.is3Slice()&&this.resize3Slice(K,z)}}resetImages(){this.elementsGroup&&(this.elementsGroup.removeChildren(),this.imgTopLeft=null,this.imgTopRight=null,this.imgBottomLeft=null,this.imgBottomRight=null,this.imgTopCenter=null,this.imgBottomCenter=null,this.imgLeftCenter=null,this.imgRightCenter=null,this.imgCenter=null,this.createAndPlaceImages())}applyScalingToTransform(q,K,z){z.position.set(-q.rectTransformDimensions.width*q.pivot.x,-q.rectTransformDimensions.height*q.pivot.y)}applyToMatrix(q,K){K.append(q)}getDimensions(){return this._elementGroupSize}createPixiTransformOverride(){const q=super.createPixiTransformOverride();return q.setCustomRectTransformScaling(this),q}getHorizontalLength(q,K){return this.isOrientationChanged(K)?Math.abs(q.height):Math.abs(q.width)}getVerticalLength(q,K){return this.isOrientationChanged(K)?Math.abs(q.width):Math.abs(q.height)}isOrientationChanged(q){const K=Math.abs(q.rotation);return K===Bo.R90||K===Bo.R270}setElementProperties(q,K){q instanceof _t.Sprite&&(q.anchor.x=.5,q.anchor.y=.5),ut.A.isDefined(K.rotation)&&(ut.A.isDefined(this.dividePIBy180)||(this.dividePIBy180=Math.PI/180),q.rotation=Number(K.rotation)*this.dividePIBy180),ut.A.isDefined(K.flipX)&&K.flipX&&(q.scale.x*=-1),ut.A.isDefined(K.flipY)&&K.flipY&&(q.scale.y*=-1)}isCenterValid(){return!(!this.imgCenter||this.imgCenter.destroyed)&&(!(this.imgCenter instanceof _t.Sprite&&!this.imgCenter.texture)&&!(this.imgCenter instanceof _t.SimpleMesh&&!this.imgCenter.shader))}destroy(){var q,K;null===(q=this.elementsGroup)||void 0===q||q.destroy(),null===(K=this.rootGroup)||void 0===K||K.destroy(),this.topLeft=null,this.topRight=null,this.bottomLeft=null,this.bottomRight=null,this.topCenter=null,this.bottomCenter=null,this.leftCenter=null,this.rightCenter=null,this.center=null,this.imgTopLeft=null,this.imgTopRight=null,this.imgBottomLeft=null,this.imgBottomRight=null,this.imgTopCenter=null,this.imgBottomCenter=null,this.imgLeftCenter=null,this.imgRightCenter=null,this.imgCenter=null,this.elementsGroup=null,super.destroy()}};Uo.EPSILON=.01,(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Uo.prototype,"_alpha",void 0),(0,X.Cg)([(0,et.B)("atlas"),(0,it.vC)(),(0,X.Sn)("design:type",Object)],Uo.prototype,"topLeft",void 0),(0,X.Cg)([(0,et.B)("atlas"),(0,it.vC)(),(0,X.Sn)("design:type",Object)],Uo.prototype,"topRight",void 0),(0,X.Cg)([(0,et.B)("atlas"),(0,it.vC)(),(0,X.Sn)("design:type",Object)],Uo.prototype,"bottomLeft",void 0),(0,X.Cg)([(0,et.B)("atlas"),(0,it.vC)(),(0,X.Sn)("design:type",Object)],Uo.prototype,"bottomRight",void 0),(0,X.Cg)([(0,et.B)("atlas"),(0,it.vC)(),(0,X.Sn)("design:type",Object)],Uo.prototype,"topCenter",void 0),(0,X.Cg)([(0,et.B)("atlas"),(0,it.vC)(),(0,X.Sn)("design:type",Object)],Uo.prototype,"bottomCenter",void 0),(0,X.Cg)([(0,et.B)("atlas"),(0,it.vC)(),(0,X.Sn)("design:type",Object)],Uo.prototype,"leftCenter",void 0),(0,X.Cg)([(0,et.B)("atlas"),(0,it.vC)(),(0,X.Sn)("design:type",Object)],Uo.prototype,"rightCenter",void 0),(0,X.Cg)([(0,et.B)("atlas"),(0,it.vC)(),(0,X.Sn)("design:type",Object)],Uo.prototype,"center",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],Uo.prototype,"_tiling",void 0),Uo=ko=(0,X.Cg)([(0,J.EV)("SlicedGraphic",J.YH.ui,"9-slice and 3-slice graphic component
")],Uo);z(51200),z(87987);var Fo=z(17607);z(44770);let Go=class extends Z.u{constructor(){super(...arguments),this.onTriggerEnter=new $t.H,this.onTriggerExit=new $t.H,this.onTriggerHold=new $t.H,this.isStatic=!0,this.tags=[],this.width=100,this.height=100,this._wasAddedToSystem=!1,this._cachedBounds=null}create(){super.create(),this.updateTrigger(),this.OnActiveChanged.add(this.updateTrigger,this),this.GameObject.onActiveInHierarchyChanged.add(this.updateTrigger,this)}destroy(){this.onTriggerEnter.dispose(),this.onTriggerExit.dispose(),this.onTriggerHold.dispose(),this.removeTriggerFromSystem(),this.OnActiveChanged.remove(this.updateTrigger,this),this.GameObject.onActiveInHierarchyChanged.remove(this.updateTrigger,this),super.destroy()}getBounds(){return this.isStatic&&null!==this._cachedBounds||this.updateCachedBounds(),this._cachedBounds}addTriggerToSystem(){this._wasAddedToSystem||(tt.W.instance.game.triggerSystem.addTrigger(this),this._wasAddedToSystem=!0)}removeTriggerFromSystem(){this._wasAddedToSystem&&(tt.W.instance.game.triggerSystem.removeTrigger(this),this._wasAddedToSystem=!1)}updateTrigger(){this.IsActiveInHierarchy?this.addTriggerToSystem():this.removeTriggerFromSystem()}updateCachedBounds(){const q=this.GameObject.transform,K=.5*this.width,z=.5*this.height,Y=q.worldMatrix.clone(),Q=q.worldScale;Y.scale(1/Q.x,1/Q.y);const X=Y.apply({x:-K,y:-z}),Z=Y.apply({x:K,y:z});this._cachedBounds||(this._cachedBounds={left:0,right:0,top:0,bottom:0}),this._cachedBounds.left=X.x,this._cachedBounds.top=X.y,this._cachedBounds.right=Z.x,this._cachedBounds.bottom=Z.y}};(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],Go.prototype,"onTriggerEnter",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],Go.prototype,"onTriggerExit",void 0),(0,X.Cg)([(0,it.bb)(),(0,X.Sn)("design:type",$t.H)],Go.prototype,"onTriggerHold",void 0),(0,X.Cg)([(0,it.vk)(),(0,X.Sn)("design:type",Boolean)],Go.prototype,"isStatic",void 0),(0,X.Cg)([(0,it.SZ)(),(0,it.W_)(),(0,X.Sn)("design:type",Array)],Go.prototype,"tags",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Go.prototype,"width",void 0),(0,X.Cg)([(0,it.g1)(),(0,X.Sn)("design:type",Number)],Go.prototype,"height",void 0),Go=(0,X.Cg)([(0,J.EV)("AABBTrigger",J.YH.physics)],Go);z(6686),z(80632),z(1788),z(15073)},18830:(q,K,z)=>{"use strict";z.d(K,{b:()=>bt});var Y=z(8674),Q=z(86787),X=z(40794),Z=z(29658),J=z(32469),tt=z(62481),et=z(26731),it=z(15887),st=z(74786),nt=z(140),at=z(56761),rt=z(5440);class ot extends et.${initialize(q,K){var z,Y;super.initialize(q,K);const Q=null===(z=K.getComponentData)||void 0===z?void 0:z.call(K,q);this._injections=Object.entries(null!==(Y=null==Q?void 0:Q.injections)&&void 0!==Y?Y:[]).map((([q,K])=>{var z;return{key:q,type:null!==(z=ot.VAR_TYPE_TO_PROPERTY_TYPE[typeof K])&&void 0!==z?z:J.b.JSON,value:K}}))}generate(q){return it.X.createVertical([nt.I.create({id:"installers",label:"Installers",arrayType:J.b.String,value:q.installers,isReorderable:!0}),nt.I.create({id:"injections-record",label:"Injections",arrayType:J.b.GenericObject,value:this._injections,insertElementCallbacks:new Map([[J.b.String,()=>({key:"newString",type:J.b.String,value:""})],[J.b.Number,()=>({key:"newNumber",type:J.b.Number,value:0})],[J.b.Boolean,()=>({key:"newBoolean",type:J.b.Boolean,value:!1})],[J.b.JSON,()=>({key:"newJSON",type:J.b.JSON,value:{}})]]),getElementInspector:ot.generateInjectionElementInspector,onChange:q=>{this._injections=q,this._editorAPI.modifyComponent(this._componentGuid,{injections:q.reduce(((q,K)=>{K.error=void 0;try{q[K.key]=K.type===J.b.JSON?ot.parseJson(K.value):K.value}catch(e){tt.R.logError(e,`Failed to parse JSON for key ${K.key}:`),K.error=e}return q}),{})})}})])}static generateInjectionElementInspector(q,K){var z;const Y=[];switch(Y.push(at.f.create({id:`injection-key-${K}`,labelValue:"Key",inputType:"text",inputValue:q.key,propertyPath:[`${K}`,"key"]})),Y.push(st._6.create({id:`injection-type-${K}`,selectOptions:ot.INJECTION_TYPE_OPTIONS,selectValue:q.type,propertyPath:[`${K}`,"type"]})),q.type){case J.b.String:Y.push(at.f.create({id:`injection-value-${K}`,labelValue:"Value",inputType:"text",inputValue:q.value,propertyPath:[`${K}`,"value"]}));break;case J.b.Number:Y.push(at.f.create({id:`injection-value-${K}`,labelValue:"Value",inputType:"number",inputValue:q.value,propertyPath:[`${K}`,"value"]}));break;case J.b.Boolean:Y.push(at.f.create({id:`injection-value-${K}`,labelValue:"Value",inputType:"checkbox",inputValue:q.value,propertyPath:[`${K}`,"value"]}));break;case J.b.JSON:Y.push(at.f.create({id:`injection-value-${K}`,labelValue:"Value",inputType:"text",inputValue:ot.stringifyJson(q.value),propertyPath:[`${K}`,"value"],inputUpdateMode:rt.JG.Confirm,style:{borderColor:q.error?"red":void 0}})),q.error&&Y.push(st.ly.create({id:`injection-error-${K}`,labelTextWrap:rt.K3.Wrap,labelValue:null!==(z=q.error.message)&&void 0!==z?z:q.error.toString(),style:{color:"red",textWrap:"pretty"}}))}return it.X.createVertical(Y)}static stringifyJson(q){return"string"==typeof q?q:JSON.stringify(q)}static parseJson(q){return"string"==typeof q?JSON.parse(q):q}}ot.INJECTION_TYPE_OPTIONS=[{label:J.b.String,value:J.b.String},{label:J.b.Number,value:J.b.Number},{label:J.b.Boolean,value:J.b.Boolean},{label:J.b.JSON,value:J.b.JSON}],ot.VAR_TYPE_TO_PROPERTY_TYPE={string:J.b.String,number:J.b.Number,boolean:J.b.Boolean};var ht,ct=z(36361),dt=z(823),lt=z(52751),ut=z(78178),ft=z(32154);let bt=ht=class extends X.u{constructor(){super(...arguments),this.container=new ct.r(null),this.installers=[],this.injections={}}get ParentContainer(){var q,K,z;return null!==(z=null===(K=null===(q=this.GameObject)||void 0===q?void 0:q.parent)||void 0===K?void 0:K.findComponentInParent(ht))&&void 0!==z?z:null}get Container(){return this.container}get Installers(){return this.installers}create(){super.create(),this.hasRunInstallers||this.runInstallers(),this.bindInjectedValues(this.injections),this.attachParentContainer(),this.gameObject.onHierarchyChanged.add(this.attachParentContainer,this)}runInstallers(){this.hasRunInstallers=!0;for(let q=0;q{"use strict";z.d(K,{s:()=>X});class Y{constructor(q){this.inversifyInterface=null,this.inversifyInterface=q}asSingleton(){this.inversifyInterface.inSingletonScope()}}var Q=z(36361);class X{constructor(q){this.inversifyBindingTo=null,this.inversifyBindingTo=q}to(q){return new Y(this.inversifyBindingTo.to(q))}toConstantValue(q){this.inversifyBindingTo.toConstantValue(q)}toDynamicValue(q){return new Y(this.inversifyBindingTo.toDynamicValue((K=>q(Q.r.wrapContainer(K.container)))))}}},36361:(q,K,z)=>{"use strict";z.d(K,{r:()=>Z});var Y=z(79687),Q=z(61806),X=z(3004);class Z{get sourceContainer(){return this._inversifyContainer}get parent(){return this._parentContainer}set parent(q){var K;this._parentContainer=q,this._inversifyContainer.parent=null!==(K=null==q?void 0:q._inversifyContainer)&&void 0!==K?K:null}constructor(q){var K,z;void 0===q&&(q=null!==(z=null===(K=Q.W.instance)||void 0===K?void 0:K.game.rootContainer)&&void 0!==z?z:null),this._inversifyContainer=new Y.Container,this.parent=q}bind(q){return new X.s(this._inversifyContainer.bind(q))}unbind(q){this.hasBinding(q,!1)&&this._inversifyContainer.unbind(q)}rebind(q){return this.unbind(q),this.bind(q)}get(q){return this.hasBinding(q)?this._inversifyContainer.get(q):null}hasBinding(q,K=!0){return K?this._inversifyContainer.isBound(q):this._inversifyContainer._bindingDictionary.hasKey(q)}resolve(q){return this._inversifyContainer.resolve(q)}unbindAll(){this._inversifyContainer.unbindAll()}static wrapContainer(q){const K=new Z;return K._inversifyContainer=q,K}}},21979:(q,K,z)=>{"use strict";z.d(K,{P:()=>rt});var Y,Q=z(8674),X=z(95891),Z=z.n(X),J=z(40794),tt=z(29658),et=z(563),it=z(5191),st=z(80267),nt=z(823),at=z(22494);let rt=Y=class extends J.u{constructor(){super(...arguments),this.autoUpdateLayout=!0,this.updateInactiveChildren=!1,this.roundPixels=!1,this._watchedChildren=[]}postCreate(){super.postCreate(),this.autoUpdateLayout?(this.gameObject.onChildAdded.add(this.watchChildren,this),this.gameObject.onChildRemoved.add(this.watchChildren,this),this.watchChildren()):this.updateAll(),this.gameObject.onDestroy.add(this.cleanUpListeners,this)}destroy(){this.cleanUpListeners(),super.destroy()}cleanUpListeners(){var q,K,z;this.gameObject.onChildAdded.removeAll(this),this.gameObject.onChildRemoved.removeAll(this);for(const Y of this.gameObject.children)null===(q=Y.onActiveChanged)||void 0===q||q.removeAll(this),null===(z=null===(K=Y.transform)||void 0===K?void 0:K.onDimensionsChanged)||void 0===z||z.removeAll(this)}getLayoutPositionX(q){return st.V.log("Layout#getLayoutPositionX should be overridden",it.$.Warning),0}getLayoutPositionY(q){return st.V.log("Layout#getLayoutPositionY should be overridden",it.$.Warning),0}getLayoutAnchorX(q){return st.V.log("Layout#getLayoutAnchorX should be overridden",it.$.Warning),0}getLayoutAnchorY(q){return st.V.log("Layout#getLayoutAnchorY should be overridden",it.$.Warning),0}updateAll(q=!0){const K=this.getGameObjectList();for(let z=0;z=K.length)return void st.V.log(`Layout#updateByIndex called with out of bounds index ${q}. There are ${K.length} active children`,it.$.Error);const z=K[q],Y=this.roundPixels?Math.round(this.getLayoutPositionX(q)):this.getLayoutPositionX(q),Q=this.roundPixels?Math.round(this.getLayoutPositionY(q)):this.getLayoutPositionY(q);if(z.legacyTransform){const K=z.legacyTransform;K.x=Y,K.y=Q,K.anchorX=this.getLayoutAnchorX(q),K.anchorY=this.getLayoutAnchorY(q),K.update()}else{const K=z.transform;K instanceof et.X?(K.setAnchoredPivotOffset(Y,Q),K.setPivot(this.getLayoutAnchorX(q),this.getLayoutAnchorY(q))):K.setPosition(Y,Q)}}isFilled(){return!1}getGameObjectList(){return this.GameObject.children.filter((q=>q.active||this.updateInactiveChildren))}watchChildren(){var q,K,z;const Y=[...this.gameObject.children],Q=Z().difference(this._watchedChildren,Y),X=Z().difference(Y,this._watchedChildren);for(const Z of Q)null===(q=Z.onActiveChanged)||void 0===q||q.removeAll(this),null===(z=null===(K=Z.transform)||void 0===K?void 0:K.onDimensionsChanged)||void 0===z||z.removeAll(this);for(const Z of X)Z.onActiveChanged.add(this.updateAll,this),Z.onComponentAdded.add(this.watchForChildTransform,this),this.watchForChildTransform(Z.transform);this._watchedChildren=Y,this.updateAll()}watchForChildTransform(q){q instanceof et.X&&q.onDimensionsChanged.add(this.updateAll,this)}};(0,Q.Cg)([(0,nt.vk)(),(0,at.x)("updateAll"),(0,Q.Sn)("design:type",Boolean)],rt.prototype,"autoUpdateLayout",void 0),(0,Q.Cg)([(0,nt.vk)(),(0,at.x)("updateAll"),(0,Q.Sn)("design:type",Boolean)],rt.prototype,"updateInactiveChildren",void 0),(0,Q.Cg)([(0,nt.vk)(),(0,at.x)("updateAll"),(0,Q.Sn)("design:type",Boolean)],rt.prototype,"roundPixels",void 0),rt=Y=(0,Q.Cg)([(0,tt.EV)("Layout (abstract)",void 0,"Layout component for UI")],rt)},5191:(q,K,z)=>{"use strict";var Y;z.d(K,{$:()=>Y}),function(q){q[q.Verbose=0]="Verbose",q[q.Info=1]="Info",q[q.Warning=2]="Warning",q[q.Error=3]="Error"}(Y||(Y={}))},80267:(q,K,z)=>{"use strict";z.d(K,{V:()=>Y});class Y{constructor(){}static addLogger(q){this._loggers.push(q)}static removeLogger(q){this._loggers=this._loggers.filter((K=>K!==q))}static log(q,K,...z){this._loggers.forEach((Y=>{Y.log(q,K,...z)}))}static table(q,K,z){this._loggers.forEach((Y=>{Y.table(q,K,z)}))}static setLogLevel(q){this._loggers.forEach((K=>{K.setLogLevel(q)}))}}Y._loggers=[]},2136:(q,K,z)=>{"use strict";z.d(K,{b:()=>X});var Y=z(8674),Q=z(12915);class X{constructNavMesh(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){try{if(!K||K.length<=0)return{regions:[],inverted:!1};let Y=Q.segments(K[0]);const X=K.length;for(let q=1;q{"use strict";z.d(K,{N:()=>Q});var Y=z(27179);class Q{constructor(q,K,z,Q){this.start=new Y.I(q,K),this.end=new Y.I(z,Q),this.left=Math.min(q,z),this.right=Math.max(q,z),this.top=Math.min(K,Q),this.bottom=Math.max(K,Q)}pointOnSegment(q,K){return q>=this.left&&q<=this.right&&K>=this.top&&K<=this.bottom&&this.pointOnLine(q,K)}pointOnLine(q,K){return Math.abs((q-this.left)*(this.bottom-this.top)-(this.right-this.left)*(K-this.top))=this.left-Q.EPSILON&&K.x<=this.right+Q.EPSILON&&K.y>=this.top-Q.EPSILON&&K.y<=this.bottom+Q.EPSILON?K:this.start.getDistanceSq(q.end){"use strict";z.d(K,{o:()=>Q});var Y=z(39002);class Q{get width(){return this._width}set width(q){this._width=q,this._halfWidth=.5*q}get height(){return this._height}set height(q){this._height=q,this._halfHeight=.5*q}getHalfWidth(){return this._halfWidth}getHalfHeight(){return this._halfHeight}constructor(q=0,K=0){this._width=0,this._halfWidth=0,this._height=0,this._halfHeight=0,this.width=q,this.height=K}isNearlyEqual(q,K){return this.isNearlyEqualToValues(q.width,q.height,K)}isNearlyEqualToValues(q,K,z){return Y.c.isNearlyEqual(this.width,q,z)&&Y.c.isNearlyEqual(this.height,K,z)}setTo(q,K){this.width=q,this.height=K}copyFrom(q){this.width=q.width,this.height=q.height}}Q.ZERO=new Q(0,0)},27179:(q,K,z)=>{"use strict";z.d(K,{I:()=>J});var Y=z(39002),Q=z(80267),X=z(5191),Z=z(32154);class J{static get ZERO(){return new J(0,0)}static get ONE(){return new J(1,1)}static get UP(){return new J(0,1)}static get DOWN(){return new J(0,-1)}static get RIGHT(){return new J(1,0)}static get LEFT(){return new J(-1,0)}get x(){return this._x}set x(q){this._x=q,this._recalculateMagnitudeSq=!0,this._recalculateMagnitude=!0}get y(){return this._y}set y(q){this._y=q,this._recalculateMagnitudeSq=!0,this._recalculateMagnitude=!0}getMagnitude(){return this.recalculateMagnitude(),this._magnitude}getMagnitudeSq(){return this.recalculateMagnitudeSq(),this._magnitudeSq}constructor(q=0,K=0){this._x=0,this._y=0,this._magnitude=0,this._magnitudeSq=0,this._recalculateMagnitude=!1,this._recalculateMagnitudeSq=!1,this.x=q,this.y=K}static fromPoint(q){return new J(q.x,q.y)}setTo(q,K){this.set(q,K)}set(q,K){this.x=q,this.y=K}setToPolar(q,K=1){this.set(Math.cos(q)*K,Math.sin(q)*K)}copyFrom(q){return this.set(q.x,q.y),this}copyTo(q){return q.set(this.x,this.y),q}equals(q){return this.isNearlyEqual(q)}isNearlyEqual(q,K){return this.isNearlyEqualToValues(q.x,q.y,K)}isNearlyEqualToValues(q,K,z){return Y.c.isNearlyEqual(this.x,q,z)&&Y.c.isNearlyEqual(this.y,K,z)}invert(){this.set(this._y,this._x)}perpendicular(q=!0){q?this.set(this._y,-this._x):this.set(-this._y,this._x)}normalRightHand(){this.set(-1*this._y,this._x)}floor(){this.set(Math.floor(this._x),Math.floor(this._y))}ceil(){this.set(Math.ceil(this._x),Math.ceil(this._y))}round(){this.set(Math.round(this._x),Math.round(this._y))}negate(){this.set(-this._x,-this._y)}add(q){this._x+=q.x,this._y+=q.y}subtract(q){this._x-=q.x,this._y-=q.y}multiply(q){this._x*=q.x,this._y*=q.y}divide(q){this._x/=q.x,this._y/=q.y}clamp(q,K,z){switch(z){case Y._.X:this._x=Y.c.clamp(this._x,q,K);break;case Y._.Y:this._y=Y.c.clamp(this._y,q,K);break;default:this._x=Y.c.clamp(this._x,q,K),this._y=Y.c.clamp(this._y,q,K)}}clip(q){const K=q.left,z=q.top,Y=q.right,Q=q.bottom;this._xY&&(this._x=Y),this._yQ&&(this._y=Q)}rotate(q,K,z=null){if(Z.A.isDefined(z)){const Y=K+Math.atan2(this._y-q.y,this._x-q.x);this._x=q.x+z*Math.cos(Y),this._y=q.y+z*Math.sin(Y)}else{this.subtract(q);const z=Math.sin(K),Y=Math.cos(K);this._x=Y*this._x-z*this._y+q.x,this._y=z*this._x+Y*this._y+q.y}}normalize(){const q=this.getMagnitude();q>0&&(this._x/=q,this._y/=q,this._magnitude=1,this._magnitudeSq=1,this._recalculateMagnitude=!1,this._recalculateMagnitudeSq=!1)}interpolate(q,K){this.set(this._x+(q.x-this._x)*K,this._y+(q.y-this._y)*K)}project(q,K=!1){const z=this.dot(q)/(K?1:q.getMagnitudeSq());0!==z&&this.set(z*q.x,z*q.y)}trunc(){this.set(~~this._x,~~this._y)}isZero(){return this.isNearlyEqual(J.ZERO)}angle(q){return Math.atan2(q.y-this._y,q.x-this._x)}dot(q){return this._x*q.x+this._y*q.y}cross(q){return this._x*q.y-this._y*q.x}getDistanceSq(q){return Math.pow(this.x-q.x,2)+Math.pow(this.y-q.y,2)}getDistance(q){return Math.sqrt(this.getDistanceSq(q))}toString(){return`[{Vector }]`}print(q=X.$.Info){Q.V.log(this.toString(),q)}recalculateMagnitudeSq(){this._recalculateMagnitudeSq&&(this._magnitudeSq=Math.pow(this._x,2)+Math.pow(this._y,2),this._recalculateMagnitudeSq=!1)}recalculateMagnitude(){this.recalculateMagnitudeSq(),this._recalculateMagnitude&&(this._magnitude=Math.sqrt(this._magnitudeSq),this._recalculateMagnitude=!1)}}},40008:(q,K,z)=>{"use strict";z.d(K,{E1:()=>X,or:()=>Z.o,I9:()=>Q.I});var Y=z(39002),Q=z(27179);class X{get tx(){return this._translation.x}set tx(q){this._translation.x=q}get ty(){return this._translation.y}set ty(q){this._translation.y=q}get translation(){return this._translation}constructor(q=1,K=0,z=0,Y=1,X=0,Z=0){this.a=0,this.b=0,this.c=0,this.d=0,this._translation=new Q.I,this.setTo(q,K,z,Y,X,Z)}setTo(q,K,z,Y,Q,X){this.a=q,this.b=K,this.c=z,this.d=Y,this.tx=Q,this.ty=X}setToIdentity(){this.setTo(1,0,0,1,0,0)}isIdentityMatrix(){return 1===this.a&&0===this.b&&0===this.tx&&0===this.c&&1===this.d&&0===this.ty}isTranslateOnly(){return 1===this.a&&0===this.b&&0===this.c&&1===this.d}translate(q,K){this.tx+=q,this.ty+=K}rotate(q){const K=Math.sin(Y.c.degreesToRadians(q)),z=Math.cos(Y.c.degreesToRadians(q)),Q=this.a,X=this.b,Z=this.tx;this.a=Q*z-this.c*K,this.b=X*z-this.d*K,this.c=Q*K+this.c*z,this.d=X*K+this.d*z,this.tx=Z*z-this.ty*K,this.ty=Z*K+this.ty*z}scale(q,K=q){this.a*=q,this.b*=q,this.c*=K,this.d*=K,this.tx*=q,this.ty*=K}multiply(q){X.multiply(this,q,this)}premultiply(q){X.multiply(q,this,this)}isEqual(q,K){return Y.c.isNearlyEqual(this.a,q.a,K)&&Y.c.isNearlyEqual(this.b,q.b,K)&&Y.c.isNearlyEqual(this.c,q.c,K)&&Y.c.isNearlyEqual(this.d,q.d,K)&&Y.c.isNearlyEqual(this.tx,q.tx,K)&&Y.c.isNearlyEqual(this.ty,q.ty,K)}clone(q){this.a=q.a,this.b=q.b,this.c=q.c,this.d=q.d,this.tx=q.tx,this.ty=q.ty}transformVector(q){q.set(this.a*q.x+this.b*q.y+this.tx,this.c*q.x+this.d*q.y+this.ty)}transformXY(q,K){const z=new Q.I(q,K);return this.transformVector(z),z}createTransformedVector(q){const K=new Q.I(q.x,q.y);return this.transformVector(K),K}inverseTransformVector(q){const K=1/(this.a*this.d-this.b*this.c);q.set(this.d*K*q.x+-this.b*K*q.y+(this.ty*this.b-this.tx*this.d)*K,this.a*K*q.y+-this.c*K*q.x+(-this.ty*this.a+this.tx*this.c)*K)}createInverseTransformedVector(q){const K=new Q.I(q.x,q.y);return this.inverseTransformVector(K),K}inverseTransformXY(q,K){const z=new Q.I(q,K);return this.inverseTransformVector(z),z}fromArray(q){this.setTo(q[0],q[3],q[1],q[4],q[2],q[5])}toArray(q=!1,K=new Float32Array(9)){return q?(K[0]=this.a,K[1]=this.b,K[2]=0,K[3]=this.c,K[4]=this.d,K[5]=0,K[6]=this.tx,K[7]=this.ty,K[8]=1):(K[0]=this.a,K[1]=this.c,K[2]=this.tx,K[3]=this.b,K[4]=this.d,K[5]=this.ty,K[6]=0,K[7]=0,K[8]=1),K}static makeScale(q,K=q){return new X(q,0,0,K,0,0)}static makeTranslation(q,K){return new X(1,0,0,1,q,K)}static makeRotation(q){const K=Math.cos(Y.c.degreesToRadians(q)),z=Math.sin(Y.c.degreesToRadians(q));return new X(K,-z,z,K,0,0)}static multiply(q,K,z=new X){return z.setTo(q.a*K.a+q.b*K.c,q.a*K.b+q.b*K.d,q.c*K.a+q.d*K.c,q.c*K.b+q.d*K.d,q.a*K.tx+q.b*K.ty+q.tx,q.c*K.tx+q.d*K.ty+q.ty),z}}X.IDENTITY=new X(1,0,0,1,0,0);z(51088);var Z=z(64527)},55787:(q,K,z)=>{"use strict";z.d(K,{q:()=>Z});var Y=z(3431),Q=z(51088),X=z(27179);class Z{constructor(q){this.nodes=q,this.init()}neighbors(q){return q.neighbours}navHeuristic(q,K){return q.entryPoint.getDistance(Z.targetPoint)}static getCost(q,K){const z=q.entryPoint,Y=Z.targetPoint,J=q.portals.find(((z,Y)=>q.neighbours[Y].id===K.id));return K.entryPoint=X.I.fromPoint(J.closestIntersection(new Q.N(z.x,z.y,Y.x,Y.y))),z.getDistance(K.entryPoint)}destroy(){this.cleanDirty(),this.nodes=[]}init(){}cleanDirty(){}markDirty(){}}Z.prototype.init=Y.Graph.prototype.init,Z.prototype.cleanDirty=Y.Graph.prototype.cleanDirty,Z.prototype.markDirty=Y.Graph.prototype.markDirty},94341:(q,K,z)=>{"use strict";z.d(K,{L:()=>nt});var Y=z(3431),Q=z(39002),X=z(51088);class Z{constructor(q,K=!0){this.points=q,this.edges=[];for(let z=1;z0)){K.push(Y),z=Y,X=Z,Y=z,Q=z,Z=X,J=X,it=X;continue}Q=st,J=it}if(tt.triArea2(z,Y,et)>=0){if(!(z.isNearlyEqual(Y)||tt.triArea2(z,Q,et)<0)){K.push(Q),z=Q,X=J,Y=z,Q=z,Z=X,J=X,it=X;continue}Y=et,Z=it}}return 0!==K.length&&K[K.length-1].isNearlyEqual(q[q.length-1].left)||K.push(q[q.length-1].left),K}}var it=z(55787),st=z(87945);class nt{constructor(q,K=0,z=0){this._meshShrinkAmount=K,this._fromPolySearchRadius=z;const Y=q.map((q=>{const K=q.map((q=>({x:q.x,y:q.y})));return new Z(K)}));this._navPolygons=Y.map(((q,K)=>new st.q(K,q))),this._nextId=this._navPolygons.length,this.calculateAllNeighbours(),this._graph=new it.q(this._navPolygons)}getPolygons(){return this._navPolygons}addPolygon(q){const K=new st.q(this._nextId++,new Z(q));return this._navPolygons.push(K),this.calculatePolyNeighbours(K),K.id}removePolygon(q){for(let K=0;K0)for(const Y of this._navPolygons)if(Q=Y.boundingRadius+rt,z=Y.centroid.getDistance(nt),z<=Q){const{distance:q}=this.projectPointToPolygon(nt,Y);q<=rt&&q0)for(const Y of this._navPolygons)if(Q=Y.boundingRadius+this._meshShrinkAmount,z=Y.centroid.getDistance(at),z<=Q){const{distance:q}=this.projectPointToPolygon(at,Y);q<=this._meshShrinkAmount&&q0===K||!q.isNearlyEqual(ct[K-1])))}calculateAllNeighbours(){for(let q=0;qq.boundingRadius+K.boundingRadius))for(const z of q.polygon.edges)for(const Y of K.polygon.edges){if(!tt.areCollinear(z,Y))continue;const Q=this.getSegmentOverlap(z,Y);if(!Q)continue;q.neighbours.push(K),K.neighbours.push(q);const[Z,J]=Q;let et=q.centroid.angle(z.start),it=q.centroid.angle(Q[0]),st=q.centroid.angle(Q[1]),nt=tt.angleDifference(et,it),at=tt.angleDifference(et,st);ntq.point.xK.point.x?1:q.point.yK.point.y?1:0));const Y=z[0].line===z[1].line,Q=z[1].point.isNearlyEqual(z[2].point);return Y||Q?null:[z[1].point,z[2].point]}projectPointToPolygon(q,K){let z=null,Y=Number.MAX_VALUE;for(const Q of K.polygon.edges){const K=this.projectPointToEdge(q,Q),X=q.getDistance(K);(null===z||X{"use strict";z.d(K,{q:()=>X});var Y=z(27179),Q=z(55787);class X{constructor(q,K){this.id=q,this.polygon=K,this.neighbours=[],this.portals=[],this.centroid=this.calculateCentroid(),this.boundingRadius=this.calculateRadius(),this.weight=1}getPoints(){return this.polygon.points}contains(q){return this.polygon.contains(q.x,q.y)||this.isPointOnEdge(q)}calculateCentroid(){const q=new Y.I(0,0),K=this.polygon.points.length;return this.polygon.points.forEach((K=>{q.add(K)})),q.x/=K,q.y/=K,q}calculateRadius(){let q=0;for(const K of this.polygon.points){const z=Math.sqrt(this.centroid.getDistanceSq(K));z>q&&(q=z)}return q}isPointOnEdge({x:q,y:K}){for(const z of this.polygon.edges)if(z.pointOnSegment(q,K))return!0;return!1}destroy(){this.neighbours=[],this.portals=[]}toString(){return`NavPoly(id: ${this.id} at: ${this.centroid})`}isWall(){return 0===this.weight}centroidDistance(q){return Math.sqrt(this.centroid.getDistanceSq(q.centroid))}getCost(q){return Q.q.getCost(q,this)}}},41444:(q,K,z)=>{"use strict";z.d(K,{B:()=>X,ih:()=>Q});const Y="custom:annotations:assetTagProperties";class Q{static getAssetProperties(q){return Reflect.getMetadata(Y,q.constructor)}static addAssetMetadata(q,K,z){const X=new Map(Q.getAssetProperties(q));X.set(K,z),Reflect.defineMetadata(Y,X,q.constructor)}}const X=q=>(K,z)=>{Q.addAssetMetadata(K,z,q)}},87661:(q,K,z)=>{"use strict";var Y;z.d(K,{Z:()=>Y}),function(q){q.Image="image",q.Font="font",q.Spine="spine",q.Json="json",q.Csv="csv",q.Prefab="prefab",q.SingleImage="singleImage",q.Atlas="atlas",q.Audio="audio",q.Sfx="sfx",q.Bgm="bgm",q.TiledMap="tiledMap",q.Tileset="tileset",q.StreamedMap="streamedMap",q.StreamedMapEla="streamedMapEla"}(Y||(Y={}))},84097:(q,K,z)=>{"use strict";var Y;z.d(K,{r:()=>Y}),function(q){q[q.Save=0]="Save",q[q.Load=1]="Load"}(Y||(Y={}))},32469:(q,K,z)=>{"use strict";var Y;z.d(K,{b:()=>Y}),function(q){q.String="string",q.Number="number",q.JSON="json",q.JSONFile="jsonFile",q.Boolean="boolean",q.Color="color",q.Vector="vector",q.Size="size",q.ComponentReference="componentReference",q.GameObjectReference="gameObjectReference",q.SceneObjectReference="sceneObjectReference",q.PrefabConstructable="prefabConstructable",q.Signal="signal",q.EditorAssetReference="editorAssetReference",q.Enum="enum",q.Unknown="unknown",q.UnknownObject="unknownObject",q.GenericObject="GenericObject"}(Y||(Y={}))},823:(q,K,z)=>{"use strict";z.d(K,{E8:()=>At,ER:()=>vt,Lr:()=>nt,Mn:()=>_t,Om:()=>gt,SZ:()=>mt,UW:()=>Z,VF:()=>Et,W_:()=>ht,YL:()=>it,_H:()=>bt,bb:()=>Tt,dY:()=>et,e6:()=>Ct,fY:()=>J,g1:()=>ct,g8:()=>wt,gf:()=>St,i0:()=>Ot,iE:()=>ft,lu:()=>at,nK:()=>st,np:()=>yt,oB:()=>pt,ok:()=>rt,tW:()=>ut,tf:()=>ot,vC:()=>lt,vk:()=>dt});var Y=z(47131),Q=z(22494),X=z(32469);const Z="custom:annotations:serializableProperties",J="custom:annotations:propertyInfo";function tt(q,K){if(Reflect.hasOwnMetadata(J,q.constructor,K))return Reflect.getOwnMetadata(J,q.constructor,K);{Q.Q.addProperty(Z,q.constructor,K);const z={property:K,type:X.b.Unknown,isArray:!1,isRecord:!1,isReorderableList:!1};return Reflect.defineMetadata(J,z,q.constructor,K),z}}class et{static addTypeMetadata(q,K,z,Y){const Q=tt(q,K);if(Q.type=z,!Q.alias){let q=K;"_"===K[0]&&(q=K.substr(1),Q.alias=q)}return Q.priority||(Q.priority=0),Object.assign(Q,Y),Q}static addMetadata(q,K,z){const Y=tt(q,K);return Object.assign(Y,z),Y}static setTypeMetadataIsRecord(q,K,z){const Y=tt(q,K);return Y.isRecord=z,Y}}const it=q=>It(((K,z)=>{et.addMetadata(K,z,{toolTip:q})})),st=q=>(K,z)=>{et.addMetadata(K,z,{alias:q})},nt=q=>(K,z)=>{et.addMetadata(K,z,{priority:q})},at=q=>It(((K,z)=>{et.addMetadata(K,z,{inputUpdateMode:q})})),rt=q=>It(((K,z)=>{et.addMetadata(K,z,{renderIf:q})})),ot=q=>(K,z)=>{var Y,Q;const X=null!==(Q=null===(Y=Reflect.getOwnMetadata(J,K.constructor,z))||void 0===Y?void 0:Y.validateFunctions)&&void 0!==Q?Q:[];X.push(q),et.addMetadata(K,z,{validateFunctions:X})},ht=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.String,q)},ct=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.Number,q)},dt=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.Boolean,q)},lt=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.JSON,q)},ut=(q,K)=>(z,Y)=>{et.addTypeMetadata(z,Y,X.b.JSONFile,K).assetExtension=q||"json"},ft=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.Color,q)},bt=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.Vector,q)},pt=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.Size,q)},vt=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.GameObjectReference,q)},gt=()=>(q,K)=>{et.setTypeMetadataIsRecord(q,K,!0)},mt=(q=!0,K)=>(z,Y)=>{const Q=tt(z,Y);Q.insertElementCallbacks=K,q?Q.isReorderableList=!0:Q.isArray=!0},yt=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.GenericObject,q)},_t=(q,K)=>(z,Y)=>{const Q=et.addTypeMetadata(z,Y,X.b.ComponentReference,K);"string"!=typeof q?Q.componentCtor=q:Q.typeName=q},Et=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.ComponentReference,q).componentCtor=Y.d},wt=(q,K)=>(z,Y)=>{et.addTypeMetadata(z,Y,X.b.SceneObjectReference,K).componentCtor=q},Tt=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.Signal,q)},St=(q,K)=>(z,Y)=>{et.addTypeMetadata(z,Y,X.b.Enum,K).referenceType=q},At=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.UnknownObject,q)},Ct=(q,K)=>(z,Y)=>{et.addTypeMetadata(z,Y,X.b.PrefabConstructable,K).categoryFilter=q},Ot=q=>(K,z)=>{et.addTypeMetadata(K,z,X.b.EditorAssetReference).assetType=q},It=q=>()=>{}},6e4:(q,K,z)=>{"use strict";z.d(K,{Pq:()=>J,QW:()=>Z});var Y=z(22494);const Q="custom:annotations:RequireComponentTagProperties",X="custom:annotations:requireComponentInfo";class Z{static getProperties(q){return Reflect.getMetadata(Q,q.constructor)||[]}static getPropertyInfo(q,K){return Reflect.getMetadata(X,q.constructor,K)}static addMetadata(q,K){Y.Q.addProperty(Q,q.constructor,K)}}const J=q=>(K,z)=>{Z.addMetadata(K,z);const Y={ctor:q};Reflect.defineMetadata(X,Y,K.constructor,z)}},80473:(q,K,z)=>{"use strict";z.d(K,{Z$:()=>Y.Z,bJ:()=>Q.b,Lk:()=>Z,nK:()=>X.nK,i0:()=>X.i0,lu:()=>X.lu,Lr:()=>X.Lr,ok:()=>X.ok,Pq:()=>J.Pq,SZ:()=>X.SZ,vk:()=>X.vk,iE:()=>X.iE,Mn:()=>X.Mn,gf:()=>X.gf,ER:()=>X.ER,np:()=>X.np,vC:()=>X.vC,tW:()=>X.tW,Mt:()=>it,g1:()=>X.g1,Om:()=>X.Om,g8:()=>X.g8,bb:()=>X.bb,W_:()=>X.W_,_H:()=>X._H,YL:()=>X.YL,tf:()=>X.tf});var Y=z(87661),Q=(z(84097),z(32469)),X=z(823);class Z{static nonEmptyString(){return q=>{if(!(null==q?void 0:q.trim()))return"This field cannot be empty."}}static integer(){return q=>{if(!Number.isInteger(q))return"This field must be a whole number."}}static greaterThan(q){return K=>{if(K<=q)return`This field must be greater than ${q}.`}}static lessThan(q){return K=>{if(K>=q)return`This field must be less than ${q}.`}}static range(q,K){return z=>{if(zK)return`This field must be between ${q} and ${K}.`}}}var J=z(6e4),tt=z(22494);const et="custom:annotations:UIDTagProperties";const it=()=>(q,K)=>{X.dY.addTypeMetadata(q,K,Q.b.Number),class{static getUIDProperties(q){return Reflect.getMetadata(et,q.constructor)}static addUIDMetadata(q,K){tt.Q.addProperty(et,q.constructor,K)}}.addUIDMetadata(q,K)}},51200:(q,K,z)=>{"use strict";z.d(K,{k:()=>J});var Y=z(68910),Q=z(563),X=z(64527);class Z{applyScalingToTransform(q,K,z){const Y=q.rectTransformDimensions,Q=Y.width/K.width,X=Y.height/K.height,Z=-K.width*q.pivot.x*Q,J=-K.height*q.pivot.y*X;z.scale.set(Q,X),z.position.set(Z,J)}applyToMatrix(q,K){K.append(q)}}class J extends Y.Transform{constructor(q,K,z){super(),this._rectTransformScalingTransform=new Y.Transform,this._previousRectTransformDimensions=new X.o,this._previousContainerDimensions=new X.o,this._rectTransformScaling=new Z,this._applyRectTransformScaling=!1,this._transformIDs={0:0,1:0,2:0},this._attachedTransform=q,this._targetRenderable=K,this._getDimensionsFunc=z,this._applyRectTransformScaling=q instanceof Q.X,this._worldID=K.getRootContainer().transform._worldID+1}updateLocalTransform(){if(!this._targetRenderable||!this._attachedTransform)return;const q=this._attachedTransform.pixiTransform,K=q._localID;K!==this._localID&&(this.localTransform.copyFrom(q.localTransform),this.position.copyFrom(q.position),this.scale.copyFrom(q.scale),this.rotation=q.rotation,this._localID=K)}updateTransform(){var q,K,z;if(!this._targetRenderable||!this._attachedTransform)return;if(this._applyRectTransformScaling){const q=this._attachedTransform,K=q.rectTransformDimensions,z=this._getDimensionsFunc(),Y=!this._previousRectTransformDimensions.isNearlyEqual(K);Y&&(this._transformIDs[2]=1),!Y&&this._previousContainerDimensions.isNearlyEqual(z)||(this._rectTransformScaling.applyScalingToTransform(q,z,this._rectTransformScalingTransform),this._rectTransformScalingTransform.updateLocalTransform(),this._previousContainerDimensions.copyFrom(z),this._previousRectTransformDimensions.copyFrom(K),this._transformIDs[2]=1)}const Q=this.hasCustomParent(),X=null!==(z=null===(K=null===(q=this._targetRenderable.getRootContainer())||void 0===q?void 0:q.parent)||void 0===K?void 0:K.transform)&&void 0!==z?z:Y.Transform.IDENTITY,Z=this._attachedTransform.pixiTransform,J=Q?X._worldID:Z._parentID,tt=Q?X._worldID:Z._worldID,et=this._rectTransformScalingTransform._localID;J===this._parentID&&tt===this._transformIDs[0]&&et===this._transformIDs[1]&&1!==this._transformIDs[2]||(Q?this.worldTransform.copyFrom(X.worldTransform):(this.worldTransform.copyFrom(Z.worldTransform),this._applyRectTransformScaling&&this._rectTransformScaling.applyToMatrix(this._rectTransformScalingTransform.localTransform,this.worldTransform)),this._worldID++,this._parentID=J,this._transformIDs[0]=tt,this._transformIDs[1]=et,this._transformIDs[2]=0)}setCustomRectTransformScaling(q){this._rectTransformScaling=q}hasCustomParent(){var q;return!!this._targetRenderable&&(null===(q=this._targetRenderable.getRootContainer())||void 0===q?void 0:q.parent)!==this._targetRenderable.getParentContainer()}destroy(){this._getDimensionsFunc=null,this._targetRenderable=null,this._attachedTransform=null,this._rectTransformScalingTransform=null}}},4697:(q,K,z)=>{"use strict";z.d(K,{y:()=>ft});var Y,Q=z(8674),X=z(68910),Z=z(40794),J=z(29658),tt=z(15740),et=z(44716),it=z(43501),st=z(47131),nt=z(80267),at=z(5191),rt=z(64527),ot=z(27179),ht=z(823),ct=z(52751),dt=z(32154),lt=z(71082),ut=z(51200);let ft=Y=class extends Z.u{constructor(){super(...arguments),this.onRootContainerParentRemoved=new tt.H,this.onRootContainerParentSet=new tt.H,this.onRootContainerSet=new tt.H,this._filter=null,this._isCullable=!1,this._rootContainer=null,this._parentRenderComponent=null,this._overrideTransform=null,this._onCreateAction=new tt.H}get isCullable(){return this._isCullable}set isCullable(q){this._isCullable=q,this.cullContainer(q)}get smooth(){return this._smooth}set smooth(q){this._smooth=q,this.updateSmooth()}create(){super.create(),this._onCreateAction.dispatch()}destroy(){this.clearParentRenderComponent(),this.clearListeners(),this._onCreateAction.dispose(),this.onRootContainerSet.dispose(),this.onRootContainerParentRemoved.dispose(),this.onRootContainerParentSet.dispose(),this.clearRootContainer(),this._overrideTransform&&this._overrideTransform.destroy(),this._previousTransform=null,this._overrideTransform=null,super.destroy()}onEnable(){super.onEnable(),this.updateVisibility()}onDisable(){super.onDisable(),this.updateVisibility()}getRootContainer(){return this._rootContainer}getDimensions(){return nt.V.log(`Render component getDimensions not overridden in '${this.constructor.name}'. This is likely a mistake.`,at.$.Warning),rt.o.ZERO}getCenterOffset(){return ot.I.ZERO}getParentContainer(){var q;const K=null===(q=this._parentRenderComponent)||void 0===q?void 0:q.getRootContainer();return K&&this._parentRenderComponent.GameObject.layer===this.GameObject.layer?K:this.GameObject?ct.w.getActiveScene().getLayer(this.GameObject.layer):null}setUpDisplayObject(q){this.setFilter(q),this.setRootContainer(q)}setFilter(q){this._filter?q.filters=[this._filter.createFilter()]:q.filters=null}setRootContainer(q){this.isCreated?this._rootContainer?nt.V.log("Root container can only be set once",at.$.Warning):q?(this._rootContainer=q,this.overrideRootContainerRender(),this.cullContainer(this._isCullable),this.updateVisibility(),this.GameObject.onActiveInHierarchyChanged.add(this.updateVisibility,this),this.GameObject.onHierarchyChanged.add(this.gameObjectHierarchyChanged,this),this.onRootContainerSet.dispatch(),this.attachRootContainer(),this.updateSmooth()):nt.V.log("Root container must be a valid value",at.$.Warning):this._onCreateAction.addOnce(this.setRootContainer,this,void 0,q)}cullContainer(q){this._rootContainer&&(this._rootContainer.cullable=q)}overrideRootContainerRender(){this._originalRootContainerRender||(this._originalRootContainerRender=this._rootContainer.render.bind(this._rootContainer),this._rootContainer.render=q=>{var K;this.canRootContainerRender()&&(this._rootContainer.cullable&&(this._rootContainer._mask||(null===(K=this._rootContainer.filters)||void 0===K?void 0:K.length))&&!this.doesRootContainerIntersectWithRenderer(q)||this._originalRootContainerRender(q))})}resetRootContainerRender(){this._rootContainer&&this._originalRootContainerRender&&(this._rootContainer.render=this._originalRootContainerRender),this._originalRootContainerRender=void 0}canRootContainerRender(){var q,K;if(!lt.C.canContainerRender(this._rootContainer))return!1;const z=null!==(K=null===(q=this._overrideTransform)||void 0===q?void 0:q.worldTransform)&&void 0!==K?K:X.Matrix.IDENTITY;return!(0===z.a||0===z.d)}doesRootContainerIntersectWithRenderer(q){const K=q.renderTexture.sourceFrame;if(!(K.width>0&&K.height>0))return!1;let z,Y;this._rootContainer.cullArea?(z=this._rootContainer.cullArea,Y=this._rootContainer.worldTransform):z=this._rootContainer.getBounds(!0);const Q=q.projection.transform;return Q&&(Y?Y.prepend(Q):Y=Q),z&&K.intersects(z,Y)}getOverriddenTransform(){return this._overrideTransform}createPixiTransformOverride(){return new ut.k(this.GameObject.transform,this,(()=>this.getDimensions()))}attachRootContainer(){if(this.GameObject.legacyTransform)this.addRootContainerToContainerObject(this.GameObject.legacyTransform.group),this.GameObject.legacyTransform.OnDestroy.add(this.onLegacyTransformDestroyed,this);else{this.GameObject.transform?this.overridePIXIUpdateFunction():this.GameObject.onComponentAdded.add(this.trackTransformAddingToOverride,this),this.GameObject.onComponentAddedToHierarchy.add(this.componentAddedToHierarchy,this);const q=this.GameObject.findComponentInParent(Y,!1);q?(this._parentRenderComponent=q,this._parentRenderComponent.OnDestroy.add(this.onParentRenderComponentDestroyed,this),q.getRootContainer()?(this._parentRenderComponent.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this),this.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this)):(q.onRootContainerSet.add(this.onRenderComponentContainerWasSet,this),this.GameObject.onLayerChanged.add(this.attachRootToCurrentLayer,this)),this.attachRootToRenderComponentParent()):(this.attachRootToCurrentLayer(),this.GameObject.onLayerChanged.add(this.attachRootToCurrentLayer,this))}}gameObjectHierarchyChanged(){this.clearParentRenderComponent(),this.GameObject.onLayerChanged.remove(this.attachRootToCurrentLayer,this),this.attachRootContainer()}componentAddedToHierarchy(q,K){if(K instanceof Y)if(null===this._parentRenderComponent)this.attachRootContainer();else{const q=this.GameObject.findComponentInParent(Y,!1);this._parentRenderComponent!==q&&(this.clearParentRenderComponent(),this.attachRootContainer())}}clearParentRenderComponent(){var q,K;this._parentRenderComponent&&(this._parentRenderComponent.onRootContainerSet.removeAll(this),null===(q=this._parentRenderComponent.GameObject)||void 0===q||q.onLayerChanged.removeAll(this),this._parentRenderComponent.OnDestroy.removeAll(this),this.GameObject.onLayerChanged.removeAll(this),this.onRootContainerParentRemoved.dispatch(),null===(K=this._parentRenderComponent.getRootContainer())||void 0===K||K.removeChild(this._rootContainer),this._parentRenderComponent=null)}attachRootToRenderComponentParent(){var q;const K=null===(q=this._parentRenderComponent)||void 0===q?void 0:q.getRootContainer(),z=this.getParentContainer();if(z===K&&z.children.length>0){const q=this.findChildIndex(),K=z.children.indexOf(this._rootContainer);-1!==K&&K===q||z.addChildAt(this._rootContainer,q)}else this.addRootContainerToContainerObject(z);this.onRootContainerParentSet.dispatch()}findChildIndex(){const q=this.buildRenderComponentOrder(this._parentRenderComponent.GameObject),K=q.indexOf(this),z=this._parentRenderComponent._rootContainer.children,Y=q.length;for(let Q=K;Q-1)return K}return z.length}buildRenderComponentOrder(q){const K=[],z=q.children.length;for(let Q=0;Q0?X:this.buildRenderComponentOrder(z))}return K}attachRootToCurrentLayer(){if(this.gameObject.isMarkedForDestruction||this.gameObject.isDestroyed)return;this._rootContainer.parent&&this.onRootContainerParentRemoved.dispatch();const q=ct.w.getActiveScene().getLayer(this.GameObject.layer);this.addRootContainerToContainerObject(q),this.onRootContainerParentSet.dispatch()}addRootContainerToContainerObject(q){q&&-1===q.children.indexOf(this._rootContainer)&&this._rootContainer&&!this._rootContainer.destroyed&&q.addChild(this._rootContainer)}onRenderComponentContainerWasSet(){this._parentRenderComponent.onRootContainerSet.remove(this.onRenderComponentContainerWasSet,this),this._parentRenderComponent.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this),this.GameObject.onLayerChanged.remove(this.attachRootToCurrentLayer,this),this.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this),this.attachRootToRenderComponentParent()}updateVisibility(){var q;if(this._rootContainer&&!this._rootContainer.destroyed){const K=this.IsActiveInHierarchy;this._rootContainer.visible=K,this._rootContainer.exists=K,null===(q=this._overrideTransform)||void 0===q||q.updateTransform()}}updateSmooth(){this._rootContainer&&dt.A.isDefined(this._smooth)&&dt.A.toggleDisplayObjSmooth(this._rootContainer,this._smooth)}trackTransformAddingToOverride(q){q instanceof it.d?(this.overridePIXIUpdateFunction(),this.GameObject.onComponentAdded.remove(this.trackTransformAddingToOverride,this)):q instanceof et.K&&(this.attachRootContainer(),this.GameObject.onComponentAdded.remove(this.trackTransformAddingToOverride,this))}onOverrideTransformDestroyed(){this.resetPIXIUpdateFunction(),this.attachRootContainer(),this.GameObject.onComponentAdded.add(this.trackTransformAddingToOverride,this)}onLegacyTransformDestroyed(){this.attachRootContainer(),this.GameObject.onComponentAdded.add(this.trackTransformAddingToOverride,this)}onParentRenderComponentDestroyed(){this._parentRenderComponent.GameObject.onLayerChanged.removeAll(this),this.GameObject.onLayerChanged.removeAll(this),this.GameObject.onLayerChanged.add(this.attachRootToCurrentLayer,this),this.attachRootToCurrentLayer()}overridePIXIUpdateFunction(){this._overrideTransform||(this.GameObject.transform.OnDestroy.add(this.onOverrideTransformDestroyed,this),this._previousTransform=this._rootContainer.transform,this._overrideTransform=this.createPixiTransformOverride(),this._rootContainer.transform=this._overrideTransform)}resetPIXIUpdateFunction(){this._rootContainer.transform=this._previousTransform,this._previousTransform=null,this._overrideTransform=null}clearListeners(){this.GameObject&&(this.GameObject.onActiveInHierarchyChanged.removeAll(this),this.GameObject.onHierarchyChanged.removeAll(this),this.GameObject.onLayerChanged.removeAll(this),this.GameObject.onComponentAddedToHierarchy.removeAll(this),this.GameObject.onDestroy.removeAll(this),this.GameObject.onComponentAdded.removeAll(this),this.GameObject.legacyTransform?this.GameObject.legacyTransform.OnDestroy.removeAll(this):this.GameObject.transform&&this.GameObject.transform.OnDestroy.removeAll(this))}clearRootContainer(){this._rootContainer&&(this.resetRootContainerRender(),this._previousTransform&&(this._rootContainer.transform=this._previousTransform),this._rootContainer.removeFromParent(),this._rootContainer=null)}};(0,Q.Cg)([(0,ht.VF)(),(0,Q.Sn)("design:type",st.d)],ft.prototype,"_filter",void 0),(0,Q.Cg)([(0,ht.vk)(),(0,ht.YL)("Should the _rootContainer (including children) of this RenderComponent be culled?
Useful when you expect to have objects that are off screen."),(0,Q.Sn)("design:type",Boolean)],ft.prototype,"_isCullable",void 0),(0,Q.Cg)([(0,ht.vk)(),(0,ht.YL)("Should the _rootContainer (including children) of this RenderComponent be smoothed?"),(0,Q.Sn)("design:type",Boolean)],ft.prototype,"_smooth",void 0),ft=Y=(0,Q.Cg)([(0,J.EV)("RenderComponent (abstract)",void 0,"Includes helpers for some of the core functionality required for
injecting render components into the scene graph")],ft)},59859:(q,K,z)=>{"use strict";z.d(K,{j:()=>nt});var Y=z(8674),Q=z(85880),X=z(68910),Z=z(29658),J=z(61806),tt=z(300),et=z(40008),it=z(80473),st=z(4697);let nt=class extends st.y{constructor(){super(...arguments),this.localBoundsOffset=et.I9.ZERO,this._updateRequired=!1,this._alpha=1,this._tintColor="0xFFFFFF",this._tintIntensity=0,this._tintBlendMode=tt.Pz.Multiply,this._baseFilter=null}get alpha(){return this._alpha}set alpha(q){this._updateRequired||(this._updateRequired=this._alpha!==q),this._alpha=q}get tintColor(){return this._tintColor}set tintColor(q){this._updateRequired||(this._updateRequired=this._tintColor!==q),this._tintColor=q}get tintIntensity(){return this._tintIntensity}set tintIntensity(q){this._updateRequired||(this._updateRequired=this._tintIntensity!==q),this._tintIntensity=q}get tintBlendMode(){return this._tintBlendMode}set tintBlendMode(q){this._updateRequired||(this._updateRequired=this._tintIntensity!==q),this._tintBlendMode=q}get requireFilter(){return 1!==this._alpha||0!==this._tintIntensity}create(){var q,K;if(super.create(),!this._renderContainer){if(this._renderContainer=null===(K=null===(q=J.W.instance)||void 0===q?void 0:q.game)||void 0===K?void 0:K.add.container(),!this._renderContainer)return;this._renderContainer.name=this.GameObject.name,this.setRootContainer(this._renderContainer)}this.requireFilter&&(this._updateRequired=!0,this.updateFilter())}getCenterOffset(){return this.localBoundsOffset}updateFilter(){var q;if(this.requireFilter){if(this._updateRequired&&this.lookupBaseFilter()){const[q=255,K=255,z=255]=Q.os.utils.splitColor(this._tintColor);this._baseFilter.alpha=this._alpha,this._baseFilter.tintIntensity=this._tintIntensity,this._baseFilter.tintColor=[q/255,K/255,z/255],this._baseFilter.blend=this._tintBlendMode,this._updateRequired=!1}}else(null===(q=this._renderContainer.filters)||void 0===q?void 0:q.includes(this._baseFilter))&&(this._renderContainer.filters=this._renderContainer.filters.filter((q=>q!==this._baseFilter)),this._baseFilter.destroy(),this._baseFilter=null,this._updateRequired=!1)}lookupBaseFilter(){var q;if(this._renderContainer)return this._renderContainer.filters||(this._renderContainer.filters=[]),this._baseFilter=(null===(q=this._renderContainer.filters)||void 0===q?void 0:q.find((q=>q instanceof tt.oW)))||new tt.oW,this._renderContainer.filters.includes(this._baseFilter)||this._renderContainer.filters.push(this._baseFilter),this._baseFilter}getDimensions(){var q,K,z,Y,Q,Z,J,tt;const it=null===(K=null===(q=this._renderContainer)||void 0===q?void 0:q._bounds)||void 0===K?void 0:K.getRectangle(),st=(null==it?void 0:it.width)>0?it:new X.Rectangle(0,0,100,100);return this.localBoundsOffset=new et.I9(st.x-(null===(Q=null===(Y=null===(z=this.gameObject)||void 0===z?void 0:z.transform)||void 0===Y?void 0:Y.localPosition)||void 0===Q?void 0:Q.x),st.y-(null===(tt=null===(J=null===(Z=this.gameObject)||void 0===Z?void 0:Z.transform)||void 0===J?void 0:J.localPosition)||void 0===tt?void 0:tt.y)),new et.or(st.width,st.height)}destroy(){var q;null===(q=this._renderContainer)||void 0===q||q.destroy(),this._renderContainer=null,super.destroy()}canRootContainerRender(){var q;return 0!==(null===(q=this._baseFilter)||void 0===q?void 0:q.alpha)&&super.canRootContainerRender()}};(0,Y.Cg)([(0,it.g1)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_alpha",void 0),(0,Y.Cg)([(0,it.iE)(),(0,Y.Sn)("design:type",String)],nt.prototype,"_tintColor",void 0),(0,Y.Cg)([(0,it.g1)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_tintIntensity",void 0),(0,Y.Cg)([(0,it.gf)(tt.Pz),(0,Y.Sn)("design:type",Number)],nt.prototype,"_tintBlendMode",void 0),nt=(0,Y.Cg)([(0,Z.EV)("BaseRender",Z.YH.render,"Creates a basic render component to allow for visual changes(alpha, tint, etc)")],nt)},10673:(q,K,z)=>{"use strict";z.d(K,{v:()=>lt});var Y,Q=z(8674),X=z(29658),Z=z(15740),J=z(16649),tt=z(61806),et=z(80267),it=z(5191),st=z(64527),nt=z(27179),at=z(41444),rt=z(87661),ot=z(823),ht=z(548),ct=z(32154),dt=z(4697);let lt=Y=class extends dt.y{get alpha(){return this.spine.alpha}set alpha(q){this.spine&&(this.spine.alpha=q)}set tint(q){this._tint=q,this.spine&&this.spine.setTint(q)}get paused(){return this.spine&&this.isLoaded?this.spine.paused:!!ct.A.isDefined(this._pausedOnLoad)&&this._pausedOnLoad}set paused(q){this.spine&&this.isLoaded?this.spine.paused=q:this._pausedOnLoad=q}get updateMethod(){var q;return this.spine&&this.isLoaded?this.spine.updateMethod:null!==(q=this._updateMethodOnLoad)&&void 0!==q?q:J.b.Pixi}set updateMethod(q){this.spine&&this.isLoaded?this.spine.updateMethod=q:this._updateMethodOnLoad=q}get isLoaded(){return this._isLoaded}get OnLoaded(){return this.onLoaded}constructor(){super(),this.spine=null,this._spineKey=null,this._spineGUID=null,this._animationRemap=new Map,this._alphaOnLoad=1,this._tint=void 0,this._isLoaded=!1,this.onLoaded=new Z.H,this._preCreateSetAsset=null,this.onEvent=new Z.H,this._spineSize=new st.o,this._spineAnchor=new nt.I,this._smooth=!0}create(){super.create(),this.onLoaded.addOnce((()=>{this.alpha=this._alphaOnLoad,ct.A.isDefined(this._pausedOnLoad)&&(this.paused=this._pausedOnLoad),ct.A.isDefined(this._updateMethodOnLoad)&&(this.updateMethod=this._updateMethodOnLoad)})),this._rootGroup=tt.W.instance.game.add.container(void 0,this.GameObject.name),this._rootGroup.containsPoint=this.isPointInSpine.bind(this),this.setRootContainer(this._rootGroup),this._preCreateSetAsset?(this._preCreateSetAsset(),this._preCreateSetAsset=null):this._spineKey?this.setAsset(this._spineKey):this._spineGUID&&this.setAsset(this._spineGUID)}setAsset(q,K,z){var Y;if(!this._rootGroup)return this._preCreateSetAsset=this.setAsset.bind(this,q,K,z),void(this._spineKey=q);this.destroySpine(),ct.A.isDefined(q)&&0!==q.length?(this._isLoaded=!1,ht.E.isLoaded(q)?(this.updateSpineObject(q),ct.A.isDefined(K)&&K()):z?z(q,K):et.V.log(`Spine asset ${q} was not found in cache and no load function was provided to SpineComponent on ${null===(Y=this.gameObject)||void 0===Y?void 0:Y.name}`,it.$.Error)):ct.A.isDefined(K)&&K()}destroy(){var q;this.destroySpine(),this._animationRemap.clear(),null===(q=this._rootGroup)||void 0===q||q.destroy(),this.onLoaded.dispose(),this.onEvent.dispose(),this._isLoaded=!1,this._preCreateSetAsset=null,super.destroy()}destroySpine(){this.spine&&(this.spine.onEvent&&this.spine.onEvent.removeAll(this.onEvent),this.spine.pendingDestroy=!0,this.spine=null)}getDimensions(){return this.spine?this._spineSize:st.o.ZERO}getCenterOffset(){return this.spine?this._spineAnchor:nt.I.ZERO}getCurrentDimensions(){return this.spine?new st.o(this.spine.width,this.spine.height):st.o.ZERO}getSpine(){return this.spine}setAnimationMix(q,K,z){this.spine.setAnimationMix(this.getRemappedAnimation(q),this.getRemappedAnimation(K),z)}update(){var q;null===(q=this.spine)||void 0===q||q.updateFromComponent(),super.update()}updateSpineObject(q){if(this.destroySpine(),this.GameObject){this.spine=tt.W.instance.game.add.spine(0,0,q),this._tint&&this.spine.setTint(this._tint),this.spine.updateMethod=J.b.Pixi,this._rootGroup.addChild(this.spine),this.updateSmooth(),this.setSlotVisibility(Y.INPUT_HITBOX,!1),this.spine.onEvent.add(this.onEvent.dispatch,this.onEvent),this.spine.update();const K=this.spine.skeleton.data,z=K.width,Q=K.height;this._spineSize.setTo(z,Q);const X=K.x,Z=K.y;this._spineAnchor.setTo(-z-X,-Q-Z),this._isLoaded=!0,this.onLoaded.dispatch()}}setSlotVisibility(q,K){const z=this.getSlot(q);if(z){const q=this.getSpine().getSlotContainer(z);q?q.visible=K:z.color.a=K?1:0}}getSlot(q){var K;return this.spine?this.spine.skeleton.findSlot(q):(et.V.log(`No Spine in SpineComponent on ${null===(K=this.gameObject)||void 0===K?void 0:K.name}`,it.$.Error),null)}getBone(q){var K;let z=null;return this.spine?(z=this.spine.skeleton.findBone(q),z||et.V.log(`Bone with name ${q} not found`,it.$.Error)):et.V.log(`No Spine in SpineComponent on ${null===(K=this.gameObject)||void 0===K?void 0:K.name}`,it.$.Error),z}setAnimationByName(q,K,z=!1){const Y=this.getRemappedAnimation(K);this.spine.setAnimationByName(q,Y,z)}addAnimationRemap(q,K){this._animationRemap.set(q,K)}removeAnimationRemap(q,K){K&&this._animationRemap.get(q)!==K||this._animationRemap.delete(q)}getRemappedAnimation(q){var K;return null!==(K=this._animationRemap.get(q))&&void 0!==K?K:q}isPointInSpine(q){if(!this.spine)return!1;const K=this.spine.getBounds();return q.x>=K.left&&q.x<=K.right&&q.y>=K.top&&q.y<=K.bottom}};lt.INPUT_HITBOX="input_hitbox",(0,Q.Cg)([(0,at.B)(),(0,ot.W_)(),(0,ot.Lr)(0),(0,ot.nK)("asset"),(0,Q.Sn)("design:type",String)],lt.prototype,"_spineKey",void 0),(0,Q.Cg)([(0,at.B)(),(0,ot.i0)(rt.Z.Spine),(0,Q.Sn)("design:type",String)],lt.prototype,"_spineGUID",void 0),(0,Q.Cg)([(0,ot.g1)(),(0,ot.Lr)(0),(0,ot.nK)("alpha"),(0,Q.Sn)("design:type",Number)],lt.prototype,"_alphaOnLoad",void 0),(0,Q.Cg)([(0,ot.vk)(),(0,ot.nK)("paused"),(0,Q.Sn)("design:type",Boolean)],lt.prototype,"_pausedOnLoad",void 0),(0,Q.Cg)([(0,ot.gf)(J.b),(0,ot.nK)("updateMethod"),(0,Q.Sn)("design:type",String)],lt.prototype,"_updateMethodOnLoad",void 0),(0,Q.Cg)([(0,ot.bb)(),(0,Q.Sn)("design:type",Z.H)],lt.prototype,"onLoaded",void 0),(0,Q.Cg)([(0,ot.bb)(),(0,Q.Sn)("design:type",Z.H)],lt.prototype,"onEvent",void 0),lt=Y=(0,Q.Cg)([(0,X.EV)("Spine",X.YH.animation,"Renders a spine asset"),(0,Q.Sn)("design:paramtypes",[])],lt)},87987:(q,K,z)=>{"use strict";z.d(K,{W:()=>et});var Y=z(57530),Q=z(80267),X=z(5191),Z=z(21695),J=z(71392),tt=z(17607);class et extends J.m{get sortFunctor(){return this._sortFunctor}set sortFunctor(q){this._sortFunctor=q}constructor(q,K,z){super(),this._sortFunctor=tt.I.NONE,this.attachToCamera=z,this.interactiveChildren=!0,q.addChild(this),this.name=K}render(q){var K;!this.children.length||!this.visible||this.worldAlpha<=0||this.children.every((q=>!q.visible||q.worldAlpha<=0))||(null===(K=Y.i.main)||void 0===K||K.setCameraActive(!this.attachToCamera,q),super.render(q))}addDisplayObject(q){if(this._sortFunctor){const K=this.children.length;for(let z=0;z-1?this.removeChild(q):Q.V.log("Display object was not found",X.$.Warning)}update(){this._sortFunctor&&Z.N.insertion(this.children,this._sortFunctor),super.update()}}et.DEFAULT_NAME="default",et.DEFAULT_DEPTH=0},17607:(q,K,z)=>{"use strict";z.d(K,{I:()=>Y});const Y={Y_SORT:(q,K)=>q.worldTransform.ty{"use strict";z.d(K,{Z:()=>et});var Y=z(68910),Q=z(61806),X=z(36361),Z=z(80267),J=z(5191),tt=z(87987);class et{constructor(){this._layers=new Map,this._gameObjects=[],this._container=new X.r,this.POST_UPDATE="postUpdate",this.onPostUpdate=new Y.Runner(this.POST_UPDATE)}get gameObjects(){return this._gameObjects}get container(){return this._container}addGameObject(q){if(!q)return Z.V.log("Cannot add null gameObject",J.$.Error),null;q.parent?Z.V.log("Could not add game object to scene as it is parented to something already",J.$.Warning):this._gameObjects.push(q)}removeGameObject(q){const K=this._gameObjects.indexOf(q);K>-1?this._gameObjects.splice(K,1):Z.V.log("Could not remove game object from the scene",J.$.Warning)}addLayer(q=tt.W.DEFAULT_NAME,K=tt.W.DEFAULT_DEPTH,z){return this._layers.has(q)?(Z.V.log(`A layer with the name '${q}' already exists. It will not be added.`,J.$.Warning),this._layers.get(q).layer):this.createLayer(q,K,z)}getLayer(q){return this._layers.has(q)?this._layers.get(q).layer:this.createLayer(q,tt.W.DEFAULT_DEPTH)}hasLayer(q){return this._layers.has(q)}setLayerDepth(q,K){const z=this._layers.get(q);if(!z)return null;z.depth=K;const Y=Q.W.instance.game;return Y.world.removeChild(z.layer),this.addContainerToWorld(Y,z.layer,K),z.layer}setAllLayerVisibility(q,K){for(const z of this._layers.keys())(null==K?void 0:K.has(z))||(this._layers.get(z).layer.visible=q)}addContainerToWorld(q,K,z){const Y=q.world.children,Q=Y.length;for(let X=0;X-1;--q)this._gameObjects[q].destroyDeferred();this._gameObjects=null;for(const q of this._layers.keys())this.destroyLayer(q);this._layers=null,this._container.unbindAll(),this.onPostUpdate.destroy(),this.onPostUpdate=null}findLayerDataForObject(q){const K=q.name;return K&&this._layers.has(K)?this._layers.get(K):null}createLayer(q,K,z=!1){const Y=Q.W.instance.game,X=new tt.W(Y.stage,q,z);return this.addContainerToWorld(Q.W.instance.game,X,K),this._layers.set(q,{layer:X,depth:K}),X}}},52751:(q,K,z)=>{"use strict";z.d(K,{w:()=>Q});var Y=z(44770);class Q{static getActiveScene(){return null===this._currentScene&&(this._currentScene=new Y.Z),this._currentScene}static destroyActiveScene(){this._currentScene&&(this._currentScene.destroy(),this._currentScene=null)}}Q._currentScene=null},6686:(q,K,z)=>{"use strict";z.d(K,{G:()=>Z});var Y=z(39002),Q=z(49415),X=z(22300);class Z{constructor(){this._quadTreeBounds={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY},this._staticTriggerQuadTree=new X.E({left:0,top:0,right:0,bottom:0},Z.MAX_TREE_DEPTH,Z.MAX_TRIGGERS_IN_LEAF),this._triggerRemoveCounter=0,this._dynamicTriggers=[]}addTrigger(q){q.isStatic?this.addStaticTrigger(q):this.addDynamicTrigger(q)}removeTrigger(q){q.isStatic?this.removeStaticTrigger(q):this.removeDynamicTrigger(q)}update(){const q=this._dynamicTriggers.length;for(let K=0;KY.c.doBoundsOverlap(z.bounds,q))).map((({value:q})=>q)));const X=Q.length;for(let q=0;q-1===Q.indexOf(q))).forEach((q=>{z.trigger.onTriggerExit.dispatch(q),q.onTriggerExit.dispatch(z.trigger)})),z.overlappingTriggers=Q}this._dynamicTriggers.forEach((q=>{q.bounds=null}))}addStaticTrigger(q){const K=q.getBounds(),z=Q.J.mergeBounds(Object.assign({},this._quadTreeBounds),K);Q.J.areEqual(z,this._quadTreeBounds)||(this._staticTriggerQuadTree.updateBounds(z),this._quadTreeBounds=z),this._staticTriggerQuadTree.insert(K,q)}addDynamicTrigger(q){this._dynamicTriggers.push({trigger:q,bounds:null,overlappingTriggers:[]})}removeStaticTrigger(q){if(this._staticTriggerQuadTree.remove(q.getBounds(),q),++this._triggerRemoveCounter,this._triggerRemoveCounter>Z.TRIGGER_REMOVAL_REBALANCE_COUNT){const q=this._staticTriggerQuadTree.getAllContents(),K={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};q.forEach((({bounds:q})=>{Q.J.mergeBounds(K,q)})),Q.J.areEqual(K,this._quadTreeBounds)||(this._staticTriggerQuadTree.updateBounds(K),this._quadTreeBounds=K),this._triggerRemoveCounter=0}}removeDynamicTrigger(q){const K=this._dynamicTriggers.findIndex((({trigger:K})=>K===q));if(K>-1){this._dynamicTriggers.splice(K,1)[0].overlappingTriggers.forEach((K=>{K.onTriggerExit.dispatch(q),q.onTriggerExit.dispatch(K)}))}}}Z.MAX_TRIGGERS_IN_LEAF=15,Z.MAX_TREE_DEPTH=8,Z.TRIGGER_REMOVAL_REBALANCE_COUNT=20},22070:(q,K,z)=>{"use strict";z.d(K,{o:()=>st});var Y,Q,X=z(46880),Z=z(34711);!function(q){q.local="localStorage",q.session="sessionStorage"}(Y||(Y={})),function(q){q.iOS="iOS",q.Android="Android",q.iPadOS="iPadOS",q.FireOS="Fire OS",q.ChromebookOS="CrOS"}(Q||(Q={}));var J,tt;!function(q){q.Amazon="Amazon",q.Google="Google"}(J||(J={})),function(q){q.iPhone="iPhone",q.iPad="iPad",q.iPod="iPod"}(tt||(tt={}));var et=z(32154);const it="Unknown";class st{static get bowserParsedData(){return this._bowserParsedData||(this._bowserParsedData=(0,X.parse)(window.navigator.userAgent)),this._bowserParsedData}static isMobile(){return this.bowserParsedData.platform.type===X.PLATFORMS_MAP.tablet||this.bowserParsedData.platform.type===X.PLATFORMS_MAP.mobile}static isDesktop(){return!st.isMobile()}static isChrome(){return this.bowserParsedData.browser.name===X.BROWSER_MAP.chrome}static isChromium(){return this.bowserParsedData.browser.name===X.BROWSER_MAP.chromium}static isFirefox(){return this.bowserParsedData.browser.name===X.BROWSER_MAP.firefox}static isEdge(){return this.bowserParsedData.browser.name===X.BROWSER_MAP.edge}static isOpera(){return this.bowserParsedData.browser.name===X.BROWSER_MAP.opera}static isSafari(){return this.bowserParsedData.browser.name===X.BROWSER_MAP.safari}static isIpadOS(){return st.getOsName()===Q.iPadOS}static isIOS(){return this.bowserParsedData.os.name===Q.iOS||!(st.isAndroid()||!et.A.isDefined(window.navigator.platform))&&(window.navigator.platform.indexOf(tt.iPhone)>=0||window.navigator.platform.indexOf(tt.iPad)>=0||window.navigator.platform.indexOf(tt.iPod)>=0)}static isAndroid(){return this.bowserParsedData.os.name===Q.Android}static isFireOS(){return st.getOsDistribution()===Q.FireOS||st.getLocalStorageDeviceInfo().manufacturer===J.Amazon}static getBrowserType(){return this.bowserParsedData.browser.name}static getBrowserVersion(){var q;return null!==(q=this.bowserParsedData.browser.version)&&void 0!==q?q:"unknown"}static getIOSVersion(){if(/iP(hone|od|ad)/.test(navigator.platform)){const q=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return parseInt(q[1],10)}return null}static getDeviceModel(){if(!st._deviceModel){const q=st.getLocalStorageDeviceInfo(),K=q.marketingName?`${q.manufacturer} ${q.marketingName}`.trimLeft():q.model;st._deviceModel=K||it}return st._deviceModel}static getLocalStorageDeviceInfo(){var q;if(st._detectedDeviceInfo)return st._detectedDeviceInfo;st._detectedDeviceInfo={osName:"",osVersion:"",osiOS:void 0,osAndroid:void 0,osDistribution:"",browserName:"",browserVersion:"",vendor:"",model:"",yearReleased:"",manufacturer:"",marketingName:"",mobileDevice:void 0,isTablet:void 0,primaryHardwareType:""};const K=null!==(q=window.deviceInformation)&&void 0!==q?q:JSON.parse(localStorage.getItem("device-information"));return K&&(st._detectedDeviceInfo=K),st._detectedDeviceInfo}static getDeviceHardwareType(){if(st._deviceHardwareType)return st._deviceHardwareType;const q=st.getLocalStorageDeviceInfo();return(null==q?void 0:q.primaryHardwareType)?(st._deviceHardwareType=q.primaryHardwareType,st._deviceHardwareType):it}static getOsDistribution(){const q=st.getLocalStorageDeviceInfo();return(null==q?void 0:q.osDistribution)?q.osDistribution:"unknown"}static getOsName(){const q=st.getLocalStorageDeviceInfo();return(null==q?void 0:q.osName)?q.osName:"unknown"}static isAndroidStockBrowser(){if(!st.isAndroid())return!1;return parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.appVersion)[1],10)<=534&&0===navigator.vendor.indexOf(J.Google)}static isWebAudio(){return!Z.s3.useLegacy}static hasLocalStorageSupport(){return this.checkStorage(Y.local)}static hasSessionStorageSupport(){return this.checkStorage(Y.session)}static checkStorage(q){try{const K=window[q],z="dummy_key_for_testing_storage";return K.setItem(z,z),K.removeItem(z),!0}catch(K){return!1}}}},62481:(q,K,z)=>{"use strict";z.d(K,{R:()=>X});var Y=z(5191),Q=z(80267);class X{static createHandler(q){return K=>{this.logError(K,q)}}static logError(q,K){Q.V.log(`${K}: ${X.stringify(q)}`,Y.$.Error)}static stringify(q){var K;return q instanceof Error?null!==(K=q.stack)&&void 0!==K?K:q.message:JSON.stringify(q)}static getMessage(q){return q instanceof Error?q.message:"string"==typeof q?q:"An unknown error occurred"}}},78178:(q,K,z)=>{"use strict";z.d(K,{U:()=>X});var Y=z(18830),Q=z(52751);class X{static getInjectedValue(q,K){var z,X;return null!==(X=null===(z=null==q?void 0:q.findComponentInParent(Y.b))||void 0===z?void 0:z.getInjectedValue(K))&&void 0!==X?X:Q.w.getActiveScene().container.get(K)}static getParentContainer(q){var K,z;return null!==(z=null===(K=null==q?void 0:q.findComponentInParent(Y.b))||void 0===K?void 0:K.Container)&&void 0!==z?z:Q.w.getActiveScene().container}}},22494:(q,K,z)=>{"use strict";z.d(K,{Q:()=>Q,x:()=>Z});var Y=z(40794);class Q{static addProperty(q,K,z){const Y=Reflect.getMetadata(q,K);Reflect.defineMetadata(q,Y?[...Y,z]:[z],K)}}let X=0;function Z(q){return(K,z)=>{const Q=Object.getOwnPropertyDescriptor(K,z);if(Q&&(Q.get||Q.set||"function"==typeof Q.value))throw new Error("Decorator can only be applied to member variables");if("function"!=typeof K[q])throw new Error("Update function must be a function");const Z=`_updateFunction_${"string"==typeof z?z:X++}`;Object.defineProperty(K,z,{get(){return this[Z]},set(K){this[Z]=K,this instanceof Y.u&&!this.isCreated||this[q]()}})}}},71082:(q,K,z)=>{"use strict";z.d(K,{C:()=>Z});var Y=z(68910),Q=z(39002),X=z(61806);class Z{static areMatricesEqual(q,K,z){return Q.c.isNearlyEqual(q.tx,K.tx,z)&&Q.c.isNearlyEqual(q.ty,K.ty,z)&&Q.c.isNearlyEqual(q.a,K.a,z)&&Q.c.isNearlyEqual(q.b,K.b,z)&&Q.c.isNearlyEqual(q.c,K.c,z)&&Q.c.isNearlyEqual(q.d,K.d,z)}static matrix3x3ToPixi(q,K){K.set(q.a,q.b,q.c,q.d,q.tx,q.ty)}static addPointData(q,K,z=q){z.x=q.x+K.x,z.y=q.y+K.y}static subtractPointData(q,K,z=q){z.x=q.x-K.x,z.y=q.y-K.y}static multiplyPointData(q,K,z=q){z.x=q.x*K.x,z.y=q.y*K.y}static dividePointData(q,K,z=q){z.x=q.x/K.x,z.y=q.y/K.y}static getDistanceSq(q,K){return Math.pow(q.x-K.x,2)+Math.pow(q.y-K.y,2)}static getDistance(q,K){return Math.sqrt(this.getDistanceSq(q,K))}static render(q,K,z=null,Q=!1,Z=!1){var J;const tt={renderTexture:q,clear:Q,transform:z,skipUpdateTransform:Z};(null!==(J=X.W.instance.game.renderer)&&void 0!==J?J:Y.autoDetectRenderer()).render(K,tt)}static renderXY(q,K,z,Q,X=!1){this.render(q,K,new Y.Matrix(1,0,0,1,z,Q),X,!1)}static renderRawXY(q,K,z,Q,X){this.render(q,K,new Y.Matrix(1,0,0,1,z,Q),X,!0)}static clear(q){var K;const z=null!==(K=X.W.instance.game.renderer)&&void 0!==K?K:Y.autoDetectRenderer();if(null==z?void 0:z.renderTexture){const K=z.renderTexture.current;if(z.renderTexture.bind(q),z.renderTexture.clear(),K!==q&&(null===K||(null==K?void 0:K.baseTexture))){const q=z.renderTexture.sourceFrame,Y=z.renderTexture.destinationFrame;z.renderTexture.bind(K,q,Y)}}}static removeAllChildren(q,K=!1){const z=q.removeChildren();if(K)for(const Y of z)Y.destroy()}static markTextureGarbageCollectionFrame(){var q;const K=(null!==(q=X.W.instance.game.renderer)&&void 0!==q?q:Y.autoDetectRenderer()).textureGC;this._textureGcFrame=K.count}static garbageCollectTextures(){var q;const K=(null!==(q=X.W.instance.game.renderer)&&void 0!==q?q:Y.autoDetectRenderer()).textureGC,z=K.maxIdle;K.maxIdle=K.count-this._textureGcFrame,K.run(),K.maxIdle=z}static destroyAllTextures(){this.markTextureGarbageCollectionFrame(),this.garbageCollectTextures()}static canContainerRender(q){var K;if(!(q&&!q.destroyed&&q.visible&&q.renderable&&q.worldAlpha>0))return!1;if(null===(K=q.filters)||void 0===K?void 0:K.length)for(const z of q.filters)if(z.uniforms&&(0===z.uniforms.alpha||0===z.uniforms.uAlpha))return!1;return!0}}Z._textureGcFrame=0},93337:(q,K,z)=>{"use strict";z.d(K,{H:()=>Y});const Y=q=>!q.isPrimary&&(q.stopPropagation(),!0)},21695:(q,K,z)=>{"use strict";z.d(K,{N:()=>Y});class Y{static insertion(q,K){const z=q.length;for(let Y=0;Y0&&K(z,q[Q-1]);)q[Q]=q[Q-1],--Q;q[Q]=z}}}},22300:(q,K,z)=>{"use strict";var Y;z.d(K,{E:()=>Q}),function(q){q[q.TopLeft=0]="TopLeft",q[q.TopRight=1]="TopRight",q[q.BottomLeft=2]="BottomLeft",q[q.BottomRight=3]="BottomRight"}(Y||(Y={}));class Q{constructor(q,K,z){this._treeObjects=[],this._overlappingTreeObjects=[],this._level=1,this._nodes=[],this._bounds=q,this._maxDepth=K,this._maxObjects=z}updateBounds(q){this._bounds=q;const K=this.getAllContents();this.clear(),K.forEach((({bounds:q,value:K})=>{this.insert(q,K)}))}clear(){this._treeObjects.length=0,this._overlappingTreeObjects.length=0;const q=this._nodes.length;for(let K=0;K0){const z=this.findNodeIndex(q),Y=this._nodes[z];return void(q.left>=Y._bounds.left&&q.right<=Y._bounds.right&&q.top>=Y._bounds.top&&q.bottom<=Y._bounds.bottom?this._nodes[z].insert(q,K):this._overlappingTreeObjects.push({bounds:q,value:K}))}this._treeObjects.push({bounds:q,value:K});const z=this._treeObjects.length;if(this._levelthis._maxObjects){this.split();for(let q=0;q0){const K=this._nodes.length;for(let z=0;z0){const z=this.findNodeIndex(q),Q=this._nodes[z];q.left>=Q._bounds.left&&q.right<=Q._bounds.right&&q.top>=Q._bounds.top&&q.bottom<=Q._bounds.bottom?K.push.apply(K,Q.retrieve(q)):(q.left<=this._nodes[Y.TopRight]._bounds.left&&(q.top<=this._nodes[Y.BottomLeft]._bounds.top&&K.push.apply(K,this._nodes[Y.TopLeft].getAllContents()),q.bottom>this._nodes[Y.BottomLeft]._bounds.top&&K.push.apply(K,this._nodes[Y.BottomLeft].getAllContents())),q.right>this._nodes[Y.TopRight]._bounds.left&&(q.top<=this._nodes[Y.BottomRight]._bounds.top&&K.push.apply(K,this._nodes[Y.TopRight].getAllContents()),q.bottom>this._nodes[Y.BottomRight]._bounds.top&&K.push.apply(K,this._nodes[Y.BottomRight].getAllContents())))}return K.push.apply(K,this._overlappingTreeObjects),K.push.apply(K,this._treeObjects),K}remove(q,K){const z=({value:q})=>K===q;let Y=this._overlappingTreeObjects.findIndex(z);if(Y>-1)this._overlappingTreeObjects.splice(Y,1);else if(Y=this._treeObjects.findIndex(z),Y>-1)this._treeObjects.splice(Y,1);else if(this._nodes.length>0){const z=this.findNodeIndex(q);this._nodes[z].remove(q,K)}}split(){const q=.5*(this._bounds.right-this._bounds.left),K=.5*(this._bounds.bottom-this._bounds.top),z=this._bounds.left,X=this._bounds.top;this._nodes[Y.TopLeft]=new Q({left:z,top:X,right:z+q,bottom:X+K},this._maxDepth,this._maxObjects),this._nodes[Y.TopLeft]._level=this._level+1,this._nodes[Y.TopRight]=new Q({left:z+q,top:X,right:this._bounds.right,bottom:X+K},this._maxDepth,this._maxObjects),this._nodes[Y.TopRight]._level=this._level+1,this._nodes[Y.BottomLeft]=new Q({left:z,top:X+K,right:z+q,bottom:this._bounds.bottom},this._maxDepth,this._maxObjects),this._nodes[Y.BottomLeft]._level=this._level+1,this._nodes[Y.BottomRight]=new Q({left:z+q,top:X+K,right:this._bounds.right,bottom:this._bounds.bottom},this._maxDepth,this._maxObjects),this._nodes[Y.BottomRight]._level=this._level+1}findNodeIndex(q){const K=this._bounds.left+.5*(this._bounds.right-this._bounds.left),z=this._bounds.top+.5*(this._bounds.bottom-this._bounds.top),Q=q.top{"use strict";z.d(K,{E:()=>it});var Y=z(95891),Q=z(68910),X=z(16649),Z=z(61806),J=z(80267),tt=z(5191),et=z(62481);class it{static getAnimationEventTime(q,K,z){var X,Z;const et=null!==(Z=null===(X=q.skeleton)||void 0===X?void 0:X.data.findAnimation(K))&&void 0!==Z?Z:null;let it=-1;if(et){if((null==et?void 0:et.timelines.length)>0){const q=et.timelines,X=q[q.length-1];if(X instanceof Q.spine.EventTimeline){const q=Y.find(X.events,(q=>q.data.name===z));q?it=1e3*q.time:J.V.log(`Missing event "${z}" on animation "${K}"`,tt.$.Warning)}else J.V.log(`Missing event timeline for animation "${K}"`,tt.$.Warning)}}else J.V.log(`Missing spine animation "${K}"`,tt.$.Warning);return it}static getAudioList(q){let K=null;try{K=new X.y(q)}catch(Q){return et.R.logError(Q,`Could not load spine ${q}`),null}if(!K)return null;const z=[];for(let Y=0;Y0&&z.push(q)}return K.destroy(),z.map(Y.trim)}static isLoaded(q){return Z.W.instance.game.cache.checkSpineKey(q)}static getSpineEventByName(q,K){const z=Z.W.instance.game.cache.getJSON(q);if(!z)return J.V.log(`Spine ${q} either unloaded or incorrect`,tt.$.Warning),[];if(0===z.events.length)return[];const Y=[];for(let X=0;Xq===K.name));-1!==Z&&(Y.push(new Q.spine.Event(-1,z.events[Z])),z.animations.forEach((K=>{K.timelines.forEach((K=>{K instanceof Q.spine.EventTimeline&&Y.push(...K.events.filter((K=>K.data.name===q)))}))})))}return Y}}},32154:(q,K,z)=>{"use strict";z.d(K,{A:()=>J});var Y=z(68910),Q=z(48368),X=z(5191),Z=z(80267);class J{static isDefined(q){return null!=q}static generateGUID(){let q=Date.now();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(q+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(K=>{const z=(q+16*Math.random())%16|0;return q=Math.floor(q/16),("x"===K?z:3&z|8).toString(16)}))}static isGuid(q){if(!q)return!1;return/^[A-F\d]{8}-[A-F\d]{4}-4[A-F\d]{3}-[89AB][A-F\d]{3}-[A-F\d]{12}$/i.test(q)}static bufferToUtf8String(q){let K=0;const z=[];for(;K127)if(Y>191&&Y<224){if(K>=q.length)return Z.V.log("JsonResponseInterceptor - Incomplete 2 byte sequence",X.$.Error),null;Y=(31&Y)<<6|63&q[K++]}else if(Y>223&&Y<240){if(K+1>=q.length)return Z.V.log("JsonResponseInterceptor - Incomplete 3 byte sequence",X.$.Error),null;Y=(15&Y)<<12|(63&q[K++])<<6|63&q[K++]}else{if(!(Y>239&&Y<248))return Z.V.log(`JsonResponseInterceptor - Invalid multi-byte start 0x${Y.toString(16)}`,X.$.Error),null;if(K+2>=q.length&&K+1>=q.length)return Z.V.log("JsonResponseInterceptor - Incomplete 4 byte sequence",X.$.Error),null;Y=(7&Y)<<18|(63&q[K++])<<12|(63&q[K++])<<6|63&q[K++]}if(Y<=65535)z.push(String.fromCharCode(Y));else{if(!(Y<=1114111))return Z.V.log(`JSON conversion code 0x${Y.toString(16)} could not be decoded`,X.$.Error),null;Y-=65536,z.push(String.fromCharCode(Y>>10|55296)),z.push(String.fromCharCode(1023&Y|56320))}}return z.join("")}static utf8StringToBuffer(q){let K=0;const z=new Uint8Array(4*q.length);for(let Y=0;Y!==q.length;++Y){let Q=q.charCodeAt(Y);if(Q<128)z[K++]=Q;else{if(Q<2048)z[K++]=Q>>6|192;else{if(Q>55295&&Q<56320){if(++Y>=q.length)return Z.V.log("UTF-8 encode: incomplete surrogate pair",X.$.Error),null;const J=q.charCodeAt(Y);if(J<56320||J>57343)return Z.V.log(`UTF-8 encode: second surrogate character 0x${J.toString(16)} at index ${Y} out of range`,X.$.Error),null;Q=((1023&Q)<<10)+(1023&J)+65536,z[K++]=Q>>18|240,z[K++]=Q>>12&63|128}else z[K++]=Q>>12|224;z[K++]=Q>>6&63|128}z[K++]=63&Q|128}}return new Uint8Array(z.buffer.slice(0,K))}static toggleDisplayObjSmooth(q,K){if(q&&((q instanceof Y.Sprite||q instanceof Y.TilingSprite)&&Q.q.setSmoothed(q.texture,K),q instanceof Y.Container))for(let z=0;z=Q.length)switch(Y){case 1:Q=new Array(K+1-Q.length).join(z)+Q;break;case 3:const Y=Math.ceil((X=K-Q.length)/2);Q=new Array(X-Y+1).join(z)+Q+new Array(Y+1).join(z);break;default:Q=q+new Array(K+1-Q.length).join(z)}return Q}static getUrlVariable(q){const K={};return window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,((q,z,Y)=>K[z]=Y)),K[q]}static setOuterWidth(q,K){q.style.width=K-(q.style.paddingLeft?parseInt(q.style.paddingLeft):0)-(q.style.paddingRight?parseInt(q.style.paddingRight):0)-(q.style.borderLeftWidth?parseInt(q.style.borderLeftWidth):0)-(q.style.borderRightWidth?parseInt(q.style.borderRightWidth):0)+"px"}static setOuterHeight(q,K){q.style.height=K-(q.style.paddingTop?parseInt(q.style.paddingTop):0)-(q.style.paddingBottom?parseInt(q.style.paddingBottom):0)-(q.style.borderTopWidth?parseInt(q.style.borderTopWidth):0)-(q.style.borderBottomWidth?parseInt(q.style.borderBottomWidth):0)+"px"}static getCenteredXY(q,K,z,Q,X,Z){return new Y.Point(z+.5*(X-q),Q+.5*(Z-K))}static wrapArrayIndex(q,K){if(K<=0)return null;let z=q;for(;z<0;)z+=K;for(;z>=K;)z-=K;return z}static equalArrayContents(q,K){if(q===K)return!0;if(null===q||null===K)return!1;if(q.length!==K.length)return!1;const z=[...q];for(const Y of K)if(!this.removeFromArray(Y,z))return!1;return!(z.length>0)}static removeFromArray(q,K,z=((q,K)=>q===K)){for(let Y=0;Ythis.removeFromArray(q,Y,z))),Y}static swapArrayIndex(q,K,z){const Y=q[K];q[K]=q[z],q[z]=Y}static getSequentialArrayValuesCount(q,K,z,Y){const Q=void 0!==Y?z+Y:q.length;let X=z;for(;X{"use strict";z.d(K,{b:()=>Q});var Y=z(8674);class Q{get[Symbol.toStringTag](){return"ResolvablePromise"}constructor(){this.promise=new Promise(((q,K)=>{this.resolve=q,this.reject=K}))}then(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.promise.then(q,K)}))}catch(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.promise.catch(q)}))}finally(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.promise.finally(q)}))}}},1788:(q,K,z)=>{"use strict";z.d(K,{A:()=>bt});var Y=z(8674);const Q=Symbol("Comlink.proxy"),X=Symbol("Comlink.endpoint"),Z=Symbol("Comlink.releaseProxy"),J=new WeakSet,tt=new Map([["proxy",{canHandle:q=>q&&q[Q],serialize(q){const{port1:K,port2:z}=new MessageChannel;return et(q,K),[z,[z]]},deserialize:q=>(q.start(),st(q))}],["throw",{canHandle:q=>J.has(q),serialize(q){const K=q instanceof Error;let z=q;return K&&(z={isError:K,message:q.message,stack:q.stack}),[z,[]]},deserialize(q){if(q.isError)throw Object.assign(new Error,q);throw q}}]]);function et(q,K=self){K.addEventListener("message",(function z(Y){if(!Y||!Y.data)return;const{id:X,type:Z,path:tt}=Object.assign({path:[]},Y.data),st=(Y.data.argumentList||[]).map(ct);let nt;try{const K=tt.slice(0,-1).reduce(((q,K)=>q[K]),q),z=tt.reduce(((q,K)=>q[K]),q);switch(Z){case 0:nt=z;break;case 1:K[tt.slice(-1)[0]]=ct(Y.data.value),nt=!0;break;case 2:nt=z.apply(K,st);break;case 3:nt=function(q){return Object.assign(q,{[Q]:!0})}(new z(...st));break;case 4:{const{port1:K,port2:z}=new MessageChannel;et(q,z),nt=function(q,K){return ot.set(q,K),q}(K,[K])}break;case 5:nt=void 0}}catch(e){nt=e,J.add(e)}Promise.resolve(nt).catch((q=>(J.add(q),q))).then((q=>{const[Y,Q]=ht(q);K.postMessage(Object.assign(Object.assign({},Y),{id:X}),Q),5===Z&&(K.removeEventListener("message",z),it(K))}))})),K.start&&K.start()}function it(q){(function(q){return"MessagePort"===q.constructor.name})(q)&&q.close()}function st(q){return at(q)}function nt(q){if(q)throw new Error("Proxy has been released and is not useable")}function at(q,K=[]){let z=!1;const Y=new Proxy((function(){}),{get(Q,X){if(nt(z),X===Z)return()=>dt(q,{type:5,path:K.map((q=>q.toString()))}).then((()=>{it(q),z=!0}));if("then"===X){if(0===K.length)return{then:()=>Y};const z=dt(q,{type:0,path:K.map((q=>q.toString()))}).then(ct);return z.then.bind(z)}return at(q,[...K,X])},set(Y,Q,X){nt(z);const[Z,J]=ht(X);return dt(q,{type:1,path:[...K,Q].map((q=>q.toString())),value:Z},J).then(ct)},apply(Y,Q,Z){nt(z);const J=K[K.length-1];if(J===X)return dt(q,{type:4}).then(ct);if("bind"===J)return at(q,K.slice(0,-1));const[tt,et]=rt(Z);return dt(q,{type:2,path:K.map((q=>q.toString())),argumentList:tt},et).then(ct)},construct(Y,Q){nt(z);const[X,Z]=rt(Q);return dt(q,{type:3,path:K.map((q=>q.toString())),argumentList:X},Z).then(ct)}});return Y}function rt(q){const K=q.map(ht);return[K.map((q=>q[0])),(z=K.map((q=>q[1])),Array.prototype.concat.apply([],z))];var z}const ot=new WeakMap;function ht(q){for(const[K,z]of tt)if(z.canHandle(q)){const[Y,Q]=z.serialize(q);return[{type:3,name:K,value:Y},Q]}return[{type:0,value:q},ot.get(q)||[]]}function ct(q){switch(q.type){case 3:return tt.get(q.name).deserialize(q.value);case 0:return q.value}}function dt(q,K,z){return new Promise((Y=>{const Q=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");q.addEventListener("message",(function K(z){z.data&&z.data.id&&z.data.id===Q&&(q.removeEventListener("message",K),Y(z.data))})),q.start&&q.start(),q.postMessage(Object.assign({id:Q},K),z)}))}var lt=z(80267),ut=z(5191),ft=z(32154);class bt{constructor(q){this.workerSpawner=null,this.workerInstance=null,this.workerInterface=null,this.workerSpawner=q}start(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.workerInstance){if(!this.workerInterface)return this.workerInterfacePromise}else this.workerInstance=this.workerSpawner(),this.workerInterfacePromise=new(st(this.workerInstance)),this.workerInterface=yield this.workerInterfacePromise;return Promise.resolve(this.workerInterface)}))}isReady(){return ft.A.isDefined(this.workerInstance)&&ft.A.isDefined(this.workerInterface)}getInterface(){return this.workerInterface}stop(){this.workerInterface?(this.workerInstance.terminate(),this.workerInstance=null,this.workerInterface=null):this.workerInterfacePromise?this.workerInterfacePromise.then((()=>{this.stop()})).catch():lt.V.log("Worker has not been started",ut.$.Error)}}},80632:(q,K,z)=>{"use strict";z.d(K,{m:()=>Z});var Y=z(8674),Q=z(80267),X=z(5191);class Z{constructor(q){this.workerInstance=null,this.workerCtor=null,this.workerCtor=q}start(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this.workerInstance){const q=this.workerCtor(),K=Object.keys(q),z=K.length;for(let Q=0;Q(0,Y.sH)(this,void 0,void 0,(function*(){return Promise.resolve(K.call(q,z))}))}}this.workerInstance=q}return Promise.resolve(this.workerInstance)}))}isReady(){return null!==this.workerInstance}stop(){this.workerInstance?this.workerInstance=null:Q.V.log("Worker has not been started",X.$.Error)}getInterface(){return this.workerInstance}}},15073:(q,K,z)=>{"use strict";z.d(K,{p:()=>tt});var Y=z(80267),Q=z(5191),X=z(22070),Z=z(1788),J=z(80632);class tt{static createWorker(q,K){return 11===X.o.getIOSVersion()?new J.m((()=>new q)):new Z.A((()=>{let q=null;try{q=new Worker(K)}catch(e){q=tt.createBlobWorker([`importScripts('${K}');`])}return q}))}static createBlobWorker(q){var K,z,X;let Z=null,J=null;try{const Y="application/javascript";try{J=new Blob(q,{type:Y})}catch(e){const X=new(null!==(z=null!==(K=window.BlobBuilder)&&void 0!==K?K:window.WebKitBlobBuilder)&&void 0!==z?z:window.MozBlobBuilder);X.append(q),J=X.getBlob(Y)}const Q=(null!==(X=window.URL)&&void 0!==X?X:window.webkitURL).createObjectURL(J);Z=new Worker(Q)}catch(tt){Y.V.log("Could not spawn a blob worker",Q.$.Error)}return Z}}},12915:(q,K,z)=>{var Y,Q=z(27652),X=z(77781),Z=z(52769),J=z(48297),tt=z(81370),et=z(80240),it=z(88904),st=z(38808),nt=z(66570),at=!1,rt=X();function ot(q,K,z){var Q=Y.segments(q),X=Y.segments(K),Z=z(Y.combine(Q,X));return Y.polygon(Z)}Y={buildLog:function(q){return!0===q?at=Q():!1===q&&(at=!1),!1!==at&&at.list},epsilon:function(q){return rt.epsilon(q)},segments:function(q){var K=Z(!0,rt,at);return q.regions.forEach(K.addRegion),{segments:K.calculate(q.inverted),inverted:q.inverted}},combine:function(q,K){return{combined:Z(!1,rt,at).calculate(q.segments,q.inverted,K.segments,K.inverted),inverted1:q.inverted,inverted2:K.inverted}},selectUnion:function(q){return{segments:tt.union(q.combined,at),inverted:q.inverted1||q.inverted2}},selectIntersect:function(q){return{segments:tt.intersect(q.combined,at),inverted:q.inverted1&&q.inverted2}},selectDifference:function(q){return{segments:tt.difference(q.combined,at),inverted:q.inverted1&&!q.inverted2}},selectDifferenceRev:function(q){return{segments:tt.differenceRev(q.combined,at),inverted:!q.inverted1&&q.inverted2}},selectXor:function(q){return{segments:tt.xor(q.combined,at),inverted:q.inverted1!==q.inverted2}},polygon:function(q){return{regions:J(q.segments,rt,at),inverted:q.inverted}},polygonFromGeoJSON:function(q){return et.toPolygon(Y,q)},polygonToGeoJSON:function(q){return et.fromPolygon(Y,rt,q)},union:function(q,K){return ot(q,K,Y.selectUnion)},intersect:function(q,K){return ot(q,K,Y.selectIntersect)},difference:function(q,K){return ot(q,K,Y.selectDifference)},differenceRev:function(q,K){return ot(q,K,Y.selectDifferenceRev)},xor:function(q,K){return ot(q,K,Y.selectXor)},isConvex:function(q){return q.regions.every((function(q){return it.isConvex(q)}))},makeConvex:function(q){var K=[];return q.regions.forEach((function(q){var z=[];q.forEach((function(q){z.push(q[0]),z.push(q[1])}));for(var Y=nt(z),Q=0;Q{q.exports=function(){var q,K=0,z=!1;function Y(K,z){return q.list.push({type:K,data:z?JSON.parse(JSON.stringify(z)):void 0}),q}return q={list:[],segmentId:function(){return K++},checkIntersection:function(q,K){return Y("check",{seg1:q,seg2:K})},segmentChop:function(q,K){return Y("div_seg",{seg:q,pt:K}),Y("chop",{seg:q,pt:K})},statusRemove:function(q){return Y("pop_seg",{seg:q})},segmentUpdate:function(q){return Y("seg_update",{seg:q})},segmentNew:function(q,K){return Y("new_seg",{seg:q,primary:K})},segmentRemove:function(q){return Y("rem_seg",{seg:q})},tempStatus:function(q,K,z){return Y("temp_status",{seg:q,above:K,below:z})},rewind:function(q){return Y("rewind",{seg:q})},status:function(q,K,z){return Y("status",{seg:q,above:K,below:z})},vert:function(K){return K===z?q:(z=K,Y("vert",{x:K}))},log:function(q){return"string"!=typeof q&&(q=JSON.stringify(q,!1," ")),Y("log",{txt:q})},reset:function(){return Y("reset")},selected:function(q){return Y("selected",{segs:q})},chainStart:function(q){return Y("chain_start",{seg:q})},chainRemoveHead:function(q,K){return Y("chain_rem_head",{index:q,pt:K})},chainRemoveTail:function(q,K){return Y("chain_rem_tail",{index:q,pt:K})},chainNew:function(q,K){return Y("chain_new",{pt1:q,pt2:K})},chainMatch:function(q){return Y("chain_match",{index:q})},chainClose:function(q){return Y("chain_close",{index:q})},chainAddHead:function(q,K){return Y("chain_add_head",{index:q,pt:K})},chainAddTail:function(q,K){return Y("chain_add_tail",{index:q,pt:K})},chainConnect:function(q,K){return Y("chain_con",{index1:q,index2:K})},chainReverse:function(q){return Y("chain_rev",{index:q})},chainJoin:function(q,K){return Y("chain_join",{index1:q,index2:K})},done:function(){return Y("done")}}}},88904:(q,K,z)=>{var Y=z(58811),Q=2*Math.PI,X=.5*Math.PI,Z=function(q,K,z){for(var Q=[],X=K;X!==z+1;++X)X=Y.normalizeIndex(q,X),Q.push(q[X]);return Q},J=function(q,K,z){return[Z(q,K,z),Z(q,z,K)]},tt=function(q){for(;q<=-Math.PI;)q+=Q;for(;q>Math.PI;)q-=Q;return q},et={isConvex:function(q){if(q.length<3)return!1;for(var K,z=q[q.length-2],Y=q[q.length-1],X=z[0],Z=z[1],J=Y[0],et=Y[1],it=Math.atan2(et-Z,J-X),st=0,nt=0;nt0?1:-1}else if(K*ot<0)return!1;st+=ot}}return 1===Math.abs(Math.round(st/Q))},makeConvex:function(q){if(q.length<3)return[];if(3===q.length)return[q];var K=function(q){if(q.length<3)return 0;for(var K=q[q.length-2],z=q[q.length-1],Y=K[0],X=K[1],Z=z[0],J=z[1],tt=Math.atan2(J-X,Z-Y),et=0,it=0;itMath.PI;)at-=Q;et+=at}}return Math.round(et/Q)}(q);if(1!==Math.abs(K))throw"Convex.makeConvex does not support complex polygons. Poly given was: "+JSON.stringify(q);for(var z,Z,et=q[q.length-2],it=q[q.length-1],st=et[0],nt=et[1],at=it[0],rt=it[1],ot=Math.atan2(rt-nt,at-st),ht=!1,ct=0,dt=0;dt-ct=0&&(void 0===Z||Math.abs(tt(ut-Z)){q.exports=function(q){"number"!=typeof q&&(q=1e-10);var K={epsilon:function(K){return"number"==typeof K&&(q=K),q},pointAboveOrOnLine:function(K,z,Y){var Q=z[0],X=z[1],Z=Y[0],J=Y[1],tt=K[0];return(Z-Q)*(K[1]-X)-(J-X)*(tt-Q)>=-q},pointBetween:function(K,z,Y){var Q=K[1]-z[1],X=Y[0]-z[0],Z=K[0]-z[0],J=Y[1]-z[1],tt=Z*X+Q*J;return!(tt-q)},pointsSameX:function(K,z){return Math.abs(K[0]-z[0])q!=Z-Q>q&&(X-et)*(Q-it)/(Z-it)+et-Y>q&&(J=!J),X=et,Z=it}return J}};return K}},80240:q=>{var K={toPolygon:function(q,K){function z(K){if(K.length<=0)return q.segments({inverted:!1,regions:[]});function z(K){var z=K.slice(0,K.length-1);return q.segments({inverted:!1,regions:[z]})}for(var Y=z(K[0]),Q=1;Q{var Y=z(64691);q.exports=function(q,K,z){function Q(q,K,Y){return{id:z?z.segmentId():-1,start:q,end:K,myFill:{above:Y.myFill.above,below:Y.myFill.below},otherFill:null}}var X=Y.create();function Z(q,z){X.insertBefore(q,(function(Y){return function(q,z,Y,Q,X,Z){var J=K.pointsCompare(z,X);return 0!==J?J:K.pointsSame(Y,Z)?0:q!==Q?q?1:-1:K.pointAboveOrOnLine(Y,Q?X:Z,Q?Z:X)?1:-1}(q.isStart,q.pt,z,Y.isStart,Y.pt,Y.other.pt)<0}))}function J(q,K){var z=function(q,K){var z=Y.node({isStart:!0,pt:q.start,seg:q,primary:K,other:null,status:null});return Z(z,q.end),z}(q,K);return function(q,K,z){var Q=Y.node({isStart:!1,pt:K.end,seg:K,primary:z,other:q,status:null});q.other=Q,Z(Q,q.pt)}(z,q,K),z}function tt(q,K){var Y=Q(K,q.seg.end,q.seg);return function(q,K){z&&z.segmentChop(q.seg,K),q.other.remove(),q.seg.end=K,q.other.pt=K,Z(q.other,q.pt)}(q,K),J(Y,q.primary)}function et(Q,Z){var J=Y.create();function et(q){return J.findTransition((function(z){var Y,Q,X,Z,J,tt;return(Y=q,Q=z.ev,X=Y.seg.start,Z=Y.seg.end,J=Q.seg.start,tt=Q.seg.end,K.pointsCollinear(X,J,tt)?K.pointsCollinear(Z,J,tt)||K.pointAboveOrOnLine(Z,J,tt)?1:-1:K.pointAboveOrOnLine(X,J,tt)?1:-1)>0}))}function it(q,Y){var Q=q.seg,X=Y.seg,Z=Q.start,J=Q.end,et=X.start,it=X.end;z&&z.checkIntersection(Q,X);var st=K.linesIntersect(Z,J,et,it);if(!1===st){if(!K.pointsCollinear(Z,J,et))return!1;if(K.pointsSame(Z,it)||K.pointsSame(J,et))return!1;var nt=K.pointsSame(Z,et),at=K.pointsSame(J,it);if(nt&&at)return Y;var rt=!nt&&K.pointBetween(Z,et,it),ot=!at&&K.pointBetween(J,et,it);if(nt)return ot?tt(Y,J):tt(q,it),Y;rt&&(at||(ot?tt(Y,J):tt(q,it)),tt(Y,Z))}else 0===st.alongA&&(-1===st.alongB?tt(q,et):0===st.alongB?tt(q,st.pt):1===st.alongB&&tt(q,it)),0===st.alongB&&(-1===st.alongA?tt(Y,Z):0===st.alongA?tt(Y,st.pt):1===st.alongA&&tt(Y,J));return!1}for(var st=[];!X.isEmpty();){var nt=X.getHead();if(z&&z.vert(nt.pt[0]),nt.isStart){z&&z.segmentNew(nt.seg,nt.primary);var at=et(nt),rt=at.before?at.before.ev:null,ot=at.after?at.after.ev:null;function ht(){if(rt){var q=it(nt,rt);if(q)return q}return!!ot&&it(nt,ot)}z&&z.tempStatus(nt.seg,!!rt&&rt.seg,!!ot&&ot.seg);var ct,dt=ht();if(dt){var lt;if(q)(lt=null===nt.seg.myFill.below||nt.seg.myFill.above!==nt.seg.myFill.below)&&(dt.seg.myFill.above=!dt.seg.myFill.above);else dt.seg.otherFill=nt.seg.myFill;z&&z.segmentUpdate(dt.seg),nt.other.remove(),nt.remove()}if(X.getHead()!==nt){z&&z.rewind(nt.seg);continue}if(q)lt=null===nt.seg.myFill.below||nt.seg.myFill.above!==nt.seg.myFill.below,nt.seg.myFill.below=ot?ot.seg.myFill.above:Q,nt.seg.myFill.above=lt?!nt.seg.myFill.below:nt.seg.myFill.below;else if(null===nt.seg.otherFill)ct=ot?nt.primary===ot.primary?ot.seg.otherFill.above:ot.seg.myFill.above:nt.primary?Z:Q,nt.seg.otherFill={above:ct,below:ct};z&&z.status(nt.seg,!!rt&&rt.seg,!!ot&&ot.seg),nt.other.status=at.insert(Y.node({ev:nt}))}else{var ut=nt.status;if(null===ut)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(J.exists(ut.prev)&&J.exists(ut.next)&&it(ut.prev.ev,ut.next.ev),z&&z.statusRemove(ut.ev.seg),ut.remove(),!nt.primary){var ft=nt.seg.myFill;nt.seg.myFill=nt.seg.otherFill,nt.seg.otherFill=ft}st.push(nt.seg)}X.getHead().remove()}return z&&z.done(),st}return q?{addRegion:function(q){for(var Y,Q,X,Z=q[q.length-1],tt=0;tt{q.exports={create:function(){var q={root:{root:!0,next:null},exists:function(K){return null!==K&&K!==q.root},isEmpty:function(){return null===q.root.next},getHead:function(){return q.root.next},insertBefore:function(K,z){for(var Y=q.root,Q=q.root.next;null!==Q;){if(z(Q))return K.prev=Q.prev,K.next=Q,Q.prev.next=K,void(Q.prev=K);Y=Q,Q=Q.next}Y.next=K,K.prev=Y,K.next=null},findTransition:function(K){for(var z=q.root,Y=q.root.next;null!==Y&&!K(Y);)z=Y,Y=Y.next;return{before:z===q.root?null:z,after:Y,insert:function(q){return q.prev=z,q.next=Y,z.next=q,null!==Y&&(Y.prev=q),q}}}};return q},node:function(q){return q.prev=null,q.next=null,q.remove=function(){q.prev.next=q.next,q.next&&(q.next.prev=q.prev),q.prev=null,q.next=null},q}}},48297:q=>{q.exports=function(q,K,z){var Y=[],Q=[];return q.forEach((function(q){var X=q.start,Z=q.end;if(K.pointsSame(X,Z))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{z&&z.chainStart(q);for(var J={index:0,matches_head:!1,matches_pt1:!1},tt={index:0,matches_head:!1,matches_pt1:!1},et=J,it=0;it{function K(q,K,z){var Y=[];return q.forEach((function(q){var Q=(q.myFill.above?8:0)+(q.myFill.below?4:0)+(q.otherFill&&q.otherFill.above?2:0)+(q.otherFill&&q.otherFill.below?1:0);0!==K[Q]&&Y.push({id:z?z.segmentId():-1,start:q.start,end:q.end,myFill:{above:1===K[Q],below:2===K[Q]},otherFill:null})})),z&&z.selected(Y),Y}var z={union:function(q,z){return K(q,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],z)},intersect:function(q,z){return K(q,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],z)},difference:function(q,z){return K(q,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],z)},differenceRev:function(q,z){return K(q,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],z)},xor:function(q,z){return K(q,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],z)}};q.exports=z},38808:(q,K,z)=>{var Y=z(58811),Q=function(q,K,z){var Y=K[0]-q[0],Q=K[1]-q[1],X=z[0]-q[0];return Y*(z[1]-q[1])-Q*X},X={regionContains:function(q,K){for(var z=0;z0!=X>0)return!1}return!0},carve:function(q,K){for(var z,X,Z,J,tt,et=q[q.length-1],it=1/0,st=0;st0===Q(K[0],K[1],K[2])>0;for(st=0;st{q.exports={normalizeIndex:function(q,K){for(;K<0;)K+=q.length;for(;K>=q.length;)K-=q.length;return K}}},3332:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(43342);(0,Y.__exportStar)(z(97860),K),(0,Y.__exportStar)(z(14435),K)},97860:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.Multiplayer=void 0;var Y=z(43342),Q=z(14435),X=(0,Y.__importDefault)(z(39454)),Z=(0,Y.__importStar)(z(78686)),J=function(){function q(q,K){this._maxAuthRetries=5,this._authRetries=0,this._wasDisconnected=!1,this._moveOnAreaPerChannel=!1,Z.defaults.storage=sessionStorage,this._clientID=q,this._multiplayerURL=K;var z=new URL(this._multiplayerURL),Y=z.hostname,Q=z.port.length>0?parseInt(z.port,10):void 0,J=z.protocol.startsWith("https");this.cleanupOldToken(),this._client=X.default.create({hostname:Y,path:"/prodigy-synapse/socketcluster/",port:Q,secure:J,autoConnect:!1,authTokenName:"".concat(this._clientID,"-socketcluster.authToken"),autoReconnectOptions:{randomness:0,initialDelay:500,maxDelay:1e4}})}return q.prototype.connect=function(){this._client.connect(),this.onDeauthenticated()},q.prototype.getChannelName=function(q){return q.startsWith(this._clientID)?q:"".concat(this._clientID,"-").concat(q)},q.prototype.authenticate=function(q){return(0,Y.__awaiter)(this,void 0,void 0,(function(){return(0,Y.__generator)(this,(function(K){switch(K.label){case 0:return[4,Promise.all([this._client.invoke("login",{token:q}),this._client.listener("authenticate").once()])];case 1:return K.sent(),this._authRetries=0,[2]}}))}))},q.prototype.enableMoveOnAreaPerChannel=function(){this._moveOnAreaPerChannel=!0},q.prototype.subscribe=function(q,K){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var z,Q,X,Z;return(0,Y.__generator)(this,(function(Y){return z=this.getChannelName(q),Q=this._client.subscribe(z).createConsumer(),X=this._client.receiver("messageHistory").createConsumer(),Z=this._client.receiver("channelData").createConsumer(),this.processSubscriptionEvents(Q,K),this.processSubscriptionEvents(Z,K),this.processHistoryEvents(X,K),[2]}))}))},q.prototype.processSubscriptionEvents=function(K,z){var Q,X,Z,J,tt,et;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var it,st;return(0,Y.__generator)(this,(function(nt){switch(nt.label){case 0:nt.trys.push([0,5,6,11]),Q=(0,Y.__asyncValues)(K),nt.label=1;case 1:return[4,Q.next()];case 2:if((X=nt.sent()).done)return[3,4];(it=X.value).type===q.BroadcastActionType&&null!==(null===(tt=it)||void 0===tt?void 0:tt.messageID)&&this.setLatestBroadcastMessage(null!==(et=it.messageID)&&void 0!==et?et:0),z(it),nt.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return st=nt.sent(),Z={error:st},[3,11];case 6:return nt.trys.push([6,,9,10]),X&&!X.done&&(J=Q.return)?[4,J.call(Q)]:[3,8];case 7:nt.sent(),nt.label=8;case 8:return[3,10];case 9:if(Z)throw Z.error;return[7];case 10:return[7];case 11:return[2]}}))}))},q.prototype.processHistoryEvents=function(q,K){var z,Q,X,Z;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var J,tt,et,it,st,nt,at,rt;return(0,Y.__generator)(this,(function(ot){switch(ot.label){case 0:ot.trys.push([0,5,6,11]),z=(0,Y.__asyncValues)(q),ot.label=1;case 1:return[4,z.next()];case 2:if((Q=ot.sent()).done)return[3,4];if(void 0===(J=Q.value).messageHistory||null===J.messageHistory)return[3,3];try{for(at=void 0,tt=(0,Y.__values)(J.messageHistory),et=tt.next();!et.done;et=tt.next())(it=et.value).id>this.getLatestBroadcastMessage()&&(st={type:"broadcastAction",userID:J.userID,actionInfo:it.messageBody,messageID:it.id},this.setLatestBroadcastMessage(it.id),K(st))}catch(ht){at={error:ht}}finally{try{et&&!et.done&&(rt=tt.return)&&rt.call(tt)}finally{if(at)throw at.error}}ot.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return nt=ot.sent(),X={error:nt},[3,11];case 6:return ot.trys.push([6,,9,10]),Q&&!Q.done&&(Z=z.return)?[4,Z.call(z)]:[3,8];case 7:ot.sent(),ot.label=8;case 8:return[3,10];case 9:if(X)throw X.error;return[7];case 10:return[7];case 11:return[2]}}))}))},q.prototype.userListReceiver=function(q){var K,z;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var Q,X,Z,J;return(0,Y.__generator)(this,(function(tt){switch(tt.label){case 0:tt.trys.push([0,5,6,11]),Q=(0,Y.__asyncValues)(this._client.receiver("userList")),tt.label=1;case 1:return[4,Q.next()];case 2:if((X=tt.sent()).done)return[3,4];Z=X.value,q(Z),tt.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return J=tt.sent(),K={error:J},[3,11];case 6:return tt.trys.push([6,,9,10]),X&&!X.done&&(z=Q.return)?[4,z.call(Q)]:[3,8];case 7:tt.sent(),tt.label=8;case 8:return[3,10];case 9:if(K)throw K.error;return[7];case 10:return[7];case 11:return[2]}}))}))},q.prototype.subscribedReceiver=function(q){var K,z;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var Q,X,Z,J;return(0,Y.__generator)(this,(function(tt){switch(tt.label){case 0:tt.trys.push([0,5,6,11]),Q=(0,Y.__asyncValues)(this._client.receiver("subscribed")),tt.label=1;case 1:return[4,Q.next()];case 2:if((X=tt.sent()).done)return[3,4];Z=X.value,q(Z),tt.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return J=tt.sent(),K={error:J},[3,11];case 6:return tt.trys.push([6,,9,10]),X&&!X.done&&(z=Q.return)?[4,z.call(Q)]:[3,8];case 7:tt.sent(),tt.label=8;case 8:return[3,10];case 9:if(K)throw K.error;return[7];case 10:return[7];case 11:return[2]}}))}))},q.prototype.generalError=function(q){var K,z;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var Q,X,Z,J;return(0,Y.__generator)(this,(function(tt){switch(tt.label){case 0:tt.trys.push([0,5,6,11]),Q=(0,Y.__asyncValues)(this._client.listener("error")),tt.label=1;case 1:return[4,Q.next()];case 2:if((X=tt.sent()).done)return[3,4];if("Socket hung up"===(Z=X.value.error).message)return[3,3];q(Z),tt.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return J=tt.sent(),K={error:J},[3,11];case 6:return tt.trys.push([6,,9,10]),X&&!X.done&&(z=Q.return)?[4,z.call(Q)]:[3,8];case 7:tt.sent(),tt.label=8;case 8:return[3,10];case 9:if(K)throw K.error;return[7];case 10:return[7];case 11:return[2]}}))}))},q.prototype.disconnectError=function(q){var K,z;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var Q,X,Z,J;return(0,Y.__generator)(this,(function(tt){switch(tt.label){case 0:tt.trys.push([0,5,6,11]),Q=(0,Y.__asyncValues)(this._client.listener("disconnect")),tt.label=1;case 1:return[4,Q.next()];case 2:if((X=tt.sent()).done)return[3,4];Z=X.value.reason,this._wasDisconnected=!0,q(new Error(Z)),tt.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return J=tt.sent(),K={error:J},[3,11];case 6:return tt.trys.push([6,,9,10]),X&&!X.done&&(z=Q.return)?[4,z.call(Q)]:[3,8];case 7:tt.sent(),tt.label=8;case 8:return[3,10];case 9:if(K)throw K.error;return[7];case 10:return[7];case 11:return[2]}}))}))},q.prototype.subscribeFailError=function(q){var K,z;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var X,Z,J,tt,et,it,st,nt,at;return(0,Y.__generator)(this,(function(rt){switch(rt.label){case 0:rt.trys.push([0,5,6,11]),X=(0,Y.__asyncValues)(this._client.listener("subscribeFail")),rt.label=1;case 1:return[4,X.next()];case 2:if((Z=rt.sent()).done)return[3,4];J=Z.value,tt=J.error,et=J.channel,Q.ChannelValidator.isStatusChannelPatternMatch(et)&&(it=Q.ChannelNameService.getUserIDFromStatusChannelName(et),st=tt.message,nt={userID:it,channel:et,message:"User ".concat(it," failed to subscribe to the status channel ").concat(et,"."),originalErrorMessage:st},tt.message=JSON.stringify(nt)),q(tt,et),rt.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return at=rt.sent(),K={error:at},[3,11];case 6:return rt.trys.push([6,,9,10]),Z&&!Z.done&&(z=X.return)?[4,z.call(X)]:[3,8];case 7:rt.sent(),rt.label=8;case 8:return[3,10];case 9:if(K)throw K.error;return[7];case 10:return[7];case 11:return[2]}}))}))},q.prototype.onDeauthenticated=function(){var q,K;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var z,Q,X,J;return(0,Y.__generator)(this,(function(tt){switch(tt.label){case 0:tt.trys.push([0,6,7,12]),z=(0,Y.__asyncValues)(this._client.listener("deauthenticate")),tt.label=1;case 1:return[4,z.next()];case 2:return(Q=tt.sent()).done?[3,5]:(Q.value,X=Z.get(),this._authRetries<=this._maxAuthRetries?(this._authRetries+=1,[4,this.authenticate(X)]):[3,4]);case 3:tt.sent(),tt.label=4;case 4:return[3,1];case 5:return[3,12];case 6:return J=tt.sent(),q={error:J},[3,12];case 7:return tt.trys.push([7,,10,11]),Q&&!Q.done&&(K=z.return)?[4,K.call(z)]:[3,9];case 8:tt.sent(),tt.label=9;case 9:return[3,11];case 10:if(q)throw q.error;return[7];case 11:return[7];case 12:return[2]}}))}))},q.prototype.onReconnect=function(q){var K,z;return(0,Y.__awaiter)(this,void 0,void 0,(function(){var Q,X,Z,J;return(0,Y.__generator)(this,(function(tt){switch(tt.label){case 0:tt.trys.push([0,5,6,11]),Q=(0,Y.__asyncValues)(this._client.listener("connect")),tt.label=1;case 1:return[4,Q.next()];case 2:if((X=tt.sent()).done)return[3,4];X.value,Z=this._wasDisconnected,this._wasDisconnected=!1,Z&&q(),tt.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return J=tt.sent(),K={error:J},[3,11];case 6:return tt.trys.push([6,,9,10]),X&&!X.done&&(z=Q.return)?[4,z.call(Q)]:[3,8];case 7:tt.sent(),tt.label=8;case 8:return[3,10];case 9:if(K)throw K.error;return[7];case 10:return[7];case 11:return[2]}}))}))},q.prototype.unsubscribe=function(q){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var K;return(0,Y.__generator)(this,(function(z){return K=this.getChannelName(q),this._client.closeChannel(K),[2,this._client.unsubscribe(K)]}))}))},q.prototype.moveOnArea=function(q,K){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var z;return(0,Y.__generator)(this,(function(Q){return z=this.getChannelName(q),this._moveOnAreaPerChannel?this._client.transmit("moveOnArea-".concat(q),(0,Y.__assign)((0,Y.__assign)({},K),{channel:z})):this._client.transmit("moveOnArea",(0,Y.__assign)((0,Y.__assign)({},K),{channel:z})),[2]}))}))},q.prototype.addNotificationListener=function(q){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var K,z;return(0,Y.__generator)(this,(function(Y){return(K=this.getNotificationChannelName())?(z=this._client.subscribe(K).createConsumer(),[2,this.processSubscriptionEvents(z,q)]):[2]}))}))},q.prototype.addStatusListener=function(q,K){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var z,X,Z,J,tt,et;return(0,Y.__generator)(this,(function(it){try{for(z=(0,Y.__values)(q),X=z.next();!X.done;X=z.next())Z=X.value,J=Q.ChannelNameService.getStatusChannelName(this._clientID,Z),this.subscribe(J,K)}catch(st){tt={error:st}}finally{try{X&&!X.done&&(et=z.return)&&et.call(z)}finally{if(tt)throw tt.error}}return[2]}))}))},q.prototype.getNotificationChannelName=function(){var q,K;return null===(K=null===(q=this._client)||void 0===q?void 0:q.authToken)||void 0===K?void 0:K.notificationChannelName},q.prototype.getLatestBroadcastMessage=function(){var q;return Number.parseInt(null!==(q=window.localStorage.getItem("latestHistoryMessage"))&&void 0!==q?q:"0")},q.prototype.setLatestBroadcastMessage=function(q){window.localStorage.setItem("latestHistoryMessage",q.toString())},q.prototype.cleanupOldToken=function(){window.localStorage.removeItem("".concat(this._clientID,"-socketcluster.authToken"))},q.prototype.addClientBroadcastListener=function(q){return(0,Y.__awaiter)(this,void 0,void 0,(function(){var K,z;return(0,Y.__generator)(this,(function(Y){return K=Q.ChannelNameService.getClientBroadcastChannelName(this._clientID),z=this._client.subscribe(K).createConsumer(),[2,this.processSubscriptionEvents(z,q)]}))}))},q.BroadcastActionType="broadcastAction",q}();K.Multiplayer=J},63384:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},37446:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.EClientID=void 0,function(q){q.MATH="1",q.ELA="ela-game"}(K.EClientID||(K.EClientID={}))},7107:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},4498:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},57094:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},88789:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.ChannelNameService=void 0;var z=function(){function q(){}return q.getStatusChannelName=function(q,K){return"".concat(q,"-").concat(K,"-status")},q.getUserIDFromStatusChannelName=function(q){var K=q.split("-");return K[K.length-2]},q.getClientBroadcastChannelName=function(q){return"".concat(q,"-client-broadcast")},q}();K.ChannelNameService=z},60286:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},48276:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.ChannelValidator=void 0;var Y=z(37446),Q=function(){function q(){}return q.isStatusChannel=function(q){if(!q)return!1;var K=q.channelName;return!!K&&(!!this.isStatusChannelPatternMatch(K)&&!(!q.isPrivate||!q.owner))},q.isStatusChannelPatternMatch=function(q){if(!q)return!1;var K=this.getGameClientIDsAsString(),z="^(".concat(K,")-(\\d*)-status$");return new RegExp(z).test(q)},q.getGameClientIDsAsString=function(){return Object.values(Y.EClientID).join("|")},q}();K.ChannelValidator=Q},14435:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(43342);(0,Y.__exportStar)(z(63384),K),(0,Y.__exportStar)(z(57094),K),(0,Y.__exportStar)(z(7107),K),(0,Y.__exportStar)(z(4498),K),(0,Y.__exportStar)(z(60286),K),(0,Y.__exportStar)(z(88789),K),(0,Y.__exportStar)(z(48276),K),(0,Y.__exportStar)(z(37446),K)},43342:(q,K,z)=>{"use strict";z.r(K),z.d(K,{__assign:()=>X,__asyncDelegator:()=>ft,__asyncGenerator:()=>ut,__asyncValues:()=>bt,__await:()=>lt,__awaiter:()=>it,__classPrivateFieldGet:()=>yt,__classPrivateFieldSet:()=>_t,__createBinding:()=>nt,__decorate:()=>J,__exportStar:()=>at,__extends:()=>Q,__generator:()=>st,__importDefault:()=>mt,__importStar:()=>gt,__makeTemplateObject:()=>pt,__metadata:()=>et,__param:()=>tt,__read:()=>ot,__rest:()=>Z,__spread:()=>ht,__spreadArray:()=>dt,__spreadArrays:()=>ct,__values:()=>rt});var Y=function(q,K){return(Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(q,K){q.__proto__=K}||function(q,K){for(var z in K)Object.prototype.hasOwnProperty.call(K,z)&&(q[z]=K[z])})(q,K)};function Q(q,K){if("function"!=typeof K&&null!==K)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function z(){this.constructor=q}Y(q,K),q.prototype=null===K?Object.create(K):(z.prototype=K.prototype,new z)}var X=function(){return(X=Object.assign||function(q){for(var K,z=1,Y=arguments.length;z=0;J--)(Q=q[J])&&(Z=(X<3?Q(Z):X>3?Q(K,z,Z):Q(K,z))||Z);return X>3&&Z&&Object.defineProperty(K,z,Z),Z}function tt(q,K){return function(z,Y){K(z,Y,q)}}function et(q,K){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(q,K)}function it(q,K,z,Y){return new(z||(z=Promise))((function(Q,X){function Z(q){try{tt(Y.next(q))}catch(e){X(e)}}function J(q){try{tt(Y.throw(q))}catch(e){X(e)}}function tt(q){var K;q.done?Q(q.value):(K=q.value,K instanceof z?K:new z((function(q){q(K)}))).then(Z,J)}tt((Y=Y.apply(q,K||[])).next())}))}function st(q,K){var z,Y,Q,X,Z={label:0,sent:function(){if(1&Q[0])throw Q[1];return Q[1]},trys:[],ops:[]};return X={next:J(0),throw:J(1),return:J(2)},"function"==typeof Symbol&&(X[Symbol.iterator]=function(){return this}),X;function J(X){return function(J){return function(X){if(z)throw new TypeError("Generator is already executing.");for(;Z;)try{if(z=1,Y&&(Q=2&X[0]?Y.return:X[0]?Y.throw||((Q=Y.return)&&Q.call(Y),0):Y.next)&&!(Q=Q.call(Y,X[1])).done)return Q;switch(Y=0,Q&&(X=[2&X[0],Q.value]),X[0]){case 0:case 1:Q=X;break;case 4:return Z.label++,{value:X[1],done:!1};case 5:Z.label++,Y=X[1],X=[0];continue;case 7:X=Z.ops.pop(),Z.trys.pop();continue;default:if(!(Q=Z.trys,(Q=Q.length>0&&Q[Q.length-1])||6!==X[0]&&2!==X[0])){Z=0;continue}if(3===X[0]&&(!Q||X[1]>Q[0]&&X[1]=q.length&&(q=void 0),{value:q&&q[Y++],done:!q}}};throw new TypeError(K?"Object is not iterable.":"Symbol.iterator is not defined.")}function ot(q,K){var z="function"==typeof Symbol&&q[Symbol.iterator];if(!z)return q;var Y,Q,X=z.call(q),Z=[];try{for(;(void 0===K||K-- >0)&&!(Y=X.next()).done;)Z.push(Y.value)}catch(J){Q={error:J}}finally{try{Y&&!Y.done&&(z=X.return)&&z.call(X)}finally{if(Q)throw Q.error}}return Z}function ht(){for(var q=[],K=0;K1||J(q,K)}))})}function J(q,K){try{(z=Q[q](K)).value instanceof lt?Promise.resolve(z.value.v).then(tt,et):it(X[0][2],z)}catch(e){it(X[0][3],e)}var z}function tt(q){J("next",q)}function et(q){J("throw",q)}function it(q,K){q(K),X.shift(),X.length&&J(X[0][0],X[0][1])}}function ft(q){var K,z;return K={},Y("next"),Y("throw",(function(q){throw q})),Y("return"),K[Symbol.iterator]=function(){return this},K;function Y(Y,Q){K[Y]=q[Y]?function(K){return(z=!z)?{value:lt(q[Y](K)),done:"return"===Y}:Q?Q(K):K}:Q}}function bt(q){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var K,z=q[Symbol.asyncIterator];return z?z.call(q):(q=rt(q),K={},Y("next"),Y("throw"),Y("return"),K[Symbol.asyncIterator]=function(){return this},K);function Y(z){K[z]=q[z]&&function(K){return new Promise((function(Y,Q){(function(q,K,z,Y){Promise.resolve(Y).then((function(K){q({value:K,done:z})}),K)})(Y,Q,(K=q[z](K)).done,K.value)}))}}}function pt(q,K){return Object.defineProperty?Object.defineProperty(q,"raw",{value:K}):q.raw=K,q}var vt=Object.create?function(q,K){Object.defineProperty(q,"default",{enumerable:!0,value:K})}:function(q,K){q.default=K};function gt(q){if(q&&q.__esModule)return q;var K={};if(null!=q)for(var z in q)"default"!==z&&Object.prototype.hasOwnProperty.call(q,z)&&nt(K,q,z);return vt(K,q),K}function mt(q){return q&&q.__esModule?q:{default:q}}function yt(q,K,z,Y){if("a"===z&&!Y)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof K?q!==K||!Y:!K.has(q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===z?Y:"a"===z?Y.call(q):Y?Y.value:K.get(q)}function _t(q,K,z,Y,Q){if("m"===Y)throw new TypeError("Private method is not writable");if("a"===Y&&!Q)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof K?q!==K||!Q:!K.has(q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===Y?Q.call(q,z):Q?Q.value=z:K.set(q,z),z}},18045:q=>{"use strict";q.exports=function(q,K){var z=new Array(arguments.length-1),Y=0,Q=2,X=!0;for(;Q{"use strict";var z=K;z.length=function(q){var K=q.length;if(!K)return 0;for(var z=0;--K%4>1&&"="===q.charAt(K);)++z;return Math.ceil(3*q.length)/4-z};for(var Y=new Array(64),Q=new Array(123),X=0;X<64;)Q[Y[X]=X<26?X+65:X<52?X+71:X<62?X-4:X-59|43]=X++;z.encode=function(q,K,z){for(var Q,X=null,Z=[],J=0,tt=0;K>2],Q=(3&et)<<4,tt=1;break;case 1:Z[J++]=Y[Q|et>>4],Q=(15&et)<<2,tt=2;break;case 2:Z[J++]=Y[Q|et>>6],Z[J++]=Y[63&et],tt=0}J>8191&&((X||(X=[])).push(String.fromCharCode.apply(String,Z)),J=0)}return tt&&(Z[J++]=Y[Q],Z[J++]=61,1===tt&&(Z[J++]=61)),X?(J&&X.push(String.fromCharCode.apply(String,Z.slice(0,J))),X.join("")):String.fromCharCode.apply(String,Z.slice(0,J))};var Z="invalid encoding";z.decode=function(q,K,z){for(var Y,X=z,J=0,tt=0;tt1)break;if(void 0===(et=Q[et]))throw Error(Z);switch(J){case 0:Y=et,J=1;break;case 1:K[z++]=Y<<2|(48&et)>>4,Y=et,J=2;break;case 2:K[z++]=(15&Y)<<4|(60&et)>>2,Y=et,J=3;break;case 3:K[z++]=(3&Y)<<6|et,J=0}}if(1===J)throw Error(Z);return z-X},z.test=function(q){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(q)}},24358:q=>{"use strict";function K(){this._listeners={}}q.exports=K,K.prototype.on=function(q,K,z){return(this._listeners[q]||(this._listeners[q]=[])).push({fn:K,ctx:z||this}),this},K.prototype.off=function(q,K){if(void 0===q)this._listeners={};else if(void 0===K)this._listeners[q]=[];else for(var z=this._listeners[q],Y=0;Y{"use strict";function K(q){return"undefined"!=typeof Float32Array?function(){var K=new Float32Array([-0]),z=new Uint8Array(K.buffer),Y=128===z[3];function Q(q,Y,Q){K[0]=q,Y[Q]=z[0],Y[Q+1]=z[1],Y[Q+2]=z[2],Y[Q+3]=z[3]}function X(q,Y,Q){K[0]=q,Y[Q]=z[3],Y[Q+1]=z[2],Y[Q+2]=z[1],Y[Q+3]=z[0]}function Z(q,Y){return z[0]=q[Y],z[1]=q[Y+1],z[2]=q[Y+2],z[3]=q[Y+3],K[0]}function J(q,Y){return z[3]=q[Y],z[2]=q[Y+1],z[1]=q[Y+2],z[0]=q[Y+3],K[0]}q.writeFloatLE=Y?Q:X,q.writeFloatBE=Y?X:Q,q.readFloatLE=Y?Z:J,q.readFloatBE=Y?J:Z}():function(){function K(q,K,z,Y){var Q=K<0?1:0;if(Q&&(K=-K),0===K)q(1/K>0?0:2147483648,z,Y);else if(isNaN(K))q(2143289344,z,Y);else if(K>34028234663852886e22)q((Q<<31|2139095040)>>>0,z,Y);else if(K<11754943508222875e-54)q((Q<<31|Math.round(K/1401298464324817e-60))>>>0,z,Y);else{var X=Math.floor(Math.log(K)/Math.LN2);q((Q<<31|X+127<<23|8388607&Math.round(K*Math.pow(2,-X)*8388608))>>>0,z,Y)}}function Z(q,K,z){var Y=q(K,z),Q=2*(Y>>31)+1,X=Y>>>23&255,Z=8388607&Y;return 255===X?Z?NaN:Q*(1/0):0===X?1401298464324817e-60*Q*Z:Q*Math.pow(2,X-150)*(Z+8388608)}q.writeFloatLE=K.bind(null,z),q.writeFloatBE=K.bind(null,Y),q.readFloatLE=Z.bind(null,Q),q.readFloatBE=Z.bind(null,X)}(),"undefined"!=typeof Float64Array?function(){var K=new Float64Array([-0]),z=new Uint8Array(K.buffer),Y=128===z[7];function Q(q,Y,Q){K[0]=q,Y[Q]=z[0],Y[Q+1]=z[1],Y[Q+2]=z[2],Y[Q+3]=z[3],Y[Q+4]=z[4],Y[Q+5]=z[5],Y[Q+6]=z[6],Y[Q+7]=z[7]}function X(q,Y,Q){K[0]=q,Y[Q]=z[7],Y[Q+1]=z[6],Y[Q+2]=z[5],Y[Q+3]=z[4],Y[Q+4]=z[3],Y[Q+5]=z[2],Y[Q+6]=z[1],Y[Q+7]=z[0]}function Z(q,Y){return z[0]=q[Y],z[1]=q[Y+1],z[2]=q[Y+2],z[3]=q[Y+3],z[4]=q[Y+4],z[5]=q[Y+5],z[6]=q[Y+6],z[7]=q[Y+7],K[0]}function J(q,Y){return z[7]=q[Y],z[6]=q[Y+1],z[5]=q[Y+2],z[4]=q[Y+3],z[3]=q[Y+4],z[2]=q[Y+5],z[1]=q[Y+6],z[0]=q[Y+7],K[0]}q.writeDoubleLE=Y?Q:X,q.writeDoubleBE=Y?X:Q,q.readDoubleLE=Y?Z:J,q.readDoubleBE=Y?J:Z}():function(){function K(q,K,z,Y,Q,X){var Z=Y<0?1:0;if(Z&&(Y=-Y),0===Y)q(0,Q,X+K),q(1/Y>0?0:2147483648,Q,X+z);else if(isNaN(Y))q(0,Q,X+K),q(2146959360,Q,X+z);else if(Y>17976931348623157e292)q(0,Q,X+K),q((Z<<31|2146435072)>>>0,Q,X+z);else{var J;if(Y<22250738585072014e-324)q((J=Y/5e-324)>>>0,Q,X+K),q((Z<<31|J/4294967296)>>>0,Q,X+z);else{var tt=Math.floor(Math.log(Y)/Math.LN2);1024===tt&&(tt=1023),q(4503599627370496*(J=Y*Math.pow(2,-tt))>>>0,Q,X+K),q((Z<<31|tt+1023<<20|1048576*J&1048575)>>>0,Q,X+z)}}}function Z(q,K,z,Y,Q){var X=q(Y,Q+K),Z=q(Y,Q+z),J=2*(Z>>31)+1,tt=Z>>>20&2047,et=4294967296*(1048575&Z)+X;return 2047===tt?et?NaN:J*(1/0):0===tt?5e-324*J*et:J*Math.pow(2,tt-1075)*(et+4503599627370496)}q.writeDoubleLE=K.bind(null,z,0,4),q.writeDoubleBE=K.bind(null,Y,4,0),q.readDoubleLE=Z.bind(null,Q,0,4),q.readDoubleBE=Z.bind(null,X,4,0)}(),q}function z(q,K,z){K[z]=255&q,K[z+1]=q>>>8&255,K[z+2]=q>>>16&255,K[z+3]=q>>>24}function Y(q,K,z){K[z]=q>>>24,K[z+1]=q>>>16&255,K[z+2]=q>>>8&255,K[z+3]=255&q}function Q(q,K){return(q[K]|q[K+1]<<8|q[K+2]<<16|q[K+3]<<24)>>>0}function X(q,K){return(q[K]<<24|q[K+1]<<16|q[K+2]<<8|q[K+3])>>>0}q.exports=K(K)},84153:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},99390:q=>{"use strict";q.exports=function(q,K,z){var Y=z||8192,Q=Y>>>1,X=null,Z=Y;return function(z){if(z<1||z>Q)return q(z);Z+z>Y&&(X=q(Y),Z=0);var J=K.call(X,Z,Z+=z);return 7&Z&&(Z=1+(7|Z)),J}}},81447:(q,K)=>{"use strict";var z=K;z.length=function(q){for(var K=0,z=0,Y=0;Y191&&Y<224?X[Z++]=(31&Y)<<6|63&q[K++]:Y>239&&Y<365?(Y=((7&Y)<<18|(63&q[K++])<<12|(63&q[K++])<<6|63&q[K++])-65536,X[Z++]=55296+(Y>>10),X[Z++]=56320+(1023&Y)):X[Z++]=(15&Y)<<12|(63&q[K++])<<6|63&q[K++],Z>8191&&((Q||(Q=[])).push(String.fromCharCode.apply(String,X)),Z=0);return Q?(Z&&Q.push(String.fromCharCode.apply(String,X.slice(0,Z))),Q.join("")):String.fromCharCode.apply(String,X.slice(0,Z))},z.write=function(q,K,z){for(var Y,Q,X=z,Z=0;Z>6|192,K[z++]=63&Y|128):55296==(64512&Y)&&56320==(64512&(Q=q.charCodeAt(Z+1)))?(Y=65536+((1023&Y)<<10)+(1023&Q),++Z,K[z++]=Y>>18|240,K[z++]=Y>>12&63|128,K[z++]=Y>>6&63|128,K[z++]=63&Y|128):(K[z++]=Y>>12|224,K[z++]=Y>>6&63|128,K[z++]=63&Y|128);return z-X}},89187:(q,K,z)=>{const Y=z(72237);class Q extends Y{constructor(q,K,z,Y){super(),this.PENDING=Q.PENDING,this.SUBSCRIBED=Q.SUBSCRIBED,this.UNSUBSCRIBED=Q.UNSUBSCRIBED,this.name=q,this.client=K,this._eventDemux=z,this._dataStream=Y.stream(this.name)}createConsumer(q){return this._dataStream.createConsumer(q)}listener(q){return this._eventDemux.stream(`${this.name}/${q}`)}close(){this.client.closeChannel(this.name)}kill(){this.client.killChannel(this.name)}killOutputConsumer(q){this.hasOutputConsumer(q)&&this.client.killChannelOutputConsumer(q)}killListenerConsumer(q){this.hasAnyListenerConsumer(q)&&this.client.killChannelListenerConsumer(q)}getOutputConsumerStats(q){if(this.hasOutputConsumer(q))return this.client.getChannelOutputConsumerStats(q)}getListenerConsumerStats(q){if(this.hasAnyListenerConsumer(q))return this.client.getChannelListenerConsumerStats(q)}getBackpressure(){return this.client.getChannelBackpressure(this.name)}getListenerConsumerBackpressure(q){return this.hasAnyListenerConsumer(q)?this.client.getChannelListenerConsumerBackpressure(q):0}getOutputConsumerBackpressure(q){return this.hasOutputConsumer(q)?this.client.getChannelOutputConsumerBackpressure(q):0}closeOutput(){this.client.channelCloseOutput(this.name)}closeListener(q){this.client.channelCloseListener(this.name,q)}closeAllListeners(){this.client.channelCloseAllListeners(this.name)}killOutput(){this.client.channelKillOutput(this.name)}killListener(q){this.client.channelKillListener(this.name,q)}killAllListeners(){this.client.channelKillAllListeners(this.name)}getOutputConsumerStatsList(){return this.client.channelGetOutputConsumerStatsList(this.name)}getListenerConsumerStatsList(q){return this.client.channelGetListenerConsumerStatsList(this.name,q)}getAllListenersConsumerStatsList(){return this.client.channelGetAllListenersConsumerStatsList(this.name)}getOutputBackpressure(){return this.client.channelGetOutputBackpressure(this.name)}getListenerBackpressure(q){return this.client.channelGetListenerBackpressure(this.name,q)}getAllListenersBackpressure(){return this.client.channelGetAllListenersBackpressure(this.name)}hasOutputConsumer(q){return this.client.channelHasOutputConsumer(this.name,q)}hasListenerConsumer(q,K){return this.client.channelHasListenerConsumer(this.name,q,K)}hasAnyListenerConsumer(q){return this.client.channelHasAnyListenerConsumer(this.name,q)}get state(){return this.client.getChannelState(this.name)}set state(q){throw new Error("Cannot directly set channel state")}get options(){return this.client.getChannelOptions(this.name)}set options(q){throw new Error("Cannot directly set channel options")}subscribe(q){this.client.subscribe(this.name,q)}unsubscribe(){this.client.unsubscribe(this.name)}isSubscribed(q){return this.client.isSubscribed(this.name,q)}transmitPublish(q){return this.client.transmitPublish(this.name,q)}invokePublish(q){return this.client.invokePublish(this.name,q)}}Q.PENDING="pending",Q.SUBSCRIBED="subscribed",Q.UNSUBSCRIBED="unsubscribed",q.exports=Q},27445:(q,K,z)=>{const Y=z(97605),Q=Y.InvalidActionError;q.exports=function(q,K,z,X){this.socket=q,this.id=K,this.procedure=z,this.data=X,this.sent=!1,this._respond=(q,K)=>{if(this.sent)throw new Q(`Response to request ${this.id} has already been sent`);this.sent=!0,this.socket.sendObject(q,K)},this.end=(q,K)=>{let z={rid:this.id};void 0!==q&&(z.data=q),this._respond(z,K)},this.error=(q,K)=>{let z={rid:this.id,error:Y.dehydrateError(q)};this._respond(z,K)}}},72641:(q,K,z)=>{const Y=z(47579);function Q(q){this._listenerDemux=new Y}Q.prototype.emit=function(q,K){this._listenerDemux.write(q,K)},Q.prototype.listener=function(q){return this._listenerDemux.stream(q)},Q.prototype.closeListener=function(q){this._listenerDemux.close(q)},Q.prototype.closeAllListeners=function(){this._listenerDemux.closeAll()},Q.prototype.removeListener=function(q){this._listenerDemux.unstream(q)},Q.prototype.getListenerConsumerStats=function(q){return this._listenerDemux.getConsumerStats(q)},Q.prototype.getListenerConsumerStatsList=function(q){return this._listenerDemux.getConsumerStatsList(q)},Q.prototype.getAllListenersConsumerStatsList=function(){return this._listenerDemux.getConsumerStatsListAll()},Q.prototype.getListenerConsumerCount=function(q){return this._listenerDemux.getConsumerCount(q)},Q.prototype.getAllListenersConsumerCount=function(){return this._listenerDemux.getConsumerCountAll()},Q.prototype.killListener=function(q){this._listenerDemux.kill(q)},Q.prototype.killAllListeners=function(){this._listenerDemux.killAll()},Q.prototype.killListenerConsumer=function(q){this._listenerDemux.killConsumer(q)},Q.prototype.getListenerBackpressure=function(q){return this._listenerDemux.getBackpressure(q)},Q.prototype.getAllListenersBackpressure=function(){return this._listenerDemux.getBackpressureAll()},Q.prototype.getListenerConsumerBackpressure=function(q){return this._listenerDemux.getConsumerBackpressure(q)},Q.prototype.hasListenerConsumer=function(q,K){return this._listenerDemux.hasConsumer(q,K)},Q.prototype.hasAnyListenerConsumer=function(q){return this._listenerDemux.hasConsumerAll(q)},q.exports=Q},67526:(q,K)=>{"use strict";K.byteLength=function(q){var K=tt(q),z=K[0],Y=K[1];return 3*(z+Y)/4-Y},K.toByteArray=function(q){var K,z,X=tt(q),Z=X[0],J=X[1],et=new Q(function(q,K,z){return 3*(K+z)/4-z}(0,Z,J)),it=0,st=J>0?Z-4:Z;for(z=0;z>16&255,et[it++]=K>>8&255,et[it++]=255&K;2===J&&(K=Y[q.charCodeAt(z)]<<2|Y[q.charCodeAt(z+1)]>>4,et[it++]=255&K);1===J&&(K=Y[q.charCodeAt(z)]<<10|Y[q.charCodeAt(z+1)]<<4|Y[q.charCodeAt(z+2)]>>2,et[it++]=K>>8&255,et[it++]=255&K);return et},K.fromByteArray=function(q){for(var K,Y=q.length,Q=Y%3,X=[],Z=16383,J=0,tt=Y-Q;Jtt?tt:J+Z));1===Q?(K=q[Y-1],X.push(z[K>>2]+z[K<<4&63]+"==")):2===Q&&(K=(q[Y-2]<<8)+q[Y-1],X.push(z[K>>10]+z[K>>4&63]+z[K<<2&63]+"="));return X.join("")};for(var z=[],Y=[],Q="undefined"!=typeof Uint8Array?Uint8Array:Array,X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Z=0,J=X.length;Z0)throw new Error("Invalid string. Length must be a multiple of 4");var z=q.indexOf("=");return-1===z&&(z=K),[z,z===K?0:4-z%4]}function et(q,K,Y){for(var Q,X,Z=[],J=K;J>18&63]+z[X>>12&63]+z[X>>6&63]+z[63&X]);return Z.join("")}Y["-".charCodeAt(0)]=62,Y["_".charCodeAt(0)]=63},46880:function(q){q.exports=function(q){var K={};function z(Y){if(K[Y])return K[Y].exports;var Q=K[Y]={i:Y,l:!1,exports:{}};return q[Y].call(Q.exports,Q,Q.exports,z),Q.l=!0,Q.exports}return z.m=q,z.c=K,z.d=function(q,K,Y){z.o(q,K)||Object.defineProperty(q,K,{enumerable:!0,get:Y})},z.r=function(q){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(q,"__esModule",{value:!0})},z.t=function(q,K){if(1&K&&(q=z(q)),8&K)return q;if(4&K&&"object"==typeof q&&q&&q.__esModule)return q;var Y=Object.create(null);if(z.r(Y),Object.defineProperty(Y,"default",{enumerable:!0,value:q}),2&K&&"string"!=typeof q)for(var Q in q)z.d(Y,Q,function(K){return q[K]}.bind(null,Q));return Y},z.n=function(q){var K=q&&q.__esModule?function(){return q.default}:function(){return q};return z.d(K,"a",K),K},z.o=function(q,K){return Object.prototype.hasOwnProperty.call(q,K)},z.p="",z(z.s=90)}({17:function(q,K,z){"use strict";K.__esModule=!0,K.default=void 0;var Y=z(18),Q=function(){function q(){}return q.getFirstMatch=function(q,K){var z=K.match(q);return z&&z.length>0&&z[1]||""},q.getSecondMatch=function(q,K){var z=K.match(q);return z&&z.length>1&&z[2]||""},q.matchAndReturnConst=function(q,K,z){if(q.test(K))return z},q.getWindowsVersionName=function(q){switch(q){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},q.getMacOSVersionName=function(q){var K=q.split(".").splice(0,2).map((function(q){return parseInt(q,10)||0}));if(K.push(0),10===K[0])switch(K[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},q.getAndroidVersionName=function(q){var K=q.split(".").splice(0,2).map((function(q){return parseInt(q,10)||0}));if(K.push(0),!(1===K[0]&&K[1]<5))return 1===K[0]&&K[1]<6?"Cupcake":1===K[0]&&K[1]>=6?"Donut":2===K[0]&&K[1]<2?"Eclair":2===K[0]&&2===K[1]?"Froyo":2===K[0]&&K[1]>2?"Gingerbread":3===K[0]?"Honeycomb":4===K[0]&&K[1]<1?"Ice Cream Sandwich":4===K[0]&&K[1]<4?"Jelly Bean":4===K[0]&&K[1]>=4?"KitKat":5===K[0]?"Lollipop":6===K[0]?"Marshmallow":7===K[0]?"Nougat":8===K[0]?"Oreo":9===K[0]?"Pie":void 0},q.getVersionPrecision=function(q){return q.split(".").length},q.compareVersions=function(K,z,Y){void 0===Y&&(Y=!1);var Q=q.getVersionPrecision(K),X=q.getVersionPrecision(z),Z=Math.max(Q,X),J=0,tt=q.map([K,z],(function(K){var z=Z-q.getVersionPrecision(K),Y=K+new Array(z+1).join(".0");return q.map(Y.split("."),(function(q){return new Array(20-q.length).join("0")+q})).reverse()}));for(Y&&(J=Z-Math.min(Q,X)),Z-=1;Z>=J;){if(tt[0][Z]>tt[1][Z])return 1;if(tt[0][Z]===tt[1][Z]){if(Z===J)return 0;Z-=1}else if(tt[0][Z]1?Q-1:0),Z=1;Z0){var Z=Object.keys(z),tt=J.default.find(Z,(function(q){return K.isOS(q)}));if(tt){var et=this.satisfies(z[tt]);if(void 0!==et)return et}var it=J.default.find(Z,(function(q){return K.isPlatform(q)}));if(it){var st=this.satisfies(z[it]);if(void 0!==st)return st}}if(X>0){var nt=Object.keys(Q),at=J.default.find(nt,(function(q){return K.isBrowser(q,!0)}));if(void 0!==at)return this.compareVersion(Q[at])}},K.isBrowser=function(q,K){void 0===K&&(K=!1);var z=this.getBrowserName().toLowerCase(),Y=q.toLowerCase(),Q=J.default.getBrowserTypeByAlias(Y);return K&&Q&&(Y=Q.toLowerCase()),Y===z},K.compareVersion=function(q){var K=[0],z=q,Y=!1,Q=this.getBrowserVersion();if("string"==typeof Q)return">"===q[0]||"<"===q[0]?(z=q.substr(1),"="===q[1]?(Y=!0,z=q.substr(2)):K=[],">"===q[0]?K.push(1):K.push(-1)):"="===q[0]?z=q.substr(1):"~"===q[0]&&(Y=!0,z=q.substr(1)),K.indexOf(J.default.compareVersions(Q,z,Y))>-1},K.isOS=function(q){return this.getOSName(!0)===String(q).toLowerCase()},K.isPlatform=function(q){return this.getPlatformType(!0)===String(q).toLowerCase()},K.isEngine=function(q){return this.getEngineName(!0)===String(q).toLowerCase()},K.is=function(q,K){return void 0===K&&(K=!1),this.isBrowser(q,K)||this.isOS(q)||this.isPlatform(q)},K.some=function(q){var K=this;return void 0===q&&(q=[]),q.some((function(q){return K.is(q)}))},q}();K.default=et,q.exports=K.default},92:function(q,K,z){"use strict";K.__esModule=!0,K.default=void 0;var Y,Q=(Y=z(17))&&Y.__esModule?Y:{default:Y},X=/version\/(\d+(\.?_?\d+)+)/i,Z=[{test:[/googlebot/i],describe:function(q){var K={name:"Googlebot"},z=Q.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/opera/i],describe:function(q){var K={name:"Opera"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/opr\/|opios/i],describe:function(q){var K={name:"Opera"},z=Q.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/SamsungBrowser/i],describe:function(q){var K={name:"Samsung Internet for Android"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/Whale/i],describe:function(q){var K={name:"NAVER Whale Browser"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/MZBrowser/i],describe:function(q){var K={name:"MZ Browser"},z=Q.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/focus/i],describe:function(q){var K={name:"Focus"},z=Q.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/swing/i],describe:function(q){var K={name:"Swing"},z=Q.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/coast/i],describe:function(q){var K={name:"Opera Coast"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(q){var K={name:"Opera Touch"},z=Q.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/yabrowser/i],describe:function(q){var K={name:"Yandex Browser"},z=Q.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/ucbrowser/i],describe:function(q){var K={name:"UC Browser"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/Maxthon|mxios/i],describe:function(q){var K={name:"Maxthon"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/epiphany/i],describe:function(q){var K={name:"Epiphany"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/puffin/i],describe:function(q){var K={name:"Puffin"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/sleipnir/i],describe:function(q){var K={name:"Sleipnir"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/k-meleon/i],describe:function(q){var K={name:"K-Meleon"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/micromessenger/i],describe:function(q){var K={name:"WeChat"},z=Q.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/qqbrowser/i],describe:function(q){var K={name:/qqbrowserlite/i.test(q)?"QQ Browser Lite":"QQ Browser"},z=Q.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/msie|trident/i],describe:function(q){var K={name:"Internet Explorer"},z=Q.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/\sedg\//i],describe:function(q){var K={name:"Microsoft Edge"},z=Q.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/edg([ea]|ios)/i],describe:function(q){var K={name:"Microsoft Edge"},z=Q.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/vivaldi/i],describe:function(q){var K={name:"Vivaldi"},z=Q.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/seamonkey/i],describe:function(q){var K={name:"SeaMonkey"},z=Q.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/sailfish/i],describe:function(q){var K={name:"Sailfish"},z=Q.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,q);return z&&(K.version=z),K}},{test:[/silk/i],describe:function(q){var K={name:"Amazon Silk"},z=Q.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/phantom/i],describe:function(q){var K={name:"PhantomJS"},z=Q.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/slimerjs/i],describe:function(q){var K={name:"SlimerJS"},z=Q.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(q){var K={name:"BlackBerry"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/(web|hpw)[o0]s/i],describe:function(q){var K={name:"WebOS Browser"},z=Q.default.getFirstMatch(X,q)||Q.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/bada/i],describe:function(q){var K={name:"Bada"},z=Q.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/tizen/i],describe:function(q){var K={name:"Tizen"},z=Q.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/qupzilla/i],describe:function(q){var K={name:"QupZilla"},z=Q.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/firefox|iceweasel|fxios/i],describe:function(q){var K={name:"Firefox"},z=Q.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/electron/i],describe:function(q){var K={name:"Electron"},z=Q.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/MiuiBrowser/i],describe:function(q){var K={name:"Miui"},z=Q.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/chromium/i],describe:function(q){var K={name:"Chromium"},z=Q.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,q)||Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/chrome|crios|crmo/i],describe:function(q){var K={name:"Chrome"},z=Q.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/GSA/i],describe:function(q){var K={name:"Google Search"},z=Q.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:function(q){var K=!q.test(/like android/i),z=q.test(/android/i);return K&&z},describe:function(q){var K={name:"Android Browser"},z=Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/playstation 4/i],describe:function(q){var K={name:"PlayStation 4"},z=Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/safari|applewebkit/i],describe:function(q){var K={name:"Safari"},z=Q.default.getFirstMatch(X,q);return z&&(K.version=z),K}},{test:[/.*/i],describe:function(q){var K=-1!==q.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:Q.default.getFirstMatch(K,q),version:Q.default.getSecondMatch(K,q)}}}];K.default=Z,q.exports=K.default},93:function(q,K,z){"use strict";K.__esModule=!0,K.default=void 0;var Y,Q=(Y=z(17))&&Y.__esModule?Y:{default:Y},X=z(18),Z=[{test:[/Roku\/DVP/],describe:function(q){var K=Q.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,q);return{name:X.OS_MAP.Roku,version:K}}},{test:[/windows phone/i],describe:function(q){var K=Q.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,q);return{name:X.OS_MAP.WindowsPhone,version:K}}},{test:[/windows /i],describe:function(q){var K=Q.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,q),z=Q.default.getWindowsVersionName(K);return{name:X.OS_MAP.Windows,version:K,versionName:z}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(q){var K={name:X.OS_MAP.iOS},z=Q.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,q);return z&&(K.version=z),K}},{test:[/macintosh/i],describe:function(q){var K=Q.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,q).replace(/[_\s]/g,"."),z=Q.default.getMacOSVersionName(K),Y={name:X.OS_MAP.MacOS,version:K};return z&&(Y.versionName=z),Y}},{test:[/(ipod|iphone|ipad)/i],describe:function(q){var K=Q.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,q).replace(/[_\s]/g,".");return{name:X.OS_MAP.iOS,version:K}}},{test:function(q){var K=!q.test(/like android/i),z=q.test(/android/i);return K&&z},describe:function(q){var K=Q.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,q),z=Q.default.getAndroidVersionName(K),Y={name:X.OS_MAP.Android,version:K};return z&&(Y.versionName=z),Y}},{test:[/(web|hpw)[o0]s/i],describe:function(q){var K=Q.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,q),z={name:X.OS_MAP.WebOS};return K&&K.length&&(z.version=K),z}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(q){var K=Q.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,q)||Q.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,q)||Q.default.getFirstMatch(/\bbb(\d+)/i,q);return{name:X.OS_MAP.BlackBerry,version:K}}},{test:[/bada/i],describe:function(q){var K=Q.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,q);return{name:X.OS_MAP.Bada,version:K}}},{test:[/tizen/i],describe:function(q){var K=Q.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,q);return{name:X.OS_MAP.Tizen,version:K}}},{test:[/linux/i],describe:function(){return{name:X.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:X.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(q){var K=Q.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,q);return{name:X.OS_MAP.PlayStation4,version:K}}}];K.default=Z,q.exports=K.default},94:function(q,K,z){"use strict";K.__esModule=!0,K.default=void 0;var Y,Q=(Y=z(17))&&Y.__esModule?Y:{default:Y},X=z(18),Z=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(q){var K=Q.default.getFirstMatch(/(can-l01)/i,q)&&"Nova",z={type:X.PLATFORMS_MAP.mobile,vendor:"Huawei"};return K&&(z.model=K),z}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:X.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:X.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:X.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:X.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:X.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:X.PLATFORMS_MAP.tablet}}},{test:function(q){var K=q.test(/ipod|iphone/i),z=q.test(/like (ipod|iphone)/i);return K&&!z},describe:function(q){var K=Q.default.getFirstMatch(/(ipod|iphone)/i,q);return{type:X.PLATFORMS_MAP.mobile,vendor:"Apple",model:K}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:X.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:X.PLATFORMS_MAP.mobile}}},{test:function(q){return"blackberry"===q.getBrowserName(!0)},describe:function(){return{type:X.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(q){return"bada"===q.getBrowserName(!0)},describe:function(){return{type:X.PLATFORMS_MAP.mobile}}},{test:function(q){return"windows phone"===q.getBrowserName()},describe:function(){return{type:X.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(q){var K=Number(String(q.getOSVersion()).split(".")[0]);return"android"===q.getOSName(!0)&&K>=3},describe:function(){return{type:X.PLATFORMS_MAP.tablet}}},{test:function(q){return"android"===q.getOSName(!0)},describe:function(){return{type:X.PLATFORMS_MAP.mobile}}},{test:function(q){return"macos"===q.getOSName(!0)},describe:function(){return{type:X.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(q){return"windows"===q.getOSName(!0)},describe:function(){return{type:X.PLATFORMS_MAP.desktop}}},{test:function(q){return"linux"===q.getOSName(!0)},describe:function(){return{type:X.PLATFORMS_MAP.desktop}}},{test:function(q){return"playstation 4"===q.getOSName(!0)},describe:function(){return{type:X.PLATFORMS_MAP.tv}}},{test:function(q){return"roku"===q.getOSName(!0)},describe:function(){return{type:X.PLATFORMS_MAP.tv}}}];K.default=Z,q.exports=K.default},95:function(q,K,z){"use strict";K.__esModule=!0,K.default=void 0;var Y,Q=(Y=z(17))&&Y.__esModule?Y:{default:Y},X=z(18),Z=[{test:function(q){return"microsoft edge"===q.getBrowserName(!0)},describe:function(q){if(/\sedg\//i.test(q))return{name:X.ENGINE_MAP.Blink};var K=Q.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,q);return{name:X.ENGINE_MAP.EdgeHTML,version:K}}},{test:[/trident/i],describe:function(q){var K={name:X.ENGINE_MAP.Trident},z=Q.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:function(q){return q.test(/presto/i)},describe:function(q){var K={name:X.ENGINE_MAP.Presto},z=Q.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:function(q){var K=q.test(/gecko/i),z=q.test(/like gecko/i);return K&&!z},describe:function(q){var K={name:X.ENGINE_MAP.Gecko},z=Q.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:X.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(q){var K={name:X.ENGINE_MAP.WebKit},z=Q.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,q);return z&&(K.version=z),K}}];K.default=Z,q.exports=K.default}})},48287:(q,K,z)=>{"use strict";var Y=z(67526),Q=z(251),X="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;K.hp=tt,K.IS=50;var Z=2147483647;function J(q){if(q>Z)throw new RangeError('The value "'+q+'" is invalid for option "size"');var K=new Uint8Array(q);return Object.setPrototypeOf(K,tt.prototype),K}function tt(q,K,z){if("number"==typeof q){if("string"==typeof K)throw new TypeError('The "string" argument must be of type string. Received type number');return st(q)}return et(q,K,z)}function et(q,K,z){if("string"==typeof q)return function(q,K){"string"==typeof K&&""!==K||(K="utf8");if(!tt.isEncoding(K))throw new TypeError("Unknown encoding: "+K);var z=0|ot(q,K),Y=J(z),Q=Y.write(q,K);Q!==z&&(Y=Y.slice(0,Q));return Y}(q,K);if(ArrayBuffer.isView(q))return function(q){if(Nt(q,Uint8Array)){var K=new Uint8Array(q);return at(K.buffer,K.byteOffset,K.byteLength)}return nt(q)}(q);if(null==q)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof q);if(Nt(q,ArrayBuffer)||q&&Nt(q.buffer,ArrayBuffer))return at(q,K,z);if("undefined"!=typeof SharedArrayBuffer&&(Nt(q,SharedArrayBuffer)||q&&Nt(q.buffer,SharedArrayBuffer)))return at(q,K,z);if("number"==typeof q)throw new TypeError('The "value" argument must not be of type number. Received type number');var Y=q.valueOf&&q.valueOf();if(null!=Y&&Y!==q)return tt.from(Y,K,z);var Q=function(q){if(tt.isBuffer(q)){var K=0|rt(q.length),z=J(K);return 0===z.length||q.copy(z,0,0,K),z}if(void 0!==q.length)return"number"!=typeof q.length||xt(q.length)?J(0):nt(q);if("Buffer"===q.type&&Array.isArray(q.data))return nt(q.data)}(q);if(Q)return Q;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof q[Symbol.toPrimitive])return tt.from(q[Symbol.toPrimitive]("string"),K,z);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof q)}function it(q){if("number"!=typeof q)throw new TypeError('"size" argument must be of type number');if(q<0)throw new RangeError('The value "'+q+'" is invalid for option "size"')}function st(q){return it(q),J(q<0?0:0|rt(q))}function nt(q){for(var K=q.length<0?0:0|rt(q.length),z=J(K),Y=0;Y=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|q}function ot(q,K){if(tt.isBuffer(q))return q.length;if(ArrayBuffer.isView(q)||Nt(q,ArrayBuffer))return q.byteLength;if("string"!=typeof q)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof q);var z=q.length,Y=arguments.length>2&&!0===arguments[2];if(!Y&&0===z)return 0;for(var Q=!1;;)switch(K){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return Rt(q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*z;case"hex":return z>>>1;case"base64":return Pt(q).length;default:if(Q)return Y?-1:Rt(q).length;K=(""+K).toLowerCase(),Q=!0}}function ht(q,K,z){var Y=!1;if((void 0===K||K<0)&&(K=0),K>this.length)return"";if((void 0===z||z>this.length)&&(z=this.length),z<=0)return"";if((z>>>=0)<=(K>>>=0))return"";for(q||(q="utf8");;)switch(q){case"hex":return wt(this,K,z);case"utf8":case"utf-8":return mt(this,K,z);case"ascii":return _t(this,K,z);case"latin1":case"binary":return Et(this,K,z);case"base64":return gt(this,K,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Tt(this,K,z);default:if(Y)throw new TypeError("Unknown encoding: "+q);q=(q+"").toLowerCase(),Y=!0}}function ct(q,K,z){var Y=q[K];q[K]=q[z],q[z]=Y}function dt(q,K,z,Y,Q){if(0===q.length)return-1;if("string"==typeof z?(Y=z,z=0):z>2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),xt(z=+z)&&(z=Q?0:q.length-1),z<0&&(z=q.length+z),z>=q.length){if(Q)return-1;z=q.length-1}else if(z<0){if(!Q)return-1;z=0}if("string"==typeof K&&(K=tt.from(K,Y)),tt.isBuffer(K))return 0===K.length?-1:lt(q,K,z,Y,Q);if("number"==typeof K)return K&=255,"function"==typeof Uint8Array.prototype.indexOf?Q?Uint8Array.prototype.indexOf.call(q,K,z):Uint8Array.prototype.lastIndexOf.call(q,K,z):lt(q,[K],z,Y,Q);throw new TypeError("val must be string, number or Buffer")}function lt(q,K,z,Y,Q){var X,Z=1,J=q.length,tt=K.length;if(void 0!==Y&&("ucs2"===(Y=String(Y).toLowerCase())||"ucs-2"===Y||"utf16le"===Y||"utf-16le"===Y)){if(q.length<2||K.length<2)return-1;Z=2,J/=2,tt/=2,z/=2}function et(q,K){return 1===Z?q[K]:q.readUInt16BE(K*Z)}if(Q){var it=-1;for(X=z;XJ&&(z=J-tt),X=z;X>=0;X--){for(var st=!0,nt=0;ntQ&&(Y=Q):Y=Q;var X=K.length;Y>X/2&&(Y=X/2);for(var Z=0;Z>8,Q=z%256,X.push(Q),X.push(Y);return X}(K,q.length-z),q,z,Y)}function gt(q,K,z){return 0===K&&z===q.length?Y.fromByteArray(q):Y.fromByteArray(q.slice(K,z))}function mt(q,K,z){z=Math.min(q.length,z);for(var Y=[],Q=K;Q239?4:et>223?3:et>191?2:1;if(Q+st<=z)switch(st){case 1:et<128&&(it=et);break;case 2:128==(192&(X=q[Q+1]))&&(tt=(31&et)<<6|63&X)>127&&(it=tt);break;case 3:X=q[Q+1],Z=q[Q+2],128==(192&X)&&128==(192&Z)&&(tt=(15&et)<<12|(63&X)<<6|63&Z)>2047&&(tt<55296||tt>57343)&&(it=tt);break;case 4:X=q[Q+1],Z=q[Q+2],J=q[Q+3],128==(192&X)&&128==(192&Z)&&128==(192&J)&&(tt=(15&et)<<18|(63&X)<<12|(63&Z)<<6|63&J)>65535&&tt<1114112&&(it=tt)}null===it?(it=65533,st=1):it>65535&&(it-=65536,Y.push(it>>>10&1023|55296),it=56320|1023&it),Y.push(it),Q+=st}return function(q){var K=q.length;if(K<=yt)return String.fromCharCode.apply(String,q);var z="",Y=0;for(;YY.length?tt.from(X).copy(Y,Q):Uint8Array.prototype.set.call(Y,X,Q);else{if(!tt.isBuffer(X))throw new TypeError('"list" argument must be an Array of Buffers');X.copy(Y,Q)}Q+=X.length}return Y},tt.byteLength=ot,tt.prototype._isBuffer=!0,tt.prototype.swap16=function(){var q=this.length;if(q%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var K=0;Kz&&(q+=" ... "),""},X&&(tt.prototype[X]=tt.prototype.inspect),tt.prototype.compare=function(q,K,z,Y,Q){if(Nt(q,Uint8Array)&&(q=tt.from(q,q.offset,q.byteLength)),!tt.isBuffer(q))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof q);if(void 0===K&&(K=0),void 0===z&&(z=q?q.length:0),void 0===Y&&(Y=0),void 0===Q&&(Q=this.length),K<0||z>q.length||Y<0||Q>this.length)throw new RangeError("out of range index");if(Y>=Q&&K>=z)return 0;if(Y>=Q)return-1;if(K>=z)return 1;if(this===q)return 0;for(var X=(Q>>>=0)-(Y>>>=0),Z=(z>>>=0)-(K>>>=0),J=Math.min(X,Z),et=this.slice(Y,Q),it=q.slice(K,z),st=0;st>>=0,isFinite(z)?(z>>>=0,void 0===Y&&(Y="utf8")):(Y=z,z=void 0)}var Q=this.length-K;if((void 0===z||z>Q)&&(z=Q),q.length>0&&(z<0||K<0)||K>this.length)throw new RangeError("Attempt to write outside buffer bounds");Y||(Y="utf8");for(var X=!1;;)switch(Y){case"hex":return ut(this,q,K,z);case"utf8":case"utf-8":return ft(this,q,K,z);case"ascii":case"latin1":case"binary":return bt(this,q,K,z);case"base64":return pt(this,q,K,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vt(this,q,K,z);default:if(X)throw new TypeError("Unknown encoding: "+Y);Y=(""+Y).toLowerCase(),X=!0}},tt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var yt=4096;function _t(q,K,z){var Y="";z=Math.min(q.length,z);for(var Q=K;QY)&&(z=Y);for(var Q="",X=K;Xz)throw new RangeError("Trying to access beyond buffer length")}function At(q,K,z,Y,Q,X){if(!tt.isBuffer(q))throw new TypeError('"buffer" argument must be a Buffer instance');if(K>Q||Kq.length)throw new RangeError("Index out of range")}function Ct(q,K,z,Y,Q,X){if(z+Y>q.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function Ot(q,K,z,Y,X){return K=+K,z>>>=0,X||Ct(q,0,z,4),Q.write(q,K,z,Y,23,4),z+4}function It(q,K,z,Y,X){return K=+K,z>>>=0,X||Ct(q,0,z,8),Q.write(q,K,z,Y,52,8),z+8}tt.prototype.slice=function(q,K){var z=this.length;(q=~~q)<0?(q+=z)<0&&(q=0):q>z&&(q=z),(K=void 0===K?z:~~K)<0?(K+=z)<0&&(K=0):K>z&&(K=z),K>>=0,K>>>=0,z||St(q,K,this.length);for(var Y=this[q],Q=1,X=0;++X>>=0,K>>>=0,z||St(q,K,this.length);for(var Y=this[q+--K],Q=1;K>0&&(Q*=256);)Y+=this[q+--K]*Q;return Y},tt.prototype.readUint8=tt.prototype.readUInt8=function(q,K){return q>>>=0,K||St(q,1,this.length),this[q]},tt.prototype.readUint16LE=tt.prototype.readUInt16LE=function(q,K){return q>>>=0,K||St(q,2,this.length),this[q]|this[q+1]<<8},tt.prototype.readUint16BE=tt.prototype.readUInt16BE=function(q,K){return q>>>=0,K||St(q,2,this.length),this[q]<<8|this[q+1]},tt.prototype.readUint32LE=tt.prototype.readUInt32LE=function(q,K){return q>>>=0,K||St(q,4,this.length),(this[q]|this[q+1]<<8|this[q+2]<<16)+16777216*this[q+3]},tt.prototype.readUint32BE=tt.prototype.readUInt32BE=function(q,K){return q>>>=0,K||St(q,4,this.length),16777216*this[q]+(this[q+1]<<16|this[q+2]<<8|this[q+3])},tt.prototype.readIntLE=function(q,K,z){q>>>=0,K>>>=0,z||St(q,K,this.length);for(var Y=this[q],Q=1,X=0;++X=(Q*=128)&&(Y-=Math.pow(2,8*K)),Y},tt.prototype.readIntBE=function(q,K,z){q>>>=0,K>>>=0,z||St(q,K,this.length);for(var Y=K,Q=1,X=this[q+--Y];Y>0&&(Q*=256);)X+=this[q+--Y]*Q;return X>=(Q*=128)&&(X-=Math.pow(2,8*K)),X},tt.prototype.readInt8=function(q,K){return q>>>=0,K||St(q,1,this.length),128&this[q]?-1*(255-this[q]+1):this[q]},tt.prototype.readInt16LE=function(q,K){q>>>=0,K||St(q,2,this.length);var z=this[q]|this[q+1]<<8;return 32768&z?4294901760|z:z},tt.prototype.readInt16BE=function(q,K){q>>>=0,K||St(q,2,this.length);var z=this[q+1]|this[q]<<8;return 32768&z?4294901760|z:z},tt.prototype.readInt32LE=function(q,K){return q>>>=0,K||St(q,4,this.length),this[q]|this[q+1]<<8|this[q+2]<<16|this[q+3]<<24},tt.prototype.readInt32BE=function(q,K){return q>>>=0,K||St(q,4,this.length),this[q]<<24|this[q+1]<<16|this[q+2]<<8|this[q+3]},tt.prototype.readFloatLE=function(q,K){return q>>>=0,K||St(q,4,this.length),Q.read(this,q,!0,23,4)},tt.prototype.readFloatBE=function(q,K){return q>>>=0,K||St(q,4,this.length),Q.read(this,q,!1,23,4)},tt.prototype.readDoubleLE=function(q,K){return q>>>=0,K||St(q,8,this.length),Q.read(this,q,!0,52,8)},tt.prototype.readDoubleBE=function(q,K){return q>>>=0,K||St(q,8,this.length),Q.read(this,q,!1,52,8)},tt.prototype.writeUintLE=tt.prototype.writeUIntLE=function(q,K,z,Y){(q=+q,K>>>=0,z>>>=0,Y)||At(this,q,K,z,Math.pow(2,8*z)-1,0);var Q=1,X=0;for(this[K]=255&q;++X>>=0,z>>>=0,Y)||At(this,q,K,z,Math.pow(2,8*z)-1,0);var Q=z-1,X=1;for(this[K+Q]=255&q;--Q>=0&&(X*=256);)this[K+Q]=q/X&255;return K+z},tt.prototype.writeUint8=tt.prototype.writeUInt8=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,1,255,0),this[K]=255&q,K+1},tt.prototype.writeUint16LE=tt.prototype.writeUInt16LE=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,2,65535,0),this[K]=255&q,this[K+1]=q>>>8,K+2},tt.prototype.writeUint16BE=tt.prototype.writeUInt16BE=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,2,65535,0),this[K]=q>>>8,this[K+1]=255&q,K+2},tt.prototype.writeUint32LE=tt.prototype.writeUInt32LE=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,4,4294967295,0),this[K+3]=q>>>24,this[K+2]=q>>>16,this[K+1]=q>>>8,this[K]=255&q,K+4},tt.prototype.writeUint32BE=tt.prototype.writeUInt32BE=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,4,4294967295,0),this[K]=q>>>24,this[K+1]=q>>>16,this[K+2]=q>>>8,this[K+3]=255&q,K+4},tt.prototype.writeIntLE=function(q,K,z,Y){if(q=+q,K>>>=0,!Y){var Q=Math.pow(2,8*z-1);At(this,q,K,z,Q-1,-Q)}var X=0,Z=1,J=0;for(this[K]=255&q;++X>0)-J&255;return K+z},tt.prototype.writeIntBE=function(q,K,z,Y){if(q=+q,K>>>=0,!Y){var Q=Math.pow(2,8*z-1);At(this,q,K,z,Q-1,-Q)}var X=z-1,Z=1,J=0;for(this[K+X]=255&q;--X>=0&&(Z*=256);)q<0&&0===J&&0!==this[K+X+1]&&(J=1),this[K+X]=(q/Z>>0)-J&255;return K+z},tt.prototype.writeInt8=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,1,127,-128),q<0&&(q=255+q+1),this[K]=255&q,K+1},tt.prototype.writeInt16LE=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,2,32767,-32768),this[K]=255&q,this[K+1]=q>>>8,K+2},tt.prototype.writeInt16BE=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,2,32767,-32768),this[K]=q>>>8,this[K+1]=255&q,K+2},tt.prototype.writeInt32LE=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,4,2147483647,-2147483648),this[K]=255&q,this[K+1]=q>>>8,this[K+2]=q>>>16,this[K+3]=q>>>24,K+4},tt.prototype.writeInt32BE=function(q,K,z){return q=+q,K>>>=0,z||At(this,q,K,4,2147483647,-2147483648),q<0&&(q=4294967295+q+1),this[K]=q>>>24,this[K+1]=q>>>16,this[K+2]=q>>>8,this[K+3]=255&q,K+4},tt.prototype.writeFloatLE=function(q,K,z){return Ot(this,q,K,!0,z)},tt.prototype.writeFloatBE=function(q,K,z){return Ot(this,q,K,!1,z)},tt.prototype.writeDoubleLE=function(q,K,z){return It(this,q,K,!0,z)},tt.prototype.writeDoubleBE=function(q,K,z){return It(this,q,K,!1,z)},tt.prototype.copy=function(q,K,z,Y){if(!tt.isBuffer(q))throw new TypeError("argument should be a Buffer");if(z||(z=0),Y||0===Y||(Y=this.length),K>=q.length&&(K=q.length),K||(K=0),Y>0&&Y=this.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("sourceEnd out of bounds");Y>this.length&&(Y=this.length),q.length-K>>=0,z=void 0===z?this.length:z>>>0,q||(q=0),"number"==typeof q)for(X=K;X55295&&z<57344){if(!Q){if(z>56319){(K-=3)>-1&&X.push(239,191,189);continue}if(Z+1===Y){(K-=3)>-1&&X.push(239,191,189);continue}Q=z;continue}if(z<56320){(K-=3)>-1&&X.push(239,191,189),Q=z;continue}z=65536+(Q-55296<<10|z-56320)}else Q&&(K-=3)>-1&&X.push(239,191,189);if(Q=null,z<128){if((K-=1)<0)break;X.push(z)}else if(z<2048){if((K-=2)<0)break;X.push(z>>6|192,63&z|128)}else if(z<65536){if((K-=3)<0)break;X.push(z>>12|224,z>>6&63|128,63&z|128)}else{if(!(z<1114112))throw new Error("Invalid code point");if((K-=4)<0)break;X.push(z>>18|240,z>>12&63|128,z>>6&63|128,63&z|128)}}return X}function Pt(q){return Y.toByteArray(function(q){if((q=(q=q.split("=")[0]).trim().replace(Dt,"")).length<2)return"";for(;q.length%4!=0;)q+="=";return q}(q))}function Mt(q,K,z,Y){for(var Q=0;Q=K.length||Q>=q.length);++Q)K[Q+z]=q[Q];return Q}function Nt(q,K){return q instanceof K||null!=q&&null!=q.constructor&&null!=q.constructor.name&&q.constructor.name===K.name}function xt(q){return q!=q}var Lt=function(){for(var q="0123456789abcdef",K=new Array(256),z=0;z<16;++z)for(var Y=16*z,Q=0;Q<16;++Q)K[Y+Q]=q[z]+q[Q];return K}()},13144:(q,K,z)=>{"use strict";var Y=z(66743),Q=z(11002),X=z(10076),Z=z(47119);q.exports=Z||Y.call(X,Q)},12205:(q,K,z)=>{"use strict";var Y=z(66743),Q=z(11002),X=z(13144);q.exports=function(){return X(Y,Q,arguments)}},11002:q=>{"use strict";q.exports=Function.prototype.apply},10076:q=>{"use strict";q.exports=Function.prototype.call},73126:(q,K,z)=>{"use strict";var Y=z(66743),Q=z(69675),X=z(10076),Z=z(13144);q.exports=function(q){if(q.length<1||"function"!=typeof q[0])throw new Q("a function is required");return Z(Y,X,q)}},47119:q=>{"use strict";q.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},38075:(q,K,z)=>{"use strict";var Y=z(70453),Q=z(10487),X=Q(Y("String.prototype.indexOf"));q.exports=function(q,K){var z=Y(q,!!K);return"function"==typeof z&&X(q,".prototype.")>-1?Q(z):z}},10487:(q,K,z)=>{"use strict";var Y=z(96897),Q=z(30655),X=z(73126),Z=z(12205);q.exports=function(q){var K=X(arguments),z=q.length-(arguments.length-1);return Y(K,1+(z>0?z:0),!0)},Q?Q(q.exports,"apply",{value:Z}):q.exports.apply=Z},36556:(q,K,z)=>{"use strict";var Y=z(70453),Q=z(73126),X=Q([Y("%String.prototype.indexOf%")]);q.exports=function(q,K){var z=Y(q,!!K);return"function"==typeof z&&X(q,".prototype.")>-1?Q([z]):z}},8928:q=>{function K(q){this.input=q;for(var K,z=q.split("\n"),Y=0,Q=z.length,X=0,Z={length:Q};Y=0&&"\n"!==K.charAt(z);z--);return q-z-1},indexAt:function(q){var K=q.line,z=q.column;return this.lineMap[K].start+z},charAt:function(q){var K=this.indexAt(q);return this.input.charAt(K)}},z.Indexer=K,q.exports=z},79155:(q,K,z)=>{"use strict";const Y=z(84427),Q=z(46221),X=z(51750);function Z(q,K){switch(Q(q)){case"object":return function(q,K){if("function"==typeof K)return K(q);if(K||X(q)){const z=new q.constructor;for(let Y in q)z[Y]=Z(q[Y],K);return z}return q}(q,K);case"array":return function(q,K){const z=new q.constructor(q.length);for(let Y=0;Y{"use strict";var Y=z(13798);function Q(q){return!0===Y(q)&&"[object Object]"===Object.prototype.toString.call(q)}q.exports=function(q){var K,z;return!1!==Q(q)&&("function"==typeof(K=q.constructor)&&(!1!==Q(z=K.prototype)&&!1!==z.hasOwnProperty("isPrototypeOf")))}},46221:q=>{var K=Object.prototype.toString;function z(q){return"function"==typeof q.constructor?q.constructor.name:null}q.exports=function(q){if(void 0===q)return"undefined";if(null===q)return"null";var Y=typeof q;if("boolean"===Y)return"boolean";if("string"===Y)return"string";if("number"===Y)return"number";if("symbol"===Y)return"symbol";if("function"===Y)return"GeneratorFunction"===z(q)?"generatorfunction":"function";if(function(q){return Array.isArray?Array.isArray(q):q instanceof Array}(q))return"array";if(function(q){if(q.constructor&&"function"==typeof q.constructor.isBuffer)return q.constructor.isBuffer(q);return!1}(q))return"buffer";if(function(q){try{if("number"==typeof q.length&&"function"==typeof q.callee)return!0}catch(K){if(-1!==K.message.indexOf("callee"))return!0}return!1}(q))return"arguments";if(function(q){return q instanceof Date||"function"==typeof q.toDateString&&"function"==typeof q.getDate&&"function"==typeof q.setDate}(q))return"date";if(function(q){return q instanceof Error||"string"==typeof q.message&&q.constructor&&"number"==typeof q.constructor.stackTraceLimit}(q))return"error";if(function(q){return q instanceof RegExp||"string"==typeof q.flags&&"boolean"==typeof q.ignoreCase&&"boolean"==typeof q.multiline&&"boolean"==typeof q.global}(q))return"regexp";switch(z(q)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(q){return"function"==typeof q.throw&&"function"==typeof q.return&&"function"==typeof q.next}(q))return"generator";switch(Y=K.call(q)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return Y.slice(8,-1).toLowerCase().replace(/\s/g,"")}},40862:(q,K,z)=>{"use strict";var Y=z(14263),Q="undefined"!=typeof process&&"production",X=!Q||"dev"===Q||"development"===Q,Z="undefined"!=typeof process&&Boolean(process.env.SHOW_MODULE_COMPLAINS),J="undefined"!=typeof process&&Boolean(process.env.SHOW_NESTED_COMPLAINS),tt="undefined"!=typeof console&&console.warn&&console,et="undefined"!=typeof process&&process.cwd&&process.cwd()+"/"||"",it="undefined"!=typeof process&&"win32"===process.platform?"\r\n":"\n",st=[].slice,nt="[ignore]",at={};function rt(){var q,K,z,Y,Q,X,J=arguments;if(!rt.silence){"object"==typeof J[J.length-1]?(q=J[J.length-1],J=st.call(J,0,-1)):q={},X=q.level||2,Q=q.heading||(2==X?"WARNING!!":"NOTICE"),Y=q.headingColor||(2==X?rt.colors.warning:rt.colors.notice),z=null==q.locationIndex?1:q.locationIndex,!1===q.location&&(z=0),K=q.location||ht(z);var tt=rt.getModuleName(K);if(!tt||Z){if(K){if(at[K]||K===nt)return;at[K]=!0}dt=ot(Q,Y);for(var ct=0;ctz;X--)if(at[Q[X]])return nt;K=Q[z]}catch(e){}return K}function ct(){}(rt=X?rt:ct).method=X?function(q,K){var z=q[K],Y=st.call(arguments,2);q[K]=function(){return rt.apply(null,Y),z.apply(this,arguments)}}:ct,rt.fn=X?function(q){var K=st.call(arguments,1);return function(){return rt.apply(null,K),q.apply(this,arguments)}}:function(q){return q},rt.log=function(q,K){var z=ot(q,K);rt.stream?rt.stream.write(z+it):tt&&tt.warn(z)},rt.stream="undefined"!=typeof process&&process.stderr,rt.silence=!1,rt.color=rt.stream&&rt.stream.isTTY,rt.colors={warning:"",notice:"",message:!1,location:""},rt.getModuleName=function(q){for(var K=q.replace(et,"").split(/\/|\\/g),z=K.length-1;z>=0;z--)if("node_modules"===K[z]){var Y=K[z+1];return"@"===Y[0]?Y+"/"+K[z+2]:Y}},q.exports?q.exports=rt:"undefined"!=typeof window&&(window.complain=rt)},72237:q=>{class K{async next(q){let K=this.createConsumer(q),z=await K.next();return K.return(),z}async once(q){let K=await this.next(q);return K.done&&await new Promise((()=>{})),K.value}createConsumer(){throw new TypeError("Method must be overriden by subclass")}[Symbol.asyncIterator](){return this.createConsumer()}}q.exports=K},30454:q=>{"use strict";var K="%[a-f0-9]{2}",z=new RegExp("("+K+")|([^%]+?)","gi"),Y=new RegExp("("+K+")+","gi");function Q(q,K){try{return[decodeURIComponent(q.join(""))]}catch(X){}if(1===q.length)return q;K=K||1;var z=q.slice(0,K),Y=q.slice(K);return Array.prototype.concat.call([],Q(z),Q(Y))}function X(q){try{return decodeURIComponent(q)}catch(X){for(var K=q.match(z)||[],Y=1;Y{"use strict";var Y=z(30655),Q=z(58068),X=z(69675),Z=z(75795);q.exports=function(q,K,z){if(!q||"object"!=typeof q&&"function"!=typeof q)throw new X("`obj` must be an object or a function`");if("string"!=typeof K&&"symbol"!=typeof K)throw new X("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new X("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new X("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new X("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new X("`loose`, if provided, must be a boolean");var J=arguments.length>3?arguments[3]:null,tt=arguments.length>4?arguments[4]:null,et=arguments.length>5?arguments[5]:null,it=arguments.length>6&&arguments[6],st=!!Z&&Z(q,K);if(Y)Y(q,K,{configurable:null===et&&st?st.configurable:!et,enumerable:null===J&&st?st.enumerable:!J,value:z,writable:null===tt&&st?st.writable:!tt});else{if(!it&&(J||tt||et))throw new Q("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");q[K]=z}}},7176:(q,K,z)=>{"use strict";var Y,Q=z(73126),X=z(75795);try{Y=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var Z=!!Y&&X&&X(Object.prototype,"__proto__"),J=Object,tt=J.getPrototypeOf;q.exports=Z&&"function"==typeof Z.get?Q([Z.get]):"function"==typeof tt&&function(q){return tt(null==q?q:J(q))}},66570:q=>{"use strict";function K(q,K,X){X=X||2;var Z,J,tt,st,at,rt,ot,ht=K&&K.length,ct=ht?K[0]*X:q.length,dt=z(q,0,ct,X,!0),lt=[];if(!dt||dt.next===dt.prev)return lt;if(ht&&(dt=function(q,K,Q,X){var Z,J,tt,st=[];for(Z=0,J=K.length;Z80*X){Z=tt=q[0],J=st=q[1];for(var ut=X;uttt&&(tt=at),rt>st&&(st=rt);ot=0!==(ot=Math.max(tt-Z,st-J))?1/ot:0}return Q(dt,lt,X,Z,J,ot),lt}function z(q,K,z,Y,Q){var X,Z;if(Q===pt(q,K,z,Y)>0)for(X=K;X=K;X-=Y)Z=ut(X,q[X],q[X+1],Z);return Z&&ht(Z,Z.next)&&(ft(Z),Z=Z.next),Z}function Y(q,K){if(!q)return q;K||(K=q);var z,Y=q;do{if(z=!1,Y.steiner||!ht(Y,Y.next)&&0!==ot(Y.prev,Y,Y.next))Y=Y.next;else{if(ft(Y),(Y=K=Y.prev)===Y.next)break;z=!0}}while(z||Y!==K);return K}function Q(q,K,z,et,it,nt,at){if(q){!at&&nt&&function(q,K,z,Y){var Q=q;do{null===Q.z&&(Q.z=st(Q.x,Q.y,K,z,Y)),Q.prevZ=Q.prev,Q.nextZ=Q.next,Q=Q.next}while(Q!==q);Q.prevZ.nextZ=null,Q.prevZ=null,function(q){var K,z,Y,Q,X,Z,J,tt,et=1;do{for(z=q,q=null,X=null,Z=0;z;){for(Z++,Y=z,J=0,K=0;K0||tt>0&&Y;)0!==J&&(0===tt||!Y||z.z<=Y.z)?(Q=z,z=z.nextZ,J--):(Q=Y,Y=Y.nextZ,tt--),X?X.nextZ=Q:q=Q,Q.prevZ=X,X=Q;z=Y}X.nextZ=null,et*=2}while(Z>1)}(Q)}(q,et,it,nt);for(var rt,ot,ht=q;q.prev!==q.next;)if(rt=q.prev,ot=q.next,nt?Z(q,et,it,nt):X(q))K.push(rt.i/z),K.push(q.i/z),K.push(ot.i/z),ft(q),q=ot.next,ht=ot.next;else if((q=ot)===ht){at?1===at?Q(q=J(q,K,z),K,z,et,it,nt,2):2===at&&tt(q,K,z,et,it,nt):Q(Y(q),K,z,et,it,nt,1);break}}}function X(q){var K=q.prev,z=q,Y=q.next;if(ot(K,z,Y)>=0)return!1;for(var Q=q.next.next;Q!==q.prev;){if(at(K.x,K.y,z.x,z.y,Y.x,Y.y,Q.x,Q.y)&&ot(Q.prev,Q,Q.next)>=0)return!1;Q=Q.next}return!0}function Z(q,K,z,Y){var Q=q.prev,X=q,Z=q.next;if(ot(Q,X,Z)>=0)return!1;for(var J=Q.xX.x?Q.x>Z.x?Q.x:Z.x:X.x>Z.x?X.x:Z.x,it=Q.y>X.y?Q.y>Z.y?Q.y:Z.y:X.y>Z.y?X.y:Z.y,nt=st(J,tt,K,z,Y),rt=st(et,it,K,z,Y),ht=q.prevZ,ct=q.nextZ;ht&&ht.z>=nt&&ct&&ct.z<=rt;){if(ht!==q.prev&&ht!==q.next&&at(Q.x,Q.y,X.x,X.y,Z.x,Z.y,ht.x,ht.y)&&ot(ht.prev,ht,ht.next)>=0)return!1;if(ht=ht.prevZ,ct!==q.prev&&ct!==q.next&&at(Q.x,Q.y,X.x,X.y,Z.x,Z.y,ct.x,ct.y)&&ot(ct.prev,ct,ct.next)>=0)return!1;ct=ct.nextZ}for(;ht&&ht.z>=nt;){if(ht!==q.prev&&ht!==q.next&&at(Q.x,Q.y,X.x,X.y,Z.x,Z.y,ht.x,ht.y)&&ot(ht.prev,ht,ht.next)>=0)return!1;ht=ht.prevZ}for(;ct&&ct.z<=rt;){if(ct!==q.prev&&ct!==q.next&&at(Q.x,Q.y,X.x,X.y,Z.x,Z.y,ct.x,ct.y)&&ot(ct.prev,ct,ct.next)>=0)return!1;ct=ct.nextZ}return!0}function J(q,K,z){var Y=q;do{var Q=Y.prev,X=Y.next.next;!ht(Q,X)&&ct(Q,Y,Y.next,X)&&dt(Q,X)&&dt(X,Q)&&(K.push(Q.i/z),K.push(Y.i/z),K.push(X.i/z),ft(Y),ft(Y.next),Y=q=X),Y=Y.next}while(Y!==q);return Y}function tt(q,K,z,X,Z,J){var tt=q;do{for(var et=tt.next.next;et!==tt.prev;){if(tt.i!==et.i&&rt(tt,et)){var it=lt(tt,et);return tt=Y(tt,tt.next),it=Y(it,it.next),Q(tt,K,z,X,Z,J),void Q(it,K,z,X,Z,J)}et=et.next}tt=tt.next}while(tt!==q)}function et(q,K){return q.x-K.x}function it(q,K){if(K=function(q,K){var z,Y=K,Q=q.x,X=q.y,Z=-1/0;do{if(X<=Y.y&&X>=Y.next.y&&Y.next.y!==Y.y){var J=Y.x+(X-Y.y)*(Y.next.x-Y.x)/(Y.next.y-Y.y);if(J<=Q&&J>Z){if(Z=J,J===Q){if(X===Y.y)return Y;if(X===Y.next.y)return Y.next}z=Y.x=Y.x&&Y.x>=it&&Q!==Y.x&&at(Xz.x)&&dt(Y,q)&&(z=Y,nt=tt),Y=Y.next;return z}(q,K)){var z=lt(K,q);Y(z,z.next)}}function st(q,K,z,Y,Q){return(q=1431655765&((q=858993459&((q=252645135&((q=16711935&((q=32767*(q-z)*Q)|q<<8))|q<<4))|q<<2))|q<<1))|(K=1431655765&((K=858993459&((K=252645135&((K=16711935&((K=32767*(K-Y)*Q)|K<<8))|K<<4))|K<<2))|K<<1))<<1}function nt(q){var K=q,z=q;do{(K.x=0&&(q-Z)*(Y-J)-(z-Z)*(K-J)>=0&&(z-Z)*(X-J)-(Q-Z)*(Y-J)>=0}function rt(q,K){return q.next.i!==K.i&&q.prev.i!==K.i&&!function(q,K){var z=q;do{if(z.i!==q.i&&z.next.i!==q.i&&z.i!==K.i&&z.next.i!==K.i&&ct(z,z.next,q,K))return!0;z=z.next}while(z!==q);return!1}(q,K)&&dt(q,K)&&dt(K,q)&&function(q,K){var z=q,Y=!1,Q=(q.x+K.x)/2,X=(q.y+K.y)/2;do{z.y>X!=z.next.y>X&&z.next.y!==z.y&&Q<(z.next.x-z.x)*(X-z.y)/(z.next.y-z.y)+z.x&&(Y=!Y),z=z.next}while(z!==q);return Y}(q,K)}function ot(q,K,z){return(K.y-q.y)*(z.x-K.x)-(K.x-q.x)*(z.y-K.y)}function ht(q,K){return q.x===K.x&&q.y===K.y}function ct(q,K,z,Y){return!!(ht(q,K)&&ht(z,Y)||ht(q,Y)&&ht(z,K))||ot(q,K,z)>0!=ot(q,K,Y)>0&&ot(z,Y,q)>0!=ot(z,Y,K)>0}function dt(q,K){return ot(q.prev,q,q.next)<0?ot(q,K,q.next)>=0&&ot(q,q.prev,K)>=0:ot(q,K,q.prev)<0||ot(q,q.next,K)<0}function lt(q,K){var z=new bt(q.i,q.x,q.y),Y=new bt(K.i,K.x,K.y),Q=q.next,X=K.prev;return q.next=K,K.prev=q,z.next=Q,Q.prev=z,Y.next=z,z.prev=Y,X.next=Y,Y.prev=X,Y}function ut(q,K,z,Y){var Q=new bt(q,K,z);return Y?(Q.next=Y.next,Q.prev=Y,Y.next.prev=Q,Y.next=Q):(Q.prev=Q,Q.next=Q),Q}function ft(q){q.next.prev=q.prev,q.prev.next=q.next,q.prevZ&&(q.prevZ.nextZ=q.nextZ),q.nextZ&&(q.nextZ.prevZ=q.prevZ)}function bt(q,K,z){this.i=q,this.x=K,this.y=z,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function pt(q,K,z,Y){for(var Q=0,X=K,Z=z-Y;X0&&(Y+=q[Q-1].length,z.holes.push(Y))}return z}},14263:function(q,K,z){var Y,Q,X;!function(Z,J){"use strict";Q=[z(40343)],void 0===(X="function"==typeof(Y=function(q){var K=/(^|@)\S+:\d+/,z=/^\s*at .*(\S+:\d+|\(native\))/m,Y=/^(eval@)?(\[native code])?$/;return{parse:function(q){if(void 0!==q.stacktrace||void 0!==q["opera#sourceloc"])return this.parseOpera(q);if(q.stack&&q.stack.match(z))return this.parseV8OrIE(q);if(q.stack)return this.parseFFOrSafari(q);throw new Error("Cannot parse given Error object")},extractLocation:function(q){if(-1===q.indexOf(":"))return[q];var K=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(q.replace(/[()]/g,""));return[K[1],K[2]||void 0,K[3]||void 0]},parseV8OrIE:function(K){return K.stack.split("\n").filter((function(q){return!!q.match(z)}),this).map((function(K){K.indexOf("(eval ")>-1&&(K=K.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var z=K.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),Y=z.match(/ (\(.+\)$)/);z=Y?z.replace(Y[0],""):z;var Q=this.extractLocation(Y?Y[1]:z),X=Y&&z||void 0,Z=["eval",""].indexOf(Q[0])>-1?void 0:Q[0];return new q({functionName:X,fileName:Z,lineNumber:Q[1],columnNumber:Q[2],source:K})}),this)},parseFFOrSafari:function(K){return K.stack.split("\n").filter((function(q){return!q.match(Y)}),this).map((function(K){if(K.indexOf(" > eval")>-1&&(K=K.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===K.indexOf("@")&&-1===K.indexOf(":"))return new q({functionName:K});var z=/((.*".+"[^@]*)?[^@]*)(?:@)/,Y=K.match(z),Q=Y&&Y[1]?Y[1]:void 0,X=this.extractLocation(K.replace(z,""));return new q({functionName:Q,fileName:X[0],lineNumber:X[1],columnNumber:X[2],source:K})}),this)},parseOpera:function(q){return!q.stacktrace||q.message.indexOf("\n")>-1&&q.message.split("\n").length>q.stacktrace.split("\n").length?this.parseOpera9(q):q.stack?this.parseOpera11(q):this.parseOpera10(q)},parseOpera9:function(K){for(var z=/Line (\d+).*script (?:in )?(\S+)/i,Y=K.message.split("\n"),Q=[],X=2,Z=Y.length;X/,"$2").replace(/\([^)]*\)/g,"")||void 0;X.match(/\(([^)]*)\)/)&&(z=X.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var J=void 0===z||"[arguments not available]"===z?void 0:z.split(",");return new q({functionName:Z,args:J,fileName:Q[0],lineNumber:Q[1],columnNumber:Q[2],source:K})}),this)}}})?Y.apply(K,Q):Y)||(q.exports=X)}()},30655:q=>{"use strict";var K=Object.defineProperty||!1;if(K)try{K({},"a",{value:1})}catch(e){K=!1}q.exports=K},41237:q=>{"use strict";q.exports=EvalError},69383:q=>{"use strict";q.exports=Error},79290:q=>{"use strict";q.exports=RangeError},79538:q=>{"use strict";q.exports=ReferenceError},58068:q=>{"use strict";q.exports=SyntaxError},69675:q=>{"use strict";q.exports=TypeError},35345:q=>{"use strict";q.exports=URIError},79612:q=>{"use strict";q.exports=Object},30228:q=>{"use strict";var K=Object.prototype.hasOwnProperty,z="~";function Y(){}function Q(q,K,z){this.fn=q,this.context=K,this.once=z||!1}function X(q,K,Y,X,Z){if("function"!=typeof Y)throw new TypeError("The listener must be a function");var J=new Q(Y,X||q,Z),tt=z?z+K:K;return q._events[tt]?q._events[tt].fn?q._events[tt]=[q._events[tt],J]:q._events[tt].push(J):(q._events[tt]=J,q._eventsCount++),q}function Z(q,K){0==--q._eventsCount?q._events=new Y:delete q._events[K]}function J(){this._events=new Y,this._eventsCount=0}Object.create&&(Y.prototype=Object.create(null),(new Y).__proto__||(z=!1)),J.prototype.eventNames=function(){var q,Y,Q=[];if(0===this._eventsCount)return Q;for(Y in q=this._events)K.call(q,Y)&&Q.push(z?Y.slice(1):Y);return Object.getOwnPropertySymbols?Q.concat(Object.getOwnPropertySymbols(q)):Q},J.prototype.listeners=function(q){var K=z?z+q:q,Y=this._events[K];if(!Y)return[];if(Y.fn)return[Y.fn];for(var Q=0,X=Y.length,Z=new Array(X);Q{"use strict";var Y=z(69600),Q=Object.prototype.toString,X=Object.prototype.hasOwnProperty,Z=function(q,K,z){for(var Y=0,Q=q.length;Y=3&&(Q=z),et(q)?Z(q,K,Q):"string"==typeof q?J(q,K,Q):tt(q,K,Q)}},89353:q=>{"use strict";var K="Function.prototype.bind called on incompatible ",z=Object.prototype.toString,Y=Math.max,Q="[object Function]",X=function(q,K){for(var z=[],Y=0;Y{"use strict";var Y=z(89353);q.exports=Function.prototype.bind||Y},70453:(q,K,z)=>{"use strict";var Y,Q=z(79612),X=z(69383),Z=z(41237),J=z(79290),tt=z(79538),et=z(58068),it=z(69675),st=z(35345),nt=z(71514),at=z(58968),rt=z(6188),ot=z(68002),ht=z(75880),ct=z(70414),dt=z(73093),lt=Function,ut=function(q){try{return lt('"use strict"; return ('+q+").constructor;")()}catch(e){}},ft=z(75795),bt=z(30655),pt=function(){throw new it},vt=ft?function(){try{return pt}catch(q){try{return ft(arguments,"callee").get}catch(K){return pt}}}():pt,gt=z(64039)(),mt=z(93628),yt=z(71064),_t=z(48648),Et=z(11002),wt=z(10076),Tt={},St="undefined"!=typeof Uint8Array&&mt?mt(Uint8Array):Y,At={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?Y:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Y:ArrayBuffer,"%ArrayIteratorPrototype%":gt&&mt?mt([][Symbol.iterator]()):Y,"%AsyncFromSyncIteratorPrototype%":Y,"%AsyncFunction%":Tt,"%AsyncGenerator%":Tt,"%AsyncGeneratorFunction%":Tt,"%AsyncIteratorPrototype%":Tt,"%Atomics%":"undefined"==typeof Atomics?Y:Atomics,"%BigInt%":"undefined"==typeof BigInt?Y:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?Y:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?Y:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Y:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":X,"%eval%":eval,"%EvalError%":Z,"%Float16Array%":"undefined"==typeof Float16Array?Y:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?Y:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Y:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Y:FinalizationRegistry,"%Function%":lt,"%GeneratorFunction%":Tt,"%Int8Array%":"undefined"==typeof Int8Array?Y:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Y:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Y:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":gt&&mt?mt(mt([][Symbol.iterator]())):Y,"%JSON%":"object"==typeof JSON?JSON:Y,"%Map%":"undefined"==typeof Map?Y:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&>&&mt?mt((new Map)[Symbol.iterator]()):Y,"%Math%":Math,"%Number%":Number,"%Object%":Q,"%Object.getOwnPropertyDescriptor%":ft,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Y:Promise,"%Proxy%":"undefined"==typeof Proxy?Y:Proxy,"%RangeError%":J,"%ReferenceError%":tt,"%Reflect%":"undefined"==typeof Reflect?Y:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Y:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&>&&mt?mt((new Set)[Symbol.iterator]()):Y,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Y:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":gt&&mt?mt(""[Symbol.iterator]()):Y,"%Symbol%":gt?Symbol:Y,"%SyntaxError%":et,"%ThrowTypeError%":vt,"%TypedArray%":St,"%TypeError%":it,"%Uint8Array%":"undefined"==typeof Uint8Array?Y:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Y:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Y:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Y:Uint32Array,"%URIError%":st,"%WeakMap%":"undefined"==typeof WeakMap?Y:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Y:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Y:WeakSet,"%Function.prototype.call%":wt,"%Function.prototype.apply%":Et,"%Object.defineProperty%":bt,"%Object.getPrototypeOf%":yt,"%Math.abs%":nt,"%Math.floor%":at,"%Math.max%":rt,"%Math.min%":ot,"%Math.pow%":ht,"%Math.round%":ct,"%Math.sign%":dt,"%Reflect.getPrototypeOf%":_t};if(mt)try{null.error}catch(e){var Ct=mt(mt(e));At["%Error.prototype%"]=Ct}var Ot=function q(K){var z;if("%AsyncFunction%"===K)z=ut("async function () {}");else if("%GeneratorFunction%"===K)z=ut("function* () {}");else if("%AsyncGeneratorFunction%"===K)z=ut("async function* () {}");else if("%AsyncGenerator%"===K){var Y=q("%AsyncGeneratorFunction%");Y&&(z=Y.prototype)}else if("%AsyncIteratorPrototype%"===K){var Q=q("%AsyncGenerator%");Q&&mt&&(z=mt(Q.prototype))}return At[K]=z,z},It={__proto__:null,"%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"]},Dt=z(66743),Rt=z(9957),Pt=Dt.call(wt,Array.prototype.concat),Mt=Dt.call(Et,Array.prototype.splice),Nt=Dt.call(wt,String.prototype.replace),xt=Dt.call(wt,String.prototype.slice),Lt=Dt.call(wt,RegExp.prototype.exec),kt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Bt=/\\(\\)?/g,Ut=function(q){var K=xt(q,0,1),z=xt(q,-1);if("%"===K&&"%"!==z)throw new et("invalid intrinsic syntax, expected closing `%`");if("%"===z&&"%"!==K)throw new et("invalid intrinsic syntax, expected opening `%`");var Y=[];return Nt(q,kt,(function(q,K,z,Q){Y[Y.length]=z?Nt(Q,Bt,"$1"):K||q})),Y},Ft=function(q,K){var z,Y=q;if(Rt(It,Y)&&(Y="%"+(z=It[Y])[0]+"%"),Rt(At,Y)){var Q=At[Y];if(Q===Tt&&(Q=Ot(Y)),void 0===Q&&!K)throw new it("intrinsic "+q+" exists, but is not available. Please file an issue!");return{alias:z,name:Y,value:Q}}throw new et("intrinsic "+q+" does not exist!")};q.exports=function(q,K){if("string"!=typeof q||0===q.length)throw new it("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof K)throw new it('"allowMissing" argument must be a boolean');if(null===Lt(/^%?[^%]*%?$/,q))throw new et("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=Ut(q),Y=z.length>0?z[0]:"",Q=Ft("%"+Y+"%",K),X=Q.name,Z=Q.value,J=!1,tt=Q.alias;tt&&(Y=tt[0],Mt(z,Pt([0,1],tt)));for(var st=1,nt=!0;st=z.length){var ht=ft(Z,at);Z=(nt=!!ht)&&"get"in ht&&!("originalValue"in ht.get)?ht.get:Z[at]}else nt=Rt(Z,at),Z=Z[at];nt&&!J&&(At[X]=Z)}}return Z}},71064:(q,K,z)=>{"use strict";var Y=z(79612);q.exports=Y.getPrototypeOf||null},48648:q=>{"use strict";q.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},93628:(q,K,z)=>{"use strict";var Y=z(48648),Q=z(71064),X=z(7176);q.exports=Y?function(q){return Y(q)}:Q?function(q){if(!q||"object"!=typeof q&&"function"!=typeof q)throw new TypeError("getProto: not an object");return Q(q)}:X?function(q){return X(q)}:null},6549:q=>{"use strict";q.exports=Object.getOwnPropertyDescriptor},75795:(q,K,z)=>{"use strict";var Y=z(6549);if(Y)try{Y([],"length")}catch(e){Y=null}q.exports=Y},85880:(q,K,z)=>{"use strict";function Y(q){if(void 0===q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q}function Q(q,K){q.prototype=Object.create(K.prototype),q.prototype.constructor=q,q.__proto__=K}z.d(K,{os:()=>jn});var X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},ft={duration:.5,overwrite:!1,delay:0},bt=1e8,pt=1e-8,vt=2*Math.PI,gt=vt/4,mt=0,yt=Math.sqrt,_t=Math.cos,Et=Math.sin,wt=function(q){return"string"==typeof q},Tt=function(q){return"function"==typeof q},St=function(q){return"number"==typeof q},At=function(q){return void 0===q},Ct=function(q){return"object"==typeof q},Ot=function(q){return!1!==q},It=function(){return"undefined"!=typeof window},Dt=function(q){return Tt(q)||wt(q)},Rt="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},Pt=Array.isArray,Mt=/(?:-?\.?\d|\.)+/gi,Nt=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,xt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Lt=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,kt=/[+-]=-?[.\d]+/,Bt=/[^,'"\[\]\s]+/gi,Ut=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Ft={},Gt={},jt=function(q){return(Gt=ve(q,Ft))&&ms},$t=function(q,K){return console.warn("Invalid property",q,"set to",K,"Missing plugin? gsap.registerPlugin()")},Ht=function(q,K){return!K&&console.warn(q)},Vt=function(q,K){return q&&(Ft[q]=K)&&Gt&&(Gt[q]=K)||Ft},Wt=function(){return 0},qt={suppressEvents:!0,isStart:!0,kill:!1},Kt={suppressEvents:!0,kill:!1},zt={suppressEvents:!0},Yt={},Qt=[],Xt={},Zt={},Jt={},te=30,ee=[],ie="",se=function(q){var K,z,Y=q[0];if(Ct(Y)||Tt(Y)||(q=[q]),!(K=(Y._gsap||{}).harness)){for(z=ee.length;z--&&!ee[z].targetTest(Y););K=ee[z]}for(z=q.length;z--;)q[z]&&(q[z]._gsap||(q[z]._gsap=new Mi(q[z],K)))||q.splice(z,1);return q},ne=function(q){return q._gsap||se(Ye(q))[0]._gsap},ae=function(q,K,z){return(z=q[K])&&Tt(z)?q[K]():At(z)&&q.getAttribute&&q.getAttribute(K)||z},re=function(q,K){return(q=q.split(",")).forEach(K)||q},oe=function(q){return Math.round(1e5*q)/1e5||0},he=function(q){return Math.round(1e7*q)/1e7||0},ce=function(q,K){var z=K.charAt(0),Y=parseFloat(K.substr(2));return q=parseFloat(q),"+"===z?q+Y:"-"===z?q-Y:"*"===z?q*Y:q/Y},de=function(q,K){for(var z=K.length,Y=0;q.indexOf(K[Y])<0&&++YX;)Z=Z._prev;return Z?(K._next=Z._next,Z._next=K):(K._next=q[z],q[z]=K),K._next?K._next._prev=K:q[Y]=K,K._prev=Z,K.parent=K._dp=q,K},Ee=function(q,K,z,Y){void 0===z&&(z="_first"),void 0===Y&&(Y="_last");var Q=K._prev,X=K._next;Q?Q._next=X:q[z]===K&&(q[z]=X),X?X._prev=Q:q[Y]===K&&(q[Y]=Q),K._next=K._prev=K.parent=null},we=function(q,K){q.parent&&(!K||q.parent.autoRemoveChildren)&&q.parent.remove&&q.parent.remove(q),q._act=0},Te=function(q,K){if(q&&(!K||K._end>q._dur||K._start<0))for(var z=q;z;)z._dirty=1,z=z.parent;return q},Se=function(q){for(var K=q.parent;K&&K.parent;)K._dirty=1,K.totalDuration(),K=K.parent;return q},Ae=function(q,K,z,Y){return q._startAt&&(Z?q._startAt.revert(Kt):q.vars.immediateRender&&!q.vars.autoRevert||q._startAt.render(K,!0,Y))},Ce=function q(K){return!K||K._ts&&q(K.parent)},Oe=function(q){return q._repeat?Ie(q._tTime,q=q.duration()+q._rDelay)*q:0},Ie=function(q,K){var z=Math.floor(q/=K);return q&&z===q?z-1:z},De=function(q,K){return(q-K._start)*K._ts+(K._ts>=0?0:K._dirty?K.totalDuration():K._tDur)},Re=function(q){return q._end=he(q._start+(q._tDur/Math.abs(q._ts||q._rts||pt)||0))},Pe=function(q,K){var z=q._dp;return z&&z.smoothChildTiming&&q._ts&&(q._start=he(z._time-(q._ts>0?K/q._ts:((q._dirty?q.totalDuration():q._tDur)-K)/-q._ts)),Re(q),z._dirty||Te(z,q)),q},Me=function(q,K){var z;if((K._time||!K._dur&&K._initted||K._startpt)&&K.render(z,!0)),Te(q,K)._dp&&q._initted&&q._time>=q._dur&&q._ts){if(q._dur=0&&z.totalTime(z._tTime),z=z._dp;q._zTime=-1e-8}},Ne=function(q,K,z,Y){return K.parent&&we(K),K._start=he((St(z)?z:z||q!==tt?je(q,z,K):q._time)+K._delay),K._end=he(K._start+(K.totalDuration()/Math.abs(K.timeScale())||0)),_e(q,K,"_first","_last",q._sort?"_start":0),Be(K)||(q._recent=K),Y||Me(q,K),q._ts<0&&Pe(q,q._tTime),q},xe=function(q,K){return(Ft.ScrollTrigger||$t("scrollTrigger",K))&&Ft.ScrollTrigger.create(K,q)},Le=function(q,K,z,Y,Q){return Gi(q,K,Q),q._initted?!z&&q._pt&&!Z&&(q._dur&&!1!==q.vars.lazy||!q._dur&&q.vars.lazy)&&at!==yi.frame?(Qt.push(q),q._lazy=[Q,Y],1):void 0:1},ke=function q(K){var z=K.parent;return z&&z._ts&&z._initted&&!z._lock&&(z.rawTime()<0||q(z))},Be=function(q){var K=q.data;return"isFromStart"===K||"isStart"===K},Ue=function(q,K,z,Y){var Q=q._repeat,X=he(K)||0,Z=q._tTime/q._tDur;return Z&&!Y&&(q._time*=X/q._dur),q._dur=X,q._tDur=Q?Q<0?1e10:he(X*(Q+1)+q._rDelay*Q):X,Z>0&&!Y&&Pe(q,q._tTime=q._tDur*Z),q.parent&&Re(q),z||Te(q.parent,q),q},Fe=function(q){return q instanceof xi?Te(q):Ue(q,q._dur)},Ge={_start:0,endTime:Wt,totalDuration:Wt},je=function q(K,z,Y){var Q,X,Z,J=K.labels,tt=K._recent||Ge,et=K.duration()>=bt?tt.endTime(!1):K._dur;return wt(z)&&(isNaN(z)||z in J)?(X=z.charAt(0),Z="%"===z.substr(-1),Q=z.indexOf("="),"<"===X||">"===X?(Q>=0&&(z=z.replace(/=/,"")),("<"===X?tt._start:tt.endTime(tt._repeat>=0))+(parseFloat(z.substr(1))||0)*(Z?(Q<0?tt:Y).totalDuration()/100:1)):Q<0?(z in J||(J[z]=et),J[z]):(X=parseFloat(z.charAt(Q-1)+z.substr(Q+1)),Z&&Y&&(X=X/100*(Pt(Y)?Y[0]:Y).totalDuration()),Q>1?q(K,z.substr(0,Q-1),Y)+X:et+X)):null==z?et:+z},$e=function(q,K,z){var Y,Q,X=St(K[1]),Z=(X?2:1)+(q<2?0:1),J=K[Z];if(X&&(J.duration=K[1]),J.parent=z,q){for(Y=J,Q=z;Q&&!("immediateRender"in Y);)Y=Q.vars.defaults||{},Q=Ot(Q.vars.inherit)&&Q.parent;J.immediateRender=Ot(Y.immediateRender),q<2?J.runBackwards=1:J.startAt=K[Z-1]}return new Wi(K[0],J,K[Z+1])},He=function(q,K){return q||0===q?K(q):K},Ve=function(q,K,z){return zK?K:z},We=function(q,K){return wt(q)&&(K=Ut.exec(q))?K[1]:""},qe=[].slice,Ke=function(q,K){return q&&Ct(q)&&"length"in q&&(!K&&!q.length||q.length-1 in q&&Ct(q[0]))&&!q.nodeType&&q!==et},ze=function(q,K,z){return void 0===z&&(z=[]),q.forEach((function(q){var Y;return wt(q)&&!K||Ke(q,1)?(Y=z).push.apply(Y,Ye(q)):z.push(q)}))||z},Ye=function(q,K,z){return J&&!K&&J.selector?J.selector(q):!wt(q)||z||!it&&_i()?Pt(q)?ze(q,z):Ke(q)?qe.call(q,0):q?[q]:[]:qe.call((K||st).querySelectorAll(q),0)},Qe=function(q){return q=Ye(q)[0]||Ht("Invalid scope")||{},function(K){var z=q.current||q.nativeElement||q;return Ye(K,z.querySelectorAll?z:z===q?Ht("Invalid scope")||st.createElement("div"):q)}},Xe=function(q){return q.sort((function(){return.5-Math.random()}))},Ze=function(q){if(Tt(q))return q;var K=Ct(q)?q:{each:q},z=Oi(K.ease),Y=K.from||0,Q=parseFloat(K.base)||0,X={},Z=Y>0&&Y<1,J=isNaN(Y)||Z,tt=K.axis,et=Y,it=Y;return wt(Y)?et=it={center:.5,edges:.5,end:1}[Y]||0:!Z&&J&&(et=Y[0],it=Y[1]),function(q,Z,st){var nt,at,rt,ot,ht,ct,dt,lt,ut,ft=(st||K).length,pt=X[ft];if(!pt){if(!(ut="auto"===K.grid?0:(K.grid||[1,bt])[1])){for(dt=-bt;dt<(dt=st[ut++].getBoundingClientRect().left)&&utdt&&(dt=ht),htft?ft-1:tt?"y"===tt?ft/ut:ut:Math.max(ut,ft/ut))||0)*("edges"===Y?-1:1),pt.b=ft<0?Q-ft:Q,pt.u=We(K.amount||K.each)||0,z=z&&ft<0?Ai(z):z}return ft=(pt[q]-pt.min)/pt.max||0,he(pt.b+(z?z(ft):ft)*pt.v)+pt.u}},Je=function(q){var K=Math.pow(10,((q+"").split(".")[1]||"").length);return function(z){var Y=he(Math.round(parseFloat(z)/q)*q*K);return(Y-Y%1)/K+(St(z)?0:We(z))}},ti=function(q,K){var z,Y,Q=Pt(q);return!Q&&Ct(q)&&(z=Q=q.radius||bt,q.values?(q=Ye(q.values),(Y=!St(q[0]))&&(z*=z)):q=Je(q.increment)),He(K,Q?Tt(q)?function(K){return Y=q(K),Math.abs(Y-K)<=z?Y:K}:function(K){for(var Q,X,Z=parseFloat(Y?K.x:K),J=parseFloat(Y?K.y:0),tt=bt,et=0,it=q.length;it--;)(Q=Y?(Q=q[it].x-Z)*Q+(X=q[it].y-J)*X:Math.abs(q[it]-Z))(Q=Math.abs(Q))&&(X=Y,J=Q);return X},ri=function(q,K,z){var Y,Q,X,Z=q.vars,tt=Z[K],et=J,it=q._ctx;if(tt)return Y=Z[K+"Params"],Q=Z.callbackScope||q,z&&Qt.length&&le(),it&&(J=it),X=Y?tt.apply(Q,Y):tt.call(Q),J=et,X},oi=function(q){return we(q),q.scrollTrigger&&q.scrollTrigger.kill(!!Z),q.progress()<1&&ri(q,"onInterrupt"),q},hi=[],ci=function(q){if(q)if(q=!q.name&&q.default||q,It()||q.headless){var K=q.name,z=Tt(q),Y=K&&!z&&q.init?function(){this._props=[]}:q,Q={init:Wt,render:ts,add:Ui,kill:is,modifier:es,rawVars:0},X={targetTest:0,get:0,getSetter:Qi,aliases:{},register:0};if(_i(),q!==Y){if(Zt[K])return;pe(Y,pe(me(q,Q),X)),ve(Y.prototype,ve(Q,me(q,X))),Zt[Y.prop=K]=Y,q.targetTest&&(ee.push(Y),Yt[K]=1),K=("css"===K?"CSS":K.charAt(0).toUpperCase()+K.substr(1))+"Plugin"}Vt(K,Y),q.register&&q.register(ms,Y,as)}else hi.push(q)},di=255,li={aqua:[0,di,di],lime:[0,di,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,di],navy:[0,0,128],white:[di,di,di],olive:[128,128,0],yellow:[di,di,0],orange:[di,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[di,0,0],pink:[di,192,203],cyan:[0,di,di],transparent:[di,di,di,0]},ui=function(q,K,z){return(6*(q+=q<0?1:q>1?-1:0)<1?K+(z-K)*q*6:q<.5?z:3*q<2?K+(z-K)*(2/3-q)*6:K)*di+.5|0},fi=function(q,K,z){var Y,Q,X,Z,J,tt,et,it,st,nt,at=q?St(q)?[q>>16,q>>8&di,q&di]:0:li.black;if(!at){if(","===q.substr(-1)&&(q=q.substr(0,q.length-1)),li[q])at=li[q];else if("#"===q.charAt(0)){if(q.length<6&&(Y=q.charAt(1),Q=q.charAt(2),X=q.charAt(3),q="#"+Y+Y+Q+Q+X+X+(5===q.length?q.charAt(4)+q.charAt(4):"")),9===q.length)return[(at=parseInt(q.substr(1,6),16))>>16,at>>8&di,at&di,parseInt(q.substr(7),16)/255];at=[(q=parseInt(q.substr(1),16))>>16,q>>8&di,q&di]}else if("hsl"===q.substr(0,3))if(at=nt=q.match(Mt),K){if(~q.indexOf("="))return at=q.match(Nt),z&&at.length<4&&(at[3]=1),at}else Z=+at[0]%360/360,J=+at[1]/100,Y=2*(tt=+at[2]/100)-(Q=tt<=.5?tt*(J+1):tt+J-tt*J),at.length>3&&(at[3]*=1),at[0]=ui(Z+1/3,Y,Q),at[1]=ui(Z,Y,Q),at[2]=ui(Z-1/3,Y,Q);else at=q.match(Mt)||li.transparent;at=at.map(Number)}return K&&!nt&&(Y=at[0]/di,Q=at[1]/di,X=at[2]/di,tt=((et=Math.max(Y,Q,X))+(it=Math.min(Y,Q,X)))/2,et===it?Z=J=0:(st=et-it,J=tt>.5?st/(2-et-it):st/(et+it),Z=et===Y?(Q-X)/st+(QJ||lt<0)&&(at+=lt-tt),((it=(nt=(rt+=lt)-at)-ct)>0||ut)&&(ot=++Y.frame,Q=nt-1e3*Y.time,Y.time=nt/=1e3,ct+=it+(it>=ht?4:ht-it),st=1),ut||(q=K(z)),st)for(X=0;X=K&&X--},_listeners:dt}}(),_i=function(){return!ot&&yi.wake()},Ei={},wi=/^[\d.\-M][\d.\-,\s]/,Ti=/["']/g,Si=function(q){for(var K,z,Y,Q={},X=q.substr(1,q.length-3).split(":"),Z=X[0],J=1,tt=X.length;J1&&Z.config?Z.config.apply(null,~q.indexOf("{")?[Si(X[1])]:(K=q,z=K.indexOf("(")+1,Y=K.indexOf(")"),Q=K.indexOf("(",z),K.substring(z,~Q&&Q=1?z:1,X=(Y||(K?.3:.45))/(z<1?z:1),Z=X/vt*(Math.asin(1/Q)||0),J=function(q){return 1===q?1:Q*Math.pow(2,-10*q)*Et((q-Z)*X)+1},tt="out"===K?J:"in"===K?function(q){return 1-J(1-q)}:Di(J);return X=vt/X,tt.config=function(z,Y){return q(K,z,Y)},tt},Pi=function q(K,z){void 0===z&&(z=1.70158);var Y=function(q){return q?--q*q*((z+1)*q+z)+1:0},Q="out"===K?Y:"in"===K?function(q){return 1-Y(1-q)}:Di(Y);return Q.config=function(z){return q(K,z)},Q};re("Linear,Quad,Cubic,Quart,Quint,Strong",(function(q,K){var z=K<5?K+1:K;Ii(q+",Power"+(z-1),K?function(q){return Math.pow(q,z)}:function(q){return q},(function(q){return 1-Math.pow(1-q,z)}),(function(q){return q<.5?Math.pow(2*q,z)/2:1-Math.pow(2*(1-q),z)/2}))})),Ei.Linear.easeNone=Ei.none=Ei.Linear.easeIn,Ii("Elastic",Ri("in"),Ri("out"),Ri()),ht=7.5625,dt=1/(ct=2.75),Ii("Bounce",(function(q){return 1-lt(1-q)}),lt=function(q){return q0?q+(q+this._rDelay)*this._repeat:q):this.totalDuration()&&this._dur},K.totalDuration=function(q){return arguments.length?(this._dirty=0,Ue(this,this._repeat<0?q:(q-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},K.totalTime=function(q,K){if(_i(),!arguments.length)return this._tTime;var z=this._dp;if(z&&z.smoothChildTiming&&this._ts){for(Pe(this,q),!z._dp||z.parent||Me(z,this);z&&z.parent;)z.parent._time!==z._start+(z._ts>=0?z._tTime/z._ts:(z.totalDuration()-z._tTime)/-z._ts)&&z.totalTime(z._tTime,!0),z=z.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&q0||!this._tDur&&!q)&&Ne(this._dp,this,this._start-this._delay)}return(this._tTime!==q||!this._dur&&!K||this._initted&&Math.abs(this._zTime)===pt||!q&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=q),ue(this,q,K)),this},K.time=function(q,K){return arguments.length?this.totalTime(Math.min(this.totalDuration(),q+Oe(this))%(this._dur+this._rDelay)||(q?this._dur:0),K):this._time},K.totalProgress=function(q,K){return arguments.length?this.totalTime(this.totalDuration()*q,K):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},K.progress=function(q,K){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?q:1-q)+Oe(this),K):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},K.iteration=function(q,K){var z=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(q-1)*z,K):this._repeat?Ie(this._tTime,z)+1:1},K.timeScale=function(q,K){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===q)return this;var z=this.parent&&this._ts?De(this.parent._time,this):this._tTime;return this._rts=+q||0,this._ts=this._ps||-1e-8===q?0:this._rts,this.totalTime(Ve(-Math.abs(this._delay),this._tDur,z),!1!==K),Re(this),Se(this)},K.paused=function(q){return arguments.length?(this._ps!==q&&(this._ps=q,q?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(_i(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==pt&&(this._tTime-=pt)))),this):this._ps},K.startTime=function(q){if(arguments.length){this._start=q;var K=this.parent||this._dp;return K&&(K._sort||!this.parent)&&Ne(K,this,q-this._delay),this}return this._start},K.endTime=function(q){return this._start+(Ot(q)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},K.rawTime=function(q){var K=this.parent||this._dp;return K?q&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?De(K.rawTime(q),this):this._tTime:this._tTime},K.revert=function(q){void 0===q&&(q=zt);var K=Z;return Z=q,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(q),this.totalTime(-.01,q.suppressEvents)),"nested"!==this.data&&!1!==q.kill&&this.kill(),Z=K,this},K.globalTime=function(q){for(var K=this,z=arguments.length?q:K.rawTime();K;)z=K._start+z/(Math.abs(K._ts)||1),K=K._dp;return!this.parent&&this._sat?this._sat.globalTime(q):z},K.repeat=function(q){return arguments.length?(this._repeat=q===1/0?-2:q,Fe(this)):-2===this._repeat?1/0:this._repeat},K.repeatDelay=function(q){if(arguments.length){var K=this._time;return this._rDelay=q,Fe(this),K?this.time(K):this}return this._rDelay},K.yoyo=function(q){return arguments.length?(this._yoyo=q,this):this._yoyo},K.seek=function(q,K){return this.totalTime(je(this,q),Ot(K))},K.restart=function(q,K){return this.play().totalTime(q?-this._delay:0,Ot(K))},K.play=function(q,K){return null!=q&&this.seek(q,K),this.reversed(!1).paused(!1)},K.reverse=function(q,K){return null!=q&&this.seek(q||this.totalDuration(),K),this.reversed(!0).paused(!1)},K.pause=function(q,K){return null!=q&&this.seek(q,K),this.paused(!0)},K.resume=function(){return this.paused(!1)},K.reversed=function(q){return arguments.length?(!!q!==this.reversed()&&this.timeScale(-this._rts||(q?-1e-8:0)),this):this._rts<0},K.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},K.isActive=function(){var q,K=this.parent||this._dp,z=this._start;return!(K&&!(this._ts&&this._initted&&K.isActive()&&(q=K.rawTime(!0))>=z&&q1?(K?(Y[q]=K,z&&(Y[q+"Params"]=z),"onUpdate"===q&&(this._onUpdate=K)):delete Y[q],this):Y[q]},K.then=function(q){var K=this;return new Promise((function(z){var Y=Tt(q)?q:be,Q=function(){var q=K.then;K.then=null,Tt(Y)&&(Y=Y(K))&&(Y.then||Y===K)&&(K.then=q),z(Y),K.then=q};K._initted&&1===K.totalProgress()&&K._ts>=0||!K._tTime&&K._ts<0?Q():K._prom=Q}))},K.kill=function(){oi(this)},q}();pe(Ni.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 xi=function(q){function K(K,z){var Q;return void 0===K&&(K={}),(Q=q.call(this,K)||this).labels={},Q.smoothChildTiming=!!K.smoothChildTiming,Q.autoRemoveChildren=!!K.autoRemoveChildren,Q._sort=Ot(K.sortChildren),tt&&Ne(K.parent||tt,Y(Q),z),K.reversed&&Q.reverse(),K.paused&&Q.paused(!0),K.scrollTrigger&&xe(Y(Q),K.scrollTrigger),Q}Q(K,q);var z=K.prototype;return z.to=function(q,K,z){return $e(0,arguments,this),this},z.from=function(q,K,z){return $e(1,arguments,this),this},z.fromTo=function(q,K,z,Y){return $e(2,arguments,this),this},z.set=function(q,K,z){return K.duration=0,K.parent=this,ye(K).repeatDelay||(K.repeat=0),K.immediateRender=!!K.immediateRender,new Wi(q,K,je(this,z),1),this},z.call=function(q,K,z){return Ne(this,Wi.delayedCall(0,q,K),z)},z.staggerTo=function(q,K,z,Y,Q,X,Z){return z.duration=K,z.stagger=z.stagger||Y,z.onComplete=X,z.onCompleteParams=Z,z.parent=this,new Wi(q,z,je(this,Q)),this},z.staggerFrom=function(q,K,z,Y,Q,X,Z){return z.runBackwards=1,ye(z).immediateRender=Ot(z.immediateRender),this.staggerTo(q,K,z,Y,Q,X,Z)},z.staggerFromTo=function(q,K,z,Y,Q,X,Z,J){return Y.startAt=z,ye(Y).immediateRender=Ot(Y.immediateRender),this.staggerTo(q,K,Y,Q,X,Z,J)},z.render=function(q,K,z){var Y,Q,X,J,et,it,st,nt,at,rt,ot,ht,ct=this._time,dt=this._dirty?this.totalDuration():this._tDur,lt=this._dur,ut=q<=0?0:he(q),ft=this._zTime<0!=q<0&&(this._initted||!lt);if(this!==tt&&ut>dt&&q>=0&&(ut=dt),ut!==this._tTime||z||ft){if(ct!==this._time&<&&(ut+=this._time-ct,q+=this._time-ct),Y=ut,at=this._start,it=!(nt=this._ts),ft&&(lt||(ct=this._zTime),(q||!K)&&(this._zTime=q)),this._repeat){if(ot=this._yoyo,et=lt+this._rDelay,this._repeat<-1&&q<0)return this.totalTime(100*et+q,K,z);if(Y=he(ut%et),ut===dt?(J=this._repeat,Y=lt):((J=~~(ut/et))&&J===ut/et&&(Y=lt,J--),Y>lt&&(Y=lt)),rt=Ie(this._tTime,et),!ct&&this._tTime&&rt!==J&&this._tTime-rt*et-this._dur<=0&&(rt=J),ot&&1&J&&(Y=lt-Y,ht=1),J!==rt&&!this._lock){var bt=ot&&1&rt,vt=bt===(ot&&1&J);if(JK)for(Y=q._first;Y&&Y._start<=z;){if("isPause"===Y.data&&Y._start>K)return Y;Y=Y._next}else for(Y=q._last;Y&&Y._start>=z;){if("isPause"===Y.data&&Y._start=ct&&q>=0)for(Q=this._first;Q;){if(X=Q._next,(Q._act||Y>=Q._start)&&Q._ts&&st!==Q){if(Q.parent!==this)return this.render(q,K,z);if(Q.render(Q._ts>0?(Y-Q._start)*Q._ts:(Q._dirty?Q.totalDuration():Q._tDur)+(Y-Q._start)*Q._ts,K,z),Y!==this._time||!this._ts&&!it){st=0,X&&(ut+=this._zTime=-1e-8);break}}Q=X}else{Q=this._last;for(var gt=q<0?q:Y;Q;){if(X=Q._prev,(Q._act||gt<=Q._end)&&Q._ts&&st!==Q){if(Q.parent!==this)return this.render(q,K,z);if(Q.render(Q._ts>0?(gt-Q._start)*Q._ts:(Q._dirty?Q.totalDuration():Q._tDur)+(gt-Q._start)*Q._ts,K,z||Z&&(Q._initted||Q._startAt)),Y!==this._time||!this._ts&&!it){st=0,X&&(ut+=this._zTime=gt?-1e-8:pt);break}}Q=X}}if(st&&!K&&(this.pause(),st.render(Y>=ct?0:-1e-8)._zTime=Y>=ct?1:-1,this._ts))return this._start=at,Re(this),this.render(q,K,z);this._onUpdate&&!K&&ri(this,"onUpdate",!0),(ut===dt&&this._tTime>=this.totalDuration()||!ut&&ct)&&(at!==this._start&&Math.abs(nt)===Math.abs(this._ts)||this._lock||((q||!lt)&&(ut===dt&&this._ts>0||!ut&&this._ts<0)&&we(this,1),K||q<0&&!ct||!ut&&!ct&&dt||(ri(this,ut===dt&&q>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(ut0)&&this._prom())))}return this},z.add=function(q,K){var z=this;if(St(K)||(K=je(this,K,q)),!(q instanceof Ni)){if(Pt(q))return q.forEach((function(q){return z.add(q,K)})),this;if(wt(q))return this.addLabel(q,K);if(!Tt(q))return this;q=Wi.delayedCall(0,q)}return this!==q?Ne(this,q,K):this},z.getChildren=function(q,K,z,Y){void 0===q&&(q=!0),void 0===K&&(K=!0),void 0===z&&(z=!0),void 0===Y&&(Y=-bt);for(var Q=[],X=this._first;X;)X._start>=Y&&(X instanceof Wi?K&&Q.push(X):(z&&Q.push(X),q&&Q.push.apply(Q,X.getChildren(!0,K,z)))),X=X._next;return Q},z.getById=function(q){for(var K=this.getChildren(1,1,1),z=K.length;z--;)if(K[z].vars.id===q)return K[z]},z.remove=function(q){return wt(q)?this.removeLabel(q):Tt(q)?this.killTweensOf(q):(Ee(this,q),q===this._recent&&(this._recent=this._last),Te(this))},z.totalTime=function(K,z){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=he(yi.time-(this._ts>0?K/this._ts:(this.totalDuration()-K)/-this._ts))),q.prototype.totalTime.call(this,K,z),this._forcing=0,this):this._tTime},z.addLabel=function(q,K){return this.labels[q]=je(this,K),this},z.removeLabel=function(q){return delete this.labels[q],this},z.addPause=function(q,K,z){var Y=Wi.delayedCall(0,K||Wt,z);return Y.data="isPause",this._hasPause=1,Ne(this,Y,je(this,q))},z.removePause=function(q){var K=this._first;for(q=je(this,q);K;)K._start===q&&"isPause"===K.data&&we(K),K=K._next},z.killTweensOf=function(q,K,z){for(var Y=this.getTweensOf(q,z),Q=Y.length;Q--;)Li!==Y[Q]&&Y[Q].kill(q,K);return this},z.getTweensOf=function(q,K){for(var z,Y=[],Q=Ye(q),X=this._first,Z=St(K);X;)X instanceof Wi?de(X._targets,Q)&&(Z?(!Li||X._initted&&X._ts)&&X.globalTime(0)<=K&&X.globalTime(X.totalDuration())>K:!K||X.isActive())&&Y.push(X):(z=X.getTweensOf(Q,K)).length&&Y.push.apply(Y,z),X=X._next;return Y},z.tweenTo=function(q,K){K=K||{};var z,Y=this,Q=je(Y,q),X=K,Z=X.startAt,J=X.onStart,tt=X.onStartParams,et=X.immediateRender,it=Wi.to(Y,pe({ease:K.ease||"none",lazy:!1,immediateRender:!1,time:Q,overwrite:"auto",duration:K.duration||Math.abs((Q-(Z&&"time"in Z?Z.time:Y._time))/Y.timeScale())||pt,onStart:function(){if(Y.pause(),!z){var q=K.duration||Math.abs((Q-(Z&&"time"in Z?Z.time:Y._time))/Y.timeScale());it._dur!==q&&Ue(it,q,0,1).render(it._time,!0,!0),z=1}J&&J.apply(it,tt||[])}},K));return et?it.render(0):it},z.tweenFromTo=function(q,K,z){return this.tweenTo(K,pe({startAt:{time:je(this,q)}},z))},z.recent=function(){return this._recent},z.nextLabel=function(q){return void 0===q&&(q=this._time),ai(this,je(this,q))},z.previousLabel=function(q){return void 0===q&&(q=this._time),ai(this,je(this,q),1)},z.currentLabel=function(q){return arguments.length?this.seek(q,!0):this.previousLabel(this._time+pt)},z.shiftChildren=function(q,K,z){void 0===z&&(z=0);for(var Y,Q=this._first,X=this.labels;Q;)Q._start>=z&&(Q._start+=q,Q._end+=q),Q=Q._next;if(K)for(Y in X)X[Y]>=z&&(X[Y]+=q);return Te(this)},z.invalidate=function(K){var z=this._first;for(this._lock=0;z;)z.invalidate(K),z=z._next;return q.prototype.invalidate.call(this,K)},z.clear=function(q){void 0===q&&(q=!0);for(var K,z=this._first;z;)K=z._next,this.remove(z),z=K;return this._dp&&(this._time=this._tTime=this._pTime=0),q&&(this.labels={}),Te(this)},z.totalDuration=function(q){var K,z,Y,Q=0,X=this,Z=X._last,J=bt;if(arguments.length)return X.timeScale((X._repeat<0?X.duration():X.totalDuration())/(X.reversed()?-q:q));if(X._dirty){for(Y=X.parent;Z;)K=Z._prev,Z._dirty&&Z.totalDuration(),(z=Z._start)>J&&X._sort&&Z._ts&&!X._lock?(X._lock=1,Ne(X,Z,z-Z._delay,1)._lock=0):J=z,z<0&&Z._ts&&(Q-=z,(!Y&&!X._dp||Y&&Y.smoothChildTiming)&&(X._start+=z/X._ts,X._time-=z,X._tTime-=z),X.shiftChildren(-z,!1,-Infinity),J=0),Z._end>Q&&Z._ts&&(Q=Z._end),Z=K;Ue(X,X===tt&&X._time>Q?X._time:Q,1,1),X._dirty=0}return X._tDur},K.updateRoot=function(q){if(tt._ts&&(ue(tt,De(q,tt)),at=yi.frame),yi.frame>=te){te+=ut.autoSleep||120;var K=tt._first;if((!K||!K._ts)&&ut.autoSleep&&yi._listeners.length<2){for(;K&&!K._ts;)K=K._next;K||yi.sleep()}}},K}(Ni);pe(xi.prototype,{_lock:0,_hasPause:0,_forcing:0});var Li,ki,Bi=function(q,K,z,Y,Q,X,Z){var J,tt,et,it,st,nt,at,rt,ot=new as(this._pt,q,K,0,1,Ji,null,Q),ht=0,ct=0;for(ot.b=z,ot.e=Y,z+="",(at=~(Y+="").indexOf("random("))&&(Y=si(Y)),X&&(X(rt=[z,Y],q,K),z=rt[0],Y=rt[1]),tt=z.match(Lt)||[];J=Lt.exec(Y);)it=J[0],st=Y.substring(ht,J.index),et?et=(et+1)%5:"rgba("===st.substr(-5)&&(et=1),it!==tt[ct++]&&(nt=parseFloat(tt[ct-1])||0,ot._pt={_next:ot._pt,p:st||1===ct?st:",",s:nt,c:"="===it.charAt(1)?ce(nt,it)-nt:parseFloat(it)-nt,m:et&&et<4?Math.round:0},ht=Lt.lastIndex);return ot.c=ht")})),et.duration();else{for(at in st={},vt)"ease"===at||"easeEach"===at||ji(at,vt[at],st,vt.easeEach);for(at in st)for(wt=st[at].sort((function(q,K){return q.t-K.t})),It=0,it=0;itrt-pt&&!ht?rt:qot&&(Y=ot)),(et=this._yoyo&&1&X)&&(nt=this._yEase,Y=ot-Y),tt=Ie(this._tTime,J),Y===at&&!z&&this._initted&&X===tt)return this._tTime=ct,this;X!==tt&&(st&&this._yEase&&Ci(st,et),this.vars.repeatRefresh&&!et&&!this._lock&&this._time!==J&&this._initted&&(this._lock=z=1,this.render(he(J*X),!0).invalidate()._lock=0))}if(!this._initted){if(Le(this,ht?q:Y,z,K,ct))return this._tTime=0,this;if(!(at===this._time||z&&this.vars.repeatRefresh&&X!==tt))return this;if(ot!==this._dur)return this.render(q,K,z)}if(this._tTime=ct,this._time=Y,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=it=(nt||this._ease)(Y/ot),this._from&&(this.ratio=it=1-it),Y&&!at&&!K&&!X&&(ri(this,"onStart"),this._tTime!==ct))return this;for(Q=this._pt;Q;)Q.r(it,Q.d),Q=Q._next;st&&st.render(q<0?q:st._dur*st._ease(Y/this._dur),K,z)||this._startAt&&(this._zTime=q),this._onUpdate&&!K&&(ht&&Ae(this,q,0,z),ri(this,"onUpdate")),this._repeat&&X!==tt&&this.vars.onRepeat&&!K&&this.parent&&ri(this,"onRepeat"),ct!==this._tDur&&ct||this._tTime!==ct||(ht&&!this._onUpdate&&Ae(this,q,0,!0),(q||!ot)&&(ct===this._tDur&&this._ts>0||!ct&&this._ts<0)&&we(this,1),K||ht&&!at||!(ct||at||et)||(ri(this,ct===rt?"onComplete":"onReverseComplete",!0),this._prom&&!(ct0)&&this._prom()))}}else!function(q,K,z,Y){var Q,X,J,tt=q.ratio,et=K<0||!K&&(!q._start&&ke(q)&&(q._initted||!Be(q))||(q._ts<0||q._dp._ts<0)&&!Be(q))?0:1,it=q._rDelay,st=0;if(it&&q._repeat&&(st=Ve(0,q._tDur,K),X=Ie(st,it),q._yoyo&&1&X&&(et=1-et),X!==Ie(q._tTime,it)&&(tt=1-et,q.vars.repeatRefresh&&q._initted&&q.invalidate())),et!==tt||Z||Y||q._zTime===pt||!K&&q._zTime){if(!q._initted&&Le(q,K,Y,z,st))return;for(J=q._zTime,q._zTime=K||(z?pt:0),z||(z=K&&!J),q.ratio=et,q._from&&(et=1-et),q._time=0,q._tTime=st,Q=q._pt;Q;)Q.r(et,Q.d),Q=Q._next;K<0&&Ae(q,K,0,!0),q._onUpdate&&!z&&ri(q,"onUpdate"),st&&q._repeat&&!z&&q.parent&&ri(q,"onRepeat"),(K>=q._tDur||K<0)&&q.ratio===et&&(et&&we(q,1),z||Z||(ri(q,et?"onComplete":"onReverseComplete",!0),q._prom&&q._prom()))}else q._zTime||(q._zTime=K)}(this,q,K,z);return this},z.targets=function(){return this._targets},z.invalidate=function(K){return(!K||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(K),q.prototype.invalidate.call(this,K)},z.resetTo=function(q,K,z,Y,Q){ot||yi.wake(),this._ts||this.play();var X=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Gi(this,X),function(q,K,z,Y,Q,X,Z,J){var tt,et,it,st,nt=(q._pt&&q._ptCache||(q._ptCache={}))[K];if(!nt)for(nt=q._ptCache[K]=[],it=q._ptLookup,st=q._targets.length;st--;){if((tt=it[st][K])&&tt.d&&tt.d._pt)for(tt=tt.d._pt;tt&&tt.p!==K&&tt.fp!==K;)tt=tt._next;if(!tt)return ki=1,q.vars[K]="+=0",Gi(q,Z),ki=0,J?Ht(K+" not eligible for reset"):1;nt.push(tt)}for(st=nt.length;st--;)(tt=(et=nt[st])._pt||et).s=!Y&&0!==Y||Q?tt.s+(Y||0)+X*tt.c:Y,tt.c=z-tt.s,et.e&&(et.e=oe(z)+We(et.e)),et.b&&(et.b=tt.s+We(et.b))}(this,q,K,z,Y,this._ease(X/this._dur),X,Q)?this.resetTo(q,K,z,Y,1):(Pe(this,0),this.parent||_e(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},z.kill=function(q,K){if(void 0===K&&(K="all"),!(q||K&&"all"!==K))return this._lazy=this._pt=0,this.parent?oi(this):this;if(this.timeline){var z=this.timeline.totalDuration();return this.timeline.killTweensOf(q,K,Li&&!0!==Li.vars.overwrite)._first||oi(this),this.parent&&z!==this.timeline.totalDuration()&&Ue(this,this._dur*this.timeline._tDur/z,0,1),this}var Y,Q,X,Z,J,tt,et,it=this._targets,st=q?Ye(q):it,nt=this._ptLookup,at=this._pt;if((!K||"all"===K)&&function(q,K){for(var z=q.length,Y=z===K.length;Y&&z--&&q[z]===K[z];);return z<0}(it,st))return"all"===K&&(this._pt=0),oi(this);for(Y=this._op=this._op||[],"all"!==K&&(wt(K)&&(J={},re(K,(function(q){return J[q]=1})),K=J),K=function(q,K){var z,Y,Q,X,Z=q[0]?ne(q[0]).harness:0,J=Z&&Z.aliases;if(!J)return K;for(Y in z=ve({},K),J)if(Y in z)for(Q=(X=J[Y].split(",")).length;Q--;)z[X[Q]]=z[Y];return z}(it,K)),et=it.length;et--;)if(~st.indexOf(it[et]))for(J in Q=nt[et],"all"===K?(Y[et]=K,Z=Q,X={}):(X=Y[et]=Y[et]||{},Z=K),Z)(tt=Q&&Q[J])&&("kill"in tt.d&&!0!==tt.d.kill(J)||Ee(this,tt,"_pt"),delete Q[J]),"all"!==X&&(X[J]=1);return this._initted&&!this._pt&&at&&oi(this),this},K.to=function(q,z){return new K(q,z,arguments[2])},K.from=function(q,K){return $e(1,arguments)},K.delayedCall=function(q,z,Y,Q){return new K(z,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:q,onComplete:z,onReverseComplete:z,onCompleteParams:Y,onReverseCompleteParams:Y,callbackScope:Q})},K.fromTo=function(q,K,z){return $e(2,arguments)},K.set=function(q,z){return z.duration=0,z.repeatDelay||(z.repeat=0),new K(q,z)},K.killTweensOf=function(q,K,z){return tt.killTweensOf(q,K,z)},K}(Ni);pe(Wi.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),re("staggerTo,staggerFrom,staggerFromTo",(function(q){Wi[q]=function(){var K=new xi,z=qe.call(arguments,0);return z.splice("staggerFromTo"===q?5:4,0,0),K[q].apply(K,z)}}));var qi=function(q,K,z){return q[K]=z},Ki=function(q,K,z){return q[K](z)},zi=function(q,K,z,Y){return q[K](Y.fp,z)},Yi=function(q,K,z){return q.setAttribute(K,z)},Qi=function(q,K){return Tt(q[K])?Ki:At(q[K])&&q.setAttribute?Yi:qi},Xi=function(q,K){return K.set(K.t,K.p,Math.round(1e6*(K.s+K.c*q))/1e6,K)},Zi=function(q,K){return K.set(K.t,K.p,!!(K.s+K.c*q),K)},Ji=function(q,K){var z=K._pt,Y="";if(!q&&K.b)Y=K.b;else if(1===q&&K.e)Y=K.e;else{for(;z;)Y=z.p+(z.m?z.m(z.s+z.c*q):Math.round(1e4*(z.s+z.c*q))/1e4)+Y,z=z._next;Y+=K.c}K.set(K.t,K.p,Y,K)},ts=function(q,K){for(var z=K._pt;z;)z.r(q,z.d),z=z._next},es=function(q,K,z,Y){for(var Q,X=this._pt;X;)Q=X._next,X.p===Y&&X.modifier(q,K,z),X=Q},is=function(q){for(var K,z,Y=this._pt;Y;)z=Y._next,Y.p===q&&!Y.op||Y.op===q?Ee(this,Y,"_pt"):Y.dep||(K=1),Y=z;return!K},ss=function(q,K,z,Y){Y.mSet(q,K,Y.m.call(Y.tween,z,Y.mt),Y)},ns=function(q){for(var K,z,Y,Q,X=q._pt;X;){for(K=X._next,z=Y;z&&z.pr>X.pr;)z=z._next;(X._prev=z?z._prev:Q)?X._prev._next=X:Y=X,(X._next=z)?z._prev=X:Q=X,X=K}q._pt=Y},as=function(){function q(q,K,z,Y,Q,X,Z,J,tt){this.t=K,this.s=Y,this.c=Q,this.p=z,this.r=X||Xi,this.d=Z||this,this.set=J||qi,this.pr=tt||0,this._next=q,q&&(q._prev=this)}return q.prototype.modifier=function(q,K,z){this.mSet=this.mSet||this.set,this.set=ss,this.m=q,this.mt=z,this.tween=K},q}();re(ie+"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(q){return Yt[q]=1})),Ft.TweenMax=Ft.TweenLite=Wi,Ft.TimelineLite=Ft.TimelineMax=xi,tt=new xi({sortChildren:!1,defaults:ft,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),ut.stringFilter=mi;var rs=[],os={},hs=[],cs=0,ds=0,ls=function(q){return(os[q]||hs).map((function(q){return q()}))},us=function(){var q=Date.now(),K=[];q-cs>2&&(ls("matchMediaInit"),rs.forEach((function(q){var z,Y,Q,X,Z=q.queries,J=q.conditions;for(Y in Z)(z=et.matchMedia(Z[Y]).matches)&&(Q=1),z!==J[Y]&&(J[Y]=z,X=1);X&&(q.revert(),Q&&K.push(q))})),ls("matchMediaRevert"),K.forEach((function(q){return q.onMatch(q,(function(K){return q.add(null,K)}))})),cs=q,ls("matchMedia"))},fs=function(){function q(q,K){this.selector=K&&Qe(K),this.data=[],this._r=[],this.isReverted=!1,this.id=ds++,q&&this.add(q)}var K=q.prototype;return K.add=function(q,K,z){Tt(q)&&(z=K,K=q,q=Tt);var Y=this,Q=function(){var q,Q=J,X=Y.selector;return Q&&Q!==Y&&Q.data.push(Y),z&&(Y.selector=Qe(z)),J=Y,q=K.apply(Y,arguments),Tt(q)&&Y._r.push(q),J=Q,Y.selector=X,Y.isReverted=!1,q};return Y.last=Q,q===Tt?Q(Y,(function(q){return Y.add(null,q)})):q?Y[q]=Q:Q},K.ignore=function(q){var K=J;J=null,q(this),J=K},K.getTweens=function(){var K=[];return this.data.forEach((function(z){return z instanceof q?K.push.apply(K,z.getTweens()):z instanceof Wi&&!(z.parent&&"nested"===z.parent.data)&&K.push(z)})),K},K.clear=function(){this._r.length=this.data.length=0},K.kill=function(q,K){var z=this;if(q?function(){for(var K,Y=z.getTweens(),Q=z.data.length;Q--;)"isFlip"===(K=z.data[Q]).data&&(K.revert(),K.getChildren(!0,!0,!1).forEach((function(q){return Y.splice(Y.indexOf(q),1)})));for(Y.map((function(q){return{g:q._dur||q._delay||q._sat&&!q._sat.vars.immediateRender?q.globalTime(0):-1/0,t:q}})).sort((function(q,K){return K.g-q.g||-1/0})).forEach((function(K){return K.t.revert(q)})),Q=z.data.length;Q--;)(K=z.data[Q])instanceof xi?"nested"!==K.data&&(K.scrollTrigger&&K.scrollTrigger.revert(),K.kill()):!(K instanceof Wi)&&K.revert&&K.revert(q);z._r.forEach((function(K){return K(q,z)})),z.isReverted=!0}():this.data.forEach((function(q){return q.kill&&q.kill()})),this.clear(),K)for(var Y=rs.length;Y--;)rs[Y].id===this.id&&rs.splice(Y,1)},K.revert=function(q){this.kill(q||{})},q}(),bs=function(){function q(q){this.contexts=[],this.scope=q,J&&J.data.push(this)}var K=q.prototype;return K.add=function(q,K,z){Ct(q)||(q={matches:q});var Y,Q,X,Z=new fs(0,z||this.scope),tt=Z.conditions={};for(Q in J&&!Z.selector&&(Z.selector=J.selector),this.contexts.push(Z),K=Z.add("onMatch",K),Z.queries=q,q)"all"===Q?X=1:(Y=et.matchMedia(q[Q]))&&(rs.indexOf(Z)<0&&rs.push(Z),(tt[Q]=Y.matches)&&(X=1),Y.addListener?Y.addListener(us):Y.addEventListener("change",us));return X&&K(Z,(function(q){return Z.add(null,q)})),this},K.revert=function(q){this.kill(q||{})},K.kill=function(q){this.contexts.forEach((function(K){return K.kill(q,!0)}))},q}(),ps={registerPlugin:function(){for(var q=arguments.length,K=new Array(q),z=0;z1){var Y=q.map((function(q){return ms.quickSetter(q,K,z)})),Q=Y.length;return function(q){for(var K=Q;K--;)Y[K](q)}}q=q[0]||{};var X=Zt[K],Z=ne(q),J=Z.harness&&(Z.harness.aliases||{})[K]||K,tt=X?function(K){var Y=new X;rt._pt=0,Y.init(q,z?K+z:K,rt,0,[q]),Y.render(1,Y),rt._pt&&ts(1,rt)}:Z.set(q,J);return X?tt:function(K){return tt(q,J,z?K+z:K,Z,1)}},quickTo:function(q,K,z){var Y,Q=ms.to(q,ve(((Y={})[K]="+=0.1",Y.paused=!0,Y),z||{})),X=function(q,z,Y){return Q.resetTo(K,q,z,Y)};return X.tween=Q,X},isTweening:function(q){return tt.getTweensOf(q,!0).length>0},defaults:function(q){return q&&q.ease&&(q.ease=Oi(q.ease,ft.ease)),ge(ft,q||{})},config:function(q){return ge(ut,q||{})},registerEffect:function(q){var K=q.name,z=q.effect,Y=q.plugins,Q=q.defaults,X=q.extendTimeline;(Y||"").split(",").forEach((function(q){return q&&!Zt[q]&&!Ft[q]&&Ht(K+" effect requires "+q+" plugin.")})),Jt[K]=function(q,K,Y){return z(Ye(q),pe(K||{},Q),Y)},X&&(xi.prototype[K]=function(q,z,Y){return this.add(Jt[K](q,Ct(z)?z:(Y=z)&&{},this),Y)})},registerEase:function(q,K){Ei[q]=Oi(K)},parseEase:function(q,K){return arguments.length?Oi(q,K):Ei},getById:function(q){return tt.getById(q)},exportRoot:function(q,K){void 0===q&&(q={});var z,Y,Q=new xi(q);for(Q.smoothChildTiming=Ot(q.smoothChildTiming),tt.remove(Q),Q._dp=0,Q._time=Q._tTime=tt._time,z=tt._first;z;)Y=z._next,!K&&!z._dur&&z instanceof Wi&&z.vars.onComplete===z._targets[0]||Ne(Q,z,z._start-z._delay),z=Y;return Ne(tt,Q,0),Q},context:function(q,K){return q?new fs(q,K):J},matchMedia:function(q){return new bs(q)},matchMediaRefresh:function(){return rs.forEach((function(q){var K,z,Y=q.conditions;for(z in Y)Y[z]&&(Y[z]=!1,K=1);K&&q.revert()}))||us()},addEventListener:function(q,K){var z=os[q]||(os[q]=[]);~z.indexOf(K)||z.push(K)},removeEventListener:function(q,K){var z=os[q],Y=z&&z.indexOf(K);Y>=0&&z.splice(Y,1)},utils:{wrap:function q(K,z,Y){var Q=z-K;return Pt(K)?ii(K,q(0,K.length),z):He(Y,(function(q){return(Q+(q-K)%Q)%Q+K}))},wrapYoyo:function q(K,z,Y){var Q=z-K,X=2*Q;return Pt(K)?ii(K,q(0,K.length-1),z):He(Y,(function(q){return K+((q=(X+(q-K)%X)%X||0)>Q?X-q:q)}))},distribute:Ze,random:ei,snap:ti,normalize:function(q,K,z){return ni(q,K,0,1,z)},getUnit:We,clamp:function(q,K,z){return He(z,(function(z){return Ve(q,K,z)}))},splitColor:fi,toArray:Ye,selector:Qe,mapRange:ni,pipe:function(){for(var q=arguments.length,K=new Array(q),z=0;z=0)return;Z.svg&&(this.svgo=Q.getAttribute("data-svg-origin"),this.props.push(zs,z,"")),K=Ks}(X||z)&&this.props.push(K,z,X[K])},Qs=function(q){q.translate&&(q.removeProperty("translate"),q.removeProperty("scale"),q.removeProperty("rotate"))},Xs=function(){var q,K,z=this.props,Y=this.target,Q=Y.style,X=Y._gsap;for(q=0;q=0?en[Q]:"")+q},nn=function(){"undefined"!=typeof window&&window.document&&(ys=window,_s=ys.document,Es=_s.documentElement,Ts=Js("div")||{style:{}},Js("div"),Ks=sn(Ks),zs=Ks+"Origin",Ts.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Cs=!!sn("perspective"),As=ms.core.reverting,ws=1)},an=function q(K){var z,Y=Js("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),Q=this.parentNode,X=this.nextSibling,Z=this.style.cssText;if(Es.appendChild(Y),Y.appendChild(this),this.style.display="block",K)try{z=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=q}catch(e){}else this._gsapBBox&&(z=this._gsapBBox());return Q&&(X?Q.insertBefore(this,X):Q.appendChild(this)),Es.removeChild(Y),this.style.cssText=Z,z},rn=function(q,K){for(var z=K.length;z--;)if(q.hasAttribute(K[z]))return q.getAttribute(K[z])},on=function(q){var K;try{K=q.getBBox()}catch(z){K=an.call(q,!0)}return K&&(K.width||K.height)||q.getBBox===an||(K=an.call(q,!0)),!K||K.width||K.x||K.y?K:{x:+rn(q,["x","cx","x1"])||0,y:+rn(q,["y","cy","y1"])||0,width:0,height:0}},hn=function(q){return!(!q.getCTM||q.parentNode&&!q.ownerSVGElement||!on(q))},cn=function(q,K){if(K){var z,Y=q.style;K in Os&&K!==zs&&(K=Ks),Y.removeProperty?("ms"!==(z=K.substr(0,2))&&"webkit"!==K.substr(0,6)||(K="-"+K),Y.removeProperty("--"===z?K:K.replace(Ps,"-$1").toLowerCase())):Y.removeAttribute(K)}},dn=function(q,K,z,Y,Q,X){var Z=new as(q._pt,K,z,0,1,X?Gs:Fs);return q._pt=Z,Z.b=Y,Z.e=Q,q._props.push(z),Z},ln={deg:1,rad:1,turn:1},un={grid:1,flex:1},fn=function q(K,z,Y,Q){var X,Z,J,tt,et=parseFloat(Y)||0,it=(Y+"").trim().substr((et+"").length)||"px",st=Ts.style,nt=Ms.test(z),at="svg"===K.tagName.toLowerCase(),rt=(at?"client":"offset")+(nt?"Width":"Height"),ot=100,ht="px"===Q,ct="%"===Q;if(Q===it||!et||ln[Q]||ln[it])return et;if("px"!==it&&!ht&&(et=q(K,z,Y,"px")),tt=K.getCTM&&hn(K),(ct||"%"===it)&&(Os[z]||~z.indexOf("adius")))return X=tt?K.getBBox()[nt?"width":"height"]:K[rt],oe(ct?et/X*ot:et/100*X);if(st[nt?"width":"height"]=ot+(ht?it:Q),Z=~z.indexOf("adius")||"em"===Q&&K.appendChild&&!at?K:K.parentNode,tt&&(Z=(K.ownerSVGElement||{}).parentNode),Z&&Z!==_s&&Z.appendChild||(Z=_s.body),(J=Z._gsap)&&ct&&J.width&&nt&&J.time===yi.time&&!J.uncache)return oe(et/J.width*ot);if(!ct||"height"!==z&&"width"!==z)(ct||"%"===it)&&!un[tn(Z,"display")]&&(st.position=tn(K,"position")),Z===K&&(st.position="static"),Z.appendChild(Ts),X=Ts[rt],Z.removeChild(Ts),st.position="absolute";else{var dt=K.style[z];K.style[z]=ot+Q,X=K[rt],dt?K.style[z]=dt:cn(K,z)}return nt&&ct&&((J=ne(Z)).time=yi.time,J.width=Z[rt]),oe(ht?X*et/ot:X&&et?ot/X*et:0)},bn=function(q,K,z,Y){var Q;return ws||nn(),K in xs&&"transform"!==K&&~(K=xs[K]).indexOf(",")&&(K=K.split(",")[0]),Os[K]&&"transform"!==K?(Q=An(q,Y),Q="transformOrigin"!==K?Q[K]:Q.svg?Q.origin:Cn(tn(q,zs))+" "+Q.zOrigin+"px"):(!(Q=q.style[K])||"auto"===Q||Y||~(Q+"").indexOf("calc("))&&(Q=mn[K]&&mn[K](q,K,z)||tn(q,K)||ae(q,K)||("opacity"===K?1:0)),z&&!~(Q+"").trim().indexOf(" ")?fn(q,K,Q,z)+z:Q},pn=function(q,K,z,Y){if(!z||"none"===z){var Q=sn(K,q,1),X=Q&&tn(q,Q,1);X&&X!==z?(K=Q,z=X):"borderColor"===K&&(z=tn(q,"borderTopColor"))}var Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct=new as(this._pt,q.style,K,0,1,Ji),dt=0,lt=0;if(ct.b=z,ct.e=Y,z+="","auto"===(Y+="")&&(st=q.style[K],q.style[K]=Y,Y=tn(q,K)||Y,st?q.style[K]=st:cn(q,K)),mi(Z=[z,Y]),Y=Z[1],tt=(z=Z[0]).match(xt)||[],(Y.match(xt)||[]).length){for(;J=xt.exec(Y);)nt=J[0],rt=Y.substring(dt,J.index),it?it=(it+1)%5:"rgba("!==rt.substr(-5)&&"hsla("!==rt.substr(-5)||(it=1),nt!==(st=tt[lt++]||"")&&(et=parseFloat(st)||0,ht=st.substr((et+"").length),"="===nt.charAt(1)&&(nt=ce(et,nt)+ht),at=parseFloat(nt),ot=nt.substr((at+"").length),dt=xt.lastIndex-ot.length,ot||(ot=ot||ut.units[K]||ht,dt===Y.length&&(Y+=ot,ct.e+=ot)),ht!==ot&&(et=fn(q,K,st,ot)||0),ct._pt={_next:ct._pt,p:rt||1===lt?rt:",",s:et,c:at-et,m:it&&it<4||"zIndex"===K?Math.round:0});ct.c=dt-1;)z=J[Q],Os[z]&&(Y=1,z="transformOrigin"===z?zs:Ks),cn(X,z);Y&&(cn(X,Ks),tt&&(tt.svg&&X.removeAttribute("transform"),An(X,1),tt.uncache=1,Qs(Z)))}},mn={clearProps:function(q,K,z,Y,Q){if("isFromStart"!==Q.data){var X=q._pt=new as(q._pt,K,z,0,0,gn);return X.u=Y,X.pr=-10,X.tween=Q,q._props.push(z),1}}},yn=[1,0,0,1,0,0],_n={},En=function(q){return"matrix(1, 0, 0, 1, 0, 0)"===q||"none"===q||!q},wn=function(q){var K=tn(q,Ks);return En(K)?yn:K.substr(7).match(Nt).map(oe)},Tn=function(q,K){var z,Y,Q,X,Z=q._gsap||ne(q),J=q.style,tt=wn(q);return Z.svg&&q.getAttribute("transform")?"1,0,0,1,0,0"===(tt=[(Q=q.transform.baseVal.consolidate().matrix).a,Q.b,Q.c,Q.d,Q.e,Q.f]).join(",")?yn:tt:(tt!==yn||q.offsetParent||q===Es||Z.svg||(Q=J.display,J.display="block",(z=q.parentNode)&&q.offsetParent||(X=1,Y=q.nextElementSibling,Es.appendChild(q)),tt=wn(q),Q?J.display=Q:cn(q,"display"),X&&(Y?z.insertBefore(q,Y):z?z.appendChild(q):Es.removeChild(q))),K&&tt.length>6?[tt[0],tt[1],tt[4],tt[5],tt[12],tt[13]]:tt)},Sn=function(q,K,z,Y,Q,X){var Z,J,tt,et=q._gsap,it=Q||Tn(q,!0),st=et.xOrigin||0,nt=et.yOrigin||0,at=et.xOffset||0,rt=et.yOffset||0,ot=it[0],ht=it[1],ct=it[2],dt=it[3],lt=it[4],ut=it[5],ft=K.split(" "),bt=parseFloat(ft[0])||0,pt=parseFloat(ft[1])||0;z?it!==yn&&(J=ot*dt-ht*ct)&&(tt=bt*(-ht/J)+pt*(ot/J)-(ot*ut-ht*lt)/J,bt=bt*(dt/J)+pt*(-ct/J)+(ct*ut-dt*lt)/J,pt=tt):(bt=(Z=on(q)).x+(~ft[0].indexOf("%")?bt/100*Z.width:bt),pt=Z.y+(~(ft[1]||ft[0]).indexOf("%")?pt/100*Z.height:pt)),Y||!1!==Y&&et.smooth?(lt=bt-st,ut=pt-nt,et.xOffset=at+(lt*ot+ut*ct)-lt,et.yOffset=rt+(lt*ht+ut*dt)-ut):et.xOffset=et.yOffset=0,et.xOrigin=bt,et.yOrigin=pt,et.smooth=!!Y,et.origin=K,et.originIsAbsolute=!!z,q.style[zs]="0px 0px",X&&(dn(X,et,"xOrigin",st,bt),dn(X,et,"yOrigin",nt,pt),dn(X,et,"xOffset",at,et.xOffset),dn(X,et,"yOffset",rt,et.yOffset)),q.setAttribute("data-svg-origin",bt+" "+pt)},An=function(q,K){var z=q._gsap||new Mi(q);if("x"in z&&!K&&!z.uncache)return z;var Y,Q,X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt,St,At,Ct,Ot,It=q.style,Dt=z.scaleX<0,Rt="px",Pt="deg",Mt=getComputedStyle(q),Nt=tn(q,zs)||"0";return Y=Q=X=tt=et=it=st=nt=at=0,Z=J=1,z.svg=!(!q.getCTM||!hn(q)),Mt.translate&&("none"===Mt.translate&&"none"===Mt.scale&&"none"===Mt.rotate||(It[Ks]=("none"!==Mt.translate?"translate3d("+(Mt.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==Mt.rotate?"rotate("+Mt.rotate+") ":"")+("none"!==Mt.scale?"scale("+Mt.scale.split(" ").join(",")+") ":"")+("none"!==Mt[Ks]?Mt[Ks]:"")),It.scale=It.rotate=It.translate="none"),ht=Tn(q,z.svg),z.svg&&(z.uncache?(_t=q.getBBox(),Nt=z.xOrigin-_t.x+"px "+(z.yOrigin-_t.y)+"px",yt=""):yt=!K&&q.getAttribute("data-svg-origin"),Sn(q,yt||Nt,!!yt||z.originIsAbsolute,!1!==z.smooth,ht)),rt=z.xOrigin||0,ot=z.yOrigin||0,ht!==yn&&(ft=ht[0],bt=ht[1],pt=ht[2],vt=ht[3],Y=gt=ht[4],Q=mt=ht[5],6===ht.length?(Z=Math.sqrt(ft*ft+bt*bt),J=Math.sqrt(vt*vt+pt*pt),tt=ft||bt?Rs(bt,ft)*Is:0,(st=pt||vt?Rs(pt,vt)*Is+tt:0)&&(J*=Math.abs(Math.cos(st*Ds))),z.svg&&(Y-=rt-(rt*ft+ot*pt),Q-=ot-(rt*bt+ot*vt))):(Ot=ht[6],At=ht[7],wt=ht[8],Tt=ht[9],St=ht[10],Ct=ht[11],Y=ht[12],Q=ht[13],X=ht[14],et=(ct=Rs(Ot,St))*Is,ct&&(yt=gt*(dt=Math.cos(-ct))+wt*(lt=Math.sin(-ct)),_t=mt*dt+Tt*lt,Et=Ot*dt+St*lt,wt=gt*-lt+wt*dt,Tt=mt*-lt+Tt*dt,St=Ot*-lt+St*dt,Ct=At*-lt+Ct*dt,gt=yt,mt=_t,Ot=Et),it=(ct=Rs(-pt,St))*Is,ct&&(dt=Math.cos(-ct),Ct=vt*(lt=Math.sin(-ct))+Ct*dt,ft=yt=ft*dt-wt*lt,bt=_t=bt*dt-Tt*lt,pt=Et=pt*dt-St*lt),tt=(ct=Rs(bt,ft))*Is,ct&&(yt=ft*(dt=Math.cos(ct))+bt*(lt=Math.sin(ct)),_t=gt*dt+mt*lt,bt=bt*dt-ft*lt,mt=mt*dt-gt*lt,ft=yt,gt=_t),et&&Math.abs(et)+Math.abs(tt)>359.9&&(et=tt=0,it=180-it),Z=oe(Math.sqrt(ft*ft+bt*bt+pt*pt)),J=oe(Math.sqrt(mt*mt+Ot*Ot)),ct=Rs(gt,mt),st=Math.abs(ct)>2e-4?ct*Is:0,at=Ct?1/(Ct<0?-Ct:Ct):0),z.svg&&(yt=q.getAttribute("transform"),z.forceCSS=q.setAttribute("transform","")||!En(tn(q,Ks)),yt&&q.setAttribute("transform",yt))),Math.abs(st)>90&&Math.abs(st)<270&&(Dt?(Z*=-1,st+=tt<=0?180:-180,tt+=tt<=0?180:-180):(J*=-1,st+=st<=0?180:-180)),K=K||z.uncache,z.x=Y-((z.xPercent=Y&&(!K&&z.xPercent||(Math.round(q.offsetWidth/2)===Math.round(-Y)?-50:0)))?q.offsetWidth*z.xPercent/100:0)+Rt,z.y=Q-((z.yPercent=Q&&(!K&&z.yPercent||(Math.round(q.offsetHeight/2)===Math.round(-Q)?-50:0)))?q.offsetHeight*z.yPercent/100:0)+Rt,z.z=X+Rt,z.scaleX=oe(Z),z.scaleY=oe(J),z.rotation=oe(tt)+Pt,z.rotationX=oe(et)+Pt,z.rotationY=oe(it)+Pt,z.skewX=st+Pt,z.skewY=nt+Pt,z.transformPerspective=at+Rt,(z.zOrigin=parseFloat(Nt.split(" ")[2])||!K&&z.zOrigin||0)&&(It[zs]=Cn(Nt)),z.xOffset=z.yOffset=0,z.force3D=ut.force3D,z.renderTransform=z.svg?Nn:Cs?Mn:In,z.uncache=0,z},Cn=function(q){return(q=q.split(" "))[0]+" "+q[1]},On=function(q,K,z){var Y=We(K);return oe(parseFloat(K)+parseFloat(fn(q,"x",z+"px",Y)))+Y},In=function(q,K){K.z="0px",K.rotationY=K.rotationX="0deg",K.force3D=0,Mn(q,K)},Dn="0deg",Rn="0px",Pn=") ",Mn=function(q,K){var z=K||this,Y=z.xPercent,Q=z.yPercent,X=z.x,Z=z.y,J=z.z,tt=z.rotation,et=z.rotationY,it=z.rotationX,st=z.skewX,nt=z.skewY,at=z.scaleX,rt=z.scaleY,ot=z.transformPerspective,ht=z.force3D,ct=z.target,dt=z.zOrigin,lt="",ut="auto"===ht&&q&&1!==q||!0===ht;if(dt&&(it!==Dn||et!==Dn)){var ft,bt=parseFloat(et)*Ds,pt=Math.sin(bt),vt=Math.cos(bt);bt=parseFloat(it)*Ds,ft=Math.cos(bt),X=On(ct,X,pt*ft*-dt),Z=On(ct,Z,-Math.sin(bt)*-dt),J=On(ct,J,vt*ft*-dt+dt)}ot!==Rn&&(lt+="perspective("+ot+Pn),(Y||Q)&&(lt+="translate("+Y+"%, "+Q+"%) "),(ut||X!==Rn||Z!==Rn||J!==Rn)&&(lt+=J!==Rn||ut?"translate3d("+X+", "+Z+", "+J+") ":"translate("+X+", "+Z+Pn),tt!==Dn&&(lt+="rotate("+tt+Pn),et!==Dn&&(lt+="rotateY("+et+Pn),it!==Dn&&(lt+="rotateX("+it+Pn),st===Dn&&nt===Dn||(lt+="skew("+st+", "+nt+Pn),1===at&&1===rt||(lt+="scale("+at+", "+rt+Pn),ct.style[Ks]=lt||"translate(0, 0)"},Nn=function(q,K){var z,Y,Q,X,Z,J=K||this,tt=J.xPercent,et=J.yPercent,it=J.x,st=J.y,nt=J.rotation,at=J.skewX,rt=J.skewY,ot=J.scaleX,ht=J.scaleY,ct=J.target,dt=J.xOrigin,lt=J.yOrigin,ut=J.xOffset,ft=J.yOffset,bt=J.forceCSS,pt=parseFloat(it),vt=parseFloat(st);nt=parseFloat(nt),at=parseFloat(at),(rt=parseFloat(rt))&&(at+=rt=parseFloat(rt),nt+=rt),nt||at?(nt*=Ds,at*=Ds,z=Math.cos(nt)*ot,Y=Math.sin(nt)*ot,Q=Math.sin(nt-at)*-ht,X=Math.cos(nt-at)*ht,at&&(rt*=Ds,Z=Math.tan(at-rt),Q*=Z=Math.sqrt(1+Z*Z),X*=Z,rt&&(Z=Math.tan(rt),z*=Z=Math.sqrt(1+Z*Z),Y*=Z)),z=oe(z),Y=oe(Y),Q=oe(Q),X=oe(X)):(z=ot,X=ht,Y=Q=0),(pt&&!~(it+"").indexOf("px")||vt&&!~(st+"").indexOf("px"))&&(pt=fn(ct,"x",it,"px"),vt=fn(ct,"y",st,"px")),(dt||lt||ut||ft)&&(pt=oe(pt+dt-(dt*z+lt*Q)+ut),vt=oe(vt+lt-(dt*Y+lt*X)+ft)),(tt||et)&&(Z=ct.getBBox(),pt=oe(pt+tt/100*Z.width),vt=oe(vt+et/100*Z.height)),Z="matrix("+z+","+Y+","+Q+","+X+","+pt+","+vt+")",ct.setAttribute("transform",Z),bt&&(ct.style[Ks]=Z)},xn=function(q,K,z,Y,Q){var X,Z,J=360,tt=wt(Q),et=parseFloat(Q)*(tt&&~Q.indexOf("rad")?Is:1)-Y,it=Y+et+"deg";return tt&&("short"===(X=Q.split("_")[1])&&(et%=J)!==et%180&&(et+=et<0?J:-360),"cw"===X&&et<0?et=(et+36e9)%J-~~(et/J)*J:"ccw"===X&&et>0&&(et=(et-36e9)%J-~~(et/J)*J)),q._pt=Z=new as(q._pt,K,z,Y,et,ks),Z.e=it,Z.u="deg",q._props.push(z),Z},Ln=function(q,K){for(var z in K)q[z]=K[z];return q},kn=function(q,K,z){var Y,Q,X,Z,J,tt,et,it=Ln({},z._gsap),st=z.style;for(Q in it.svg?(X=z.getAttribute("transform"),z.setAttribute("transform",""),st[Ks]=K,Y=An(z,1),cn(z,Ks),z.setAttribute("transform",X)):(X=getComputedStyle(z)[Ks],st[Ks]=K,Y=An(z,1),st[Ks]=X),Os)(X=it[Q])!==(Z=Y[Q])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(Q)<0&&(J=We(X)!==(et=We(Z))?fn(z,Q,X,et):parseFloat(X),tt=parseFloat(Z),q._pt=new as(q._pt,Y,Q,J,tt-J,Ls),q._pt.u=et||0,q._props.push(Q));Ln(Y,it)};re("padding,margin,Width,Radius",(function(q,K){var z="Top",Y="Right",Q="Bottom",X="Left",Z=(K<3?[z,Y,Q,X]:[z+X,z+Y,Q+Y,Q+X]).map((function(z){return K<2?q+z:"border"+z+q}));mn[K>1?"border"+q:q]=function(q,K,z,Y,Q){var X,J;if(arguments.length<4)return X=Z.map((function(K){return bn(q,K,z)})),5===(J=X.join(" ")).split(X[0]).length?X[0]:J;X=(Y+"").split(" "),J={},Z.forEach((function(q,K){return J[q]=X[K]=X[K]||X[(K-1)/2|0]})),q.init(K,J,Q)}}));var Bn,Un,Fn,Gn={name:"css",register:nn,targetTest:function(q){return q.style&&q.nodeType},init:function(q,K,z,Y,Q){var X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ft,bt,pt,vt,gt,mt=this._props,yt=q.style,_t=z.vars.startAt;for(st in ws||nn(),this.styles=this.styles||Zs(q),ft=this.styles.props,this.tween=z,K)if("autoRound"!==st&&(Z=K[st],!Zt[st]||!Fi(st,K,z,Y,q,Q)))if(et=typeof Z,it=mn[st],"function"===et&&(et=typeof(Z=Z.call(z,Y,q,Q))),"string"===et&&~Z.indexOf("random(")&&(Z=si(Z)),it)it(this,q,st,Z,z)&&(lt=1);else if("--"===st.substr(0,2))X=(getComputedStyle(q).getPropertyValue(st)+"").trim(),Z+="",vi.lastIndex=0,vi.test(X)||(nt=We(X),at=We(Z)),at?nt!==at&&(X=fn(q,st,X,at)+at):nt&&(Z+=nt),this.add(yt,"setProperty",X,Z,Y,Q,0,0,st),mt.push(st),ft.push(st,0,yt[st]);else if("undefined"!==et){if(_t&&st in _t?(X="function"==typeof _t[st]?_t[st].call(z,Y,q,Q):_t[st],wt(X)&&~X.indexOf("random(")&&(X=si(X)),We(X+"")||"auto"===X||(X+=ut.units[st]||We(bn(q,st))||""),"="===(X+"").charAt(1)&&(X=bn(q,st))):X=bn(q,st),tt=parseFloat(X),(rt="string"===et&&"="===Z.charAt(1)&&Z.substr(0,2))&&(Z=Z.substr(2)),J=parseFloat(Z),st in xs&&("autoAlpha"===st&&(1===tt&&"hidden"===bn(q,"visibility")&&J&&(tt=0),ft.push("visibility",0,yt.visibility),dn(this,yt,"visibility",tt?"inherit":"hidden",J?"inherit":"hidden",!J)),"scale"!==st&&"transform"!==st&&~(st=xs[st]).indexOf(",")&&(st=st.split(",")[0])),ot=st in Os)if(this.styles.save(st),ht||((ct=q._gsap).renderTransform&&!K.parseTransform||An(q,K.parseTransform),dt=!1!==K.smoothOrigin&&ct.smooth,(ht=this._pt=new as(this._pt,yt,Ks,0,1,ct.renderTransform,ct,0,-1)).dep=1),"scale"===st)this._pt=new as(this._pt,ct,"scaleY",ct.scaleY,(rt?ce(ct.scaleY,rt+J):J)-ct.scaleY||0,Ls),this._pt.u=0,mt.push("scaleY",st),st+="X";else{if("transformOrigin"===st){ft.push(zs,0,yt[zs]),pt=void 0,vt=void 0,gt=void 0,pt=(bt=Z).split(" "),vt=pt[0],gt=pt[1]||"50%","top"!==vt&&"bottom"!==vt&&"left"!==gt&&"right"!==gt||(bt=vt,vt=gt,gt=bt),pt[0]=vn[vt]||vt,pt[1]=vn[gt]||gt,Z=pt.join(" "),ct.svg?Sn(q,Z,0,dt,0,this):((at=parseFloat(Z.split(" ")[2])||0)!==ct.zOrigin&&dn(this,ct,"zOrigin",ct.zOrigin,at),dn(this,yt,st,Cn(X),Cn(Z)));continue}if("svgOrigin"===st){Sn(q,Z,1,dt,0,this);continue}if(st in _n){xn(this,ct,st,tt,rt?ce(tt,rt+Z):Z);continue}if("smoothOrigin"===st){dn(this,ct,"smooth",ct.smooth,Z);continue}if("force3D"===st){ct[st]=Z;continue}if("transform"===st){kn(this,Z,q);continue}}else st in yt||(st=sn(st)||st);if(ot||(J||0===J)&&(tt||0===tt)&&!Ns.test(Z)&&st in yt)J||(J=0),(nt=(X+"").substr((tt+"").length))!==(at=We(Z)||(st in ut.units?ut.units[st]:nt))&&(tt=fn(q,st,X,at)),this._pt=new as(this._pt,ot?ct:yt,st,tt,(rt?ce(tt,rt+J):J)-tt,ot||"px"!==at&&"zIndex"!==st||!1===K.autoRound?Ls:Us),this._pt.u=at||0,nt!==at&&"%"!==at&&(this._pt.b=X,this._pt.r=Bs);else if(st in yt)pn.call(this,q,st,X,rt?rt+Z:Z);else if(st in q)this.add(q,st,X||q[st],rt?rt+Z:Z,Y,Q);else if("parseTransform"!==st){$t(st,Z);continue}ot||(st in yt?ft.push(st,0,yt[st]):ft.push(st,1,X||q[st])),mt.push(st)}lt&&ns(this)},render:function(q,K){if(K.tween._time||!As())for(var z=K._pt;z;)z.r(q,z.d),z=z._next;else K.styles.revert()},get:bn,aliases:xs,getSetter:function(q,K,z){var Y=xs[K];return Y&&Y.indexOf(",")<0&&(K=Y),K in Os&&K!==zs&&(q._gsap.x||bn(q,"x"))?z&&Ss===z?"scale"===K?Vs:Hs:(Ss=z||{})&&("scale"===K?Ws:qs):q.style&&!At(q.style[K])?js:~K.indexOf("-")?$s:Qi(q,K)},core:{_removeProperty:cn,_getMatrix:Tn}};ms.utils.checkPrefix=sn,ms.core.getStyleSaver=Zs,Fn=re((Bn="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(Un="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(q){Os[q]=1})),re(Un,(function(q){ut.units[q]="deg",_n[q]=1})),xs[Fn[13]]=Bn+","+Un,re("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(q){var K=q.split(":");xs[K[1]]=Fn[K[0]]})),re("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(q){ut.units[q]="px"})),ms.registerPlugin(Gn);var jn=ms.registerPlugin(Gn)||ms;jn.core.Tween},30592:(q,K,z)=>{"use strict";var Y=z(30655),Q=function(){return!!Y};Q.hasArrayLengthDefineBug=function(){if(!Y)return null;try{return 1!==Y([],"length",{value:1}).length}catch(e){return!0}},q.exports=Q},64039:(q,K,z)=>{"use strict";var Y="undefined"!=typeof Symbol&&Symbol,Q=z(41333);q.exports=function(){return"function"==typeof Y&&("function"==typeof Symbol&&("symbol"==typeof Y("foo")&&("symbol"==typeof Symbol("bar")&&Q())))}},41333:q=>{"use strict";q.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var q={},K=Symbol("test"),z=Object(K);if("string"==typeof K)return!1;if("[object Symbol]"!==Object.prototype.toString.call(K))return!1;if("[object Symbol]"!==Object.prototype.toString.call(z))return!1;for(var Y in q[K]=42,q)return!1;if("function"==typeof Object.keys&&0!==Object.keys(q).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(q).length)return!1;var Q=Object.getOwnPropertySymbols(q);if(1!==Q.length||Q[0]!==K)return!1;if(!Object.prototype.propertyIsEnumerable.call(q,K))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var X=Object.getOwnPropertyDescriptor(q,K);if(42!==X.value||!0!==X.enumerable)return!1}return!0}},49092:(q,K,z)=>{"use strict";var Y=z(41333);q.exports=function(){return Y()&&!!Symbol.toStringTag}},9957:(q,K,z)=>{"use strict";var Y=Function.prototype.call,Q=Object.prototype.hasOwnProperty,X=z(66743);q.exports=X.call(Y,Q)},25335:q=>{"use strict";q.exports=class{static createState(q){return q}constructor(q){this.reset()}reset(){this.pos=-1,this.maxPos=-1,this.state=null,this.data=this.src=null,this.filename=null}setInitialState(q){this.initialState=q}enterState(q){if(this.state===q)throw new Error("Re-entering the current state is illegal - "+q.name);var K;(K=this.state)&&K.leave&&K.leave.call(this,q),this.state=q,q.enter&&q.enter.call(this,K)}lookAheadFor(q,K){null==K&&(K=this.pos+1);var z=K+q.length;if(!(z>this.maxPos+1))return this.data.substring(K,z)===q?q:void 0}lookAtCharAhead(q,K){return null==K&&(K=this.pos),this.data.charAt(K+q)}lookAtCharCodeAhead(q,K){return null==K&&(K=this.pos),this.data.charCodeAt(K+q)}rewind(q){this.pos-=q}skip(q){this.pos+=q}end(){this.pos=this.maxPos+1}substring(q,K){return this.data.substring(q,K)}parse(q,K){if(null==q)return;if(this.reset(),Array.isArray(q)&&(q=q.join("")),this.src=q,this.filename=K,this.data=q,this.maxPos=q.length-1,this.initialState&&this.enterState(this.initialState),this.pos=65279===q.charCodeAt(0)?1:0,!this.state)return;for(var z;(z=this.pos)<=this.maxPos;){let K=q[z],Y=K.charCodeAt(0),Q=this.state;if(10!==Y){if(13===Y){let K=z+1;if(K{"use strict";var Y=z(25335),Q=z(70456),X=z(64101),Z=z(40862),J=z(8928);function tt(q){return q<=32}var et=/^[\-\+]?\d*(?:\.\d+)?(?:e[\-\+]?\d+)?$/;function it(q){var K=q.length;if(K)return q[K-1]}const st=92,nt=47,at=60,rt=62,ot=93,ht=40,ct=41,dt=123,lt=125,ut=42,ft=45,bt=36,pt=124,vt=[],gt=z(21052);class mt extends Y{constructor(q,K){super(K);var z=this;function yt(q){var K=J(z.src),Y=K.lineAt(z.pos),Q=K.columnAt(z.pos),X=z.filename;Z(q,{location:(X||"(unknown file)")+":"+Y+":"+Q})}var _t=X.createNotifiers(z,q);this.notifiers=_t;var Et,wt,Tt,St,At,Ct,Ot,It,Dt,Rt,Pt,Mt,Nt,xt,Lt,kt,Bt,Ut,Ft=K&&!1===K.concise?1:2,Gt=K&&K.isOpenTagOnly,jt=K&&K.ignorePlaceholders,$t=K&&K.ignoreNonstandardStringPlaceholders,Ht=!0===K.legacyCompatibility,Vt="html";function Wt(q){0===arguments.length&&(q=Ct),_t.notifyText(q,Vt),Ct=""}function qt(){Mt&&!Et.withinAttrGroup&&de()}function Kt(q){Lt=Pt,xt=q;var K=it(It);if(It.push({type:"html",delimiter:q,indent:Pt}),!K||!K.body)return z.enterState($e);if(1===K.body)z.enterState(Ke);else{if(2!==K.body)throw new Error("Illegal value for parent.body: "+K.body);z.enterState(qe)}}function zt(){Ct&&(Nt||xt)&&(Ct=Ct.replace(/(\r\n|\n)$/,"")),Wt();for(let K=It.length-1;K>=0;K--){var q=It[K];if("html"===q.type){It.pop();break}return void re(q.pos,"MISSING_END_TAG",'Missing ending "'+q.tagName+'" tag')}Lt=null,xt=null,Nt=!1,z.state!==He&&z.enterState(He)}function Yt(){for(Wt();It.length;){var q=it(It);if("tag"===q.type){if(!q.concise)return void re(q.pos,"MISSING_END_TAG",'Missing ending "'+q.tagName+'" tag');le(q.expectedCloseTagName)}else{if("html"!==q.type)throw new Error("Illegal state. There should not be any non-concise tags on the stack when in concise mode");It.pop()}}}function Qt(){if(Mt){if(Et.withinAttrGroup)return void re(Et.pos,"MALFORMED_OPEN_TAG",'EOF reached while within an attribute group (e.g. "[ ... ]").');de(),Yt()}else re(Et.pos,"MALFORMED_OPEN_TAG","EOF reached while parsing open tag")}this.reset=function(){Y.prototype.reset.call(this),Ct="",Et=void 0,wt=void 0,Tt=void 0,St=void 0,At=void 0,Ot=!1,It=[],Dt=[],Rt=void 0,Pt="",Mt=2===Ft,Nt=!1,xt=null,Lt=null,kt=!1,Bt=!1,Ut=0},this.reset();var Xt=_t.notifyCDATA,Zt=_t.notifyComment,Jt=_t.notifyOpenTag,te=_t.notifyOpenTagName,ee=_t.notifyCloseTag,ie=_t.notifyDocumentType,se=_t.notifyDeclaration,ne=_t.notifyPlaceholder,ae=_t.notifyScriptlet;function re(q,K,Y){z.end(),_t.notifyError(q,K,Y)}function oe(){return wt={},Et.attributes===vt?Et.attributes=[wt]:Et.attributes.push(wt),z.enterState(ei),wt}function he(){wt=null,z.state!==ti&&z.enterState(ti)}function ce(){Wt();var q={type:"tag",tagName:"",tagNameParts:null,attributes:[],argument:void 0,params:void 0,pos:z.pos,indent:Pt,nestedIndent:null,concise:Mt};return Ot=!0,kt&&(q.beginMixedMode=!0,kt=!1),It.push(q),Et=q,z.enterState(ze),Et}function de(q){var K=Et.tagName,Y=Et.attributes,Q=Et.parseOptions;if(Q&&!0===Q.ignoreAttributes)Y.length=0;else{if(Et.requiresCommas&&Y.length>1)for(let q=0;q1)for(let q=0;q")||z.lookAheadFor("/"+it(It).tagName+">")||z.lookAheadFor("/"+At+">");return!!q&&(z.state===li&&Se(),Wt(),le(At,z.pos,z.pos+1+q.length),z.skip(q.length),z.enterState($e),!0)}function Ge(){return!!z.lookAheadFor("![CDATA[")&&(function(){Wt();var q=ue();q.value="",z.enterState(Ze)}(),z.skip(8),!0)}function je(q){let K=Lt+xt;if(z.lookAheadFor(K,z.pos+q.length))return z.skip(Lt.length),z.skip(xt.length),z.enterState(He),void Ce(De);z.lookAheadFor(Lt,z.pos+q.length)?z.skip(Lt.length):Lt&&!Be()&&zt()}var $e=mt.createState({name:"STATE_HTML_CONTENT",placeholder(q){},eol(q){Ct+=q,kt?(kt=!1,zt()):Bt?(Bt=!1,zt()):Nt?zt():xt&&je(q)},eof:Yt,enter(){Vt="html",Mt=!1},char(q,K){if(K===at){if(Ge())return;var Y=z.lookAtCharCodeAhead(1);37===Y?(me(),z.skip(1)):z.lookAheadFor("!--")?(Ae(),z.skip(3)):33===Y?(!function(){Wt();var q=ue();q.value="",z.enterState(ui)}(),z.skip(1)):63===Y?(!function(){Wt();var q=ue();q.value="",z.enterState(fi)}(),z.skip(1)):Y===nt?(St=z.pos,Tt=null,z.skip(1),Wt(),z.enterState(Je)):Y===rt||Y===at||tt(Y)?Ct+="<":(ce(),Et.tagNameStart=z.pos+1)}else!jt&&Le(0,K)?(Ct+="\\",z.skip(1)):!jt&&xe(0,K)?(Ct+="$",z.skip(1)):!jt&&Ne(0,K)?Wt():!Ht&&K===bt&&tt(z.lookAtCharCodeAhead(1))&&(Q=z.substring(0,z.pos).split("\n"),X=Q[Q.length-1],/^\s*$/.test(X))?(z.skip(1),ye()):Ct+=q;var Q,X}}),He=mt.createState({name:"STATE_CONCISE_HTML_CONTENT",eol(q){Ct+=q,Pt=""},eof:Yt,enter(){Mt=!0,Pt=""},comment(q){var K=q.value;K=K.trim(),Zt({value:K,pos:q.pos,endPos:q.endPos}),"block"===q.type&&Ce(Ie)},endTrailingWhitespace(q){zt(),q&&Yt()},char(q,K){if(tt(K))Pt+=q;else{for(;;){let q=It.length;if(!q){if(Pt)return void re(z.pos,"BAD_INDENTATION","Line has extra indentation at the beginning");break}{let K=It[q-1];if(!(K.indent.length>=Pt.length))break;le(K.expectedCloseTagName)}}var Y,Q=It.length&&It[It.length-1];if(Q){if(Y=Q.body,Q.openTagOnly)return void re(z.pos,"INVALID_BODY",'The "'+Q.tagName+'" tag does not allow nested body content');if(Q.nestedIndent){if(Q.nestedIndent.length!==Pt.length)return void re(z.pos,"BAD_INDENTATION","Line indentation does match indentation of previous line")}else Q.nestedIndent=Pt}if(Y&&K!==ft)return void re(z.pos,"ILLEGAL_LINE_START",'A line within a tag that only allows text content must begin with a "-" character');if(K===at||Ht&&K===bt)return K===bt&&yt('Handling of a placeholder (i.e. "${...}") at the start of a concise line will be changing.\nA placeholder at the start of a concise line will now be handled as a tag name placeholder instead of a body text placeholder.\nSwitch to using "-- ${...}" to avoid breakage.\nSee: https://github.com/marko-js/htmljs-parser/issues/48'),kt=!0,z.rewind(1),void Kt();if(!Ht&&K===bt&&tt(z.lookAtCharCodeAhead(1)))return z.skip(1),void ye();if(K===ft){if(z.lookAtCharCodeAhead(1)!==ft){if(!Ht)return void re(z.pos,"ILLEGAL_LINE_START",'A line in concise mode cannot start with a single hyphen. Use "--" instead. See: https://github.com/marko-js/htmljs-parser/issues/43');yt('The usage of a single hyphen at the start of a concise line is now deprecated. Use "--" instead.\nSee: https://github.com/marko-js/htmljs-parser/issues/43')}return xt=q,z.enterState(Ve)}if(K===nt){var X=z.lookAtCharCodeAhead(1);return X===nt?(we(),void z.skip(1)):X===ut?(Te(),void z.skip(1)):void re(z.pos,"ILLEGAL_LINE_START",'A line in concise mode cannot start with "/" unless it starts a "//" or "/*" comment')}ce(),Et.tagNameStart=z.pos,z.rewind(1)}}}),Ve=mt.createState({name:"STATE_BEGIN_DELIMITED_HTML_BLOCK",eol:function(q){Kt(xt),je(q)},eof:Yt,char(q,K){K===ft?xt+=q:Be()||(Nt=!0,Kt())}}),We=mt.createState({name:"STATE_CHECK_TRAILING_WHITESPACE",eol:function(){Oe(null,!1)},eof:function(){Oe(null,!0)},char(q,K){tt(K)||Oe({ch:q})}}),qe=mt.createState({name:"STATE_STATIC_TEXT_CONTENT",enter(){Vt="static-text"},eol(q){Ct+=q,Nt?zt():xt&&je(q)},eof:Yt,char(q,K){!Mt&&K===at&&Fe()||(Ct+=q)}}),Ke=mt.createState({name:"STATE_PARSED_TEXT_CONTENT",enter(){Vt="parsed-text"},placeholder:$e.placeholder,comment(q){Ct+=q.rawValue,xt&&q.eol&&je(q.eol)},templateString(q){Ct+=q.value},eol(q){Ct+=q,Nt?zt():xt&&je(q)},eof:Yt,char(q,K){if(!Mt&&K===at){if(Fe())return;if(Ge())return;if(37===z.lookAtCharCodeAhead(1))return me(),void z.skip(1)}if(K===nt){if(z.lookAtCharCodeAhead(1)===ut)return Te(),void z.skip(1);if(z.lookAtCharCodeAhead(1)===nt)return we(),void z.skip(1)}if(96!==K){if(!jt&&Le(0,K))z.skip(1);else{if(!jt&&xe(0,K))return Ct+="$",void z.skip(1);if(!jt&&Ne(0,K))return void Wt()}Ct+=q}else ge()}}),ze=mt.createState({name:"STATE_TAG_NAME",eol:qt,eof:Qt,expression(q){Et.tagNameEnd=q.endPos,q.value&&(Et.tagName+=q.value,Et.tagNameParts&&Et.tagNameParts.push(JSON.stringify(q.value)))},placeholder(q){Et.tagNameParts||(Et.tagNameParts=[],Et.tagName&&Et.tagNameParts.push(JSON.stringify(Et.tagName))),Et.tagName+=z.substring(q.pos,q.endPos),Et.tagNameParts.push("("+q.value+")"),Et.tagNameEnd=q.endPos,z.lookAtCharCodeAhead(1)===ht&&(pe(),z.enterState(Ye))},enter(q){q!==si&&be()},char(q,K){throw new Error("Illegal state")}}),Ye=mt.createState({name:"STATE_TAG_ARGS",eol:qt,eof:Qt,expression(q){var K=q.value;if(K.charCodeAt(K.length-1)!==ct)throw new Error("Invalid argument");q.value=K.slice(1,K.length-1),q.pos+=1,q.endPos-=1,Et.argument=q,z.lookAtCharCodeAhead(1)===pt?z.enterState(Qe):z.enterState(ti)},enter(q){q!==si&&be()},char(q,K){throw new Error("Illegal state")}}),Qe=mt.createState({name:"STATE_TAG_PARAMS",eol:qt,eof:Qt,expression(q){var K=q.value;q.value=K.slice(1),q.pos+=1,Et.params=q,z.enterState(ti)},enter(q){q!==si&&be()},char(q,K){throw new Error("Illegal state")}}),Xe=mt.createState({name:"STATE_TAG_VAR",eol:qt,eof:Qt,expression(q){var K=q.value;q.value=K.slice(1),q.pos+=1,Et.var=q,z.lookAtCharCodeAhead(1)===pt?z.enterState(Qe):z.lookAtCharCodeAhead(1)===ht?z.enterState(Ye):z.enterState(ti)},enter(q){q!==si&&be()},char(q,K){throw new Error("Illegal state")}}),Ze=mt.createState({name:"STATE_CDATA",enter(){Vt="cdata"},eof(){re(Rt.pos,"MALFORMED_CDATA","EOF reached while parsing CDATA")},char(q,K){if(K===ot){var Y=z.lookAheadFor("]>");if(Y)return Q=fe(),Xt(Q.value,Q.pos,z.pos+3),void z.skip(Y.length)}var Q;Rt.value+=q}}),Je=mt.createState({name:"STATE_CLOSE_TAG",eof(){re(le.pos,"MALFORMED_CLOSE_TAG","EOF reached while parsing closing tag")},enter(){Tt=""},char(q,K){K===rt?(Tt.length>0?le(Tt,St,z.pos+1):le(At,St,z.pos+1),z.enterState($e)):Tt+=q}}),ti=mt.createState({name:"STATE_WITHIN_OPEN_TAG",eol:qt,eof:Qt,enter(){Et.notifiedOpenTagName||(Et.notifiedOpenTagName=!0,Et.tagNameEndPos=z.pos,te(Et))},expression(q){var K=Me(q);if(K)if(0===Et.attributes.length){if(null!=Et.argument)return void re(q.endPos,"ILLEGAL_TAG_ARGUMENT","A tag can only have one argument");Et.argument=K}else{let z=wt||it(Et.attributes);if(null!=z.argument)return void re(q.endPos,"ILLEGAL_ATTRIBUTE_ARGUMENT","An attribute can only have one argument");z.argument=K}},placeholder(q){oe().value=q.value,he(),z.enterState(ai)},comment(q){},char(q,K){if(Mt){if(K===ft){if(z.lookAtCharCodeAhead(1)!==ft){if(!Ht)return void re(Et.pos,"MALFORMED_OPEN_TAG",'"-" not allowed as first character of attribute name');yt('The usage of a single hyphen in a concise line is now deprecated. Use "--" instead.\nSee: https://github.com/marko-js/htmljs-parser/issues/43')}if(Et.withinAttrGroup)return void re(z.pos,"MALFORMED_OPEN_TAG","Attribute group was not properly ended");de(),xt=q;var Y=function(){var q=/[^\n]*\n(\s+)/.exec(z.substring(z.pos));if(q){var K=q[1].split(/\n/g);return K[K.length-1]}}();return Y>Pt&&(Pt=Y),void z.enterState(Ve)}if(91===K)return Et.withinAttrGroup?void re(z.pos,"MALFORMED_OPEN_TAG",'Unexpected "[" character within open tag.'):void(Et.withinAttrGroup=!0);if(K===ot)return Et.withinAttrGroup?void(Et.withinAttrGroup=!1):void re(z.pos,"MALFORMED_OPEN_TAG",'Unexpected "]" character within open tag.')}else{if(K===rt)return void de();if(K===nt){if(z.lookAtCharCodeAhead(1)===rt)return de(!0),void z.skip(1)}}if(Le(0,K)){return oe().name="\\",void z.skip(1)}if(xe(0,K)){return oe().name="$",void z.skip(1)}if(!Ne(0,K))return K===at?re(z.pos,"ILLEGAL_ATTRIBUTE_NAME",'Invalid attribute name. Attribute name cannot begin with the "<" character.'):K===nt&&z.lookAtCharCodeAhead(1)===ut?(Te(),void z.skip(1)):void(tt(K)||(K===ht?(z.rewind(1),be()):(z.rewind(1),oe())))}}),ei=mt.createState({name:"STATE_ATTRIBUTE_NAME",eol:qt,eof:Qt,expression(q){var K=Me(q);K&&(wt.argument=K),q.endedWithComma?(Ue(),Et.requiresCommas=!0,wt.endedWithComma=!0):ke("=",0)||(Et.lastAttrNoComma=!0),wt.name=wt.name?wt.name+q.value:q.value,wt.pos=q.pos,wt.endPos=q.endPos,wt.name||(wt.name="default",wt.default=!0)},enter(q){if(Et.requiresCommas&&Et.lastAttrNoComma){var K=Et.parseOptions;if(!K||!0!==K.relaxRequireCommas)return re(z.pos,"COMMAS_REQUIRED","if commas are used, they must be used to separate all attributes for a tag")}q!==si&&be()},char(q,K){throw new Error("Illegal state")}}),ii=mt.createState({name:"STATE_ATTRIBUTE_VALUE",expression(q){var K=q.value;if(""===K)return re(q.pos,"ILLEGAL_ATTRIBUTE_VALUE",'No attribute value found after "="');q.endedWithComma?(Ue(),Et.requiresCommas=!0,wt.endedWithComma=!0):Et.lastAttrNoComma=!0,q.hasUnenclosedWhitespace&&(Et.hasUnenclosedWhitespace=!0),wt.value=K,wt.pos=q.pos,wt.endPos=q.endPos,q.isStringLiteral?wt.literalValue=function(q,K,z){"'"===q.charAt(0)&&(q='"'+(q=(q=q.substring(1,q.length-1)).replace(/\\\\|\\[']|\\["]|["]/g,(function(q){return"\\'"===q?"'":'"'===q?'\\"':q})))+'"');try{return JSON.parse(q)}catch(e){z(K,"INVALID_STRING","Invalid string ("+q+"): "+e)}}(K,q.pos,re):"true"===K?wt.literalValue=!0:"false"===K?wt.literalValue=!1:"null"===K?wt.literalValue=null:"undefined"===K?wt.literalValue=void 0:et.test(K)&&(wt.literalValue=Number(K)),he()},eol:qt,eof:Qt,enter(q){q!==si&&be()},char(q,K){throw new Error("Illegal state")}}),si=mt.createState({name:"STATE_EXPRESSION",eol(q){if(0===Rt.groupStack.length){if(Rt.parentState===ei||Rt.parentState===ii)return Rt.endPos=z.pos,pe(),he(),void(Mt&&qt());if(Rt.parentState===ze)return Rt.endPos=z.pos,pe(),z.state!==ti&&z.enterState(ti),void(Mt&&qt())}Rt.value+=q},eof(){if(!Mt||0!==Rt.groupStack.length){let q=Rt.parentState;return q===ei?re(Rt.pos,"MALFORMED_OPEN_TAG",'EOF reached while parsing attribute name for the "'+Et.tagName+'" tag'):q===ii?re(Rt.pos,"MALFORMED_OPEN_TAG",'EOF reached while parsing attribute value for the "'+wt.name+'" attribute'):q===ze?re(Rt.pos,"MALFORMED_OPEN_TAG","EOF reached while parsing tag name"):q===ri?re(Rt.pos,"MALFORMED_PLACEHOLDER","EOF reached while parsing placeholder"):re(Rt.pos,"INVALID_EXPRESSION","EOF reached while parsing expression")}Rt.endPos=z.pos,pe(),Qt()},string(q){""===Rt.value?Rt.isStringLiteral=!0===q.isStringLiteral:Rt.isStringLiteral=!1,Rt.value+=q.value},comment(q){Rt.isStringLiteral=!1,Rt.value+=q.rawValue},templateString(q){Rt.isStringLiteral=!1,Rt.value+=q.value},regularExpression(q){Rt.isStringLiteral=!1,Rt.value+=q.value},char(q,K){let Y=Rt.groupStack.length,X=Rt.parentState;if(39===K)return ve("'",39);if(34===K)return ve('"',34);if(96===K)return ge();if(K===nt){var Z=z.lookAtCharCodeAhead(1);if(Z===nt)return we(),void z.skip(1);if(Z===ut)return Te(),void z.skip(1);if(0===Y&&!Mt&&Z===rt)return Rt.endPos=z.pos,pe(),z.rewind(1),void(z.state!==ti&&z.enterState(ti));if(!/[\]})A-Z0-9.<%]/i.test(function(q){for(var K=null==q?-1:q;tt(z.lookAtCharCodeAhead(K));)K--;return z.lookAtCharAhead(K)}()))return ue().value="/",void z.enterState(ci)}else if(K===pt&&X===Qe){if(0===Y)return Rt.groupStack.push(K),Rt.isStringLiteral=!1,void(Rt.value+=q);if(1===Y)return void pe()}else{if(K===ht||91===K||K===dt)return 0===Y&&K===ht&&(Rt.lastLeftParenPos=Rt.value.length),Rt.groupStack.push(K),Rt.isStringLiteral=!1,void(Rt.value+=q);if(K===ct||K===ot||K===lt){if(0===Y){if(K!==ot)return re(Rt.pos,"INVALID_EXPRESSION",'Mismatched group. A closing "'+q+'" character was found but it is not matched with a corresponding opening character.');if(Et.withinAttrGroup)return Rt.endPos=z.pos+1,pe(),z.rewind(1),void(z.state!==ti&&z.enterState(ti))}let Q=Rt.groupStack.pop();if(K===ct&&Q!==ht||K===ot&&91!==Q||K===lt&&Q!==dt)return re(Rt.pos,"INVALID_EXPRESSION",'Mismatched group. A "'+q+'" character was found when "'+String.fromCharCode(Q)+'" was expected.');if(Rt.value+=q,0===Rt.groupStack.length)if(K===ct&&(Rt.lastRightParenPos=Rt.value.length-1),K===lt&&X===ri||K===ct&&X===Ye)return Rt.endPos=z.pos+1,void pe();return}}var J,et,it;if(0===Y){if(!Mt&&K===rt&&(X===ze||X===ei||X===ii||X===ti))return Rt.endPos=z.pos,pe(),he(),z.rewind(1),void(z.state!==ti&&z.enterState(ti));if(59===K)return pe(),he(),void(Mt&&(de(),Ce((function(q){if(q){var K=q.ch.charCodeAt(0);if(K===nt){if(z.lookAheadFor("/"))return we(),void z.skip(1);if(z.lookAheadFor("*"))return Te(),void z.skip(1)}else if(K===at&&z.lookAheadFor("!--"))return Ae(),void z.skip(3);re(z.pos,"INVALID_CODE_AFTER_SEMICOLON","A semicolon indicates the end of a line. Only comments may follow it.")}}))));if(44===K||tt(K)){if(44===K||ke(","))44!==K&&(Ue(),z.skip(1)),Rt.endedWithComma=!0;else{if(Rt.parentState===ei&&ke("="))return void Ue();if(X!==ze){var st=(et=z.data.substring(z.pos),!!(it=/^\s+typeof\s+/.exec(et))&&it[0]);if(st)return Rt.value+=st,Rt.isStringLiteral=!1,Rt.hasUnenclosedWhitespace=!0,void z.skip(st.length-1);var ft=function(){var q=z.data.substring(z.pos),K=Q.patternNext.exec(q);if(K){var Y=K[0],X=K[1];if(Ht&&"-"===X)return!1;if(!(Mt?Y.includes("["):Y.includes(">")))return z.skip(Y.length-1),Y}else{var Z=z.substring(z.pos-Q.longest,z.pos);if(Q.patternPrev.exec(Z))return z.rewind(1),Ue()}return!1}();if(ft)return Rt.isStringLiteral=!1,Rt.hasUnenclosedWhitespace=!0,void(Rt.value+=ft)}}return Rt.endPos=z.pos,pe(),he(),void(z.state!==ti&&z.enterState(ti))}if(61===K&&X===ei)return Rt.endPos=z.pos,pe(),z.enterState(ii),void Ue();if(""===Rt.value){let q=function(){var q=z.data.substring(z.pos),K=/^typeof\s+/.exec(q);return!!K&&K[0]}();if(q)return Rt.value+=q,Rt.isStringLiteral=!1,Rt.hasUnenclosedWhitespace=!0,void z.skip(q.length-1)}if(Rt.parentState===Qe&&K===pt)return pe(),z.rewind(1),void z.enterState(Qe);if(Rt.parentState===Xe&&(61===K||K===rt))return pe(),z.rewind(1),void(z.state!==ti&&z.enterState(ti));if(Rt.parentState===ze){if(Le(0,K))return Rt.value+="\\",void z.skip(1);if(xe(0,K))return Rt.value+="$",void z.skip(1);if(K===bt&&z.lookAtCharCodeAhead(1)===dt)return Rt.endPos=z.pos,pe(),void Re(!0,!0);if(46===K||35===K)return pe(),z.rewind(1),(J=ue()).currentPart=null,J.hasId=!1,J.beginPart=function(q){J.currentPart={type:q,stringParts:[],rawParts:[],text:"",_endText(){var q=this.text;q&&(this.stringParts.push(JSON.stringify(q)),this.rawParts.push({text:q,pos:z.pos-q.length,endPos:z.pos})),this.text=""},addPlaceholder(q){var K=q.pos+(q.escape?2:3),Y=q.endPos-1;this._endText(),this.stringParts.push("("+q.value+")"),this.rawParts.push({expression:z.src.slice(K,Y),pos:K,endPos:Y})},end(){this._endText();var K=this.stringParts.join("+");"id"===q?Et.shorthandId={value:K,rawParts:this.rawParts}:"class"===q&&(Et.shorthandClassNames||(Et.shorthandClassNames=[]),Et.shorthandClassNames.push({value:K,rawParts:this.rawParts}))}}},void z.enterState(ni);if(K===nt)return pe(),z.rewind(1),void z.enterState(Xe)}if(Rt.parentState===ze||Rt.parentState===Xe){if(K===pt)return pe(),z.rewind(1),void z.enterState(Qe);if(61===K)return pe(),z.rewind(1),void z.enterState(ti);if(z.lookAtCharCodeAhead(1)===ht&&Rt.value)return Rt.value+=q,pe(),void z.enterState(Ye)}}Rt.isStringLiteral=!1,Rt.value+=q}}),ni=mt.createState({name:"STATE_TAG_NAME_SHORTHAND",placeholder(q){Rt.currentPart.addPlaceholder(q)},eol(q){Et.tagNameEnd=z.pos,Pe(),z.state!==ti&&z.enterState(ti),Mt&&qt()},eof(){if(Pe(),!Mt)return re(Rt.pos,"INVALID_TAG_SHORTHAND","EOF reached will parsing id/class shorthand in tag name");Qt()},char(q,K){var Y=Rt;if(!Mt&&(K===rt||K===nt))return Et.tagNameEnd=z.pos,Pe(),void z.rewind(1);if(tt(K))return Pe(),Et.tagNameEnd=z.pos,void(z.state!==ti&&z.enterState(ti));if(46===K)Y.currentPart&&Y.currentPart.end(),Y.beginPart("class");else if(35===K){if(Y.hasId)return re(Rt.pos,"INVALID_TAG_SHORTHAND","Multiple shorthand ID parts are not allowed on the same tag");Y.hasId=!0,Y.currentPart&&Y.currentPart.end(),Y.beginPart("id")}else!jt&&Le(0,K)?(Y.currentPart.text+="\\",z.skip(1)):!jt&&xe(0,K)?(Y.currentPart.text+="$",z.skip(1)):!jt&&Ne(0,K)||(K===ht?(Pe(),z.rewind(1),z.enterState(Ye)):K===pt?(Pe(),z.rewind(1),z.enterState(Qe)):Y.currentPart.text+=q)}}),ai=mt.createState({name:"STATE_AFTER_PLACEHOLDER_WITHIN_TAG",eol:qt,eof:Qt,char(q,K){if(!Mt){if(K===rt)return void de();if(K===nt){if(z.lookAtCharCodeAhead(1)===rt)return de(!0),void z.skip(1)}}tt(K)?z.enterState(ti):re(z.pos,"UNEXPECTED_TEXT_AFTER_PLACEHOLDER_IN_TAG",`An unexpected "${q}" character was found after a placeoholder within the open tag.`)}}),ri=mt.createState({name:"STATE_PLACEHOLDER",expression(q){Rt.value=q.value.slice(1,-1),Rt.endPos=q.endPos,function(){var q=fe();if(Ut--,!q.withinTemplateString){var K=ne(q);q.value=K}q.parentState.placeholder(q)}()},eol(q){throw new Error("Illegal state. EOL not expected")},eof(){throw new Error("Illegal state. EOF not expected")},enter(q){q!==si&&be()}}),oi=mt.createState({name:"STATE_STRING",placeholder(q){Rt.currentText&&(Rt.stringParts.push(Rt.currentText),Rt.currentText=""),Rt.isStringLiteral=!1,Rt.stringParts.push(q)},eol(q){2===q.length?Rt.currentText+="\\r\\n":Rt.currentText+="\\n"},eof(){re(z.pos,"INVALID_STRING",Ut>0?"EOF reached while parsing string expression found inside placeholder":"EOF reached while parsing string expression")},char(q,K){var Y,Q,X=Rt.stringParts,Z=Rt.quoteCharCode;if(K===st)Le(0,K)?Rt.currentText+=jt?"\\\\\\\\":"\\":xe(0,K)?Rt.currentText+=jt?"\\\\$":"$":(Y=z.lookAtCharAhead(1),Rt.currentText+=q+Y),z.skip(1);else if(K===Z){Rt.currentText&&X.push(Rt.currentText);let q="",K=Rt.quoteChar;if(X.length)for(let z=0;z1&&(q="("+q+")"),Rt.value=q,(Q=fe()).value=_t.notifyString(Q),Q.parentState.string(Q)}else jt||$t||!Ne(0,K)?Rt.currentText+=q:(Rt.currentText&&X.push(Rt.currentText),Rt.currentText="",Rt.isStringLiteral=!1)}}),hi=mt.createState({name:"STATE_TEMPLATE_STRING",placeholder:function(q){Rt.value+="${"+q.value+"}"},eol(q){Rt.value+=q},eof(){re(z.pos,"INVALID_TEMPLATE_STRING","EOF reached while parsing template string expression")},char(q,K){var Y,Q;K===bt&&z.lookAtCharCodeAhead(1)===dt?Re(!1):(Rt.value+=q,K===st?(Y=z.lookAtCharAhead(1),z.skip(1),Rt.value+=Y):96===K&&(Q=fe()).parentState.templateString(Q))}}),ci=mt.createState({name:"STATE_REGULAR_EXPRESSION",eol(){re(z.pos,"INVALID_REGULAR_EXPRESSION","EOL reached while parsing regular expression")},eof(){re(z.pos,"INVALID_REGULAR_EXPRESSION","EOF reached while parsing regular expression")},char(q,K){var Y,Q;Rt.value+=q,K===st?(Y=z.lookAtCharAhead(1),z.skip(1),Rt.value+=Y):91===K&&Rt.inCharacterSet?Rt.inCharacterSet=!0:K===ot&&Rt.inCharacterSet?Rt.inCharacterSet=!1:K!==nt||Rt.inCharacterSet||(Q=fe()).parentState.regularExpression(Q)}}),di=mt.createState({name:"STATE_JS_COMMENT_BLOCK",eol(q){Rt.value+=q},eof(){re(Rt.pos,"MALFORMED_COMMENT","EOF reached while parsing multi-line JavaScript comment")},char(q,K){if(K===ut&&z.lookAtCharCodeAhead(1)===nt)return Rt.endPos=z.pos+2,Se(),void z.skip(1);Rt.value+=q}}),li=mt.createState({name:"STATE_JS_COMMENT_LINE",eol(q){z.rewind(q.length),Rt.endPos=z.pos,Se()},eof(){Rt.endPos=z.pos,Se()},char(q,K){Rt.parentState===Ke&&!Mt&&K===at&&Fe()||(Rt.value+=q)}}),ui=mt.createState({name:"STATE_DTD",eol(q){Rt.value+=q},eof(){re(Rt.pos,"MALFORMED_DOCUMENT_TYPE","EOF reached while parsing document type")},char(q,K){var Y;K===rt?(Rt.endPos=z.pos+1,Y=fe(),ie(Y)):Rt.value+=q}}),fi=mt.createState({name:"STATE_DECLARATION",eol(q){Rt.value+=q},eof(){re(Rt.pos,"MALFORMED_DECLARATION","EOF reached while parsing declaration")},char(q,K){63===K?z.lookAtCharCodeAhead(1)===rt&&(Rt.endPos=z.pos+2,Ee(),z.skip(1)):K===rt?(Rt.endPos=z.pos+1,Ee()):Rt.value+=q}}),bi=mt.createState({name:"STATE_HTML_COMMENT",eol(q){Rt.value+=q},eof(){re(Rt.pos,"MALFORMED_COMMENT","EOF reached while parsing comment")},char(q,K){if(45===K){var Y=z.lookAheadFor("->");Y?(Rt.endPos=z.pos+3,(Q=fe()).endPos=z.pos+3,Zt(Q),z.skip(Y.length)):Rt.value+=q}else Rt.value+=q;var Q}}),pi=mt.createState({name:"STATE_SCRIPTLET",eol(q){Rt.value+=q},eof(){re(Rt.pos,"MALFORMED_SCRIPTLET","EOF reached while parsing scriptlet")},comment(q){Rt.value+=q.rawValue},char(q,K){if(Rt.quoteCharCode)return Rt.value+=q,void(K===st?(Rt.value+=z.lookAtCharAhead(1),z.skip(1)):K===Rt.quoteCharCode&&(Rt.quoteCharCode=null));if(K===nt){if(z.lookAtCharCodeAhead(1)===ut)return Te(),void z.skip(1)}else if(39===K||34===K)Rt.quoteCharCode=K;else if(37===K&&z.lookAtCharCodeAhead(1)===rt)return Y=z.pos+2,(Q=fe()).endPos=Y,ae(Q),void z.skip(1);var Y,Q;Rt.value+=q}}),vi=mt.createState({name:"STATE_INLINE_SCRIPT",eol(q){Rt.endMatch||96===Rt.stringType?Rt.value+=q:(z.rewind(q.length),_e(z.pos))},eof(){Rt.endMatch||Rt.stringType?re(Rt.pos,"MALFORMED_SCRIPTLET","EOF reached while parsing scriptet"):_e(z.pos)},comment(q){Rt.value+=q.rawValue},char(q,K){if(K===st)return Rt.value+=q+z.lookAtCharAhead(1),void z.skip(1);if(Rt.stringType)return K===Rt.stringType&&(Rt.stringType=null),void(Rt.value+=q);if(K===nt){var Y=z.lookAtCharCodeAhead(1);if(Y===nt)return we(),void z.skip(1);if(Y===ut)return Te(),void z.skip(1)}if(Rt.value+=q,K!==Rt.endMatch)if(39!==K&&34!==K&&96!==K){var Q=null;K===ht?Q=ct:K===dt?Q=lt:91===K&&(Q=ot),Q&&(Rt.endMatch&&Rt.endMatches.push(Rt.endMatch),Rt.endMatch=Q)}else Rt.stringType=K;else Rt.endMatch=Rt.endMatches.pop()}});z.enterHtmlContentState=function(){z.state!==$e&&z.enterState($e)},z.enterConciseHtmlContentState=function(){z.state!==He&&z.enterState(He)},z.enterParsedTextContentState=function(){var q=It.length&&It[It.length-1];if(!q||!q.tagName)throw new Error('The "parsed text content" parser state is only allowed within a tag');Mt?(q.body=1,z.enterState(He)):z.enterState(Ke)},z.enterJsContentState=z.enterParsedTextContentState,z.enterCssContentState=z.enterParsedTextContentState,z.enterStaticTextContentState=function(){var q=It.length&&It[It.length-1];if(!q||!q.tagName)throw new Error('The "static text content" parser state is only allowed within a tag');Mt?(q.body=2,z.enterState(He)):z.enterState(qe)},2===Ft?(z.setInitialState(He),z.enterDefaultState=function(){z.enterState(He)}):(z.setInitialState($e),z.enterDefaultState=function(){z.enterState($e)})}parse(q,K){super.parse(q,K),this.notifiers.notifyFinish()}}q.exports=mt},21052:(q,K)=>{var z={};["base","br","col","hr","embed","img","input","keygen","link","meta","param","source","track","wbr"].forEach((function(q){z[q]=!0})),K.isOpenTagOnly=function(q){return z.hasOwnProperty(q)}},64425:(q,K,z)=>{var Y=z(3366);K.C=function(q,K){return new Y(q,K||{})}},64101:(q,K)=>{K.createNotifiers=function(q,K){var z=!1;return{notifyText(Y,Q){if(!z){var X=K.onText;X&&Y.length>0&&X.call(q,{type:"text",value:Y,parseMode:Q},q)}},notifyCDATA(Y,Q,X){if(!z){var Z=K.onCDATA;Z&&Y&&Z.call(q,{type:"cdata",value:Y,pos:Q,endPos:X},q)}},notifyError(Y,Q,X){if(!z){z=!0;var Z=K.onError;Z&&Z.call(q,{type:"error",code:Q,message:X,pos:Y,endPos:q.pos},q)}},notifyOpenTagName(Y){if(!z){var Q=K.onOpenTagName;if(Q){var X={type:"openTagName",tagName:Y.tagName,tagNameExpression:Y.tagNameExpression,emptyTagName:Y.emptyTagName,pos:Y.pos,endPos:Y.tagNameEndPos,concise:Y.concise};Y.shorthandId&&(X.shorthandId=Y.shorthandId),Y.shorthandClassNames&&(X.shorthandClassNames=Y.shorthandClassNames),X.setParseOptions=function(q){q&&(Y.parseOptions=q)},Q.call(q,X,q)}}},notifyOpenTag(Y){if(!z){var Q=K.onOpenTag;if(Q){var X={type:"openTag",tagName:Y.tagName,tagNameExpression:Y.tagNameExpression,emptyTagName:Y.emptyTagName,var:Y.var,argument:Y.argument,params:Y.params,pos:Y.pos,endPos:Y.endPos,tagNameEndPos:Y.tagNameEndPos,openTagOnly:Y.openTagOnly,selfClosed:Y.selfClosed,concise:Y.concise};Y.shorthandId&&(X.shorthandId=Y.shorthandId),Y.shorthandClassNames&&(X.shorthandClassNames=Y.shorthandClassNames),X.attributes=Y.attributes.map((q=>{var K={default:q.default,name:q.name,value:q.value,pos:q.pos,endPos:q.endPos,argument:q.argument};return q.hasOwnProperty("literalValue")&&(K.literalValue=q.literalValue),K})),X.setParseOptions=function(K){if(K){var z=K.state;z&&("parsed-text"===z?q.enterParsedTextContentState():"static-text"===z&&q.enterStaticTextContentState()),Y.parseOptions=K}},Q.call(q,X,q)}}},notifyCloseTag(Y,Q,X){if(!z){var Z=K.onCloseTag;if(Z){var J={type:"closeTag",tagName:Y,pos:Q,endPos:X};Z.call(q,J,q)}}},notifyDocumentType(Y){if(!z){var Q=K.onDocumentType;Q&&Q.call(this,{type:"documentType",value:Y.value,pos:Y.pos,endPos:Y.endPos},q)}},notifyDeclaration(Y){if(!z){var Q=K.onDeclaration;Q&&Q.call(q,{type:"declaration",value:Y.value,pos:Y.pos,endPos:Y.endPos},q)}},notifyComment(Y){if(!z){var Q=K.onComment;Q&&Y.value&&Q.call(q,{type:"comment",value:Y.value,pos:Y.pos,endPos:Y.endPos},q)}},notifyScriptlet(Y){if(!z){var Q=K.onScriptlet;Q&&Y.value&&Q.call(q,{type:"scriptlet",tag:Y.tag,line:Y.line,block:Y.block,value:Y.value,pos:Y.pos,endPos:Y.endPos},q)}},notifyPlaceholder(Y){if(!z){var Q=K.onPlaceholder;if(Q){var X={type:"placeholder",value:Y.value,pos:Y.pos,endPos:Y.endPos,escape:!1!==Y.escape,withinBody:!0===Y.withinBody,withinAttribute:!0===Y.withinAttribute,withinString:!0===Y.withinString,withinOpenTag:!0===Y.withinOpenTag,withinTagName:!0===Y.withinTagName};return Q.call(q,X,q),X.value}return Y.value}},notifyString(Y){if(!z){var Q=K.onString;if(Q){var X={type:"string",value:Y.value,pos:Y.pos,endPos:Y.endPos,stringParts:Y.stringParts,isStringLiteral:Y.isStringLiteral};return Q.call(q,X,q),X.value}return Y.value}},notifyFinish(){K.onfinish&&K.onfinish.call(q,{},q)}}}},70456:(q,K)=>{var z=K.operators=["*","/","%","+","-","<<",">>",">>>","<","<=",">",">=","instanceof","in","==","!=","===","!==","&","^","|","&&","||","?",":","["];function Y(q){return/^[A-Z]+$/i.test(q)?"\\b"+Q(q)+"\\b":"/"===q?"\\/(?:\\b|\\s)":Q(q)}function Q(q){return q.replace(/([^\w\d])/g,"\\$1")}z.sort((function(q,K){return K.length-q.length})),K.longest=z.sort(((q,K)=>K.length-q.length))[0].length+1,K.patternNext=new RegExp("^\\s*("+z.map(Y).join("|")+")\\s*(?!-)"),K.patternPrev=new RegExp("[^-+](?:"+z.concat(["typeof","new","void"]).map(Y).join("|")+")(\\s*)$")},251:(q,K)=>{K.read=function(q,K,z,Y,Q){var X,Z,J=8*Q-Y-1,tt=(1<>1,it=-7,st=z?Q-1:0,nt=z?-1:1,at=q[K+st];for(st+=nt,X=at&(1<<-it)-1,at>>=-it,it+=J;it>0;X=256*X+q[K+st],st+=nt,it-=8);for(Z=X&(1<<-it)-1,X>>=-it,it+=Y;it>0;Z=256*Z+q[K+st],st+=nt,it-=8);if(0===X)X=1-et;else{if(X===tt)return Z?NaN:1/0*(at?-1:1);Z+=Math.pow(2,Y),X-=et}return(at?-1:1)*Z*Math.pow(2,X-Y)},K.write=function(q,K,z,Y,Q,X){var Z,J,tt,et=8*X-Q-1,it=(1<>1,nt=23===Q?Math.pow(2,-24)-Math.pow(2,-77):0,at=Y?0:X-1,rt=Y?1:-1,ot=K<0||0===K&&1/K<0?1:0;for(K=Math.abs(K),isNaN(K)||K===1/0?(J=isNaN(K)?1:0,Z=it):(Z=Math.floor(Math.log(K)/Math.LN2),K*(tt=Math.pow(2,-Z))<1&&(Z--,tt*=2),(K+=Z+st>=1?nt/tt:nt*Math.pow(2,1-st))*tt>=2&&(Z++,tt/=2),Z+st>=it?(J=0,Z=it):Z+st>=1?(J=(K*tt-1)*Math.pow(2,Q),Z+=st):(J=K*Math.pow(2,st-1)*Math.pow(2,Q),Z=0));Q>=8;q[z+at]=255&J,at+=rt,J/=256,Q-=8);for(Z=Z<0;q[z+at]=255&Z,at+=rt,Z/=256,et-=8);q[z+at-rt]|=128*ot}},56698:q=>{"function"==typeof Object.create?q.exports=function(q,K){K&&(q.super_=K,q.prototype=Object.create(K.prototype,{constructor:{value:q,enumerable:!1,writable:!0,configurable:!0}}))}:q.exports=function(q,K){if(K){q.super_=K;var z=function(){};z.prototype=K.prototype,q.prototype=new z,q.prototype.constructor=q}}},47244:(q,K,z)=>{"use strict";var Y=z(49092)(),Q=z(38075)("Object.prototype.toString"),X=function(q){return!(Y&&q&&"object"==typeof q&&Symbol.toStringTag in q)&&"[object Arguments]"===Q(q)},Z=function(q){return!!X(q)||null!==q&&"object"==typeof q&&"number"==typeof q.length&&q.length>=0&&"[object Array]"!==Q(q)&&"[object Function]"===Q(q.callee)},J=function(){return X(arguments)}();X.isLegacyArguments=Z,q.exports=J?X:Z},69600:q=>{"use strict";var K,z,Y=Function.prototype.toString,Q="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof Q&&"function"==typeof Object.defineProperty)try{K=Object.defineProperty({},"length",{get:function(){throw z}}),z={},Q((function(){throw 42}),null,K)}catch(at){at!==z&&(Q=null)}else Q=null;var X=/^\s*class\b/,Z=function(q){try{var K=Y.call(q);return X.test(K)}catch(e){return!1}},J=function(q){try{return!Z(q)&&(Y.call(q),!0)}catch(e){return!1}},tt=Object.prototype.toString,et="function"==typeof Symbol&&!!Symbol.toStringTag,it=!(0 in[,]),st=function(){return!1};if("object"==typeof document){var nt=document.all;tt.call(nt)===tt.call(document.all)&&(st=function(q){if((it||!q)&&(void 0===q||"object"==typeof q))try{var K=tt.call(q);return("[object HTMLAllCollection]"===K||"[object HTML document.all class]"===K||"[object HTMLCollection]"===K||"[object Object]"===K)&&null==q("")}catch(e){}return!1})}q.exports=Q?function(q){if(st(q))return!0;if(!q)return!1;if("function"!=typeof q&&"object"!=typeof q)return!1;try{Q(q,null,K)}catch(e){if(e!==z)return!1}return!Z(q)&&J(q)}:function(q){if(st(q))return!0;if(!q)return!1;if("function"!=typeof q&&"object"!=typeof q)return!1;if(et)return J(q);if(Z(q))return!1;var K=tt.call(q);return!("[object Function]"!==K&&"[object GeneratorFunction]"!==K&&!/^\[object HTML/.test(K))&&J(q)}},48184:(q,K,z)=>{"use strict";var Y,Q=z(36556),X=z(99721)(/^\s*(?:function)?\*/),Z=z(49092)(),J=z(93628),tt=Q("Object.prototype.toString"),et=Q("Function.prototype.toString");q.exports=function(q){if("function"!=typeof q)return!1;if(X(et(q)))return!0;if(!Z)return"[object GeneratorFunction]"===tt(q);if(!J)return!1;if(void 0===Y){var K=function(){if(!Z)return!1;try{return Function("return function*() {}")()}catch(e){}}();Y=!!K&&J(K)}return J(q)===Y}},14035:(q,K,z)=>{"use strict";var Y,Q=z(36556),X=z(49092)(),Z=z(9957),J=z(75795);if(X){var tt=Q("RegExp.prototype.exec"),et={},it=function(){throw et},st={toString:it,valueOf:it};"symbol"==typeof Symbol.toPrimitive&&(st[Symbol.toPrimitive]=it),Y=function(q){if(!q||"object"!=typeof q)return!1;var K=J(q,"lastIndex");if(!(K&&Z(K,"value")))return!1;try{tt(q,st)}catch(e){return e===et}}}else{var nt=Q("Object.prototype.toString");Y=function(q){return!(!q||"object"!=typeof q&&"function"!=typeof q)&&"[object RegExp]"===nt(q)}}q.exports=Y},35680:(q,K,z)=>{"use strict";var Y=z(25767);q.exports=function(q){return!!Y(q)}},13798:q=>{"use strict";q.exports=function(q){return null!=q&&"object"==typeof q&&!1===Array.isArray(q)}},3431:(q,K)=>{var z,Y,Q,X;X=function(){function q(q){for(var K=q,z=[];K.parent;)z.unshift(K),K=K.parent;return z}var K={search:function(z,Y,X,Z){z.cleanDirty();var J=(Z=Z||{}).heuristic||K.heuristics.manhattan,tt=Z.closest||!1,et=new Q((function(q){return q.f})),it=Y;for(Y.h=J(Y,X),et.push(Y);et.size()>0;){var st=et.pop();if(st===X)return q(st);st.closed=!0;for(var nt=z.neighbors(st),at=0,rt=nt.length;at0&&(this.content[0]=K,this.bubbleUp(0)),q},remove:function(q){var K=this.content.indexOf(q),z=this.content.pop();K!==this.content.length-1&&(this.content[K]=z,this.scoreFunction(z)0;){var z=(q+1>>1)-1,Y=this.content[z];if(!(this.scoreFunction(K){q.exports=z(33251)(window)},33251:function(q){q.exports=function(q){var K={};function z(q){return"string"==typeof q||q&&"object"==typeof q&&"[object String]"==Object.prototype.toString.call(q)||!1}function Y(q,Y){return q&&!z(q)&&(Y=q,q=void 0),{key:q||K.defaults.key,storage:Y||K.defaults.storage}}return K.defaults={key:"JWT_TOKEN",tokenPrefix:"Bearer ",storage:q.localStorage,padding:!1},K.encode64=function(z){var Y=q.btoa(q.unescape(q.encodeURIComponent(z)));return K.defaults.padding?Y:Y.replace(/=+$/,"")},K.decode64=function(K){return q.decodeURIComponent(q.escape(q.atob(K)))},K.write=function(q){return K.defaults.tokenPrefix+K.encode64(JSON.stringify(q.header))+"."+K.encode64(JSON.stringify(q.claim))+"."+(q.signature||"")},K.read=function(q){0===q.indexOf(K.defaults.tokenPrefix)&&(q=q.substring(K.defaults.tokenPrefix.length));var z=q.split(".");return{header:JSON.parse(K.decode64(z[0])),claim:JSON.parse(K.decode64(z[1])),signature:z[2]||""}},K.validateClaim=function(q,K,z){var Y=Date.now()/1e3;return q&&(!q.exp||q.exp>Y)&&(!q.nbf||q.nbf{"use strict";q.exports=Z,Z.Item=tt;var K=Z.prototype,z=tt.prototype,Y=et.prototype,Q="undefined"==typeof Symbol?void 0:Symbol.iterator;K.tail=K.head=null,Z.of=function(){return J(new this,arguments)},Z.from=function(q){return J(new this,q)},K.toArray=function(){var q=this.head,K=[];for(;q;)K.push(q),q=q.next;return K},K.prepend=function(q){var K=this,z=K.head;if(!q)return!1;if(!q.append||!q.prepend||!q.detach)throw new Error(X+"#prepend`.");if(z)return z.prepend(q);return q.detach(),q.list=K,K.head=q,K.size++,q},K.append=function(q){if(!q)return!1;if(!q.append||!q.prepend||!q.detach)throw new Error(X+"#append`.");var K=this,z=K.head,Y=K.tail;if(Y)return Y.append(q);if(z)return z.append(q);return q.detach(),q.list=K,K.head=q,K.size++,q},void 0!==Q&&(K[Q]=function(){return new et(this.head)}),z.next=z.prev=z.list=null,z.prepend=function(q){if(!(q&&q.append&&q.prepend&&q.detach))throw new Error(X+"Item#prepend`.");var K=this,z=K.list,Y=K.prev;if(!z)return!1;q.detach(),Y&&(q.prev=Y,Y.next=q);q.next=K,q.list=z,K.prev=q,K===z.head&&(z.head=q);z.tail||(z.tail=K);return z.size++,q},z.append=function(q){if(!(q&&q.append&&q.prepend&&q.detach))throw new Error(X+"Item#append`.");var K=this,z=K.list,Y=K.next;if(!z)return!1;q.detach(),Y&&(q.next=Y,Y.prev=q);q.prev=K,q.list=z,K.next=q,K!==z.tail&&z.tail||(z.tail=q);return z.size++,q},z.detach=function(){var q=this,K=q.list,z=q.prev,Y=q.next;if(!K)return q;K.tail===q&&(K.tail=z);K.head===q&&(K.head=Y);K.tail===K.head&&(K.tail=null);z&&(z.next=Y);Y&&(Y.prev=z);return q.prev=q.next=q.list=null,K.size--,q},Y.next=function(){var q=this.item;return this.value=q,this.done=!q,this.item=q?q.next:void 0,this};var X="An argument without append, prepend, or detach methods was given to `List";function Z(){this.size=0,0!==arguments.length&&J(this,arguments)}function J(q,K){var z,Y,X,Z;if(!K)return q;if(void 0!==Q&&K[Q])for(Z=K[Q](),X={};!X.done;)X=Z.next(),q.append(X&&X.value);else for(z=K.length,Y=-1;++Y{"use strict";q.exports=Math.abs},58968:q=>{"use strict";q.exports=Math.floor},94459:q=>{"use strict";q.exports=Number.isNaN||function(q){return q!=q}},6188:q=>{"use strict";q.exports=Math.max},68002:q=>{"use strict";q.exports=Math.min},75880:q=>{"use strict";q.exports=Math.pow},70414:q=>{"use strict";q.exports=Math.round},73093:(q,K,z)=>{"use strict";var Y=z(94459);q.exports=function(q){return Y(q)||0===q?q:q<0?-1:1}},45228:q=>{"use strict";var K=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;function Q(q){if(null==q)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(q)}q.exports=function(){try{if(!Object.assign)return!1;var q=new String("abc");if(q[5]="de","5"===Object.getOwnPropertyNames(q)[0])return!1;for(var K={},z=0;z<10;z++)K["_"+String.fromCharCode(z)]=z;if("0123456789"!==Object.getOwnPropertyNames(K).map((function(q){return K[q]})).join(""))return!1;var Y={};return"abcdefghijklmnopqrst".split("").forEach((function(q){Y[q]=q})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},Y)).join("")}catch(Q){return!1}}()?Object.assign:function(q,X){for(var Z,J,tt=Q(q),et=1;et{var Y="function"==typeof Map&&Map.prototype,Q=Object.getOwnPropertyDescriptor&&Y?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,X=Y&&Q&&"function"==typeof Q.get?Q.get:null,Z=Y&&Map.prototype.forEach,J="function"==typeof Set&&Set.prototype,tt=Object.getOwnPropertyDescriptor&&J?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,et=J&&tt&&"function"==typeof tt.get?tt.get:null,it=J&&Set.prototype.forEach,st="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,nt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,at="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,rt=Boolean.prototype.valueOf,ot=Object.prototype.toString,ht=Function.prototype.toString,ct=String.prototype.match,dt=String.prototype.slice,lt=String.prototype.replace,ut=String.prototype.toUpperCase,ft=String.prototype.toLowerCase,bt=RegExp.prototype.test,pt=Array.prototype.concat,vt=Array.prototype.join,gt=Array.prototype.slice,mt=Math.floor,yt="function"==typeof BigInt?BigInt.prototype.valueOf:null,_t=Object.getOwnPropertySymbols,Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,wt="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Tt="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===wt||"symbol")?Symbol.toStringTag:null,St=Object.prototype.propertyIsEnumerable,At=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(q){return q.__proto__}:null);function Ct(q,K){if(q===1/0||q===-1/0||q!=q||q&&q>-1e3&&q<1e3||bt.call(/e/,K))return K;var z=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof q){var Y=q<0?-mt(-q):mt(q);if(Y!==q){var Q=String(Y),X=dt.call(K,Q.length+1);return lt.call(Q,z,"$&_")+"."+lt.call(lt.call(X,/([0-9]{3})/g,"$&_"),/_$/,"")}}return lt.call(K,z,"$&_")}var Ot=z(42634),It=Ot.custom,Dt=Bt(It)?It:null,Rt={__proto__:null,double:'"',single:"'"},Pt={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function Mt(q,K,z){var Y=z.quoteStyle||K,Q=Rt[Y];return Q+q+Q}function Nt(q){return lt.call(String(q),/"/g,""")}function xt(q){return!Tt||!("object"==typeof q&&(Tt in q||void 0!==q[Tt]))}function Lt(q){return"[object Array]"===Gt(q)&&xt(q)}function kt(q){return"[object RegExp]"===Gt(q)&&xt(q)}function Bt(q){if(wt)return q&&"object"==typeof q&&q instanceof Symbol;if("symbol"==typeof q)return!0;if(!q||"object"!=typeof q||!Et)return!1;try{return Et.call(q),!0}catch(e){}return!1}q.exports=function q(K,Y,Q,J){var tt=Y||{};if(Ft(tt,"quoteStyle")&&!Ft(Rt,tt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ft(tt,"maxStringLength")&&("number"==typeof tt.maxStringLength?tt.maxStringLength<0&&tt.maxStringLength!==1/0:null!==tt.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=!Ft(tt,"customInspect")||tt.customInspect;if("boolean"!=typeof ot&&"symbol"!==ot)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ft(tt,"indent")&&null!==tt.indent&&"\t"!==tt.indent&&!(parseInt(tt.indent,10)===tt.indent&&tt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ft(tt,"numericSeparator")&&"boolean"!=typeof tt.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ut=tt.numericSeparator;if(void 0===K)return"undefined";if(null===K)return"null";if("boolean"==typeof K)return K?"true":"false";if("string"==typeof K)return $t(K,tt);if("number"==typeof K){if(0===K)return 1/0/K>0?"0":"-0";var bt=String(K);return ut?Ct(K,bt):bt}if("bigint"==typeof K){var mt=String(K)+"n";return ut?Ct(K,mt):mt}var _t=void 0===tt.depth?5:tt.depth;if(void 0===Q&&(Q=0),Q>=_t&&_t>0&&"object"==typeof K)return Lt(K)?"[Array]":"[Object]";var It=function(q,K){var z;if("\t"===q.indent)z="\t";else{if(!("number"==typeof q.indent&&q.indent>0))return null;z=vt.call(Array(q.indent+1)," ")}return{base:z,prev:vt.call(Array(K+1),z)}}(tt,Q);if(void 0===J)J=[];else if(jt(J,K)>=0)return"[Circular]";function Pt(K,z,Y){if(z&&(J=gt.call(J)).push(z),Y){var X={depth:tt.depth};return Ft(tt,"quoteStyle")&&(X.quoteStyle=tt.quoteStyle),q(K,X,Q+1,J)}return q(K,tt,Q+1,J)}if("function"==typeof K&&!kt(K)){var Ut=function(q){if(q.name)return q.name;var K=ct.call(ht.call(q),/^function\s*([\w$]+)/);if(K)return K[1];return null}(K),Ht=zt(K,Pt);return"[Function"+(Ut?": "+Ut:" (anonymous)")+"]"+(Ht.length>0?" { "+vt.call(Ht,", ")+" }":"")}if(Bt(K)){var Yt=wt?lt.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):Et.call(K);return"object"!=typeof K||wt?Yt:Vt(Yt)}if(function(q){if(!q||"object"!=typeof q)return!1;if("undefined"!=typeof HTMLElement&&q instanceof HTMLElement)return!0;return"string"==typeof q.nodeName&&"function"==typeof q.getAttribute}(K)){for(var Qt="<"+ft.call(String(K.nodeName)),Xt=K.attributes||[],Zt=0;Zt"}if(Lt(K)){if(0===K.length)return"[]";var Jt=zt(K,Pt);return It&&!function(q){for(var K=0;K=0)return!1;return!0}(Jt)?"["+Kt(Jt,It)+"]":"[ "+vt.call(Jt,", ")+" ]"}if(function(q){return"[object Error]"===Gt(q)&&xt(q)}(K)){var te=zt(K,Pt);return"cause"in Error.prototype||!("cause"in K)||St.call(K,"cause")?0===te.length?"["+String(K)+"]":"{ ["+String(K)+"] "+vt.call(te,", ")+" }":"{ ["+String(K)+"] "+vt.call(pt.call("[cause]: "+Pt(K.cause),te),", ")+" }"}if("object"==typeof K&&ot){if(Dt&&"function"==typeof K[Dt]&&Ot)return Ot(K,{depth:_t-Q});if("symbol"!==ot&&"function"==typeof K.inspect)return K.inspect()}if(function(q){if(!X||!q||"object"!=typeof q)return!1;try{X.call(q);try{et.call(q)}catch(Qt){return!0}return q instanceof Map}catch(e){}return!1}(K)){var ee=[];return Z&&Z.call(K,(function(q,z){ee.push(Pt(z,K,!0)+" => "+Pt(q,K))})),qt("Map",X.call(K),ee,It)}if(function(q){if(!et||!q||"object"!=typeof q)return!1;try{et.call(q);try{X.call(q)}catch(K){return!0}return q instanceof Set}catch(e){}return!1}(K)){var ie=[];return it&&it.call(K,(function(q){ie.push(Pt(q,K))})),qt("Set",et.call(K),ie,It)}if(function(q){if(!st||!q||"object"!=typeof q)return!1;try{st.call(q,st);try{nt.call(q,nt)}catch(Qt){return!0}return q instanceof WeakMap}catch(e){}return!1}(K))return Wt("WeakMap");if(function(q){if(!nt||!q||"object"!=typeof q)return!1;try{nt.call(q,nt);try{st.call(q,st)}catch(Qt){return!0}return q instanceof WeakSet}catch(e){}return!1}(K))return Wt("WeakSet");if(function(q){if(!at||!q||"object"!=typeof q)return!1;try{return at.call(q),!0}catch(e){}return!1}(K))return Wt("WeakRef");if(function(q){return"[object Number]"===Gt(q)&&xt(q)}(K))return Vt(Pt(Number(K)));if(function(q){if(!q||"object"!=typeof q||!yt)return!1;try{return yt.call(q),!0}catch(e){}return!1}(K))return Vt(Pt(yt.call(K)));if(function(q){return"[object Boolean]"===Gt(q)&&xt(q)}(K))return Vt(rt.call(K));if(function(q){return"[object String]"===Gt(q)&&xt(q)}(K))return Vt(Pt(String(K)));if("undefined"!=typeof window&&K===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&K===globalThis||void 0!==z.g&&K===z.g)return"{ [object globalThis] }";if(!function(q){return"[object Date]"===Gt(q)&&xt(q)}(K)&&!kt(K)){var se=zt(K,Pt),ne=At?At(K)===Object.prototype:K instanceof Object||K.constructor===Object,ae=K instanceof Object?"":"null prototype",re=!ne&&Tt&&Object(K)===K&&Tt in K?dt.call(Gt(K),8,-1):ae?"Object":"",oe=(ne||"function"!=typeof K.constructor?"":K.constructor.name?K.constructor.name+" ":"")+(re||ae?"["+vt.call(pt.call([],re||[],ae||[]),": ")+"] ":"");return 0===se.length?oe+"{}":It?oe+"{"+Kt(se,It)+"}":oe+"{ "+vt.call(se,", ")+" }"}return String(K)};var Ut=Object.prototype.hasOwnProperty||function(q){return q in this};function Ft(q,K){return Ut.call(q,K)}function Gt(q){return ot.call(q)}function jt(q,K){if(q.indexOf)return q.indexOf(K);for(var z=0,Y=q.length;zK.maxStringLength){var z=q.length-K.maxStringLength,Y="... "+z+" more character"+(z>1?"s":"");return $t(dt.call(q,0,K.maxStringLength),K)+Y}var Q=Pt[K.quoteStyle||"single"];return Q.lastIndex=0,Mt(lt.call(lt.call(q,Q,"\\$1"),/[\x00-\x1f]/g,Ht),"single",K)}function Ht(q){var K=q.charCodeAt(0),z={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return z?"\\"+z:"\\x"+(K<16?"0":"")+ut.call(K.toString(16))}function Vt(q){return"Object("+q+")"}function Wt(q){return q+" { ? }"}function qt(q,K,z,Y){return q+" ("+K+") {"+(Y?Kt(z,Y):vt.call(z,", "))+"}"}function Kt(q,K){if(0===q.length)return"";var z="\n"+K.prev+K.base;return z+vt.call(q,","+z)+"\n"+K.prev}function zt(q,K){var z=Lt(q),Y=[];if(z){Y.length=q.length;for(var Q=0;Q{"use strict";function K(q){if("string"!=typeof q)throw new TypeError("Path must be a string. Received "+JSON.stringify(q))}function z(q,K){for(var z,Y="",Q=0,X=-1,Z=0,J=0;J<=q.length;++J){if(J2){var tt=Y.lastIndexOf("/");if(tt!==Y.length-1){-1===tt?(Y="",Q=0):Q=(Y=Y.slice(0,tt)).length-1-Y.lastIndexOf("/"),X=J,Z=0;continue}}else if(2===Y.length||1===Y.length){Y="",Q=0,X=J,Z=0;continue}K&&(Y.length>0?Y+="/..":Y="..",Q=2)}else Y.length>0?Y+="/"+q.slice(X+1,J):Y=q.slice(X+1,J),Q=J-X-1;X=J,Z=0}else 46===z&&-1!==Z?++Z:Z=-1}return Y}var Y={resolve:function(){for(var q,Y="",Q=!1,X=arguments.length-1;X>=-1&&!Q;X--){var Z;X>=0?Z=arguments[X]:(void 0===q&&(q=process.cwd()),Z=q),K(Z),0!==Z.length&&(Y=Z+"/"+Y,Q=47===Z.charCodeAt(0))}return Y=z(Y,!Q),Q?Y.length>0?"/"+Y:"/":Y.length>0?Y:"."},normalize:function(q){if(K(q),0===q.length)return".";var Y=47===q.charCodeAt(0),Q=47===q.charCodeAt(q.length-1);return 0!==(q=z(q,!Y)).length||Y||(q="."),q.length>0&&Q&&(q+="/"),Y?"/"+q:q},isAbsolute:function(q){return K(q),q.length>0&&47===q.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var q,z=0;z0&&(void 0===q?q=Q:q+="/"+Q)}return void 0===q?".":Y.normalize(q)},relative:function(q,z){if(K(q),K(z),q===z)return"";if((q=Y.resolve(q))===(z=Y.resolve(z)))return"";for(var Q=1;Qet){if(47===z.charCodeAt(J+st))return z.slice(J+st+1);if(0===st)return z.slice(J+st)}else Z>et&&(47===q.charCodeAt(Q+st)?it=st:0===st&&(it=0));break}var nt=q.charCodeAt(Q+st);if(nt!==z.charCodeAt(J+st))break;47===nt&&(it=st)}var at="";for(st=Q+it+1;st<=X;++st)st!==X&&47!==q.charCodeAt(st)||(0===at.length?at+="..":at+="/..");return at.length>0?at+z.slice(J+it):(J+=it,47===z.charCodeAt(J)&&++J,z.slice(J))},_makeLong:function(q){return q},dirname:function(q){if(K(q),0===q.length)return".";for(var z=q.charCodeAt(0),Y=47===z,Q=-1,X=!0,Z=q.length-1;Z>=1;--Z)if(47===(z=q.charCodeAt(Z))){if(!X){Q=Z;break}}else X=!1;return-1===Q?Y?"/":".":Y&&1===Q?"//":q.slice(0,Q)},basename:function(q,z){if(void 0!==z&&"string"!=typeof z)throw new TypeError('"ext" argument must be a string');K(q);var Y,Q=0,X=-1,Z=!0;if(void 0!==z&&z.length>0&&z.length<=q.length){if(z.length===q.length&&z===q)return"";var J=z.length-1,tt=-1;for(Y=q.length-1;Y>=0;--Y){var et=q.charCodeAt(Y);if(47===et){if(!Z){Q=Y+1;break}}else-1===tt&&(Z=!1,tt=Y+1),J>=0&&(et===z.charCodeAt(J)?-1==--J&&(X=Y):(J=-1,X=tt))}return Q===X?X=tt:-1===X&&(X=q.length),q.slice(Q,X)}for(Y=q.length-1;Y>=0;--Y)if(47===q.charCodeAt(Y)){if(!Z){Q=Y+1;break}}else-1===X&&(Z=!1,X=Y+1);return-1===X?"":q.slice(Q,X)},extname:function(q){K(q);for(var z=-1,Y=0,Q=-1,X=!0,Z=0,J=q.length-1;J>=0;--J){var tt=q.charCodeAt(J);if(47!==tt)-1===Q&&(X=!1,Q=J+1),46===tt?-1===z?z=J:1!==Z&&(Z=1):-1!==z&&(Z=-1);else if(!X){Y=J+1;break}}return-1===z||-1===Q||0===Z||1===Z&&z===Q-1&&z===Y+1?"":q.slice(z,Q)},format:function(q){if(null===q||"object"!=typeof q)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof q);return function(q,K){var z=K.dir||K.root,Y=K.base||(K.name||"")+(K.ext||"");return z?z===K.root?z+Y:z+q+Y:Y}("/",q)},parse:function(q){K(q);var z={root:"",dir:"",base:"",ext:"",name:""};if(0===q.length)return z;var Y,Q=q.charCodeAt(0),X=47===Q;X?(z.root="/",Y=1):Y=0;for(var Z=-1,J=0,tt=-1,et=!0,it=q.length-1,st=0;it>=Y;--it)if(47!==(Q=q.charCodeAt(it)))-1===tt&&(et=!1,tt=it+1),46===Q?-1===Z?Z=it:1!==st&&(st=1):-1!==Z&&(st=-1);else if(!et){J=it+1;break}return-1===Z||-1===tt||0===st||1===st&&Z===tt-1&&Z===J+1?-1!==tt&&(z.base=z.name=0===J&&X?q.slice(1,tt):q.slice(J,tt)):(0===J&&X?(z.name=q.slice(1,Z),z.base=q.slice(1,tt)):(z.name=q.slice(J,Z),z.base=q.slice(J,tt)),z.ext=q.slice(Z,tt)),J>0?z.dir=q.slice(0,J-1):X&&(z.dir="/"),z},sep:"/",delimiter:":",win32:null,posix:null};Y.posix=Y,q.exports=Y},59004:function(q){q.exports=function(){"use strict";function q(q,K){if(!(q instanceof K))throw new TypeError("Cannot call a class as a function")}function K(q,K){for(var z=0;zK?1:q0))break;if(null===K.right)break;if(z(q,K.right.key)>0&&(tt=K.right,K.right=tt.left,tt.left=K,null===(K=tt).right))break;X.right=K,X=K,K=K.right}}return X.right=K.left,Z.left=K.right,K.left=Q.right,K.right=Q.left,K}function Z(q,K,z,Q){var Z=new Y(q,K);if(null===z)return Z.left=Z.right=null,Z;var J=Q(q,(z=X(q,z,Q)).key);return J<0?(Z.left=z.left,Z.right=z,z.left=null):J>=0&&(Z.right=z.right,Z.left=z,z.right=null),Z}function J(q,K,z){var Y=null,Q=null;if(K){var Z=z((K=X(q,K,z)).key,q);0===Z?(Y=K.left,Q=K.right):Z<0?(Q=K.right,K.right=null,Y=K):(Y=K.left,K.left=null,Q=K)}return{left:Y,right:Q}}function tt(q,K,z){return null===K?q:(null===q||((K=X(q.key,K,z)).left=q),K)}function et(q,K,z,Y,Q){if(q){Y(K+(z?"└── ":"├── ")+Q(q)+"\n");var X=K+(z?" ":"│ ");q.left&&et(q.left,X,!1,Y,Q),q.right&&et(q.right,X,!0,Y,Q)}}var it=function(){function q(q){void 0===q&&(q=Q),this._root=null,this._size=0,this._comparator=q}return q.prototype.insert=function(q,K){return this._size++,this._root=Z(q,K,this._root,this._comparator)},q.prototype.add=function(q,K){var z=new Y(q,K);null===this._root&&(z.left=z.right=null,this._size++,this._root=z);var Q=this._comparator,Z=X(q,this._root,Q),J=Q(q,Z.key);return 0===J?this._root=Z:(J<0?(z.left=Z.left,z.right=Z,Z.left=null):J>0&&(z.right=Z.right,z.left=Z,Z.right=null),this._size++,this._root=z),this._root},q.prototype.remove=function(q){this._root=this._remove(q,this._root,this._comparator)},q.prototype._remove=function(q,K,z){var Y;return null===K?null:0===z(q,(K=X(q,K,z)).key)?(null===K.left?Y=K.right:(Y=X(q,K.left,z)).right=K.right,this._size--,Y):K},q.prototype.pop=function(){var q=this._root;if(q){for(;q.left;)q=q.left;return this._root=X(q.key,this._root,this._comparator),this._root=this._remove(q.key,this._root,this._comparator),{key:q.key,data:q.data}}return null},q.prototype.findStatic=function(q){for(var K=this._root,z=this._comparator;K;){var Y=z(q,K.key);if(0===Y)return K;K=Y<0?K.left:K.right}return null},q.prototype.find=function(q){return this._root&&(this._root=X(q,this._root,this._comparator),0!==this._comparator(q,this._root.key))?null:this._root},q.prototype.contains=function(q){for(var K=this._root,z=this._comparator;K;){var Y=z(q,K.key);if(0===Y)return!0;K=Y<0?K.left:K.right}return!1},q.prototype.forEach=function(q,K){for(var z=this._root,Y=[],Q=!1;!Q;)null!==z?(Y.push(z),z=z.left):0!==Y.length?(z=Y.pop(),q.call(K,z),z=z.right):Q=!0;return this},q.prototype.range=function(q,K,z,Y){for(var Q=[],X=this._comparator,Z=this._root;0!==Q.length||Z;)if(Z)Q.push(Z),Z=Z.left;else{if(X((Z=Q.pop()).key,K)>0)break;if(X(Z.key,q)>=0&&z.call(Y,Z))return this;Z=Z.right}return this},q.prototype.keys=function(){var q=[];return this.forEach((function(K){var z=K.key;return q.push(z)})),q},q.prototype.values=function(){var q=[];return this.forEach((function(K){var z=K.data;return q.push(z)})),q},q.prototype.min=function(){return this._root?this.minNode(this._root).key:null},q.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},q.prototype.minNode=function(q){if(void 0===q&&(q=this._root),q)for(;q.left;)q=q.left;return q},q.prototype.maxNode=function(q){if(void 0===q&&(q=this._root),q)for(;q.right;)q=q.right;return q},q.prototype.at=function(q){for(var K=this._root,z=!1,Y=0,Q=[];!z;)if(K)Q.push(K),K=K.left;else if(Q.length>0){if(K=Q.pop(),Y===q)return K;Y++,K=K.right}else z=!0;return null},q.prototype.next=function(q){var K=this._root,z=null;if(q.right){for(z=q.right;z.left;)z=z.left;return z}for(var Y=this._comparator;K;){var Q=Y(q.key,K.key);if(0===Q)break;Q<0?(z=K,K=K.left):K=K.right}return z},q.prototype.prev=function(q){var K=this._root,z=null;if(null!==q.left){for(z=q.left;z.right;)z=z.right;return z}for(var Y=this._comparator;K;){var Q=Y(q.key,K.key);if(0===Q)break;Q<0?K=K.left:(z=K,K=K.right)}return z},q.prototype.clear=function(){return this._root=null,this._size=0,this},q.prototype.toList=function(){return at(this._root)},q.prototype.load=function(q,K,z){void 0===K&&(K=[]),void 0===z&&(z=!1);var Y=q.length,Q=this._comparator;if(z&&ht(q,K,0,Y-1,Q),null===this._root)this._root=st(q,K,0,Y),this._size=Y;else{var X=ot(this.toList(),nt(q,K),Q);Y=this._size+Y,this._root=rt({head:X},0,Y)}return this},q.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(q.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(q.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),q.prototype.toString=function(q){void 0===q&&(q=function(q){return String(q.key)});var K=[];return et(this._root,"",!0,(function(q){return K.push(q)}),q),K.join("")},q.prototype.update=function(q,K,z){var Y=this._comparator,Q=J(q,this._root,Y),X=Q.left,et=Q.right;Y(q,K)<0?et=Z(K,z,et,Y):X=Z(K,z,X,Y),this._root=tt(X,et,Y)},q.prototype.split=function(q){return J(q,this._root,this._comparator)},q}();function st(q,K,z,Q){var X=Q-z;if(X>0){var Z=z+Math.floor(X/2),J=q[Z],tt=K[Z],et=new Y(J,tt);return et.left=st(q,K,z,Z),et.right=st(q,K,Z+1,Q),et}return null}function nt(q,K){for(var z=new Y(null,null),Q=z,X=0;X0?K=(K=Z=Z.next=z.pop()).right:Q=!0;return Z.next=null,X.next}function rt(q,K,z){var Y=z-K;if(Y>0){var Q=K+Math.floor(Y/2),X=rt(q,K,Q),Z=q.head;return Z.left=X,q.head=q.head.next,Z.right=rt(q,Q+1,z),Z}return null}function ot(q,K,z){for(var Q=new Y(null,null),X=Q,Z=q,J=K;null!==Z&&null!==J;)z(Z.key,J.key)<0?(X.next=Z,Z=Z.next):(X.next=J,J=J.next),X=X.next;return null!==Z?X.next=Z:null!==J&&(X.next=J),Q.next}function ht(q,K,z,Y,Q){if(!(z>=Y)){for(var X=q[z+Y>>1],Z=z-1,J=Y+1;;){do{Z++}while(Q(q[Z],X)<0);do{J--}while(Q(q[J],X)>0);if(Z>=J)break;var tt=q[Z];q[Z]=q[J],q[J]=tt,tt=K[Z],K[Z]=K[J],K[J]=tt}ht(q,K,z,J,Q),ht(q,K,J+1,Y,Q)}}var ct=function(q,K){return q.ll.x<=K.x&&K.x<=q.ur.x&&q.ll.y<=K.y&&K.y<=q.ur.y},dt=function(q,K){if(K.ur.xK.x?1:q.yK.y?1:0}}]),z(K,[{key:"link",value:function(q){if(q.point===this.point)throw new Error("Tried to link already linked events");for(var K=q.point.events,z=0,Y=K.length;z=0&&tt>=0?Zet?-1:0:X<0&&tt<0?Zet?1:0:ttX?1:0}}}]),K}(),Ot=0,It=function(){function K(z,Y,Q,X){q(this,K),this.id=++Ot,this.leftSE=z,z.segment=this,z.otherSE=Y,this.rightSE=Y,Y.segment=this,Y.otherSE=z,this.rings=Q,this.windings=X}return z(K,null,[{key:"compare",value:function(q,K){var z=q.leftSE.point.x,Y=K.leftSE.point.x,Q=q.rightSE.point.x,X=K.rightSE.point.x;if(XZ&&J>tt)return-1;var it=q.comparePoint(K.leftSE.point);if(it<0)return 1;if(it>0)return-1;var st=K.comparePoint(q.rightSE.point);return 0!==st?st:-1}if(z>Y){if(ZJ&&Z>et)return 1;var nt=K.comparePoint(q.leftSE.point);if(0!==nt)return nt;var at=q.comparePoint(K.rightSE.point);return at<0?1:at>0?-1:1}if(ZJ)return 1;if(QX){var ot=q.comparePoint(K.rightSE.point);if(ot<0)return 1;if(ot>0)return-1}if(Q!==X){var ht=tt-Z,ct=Q-z,dt=et-J,lt=X-Y;if(ht>ct&&dtlt)return-1}return Q>X?1:Qet?1:q.idK.id?1:0}}]),z(K,[{key:"replaceRightSE",value:function(q){this.rightSE=q,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var q=this.leftSE.point.y,K=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:qK?q:K}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(q){return q.x===this.leftSE.point.x&&q.y===this.leftSE.point.y||q.x===this.rightSE.point.x&&q.y===this.rightSE.point.y}},{key:"comparePoint",value:function(q){if(this.isAnEndpoint(q))return 0;var K=this.leftSE.point,z=this.rightSE.point,Y=this.vector();if(K.x===z.x)return q.x===K.x?0:q.x0&&J.swapEvents(),Ct.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),Y&&(Q.checkForConsuming(),X.checkForConsuming()),z}},{key:"swapEvents",value:function(){var q=this.rightSE;this.rightSE=this.leftSE,this.leftSE=q,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var K=0,z=this.windings.length;K0){var X=z;z=Y,Y=X}if(z.prev===Y){var Z=z;z=Y,Y=Z}for(var J=0,tt=Y.rings.length;J0))throw new Error("Tried to create degenerate segment at [".concat(q.x,", ").concat(q.y,"]"));Q=z,X=q,Z=-1}return new K(new Ct(Q,!0),new Ct(X,!1),[Y],[Z])}}]),K}(),Dt=function(){function K(z,Y,Q){if(q(this,K),!Array.isArray(z)||0===z.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=Y,this.isExterior=Q,this.segments=[],"number"!=typeof z[0][0]||"number"!=typeof z[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var X=vt.round(z[0][0],z[0][1]);this.bbox={ll:{x:X.x,y:X.y},ur:{x:X.x,y:X.y}};for(var Z=X,J=1,tt=z.length;Jthis.bbox.ur.x&&(this.bbox.ur.x=et.x),et.y>this.bbox.ur.y&&(this.bbox.ur.y=et.y),Z=et)}X.x===Z.x&&X.y===Z.y||this.segments.push(It.fromRing(Z,X,this))}return z(K,[{key:"getSweepEvents",value:function(){for(var q=[],K=0,z=this.segments.length;Kthis.bbox.ur.x&&(this.bbox.ur.x=Z.bbox.ur.x),Z.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=Z.bbox.ur.y),this.interiorRings.push(Z)}this.multiPoly=Y}return z(K,[{key:"getSweepEvents",value:function(){for(var q=this.exteriorRing.getSweepEvents(),K=0,z=this.interiorRings.length;Kthis.bbox.ur.x&&(this.bbox.ur.x=Z.bbox.ur.x),Z.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=Z.bbox.ur.y),this.polys.push(Z)}this.isSubject=Y}return z(K,[{key:"getSweepEvents",value:function(){for(var q=[],K=0,z=this.polys.length;K0&&(q=Y)}for(var Q=q.segment.prevInResult(),X=Q?Q.prevInResult():null;;){if(!Q)return null;if(!X)return Q.ringOut;if(X.ringOut!==Q.ringOut)return X.ringOut.enclosingRing()!==Q.ringOut?Q.ringOut:Q.ringOut.enclosingRing();Q=X.prevInResult(),X=Q?Q.prevInResult():null}}}]),K}(),Nt=function(){function K(z){q(this,K),this.exteriorRing=z,z.poly=this,this.interiorRings=[]}return z(K,[{key:"addInterior",value:function(q){this.interiorRings.push(q),q.poly=this}},{key:"getGeom",value:function(){var q=[this.exteriorRing.getGeom()];if(null===q[0])return null;for(var K=0,z=this.interiorRings.length;K1&&void 0!==arguments[1]?arguments[1]:It.compare;q(this,K),this.queue=z,this.tree=new it(Y),this.segments=[]}return z(K,[{key:"process",value:function(q){var K=q.segment,z=[];if(q.consumedBy)return q.isLeft?this.queue.remove(q.otherSE):this.tree.remove(K),z;var Y=q.isLeft?this.tree.insert(K):this.tree.find(K);if(!Y)throw new Error("Unable to find segment #".concat(K.id," ")+"[".concat(K.leftSE.point.x,", ").concat(K.leftSE.point.y,"] -> ")+"[".concat(K.rightSE.point.x,", ").concat(K.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var Q=Y,X=Y,Z=void 0,J=void 0;void 0===Z;)null===(Q=this.tree.prev(Q))?Z=null:void 0===Q.key.consumedBy&&(Z=Q.key);for(;void 0===J;)null===(X=this.tree.next(X))?J=null:void 0===X.key.consumedBy&&(J=X.key);if(q.isLeft){var tt=null;if(Z){var et=Z.getIntersection(K);if(null!==et&&(K.isAnEndpoint(et)||(tt=et),!Z.isAnEndpoint(et)))for(var it=this._splitSafely(Z,et),st=0,nt=it.length;st0?(this.tree.remove(K),z.push(q)):(this.segments.push(K),K.prev=Z)}else{if(Z&&J){var bt=Z.getIntersection(J);if(null!==bt){if(!Z.isAnEndpoint(bt))for(var pt=this._splitSafely(Z,bt),vt=0,gt=pt.length;vtkt)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var ft=new Lt(rt),bt=rt.size,pt=rt.pop();pt;){var gt=pt.key;if(rt.size===bt){var mt=gt.segment;throw new Error("Unable to pop() ".concat(gt.isLeft?"left":"right"," SweepEvent ")+"[".concat(gt.point.x,", ").concat(gt.point.y,"] from segment #").concat(mt.id," ")+"[".concat(mt.leftSE.point.x,", ").concat(mt.leftSE.point.y,"] -> ")+"[".concat(mt.rightSE.point.x,", ").concat(mt.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(rt.size>kt)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(ft.segments.length>Bt)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var yt=ft.process(gt),_t=0,Et=yt.length;_t1?K-1:0),Y=1;Y1?K-1:0),Y=1;Y1?K-1:0),Y=1;Y1?K-1:0),Y=1;Y{"use strict";q.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},26946:(q,K,z)=>{"use strict";q.exports=z(24394)},24394:(q,K,z)=>{"use strict";var Y=K;function Q(){Y.util._configure(),Y.Writer._configure(Y.BufferWriter),Y.Reader._configure(Y.BufferReader)}Y.build="minimal",Y.Writer=z(63449),Y.BufferWriter=z(60818),Y.Reader=z(16237),Y.BufferReader=z(33158),Y.util=z(93610),Y.rpc=z(95047),Y.roots=z(64529),Y.configure=Q,Q()},16237:(q,K,z)=>{"use strict";q.exports=tt;var Y,Q=z(93610),X=Q.LongBits,Z=Q.utf8;function J(q,K){return RangeError("index out of range: "+q.pos+" + "+(K||1)+" > "+q.len)}function tt(q){this.buf=q,this.pos=0,this.len=q.length}var et,it="undefined"!=typeof Uint8Array?function(q){if(q instanceof Uint8Array||Array.isArray(q))return new tt(q);throw Error("illegal buffer")}:function(q){if(Array.isArray(q))return new tt(q);throw Error("illegal buffer")},st=function(){return Q.Buffer?function(q){return(tt.create=function(q){return Q.Buffer.isBuffer(q)?new Y(q):it(q)})(q)}:it};function nt(){var q=new X(0,0),K=0;if(!(this.len-this.pos>4)){for(;K<3;++K){if(this.pos>=this.len)throw J(this);if(q.lo=(q.lo|(127&this.buf[this.pos])<<7*K)>>>0,this.buf[this.pos++]<128)return q}return q.lo=(q.lo|(127&this.buf[this.pos++])<<7*K)>>>0,q}for(;K<4;++K)if(q.lo=(q.lo|(127&this.buf[this.pos])<<7*K)>>>0,this.buf[this.pos++]<128)return q;if(q.lo=(q.lo|(127&this.buf[this.pos])<<28)>>>0,q.hi=(q.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return q;if(K=0,this.len-this.pos>4){for(;K<5;++K)if(q.hi=(q.hi|(127&this.buf[this.pos])<<7*K+3)>>>0,this.buf[this.pos++]<128)return q}else for(;K<5;++K){if(this.pos>=this.len)throw J(this);if(q.hi=(q.hi|(127&this.buf[this.pos])<<7*K+3)>>>0,this.buf[this.pos++]<128)return q}throw Error("invalid varint encoding")}function at(q,K){return(q[K-4]|q[K-3]<<8|q[K-2]<<16|q[K-1]<<24)>>>0}function rt(){if(this.pos+8>this.len)throw J(this,8);return new X(at(this.buf,this.pos+=4),at(this.buf,this.pos+=4))}tt.create=st(),tt.prototype._slice=Q.Array.prototype.subarray||Q.Array.prototype.slice,tt.prototype.uint32=(et=4294967295,function(){if(et=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return et;if(et=(et|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return et;if(et=(et|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return et;if(et=(et|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return et;if(et=(et|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return et;if((this.pos+=5)>this.len)throw this.pos=this.len,J(this,10);return et}),tt.prototype.int32=function(){return 0|this.uint32()},tt.prototype.sint32=function(){var q=this.uint32();return q>>>1^-(1&q)|0},tt.prototype.bool=function(){return 0!==this.uint32()},tt.prototype.fixed32=function(){if(this.pos+4>this.len)throw J(this,4);return at(this.buf,this.pos+=4)},tt.prototype.sfixed32=function(){if(this.pos+4>this.len)throw J(this,4);return 0|at(this.buf,this.pos+=4)},tt.prototype.float=function(){if(this.pos+4>this.len)throw J(this,4);var q=Q.float.readFloatLE(this.buf,this.pos);return this.pos+=4,q},tt.prototype.double=function(){if(this.pos+8>this.len)throw J(this,4);var q=Q.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,q},tt.prototype.bytes=function(){var q=this.uint32(),K=this.pos,z=this.pos+q;if(z>this.len)throw J(this,q);return this.pos+=q,Array.isArray(this.buf)?this.buf.slice(K,z):K===z?new this.buf.constructor(0):this._slice.call(this.buf,K,z)},tt.prototype.string=function(){var q=this.bytes();return Z.read(q,0,q.length)},tt.prototype.skip=function(q){if("number"==typeof q){if(this.pos+q>this.len)throw J(this,q);this.pos+=q}else do{if(this.pos>=this.len)throw J(this)}while(128&this.buf[this.pos++]);return this},tt.prototype.skipType=function(q){switch(q){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(q=7&this.uint32());)this.skipType(q);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+q+" at offset "+this.pos)}return this},tt._configure=function(q){Y=q,tt.create=st(),Y._configure();var K=Q.Long?"toLong":"toNumber";Q.merge(tt.prototype,{int64:function(){return nt.call(this)[K](!1)},uint64:function(){return nt.call(this)[K](!0)},sint64:function(){return nt.call(this).zzDecode()[K](!1)},fixed64:function(){return rt.call(this)[K](!0)},sfixed64:function(){return rt.call(this)[K](!1)}})}},33158:(q,K,z)=>{"use strict";q.exports=X;var Y=z(16237);(X.prototype=Object.create(Y.prototype)).constructor=X;var Q=z(93610);function X(q){Y.call(this,q)}X._configure=function(){Q.Buffer&&(X.prototype._slice=Q.Buffer.prototype.slice)},X.prototype.string=function(){var q=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+q,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+q,this.len))},X._configure()},64529:q=>{"use strict";q.exports={}},95047:(q,K,z)=>{"use strict";K.Service=z(27595)},27595:(q,K,z)=>{"use strict";q.exports=Q;var Y=z(93610);function Q(q,K,z){if("function"!=typeof q)throw TypeError("rpcImpl must be a function");Y.EventEmitter.call(this),this.rpcImpl=q,this.requestDelimited=Boolean(K),this.responseDelimited=Boolean(z)}(Q.prototype=Object.create(Y.EventEmitter.prototype)).constructor=Q,Q.prototype.rpcCall=function q(K,z,Q,X,Z){if(!X)throw TypeError("request must be specified");var J=this;if(!Z)return Y.asPromise(q,J,K,z,Q,X);if(J.rpcImpl)try{return J.rpcImpl(K,z[J.requestDelimited?"encodeDelimited":"encode"](X).finish(),(function(q,z){if(q)return J.emit("error",q,K),Z(q);if(null!==z){if(!(z instanceof Q))try{z=Q[J.responseDelimited?"decodeDelimited":"decode"](z)}catch(q){return J.emit("error",q,K),Z(q)}return J.emit("data",z,K),Z(null,z)}J.end(!0)}))}catch(tt){return J.emit("error",tt,K),void setTimeout((function(){Z(tt)}),0)}else setTimeout((function(){Z(Error("already ended"))}),0)},Q.prototype.end=function(q){return this.rpcImpl&&(q||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},32239:(q,K,z)=>{"use strict";q.exports=Q;var Y=z(93610);function Q(q,K){this.lo=q>>>0,this.hi=K>>>0}var X=Q.zero=new Q(0,0);X.toNumber=function(){return 0},X.zzEncode=X.zzDecode=function(){return this},X.length=function(){return 1};var Z=Q.zeroHash="\0\0\0\0\0\0\0\0";Q.fromNumber=function(q){if(0===q)return X;var K=q<0;K&&(q=-q);var z=q>>>0,Y=(q-z)/4294967296>>>0;return K&&(Y=~Y>>>0,z=~z>>>0,++z>4294967295&&(z=0,++Y>4294967295&&(Y=0))),new Q(z,Y)},Q.from=function(q){if("number"==typeof q)return Q.fromNumber(q);if(Y.isString(q)){if(!Y.Long)return Q.fromNumber(parseInt(q,10));q=Y.Long.fromString(q)}return q.low||q.high?new Q(q.low>>>0,q.high>>>0):X},Q.prototype.toNumber=function(q){if(!q&&this.hi>>>31){var K=1+~this.lo>>>0,z=~this.hi>>>0;return K||(z=z+1>>>0),-(K+4294967296*z)}return this.lo+4294967296*this.hi},Q.prototype.toLong=function(q){return Y.Long?new Y.Long(0|this.lo,0|this.hi,Boolean(q)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(q)}};var J=String.prototype.charCodeAt;Q.fromHash=function(q){return q===Z?X:new Q((J.call(q,0)|J.call(q,1)<<8|J.call(q,2)<<16|J.call(q,3)<<24)>>>0,(J.call(q,4)|J.call(q,5)<<8|J.call(q,6)<<16|J.call(q,7)<<24)>>>0)},Q.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},Q.prototype.zzEncode=function(){var q=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^q)>>>0,this.lo=(this.lo<<1^q)>>>0,this},Q.prototype.zzDecode=function(){var q=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^q)>>>0,this.hi=(this.hi>>>1^q)>>>0,this},Q.prototype.length=function(){var q=this.lo,K=(this.lo>>>28|this.hi<<4)>>>0,z=this.hi>>>24;return 0===z?0===K?q<16384?q<128?1:2:q<2097152?3:4:K<16384?K<128?5:6:K<2097152?7:8:z<128?9:10}},93610:function(q,K,z){"use strict";var Y=K;function Q(q,K,z){for(var Y=Object.keys(K),Q=0;Q0)},Y.Buffer=function(){try{var q=Y.inquire("buffer").Buffer;return q.prototype.utf8Write?q:null}catch(e){return null}}(),Y._Buffer_from=null,Y._Buffer_allocUnsafe=null,Y.newBuffer=function(q){return"number"==typeof q?Y.Buffer?Y._Buffer_allocUnsafe(q):new Y.Array(q):Y.Buffer?Y._Buffer_from(q):"undefined"==typeof Uint8Array?q:new Uint8Array(q)},Y.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,Y.Long=Y.global.dcodeIO&&Y.global.dcodeIO.Long||Y.global.Long||Y.inquire("long"),Y.key2Re=/^true|false|0|1$/,Y.key32Re=/^-?(?:0|[1-9][0-9]*)$/,Y.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,Y.longToHash=function(q){return q?Y.LongBits.from(q).toHash():Y.LongBits.zeroHash},Y.longFromHash=function(q,K){var z=Y.LongBits.fromHash(q);return Y.Long?Y.Long.fromBits(z.lo,z.hi,K):z.toNumber(Boolean(K))},Y.merge=Q,Y.lcFirst=function(q){return q.charAt(0).toLowerCase()+q.substring(1)},Y.newError=X,Y.ProtocolError=X("ProtocolError"),Y.oneOfGetter=function(q){for(var K={},z=0;z-1;--z)if(1===K[q[z]]&&void 0!==this[q[z]]&&null!==this[q[z]])return q[z]}},Y.oneOfSetter=function(q){return function(K){for(var z=0;z{"use strict";q.exports=st;var Y,Q=z(93610),X=Q.LongBits,Z=Q.base64,J=Q.utf8;function tt(q,K,z){this.fn=q,this.len=K,this.next=void 0,this.val=z}function et(){}function it(q){this.head=q.head,this.tail=q.tail,this.len=q.len,this.next=q.states}function st(){this.len=0,this.head=new tt(et,0,0),this.tail=this.head,this.states=null}var nt=function(){return Q.Buffer?function(){return(st.create=function(){return new Y})()}:function(){return new st}};function at(q,K,z){K[z]=255&q}function rt(q,K){this.len=q,this.next=void 0,this.val=K}function ot(q,K,z){for(;q.hi;)K[z++]=127&q.lo|128,q.lo=(q.lo>>>7|q.hi<<25)>>>0,q.hi>>>=7;for(;q.lo>127;)K[z++]=127&q.lo|128,q.lo=q.lo>>>7;K[z++]=q.lo}function ht(q,K,z){K[z]=255&q,K[z+1]=q>>>8&255,K[z+2]=q>>>16&255,K[z+3]=q>>>24}st.create=nt(),st.alloc=function(q){return new Q.Array(q)},Q.Array!==Array&&(st.alloc=Q.pool(st.alloc,Q.Array.prototype.subarray)),st.prototype._push=function(q,K,z){return this.tail=this.tail.next=new tt(q,K,z),this.len+=K,this},rt.prototype=Object.create(tt.prototype),rt.prototype.fn=function(q,K,z){for(;q>127;)K[z++]=127&q|128,q>>>=7;K[z]=q},st.prototype.uint32=function(q){return this.len+=(this.tail=this.tail.next=new rt((q>>>=0)<128?1:q<16384?2:q<2097152?3:q<268435456?4:5,q)).len,this},st.prototype.int32=function(q){return q<0?this._push(ot,10,X.fromNumber(q)):this.uint32(q)},st.prototype.sint32=function(q){return this.uint32((q<<1^q>>31)>>>0)},st.prototype.uint64=function(q){var K=X.from(q);return this._push(ot,K.length(),K)},st.prototype.int64=st.prototype.uint64,st.prototype.sint64=function(q){var K=X.from(q).zzEncode();return this._push(ot,K.length(),K)},st.prototype.bool=function(q){return this._push(at,1,q?1:0)},st.prototype.fixed32=function(q){return this._push(ht,4,q>>>0)},st.prototype.sfixed32=st.prototype.fixed32,st.prototype.fixed64=function(q){var K=X.from(q);return this._push(ht,4,K.lo)._push(ht,4,K.hi)},st.prototype.sfixed64=st.prototype.fixed64,st.prototype.float=function(q){return this._push(Q.float.writeFloatLE,4,q)},st.prototype.double=function(q){return this._push(Q.float.writeDoubleLE,8,q)};var ct=Q.Array.prototype.set?function(q,K,z){K.set(q,z)}:function(q,K,z){for(var Y=0;Y>>0;if(!K)return this._push(at,1,0);if(Q.isString(q)){var z=st.alloc(K=Z.length(q));Z.decode(q,z,0),q=z}return this.uint32(K)._push(ct,K,q)},st.prototype.string=function(q){var K=J.length(q);return K?this.uint32(K)._push(J.write,K,q):this._push(at,1,0)},st.prototype.fork=function(){return this.states=new it(this),this.head=this.tail=new tt(et,0,0),this.len=0,this},st.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new tt(et,0,0),this.len=0),this},st.prototype.ldelim=function(){var q=this.head,K=this.tail,z=this.len;return this.reset().uint32(z),z&&(this.tail.next=q.next,this.tail=K,this.len+=z),this},st.prototype.finish=function(){for(var q=this.head.next,K=this.constructor.alloc(this.len),z=0;q;)q.fn(q.val,K,z),z+=q.len,q=q.next;return K},st._configure=function(q){Y=q,st.create=nt(),Y._configure()}},60818:(q,K,z)=>{"use strict";q.exports=X;var Y=z(63449);(X.prototype=Object.create(Y.prototype)).constructor=X;var Q=z(93610);function X(){Y.call(this)}function Z(q,K,z){q.length<40?Q.utf8.write(q,K,z):K.utf8Write?K.utf8Write(q,z):K.write(q,z)}X._configure=function(){X.alloc=Q._Buffer_allocUnsafe,X.writeBytesBuffer=Q.Buffer&&Q.Buffer.prototype instanceof Uint8Array&&"set"===Q.Buffer.prototype.set.name?function(q,K,z){K.set(q,z)}:function(q,K,z){if(q.copy)q.copy(K,z,0,q.length);else for(var Y=0;Y>>0;return this.uint32(K),K&&this._push(X.writeBytesBuffer,K,q),this},X.prototype.string=function(q){var K=Q.Buffer.byteLength(q);return this.uint32(K),K&&this._push(Z,K,q),this},X._configure()},9655:function(q,K,z){var Y;q=z.nmd(q),function(Q){K&&K.nodeType,q&&q.nodeType;var X="object"==typeof z.g&&z.g;X.global!==X&&X.window!==X&&X.self;var Z,J=2147483647,tt=36,et=/^xn--/,it=/[^\x20-\x7E]/,st=/[\x2E\u3002\uFF0E\uFF61]/g,nt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},at=Math.floor,rt=String.fromCharCode;function ot(q){throw new RangeError(nt[q])}function ht(q,K){for(var z=q.length,Y=[];z--;)Y[z]=K(q[z]);return Y}function ct(q,K){var z=q.split("@"),Y="";return z.length>1&&(Y=z[0]+"@",q=z[1]),Y+ht((q=q.replace(st,".")).split("."),K).join(".")}function dt(q){for(var K,z,Y=[],Q=0,X=q.length;Q=55296&&K<=56319&&Q65535&&(K+=rt((q-=65536)>>>10&1023|55296),q=56320|1023&q),K+=rt(q)})).join("")}function ut(q,K){return q+22+75*(q<26)-((0!=K)<<5)}function ft(q,K,z){var Y=0;for(q=z?at(q/700):q>>1,q+=at(q/K);q>455;Y+=tt)q=at(q/35);return at(Y+36*q/(q+38))}function bt(q){var K,z,Y,Q,X,Z,et,it,st,nt,rt,ht=[],ct=q.length,dt=0,ut=128,bt=72;for((z=q.lastIndexOf("-"))<0&&(z=0),Y=0;Y=128&&ot("not-basic"),ht.push(q.charCodeAt(Y));for(Q=z>0?z+1:0;Q=ct&&ot("invalid-input"),((it=(rt=q.charCodeAt(Q++))-48<10?rt-22:rt-65<26?rt-65:rt-97<26?rt-97:tt)>=tt||it>at((J-dt)/Z))&&ot("overflow"),dt+=it*Z,!(it<(st=et<=bt?1:et>=bt+26?26:et-bt));et+=tt)Z>at(J/(nt=tt-st))&&ot("overflow"),Z*=nt;bt=ft(dt-X,K=ht.length+1,0==X),at(dt/K)>J-ut&&ot("overflow"),ut+=at(dt/K),dt%=K,ht.splice(dt++,0,ut)}return lt(ht)}function pt(q){var K,z,Y,Q,X,Z,et,it,st,nt,ht,ct,lt,bt,pt,vt=[];for(ct=(q=dt(q)).length,K=128,z=0,X=72,Z=0;Z=K&&htat((J-z)/(lt=Y+1))&&ot("overflow"),z+=(et-K)*lt,K=et,Z=0;ZJ&&ot("overflow"),ht==K){for(it=z,st=tt;!(it<(nt=st<=X?1:st>=X+26?26:st-X));st+=tt)pt=it-nt,bt=tt-nt,vt.push(rt(ut(nt+pt%bt,0))),it=at(pt/bt);vt.push(rt(ut(it,0))),X=ft(z,lt,Y==Q),z=0,++Y}++z,++K}return vt.join("")}Z={version:"1.4.1",ucs2:{decode:dt,encode:lt},decode:bt,encode:pt,toASCII:function(q){return ct(q,(function(q){return it.test(q)?"xn--"+pt(q):q}))},toUnicode:function(q){return ct(q,(function(q){return et.test(q)?bt(q.slice(4).toLowerCase()):q}))}},void 0===(Y=function(){return Z}.call(K,z,K,q))||(q.exports=Y)}()},97283:q=>{self,q.exports=(()=>{var q={192:(q,K)=>{var z,Y,Q=function(){var q=function(q,K){var z=q,Y=Z[K],Q=null,X=0,tt=null,ht=[],ct={},lt=function(q,K){Q=function(q){for(var K=new Array(q),z=0;z=7&&pt(q),null==tt&&(tt=mt(z,Y,ht)),gt(tt,K)},ut=function(q,K){for(var z=-1;z<=7;z+=1)if(!(q+z<=-1||X<=q+z))for(var Y=-1;Y<=7;Y+=1)K+Y<=-1||X<=K+Y||(Q[q+z][K+Y]=0<=z&&z<=6&&(0==Y||6==Y)||0<=Y&&Y<=6&&(0==z||6==z)||2<=z&&z<=4&&2<=Y&&Y<=4)},ft=function(){for(var q=8;q>Y&1);Q[Math.floor(Y/3)][Y%3+X-8-3]=Z}for(Y=0;Y<18;Y+=1)Z=!q&&1==(K>>Y&1),Q[Y%3+X-8-3][Math.floor(Y/3)]=Z},vt=function(q,K){for(var z=Y<<3|K,Z=J.getBCHTypeInfo(z),tt=0;tt<15;tt+=1){var et=!q&&1==(Z>>tt&1);tt<6?Q[tt][8]=et:tt<8?Q[tt+1][8]=et:Q[X-15+tt][8]=et}for(tt=0;tt<15;tt+=1)et=!q&&1==(Z>>tt&1),tt<8?Q[8][X-tt-1]=et:tt<9?Q[8][15-tt-1+1]=et:Q[8][15-tt-1]=et;Q[X-8][8]=!q},gt=function(q,K){for(var z=-1,Y=X-1,Z=7,tt=0,et=J.getMaskFunction(K),it=X-1;it>0;it-=2)for(6==it&&(it-=1);;){for(var st=0;st<2;st+=1)if(null==Q[Y][it-st]){var nt=!1;tt>>Z&1)),et(Y,it-st)&&(nt=!nt),Q[Y][it-st]=nt,-1==(Z-=1)&&(tt+=1,Z=7)}if((Y+=z)<0||X<=Y){Y-=z,z=-z;break}}},mt=function(q,K,z){for(var Y=it.getRSBlocks(q,K),Q=st(),X=0;X8*tt)throw"code length overflow. ("+Q.getLengthInBits()+">"+8*tt+")";for(Q.getLengthInBits()+4<=8*tt&&Q.put(0,4);Q.getLengthInBits()%8!=0;)Q.putBit(!1);for(;!(Q.getLengthInBits()>=8*tt||(Q.put(236,8),Q.getLengthInBits()>=8*tt));)Q.put(17,8);return function(q,K){for(var z=0,Y=0,Q=0,X=new Array(K.length),Z=new Array(K.length),tt=0;tt=0?rt.getAt(ot):0}}var ht=0;for(nt=0;ntY)&&(q=Y,K=z)}return K}())},ct.createTableTag=function(q,K){q=q||2;var z="";z+='',z+="";for(var Y=0;Y";for(var Q=0;Q';z+=""}return(z+="")+"
"},ct.createSvgTag=function(q,K,z,Y){var Q={};"object"==typeof arguments[0]&&(q=(Q=arguments[0]).cellSize,K=Q.margin,z=Q.alt,Y=Q.title),q=q||2,K=void 0===K?4*q:K,(z="string"==typeof z?{text:z}:z||{}).text=z.text||null,z.id=z.text?z.id||"qrcode-description":null,(Y="string"==typeof Y?{text:Y}:Y||{}).text=Y.text||null,Y.id=Y.text?Y.id||"qrcode-title":null;var X,Z,J,tt,et=ct.getModuleCount()*q+2*K,it="";for(tt="l"+q+",0 0,"+q+" -"+q+",0 0,-"+q+"z ",it+=''+yt(Y.text)+"":"",it+=z.text?''+yt(z.text)+"":"",it+='',it+='"},ct.createDataURL=function(q,K){q=q||2,K=void 0===K?4*q:K;var z=ct.getModuleCount()*q+2*K,Y=K,Q=z-K;return dt(z,z,(function(K,z){if(Y<=K&&K"};var yt=function(q){for(var K="",z=0;z":K+=">";break;case"&":K+="&";break;case'"':K+=""";break;default:K+=Y}}return K};return ct.createASCII=function(q,K){if((q=q||1)<2)return function(q){q=void 0===q?2:q;var K,z,Y,Q,X,Z=1*ct.getModuleCount()+2*q,J=q,tt=Z-q,et={"██":"█","█ ":"▀"," █":"▄"," ":" "},it={"██":"▀","█ ":"▀"," █":" "," ":" "},st="";for(K=0;K=tt?it[X]:et[X];st+="\n"}return Z%2&&q>0?st.substring(0,st.length-Z-1)+Array(Z+1).join("▀"):st.substring(0,st.length-1)}(K);q-=1,K=void 0===K?2*q:K;var z,Y,Q,X,Z=ct.getModuleCount()*q+2*K,J=K,tt=Z-K,et=Array(q+1).join("██"),it=Array(q+1).join(" "),st="",nt="";for(z=0;z>>8),K.push(255&Z)):K.push(Y)}}return K}};var K,z,Y,Q,X,Z={L:1,M:0,Q:3,H:2},J=(K=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],z=1335,Y=7973,X=function(q){for(var K=0;0!=q;)K+=1,q>>>=1;return K},(Q={}).getBCHTypeInfo=function(q){for(var K=q<<10;X(K)-X(z)>=0;)K^=z<=0;)K^=Y<5&&(z+=3+X-5)}for(Y=0;Y=256;)K-=255;return q[K]}}}();function et(q,K){if(void 0===q.length)throw q.length+"/"+K;var z=function(){for(var z=0;z>>7-K%8&1)},put:function(q,K){for(var Y=0;Y>>K-Y-1&1))},getLengthInBits:function(){return K},putBit:function(z){var Y=Math.floor(K/8);q.length<=Y&&q.push(0),z&&(q[Y]|=128>>>K%8),K+=1}};return z},nt=function(q){var K=q,z={getMode:function(){return 1},getLength:function(q){return K.length},write:function(q){for(var z=K,Q=0;Q+2>>8&255)+(255&Q),q.put(Q,13),z+=2}if(z>>8)},writeBytes:function(q,z,Y){z=z||0,Y=Y||q.length;for(var Q=0;Q0&&(K+=","),K+=q[z];return K+"]"}};return K},ct=function(q){var K=q,z=0,Y=0,Q=0,X={read:function(){for(;Q<8;){if(z>=K.length){if(0==Q)return-1;throw"unexpected end of file./"+Q}var q=K.charAt(z);if(z+=1,"="==q)return Q=0,-1;q.match(/^\s$/)||(Y=Y<<6|Z(q.charCodeAt(0)),Q+=6)}var X=Y>>>Q-8&255;return Q-=8,X}},Z=function(q){if(65<=q&&q<=90)return q-65;if(97<=q&&q<=122)return q-97+26;if(48<=q&&q<=57)return q-48+52;if(43==q)return 62;if(47==q)return 63;throw"c:"+q};return X},dt=function(q,K,z){for(var Y=function(q,K){var z=q,Y=K,Q=new Array(q*K),X={setPixel:function(q,K,Y){Q[K*z+q]=Y},write:function(q){q.writeString("GIF87a"),q.writeShort(z),q.writeShort(Y),q.writeByte(128),q.writeByte(0),q.writeByte(0),q.writeByte(0),q.writeByte(0),q.writeByte(0),q.writeByte(255),q.writeByte(255),q.writeByte(255),q.writeString(","),q.writeShort(0),q.writeShort(0),q.writeShort(z),q.writeShort(Y),q.writeByte(0);var K=Z(2);q.writeByte(2);for(var Q=0;K.length-Q>255;)q.writeByte(255),q.writeBytes(K,Q,255),Q+=255;q.writeByte(K.length-Q),q.writeBytes(K,Q,K.length-Q),q.writeByte(0),q.writeString(";")}},Z=function(q){for(var K=1<>>K!=0)throw"length over";for(;et+K>=8;)tt.writeByte(255&(q<>>=8-et,it=0,et=0;it|=q<0&&tt.writeByte(it)}});nt.write(K,Y);var at=0,rt=String.fromCharCode(Q[at]);for(at+=1;at=6;)X(q>>>K-6),K-=6},Q.flush=function(){if(K>0&&(X(q<<6-K),q=0,K=0),z%3!=0)for(var Q=3-z%3,Z=0;Z>6,128|63&Y):Y<55296||Y>=57344?K.push(224|Y>>12,128|Y>>6&63,128|63&Y):(z++,Y=65536+((1023&Y)<<10|1023&q.charCodeAt(z)),K.push(240|Y>>18,128|Y>>12&63,128|Y>>6&63,128|63&Y))}return K}(q)},void 0===(Y="function"==typeof(z=function(){return Q})?z.apply(K,[]):z)||(q.exports=Y)},796:(q,K,z)=>{"use strict";z.d(K,{default:()=>jt});var Y=function(){return(Y=Object.assign||function(q){for(var K,z=1,Y=arguments.length;zY||Q&&Q2||Z&&J||tt&&et)this._basicSquare({x:K,y:z,size:Y,context:Q,rotation:0});else{if(2===it){var st=0;return Z&&tt?st=Math.PI/2:tt&&J?st=Math.PI:J&&et&&(st=-Math.PI/2),void this._basicCornerRounded({x:K,y:z,size:Y,context:Q,rotation:st})}if(1===it)return st=0,tt?st=Math.PI/2:J?st=Math.PI:et&&(st=-Math.PI/2),void this._basicSideRounded({x:K,y:z,size:Y,context:Q,rotation:st})}else this._basicDot({x:K,y:z,size:Y,context:Q,rotation:0})},q.prototype._drawExtraRounded=function(q){var K=q.x,z=q.y,Y=q.size,Q=q.context,X=q.getNeighbor,Z=X?+X(-1,0):0,J=X?+X(1,0):0,tt=X?+X(0,-1):0,et=X?+X(0,1):0,it=Z+J+tt+et;if(0!==it)if(it>2||Z&&J||tt&&et)this._basicSquare({x:K,y:z,size:Y,context:Q,rotation:0});else{if(2===it){var st=0;return Z&&tt?st=Math.PI/2:tt&&J?st=Math.PI:J&&et&&(st=-Math.PI/2),void this._basicCornerExtraRounded({x:K,y:z,size:Y,context:Q,rotation:st})}if(1===it)return st=0,tt?st=Math.PI/2:J?st=Math.PI:et&&(st=-Math.PI/2),void this._basicSideRounded({x:K,y:z,size:Y,context:Q,rotation:st})}else this._basicDot({x:K,y:z,size:Y,context:Q,rotation:0})},q.prototype._drawClassy=function(q){var K=q.x,z=q.y,Y=q.size,Q=q.context,X=q.getNeighbor,Z=X?+X(-1,0):0,J=X?+X(1,0):0,tt=X?+X(0,-1):0,et=X?+X(0,1):0;0!==Z+J+tt+et?Z||tt?J||et?this._basicSquare({x:K,y:z,size:Y,context:Q,rotation:0}):this._basicCornerRounded({x:K,y:z,size:Y,context:Q,rotation:Math.PI/2}):this._basicCornerRounded({x:K,y:z,size:Y,context:Q,rotation:-Math.PI/2}):this._basicCornersRounded({x:K,y:z,size:Y,context:Q,rotation:Math.PI/2})},q.prototype._drawClassyRounded=function(q){var K=q.x,z=q.y,Y=q.size,Q=q.context,X=q.getNeighbor,Z=X?+X(-1,0):0,J=X?+X(1,0):0,tt=X?+X(0,-1):0,et=X?+X(0,1):0;0!==Z+J+tt+et?Z||tt?J||et?this._basicSquare({x:K,y:z,size:Y,context:Q,rotation:0}):this._basicCornerExtraRounded({x:K,y:z,size:Y,context:Q,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:K,y:z,size:Y,context:Q,rotation:-Math.PI/2}):this._basicCornersRounded({x:K,y:z,size:Y,context:Q,rotation:Math.PI/2})},q}(),dt="square",lt="extra-rounded";var ut=function(){return(ut=Object.assign||function(q){for(var K,z=1,Y=arguments.length;z0&&Q[Q.length-1])||6!==X[0]&&2!==X[0])){Z=0;continue}if(3===X[0]&&(!Q||X[1]>Q[0]&&X[1]=(K-Q.hideXDots)/2&&q<(K+Q.hideXDots)/2&&z>=(K-Q.hideYDots)/2&&z<(K+Q.hideYDots)/2||(null===(Y=mt[q])||void 0===Y?void 0:Y[z])||(null===(X=mt[q-K+7])||void 0===X?void 0:X[z])||(null===(Z=mt[q])||void 0===Z?void 0:Z[z-K+7])||(null===(J=yt[q])||void 0===J?void 0:J[z])||(null===(tt=yt[q-K+7])||void 0===tt?void 0:tt[z])||(null===(et=yt[q])||void 0===et?void 0:et[z-K+7]))})),this.drawCorners(),this._options.image&&this.drawImage({width:Q.width,height:Q.height,count:K,dotSize:Y}),[2]}}))},new((Y=void 0)||(Y=Promise))((function(q,X){function Z(q){try{tt(Q.next(q))}catch(q){X(q)}}function J(q){try{tt(Q.throw(q))}catch(q){X(q)}}function tt(K){var z;K.done?q(K.value):(z=K.value,z instanceof Y?z:new Y((function(q){q(z)}))).then(Z,J)}tt((Q=Q.apply(K,z||[])).next())}));var K,z,Y,Q},q.prototype.drawBackground=function(){var q=this.context,K=this._options;if(q){if(K.backgroundOptions.gradient){var z=K.backgroundOptions.gradient,Y=this._createGradient({context:q,options:z,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});z.colorStops.forEach((function(q){var K=q.offset,z=q.color;Y.addColorStop(K,z)})),q.fillStyle=Y}else K.backgroundOptions.color&&(q.fillStyle=K.backgroundOptions.color);q.fillRect(0,0,this._canvas.width,this._canvas.height)}},q.prototype.drawDots=function(q){var K=this;if(!this._qr)throw"QR code is not defined";var z=this.context;if(!z)throw"QR code is not defined";var Y=this._options,Q=this._qr.getModuleCount();if(Q>Y.width||Q>Y.height)throw"The canvas is too small.";var X=Math.min(Y.width,Y.height)-2*Y.margin,Z=Math.floor(X/Q),J=Math.floor((Y.width-Q*Z)/2),tt=Math.floor((Y.height-Q*Z)/2),et=new ct({context:z,type:Y.dotsOptions.type});z.beginPath();for(var it=function(z){for(var Y=function(Y){return q&&!q(z,Y)?"continue":st._qr.isDark(z,Y)?void et.draw(J+z*Z,tt+Y*Z,Z,(function(X,Z){return!(z+X<0||Y+Z<0||z+X>=Q||Y+Z>=Q)&&!(q&&!q(z+X,Y+Z))&&!!K._qr&&K._qr.isDark(z+X,Y+Z)})):"continue"},X=0;X=0&&et<=.25*Math.PI||et>1.75*Math.PI&&et<=2*Math.PI?(it-=J/2,st-=J/2*Math.tan(tt),nt+=J/2,at+=J/2*Math.tan(tt)):et>.25*Math.PI&&et<=.75*Math.PI?(st-=J/2,it-=J/2/Math.tan(tt),at+=J/2,nt+=J/2/Math.tan(tt)):et>.75*Math.PI&&et<=1.25*Math.PI?(it+=J/2,st+=J/2*Math.tan(tt),nt-=J/2,at-=J/2*Math.tan(tt)):et>1.25*Math.PI&&et<=1.75*Math.PI&&(st+=J/2,it+=J/2/Math.tan(tt),at-=J/2,nt-=J/2/Math.tan(tt)),K=z.createLinearGradient(Math.round(it),Math.round(st),Math.round(nt),Math.round(at))}return K},q}();var Et=function(){return(Et=Object.assign||function(q){for(var K,z=1,Y=arguments.length;z2||X&&Z||J&&tt)this._basicSquare({x:K,y:z,size:Y,rotation:0});else{if(2===et){var it=0;return X&&J?it=Math.PI/2:J&&Z?it=Math.PI:Z&&tt&&(it=-Math.PI/2),void this._basicCornerRounded({x:K,y:z,size:Y,rotation:it})}if(1===et)return it=0,J?it=Math.PI/2:Z?it=Math.PI:tt&&(it=-Math.PI/2),void this._basicSideRounded({x:K,y:z,size:Y,rotation:it})}else this._basicDot({x:K,y:z,size:Y,rotation:0})},q.prototype._drawExtraRounded=function(q){var K=q.x,z=q.y,Y=q.size,Q=q.getNeighbor,X=Q?+Q(-1,0):0,Z=Q?+Q(1,0):0,J=Q?+Q(0,-1):0,tt=Q?+Q(0,1):0,et=X+Z+J+tt;if(0!==et)if(et>2||X&&Z||J&&tt)this._basicSquare({x:K,y:z,size:Y,rotation:0});else{if(2===et){var it=0;return X&&J?it=Math.PI/2:J&&Z?it=Math.PI:Z&&tt&&(it=-Math.PI/2),void this._basicCornerExtraRounded({x:K,y:z,size:Y,rotation:it})}if(1===et)return it=0,J?it=Math.PI/2:Z?it=Math.PI:tt&&(it=-Math.PI/2),void this._basicSideRounded({x:K,y:z,size:Y,rotation:it})}else this._basicDot({x:K,y:z,size:Y,rotation:0})},q.prototype._drawClassy=function(q){var K=q.x,z=q.y,Y=q.size,Q=q.getNeighbor,X=Q?+Q(-1,0):0,Z=Q?+Q(1,0):0,J=Q?+Q(0,-1):0,tt=Q?+Q(0,1):0;0!==X+Z+J+tt?X||J?Z||tt?this._basicSquare({x:K,y:z,size:Y,rotation:0}):this._basicCornerRounded({x:K,y:z,size:Y,rotation:Math.PI/2}):this._basicCornerRounded({x:K,y:z,size:Y,rotation:-Math.PI/2}):this._basicCornersRounded({x:K,y:z,size:Y,rotation:Math.PI/2})},q.prototype._drawClassyRounded=function(q){var K=q.x,z=q.y,Y=q.size,Q=q.getNeighbor,X=Q?+Q(-1,0):0,Z=Q?+Q(1,0):0,J=Q?+Q(0,-1):0,tt=Q?+Q(0,1):0;0!==X+Z+J+tt?X||J?Z||tt?this._basicSquare({x:K,y:z,size:Y,rotation:0}):this._basicCornerExtraRounded({x:K,y:z,size:Y,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:K,y:z,size:Y,rotation:-Math.PI/2}):this._basicCornersRounded({x:K,y:z,size:Y,rotation:Math.PI/2})},q}();var Tt=function(){return(Tt=Object.assign||function(q){for(var K,z=1,Y=arguments.length;z0&&Q[Q.length-1])||6!==X[0]&&2!==X[0])){Z=0;continue}if(3===X[0]&&(!Q||X[1]>Q[0]&&X[1]=(K-Q.hideXDots)/2&&q<(K+Q.hideXDots)/2&&z>=(K-Q.hideYDots)/2&&z<(K+Q.hideYDots)/2||(null===(Y=Ot[q])||void 0===Y?void 0:Y[z])||(null===(X=Ot[q-K+7])||void 0===X?void 0:X[z])||(null===(Z=Ot[q])||void 0===Z?void 0:Z[z-K+7])||(null===(J=It[q])||void 0===J?void 0:J[z])||(null===(tt=It[q-K+7])||void 0===tt?void 0:tt[z])||(null===(et=It[q])||void 0===et?void 0:et[z-K+7]))})),this.drawCorners(),this._options.image&&this.drawImage({width:Q.width,height:Q.height,count:K,dotSize:Y}),[2]}}))},new((Y=void 0)||(Y=Promise))((function(q,X){function Z(q){try{tt(Q.next(q))}catch(q){X(q)}}function J(q){try{tt(Q.throw(q))}catch(q){X(q)}}function tt(K){var z;K.done?q(K.value):(z=K.value,z instanceof Y?z:new Y((function(q){q(z)}))).then(Z,J)}tt((Q=Q.apply(K,z||[])).next())}));var K,z,Y,Q},q.prototype.drawBackground=function(){var q,K,z=this._element,Y=this._options;if(z){var Q=null===(q=Y.backgroundOptions)||void 0===q?void 0:q.gradient,X=null===(K=Y.backgroundOptions)||void 0===K?void 0:K.color;(Q||X)&&this._createColor({options:Q,color:X,additionalRotation:0,x:0,y:0,height:Y.height,width:Y.width,name:"background-color"})}},q.prototype.drawDots=function(q){var K,z,Y=this;if(!this._qr)throw"QR code is not defined";var Q=this._options,X=this._qr.getModuleCount();if(X>Q.width||X>Q.height)throw"The canvas is too small.";var Z=Math.min(Q.width,Q.height)-2*Q.margin,J=Math.floor(Z/X),tt=Math.floor((Q.width-X*J)/2),et=Math.floor((Q.height-X*J)/2),it=new wt({svg:this._element,type:Q.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(K=Q.dotsOptions)||void 0===K?void 0:K.gradient,color:Q.dotsOptions.color,additionalRotation:0,x:tt,y:et,height:X*J,width:X*J,name:"dot-color"});for(var st=function(K){for(var Q=function(Q){return q&&!q(K,Q)?"continue":(null===(z=nt._qr)||void 0===z?void 0:z.isDark(K,Q))?(it.draw(tt+K*J,et+Q*J,J,(function(z,Z){return!(K+z<0||Q+Z<0||K+z>=X||Q+Z>=X)&&!(q&&!q(K+z,Q+Z))&&!!Y._qr&&Y._qr.isDark(K+z,Q+Z)})),void(it._element&&nt._dotsClipPath&&nt._dotsClipPath.appendChild(it._element))):"continue"},Z=0;ZZ?J:Z,it=document.createElementNS("http://www.w3.org/2000/svg","rect");if(it.setAttribute("x",String(Q)),it.setAttribute("y",String(X)),it.setAttribute("height",String(Z)),it.setAttribute("width",String(J)),it.setAttribute("clip-path","url('#clip-path-"+tt+"')"),K){var st;if(K.type===gt)(st=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",tt),st.setAttribute("gradientUnits","userSpaceOnUse"),st.setAttribute("fx",String(Q+J/2)),st.setAttribute("fy",String(X+Z/2)),st.setAttribute("cx",String(Q+J/2)),st.setAttribute("cy",String(X+Z/2)),st.setAttribute("r",String(et/2));else{var nt=((K.rotation||0)+Y)%(2*Math.PI),at=(nt+2*Math.PI)%(2*Math.PI),rt=Q+J/2,ot=X+Z/2,ht=Q+J/2,ct=X+Z/2;at>=0&&at<=.25*Math.PI||at>1.75*Math.PI&&at<=2*Math.PI?(rt-=J/2,ot-=Z/2*Math.tan(nt),ht+=J/2,ct+=Z/2*Math.tan(nt)):at>.25*Math.PI&&at<=.75*Math.PI?(ot-=Z/2,rt-=J/2/Math.tan(nt),ct+=Z/2,ht+=J/2/Math.tan(nt)):at>.75*Math.PI&&at<=1.25*Math.PI?(rt+=J/2,ot+=Z/2*Math.tan(nt),ht-=J/2,ct-=Z/2*Math.tan(nt)):at>1.25*Math.PI&&at<=1.75*Math.PI&&(ot+=Z/2,rt+=J/2/Math.tan(nt),ct-=Z/2,ht-=J/2/Math.tan(nt)),(st=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",tt),st.setAttribute("gradientUnits","userSpaceOnUse"),st.setAttribute("x1",String(Math.round(rt))),st.setAttribute("y1",String(Math.round(ot))),st.setAttribute("x2",String(Math.round(ht))),st.setAttribute("y2",String(Math.round(ct)))}K.colorStops.forEach((function(q){var K=q.offset,z=q.color,Y=document.createElementNS("http://www.w3.org/2000/svg","stop");Y.setAttribute("offset",100*K+"%"),Y.setAttribute("stop-color",z),st.appendChild(Y)})),it.setAttribute("fill","url('#"+tt+"')"),this._defs.appendChild(st)}else z&&it.setAttribute("fill",z);this._element.appendChild(it)},q}(),Rt="canvas";for(var Pt={},Mt=0;Mt<=40;Mt++)Pt[Mt]=Mt;const Nt={type:Rt,width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:Pt[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{color:"#fff"}};var xt=function(){return(xt=Object.assign||function(q){for(var K,z=1,Y=arguments.length;zMath.min(K.width,K.height)&&(K.margin=Math.min(K.width,K.height)),K.dotsOptions=xt({},K.dotsOptions),K.dotsOptions.gradient&&(K.dotsOptions.gradient=Lt(K.dotsOptions.gradient)),K.cornersSquareOptions&&(K.cornersSquareOptions=xt({},K.cornersSquareOptions),K.cornersSquareOptions.gradient&&(K.cornersSquareOptions.gradient=Lt(K.cornersSquareOptions.gradient))),K.cornersDotOptions&&(K.cornersDotOptions=xt({},K.cornersDotOptions),K.cornersDotOptions.gradient&&(K.cornersDotOptions.gradient=Lt(K.cornersDotOptions.gradient))),K.backgroundOptions&&(K.backgroundOptions=xt({},K.backgroundOptions),K.backgroundOptions.gradient&&(K.backgroundOptions.gradient=Lt(K.backgroundOptions.gradient))),K}var Bt=z(192),Ut=z.n(Bt),Ft=function(q,K,z,Y){return new(z||(z=Promise))((function(Q,X){function Z(q){try{tt(Y.next(q))}catch(q){X(q)}}function J(q){try{tt(Y.throw(q))}catch(q){X(q)}}function tt(q){var K;q.done?Q(q.value):(K=q.value,K instanceof z?K:new z((function(q){q(K)}))).then(Z,J)}tt((Y=Y.apply(q,K||[])).next())}))},Gt=function(q,K){var z,Y,Q,X,Z={label:0,sent:function(){if(1&Q[0])throw Q[1];return Q[1]},trys:[],ops:[]};return X={next:J(0),throw:J(1),return:J(2)},"function"==typeof Symbol&&(X[Symbol.iterator]=function(){return this}),X;function J(X){return function(J){return function(X){if(z)throw new TypeError("Generator is already executing.");for(;Z;)try{if(z=1,Y&&(Q=2&X[0]?Y.return:X[0]?Y.throw||((Q=Y.return)&&Q.call(Y),0):Y.next)&&!(Q=Q.call(Y,X[1])).done)return Q;switch(Y=0,Q&&(X=[2&X[0],Q.value]),X[0]){case 0:case 1:Q=X;break;case 4:return Z.label++,{value:X[1],done:!1};case 5:Z.label++,Y=X[1],X=[0];continue;case 7:X=Z.ops.pop(),Z.trys.pop();continue;default:if(!((Q=(Q=Z.trys).length>0&&Q[Q.length-1])||6!==X[0]&&2!==X[0])){Z=0;continue}if(3===X[0]&&(!Q||X[1]>Q[0]&&X[1]\r\n'+Y],{type:"image/svg+xml"})]):[2,new Promise((function(z){return K.getCanvas().toBlob(z,"image/"+q,1)}))]}}))}))},q.prototype.download=function(q){return Ft(this,void 0,void 0,(function(){var K,z,Y,Q,X;return Gt(this,(function(Z){switch(Z.label){case 0:if(!this._qr)throw"QR code is empty";return K="png",z="qr","string"==typeof q?(K=q,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof q&&null!==q&&(q.name&&(z=q.name),q.extension&&(K=q.extension)),[4,this._getQRStylingElement(K)];case 1:return Y=Z.sent(),"svg"===K.toLowerCase()?(Q=new XMLSerializer,X='\r\n'+(X=Q.serializeToString(Y.getElement())),J("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(X),z+".svg")):J(Y.getCanvas().toDataURL("image/"+K),z+"."+K),[2]}}))}))},q}()}},K={};function z(Y){if(K[Y])return K[Y].exports;var Q=K[Y]={exports:{}};return q[Y](Q,Q.exports,z),Q.exports}return z.n=q=>{var K=q&&q.__esModule?()=>q.default:()=>q;return z.d(K,{a:K}),K},z.d=(q,K)=>{for(var Y in K)z.o(K,Y)&&!z.o(q,Y)&&Object.defineProperty(q,Y,{enumerable:!0,get:K[Y]})},z.o=(q,K)=>Object.prototype.hasOwnProperty.call(q,K),z(796)})().default},74765:q=>{"use strict";var K=String.prototype.replace,z=/%20/g,Y="RFC1738",Q="RFC3986";q.exports={default:Q,formatters:{RFC1738:function(q){return K.call(q,z,"+")},RFC3986:function(q){return String(q)}},RFC1738:Y,RFC3986:Q}},55373:(q,K,z)=>{"use strict";var Y=z(98636),Q=z(62642),X=z(74765);q.exports={formats:X,parse:Q,stringify:Y}},62642:(q,K,z)=>{"use strict";var Y=z(37720),Q=Object.prototype.hasOwnProperty,X=Array.isArray,Z={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Y.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},J=function(q){return q.replace(/&#(\d+);/g,(function(q,K){return String.fromCharCode(parseInt(K,10))}))},tt=function(q,K){return q&&"string"==typeof q&&K.comma&&q.indexOf(",")>-1?q.split(","):q},et=function(q,K,z,Y){if(q){var X=z.allowDots?q.replace(/\.([^.[]+)/g,"[$1]"):q,Z=/(\[[^[\]]*])/g,J=z.depth>0&&/(\[[^[\]]*])/.exec(X),et=J?X.slice(0,J.index):X,it=[];if(et){if(!z.plainObjects&&Q.call(Object.prototype,et)&&!z.allowPrototypes)return;it.push(et)}for(var st=0;z.depth>0&&null!==(J=Z.exec(X))&&st=0;--X){var Z,J=q[X];if("[]"===J&&z.parseArrays)Z=z.allowEmptyArrays&&(""===Q||z.strictNullHandling&&null===Q)?[]:[].concat(Q);else{Z=z.plainObjects?Object.create(null):{};var et="["===J.charAt(0)&&"]"===J.charAt(J.length-1)?J.slice(1,-1):J,it=z.decodeDotInKeys?et.replace(/%2E/g,"."):et,st=parseInt(it,10);z.parseArrays||""!==it?!isNaN(st)&&J!==it&&String(st)===it&&st>=0&&z.parseArrays&&st<=z.arrayLimit?(Z=[])[st]=Q:"__proto__"!==it&&(Z[it]=Q):Z={0:Q}}Q=Z}return Q}(it,K,z,Y)}};q.exports=function(q,K){var z=function(q){if(!q)return Z;if(void 0!==q.allowEmptyArrays&&"boolean"!=typeof q.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==q.decodeDotInKeys&&"boolean"!=typeof q.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==q.decoder&&void 0!==q.decoder&&"function"!=typeof q.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==q.charset&&"utf-8"!==q.charset&&"iso-8859-1"!==q.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var K=void 0===q.charset?Z.charset:q.charset,z=void 0===q.duplicates?Z.duplicates:q.duplicates;if("combine"!==z&&"first"!==z&&"last"!==z)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===q.allowDots?!0===q.decodeDotInKeys||Z.allowDots:!!q.allowDots,allowEmptyArrays:"boolean"==typeof q.allowEmptyArrays?!!q.allowEmptyArrays:Z.allowEmptyArrays,allowPrototypes:"boolean"==typeof q.allowPrototypes?q.allowPrototypes:Z.allowPrototypes,allowSparse:"boolean"==typeof q.allowSparse?q.allowSparse:Z.allowSparse,arrayLimit:"number"==typeof q.arrayLimit?q.arrayLimit:Z.arrayLimit,charset:K,charsetSentinel:"boolean"==typeof q.charsetSentinel?q.charsetSentinel:Z.charsetSentinel,comma:"boolean"==typeof q.comma?q.comma:Z.comma,decodeDotInKeys:"boolean"==typeof q.decodeDotInKeys?q.decodeDotInKeys:Z.decodeDotInKeys,decoder:"function"==typeof q.decoder?q.decoder:Z.decoder,delimiter:"string"==typeof q.delimiter||Y.isRegExp(q.delimiter)?q.delimiter:Z.delimiter,depth:"number"==typeof q.depth||!1===q.depth?+q.depth:Z.depth,duplicates:z,ignoreQueryPrefix:!0===q.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof q.interpretNumericEntities?q.interpretNumericEntities:Z.interpretNumericEntities,parameterLimit:"number"==typeof q.parameterLimit?q.parameterLimit:Z.parameterLimit,parseArrays:!1!==q.parseArrays,plainObjects:"boolean"==typeof q.plainObjects?q.plainObjects:Z.plainObjects,strictDepth:"boolean"==typeof q.strictDepth?!!q.strictDepth:Z.strictDepth,strictNullHandling:"boolean"==typeof q.strictNullHandling?q.strictNullHandling:Z.strictNullHandling}}(K);if(""===q||null==q)return z.plainObjects?Object.create(null):{};for(var it="string"==typeof q?function(q,K){var z={__proto__:null},et=K.ignoreQueryPrefix?q.replace(/^\?/,""):q;et=et.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var it,st=K.parameterLimit===1/0?void 0:K.parameterLimit,nt=et.split(K.delimiter,st),at=-1,rt=K.charset;if(K.charsetSentinel)for(it=0;it-1&&(ht=X(ht)?[ht]:ht);var ut=Q.call(z,ot);ut&&"combine"===K.duplicates?z[ot]=Y.combine(z[ot],ht):ut&&"last"!==K.duplicates||(z[ot]=ht)}return z}(q,z):q,st=z.plainObjects?Object.create(null):{},nt=Object.keys(it),at=0;at{"use strict";var Y=z(920),Q=z(37720),X=z(74765),Z=Object.prototype.hasOwnProperty,J={brackets:function(q){return q+"[]"},comma:"comma",indices:function(q,K){return q+"["+K+"]"},repeat:function(q){return q}},tt=Array.isArray,et=Array.prototype.push,it=function(q,K){et.apply(q,tt(K)?K:[K])},st=Date.prototype.toISOString,nt=X.default,at={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Q.encode,encodeValuesOnly:!1,format:nt,formatter:X.formatters[nt],indices:!1,serializeDate:function(q){return st.call(q)},skipNulls:!1,strictNullHandling:!1},rt={},ot=function q(K,z,X,Z,J,et,st,nt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt){for(var gt,mt=K,yt=vt,_t=0,Et=!1;void 0!==(yt=yt.get(rt))&&!Et;){var wt=yt.get(K);if(_t+=1,void 0!==wt){if(wt===_t)throw new RangeError("Cyclic object value");Et=!0}void 0===yt.get(rt)&&(_t=0)}if("function"==typeof ht?mt=ht(z,mt):mt instanceof Date?mt=lt(mt):"comma"===X&&tt(mt)&&(mt=Q.maybeMap(mt,(function(q){return q instanceof Date?lt(q):q}))),null===mt){if(et)return ot&&!bt?ot(z,at.encoder,pt,"key",ut):z;mt=""}if("string"==typeof(gt=mt)||"number"==typeof gt||"boolean"==typeof gt||"symbol"==typeof gt||"bigint"==typeof gt||Q.isBuffer(mt))return ot?[ft(bt?z:ot(z,at.encoder,pt,"key",ut))+"="+ft(ot(mt,at.encoder,pt,"value",ut))]:[ft(z)+"="+ft(String(mt))];var Tt,St=[];if(void 0===mt)return St;if("comma"===X&&tt(mt))bt&&ot&&(mt=Q.maybeMap(mt,ot)),Tt=[{value:mt.length>0?mt.join(",")||null:void 0}];else if(tt(ht))Tt=ht;else{var At=Object.keys(mt);Tt=ct?At.sort(ct):At}var Ct=nt?z.replace(/\./g,"%2E"):z,Ot=Z&&tt(mt)&&1===mt.length?Ct+"[]":Ct;if(J&&tt(mt)&&0===mt.length)return Ot+"[]";for(var It=0;It0?ut+lt:""}},37720:(q,K,z)=>{"use strict";var Y=z(74765),Q=Object.prototype.hasOwnProperty,X=Array.isArray,Z=function(){for(var q=[],K=0;K<256;++K)q.push("%"+((K<16?"0":"")+K.toString(16)).toUpperCase());return q}(),J=function(q,K){for(var z=K&&K.plainObjects?Object.create(null):{},Y=0;Y1;){var K=q.pop(),z=K.obj[K.prop];if(X(z)){for(var Y=[],Q=0;Q=tt?J.slice(it,it+tt):J,nt=[],at=0;at=48&&rt<=57||rt>=65&&rt<=90||rt>=97&&rt<=122||X===Y.RFC1738&&(40===rt||41===rt)?nt[nt.length]=st.charAt(at):rt<128?nt[nt.length]=Z[rt]:rt<2048?nt[nt.length]=Z[192|rt>>6]+Z[128|63&rt]:rt<55296||rt>=57344?nt[nt.length]=Z[224|rt>>12]+Z[128|rt>>6&63]+Z[128|63&rt]:(at+=1,rt=65536+((1023&rt)<<10|1023&st.charCodeAt(at)),nt[nt.length]=Z[240|rt>>18]+Z[128|rt>>12&63]+Z[128|rt>>6&63]+Z[128|63&rt])}et+=nt.join("")}return et},isBuffer:function(q){return!(!q||"object"!=typeof q)&&!!(q.constructor&&q.constructor.isBuffer&&q.constructor.isBuffer(q))},isRegExp:function(q){return"[object RegExp]"===Object.prototype.toString.call(q)},maybeMap:function(q,K){if(X(q)){for(var z=[],Y=0;Y{"use strict";var Y=z(24280),Q=z(45228),X=z(30454);function Z(q,K){return K.encode?K.strict?Y(q):encodeURIComponent(q):q}function J(q){return Array.isArray(q)?q.sort():"object"==typeof q?J(Object.keys(q)).sort((function(q,K){return Number(q)-Number(K)})).map((function(K){return q[K]})):q}K.qg=function(q,K){var z=function(q){var K;switch(q.arrayFormat){case"index":return function(q,z,Y){K=/\[(\d*)\]$/.exec(q),q=q.replace(/\[\d*\]$/,""),K?(void 0===Y[q]&&(Y[q]={}),Y[q][K[1]]=z):Y[q]=z};case"bracket":return function(q,z,Y){K=/(\[\])$/.exec(q),q=q.replace(/\[\]$/,""),K?void 0!==Y[q]?Y[q]=[].concat(Y[q],z):Y[q]=[z]:Y[q]=z};default:return function(q,K,z){void 0!==z[q]?z[q]=[].concat(z[q],K):z[q]=K}}}(K=Q({arrayFormat:"none"},K)),Y=Object.create(null);return"string"!=typeof q?Y:(q=q.trim().replace(/^(\?|#|&)/,""))?(q.split("&").forEach((function(q){var K=q.replace(/\+/g," ").split("="),Q=K.shift(),Z=K.length>0?K.join("="):void 0;Z=void 0===Z?null:X(Z),z(X(Q),Z,Y)})),Object.keys(Y).sort().reduce((function(q,K){var z=Y[K];return Boolean(z)&&"object"==typeof z&&!Array.isArray(z)?q[K]=J(z):q[K]=z,q}),Object.create(null))):Y}},99721:(q,K,z)=>{"use strict";var Y=z(36556),Q=z(14035),X=Y("RegExp.prototype.exec"),Z=z(69675);q.exports=function(q){if(!Q(q))throw new Z("`regex` must be a RegExp");return function(K){return null!==X(q,K)}}},87566:q=>{q.exports=function(q){var K=[],z=[];return function q(Y,Q){var X,Z,J;if(!("object"!=typeof Y||null===Y||Y instanceof Boolean||Y instanceof Date||Y instanceof Number||Y instanceof RegExp||Y instanceof String)){for(X=0;X{const Y=z(87566),Q=function(){return!this}();function X(q,K){this.name="AuthTokenExpiredError",this.message=q,this.expiry=K,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function Z(q){this.name="AuthTokenInvalidError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function J(q,K){this.name="AuthTokenNotBeforeError",this.message=q,this.date=K,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function tt(q){this.name="AuthTokenError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function et(q){this.name="AuthError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function it(q,K){this.name="SilentMiddlewareBlockedError",this.message=q,this.type=K,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function st(q){this.name="InvalidActionError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function nt(q){this.name="InvalidArgumentsError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function at(q){this.name="InvalidOptionsError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function rt(q){this.name="InvalidMessageError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function ot(q,K){this.name="SocketProtocolError",this.message=q,this.code=K,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function ht(q){this.name="ServerProtocolError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function ct(q){this.name="HTTPServerError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function dt(q){this.name="ResourceLimitError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function lt(q){this.name="TimeoutError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function ut(q,K,z,Y){this.name="BadConnectionError",this.message=q,this.type=K,this.code=z||1001,this.reason=Y||gt[this.code]||"",Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function ft(q){this.name="BrokerError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function bt(q,K){this.name="ProcessExitError",this.message=q,this.code=K,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function pt(q){this.name="UnknownError",this.message=q,Error.captureStackTrace&&!Q?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}X.prototype=Object.create(Error.prototype),Z.prototype=Object.create(Error.prototype),J.prototype=Object.create(Error.prototype),tt.prototype=Object.create(Error.prototype),et.prototype=Object.create(Error.prototype),it.prototype=Object.create(Error.prototype),st.prototype=Object.create(Error.prototype),nt.prototype=Object.create(Error.prototype),at.prototype=Object.create(Error.prototype),rt.prototype=Object.create(Error.prototype),ot.prototype=Object.create(Error.prototype),ht.prototype=Object.create(Error.prototype),ct.prototype=Object.create(Error.prototype),dt.prototype=Object.create(Error.prototype),lt.prototype=Object.create(Error.prototype),ut.prototype=Object.create(Error.prototype),ft.prototype=Object.create(Error.prototype),bt.prototype=Object.create(Error.prototype),pt.prototype=Object.create(Error.prototype),q.exports={AuthTokenExpiredError:X,AuthTokenInvalidError:Z,AuthTokenNotBeforeError:J,AuthTokenError:tt,AuthError:et,SilentMiddlewareBlockedError:it,InvalidActionError:st,InvalidArgumentsError:nt,InvalidOptionsError:at,InvalidMessageError:rt,SocketProtocolError:ot,ServerProtocolError:ht,HTTPServerError:ct,ResourceLimitError:dt,TimeoutError:lt,BadConnectionError:ut,BrokerError:ft,ProcessExitError:bt,UnknownError:pt};const vt={1001:"Socket was disconnected",1002:"A WebSocket protocol error was encountered",1003:"Server terminated socket because it received invalid data",1005:"Socket closed without status code",1006:"Socket hung up",1007:"Message format was incorrect",1008:"Encountered a policy violation",1009:"Message was too big to process",1010:"Client ended the connection because the server did not comply with extension requirements",1011:"Server encountered an unexpected fatal condition",4e3:"Server ping timed out",4001:"Client pong timed out",4002:"Server failed to sign auth token",4003:"Failed to complete handshake",4004:"Client failed to save auth token",4005:"Did not receive #handshake from client before timeout",4006:"Failed to bind socket to message broker",4007:"Client connection establishment timed out",4008:"Server rejected handshake from client",4009:"Server received a message before the client handshake"},gt={1e3:"Socket closed normally",1001:vt[1001]};q.exports.socketProtocolErrorStatuses=vt,q.exports.socketProtocolIgnoreStatuses=gt,q.exports.dehydrateError=function(q){let K;if(q&&"object"==typeof q){K={message:q.message};for(let z of Object.keys(q))K[z]=q[z]}else K="function"==typeof q?"[function "+("string"==typeof q.name?q.name:"anonymous")+"]":q;return Y(K)},q.exports.hydrateError=function(q){let K=null;if(null!=q)if("object"==typeof q){K=new Error("string"==typeof q.message?q.message:"Invalid error message format"),"string"==typeof q.name&&(K.name=q.name);for(let z of Object.keys(q))void 0===K[z]&&(K[z]=q[z])}else K=q;return K},q.exports.decycle=Y},87916:q=>{const K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",z=/^[ \n\r\t]*[{\[]/;let Y=function(q){let z=new Uint8Array(q),Y=z.length,Q="";for(let X=0;X>2],Q+=K[(3&z[X])<<4|z[X+1]>>4],Q+=K[(15&z[X+1])<<2|z[X+2]>>6],Q+=K[63&z[X+2]];return Y%3==2?Q=Q.substring(0,Q.length-1)+"=":Y%3==1&&(Q=Q.substring(0,Q.length-2)+"=="),Q},Q=function(q,K){if("undefined"!=typeof ArrayBuffer&&K instanceof ArrayBuffer)return{base64:!0,data:Y(K)};if("undefined"!=typeof Buffer){if(K instanceof Buffer)return{base64:!0,data:K.toString("base64")};if(K&&"Buffer"===K.type&&Array.isArray(K.data)){let q;return q=Buffer.from?Buffer.from(K.data):new Buffer(K.data),{base64:!0,data:q.toString("base64")}}}return K};q.exports.decode=function(q){if(null==q)return null;if("#1"===q||"#2"===q)return q;let K=q.toString();if(!z.test(K))return K;try{return JSON.parse(K)}catch(Y){}return K},q.exports.encode=function(q){return"#1"===q||"#2"===q?q:JSON.stringify(q,Q)}},43924:(q,K,z)=>{"use strict";var Y=256,Q=[],X=void 0===z.g?window:z.g,Z=Math.pow(Y,6),J=Math.pow(2,52),tt=2*J,et=255,it=Math.random;function st(q){var K,z=q.length,Q=this,X=0,Z=Q.i=Q.j=0,J=Q.S=[];for(z||(q=[z++]);X=tt;)q/=2,K/=2,z>>>=1;return(q+z)/K}},q.exports.resetGlobal=function(){Math.random=it},at(Math.random(),Q)},96897:(q,K,z)=>{"use strict";var Y=z(70453),Q=z(30041),X=z(30592)(),Z=z(75795),J=z(69675),tt=Y("%Math.floor%");q.exports=function(q,K){if("function"!=typeof q)throw new J("`fn` is not a function");if("number"!=typeof K||K<0||K>4294967295||tt(K)!==K)throw new J("`length` must be a positive 32-bit integer");var z=arguments.length>2&&!!arguments[2],Y=!0,et=!0;if("length"in q&&Z){var it=Z(q,"length");it&&!it.configurable&&(Y=!1),it&&!it.writable&&(et=!1)}return(Y||et||!z)&&(X?Q(q,"length",K,!0,!0):Q(q,"length",K)),q}},84427:(q,K,z)=>{"use strict";const Y=Symbol.prototype.valueOf,Q=z(2149);q.exports=function(q,K){switch(Q(q)){case"array":return q.slice();case"object":return Object.assign({},q);case"date":return new q.constructor(Number(q));case"map":return new Map(q);case"set":return new Set(q);case"buffer":return function(q){const K=q.length,z=Buffer.allocUnsafe?Buffer.allocUnsafe(K):Buffer.from(K);return q.copy(z),z}(q);case"symbol":return function(q){return Y?Object(Y.call(q)):{}}(q);case"arraybuffer":return function(q){const K=new q.constructor(q.byteLength);return new Uint8Array(K).set(new Uint8Array(q)),K}(q);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(q,K){return new q.constructor(q.buffer,q.byteOffset,q.length)}(q);case"regexp":return function(q){const K=void 0!==q.flags?q.flags:/\w+$/.exec(q)||void 0,z=new q.constructor(q.source,K);return z.lastIndex=q.lastIndex,z}(q);case"error":return Object.create(q);default:return q}}},2149:q=>{var K=Object.prototype.toString;function z(q){return"function"==typeof q.constructor?q.constructor.name:null}q.exports=function(q){if(void 0===q)return"undefined";if(null===q)return"null";var Y=typeof q;if("boolean"===Y)return"boolean";if("string"===Y)return"string";if("number"===Y)return"number";if("symbol"===Y)return"symbol";if("function"===Y)return"GeneratorFunction"===z(q)?"generatorfunction":"function";if(function(q){return Array.isArray?Array.isArray(q):q instanceof Array}(q))return"array";if(function(q){if(q.constructor&&"function"==typeof q.constructor.isBuffer)return q.constructor.isBuffer(q);return!1}(q))return"buffer";if(function(q){try{if("number"==typeof q.length&&"function"==typeof q.callee)return!0}catch(K){if(-1!==K.message.indexOf("callee"))return!0}return!1}(q))return"arguments";if(function(q){return q instanceof Date||"function"==typeof q.toDateString&&"function"==typeof q.getDate&&"function"==typeof q.setDate}(q))return"date";if(function(q){return q instanceof Error||"string"==typeof q.message&&q.constructor&&"number"==typeof q.constructor.stackTraceLimit}(q))return"error";if(function(q){return q instanceof RegExp||"string"==typeof q.flags&&"boolean"==typeof q.ignoreCase&&"boolean"==typeof q.multiline&&"boolean"==typeof q.global}(q))return"regexp";switch(z(q)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(q){return"function"==typeof q.throw&&"function"==typeof q.return&&"function"==typeof q.next}(q))return"generator";switch(Y=K.call(q)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return Y.slice(8,-1).toLowerCase().replace(/\s/g,"")}},14803:(q,K,z)=>{"use strict";var Y=z(58859),Q=z(69675),X=function(q,K,z){for(var Y,Q=q;null!=(Y=Q.next);Q=Y)if(Y.key===K)return Q.next=Y.next,z||(Y.next=q.next,q.next=Y),Y};q.exports=function(){var q,K={assert:function(q){if(!K.has(q))throw new Q("Side channel does not contain "+Y(q))},delete:function(K){var z=q&&q.next,Y=function(q,K){if(q)return X(q,K,!0)}(q,K);return Y&&z&&z===Y&&(q=void 0),!!Y},get:function(K){return function(q,K){if(q){var z=X(q,K);return z&&z.value}}(q,K)},has:function(K){return function(q,K){return!!q&&!!X(q,K)}(q,K)},set:function(K,z){q||(q={next:void 0}),function(q,K,z){var Y=X(q,K);Y?Y.value=z:q.next={key:K,next:q.next,value:z}}(q,K,z)}};return K}},80507:(q,K,z)=>{"use strict";var Y=z(70453),Q=z(36556),X=z(58859),Z=z(69675),J=Y("%Map%",!0),tt=Q("Map.prototype.get",!0),et=Q("Map.prototype.set",!0),it=Q("Map.prototype.has",!0),st=Q("Map.prototype.delete",!0),nt=Q("Map.prototype.size",!0);q.exports=!!J&&function(){var q,K={assert:function(q){if(!K.has(q))throw new Z("Side channel does not contain "+X(q))},delete:function(K){if(q){var z=st(q,K);return 0===nt(q)&&(q=void 0),z}return!1},get:function(K){if(q)return tt(q,K)},has:function(K){return!!q&&it(q,K)},set:function(K,z){q||(q=new J),et(q,K,z)}};return K}},72271:(q,K,z)=>{"use strict";var Y=z(70453),Q=z(36556),X=z(58859),Z=z(80507),J=z(69675),tt=Y("%WeakMap%",!0),et=Q("WeakMap.prototype.get",!0),it=Q("WeakMap.prototype.set",!0),st=Q("WeakMap.prototype.has",!0),nt=Q("WeakMap.prototype.delete",!0);q.exports=tt?function(){var q,K,z={assert:function(q){if(!z.has(q))throw new J("Side channel does not contain "+X(q))},delete:function(z){if(tt&&z&&("object"==typeof z||"function"==typeof z)){if(q)return nt(q,z)}else if(Z&&K)return K.delete(z);return!1},get:function(z){return tt&&z&&("object"==typeof z||"function"==typeof z)&&q?et(q,z):K&&K.get(z)},has:function(z){return tt&&z&&("object"==typeof z||"function"==typeof z)&&q?st(q,z):!!K&&K.has(z)},set:function(z,Y){tt&&z&&("object"==typeof z||"function"==typeof z)?(q||(q=new tt),it(q,z,Y)):Z&&(K||(K=Z()),K.set(z,Y))}};return z}:Z},920:(q,K,z)=>{"use strict";var Y=z(69675),Q=z(58859),X=z(14803),Z=z(80507),J=z(72271)||Z||X;q.exports=function(){var q,K={assert:function(q){if(!K.has(q))throw new Y("Side channel does not contain "+Q(q))},delete:function(K){return!!q&&q.delete(K)},get:function(K){return q&&q.get(K)},has:function(K){return!!q&&q.has(K)},set:function(K,z){q||(q=J()),q.set(K,z)}};return K}},39454:(q,K,z)=>{const Y=z(8334),Q=z(33820),X="19.1.2";q.exports.factory=Q,q.exports.AGClientSocket=Y,q.exports.create=function(q){return Q.create({...q,version:X})},q.exports.version=X},4142:q=>{function K(){this._internalStorage={},this.isLocalStorageEnabled=this._checkLocalStorageEnabled()}K.prototype._checkLocalStorageEnabled=function(){let q;try{localStorage.setItem("__scLocalStorageTest",1),localStorage.removeItem("__scLocalStorageTest")}catch(e){q=e}return!q},K.prototype.saveToken=function(q,K,z){return this.isLocalStorageEnabled?localStorage.setItem(q,K):this._internalStorage[q]=K,Promise.resolve(K)},K.prototype.removeToken=function(q){let K=this.loadToken(q);return this.isLocalStorageEnabled?localStorage.removeItem(q):delete this._internalStorage[q],K},K.prototype.loadToken=function(q){let K;return K=this.isLocalStorageEnabled?localStorage.getItem(q):this._internalStorage[q]||null,Promise.resolve(K)},q.exports=K},8334:(q,K,z)=>{const Y=z(47579),Q=z(72641),X=z(89187),Z=z(4142),J=z(87916),tt=z(89839),et=z(51883),it=z(79155),st=z(48287).hp,nt=z(17549),at=z(97605),rt=at.InvalidArgumentsError,ot=at.InvalidMessageError,ht=at.SocketProtocolError,ct=at.TimeoutError,dt=at.BadConnectionError;function lt(q){Q.call(this);let K=Object.assign({path:"/socketcluster/",secure:!1,protocolScheme:null,socketPath:null,autoConnect:!0,autoReconnect:!0,autoSubscribeOnConnect:!0,connectTimeout:2e4,ackTimeout:1e4,timestampRequests:!1,timestampParam:"t",binaryType:"arraybuffer",batchOnHandshake:!1,batchOnHandshakeDuration:100,batchInterval:50,protocolVersion:2,wsOptions:{},cloneData:!1},q);null==K.authTokenName&&(K.authTokenName=this._generateAuthTokenNameFromURI(K)),this.id=null,this.version=K.version||null,this.protocolVersion=K.protocolVersion,this.state=this.CLOSED,this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null,this.pendingReconnect=!1,this.pendingReconnectTimeout=null,this.preparingPendingSubscriptions=!1,this.clientId=K.clientId,this.wsOptions=K.wsOptions,this.connectTimeout=K.connectTimeout,this.ackTimeout=K.ackTimeout,this.channelPrefix=K.channelPrefix||null,this.authTokenName=K.authTokenName,K.pingTimeout=K.connectTimeout,this.pingTimeout=K.pingTimeout,this.pingTimeoutDisabled=!!K.pingTimeoutDisabled;let z=Math.pow(2,31)-1,X=q=>{if(this[q]>z)throw new rt(`The ${q} value provided exceeded the maximum amount allowed`)};if(X("connectTimeout"),X("ackTimeout"),X("pingTimeout"),this.connectAttempts=0,this.isBatching=!1,this.batchOnHandshake=K.batchOnHandshake,this.batchOnHandshakeDuration=K.batchOnHandshakeDuration,this._batchingIntervalId=null,this._outboundBuffer=new et,this._channelMap={},this._channelEventDemux=new Y,this._channelDataDemux=new Y,this._receiverDemux=new Y,this._procedureDemux=new Y,this.options=K,this._cid=1,this.options.callIdGenerator=()=>this._cid++,this.options.autoReconnect){null==this.options.autoReconnectOptions&&(this.options.autoReconnectOptions={});let q=this.options.autoReconnectOptions;null==q.initialDelay&&(q.initialDelay=1e4),null==q.randomness&&(q.randomness=1e4),null==q.multiplier&&(q.multiplier=1.5),null==q.maxDelay&&(q.maxDelay=6e4)}if(null==this.options.subscriptionRetryOptions&&(this.options.subscriptionRetryOptions={}),this.options.authEngine?this.auth=this.options.authEngine:this.auth=new Z,this.options.codecEngine?this.codec=this.options.codecEngine:this.codec=J,this.options.protocol){let q=new rt("The protocol option does not affect socketcluster-client - If you want to utilize SSL/TLS, use the secure option instead");this._onError(q)}if(this.options.query=K.query||{},"string"==typeof this.options.query){let q=new URLSearchParams(this.options.query),K={};for(let[z,Y]of q.entries()){let q=K[z];null==q?K[z]=Y:(Array.isArray(q)||(K[z]=[q]),K[z].push(Y))}this.options.query=K}this.options.autoConnect&&this.connect()}lt.prototype=Object.create(Q.prototype),lt.CONNECTING=lt.prototype.CONNECTING=tt.prototype.CONNECTING,lt.OPEN=lt.prototype.OPEN=tt.prototype.OPEN,lt.CLOSED=lt.prototype.CLOSED=tt.prototype.CLOSED,lt.AUTHENTICATED=lt.prototype.AUTHENTICATED="authenticated",lt.UNAUTHENTICATED=lt.prototype.UNAUTHENTICATED="unauthenticated",lt.SUBSCRIBED=lt.prototype.SUBSCRIBED=X.SUBSCRIBED,lt.PENDING=lt.prototype.PENDING=X.PENDING,lt.UNSUBSCRIBED=lt.prototype.UNSUBSCRIBED=X.UNSUBSCRIBED,lt.ignoreStatuses=at.socketProtocolIgnoreStatuses,lt.errorStatuses=at.socketProtocolErrorStatuses,Object.defineProperty(lt.prototype,"isBufferingBatch",{get:function(){return this.transport.isBufferingBatch}}),lt.prototype.uri=function(){return tt.computeURI(this.options)},lt.prototype.getBackpressure=function(){return Math.max(this.getAllListenersBackpressure(),this.getAllReceiversBackpressure(),this.getAllProceduresBackpressure(),this.getAllChannelsBackpressure())},lt.prototype._generateAuthTokenNameFromURI=function(q){return`socketcluster.authToken${q.host?`.${q.host}`:`.${q.hostname||"localhost"}${q.port?`:${q.port}`:""}`}`},lt.prototype._setAuthToken=function(q){this._changeToAuthenticatedState(q.token),(async()=>{try{await this.auth.saveToken(this.authTokenName,q.token,{})}catch(K){this._onError(K)}})()},lt.prototype._removeAuthToken=function(q){(async()=>{let q;try{q=await this.auth.removeToken(this.authTokenName)}catch(K){return void this._onError(K)}this.emit("removeAuthToken",{oldAuthToken:q})})(),this._changeToUnauthenticatedStateAndClearTokens()},lt.prototype._privateDataHandlerMap={"#publish":function(q){if("string"!=typeof q.channel)return;let K=this._undecorateChannelName(q.channel);this.isSubscribed(K,!0)&&this._channelDataDemux.write(K,q.data)},"#kickOut":function(q){if("string"!=typeof q.channel)return;let K=this._undecorateChannelName(q.channel),z=this._channelMap[K];z&&(this.emit("kickOut",{channel:K,message:q.message}),this._channelEventDemux.write(`${K}/kickOut`,{message:q.message}),this._triggerChannelUnsubscribe(z))},"#setAuthToken":function(q){q&&this._setAuthToken(q)},"#removeAuthToken":function(q){this._removeAuthToken(q)}},lt.prototype._privateRPCHandlerMap={"#setAuthToken":function(q,K){if(q)this._setAuthToken(q),K.end();else{let q=new ot("No token data provided by #setAuthToken event");delete q.stack,K.error(q)}},"#removeAuthToken":function(q,K){this._removeAuthToken(q),K.end()}},lt.prototype.getState=function(){return this.state},lt.prototype.getBytesReceived=function(){return this.transport.getBytesReceived()},lt.prototype.deauthenticate=async function(){(async()=>{let q;try{q=await this.auth.removeToken(this.authTokenName)}catch(K){return void this._onError(K)}this.emit("removeAuthToken",{oldAuthToken:q})})(),this.state!==this.CLOSED&&this.transmit("#removeAuthToken"),this._changeToUnauthenticatedStateAndClearTokens(),await nt(0)},lt.prototype.connect=function(q){if(q&&(this.state!==this.CLOSED&&this.disconnect(1e3,"Socket was disconnected by the client to initiate a new connection"),this.options={...this.options,...q},null==this.options.authTokenName&&(this.options.authTokenName=this._generateAuthTokenNameFromURI(this.options))),this.state===this.CLOSED){this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this.state=this.CONNECTING,this.emit("connecting",{}),this.transport&&this.transport.clearAllListeners();let q={onOpen:q=>{this.state=this.OPEN,this._onOpen(q)},onOpenAbort:q=>{this.state!==this.CLOSED&&(this.state=this.CLOSED,this._destroy(q.code,q.reason,!0))},onClose:q=>{this.state!==this.CLOSED&&(this.state=this.CLOSED,this._destroy(q.code,q.reason))},onEvent:q=>{this.emit(q.event,q.data)},onError:q=>{this._onError(q.error)},onInboundInvoke:q=>{this._onInboundInvoke(q)},onInboundTransmit:q=>{this._onInboundTransmit(q.event,q.data)}};this.transport=new tt(this.auth,this.codec,this.options,this.wsOptions,q)}},lt.prototype.reconnect=function(q,K){this.disconnect(q,K),this.connect()},lt.prototype.disconnect=function(q,K){if("number"!=typeof(q=q||1e3))throw new rt("If specified, the code argument must be a number");let z=this.state===this.CONNECTING;z||this.state===this.OPEN?(this.state=this.CLOSED,this._destroy(q,K,z),this.transport.close(q,K)):(this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef))},lt.prototype._changeToUnauthenticatedStateAndClearTokens=function(){if(this.authState!==this.UNAUTHENTICATED){let q=this.authState,K=this.authToken,z=this.signedAuthToken;this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null;let Y={oldAuthState:q,newAuthState:this.authState};this.emit("authStateChange",Y),this.emit("deauthenticate",{oldSignedAuthToken:z,oldAuthToken:K})}},lt.prototype._changeToAuthenticatedState=function(q){if(this.signedAuthToken=q,this.authToken=this._extractAuthTokenData(q),this.authState!==this.AUTHENTICATED){let K=this.authState;this.authState=this.AUTHENTICATED;let z={oldAuthState:K,newAuthState:this.authState,signedAuthToken:q,authToken:this.authToken};this.preparingPendingSubscriptions||this.processPendingSubscriptions(),this.emit("authStateChange",z)}this.emit("authenticate",{signedAuthToken:q,authToken:this.authToken})},lt.prototype.decodeBase64=function(q){return st.from(q,"base64").toString("utf8")},lt.prototype.encodeBase64=function(q){return st.from(q,"utf8").toString("base64")},lt.prototype._extractAuthTokenData=function(q){if("string"!=typeof q)return null;let K=q.split(".")[1];if(null!=K){let q=K;try{return q=this.decodeBase64(q),JSON.parse(q)}catch(e){return q}}return null},lt.prototype.getAuthToken=function(){return this.authToken},lt.prototype.getSignedAuthToken=function(){return this.signedAuthToken},lt.prototype.authenticate=async function(q){let K;try{K=await this.invoke("#authenticate",q)}catch(z){throw"BadConnectionError"!==z.name&&"TimeoutError"!==z.name&&this._changeToUnauthenticatedStateAndClearTokens(),await nt(0),z}return K&&null!=K.isAuthenticated?K.authError&&(K.authError=at.hydrateError(K.authError)):K={isAuthenticated:this.authState,authError:null},K.isAuthenticated?this._changeToAuthenticatedState(q):this._changeToUnauthenticatedStateAndClearTokens(),(async()=>{try{await this.auth.saveToken(this.authTokenName,q,{})}catch(z){this._onError(z)}})(),await nt(0),K},lt.prototype._tryReconnect=function(q){let K,z=this.connectAttempts++,Y=this.options.autoReconnectOptions;if(null==q||z>0){let q=Math.round(Y.initialDelay+(Y.randomness||0)*Math.random());K=Math.round(q*Math.pow(Y.multiplier,z))}else K=q;K>Y.maxDelay&&(K=Y.maxDelay),clearTimeout(this._reconnectTimeoutRef),this.pendingReconnect=!0,this.pendingReconnectTimeout=K,this._reconnectTimeoutRef=setTimeout((()=>{this.connect()}),K)},lt.prototype._onOpen=function(q){this.isBatching?this._startBatching():this.batchOnHandshake&&(this._startBatching(),setTimeout((()=>{this.isBatching||this._stopBatching()}),this.batchOnHandshakeDuration)),this.preparingPendingSubscriptions=!0,q?(this.id=q.id,this.pingTimeout=q.pingTimeout,q.isAuthenticated?this._changeToAuthenticatedState(q.authToken):this._changeToUnauthenticatedStateAndClearTokens()):this._changeToUnauthenticatedStateAndClearTokens(),this.connectAttempts=0,this.options.autoSubscribeOnConnect&&this.processPendingSubscriptions(),this.emit("connect",{...q,processPendingSubscriptions:()=>{this.processPendingSubscriptions()}}),this.state===this.OPEN&&this._flushOutboundBuffer()},lt.prototype._onError=function(q){this.emit("error",{error:q})},lt.prototype._suspendSubscriptions=function(){Object.keys(this._channelMap).forEach((q=>{let K=this._channelMap[q];this._triggerChannelUnsubscribe(K,!0)}))},lt.prototype._abortAllPendingEventsDueToBadConnection=function(q,K,z){let Y,Q=this._outboundBuffer.head;for(;Q;){Y=Q.next;let X=Q.data;clearTimeout(X.timeout),delete X.timeout,Q.detach(),Q=Y;let Z=X.callback;if(Z){delete X.callback;let Y=`Event ${X.event} was aborted due to a bad connection`,Q=new dt(Y,q,K,z);Z.call(X,Q,X)}X.cid&&this.transport.cancelPendingResponse(X.cid)}},lt.prototype._destroy=function(q,K,z){if(this.id=null,this._cancelBatching(),this.transport&&this.transport.clearAllListeners(),this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this._suspendSubscriptions(),z?this.emit("connectAbort",{code:q,reason:K}):this.emit("disconnect",{code:q,reason:K}),this.emit("close",{code:q,reason:K}),!lt.ignoreStatuses[q]){let z;z="string"==typeof K?"Socket connection closed with status code "+q+" and reason: "+K:"Socket connection closed with status code "+q;let Y=new ht(lt.errorStatuses[q]||z,q);this._onError(Y)}this._abortAllPendingEventsDueToBadConnection(z?"connectAbort":"disconnect",q,K),this.options.autoReconnect&&(4e3===q||4001===q||1005===q?this._tryReconnect(0):1e3!==q&&q<4500&&this._tryReconnect())},lt.prototype._onInboundTransmit=function(q,K){let z=this._privateDataHandlerMap[q];z?z.call(this,K||{}):this._receiverDemux.write(q,K)},lt.prototype._onInboundInvoke=function(q){let{procedure:K,data:z}=q,Y=this._privateRPCHandlerMap[K];Y?Y.call(this,z,q):this._procedureDemux.write(K,q)},lt.prototype.decode=function(q){return this.transport.decode(q)},lt.prototype.encode=function(q){return this.transport.encode(q)},lt.prototype._flushOutboundBuffer=function(){let q,K=this._outboundBuffer.head;for(;K;){q=K.next;let z=K.data;K.detach(),this.transport.transmitObject(z),K=q}},lt.prototype._handleEventAckTimeout=function(q,K){K&&K.detach(),delete q.timeout;let z=q.callback;if(z){delete q.callback;let K=new ct(`Event response for ${q.event} event timed out`);z.call(q,K,q)}q.cid&&this.transport.cancelPendingResponse(q.cid)},lt.prototype._processOutboundEvent=function(q,K,z,Y){z=z||{},this.state===this.CLOSED&&this.connect();let Q,X={event:q};Q=Y?new Promise(((q,K)=>{X.callback=(z,Y)=>{z?K(z):q(Y)}})):Promise.resolve();let Z=new et.Item;this.options.cloneData?X.data=it(K):X.data=K,Z.data=X;let J=null==z.ackTimeout?this.ackTimeout:z.ackTimeout;return X.timeout=setTimeout((()=>{this._handleEventAckTimeout(X,Z)}),J),this._outboundBuffer.append(Z),this.state===this.OPEN&&this._flushOutboundBuffer(),Q},lt.prototype.send=function(q){this.transport.send(q)},lt.prototype.transmit=function(q,K,z){return this._processOutboundEvent(q,K,z)},lt.prototype.invoke=function(q,K,z){return this._processOutboundEvent(q,K,z,!0)},lt.prototype.transmitPublish=function(q,K){let z={channel:this._decorateChannelName(q),data:K};return this.transmit("#publish",z)},lt.prototype.invokePublish=function(q,K){let z={channel:this._decorateChannelName(q),data:K};return this.invoke("#publish",z)},lt.prototype._triggerChannelSubscribe=function(q,K){let z=q.name;if(q.state!==X.SUBSCRIBED){let Y=q.state;q.state=X.SUBSCRIBED;let Q={oldChannelState:Y,newChannelState:q.state,subscriptionOptions:K};this._channelEventDemux.write(`${z}/subscribeStateChange`,Q),this._channelEventDemux.write(`${z}/subscribe`,{subscriptionOptions:K}),this.emit("subscribeStateChange",{channel:z,...Q}),this.emit("subscribe",{channel:z,subscriptionOptions:K})}},lt.prototype._triggerChannelSubscribeFail=function(q,K,z){let Y=K.name,Q=!K.options.waitForAuth||this.authState===this.AUTHENTICATED;!!this._channelMap[Y]&&Q&&(delete this._channelMap[Y],this._channelEventDemux.write(`${Y}/subscribeFail`,{error:q,subscriptionOptions:z}),this.emit("subscribeFail",{error:q,channel:Y,subscriptionOptions:z}))},lt.prototype._cancelPendingSubscribeCallback=function(q){null!=q._pendingSubscriptionCid&&(this.transport.cancelPendingResponse(q._pendingSubscriptionCid),delete q._pendingSubscriptionCid)},lt.prototype._decorateChannelName=function(q){return this.channelPrefix&&(q=this.channelPrefix+q),q},lt.prototype._undecorateChannelName=function(q){return this.channelPrefix&&0===q.indexOf(this.channelPrefix)?q.replace(this.channelPrefix,""):q},lt.prototype.startBatch=function(){this.transport.startBatch()},lt.prototype.flushBatch=function(){this.transport.flushBatch()},lt.prototype.cancelBatch=function(){this.transport.cancelBatch()},lt.prototype._startBatching=function(){null==this._batchingIntervalId&&(this.startBatch(),this._batchingIntervalId=setInterval((()=>{this.flushBatch(),this.startBatch()}),this.options.batchInterval))},lt.prototype.startBatching=function(){this.isBatching=!0,this._startBatching()},lt.prototype._stopBatching=function(){null!=this._batchingIntervalId&&clearInterval(this._batchingIntervalId),this._batchingIntervalId=null,this.flushBatch()},lt.prototype.stopBatching=function(){this.isBatching=!1,this._stopBatching()},lt.prototype._cancelBatching=function(){null!=this._batchingIntervalId&&clearInterval(this._batchingIntervalId),this._batchingIntervalId=null,this.cancelBatch()},lt.prototype.cancelBatching=function(){this.isBatching=!1,this._cancelBatching()},lt.prototype._trySubscribe=function(q){let K=!q.options.waitForAuth||this.authState===this.AUTHENTICATED;if(this.state===this.OPEN&&!this.preparingPendingSubscriptions&&null==q._pendingSubscriptionCid&&K){let K={noTimeout:!0},z={};q.options.waitForAuth&&(K.waitForAuth=!0,z.waitForAuth=K.waitForAuth),q.options.data&&(z.data=q.options.data),q._pendingSubscriptionCid=this.transport.invokeRaw("#subscribe",{channel:this._decorateChannelName(q.name),...z},K,(K=>{if(K){if("BadConnectionError"===K.name)return;delete q._pendingSubscriptionCid,this._triggerChannelSubscribeFail(K,q,z)}else delete q._pendingSubscriptionCid,this._triggerChannelSubscribe(q,z)})),this.emit("subscribeRequest",{channel:q.name,subscriptionOptions:z})}},lt.prototype.subscribe=function(q,K){K=K||{};let z=this._channelMap[q],Y={waitForAuth:!!K.waitForAuth};return null!=K.priority&&(Y.priority=K.priority),void 0!==K.data&&(Y.data=K.data),z?K&&(z.options=Y):(z={name:q,state:X.PENDING,options:Y},this._channelMap[q]=z,this._trySubscribe(z)),new X(q,this,this._channelEventDemux,this._channelDataDemux)},lt.prototype._triggerChannelUnsubscribe=function(q,K){let z=q.name;if(this._cancelPendingSubscribeCallback(q),q.state===X.SUBSCRIBED){let Y={oldChannelState:q.state,newChannelState:K?X.PENDING:X.UNSUBSCRIBED};this._channelEventDemux.write(`${z}/subscribeStateChange`,Y),this._channelEventDemux.write(`${z}/unsubscribe`,{}),this.emit("subscribeStateChange",{channel:z,...Y}),this.emit("unsubscribe",{channel:z})}K?q.state=X.PENDING:delete this._channelMap[z]},lt.prototype._tryUnsubscribe=function(q){if(this.state===this.OPEN){let K={noTimeout:!0};this._cancelPendingSubscribeCallback(q);let z=this._decorateChannelName(q.name);this.transport.transmit("#unsubscribe",z,K)}},lt.prototype.unsubscribe=function(q){let K=this._channelMap[q];K&&(this._triggerChannelUnsubscribe(K),this._tryUnsubscribe(K))},lt.prototype.receiver=function(q){return this._receiverDemux.stream(q)},lt.prototype.closeReceiver=function(q){this._receiverDemux.close(q)},lt.prototype.closeAllReceivers=function(){this._receiverDemux.closeAll()},lt.prototype.killReceiver=function(q){this._receiverDemux.kill(q)},lt.prototype.killAllReceivers=function(){this._receiverDemux.killAll()},lt.prototype.killReceiverConsumer=function(q){this._receiverDemux.killConsumer(q)},lt.prototype.getReceiverConsumerStats=function(q){return this._receiverDemux.getConsumerStats(q)},lt.prototype.getReceiverConsumerStatsList=function(q){return this._receiverDemux.getConsumerStatsList(q)},lt.prototype.getAllReceiversConsumerStatsList=function(){return this._receiverDemux.getConsumerStatsListAll()},lt.prototype.getReceiverBackpressure=function(q){return this._receiverDemux.getBackpressure(q)},lt.prototype.getAllReceiversBackpressure=function(){return this._receiverDemux.getBackpressureAll()},lt.prototype.getReceiverConsumerBackpressure=function(q){return this._receiverDemux.getConsumerBackpressure(q)},lt.prototype.hasReceiverConsumer=function(q,K){return this._receiverDemux.hasConsumer(q,K)},lt.prototype.hasAnyReceiverConsumer=function(q){return this._receiverDemux.hasConsumerAll(q)},lt.prototype.procedure=function(q){return this._procedureDemux.stream(q)},lt.prototype.closeProcedure=function(q){this._procedureDemux.close(q)},lt.prototype.closeAllProcedures=function(){this._procedureDemux.closeAll()},lt.prototype.killProcedure=function(q){this._procedureDemux.kill(q)},lt.prototype.killAllProcedures=function(){this._procedureDemux.killAll()},lt.prototype.killProcedureConsumer=function(q){this._procedureDemux.killConsumer(q)},lt.prototype.getProcedureConsumerStats=function(q){return this._procedureDemux.getConsumerStats(q)},lt.prototype.getProcedureConsumerStatsList=function(q){return this._procedureDemux.getConsumerStatsList(q)},lt.prototype.getAllProceduresConsumerStatsList=function(){return this._procedureDemux.getConsumerStatsListAll()},lt.prototype.getProcedureBackpressure=function(q){return this._procedureDemux.getBackpressure(q)},lt.prototype.getAllProceduresBackpressure=function(){return this._procedureDemux.getBackpressureAll()},lt.prototype.getProcedureConsumerBackpressure=function(q){return this._procedureDemux.getConsumerBackpressure(q)},lt.prototype.hasProcedureConsumer=function(q,K){return this._procedureDemux.hasConsumer(q,K)},lt.prototype.hasAnyProcedureConsumer=function(q){return this._procedureDemux.hasConsumerAll(q)},lt.prototype.channel=function(q){this._channelMap[q];return new X(q,this,this._channelEventDemux,this._channelDataDemux)},lt.prototype.closeChannel=function(q){this.channelCloseOutput(q),this.channelCloseAllListeners(q)},lt.prototype.closeAllChannelOutputs=function(){this._channelDataDemux.closeAll()},lt.prototype.closeAllChannelListeners=function(){this._channelEventDemux.closeAll()},lt.prototype.closeAllChannels=function(){this.closeAllChannelOutputs(),this.closeAllChannelListeners()},lt.prototype.killChannel=function(q){this.channelKillOutput(q),this.channelKillAllListeners(q)},lt.prototype.killAllChannelOutputs=function(){this._channelDataDemux.killAll()},lt.prototype.killAllChannelListeners=function(){this._channelEventDemux.killAll()},lt.prototype.killAllChannels=function(){this.killAllChannelOutputs(),this.killAllChannelListeners()},lt.prototype.killChannelOutputConsumer=function(q){this._channelDataDemux.killConsumer(q)},lt.prototype.killChannelListenerConsumer=function(q){this._channelEventDemux.killConsumer(q)},lt.prototype.getChannelOutputConsumerStats=function(q){return this._channelDataDemux.getConsumerStats(q)},lt.prototype.getChannelListenerConsumerStats=function(q){return this._channelEventDemux.getConsumerStats(q)},lt.prototype.getAllChannelOutputsConsumerStatsList=function(){return this._channelDataDemux.getConsumerStatsListAll()},lt.prototype.getAllChannelListenersConsumerStatsList=function(){return this._channelEventDemux.getConsumerStatsListAll()},lt.prototype.getChannelBackpressure=function(q){return Math.max(this.channelGetOutputBackpressure(q),this.channelGetAllListenersBackpressure(q))},lt.prototype.getAllChannelOutputsBackpressure=function(){return this._channelDataDemux.getBackpressureAll()},lt.prototype.getAllChannelListenersBackpressure=function(){return this._channelEventDemux.getBackpressureAll()},lt.prototype.getAllChannelsBackpressure=function(){return Math.max(this.getAllChannelOutputsBackpressure(),this.getAllChannelListenersBackpressure())},lt.prototype.getChannelListenerConsumerBackpressure=function(q){return this._channelEventDemux.getConsumerBackpressure(q)},lt.prototype.getChannelOutputConsumerBackpressure=function(q){return this._channelDataDemux.getConsumerBackpressure(q)},lt.prototype.hasAnyChannelOutputConsumer=function(q){return this._channelDataDemux.hasConsumerAll(q)},lt.prototype.hasAnyChannelListenerConsumer=function(q){return this._channelEventDemux.hasConsumerAll(q)},lt.prototype.getChannelState=function(q){let K=this._channelMap[q];return K?K.state:X.UNSUBSCRIBED},lt.prototype.getChannelOptions=function(q){let K=this._channelMap[q];return K?{...K.options}:{}},lt.prototype._getAllChannelStreamNames=function(q){let K=this._channelEventDemux.getConsumerStatsListAll().filter((K=>0===K.stream.indexOf(`${q}/`))).reduce(((q,K)=>(q[K.stream]=!0,q)),{});return Object.keys(K)},lt.prototype.channelCloseOutput=function(q){this._channelDataDemux.close(q)},lt.prototype.channelCloseListener=function(q,K){this._channelEventDemux.close(`${q}/${K}`)},lt.prototype.channelCloseAllListeners=function(q){this._getAllChannelStreamNames(q).forEach((q=>{this._channelEventDemux.close(q)}))},lt.prototype.channelKillOutput=function(q){this._channelDataDemux.kill(q)},lt.prototype.channelKillListener=function(q,K){this._channelEventDemux.kill(`${q}/${K}`)},lt.prototype.channelKillAllListeners=function(q){this._getAllChannelStreamNames(q).forEach((q=>{this._channelEventDemux.kill(q)}))},lt.prototype.channelGetOutputConsumerStatsList=function(q){return this._channelDataDemux.getConsumerStatsList(q)},lt.prototype.channelGetListenerConsumerStatsList=function(q,K){return this._channelEventDemux.getConsumerStatsList(`${q}/${K}`)},lt.prototype.channelGetAllListenersConsumerStatsList=function(q){return this._getAllChannelStreamNames(q).map((q=>this._channelEventDemux.getConsumerStatsList(q))).reduce(((q,K)=>(K.forEach((K=>{q.push(K)})),q)),[])},lt.prototype.channelGetOutputBackpressure=function(q){return this._channelDataDemux.getBackpressure(q)},lt.prototype.channelGetListenerBackpressure=function(q,K){return this._channelEventDemux.getBackpressure(`${q}/${K}`)},lt.prototype.channelGetAllListenersBackpressure=function(q){let K=this._getAllChannelStreamNames(q).map((q=>this._channelEventDemux.getBackpressure(q)));return Math.max(...K.concat(0))},lt.prototype.channelHasOutputConsumer=function(q,K){return this._channelDataDemux.hasConsumer(q,K)},lt.prototype.channelHasListenerConsumer=function(q,K,z){return this._channelEventDemux.hasConsumer(`${q}/${K}`,z)},lt.prototype.channelHasAnyListenerConsumer=function(q,K){return this._getAllChannelStreamNames(q).some((q=>this._channelEventDemux.hasConsumer(q,K)))},lt.prototype.subscriptions=function(q){let K=[];return Object.keys(this._channelMap).forEach((z=>{(q||this._channelMap[z].state===X.SUBSCRIBED)&&K.push(z)})),K},lt.prototype.isSubscribed=function(q,K){let z=this._channelMap[q];return K?!!z:!!z&&z.state===X.SUBSCRIBED},lt.prototype.processPendingSubscriptions=function(){this.preparingPendingSubscriptions=!1;let q=[];Object.keys(this._channelMap).forEach((K=>{let z=this._channelMap[K];z.state===X.PENDING&&q.push(z)})),q.sort(((q,K)=>{let z=q.options.priority||0,Y=K.options.priority||0;return z>Y?-1:z{this._trySubscribe(q)}))},q.exports=lt},33820:(q,K,z)=>{const Y=z(8334),Q=z(69824),X=z(97605).InvalidArgumentsError;function Z(q,K){let z=null==q.secure?K:q.secure;return q.port||("undefined"!=typeof location&&location.port?location.port:z?443:80)}q.exports={create:function(q){if((q=q||{}).host&&!q.host.match(/[^:]+:\d{2,5}/))throw new X("The host option should include both the hostname and the port number in the hostname:port format");if(q.host&&q.hostname)throw new X("The host option should already include the hostname and the port number in the hostname:port format - Because of this, you should never use host and hostname options together");if(q.host&&q.port)throw new X("The host option should already include the hostname and the port number in the hostname:port format - Because of this, you should never use host and port options together");let K="undefined"!=typeof location&&"https:"===location.protocol,z={clientId:Q.v4(),port:Z(q,K),hostname:"undefined"!=typeof location&&location.hostname||"localhost",secure:K};return Object.assign(z,q),new Y(z)}}},89839:(q,K,z)=>{const Y=z(27445);let Q;if("undefined"!=typeof WebSocket)Q=function(q,K){return new WebSocket(q)};else{let q=z(18495);Q=function(K,z){return new q(K,[],z)}}const X=z(97605),Z=X.TimeoutError,J=X.BadConnectionError;function tt(q,K,z,Y,X){this.state=this.CLOSED,this.auth=q,this.codec=K,this.options=z,this.wsOptions=Y,this.protocolVersion=z.protocolVersion,this.connectTimeout=z.connectTimeout,this.pingTimeout=z.pingTimeout,this.pingTimeoutDisabled=!!z.pingTimeoutDisabled,this.callIdGenerator=z.callIdGenerator,this.authTokenName=z.authTokenName,this.isBufferingBatch=!1,this._pingTimeoutTicker=null,this._callbackMap={},this._batchBuffer=[],X||(X={}),this._onOpenHandler=X.onOpen||function(){},this._onOpenAbortHandler=X.onOpenAbort||function(){},this._onCloseHandler=X.onClose||function(){},this._onEventHandler=X.onEvent||function(){},this._onErrorHandler=X.onError||function(){},this._onInboundInvokeHandler=X.onInboundInvoke||function(){},this._onInboundTransmitHandler=X.onInboundTransmit||function(){},this.state=this.CONNECTING;let Z=this.uri(),J=Q(Z,Y);J.binaryType=this.options.binaryType,this.socket=J,J.onopen=()=>{this._onOpen()},J.onclose=async q=>{let K;K=null==q.code?1005:q.code,this._destroy(K,q.reason)},J.onmessage=(q,K)=>{this._onMessage(q.data)},J.onerror=q=>{this.state===this.CONNECTING&&this._destroy(1006)},this._connectTimeoutRef=setTimeout((()=>{this._destroy(4007),this.socket.close(4007)}),this.connectTimeout),1===this.protocolVersion?this._handlePing=q=>"#1"===q&&(this._resetPingTimeout(),this.socket.readyState===this.socket.OPEN&&this.send("#2"),!0):this._handlePing=q=>""===q&&(this._resetPingTimeout(),this.socket.readyState===this.socket.OPEN&&this.send(""),!0)}tt.CONNECTING=tt.prototype.CONNECTING="connecting",tt.OPEN=tt.prototype.OPEN="open",tt.CLOSED=tt.prototype.CLOSED="closed",tt.computeURI=function(q){let K,z=q.query||{};K=null==q.protocolScheme?q.secure?"wss":"ws":q.protocolScheme,q.timestampRequests&&(z[q.timestampParam]=(new Date).getTime());let Y,Q,X=new URLSearchParams;for(let[Z,J]of Object.entries(z))if(Array.isArray(J))for(let q of J)X.append(Z,q);else X.set(Z,J);if(z=X.toString(),z.length&&(z="?"+z),null==q.socketPath){if(q.host)Y=q.host;else{let z="";q.port&&("wss"===K&&443!==q.port||"ws"===K&&80!==q.port)&&(z=":"+q.port),Y=q.hostname+z}Q=q.path}else Y=q.socketPath,Q=`:${q.path}`;return K+"://"+Y+Q+z},tt.prototype.uri=function(){return tt.computeURI(this.options)},tt.prototype._onOpen=async function(){let q;clearTimeout(this._connectTimeoutRef),this._resetPingTimeout();try{q=await this._handshake()}catch(K){return null==K.statusCode&&(K.statusCode=4003),this._onError(K),this._destroy(K.statusCode,K.toString()),void this.socket.close(K.statusCode)}this.state=this.OPEN,q&&(this.pingTimeout=q.pingTimeout),this._resetPingTimeout(),this._onOpenHandler(q)},tt.prototype._handshake=async function(){let q=await this.auth.loadToken(this.authTokenName),K=await this.invoke("#handshake",{authToken:q},{force:!0});return K&&(K.authToken=q,K.authError&&(K.authError=X.hydrateError(K.authError))),K},tt.prototype._abortAllPendingEventsDueToBadConnection=function(q,K,z){Object.keys(this._callbackMap||{}).forEach((Y=>{let Q=this._callbackMap[Y];delete this._callbackMap[Y],clearTimeout(Q.timeout),delete Q.timeout;let X=`Event ${Q.event} was aborted due to a bad connection`,Z=new J(X,q,K,z),tt=Q.callback;tt&&(delete Q.callback,tt.call(Q,Z,Q))}))},tt.prototype._destroy=function(q,K){X.socketProtocolErrorStatuses[q];!K&&X.socketProtocolErrorStatuses[q]&&(K=X.socketProtocolErrorStatuses[q]),delete this.socket.onopen,delete this.socket.onclose,delete this.socket.onmessage,delete this.socket.onerror,clearTimeout(this._connectTimeoutRef),clearTimeout(this._pingTimeoutTicker),this.state===this.OPEN?(this.state=this.CLOSED,this._abortAllPendingEventsDueToBadConnection("disconnect",q,K),this._onCloseHandler({code:q,reason:K})):this.state===this.CONNECTING?(this.state=this.CLOSED,this._abortAllPendingEventsDueToBadConnection("connectAbort",q,K),this._onOpenAbortHandler({code:q,reason:K})):this.state===this.CLOSED&&this._abortAllPendingEventsDueToBadConnection("connectAbort",q,K)},tt.prototype._processInboundPacket=function(q,K){if(q&&"string"==typeof q.event)if("number"==typeof q.cid){let K=new Y(this,q.cid,q.event,q.data);this._onInboundInvokeHandler(K)}else this._onInboundTransmitHandler({...q});else if(q&&"number"==typeof q.rid){let K=this._callbackMap[q.rid];if(K&&(clearTimeout(K.timeout),delete K.timeout,delete this._callbackMap[q.rid],K.callback)){let z=X.hydrateError(q.error);K.callback(z,q.data)}}else this._onEventHandler({event:"raw",data:{message:K}})},tt.prototype._onMessage=function(q){if(this._onEventHandler({event:"message",data:{message:q}}),this._handlePing(q))return;let K=this.decode(q);if(Array.isArray(K)){let z=K.length;for(let Y=0;Y{this._destroy(4e3),this.socket.close(4e3)}),this.pingTimeout)},tt.prototype.clearAllListeners=function(){this._onOpenHandler=function(){},this._onOpenAbortHandler=function(){},this._onCloseHandler=function(){},this._onEventHandler=function(){},this._onErrorHandler=function(){},this._onInboundInvokeHandler=function(){},this._onInboundTransmitHandler=function(){}},tt.prototype.startBatch=function(){this.isBufferingBatch=!0,this._batchBuffer=[]},tt.prototype.flushBatch=function(){if(this.isBufferingBatch=!1,!this._batchBuffer.length)return;let q=this.serializeObject(this._batchBuffer);this._batchBuffer=[],this.send(q)},tt.prototype.cancelBatch=function(){this.isBufferingBatch=!1,this._batchBuffer=[]},tt.prototype.getBytesReceived=function(){return this.socket.bytesReceived},tt.prototype.close=function(q,K){this.state!==this.OPEN&&this.state!==this.CONNECTING||(q=q||1e3,this._destroy(q,K),this.socket.close(q,K))},tt.prototype.transmitObject=function(q){let K={event:q.event,data:q.data};return q.callback&&(K.cid=q.cid=this.callIdGenerator(),this._callbackMap[q.cid]=q),this.sendObject(K),q.cid||null},tt.prototype._handleEventAckTimeout=function(q){q.cid&&delete this._callbackMap[q.cid],delete q.timeout;let K=q.callback;if(K){delete q.callback;let z=new Z(`Event response for ${q.event} event timed out`);K.call(q,z,q)}},tt.prototype.transmit=function(q,K,z){let Y={event:q,data:K};return(this.state===this.OPEN||z.force)&&this.transmitObject(Y),Promise.resolve()},tt.prototype.invokeRaw=function(q,K,z,Y){let Q={event:q,data:K,callback:Y};z.noTimeout||(Q.timeout=setTimeout((()=>{this._handleEventAckTimeout(Q)}),this.options.ackTimeout));let X=null;return(this.state===this.OPEN||z.force)&&(X=this.transmitObject(Q)),X},tt.prototype.invoke=function(q,K,z){return new Promise(((Y,Q)=>{this.invokeRaw(q,K,z,((q,K)=>{q?Q(q):Y(K)}))}))},tt.prototype.cancelPendingResponse=function(q){delete this._callbackMap[q]},tt.prototype.decode=function(q){return this.codec.decode(q)},tt.prototype.encode=function(q){return this.codec.encode(q)},tt.prototype.send=function(q){this.socket.readyState!==this.socket.OPEN?this._destroy(1005):this.socket.send(q)},tt.prototype.serializeObject=function(q){let K;try{K=this.encode(q)}catch(z){return this._onError(z),null}return K},tt.prototype.sendObject=function(q){if(this.isBufferingBatch)return void this._batchBuffer.push(q);let K=this.serializeObject(q);null!=K&&this.send(K)},q.exports=tt},17549:q=>{q.exports=function(q){return new Promise((K=>{setTimeout((()=>{K()}),q)}))}},18495:q=>{let K;K="undefined"!=typeof WorkerGlobalScope?self:"undefined"!=typeof window&&window||function(){return this}();const z=K.WebSocket||K.MozWebSocket;function Y(q,K,Y){let Q;return Q=K?new z(q,K):new z(q),Q}z&&(Y.prototype=z.prototype),q.exports=z?Y:null},69824:(q,K,z)=>{"use strict";var Y;z.r(K),z.d(K,{NIL:()=>wt,parse:()=>ht,stringify:()=>it,v1:()=>ot,v3:()=>gt,v4:()=>mt,v5:()=>Et,validate:()=>J,version:()=>Tt});var Q=new Uint8Array(16);function X(){if(!Y&&!(Y="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Y(Q)}const Z=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const J=function(q){return"string"==typeof q&&Z.test(q)};for(var tt=[],et=0;et<256;++et)tt.push((et+256).toString(16).substr(1));const it=function(q){var K=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,z=(tt[q[K+0]]+tt[q[K+1]]+tt[q[K+2]]+tt[q[K+3]]+"-"+tt[q[K+4]]+tt[q[K+5]]+"-"+tt[q[K+6]]+tt[q[K+7]]+"-"+tt[q[K+8]]+tt[q[K+9]]+"-"+tt[q[K+10]]+tt[q[K+11]]+tt[q[K+12]]+tt[q[K+13]]+tt[q[K+14]]+tt[q[K+15]]).toLowerCase();if(!J(z))throw TypeError("Stringified UUID is invalid");return z};var st,nt,at=0,rt=0;const ot=function(q,K,z){var Y=K&&z||0,Q=K||new Array(16),Z=(q=q||{}).node||st,J=void 0!==q.clockseq?q.clockseq:nt;if(null==Z||null==J){var tt=q.random||(q.rng||X)();null==Z&&(Z=st=[1|tt[0],tt[1],tt[2],tt[3],tt[4],tt[5]]),null==J&&(J=nt=16383&(tt[6]<<8|tt[7]))}var et=void 0!==q.msecs?q.msecs:Date.now(),ot=void 0!==q.nsecs?q.nsecs:rt+1,ht=et-at+(ot-rt)/1e4;if(ht<0&&void 0===q.clockseq&&(J=J+1&16383),(ht<0||et>at)&&void 0===q.nsecs&&(ot=0),ot>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");at=et,rt=ot,nt=J;var ct=(1e4*(268435455&(et+=122192928e5))+ot)%4294967296;Q[Y++]=ct>>>24&255,Q[Y++]=ct>>>16&255,Q[Y++]=ct>>>8&255,Q[Y++]=255&ct;var dt=et/4294967296*1e4&268435455;Q[Y++]=dt>>>8&255,Q[Y++]=255&dt,Q[Y++]=dt>>>24&15|16,Q[Y++]=dt>>>16&255,Q[Y++]=J>>>8|128,Q[Y++]=255&J;for(var lt=0;lt<6;++lt)Q[Y+lt]=Z[lt];return K||it(Q)};const ht=function(q){if(!J(q))throw TypeError("Invalid UUID");var K,z=new Uint8Array(16);return z[0]=(K=parseInt(q.slice(0,8),16))>>>24,z[1]=K>>>16&255,z[2]=K>>>8&255,z[3]=255&K,z[4]=(K=parseInt(q.slice(9,13),16))>>>8,z[5]=255&K,z[6]=(K=parseInt(q.slice(14,18),16))>>>8,z[7]=255&K,z[8]=(K=parseInt(q.slice(19,23),16))>>>8,z[9]=255&K,z[10]=(K=parseInt(q.slice(24,36),16))/1099511627776&255,z[11]=K/4294967296&255,z[12]=K>>>24&255,z[13]=K>>>16&255,z[14]=K>>>8&255,z[15]=255&K,z};function ct(q,K,z){function Y(q,Y,Q,X){if("string"==typeof q&&(q=function(q){q=unescape(encodeURIComponent(q));for(var K=[],z=0;z>>9<<4)+1}function lt(q,K){var z=(65535&q)+(65535&K);return(q>>16)+(K>>16)+(z>>16)<<16|65535&z}function ut(q,K,z,Y,Q,X){return lt((Z=lt(lt(K,q),lt(Y,X)))<<(J=Q)|Z>>>32-J,z);var Z,J}function ft(q,K,z,Y,Q,X,Z){return ut(K&z|~K&Y,q,K,Q,X,Z)}function bt(q,K,z,Y,Q,X,Z){return ut(K&Y|z&~Y,q,K,Q,X,Z)}function pt(q,K,z,Y,Q,X,Z){return ut(K^z^Y,q,K,Q,X,Z)}function vt(q,K,z,Y,Q,X,Z){return ut(z^(K|~Y),q,K,Q,X,Z)}const gt=ct("v3",48,(function(q){if("string"==typeof q){var K=unescape(encodeURIComponent(q));q=new Uint8Array(K.length);for(var z=0;z>5]>>>Q%32&255,Z=parseInt(Y.charAt(X>>>4&15)+Y.charAt(15&X),16);K.push(Z)}return K}(function(q,K){q[K>>5]|=128<>5]|=(255&q[Y/8])<>>32-K}const Et=ct("v5",80,(function(q){var K=[1518500249,1859775393,2400959708,3395469782],z=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof q){var Y=unescape(encodeURIComponent(q));q=[];for(var Q=0;Q>>0;lt=dt,dt=ct,ct=_t(ht,30)>>>0,ht=ot,ot=bt}z[0]=z[0]+ot>>>0,z[1]=z[1]+ht>>>0,z[2]=z[2]+ct>>>0,z[3]=z[3]+dt>>>0,z[4]=z[4]+lt>>>0}return[z[0]>>24&255,z[0]>>16&255,z[0]>>8&255,255&z[0],z[1]>>24&255,z[1]>>16&255,z[1]>>8&255,255&z[1],z[2]>>24&255,z[2]>>16&255,z[2]>>8&255,255&z[2],z[3]>>24&255,z[3]>>16&255,z[3]>>8&255,255&z[3],z[4]>>24&255,z[4]>>16&255,z[4]>>8&255,255&z[4]]})),wt="00000000-0000-0000-0000-000000000000";const Tt=function(q){if(!J(q))throw TypeError("Invalid UUID");return parseInt(q.substr(14,1),16)}},40343:function(q,K){var z,Y,Q;!function(X,Z){"use strict";Y=[],void 0===(Q="function"==typeof(z=function(){function q(q){return!isNaN(parseFloat(q))&&isFinite(q)}function K(q){return q.charAt(0).toUpperCase()+q.substring(1)}function z(q){return function(){return this[q]}}var Y=["isConstructor","isEval","isNative","isToplevel"],Q=["columnNumber","lineNumber"],X=["fileName","functionName","source"],Z=["args"],J=["evalOrigin"],tt=Y.concat(Q,X,Z,J);function et(q){if(q)for(var z=0;zZ+1e3&&(tt.update(1e3*J/(q-Z),100),Z=q,J=0,it)){var K=performance.memory;it.update(K.usedJSHeapSize/1048576,K.jsHeapSizeLimit/1048576)}return q},update:function(){X=this.end()},domElement:Q,setMode:z}}).Panel=function(q,K,z){var Y=1/0,Q=0,X=Math.round,Z=X(window.devicePixelRatio||1),J=80*Z,tt=48*Z,et=3*Z,it=2*Z,st=3*Z,nt=15*Z,at=74*Z,rt=30*Z,ot=document.createElement("canvas");ot.width=J,ot.height=tt,ot.style.cssText="width:80px;height:48px";var ht=ot.getContext("2d");return ht.font="bold "+9*Z+"px Helvetica,Arial,sans-serif",ht.textBaseline="top",ht.fillStyle=z,ht.fillRect(0,0,J,tt),ht.fillStyle=K,ht.fillText(q,et,it),ht.fillRect(st,nt,at,rt),ht.fillStyle=z,ht.globalAlpha=.9,ht.fillRect(st,nt,at,rt),{dom:ot,update:function(tt,ct){Y=Math.min(Y,tt),Q=Math.max(Q,tt),ht.fillStyle=z,ht.globalAlpha=1,ht.fillRect(0,0,J,nt),ht.fillStyle=K,ht.fillText(X(tt)+" "+q+" ("+X(Y)+"-"+X(Q)+")",et,it),ht.drawImage(ot,st+Z,nt,at-Z,rt,st,nt,at-Z,rt),ht.fillRect(st+at-Z,nt,Z,rt),ht.fillStyle=z,ht.globalAlpha=.9,ht.fillRect(st+at-Z,nt,Z,X((1-tt/ct)*rt))}}},K)},7682:(q,K,z)=>{const Y=z(11607);q.exports=class extends Y{constructor(q,K){super(),this._streamDemux=q,this.name=K}createConsumer(q){return this._streamDemux.createConsumer(this.name,q)}}},47579:(q,K,z)=>{const Y=z(44658),Q=z(7682);q.exports=class{constructor(){this.streams={},this._nextConsumerId=1,this.generateConsumerId=()=>this._nextConsumerId++}write(q,K){this.streams[q]&&this.streams[q].write(K)}close(q,K){this.streams[q]&&this.streams[q].close(K)}closeAll(q){for(let K of Object.values(this.streams))K.close(q)}writeToConsumer(q,K){for(let z of Object.values(this.streams))if(z.hasConsumer(q))return z.writeToConsumer(q,K)}closeConsumer(q,K){for(let z of Object.values(this.streams))if(z.hasConsumer(q))return z.closeConsumer(q,K)}getConsumerStats(q){for(let[K,z]of Object.entries(this.streams))if(z.hasConsumer(q))return{...z.getConsumerStats(q),stream:K}}getConsumerStatsList(q){return this.streams[q]?this.streams[q].getConsumerStatsList().map((K=>({...K,stream:q}))):[]}getConsumerStatsListAll(){let q=[];for(let K of Object.keys(this.streams)){let z=this.getConsumerStatsList(K);for(let K of z)q.push(K)}return q}kill(q,K){this.streams[q]&&this.streams[q].kill(K)}killAll(q){for(let K of Object.values(this.streams))K.kill(q)}killConsumer(q,K){for(let z of Object.values(this.streams))if(z.hasConsumer(q))return z.killConsumer(q,K)}getBackpressure(q){return this.streams[q]?this.streams[q].getBackpressure():0}getBackpressureAll(){return Object.values(this.streams).reduce(((q,K)=>Math.max(q,K.getBackpressure())),0)}getConsumerBackpressure(q){for(let K of Object.values(this.streams))if(K.hasConsumer(q))return K.getConsumerBackpressure(q);return 0}hasConsumer(q,K){return!!this.streams[q]&&this.streams[q].hasConsumer(K)}hasConsumerAll(q){return Object.values(this.streams).some((K=>K.hasConsumer(q)))}getConsumerCount(q){return this.streams[q]?this.streams[q].getConsumerCount():0}getConsumerCountAll(){return Object.values(this.streams).reduce(((q,K)=>q+K.getConsumerCount()),0)}createConsumer(q,K){return this.streams[q]||(this.streams[q]=new Y({generateConsumerId:this.generateConsumerId,removeConsumerCallback:()=>{this.getConsumerCount(q)||delete this.streams[q]}})),this.streams[q].createConsumer(K)}stream(q){return new Q(this,q)}unstream(q){delete this.streams[q]}}},11607:q=>{class K{async next(q){let K=this.createConsumer(q),z=await K.next();return K.return(),z}async once(q){let K=await this.next(q);if(K.done){if(null!=q){let q=new Error("Stream consumer operation timed out early because stream ended");throw q.name="TimeoutError",q}await new Promise((()=>{}))}return K.value}createConsumer(){throw new TypeError("Method must be overriden by subclass")}[Symbol.asyncIterator](){return this.createConsumer()}}q.exports=K},24280:q=>{"use strict";q.exports=function(q){return encodeURIComponent(q).replace(/[!'()*]/g,(function(q){return"%"+q.charCodeAt(0).toString(16).toUpperCase()}))}},78465:function(q){q.exports=function(){"use strict";function q(K){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(q){return typeof q}:function(q){return q&&"function"==typeof Symbol&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q})(K)}function K(q,K){if(!(q instanceof K))throw new TypeError("Cannot call a class as a function")}function z(q,K){for(var z=0;z(K=parseInt(K.getAttribute("tabindex")))?1:q1&&void 0!==arguments[1]?arguments[1]:"flex";q.style.display=K},ve=function(q){q.style.display="none"},ge=function(q,K,z,Y){var Q=q.querySelector(K);Q&&(Q.style[z]=Y)},me=function(q,K,z){K?pe(q,z):ve(q)},ye=function(q){return!(!q||!(q.offsetWidth||q.offsetHeight||q.getClientRects().length))},_e=function(){return!ye(jt())&&!ye($t())&&!ye(Wt())},Ee=function(q){return!!(q.scrollHeight>q.clientHeight)},we=function(q){var K=window.getComputedStyle(q),z=parseFloat(K.getPropertyValue("animation-duration")||"0"),Y=parseFloat(K.getPropertyValue("transition-duration")||"0");return z>0||Y>0},Te=function(q,K){if("function"==typeof q.contains)return q.contains(K)},Se=function(q){var K=arguments.length>1&&void 0!==arguments[1]&&arguments[1],z=Yt();ye(z)&&(K&&(z.style.transition="none",z.style.width="100%"),setTimeout((function(){z.style.transition="width ".concat(q/1e3,"s linear"),z.style.width="0%"}),10))},Ae=function(){var q=Yt(),K=parseInt(window.getComputedStyle(q).width);q.style.removeProperty("transition"),q.style.width="100%";var z=parseInt(window.getComputedStyle(q).width),Y=parseInt(K/z*100);q.style.removeProperty("transition"),q.style.width="".concat(Y,"%")},Ce=function(){return"undefined"==typeof window||"undefined"==typeof document},Oe='\n
\n
\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n').replace(/(^|\n)\s*/g,""),Ie=function(){var q=Dt();return!!q&&(q.parentNode.removeChild(q),ue([document.documentElement,document.body],[Ot["no-backdrop"],Ot["toast-shown"],Ot["has-column"]]),!0)},De=function(q){oa.isVisible()&&he!==q.target.value&&oa.resetValidationMessage(),he=q.target.value},Re=function(){var q=kt(),K=fe(q,Ot.input),z=fe(q,Ot.file),Y=q.querySelector(".".concat(Ot.range," input")),Q=q.querySelector(".".concat(Ot.range," output")),X=fe(q,Ot.select),Z=q.querySelector(".".concat(Ot.checkbox," input")),J=fe(q,Ot.textarea);K.oninput=De,z.onchange=De,X.onchange=De,Z.onchange=De,J.oninput=De,Y.oninput=function(q){De(q),Q.value=Y.value},Y.onchange=function(q){De(q),Y.nextSibling.value=Y.value}},Pe=function(q){return"string"==typeof q?document.querySelector(q):q},Me=function(q){var K=Mt();K.setAttribute("role",q.toast?"alert":"dialog"),K.setAttribute("aria-live",q.toast?"polite":"assertive"),q.toast||K.setAttribute("aria-modal","true")},Ne=function(q){"rtl"===window.getComputedStyle(q).direction&&le(Dt(),Ot.rtl)},xe=function(q){var K=Ie();if(Ce())ft("SweetAlert2 requires document to initialize");else{var z=document.createElement("div");z.className=Ot.container,K&&le(z,Ot["no-transition"]),se(z,Oe);var Y=Pe(q.target);Y.appendChild(z),Me(q),Ne(Y),Re()}},Le=function(K,z){K instanceof HTMLElement?z.appendChild(K):"object"===q(K)?ke(K,z):K&&se(z,K)},ke=function(q,K){q.jquery?Be(K,q):se(K,q.toString())},Be=function(q,K){if(q.textContent="",0 in K)for(var z=0;z in K;z++)q.appendChild(K[z].cloneNode(!0));else q.appendChild(K.cloneNode(!0))},Ue=function(){if(Ce())return!1;var q=document.createElement("div"),K={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var z in K)if(Object.prototype.hasOwnProperty.call(K,z)&&void 0!==q.style[z])return K[z];return!1}(),Fe=function(){var q=document.createElement("div");q.className=Ot["scrollbar-measure"],document.body.appendChild(q);var K=q.getBoundingClientRect().width-q.clientWidth;return document.body.removeChild(q),K},Ge=function(q,K){var z=qt(),Y=Vt(),Q=jt(),X=$t(),Z=Wt();K.showConfirmButton||K.showDenyButton||K.showCancelButton||ve(z),re(z,K,"actions"),$e(Q,"confirm",K),$e(X,"deny",K),$e(Z,"cancel",K),je(Q,X,Z,K),K.reverseButtons&&(z.insertBefore(Z,Y),z.insertBefore(X,Y),z.insertBefore(Q,Y)),se(Y,K.loaderHtml),re(Y,K,"loader")};function je(q,K,z,Y){if(!Y.buttonsStyling)return ue([q,K,z],Ot.styled);le([q,K,z],Ot.styled),Y.confirmButtonColor&&(q.style.backgroundColor=Y.confirmButtonColor),Y.denyButtonColor&&(K.style.backgroundColor=Y.denyButtonColor),Y.cancelButtonColor&&(z.style.backgroundColor=Y.cancelButtonColor)}function $e(q,K,z){me(q,z["show".concat(ct(K),"Button")],"inline-block"),se(q,z["".concat(K,"ButtonText")]),q.setAttribute("aria-label",z["".concat(K,"ButtonAriaLabel")]),q.className=Ot[K],re(q,z,"".concat(K,"Button")),le(q,z["".concat(K,"ButtonClass")])}function He(q,K){"string"==typeof K?q.style.background=K:K||le([document.documentElement,document.body],Ot["no-backdrop"])}function Ve(q,K){K in Ot?le(q,Ot[K]):(ut('The "position" parameter is not valid, defaulting to "center"'),le(q,Ot.center))}function We(q,K){if(K&&"string"==typeof K){var z="grow-".concat(K);z in Ot&&le(q,Ot[z])}}var qe=function(q,K){var z=Dt();if(z){He(z,K.backdrop),!K.backdrop&&K.allowOutsideClick&&ut('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),Ve(z,K.position),We(z,K.grow),re(z,K,"container");var Y=document.body.getAttribute("data-swal2-queue-step");Y&&(z.setAttribute("data-queue-step",Y),document.body.removeAttribute("data-swal2-queue-step"))}},Ke={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},ze=["input","file","range","select","radio","checkbox","textarea"],Ye=function(q,K){var z=kt(),Y=Ke.innerParams.get(q),Q=!Y||K.input!==Y.input;ze.forEach((function(q){var Y=Ot[q],X=fe(z,Y);Ze(q,K.inputAttributes),X.className=Y,Q&&ve(X)})),K.input&&(Q&&Qe(K),Je(K))},Qe=function(q){if(!si[q.input])return ft('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(q.input,'"'));var K=ii(q.input),z=si[q.input](K,q);pe(z),setTimeout((function(){ce(z)}))},Xe=function(q){for(var K=0;KY?"".concat(K,"px"):null})).observe(q,{attributes:!0,attributeFilter:["style"]})}return q};var ni=function(q,K){var z=kt().querySelector("#".concat(Ot.content));K.html?(Le(K.html,z),pe(z,"block")):K.text?(z.textContent=K.text,pe(z,"block")):ve(z),Ye(q,K),re(kt(),K,"content")},ai=function(q,K){var z=zt();me(z,K.footer),K.footer&&Le(K.footer,z),re(z,K,"footer")},ri=function(q,K){var z=Qt();se(z,K.closeButtonHtml),re(z,K,"closeButton"),me(z,K.showCloseButton),z.setAttribute("aria-label",K.closeButtonAriaLabel)},oi=function(q,K){var z=Ke.innerParams.get(q);if(z&&K.icon===z.icon&&xt())ci(xt(),K);else if(hi(),K.icon)if(-1!==Object.keys(It).indexOf(K.icon)){var Y=Rt(".".concat(Ot.icon,".").concat(It[K.icon]));pe(Y),li(Y,K),ci(Y,K),le(Y,K.showClass.icon)}else ft('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(K.icon,'"'))},hi=function(){for(var q=Nt(),K=0;K\n \n
    \n
    \n '):"error"===K.icon?se(q,'\n \n \n \n \n '):se(q,fi({question:"?",warning:"!",info:"i"}[K.icon]))},ui=function(q,K){if(K.iconColor){q.style.color=K.iconColor,q.style.borderColor=K.iconColor;for(var z=0,Y=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];z').concat(q,"")},bi=function(q,K){var z=Ut();if(!K.imageUrl)return ve(z);pe(z,""),z.setAttribute("src",K.imageUrl),z.setAttribute("alt",K.imageAlt),be(z,"width",K.imageWidth),be(z,"height",K.imageHeight),z.className=Ot.image,re(z,K,"image")},pi=[],vi=function(q){var K=this;pi=q;var z=function(q,K){pi=[],q(K)},Y=[];return new Promise((function(q){!function Q(X,Z){X=K.progressSteps.length&&ut("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),K.progressSteps.forEach((function(q,Q){var X=_i(q);if(z.appendChild(X),Q===Y&&le(X,Ot["active-progress-step"]),Q!==K.progressSteps.length-1){var Z=Ei(K);z.appendChild(Z)}}))},Ti=function(q,K){var z=Lt();me(z,K.title||K.titleText),K.title&&Le(K.title,z),K.titleText&&(z.innerText=K.titleText),re(z,K,"title")},Si=function(q,K){var z=Kt();re(z,K,"header"),wi(q,K),oi(q,K),bi(q,K),Ti(q,K),ri(q,K)},Ai=function(q,K){var z=Mt();be(z,"width",K.width),be(z,"padding",K.padding),K.background&&(z.style.background=K.background),Ci(z,K)},Ci=function(q,K){q.className="".concat(Ot.popup," ").concat(ye(q)?K.showClass.popup:""),K.toast?(le([document.documentElement,document.body],Ot["toast-shown"]),le(q,Ot.toast)):le(q,Ot.modal),re(q,K,"popup"),"string"==typeof K.customClass&&le(q,K.customClass),K.icon&&le(q,Ot["icon-".concat(K.icon)])},Oi=function(q,K){Ai(q,K),qe(q,K),Si(q,K),ni(q,K),Ge(q,K),ai(q,K),"function"==typeof K.didRender?K.didRender(Mt()):"function"==typeof K.onRender&&K.onRender(Mt())},Ii=function(){return ye(Mt())},Di=function(){return jt()&&jt().click()},Ri=function(){return $t()&&$t().click()},Pi=function(){return Wt()&&Wt().click()};function Mi(){for(var q=this,K=arguments.length,z=new Array(K),Y=0;Y0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,Wi||(document.body.addEventListener("click",zi),Wi=!0)}var zi=function(q){for(var K=q.target;K&&K!==document;K=K.parentNode)for(var z in qi){var Y=K.getAttribute(z);if(Y)return void qi[z].fire({template:Y})}},Yi={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,willOpen:void 0,didOpen:void 0,onRender:void 0,didRender:void 0,onClose:void 0,onAfterClose:void 0,willClose:void 0,didClose:void 0,onDestroy:void 0,didDestroy:void 0,scrollbarPadding:!0},Qi=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Xi={animation:'showClass" and "hideClass',onBeforeOpen:"willOpen",onOpen:"didOpen",onRender:"didRender",onClose:"willClose",onAfterClose:"didClose",onDestroy:"didDestroy"},Zi=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","heightAuto","keydownListenerCapture"],Ji=function(q){return Object.prototype.hasOwnProperty.call(Yi,q)},ts=function(q){return-1!==Qi.indexOf(q)},es=function(q){return Xi[q]},is=function(q){Ji(q)||ut('Unknown parameter "'.concat(q,'"'))},ss=function(q){-1!==Zi.indexOf(q)&&ut('The parameter "'.concat(q,'" is incompatible with toasts'))},ns=function(q){es(q)&&vt(q,es(q))},as=function(q){for(var K in q)is(K),q.toast&&ss(K),ns(K)},rs=Object.freeze({isValidParameter:Ji,isUpdatableParameter:ts,isDeprecatedParameter:es,argsToParams:St,isVisible:Ii,clickConfirm:Di,clickDeny:Ri,clickCancel:Pi,getContainer:Dt,getPopup:Mt,getTitle:Lt,getContent:kt,getHtmlContainer:Bt,getImage:Ut,getIcon:xt,getIcons:Nt,getInputLabel:Ht,getCloseButton:Qt,getActions:qt,getConfirmButton:jt,getDenyButton:$t,getCancelButton:Wt,getLoader:Vt,getHeader:Kt,getFooter:zt,getTimerProgressBar:Yt,getFocusableElements:Zt,getValidationMessage:Gt,isLoading:ee,fire:Mi,mixin:Ni,queue:vi,getQueueStep:gi,insertQueueStep:mi,deleteQueueStep:yi,showLoading:xi,enableLoading:xi,getTimerLeft:Fi,stopTimer:Gi,resumeTimer:ji,toggleTimer:$i,increaseTimer:Hi,isTimerRunning:Vi,bindClickHandler:Ki});function os(){if(Ke.innerParams.get(this)){var q=Ke.domCache.get(this);ve(q.loader);var K=q.popup.getElementsByClassName(q.loader.getAttribute("data-button-to-replace"));K.length?pe(K[0],"inline-block"):_e()&&ve(q.actions),ue([q.popup,q.actions],Ot.loading),q.popup.removeAttribute("aria-busy"),q.popup.removeAttribute("data-loading"),q.confirmButton.disabled=!1,q.denyButton.disabled=!1,q.cancelButton.disabled=!1}}function hs(q){var K=Ke.innerParams.get(q||this),z=Ke.domCache.get(q||this);return z?oe(z.content,K.input):null}var cs=function(){null===ie.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(ie.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(ie.previousBodyPadding+Fe(),"px"))},ds=function(){null!==ie.previousBodyPadding&&(document.body.style.paddingRight="".concat(ie.previousBodyPadding,"px"),ie.previousBodyPadding=null)},ls=function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!ne(document.body,Ot.iosfix)){var q=document.body.scrollTop;document.body.style.top="".concat(-1*q,"px"),le(document.body,Ot.iosfix),fs(),us()}},us=function(){if(!navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)){var q=44;Mt().scrollHeight>window.innerHeight-q&&(Dt().style.paddingBottom="".concat(q,"px"))}},fs=function(){var q,K=Dt();K.ontouchstart=function(K){q=bs(K)},K.ontouchmove=function(K){q&&(K.preventDefault(),K.stopPropagation())}},bs=function(q){var K=q.target,z=Dt();return!(ps(q)||vs(q)||K!==z&&(Ee(z)||"INPUT"===K.tagName||Ee(kt())&&kt().contains(K)))},ps=function(q){return q.touches&&q.touches.length&&"stylus"===q.touches[0].touchType},vs=function(q){return q.touches&&q.touches.length>1},gs=function(){if(ne(document.body,Ot.iosfix)){var q=parseInt(document.body.style.top,10);ue(document.body,Ot.iosfix),document.body.style.top="",document.body.scrollTop=-1*q}},ms=function(){return!!window.MSInputMethodContext&&!!document.documentMode},ys=function(){var q=Dt(),K=Mt();q.style.removeProperty("align-items"),K.offsetTop<0&&(q.style.alignItems="flex-start")},_s=function(){"undefined"!=typeof window&&ms()&&(ys(),window.addEventListener("resize",ys))},Es=function(){"undefined"!=typeof window&&ms()&&window.removeEventListener("resize",ys)},ws=function(){lt(document.body.children).forEach((function(q){q===Dt()||Te(q,Dt())||(q.hasAttribute("aria-hidden")&&q.setAttribute("data-previous-aria-hidden",q.getAttribute("aria-hidden")),q.setAttribute("aria-hidden","true"))}))},Ts=function(){lt(document.body.children).forEach((function(q){q.hasAttribute("data-previous-aria-hidden")?(q.setAttribute("aria-hidden",q.getAttribute("data-previous-aria-hidden")),q.removeAttribute("data-previous-aria-hidden")):q.removeAttribute("aria-hidden")}))},Ss={swalPromiseResolve:new WeakMap};function As(q,K,z,Y){z?Ms(q,Y):(Ui().then((function(){return Ms(q,Y)})),ki.keydownTarget.removeEventListener("keydown",ki.keydownHandler,{capture:ki.keydownListenerCapture}),ki.keydownHandlerAdded=!1),K.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&K.parentNode.removeChild(K),Jt()&&(ds(),gs(),Es(),Ts()),Cs()}function Cs(){ue([document.documentElement,document.body],[Ot.shown,Ot["height-auto"],Ot["no-backdrop"],Ot["toast-shown"],Ot["toast-column"]])}function Os(q){var K=Mt();if(K){q=Is(q);var z=Ke.innerParams.get(this);if(z&&!ne(K,z.hideClass.popup)){var Y=Ss.swalPromiseResolve.get(this);ue(K,z.showClass.popup),le(K,z.hideClass.popup);var Q=Dt();ue(Q,z.showClass.backdrop),le(Q,z.hideClass.backdrop),Ds(this,K,z),Y(q)}}}var Is=function(q){return void 0===q?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Q({isConfirmed:!1,isDenied:!1,isDismissed:!1},q)},Ds=function(q,K,z){var Y=Dt(),Q=Ue&&we(K),X=z.onClose,Z=z.onAfterClose,J=z.willClose,tt=z.didClose;Rs(K,J,X),Q?Ps(q,K,Y,tt||Z):As(q,Y,te(),tt||Z)},Rs=function(q,K,z){null!==K&&"function"==typeof K?K(q):null!==z&&"function"==typeof z&&z(q)},Ps=function(q,K,z,Y){ki.swalCloseEventFinishedCallback=As.bind(null,q,z,te(),Y),K.addEventListener(Ue,(function(q){q.target===K&&(ki.swalCloseEventFinishedCallback(),delete ki.swalCloseEventFinishedCallback)}))},Ms=function(q,K){setTimeout((function(){"function"==typeof K&&K(),q._destroy()}))};function Ns(q,K,z){var Y=Ke.domCache.get(q);K.forEach((function(q){Y[q].disabled=z}))}function xs(q,K){if(!q)return!1;if("radio"===q.type)for(var z=q.parentNode.parentNode.querySelectorAll("input"),Y=0;Y")),xe(q)}var Ks=["swal-title","swal-html","swal-footer"],zs=function(q){var K="string"==typeof q.template?document.querySelector(q.template):q.template;if(!K)return{};var z=K.content||K;return en(z),Q(Ys(z),Qs(z),Xs(z),Zs(z),Js(z),tn(z,Ks))},Ys=function(K){var z={};return lt(K.querySelectorAll("swal-param")).forEach((function(K){sn(K,["name","value"]);var Y=K.getAttribute("name"),Q=K.getAttribute("value");"boolean"==typeof Yi[Y]&&"false"===Q&&(Q=!1),"object"===q(Yi[Y])&&(Q=JSON.parse(Q)),z[Y]=Q})),z},Qs=function(q){var K={};return lt(q.querySelectorAll("swal-button")).forEach((function(q){sn(q,["type","color","aria-label"]);var z=q.getAttribute("type");K["".concat(z,"ButtonText")]=q.innerHTML,K["show".concat(ct(z),"Button")]=!0,q.hasAttribute("color")&&(K["".concat(z,"ButtonColor")]=q.getAttribute("color")),q.hasAttribute("aria-label")&&(K["".concat(z,"ButtonAriaLabel")]=q.getAttribute("aria-label"))})),K},Xs=function(q){var K={},z=q.querySelector("swal-image");return z&&(sn(z,["src","width","height","alt"]),z.hasAttribute("src")&&(K.imageUrl=z.getAttribute("src")),z.hasAttribute("width")&&(K.imageWidth=z.getAttribute("width")),z.hasAttribute("height")&&(K.imageHeight=z.getAttribute("height")),z.hasAttribute("alt")&&(K.imageAlt=z.getAttribute("alt"))),K},Zs=function(q){var K={},z=q.querySelector("swal-icon");return z&&(sn(z,["type","color"]),z.hasAttribute("type")&&(K.icon=z.getAttribute("type")),z.hasAttribute("color")&&(K.iconColor=z.getAttribute("color")),K.iconHtml=z.innerHTML),K},Js=function(q){var K={},z=q.querySelector("swal-input");z&&(sn(z,["type","label","placeholder","value"]),K.input=z.getAttribute("type")||"text",z.hasAttribute("label")&&(K.inputLabel=z.getAttribute("label")),z.hasAttribute("placeholder")&&(K.inputPlaceholder=z.getAttribute("placeholder")),z.hasAttribute("value")&&(K.inputValue=z.getAttribute("value")));var Y=q.querySelectorAll("swal-input-option");return Y.length&&(K.inputOptions={},lt(Y).forEach((function(q){sn(q,["value"]);var z=q.getAttribute("value"),Y=q.innerHTML;K.inputOptions[z]=Y}))),K},tn=function(q,K){var z={};for(var Y in K){var Q=K[Y],X=q.querySelector(Q);X&&(sn(X,[]),z[Q.replace(/^swal-/,"")]=X.innerHTML)}return z},en=function(q){var K=Ks.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);lt(q.querySelectorAll("*")).forEach((function(q){var z=q.tagName.toLowerCase();-1===K.indexOf(z)&&ut("Unrecognized element <".concat(z,">"))}))},sn=function(q,K){lt(q.attributes).forEach((function(z){-1===K.indexOf(z.name)&&ut(['Unrecognized attribute "'.concat(z.name,'" on <').concat(q.tagName.toLowerCase(),">."),"".concat(K.length?"Allowed attributes are: ".concat(K.join(", ")):"To set the value, use HTML within the element.")])}))},nn=10,an=function(q){var K=Dt(),z=Mt();"function"==typeof q.willOpen?q.willOpen(z):"function"==typeof q.onBeforeOpen&&q.onBeforeOpen(z);var Y=window.getComputedStyle(document.body).overflowY;dn(K,z,q),setTimeout((function(){hn(K,z)}),nn),Jt()&&(cn(K,q.scrollbarPadding,Y),ws()),te()||ki.previousActiveElement||(ki.previousActiveElement=document.activeElement),rn(z,q),ue(K,Ot["no-transition"])},rn=function(q,K){"function"==typeof K.didOpen?setTimeout((function(){return K.didOpen(q)})):"function"==typeof K.onOpen&&setTimeout((function(){return K.onOpen(q)}))},on=function q(K){var z=Mt();if(K.target===z){var Y=Dt();z.removeEventListener(Ue,q),Y.style.overflowY="auto"}},hn=function(q,K){Ue&&we(K)?(q.style.overflowY="hidden",K.addEventListener(Ue,on)):q.style.overflowY="auto"},cn=function(q,K,z){ls(),_s(),K&&"hidden"!==z&&cs(),setTimeout((function(){q.scrollTop=0}))},dn=function(q,K,z){le(q,z.showClass.backdrop),K.style.setProperty("opacity","0","important"),pe(K),setTimeout((function(){le(K,z.showClass.popup),K.style.removeProperty("opacity")}),nn),le([document.documentElement,document.body],Ot.shown),z.heightAuto&&z.backdrop&&!z.toast&&le([document.documentElement,document.body],Ot["height-auto"])},ln=function(q,K){"select"===K.input||"radio"===K.input?vn(q,K):-1!==["text","email","number","tel","textarea"].indexOf(K.input)&&(mt(K.inputValue)||_t(K.inputValue))&&gn(q,K)},un=function(q,K){var z=q.getInput();if(!z)return null;switch(K.input){case"checkbox":return fn(z);case"radio":return bn(z);case"file":return pn(z);default:return K.inputAutoTrim?z.value.trim():z.value}},fn=function(q){return q.checked?1:0},bn=function(q){return q.checked?q.value:null},pn=function(q){return q.files.length?null!==q.getAttribute("multiple")?q.files:q.files[0]:null},vn=function(K,z){var Y=kt(),Q=function(q){return mn[z.input](Y,yn(q),z)};mt(z.inputOptions)||_t(z.inputOptions)?(xi(),yt(z.inputOptions).then((function(q){K.hideLoading(),Q(q)}))):"object"===q(z.inputOptions)?Q(z.inputOptions):ft("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(q(z.inputOptions)))},gn=function(q,K){var z=q.getInput();ve(z),yt(K.inputValue).then((function(Y){z.value="number"===K.input?parseFloat(Y)||0:"".concat(Y),pe(z),z.focus(),q.hideLoading()})).catch((function(K){ft("Error in inputValue promise: ".concat(K)),z.value="",pe(z),z.focus(),q.hideLoading()}))},mn={select:function(q,K,z){var Y=fe(q,Ot.select),Q=function(q,K,Y){var Q=document.createElement("option");Q.value=Y,se(Q,K),Q.selected=_n(Y,z.inputValue),q.appendChild(Q)};K.forEach((function(q){var K=q[0],z=q[1];if(Array.isArray(z)){var X=document.createElement("optgroup");X.label=K,X.disabled=!1,Y.appendChild(X),z.forEach((function(q){return Q(X,q[1],q[0])}))}else Q(Y,z,K)})),Y.focus()},radio:function(q,K,z){var Y=fe(q,Ot.radio);K.forEach((function(q){var K=q[0],Q=q[1],X=document.createElement("input"),Z=document.createElement("label");X.type="radio",X.name=Ot.radio,X.value=K,_n(K,z.inputValue)&&(X.checked=!0);var J=document.createElement("span");se(J,Q),J.className=Ot.label,Z.appendChild(X),Z.appendChild(J),Y.appendChild(Z)}));var Q=Y.querySelectorAll("input");Q.length&&Q[0].focus()}},yn=function K(z){var Y=[];return"undefined"!=typeof Map&&z instanceof Map?z.forEach((function(z,Q){var X=z;"object"===q(X)&&(X=K(X)),Y.push([Q,X])})):Object.keys(z).forEach((function(Q){var X=z[Q];"object"===q(X)&&(X=K(X)),Y.push([Q,X])})),Y},_n=function(q,K){return K&&K.toString()===q.toString()},En=function(q,K){q.disableButtons(),K.input?Sn(q,K,"confirm"):In(q,K,!0)},wn=function(q,K){q.disableButtons(),K.returnInputValueOnDeny?Sn(q,K,"deny"):Cn(q,K,!1)},Tn=function(q,K){q.disableButtons(),K(Et.cancel)},Sn=function(q,K,z){var Y=un(q,K);K.inputValidator?An(q,K,Y):q.getInput().checkValidity()?"deny"===z?Cn(q,K,Y):In(q,K,Y):(q.enableButtons(),q.showValidationMessage(K.validationMessage))},An=function(q,K,z){q.disableInput(),Promise.resolve().then((function(){return yt(K.inputValidator(z,K.validationMessage))})).then((function(Y){q.enableButtons(),q.enableInput(),Y?q.showValidationMessage(Y):In(q,K,z)}))},Cn=function(q,K,z){K.preDeny?Promise.resolve().then((function(){return yt(K.preDeny(z,K.validationMessage))})).then((function(K){!1===K?q.hideLoading():q.closePopup({isDenied:!0,value:void 0===K?z:K})})):q.closePopup({isDenied:!0,value:z})},On=function(q,K){q.closePopup({isConfirmed:!0,value:K})},In=function(q,K,z){K.showLoaderOnConfirm&&xi(),K.preConfirm?(q.resetValidationMessage(),Promise.resolve().then((function(){return yt(K.preConfirm(z,K.validationMessage))})).then((function(K){ye(Gt())||!1===K?q.hideLoading():On(q,void 0===K?z:K)}))):On(q,z)},Dn=function(q,K,z,Y){K.keydownTarget&&K.keydownHandlerAdded&&(K.keydownTarget.removeEventListener("keydown",K.keydownHandler,{capture:K.keydownListenerCapture}),K.keydownHandlerAdded=!1),z.toast||(K.keydownHandler=function(K){return xn(q,K,Y)},K.keydownTarget=z.keydownListenerCapture?window:Mt(),K.keydownListenerCapture=z.keydownListenerCapture,K.keydownTarget.addEventListener("keydown",K.keydownHandler,{capture:K.keydownListenerCapture}),K.keydownHandlerAdded=!0)},Rn=function(q,K,z){var Y=Zt();if(Y.length)return(K+=z)===Y.length?K=0:-1===K&&(K=Y.length-1),Y[K].focus();Mt().focus()},Pn=["ArrowRight","ArrowDown","Right","Down"],Mn=["ArrowLeft","ArrowUp","Left","Up"],Nn=["Escape","Esc"],xn=function(q,K,z){var Y=Ke.innerParams.get(q);Y.stopKeydownPropagation&&K.stopPropagation(),"Enter"===K.key?Ln(q,K,Y):"Tab"===K.key?kn(K,Y):-1!==[].concat(Pn,Mn).indexOf(K.key)?Bn(K.key):-1!==Nn.indexOf(K.key)&&Un(K,Y,z)},Ln=function(q,K,z){if(!K.isComposing&&K.target&&q.getInput()&&K.target.outerHTML===q.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(z.input))return;Di(),K.preventDefault()}},kn=function(q,K){for(var z=q.target,Y=Zt(),Q=-1,X=0;X1&&void 0!==arguments[1]?arguments[1]:{};as(Q({},K,q)),ki.currentInstance&&ki.currentInstance._destroy(),ki.currentInstance=this;var z=qn(q,K);qs(z),Object.freeze(z),ki.timeout&&(ki.timeout.stop(),delete ki.timeout),clearTimeout(ki.restoreFocusTimeout);var Y=zn(this);return Oi(this,z),Ke.innerParams.set(this,z),Kn(this,Y,z)}var qn=function(q,K){var z=zs(q),Y=Q({},Yi.showClass,K.showClass,z.showClass,q.showClass),X=Q({},Yi.hideClass,K.hideClass,z.hideClass,q.hideClass),Z=Q({},Yi,K,z,q);return Z.showClass=Y,Z.hideClass=X,!1===q.animation&&(Z.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},Z.hideClass={}),Z},Kn=function(q,K,z){return new Promise((function(Y){var Q=function(K){q.closePopup({isDismissed:!0,dismiss:K})};Ss.swalPromiseResolve.set(q,Y),K.confirmButton.onclick=function(){return En(q,z)},K.denyButton.onclick=function(){return wn(q,z)},K.cancelButton.onclick=function(){return Tn(q,Q)},K.closeButton.onclick=function(){return Q(Et.close)},Fn(q,K,Q),Dn(q,ki,z,Q),z.toast&&(z.input||z.footer||z.showCloseButton)?le(document.body,Ot["toast-column"]):ue(document.body,Ot["toast-column"]),ln(q,z),an(z),Yn(ki,z,Q),Qn(K,z),setTimeout((function(){K.container.scrollTop=0}))}))},zn=function(q){var K={popup:Mt(),container:Dt(),content:kt(),actions:qt(),confirmButton:jt(),denyButton:$t(),cancelButton:Wt(),loader:Vt(),closeButton:Qt(),validationMessage:Gt(),progressSteps:Ft()};return Ke.domCache.set(q,K),K},Yn=function(q,K,z){var Y=Yt();ve(Y),K.timer&&(q.timeout=new $s((function(){z("timer"),delete q.timeout}),K.timer),K.timerProgressBar&&(pe(Y),setTimeout((function(){q.timeout&&q.timeout.running&&Se(K.timer)}))))},Qn=function(q,K){if(!K.toast)return gt(K.allowEnterKey)?void(Xn(q,K)||Rn(K,-1,1)):Zn()},Xn=function(q,K){return K.focusDeny&&ye(q.denyButton)?(q.denyButton.focus(),!0):K.focusCancel&&ye(q.cancelButton)?(q.cancelButton.focus(),!0):!(!K.focusConfirm||!ye(q.confirmButton)||(q.confirmButton.focus(),0))},Zn=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};function Jn(q){var K=Mt(),z=Ke.innerParams.get(this);if(!K||ne(K,z.hideClass.popup))return ut("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var Y={};Object.keys(q).forEach((function(K){oa.isUpdatableParameter(K)?Y[K]=q[K]:ut('Invalid parameter to update: "'.concat(K,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}));var X=Q({},z,Y);Oi(this,X),Ke.innerParams.set(this,X),Object.defineProperties(this,{params:{value:Q({},this.params,q),writable:!1,enumerable:!0}})}function ta(){var q=Ke.domCache.get(this),K=Ke.innerParams.get(this);K&&(q.popup&&ki.swalCloseEventFinishedCallback&&(ki.swalCloseEventFinishedCallback(),delete ki.swalCloseEventFinishedCallback),ki.deferDisposalTimer&&(clearTimeout(ki.deferDisposalTimer),delete ki.deferDisposalTimer),ia(K),sa(this))}var ea,ia=function(q){"function"==typeof q.didDestroy?q.didDestroy():"function"==typeof q.onDestroy&&q.onDestroy()},sa=function(q){delete q.params,delete ki.keydownHandler,delete ki.keydownTarget,na(Ke),na(Ss)},na=function(q){for(var K in q)q[K]=new WeakMap},aa=Object.freeze({hideLoading:os,disableLoading:os,getInput:hs,close:Os,closePopup:Os,closeModal:Os,closeToast:Os,enableButtons:Ls,disableButtons:ks,enableInput:Bs,disableInput:Us,showValidationMessage:Fs,resetValidationMessage:Gs,getProgressSteps:js,_main:Wn,update:Jn,_destroy:ta}),ra=function(){function q(){if(K(this,q),"undefined"!=typeof window){"undefined"==typeof Promise&&ft("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),ea=this;for(var z=arguments.length,Y=new Array(z),Q=0;Q:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-no-transition{transition:none!important}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:5px;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center;padding:0 1.8em}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0 1.6em}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#2778c4;color:#fff;font-size:1.0625em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0 1.6em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{display:none;align-items:center;justify-content:center;margin:0 -2.7em;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}')},62248:(q,K,z)=>{"use strict";z.d(K,{l6:()=>Y});var Y,Q,X=z(92661);!function(q){q.Rescue="rescue",q.Evolution="evolution",q.LostPet="lostPetCost",q.Merge="merge"}(Y||(Y={})),function(q){q.Rescue="rescue",q.Evolution="evolution",q.LostPet="lostPetCost"}(Q||(Q={}));const Z=X.g1P(X.k5n(Q),X.aig().min(0)),J=X.g1P(X.YjP(),Z),tt=X.g1P(X.YjP(),J),et=X.g1P(X.YjP(),tt),it=X.Ikc({level:X.YOg(X.aig().int().min(1))});X.Ikc({name:X.YjP(),variants:X.g1P(X.YjP(),et),levelCapsEvolutionVariant:X.g1P(X.YjP(),it)})},95359:(q,K,z)=>{"use strict";z.d(K,{IE:()=>Q});var Y,Q,X=z(92661);!function(q){q.StatsCommon="statsCom",q.StatsUncommon="statsUnc",q.StatsRare="statsRar",q.StatsHeroic="statsHer",q.StatsLegendary="statsLeg",q.Default="default",q.Wizard="wizard",q.PuppetMaster="puppetMaster",q.Boss="boss",q.Miniboss="miniboss",q.IllusionBoss="illusionBoss",q.DragonBoss="dragonBoss",q.HoodedWizard="hoodedWizard",q.Pippet="pippet"}(Y||(Y={})),function(q){q.Power="power",q.Defence="defence",q.Speed="speed",q.Hp="hp"}(Q||(Q={}));X.g1P(X.k5n(Y),X.YOg(X.Whr()))},76572:(q,K,z)=>{"use strict";z.d(K,{_:()=>Y});class Y{constructor(q=null){this._message=null,null!==q&&this.setErrorMessage(q)}setErrorMessage(q){this._message=q}getErrorMessage(){return this._message}}},30334:(q,K,z)=>{"use strict";z.d(K,{z:()=>Y});const Y=5},113:(q,K,z)=>{"use strict";var Y;z.d(K,{O:()=>Y}),function(q){q.Firefly="forest",q.Shiverchill="shiverchill",q.Skywatch="skywatch",q.Bonfire="bonfire",q.Shipwreck="shipwreck",q.TowerTown="towertown"}(Y||(Y={}))},26077:(q,K,z)=>{"use strict";z.d(K,{$N:()=>Q,gW:()=>Z,mX:()=>X});var Y=z(17446);const Q={[Y.E.Common]:"common",[Y.E.Uncommon]:"uncommon",[Y.E.Rare]:"rare",[Y.E.Heroic]:"heroic",[Y.E.Legendary]:"legendary"},X={common:Y.E.Common,uncommon:Y.E.Uncommon,rare:Y.E.Rare,heroic:Y.E.Heroic,legendary:Y.E.Legendary},Z={Shiny:"_shiny"}},88022:(q,K,z)=>{"use strict";var Y;z.d(K,{_:()=>Y}),function(q){q.Academy_tower_cr_stools_json="60831677-d459-4006-b97b-321a443e09e0",q.Academy_tower_progress_ui_json="b315cf38-adc5-4ea0-bbbd-99f07fcc55d6",q.Academy_towers_name_banner_json="10311b80-4c09-4b54-b083-716e468c29a7",q.Boss_aspen_extras_json="1057de44-bd55-402c-9b9b-3d267c2bb1df",q.Boss_bonfire_json="6d821273-7cd7-4606-9930-4bcd492003a3",q.Boss_gerald_json="c38cef60-fc17-4628-85f4-f1ed7873d9ba",q.Boss_gerald_shadow_json="d0b270a9-222d-4ac9-b96f-1227b94e1b9d",q.Boss_skywatch_json="923c301b-5f07-4471-978d-92696c52c468",q.Boss_titan_barrier_break_json="9b4f9957-c4c4-412f-995d-fffcd5d74c3a",q.Boss_titan_barrier_json="74921264-90f3-4c07-8930-4c8d720db79d",q.Boss_titan_json="c5025568-47f7-4303-8be4-0544b422ee64",q.Boss_titan_spark_json="b2b8887a-5bfd-42a3-be4e-3bd1cd85b1c1",q.Daily_login_calendar_json="f1652f03-1fde-46d1-9c82-613d85d2c2c6",q.Duels_matchmaking_json="d1bae84f-a96a-4222-881b-70c1e0883620",q.Event_daily_login_bonus_json="bd03a84a-cc64-4c9d-a58b-92c1f2ac814f",q.Event_moonlightfest_json="a34cf420-9dcb-491b-925d-c1cc316c7fbf",q.Event_october_json="b083cb98-ade8-47e7-9bf2-3fdb4387478c",q.Event_pumpkinfest_json="8881b8c9-9f10-4a59-a091-4ac2a46ac45f",q.Event_starlight_festival_json="3aba1b12-409e-408f-820b-a1885cd7237d",q.Event_summerfest_json="800bd696-72ce-4b35-b35e-aad290b78e58",q.Event_winterfest_json="dbe9b147-c96e-4a9f-bad2-4ec1cd7a401d",q.Floatling_fling_json="bbffa1b6-79e3-4b8a-ace2-7796565cf015",q.Font_battle_json="9b54d364-ec74-4a2e-9243-2b671483d4d6",q.Font_black_json="8a50a2dc-f9fc-4b6e-8163-af4a680d838c",q.Font_button_json="c494006d-6fa2-4553-a7d6-8fe6614f304a",q.Font_general_json="05c2c8d0-b6b2-4e4a-ae81-c217ad7d94b8",q.Font_microtransactions_json="6598b520-06b1-4105-bc0a-4de6a3466dd6",q.Font_shadow_json="96fc3ba0-27ef-4c7c-8ad4-8a84a3b9b8de",q.Font_ui_json="7a182121-0b1a-405c-9817-d6b99e054f5b",q.Game_dancedance_json="b2c4d03f-f1ad-49b6-9820-a81a96eaf61d",q.Game_dinodig_json="33cb1fa0-9c1c-4993-a05f-5b6d9c5467ff",q.General_attacks_json="5f06769f-7269-4807-ba66-be1724860507",q.General_battle_json="81521922-a876-4f7f-940a-ce9644c08f98",q.General_chat_hud_json="d45aa48d-e364-4ba6-9a7e-750d1c844e89",q.General_core_2_json="59c467aa-1adc-4bbf-b606-2428f41951a1",q.General_core_json="37fd2547-8939-4c13-8d91-a91f6ef2b82b",q.General_icons_hud_json="45f1d6ab-c455-4b28-ad0d-ef053fa9d2d4",q.General_icons_json="c4d59570-c1cb-4065-a35d-7135af6fa51a",q.General_login_json="b495cec9-b305-405c-bbf7-ec3643cdece0",q.General_map_json="a966f131-7d30-4c69-9a0a-b380775f79e9",q.General_pets_json="9a91d86e-34ec-4cd6-98b9-195c4716bea0",q.Icon_topic_pixel_json="3f38b8e3-ae48-4db2-a101-495c7ae9154e",q.Icons_house_buying_json="ae662eab-b93c-48d4-98e5-ebb534bb2288",q.Icons_house_json="970feac8-062e-4ed4-87ba-f793dd3323cc",q.Icons_menu_json="ef63444d-f511-4327-b9de-257197813f80",q.Npc_face_arena_master_json="692b081b-198e-4f2c-afc1-60b603570baf",q.Npc_face_aspen_json="1de12143-69cc-4942-a0d4-ca5c153ca68f",q.Npc_face_astraldragon_json="333cdeff-3307-4aca-9c79-a968b5070953",q.Npc_face_athena_json="41d37a49-933f-4bd1-93e2-d82005e14d99",q.Npc_face_bargo_bunny_json="643f0ce1-969a-42d1-8c30-82715a7fb308",q.Npc_face_benni_json="2f8caf7a-0a31-43ef-9944-e11d4acf82e1",q.Npc_face_bok_json="00bc919e-62cf-413d-bbbc-1b2cc5724468",q.Npc_face_boombox_json="598c699e-e706-4ec1-b352-cf591a6da7f1",q.Npc_face_broccolina_json="332e3dad-e456-4dbf-a558-ae249e53ccbe",q.Npc_face_cebollini_json="3d77fb75-e7ca-4411-81cf-dbfeeebf126e",q.Npc_face_clankboot_json="ddf6db07-2615-4905-8f8e-91c47704a79d",q.Npc_face_cloakedwizard_json="78887024-6a01-4ef6-af87-233e0d0392e9",q.Npc_face_cumulo_json="dcd879ec-b168-4478-a953-9e3a47b62614",q.Npc_face_don_zorro_json="211b4ec2-8f41-42f6-a66b-56b5b7deea28",q.Npc_face_eugene_json="b6fa766e-ec12-439e-af3c-239f26561ab8",q.Npc_face_eve_json="36f05e7f-b2f8-4f4b-9b09-7fd961a91fc7",q.Npc_face_firedragon_json="bcdd337d-4483-47a4-a931-06f36c251fc8",q.Npc_face_fishthing_json="900782b3-43f3-49ff-9fe5-71f8f2b32962",q.Npc_face_floatling_merchant_json="e8cc9a63-954e-4264-b021-23812e071ba9",q.Npc_face_flora_json="58e3fb0a-04ff-4c24-8e3d-b64834b1b9df",q.Npc_face_florian_json="c2f2096b-54f4-40eb-a9fe-ac2c4b1b2d33",q.Npc_face_gale_json="4f5aedc5-2e46-4c24-8bc0-4fd20b187fe8",q.Npc_face_generic_student_raster_json="38108157-8886-4909-96cf-18c9bbdb129b",q.Npc_face_gerald_raster_json="0786b5ed-ed86-4624-a045-291b02a486fd",q.Npc_face_guard_json="6afae7a7-5683-4711-8b8d-ef8982df0587",q.Npc_face_harriet_json="b59b2795-6e6b-4c5e-b5f2-12e772d7e0a1",q.Npc_face_harvey_json="ad0d5bdc-e76c-48f3-9d85-f1e1f81cccdf",q.Npc_face_hollowjack_json="76b71b3f-b4a7-413f-80a2-76fdeb808b30",q.Npc_face_howard_cornelius_json="98c17c79-2d43-4b59-b9ed-b6784b89d633",q.Npc_face_ice_tower_warden_json="7dc19742-a5d1-4856-a552-52c488ee716e",q.Npc_face_icedragon_json="c50e6c71-66b1-4b8f-a13b-babf2ac1cca8",q.Npc_face_jim_json="08d207df-490e-48df-88e2-1b8fab31f33f",q.Npc_face_julia_ghoulia_json="7b1b4ee2-e04f-4c5c-8d07-74c9b61ee1f9",q.Npc_face_kandi_json="76211f0c-4685-4a40-ac4d-5c72a0467b1c",q.Npc_face_koi_json="19699732-0d39-45ab-ba17-cca14a251f99",q.Npc_face_mamastar_json="b7d2eb7f-ded2-4dc3-b71b-55deed490352",q.Npc_face_merchant_json="2a787301-0520-4579-adb6-ff99d81f98f3",q.Npc_face_mira_json="e50a94db-152e-4fa2-bcf5-74f5e8a88829",q.Npc_face_mist_json="bed0a62a-ec52-402c-9e5f-25ef58a6de82",q.Npc_face_mizu_json="386add32-c825-4a96-9c85-2594da830a38",q.Npc_face_morris_json="0c644e4d-2bab-4754-a803-6405ddab8d8e",q.Npc_face_mozza_ella_json="a2601500-ede3-4e05-b5c6-6f4342c3cec1",q.Npc_face_mugs_json="7e467d11-02b3-4368-bb8b-6844f3b584a9",q.Npc_face_noot_json="6c29cbd0-645e-4a11-b0b6-935cb78a4020",q.Npc_face_physicaldragon_json="bdbf3969-125d-49f7-8e7f-369058f26f84",q.Npc_face_pippet_json="4989b1a1-4519-41fb-b4eb-c44ab799ce11",q.Npc_face_poppet_json="fff0d68f-77ad-4a99-b2ef-c242b3e68252",q.Npc_face_potion_json="37fb9995-2cc7-43f6-87db-db6b317d6fcf",q.Npc_face_puppetmaster_hourglass_json="94c3d409-7138-480f-a3b8-0316c959fdd1",q.Npc_face_puppetmaster_json="9b3c6d3a-8814-49ae-b4a1-8343097ad6a8",q.Npc_face_puppetmaster_raster_json="f55db1eb-8dec-406b-934b-4c67d023bd39",q.Npc_face_puppetmaster_reborn_json="c05255ce-4e33-4cf0-b76d-1adf6703c374",q.Npc_face_scoog_json="d7a1db06-c9bc-43d5-beb0-7e445f9f7c2a",q.Npc_face_selena_json="7221890b-7284-4f57-b324-2ebde1aaf75e",q.Npc_face_shadowdragon_json="3c71f275-bf08-42db-b74a-7e9a65c3f1e3",q.Npc_face_sir_vey_json="c9fb711e-d687-469f-b8af-5376627e6cba",q.Npc_face_slime_guard_hank_json="372f71c0-ebc9-4899-8bec-e23b4133fddd",q.Npc_face_slime_guard_json="a5a4d6ae-684e-4c4d-8f29-d0a8ebd96d5c",q.Npc_face_slime_guard_mike_json="64482cd2-ca5b-42ce-b88d-f211a94d0028",q.Npc_face_slime_queen_json="613ddde7-b5ad-4c11-a2e0-7a5f7bbb1594",q.Npc_face_slime_worker_json="8caee26c-32fc-45e5-9cf3-4b4adeacc4e4",q.Npc_face_slurpy_json="48beef1f-196d-4577-924a-4bf1cf5fac41",q.Npc_face_stache_json="b8da0f5b-e078-4bcd-acb7-ecdd37551ff8",q.Npc_face_starlightboss_json="8730d2e1-f2b8-478f-a1f3-3feec362d201",q.Npc_face_stubborn_shadow_json="b7b920dd-464d-477d-8da1-b894cd774ea3",q.Npc_face_swoopy_json="4ed260ec-b7cf-4b8f-9a82-90f0c5f4399c",q.Npc_face_toy_json="d2dbd340-5919-44d2-b3e3-e62bb1729774",q.Npc_face_ulla_json="24d32e95-2dc8-40f2-9240-1fde8623da9a",q.Npc_face_verna_json="7b7e4fc8-387b-4f24-8dfa-3841fd07f8f7",q.Npc_face_windsail_json="52464276-f52d-474d-9e70-87fd8903a59c",q.Npc_face_winston_json="339cbbf7-9e98-4d30-83de-e5721e7e7edc",q.Npc_face_wizard_json="e5cbfefc-aa3e-4aaa-b018-77e63fc7c888",q.Npc_face_wyrms_json="a7f444ac-f419-490e-80c9-bcc5554e18f0",q.Npc_sprite_benni_json="f4507fe5-199c-4607-b9e1-ba310b6673b9",q.Npc_sprite_bok_json="79b14f32-c35c-46c7-8d0a-c84153387fd0",q.Npc_sprite_boombox_json="74de39e1-8bf8-4310-a497-bb2eff3feb33",q.Npc_sprite_broccolina_json="1e9da7ca-42a2-47ed-861a-5862c58591b6",q.Npc_sprite_cebollini_json="b02826c8-28b5-4493-8552-5de3f3ed906f",q.Npc_sprite_clankboot_json="0b12b3a2-543b-4918-8f09-00aef980bb2d",q.Npc_sprite_cumulo_json="834cec01-cc74-4014-9b8a-9fc0b74915f2",q.Npc_sprite_eugene_json="ef57d234-f4eb-458d-9b1a-a46d32715105",q.Npc_sprite_eve_json="760038bd-3483-4655-bf03-666e97612bb3",q.Npc_sprite_fishthing_json="558eec74-c9bc-48f4-9fd1-fabd3b5fef0e",q.Npc_sprite_flora_json="67b23f8a-6d1a-4314-8af4-515f3c3c283d",q.Npc_sprite_gnome_json="54c4cf3f-2670-4d4b-b178-64640803c9a2",q.Npc_sprite_guard_json="a09ba130-7636-4cfc-8323-b3e09cc9bd6a",q.Npc_sprite_howard_cornelius_json="c8014dd7-bda9-41f9-aab7-fbb76653db5b",q.Npc_sprite_jim_json="1779a78b-bdd6-4207-a991-59ac86801975",q.Npc_sprite_julia_ghoulia_json="f639e264-5017-4b1d-82de-e1832f1f4d8d",q.Npc_sprite_mama_star_json="ab2459ca-2812-4fa0-8085-96f507da7220",q.Npc_sprite_merchant_json="4e768d76-3013-4e30-a853-90b7b1672dc4",q.Npc_sprite_mira_json="3889e9b9-ce45-4c10-a293-5e0d09b5f10a",q.Npc_sprite_morris_json="e84e7829-e176-4864-9bee-628489934f95",q.Npc_sprite_mozza_ella_json="2e837bcc-e92c-4e55-936f-3badcc16f386",q.Npc_sprite_mugs_json="d8c2d16f-974e-4460-a70a-2549175bad28",q.Npc_sprite_noot_json="5d5cf855-33d5-40a1-92de-9c1020879849",q.Npc_sprite_pippet_json="3fa76099-5b94-4c16-88e5-4d176e56b621",q.Npc_sprite_potion_json="6fc659ba-ee43-4f51-a53a-dafa7ca5a7c6",q.Npc_sprite_scoog_json="8e20f328-047c-4594-96b6-1619836519c7",q.Npc_sprite_slime_guard_json="e7fa232d-e4c7-48b5-882e-5b6e914fdc9b",q.Npc_sprite_slime_queen_json="28c25359-76da-4096-8578-1c08080ddace",q.Npc_sprite_slime_worker_json="11725d43-791d-4d4b-835d-4dec1b4b1883",q.Npc_sprite_slurpy_json="79f61a3b-04d0-43e1-8330-896ce5d1e304",q.Npc_sprite_stache_json="c871c5a5-2248-4d00-af22-937f79b13a25",q.Npc_sprite_swoopy_json="0d52af66-3868-4c43-84b8-403b9a3e455f",q.Npc_sprite_toy_json="9a5c5acb-2ad0-4faf-b276-42ba25b0db91",q.Npc_sprite_windsail_json="54d58b21-c65c-4395-a84a-61a55a3fde5b",q.Npc_sprite_wizard_json="a6c7e4a2-b306-437a-94ac-0261fe2224b5",q.Particles_json="59f3e3cd-c27b-4a60-8d33-2fd8a7542fce",q.Particles_mount_11_json="bed01fa6-a177-45a2-89b8-b92d8b3030d3",q.Particles_mount_5_json="c108cd09-3f02-4f28-9e2d-cd927425128c",q.Particles_mount_6_json="4d002d20-55be-4fee-bf0e-8ea9e5bc9fdf",q.Particles_mount_8_json="ea7dc11f-eb15-4dea-8367-5c938c9fe301",q.Particles_mount_9_json="19ea189a-6eab-48b8-8a16-5541b31502d2",q.Pet_merge_ftue_slides_json="61b48f36-9d17-42ad-8e57-e54d2fd6a367",q.Pet_xp_boost_json="919e8d1e-7f64-47d2-bb13-3990076ee2c4",q.Popup_after_hours_json="e77002e1-61df-4228-bee3-a611b71c1c9a",q.Popup_gohome_json="fb6e5eb3-8bea-4e80-bf51-64f2da4d0df4",q.Popup_member2_json="09807618-2328-4831-9080-47055a663863",q.Popup_member_json="8d4e0617-e51e-45da-9531-220fa6759a90",q.Popup_member_modular_json="f85e62f1-05d4-4bb6-8a9c-ce164a4fe619",q.Popup_member_success_json="e4fa0728-1053-42c3-8333-b297414be3aa",q.Popup_parent_link_json="abda2313-18a2-45d3-a295-71c7e790f071",q.Popup_star_jar_json="1b44ff51-1d60-4e70-89d3-aa040ac0d764",q.Popup_travel_grayscale_json="d2882548-5869-4324-86b9-10b846ab184d",q.Popup_travel_json="be7f13f1-c44c-45a1-b794-1f035682a107",q.Popup_ui_roulette_json="89d4783e-4891-45cc-8354-d1a676351714",q.Random_wizards_json="1c455c4a-22b2-4151-9dbb-299031a7a429",q.Rift_run_shadow_dragon_battle_map_1_json="37c6b810-1de6-4591-b848-b7c65b653780",q.Rift_run_shadow_dragon_battle_map_2_json="e2941089-be34-4491-af3d-f77b4a66c157",q.Rift_run_shadow_dragon_battle_map_3_json="22bdd379-3fb1-412f-ae9d-4d48394d3ca5",q.Scene_intro_json="558f1248-c5f2-40cc-80b5-1a515323ef5a",q.Shiverchill_snow_particle_json="0c9f3c09-dacb-45a1-beec-3af66822a0d7",q.Skin_underwater_json="de739f08-7f8d-4d88-90e0-c4752bd87220",q.State_challenge_background_json="dfad7f8b-4604-4c92-98db-bfc8b7c49c64",q.State_challenges_json="ff065970-102d-4fcf-bd86-fed58684b9cc",q.Store_cloud_json="8cde933c-4610-4e1d-bed2-ac0a6695c644",q.Store_dorm_json="4cb89769-bf79-43f2-8e3f-e2a4cc960484",q.Store_forest_json="a7c8041c-ec4c-4c03-8c70-85b411e7254b",q.Store_mountain_json="ba9a7067-0457-45b7-8a93-f19cc25b8ff7",q.Store_pirate_json="a6000028-6971-41eb-87df-28eb77e7a0d6",q.Store_stylist_json="146f5e4e-aafe-4897-b25a-ba1504f54753",q.Store_tech_json="c7483a53-4163-49c0-b9f8-976792d01079",q.Store_volcano_json="dfb7e342-8b34-4f14-a3c5-40960bef10f3",q.Tabs_left_json="09ce7cb9-fe18-46cc-a9c7-80500957cdc9",q.Tiled_sprites_json="0ebdf8e9-a833-4add-b5f3-580f3dafae54",q.Tileset_core_json="b910aea8-b655-4883-b512-271b0b958791",q.Towertown_frames_store_json="e8afc045-6894-410f-bd8a-b013df34b96e",q.Towertown_interiors_store_json="21e7389b-6ca0-4ac4-ac39-bf85089f71d5",q.Towertown_interiors_ui_json="25b4432e-6f9d-4850-9f73-52e24f57359a",q.Ui_after_school_json="9e9c9ea2-6f3e-4dfb-9e5e-3ee5a7610842",q.Ui_bam_json="0d007a9c-f08c-4029-a924-60f64d317ebc",q.Ui_battle_arena_json="43e29f53-cad1-47df-b9ab-6da5a1e6c00b",q.Ui_battle_pass_json="7e9e32a3-5c8c-4a85-9901-528d8ebe9753",q.Ui_battle_pass_ultimate_json="478cd1f5-ee15-4b1b-b5ba-34464dd73601",q.Ui_battle_revamp_json="7f153f7f-8470-4c8c-bfed-9bbf38fd4740",q.Ui_battle_revamp_legacy_json="2decd275-885b-43c7-8f0a-2f1dfa06a9d5",q.Ui_breadcrumbs_json="4835c50f-fcda-4de7-91f0-72ddecb6a8e4",q.Ui_buttons_json="22cb767c-d4b4-4a19-9011-cc7f5261356b",q.Ui_card_json="109e12f6-3f67-42ce-8cb5-3e50ae75b5ef",q.Ui_cc_adventure_map_json="a88dec95-785e-422d-a3f2-7a41dc517053",q.Ui_cc_boss_icons_json="1d2f1f0d-d4e8-492c-8509-d7e78235dbb2",q.Ui_cc_dungeon_complete_json="5a3a2697-40d6-426a-a8e8-2384923b2e17",q.Ui_charged_levels_json="51b25aab-bd7e-4377-bcb1-3553cbe978e9",q.Ui_class_code_json="c398bb25-88fe-401a-bb89-1a008447a239",q.Ui_common_neutral_json="1be98e6b-fa30-49ed-89b0-2845ef01c75c",q.Ui_contextual_offers_json="913df195-976e-49ec-9465-2ebc4ebdfd7d",q.Ui_coop_json="1c81065d-abd2-4f35-941d-8cd7b023da10",q.Ui_daily_question_json="2e8adbbd-52d0-43e7-a12e-8ca3e2fb70bb",q.Ui_dialogues_json="826a14ed-4ee6-4dd6-9244-5ae972d7cdd7",q.Ui_difficulty_selector_json="ccf4a666-1643-4029-8ec1-fad5e23894c3",q.Ui_dual_currency_backing_json="6ea5b40c-b520-4396-9375-57944d8d8836",q.Ui_duels_loading_screen_json="a4a5c1ac-736d-455d-93c7-e5d185a88404",q.Ui_duels_matchmaking_leagues_json="b56de104-0245-433c-963c-1f32b52072fe",q.Ui_duels_stadium_rooms_json="4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",q.Ui_education_badges_json="e8564da8-4cf9-4350-b7e4-a6799a604c6d",q.Ui_eg_bountyrun_json="6b2722ea-1ebf-4579-9cf5-db9734394f89",q.Ui_evolution_screen_json="7a26fabf-9dc4-495b-9b72-b8eb697395a2",q.Ui_featured_pet_json="298ffe1f-af76-4410-b66b-26f684f0293f",q.Ui_forest_progress_json="77e12afe-3f39-4102-8a3a-65659947cc66",q.Ui_ftue_player_goals_json="1acf7d49-330c-4f33-bee6-b3d3971f5e75",q.Ui_guide_hands_json="b1df28f3-8164-4f95-a26e-4195e89e6cc6",q.Ui_hard_currency_json="c1f34747-4e84-43c4-8f37-4d81eed275ed",q.Ui_home_school_server_json="fd77fe10-306d-4ecf-aefd-b78efd752d49",q.Ui_icons_json="ae62c4d3-ba14-4de0-8054-03581ca389b8",q.Ui_library_json="8d28ece7-51e5-4bb2-b57f-19d77ea9ba14",q.Ui_login_credentials_json="689bcf78-3c74-49ab-9e18-159fd83ec460",q.Ui_loot_dash_json="87ffbede-e592-47e6-b837-99a1524d71f6",q.Ui_loot_dash_lobby_json="44c81f16-42ae-488e-b61b-e8844bcc5397",q.Ui_magicoin_upsell_json="96913c15-3ee6-4f41-a28a-7d1f16f63953",q.Ui_member_jar_json="becee9ee-8884-4572-878d-9134b4bc63fc",q.Ui_member_tiers_json="96f934ce-db64-4159-9c2f-d93f679ed4ff",q.Ui_moonlight_fest_json="022ddcad-5938-4f72-9755-b3739e9513b0",q.Ui_panels_json="e770ddd9-eb12-4d7e-9774-7657d342f1f4",q.Ui_parent_goal_json="b9402d51-9f2c-41bf-b582-a8c67ba7b073",q.Ui_pet_capture_json="4f1022a8-0406-4adf-9e5a-0684b4aa8efb",q.Ui_pet_gear_json="444a50b3-d294-47f9-8f51-65fece4b4359",q.Ui_pet_menu_json="389ef624-a601-45e2-ae6c-030305e40354",q.Ui_pet_merge_json="b30f9cb9-2b8d-4c36-b765-821e0c06f22b",q.Ui_pet_rarity_indicator_json="229edeef-fc22-44e8-b34c-558441e4fa38",q.Ui_petslots_json="61345a9c-2788-4667-a6b3-6eebbb4bde0d",q.Ui_postbattle_json="8d93f015-2812-48c3-a412-1a75ed4c88ec",q.Ui_prebattle_json="eca8ff43-14c2-4c24-bf22-416f394d46bd",q.Ui_pumpkinfest_json="87c35c43-465f-4a96-9676-ba8275a2ad87",q.Ui_pvp_seasons_json="5797ca36-83e6-4f76-a6cc-0e1ed9f98a82",q.Ui_raster_bars_json="b5ec5318-c940-4a25-b22f-36d97c912f2a",q.Ui_raster_epicsv2_hero_poses_json="4c2e0ca5-a224-426e-8a68-6b4dd47994db",q.Ui_raster_epicsv2_json="05eedff0-8230-4705-b857-e310c2e69556",q.Ui_raster_icons_json="c6753144-cb9b-48a3-94ba-525459416b6a",q.Ui_raster_panels_json="ee3b9351-524b-40de-a452-c34f060df0e0",q.Ui_raster_pet_card_json="82f66941-d492-42d1-adc4-5131c802d27a",q.Ui_raster_pet_zone_menu_json="ba0c40a3-5622-4006-8eb5-66eed4142357",q.Ui_raster_pets_menu_json="1ffde150-1833-416f-82d2-32a2b4444a6c",q.Ui_registration_json="3619736d-741f-4342-91b5-f3d276039020",q.Ui_replay_campaign_json="1188c794-4cfd-435e-9c4f-81da56601c60",q.Ui_revamp_pet_info_json="d60e23d5-a249-4a68-a0ea-f70bc9533d99",q.Ui_rifts_json="e0aec679-5627-49e6-bb0c-59a4e504ba51",q.Ui_segmented_offer_json="a60c3a09-98c3-4125-9f3a-7cba66121953",q.Ui_seven_level_membership_json="85480cf4-5370-4a58-97b5-8b237163165f",q.Ui_shared_json="2974fbc2-b097-42cc-ace4-19cd3a63ff7e",q.Ui_shared_revamp_json="9e213e98-76ad-4295-9699-d5d38685cbd5",q.Ui_shipwreck_progress_json="faa4ac5e-9a0a-4b0f-aaa6-00c94c0d1f1d",q.Ui_shiverchill_progress_json="13887a36-e295-48d8-94f3-5f5d3015787a",q.Ui_social_feed_json="5ea30e07-e362-4ac2-a0e0-0a9e3dbdfed9",q.Ui_social_menu_json="f28ac625-fa22-4c32-a6dd-9afb5cca5895",q.Ui_spell_effect_icons_json="a25b6cda-c1a2-4734-b7bd-15c3b49402d9",q.Ui_springfest_json="15eded9b-03d5-4e70-bc3d-7c1360654cb6",q.Ui_starlight_fest_json="f99c7956-c3bc-411d-a480-e98eba73a0f7",q.Ui_store_json="93a21019-836a-4433-b6ae-fdc7515725b7",q.Ui_summerfest_json="2b362a5e-4928-4547-bf01-f4c3e2753b18",q.Ui_timer_json="ae3788cd-2574-4eab-bccd-7284018ac7fa",q.Ui_titan_json="8a31f137-bb95-4e66-9b12-308458e3d6d0",q.Ui_towertown_flags_json="cc9fe7a1-c344-46fe-a86d-518d9d6c8622",q.Ui_towertown_json="b50091d7-fcd3-48e4-b051-61d8cd11e140",q.Ui_towertown_misc_json="99c68201-9a18-4f93-9eed-7d87cf2107b1",q.Ui_towertown_samples_json="64095efd-5cf4-48ec-81a0-806f58fe0285",q.Ui_unified_store_json="741fd381-0be6-4ce6-b12e-e46648b69d93",q.Ui_weekly_challenge_json="48df0747-c750-417d-a892-ba2f3e145757",q.Ui_widget_icon_json="48f64ca9-a763-45ba-a31c-a73dca7d66a6",q.Ui_widget_modal_json="c431f466-ad95-46a3-ad55-70200dbbfaa0",q.Ui_winterfest_json="5707ba74-0199-4cf2-98d9-fccf6cde1323",q.Ui_wizard_bank_json="ef304ad8-293c-4537-95ab-bac9747d2f55",q.Ui_wizard_costumes_json="570d4d78-5031-4a11-82c2-fbf60ea20373",q.Ui_world_zone_locked_unlocked_json="474793c4-15b4-4fad-8576-6dc4a373148a",q.Zone_arena_json="7ef7273d-b157-465c-a980-c38f5680c3b7",q.Zone_bonfire_json="118a10bd-96bc-4aa9-985e-34ee681482be",q.Zone_cloud_json="e644ec28-68e4-471d-a86b-0384c4f71f89",q.Zone_dino_json="a9a42dce-f8e2-4ddf-887f-28fb5ffdd1c9",q.Zone_elemental_guardian_json="293b3825-8f12-407a-bc06-b906e15e1d01",q.Zone_forest_json="75bdbbe1-aa77-4a93-9fef-b437f1ca70c2",q.Zone_lamplight_json="2715318f-943d-46a1-a600-78b6f3bc762a",q.Zone_museum_json="36532f64-1e40-4ecd-a575-7f6733a0d59f",q.Zone_pirate_json="3e356110-1011-4184-b6ea-1e137a640f67",q.Zone_plains_json="6177d87f-72e9-4033-aaf4-4e6fc5be96ee",q.Zone_shipwreck_json="84729031-a641-4fb8-adc5-ef4b67746061",q.Zone_shiverchill_json="d4ed607c-ed6e-4304-96b3-50445b0d9e69",q.Zone_skywatch_json="9b201c34-c88b-45a4-83c0-b7371c45538d",q.Zone_tech_json="62a82805-2446-40e9-959e-e769a8f65942",q.Zone_tower_json="de3489ec-caff-40bc-9fa1-3fbe38313f5c",q.Zone_towerbase_json="8c2da818-0326-433a-89f9-358d5c3e3342",q.Zone_volcano_json="e69bf988-1083-43a0-8736-10410299e0ef"}(Y||(Y={}))},19631:(q,K,z)=>{"use strict";var Y;z.d(K,{B:()=>Y}),function(q){q.Attack="a1c943d4-650b-48e3-a72b-6af3fbf657db",q.Battle="84eda37b-8c5a-455f-b5cd-08745edf1fa0",q.Build="d2cfc25b-bc7e-4e7e-9c6e-8d3249f78422",q.Check="da89546d-68dd-48bf-827d-848a078614a6",q.Chevron_down="a0ba6651-4fe9-4d48-889a-2a46eda6bda0",q.Chevron_up="546c237d-8aa9-417d-83b1-bab6b5e7af1e",q.Circle_checkmark="77febc0d-9d23-4cad-83f3-3debb82386d0",q.Circle_warning="4c3663fa-1e1a-4ed3-ae87-29d7767a873e",q.Clean="c7391fb8-3a30-485a-99ce-316fbecce06a",q.Close="08405a8f-4f87-465e-b694-f9b71b598885",q.Delete="3b551a31-d4bc-4215-b00d-00e26a91f515",q.Down="45a7df0f-869f-4672-8abe-6180103cbd71",q.Edit="5c7b9aa4-3413-4233-9a0e-21d404d07d76",q.Emerald_medium_active="19e554ae-1e0c-4ae3-9656-07f87ca73d14",q.Emerald_medium_default="38096a59-f92d-4cfe-919b-66a61fc26e88",q.Emerald_medium_hover="4c807809-4796-4bfe-b7dd-a89a59fc8e51",q.Expand="0480e4de-4331-47ef-a708-7366081bbc25",q.Gift="03ec12b6-9c85-4a76-ad79-a5f0aca5cf63",q.Info="b401a7d3-a8f0-42e9-b9fb-e5d74089fc75",q.Left="e7a24859-a18a-4889-b3db-ca33a12ab7f7",q.Lock="2d10927a-1bd3-4524-b34a-96ed4af97a35",q.Marble_medium_active="3b0905cc-92c6-450b-a6bc-21fdd41374ec",q.Marble_medium_default="076b37ab-055f-4198-aea9-a5eb024c8a20",q.Marble_medium_hover="2cc809a1-4591-4883-9ed6-d88fa9821c4f",q.Minus="679ea543-fc5a-45f1-8b6d-9b7f55c9108c",q.Move="66be330c-d375-4210-a79b-c1b18e2bcab9",q.Music="14cbd6b3-652d-49d8-8105-df23faf62d98",q.Notification_badge="a4584ae3-d562-4b56-be28-289f8d64038a",q.Paper="fc5623a4-88cf-41ea-9c53-40370bc8b6d9",q.Paper_small="4608462d-d1e7-4187-99cc-e6ab0dbf13c1",q.Paper_small_arrow="a5bfeba3-254f-4747-8a75-d8d9443984a8",q.Pause="f69469cd-13e8-4359-935b-22175e89dc0b",q.Play="651cd102-a21e-4490-82e2-64a9046b1090",q.Plus="e524f1eb-1246-4c6b-9d83-2bdb42399fc7",q.Progress_bar_medium_inner="bfb9cc0e-f464-4b6e-a442-ef3ad5024df2",q.Progress_bar_medium_outer="df4a56a7-82c1-414e-9aa7-00db86f2ff26",q.Question="05723c11-96e7-4d22-b757-f40d7a6e436c",q.Right="d1a40282-cd64-4b27-9b77-859f19e213a0",q.Ruby_medium_active="194de295-67b4-45f7-9deb-5b1a685bb129",q.Ruby_medium_default="5a234c6b-cde5-4d66-a649-a4ada4f930ee",q.Ruby_medium_hover="6766da3c-6f86-498b-b8a8-630215706018",q.Sapphire_medium_active="d2d9d739-d22c-45c6-9c26-a0ce202eea70",q.Sapphire_medium_default="47dd9b87-6f11-4c78-8784-e1a065f292ae",q.Sapphire_medium_hover="c9ad9712-c6cf-4859-b455-8a6caab6d7dc",q.Settings="e7f32586-8bd9-4456-ba94-f628b126c8a8",q.Shop="5c7c6983-e0e0-4f12-aeae-d8cb9e694d05",q.Sparkle="0dae1bfa-9168-4c81-8296-ac0e5f496a09",q.Spin="6bf889f5-a846-49be-aefc-53de7d916fde",q.Stone_medium_disabled="47842fb5-d14e-487d-8311-f735190d27e0",q.Tooltip_arrow="b53183c0-bf22-4fd4-9c87-a09be3ae393c",q.Tooltip_background="cd9f7600-6633-4717-b4ac-9d785f2c43e9",q.Trash="b73b691c-1fad-41ad-bd21-d504cc66f5f5",q.Universal_scroll_bar_slider="c43d0835-7cb7-47eb-bc5a-301b578fa0b6",q.Universal_scroll_bar_thin_fill="28395da7-146d-4313-b563-44ce3cf23ca0",q.Universal_scroll_bar_thin_slide="fee8a769-8dcb-4f36-b848-aa0e6e6f9b78",q.Universal_scroll_bar_thin_track="bf4eb3b1-c21c-4117-ba70-c879037d7d63",q.Universal_scroll_bar_track="0964859c-7adc-4888-b781-88bafd182013",q.Universal_scroll_bar_track_fill="15125dcb-acfe-42c9-a31b-8119822deb5c",q.Universal_scroll_bar_wide_fill="ab6d7fff-3bcb-401f-b4a2-8fe67cacbeee",q.Universal_scroll_bar_wide_slide="ad6f3e06-68e6-4002-b278-2d27b47423ad",q.Universal_scroll_bar_wide_track="ecee181e-28b8-4167-9eb4-be10150e55a5",q.Unlock="81914f8b-7dc3-42b0-9bcf-6545ae1eaca3",q.Up="dbe1f3a8-3e0a-4860-8dd4-4fb6fdf8b730",q.Volume="2135385c-c6cd-482a-9d00-534c0bd4dc8f",q.Wood_small="8b35cd44-ded6-48ec-a5fd-6c1ea7af198d",q.Wood_small_hover="23d7b67d-3213-4cc1-8953-485b4c2c9a0c"}(Y||(Y={}))},79998:(q,K,z)=>{"use strict";var Y;z.d(K,{u:()=>Y}),function(q){q.Card_gear_mini="9451a72b-35b5-4520-a19f-ebdbd4e9b79a",q.Card_gear_mini_empty="1b5d874d-000b-482e-a04d-85ef0d899a3d",q.Card_outline="41806707-f982-4e02-b50e-5756b7f11f74",q.Card_overlay="495f94ac-4030-4421-8888-dbde5b08a8ae",q.Change_icon="b82a0a51-e67d-479e-a01e-6ac1c8ae0161",q.Empty_slot="ba33cde8-a277-46a6-adac-a0ef7d3b96a4",q.Gear_bg_small_common="6e0849d3-8851-4e18-b3b9-d9e642604ef1",q.Gear_bg_small_heroic="d6f08696-b35b-486a-9ea6-a2110beddc4d",q.Gear_bg_small_legendary="3f9463e8-7550-4c95-9231-c838c1fd24ef",q.Gear_bg_small_rare="668a63e2-ddef-4c5a-81bf-b92ebc36acbb",q.Gear_bg_small_uncommon="5dacc18c-04ed-4790-b05c-790cdc7d36db",q.Gear_slot_small="0d03daba-91a0-4f0e-87b1-2acd557060b6",q.Icon_gear_boots="0b178835-e2fc-432a-9728-b6fbfea6091e",q.Icon_gear_buddy="82322c96-1611-479f-abb5-9bf8e7d3b65e",q.Icon_gear_hat="138d6852-a1e1-42c5-9457-bdef12678314",q.Icon_gear_mount="09344c5c-9c34-421b-842c-ad3d02861879",q.Icon_gear_outfit="adfa2804-c0df-4158-8ea8-bf69d1715b6d",q.Icon_gear_pet_hat="8adc1ca8-607e-43fe-98a3-e2d0a6137e3c",q.Icon_gear_pet_relic="b8caf254-84cc-4c09-8e19-6064377ca580",q.Icon_gear_relic="c6a5ccbb-7c55-49ba-bf5c-eeec195008d9",q.Icon_gear_wand="948ea863-fc01-4492-bba4-6c4c918bf334",q.Icon_plus="6a0b4863-7c0d-4bf7-97b3-03e1f40fcf2b",q.Info_btn="3fe118cc-6c7a-4249-821b-626d945f18f5",q.Label_bg="6bdd2cff-d715-46b5-b8d2-de684585089e",q.Merge_bar_full="66a66541-5dde-4603-8151-5b6c8958eb60",q.Merge_bar_max="8a4fe42c-eafe-489e-8936-55496e7bff0c",q.Merge_bar_progress="b1b3a5e4-ef78-4a17-a233-6c2cab9de11a",q.Merge_progress_bg="ebccd12d-be8d-4565-9728-ca7055e6d4e4",q.Pet_card_bg_bw="1a6d89c8-d9d6-42e5-b191-5eb5283695c8",q.Pet_card_bg_common="a1f245e2-07ed-4b09-8447-9776abb66a90",q.Pet_card_bg_empty="2a7fbe24-901e-4dc2-85ca-fae23a5fcb59",q.Pet_card_bg_heroic="422491a4-1c89-4a7e-ae1f-e19eb48441ac",q.Pet_card_bg_legendary="a388eda8-e6eb-4311-bd17-d258c157c0f2",q.Pet_card_bg_rare="6fd5faf3-67ca-43bd-959a-ee2c00ce451e",q.Pet_card_bg_uncommon="7c6a358d-e248-4316-9f30-a87afb1223ea",q.Rarity_bg="e3be89b5-2232-4de8-9a1d-44530d67e041",q.Separator="4dd74269-2a5d-44f2-b404-7a4de6bb8675",q.Swap_bg="97c369fb-924e-40d2-8ce4-9ddff0f6a009",q.Transparent_overlay="4c1b2629-e435-4b95-9a13-602f4768ce3f",q.Transparent_overlay_white="a4a1037a-88b6-4eb0-865e-5d863c3047b3",q.Treasure_track_icon_small="96ea0f9e-c9de-485d-aa4e-f38de08b9bbf"}(Y||(Y={}))},82351:(q,K,z)=>{"use strict";var Y;z.d(K,{B:()=>Y}),function(q){q.After_school_widget_ftue="1b6e6c51-d240-492e-a925-f8410959cdc4",q.Battle_pass_auto_collect="7f36b3c7-6170-4c2e-ac4e-462c31d7a654",q.Battle_pass_quest_claimed="ca291626-09ef-4ee3-8296-91d7fcd1aab9",q.Battle_pass_reward_claimed="53b62d77-706b-4fd7-9722-c4887d85643e",q.Bg_bossbattle_firefly="06a98d53-59c7-432c-b83d-29338229c5f0",q.Bgm_battle_astral_dragon="44f370ee-ca77-44d4-8b09-12309448fdc6",q.Bgm_battle_physical_dragon="39410388-e2fa-4b84-b658-65414051ac8a",q.Bgm_battle_puppet_master="1ab522b3-ab89-4565-8598-a0fd2dc67aff",q.Bgm_battle_shadow_dragon="a8d72c5d-5447-4cde-ad75-be94f8a34945",q.Bgm_puppet_master_ambient_loop="583f384f-cd89-4528-8d99-b8008750dff3",q.Bgm_puppet_master_victory_loop="3d1444c4-0ef5-4544-b0c9-8b0df20da045",q.ChargeRemoval_Noot_001="879e0501-e3a7-4402-a80d-88290f8c73e5",q.ChargeRemoval_Noot_002="824202f6-a7da-4554-a4aa-6723f7bccb67",q.ChargeUp_clean="5ce26997-a727-4d2d-8da4-20c0e8ee1e24",q.Dragon_1_battle_intro="b4c12a81-7e0a-4c5b-9779-51b16c1a337b",q.Dragon_isle_reveal="b082b1c8-fe70-4de9-8dcf-15af44a86875",q.Dreamy_drop_2="f433dcb0-2ff6-46bf-8b52-f2ee9f0b86c7",q.First_dragon_defeated="13b9ea19-28e8-4e7c-9491-f2aac1ffd62f",q.First_dragon_orb="cc629e5d-6ea2-48e9-853e-5950d143aa03",q.First_dragon_rift="41210811-ce8b-455d-a403-633bd4485b48",q.Loot_dash_background_music="ed985314-6121-4076-9585-0c925ed4f9ae",q.Loot_dash_endgame_match_completed="89cd123e-b1a3-4cf9-b998-cb6e21fa7847",q.Loot_dash_endgame_placing_screen="24f133f9-f1c9-4ac2-9b72-2aa823bb62aa",q.Loot_dash_loot_bag_added="4062114e-dff0-4732-b2e0-dbac0dfb530e",q.Loot_dash_matchboard_done="56b7d72c-acbd-49ff-9cca-48adc0eb5293",q.Loot_dash_matchboard_move="4335687a-b815-4d58-9deb-d7b73592a1f6",q.Loot_dash_math_streak_complete="391128ae-1c31-40c2-b2b7-fb4a18cda1b1",q.Loot_dash_math_streak_increased="a2f987b1-6e57-4430-91c2-ceef0d2095da",q.Loot_dash_math_streak_reset="e57f8d5d-16a8-45a2-a268-7c3db3fc68dc",q.Loot_dash_revive="4b65b7b8-e5a8-4f76-9c89-46e8a89bb601",q.Loot_dash_stage_intro="f297f3d4-0f68-4799-b663-9fe18c12bb4c",q.MainVOFire_BTS2023_Voice_Pippet_PuppetMasterAppearance_Bonfire_100="b6e84fe3-10b4-4aa3-94f5-b49cc5e79b92",q.Post_first_rift="0a9cdf59-00cb-4176-9151-d035c21bc19a",q.Post_first_rift_key="2b3d515d-35cc-4926-8da9-970cfd6b6272",q.Post_pm_visit="fd42e4c9-4f1a-4828-bee0-cf32e114072b",q.Pre_pm_visit="ba3139f7-3550-4fb8-935d-e1811dd65159",q.Sfx_CloudCoverAnimation_V2="48856d82-dde5-498b-978f-5246c31464c5",q.Sfx_Cutscene_PortalClose_V4="d9a46c98-a80b-41b3-b741-426627f4c36d",q.Sfx_Cutscene_PortalOpen_V4="c74e9088-d3cd-46c1-a89f-13cf2857fb39",q.Sfx_Cutscene_PortalStuck_V4="d721028f-f1ab-4b0b-8ff6-d475b98b89b4",q.Sfx_Cutscene_TimeTwisterLost_V4="92457ef1-9ed2-4869-ad11-0f39cc4dd987",q.Sfx_Dodge="365b8bdd-3b43-4502-bf1a-159adc784baa",q.Sfx_Wyrm_Roar_Double="acdd5caf-1295-4f4d-bb5a-574f494ad397",q.Sfx_Wyrm_Roar_Double_IceMagic="e0243032-93c6-4312-ac9f-1b3f4e278004",q.Sfx_Wyrm_Roar_Single="6308374c-9301-4ed1-b57f-a94ef062b0fa",q.Sfx_Wyrm_Roar_Single_IceMagic="e0d9554e-4e57-4791-be3d-c8e3ba6d0be9",q.Sfx_academy_keystone_activation_sheen="8b991c45-f7d5-4b47-97ce-88ab425f6a6a",q.Sfx_achievement_fanfare="aa25a8d4-1b8a-4378-b0c1-7795f66a73c9",q.Sfx_astral_dragon_spell="b7f0e183-db81-4203-b99f-022cfbbd166d",q.Sfx_bomb_astral_v02="eb514caa-dafe-4e7a-a7f5-a169f43a32f6",q.Sfx_bomb_fire_v02="ad5a26b8-cceb-48ac-bc8b-fdb110511a15",q.Sfx_bomb_ice_v02="4882da74-146f-42a9-a04c-1561c0b91015",q.Sfx_bomb_plant_v02="c7b13264-f4b3-42e2-81f0-a3533720f90e",q.Sfx_bomb_shadow_v02="7ec1c6a2-c9f9-416e-a544-35ef7f427ded",q.Sfx_bomb_speedup="1832ee30-bd24-4d00-8520-fb88fb1a57eb",q.Sfx_bomb_speedupx2="80598706-7901-49b9-99db-98c2be8713af",q.Sfx_bomb_storm_v02="d54fc353-78d8-47b7-aa20-7e51f27c0487",q.Sfx_bomb_throw="52506ff0-ff39-4c7b-a62f-d1f9f230794e",q.Sfx_bomb_water_v02="e6c56493-053c-41c7-a37e-d23bfa99d722",q.Sfx_buff_defencedown_v02="671ff6e0-7d79-460c-896d-7c718c0812e8",q.Sfx_buff_defenceup_v02="21ef83ae-84e9-4fdd-bb4a-466f82667ec6",q.Sfx_buff_powerdown_v02="7ed6a8e0-5b40-49eb-b454-cbef1d52b286",q.Sfx_buff_powerup_v02="8eb1d383-d71b-490b-917f-798ecaa0a01e",q.Sfx_buff_regenerate_v02="4d6b4b51-1ecc-4b6a-9dd4-ed2bcc4ef31a",q.Sfx_charge_lost="13d45a54-8ac2-4aa3-9fcc-7f83e3541850",q.Sfx_charge_up="087084e0-572c-4b67-8c6d-90c78a5304cb",q.Sfx_chargedLevelUnlockSequence="58325603-6ed2-46a5-9f41-eb306825c4e3",q.Sfx_charged_levels="a78f8de2-ff90-42f2-868f-e6b40a222132",q.Sfx_charged_levels_unlocked="4423df87-50fb-46d5-ae8d-add3b4f59d9a",q.Sfx_critial_hit="29a72e9b-f3fe-4531-b8cc-1239245fab0b",q.Sfx_daily_login_calendar_reward_collect="34a282a1-0b03-45eb-a73e-5966cc7c08cf",q.Sfx_daily_login_calendar_reward_state_change="2afc773f-4784-4562-82d9-edc813bac5f6",q.Sfx_damage_astral="963fb6c1-a50d-4bb1-989f-ca68eeb472a8",q.Sfx_damage_fire="325a747b-0d8d-4071-9a95-a65fdc3dee99",q.Sfx_damage_ice="e36bab4f-3803-4c49-9cd7-57f0b1bb9966",q.Sfx_damage_plant="3b7bb3bb-1a90-4626-b568-f8678cd90b0b",q.Sfx_damage_shadow="83dcc56b-b8d2-4681-a296-2553343f803e",q.Sfx_damage_storm="47db30c9-34d7-44c4-a3d2-b0171561521b",q.Sfx_damage_water="201be481-09c4-4d55-b7d9-b1af3f30fb46",q.Sfx_dragon_isle_celebration="02d35327-173c-49fb-9d1f-9f4add37c15c",q.Sfx_dragonisle_dragon_defeat="b4fd7861-9fab-4172-a0cd-4765aeb8d07b",q.Sfx_dragonisle_dragon_roar_attack="a6a77f79-e8ab-46cc-bcd1-697cd0c970bf",q.Sfx_duels_personal_best_win_streak="5f5a2f31-0b34-4ef5-bbd6-593f776ce21e",q.Sfx_duels_win_streak_badge="bc7df9fc-679e-4db4-9941-3bcf642671f1",q.Sfx_empty_mp="03ee47ea-8e0a-4983-ba38-5043f221c990",q.Sfx_fire_boost_screen_overlay="42758484-a8ec-4c7a-a750-71b4a5955fe4",q.Sfx_fireworks_celebration="495eeb5b-45e5-4cdb-ae0d-36e831486c09",q.Sfx_fumble_poof="a900850d-09fa-477d-900f-7119614e7030",q.Sfx_gift_astral="a0d89704-27dc-44d0-ac35-19fdfdccbd6e",q.Sfx_gift_dark="c3af7530-f6ce-4ef9-8e36-b891d8b41d72",q.Sfx_gift_fire="2ed350c2-eb51-49e4-b796-dc5d78b291d4",q.Sfx_gift_ice="a15674b6-9f63-40b4-97f5-1dad04b31824",q.Sfx_gift_plant="c8ad9187-7e97-4883-a3ff-12573ab6fda7",q.Sfx_gift_storm="9d1e1bb3-2f1d-41b9-a78d-92a4b12b4648",q.Sfx_gift_water="542eabbe-f80c-45b7-a1fd-024c391e92b2",q.Sfx_heal="2ec522b6-315d-4402-9b8e-3f38e7ef2aeb",q.Sfx_hud_icon_notification="113196a8-911a-40e3-9ecf-193b9fea0318",q.Sfx_ice_boost_screen_overlay="3246ae9b-7fe9-4792-ad92-58f133b26e8b",q.Sfx_large_explosion_with_glass="11c9caa1-e418-4e28-a1b1-0558e8e5bf5e",q.Sfx_long_explosion_with_rubble_A="bca8ac0f-1eb0-4210-92e6-ebd062a0a0ed",q.Sfx_long_explosion_with_rubble_B="0e1ad5d7-d229-45be-b59c-1cd343209089",q.Sfx_magic_poof_story_unlock="bff7dfe6-2e8f-4273-a4ce-1b6c41a3b4e6",q.Sfx_medium_explosion_with_rubble_A="9ea87f5b-b10b-416b-b98a-c422a5b5ba4c",q.Sfx_medium_explosion_with_rubble_B="b768cf01-0dd3-4bc9-8f8d-2bd1712ee649",q.Sfx_mp_refilled="fe8a74ff-944d-4f15-9c75-2dc352c02e97",q.Sfx_pbf_levelup_barfill="a2e4be60-1a60-4265-be70-7e5119977e19",q.Sfx_pbf_levelup_dance="45c78a1f-8d12-4227-b52b-14e907c538a1",q.Sfx_pet_merge_badge_transformation="96e8c480-6aea-4278-8177-3254c3770b1d",q.Sfx_pet_merge_beam_effect="8631acb7-a542-4d74-aaa7-0463b19af746",q.Sfx_pet_merge_card_transformation="769d8854-5b71-4d08-98be-ae5ef9857dce",q.Sfx_pet_merge_stat_transformation="56b28d58-b2ae-4115-827c-2c3b1897b0a9",q.Sfx_physical_boost_screen_overlay="d9e85b3f-9e4a-4e4e-9091-e82b9ba6cd0e",q.Sfx_physical_dragon_spell="4482ed8c-c9bc-4dbd-9466-3596c2d4169c",q.Sfx_plant_boost_screen_overlay="da50ef8c-aa86-446f-af8c-a99df761f76e",q.Sfx_powerful_hit="9bd1e922-875d-49e9-a953-ab048518bee2",q.Sfx_puppet_master_battle_ground_rumble="f923d7e3-5a96-4cc1-b512-a3ec70d4bf90",q.Sfx_puppet_master_battle_heavenly_harmonic="261670ed-eb91-4641-87a7-4f719d7568e8",q.Sfx_puppet_master_battle_keystone_flash="e0bffeef-947e-4f5e-b176-039645c683e4",q.Sfx_puppet_master_defeat_animation="442ee09b-b2a6-47de-8c6a-e6fa56aa030a",q.Sfx_puppet_master_spell_beam_impact="6223c671-ba33-4238-a059-ffd20483453b",q.Sfx_puppet_master_spell_beam_travel="75162d65-4342-477c-8ee5-74a4eeb774da",q.Sfx_puppet_master_spell_cast="d8e81f70-40ed-4a83-a8d2-ccf24d793bfc",q.Sfx_puppet_master_spell_downpour="60c46051-2bd3-4974-8188-bec5e549d230",q.Sfx_puppet_master_spell_map_transition="323a3664-0bae-442a-92d5-9e169eea37db",q.Sfx_puppet_master_spell_mp_drain="795b305d-83b4-4b7b-b617-134aaf96b36b",q.Sfx_puppet_master_spell_pet_steal_travel="e6b95d05-880c-4c10-9bc7-8cd52b503e59",q.Sfx_puppet_master_spell_volcano="5e2781fe-35f0-4a4b-9d19-5c6f665b7100",q.Sfx_resist_hit="1f6ebb67-5ed6-44bd-b887-13a5e9ff647d",q.Sfx_segmented_offers_last_chance="64ff2326-f2f3-47c2-bb71-9552946c44ee",q.Sfx_segmented_offers_open="a0ebb0f6-5cd7-4a88-8754-d4c628944750",q.Sfx_segmented_offers_sustained_bgm="d7fb4948-40d9-4d3d-846c-5c41a440ddd2",q.Sfx_shadow_dragon_spell="7711492f-0390-4557-aff7-356d89c0926a",q.Sfx_short_explosion_with_rubble_A="88ba375a-8de1-4320-933f-bd0198106e81",q.Sfx_short_explosion_with_rubble_B="35a4b330-7714-44ac-851e-acf5ac5f9d2d",q.Sfx_spell_card_hover="2e797110-6b72-4361-99f3-f3ee49bee730",q.Sfx_spell_card_select="3f6ec21b-74bd-4e28-9505-6b1811345595",q.Sfx_starter_pet_charfoal="1e5794eb-7343-4042-b9da-ce24fedbb105",q.Sfx_starter_pet_interaction="c30b9ef8-4c17-4742-8f8e-5032dc62cebd",q.Sfx_starter_pet_mermina="0475b18e-7be4-4543-8551-52d2d48d2a2f",q.Sfx_starter_pet_snowfluff="ece27950-944d-42fd-b0ad-2820c3289de0",q.Sfx_starter_pet_sproot="955f3300-aa46-4d00-8717-f36619a6f090",q.Sfx_starter_pet_wott="4a67772e-0b06-46ca-91ca-278853bb8964",q.Sfx_storm_boost_screen_overlay="f1c2b6ca-e50a-498f-a29f-6f136869c711",q.Sfx_teleport_defeat="6dbbcaa4-b8bd-40e3-b0c0-3e0b557eb328",q.Sfx_teleport_rescue="be56192c-8cc6-42de-9cec-84e4b7ea86fa",q.Sfx_unit_buff_positive="cb678bc1-f52d-4a26-9bc9-4f449eb4480c",q.Sfx_unit_select="e8aa3107-ae70-4d1b-b9d4-ac615430d795",q.Sfx_unlock="5ad36ecb-b0c4-4449-a7fa-df9ffce57c6e",q.Sfx_upgrade="c246fce8-2d7c-4174-9d34-78f7d53ae91b",q.Sfx_vs_animation="58a44645-a223-4668-b9d8-69a387302642",q.Sfx_water_boost_screen_overlay="af8393c7-1de9-4257-ad65-6b8546047fda",q.Sfx_wizard_team_teleport="5ae1ad0a-4a08-4213-8dd3-c935db30c85f",q.Spiritual_power_up_2="acc367b5-f20e-49fb-9805-5c14db2a3080",q.Voice_10_103_magic_refilled="e449016c-7be5-4910-a36c-0773c6394a01",q.Voice_10_104_powerful_hit="441e8cf1-2fbd-4ddd-a479-58674dfd9f39",q.Voice_10_105_rescue_charfoal="0530f6b8-c6bf-4289-94c6-5393be396579",q.Voice_10_106_rescue_mermina="3fd24e11-6833-488d-a423-4eb8e49366b7",q.Voice_10_107_rescue_snowfluff="cc7f5ea6-91e5-4271-a208-5f2ea4f9b14a",q.Voice_10_108_rescue_sproot="31cfe69d-f8be-496f-85d8-798752eb02a1",q.Voice_10_109_rescue_wott="022bf41a-42d0-499b-876e-edefe5d1085d",q.Voice_10_110_rescue_now="84c8c24a-dcdc-4225-8aca-83b2bf883558",q.Voice_10_111="5fed2359-c9c4-47ea-bea5-48e6e6d13b2f",q.Voice_10_112="225a54dc-3ddf-4750-9abc-a164927fc2e9",q.Voice_10_113="c33299df-0666-4979-9161-bf3f24be6b29",q.Voice_10_114="027cb958-1982-4c7f-b95d-dc8ac6d8ddcc",q.Voice_10_115="8671bfab-9f89-4fd4-9e05-0d543cf1f15d",q.Voice_10_116="6ad06bed-0669-466a-b4e4-e31543f53f3f",q.Voice_10_117="e907829b-e167-4a74-a007-43560ed75270",q.Voice_10_118="800500cb-684b-419e-b760-3509c1005d58",q.Voice_10_119="69dac330-b34c-4377-bd30-8c3b058dabb2",q.Voice_10_120="16a006ef-3ff4-4a99-a5e8-3233d9b04edf",q.Voice_10_121="1c56f26c-41ae-4a0a-9f57-8161113d3f8f",q.Voice_10_122="a970da72-55ac-4b05-94ff-40c692780aa8",q.Voice_10_123="e561eadf-4ac2-4d7d-9001-1907d72005bc",q.Voice_10_124="e56685ec-c7d1-4b9d-938f-7975971903ac",q.Voice_10_125="cdeebc0f-82bf-4429-857d-3eb0be818de2",q.Voice_10_126="44e890f4-0feb-4663-8e49-ac5e6891620a",q.Voice_10_127="7634c6d6-ce66-4e1c-bdaa-da2be3dcd637",q.Voice_10_128="1125c828-9049-4abf-85cd-fbac58c430b7",q.Voice_10_129="baff6336-5765-49f3-a298-b8fa332d3a00",q.Voice_10_130="2e19de25-d150-4699-a07c-63c36834e475",q.Voice_10_131="57e45b36-f1a0-47ae-9212-191bc05c35a8",q.Voice_10_132="e88afa2d-6067-47f0-a04c-5f738f0d56b8",q.Voice_10_133="3c827543-fe8a-4b85-a5a0-34061e3ce529",q.Voice_12_19_broccolina="c1f7586d-1f6d-4ca5-8829-b759c59c02b7",q.Voice_12_20_broccolina="bf1a7246-85f7-4665-b70d-23a9729d7053",q.Voice_12_21_benni="9b0bcfd8-a1a8-4f71-956e-9aa87ce9b1ec",q.Voice_12_22_benni="d508018a-3cf4-4cbd-a3d1-7d129ff1eb28",q.Voice_12_23_benni="afbce6a6-3e75-4de8-880d-a7b8253527be",q.Voice_15_19="6816e7a6-63a4-41a1-9637-4863dcba0782",q.Voice_15_20="a5718ce4-583c-4356-bfb2-19a888ddf885",q.Voice_19_2="ac48a4ad-7d5b-46f2-bece-b2a8a701f6f5",q.Voice_19_3="1a151de2-c971-4d84-9272-d3ed4fc5cad5",q.Voice_1_16="c7180562-df7b-4414-8362-d9d82f060009",q.Voice_1_17="451ae0cd-e14a-48d1-8679-fcca6e9e80ce",q.Voice_20_10="38298832-8279-4404-a76b-0bb59d676cde",q.Voice_20_11="fc235967-d1ff-480b-8072-4902cc25b382",q.Voice_20_12="cc1a64e9-f71b-47e2-86f1-c0e5a2b3ff11",q.Voice_20_13="ed73f7e4-c246-4da8-93d3-f5206093928a",q.Voice_20_14="c5a57936-e233-45a2-b80a-c588997862ad",q.Voice_20_15="7fb5ce1b-a671-47ef-868c-b248bbe84c40",q.Voice_20_16="02934b65-8bf1-4feb-8ced-d49dc0bd1c2a",q.Voice_20_17="4b165a5a-078d-40f8-a678-3f659d2be68d",q.Voice_20_18="11a271ae-4ebe-456a-9665-f9c7920009fd",q.Voice_20_19="8af4d3e7-1d06-41df-aae9-fe71d06faba0",q.Voice_20_20="f60fc029-a665-42f4-ba5d-0eefceade421",q.Voice_20_21="dbea3392-a31d-44e0-984e-f6d8d92c846b",q.Voice_20_22="b8a58514-f95a-4768-9e2d-ee3c074184e1",q.Voice_20_23="a88d369d-69cd-4ca0-92f3-30c44d4fbc9e",q.Voice_20_24="430695cf-627c-4a38-b7a9-75fdbd363937",q.Voice_20_25="7c77fa42-16f0-4a2f-acad-10961affde94",q.Voice_20_26="1125cc46-c607-4241-b61f-499a1e841509",q.Voice_20_27="6fba3843-ecc2-45a3-9743-205954ded9c0",q.Voice_20_28="db847682-da08-4e78-af4d-2894ffb7d666",q.Voice_20_29="a24232f5-9e20-4295-890f-170c40ad297c",q.Voice_20_3="f6180419-bb0b-4d87-aa26-6e533747efad",q.Voice_20_4="2698951e-dd19-4ec9-a316-0202db6e69f3",q.Voice_20_5="2d476014-9e22-48b9-bbcd-413f8b606ffa",q.Voice_20_6="faf3b96b-0bd5-415c-b3b1-661b1da4e805",q.Voice_20_7="29e29cee-18d6-4e16-a66b-01d4242a207a",q.Voice_20_8="cabcbd43-7b4c-45f9-a487-1b9ab2b3cfd4",q.Voice_20_9="6e83295b-417e-4cc6-b18c-5bedf73e64a7",q.Voice_27_2="3b163ad9-c7e7-4b09-b115-845f83beb625",q.Voice_27_3="20833965-09a1-4026-bc2f-c681b9024682",q.Voice_27_4="4cac7a05-e830-4f8f-a609-d9f77dc251ce",q.Voice_42_1="1418aa4c-db9a-446a-881e-51eaa1dc8d26",q.Voice_8_15="24a87b64-fc3b-4e20-9306-d84470080516",q.Voice_8_16="fe0c6952-0282-41ba-9951-e6ffa70f6be1",q.Voice_Act1_HardModeQuest_Noot_first_entry_1="e62edb53-2c5d-407e-9985-55c428d4eb39",q.Voice_Act1_HardModeQuest_Noot_first_entry_2="576df7bf-84f2-4c2e-9599-6af05ba5dbfb",q.Voice_Act1_HardModeQuest_Noot_intro_1_no_charge="fb3c6abb-6d48-4f31-8dca-1e0a0b5fbdd3",q.Voice_Act1_HardModeQuest_Noot_intro_1_with_charge="78be9a03-5bb2-4364-8af9-1bd49ab78cb0",q.Voice_Act1_HardModeQuest_Noot_intro_2="177f1fe3-096e-4b20-b3a0-65351bcdcef8",q.Voice_Act1_HardModeQuest_Noot_intro_3="d7e0275d-2149-4432-b91d-438c4c7fc8d0",q.Voice_Act1_HardModeQuest_Noot_intro_4="07b3c465-da2f-4472-81f9-557ed0cd4c63",q.Voice_Act1_HardModeQuest_PuppetMaster_01="ea58d380-a099-4251-bd38-a3bcce81186d",q.Voice_Act1_HardModeQuest_PuppetMaster_02="10ce55c6-de14-4f2b-a969-dd7aaf370d76",q.Voice_Act1_HardModeQuest_PuppetMaster_03="86e9e2c3-9d47-4225-8a95-b764e0e74166",q.Voice_Act1_HardModeQuest_PuppetMaster_04="723d9b13-2eda-46b0-92cb-c124847498de",q.Voice_Act1_HardModeQuest_PuppetMaster_05="b6e7e6fd-2c88-4812-a1cf-18c7814b952a",q.Voice_Act1_HardModeQuest_PuppetMaster_06="d6e16f3c-dcc5-4313-a8fb-f0629edb2080",q.Voice_Act1_HardModeQuest_PuppetMaster_07="9c0ce2a8-9856-41c0-aba6-9833ef04319a",q.Voice_Act2_ExpertModeQuest_Noot_02="1464f501-f524-4d97-a2b5-3ca172a330e7",q.Voice_Act2_ExpertModeQuest_Noot_07="1c2fdd4c-ca72-43c3-8806-4edd4441d64e",q.Voice_Act2_ExpertModeQuest_Noot_08="dfd40f36-ca09-4b8b-92a2-be932c1e29b4",q.Voice_Act2_ExpertModeQuest_PuppetMaster_01="dfbf4390-bc6f-4f58-9a2a-d75520a4c0fd",q.Voice_Act2_ExpertModeQuest_PuppetMaster_03="1d0a5003-5b19-4b02-9597-4b213c087c9c",q.Voice_Act2_ExpertModeQuest_PuppetMaster_04="9ef120c5-8620-4bf4-bdf8-dbf54ab25403",q.Voice_Act2_ExpertModeQuest_PuppetMaster_06="4ef1f1f4-6438-4342-8400-a83c97eaf22f",q.Voice_Act2_ExpertModeQuest_PuppetMaster_07="dd688549-7017-421a-968e-fdd28fcb5a6a",q.Voice_Act3_ExpertModeCompleted_Noot_02="d8018e08-f36c-47fc-8d11-5c4cf2cb0c72",q.Voice_Act3_ExpertModeCompleted_Noot_04="4797db7b-d780-4db3-b7a4-8faeaddb82f3",q.Voice_Act3_ExpertModeCompleted_Noot_05="9d6d26d4-3dce-4f9c-a595-26505d92810f",q.Voice_Act3_ExpertModeCompleted_Noot_06="5f445c9c-a7a4-40d4-9f8f-6906746bcba1",q.Voice_Act3_ExpertModeCompleted_PuppetMaster_03="408711d0-2a2f-4c2a-925c-8c3be3806310",q.Voice_Bok_FireflyQuest12_ShiverchillQ1_1="d1f784c6-5422-4fbd-866c-690a631a60f9",q.Voice_Bok_FireflyQuest12_ShiverchillQ1_2="85836055-5277-459b-81dd-a684a4f3a420",q.Voice_Bok_FireflyQuest12_ShiverchillQ1_3="0a9ed340-d709-498c-981d-d5c8c2790e58",q.Voice_Bok_FireflyQuest4_1="67efb88a-2f59-4f0f-9217-87e798dd8de6",q.Voice_Bok_FireflyQuest4_2="a80cfd70-ffa5-4f64-9d4b-766417b0d008",q.Voice_Bok_FireflyQuest4_3="c7082eba-d2ed-4243-aecc-02fbf61caec8",q.Voice_Bok_FireflyQuest4_4="a6f14ba6-d293-4ff4-b9f1-1dfce99f64f2",q.Voice_Bok_FireflyQuest4_5="a9dfdc42-414f-4e42-a5dd-8d977d3f057e",q.Voice_CostumesFTUE_01="3a23f3e5-556f-42c3-a19b-8c3a3745b12e",q.Voice_CostumesFTUE_02="20597ced-6a00-438c-b21d-e4b39b776a9f",q.Voice_CostumesFTUE_03="3d4a27a7-1692-4a18-869f-145e1d81755c",q.Voice_CostumesFTUE_04="a38c63b3-ba7f-4818-9325-12d05aea3c18",q.Voice_CostumesFTUE_05="4d6c6866-edeb-4748-88ec-dd1739394e99",q.Voice_CostumesFTUE_06="314060b9-e2b7-4f41-8e19-20f788a469f7",q.Voice_FTUE_Noot_01="6201ebba-eb44-4569-a4bb-5b186e293738",q.Voice_FTUE_Noot_02="a56e7520-366f-419e-9a8d-bfbc47bb8dbd",q.Voice_FTUE_Noot_03A="e3743c63-16f8-4a1f-8d4c-1ddb2ad00ad4",q.Voice_FTUE_Noot_03B="e27b0f9e-0766-41cf-ac21-e228bc4ad061",q.Voice_FTUE_Noot_04A="a3ba8c47-055c-4752-a2e0-28fb2b57650e",q.Voice_FTUE_Noot_04B="d0098fd3-c274-4a49-ae0d-3c58e86973d5",q.Voice_Flora_FireflyForestquest3_LoseScenario_47="23120c01-a43e-4f5a-8a8f-4a9b7b0f0c67",q.Voice_Flora_Fireflyquest12_75="4634ac41-5afa-4396-b3e9-6904e98b7c04",q.Voice_Flora_Fireflyquest12_76="e2944bf5-448d-41a0-bad9-089508bca0a9",q.Voice_Flora_Fireflyquest12_77="6d21749a-2c84-4c9d-ac67-20242e2b2fa8",q.Voice_Flora_Fireflyquest12_78="e6b32beb-8766-4d54-9bcd-85eeb95e1233",q.Voice_Flora_Fireflyquest12_79="44dce9a8-0f31-4549-b1ef-a4214de0c669",q.Voice_Flora_Fireflyquest12_80="4d1a1a03-5f8a-474f-a0fa-e7cc67c09ad3",q.Voice_Flora_Fireflyquest2_27="f9bba913-6305-4918-94e1-2b159ca6a6f0",q.Voice_Flora_Fireflyquest2_28="60c02f7e-e53e-471d-820d-ec463eef5042",q.Voice_Flora_Fireflyquest2_29="934cec15-ca77-4b0e-83d0-bf1ed0e14ae9",q.Voice_Flora_Fireflyquest2_30="d7b89d1b-8b1f-40c2-a13c-4551aa820e23",q.Voice_Flora_Fireflyquest2_31="87ca920d-a097-4e07-b0d0-7414a6d8624b",q.Voice_Flora_Fireflyquest2_32="7b1a9932-8b1e-43e8-9a3d-c3522907aa35",q.Voice_Flora_Fireflyquest2_33="b0dd6c68-667b-4773-8441-d20d010b1921",q.Voice_Flora_Fireflyquest2_34="8c20049a-f2c1-4b11-994f-d5ecf3286254",q.Voice_Flora_Fireflyquest2_35="0aa1c7f4-0c0b-4543-af41-21520af2e207",q.Voice_Flora_Fireflyquest2_36="99ad2411-ef2a-44c4-80fe-91a1c6e73d10",q.Voice_Flora_Fireflyquest2_37="e777b487-2ad8-413d-a29b-f91a56ebcf5e",q.Voice_Flora_Fireflyquest2_38="771cc166-fdfe-411b-83bc-428e694eca12",q.Voice_Flora_Fireflyquest2_hard_31="cfbb5286-7db3-4ce0-ba4d-034cff1b33d3",q.Voice_Flora_Fireflyquest3_39="0c09dafe-a083-4450-bea9-98b907d9cec3",q.Voice_Flora_Fireflyquest3_40="a09ea086-132d-4204-8962-989dcc8f4ca2",q.Voice_Flora_Fireflyquest3_41="6e715615-8c75-406f-bf16-1c4a0615fbcc",q.Voice_Flora_Fireflyquest3_42="fd89cdd8-3185-40b7-8a6a-3b852a3a2e7e",q.Voice_Flora_Fireflyquest3_43="ef8438e2-4fd3-46ad-bd04-265dfe419c04",q.Voice_Flora_Fireflyquest3_44="22f427e7-be06-4677-954f-1d2f9666d966",q.Voice_Flora_Fireflyquest3_hard_42="53dac275-1015-4b75-9644-641ddcdc8fb5",q.Voice_Flora_Fireflyquest4_45="dd26c56a-6b2c-4ba2-b9be-aa9c8e4ab083",q.Voice_Flora_Fireflyquest4_46="8134104a-2474-4ebf-90ef-b121663a3881",q.Voice_Flora_Fireflyquest4_48="6d87a34a-590a-47b6-9d95-4eec4e553d7e",q.Voice_Flora_Fireflyquest4_49="9fe03d0f-1c9c-42d3-b23f-a57e0c349a22",q.Voice_Flora_Fireflyquest4_50="c83ea4a3-f619-4ee2-bc75-e2ca76cb3297",q.Voice_Flora_Fireflyquest4_51="edb05f79-5894-435e-98e0-a3240b8a2760",q.Voice_Flora_Fireflyquest4_52="b4b2d963-fadc-47fe-aea9-d522163febbb",q.Voice_Flora_Fireflyquest4_53="c3c5660d-7d12-44de-9fdd-c8cb88295613",q.Voice_Flora_Fireflyquest4_54="7d001523-b12c-4d5e-86f6-ca816251727e",q.Voice_Flora_Fireflyquest4_55="a296b98e-74a2-4ea4-b949-ab2047000312",q.Voice_Flora_Fireflyquest4_56="9ab70530-50dd-4a1e-b49e-a9b764f42053",q.Voice_Flora_Fireflyquest4_57="46749d6c-a7b7-4013-b8ea-f19b8e00af80",q.Voice_Flora_ReturnToFirefly_AfterCompleted_81="e4c81876-f7bc-43fd-a1d8-8a41e89eacef",q.Voice_Flora_ReturnToFirefly_AfterCompleted_82="58bfc0ca-8300-4295-b540-c5a61f5827ae",q.Voice_Flora_ReturnToFirefly_AfterCompleted_83="4d5d87ed-8178-4809-909d-ace0d8ddc8b4",q.Voice_Flora_ReturnToFirefly_AfterCompleted_84="03be6a85-dcd7-4ba9-af1b-ed285b02d7d2",q.Voice_Flora_ReturnToFirefly_AfterCompleted_85="2a925ee8-851f-411c-99a7-de6254256aa8",q.Voice_Flora_oldFireflyquest10_71="4d71da00-96f4-4636-ab81-56dbd071d477",q.Voice_Flora_oldFireflyquest11_72="5e25645d-79f5-441d-9b16-08b66a6e5f86",q.Voice_Flora_oldFireflyquest11_73="20f03f5d-8c65-42a6-b046-ae6008b7b6d2",q.Voice_Flora_oldFireflyquest11_74="bc5c2411-a541-4ada-bb82-005329aee60e",q.Voice_Flora_oldFireflyquest6_58="ccacc6c8-b49e-4e4f-9584-b777757b35fc",q.Voice_Flora_oldFireflyquest6_59="fe1d5e7b-2ff9-469c-b197-9ad90b9fc730",q.Voice_Flora_oldFireflyquest7_60="50c9b7ce-acfd-4ee9-b902-8329fea6d1b3",q.Voice_Flora_oldFireflyquest7_61="f8084421-aaf0-44a2-b5d0-4e6faf33fce5",q.Voice_Flora_oldFireflyquest7_62="2e711397-b298-4f2f-837d-74445d0ac913",q.Voice_Flora_oldFireflyquest8_63="a7850f38-3fb6-4863-9940-6745765fe352",q.Voice_Flora_oldFireflyquest8_64="768bdadf-b2ed-4ebd-9715-8d82585b6c7f",q.Voice_Flora_oldFireflyquest8_65="8ab42f40-8443-4627-b831-5c6bc3ab3775",q.Voice_Flora_oldFireflyquest9_66="37832249-2e54-4281-b7d6-6eea7c2055a4",q.Voice_Flora_oldFireflyquest9_67="306ca9f2-635f-443f-83d6-b4925e3998a8",q.Voice_Flora_oldFireflyquest9_68="0d6b079f-68a4-454c-8418-9ff00d9216b5",q.Voice_Flora_oldFireflyquest9_69="4b0e7a3e-17d2-466a-9080-601813713e3a",q.Voice_Flora_oldFireflyquest9_70="a627c458-b67e-4663-84db-36114935e6f7",q.Voice_Florian_Fireflyquest4_125="793109a0-3767-4bf0-8d76-6cc0a1f75725",q.Voice_Florian_Fireflyquest4_126="0e565471-70ae-4c5e-b708-6f82d2b73ded",q.Voice_Florian_Fireflyquest4_127="5b5249df-0644-4167-864a-5becb343e607",q.Voice_Florian_Fireflyquest4_86="f975045d-ce42-449e-acd4-8d13c71420f1",q.Voice_Florian_Fireflyquest4_87="ca408999-53e3-40fd-be14-fd0b416c3f43",q.Voice_Florian_Fireflyquest4_88="bced7d1c-e488-494a-8ab7-5deefdfbe247",q.Voice_Florian_Fireflyquest4_89="8f10ca92-c408-43e0-bc74-0cbd759f2e31",q.Voice_Florian_Fireflyquest4_90="ca90fd85-69d1-495a-a3fd-e9af9a420db4",q.Voice_Florian_Fireflyquest4_91="366d4d57-6ca1-4919-b5bf-aab9218979b0",q.Voice_Gerald_FireflyQuest12_1="4aeebe34-600b-4a64-9ceb-fc062ba26c65",q.Voice_Gerald_FireflyQuest12_2="92228d81-143b-487f-bcaa-100036cd1092",q.Voice_Gerald_FireflyQuest12_3="6a696e73-b4d4-409b-b853-d7c8df346fe8",q.Voice_Gerald_FireflyQuest12_4="a6664e8c-38b1-4ca8-8941-156ce28b7648",q.Voice_Gerald_FireflyQuest12_5="9df59475-b723-499c-894d-0b0e2ef593cd",q.Voice_Gerald_FireflyQuest12_6="ff4a9d75-a212-41eb-a5f1-015a0dcf26a6",q.Voice_Merchant_Fireflyquest5_128="3641ab5b-c143-40a4-a536-41d0bfa82d42",q.Voice_MoonlightFest_Act01_Pippet_01="265a6280-a954-439c-b47c-822e4ed9c586",q.Voice_MoonlightFest_Act01_Pippet_02="0f255991-396e-4d42-80a3-e3a10f613c52",q.Voice_MoonlightFest_Act01_Poppet_01="21431f24-2e66-49a3-ad6c-52480dc70192",q.Voice_MoonlightFest_Act01_Poppet_02="a55b9d82-2a2c-46b7-b291-594750b50dd3",q.Voice_MoonlightFest_Act01_Poppet_03="0ef59fd1-e11a-417f-bfc4-c4dbd629d5d5",q.Voice_MoonlightFest_Act02_Flora_01="e75a6f1a-20f2-4e91-83ad-76ed7dbc7ce1",q.Voice_MoonlightFest_Act02_Poppet_01="7e378243-c2c3-41b5-89d2-f03666c23bb2",q.Voice_MoonlightFest_Act03_Bok_01="09d0236d-379f-4de8-af2b-6a71b0f3f6b2",q.Voice_MoonlightFest_Act03_Poppet_01="6fed54f5-deb7-4b9f-8d6b-b6f8db9a83ce",q.Voice_MoonlightFest_Act04_Harriet_01="8246268a-f175-40d7-b2ab-e407295c303a",q.Voice_MoonlightFest_Act04_Poppet_01="5a33d8d6-c12b-4152-a393-7238b5665b12",q.Voice_MoonlightFest_Ending_Poppet_01="1a7f02f6-c143-4d89-8885-4194bec22bba",q.Voice_MoonlightFest_Ending_Poppet_02="5ae5d1fd-5014-4806-a444-e32e89a008f0",q.Voice_MoonlightFest_Ending_Poppet_03="93457007-5f7d-43b9-9e54-0618bb180747",q.Voice_MoonlightFest_FinalEnding_Pippet_01="a93a38aa-3ad5-46e5-8747-7dd5d1af29af",q.Voice_MoonlightFest_FinalEnding_Poppet_01="348a715d-a622-425a-a391-ce1ef9701956",q.Voice_MoonlightFest_FinalEnding_Poppet_02="be3e7c5e-7f50-4dc1-9ce7-0d2fcad27f2a",q.Voice_MoonlightFest_FinalEnding_PuppetMaster_01="ae757e3a-4e7b-4449-aacd-08fb8bf6d56b",q.Voice_MoonlightFest_FinalEnding_PuppetMaster_02="5652b920-6cc6-41ca-9faf-8f160c2f62d4",q.Voice_MoonlightFest_FinalEnding_PuppetMaster_03="aef91411-cba5-4b85-a596-a73ae607e092",q.Voice_MoonlightFest_FinalEnding_PuppetMaster_04="a3cfcf58-0725-407d-861a-c043764e3092",q.Voice_MoonlightFest_Selena_01="980b39bf-d60a-45ad-8101-be954bbf3ff2",q.Voice_MoonlightFest_Selena_02="2bda7850-97d9-4ab6-9e6f-528e718afc5d",q.Voice_MoonlightFest_Selena_03="2a67c308-af6e-4f9c-b3f9-d7941a2e77e9",q.Voice_MoonlightFest_Selena_04="fbc2d440-91ea-4380-a810-a5c7c48c33bf",q.Voice_MoonlightFest_Selena_05="b9bf1aae-813f-425f-8971-f18a39455cd7",q.Voice_MoonlightFest_Selena_06="03fd45db-c715-498a-9d7f-aed1405f97fb",q.Voice_MoonlightFest_Selena_07="909efcb8-0498-408f-8059-608d1356970d",q.Voice_MoonlightFest_Selena_09="4a58d57c-baf6-4895-a656-488345b3e2bb",q.Voice_MoonlightFest_Selena_10="3827d54f-b91b-48ec-bf50-f097c866e235",q.Voice_MoonlightFest_Selena_11="35c7c4c9-ea84-4c6a-b9f2-9b171cf50777",q.Voice_MoonlightFest_Selena_12="c9941e15-1bc2-4834-bd73-0e8555fe422a",q.Voice_MoonlightFest_Selena_13="9c57aa9d-72b9-4ff9-b691-315c9d3d8170",q.Voice_MoonlightFest_Selena_14="555a82e8-5123-4e08-a022-2fde0dedfc75",q.Voice_MoonlightFest_Selena_15="fe8cd84d-221f-448e-9af7-8d3a707a3c4f",q.Voice_MoonlightFest_Selena_16="11ff0bdd-4071-4064-9089-a74730a41a8c",q.Voice_MoonlightFest_Selena_17="6a843c26-26d3-4be1-9c1b-40689337f670",q.Voice_MoonlightFest_Selena_18="fb9aa5d0-5b29-411c-829b-378d3aa6362d",q.Voice_MoonlightFest_Selena_19="c28875fd-0a0c-4982-9d32-22e187bc9694",q.Voice_MoonlightFest_Selena_20="583489f7-fa75-4bc4-8b59-5109858178c0",q.Voice_MoonlightFest_Selena_21="821ae69e-c376-4ac8-8851-c299b4400270",q.Voice_MoonlightFest_Selena_22="6ca41204-8317-4375-ad56-4303e5365cee",q.Voice_MoonlightFest_Selena_23="5cf4d4ce-388d-459d-ada5-c5e956f67c21",q.Voice_MoonlightFest_Selena_24="554811c0-5364-417c-852b-085f80b78492",q.Voice_MoonlightFest_Selena_25="31d77714-2054-464c-83f6-7454d05447ba",q.Voice_MoonlightFest_Selena_26="7db19657-8fd0-4b7d-aae8-b1eee6458903",q.Voice_MoonlightFest_Selena_27="22f311e4-e526-4529-a25b-766d96b04c4b",q.Voice_MoonlightFest_Selena_28="893c0de0-e9a6-48c5-86d7-146d019cb040",q.Voice_MoonlightFest_Selena_29="98268d80-52cd-408a-aebb-e22ffe543334",q.Voice_MoonlightFest_Selena_30="13a75a5a-9c59-4146-a429-3a8565e67f03",q.Voice_MoonlightFest_Selena_31="04203ee6-62ca-4b5a-ac44-2ead8755a0d2",q.Voice_MoonlightFest_Selena_32="ad1ed02a-648b-482c-8ace-bc6a406038cb",q.Voice_MoonlightFest_Selena_33="1caee07e-af5b-47c3-88b8-d07ac09332a4",q.Voice_MoonlightFest_Selena_34="fdf5a5f0-a9f5-44bd-b0ac-30cafca66c20",q.Voice_MoonlightFest_Selena_35="acc914bb-f681-4138-a9a0-a84ec6ca51e8",q.Voice_MoonlightFest_Selena_36="e8129d96-63c5-4ce3-9cad-c615cf1eba6f",q.Voice_MoonlightFest_Selena_37="62a6da41-99a3-4a48-ad9f-0898968e0fad",q.Voice_MoonlightFest_Selena_38="3eb13f9f-cfdf-4d3a-91a1-22ca77099b70",q.Voice_MoonlightFest_Selena_39="12e3a8ed-0fdf-4854-aa90-51474004c3c0",q.Voice_MoonlightFest_Selena_40="99f4d524-d6d7-4558-97a7-35d3b4f3d039",q.Voice_MoonlightFest_Selena_41="cb5e756a-f79f-42be-ab4f-c33b4950de1c",q.Voice_Narrator_BonfireEntry1_135="b8a8478b-d4ce-4c96-957f-42f1adfdc933",q.Voice_Narrator_BonfireEntry2_136="f14b1412-d2c3-4fc8-8cdc-0bf51ecbf50a",q.Voice_Narrator_BonfireEntry3_137="40441b03-1d8c-45fe-bcc7-70ce2a9d9a04",q.Voice_Narrator_FireflyEntry1_129="97a15639-7941-4e82-ad92-9ee01dbd891c",q.Voice_Narrator_FireflyEntry2_130="f0116f3d-e88a-4254-bece-4c7801b29415",q.Voice_Narrator_FireflyEntry3_131="b70ec6f7-da19-4ce3-b725-5cb5d60571a2",q.Voice_Narrator_ShipWreckEntry1_141="7ec9e690-2207-4500-bd8e-d268184a2f06",q.Voice_Narrator_ShipWreckEntry2_142="4698946c-d0b2-48d2-b137-bf51fc281e0c",q.Voice_Narrator_ShipWreckEntry3_143="035ce9cf-74af-40f4-b3ca-064e9c2d95e3",q.Voice_Narrator_ShiverchillEntry1_132="e5bf7d7b-4970-46a6-ae42-1111a3349e5c",q.Voice_Narrator_ShiverchillEntry2_133="e0a792e7-242b-498a-8f25-fe9f8b057620",q.Voice_Narrator_ShiverchillEntry3_134="05fe1185-a23a-49a9-abf0-c3883dbd0e81",q.Voice_Narrator_SkywatchEntry1_138="a1dac258-7596-449e-8850-0802ee1d30ce",q.Voice_Narrator_SkywatchEntry2_139="158bc99f-5a0a-4007-827c-8c2ef8a0493b",q.Voice_Narrator_SkywatchEntry3_140="0f0f3ac8-29bd-4939-98c1-ca8ee438f243",q.Voice_Noot_OldFireflyQuest6_21="7b82f4bc-9d19-4f82-a3ea-e3ffceb78ed1",q.Voice_Noot_OldFireflyQuest6_22="3a444a25-8d35-41f7-a730-9c48aa3eeb81",q.Voice_Noot_OldFireflyQuest8_23="a3548e8a-c9ae-47fc-9b80-d59d38851a2a",q.Voice_Noot_PuppetMasterAppearance_Shipwreck_20="3e223f80-43e3-479e-bf76-dd4179418657",q.Voice_Noot_PuppetMasterLockingZones_Worldmap_18="b498d56a-b9d2-415a-8cae-0b3518c27cf6",q.Voice_Noot_PuppetMasterLockingZones_Worldmap_19="528e8ac8-cf7e-4ad9-88b6-3298f8597759",q.Voice_Noot_SkywatchQuest4="c5534d86-7693-4de8-8e14-38a629f9f3f5",q.Voice_Pippet_FireflyQuest4_92="a55805b6-608b-48ae-babd-27b74649e2a1",q.Voice_Pippet_FireflyQuest4_93="41435b6f-dcee-4327-b73e-45af372163ff",q.Voice_Pippet_FireflyQuest4_94="ff73cc98-7df8-42fa-a09a-630e88907eff",q.Voice_Pippet_FireflyQuest4_95="9158e059-efc9-4f60-9f71-b588752eaed7",q.Voice_Pippet_FireflyQuest4_96="64206efe-36f6-4da0-b916-e7d836988837",q.Voice_Pippet_PuppetMasterAppearance_Shiverchill_98="4b7afdb9-dacc-4a41-9780-74db34339d14",q.Voice_Pippet_PuppetMasterAppearance_Shiverchill_99="f3547370-61ea-41cd-a65d-d6a4608bdc69",q.Voice_Pippet_PuppetMasterAppearance_Skywatch_101="07061ffa-305d-4ae5-853b-5cfac9b27b7b",q.Voice_Pippet_PuppetMasterAppearance_Skywatch_102="3e605d9a-a08e-43db-aadf-a109e85dde6b",q.Voice_Pippet_PuppetMasterAppearance_Skywatch_103="75369c88-1194-48a5-8a1e-38fb086fde4b",q.Voice_Pippet_PuppetMasterLockingZones_Worldmap_97="3a59a038-38ba-4be6-9728-838067b83aea",q.Voice_PostBattle_LossFlow_Noot_01_merge="f34a942d-12e2-43ce-82eb-4da484a55505",q.Voice_PostBattle_LossFlow_Noot_02_evolve="7d4bdf7c-2b7a-454e-a41e-0c879329fbdf",q.Voice_PostBattle_LossFlow_Noot_03_plant="2ab557fe-d14b-4121-bb47-b7bc38ed67b2",q.Voice_PostBattle_LossFlow_Noot_04_fire="b5f81d13-5afa-4bd6-9c68-5ed32ec57802",q.Voice_PostBattle_LossFlow_Noot_05_water="91854eb3-98df-4e30-9584-258aae24b7d5",q.Voice_PostBattle_LossFlow_Noot_06_storm="177e18b9-5058-410f-8035-11ba77f32eae",q.Voice_PostBattle_LossFlow_Noot_07_astral="ff3fba4d-ee4a-45e1-8bd4-a3bfe412774d",q.Voice_PostBattle_LossFlow_Noot_08_shadow="4343353b-2dd1-4c3a-969b-6051aba94b8f",q.Voice_PostBattle_LossFlow_Noot_09_earn_stars="12d43163-0394-49a9-99ba-d271277aa296",q.Voice_PostBattle_LossFlow_Noot_10_pet_gear="c6eace4a-8cb9-4a6e-9b7a-22481a46ef45",q.Voice_PostBattle_LossFlow_Noot_11_wizard_gear="dd7acffd-3ff8-4cf5-97b8-26ce95c5ef88",q.Voice_PostBattle_LossFlow_Noot_12_weakness="16619cd3-de73-4d34-a387-2babda7b37dc",q.Voice_PostBattle_LossFlow_Noot_13_strength="af22ff86-e950-40bb-a458-c6be61c854d7",q.Voice_PumpkinFest_Extras_KandiKorn_01="793e6cac-e2c0-4670-b05d-774e5a39c6f0",q.Voice_PumpkinFest_Extras_KandiKorn_02="3cd9d71e-807b-4637-b044-c08aee1b485f",q.Voice_PumpkinFest_HollowJack_01_V02="bbbf5487-1c7c-4a1a-84cf-c1acdc2b6278",q.Voice_PumpkinFest_HollowJack_02_V02="26310b07-f8d3-4ef5-984f-28e365b2139f",q.Voice_PumpkinFest_HollowJack_03_V02="7f472a43-3495-4857-9b25-d7101223570b",q.Voice_PumpkinFest_HollowJack_04_V02="262e799c-f8af-46b8-8b98-f742bb49a5a2",q.Voice_PumpkinFest_HollowJack_05_V02="eaf995e1-097b-4f7a-afdc-54c9512ee85e",q.Voice_PumpkinFest_Intro_KandiKorn_01="4dd31d9e-9a36-4939-9049-05c4aef77738",q.Voice_PumpkinFest_Intro_KandiKorn_02="c1294e83-09ed-4974-bd5c-eea9a553ce2f",q.Voice_PumpkinFest_Intro_KandiKorn_03="d30fa6f4-81c6-48b4-8f8f-3ab0a5758cd4",q.Voice_PumpkinFest_Intro_KandiKorn_04="04b7e74c-aafc-4e08-8dd2-cf9ae6d99344",q.Voice_PumpkinFest_Story_Week1_KandiKorn_01="8d94b22c-82a9-4cc8-b69a-ed417069e77c",q.Voice_PumpkinFest_Story_Week1_KandiKorn_02="06811388-a6a2-48b7-9eb4-25a0b8cff3a5",q.Voice_PumpkinFest_Story_Week1_KandiKorn_03="e521afdc-afad-4ba8-8a78-c3a119dfe185",q.Voice_PumpkinFest_Story_Week2_KandiKorn_01="9e19d42e-57b2-4951-b1bc-28d03b5d645d",q.Voice_PumpkinFest_Story_Week2_KandiKorn_02="4e758915-8828-49c4-822b-55f81ffc7ed0",q.Voice_PumpkinFest_Story_Week2_KandiKorn_03="259550eb-2a62-4a87-befa-a5fe9a9c01b8",q.Voice_PumpkinFest_Story_Week3_KandiKorn_01="24ffc523-2a22-41ae-bdd9-1b3f75032ec0",q.Voice_PumpkinFest_Story_Week3_KandiKorn_02="790391ac-f0e5-47cc-97d2-65932fe029b4",q.Voice_PuppetMasterSept25_Scene08_PuppetMaster_01="218f8754-de85-4eb0-b792-cc91a6b2393f",q.Voice_PuppetMasterSept25_Scene08_PuppetMaster_02="db88bb61-7711-4fbf-ae5a-df93a1ba4b9c",q.Voice_PuppetMasterSept25_Scene08_PuppetMaster_03="0e437670-69d3-48f0-ac86-803faaf61720",q.Voice_PuppetMasterSept25_Scene08_PuppetMaster_04="5172c8fd-41da-4bfd-9c46-3712e9fc8ae8",q.Voice_PuppetMaster_FireflyQuest4_118="2dae6372-0603-42ad-9a55-9e71b2eb3401",q.Voice_PuppetMaster_FireflyQuest4_119="bd6da4e1-02ff-47d5-98a1-763b5854dbfc",q.Voice_PuppetMaster_LockingZones_Worldmap_120="c7fb185e-3536-4df4-aff3-b2403f712447",q.Voice_PuppetMaster_LockingZones_Worldmap_121="aecf39a7-af64-4d55-b06e-e478aef5c3f9",q.Voice_PuppetMaster_LockingZones_Worldmap_122="b28049f0-06ab-4423-b93e-183f89fdd022",q.Voice_PuppetMaster_LockingZones_Worldmap_123="12321149-9589-4b0d-bd95-5e141cdeb5b7",q.Voice_PuppetMaster_PuppetMasterAppearance_Bonfire_108="7971c3c2-0a42-4a9f-b52c-6ab9e060fb8e",q.Voice_PuppetMaster_PuppetMasterAppearance_Bonfire_109="c0cdfd80-6091-4987-ab46-dc04e3a1e498",q.Voice_PuppetMaster_PuppetMasterAppearance_Bonfire_110="76cea0da-0bd2-4bb6-b0ca-e7ef382117c8",q.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_111="3ae2d573-8cc9-4fc3-a4ed-a2a3cec63740",q.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_112="593bbdc8-6ea8-4dac-a1ee-8d6ea85fd40f",q.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_113="c86e1829-5619-4004-b02d-22feacfc2995",q.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_114="593104e7-7f0b-4b9c-80df-994fe42ef243",q.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_104="eeb4a381-6d0e-4e93-adf6-9adfc17a8811",q.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_105="4d6b5c5a-c283-4281-b14c-21c929e3fb1f",q.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_106="58e4d015-12ce-48bf-8563-8572f66e208e",q.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_107="3afc2c07-ef58-49e0-8c0d-47ea535c8dc9",q.Voice_PuppetMaster_PuppetMasterAppearance_Skywatch_115="80530300-e336-43ac-ad3d-d7a0fc83c3e4",q.Voice_PuppetMaster_PuppetMasterAppearance_Skywatch_116="e5013a18-09df-4676-a0fe-ccbef339757f",q.Voice_PuppetMaster_PuppetMasterAppearance_Skywatch_117="c2ff57de-b3ad-4508-a3ac-f831a0ffec62",q.Voice_Rifts_Barks_Phase1_Lose_FireDragon_01="92f9526a-eb50-4902-8835-5f5b1caef3f7",q.Voice_Rifts_Barks_Phase1_Start_FireDragon_01="0038c10f-9599-41d2-bdd0-547ead604f5b",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_01="83130011-7070-4d3f-a381-f2a95c376109",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_02="87cf2132-0060-4d33-b2db-6b86968a843e",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_03="78574eb1-d435-401d-83c0-8c8a8382f97d",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_04="8da447ef-873b-4a98-83ef-167f49818738",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_05="bc522af4-8477-47fd-a516-6cf25bc58ea7",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_06="5fd61bd2-8c0f-4216-850a-1924dc87671d",q.Voice_Rifts_Barks_Phase1_Win_FireDragon_01="a261103d-a93a-4816-aeae-5004d53b6151",q.Voice_Rifts_Barks_Phase2_Lose_FireDragon_01="e7b284cf-9e17-41ae-a210-c951194f3f93",q.Voice_Rifts_Barks_Phase2_Start_FireDragon_01="9570b27d-5ef4-4ea8-8071-c8da1d1f673a",q.Voice_Rifts_Barks_Phase2_Start_FireDragon_02="0057458a-0825-4166-8741-127fcac61c04",q.Voice_Rifts_Barks_Phase2_Start_FireDragon_03="622798b6-cfb6-4e7f-86dd-c1e03c825c63",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_01="cf4a466d-8d29-4de7-be3e-a3992e2d1d77",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_02="a763f34d-f221-4ffc-8f31-0a7509665734",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_03="d391fb03-7729-4457-b23a-cac711165efb",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_04="ee8e1481-26b3-4f0e-8651-8bbceb9bfee9",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_05="5fbc95a1-46e6-4b1f-b219-640e79cf7c55",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_06="94c47f9e-4808-4138-b99b-af622c8b6c19",q.Voice_Rifts_Barks_Phase2_Win_FireDragon_01="48a41a66-e1d0-4e67-9430-9a8a275fb5d8",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_01="12f78484-3661-4da5-a7b2-f9a6279288a9",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_02="42e7c4c0-fb85-451c-9b17-b9e17c187126",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_03="3a90fd78-837d-422b-af6c-ae5ff36c165f",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_04="3c30cf21-a317-405d-a103-19c1e7196d97",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_05="8969d173-f209-466e-9337-bb4a697bbf48",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_06="ae4facf1-e2f8-4a30-8308-70542462de9a",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_01="586ad1fd-f572-4f84-b1e4-4d88d0271676",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_02="ca264450-1239-49e3-ac90-be1856e74513",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_03="36725538-31f5-45ab-91e0-0e85d78bf200",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_04="3a4d1976-03c7-4d5b-8fb0-0da3cf70daf5",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_05="bc4f68f4-a8da-4416-b628-347b491e4d92",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_06="15fcd342-af9e-4186-8dd4-27f7183b59bd",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_01="d3458d9f-241b-411a-8766-5f395438425e",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_02="6a7e711b-829c-44f1-87d8-11af0fbacfd1",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_03="946a17ee-cd11-42f1-880a-4c8009e567e9",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_04="d15a6d42-a15f-471e-8be3-ac0f485db0c9",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_05="d54c716a-497b-4109-a55e-6131a7b460cf",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_06="65a92b5f-5053-47c2-a5e0-9d59b2475d38",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_07="4e23b7da-9896-4055-8133-1e148f54ac8c",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_08="d5df1466-c37c-4ab4-95ed-50601d41f233",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_09="1d7336ec-d068-4b68-aaef-485a83a33385",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_10="f770f346-96fe-4a0e-b3d8-058ec0daccf5",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_11="f5fab027-e7c5-480f-b884-cb1e7ab37987",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_12="5a4374ce-d36e-402e-bef6-eee7de5f6ee5",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_01="28b99bef-d2a3-4a3c-98b0-377ec1048eef",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_02="64b04240-cae6-476b-bb07-124cc607e068",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_03="4570c0b5-c090-4cb7-8a67-81d1b154c16f",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_04="4a1a1362-5e17-4fae-97f0-2145e4ed9bae",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_05="4d7e3d3c-2464-47ab-bd92-ae71f8f9cf48",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_06="79423224-7d81-4853-a7f5-5d2c04ae331d",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_01="95b7d67e-e2b7-49be-9e73-bc9e962840ae",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_02="98643009-885f-411e-baa0-de2620f1ee58",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_03="cf289168-1eaa-4416-9f74-3f1a6a419ba2",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_04="6b36c34a-b2e6-4b19-95a3-4dbef0608d05",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_05="fb88d55e-1a71-42c4-bea0-939b86f135b1",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_06="1e437fea-0072-4a52-8527-165760917029",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_01="27e5029e-b986-4e48-92c4-dfbf59eba53c",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_02="980f81fb-8ce6-42a8-b49d-ecda3bb0e0b3",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_03="f44177d9-06c0-484a-9801-94ed2a3396b7",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_04="7d9a680e-3c98-4cae-8fd9-869123b55d65",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_05="8b900146-ddb3-41a2-8d8f-3eb5ac9dd1fe",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_06="14327e06-f043-409f-a62c-ebc7b0349196",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_01="b42a33eb-bb74-4528-b3f5-922d2e12fb1b",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_02="f8bb0237-3238-416a-9031-59b6948a5ca9",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_03="0cdc2a59-c39e-4e63-be1d-897552dbc3ee",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_04="faa77dd0-4ac3-4742-8815-a15c05db1b01",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_05="08068dd0-5988-4fb1-9cb6-881763261938",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_06="c9c96576-779a-40cc-9aa4-af8bd0e783ed",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_07="fd6901b0-3f74-4bd2-8328-bbe8542b7649",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_08="4d8ebfec-a049-4b0b-a836-95272ef96467",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_09="cd2709c3-63e8-49e3-836f-f8e175ae3e60",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_10="30d4d564-00f0-4c2c-a9fb-c1c5dcdbd73f",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_11="113b8cb3-633a-42c2-a9d7-aa8ae56de61a",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_12="1e8bb3f6-917a-480b-b808-82b323ce458e",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_01="817a1602-435e-4adb-a963-64b80702add7",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_02="1c8e0b50-ff77-400e-b797-28b2577b4a42",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_03="145b81cf-67ba-4637-984b-b295326325da",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_04="c6f61bbb-37c7-4e4a-923d-428da1c4a6d6",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_05="ac970c72-5b06-47cc-8f17-017a105e9c0d",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_06="dd473903-5535-482b-a841-4ba674a311ec",q.Voice_Rifts_Barks_Phase5_Lose_FireDragon_01="26a42e1f-1a96-4048-87c5-f22a30fa1a6a",q.Voice_Rifts_Barks_Phase5_Lose_FireDragon_02="462e7142-e8ee-4378-a700-1cb40001f16f",q.Voice_Rifts_Barks_Phase5_Lose_FireDragon_03="56c088b3-5b60-4a08-8b92-3ddad4b9f6a0",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_01="6255ca4f-965a-4658-b424-d5e91d4ec1ad",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_02="437c4fe2-ce8a-417a-a868-3871f7f70c5f",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_03="898e5c4a-82fd-4b77-9260-d599cfe89bd9",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_04="6d28b564-2589-4aab-98e3-41a78740b86b",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_05="19fa33e4-075f-43d7-b263-e3dbc1b03755",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_06="a9e1f6ba-f0c8-4112-9e54-f89b32e92cd9",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_01="f676b584-7dfe-4943-8835-5ba16de30b32",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_02="22b3a5f0-8405-4863-9fcb-246c14048e6c",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_03="7fbd275e-d007-481a-a4c8-6f5fa661b7ad",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_04="cc531426-4730-44b5-9aaf-d0198796b305",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_05="048970a6-5ecb-47d4-bff8-2f187600657a",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_06="995829a8-759f-4d43-b538-418102e09ea5",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_07="9ea3ae2d-56fc-4a4f-9c48-24f342d97455",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_08="e4265381-25a4-49f4-96cf-65d4cad60733",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_09="a9656998-a668-4fa2-93c7-81b88b55de2a",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_10="5d388b12-d032-4873-956e-f275cff7000e",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_11="e9a757e0-337e-4d5b-b46b-2b4da3a40d78",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_12="9a50cf7e-7e5e-4bf5-9da0-bcdc866a0bf7",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_01="df8765ed-40ab-4421-b468-ba288bdb4d30",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_02="e0a7f270-a9d0-452d-bdb1-c5cdc8dde7fa",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_03="9602fddd-d217-4c9a-b4eb-18608c1e8269",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_04="7d2bc0c8-a497-41fe-ac47-e47961460217",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_05="b0f343d1-76f3-419b-924c-4ce3b3af79bd",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_06="7d2643ee-a714-4345-829f-6f708e7b2ce9",q.Voice_Spingfest2026_Bargo_01="1fd8fade-4576-4c7e-aba6-413eb4cdfe5a",q.Voice_Spingfest2026_Bargo_02="83ff686d-d671-43cd-a5d7-ff65f51fb49b",q.Voice_Spingfest2026_Bargo_03="f36484d0-df11-46db-a6fb-22aaf96a7264",q.Voice_Spingfest2026_Bargo_04="e9201965-4cb2-4d58-a744-882018ee59a3",q.Voice_Spingfest2026_Bargo_05="7b4e2917-fe21-4fdc-8434-1c29ed1ab260",q.Voice_Spingfest2026_BunnyWizard_01="7bc5faf1-a37c-4df2-b405-1e0e7cc48214",q.Voice_Spingfest2026_BunnyWizard_02="aae5025e-65d4-4255-895b-1e0e607aad7c",q.Voice_Spingfest2026_DonZorro_01="5b1f1e2d-9f39-4872-8181-d79ac5e04ae6",q.Voice_Spingfest2026_DonZorro_02="b8027096-b8c4-4b51-9683-4c9802368731",q.Voice_Spingfest2026_DonZorro_03="af963f44-8cf4-4e06-bfca-2320b08af3aa",q.Voice_Spingfest2026_DonZorro_04="2c3fbe7e-1cdd-45ba-8ecd-23397d977042",q.Voice_Spingfest2026_DonZorro_05="adb356df-b4a8-4533-ba19-e57bb07efd0b",q.Voice_Spingfest2026_DonZorro_06="680987b1-382c-4841-b8ed-ae1248c59a9a",q.Voice_Spingfest2026_DonZorro_07="a7dba811-b982-4a57-9737-8796f86f4fbf",q.Voice_Spingfest2026_DonZorro_08="a259d488-8eda-4c44-a787-ce588239fc5a",q.Voice_Spingfest2026_DonZorro_09="f36b961f-e8c8-4da8-8c57-9414899923c4",q.Voice_Spingfest2026_DonZorro_10="54d51e49-5530-4630-ad34-39b220c972c6",q.Voice_Spingfest2026_DonZorro_11="0c7e90ab-4ee9-4739-8d95-1f758fd29bc3",q.Voice_Spingfest2026_DonZorro_12="d7ea0e42-843d-4b77-8385-dac686d6ac8b",q.Voice_Spingfest2026_DonZorro_13="cfcf9ffa-0376-49a8-bcb8-edc73afdee13",q.Voice_Spingfest2026_DonZorro_14="5da97319-40d7-492e-a43d-05630fd2e0b3",q.Voice_Spingfest2026_DonZorro_15="aebb6223-2174-42ac-9f24-0feb458aa47d",q.Voice_Spingfest2026_DonZorro_16="cb4cc9f0-9b9e-457c-b2d5-349e3073551d",q.Voice_Spingfest2026_DonZorro_17="0b0346cd-1312-4f07-bf2c-6599325845a7",q.Voice_Spingfest2026_DonZorro_18="8a349921-fc7b-4762-8c88-473661b30399",q.Voice_Spingfest2026_FoxWizard_01="c4b79595-c4b4-4bf7-902f-186c274a0605",q.Voice_Spingfest2026_FoxWizard_02="d236a67d-814e-463d-bbfc-137764d89b5d",q.Voice_Spingfest2026_HarrietHood_01="dc69fbd5-33e9-4830-9c3d-c60e2bbee7bc",q.Voice_Spingfest2026_HarrietHood_02="ff7cd0eb-970f-41f9-b81f-a1a4046420ad",q.Voice_Spingfest2026_HarrietHood_03="a37c35c4-75fa-4544-bd24-d8d01488265e",q.Voice_Spingfest2026_HarrietHood_04="aea03dc1-b42c-4fa2-8783-f0d321ad6072",q.Voice_Spingfest2026_HarrietHood_05="4c8c72cc-5347-4edb-9ade-16ad80a603d7",q.Voice_Spingfest2026_HarrietHood_06="ff477c42-03d2-4666-b782-ceb619a6ab5d",q.Voice_Spingfest2026_HarrietHood_07="fbc095e1-a8ef-49c1-ab40-15e475257b25",q.Voice_Spingfest2026_HarrietHood_08="efc580cb-da14-46a8-a8d8-9e345d94a643",q.Voice_Spingfest2026_HarrietHood_09="4e2a17c8-daf3-43e1-8820-10839902aebe",q.Voice_Spingfest2026_HarrietHood_10="8febc700-a624-4106-98c4-43033a6afb1e",q.Voice_Spingfest2026_HarrietHood_11="22c55298-721c-4d1c-916b-5ac45bd1c6b4",q.Voice_Spingfest2026_HarrietHood_12="c5bce580-d55f-4b2b-acd0-664748a1f649",q.Voice_Spingfest2026_HarrietHood_13="f5ff002e-7d0b-4f56-965e-4437d10e6ae4",q.Voice_Spingfest2026_HarrietHood_14="a21eae98-64b6-4e4d-97b8-b21c03d5eada",q.Voice_Spingfest2026_HarrietHood_15="c0a6415a-a77f-4e57-b5f6-de9b865f2366",q.Voice_Spingfest2026_HarrietHood_16="df15219b-7bfc-4c0f-acbe-c484622368bb",q.Voice_Spingfest2026_Verna_01="eca97a55-a065-418b-adef-f478c076e3eb",q.Voice_Spingfest2026_Verna_02="25588c46-835c-4aa1-9243-7492c6d0542e",q.Voice_Spingfest2026_Verna_03="60dd4050-b8e7-44c1-bf3e-f01cf1fedb66",q.Voice_Spingfest2026_Verna_04="3e74a12b-e4d0-403c-bce2-c25a7b8c6296",q.Voice_StarlightFestival2025_Act1_SirConstello_01="e61b41ae-653f-4e42-982b-131a449dfc39",q.Voice_StarlightFestival2025_Act1_SirConstello_02="353f5eeb-661b-4b76-ad12-25ecc59927f8",q.Voice_StarlightFestival2025_Act1_SirConstello_03="d7d6f580-32f8-4878-9b68-3006d973fb00",q.Voice_StarlightFestival2025_Act2_SirConstello_01="734415c8-1c11-489e-a56e-5ef094e4c5ce",q.Voice_StarlightFestival2025_Act2_SirConstello_02="6f9a0025-ac09-47ad-8f5e-41462ab4a6c7",q.Voice_StarlightFestival2025_Act2_SirConstello_03="05b4d235-e72b-4cb9-bde3-8d65c0460d1d",q.Voice_StarlightFestival2025_Act3_SirConstello_01="334879f8-f78f-4904-a993-831ee94b89e6",q.Voice_StarlightFestival2025_Act3_SirConstello_02="e59f920c-aa0a-40f1-b356-67fdb737df04",q.Voice_StarlightFestival2025_Act3_SirConstello_03="e430c39b-31e3-402d-8e3b-b19760ac7d1a",q.Voice_StarlightFestival2025_Act3_SirConstello_04="08504d8a-d0a6-42fb-823e-ed83ceb3b21f",q.Voice_StarlightFestival2025_Act4_PuppetMaster_01="c4c30d2b-bfc0-429f-8d8e-21f95805ab94",q.Voice_StarlightFestival2025_Act4_PuppetMaster_02="a04fb70a-485c-4c4f-bae3-5396bb2faea2",q.Voice_StarlightFestival2025_Scene1_Imani_01="3215533c-f280-41c5-ae51-88248af23238",q.Voice_StarlightFestival2025_Scene1_Imani_02="6922f234-c7c0-45d6-baaa-0d61a9e0a5e1",q.Voice_StarlightFestival2025_Scene1_Imani_03="e0feaee3-a19e-4f23-a086-2e6f78dfcf1f",q.Voice_StarlightFestival2025_Scene1_Imani_04="7eb94d46-e8b1-4fab-9364-60316257ff6a",q.Voice_StarlightFestival2025_Scene1_Imani_05="532928c3-4482-4207-8bc2-facbb21345f3",q.Voice_StarlightFestival2025_Scene1_Imani_06="18f94da5-96d0-4053-9d50-5161e5b36269",q.Voice_StarlightFestival2025_Scene2_Imani_01="b607ed24-454e-43d6-90e1-f09f9b5f660a",q.Voice_StarlightFestival2025_Scene2_Imani_02="acc7e16e-0294-4842-ae99-a783a2c2b59f",q.Voice_StarlightFestival2025_Scene2_Imani_03="f084658a-9358-40ca-b035-19c3ebe1b05a",q.Voice_StarlightFestival2025_Scene3_Imani_01="962f6225-1ba7-4024-b187-7f0461e0ac40",q.Voice_StarlightFestival2025_Scene3_Imani_02="3de77efc-0d7d-495d-938c-a740a1aa6b66",q.Voice_StarlightFestival2025_Scene4_Imani_01="275d57f9-93e3-44b8-9376-9a584c76005b",q.Voice_StarlightFestival2025_Scene4_Imani_02="49043ab6-ef4b-41f1-bf1c-19e2e92787e7",q.Voice_StarlightFestival2025_Scene5_III_Imani_01="9f85d703-7bec-4ba8-a345-f53ae65e0fdf",q.Voice_StarlightFestival2025_Scene5_III_Imani_02="f8ad7325-54a4-4e28-ba45-7ba06f4af46e",q.Voice_StarlightFestival2025_Scene5_III_Imani_03="b4b2da92-e710-424b-a350-a6e768ef16a2",q.Voice_StarlightFestival2025_Scene5_II_Imani_01="a895dcc0-f681-4f7d-ac06-cf3120989449",q.Voice_StarlightFestival2025_Scene5_I_Imani_01="8524d96f-7621-497f-b39c-727d1091e519",q.Voice_StarlightFestival2025_ShopDialogue_Imani_01="fc82be12-27d2-4813-a09c-95d88f614efb",q.Voice_Winterfest_Act1_HowardCornelius_01="f7ce1403-7b74-4d65-bc57-f4f6bd4d5423",q.Voice_Winterfest_Act1_HowardCornelius_02="fc3fffb3-05f4-4370-a23e-0a2efbdd02f7",q.Voice_Winterfest_Act1_HowardCornelius_03="f8e90484-d723-41c0-bdaa-2902a447d1ac",q.Voice_Winterfest_Act1_HowardCornelius_04="4f6050c9-9387-4ef1-9009-2a72db089754",q.Voice_Winterfest_Act2_HowardCornelius_01="6bdf71b5-39f6-4bf2-a848-6044fc507a92",q.Voice_Winterfest_Act2_HowardCornelius_02="be1c5454-1d86-4471-88fc-0eea94c8c325",q.Voice_Winterfest_Act3_Pippet_01="14ccf911-d9c6-42d0-91f9-dd706fc612bf",q.Voice_Winterfest_Act3_Pippet_02="fd7c7789-3d06-4f34-988a-9178d252f17b",q.Voice_Winterfest_Finale_HowardCornelius_01="67de2248-a7ba-4f90-bc48-f5be1ade65c4",q.Voice_Winterfest_Finale_HowardCornelius_02="fb1b2e45-cce4-48b4-95c8-52fa79a3e075",q.Voice_Winterfest_Finale_Pippet_01="97b2e447-ae3c-4c9e-8c50-c5c2060cc575",q.Voice_Winterfest_PuppetMaster_01="d15990c4-8665-4c43-b14b-7fee3e19e2b3",q.Voice_Winterfest_PuppetMaster_02="61bb05e2-a2e7-46b5-85ca-03b5436c39d2",q.Voice_Winterfest_PuppetMaster_03="df487868-7136-414b-b1fa-7e1dbe4aa4d6",q.Voice_astraldragon_barks_another_round="c0b23cb3-289a-4297-9bed-f548d2800ee5",q.Voice_astraldragon_barks_banish_any_shadow="0bda7f89-99c7-48b6-8fe5-59259afa378c",q.Voice_astraldragon_barks_better_but_not_enough="baa46a07-f1e7-4c2b-80c5-de02673ec417",q.Voice_astraldragon_barks_bright_enough="efa05b5e-435d-4b53-978a-90dea30dfe97",q.Voice_astraldragon_barks_brilliance_unmatched="95779b6e-0463-474e-82a4-4d7f47fec7fa",q.Voice_astraldragon_barks_brilliant_work="24019069-373c-4a07-b4e0-bf85c0a45d08",q.Voice_astraldragon_barks_brilliant_young_wizard="4a03c1a1-5d99-4b52-bd03-1f4e8c3ca46f",q.Voice_astraldragon_barks_cannot_defeat_me="a15cead6-5e9e-40ce-b37d-be9be3011113",q.Voice_astraldragon_barks_combine_our_light="c8f045df-ab61-4993-95f3-3141ec1ab0af",q.Voice_astraldragon_barks_coming_shadow="35bc3180-103c-41eb-bd2f-efad1e797d07",q.Voice_astraldragon_barks_couldnt_defeat_me="0ac0bfda-8b28-4c25-a391-75c785bedcbf",q.Voice_astraldragon_barks_grow_stronger="7abb4acf-5201-4597-b627-52eee750e799",q.Voice_astraldragon_barks_growth_takes_time="c68623db-a0d1-423e-9eef-e608b8c75ced",q.Voice_astraldragon_barks_hard_work_and_practice="a1c0e840-1758-4323-9f0e-ea7490e2812c",q.Voice_astraldragon_barks_have_patience="cc4cab5b-f97b-47a6-8557-47b6856482c6",q.Voice_astraldragon_barks_i_see_youve_returned="f366fb3d-a652-47e6-9f29-316ffdd6c306",q.Voice_astraldragon_barks_keep_hearing_about="d5928ecb-1a59-4506-af54-4c8ee12331fd",q.Voice_astraldragon_barks_keep_practicing="7b5d0500-eef7-4c73-b098-7643a7bba8a9",q.Voice_astraldragon_barks_light_defeats_darkness="e6596485-0535-434a-8a45-a6eb1892a50b",q.Voice_astraldragon_barks_my_brilliant_light_reveals="f10cfbda-629f-4ccf-8300-cb3c433fc994",q.Voice_astraldragon_barks_no_pan_flash="2847e3c0-d26f-491a-99c9-b6d8862ef580",q.Voice_astraldragon_barks_only_light="70b39ecb-2808-407a-85e8-a6ed43a95057",q.Voice_astraldragon_barks_patience_rewarded="ff2b0281-9e58-43ae-97c7-482c6a3a0e1d",q.Voice_astraldragon_barks_patience_young_wizard="d7bc8327-3739-43ef-8120-8a6d3d9866ad",q.Voice_astraldragon_barks_pm_growing_stronger="42534711-b799-4eed-ae23-63342ce0be8c",q.Voice_astraldragon_barks_pm_shadow_grows_darker="14580731-a63f-432d-876e-6be789511572",q.Voice_astraldragon_barks_practice_makes_perfect="f4105e43-1490-4e6b-a2a9-cfdcf4751139",q.Voice_astraldragon_barks_return_soon="1bb4eb04-7c32-4b3e-bd27-ad71fd376579",q.Voice_astraldragon_barks_shadows_in_my_light="2ff5b053-704b-40cc-8d01-9bb001443b5a",q.Voice_astraldragon_barks_shine_as_brightly="2f4508c2-e623-4491-8c5e-5fd7e310309a",q.Voice_astraldragon_barks_show_brilliance="3a9fcc01-1b80-4e79-8fcc-b408c8af80d0",q.Voice_astraldragon_barks_show_me_your_best="44c7cbf0-63da-4b3f-aa15-4ca7745c508f",q.Voice_astraldragon_barks_strength_grows="ad7498fe-2f20-4d60-8462-1dc6a42bd7bf",q.Voice_astraldragon_barks_wont_outshine_me="92cda661-7015-4c82-9e4a-6f110511f28c",q.Voice_astraldragon_barks_you_have_grown="76c5bc67-6548-450f-bb8c-1cf1f559cf65",q.Voice_astraldragon_barks_you_must_do_better="e97dc055-d8db-4c00-8fbb-2f7f019c114a",q.Voice_astraldragon_barks_youve_returned="6f14a2e2-8035-4007-8eff-40a654d4a11a",q.Voice_bonfireQ7="84775988-fbee-4dc1-98ab-4148261ffeaf",q.Voice_costumes_tutorial="b7a2a519-1334-40c8-b238-1917c0cb4bad",q.Voice_endgame_post_puppet_master_9_dragon_isle="b86a1b08-66f4-4b10-89fb-8e9ac02f10c6",q.Voice_forestQ10="9448d6e5-5212-47d9-9138-40643f137531",q.Voice_forestQ11="407cd4a8-c70e-4e67-882b-fc3f0a4a7dec",q.Voice_forestQ12_flora="b2c27420-1927-4082-a896-c51baad604d6",q.Voice_forestQ12_florian="c5a28bce-e616-4544-8f4e-dea46bfd4877",q.Voice_forestQ12_gerald="de65df15-d7cf-4a45-a34d-d922db1d244b",q.Voice_forestQ2="f718c977-b0be-47a5-b32a-f7c85123e5c7",q.Voice_forestQ3="bed2b67a-c3cf-4004-9775-87bb05956b52",q.Voice_forestQ4_bok="039e1365-4dab-4172-84a3-2e60b137d94f",q.Voice_forestQ4_flora="b60decd1-c74f-41c3-ad7d-0e020699d59a",q.Voice_forestQ4_florian="e1b742a7-16e7-405f-ad28-4ba97c9ec35a",q.Voice_forestQ4_pippet_pm="718c3eda-5abd-4eee-8b14-c4af1a3f08ef",q.Voice_forestQ6="752334fc-2b56-4b86-9ec8-b987b45c4ed8",q.Voice_forestQ7="4eeb621d-ef32-4a7a-81fa-77012dbc8d00",q.Voice_forestQ8="f448bea6-cc75-43be-bcd5-082c6e54f0ac",q.Voice_forestQ9="15579768-b744-4f6a-800e-2e16d6d8ae22",q.Voice_login_credentials_reminder="c42cbe2b-6ec4-4aef-bf6d-831a23501d7f",q.Voice_noot_bundle="ee7f8ba7-057b-4ec1-b286-33577826de25",q.Voice_noot_ftue_battle_1="87731b6c-02bc-45cf-b254-94603c497f88",q.Voice_noot_ftue_battle_2="0cd2217b-262f-45cc-9690-24754190b0fe",q.Voice_noot_ftue_battle_3="906dd7fa-4222-41d2-9aec-a479c7aea2ec",q.Voice_noot_ftue_character_creation="1aebe87a-fd47-48e3-8d1f-bd5d37da1319",q.Voice_noot_ftue_choose_spell="a5900a44-87a4-4a2d-b74f-6802bd75dcf4",q.Voice_noot_ftue_choose_target="fd6eff8f-3b0d-4e77-bc21-9076fcc659fd",q.Voice_noot_ftue_encounter_1="1391f7d3-713a-4c9f-89c0-6942b7c68d2c",q.Voice_noot_ftue_encounter_2="0ecba55f-c642-4bed-8732-b24d9a5a175e",q.Voice_noot_ftue_great_hall_2_1="6cc08048-03a3-4662-8531-ca5f30b253c9",q.Voice_noot_ftue_great_hall_2_2="bca7007e-cc1c-4d07-865e-1641146cd66e",q.Voice_noot_ftue_great_hall_2_3="f0105409-9ae2-4f90-bc8d-4efd284890ea",q.Voice_noot_ftue_great_hall_4="77ee831b-1c87-4e05-affa-3363b73dca51",q.Voice_noot_ftue_intro_1="25112f49-9657-42d0-b808-66200974a770",q.Voice_noot_ftue_intro_2="a4d985a0-e832-42bd-8eaa-174f9ac0b826",q.Voice_noot_ftue_magic_1="5deb5b21-d7e7-4550-86d2-7177952d64de",q.Voice_noot_ftue_magic_2="c34b7f8a-3374-4ff1-9e84-fc2d0f0de744",q.Voice_noot_ftue_pet_rescue="f7da42d7-5b1d-442f-b0f6-f5cacb810958",q.Voice_noot_ftue_pet_select="f5fd2631-1019-4c6f-8012-21d807d0ae96",q.Voice_noot_ftue_secret="151a9e02-cca3-42aa-b4e5-2b8860ed8c3d",q.Voice_noot_merge_button="3ed05219-8bd9-4fad-a451-f7987998de68",q.Voice_noot_merge_new_merge_your_pets="5303bef8-f9e5-4d8d-a431-f9a0011d5d74",q.Voice_noot_merge_open_pet_roster="08d4d3d1-a2e7-4f9c-9833-fd02b74c1765",q.Voice_noot_merge_pets_at_bottom="8615b753-4e50-41c7-a7d0-f124c3096844",q.Voice_noot_merge_ready_to_merge="45669959-a78c-4131-83ee-909c01d86cbd",q.Voice_noot_merge_see_that_pet="48d66fbc-5a49-4ed8-a8b6-f0d97b082032",q.Voice_noot_parentAttach="98f688f9-39d5-48d3-8a90-b7ea1206bb67",q.Voice_noot_petgear_tutorial_1="48b20bce-9549-4a47-8fb3-8f1bea0b02da",q.Voice_noot_petgear_tutorial_2="40c0c01b-212e-488f-9ef2-d61a56324009",q.Voice_parental_consent_explanation="e0783d65-b4a8-42bb-ada0-e48de8fb88c5",q.Voice_physicaldragon_barks_are_you_any_better="d7b49452-506e-4d6c-b298-9b4d13181b82",q.Voice_physicaldragon_barks_at_our_best="3b882497-68e1-4f0a-99af-c4a5946efe1b",q.Voice_physicaldragon_barks_bested_me="ba1b3f47-fc6a-4efb-a659-66c1b51b3e5e",q.Voice_physicaldragon_barks_capture_me="42bb8e86-f329-4be7-8514-2c8abacdc1b5",q.Voice_physicaldragon_barks_come_on_wizard="675027ea-32cf-4060-b6d9-7b57d10a759b",q.Voice_physicaldragon_barks_common_enemy="ec7b77b2-5938-4798-afeb-7cc05546f754",q.Voice_physicaldragon_barks_couldnt_beat_you="426d5033-12b0-4f9d-9249-e61b14d9e9cf",q.Voice_physicaldragon_barks_crush="78b13812-5de4-4be3-9143-f11666cb14a1",q.Voice_physicaldragon_barks_defeat="4c96ab3b-8464-4dd8-938d-cd277c58908c",q.Voice_physicaldragon_barks_didnt_let_last="4f98dd5d-615c-4da2-83fd-631200ede10c",q.Voice_physicaldragon_barks_discouraged="32ff5fe3-3dac-4e96-b2d7-28837b8787c8",q.Voice_physicaldragon_barks_focus_on="b16d4e28-5bd7-4621-8f8c-0bd3ac2af870",q.Voice_physicaldragon_barks_goals="6a0a0e39-d085-4d48-a6ed-57d232c92f37";q.Voice_physicaldragon_barks_good_fight="cce6e142-394e-4bee-a481-0887436c51ed",q.Voice_physicaldragon_barks_great_work="bdae3354-3ce1-4252-adb5-cee8b60a320e",q.Voice_physicaldragon_barks_grow_strong="10383451-d7f9-438c-9654-88aaa40b0500",q.Voice_physicaldragon_barks_hit_the_gym="b2b3cb19-e232-4a5a-900a-20e114b31b6a",q.Voice_physicaldragon_barks_i_am_stronger="1798181f-df7c-4cae-8a95-343853541952",q.Voice_physicaldragon_barks_i_hope_youve_been="36b6807c-a16c-48c0-b037-b3df3bfbbc59",q.Voice_physicaldragon_barks_impressive="8f0e21cd-152b-49ab-b1da-01872560a49c",q.Voice_physicaldragon_barks_incredible="c3af7589-0928-41c0-984e-c6f6923cd2ca",q.Voice_physicaldragon_barks_intense_workout="59d78525-13a2-4eee-9fb3-d79e1a6a6775",q.Voice_physicaldragon_barks_magic_muscle="1e5a891c-5b0c-4dc3-a218-e94d5e78e64b",q.Voice_physicaldragon_barks_must_be_ready="56791c11-af4d-45fb-9678-2ce107288c1b",q.Voice_physicaldragon_barks_need_to_prepare="bfa3e0a2-8b33-425e-bb38-7f4d4c137043",q.Voice_physicaldragon_barks_paying_off="f03ff598-796e-42b0-b1ff-9c316c6e3884",q.Voice_physicaldragon_barks_prove_it="bbbc37f1-ed8f-4df3-9a4e-fcb87d163c85",q.Voice_physicaldragon_barks_puny_puppet_master="9ac41e5b-e02e-49c1-ae6e-ea5be6f98d3b",q.Voice_physicaldragon_barks_push_our_limits="9c730d52-fe17-4235-8694-115e71f501a8",q.Voice_physicaldragon_barks_push_yourself="4b9cd045-caf9-4e7d-b3a2-21389c779aa3",q.Voice_physicaldragon_barks_real_challenge="856c2983-53e1-4da8-9f0e-f6bd71bac6d3",q.Voice_physicaldragon_barks_skills_are_improving="652b0fb4-4ab1-488e-adc4-9709bf0251ea",q.Voice_physicaldragon_barks_spells_weak="6c2b3a74-9478-4fbe-beda-bc0b27e11e23",q.Voice_physicaldragon_barks_stand_a_chance="829fd4f3-2e74-41f8-a02b-ac17ad740a3a",q.Voice_physicaldragon_barks_true_strength="76211c06-3cea-407a-abcf-910da0dac394",q.Voice_physicaldragon_barks_unscathed="9701c840-a9e7-4bbb-b390-ee09e7b8c014",q.Voice_physicaldragon_barks_unstoppable="945f6b48-dc48-47c9-b43c-cd7a229eda28",q.Voice_physicaldragon_barks_vow_to_defeat="4efb5001-dd9e-4720-b277-c35f5bb011b7",q.Voice_physicaldragon_barks_who_is_this_puppetmaster="b2c842c3-55c8-429e-bcf8-91ad1135256c",q.Voice_physicaldragon_barks_will_fall="c162a5ec-0e1d-4f1c-8d2a-0c8de5d5f7e3",q.Voice_physicaldragon_barks_you_wizards_all_same="9879fe0a-e14b-41b5-bde8-49e8c749d8fb",q.Voice_physicaldragon_barks_youre_stronger="9e74046c-9959-47df-b50a-8e921e1d3b61",q.Voice_puppet_master_ftue_encounter_3="751dbd19-2ba9-4793-a915-b545bec0ae8d",q.Voice_puppet_master_ftue_locking_zones="b4b0ffd5-51b3-42f4-8df9-5f7c84ba2726",q.Voice_restriction_tutorial="139933de-56c2-47e4-b217-ed2b90204e37",q.Voice_restrictionsFTUE_Noot_01="0070a683-6d11-40d9-9ba7-48d50ec54e65",q.Voice_restrictionsFTUE_Noot_02="18025f8e-d6dc-44e8-bc88-71ee014a4d22",q.Voice_restrictionsFTUE_Noot_03="779c891e-db4c-4d31-9264-75c03344b5e1",q.Voice_restrictionsFTUE_Noot_04="1ea06190-02e0-4c25-a98c-f041728c498d",q.Voice_restrictionsFTUE_Noot_05="174b182a-657c-4e1e-9a1d-5ba6932d864d",q.Voice_restrictionsFTUE_Noot_06="a555c536-fa6b-4329-94ba-c8f6f4fe40cb",q.Voice_restrictionsFTUE_Noot_07="3a18911c-338d-4496-931c-a8037a4540b6",q.Voice_restrictionsFTUE_Noot_08="19fa6f83-509f-49ff-b33f-3c22653da81c",q.Voice_returnToFireflyForest="1fbc5b10-e687-46d3-8a43-04a67663828b",q.Voice_rifts_barks_phase5_lose_firedragon_04="5797299f-334f-4b1e-ac95-b62271b47655",q.Voice_rifts_barks_phase5_lose_firedragon_05="2430c05a-abd5-4d68-a224-433ffdafc3f6",q.Voice_rifts_barks_phase5_lose_firedragon_06="b03a0453-dbdc-4314-afec-e11e64ec92ff",q.Voice_shadowdragon_barks_a_bit_stronger="47586556-3026-4af6-a56e-68a0ce7724b9",q.Voice_shadowdragon_barks_another_challenge="e3615fac-06f9-4883-ba69-55ca7dc55fdb",q.Voice_shadowdragon_barks_another_shadow_creature="be601471-67ea-4d2b-906a-238e1833dd3d",q.Voice_shadowdragon_barks_aww="841a9d6b-676c-45f4-8e78-f2346e855029",q.Voice_shadowdragon_barks_aww_im_tired="a2fd8f30-022d-4d7c-aa20-19d22b082cd3",q.Voice_shadowdragon_barks_be_friends="4f5f5b8f-a880-457b-8464-78a58a6ff6af",q.Voice_shadowdragon_barks_better_than_this="06090c46-a437-4504-af24-e3224107e350",q.Voice_shadowdragon_barks_come_back="f431049c-60b9-4aac-9802-97bf6bef7771",q.Voice_shadowdragon_barks_come_on="1e9a2384-ac63-4378-a359-9ae8ff9054b1",q.Voice_shadowdragon_barks_darkness="a23e3f92-87ac-4b6b-b6df-fb6c14f21d8b",q.Voice_shadowdragon_barks_did_you_know="80afbf53-16fc-43c4-a074-b0abc9d27230",q.Voice_shadowdragon_barks_different="086200ec-5cf0-40ea-be5f-d4a8e6b64db3",q.Voice_shadowdragon_barks_do_you_know_why="3fad0075-d72e-426d-a2dc-fafa3584b51a",q.Voice_shadowdragon_barks_dont_be_afraid="0c64d0b7-ca5f-4738-89e4-602656e323c1",q.Voice_shadowdragon_barks_dont_give_up="27506445-59ea-4948-94eb-5f5b573580cc",q.Voice_shadowdragon_barks_dont_hold_back="6e116961-b271-4555-88ab-367f55bf4b6d",q.Voice_shadowdragon_barks_dont_worry="fcd3c137-9162-45b7-a387-b3343164d037",q.Voice_shadowdragon_barks_end_well="abab1a73-96d5-4a35-b732-07d95ffe50f4",q.Voice_shadowdragon_barks_face_your_fears="7722b937-f52c-469e-9a62-2dce36108ac3",q.Voice_shadowdragon_barks_first_real_friend="ef3dbc87-238c-48db-82cc-3b2d7b9f0149",q.Voice_shadowdragon_barks_friends_yet="6d1c9fe1-9fb1-4b93-b6a5-381e03d3ffdd",q.Voice_shadowdragon_barks_get_stronger="39e22e54-5cbe-49f7-985d-cb57f145929c",q.Voice_shadowdragon_barks_give_up_too_easily="d031c2ef-dba7-4530-83b9-e93fa17a51bb",q.Voice_shadowdragon_barks_good_challenge="d9572171-1a4a-4035-ab0a-c62c3ac14da2",q.Voice_shadowdragon_barks_handle_my_shadows="536c4ca2-ac0c-4c2b-8062-3c13c575fc12",q.Voice_shadowdragon_barks_hasnt_come_back="8a44a303-3543-4a7b-a6c6-344d9aeb759c",q.Voice_shadowdragon_barks_help_you_get_ready="5bfbb582-520a-47ea-942c-813e0bfa4d1f",q.Voice_shadowdragon_barks_help_you_get_stronger="6a60c4bc-8518-4b63-97e6-c7326cfa7de7",q.Voice_shadowdragon_barks_here_again="6d348128-b855-4ef5-9a07-47e5de681b55",q.Voice_shadowdragon_barks_i_believe="0660a731-011d-4a50-ab91-abb2efd9691b",q.Voice_shadowdragon_barks_i_can_beat_both="43c93a9e-0748-4aa9-9a6a-07df381004d5",q.Voice_shadowdragon_barks_i_can_trust_you="d9ef0f7a-435d-43b8-8f54-df585e51396a",q.Voice_shadowdragon_barks_i_guess="c4503ad1-909f-45eb-8924-a1d14b6dc930",q.Voice_shadowdragon_barks_i_knew="9e86e248-58cf-48a5-8a79-386362e889d9",q.Voice_shadowdragon_barks_i_wont_be_defeated="d56e83d1-dfb4-44d4-9227-99b392000502",q.Voice_shadowdragon_barks_ill_be_here="ee418f32-e3d0-4535-bd7b-d37bb627610f",q.Voice_shadowdragon_barks_im_glad="6db4512b-ea23-49c2-a777-1ed847ce06a0",q.Voice_shadowdragon_barks_keep_fighting="6e37cc0a-2df0-48fc-aa87-b681fcdd5d08",q.Voice_shadowdragon_barks_keep_up="1d64f1e8-c430-4323-9694-00520a2911d6",q.Voice_shadowdragon_barks_let_you_escape="369d1694-bebd-4d29-89c9-f603c1bb606b",q.Voice_shadowdragon_barks_little_shadow="df9bfddb-b596-4287-8e18-bce1551fb774",q.Voice_shadowdragon_barks_look_so_scared="afba3c41-8388-4a7e-bdce-7644071ef16c",q.Voice_shadowdragon_barks_lost_again="114b09b8-34fa-419b-9e02-7aae7c64d53a",q.Voice_shadowdragon_barks_maybe_not_like="ca7c8501-c9eb-475e-bf2f-328a66a520b0",q.Voice_shadowdragon_barks_miss_me="6d825909-963f-4f64-a7a5-56242539a144",q.Voice_shadowdragon_barks_most_run="60f026a8-1343-47a5-bc66-9715e88adc49",q.Voice_shadowdragon_barks_need_a_friend="d9ffaa94-2345-45d5-a3d7-2a8c222092cb",q.Voice_shadowdragon_barks_need_to_train_harder="b15e9e10-a99a-4f55-be24-3c991f064552",q.Voice_shadowdragon_barks_new_friend="2194329f-fec8-42a1-8e98-3aceb370fce7",q.Voice_shadowdragon_barks_not_like_other_dragons="2ed4e11c-cc2b-45cb-a003-0a425eb74969",q.Voice_shadowdragon_barks_not_like_the_other_dragons="5b90f22e-922c-45b8-86fe-e60838afbb40",q.Voice_shadowdragon_barks_not_like_the_others="35e3e01d-aa1d-496f-9285-9c9c43eccb60",q.Voice_shadowdragon_barks_not_scared="d960476c-a628-4961-b550-a98e1d00f6fe",q.Voice_shadowdragon_barks_oooh_which="d1d313e1-6a36-4375-8996-92f72b319033",q.Voice_shadowdragon_barks_penumbra="16d54f67-a510-4171-adae-d0ac567bd595",q.Voice_shadowdragon_barks_penumbra_is_my_home="dfba1dc3-30f5-4bc7-98a8-41ab98c5412e",q.Voice_shadowdragon_barks_play_rough="11100f80-1fe6-4ce4-b2da-6dedd889e5bf",q.Voice_shadowdragon_barks_play_so_rough="e7cdaff6-0d0e-48c5-b455-2b7473b9f1bf",q.Voice_shadowdragon_barks_promise="b6b1413d-0dc4-493a-b1c0-0b5b8b033a7f",q.Voice_shadowdragon_barks_puppet_master_found_me="f8224e9e-7465-497c-9197-66b9746d7ac1",q.Voice_shadowdragon_barks_puppet_master_play_too="eb2495cb-b65f-42d8-a181-831ebb9c675a",q.Voice_shadowdragon_barks_ran_away="2dccaee6-47d8-4167-81c5-0cdd262c4ff2",q.Voice_shadowdragon_barks_ready_next_time="df1d50e8-24b0-4160-9d0f-2074c6899147",q.Voice_shadowdragon_barks_run_away="209101f5-9d8d-45b5-921e-52c521e626c2",q.Voice_shadowdragon_barks_run_away_from_me="f151c74e-1091-46fe-be18-b35fe491b830",q.Voice_shadowdragon_barks_runs_away="cf4d0c1e-de58-4e0d-817e-d6f35253a83d",q.Voice_shadowdragon_barks_scared_of_the_dark="448383f1-6956-4861-b6c3-971743f60d99",q.Voice_shadowdragon_barks_scared_yet="a496e4ed-9be2-451a-aa2e-59f8421bf0d6",q.Voice_shadowdragon_barks_shadows_gather="7ac3d64c-3790-4c73-8968-a477702ead49",q.Voice_shadowdragon_barks_show_puppet_master="79ea3125-e676-4c67-9cb2-0baff194a29d",q.Voice_shadowdragon_barks_so_easily="8873f717-e2ef-4b61-922f-54f3b976c836",q.Voice_shadowdragon_barks_spirit="413aa94d-d7b6-4eb5-b592-53405722730a",q.Voice_shadowdragon_barks_stronger_now="19c4998b-ecdf-4809-8ba8-d476d2a550d2",q.Voice_shadowdragon_barks_surprised_me="6a6f0469-3444-4db3-91d3-d291189a1b69",q.Voice_shadowdragon_barks_thanks="05d8e6f5-084c-44c7-9c7b-1bf576ba5981",q.Voice_shadowdragon_barks_that_was_fun="6e4d44ff-4b6f-4620-9339-641170272dc8",q.Voice_shadowdragon_barks_the_other_dragons="6832c74a-8e22-49ce-a820-b15b1a01b847",q.Voice_shadowdragon_barks_this_will_be_fun="9fd9d424-28a0-4c15-99b2-6b942775f7e7",q.Voice_shadowdragon_barks_training="dfc05d25-580f-449e-adbc-c3bee26c0226",q.Voice_shadowdragon_barks_training_hard="0f53b8cb-6cb4-4f9b-a08c-b7ab62f0752e",q.Voice_shadowdragon_barks_tried_to_catch_me="ce029a0a-31d8-4b72-803f-1512bbd257a2",q.Voice_shadowdragon_barks_understand_the_world="25f4aa2f-74d9-4512-a028-1e81f0fbd1cd",q.Voice_shadowdragon_barks_very_brave="491d51d7-f92d-47bb-81fa-9ea0afefb99f",q.Voice_shadowdragon_barks_want_to_understand="05d6fbc9-9c0a-4f57-b987-5d4120f4e198",q.Voice_shadowdragon_barks_we_can_be_friends="97dd64ea-1acb-454b-9581-ce3b915d4abd",q.Voice_shadowdragon_barks_were_both="8959790b-f840-4814-b30d-a22224c726b3",q.Voice_shadowdragon_barks_win_this_time="151025aa-15e5-4beb-8e84-2a637407ef96",q.Voice_shadowdragon_barks_woah="7eb84b41-7942-40eb-b327-e1d59128e694",q.Voice_shadowdragon_barks_wondering="a95066e3-697d-4bd8-8b65-85570e30bc88",q.Voice_shadowdragon_barks_wont_bite="eab1886d-b2be-4f00-a483-932f7d875a3f",q.Voice_shadowdragon_barks_wont_go_easy="751fca3e-ea17-435a-ba45-356cc5270736",q.Voice_shadowdragon_barks_worthy_opponent="79a34676-3b3a-4d65-85d4-26cdf38239a2",q.Voice_shadowdragon_barks_wow="cd5540b1-7763-47ef-af13-8c5b271e0f91",q.Voice_shadowdragon_barks_you_actually_beat_me="01df7a4f-fd26-46f6-a2ce-5e3e24c0a792",q.Voice_shadowdragon_barks_you_lost="2ad5a136-5bcd-47b0-b00f-0bbea4293ea7",q.Voice_shadowdragon_barks_you_won_this_one="d6363d52-3fb7-4f5f-ad72-7593e5027acd",q.Voice_shadowdragon_barks_you_wont_beat_me="8078c6aa-420d-4da7-909a-f6258b6df951",q.Voice_shadowdragon_barks_youre_back="9144cc7d-7852-42c5-954c-6e4d89150a40",q.Voice_shadowdragon_barks_youre_different="aae521ee-43f0-46a8-8398-793088d0b9bb",q.Voice_shipwreck_shoreQ5="538c134f-7892-4b58-8ff1-7aa0bc80bccd",q.Voice_shiverchillQ1="e81783f4-742e-47a9-b678-e835f5511729",q.Voice_shiverchillQ8="2d4cf644-4954-451d-9074-472f8f3867c2",q.Voice_skywatchQ6="e0a70bed-40d0-4dd1-8c74-094465363f63",q.Voice_theo_ftue_battle_1="b898c3a9-37ff-49fa-b3ed-50b69b562bff",q.Voice_theo_ftue_great_hall_1="2c61e59f-9268-447f-b74a-ca671cab5e8a",q.Voice_theo_ftue_great_hall_2="b968c2b9-2482-4579-8c22-1b9ba0c5f156",q.Voice_theo_ftue_great_hall_3="583fd3f3-0524-4029-b572-1dce7f0044e3",q.Voice_theo_ftue_status_effect_academy_1="e84f4a71-67cd-43b4-abf4-95a51a2b6998",q.Voice_theo_ftue_status_effect_academy_2="0ccbad51-4ecf-49e3-86a2-8319cc079a86",q.Voice_theo_ftue_status_effect_academy_3="173ef992-3667-4df8-8961-b25a1a81dc93",q.Voice_theo_ftue_status_effect_academy_4="2360f0d6-daa7-41a0-bd56-97737a18bc4b",q.Voice_theo_ftue_status_effect_battle_1="2ae12b93-aab3-4860-9093-3ef5f016eb9b",q.Voice_theo_ftue_status_effect_battle_2="1cf0ff98-caab-4e6e-ac85-2e62d5ac35d7",q.Voice_theo_ftue_status_effect_battle_3="436bede8-752f-44f7-8b27-c68f348ee867",q.Voice_theo_ftue_status_effect_battle_4="e5bcb33e-5b1d-4426-8b63-2c3eb5f5dcde",q.Voice_theo_ftue_status_effect_battle_5="44416e68-e18b-4656-870b-613fd5cc460f",q.Voice_theo_ftue_status_effect_battle_6="1405942d-a77b-4169-bd56-8f88c5a015df",q.Voice_theo_ftue_status_effect_intro_1="c52ed43b-5079-4bfc-829a-eb93524974b3",q.Voice_theo_ftue_status_effect_intro_1B="2e99ec10-5627-4241-90d9-fd45ca0f731f",q.Voice_theo_ftue_status_effect_intro_2="e58f1db4-5b14-4514-9b7c-114e35cdf531",q.Voice_worldmapZoneLockCutscene="de25b378-9651-474b-ad75-c18eb6ba1212"}(Y||(Y={}))},85855:(q,K,z)=>{"use strict";var Y;z.d(K,{V:()=>Y}),function(q){q.Bgm_academy_greathall="e79dc398-f0eb-456a-af9d-1759d9c32fb2",q.Bgm_ancient_battle="0ef7576d-f3c1-4191-85b7-d769782cd8ee",q.Bgm_ancient_hub="0d3050e4-dd5e-4502-bf75-b1af732717dd",q.Bgm_ancient_map="543a6fcc-3ea6-4c27-9b9e-31994ec6d4f5",q.Bgm_ancient_rune_run="b15669da-9a8d-411e-98f2-099a4985c744",q.Bgm_archives="0fcec453-ff3f-4a64-bffd-2abe3120d115",q.Bgm_arena_challenger="2d354a8a-5184-4e0e-aa91-c6f9ecab09ec",q.Bgm_arena_leaderboard="3406f114-73e0-4973-b5d3-6c7edce3613d",q.Bgm_arena_league_battles="db9a057e-1131-4177-a82b-32943cfa53ef",q.Bgm_arena_lobby="19802a7f-5458-434c-9571-f10fcc45dd7f",q.Bgm_arena_progression="25d8dbb6-7775-4306-92d4-5fe36054dbf0",q.Bgm_arena_progression_cheering="d36870e0-ca0b-47be-991f-922b9d2949b3",q.Bgm_battle="4d69c3cd-c3c3-4978-9faa-7a0d711c6a65",q.Bgm_bonfire_spire="56b79d1d-250a-44ae-9364-7e8659020992",q.Bgm_dance1="299f19fd-c6c2-4356-b7fe-5948fc87495c",q.Bgm_dance2="401a961f-d196-40d1-9414-581512ec1077",q.Bgm_dinosweeper="2e553538-13dc-4a08-8ca8-3abd84b5a280",q.Bgm_earthtower_bamboo_forest="7a82929c-5511-495e-b434-a9aa27d7b8a3",q.Bgm_earthtower_dmv_secret_path="debd0200-6fee-4cc3-9297-4aa544e1ba0a",q.Bgm_earthtower_tropical_rain="db8ebe45-6749-4aa8-89bd-270dd20adff9",q.Bgm_firefly_forest="7ab9248d-63bb-4b18-a49e-32e95db8926e",q.Bgm_floatlingfling="7a5ef731-9314-4758-af3a-bbb6897767f7",q.Bgm_fun="91474aa9-9e54-4e4c-a1e7-07a4786f2130",q.Bgm_game="305dcdfe-5032-4fcd-a67c-f79ef3ff27f7",q.Bgm_icedungeon_boss="b64946bb-416e-4770-ae88-f1e6b6c066ce",q.Bgm_icedungeon_inside="2c468736-584e-49dc-8661-36ad146f9698",q.Bgm_icedungeon_outside="c7e05de2-5172-4960-86af-efa13ad94360",q.Bgm_icetower_main="681e4d18-87de-480f-bca3-33f85ef17407",q.Bgm_icetower_postrescue="163aa033-7921-4c72-8922-4c771493f689",q.Bgm_intro="a5fb84ed-9ca3-4f74-b745-1d3090c54fed",q.Bgm_intro_1="79c8287b-4a2c-4ed1-82ab-90bb619abf63",q.Bgm_lamplight="d42586bd-91f8-4578-996a-fdc0d17237d0",q.Bgm_moonlight_fest="592d8b21-1913-4da6-89ba-13b21e28d0f3",q.Bgm_pumpkinfest="d6e99986-35da-4899-90bb-b4e291288e48",q.Bgm_puppetmaster="d276bd04-abc5-46dc-b343-8bc6156a4be2",q.Bgm_shipwreck_shore="dd76fa12-7677-49cf-9fc8-e2a1fd14052e",q.Bgm_shiverchill_mountain="b48326bd-3a03-4770-bfdd-882ac9e0cf35",q.Bgm_skywatch="2f6b8966-8f6e-4936-b45e-23489f9fb33d",q.Bgm_space="04bd8ce1-1834-463b-8d83-ef04365b6676",q.Bgm_spring_fest="9dcfb88c-e09d-44eb-8812-6e2305ddb7f8",q.Bgm_starlight_festival="d0754bb7-8e21-4efc-bf38-5de2220f92be",q.Bgm_summerfest="623499b8-4e36-4e36-98c9-6e9503e3b6bd",q.Bgm_towertown="ea3c00a3-0fdf-4775-8b3b-2bcac93220ac",q.Bgm_tutorial="e402e5e8-273a-49be-92aa-f7be3a2b8366",q.Bgm_victory="b86b6bd3-89e2-4fba-926c-3484be60c994",q.Bgm_victory_short="b86b3ce2-99b0-47bf-9117-17dbb5a46826",q.Bgm_winterfest="82ed0747-6d7a-4906-85ab-116ac792df86"}(Y||(Y={}))},25308:(q,K,z)=>{"use strict";var Y;z.d(K,{e:()=>Y}),function(q){q.Academy_endgame_encounter="0071cba8-e2e2-422c-b8cd-4f3ad8563458",q.Bonfire_spire_c3_encounter="19ac6101-24f1-4cf0-bb10-73690aba013e",q.Bonfire_spire_hard_quests_encounter="73670a90-6da7-4fab-9ff2-953b83c58103",q.Bonfire_spire_quests_encounter="faafed48-8d48-47ea-9d96-5a0830a63293",q.Ftue_revamp_normal_special_encounter="14ab8d41-0c4c-4c75-b659-b4a346c4b373",q.Hard_boss_encounter="8d0e2b18-2366-4333-99f1-ec74bb352975",q.Hard_first_encounter="c933b784-759d-4f0a-a3f3-665da315df86",q.Hard_random_encounter="e6813f4f-48b6-41b9-81d4-19e0309e1f93",q.Hard_special_encounter="c8d839ee-a16d-492d-b333-1e66f8f5e81b",q.Normal_boss_encounter="4958320f-36a0-411a-bf69-dad1c44d76c6",q.Normal_first_encounter="99f8b1e3-1e2f-43f3-92b2-05c0dc31891a",q.Normal_random_encounter="22d3b88c-cbee-49af-9169-54cf0bbb5534",q.Normal_special_encounter="0e58412d-c80f-4886-aacc-9757c8f5f2e3",q.Shipwreck_c9_encounter="57f3493e-c9c4-4874-9a83-5dd72b9ac86a",q.Shipwreck_hard_quests_encounter="f1878d64-5eb7-4001-9947-b046216fc651",q.Shipwreck_quests_encounter="93c88d25-382d-499b-a395-8de32ffa9f4d",q.Shiverchill_b6_encounter="a990c753-2d35-447c-afbd-f9a80c7f5e99",q.Shiverchill_hard_quests_encounter="b955f0d2-b24a-4bd4-a5e7-3151157e998f",q.Shiverchill_quests_encounter="2c37a6e7-1987-41cd-8538-2820b48545b7",q.Skywatch_c3_encounter="6a9f55dd-d6f2-4b04-ba0d-532689e4a1c0",q.Skywatch_hard_quests_encounter="aeefc86b-099d-4502-bd39-490cebcb5fb1",q.Skywatch_quests_encounter="bc205792-bff1-4d0a-a807-ccd123214f6f",q.Test_encounters_encounter="7c1a528d-3836-4472-b50b-25d627e19280",q.Tutorial_quests_encounter="2bf2e1df-52bf-4895-bfb5-2037d634ac1e"}(Y||(Y={}))},24521:(q,K,z)=>{"use strict";var Y;z.d(K,{r:()=>Y}),function(q){q.After_school_widget_ftue_json="6969a2ef-da8a-4ccf-863e-461b58a98be9",q.BackpackConfiguration_json="5f644853-2216-475b-b14c-76274465edf8",q.BattleRevampConstants_json="c56d5e8f-8ae7-4fe2-9771-58bd051834ca",q.BossBarks_json="545f26e5-613e-4a3c-8fdf-6f344a460e41",q.CombatFormulaScalingConfigs_json="6482e360-92af-498d-ae82-789a13031cd5",q.ContextualPrompt_ChargedLevelUltraUpsell_json="128abe36-af3e-41be-9583-e861fd21229a",q.ContextualPrompt_MemberJarDualPackage_json="f774fbe7-97a4-4ee3-9c90-b427884b7a35",q.ContextualPrompt_MemberJarUltraFocused_json="018f747d-3a21-4bca-a1a0-dab3a4cac180",q.ContextualPrompt_PetEvolution_UltraFocus_json="efd93c6d-90f3-4c86-87ce-c5b36ee21027",q.ContextualPrompt_PetEvolution_json="b6f8a3f6-2e77-44fa-9943-42f2ebe922d4",q.ContextualPrompt_PetRescue_DualPackage_json="94933ceb-337b-49c9-9c06-68359f524560",q.ContextualPrompt_PetRescue_UltraFocused_json="0d85d143-1359-41cd-8da8-3dfd2fea4974",q.ContextualPrompt_PlayAfterSchoolAd_json="6baed730-3fc3-4955-87dc-7b6bb91df8c5",q.ContextualPrompt_SegmentedOffersDualPackage_json="13db027d-8766-43eb-88c6-b58d15505985",q.ContextualPrompt_SegmentedOffersUltraFocused_json="88b12f43-3da5-40ad-95c2-c5d76f7de2f2",q.Dragon_isle_reveal_data_json="5065775f-d3a2-4209-8479-19ae49ed68d7",q.DynamicParentPromptRuleset_json="8ec01565-e4ac-45d1-a2fb-a7395c4783f3",q.DynamicPromptConfig_json="df500fe0-f798-40b0-9461-2c383a2fa8c8",q.DynamicPromptRulesUnifiedFlows_json="b3826cf8-dd1d-41a5-a50d-f298d0c80853",q.DynamicPromptRuleset_json="9aa328f2-2089-4aeb-983f-4cdc8b00cf0d",q.DynamicPromptTest_CatchMorePetsShortTitle_json="955b59ff-9f54-43e4-b456-9938041bcba5",q.DynamicPromptTest_EndofBattleMemberChestShortTitle_json="93a1d4fb-c9da-43f6-a87d-48cb167768b4",q.DynamicPromptTest_NonMemberStarJarShortTitle_json="97259080-624f-4a5e-82aa-14fd7a5ee20b",q.DynamicPromptTreasureTrackUltimate_json="cf67faf2-aa94-4b74-9661-c1d6b040739b",q.DynamicPromptTreasureTrackUltraOffSeason_json="01065eed-02f8-4203-913d-d5fcfc0d487d",q.DynamicPromptTreasureTrackUltra_json="dc7fc8c3-3327-4498-81b6-7f14683b8a18",q.DynamicPromptUltraUpsellInternational_json="ea57623f-18fe-420d-9e5a-a19b30b686b7",q.DynamicPromptUpsellMagicoinInstandReward_json="d8b140e5-84b3-40eb-becf-65bf7135dd39",q.DynamicPrompt_BattlePassMobileUpsell_json="515f4c90-5ca4-49b0-9483-57e1909161aa",q.DynamicPrompt_CatchPetsValentines_json="b4b848fa-0c9d-4305-afd8-7b5dc83a4d2f",q.DynamicPrompt_DualOTPUpsell_json="e0536b94-973b-49db-a7a1-110c8ba3c538",q.DynamicPrompt_EvolvePetsShortTitle_json="4f955752-39c7-4f2e-8d01-907c572a1e0b",q.DynamicPrompt_Getmoregear_json="9ef3fb60-208e-48e7-9c9f-e138cb50ae1b",q.DynamicPrompt_MagicoinOTPOffseasonUpsell_json="d6ee0487-11ee-41fc-b4fa-992290c1c984",q.DynamicPrompt_MagicoinOTPUpsell_json="c2fda55e-ff25-4aae-b5cb-6c3469d25a54",q.DynamicPrompt_MemberJarAd_json="422f9260-af01-4be7-89a9-cb033c46704e",q.DynamicPrompt_MembersgetSevenLevels_json="627c09b0-2e80-46af-9d01-cd07c99e1093",q.DynamicPrompt_MembershipForMagicoin_json="cae370bf-f848-42b2-a667-8fad5b623458",q.DynamicPrompt_MobileMagicoinUpsellOffseason_json="c77ebacb-d171-4e78-b36a-7cb1cb4524d1",q.DynamicPrompt_MobileMagicoinUpsell_json="6dd2e248-5b64-4a67-82ea-2ae2b7e7ac03",q.DynamicPrompt_MobileMembershipUpsellOffseason_json="c28a8d45-0b2f-4138-a84e-3b7609c1926b",q.DynamicPrompt_MobileMembershipUpsell_json="9661c8f1-1e7c-4792-9458-002687716187",q.DynamicPrompt_OpenJarButton_json="a75b1e1b-b5f8-4ea0-9ae8-23763dcf5622",q.DynamicPrompt_PetGear_json="a509c42c-d4c2-4168-a696-82f6f374b62b",q.DynamicPrompt_PurchasePetSlotsGift_json="5218578b-aac1-4f5d-b8a2-852fb2970f5d",q.DynamicPrompt_PurchasePetSlotsLimit_json="e3165125-c079-4726-be78-7ba60a0913ea",q.DynamicPrompt_PurchasePetSlots_json="fb30b74e-3ff8-4b05-bd6b-9621a2ee3611",q.First_dragon_defeated_data_json="0a6642b9-0aed-40c5-9b46-b58f52b09538",q.First_dragon_orb_data_json="46d21f09-4aaf-4b8f-a1e7-33dba96a5004",q.First_dragon_rift_data_json="68d4183a-5551-4080-8076-f176fb4d60fc",q.LevelBasedPromptsRuleset_json="65e6f811-e988-4198-a4fe-370f5fb28821",q.MemberJarData_json="ac37cca1-0981-4fc6-b6ef-9904e7991f19",q.MembershipStep1Config_Buy_EquipMemberItem_School_json="2d213a07-b981-40fe-92b0-6808bc0b8ac3",q.MembershipStep1Config_Buy_EquipMemberItem_json="290091be-a590-4969-b62a-5483b45680fd",q.MembershipStep1Config_CatchMorePets_School_json="0a124599-a016-48aa-939f-35a3462f62ab",q.MembershipStep1Config_CatchMorePets_json="cad74b0a-09d1-485d-a861-25c4f3747c74",q.MembershipStep1Config_EvolvePet_json="0a06384a-d7c9-4394-a4c1-4607bc552fb9",q.MembershipStep1Config_NonMemberStarJar_School_json="bc21cfcd-9f66-4e48-b92d-33756651e143",q.MembershipStep1Config_NonMemberStarJar_json="87219a5a-55bd-4642-a21f-34167572c946",q.MembershipStep1Config_OpenMemberChestBattle_School_json="8dfae2c6-a015-4d22-aa7b-a6062ccab10a",q.MembershipStep1Config_OpenMemberChestBattle_json="bd389f39-2eaa-4077-9ead-62b903e1c1ab",q.ParentPromptConfig01_MemberJar_json="8636b574-483a-4894-adad-0cd49ea7070d",q.ParentPromptConfig01_json="490111de-8144-48ca-82c8-729e55b49adc",q.PetBenchVariationConfig_json="dcef6a62-180e-40c5-912b-4c87b654cf75",q.PetEvolutionandRescueCosts_json="07a10eba-c03a-41eb-9131-9a1c37becf85",q.PetMergeCosts_json="2fdf3d4d-cbfb-476e-b2b9-e3a96615f8e9",q.PetOwnershipRestrictions_json="280e0d39-ee59-4276-b4ce-3ff056903cd7",q.PetXPBoostData_json="4367ab33-751f-4600-8d2c-6886bd8f45a8",q.PlayerStorageMaxCount_json="1686c319-a09d-4522-baba-db85287da661",q.Post_first_rift_data_json="084fdb6e-6a11-43eb-ad7b-6a255cc4d64a",q.Post_first_rift_key_data_json="a43cf21c-bb27-491b-8fb7-ca11db110817",q.Post_pm_visit_data_json="1df305b4-93c3-4e2a-bc10-3df0a618d177",q.Pre_pm_visit_data_json="62f6f8af-d1d3-4876-9365-25a9bf3be9e4",q.RiftRunKey_1_json="3bf8a670-5afc-4113-8d51-eec627555d6a",q.RiftRunKey_2_json="38f2fe53-fe57-4046-b642-cbf34807ddfb",q.RiftRunKey_3_json="478eefb5-a10f-41c1-abb2-7b4a38d17193",q.ShadowBattleBackgroundConfig_json="20742cd9-a066-4292-8988-5a3a707cb618",q.SpellLevelBonusConfigs_json="23aeefbc-e0f6-40aa-b311-f058cefd6ec3",q.SvSLeaderboardRewards_json="00a0e127-2a9d-45f6-ada9-1f1fce3828b2",q.TotalUnitStatsGrowthCurves_json="2d946b19-14fe-4267-917e-3696b8360504",q.UltimatesPetLocationConfig_json="c63ad7c2-0ba0-42c2-8bdc-308a4e91945d",q.UnifiedConversionFlowRuleset_json="24912fe8-527f-4631-8e77-ad52043ba316",q.UnifiedRewardScalingConfig_json="20f8d71f-5e79-4f3c-9624-42229eb09587",q.Voice_Rifts_Barks_Phase1_Lose_FireDragon_01_json="3d2bc486-3508-43a4-96ed-a3431ec5a093",q.Voice_Rifts_Barks_Phase1_Start_FireDragon_01_json="d555f6d2-01e2-4171-a1a1-989b93450d11",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_01_json="0761b82b-0690-40fb-84e1-8e10b2aac836",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_02_json="d8c018a7-598b-4424-ba6d-e1ad554fcb42",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_03_json="a150ea6d-e102-4d4c-a00b-f8da8aec2116",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_04_json="e6933f58-42c0-4f6e-8712-40ffca4674d2",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_05_json="858390b6-787e-428a-a3da-01347ea4b991",q.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_06_json="f6c8ba5a-124c-4b3f-af49-ca8ca414946e",q.Voice_Rifts_Barks_Phase1_Win_FireDragon_01_json="bd09159e-9c37-4fb6-adc1-f0c07367fc58",q.Voice_Rifts_Barks_Phase2_Lose_FireDragon_01_json="8226543d-87dd-4a60-b4d2-d04bd158e29f",q.Voice_Rifts_Barks_Phase2_Start_FireDragon_01_json="1ce2d62d-8236-4215-a17c-b93c9247990e",q.Voice_Rifts_Barks_Phase2_Start_FireDragon_02_json="b8007e12-2382-43b3-b945-284572e6b431",q.Voice_Rifts_Barks_Phase2_Start_FireDragon_03_json="b8dad1de-dcba-4ed2-ac2e-ccf4c622ea02",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_01_json="da79692a-5c2a-40d9-a4b8-b7acbab71c8d",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_02_json="1468c2b2-f2f7-41e5-95bb-f8e9448b47fb",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_03_json="b4a22af1-e2d6-4be3-aeba-11f3806295ea",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_04_json="b23fcb9a-0739-4b63-b0b0-05cd90580943",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_05_json="c9d04c5c-ad6a-4821-87c9-2b3d7b2d4863",q.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_06_json="dacb35a2-c36f-4478-a9d5-71bd5e1c30d7",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_01_json="4f234272-8d10-4b0e-a550-df19b085d8a3",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_02_json="a7149d01-d0ea-4e53-902c-1d3383230e1c",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_03_json="9d7debca-1260-4d6e-838f-cdf5c0856913",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_04_json="7bcbec87-66cf-4f29-b4ce-4070f3c3bd3c",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_05_json="14538950-bd4c-4ec7-a1bb-5b4f6fd33c8b",q.Voice_Rifts_Barks_Phase3_Lose_FireDragon_06_json="6ef3802b-821f-42eb-91b4-379ebcfccfec",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_01_json="05c20b4a-8e33-4e3d-bc86-c4fca2e2b803",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_02_json="d83a5148-10d9-4dcb-be61-038b2e811059",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_03_json="dfd0e080-c489-4bac-9bc2-2b6558fc3499",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_04_json="05b2a151-522e-4fd9-8790-69512be50856",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_05_json="4ceb8f37-9cc4-4204-b5f3-8eab63dea0df",q.Voice_Rifts_Barks_Phase3_Start_FireDragon_06_json="817fe756-3fa1-4a92-b218-cd8799224e18",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_01_json="ca29fdf1-e90a-4874-8a8a-c1939fdf8a3b",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_02_json="f1851e4a-96f4-43d4-bbaa-f7860a9c7184",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_03_json="c7a0d0a9-1222-45a0-bb59-a8c99f8fc20c",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_04_json="27f03455-fa1e-4ef7-87f3-f935b37bd3eb",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_05_json="71677675-4b5e-4d74-862d-7c85e7f7b5ba",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_06_json="d7e87223-a19f-47f2-8ebb-df26381f1d2a",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_07_json="c65b0fbf-ec36-4cbc-aeb8-1b025c5b4c3b",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_08_json="aa269dfc-0bf9-4105-9e67-f7ffb519402b",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_09_json="8ed017fd-4e13-485b-98b3-438f2e416e1f",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_10_json="003686f2-282b-41f3-9f0d-b153b1f215c9",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_11_json="98cb63d5-bb0a-47b1-9acb-20c9ea82af5c",q.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_12_json="6b8bcb51-7383-42d0-8d11-686d4833cb36",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_01_json="034533b9-01c1-4945-b122-6e922dc1a1ab",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_02_json="cf3ec4e9-c554-415d-9b2f-ffe4d9c88289",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_03_json="399dc8c0-cfd0-427e-a3b6-e19556558f8d",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_04_json="85990ec6-6791-4806-ab2d-3afe941bc69f",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_05_json="3c359379-e855-4711-8843-902db42658df",q.Voice_Rifts_Barks_Phase3_Win_FireDragon_06_json="64252fa5-fee7-4e29-9ef7-0d2afab8e0dc",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_01_json="50761680-6e9b-4df5-8525-ea250158b177",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_02_json="da9ad08a-f27b-4167-aeb3-1d808f96a929",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_03_json="465faa98-ec02-44a7-9297-62adb2429d14",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_04_json="0ad92380-f495-4255-a695-651251246818",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_05_json="0bb96250-9ec4-40db-8001-7606d03541b0",q.Voice_Rifts_Barks_Phase4_Lose_FireDragon_06_json="6332a42e-1c8b-4a5f-96f5-ef5143e5a5e3",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_01_json="eeac3572-5200-4ca2-b4eb-05ebdebfcf8e",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_02_json="f482bd8e-d44d-41f6-a339-1af621c391b1",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_03_json="130b26c7-9191-4def-852a-3a73527abc0f",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_04_json="3117db2b-31b8-49a3-839b-5e47552e89e4",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_05_json="860589cf-1630-4b3f-b1b0-5213c9639e93",q.Voice_Rifts_Barks_Phase4_Start_FireDragon_06_json="fb7479ba-0f76-4935-9361-56cd9aa45de1",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_01_json="3e712a05-a415-49f3-bae0-f65defe9faa3",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_02_json="411ea9b5-ba39-4ccd-8f80-a4c540b775f6",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_03_json="407b6b6c-0c14-4fe6-b742-cbf6afae595a",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_04_json="fd18c7d6-02bb-46d1-8023-391211b34908",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_05_json="45ace84c-bcbf-4035-af43-9ea1c42a78e9",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_06_json="5c026a93-c9a4-4e82-8bd1-f39920b14196",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_07_json="e214ad3b-e5dc-4c78-8995-e2e6aa21885f",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_08_json="f2c68593-4c77-4541-bb8d-9a8b24bbe835",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_09_json="bb340aac-f566-4a7d-8e3e-c304a09a6a5b",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_10_json="dbad6214-bb00-4103-80cc-5f95dd5fea55",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_11_json="cf793052-09ba-42e6-b75a-b2ea91857419",q.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_12_json="702e373b-a974-45cb-b48e-11fac633b015",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_01_json="001d0528-caa9-4b23-b59f-0407a43feb52",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_02_json="ecddff12-3bd6-4b17-ab81-88fe4cb67b4f",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_03_json="559476eb-677d-431b-b1fb-76091044ceba",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_04_json="90546ad1-c77a-46bc-b8c2-90abac944941",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_05_json="bb133039-c862-406a-bda2-3c88dc5e844f",q.Voice_Rifts_Barks_Phase4_Win_FireDragon_06_json="f49234a0-2415-49ec-9901-8cc9161fc2dc",q.Voice_Rifts_Barks_Phase5_Lose_FireDragon_01_json="ea1f4a8c-8ef3-41f4-beb6-d5482eefc012",q.Voice_Rifts_Barks_Phase5_Lose_FireDragon_02_json="4e4511e9-2bad-429a-8eb7-01f84d2cb216",q.Voice_Rifts_Barks_Phase5_Lose_FireDragon_03_json="7bab4dde-6b43-4c35-8173-f09e2c0118f6",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_01_json="681abc3d-6d19-4b8b-b953-57ca1b747be2",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_02_json="dbea9b4a-9a39-47e7-9736-9176249a66fb",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_03_json="09bb0755-a44f-4c05-81dd-4ce67f49d1ed",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_04_json="d3877042-9aac-4a11-b58a-b9be4dd2918a",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_05_json="929baa59-c68b-41fe-97a6-5792bc91a1e3",q.Voice_Rifts_Barks_Phase5_Start_FireDragon_06_json="4461cf9f-9009-4147-936b-2ff3f1282343",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_01_json="f5ee754f-a984-4342-9891-5dbecdb6b482",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_02_json="f0d0cfb9-dd2d-4b48-bdaa-1e3634ae4d97",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_03_json="445360f6-52bf-4aca-a8ee-22d9ea19e297",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_04_json="010e9f52-2c20-4b40-986d-aaa730d14a07",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_05_json="411e62d6-d2f3-4aba-8244-7568d88b73ff",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_06_json="7859f25b-2d09-40cf-92d6-084de8ec2d90",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_07_json="a1c6f3d0-6526-4724-bccc-e37ea0ad0b0c",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_08_json="0f861975-5cb4-41a2-bf4a-ff6507a1fae3",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_09_json="1bc9218f-add8-41c8-91af-00b092afe0c4",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_10_json="51dd2076-d0d2-4bb5-8afd-d9d4abb68cc7",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_11_json="8426fbcb-61f8-4462-bea3-48c1d218a87e",q.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_12_json="4da11a89-7188-439a-a738-5e22f1670fd9",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_01_json="02ae6917-788c-41cd-86f6-0c61ddb69a34",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_02_json="7e83eb50-8fd1-4350-8d6e-44fbc46e1766",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_03_json="ee13ba68-a812-4aa8-8e0a-1f40a4d95234",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_04_json="35553890-6c40-4c06-90df-a607413dee1a",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_05_json="0b9eeebd-5a3c-46c6-a584-03f0f8a950bb",q.Voice_Rifts_Barks_Phase5_Win_FireDragon_06_json="9cabed87-e325-42cd-867e-bcc9b8d96d52",q.Voice_bonfireQ7_data_json="07332468-8c1e-4ea8-abb6-0ffa8392b786",q.Voice_costumes_tutorial_json="34500f57-86af-489d-8f89-2a0e31249467",q.Voice_forestQ10_data_json="d8446ca3-a597-4522-9d80-924412c26295",q.Voice_forestQ11_data_json="0752384c-7cf2-49d0-a42a-6fc3c9950cd0",q.Voice_forestQ12_flora_data_json="62906b71-0a22-4933-b9bc-785f474744a5",q.Voice_forestQ12_florian_data_json="ed45ce7c-59e3-4057-ade5-6ce647857b7c",q.Voice_forestQ12_gerald_data_json="36274711-9d79-439c-8873-89dd8990d306",q.Voice_forestQ2_data_json="0547cdab-8c06-4a11-a603-85683987600a",q.Voice_forestQ3_data_json="c21c0bda-e668-4de1-8f05-2a4634fddb95",q.Voice_forestQ4_bok_data_json="b549ec5d-7e48-4bcf-ae40-83b8222bb35c",q.Voice_forestQ4_flora_data_json="0aed1353-5207-4690-a82c-397f482f6d55",q.Voice_forestQ4_florian_data_json="d6febcf5-6531-496c-94b2-abf20468765f",q.Voice_forestQ4_pippet_pm_data_json="0c2de341-f1c1-4134-9728-8d17b4669e5c",q.Voice_forestQ6_data_json="24b751dc-2f26-4c2a-a0a3-6ff6f7c72a83",q.Voice_forestQ7_data_json="bf32aa19-b9b3-4385-945e-6ff03f0e21fd",q.Voice_forestQ8_data_json="6e14fc5e-7108-41db-9b6f-d11ee27e1205",q.Voice_forestQ9_data_json="4c2cd83f-997b-492b-b787-348eb69b4c86",q.Voice_restriction_tutorial_data_json="deff6948-1134-4992-aae5-c8a8e3760c98",q.Voice_returnToFireflyForest_data_json="db83a12c-4016-4ebd-bc12-21f6dd88846d",q.Voice_rifts_barks_phase5_lose_firedragon_04_json="df1e9872-44fa-4de8-90d7-c401ee816f9a",q.Voice_rifts_barks_phase5_lose_firedragon_05_json="911bd81f-3c04-4904-a307-86a999665f37",q.Voice_rifts_barks_phase5_lose_firedragon_06_json="cf50c7c5-b9d2-435f-b762-f59476eff5c0",q.Voice_shipwreck_shoreQ5_data_json="c7a25137-e7cc-4002-96af-0d865320ba5e",q.Voice_shiverchillQ1_data_json="fc922bfd-0be5-4b17-bcbb-8f06d1481836",q.Voice_shiverchillQ8_data_json="94da2fc1-24cf-464a-9b40-4ca1e0b96b0a",q.Voice_skywatchQ6_data_json="5a5e2901-8e98-4a3c-a948-4eafe834777a",q.Voice_worldmapZoneLockCutscene_data_json="f9327d4c-b42b-46f4-ac3d-63f75a5afc36",q.WorldInteractablesConfig_json="d3e01c63-1336-46fc-8435-99caffde49f6",q.ZoneRewardsBonfireSpire_json="cacd7360-f3e1-41d1-9c2b-5a8b66bc2493",q.ZoneRewardsFireflyForest_json="c13f55ed-30f7-49cc-a26a-0a9053bae1f5",q.ZoneRewardsShipwreckShore_json="f5b107f0-c1c8-4b41-ad9d-58b18e992f52",q.ZoneRewardsShiverchill_json="d6525574-f8c6-4c2e-8d2a-e169f2cdb179",q.ZoneRewardsSkywatch_json="1de7d516-ac0e-4930-ba9a-2ec742d7b49a"}(Y||(Y={}))},99625:(q,K,z)=>{"use strict";var Y;z.d(K,{l:()=>Y}),function(q){q.AcademyCR1="909f60d3-2177-4338-a6ba-756d0de8a138",q.AcademyCR1Hard="cab4dbbc-6f5d-428d-89ad-fff309a2e3c2",q.AcademyCR2="14412c15-d98c-4e34-b15e-78ade05ef979",q.AcademyCR2Hard="5f8d5c73-eda3-4019-9d45-f66432c3b683",q.AcademyCommonRoomSignage="699fc753-98db-4284-992a-f7fa5943fffe",q.AcademyEndgamePostPippet="c150b774-5d89-4d37-9911-12dcfc234283",q.AcademyEndgamePreCebolliniBattle="ccdea3bd-4748-4af8-a7c7-01ce751a47be",q.AcademyEndgamePreGeraldBattle="57227567-fe21-4c95-ae34-c4fabb1f94bf",q.AcademyEndgamePreGuardianBattleBase="6537bffb-d2a5-4532-a037-732b80fa8082",q.AcademyEndgamePreIceWyrmBattle="59c6f80a-eede-453d-9031-74e70c175102",q.AcademyEndgamePreNastyCloudBattle="1993d472-62cb-4744-a48a-8db278fb10aa",q.AcademyEndgamePreOldOneBattle="45bae272-5a88-48a6-8e4e-bb82185e433c",q.AcademyEndgamePrePippet="751fba71-3794-4b18-b1cc-56b11c5fba13",q.AcademyEndgamePrePuppetMasterBattle="236e5c7e-a1d3-4310-9177-1b23c299542c",q.AcademyGH1="20feb7c4-b30e-484f-98aa-c3ac49a238b9",q.AcademyGH1Hard="32a111c0-2f48-44ac-9e69-4c3bed882f25",q.AcademyGH2="f5adc319-7e45-489a-9576-37a081d04f9e",q.AcademyGH2Hard="4f3aeb3c-fe3a-4518-8a49-fd166671b564",q.AcademyGH3="586a3378-09dd-40f6-a821-9d908017ea9d",q.AcademyGH3Hard="6c08c115-3474-4808-8ece-065df3e89d0d",q.AcademyStatusEffects1Cutscene="13251014-3eec-4359-8d03-9ebdee5cb019",q.AcademyStatusEffects2Cutscene="0a77d72d-108b-4fd2-b88f-d80fbf6eb883",q.AcademyTowerExitPopup="81b1f0c0-a916-418d-819e-503b6cf2e1db",q.AcademyTowerExitSign="f510a78c-c78e-4925-aa9a-f39e27e598d7",q.AcademyTowerGotoNextFloorPopup="ce934a91-04c7-426f-8f15-e0e7cf286b95",q.AcademyTowerProgressHUD="69653e47-a7bd-4d50-9d61-5e472da55d51",q.AcademyWalkableScreen="158317fa-8f47-4c13-a985-ab1bdcf2b70c",q.AccountInfoSettings="dc4c4aef-b649-471f-8517-475e85de9a57",q.AchievementCard="f027a0e2-6d68-4e54-93ec-8e98fe5c2fe9",q.AchievementCardWithReward="4ce8d681-6a12-4845-b10f-ebf42407afde",q.AchievementScrollview="7aa91b45-f736-468b-a230-f701e4e5d537",q.ActiveTeamDisplay="cef217d3-c312-4e45-af45-a1a6a9a876ea",q.AdAutoCurrencyEvent="89fa7581-e485-4b95-ae5c-6f4921b20e10",q.AdAutoTitanEvent="65d4dc62-feb5-4865-8639-ee7a45f9e2eb",q.AdAutoXPStarEvent="bfb47856-78c9-40b3-a61a-bea081f80625",q.AdBacking="545d11fe-d959-46f7-a5ec-fd87b7b99485",q.AdBattlePass="06e3d970-1a71-48e9-bfb8-3f3bfa060895",q.AdBattlePassVideo="53a70a22-cbac-435c-b1d8-1077e370148e",q.AdDuelsMatchmakingHighlight="2ccd1460-a520-466f-8b03-0b9e19f5fe1a",q.AdDynamicStoreGoNow="7794ceff-b178-4e26-aa35-942a03130038",q.AdFestivalGoNow="921e3d92-d2c8-45d2-94b5-1e8cf03e1e64",q.AdGoNowNonTeleportTemplate="a6304dd0-4bb6-4529-806f-70b81a946c3f",q.AdGoNowTemplate="deb4a8a1-51f0-426b-b93e-e10124aac6f5",q.AdImageTemplate="e614e66d-6b42-47f9-8cfa-08ed393f42a7",q.AdLootDashGoNow="0c6af7a8-c6f9-4261-bfe2-b478eb2f23d4",q.AdLootDashVideoandGoNow="3f09bdbb-f8fa-4a97-b65b-ff22d89e69ee",q.AdMailer="59100cbc-f17c-4ddc-a5a7-6e4ad28fe5ca",q.AdOpenVideoBase="4ab7d0d5-5304-4c57-9a27-db2268af61ec",q.AdParentAttach="f01830d4-655b-4d55-b3dc-1cda1319c816",q.AdPetGearRelease="fe779b2d-b190-439d-8099-0a042996fbd4",q.AdTeleportBase="cb7c9d1e-812d-4ba7-9033-c8b90d9d9fe2",q.AdUltimatesImageTemplate="8760e766-0703-4cfb-900f-e57d5ff417d7",q.AdUltimatesTemplate="4789d69d-6af5-4935-96bf-2bce636323c1",q.AdVideoAndGoNowTemplate="6f1b9955-bab3-41ad-b547-25edaeb5ede9",q.AdVideoTemplate="7f569c4c-25b8-4b44-8177-526b8ab8157b",q.AddFloor="18ef3003-27e5-46fc-b71a-e59165184d9a",q.AdventureMap_BossBases="34022fb5-3e06-4f9e-9e7d-afc2d3a5d223",q.AdventureMap_BossRewards="cdd7bfe7-ebda-4a1c-80b1-e023608200b3",q.AdventureMap_ItemSlot="39470ffd-5db7-49e5-9b0b-3365f386c002",q.AdventureMap_RowCurrent="137f95a6-1efe-40bb-b5e3-5d73da563226",q.AdventureMap_RowDone="f74b757b-499d-4d7e-82bc-44870a73d7ec",q.AdventureMap_RowUnrevealed="50342091-df38-4d10-86d5-4b62ab768233",q.AdventureMap_ScrollViewLarge="0cbeb534-cf83-4788-97c4-bb7bceed8e84",q.AdventureMap_ScrollViewSmall="9da76592-c6fd-4435-873e-df5681edb1b9",q.AdventureMap_Template="1de822c9-13b3-4b99-aded-e340240c382c",q.Adventure_Chest="5997e7d2-1e39-4dcd-923e-d9596703a358",q.Adventure_Crate="d17939e1-10d6-4fae-8695-1a70059c7564",q.Adventure_CrateItem="02c62104-a3c5-44ad-acbc-d02398349e1f",q.Adventure_CrateMonster="7e90ec3c-2d07-4fe5-b988-71712f531108",q.Adventure_EmptyCrate="2d9e07e9-e5c9-4328-ad3d-7b76921e093f",q.Adventure_GolemEncounter="b3424a57-d677-4d5e-9094-046c94cb3365",q.Adventure_MakaluEncounter="20f58865-7c92-4b2c-9e8b-e44b024fa102",q.Adventure_MemberChest="695f8d56-8dee-413f-acb7-d8d1d269286b",q.Adventure_Monster="4ba5ecb4-f37b-4222-a1f0-723ca2ed5cfa",q.Adventure_SnowPileItem="9db71127-4b69-474b-a14f-2f8e14492157",q.Adventure_SnowPileMonster="75c94731-e067-4b07-ae7d-53520eff2dd8",q.Adventure_SnowPileTemplate="8334b8dd-a9a3-45c7-918d-38deaa562c04",q.Adventure_Teleporter="f640ee73-5520-4062-be29-72bae4e60e6e",q.Adventure_YetiEncounter="3261fd98-0e15-4334-9f66-7ccd7991ee92",q.AfterSchoolWidgetRewardsScreen="0e05d108-0c04-4113-a8ed-4a121d951cad",q.AfterSchoolWidgetSparkles="277c1df5-33f9-4d25-a53c-b45fad0c308e",q.AfterSchoolWidgetStampSpine="5b3feb51-8b48-4089-be0f-5a5e41e1b4e4",q.AllKeystonesCelebration="5e014182-552d-4cad-a90b-142831bd7aee",q.AllShopsMenu="86dccc9b-b6b4-4ba2-8d3b-732bd8c6fa97",q.AnimatedSpineCreature="1c053f80-afa4-4de7-83a9-7bd8658b01cb",q.AnimatedSpritesheetCreature="3af064db-2afc-493c-930a-0b5591be4729",q.ArenaModalDialogBackgroundBase="a67c78cd-5248-4c80-be20-c1628ba91b03",q.AssetIconGrid="7c497e0e-01d9-4557-a9d1-0afd59417b2a",q.AssetIconGridElement="0554201c-99e6-4a85-b11a-c1f47bbb43f1",q.AthenaNPC="b7a81280-dc21-495d-afea-a59bd3924c87",q.AthenaShopNPC="c77cab86-f654-4a74-92ae-e9bc53535d5e",q.Badge_burst="5b57b694-72b4-4b5f-99d4-95cfb062ecf5",q.Badge_particles_loop="027d012c-5320-407a-8a56-718698bde75b",q.BallofGoo="4dba6e64-98db-43a0-a2ff-ecfe492d1929",q.BannerDialogBody="fe2b6457-7aa9-42b9-bcc9-c47ef41b8eb6",q.BannerDialogFooter="9e0a7aab-93ac-4980-946e-25035091b8b2",q.BannerDialogHyperlink="76ac585a-4bec-4c1b-958c-76d19b28dd8e",q.BannerMedium="208f8660-3080-44fe-a92c-7c2485d23051",q.BannerWidget="60d693ed-483f-4af3-a685-331808679474",q.BargoNPC="c99dbcdc-f7fd-44ca-947c-6e7515b610b2",q.BaseHUDWidget="f95072cb-b136-4983-ade0-ca9c4ea51aab",q.BattleCastSpell="e8281bf1-1e28-4240-9568-9d6669265283",q.BattleEnergyOrb="5f0eacd7-0dcd-4326-9856-4a20f3601365",q.BattleOverlayText="ae5bdf4f-d891-4452-ab71-647090e19bbe",q.BattlePassComplexFtueModal="7a80665c-33c6-4a6a-a392-5a00d98fb659",q.BattlePassCountdownTimer="c39c582c-48fe-40c2-acfd-e8b2abf2d784",q.BattlePassHomeScreen="9fbde66a-d17f-424d-9155-6fe4914bf46c",q.BattlePassInfiniteTier="b57e8f5c-554d-4ada-9dfc-1244260838e9",q.BattlePassItemCard="a2916f0a-cb57-4cf9-b9ca-3dbbfad65380",q.BattlePassLargeItemCard="8e5087e3-1a54-4ac8-afeb-5e82d67f242a",q.BattlePassMembershipModal="a7d600cb-c477-47fa-8938-bfcd87ee75c7",q.BattlePassMenuBar="22dc0f9a-11b7-421c-a1e5-e8cbcb4ee93b",q.BattlePassMenuLeftPanel="7cfe1c53-bcec-499e-ae8a-170249c29d20",q.BattlePassMobileUltraUpsell="a2b2e4c1-3e6b-471d-9e93-c373dd830b91",q.BattlePassOffSeasonDialog="d290c15f-e28a-4874-a345-6e6677aa91fb",q.BattlePassQuest="1e509021-6ab6-495b-ab79-a369cb0661fc",q.BattlePassQuestRewardTracker="f8aa45ed-1cd5-4e83-b840-81ca74f5060e",q.BattlePassQuestsComingSoonBanner="656a16bb-2caf-40ad-895c-0e7c30dfb8b9",q.BattlePassQuestsScreen="a6a07acd-0326-4a3c-b053-3a70f1945dfc",q.BattlePassRewardsScreen="4e85d710-0e72-4075-976f-e2bd7b33a0c2",q.BattlePassRewardsScreenItemCard="9795de05-e284-454b-a4be-3631f006bd17",q.BattlePassRewardsScreenItemCardWithLock="aa77dbdc-d02e-4f81-b6ea-9db5d80441e2",q.BattlePassSimpleFtueModal="3394fc35-c2d8-4b87-b1d0-6a0abbf51216",q.BattlePassSimpleFtueModalWithoutClose="efbf94d5-da8e-4a4b-b22c-e04baf1ea423",q.BattlePassThreeTier="0e05abc1-9ea2-4cbd-baff-be5142a39075",q.BattlePassThreeTierInfiniteTier="6699174c-7a92-429a-abd7-e3b3d9067ac9",q.BattlePassThreeTierRewardsScreen="fa38e4bd-4cfe-43af-a6af-805a2e24f53f",q.BattlePassTier="a34748e8-747a-451e-a872-511869c72990",q.BattlePassToaster="7c74b3fb-1c90-4dcf-8e22-86ffe70a5e51",q.BattlePassToasterWithParticles="afc69c08-c6ec-4967-aa36-710617997ebb",q.BattlePassTopBar="dd5dfe37-250f-4da9-b7fc-5c50a8a94220",q.BattlePassUltimateMemberUpsell="2f0f0649-e6a9-4cbb-aea9-d378dbf5e16d",q.BattlePassUltraUpsell="d2c4df87-794b-4878-aefb-26fa172404fd",q.BattlePassUltraUpsellOffSeason="db962882-0dab-48bb-8c4b-ffcb0f7e6275",q.BattleRestrictionsPopup="3d1fa41b-2981-4cbc-928f-5b5b99dd450a",q.BattleResult="5c305e63-28e3-4cca-8be4-5910196c4d5f",q.BattleScene="1ac4dce7-c3a2-4341-ac23-02a5a4f6615e",q.BattleTeamHUD="7c097985-7087-4043-abc7-985918c9c5d4",q.Battywork="a405b70f-e6de-4ae6-8f3f-beed6d9ff4c2",q.Beam_particles="6232b4ff-2fb9-4b4e-a0dd-a0d362d808e8",q.BlockingEnemySpawnPoint="6a37f4d6-911f-427c-87e4-b76006ca7ed3",q.BlueLargeButtonTextAndIconRight_RectTransform="988176d0-042d-48e6-89a1-4e74ea299ed9",q.BlueLargeButtonText_RectTransform="956e86c9-3164-409d-9601-4ee7a68f22ff",q.BlueMediumButtonTextAndIconLeft_RectTransform="12a01b2f-9bdc-4562-9fe9-5b385632cd61",q.BlueMediumButtonTextAndIconRight_RectTransform="4872669c-77d5-4f02-96ac-dca4174fc076",q.BlueMediumButtonText_RectTransform="2040e562-f68c-4c50-a6fe-1261dd1a266c",q.BlueSmallButtonTextAndIconLeft_RectTransform="cbfdca48-c3aa-438f-a67f-4d26d317e74d",q.BlueSmallButtonTextAndIconRight_RectTransform="fd84b30d-b484-4f4d-9b46-e9f3976001cb",q.BlueSmallButtonText_RectTransform="f70cce4d-e26c-4b8d-8ec4-13d249d99897",q.BodyMultipleTrophies="c2a0bc7a-2fee-4e7b-a32c-62e32f4f90c5",q.BokNPC="de379179-512a-477f-9f52-5ad2e72d642c",q.BonfireHardQ13BattleCutscene="0e11e5d5-8533-4bad-8b5b-7a46477863cc",q.BonfireHardQ14Cutscene="88315ca9-6772-4f9d-ba08-bb5849bf1a66",q.BonfireMerchantNPC="737de3f7-fb08-410a-961c-b632be0c8a90",q.BonfireQ10Cutscene="11aadc6d-4fec-4fc7-a079-a8e4e8e7040e",q.BonfireQ11Cutscene="9387060c-d7e9-40af-8be7-22ac926fbc03",q.BonfireQ11HardCutscene="c3da7b0c-5c55-41e3-a0cc-f643cc1a0ff8",q.BonfireQ13BattleCutscene="c032630a-0200-472f-8eb5-2eb4db17feab",q.BonfireQ13Post_battleCutscene="6f3fcf10-90e6-458b-96d4-378493e39ef2",q.BonfireQ14Cutscene="8cfc207e-f7a1-4a2d-98bd-b10e1a0c6608",q.BonfireQ6Cutscene="9141f4be-8410-4ffb-b518-49954409e000",q.BonfireQ8Cutscene="a08b2cc5-bc50-4486-ba3d-d7754b16b2cb",q.BonfireSpireA1="f7feb9c6-6053-44d2-aa4b-d44c93c1effb",q.BonfireSpireA1Hard="f4ed8f38-9a7d-4f99-b059-2e39aa0f0604",q.BonfireSpireA4="67f250a7-6982-42f8-9a65-f0e5ae795635",q.BonfireSpireA4Hard="139fbdcd-1ab1-4124-bb7a-0e8d8ccd3186",q.BonfireSpireB1="b61bfeb5-9898-4413-83d9-1f0c4898d8f2",q.BonfireSpireB1Hard="cced6cd4-6ff2-4ef0-aee3-70ecd77e0cca",q.BonfireSpireB2="e90f010e-8122-49a3-bdd8-5a7b2ea42e1e",q.BonfireSpireB2Hard="e610730b-94bf-40fa-a237-0d8ff712dc22",q.BonfireSpireB4="8366eaeb-240d-454c-945a-452cf4081ee8",q.BonfireSpireB4Hard="d5739b61-a98e-4206-a751-04dcb7bfb397",q.BonfireSpireB5="b5c9a3ee-0e60-4bf4-9589-d5632dcd8f93",q.BonfireSpireB5Hard="ff9c0910-f68a-4d15-a03e-9f165cd06b37",q.BonfireSpireC1="ffe87899-8e47-4ac5-a6b5-dd398a52aa98",q.BonfireSpireC1Hard="da5c82d1-e643-4e80-b644-f0d4d0879bf9",q.BonfireSpireC2="ab844cf2-3902-4ea0-9958-6e9bb437fc54",q.BonfireSpireC2Hard="1c875238-d0a2-4829-bae9-b120a55297be",q.BonfireSpireC3="c4ac200c-042a-46b2-b517-961dcceb1f7d",q.BonfireSpireC3Hard="62d023fc-f383-4791-9d27-517525b9dd69",q.BonfireSpireC4="4dc9b482-3db4-4766-880d-17caf4c9ae12",q.BonfireSpireC4Hard="edb017fb-8c7b-4392-ae87-5948835c9b55",q.BonfireSpireC6="c4790ef3-fa14-44fc-9b1b-b6ae2c0cf21d",q.BonfireSpireC6Hard="4a670087-960c-4528-a1ff-9ae72e772657",q.BonfireSpireD1="a91821c0-38e6-4000-848c-5da16c674f6e",q.BonfireSpireD1Hard="bfa0be82-c0da-4b52-966c-0dc89ec06439",q.BonfireSpireD2="a56a97b8-28d0-4f50-b326-774103bd252b",q.BonfireSpireD2Hard="ccc0d95e-9ce3-48ff-8dd8-5975190b9c96",q.BonfireSpireD3="7af56eea-559f-4cb2-8857-f23f43570b18",q.BonfireSpireD3Hard="0d3d565b-dd7b-402f-8347-fdda3f4d8c95",q.BonfireSpireD4="bacbf8ae-d808-4aa1-a9d3-bdf09b67c234",q.BonfireSpireD4Hard="0f05fe2c-447f-4ee3-ba00-fa59f138af19",q.BonfireSpireD5="bcfdb02d-3a77-410e-a5c6-046ccaf15c55",q.BonfireSpireD5Hard="1bf7fe6d-5864-4e36-94aa-cb347a927dd5",q.BonfireSpireD6="f05943ad-fe1d-4690-9361-b7490db1482e",q.BonfireSpireD6Hard="1a9f35ba-5737-4c3a-a4e1-3c2eb223cdcb",q.BonfireSpireE5="6ecd54f9-1622-4af0-bdeb-e0d1a1a0af7c",q.BonfireSpireE5Hard="41274568-49ea-4d95-be50-8c7609f2f58f",q.BonfireSpireE6="d640c5ec-71db-4bae-b24c-43e7d43f0697",q.BonfireSpireE6Hard="7aa80a57-758c-49c9-bacd-453fe06940b9",q.BonfireSpireWalkableScreen="538a9242-41a4-458f-a04a-bcbae84c1050",q.BorderlessVideoPlayer="0b7c3353-6edc-4c40-992a-8a23cae62ee3",q.BossBattleModal="a9ff4ee9-edd8-44d7-95b0-1532559a2887",q.BossChest="2142f025-9e21-4f6b-a964-6cfef5d1bc6d",q.BossDifficultyIndicatorIcon="774061bb-20d4-45a2-b15c-1e60c914ba55",q.BossDifficultyIndicatorSpotlight="765c868b-6efd-498c-9d9e-b7c021c72904",q.BossKeyPosewithWeakness="a5b3c169-6c50-4ccd-9fce-9c2f88bd0581",q.BossRewardUI="384bdfdf-ce86-4f1c-9f7b-be95d344b250",q.BossRewardUIwithcurrencyrespin="cf9bdc47-0cff-417d-8ade-3f093b073a94",q.BossRewardUIwithnorespin="9543889d-b837-41b2-a170-f6d53eb5441a",q.BossRiftScreen="c0217105-992a-4dd9-a1db-00876d6e1156",q.Boss_icon_slot="d0dcb964-e294-44c8-b39d-65aae4346034",q.Boss_icons_row="7564f48e-bfa9-4b94-96ae-e628e30d3b7b",q.Boss_reward_missed="b451c4b0-180b-402d-840b-26f383d0edfc",q.Boss_reward_revealed="14284996-79c0-44c2-a36b-9cffece19bc4",q.Boss_reward_unrevealed="dd3d3de4-5a08-42e2-92df-510a9ec718e6",q.Bubble="3b84616b-b2af-43e4-8b2f-c3ca1d6ad931",q.BuddyParticleDefence="15dccb40-e75e-4162-9bb4-665951019a5e",q.BuddyParticleHp="2a98be0d-518e-4c1d-a406-4d6e5d54641c",q.BuddyParticlePower="52e112fd-571d-466f-a5c7-2ce1f7678e48",q.BuddyParticleSpeed="75f1847d-9c5c-4004-9bb9-b233adb6f2f5",q.BundleExtraReward="0732f378-aed5-403b-ba11-db87c35c1b19",q.Burgerworks="a1ff93a5-6595-4277-8421-2d51390507b3",q.BurnVinesVFX="8b476774-94dd-42ec-9103-791a655bc418",q.ButtonBaseMediumBlue="4e3cf812-02d1-4a90-8611-bc2783f08f82",q.ButtonBaseMediumGreenA="2762f59d-5aa4-4257-ad69-76cc508bf31d",q.ButtonBaseMediumGreenB="ddcc451d-87d8-43eb-85de-d5583367adfa",q.ButtonBaseMediumRed="0d57eaa5-96d9-4270-aacc-917e8957dcae",q.ButtonBaseMediumWhite="b9e3faf7-de48-4a5f-85dd-bad1dbae21e9",q.ButtonBlueMediumTextAndIconRight="34247c91-a5c8-43d6-a462-2f24c20a0c50",q.ButtonGreenMediumTextAndIconLeft="ed74cc80-3253-4820-9368-488434b7a019",q.ButtonGreenMediumTextCenter3States="ed80cdbb-c6a6-4560-b28d-548a6f586f61",q.ButtonGreenMediumTextCenter4States="0f5e554e-6640-4f35-aa08-5d9103c77231",q.ButtonGreenMedium_LargeTextCenter3States="71a7c42f-f624-4ac1-882d-256ae0566f2c",q.ButtonRedMediumTextAndIconRight="e3bccf0e-2afd-4f08-a113-0e653b79a2d7",q.ButtonRedSmallTextandIcon_RectTransform="6f2053ec-0878-4085-a82c-82a175a34a24",q.ButtonWhiteLargeIconOnly_RectTransform="b6eead11-6a94-4926-b209-a48c833fb284",q.ButtonWhiteLargeTextAndIconLeft="5d45505f-721b-4c3c-b81f-7c862c3a172f",q.ButtonWhiteLargeTextCenter3States="78543d0f-99f7-4779-85a0-fd5b4f1d8658",q.ButtonWhiteMediumIconOnly_RectTransform="37b4be5c-46be-4db7-8830-a427be35944f",q.ButtonWhiteMediumTextAndIconLeft="65207ca3-d40d-4e8f-a241-cc7f33ca9bdb",q.ButtonWhiteMediumTextCenter3States="05bee47c-6bee-4961-b90b-9e47dbcbf6d7",q.ButtonWhiteSmallIconOnly_RectTransform="d35485e1-ba06-4762-a8eb-8309202d1bbd",q.CTR3SpringfestAd="ac514889-4da6-48d5-87aa-466390fc728f",q.CTR3VideoMenu="445d5673-7b53-43d1-b8c5-4be32170061f",q.CameraControlHUD="ee399d49-98ac-4e40-a608-ddb51f4c0e87",q.CampaignReplayHardModeFTUEDialogueController="452a807d-a6d2-4261-a076-8a9947dae9df",q.CampaignReplayNarrativeCatchupCutscene="ae583e4d-f49c-43e7-8fd8-0da14c823d0b",q.CampaignReplayNarrativeIntroCutscene="17518765-3a2b-4628-9a4b-58f091118617",q.CardDailyLoginCalendar="292c13a3-bfc4-4be9-a0d0-f9fcc1b79620",q.CebolliniNPC="b5d61bde-ae3f-491a-bbed-1f91cefff3b6",q.CebolliniPatrol="8027b8a7-f0cd-4868-adad-f46fdaa427ad",q.CharSelectScreen="7d7904ff-40f5-4cfe-92b4-2fcffcd911bd",q.CharacterClassCode="e41c8cf0-9933-42ce-b0cd-67a630a4db72",q.CharacterCreateScreen="715890b6-5312-4892-97eb-8a3f8b457d66",q.CharacterDialogGeneralButton="504d0d3f-da75-43dd-92ba-fe5a30187a98",q.CharacterDialogue="fc803f64-b097-4a02-9ccd-065a52f64d9f",q.CharacterPaletteButton="36036887-6c56-4c0f-9b26-8415a3070e54",q.CharacterPaletteSelector="570b7031-b46c-48fb-bf62-0c3d96622ccf",q.CharacterScreenFooter="9f085f2d-06ad-42f7-83f7-c8830ed9dab9",q.ChargedLevelsDecayImmunityModal="3882006e-9310-43e4-9527-73d2b58c3283",q.ChargedLevelsIncreasedMailer="d12ecfa7-4e92-4881-8eb3-42a182f7145c",q.Charged_level_effect_bottom="8168db41-f708-413f-99b4-cfa123d61aee",q.Charged_level_effect_top="7c283ce6-333d-49b8-8bfe-e0e0cfd1b529",q.Charged_level_retention="612b62f9-f19b-48e2-83ec-cb12a402cc06",q.Charged_level_timer="756ae86a-92e3-4722-a00b-c00a43912458",q.Charged_levels_tutorial="ce22db97-2fa4-42b2-af24-4f2b1ce625a0",q.ChaseItemDisplay="cfea767c-df8e-429f-9563-10c30e3f69e8",q.ChatBubble="f477d5dc-2d62-4263-8aca-74f6d0390b70",q.ChestContainer="358d439c-9469-437f-a4d2-f0141aee13b5",q.ChestRewardPopupFactory="2900f01c-02af-4819-92ab-5b8f5cb70b4c",q.ChooseFloorLook="9bedbfff-f5e9-47aa-bc9b-22ccfb0904d1",q.ClassCodePopup="1c988778-d55c-4e71-bd6a-9f44ed2d24c2",q.ClassCodeSection="79470531-f247-41ab-9eae-7fe353f669e2",q.ClickHereGuideHand="df712ed3-75b5-4797-ab0a-8f1ba3e929e9",q.CloseButton="5207b7a8-d8f8-47e0-9db3-4998301c1df8",q.CloseButtonSmall="b942553b-a06a-4c8c-b0a0-160effb3ec7f",q.CloseButtonSmall_RectTransform="c83f5774-380a-4bcd-9704-37b75eb535ac",q.CloseButton_RectTransform="70aec33c-5de3-4f24-a309-fcca4a5a74b2",q.CloseButton_WithText="e27ce6d3-3fe7-4765-aec1-7c8fbeab1ad7",q.ClosedRedRectangleMessage="0be93aaf-2599-432b-8319-d25b7d3e4023",q.ClosedTag="24ec6c09-a2d4-4872-8d10-f8fdf8951a10",q.Cloverworks="7b491953-54e4-4d71-8c26-508aca2bfb19",q.Coffee="b7a4af27-45c8-44c1-8e2d-c13e60c914dd",q.Collectable="fbdf5181-e2d3-484b-a26d-9f20917d7b80",q.CollectableSpawner="c8126793-f301-4bd1-b1a9-c7e45fdbfe33",q.CompletedParentSection="82acc4ed-cae0-4424-9bbe-27456d90adab",q.Confetti="55dd2d85-d0ef-4e64-9941-a1bdf15510cb",q.ConfirmationDialogBody="68cb0ab3-f4df-48b6-97e3-b51008bec534",q.ConfirmationDialogFooter="4c912ea4-5042-49b0-ac2f-137cca73c26f",q.ConfirmationDialogFooterWideButtons="0d366e67-7073-4a92-86ba-f92b9782ad83",q.ConfirmationDialogHeader="30e7a29b-11ba-43b2-bd47-44bd53e31c69",q.ContextualPanelTemplate="4e9e129a-f359-4080-896e-e8233c94a974",q.ContextualPromptDualPackage_Template="1d204d23-b61e-4968-9a50-55e42c797c43",q.ContextualPromptMemberJarDualPackage="da897525-ada9-4b72-ac50-8b849000ee70",q.ContextualPromptMemberJarUltraFocused="ba82d3b4-82a3-40cd-8704-5f1b5e51166f",q.ContextualPromptPetFocusedDualPackage="d9b71a6a-280b-413d-9008-29530167196a",q.ContextualPromptPetFocusedUltraFocused="8f1d19a0-1afc-4aca-813a-5db6dea77cf7",q.ContextualPromptPetMergeDualPackage="478535b5-e14c-4082-803c-720b6e89f100",q.ContextualPromptPetMergeUltraFocused="32421374-4c16-4af6-8d8e-769fecd5f706",q.ContextualPromptSegmentedOffersDualPackage="b85f1e10-76de-45d7-99aa-7ed55f2ef57a",q.ContextualPromptSegmentedOffersUltraFocused="804129e8-2647-42ba-a81c-208c73ae0e10",q.ContextualPromptUltraFocused_Template="83041159-c503-4c03-84ef-74f27ede09eb",q.ContextualPrompt_ChargedLevelsUltraUpsell="7d4331f2-5930-4bea-8f91-d0ede612d1ae",q.CornerQuit="e5ecea46-b0a0-47ea-a0d6-fce83e3ea403",q.Cosmicworks="3b3ada7c-845b-403a-b292-07d6058fef32",q.CostumesHeader="995ebab4-37e3-4608-ac78-ff6c05b31461",q.Crystal="462e4ce6-39fd-459e-9aa2-b851af58c72e",q.CrystalCafeStore="9e6845cb-93e4-4780-8567-058bf635f143",q.CrystalCaverns1Streaming="1dd59d6e-6bbc-44e8-b50f-80b60ed4abb0",q.CrystalCaverns_FixTracksTutorial="4ebfee10-3b01-429e-a815-a5a2afdad49c",q.CrystalCaverns_GlaciasEncounter="4d35970b-6c0d-4a82-a0ea-b49acdeece27",q.CrystalCaverns_MinecartTutorial="2acaaf48-000f-48b0-8160-d7116868ee2e",q.CrystalCaverns_Phase1="d0886b67-9670-4eef-b452-0cd4f0a42d19",q.CrystalCaverns_Phase1Blocker="c60bce9b-9f18-46f0-a29f-dcb64da8fbaa",q.CrystalCaverns_Phase2="c6982a43-eb94-41bd-8684-777ab5bd19c7",q.CrystalCaverns_Phase3="5f41427d-83e6-4de4-ac63-f14d0fc3447e",q.CrystalCaverns_SceneBase="1579afec-dff4-41a0-936f-4111f4f96cb3",q.CrystalCaverns_WinstonVonLootEncounter="c211f913-5ab3-4244-8fb5-1ef606760b42",q.CrystalCaverns_WinstonVonLootPost_Battle="b611fcac-649e-4993-b135-3a29c49b870f",q.CtaTipBodyEvolvePet="00d0d17d-4379-494c-95cb-c94c8a22d9fc",q.CtaTipBodyLevelPet="0f2485c4-2398-4e35-beb3-c390eb07ab2b",q.CtaTipBodyMergePet="055accaf-4ef9-4bb2-b203-538deb058483",q.CurrencyButton="fbdfd03b-e749-4b32-a7c0-36befcf6f6b8",q.CurrencyChangeNotifier="7b4072e0-6183-47d6-afb3-3eeac00cdcd5",q.CurrencyConversionPurchaseButtons="8dc96b0d-7129-449c-a8aa-3c9f96bbb20a",q.CurrencyCostDisplay="f8951ba1-a529-4297-ade4-a04e61e9c51e",q.CurrencyCounter="c62f8482-a816-4872-aae8-0c53769ac81a",q.CurrencyDisplay="205c5bdd-5921-408c-be92-218d37935584",q.CurrencyDrainWarningModal="6e211bc8-5150-4066-8414-dc49c205bdb3",q.CurrencyEarnParticles="4c3a5dbc-747e-47d9-86c7-b6dceab5a55e",q.CurrencyHeader="8be71acf-9767-47d6-b0e4-a32bfe92abc4",q.CurrentStateChallengeView="90626149-a806-412f-80a7-2925cc702940",q.CurrentWorldInfo="21aa57b4-ef6a-4cfa-9446-e1b1ef1895f9",q.CustomKeyboardLetter="93877c15-e507-46d5-9534-31fba16886bd",q.CutsceneHUDController="9d9eb449-93bd-4d01-bc1d-90d2db24d724",q.CutsceneInputOverlay="652dac85-414b-45b6-b996-a65e26b669fb",q.DailyCollectableSpawner="2df80544-a31e-430e-9edf-f139bbdd2908",q.DailyLoginCalendarHUDButton="4591ac22-90c2-427e-b9c2-8ce24ba1fcb7",q.DebugBattleUnitClickArea="e28766d2-895e-443d-8206-6bf3781effb9",q.DebugCutsceneStatus="d009f1ca-ff4e-4615-8317-0334666dd6b6",q.DebugMenu="8008fca2-1b22-4e30-b745-50ab3b15c297",q.DebugMenuCategory="c2404aeb-7cd3-4cf9-af7d-8c8fc4f448bb",q.DebugMenuCategoryTab="ec38aa4d-bc0d-4627-922d-5d63ad82035d",q.DebugMenuCommand="a3d07eec-1abd-41c2-b3d5-1091f91362c2",q.DebugMenuInputField="dedf0b7d-5a28-478a-80e1-2b194fe07ad7",q.DebugMenuToggle="f20ee92d-0887-4ce9-b519-0840b5340bbb",q.DebugStatusEffectMenuItem="59ebf52b-e334-46d7-a9a1-a18acdffe1e3",q.DebugStatusEffectsMenu="4f26967e-dc37-425a-9bbb-2eda4e3b8453",q.DefaultBody="01eb52e2-1dc9-4f65-99b7-157604cc777b",q.DefaultFooter="c8062699-3d21-4fbd-9e5d-af23e8a9f969",q.DefaultHeader="a9e11847-274a-406c-8599-93e017f4bc61",q.DefeatedPetsBattleIcon="76cbc1ab-8d41-4628-9909-7f44921b267d",q.DefeatedPetsRarityLabel="90467007-ea9c-4758-aace-dd9ff9739d74",q.DialogBanner="d17a542f-7dd9-43cb-ba9d-9fa34eb31e22",q.DialogMedium="69bad6cf-14b6-412e-a50c-292cc979727a",q.Dialoglarge="e19ecfda-8a24-4a40-92bd-035c7c7e79f2",q.Dialogsmall="223de309-a870-4aed-adaa-5cbe162c5659",q.DiamondArgyleBackground="9bae72c1-64e4-484e-917b-f684f9b9d11c",q.DiamondArgyleBackgroundWoodHeader="7d214f60-767f-439c-923c-94d2cf85b9ac",q.DiamondArgyleBackgroundWoodHeaderWithTimer="b4e8fbc2-b38d-470a-a0ca-d659ca2f1081",q.DifficultySelectorConfirmationModal="1175d3cd-6a04-4fdd-aa49-1538807cf0a4",q.DifficultySelectorPanel="7093d479-a2b6-47f8-8946-84fb6f964529",q.DifficultySelectorScreen="fc444dea-9f82-49eb-8c78-0cce54920080",q.DifficultyUnlockedModal="ab0063c1-9150-4027-9a20-e5db1f864ffb",q.DonZorroNPC="b48df925-28af-45f6-96c3-252f64ec1fe4",q.Dragonworks="cea13c56-c95c-458c-8fb2-e238c66d3266",q.DuelInviteNotification="282745d4-ca7d-4456-9cff-a69d67b5992b",q.DuelMatchmakingOpponent="b301d2e0-e203-4e1f-b3ff-b4e3577619b1",q.DuelTurnTimer="d6ac1a3f-be11-4483-b249-43dd7ee3f4a4",q.DuelWaitingMessage="590d5748-ded1-46ba-9e7a-fbffdad23f28",q.DuelsFindMatchButton="e2fd5b68-0a61-40d5-90cf-0756d500dd8c",q.DuelsLoadingScreen="38b1277a-7325-45c0-ac36-b39f459baf4d",q.DuelsMatchmakingScreen="e13e76b2-69ad-4c37-bc6b-d238c8c75d9e",q.DuelsStadiumDailyUsage="cc9f36be-386c-430a-9c21-ebf449f873b4",q.DuelsStadiumMenu="e4dfc5af-955c-4e3a-9bdf-cc4b32d1eebb",q.DuelsStadiumMenuHeader="6a836ff3-7a26-45f3-a94d-e90dbb29a74f",q.DuelsStadiumRoomCard="2605656e-2882-488c-bc1c-1e9945d0b52a",q.DuelsStadiumRoomsBrowser="6de8f19b-2e94-40af-b02f-f97788eb1bf6",q.DuelsWinStreakBadges="978675db-88e4-4080-ae2e-facc7e265741",q.DungeonCompleted="43a6e25e-06ba-402e-98b6-633e2c9018b7",q.DungeonHealstone="28bc7b7d-291a-429d-a618-5dfa0b0ed829",q.DungeonLoadingScreen="2c1a7a79-398b-4c1e-acec-e877db67468e",q.DungeonMinerNPC="64d59196-1650-40cf-ba3d-0e1ba89f5063",q.DungeonPlayer="c4f5f284-e29c-489b-bc3d-3d093f71ba11",q.DynamicAppearance="d52e1378-ee03-46d7-94a4-eabe3a7726ab",q.DynamicMembershipParent="55e8171c-4fc9-4921-b69e-7127d2f8a658",q.DynamicProgressBar="9b53da2f-8af0-4c29-801e-5572b4069455",q.DynamicPrompt_DualOTPUpsell="091e868f-c990-4098-a379-e819f2a6623d",q.DynamicPrompt_MagicoinOTPUpsell="88cd7563-c1ca-4ef0-aba1-a0e82024ca0d",q.DynamicPrompt_MagicoinOffseasonOTPUpsell="993329b0-8b3d-4e57-8a75-55a4f02cb71e",q.DynamicPrompt_MagicoinUpsell="47a7868a-652b-4c33-8fdb-e0706802aabe",q.DynamicPrompt_Memberjar="323cbcd5-7625-4d67-8c64-436d54578837",q.DynamicPrompt_MembersGetSevenLevels="ab987c70-1283-42dc-bc33-b89e22882408",q.DynamicPrompt_MembershipInfo="47fe382c-a79f-4dd9-8414-ac85ba006125",q.DynamicPrompt_MembershipInfoV2="001e334d-bc5f-4f54-80bd-690d73fe5299",q.DynamicPrompt_MembershipforMagicoin="324afd89-4ef8-430e-bdae-72d3d1d0fc64",q.DynamicPrompt_MobileMagicoinUpsell="200032ea-f61f-4622-8e9f-6bd7a43dbb9e",q.DynamicPrompt_MobileMagicoinUpsellOffseason="01eb2259-22a3-4149-8229-3c67655d3fe0",q.DynamicPrompt_PetSlotsAtLimit="b811077a-71f1-4d47-b0ac-ae72218f7a22",q.DynamicPrompt_PetSlotsBase="ddf2e26e-782e-4264-a2a3-2fcb5a496b68",q.DynamicPrompt_UltraUpsellTemplate="d1d157dc-5cce-4a4a-8de7-ec95d661f780",q.DynamicPrompt_UpsellMobileTemplate="4a32acef-d2c3-418b-9319-5396d676a8d6",q.DynamicSpinePet="7baf54d3-a94f-4217-a02c-de7a432d6473",q.DynamicSpritesheetPet="f98eb440-a797-4315-96fa-58c36a040b47",q.DynamicStore="ec99a1be-645d-4847-89b5-8bccb24896bc",q.DynamicStoreBundlesPanel="70c2add6-a9c9-4e26-aaa1-2de6a5ae8494",q.DynamicStoreEmptySection="66e7ba19-6a0a-472c-b930-dd1a5786146c",q.DynamicStoreFeaturedPetBundlePanel="a82ebae8-4ee8-4712-b736-4021aa100205",q.DynamicStoreItemScroll="f8dfde7b-4719-406f-880e-42a17a2c8a9c",q.DynamicStoreLeftPanel="0b9098bf-f747-4e25-b1ca-ecbae0efa3ea",q.DynamicStoreLeftPanelTab="00790afb-0bb7-42dd-910f-75c0e2237ba8",q.DynamicStoreModal="d2709b02-8f1e-4689-a442-113a47e95e12",q.DynamicStorePetOffersIcon="04bb9c29-0674-4626-b959-d8d3541ed47a",q.DynamicStoreSectionHeader="2d06e685-1ac5-4e8e-8e6b-b734df75a974",q.DynamicStoreSegmentedOffersPanel="0f31446e-cb70-42f9-9b14-4c1c385761a4",q.DynamicallySizedNotificationBadge="ecf56d28-6b95-4e39-add2-2527fae268b4",q.ElementalBoostDisplay="1c889aa8-7827-4a48-b1c2-eaca23098701",q.ElementalBoostPopupText="8b0da69a-0b2e-403e-9407-99f17cb08066",q.ElementalWeaknessChartPopup="102039d3-1726-4cfb-a69f-39aa63096698",q.EndGameNavigationGuideHand="9499f1c6-1cd6-48df-976e-d9bed26aa640",q.EndgameConfettiInitializer="ea5ba159-a621-403c-930f-0713eecb964a",q.EndgameIllustrationPuppetMasterDefeat="3c7d236f-a3d2-4c0d-a532-b24c608bd33e",q.EndgamePedestalClickHandler="3d76179d-a0ef-4ddb-a5f7-85500939eec7",q.EndgamePostPuppetMasterCutscene="77ddbb9e-904a-4394-88e3-999747f4dff0",q.EpicCounterWidget="5eda22ae-ae59-4268-9e41-616b984885da",q.ErrorDialogContentRefresh="a407adcf-e270-4c84-a40f-9ba0bd93d3b4",q.ErrorDialogFooter="fc95e252-4c38-4cb9-bfe9-38839c054e00",q.ErrorDialogHeader="20afb102-02db-45e7-b3d6-5c0985965a1a",q.EveNPC="771f8838-90f4-4e8f-9298-b5b63e49e53d",q.EvolutionScreen="7a383058-6eaf-477d-9e32-7dd56a80329e",q.EvolvedPet_InsufficientResources="02bb09aa-6b0a-4054-b19c-42ebed3bf434",q.FeaturedPetModal="110c9891-99b5-4bd8-ac76-fa2ef27a4b36",q.FeaturedPetWidget="c876d2cd-ca45-4c58-bb34-745b30931cd1",q.FeaturedSpawnPoint="5fe00b2a-ba56-4c67-8ac8-c728450d4412",q.FeaturedSpawnTimer="3573877c-79a2-40aa-ac72-32bc275a6969",q.FestivalAboutMenu="6c068d49-4027-452a-9f41-0248014f8f40",q.FestivalChest="03fdba93-89f0-47e8-b3f6-13be42993cd9",q.FestivalChestRewardUI="3cc6eeed-fe9b-4e71-8540-e750e6ba801c",q.FestivalCoopTier="4b8069a2-3d7e-4782-8df5-8612ceea28c0",q.FestivalDateDisplay="1166fc69-1512-4569-8c2d-67ebeb3192b2",q.FestivalPortalVideoPopup="d6f168d3-ad5e-4377-b8a9-4a3ff4d40a09",q.FestivalPrizeWheel="c9ef701f-0538-4757-a079-63ff435b0ee8",q.FestivalProgressMenu="47070187-ba72-4128-a873-cba32f6c48a4",q.FestivalProgressStoryTier="55642e5f-1f1c-466a-ba92-aab91fef04c5",q.FestivalProgressTier="3087ecc6-97e0-4ca0-bc4e-5070828671eb",q.FestivalToaster="c78b5b1b-173e-4ec0-8d48-cb17b179e094",q.FestivalTravelModal="323053cf-7d32-4478-b898-2c6a92317b56",q.FilledTeamCardInjectionConfigured="634a3c1f-c77f-4884-9480-adb2d2566014",q.FilledTeamCardInjectionConfiguredMergeRank="4f8abb19-447f-416c-8ed4-f07a59e73050",q.FireflyForestWalkableScreen="2ad90480-6788-45fa-a19f-276d153958b0",q.FireflyHardQ12CutscenePost_battle="356e1856-146e-4704-8471-5b1d973195b4",q.FireflyHardQ12IntroCutscene="517a4351-96e6-4c82-952b-8c1b5797ab54",q.FireflyHardQ2MinibossEncounter="6b4fc0b7-10d5-43f2-a0f1-255374490c9a",q.FireflyMerchantNPC="a8d1e441-a759-4e94-8541-7236da9334c9",q.FireflyQ12CutscenePost_battle="a6f047ce-0958-4b38-a580-7dc47b9b1c2a",q.FireflyQ12IntroCutscene="0e7cc4c3-9f0b-4ab3-a680-8120053b0b1f",q.FireflyQ2MidBattleTutorial="f8bf9bc2-b3af-4e86-9bca-ba632e6889ca",q.FireflyQ2MinibossEncounter="afad8dfb-544d-4246-9ff8-3025ab25d8f7",q.FireflyQ3MinibossEncounter="412c6156-5cc0-4196-b79d-eb889596639e",q.FireflyQ4FlorianNPC="f106b51c-cf1c-446b-8714-30516a53d5a6",q.FireflyQ6Cutscene="7892d170-60b2-42f7-ac54-c772c6d15c3b",q.FireflyQ6CutscenePost_battle="c7c62796-d65b-4ae6-b3c2-e4c031eb343b",q.FireflyQ8GeraldNPC="84b16e5c-3dd3-4297-ba79-b9a3854adce8",q.FireflyQuestMerchantNPC="25915477-156a-429c-a3e2-3cb68a054944",q.Firework="cf900e63-412d-4e36-a708-1808d347e79f",q.FirstNameCellPrefab="af3d0a70-f46e-4bdc-90a8-78b13e9e75d6",q.FirstNameSelector="0591ca90-f9c8-43af-a85b-5629e9c71bf6",q.FirstNameSelectorScrollBar="cc209739-9ca6-4781-8b81-d2369dab2477",q.FlagTintableBanner="963cb371-05e6-422b-be5a-82e80dfe0c3d",q.FloatlingFlingResearchPointPanel="48ee416d-121b-45d2-83ed-37f0c5f2ffe7",q.FloorDecorationPlacer="c7179c8b-30a9-409a-8eb3-d132b660c0ac",q.FloorListLargeItem="423af034-ebdf-406b-9ebb-18421ed7caa8",q.FloorListSmallItem="c955c422-dd5f-42ce-bf12-bf7b04e17ab1",q.FloorLook="8e2aed7d-ab4e-4424-814a-b2b169891551",q.FloraNPC="24878142-e2d1-4106-b6b4-559c6fc99693",q.FlorianNPC="a88ada8c-baec-4ce2-857a-41a16f2a0a11",q.FlorianNPCLegacyMaps="ca50f899-f9d2-4f2d-8a02-e671f4a5c2a4",q.FlowerParticles="0e168a59-a5ff-4897-9b2a-aefb43d9d7cd",q.Flowerworks="d221d05a-07ab-4cb1-a9c1-0fb21cb144d7",q.Flutterworks="d73125fd-91ba-44fb-ab2d-3bbd0320fdb1",q.FocusOverlay="66c052fa-7a57-42fe-9279-94ee566de6a7",q.ForestA3="51eb274f-00c1-4a21-83a1-0995c0d2970d",q.ForestA3Hard="4725b648-10e5-496b-a0ad-7fe89056521e",q.ForestA4="ce5df2e9-d864-40c3-82fc-95652b69c562",q.ForestA4Hard="bb69e366-e6bf-4326-8774-70c103d0633f",q.ForestA5="4a6e0fb2-96cc-41e3-bffb-e84c5117f264",q.ForestA5Hard="d53a4816-4aa2-4bf8-9bc5-6c6c0d5df690",q.ForestB5="d0ccb64c-bc88-41ff-bac6-04101f887a3f",q.ForestB5Hard="0ff00aff-3da4-41e4-91c5-2f8338aaf0cf",q.ForestB6="e63350da-8e8f-4523-a286-d4c4d2ff73fe",q.ForestB6Hard="21689966-9ec6-4e5e-83bc-f9b4bb78ecac",q.ForestB7="6aa00bfe-fbcc-4101-9f3d-fad479d805a0",q.ForestB7Hard="06153eb6-fa17-4ba7-9397-c67a639c2785",q.ForestB8="7bc951f1-da51-49de-bf88-f40b05691f4c",q.ForestB8Hard="b565b7f6-132b-441c-911f-e75467207074",q.ForestC4="b4b4b8db-df37-4e11-9af9-eece973f79f6",q.ForestC4Hard="d8fa1d4b-536d-49a6-b5ba-fb0b0a7bee44",q.ForestC7="b39f6138-6a52-4c49-9ee0-e7219f457686",q.ForestC7Hard="c011566d-96be-4a7b-a0ed-baf3010e5f5c",q.ForestC8="e9d74135-75ed-4f86-a5cc-7b1c5682f90f",q.ForestC8Hard="19e486a3-8cb3-4579-8a96-f27d46bc00ba",q.ForestD3="17cffc83-9b3a-413e-b497-c42592d82093",q.ForestD3Hard="45cefde8-1300-4d1b-8deb-f7c467f2182f",q.FtueHouseExteriorChooseName="11052834-088b-4448-bc82-b5dbde861376",q.FtueHouseExteriorWorldMap="fccca0e8-dc37-4e6e-92d8-dc0080d0ce92",q.FtueIntroCutscene="303ab378-1819-4fb7-bdc1-74254d74edd8",q.FtueKeystonesCutsceneGH1="e9c7a1f6-df14-4db7-a9aa-7066f785accb",q.FtueKeystonesCutsceneGH2="3aa87410-33c1-45e1-aeba-0b737fe8584f",q.FtuePetInteractCutscene="1c0480f6-539b-41f2-ba74-c7aa46d501f0",q.FtuePlayerGoal="52ee2681-2fe6-436c-a671-5e179734ef20",q.FtuePlayerGoalRewardIcon="8e251779-a900-4342-a8e9-194e26e0ac95",q.FtuePlayerGoals="7841e096-0775-4836-a036-a699e97aeb53",q.FtuePlayerGoalsHudIcon="8cf2c78c-ebe4-4284-a57d-358bbe548f7a",q.FtuePuppetMasterEncounterCutscene="d6aa13bc-feed-4e74-9bcc-bf915a4171f7",q.FullScreenIFrameModal="7595de17-5dd2-4292-993f-1f282b93d433",q.FullScreenSpinner="ace6a730-c3d8-485d-8e18-5d3206bf8d32",q.FullUnitInfo="7f57bd48-8f2b-422c-9361-dc678d8ba725",q.GlowHighlightAnimation="61da80fc-7729-4e5f-8580-64e938ba1b53",q.GoingToArcadiaModal="0644faba-8b95-448b-a228-89e2222ba86d",q.GraphicCurrencyDisplay="bc62dfe4-19d8-427d-8a16-70effdeee79d",q.GreatHallPart1Cutscene="ce204c50-beb9-4184-9738-b54204f91c8e",q.GreatHallPart2Cutscene_StarterPet="12197814-f61f-4619-901d-23a8127140a3",q.GreenLargeButtonTextAndIconLeft_RectTransform="4143b4b9-7cc5-4088-9e07-edd2eb9409cc",q.GreenLargeButtonTextAndIconRight_RectTransform="826fde9e-0f3a-4ae2-b50d-13940715f87f",q.GreenLargeButtonText_RectTransform="43705ebf-a99d-4052-ba1f-db23639584e5",q.GreenMediumButtonTextAndIconLeft_RectTransform="3909edca-f54d-4cad-90d7-6af556567289",q.GreenMediumButtonTextAndIconRight_RectTransform="3528ffb5-8832-4313-a612-c502cd69d9c4",q.GreenMediumButtonText_RectTransform="529faa7d-c2b9-4093-be2c-e846a7108135",q.GreenSmallButtonTextAndIconLeft_RectTransform="8e9027db-2ad9-484f-8cf8-bcde815666ad",q.GreenSmallButtonTextAndIconRight_RectTransform="579ffa03-9580-492c-ad39-52b5e4c1ab41",q.GreenSmallButtonText_RectTransform="29f4b7f5-e3ba-446e-8cfc-72b5989ea676",q.GrottoPortal="aa21a6c0-07a8-46a8-8be7-00d34a62e460",q.GrottoSelectModal="9508619c-64e3-4822-b007-f53201bdc6d9",q.GuardSlimeHank="d4333a63-7258-474b-ad91-709611e2c89a",q.GuardSlimeMike="9d2ee8a5-b130-4113-b567-6263d37ec7e2",q.GuardSlimeNPC="66a3cbef-efc6-4e26-8fb1-e9e7a08a5a3f",q.GuardianBattleFog="af5e7e4a-66b5-42b9-924d-459ab4e0f888",q.GuidanceBanner="9bd83a0d-9b97-4cb2-9a91-306f910ed792",q.GuideHand="171721fb-5707-4ca6-a63a-720ceb050943",q.GuideHandSortingAnchor="f0850757-a0bb-4050-8283-6a994d040f99",q.HTMLVideoPlayer="80d09647-8a5f-4451-aaa1-f12927d62d4b",q.HUDGlowAnimations="5952ad79-cb4c-478d-ab4e-67819ab0aaad",q.HUDLoader="9e3ca3b9-fa71-4f6d-b6ee-1fef78965022",q.HUDMenuBar="bfea05f6-bb3d-472d-ad13-2601f2f565e1",q.HUDMenuBar2025="02e11067-c9c1-47ad-8cfa-33dcf1bf0021",q.HUDMenuBar_House="3e8bba0f-fc57-4411-8180-ac8948aa48ed",q.HUD_WIP="01ee32e0-e237-4d21-889b-ce9419d476e0",q.HarrietNPC="37934600-7ebb-4371-84b3-b36ba0623fa4",q.HatStoreAdvertisement="65b1cc51-052b-4ee9-8c52-4b808d009a57",q.Header="16b63ae7-4b58-4211-843f-056c92ea59dd",q.HeaderNavigationTab="44bc682e-7ade-4b27-8be1-47102c0b96d0",q.HeaderNavigationTabs="7e4b9038-600b-44b5-b790-4d7eeb6c2592",q.HeaderTitleSubClose="c778624c-abce-49cf-8363-426fee511af0",q.HeartTaskProgressMeter="9ea1ea71-c867-486b-846c-3cef97e21199",q.HopWalkCreature="e3df5753-c17c-4b08-9627-11d136a75347",q.HorizontalFixableMinecartTracks="25901cbc-1f86-46bf-9b6b-494de314da2f",q.HorizontalMinecartTracks="e647a8e2-fa3c-4aa2-94f8-c1a652a734af",q.HowardCorneliusNPC="b1516b4b-9698-497d-8062-039140edecad",q.HudAttentionManagerHandler="73c6ffc7-0b2d-4d9e-b089-6e400385804c",q.HudButtonRevamp="4737abf7-0ba1-43ea-9ed3-b77f50a618aa",q.HudButtonSubnav="334fcd8b-53d1-4d2c-87bb-545098a51c16",q.HudContextMenu="8a2b8faa-a3c6-4503-8c8f-72925bdfaf72",q.HudLiveopsManager="6f96f32b-9560-4f8f-9b8a-b2dd86b19f61",q.HudRevampLiveopsButton="6c261527-f4a7-4f4f-b98a-27376e1891ed",q.HudTutorialOverlays="69366510-cac2-4fef-8d90-91ff0775cb15",q.Hud_badge_animations="15521bb7-2d35-44f8-8c11-2114219f2a51",q.Hud_menu_bar_icon_animations="f1c65a51-2d48-437c-b117-bc57e9b92e7c",q.IFrameModal="fa05caef-e8b7-4b78-9304-e68c4cc9a178",q.IceBlockParticle="3513afea-41ff-4161-a4bf-aa7c70b294e2",q.IceTowerBetaPopup="6681990d-e0bb-405f-96d5-959779ec0ca8",q.IceWyrmSequence="9b5195b5-2a24-49e1-9aba-a0b7bacdea2d",q.IconTimer="9ec9bcec-80b3-44c1-87df-33a8e2cfa115",q.Icyworks="fed14908-e145-4d1a-ae31-7fe23cc1fccd",q.InfinityTowerTopRightContainer="f80b20e9-24ce-4f0c-852f-09efd8903b32",q.InfoButton="9b8a0f90-d3ea-4c36-aefb-2e06de02d0a7",q.InfoButtonBig="40222400-e474-4b3f-b841-abb1ab612c71",q.InfoRemoveTooltip="2e5f0801-8ba0-4135-a913-7e7cd41fb16b",q.InfoSection="d2cdc4f1-9e27-4b36-ad39-9b9c6d9d8558",q.InformationDialogGraphicBody="514acf6d-258c-4830-bc54-7acda35afa20",q.InjectionTest="2e47b691-4d8b-4c9c-84b1-72e580a1f351",q.InputBlocker="af9e4dcc-0247-49ff-acc4-577d9167e108",q.InteractableSparkles="cb02d3b3-66a3-428a-86eb-9ce6ff58f707",q.Interactable_BonfireCrate="2521f763-4cda-4591-a900-a22b2165e0a6",q.Interactable_BonfireFlower="6a8dfea7-4502-4076-bd16-b836a8c26dd8",q.Interactable_FireflyFlower="8b5b7081-710b-4561-95b6-8962e2647505",q.Interactable_FireflyTrapBox="9f91a551-bd15-4b87-a372-609aeb7f32c1",q.Interactable_Generic="7f5a53bf-f28c-48e7-b1cb-d7c71940a95d",q.Interactable_MinibossReward="b2c02e7b-a5f6-4633-89d3-8995e017e3a0",q.Interactable_MoonFlower="ba9d1007-2341-4cd6-9f96-61e321679563",q.Interactable_MoonValve="0b08738a-1d41-4426-bb0a-0614c7a1916f",q.Interactable_ShipwreckChest="071a9314-cf6e-4f72-96e3-1178184c8740",q.Interactable_ShipwreckSandPile="d7f0d300-5a11-402c-8e3f-19799012508b",q.Interactable_ShiverchillCrate="a0d3dd32-5238-43b2-b475-603291ec6c92",q.Interactable_ShiverchillSnowpile1="9e3ab9de-9b8a-4f21-8b6f-29edc0a1ba40",q.Interactable_ShiverchillSnowpile2="699b2e8b-3fa0-41d7-a611-5afa37d8a5db",q.Interactable_ShiverchillSnowpile3="edb041a3-1ca6-4227-aad1-375d9f64152f",q.Interactable_SkywatchBalloon="fcae3fa5-7f32-4534-a4f5-b681d2703bdb",q.Interactable_SkywatchValve="58577cd9-84d6-4ed6-aecb-a29fb9caaee4",q.ItemCard="9d8e1a8f-5201-4137-8249-fed3cb0c1f60",q.ItemCardCounter="20fa959f-be28-4d22-9733-b8405c3d9f25",q.ItemCardHeader="d29600f0-dbff-44ee-9ca8-d126881e7f9c",q.ItemCardLockedBackground="e3dc2984-f573-42cf-baf0-f1378b58701e",q.ItemCardRarityCommon="bde236b5-b4e9-487e-98bb-260b68e1d508",q.ItemCardRarityCommonNoShadow="c9340a5c-d410-4835-bcd7-3e5f27a61e5c",q.ItemCardRarityHeroic="1d3b76f4-fb53-4c1d-82c2-3ab22372b314",q.ItemCardRarityHeroicNoShadow="7dda15a9-d786-486c-9699-214c9d303c15",q.ItemCardRarityLegendary="af47e456-af04-48ad-b12c-0c798e11f16f",q.ItemCardRarityLegendaryNoShadow="b5d1f28e-d15d-4144-92b1-4597be72a854",q.ItemCardRarityRare="89946068-4db0-4ddb-bccb-16d2581aa2c4",q.ItemCardRarityRareNoShadow="f44accf3-0868-4fee-9903-4a6a31cb7d17",q.ItemCardRaritySmall="fd6d706f-314b-45d5-abed-6d820ddd60e1",q.ItemCardRarityUncommon="33921ba4-9f23-4b2f-b2b0-e2353ab80abc",q.ItemCardRarityUncommonNoShadow="08f72fe4-cf27-44e9-9b22-eca718b4c84b",q.ItemCard_EquippedGear="74ed0089-2688-4118-8317-7337d818b839",q.ItemDetailsModal="3aeccccd-d017-4ec1-a075-715c039b0d5f",q.ItemIcon="2521a48e-7f55-4879-ac68-dd74bd1487a2",q.ItemRarityBanner="98c91ffb-8ddd-4d5e-bf82-f4a78726a2db",q.JellyJimNPC="3d33edbb-e187-42fb-92ef-466c2948d38b",q.KeystonePedestalMenu="928d051f-74ff-4c5e-b7d0-2fd53b353d18",q.KeystonePedestalMenuItem="6f937ac7-f7d2-43ff-89b5-75e533e626c3",q.KeystonePlacement="1530e7a8-3689-4bcc-be71-8dad3f851359",q.Lagoonworks="edcc94b9-3e15-4e83-b815-90d2a2135146",q.LamplightC3="d72ccb06-0673-40a9-9d92-d94b632f1fb8",q.LamplightLockedPopup="096c42b7-328f-4c0a-96c5-b73a6d5ae0a3",q.LamplightWalkableScreen="88217bc7-d73b-47a9-b3a9-1868a47c356b",q.LargeButtonTextAndIconLeftBase_RectTransform="f45d1d33-8e2f-4c9c-a47e-4cf1db19a1ca",q.LargeButtonTextAndIconRightBase_RectTransform="7f9a4ec0-0d90-4b0f-a4f9-025a93bca33e",q.LargeButtonTextBase_RectTransform="6f82f043-fad8-4549-b8ee-777661f42659",q.LavaLeverInteraction="b0867de3-3240-4016-8d7e-54e8e941a7a8",q.LavaLeverQuestInteraction="197d5bb4-61d2-4ad8-9f83-008e054b52bd",q.LeaderboardClassCodeView="8611011c-5483-4262-9e0c-fd1443acce90",q.LeaderboardCountdownWindow="8370d704-ea6d-4efc-8b89-5f6587753a81",q.LeaderboardNotification="aa959ca2-8754-4df8-95d6-ca16935697fe",q.LeaderboardRankingPanel="17b7a6d9-3b5c-4190-b20b-75ce7a4dc589",q.LeaderboardResults="84ae29ee-a4c9-4c70-86be-7740d8087b58",q.LeaderboardScrollableView="db401529-cded-4df0-9669-47df6861f35d",q.LeaderboardSvSRankingPanel="2ecc0dbf-8d91-49e5-bf99-3342e40a4fbe",q.LeaderboardSvSView="7dded6db-0f1b-49b3-8a6b-4bf2cdff9f81",q.LeaderboardView="a97ca31a-1eaf-42d1-92bc-4670819f0cd1",q.LearnMoreBody="4213f26e-6502-4e1c-a0ab-155a252792fa",q.LeaveLamplightConfirmation="decb2378-402e-4aa8-8c3c-60d53a3eb645",q.LegacyBattleNewIndicator="1f087df3-8054-49d5-9146-e745fe16d006",q.LegacyDungeonPlayer="42e01b40-8bd6-4555-9a15-5dcfd6ce8f6f",q.LegacyEpicsChoiceCard="c7db91ad-cca1-4b93-9d2e-7405e26fab5d",q.LegacyEpicsChoicePopup="62f060d8-fe93-442f-8ee8-8fd134c62dc0",q.LegacyFollow_BabyReindeer="12c7cd6a-8528-4f37-9db3-2c37422cfdad",q.LegacyFollow_BabySnowman="81140ff9-5019-4538-909e-ecd0f4a96508",q.LegacyFollow_BarnOwl="7858415c-b99f-4f6d-bff3-d9bf5e66f8dc",q.LegacyFollow_Beagle="d9b2b923-1cef-4701-bb6b-66cf4fb18a7f",q.LegacyFollow_BlueParrot="5673ba5e-d1a8-40b2-8cfd-2d91fdca9977",q.LegacyFollow_BrownHamster="817a489d-a299-4873-8889-d37f96a20879",q.LegacyFollow_CalicoCat="223a0cdc-8788-46dd-8654-96526508df14",q.LegacyFollow_Chameleon="56e2cb99-bcff-4bc1-ab86-1631fc1c82c8",q.LegacyFollow_CloudSheep="35f406ed-3d0e-41d7-b9c6-a5286ba584dc",q.LegacyFollow_Cockatiel="e64ef4fa-2ae2-46f2-bfd8-ae4dab232e46",q.LegacyFollow_CuddlyCactus="91e32f85-b86e-4024-874e-c0d6352fc92d",q.LegacyFollow_FlameSalamander="8f9744b7-1e48-4b25-af31-e983dad3cfe1",q.LegacyFollow_FlowerTurtle="4cb02221-b4fe-46b8-ad53-3ac666ae9d81",q.LegacyFollow_Gecko="5e758c86-4462-4abd-9a4e-fa1b0fbcf0f7",q.LegacyFollow_GreyCat="ff3837c0-5acb-4f1d-9581-b42634a9a5f4",q.LegacyFollow_GreyParrot="8089f5bf-ad38-42e8-ae5b-6c77b9d60e2e",q.LegacyFollow_HornedOwl="84b152d0-8202-420c-89bc-22a129ede8bf",q.LegacyFollow_Husky="64f957f0-95ab-49a4-a8f1-8fb2d412962f",q.LegacyFollow_LeopardGecko="c74886af-7e0d-41b1-b347-cf2b5ced4885",q.LegacyFollow_Penguin="5072a2e8-93eb-478c-900a-80b8a6649496",q.LegacyFollow_PurpleOwl="62292d8d-279f-406b-93ff-cfaf076b58aa",q.LegacyFollow_RainbowPanda="80b17525-4e04-44a3-9c71-27b895a4e024",q.LegacyFollow_RedParrot="cf0cfdeb-04d0-4218-8fb6-be4c31a186f8",q.LegacyFollow_Saber_ToothCat="df4c4416-f741-4a2d-8f3a-a4417fc592c6",q.LegacyFollow_Shepherd="4d7789ce-6b07-459b-9580-67fdd9f0ad4e",q.LegacyFollow_ShibaInu="f3ec331d-35b8-421e-90a7-314ef44f0887",q.LegacyFollow_SiameseCat="ac2837f7-5ccb-4059-8a74-ee2267b28eae",q.LegacyFollow_SparkleHamster="8be164c6-81de-425c-84ea-7f0f5101ca4c",q.LegacyFollow_SparkleKitty="1e2a857c-8213-4425-8264-bccffe30bf18",q.LegacyFollow_SparklePuppy="903f80d7-8550-4469-a299-291251fe5cdf",q.LegacyFollow_SpottedHamster="da4c7159-fbb2-4b7c-9f96-1b88e91b7c88",q.LegacyFollow_Steam_PoweredRobotBird9001="f42ddee5-4e78-44bd-bd3d-d9cbdb586bea",q.LegacyFollow_TabbyCat="0b599ffd-5823-4b6b-930a-af1d4411f111",q.LegacyFollow_Turtle="cfa2a157-1044-46cc-b7f7-fedc7f1a9efd",q.LegacyFollow_TuxedoCat="aba7150b-4e2b-41db-8f88-9833a7905e5e",q.LegacyFollow_WhiteCat="49a3cb34-0e8e-44fa-9087-da28f6ac3262",q.LegacyMapSpawnPoint="733fbbc6-b09d-4c9d-a6be-580cdc4d175e",q.LegacyMapWizardEncounter="e81a8ce0-80c3-45a6-8e6f-1e33050a6252",q.LegacyPlayerHead="9e1081ce-6b5b-44b0-a3bb-17f03b746d32",q.LegacySeasonRewards="aef5d065-6408-4e5e-a6f5-bdc395ce578e",q.LegacySeasonRewardsCard="419e1bcb-9354-4eae-8ab3-a650c4188540",q.LevelUpBanner="f85818f1-debb-425f-b2d8-8416ea1c6752",q.LoadingOverlay="04e0b298-53ac-452c-9f4f-477ee891cee2",q.LoadingSpinner="5ac9c3cc-e070-4487-998e-4f2824d1304f",q.LoginCredentialsQuizPopup="30a023e9-f0e5-4c36-a264-6ac51f8c3ad3",q.LoginPage="dde06240-581b-4a49-ac08-1a678b4670f5",q.LootDashBattleUI="2de5d40d-fce3-45d6-b76c-45567735af2b",q.LootDashDetailedSelectionScreen="15f95dd5-8f08-411a-a239-cb408607330e",q.LootDashFeaturedItemCard="de39eb7c-8b84-4842-9760-9a09b7d90731",q.LootDashFeaturedItemConfirmationModal="cc653363-763b-43eb-a6fa-1344d5720d6c",q.LootDashFindAMatch="83d4290f-4b2f-4d09-9dc6-1aa8450918c0",q.LootDashLobby="07604842-aaa8-4d95-b7cc-15b24e3ffefa",q.LootDashMatchFinishedMenu="bb225026-647c-4d2f-be0f-0f123d1d9113",q.LootDashMenu="cd941df6-4613-4a91-aba6-d82b18b74af5",q.LootDashNoMoreRevivesModal="30980f91-8064-415e-bb68-da9f2607724f",q.LootDashOpponent="3cb8108f-75a7-4428-8446-37970141cf00",q.LootDashStage="48a50b40-f903-427b-ae8b-8f8a627659a6",q.LootDashStageOverlay="0172bc63-5e2a-4c0a-8f49-9cff11d5c9d9",q.LootDashTransportModal="6e5f12aa-96e0-4825-bc2b-375f0f01ad8b",q.LootDashWaitingRoom="bf8a4461-7dc3-4bac-a2c1-585f1a03141d",q.LootDashYourTeam="e743f3d6-1bd6-433f-b08a-afa676402880",q.LootItemCard="336e0c9c-cd1c-4301-b52a-b98e5fa5d9ba",q.LootItemCardwithQuantity="bd404e85-187e-4418-a4c8-8138c889808a",q.LostFlowCtaBase="6a171cde-a4d7-4fdf-b231-dc09a2f1caed",q.LostPetModal="b26c3933-6f46-4ebc-810e-04546801eaa4",q.MagicoinBattleRewardsModal="98bc4eb5-4f56-47b5-afff-16e9dfe983ee",q.MagicoinRewardsDisplay="127fd899-ba5f-4ff0-a705-8355e2242a07",q.MagicoinValueText="f397d5b4-0158-4bbc-a24b-11fd01438e78",q.MainDungeonPlayer="34dc3421-4b81-4317-ba07-c49c197a17ed",q.MainHudBar="d57f7b9a-76c8-46ca-9add-8646c0aa697b",q.MainPlayer="4d671c0a-9eab-4ebf-a4b6-7735316c7974",q.MainPlayerDisplay="cdd4b79c-67bf-4018-b069-4ce23dc647fb",q.MainPlayerIcon="a4364b84-a6c2-472d-9119-4cf6e6c3e6fd",q.MapLocationDialog="bb95e49c-7053-4edb-9bb2-2d22a1a4d8fd",q.MaskedPlayerIcon="3508c69a-337e-47fb-b694-9bd81bcf0200",q.MathTowerFloor="096be956-d921-4b01-94cf-5296b2ad9dee",q.MathTowerShroudLock="a1bd4731-a40a-4891-8cfd-6556e741c10d",q.MaxRiftCardTeaser="0ea1cf17-73c7-47e2-bc40-359a463796a9",q.MaxRiftTierCompletePopup="2edf9ed8-edf2-40ca-9cfa-8413cbd4b271",q.MediumButtonTextAndIconLeftBase_RectTransform="174e9865-8ac6-459f-abed-f6049c437d8a",q.MediumButtonTextAndIconRightBase_RectTransform="c9d3b0f0-1385-4b5f-b73b-f755384c6d06",q.MediumButtonTextBase_RectTransform="dc93dfc6-5aa8-4521-b827-d85cc1ccb7a7",q.MemberChest="baf20088-5ecc-4def-941a-b0a57a0b74a1",q.MemberJarContextualPanel="e543abbc-eab8-44d6-b6f8-30845c0ac41f",q.MemberJarInfoWidget="ee74b4ae-0f3e-4c73-be8d-1ae019d75c07",q.MemberJarRewardsDisplay="6f2c597e-e1e2-45b5-a5e2-a314694bae08",q.MemberLockedGoldRiftModal="89771efd-0e52-4d6d-8483-8bceccc17eb1",q.MemberRewardCard="06aa63f4-5918-4303-b58f-e2f7763d47af",q.MemberSuccessVideoPopup="fb7e84ef-e017-4834-a0ce-4cc11dffc8d2",q.Member_LockedRiftsVideoPopup="5afebb38-08b5-4007-adb1-ce53a6059073",q.MembershipButton="386ac2b6-c46e-4cf9-8a23-e7db6cb87ba1",q.MembershipParent="ffb23bc7-99e7-43d0-8d7c-959368fbab0d",q.MembershipSchoolAd="c54ba39e-3ccc-4235-9dfc-fe3d032187fc",q.MembershipSuccess="18482125-378d-45d6-8e32-0bf4637f90a0",q.MembershipSuppressionTooltip="eb5a918a-3042-44ba-ae91-40445f35e8fc",q.MembershipSuppressionTooltipMenu="8898a24e-c4c6-450b-b682-005af5b15d6b",q.MembershipVideoAd="a77d89fb-0220-4cc8-b50d-d84720b2dfd5",q.MembershipYouTubeAd="c37e0a92-7388-453a-9b3e-da705f84c1f9",q.Memberworks="97cab445-cdcd-4fde-9769-8d45547bf11a",q.MergeBar="017bc79d-de8c-4554-ae26-e137e790e5b2",q.MergeIngredient="d7008c76-d93e-4503-a704-edf566f93c0e",q.MergeIngredientWidget="ac5d1a07-f7c6-48b2-a02f-a3bb3dbda3e2",q.MergeRankBadgeLarge="1676d3fc-cf3f-4321-95f9-050a0a917674",q.MergeRankBadgesmall="6d5e96d6-39bc-4eb8-8add-18bad3f11e4f",q.MergeSuccessBadgeVFX="a328816e-5e07-4d20-9808-349ab5f3f2df",q.MergeSuccessNumberVFX="0076fbeb-5385-4043-9d37-0b1ff0198da4",q.MessageBox="a1d0fd8f-e51e-4276-b8f9-89e5ee92e5f7",q.MinecartSuppliesPile="80fe2449-99e6-4f0d-bdd6-8179802906cd",q.MinecartTrackBoard="c36b4076-771b-4e60-abaf-ddf0d4c86930",q.MinecartTrackRail="94e1fe77-0dbe-4bbf-95e5-ea707007ed5c",q.MobileUpsellModalOffseason="3c5cd356-47ba-440d-9f7d-ccb691b8570a",q.ModalCloseAnimation="e41f3893-9306-47fa-92e9-4e038067db28",q.ModalDialogBackgroundBanner="cba8f9c9-b62c-4873-a571-57e29977ae5c",q.ModalDialogBackgroundBase="2a318f65-0bae-4e36-b551-84f93be3eede",q.ModalDialogBackgroundBaseSortingAnchor="e20cc2b2-962d-4556-94a4-4e9eb6ed6597",q.ModalDialogBackgroundLarge="51511cac-c7c9-4d10-bb33-a78c42f5ec68",q.ModalDialogBackgroundMedium="8aa8df9a-e2ed-4751-9188-d0527e41fbab",q.ModalDialogBackgroundSmall="cb5675f1-a15c-4e61-9a93-feceb823d6e1",q.ModalDialogBackgroundX_Large="54d80c70-5534-4a9b-86b2-208d52e07772",q.ModifierBar="5fc3725f-d8dd-4602-8871-448c5130128b",q.ModifierIcon="c72feaaf-8a1a-434a-a96d-a59453339dd7",q.ModifierIcon_WithTooltip="26684bd6-470b-4e88-9238-f6bc52867f12",q.MoonA1="aacfa1fe-370d-460f-977a-228505774cd0",q.MoonB1="d080cf08-ffcc-4c83-abbe-da789aff9331",q.MoonC1="a42ee972-b18e-4615-870b-21d18d793e88",q.MoonD1="6b93840a-b98d-490e-bbfb-9e1fb977aac5",q.MoonPortal="03d4d8a7-1ed0-4288-abec-1852236cf0cb",q.MoonWalkableScreen="24fed0ce-6dab-4a77-b8e7-59f7f60efb1e",q.Moonlight2025MoonArrival="d4c6d02c-a66d-4280-ae4c-156ed97ed926",q.Moonlight2026FinaleCutscene0="90101948-166b-4336-97a8-8594116b924e",q.Moonlight2026FinaleCutscene1="40455b32-6202-4ff8-ae50-2e11292d90b1",q.Moonlight2026FinaleCutscene2="59994356-ad20-4816-a7b3-66092049bd53",q.Moonlight2026FinaleCutscene3="d575e79d-7c56-4b41-980a-fbaab29e33c1",q.Moonlight2026FinaleCutscene4="a4f336f5-5394-48ec-b2e7-306158986468",q.Moonlight2026IntroCutscene="a390ee52-de3c-416b-9ef4-649dd9688810",q.Moonlight2026IntroCutscene2="571b56cb-d04b-455f-a96b-e6661f0c4f72",q.Moonlight2026Story1_3="73fc2346-e6ca-4339-a7d8-bf0960c592ed",q.Moonlight2026Story2_1="339d7ea0-7622-422c-94ac-68d079bc09d1",q.Moonlight2026Story2_2="c81cb16a-6032-46b5-a69d-e9b539282ace",q.Moonlight2026Story2_3="b22345cc-cfe6-4047-8db1-e4471691af57",q.Moonlight2026Story3_1="cd7fd03f-88be-45c6-a91b-bf31c48f4de1",q.Moonlight2026Story3_2="10e1c548-e870-4b58-b11a-bb56f7454431",q.Moonlight2026Story4_1="a8380002-480c-4b21-83d2-f3ca767e9f5b",q.Moonlight2026Story4_2="f86c7095-e1f0-481e-85fa-d9f83efa6706",q.Moonlight2026Story4_3="bb7f56ee-e500-482d-a675-bf7dd0511e02",q.Moonlight2026Story5_1="32da834a-8008-4ebe-b280-f5194d745bfa",q.Moonlight2026Story5_2="2fd5f087-7ef7-4739-853e-298bbc8fce6d",q.MoonlightBossStatue="fdfcb576-13e3-4b66-8e6d-2c64f083e8e5",q.MoreItemsCounterCard="f7fc5047-8e53-498f-9b88-a54b4f719a84",q.MoreMagicAtHomePopup="02cd1957-6f99-4862-be67-4a6fb1319aa7",q.MorphMarbleButton="e94d0dbb-d754-4384-be03-3bf4405d05e0",q.MorphMarbleIconSpine="37a4238b-4bcf-4da7-9853-d249281c53fc",q.MorphedLegacyFollow="99b8c066-153f-4b64-8f31-f013999bd6e8",q.MorphedSingleImageDorm="7f4c0349-a4c2-471e-849e-418bc6f30b9a";q.MorphedSpineFollow="67a7bd11-9c7a-42e4-a18d-3ee7e70ca835",q.MountPreviewTool="cfa08d0c-26c4-4d0d-93c4-99a3908fa452",q.MoveFloor="c16c8fac-546e-4a8f-9699-96afe7d42bf2",q.MovingImageTween="76892994-f7dd-4bcf-a46d-b54dcd910245",q.MultiCurrencyWallet="c9624751-c2c9-482a-96b9-77ff25ac944a",q.MythicalEpicsCarousel="4a494381-5e03-41e0-ba43-007be9819e9c",q.NPCAcademyMerchant="da9f045e-f7d3-4b2d-9bce-c566869d013d",q.NPCAspenFrost="fd48539b-0b8e-4e4b-9e3e-ada16d096a68",q.NPCBenni="a6477340-d0ec-467f-8215-8233ac847d74",q.NPCBenniandBroccolina="84e11a0a-480f-41af-95be-dad7c5bf0298",q.NPCBossStatue="6605a0ab-355d-41bd-b8c7-52ee317591b8",q.NPCBroccolina="82a09006-0152-4f46-953e-92c747850df4",q.NPCEugene="43ecf99f-48bd-4e9b-b613-5eff88f8a6e6",q.NPCGale="3386158a-44c0-4d6e-b9a5-45f1669a6a38",q.NPCGnomeSpinner="5410643e-1f60-4fbe-9543-381f5845b87a",q.NPCGnomeStylist="9e3ad609-86f4-47e5-b88f-120ad9be8983",q.NPCGnomeWheeler="fd0edd4d-6f74-4c4c-87ca-e15749814858",q.NPCIndicator="982b5f6c-e362-46df-95c3-6405f0a99286",q.NPCNoot="1e3594ac-0daa-473a-ba58-00d9555b5b09",q.NPCTheoAddiwise="e59a37e5-242d-41de-b6bb-4857ea3770fd",q.NPCWizardBase="01697576-347d-46e1-a054-f4f32a5778f6",q.NavigationGuideHand="7ac0c322-6503-4a19-8d9d-2f31c0a98492",q.NewTownPopup="6026dfea-1840-4632-a262-e0fefbfb2d37",q.Nicknamer="c3ac7fb9-b56f-4f2e-ae20-da8fb9c552b8",q.NoShadowAnimatedSpineCreature="45da9634-1d20-4249-9c7e-397e5f3f3e70",q.NootBattleTip="3b21f27f-e737-4d30-b085-bd74777cacdc",q.NootSpeechTooltip="cb09ab46-f605-439e-84c8-26572f2207fa",q.Npc_imani_star="bcb070db-74e6-45a1-864c-544cf428b708",q.Npc_kandi_kart="70e51761-df90-4e60-be26-1dcac6b72b4b",q.Npc_kandi_korn="b4abfa7e-97d4-4d44-b342-75a6bc828896",q.Npc_milkyway="9a32bf0d-748b-4188-aead-75df2b9be79a",q.Npc_poppet="097e536f-b637-40b2-9138-71203b14e2f2",q.OTPCelebrationCoin="ffa021d4-135b-41b7-b044-75fa78558444",q.OTPCelebrationModal="3412d343-6304-4140-9e42-57a5035060c4",q.OpenPWAInstallMenu="e741c190-7589-4ab2-9a85-8668b3c4210a",q.OptionsMenu="da0068bc-3803-4b05-8bda-f76f96a91a8b",q.Orb_burst="c3a867b2-1947-46e2-a472-febcadd7bf5a",q.Orb_burst_2="2fe2168b-1e64-4a80-a175-45c0e32aa410",q.Orb_particles_fall="2c87b6a5-94df-49d0-99ee-c3b7f3d25334",q.Overlay_difficulty_expert="5ef74941-73f6-4083-9b13-97923cca6659",q.Overlay_difficulty_expert_particles="f5dff32e-b002-4b1c-9502-c4a2f7e120d4",q.Overlay_difficulty_hard="74f020ae-f283-4799-9b67-f6dcab484fb2",q.Overlay_difficulty_hard_particles="7edaa81c-30d0-4dbe-b824-d354d6022cc0",q.Overlay_moonlight="217578d0-5547-47ed-b9fe-5d6bc96cc977",q.OwnedPetCardInjectionConfigured="364911fa-c99f-407e-8af6-0157cacba222",q.OwnedPetCardInjectionConfiguredMergeRank="dd4156ac-d6ec-4500-846a-103052e4f971",q.PVPArenaGate="f5f8abfe-6766-4981-ad51-edc544561bf8",q.PVPArenaNPCArenaMaster="dd4dc09f-9d51-40b5-8846-6393951c2bdd",q.PVPArenaOutsideTrophyCase="da6bd42e-06e0-4dc5-b976-caf20800ba67",q.PVPArenaSignpost="34a7a6af-968e-460b-8f8e-802b9ba7440c",q.PVPArenaTrophyCase="b388ddef-c031-4e98-ae1c-e32975e7fb00",q.PVPArenaTrophyCount="c248c8b1-4fae-42ed-8ef5-800be0d43eb3",q.PWAEntryInitialization="a898481f-808d-48dd-91db-cb9441348489",q.PWAErrorPopup="505ae35e-457c-4dfb-a633-170572a4cdd7",q.PWAInstallMenuBase="2df094ca-b6bd-4ca1-aeb3-be207554ddba",q.PWAInstallMenuBaseSmall="757fd180-0ff6-45e1-97c2-aa98f96f555b",q.PWAInstallMenuNoIncentive="eb5cd5c8-25dd-4f7f-a72b-441a22e0f741",q.PaintBalloon="e93677d9-c599-40f5-a1e0-29f8e18703ff",q.PaperDialogInjectionConfigured="35687420-dd30-4411-89e1-20aaab8521fc",q.ParentAttach3="212a3c6e-0113-4c17-a647-f0362a5203c9",q.ParentAttachModal="07326396-e362-4272-989c-0f853701ab6f",q.ParentGoalParentAttachModal="a0afb3c5-2747-4fe1-a693-80f9a222fe1a",q.ParentGoalStatusDialogBase="4ad7fd94-17ac-42ca-80c9-a9b7da1422fb",q.ParentGoalStatusDialogComplete="edc6419f-02a7-4db8-be70-3c78dbc86546",q.ParentGoalStatusDialogInProgress="43f733cd-9f6e-4124-ad9f-c7494513b536",q.ParentGoalStatusDialogNoGoal="90cef2ce-9eb8-4466-8cd5-cc9234bf3d96",q.ParentGoalTracker="d9ac6f78-bb11-4a5e-976a-bd39faa63d2b",q.ParentSection="819901b9-7cf0-4541-b1fb-e873f8c2dc3b",q.ParentalConsentBanner="9dd203ff-6a15-4b0b-8d33-a049e2d40c81",q.ParentalConsentModal="9f59a705-5589-4573-a782-afde8c8164b0",q.Particle_astral_burst_1="929beba6-b5e0-4818-b9e7-1cd6869537f3",q.Particle_astral_burst_2="e09994aa-3f0f-4d92-8490-998a5cc833ee",q.Particle_astral_burst_3_rune="aba7824e-24f7-4365-bef2-b05c7813eb71",q.Particle_astral_burst_directional_1="9d20a3b5-f830-40cc-ba6b-4ff47af674fe",q.Particle_astral_burst_directional_2="155035d6-10a5-4ef3-8219-9581f5600bff",q.Particle_astral_burst_directional_3="141d33ff-dc17-43dc-9ddb-f5eb34b3cd83",q.Particle_astral_impact_dust_1="41e855bb-0ea2-4f0b-9637-38fb1974351a",q.Particle_astral_impact_dust_2="41b9c17d-e34c-4cb9-bb3b-2ed8986c8eea",q.Particle_astral_impact_dust_3="5c28487e-5f07-4572-84c4-40ea0c4bc962",q.Particle_bomb_fire_exit_test="bc8c5270-18b0-4839-8967-47988e190770",q.Particle_bubbles_rising="148ac653-174d-436c-9f6b-6a0b721514f3",q.Particle_confetti_moonlightfestival="0c97d8f3-1fe9-483c-9caa-da2cc6144fb6",q.Particle_fire_burst_directional_1="af207485-37cf-4b3e-8479-3abff7c103d5",q.Particle_fire_burst_directional_2="6b2a1288-3347-4717-937e-ac51b7fe06fa",q.Particle_fire_impact_dust_1="a8959c08-a826-4566-a12e-74da46542081",q.Particle_fog_pumpkinfest="f37d9e65-763d-4f96-ac86-17210c600b8c",q.Particle_ice_burst_directional_1="90ab2afa-eec7-495a-9d30-95dbeaaf5795",q.Particle_ice_burst_directional_2="d8fb76df-27f3-4912-9d96-984debdda0eb",q.Particle_ice_impact_dust_1="311586cc-250e-4eb4-8093-e025abc1eb18",q.Particle_icon_glow="b2c6dda3-24c9-4e26-888f-fdb816945f22",q.Particle_icon_sparkles="036d32c9-fbe9-4c2a-bf3c-67adb1801265",q.Particle_ink_explosion="766784c1-0181-4c4f-8c0c-07fc5216cafc",q.Particle_ink_idle="1a15a63e-2a9c-4372-81f9-ee23fae620d1",q.Particle_ink_idle_small="b4b6a781-5244-4882-a080-b6cf441a7c2a",q.Particle_lost_charge_stream="af2682ba-690e-42de-b431-992eeb38d59d",q.Particle_pet_to_store_A="103e2891-36b3-4b58-a2f4-4e115451d1a9",q.Particle_pet_to_store_B="5f8cb304-30db-486b-9a93-1ea71324215f",q.Particle_pet_to_store_C="ef314fb0-7b30-436f-9a1f-804553f22fe6",q.Particle_pet_to_store_D="a93de2a5-e926-4a80-80c5-662293c53849",q.Particle_physical_burst_directional_1="9b4f196a-6902-4318-a68e-e7a798fb5a5f",q.Particle_physical_burst_directional_2="7c878019-1af6-487d-8bbf-295a04137a15",q.Particle_physical_impact_dust_1="38e59f12-ff67-4999-922b-3bd0e3a77dc9",q.Particle_plant_burst_directional_1="7e8921b0-b9af-4ff5-b61e-9c1032c72e0c",q.Particle_plant_burst_directional_2="b441fb95-6ad7-4619-bb26-87b3d7eaccde",q.Particle_plant_impact_dust_1="b23e920e-baa4-401c-8473-ca582af4ecff",q.Particle_sand_rise="b5374eac-bbc7-4388-ac96-14af32ea107a",q.Particle_screen_dim="0b3a250b-7ba7-4d25-91a3-9d1980343a59",q.Particle_screen_dim_long="9cff7a2f-028b-4445-af96-2b1f2b3471f9",q.Particle_shadow_boom="41cff766-5076-4cc5-bfd4-f25eb4767bea",q.Particle_shadow_burst_directional_1="69ff659f-9768-45df-944b-ea0e16e60c74",q.Particle_shadow_burst_directional_2="ceb09c38-6ba0-4acf-b284-0f5393c969f6",q.Particle_shadow_impact_dust_1="8e0bfb35-6e75-479d-a60e-f0745e078b2e",q.Particle_shadow_trail="9438ea3b-f8b4-4048-9db3-090b4f9cd737",q.Particle_smoke_morphmarble="65255952-3ac5-4612-be23-e37e30ec7afb",q.Particle_smoke_smokestack="60a800de-a83a-4f6c-b19c-f35ba3feaa9e",q.Particle_smoke_white="c2327db8-1b44-409f-8387-c7633127c082",q.Particle_snow_1="eed660c1-3d30-479d-8003-e488e7209442",q.Particle_sparkle_trail_1="46bdef16-21b4-42c6-9625-f8857980651a",q.Particle_spotlight="b0edc171-e9af-4012-8b34-001c2118f994",q.Particle_storm_burst_directional_1="8adb36cb-6227-42fd-a22c-530fec3695a1",q.Particle_storm_burst_directional_2="6fd55f97-c86a-4608-907e-f226df4f4b35",q.Particle_storm_impact_dust_1="b5d79c7f-911b-4f9b-8651-17159f4d55c0",q.Particle_treasuretrack_trail_1="1b2b6d78-2d8c-466c-b138-a6acda67a3ef",q.Particle_water_burst_directional_1="c2520b98-8db7-4272-8f94-517bee0e2556",q.Particle_water_burst_directional_2="2b71ce7d-b7e7-4344-b225-fbffeb4c6d96",q.Particle_water_impact_dust_1="7b2a4845-d93d-431f-bf43-92cd3f6eb7b1",q.PathingStar="9518748a-13e3-4f2e-852b-4e42bd85ca02",q.PetAboutInfoCard="76bfd317-9e3d-4aaf-ac97-6feec08665a4",q.PetBookGearSlot="2d106c5e-e9be-4583-8a2f-f76ce406a55e",q.PetBookMenu="e4fa3c64-2bf3-482d-8d25-89c7c3b02c5a",q.PetBookTeamSelection="d21adf52-3dcb-4522-bf40-27d1492756a4",q.PetBook_PetCard="dd35869b-0d2b-42c8-abd7-bc4cdef2b59e",q.PetCaptureHighlightSmallTooltip="ac1a9380-65ed-4aaf-a305-ea77057df8b1",q.PetCardRarity="3b64692b-fc74-4572-9d8f-7ddb8a079bd2",q.PetCardRarityBackground="282d3611-3a24-419e-a26f-899e4547135c",q.PetCountRestrictionHelperContent="16a3cedd-79e7-499b-8cef-42cd144cb4d2",q.PetDetailsScreen="04ca63b1-d490-4440-8943-58d3d36ce258",q.PetDifficultyIndicatorIcon="fd1b8fba-3e56-4d55-9e73-229a0eb61a2f",q.PetEvolutionDisplay="4f7f09f0-0fb5-426b-b9c5-d127f0d91564",q.PetEvolutionLine="c7be8c8a-b01c-401e-a022-75e786473a6c",q.PetEvolutionMagicoinModal="0cc7d11e-eb16-4332-8810-10e05075f37d",q.PetEvolutionPanel="aad8dee1-2f6d-4a5c-9089-7a43f94b25af",q.PetEvolutionSequence="7149027e-4544-4c4d-bc36-cf4311018916",q.PetEvolutionWidget="4b06d0d6-3091-4c2a-afa2-f35828e63ba9",q.PetFocusContextualPanelContent="d8a01778-a189-44d3-bcdf-41c1ca70ad84",q.PetGearDescription="fdf102bb-e0ba-4960-9f93-ffe1e3ee734d",q.PetGearFtueOverlay="7a06d692-db44-48c5-84ed-e2970b03e1e8",q.PetGearItemCard="57394207-7650-4365-b68c-63f72f8b5308",q.PetGearTooltip="8192e149-fd81-4938-9d8d-f3c5ecd79245",q.PetGearWidget="f9f25c01-180f-4203-837b-11ff09b47fab",q.PetInfoLoreTab="a7aea094-4ed6-4280-ac89-1224df5601db",q.PetInfoScreenCard="33a1192b-a968-46c7-acb0-3806346b3800",q.PetInfoStat="dc7e4985-c6fe-4de5-8e24-e22ea376b0d4",q.PetInfoStatsTab="e932f227-df58-43ca-91cd-dab5f2081133",q.PetInfoTab="d0df30b9-8102-4da6-8090-6e6add1686a9",q.PetInfoWidget="7f9ce78e-7514-43bb-8757-c8d56c519604",q.PetInventoryScroll="fee6bb72-95f3-4665-8ad8-eec81141049b",q.PetLevelWidget="1519bc39-5f2d-464b-b5eb-a8610c78d3a4",q.PetMerge2Modal="01b373c1-e724-4a3d-bf07-04036bbc3ac9",q.PetMergeConsumedIngredient="f31191a8-d3d1-4903-b78a-ad0fcbfe5e55",q.PetMergeContextualPanelContent="44e974cf-2abc-4b1d-8a42-e3875a09e514",q.PetMergeFTUE="6f0f90b8-de17-4be6-89dc-1c47c7ea4fa8",q.PetMergeModal="5e53903f-6c5c-45ba-a35e-5b389d9e7e35",q.PetMergePetFanfare="4b24e560-8aa7-4101-a1b0-196111930f5a",q.PetMergeRestrictionHelperContent="204ff384-6360-4274-bcbb-86b0ea60acc4",q.PetMergeWidget="e66f6a25-046e-4f26-b001-f054a1c2829f",q.PetNameWidget="a4a7bbc8-ba1d-47f7-9133-6f6ebe24df8a",q.PetPlatformWidget="ba1d8c0c-b2c5-4d34-aa05-3470e02fdcd7",q.PetPostEvolutionCard="b9a0f728-7828-476a-8a56-ea12dedaf1b5",q.PetPreEvolutionCard="bab37c3f-8aec-41f7-9aaf-3d1af2444d26",q.PetProgressTabController="a58ac210-1436-439d-a342-8cc77c590d88",q.PetQuestInfo="b8f1822d-03b5-4810-bae3-26ba898324c1",q.PetRescueCard="f9fe1d73-b28a-46aa-8b46-8fe5117e94b4",q.PetRescueCardSequence="8bafaeb9-1983-41e6-9d27-b02c5f04852f",q.PetRescueExperiment="5f1fc64c-f981-461c-967d-de22ba1c1500",q.PetRescueStampSpineLocalized="7b87eebf-38b3-4807-b28a-f05d9feea67e",q.PetSelectionDrawer="7c992288-c7f1-4a22-a6e1-b820a6501b94",q.PetSlots_PurchaseModalSidecar="8cf594e3-618f-4c0c-8f7f-e6992b3f46c4",q.PetSpellWidgetCard="03ec51be-c419-417e-9121-dcece7d8c20b",q.PetSpellsWidget="68232e17-b553-4372-936b-325b8b79b5e8",q.PetStandView="11c2342c-ad09-4021-8d3f-04dbf4421ad8",q.PetStatsInfoCard="bb0e4fe9-0e05-42b9-a1c6-8661eb5af225",q.PetTamingTaskProgressCard="a49b5e5a-be60-4e4d-bd7d-d17997631f50",q.PetTamingTaskProgressCardV2="f29e0afa-c262-4cd6-b47e-875597b55fb8",q.PetTamingTaskStatus="c73d11f1-e4b7-41d6-bf14-a7b77d9c479d",q.PetTamingView="af15c3bd-ba60-44ff-a3a6-b92fd7809ad6",q.PetTasksTab="be90c9bf-2ec5-4056-93a1-e110fb943698",q.PetTasksTabV2="7de8c6e8-3ee0-4536-9bc3-1de0eee8f9bf",q.PetTeamCard="337e778d-d9b4-4fb7-9105-0a7dd73c7bae",q.PetXPBoostFTUEPopup="ff0b8d68-96a0-43f1-ae16-43d04f32bcf3",q.Pet_Merge_FTUE_Popup="23c2e24e-9bd6-4d0a-a14f-f487c2ddc60f",q.Pets_AddPetSlotsWithoutConversion="cc7da06f-4329-4e52-a48f-71211e4a6fe0",q.Pets_Background="deaf21f9-e416-437b-a348-38cf09bf8023",q.Pets_BackgroundPetBook="366bbcde-0f91-4f9b-ba36-11537a853b13",q.Pets_BackgroundYourTeam="1a816b0b-02b3-47ce-9d20-9a7728707697",q.Pets_ButtonTooltipOwnedPanel="89bc34ad-a329-4d95-9d0a-81345dd3842b",q.Pets_ButtonTooltipTeamPanel="dece6029-923b-43a5-b114-dce4e3c77c93",q.Pets_CarouselCreaturePreview="510f2023-d98b-4671-be05-143e5accc46a",q.Pets_CustomDialogFooter="c50c7501-139f-4d4d-a18c-8d07dfd8fa50",q.Pets_EmptySlotCard="e636f7cb-6684-445b-aa66-5965e1fc7b34",q.Pets_EmptyTeamCard="fab69025-5aaa-4f86-b4c4-eea77d7b3734",q.Pets_FilledTeamCard="7b25559d-d6f2-4a16-9d0c-24d2b9fe1118",q.Pets_LeftSideYourPetPanel="ad005f96-ace1-427f-b7eb-a84d0fe6264a",q.Pets_MenuHeader="603e642d-43f7-435d-adf8-111edc412559",q.Pets_OwnedPetCard="83b0a5fd-afac-4336-b35c-d56592e8b7c6",q.Pets_OwnedPetCardwithmergerank="a0b0695d-29cb-4d56-8ce5-f9c7de728dba",q.Pets_OwnedPetsScrollviewPanel="6a8bfe5b-80a8-4f8f-96ba-8355ca13383b",q.Pets_OwnedPetsScrollviewPanel_PetSlotsLayoutVariant="4f1c2d2e-6636-4d3f-a201-d011de3b8a41",q.Pets_PetBookCard="48479669-ed5a-4848-b260-343ab900084d",q.Pets_PetBookGridandUI="fd5f0b3c-4985-4063-8578-592845359f4e",q.Pets_PetBookMenu="d43edf90-57c6-44c0-b4df-01ea8fc2921b",q.Pets_PetEvolutionInfoPanel="5a328e09-a4ef-4738-9aa9-1cb8d760826d",q.Pets_PetInfoMenu="08027796-5d46-4e0a-b0aa-c428f0cf56f9",q.Pets_PurchaseSlotsButtonAssembly="f2182f11-312f-44c9-9eea-83604fbd43f2",q.Pets_RevampButtonTooltipOwnedPanel="6f13cc8b-e3e2-446d-ad39-4e7656ef66a5",q.Pets_RevampButtonTooltipTeamPanel="8ed6b5ab-9a1b-433c-a23b-047f7e65ba3a",q.Pets_RightSideStatsPanel="02b7bd8b-fea0-467c-aa98-5ab25670607c",q.Pets_RightSideYourPetPanel="e905bf3a-c9f6-49e7-9f61-0bd2169c0268",q.Pets_SlotsOwned="e6152207-b552-4e73-895c-f037998a0045",q.Pets_TeamPanel="4b2943f7-f0a7-4a6b-a86a-18b49719e0c2",q.Pets_TeamSwapUI="3bdc600b-52e8-4267-b091-6c86ad4fd630",q.Pets_YourPetGearMenu="ba9d7b40-eeea-4800-98dd-0b9723caa629",q.Pets_YourPetMenu="bf29d664-f591-431c-af02-dfa8ec0c6b57",q.Pets_YourPetMenuHeader="0022e374-367c-4e89-a227-bafb355f2290",q.Pets_YourTeamMenu="ad167b80-ec13-4619-95fe-198a3dcf76c5",q.Pets_ZoneUI="101dab12-99de-4b54-badc-91fc37492b13",q.Pets_ZoneUIButton="46e7832e-5a9e-4607-a1e7-68b966859a61",q.Pets_ZoneUIGridElement="72888420-674b-4888-a0d6-a34f92a5a17e",q.PetwithNameandWeakness="ef8552f1-7f82-4657-95a5-2c33ce3dcab5",q.PippetNPCLegacyMaps="1ca6e8d0-356f-404b-8d0e-03f368a3de63",q.PippetQuestEncounterCutscene="6b7b227a-3d32-48ec-9787-2658a8ebc793",q.PlayerHubMenu="42704dc2-180c-4df6-98a6-057a6438f03d",q.PlayerLoginInfo="717340e4-7bf0-4812-b2bd-3e1ca2ebeaad",q.PlayerSummary="7885b29f-39fc-4577-8145-63dfbceff6e5",q.PlayerTeamCard="a9de0f52-d320-4b9e-b072-a2c7eafb573d",q.PlayerwithNameandWeakness="6b920814-f927-4654-a614-2073175738ce",q.PlayerwithNameandWeaknessandStars="d5ceca5e-d20f-4d54-8c6e-1eacc22bf536",q.PopupPriorityHandler="fe121dac-1cfb-4918-8dc7-04db1a562ce4",q.PopupText="a53be86a-925b-452d-9f99-637095bcb933",q.Portal1ShopNPC="bea5701b-7e9a-459f-8ca6-cf85309d4f07",q.Portal2ShopNPC="c129011b-6b3c-4856-b064-daeac99d2e5c",q.Portal3ShopNPC="c677ecb3-57d2-4cd0-9cf5-371bbb7a40d7",q.PostBattleFlowBase="b3b44488-c061-4cd9-b6e1-47cae010a1f5",q.PostBattleMembershipVideoMenu="98caf7c9-e241-4035-8036-854b79a103ec",q.PostLossFlowScreen="db0e96dd-9ff3-4a7b-a9e6-8995c4a1c916",q.PostLossFlowTeamPetContainer="ef04440a-2a2d-40b6-96ee-a12df115fa37",q.Post_fx_particles="58ce1f99-df0a-4506-b0c7-25413e90b270",q.PrebattlePopup="8015128c-de82-426d-bbbc-fa97c4d94bc3",q.PrefabAdTest="f7e5db39-39fb-4bea-8b2a-1515077d59d6",q.PrizeIconDailyLoginCalendar="b3d3d083-910a-4564-a8cb-875381b4ef4e",q.ProgressBanner="5426b858-2196-4ce4-bbf0-fa5adcd626fd",q.ProgressBar="026d935c-bcf3-4a4d-85fa-c757e464b020",q.ProgressMenuBase="77a246b8-5f31-49c0-bc5a-ceccb805e439",q.ProgressStep="d2589ef6-1125-4df6-8d57-75ea4a5ac8d8",q.ProgressTrack="6f13a3f9-7119-49ab-9749-400eefa0dfa4",q.Pumpki_poof="503b6560-6454-44ce-897f-fb674c4de2a7",q.Pumpkinfest2025CutsceneCrowd="3b1d641b-eca5-4819-baf6-330e73062d73",q.Pumpkinfest2025IntroCutscene="c60ca394-8213-484b-b123-897d5337ebf0",q.Pumpkinfest2025Quest1Cutscene="72abcf7b-6be2-4348-85f4-62a9e322aa85",q.Pumpkinfest2025Quest2Cutscene="92df56fb-2fa2-4ad2-81e3-92c821373ec2",q.Pumpkinfest2025Quest3Cutscene="862f25d9-0f49-44e8-a9e0-0a0a4c6f6b63",q.Pumpkinfest2025Quest4Cutscene="6d4bb4e1-1945-4fcf-a919-ec878eeed7c4",q.PumpkinfestBossStatue="be66f894-0a3c-4653-af4a-3d6a79aee2da",q.PuppetMasterBattleEnvironmentFX="ea9544ac-0823-4dde-b14e-d699baad872d",q.PuppetMastersDragonOrb="9b9e0dfa-84b2-4a3a-8317-92e23d6489b1",q.PuppetmasterNPCLegacyMaps="429138e3-47ff-4910-bffc-0a229529cd10",q.PushNotificationEntry="ddedf67f-0469-4b11-8f66-3828490f114f",q.PushNotificationPermission="fab56b18-1d84-42e2-8c8d-5aa69726d7ef",q.QRCode="fcea2758-df48-49c2-84cd-9d90cea18234",q.QueenGoo_liaNPC="ec3f54f4-46de-4907-aea0-7186106c5666",q.QuestGuideBanner="b1065462-2b72-4c20-b4ed-31972907c3ce",q.QuickRenovationComponent="be607cec-dcbd-4d1c-8f61-40ff7286279f",q.Rainbowworks="af62580e-21e5-492c-95fd-1f9269b8dce4",q.RandomPlayerAppearanceLegacy="b6fa975a-3c68-4fbd-8dbf-7b310fbb0ea5",q.RarityBanner="8c79234d-dd1c-4f00-85a7-e051ab20a0a9",q.RealLegacyFollow="34b23e5f-0dff-43b8-bfff-90d1bf005095",q.RedMediumButtonTextAndIconRight_RectTransform="81a31dc9-e710-409f-abe0-575f12761e94",q.RegistrationCell="2e7d24a5-a7aa-45b5-9269-8cd3f972f4b4",q.RegistrationChooseCountry="48eb9712-a0ad-4a6d-93f4-f0c9c7dbbd23",q.RegistrationChooseGrade="5b26adea-cd56-478d-b787-f979e78cc136",q.RegistrationChooseName="fd4a87c7-bd55-4dd1-9811-7be2859b9e20",q.RegistrationChoosePassword="1a445a03-4696-4255-863b-ce63cbb0753c",q.RegistrationChooseSub="71356bbf-7525-4350-be62-6a28d6efce72",q.RegistrationClassCode="f8fad4de-39bd-4ae8-8e72-e0a9b1ee7c06",q.RegistrationCountryButton="e0eb302d-d4cf-4162-a1a8-fa14b2e1ad01",q.RegistrationGradeButton="6dfe4559-a044-40e8-850b-8b2496516e27",q.RegistrationHeader="9282f708-e29e-4427-b9b6-450b710542ad",q.RegistrationHomeorSchool="6ea9f2e8-3440-4c31-a895-d4d00b218d5a",q.RegistrationScrollBar="f6dbd550-f849-4254-8c96-490327804add",q.RegistrationScrollView="c3f4f422-e0a6-48ed-92ae-5b98281ee2bd",q.RegistrationSection="7c530624-38bd-4e98-b6a9-4023db5660bf",q.RegistrationSignupSchool="521eb027-0b88-479c-aa01-70f6b9598d70",q.RegistrationSuccess="9349868c-3a29-47fe-8e77-ee003c8252e5",q.RemoteDungeonPlayer="534113f9-fd78-4330-96cb-60ae8bd5e6bf",q.RemotePlayer="ec88031e-0010-45b9-93d9-3696d7ace879",q.RepeatingUnidirectionalBackground="e5726196-a9be-4175-a304-fcb1e431f44d",q.ReportPlayerPopup="ea6aaff6-8dbc-4a64-8e11-819a603da40a",q.RerollEnemiesPanel="2ae9f1bc-5129-4802-aad8-061b80159e5c",q.RescuablePet="aada0a1d-3366-444a-9fac-4bb3cb58a383",q.RescueAvailableSequence="f2718256-8357-4e2c-bd1b-345dc18488b9",q.RescuePet="924f3c70-cb9b-4c54-bdf9-e327e30276db",q.RescuePetPrompt="63bc22d8-bce0-4e82-824d-5437f51107ef",q.RescueScreen="0ed56e71-2074-41d9-bbca-e428ec8167a2",q.RescueTooltip="bd5ab2ae-2a32-476b-a6b4-10d62d42f41b",q.Rescue_AtHardCapTooltip="97ab9a2f-e2aa-4b85-9b87-1f418254f247",q.ResizableTooltip_RectTransform="f046b64b-037e-4739-b9f5-577d1a784cfa",q.RestartDungeon="dfdd5ce8-8445-43a0-aaf0-3ab6d5b7d8d1",q.RestrictionHelperBaseScreen="72545f44-2abc-4651-a9fe-d053fb822841",q.ResultsSkipInteractable="9df8feaf-d5fa-4eb1-b5fb-9e8d49104c19",q.RevampActionMenu="8648ce6d-d05f-405b-940b-9bfece7cafe2",q.RevampActionMenuIcon="0b4a1bb5-2231-4428-8e38-9a41951cffe7",q.RevampBattleLowHealthBorder="4b28c28b-d4ae-46e5-828f-92dc3963dc04",q.RevampBattleMultiTargetObject="96262dae-b10b-4440-ad5f-00a6d5898cd9",q.RevampBattleNewIndicator="48992009-9050-443a-a43b-976e54620793",q.RevampBattleScene="edff9ba9-cd7b-4369-8e30-455c3cae40a6",q.RevampBattleTargetContainer="08d84cb1-94fd-4447-9e8f-f4ed4bac3bc3",q.RevampBattleTargetObject="83386d1e-c184-419b-bc24-26d3522fac10",q.RevampBattleUnitHome="8e03b300-95f4-4805-ad6b-2d2a38bee819",q.RevampBattleUnitOpponent="2c161c32-80b9-4cc5-b2dd-aefc60e17e24",q.RevampSpellCard="c8071de7-491a-46ea-86c3-3954f0f745be",q.RevampSpellHitInfo="81110ebb-a918-4b7c-80ca-295dedd5c096",q.RevampSpellTooltip="eeafa512-3f71-4922-b3a7-13e36f10b41f",q.RevampTitanContainer="a30c8100-6fef-414c-86ec-25946d7432a7",q.RevampTutorialBattleScene="7e11dc11-a480-4b0e-bbfd-56bb7f7d172f",q.RevampTutorialInputBlockingOverlay="d7e01b6a-03b3-4c96-8d92-d1ee0ef2f6df",q.RevampTutorialNootDialogue="60cbd447-d908-42e4-9194-abd8fa123bec",q.RewardCard="a6a9c6a7-5b3e-4a17-bd96-30453699edd5",q.RewardsDisplay="fb31030d-fb0e-4ea1-a9cf-77bad3c8adb5",q.RewardsFirstBattlePassMenuBar="506cd023-ae7f-40a4-8ad6-84da90386c22",q.RideableMinecart="7a3692c0-8cef-4962-a759-bcdd049a3184",q.RiftKeyInventory="aa4b5512-9f0c-4057-9ef8-aad7bcf5d5f4",q.RiftRunMenuBackground="ff749b3b-f4ab-4933-91c3-309fe089be8a",q.RiftRunModifierCard="30f5989c-4441-47b9-b9e0-4c0619ec984f",q.RiftRunModifierIcon_WithFlourish="d4fca01e-6cbb-45b8-9d30-ba4e16772268",q.RiftRunModifierPopup="857b1fcf-ab03-4f6f-afa7-b89880b6d186",q.RiftRunOpponentCard="ea4bcbb4-dd0a-4855-998e-a3366fb04789",q.RiftRunOpponentSelection="ca4b7dce-dcb6-4987-9231-75e8b7b9be3f",q.RiftRunPetTeam="fbdbb730-661a-4241-a23e-1c6a1e269659",q.RiftRunPortal="b62a4821-d886-4db2-a0f7-596d5950dd0a",q.RiftRunReusePetModal="400fe33b-cef9-4336-9d7e-c82e3b847d15",q.RiftRunRiftCard="0a2fa984-14fd-4fde-930e-c5e45bad2deb",q.RiftRunTeamSelection="6dfac5f9-53db-4780-97cd-80d33aa13251",q.RiftsCycleModal="76c596cb-953c-4f77-91ff-b790648bd135",q.RiftsRestrictionBadge="b76e8681-cb83-4474-87ce-1ac04c0e4d6b",q.RiftsSelectionMenu="e82b930e-59c6-4f91-ace6-86c8836238b5",q.RightSideHUDManager="b5240209-033e-4227-a4d7-fa95a3ec3330",q.RooftopMastery="60197ca4-edac-4623-a47c-0d949ddff287",q.RoomInfoStoreSideBar="a4ce522d-ec9a-4f59-9875-15041ffdb810",q.RulesToBattleWidget="305f52a5-493c-4578-96fb-791b09fcc64b",q.Save_trigger="4d8a543d-f259-4399-8bd9-95984910a158",q.ScalablePet="7b044fbe-f1f8-4d2f-a2cc-6c1d957deac8",q.SceneBackgroundCarousel="0bb538b5-8d0a-4a31-b251-eee3cc0c7285",q.ScreenDailyLoginCalendar="854400e1-7a6d-4f14-983d-a7b620f7fe51",q.ScreenSizeSection="6181e9e3-bd5d-4e4c-827a-714e370e960e",q.ScrollView="c6d00799-e5cd-49bb-bfb3-91bfbe7a47ef",q.ScrollViewDailyLoginCalendar="00c3f0ad-fc1c-49d1-a35a-9855007440ba",q.SecondaryHudBar="a8c6218f-a6cd-46b6-9e8b-1bbfed20dc9a",q.SecureBattleUnit="811ff008-78cc-4ed3-bc80-3275890ff601",q.SecureBattleWaitingMessage="c32fbece-26d7-43b7-bcad-698cd540b465",q.SegmentedOfferContextualPanel="53eb5321-c0ed-43aa-988c-2a0881a2b183",q.SegmentedOffersAccessPoint="e6420321-b325-4cc2-8998-69c383296406",q.SegmentedOffersCloseAnimation="c50ec24c-76a2-46cb-b013-2d2f4ea44482",q.SegmentedOffersModal="db998b22-8437-47bd-af92-e18d5afbdf5b",q.SegmentedOffersPanel="4e55d813-03ed-45da-91f6-a93cc35481dc",q.SelenaNPC="fb4c82a9-cd41-4dd2-8530-8e990c87f225",q.SettingSlider="49dae7be-a679-452f-b7d1-ce515f50bb8a",q.SettingsMenu="82f4f89c-70b8-4186-973a-be80bb937b0c",q.Shadowball="4c5c32b4-80dc-4bc5-9062-1bb717b8943a",q.Shadowworks="50b27e96-5ff9-4640-9cc9-1742fe0a1592",q.ShipwreckMerchantNPC="c13b5f5c-7fc2-462f-b8a2-86ca9a9b2384",q.ShipwreckShoreA1="2fbda416-04f6-4a0d-9282-ab0871eefc10",q.ShipwreckShoreA1Hard="1f7f577c-0eb8-44f4-90ac-e32331fd9f18",q.ShipwreckShoreA2="b88bb99a-547b-4c8e-aa8d-ad1c13b93ea1",q.ShipwreckShoreA2Hard="1452def4-0130-4057-928c-4b7dce192f62",q.ShipwreckShoreA3="26fc9f18-0577-4df2-bbad-49ff5d330955",q.ShipwreckShoreA3Hard="1e419b38-254a-4529-a9de-962282a807f2",q.ShipwreckShoreA4="deb7b3f8-4b82-4df0-8a3f-5f21a2178aa1",q.ShipwreckShoreA4Hard="80de1fce-ade5-452f-bcc3-fbc4522891c2",q.ShipwreckShoreA5="c965a714-8690-4ea3-b821-627f7ae22d09",q.ShipwreckShoreA5Hard="7669445c-370c-4920-b3b5-bfacfaac01c5",q.ShipwreckShoreA7="9f7b00e9-8c3c-41d8-bafb-a9f86e95839d",q.ShipwreckShoreA7Hard="4c38b6b1-63ef-442d-b035-02c3bbaa178b",q.ShipwreckShoreB10="e742ef39-c26b-4be1-8c6b-9fb0bb3e398a",q.ShipwreckShoreB10Hard="66a0d9de-9885-4072-9d6d-be30563c9c97",q.ShipwreckShoreB11="bd674223-8650-4b78-88aa-b0946660f689",q.ShipwreckShoreB11Hard="380bdf7a-9db0-4975-a54b-e26235f294c4",q.ShipwreckShoreB12="ff7acbec-9135-49cc-a0b3-164cace439f4",q.ShipwreckShoreB12Hard="040fa585-5325-4300-bba6-5f11ed10c530",q.ShipwreckShoreB13="ed8a33f1-40a4-4aac-a7f1-0f16d899669d",q.ShipwreckShoreB13Hard="4026f96a-9a34-4453-9500-bb03cbdf757a",q.ShipwreckShoreB2="83d8bcab-b3a8-449f-9b2a-a32468e37aef",q.ShipwreckShoreB2Hard="143e0111-86ba-4f29-b379-db7e537ac6ba",q.ShipwreckShoreB4="d895187a-0c84-44f8-8610-cb2272a3eb26",q.ShipwreckShoreB4Hard="b5dc4108-77b3-4064-9b54-4522930a57ce",q.ShipwreckShoreB5="cb16738c-3625-4955-b81d-054aff8d714e",q.ShipwreckShoreB5Hard="38e6f403-2f6f-45a2-b85a-b82ff3a09a9e",q.ShipwreckShoreB6="f3a5caa9-fc27-4c71-b088-9565b3819b08",q.ShipwreckShoreB6Hard="d970e1fd-6040-4664-be9e-5eabee9efef4",q.ShipwreckShoreB7="23cb5018-7989-4146-a64b-07260540f25a",q.ShipwreckShoreB7Hard="765f65fa-3bf4-4b63-81c0-ecde1c919c79",q.ShipwreckShoreB8="fb605e83-87c3-4e0f-bb1c-9d9674af248c",q.ShipwreckShoreB8Hard="88a2a391-93ff-4184-a122-2a3fd969b264",q.ShipwreckShoreC10="9d92fbce-33a2-47c7-8732-17e966a4e7e4",q.ShipwreckShoreC10Hard="e5107d4e-1bf7-4502-a830-d9c39cd33b35",q.ShipwreckShoreC11="4d9be4ea-4d5d-49d9-8a02-e690e37e301b",q.ShipwreckShoreC11Hard="349d3e9a-3580-4c48-88cf-1b72c04eaad3",q.ShipwreckShoreC12="d880ca04-841f-478e-aacb-b5ae997b5625",q.ShipwreckShoreC12Hard="77102aa1-6dd9-46d4-be44-d1b9b19708e8",q.ShipwreckShoreC6="94b7cd79-e587-444a-bec2-39c09f8787a6",q.ShipwreckShoreC6Hard="12eae675-01ed-477d-badc-25e096aba256",q.ShipwreckShoreC7="c7800785-4aa6-41cf-bdda-89d1ce309216",q.ShipwreckShoreC7Hard="4dc5e1b8-d864-4308-8760-7294e61c7be3",q.ShipwreckShoreC8="a757576c-1c34-48cb-b3a6-b465712eabe7",q.ShipwreckShoreC8Hard="38dfec5a-5e57-4870-ba1c-deb9d0ae955c",q.ShipwreckShoreC9="945d4a06-bcfa-494a-9237-ab4ae11d1d86",q.ShipwreckShoreC9Hard="0c225e23-b3d8-412b-9969-abeed54a9855",q.ShipwreckWalkableScreen="4641aade-2d84-4df9-bd9a-31ab328004fb",q.ShiverchillA10="de3f5fb2-d53f-4e38-ac0e-4a61eaf7e686",q.ShiverchillA10Hard="1c039bad-45b9-4126-9c24-f51ca8d7bb9c",q.ShiverchillA11="ef30a0d1-38d7-4597-b231-5cf195231ed0",q.ShiverchillA11Hard="e86f41e6-fbac-4126-83f7-31ec6b999c1d",q.ShiverchillA2="43994993-a816-4539-b40b-ad6158806d94",q.ShiverchillA2Hard="93ba6dcb-8e51-4031-b962-99196111fbee",q.ShiverchillA3="5611fea1-4579-458d-aa96-0224f4fa78c6",q.ShiverchillA3Hard="0fe0bfa3-4df1-49d8-8b59-d5b9902f820a",q.ShiverchillA4="b01e0250-9797-4482-bd15-3d87d1c5ddfa",q.ShiverchillA4Hard="e56b2904-94da-42a8-a7c6-c8912c7c469d",q.ShiverchillA5="ca9824b2-373a-42a0-9842-2ba45db8bb9a",q.ShiverchillA5Hard="197c21da-ccf0-4f08-abc7-7527bda05b87",q.ShiverchillA6="08365893-0077-4329-b67c-86665d44b155",q.ShiverchillA6Hard="ed93e641-fd09-4111-9a6a-6aa09a2ef55c",q.ShiverchillA7="97855079-10c2-4622-bc83-3cc553ec8dd5",q.ShiverchillA7Hard="e54929bc-b538-48a1-8e9a-5b21677a81fe",q.ShiverchillA9="5b3f2fa1-7315-4295-84f8-463ad3616cfc",q.ShiverchillA9Hard="261f3fb0-c231-4dc8-9ed1-406ef7471eab",q.ShiverchillB1="83e03166-d998-4303-82bd-733f72288ece",q.ShiverchillB10="f17696c9-8384-4a32-8c45-ccb1522dba52",q.ShiverchillB10Hard="dcdf07e4-4dc5-41ab-a241-d481bf87bfc9",q.ShiverchillB1Hard="a5322202-1c60-4cf7-bf0a-c33bd885fab5",q.ShiverchillB2="76e01d03-0271-4ae3-96d6-598c0d32f756",q.ShiverchillB2Hard="2074ba4c-7253-4c53-b15f-9b428f4c26fb",q.ShiverchillB3="d469e9fa-4e16-4692-9415-6f3fc699b66d",q.ShiverchillB3Hard="f132ad5c-54d5-4a77-859e-461f9e329db8",q.ShiverchillB6="4bc577a6-c951-410c-b2c0-a4fb1f247e6a",q.ShiverchillB6Hard="a4975e10-da8c-4836-9d2e-dbd6832faa3b",q.ShiverchillB7="6f8ef663-f5fc-4af5-987b-275ed305962b",q.ShiverchillB7Hard="5dc17fa3-bc41-4333-8dcd-7129f6b43a41",q.ShiverchillB8="dd168142-b794-430f-b92e-909be6b8a7ee",q.ShiverchillB8Hard="637486a7-6a6c-429c-a846-dd1d39265803",q.ShiverchillB9="b38e18f2-cab1-4a5b-be4e-842140fd472a",q.ShiverchillB9Hard="02eab0cb-3a80-40df-aead-e69b41e61bc9",q.ShiverchillFurnace="d7883806-8dc6-44b7-b4b0-94753d4f5555",q.ShiverchillMerchantNPC="ff41d02a-254c-45c6-bf31-e502146d750e",q.ShiverchillMinerNPC="9f78d5f0-99e8-402d-bc71-c10a12177c2e",q.ShiverchillWalkableScreen="ed548110-12bc-49b6-b82c-3de29ae4a199",q.ShopButton="7dbf8994-d05e-43db-a3c3-f71d4f70d175",q.SimpleCountdownTimer="19b7279f-c2d4-411c-9cb3-34d8a97b4855",q.SimplePetCard_NoName="f1ebb75c-00b8-4908-87e7-923434d08769",q.SkywatchA0="16587a3b-5080-48f5-bc49-195b3cdc8cd1",q.SkywatchA0Hard="5b3b2818-65fa-4dca-b4eb-594ad5e3addd",q.SkywatchA1="3b31e13f-a691-456f-8e33-30881bbe87b9",q.SkywatchA1Hard="3bf56ec2-465d-4ba4-9e87-a2bd9e5cdfa0",q.SkywatchB1="d762a8c4-21cb-40e7-ba5f-d79eb2fdbc48",q.SkywatchB1Hard="6c7dc959-4726-409e-a0dd-756b3ff3296d",q.SkywatchB2="eefb46b5-d85b-4716-bbdd-ded12625ca8b",q.SkywatchB2Hard="275cb99f-53a8-44f6-b3d0-905ecf1951de",q.SkywatchB3="495bcd45-3175-4f17-8418-71169c1a9d5f",q.SkywatchB3Hard="4de74f84-038d-4d66-8f8b-eb73d89414f8",q.SkywatchC1="dda0b304-a412-4d67-a8fa-0989f3318cc5",q.SkywatchC1Hard="a284d709-ddc1-4bcc-bab3-af97745721dc",q.SkywatchC2="edd6c271-2582-4099-9499-beedc4873168",q.SkywatchC2Hard="2e212cb1-92d4-4e91-8eec-28223fa521f4",q.SkywatchC3="05d79784-4a06-4d9b-aaeb-6c14ed6bb78f",q.SkywatchC3Hard="31a9fe12-eb1c-4fd1-9e48-e41a4869f45d",q.SkywatchC4="bb263563-81c0-4f7f-868b-cc34cc926329",q.SkywatchC4Hard="3a98ca0a-c947-49e3-859e-0a5361c29a2d",q.SkywatchCloudBoss="915a095c-0fb0-432d-a3a4-aa25b6fae2cd",q.SkywatchCloudMiniboss="a71994c5-fc05-4872-aefd-ead47e04626e",q.SkywatchD1="e7b52256-a265-4a5c-b550-7648f00ad77b",q.SkywatchD1Hard="e294ee7e-4b2d-42b3-9b34-520bfe05120d",q.SkywatchD2="24542690-a364-453c-9679-21199a81dafb",q.SkywatchD2Hard="1dd115d3-c1fb-4b9f-b956-3dea3ca11154",q.SkywatchD3="29ccedcd-9358-4e3b-9576-70b79280bf93",q.SkywatchD3Hard="033e3fd5-3fce-4986-ad1c-7bb5669d3a56",q.SkywatchE1="8c774fd3-202a-4736-b7aa-ae8e4867671a",q.SkywatchE1Hard="b4c3d186-dd2e-4345-9952-a55ab55684e9",q.SkywatchE2="b072e1c2-7b43-4e29-b51f-4ec0fdc1ff33",q.SkywatchE2Hard="c5347af2-1a7d-4d7b-b803-189f35ae069f",q.SkywatchE3="d9b98e4f-8d70-43b0-b358-89e3a18859e4",q.SkywatchE3Hard="e36914a5-05d8-434a-983d-d0df13ae587d",q.SkywatchE4="7d62be40-1c60-4703-bc56-b8768070012f",q.SkywatchE4Hard="a372d76a-9959-47bf-8eb5-49f29f101316",q.SkywatchE5="6c7eb89d-4055-4dde-b8de-35566e9faad8",q.SkywatchE5Hard="a594f9df-b1b2-4655-8907-a6d89101d305",q.SkywatchElevatorDoors="1dd04539-f5fd-4745-9c96-b433ca099fc7",q.SkywatchHardQ2_1Cutscene="282a981f-4572-4c53-950a-fa125dea48c5",q.SkywatchHardQ2_2ThiefChaseMiniScene="9a71a58e-f7be-43f5-a33b-11f665570678",q.SkywatchHardQ2_3ThiefChaseMiniScene="73b6ccc9-4f3a-4f6a-8591-fa8d98f899ee",q.SkywatchHardQ2_4ThiefChaseFinalScene="4756bf96-de9e-488f-871b-e5dfc05c2222",q.SkywatchMerchantNPC="6908883b-c608-4f11-b59e-fcd7c1489cd8",q.SkywatchQ11Battle="b5008efe-ad58-4650-a506-a020adf6da44",q.SkywatchQ11HardBattle="5c0bc813-3353-4a23-bb19-c1bdc77e7b47",q.SkywatchQ13Battle="579d4f5e-bba1-4ea3-ad1b-f8ba95027e43",q.SkywatchQ13BattleHard="96db842e-69e2-437e-be3d-f260b400bef9",q.SkywatchQ2_1Cutscene="3b1a23f1-b7a1-4182-8cd8-62a858d68462",q.SkywatchQ2_2ThiefChaseMiniScene="e468f825-b91d-43d0-8111-e5deb6b299da",q.SkywatchQ2_3ThiefChaseMiniScene="731bbe35-f5aa-4e1c-a18a-955a1982725f",q.SkywatchQ2_4ThiefChaseFinalScene="477c3a7c-329c-4705-bbea-c4be4879fe4b",q.SkywatchQ4CloudVinesCutscene="35ae4d34-344e-434a-a7e9-344e9d28c28a",q.SkywatchRightVerticalTrolley="f0df1742-1a1a-4a4c-9437-5385e3cac173",q.SkywatchTrolley="a805e489-8e4e-4b60-beac-f434bd915218",q.SkywatchWalkableScreen="3c90207b-f8dd-4111-8b5b-a20b707fea69",q.SlurpyNPC="e1610a1d-e9fb-40d7-8cc7-b81c8da73b71",q.SmallWarningMessage="34767edb-4b03-48c6-b2eb-c150132d4b97",q.SmokeCloud="6658ac4f-8942-4f2a-9694-49a5942f0e9a",q.SmokeCloudLarge="e1a4a3dc-4a83-4db1-8120-a8f1e4e0a71d",q.Snowball="e604ea87-d9c3-4fd2-b572-bdbaf660949a",q.SocialMenuHeader="03984d40-a468-4930-91eb-0efb9e5aee0b",q.SocialMenuHeaderButton="bac9c286-b493-4349-8d45-3173bbaaca1f",q.SpawnPoint="8f92d9e7-968b-457a-9320-8cf51e79fa91",q.SpawnableTooltip_RectTransform="7837ebb1-1256-4a35-a32c-60eaf9e2f922",q.SpeechBubble="22c5392d-7342-40aa-a40e-2ed4d599fc20",q.SpellContainer="e939ac35-f063-4f97-817e-dd66b4c8a77d",q.SpellLearnedPopupMessage="e5a682ca-0da2-42ef-aa46-2a55bf1ac9c2",q.SpellStatusEffectInfo="7456a914-b457-47e2-9bfd-4c600a1930d6",q.SpellsWidget="46c8ba4d-8e40-4bfa-a999-6da0d33b52b2",q.SpineFollow="1e5c1c74-9b7e-4484-b118-d4023d624ac2",q.SpinePet="606e07d8-e4dc-46fe-bd18-20fd59e29dc1",q.SpinePetFollow="e776d8a6-115a-46fa-b2e8-00ce0241d654",q.SpinePetLegacyTransform="9c4a6d1e-1b25-4ca4-abd3-f46ee924b73b",q.SpinePet_Injectable="47a739a0-8d7c-42c2-82ad-668e0eea3859",q.SpinePreviewTool="68be7fa5-cfc5-4ef0-90b4-465c05372e56",q.SpringfestGrottoA3="197985bd-2674-4212-9bd3-ee7407b68361",q.SpringfestGrottoA9="facc9d95-e9a3-4e49-893c-62da7a86c276",q.SpringfestGrottoB2="c1afea61-4cf8-42e6-aaf4-e0d981f55c39",q.SpringfestGrottoB7="a67c9db6-9a03-4d79-b3f7-7991062e47a7",q.SpringfestGrottoBunnyA3="088eb1b1-397f-42f0-b239-a080e705c16c",q.SpringfestGrottoBunnyA9="7e523cd6-11fa-4012-a9d7-45c5443fed02",q.SpringfestGrottoBunnyB2="dcd360c4-a2cb-4879-9bda-8c33bcafe872",q.SpringfestGrottoBunnyB7="2e062f05-002f-41a0-b5b5-b51d17360672",q.SpringfestGrottoFoxA3="a28c1c45-68ec-47f6-b326-f96db7ae2120",q.SpringfestGrottoFoxA9="82f39295-e545-4766-837f-247872975ba7",q.SpringfestGrottoFoxB2="08054625-9e7b-4ceb-a136-5dc3eecc7e07",q.SpringfestGrottoFoxB7="242a5c11-18ee-4eae-8fd7-16ad0a1fd235",q.SpringfestGrottoWalkableScreen="0b772c3c-74c8-4edb-bfde-d7d187f3433c",q.SpringfestIntroCutscene="157cc96e-b77d-448c-baba-b264dd6975f8",q.SpritesheetPet="770d667d-f843-4269-95d6-3e1496233792",q.SpritesheetPetFollow="4c780a71-5340-4cd3-84f0-a188391b8edb",q.SqueakNPC="09d7d532-10e2-4a31-9cd3-c39eb15c0c16",q.StandardButton="aa0ffd57-fbf1-4e26-91e4-f9b96d5fe423",q.StandardModal="5078ccbf-50aa-427a-b422-e8ab36bb856f",q.StandardSlider="6bd05200-026c-477a-a035-b53226a01f02",q.StandardTooltip="63943ada-7e4e-4cb6-bdf9-a03e91640e53",q.StarfallController="fabb48fe-e49a-4b9d-b2bc-75b19e0dffb9",q.Starfall_1="0dae27c9-dad6-49b1-b2ee-e9d07f2c783b",q.Starfall_2="2f9bc898-fca8-4ee1-bfff-40b54f5074ca",q.Starfall_3="f520a2c6-7573-4b1d-a505-dfa780140ca6",q.Starfall_4="0beea666-5165-47be-8838-63a69bdeeffe",q.Starfall_5="86dee1da-62d3-46c6-8a80-4932b9cd5bd2",q.Starlight2025Q1_0Cutscene="a0840788-b2ca-4347-9728-e283799d863a",q.Starlight2025Q1_1Cutscene="4f9a673a-93ef-44c6-8d1b-31b54ae37263",q.Starlight2025Q1_2Cutscene="223b7588-d3c2-4323-9a45-48fbaa7a5444",q.Starlight2025Q2_0Cutscene="56177f06-8d9f-471b-8f6f-1dd0d9d89f49",q.Starlight2025Q3_0Cutscene="7f39bcb5-1b85-4fd4-87fe-d5c6c9bd096b",q.Starlight2025Q4_0Cutscene="aed1c394-2607-442a-9fbb-9bee0333018b",q.Starlight2025Q5_0Cutscene="0a83f887-958c-4842-a34b-e9afed0c2e12",q.Starlight2025Q6_0Cutscene="eebffa5e-cf09-481c-a765-e4ec2d7d2a3a",q.Starlight2025Q7_0Cutscene="69a18efc-e127-4714-908b-fb691cf939bf",q.Starlight2025Q7_1Cutscene="5b6b760c-047c-447a-ba91-d8db45788f18",q.StarlightBossNPC="12936db9-36e9-4f0d-8738-89a64c17ddd2",q.StarlightFestivalAd="070c7f92-2031-4aaa-b70b-a941bb3e1ca1",q.StarterPetSelection="32fde58c-43c1-4c3b-af23-241e56f79332",q.StarterPetSelection_ToggleButton="2c99fe08-f647-4ab5-9c09-bcae47da8803",q.StatIconDisplay="277aa6d1-33ba-4457-97b8-1d4db09a4eaf",q.StatPopupMessage="20d6614f-f2a4-4953-96fe-d2cdf803d11c",q.StateChallengeGoalsCard="fed54a8b-5149-41fd-bab8-fa6dba2fd5e0",q.StateChallengeGoalsMenu="b59bac96-9209-4ef9-9587-2b33fc3a82ed",q.StateChallengeGoalsWidget="279d8520-b7cd-4874-83f0-a80a332bb6f3",q.StateChallengeMilestoneRewardCollect="64ac441c-a303-49d1-b53d-d30521b78401",q.StateChallengeMilestoneRewardReady="f0384a5d-62c7-48b5-859a-3e3ed94b117e",q.StateChallengesBG="502e95a9-218f-45ca-93fe-550ba3955102",q.StateChallengesConfetti="d36796fd-26e5-4e62-9eb8-ee02c9bb9940",q.StateChallengesDistantPetPortrait="ddc21f17-1cc1-43a6-b3df-2e72487e2df6",q.StateChallengesDownTimeState="abd6041b-d7cb-49a3-83ae-793bc9bd9a35",q.StateChallengesFootracePet="a854ce49-1184-4ea6-9d62-b53fb803808a",q.StateChallengesFootracerInfoPanel="be46a94d-b232-4d6d-ba83-66158b8584ff",q.StateChallengesHUDButton="edfa3064-ae8f-40dd-99e6-b9242995c29d",q.StateChallengesIntroAnimationState="9fc64e3c-7dde-49c3-bd0a-8ee5ed2fbdc8",q.StateChallengesMenu="3b686c7e-aee8-4f6d-a263-f432d0dcd67c",q.StateChallengesNoClassState="eefa96f0-9165-4d51-831f-199b3f278b47",q.StateChallengesNoDataState="20514db1-57bc-4a38-9a83-37b5629b50a4",q.StateChallengesPetSpawner="7b251546-9136-47a6-857d-9c8f57234db0",q.StateChallengesPointsBanner="86027c14-eb0d-4fa8-8f2f-5d1ad34f6917",q.StateChallengesPostChallengeView="2574f4e7-61bc-49ab-9517-d73a9e517949",q.StateChallengesRectangleGlow="fdc5a594-2100-4c66-9ff7-ddfd9f211a65",q.StaticAd="02fdb444-8d07-4d29-a6e0-d838bd055fd2",q.StaticAdCarousel="8b7f72a0-943f-4951-a48a-5de7bd90e771",q.StaticAd_BuyMemberItem="8bdb5229-1ce5-4792-9c95-7548c915ffb9",q.StaticAd_EvolvePets="cd7aebb2-b11c-4d0a-b42b-6375df078236",q.StaticAd_LevelUpFaster="84d242fd-9351-49af-b7bc-80c63b642562",q.StaticAd_MemberBoxes="6caba0df-9b6b-492c-afeb-b99819731377",q.StaticAd_MemberChests="21b3713a-c1fc-400e-93fd-5549bff7bbbc",q.StaticAd_SoMuchMore="77d7d87e-aee7-4586-88fb-b32c02aba256",q.StaticUltimatesTamingMeter="006002b6-7b3c-4d69-8532-7f14bdcb4b00",q.StatusEffect="21dd5d53-3b65-493c-a799-f191603d7059",q.StatusEffectIndicator="4ab50008-6778-4344-b149-7723ceceb989",q.StatusEffectIndicatorList="636f07b4-46e6-44ec-9943-ba94a4b2aeae",q.StatusEffectsList="a9704f83-5cff-4843-85f9-81d354c1cc40",q.StatusEffectsTutorialBattleScene="1f920125-5af1-4ca9-b3ea-88f498ade36f",q.Status_effect_DOT_astral="8e8e53b1-2649-4027-8097-c508982850e4",q.Status_effect_DOT_fire="223f7e41-f2c3-477a-84c3-d04112f000f6",q.Status_effect_DOT_ice="20a3833c-06c5-4946-b89d-c72f32835167",q.Status_effect_DOT_plant="779eab2f-db94-4f90-a647-b08f3dfadc86",q.Status_effect_DOT_shadow="b7398e69-540d-4fa6-adc3-10d0e45d91e0",q.Status_effect_DOT_storm="2bc80471-42a7-41fc-b517-8f2883f3ed15",q.Status_effect_DOT_water="04b975eb-45ee-4c18-ae53-f3bb04972494",q.Status_effect_bomb_astral="ac9e7d5e-6376-42d9-b6d1-3a9c8ff50edd",q.Status_effect_bomb_fire="a1dec98c-7e25-4bb4-98d3-78c49426b4b1",q.Status_effect_bomb_ice="f2d1bf00-621c-40af-99c4-87c5008ffdb1",q.Status_effect_bomb_plant="f5cfb330-ac30-4d56-8f61-b97a866e83c3",q.Status_effect_bomb_shadow="636c11c7-4d20-4e5c-913c-156c45c7fc32",q.Status_effect_bomb_storm="87f25050-7d50-4f5f-996a-6f1ea3bc3db3",q.Status_effect_bomb_water="3a9f950c-9f0c-4e19-9273-4d87a5fb9230",q.Status_effect_buff_defense_up="8ca4b1fa-8ad8-4df0-84c0-4de0ad7252e0",q.Status_effect_buff_dodge_up="042c237a-71be-4d08-b130-2adfcc6fe383",q.Status_effect_buff_power_up="98ee9f42-f99e-42dd-9491-de0829cadef5",q.Status_effect_buff_regen="851ba533-4c69-4708-8a07-b8c312f2955e",q.Status_effect_debuff_defense_down="182d1985-c358-4029-87a1-9cbdcbfbc9fa",q.Status_effect_debuff_dodge_down="90d885bb-a055-47ce-975d-107201598679",q.Status_effect_debuff_power_down="ff87e639-f7f3-4db2-9579-b77e64c265d5",q.Status_effect_gift_astral="d60bb89f-3b0f-422e-aa9a-e1a2bfc19198",q.Status_effect_gift_fire="3e49df13-cddb-4e04-8b69-cd17f48dca47",q.Status_effect_gift_ice="47f98aa6-a841-480e-bb91-5114478163f3",q.Status_effect_gift_plant="5f48bd6c-8a9e-481c-a1b4-e41770b402a1",q.Status_effect_gift_shadow="f72d08fb-2c73-4c46-a9e0-c82c298495e6",q.Status_effect_gift_storm="b1258367-7ef9-4067-b356-02f5ffab21f2",q.Status_effect_gift_water="69104062-2a1c-4dc7-841e-16b7d998b644",q.StayLeaveModalDialog="b22652bb-f0ef-4d81-be04-655b16e3a779",q.Store="cb8a15b2-266f-4c7f-8d76-4df2e6128ea3",q.StoreBundlePopup="97eda0df-98d7-4ae7-8c3f-670cd574f99e",q.StoreCurrencyDisplay="7af16fc7-f946-4cd4-ab28-757ed79fb395",q.StoreGearStatsDisplay="9c354d8c-dc92-4ee4-a828-deaf35990e4c",q.StoreItemCard="3c5fc766-a784-48e9-b076-d45a0cfd1b1c",q.StoreItemCardSimple="352d96fd-87a0-42c6-86ba-f5f5f2fbd199",q.StoreItemCardSmall="af395fc1-e3bb-4378-9f34-2132b16d5bd3",q.StoreRightPanel="1a6c4a6b-6b28-4bd7-87c9-d6b85bd5214e",q.StoreTooltipAuto="4a389156-2c69-4e74-8790-d55d464823f3",q.StoreTooltipManual="36e72540-094c-4907-8f7f-e80dd07cc418",q.SubspaceMythicNotification="b75dac05-c121-4cc7-b533-b5ddfd760082",q.SubtitleTitleHeader="69c4ab16-bd61-4b1c-a899-9591324cb922",q.Sunworks="1b97aa7d-c4e9-42f0-a6c6-8ce5fe375c47",q.SupportDialogBody="f098c29c-b502-49e6-a6ff-be7b70e95fb2",q.SupportDialogFooter="4188e5ff-c5e3-48ab-8ed6-6447c2ac7665",q.SurveyAnswerPrefab="65d81152-57d7-4976-a35d-866f93ae5815",q.SurveyOpenEndedAnswerPrefab="16b34b84-6ca3-4641-9353-aac17071c28a",q.SurveyPrefab="a82ab69c-02a3-40c8-a834-8385a80aebf1",q.TeamCardBase="15f5edb9-3e96-47f2-b39e-e96556fb34b8",q.TeleportTrigger="a1c5e4d2-ffbf-4365-a065-63c7d4d726a7",q.TestPromptContent="2f779a06-c607-4250-8039-d43a0dd341d0",q.TextPopupMessage="444587d6-5a80-4fcb-8e87-b3fac29eac8a",q.ThreeStateCloseButton="51050525-d8bb-4fcc-8db6-6a5bfa19a9e6",q.TidusAdVideo="70c0a518-8be9-4213-880a-9e969145fbb8",q.TimeRemainingFooter="4172afd5-e2cc-496c-b915-8d4c0523e91f",q.TintableBanner="924ac7e2-049c-4c98-8d9d-d59683000f3e",q.TitanDeadPopup="940aa9a9-d8ba-40fe-8460-c2fd906a0187",q.TitanTeleportAd="2326a266-af06-471d-91ac-2922aa209e6e",q.ToasterNotification="490551b5-11af-485c-9a2f-4a6dc2d5a99a",q.ToggleImageButton="1a6b96e1-7505-4786-935e-cc99b5903dfa",q.ToolTip="02ad1891-5703-477d-9de8-14148e9aff74",q.TooltipSpeech="04b2dca3-c52e-4fef-afd3-171d8e1ee624",q.Tooltip_RectTransform="fc775cb1-3fc9-4ca9-a6c4-44e09fb241bd",q.Tooltip_test="93e56ab0-c16d-42f8-bc17-85d396dd476d",q.TopHeavyBody="50d655d4-5e85-46c8-8e46-c33a449ca975",q.TopHeavyHeader="23cb292f-e6e2-4f3c-88a5-fcaf8bdf179c",q.TowerTownHUD="f0279fc2-fd10-44ee-b6d9-15c1635f42bb",q.TowerTownInProgressPrefab="14227a70-675e-4dda-90ec-13013d75df46",q.TowerTownMallInterface="632ea709-d268-4aa0-8792-4c0957c1829c",q.TowerTownMallScrollBar="905106d0-0376-4006-8dbf-5852c553ee6a",q.TowerTownMallShopComponent="91e08ac0-7aa4-4a2b-853d-b1850d86c32e",q.TowerTownShopScrollView="ac3e6cab-d35e-4a46-bcc7-f3603b0186a8",q.TowerTownUpdate="57697f5a-34d8-4d25-85e3-0770f71f4b3e",q.TowerTownUpdateCard="4ef72dff-a973-467c-8f7d-35883c5ec2a5",q.TowerTownUpdateInterface="72fcf275-814c-406d-a7fd-a38cd3abaf51",q.TransformRelayFanfare="7a9d0bf7-8454-4ec2-a98c-0d2bddf7f7d7",q.TransformRelayObject="44cb5816-7653-4c8b-941f-27905efa541b",q.TransformRelayTitanFanfare="864476a6-ef2d-4318-907e-993311b4c168",q.TrimVinesSequence="feb8924b-1c5e-4960-bcde-954a258d8b4d",q.TriptropTrioEncounter="ea914f41-e452-4812-b208-365bf7a91a74",q.TutorialTag="e691781a-5ef1-43fc-b1c4-1113ea9ad0da",q.UIDemo="93a43c09-d04c-4e4c-9830-a3bb1dc55f95",q.UltimatePet="a83cc8be-012b-4407-90b7-50c4f8d16238",q.UltimateProgressCard="9c4f6c89-7f71-445e-8471-2a3ea3c9629c",q.UltimateTaskUI="aba58103-a05e-47e6-90fb-8dcf6f46756b",q.UltimateTrail="ca953f32-108c-4330-b4f7-7cf333d21598",q.UltimatesBannerSpotlight="48d461aa-0e71-4813-ad2f-b7d30db15917",q.UltimatesBattleHealthBar="07a17daa-a30a-41e8-8a5c-341c2141910d",q.UltimatesCarouselCard="df5e003e-f26c-43f1-be0c-b060f1aed96d",q.UltimatesInventoryCard="5c30e061-478b-4eb3-aa29-cb10ee3c1ffa",q.UltimatesItemTradeCard="b1c32946-40e5-4300-a9e1-ffebeca08c8d",q.UltimatesItemTradePopup="e60eb95d-edd6-4059-aa5f-277638962bf4",q.UltimatesMembershipUpsellScroll="53040e67-7fd4-4c57-8487-4b481b136848",q.UltimatesMembershipUpsellScrollV2="647c6e04-2b47-4df0-a8be-603687f877c3",q.UltimatesPanelDailyLoginCalendar="02d79aa8-3244-49a5-ada4-c23804dde900",q.UltimatesPlinth="daa42dbd-2f77-4659-be6f-0f5c6422a99f",q.UltimatesTaskTooltip="47738785-da61-4792-91cc-0995fc41df51",q.UltimatesTrialPostBattlePopup="94ea5ff7-4ff7-485c-b768-b460294fea5e",q.UltimatesWanderingNPC="0ca8c9f6-2491-4de5-9bbd-5bd7f11c4279",q.UltimatesWanderingNPCBeginTrackingPopup="ec57fae7-32d4-47e6-8d8d-7e29facca662",q.UltraMembershipWidget="77061205-702f-4eef-950f-205d8b15a966",q.UnifiedConversionFlow_BuyMagicoinOTP="f6c1dffc-cec7-4bb4-a267-a0d815f12e95",q.UnifiedConversionFlow_CoreMemberPanel="ff7fa13b-f43d-482e-9876-2f17541cb83e",q.UnifiedConversionFlow_DualOTPModal="0954745b-5504-4d43-b041-6fbad05e0763",q.UnifiedConversionFlow_MobilePlusMemberPanel="96f1d68b-1a84-4a6f-a7f3-43db078a1d97",q.UnifiedConversionFlow_PlusMemberPanel="dc84a0b6-55af-4421-a87f-49f8c35f5fec",q.UnifiedConversionFlow_TitleInputOverlay="aebddb9b-eeb1-45ea-b3a7-ab72a5b81b51",q.UnifiedConversionFlow_UltraMemberPanel="0542066c-eca1-4fce-ac39-95e9a77ad07d",q.UnifiedStoreBase="ebce620f-d5bf-4f9c-9278-9d046d6e97b0",q.UnifiedStoreButton="9d6c4831-210e-437d-983a-238745caf22b",q.UniversalTeamSelectionMenu="daa62438-f0da-4a82-b406-bd793daebe98",q.UniversalTeamSelectionPetDrawer="dc61077c-1a1b-4c64-9884-fc4629dd5d2a",q.UniversalTeamSelectionPetSlot="10c3c58e-af8c-43f8-a820-aba39c7740f0",q.VernaNPC="69c547be-405d-46e8-b3a1-b9c0119573f6",q.VerticalFixableMinecartTracks="2dc4e86e-6667-4d39-9938-48539933a198",q.VerticalMinecartTracks="48c32834-70fd-494c-bd4b-5d685c06eee1",q.VictoryBanner="3fddc715-d281-4116-81cf-cf14f768be0b",q.VideoPopupDialog="2f9ad04e-f86f-434e-beb3-482c05a3e99e",q.VisibleAffixIcon="76a0733d-731c-4e14-8790-d8c5c94f10d1",q.WalkableScreen="17aa475e-c95e-4bd9-a7b2-83cecf793707",q.WanderingNPCTrail="0b472392-029d-4f18-b03a-30585867d61c",q.WarningToaster="373deb18-fae0-43b0-a1c7-825c9d239a3e",q.WaterBalloon="6c13c725-e537-4bb4-8692-f60ed2d0a86a",q.WaterBalloonInstructionPanel="8527f4be-1522-4ceb-8161-c45c61d9b553",q.WaterTornado="e340c70c-951d-4b8d-93e4-e41222f0a2af",q.WeaktoDisplay="08a53290-d9bc-4699-9d89-5db29bcb11d1",q.WeeklyChallengeDialog="9b5ae8cd-bfba-40e0-bbc7-32784e6165e6",q.WeeklyChallengeMain="54affc1b-d1b7-42b3-a6ad-cd14f5bccce5",q.WeeklyChallengeRewardDialog="15e898ca-b84f-4012-bb0b-686247d7c475",q.WeeklyChallengeUI="7cb490b2-199c-4b0e-a699-fdd6dd60bdd8",q.Whirlpool="843e4693-4171-46a7-81b4-6dae59041d6b",q.WhiteLargeButtonTextAndIconLeft_RectTransform="c63d2ffd-78e9-4e0b-af32-9cb9729ee579",q.WhiteMediumButtonTextAndIconLeft_RectTransform="5d2d8057-1d1a-4fdb-86db-163c94d7d7cd",q.WhiteSmallButtonTextAndIconLeft_RectTransform="8d7d1956-7cae-43f6-ae50-5e6c864b27c5",q.WhiteSmallButtonTextAndIconRight_RectTransform="4e95401f-26d8-4579-95aa-92c2e0848e17",q.WhiteSmallButtonText_RectTransform="298d257a-cfc4-410f-b88f-7490a5919f60",q.WidgetIconUI="edb51970-e30c-4ce7-b7b6-24188eaffeea",q.WidgetOpenAnimation="0469f57b-a9c8-41c1-89e2-cfdd83c23fbf",q.WinstonVonLoot="db7991d2-4bb6-4849-a9d2-43f3df2a45fb",q.Winterfest2025FinaleCutscene0="b46f3c34-89d9-459f-9557-e66019f1b4e4",q.Winterfest2025FinaleCutscene1="e20857fb-946a-4dcb-8530-e4d2f7749305",q.Winterfest2025FinaleCutscene2="bd894056-1ecb-4b45-aa76-546a589c42b0",q.Winterfest2025FinaleCutscene3="c1945747-7949-4b08-8d13-30df2adeba56",q.Winterfest2025IntroCutscene="3a609017-9205-4abd-a335-0997ccd1ee81",q.WinterfestBossStatue="a216443b-ec2e-421c-9ecd-99a4eb544347",q.WizardBankChest="e77bbd3d-9deb-4169-a9bd-026e9dac9bed",q.WizardBankChestGold="fdb971ef-554f-4a7e-aac3-ce2ce7b419a7",q.WizardBankChestGroup="83f5af0d-b128-4276-8046-db73d903502d",q.WizardBankChestUltra="cc6b8750-b4f2-4476-b6a6-9455f0d3b126",q.WizardBankCollectPanel="3bac15b8-458c-412a-884e-98ad46a9fb60",q.WizardBankGoldWidget="20278935-3754-4a14-9429-dc69265d9ab9",q.WizardBankMenuModal="0b5fe5e3-61e3-444d-b3a2-50b9483ec2b0",q.WizardBankNonMember="22504267-a9f6-42c6-93f7-0d6c2439126e",q.WizardBankPlusChest="f44f2c7f-d0d9-4bc7-85ca-2da863961552",q.WizardCostumesFTUEOverlay="80656be6-a50f-464c-8ba2-8c997f40b35a",q.WizardCostumesFTUEPopup="ec9c8b88-10fd-467f-85b5-160e9c1a1c25",q.WizardCostumesHUDButton="38e1d8f8-23bf-41e4-aed7-cd4213ea80e6",q.WizardCostumesMenu="64f054d9-0094-456f-b49a-984c2cf2e37f",q.WizardCostumesVideoMenu="47b876bc-47f3-439a-a1ef-f127e7492503",q.WizardHeadAppearance="012158f8-2e88-4289-bc27-8ca0af20ae33",q.WizardInjectionConfigured="eb60a57f-2423-43eb-bac4-69dbedab5321",q.WizardNameObject="3123994a-1477-447c-8c63-6015ab50065d",q.WizardNameSelector="847f69fd-cca6-40af-878c-84aba7177752",q.WoodPanelHeader="93c13bf1-df26-4488-8644-a3b885b302a2",q.WorkerSlimeSoupNPC="c65aaec6-bed6-4347-bdd6-e3272de54299",q.WorkerSlimeTurnipNPC="1fcb98dd-0702-4584-88e0-681670370acb",q.WorldInfoCard="f78090fc-5f1e-48dc-8215-2825d4eec7fb",q.WorldInfoSection="81ac35d7-d7c5-45a8-b30c-3e0ed97297ff",q.WorldMap="711f7aaf-c73a-45dc-a38c-8fce87d3a4ee",q.WorldMapZoneUnlock="7622b78f-367c-467d-83fa-75330170f86e",q.XPBar="d9f264ef-2959-48a8-be07-848d7a990658",q.YourPetHeader="98ae374b-5bd7-45fe-9eb9-c51be9a491f4",q.YourPetMenuPetGearSlots="46778c6e-027c-4370-bc6f-5dc785fb8eec",q.ZoneChest_Transform="83b3474a-3cc3-4e7d-93f0-ade9859c7a3d",q.ZoneComingSoonPopup="0a113b81-d025-403b-8e6c-9646b7e650af",q.ZoneEntryIllustrationBase="29025f58-628d-4969-9c67-a0146cc23c16",q.ZoneEntryIllustrationBonfire="6a89aaf0-22f5-42b6-ad2a-d92660362748",q.ZoneEntryIllustrationFirefly="4a92d202-5703-4cd0-87a0-554589feda20",q.ZoneEntryIllustrationShipwreck="17ca166d-1803-43ba-a623-6aaacf767424",q.ZoneEntryIllustrationShiverchill="b3da778c-9f60-4db0-b44c-9d72d8a0f967",q.ZoneEntryIllustrationSkywatch="d2b46236-1e6c-43fa-98c9-1125a89abf14",q.ZoneGoalsInfoPanel="19014058-f949-495a-a843-c7fc972200b3",q.ZoneGoalsMain="c4e33399-223e-4156-a111-546a61f7f47a",q.ZoneLockedPopup="47d77023-9571-4329-8368-94dfca784941",q.ZoneLockedSequence="00cbf719-4d52-4b0d-8dd7-9428e1236db1",q.ZoneUnlockedPopup="a6f78822-378f-4773-a838-e4071d10c238",q._spell="d9eb45f1-20b8-446d-a36b-afcd8ce9c6bd"}(Y||(Y={}))},51742:(q,K,z)=>{"use strict";var Y;z.d(K,{c:()=>Y}),function(q){q.Sfx_academy_portal_close="138f0ebf-d540-48e6-9701-839743659a86",q.Sfx_academy_portal_open="c8c9213d-694c-4d30-a62e-c7b00b9bd69c",q.Sfx_academy_rumble="567f8f43-caee-4adb-9a67-f1bb054e6a7d",q.Sfx_adding_pet_to_team="d726df53-9001-4603-a518-c052eea1212e",q.Sfx_ancient_blast="be9b0f3a-b7e0-4dee-a9bd-1283055cb8fb",q.Sfx_ancient_bush_rustle="855a7223-8333-4553-b83c-934a387ce140",q.Sfx_ancient_bush_spring="72e9d19a-025f-4fcf-ab17-27f780b9c95d",q.Sfx_ancient_crystal="86ecbe47-70d9-44c1-bb7e-0a4f8a18528a",q.Sfx_ancient_exit="c1b6774c-bf14-4298-85b1-1ea60ccc694c",q.Sfx_ancient_forge_crystal_drop="d296b828-e1ad-41fc-abdd-bca50112a2f7",q.Sfx_ancient_leaf_pile="8cb41b2a-2094-48b0-af0d-cf456a498297",q.Sfx_ancient_lightning="cba9da50-eb22-45d4-9cfc-e7f314be065f",q.Sfx_ancient_loadout_action="1a6c571b-24d8-4a3f-aaba-a3d3a31409e6",q.Sfx_ancient_magical_plant="39bdef53-f0a4-4c45-935a-3ddd5b489643",q.Sfx_ancient_portal="fd70679f-9ac9-4dc5-9414-2dbc4e7d2952",q.Sfx_ancient_portal_short="b2956662-4789-489b-ad72-168b6c8d2754",q.Sfx_ancient_powerup="355a51a9-a097-45c2-aded-3977d372671d",q.Sfx_ancient_relic_forge="e86ef6d4-eb4c-49fd-bcfe-64e1df1e0542",q.Sfx_ancient_rocks="41e58ca4-caec-4ea8-a213-b3d03b5d6de2",q.Sfx_ancient_seal_destroy="d7233d2d-7149-4796-b7af-a54e09bc78ad",q.Sfx_ancient_seal_overload="74dcc0df-2605-45c7-b81a-9787461129b1",q.Sfx_ancient_teleport="ae53c99d-378c-4e81-a2fb-113751e8e816",q.Sfx_ancient_teleport_appear="41dffc4b-b10a-4d7d-a644-23a5d684880f",q.Sfx_ancient_teleport_hum="7dacface-ffb6-4d9a-9d95-401a804e3e9d",q.Sfx_ancient_torch="25a1f18d-0474-4868-bc92-ab26e681d5a3",q.Sfx_ancient_transform="ccff86d9-504a-46d7-af5e-024d5765fdda",q.Sfx_ancient_twinkle="e910bcd8-7fb6-410f-8fbe-a01cbf559929",q.Sfx_arena_battle_begin="3f844b1e-0009-4c77-b1bc-478b5da5739b",q.Sfx_arena_battle_fire="1c68c41f-0a5c-4512-be65-b8e9300dbd5b",q.Sfx_arena_changing_battle_screens="caf097c4-67fb-478a-ae77-5e3f7e90e5fc",q.Sfx_arena_division_chests="b04b79e1-4663-444f-8b16-f35972308b67",q.Sfx_arena_equipping_runes="e37b676f-cefd-4387-ba89-a0c3a770a1bb",q.Sfx_arena_gain_trophy_points="0a347906-be58-4fe2-bbff-580c95611a24",q.Sfx_arena_gate_close="0a57f293-6f24-49b1-8bf4-dadab1a7902d",q.Sfx_arena_gate_open="2d9cd04f-a5d7-4966-a014-03615577ffe5",q.Sfx_arena_going_up_leader_boards="21ea1e7e-7779-4a16-949c-1bdbb2e4dc82",q.Sfx_arena_level_20_milestone="fdaeec2e-8b92-40ad-a84c-93e2e483f41e",q.Sfx_arena_loading_between_battles="6bcb88f7-2b72-4171-827c-a6f9beed12ff",q.Sfx_arena_locked_chest="2819da5e-8ebb-4b4a-ae83-feef207bb186",q.Sfx_arena_losing_trophy_points="f00d727a-ccbb-4121-9f73-268d4401ee36",q.Sfx_arena_member_chests="5de57442-dd46-48d4-9255-35f61dced8c1",q.Sfx_arena_open_and_close_rune_boards="0848777b-7c66-4d4d-a38e-9e33fdad4109",q.Sfx_arena_rank_up_different_tier="c5c02250-6e6e-4e52-b6f0-2a4d23507602",q.Sfx_arena_rank_up_same_tier="d8d27255-2c7d-4e69-8d21-e5d773094eae",q.Sfx_arena_season_begins="42589ee8-e6d7-4b3d-baf1-01481a6eadcb",q.Sfx_arena_season_ends="ddc03e6c-8cbb-4ad8-a583-6930f1d1b647",q.Sfx_arena_season_rewards="905a3bac-d9f8-4081-ac17-32cacb88c044",q.Sfx_arena_selecting_a_challenger="59182f1e-714f-4d1b-890a-f94a76f0c9fd",q.Sfx_arena_viewing_your_season_progress="2f439ea3-dd47-4d7c-a861-163ff0672c04",q.Sfx_arena_you_lost="723c4ba1-6c47-46e3-830f-e0889cd91ac7",q.Sfx_arena_you_won="319bc4e2-105f-4986-b84a-45b75968cc47",q.Sfx_arena_you_won_banner="1cb1513a-0626-49ac-85bb-4a9a3a22240a",q.Sfx_attack_forest_fury="46fd92ee-efd9-422f-80dc-d24ebbd9ece7",q.Sfx_attack_frigid_blast="66645c27-ea00-4705-b610-f4934965a4ad",q.Sfx_attack_hot_snow="7d5a0bd5-34ed-415b-8cf2-4350fc41cef2",q.Sfx_attack_royal_roar="607ae283-7ac1-4b5d-bbdf-0f4b2536077d",q.Sfx_attack_storm_wrath="88c8f045-6a28-48c9-9f1a-03f3158564a1",q.Sfx_attack_tidal_twister="5ef568c3-2271-432c-b43f-9b3ac304f314",q.Sfx_bar_fill="e18d2ce3-f058-45a1-9a49-899714181e00",q.Sfx_battle="03af8793-f0d2-4df6-b7d9-3d981cb30c1a",q.Sfx_bonfire_spire_q5="41689399-dde7-4145-bb6b-de399e77c0f3",q.Sfx_bonfire_spire_q6_and_q14="dce641f5-8c4f-463d-952e-ed88b2495325",q.Sfx_book_close="b7ab7e4e-6cdb-4319-bbe6-d7582b691e08",q.Sfx_book_open="8cf28c92-e390-4862-9352-a8a2661d43d7",q.Sfx_bubble_pop="5ec1266b-16a6-4e35-b89a-8f0ab1594058",q.Sfx_button_disabled_state="14b31c3a-8fd4-4ce6-bc21-3ba668ab2971",q.Sfx_button_sparkle="d7cec272-b8d4-4424-a6bf-06551945cae0",q.Sfx_chest_locked="9f0b33c5-25bd-4396-a717-8cb688931a34",q.Sfx_chest_open="393f147c-ee28-4182-b425-3d25e2eec028",q.Sfx_chest_open_member="a621bff0-56ed-4372-8126-3979174102e7",q.Sfx_chest_open_non_member="4027a9fc-aafe-45b5-b22b-c61473ff6828",q.Sfx_crate="f84bff26-95f7-459e-8085-7fce398f8f53",q.Sfx_crystalbreak="cc21e19d-bf9a-4844-a329-53a1aa99110c",q.Sfx_crystalclumpdestroy="93e1e797-f6a9-43d4-9aa2-590732aeefb7",q.Sfx_dance_dance="36997279-b2d4-478b-acc3-0a6a63341a8c",q.Sfx_dino_dig="5afb830a-729e-4889-af35-5f7b51b093dd",q.Sfx_epic_egg_hatch="a9c0f4d0-d413-41df-b38a-79349d2511c7",q.Sfx_floatling_fling="2c0b1365-212c-4436-a22e-8de59312615c",q.Sfx_house_intro="a5fcdcf2-cf78-4afd-bf13-a7c807a97baa",q.Sfx_item_appear="19bc6ece-02a0-4fb1-815b-341476892b7f",q.Sfx_item_fill="b80a560c-6db7-43b9-973d-101045219b51",q.Sfx_item_hit="9541607d-02f3-4553-a5a9-de70d2f5e752",q.Sfx_item_whoosh="c49f9bf1-7651-40d9-a231-ead15e9a9e19",q.Sfx_jar_appear="bbc20fbf-48dc-4fde-9180-cbf9201cea4f",q.Sfx_jar_fill_ancient_game_gift_bundle_positive_open="6028a83c-baae-4c8e-8c6e-4226f564a77e",q.Sfx_jar_open_ancient_game_magic_bubble_open="78c4c917-727d-4a86-add7-7e0007555d9f",q.Sfx_keystone_appear="151a96bc-1e90-46d5-8a56-5eecded631f3",q.Sfx_keystone_disappear="7f8858ac-0174-4e6a-b300-5981ce3409bb",q.Sfx_lamplight="d4bf6a95-75a4-4414-91be-05a45cb3b846",q.Sfx_lamplight_pets="0e0cf8bb-0774-4ec7-bf59-60389b604666",q.Sfx_level_up="f599cb5b-38a3-433b-b752-5a70e159d378",q.Sfx_lockbreak="60431b90-7381-4a49-ad0e-0ad0660d4a5c",q.Sfx_main="556ac285-ca78-4e22-b47f-802c01fa7343",q.Sfx_minecart="8fe39e6f-f474-4c7d-8193-ee6cf37085b5",q.Sfx_minecartstop="1967797a-bf9e-4ba5-9cff-bb68c5629cfa",q.Sfx_moving_pet_position="41a6d297-9401-4592-97e9-c668df44e4f6",q.Sfx_open_petinfo_yourpet="addb4b04-11b5-4b09-88a6-33606054187a",q.Sfx_paper_tab="9dd81853-67f3-4168-b476-a5884cc5084f",q.Sfx_petbook_pagination="fea6d560-bf0c-409d-8635-19d5b2d85402",q.Sfx_pets_button_disabled_state="a507f085-7c4c-4f2f-a240-9e86509a3db4",q.Sfx_petsui_rescued="7133e7d7-527e-4ad6-a480-fe58247547bf",q.Sfx_puppetmaster_blast="71d1a201-a433-4a2b-8e27-afdeb07d6583",q.Sfx_pvp="49b61a63-8c88-42db-85dc-ad757780585f",q.Sfx_qi_button_default="5a365fe0-a201-47b4-987c-bce32bebbb0c",q.Sfx_qi_button_disabled="c7ab65ff-f34d-4dd6-a816-4b0bd2034991",q.Sfx_qi_negative_action="c27696e8-c89a-453e-a4e6-131f15b836f7",q.Sfx_qi_positive_action="adb8b97f-9956-47bb-94e7-72606ae3c6cb",q.Sfx_registration="54cf02bd-1b50-4940-b59a-c2a1ea18eb2a",q.Sfx_results_screen="8d0b360d-48ff-4450-84de-13df33dcb2b6",q.Sfx_sharelikeaction="c0f35ab7-46de-4e38-b4ef-ff336e859e75",q.Sfx_shipwreck_shore="30e09f59-4c2e-4a77-8711-c673d8d1456e",q.Sfx_skywatch="9ea8fadd-a299-4c3c-958d-f019fdae0f2d",q.Sfx_snowball="be83d5f8-2829-431e-8edc-cab9a6c8660e",q.Sfx_snowpile="11923d10-063d-4ee2-85f3-2238669a8c82",q.Sfx_spell_learned="9a651525-3dcd-45d6-8142-e5c6368c80ba",q.Sfx_star_appear_ancient_game_star_glitter="e9f8ca80-57af-4e7c-9e7f-6e2606ac9682",q.Sfx_star_explode_ancient_game_magic_achievement_1="b57b24ff-7d46-4d96-9b45-3354e7e40492",q.Sfx_star_jar="9e4c94fc-be4a-43fb-b5d1-00f630a64100",q.Sfx_star_jar_redeem="8d6718d7-22c3-4c27-a6a2-bc95c9e30597",q.Sfx_stat_increase="1d2476f6-a81d-4f4b-b071-9914ed707ae4",q.Sfx_store_equip="718123da-a810-4bf2-9190-f8ee55d2d131",q.Sfx_store_purchase="e1f6473b-8108-40ef-89d3-c6cd5f980380",q.Sfx_tab_click="09ee2803-e13c-40db-bcee-effdd658dcdd",q.Sfx_titan="cc4f40e3-bb3f-4531-85a9-fc4b9be341b2",q.Sfx_titan_catapult_hit="bee4d71a-a89b-46e5-a8f5-6335900e4c64",q.Sfx_titan_catapult_launch="d7727e1c-3e83-4a22-b83c-ac6f6129b46e",q.Sfx_toaster_close="d448e932-697c-475f-a45e-dbfd14148001",q.Sfx_toaster_open="c57228d3-ce21-47a4-bcaf-7de85e87ff5d",q.Sfx_tower_town="5bbd4f05-dd4b-4b39-b82f-10aa55b48d24",q.Sfx_ui="a5ecab87-fcb5-4f02-b98f-51faa950e8be",q.Sfx_water_balloon="a16dfa00-116a-41c8-bc36-a65b925581cb",q.Sfx_world="60b3a3e5-7221-4177-b75b-d93e731ec2fc",q.Sfx_wyrmroar="9d3aa970-b3c3-43c9-ab89-9e7efa7835f2",q.Sfx_xp_gain="69aa346a-9242-424c-9b30-2d43b14c2773",q.Sfx_xp_gain_member="7839c36e-2c83-4b00-b823-989da7f03c94",q.Sfx_yetiroar="a6219a8d-89ae-41f4-8806-3849d1869ae0",q.Voice_0="b8983c32-8fc2-472a-b251-695234ed54c7",q.Voice_10_1="8374fe01-22e1-418a-8add-d449afd2adf8",q.Voice_10_10="d15da664-0a6b-441f-bf1a-6e6ae693d17a",q.Voice_10_100="dd7ce4c7-b5e5-4f0b-a603-05271c89b8e3",q.Voice_10_101="dacd86f7-7e17-4960-b457-f4a18e15fd50",q.Voice_10_11="ff4c63da-c0c7-43d9-9736-c9b616c5ddf4",q.Voice_10_12="e74964d0-2bea-4a02-afae-1b65fc129139",q.Voice_10_13="630733b7-5d28-497d-a7a5-1d2019ef00a5",q.Voice_10_14="fb2597b1-cd14-4a7c-9fcc-1587dcf7f56f",q.Voice_10_15="8c82ebee-76a2-40fa-b31d-82fad226ef2d",q.Voice_10_16="a84be1c2-e6c9-47cd-ad89-dab895785db1",q.Voice_10_17="f429c8e5-da4b-4f35-ad72-542952d6aff5",q.Voice_10_18="f56a207e-2100-4161-b2d6-a76110086845",q.Voice_10_19="e5caeaef-3eef-48b4-ac6c-d992d8c557a9",q.Voice_10_2="25ac99ac-4d79-4988-917f-372f82e49220",q.Voice_10_20="39b6a2aa-27c3-44f1-bbd9-652eaaf7b4e9",q.Voice_10_21="68c557cc-ce02-4ff3-98a6-195f46f15f5e",q.Voice_10_22="4454bba7-9bd8-4975-a1ea-9a9ec42b1064",q.Voice_10_23="603fb6b7-caff-4cb7-bfff-4f0778c8219f",q.Voice_10_24="dc97131d-7de7-42c7-979a-cc5baa305acc",q.Voice_10_25="bbfcc683-1b76-497b-bb93-17ad11bbcda6",q.Voice_10_26="f4accfe1-9a4d-49d6-bc8d-726a53524025",q.Voice_10_27="9d6e793b-931b-4a5c-beac-a21b1c26f54e",q.Voice_10_28="4594100a-65b5-46e4-b051-9143b897461e",q.Voice_10_29="03a85e9d-2f22-4dc5-86ab-acb2a756665b",q.Voice_10_3="89a5dca1-52e1-473a-a000-5580d4804c56",q.Voice_10_30="903363bf-e7b9-4f76-95da-838cf92aac2d",q.Voice_10_31="2f90b0e0-7335-417b-b452-127f7de3fa62",q.Voice_10_32="27c286d4-f665-4ae1-bc49-d9d382cf155c",q.Voice_10_33="1a12de45-eaad-45fe-9a09-6980d8540613",q.Voice_10_34="0efb77ba-b0d6-4e33-90d2-035abfd2c033",q.Voice_10_35="3600b850-001f-4947-a582-ec4c84b5a139",q.Voice_10_36="a65753f2-f7c9-40a6-a45b-b893111a81b2",q.Voice_10_37="3b624ea2-dde9-4d53-92e6-a579690a35e8",q.Voice_10_38="b36cb4f3-f17a-4859-b5e4-1f5355289b69",q.Voice_10_39="5633a65b-a9da-4e63-89c2-d52f5d815b4e",q.Voice_10_4="18b617f3-c270-417d-abcf-78c0ddbfa1b5",q.Voice_10_40="7ca2fa2d-6e46-48ff-99ad-a09dca7cb890",q.Voice_10_41="3fb75a60-af33-4cef-8c5e-66e28969d623",q.Voice_10_42="ccb47779-50dd-4b13-b45c-d028cc4475a0",q.Voice_10_43="0d947cf3-31f1-4df1-8fc5-419d6e5d54a3",q.Voice_10_44="d17dc780-a622-441b-a156-ee7b15d5ce05",q.Voice_10_45="aa42e5fd-a27b-45a1-a14d-42a41059bd43",q.Voice_10_46="ca327091-4ddb-4579-a04c-dba4651a09a3",q.Voice_10_47="b05fbee3-0759-4dee-81ab-cbc2c6e4b651",q.Voice_10_48="aa16aa0a-6fbf-4277-b465-fae598b15a05",q.Voice_10_49="90127057-b483-4f20-a986-fc6a722a2bde",q.Voice_10_5="a7af0dd5-03c7-4215-9644-3ed32871e3b8",q.Voice_10_50="620242d7-dc6c-48b6-8233-548a3f369644",q.Voice_10_51="f5efaba7-0376-4eb1-a3d6-8f4a362cb81e",q.Voice_10_52="405e0fdc-25ed-4a53-b817-6743c9d1f2c6",q.Voice_10_53="8c4216b9-b62e-4e18-a6d0-8440e409aa06",q.Voice_10_54="232d9520-354c-41d8-b54c-676505429a15",q.Voice_10_55="8957cb08-2cff-47ae-a4d8-cf3ec020e729",q.Voice_10_56="0383fc16-321a-4a24-8e46-920aa4483044",q.Voice_10_57="80059479-0418-46f9-8c51-57a5137fca69",q.Voice_10_58="c7e9a18a-314c-42ba-900b-39711a5739c3",q.Voice_10_59="7324cb3e-3516-4c68-b3e9-21591918a039",q.Voice_10_6="7f417572-24ac-4079-a85f-a70ed43e9022",q.Voice_10_60="db932e86-48d3-4805-a193-28fb9c046beb",q.Voice_10_61="158d05df-fa47-4ab0-bd3e-76c3e4efd752",q.Voice_10_62="bf6f99af-e72c-4651-a206-a10bb08d9b99",q.Voice_10_63="5d2664f3-b7b7-4814-b089-ce33b657cf81",q.Voice_10_64="08161f8e-94ca-485c-84fb-311482a2f0cb",q.Voice_10_65="96012c1a-f0c7-4b26-8022-5f67227342f4",q.Voice_10_66="a63ce015-5fdb-4b7f-87b4-45ec4503cf8d",q.Voice_10_67="fe4ade9a-24a5-4c94-b69c-1f6ac6edc3ac",q.Voice_10_68="991122d3-4996-4e2e-a952-fa06c08aaf27",q.Voice_10_69="25793c57-a685-46ec-970f-64d7afe0d6d4",q.Voice_10_7="6c5d8cf8-fedd-4028-9059-b53dfe26eef2",q.Voice_10_70="a51bf05e-ffba-496f-80f3-f730e1b0f975",q.Voice_10_71="936d43e4-742e-4d20-b70b-fbe3a0514f76",q.Voice_10_72="dadcd5a3-7823-4925-858b-d9b46c22de5d",q.Voice_10_73="2ceb19df-3c2d-468d-a521-9e934c755d3b",q.Voice_10_74="8f2dba92-32f1-4ec9-820d-1d224913d467",q.Voice_10_75="c4d5d6d5-7f25-4068-99f7-7d3385879fe1",q.Voice_10_76="51838690-17b3-4efa-a5c7-dece38f3da0e",q.Voice_10_77="36eccea7-891a-453f-8acc-3231ad4f4275",q.Voice_10_78="07a42466-62a6-4f68-84bc-f63e73a8e52f",q.Voice_10_79="189d4bae-b293-4134-9caa-827727111a89",q.Voice_10_8="b08eb38b-4385-4f64-bd0a-77d9d4dab1bd",q.Voice_10_80="0df89a78-3e01-4c33-8a0c-ab935c70bc2d",q.Voice_10_81="a8536bf9-702d-4e96-bba4-f614b91e8698",q.Voice_10_82="144ac2da-f141-4182-993b-955929ce0f57",q.Voice_10_83="00e8d026-90c6-4296-97db-cc69c7527980",q.Voice_10_84="567a21e0-1e5f-491a-a6a4-b3b2242d57f2",q.Voice_10_85="fcd808e7-1bfb-433b-b2f8-05e31cb45dc7",q.Voice_10_86="8dbdaec9-f94d-4572-a855-01ba3187d1a9",q.Voice_10_87="2acc6399-b867-4362-978e-bed6f19f5d99",q.Voice_10_88="08289a6f-fc73-476a-bab4-667ad155bba8",q.Voice_10_89="6820cd0b-7c8f-4026-87e3-59320b82b82b",q.Voice_10_9="4d1f5225-2bab-463d-8b01-4ffcc853306e",q.Voice_10_90="54f5ae0a-b6ec-49b7-87c6-984bb0b7ce04",q.Voice_10_91="58a85340-45da-404d-9608-9d14fc69b176",q.Voice_10_92="711f1dce-efc1-4858-8395-d95e8dc7c4c1",q.Voice_10_93="db010365-a2eb-4d56-809c-fc5d8a70ab8f",q.Voice_10_94="b3463275-de36-4831-bce1-c13c130f2b54",q.Voice_10_95="df0af4f7-6f1e-4086-b874-ca2499224134",q.Voice_10_96="4a0d25a2-b634-4df1-820e-309939839f87",q.Voice_10_97="abb370c4-5fc4-4cfa-b607-57e9adc61317",q.Voice_10_98="55328b35-268f-4d0a-ac10-d5dfce78819c",q.Voice_10_99="5b2e4bfc-c777-451c-ac64-63b0556d1d43",q.Voice_11="fbdc34da-94a8-44c8-8746-4881c2a57c45",q.Voice_11_1="33870292-9f42-4aeb-846a-32523c1e6339",q.Voice_11_2="645bc547-787d-4fcb-9e01-cc0428eab3ee",q.Voice_11_3="a50441d3-5413-492d-8ade-7d96cea8608f",q.Voice_12_1="f0629883-d0d7-477c-9d80-683149efc47d",q.Voice_12_10="1ac27643-bc73-4747-952c-cc68fed72954",q.Voice_12_11="3fb7995c-1cd4-4854-8257-d0f2fdbf804e",q.Voice_12_12="9efb4a74-41dd-4e3e-8d0c-e07816416480",q.Voice_12_13="9b8c2daa-9134-4728-aa67-ee48ed86d49c",q.Voice_12_14="f5d1916c-5ded-43cd-91b7-620f4381558d",q.Voice_12_15="4c219ef8-6694-4874-b984-7c195c7af5b7",q.Voice_12_16="4664ca14-b1c9-4fb0-a764-5d3cda6b637f",q.Voice_12_17="ddb5622b-b67a-4cf8-9e72-30d04b5aba95",q.Voice_12_18="a3bdeeb8-ce5b-4f39-ab0b-547f635f301b",q.Voice_12_2="475d98f6-92de-4dad-a201-324bd296eea2",q.Voice_12_3="f4770274-326a-497e-9904-b8b01659af4e",q.Voice_12_4="50f57a4f-52b9-46a7-bd4f-17e6331b5778",q.Voice_12_5="33bad2e5-ae92-4699-84ce-ee99f14f8fba",q.Voice_12_6="363637a0-0d33-4c58-b9f0-151b22a0c1c1",q.Voice_12_7="e9ed5001-d592-48ca-b918-efd46aee33de",q.Voice_12_8="333d5063-fddd-41bf-a95c-eb82d7767847",q.Voice_12_9="5dd95371-d5f4-4b3c-95d9-fdc3c8841cb7",q.Voice_13_1="f906dab9-56a4-4639-acf6-b0fe7be73b29",q.Voice_14_1="0f6848e1-bd85-4c8d-ae85-ac5ff8298234",q.Voice_14_2="0b25866d-33b3-4616-af2f-a25b6c4e0c17",q.Voice_15_1="fcf5a301-ef27-4589-b0f2-99be5abcc6e5",q.Voice_15_10="30dd76dd-cc4d-4b70-b4fa-79d3c0a14df8",q.Voice_15_11="02cd8f2f-3a9d-4ad6-92ab-6da9225c895e",q.Voice_15_12="08aeffa8-187e-49f1-a326-b91b85334532",q.Voice_15_13="eb243657-a7df-43e8-98e5-3fd68dfdb6d9",q.Voice_15_14="d3b6c2dc-42f9-49db-ad1b-a27a12ee0b2d",q.Voice_15_15="dc3fd45a-30b4-4883-98a0-5929fbc09ee2",q.Voice_15_16="ce9d5f95-089c-4a9b-8bcc-c123267d9aa0",q.Voice_15_17="f0cc43c3-9e3f-410d-a9a9-5c39c24d8273",q.Voice_15_18="a019226e-7975-446e-bf75-d1d496b832f9",q.Voice_15_2="e04f3f64-efe4-4feb-aabf-7b76b5ce19d6",q.Voice_15_3="90998594-7818-446e-87c0-f3bcfb53d05a",q.Voice_15_4="42b9aaec-5111-48b5-880a-fa06129abad4",q.Voice_15_5="e0da217d-7a8e-4bda-8945-30d7a51342a5",q.Voice_15_6="d4ec40f0-aa49-4620-917b-c86706401865",q.Voice_15_7="cad25c19-056f-4f04-a891-150e9e151894",q.Voice_15_8="36dbeab1-0102-4e8e-8a9a-b17e06649ec7",q.Voice_15_9="d5caf9ba-4a6d-4834-b2d8-2acf209edf51",q.Voice_16_1="d4ff6e15-07ff-407b-8267-b9e63b19b5ed",q.Voice_16_2="5e754842-534e-4ecf-905b-e1edad589c46",q.Voice_16_3="a549ec6b-de5c-478d-bb61-38d7a6f230ba",q.Voice_17_1="9dc63892-5b87-4617-97cd-aecd0b1ca0ba",q.Voice_17_2="4667104b-71f9-47fe-89b6-3188959c725e",q.Voice_17_3="7504ea16-fed9-40ac-95ef-1ed71f4ceee0",q.Voice_17_4="2e352a3f-79e0-4420-b4ef-21db33a271cc",q.Voice_18_1="52b16126-6452-422f-b926-caa25c7e92a8",q.Voice_18_2="8d3141f7-7fdf-468b-8f43-2fc7767b0a21",q.Voice_18_3="918bd95b-b98e-4ea7-a2c0-e46fdddaa823",q.Voice_18_4="5d809ec8-9620-4049-ac4a-cabfe765dcbd",q.Voice_18_5="8f5583ae-04db-419c-9b18-e1cd64475797",q.Voice_19_1="84a75a47-f8fa-48cc-8044-92e91a0c87b7",q.Voice_1_1="7901d207-e514-4ff4-a2a5-ed0312a2d640",q.Voice_1_10="6f4c05e7-15d1-4d1b-be88-564b421fceae",q.Voice_1_11="48c1d522-de68-4fbb-904b-6baa84013fda",q.Voice_1_12="a9b92570-9111-4e8a-aa37-b420e6859034",q.Voice_1_13="d2c5ce34-e31b-41a8-ac2c-28d124c7c5ba",q.Voice_1_14="9ddcc862-33eb-4668-b35b-5ec0ca108e61",q.Voice_1_15="131c2c36-8b5f-4eaf-bc43-19ae307bd9a9",q.Voice_1_2="bcca6880-e652-484e-848d-074c90119aaa",q.Voice_1_3="db819f9e-1687-46b7-a889-bee08b4b9fe5",q.Voice_1_4="163f1b05-df94-4d34-a4f0-a97c7d4a2056",q.Voice_1_5="8b3233e3-2d3a-4cce-b002-0a0a429cee83",q.Voice_1_6="b964e341-8564-4383-b0ef-58f638968677",q.Voice_1_7="a6fdb043-578b-4f03-a667-d71ce87ea05d",q.Voice_1_8="e5076a83-9296-4595-9ebc-bc4c32df228e",q.Voice_1_9="9f920d31-c2e9-412d-9b56-4184ee6a5129",q.Voice_2="c87a7825-b899-49c1-9604-604486f3a276",q.Voice_20_1="00902e19-6596-495d-b0ca-cd98aafba128",q.Voice_20_2="8e731a39-2a57-48d5-b5d5-38f6871cf134",q.Voice_21_1="c2e464bb-bf60-489d-ade0-3b824071b8f9",q.Voice_21_2="21b23b69-c804-4312-b420-6159d2efdf24",q.Voice_22_1="87a222fb-8469-4eba-bef7-a59995c317cd",q.Voice_22_2="1e07e93b-2e35-4d98-9134-b3d6509bbbe7",q.Voice_23_1="1dbdc658-fc61-4083-86ad-f4a975e9b4a5",q.Voice_23_2="410c4498-c8d3-48a9-9577-a0b1eea19b58",q.Voice_23_3="4925fb6b-9720-4c03-b8d1-cc01e82fad1c",q.Voice_24_1="5c8be06f-0e96-428f-9ca2-76701a0d74f1",q.Voice_25_1="81ebcc5b-8a69-479f-9fd1-effbb3825ed6",q.Voice_26_1="0c6b84e5-f4a4-4e4d-9a53-efcac80bbde5",q.Voice_27_1="9cbc27db-a65b-405e-9af6-09991dc3901b",q.Voice_28_1="41e1f7d9-7313-4f72-803e-750b2beacb12",q.Voice_29_1="449b0569-bcc7-45ba-8896-f48784a4c9ba",q.Voice_3="b0f7e2bf-bf73-4912-8983-ddf5c33cfc2f",q.Voice_30_1="e5e3b754-560b-4a18-8c2c-65bea92b145c",q.Voice_31_1="81c38a0a-3596-433f-9f50-3f1ad4545831",q.Voice_31_10="560bda7b-cf4a-4cc3-a385-87a675ae6eb6",q.Voice_31_11="1fe92a88-0ffc-43ba-af06-706f323b1fef",q.Voice_31_2="1384c200-e18c-480f-a678-184c6fa0cd1c",q.Voice_31_3="60b6b173-12ca-4768-b6fa-18fc73b5c4a2",q.Voice_31_4="8f61c317-72b0-4f5d-930a-3222842461a3",q.Voice_31_5="322f6541-efd1-42ab-a22e-29d6082c297b",q.Voice_31_6="651c25f2-5092-4f7a-a814-41ac2d6118b1",q.Voice_31_7="9e60859b-9da4-4e80-bbde-36ba9189fb24",q.Voice_31_8="dc8672b0-9893-4478-bd72-7ca1134f36ca",q.Voice_31_9="c6d04f55-adc6-4518-8942-8eb8581072e4",q.Voice_32_1="254ec798-db74-4600-8b14-b44e2f4f1fee",q.Voice_33_1="5c6d4f2a-306d-4562-a4fb-68c105c5d411",q.Voice_34_1="02ff5e25-b1fe-433a-a3fb-8b9ee2b5ca52",q.Voice_35_1="d64e0332-d3a1-4697-8f4c-26b77895b5bb",q.Voice_36_1="79db4bf1-b54e-45af-a2f3-4eeef0de9479",q.Voice_37_1="782be050-14d8-46d7-a3c6-025dcf0ccae9",q.Voice_38_1="e1e98afb-68d7-49ff-bf24-f6e8beaa4bfe",q.Voice_39_1="b7567b10-b8ca-4ea8-b040-c07351cb1559",q.Voice_39_2="ab6667cb-8f3c-43b8-ac98-c5979f41a493",q.Voice_39_3="857caa3f-e35a-442b-924e-914aa44c3948",q.Voice_39_4="3e2a5634-37ee-45b5-8769-c6fac7983c25",q.Voice_39_5="af7eec7e-169d-4f29-8658-82176f96ca8c",q.Voice_39_6="5dcef2df-b9c3-4605-b077-60601dbbb80c",q.Voice_4="b107ceb3-3f2a-4eff-9920-083c64d1825b",q.Voice_40_1="ef0c0e07-6a19-4010-a1eb-5d3ead249daf",q.Voice_41_1="6b65e388-71ce-4897-a651-e96a66446c1a",q.Voice_5="7dbb3a28-6630-416e-816a-9d2235356a07",q.Voice_6="c4040765-4656-4ad5-a147-53b85acc1e77",q.Voice_7="1be1bb65-5bb5-4ef2-86cb-2b634614e76a",q.Voice_8_1="17090933-1d74-4556-88f8-6936c1416cf6",q.Voice_8_10="9e9ee52a-6416-42f6-b2a2-b202653c4b14",q.Voice_8_11="d7e72894-b7d9-4b49-b00a-a49c06658fd8",q.Voice_8_12="32820842-6f0e-4c3c-b634-1333b6088561",q.Voice_8_13="4de4f67a-c7a1-41f1-98f1-1aeb08c57a3d",q.Voice_8_14="c5097d7b-7eaa-4737-b7bd-b0141ff69473",q.Voice_8_2="d268246c-7a9c-453a-9c36-d44d49ed05a5",q.Voice_8_3="68713acd-7415-4a68-b7c4-a778d1564a71",q.Voice_8_4="ec28035b-edf1-459b-a72f-008c23ebbf9e",q.Voice_8_5="22b1e4b4-d6aa-4c42-8e67-c95aa62b58de",q.Voice_8_6="4c2281f0-84ee-4f1b-a7d0-6c81a9ea390a",q.Voice_8_7="97f8654d-82c4-4f0e-b796-21e6765fae10",q.Voice_8_8="06f7112b-3a1c-495f-a592-322c2ec8e2af",q.Voice_8_9="113d9a21-b131-4eee-a7e2-bcbd22627ab1",q.Voice_9="b8ad14cc-bc8f-452f-a8a2-46df02fefafa"}(Y||(Y={}))},36648:(q,K,z)=>{"use strict";var Y;z.d(K,{q:()=>Y}),function(q){q.About_ArtistsAlley_MayJune="6a93df6c-0e28-4a2f-a31c-bdbdab1c07c4",q.About_FF_DecJan="cde70f26-33a1-4b3c-9491-e91caef3a078",q.About_HotCold_AugSept="27807234-1d15-41b9-8446-219b7e15457e",q.About_JurassicBBQ_JuneJuly="d854de9c-85bd-452b-87f3-7fb9d522b71d",q.About_Magicoin_OctNov="770fe68d-439b-4431-9ca2-e0899d607d3a",q.About_MoonlightDance_AprilMay="26f3957f-a74f-4f10-bca0-eea06b1c85f4",q.About_SG_FebMarch="cfffffd0-252a-4d03-b6e9-8eb3c8d6e783",q.About_SunkenSecrets_Oct="fbf2103d-5f12-4a26-a87c-33510dae0153",q.About_starryknight_AugSept="778400b9-fde2-403d-9226-b2f3cb03ed50",q.Accent_banner_pbf_magicoin_free="d91c9c9a-919a-4313-a0a1-4c5d265120c2",q.Accent_banner_pbf_magicoin_member="3d44b1a7-d40b-4466-b563-d2137d54fa60",q.Ad_app_download="17ee12c4-6d52-46f5-bed8-cccf13a09900",q.Ad_challenge_large="232666ac-597b-4465-86cb-44871595eae8",q.Ad_challenge_small="9015ffcd-e810-4836-927a-42f4c225d8b2",q.All_shops_button_basic="c2245984-24bd-4d1f-ab4f-8a1ba90688d3",q.All_shops_button_hover="2dc169c3-65ee-4385-be45-585c667872a7",q.Alpha_gradient="b12df35b-db7d-42bd-89e8-2fe725626e89",q.Alpha_gradient_large="d7d4292d-694e-4751-ae88-f9d74dfad4bf",q.April_2024_teacher_gift="ac5e998d-a0c8-4afd-a2a2-941eb00d0180",q.April_2025_teacher_gift="945b0ef4-6a59-4209-8976-7a1f91818da7",q.April_2025_tt_home_screen_background="37d6ad0a-b38c-4214-b940-01006e43c687",q.April_2026_teacher_gift="3e2438da-30e6-4697-b3b5-5cf6a4160cc2",q.ArchiveWheelBig="190a8f4a-ee88-4565-9c80-590673e13eec",q.ArchiveWheelFrame="7fb923e3-cb90-41e0-91db-2c954e2b1c35",q.ArchiveWheelPointer="3cb1b4b2-eefe-451f-bd80-2ae657b187db",q.Archives_season_s1_r1="6c720489-8c28-4b35-9070-58aa2731ea9e",q.Arrow_green="d9d395d1-ad6b-496d-938e-b6c6f0e8d5f1",q.Aug_2025_tt_home_screen_background="da88abfc-9ea1-4dd4-8bb2-dbfa4d71b36a",q.August_2024_teacher_gift="99146844-af5c-4908-9f73-dd47fa68514d",q.August_2025_teacher_gift="727289c5-2ace-4678-a95d-7fe0eb97b8cd",q.BTS_GearUpdate_mailer="d7597f0f-f3b8-48d3-8241-0f528290a749",q.Background="a9d8a799-09b6-4688-b5c0-6d8af305eea1",q.Background_arena="d4c07814-4cce-404d-90dd-f0236af8b3ae",q.Background_boss_rift_ice="20873d43-4230-41d6-9dd9-282f61178cfd",q.Background_boss_rift_sky="d51faf6a-819d-4fd5-bbb6-a7a7d156d7c2",q.Background_class_code="8b4aa02a-0030-4e24-88d6-cefc61776746",q.Background_moonlight="2ac28cea-f8f0-4057-abf1-38d29cd35325",q.Background_pumpkin="7744caca-6df9-4e11-a219-bc0f54877f5e",q.Background_starlight="7e9090f0-e343-4de0-b4a5-ac00be823cd9",q.Background_winterfest="12b5ea74-ae25-4cdf-936d-5138ba9979c6",q.Backing_1_cream="ed3d8628-cd54-43f1-be7b-662544f575cd",q.Backing_2_beige="4c4adfbb-5d2a-463f-9c89-4c144952e7f8",q.Backing_3_dark_beige="7615aa8e-d1f8-4704-b7b1-2a69fb0396eb",q.Backing_4_secondary_beige="352a5f6d-93a4-445c-a712-46cdc95f5754",q.Backing_battlelog="6add84e5-fe82-4c44-98e6-5a719c901095",q.Backing_bonus_reward="935b3ba4-6488-4c72-aff0-5c95be06ffab",q.Backing_dim="906d5416-484c-4f70-8282-de03ccc57aa1",q.Backing_pattern_sparkles="96245e39-235b-44f4-9bfa-ecd046276e6d",q.Backing_wood="85feead2-7940-4fca-94bb-f9b038fd90d4",q.Backing_wood_notch="3f035693-9114-40ed-80e2-1967a5ceb6f9",q.Backing_wood_small="19094bc6-e28e-4220-9e35-795ae0aada01",q.Badge_backing_empty="282d23b8-d120-49c3-bdaf-2acc8ec9d7cd",q.Banner_festivals_tinteable_grad="cb8e9ef3-e61b-443f-af6c-67a56dd27d0a",q.Banner_small_pink="357fdc8f-f15d-40ad-aca4-0940ae8e9549",q.Banner_small_purple="c4dcb310-5dc2-4c70-93f1-9e73ebb9e28c",q.BattleLowHealthBorder="59d77743-50a6-445d-9832-6c26604e4c43",q.Battle_Pass_FTUE_Screen_1="4bf4dec7-dad0-4c4a-8b05-51b4065f86cd",q.Battle_Pass_FTUE_Screen_2="abe43935-9df7-43bd-b449-3c1674905f48",q.Battle_Pass_FTUE_Screen_3="36dbfe97-8a73-44c7-af33-05bdc26f752f",q.Battle_Pass_FTUE_Screen_4="f27c16c2-5a1e-465b-b894-fd4dd6515ca7",q.Battle_Pass_FTUE_Screen_4_2024_Dec="476a975f-1687-4ebe-a8a7-0de0f9eaef57",q.Battle_Pass_FTUE_Screen_4_2025_April="42749ab2-a725-481e-8ad5-141f1107b270",q.Battle_Pass_FTUE_Screen_4_2025_Aug="eae2dfa6-87ac-4e92-8168-8d3de4f27713",q.Battle_Pass_FTUE_Screen_4_2025_Feb="b260dec4-eb94-4325-bcb1-53e1b1658b0d",q.Battle_Pass_FTUE_Screen_4_2025_June="c12d8c88-196b-4509-a973-d16dfb54ac79",q.Battle_Pass_FTUE_Screen_4_2025_November="aaeed6e2-85c9-4141-9b0c-72ccad0c9bfe",q.Battle_Pass_FTUE_Screen_4_2025_October="e8060736-a9de-44e8-8671-00e0289892eb",q.Battle_academy_gh_pedestal_bg="b437f002-af00-49b8-a2d7-25b67b5685a7",q.Battle_academy_gh_pedestal_fg="c09002e3-6695-4efd-be21-8f413e6a7e20",q.Battle_academy_gh_stairs_bg="8c3bf69a-1282-416d-90c1-57efca053c5f",q.Battle_academy_gh_stairs_fg="ca4194f4-8626-4ff4-b1f1-4d84fa0f823b",q.Battle_academy_stairs="cb20f004-bf10-45d7-ada9-9a3ba66b913f",q.Battle_archives="ffde07db-e1bb-4b0c-b724-8faae4a14d26",q.Battle_archives_bg="41f23d64-af23-4ad2-8c33-0f3ccfeaf3b4",q.Battle_archives_fg="88182fd5-723a-4ac5-9c21-ae0de5cb8b1c",q.Battle_bonfire_inside_bg="6ba91a53-b9f0-4e76-a99a-133121d1f163",q.Battle_bonfire_inside_fg="b292329a-50c6-46e7-92fb-e3b6b4fb0694",q.Battle_bonfire_lava="89f1914a-4308-4131-bc14-33507fee4851",q.Battle_bonfire_lava_bg="49f70191-39bb-4f25-832e-84f6c2b1149b",q.Battle_bonfire_lava_fg="b95d2b2d-cd94-4e1f-beac-149c9f023809",q.Battle_bonfire_lava_old="340e7581-a41d-46bb-a11a-631921f42118",q.Battle_bonfire_outside_bg="16b4a938-d5bc-41ea-9089-c308b24b7237",q.Battle_bonfire_outside_fg="ace7fd1a-3c7c-42fc-8b11-471d19098b40",q.Battle_coliseum_outside_bg="1b6e94b0-9dab-4b77-b216-93f791658f20",q.Battle_coliseum_outside_fg="09666b04-39e5-45b5-9e49-111f91ebedd7",q.Battle_forest_generic="77eedb27-a584-46f3-87a6-40e84902c429",q.Battle_forest_generic_bg="351db49c-f8f5-4076-b713-a6175f9c1c0e",q.Battle_forest_generic_fg="f5e3e053-a0f4-471d-88e9-c10404d8da07",q.Battle_forest_generic_old="76a18a73-ff12-4518-8fe4-8d1212f914a4",q.Battle_forest_outside="19a67601-ce54-40ea-ac70-8c6b3b1cbb83",q.Battle_forest_outside_bg="325a0230-611d-4d79-8c9e-784703b77721",q.Battle_forest_outside_fg="c376bd6d-ef20-4c13-a396-4085486ef68c",q.Battle_forest_outside_old="84230353-9e18-4cf6-aecf-3c68ffaad60a",q.Battle_grotto="e8526641-5073-4a97-bb4c-a8edd8550c63",q.Battle_grotto_bg="e3602904-def2-4b94-ba3f-1f2e5ae65d83",q.Battle_grotto_fg="211ad4ee-1450-4931-b4e4-4964e9e4199e",q.Battle_interstitial_bg="cfc94123-817c-4e1f-8bf3-6e1eeec93ced",q.Battle_lamplight_moonfest_bg="6b62b005-097a-4580-9701-061386e71920",q.Battle_lamplight_moonfest_fg="dddabadb-b443-4499-a8e0-a896944e727f",q.Battle_lamplight_outside="289f3ef1-58c1-4257-a739-7a73b495164c",q.Battle_lamplight_outside_bg="33d861e0-8416-4366-b640-75bd58a76419",q.Battle_lamplight_outside_fg="8088a9e2-278a-48cc-a429-be02d472fbbc",q.Battle_lamplight_outside_springfest="99ba4ee3-0bc2-42b3-a76c-505aa6956e9a",q.Battle_lamplight_outside_summerfest="c50db463-cdfa-4f28-a1f2-b2c46e8e8990",q.Battle_lamplight_outside_winterfest="87c9b456-c737-4c8c-8d85-ae07ff87daac",q.Battle_lamplight_pumpkinfest_bg="83af8521-a111-4086-8412-90998096923b",q.Battle_lamplight_pumpkinfest_fg="e96058b9-7536-4dfd-9c4f-b89a9a6f312d",q.Battle_lamplight_pumpkinfest_night="a0876a5b-71eb-49da-aaf0-0470d7e0b8b5",q.Battle_lamplight_pumpkinfest_night_bg="ebf28489-f1ca-4961-9c9a-b4833bfb8b5a",q.Battle_lamplight_pumpkinfest_night_fg="6f160c28-ca59-4b62-b5b8-ea9f0e5e9fe0",q.Battle_lamplight_springfest_bg="99a5fe98-a71a-4c17-a9b4-c85809f08d82",q.Battle_lamplight_springfest_fg="e636c55e-fde2-4c8d-870c-b7d8035fce92",q.Battle_lamplight_starlight="2ee80068-aad0-4187-aa81-84f3ea701f0c",q.Battle_lamplight_starlight_bg="e666e7f9-6294-41e6-8a7a-45fdbc61a69b",q.Battle_lamplight_starlight_fg="654aa629-489e-4cb6-bf46-fed109a439ce",q.Battle_lamplight_summerfest_bg="dc9e3505-30bd-4e74-9fc5-bc9147af52ce",q.Battle_lamplight_summerfest_fg="25f0b480-cadc-43c3-835b-ffd6e60115ad",q.Battle_lamplight_winterfest_bg="a24b5f19-0b31-47ae-ab9e-2be6854dfc5f",q.Battle_lamplight_winterfest_fg="d133013e-92a7-467e-875b-c599d5fffff5",q.Battle_map="1d2ef160-a67d-4b3e-b62f-068f0b116328",q.Battle_moon="294aa34d-24f9-4826-a309-1ff7fbb92c52",q.Battle_moon_bg="bd6ba53d-dd8a-4a7f-a68c-26161c17f5df",q.Battle_moon_fg="aa0f953d-a092-4ba4-9ea6-3e017d4f8e77",q.Battle_puppet_master_bg="fd200b15-bd62-46c1-a177-0d0c46628444",q.Battle_revamp_splash="6e202c5f-e986-4a2e-b9b7-11eff12943c3",q.Battle_shipwreck_inside="ecec9348-3818-407e-aef7-b2ec15c241a5",q.Battle_shipwreck_inside_bg="510850d9-61d9-49ed-a600-4ba7f2b7f397",q.Battle_shipwreck_inside_fg="c547d4ff-e235-4bd4-be23-b503cb6cad72",q.Battle_shipwreck_outside="8c146682-ab2a-4680-a5e3-b9910dd27507",q.Battle_shipwreck_outside_bg="d502cd37-ef8c-46d6-81e8-7c548b66dc0d",q.Battle_shipwreck_outside_fg="bc6618a6-f008-446e-8ead-5391c4cce57d",q.Battle_shipwreck_underwater="6c77836a-db22-49c8-8168-ebe566764b6a",q.Battle_shipwreck_underwater_bg="9e53b099-9941-466f-8ea8-e6e7d0126049",q.Battle_shipwreck_underwater_fg="c883bf41-56ea-4415-bd75-1157fa748a67",q.Battle_shiverchill_inside="027df5e9-b930-4700-8a6e-f234fb0989de",q.Battle_shiverchill_inside_bg="b7555e19-a333-47c4-ab5c-7eb5dc06893e",q.Battle_shiverchill_inside_fg="a5a80e5b-5680-4b3e-a53f-6155540dcc9c",q.Battle_shiverchill_outside_bg="0d6c6911-c576-4200-8a99-7be16d46e7e8",q.Battle_shiverchill_outside_fg="c14e6f6f-83dd-48ac-970a-4d9cd6d30f59",q.Battle_shiverchill_outside_old="1f4c3639-355f-4762-afa5-ffe42862d02b",q.Battle_skywatch_inside_bg="bec82905-9385-4c6d-a27a-2027d27d9f0f",q.Battle_skywatch_inside_fg="d87f5a6b-64e8-4afd-ac23-a9905ca5e2a0",q.Battle_skywatch_outside="84b91294-49d6-4481-b3e8-48a22b30e9e8",q.Battle_skywatch_outside_bg="29189a36-c263-472b-9375-6340c7e5486a",q.Battle_skywatch_outside_fg="858eb9e5-97cd-4d79-bd4a-66347b53f294",q.Battle_tower_inside_bg="6689ef4f-ed14-4a10-b50b-7c51aeb172ef",q.Battle_tower_inside_fg="d21d9862-1f9a-42e6-988b-efcd34f5f397",q.Battle_wizarddash_bg="fb925c0b-5939-4eb1-ba5c-aa77182f39b1",q.Battle_wizarddash_fg="55daa75b-ee5b-4a1c-bec7-e7695bdb2905",q.Battle_wizarddash_fg2="a97e897b-2fe9-4de2-8042-f7a6bd05e08e",q.Battle_wizarddash_outside="56567ff6-79b0-4eac-a5cf-b8d03ef8c284",q.Bg_battle_academy="22a20bf3-dd2b-4f89-8086-907733a339b0",q.Bg_battle_arena="d5810e2c-5d94-4cd1-87b1-2608a1e3c726",q.Bg_battle_cloud="d249015c-59d2-45f5-a977-282fb639bb5b",q.Bg_battle_dino="fbc909f5-5f70-462f-9a3f-1d432d8af2a3",q.Bg_battle_forest="f7dbf566-f2f1-4d47-9b02-29bb4fbc0956",q.Bg_battle_mountain="bff86add-432b-4ee1-bcd9-68c9ea56f6e6",q.Bg_battle_pirate="1c8be200-2d6b-4157-8506-edefa20a7bcc",q.Bg_battle_shipwreck_beach="a45e070f-5279-4946-afce-ce1f467179d9",q.Bg_battle_shipwreck_underwater="43b05a79-5dcf-4d9d-be5c-45b47c7200fa",q.Bg_battle_tech="55ca142f-fe61-47a5-829b-5dd789c6fb3c",q.Bg_battle_tower="707c27c0-5389-49c9-a677-aaa5c046a1b5",q.Bg_battle_volcano="6742be04-500b-40cc-bbab-df0be52ded1b",q.Bg_calendar="0e6e8c32-47de-4bac-8e54-c8496a33347d",q.Bg_calendar_v2="d80afbed-3612-46ff-929f-4d01e989b2a1",q.Bg_floatling_fling="96623e14-59c3-465c-a190-c9b29a7f5c1e",q.Bg_generic_outdoor="feef9cf3-47aa-4728-a7b9-fc80d1900cb7",q.Bg_postbattle="875f9adf-8992-488b-9e64-417488fb3bf0",q.Bg_postbattle_magicoin="8fcd40c5-f035-42dc-a08e-30c685365ed5",q.Bg_pumpkinfest_ui="19a2abd8-5739-4cc1-9d9e-da6fdb8ff7bf",q.Bg_springfest_ui="d3604e95-e752-49b4-bba0-632c119e909e",q.Bg_springfest_ui_02="6158e3e0-7ef6-41d6-9ba9-89ece91e5077",q.Bg_summerfest_ui_01="235b8ffe-f623-4de4-ba57-2698b848a46f",q.Bg_titan_ui_02="79ae07c7-c11a-431f-814a-4622ebe99939",q.Bg_winterfest_ui_01="1f7e4012-8c2e-4d7a-8ab0-9e4838c6c049",q.Bg_winterfest_ui_02="7b5e5ca2-54d8-4978-9ae1-f308adcafdf4",q.BigthingstrailerYTthumbnail="d0205c4e-53e8-41bf-86ae-1a97437205d3",q.Blur_tier1_tier2_back_small="3c3699b1-eb41-44ed-8cd4-c35ff848386f",q.Blur_tier1_tier2_front_small="6ede1bcd-bba2-42cc-9457-e62029780d1a",q.Blur_tier2_tier3_back_small="e664aa7f-1fbf-44f0-bc36-30c0f9cc60c9",q.Blur_tier2_tier3_front_small="a5b990b7-ce0c-4d85-8013-7be26f8b719f",q.Bonfire_intro_1="06b07398-3193-452c-b8b5-882454335eeb",q.Bonfire_intro_2="864be244-dcea-4a0c-9915-d25b29b75e27",q.Bonfire_intro_3="f56f0b6e-3416-464f-aa29-414ab05907ed",q.Bonfire_intro_v2_1="cd3e2167-8a7c-416a-9515-9b1afb077194",q.Bonfire_intro_v2_2="9ce4e043-242e-4cf9-80be-770650ebdae1",q.Bonfire_intro_v2_3="5f59b8ec-7357-4d66-9114-6a4c9be5e7c4",q.Book_ui="1f5c6ea6-1f87-4f2b-92bb-90393bd5935a",q.Boss_shadow_cebollini="89346d11-3e0e-4ce6-aa24-b1f72ab6c360",q.Boss_shadow_gerald="731255e7-c9e3-4430-b81b-dfae29642ce5",q.Boss_shadow_ice_wyrm="30e15ae5-abfa-4305-bc06-0bd187d78854",q.Boss_shadow_nasty_cloud="dc8a4c4a-9b01-4739-8023-e0f7d899a9ba",q.Boss_shadow_old_one="cf00167e-f118-4c73-8a5e-8857dac762a3",q.Btn_dyno_blue="36ace350-a4f0-4922-a539-411812418d14",q.Btn_dyno_magenta="93e025cd-0c9d-4f7f-beb7-b98ab3658a20",q.Btn_lamplight_pumpkinfest="5aa590de-b3a3-4dd6-aa0c-ade9aa39e2b8",q.Btn_lamplight_springfest="035f70fb-d91d-41a9-bbf9-0e0bede11d65",q.Btn_lamplight_starlight="c3dd173f-e91c-4291-801a-05f5df983bad",q.Btn_tower_blue="1476b951-1ef3-44fc-a08a-080b95f225f3",q.Btn_tower_magenta="d8e14379-1f40-4852-9151-35aafff3e89d",q.Btn_towertown_blue="2e7ec46b-1f9f-4135-aa3c-2cd00d9a16a3",q.Btn_towertown_magenta="b6aa202f-f6ac-4f60-afa5-ea4da7dfbaac",q.Btn_town_moonlight="59f97607-89ee-4b20-b62d-2584f9c17760",q.Btn_town_winterfest="91a7fc3e-0d31-4e18-8124-9cd012a95bdf",q.Bucket0="a50c59dd-44d7-4d6b-b410-006fd7678f2c",q.Bucket1="6a330d2a-d315-41fb-8497-ce421b5999f5",q.Bucket2="4fe18160-7312-44e8-93f4-6db53de1c5ae",q.Bucket3="6eb98eda-e918-4e9b-b968-c7187a80fbca",q.Bundle_gold_frame="41c15819-baf5-464b-b25a-ea2592d63e0c",q.Bundle_storefront_decor="122b210b-6320-4041-bbd6-19f9dd1827ac",q.Button_emerald_medium="23a47cdd-8a75-42dd-b07e-666c2927f8a9",q.Button_marble_medium="ba54762a-7e30-4934-ad6d-c071d3103e6d",q.Button_ruby_medium="ce6ad281-108e-47b7-b7bd-83343c66b470",q.Button_saphire_medium="c64eca7b-2b6d-4aef-b2a7-44bd54e70a18",q.Button_stone_medium="e2326f53-b7cd-4244-a6ac-ff55bec6286e",q.Camera_map="37174f1d-2e40-422b-9703-4b0d85d69db7",q.Candy_Corn_Promo="ab5fed41-516f-4eb9-a12e-e1ea65b8f340",q.Cannon_ball="992b9327-1e78-48b0-a583-966f67a97668",q.Card_reveal_130x130="febc75d1-5ae6-4c8a-9890-f6778fde9866",q.Card_reveal_yellow_130x130="c55e348e-df17-41b7-861f-9f2b6a424575",q.Cc_shadowWyrm_mound="752efa09-3484-4baa-9838-6d4f6f345e8b",q.Character_1_long="a95aabe6-7b4f-4de6-b635-a7d6634f0036",q.Character_1_short="ef85f824-8fa3-4438-aef2-ee4272fba962",q.Character_2_long="a22645b2-4518-430a-ac7d-1f35ee22d2eb",q.Character_2_short="1e58496f-1bcc-403e-9b4d-895be3612fc4",q.Character_3_long="07f4c036-893c-4a78-87fa-c3b11aff7a3f",q.Character_3_short="99dab1ca-685b-49b1-8d7f-ceaf18a52afe",q.Charged_levels_mailer="22662a50-0c47-48f8-af1f-ac066ecf7b19",q.Charged_levels_mailer_ultra="d8918507-82b9-4e92-ad17-fb88b60766d1",q.Chart_elements="5641e94b-03e1-43fb-9299-e53334131ec4",q.Chest_gold_closed="a709d3bd-4a5e-41d4-90e2-0034dd469e65",q.Chest_gold_disabled="b44aaabf-614b-4c6e-ae63-e2fff70ab5b2",q.Chest_gold_open="c121599e-8d8b-44c4-b541-1c693bdd534e",q.Chest_plus_closed="dcfc52ce-9724-44c7-8582-2e170c5fabb8",q.Chest_plus_disabled="2bcac690-df88-462f-8009-0ecfb0acadf3",q.Chest_plus_open="cc444397-19cb-4496-a491-8fc3f0378dbe",q.Chest_ultra_closed="a6d1e967-40ac-4f91-860d-cdfc16767927",q.Chest_ultra_disabled="9b9fce35-6142-4d5a-8114-bb49d64b8b02",q.Chest_ultra_open="889607e1-297d-42cb-89ef-31d2ae820e6d",q.Classroom_reward="c626cee9-7f05-436b-a347-ca86f023d109",q.Cloud_1="13a29059-c116-4faa-ae11-9bfc57dc53d3",q.Cloud_2="02fb27fd-29c9-41a7-b771-5537c8a1507a",q.Cloud_3="bb8c549c-36dd-4819-b047-fa0a2943b835",q.Cloud_5="1a3ee237-60be-44c8-99d8-bd29abe1dcdc",q.Coffee="10d2a756-3bb3-4101-be68-3c2a4a0881d6",q.Collect_badge="9d1795bf-a6b5-4a3b-b165-13d806461703",q.Connector="1f40fc06-4ee3-41cb-af13-47465cded3bc",q.Connector_arrow="23b4ad0d-6ad1-4ab0-b24c-339888fad809",q.Container_dual_buttons_clipped_corner_small="57043f8c-4166-4df0-8a82-bc88ff0f3282",q.Corner_title_card_base="a3e4a924-6c77-4825-926a-9efb414fed2d",q.Corner_title_card_calendar="65f00391-55ce-4ee7-b856-123a4d63917c",q.Corner_title_card_member="fcfd2bb5-ec6e-4f07-beb6-1b25f2c772ec",q.Corner_title_card_tintable="6f06438a-2184-4bae-8a81-6f0480762f60",q.Create_parent_account="2157060c-5361-4a13-a564-cf3c0be73f89",q.CurrencyWeekend_gold_coin="3c45cfa8-a35c-4a5e-bbd4-fc01a6f73d27",q.Dance1icon="1669f0b8-e58a-43ac-80fa-5eaff641031a",q.Db_hammer="3319f075-0acf-4d03-bcfe-abad5590da2e",q.Db_moonwalk="00e1c093-cc0f-4a40-b902-7d2feaac099f",q.Db_runningman="2f3ac52c-27a4-474d-8ebb-5f07a2fc8f2c",q.December_2023_teachers_gift_snow_fox="b42f12ec-e31f-40bd-a381-48f64d58600b",q.December_2024_teacher_gift="0e193b10-328e-40ad-9ce6-38a250efab6e",q.December_2025_teacher_gift="ce1ec2e9-389c-455e-84bc-3987b42b6312",q.December_tt_home_screen_background="f9787e55-62e5-40a3-b98f-ba899560a4ef",q.Default_loading_screen="0f010710-289d-41ff-9861-519b1b4f0a21",q.Dialog_backing="bf67e08f-de01-4ade-bb63-3594bbc3567a",q.DragonOrb_1="0cc2bfa1-9b87-4572-9ac1-b832daff107b",q.DragonOrb_2="f79d74cc-3069-4587-a6ff-72b8ebb03593",q.DragonOrb_3="7a710425-cad8-4020-8f18-ca316963027f",q.DragonOrb_4="9541cc6a-b4e8-4e11-a65b-de6fde686d24",q.Dragon_rift_coming_soon="bbd676b7-72c0-48a7-8b02-9c47f3bea020",q.Dragon_statue_glow="4f32bdc3-5929-4ea6-ac3c-d32dcc0f88d9",q.Dragon_statue_glow_night="c4d787d2-0041-464a-854d-8e588ec2478f",q.EarthWheelBig="0f3c01eb-cf3f-4536-8e96-e0710b771426",q.EarthWheelFrame="267307e9-9389-4d72-a736-e6994ad30bf5",q.EarthWheelPointer="2163b7b2-1eca-4d2a-9ac5-41a5736c515d",q.Effect_accuracy_buff_1_mini="c53d079f-9ab4-4724-840c-7fd3d8cfa41a",q.Effect_accuracy_buff_1_small="449b187a-0212-411e-8aaa-c76281dbf442",q.Effect_accuracy_debuff_1_mini="af6552f5-5727-4eb8-a9a3-7a92ac9c932e",q.Effect_accuracy_debuff_1_small="45b06dee-3da7-481a-8ec0-064dbb877abb",q.Effect_anti_magic_shield_mini="6da1035e-e826-4a32-9a4c-4bde2076031c",q.Effect_anti_magic_shield_small="246f25a8-fcf9-4a64-8008-aa5adaba95b7",q.Effect_astral_absorb_mini="667a5d98-7703-476a-af24-7791ebe81265",q.Effect_astral_absorb_small="59ffa032-4c5c-4924-b8a3-0ab7d388f5d4",q.Effect_astral_buff_1_mini="3243b5f3-6aff-44a9-9458-7b97c1ef7b5e",q.Effect_astral_buff_1_small="d18b5275-3b84-441e-beba-6376088a5664",q.Effect_astral_buff_2_small="3f06d3d6-9a8b-4bf2-84e0-00b5e2bdb3e9",q.Effect_astral_debuff_1_mini="7608919d-9cbd-4464-add9-85a4f57df64e",q.Effect_astral_debuff_1_small="c7839228-7e81-4fae-a35a-2c69a90bb1dc",q.Effect_astral_reflect_mini="1e03b19c-2855-4c1f-a3fc-e13c6305bc3c",q.Effect_astral_reflect_small="79451739-a2da-466d-b7c3-c48199c3eb4c",q.Effect_astral_shield_mini="afbe4e0a-a0d6-45ba-838f-53d966c58266",q.Effect_astral_shield_small="b17d5a37-044e-4621-b4cb-9b054da93f2d",q.Effect_crit_buff_1_mini="fe14460e-0b3f-4ad7-a430-9cce574dfaf3",q.Effect_crit_buff_1_small="924c672a-63ed-4f4b-8cd9-1e9ba6853db2",q.Effect_crit_buff_2_mini="ae4c2715-48b7-409d-8ec2-f5530e75b3e5",q.Effect_crit_buff_2_small="25ea9f42-a8d2-4db4-91c4-6c83857239e8",q.Effect_crit_debuff_1_mini="25eec472-fa3a-4b35-80a1-6aecf6566fbc",q.Effect_crit_debuff_1_small="23eeed3f-bca8-4b16-aa62-7fda81fcce20",q.Effect_crit_never_mini="164cbcda-9720-4c16-ba19-6f26e90a709f",q.Effect_crit_never_small="a9352b7f-cc7a-4944-b139-a469ee9cc25c",q.Effect_defence_buff_1_mini="67bcf47e-cf2c-409a-bdea-57cf8e12297c",q.Effect_defence_buff_1_small="5efb35be-639e-48c7-8af8-8a4a941c1929",q.Effect_defence_debuff_1_mini="44c76791-10d2-4f6c-a13e-276fa346a254",q.Effect_defence_debuff_1_small="0ba5f3dd-6f80-4877-9629-67eda18fd966",q.Effect_equipment_no_mini="3ca1227e-8b7a-426c-8575-ba6d9d1ee8d9",q.Effect_equipment_no_small="c3e3c27c-1897-4f26-8995-ce30d8d3aec4",q.Effect_fire_absorb_mini="eb3331ff-384d-4afa-b129-c727ba410f26",q.Effect_fire_absorb_small="49eab690-f21a-4450-8310-b637b90a7ab4",q.Effect_fire_buff_1_mini="8a9f291f-b7a7-4305-81d8-2deaf9b53d0d",q.Effect_fire_buff_1_small="512ef00f-7c44-46e0-bbce-18c25621b40f",q.Effect_fire_buff_2_small="c1780461-7692-46f5-ab6c-f023991d32c4",q.Effect_fire_debuff_1_mini="daab793b-6e29-45ec-b571-7d3a04d5820b",q.Effect_fire_debuff_1_small="ec686c29-f9a1-4291-ba18-509feaa14eb8",q.Effect_fire_reflect_mini="7d82a9fe-7ff3-4f6f-b069-76a9a8b6f71f",q.Effect_fire_reflect_small="5a72b9dc-0497-491b-ad4d-c711f2eed8d6",q.Effect_health_buff_1_mini="335a2890-8e36-49d8-bfe2-edddc55bf324",q.Effect_health_buff_1_small="e468dcf8-7acd-4cd6-af04-8df2ac183495",q.Effect_health_debuff_1_mini="8a40ea6a-9ef6-4f29-bda7-f66602fd709d",q.Effect_health_debuff_1_small="82ba9a52-a23c-475b-94b4-9aeb963fadb4",q.Effect_health_degenerate_mini="10a06bf8-8cea-4db4-a59d-da27b10f2223",q.Effect_health_degenerate_small="4be9b677-8f83-4e15-8214-0b59ac43a666",q.Effect_health_regenerate_mini="4de04183-3766-4e8d-ac83-f2b1b3f64b70",q.Effect_health_regenerate_small="d5d59df0-297a-4344-9aff-19594b2fc780",q.Effect_health_survive_mini="13e9897a-b6c3-42c6-99f8-69290f37eed6",q.Effect_health_survive_small="d738435e-1279-46f9-a1e7-f94e05ce6d56",q.Effect_ice_absorb_mini="c48afad1-92cb-40ab-b0b0-be746802358a",q.Effect_ice_absorb_small="ec4764f7-5bdb-4f06-b992-6bb5a0980548",q.Effect_ice_buff_1_mini="da3bcb2b-04d8-42c2-b155-e0cae1b74d09",q.Effect_ice_buff_1_small="4b1156cd-68c4-4560-98d0-7478d732abd9",q.Effect_ice_buff_2_small="46e8d016-56e4-424b-adad-7bff139002b4",q.Effect_ice_debuff_1_mini="9280c470-1271-494d-b2e4-135ae962a643",q.Effect_ice_debuff_1_small="b4b86645-a853-4415-b891-2cb825878e05",q.Effect_ice_reflect_mini="b8ba88e1-e814-4d25-978d-0a9972d8c7b2",q.Effect_ice_reflect_small="a001975b-e6e0-40b9-aa9c-12775f2c8f09",q.Effect_pets_no_1_mini="2b6a451d-33a8-4b30-92c8-26274c6f80a3",q.Effect_pets_no_1_small="744f972c-69fe-48ef-85b8-d095f541d751",q.Effect_pets_no_2_mini="e06f607f-042e-43f3-a54b-8599e17f4a2b",q.Effect_pets_no_2_small="492402a3-64ac-4da4-8c11-27629178e7ba",q.Effect_pets_no_3_mini="ea8dd1ca-867c-41cb-a066-271ed53aae9a",q.Effect_pets_no_3_small="a6872be5-bb08-4e28-aac5-82e3bccdd1d2",q.Effect_pets_no_4_mini="3e5b7454-86ff-4f28-b8e0-e7c05cff3c96",q.Effect_pets_no_4_small="888364b0-bec9-4f4c-841f-0c68b5355c41",q.Effect_pets_no_5_mini="8bd894e2-a875-4c90-86df-dff8f8ae65c2",q.Effect_pets_no_5_small="fe0720aa-f362-4c36-ab49-5937a45194e7",q.Effect_pets_no_astral_mini="b8d7e991-f4e3-4c2a-9ef4-6b3c111e957c",q.Effect_pets_no_astral_small="9bad211f-56ab-4460-8ce1-39e0e48f60c6",q.Effect_pets_no_fire_mini="6c1e288c-de01-422b-820f-eb6eafb23875",q.Effect_pets_no_fire_small="75d13b06-2726-42d7-ae0f-5f05398bc767",q.Effect_pets_no_ice_mini="66832e72-dc7d-444d-930d-58d99cd121a2",q.Effect_pets_no_ice_small="cf0ab767-caa4-45f7-a977-09332f459b1c",q.Effect_pets_no_physical_mini="3f27ff6e-8ce4-4f5b-a9d7-e95b9212809a",q.Effect_pets_no_physical_small="b95780f0-fa45-4613-83f2-970c6fb388c2",q.Effect_pets_no_plant_mini="eebf8ceb-32f6-4a26-a427-ee7473e297e3",q.Effect_pets_no_plant_small="946d8a2f-d32b-401e-ace6-c338a2ab71aa",q.Effect_pets_no_shadow_mini="773a68cb-b248-4004-acc9-eaf0787f130b",q.Effect_pets_no_shadow_small="da618446-c36f-4634-9d29-261b3258a94f",q.Effect_pets_no_storm_mini="57dcc553-b727-4220-a4c3-475a5c97f914",q.Effect_pets_no_storm_small="4b79c153-3900-4901-a51c-d80240545d99",q.Effect_pets_no_water_mini="fa093e33-93ae-4ca7-9d7d-8b96266abbea",q.Effect_pets_no_water_small="e701688e-5044-4e8e-89e6-29f8345ff7f4",q.Effect_physical_absorb_mini="9d821334-90c9-4199-8e9f-327aa11a1915",q.Effect_physical_absorb_small="bc367d86-1e82-4faf-b7f7-cacf9a7a44d9",q.Effect_physical_buff_1_mini="ff510a5a-6610-474a-9f48-1dfa7339c7a2",q.Effect_physical_buff_1_small="25f74665-0058-472a-b074-3e6bc23000b2",q.Effect_physical_buff_2_small="303251c3-cb6f-407c-bd67-84949dc761c3",q.Effect_physical_debuff_1_mini="57870911-4e5b-436d-b7c8-ed9c480fc6eb",q.Effect_physical_debuff_1_small="0d4a7fc6-69ce-48d9-b924-d17a1eb5c6df",q.Effect_physical_reflect_mini="b3e2befa-048e-498a-9a39-a6715a54574b",q.Effect_physical_reflect_small="d14992f3-fd4a-48a8-b9cc-3a1e2e193e23",q.Effect_plant_absorb_mini="aad5a902-dcb7-4b67-89ff-19daf9c80be0",q.Effect_plant_absorb_small="2618205c-25ac-47c9-a9df-bb04328f4a48",q.Effect_plant_buff_1_mini="5f4bc1e9-cf78-4e2e-a566-267afc5c5521",q.Effect_plant_buff_1_small="283883af-634b-4fb2-872f-fb07cad16bbe",q.Effect_plant_buff_2_small="a8f38ef9-1b3f-4707-b9ae-388e9ceadcb6",q.Effect_plant_debuff_1_mini="d115b170-16ae-4a94-8304-7aac57959e8b",q.Effect_plant_debuff_1_small="920aab75-b9ba-4dfb-935a-be0b9ea4d9f3",q.Effect_plant_reflect_mini="8bde27bb-528f-438c-b9c5-b09528d89489",q.Effect_plant_reflect_small="2fd5f267-63e6-48ae-9540-6c6ce4e00c7c",q.Effect_power_buff_1_mini="dbbe190a-c51b-470f-a453-87796b32c8fe",q.Effect_power_buff_1_small="abf367ee-f194-42ec-a887-df3bf3740655",q.Effect_power_debuff_1_mini="7edf25d1-28bc-47dd-a90f-f7927f6c4c05",q.Effect_power_debuff_1_small="8702f2ed-2777-4aef-b278-bc0e11ef30e2",q.Effect_revive_mini="cb8c7dc3-3dbd-4fec-bf43-11b108e7c944",q.Effect_revive_small="03f5add4-5118-4eef-ac48-ef73c31391fd",q.Effect_shadow_absorb_mini="912f056a-5e46-43d9-a189-1daef2de1f64",q.Effect_shadow_absorb_small="396a63ba-aba5-4765-941b-bcdb30c6e8fd",q.Effect_shadow_buff_1_mini="49b8d6f4-6d53-474b-94b8-f7b3201d216f",q.Effect_shadow_buff_1_small="1192b17f-67aa-4de5-904b-e12ed3fe8304",q.Effect_shadow_buff_2_small="c24fdeee-0f0c-4a17-a4fc-b839cc59f65b",q.Effect_shadow_debuff_1_mini="f6a8f99b-561c-4fbe-8409-a3b0429f63cb",q.Effect_shadow_debuff_1_small="e81e6cb0-c295-4355-a21c-c0cdc7f4a1fb",q.Effect_shadow_form_mini="bea672fe-1ba8-4a84-94f2-de64976aa334",q.Effect_shadow_form_small="5a3d5b03-05d1-4999-8bed-962d79906be9",q.Effect_shadow_reflect_mini="a788e431-662b-4548-8010-3dcea6355c50",q.Effect_shadow_reflect_small="99e8824f-b915-456f-9dd2-d9fbb42801ab",q.Effect_speed_buff_1_mini="59eafd49-5656-4e8c-935a-26ea04fdbb04",q.Effect_speed_buff_1_small="050a7873-f865-4db1-a745-5dcbd5dab36a",q.Effect_speed_debuff_1_mini="218d7e46-522e-4a2b-8051-a82f4eca63bd",q.Effect_speed_debuff_1_small="79eafb60-318e-4d81-b614-f79466695593",q.Effect_spell_cooldown_debuff_mini="133e978f-64f0-4342-ae8c-01ce773b277b",q.Effect_spell_cooldown_debuff_small="86515e2c-11fa-40a4-891d-a543ea7b263f",q.Effect_spell_random_mini="482f8804-212a-42e8-8955-68b71c104c90",q.Effect_spell_random_small="6d4f9612-61ff-4f01-ac94-00941970e39e",q.Effect_storm_absorb_mini="7a9dfe5a-ee43-4a62-9eb7-bb9c8d9426c2",q.Effect_storm_absorb_small="3d19dcb8-cb05-4663-ad44-a75d78bda149",q.Effect_storm_buff_1_mini="f56a5c25-f448-4a98-9d7e-52c11b554bc2",q.Effect_storm_buff_1_small="32777f2e-81fa-4551-a3ee-fe44332d11dc",q.Effect_storm_buff_2_small="dbf20643-8add-4574-b2e6-e153258850b6",q.Effect_storm_debuff_1_mini="40b63572-2591-4a12-a186-efb8f48d0b22",q.Effect_storm_debuff_1_small="4a3d2242-0fa3-453b-835b-6319d30ff983",q.Effect_storm_reflect_mini="27e959e2-b76f-436e-aa1b-e06ae086fac7",q.Effect_storm_reflect_small="80d4f71b-a85b-4688-b67d-271dffe1d37e",q.Effect_timed_mini="ab1d47c8-d0a3-4f50-b17e-65ba0ec55590",q.Effect_timed_small="de182b75-1187-4348-a601-ec0531730882",q.Effect_water_absorb_mini="416094e3-28ad-41a8-923f-88e09b96fe3c",q.Effect_water_absorb_small="54f24470-6e5f-4a58-b9a6-ed94eb6caa3e",q.Effect_water_buff_1_mini="0ffce8d4-5d0e-49f4-be40-92ceb5a80338",q.Effect_water_buff_1_small="e02da00e-f978-4097-a458-d6fea0e335a9",q.Effect_water_buff_2_small="be8423c7-473c-432b-b775-880224d0e479",q.Effect_water_debuff_1_mini="372eb1a1-142e-4048-b585-fd25c5070957",q.Effect_water_debuff_1_small="b4c992dd-f982-4ac5-9238-83b667e63e0c",q.Effect_water_reflect_mini="779eb6a1-cb2b-42b3-8a2d-18339eba194a",q.Effect_water_reflect_small="c41ec3dd-f4f0-416a-af98-40ad7782d669",q.Emerald_large_active="dc1229e3-08b9-4a29-a526-16cf1552b437",q.Emerald_large_default="77908517-e6df-4550-8752-ca90c32b9c3d",q.Emerald_large_hover="131e66f0-006d-4255-bd73-12b7b8b30bb1",q.End_frame_icon_home="eb03215d-a106-4485-bc46-21ecae5cb755",q.End_frame_icon_membership="34ee8b41-175c-4d77-adcb-f225acf7b65b",q.Existing_member_tooltip="246f75c0-6b11-44fc-a1c4-4a2dff131122",q.Face_01="c27e881a-b3d8-4e27-a5e6-56d5ba600104",q.Face_02="818ecd67-d4cf-4e6a-a7ff-53c347c1792e",q.FeaturedPet_HUD_BG_Astral="ac9256b8-93d7-4fe6-930b-a6c7f0f64f38",q.FeaturedPet_HUD_BG_Fire="afcec615-03f3-4d71-80b4-3595e1c37550",q.FeaturedPet_HUD_BG_Ice="a3cb7c55-b6f3-4a38-aa58-5eac35042ad9",q.FeaturedPet_HUD_BG_Physical="1489e248-ba17-4c57-8f8c-33aee57ad041",q.FeaturedPet_HUD_BG_Plant="f9b8b02d-9c39-46e8-b464-93f108194001",q.FeaturedPet_HUD_BG_Shadow="d179156d-d4bd-4ade-8dc7-bbb6649c217a",q.FeaturedPet_HUD_BG_Storm="ba735928-07e4-4e52-8d9b-8a2e1a3ddb8e",q.FeaturedPet_HUD_BG_Water="bf392a71-9c02-4fc2-bc8c-c46c8a07741b",q.FeaturedPet_HUD_FG="54355e9a-386d-4ae9-a2a2-89d489c334ae",q.February_2024_teacher_gift="d4bc3b8e-7873-46a3-b38f-88c8b8f7895d",q.February_2025_teacher_gift="54482e83-53a0-4cbd-83a7-2d4647f9f392",q.February_2025_tt_home_screen_background="569b7cf2-43af-4276-85a5-581109336e0d",q.February_2026_teacher_gift="7640b268-6bb3-44ec-8f59-9b2e3499ce25",q.Fill_bundle_gold="bb2b22e7-a7ff-450f-b8bd-1a2fd0773201",q.Fill_plusmember_background="d6c921b0-3112-4393-95e4-17572113f067",q.Fill_ultramember_background_full="7d2073ee-6e20-4f16-9303-812a08ecc240",q.Firefly_intro_1="0d7e5e8d-7c55-4167-9efc-4c7e508afc60",q.Firefly_intro_2="56acca89-eab7-4917-a4c9-4a5593c5b7bc",q.Firefly_intro_3="acee2efb-6c0f-4069-95dd-56084cc7681f",q.Floatling_limiter_popup="98e3961f-fe37-4adb-9f27-40fe8ecd8215",q.Fog_1="bda15c51-89f7-4b8a-b3e4-4c7c1d71a92a",q.Frame_difficulty_expert="ad53b50a-7f5d-425a-81f2-c5e5c518dbe0",q.Frame_difficulty_hard="038ff741-5825-4a15-9be5-104a502f09ed",q.Game_Splash_Page="52edeca5-8047-4647-ac11-36e1c34c0bc4",q.Game_island_launch_modal="27b9ed9f-1e62-451b-aa6e-54b903635867",q.Game_mode_confirmation="c816d079-8b34-4db6-9907-e5cea39cf735",q.Gate_moon_open="82615ece-6f17-4723-b4c1-d383c450c2e8",q.Gift_reward="181ac118-48c3-43f0-84fd-43cfaf4758be",q.Giftbox_state_challenges_shadow="b45a2261-334e-434b-b80e-237fe4e4e7de",q.Gold_medium_active="25bf927e-7a6f-49bd-9b41-be0f6d72a9a4",q.Gold_medium_default="6c525afe-f80f-4dda-a684-1cef6ae685bf",q.Gold_medium_hover="4fd0c163-5042-420e-93ab-e5b6f5a98ead",q.Golden_page="fd4e0676-1293-4c0f-941b-695089d257e6",q.HUD_backing_no_shadow="3fdc0762-9b3c-4d2d-b3e6-c0fda25b4d8d",q.Highlight_burst="56307e29-713e-4415-b6e4-e039c1acf9e2",q.Holiday_challenge_2024_reward="8d02ab5d-2787-4eeb-a006-f45046130bf7",q.Horizontal_dorm_1="944ea85e-01d0-4782-9e7f-7efd51156471",q.Horizontal_dorm_10="934f58fd-ecea-4eaa-8f75-8c578e51a018",q.Horizontal_dorm_100="13214aa8-db57-41be-ad68-c4c430dabcc8",q.Horizontal_dorm_101="00231d99-199b-4b00-9b8e-c0b306025550",q.Horizontal_dorm_102="3183d829-000c-4326-b8e5-dde2f01a0762",q.Horizontal_dorm_108="97204e47-138b-4aa5-a6ec-3c99b2288b3a",q.Horizontal_dorm_109="16f2337d-632e-432d-ac79-ca61dd783df7",q.Horizontal_dorm_11="b4caa685-6889-40a0-b890-a52afd706616",q.Horizontal_dorm_113="1ae19a5c-355a-4a23-a9de-c7d191a45c4a",q.Horizontal_dorm_114="5c1bbc2d-ed08-4aef-8b71-d2cfd964d9ff",q.Horizontal_dorm_115="279dd049-faf7-4b1f-b52c-d1e9572fd1d5",q.Horizontal_dorm_117="d6739fa7-277a-4b15-83e4-4971cb86ee0e",q.Horizontal_dorm_118="5cf29244-2091-42ac-90c2-a16fc72a1773",q.Horizontal_dorm_12="087ea007-4dcd-4feb-9668-a907ef082878",q.Horizontal_dorm_120="6f162c6f-0177-4fd6-8869-04d59d6a5020",q.Horizontal_dorm_123="0c67b5bd-7494-471b-a1d1-4555fcc8aa23",q.Horizontal_dorm_124="c5062637-15f6-4eab-b6db-b1b859ebc5a5",q.Horizontal_dorm_126="4f117952-3559-444a-a0b7-43909fa99e3a",q.Horizontal_dorm_127="bb9d52f8-bf29-48cd-85c7-3f3725b15b0c",q.Horizontal_dorm_128="cf5aad1a-94f4-4216-a9eb-c3299f7e33f7",q.Horizontal_dorm_129="9113044a-7be4-4c17-80dc-c081da64ffd1",q.Horizontal_dorm_13="489961a2-8ec7-454f-81ff-ce1f3cdcaa55",q.Horizontal_dorm_130="0303923d-c6b3-4304-a117-fd52d02a0b5c",q.Horizontal_dorm_131="a1c16019-5bb1-42b2-9cfc-86874fd9ea1c",q.Horizontal_dorm_133="8f323636-a90d-42f2-86f7-462cb8411c33",q.Horizontal_dorm_138="e57c5d6f-3697-44c3-85ea-51affa96d9e3",q.Horizontal_dorm_139="441002e5-da3d-4939-8839-998588cf5f35",q.Horizontal_dorm_141="821d0133-8229-4376-8296-a97f406bb2b2",q.Horizontal_dorm_143="86e1db6e-117f-4f1b-8a73-80d5fee478f0",q.Horizontal_dorm_144="778eff4e-bd22-443e-a8c9-a0855ea8f7ad",q.Horizontal_dorm_147="09cad8d8-e2ea-445a-b926-1db919b41e2f",q.Horizontal_dorm_15="ec7d1f1f-cc37-4614-ac10-a4be1becb17b",q.Horizontal_dorm_153="728537f6-3144-4802-a32b-8b2859f0b845",q.Horizontal_dorm_154="2d9148d0-cc63-4758-bff1-a466957ed1e3",q.Horizontal_dorm_156="ed7a9ab7-e2d4-4316-9494-2e2cb83da6fb",q.Horizontal_dorm_157="568baed3-a421-48f5-9af8-5cbc0bc0d085",q.Horizontal_dorm_16="9c1c8578-a3c2-46a6-8369-6e657c8feb02",q.Horizontal_dorm_160="95a84f46-d06d-4dca-93a9-d5171021c844",q.Horizontal_dorm_162="2cdbd242-739f-4f4d-a368-70a304dc3102",q.Horizontal_dorm_165="a9e93063-564b-431e-81f5-970b7b402b2c",q.Horizontal_dorm_166="1b403a36-c008-4ed0-badc-e03df6046609",q.Horizontal_dorm_167="590f0388-a280-4de3-a5dd-ba2e545c4c91",q.Horizontal_dorm_17="50975b45-8108-4ae0-bcee-04e74acc749d",q.Horizontal_dorm_170="bc985b1e-941e-4c60-9a2c-1ce882279e20",q.Horizontal_dorm_173="17f15edb-c73f-4d3a-b4e2-a9eb4d80b995",q.Horizontal_dorm_174="d90c5cb5-c895-41a0-adeb-a57041f8e5c1",q.Horizontal_dorm_175="a4ad755a-baf2-41c5-82a1-59c900ef0c16",q.Horizontal_dorm_177="0f4f1b7c-6197-4de2-99f1-2fbeb7fad0f5",q.Horizontal_dorm_178="16c29e39-c86e-49b4-828f-29417336ceb3",q.Horizontal_dorm_179="8cf2dfae-8c5a-4691-bfa3-5bbcd551c068",q.Horizontal_dorm_180="48837a0c-281d-49c5-9340-1bc8660ae63a",q.Horizontal_dorm_181="f8dd5ea4-7302-48cd-8222-e184041319f2",q.Horizontal_dorm_182="b3c7380d-cc12-43fe-88e6-4c36ec8c9dcc",q.Horizontal_dorm_183="7e0d082e-aea1-487a-936a-5403e0240779",q.Horizontal_dorm_186="b833cd8a-03f7-4603-9c01-fa3b7762b381",q.Horizontal_dorm_188="a88ba7dd-17f3-4b78-82fd-50600fd4d0b4",q.Horizontal_dorm_189="37ee7b89-f1bd-40d0-865a-f0aeb2c84897",q.Horizontal_dorm_191="1affe23a-eebc-4f68-8f47-3241bf12d490",q.Horizontal_dorm_192="5dbc2f3b-8250-4817-8597-a453c2a2ae81",q.Horizontal_dorm_193="c4e9a75d-074d-4bf9-84c2-4493672e6eb1",q.Horizontal_dorm_194="1ddaef82-9ad6-443c-ac72-dbbed5b1fd9f",q.Horizontal_dorm_195="c8402663-2860-427c-888f-fc2a138a7205",q.Horizontal_dorm_196="1ed01e83-4c6a-49e2-8b1b-a3f39d0db73d",q.Horizontal_dorm_197="effbed23-1d41-4acc-8e2a-75700bb24930",q.Horizontal_dorm_198="dc1a5c62-ac5b-4c77-800e-8581b4f015b9",q.Horizontal_dorm_199="0e8fea37-5d40-4835-b138-ee790d9465ea",q.Horizontal_dorm_2="d1f7b044-ea8b-4859-af5e-da2329ab5eb2",q.Horizontal_dorm_20="f02deb11-bfe5-488d-8cde-9828a1eedb8b",q.Horizontal_dorm_203="f555e0be-73f7-42af-8d39-58865a7810e2",q.Horizontal_dorm_205="842c7b98-0d03-4e26-82c5-54c44330e1b5",q.Horizontal_dorm_206="61539ddd-58cc-4663-a9d4-69d37f1d68ba",q.Horizontal_dorm_207="e3038562-2a32-4424-8268-f8d3f84f4f41",q.Horizontal_dorm_208="c64cf382-b3ca-4d68-955f-103fd8f9e937",q.Horizontal_dorm_209="977a5441-6a35-4913-a140-b8338b6df4fa",q.Horizontal_dorm_210="60282ccd-b943-4108-97cc-f19ba5feee0b",q.Horizontal_dorm_211="63dc1d35-36df-47b4-bae6-e0dd41b0a760",q.Horizontal_dorm_214="17a528be-5f8a-45c3-9ead-7f584c1fc2f4",q.Horizontal_dorm_215="5d3c4b87-f573-4023-a2f8-1692805c2fa8",q.Horizontal_dorm_216="0b993753-fc57-45ef-b41f-30c2deaa28f3",q.Horizontal_dorm_218="f5515d36-a21f-448b-8a21-41c921f0f676",q.Horizontal_dorm_219="571e3268-1227-4b59-8720-97fef0d1ad3a",q.Horizontal_dorm_220="267d2673-3107-4199-a7dd-6b7e0c681e65",q.Horizontal_dorm_221="cb2d8ced-a752-415a-aaf3-cb807e4b3ca6",q.Horizontal_dorm_222="c2c794bb-cf87-4c7d-923a-07d34c92e24e",q.Horizontal_dorm_223="3439b58e-80d0-4a9c-9caf-afe293cdc062",q.Horizontal_dorm_224="bd80dae5-2695-49ba-acbe-c373ff5b2d8c",q.Horizontal_dorm_225="b0999e4b-822f-41d6-8557-6a14dc738c5c",q.Horizontal_dorm_226="7eafd8b9-3d8b-40c4-9df6-2168fe232755",q.Horizontal_dorm_227="f11e73b2-d3ed-4eb7-a615-f0609c835a0e",q.Horizontal_dorm_229="47f220d6-ff63-463d-ab50-5f856ef968d4",q.Horizontal_dorm_23="b605d0c0-a9ad-4777-b635-1be2376dbd99",q.Horizontal_dorm_230="3d4e1303-eb6b-4aa6-a05d-40c4797e190b",q.Horizontal_dorm_231="7ed8c998-5c40-41b2-a9ae-847b47df7b54",q.Horizontal_dorm_232="7066f56c-4d98-40fb-8620-e6e2793c28de",q.Horizontal_dorm_234="54270e2b-ab1d-4ac7-ad93-5c339259a99f",q.Horizontal_dorm_238="b1331636-a97d-47b6-8e45-5764565dbe73",q.Horizontal_dorm_239="904146fa-0e25-4848-9a50-c5daff7e5cfe",q.Horizontal_dorm_240="ad438726-5981-48f1-bd9e-305063233309",q.Horizontal_dorm_242="1f05e7c7-054b-4fd9-b46a-ff5306a1b1cc",q.Horizontal_dorm_243="4e45d50b-92f5-4604-a831-d3cd82e387e9",q.Horizontal_dorm_244="6a8b651b-159c-4b98-ba35-8bac72db5ad2",q.Horizontal_dorm_245="d3e6af8d-9133-47c4-bd32-5237b5cd97f3",q.Horizontal_dorm_252="bac168a3-ef63-4f15-88be-c8e8ed388e3e",q.Horizontal_dorm_255="80cb7765-911b-4064-a635-a523683a0b82",q.Horizontal_dorm_256="716f3a4e-3d77-4fe8-b0cf-2664ae9ee7ef",q.Horizontal_dorm_257="1a9d46c4-bfd1-416f-aa44-28e13a2a178c",q.Horizontal_dorm_258="89f7cbc2-31e9-4cb0-909a-7e0c6808f007",q.Horizontal_dorm_259="9b77088a-717f-4bd0-a1df-36827e473d7e",q.Horizontal_dorm_260="b407056a-e1e6-4233-a30a-eff3cc3fd4a2",q.Horizontal_dorm_261="d6011a9e-447b-4762-9724-d6ef10ebb60e",q.Horizontal_dorm_262="5b3fbd74-6a86-4b8e-add3-c434b7d83a5e",q.Horizontal_dorm_263="91ac273b-3f2b-444b-9540-acad56257d7f",q.Horizontal_dorm_264="d1743bfd-b68a-4f8c-9d9b-4085e57085cb",q.Horizontal_dorm_265="da29f400-1431-4652-b973-d31145eeabe2",q.Horizontal_dorm_266="758339ba-dae0-4bfa-8386-eb9810e2a43e",q.Horizontal_dorm_267="c887bac4-d4ee-4a63-9e9d-207c3f2c8420",q.Horizontal_dorm_268="a55cf486-c143-4406-a132-59386d3d03b6",q.Horizontal_dorm_27="fe46f106-e06e-4e56-97aa-1c64fbcc1e8b",q.Horizontal_dorm_274="02de4e51-c626-4a4f-80e5-402331b19d58",q.Horizontal_dorm_277="9801e032-9d91-4f3b-8d3f-54e1373c81c2",q.Horizontal_dorm_278="68f5bca2-3ee7-41c3-aaad-937e300394c7",q.Horizontal_dorm_279="6964b497-630b-44ba-b93e-7a4c20818638",q.Horizontal_dorm_28="7f8ea2fe-63a0-4c2c-bd9a-742bd79e4b90",q.Horizontal_dorm_280="47f05fcd-8413-4a88-9d00-6e04912ccd21",q.Horizontal_dorm_281="175cb876-a722-4934-8f97-525a271f4c62",q.Horizontal_dorm_282="fd64a898-6c3b-493f-a70a-a618395e29f8",q.Horizontal_dorm_283="fcf1cb80-65ef-413c-8ae5-075a1e55c537",q.Horizontal_dorm_285="2082c827-b38f-4846-8190-d5011b828475",q.Horizontal_dorm_286="8afe42c4-00c4-4fba-962e-cdcaf27eb59b",q.Horizontal_dorm_290="41207e4a-ca39-4757-b224-08c12f9a7e8b",q.Horizontal_dorm_297="d8b9f48d-b7f2-48fb-8c4b-30d4884fb6e3",q.Horizontal_dorm_298="1a2a626b-3b5c-4fdf-ab2d-ab3f1b096c42",q.Horizontal_dorm_299="55898a86-4dcd-4a89-88d6-bc2901658c40",q.Horizontal_dorm_3="f4f80d4f-804e-4b51-9e73-91aa7b83165f",q.Horizontal_dorm_34="be9419d4-490f-4adb-b377-b277ddc90b96",q.Horizontal_dorm_40="2567e0b5-d3ad-4ee4-a083-a02d58bec384",q.Horizontal_dorm_45="5fa04498-0fe4-4cb8-9a03-a53e831c75ba",q.Horizontal_dorm_49="a495ee8d-8151-49d8-a835-3ab3cdf9fcd4",q.Horizontal_dorm_50="779991d4-6f3c-4f98-9a91-eb13789c8cf1",q.Horizontal_dorm_51="b0114f95-dc4e-4239-8434-a36f540e0fde",q.Horizontal_dorm_52="440391d5-d582-4568-8464-0793db60a236",q.Horizontal_dorm_54="3beb9f5f-909b-4830-9be1-31540c50d1c2",q.Horizontal_dorm_56="e2671f34-2ad8-4d2e-9a22-79544205d4bc",q.Horizontal_dorm_61="1d87cba7-b31b-47ab-90bb-f74b6ab5c913",q.Horizontal_dorm_62="7df441e2-706f-4afb-831a-35d8f6410dce",q.Horizontal_dorm_64="9c8ce85f-83f4-43f9-87c7-a6a93393953a",q.Horizontal_dorm_65="ab805745-7bb4-44af-b8a2-bdef3e153d90",q.Horizontal_dorm_66="9a8bcb6a-178f-49b8-b27a-0a3f4fba909d",q.Horizontal_dorm_67="8f5390b9-10fd-42c6-af7d-e50c888a521f",q.Horizontal_dorm_68="efd4f13c-982a-4f03-be5e-ba1ecbd74e02",q.Horizontal_dorm_69="e41f9160-40e6-4eae-a318-53cf14ef0b0e",q.Horizontal_dorm_70="c495bba3-56de-401f-a312-58563252f2be",q.Horizontal_dorm_71="af9e4ba7-92b6-4e9f-9c4e-8370a322db6d",q.Horizontal_dorm_72="cf5f0af7-1e03-432b-9e73-8e96e131725a",q.Horizontal_dorm_74="208ea701-8c1e-4b22-b6c9-60891bd25f57",q.Horizontal_dorm_75="40c4de48-b4d8-496b-bc4f-fc62d9cc809b",q.Horizontal_dorm_76="93832f84-b7a7-4e67-b403-d87f142b9c60",q.Horizontal_dorm_77="bb74bc98-ec9a-4173-a1f7-e538726b5cd5",q.Horizontal_dorm_78="244011d8-4ade-4f78-a091-f4f3e1bc3595",q.Horizontal_dorm_80="bfdd0168-a940-442f-8f1f-2586e6d48c0c",q.Horizontal_dorm_81="7b568b02-986d-4158-8947-450e69fbbe63",q.Horizontal_dorm_82="632d2b88-c4b7-4f15-a194-b0943df580eb",q.Horizontal_dorm_83="c10bcdb5-e7d0-42e7-962a-884e69c0750d",q.Horizontal_dorm_85="79effc72-97c8-48c7-9ad8-403e3bd69c28",q.Horizontal_dorm_87="efaf9d94-f0c4-4d36-a5f9-653085b1fe64",q.Horizontal_dorm_89="0f76710c-ad30-42b0-bb43-7c61c6779d8f",q.Horizontal_dorm_92="53a8041b-81be-4771-9df3-9db31e4ca038",q.Horizontal_dorm_95="53d78e92-2d61-4948-81dc-6a7cbd9d8b82",q.Horizontal_dorm_97="b9176e85-e6ec-4bc0-870f-24f140d30b0b",q.Horizontal_dorm_98="332e3c65-ef94-427a-bb7d-a2e76b93f7bc",q.Horizontal_dorm_99="ac74b874-b0ca-462e-bae6-902307dba629",q.House_all="8329a62a-f931-4c62-9068-ae0949d552fe",q.House_design="68ea7a1b-a783-4704-804c-b35aa009a2c7",q.House_lock="a555c608-92c6-4390-a63c-424c44b859b8",q.House_unlock="461db3e8-ab08-4a4f-8694-66a698c8b683",q.Howard_cornelius_portrait="2117cdc5-e324-43f9-8795-64f08208fbcd",q.Hud_after_school="a4b76834-dd0e-49df-984a-d33fe014f383",q.Hud_after_school_circle="9f3fcd8e-abc8-4138-a48d-94ccf0680f29",q.Hud_backpack="932d246b-c406-4781-81dc-f4761ceb97b9",q.Hud_burger="b074e226-1fa6-4f14-bbf2-8668776b21ac",q.Hud_button_basic="c409ff1b-2724-42dc-b3c2-8ce863462b8d",q.Hud_button_basic_noshadow="cdb6a1b3-13c0-49e5-8188-26b3fae2b1e6",q.Hud_button_basic_noshadow_pointer="b49e34ad-5d58-4572-8a3f-0bb160196023",q.Hud_button_disabled="5bb8ae7d-2f3f-410a-a0cf-23e4a692595b",q.Hud_button_hover="213c588e-235e-4ab4-801a-f3a892edeb24",q.Hud_button_pressed="c64ce51a-2d0c-42a3-be18-964cd82f900b",q.Hud_calendar="a62096ab-ae16-4cc4-bf92-2dfeaad9e1f6",q.Hud_chat="097bf81a-9354-4837-a7fd-5d07463e8809",q.Hud_core_membership="5c233329-4c2d-4589-a7b5-be79087e7e16",q.Hud_daily_goals="b5db5845-13c6-4ec1-92cb-e81cd3b1e8ad",q.Hud_duels="c67d47dd-322d-45eb-b3dd-175bf71e53ef",q.Hud_free_membership="66eec2c1-e4df-409c-8a68-7c581ce2bb05",q.Hud_friends="ab57214a-ee29-4af9-bff7-a9b5c133e730",q.Hud_gift_no_shadow="a1af25aa-ab1d-47c6-8840-66d1e860013d",q.Hud_house_edit="a088c398-06c5-4899-87d0-a72bbd2f454d",q.Hud_house_exit="2949c8c6-3d9c-4bef-b434-d9d75dfab75b",q.Hud_house_info="decfb13a-a7ee-4d42-82aa-b3a41cd29741",q.Hud_house_locked="ea98ef3c-7d8d-4a99-8edc-47bcabd72052",q.Hud_house_unlocked="23550ac0-65c3-423c-b94f-5b24175b436e",q.Hud_leaderboard="123a9839-b689-4fa8-bf6c-4cb850c18ec6",q.Hud_mail="371de630-5798-45cf-a7c4-50a713c7f1a3",q.Hud_map="6b825a7e-fe52-4bb5-82f0-cd1b448b4eb0",q.Hud_moonlightfest="d8688b4f-a712-4edf-b481-b1f4cf93cad7",q.Hud_parent_gifts="eb9a2046-45c3-4f78-a6ae-71df128c85ce",q.Hud_parent_gifts_circle="922ac122-1c06-45c0-89e8-452b7474ca3a",q.Hud_pet_center="df157576-5715-4af1-8f6c-b30a3388bd76",q.Hud_pet_list="81e04a02-9792-4886-b513-0ae5307e6642",q.Hud_pets="2bd3e716-979f-4018-8407-d959230736fb",q.Hud_plus_membership="5a68a494-0005-4063-b9ac-826a6b005dad",q.Hud_pumpkinfest="21dc2c6c-5441-4b1d-8e7a-a4541a3234a4",q.Hud_rifts="7c85a67b-dd5f-441d-a988-63a9fc186f58",q.Hud_secondary_button_hover="56d1d4aa-6021-49d6-be58-eeb90e6469b5",q.Hud_secondary_chat="5bf2c427-cd0e-4cac-a5e9-4eaf4603f593",q.Hud_secondary_mail="3b07065d-6123-412d-b793-a6d8897342e9",q.Hud_secondary_settings="650f430d-db07-434a-9513-5234e64adc00",q.Hud_secondary_social="b24f9c77-752a-413d-b0c0-b1695eea6de3",q.Hud_secondary_wizard_watch="ad99cc89-6912-4fb7-949b-f5a3f09bfc26",q.Hud_settings="234ca838-35f1-49fe-82f2-bf382624537d",q.Hud_shop="d4dc7070-8a0c-47ba-a2ad-36de33ab6531",q.Hud_speechbubble="7259de72-0aeb-422d-b16c-6c55b8eed073",q.Hud_speechbubble_wooden_tail="39eee527-fbeb-4e21-ab17-5170bc41414d",q.Hud_springfest="430decbd-3bdc-45d0-b918-4bddfa51f3d9",q.Hud_starlight="3127572c-d12d-489c-ba30-e9c11c14043c",q.Hud_starter_pack="790b98f1-8863-4765-b87d-0dda2c364772",q.Hud_state_challenge="7c572625-7025-47a3-9b4f-e7cf6093556f",q.Hud_state_challenges="60c5cf92-41a2-41d9-bbff-93803d411c63",q.Hud_summerfest="b39f5edc-ad0d-424a-ac87-83a220db0354",q.Hud_treasure_track="5164fbfe-17ee-4def-9157-678de69a623a",q.Hud_treasure_track_big="aa6673a2-b225-4046-be6e-df593a578be9",q.Hud_ultra_membership="5991c63f-4d9b-459a-9cb6-317bff008268",q.Hud_winterfest="20b8c197-2f21-43d6-a4a1-cec9e216bfed",q.Hud_wizard_dash="db3fe015-bc76-4737-8550-68bce8ec631c",q.Hud_wizard_watch="dea91059-3077-4589-9dcc-47b227862a7a",q.Hype_ww_thumbnail_1="9b375c1d-12b2-4f01-aed6-fa3a8f9f9284",q.Hype_ww_thumbnail_2="17d8d73e-e2d7-444e-8794-840ad8559293",q.Hype_ww_thumbnail_3="ab7683bb-1cd9-407d-84ac-cb3a5355dd4f",q.Ice_tower_beta="476a3de5-cb74-47c3-be89-43b8505bf84d",q.Icon_badge_value="5cb18513-069c-4570-9360-87269b91700e",q.Icon_boots_1="3331d7af-ef8f-4056-b85f-60624648b810",q.Icon_boots_10="2c0e8a9a-a67c-40ec-bb14-6810faf3b324",q.Icon_boots_102="6d35ac85-e458-4a8a-81bb-8c0c75304f40",q.Icon_boots_105="71194da5-18c8-4bdd-b4bd-1d1ba8e52771",q.Icon_boots_107="803b8e04-fbad-42b7-9760-aec7916f56a9",q.Icon_boots_108="77add4b7-da51-4bae-b81c-1736865fbe82",q.Icon_boots_109="635106c2-09c7-4778-8887-932be294392e",q.Icon_boots_11="bfec3231-b023-4841-ae59-09c3887e7c32",q.Icon_boots_111="79007e87-8669-4c8f-8386-e97d6ebd62c1",q.Icon_boots_112="dfb3733e-604a-450e-856f-acd34e5e2ddd",q.Icon_boots_113="83cdd5d7-ef62-43cb-ab96-162cdcdb145f",q.Icon_boots_115="b111173b-9cba-4bf0-a17b-decc32adc383",q.Icon_boots_116="187350d1-2c6d-447b-bcb5-84ff3c392dd2",q.Icon_boots_117="8c245114-dd00-4e20-a9d6-266d8655e3cb",q.Icon_boots_118="c28e8d76-4342-44e4-af9c-a8458e096024",q.Icon_boots_119="002390fa-9bb8-4ca0-a252-a6815458ae62",q.Icon_boots_12="5d5f3ab8-e39c-47fa-9e09-e70b9815c007",q.Icon_boots_120="bbc9aeb5-a361-410a-91c7-2c37f3836dda",q.Icon_boots_121="6b084311-9b91-45d3-a71c-5f6442ceb78b",q.Icon_boots_122="a3309afb-8b2d-4b32-b556-2e92a81295c8",q.Icon_boots_123="876237d7-45ad-4890-b985-939c6b757bf1",q.Icon_boots_124="fc85da64-a320-4a03-adeb-df10682f461e",q.Icon_boots_125="1b90ea12-5066-4cdd-a4a7-d0e6ce4094b2",q.Icon_boots_13="b1ca330c-ab05-4d60-ba2b-acdf207c4bb7",q.Icon_boots_130="fc65f973-c1ae-42a0-aa2b-461edfa08564",q.Icon_boots_131="3690b1ef-ead2-49a0-99d5-0544a3c4d31d",q.Icon_boots_132="6c07474c-2c4d-452f-9ef0-b530467bc95f",q.Icon_boots_133="5ef972d2-9eba-4e34-8659-43abacd5403e",q.Icon_boots_134="02f0af6c-85f4-4a66-b40e-c48d498512db",q.Icon_boots_136="af191e9d-fa49-4dae-8ab1-16c8253690bb",q.Icon_boots_139="f2974935-1c33-42cf-ba01-c0d1c3b2b7a7",q.Icon_boots_14="f6fbf4b8-3066-4cf9-bc13-1cad0a6e21fe",q.Icon_boots_140="03cebcd6-79c5-4333-9f2d-437b7ae754d8",q.Icon_boots_141="94f2816b-188c-4c0f-b066-d7175d9511cc",q.Icon_boots_142="2895fa5c-9f67-4e6f-9f67-7ae8345c60a4",q.Icon_boots_143="98e7fd5f-93be-4d0e-8f5f-2db7eb9e9219",q.Icon_boots_144="c88002bc-212b-43e7-8253-e4984bac1987",q.Icon_boots_145="76be5c56-c049-4177-a0d5-40e9dbfc43a6",q.Icon_boots_146="8b530038-126a-4eea-af27-e3ec59428edb",q.Icon_boots_147="45f3d5ad-adf1-4645-adf7-fb247f6dc0cf",q.Icon_boots_148="94ea8a8d-ceeb-405e-b71b-b7e727bc79cf",q.Icon_boots_149="a372ae5d-795d-47ce-bc08-93f45ffcb007",q.Icon_boots_15="cd47f348-6e2b-486b-8b73-0bd625d948ad",q.Icon_boots_150="5a8d2396-e548-48da-ad90-d75fcd85b593",q.Icon_boots_151="ad9c5ba0-b239-44bc-82ce-5bf584eafe72",q.Icon_boots_152="52f35c99-58de-4189-ac88-3966efc8ddd7",q.Icon_boots_153="d7ed7904-fbc6-424b-9301-d8457439ab71",q.Icon_boots_154="b63e8c56-bd36-4e39-b4a1-e9cdb878dc78",q.Icon_boots_155="018dbe24-1326-4b69-bd6b-53d8db388e1f",q.Icon_boots_156="af35230d-14e9-4a8a-abfa-73c589dcff39",q.Icon_boots_157="bca71d2a-1cc3-4358-ad8f-77d6e8388191",q.Icon_boots_158="ae2ac911-7a9e-4128-ac5b-4f15ace418e8",q.Icon_boots_159="2fc4ce7a-2844-4ccd-92da-09d1605d3064",q.Icon_boots_16="59a422c2-8a7e-4a86-ae0e-a497d523d7aa",q.Icon_boots_160="ecf40250-b27b-46d8-af49-cb3f2d53fcd9",q.Icon_boots_161="6441df81-db9b-49c6-96f7-d5987faf3347",q.Icon_boots_162="40bf870f-9947-4b9c-b680-62fd94d403f0",q.Icon_boots_163="3b9f65b9-122f-4aa4-8435-eacd13b1cb51",q.Icon_boots_164="61e37abc-12bc-4c98-9446-d398103fbe76",q.Icon_boots_165="ff319f1a-53fd-4f98-a554-0df2e34301bf",q.Icon_boots_166="3c68378f-833d-413d-a662-d0d19f1112db",q.Icon_boots_167="76b99dc0-504e-44fa-8c9f-8836a5613055",q.Icon_boots_168="065c690f-7c21-41c1-8173-6451a971b688",q.Icon_boots_169="1a319090-f183-484f-9067-bc9d4c8b6304",q.Icon_boots_17="024bde04-5c3b-41e9-a4c1-016aca03a59d",q.Icon_boots_170="34dc2a90-83cf-449c-95d7-91eab81fa1d0",q.Icon_boots_171="a3a644c8-c3e7-4ca2-a168-f5ffaf68111a",q.Icon_boots_172="83f8e869-7715-4606-a3b3-be24bbd4b529",q.Icon_boots_173="e53ccc98-1fc0-4328-9ee0-d30232c00ace",q.Icon_boots_174="f37611fd-6603-4cf0-a810-503266a9a369",q.Icon_boots_175="8192f725-c5c2-418b-ba10-569f01c84d62",q.Icon_boots_176="abc15823-16a4-448d-b9b4-c3cd5ecb61d2",q.Icon_boots_177="e316a826-8167-4994-9503-84169582a169",q.Icon_boots_178="40d0ecd6-9351-416b-831f-f2bfec93b6d6",q.Icon_boots_179="fc96e021-cf53-47e9-8e70-398372358254",q.Icon_boots_18="df371911-785f-43c4-80a6-dc127e1ea9c3",q.Icon_boots_19="90d2c27f-e8a3-4da1-b293-9ed6db10b34d",q.Icon_boots_2="c7a3c52e-70cf-40dc-8d0a-6d56e930b9a2",q.Icon_boots_20="95af6f39-6b74-45f8-acdf-a2f90dcadb16",q.Icon_boots_21="fffe727b-2413-4812-b172-938112687bfb",q.Icon_boots_22="c55dff47-86ad-4e8e-a426-317a9ffa71ea",q.Icon_boots_23="6a751d69-2606-4104-8f4d-7b63b2bc2b6b",q.Icon_boots_24="9d0fa279-4d87-4fad-bbea-d19251748950",q.Icon_boots_25="4003e3c2-471b-4106-8de8-f541bb0c4f11",q.Icon_boots_26="64a26737-11d2-4289-9173-b84b24e389a1",q.Icon_boots_27="959a8678-e3e5-4220-b385-d5854d4eca53",q.Icon_boots_28="5efb2ea1-59a7-4c4c-bf31-63d7488bc497",q.Icon_boots_29="6af3f4bf-d8a8-4739-a399-9c769907ad22",q.Icon_boots_3="00fd52ff-82f8-4ed6-9b8e-c9fe1aaf964e",q.Icon_boots_30="8b30c1a4-fff0-446b-b131-5f31844f2ac2",q.Icon_boots_31="b720e976-4a36-4a1e-9eae-ab5a5b3f7976",q.Icon_boots_32="8e274f61-12b6-4d19-9c68-fb4567d08bec",q.Icon_boots_33="58c24e2e-e8af-4d52-bb1c-cbf45bee31c7",q.Icon_boots_34="70422a49-fdf2-4223-80ac-b7d7f95b746c",q.Icon_boots_35="ce5bcdfc-913a-40b7-ad71-61a3d736c2a9";q.Icon_boots_36="690abc6d-3f4f-42b1-87de-66043eaa1fba",q.Icon_boots_37="f6f9aa25-e066-47b3-a910-75e6b11a6365",q.Icon_boots_38="9706b890-f8f3-4066-bad3-a5f5007633b0",q.Icon_boots_4="a288b678-4c29-41aa-9a5c-ab1ec74236ef",q.Icon_boots_40="eb064543-2ea4-4f07-9af1-75063171c0b0",q.Icon_boots_41="b91e00b0-cd0f-4269-8ee6-7868030d9361",q.Icon_boots_42="7b490110-7508-412d-9155-0b5e00e6a288",q.Icon_boots_43="75de5ed5-c372-4d45-815a-4b2c63f917ed",q.Icon_boots_44="1d247ea6-d0f1-4dc6-8576-eab09e6d5c91",q.Icon_boots_45="a83e679b-14ef-4225-9d2d-bbf4ab508e4b",q.Icon_boots_46="f410179a-d1dd-49ee-9908-f71ad7b9204c",q.Icon_boots_47="3c3d1514-2cec-43f1-828c-0263f0e431f5",q.Icon_boots_48="6e5f9b89-780c-4047-bc6c-b2bada430c1c",q.Icon_boots_49="501c1a9c-ccc1-46c8-80fb-95e80eb91003",q.Icon_boots_5="78871012-9e2c-430c-a9e1-e75e9ce8c63c",q.Icon_boots_50="5ce308cb-7e67-4be9-a207-ee7586bbb19c",q.Icon_boots_51="a33c4714-65b6-486e-ba23-a59aec9c0313",q.Icon_boots_52="83084b5e-1525-4574-8f2b-b7441edd763b",q.Icon_boots_53="132c448a-843a-49fc-a4c1-488be92ded26",q.Icon_boots_54="6118308d-34ac-496d-985d-53d9a79965c2",q.Icon_boots_55="851bbb97-e251-4753-87b5-6428798bf7cd",q.Icon_boots_57="76d31f6f-d47e-4a75-bd12-18b729dca44f",q.Icon_boots_58="2b0a3982-dda5-401f-8d95-cdcb8aaaced8",q.Icon_boots_59="84136ee4-54af-4561-b513-cb1dc0d0899d",q.Icon_boots_6="0340ccdb-9a19-4095-80e0-05501fa8d8e8",q.Icon_boots_61="f56939af-d7a3-4a29-b274-6b87e6ce0721",q.Icon_boots_69="7df5bdca-5dfa-4614-8384-7ff48d921c0b",q.Icon_boots_7="d66c9761-427b-4291-9953-f305ffab02ad",q.Icon_boots_79="45dff960-7d87-45d8-ac2d-75970825db68",q.Icon_boots_8="ade2a175-4d80-4405-8c49-fb1a4a0b0f3d",q.Icon_boots_80="a81e3796-44f4-4091-beb2-76b5102d28ad",q.Icon_boots_81="316f8bd5-b4da-470c-a641-1fba8354eb69",q.Icon_boots_82="51ac1905-eb17-4220-bdb3-39ebf14ff1b4",q.Icon_boots_83="54796d93-ebb3-40ad-b7a1-45232da59f2d",q.Icon_boots_84="093432ac-820a-427e-8cbd-daf8c32a7596",q.Icon_boots_85="22efd162-d646-410d-8409-741862fddb65",q.Icon_boots_86="3f74d53c-99be-4280-9700-9dabd2cda01b",q.Icon_boots_87="0196f999-1745-4035-8371-9ec4d34cd7df",q.Icon_boots_88="91f07df3-9d0d-46b9-a36d-bb8c413f87d1",q.Icon_boots_89="9f8ff43b-38ef-4c79-b301-2899dc69f411",q.Icon_boots_9="41330ee6-d85f-4fae-aa8d-18cc3f59cb03",q.Icon_boots_90="14d94e35-aaff-418f-89af-682ba82f685a",q.Icon_boots_91="a878936d-b447-4b04-a539-0a79941cc778",q.Icon_boots_92="78244a46-49d7-4dc0-b531-2c88682e8bfc",q.Icon_boots_93="f7e06c5c-4b27-4382-a65d-51dd3f6a2d35",q.Icon_boots_94="1ef3d001-b67c-4bfc-a18f-37287bb3db05",q.Icon_boss_buff_critChance="04d10245-5625-4599-9d5b-6b8f59d85e75",q.Icon_boss_buff_critDamage="a1c2e832-e430-4852-aad9-8280d0dff660",q.Icon_boss_buff_crit_damage="ce614c5b-f4d8-4f1c-ae53-e4fb19124b59",q.Icon_boss_buff_damage="6eb9f539-0ecb-47d7-a30e-bb27d839917a",q.Icon_boss_buff_damage_reduction="2df6b18f-0d0f-4f9c-a9e0-57e7ce439d71",q.Icon_boss_buff_elemental_bonus="480ea338-5fbf-43fe-9ce7-58f7eabcbb8a",q.Icon_boss_buff_health="3c95b279-86d0-4758-a7b3-b3ea5241731d",q.Icon_boss_indicator_rits_locked_tier_1="1b0fa381-13a1-4272-9e30-94a01d5ea91f",q.Icon_boss_indicator_rits_locked_tier_2="83bea1d6-a746-4dd0-9a35-f2c60e39a7e2",q.Icon_boss_indicator_rits_locked_tier_3="a9669bf5-561d-400a-a899-53503a1287bb",q.Icon_boss_indicator_rits_tier_1="09ee7887-6840-4326-8ee9-e2d6cb8fbe4b",q.Icon_boss_indicator_rits_tier_2="336815fe-e678-4e41-8507-4b1ac8549487",q.Icon_boss_indicator_rits_tier_3="c1a47291-6763-4092-bd32-f63c0d66fd3f",q.Icon_boss_indicator_tier_1="595dee07-d43d-4d4c-943f-1e53e6e2521a",q.Icon_boss_indicator_tier_2="74fa2647-be61-4d47-828f-1be165f8ff8b",q.Icon_boss_indicator_tier_3="71516abb-1a27-4c0f-afe4-d8574b0b61d2",q.Icon_bulb_filled="851184f4-62b1-4a37-8921-a1703f432131",q.Icon_bundle_5="3f9f728f-864e-4ee7-9279-456da392f0d3",q.Icon_bundle_6="e443501b-d645-4638-a2b9-1d78330ebc80",q.Icon_bundle_7="26581c16-cb1f-4350-a1f5-968fea4653d0",q.Icon_bundle_8="bd9b4e12-cf8e-4a0b-85f2-4c9df6661011",q.Icon_bundle_9="24510618-6221-46a0-899c-ea9ab5447af9",q.Icon_celebration_pack="4d6c19d5-149b-4033-bd49-57a3ba3d943e",q.Icon_charged_levels="90c2a5f6-58d6-455e-b92b-7b03d3928e97",q.Icon_coop_quest="6effb0c2-e1ce-4742-a77f-a9e1b6b39b71",q.Icon_currency_1="009e0aee-98b6-4baf-af34-68036b15ac4e",q.Icon_currency_10="cf72b35f-ea03-43b6-8ae7-a87a9ccbed04",q.Icon_currency_11="489b9378-928e-4693-99f3-c2ab011a3f3b",q.Icon_currency_12="2bf687f7-1309-467e-8207-8be4b5d76b75",q.Icon_currency_12_store="c1606ebd-d321-47d2-b13d-6be7c8239592",q.Icon_currency_13="9d238336-2b74-434b-9d18-ddf5152bd0d6",q.Icon_currency_13_store="5b9315bf-1b28-4807-b354-7c47f7d94646",q.Icon_currency_14="2fec2133-84a2-4c44-b484-f1c444472c93",q.Icon_currency_14_store="a4eb2352-8a0c-4561-89ca-a20fb11f2c51",q.Icon_currency_15="c253b0d8-1991-4333-84d3-cdba9ec361e3",q.Icon_currency_15_store="6af3fbe9-bc5a-4292-9d9d-53757587b82b",q.Icon_currency_16="4d6ae2bb-53fe-4f38-b65e-e22911758401",q.Icon_currency_16_store="e60473b8-2c84-4caa-8995-8977199f1ee8",q.Icon_currency_17="7ddd6ca1-888e-4b5e-bd36-c6c63ae769ff",q.Icon_currency_18="99839edd-7a0f-4e2a-a461-1e1b066f6252",q.Icon_currency_19="687dda2a-4afe-4aa3-bf75-b2b6e2f4d0d2",q.Icon_currency_1_pile_small="1d53f730-a8a6-4730-a450-a230f0584730",q.Icon_currency_1_store="519749d7-1737-4e2c-b86a-f8f40fec6d93",q.Icon_currency_2="585415e7-27f7-4cbf-aee2-b004a2bf082f",q.Icon_currency_20="452cff58-333b-4551-91b6-077628cf606e",q.Icon_currency_21="dd01fd90-3e73-41df-bab5-08e5bac466f5",q.Icon_currency_22="cce27a2d-ecf0-412b-b15d-f96c98bc8ac7",q.Icon_currency_23="f842a4cb-f901-462b-bba3-95a0da64f940",q.Icon_currency_24="0dc3e45c-43ad-4757-9580-ae5faecc3642",q.Icon_currency_25="55572369-4374-463a-b50a-13fa8b3c7641",q.Icon_currency_27="ff14ee8e-111c-48e3-ae1a-faef2cfcb5bb",q.Icon_currency_27_pile_small="4e6b380e-a9d5-4636-a695-a977ba965ca7",q.Icon_currency_27_store="c7210eac-b11e-4e6a-9b2b-ed1973bae72d",q.Icon_currency_28="afe4aa69-e318-4353-8069-e35a24f2bd0e",q.Icon_currency_28_store="97641576-f84d-4096-bce6-a182d9995be8",q.Icon_currency_29="c5ee3a7e-7d15-4806-b40d-ab1e8dbed519",q.Icon_currency_29_store="0549ee32-8eeb-4f34-b75a-de2b09f2f28d",q.Icon_currency_3="c69fa292-71f2-48c4-be31-3b4982d386c9",q.Icon_currency_30="830f0d8d-045c-46c8-bf65-9f5ec278f378",q.Icon_currency_30_store="b0f115fb-fc1a-411b-ae9c-89855affbf7c",q.Icon_currency_31="d5e8bec6-1a3b-42fe-be20-e42bf74700ec",q.Icon_currency_4="f8619d29-748c-40a2-80e8-a3e7b0a6fc5b",q.Icon_currency_5="dc0a80b0-c181-4729-859e-9499b8c5cd3f",q.Icon_currency_6="cb24a771-24b3-41a4-8acd-6966d43cfa95",q.Icon_currency_7="1005d9aa-064f-46c2-ab7b-a20816dd890f",q.Icon_currency_8="083cfa85-15e5-4db9-b5dd-f736094332ed",q.Icon_currency_9="7c8369f4-8cb5-4637-a4cc-4ce00d37004e",q.Icon_cutscene="94334d22-2e66-4e4f-a73e-a9a34067068a",q.Icon_dance_1="e269ddff-67cc-44f5-9462-4feddaee73c1",q.Icon_dance_2="485aedd2-fbb2-4202-b122-fa446ccf49ff",q.Icon_dance_3="9666d73d-5c6e-4b56-aabb-86903a9c91d8",q.Icon_dance_4="a4ace528-0a82-4f63-a03e-12f5f733c925",q.Icon_dance_5="aa681ddc-f01a-4dd6-8f19-b5971bfa88c7",q.Icon_dorm_1="aa7f4ee9-28b4-4d8a-83fe-f73feca2e864",q.Icon_dorm_10="566cfe77-6392-4531-b10b-7010fb2f10ad",q.Icon_dorm_100="7b0cb93b-be6a-4510-8ec1-594cbd9bd027",q.Icon_dorm_101="7757e6df-ef07-4bcb-a68f-1a1605b8fcc4",q.Icon_dorm_102="2890f1ef-41de-43f3-9c88-9e3facd5eeab",q.Icon_dorm_103="1095d888-4043-4041-9757-69b0b21d7211",q.Icon_dorm_104="22c925e1-39fd-499f-8809-3ea8d3d36555",q.Icon_dorm_105="758c89dd-1f72-497e-ae89-528217f1a664",q.Icon_dorm_106="278c74d4-1d31-47ea-b815-23d4e45f1597",q.Icon_dorm_107="382c0a59-2a95-4904-bd82-422d40be061f",q.Icon_dorm_108="9ae1ea1d-8285-407b-9981-82d042182dc4",q.Icon_dorm_109="20e3ae3b-7535-4ba7-8f32-e399d266ff04",q.Icon_dorm_11="826ae11c-21b8-474c-8e04-49663f4b80a6",q.Icon_dorm_110="e052cae5-b676-4148-9b43-23b01efdbcde",q.Icon_dorm_111="1b1a36d5-d960-4d60-a90e-c3d4d72f0503",q.Icon_dorm_112="9562cdc2-85b8-4065-a801-7c6d57a67cf2",q.Icon_dorm_113="8da8e586-01ca-49d9-a5a3-c927a67c9972",q.Icon_dorm_114="485372bf-2070-41d3-8fa6-4472a898c296",q.Icon_dorm_115="35d663f7-e95a-435c-8cb3-b954096396b9",q.Icon_dorm_116="d758321e-d3bb-4484-82b7-d7eee17917e2",q.Icon_dorm_117="1792379b-7fa7-4d6d-a7c3-65197a86d789",q.Icon_dorm_118="939cb1d6-b48b-4dd1-9b1a-d016d95dfb73",q.Icon_dorm_119="2a5a6d50-87d5-4d56-b8e0-23aba9b67967",q.Icon_dorm_12="fa9dd6a7-5d86-4095-afe7-d20def63d772",q.Icon_dorm_120="ec2ab317-123f-443b-874d-acdc064322a5",q.Icon_dorm_121="0b7b6db2-577f-4b31-99ea-593e3565d3be",q.Icon_dorm_122="35949641-2a4c-4032-ad03-b98f55fdcc76",q.Icon_dorm_123="ff03838d-7a7c-4f86-beea-ba3d7eb37330",q.Icon_dorm_124="8952ab41-aec8-43b8-831f-a854dbe741cf",q.Icon_dorm_125="cac953fb-635c-4f4d-996a-697659542e6c",q.Icon_dorm_126="dbf5c182-f24c-4d71-9f55-2aaec0dc0f79",q.Icon_dorm_127="76314649-a055-44fd-bb59-88c293cef230",q.Icon_dorm_128="88235b33-821a-4f85-9103-8ed4b24e8728",q.Icon_dorm_129="11202ea7-b4e9-4ea4-a8bf-e386083cb32a",q.Icon_dorm_13="a69be307-85df-47b6-806b-b0e334af4866",q.Icon_dorm_130="ef91101f-6f01-4050-9aee-300b8aa43b2a",q.Icon_dorm_131="fcdd2727-adc7-4619-a59e-44da4fed7a22",q.Icon_dorm_132="2f2ed32c-7d44-42f6-9130-bfda57cd3310",q.Icon_dorm_133="95deb4a3-7d2a-49ca-8429-10e122010c10",q.Icon_dorm_134="3097178d-ce76-48c6-9038-562958c0190b",q.Icon_dorm_135="caf0d18b-fd77-44ab-9ab9-5571c3004592",q.Icon_dorm_136="354a4caf-0c65-4bf9-9851-cf638f51b5ba",q.Icon_dorm_137="e1300a0d-d09f-4ae1-9c79-3ba932b4fa2c",q.Icon_dorm_138="a9e72600-9f75-4a6f-8b37-8ca116c0bd5e",q.Icon_dorm_139="dac98d78-8142-4ad2-b74b-e1f7c45adfa4",q.Icon_dorm_14="c75209e2-78fc-42ac-9586-637735cba027",q.Icon_dorm_140="89919009-4113-4cfe-8135-fceb4c70c27e",q.Icon_dorm_141="ecadaaae-6571-41ba-a3b8-90fd7cc2150b",q.Icon_dorm_142="c2c1807b-05e1-4cb7-9ac1-94adbd3ce872",q.Icon_dorm_143="ededcda0-c5d6-4ca4-84c2-acc44fc1d66f",q.Icon_dorm_144="74ea9a6d-a6c8-436e-b7bf-9802c80bbad6",q.Icon_dorm_145="89f12281-2db3-45dd-8c1d-d87e9c65f30a",q.Icon_dorm_146="760c8386-b0c3-4dd8-95fe-5ad8f2ede76c",q.Icon_dorm_147="4aa7c2a2-35f1-4a16-b096-4188ad74b082",q.Icon_dorm_149="f5a774e2-0977-4b6b-8844-b045a5077f30",q.Icon_dorm_15="42755ace-3575-4b1a-8316-f11da02a7722",q.Icon_dorm_150="3b8f6fad-d717-4552-98ad-59190fab336e",q.Icon_dorm_151="e63ae07e-f881-4b1d-9631-53a5ad744c40",q.Icon_dorm_152="20838d8f-e8e6-430f-8a77-f34f21c0634c",q.Icon_dorm_153="75d2bc65-2d14-424a-a6c0-e2f936e6389a",q.Icon_dorm_154="ecc70da6-8ecc-4662-9a22-1fc9e3f4bd04",q.Icon_dorm_156="16a97f29-6acd-4772-b101-ee69014ab19b",q.Icon_dorm_157="0cb603a5-1c4c-48fb-a58a-6700c7a2281d",q.Icon_dorm_159="bfa136a8-b40a-451e-bf54-33e69cefa601",q.Icon_dorm_16="a2868ae9-d139-4776-af73-33ea7326c237",q.Icon_dorm_160="f0ed6ef7-e78d-4314-9054-c4a6493a837a",q.Icon_dorm_161="a0ff0705-652d-4eb1-95e0-d418fdabbe00",q.Icon_dorm_162="0b6252f4-de5c-4289-bde3-dfd4a7babdb6",q.Icon_dorm_164="befc6570-1d28-4a10-9930-8872ff3064d4",q.Icon_dorm_165="eea7db40-c9a0-42a9-b73a-d5a7050adaaf",q.Icon_dorm_166="1c2f7110-3bf6-4710-8bb7-6bebe1753d0f",q.Icon_dorm_167="56918c80-2dc6-4d9b-a91d-e883431901a8",q.Icon_dorm_168="a104a092-3741-42ac-a032-3c1eae7fff15",q.Icon_dorm_169="d85b6ca8-2870-435a-a033-4350050a187b",q.Icon_dorm_17="bd513839-8be9-495d-ad61-4e28b69bea34",q.Icon_dorm_170="aca2f7e3-44c9-4007-8750-ac05e9a15e50",q.Icon_dorm_171="bf6b2d89-d7cd-45eb-a64f-d8072fa75e3e",q.Icon_dorm_172="1cdc5c8d-a245-4b42-ab3a-c3c0b0dacb4d",q.Icon_dorm_173="4b46ccc6-528b-4e47-b81b-65f9ba28bdb3",q.Icon_dorm_174="a2135da1-9169-4a60-8c32-ffa4827c36fa",q.Icon_dorm_175="8f41b335-6b4c-479f-8984-eb071fac9eab",q.Icon_dorm_176="b1d3b659-d544-4298-9010-968aa90d1f70",q.Icon_dorm_177="faadbf55-48fb-41be-98be-4b61e7e1463a",q.Icon_dorm_178="8e927752-0bbf-40e3-8c9d-6c355d4cea3c",q.Icon_dorm_179="74212f78-a276-4692-b67a-0aacac0ef3ca",q.Icon_dorm_18="d77fa9bb-db19-48a9-89e5-cf1e30e68458",q.Icon_dorm_180="af5ed18b-39b9-4797-a85f-02dd9a4928fb",q.Icon_dorm_181="2a976d5d-ccf1-4080-8a6c-9f8413a17602",q.Icon_dorm_182="85fad99a-3bef-4753-bd76-e785a5d7e7a9",q.Icon_dorm_183="3ae81581-eeb4-499d-b6f1-50a9886da1af",q.Icon_dorm_184="d8b7a2b3-eac0-4a6b-8d86-580de332a4ab",q.Icon_dorm_185="2581e0f2-0615-499d-bed1-20da460fa707",q.Icon_dorm_186="ef7f4809-7a66-4b16-b6d1-2e745b713f61",q.Icon_dorm_187="ea21b475-a452-4a5a-8c84-abe486e7724a",q.Icon_dorm_188="734f0d23-8588-496f-9058-008a5aeabf43",q.Icon_dorm_189="67be66d8-caf2-4803-95bf-0f664e227aa6",q.Icon_dorm_19="ce8cf06e-03ea-4f57-8f93-ea21bbd57a3d",q.Icon_dorm_191="0e36e68b-1817-4800-8a36-04d4438cac5b",q.Icon_dorm_192="38822fef-77c9-49f6-ba82-c72ac8095734",q.Icon_dorm_193="f7cf3c38-37ba-4c85-a417-2f3176c5fe5e",q.Icon_dorm_194="52f1876e-9b6a-4761-8d3f-d8171c9b6a62",q.Icon_dorm_195="e73a2520-c3f8-4d1e-9b9b-03fad263a947",q.Icon_dorm_196="cc6d1ce5-5474-462c-bc41-e28e4183b25d",q.Icon_dorm_197="cc0e2f3a-8e43-4085-a628-84bccc05fd64",q.Icon_dorm_198="92fea460-c3bc-4131-a671-2eb7217de4de",q.Icon_dorm_199="ddc55501-b8aa-4315-a14a-71f7d203be35",q.Icon_dorm_2="33d87d88-e274-4613-af34-6263a1ffb8bd",q.Icon_dorm_20="98983e44-74ca-4bfd-b36c-f8f945abae3c",q.Icon_dorm_202="09f73f45-8ce0-4399-b6a9-f07ac7767d17",q.Icon_dorm_203="5cc2068a-4cde-490e-8c94-5bbf8e933387",q.Icon_dorm_204="e819247e-12e0-4c31-b6d5-604af1ac4c24",q.Icon_dorm_205="ad88a984-5658-4066-ba5b-06ad6a506eb4",q.Icon_dorm_206="7c87e059-6cb0-4e3e-b20e-fc57681b0e3f",q.Icon_dorm_207="00f1fc81-9404-4ffc-8eb0-8e93a2c37064",q.Icon_dorm_208="4938553e-955b-4c7a-8b9c-041572832639",q.Icon_dorm_209="be71ba9b-8713-45a1-b3fc-d91a2b7dcd23",q.Icon_dorm_21="d05d41db-d874-4b9d-adf4-93efa8ae8051",q.Icon_dorm_210="97ec5e35-4898-4273-a9dc-9977da8968d2",q.Icon_dorm_211="2dbf2ae2-ecc8-48ca-857a-cc02cc538dc0",q.Icon_dorm_212="82e0bf70-3a07-42b2-b4f9-9bffaf2412e0",q.Icon_dorm_213="b1ef07ec-eff6-4422-9e4f-587da966f337",q.Icon_dorm_214="0eb14dee-4279-48f0-93ca-ebd8ff13df03",q.Icon_dorm_215="ef439b1a-01d3-4547-b961-560fdf2cc00c",q.Icon_dorm_216="0d2d976c-7aad-47aa-8bb6-3e49787725aa",q.Icon_dorm_218="0be13e16-6549-4b2c-821a-05bb64cf3193",q.Icon_dorm_219="23ae865f-fdd9-48c8-ac77-0c1d472957a5",q.Icon_dorm_22="d37ce8c9-ccb0-4366-aac0-586a58944ba8",q.Icon_dorm_220="6b9a9d01-3273-48a7-bdba-2116a3f33f06",q.Icon_dorm_221="024834d6-14e2-4296-8189-04703eec27e0",q.Icon_dorm_222="2707558d-7843-4d2f-9b09-0f40a9506c09",q.Icon_dorm_223="76e88987-a6fc-4c6f-ab55-1c57c270982e",q.Icon_dorm_224="9f7a1514-a344-43df-89da-1815980a4379",q.Icon_dorm_225="6f5970bc-8cdd-41ed-8424-9c23add556fb",q.Icon_dorm_226="2352ac36-e0ae-42a6-9fa4-5e7521a6e496",q.Icon_dorm_227="be64c154-91d1-4c3a-a299-305fe1cfb4e5",q.Icon_dorm_228="c0f84d99-f988-46e4-adcf-41a1621ab756",q.Icon_dorm_229="a2595b9d-f886-4f7c-96a3-9ab6fc40d057",q.Icon_dorm_23="60717c2d-9134-4fcc-badc-a9efeffee090",q.Icon_dorm_230="a44a0a71-9141-4359-b745-f0da21e23adc",q.Icon_dorm_231="20dc8c2a-6f3a-40e9-b65a-03016645943b",q.Icon_dorm_232="51534cb6-4e3b-4f02-8ee4-935279c2f83d",q.Icon_dorm_234="b0e0faf2-32da-47eb-bd72-b8357994370a",q.Icon_dorm_235="b0033c7b-db5e-4728-94c5-938e482784e7",q.Icon_dorm_236="ae1554cb-6c93-441a-9b90-e3056339a9a8",q.Icon_dorm_237="4cc84229-fbdb-4bbc-8695-5609194c169f",q.Icon_dorm_238="91f45467-cfcf-4e7d-bd25-9dcbbe7be08a",q.Icon_dorm_239="10c51d1f-1ee3-4a30-a5b4-83a23cbfc78e",q.Icon_dorm_24="866ed0c4-373e-40cc-bb5a-a49adf7fe277",q.Icon_dorm_240="7cc296b2-cb50-4460-8d89-4c2fd8484097",q.Icon_dorm_241="b2af2c3e-2086-4cd6-ba70-6ad67f71a0af",q.Icon_dorm_242="f4419033-07ee-4e97-acf3-73ada790509c",q.Icon_dorm_243="0a319f96-9d6d-4bf2-81c6-b8a58d66f3e8",q.Icon_dorm_244="d44addaf-d69f-47b2-9245-b0c44dbb8117",q.Icon_dorm_245="32f75fab-d85c-4153-ad84-c3c393f3d8a0",q.Icon_dorm_247="cf356f86-8001-4336-8ff3-6b755e9da836",q.Icon_dorm_248="9f36cfda-65dc-429f-96ba-b29995a9de5c",q.Icon_dorm_249="db8f8044-e66b-481c-ac71-5f365e281b78",q.Icon_dorm_25="355fe7a6-b7f8-4215-81c5-0154ec89ae89",q.Icon_dorm_250="7803336f-3742-44ef-83e6-d1461f2731d1",q.Icon_dorm_251="dc3d45b0-19e1-4c7a-9a8e-d80af155030b",q.Icon_dorm_252="f7363b82-328a-4c91-acaf-29da233eef66",q.Icon_dorm_253="0253600a-c953-45e6-82f5-07f12fafb927",q.Icon_dorm_254="e5be6660-8fd3-4af2-a090-a972fd28dfd1",q.Icon_dorm_255="2d0d6a3a-b132-4aa8-af63-ae0e9ae03569",q.Icon_dorm_256="252dc8cb-2be7-4876-9330-709aa6c310e1",q.Icon_dorm_257="3faa373a-5fdd-4385-91a4-71ccd4960f6b",q.Icon_dorm_258="d877d120-1026-4e3a-930c-c3b2ef6c60e1",q.Icon_dorm_259="89725cf1-f8a6-45fa-9f26-cde21c3f00aa",q.Icon_dorm_26="09f250ac-169e-4e25-aede-82df9748d708",q.Icon_dorm_260="6a70bfd4-403c-43c6-a25c-a516344d688c",q.Icon_dorm_261="5a154161-7a95-44ac-b7af-764e36534138",q.Icon_dorm_262="d770713f-59d1-4829-be9c-e0accc79cd77",q.Icon_dorm_263="de4456a8-dc91-4b9c-b3db-86b188ad7bfc",q.Icon_dorm_264="986edbb7-cb2e-4ad7-a04e-d637107517dd",q.Icon_dorm_265="0d262300-ccc0-4d01-b4b6-ff6d2996d0b9",q.Icon_dorm_266="928ebb25-fa5c-4e17-babe-0f131d84fef8",q.Icon_dorm_267="70e71ff4-6236-4015-9f17-d782b1e9a22c",q.Icon_dorm_268="c616f520-b235-45ef-8bc7-bc1afcaaaefb",q.Icon_dorm_27="ccb870c6-04a3-41a9-9b23-eba642da9b69",q.Icon_dorm_273="25847bff-c240-4c40-ae2e-3c14a304a278",q.Icon_dorm_274="e4acd5b3-6f59-47c7-9a95-9467299eec84",q.Icon_dorm_275="b8fb9c75-6a1e-4733-98c2-dce864a3e1fa",q.Icon_dorm_276="35ba65db-97cd-4dd1-86ed-1e5f33d34ac7",q.Icon_dorm_277="32dd0c62-e3c4-4d11-b648-3d365745c06c",q.Icon_dorm_278="d8329420-b0bb-4181-bd80-b8a957442e42",q.Icon_dorm_279="7fa57898-450e-47bc-854b-b14593878635",q.Icon_dorm_28="86d68f76-ab73-4d24-9375-aeb419389742",q.Icon_dorm_280="e4b9c694-b19b-44fb-a230-43334882dc19",q.Icon_dorm_281="61056f2a-9c49-4e61-941a-b261b7d16fcc",q.Icon_dorm_282="16bcc296-5d57-4028-b7bd-f0f909ba0158",q.Icon_dorm_283="d9db1e2e-de1b-44b8-89ba-7bc9acb1b345",q.Icon_dorm_284="85ce801e-7cbf-4d36-b006-6411f5175238",q.Icon_dorm_285="f5c61ea3-d0b9-4a85-a568-953e07c95f07",q.Icon_dorm_286="1d1c5a1d-3dc4-4eed-99ce-53eeea6ac64d",q.Icon_dorm_287="b64e36d3-9687-49ec-85d7-08bfb607a528",q.Icon_dorm_288="413b9027-20f9-4865-b331-8eef4b737c34",q.Icon_dorm_289="0810ce1b-b6a4-476f-96c0-f4b07efbd041",q.Icon_dorm_29="269b3609-918d-454f-943d-f967cb2957de",q.Icon_dorm_290="5a962860-cbc5-49c4-a0e3-a6e01bf21047",q.Icon_dorm_291="226d9a34-423f-472c-bd73-f85f1c0e7d82",q.Icon_dorm_292="9a0a9ce7-ea3b-4b4e-a63b-a8c2c7601c19",q.Icon_dorm_293="a55bcd55-283a-43e4-a492-a8d7930d56a5",q.Icon_dorm_295="7b7191d9-db69-4f3d-b927-ac180a8c1e84",q.Icon_dorm_296="50502673-b839-496f-b810-67333a93617f",q.Icon_dorm_297="b9e8f861-bd9b-4121-acde-a4a36cf69772",q.Icon_dorm_298="b0480787-4926-4b17-a69d-26ca5e27de74",q.Icon_dorm_299="5cc5b544-2c33-488c-a9c3-4ac617b5465a",q.Icon_dorm_3="5f488c19-d5cb-43b0-b1b6-e50eded3d1cc",q.Icon_dorm_30="1245aab1-c95c-4f0b-9521-3025e97036b8",q.Icon_dorm_31="82618859-e064-4398-9f14-7de9d1f22e7f",q.Icon_dorm_32="f70a9bf6-7dd1-44b7-9829-b2466945bb1c",q.Icon_dorm_33="cd4ea517-4f38-47a9-89b1-0432babaae8d",q.Icon_dorm_34="3d35b880-5b72-4911-8cb6-65fa49716594",q.Icon_dorm_35="272c8de0-5c23-451d-9f35-19a1a0e39b04",q.Icon_dorm_36="e1eda36d-6d21-410d-8cd4-998dbbda523d",q.Icon_dorm_37="6cc808eb-edb4-43f1-a8f4-ea9cb37a0a8f",q.Icon_dorm_38="aa804e51-d7fc-44f3-9f90-82f7138f5697",q.Icon_dorm_39="6c74e182-f8c2-4939-afaf-848879990c88",q.Icon_dorm_4="aeb36876-4d34-47e2-9d48-7de03a480f6b",q.Icon_dorm_40="3e2d3033-8bca-4962-b2ec-eb9d06e5df1e",q.Icon_dorm_41="588ff24a-fee3-49a1-86f2-9dc0720afbe3",q.Icon_dorm_42="4bdca643-bb02-4f90-bbac-abbbb6cba38a",q.Icon_dorm_43="7dd7f78d-aca0-4a67-aed1-caa4ee401748",q.Icon_dorm_44="63afdf66-5cde-4a25-96aa-db3062aed753",q.Icon_dorm_45="0e7edff5-1dcb-4866-b5f8-5ed8557a7486",q.Icon_dorm_46="338d8a5a-8c14-4256-9acc-693713eb04dc",q.Icon_dorm_47="6261038c-7c85-46e2-a675-4fdc8aa08ea4",q.Icon_dorm_48="39ba2982-31ae-43f8-a31b-1ce2508f66ea",q.Icon_dorm_49="90fed777-8e53-4d3e-859b-2f43015a6348",q.Icon_dorm_5="c27079c6-7e3c-4194-96a5-7f2075c2c0e8",q.Icon_dorm_50="6c0d6bf4-aae6-461c-8045-fa6324fc7bac",q.Icon_dorm_51="a0891e6e-0bca-4c91-9390-58f223df509b",q.Icon_dorm_52="11b68a89-43f5-417d-a920-725230769a88",q.Icon_dorm_53="5d12c2f2-5a43-4f56-aa98-a2d45d6e4741",q.Icon_dorm_54="6fe1e5f9-b41e-418b-b857-56452982bc6a",q.Icon_dorm_55="5ed886a1-ec5a-440c-a953-35170ec05422",q.Icon_dorm_56="a5c7c2ad-5f3b-487f-8ebe-b2c28060f48d",q.Icon_dorm_57="6600bc60-5f0f-456a-b5b8-5674391b5d6f",q.Icon_dorm_58="e718a3aa-3b38-4888-9491-2a2cd83ead42",q.Icon_dorm_59="5343910a-49ec-4bc9-afee-63fc98962d10",q.Icon_dorm_6="f01d3536-8f27-45a1-bd0f-a45cba516496",q.Icon_dorm_60="40c61b99-bb12-4920-ae48-ce53dcab0684",q.Icon_dorm_61="7858f335-1e41-4ef4-b5ca-3437b5c82485",q.Icon_dorm_62="bade824c-cf8a-478d-8d45-7f386e4e9192",q.Icon_dorm_63="db9b901b-ea7e-46c0-be3f-dc9f80f335ce",q.Icon_dorm_64="ee8292d3-b72e-4d55-8072-4dca3cf7fdc1",q.Icon_dorm_65="4d5270a6-8f9a-451d-85a9-2f5ae902b274",q.Icon_dorm_66="6304dfcb-e138-4875-a3f1-9e7052bbd37b",q.Icon_dorm_67="f9a546a3-9989-4e92-a09e-bc49d8d63a6c",q.Icon_dorm_68="7ab2caab-5bb3-4f9f-9f8c-4c941c3bce59",q.Icon_dorm_69="94bca265-b04e-4d70-9bb4-b5d2239c8347",q.Icon_dorm_7="135bdbcd-a51c-492d-a7ab-aa42d22c02da",q.Icon_dorm_70="f94283c6-7645-4cb0-a114-6d087704f373",q.Icon_dorm_71="e92e3148-bd07-41dc-8e81-2a774d334183",q.Icon_dorm_72="6bf1dc49-b856-48c8-bafc-5349bdc75010",q.Icon_dorm_73="6570a040-b633-4311-8e2e-2794783f2cf2",q.Icon_dorm_74="ff054d63-bc61-4cda-ad8a-90553031f8fc",q.Icon_dorm_75="74f5c8e0-079a-41c4-a295-49dffa441f24",q.Icon_dorm_76="5d8ad48e-7932-4526-a608-e3c81caaf6a3",q.Icon_dorm_77="da4a989a-e32d-4e3b-aa9f-6ab61f80988f",q.Icon_dorm_78="6171588c-7a75-4552-ad40-e72c721b8ae3",q.Icon_dorm_79="30004485-b35c-420c-b2a2-9d62c5a8367a",q.Icon_dorm_8="432d0371-a089-4f26-b2d0-38f1c7d3baaa",q.Icon_dorm_80="bd61fa75-1496-4a2f-bc65-6bf6e4e9482d",q.Icon_dorm_81="21e7bce5-a6cc-4907-a2d1-392f2d834e4a",q.Icon_dorm_82="532f169b-7149-4519-aa92-8dfec4fa6e1f",q.Icon_dorm_83="d8a47720-358a-4d63-b7e5-6402cad78528",q.Icon_dorm_84="012a6009-3974-4437-8e9d-183c2ebc9752",q.Icon_dorm_85="6fc1872c-eb83-4ae8-ad86-dbce00bc95f9",q.Icon_dorm_86="9e984eb9-38e2-4d44-b3f4-7bac3d149f16",q.Icon_dorm_87="e540c205-b512-4dd1-8c3d-f642c93ab5fa",q.Icon_dorm_88="4202c1ca-1dbb-4a91-984c-6812c7e8cbc5",q.Icon_dorm_89="ad48df8b-3ed8-4518-b9da-3f88473de1e7",q.Icon_dorm_9="39b41cb4-4655-448e-a15f-b14f1c89a5b2",q.Icon_dorm_90="abe262dc-5d4b-445e-a866-cdfdd0938646",q.Icon_dorm_91="b87acf6a-db18-4fc3-8f94-3ccc2a3d4574",q.Icon_dorm_92="3db85022-12ec-4feb-ad2a-98724991822b",q.Icon_dorm_93="de1bcd80-18d9-46ba-92e4-b9f6033ab14f",q.Icon_dorm_94="670ed547-fec5-407c-acb2-aaf428b2830a",q.Icon_dorm_95="73e0a3af-e97e-4eba-98b6-61e402b79c06",q.Icon_dorm_96="dbbd8786-7e64-4aca-9a56-ab05fee0f1a7",q.Icon_dorm_97="63a295f1-6629-4cb1-9097-4fd876bc5cb7",q.Icon_dorm_98="abae7c87-3e6c-4865-b959-d935d540cc26",q.Icon_dorm_99="51cbe9eb-cd5f-4c1a-9506-295d36e42b08",q.Icon_dormbg_1="ecefdaea-e30e-41ed-af81-bbac0b85c567",q.Icon_dormbg_10="5ee22bae-f02c-4faa-b3b8-bc6fed190f32",q.Icon_dormbg_11="518de818-c9ca-4b17-ac62-7d6f301cb4d7",q.Icon_dormbg_12="321d329b-8cc3-461b-a694-b3e468fbf475",q.Icon_dormbg_13="d2bc8539-e09f-4132-a350-9a5dc60e911c",q.Icon_dormbg_14="ec5bdc8d-9f3f-4eb3-b25b-b2ae36d507d7",q.Icon_dormbg_15="50118a28-5769-4e32-afb4-5c0c6dc630d8",q.Icon_dormbg_16="84f03c0a-0767-44a2-86ff-de5630c63314",q.Icon_dormbg_17="68c65783-706e-45af-9f25-e71a08dba0e0",q.Icon_dormbg_18="934c2670-51fe-4b14-9043-ae00afaf1431",q.Icon_dormbg_19="44397d0d-351f-4fc9-b469-62b956ff00a3",q.Icon_dormbg_2="0d97ae00-efee-4da8-9bed-047658cd372d",q.Icon_dormbg_3="a58823f3-9aad-455c-98a5-7728dc272a2f",q.Icon_dormbg_4="625d8873-01ce-4eb1-8c3b-16ae18915836",q.Icon_dormbg_5="305a0a12-9a0f-40a3-b930-c22456620af6",q.Icon_dormbg_6="fa88c99f-db50-4466-af64-4c0571e54796",q.Icon_dormbg_7="8c8d6605-ed70-4710-8739-742c97d58381",q.Icon_dormbg_8="39b55eac-75a3-4ed0-ad60-cc6944fb41cf",q.Icon_dormbg_9="eba52da5-e59c-443c-a029-29545994f12d",q.Icon_dragon_orb_astral="9d9c6a2b-806b-4ccc-8250-002bdebadaf6",q.Icon_dragon_orb_astral_huge="3d8fc46d-d672-48aa-a165-8baa0e69348e",q.Icon_dragon_orb_fire="8c75f560-0778-4290-ac52-5000290abb5e",q.Icon_dragon_orb_fire_huge="474f438c-1429-490e-9343-2cd5965bafcc",q.Icon_dragon_orb_ice="8e2afc0d-7580-44e4-bad7-c190b7ae71c7",q.Icon_dragon_orb_ice_huge="23c8b451-e341-4058-8e20-11912e3c184b",q.Icon_dragon_orb_physical="5a262caf-2a6a-4b51-8a89-a791da193fc8",q.Icon_dragon_orb_physical_huge="141c3a8d-51f9-438c-a6c1-7f89b268f274",q.Icon_dragon_orb_physical_huge_silhouette="8ebe8d03-6f90-4ffb-aae4-791af35ca44a",q.Icon_dragon_orb_plant="f10c3bdb-89aa-4e3e-a726-20b169027f55",q.Icon_dragon_orb_plant_huge="5edfa0c3-0e54-4c57-a4b2-34a329c39704",q.Icon_dragon_orb_shadow="b3ba5b67-7984-4613-80e2-81580637c1a2",q.Icon_dragon_orb_shadow_huge="c41c0a7b-a157-48f0-8ce1-13f074cf0849",q.Icon_dragon_orb_storm="80fc4e9a-fb62-4a54-aabb-e10766210182",q.Icon_dragon_orb_storm_huge="2f512880-9e18-4eee-b761-bb3c33d6927e",q.Icon_dragon_orb_water="0ba7c6ab-bd03-4db5-ba5b-03f1f6be01ba",q.Icon_dragon_orb_water_huge="50664486-ddb4-48c2-adda-ac4fe0cff62e",q.Icon_elements_chart="c387c574-a039-429b-844d-7270fdd2380c",q.Icon_emote_1="87bc3760-04ba-4aba-a13e-f32a4b184e90",q.Icon_emote_10="0a7c0150-1593-4f28-83a8-8db058a56f6f",q.Icon_emote_11="14c2cd40-929a-4228-a7a6-baa2e2e3bcd1",q.Icon_emote_12="420f9ab7-a292-4d81-b65b-6e56a2a4d47a",q.Icon_emote_13="f23b610f-dca4-416a-9d8c-11920ee091ca",q.Icon_emote_14="3d27405b-f9d1-44f8-b64a-66bb7111bab8",q.Icon_emote_15="8b4461fa-abab-4ab0-9fc0-6c6f83b2c61a",q.Icon_emote_16="26dfdc8b-2bc5-4fb0-bc1e-2d30fa50b241",q.Icon_emote_17="4e597cba-671f-4de9-8ef6-f000c7f28312",q.Icon_emote_18="a1eabf6a-41a7-4d81-93e9-3ce784a6eeac",q.Icon_emote_19="a2049def-b490-42ab-b3f2-48911445f808",q.Icon_emote_2="6c7f9552-4698-4731-873b-85bf33cbcc1a",q.Icon_emote_20="88a8d493-cea7-420c-85f7-cd2cbbb0dc8b",q.Icon_emote_21="9fc7b325-1740-4fb0-9623-8bb42b877e80",q.Icon_emote_22="e6bb1dde-6bb5-4a04-b2b0-982cfd8c811a",q.Icon_emote_23="c56cb871-84b7-43c9-98b8-c004219a3a00",q.Icon_emote_24="3bbede39-61ad-4823-b68e-00e68047ab98",q.Icon_emote_25="bbe79c0e-dc39-4975-8286-e7d6aed353bc",q.Icon_emote_26="cd58cb40-d7d1-4cc5-b372-9cf9214e8ffc",q.Icon_emote_28="7193f883-c1ea-4c64-8a3b-4fcbd01c2230",q.Icon_emote_3="c34a02c1-0174-4fda-8018-d5026be950ca",q.Icon_emote_4="0cdb8714-44ae-4322-a344-65a1f38ec1fb",q.Icon_emote_5="5a3069ac-2fab-4e96-b894-f5699af7aec3",q.Icon_emote_6="5eae56d9-611c-4535-9304-7c886b9f38b5",q.Icon_emote_7="0ac82307-6196-46a3-ade0-b8a24cf68ea2",q.Icon_emote_8="6f372668-c590-4c53-a66d-b89fdb3ea4a2",q.Icon_emote_9="e7b9474f-16b6-4c90-a58d-81f425cc2791",q.Icon_face_1="15be89c2-ad05-43be-85dc-af03ddecc9e3",q.Icon_face_10="db9d7259-a653-4f91-9983-f4ba8edb2d01",q.Icon_face_11="adebf976-0988-424c-b18e-fe08472f8e11",q.Icon_face_12="61725f9b-2320-4105-a12a-2f4db323fc37",q.Icon_face_13="408e3589-8d10-41bb-8d16-a060d785f60c",q.Icon_face_14="27e7238f-51f9-4b22-a27a-bc8a235d3e0c",q.Icon_face_15="be507ad4-2c9d-4a78-9489-a4b1445576a3",q.Icon_face_16="8eb2826d-3931-4778-9eeb-64774be9df71",q.Icon_face_17="d01d3059-0c24-49a3-b5e4-c0388b68582d",q.Icon_face_18="ef963721-e1ab-4596-baa3-48ad9c3b379f",q.Icon_face_19="b2c170bb-4eac-481b-aac8-0c0370bb9983",q.Icon_face_2="77845cf0-a961-4656-8cbc-3d73889b44d9",q.Icon_face_20="742ad13b-6277-4048-9d6e-d5d8b3dd09ed",q.Icon_face_3="a3bb7eff-e110-4f85-ad0c-9eb6b5d83837",q.Icon_face_4="40bfbe23-2637-472e-b5c8-fb3bdb601809",q.Icon_face_5="b87eeee9-3bc3-42b2-b037-00018010ffbd",q.Icon_face_6="9d914fe0-2eb0-4876-b3d9-d760c99198ad",q.Icon_face_7="1654c7bc-6a58-4726-b024-0bb2adfc1c3e",q.Icon_face_8="c4dc436b-abb4-4e7c-9c5a-62561c549a0f",q.Icon_face_9="dde26748-6111-4817-b4b3-4838e747e7b4",q.Icon_follow_1="5331593c-fbcd-46fa-95d3-c4bdf789e753",q.Icon_follow_10="e3c1a4f4-6610-4164-98f2-31aa6f02149f",q.Icon_follow_11="43641748-60af-4013-916c-0f02b8bc10aa",q.Icon_follow_12="301ceb1b-6eb6-475a-b182-2acee66b22dc",q.Icon_follow_125="399de882-1ccf-4556-8289-0243f7025d79",q.Icon_follow_126="da12e96d-c895-4abd-9ff2-c768db28d96d",q.Icon_follow_127="559a4486-e138-4655-a4e1-716fad3bae0b",q.Icon_follow_128="0682ecb5-29cc-498a-bf0a-3d2c78b701f5",q.Icon_follow_129="53c8c465-1a3e-4b96-9b6c-f40f69a28b40",q.Icon_follow_13="501824e4-36f7-4a77-9ab9-ba1f37ac1cd7",q.Icon_follow_130="b74a2f3d-aad6-4d33-9dcf-692560d651fc",q.Icon_follow_131="2da63051-0237-48f2-aa1c-88a9149a737f",q.Icon_follow_132="69ca5e4f-b796-4c77-ac26-4e84f2053599",q.Icon_follow_133="32ec5a96-3a8a-42e8-bf1c-7996ca78c738",q.Icon_follow_134="b1ca9337-3281-4ada-bd03-71c01cdc3e1a",q.Icon_follow_135="9a6671b9-7f03-4b1c-bce5-4ae924388712",q.Icon_follow_136="5ecbdee7-8d01-4bec-8b7d-b0664ea8b8f1",q.Icon_follow_137="e6a4f6e6-fa35-450c-85a9-2ff37f32532b",q.Icon_follow_138="46dd4a51-66bf-4952-8875-667c6b0904f4",q.Icon_follow_139="ac697412-1a63-4fc1-92fd-417eb5a112be",q.Icon_follow_14="d246ff46-ed64-4097-9eef-67ee415d85c3",q.Icon_follow_140="146b1068-42ce-4828-8a79-a8ce2746e367",q.Icon_follow_141="9f278441-d8c6-436a-9db4-3881b963686d",q.Icon_follow_142="287d1e95-24ed-4830-8bbd-7b97b3d7d0e1",q.Icon_follow_143="609d3724-b42a-435a-aeb5-f1f35a971a48",q.Icon_follow_144="6daa3c5d-4052-4250-8b29-db87387550d2",q.Icon_follow_145="b515023b-f8d9-4b0d-a3c5-58fb7ea7027f",q.Icon_follow_146="77cdb5e1-7b25-42a7-a9fc-2ac1d7cb7054",q.Icon_follow_147="f1b2fb7e-8f6a-4beb-9ee3-9674172fcdcf",q.Icon_follow_148="c22004cb-8cd9-4094-94bc-90bdf6124658",q.Icon_follow_149="5248feb6-963d-4334-b20b-5d88a90c9dab",q.Icon_follow_15="b99597ce-7193-4e5f-bca3-73ae669aa17e",q.Icon_follow_150="4cb61c2a-c4a2-4145-8677-4ad4be1f0478",q.Icon_follow_151="b4705a42-bf3d-4ae3-96da-1be8e2863bbf",q.Icon_follow_152="bdba4913-716c-4b24-b4c4-c2df39568da9",q.Icon_follow_153="7ee0472f-d8fb-400f-a90b-1055cecb8e4d",q.Icon_follow_154="428b9072-d4a6-4faf-bc4f-34cd81ebee5f",q.Icon_follow_155="aee71ae7-d14b-4263-a589-8044e830c8e7",q.Icon_follow_156="291191f3-c3a1-4615-b2c8-ce2355abc19a",q.Icon_follow_157="90d0e8ba-7d51-45cb-af9a-25f3d3480b6e",q.Icon_follow_158="a89d23fc-579c-46c2-ad22-0fdcb5cdf794",q.Icon_follow_16="c86c0c3d-ca54-4cee-8107-45a111e58922",q.Icon_follow_161="92b78a23-91c0-410e-87ca-baaf358344fe",q.Icon_follow_162="69e1ee26-a81f-4520-91cc-662803b488cb",q.Icon_follow_163="f977a05c-d8b5-46d3-9426-774a06cc8b3f",q.Icon_follow_164="2044b8bd-05b1-4adb-81df-fa4a41e760a1",q.Icon_follow_165="3c715731-9738-4076-b457-88082a22aee0",q.Icon_follow_166="dc5ebad0-3edd-4d5f-b507-86db574fbed4",q.Icon_follow_167="2fd04b87-4d43-4a3e-9032-bb140e60ceb5",q.Icon_follow_168="57aa3f19-9166-4b8a-88f0-02cc3f46cf74",q.Icon_follow_169="f728dab0-7c81-4583-a4e9-accc8e9c1947",q.Icon_follow_17="0318cf98-5981-48c4-96ea-43387f7b8631",q.Icon_follow_170="11c557f1-96a9-4733-90f0-a06a81dcfbe3",q.Icon_follow_171="93626a85-9d2e-4c51-aa71-9f430bdde436",q.Icon_follow_172="bcd68e0d-f3d1-41fd-90fc-ad822a17e92c",q.Icon_follow_173="2d93be8a-03c5-4362-8704-dffc4c5a5a74",q.Icon_follow_174="78b77ba6-e366-45bb-912d-5a05d8a9a446",q.Icon_follow_175="b333b46e-3ce5-4800-93fd-617d1c8b8e48",q.Icon_follow_176="040ef63f-7502-4eaf-a148-41fe5d2a4b4f",q.Icon_follow_177="71ba011f-cb77-4aa2-adff-bb5554f7a54b",q.Icon_follow_178="4c40ec3d-58fb-4863-bd20-f1652d8fadf3",q.Icon_follow_179="ebbb4674-1a9d-4fd4-8e03-ac8a54deacb1",q.Icon_follow_18="52749525-fcc8-4a6f-81d6-387c8283ddc2",q.Icon_follow_181="4642a690-b5fe-43a0-9616-781908db599c",q.Icon_follow_182="5be61588-e1ba-487b-93c8-713dfe9faac2",q.Icon_follow_183="4afddbe1-64e3-4cc4-9a01-a4898a21c650",q.Icon_follow_184="869785ab-c91e-4d7c-9057-ce650bda193b",q.Icon_follow_185="1348d422-c381-4b0c-9a3a-175eaf527da1",q.Icon_follow_186="752b85f4-06cb-48ea-9c1b-88bf1a3ac8fa",q.Icon_follow_187="a5c4e783-c03f-4668-ae99-d8520144f4e9",q.Icon_follow_188="4dbcefc6-f8e0-461b-80ad-8794565e3d4e",q.Icon_follow_189="62fada21-0922-434f-be1d-97e1136a3a89",q.Icon_follow_19="d7e5acb6-a3b2-450e-89c1-99aba818b848",q.Icon_follow_190="4e404c29-605e-4faa-a5c5-32073c7e722e",q.Icon_follow_191="9c8f5103-91aa-4ef0-8c78-44d33c7dbce1",q.Icon_follow_192="83f85dcb-7c0c-4894-be36-5e196453c6ec",q.Icon_follow_193="8cd5ccb3-a237-414f-b513-3177fb7bfa6a",q.Icon_follow_194="2e585d80-e968-4adc-8025-643859f3bd22",q.Icon_follow_195="51ee9639-f1a2-428d-87cc-d166c52f9e23",q.Icon_follow_196="905e38d5-be2d-481b-88cb-3b3fefcd93c9",q.Icon_follow_197="8de8ee24-835c-4829-a8e0-b74936c7c799",q.Icon_follow_198="9b438f6c-e2ee-4648-b076-f2a2e7addb88",q.Icon_follow_199="ba5e13c9-e2c6-4ada-86a5-26786210836a",q.Icon_follow_2="9b72f134-1db1-43db-90a4-5ec82d253511",q.Icon_follow_20="3f416ec1-8302-4e05-8165-698b25ff9a2f",q.Icon_follow_200="aa3a2e9b-5ffd-4d1e-99da-bf2401e41eda",q.Icon_follow_201="8c00fedc-4802-482e-abbc-176906f7f066",q.Icon_follow_202="37f79ca2-9004-4e5b-9524-d196ad8537a7",q.Icon_follow_203="21c55979-b4c2-4d80-92b5-d58155aca08d",q.Icon_follow_204="6ea8e508-3af4-4938-be4f-10d8e285db03",q.Icon_follow_205="8db46035-7a71-42b7-8d7d-cafaee2fd8fd",q.Icon_follow_206="2fe321f0-f195-46b2-9e25-70f0be0c61b4",q.Icon_follow_207="3943bdb4-d4ed-4674-845b-89f8703499b2",q.Icon_follow_208="2531c6b6-3867-46e7-ab05-3c4fc74672ec",q.Icon_follow_209="803313d4-0743-473c-a38c-13aeac8ada42",q.Icon_follow_21="88f15e3e-129e-4f30-a6bb-ed99d41e75ea",q.Icon_follow_210="c5d776a4-0433-47b4-ad85-3d63cb9e4480",q.Icon_follow_211="facca6ec-00e6-4f3a-bba3-097f7f45e5e5",q.Icon_follow_212="bae4753a-45bd-4520-b50b-11ffdf5a6c4e",q.Icon_follow_213="f5eff3b3-faba-40b7-ac1a-dfd4d3562836",q.Icon_follow_214="71ed34eb-0acc-4386-96a1-0ece9082184f",q.Icon_follow_215="a1540006-9fc9-4756-98e3-ceeab9cdb713",q.Icon_follow_216="853140fc-162a-4bef-b117-ed1b71c81e8f",q.Icon_follow_217="61ea7ca4-5731-40c9-ab35-f64cd835d7d4",q.Icon_follow_218="51329004-50b5-41ee-afcc-5f009e15e459",q.Icon_follow_219="cf5f3832-439f-4c74-935e-43dc1659c5b0",q.Icon_follow_22="89a2f542-9b39-41ee-806d-2f8fa0e54e9f",q.Icon_follow_221="5a95cada-b42e-44dd-a18a-89446f7b10ad",q.Icon_follow_223="0865eb45-950d-4309-b2c9-1f524d684494",q.Icon_follow_224="5421cbaa-aeb4-4af8-b4ab-295a86a3df28",q.Icon_follow_225="a169b415-819d-4962-b421-24b673851b54",q.Icon_follow_226="c1d74ef6-acbc-4171-bf4f-16c28b561b96",q.Icon_follow_227="6f096a7f-799a-4b11-870e-11d855f88946",q.Icon_follow_228="ed8052f8-69dd-42f0-b9c3-d076a3fcd4ca",q.Icon_follow_229="26ab6ddc-b3c3-456a-b3e4-e5e37387d74b",q.Icon_follow_23="c2483cc3-ed11-479e-a41c-9e4df652ca82",q.Icon_follow_230="1bcbbeb3-abf2-4e32-a0a7-f3a913c896b7",q.Icon_follow_231="e14665c7-e85f-4054-8458-d482665b49d9",q.Icon_follow_232="fb6b946f-4d17-47d0-bb7c-e13629018863",q.Icon_follow_233="51d8cf44-629d-4676-bd0e-417602000ab8",q.Icon_follow_234="08849952-15ae-49af-9c23-9d32fc65bc78",q.Icon_follow_235="17a81173-4c48-4f1d-baa6-881b1c45d179",q.Icon_follow_236="51edabd5-b29b-4758-9fed-c67ebdcb5d40",q.Icon_follow_237="431591b5-6fd1-463b-8b13-8279e9a62bca",q.Icon_follow_238="bf44ef68-3291-45b5-89b8-f66ab85ef752",q.Icon_follow_239="88fa68c4-1cc8-4421-b476-630d9e214d28",q.Icon_follow_24="e7342d06-8ee7-44ea-a914-63a7a243d0a4",q.Icon_follow_240="108ddb3f-a226-4b2d-911f-9bd6cd265a32",q.Icon_follow_241="2146cc68-6d97-42c9-a8a9-c50b3d8f1575",q.Icon_follow_243="e7fb7b61-0cb0-4982-a091-ee1773ac3b10",q.Icon_follow_244="9d58c222-6149-4acc-9ae0-175511cfab99",q.Icon_follow_245="f5a1047c-62f4-4233-90fc-9e9acde6cff2",q.Icon_follow_246="f4b20432-5448-4758-a7b2-ed3e5649b0d0",q.Icon_follow_247="e6f46bbe-0214-4ddd-a4df-f89e3aa5f45b",q.Icon_follow_248="57ece1f5-9af5-4d4c-b3d6-f348c8f1a6a3",q.Icon_follow_249="00cb3764-4854-444f-8f3d-e55df6ca073c",q.Icon_follow_25="316119a7-1f83-4f12-9726-9f8de9a3b8df",q.Icon_follow_250="fab51d5e-e41d-4476-ae5c-d3d96f6ba541",q.Icon_follow_251="f11bc26f-503b-45af-a017-0aeeb7b9b805",q.Icon_follow_252="fabeed26-d6e5-43c1-859c-14ad5c54f330",q.Icon_follow_253="1053a8e1-baf8-43db-af32-2806c4eb1add",q.Icon_follow_254="8e8f7ed6-a354-4f8b-9305-20a080ffbce2",q.Icon_follow_255="5bd143ab-8706-42ea-88da-e04702f2aa81",q.Icon_follow_256="4f545091-490f-4d39-8963-1fa5f6e4d076",q.Icon_follow_257="13082536-a1cf-4d1d-9715-2469a1987b28",q.Icon_follow_258="90dc7a95-6ae3-4ad9-9eaf-8c48d2327c6a",q.Icon_follow_259="e335186d-ff6e-45f9-ad2b-db01283d54ae",q.Icon_follow_26="bcb61a90-eb84-4d8b-86ba-338386ea24ab",q.Icon_follow_260="7db42e80-a40e-40d3-bc2f-d3d292b43270",q.Icon_follow_261="b9e785f3-2efc-497e-a76e-f89d41e25ec1",q.Icon_follow_262="b6c567b0-e51a-4fd0-b3ca-ce1eaad485f8",q.Icon_follow_263="3c02fd94-79c3-43d3-9b37-2bb3a5e19ead",q.Icon_follow_264="0d037285-881a-4601-a056-9401c68c4152",q.Icon_follow_265="b9dd0c2d-fe2f-4ec1-8b50-528a9ce4d64c",q.Icon_follow_266="85602694-00cd-49e9-a25b-a066e7d0c62e",q.Icon_follow_267="3f90bb61-b8f5-49cb-9860-9e90d7c5b85e",q.Icon_follow_268="e37ac522-c8ac-4aaa-94bd-17a6ece67464",q.Icon_follow_269="ff5501b3-68bd-4fb2-92b7-f04d2c1dd683",q.Icon_follow_27="6ef8aaa8-24ce-45a2-b9aa-fae2aa3bcb91",q.Icon_follow_270="727f159b-a37b-4783-b438-d34f09c88fa5",q.Icon_follow_271="55fd187a-0e19-4abe-88cd-295c6e842e75",q.Icon_follow_272="14354a18-516b-4167-8556-16f91346735f",q.Icon_follow_273="1ab1177e-73e6-43f6-9040-7d684da7fb53",q.Icon_follow_274="cfef7a1a-c44b-495c-a1e3-387ef1306619",q.Icon_follow_275="25d469f0-e1c3-4e25-a713-c84eb199af11",q.Icon_follow_277="598ef031-d213-475a-b662-17c034d0bcfc",q.Icon_follow_278="ac2467f4-c12b-4471-b18c-c42aa6d1b50d",q.Icon_follow_279="827b7fac-e325-447e-956b-61f8b3f97010",q.Icon_follow_28="106af062-00ce-4e59-8190-5cf55e1bdded",q.Icon_follow_280="2d30d250-9d4e-476c-a00a-c27de98e8bf3",q.Icon_follow_282="b3c9f9ae-9282-4235-b8e4-f40fd61fd1fa",q.Icon_follow_283="2f3fd239-fc25-413c-8e72-7f063474eb17",q.Icon_follow_284="262d812e-ac2b-48cb-bca2-c9d4fe958763",q.Icon_follow_285="214c8c98-8e98-45a1-9e07-ea214ffe7147",q.Icon_follow_286="736d2b9c-e9d0-423f-bfc8-e93323ba3920",q.Icon_follow_287="465e0d33-dce3-4140-8d63-ed32f77b852d",q.Icon_follow_288="fabbe4a8-9b87-4002-ac1d-01cf9186e6c1",q.Icon_follow_289="549577a8-65aa-48aa-9d59-f9932d3c90dc",q.Icon_follow_29="260f73d3-644f-45a9-8c1a-3899c6ea56cb",q.Icon_follow_290="45a09fba-2070-4868-985e-86dc711cc556",q.Icon_follow_291="53698d82-60b7-4283-94d7-050d1d1dcd2b",q.Icon_follow_292="698e0a52-4975-414e-b6a1-5fde43233750",q.Icon_follow_293="7cb193c5-e502-4f0d-94f4-b7ff49c427b1",q.Icon_follow_294="b60ddae7-eb2b-42fe-a076-0c6b9e118ae2",q.Icon_follow_295="3e195195-e452-43a8-aae7-ec237187482f",q.Icon_follow_296="7a6b59ef-6f3a-40bd-87c0-c8e3d2e7a748",q.Icon_follow_297="89369230-6620-4c3d-bde8-f6c5db892010",q.Icon_follow_298="63e33511-a2fb-495c-8068-fa3e950cecb0",q.Icon_follow_299="66b5de1f-ffaa-4d15-94ae-be3668dccd07",q.Icon_follow_3="79ef68b7-3657-4d3f-b84e-764767466cac",q.Icon_follow_30="0b0d3716-07ee-4943-a41a-58e7c165107e",q.Icon_follow_300="6c0a4132-801a-4966-ac95-a7fc87eeb411",q.Icon_follow_301="e0abbebb-6b36-44f3-9a8a-01c5b38c3028",q.Icon_follow_302="55d38799-e72c-4b23-9ce8-4d66dbda5098",q.Icon_follow_303="8206fd1a-7679-4be7-9fe9-7f286e50f469",q.Icon_follow_304="858ca73c-4e52-424c-a1d5-5938c388c4f5",q.Icon_follow_305="9bc90d9e-f0f2-47cb-989e-2932d3d800fe",q.Icon_follow_306="4f32701f-150b-44b0-a355-adc2e2aab288",q.Icon_follow_307="b4ac688a-c5a4-4e74-b286-9aafefe6c8a8",q.Icon_follow_308="fea975b1-db33-4573-8adb-f90b6c2e1469",q.Icon_follow_309="ac8e1806-509f-4dc8-9190-6758929026bb",q.Icon_follow_31="1bf5b050-7d54-4915-8033-28b2ba50c62e",q.Icon_follow_310="4790f0db-66bd-4148-a84d-abdac5894e8b",q.Icon_follow_311="21cecf6e-075a-463d-8f25-e1198c512979",q.Icon_follow_312="202e93bd-f850-4e36-8e35-61def6b7544a",q.Icon_follow_313="3e344c7c-b3a8-49a8-9755-c19aa308a96b",q.Icon_follow_314="5fa07e18-34df-4964-8155-69a1183669cf",q.Icon_follow_315="1d1248af-dd84-4fdb-a95d-8678bce72b35",q.Icon_follow_316="7d687582-8fd7-473a-9fcf-8650fa8ee065",q.Icon_follow_317="394935ce-1d8a-4910-9515-00f42b8de8b1",q.Icon_follow_318="c1502532-f818-4ac5-9b19-5da2cf16cd1c",q.Icon_follow_319="2267a524-8f0d-4527-a76c-657702634e24",q.Icon_follow_32="403a9a8d-9b89-4e0a-8c88-b7ec5748d2a9",q.Icon_follow_320="12168a1e-4b67-463e-b768-5798aa5d7416",q.Icon_follow_321="aed10ae6-a550-4e1a-98a3-460784b38696",q.Icon_follow_322="2b57dbba-c25c-42f2-a0e9-e3d187a2a35f",q.Icon_follow_323="c26dd27f-12d5-4d9f-9d79-f1e61a86b596",q.Icon_follow_324="10aa0965-527f-4fd9-a9ab-3727df9697d1",q.Icon_follow_325="339c1878-ecca-4753-87ac-c41b7c361ef5",q.Icon_follow_326="aea16c69-9cc6-4174-9a1c-5d8459564d86",q.Icon_follow_327="c9ec51e8-0af1-49bc-ae6f-65e18aaa0ccb",q.Icon_follow_328="d187c36f-fb00-44f6-ad9f-68031cc115b8",q.Icon_follow_329="56e44362-9443-4880-9f03-87a8654e9797",q.Icon_follow_33="a3bda44c-4160-41bf-9636-819252425230",q.Icon_follow_330="42975065-939f-4270-b503-8a95cebea8ce",q.Icon_follow_331="6735e1bd-4b33-4f20-bc61-496f6fa572dd",q.Icon_follow_336="125fb686-be2f-4266-b67f-5b5e2fb579f7",q.Icon_follow_337="8a82df07-6501-470a-a053-97cb4cd8a0a2",q.Icon_follow_338="9d658f38-bae3-4edf-ac42-693424514877",q.Icon_follow_339="63bb4fe7-7877-4d48-9d7a-48370725c6ee",q.Icon_follow_34="b5aa47bf-a72d-49af-a82c-42b77f39c9de",q.Icon_follow_340="bde7c8a1-bd26-4daf-b3b8-59abb925f418",q.Icon_follow_341="343a1de5-7fab-48e8-86a4-43ce8db9f904",q.Icon_follow_342="f9708f05-cb45-40d5-8c3a-8e6d7c7af727",q.Icon_follow_35="7a5f6c6b-dd19-45d0-bb57-231044bf6072",q.Icon_follow_36="c9df5789-a5b6-4dcc-97fe-e38b130e3155",q.Icon_follow_37="1c2e03f9-060e-4996-8f1a-56a8ff085a09",q.Icon_follow_4="83ce3b90-9e92-4f79-b991-6d0c640023cc",q.Icon_follow_5="24aa0dfb-6d7e-449e-aae5-fc7a84670681",q.Icon_follow_6="614f5649-f4f2-4d43-859d-3f5d0655bacb",q.Icon_follow_7="96aa5480-c88d-40be-8db6-b171c4c04fcd",q.Icon_follow_8="6c57383f-6676-4532-9d45-06634fd6dea6",q.Icon_follow_9="e6f7e9bd-e5f9-4797-97d2-3e06839ce134",q.Icon_fossil_1="b70fbb76-5cc9-4a04-b6f3-aa406a1677e7",q.Icon_fossil_10="fd30c231-318a-49fb-bda8-1f2bfbc7e2e1",q.Icon_fossil_11="09f110ff-7313-4ebc-b43e-d6015eb939e8",q.Icon_fossil_12="f0673c90-9009-4d57-8ca4-16e43ab38250",q.Icon_fossil_13="fa068613-e4b4-48c4-a0ee-17ae8650bf86",q.Icon_fossil_14="abc815d6-1653-4e66-8a35-2a878653ccc5",q.Icon_fossil_15="84131a61-473a-4591-ba62-15965feb275f",q.Icon_fossil_16="24db8398-d31d-4848-b127-e38143db94d5",q.Icon_fossil_17="b0f22083-8473-4148-9dcd-ea3a91e26ff1",q.Icon_fossil_18="408b2328-9bd6-4d5b-ad88-5fe26b848ae5",q.Icon_fossil_19="b0b2ad0c-74b7-4cc9-9b46-458067c60389",q.Icon_fossil_2="cb62c437-2e48-4de0-afee-f75546372fcc",q.Icon_fossil_20="32842687-5da9-4047-bdcc-c06715cdba5a",q.Icon_fossil_21="89e0cb13-89f0-4925-8603-5b239f9c7648",q.Icon_fossil_22="e809d2c9-e9b4-4378-9995-e07fe136281d",q.Icon_fossil_23="325302cb-f15e-4303-b765-d0c16500951c",q.Icon_fossil_24="e0ec93d8-b469-4f61-99b6-21fff61d3557",q.Icon_fossil_3="addc9dde-0c32-4f42-932e-61ecfd002979",q.Icon_fossil_4="1abe5fbf-a1ff-4e94-9c8c-a10d936a7981",q.Icon_fossil_5="d9674bca-8727-401f-8376-b5f08d7fc846",q.Icon_fossil_6="f47b51c9-5494-4806-ba81-627d7a9ea716",q.Icon_fossil_7="f60a28c8-267c-4641-b464-3a4c64676bc2",q.Icon_fossil_8="5271d685-fc72-4e97-9457-c52c0d0f94ea",q.Icon_fossil_9="6d706465-6ec7-44c6-9fec-7ca9b40c6cdf",q.Icon_gender_1="b75d3a12-2b7d-420d-af3a-02dedbdfb7f5",q.Icon_gender_2="46eea9f2-8e75-4014-b014-0f152c79a0ff",q.Icon_giftBox_1="e05d75c3-33d6-4809-847d-15f4e0ee3960",q.Icon_hairColor_1="aea5f953-343b-46cf-be85-2a063d86ffcb",q.Icon_hairColor_10="9374acdd-febc-41d7-80d4-e2bb004d57a0",q.Icon_hairColor_11="b9ec336c-514e-4436-aa57-6934dd036d82",q.Icon_hairColor_12="ffdd53b5-0806-40a0-8c86-0313a1d2c5cc",q.Icon_hairColor_13="a06178f9-afa5-4ba7-82f0-e166282ef25a",q.Icon_hairColor_14="7975a528-4147-45a6-9116-b7e022bd14bc",q.Icon_hairColor_15="61281058-ab22-48cf-96a3-f390985a0c60",q.Icon_hairColor_16="903ce3f3-2d4c-42f1-a1bb-36390e47e330",q.Icon_hairColor_17="b224d601-e579-438c-a56b-92417a3b7deb",q.Icon_hairColor_18="0ee47cb6-24f7-45c0-8595-652e928890d5",q.Icon_hairColor_19="386a93cc-a979-43f7-b56c-0ef1d443032e",q.Icon_hairColor_2="1bba717a-10f7-4c98-8a40-ec19538ef32f",q.Icon_hairColor_20="b454f03d-e03d-44a8-9ee3-de6d0395dfe0",q.Icon_hairColor_21="ff11049e-0416-4ccf-8e2a-c64bdaa68059",q.Icon_hairColor_22="99e7cb43-e3de-4e0e-9cf4-79a921b216d1",q.Icon_hairColor_23="07f03731-a851-4093-8fb3-df3d0f96f6d4",q.Icon_hairColor_24="744e1228-cf3a-4264-a9e8-9e5f19d7aaa1",q.Icon_hairColor_25="0fbc476e-a81a-4315-bee2-0ea6e1e97eed",q.Icon_hairColor_26="7a4a4b7a-062a-4a17-9dee-b1f30adc91c1",q.Icon_hairColor_27="656df49e-d770-4f3a-8b6d-b98ff6794864",q.Icon_hairColor_28="60fb96ad-b32b-43c5-a2eb-e1df004f6164",q.Icon_hairColor_29="90798e46-1000-4693-93e3-25045c8440c5",q.Icon_hairColor_3="e92e6605-cd81-40e8-a044-6b064347db95",q.Icon_hairColor_30="a6951141-db33-4c4c-9065-67ff7f17b91e",q.Icon_hairColor_31="784689e0-1f16-4b06-8a22-9f6708eae845",q.Icon_hairColor_32="f0a0daeb-0e5c-487c-ad54-ac46dc318c4e",q.Icon_hairColor_33="6953b59d-14d5-4bf6-a0b0-e25adabcde6e",q.Icon_hairColor_34="4ad225bb-74ae-41fc-a424-e884a6a8f541",q.Icon_hairColor_35="4d1e2229-b4d3-4b63-9cbe-26558656cd1c",q.Icon_hairColor_36="9b93c20a-1937-43ce-b454-87a1e3536852",q.Icon_hairColor_37="9b346fd3-51b1-4f7c-9d0b-2e4cfd3138ec",q.Icon_hairColor_38="ba537540-2ae4-47ee-9024-33f678e78cf4",q.Icon_hairColor_39="fe784858-e7df-445a-bbcf-5f7a42d3ebac",q.Icon_hairColor_4="3e70d556-f75f-450e-aa30-d4efd1a5d885",q.Icon_hairColor_40="6f4d8fe7-f795-441b-a3c2-0773014acc29",q.Icon_hairColor_41="5c1bcdcc-2248-4e05-a7b3-0e82dd1ff4b2",q.Icon_hairColor_42="d69f87c9-f055-487d-b890-9d1dbc092fdd",q.Icon_hairColor_43="e90c5cf3-caf8-4bc6-a556-ad063d6adfc7",q.Icon_hairColor_44="4f36cffc-f8dd-49a5-baa3-0071298002c3",q.Icon_hairColor_5="5e22c25a-8ef3-480f-991e-30d07b82b39a",q.Icon_hairColor_6="ab08ae25-b316-4b45-82bb-eb5cc786e530",q.Icon_hairColor_7="5c1ebe60-5b29-48b9-8b5a-7e79b85607d4",q.Icon_hairColor_8="ff073fce-778a-43fa-8fa1-e1d05140ba9f";q.Icon_hairColor_9="897fd708-60a9-4188-aa3d-538816b3d611",q.Icon_hair_1="2807c0bb-bffc-4673-bc26-366c3fa1137a",q.Icon_hair_10="48f5cc9c-39f4-4548-8f99-e4515d8cee0f",q.Icon_hair_11="83108906-9fd4-47c4-8ee7-316cce1dce08",q.Icon_hair_12="d1b7fc90-7063-4a03-ac50-720581ef0704",q.Icon_hair_13="57cf7f6f-9340-46aa-8bc2-5eef1cfbf033",q.Icon_hair_14="034e0504-7870-4b5d-9d18-02f24ed70cb7",q.Icon_hair_15="feb79385-3505-49e2-b044-51f28c625f4b",q.Icon_hair_16="41edfe80-d36c-42c2-9e33-e3c9954db520",q.Icon_hair_17="093dda22-0397-4bad-a404-0953826c3bab",q.Icon_hair_18="ba379495-5a77-4580-b467-628cc9a83af9",q.Icon_hair_19="95791ed8-5d0e-41fc-b345-94996b7f3be7",q.Icon_hair_2="4b28281f-18a6-4a2c-bb47-20b7d9bd24b1",q.Icon_hair_20="31761abe-9b6b-4de8-852b-571a371be744",q.Icon_hair_21="0d016813-5172-4970-9870-c12ef748837c",q.Icon_hair_22="da2b7830-6db7-49de-a745-33c854180a44",q.Icon_hair_23="dfa8aad0-c719-481f-9819-1300071fdd9f",q.Icon_hair_24="48c40ba5-ea21-460b-bca3-c0a694770640",q.Icon_hair_25="33cec843-face-4b86-ac84-d65d92836deb",q.Icon_hair_26="e478b901-c6f2-4728-949c-1f3c3c9a4790",q.Icon_hair_27="b62c622e-236b-4820-89c8-1a55ff2bb026",q.Icon_hair_28="9df96bd5-b56f-4d50-96c2-03a42c2cce08",q.Icon_hair_29="56ec1b4c-d791-44e4-bb0d-d00c80dd1da9",q.Icon_hair_3="3f1983c7-ed98-46fe-abfd-6e6f7fc3d72e",q.Icon_hair_30="f9b35a76-83d3-4de7-a16a-aa081b4946e6",q.Icon_hair_31="cb71c0e3-b26a-417e-a4a3-a35f7ec33d00",q.Icon_hair_32="226e4cd9-4e20-4610-b070-dcd32842eba4",q.Icon_hair_33="b3dd7d99-4b9a-48fb-a659-c4f41722ac58",q.Icon_hair_34="e54bc531-d1d4-45e9-b82b-aef55f6d9e98",q.Icon_hair_35="611816e8-aa37-4987-991c-c499907dc4ef",q.Icon_hair_36="c5ce29b9-11a1-4cd3-8b09-943e5d5e7c87",q.Icon_hair_37="d37bc752-7955-414d-a944-82e8b72c5556",q.Icon_hair_38="71407641-e329-44d8-9aba-3255a2d2de56",q.Icon_hair_39="60831207-dae8-49d0-a4c4-6214a409923e",q.Icon_hair_4="57bbccec-0b21-4565-89fd-aafac39bd677",q.Icon_hair_40="54027259-964e-4440-ada6-3ab4bfe1bb87",q.Icon_hair_41="7b38e0e4-b756-4c2d-af82-c6b6abe832af",q.Icon_hair_42="8e41baf6-f35a-40a9-9fbb-3eef5bf439c1",q.Icon_hair_43="63529f14-18da-45a3-8b8e-34851d4f79d0",q.Icon_hair_44="44e7ed38-b04c-4c08-b149-b748bcadfb6d",q.Icon_hair_45="984bcce6-4a50-4c22-95e3-f78937767f89",q.Icon_hair_46="4e8644cd-6697-4526-a06e-9f37206bf0d3",q.Icon_hair_47="42bc1ccd-9676-4137-9db2-8f8f4dbb8d7f",q.Icon_hair_48="114a8bfa-3942-4b22-9d40-35bedcf5535e",q.Icon_hair_49="2e3186e7-7da2-44ad-979b-4469e2020a7d",q.Icon_hair_5="4db33606-9eb6-4244-ba28-306747e8d883",q.Icon_hair_50="b6b065d0-a144-4ceb-9aac-ab0d655c51e8",q.Icon_hair_51="c12f0e6f-c0d5-421a-b660-86aaf66e8204",q.Icon_hair_52="fe5d5c8c-c84a-4594-954d-33b08fcb408e",q.Icon_hair_53="8b35978d-46a2-4513-ad6b-b1a4b6c2a632",q.Icon_hair_54="1c444035-c494-4016-a43e-e158f91158c3",q.Icon_hair_55="cb2af9aa-f7a6-4964-87be-5b05d650d40e",q.Icon_hair_56="c2bffc4b-0a66-40eb-9605-e4d02ac9c5bd",q.Icon_hair_57="a4d500ba-6b81-4ace-88e0-590b12fb4a68",q.Icon_hair_58="4e2b275b-649f-413e-94f8-93dc46f51fa9",q.Icon_hair_59="5d94a50a-e00b-4476-8d14-912b4431aec6",q.Icon_hair_6="4e9e8092-2fac-47de-a70e-826771e56104",q.Icon_hair_7="38f4787c-2299-4d8b-9ebb-83c0d7da5ca4",q.Icon_hair_8="686fe7aa-e815-4398-9ae4-feb864c45bb2",q.Icon_hair_9="37d48da5-7981-4bf2-bc89-6d9a6e0c97d9",q.Icon_hat_1="83c3c738-d4a6-4124-8c24-adb6ca9461db",q.Icon_hat_10="b738e945-0d8f-4e34-ae3f-c6104413660b",q.Icon_hat_100="5bf8e5b2-4fad-4857-a91e-dfd37f64ede9",q.Icon_hat_101="841464b4-880a-4fa5-a0bf-2fdb5e640c6c",q.Icon_hat_102="5874d231-8e1d-40d9-9439-1bc7564a5bd6",q.Icon_hat_103="1c8b90d5-33c8-4135-923f-2db9241412cf",q.Icon_hat_104="4a05753f-ab15-4f5f-bdc2-4587049d5cda",q.Icon_hat_105="6a823427-b822-4afd-8516-aa10263f0a23",q.Icon_hat_106="b5d446f5-ef83-4cbe-aeec-d6bcc5f9e878",q.Icon_hat_107="da7bc4f5-d913-4d04-8f9c-2db156f2d0ba",q.Icon_hat_108="5de06206-799e-42cf-98e3-d41e8e5d849a",q.Icon_hat_109="55a17c14-2ec8-4868-b2bb-8db582237076",q.Icon_hat_11="1e5f339e-81d9-4a1f-baf9-3daa5d9733f0",q.Icon_hat_110="7cf646d4-9b14-446d-b5d1-9f78a889f6fe",q.Icon_hat_111="c839d016-d8ac-4271-9909-d1513718ad60",q.Icon_hat_112="4480926d-4ad8-4375-b737-15504a85ce1f",q.Icon_hat_113="c798cf5f-3686-4d96-ad08-33c6e8de2e9a",q.Icon_hat_114="80c627e6-0aeb-449d-a945-1bb00833e8bb",q.Icon_hat_115="93d44f92-3dbc-4b36-90c1-73d60aec1fa6",q.Icon_hat_116="2bd842b7-5b3e-4bd2-aaf1-1f37f1f2ac22",q.Icon_hat_117="e6f80732-f34d-4c4f-82a4-ae6a5f19872f",q.Icon_hat_118="48f36fbe-56f6-4b2c-9d42-d22f1963bf63",q.Icon_hat_119="f5437035-7618-45c5-a24f-9ee3f0f40252",q.Icon_hat_12="937dd47d-20d8-447c-91f3-0b2da91f7f37",q.Icon_hat_120="9fefe71c-7006-4abf-b571-a6a52be1e790",q.Icon_hat_121="e8d58dd1-aa04-43dc-9042-4db39dc74304",q.Icon_hat_122="8b05c2bc-720f-4eee-96a4-e5bd3a2d6ecb",q.Icon_hat_123="8ea12d95-4c11-4da9-804c-b2fa7de7e9c1",q.Icon_hat_124="af541447-2225-44a7-ad4c-dce519240cb9",q.Icon_hat_125="21444c38-6db6-4879-a998-956392e28024",q.Icon_hat_126="ab616468-d06f-4407-90d1-166bc3d7d41e",q.Icon_hat_127="bf8255dd-f2e7-4f76-80d2-1cc63f2c3694",q.Icon_hat_128="b5e872a9-43a4-4c23-83e4-ca81d185521b",q.Icon_hat_129="7efc0d93-00db-41ef-aaff-fad7976a48f3",q.Icon_hat_13="8230c60d-cc87-46c6-be44-77b99dcf8d0f",q.Icon_hat_130="17df02aa-c574-425d-8226-b77246c60a0d",q.Icon_hat_131="6e51c563-8806-4030-849a-700145ebdb64",q.Icon_hat_132="6575fbe6-14c7-4969-b128-108f40dea7cf",q.Icon_hat_133="8d097384-4bfa-4ae4-bef1-76a15823b2d2",q.Icon_hat_134="d5e4652f-e6d2-4561-8d19-66baf20c932a",q.Icon_hat_135="c00fb227-eb72-4e6d-ad0d-a5f401e806fc",q.Icon_hat_136="f891b2d5-ac3d-4413-b981-a692d808bf27",q.Icon_hat_137="23788ae3-2b83-42f6-b70d-78c417e7a356",q.Icon_hat_138="ae8bf3c8-0441-417f-a398-a33d924027a9",q.Icon_hat_139="fd78743c-741c-4cf7-bd23-6c4369fc1d0d",q.Icon_hat_14="7127c1ec-99c6-45ee-88c9-0aaef6485a93",q.Icon_hat_140="bad1d8a2-c9b1-4514-a80b-98a007e4e75d",q.Icon_hat_141="164d2de5-3ce4-44b4-86d4-cba0e3d06b4a",q.Icon_hat_142="0d00f58c-3527-4a00-a1a1-52452220a05c",q.Icon_hat_143="b2f82118-ba27-438d-957d-1c6266edf7fa",q.Icon_hat_144="5f580659-c835-45ce-9148-c316e6b9c9d4",q.Icon_hat_145="ca0b8956-3168-45a0-96d9-d14fe068c755",q.Icon_hat_146="b1cf7976-f3ca-4376-8077-9b505b33c54b",q.Icon_hat_147="280f453f-81a3-41d1-b85f-d6ba6b7f4907",q.Icon_hat_148="7789a31c-6339-4fbe-9e5f-0e724a536272",q.Icon_hat_149="6a1478d2-effb-4e78-a799-ffa7dd6bf915",q.Icon_hat_15="6009981e-b2b9-495f-aa9a-fc270b63fd86",q.Icon_hat_150="692472c0-e70f-4e21-b4b5-5161e5ad3ee6",q.Icon_hat_152="0ec17d79-a477-428a-92a2-9bd40cf0de12",q.Icon_hat_153="5de443af-4c13-4c6f-bc98-87a9d4a9d8f9",q.Icon_hat_154="0ac38bdb-f1a7-4ebe-9165-957c96497633",q.Icon_hat_155="e5793aaf-398a-4f43-b3fe-d137578a5927",q.Icon_hat_156="3c3d5fdd-b045-4b20-b85e-4afc1972011a",q.Icon_hat_157="e05567f3-ae59-4a1a-a530-4bf13554ee20",q.Icon_hat_158="b24c6790-33ef-4aee-93f5-2dc7110c43e6",q.Icon_hat_159="587fc5f9-7b45-406f-ae3c-7cfa1528dc75",q.Icon_hat_16="91fdbe11-0033-428c-9231-0f0fe7e2c5de",q.Icon_hat_161="765d5483-3428-4f55-ba61-417cb902fc81",q.Icon_hat_162="50aa34ee-67fc-440c-b3ed-080823c2b69e",q.Icon_hat_163="374d1be7-a3af-4607-bc0d-71907111f53b",q.Icon_hat_164="996167a0-fceb-4ab9-90f6-74ebb80f10ef",q.Icon_hat_165="9ca0d273-763a-4356-9495-08b128a88427",q.Icon_hat_166="e84b8a66-3172-49a7-a8e7-02dd2f1e3fef",q.Icon_hat_17="728d0d86-107b-4e62-816d-11c5dd111827",q.Icon_hat_171="313734c5-563c-4b9b-b039-2064c4689efa",q.Icon_hat_172="6fbfa08b-26c2-4450-a577-93f1d086124c",q.Icon_hat_173="2795079a-7e2c-430d-802e-c3ff8f248f06",q.Icon_hat_174="8acf9e27-6bcc-43fb-94f1-64b47df75cf4",q.Icon_hat_175="f8d03fcc-61a1-479f-9d9a-c3406fabb319",q.Icon_hat_176="946ccabc-5e76-4ea9-8d84-ceafdc31dd14",q.Icon_hat_177="920a8f1a-f406-47db-921e-e356d3d0ce16",q.Icon_hat_178="7dc7e0ba-76dd-41cc-90b3-3fc8a983dba9",q.Icon_hat_18="fc43b4d6-ca6e-44e9-928b-7037380acf78",q.Icon_hat_180="42188e74-b6e8-40f4-909d-b82e13dcf8f4",q.Icon_hat_181="0a401ed1-d560-4a44-8cc4-6316a2bb5827",q.Icon_hat_184="884806b0-4a79-4d4a-8488-c4f7935d7e58",q.Icon_hat_185="4de1b292-9748-43d4-8d31-4ec399a93412",q.Icon_hat_186="2c857407-d904-431a-ab52-d2ef3213e33a",q.Icon_hat_187="1f0b035f-6497-402f-b894-a107e1a58a30",q.Icon_hat_188="48e2c3ba-73d3-413f-b6ed-935ffde3b6de",q.Icon_hat_189="eae8b398-1166-4d26-bf35-84c74606476f",q.Icon_hat_19="cc2b13c1-32da-46af-bc77-528ffd4c5593",q.Icon_hat_190="9831227d-7a0e-465b-a48c-3e08d5598377",q.Icon_hat_191="9309524e-d3d5-40e7-b053-246de6a296fd",q.Icon_hat_192="21692d37-26f1-4367-bd34-c354abbe680b",q.Icon_hat_193="79659fea-ff13-4576-8dfb-b0f00e41a0e7",q.Icon_hat_194="4c58b4ad-519d-4b2d-9277-a98e6b254589",q.Icon_hat_195="e6581c40-6184-47e2-b5c0-21ac43e427c9",q.Icon_hat_196="e6f1ad1d-63b3-4de6-adef-fa1afb301217",q.Icon_hat_197="92928596-ca59-4fcb-bab0-db15786ef56a",q.Icon_hat_198="31ca4dc7-0b1b-40ff-828e-02d90aab1126",q.Icon_hat_199="399b2c57-e02e-4b06-bf74-40024f4a5d90",q.Icon_hat_2="12cdea03-a475-448c-b9fe-45a8a4d365ff",q.Icon_hat_20="4eff8574-5bc9-44c4-a2fa-b31d13d38837",q.Icon_hat_200="3474469d-d525-4d36-ab70-6991dacfd6e3",q.Icon_hat_201="e7d47a1d-a3fa-4e43-989e-b5614b38b10a",q.Icon_hat_202="20404a4c-1ede-4648-846a-ee0388013917",q.Icon_hat_203="f170eced-8197-4dde-979a-e97ae355d52f",q.Icon_hat_204="b5896c1d-abfe-4be4-91d4-8158a9f592ec",q.Icon_hat_205="e2f21a82-d7c1-4b62-b2a1-6d256e3665c7",q.Icon_hat_206="8f3832de-042d-4199-9250-181628e5a9a7",q.Icon_hat_207="1906df17-6efe-41dd-906f-c829b44b5de7",q.Icon_hat_208="2a0ed41e-da55-41e3-b455-3258ba8a897b",q.Icon_hat_209="7c71662d-1261-4e41-9250-6b927ae8b605",q.Icon_hat_21="8b353b41-2e50-442f-8949-df7cd98f7de2",q.Icon_hat_210="d0735b75-fdad-4403-92a3-2c103235c3f1",q.Icon_hat_211="ce8a9dca-2e0d-4196-bfc9-6e9c541f2567",q.Icon_hat_212="bbeec574-0c47-4973-8898-a5a54e6ffdae",q.Icon_hat_213="f1e361fd-684b-47c2-a9ab-d9ed8dc82f2c",q.Icon_hat_214="f83ec842-c1eb-4486-b09c-1f9c24bc8d43",q.Icon_hat_215="725467bc-fa0b-4a68-8673-4a605a3cf0e0",q.Icon_hat_216="f4d98661-50ed-4937-882e-ce7b6011622a",q.Icon_hat_217="45f5aa78-a6b1-4d5f-b967-b7f7ef41205c",q.Icon_hat_218="3dcbe2eb-f0b5-4367-b269-818609c3bcf0",q.Icon_hat_219="00b2f5c6-fe08-4b90-b0ea-4d3d32edcb44",q.Icon_hat_22="4f2720d6-d83d-4cd6-a44f-1c2842ece537",q.Icon_hat_220="ed760e0b-3e4f-4f3b-af74-bb4413841dcc",q.Icon_hat_221="97d20079-6ac1-4911-b9ea-98d6024510b5",q.Icon_hat_222="f64e3022-6f02-49e3-a6c7-c5d489ac267b",q.Icon_hat_223="d8164238-b80c-4221-bbff-5e6c112f82e1",q.Icon_hat_224="1a06e85f-5fc0-4db5-bbb1-a3ffa542c6d9",q.Icon_hat_226="55ff03c9-cb33-448a-aa3b-9d39ae0296f8",q.Icon_hat_227="896852fb-f6ed-40ab-ad50-2525f2330bf1",q.Icon_hat_228="f4891cb9-d329-44ff-83fb-b3af641b6e76",q.Icon_hat_229="a2123ac4-d643-4261-b796-236410f04d1a",q.Icon_hat_23="777f79e1-f83b-4368-83e2-36d70ae2c9a9",q.Icon_hat_230="63d1d0fa-efa2-47b0-8c28-c4ad60b85073",q.Icon_hat_231="b0e85db9-4eab-44f6-a821-7a2da256e2c7",q.Icon_hat_232="9b9ab676-907f-4fe0-ac8b-f7540cd768f0",q.Icon_hat_233="2d0e744e-551a-4194-b44f-d298a24fc15b",q.Icon_hat_234="a804a4a7-a3c3-405a-926a-5c5502adbad2",q.Icon_hat_235="0df8611f-81c5-4b0d-ad61-24b948e1a35c",q.Icon_hat_236="239e0927-a61f-4fd7-b6e8-da003b34fadd",q.Icon_hat_237="9bf538b3-1cd9-48e6-9a2e-5b490e3c98d5",q.Icon_hat_238="18f92cd1-3667-4b67-8ea6-c5e8290cc861",q.Icon_hat_239="32a28fc8-79d2-49d5-af32-007d1a76ef98",q.Icon_hat_24="911af0bb-71de-429d-8595-7a524b7270ec",q.Icon_hat_240="dd60d86e-cf5d-448d-94e6-c3159a9fa560",q.Icon_hat_242="a0517f1c-16d6-4dad-b42c-34395af3897a",q.Icon_hat_243="f11c8f2e-986e-4598-a1e0-b14f2acdeba7",q.Icon_hat_244="163b1bf1-b5b3-4ddc-92d8-c045ccf8c570",q.Icon_hat_245="068be377-06bb-4611-8ed8-11e44af86f61",q.Icon_hat_246="816d6ef8-f7bc-4510-afda-615237a85819",q.Icon_hat_247="826570af-65f5-4007-87a6-b6c3844ae5dc",q.Icon_hat_25="eafd6a6b-04a4-4514-9112-5f76ca923c0b",q.Icon_hat_256="a7b20dac-0e40-419e-8568-ab4ee971279d",q.Icon_hat_257="8bac1f24-945d-4f4e-967d-c0ae076d6475",q.Icon_hat_258="05ec0401-3428-460e-b339-766b7c792c54",q.Icon_hat_259="44451a60-e342-4737-b808-c08f91abeb5d",q.Icon_hat_26="1c1e526e-077e-48f1-92b2-e4a4fcde77c5",q.Icon_hat_260="78e7a333-23dc-444d-bfa6-f93d4b09ef27",q.Icon_hat_261="9d170116-b9f9-44fb-88ac-ec01efeb2e59",q.Icon_hat_262="18ffcbbc-c65b-4162-b17d-4933ad89d8e8",q.Icon_hat_263="09426a56-3405-45a7-92f1-1a243c2939b6",q.Icon_hat_264="3927e5bd-4b65-4023-9ae6-883013b2b0a5",q.Icon_hat_265="5da080c9-8b23-4ace-af7c-ed7a099c1ee5",q.Icon_hat_266="df81704b-0007-4228-8e51-79abf5fc3145",q.Icon_hat_267="22af38c0-1acd-49ed-b16c-d3fb16f10ca1",q.Icon_hat_268="c1520ad5-5ab7-4511-9f57-4de63e99b0b7",q.Icon_hat_269="7008f7df-e6a9-4ea8-a7dc-3dc8960c899e",q.Icon_hat_27="24c5ec58-7647-469a-b6e1-dee3be16b8c5",q.Icon_hat_270="0c05ece1-5b61-4c1a-9287-70998f811c89",q.Icon_hat_271="fe2877ff-1549-404e-882c-3caa5267999b",q.Icon_hat_272="bd59620f-aafb-41e6-ae19-21f4119581fe",q.Icon_hat_273="1caa5b01-fcff-41f1-9e71-81f1a0f2407d",q.Icon_hat_274="d7acd8d8-ce1d-42e2-a69d-5b9cf6a5ae21",q.Icon_hat_275="aa65a3c2-d5d4-4606-a3e0-02add5ecf9e5",q.Icon_hat_277="e370be3a-58cd-4374-a891-12e39c958f24",q.Icon_hat_278="9b3299fa-4c90-4fe2-a6c9-66bcd751184a",q.Icon_hat_279="ff4ed695-e2c3-4b83-a31e-3f7786d96758",q.Icon_hat_28="5db0ffe7-e8bd-4486-bfaf-6cc883ea6f37",q.Icon_hat_280="ecbcb6a0-666e-4b6a-845b-84188d45a74e",q.Icon_hat_281="da178f68-c6d9-48ec-96bf-3a5e98be580f",q.Icon_hat_282="5e8e7057-eb8d-4a38-bfa2-d51de3581d1c",q.Icon_hat_283="c031da89-5676-457b-879b-ce734d08ff51",q.Icon_hat_284="a639a955-ab23-475f-808d-1664c85db909",q.Icon_hat_285="01c96c3b-6201-43a9-bba6-47092307faf4",q.Icon_hat_29="2b3e409e-d912-4c29-ad3f-2a4da158a1cd",q.Icon_hat_3="b0272671-f7f0-4133-83c8-208bcd39c8da",q.Icon_hat_30="4b80292c-3245-4521-b10b-f9e515d33d7e",q.Icon_hat_31="86b45eec-156d-4181-bc0b-82b9df8c2a41",q.Icon_hat_32="f7273d6c-a803-413f-8d91-cc920f4108b1",q.Icon_hat_33="1e9e9336-22ad-4afd-bee1-cf8107a991f8",q.Icon_hat_34="f3fcf77d-72bb-4980-8e05-23e59facedbc",q.Icon_hat_35="0e62e3cd-58eb-4201-a15f-df7d9de27177",q.Icon_hat_36="2ce1efa9-9be9-4f8d-a632-2b3c64285a02",q.Icon_hat_37="1c8caf25-083d-4304-95fe-845780e84c8c",q.Icon_hat_38="972528dc-649c-4287-a62e-547c558b9d1d",q.Icon_hat_39="156b8d2a-d497-425e-97d3-7400843e8fd5",q.Icon_hat_4="66958209-f349-450a-9466-7c23bfd5ac13",q.Icon_hat_40="139fcf81-8a77-43b8-885b-d4ee14446d1b",q.Icon_hat_41="143df9f3-417a-418b-9e0a-bebb68dc4217",q.Icon_hat_42="5e5df52d-3228-41aa-8f6f-04f1cfa6a838",q.Icon_hat_43="8abea8e9-fff5-417a-a372-41332724f273",q.Icon_hat_44="d66eac26-d008-42df-ba9b-c038e994a70c",q.Icon_hat_45="e3d72c8a-9b34-4fb1-85b0-59fe16e68b79",q.Icon_hat_46="8dcce013-9234-4dd9-be1f-d78c1f49b964",q.Icon_hat_47="be8701f0-1b7d-47fb-8914-0504c787bb8d",q.Icon_hat_48="715a72b7-c9c8-422e-a708-8360259a9014",q.Icon_hat_49="6823fc1e-74e2-4e3d-9f2c-b9a70a1c37c1",q.Icon_hat_5="d8f1150c-8217-4048-bc66-ce7a29547f2b",q.Icon_hat_50="0fe80fc9-28be-4b02-871d-b2e43bf3a8a2",q.Icon_hat_51="446744cb-c21e-4b21-8edc-69eda4224b11",q.Icon_hat_52="99d6488d-79d0-4919-b2ed-65536940d2e3",q.Icon_hat_53="9fd53aac-8e0d-4c4b-ad9b-a830336f8bf4",q.Icon_hat_54="02a708b2-b01b-4f05-b0f3-808d7b030d2b",q.Icon_hat_55="f9a15dac-2319-4285-bc14-9a6c2d0424b1",q.Icon_hat_56="0e5bfed4-caf9-4006-8da5-64ee9461acf9",q.Icon_hat_57="27b2642b-12d7-464b-819e-c9b9d730d125",q.Icon_hat_58="31a9c26b-fd51-4296-a612-0cd19aad07dc",q.Icon_hat_59="56e517df-edb3-4722-8b56-8f4b2069bbb7",q.Icon_hat_6="5430ec51-f011-41a9-bcfe-82e3c5c1580b",q.Icon_hat_60="4fdcfe0c-857b-4ada-90e0-970b006ef492",q.Icon_hat_61="045775ae-72d9-4e56-96f6-422efcebdd1c",q.Icon_hat_62="09d01b1f-bfc8-48b7-bbab-70c6536c6e81",q.Icon_hat_63="9228d628-d84a-4805-ab9a-c24db7756d66",q.Icon_hat_64="77906366-aeaf-474b-ac74-c7ff1806ac42",q.Icon_hat_65="b317b135-5916-430b-9524-48f999c880e7",q.Icon_hat_66="ee68ce1d-325e-4510-a863-1b5eaf945c65",q.Icon_hat_67="2fe9941a-17df-44bf-a28d-e87cf7c98470",q.Icon_hat_68="cf4b1b97-e13c-4c73-a796-979962b4e9f9",q.Icon_hat_69="bc89e9dd-b440-42d6-a30d-15dfafe26436",q.Icon_hat_7="cdbd516b-257a-4d5c-a498-1da04ae4c169",q.Icon_hat_70="eb5dc320-7181-4499-822a-d9036a22f8d1",q.Icon_hat_71="c4d823a6-6740-4322-8b00-01113ee5dae6",q.Icon_hat_72="19031c29-b029-4189-848b-34ed9a093ca2",q.Icon_hat_73="acf565a3-7eb5-4a3c-9c29-098043263e6f",q.Icon_hat_74="e8fe082c-d5a3-4bbf-98f8-e12bde1c238f",q.Icon_hat_75="66562b33-cf91-409b-9368-9dbe6a7387b1",q.Icon_hat_76="e2d9cc50-fc23-4627-a8cf-3ac5ed295c2e",q.Icon_hat_77="0a711dca-c2de-48f3-89d3-38a2d00f58a3",q.Icon_hat_78="6da03329-f032-498c-b319-cb7fc107af5d",q.Icon_hat_79="d1b096c7-6a6f-440e-8058-cfb5de5f94d7",q.Icon_hat_8="dbda516f-5531-48f9-80a3-e342c00d7375",q.Icon_hat_80="d9a0c9e3-ea8d-431d-b78e-f8c712827400",q.Icon_hat_81="658c5918-2457-4018-a0f1-93b890f73459",q.Icon_hat_82="c91b41de-315f-49e9-98a2-e3457a3c6e41",q.Icon_hat_83="12ad06fc-90f3-4729-a5c2-eefeefb0d074",q.Icon_hat_84="3e863d42-348d-48bb-b729-b638a58372ea",q.Icon_hat_85="80eeb6ac-29fb-48b4-9661-756526c71c50",q.Icon_hat_86="85018531-0088-44a3-b29f-71418d5fa404",q.Icon_hat_87="8b73260b-e106-407f-a02c-d107428d66c5",q.Icon_hat_88="1c08179c-8b16-4bcf-956f-2bb394c79b34",q.Icon_hat_89="90375232-0003-4418-9ba3-fbca2d953851",q.Icon_hat_9="ba07e775-e0cb-4286-a589-01b3bbcb9f85",q.Icon_hat_90="bbb0445c-c542-4e80-93f4-d16627424ba4",q.Icon_hat_92="e4433a56-21a4-46db-8f64-c47dee3c66a5",q.Icon_hat_93="70d89f07-d4b9-4456-9b92-8191a09663c8",q.Icon_hat_94="4f939f9e-c59a-4afd-8556-0174e5dd839c",q.Icon_hat_95="45f1a49d-7c4c-4043-918f-c965f123f348",q.Icon_hat_96="aac92fcd-9d4b-464f-a7fb-2172c0decc61",q.Icon_hat_97="db8bd1fa-31d5-45f3-a5fe-ecdc4bab0a51",q.Icon_hat_98="3ea7869e-3c5d-4e88-a690-6c2bbbc89555",q.Icon_hat_99="f84e95c7-1f07-41af-936c-4b52500dbb79",q.Icon_item_1="c28bc24c-108e-47b1-9278-629243bb35b5",q.Icon_item_10="3581e864-dfc6-40c2-b4ad-782affa08a27",q.Icon_item_100="464ee508-cd46-4a1f-8a4c-42f7c61bc20c",q.Icon_item_101="17533e2b-cbac-4db2-a53e-3112a9ae915b",q.Icon_item_102="d2f4db06-9626-4619-afff-b3c218c4fcb0",q.Icon_item_103="f1413a28-eb78-409b-b921-6eeca411e2b5",q.Icon_item_104="70b45db1-1db9-4659-b800-17578c23f444",q.Icon_item_105="4ad06f0b-e22a-4da9-96a0-0cf37b4ef4a4",q.Icon_item_106="c2885800-9790-4d03-ad48-22012497109b",q.Icon_item_107="04439b1c-a6dd-4be4-ae72-c405bd1fa55e",q.Icon_item_108="95896e68-8382-4df0-93cc-aa9743a9df48",q.Icon_item_109="0459a50a-2b37-4d60-b702-520b03ce42f6",q.Icon_item_11="88007b8e-9c2a-4105-8527-4e2e57540072",q.Icon_item_110="1500f15d-f97e-4406-aab5-48b5ec2d0158",q.Icon_item_111="e348b650-f6fc-4329-91a4-5a1a16359bd3",q.Icon_item_112="5c020f94-9a7e-44c1-8264-8e85d15742e1",q.Icon_item_113="b7bf7131-2724-4113-8961-42becf87ed84",q.Icon_item_114="4b1424d1-840b-469d-9a77-b2a25ef457f6",q.Icon_item_115="d6a601ce-f3c0-4fac-939b-578ab28fc3a9",q.Icon_item_116="f4e3d488-2161-4d71-967a-a834cc32ef15",q.Icon_item_12="e796109c-bbda-4cee-b13a-2eba6e9f14af",q.Icon_item_13="332ebbea-1702-4776-8cb7-24ad2dd18c94",q.Icon_item_130="08413081-560a-40e4-be9e-911ba6953598",q.Icon_item_131="8237c26a-c49d-4c55-b24a-b14ada972540",q.Icon_item_133="4dc0dd9a-1079-40df-8ff5-0496e140333c",q.Icon_item_134="0fe74c15-6eee-4d1f-b342-cfaf6e2de05c",q.Icon_item_137="fce0a30e-1f79-4309-b26a-d556414faab1",q.Icon_item_138="befda432-e5e6-4ad8-b0e6-29edb5289c50",q.Icon_item_139="b5bf7042-d52d-49b9-ac53-120e87f71c33",q.Icon_item_14="e5482b18-ac73-409c-8201-2d7ea07c6a4d",q.Icon_item_140="86b39da8-86d7-4998-aa26-dfd19f84e25c",q.Icon_item_141="0cde3128-800f-4382-8a69-ab5b4dc2ae16",q.Icon_item_142="0aacc431-326d-4972-a415-893551290a8f",q.Icon_item_143="a245611e-35d0-40c8-905c-435c43f5d44e",q.Icon_item_144="6120a2ce-ae25-4981-9e63-2c9b3d61db12",q.Icon_item_145="deaf34fa-36d2-4500-8a13-ebbe8c3f4827",q.Icon_item_146="a982a91c-f90a-4ad0-8743-ca5177dc23d9",q.Icon_item_147="6f9d2377-5691-4434-b7e0-21dce49cdaff",q.Icon_item_148="c4532fbf-bcd8-468e-8d60-1d61c4e8e5e5",q.Icon_item_149="6ddd3fb2-fcf7-4025-83e5-5d84965ef1f2",q.Icon_item_15="1d6fd091-2bba-4dd6-b041-cca42b3d064e",q.Icon_item_150="1bbee42f-f224-4c23-9e34-fe44012e300f",q.Icon_item_151="e4e1f7c1-0215-4830-a820-d774a1537d1a",q.Icon_item_152="dc028e49-dd04-4c7d-81ef-73b0218132c0",q.Icon_item_153="1c9dea12-2b0d-4972-acf9-0d2498912f92",q.Icon_item_154="8b394816-1976-4ee3-b340-05d54be4bd27",q.Icon_item_158="5cba536a-4f26-4b4e-8160-14035a6ad213",q.Icon_item_16="21b10fe8-1553-413e-8f61-49ecf09a9331",q.Icon_item_160="a27cb228-52a6-40ff-94a1-f1763162c07a",q.Icon_item_161="2cc48a2f-afb1-4292-873a-a61ec973c2e0",q.Icon_item_162="c23d9fc6-b0e2-48e0-a66e-64bef6e49b2c",q.Icon_item_163="0e16c841-107d-4908-b657-3a3fbbe87731",q.Icon_item_165="399aa688-facf-49e9-be1d-3c080ec23b21",q.Icon_item_166="719e274a-f21f-4bb4-9a05-738244ed963b",q.Icon_item_168="707db873-6d6e-400d-af6b-3459239d3bbf",q.Icon_item_169="1fabbd26-cba0-446a-ba0d-c0634f9dfd18",q.Icon_item_17="ae439b5a-abbd-4a2a-9fa0-b34a0b0c0f4d",q.Icon_item_171="aedc669f-417b-4ab2-9bf6-d853df6eed4b",q.Icon_item_174="c6faa7d9-0e63-4274-9e91-68f4da9e92d3",q.Icon_item_177="35406c80-f8b1-4fbf-b56b-a5aedde671f2",q.Icon_item_178="49ba774b-3e31-40e6-8297-632b37a22f44",q.Icon_item_179="0685b7f8-d3ac-4bf3-a847-58fd93423472",q.Icon_item_18="5d3ec490-6c56-4fa3-b89b-1fb6576789a3",q.Icon_item_182="113b6498-3407-4fa8-b344-b56499d889fc",q.Icon_item_183="0f61441b-f215-4d11-8785-780a4b5fd00c",q.Icon_item_184="aab22ac8-70a5-4835-9aa0-3ef577604c59",q.Icon_item_185="e861f2f2-9cea-4236-941b-bea1ab32cd27",q.Icon_item_186="c640c920-ec00-4116-86f0-1d6ccd4aa589",q.Icon_item_187="4426b7fd-f0ae-4da3-baed-6c8c69aafab5",q.Icon_item_188="17792ef6-9f1c-4d3d-8add-84c3caac5aee",q.Icon_item_19="708c2eb2-2359-44e3-b26c-912853462131",q.Icon_item_190="4fa078b2-c6bc-4df9-be4c-25b576127d24",q.Icon_item_195="b1812d67-6d69-49d1-b1f7-4eac202bb261",q.Icon_item_2="ab67f0c9-5e81-46ae-95ad-5bf4cad5f462",q.Icon_item_20="3aba0d8e-8e26-46a0-a22a-1452d851c8b3",q.Icon_item_21="c1f16145-eeeb-4474-9679-4c2ec309cba1",q.Icon_item_22="d7ccb7b2-e8e5-4f96-af92-f31c60bf4d95",q.Icon_item_226="89175a2e-84df-48e7-9981-93129ad8dd7c",q.Icon_item_227="e422d591-b0ae-4f18-8cec-f9ffedd3fd58",q.Icon_item_23="31f3d781-a8da-4547-9ea3-18debcb82e66",q.Icon_item_24="356cc58c-93a7-4092-b227-dac51f716774",q.Icon_item_25="9dd2e323-89be-4f01-a02f-aae5bd4b0175",q.Icon_item_252="1bb43780-816c-46f7-a001-27584082c3b3",q.Icon_item_26="9b72687c-a3e2-463e-b138-1cb8931a28f4",q.Icon_item_27="5fb5ea15-8def-49ff-a6a7-3c1284f604fa",q.Icon_item_28="d2517577-8403-4097-ba6c-a2b9c067b7f3",q.Icon_item_29="83de7363-febc-4fa3-b880-e79173908d35",q.Icon_item_3="a0673e27-1302-43a6-b3bb-acbd0805c48e",q.Icon_item_30="d0597519-82c6-4344-a540-7f835db55d3b",q.Icon_item_31="34e79978-69af-42d5-a9ce-147b602a85e3",q.Icon_item_32="5b558436-c9e4-49e4-ae77-1fa5a9fe59e9",q.Icon_item_33="ba902f85-597f-46b1-ae32-571078a25bad",q.Icon_item_34="5e33f139-02b2-4bcc-8a8a-bef849130ab4",q.Icon_item_35="368079b9-3fa8-4e23-b8df-46b47f8d2a3e",q.Icon_item_36="846d615d-f9a3-48a1-b76a-28e4b3ad4d41",q.Icon_item_37="e5b588cd-1985-4c12-ad11-d760a2c2c950",q.Icon_item_38="5543109d-8c39-4fb0-b453-79b69c84b078",q.Icon_item_39="2c87d736-b041-4243-9d13-b251de4a8b76",q.Icon_item_4="225f24bb-9327-4b18-819a-d6d5cb1afe57",q.Icon_item_40="ef098807-3fcf-4699-8ae0-e0982c33dda9",q.Icon_item_41="160e9d85-6d85-4655-8cd2-5558ef188c33",q.Icon_item_42="a0e58984-d569-478c-bf58-d458d46f0263",q.Icon_item_43="85b12f73-564f-42eb-b5be-03403483421d",q.Icon_item_44="ba018f6e-e190-425e-aa57-f390824c6d54",q.Icon_item_45="64eb9ace-d4d9-4747-b280-fbef48d74c31",q.Icon_item_46="8e30cc93-3388-45e2-9f84-8b153cba7dd5",q.Icon_item_47="acf3d3f8-2f14-4f34-bfdf-1b05f5ea19e7",q.Icon_item_48="9b2d4fdd-fae8-499a-8bff-1cd021bf6b5b",q.Icon_item_49="85f34492-45ba-46e3-bb74-8f887d995378",q.Icon_item_5="2f28ff99-44db-4bad-90f5-3aa73c698d38",q.Icon_item_50="d33bf401-31ad-499b-aed4-ee90ebadf63e",q.Icon_item_51="b38d1b17-93dc-4a37-95d7-76372437a8e0",q.Icon_item_52="3ef1ec34-3f35-4b7d-8b4e-ec157de0adca",q.Icon_item_53="da0a679f-bccf-495d-8269-4c4c7b4595f1",q.Icon_item_54="9d63a785-eb12-4265-a95e-379d1d63ac89",q.Icon_item_55="2a3ed742-553b-4282-9e88-5611dd9043a0",q.Icon_item_56="153ff0fe-bf2e-4727-aacb-dfe9ef540d56",q.Icon_item_57="9f22852b-9b86-431b-8fd6-2144171c6d2c",q.Icon_item_58="7ec25aa5-7019-4472-adfb-8d58879c4ff4",q.Icon_item_59="35a0e7de-f7a2-40d3-a923-409c35ccd09b",q.Icon_item_6="81147664-6554-4bc3-a976-b70d6b5b26c6",q.Icon_item_60="55de3768-feb1-4326-a04c-e92ebb2f20db",q.Icon_item_61="b27315de-6121-4902-8e87-6ff4ccb560a1",q.Icon_item_62="0983b4f2-003a-42f6-aa6e-b2ea122601fc",q.Icon_item_63="58c95df5-ea60-4890-b058-03f166f374a2",q.Icon_item_64="61e18135-501c-4017-9c28-0221d93b39f0",q.Icon_item_65="ad5ae2f5-2507-41f9-a006-453820736d68",q.Icon_item_66="f2b27f2e-1a29-4ea0-b264-aa19eb71c7f1",q.Icon_item_67="ed5ab73d-40e2-433c-a16e-f838ee44bc56",q.Icon_item_68="4fc89434-f906-4d08-8120-12bcb7255412",q.Icon_item_69="9931d8f9-229c-4304-ba70-af341808fc14",q.Icon_item_7="126f2504-85dc-42c2-8704-59ff4014fd8e",q.Icon_item_70="395c60e8-087a-49d1-9c72-64f29bc3a132",q.Icon_item_71="37c130c8-5b46-497c-8862-136b638a1602",q.Icon_item_72="c468205a-8e22-4a96-9037-65762556bcce",q.Icon_item_73="b18e4901-c05e-4017-bf3d-584aeba7ed8b",q.Icon_item_74="cf615e92-36a5-426e-8ee9-2d1af77fbd72",q.Icon_item_75="fbd15ee0-a644-4851-b291-224588c61a7a",q.Icon_item_76="2528288a-931b-4462-bf0e-5bfdce0a86c2",q.Icon_item_77="19142273-1e8d-42bf-990b-7dfed0193d36",q.Icon_item_78="05fca2b0-fa33-4e24-9ee5-97e34dc97f46",q.Icon_item_79="e9b2e092-b406-46a9-84f8-f862ba9885b4",q.Icon_item_8="b9af1e9b-4e28-4fb8-8b1b-cf2fb12e3a01",q.Icon_item_80="3ae2e916-872d-418a-acca-c471461e3c40",q.Icon_item_81="82080e3b-2d3a-4afb-8041-20023b0796b7",q.Icon_item_82="90b17988-d18f-4311-9088-b5ceb8b54fc7",q.Icon_item_83="8cd1ea08-d7cf-48e6-bfd8-b121c7ad492b",q.Icon_item_84="c90d52ba-da0b-4c43-9741-798d077d3c0c",q.Icon_item_85="4789af0b-2bea-4ccd-8395-47ee19a9470d",q.Icon_item_86="d5be95fe-a705-4f8c-9e60-ee551ba9053a",q.Icon_item_87="dbdd175c-a7d9-47ea-a21a-a1c764e9a012",q.Icon_item_88="172d4cf3-d2c6-4616-bd98-833c35575ea6",q.Icon_item_89="3b9c0484-479f-47b3-9cac-d95e62d98e5a",q.Icon_item_9="17479d1a-6021-4ca7-b09c-9040febbfc29",q.Icon_item_90="1b3d6612-f49f-44be-bee6-71e8871f4fd3",q.Icon_item_91="0a8d1006-5a53-4532-a24b-0a9a1a4293a5",q.Icon_item_92="507c32e4-171d-41f8-a883-42f4a83af551",q.Icon_item_93="0a3121be-d920-438f-9566-5c35c9787849",q.Icon_item_94="4b160cf5-234d-4b1c-8877-f56dd810fa3b",q.Icon_item_95="f3c85530-2323-4ce0-93cd-372e6067cd54",q.Icon_item_96="aea041f0-9ac7-44f8-9d9a-abe37de7f062",q.Icon_item_97="f267db02-d23a-46d6-a9dc-f817209301de",q.Icon_item_98="39b6f144-7eae-4e99-a54f-db3e6caf2a05",q.Icon_item_99="06da5113-13b4-41a3-a9cc-b849fc746f01",q.Icon_item_crystal_blue="5856c054-1828-4319-a9d3-7a58e4d47e23",q.Icon_item_crystal_green="20e18e00-9b8f-4bde-96a6-30151026efb3",q.Icon_key_1="fc983d21-d667-49df-958d-8265c9c07820",q.Icon_key_10="0b425050-d879-473b-a1ca-86535e134227",q.Icon_key_11="845fbcb9-2df6-40d7-a43a-a738efe4cf8b",q.Icon_key_12="51ddfb3f-d561-4a98-b296-9c88b21d6624",q.Icon_key_13="6144f87b-994e-4477-a1c3-0c0a62216233",q.Icon_key_14="ef6ff44a-d309-458e-a232-5a706a6f1464",q.Icon_key_15="38f8016a-3103-4ba5-b50e-8e9a00a7aaee",q.Icon_key_16="282ecd81-12f5-40f2-bc33-394aa7bf3790",q.Icon_key_17="ccc64bfd-b7ba-43c7-9ea7-eeebe7b96c31",q.Icon_key_1_2="dac330cc-48f2-4197-a8e2-72c52e840719",q.Icon_key_1_3="5c7d10e0-1532-41f9-9407-1e0f88035644",q.Icon_key_2="d76ff4c0-f26c-4a37-8698-10db647afeb5",q.Icon_key_22="952c3956-ab1d-4a99-b8e4-d3b95a0787db",q.Icon_key_23="cb6de1f8-39b0-4f64-993b-cfcc52035490",q.Icon_key_24="c6990768-f6dd-4b44-ab11-be38e644fcf1",q.Icon_key_25="9c34de61-db9c-488d-b33b-9b5e997318f9",q.Icon_key_26="7396221d-93f7-4c33-8e1f-cd61fc6619ef",q.Icon_key_27="990377e8-367e-4c12-9385-96104e9a326b",q.Icon_key_28="00352b7d-1fee-4d09-a78c-3ff46377a4ce",q.Icon_key_3="e8fb53de-7f1d-4b47-b660-0a7d4779f879",q.Icon_key_4="62de2c82-7c2c-4de1-b06e-7a19481a9523",q.Icon_key_5="d94c6ccb-1f87-41e8-a12c-c6ac1596e1ab",q.Icon_key_6="528f162b-d9d0-4822-affa-0ff145db1391",q.Icon_key_7="ed5550e8-bff6-4ea8-9a9c-213934dc25c9",q.Icon_key_8="d8fe6ba8-87c6-4e78-8b75-cfc7b53379f0",q.Icon_key_9="a817653f-15f3-46b7-8131-60734727bcc7",q.Icon_level_star_med="899ba6bf-8c79-4ffa-9004-947be85c72ac",q.Icon_lock_mini_extra="d5ffddd6-74a0-48c9-9cd9-44725e94e2ff",q.Icon_member_plus_gold="b19a24c3-02a9-458c-a7a2-3adf8bacec7d",q.Icon_memberjar_stamp_red="156ff938-4e19-48c2-b1f7-943945c8a2ca",q.Icon_memerjar_stamp_red="772c9283-d5ce-46b0-9bfd-a88108b4ca44",q.Icon_mini_member="387a3f2e-81fb-42e3-b6cd-052bd7ea68a6",q.Icon_mini_member_b="f93e6aac-d71a-4d34-bc29-0fd8a548f2e1",q.Icon_mount_1="633cfe11-aa5d-4480-93d2-144deb98ad44",q.Icon_mount_10="db240479-96ba-4a5f-a199-342ed8c40066",q.Icon_mount_11="d4341d56-6f40-449f-9be1-b8783899bcb5",q.Icon_mount_12="4c779907-7789-451d-8fef-b663ad3eb716",q.Icon_mount_13="1d59ef02-b12b-4495-b8ff-2c592dff45a5",q.Icon_mount_14="5532f9fa-5208-428f-a105-257bc92a8b73",q.Icon_mount_15="cfaa348a-4051-4517-83b8-2ff3d45f1b53",q.Icon_mount_16="8d1b0ad7-9e67-4142-bd8a-75b3adf83f89",q.Icon_mount_17="14e9594f-5556-485f-8a15-bd39a18bf99e",q.Icon_mount_18="bd96d5de-2d3d-41f8-810a-3b7bb4d0aa3f",q.Icon_mount_19="88044a65-7915-47ac-a186-bfb68f15c166",q.Icon_mount_20="9cd067ac-f807-4352-a55b-7e107a647994",q.Icon_mount_21="d92c70fc-ae40-432b-88c4-f94cff3f1015",q.Icon_mount_22="9a67f631-3db4-400c-8f16-65cc5b44c545",q.Icon_mount_23="093b0f99-62ce-472d-90f6-5838138159b7",q.Icon_mount_24="6a45cf82-184f-435e-8e68-07b4711d9a7d",q.Icon_mount_25="d65bd238-1839-4d71-8af2-e866d11ae68f",q.Icon_mount_26="fd92671e-e04d-4da0-93d1-2af13f65a2c2",q.Icon_mount_27="79cd0342-d69a-47d4-8e3c-4cfbaf52a444",q.Icon_mount_28="0520053c-96d2-45fe-baf6-95e1da280965",q.Icon_mount_29="4817d1cf-3e4d-460c-9ea7-a5b90f98b9e6",q.Icon_mount_3="0753cba0-6e78-4612-9097-10b6d9c06629",q.Icon_mount_30="b3e17d18-8782-40ab-ab9c-f028cb129b27",q.Icon_mount_31="f8034b2f-20c2-4598-a885-b7ed45e199d1",q.Icon_mount_32="22544978-73c2-47b4-be88-5b961ca7d6c7",q.Icon_mount_33="ed5c74eb-db42-48a7-8346-5e318a170c41",q.Icon_mount_34="1c04756f-106e-4bd1-941a-1aca57145bc5",q.Icon_mount_35="c8b0cdfc-6831-4b64-aae4-9d6cfe5b282a",q.Icon_mount_36="1779a9c8-17b5-44f4-a57d-2bdc071284f6",q.Icon_mount_37="d2b823c7-c89c-4d78-8fca-e7356d821d8b",q.Icon_mount_38="e8b0100e-4d52-4260-b1a8-c38711b2ad39",q.Icon_mount_39="22c7c724-fa68-4f85-b611-9ca70582190c",q.Icon_mount_40="4b5e64fa-4d7c-47dc-8785-2637a3a128a3",q.Icon_mount_41="bc5e4d24-4694-4f45-bbf3-8c38408a2cf9",q.Icon_mount_42="286e449b-9499-4e2e-8283-e7d4b964120c",q.Icon_mount_43="8599ec95-d6f1-4300-bdd5-1d5876197732",q.Icon_mount_44="de0db092-6c47-4506-98c1-0d51c45463f2",q.Icon_mount_45="afba3547-b390-4d7e-969f-a9cac7ba14c9",q.Icon_mount_46="149ef81c-0f34-405f-bf8c-6350070fbe2e",q.Icon_mount_47="8155f91b-4ccd-41f6-aef3-0b0c698438bb",q.Icon_mount_48="8d0160e5-d774-4056-a029-97d7a2703329",q.Icon_mount_49="f0b21dd3-06f4-4c12-abc6-f5a71f0a28ef",q.Icon_mount_5="f6e2b0da-c466-4984-9a24-c11d46198639",q.Icon_mount_6="9c837b10-d0d9-44a3-b429-2e0f1a4ffe48",q.Icon_mount_8="f2d220bf-d036-44e0-af6d-9fdf340b4731",q.Icon_mount_9="f7dceac7-1b9e-46e8-b359-6d374d9a52a3",q.Icon_orb="74169e1e-fbd4-471b-bce9-378a06315b80",q.Icon_orb_1="7c6a477c-5de3-44b0-8abd-6fa0e505f9aa",q.Icon_orb_10="2771fc5e-953c-4856-9f11-f89112595e64",q.Icon_orb_11="aa0d0952-e1dd-4eee-8fc2-6d4583ee80ab",q.Icon_orb_12="42b722c7-fe7e-42a6-aa19-c32f1b75cc36",q.Icon_orb_13="f40e00e0-a079-4486-8906-27ce8246b4cb",q.Icon_orb_14="418de606-efb4-45ad-a658-c99ca88c3dbc",q.Icon_orb_15="18a53650-4d25-458b-aa59-e6c769897391",q.Icon_orb_16="661bc769-9b9e-4441-8f0b-e5fce6205594",q.Icon_orb_17="e7893e74-9042-4d0e-9246-bc2d34a97e97",q.Icon_orb_18="15ac473c-2b15-4f22-a64f-8eb62f3e8151",q.Icon_orb_19="1c113cbf-5e75-4622-a889-099892fd6b59",q.Icon_orb_2="d6fcaf4c-7b54-49a8-a560-28f3f4e7adfb",q.Icon_orb_20="b1c07f8e-43cd-49ba-b6e8-1dc3fbfac1ed",q.Icon_orb_21="1dde2b9c-a8b0-4576-857d-c5d4096d684b",q.Icon_orb_22="868cba1e-b67f-450a-9bc6-fb1eefd2a67e",q.Icon_orb_23="069eac6d-b4a9-446e-9d59-96032c4a01d7",q.Icon_orb_24="086362d9-e365-4eab-b4b8-a734eecb57d3",q.Icon_orb_25="c4497226-579c-4e0a-b103-15e8b7854c86",q.Icon_orb_26="9c4601ef-9872-42a6-9eac-c04edfc9e3eb",q.Icon_orb_27="152749de-4faa-4e4e-9097-678c7229f47f",q.Icon_orb_28="b0d4d333-e284-4782-ad44-1c3ed816d94f",q.Icon_orb_29="0503505e-6dc3-481a-b77a-80a3d2ba728f",q.Icon_orb_3="bf6cc21c-344c-44d9-9fdb-10e9526ebcdc",q.Icon_orb_30="aed5261b-1695-45c8-9f13-e5513bb9f64d",q.Icon_orb_31="9045fd6d-4282-4feb-87a4-64ef2be5fb5a",q.Icon_orb_32="7b8e338f-c490-41eb-b5ad-48e2889e094b",q.Icon_orb_33="fe4c421a-a834-4019-8350-902f737e9a1f",q.Icon_orb_34="0adeead5-504a-49d5-af34-df3d5706f45a",q.Icon_orb_35="d5774fd1-dc6f-4b8b-9971-0b8fdd838b4c",q.Icon_orb_36="fdca4e79-3475-4dfa-98a8-0171a9738bbd",q.Icon_orb_37="f9cbadfd-fd77-40f3-a0ac-fc3cb1303d2a",q.Icon_orb_4="7b500c3c-07c7-44d0-94dd-1d30e5337424",q.Icon_orb_5="96344b1a-21d3-470d-afa1-e7f7cf5270bf",q.Icon_orb_6="426678bc-f87e-43d6-aa47-8e8c5e46e343",q.Icon_orb_7="9e4b8ee0-6e1f-4ba3-ba92-b13fb711404f",q.Icon_orb_8="16f5bb0c-9fe3-4376-b529-c5ca0143c2a7",q.Icon_orb_9="d7a726de-9efc-41c9-b970-bde00d604c85",q.Icon_orb_bg="ab1a9324-c7c8-45ae-b90f-fd28ee66c54a",q.Icon_orb_no_tile="8bf05375-25bc-4146-9d0c-40b6510f6e5d",q.Icon_outfit_1="aa5408e4-3990-489c-8461-7c885d1ab04d",q.Icon_outfit_10="a8916acc-46ef-4128-ad82-fc02d27833b5",q.Icon_outfit_101="b759e17b-2221-400f-8ad1-68a49a20fb26",q.Icon_outfit_102="efaf3efa-157c-475c-bc31-bed2f3400dae",q.Icon_outfit_103="76ac2f4a-0209-44a8-8320-557b628c7ba4",q.Icon_outfit_104="54bfd668-282f-4f4f-88f3-3766719e3009",q.Icon_outfit_105="f5ddcca1-f853-4174-a2c5-050333a18a57",q.Icon_outfit_106="cc274cd1-87b7-46db-b787-1d24a4fb40cc",q.Icon_outfit_107="a53834af-ca26-425f-b4fd-9fa1d57a749c",q.Icon_outfit_108="35746488-a0e0-4539-8372-78f6802812d3",q.Icon_outfit_109="1152a304-c4f7-4298-838c-27d517242059",q.Icon_outfit_11="9aa82624-c056-453b-a905-89c191ac72d5",q.Icon_outfit_110="22464ac7-bbca-4cc8-889a-85772fc3ad4e",q.Icon_outfit_111="58f1590c-f52b-4154-b735-f6bd4915e767",q.Icon_outfit_112="cbfb82b4-4956-423f-a5f7-b560e66db773",q.Icon_outfit_113="5835bba2-3d5e-4c3f-9977-ce193f53387f",q.Icon_outfit_114="c7ee99b2-64d1-41c6-8c84-c3b9fcd9a09b",q.Icon_outfit_115="7fa982e5-6ea5-41b3-8fa5-f52bf6c7a724",q.Icon_outfit_116="ed557460-37dd-4db4-97f5-f3ce5c013880",q.Icon_outfit_117="920dc5a0-0c67-4629-9629-c14cf7a8aed1",q.Icon_outfit_12="86256a61-131b-458e-9929-20d98d75c78a",q.Icon_outfit_122="905ab1cc-7d75-4c26-bd46-4d528bc8e7da",q.Icon_outfit_123="eb345c75-5abc-480c-8c5e-caf8a7c406fa",q.Icon_outfit_124="093fef08-760b-42a4-af97-64778facfd73",q.Icon_outfit_125="dd209a4e-edb6-4906-bc9d-90725b1d30ed",q.Icon_outfit_126="29b77b02-7794-4c21-b127-8cca2f6bf50f",q.Icon_outfit_128="16835c33-0004-4e2c-ad84-a0b944d05c99",q.Icon_outfit_129="c4bedd01-6ec8-42bf-889f-07ef57aa8575",q.Icon_outfit_13="76640a12-0567-421b-ac71-7be05fe862a6",q.Icon_outfit_130="f67dce87-a994-4e33-ae36-b041d6cc2c4a",q.Icon_outfit_131="d7a9ae55-f9a7-4348-8c16-81251058c13b",q.Icon_outfit_132="d2735256-7f08-4e64-864e-b669bd6ab5d6",q.Icon_outfit_136="795f9757-9632-45a6-b7f6-be14b2494b35",q.Icon_outfit_137="89fd11ac-094e-412d-9f46-25d36cc1d36b",q.Icon_outfit_138="d48eedec-c0ff-4416-9b44-e30d4efdd6d6",q.Icon_outfit_139="295cde4b-f58a-4a56-8257-25d0b8bd66d3",q.Icon_outfit_14="5a37b019-1a80-47c6-9756-abb0fec87d2f",q.Icon_outfit_140="e6608195-4524-467a-accc-913d318ac287",q.Icon_outfit_141="5101ec39-b07e-4a48-bd4a-39b1db8b6a9a",q.Icon_outfit_142="cf7ca92f-b304-4db3-9ef0-c83875218092",q.Icon_outfit_143="c886e733-48bd-4cff-8f1e-47122d828fa3",q.Icon_outfit_144="c7bded28-4ccf-40ba-bf93-264baf8bb4bf",q.Icon_outfit_145="0602140b-32a6-4281-a0c1-32a1ded5e4bd",q.Icon_outfit_146="55004863-a237-4c45-9a6e-27edf0e0598d",q.Icon_outfit_147="af803fd8-75e3-43da-bf6e-ea1a05ecc7ae",q.Icon_outfit_148="baaf85c3-17c4-4327-9b5e-43938dd81251",q.Icon_outfit_149="3d61cad8-0b10-412a-a333-8f939c7b8923",q.Icon_outfit_15="b59f9b10-9585-45db-a58e-776906c963f0",q.Icon_outfit_150="21f86240-aacf-4b1e-a1a2-26c2e44c3831",q.Icon_outfit_151="6a8db283-e809-4e27-b4fc-d7ca80c184af",q.Icon_outfit_152="08950e3d-e6e9-4274-ab39-0bce7b1e6726",q.Icon_outfit_153="11ef4cd9-f531-4c58-b6cd-cbb74e75c426",q.Icon_outfit_154="28505ce5-ccd0-44f2-83e1-75d4398205a2",q.Icon_outfit_155="64b488ac-7d93-4bac-85d2-b8171db65896",q.Icon_outfit_156="4e3072ef-b976-4730-a37f-3ca230cfa669",q.Icon_outfit_157="620de052-0dcf-4b40-aded-bc2bf7ac0906",q.Icon_outfit_158="a45f24eb-bb71-4373-9e7e-010d00c98049",q.Icon_outfit_159="34cd719d-5e38-4e9f-9cd1-bd01030b4a57",q.Icon_outfit_16="87ec4602-7587-4745-bd56-7aaa5eab6f9b",q.Icon_outfit_160="0103a98a-7f7a-4c16-8764-6f9b3670092c",q.Icon_outfit_161="9fa40654-9389-4545-85b1-52667f6b58bb",q.Icon_outfit_162="d3ad9b3e-2aa5-4e9c-a97a-6600272d8b2b",q.Icon_outfit_163="06baad8e-47f5-4551-ade5-36aa54255bef",q.Icon_outfit_164="ca09c2fa-ee28-4f69-a3db-c547337a3e38",q.Icon_outfit_165="5e7dd042-a6e8-4d69-a129-7b69b5ad661b",q.Icon_outfit_166="fd8a6dda-69e4-48be-b140-ef87b19bb4db",q.Icon_outfit_167="951491b8-5548-4002-97f4-894f53710dab",q.Icon_outfit_168="a538ca6c-87c4-416d-90a7-f2f11318e36a",q.Icon_outfit_169="b60a9265-ccfd-41bf-9fd2-481dfbb34cb2",q.Icon_outfit_17="62dea1c7-89f1-41e7-bfc7-953e00f44d80",q.Icon_outfit_170="76efc3df-0991-4f69-82f3-69615ace972a",q.Icon_outfit_171="761f197c-68d3-43ff-9a9a-9675385f1766",q.Icon_outfit_172="a61f3ab3-d141-44ce-9e30-040c8db206eb",q.Icon_outfit_173="60133606-0d70-422a-8d22-4317ccb58398",q.Icon_outfit_174="01be9473-06d9-469c-baf3-6e4df4a1e286",q.Icon_outfit_175="d0c5659a-cdf6-4b81-bd3a-5165054be178",q.Icon_outfit_176="51bbc560-e49b-4bce-aec3-cc4e53561264",q.Icon_outfit_177="b81be64d-2f5a-4f1b-9fbc-acc0dc4f7952",q.Icon_outfit_178="e9b32f52-97d4-4963-b4a0-786c1ab426c1",q.Icon_outfit_179="dc8619bb-7e3f-4ed8-aea4-8db28121f53c",q.Icon_outfit_18="f09f5929-865c-45d0-bcaf-01ce4a35bebb",q.Icon_outfit_180="e3cdee93-c363-4dc5-9f06-64e28595e4cd",q.Icon_outfit_182="993f756d-b0da-428a-a125-298f956e32e4",q.Icon_outfit_183="8f8b99e5-5d54-428c-8d8b-47efb42349f1",q.Icon_outfit_184="c2a3ea43-54c3-43e5-a56f-98ae4c3c39fb",q.Icon_outfit_185="43da0402-8e47-4b0f-8bc4-9fd0ee2523e0",q.Icon_outfit_186="1b142c67-e2ce-4701-91e6-2b95f1072dd1",q.Icon_outfit_187="45a20650-1e8f-4eca-b48a-4ce69c05e173",q.Icon_outfit_19="e12498a1-689b-4e83-9b3f-3ad66e76818f",q.Icon_outfit_196="4b87b751-e2ff-4b8d-988c-6f3b9f19773e",q.Icon_outfit_197="d5977d02-cde8-487c-aa4c-711830fa88b5",q.Icon_outfit_198="b43cd532-e787-46ab-85b2-1948b625209d",q.Icon_outfit_2="3eef128c-ed80-413f-b3b8-3ffc1c5bd0ff",q.Icon_outfit_20="794d1937-a7ef-4ebf-8d4d-9e2b90685938",q.Icon_outfit_21="1171af5c-9d62-4ef2-820b-213d52a2eb74",q.Icon_outfit_22="5a5c8aea-0923-4eb9-8810-fe6dbf9e22bc",q.Icon_outfit_23="e327e577-3bcf-4c33-97c7-c8fef05e9da2",q.Icon_outfit_24="58e429b1-f783-421f-8935-c80e6ee3ab08",q.Icon_outfit_25="e6911d1e-70a2-41a9-8070-9724697641eb",q.Icon_outfit_252="72f3ae4b-4333-4244-ab40-333e3fecc405",q.Icon_outfit_253="ca07c5b0-55a6-4b0d-a871-2f24dcac0627",q.Icon_outfit_254="dc153bd5-2466-40c5-861a-ca6eb25f1b14",q.Icon_outfit_255="0626fd18-c549-4eb5-990a-1ceeab207bed",q.Icon_outfit_256="71621e07-74dd-476d-a4d8-164f706682e6",q.Icon_outfit_257="dda100dd-286e-44e4-8d3a-18a87e25448c",q.Icon_outfit_258="21d3fa7a-3b9e-41a4-bab4-8fa9ff0a528b",q.Icon_outfit_259="cfdf520d-8578-480b-9022-7fe0feb34012",q.Icon_outfit_26="c832aa1e-1b47-418a-8da8-b259f2a8f7aa",q.Icon_outfit_260="a91e2ab3-d417-465b-9cc5-86dca032876a",q.Icon_outfit_261="a6f4f4fe-abd4-45ac-bbc6-239557868e85",q.Icon_outfit_262="68b59abf-9821-496e-8b42-64be6d68c262",q.Icon_outfit_263="286e55c7-c17f-4f0f-bb42-340d7221addb",q.Icon_outfit_264="e33c46e9-4786-4bc0-93ed-18cecdede270",q.Icon_outfit_265="83ebe5e2-8225-489f-b01d-fa56aaeabe25",q.Icon_outfit_266="c5213bd2-b3fe-4e08-82b5-7046a0ace24f",q.Icon_outfit_267="ee3f92af-31ea-4c8c-a148-6fa2f0b592be",q.Icon_outfit_268="6b797545-ffb7-46bb-98bb-6d6ff645b385",q.Icon_outfit_269="fd75deba-0994-4e56-a481-06ea7d78bf00",q.Icon_outfit_27="e252deb5-77f0-4da0-b486-8db84721af7a",q.Icon_outfit_270="45aaff6c-6dfd-4bde-b8da-f2408394a6cf",q.Icon_outfit_271="91c8a4e0-2ff2-432f-ac42-78960808515f",q.Icon_outfit_272="4036d126-5382-4772-b77c-14e3344296f7",q.Icon_outfit_273="feea2a6e-7c12-44af-811f-10624a113103",q.Icon_outfit_274="f77bf6cd-46bc-4d7c-bc03-b97ab4f8057e",q.Icon_outfit_275="acfc8193-3459-48d3-b535-483427b0af40",q.Icon_outfit_276="3aeaab19-0f64-48a4-9a58-72be41c29668",q.Icon_outfit_277="d90fbdbc-d713-49f3-b0dd-3ffb36e8ad9e",q.Icon_outfit_278="550ed400-7c06-4d99-8d16-238f3a3a815f",q.Icon_outfit_279="e17304e1-54f2-42f3-8ae9-ed02f9bec30a",q.Icon_outfit_28="8b15dec3-1122-4c42-bd95-0e9e4f5e2fff",q.Icon_outfit_280="6835d9fb-1f22-4d7b-a6be-c4c48091880a",q.Icon_outfit_281="76e9130c-3e08-41b2-a090-b1b524353fbc",q.Icon_outfit_282="1651f77d-95ff-4206-98c7-fcad2b9dfa8b",q.Icon_outfit_283="09061397-4624-446d-87e2-975e51079586",q.Icon_outfit_284="24e5058b-5c7e-4310-b42a-635ba8377658",q.Icon_outfit_285="c16ed889-9699-4fd3-85a4-d353505326dd",q.Icon_outfit_286="30218f7e-1d21-494a-a68d-cb5bfaecd6dd",q.Icon_outfit_287="26a7ae61-acb4-4984-aebd-5f4ae6352de2",q.Icon_outfit_29="b03276c7-02ad-4e0d-b395-ebd08f7a0285",q.Icon_outfit_3="55cba21f-1883-46cc-a2e3-af2fdd2a9521",q.Icon_outfit_30="ee71f3d9-235c-494f-9e74-f79165af7734",q.Icon_outfit_31="8dc481ec-9ee7-40a8-b1d5-85eb36427034",q.Icon_outfit_32="6a14eb65-d317-43cc-9dca-9873aa0b58c0",q.Icon_outfit_33="a5f42159-f4ae-4469-b28f-8cc0b5d4be26",q.Icon_outfit_34="c14bc2ba-48f1-461d-b22b-572f30637f95",q.Icon_outfit_35="93b51503-7ce2-40fd-9de5-c4d7b21cbe85",q.Icon_outfit_36="4685b0ab-b6b1-4813-b800-0a4d0519c700",q.Icon_outfit_37="68bec49d-72bc-400c-a6ff-3a639dba34f1",q.Icon_outfit_38="16b48b87-89ba-4522-9778-0e6bae5c2045",q.Icon_outfit_39="3ddd8ea7-d686-42fc-a7d4-7bf71bd67b43",q.Icon_outfit_4="ba2ed472-ec02-4906-b827-a67ad2685035",q.Icon_outfit_40="9b31bbca-abff-405a-9a3a-21dbf6ec515d",q.Icon_outfit_41="22071a8d-7e41-4def-8b63-4958accca4d4",q.Icon_outfit_42="b289c462-cbb4-4566-9eec-16d345f20730",q.Icon_outfit_43="057d294a-8bc7-45b7-9e72-92eaefe03a57",q.Icon_outfit_44="e2a0bc00-f9e3-4cb9-9e57-e0fd600c125c",q.Icon_outfit_45="20c1bc76-82d9-4717-8488-ef1f1e7bd8e0",q.Icon_outfit_46="d94b5994-a3d4-4589-b18f-eafeab79f2c4",q.Icon_outfit_47="48bfe01b-1275-4d87-b548-109c30992aba",q.Icon_outfit_48="232ed203-5f3e-4e31-a82a-1e9ec4814d54",q.Icon_outfit_49="2cddf712-57a5-4332-951e-bd10fbdd6e1b",q.Icon_outfit_5="483485d3-f34f-43a3-b4ca-c614c5b4d56e",q.Icon_outfit_50="a96bb1a8-6bb0-48ea-b659-d1a411e3fea2",q.Icon_outfit_51="2d7ed46a-8b26-4579-bbee-6b526261e812",q.Icon_outfit_52="66cf33ea-5b3a-4bfc-aaa5-9f5e59acb5c0",q.Icon_outfit_53="efca60f9-ea7a-4477-9470-53fce1ee0d9c",q.Icon_outfit_54="9bd8824e-0374-48a4-b0c8-7c60443bc345",q.Icon_outfit_55="45c2e020-b277-41cf-b80a-f636e8107bd3",q.Icon_outfit_56="a205aaf2-f338-4c86-9092-a7014b651fe1",q.Icon_outfit_57="618442c6-2f9e-4e49-ab0b-c25f0c93fcab",q.Icon_outfit_58="38cfb2d9-0530-4837-9543-1bdc5401be11",q.Icon_outfit_59="d9d61971-1c14-4469-a8be-c2ec2406aa34",q.Icon_outfit_6="148af7f3-85ee-472a-a48b-e58299e578fe",q.Icon_outfit_60="99050f03-081d-432c-99d8-58e3e9c60023",q.Icon_outfit_61="4a58c7d5-e8dd-4633-9fe0-d5a2b5d1a54e",q.Icon_outfit_62="5ce34366-e687-415e-98d1-807f160ad4da",q.Icon_outfit_63="3b1fba68-bdec-41dc-8004-bf6d044765c8",q.Icon_outfit_64="96d9b39c-3192-4578-ade1-24f6636cf7ab",q.Icon_outfit_65="80eb4b19-f82c-48f9-91b9-b408dd30bf35",q.Icon_outfit_66="f68b0068-9322-477e-863d-5836b73d71ad",q.Icon_outfit_67="b3e64fcf-5386-43b7-a125-27f3010046cf",q.Icon_outfit_68="e90686f5-6c86-43ff-b302-c02915e8e908",q.Icon_outfit_7="83ef1da2-2dc7-4924-aabd-db53728a6fed",q.Icon_outfit_72="1e4d20e8-6f06-4ae3-bf91-a25f72a5e7c3",q.Icon_outfit_73="5cdcfeff-883b-4d07-8a65-bd92c498dc4d",q.Icon_outfit_74="7ddb1455-d95e-4c1a-81d6-e4b29c40339e",q.Icon_outfit_75="59856327-c047-4f66-a778-19ddb23431fd",q.Icon_outfit_76="725178ff-091a-4a55-9566-38485d1f3d8a",q.Icon_outfit_78="305ae860-01b8-4c51-8c93-40d34876986b",q.Icon_outfit_79="7c8f23a8-7b8a-42d5-9948-c3467b06a307",q.Icon_outfit_8="f5f2978e-525b-468d-a253-c36b28dea63e";q.Icon_outfit_80="6f4cca09-0ed1-4206-9b96-34592356fbf1",q.Icon_outfit_81="2bb53433-465c-4eff-b34f-6e10bea3df72",q.Icon_outfit_82="f6bb62e2-2903-4eb5-97fb-11d1cbcffdd2",q.Icon_outfit_83="df536a68-ff86-40f4-aa1c-552402ae5e8b",q.Icon_outfit_84="a3572ad5-476b-4674-8448-0896f1694b69",q.Icon_outfit_85="3e02e558-d780-4121-8e45-d962e055088a",q.Icon_outfit_86="ea65057d-a429-44d8-a260-4a9161782640",q.Icon_outfit_87="853e1dd5-0b83-4a37-ba47-24382ddc3b07",q.Icon_outfit_88="03fe7356-17ba-4b57-a5bd-3ee70e80425d",q.Icon_outfit_89="9ceba7f5-12e0-4413-8746-867189873f7f",q.Icon_outfit_9="649b26fa-b945-437e-9dc0-dfdd8a8901c8",q.Icon_outfit_90="8edbe036-d91b-4353-843a-7529d058ed86",q.Icon_outfit_91="009d6c9a-73e4-4168-a8b5-9ba2bf15389b",q.Icon_outfit_92="3db8800e-d9cd-4b7b-a5b4-d45243743cb8",q.Icon_outfit_93="e7de6c98-2f6d-4367-96c8-65250bd819ad",q.Icon_outfit_94="af78ec3c-2c75-40e5-81bf-dcdf6b1274b6",q.Icon_outfit_95="3e0f23e6-641d-40ae-93df-114edf2c9ceb",q.Icon_outfit_96="5655cb46-7ada-457d-9c17-0cd8803d418a",q.Icon_outfit_97="2593328a-82fb-473f-84f4-cbca828b8245",q.Icon_outfit_98="e0decf91-a6d8-4640-b3b8-56d00ccec493",q.Icon_outfit_99="74a09c73-d07a-4939-bc5e-3302c6658f85",q.Icon_parentgoal_reward="ede0b6d4-5d1c-4a0f-bc8b-043227065ecd",q.Icon_petHat_1="dbf56fe0-8f46-4498-a918-d18fe6d9a719",q.Icon_petHat_10="bcb74128-4244-48b5-bbda-0d63cc64feb3",q.Icon_petHat_100="7ad16a1d-a8ae-4678-affb-b7b7cf05c159",q.Icon_petHat_101="10e60bd5-520b-46ea-89e0-5480cc42bf55",q.Icon_petHat_102="8b564637-2fb1-4eec-909b-81286148eeb3",q.Icon_petHat_103="35287bc2-245c-490b-832e-4e02f1cff234",q.Icon_petHat_104="8537dc8c-8fb0-4399-b50f-d957eca4b744",q.Icon_petHat_105="80a8fa27-53a4-4ad2-872a-b48176a2da0c",q.Icon_petHat_106="b79a848a-c2fa-49e3-b8a0-8239c0e8c76f",q.Icon_petHat_107="0d20306b-8476-4d13-8c04-76abe38eff37",q.Icon_petHat_108="0ff4a508-d5c5-4ad5-a4dc-ea30f7d1aa39",q.Icon_petHat_109="4c37ba7a-3b72-4cdb-bf63-053b1531a0cd",q.Icon_petHat_11="bd0baba5-bcef-4d61-9f2a-9563aacd16a5",q.Icon_petHat_110="e21b0dec-8ade-4627-9466-88f3b040c362",q.Icon_petHat_111="81e0d6bc-f686-4eab-a634-2b3c94dfd78f",q.Icon_petHat_112="ea8d2068-7039-4530-9ad5-e512b958e49c",q.Icon_petHat_113="b9a1c66b-c7b6-41cc-8c9a-732c9cdaa7c3",q.Icon_petHat_114="d1571ed0-a803-4e16-a0ee-55540c6cf1eb",q.Icon_petHat_115="3cfef047-f091-40ba-adb3-9a25779af833",q.Icon_petHat_116="ffad8a4a-b8ab-4630-8326-1069a3921a0b",q.Icon_petHat_117="f992c5b2-80ee-47b4-8548-1f262c31883d",q.Icon_petHat_118="d561bebd-5523-43fd-9a6f-117e3d8db07c",q.Icon_petHat_119="eb89bb51-c5e2-4990-93b8-8fd073a3acca",q.Icon_petHat_12="ebaa6edd-dab2-4e50-8a5b-fca1c01e4e51",q.Icon_petHat_120="41a1f4da-326c-458b-a8cf-db8499803dff",q.Icon_petHat_121="cd3f9afc-6c00-417a-9e22-d083c131bdab",q.Icon_petHat_122="40a04336-824c-4902-a88c-4daf6dcbcb73",q.Icon_petHat_123="883ed28b-0f13-48fb-b56b-04928386bd0f",q.Icon_petHat_124="2876f462-bc98-45bd-af9d-4dc58e0db001",q.Icon_petHat_125="474bfb8c-0edc-4a45-b353-3ca56dccd0b2",q.Icon_petHat_126="05a16380-df72-425f-82dd-005d9d3f5596",q.Icon_petHat_127="0878ed19-48a9-40d1-9924-c6ddfaf189ff",q.Icon_petHat_128="8d67a164-680a-4c4a-ba23-9de8c8193180",q.Icon_petHat_129="6f450a5a-c60d-44b8-b8f3-20de300d6d14",q.Icon_petHat_13="21fe6a8e-191a-40fa-8b4f-b26d6afde6c6",q.Icon_petHat_130="66ecf655-edf2-47a2-9032-4eaa7a66a1db",q.Icon_petHat_131="4be0110b-7ab7-444d-b0ac-7dca522e4509",q.Icon_petHat_132="ce0b0d63-dfe0-4298-8218-efa1abe38e2e",q.Icon_petHat_133="de2c2c50-5e4d-4071-b9c3-2254c8dac526",q.Icon_petHat_134="de2e951b-ee99-4832-a955-60111219fe54",q.Icon_petHat_135="59226fa6-676d-48ea-960b-401e82df8acd",q.Icon_petHat_136="32752682-e22c-4b84-ba1b-9bab6c702162",q.Icon_petHat_137="6c3be92c-6636-4c83-94ed-afdc1b06f1a3",q.Icon_petHat_138="265f34e3-d191-44a1-b58a-11856ea056eb",q.Icon_petHat_139="0188f96f-298a-4abf-939f-9756eb651227",q.Icon_petHat_14="de4a3817-7a9e-431e-a69d-39462eb4d68a",q.Icon_petHat_140="1313d81d-51aa-4ab3-895e-b0459a3764a3",q.Icon_petHat_141="b08138b4-1ff4-4307-a8a1-18c2af8cfb9b",q.Icon_petHat_142="b5a19330-b41e-4420-a576-6db19a4602cd",q.Icon_petHat_143="04c0181b-a436-474e-8c61-997f8b59d79b",q.Icon_petHat_144="71d3c987-3a08-4588-a9df-227800b33037",q.Icon_petHat_15="990e7c7a-b431-4b65-a054-e9a2cbb10efa",q.Icon_petHat_16="8540d0aa-3dc2-4ffe-896d-53743afa7d94",q.Icon_petHat_17="50343689-7af3-47cd-878f-09210787b7ce",q.Icon_petHat_18="4590c43b-cffe-49fe-b9b0-5ea0893e0dd9",q.Icon_petHat_19="570e21e5-126a-49bd-b94b-ced79b81a091",q.Icon_petHat_2="602dcbe5-8e6a-40cd-bd88-a0a12ff079bc",q.Icon_petHat_20="2ca46ac5-cb80-4a40-983c-11bd8b43a770",q.Icon_petHat_21="9bbafe4e-df6d-40d6-84c4-8baf6ee93fb2",q.Icon_petHat_22="a085108f-bee0-4f0c-a6f5-976094cac23b",q.Icon_petHat_23="3aaca455-234a-4229-9b28-a52a352e917d",q.Icon_petHat_24="f601b0f0-1198-4180-9cc0-462222dd5e39",q.Icon_petHat_25="64592ed6-7a43-4789-8b6e-7f4581d805e5",q.Icon_petHat_26="cc43c8cf-f29e-4d35-9141-e00d99cd9c6e",q.Icon_petHat_27="0b7873db-2549-442e-921f-a5514a5c8b4a",q.Icon_petHat_28="fe4e797b-516e-48fe-9177-43e09ced9c6f",q.Icon_petHat_29="fdcaad02-2a19-4513-82d8-abb550e14a88",q.Icon_petHat_3="b06508a9-2c50-4e95-9b4e-dd60d26af9e3",q.Icon_petHat_30="8c222361-eead-49f0-b874-cc6131477450",q.Icon_petHat_31="9ea94d04-55c1-4bb7-b814-d30c11c02e20",q.Icon_petHat_32="06285508-5ab4-40e4-b08d-f5d9e59c261d",q.Icon_petHat_33="ec4a1612-b0ab-4b8a-a03f-88655ad6790c",q.Icon_petHat_34="6ae8bd8f-8cf9-46e6-90d0-1637849e7d34",q.Icon_petHat_35="8ed8ee8f-44bb-485d-84e3-ea28bcf4e530",q.Icon_petHat_36="88bcb349-7aea-4e4d-89c8-af557b5e2a69",q.Icon_petHat_37="be50c101-a1a5-4c39-b3d2-363fe194d2d1",q.Icon_petHat_38="deea4ecc-4b64-4bd6-844d-fe12d8855de5",q.Icon_petHat_39="e940fa05-b195-4d1f-952c-d3b131aeb7bb",q.Icon_petHat_4="a7149b1e-7327-4749-a0ed-604e6ebd24da",q.Icon_petHat_40="9bb5ed3a-be3d-432c-b1c1-ab637783d848",q.Icon_petHat_41="8eb64d2f-1ac0-4814-8744-0a91fcf04d04",q.Icon_petHat_42="d8296099-b3af-4892-a4e0-0d64a4572e95",q.Icon_petHat_43="2c266ed4-981f-4c94-88a9-b116ea70ca63",q.Icon_petHat_44="5fdee887-b915-4b3b-94cd-a5af2bf3fb44",q.Icon_petHat_45="6bc99eb3-3182-463f-98a1-d850462c6c3f",q.Icon_petHat_46="e96360a2-d57c-418e-beaa-b8d0502cd0ab",q.Icon_petHat_47="7709b7f7-a765-410c-b88e-1fe57db4409e",q.Icon_petHat_48="7d5daabe-35df-4801-9943-ac04277a3dba",q.Icon_petHat_49="0dba21de-b61d-4ed9-8292-bd1ec2878563",q.Icon_petHat_5="93da1fad-95d5-4c19-924d-5d99a91dcbc2",q.Icon_petHat_50="8e5d3a8d-b2a4-4171-97f5-36d31b40cf70",q.Icon_petHat_51="f8ce9124-ff4b-4f5f-b242-810b90b170bd",q.Icon_petHat_52="e4fc9154-9c31-4c7f-b5c6-ee44438e452b",q.Icon_petHat_53="af7f955e-ef58-4d51-bfc2-c673f233f5e0",q.Icon_petHat_54="148d55f1-9085-4779-9cb3-25d5d2b62139",q.Icon_petHat_55="64d7e433-7062-4fac-8902-3c56cd312b7c",q.Icon_petHat_56="e0616501-3be0-42b3-958d-922d6d74dcc1",q.Icon_petHat_57="872c7c0c-32ef-4cd0-a90e-0e4456a25731",q.Icon_petHat_58="c015d54c-f761-4563-941b-4071266d4f42",q.Icon_petHat_59="2038f9ad-0564-4eae-bb1a-0377303a8f10",q.Icon_petHat_6="bba112df-094a-4717-bd45-837b69b64bff",q.Icon_petHat_60="0aed10a3-8040-4b12-b21b-0c1bfe28808b",q.Icon_petHat_61="f7705761-25d8-4859-97a8-4afcd0309b83",q.Icon_petHat_62="019e7a30-a9f3-4046-99bd-4d94ca13cbbc",q.Icon_petHat_63="08c25ac1-5378-49a6-8668-2c077f1fd068",q.Icon_petHat_64="c3a81362-8ad2-4495-8b48-f7e5210ba768",q.Icon_petHat_65="45aed6e0-5d8b-4b4c-8305-bf7e2ec135a1",q.Icon_petHat_66="25157ea2-0382-4e47-9c81-34145ce135a3",q.Icon_petHat_67="89e3cad4-ff0c-4c50-be5e-e4413eb1fd70",q.Icon_petHat_68="ec3428c4-a6a3-4043-bffb-00d355c53dd8",q.Icon_petHat_69="ef3b77ec-e8c7-4698-a33b-a68387a58072",q.Icon_petHat_7="93f05827-1692-46bf-b7ee-6100eeebab3c",q.Icon_petHat_70="78e4293f-058c-4222-a934-6b719f2bf2a2",q.Icon_petHat_71="41036d01-db09-4f73-896b-2c7ee587a209",q.Icon_petHat_72="7bf4bbe8-5762-4be0-a1fc-b2c51e2b2e75",q.Icon_petHat_73="e34a8a1d-52ee-4316-bd98-5c788f5ea62b",q.Icon_petHat_74="aa97e551-dfd4-40e4-a94c-1ff76823116c",q.Icon_petHat_75="0f6fc3ea-de8e-43d8-9d3e-998e7453d25c",q.Icon_petHat_76="5269c359-72ce-40ba-a4ba-ca2276b799d2",q.Icon_petHat_77="fcfdeb97-66dd-4411-a1d7-ba2f0030ee6e",q.Icon_petHat_78="b658eaf1-d02a-4fa3-bdc1-8656eeb35849",q.Icon_petHat_79="1fcbebdc-91b9-4c92-9104-a77f5af22d89",q.Icon_petHat_8="2f6f2798-11d7-4fb8-95ed-6531f8694ee4",q.Icon_petHat_80="ee2295c4-5ac7-47c3-971f-282f9896cc33",q.Icon_petHat_81="642a302d-8d63-433e-8575-b7abc87fc64e",q.Icon_petHat_82="f3b93b22-e60a-4330-a3ea-0e1a2b3046df",q.Icon_petHat_83="4d2e7f5e-9e40-42d5-92b9-6e8687e713a2",q.Icon_petHat_84="33cdde68-4ebc-4e97-af85-f7e48e4f450b",q.Icon_petHat_85="34b7b8bc-cdb2-4d76-a7e0-e423de87d74f",q.Icon_petHat_86="80a36cb6-7739-4926-8813-4f0cc89eebc8",q.Icon_petHat_87="0dae63cd-04bd-49b5-9367-0a6e0ae1a163",q.Icon_petHat_88="69f89fc8-6442-4a69-8ddd-ff730cb08023",q.Icon_petHat_89="3663df5b-d260-490d-b7eb-7b7c35c88550",q.Icon_petHat_9="2ff73755-6221-4190-b47f-34ef609337bf",q.Icon_petHat_90="5a716845-1a91-4ea7-814d-69900fe6adc8",q.Icon_petHat_91="dcbe943d-a633-49a7-b733-420267d4c600",q.Icon_petHat_92="2ee01a4a-b6b6-4a14-8d90-c606ccd7a20b",q.Icon_petHat_93="7e938a27-5c7a-474a-ba31-8af87b589f11",q.Icon_petHat_94="5834a1dc-5bb4-4690-89fc-066137bcd396",q.Icon_petHat_95="11364d64-536e-402a-bc19-ce95e9062f16",q.Icon_petHat_96="2206bb5c-25e1-4c2f-9af2-4fecd629725f",q.Icon_petHat_97="7a460713-f483-49ae-a1d5-14613dae627f",q.Icon_petHat_98="8cdf2a43-2f1d-45c6-b19b-570db2066f1d",q.Icon_petHat_99="bbba5770-dc85-4583-ab88-d2f0ca22453f",q.Icon_petRelic_1="c3a08117-fc95-4d4d-8ec3-dd4c8562db8d",q.Icon_petRelic_10="f4c54acf-0289-404d-b723-6bb3cf019e6e",q.Icon_petRelic_100="f6df55ab-c24b-4fd1-94a6-abee23e2a6d7",q.Icon_petRelic_101="c346ab32-bde5-45b7-9881-a01e66eef3e8",q.Icon_petRelic_102="bca98c08-08f3-40fc-82e6-bda848fc81f0",q.Icon_petRelic_103="72ac5371-6808-49be-a37f-bc40908c74f0",q.Icon_petRelic_104="8f55161d-bc09-4af1-a8ba-17c43df89b89",q.Icon_petRelic_105="4e8c85a9-e19e-4bc1-96aa-8d66fefecc06",q.Icon_petRelic_106="175291e3-416f-4388-b5ce-4164f3ce5e36",q.Icon_petRelic_107="ac9b23f2-8cf0-4773-985b-2b67dbe3e7ee",q.Icon_petRelic_108="df6d98a1-991f-433e-ad6d-9a88c3bec43b",q.Icon_petRelic_109="a4d121ab-e632-4444-9a00-ec1fc933081c",q.Icon_petRelic_11="08132305-5d72-472e-a0b0-ac14b5af6ca9",q.Icon_petRelic_110="4169e9ee-f130-4500-904d-6fbda206ddb2",q.Icon_petRelic_111="e5ef3e17-4853-429e-ae16-a068cbae8e76",q.Icon_petRelic_112="7de451ed-fa87-49a1-9583-7d598fe22a6a",q.Icon_petRelic_113="06f418c4-e8a1-4962-8228-0c76bb359c8f",q.Icon_petRelic_114="a1d8bff6-56ff-4f5b-8a07-8a1f2d4a6c73",q.Icon_petRelic_115="9d568039-060e-4e4d-9744-bb22aae1c0a1",q.Icon_petRelic_116="1ace1825-a24d-4cd1-9497-16e11cc66b74",q.Icon_petRelic_117="1c8cb244-b1ef-431d-ab7c-aab40bde57a9",q.Icon_petRelic_118="f4cd7278-df70-4f9d-9d07-d3c1abcf4e1e",q.Icon_petRelic_119="1ca5245f-a73e-46c6-97b7-35c0de098644",q.Icon_petRelic_12="bdd30943-fd9e-4fbc-8b96-ae1b913f5705",q.Icon_petRelic_120="9f001c7c-2575-40ab-8d7f-de89c2bacdbc",q.Icon_petRelic_121="67a21fc3-5ee4-48c0-97c5-6a43c3a46e20",q.Icon_petRelic_122="90d481f2-8aa0-42a0-9a05-f901d10ecdc3",q.Icon_petRelic_123="e7330510-18ec-46bb-a53f-88d0461fcac9",q.Icon_petRelic_124="d18d48d3-1937-4dcd-aa84-0723c4af11a8",q.Icon_petRelic_125="f2249b45-dc91-4fc5-ac44-ba7af80ef7a7",q.Icon_petRelic_126="845c3722-ba83-4df8-b17c-141a4ab78b7b",q.Icon_petRelic_127="b4fe7de2-5dae-46df-8edf-195b3dfe1bc0",q.Icon_petRelic_128="f80b6ce3-33b9-47b6-af79-55ba7acf5a19",q.Icon_petRelic_129="04cb79ae-6754-47f3-9947-10ec723e09c6",q.Icon_petRelic_13="10457efe-9c66-413a-ba32-17df933a379a",q.Icon_petRelic_130="9d849481-e5bb-40af-bb60-142151750e51",q.Icon_petRelic_131="f7155b81-17f8-4d3e-bafa-7b45e3c4b30a",q.Icon_petRelic_132="286cb6c3-a682-4171-86a4-cbcea961636a",q.Icon_petRelic_133="2bc878f2-7173-414a-8b1f-1224259cfaec",q.Icon_petRelic_134="bbd27bef-6f3c-43bf-8ab7-a21d15a374bd",q.Icon_petRelic_135="a5f5df2c-81bd-45bf-b9ae-c112d26757df",q.Icon_petRelic_136="f8182546-9183-49c6-a9b2-d519292176c0",q.Icon_petRelic_137="c7407a6f-6603-4211-b2cd-5b746411fb85",q.Icon_petRelic_138="a9c245d8-e9a8-4acc-ad21-b8b6e545eb74",q.Icon_petRelic_139="5e169702-04a1-48fe-9e20-44bec6369cf6",q.Icon_petRelic_14="ee445a38-a93c-4b2c-ac59-387b52b26ebe",q.Icon_petRelic_140="1c270c04-9bde-4cc0-a9f1-e332296984ab",q.Icon_petRelic_141="de310b40-a29d-4788-9965-7de4f08cc3d6",q.Icon_petRelic_142="e727e5de-8e09-4a17-a0db-37e54562b069",q.Icon_petRelic_143="31cbfbad-0926-4760-ae9a-5e3238213c05",q.Icon_petRelic_144="d0d84a1a-3211-4de5-ab70-986e5c58ddaf",q.Icon_petRelic_145="0c58c073-07c2-48a2-8214-75feea7b089c",q.Icon_petRelic_146="e1a1880e-d966-4c88-a1cd-b849825668be",q.Icon_petRelic_147="d9bf4a00-14e1-4b54-8187-8827ad9d28e6",q.Icon_petRelic_15="cad35ff9-8c70-4dcb-94bf-e4afff550d19",q.Icon_petRelic_16="1f1d579e-f57e-4932-9203-db0adbe5fb14",q.Icon_petRelic_17="02ba7d2a-cdcd-408f-8263-6a15d299ad4f",q.Icon_petRelic_18="0149596f-0c48-41d5-a9a4-6404a3a41285",q.Icon_petRelic_19="1b5d5f56-e7d9-4a07-a401-6bd20e21eeb5",q.Icon_petRelic_2="41c8aa30-0a4a-4793-916a-a540626b8e07",q.Icon_petRelic_20="be9ce795-52cd-46bd-b02e-961b9cc19178",q.Icon_petRelic_21="61c03a4b-0f38-4afb-9e2c-042d9258c32b",q.Icon_petRelic_22="848fcda3-e8b5-42a1-9aa4-6e6181a37d2a",q.Icon_petRelic_23="ea122246-3a1c-441b-bc82-675db3827d4a",q.Icon_petRelic_24="8a6cdd76-a5a6-4375-a590-5f448769cb4d",q.Icon_petRelic_25="57760143-8375-4d73-8d3a-516b02ade43a",q.Icon_petRelic_26="725572b0-3470-491a-846b-e1c63c3776ae",q.Icon_petRelic_27="5736932a-4253-4970-a0ca-a2efcd26410e",q.Icon_petRelic_28="51572a65-a20a-4c9d-94c8-a3d16b4c83e5",q.Icon_petRelic_29="2a104474-50bd-4be3-afc0-91e9d046d2fc",q.Icon_petRelic_3="6a39c91c-424d-4cce-847e-733e63f20ab1",q.Icon_petRelic_30="591aab16-6046-4e70-a593-8ef178dcb96e",q.Icon_petRelic_31="6f0a2924-c9b8-4bb4-b0ef-a00e1363bb36",q.Icon_petRelic_32="d557c740-d924-4074-b99b-63e9ed454c83",q.Icon_petRelic_33="a01ee398-8648-48f9-9634-dae4295a2280",q.Icon_petRelic_34="f6c7f147-f5a9-496b-ba66-66632ea5c066",q.Icon_petRelic_35="5cbabe40-9466-4d39-9a53-2026f85563b4",q.Icon_petRelic_36="675bb651-1506-405d-b55f-148a799b336d",q.Icon_petRelic_37="20dc92c3-8f3b-42fd-9ffa-e6245c0028a6",q.Icon_petRelic_38="66596efd-8767-4348-87ec-e59255c18393",q.Icon_petRelic_39="fc348140-b207-4aab-8cc7-1fa54017faaa",q.Icon_petRelic_4="b08f7644-65f1-4f60-b0aa-c4d3ad8df440",q.Icon_petRelic_40="215669ff-4973-477e-b359-0c59dc54b3ca",q.Icon_petRelic_41="5c03f1da-1de4-468b-bf4a-17924a1d70cd",q.Icon_petRelic_42="b89d53b2-13a8-46d8-b034-29e481c4bc35",q.Icon_petRelic_43="74a46063-9799-4deb-88e1-13ebdf1bbd39",q.Icon_petRelic_44="259e3445-b76e-4749-a015-2e438aab086a",q.Icon_petRelic_45="b53982c6-658d-416c-a8a5-78c63256268a",q.Icon_petRelic_46="d31d1cac-811f-495a-8d71-cb62a4712ff6",q.Icon_petRelic_47="6c62fb1f-841e-4772-bba6-76f93346078b",q.Icon_petRelic_48="de8afe0d-140c-4810-949f-dd9080dbddcd",q.Icon_petRelic_49="7108bf88-9f44-4c05-af24-acf5b0e52205",q.Icon_petRelic_5="e5114c98-0437-41ee-9f97-b8ada3409fc4",q.Icon_petRelic_50="866245f1-2b24-4585-b407-cbd2e5be08e6",q.Icon_petRelic_51="d4002efe-0620-40ab-a6e7-0e93f48b66a8",q.Icon_petRelic_52="41ebbc79-2d50-4c58-b70f-5bbdb455065b",q.Icon_petRelic_53="233c734a-815b-4110-86f5-0af4b01d1a50",q.Icon_petRelic_54="980506b1-94ef-4545-aac2-5e0fc8cc6158",q.Icon_petRelic_55="cd7d2d34-577c-4211-96c0-fd0f0dfb552d",q.Icon_petRelic_56="5a380da3-46ee-4a7c-b085-f326ab323855",q.Icon_petRelic_57="9748eeaa-f90b-4831-9b6c-a774ce3cbe1c",q.Icon_petRelic_58="853f3535-4237-4dc2-ace5-3eedde739082",q.Icon_petRelic_59="78be87a9-9657-42ba-bfbb-59a144dfbaa1",q.Icon_petRelic_6="50506009-c7d5-4e7c-b437-a766c1b3825d",q.Icon_petRelic_60="a50379c5-d958-499b-bacf-f62f071a77aa",q.Icon_petRelic_61="2b6e7374-c07c-4d33-8f19-bfe620069f66",q.Icon_petRelic_62="8d72d4cc-6d6c-4610-a1a4-03dd6a935405",q.Icon_petRelic_63="1f8cf454-eeb1-4197-8a1c-c802d1e69fd6",q.Icon_petRelic_64="573a1790-7f23-48cd-b150-1a1b5a19b03b",q.Icon_petRelic_65="6ce024bf-58ae-4f21-a5fb-b5ce75d21aec",q.Icon_petRelic_66="51ed6f4e-d957-4eb6-bb75-0d71d882aee2",q.Icon_petRelic_67="f14267be-beb7-49f1-a46e-7e3b664abebf",q.Icon_petRelic_68="669419c0-dbaa-4c9e-922f-1c4c43f1cd3c",q.Icon_petRelic_69="efd65e10-7688-4aa9-9a80-00daa882f438",q.Icon_petRelic_7="0c25533d-f3a3-4462-a8ef-3f66ec73d9f2",q.Icon_petRelic_70="80cceb23-a19e-4420-87c5-7fb2b8acb32b",q.Icon_petRelic_71="5476f54e-9d10-4bb5-b75e-0bd10e3dcebf",q.Icon_petRelic_72="748de582-19cd-4d11-87f0-3dcc5e63120d",q.Icon_petRelic_73="737d89c8-1a1c-4b91-a242-8da0de7156d8",q.Icon_petRelic_74="8875dbde-d134-432e-879b-f97168b95a75",q.Icon_petRelic_75="d111c58b-6ce4-40d1-bf1e-f916a1791d6e",q.Icon_petRelic_76="3b20e2c1-7b2a-4659-8722-905236e1b3d4",q.Icon_petRelic_77="14d801e7-7bf6-466a-af4a-438da037a09d",q.Icon_petRelic_78="dba76b56-476f-4e26-8343-a398faf190cf",q.Icon_petRelic_79="77654186-50f5-4fe9-9244-eccdb006ed76",q.Icon_petRelic_8="66a79f17-4a48-4004-9fd2-3555a8ee2877",q.Icon_petRelic_80="1143256b-7fed-4ba5-bd60-14559a5cddd1",q.Icon_petRelic_81="925df444-2dba-471c-96ec-7038c2f1aa06",q.Icon_petRelic_82="643b5935-63ba-4685-8ec9-ef78d67d7eb2",q.Icon_petRelic_83="d129d11b-e095-43be-bfdc-e28792d391c0",q.Icon_petRelic_85="502d9842-aefc-4b27-ba86-8f885ba6071a",q.Icon_petRelic_86="cee2f1da-37e6-4826-94aa-c17d0d643bbd",q.Icon_petRelic_87="322b3a6e-aa5e-4df4-8e1f-d25206790d4d",q.Icon_petRelic_88="0bf7a542-b039-477b-803a-8ae062633790",q.Icon_petRelic_89="7b21effc-df2b-42ae-a1d1-27b8c399e20f",q.Icon_petRelic_9="1d3e41ca-c271-4e9b-afc4-a89b54e1cb08",q.Icon_petRelic_90="444ff143-949c-4ca5-8aef-194777e64acc",q.Icon_petRelic_91="0cdc1f83-1376-4957-9dde-61d5707dcdc7",q.Icon_petRelic_92="2c61b82c-7d66-4eb0-b0ef-21874c6fb31d",q.Icon_petRelic_93="b3999076-9b45-4f92-be38-27d8dc540930",q.Icon_petRelic_94="4de5dfa5-47e8-4e0d-89ca-28e132b9be47",q.Icon_petRelic_95="0c2b291b-df2c-40b1-ac61-5f685d8272d2",q.Icon_petRelic_96="cc6bc210-72d9-4771-8e85-501b4d938159",q.Icon_petRelic_97="e142389c-5173-47b1-8ead-8f16ce07a1f2",q.Icon_petRelic_98="cee0d115-00b8-486b-9c94-9a807dd9f549",q.Icon_petRelic_99="377730c6-c7af-4eae-963d-6d7bccd36c80",q.Icon_pet_1="89f2e5b5-4e68-426a-8996-0b2ff92ba33b",q.Icon_pet_10="3a84f536-f036-4eb4-9093-e76030ab2977",q.Icon_pet_100="178232ae-a644-479f-9033-f289fb36bb65",q.Icon_pet_101="755ebfcb-d8bb-43f2-9187-61f8d530c934",q.Icon_pet_102="e1000778-a6d8-4094-9859-525587e97e9b",q.Icon_pet_103="e1f9ca2d-3c35-4e79-acef-4d85d3e38e3d",q.Icon_pet_104="9e0854b8-38a2-40df-82b9-4a663ef38c89",q.Icon_pet_105="886a2920-5cf3-414e-8412-a0e82650d8f7",q.Icon_pet_106="a5f2f648-97ad-4e58-8ea9-0d053f97d10d",q.Icon_pet_107="f57236f7-cc41-445e-8fa4-7e4f4145aa07",q.Icon_pet_108="5a47eb03-3317-4460-9b9f-f6fa57bf6d4f",q.Icon_pet_109="398e8c39-34f5-414c-972a-e170dd2e94bc",q.Icon_pet_11="2c57f6e8-db7e-480c-b2a6-b5b9bb068fb8",q.Icon_pet_110="1442557f-044b-432f-b371-9ded98f8072d",q.Icon_pet_111="e2280efa-a2f5-41e6-9732-e33c17e8a9fd",q.Icon_pet_112="ea9ae3e0-9d22-4b2b-944f-2e907027a4c6",q.Icon_pet_113="612737a8-8c9b-49e4-8260-9ccb31c75d15",q.Icon_pet_114="ab92bb93-c0ac-456e-9c42-7d41e552eaf4",q.Icon_pet_115="3865777f-31e6-449d-967c-5b4f3270ec4d",q.Icon_pet_116="9896b846-2710-4d0e-9cc8-7d18cb151302",q.Icon_pet_117="99f095da-6cda-4bde-bdee-6a1b2bdacad2",q.Icon_pet_118="550d5658-ba12-4c1b-a159-b885f74845ca",q.Icon_pet_119="30081f17-e2a1-494f-ab02-ceb9523fdb08",q.Icon_pet_12="4bd51dab-4877-4b62-846d-ee64299be26c",q.Icon_pet_120="69cd1958-4506-41c6-b93f-dc4eda84731c",q.Icon_pet_121="bc2589f7-2a42-4ffe-820e-9e2c6eb993b2",q.Icon_pet_122="85aed590-d0ed-449f-8fe9-925f60b0df78",q.Icon_pet_123="aeb6d5e2-91d0-4550-a292-851279207f9c",q.Icon_pet_124="724a89c1-31b0-415f-94d7-637c03fb907e",q.Icon_pet_125="9bb148fe-bd7e-4c4b-a255-63ccca05f6fb",q.Icon_pet_126="283c5b3a-3a93-4dad-b47e-310b915a5391",q.Icon_pet_127="cd814ed5-b62b-4660-bf62-a6087fa4f66f",q.Icon_pet_128="8c030e54-e0e7-4cad-9327-a7f1caa7734c",q.Icon_pet_129="be297e96-812f-4610-b2d2-e6cb14f16b0e",q.Icon_pet_13="de026c00-5de9-4f91-9c9e-54c51f0327e4",q.Icon_pet_130="d4784480-f887-4e86-b4b6-9d34eb523030",q.Icon_pet_131="ad4bd5b9-eb01-4f14-9556-fbad7cf76cc4",q.Icon_pet_132="76edf52f-f3be-4996-9bdc-0fcea40e51cf",q.Icon_pet_133="df1543a6-1f8b-44c3-b4d6-3c380d706741",q.Icon_pet_134="fa5ccf4c-b38e-44e6-9972-c8f5c4b2c1ba",q.Icon_pet_135="f4d33b2e-3445-41c1-b60b-2c7c04867826",q.Icon_pet_136="d93e539e-53f6-4d48-b647-f4f2168b2d42",q.Icon_pet_137="56d66edf-a5b6-4e32-8c58-c68e3d74beb8",q.Icon_pet_138="ac100325-42a9-453d-a316-346590090791",q.Icon_pet_139="fc2bcfe5-9983-4201-b7f9-5d05f833c23f",q.Icon_pet_14="18b0c5ed-d58f-47e7-9b50-ba4124576f7c",q.Icon_pet_140="0d5d0284-4928-4424-8c3f-393b90560831",q.Icon_pet_141="20ca3bea-a5f9-4b66-98b8-416c8f3cde06",q.Icon_pet_142="60e043e4-41f8-4434-aa78-0be512b42017",q.Icon_pet_143="0cfee9da-5e01-4d14-a8bf-5418857749d5",q.Icon_pet_144="f091ae0f-ad90-49a0-b6ac-cb8fc041bc14",q.Icon_pet_145="fa3329bd-b8b5-46e7-a879-1dc06b7204a4",q.Icon_pet_146="397a8e25-3eb7-4d77-b121-87aff0782261",q.Icon_pet_147="d8ee6b11-2b7e-44e3-bcd6-d150714fec49",q.Icon_pet_148="1b71aee5-6076-4037-873e-0c6c697598a1",q.Icon_pet_149="5593d322-ade9-4c42-965b-1106db1fcd0e",q.Icon_pet_15="9312899d-6fc8-4737-92d4-2a6d31a3d7e3",q.Icon_pet_150="7dd9ac81-3ab3-4b83-89f6-2500bd71c3a8",q.Icon_pet_151="1411c933-c030-43d2-9707-735c990b6d0b",q.Icon_pet_155="e7ff6310-d342-4f5d-928c-d345572a7078",q.Icon_pet_156="5195096f-3085-4c3d-811c-adc4c845fba1",q.Icon_pet_157="8e1a4b6e-d9a9-4969-b09d-fbd3b2ed9859",q.Icon_pet_158="e56c2c41-fdb0-468c-b414-629e0e48b8f3",q.Icon_pet_16="666e1051-1265-49f5-9ab2-b86ea6d0f65c",q.Icon_pet_160="fc8915a8-0b61-4bf3-b6b2-0ddc2fafebef",q.Icon_pet_164="a6a6f305-a82c-4d72-8d60-1e288707e543",q.Icon_pet_165="2d93ee17-7da9-4fc3-ad7e-0a64cb99a600",q.Icon_pet_166="1e24f199-eef3-48fc-b752-b826323bf0ce",q.Icon_pet_167="023bb769-81c0-4f32-ba60-79c95dba45b2",q.Icon_pet_168="025e056e-d1bb-4156-8f15-a4b5da194f9b",q.Icon_pet_169="ac6c3a54-4274-4784-9622-fd9277005eef",q.Icon_pet_17="21f5f7e4-b1d9-4c3d-bfce-53d1b81b7476",q.Icon_pet_170="e9c9debb-8701-490b-b5e0-81a603cb424a",q.Icon_pet_171="10cc44f1-784a-4df9-a2e5-9af7e96376c6",q.Icon_pet_172="4c617661-def9-444a-81a5-e8915d32a27f",q.Icon_pet_173="f09ba7ce-d0f8-4b49-9fe2-8b6589eb7cb8",q.Icon_pet_174="6a1e3b7c-f7f7-466c-8720-929359429ffb",q.Icon_pet_175="657bd45a-e448-4a78-a625-9f276cafac22",q.Icon_pet_176="13942a09-4e19-46f0-95cb-3fcabc24148d",q.Icon_pet_177="5701d0e1-246c-48bd-b340-d6b9d362b88d",q.Icon_pet_178="10f4a886-7072-4582-aacb-e76a43373aad",q.Icon_pet_179="5559dac5-1368-469f-abda-4d5469185d04",q.Icon_pet_18="29626503-8d51-436b-a6ca-416e2e7de44d",q.Icon_pet_182="4e16e067-7e49-453b-ad91-8eae3c381a33",q.Icon_pet_183="3083f308-5469-4591-884d-bba9e4d17b45",q.Icon_pet_184="8254e112-885a-4c05-b0be-e64f697d198c",q.Icon_pet_185="dfae124a-f667-4e29-8229-fdbcc6416cfa",q.Icon_pet_186="d18fe0b2-f6aa-47cd-aa4b-9139be29419e",q.Icon_pet_187="ac5b141e-5d75-4a3d-96dc-46103fb056e3",q.Icon_pet_188="0f3cde49-b199-4e45-b44b-fde91328cf5a",q.Icon_pet_189="b09d6787-0051-4ca5-a6bf-6349d14615b1",q.Icon_pet_19="85d2512a-2003-4317-ada0-bdf023901234",q.Icon_pet_190="14780ab9-6393-4f5b-9eea-46990881a658",q.Icon_pet_191="f1862bc7-6afd-4687-a02c-99f6410bb77d",q.Icon_pet_192="296829ea-a604-4ff6-a9de-33ee1f39dcdc",q.Icon_pet_193="85c4d139-3376-4a1e-bc6c-47dabf4552d8",q.Icon_pet_194="f57e3db1-91bb-45d3-9cb0-24aa3ef2a984",q.Icon_pet_195="77c97bf0-fb39-4eb1-bc50-e49bb09675d0",q.Icon_pet_196="cd42b406-54f6-4bef-a836-6578ee474b31",q.Icon_pet_197="8ba93898-9f08-405a-aac7-58f5ace0aa82",q.Icon_pet_198="04d00093-3034-4b02-b93b-d138b2debf8e",q.Icon_pet_199="370220b5-d64c-4501-a43e-4ffcd92aa237",q.Icon_pet_2="f07b3983-ff1f-4a41-99fe-29aebbcd8b4f",q.Icon_pet_20="3d19cb2a-75eb-4410-affc-d9e848a138d8",q.Icon_pet_200="9ba9e56d-e375-4b7c-8e37-3e9a6b8cb1f7",q.Icon_pet_201="c7e0bc0b-c7dc-4fb2-8a99-d4d7eb9877fa",q.Icon_pet_202="83aab5cc-e40f-4390-88d7-69ef504014ab",q.Icon_pet_203="2c094c0d-81e4-4072-9c9e-f5eb39ab241e",q.Icon_pet_204="7a1c44ef-cd69-499a-8529-250f0a03a8f3",q.Icon_pet_205="e33e5c24-3d45-44c0-a6bf-e3a364c7de9c",q.Icon_pet_206="3e22f406-213a-43a4-bcb7-b03a028c5704",q.Icon_pet_207="e2875874-66da-4e49-9617-51f1d6c58a31",q.Icon_pet_208="57d9e165-eab7-4c75-a83f-2e44c1c66a32",q.Icon_pet_209="81af4662-0a2f-4b7f-89b2-e07fc1980d11",q.Icon_pet_21="37087ceb-6ef6-455f-98b9-c2b6006a7ce8",q.Icon_pet_210="973dd33d-34eb-4f68-bd48-b26303a8c4bf",q.Icon_pet_211="a29086de-6b7a-4083-a210-e75fbeda4a09",q.Icon_pet_213="bae4db67-690f-4199-8c23-bf0a310d45d1",q.Icon_pet_215="65e5236e-2d4e-4c9a-85d9-686cebb4349b",q.Icon_pet_216="f476c3fe-89cd-4f71-83d2-0ecf7c910444",q.Icon_pet_217="9cd7fd61-6408-4048-a039-e4924f43200c",q.Icon_pet_218="cd0f17cf-8146-4bc3-bb26-29f4250c6f20",q.Icon_pet_219="8dc0fe4f-01ef-4334-9dc0-ebb45ba26ccf",q.Icon_pet_22="f5ebc351-9ee4-436a-8342-378e794eb29e",q.Icon_pet_220="d9a2ef1a-698c-467b-aae2-1a62a384ecaa",q.Icon_pet_221="160978c5-fc42-4bd9-8c00-a90510893cc9",q.Icon_pet_222="5ab938ec-869e-403a-80a3-e0b59621d728",q.Icon_pet_224="41a7615e-5165-4de0-9b7b-b665f49c60df",q.Icon_pet_225="6212aaae-ebac-4784-8f3c-0c232a67b316",q.Icon_pet_226="ac63d8c0-a73e-44e6-bf9d-636290b56fb0",q.Icon_pet_227="d8944eff-9933-4e1e-90f4-e015bbfa2554",q.Icon_pet_228="a99ab8d2-a922-4465-bddd-8c7e217fba12",q.Icon_pet_229="cbc6bfbb-61d3-44d9-80e6-7a033ea4019f",q.Icon_pet_23="1e8635c5-6d93-4b35-897b-f3b4393bfc62",q.Icon_pet_230="bd15ebf3-20f5-44b9-a507-b286e75cc0a3",q.Icon_pet_231="c0a594d3-8f2c-47db-a280-4b096976c700",q.Icon_pet_232="045def76-c438-46bc-bc0a-ff8dea880686",q.Icon_pet_233="7bf7a652-7929-498b-baef-b658ca256b8e",q.Icon_pet_234="9cadec5b-a111-4e33-8e1a-290e3da018d1",q.Icon_pet_235="0e030649-36d6-4dd5-a75e-32b4290f0da8",q.Icon_pet_236="eb3bfd0c-9208-4ff8-bfb5-da5e917d927d",q.Icon_pet_238="eacc45a2-11cb-4801-aace-8495b1bf8ace",q.Icon_pet_239="ce8da52c-bce3-485b-9c64-cd0e53ef6b84",q.Icon_pet_24="de365346-e268-430c-8b07-3adefcf029c7",q.Icon_pet_240="449c81bf-3a9a-4edb-aaec-443dc2d5fae8",q.Icon_pet_243="f4aad299-f785-4deb-82f4-9c3398d79f44",q.Icon_pet_244="1ad2fb11-ee53-4bed-ab50-7f5124d4c8b7",q.Icon_pet_245="583fdb3d-23be-400e-8fe9-3a1282802d76",q.Icon_pet_247="5f9e9ff7-b1d0-4de5-bffb-0f6b081fae15",q.Icon_pet_248="5d5a0b69-6c7b-49e1-a259-afa44da8bad3",q.Icon_pet_249="3290fd9d-fa96-4db0-be39-ad1f0fa295e7",q.Icon_pet_25="6bc3d8dd-14c1-4abc-9211-6515b8e26628",q.Icon_pet_250="cc7a59e6-e759-44d0-9d05-3ae3cd4f49fc",q.Icon_pet_251="b12364c3-0cd2-4b62-a94b-c529512b2ffc",q.Icon_pet_252="79ae5896-3793-4594-b5f9-41a0c9dee2a2",q.Icon_pet_253="17bb74c5-0d27-4597-a3f3-b0a15d1733ac",q.Icon_pet_254="e4c9189b-cd3b-41f4-a528-b123c3f9cadd",q.Icon_pet_255="922a7db0-a56d-4a15-950f-ce91b11a1b89",q.Icon_pet_256="f31194dd-aa7d-4137-b22c-02f3e36e8047",q.Icon_pet_257="ef2ef063-3e58-4cb6-afe1-ec825543efb8",q.Icon_pet_258="005f6690-ca54-478e-8413-82fa609e2c6d",q.Icon_pet_26="8af7a915-8b78-4fd2-b398-aefe4556826a",q.Icon_pet_261="91fcc552-a6a2-49b1-86da-6a5612740eb1",q.Icon_pet_262="ed3dfe29-bd43-4b79-9a57-c5c37fe74c87",q.Icon_pet_264="d24f4c29-b5dc-4641-8c11-105897452a41",q.Icon_pet_265="52ede517-55db-4aec-a294-fc05b2729ff5",q.Icon_pet_266="f0b9a992-140e-4ef2-8705-470f0a99a368",q.Icon_pet_267="0a26ae8e-8c8b-4f7f-bf4a-01a42c8da6e0",q.Icon_pet_268="5eab656b-6de6-4e63-9625-6658eb8cd03c",q.Icon_pet_269="54414c83-77b2-43ab-a43d-9c4cfe98e761",q.Icon_pet_27="8dcae2e1-fbea-466f-87a0-31e7fbc4abae",q.Icon_pet_270="95be3061-0efd-452a-a868-c22174180eab",q.Icon_pet_271="e3b29347-65ff-402f-87a3-eb88f63562d7",q.Icon_pet_272="0e6ce499-96de-412f-b732-87ea3262d8d9",q.Icon_pet_273="238a9aa0-e874-4d1d-a358-b76f812ca1e7",q.Icon_pet_274="78bdf9a5-03b9-4f79-b8fa-6b07b82a3c14",q.Icon_pet_275="c6fefca4-dd71-4a1b-80e3-9a3ba1d95f87",q.Icon_pet_276="7552d19f-39d5-4fa6-8a14-3e2bee20f87e",q.Icon_pet_277="79e9285d-53a2-4fa3-9081-1d55c8fb3ce9",q.Icon_pet_278="f7ed8361-ed57-43b9-a284-ac3becb76c4b",q.Icon_pet_28="0d801036-f429-4d6e-a67f-60822c38bf76",q.Icon_pet_280="7869cda3-c5c1-493d-8b23-29fd4c219591",q.Icon_pet_285="4cab4bf5-4d14-45b6-8362-9dd19485038a",q.Icon_pet_286="abb466be-5764-4d94-8fb1-4b45976b39ae",q.Icon_pet_287="3c018061-8715-4d73-83b5-3474c03c0e7a",q.Icon_pet_288="6b8531d1-16aa-4478-9051-e2f6fc107f23",q.Icon_pet_289="19ba2513-96ca-4754-b1aa-8d0e0105984b",q.Icon_pet_29="d801a040-efe1-4834-8524-4f9cabffbf13",q.Icon_pet_290="acf70736-1e76-4b3d-b772-6bde3c4776f3",q.Icon_pet_291="28c4952a-8687-4123-a844-f49ea77c38ef",q.Icon_pet_292="6e80a34c-820e-45d9-afb8-f5b0bc688c7f",q.Icon_pet_293="a1bacec3-cc9b-4062-aac4-aef3a9de5a38",q.Icon_pet_294="753d880a-c490-407e-a56a-d2cc1bfce60d",q.Icon_pet_295="4c70f7c1-d037-4061-a418-556892e0894e",q.Icon_pet_296="1cf78eb4-7655-4822-a9f5-7dd744549a72",q.Icon_pet_297="0bf4889b-34b0-4d68-807b-30618c8784f2",q.Icon_pet_298="a9fe9c9c-3eef-4637-82fe-3c6ba599e819",q.Icon_pet_299="e18e90cb-d99a-499d-8c51-23ac46c2b82a",q.Icon_pet_3="136395ac-e6e8-4fc2-bb71-c86a67af4e78",q.Icon_pet_30="7eb8ee10-6faf-41fe-8807-eb7c0cb118e2",q.Icon_pet_300="9451ce37-8073-4024-9ba9-93523316df5d",q.Icon_pet_301="d590e4b4-b716-42c4-8202-30f9fe958ffa",q.Icon_pet_302="c862ce44-3875-4216-a112-1ce3eb7b34cb",q.Icon_pet_303="730a4328-c805-4922-9bcf-1aa12072b4e9",q.Icon_pet_304="149041c1-9caf-40ad-b017-6a1adfcf082a",q.Icon_pet_305="62c443c5-3e1b-43ee-a562-bcc7d2e5eef9",q.Icon_pet_306="15022e22-40ef-4079-a2e4-0873c6cd0c61",q.Icon_pet_307="20af6d66-b6d9-4cc8-9dd3-bc5258f48eae",q.Icon_pet_308="a474471f-1b15-44c7-ab82-7b7577389f7f",q.Icon_pet_309="693b741c-5ed8-4ab6-b64f-a99c8b8b3edd",q.Icon_pet_31="b29210da-c114-484f-85ee-9ac76041f576",q.Icon_pet_310="f17479be-7249-4472-b41b-a7871cb55a38",q.Icon_pet_317="4aa7d9ad-b6bd-4ad6-80c3-d048cfd6bba6",q.Icon_pet_318="69bfe033-d1e3-41e9-9e9a-5e78e3fb85ab",q.Icon_pet_319="d8d298a6-0ddd-4fb2-aedd-fb39fdd5fd54",q.Icon_pet_32="8655234a-babc-435c-853e-2bc82ea5b426",q.Icon_pet_320="e5f28e3d-44b9-445a-9ce1-b194d37e075a",q.Icon_pet_321="b8525ffa-2634-4915-9aa2-18949ca8bb3f",q.Icon_pet_322="33e0bd71-cded-4882-8c9c-9754ca0481c0",q.Icon_pet_323="d43b134b-8188-4842-9fbf-a5be2ad21a9d",q.Icon_pet_324="4aa9306e-1594-412e-a06c-b5083e0d9ec4",q.Icon_pet_325="ee058695-0797-43b7-b0d8-9c5aea490c6b",q.Icon_pet_326="5e0aa66f-8ef5-4c60-b850-57c1aaea2d83",q.Icon_pet_33="767d389d-2e21-4cd1-ab55-650862a61f7e",q.Icon_pet_335="e5b2d1ee-54ad-44da-8592-bee1859379f3",q.Icon_pet_336="9c419ecf-0bc6-4dac-9fb1-bf5ace95f91a",q.Icon_pet_337="ecac6dfb-109d-4ac5-bcbf-949727d4fe6c",q.Icon_pet_338="86fd9af0-8d45-4984-a412-d9c4d8056ade",q.Icon_pet_339="2d3fc3af-d440-4b41-9c23-ec55b3c589f7",q.Icon_pet_34="7ace47f3-88f9-42f0-b9b1-c10a0d1c16d7",q.Icon_pet_341="56165844-cdb1-4e52-98b3-31294a9ef59f",q.Icon_pet_342="bee9ae00-3069-4077-a529-5e599901ad4e",q.Icon_pet_344="04150b83-5d0f-4b99-aa63-ec5970a4c364",q.Icon_pet_346="bcf79a1d-c21b-412f-9e89-715110ecca33",q.Icon_pet_35="56dc52b4-ae15-4934-ae0b-7b9d80e90f84",q.Icon_pet_354="a6df914e-5188-473b-affd-1d5a5f0546df",q.Icon_pet_36="bb730c4a-1905-4abd-a0fc-92929029e445",q.Icon_pet_362="d1d9fdbb-851a-4684-8c80-b456de84a9d9",q.Icon_pet_363="f33ddf07-5132-4ec3-840f-179ae983ed98",q.Icon_pet_37="0fd3c25e-70d5-42be-a3d9-2c7e2e124b47",q.Icon_pet_376="41dd8ef8-b9dc-4aaa-8c39-0529e9394e45",q.Icon_pet_377="14b21375-f272-48b0-9fa2-57a06b8948bd",q.Icon_pet_38="e98f11bb-cb58-4181-bb5e-689b055f47e5",q.Icon_pet_385="0631357e-3fe3-4b7a-9848-aa96834d5b98",q.Icon_pet_386="52b1a34b-8b90-46bf-9e4a-599ff7953aab",q.Icon_pet_387="b29900a2-095e-4435-bb03-8e859542143d",q.Icon_pet_388="43eb47c6-d595-4c3c-a1aa-95d1c13a46e4",q.Icon_pet_39="5049949d-62b8-4c51-a847-b7d6cee35e25",q.Icon_pet_4="4b64f407-477e-47e4-a43a-331976c31c1d",q.Icon_pet_40="20510f0c-9f3c-4064-94c9-32b45e0c4acf",q.Icon_pet_41="eb27277c-229a-4870-a54f-0a643981beb3",q.Icon_pet_42="2674603b-cdb6-4dbc-b5b9-36b52b8ec688",q.Icon_pet_43="256a07ef-5fb7-4780-89d3-0629304ce672",q.Icon_pet_44="00a3e682-5c8f-4e57-80fd-183cabb647d0",q.Icon_pet_45="d729c4f1-dda8-4931-9b4d-7001e40e1039",q.Icon_pet_46="171c5a0f-fe0c-46a6-b2bd-adfee77bc7a2",q.Icon_pet_47="e4377cb9-78da-4c04-b6d5-c752fd151193",q.Icon_pet_48="fce2f75f-df5f-44ea-916a-28cdb2d190f4",q.Icon_pet_49="f69d6215-0325-41a4-8951-20475a5ab663",q.Icon_pet_5="bee9e786-13f5-49fc-9f87-ea287dd1cebe",q.Icon_pet_50="ca5de630-ce98-4826-a615-9cd84b8d6713",q.Icon_pet_51="b2743af3-0385-4bbf-981b-7355a17ec413",q.Icon_pet_52="023c0c17-76a5-4819-8970-8150ecfafa67",q.Icon_pet_53="d6d7becb-6c68-4b0f-8996-66a5006674a2",q.Icon_pet_54="ee8be7a9-d7f1-49f8-ba1b-54d517309419",q.Icon_pet_55="5cd49ecb-2bd2-4e33-afc9-847ae0824c1c",q.Icon_pet_56="c623fc25-a339-4868-9a83-0a54ca3b11fd",q.Icon_pet_57="627ef6f8-ae3a-4ad0-8f08-b5708f46edce",q.Icon_pet_58="d64241df-b154-4769-b2b6-11aaaeae2d43",q.Icon_pet_59="3790705f-8f0d-4ef9-985c-d8373ebf38f3",q.Icon_pet_6="ff0264ac-c226-4a41-906c-7c471ab34626",q.Icon_pet_60="39831cab-8e13-497a-8622-642fa7b89b06",q.Icon_pet_61="15052c6a-9bbb-4b0f-a5fb-10da40993bc7",q.Icon_pet_62="7abdce2d-125e-4308-b5e6-078a05bf807d",q.Icon_pet_63="382a6ddc-e030-458a-845b-28ed632217fb",q.Icon_pet_64="c1efe18c-b370-4fbb-93bc-d5ef2150c116",q.Icon_pet_65="0a82d008-d073-4cda-b343-11750203bf29",q.Icon_pet_66="28681a85-11e3-40b6-92f6-97279248445e",q.Icon_pet_67="c14aeb8a-262d-42b8-b427-3cf5719301c0",q.Icon_pet_68="cfec73ea-0041-41e1-84eb-1e2eb0e116ff",q.Icon_pet_69="fd54b60e-e748-4c43-b838-9e6b5a5f5998",q.Icon_pet_7="17ef1360-064a-49d5-a900-f0e1ac2b9e6a",q.Icon_pet_70="260787f1-7d79-41a8-9a64-a94fbdf915ba",q.Icon_pet_71="858d4414-0eb0-42df-bcae-9133df1a28fb",q.Icon_pet_72="1feab39e-1f3d-450f-ba45-7e5ee80b439c",q.Icon_pet_73="14f34a3f-e2df-4fd3-909e-c42e7dc15efa",q.Icon_pet_74="35036827-1d54-4436-908d-8a895e3b846b",q.Icon_pet_75="830e1cb0-f186-487e-b8d8-9d4aabd717bd",q.Icon_pet_76="dd175def-4b40-49f4-895f-074810edddde",q.Icon_pet_77="81ab6e61-2caa-4960-8df8-4ffd923cd6d1",q.Icon_pet_78="0e280f1d-f336-43d0-8dfc-b08adcbe298b",q.Icon_pet_79="5de29130-ab78-435f-8386-f0ca03ffd633",q.Icon_pet_8="0de9a823-1f4f-4b33-9ea2-e86653550033",q.Icon_pet_80="e6ee9a05-0acb-4f6f-a8fc-138675ef3173",q.Icon_pet_81="b91145af-b859-4143-bff7-25af01224c8c",q.Icon_pet_82="24a93254-1b69-4c0a-8ea9-184e73fea27f",q.Icon_pet_83="7ec4ebfa-0dd0-4f1c-a597-a39e37d61818",q.Icon_pet_84="c0f4c22e-de7c-4143-aac1-d7e34ac53537",q.Icon_pet_85="83bb2c89-6abd-418a-b9cf-5a8e99380bff",q.Icon_pet_86="8545603c-6323-41a3-ac40-239811ce4ba4",q.Icon_pet_87="8365782e-e854-4d77-ae03-a46cb14fa24c",q.Icon_pet_88="ac845260-34db-4d17-bea6-89093ae6b425",q.Icon_pet_89="d2101bb2-7778-4d1b-a5a5-d2790ddd2a57",q.Icon_pet_9="93386d4d-18b5-4c6b-b8cf-954794cb1f33",q.Icon_pet_90="ee454e4b-4df3-4eb7-8a7e-602900460196",q.Icon_pet_91="47d3016e-a1b5-4a64-a359-d0e87e28b83c",q.Icon_pet_92="791ac06e-beb0-4ff4-98e8-c34e5988862a",q.Icon_pet_93="196658bc-f5b6-4d61-b7f6-447346e35825",q.Icon_pet_94="964c71d1-2123-4f41-82fc-b80256c15dec",q.Icon_pet_95="d85eab5d-0ee2-4462-b0ba-595c4222d31c",q.Icon_pet_96="9103b2ba-a9b1-49fb-a930-26a7146d646f",q.Icon_pet_97="478fce77-ab3b-4136-a2d9-69e9e4a539c6",q.Icon_pet_98="48e8753e-9c12-45e5-bff1-3511b814cc61",q.Icon_pet_99="b160be6b-69f8-44dc-ac75-45f09e050e97",q.Icon_petbook="ca22ad66-a188-4ccc-ad4f-97246ba1198f",q.Icon_petevolution_indicator_arrows="75e13af6-4197-4e28-a97b-796dc52248ef",q.Icon_playbutton_default="b1372680-b831-4362-b110-36d2d5d78bf7",q.Icon_playbutton_hover="0ad145b7-0b3c-45b1-a038-c0d58199bbd0",q.Icon_plus_bonus_reward="84e9759f-d023-453c-a59c-c39b6fa484fe",q.Icon_plus_teal="13df7598-587e-4da4-8615-fec2403e6046",q.Icon_prodigy_points="df496067-fbfa-4688-98db-7063119aa2f5",q.Icon_prodigy_points_mini="9d568b0c-e62d-49b5-81a8-da177b3694a5",q.Icon_relic_1="5d15829e-771e-4e47-8701-c46a25a118d0",q.Icon_relic_10="b671f9b0-2838-4fd6-a501-6b9949b9d6d3",q.Icon_relic_11="ec4af452-4e98-47c7-817e-edff539a4b0c",q.Icon_relic_12="6e1b22eb-8b7d-4a79-9b40-b8506db62cc9",q.Icon_relic_13="42c1b3cb-7126-473a-8ada-66a2cfc881cd",q.Icon_relic_14="3029e7f4-8635-4855-88e4-c51cca0c0dda",q.Icon_relic_15="6dcfc0af-60c5-4ff4-b5d4-671c63c922f3",q.Icon_relic_16="1990291a-2d26-40d1-a0bb-b545d0541369",q.Icon_relic_17="aab38410-4959-4c4d-9f90-9ca215540393",q.Icon_relic_18="8c98ac0b-7498-4ca2-8a19-99f0b447ad16",q.Icon_relic_19="4bfe853c-7155-46a6-9b26-74cb85f95cdd",q.Icon_relic_2="87a32d98-1f7e-43af-88dc-bb19fdff9eaf",q.Icon_relic_20="9122670a-d415-4582-9d28-8a049062067e",q.Icon_relic_21="7a0dec3b-3f62-4e04-b0d4-e71b03edb296",q.Icon_relic_22="463e7ded-4742-4be5-8765-42d53da9dbc9",q.Icon_relic_23="b5d96e9e-ca88-474a-9daa-b6def00deb25",q.Icon_relic_24="9c3bbbb9-e19d-42a0-b1e8-035e974b082a",q.Icon_relic_25="0c2966b5-2aa8-41a1-9579-ab20e37004d6",q.Icon_relic_26="bf3feeb9-dd65-44ba-b25c-f80792b1794f",q.Icon_relic_27="31cb6d80-eed4-4dce-8a4f-11798ba8ac1f",q.Icon_relic_28="eca26b49-978a-4286-8251-dceda83d2a56",q.Icon_relic_29="bfa96adb-aa5c-4da3-be06-e59c754e7756",q.Icon_relic_3="6e5d7f7a-c3d9-4fbf-b051-f8be53dc3195",q.Icon_relic_30="79a7fdb9-ebf4-4149-9904-6155d5385f92",q.Icon_relic_31="d13a7e38-4d63-4a11-a9b4-c387000bfad8",q.Icon_relic_32="3f1e5d9f-43bf-41e0-948b-8bee96cfa260",q.Icon_relic_33="85fd49c8-e334-4dee-88dd-c87a1e755a20",q.Icon_relic_34="b26c2dde-3103-4aa0-b524-2f50ee703685",q.Icon_relic_4="98768dc1-8805-4914-ae39-0e176741a3e9",q.Icon_relic_5="174a9cd0-a127-4cdd-ac8d-31d0fd2446b2",q.Icon_relic_6="a21c273f-7927-45d9-a6f4-3f524c327b96",q.Icon_relic_7="b9f2988c-6d30-46d5-aa45-ed5f5075621b",q.Icon_relic_8="c40a2aec-7b5e-48e2-af31-1042320cce16",q.Icon_relic_9="6e7adb03-7a7c-4fd2-81f6-487916425630",q.Icon_reward_gold_1="993d5bed-f0c9-4410-b08f-daaf92e63a05",q.Icon_reward_gold_2="6e8ace8d-054c-4e00-96a8-7c6982b5e0cd",q.Icon_reward_gold_3="19d4ff6e-90d9-44ee-85fb-5b320fc1dabb",q.Icon_reward_gold_4="f932c0df-14af-4473-8db9-d0dbc847b8dc",q.Icon_rift_difficulty_easy="5ae88fcf-337a-46a2-838a-671998965300",q.Icon_rift_difficulty_hard="afce3001-db80-4211-9660-069a24052fd1",q.Icon_rift_difficulty_normal="bfed4ff9-5347-440b-a0c0-91e0430260ae",q.Icon_spellRelic_1="a0a954b6-4858-4310-8ccc-046480c3e947",q.Icon_spellRelic_10="9b42653a-1063-46ad-8f42-a9dc083f16a5",q.Icon_spellRelic_100="b98ce930-e980-4197-a24b-ea783839c63c",q.Icon_spellRelic_101="89d9a4fd-ee5b-4d65-8abe-78bf1fdc968a",q.Icon_spellRelic_102="75979a30-fee2-4f5c-a1ed-72a17401aa2e",q.Icon_spellRelic_106="b51034cc-cdd9-483d-817e-52551070555f",q.Icon_spellRelic_107="8a70e135-545c-4317-b281-4c0e50f77915",q.Icon_spellRelic_108="909a4ed4-5b47-4bcd-9bef-b6ef56b82071",q.Icon_spellRelic_109="4093e152-feb8-47b0-91aa-ed27b8e1098f",q.Icon_spellRelic_11="700295f8-6727-4978-85a9-a76a1f5ca583",q.Icon_spellRelic_110="a3368198-69be-4319-8eec-4d931d10e8ca",q.Icon_spellRelic_111="e133bdf3-867a-4b43-ba28-e22830eeb9ac",q.Icon_spellRelic_112="a46b0338-82e9-4c54-bdb9-897a106dbbcc",q.Icon_spellRelic_113="f28888c6-bfb0-4ffa-aa5a-5f37a9a13251",q.Icon_spellRelic_114="c7d2a61c-fe6c-4957-b219-fe8d6f493ca6",q.Icon_spellRelic_115="dd0b574d-c5f1-4f93-b9c8-27084ab4ec48",q.Icon_spellRelic_116="fffd79a1-8551-4556-90da-57333420b8e4",q.Icon_spellRelic_117="9f0e732f-daa6-404c-8a99-2e0b3fe39de3",q.Icon_spellRelic_118="9268c53f-06da-4d3c-9ab6-a4c63ebafaec",q.Icon_spellRelic_12="8f3c8ab6-c77a-4843-965a-1a6200d4223f",q.Icon_spellRelic_13="fa15885b-d97b-4afe-b924-9d9ee1f90dcc",q.Icon_spellRelic_14="63b7746a-9c69-4624-a410-2938b180944a",q.Icon_spellRelic_15="7455d8f1-9af5-4c63-9eb0-43102634dccc",q.Icon_spellRelic_16="bf6811f1-0c80-40db-8d2d-2be4272553b3",q.Icon_spellRelic_17="2d28c675-f5d8-403e-9191-f629933bf13b",q.Icon_spellRelic_18="e94ef064-a0fa-4528-bba5-ead5b120de0b",q.Icon_spellRelic_19="8774d904-5ed6-4cc0-a02b-a8803d450fb0",q.Icon_spellRelic_2="bb7e9989-5b4d-4c83-842d-03a15c1ebfd9",q.Icon_spellRelic_20="43dbb5f6-3915-4985-8fd2-8867c8dc0ade",q.Icon_spellRelic_21="8e75d907-c550-4266-8afc-5a31b33e8c8c",q.Icon_spellRelic_22="24c187c5-16ce-4324-a2a1-06ca7b6b7802",q.Icon_spellRelic_3="f1c31937-fdb7-4bcc-a7d5-c28949af6c42",q.Icon_spellRelic_30="e875a70d-7a93-4e30-bbbe-15f4844ef0f8",q.Icon_spellRelic_31="4a592caf-a0f5-4429-b86c-ece79b77689d",q.Icon_spellRelic_32="e5a84d53-1364-4dbd-bfc0-822a85108e6d",q.Icon_spellRelic_33="76373d2d-01ca-49a8-b34d-34d0ba9f34cd",q.Icon_spellRelic_34="1df7de6f-e7cd-43be-ac17-1255e8d13d74",q.Icon_spellRelic_35="7ac46f51-86b6-4727-bf36-fb2caf221ed7",q.Icon_spellRelic_36="f491441f-f48c-46ea-b031-55c7302c6157",q.Icon_spellRelic_37="a947cd4f-dd20-4cbe-925f-10dd39afc4c5",q.Icon_spellRelic_38="161ffc6a-ee27-45d7-bd37-76968eea8d94",q.Icon_spellRelic_39="aa78231f-671b-4ecd-b2da-f14a8a6d25bf",q.Icon_spellRelic_4="9a518476-9fd9-4ffc-8fb7-332794a83300",q.Icon_spellRelic_40="6b4f3f5f-82e3-4981-b1f7-81657fa7ebcc",q.Icon_spellRelic_41="8030d33e-bb39-4343-b9a9-a54c75699376",q.Icon_spellRelic_42="caf79519-c723-466d-b1b8-f630b7f46deb",q.Icon_spellRelic_43="6f0681ef-346c-4273-b9a4-13e56ea365cd",q.Icon_spellRelic_44="8a929109-4547-421e-8474-6896c955773e",q.Icon_spellRelic_45="78298265-218b-49c3-8467-cb1a22ce4116",q.Icon_spellRelic_46="8a40d35e-7cf5-4bed-bdeb-ef840c652df1",q.Icon_spellRelic_48="cacf0608-2dbc-4f2d-b684-1737488f0d14",q.Icon_spellRelic_49="f21cb5de-889f-4960-946a-2654c8516446",q.Icon_spellRelic_5="69f48725-5743-4a01-9289-0a517c383e08",q.Icon_spellRelic_50="74760a95-b13d-4476-bf53-27a1424c6146",q.Icon_spellRelic_51="c92b55b8-1485-41b5-a37d-58e1b2f4e8fb",q.Icon_spellRelic_52="18196be6-7258-4834-bdc8-1d8f77402e5c",q.Icon_spellRelic_53="3aab00cb-1f5d-4135-8faa-2f1e627f9b9d",q.Icon_spellRelic_54="33c8691e-5cbd-4d09-b037-74f793f08216",q.Icon_spellRelic_55="751399b9-d090-4e21-9777-5f666dfec514",q.Icon_spellRelic_56="84a53238-975a-48c1-ae1c-96d61830128e",q.Icon_spellRelic_57="ea29d93e-e9bc-43b2-a40b-743663bc574e",q.Icon_spellRelic_58="fe393076-02b3-4bde-9317-33ccac1f8cf6",q.Icon_spellRelic_59="c7c6ea4f-6bc5-4bd4-bdd7-992fe9a71e27",q.Icon_spellRelic_6="6032f62c-a4b0-4c75-8072-7acca8ca2ffb",q.Icon_spellRelic_60="7cfa68a9-2e73-4864-8ff9-509b0ea7b44d",q.Icon_spellRelic_61="377e8a82-2f24-4e1b-9094-e26cd692c183",q.Icon_spellRelic_62="81345eaf-dbd8-41cc-8e75-9b21762348aa",q.Icon_spellRelic_63="c05e6cbf-0899-4e56-b8ea-9a0d93c0c808",q.Icon_spellRelic_64="02f11eda-4120-44b2-81a0-75260229809a",q.Icon_spellRelic_65="ac1a1952-bd68-477e-befb-b672d5ba165a",q.Icon_spellRelic_66="a46f92f7-24e0-4b51-874a-98081a52e781",q.Icon_spellRelic_67="3d937d73-a4da-4d7f-bd48-3b091b964cf8",q.Icon_spellRelic_68="bbbeddcf-e094-4802-bed6-0a61a4b29ebe",q.Icon_spellRelic_69="e3527ca7-a578-410b-ad61-a9272cba01c8",q.Icon_spellRelic_7="21453b90-fc16-4b78-86a4-6399a0f287a1",q.Icon_spellRelic_70="d9ca5ed5-3f8e-4c16-a732-295f348a1cf0",q.Icon_spellRelic_71="09a6c1c3-bacb-415b-9c6e-0b97a03fb09c",q.Icon_spellRelic_72="82fde356-ede1-4053-9bf6-09cef927f1d4",q.Icon_spellRelic_73="249291c2-0228-496e-86e2-0867d57287c6",q.Icon_spellRelic_74="dd0de0b9-c087-49ea-8abe-67b1e05d401f",q.Icon_spellRelic_75="f2d2114f-d703-4971-a35c-071fbe954f8f",q.Icon_spellRelic_76="19bbc32e-449d-4431-bc8f-232663c6728e",q.Icon_spellRelic_77="61d413ea-da9a-4a97-b0ac-de7e2c4dbb1e",q.Icon_spellRelic_78="081c88e5-4b47-43c0-b876-21c21d647d0c",q.Icon_spellRelic_79="0a001fe4-913e-4c81-9080-8a1b28c55ce3",q.Icon_spellRelic_8="f12852e2-bcbe-498f-b85e-90f8ffe53803",q.Icon_spellRelic_80="e9706d6d-ce32-4c2d-9229-29b0fe99c138",q.Icon_spellRelic_81="7fb0b91b-2769-46eb-b954-7cd25a924a7e",q.Icon_spellRelic_82="2a91ebeb-9a7d-4cac-b742-9a65056a6c25",q.Icon_spellRelic_83="023ec071-2abf-4c41-9c87-012bd5f50244",q.Icon_spellRelic_84="cef02f17-579e-4043-b398-7e592bbc72c6",q.Icon_spellRelic_85="c12e0384-20e0-4938-9474-822177fc1605",q.Icon_spellRelic_86="ca198060-9e77-419b-8f13-e9c5340858ff",q.Icon_spellRelic_87="8b70576f-ed9c-4b64-8b79-bd7573b24fd8",q.Icon_spellRelic_88="b9276e72-13e8-4f7f-b2ab-06aed6dbfd9c",q.Icon_spellRelic_89="9fdb558c-76dc-4261-b099-77d958133266",q.Icon_spellRelic_9="9f81998c-060b-479d-b6f5-944b7aee7b4f",q.Icon_spellRelic_90="499e06a9-cbb5-4d74-ae96-0c9250a0dccd",q.Icon_spellRelic_91="5be1874e-7bf4-4353-bb20-d936d93d3363",q.Icon_spellRelic_92="e6b4c10e-ae56-4694-8c49-db4fe7b95fb8",q.Icon_spellRelic_93="691cf97f-7438-4eed-a16e-6881349528b4",q.Icon_spellRelic_94="9e7a6563-bb21-4598-acce-c1d03d1016e2",q.Icon_spellRelic_95="99d14153-a213-4656-a46a-e983d0c89272",q.Icon_spellRelic_96="4f5c110b-af36-453e-b0c5-29caea429712",q.Icon_spellRelic_97="248ec55d-5ad4-4703-9b35-4372b8aa7be4",q.Icon_spellRelic_98="4187befc-025b-464c-9af6-3620f69d2c32",q.Icon_spellRelic_99="254d02ad-f71b-4049-a66d-5d0077fe2478",q.Icon_storeTab_1="4d8e895b-e783-4c64-9b9a-82216bdad1b0",q.Icon_storeTab_10="a9d6bd78-1370-4023-8d9d-a9df10388c10",q.Icon_storeTab_100="c5c165db-28d2-4d54-aeca-6f92d5421fe4",q.Icon_storeTab_101="8f66a5be-0a2f-46bd-9b0b-0a213365e3b2",q.Icon_storeTab_102="6c669496-f9c1-42ec-ae43-9676184a9a24",q.Icon_storeTab_11="ec5942cf-2a12-45a9-ba69-59903e3cdd83",q.Icon_storeTab_110="ecc86e84-5173-4df9-a95d-e2d8118a2cbc",q.Icon_storeTab_111="645f1293-f0b9-47e7-b09c-af3a34253a36",q.Icon_storeTab_112="c73a8164-a161-4ff2-bf39-14e7ac65d75f",q.Icon_storeTab_113="99ac5c67-e442-4d95-a21a-0175e141c100",q.Icon_storeTab_114="d2c6dcf0-aafc-46c0-96ae-60e49db9ba73",q.Icon_storeTab_115="1b00d209-e0b2-4cbc-bef4-a07dff7838ce",q.Icon_storeTab_12="9d95ac1d-3570-4a75-8107-8ffb246ff8d5",q.Icon_storeTab_13="011ea7e2-a883-4c9e-a3f6-ebe091967366",q.Icon_storeTab_14="7e659d44-3a22-4278-a7a0-02cc57f88e84",q.Icon_storeTab_15="17967c14-fbcd-47c7-85cc-f0648a3961ad",q.Icon_storeTab_16="204242a5-f1f1-4d3b-aaa7-057f0041e67f",q.Icon_storeTab_17="646d2a46-81fa-4955-a01d-5b04c2e54c27";q.Icon_storeTab_18="a2f44e3e-3fb8-430b-9cce-3c477920850b",q.Icon_storeTab_19="dafa927e-9bd0-4b5a-bd7a-3f74a422704d",q.Icon_storeTab_2="7d68eda5-6943-4823-a0f8-78d01d004388",q.Icon_storeTab_20="e5d9f6b2-6970-4352-956a-327ffa73954a",q.Icon_storeTab_21="cb78d6c8-ea2b-4c2d-9952-c6f8043b016f",q.Icon_storeTab_22="de45f882-d3d3-48b3-8fcb-b836bea17d02",q.Icon_storeTab_23="12ffdb6e-7db7-43b6-880f-6954242adfbe",q.Icon_storeTab_24="57a4dc2d-5de7-4e2c-8179-85d6e2930775",q.Icon_storeTab_25="981575fa-2860-4509-a67b-a58aaf6eb3e4",q.Icon_storeTab_26="2752d131-ddbe-4872-a4c3-fef647675137",q.Icon_storeTab_27="47be8cf2-4fa5-4188-829f-d283beca9a40",q.Icon_storeTab_28="6e55e86d-7179-4920-bf15-1f951b70b221",q.Icon_storeTab_29="6a0e7ede-6af0-43a6-b60f-167cfc385189",q.Icon_storeTab_3="70b70a19-1c65-492f-99df-9ebc2de1bbc0",q.Icon_storeTab_30="99b5ef05-6c8d-462a-922c-13a0b0437d52",q.Icon_storeTab_31="b48e029c-5629-4839-9082-7145c7746fb8",q.Icon_storeTab_32="9c6d3695-0af0-4c5b-924b-321dd9260796",q.Icon_storeTab_33="b89f3729-de04-49c0-8535-1b2cdc16ae54",q.Icon_storeTab_34="ade6f637-b7ae-4a1d-97fa-6c9b6a08c0a8",q.Icon_storeTab_35="a891f05f-7ffa-4593-aa4f-9fba7de3eeae",q.Icon_storeTab_36="1ab1146b-6165-4611-a405-837e7ced833e",q.Icon_storeTab_37="297c52c4-5db3-445d-bc5d-116285fafa44",q.Icon_storeTab_38="b97f0df1-77e9-4034-be8c-ea826d5c4cec",q.Icon_storeTab_39="42f7d2bb-2d7e-4b5e-8cc8-61f54558ce12",q.Icon_storeTab_4="4eae6dd5-0eb8-45f3-bb92-6338b690b594",q.Icon_storeTab_40="b4b492ec-3dcd-4b4b-b3ac-4a5e2a1f44b2",q.Icon_storeTab_41="05a54efe-04b2-49ee-aa78-be8f3371c982",q.Icon_storeTab_42="f4141bae-6f30-4d89-8b81-253cc1fce9af",q.Icon_storeTab_43="48676cd9-f2d4-47b6-9a5f-4e146a662308",q.Icon_storeTab_44="ec5c76d8-01dd-4d66-92d9-51266f2fa44c",q.Icon_storeTab_45="f6dbf0b8-0b24-4aa0-a54b-0b336e004d16",q.Icon_storeTab_46="a1603a3c-0bc0-4c63-9ec4-6bcbba64fa45",q.Icon_storeTab_47="9a1babca-7b9f-4341-bf27-3f00bcdfe561",q.Icon_storeTab_48="ebfb9688-2259-4aea-a566-713b869dc1db",q.Icon_storeTab_49="657f1248-8c0e-41fd-9be8-3fbca24f1b58",q.Icon_storeTab_5="4407be08-5408-4702-8da2-423254850b8c",q.Icon_storeTab_50="621712cf-f525-4969-925c-c2ce7d7fcac8",q.Icon_storeTab_51="b226af1a-9947-411f-8b87-b6803ad22faa",q.Icon_storeTab_52="81f06512-b845-4dfa-ab04-5a7fc2e66447",q.Icon_storeTab_53="06c8f1f4-fdd7-441d-8bed-0ffbd2fc2536",q.Icon_storeTab_54="ef4a2b28-a03a-4a6d-af65-657c4a8c5324",q.Icon_storeTab_55="309877a3-6008-4476-81e3-35973289c05b",q.Icon_storeTab_56="27732539-2183-4cca-bfe0-2b814218e8f9",q.Icon_storeTab_57="e4fba5cb-f5f4-4a55-bd3f-3d7e7b6897a2",q.Icon_storeTab_58="8718936e-8f78-438c-b9a1-146209a9f786",q.Icon_storeTab_59="773ee63c-38aa-4d1b-bd94-c821235c70e1",q.Icon_storeTab_6="761a043a-a855-4be0-a8fe-7a5f0f363ef4",q.Icon_storeTab_60="0e1fb603-edd4-4af1-b406-c720942aaa89",q.Icon_storeTab_61="6cda439c-7d12-48cc-a419-6b5a9767735c",q.Icon_storeTab_62="3a41fbe2-4aca-474d-a9aa-a4ab51559349",q.Icon_storeTab_63="1b331a95-eb65-4842-90b7-f58b3528e2b8",q.Icon_storeTab_64="d92e249d-c26a-440d-8327-92a0aa19e5ea",q.Icon_storeTab_65="4f3718c1-b84c-437e-9603-89b2d781b16c",q.Icon_storeTab_66="559471c6-36fb-42cc-8b94-8c2d837e93e8",q.Icon_storeTab_67="235070cd-fedf-435f-b455-6abadf3aa2aa",q.Icon_storeTab_68="5d01dcae-8940-4f76-b8f1-5bc7bfeae14b",q.Icon_storeTab_69="0bc6561a-5e97-4265-94b8-ef1dd7d91cc7",q.Icon_storeTab_7="820c6107-ff7a-4086-bca7-5f9a3df09ff8",q.Icon_storeTab_70="55d307d5-9f3b-404d-8dd5-e22ad61d6687",q.Icon_storeTab_71="4d20d785-01bf-480f-aaa3-e837b3101ba5",q.Icon_storeTab_72="38c6b43a-f097-444d-91ce-02589c9f3275",q.Icon_storeTab_73="08fbeca0-e2ca-4240-b4b4-73ab9ea0fe99",q.Icon_storeTab_74="307c6cd5-ff22-45cc-86e2-3b4cf5cd23df",q.Icon_storeTab_75="27fc4ee5-e7af-4449-a8b7-73e86bc8ca1d",q.Icon_storeTab_76="fc90ab2c-77df-45a3-83dd-b2860de4a371",q.Icon_storeTab_77="afd3b212-bca1-4fa5-ad4e-cb60391214a4",q.Icon_storeTab_78="0bfa19f0-3975-44f7-9806-dbc3b0e76ec9",q.Icon_storeTab_79="b83700d7-552b-4755-bdb2-3c5afc68cfa6",q.Icon_storeTab_8="c84b992b-b2a3-493f-91ba-3af7dcb43712",q.Icon_storeTab_80="e998d7d5-70e7-40ca-9572-76fbe71d0d7f",q.Icon_storeTab_81="11a1815e-f0c3-43bf-a5bf-f76011d42b2f",q.Icon_storeTab_82="04d44ee2-3a49-4611-87c5-d9b672b91678",q.Icon_storeTab_83="acbf2cea-a0eb-4264-99dc-db6471e90160",q.Icon_storeTab_84="03399a52-b97c-4c71-adee-18fe0cd71d67",q.Icon_storeTab_85="5d4183a2-de15-42a3-be3d-8bfc668d7e3a",q.Icon_storeTab_86="d965a854-4e38-4e2f-b399-052e48c12417",q.Icon_storeTab_87="314fa89a-ebc5-499e-9488-d5295a50d162",q.Icon_storeTab_88="8a1ece84-d79d-4a7b-8510-6b3445945af1",q.Icon_storeTab_9="dde6a5a9-aa04-473c-bcd3-93a164e5ff67",q.Icon_storeTab_95="8996c6cf-2263-4304-ba25-7251ace7d254",q.Icon_storeTab_96="08a32903-a4ea-4492-9c6b-e2aaaa2125e1",q.Icon_storeTab_97="8f429176-597e-4c5e-b7c8-6de81c1fdc81",q.Icon_storeTab_98="0d9a9b11-35cb-4b46-a2c9-e1a4533d3fd9",q.Icon_storeTab_99="e02882fe-dc5b-4f0a-b768-7e83dd6dd543",q.Icon_store_astral="9f2a8cbb-6a9a-4378-abc0-19831d79f088",q.Icon_store_boots="d7eaa268-b518-45ba-92dc-a90df71f5be8",q.Icon_store_buddies="d436cf52-5f5c-4f5d-8c79-b87e211346a3",q.Icon_store_bunny="ac0b971d-f398-4e1b-86a5-f434808868a5",q.Icon_store_clover="dd8f59ea-7a41-4651-8c6a-7ed49ae2374b",q.Icon_store_fireworks="e2089834-9c34-4350-bda2-48d85137a9aa",q.Icon_store_for_you="815d8c11-60cd-485b-a975-0fbd5e544d3d",q.Icon_store_fox="01476af6-3e52-4c53-8d29-3cf900a87b51",q.Icon_store_furniture="5879ae6e-07dc-424f-a6ee-bfbb2671d4f5",q.Icon_store_hair="41ec55c6-dcaa-4c0a-9dfa-01e06cbc67f7",q.Icon_store_hair_colour="0b030a1d-a52c-48ff-b5f3-b5fdbb7da1dd",q.Icon_store_hats="481698cf-87e8-46cf-9265-cd90cbf802f9",q.Icon_store_jester_hat="270d5643-2b5d-4563-9a1a-070def8a2ca5",q.Icon_store_lost_pets="b87ff195-b509-4be5-9572-897dd7353241",q.Icon_store_magicoin="d65f8aa3-2f5a-4414-96d0-1d48d06b537f",q.Icon_store_membership="269c40d7-038e-4f60-b7a6-675234be2d05",q.Icon_store_mounts="325b0adc-2789-406b-bbee-9c313e69d265",q.Icon_store_mythics="a1339101-2e39-44d0-a5ff-9a2650c8ca73",q.Icon_store_outfits="f6038462-221f-4b8c-9d07-79d6a1504570",q.Icon_store_pet_deals="4383caf4-327e-45d3-b347-eef47b194267",q.Icon_store_pet_hats="2fbc59cb-4283-48e9-a797-2dc92472b42c",q.Icon_store_pet_relics="ea2ebc88-cf94-4c6d-96cb-2e4548e98132",q.Icon_store_region_bonfire="d06eefec-28dc-4b2b-8e0a-04358fc60ebc",q.Icon_store_region_firefly="3b395fcd-860a-4f7f-a2de-f1ccaa083ed1",q.Icon_store_region_shipwreck="84e01325-4dac-4749-bcfc-4e76d4071b9e",q.Icon_store_region_shiverchill="8d533b3e-49ce-4d93-a0e5-d9efaf47d48f",q.Icon_store_region_skywatch="d25a41d9-826c-49f2-ac38-4d740bcb268b",q.Icon_store_relics="12aefbd7-4223-4b96-9f9b-5646beb493ba",q.Icon_store_shadow="9376badc-2432-40ad-a146-c0cc3eae7919",q.Icon_store_special_offer="96c72097-94f8-4e48-9053-ca647dcf08c4",q.Icon_store_starter_pack="9aab6bba-7102-4964-960c-9690e8d75ac2",q.Icon_store_wands="23dfc3bc-421a-4a72-9c2a-e6c6875afdc2",q.Icon_store_wizard_gear="b4c36fba-0122-4884-ba09-e45d114db2a7",q.Icon_summerfest="eb43f74d-6a51-406f-a67a-d152d6f9e23c",q.Icon_tab_member_selected="e24c89a7-3bdc-429b-8f34-e420f9aee5b3",q.Icon_trophy_1st="e5f36540-54c0-470d-9743-54bdcadab2be",q.Icon_trophy_1st_mini="f09643c7-78bf-4c97-a78e-2683a554c025",q.Icon_trophy_2nd="413da68d-90f1-48e5-a560-bdbc6c4ddee9",q.Icon_trophy_2nd_mini="ebe82f86-9299-4c01-a09b-6ce546eec8e1",q.Icon_trophy_3rd="96d99d39-bd06-45da-ad41-a72dd5c6c26e",q.Icon_trophy_3rd_mini="b23555ff-492d-4f60-95cd-e70c442bb75c",q.Icon_ultimatesQuestItem_1="9aada09b-1ca4-4610-a474-8d518abe280d",q.Icon_ultimatesQuestItem_10="1f15d500-e9e4-45a2-b694-fa8e4f2eda9f",q.Icon_ultimatesQuestItem_11="af877da5-21cc-44ff-857a-726307fea1cc",q.Icon_ultimatesQuestItem_12="4c4fa211-e802-4a01-b03c-06983069cc43",q.Icon_ultimatesQuestItem_13="7b5f11ca-7413-4993-a34c-d44b8b9663e9",q.Icon_ultimatesQuestItem_14="d4c2bb63-9f55-4664-8afa-67d5e0d4bc72",q.Icon_ultimatesQuestItem_15="190eb85c-68e4-4274-8d43-5f090404e2f3",q.Icon_ultimatesQuestItem_16="13e69e03-6cac-4414-8beb-91de1efa262d",q.Icon_ultimatesQuestItem_17="314ad0d9-ae24-46a9-9570-e20c1088dc73",q.Icon_ultimatesQuestItem_18="e15310a1-78e5-4879-9c4d-88e533f4cbfe",q.Icon_ultimatesQuestItem_19="9a830507-5883-4d2c-84e2-f149558ce7d4",q.Icon_ultimatesQuestItem_2="6c1b68aa-d634-4e7d-8294-a2b4a272565d",q.Icon_ultimatesQuestItem_20="aa7a8670-1664-42d6-a007-bbf5b0468605",q.Icon_ultimatesQuestItem_21="1be5c48e-0bd0-4535-92ca-dc7ab7239d5d",q.Icon_ultimatesQuestItem_22="58c45141-2b7d-4d2d-8047-63b5c6db4db7",q.Icon_ultimatesQuestItem_23="c7006d02-8cef-4a16-bbd5-272cfdc0afa3",q.Icon_ultimatesQuestItem_24="93c317b9-cc27-49bd-9696-04b1ec21bbfa",q.Icon_ultimatesQuestItem_25="73136a31-ac38-4343-b349-e0b2ee32a224",q.Icon_ultimatesQuestItem_26="a6d9ba3c-5a43-4aff-9985-1cdd70d2f4ee",q.Icon_ultimatesQuestItem_27="32a6c61b-73b7-419e-9087-cb72bd04a6f8",q.Icon_ultimatesQuestItem_28="be3251f5-20ab-471b-b526-9735a74b1702",q.Icon_ultimatesQuestItem_29="98509963-18a6-4151-aa5d-77dea059324a",q.Icon_ultimatesQuestItem_3="f8ad8f7a-79d1-41a7-9515-777e71e1ed89",q.Icon_ultimatesQuestItem_30="911a0c98-8b40-49b7-b2a1-596c1fb72e30",q.Icon_ultimatesQuestItem_31="8940fb16-6dc1-4204-8fbb-a584780c7d9a",q.Icon_ultimatesQuestItem_32="341aed9a-4848-4641-ae73-5f9bdce7a209",q.Icon_ultimatesQuestItem_33="bb083ab5-0c2f-4a25-ba4f-385f9392ada5",q.Icon_ultimatesQuestItem_34="87fe18c1-0e6b-49d8-9562-2638e15b4b54",q.Icon_ultimatesQuestItem_35="031a422f-6f3d-4e6b-9cac-1f09cb39b2fb",q.Icon_ultimatesQuestItem_36="eca660bb-74e5-49cc-9e17-ac5a7e58b234",q.Icon_ultimatesQuestItem_37="57fb23a8-2235-4ae4-8d49-3700cb918875",q.Icon_ultimatesQuestItem_38="56f02a2a-bf52-423c-bb39-b8385da5a879",q.Icon_ultimatesQuestItem_39="146badfa-32cd-428c-ada7-1a5f899c3282",q.Icon_ultimatesQuestItem_4="4798eb5f-21bd-4405-89d6-5d21eddf7c9d",q.Icon_ultimatesQuestItem_40="960135be-b476-4958-8ff5-44fab5446c18",q.Icon_ultimatesQuestItem_41="683abfce-9c16-4634-81e4-638444a7f93a",q.Icon_ultimatesQuestItem_42="f9551326-fa38-4b55-9613-5e5b441426cb",q.Icon_ultimatesQuestItem_43="eb4ece7a-a6e4-4469-a0ae-348098a1ef83",q.Icon_ultimatesQuestItem_44="6b48616c-6879-4ebe-a9f4-96d1033399c7",q.Icon_ultimatesQuestItem_45="e5739a7b-d6d9-4f18-8c9e-148720ee4e98",q.Icon_ultimatesQuestItem_46="f792a942-9e10-4e45-93df-030873509c56",q.Icon_ultimatesQuestItem_47="51e7dd12-6df7-4086-a59e-a7bb9b3ed65f",q.Icon_ultimatesQuestItem_48="093aa9ab-c94e-415e-8e00-deac494af7cb",q.Icon_ultimatesQuestItem_49="977fd3c2-7bc9-4d1c-b9a6-b6b828807596",q.Icon_ultimatesQuestItem_5="c7c336f3-56e0-4691-9b3e-5620b848a56d",q.Icon_ultimatesQuestItem_50="13ed04e7-f35b-473f-9cb9-b80dbbfcef3c",q.Icon_ultimatesQuestItem_51="4b55dff2-f30a-47ee-ad66-dc0e847cb5a8",q.Icon_ultimatesQuestItem_52="2b3ccfda-1aca-40d9-afac-08b5bea1e240",q.Icon_ultimatesQuestItem_53="beb7971c-7b3d-477f-9fa1-0d652bb1894e",q.Icon_ultimatesQuestItem_54="d8111eb2-67df-4337-894c-104765a5a281",q.Icon_ultimatesQuestItem_55="3eb401c3-d037-4774-bfc7-881ef4fe364b",q.Icon_ultimatesQuestItem_56="abb64af6-17d9-4276-afb6-c0351258bfcb",q.Icon_ultimatesQuestItem_57="5510e076-4fc5-471e-b62e-67be890fa323",q.Icon_ultimatesQuestItem_6="becb85b6-988c-435d-a15a-eb38fa6b7f37",q.Icon_ultimatesQuestItem_64="c4596ad7-69de-4654-8fff-b90751fa78a9",q.Icon_ultimatesQuestItem_65="f31b9845-9afb-4cb8-a9a7-82478de9fbf8",q.Icon_ultimatesQuestItem_66="3b29450a-9ac0-417e-b234-a437e266d649",q.Icon_ultimatesQuestItem_67="6af17156-dde5-4a99-a2d2-8b96de93f8cd",q.Icon_ultimatesQuestItem_68="7bfa9748-d26c-40eb-b632-5464470658ff",q.Icon_ultimatesQuestItem_69="26f93936-e56e-4e30-8237-eec91cdaf52f",q.Icon_ultimatesQuestItem_7="6ebf1b18-fa58-465a-9abe-f8e94492e96b",q.Icon_ultimatesQuestItem_70="ef3e2f00-cc4d-4610-8fab-7549129e4087",q.Icon_ultimatesQuestItem_71="ab72becd-425c-480f-b318-cdd7472de534",q.Icon_ultimatesQuestItem_72="a7909739-423f-4454-ad03-9153c3cee839",q.Icon_ultimatesQuestItem_76="7c46a4ed-fe0a-4a6a-b93f-8d4d31f3a902",q.Icon_ultimatesQuestItem_77="cb116baa-f588-4b45-af57-8034c16f313c",q.Icon_ultimatesQuestItem_78="1ed0dc02-a0de-4313-9211-79f938bba453",q.Icon_ultimatesQuestItem_79="6e101486-6619-4cc7-a74c-ee96098a52a4",q.Icon_ultimatesQuestItem_8="92f9531b-a767-44a9-ae06-dbce12337a0b",q.Icon_ultimatesQuestItem_80="7f269cc2-dfb5-4f93-bade-27f3067006c5",q.Icon_ultimatesQuestItem_81="e4d382d6-c595-489e-b351-bfb18ec396c6",q.Icon_ultimatesQuestItem_9="ae09e273-7a3d-4f59-a022-83a019f03eaa",q.Icon_weapon_1="19af2479-cd93-42bb-b383-11525dffc468",q.Icon_weapon_10="ab931ee3-d3a1-43de-89f4-5a90156b1149",q.Icon_weapon_100="65e632f3-8c18-4b8a-9a11-d64e59b78375",q.Icon_weapon_101="ebcea9ef-1a17-42df-a635-76efd014a995",q.Icon_weapon_102="ae0e55db-5557-4d24-bb41-213f32bbc41b",q.Icon_weapon_103="4687a590-8845-4bd6-a94e-38be57347fcd",q.Icon_weapon_104="520f9036-52f8-4077-827b-f058fd9cbb98",q.Icon_weapon_105="3fb104da-36c5-4dd5-aafd-9e9610564558",q.Icon_weapon_106="25e6ad61-5237-4fe3-a5c8-a504dd74c95f",q.Icon_weapon_107="bc79c65e-0a3d-4ce3-95bd-1ff90da74113",q.Icon_weapon_108="9d43c1ca-ce94-43a5-895e-40b782f4c695",q.Icon_weapon_109="0e4714ac-f057-4d30-b71b-43649c908496",q.Icon_weapon_11="b9b4d413-3ca7-4063-8c61-cab96c1e5890",q.Icon_weapon_111="11e408e0-1d36-4400-8df3-bafc90f0ac44",q.Icon_weapon_112="5e3306e0-a2c2-4774-911b-9884c80bf8d0",q.Icon_weapon_113="4613dec6-be01-4aa3-8bfb-bff4b8aa2563",q.Icon_weapon_114="4e3b181a-48c2-49c5-8f79-4e7d29039d78",q.Icon_weapon_115="57859a5b-5af6-40cf-9100-59fea8bab79c",q.Icon_weapon_116="ff887d65-969f-4a22-8a2f-c1ae327f1844",q.Icon_weapon_118="60ac027b-e729-468e-b53f-07f42a924184",q.Icon_weapon_119="da1ba6c2-35af-4323-b06f-6aacb72a7180",q.Icon_weapon_12="48a03d75-5917-4c31-ac70-a64514c237a0",q.Icon_weapon_120="484f87af-30ee-40f4-babc-fcaae5fe9d3f",q.Icon_weapon_121="6fab474e-abc7-40c9-867d-4c568b583f8b",q.Icon_weapon_122="1b31761d-c0c0-4dd6-8f77-33e5a3d7a602",q.Icon_weapon_123="5aa602d8-e8fa-4a42-bf7d-b3274faaf1bd",q.Icon_weapon_124="f20d1158-af10-49a0-867b-d344c4b23496",q.Icon_weapon_125="cf2a7b9d-74c8-43cd-aff2-0ef376d6bea1",q.Icon_weapon_126="517ed277-45de-4529-839d-2c127519bebd",q.Icon_weapon_127="1539a83c-4136-489b-ab2d-0ab01cb88cc5",q.Icon_weapon_128="4bdb1945-82cc-43a2-a4ac-3c742ed69a2f",q.Icon_weapon_129="68ffcd2d-74a8-4285-9095-72d6465e0a99",q.Icon_weapon_13="6a48f0b5-4670-4faa-8f36-4177aa169027",q.Icon_weapon_130="7822ff8a-5b8e-4642-93c2-96418e1e6f45",q.Icon_weapon_131="2bcd48a7-2824-40f6-add4-d99375ecd2a7",q.Icon_weapon_132="bf12cc0b-e504-43c7-b16a-72d1cf5211cf",q.Icon_weapon_133="bde33e37-85ae-45e1-a12c-934a2106b384",q.Icon_weapon_134="3952a09a-ffb2-409a-95a8-8af9e445faf1",q.Icon_weapon_135="12ace860-8ecb-4db9-8b4a-032db25eb4ae",q.Icon_weapon_136="b8729e63-0541-4c18-8c63-e34e3f094c03",q.Icon_weapon_138="a0f07669-c048-43ed-b9d7-4b0b8a57bb02",q.Icon_weapon_139="8cff5b66-e2fa-4774-aeb5-9ab195ec4c86",q.Icon_weapon_14="b943d9f2-d645-4334-8e33-ba21a6eb47cf",q.Icon_weapon_140="5c8abf11-9579-4723-953d-acbfa4dcd56a",q.Icon_weapon_141="53789982-6738-4a3e-9831-32a225d95abf",q.Icon_weapon_142="240f8b59-e243-437e-8bb8-0d438e525c4a",q.Icon_weapon_143="0b817208-07cc-4a18-b21b-549953269129",q.Icon_weapon_144="66e4b65d-4ae6-44ca-bfe7-04fe4a9267c8",q.Icon_weapon_148="164cb888-5846-4de0-8ad6-76fb8ae045ee",q.Icon_weapon_15="788cf8be-e0dc-4d4a-ac29-c99df2ad2adb",q.Icon_weapon_150="bedd6ba7-2ebf-46ce-9015-961660b38e4b",q.Icon_weapon_151="179135d7-235d-4d03-9ed3-868572813520",q.Icon_weapon_152="12062beb-94d0-4c05-ad33-6295e9715d9b",q.Icon_weapon_153="d4a92aaf-9b19-4db8-97e6-a5da44b2d7fc",q.Icon_weapon_154="9c17f80b-e828-4aa4-81a4-0df706d27b15",q.Icon_weapon_155="2815a227-b150-476e-8515-de9882255d29",q.Icon_weapon_156="b551683f-0648-4d79-895d-f7627ca7431b",q.Icon_weapon_157="e4e9009c-472f-43d0-8470-87341d3c7b86",q.Icon_weapon_158="99d61e00-d468-4f75-82f1-7e972b0641e3",q.Icon_weapon_159="c019a623-316f-47a7-8b44-6a0966da5837",q.Icon_weapon_16="213fc75d-b06b-48e2-a5cc-05e5353bf8e7",q.Icon_weapon_160="964d09d6-e8ef-4601-ac50-57ffe17a93b8",q.Icon_weapon_161="7d55e319-71d3-4e3a-8351-9cbf82a3c277",q.Icon_weapon_162="bd96bd2e-90be-46e8-9df8-c7440e51d5ad",q.Icon_weapon_163="96e44ea5-1b50-4a49-afca-00f40898b619",q.Icon_weapon_164="d98aa525-d0a6-4d64-afb0-0477679e2111",q.Icon_weapon_165="3751ecc5-aed4-4216-959b-92590af325bd",q.Icon_weapon_169="be0e790b-5d6c-4199-a418-04a1b69ba4a5",q.Icon_weapon_17="a4938d86-3165-4f48-adff-87dbff8289ca",q.Icon_weapon_170="42214cb3-5bb3-4753-8ae8-f683368845d0",q.Icon_weapon_171="e63e98cf-3292-443b-bde9-c88d15dfc88f",q.Icon_weapon_172="baabee0c-cff8-4bd5-b638-e0e03489b756",q.Icon_weapon_173="774429ca-862e-496c-b5f8-434dc500de3d",q.Icon_weapon_174="6a1c0e6e-18d7-4015-8494-41b1c31157bf",q.Icon_weapon_175="39f4dbd2-c089-4dd0-8fb0-7f5918b576d2",q.Icon_weapon_176="5bdf89d4-2602-4f0d-b445-ff16d55a1d1a",q.Icon_weapon_177="dbb649e7-8a9a-4d12-af05-96bf7fe04401",q.Icon_weapon_178="6449667c-ff65-4ea1-a3e9-520d4ab2c13f",q.Icon_weapon_179="2dd20738-8078-4caf-a46b-5fc1a9befd98",q.Icon_weapon_18="6aa68829-683f-45d5-96b6-d7e961425232",q.Icon_weapon_180="a567da0e-d048-4f6a-a07e-eff11fe5c455",q.Icon_weapon_181="bdf13a80-b824-4ff2-9dc4-e3cbc2c5b885",q.Icon_weapon_182="313e8a5b-e08b-4f06-98f4-b68162610dce",q.Icon_weapon_183="db398233-a784-464a-be8d-d6abad7a2c1c",q.Icon_weapon_184="48ebf300-e14e-4554-84bd-bcf817ca8085",q.Icon_weapon_185="edf9d264-ca62-4fc0-9fd0-ab8cebcb9775",q.Icon_weapon_187="25e35b8a-639c-4534-a5e9-c4c0ca5129d8",q.Icon_weapon_188="ab960e45-538e-4eb7-b3d3-fce2ae61823e",q.Icon_weapon_189="b2c1c8ca-7bfb-4403-826a-53bf5765f725",q.Icon_weapon_19="0b1badd2-3714-4749-b010-bd18dbde0968",q.Icon_weapon_190="5bcdca5c-b5aa-4d85-b1d0-67f3bb9886f7",q.Icon_weapon_191="eeb4f0df-94df-48c9-9360-61502e999395",q.Icon_weapon_192="92fa6e29-1276-4f5a-905d-f95bb437800a",q.Icon_weapon_193="18906af9-7734-4a8c-a48c-935192de8183",q.Icon_weapon_194="9cb36604-3b58-43ea-a561-5c96906eafbd",q.Icon_weapon_195="561a31fe-4de1-4575-89f9-bb878364fb39",q.Icon_weapon_196="5d498564-b791-4609-8848-d2d61bfcde47",q.Icon_weapon_197="d03b0a74-a882-401e-b380-5c84bfe7ff6d",q.Icon_weapon_198="27026328-bc23-447b-b995-ad2ae6827b4a",q.Icon_weapon_199="4c487465-65d4-4e30-bdad-59fbd29dcd0b",q.Icon_weapon_2="ec8d3cf8-6092-4714-81ef-801631a328c8",q.Icon_weapon_20="e85627f3-0e7e-4f94-a091-49269c8f2d56",q.Icon_weapon_200="ef892446-20ad-48a0-ab96-ff09f1b1365a",q.Icon_weapon_201="1fbc86e7-23d6-4855-8755-e07bbe7199be",q.Icon_weapon_202="81dfba10-8996-4406-92c3-9b985c5ba0cf",q.Icon_weapon_203="29a16c74-e704-4bb4-91de-543bb1fca4c3",q.Icon_weapon_204="529a816e-8d0b-44d5-850c-94ec0fd6a8eb",q.Icon_weapon_205="e14aee46-cc5b-420c-8f68-da2bd0ec7589",q.Icon_weapon_206="5f15088d-dbb0-4db3-8947-a9a0e3d58053",q.Icon_weapon_207="2027a4af-6dc7-4b14-aaf4-38bdcdb542d4",q.Icon_weapon_208="e1ef6b0b-2128-4c6f-88d7-cd849c12d62c",q.Icon_weapon_209="98cedccf-f640-413a-9142-2944999e21ce",q.Icon_weapon_21="b8b765da-e046-4346-8f93-1f25a883616b",q.Icon_weapon_210="e1e0a38d-5031-4c51-8b00-57951dbc5611",q.Icon_weapon_211="6ec0b929-8add-47c9-a38e-a7aec9af68ac",q.Icon_weapon_212="3cd0c527-6413-4657-8e51-745e7de139ee",q.Icon_weapon_213="789f6a84-bae6-401a-84ad-a13ad974a78b",q.Icon_weapon_214="5f299d5f-5a05-463d-8b19-1526090bd2df",q.Icon_weapon_215="74ae44b1-4449-4887-9496-a3c3a4b9bf7f",q.Icon_weapon_216="272880a3-5569-4b83-ab53-a25ca6c2bbce",q.Icon_weapon_217="62d1d525-146d-449c-ac8d-ab743e4d21cf",q.Icon_weapon_218="180a1a08-500c-4776-8edc-6a7fa6ce14db",q.Icon_weapon_219="87a9c730-b482-44da-a227-c0e01b0d3da3",q.Icon_weapon_22="f9742a5a-7e8d-4219-bcad-ecdffac88e5a",q.Icon_weapon_221="244bd57c-979c-4866-8479-47c7f0db12f5",q.Icon_weapon_222="e33aee0c-eceb-4f05-863e-ee350b6877fa",q.Icon_weapon_223="1eac4900-dc88-45e8-a57a-f9a08cf29be0",q.Icon_weapon_224="104d62b8-834c-4334-ac5a-8c3d4bc6399c",q.Icon_weapon_226="074b311d-6106-4cfd-8337-0ba77c4d5159",q.Icon_weapon_227="79bd498c-bc64-4d57-8966-9289faf82fad",q.Icon_weapon_228="0a71dcfa-5d91-4c22-b69c-458fa51dfd54",q.Icon_weapon_229="43ce1bd8-761c-46c5-866c-858ce905fe31",q.Icon_weapon_23="b5a4e813-c7e9-4262-933b-c3e99ad97c8a",q.Icon_weapon_230="2c35b723-a616-487b-b51f-f7fe750a3aa4",q.Icon_weapon_231="946ae8dd-4a05-4cef-b6ef-e5d9d681a04e",q.Icon_weapon_233="d8c044dd-a32f-42b9-9afc-6faea033f980",q.Icon_weapon_234="352a0681-7465-4522-8c57-57483704a1bf",q.Icon_weapon_235="9aff6b63-41ab-45ea-8a8a-e8e357be6a25",q.Icon_weapon_236="98177813-3793-4ec6-9818-2ec77ab0fc25",q.Icon_weapon_237="379c53e4-0a66-41a7-981c-1b8d38125516",q.Icon_weapon_238="121d2034-faae-43fc-84ac-7d71f60796b7",q.Icon_weapon_239="6f103f1d-a8a0-4dfb-968d-a9b67d2e044e",q.Icon_weapon_24="1369436a-6f4e-4beb-83da-0e0870372f54",q.Icon_weapon_240="ec8ff3af-8eb5-4b7d-8608-54b23405cf8c",q.Icon_weapon_241="34a4cb8a-fa32-4f32-a23f-7eca6b555029",q.Icon_weapon_242="7c290dc2-d71a-45ba-8267-c537e77b2180",q.Icon_weapon_243="b1ef6031-484e-46a8-b14f-33c22acb1a7f",q.Icon_weapon_244="835ca3bb-a529-4afe-a39e-8444c4b1fc92",q.Icon_weapon_245="296c36b6-5a76-4e0e-b361-30d7318d41d8",q.Icon_weapon_246="fc26ece1-8df9-4f4d-8b01-8f70f358eeac",q.Icon_weapon_247="150c4fa8-5292-44b9-b2f7-d2a073ef1edd",q.Icon_weapon_248="2823dcd0-8482-4a67-b07e-40917b7f9e19",q.Icon_weapon_25="ae021c72-3618-4e25-b25f-2e146be2571e",q.Icon_weapon_250="026a2f13-114f-4e5b-a88e-93f79486703f",q.Icon_weapon_251="60c1b2b5-d9cd-4f6d-a755-b953117916d5",q.Icon_weapon_253="a74cd3ce-7e1a-4b5e-9281-2b04de8c97c3",q.Icon_weapon_254="fac6f2d6-3ba0-4b4f-b8f9-9f9a1c247042",q.Icon_weapon_255="2eb57751-a8a9-4dde-8ece-797588178cf0",q.Icon_weapon_256="d602eeb6-f953-4916-8c6e-dbdf265af166",q.Icon_weapon_257="906b215e-cd35-4ffd-af64-2b86edb50313",q.Icon_weapon_258="a07cbf01-677a-44af-8280-7d61321c160e",q.Icon_weapon_259="84ffcab2-b811-4f13-b4ca-431e9aa008ff",q.Icon_weapon_26="6e27a1ba-b90e-4f24-a20f-2c29e547c38e",q.Icon_weapon_260="888a9995-29cd-46ac-8541-f4685c67ec2d",q.Icon_weapon_261="00510f5a-f1e6-44fc-916b-6754cc5e69c1",q.Icon_weapon_262="c9d07fb0-3dde-4901-ab5d-58ca28923adb",q.Icon_weapon_263="e24665d6-a843-4577-a5e7-02760ed53b4d",q.Icon_weapon_264="d5c123cb-9718-42d0-af7a-e890e0b7a102",q.Icon_weapon_265="6d189e6e-9380-433a-873e-693ef2ca2ba9",q.Icon_weapon_266="f5758f12-07f1-4f2a-903e-fa2f458169e7",q.Icon_weapon_267="9a8881cf-7364-46f2-9d94-cc3083086060",q.Icon_weapon_268="6c32c6f7-5114-47c6-8f13-840f8cf72ca0",q.Icon_weapon_269="b79dac5c-8956-4a83-a1af-344bdd0ae123",q.Icon_weapon_27="180074aa-8a19-4ade-bb9c-fe21d0128fd6",q.Icon_weapon_270="f3ca0cd5-ee59-4acd-8b5f-7c95ed565e6d",q.Icon_weapon_271="416939bd-a391-4069-90ef-96f283eb81f7",q.Icon_weapon_272="f4c2317d-d0d2-45b5-b2b1-cfb74be00074",q.Icon_weapon_273="2adba2f7-ec1d-43cf-8ff8-db4df7832d98",q.Icon_weapon_28="a864872a-6498-4060-b590-37556be3b75f",q.Icon_weapon_282="5019f445-1aa5-437e-9c7e-a3587b4bef71",q.Icon_weapon_283="9b866487-a85a-438f-9e52-fcd857b1eef7",q.Icon_weapon_284="e9d2356b-8fda-4c4d-8518-cfa4d3787b92",q.Icon_weapon_285="8c7e8672-f317-4eb6-971b-b8a9853b2e5a",q.Icon_weapon_286="1708c339-99fb-4573-b853-0ea34d417d4b",q.Icon_weapon_287="3c5faf06-ce5b-44b3-b048-c013d6cc4825",q.Icon_weapon_288="ecc7b9d0-ba3b-4101-b375-6114d6a21a73",q.Icon_weapon_289="277f134a-cd58-4fb5-b856-2baac1bcc5f7",q.Icon_weapon_29="75380bc6-5f94-4ff6-9600-ce2f7ee594e7",q.Icon_weapon_290="a13dee6e-8caf-4297-827c-88ef4325408d",q.Icon_weapon_291="cf3a9825-e0e6-4bd2-bac5-aac66187332a",q.Icon_weapon_292="692ad003-08e5-4d2e-8f70-a0a925383643",q.Icon_weapon_293="a644cad0-90b1-4672-b660-73f639eea6d9",q.Icon_weapon_294="f5a2fc7a-cb82-4181-93b4-9b88c8ec9fc7",q.Icon_weapon_295="6c09a3b0-2ee4-4e5b-b1e8-78b0926afa05",q.Icon_weapon_296="20bf51f4-b8fd-4ea9-a2a6-c4682cf78d4c",q.Icon_weapon_297="b6fc5b3a-5934-4767-a653-f38f7c7a407c",q.Icon_weapon_298="07c51dbb-c39b-4f7e-9f8c-7edcbfc86431",q.Icon_weapon_299="0903133f-c7a1-47a6-bcdd-89c961222556",q.Icon_weapon_3="e780af93-fa6d-48d8-bcdc-ccb1dc78959a",q.Icon_weapon_30="e23ddb43-8f62-48e1-9dbf-135328ceaafc",q.Icon_weapon_300="3fae96d2-6738-48bc-8a1d-c9079f6b9b6a",q.Icon_weapon_301="e25fdfb6-c369-4379-afb0-f0cadb9082e3",q.Icon_weapon_302="34937a31-101b-4999-8fcc-979d75b5e057",q.Icon_weapon_303="86c884f6-f9b3-411f-94f5-0a12eed9adf2",q.Icon_weapon_304="0e582865-45b8-4bbc-aaf8-ff7c8bc25924",q.Icon_weapon_305="96fdc10b-12ca-4f88-ba63-67f98c1174e8",q.Icon_weapon_306="d2c8f8c2-f287-41d8-90ab-0cba7db98b16",q.Icon_weapon_307="958c492e-ebbf-46e7-8d64-7539af6f76a0",q.Icon_weapon_308="16937b30-950a-4b43-98df-69d57fefdbf8",q.Icon_weapon_309="1052d510-6499-4f26-8f5f-052127de3172",q.Icon_weapon_31="9cbb1e02-0c3b-469d-ae05-62683cec96bb",q.Icon_weapon_310="db5a9f64-a7a1-402a-9706-59197ba6a1d0",q.Icon_weapon_314="241be73a-400d-471a-b02e-f20b6bb947b4",q.Icon_weapon_315="38d9f8fc-e69d-48fc-ab34-df753bf41719",q.Icon_weapon_316="cffb730f-f541-42b2-9aa7-4a3926818643",q.Icon_weapon_317="38c7ba14-f446-4f39-9721-1884a9fac6c8",q.Icon_weapon_318="3d373318-1ec3-43c7-879d-f2a027d94474",q.Icon_weapon_319="3d6b0dbb-5508-43a6-8ab3-7541eae6336d",q.Icon_weapon_32="582978bb-e3f0-4754-a733-01246e067c22",q.Icon_weapon_320="49489fe0-1dce-4d4e-aa93-8e412b76f9cb",q.Icon_weapon_321="9904038d-43b1-4920-b8b5-1ac1b96b5388",q.Icon_weapon_322="31a2ba8a-a4d3-4942-b7cd-725f3e62b147",q.Icon_weapon_323="545facbf-5ac8-4348-9b54-9c1c516c0b75",q.Icon_weapon_33="c183f343-7d2e-4406-a572-2b9583feb76e",q.Icon_weapon_34="daabb528-16f2-4a02-8137-c1c4eac38230",q.Icon_weapon_35="f8ddbc68-4124-4aa1-8f7f-d531994e13d8",q.Icon_weapon_36="a60dfc45-89c3-4800-ae8f-759d12696218",q.Icon_weapon_37="942994cf-5320-467b-87f6-3ddc343b8bc0",q.Icon_weapon_38="679504ca-edd3-4008-becd-f8b388a8cd70",q.Icon_weapon_39="956b1253-25af-4beb-b2ba-bc30d143c392",q.Icon_weapon_4="11574e5e-e2af-4e1c-89d6-b12fa92bebcd",q.Icon_weapon_40="097900f1-0dac-4172-82d3-39b2bebd16fa",q.Icon_weapon_41="34f68c8c-74d2-415f-8978-d5bd3ed3bcb0",q.Icon_weapon_42="0456b091-52ac-4cb9-b98c-ef7074263128",q.Icon_weapon_43="e8bf3772-14d2-4319-a031-56c2a4720a1c",q.Icon_weapon_44="a11ec914-9d11-4539-a647-b32bc3e24102",q.Icon_weapon_45="dd6d6066-deb8-4f77-9c16-b5eb1aa358c9",q.Icon_weapon_46="b30743f7-bd8e-4ab7-ae63-2b132a214775",q.Icon_weapon_47="c5b6aac0-e707-4852-92d8-849c7b8cb39b",q.Icon_weapon_48="6fa2f6bc-fb22-4862-844a-718729f24de8",q.Icon_weapon_49="5dddbbe9-ba0c-4dff-9aa2-0495cc04893e",q.Icon_weapon_5="3c419e52-4ffb-4e9f-9117-1c2ec37f4b9c",q.Icon_weapon_50="40afa905-3192-4ab0-a1f9-02dc26fa4a4a",q.Icon_weapon_51="ba5ad703-781c-4f71-9903-6fe42af54fb7",q.Icon_weapon_52="461bb9ca-7608-477d-bac5-b5cec37cc67a",q.Icon_weapon_53="d41c0688-a89c-43ef-a8a8-1d643aa2e0e6",q.Icon_weapon_54="caa8f5d7-868d-4b94-af04-a751a78bb7c1",q.Icon_weapon_55="659b3c30-0784-49b1-9acd-30c9652e2f2f",q.Icon_weapon_56="35ace9af-5b86-4d29-91c3-c6869b07813d",q.Icon_weapon_57="2a2de320-a79b-4ac3-87a6-5dbd5e4792a2",q.Icon_weapon_58="ba6b98f5-8f6f-4c76-9066-1e96769e11dc",q.Icon_weapon_59="6286e5e4-da27-4214-bcbe-61a9d8655f1b",q.Icon_weapon_6="7d7f5646-54d9-4087-ab29-df74ea7f0eff",q.Icon_weapon_60="dfc699c8-0b1c-44e2-90ad-4b94c15e6641",q.Icon_weapon_61="88b25f8a-70a6-4177-bf21-cd2ff2c15dd8",q.Icon_weapon_62="565a5939-c82e-4d54-a6d9-d2cb0d9ad34b",q.Icon_weapon_63="2997e965-a666-4a8d-9404-c4ef6e0388e3",q.Icon_weapon_64="b73938a0-b939-40fd-a97d-6c7f3cab2dd3",q.Icon_weapon_65="959eb0de-d7a8-4610-928e-281272389fc3",q.Icon_weapon_66="6eba519f-02f9-4193-82bf-ce2413038924",q.Icon_weapon_67="a72823db-3ddc-4cca-a60b-823c015829c9",q.Icon_weapon_68="35be0741-42fd-456a-812c-57c6a89c8919",q.Icon_weapon_69="d448c554-2082-4f24-820d-4dbbf6b07c77",q.Icon_weapon_7="9976a37f-1258-4c74-8d37-ef4f2499dfa0",q.Icon_weapon_70="3ca23504-9663-4133-a3ed-203b810436be",q.Icon_weapon_71="6d08eef2-ca75-4144-bb99-e85d4332e10a",q.Icon_weapon_72="f191bca9-af38-4000-a8ce-b43f57cf634f",q.Icon_weapon_73="908add0f-1a15-471a-a4dc-8fc70ccc403c",q.Icon_weapon_74="b64d02a1-6448-496c-b88d-22011810f6a4",q.Icon_weapon_75="8af14e35-dea3-42da-81bd-042fa20d849d",q.Icon_weapon_76="583e025b-b8aa-45bd-845d-53a490221143",q.Icon_weapon_77="78f9eb1c-e763-4f7e-bb6d-90642ce1abad",q.Icon_weapon_78="e65cd0fe-3960-4932-bc74-287d62c54bf7",q.Icon_weapon_79="f41abb7e-61cf-4c35-860c-09076af30dd9",q.Icon_weapon_8="33e90953-4dfc-4f02-a5f1-0a8437463d66",q.Icon_weapon_80="2c3fa3e5-ab75-44ae-904f-4756f1933027",q.Icon_weapon_81="67c90fa9-8f4c-44cd-ad38-2a2f9a5ee966",q.Icon_weapon_82="55f91252-faa5-49f7-84c0-84b1239d5826",q.Icon_weapon_83="aa066562-bb6d-44c2-8eed-1192acef1107",q.Icon_weapon_84="e5b8f63b-4698-471c-a408-d662fc90ce3f",q.Icon_weapon_85="4465f6c9-30ec-48ec-98c4-f1e3c015bded",q.Icon_weapon_86="54bdb2f1-f3a5-4df7-ba7b-0c1a40c25cdc",q.Icon_weapon_87="787a3250-1336-4b73-bdda-f70f21373932",q.Icon_weapon_88="58edf0ca-f951-47ac-a107-507fe47194c6",q.Icon_weapon_89="d579d4f8-7ebc-4712-9d9e-bc7c6bbd479f",q.Icon_weapon_9="bace1907-1080-4812-a685-8ce79320ac53",q.Icon_weapon_90="15ebe361-5962-41fb-8377-8313960b33dd",q.Icon_weapon_91="afba2971-db5d-48a4-8ce8-d509eb302c97",q.Icon_weapon_92="ef1f2b79-bbaa-42e9-8f33-fb3399791c7d",q.Icon_weapon_93="cead2f52-8557-4350-b719-6ddfbb4df451",q.Icon_weapon_94="2df69434-e901-44c2-83d0-6d4b49765508",q.Icon_weapon_95="2b7a7d04-3cda-41e2-bd49-32b06ca43dfd",q.Icon_weapon_96="d346da67-2a9a-47f4-8a8e-9dfabee943bf",q.Icon_weapon_97="f985b3d0-29bd-4176-b87c-f40a159df615",q.Icon_weapon_98="a8b9959d-1b5f-4bbc-9e9e-dd976864cd0d",q.Icon_weapon_99="4e9949a8-92d0-4935-b5b4-9e1811ecea65",q.Icon_xp="d4567fad-c437-4fb0-abb5-6ac5b71da560",q.Infinitytower_closed="a18a20f1-c854-439d-9af0-692a80efa18b",q.Infinitytower_floorbarricade="70f73256-1807-4b33-8cdb-457f64d1da57",q.Infinitytower_open="f9119200-ed8c-4ec8-9efc-2e80132e1e88",q.Info_rewards_cycle_2="5fcc63ed-8399-4208-9c24-82e08d0a6cd2",q.Ink_ball="efc7da2d-a795-4058-abe5-807bf72077e1",q.Ink_blob_1="b9905e7b-0b08-442a-8ac5-37c7f1d17496",q.Ink_blob_2="dd3bfb2b-247a-4ce0-bf0d-0d1ccf83eb23",q.Introducing_Wizard_Dash_Home="9dd5416b-14c3-4be7-97fe-fe705c7432ea",q.Introducing_Wizard_Dash_School="eca6ecea-e2bd-44e5-aed9-1b6ece8d7042",q.Item_details_modal_background="bd6c2bef-a799-4df5-87c5-67dce9b16acb",q.Item_details_modal_background_ultra="938b2dda-3619-4cd9-8234-7fa68ad0a9a0",q.January_2024_teacher_gift="3041f213-1c32-4dd0-b5d3-e79a78f9e526",q.January_2025_teacher_gift="5f41f130-ca52-4218-a203-debbbc9bdcd4",q.July_tt_home_screen_background="d31577ac-ad74-46c9-bb14-14bf4bbe8039",q.June_2025_tt_home_screen_background="2894dff0-0ba5-4f57-94e9-6fa237d0ba2d",q.K_state_1_100px="83f303a7-d96a-4093-b419-13ee9a8424d5",q.K_state_1_150px="6809d5bc-6302-4bff-8f57-f9efb0f8abc9",q.K_state_1_225px="e872d8bf-c10c-4b64-be88-7bd4fc5c5ed7",q.K_state_2_100px="79ae76d1-1de7-44fe-92cf-a5df6d3f3003",q.K_state_2_150px="a87240ee-875b-41ab-8fa1-c65034893e85",q.K_state_2_225px="7f196f43-03b4-4c97-a6ae-7e6db18bdef5",q.K_state_3_100px="f8d052fe-4eae-477e-8953-91bfbac248e1",q.K_state_3_150px="51e5c2ab-7c5b-4b0d-a084-af12a961762c",q.K_state_3_225px="5102f9d2-8a08-41f1-853a-43f1e407bb37",q.K_state_4_100px="a29573af-c63e-4cfb-9754-51e6b002ae1c",q.K_state_4_150px="f126421a-d0e1-4b6c-95ee-fc122a6628fd",q.K_state_4_225px="dea5a709-e010-4b3c-9e11-d13356843653",q.K_state_5_100px="712b8ebd-1c29-46c1-a482-b949e9da2b80",q.K_state_5_150px="65872e15-f25e-4701-af8c-ad0a740843db",q.K_state_5_225px="84876ff7-fa59-47cf-92ed-e71f58dc5578",q.Kandi_Korn_Tooltip="bfee774f-8225-4d2f-b56b-dd7cb4d7bd76",q.Key_pose_dragon_astral="24d34652-594d-43a3-bd2f-71ad22b8c015",q.Key_pose_dragon_fire="8c670b7f-47f6-451e-9e6c-386bbd4b6416",q.Key_pose_dragon_ice="25f65336-b177-4c0f-9adf-38cb0e7baf02",q.Key_pose_dragon_physical="0d281863-90b8-490b-a830-a9bf5e913613",q.Key_pose_dragon_physical_smaller_silhouette="654fa615-e1c2-49ef-873d-344c4f3dd616",q.Key_pose_dragon_plant="929d83a9-fa13-410a-b2c0-71a10063701a",q.Key_pose_dragon_shadow="3763af09-7994-492d-abd9-d8fb6a992802",q.Key_pose_dragon_storm="b3a6ecb9-0d27-482a-86b4-d53cec889e1c",q.Key_pose_dragon_water="ec4b139d-b476-4ceb-a6c7-e21c75a4847c",q.Label_full="e7908d67-1d90-435f-b277-3206893d404f",q.Leaderboard_class_code_backing_splash="ddc6e534-0bbe-4474-af3a-5f386ecbbec4",q.Letter_DungeonsWizardWatch="52f514c4-1bc8-437f-93a5-2ed88fbba129",q.Letter_RuneRun_Launch="c8393d0b-0923-46d4-ad57-4961a27e1187",q.Letter_RuneRun_Prepare_ad="1e32ee54-df98-498c-8a37-1c8f4dc5310c",q.Letter_RuneRun_teaser_ad="219ebdad-76a4-416f-bbd7-c8278695cb99",q.Letter_crystal_caverns_ad="39aaf8ba-948a-4b0f-bf78-6e166647270b",q.Letter_crystal_caverns_teaser2="8ae37d20-92a1-4ce4-9b4f-36a864b40048",q.Letter_mail_open_image="34ccbabd-faa8-4f9e-87d8-dcf8e1501208",q.Letter_member_reward_feb="9c27e6ec-1d65-476f-92da-0203e7e9bdae",q.Letter_member_reward_march_2019="ab7ae1ad-9239-46c2-846b-5fc5146b50f4",q.Letter_memberbox_to_treasuretrack_mailer="42896a0d-634f-4bf1-8e18-5744ab0c6728",q.Letter_memberbox_ultra_april2023_mailer="4e84e868-8752-46a9-91e1-3196a2c35c13",q.Letter_petbook_ad="aad7b2bd-f844-4d44-9fa0-707713502631",q.Letter_pumpkinfest="ea42cb6f-d575-4bb2-b822-a3ce0fda0933",q.Letter_red_bubble_ad="a0bafb18-2d85-42cb-a3cb-597f9954d542",q.Letter_runerun="35f773db-2739-474c-bd8a-35ea36c6db7f",q.Letter_season_end_rewards_bronze="efa3bf7d-313e-412a-872b-0c18f7a6faa3",q.Letter_skywatchtitan_ad="93f0faba-17db-4bbb-bb63-9beec8efa422",q.Letter_springfest_ad="dc3a3969-4130-4991-8902-15b06c012ed1",q.Letter_springfest_start="dcfc7694-bbe6-4fd8-97c1-062ea4d90e04",q.Letter_star_bonus_teaser="63f76560-95f2-4b20-870f-67e06d35b23f",q.Letter_starlight_teaser="1577d212-4eb5-440e-a066-261e84ed0ec9",q.Letter_summerquest_ad="fcb6228f-304e-436b-8b66-7ffb90065cff",q.Letter_titan_co_op="6db6af2f-ee16-4dcd-9707-d5c8bd04f8c9",q.Letter_titan_gearset_ice="5d731e3c-5f4d-4dad-aea6-f30207bdcaec",q.Letter_titan_gearset_ice1="d6761a8c-986a-4ce0-9b52-bab7e905ad23",q.Letter_titan_shard_teaser="6fc701bd-a6e8-4895-879d-7f3e51128fbf",q.Letter_ultrabox_april2024_mailer="979fd69e-04fd-414b-b643-7853ca8f47b2",q.Letter_ultrabox_december_mailer="b450d9ae-d581-47a2-a26b-654625b2d507",q.Letter_ultrabox_january_2024_mailer="08c5e1ce-99bc-479e-b6db-41e8bf0c1a15",q.Letter_ultrabox_july_mailer="00e6a61d-1a9d-4317-978a-0efce796f740",q.Letter_ultrabox_october2022_mailer="845760f5-83a7-4c2a-80fc-662cfef41f50",q.Letter_ultrabox_october2023_mailer="e454efd6-31aa-45c7-87fd-03625b344f68",q.Letter_ultrabox_to_treasuretrack_mailer="2160a0a7-468d-454c-b426-c5c2bab6f7cf",q.Letter_winterfest_2020="dad19ad3-42cc-43b8-b692-e045450fd7a9",q.Lock_glow_blue="b0e4eb75-ba02-4c4d-ad60-dfbc314c0c9e",q.Lock_glow_magenta="3fb36e25-1402-4d44-bf55-7f1e42384ff3",q.Lock_glow_purple="24c81c23-4157-42a7-86de-80509c9aace2",q.Login_bg_1="30dec100-0244-4b59-8a38-33cbd8cd6faa",q.Login_bg_10="c4708286-1749-4338-b26f-c4c7ff78f654",q.Login_bg_11="508f5c50-36a0-4f0a-863b-7511b03e1bfc",q.Login_bg_13="48f61fbe-215e-42a0-94ad-81bd491da4ca",q.Login_bg_2="a61377d3-2379-4a60-a22a-32fa18f40a26",q.Login_bg_4="e4118670-c092-40f7-87b8-4069cb27efce",q.Login_bg_5="092e5971-6164-4803-b1be-967c09c433b5",q.Login_bg_7="9d64b0e5-9530-4744-8e7a-f35808d61475",q.Login_bg_8="fb63adb4-78ab-4e13-922c-799c8f21331f",q.Login_google_signin="e3717a41-fa27-447a-a6fd-ee20ca7d4a5a",q.Loot_bag_modal="9ac9796f-3361-4503-b9c0-7bfb3e0c8c61",q.Loot_dash_background_lobby="b9d3c36a-1556-4fa5-be20-a172fcbfad5c",q.Loot_dash_lobby_cover="f6de9afc-10c1-464b-876c-ae629a2db04e",q.Loot_dash_logo="62e073cf-2f99-4804-b7eb-9da1cb430a8d",q.Loot_dash_transport_modal="7ee205b5-e2db-4928-9482-eab245f28125",q.MB_Treasure_track_May_2024="65b8b2db-e056-4969-8908-58d7ad5123b3",q.MP_Intro_Modal="1e429705-e210-4be8-9b24-c0dc8d71b6bb",q.Magicoin_pile_core_no_glow="f431c3ad-ccb0-4d30-8975-82ea4a280570",q.Magicoin_pile_core_small="2bd05195-60b4-4734-b661-bd53b22ce7fd",q.Magicoin_pile_single_image="2566ba35-b257-411f-8ab3-6429c68d2cc1",q.Mama_Star_Tooltip="7e31bd48-f72c-4c62-8a8d-ffbb8819bdbd",q.Map_icon_moonlightfest="5d058aa4-a824-45ba-9b1d-cfacb990fe21",q.Map_icon_pumpkinfest="4aa9f4a2-1fa2-4f1a-bf9a-bc669c68931d",q.Map_icon_starlight="7067d4dd-7d0a-4073-aa44-7e299f6cd0fe",q.Marble_large_active="d10ec19a-5675-4176-b604-2682fd5a46c4",q.Marble_large_default="d97071f6-18c9-4ca7-8c21-c9af9751af39",q.Marble_large_hover="39aeccae-f28c-4520-9135-27c855b39566",q.March_2024_teacher_gift="f7d0b888-137e-483c-bb3b-ce1d59499552",q.March_2025_teacher_gift="9f6b9ce8-0322-46bc-9e8e-a7ebd692cf52",q.March_2026_teacher_gift="7ec2eef0-f56e-4f92-a718-45cb38f87a9f",q.Matchboard_player_rifts="9f8a328a-6794-466b-a155-983c7934c5c8",q.May_2024_teacher_gift="08c7d742-b372-4593-841b-4dafef6f21ba",q.May_2025_teacher_gift="29626c58-0cc4-4673-99f7-6e1f7f1f7598",q.Mcoin_pattern_celebration="f0b20b12-e885-40c4-bbb8-da09abff6462",q.Member_frame="28eaa4b0-5039-495c-a806-f1081fb89d72",q.Member_jar_empty="dee4a641-4c79-410e-bf21-96c2e30eb41d",q.Member_jar_full="9979d576-b03b-493e-80e3-a8965c1049c7",q.Member_jar_half="a5957dc3-8a04-4c50-a8af-beb626d85d6f",q.Member_jar_little="a3fd68dd-926c-462f-a554-1e3d6e5040d7",q.Memberbox_mailer_june_2024="36058cca-b83d-4023-8f7f-6ce1175eed9e",q.Memberbox_preview_mailer_image_December_2023="5ff35ac2-b754-42fc-8566-f0f8f9a392c1",q.Memberbox_preview_mailer_image_May_2023="075aed6f-065a-4228-ba28-2d4c88023a4c",q.Memberbox_preview_mailer_image_October_2023="14aa1ede-d22c-48d9-9920-a84c941b94cd",q.Memberbox_preview_mailer_image_September_2023="aae9840c-3953-4c9e-aec1-094e397736de",q.Memberbox_preview_mailer_image_april_2024="55d648df-d8ae-4066-bdd2-7c1c7f52ed94",q.Memberbox_preview_mailer_image_aug_2023="49b8015e-5747-412b-a5eb-4387a614608b",q.Memberbox_preview_mailer_image_february_2024="d1b28dcb-b711-4548-9eec-803172773bd2",q.Memberbox_preview_mailer_image_january_2024="8855f77c-e520-4085-818f-270d22199c58",q.Memberbox_preview_mailer_image_march_2024="39a186ee-778c-4401-9cab-a0a6f36002dc",q.Memberbox_preview_mailer_image_may_2024="473b62ab-8afb-4fe0-9fe9-124c80ae0122",q.Memberbox_treasure_track_mailer_June_2024="8204f4ef-8675-4932-ac23-75b00543a84a",q.Memberpet_icon="d512556b-5825-46cb-9d63-c7cba6cd4465",q.Membership_Modal="d73e3da6-71c7-4335-818f-21713bf66716",q.Merge_rank_badge_small="66ace882-bea9-44a5-b7b1-24d212933b3e",q.Mini_member_icon="54c86c56-d5a7-4306-b3c0-c6fdc9797f5a",q.Mini_member_icon_b="b0d5ee17-3749-4be6-85dd-a4abe432d9da",q.Missing_asset="d2d5dd32-08e1-4c39-9ae2-771ba5d49ee3",q.Mlp_arrow="9b2914d7-34c7-4ed9-9817-cc229e9b49de",q.Modal_banner_blue="4acf024d-76d5-4cf3-90fe-a5b32e85f713",q.Modal_banner_green="551b0540-f04c-47bc-8fbc-e463090e8745",q.Modal_banner_purple="504115e9-eb66-4eb4-9f3d-643706d0b11e",q.Modal_banner_red="1f970558-2087-4ffc-8054-6749c4fc0d29",q.Moongems_promo="3beeb7f2-1f91-49a8-bfe8-e2847b939b30",q.Moonlight_loading_screen="8106c7ed-f79b-40c0-a74e-9e69c0daac88",q.Moonlight_statue_boss="3615bcf2-580b-4b11-8a24-db5c08880dd3",q.Moonlight_story_1="e9da43f1-71ea-415e-8c4e-25e910d2a4d3",q.Moonlight_story_1_intro="18364aaf-4329-445c-97b8-01c27ab72152",q.Moonlight_story_2="ddd1fddb-d0ec-44ea-b74c-aefde9540503",q.Moonlight_story_3="66153fae-8dc2-4464-904f-bc11d18fab5b",q.Moonlight_story_4="2575bfcd-9563-4b6a-888c-6683d053b5c1",q.Moonlight_story_5="585b8917-6c2b-4720-af8c-c414c2f19d2a",q.Moonlight_story_6="3fb66fc6-d2ba-4fff-8949-2d49cc43c35c",q.Moonlight_story_7="694f9302-5008-4833-95a7-fbacc609b86b",q.Moonlightfest_wizard_watch="8d1b38d5-4290-4340-9f9b-4ad48a7b540c",q.Mount_above_1="3f7065b4-66eb-45e0-8f8c-fd47f33ad983",q.Mount_above_3="4f4f93b5-70b4-420f-9f6b-eab2d696f788",q.Mount_above_5="09d4b806-3dee-4c61-9b79-8ca8e9afc7ed",q.Mount_below_1="afd8ee62-bad2-44fd-8914-eb9e8311267e",q.Mount_below_3="caf0954e-3f50-42c9-8b25-5fdcb0ccbe38",q.Mount_below_5="1f0dc981-0d0c-48b8-b271-b3394d8c205e",q.Mp_boost_popup_image="1459209a-12cf-49a9-80f2-4b650f61a7eb",q.Mythic_Aquadile_Hero_Pose="5c3b2a6a-5c80-4de8-b1e1-662397000e21",q.Mythic_Arcturion_Hero_Pose="994e3475-3401-46c0-8fb8-745dec04a779",q.Mythic_Barkbarian_Hero_Pose="3ce8eca7-bbfb-4777-b07b-74e56344ba2b",q.Mythic_Blast_Star_Hero_Pose="eb449254-d605-447b-b7bf-62e27729ac08",q.Mythic_Buzzra_Hero_Pose="aed197d5-117c-4e18-9911-a9e23930059c",q.Mythic_Cerenox_Pose="c67a26ab-8d6f-4ffe-8aa4-28989531f4e0",q.Mythic_Cryospike_Hero_Pose="fadfc104-7135-44d3-bc2a-3faae84e1b4f",q.Mythic_Drenchor_Hero_Pose="77b0b732-6891-49d4-aa92-3a5db19041de",q.Mythic_Eclipse_Hero_Pose="7cd47d89-158b-47a9-a62c-bfa04bfc48ce",q.Mythic_Frozzra_Hero_Pose="d2161848-a95c-4fa1-b484-a9aa2f24333e",q.Mythic_Glimmerwing_Hero_pose="c3d73260-0603-4997-a07d-f9fe43943bc9",q.Mythic_Gryphroom_Hero_Pose="70895dfc-0ece-4914-aa42-ba1ad3fceae2",q.Mythic_Gryphtopus_Hero_Pose="52b4c776-810c-4d74-a180-9003acddc911",q.Mythic_Hydroid_Hero_Pose="567de9a3-9c98-4a2f-911c-980528e76609",q.Mythic_Intitalk_Hero_Pose="18ac7050-4625-41d7-aa2d-9549fd069de0",q.Mythic_Llavama_Hero_Pose="01bd195a-d706-430b-b8f6-03e25ca7265a",q.Mythic_Luma_Hero_Pose="6112d42b-f6ab-458c-9a66-6a9c84d9777d",q.Mythic_Luna_Hero_Pose="57922fd9-f372-4777-832a-ff22fc6a5902",q.Mythic_Magmayhem_Hero_Pose="c35706fb-f12d-4596-b602-e374cefbeab4",q.Mythic_Merahawk_Hero_Pose="8b84fd0b-9533-4cd8-ad30-d65b40478c35",q.Mythic_Nine_Tailed_Fox_Hero_Pose="e8f7084a-de99-4a99-b388-84b2c4755f6e",q.Mythic_Polartide_Hero_Pose="43d66525-973a-4094-9d13-f1b094ff8f96",q.Mythic_Pyrodile_Hero_Pose="be78f521-b9b8-4ed4-a996-04fa3d6bd839",q.Mythic_Serasoar_Hero_Pose="5130e997-e2d9-4654-8517-a24ba25d2020",q.Mythic_Shimmerstorm_Hero_Pose="8a68da24-e357-4777-bb9f-7c78711bca9e",q.Mythic_Shiver_And_Scorch_Hero_Pose="01a58c05-f7fd-42df-99ee-97feaa3750c8",q.Mythic_Solar_Hero_Pose="07f8e16d-dfbf-442e-acaf-71268c370f58",q.Mythic_Splash_And_Spark_Hero_Pose="05575a36-5e6d-4133-86f6-e934e612ac2c",q.Mythic_Thunderclaw_Hero_Pose="19c921b2-a615-4d05-980e-7d9eb847f787",q.Mythic_Tidus_Hero_Pose="51cac9a4-c1eb-4a91-9325-be98321d382a",q.Mythic_Vegabloom_Hero_Pose="69f5c30c-d1f6-4556-a1c7-89a1fa93a9aa",q.Mythic_Verdama_Hero_Pose="bb9fd3a9-b9e1-4303-b310-f0b9c1a55be0",q.Mythic_tab_bg="af2481a9-617b-4df5-a7cc-c8e818e064c2",q.MythicalEpic_WW_Aquadile="43c28104-403e-4b93-a565-dac539815667",q.MythicalEpic_WW_Arcturion="4257bcef-de30-4258-8557-2c3d552eb9f0",q.MythicalEpic_WW_Barkbarian="6aeb941c-f9e1-455f-a358-372f7e1a205c",q.MythicalEpic_WW_Blast_Star="2161440a-1a68-4df3-907e-dd2d66753f29",q.MythicalEpic_WW_BluefuryMagmayhem="83640d16-f8d6-4f5c-b41a-5177b5839221",q.MythicalEpic_WW_Buzzra="df713468-6c5f-4b13-a733-b8160f4e377f",q.MythicalEpic_WW_ChillnChar="1ca6bbac-2120-4a7f-9254-83f7f2b52af4",q.MythicalEpic_WW_Glimmerwing="1205771f-76b1-4e85-8aa6-d167b9fcb61a",q.MythicalEpic_WW_Gryphtopus="c29f3680-9580-4a9a-984f-7c50aa672ad3",q.MythicalEpic_WW_Hydroid="81a44379-9ac2-42b7-ab01-2acb73c2f297",q.MythicalEpic_WW_Lumanight="22116dd5-d3a3-4bd3-8f06-c5da9957a634",q.MythicalEpic_WW_Luna="66690b5e-08fe-439e-a955-b675ba48548c",q.MythicalEpic_WW_Magmayhem="69e7b184-cd7d-4af3-a803-677dfe279ba1",q.MythicalEpic_WW_Nebula="34a025e5-80e0-49c8-a8eb-d7f4c2443424",q.MythicalEpic_WW_Pyrodile="ad3d00d2-af5b-4bb9-aad4-9eccea17fc58",q.MythicalEpic_WW_Shimmerstorm="eccd283d-9829-4142-8096-5e6e587c1309",q.MythicalEpic_WW_SnowyRiptide="1fe4b8db-9d30-47c3-a308-e3cb6fd5b882",q.MythicalEpic_WW_Solar="a763d26e-f1b8-4123-9422-66d304ae7ea1",q.MythicalEpic_WW_SplashSpark="23f8582b-879e-421a-bd39-447978dd4243",q.MythicalEpic_WW_Tidus="185d4b16-0fe4-44cf-a906-d494c15a2f05",q.MythicalEpic_WW_Vegabloom="2e80ce74-2893-452a-a4f6-e8665a5c6687",q.New_member_tooltip="99e45e46-4388-4829-97e5-c557a728d9bd",q.Nicknamer_pedestal="e2b8bbae-f585-4b59-aa89-549b9c2c82ef",q.Noot_prompt="65a1e456-b9ee-46ea-969b-8846a5952359",q.November_2023_teachers_gift="3df6a108-c4b7-48c9-bdd8-c85bc1ee250a",q.November_2024_teacher_gift="02f544b2-70e8-4d30-b374-d01499d0fc26",q.November_2025_teacher_gift="1b5ccced-4a8c-47f1-807e-e0cc9fcb9eea",q.October_2024_teacher_gift="6d4dd436-b605-4e10-a47d-1a8ed25ac142",q.October_2025_teacher_gift="67ef29bb-0ed5-4148-bc68-7181781ebd02",q.October_2025_tt_home_screen_background="c57e8901-7703-42af-9b5a-636d83de53ce",q.October_tt_home_screen_background="20fe6e9f-7184-4560-8eaf-92580a5fa41a",q.One_million_question_reward="7db9c933-d74f-4c33-95fc-53ff443564bc",q.Otp_background_tiling_pattern="2b0f34e4-af12-48ab-923e-ea4f8b1d1aa1",q.Page="c355f557-d0fe-43d2-bcbb-191e47cc2dc1",q.Panel_star_small="db35c76f-546e-4f79-a31f-779c458811d5",q.Paper_section="d7076e68-3f9c-42cb-a997-94740a3fb268",q.Parallax_tier1_back_small="ce253584-d2eb-42e4-8d17-16a8bd9275a7",q.Parallax_tier1_front_small="b1e29a81-834d-4697-9df0-222e574c9d4d",q.Parallax_tier2_back_small="316fa102-aed2-4889-9c94-96627c9d155e",q.Parallax_tier2_front_small="c6ec31f6-57a0-40d6-b15c-123e413071b8",q.Parallax_tier3_back_small="20e7a3ed-224d-4314-ab1d-83f7a4a020c7",q.Parallax_tier3_front_small="309d7511-5399-4507-a40d-aff668bf187e",q.Parent_account_signup="5af11e88-29aa-4cba-aad9-aaa3e3dfc794",q.Parent_attach_video_image="e9ea9155-a841-4c20-b9f7-a983f3414491",q.Parent_image="de6541d6-e770-443d-a351-9be8b41210ba",q.Parent_panel="86748226-3d3c-40f8-a867-e0208ecf7b6a",q.Parent_rewards="0a77af6f-413d-46e7-9f2b-771b3647c6ec",q.Parent_rewards_1="e6a054b1-7c54-4be2-8f28-0271f6da209d",q.Parent_rewards_2="4ca8bd98-ac6a-4ae0-bfb7-5382208b9c25",q.Parent_rewards_sparkle_pup="d947477b-3d58-48e8-a3fa-d21592776c01",q.Particle_astral_ball_1="e7ceb024-bb47-48f0-a5f4-2ee343898a73",q.Particle_astral_ball_2="32324fc0-0b71-4673-8ba5-f6522fda7932",q.Particle_astral_dust_blue="00be5a73-4d6b-4b06-a238-bcd1ad98ff58",q.Particle_astral_dust_blue_soft="52c61443-0b5d-4300-885b-846efe4909f1",q.Particle_astral_dust_star="dd1ddceb-1072-4b4d-b137-2bc922d01ed4",q.Particle_astral_dust_yellow="8ffcb05f-8597-457b-8ff8-fbdcce474442",q.Particle_astral_dust_yellow_soft="f92674f4-d0a3-4df2-8422-a17e0d4611b8",q.Particle_astral_glyph="822eef05-a960-41b6-81b8-46f5cabfab2e",q.Particle_astral_petals="a1d69150-eec8-4d3c-8c70-2a416340b739",q.Particle_astral_sparkle_blue="32ee4d09-3aff-493c-8d82-006bee5c6c00",q.Particle_astral_sparkle_yellow="19f18918-d3fa-4d40-b26d-346a38b21609",q.Particle_astral_star_large_yellow="32c9b107-08d1-48eb-be05-7d6da3676bf1",q.Particle_astral_star_small_blue="809339f2-2d66-49d5-8b07-138b8a302455",q.Particle_astral_star_small_pink="e46f5915-acdd-4c6c-a6d3-06e6216786fc",q.Particle_astral_star_small_yellow="9dd15a97-e337-4272-b5d9-9e6638f5988c",q.Particle_astral_wave="126d2f4a-055a-462a-b0c1-77d3b6bfae93",q.Particle_basic_1="8b98758e-f41d-4f3f-92a9-d3b4f641e94c",q.Particle_bubble_shipwreck="02983da0-2672-4043-983b-0d6550810229",q.Particle_circle_icon_glow="01a64028-4a08-4f3b-8710-cd68af2d3ad2",q.Particle_confetti1="4a5cf85e-9065-441d-b600-89448b1437f5",q.Particle_confetti2="6deed511-8f75-42d1-930d-6abc5d799575",q.Particle_confetti3="0bb60ba7-7fa1-452b-aa30-db0ae78b9573",q.Particle_confetti4="a122e368-e4b3-4389-b26b-3ed3ce1582a5",q.Particle_confetti5="c0000d36-1328-4321-9858-d620aca97753",q.Particle_confetti6="54ef243a-624b-490e-bb3a-ec591d067f30",q.Particle_confetti7="1dbc4d29-1301-4bf7-9470-bd0fd6f68925",q.Particle_confetti8="006cf741-4712-4bbb-9fbb-0ca79ba5b309",q.Particle_confetti9="e12a01af-1699-4ed8-b778-b5162a873bfd",q.Particle_fire_dust="76538aca-620a-4480-b169-63c31a2b5ffa",q.Particle_fire_fireball="3d925935-5e5f-4ff3-ad8f-9d2cae086c62",q.Particle_fire_flame_1="166e6c0a-553d-4e28-998c-d7ebc7982b3e",q.Particle_fire_flame_2="36482bb5-10e3-491c-9731-a169e5e777d0",q.Particle_fire_flame_burst="0e26e98d-8fb3-49df-ae87-beef2c0aad3f",q.Particle_fire_lava_ball="95ba21fb-e6d7-4a46-b92e-2e7be62848f8",q.Particle_fire_red_ball_soft="62db4975-f0f6-4970-ae62-b8edad9e93c4",q.Particle_firefly_expert_magenta="da7a3673-b9e2-4a2b-8c46-9eb323ad94fd",q.Particle_firefly_hard_blue="7b8fa28c-ae42-4437-9d49-d2ee99563e91",q.Particle_ice_shard_1="5ad16175-74c3-40ce-9a5c-6e4730fc0e83",q.Particle_ice_shard_2="62f90932-6ea4-4923-bbae-b8b55bba9d41",q.Particle_ice_shard_3="bd71f620-31b8-4093-8900-a46c1af72cde",q.Particle_ice_shard_4="aa0a2cd3-78c7-45b3-9c57-8fec7b36647c",q.Particle_ice_shard_5="1fbd2f2e-76b4-442e-870c-c95614b3e9a1",q.Particle_ice_shard_6="98d63c06-0142-4439-9cdc-8305b6c673f7",q.Particle_ice_shard_7="ac32311a-2a97-4b2f-a646-36971cc5733e",q.Particle_ice_snow_flake="82d050c7-f1ea-43af-b27f-5dd5f867bfb4",q.Particle_orb_pale="255174d7-67fb-473e-8691-fbea7f3a586c",q.Particle_petstore_1="b2f422f3-c00a-48b1-b6ad-f8fa6385fe80",q.Particle_petstore_2="3a576d53-d95d-4a12-beb6-950201120052",q.Particle_petstore_orb_1="f24ca185-eda1-4a1c-b5dd-21a0376e51c5",q.Particle_physical_ball_1="e036d562-6605-479e-bfd7-42a72f53e6eb",q.Particle_physical_burst_1="372c863f-b1ab-4be8-88b6-635e3759b783",q.Particle_physical_burst_2="4389c6d3-8621-44ce-8674-1d686afde153",q.Particle_physical_dust="80049b7d-55c1-400f-ad34-6a24df7e522a",q.Particle_physical_spear_1="5f6e4a7e-2d22-4f7e-b510-7844b7b02055",q.Particle_physical_spear_2="c17b93a2-beb6-4e5d-a103-335fccc4a5de",q.Particle_physical_star_yellow="97b056ca-21de-4924-9ee9-e0e839194d9e",q.Particle_plant_dust="aaaea424-aee1-43c3-977d-865f6893e293",q.Particle_plant_leaf_1="6e33d7b9-ac04-4668-a8ab-a61c61919a9b",q.Particle_plant_leaf_2="8eff52cf-a098-4005-b8fa-5f5a4127f244",q.Particle_plant_leaf_3="95bc75da-809c-4902-b1ae-536d9eba77bd",q.Particle_plant_leaf_4="51683980-a483-4123-a1a1-840f4eedaa43",q.Particle_plant_venom="e4eed321-8f28-4f91-9cb5-5d1b27223f03",q.Particle_plant_wave_1="8b4f567d-d641-4d00-8e92-6add1911b606";q.Particle_shadow_ball_1="16f0d3c3-725a-4a35-8e6d-902f5341e2f3",q.Particle_shadow_ball_2="4d408085-bd8a-4ee9-84a1-0c4c24daff62",q.Particle_shadow_ball_soft="61bfbd86-339d-4e3c-8721-2dae436b9073",q.Particle_shadow_dust_dark="23b7ce78-ad78-4a94-90f9-3f0f856cb5a2",q.Particle_shadow_dust_purple="e094999f-361a-4822-9697-13930ed491eb",q.Particle_shadow_fire_ball="f5bc36d7-2211-465e-996f-78670d1d9b02",q.Particle_shadow_portal="71db7306-a3ee-47e0-a9b7-9cc613e9f12e",q.Particle_shadow_ring="fcf63589-ff24-49d2-97ac-a4ab57718cfc",q.Particle_sparkle_white="161cb905-922b-4431-93e0-996c795d9ce4",q.Particle_storm_ball_1="9fac7f4a-a233-4f3c-8163-3f73c65b9ca7",q.Particle_storm_bolt_1="947c2857-bab1-4822-a3e6-187a214b1d9a",q.Particle_storm_bolt_2="a3b1a537-28b6-4221-a3e6-1b55a5247e4d",q.Particle_storm_bolt_3="dac88ca7-8cfc-474d-ae78-dcae37ea40e3",q.Particle_storm_bolt_4="daaa617d-d8ec-4d72-b8c7-8930619865c1",q.Particle_storm_dust="79f0588d-3840-4b6b-9495-5fc7200c0755",q.Particle_storm_lightning_circle="52870001-4b11-42b5-b7eb-87c0e0ff9e8e",q.Particle_storm_lightning_circle_2="a86bea4c-f778-4c73-87b4-5f18bc1d3b9f",q.Particle_storm_wave_1="8503f5d4-d40a-48a0-a4e4-0cd83afceb53",q.Particle_water_ball_1="d89f6c2b-35be-4ce0-b536-17fbde9aaaab",q.Particle_water_ball_2="8bc4e1eb-ddde-4678-8b54-c43d903315a7",q.Particle_water_dust="fcd29adc-d7c4-40b6-94f8-09df22bec3a1",q.Pbf_magicoin_launch_modal_back="f939ccab-da76-425f-af74-5afa8f639bbc",q.Pbf_magicoin_launch_modal_free="a6f93efb-a500-48d5-97b5-17405f053f3a",q.Pbf_magicoin_launch_modal_member="a4e07150-16f2-4836-9b85-ee1dabf359df",q.Pet_Lore_Charfoal_banner="605f945e-5b9b-40fc-82c1-948094259914",q.Pet_Lore_Mermina_banner="df7f2040-53ea-4326-9157-5dbbc8bd098c",q.Pet_Lore_Snowfluff_banner="2c6b4623-7671-4ef2-9e8c-b215a8b00339",q.Pet_Lore_Sproot_banner="73fac858-ac00-4c0b-b180-211e4e1ba34a",q.Pet_Lore_Wott_banner="54f674f6-cfc1-470f-a00d-4998d559f746",q.Pet_Merge_FTUE_New_Menu_slide1="d24a9a06-9e07-4197-a11a-071f19ee7b00",q.Pet_Merge_FTUE_New_Menu_slide2="ebd57b51-079a-4dce-8754-56866960bd8b",q.Pet_Merge_FTUE_New_Menu_slide2merge2="0ffc0fb5-7e9b-4dfc-9557-83573ca5399b",q.Pet_Merge_FTUE_New_Menu_slide3="78a41e9f-1177-4bd5-8e30-943bc55f4a7e",q.Pet_Merge_FTUE_New_Menu_slide4="dd0e75d5-0b7d-4320-8e9c-33087d8b08d1",q.Pet_Merge_FTUE_New_Menu_slide5="38b51a6e-aec5-4201-9d4d-1101259a9600",q.Pet_Merge_FTUE_New_Menu_slide5merge2="9bf515da-7b5b-46bb-8772-2e231e9769cf",q.Pet_adventures_trailer="d419aa99-b7ba-4337-8186-2ef14b6280a4",q.Pet_difficulty_indicator="6272d06b-907a-4d58-80fc-30e28e0ef441",q.Pet_menu_team_bg="a9ad0d82-6913-4429-ac1e-b9a45f5bb969",q.Play_button_64px="cc6eb105-68bb-4d4f-82c2-807d58005ed9",q.Plus_member_modal_full="d32f78cd-1f58-48eb-988b-330ff490780a",q.Plus_white="82ca61d7-0804-4edf-927e-e42ba2edb078",q.Pm_post_battle_1="244143b9-d182-4073-91bf-fda516720a60",q.Pm_post_battle_2="454af535-0e05-4853-af40-979b1754c4a2",q.Pm_post_battle_3="ab48346b-77c0-4883-a0c5-cad8c3a8ba88",q.Podium_decorated="2d96e9b1-4147-4451-8bc1-847f756ab6ff",q.Podium_plain="51184526-ed50-4c34-ac7e-89e008581eca",q.Popup_play_at_home_reminder="3adcebde-1dcd-437d-b74c-cb99adc587dd",q.Postbattle_highlight_chest="90efc070-cc41-44e8-8962-2ac9c87e9d1d",q.Postbattle_magicoin_member_title="6a48b7d6-6de4-48e5-8bf0-c27db052f87b",q.Prodigy_logo="001660e3-bbb8-48e4-9a75-fe0ddd138bd8",q.Promo_memberbox_may="cb453abf-7f31-41d9-bf12-b8765ea1274e",q.Prompts_catchmorepets="546b627e-071f-4add-857a-0d36e7ec769e",q.Prompts_catchmorepets_0="9395d630-8822-4dd4-ac95-11f659607cf9",q.Prompts_catchmorepets_list_0="f08fc684-9378-48be-9174-b77aa23483ca",q.Prompts_chest="b8c73e89-97c9-4c5c-87ef-7b1e9b9f4ad9",q.Prompts_chest_0="7eafde13-b75f-49ed-b79b-f6cf37121c8f",q.Prompts_evolvepets="aaf0f2f8-458e-479e-ad37-ff6e94c29072",q.Prompts_evolvepets_0="d06296c7-36d0-4780-97f8-24c9eef630bc",q.Prompts_evolvepets_list_0="7fb9039c-0480-440b-af4d-c862e2004121",q.Prompts_generic_1="53939fa2-3ef5-4e45-b1e5-b08a0b4b382c",q.Prompts_generic_1_0="0acb4b4f-d8c3-4b56-ac7e-b8684685a07e",q.Prompts_member_gear="8abf4af3-aab3-40e3-97c9-48cbe54b8885",q.Prompts_member_gear_0="eb64ac2a-867c-4952-91b9-207c77c7a498",q.Prompts_memberjar="b6c4647d-b11e-4cd1-b0df-de738fdb961a",q.Prompts_petgear="fd2ff5a6-98bd-47e2-9048-11d50647488c",q.Prompts_petslot_churn="dab27a1d-5c66-48ce-a699-cb0bb0a27f37",q.Prompts_petslot_newmember="63b931ab-459f-47ea-b2f1-0bdfcf98fe7f",q.Prompts_starjar="7b65adea-8ba1-4f34-9344-a15f1618bc0f",q.Prompts_starjar_0="ac4cc8ae-f0ec-4f71-8e58-6c87a63b5c8a",q.Prompts_valentines="d2d7b68d-cf2c-443a-83eb-f29b2e0b8ff4",q.Pumpkin_coop_story_0="a14d0f45-f279-428d-93c0-f05066556ba8",q.Pumpkin_coop_story_1="b73a40d0-4158-452d-89d4-a9defa27e16a",q.Pumpkin_coop_story_2="5fc4189f-f407-4b67-9ebe-21f00299f27d",q.Pumpkin_coop_story_3="56b84f54-4784-4bd2-bbea-0ed382fc1f24",q.Pumpkin_icon="0b64fbc3-998a-403c-8f2f-9e2d4af52186",q.Pumpkinfest_boss_2023_wizard_watch="1f60bc3a-1c83-41fb-aec1-956347ba1dfb",q.Pumpkinfest_loading_screen="2eba08ba-f9d0-4fea-a9c3-dd29eb2fabe3",q.Pumpkinfest_modal="5ca70fc8-314a-42d8-8bb4-48475bba3883",q.Pumpkinfest_npc_1="09f61562-c720-4062-ba0d-881f5c3883ee",q.Pumpkinfest_npc_2="b0802ba8-4434-48bf-859c-455909cc0b50",q.Pumpkinfest_npc_3="9ed8df8d-5e24-44ef-aa16-3e6f1ea4a2ce",q.Pumpkinfest_splash="2747718f-7086-4ff1-853c-4d85460d84ee",q.Pumpkinfest_statue_boss="cb6bd48f-eb5a-4576-be87-73845ecc76a7",q.Pumpkinfest_wizard_watch="ed93d10a-5639-486b-beb0-4ed34b436a4a",q.Pumpkinfest_ww_rewards2022="2d10017c-9d6c-4c9a-9922-acadd0b5b518",q.Puppet_master_portrait="1c1c883f-86bf-4cd2-86d8-1df2a9d8baed",q.Puppet_master_returns_splash="bda343af-0bd9-4ac2-b8a5-13d14a57536c",q.Puppet_master_splash_modal="01e67204-26eb-42cb-bf5f-8b8039c02223",q.Pvp_seasons_prize_sign="137c9e4a-bd64-4f5b-82be-e0fda675cd41",q.Quests_ArtistsAlley_MayJune="7f5582f8-3849-4081-af1b-2b1807db77e7",q.Quests_FF_December_2024="719e3f20-b02a-4ab3-9e63-1cbe14ca4670",q.Quests_HotCold_AugSept_2024="45375410-e3a6-4b2a-92dc-94f2860256bd",q.Quests_JBBQ_June_2025="5a86096d-fe11-4979-9a06-e8a6def1a65f",q.Quests_Magicoin_October_2024="00f350e8-79b4-4ace-9eda-dd4558130120",q.Quests_MoonlightDance_April_2025="f18b785c-5eda-4680-b556-54405ccf80c6",q.Quests_Pirates_March_2024="17003ff9-19da-4dbb-a717-766d0ccc4eee",q.Quests_SG_February_2025="ac308138-630c-4d31-8c4d-d1d0e5a9b747",q.Quests_SS_October_2025="ad5ff85c-61b8-4ad9-910e-5a59d9ebb1c1",q.Quests_starry_aug_2025="5fdacd87-05e9-42ec-8aca-43b4ba7098eb",q.Replay_unlock_gerald="35a6c6df-2007-44ac-8161-fbf58f71fafb",q.Replaycampaign_loading_screen="e9dd52e4-26c7-4819-8f82-598f230d5a35",q.Restriction_Card_BG_Green="cd571770-dfd1-487d-8444-666850b052b0",q.Restriction_Card_BG_Red="30b9db45-8ea2-48e3-9060-215e534978fe",q.Restriction_banner_BG_academy="ee8a76bb-8edc-46fa-a5a5-e423545602b4",q.Restriction_banner_BG_bonfire="76cc922b-0ff0-436f-ade5-5db13bfa61ed",q.Restriction_banner_BG_firefly="39559ecc-021c-4fd6-baed-0c97ad8c67b2",q.Restriction_banner_BG_puppetmaster="70d7fb05-7b65-452f-828c-f6f24847e1de",q.Restriction_banner_BG_shipwreck="bfec1718-b37b-4c8c-9812-8d99469f9c35",q.Restriction_banner_BG_shiverchill="b0192a39-6675-42e8-b9eb-79f64c44ee2e",q.Restriction_banner_BG_skywatch="cee1b226-0bc3-4e12-9e5c-43d155c4142c",q.Restriction_banner_cebollini="4d9fa613-ccec-46a6-bacb-92660b69c397",q.Restriction_banner_cloaked="a18c7b77-1d0c-4b19-8413-b8718a2a5a2a",q.Restriction_banner_cloakedfire="a2226624-5220-42c7-b1bf-557441744a3b",q.Restriction_banner_cloakedice="51d4f58c-057b-415d-b9c5-9a3fde6a3754",q.Restriction_banner_cloakedplant="1f6e40d3-42be-4c14-b7ff-9381007b0890",q.Restriction_banner_cloakedshadow="1acbba7e-43c0-4ffd-b27b-5e70e3d1fc9f",q.Restriction_banner_cloakedstorm="2632fe2f-b439-45cb-b6d7-693f5f423d30",q.Restriction_banner_cloakedwater="578b8815-fc2b-4c03-b2bf-66c3b5dbb4da",q.Restriction_banner_gerald="d949cf78-987b-494d-b9a0-4e97c588641e",q.Restriction_banner_hardmode="3311cf49-d68a-4c02-99ab-e68ff3997854",q.Restriction_banner_icewyrm="d8446233-78f7-499b-b711-c12f85765fa1",q.Restriction_banner_nastycloud="e0fb6bea-753b-4642-9ade-34f7bf1962f5",q.Restriction_banner_oldone="68396481-b137-440e-b987-20810c24805e",q.Restriction_banner_pippet_endgame="040482a9-ed2b-41da-a3a8-e4ec428227c8",q.Restriction_banner_puppetmaster="a2ccd2a6-f484-4924-a2ec-bf8209b0893c",q.Restriction_banner_puppetmaster_endgame="957eea92-99a6-42c7-9cd4-15c637fc5567",q.Restriction_banner_puppetmaster_illusion_endgame="cb82579b-6f70-4dc5-8af8-b168171e82af",q.Restriction_banner_title_cebollini="8a50dc3c-5507-4345-b0ac-7364d5ee5af7",q.Restriction_banner_title_cloakedwizard="b1c1b8ca-4b4b-487f-844f-691d5d0f6e30",q.Restriction_banner_title_gerald="6457e30a-28c9-402d-9145-e6bf87b5534c",q.Restriction_banner_title_harmode="b58202ba-d988-48be-8954-9af2f7d7cbf4",q.Restriction_banner_title_icewyrm="dbfc58de-2985-4ccf-9281-75a4dbdae43a",q.Restriction_banner_title_nastycloud="af08a882-71a5-4de4-8ed6-2d07b9b126a1",q.Restriction_banner_title_oldone="cfee59f7-dceb-430b-8175-1e7594357640",q.Restriction_banner_title_pippet="ebc4f820-7eec-43bb-81e5-335fcb94ebc9",q.Restriction_banner_title_puppetmaster="f2020e7e-99e7-40f3-96aa-369676aadcb6",q.Restriction_banner_wave_bonfire="cd7890d5-7cd8-4993-a881-09ea8f765afa",q.Restriction_banner_wave_firefly="27df4960-c576-4db8-841e-227d6baa01e5",q.Restriction_banner_wave_hardmode="cadaed92-ef51-427d-812a-32f050696b36",q.Restriction_banner_wave_puppetmaster="86f08038-cd8a-46e8-9336-cab629383ad2",q.Restriction_banner_wave_shipwreck="4eaeef0b-f54b-401e-a4e7-98839cabd40f",q.Restriction_banner_wave_shiverchill="59bde7f6-f279-4689-a081-36be8c7205da",q.Restriction_banner_wave_skywatch="9cada148-898b-4d05-a16b-cf178c4d3881",q.Restriction_free_merge="355e5432-87ef-4208-8cda-f063b6675656",q.Restriction_free_rescue="c254cdcc-540e-498a-ace4-1ffc0ce9632b",q.Restrictions_extreme_background="8662e647-0b64-41f0-a647-7fd0edf1fefc",q.Restrictions_extreme_rewards="2b8297d8-e469-48d5-b1eb-64b2e8a9c047",q.Restrictions_hard_background="a6930f38-193a-4ad8-85e4-3731a0776bc3",q.Restrictions_hard_rewards="98e858b1-c69b-4087-bccd-c93bbf8a3f08",q.Revamp_star_frame="b9f3d4d2-e858-49ed-8e34-2946f8ea7ff5",q.Revamp_wooden_frame_store="2a1a001d-be02-4e2c-b302-76ebbbad3e50",q.RiftRunKey_1="d356ddb2-7802-4be8-9d38-a6f83f62621b",q.RiftRunKey_2="765f1557-dc57-47e3-b53a-360d3383fb69",q.RiftRunKey_3="fa2ac725-959d-427a-b50f-ef5e43f8b9c8",q.Rift_base_active="24d11b9b-954e-4730-b19d-0ed869d6385d",q.Rift_base_active_dragon_large="bb48466b-2312-479d-8a50-42d6c1910fca",q.Rift_base_active_miniboss="a98920db-59fe-4585-a882-753d734ca881",q.Rift_base_active_miniboss_large="bb636f9f-6357-4a48-8076-0596a84bb441",q.Rift_base_done="843e39e5-8793-4aff-8bdb-de50d04302d8",q.Rift_base_done_large="e0224bb5-d043-4bbc-bb70-76fe4c1dfd31",q.Rift_base_locked="c2bdd83a-ce9b-40bb-a5a2-67f06c19993b",q.Rift_base_locked_large="8d51988b-bdc3-45b8-8198-d0279cad28cd",q.Rift_base_prize="771150a0-80cd-417d-b879-a64b6e76903f",q.Rift_cycles_fr_1="1ba81c1b-6cad-4e07-97f5-2c2b3e6c97a4",q.Rift_cycles_fr_2="0c7529b8-2c95-4e90-adb4-2accfff2fbde",q.Rift_cycles_fr_3="cc55c76e-2d0a-4055-921b-441526238f84",q.Rift_golden_cycles_fr_1="37a77ac6-2afa-4ac9-8aa4-6e24e24a65ca",q.Rift_isle_base_large="0c9fd0f1-c48b-4b75-a569-bbe4d53493f6",q.Rift_isle_base_medium="54c616ea-1bb5-4b6f-b502-8fe443459d59",q.Rift_isle_base_small="5942823c-6a8c-4886-a096-c8e9e300d803",q.Rift_isle_top_large="abef3841-3b3c-405c-ac34-50fa0c6583b8",q.Rift_isle_top_medium="432cd616-0e54-4bf8-8a05-423d03499a2a",q.Rift_isle_top_small="3372bbb5-6beb-49de-a8c4-1095ca8ff902",q.Rifts_currency_astral="8b1bf7b7-2602-49b1-9935-ed2d86275530",q.Rifts_currency_astral_store="bf6143bf-5203-486e-aef2-4c60b50d7289",q.Rifts_currency_default="f5440d65-689b-4102-b532-105e5f5814f7",q.Rifts_currency_default_store="7d7892a7-1fa3-48ab-93f1-83094331a2cf",q.Rifts_currency_fire="a723b6ee-ac02-4f60-8453-a35a96735d4d",q.Rifts_currency_fire_store="d52bd2ac-b414-4d03-8894-9f51bd1ae087",q.Rifts_currency_gold="75ae6dd2-755d-4fd3-8d01-3bf8f1d42b4d",q.Rifts_currency_gold_store="168022d6-85ac-4831-9178-0e0f37569c88",q.Rifts_currency_ice="de1d1d90-1822-42c4-b4b2-2ff2567c7374",q.Rifts_currency_ice_store="0db027e7-3220-4fe6-8934-92f0e9ef3e9f",q.Rifts_currency_physical="3e40c032-3d78-40d6-91e5-8ce700420a80",q.Rifts_currency_physical_store="c4868c4e-3c60-41e2-b084-211a61a50770",q.Rifts_currency_plant="d148a810-b062-4f43-a084-37e0f825f0d9",q.Rifts_currency_plant_store="a705abc2-4d0d-41d4-9009-1e5d7e195cc1",q.Rifts_currency_shadow="8969e2f7-d310-4d7d-897e-f5e5c787b474",q.Rifts_currency_shadow_store="71cef4e0-012b-4322-953d-91080d340dc4",q.Rifts_currency_storm="167a71d6-e8e2-4d38-86dd-c52c278e7b40",q.Rifts_currency_storm_store="d72ca282-6d18-473c-bef9-68dfcdb9e432",q.Rifts_currency_water="e9ab45e1-5ff4-433d-9c48-9e092fb12519",q.Rifts_currency_water_store="3dc963b7-7531-4b20-b951-f8e0415c1c5d",q.Ruby_large_active="cc8ce92d-74c1-4675-94c2-dfd20584fb4e",q.Ruby_large_default="8127f8a0-201a-4b2b-8aa7-344aaee79996",q.Ruby_large_hover="0db96a33-3dd2-430a-a0bb-948b00ebfc7b",q.Sand_shortcut="5e51ca47-9e7a-4a52-a9b7-c208a70e410f",q.Sapphire_large_active="84357009-fb16-4001-ade7-0e956a7081fd",q.Sapphire_large_default="a398b0e0-4e41-412a-89c8-b1c2f376d1bf",q.Sapphire_large_hover="39648aa3-ee1f-4223-8b58-dd9918434e53",q.Scene_intro_bg1="06a4af0a-8dd7-4aa1-8780-daf7f7493be5",q.Scene_intro_bg2="a696e107-30b5-4d21-98cc-0583c6f28991",q.Scene_intro_bg3="3d8fbe36-511e-447e-995b-a71593d88d36",q.Scrollbar_thumb="b1e8b0a2-3df8-474f-a6e0-df70bfe58e53",q.Scrollbar_track="37d989bf-ccf4-46ad-bdfd-f5f3e226267c",q.September_2024_teacher_gift="35f67264-a0a3-470d-94f2-e5f454afe3d6",q.September_2025_teacher_gift="0928749f-59d6-43f5-92f2-9b4efb326bde",q.Shards_promo="1dca823c-f657-4ce5-988c-b456506d9bef",q.Sheets_dorm_17="91f2a7fa-6c42-4dae-ace1-8c9e8b144370",q.Shipwreck_1="488d78c7-7b2e-49b2-b4c7-ea0afb16749f",q.Shipwreck_2="9210c638-aec9-4890-bff1-bbe61168f3c2",q.Shipwreck_3="9e8a8ea0-5815-4b96-a909-3a2074b71350",q.Shipwreck_intro_v2_1="22da049e-0da7-4bf4-97d6-1ad4c5208087",q.Shipwreck_intro_v2_2="d37433f9-6fb0-48ea-a209-936c31bd55bf",q.Shipwreck_intro_v2_3="93a14828-ad61-46ec-9a28-26367ff9c205",q.Shiverchill_intro_1="5faec87b-7bbd-43bd-a373-b360cd097785",q.Shiverchill_intro_2="ae423479-e853-4f16-9c60-8c7aff258de9",q.Shiverchill_intro_3="89245504-555f-4c55-9c78-06d582f84b2b",q.Shiverchill_intro_v2_1="c328d909-cf1a-483b-bc44-ee084089ce3b",q.Shiverchill_intro_v2_2="32c7e585-4311-4ba7-882d-f0bfbbf02bb3",q.Shiverchill_intro_v2_3="9aac98a2-7754-4910-b9b4-010bbf395141",q.Shooting_star_blue="c0f7027b-1940-4231-a048-019c3ba044ef",q.Shooting_star_yellow="ccd30491-defd-4f5e-983b-429d2648b367",q.Showcase_box_sliced="4a97a9c1-2c19-4ddb-b247-3afcf1b2eee5",q.Skywatch_intro_1="f3bc2be9-26c1-4ce1-9159-b0d6e2f376b0",q.Skywatch_intro_2="c27e7094-9ad8-4007-8746-9ab52170cf6b",q.Skywatch_intro_3="44a8ba6f-a25f-475c-881f-8da9a4299e82",q.Skywatch_intro_v2_1="2d7b9acc-93e2-4d39-a933-b7e63d5adfde",q.Skywatch_intro_v2_2="5a37f448-7337-4261-bcc2-0360b765f6f9",q.Skywatch_intro_v2_3="0c773c9d-99fd-4fff-8c48-110fe158f896",q.Sleeping_floatlings_pop_up="a961cb24-d71b-4205-9435-f44adafcee01",q.Slice_big_notification="c3578718-0a82-48d3-845b-9b867d01fb6f",q.Slice_hud_bar_backing="ca727288-6294-47ac-ac21-d7425fa7191b",q.Slice_hud_bar_fill="0d336ef0-05d2-442b-9494-efe154771428",q.Slice_hud_label="b55739a0-de09-48e7-8252-f974d813659f",q.Slice_hud_label_hotbar="a68d0849-69d1-4663-8a28-59f48fea1142",q.Slice_input_big="b65d16b6-0cc4-421e-bd10-48385cdedf24",q.Slice_input_big_hud="e6c41608-7853-4baa-b844-d9452076072e",q.Slice_input_small="6514a0df-f16e-46cc-894f-6e234a74b15d",q.Slice_rifts_bg="d2a62bec-9590-46a2-9349-c5e7f3437a1c",q.Slice_rifts_bg_highlight="74d76c99-e9e0-408a-87e9-a204550e1d7c",q.Small_pet_124="928d7267-09b6-4efb-aaa9-96b99a441788",q.Small_pet_65="18493c98-6d7d-4690-a5ab-b8544c2780d9",q.Small_pet_68="c36c8132-f0a5-47a7-bf5e-1baf4d986f67",q.Small_pet_71="f53924a2-6d63-46e0-b1b1-1b22a62b7b35",q.Small_pet_74="5ddc18c7-b747-4ceb-8e50-ce85729646d7",q.Smart_block="17ce5182-90be-41f1-8f04-7476f9e83cc3",q.Snowball_pile="914e3890-92a0-45f1-9918-713d7cb317fa",q.Snowflake_1="d9a53df9-5a2f-4546-9268-8230b9c56200",q.Sparkle="c108638e-c0db-414f-859f-bc33c6a4dbca",q.Sparkles_set_hud_membership="345a7dfc-8739-485c-897f-5dd5c8a41154",q.Spell_3_0_wizard_watch="da87732a-ed78-46a6-a0db-ee1007e2cb6e",q.Spell_astral_starbitblast_aoe="981c22df-b12d-45fd-a344-4114cba18b77",q.Spell_astral_starbitblast_aoe_cooldown="8245fc9d-a7c4-40ca-b96d-32950f67d423",q.Spell_astral_starbitblast_giant="6d2505f0-c2d2-4f83-a620-cfca49e5ad93",q.Spell_astral_starbitblast_giant_cooldown="707dc677-38bd-4410-aeef-1fc5b0bfeea1",q.Spell_astral_starbitblast_multi="7df980be-4601-41a7-b961-2daa0636265e",q.Spell_astral_starbitblast_multi_cooldown="820f37e9-fb24-46ba-b6b6-8f3d5776f888",q.Spell_astral_starbitblast_multi_random="223daa84-819b-4052-9974-11ab81678bcc",q.Spell_astral_starbitblast_multi_random_cooldown="78caa901-cdde-448f-b25d-3451914b2c31",q.Spell_astral_starbitblast_multiaoe="43ef43c9-c397-40c3-b1ed-a0a800b0b377",q.Spell_astral_starbitblast_multiaoe_cooldown="60be6888-62d1-435a-8264-39b2a00028dd",q.Spell_astral_starbitblast_random="0e7a543a-8f90-4468-9855-cdd724c8e3ba",q.Spell_astral_starbitblast_random_cooldown="49b90ed2-e9ce-42e0-8c7b-4c319cb201c9",q.Spell_astral_starbitblast_single="4eb536e7-1d76-4e7b-89cb-fbab9982e26d",q.Spell_astral_starbitblast_single_cooldown="9100be81-4435-4033-86b1-34a9cfdbfd55",q.Spell_fire_fireball_aoe="ecfc01f9-8ae4-4d4c-95bc-988e9b413187",q.Spell_fire_fireball_aoe_cooldown="7e52eba4-ade3-48b5-93f2-dc50d836c4f9",q.Spell_fire_fireball_giant="2ac08f56-cbd6-427b-88db-f260a4b5eabb",q.Spell_fire_fireball_giant_cooldown="1b451077-4e38-4b20-949e-8716abdfd8a9",q.Spell_fire_fireball_multi="6f116fa7-e9a4-46e5-84b8-91d5ac6c82f5",q.Spell_fire_fireball_multi_cooldown="95ee1862-933b-4705-8b48-13f28cf2afaf",q.Spell_fire_fireball_multi_random="503e2144-b0e6-4b44-bd66-fa24edbdb5fe",q.Spell_fire_fireball_multi_random_cooldown="07b8b893-1f3e-4901-ab95-f973c9fb95f6",q.Spell_fire_fireball_multiaoe="f7bdaaaa-b529-471e-9680-5071dfcf69e8",q.Spell_fire_fireball_multiaoe_cooldown="9c058587-7121-4593-866c-83d44dca6cab",q.Spell_fire_fireball_random="779558ce-d4d4-46a2-bb99-e32ab7647ada",q.Spell_fire_fireball_random_cooldown="071d4ec8-853a-4290-acb0-3f8e3111565a",q.Spell_fire_fireball_single="dba93de1-f0b1-412a-9ed2-e41433721b14",q.Spell_fire_fireball_single_cooldown="eebb87c0-dca6-41ad-a789-4b80760d86f0",q.Spell_fire_volcannon_aoe="b82b8567-2463-426d-97f4-6865363250df",q.Spell_fire_volcannon_aoe_cooldown="88644385-8a8d-461d-b660-2ab327aae95c",q.Spell_fire_volcannon_random="9f6635ba-2923-4702-bdbb-b676c5096018",q.Spell_fire_volcannon_random_cooldown="aebdcdd2-9913-43cf-896f-983965f1b157",q.Spell_fire_volcannon_single="8117fe9b-3c3d-484c-8b4e-ea5b1e74d44d",q.Spell_fire_volcannon_single_cooldown="7666e913-0bcd-4363-b77d-b28a9cdd7624",q.Spell_ice_chillout_aoe="ee696e58-492b-4c0c-8404-2a48f9c4a707",q.Spell_ice_chillout_aoe_cooldown="79857cd6-0fa3-4a23-947f-4d58b35b9d7d",q.Spell_ice_chillout_random="b8cb8d4a-1b6a-4df4-a999-3a78765a43a3",q.Spell_ice_chillout_random_cooldown="229b8e1d-6ddd-4535-8f49-c404692bb144",q.Spell_ice_chillout_single="5fce9f8f-3bd1-45a5-8712-0ea42781d7c0",q.Spell_ice_chillout_single_cooldown="e6e8e769-865a-4710-9e3d-065cb2de7ca5",q.Spell_ice_icicleshard_aoe="cf3699bd-d9f5-4fef-b8d2-f39bfd189e5d",q.Spell_ice_icicleshard_aoe_cooldown="8c9e9fef-8817-4353-9ec8-7f09331a63cd",q.Spell_ice_icicleshard_giant="35a5f236-23d7-45af-9311-03511b652049",q.Spell_ice_icicleshard_giant_cooldown="c6777865-efca-41c3-a9fe-0a582f263c27",q.Spell_ice_icicleshard_multi="c02ca92c-9539-44d8-ba32-959d33718cd4",q.Spell_ice_icicleshard_multi_cooldown="35a9215f-fade-433a-a6d2-a65bf40dc156",q.Spell_ice_icicleshard_multi_random="9c5c06d2-decb-4454-8388-f478c904adf8",q.Spell_ice_icicleshard_multi_random_cooldown="4e37fdf7-3ae8-40aa-ac55-c4ec74a881a8",q.Spell_ice_icicleshard_multiaoe="c55fa393-6e00-4d55-ba76-c95897dff077",q.Spell_ice_icicleshard_multiaoe_cooldown="9c8cf0c6-79bc-455a-ad38-bc7c385c8f95",q.Spell_ice_icicleshard_random="89c3fbd0-ef9c-4b23-959d-5974f6186b9b",q.Spell_ice_icicleshard_random_cooldown="00fca5a9-3e51-4862-a08b-1bd7aee82392",q.Spell_ice_icicleshard_single="86a0c3e6-5a88-4dae-af37-2267f6f28367",q.Spell_ice_icicleshard_single_cooldown="1aafdaf6-8ccc-4837-b48c-05ad0f25812a",q.Spell_ice_snowlingball_aoe="7779e3ea-d12a-4119-be0b-7eb5a002d6ba",q.Spell_ice_snowlingball_aoe_cooldown="119fc80e-3046-4421-b435-7a502febfbb9",q.Spell_ice_snowlingball_giant="3f15be4f-00c8-4f24-87b2-d15084842bf3",q.Spell_ice_snowlingball_giant_cooldown="f04dbe03-1d45-4d00-9017-7853194bc358",q.Spell_ice_snowlingball_multi="569a6b59-eb30-4199-aa9f-531fdd8b6698",q.Spell_ice_snowlingball_multi_cooldown="780254ee-ef6d-4820-807c-727865440b93",q.Spell_ice_snowlingball_multi_random="8cb1ab37-63a3-4a78-8187-f4f7d2c2f5ee",q.Spell_ice_snowlingball_multi_random_cooldown="ddccfd93-655c-4a81-95df-f889e03497ff",q.Spell_ice_snowlingball_multiaoe="52d1b8fc-04de-4038-b477-1045944c5372",q.Spell_ice_snowlingball_multiaoe_cooldown="6e5950cc-92d7-43f6-b5bb-7fe5d0c3c30d",q.Spell_ice_snowlingball_random="2859ad3e-e607-4cb8-af07-411b27087398",q.Spell_ice_snowlingball_random_cooldown="b58e189e-0a30-40a4-8baa-88543e10651c",q.Spell_ice_snowlingball_single="28f75698-ed30-4121-9b77-84cf31ff2ff0",q.Spell_ice_snowlingball_single_cooldown="02950102-7a4a-498e-b9a9-fb582873fcf9",q.Spell_neutral_aoa_aoe="375abf63-0f3f-43a6-b636-9b467e182cdd",q.Spell_neutral_aoa_aoe_cooldown="e824ebfa-6690-4511-a838-04c84700016b",q.Spell_neutral_heal_aoe="3cb09195-f903-4c39-b208-5171ae0b634f",q.Spell_neutral_heal_aoe_cooldown="35f87455-c4c2-4123-8d2d-eed8a8fd758e",q.Spell_neutral_heal_self="705dd5f8-5e05-4d3e-9fe0-425620ab6e92",q.Spell_neutral_heal_self_cooldown="a4efcfb8-5a4a-4e84-9144-a00a65f957d8",q.Spell_neutral_heal_single="31cbc0d9-6a5f-41dc-894d-3391a894f153",q.Spell_neutral_heal_single_cooldown="ea805326-39a2-4272-967a-25efb7142baa",q.Spell_neutral_heal_single_random="0db31ffe-7ed2-4900-b8e4-ad1d00650fe1",q.Spell_neutral_heal_single_random_cooldown="3915e1da-8cde-46e5-8432-94293ec7377e",q.Spell_physical_blunt_aoe="5aa3c789-4c3c-4eb9-840e-fa6e4b9795a1",q.Spell_physical_blunt_aoe_cooldown="194d94c5-ee26-466a-ad0a-a471c608c51c",q.Spell_physical_blunt_giant="83dae56c-b690-47b4-8ab6-37fe27a34b33",q.Spell_physical_blunt_giant_cooldown="987c26f7-243c-461a-9453-e48164ac7484",q.Spell_physical_blunt_multi="853421aa-0c22-4005-bb4a-68f8c6bbdf1e",q.Spell_physical_blunt_multi_cooldown="b84caa43-c384-4ed7-81f7-61b876d96adf",q.Spell_physical_blunt_multi_random="63fdd768-56a6-49ef-9c45-bc333e2bc2d1",q.Spell_physical_blunt_multi_random_cooldown="a0170a57-e502-4a64-819d-4ca30a4e302a",q.Spell_physical_blunt_multiaoe="e6758316-ac61-4f87-8071-0302fe65df95",q.Spell_physical_blunt_multiaoe_cooldown="8a298751-8b30-41bb-af50-181b86ff47d1",q.Spell_physical_blunt_random="a734d19e-3512-4110-84f6-0f81caa1a3a4",q.Spell_physical_blunt_random_cooldown="da283e74-8720-43c4-923e-7494607b76c9",q.Spell_physical_blunt_single="e968859b-7552-4d9a-aef5-9da452c89477",q.Spell_physical_blunt_single_cooldown="49b0e079-d698-4779-bd10-c9d3aa8ba689",q.Spell_physical_pierce_aoe="edfe447e-31c4-4b12-b408-0bdd31df34c2",q.Spell_physical_pierce_aoe_cooldown="4a41e755-16ca-4227-8e82-4fd3721dcf39",q.Spell_physical_pierce_giant="b07f2e0b-b1cb-4d50-8d03-87d65da9c0b2",q.Spell_physical_pierce_giant_cooldown="cf5de1d4-772e-4112-a78a-371f9f4f115b",q.Spell_physical_pierce_multi="3a999e5e-e1f8-48c0-9ad4-961d9c4b28de",q.Spell_physical_pierce_multi_cooldown="98490791-fd79-415f-980c-33625a582319",q.Spell_physical_pierce_multi_random="9ac290b1-69cf-431a-a394-e87698191826",q.Spell_physical_pierce_multi_random_cooldown="c5854a17-6127-4217-87ab-9487abaf6066",q.Spell_physical_pierce_multiaoe="95576fd8-e1be-4854-8691-93bbf3f5d618",q.Spell_physical_pierce_multiaoe_cooldown="9515e430-a090-4eed-bb8c-8f6ad26d24ae",q.Spell_physical_pierce_random="d09c5ff2-0929-4d45-948e-311b8927ee14",q.Spell_physical_pierce_random_cooldown="9d2dc89f-b88e-4ba6-b031-1240eeb793f4",q.Spell_physical_pierce_single="3e0db036-8ef5-497e-b599-39f5820cc3eb",q.Spell_physical_pierce_single_cooldown="e540864f-b88e-4109-b5a5-caf909892c6b",q.Spell_physical_slash_aoe="f26699c1-fb58-4ab0-9e22-98f7d724e08a",q.Spell_physical_slash_aoe_cooldown="23249f46-506b-4796-bdea-37497556328e",q.Spell_physical_slash_giant="8ef7afd7-c00d-4c74-87d6-caa327b30f2a",q.Spell_physical_slash_giant_cooldown="67e66d6e-1a83-4834-96e1-6eedff384b5e",q.Spell_physical_slash_multi="caeeb971-182f-4b53-916d-e42bd7ce7cb3",q.Spell_physical_slash_multi_cooldown="d91e544c-020a-4ac9-a4da-491cf8a38811",q.Spell_physical_slash_multi_random="e7958847-36cd-4d8b-a5c5-e98ac9b1c9b6",q.Spell_physical_slash_multi_random_cooldown="2c5c455f-c929-4400-863a-1428a12a263b",q.Spell_physical_slash_multiaoe="182417ee-ba54-4e3a-ac0f-c28c4e869930",q.Spell_physical_slash_multiaoe_cooldown="519d924b-db7e-4bc5-a93e-c8e0937b0a86",q.Spell_physical_slash_random="3c1c219e-9407-4e7d-b01e-ad4aaee81a03",q.Spell_physical_slash_random_cooldown="1e7c7ef3-a4b1-4c8d-8c27-9228d463f860",q.Spell_physical_slash_single="a7e83eb9-6c25-4b47-b5da-c07a1d794f88",q.Spell_physical_slash_single_cooldown="8cc67bc3-c8b6-49f3-8047-31969d86adce",q.Spell_plant_forestshurricane_aoe="28ebd156-cbe3-4d6e-be5d-eaa987052667",q.Spell_plant_forestshurricane_aoe_cooldown="3777b573-6401-4ab2-b087-ea547604c154",q.Spell_plant_forestshurricane_random="a7e99491-e989-4436-81bf-8c70f47db588",q.Spell_plant_forestshurricane_random_cooldown="7792f68e-3d9b-453b-ad5d-eeb75cf58040",q.Spell_plant_forestshurricane_single="3fa491a5-8e7f-4ac2-90b7-6855b7b5241c",q.Spell_plant_forestshurricane_single_cooldown="d1a01f47-c39c-4734-a49b-712704692f93",q.Spell_plant_leafswarm_aoe="0a84edd0-e9e5-4c23-984e-24798355b38b",q.Spell_plant_leafswarm_aoe_cooldown="cef41288-67d2-4b2c-870b-2bd8e3806cfe",q.Spell_plant_leafswarm_giant="45d3e2ee-ffcb-4799-90bc-64e385a6a085",q.Spell_plant_leafswarm_giant_cooldown="d49205d9-9e5c-43f7-8dda-04686a179a71",q.Spell_plant_leafswarm_multi="d5679207-9daa-47d7-983e-9bed43ca023d",q.Spell_plant_leafswarm_multi_cooldown="bb8063f0-4f56-4e4b-b09a-77545adeb143",q.Spell_plant_leafswarm_multi_random="c34dc780-295a-4d92-8da5-7f80d1aa6c74",q.Spell_plant_leafswarm_multi_random_cooldown="b5152a59-adf3-4b77-b68b-2b7ca5ef4c0e",q.Spell_plant_leafswarm_multiaoe="99a23d3e-dae6-4670-b523-89a4c8f921e1",q.Spell_plant_leafswarm_multiaoe_cooldown="9aa5a33c-4303-4749-b9cc-f52e9c158e20",q.Spell_plant_leafswarm_random="4db5f73b-f6e9-43e1-85ac-a301cefa6dd7",q.Spell_plant_leafswarm_random_cooldown="27a96b69-32d5-42c6-9b62-d7aab2054ba3",q.Spell_plant_leafswarm_single="beebac37-f1d3-4267-a6b0-053ef85f0285",q.Spell_plant_leafswarm_single_cooldown="7c31ef0c-9e50-4927-b448-ea7b47c64318",q.Spell_shadow_shadowshock_aoe="d8b9cc0b-728f-4bce-882e-da9fc5a7a398",q.Spell_shadow_shadowshock_aoe_cooldown="08f09a3f-1234-4844-87c0-a056d37466a3",q.Spell_shadow_shadowshock_giant="2640aff5-8ae2-41ef-ab45-787a92293a83",q.Spell_shadow_shadowshock_giant_cooldown="11b957b3-6144-42ba-a3ec-ca71335e97ed",q.Spell_shadow_shadowshock_multi="fc604b6d-33a7-4ebf-abdc-4ea8f614fb34",q.Spell_shadow_shadowshock_multi_cooldown="1ff86001-92d0-4a6c-b224-aec06e759191",q.Spell_shadow_shadowshock_multi_random="59ec806a-c2cf-41bf-ae9e-1881ab032380",q.Spell_shadow_shadowshock_multi_random_cooldown="6efd9fc8-4a6d-4987-b60f-b0f1bb77c9b4",q.Spell_shadow_shadowshock_multiaoe="bcea6d99-d01c-4363-95a8-cbc5ab407ba5",q.Spell_shadow_shadowshock_multiaoe_cooldown="8444ad29-ede4-4305-aa98-667d7bf7b38d",q.Spell_shadow_shadowshock_random="71d754ab-0bbd-42e5-8c23-f30b241d8489",q.Spell_shadow_shadowshock_random_cooldown="e41d8e3e-575c-4a11-9bd6-0c8d05c279f3",q.Spell_shadow_shadowshock_single="8f9324d7-3e6d-46a0-8ba6-a5ca2e6c7bc4",q.Spell_shadow_shadowshock_single_cooldown="b7c180d0-32a4-49c7-8abb-865da9701db3",q.Spell_storm_ioncannon_aoe="3739d7f3-ee3b-46b7-9a68-4479372c898b",q.Spell_storm_ioncannon_aoe_cooldown="23483c24-f56a-4b5a-98a5-20f46661ceac",q.Spell_storm_ioncannon_random="6b8c5277-8b40-4448-9bd1-18a05a7824ae",q.Spell_storm_ioncannon_random_cooldown="8c7df9f4-22f2-41cc-bc3c-6ffcbb085318",q.Spell_storm_ioncannon_single="7ae60d5a-7c72-48fe-a916-5dd4b574d5a6",q.Spell_storm_ioncannon_single_cooldown="62fd4638-e4a4-4296-a7d2-19fdc6216231",q.Spell_storm_sparksphere_aoe="ce7d0c71-70e4-478e-81ca-12ad935ac0c8",q.Spell_storm_sparksphere_aoe_cooldown="e322def6-acc9-495f-8dac-59b5c0dc9d2e",q.Spell_storm_sparksphere_giant="bb8e871d-042c-4780-abab-1f6c603e61da",q.Spell_storm_sparksphere_giant_cooldown="8c1551c5-8d7b-47a1-b771-709351b29d1c",q.Spell_storm_sparksphere_multi="fa00cceb-938d-4559-94b1-d97e18de5de8",q.Spell_storm_sparksphere_multi_cooldown="bd9cb342-c9df-4721-9870-7d2258351f28",q.Spell_storm_sparksphere_multi_random="5353471b-47de-4189-a11c-9aeb16969dad",q.Spell_storm_sparksphere_multi_random_cooldown="bdb75561-a2ed-47c5-8e79-0bab1fced03a",q.Spell_storm_sparksphere_multiaoe="3bdd0870-27d7-4267-b536-54acce8d3363",q.Spell_storm_sparksphere_multiaoe_cooldown="f55f996d-ec96-4780-ba7f-c0c5ec81558a",q.Spell_storm_sparksphere_random="452f3251-a7d3-4f89-b78e-370d7da41731",q.Spell_storm_sparksphere_random_cooldown="74f61c73-0650-4103-ac89-80057768165d",q.Spell_storm_sparksphere_single="b99070c5-49ac-4b27-8042-e3aeb75c6a63",q.Spell_storm_sparksphere_single_cooldown="fbc4ba18-0f4e-4537-bcc6-1cfcc0600058",q.Spell_water_aquaspear_aoe="f8ab15df-eed5-4bb5-8509-2a50a0fc1df6",q.Spell_water_aquaspear_aoe_cooldown="1cfbb430-3bb5-4b9e-a3db-aa2d3c9307e2",q.Spell_water_aquaspear_giant="c992c7ec-c6ca-4450-a200-3c4102566f60",q.Spell_water_aquaspear_giant_cooldown="f6facf62-39a8-4255-9652-a7e8badc8069",q.Spell_water_aquaspear_multi="11dabab1-3401-4d77-8bd3-7e784615e82d",q.Spell_water_aquaspear_multi_cooldown="d6abce4a-27cd-46b1-95ab-0d7f90d4cabc",q.Spell_water_aquaspear_multi_random="492c986d-8c8b-48d8-bcfa-837af5cc53f9",q.Spell_water_aquaspear_multi_random_cooldown="1f52d2d0-42be-47c8-902d-f529f8f7181a",q.Spell_water_aquaspear_multiaoe="4cc990c3-caeb-4c87-9b3a-639bf087042b",q.Spell_water_aquaspear_multiaoe_cooldown="7f00844c-eca3-48f6-bc7d-bba3bd8b3b79",q.Spell_water_aquaspear_random="2715a10a-7fa6-410d-b752-a33c0bcbdcb7",q.Spell_water_aquaspear_random_cooldown="1bc4118a-9887-4e4c-8446-8a1da5591e02",q.Spell_water_aquaspear_single="447f7ee0-991e-4d80-b259-35a58645d623",q.Spell_water_aquaspear_single_cooldown="01051ed3-84c9-488b-b343-b6b686ab7c72",q.Spell_water_downpourtal_aoe="a5f28dbe-91ab-496a-a1ee-5cc64303e12a",q.Spell_water_downpourtal_aoe_cooldown="9bfea01a-5989-4105-a9f5-ed28d651ba55",q.Spell_water_downpourtal_random="e05c9ad5-4176-43a8-9616-f8d67f6610f0",q.Spell_water_downpourtal_random_cooldown="9577bcce-fc11-45ba-89ec-87a1d9d9d79d",q.Spell_water_downpourtal_single="3bf6e39c-42f7-4a21-aaba-5ca5a6092ca7",q.Spell_water_downpourtal_single_cooldown="6b8b59f7-3a5a-454b-92e8-3ded35ada29e",q.Spell_water_waterburst_aoe="b7eab3fd-18b0-4a28-96e4-7c3e288bd66f",q.Spell_water_waterburst_aoe_cooldown="f64fa96c-ae20-4ded-926d-1f3787371de6",q.Spell_water_waterburst_giant="a73da2e8-5e06-42e1-b9cc-8a5dd0eed316",q.Spell_water_waterburst_giant_cooldown="2084feda-a24d-46ad-82a6-c58d296ce7f6",q.Spell_water_waterburst_multi="195b9a26-1084-450b-bef9-621be7df6054",q.Spell_water_waterburst_multi_cooldown="d3d2d4b4-f85d-4c21-8915-6b1c42c41c57",q.Spell_water_waterburst_multi_random="38169736-51ad-4dba-bc4f-0e7946fbff93",q.Spell_water_waterburst_multi_random_cooldown="11118a27-20a5-47cc-994f-d8cd5b2a5b36",q.Spell_water_waterburst_multiaoe="304ae25e-ec04-429a-a8ca-5a7a051ae2f6",q.Spell_water_waterburst_multiaoe_cooldown="99b2e718-2e81-4727-913e-6733afc436f7",q.Spell_water_waterburst_random="ee58f390-a8b5-4096-9347-b2fa76c2ee3a",q.Spell_water_waterburst_random_cooldown="8178be55-c216-4c45-b737-c925e44d90b7",q.Spell_water_waterburst_single="7a7e07f9-19ba-4e08-b364-ad49074fa3af",q.Spell_water_waterburst_single_cooldown="05050656-9735-4d82-bc3c-fce381eb20bd",q.Spine_chest_gold_coins="99ce8365-dab4-4a7a-ad58-2b09a897f9fd",q.Spine_chest_plus_coins="a8dcc2e9-aea8-4a1f-b6d6-293e4995d040",q.Spine_chest_ultra_coins="485753d9-8c01-48d9-a0b1-318a90867c19",q.Spot_hats="81e8c625-a514-41bb-bc5a-02f285655d98",q.Spot_samples="175dc8ce-b1ab-4e7c-bb81-2138a34e9778",q.Spotlight="3266c6a7-a2e0-4346-b9fe-efbba5463b55",q.Spotlight_floor="e19bcbaf-2004-45b3-b14e-46c91cd0fbb1",q.Springfest_1="f2ff1c31-a3d4-4d13-9bb6-e57a03cbaa2d",q.Springfest_3="3fa13df8-a37c-4cd3-bdc2-6b37b443e6e1",q.Springfest_Mask_Bunny="353de5a5-d0cd-40be-8088-975f03565c33",q.Springfest_Mask_Fox="9355c77e-a924-4518-b8bf-bfe5ed586c69",q.Springfest_background="7a2b6b25-4109-4d23-8751-a815a42571d7",q.Springfest_rewards_dorm_cycle_1="681e6b9d-485c-441d-8d7f-b754abbacea5",q.Springfest_rewards_dorm_cycle_2="4f65b8b7-f1b0-42c3-a722-5eb57568cd6b",q.Springfest_rewards_follow_cycle_1="5a699d14-42b1-4240-8822-2b74acb338eb",q.Springfest_rewards_follow_cycle_2="e7a76ff2-a32f-4720-b9d4-569c91381368",q.Springfest_rewards_item="2cb8690c-cb33-4d43-bb64-edcd760127c4",q.Springfest_rewards_pet_cycle_1="07235641-fddd-4c59-9cf6-22f7fe7a914a",q.Springfest_rewards_pet_cycle_2="60ff374e-8f29-4d8b-b0bb-add8176a4fde",q.Springfest_wizard_watch="744564f1-d791-401f-9fbb-c8908a17cf0a",q.Star_fivepoint_bright="cbb7b804-fc6e-4f13-9389-8ac32046a87c",q.Star_fivepoint_bright_1="d1bc8575-14f8-4d68-acfc-c97b5c67ac4e",q.Star_fivepoint_bright_blue="973bd603-7ec1-4573-a244-41d83d63aeee",q.Star_fivepoint_bright_purple="58273f60-c5e5-4f4c-b39a-71662643ca97",q.Starlight_splash="97940f51-b803-4ad6-a62e-9ba94cba45b3",q.Starlight_statue_boss="e64bb95a-63d7-4ea5-a9ff-5dbf72deb73a",q.Starlight_statue_boss_eye_glow="5ccaf71f-fbc8-4463-9f9f-3f4c3044261c",q.Starlight_story_daily_battles="60f55ef9-a565-4081-88f9-ee612eb8fe39",q.Starlight_story_finale_1="ad66083e-f475-421c-a3d4-451c3c6f8313",q.Starlight_story_finale_2="77257aa0-e5b5-4164-aa31-33c30486b248",q.Starlight_story_finale_3="b6e0f472-3032-4e35-9b12-d3450b8c67b2",q.Starlight_story_shop="7bcf633a-c2ba-4df4-abb6-319b0a8dc096",q.Starlight_story_stylist="d87f5728-a431-465d-b6fd-d2cd0622a9e5",q.Starlight_story_wheel="5f8c8bac-69b9-4107-86b6-841fecba2860",q.State_challenge_mailer_small="b8cd1c13-a027-4786-a4fc-eb133d0b5d75",q.State_challenge_podium="d3faafe7-39e4-4417-9fa3-d8894d041d8e",q.Statechallenge_loading_screen="fb2fe979-3151-4eb1-a96c-cd052bffab44",q.Static_member_ad_base_memberchest="f4600114-00be-4b52-b38c-b5e6ec5788f8",q.Static_member_ad_buy_member_items="29a72b6b-a8e1-46c2-b4bc-3752a1ab1fef",q.Static_member_ad_evolve_pets="8baae029-c647-4c97-b33e-94bb09de5392",q.Static_member_ad_level_up_faster="aa110d0f-eaa1-447f-9fa3-56299435ff82",q.Static_member_ad_monthly_membership_boxes="829d2a93-2114-455f-8e5c-ee52215f9df3",q.Static_member_ad_so_much_more="233daa6f-4167-475a-99b6-2d36b4bc63ad",q.Statue_boss_winterfest="190c6eda-0a54-4f53-8ae6-deb40ce8acab",q.Stone_large_disabled="6d5b86f3-7e04-43e3-ba99-9ec8e19178b9",q.Story_book_map="5c8fb725-f8e6-4896-820c-e42fd9f7f530",q.Subtitle_banner_blue="cb996d5e-4169-473a-9810-fc7e6ea1140a",q.Subtitle_banner_brown="1b25a1a9-47a6-48d4-a683-2f01cecd7dd5",q.Subtitle_banner_cyan="98cf8496-528f-46d5-ac0d-a3ad5cf7710f",q.Subtitle_banner_green="b8157fd2-7e56-43a3-8a28-a4cdc0164571",q.Subtitle_banner_grey="f23c8918-427b-4743-8506-9a6103878398",q.Subtitle_banner_lavander="52a79a62-492a-471e-b172-704ea166ba54",q.Subtitle_banner_pink="d216c69a-299e-438e-8554-fdbae5812323",q.Subtitle_banner_salmon="c48f802c-0ee0-41ab-9389-f44132057611",q.Summerfest2025_wizard_watch="524b495d-8bfa-470f-a249-788e919b8ab5",q.Summerfest_background="aad6a38c-07ce-402e-b5ae-a0ea26ea98d5",q.Summerfest_icon_dorm_cycle_2="5a8dca90-8ec0-45ec-a4ab-00f52df9639d",q.Summerfest_icon_follow_cycle_2="32b5f24d-2393-415f-b2cc-bc684aa6dd96",q.Summerfest_icon_pet_cycle_2="2c358622-62ca-4dac-9a5b-c70c5afa86b3",q.Summerfest_loading_screen="35b1f0e8-2821-4ac0-b7d9-eb1503ed3013",q.Summerfest_rewards_dorm_cycle_1="97a30e3e-616a-4332-9ff2-cf31db5cd1a8",q.Summerfest_rewards_follow_cycle_1="f243003e-8517-4c71-9bf7-dabf67c392d4",q.Summerfest_rewards_item="f7d9336c-3b97-4c11-ba80-94fb99ce0503",q.Summerfest_rewards_pet_cycle_1="2b98d136-97bc-46cf-b225-9d2e12705ac4",q.Summerfest_teaser="53263a15-1f96-417f-ba9a-73e8732da1cf",q.Summerfest_wizard_watch="1204293f-59e6-406c-9299-ec95f8cb4d19",q.SunWheelBig="ab39ce98-2154-4c09-b7ca-ed41ab4676ef",q.SunWheelFrame="03d55f5d-ae00-43bc-b97b-b96f1685ffa8",q.SunWheelPointer="05f4076e-2220-4e52-a6e3-602328ba62df",q.TT_Intro_Modal_Wire_May="2d12a52b-314a-4a0c-84ac-715eaa4dbefc",q.Teacher_gift_blaze="ea1308b2-6d7c-476d-bd59-285bc54b58d8",q.Teacher_gift_monster_plant="d247fe51-001d-4ba1-808d-4cdc76fb6ff4",q.Teacher_gift_singenewt="66862439-5164-4504-9ce2-908e712039f2",q.Teacher_gift_slimy="6dd1b1dd-6d61-41ca-b93b-8d56720f6320",q.Tier_lock="c96d7417-54f5-45ce-a145-8fa5381202b2",q.Tileset_water_new_underwater="4651bce9-97f3-4bc5-8568-9d5cd4a4cc74",q.Timer="35d9716e-1d0a-462f-a717-5092e9c90125",q.Tintable_backing_divider_sparkles="25ebc5bd-c56d-439d-a176-f4145ff91248",q.Tintable_blur_10px="877588a3-4ada-4eec-a0d6-fbe1e44c10f4",q.Tintable_rectangle_10px_corner="4431239c-5b0c-4b76-afb6-734d8d2cfd99",q.Tintable_rectangle_12px_corner="06d922e2-baf8-42e0-bc0e-149590b741c3",q.Tipbubble="456ce066-4d35-488f-b9ba-8dcd80bd7f16",q.Tipbubble_tail="1f013188-1cd7-4bbe-b329-31f746c32ed3",q.Title_plate_purple="559deb2e-274d-4675-947c-c039461085e2",q.Topbar_button_basic_color_1="db6cc2c2-ef55-468f-9414-4fecee6ad4b1",q.Topbar_button_basic_color_2="cab0340f-d03a-4177-bda3-d14863de8512",q.Topbar_button_basic_color_3="97cf491b-65c4-4f0b-8e7b-7581bbc5aeeb",q.Topbar_button_basic_color_4="3954bb7c-34f0-41ca-b1f5-eb87489f788b",q.Topbar_button_hover_color_1="59966bde-2d2c-4717-bedb-174c145a0f9f",q.Topbar_button_hover_color_2="e4f9783f-5798-43d6-8a42-dbd2ef0dfd5c",q.Topbar_button_hover_color_3="1759bae0-8493-4716-91d0-6a391838254f",q.Topbar_button_hover_color_4="80de62b3-1347-455b-8ddd-d5fdd3b1514d",q.Topbar_button_pressed="810c3144-3e79-43d6-9252-deb95f826b20",q.Topbar_plain_color_1="f6055c5f-66a7-408b-bda4-f93b7f91780d",q.Topbar_plain_color_2="b69fef13-1044-4089-a2e2-b3bb806f1f26",q.Topbar_plain_color_3="de1a0db8-32d9-4a79-bda5-43ad88822cc3",q.Topbar_plain_color_4="bf749c86-d44b-4752-af3a-ce1a015477f2",q.Towertown_open="4bbdcfc4-a78c-4ae3-a906-d546905fc022",q.Towertown_watch_adv="cc1c6bab-95c1-4705-8cf5-32821da251a3",q.Treasure_tablet="3b2b830c-7013-4778-ab6f-7b0b807670d7",q.Treasure_track_artists_alley_splash="6056f152-daf1-47a3-87fa-ecb45dff652c",q.Treasure_track_splash="e82ae0a6-c8e2-4fd8-afd9-407576b89ceb",q.Treasure_track_xp_80x80="c9ff6682-fc5f-4907-ad2a-b53530adb2eb",q.Trophy_bronze_small_state_challenges="4e431e59-7b9e-44fe-b0e9-ffb858232d99",q.Trophy_bronze_small_state_challenges_4="aeb6a727-c9a7-4276-a7ec-d9e9ff73f9ac",q.Trophy_bronze_small_state_challenges_5="736d11c0-7300-476a-8a77-fdd4be393480",q.Trophy_bronze_state_challenges="fdbc28f6-1837-494b-97f7-ce78708ec892",q.Trophy_case_top="5056f385-166f-4c9a-987c-daa7acf6d816",q.Trophy_exterior_00="2cfb17fc-c308-4f54-84e2-3e6c5b2220ed",q.Trophy_exterior_00_night="39cb0814-8862-4ded-9101-0ced2f91d389",q.Trophy_exterior_01="db2af1d6-64f5-4bda-bb00-b3587b5480a0",q.Trophy_exterior_02="833f2a7e-957b-4665-804e-5f0646ae004b",q.Trophy_exterior_03="b86ac0be-f3c7-465f-b9d5-9eac025342dc",q.Trophy_exterior_04="a47ba1d3-2294-436c-afe4-54e8f110f82b",q.Trophy_exterior_05="578665ea-d9f8-4815-8268-e55de3600f53",q.Trophy_golden_small_state_challenges="a5a193d6-75a6-41f5-8486-89f35e6f1cb4",q.Trophy_golden_state_challenges="6028be92-21dc-48d0-bc57-64ddff6621a7",q.Trophy_lobby_01="00564610-412d-446c-a76d-9bfb3a2d11f3",q.Trophy_lobby_02="a3932060-cbf0-465b-b245-e0128f1ee2e3",q.Trophy_lobby_03="40af937e-454a-4ae2-bf48-98f90951b710",q.Trophy_lobby_04="3c0000ad-1216-482f-8adc-be6f68d40297",q.Trophy_lobby_05="e4f055df-7a17-4371-8ca1-35159194d3bb",q.Trophy_silver_small_state_challenges="ec54ed34-2e12-462e-96c8-f0b5216b7630",q.Trophy_silver_state_challenges="c92c3f32-0c7b-446d-a107-d6aeb2215b7e",q.Tt_deco_ammonitefossil="98bf8744-4b5e-4e11-9b30-1f45a1917fb6",q.Tt_deco_ammonitefossil_icon="4d5094c1-4242-4cdc-8425-18e0d089731e",q.Tt_deco_babygargoyle="380abc55-1e8f-4e6e-a820-c1f049797d72",q.Tt_deco_babygargoyle_icon="c9b58d99-547b-431c-a1f4-ac2f18b6495d",q.Tt_deco_bigredbow="c5604178-54b5-4ee4-9231-a220621d02fe",q.Tt_deco_bigredbow_icon="35d9f6af-5c30-4e48-8931-608300c7959a",q.Tt_deco_birdbath="79bf82e8-a4b2-488f-9b34-4249de135e93",q.Tt_deco_birdbath_icon="0f0be8fe-b66b-48ae-97df-e68553b00673",q.Tt_deco_bp_ammonitefossil="fce30c85-ef9b-4825-89a0-587b7503c2f9",q.Tt_deco_bp_babygargoyle="018be468-1402-4404-b8f0-008a1a2c8ca7",q.Tt_deco_bp_bigredbow="5dd3522a-580d-458b-a5c7-9e307e40ed37",q.Tt_deco_bp_birdbath="8d2deb44-15b2-4da1-a466-75f833f5157a",q.Tt_deco_bp_clamshell="5f0bcb26-a6b6-4080-817e-95c8fd5b5b2b",q.Tt_deco_bp_conflictedmask="7f44a802-cf09-488f-8b89-f0add094d6ef",q.Tt_deco_bp_crystalflake="ea645198-2780-4261-a71f-734be3e4c31d",q.Tt_deco_bp_gingerbreadman="d7e6de87-4fa4-412b-825b-44536d1a293b",q.Tt_deco_bp_grapes="30c4841b-cc25-4dc6-9942-9fc0c7dae508",q.Tt_deco_bp_happyflowercoconut="9e954b30-b6d4-4664-8873-fd65d47cdf24",q.Tt_deco_bp_happystar="6bcf3b30-4863-456c-a9e1-d7bf3c4e6e5f",q.Tt_deco_bp_happysun="7b3125e6-4ac5-4a21-a830-6f4fc07f7fd4",q.Tt_deco_bp_hummingfeeder="0534d2f5-a4ca-4c9b-9bdd-506a7508e1f2",q.Tt_deco_bp_lantern="0b5062be-836a-4192-a423-4c4d66299607",q.Tt_deco_bp_lifesaver="041a7f54-41bd-442c-a515-01d0b0826f42",q.Tt_deco_bp_orangeflower="f0bb5855-2be8-463f-ba14-6473bbc6adf6",q.Tt_deco_bp_pinkflowerbasket="e237eca4-fe75-45cb-9579-5377e8d913d8",q.Tt_deco_bp_pinklotus="84741432-9996-4aa5-b7cf-43326e8a49ec",q.Tt_deco_bp_piratewheel="7b14361c-e34b-4d6d-a0ec-2debf06b86cd",q.Tt_deco_bp_planet="19a7a513-44b9-4941-a2b2-98bd6f6a59b0",q.Tt_deco_bp_puffyskates="2f5cdb8f-f345-425a-9a83-66205b5a3436",q.Tt_deco_bp_redgrassmushroom="d19662ea-ca8b-478b-a461-54d55ac94333",q.Tt_deco_bp_starswithcrescentmoon="a0603c67-59da-458f-ad0d-4e6f75efb3d8",q.Tt_deco_bp_steellantern="9a607e0e-84d1-410b-9f05-e108ec5d916d",q.Tt_deco_bp_stuffedfish="5da7c51e-5f7b-48a7-b5f2-b250207ab13b",q.Tt_deco_bp_teengargoyle="27a4cc87-2fc4-4df2-a248-0839aecc1907",q.Tt_deco_bp_toyeggnest="5a2f2707-bbc5-42f1-8221-7af0a859410a",q.Tt_deco_bp_windowsillcoolingpie="185fc191-fcf4-45aa-a985-6561a695ab61",q.Tt_deco_bp_woodenclock="b4c45bac-fd3e-406d-b86a-ada2102a03be",q.Tt_deco_bp_woodenoctopus="bbf58b26-1bab-4d2b-9763-eb6fc8481caf",q.Tt_deco_clamshell="fdf8715f-11f2-4c55-bbb0-cafb328c2c97",q.Tt_deco_clamshell_icon="dbf12805-f8ad-4da9-9c7d-df28040f5168",q.Tt_deco_conflictedmask="a5410bf9-e01c-452b-b19d-c67ad916ba37",q.Tt_deco_conflictedmask_icon="e1ca5a40-7b9c-42ec-8c7c-c1056c81beda",q.Tt_deco_crystalflake="0cf5a585-73bc-4c3f-b7a2-1696c1cfcaf2",q.Tt_deco_crystalflake_icon="bf555c8a-f9df-4e69-a5d1-f4ff42df30c9",q.Tt_deco_gingerbreadman="50dc8d86-7283-4eea-bcdf-99deac8544cf",q.Tt_deco_gingerbreadman_icon="284780e9-9b66-41b5-91bb-ef17077c1f73",q.Tt_deco_grapes="f1c4f238-4968-4223-8bdd-b8b86493a1d8",q.Tt_deco_grapes_icon="47ecd891-f539-4f3b-914e-4aa4c9aef15e",q.Tt_deco_happyflowercoconut="a10272e9-f176-4490-abad-22cf16d1605a",q.Tt_deco_happyflowercoconut_icon="200c6e49-3d20-4be7-b133-faf6f5e7af30",q.Tt_deco_happystar="7a75c80c-89c5-4e6c-bd7f-0a1418e0b593",q.Tt_deco_happystar_icon="ad5963a4-a7a2-469c-8a4f-602cb7265121",q.Tt_deco_happysun="376ecc1b-9e3f-487e-b330-08f0a41a072b",q.Tt_deco_happysun_icon="0b135c11-efd4-4055-b8c6-addc71701b68",q.Tt_deco_hummingfeeder="77840809-c991-40e6-86e7-bcfa1cc64353",q.Tt_deco_hummingfeeder_icon="0d622501-9155-48b8-b7b8-7bc8dd57b526",q.Tt_deco_lantern="66ef08bb-b271-42e3-a6bf-e60f60f48260",q.Tt_deco_lantern_icon="ae19f1ca-c38e-4d2b-8acf-6c2d68a8ee35",q.Tt_deco_lifesaver="640d8ac1-0452-4af1-bff8-c8e9eab5929b",q.Tt_deco_lifesaver_icon="e9b38757-f0eb-4d0b-9c31-63269534e0bd",q.Tt_deco_orangeflower="be857fda-6001-42e0-92a7-bc017be1eab9",q.Tt_deco_orangeflower_icon="2fe5e140-f8d9-49be-9a13-7be9c4114c67",q.Tt_deco_ph="5ac3cf37-e35b-49d4-853d-bd55c1ddaf0d",q.Tt_deco_pinkflowerbasket="340cbe8f-c2b3-420c-94be-4936df86427e",q.Tt_deco_pinkflowerbasket_icon="7f707cfd-7fea-4ff4-acb8-0745899dd90c",q.Tt_deco_pinklotus="85277284-10c8-4607-9973-ffbcb20196b6",q.Tt_deco_pinklotus_icon="b48c4d7c-0391-44f0-93e9-41a9a79632ba",q.Tt_deco_piratewheel="34b03b72-e45c-4c13-9f17-a0f91103e689",q.Tt_deco_piratewheel_icon="f40ef9c2-d34b-4121-b91a-50a54ba99e0d",q.Tt_deco_planet="70daed12-608f-4e43-9056-aa68173fccd7",q.Tt_deco_planet_icon="bcbecc40-f2b1-411e-aa81-02eb439ae609",q.Tt_deco_puffyskates="92330445-45f8-4d82-8f1b-93381c509b90",q.Tt_deco_puffyskates_icon="e8c4e4f7-9284-4ec1-982b-ee970b3331ca",q.Tt_deco_redgrassmushroom="8c77d9c5-9ae2-44b4-a48e-0bab12e1497e",q.Tt_deco_redgrassmushroom_icon="3da43433-f4f6-4c5f-a66c-59f4b162000d",q.Tt_deco_starswithcrescentmoon="b1bd6977-3ee6-406b-8480-0c391de6c0aa",q.Tt_deco_starswithcrescentmoon_icon="5fd18966-9297-42ff-8834-af8c19019104",q.Tt_deco_steellantern="fc331545-ffdb-4b6f-aafb-55b1b2be29fe",q.Tt_deco_steellantern_icon="b62b3723-8785-4968-9158-bb4e160a4b8c",q.Tt_deco_stuffedfish="6dd274ef-85a8-4e6a-ab39-c0fb297f1cd4",q.Tt_deco_stuffedfish_icon="863f5ab1-d7f6-44b1-a4f5-ea6403a36ce4",q.Tt_deco_teengargoyle="8b5a06e0-9096-43a4-a029-512482a67752",q.Tt_deco_teengargoyle_icon="6ae9949c-1206-46f6-92b2-2f7877837aa7",q.Tt_deco_toyeggnest="2b90adb7-029c-4b74-afa2-f92032a9c289",q.Tt_deco_toyeggnest_icon="f9d66f9a-a2ca-4cdd-b28d-5cf50f80938e",q.Tt_deco_windowsillcoolingpie="9df4bbab-492f-4211-9b0a-7fcf940d7c97",q.Tt_deco_windowsillcoolingpie_icon="37602f1d-a6d7-41f9-ad56-05c0f6b7a80f",q.Tt_deco_woodenclock="5ab0fdf6-26a3-4ed7-9d17-64a4e04ae159",q.Tt_deco_woodenclock_icon="49624b28-f9b9-4088-a128-98f56447c08b",q.Tt_deco_woodenoctopus="d148638b-2138-42e0-92a3-b1d1a945ec1e",q.Tt_deco_woodenoctopus_icon="9a0aca29-f83a-4c11-b637-c1fbbb7b6a1d",q.Tt_frame_bp_fire_1="e3bb9891-0d94-4710-b0bf-7a658a897ecf",q.Tt_frame_bp_fire_2="5e6437b4-f0e6-411d-b017-068cb298989a",q.Tt_frame_bp_fire_3="1270fe1a-1343-4ad5-b402-2a9b01e87117",q.Tt_frame_bp_fire_4="4329dbff-147a-454c-a7d2-4de069ae7081",q.Tt_frame_bp_fire_5="0bf182c9-d86e-4187-8dd5-f197ebdac5cc",q.Tt_frame_bp_fire_6="443b30dc-e9dd-4878-8f61-87eee5778b39",q.Tt_frame_bp_ice_1="3299d38d-60a7-4cb4-8673-8faad34f7e2e",q.Tt_frame_bp_ice_2="8537252a-2df9-45ab-8d91-a39245ebf242",q.Tt_frame_bp_ice_3="475a7abf-9aca-4fe7-aba0-7d42a12c4c3a",q.Tt_frame_bp_ice_4="6d6da880-a0b3-4890-a2a5-563da06a3e1a",q.Tt_frame_bp_ice_5="32ccd383-abd3-4c82-9149-588cc2bd75eb",q.Tt_frame_bp_ice_6="5ce657a6-86ce-4d46-bcdb-662e77c918b0",q.Tt_frame_bp_plant_1="bd91c3ed-846f-4dc1-8aa2-a6cc08b9030e",q.Tt_frame_bp_plant_2="50df3deb-f1cd-4a6b-840b-4a6d54482021",q.Tt_frame_bp_plant_3="90531f5d-2ee8-4343-9442-cca88ed5201a",q.Tt_frame_bp_plant_4="c4b29660-ef9e-4cab-9bc3-1d0e5adb73fe",q.Tt_frame_bp_plant_5="83374789-ce38-4daf-b311-bd40951efe9f",q.Tt_frame_bp_plant_6="088ebaf8-9248-481d-b35f-d576e6e4befd",q.Tt_frame_bp_storm_1="c0d2613c-8953-4a0f-86fd-05abe84b5868",q.Tt_frame_bp_storm_2="2d353e46-ab0c-4307-9d62-83bba831a90d",q.Tt_frame_bp_storm_3="e106853b-d3d8-4cf9-8602-8c818acb35b9",q.Tt_frame_bp_storm_4="9eacd7df-ba5a-4066-ae4d-5e5ea92bf5b9",q.Tt_frame_bp_storm_5="3c298e45-78b3-4e35-a7b7-ca73833a19e1",q.Tt_frame_bp_storm_6="4a3d125a-1c4e-4bf8-ba25-b81be5f6a001",q.Tt_frame_bp_water_1="afe55c6e-0225-4e18-961d-a05ff38bb836",q.Tt_frame_bp_water_2="ae743243-7f11-483c-8c85-61dab2c1ee70",q.Tt_frame_bp_water_3="2d825d74-7924-4d38-8c67-a43c8e1fb8d5",q.Tt_frame_bp_water_4="6b1c0d07-6cc3-4fcb-843a-ae8fe853fb8c",q.Tt_frame_bp_water_5="c2ce1daf-cb34-4269-a08e-5c3af052d64b",q.Tt_frame_bp_water_6="e93026d0-9c96-4bac-b429-f64f04b70515",q.Tt_frame_fire_1="724620be-09d0-4a22-9ec4-82c0c5545549",q.Tt_frame_fire_2="96ed4c11-5af2-4968-8079-02a6b1dcd3e5",q.Tt_frame_fire_3="0ac7096d-5a5a-41ee-898b-a88c5f59ebe6",q.Tt_frame_fire_4="9afdd9d7-2024-42ab-b402-54095a60f530",q.Tt_frame_fire_5="bf54d6f3-acde-4761-a335-e3f42d145892",q.Tt_frame_fire_6="586b8c02-4057-4db5-a5a0-c95c517819d5",q.Tt_frame_ice_1="77b9ce41-7947-4772-a93b-cd6ef8c4c264",q.Tt_frame_ice_2="5859c787-9f92-4b03-8a7a-cab44cb8a8d8",q.Tt_frame_ice_3="b9e09b67-d11a-4288-89cb-50830314edfc",q.Tt_frame_ice_4="76618ee8-4811-4df7-ad8e-ebbdba704bc8",q.Tt_frame_ice_5="998a2a2e-543a-471a-b4f0-0c3a917240f3",q.Tt_frame_ice_6="0e95d74a-26dc-4130-b476-7bbf270d04fd",q.Tt_frame_ph="fe5038c2-1e83-453b-9b8e-8d4c388392f4",q.Tt_frame_plant_1="123dd58c-e4ed-4d7d-b295-e2fbd2371401",q.Tt_frame_plant_2="f511b723-5748-4ddf-bb01-132ae1a7d9b1",q.Tt_frame_plant_3="771757fb-eb93-48bf-892f-4a183daf9e85",q.Tt_frame_plant_4="fde30427-6871-4d1e-9d92-a6df7bd26843",q.Tt_frame_plant_5="b975919a-cd48-4793-8f43-3e543cc2e70b",q.Tt_frame_plant_6="211932bc-9d15-4149-a5c4-86c3d3a31b9b",q.Tt_frame_storm_1="368622ba-1ef8-4c7e-9fbe-91535b5a98bd",q.Tt_frame_storm_2="de6b6efa-10cc-4fcc-b81d-8b23f56c5903",q.Tt_frame_storm_3="180338e5-bcfe-41fd-8ade-9844b4dcd594",q.Tt_frame_storm_4="8cb72f8c-0118-4c52-bbf4-62ba6420f868",q.Tt_frame_storm_5="e77f40e2-db00-4669-af50-2cc659445979",q.Tt_frame_storm_6="ea8dc9ad-4562-452c-a35b-48bdd76e3a62",q.Tt_frame_water_1="2a2109d5-76d4-404a-9bbc-0eac2b5dffa4",q.Tt_frame_water_2="07a9b8ef-68c7-40f5-9db6-bda1a321bdc8",q.Tt_frame_water_3="3e441ad5-878b-4b8c-b49e-b9c6aa45d81f",q.Tt_frame_water_4="02d84c7d-1fbe-42be-bb9e-a013fdd7fa19",q.Tt_frame_water_5="b8a82e80-8f1f-416f-acc9-5506de7972bc",q.Tt_frame_water_6="9d1ecaa9-5c62-48c8-8627-a4fcff95f3ff",q.Tt_int_ph="5d4d4873-a4ce-44e2-89e7-85fb582da46f",q.Tt_interior_bp_fire_1="ab4b7495-5b6c-44e1-91cc-8b20e3d591cd",q.Tt_interior_bp_fire_2="32b9b825-2a7d-4a66-803c-811175c2acc3",q.Tt_interior_bp_fire_3="c27548cc-d564-44b1-b383-5c85be7fac1d",q.Tt_interior_bp_fire_4="98bf3075-2b4e-4571-9dc9-79785109de23",q.Tt_interior_bp_fire_5="baf70955-2754-4eee-a6d8-5f57249e8ccc",q.Tt_interior_bp_fire_6="1a32e62e-404b-46dd-8a44-24cf9aab7770",q.Tt_interior_bp_ice_1="fcadc8e5-3025-4eaf-91a6-4920279944a6",q.Tt_interior_bp_ice_2="5447f88e-4ad1-45d1-8c7a-c6eaa917ebcb",q.Tt_interior_bp_ice_3="a59de311-8fb0-4f78-b187-25b652f2eb3d",q.Tt_interior_bp_ice_4="6e6fba1d-0a85-477f-9165-ece2fdeaba14",q.Tt_interior_bp_ice_5="5d8771ec-88dd-4aa6-9ffe-75563d349a66",q.Tt_interior_bp_ice_6="1ce79b4d-22df-46ad-9204-30cd06d433dc",q.Tt_interior_bp_plant_1="cfcdac71-0aaf-4c61-9175-2063a558fba9",q.Tt_interior_bp_plant_2="6f4f7e65-40ee-4c24-bd7b-9895bbf3573f",q.Tt_interior_bp_plant_3="0028d0c1-c998-4566-a0ec-f3c11155b9e4",q.Tt_interior_bp_plant_4="83a48057-8825-4cb9-8c7d-811de9c038a6",q.Tt_interior_bp_plant_5="fcfc747a-071a-4bc9-b5e8-cb08c03ff214",q.Tt_interior_bp_plant_6="c7ff2d6b-b28f-40b3-b3ed-66490a1c6439",q.Tt_interior_bp_storm_1="caef0401-1865-42e3-8350-a35abd451418",q.Tt_interior_bp_storm_2="ccd5e840-f260-4a5b-8603-3ff567f78a78",q.Tt_interior_bp_storm_3="e3170739-c616-4927-b070-c3a867e1dec5",q.Tt_interior_bp_storm_4="1967b439-eb0c-4dd3-8f4c-04d89dd227df",q.Tt_interior_bp_storm_5="bb4365b6-4445-435a-b6ff-c16cfa160590",q.Tt_interior_bp_storm_6="0c6256ea-3716-45ec-babe-0c74d4e6ec45",q.Tt_interior_bp_water_1="70fbb9e6-6fb6-4304-a52d-09aec2afd235",q.Tt_interior_bp_water_2="5a22dd34-d216-496d-ba5a-9a2dd24a4481",q.Tt_interior_bp_water_3="2f1d4452-1300-4e79-961a-f7c1e7583ebb",q.Tt_interior_bp_water_4="26eb1461-956c-4b7b-a2d2-d106160e7afc",q.Tt_interior_bp_water_5="19970c62-a9c8-469c-92b9-0b3ce2dde87d",q.Tt_interior_bp_water_6="2252c25c-54a5-42bf-a25c-357094099029",q.Tt_interior_fire_1="c2a28b5c-2ffd-4cd6-8630-3c2208ccaf74",q.Tt_interior_fire_2="7b4419cb-9abf-451d-b4f3-95bd3cba9a1d",q.Tt_interior_fire_3="5fc5e4ca-6e48-4755-9b7e-5c331bfffa59",q.Tt_interior_fire_4="fde40b18-d611-4414-85e9-eb86a7d3e9cd",q.Tt_interior_fire_5="6dc70ca4-496d-4b23-b227-cb035c16d863",q.Tt_interior_fire_6="7dbccda0-2a2b-44af-ad71-5b4d2f082d77",q.Tt_interior_ice_1="0fbaf01c-bc33-44fb-9b0e-d4f7aea9931b",q.Tt_interior_ice_2="ce785ad7-3be6-4036-ab4d-874bc5208d8a",q.Tt_interior_ice_3="9863d48b-fdbd-4284-9861-8b2dd6d94b4e",q.Tt_interior_ice_4="1dd60917-584b-45c3-8e80-85ab9f5d1103",q.Tt_interior_ice_5="d8c92be9-a327-4c8a-81e3-155888c4dd97",q.Tt_interior_ice_6="c8843328-0073-4d77-8914-271c58150c64",q.Tt_interior_plant_1="2609e420-488b-487f-82db-7033509ad435",q.Tt_interior_plant_2="9e7344b9-f5a3-466f-a015-e5249d837b57",q.Tt_interior_plant_3="7ffdfbdf-6be8-4ad8-85cb-48091b75d86f",q.Tt_interior_plant_4="c609310d-e764-4f81-8b83-5c27e6b2b53e",q.Tt_interior_plant_5="0d226f6d-c586-4676-95a0-421a5967b2d0",q.Tt_interior_plant_6="0ea565f1-ef8e-4ebf-84c2-d788186064ac",q.Tt_interior_storm_1="bffb6e2a-6096-4c80-b8ea-2af4e9e85a62",q.Tt_interior_storm_2="e467bc8d-1849-4d25-bb57-9f59736a25d1",q.Tt_interior_storm_3="f6f10267-1650-424b-b7b5-f32f557a49ba",q.Tt_interior_storm_4="97baae73-1a31-4446-badb-5cbf19c21b1a",q.Tt_interior_storm_5="84b0a122-4515-4813-bcfd-9e03ff012115",q.Tt_interior_storm_6="7d4610eb-6dfe-4353-9ee4-fd2ed9822f11",q.Tt_interior_water_1="dcd376aa-6b22-46e8-a091-a8c485c8eff5",q.Tt_interior_water_2="13df2b8b-124e-40bb-9fd6-4fd1be1baa9b",q.Tt_interior_water_3="af7bbfad-b382-4483-a863-11acac7b4007",q.Tt_interior_water_4="8cd48d7b-fb90-4334-b598-6aa5260e3a3b",q.Tt_interior_water_5="b2aedede-366e-4cf2-b9e5-2f8f0daa1ae2",q.Tt_interior_water_6="179832bd-08fb-4911-b71d-b13f4d5fd2e3",q.Twilight_wheel="e53556f7-d1df-4e5d-a457-fa99e83e05b9",q.Twilight_wheel_off="234407f9-1f33-49b8-8a7b-4a4bf504cab4";q.Ui_coop_bucket="e233cc3c-fcd8-4142-87c7-33c34570007b",q.Ui_pet_xp_boost_graphic="8da014e1-1078-45e4-a5e9-06a36aca15fb",q.Ui_pet_xp_sunburst_white="8c6d94e8-24f1-47d7-a9ab-cb65dd1c866c",q.Universal_scroll_bar_slider_basic="db95a2c0-abe8-4710-8ab9-902cf65e8809",q.Universal_scroll_bar_slider_hover="08551e9e-d5a8-4830-814c-aaad30f76c97",q.Universal_scroll_bar_track="a365d6ce-345f-4404-8d2b-b389bc6716fa",q.Vertical_dorm_1="4ad58123-ea85-4242-869b-d2bda088d557",q.Vertical_dorm_10="77f018d4-566d-4238-943f-73ecef33542a",q.Vertical_dorm_100="46daf03d-9175-4d3c-b9b2-fee25d9a7caa",q.Vertical_dorm_101="ea817ccd-3733-48d9-b5bd-5b5ff786751e",q.Vertical_dorm_102="121049e6-54e5-4863-a8b4-cc68ef39a945",q.Vertical_dorm_103="c6373e45-7fec-4695-8842-e952d9bcfb2a",q.Vertical_dorm_104="02b867b4-1002-4e64-a27a-ed721a1f9053",q.Vertical_dorm_105="2896771b-4f47-4d4c-9ca3-98b1346fda93",q.Vertical_dorm_106="25f56ef1-95cc-4cd6-8723-e932e0407b71",q.Vertical_dorm_107="acf1ab4f-7f66-43e8-9f8e-38c4d40aa071",q.Vertical_dorm_108="c18983be-4074-472b-9c1f-23fa166b6288",q.Vertical_dorm_109="116a4406-7663-4401-9cdd-164f1d2571b1",q.Vertical_dorm_11="73f521b3-c357-425d-b867-4caaa034914b",q.Vertical_dorm_110="96d8ab22-8f7d-4c11-9929-7914ceff4742",q.Vertical_dorm_111="304acc4f-013a-4385-8862-5cd828e962e2",q.Vertical_dorm_112="891e8319-ec08-4dad-bda1-0f196fb34001",q.Vertical_dorm_113="a3f3622b-caec-4228-8deb-2ce3afae8bc8",q.Vertical_dorm_114="5ae172a1-73d5-4a1b-b272-4b1e11012d1a",q.Vertical_dorm_115="3a0c6a18-986a-4ef3-8867-d53d3745fbc5",q.Vertical_dorm_116="de4470db-7d8f-4805-8fe7-82b242980c95",q.Vertical_dorm_117="3dee9d55-bcdb-482a-b058-e19d4c08a68c",q.Vertical_dorm_118="be2ca8e8-3dac-443a-b65f-5ae7e8e6cb9c",q.Vertical_dorm_119="c355abe3-269b-42ec-b7b6-ee730008a592",q.Vertical_dorm_12="b6eba5bb-65b1-4669-bf13-637202be6482",q.Vertical_dorm_120="cb5af5ba-e272-478f-a826-333c87853db4",q.Vertical_dorm_121="48a7a1ce-4ac4-4235-a522-9915ef6f4636",q.Vertical_dorm_122="d03a9445-2b10-40c4-ba8e-6ff0c120d623",q.Vertical_dorm_123="af9130e0-99e6-4dae-9121-b95b154b0756",q.Vertical_dorm_124="da4b5c3c-770e-4327-ac01-92bf2fcaf7b2",q.Vertical_dorm_125="6d9fe51b-5482-4c91-acbb-ee87363987aa",q.Vertical_dorm_126="0547038f-5510-4833-863f-14ea9a205840",q.Vertical_dorm_127="b47d66d7-ab54-4f49-8ac3-363df8cc18f5",q.Vertical_dorm_128="61751a5a-1c48-4a9b-a042-ad7e29802ff5",q.Vertical_dorm_129="9e60cc4b-fcad-4f96-8fd5-77523299669f",q.Vertical_dorm_13="d814b3c3-5efd-40fa-90c2-2efa648c75d7",q.Vertical_dorm_130="632d7aec-aa0c-425b-a16f-1964f84ea0b8",q.Vertical_dorm_131="1977a218-0ebc-4149-a78a-c512468aa4d7",q.Vertical_dorm_132="3ab4754e-885d-4d16-bc60-2cccba483e76",q.Vertical_dorm_133="29cb3648-3ae9-47df-9ba5-9c977ed2fdf4",q.Vertical_dorm_134="9eec7380-9a71-48ad-bc05-ab195a1d2ca8",q.Vertical_dorm_135="65f51264-d8c8-4505-a0ba-2467c71ebe83",q.Vertical_dorm_136="461ea4cd-02c5-419c-9e00-313b2885ad8c",q.Vertical_dorm_137="181f42cd-5a64-4c16-b919-0252a0e6e2cd",q.Vertical_dorm_138="6b3fbc75-0b79-4330-9c24-5a893ea6e7d9",q.Vertical_dorm_139="86dea814-2908-4b65-b3a5-d37fd3973c00",q.Vertical_dorm_14="e1cf4f8f-c5a8-4e13-9f7c-11dd6e9fc6fd",q.Vertical_dorm_140="aa8b79d7-9d60-429d-ab3d-98ba531b9f91",q.Vertical_dorm_141="157c6a83-8c2f-4c22-96ca-70e658a1731a",q.Vertical_dorm_142="f1339be0-7362-4be4-9133-850cfe01239d",q.Vertical_dorm_143="4f69f346-493a-4563-81a1-3e20baa5703a",q.Vertical_dorm_144="f6c8fb46-f7f8-4769-ba5b-49eb9ca1ea08",q.Vertical_dorm_145="a908c059-52fb-4193-b2a4-c6082b9a1c62",q.Vertical_dorm_146="ac3aa61b-ae3e-42c5-9e65-5222cde16a67",q.Vertical_dorm_147="9d9d45c4-19e5-4ea0-afb0-0b709f96942c",q.Vertical_dorm_15="be6f339a-8cfd-4d95-af27-22f55c0b541d",q.Vertical_dorm_152="eb4f600e-15f9-4d96-8f83-05c224f78deb",q.Vertical_dorm_153="786c8f3a-d93f-4990-9b96-5dfcdfb2b14b",q.Vertical_dorm_154="13a7419f-24c2-487e-9427-466fe2b27715",q.Vertical_dorm_156="d3a809b6-b38d-40c5-a79f-9b53afe7090f",q.Vertical_dorm_157="cc33c0b4-55e1-4f32-ba8a-bcf1807c3e23",q.Vertical_dorm_159="d69be3e8-a2b2-4191-bfdd-1bb4917ca18b",q.Vertical_dorm_16="14bee117-1627-4ba5-a7fb-05c7d1f21c6f",q.Vertical_dorm_160="4c5f93a5-e3f0-4f49-8c14-ccd31cf826ac",q.Vertical_dorm_161="16e2f3e7-ec4c-4a1d-8801-13c90a035b08",q.Vertical_dorm_162="61bd7028-7489-457c-8ba3-e10dc10fabb3",q.Vertical_dorm_165="ec8ebbf7-211d-4e66-9054-63acacb62fe5",q.Vertical_dorm_166="597af58c-12d3-4cad-a2f6-f9c576ae467c",q.Vertical_dorm_167="9a664ec2-81ae-4761-8f19-04769633fe11",q.Vertical_dorm_168="9fa610e8-a404-4970-ad24-8f9ae440ec8c",q.Vertical_dorm_17="b9e85a13-ae87-4319-a53b-f8cb36b2743e",q.Vertical_dorm_170="7e70aa9d-934d-4101-aad2-a6132f9eba93",q.Vertical_dorm_172="285b0d23-0a04-4808-bf6e-9bce7cb3d108",q.Vertical_dorm_173="524b931e-8fae-4940-aaf6-e26cc8e19cbd",q.Vertical_dorm_174="71fb2cd8-8def-4b2a-b29f-9fae5d527983",q.Vertical_dorm_175="39f226e2-9795-495a-af71-261eca208b2d",q.Vertical_dorm_176="a4f33b37-ad76-458f-83b7-11a5205b8163",q.Vertical_dorm_177="e34fbd43-8c7b-4e3d-92eb-42c6ba8319a7",q.Vertical_dorm_178="2ee126a4-ff03-48ed-b131-210780a1f930",q.Vertical_dorm_179="6f340796-e992-4f71-a2a5-13b2692bea73",q.Vertical_dorm_18="719ee94b-0e05-4336-99cd-215b51b4b5ea",q.Vertical_dorm_180="3e29437b-f895-4fed-80b8-ebc2b8f3f96c",q.Vertical_dorm_181="2501177f-4111-48c4-868c-af60619f6f7f",q.Vertical_dorm_183="4128a834-34ff-406f-920a-be02ce4cde91",q.Vertical_dorm_184="19ccddc6-a115-4283-b836-5933d8a535e4",q.Vertical_dorm_185="c715f6cf-2f68-459d-ba0c-6c91823c54be",q.Vertical_dorm_186="30992f5b-8c7b-4763-a667-b220e5fb1f96",q.Vertical_dorm_187="e8aa633c-2a6c-4791-a834-6d9061820fb3",q.Vertical_dorm_188="208c911d-4565-408a-a0e8-2a42aa54ce8a",q.Vertical_dorm_189="5c033a33-935c-4df0-91d3-b01672ae514a",q.Vertical_dorm_19="f5e1bcdf-8f7a-438d-9b76-ff09328943dd",q.Vertical_dorm_191="12b15048-b0da-4b87-82fe-5301473d1015",q.Vertical_dorm_192="b1b9aba5-8c16-4307-95c3-1bd2cfb7a5ae",q.Vertical_dorm_193="cbd78246-97a8-4f91-af1d-f166f06de41d",q.Vertical_dorm_194="fe52e6c9-e394-4f87-97d6-23c7565e3dcc",q.Vertical_dorm_195="a5802ac7-b883-4685-876b-9e74e4e2d12f",q.Vertical_dorm_196="22983af1-8b06-4ddf-93f4-6f7629d4da82",q.Vertical_dorm_197="d16fe0df-4856-4c10-9014-7f5f8f3c9e16",q.Vertical_dorm_198="5a2cb3d2-f60b-436a-ad4e-8d7d83c867ea",q.Vertical_dorm_199="a15bb8d9-3972-4e4c-8a0b-2d2ab0c75e77",q.Vertical_dorm_2="668ed1e7-0cd7-4f71-af03-b715d875443a",q.Vertical_dorm_20="e87012bc-6ded-48dd-a59b-d0cc872cbdc4",q.Vertical_dorm_203="3d2748b9-4c49-4707-8dc4-e200cc8dcf7a",q.Vertical_dorm_205="fcd38cca-b804-46b6-8f8c-6694e2854e4f",q.Vertical_dorm_206="c7b50da8-810c-41ff-a3a9-6e1f44784e0e",q.Vertical_dorm_207="eb0d8310-3448-4f8c-957a-f964ade86c86",q.Vertical_dorm_208="21c9bdc2-b46b-4324-9048-22162737caaa",q.Vertical_dorm_209="bc3393b3-bda6-4ebb-9b81-1840bf6a7364",q.Vertical_dorm_21="fe915b04-0cb8-4575-9570-e31c17740cd8",q.Vertical_dorm_210="4b08c230-6f65-4fa4-81c2-d5477dc38634",q.Vertical_dorm_211="8834fb38-ec5e-435b-bd28-0c9e8cfb4ca7",q.Vertical_dorm_212="8b7bd883-3081-4fd4-9e95-1f7c2c785955",q.Vertical_dorm_214="ecbe380e-ffd3-452c-b97a-b478fd9d7cb7",q.Vertical_dorm_215="ad9baa0b-5980-4b47-8d84-d98cdaea5e5b",q.Vertical_dorm_216="1842d300-ab4c-4376-8d69-c895bfaa3ebe",q.Vertical_dorm_218="55aafa5b-2d36-444f-a0fb-3630b2bc8e4d",q.Vertical_dorm_219="59c1c23d-535c-4563-83e3-a74588e6d6de",q.Vertical_dorm_22="e4be1a58-d9af-4747-bde6-c728d562b7db",q.Vertical_dorm_220="41194cfc-40de-4a6d-9e86-1c0db943c8c1",q.Vertical_dorm_221="eeffc5a8-fe58-4a2e-b502-689f744233e4",q.Vertical_dorm_222="3f865840-c2d7-4253-9c4d-47d92616595d",q.Vertical_dorm_223="8294171e-46a2-4e0f-848b-870011366c53",q.Vertical_dorm_224="97349e61-dee7-4735-8a13-54a23c41997c",q.Vertical_dorm_225="8ea3c86a-3926-4ce7-abd3-715295c4a9f9",q.Vertical_dorm_226="0a3a309a-383f-4b49-a170-b172318a9429",q.Vertical_dorm_227="b8b59b7c-399f-4de4-b67f-81ff5157a4fa",q.Vertical_dorm_229="b5c73340-46f5-43b6-9c17-1477b0c08cfd",q.Vertical_dorm_23="fea36508-fd22-49cd-a9c1-77e66ee50282",q.Vertical_dorm_230="0e1bab9e-7c53-4ce7-befa-3951aea02b26",q.Vertical_dorm_231="c0c56a5e-8aaf-450b-a702-79d6621a5833",q.Vertical_dorm_232="a74d9e81-ead0-4781-8bd6-9071241e79e8",q.Vertical_dorm_234="9415d381-beb5-4539-8bbf-3b20d8ec9c97",q.Vertical_dorm_237="5b584940-97e2-4ccb-84c3-d59335997698",q.Vertical_dorm_238="be69ed67-53e4-43b8-adf1-1851450922da",q.Vertical_dorm_239="b1b2ad1b-5531-49fe-91a3-d7f605806039",q.Vertical_dorm_24="1736c17d-d4a9-45f3-a4c3-b75c7f0fe74a",q.Vertical_dorm_240="49ed535a-5634-4a06-a420-108aea365f6c",q.Vertical_dorm_241="7068344e-92a3-4981-a163-91785608dddc",q.Vertical_dorm_243="faace1a3-9bf0-45ca-b6d3-cf9eaf95448c",q.Vertical_dorm_244="a56b5129-556d-4e82-b100-bb26bce1203d",q.Vertical_dorm_245="b3af069d-0864-4b0d-8457-1fd0d14a7720",q.Vertical_dorm_25="33416572-0b6d-4c80-82b2-877e55204337",q.Vertical_dorm_252="d0904dbc-2c72-4c66-9f57-a0c1b73bd807",q.Vertical_dorm_253="4fa26da1-a0d0-45d3-8ab1-bd8c12d6c7cd",q.Vertical_dorm_255="2a238fbe-26c4-43c9-b968-91436dc22ec8",q.Vertical_dorm_256="3a34c0fd-c8d8-4f60-bc78-df650e7d8e2b",q.Vertical_dorm_258="727b4ee4-6231-4c09-9ffb-7dfb10813fbb",q.Vertical_dorm_259="86f27d75-c913-490f-a1af-67188f2f6571",q.Vertical_dorm_26="2030fb5c-1b40-44d1-a88c-e39f45d0646d",q.Vertical_dorm_260="92bda2d8-b28c-4c67-acb6-1e01132edd0e",q.Vertical_dorm_261="e83897ca-deda-4439-a42d-cb33fd323fc2",q.Vertical_dorm_262="13ae8b71-39c3-4482-97ea-072b70fe2332",q.Vertical_dorm_263="42e770a9-cae0-401b-be5c-3df412779644",q.Vertical_dorm_264="0d01ea41-014b-480a-a352-b8332b4695d4",q.Vertical_dorm_265="5794cf9d-5edf-4dfc-9d7f-086d703cb770",q.Vertical_dorm_266="5135c6b2-df4a-460b-b812-5f645666ad1e",q.Vertical_dorm_267="91857c61-0902-4b8b-9018-22c42dcbafda",q.Vertical_dorm_268="3f9771fb-1fb6-4339-b1d3-58c3e392e3b0",q.Vertical_dorm_27="eb914dfd-24b3-4b83-9645-e294daee9c70",q.Vertical_dorm_274="45d5a797-f9b4-4cf9-a32b-70928fe072dd",q.Vertical_dorm_275="0d0c4d44-6294-4ff7-aa9e-9347d6e6e385",q.Vertical_dorm_277="7a2db271-c722-4a81-a427-625677e90847",q.Vertical_dorm_278="30756eb0-2728-41af-806b-1ad8bce77d5e",q.Vertical_dorm_279="e16d4e0b-80f7-4931-8fbf-28edb51c7622",q.Vertical_dorm_28="4ae704da-a08e-4a47-aab5-7a1195e72f22",q.Vertical_dorm_280="ac95d496-521e-43fc-9ee5-5cb1c8d96fd4",q.Vertical_dorm_281="66cbb8a4-4189-4e76-a763-f80e028889fa",q.Vertical_dorm_282="bf72de50-6886-437d-a1d3-cbc64acc9095",q.Vertical_dorm_283="3a368014-8053-4247-a0a1-8985c68bac88",q.Vertical_dorm_285="bd9a2c82-2962-4e9e-bf71-299d41ed8e28",q.Vertical_dorm_286="c430e7cf-7fc9-4e71-af19-e7deec2c67e9",q.Vertical_dorm_288="c0445e84-df8c-449c-932f-d2b7fb299d5e",q.Vertical_dorm_289="79fe6544-9492-4865-8a49-949dafb41ef7",q.Vertical_dorm_29="ee0f916f-006b-44ca-9cd0-2cc54d04b3e2",q.Vertical_dorm_290="6c699154-8d65-4d18-ab7d-dbaa00f30d7d",q.Vertical_dorm_291="9cbda97e-930a-4ea5-b2db-b92d101dc7c7",q.Vertical_dorm_292="a897c25c-09ce-4856-9ffd-cbb1090c95da",q.Vertical_dorm_293="02e57672-5e18-4693-8f78-b3ce663b5087",q.Vertical_dorm_295="a619c211-28be-40e0-965e-2ef65e68f7d7",q.Vertical_dorm_296="800a8da1-3823-4711-bef4-b5acfaab9ad4",q.Vertical_dorm_297="9bd484ca-4114-498e-ab1a-8806d098c790",q.Vertical_dorm_298="1a4ba5d8-7ff5-4120-b775-513b1a2dbde1",q.Vertical_dorm_299="82c348f8-beb7-43a5-9919-e39fbaff8a83",q.Vertical_dorm_3="7eca12b2-033c-4658-a87d-f116f8889b39",q.Vertical_dorm_30="e189e0d2-b18f-48a9-b004-b09c7493d60a",q.Vertical_dorm_31="b1c809ce-737e-43e2-866a-849718ae4c51",q.Vertical_dorm_32="2676b6a8-b797-4054-9397-296c39ae8e61",q.Vertical_dorm_33="b2fac3b7-f326-46a6-bf3a-64707b6720ed",q.Vertical_dorm_34="541ec6b9-05fa-41e2-9fd9-b39754669894",q.Vertical_dorm_35="1cbd45d0-4b23-4683-b6f7-1407297b9279",q.Vertical_dorm_36="b2025480-bcc2-4c05-9e3e-880dd9b6e314",q.Vertical_dorm_37="2fae27fa-914a-4bc7-9920-62a474816969",q.Vertical_dorm_38="f847a7a3-36a3-4a48-8313-86c67f1bc927",q.Vertical_dorm_39="d08d4545-0927-4ebe-8fce-d5d9149d53d8",q.Vertical_dorm_4="ca84ec42-30d1-4c95-8820-989624814e88",q.Vertical_dorm_40="19d5c281-8278-476b-b0d9-d4836647e7d0",q.Vertical_dorm_41="1fba8776-b618-4bf0-aa9a-c70667628f89",q.Vertical_dorm_42="78e0323b-ab21-4a3d-a141-c68bc8c6be5b",q.Vertical_dorm_43="62740c4d-b407-4d9f-bd50-a83476a7c69f",q.Vertical_dorm_44="e82f984a-79dd-4636-9467-956c38d55407",q.Vertical_dorm_45="3bd66757-34ad-4991-841a-6fd0bf1f9a7a",q.Vertical_dorm_46="d98253c2-05f0-4b38-8d7c-a53f83da3de3",q.Vertical_dorm_47="af44d296-51c5-49c4-9195-5a86ab7d94a3",q.Vertical_dorm_48="8bdf8a5e-d93c-478b-aef3-63fb2561bed9",q.Vertical_dorm_49="afef7edf-a7dc-4d55-ae2c-a8e650a0f7e9",q.Vertical_dorm_5="fc19aa6e-ca14-4736-9fa4-8f465441f459",q.Vertical_dorm_50="515e97e8-ea7f-4a14-9610-725aa0e0be73",q.Vertical_dorm_51="a31d1198-05aa-4b24-9acf-0758f2a4bc26",q.Vertical_dorm_52="76ac8e43-b968-4c4c-821c-615e46606765",q.Vertical_dorm_53="7c34002f-f68a-4963-a1e6-d80d0a06531c",q.Vertical_dorm_54="47db2634-c74c-463e-b37d-b9333898221f",q.Vertical_dorm_55="0e5f6357-9bb1-4c77-85f9-d3984aa21a79",q.Vertical_dorm_56="47667c6d-88eb-4bfe-86c8-7eea4191021f",q.Vertical_dorm_57="e93b12be-be1f-49c6-b0d1-c5832d935aa8",q.Vertical_dorm_58="baf1e07a-2eaf-44c6-836b-d11c7460ac32",q.Vertical_dorm_59="2f334580-76f3-4f8f-a9b4-9b67e94fa974",q.Vertical_dorm_6="8f9c2b70-1ed3-4e62-9179-e545b4799015",q.Vertical_dorm_60="cd6e0ada-123f-4856-bb18-f477c01dd418",q.Vertical_dorm_61="ad193da2-a05c-4081-8644-a12e68c62fe7",q.Vertical_dorm_62="f1c777a6-5815-46e8-803f-363fe7ac047b",q.Vertical_dorm_63="b5df5c96-ae43-404e-bd5a-0cdbc84aab86",q.Vertical_dorm_64="f6177ac0-4acb-417b-926b-ca6030c310a2",q.Vertical_dorm_65="8fb6005a-2442-4122-8b05-c90445cc7d9b",q.Vertical_dorm_66="6f9e9fb8-10f0-4d5b-8c59-52bcad41d023",q.Vertical_dorm_67="48b30297-b9b6-4bd8-819f-e125c30ce575",q.Vertical_dorm_68="c78dbe0e-05c1-4f89-841c-e9ef7be6ec5f",q.Vertical_dorm_69="27c71aa2-f460-4a39-9f52-9559e81aace7",q.Vertical_dorm_7="5205d87f-40bb-48af-9dbf-0479f2c6d1c5",q.Vertical_dorm_70="4c76ef66-ca2e-4f60-9dbe-0a25ff8fad72",q.Vertical_dorm_71="3951dd02-64fa-4789-8abf-ee803ebe3bba",q.Vertical_dorm_72="46a401ab-bae1-4df0-a416-7c594b40cde9",q.Vertical_dorm_73="80fc8684-4583-4d1e-9a84-95f340b5208c",q.Vertical_dorm_74="394a8b69-88a8-480c-9421-bd21b4070da8",q.Vertical_dorm_75="48097014-4415-4aeb-9854-17f15ea74c7a",q.Vertical_dorm_76="65b21868-e2f2-4dbf-ac20-8f7aab78f750",q.Vertical_dorm_77="83c72f0f-d8c5-44fc-a9d6-5a8e4a59ea64",q.Vertical_dorm_78="6fdc2255-d5b8-4928-8d41-c47328e0ea3f",q.Vertical_dorm_79="cccf6ac1-5ac5-4862-afca-7546232cbbdc",q.Vertical_dorm_8="6b84a66c-ab63-4be5-92b3-acbf25c0b8a9",q.Vertical_dorm_80="fe15accb-af3a-4d2b-a928-9c324e678157",q.Vertical_dorm_81="1af11a7c-2dcf-4a85-ac6f-b359993cc4dd",q.Vertical_dorm_82="d2b77216-50ce-4fc9-935c-19e9694ee7b6",q.Vertical_dorm_83="82f59d5d-3331-42d8-a411-5114f43ac0be",q.Vertical_dorm_84="a9a97ecc-2fd8-4ed6-897a-3851061b6ed8",q.Vertical_dorm_85="136b8391-3dfe-4b05-8d48-62a87f64a5c9",q.Vertical_dorm_86="cc32b316-e90a-43b2-8215-d99b45d217cb",q.Vertical_dorm_87="d200b0f1-8694-4911-9450-3bfadb1dc8b8",q.Vertical_dorm_88="60d027ec-b25b-48c0-825b-0bc1e23fa0dd",q.Vertical_dorm_89="1bf21cef-729a-4230-941a-49a3dfd2a7fe",q.Vertical_dorm_9="691d5bab-d369-4b09-a194-caef2b804f81",q.Vertical_dorm_90="202ff271-e4d2-4e53-a6b0-5dd86e2d0813",q.Vertical_dorm_91="f83b44e4-36df-42cf-b739-bb9b49cff800",q.Vertical_dorm_92="79399f78-4159-40f6-afda-fcaaff81c4b8",q.Vertical_dorm_93="45002a87-483a-4bcc-a1cd-88de4ee2dd97",q.Vertical_dorm_94="6142be54-cd55-4519-a14d-165f4dc6a3ea",q.Vertical_dorm_95="3d289d92-d9d9-439e-9e25-7e7ecd42c756",q.Vertical_dorm_96="5f4c3d9d-3a0a-49c1-9949-449c2e10d0e0",q.Vertical_dorm_97="81c4f5f4-f81d-4430-82c6-6ae746d27092",q.Vertical_dorm_98="387b91e7-9902-429d-842d-c9f068c8b38c",q.Vertical_dorm_99="0832752f-fa01-4c3b-8cf7-164fe0f8c435",q.Video_image_costumes="919a0133-db5c-44eb-8e8e-114d62ed3ce3",q.Video_image_home="acfde347-b861-4145-a49d-e88c36feda03",q.Video_image_member="9dad2fb4-1a18-4f2c-a6ff-b07367e38520",q.Video_image_rifts_back="352c528a-ef80-49ee-b629-f0ff97542b2c",q.Video_image_rifts_icon_keys="b6a8cd5a-b26f-48fe-b92b-e77ab4100d72",q.Video_play="c1825d00-0ced-49a9-abf1-c873d4a5e9dd",q.Vignette_general_map_expert="43b45520-fc4e-4531-aa40-e0ee68c57d61",q.Vignette_general_map_hard="82f5c9f5-b43c-4249-a1ec-f3721e889e60",q.WW_StateChallenge_Game="bfb9a1f9-6d66-4d69-9c00-41f7f8a766e5",q.WW_april_fools_2025_thumbnail="8e971ea0-6889-4242-a582-11d3b30600f5",q.Weekly_challenge_1="34c58806-2ce5-4f2e-aa9b-2e53d6e0b36f",q.Weekly_challenge_2="fdf890a3-057a-49b5-9256-de3269e47ad5",q.Weekly_challenge_shine_backing="7f338ae8-c043-4734-be42-1f7ecf16d250",q.Weekly_challenge_shine_backing_member="6778d26b-1231-4832-9be4-8eefde04a1d8",q.Wheel_of_wonder="4b31ad29-c418-4625-9d57-7b06b3cbaf76",q.Wheel_twilight_icon="bb01e396-cbf0-4078-b212-445c893ed864",q.Wheel_twilight_large="02464262-44a8-42e0-bbbf-ef26b3f6a709",q.Wheel_wonder_icon="13dfd8b0-e3ca-4cc4-a66e-a8b3ced3ebd6",q.Widget_gold_back="51c72f62-a752-4a56-b038-98e079f4f71b",q.Widget_gold_back_bricks="f76742e7-bd29-4c79-a76a-7bba552477c6",q.Widget_gold_divider="d777af4b-db68-4669-aeb0-063c7f848c3a",q.Widget_gold_pile_prize="013f6874-f71f-4b11-a60b-6999804f4bc7",q.Widget_gold_price="86765b15-0362-4c47-add1-a42124bcc1b8",q.Widget_gold_price_left="79ac84dd-a3b2-4db4-8d9e-2c6d95fa96f4",q.Widget_gold_price_mid="5b517dd7-b973-45c0-ac96-a65e50d2b0f0",q.Widget_gold_price_right="b82d4600-62cb-41b1-817f-1df6c5cf8be2",q.Winterfest_launch_modal="842fafd7-c60f-43af-bd39-d49ae395aa9d",q.Winterfest_rewards_01="af9a1f7b-021b-483b-8e6c-7de6fd50a3ea",q.Winterfest_rewards_02="46602525-9c07-49b7-9c19-efea962fc3f3",q.Winterfest_rewards_03="8447b388-b147-4353-a17f-16692152adf5",q.Winterfest_rewards_04="b0f6da2c-46d4-4e0e-9e08-6a531500f4d0",q.Winterfest_rewards_05="56e66928-d290-4ce9-85ac-b9ff8d79df17",q.Winterfest_wizard_watch="09a80e11-4db7-4e52-a37f-de83041ad656",q.Wiz_bank_title="340045b4-cdc3-487d-aaa0-96deebabe71c",q.Wizard_watch_bts2024_teaser="faac7228-8936-4d29-97e3-64d2e96a7a55",q.Wooden_background="545a93c1-285f-4950-a832-63ca191215a6",q.Ww_StateChallenge_5="3c286c9c-1ab5-4439-8e70-03afa6ab71e8",q.Ww_accolades_trailer="887bea12-bc52-494a-a399-bf81c5d80938",q.Ww_bts_dragonisland_2024="913762a9-42b4-4d18-bd4d-20fcb62b465c",q.Ww_cake_set_may_2025="e94f19b1-84d4-464e-aabe-49ec0fa1b82a",q.Ww_charged_levels_200="93fe2f00-9a6a-4634-8534-941aca50707b",q.Ww_content_creator_august_2024="d00b1772-a934-4d4e-a3e7-8e2dc281b302",q.Ww_content_creator_nov_2024="5b943a5e-7753-4c56-8de8-4585741120d8",q.Ww_content_creator_oct_2024="a2e4644c-ee92-45d2-b0c6-e601ab8274ac",q.Ww_content_creator_sept_2024="7a86cd31-b2ad-4e9a-91b7-947240416b6c",q.Ww_crystal_caverns_removal="b6092d6f-1268-4dd2-a297-8c721a2ad57f",q.Ww_dragon_isle_launch="47dcf2b5-2100-49d8-8b0c-2a5456c48149",q.Ww_duck_outfit="b5d934d2-96e1-4d5c-a032-79133d3ffcf4",q.Ww_holiday_challenge_2024="acc77611-a4d8-4664-91c1-719c08ad67ef",q.Ww_liveops_rifts_astral="65e9d0f3-8a0a-43e1-b0f1-13ad30f2ac09",q.Ww_liveops_rifts_ice="a554242f-8367-470e-9821-938c3706d375",q.Ww_liveops_rifts_launch="31143655-2560-4d09-b4c9-32af56271797",q.Ww_liveops_rifts_plant="fc309643-bce9-40ad-ba95-31a82ba0f51b",q.Ww_liveops_rifts_shadow="f1b5b25d-d3a2-4bbe-a687-24ffb3c455d0",q.Ww_liveops_rifts_storm="9d1ff203-b71e-4a6f-a607-47885c3a0b6f",q.Ww_liveops_rifts_water="9aa88ab2-7440-463d-920d-5b76b54cb1a7",q.Ww_new_rifts_sketches1C="a8c898e2-9da7-4876-8d4a-990839b736e3",q.Ww_pbf_magicoin_launch="0b96fcdd-a3b7-4274-ae05-42ea2a88d833",q.Ww_pet_merge_trailer="072c2ad1-157e-4bf7-ba7d-904ed8c8d6be",q.Ww_pet_merge_trailer_thumbnail="fbc0b60f-e674-4ffd-917b-35212c11a38f",q.Ww_petgear="b0a6ed75-2840-49c4-9738-b2fc31f41c54",q.Ww_pumpkin_end_of_festival_currency="a7338b3f-e1cf-4c8c-b01d-d0bb683240c5",q.Ww_pumpkin_end_of_festival_mailer="e097150c-9efe-42be-b933-ffe1faa631ef",q.Ww_starlight_end_of_festival_currency="323f474a-a01d-4818-94d4-2da1f037d040",q.Ww_starlight_end_of_festival_mailer="696a79a9-f4d9-4e06-8704-7ffce5da3ea1",q.Ww_summerfest_2023="c1640824-bad1-4143-aef5-ca06fbb9df7b",q.Ww_teacher_gift_april_2025="c09b77ec-9549-499e-977d-26a26b832069",q.Ww_teacher_gift_august_2025="969c9b05-fbff-460a-ba54-eb36296fea6f",q.Ww_teacher_gift_december_2024="32ffc932-684d-4c56-9df2-826c5c709f5b",q.Ww_teacher_gift_december_2025="5d4fb53b-451e-47f6-9006-626c37f84ea8",q.Ww_teacher_gift_february_2025="31299ac9-6b3b-45ba-aba0-0c3cf7fdd8d1",q.Ww_teacher_gift_january_2025="20a59f79-bcf8-4435-8c28-e22be9d33ce8",q.Ww_teacher_gift_march_2025="628d0fc6-00cc-4ee2-9671-09acd6d0f896",q.Ww_teacher_gift_may_2025="5295c7ee-f93e-4aa1-ac46-bef119faa252",q.Ww_teacher_gift_november_2024="4408638c-32a3-4479-bc69-f73b5f4ac872",q.Ww_teacher_gift_november_2025="32131d0f-9a2c-4a6c-93d1-36dbd0623155",q.Ww_teacher_gift_october_2024="67cab5ac-de5a-4bef-9faf-a4db2dc02338",q.Ww_teacher_gift_october_2025="985f1997-58ba-48f9-bff4-6b19b4624f34",q.Ww_teacher_gift_september_2025="bb59a890-f3fa-4c47-ab7b-658ea7a9024b",q.Ww_teachers_gift_october_ww="d7996e56-aa66-48c2-96e6-880bd101c8d3",q.Ww_thumbnail_yt="ad3cbafc-69ca-482a-a59f-6abfb9f548ed",q.Ww_thumnail_lucky_outfit="29f649cd-8f02-46a1-90a6-b1a29f8a9c0e",q.Ww_treasure_track_MoonlightDance_2025="9e1ff95d-fc4d-40fb-ba8f-a0686d801ed9",q.Ww_treasure_track_SunkenSecrets_2025="7d2efa5c-e260-4e56-b1a0-aadeb9a3ebc7",q.Ww_treasure_track_frozenfairytale_2024="6ceaac4d-0074-4936-b42d-8e82051cb414",q.Ww_treasure_track_jurassicbbq_2025="bc7ce956-36dc-45b7-bbbc-fdbc6e5ad5dc",q.Ww_treasure_track_magicoin_ultra_member_oct_2024="41778e01-c761-4051-b3dc-1031becfc7d0",q.Ww_treasure_track_skywatchgarden_2025="67a3c12c-90ac-4c91-bb64-d129df4c2137",q.Ww_treasure_track_starry_2025="da1b7617-0d9e-476a-8dad-6ece6cd845f8",q.Ww_tt_frozenfairytale_launch="36d9dd8c-9f51-4ea7-bf9f-494f5a648ff4",q.Ww_wiztober_2024_launch="20be5f3a-f57f-4304-b9ce-f9e5df1ba235",q.Xp_stardust="30b137dc-a6aa-418f-962e-364e0a9a1e8f",q._2xAeros_CurrencyWeekend="ae0ee6e8-2546-477b-b15b-51a69203320d",q._2xAll_CurrencyWeekend="594c2395-310d-4705-91de-8ba86b8eb11b",q._2xFlorians_CurrencyWeekend="aa591044-2139-4287-aa87-818bc00e1b3b",q._2xHotHots_CurrencyWeekend="414d8714-0f19-450d-b5eb-64e4c203ee54",q._2xShivers_CurrencyWeekend="49aa8220-6446-4933-947a-4d289af0add4",q._2xYars_CurrencyWeekend="8500d1f6-4fff-485e-b81d-ea7f071bf6fd"}(Y||(Y={}))},40671:(q,K,z)=>{"use strict";var Y;z.d(K,{z:()=>Y}),function(q){q.Elemental_boost_fire_spell="5bbcc44c-5720-41e1-ba71-2effa464effa",q.Elemental_boost_ice_spell="da3aaa9a-6dfa-4ae7-8954-6ce61f25f90c",q.Elemental_boost_physical_spell="afa961f8-0910-4203-98b3-3e69de77af8e",q.Elemental_boost_plant_spell="561fefa3-e6f4-47fb-a2a8-8b0c92a5ac6f",q.Elemental_boost_storm_spell="74449f65-2638-4670-9bc4-b6f1c02fa1df",q.Elemental_boost_water_spell="d36ed671-3746-4244-bb83-2a82f36350e8",q.Spell_astral_roar_single_spell="e192dd7b-1ae1-4b91-bc70-43a6f583a9e4",q.Spell_astral_starbeam_aoe_centered_spell="885d144c-b538-4f2f-a585-3d20a385d5d8",q.Spell_astral_starbitblast_aoe_individual_spell="d87c22d9-bf05-4968-aab8-6f99413caffb",q.Spell_astral_starbitblast_giant_spell="f154e6d5-c162-43de-93a9-c2534a092ced",q.Spell_astral_starbitblast_single_spell="1fafdd06-8c59-4283-b94e-910b61c330e5",q.Spell_fire_charclone_aoe_centered_spell="a6a69fa6-9f56-4b51-8fa9-8e3053a4d67b",q.Spell_fire_fireball_aoe_individual_spell="a1909588-fa2e-4699-9a6b-cfcfea077bb1",q.Spell_fire_fireball_giant_spell="3058d0d3-95d2-4563-8a47-915ca83a622b",q.Spell_fire_fireball_single_spell="0d5c7b56-b0e2-410f-ac84-5dd9079046ec",q.Spell_fire_roar_single_spell="450b5ea8-63db-4dde-83ca-b573fb43da5e",q.Spell_fire_slurpysnack_aoe_spell="667bb5d8-48f5-414e-9731-eecdfc22e623",q.Spell_fire_volcannon_aoe_centered_spell="6d460931-7303-4959-9679-8c63619e70ef",q.Spell_fire_volcannon_aoe_individual_spell="976c7414-85b7-48b6-afde-2ccb52bfabda",q.Spell_fire_volcannon_giant_spell="665df55f-0004-4a23-a970-403b81d67f69",q.Spell_fire_volcannon_single_spell="f7b09db8-0430-42de-a944-71ff3a0abce6",q.Spell_fumble_spell="a50a9f99-eb44-4912-b9e8-8a5ef9386b35",q.Spell_ice_bokcrack_aoe_spell="b8a0da8e-85e4-4a45-90b9-601a47d14fad",q.Spell_ice_chillout_aoe_centered_spell="ae3bcdf6-59e2-4495-860f-501c9400432e",q.Spell_ice_chillout_aoe_individual_spell="ba185370-1a63-43bf-af3e-3d256c24c102",q.Spell_ice_chillout_single_spell="b8326cef-6972-43eb-a555-33e18e3a5777",q.Spell_ice_icicleshard_aoe_individual_spell="dc028f7d-75f8-4906-b078-6b5c81add333",q.Spell_ice_icicleshard_giant_spell="6d5c5c54-5d57-42ff-82aa-09447e6745a4",q.Spell_ice_icicleshard_single_spell="9fc69df0-0fad-4f87-9e66-a2dd6ab45dfd",q.Spell_ice_roar_single_spell="8b313158-2a1f-4072-b61d-2ae8f96ff650",q.Spell_neutral_aoa_aoe_spell="c0f8af45-63da-4aba-bb5e-bc405a366090",q.Spell_neutral_heal_aoe_individual_spell="83ea47bf-5033-4f39-8b87-1c717e96585f",q.Spell_neutral_heal_single_spell="b798d1ac-68a8-42e0-ae9b-0b7d6e0779f5",q.Spell_neutral_nootrevive_aoe_spell="501d41e5-2efb-4576-af3f-0a9cdc9c8bd5",q.Spell_neutral_rescue_single_spell="dd50c820-a96b-4725-8e0d-78723d179d1c",q.Spell_physical_blunt_aoe_individual_spell="794416ec-b96c-4528-8078-a5f8d8859526",q.Spell_physical_blunt_giant_spell="9396e920-5ab2-494b-9aa2-7d088b3ae8a3",q.Spell_physical_blunt_single_spell="7d19ab90-8c76-4753-8973-e7dc6570e7d7",q.Spell_physical_pierce_aoe_individual_spell="866f0251-188a-4d98-a12f-59bd09cf18de",q.Spell_physical_pierce_giant_spell="e052dbf0-ff21-4879-8401-b4c7a3801839",q.Spell_physical_pierce_single_spell="4e349303-34c7-467a-91fe-7e2fe9b0d6f1",q.Spell_physical_piercingvolley_aoe_centered_spell="96f0094b-c481-4d93-b41e-7cc5adedb770",q.Spell_physical_roar_single_spell="b99c3b17-7c4b-4acc-b5ad-80f231bedb90",q.Spell_physical_slash_aoe_individual_spell="a41733ba-6531-491b-88bf-15dfcd94e0f9",q.Spell_physical_slash_giant_spell="44dc8d16-17b3-4f25-b0f3-9433e7526275",q.Spell_physical_slash_single_spell="2f81ed22-7176-4393-94a6-5826ebff84bc",q.Spell_plant_florasfury_aoe_spell="0ba749c1-0c1c-4e0f-ae85-94661f0b075a",q.Spell_plant_forestshurricane_aoe_centered_spell="da58c5a2-c69f-4003-8d1b-e4a4f351ab1d",q.Spell_plant_forestshurricane_aoe_individual_spell="946494ca-87bf-4905-9007-9e13f456cf97",q.Spell_plant_forestshurricane_single_spell="15aa963e-6abb-49ad-b9fd-e0bd3a32e032",q.Spell_plant_leafswarm_aoe_individual_spell="d88176c5-816e-429a-8895-4bd488d020b4",q.Spell_plant_leafswarm_giant_spell="1bbadb3b-529f-43ed-bc4e-86b305cfa459",q.Spell_plant_leafswarm_single_spell="fc8b7c65-774b-4038-9a8a-ec75d00f4064",q.Spell_plant_roar_single_spell="08ee90b7-baa1-4d77-a637-36593e9dbfef",q.Spell_shadow_crystalcrash_aoe_spell="19569d20-bfaa-45c3-86fe-e39432153271",q.Spell_shadow_darkpourtal_aoe_centered_spell="093d2ca6-b00a-42d1-aacb-e0cb3c805498",q.Spell_shadow_darkpourtal_aoe_individual_spell="1ef54c51-57e1-44bd-8e03-88157a47cbae",q.Spell_shadow_darkpourtal_single_spell="6bf09377-4569-4c6e-b2af-5fef84fdde13",q.Spell_shadow_darktwister_aoe_individual_spell="30cb3c5e-7141-48a0-b384-75cab3504c25",q.Spell_shadow_darktwister_single_spell="7ae5cfa7-8700-4bf7-b5e5-08a862b3ecfb",q.Spell_shadow_grimburst_aoe_individual_spell="2c29d85f-ca51-42f5-b586-c69b23aa0a10",q.Spell_shadow_grimburst_single_spell="91b9be57-da56-45e4-8115-3ae3ff62432a",q.Spell_shadow_kidnap_single_spell="420e2ffe-9c85-453d-bdf3-c6b27e3483d7",q.Spell_shadow_nova_aoe_spell="4f36fae1-545d-4d31-894b-c91d5c719af9",q.Spell_shadow_phantomscall_single_spell="373f9feb-480b-473d-a04b-3104f5827c3c",q.Spell_shadow_roar_single_spell="bcd82f80-62cd-460d-891b-995b6108f6c2",q.Spell_shadow_shadowdrain_single_spell="d78f44a5-78f9-4a52-a040-83b48cbb7193",q.Spell_shadow_shadowshock_aoe_individual_spell="1ac4463d-0aef-4bc2-820e-723d6b2d9ec2",q.Spell_shadow_shadowshock_giant_spell="c136c280-f165-4942-acb5-e83fb88fe2d5",q.Spell_shadow_shadowshock_single_spell="b497caa5-6b0b-42ba-8cf3-6b5992d7e275",q.Spell_shadow_shadowsurge_aoe_centered_spell="dba024eb-70a2-4468-828d-21daf700731e",q.Spell_shadow_spikestrike_single_spell="bf8025f2-af70-4162-8376-642649aac4e6",q.Spell_shadow_yetismash_aoe_individual_spell="7644193c-9553-465b-a44c-c1a7d15337dc",q.Spell_storm_bennicrack_aoe_spell="6b052295-b165-4dbc-adc1-1b4c7bdecee7",q.Spell_storm_broccocrack_aoe_spell="1f2d228f-d7c4-434b-824c-8b362c98c567",q.Spell_storm_ioncannon_aoe_centered_spell="5b050ee8-65b8-4801-8478-a2cd4c66b6de",q.Spell_storm_ioncannon_aoe_individual_spell="c1236b7a-c630-4586-8ee1-45a6c5cf2b99",q.Spell_storm_ioncannon_single_spell="94ce657f-08af-4844-99f1-63a0b7682a9a",q.Spell_storm_roar_single_spell="9cd9a22b-84a3-4966-9041-899d850ed39a",q.Spell_storm_sparksphere_aoe_individual_spell="da961641-11cb-47f8-b5b4-4963a91a48d8",q.Spell_storm_sparksphere_giant_spell="8553e321-4a07-42d2-888b-d8cbfa7efd0b",q.Spell_storm_sparksphere_single_spell="6174afe9-1236-458a-b5cc-561c062e58b5",q.Spell_water_bubblesmackdown_aoe_individual_spell="58e6955b-d927-4a51-8af7-08cfdaffa839",q.Spell_water_bubblesmackdown_single_spell="8921c962-3415-4a45-8e5b-c2438c8fff1e",q.Spell_water_downpourtal_aoe_centered_spell="15085252-9b5a-4db2-80c5-f68f6d727978",q.Spell_water_downpourtal_aoe_individual_spell="f3a9466e-a8ad-4339-a0cb-11a4b52bef22",q.Spell_water_downpourtal_single_spell="a1d41abc-7e22-4c81-a24b-0ec71e54ead4",q.Spell_water_evereinvigorate_aoe_spell="a4740f29-a5ba-4ab5-a9f5-7399afd53f35",q.Spell_water_roar_single_spell="90b18ab9-e197-4992-8d92-9b84a1afee9a",q.Spell_water_waterburst_aoe_individual_spell="7079bb4d-cf8b-463a-a81a-641cf4562197",q.Spell_water_waterburst_giant_spell="d35b5322-ee84-4db4-ac36-82451d84b486",q.Spell_water_waterburst_single_spell="bb3d88ab-3512-4666-ab09-71a7d9c5c0e2",q.Status_effect_DOT_astral_apply_spell="540bfa68-ec34-486f-9c80-390ae7253445",q.Status_effect_DOT_fire_apply_spell="0128a7c9-5524-4c5c-8758-62e82196f6a7",q.Status_effect_DOT_ice_apply_spell="96234675-d098-4839-a60e-5f5c623c83d1",q.Status_effect_DOT_plant_apply_spell="45e779d0-9d0e-4309-b37f-ed8b1a4cd590",q.Status_effect_DOT_shadow_apply_spell="c3bc95db-5945-4b24-af2f-508817e3d54f",q.Status_effect_DOT_storm_apply_spell="ce99bf0a-41fb-4223-902b-b6c72749c93b",q.Status_effect_DOT_water_apply_spell="cc8d7e93-10db-403f-86d0-1edd088f9f22",q.Status_effect_bomb_astral_apply_spell="0efb1a0c-9662-4bc7-99a9-68b66a2c1ea9",q.Status_effect_bomb_astral_trigger_spell="8128fc7e-a127-4f59-b774-18be39f63ea4",q.Status_effect_bomb_fire_apply_spell="87dc5f6f-f04a-44f2-ba16-bb55ca7399a5",q.Status_effect_bomb_fire_trigger_spell="8408d92f-6aef-4e9e-99c6-4f336ee3904a",q.Status_effect_bomb_ice_apply_spell="a714fd55-c211-48a2-baa2-4f1a1c373d86",q.Status_effect_bomb_ice_trigger_spell="4887dcc2-4fe7-4686-b317-f530c2d3772f",q.Status_effect_bomb_plant_apply_spell="13672321-ceaf-4c38-adfe-b914add31039",q.Status_effect_bomb_plant_trigger_spell="e2e14ff7-f2fd-45f3-a731-f2e4bed2a332",q.Status_effect_bomb_shadow_apply_spell="5a369764-6a13-441d-8822-d5f7185e265d",q.Status_effect_bomb_shadow_trigger_spell="3e5392ad-f878-414c-b72e-b0e72313d23a",q.Status_effect_bomb_storm_apply_spell="91d02d77-d48e-4989-80b4-57ff1975c090",q.Status_effect_bomb_storm_trigger_spell="7bf3ef8f-db0b-4218-b76e-055ef4963c65",q.Status_effect_bomb_water_apply_spell="19016b3b-ad8d-4bf6-aa2c-d418629eb39d",q.Status_effect_bomb_water_trigger_spell="a9f74422-8857-4118-ade5-b48718332004",q.Status_effect_buff_apply_spell="da139c19-1214-4176-b393-f8c889390a9d",q.Status_effect_buff_defense_up_apply_spell="29f02217-46ab-4e0b-b0fd-4a13fcd69913",q.Status_effect_buff_dodge_up_apply_spell="eeaa22c1-8bda-4b9f-8c41-bcdfa562f2b3",q.Status_effect_buff_power_up_apply_spell="cde4f01e-1760-44b4-874c-6a4ad9b6b597",q.Status_effect_buff_regen_apply_spell="ea4493fe-e19e-442c-b9d6-7e078727f2b8",q.Status_effect_buff_sustain_spell="5f052ed7-0516-4f76-bfe0-7721ad2869b8",q.Status_effect_burn_apply_spell="6e958385-90a2-4988-b43d-dfe90229d433",q.Status_effect_burn_sustain_spell="1bcc50f9-922c-4fe8-ab2b-64dcc627c18f",q.Status_effect_cleanse_apply_large_spell="2320ccbe-4abc-471f-8aaf-190a7208699d",q.Status_effect_cleanse_apply_spell="7bfa3569-e780-4e7b-bd1b-1a267263459b",q.Status_effect_confuse_apply_spell="386d7dbb-acfa-4da2-9bb9-c053ed6e5ec0",q.Status_effect_confuse_sustain_spell="2a89835d-109f-45d6-80cb-a6a22ededbab",q.Status_effect_debuff_apply_spell="99796020-0b23-4b15-a0f4-3fa0ce40c112",q.Status_effect_debuff_defense_down_apply_spell="e83c14bf-01ae-4e5f-84ac-83331b07a3cc",q.Status_effect_debuff_dodge_down_apply_spell="8bc75313-e76a-4040-b180-c9b132047c66",q.Status_effect_debuff_power_down_apply_spell="b1ce7a8a-249a-4922-9eae-ccfc033488c7",q.Status_effect_debuff_sustain_spell="04bc4eb4-e53a-417a-921f-fafc7efbc0e8",q.Status_effect_drain_crit_damage_apply_spell="27f0571f-0e01-4766-8213-559b7f7a6cda",q.Status_effect_drain_defence_apply_spell="f0d4841b-4f22-4f71-9593-ae320fb3c204",q.Status_effect_drain_dodge_apply_spell="ba92fa55-bf9c-4837-b885-eeb5ee482e9f",q.Status_effect_drain_luck_apply_spell="88aaccb2-564d-446b-b835-76a9a42a97aa",q.Status_effect_drain_power_apply_spell="d359a6e8-e906-43e9-8476-7a2374209cc5",q.Status_effect_frozen_apply_spell="632a1acc-3df5-4acd-97f0-66d5289c1491",q.Status_effect_frozen_release_spell="c05cc4aa-4dc0-411d-8386-c3e39aaccf59",q.Status_effect_gift_astral_apply_spell="271e3524-d3b4-4377-999f-70e2bfa9138a",q.Status_effect_gift_fire_apply_spell="5747a15b-7a86-4bf8-bd95-7eaedcea34c4",q.Status_effect_gift_ice_apply_spell="236f62c1-cb68-45ce-91d1-a908b2ded738",q.Status_effect_gift_plant_apply_spell="893c52b1-e1ff-4054-948d-5e87c6cfb1be",q.Status_effect_gift_shadow_apply_spell="4db64d03-12b2-42bd-9dcf-67a4dbeaedac",q.Status_effect_gift_storm_apply_spell="d284483c-90cb-491a-954d-9a391757ef66",q.Status_effect_gift_water_apply_spell="a224e219-c81e-484f-9fe5-c138b7535b0e",q.Status_effect_heal_apply_large_spell="e076407f-9a40-4c71-9989-334e249cc285",q.Status_effect_heal_apply_spell="9c810416-2d76-4e26-8eb6-7e07fa84847c",q.Status_effect_heal_sustain_spell="d0dd8443-2fe5-464b-8ef7-7d16ee639a20",q.Status_effect_shock_apply_spell="65c7292e-f03a-46c3-a06d-cfeb2fadd668",q.Status_effect_shock_sustain_spell="080bb8e4-e5c6-44d5-9ae9-dcb7f6862173",q.Status_effect_taunt_apply_spell="485218f6-73c4-4a28-ab99-b3ef0a47c9a9",q.Status_effect_taunt_sustain_spell="dc96dcba-aa6c-451b-bf5d-27ad138590b8"}(Y||(Y={}))},56942:(q,K,z)=>{"use strict";var Y;z.d(K,{Q:()=>Y}),function(q){q.Bomb_effect_astral_json="f79e6354-4a0d-40ac-afc2-1a8509dc275d",q.Bomb_effect_fire_json="83b8c22c-b2f1-4832-9cd8-74872cc894da",q.Bomb_effect_ice_json="a191cb15-90d0-4790-8fe9-d4cb97eda293",q.Bomb_effect_plant_json="ed1c4e0a-7541-487f-92ba-290f39ba2d54",q.Bomb_effect_shadow_json="bcb857b0-6aae-46d7-abc0-3a6f99fd48bd",q.Bomb_effect_storm_json="03e13363-9c6c-475e-91b0-c6b7367b809d",q.Bomb_effect_water_json="c58222ab-9543-4aed-b61a-474f44e71480",q.Complete_badge_bounce_json="9883fa9b-a115-4a44-b51a-8cac39021661",q.Default_boss_01_json="6641bd0d-4885-4e85-9a20-e6cafadd4883",q.Default_boss_02_json="1966e939-2cbd-41eb-abe8-42c4ce4f9cc4",q.Default_boss_12_json="81158eaf-bf57-495d-a0c3-6678804b8a56",q.Default_boss_13_json="d97dc42a-26ff-490f-9b46-7f74a7424db0",q.Default_boss_15_json="c63e5eed-61aa-49a9-9db3-b4aefa07ff9d",q.Default_boss_16_json="ba559492-71ec-487b-b495-0379e36d8d08",q.Default_boss_17_json="8aa6d5d5-e39c-40ae-9c38-dca8d7e955e7",q.Default_boss_18_json="9f0d7322-6d15-41a3-b225-858fa0f8a4bd",q.Default_boss_19_json="e3fc8115-b84f-4181-9eb1-b2270b4c7902",q.Default_boss_20_json="7d5ce573-9c2d-4f0e-aa4b-073769e18fac",q.Default_boss_29_json="10983823-f156-40c9-a4d3-4d2619e2b0c8",q.Default_boss_30_json="444b3bf8-0dc6-47a5-92bc-7bd1daf1b53d",q.Default_follow_10_json="9d6a6657-4aec-4d2d-993f-ddde651fce44",q.Default_follow_11_json="685e27aa-3ef9-4429-afe1-5ab401ab0aae",q.Default_follow_130_json="d77761c5-8c40-47b1-be3a-64d836bcf819",q.Default_follow_131_json="faadfb50-8060-4942-ad8e-a55a2eea9149",q.Default_follow_132_json="ab970d4e-8c8d-4aa8-88bd-1c9ed7ca824f",q.Default_follow_133_json="319921ec-a111-4ff4-92fe-93b3973284df",q.Default_follow_138_json="0f372293-26b7-4ca2-9a92-16d22614542b",q.Default_follow_139_json="fe775569-5be5-4c3b-897e-4713849ac493",q.Default_follow_140_json="6b894787-24da-47b9-b5a9-c4e64e2dd276",q.Default_follow_141_json="a0ca8055-8dae-42a7-b32a-35e73dce0cbf",q.Default_follow_142_json="6ee0e017-8b33-40ff-8b1f-8fd6f4c2b7b4",q.Default_follow_143_json="c715d2c3-553d-467b-8276-88d3a2bbbea8",q.Default_follow_144_json="c5f13da1-4d4c-4ef2-873e-b3aa0d4c3bbe",q.Default_follow_145_json="a88476bb-f551-4d26-ae10-fcf1b21f1547",q.Default_follow_146_json="8013c9f2-fe15-4bb6-bb5a-5e8aa4295117",q.Default_follow_147_json="5def7c69-2437-44fa-b23b-a57e6eb9655b",q.Default_follow_148_json="74d49feb-5622-4a4c-88a2-f75edeaf3976",q.Default_follow_149_json="e2c44f6a-0829-4453-b992-58db361ad4a8",q.Default_follow_150_json="3803d2a3-7eac-4a04-b1bd-a61ee0cf3140",q.Default_follow_151_json="6f416453-ab40-479e-b342-9b33a58ca354",q.Default_follow_152_json="ebe14e48-a974-4374-aa9c-19a07bc069f8",q.Default_follow_153_json="956b991e-a9df-42fa-937a-f08a29cab226",q.Default_follow_154_json="ef3ba4ef-0c18-472b-bc27-0c582f590f2e",q.Default_follow_155_json="3395c09d-6352-46d9-ae1b-43e0cc81f776",q.Default_follow_156_json="bf055f0c-95be-481a-b2cd-59ad54cbb6ac",q.Default_follow_157_json="7fd800f7-765f-4cf8-8ec6-2f6a3062416a",q.Default_follow_158_json="2c74f8b2-9b10-4bdd-bb81-287a0193b086",q.Default_follow_161_json="67dc9c14-e923-49d8-9efc-ccdbd863ed1c",q.Default_follow_162_json="821d412b-bc15-4469-9127-771c7b5eb00b",q.Default_follow_163_json="82e7a172-e029-4092-b56f-06084fb75643",q.Default_follow_164_json="a8911d7d-dc04-47f5-80a6-57f7e2fe9346",q.Default_follow_165_json="5cef885a-b3e9-41cc-92df-fd0ae8033fe8",q.Default_follow_166_json="2264bd98-1d90-4406-9848-7437bba96d96",q.Default_follow_167_json="9c9e2e48-a449-4646-8af1-b20b32d157e5",q.Default_follow_168_json="da0dd9d6-623d-407b-8893-b2bd0817279a",q.Default_follow_169_json="d50fa489-e4ae-4d54-bba7-0420468b8ee2",q.Default_follow_170_json="436e517a-b278-429d-aadc-0919845fcd82",q.Default_follow_171_json="b3316f24-27c4-4619-b7e0-7924a6bc9c74",q.Default_follow_172_json="81c8c12d-7e43-4469-b187-8476140a9010",q.Default_follow_173_json="facb1a11-7204-4899-a020-421f9f993102",q.Default_follow_174_json="6d5f7fac-666e-4b1d-9064-12d8687d3dbe",q.Default_follow_175_json="05d716a4-bfe6-4d86-a03f-49358962fff2",q.Default_follow_179_json="f5a13809-8934-4285-989f-56371fd6b8e9",q.Default_follow_181_json="1a888673-3f09-4493-893f-f9c81fa7ed4c",q.Default_follow_182_json="31516f8b-fd55-4f91-8184-c76f33689723",q.Default_follow_183_json="73d9fce6-26bf-444d-8791-b48c60dd80c5",q.Default_follow_184_json="3986d3c2-288c-414f-bda6-1b0319db6964",q.Default_follow_185_json="2617660a-a46b-4586-961c-354b2219cb36",q.Default_follow_186_json="0b5c3792-f709-4d1e-b118-9747585d15ad",q.Default_follow_187_json="d4f6ec08-e352-4d8d-a07a-8b2c3caaf30e",q.Default_follow_188_json="089993f6-17e0-4b18-a3b7-46c3a6c916c8",q.Default_follow_189_json="e7c7a049-427e-41b8-a2af-89b059494b6f",q.Default_follow_190_json="3f92de11-eebd-4f0d-a85e-2ca259384c2e",q.Default_follow_191_json="c63e0d92-5e24-4465-bd34-a8f539cb2d2d",q.Default_follow_192_json="5b24afc6-d3b3-41c5-aeac-7ffbc4ff0068",q.Default_follow_193_json="21fee41e-1718-4c2f-9e89-e68f38be2671",q.Default_follow_194_json="cf86409c-50ca-46d1-b2af-0f120ad4ccde",q.Default_follow_195_json="7e65c08f-0b67-4c63-a396-3a78d9411268",q.Default_follow_196_json="5a3c9b69-f34c-4225-b5ba-bb3a27f4ceb0",q.Default_follow_197_json="a9e5982c-d0a9-49ed-923d-eb145d994a88",q.Default_follow_198_json="14dd21e6-ff12-46e2-8050-374b2e476d8a",q.Default_follow_199_json="eb867431-4414-4729-9f01-0d731bd8f0c6",q.Default_follow_200_json="2409e805-8189-4323-9612-b602bd7327c5",q.Default_follow_201_json="4375dcfa-5852-4528-b7ce-d9fb129899ef",q.Default_follow_202_json="4ba163f1-16a1-4e26-b467-0cd9b7493c81",q.Default_follow_203_json="ce7eaea6-6275-48e2-a4b3-7563e9acd9fb",q.Default_follow_204_json="1055dbf9-ad80-41f2-abaa-5b24dc442fb6",q.Default_follow_205_json="14b043d1-bd31-414a-897f-f128052b83d5",q.Default_follow_206_json="012acfb8-9d0c-45f8-ab16-6d4d1c595ad6",q.Default_follow_207_json="13cb1dc2-0094-4abe-81dd-30ce177b0885",q.Default_follow_208_json="58f3bae9-d3de-4265-bcdc-7a4ee5053f0e",q.Default_follow_209_json="e9d75a8d-f2c5-4cf2-8017-e867d8d825c4",q.Default_follow_210_json="bf7b2a12-52fc-48dc-897a-58ffad5aae8e",q.Default_follow_212_json="7a710b0a-a905-4e41-a1bc-79b851e57725",q.Default_follow_213_json="dbf6b502-980c-4339-9fd8-a6b55aa8bde4",q.Default_follow_214_json="a931f88d-bd54-4532-bab9-c2f2444ef93c",q.Default_follow_215_json="bb56d5f6-c19b-4613-917f-c73885cca1d5",q.Default_follow_216_json="21c935c4-9233-4187-b83e-c268b9fd1369",q.Default_follow_218_json="d2c1c116-c13a-46f1-b124-bbf1430512f2",q.Default_follow_219_json="16b551d1-36f0-4146-9bb9-3d6730113ab8",q.Default_follow_221_json="505287e3-06b5-4643-b52a-916979ae051c",q.Default_follow_223_json="1da43ad8-ea99-4303-a0e1-1b43bb8ef634",q.Default_follow_224_json="ab7402cc-8307-4cb5-be3f-3eab246b01c5",q.Default_follow_225_json="200daa22-f9fd-4e78-8b1a-5d7cba4bbfe7",q.Default_follow_226_json="c5e2fd13-bea2-4e5b-808a-f94c864d24a9",q.Default_follow_227_json="f11aca4f-e74a-488b-a19e-562e0d84c4cf",q.Default_follow_228_json="a3fa03e0-ee78-46a2-abe0-994aa2d1f623",q.Default_follow_229_json="0a76db91-4e9f-4341-b6c5-20d8f41ebce8",q.Default_follow_231_json="0c4a84e7-4dd0-47db-8848-589a01604aca",q.Default_follow_232_json="ba45ec16-7b46-49ce-84b3-7e562e828cca",q.Default_follow_234_json="17cda462-6245-4f82-91ca-361a62b6466d",q.Default_follow_235_json="314f51de-af45-4902-a0ca-dd8a95ca7bbe",q.Default_follow_236_json="5aa88ad6-3c10-427e-aacb-03816a2b3a37",q.Default_follow_237_json="0d011df6-0779-4a49-b224-62c94b682722",q.Default_follow_238_json="3f64e268-1912-4f74-acc7-d28deca57963",q.Default_follow_239_json="edfe5ed4-2527-4300-ae8e-312ac4275b23",q.Default_follow_23_json="431b6872-b460-490f-9760-c15e5971c9ea",q.Default_follow_240_json="1165bc40-4f57-473b-8a07-707fb1575022",q.Default_follow_243_json="9947a713-76c0-41e2-a13f-a9bb08012d41",q.Default_follow_244_json="f080c9fe-7c93-4db3-b93f-13775f3238f4",q.Default_follow_245_json="04f8fd38-8e5d-44cd-9446-5b9f343ecdab",q.Default_follow_246_json="614a2593-e427-4cb7-b311-e960fd417495",q.Default_follow_248_json="f431cb42-f275-4791-ab44-647f3169cef0",q.Default_follow_249_json="f4f17e9c-3372-4377-bb53-02ee226f7e9c",q.Default_follow_24_json="15ccda48-b8a7-438c-a814-72e98b38133e",q.Default_follow_250_json="14775416-3e8c-4207-a847-adce48793504",q.Default_follow_255_json="2d7202a7-935f-428a-8d6d-4b58113f411b",q.Default_follow_256_json="46831a0f-f62e-41a7-b363-c0c5bc004bb3",q.Default_follow_25_json="6d373933-fc6c-4806-a668-03bdc99f5ba9",q.Default_follow_261_json="37082550-6911-49a4-9486-6d5ae03a72ae",q.Default_follow_267_json="46bc2852-e0af-42fe-9392-ac4464d3ae90",q.Default_follow_268_json="acd9b994-2b73-41e4-bfef-09f8874654fd",q.Default_follow_26_json="8b217448-7a21-4c29-9703-642552108f10",q.Default_follow_272_json="bebdc381-2608-468d-a6fb-07f587b1fc8f",q.Default_follow_273_json="3ebe19ba-923c-485d-99df-384aed74b967",q.Default_follow_274_json="6e67a026-e550-44b4-8f87-341579cd6f2e",q.Default_follow_275_json="df7b8352-b38b-4518-a511-e403b0e96d65",q.Default_follow_280_json="87adb678-8e05-4546-8c61-483c1a035850",q.Default_follow_282_json="28d5d2dc-17c6-4ace-b973-016c90f7dc15",q.Default_follow_283_json="1933923f-3578-486d-880c-91a8e3068357",q.Default_follow_284_json="1d7d2e6d-b4f4-4f6f-8f94-6026494c2d5e",q.Default_follow_285_json="a7c1e7bc-4001-4946-a862-7ebfa5d96c50",q.Default_follow_286_json="1c55e6d2-ced1-4b3e-8f88-f0c3183795ba",q.Default_follow_287_json="4e52f4d2-8620-4293-902b-304a1e387ac2",q.Default_follow_288_json="9bde4d09-c8f8-4d27-acc0-25e4b7ed2c63",q.Default_follow_289_json="7068fcb5-453d-4d6e-961e-ac17c629d3e2",q.Default_follow_28_json="38412256-86af-47e9-83f7-1442c56f9e27",q.Default_follow_290_json="c1e9c559-9138-484a-b736-a0c575835c42",q.Default_follow_292_json="f395611d-7b71-42a2-99ba-576b06127f59",q.Default_follow_293_json="074ec936-d950-4c1f-a2b5-c0ebde422aea",q.Default_follow_294_json="8f0df3d6-e8bb-4ccf-afbe-fec513ca3504",q.Default_follow_295_json="ed3334fd-be0b-450c-936b-a9b6f6540c4e",q.Default_follow_296_json="20f86486-8f52-4adb-a1a4-365e60bff751",q.Default_follow_297_json="4ca6f7db-520e-4e9d-8cbb-6bc5d4997886",q.Default_follow_298_json="73951032-2b84-42f0-991f-541ed1787b3f",q.Default_follow_299_json="807f9a65-4c96-45dc-a9f5-50d04f4efe32",q.Default_follow_29_json="e5cddbca-9b79-4237-a7ec-ec975f9a8000",q.Default_follow_2_json="6ec07a84-5b46-4281-b4b2-155085069b6c",q.Default_follow_300_json="f348efbc-24e3-4695-9dc6-e470cfd31aca",q.Default_follow_301_json="d9a72147-70a1-4d52-835a-e128c400dcb8",q.Default_follow_302_json="989b5d8a-69b1-4c5a-b829-99e1607ce4c6",q.Default_follow_303_json="7d33f083-6426-4dd9-a1f6-ba8e436088d9",q.Default_follow_304_json="bd1cc115-16a1-4198-a44c-486238ea8f2d",q.Default_follow_305_json="a0dcf86c-89d8-4ef7-b98b-55a60430218a",q.Default_follow_306_json="e171eb5f-4a1b-46ec-bb3f-66ae0f782370",q.Default_follow_307_json="832ab3a5-c4a7-4c85-8bcf-9d77791f8b53",q.Default_follow_308_json="7e6e73a5-8562-4c68-a7f2-304c9aae3bdc",q.Default_follow_30_json="89791950-954d-4e88-8150-c17deec21b09",q.Default_follow_310_json="fbb2f47d-1c4a-4c79-9ba5-7ba2e4e7052d",q.Default_follow_311_json="c7d830e2-c253-4d37-bbdb-5959553a8441",q.Default_follow_312_json="210b80b4-6636-47c8-87b6-4771e823cf88",q.Default_follow_313_json="b08d0e7d-fc93-477a-8d71-e218bed5a0d7",q.Default_follow_314_json="183beb26-f44f-4ce7-a570-9b201d7590b0",q.Default_follow_316_json="ad9de204-0da8-48a5-8ac0-1e98951ef2c2",q.Default_follow_317_json="610c138c-2d09-4cd7-b52c-397e73eefd11",q.Default_follow_318_json="910d63f8-70b1-4c77-8957-c4cefaa0e1d4",q.Default_follow_319_json="861d8331-0467-4eef-98f8-f3aa0f2a09ba",q.Default_follow_31_json="b6066e74-f44c-42b3-9478-26c713d6ae32",q.Default_follow_320_json="fc165dc2-13e5-42af-8c7d-7962272f66e3",q.Default_follow_321_json="b212ec78-d66f-46fe-880a-71c3a866f6a7",q.Default_follow_322_json="b8ec147e-0a2c-4126-9389-7d8335adeafd",q.Default_follow_323_json="6aeadad1-6845-411a-b212-20bcbe5415dd",q.Default_follow_324_json="458a95be-ca8e-4c13-a0b8-0b10934e8f72",q.Default_follow_325_json="506353d7-fa18-4dbd-aaf7-5a068ec0886f",q.Default_follow_326_json="9b026670-bba1-4612-b52e-cd7a6ea59e79",q.Default_follow_327_json="dad931e7-d377-4d1d-ba3d-d2282f36622f",q.Default_follow_32_json="c027dd0e-1ab0-461e-b7cd-2e5f14fe0b43",q.Default_follow_336_json="4d5f4828-3fad-4f78-ad67-0f24a57aa0f4",q.Default_follow_337_json="70be8da4-70a6-4b73-84e7-222be432314b",q.Default_follow_338_json="6e186191-6729-4603-ae53-9bec9884c076",q.Default_follow_339_json="cb763b15-fa09-4689-9cd9-7730bc995472",q.Default_follow_33_json="697bd7a2-fe0c-445f-97c9-b52de1934d29",q.Default_follow_340_json="41c958ed-d23f-4be0-b0b2-643a9c28680a",q.Default_follow_341_json="5a574a22-e44a-414d-91f7-d6757b6c6011",q.Default_follow_342_json="a759c57d-b4be-4543-85bf-02768e7d101c",q.Default_follow_34_json="fb106cc6-ab99-4bfe-867c-77c6ce615920",q.Default_follow_36_json="e0490254-4ef2-4bf5-97c7-73ab24943bdc",q.Default_follow_37_json="f67eddf2-2372-45b7-988e-55c6e85b8ef8",q.Default_follow_3_json="742cc114-f459-43ab-8c36-8bdda3b935c0",q.Default_follow_4_json="bd3499c4-24e3-4b79-a23b-2ddca680e41b",q.Default_follow_5_json="7ac79e67-c6d5-48dc-b146-1747da08f306",q.Default_follow_6_json="e2af56e2-4226-40c5-abd5-43bafac28471",q.Default_follow_7_json="4353a799-36b7-454d-9682-f1f85e3fe650",q.Default_follow_8_json="e8ac9e3e-9c60-4fe7-a47c-3dc23681f65f",q.Default_follow_9_json="547ccda6-f17b-419e-8e97-c35dd163e658",q.Default_titan_2_json="470f7170-7cec-4362-9820-c385249f1b79",q.Default_titan_3_json="01e799f0-3426-4e26-ae5d-ac4fc550a298",q.Default_titan_5_json="7a9abdee-235e-4828-9446-62121596a965",q.Default_titan_6_json="f7a51671-f150-4600-a315-c524aaed246a",q.Default_titan_8_json="9dccef03-69f1-4d43-bf59-1ed4c5fe5dcc",q.Defense_down_json="c12e6d1c-c193-445a-a821-0e3fddfa2ee6",q.Defense_up_json="3c7157c2-50a7-4ae6-b0b0-6cafada14417",q.Dodge_down_json="ca8c56c3-480a-4d49-8750-31be7aa73e27",q.Dodge_up_json="fe9e9444-2d4e-4281-8d4d-6a8d1d760a64",q.Fire_boss_18_json="788fbdea-721d-4aac-be6a-d47912e3c9df",q.Horizontal_dorm_151_json="66c741e4-4cfb-4507-af4d-0f393872ae63",q.Horizontal_dorm_164_json="d4a629c7-3fe8-4659-af60-942df2b114e3",q.Horizontal_dorm_202_json="03bcbc59-6c2e-469a-a794-21b28f957289",q.Horizontal_dorm_204_json="ee8efad4-5a1c-4e23-9c1c-773c2be4906c",q.Horizontal_dorm_206_json="6bbf21af-6add-428e-ba23-686abcad4ab7",q.Horizontal_dorm_242_json="c1f8b0ea-6f57-4de2-8250-560d8100f37f",q.Horizontal_dorm_251_json="b9bf90f7-8031-43e0-a0b6-f06ec7eddb1c",q.Horizontal_dorm_254_json="f8153816-dc7e-43b8-a293-b087e6411e68",q.Ice_boss_18_json="06bb221f-7d00-491c-99fc-db5407a5ccb7",q.Lootbag_widget_json="93245de8-14b4-4d6b-9d52-089b46beeb8c",q.Math_streak_widget_json="88fa5114-4166-4103-8554-6f662a502199",q.Merge_01_json="b498bc36-e523-4621-a534-7a3443d6b033",q.Merge_badge_shine_one_json="dbccfac6-8342-41fd-bc24-b846bd124977",q.Merge_fx_json="26b93228-86bc-4931-b4e2-f97e6cb3e77a",q.Merge_green_energy_json="bb1a0a7e-a275-44c4-86da-85c12864bd63",q.Micro_cube_json="97854ff8-5a10-4480-aed2-b94755a45c66",q.Mythics_tab_portrait_bloom_json="eaf3000a-003a-42ab-8552-450f350e8777",q.Npc_harvey_json="00208e38-f979-4e35-83fe-7ca795108a8f",q.Npc_sir_vey_json="b1819a81-3ba2-4adf-a793-59f54a6c0c06",q.Parent_attach_membership_ad_json="b65de452-7367-445b-936f-20f3ac2b5776",q.Parent_attach_ticket_json="b961a979-b87a-4f69-b178-985c6b409122",q.Pet_glow_rescue_json="fb561fa1-93f5-437b-8dd1-4aeccef988ef",q.Plant_boss_18_json="3636c520-643b-404c-84f6-8dd2b48ea0d4",q.Player_raster_json="50aadd37-b1e0-4efc-978f-e57467c9123d",q.Player_raster_upscaled_json="37715ae1-b2eb-45bb-83b7-8df8abee1e79",q.Power_down_json="0a434d30-526a-4e4f-ba33-ca3b41199b8f",q.Power_up_json="c5d053bd-a84e-45c7-8780-6bc749d80e11",q.Rarity_level_fx_json="ecd48633-08bf-49e8-b84f-2b055b7d05c8",q.Read_to_Merge_1="473a0ddc-73b3-44d8-83c5-4a6b85eb9b50",q.Regen_json="ad7f7576-3d6e-447a-ad98-699f37e62598",q.Spine_DOT_burn_json="18a2e9ec-aa7f-49f3-8dd2-900a890542f7",q.Spine_DOT_drench_json="71e02717-99bd-46e4-91db-c0127908cede",q.Spine_DOT_frostbite_json="d334cad5-04a7-481b-b677-d143718186d7",q.Spine_DOT_gloom_json="3e7e4125-8708-4776-8f90-e5694be74227",q.Spine_DOT_shock_json="4601c446-6660-4279-b928-ce19016fb79f",q.Spine_DOT_smite_json="d7fcf746-76bf-48d4-9a03-da592405d34d",q.Spine_DOT_venom_json="691e44c3-9d79-4965-baf1-3550e012ec85",q.Spine_FTUE_bloom_json="bba8c652-581b-45d2-b8f4-279e68f2dd40",q.Spine_HUD_glows_json="e36629a3-dcdd-4cff-b5c9-8ac6415a01be",q.Spine_academy_landingdoors_json="f3c81778-432a-489d-a145-5dc718e503b4",q.Spine_academy_tower_progress_ui_json="2c9eac95-b2df-4867-8ca2-d3b28f4552af",q.Spine_academy_unlock_json="df4dc2af-964d-4e81-a85c-bcdf684a9236",q.Spine_academy_window_glow_horizontal_json="a4666f61-7010-4dd2-b525-9418156a3c13",q.Spine_academy_window_glow_vertical_json="9bda4a88-8211-47e9-8cb2-888154d39739",q.Spine_academy_window_light_horizontal_json="ee247462-91b1-452c-96bf-53c9e8b758dd",q.Spine_academy_window_light_vertical_json="292b4836-8013-4608-b2f1-bdc84b6daefe",q.Spine_academygh_addkeystone_json="1f458501-f219-4bc9-b89a-d132bd1dc94f",q.Spine_academygh_centre_json="d2048b6e-53f8-49c8-ab5d-daf5bd671048",q.Spine_academylanternglow_json="46058c99-e242-462a-8ea1-421601708905",q.Spine_academystairlight_json="32803951-ad63-456b-b23c-3fb3d5f92f62",q.Spine_add_modifier_fx_json="7a2907a2-9728-492c-bccf-4f7eb21ed25d",q.Spine_adventure_boss_chest_json="c6cfb1be-76fc-42df-976f-1a046c132123",q.Spine_after_school_widget_sparkles_json="9981495d-ab66-4402-8a9e-1c9852aeb04f",q.Spine_after_school_widget_stamp_json="f03fa9f3-7416-46c3-af03-27a43ee64822",q.Spine_aoa_multi1_json="d8535e44-8377-42bf-908e-a40aa68061fa",q.Spine_aoa_multi1_teal_json="5b646e33-356f-49b3-b225-9c53244da7f4",q.Spine_archive_door_glow_json="eb9d33b0-e2d7-4e0d-a517-755b891a109f",q.Spine_archive_lantern_glow_json="f7015f7d-e28d-4b43-a2b7-96b979bad64a",q.Spine_arena_centrepiece_json="15e52cad-58d0-4aab-9aee-20e3fa1621e5",q.Spine_arena_emerald_button_fx_json="2068abad-0deb-4256-bbd6-6dcc2b10110f",q.Spine_arena_fountain_parallax_json="c65de5c2-712b-4c4a-9db7-1fe07bf340e2",q.Spine_arena_gate_json="1baf2106-968a-4525-92da-63867a64ed36",q.Spine_arena_icon_chest_fx_json="ce1f289c-8680-4f35-b327-bad23b7ad263",q.Spine_arena_marble_button_fx_json="078b2fb8-7f93-422a-b434-9ef8bb87c8a4",q.Spine_arena_progressbar_json="bf096a86-a0de-4b7b-9426-b3a67fae01c3",q.Spine_arena_shield_bronze1_json="29145c85-e5f3-434d-8263-9d44adc2f429",q.Spine_arena_shield_bronze1_small_json="35cd4743-91a5-4a09-bcef-2bff5f1ea241",q.Spine_arena_shield_bronze2_json="b4364cab-e9c4-4597-88f6-02ce3d2ef423",q.Spine_arena_shield_bronze2_small_json="f944d568-2f18-4fea-bf15-2ffbb87c7186",q.Spine_arena_shield_bronze3_json="cd48c308-f566-4052-835c-86d269d10b48",q.Spine_arena_shield_bronze3_small_json="bdada53c-6d5a-4f85-94ef-9406e2e57af9",q.Spine_arena_shield_gold1_json="f8344c71-53f7-4a2c-9549-85d18f8e66df",q.Spine_arena_shield_gold1_small_json="7a5c7388-9e5e-49ef-99cd-d4c30e3c53e6",q.Spine_arena_shield_gold2_json="8133b67b-8d57-4b3a-ac84-d90d2cffc012",q.Spine_arena_shield_gold2_small_json="6e8fe35f-892f-498e-b124-726d1b3a05cf",q.Spine_arena_shield_gold3_json="02e5cbf8-a25d-4657-afdc-00ebab9aa2b7",q.Spine_arena_shield_gold3_small_json="6a8dac74-fd32-4db6-9d9e-596296e74f76",q.Spine_arena_shield_silver1_json="21a7fbd0-230a-4849-940c-8b38fbb8376c",q.Spine_arena_shield_silver1_small_json="db481e15-e638-4b6b-b5ca-5ca54a48bfed",q.Spine_arena_shield_silver2_json="6aec1caf-fad7-49f0-90a6-b77fc6ad953b",q.Spine_arena_shield_silver2_small_json="d7f268b4-d914-4a75-8231-cf45b47a7d16",q.Spine_arena_shield_silver3_json="9558908c-e73f-4e91-875c-55b571cf3696",q.Spine_arena_shield_silver3_small_json="7ab4a118-2ee7-462e-90ed-b190fd92761d",q.Spine_arena_sign_json="37c6a5ae-040f-493f-b4c8-7d2cf092dee9",q.Spine_arena_torch_bronze_json="a6db17be-465d-4f90-842a-499c1b5f540c",q.Spine_arena_torch_brown_json="d3f0cb3c-cc33-482b-9b49-77f804565469",q.Spine_arena_torch_gold_json="eca7da27-8afa-477a-b08c-8b3fa58504d3",q.Spine_arena_torch_red_json="5008ac6e-3433-4b88-ba21-0692f0faa4dc",q.Spine_arena_torch_silver_json="8827f855-a3b7-4908-95b9-06ddd283ae4e",q.Spine_arena_torch_t3_json="80541a50-f2a0-4659-924e-272258d25f03",q.Spine_arena_trophy_case_json="a63b6b98-fcfc-410c-bdfa-d21a07499ac1",q.Spine_arena_vs_json="19e6ca2c-88db-4426-94d9-545bc8e6fd0c",q.Spine_arena_vs_small_json="a46bc7bf-6e7f-40cd-a682-75f183e5a253",q.Spine_arena_waterfall_json="e2a152ce-25fa-43a3-bfc2-38312a4b1404",q.Spine_arena_waterfeature_json="657a2ab2-3b07-4798-8972-70ce3ffbdce0",q.Spine_astral_eg_single_json="aeabcc46-5b7b-4d2e-818d-d964b5e144f2",q.Spine_astral_multi1_json="a700963c-1877-4710-a6ba-fa604a2ddafa",q.Spine_astral_multi2_json="c664d4bc-5c15-49aa-a0b8-e598e68d91a7",q.Spine_astral_multi3_json="9c3c31a0-0fc0-44b5-aca8-dbf05a636d1c",q.Spine_astral_multi_create_01_json="d24cf569-5fa7-48fa-9931-5e39432984db",q.Spine_astral_multi_impact_01_json="d5518ce5-c0ca-4f67-a9f3-30444433925c",q.Spine_astral_multi_travel_01_json="defa73d2-d0e5-4b8b-a9c3-670af1750ab4",q.Spine_astral_single1_json="eb371c42-131e-4938-b335-2de7e762ccc1",q.Spine_astral_single2_json="3c5cc7f7-2696-4b0c-b977-b7d374f228aa",q.Spine_astral_single3_json="da7e8a6f-7a9e-44c4-88f9-f87476c22685",q.Spine_astral_single_create_01_json="29b14c1c-aca4-492e-9f9d-e1e98fc63056",q.Spine_astral_single_impact_01_json="15e96d72-1133-4711-8bbf-b39de128a6fc",q.Spine_astral_single_trail_01_json="6362f973-c62b-46a7-88b6-b1cc51b0845f",q.Spine_astral_single_travel_01_json="15631df4-9dd3-4f1b-9d3e-c31a2c8cb05d",q.Spine_balloon_skywatch_json="d7a047ef-fb83-49f3-8bdc-c4abcefaf87a",q.Spine_bam_aoa_button_json="ec9679ec-949f-45dc-8709-2725455473de",q.Spine_battle_academygh_keystone_json="d2607e94-ddfc-4856-a185-d9201f48565d",q.Spine_battle_fire_boost_json="a53da5bb-8128-472c-90fb-d992038795ef",q.Spine_battle_ftue_pointer_json="faa1ab60-74ea-4e2c-912e-369050ac7570",q.Spine_battle_ice_boost_json="032866b7-fe80-455b-a7ca-c20b1625b8f1",q.Spine_battle_map_smoke_json="653e1193-56ef-4740-a1d5-318ae2751f9a",q.Spine_battle_mini_magic_pip_json="a4ab289d-6736-45ab-8839-e52cbf4a8347",q.Spine_battle_mp_drain_json="e06d2a18-8c01-42b0-aa17-b9cd08fb9be4",q.Spine_battle_mp_refill_json="1d09dd2e-d6db-439d-98c1-b1a75b244fe8",q.Spine_battle_physical_boost_json="f1dd085f-cfb0-4d60-9189-5b6aabeaa813",q.Spine_battle_plant_boost_json="f999143d-e03b-4688-ad0d-1826d8a754e0",q.Spine_battle_storm_boost_json="a3890edc-f6de-44a9-a0e5-7e4b9d990d1e",q.Spine_battle_targeting_arrow_json="525d0de7-2eed-43c2-a38d-35418c21e4d4",q.Spine_battle_tint_fx_json="c4ed4156-fa5f-400e-8e83-b22f0ed28809",q.Spine_battle_transport_boss_purple_json="643b3999-96dd-4c55-a1cf-f494dac832b0",q.Spine_battle_transport_json="db957a7a-c2b0-4b41-9cc0-1a83a23da13c",q.Spine_battle_transport_purple_json="5eea6f2e-cca7-4c00-a6ba-7ae1f0513418",q.Spine_battle_water_boost_json="a4dd6b84-cffc-43b7-8d13-5f200873a06c",q.Spine_battyworks_json="4855051d-3fef-44e6-a4e2-3e83f6244049",q.Spine_best_streak_fx_json="c158061e-497d-4afd-a18c-6e690d1b9eca",q.Spine_bloom_rescuebtn_json="157feffe-9d49-4646-905c-c8816b81a76b",q.Spine_bonfire_unlock_json="55c08ab4-5c23-4b5a-ac6a-6d83998db983",q.Spine_boss_cebollini_shadow_json="e7b7fd9a-7619-4e5c-b77a-a61d01cd7b74",q.Spine_boss_gerald_json="d6d19e0f-bbb8-4044-bda9-bfaad9f616bd",q.Spine_boss_gerald_shadow_json="8c8384c2-8a31-4d8e-9308-570cfdb43d8f",q.Spine_boss_marionette_json="0baf166f-a8d6-455a-9233-15ce0259a566",q.Spine_boss_oldone_shadow_json="d48c87b6-26b3-4fba-9b5d-f8d72399328f",q.Spine_boss_poppet_json="f5f1a17c-04cc-4db8-a8e2-9402d1bae77e",q.Spine_boss_shadow_effect_back_json="e1d07d66-c314-4bc3-8e83-103adcd2f621",q.Spine_boss_shadow_effect_front_json="37ebd369-13db-42d0-bdfa-ebb0bacda46f",q.Spine_boss_shadow_effect_json="b0f341b8-549a-462b-b2e0-0dc14f25a0df",q.Spine_boss_starlight_json="1ad0e0fa-9684-447a-9aa5-de6ecb01f566",q.Spine_boss_stormystorm_shadow_json="b97554a3-6348-46e1-a4e2-b564a13d5674",q.Spine_box_skywatch_json="802f3edd-dfeb-4d52-ae9d-2b16563a93d9",q.Spine_casteffect_json="a0f5e0f4-1552-402d-8e53-a14f086d0e96",q.Spine_casteffect_teal_json="4f18ae8f-a3c2-468d-9975-7d8923b544ad",q.Spine_catapult_impact_json="db9ae837-8164-4132-a2d9-d45e47662d89",q.Spine_catapult_json="dad8c8f0-06df-46a8-9670-b025d8d540f8",q.Spine_character_shine_json="7ed698dd-5282-4025-a0c0-cf6f49fb32e9",q.Spine_charged_inbattle_visual_json="883aa852-f5d9-4202-ac1e-1762be5b8525",q.Spine_charged_level_bar_json="1241b3ca-0e36-4dd1-abeb-459de56d4803",q.Spine_charged_level_petbook_json="288bf660-d6cc-457a-a969-76c8b2080190",q.Spine_charged_visual_json="2ffa56ce-b58d-46a9-bd5a-a6531ce817d1",q.Spine_chest_bunny_json="fce7c866-75ae-4121-93fb-97ee5e69571e",q.Spine_chest_fox_json="919ea28d-f3d1-47c0-b09c-6cd76d7d6d2c",q.Spine_chest_mcoins_sparkles_json="8d0be954-a1ea-4bf9-a10d-ea5278bc010a",q.Spine_chest_member_json="9b579137-3dfc-4552-80b5-359cae5e3a32",q.Spine_chest_moon_json="bce82458-c803-4722-84d2-b70c2ce5283a",q.Spine_chest_nonmember_json="14ddc430-c87c-48de-9080-db40a85f24f2",q.Spine_chest_shipwreck_json="a6b92dd4-fbf1-4298-8eea-335e641982ee",q.Spine_circle_bloom_1_json="2f964bc8-ff47-4b08-9395-6f2398254222",q.Spine_claim_TT_json="8d600dae-bf52-459c-bb0c-cdac5fb7ecef",q.Spine_claim_currency_json="b94f8151-0014-4980-aa3c-6ba242c3b91b",q.Spine_claim_rarity_json="5b92e8ff-2f71-45a9-98e1-97a0a8dcdfd6",q.Spine_coins_trail_json="4fa76c24-8f49-475a-94f7-6de47d89996c",q.Spine_coop_crystal_json="ebebb548-49f8-494e-b9f0-422a829bad65",q.Spine_coop_multi1_json="971bba7b-ae0b-4776-96ce-4a94bf70a282",q.Spine_coop_single1_json="77f91e9f-e2ea-4f5f-ac67-f05b04be1740",q.Spine_crate_bonfire_json="fedc0f75-1e86-4f19-9a1e-9073d15c70cf",q.Spine_crate_firefly_json="ca0e226b-9979-4e54-ba27-4441b429539e",q.Spine_crate_json="8095e819-5bbe-4ee1-bcbc-47536422c051",q.Spine_crate_shiverchill_json="7fa1ff40-1ed0-4a67-90e1-4d0bf74fed3a",q.Spine_crystal_clumps_json="5643d965-7eca-4818-a693-cf580d19bf4a",q.Spine_crystal_multi1_json="7a04c78e-5d27-4162-8257-ef4e3e3122f5",q.Spine_crystal_multi2_json="fccc291c-15d8-400e-878c-fe44e503925a",q.Spine_crystal_multi_aoa_json="dd49e8c6-6c14-49ed-9275-eba7f9d233f1",q.Spine_crystal_multi_travel_01_json="40cc5c90-b72e-42c5-97ab-91412ca4d193",q.Spine_crystal_single1_json="34c44ff2-93ee-42be-9b3e-04de56b69d63",q.Spine_crystal_single_create_01_json="77ba1c7a-cf35-43b2-ba9b-56f15dd4bfda",q.Spine_crystal_single_impact_01_json="f827f9ae-7613-496b-90e4-7c07cd2499ee",q.Spine_crystal_single_travel_01_json="1e4491db-6bff-49f8-af1a-2b94dcbc9e2e",q.Spine_dailylogin_notification_json="4bb3d541-b80c-4db6-b12d-9eafecf0fd52",q.Spine_damageindicator_json="12778d46-418a-4503-be81-dc8a94fabc04",q.Spine_difficulty_indicator_json="adf97fec-2865-449d-b258-27df258199d7",q.Spine_dragon_astral_json="d87e8e31-351b-44bd-8f01-5f535d986817",q.Spine_dragon_fire_json="c678da05-c3a8-4f96-9c02-54eedfb190bb",q.Spine_dragon_ice_json="926845eb-544d-426e-8bd9-a8f96fad5661",q.Spine_dragon_isle_unlock_json="d7d5bbe6-91ec-4a09-ab7c-eea3278ab298",q.Spine_dragon_isle_whirlpool_json="a613c676-b272-4ad9-9974-f649a7dcdb3c",q.Spine_dragon_physical_json="87f757ca-7b88-4d01-b7df-368c3f26ad4b",q.Spine_dragon_shadow_json="46f7e2fb-c6e0-40d2-abbf-45c499753873",q.Spine_duels_matchmaking_fire_boost_json="0d4646d0-ae39-436f-949f-1382eee518f9",q.Spine_duels_matchmaking_ice_boost_json="79cfd236-5261-459d-b260-25f1acd4e259",q.Spine_duels_matchmaking_physical_boost_json="617adb0b-848c-45b5-ab04-9a11ce98fdc9",q.Spine_duels_matchmaking_plant_boost_json="c876aeea-1864-4d9a-a5b9-6be4e06c2e13",q.Spine_duels_matchmaking_storm_boost_json="a9390d7b-bbe3-4c74-97f5-2b2d3b89ad21",q.Spine_duels_matchmaking_unlock_json="4141c7b3-b11f-4032-9b54-fb38ac7ca5f0",q.Spine_duels_matchmaking_water_boost_json="028aa30a-edc5-44cf-b3ff-db39034cd9f1",q.Spine_dungeon_board_json="327e691b-fa54-4e73-9ae7-7920fd36bc12",q.Spine_dungeon_rail_json="adb29b58-3f8b-47de-b390-42a10a5ae547",q.Spine_dyno_unlock_json="847ca164-dd6b-4d8c-b8e1-7f8a0c903c99",q.Spine_elemental_boost_buff_json="38d8ea2d-dbb9-4895-b674-5627eef2aa00",q.Spine_elemental_boost_icon_fx_json="965dfcf8-8cc9-447f-9b0f-11d8f3c9d9ef",q.Spine_elemental_boost_spellcard_fx_json="7e8a3e98-066d-4400-8edb-3528b552ae5d",q.Spine_epic_egg_json="59f78c92-f9a6-4bd9-8d21-b2ade1af6d3d",q.Spine_epictamed_json="3f18090d-3a31-4e89-8252-a15385cbc884",q.Spine_event_celebrate_json="d4fb2e0a-7a40-4e57-8a73-198039d59739",q.Spine_event_celebrate_titan_json="da7946e8-7ca7-4b27-b415-1c10b0dfe3ce",q.Spine_event_sign_summerfest_json="13e1f775-42c9-4adf-a695-636d2dd0ce66",q.Spine_event_zone_celebrate_json="0ac41cc4-a820-49a3-bfd1-8fe75d0218f9",q.Spine_evo_fullscreen_json="e6b647ae-64cc-48e2-9443-39d3bace38f4",q.Spine_evo_gift_arrow_json="54eba1cd-b22e-4c3c-95ac-41768fae87ad",q.Spine_evo_gift_button_glow_above_json="81803b57-6814-4dbf-9115-8a5fde3e0b40",q.Spine_evo_gift_button_glow_below_json="6bcbb167-b4aa-4f41-98d6-645be0f5fec8",q.Spine_evo_gift_ui_circle_json="e08e8607-6efe-420f-9b40-0c7d9da351e3",q.Spine_evolution_indicator_json="7b86517d-c05d-4568-808c-727c848d25f6",q.Spine_evolve_mask_json="d1430358-23dd-4bbd-bc8f-7e8373304dcd",q.Spine_final_battle_environment_damage_json="c10b430a-2f9d-40d8-8b69-f67968b9f9cc",q.Spine_fire_aoe_center_impact_01_json="f30e99b4-59fc-48af-91e8-6a876b09be8c",q.Spine_fire_eg_single_json="be16dcaf-3d2e-4678-99d0-efad50e33f0d",q.Spine_fire_multi1_json="bd16e66b-1cc4-4bea-95d3-f4a9bfe6e461",q.Spine_fire_multi2_json="bdcf9859-a34d-49d0-9021-1295c42644ec",q.Spine_fire_multi3_json="8b61d47b-5aa1-450b-a885-1a787949288f",q.Spine_fire_single1_json="72e80f7b-7ab6-4a3b-9824-0a5d024afe9c",q.Spine_fire_single2_json="c4fdf118-f9d3-4a61-b1c7-c34955d79060",q.Spine_fire_single3_json="e8d1c156-5b4d-4aab-b20e-312247f6e05c",q.Spine_fire_single_create_01_json="053db46c-4a45-4c3d-ba09-82e6c53e0be7",q.Spine_fire_single_create_02_json="d7076169-a0f9-4f9f-98f0-942a90b980ef",q.Spine_fire_single_create_03_json="da097c25-22d2-45b9-9974-837523163d26",q.Spine_fire_single_impact_01_json="7f92cbaa-418a-40f9-a7dc-0656f092c07b",q.Spine_fire_single_impact_02_json="129226d2-40b1-4bbd-8890-4c9618002585",q.Spine_fire_single_impact_03_json="60e601a3-9501-43a7-83d6-117901794dd8",q.Spine_fire_single_impact_04_json="b33c30da-6d51-4172-97ad-ead89fc47a89",q.Spine_fire_single_trail_01_json="677a3bb2-d44a-478f-aa8a-b0242317d2c5",q.Spine_fire_single_travel_01_json="b3ee47f6-f482-4e5c-9221-7dd24e81f08c",q.Spine_firework_burgerworks_json="5c0b3b51-805d-4310-8932-1085ddd14b25",q.Spine_firework_cloverworks_json="513c2eae-490e-48a7-b836-aecb63726ca8",q.Spine_firework_cosmicworks_json="8f1ef3bb-9f19-4bdf-9572-40475bc58885",q.Spine_firework_dragonworks_json="88fdad23-7321-4b02-98d8-791c7760ccb5",q.Spine_firework_flutterworks_json="c4488e8a-2bcf-4284-932c-7065f6afb16a",q.Spine_firework_lagoonworks_json="0c0d2016-b2a9-4fc2-8d0d-4e719f6eaa49",q.Spine_firework_memberworks_json="d376e8ce-fcc1-4c13-9f2c-d76e88105ce4",q.Spine_firework_shadowworks_json="1828228e-073d-47bb-9e72-b97c684f4fbf",q.Spine_firework_springworks_json="a56d7d8d-ef44-458b-b052-5e52af450dc7",q.Spine_firework_sunworks_json="5c79a518-5b43-460a-b4a9-bbb3a68dfa80",q.Spine_flash_json="4f5414fd-f0f1-41b2-ae13-6a038a273c51",q.Spine_floatlingfling_zoneshimmer_json="a5c84582-fc49-462a-bcc8-a932d90091db",q.Spine_flower_bonfire_json="8efa0493-95ba-43fa-bd8b-ec2ef031b59f",q.Spine_flower_firefly_json="029a9af9-2e04-484d-b84e-5a197ce2eb66",q.Spine_focus_multi1_json="3aab50e2-40b1-442a-b338-dc034cd24cfa",q.Spine_follow_176_json="4cef956b-7390-466e-8fb9-1a8f828c3032",q.Spine_follow_177_json="c2bd3677-b7b0-4de5-ab25-355d1d66c654",q.Spine_follow_178_json="18e4a8f3-3c42-416e-9eba-3e2e1ad4a954",q.Spine_follow_269_json="3f013291-d36f-4acd-b2cf-fc662c32ed98",q.Spine_follow_277_json="65a354a1-37a2-4620-aa75-1d2c54582ee4",q.Spine_follow_278_json="1c40c2da-121e-4831-8ea9-8cb57a6cfb85",q.Spine_friendshipmeter_json="766ea634-4745-44dc-bacb-6e893c222eda",q.Spine_friendshipmeter_update_json="b0e0b28e-0b49-4c1e-8441-4d2f3b279031",q.Spine_fx_moonlight_starburst_json="444edfc0-5ec3-4dfa-a5b8-4dd203588a60",q.Spine_game_island_json="e9dacc45-9f44-4dbc-8ce3-da5167f17169",q.Spine_gift_astral_json="7e805287-a791-4022-aaff-28d7f57d902a",q.Spine_gift_fire_json="2454efbf-741a-47b3-a109-276bdcffb350",q.Spine_gift_ice_json="abd75b0d-f93b-440f-94ca-278b0a23e7bd",q.Spine_gift_plant_json="c2f17f87-7331-49ee-9cb6-27a836b0f734",q.Spine_gift_shadow_json="10543ab8-3145-4cff-97e9-bb8fb607b87c",q.Spine_gift_storm_json="b3855dae-7fcf-40a7-97b2-fa3435f505b8",q.Spine_gift_water_json="0e6429b9-6f5d-4f6d-99cc-00c0d0c416e4",q.Spine_hardmode_mapsmoke_json="8788c811-7909-497e-b859-d3d5136bdfd5",q.Spine_hardmode_portal_json="87a6c1d2-8fdb-4744-8f09-a69b080fa794",q.Spine_healstone_json="96b0612f-7e50-4d72-b1d9-f7cb78b79b83",q.Spine_heart_fx_json="523d30d7-e929-4e60-8e55-400b2d23b9a4",q.Spine_house_unlock_json="bad7baae-0533-4c9e-8d2f-06e039eaa9ea",q.Spine_huduiglow_json="96e14408-621c-49d6-87ce-25121b62d5bd",q.Spine_ice_eg_single_json="3d82eff6-9b52-4cfd-aa8b-09349761d0a2",q.Spine_ice_multi1_json="a0172658-cd5d-4195-a9f4-f3200b47b979",q.Spine_ice_multi2_json="cb5c6315-7b4c-4c8d-a864-428cb5e96d2e",q.Spine_ice_multi3_json="27e33f7a-e01e-4741-8034-debbb215b762",q.Spine_ice_single1_json="60870b48-1575-4f30-a30f-2ce3c75e0ae0",q.Spine_ice_single2_json="db1db805-47f4-400a-a9a9-0a4821869c25",q.Spine_ice_single3_json="920978fe-4b61-4033-b085-7ef1e3777eb7",q.Spine_ice_single_create_01_json="abba864b-9f11-4b2c-8d54-532833239571",q.Spine_ice_single_impact_01_json="7984be9d-ae87-429b-8ca1-a8af4867d550",q.Spine_ice_single_impact_02_json="a7ffc1bb-c323-442f-9007-9ef1ced87f17",q.Spine_ice_single_trail_01_json="0171b64e-1623-462b-a51e-ad6f0bfaca31",q.Spine_ice_single_travel_01_json="0f72178f-7962-4d3e-af04-f110649f2e6b",q.Spine_indicator_playerandtarget_json="6f08ef56-d99f-4b5e-af03-13ce3c112b2d",q.Spine_infinitytower_floorbarricade_json="4c8ed577-a603-4337-891e-8854cd493228",q.Spine_ink_single1_json="9207827c-3123-4587-bf4e-370bd01c3914",q.Spine_interact_moondoor_json="621f24b6-68a7-43b5-8348-bb24f0841b66",q.Spine_interact_sparkles_json="14f3d293-e2a5-4f21-bbe1-0329ce2fa275",q.Spine_itemcard_vfx_json="6eced39c-be90-42fd-bcd3-841362ec4c03",q.Spine_levelbar_glow_json="0254d9d6-44f3-46f5-b4ff-d0a18148f883",q.Spine_levelbar_json="f6523fa5-4145-4b7d-819b-76630e701574",q.Spine_levelstar_json="80671da1-95dc-4686-b2b0-f5cbdbb917a8",q.Spine_levelup_json="c3bb2352-226a-4897-8393-143ce872d3c9",q.Spine_lucky_loot_glow_json="c3f323d5-0822-4fc4-a4db-032a57543c40",q.Spine_lumintree_json="98e1a47c-1557-4a2a-8110-49e5d821f472",q.Spine_match_finish_json="40e67911-0601-46b0-9f92-72e303d9c555",q.Spine_mcoin_postbattle_json="bae41625-2bfb-4a7b-b19d-ffa22874bc98",q.Spine_mcoin_trails_json="04c0d21a-85c8-468c-aa0b-0f6188d5bcd6",q.Spine_mcoin_wallet_json="5fd65d1f-c664-459c-b8ad-b3befe010d57",q.Spine_member_reward_json="43df00b2-1c56-4bd6-aa35-2ae721b472c0",q.Spine_member_star_explode_json="780b41d4-d0c7-479e-b0ec-d60831421916",q.Spine_memberjar_json="1d6c72b2-7a07-4d20-8084-9add04f63cb0",q.Spine_memberpet_icon_json="2cea2b7f-1176-4d9d-9584-7bd4fffb0ee7",q.Spine_minecart_json="85271fa9-55bd-496c-b473-d1c2861b2b7f",q.Spine_miniboss_reward_json="73c901bb-ee3f-44e7-a6bd-3182afc004f8",q.Spine_mlp_chest_json="86a8d6db-9a5b-42d8-95bc-48f5b8e0a5ad",q.Spine_mlp_epic_pets_json="f518e0ce-48e1-40e4-9d1a-8c6cdde3c8ce",q.Spine_mlp_hero_pose_json="3e963b2d-c06b-48e9-9cdd-16d5706815f8",q.Spine_mlp_memberstar_json="0af66670-9c84-4ab0-b894-b72e23824aea",q.Spine_mlp_more_pets_json="f8d4822d-30fc-4223-bf1b-d1dabbf0c48c",q.Spine_mlp_pet_upgrades_json="26e45485-062b-40b8-9418-f727697b5b0d",q.Spine_mlp_sheen_json="ef3d77b3-f5df-4ed0-b320-a2122012cdcc",q.Spine_mlp_sparkles_json="3dd61cbe-f63f-4376-9684-0a09755ef950",q.Spine_mlp_stamp_25off_json="c86bb500-bc3d-4442-9a29-549f4f033a5c",q.Spine_mlp_stamp_json="dfee40c8-dac3-4632-9d87-5b117243e42a",q.Spine_modal_sparkle_json="3ae9a86f-2eab-415d-a333-934e023eb75b",q.Spine_morph_marble_icon_json="83b903ed-b3bf-4bd3-b5fe-e4e4f271bae4",q.Spine_morph_marble_timer_json="498aaaab-477b-4f05-bb30-e1facc73e3c7",q.Spine_mount_10_json="3c721d45-1431-487c-b9ff-0bc8b6ceacb4",q.Spine_mount_11_json="10859370-4929-4095-b06d-678c98fc6831",q.Spine_mount_12_json="2f5619ba-6453-4fea-bde3-92a2bef77731",q.Spine_mount_13_json="fad46bff-e617-406f-be02-5dc0f6d43472",q.Spine_mount_14_json="04912ee8-93c5-49cf-b83c-3c3561be286f",q.Spine_mount_15_json="a5028399-a693-4e34-9809-553dfc1de01a",q.Spine_mount_16_json="e2bc4806-0002-43ac-820e-fcc8eeb93417",q.Spine_mount_17_json="b20d8a27-702b-47d4-ae70-a06c0d99eb02",q.Spine_mount_18_json="65def7ac-1a0d-4955-b8f2-f64f4c2c5684",q.Spine_mount_19_json="4ff4f670-6dff-4be8-b2e4-3b1a85283f92",q.Spine_mount_1_json="b833f467-83d9-4168-b5c8-497dee6fd06a",q.Spine_mount_20_json="87410876-d340-4819-82a4-d8d8ac795dcb",q.Spine_mount_21_json="524dfce9-2af7-4463-a76c-27269be139ce",q.Spine_mount_22_json="74f71202-5891-4112-b4b3-9bd5ce1f7788",q.Spine_mount_23_json="bd051b5b-ba80-49f5-b5a6-1e8d56ee352f",q.Spine_mount_24_json="95417d2c-d040-41c6-822a-49cef14d6919",q.Spine_mount_25_json="d5ea96ac-c2dc-46af-8684-9205551ccfb7",q.Spine_mount_26_json="3210e698-c4cf-4f07-a989-ad34da581e40",q.Spine_mount_27_json="cf3adb9b-838b-4827-8d1d-277629239311",q.Spine_mount_28_json="54ce0afc-0f7d-497f-af13-961447c16f7e",q.Spine_mount_29_json="f8a12670-a54f-43b8-9f86-1f3e3464c7ea",q.Spine_mount_30_json="a6918307-90d3-4f58-b046-e7a9c031ddff",q.Spine_mount_31_json="c70d7356-02e5-43e3-a343-cfa667a6f652",q.Spine_mount_32_json="44adfbbb-d834-45ec-a7dd-8aca03147879",q.Spine_mount_33_json="41c7fdd6-2423-45b0-9fd5-b9824abe3163",q.Spine_mount_34_json="b17c3e08-e787-4e70-be98-97682fa1810e",q.Spine_mount_35_json="21d07917-c028-480c-994a-23122c2064c6",q.Spine_mount_36_json="5612a560-6bbc-4fc0-8f56-01295b535b05",q.Spine_mount_37_json="de45e292-6014-4b88-9e9b-37fbb5cad480",q.Spine_mount_38_json="ea86bef6-63ba-4e6e-b98b-3ffe3360a2c5",q.Spine_mount_39_json="7d493d78-431b-4cf9-9c58-9c4133de40c3",q.Spine_mount_3_json="82bcfa9e-da02-4efd-90cf-d58461e9e9fe",q.Spine_mount_40_json="20c4c318-6fb8-437c-816b-75b502d131c2",q.Spine_mount_41_json="b48bf963-0dc3-4020-8743-bd23ff74f13d",q.Spine_mount_42_json="711c3479-2b70-4737-9a39-48a843c7c89f",q.Spine_mount_43_json="1a428665-e2fd-44b9-9386-e2c3081e6f3f",q.Spine_mount_44_json="c38220f6-864a-42fa-bcfb-1433b020b9f2",q.Spine_mount_45_json="ebe2f5af-31a3-430d-80ce-bed170385f20",q.Spine_mount_46_json="4d6b2d01-5ed6-4db5-b659-4c1a79a3f8b8",q.Spine_mount_47_json="b59f1433-3e1e-44a3-a92a-964f96866b30",q.Spine_mount_48_json="4e18ce24-26e0-44a9-8dde-024103c2d6a9",q.Spine_mount_49_json="961dc9fa-e398-4ac4-9c9d-2f2a5aac0e63",q.Spine_mount_5_json="214ec825-564e-4b9d-a809-9057563a5aa1",q.Spine_mount_6_json="5d30646a-003b-49ee-89a7-d3e45280c03d",q.Spine_mount_8_json="efb79f9d-173a-49c5-b4a6-898f8d1eb8c5",q.Spine_mount_9_json="53940db3-697a-449f-935f-2ce6b379b512",q.Spine_mount_test2_json="438b476e-16fa-465b-aabc-8715195e7b42",q.Spine_mount_test_json="cfc64d82-4d64-4523-9f44-7c0b16f967ed",q.Spine_music_note_1_json="358c04bf-88c9-4f63-a795-11bdcd0c502f",q.Spine_music_note_2_json="6b2c2b4b-3c29-4713-9598-3b3744e9ae92",q.Spine_music_note_3_json="c063942b-3cdf-4a23-8090-d90fbeff5b7c",q.Spine_music_note_4_json="19fedcd0-0775-458e-bd04-026ff9db14de",q.Spine_music_note_5_json="71cf73db-9885-43a3-980e-c5e77abc9443",q.Spine_music_note_6_json="fa283bd0-8e86-4fb7-aa30-f2bb95c5a7b7",q.Spine_music_notes_json="474b2707-0cbd-4433-ae90-9bd863134dfc",q.Spine_mythic_button_fx_json="74e2be2d-1f59-49ea-a2ad-9741a5f32dcd",q.Spine_mythic_ending_timer_json="c35ed14a-287f-420d-8f0e-6b512a51ed17",q.Spine_mythic_takedown_badge_json="9ea6e19a-93f5-4b24-84ab-9bf77c458160",q.Spine_npc_ada_json="9fa8c8d3-0abb-49f3-84e8-ded5e01cb01a",q.Spine_npc_arenamaster_json="f7b2c99e-e5be-4c9c-9d77-ae0eba250966",q.Spine_npc_aspen_json="27a72f63-89d5-44a3-aa85-a41ca50c7607",q.Spine_npc_athena_json="8ef41540-c49e-4bed-8076-0af95d9bd989",q.Spine_npc_benni_json="197b82a5-0282-4dab-94a3-1733de20a1ee",q.Spine_npc_bok_json="4b901ba0-5e29-451f-ad46-4c3e2bb86613",q.Spine_npc_broccolina_json="9af7dce6-99c8-4255-9bd1-ede1ad13677b",q.Spine_npc_bunny_bouncer_json="3380e07c-deb6-486a-8564-7a6f3afe6d74",q.Spine_npc_cauldron_slimeworker_json="1067a438-89b2-4a9c-b961-e05f41a08748",q.Spine_npc_cebollini_json="f5822754-1119-4a8c-ac36-4a489638178c",q.Spine_npc_don_zorro_json="ce50d082-0424-4b1a-a87e-e963222735ad",q.Spine_npc_eugene_json="95cf771e-d792-4f61-9240-f56d91b50310",q.Spine_npc_eve_json="e8d355c1-ce60-47dc-89e6-e153b1847a9a",q.Spine_npc_firefly_json="f278d370-add0-4744-b9d2-b71aa74ee88f",q.Spine_npc_floatling_fire1_json="176ec55e-6e54-49bc-ac89-62219861f87b",q.Spine_npc_floatling_fire2_json="976e2b41-cd86-4eb5-bf12-0efc5d5d6241",q.Spine_npc_floatling_fire3_json="a096f0c0-6dd0-4ac2-b4f1-87c2ed236503",q.Spine_npc_floatling_fire4_json="6f1fb5e2-cebe-4e04-a9b0-12bfa60611d2",q.Spine_npc_floatling_fire5_json="a705ef12-8e6d-42c6-b9d0-4d3466d5e2f5",q.Spine_npc_floatling_ice1_json="40da6ba2-1b87-470a-95d8-0057d41ea8ab",q.Spine_npc_floatling_ice2_json="fa2f90c0-c912-4c2d-a0d1-fbd6ee86d4d4",q.Spine_npc_floatling_ice3_json="8f8968df-9733-49ba-89fe-e851c26b6fa8",q.Spine_npc_floatling_ice4_json="9fe68383-b914-4f92-b734-6f67aaf64596",q.Spine_npc_floatling_ice5_json="443a58c4-3036-4648-a741-d1f452dd9b08",q.Spine_npc_floatling_plant1_json="fa4a9a67-eed1-46b5-ad44-b72d29876538",q.Spine_npc_floatling_plant2_json="8cdf1350-70f6-41a1-983b-d742ba205b02",q.Spine_npc_floatling_plant3_json="0ea4ccc4-2120-4978-9bd2-dd493acab2b1",q.Spine_npc_floatling_plant4_json="37d251a9-9f86-47ea-865d-e7b27637c753",q.Spine_npc_floatling_plant5_json="1bb9d729-4c41-47b9-b2bb-4501fb397c5f",q.Spine_npc_floatling_storm1_json="74498d70-93f0-4bb5-8de9-269a8063629a",q.Spine_npc_floatling_storm2_json="f7f2d713-b99b-4b60-b0b3-a458bd41a69c",q.Spine_npc_floatling_storm3_json="b4d72146-bea4-4eea-9474-691c396aa7ea",q.Spine_npc_floatling_storm4_json="b122376b-ab8e-422d-89e9-97aaba2a50d6",q.Spine_npc_floatling_storm5_json="17987336-8147-4ab4-971e-a0af1b3a2d36",q.Spine_npc_floatling_water1_json="a1cd6654-9bd6-4bd6-a3f7-7d7301fbb03a",q.Spine_npc_floatling_water2_json="0ab24669-46ba-464c-96ba-91d01579c843",q.Spine_npc_floatling_water3_json="14158013-194c-496b-851e-c82e2e715546",q.Spine_npc_floatling_water4_json="191e0473-3107-450e-a2f2-77ed1cb6a449",q.Spine_npc_floatling_water5_json="e12e9c26-c9ef-437a-b052-1d21b4b78738",q.Spine_npc_floatlingmerchant_json="3cd66caf-76f6-454d-adda-97c6e8f0ae1b",q.Spine_npc_flora_json="f79c22c7-4d21-4585-9506-adcbc96be9d5",q.Spine_npc_florian_json="9b98777f-78b5-4508-94cd-ea5179393981",q.Spine_npc_foreman_json="415a2f55-28a2-4899-83ef-bc43cb706151",q.Spine_npc_gale_json="1d1859fa-e8d5-4811-9d48-420f92328f4d",q.Spine_npc_gerald_json="11570038-1097-4d08-9973-735793f49ce5",q.Spine_npc_gerald_shadow_json="ada1bcee-51bc-4f39-8610-e9362f849b8b",q.Spine_npc_gnome_boardy_json="45755707-da8e-42a6-a4bf-e878496c6e3d",q.Spine_npc_gnome_crystal_cavern_json="b72913b9-5a4e-4855-b0a3-8527a31f7d3b",q.Spine_npc_gnome_firefly_collector_json="4944ab45-b1d6-4997-a1b2-99dff780dacb",q.Spine_npc_gnome_miner_json="244342ae-5070-4429-bb49-5c578f863337",q.Spine_npc_gnome_rift_json="92d204cb-a234-40b6-b219-c48bf20bfb7d",q.Spine_npc_gnome_shop_bonfire_json="7b4dd4f8-b1be-43a4-be2d-ec160ce9af54",q.Spine_npc_gnome_shop_firefly_json="79d2f9ac-307d-4e7e-b873-56dbeacd6258",q.Spine_npc_gnome_shop_shipwreck_json="b2ee59f9-5a2c-44c8-9055-eab4aa36e437",q.Spine_npc_gnome_shop_shiverchill_json="f5ef7feb-04fc-4f6d-818e-fb29d899dc25",q.Spine_npc_gnome_shop_skywatch_json="33718387-584c-4a53-97a6-0581bda73a31",q.Spine_npc_gnome_spinner_json="52537250-d00f-46a0-8905-3d18cd7d3368",q.Spine_npc_gnome_stylist_json="cafc68b5-634d-4eae-aab1-8247e2d830f7",q.Spine_npc_gnome_traveller_json="608f0737-8e04-46e2-b783-d2c91b4a0237",q.Spine_npc_gnome_wheeler_json="73dab9f8-f39f-4e4b-80af-37997e6a9b8a",q.Spine_npc_harriet_json="2561b5ce-cc0f-459f-b2db-c443c07fbf53",q.Spine_npc_howard_json="f644301a-5c3c-4935-af4e-de914b863469",q.Spine_npc_imani_star_json="e1f341b9-ab7e-4816-b2af-ab9ad2ffa6ed",q.Spine_npc_jelly_jim_json="0677cf1a-591d-4d7f-921a-55c04d6ddb14",q.Spine_npc_julia_json="c273d20b-3a5f-4a68-97ff-9eebdf374119",q.Spine_npc_kandi_json="0b7d7314-5d76-4428-b46b-10f39d9cf529",q.Spine_npc_koi_json="d1e29513-e3dc-4138-b547-2a60cc05c7f1",q.Spine_npc_maomao_popup_json="e2cfde8c-3012-4ac1-92ea-dd7b1b2394ce",q.Spine_npc_milkyway_json="8d349571-f42c-4189-80e5-e58927aafda5",q.Spine_npc_mist_json="408d71a0-f24d-4cad-ad0e-3013b72c39f1",q.Spine_npc_mizu_json="482b8b6b-68f7-4827-a5e9-9892f914f4e3",q.Spine_npc_ninja_1_json="26dc9e59-bf55-42ae-ac70-8d2f1fbb793b",q.Spine_npc_ninja_2_json="db785ed3-04ef-4b9c-af38-aee48d179725",q.Spine_npc_ninja_3_json="6dce012f-993b-4895-9a3e-523e4398cbe2",q.Spine_npc_ninja_4_json="f73ecf6f-0b38-4d2b-a543-0698121fee57",q.Spine_npc_ninja_5_json="706593eb-a432-4005-8b26-ef3b48e0daac",q.Spine_npc_noot_json="f13056a1-c618-45cb-8009-0f18fb9092b2",q.Spine_npc_pippet_json="8e2484bc-004a-4866-a4b4-52b5ad789dad",q.Spine_npc_puppetmaster_alt_json="8d8c98f7-1b8f-4508-823d-330cce8a82de",q.Spine_npc_puppetmaster_hardmode_json="b4e874d4-a5a5-4d61-ae95-5aa7d12a2921",q.Spine_npc_puppetmaster_json="f72d225f-bfa7-4701-9af6-80798608ea5c",q.Spine_npc_selena_json="20b960c4-c4ce-47ed-b843-a71e7201ddab",q.Spine_npc_slimeguard_hank_json="8b552edf-2a99-4e0e-8da6-491f2105b805",q.Spine_npc_slimeguard_json="8e4fec6a-49f4-469f-8f45-634280fdf4f7",q.Spine_npc_slimeguard_mike_json="7b788c4a-850b-4fae-9961-a50799707119",q.Spine_npc_slimequeen_json="15f310a3-bf47-48fa-9e22-289c650d0344",q.Spine_npc_slimerella_json="13ee4ddf-6e96-4e01-af22-56e029c62297",q.Spine_npc_slimeworker_json="8f80680f-c098-4e7b-aabc-84643be8fe29",q.Spine_npc_slurpy_json="bca2d166-d2b7-4295-85df-a0cca5084aed",q.Spine_npc_swoopy_json="5fd76115-b040-4d02-b99a-b6a2d015b785",q.Spine_npc_ulla_json="0cefdc92-d8ea-4310-b670-21d644e5f73c",q.Spine_npc_verna_json="20f5c6a5-3599-4b76-9c76-0e3b2a2ef4ac",q.Spine_otp_celebration_json="4e16990f-1d6a-4b31-b386-60dfff304e37",q.Spine_padlock_json="615639df-cbd1-4af9-9c6f-4b5c5b8d5d92",q.Spine_paint_balloon_splash_json="b0bc1552-56eb-47cb-9b4a-650fd9a46845",q.Spine_parent_reward_json="53a4ddbe-de7b-4f9b-9b4d-c8028420f9b6",q.Spine_parentgoals_icon_json="36234fcb-be88-4e31-9092-ab7df4e84c97",q.Spine_pbf_magicoin_launch_modal_json="c218ffc9-abb7-48e4-be43-2afd8d8508ba",q.Spine_pbf_magicoin_sparkles_json="9424c87f-e8df-416f-9ab1-5643ffbb7c9b",q.Spine_pet_100_json="6002cf71-b592-4639-be65-b63eba6d9a88",q.Spine_pet_101_json="ac61b90a-ee5c-43ec-a456-316657a4f2bd",q.Spine_pet_102_json="6f1371a9-4074-4e49-ac53-e390827cce1d",q.Spine_pet_103_json="39f08c6c-7220-4c50-af9e-4a7f69390896",q.Spine_pet_104_json="5970beaf-f638-40c6-afe3-97a3fc64f8b3",q.Spine_pet_105_json="22d9543c-6c9a-4ac1-99e1-2c9abec03137",q.Spine_pet_106_json="ad425b3e-8cd2-4f1c-a5ff-7ba7b4e40c7e",q.Spine_pet_107_json="6270505a-bb90-4949-bd7d-f6ae68b62ae9",q.Spine_pet_108_json="f2808c76-d9e1-475f-864a-7178d2c0b506",q.Spine_pet_109_json="7eaf6c1d-f150-46bd-89e7-bcce6b8876a1",q.Spine_pet_10_json="98fe0850-8a25-4ab8-b5c4-18db9682c495",q.Spine_pet_110_json="4ca45404-f00f-4f80-96fd-c18ad504a3ae",q.Spine_pet_111_json="3a3cd4f3-49d3-46ad-8f4a-e9224129b7ec",q.Spine_pet_112_json="4f8aa3b1-2344-429e-b4c3-a50e82662f6b",q.Spine_pet_113_json="ab0acfec-8638-4f37-a779-dae72f455845",q.Spine_pet_114_json="0721e2df-66af-429b-b326-ccbc94ba468b",q.Spine_pet_115_json="10ea5937-81de-4141-97f3-d236d42f778a",q.Spine_pet_116_json="b927fea1-1e65-4aa1-b9eb-bee99391a575",q.Spine_pet_117_json="100fd339-373d-4675-9f09-9fba36cc6abb",q.Spine_pet_118_json="de1919f9-9ad8-45a4-ad01-fe1c8897dfa3",q.Spine_pet_119_json="c3e9cf8d-0201-46d0-ad61-0c690c78fee4",q.Spine_pet_11_json="9a4a641e-672f-4789-be5d-d6df1eb5e321",q.Spine_pet_120_json="d349443b-08a1-49d9-8e91-2d63bda8b1cf",q.Spine_pet_121_json="8f452b06-b3b4-4c25-a5dd-33343b4fcfcc",q.Spine_pet_122_json="093fc1f8-c513-4ef9-af11-04509fda30ff",q.Spine_pet_123_json="890f9005-1816-4900-9677-24983bfb18ba",q.Spine_pet_124_json="9491da83-2f61-47fe-8073-4f3cde42a96b",q.Spine_pet_125_json="cb8f3fdb-c96b-46cc-a51c-d93eabe54769",q.Spine_pet_126_json="c8d13f99-0653-403c-9d2b-95ab2e3a4a37",q.Spine_pet_127_json="6337501d-43b8-47e8-8ace-84cff3d6a914",q.Spine_pet_128_json="3a800661-c3bb-40c8-ad7b-fba27e47426c",q.Spine_pet_129_json="6febcd26-98c0-41b1-adff-ca6dbc1a6bb6",q.Spine_pet_12_json="8e922a4e-5b3a-423a-b258-e759df420999",q.Spine_pet_130_json="4e6fff9c-f9dd-4f49-bd46-557077e02975",q.Spine_pet_131_json="12137997-8e00-4042-87f3-220f865e243a",q.Spine_pet_132_json="71c81df8-0693-4041-b69f-8ff29340e4bc",q.Spine_pet_133_json="9345ae86-9025-4841-9251-9bbecff3a63d",q.Spine_pet_134_json="5424908a-8755-4db6-8bcb-d315b219a3bd",q.Spine_pet_135_json="66491ebb-7336-489e-9f15-4c76a112c3e6",q.Spine_pet_136_FTUE_json="03a9fa79-a2bc-4497-b3f3-0bba1c7e9095",q.Spine_pet_136_json="6432dfaa-2140-43ae-8e0d-543de6b9baec",q.Spine_pet_137_json="68759a87-ccfd-45fd-b8a2-04877e565a7e",q.Spine_pet_138_json="805fb198-405b-45cf-be4b-c943eb5780ee",q.Spine_pet_139_FTUE_json="44fa3bd0-0b18-458d-a473-b0b0b02b39f2",q.Spine_pet_139_json="1a5cbb8a-3476-4810-abcf-8ae17286475e",q.Spine_pet_13_json="1768152c-d25e-4d67-86c5-53aaa0309574",q.Spine_pet_140_json="a429fc74-f76e-4dca-8d29-128b13f2b7ee",q.Spine_pet_141_json="58dc4c03-0048-4d08-926c-cb3fc20f1272",q.Spine_pet_142_FTUE_json="b218106d-6990-4403-996d-14a1d8e15403",q.Spine_pet_142_json="3f5d4535-31b8-4185-975b-1051af0486b8",q.Spine_pet_143_json="5224af77-c1f9-4490-a741-620311bedd1f",q.Spine_pet_144_json="aeb244e3-3cf7-4fc8-8a6c-de62dce15e8d",q.Spine_pet_145_FTUE_json="0e54d6e2-daa6-4bf6-af6f-3b3b82b65f94",q.Spine_pet_145_json="d2e69249-a4fc-4442-a6b5-e2b6918dcdd7",q.Spine_pet_146_json="231daa2b-f325-43dd-acdf-27ac37cef765",q.Spine_pet_147_json="3532fbfd-8494-46fa-90bf-997961d7b19f",q.Spine_pet_148_FTUE_json="6bd224ba-15cc-4d04-9698-7bd1d9fdd28d",q.Spine_pet_148_json="d3cf7559-4250-40d5-816d-de41f4fa7910",q.Spine_pet_149_json="efd2efa8-8d9f-46d5-abb0-1aee05daa690",q.Spine_pet_14_json="78f956f7-5c94-4c1e-9afa-9960294c2c3c",q.Spine_pet_150_json="95efc14d-2c4d-4f5e-bd59-b42e0f4ff1dc",q.Spine_pet_151_json="34e6744e-f005-4d66-8536-a5566c1b0531",q.Spine_pet_152_json="23a4a864-d46d-4e0f-8b44-f84287c33332",q.Spine_pet_153_json="7d961810-6e8a-4ccd-b7da-0cd9ee2fbae3",q.Spine_pet_154_json="e8192a81-df51-4959-a2ba-1c900d4fecf0",q.Spine_pet_155_json="fc459a41-a24a-46df-905f-cfae11925227",q.Spine_pet_156_json="a04f0ad0-480f-45fb-9011-a5ea28070721",q.Spine_pet_157_json="23ef5f67-30fe-46a8-8b77-74996e8959c6",q.Spine_pet_158_json="431d9192-15a0-493e-b0db-be18d13e8a2c",q.Spine_pet_15_json="bf6af2be-1031-44f2-80f7-3325cd450c3f",q.Spine_pet_160_json="38a815df-cf94-41ca-b0a3-314d6a37054b",q.Spine_pet_161_json="1f6eafd2-9a55-42f8-8a7c-ada2f226c4a7",q.Spine_pet_162_json="a604d393-5e4b-41c4-8fd5-6d22231ead31",q.Spine_pet_163_json="3783f1c7-c26e-4f8b-89fa-932891bac5a5",q.Spine_pet_164_json="bc56b2e2-aa2a-4298-a09b-7101c4c4761b",q.Spine_pet_165_json="ca6a7ff3-1366-4342-8293-cedb2f1ecbaf",q.Spine_pet_166_json="0c3437af-6a72-4fe7-8415-edc1b0adba8c",q.Spine_pet_167_json="17b087eb-0dd3-4b82-803a-df796adc7c95",q.Spine_pet_168_json="cab654b2-625b-47e5-94a5-838c70aa9b69",q.Spine_pet_169_json="59e79c21-ef18-4ece-8130-32a056c62be2",q.Spine_pet_16_json="d28c9abc-866f-49d9-bc38-c767dce417d5",q.Spine_pet_170_json="727a84f4-70ee-4873-a2e1-ad8e5d4e0b19",q.Spine_pet_171_json="feab09f0-ebbf-40a5-9b78-9a8d53d4fb69",q.Spine_pet_172_json="666cc997-22f0-44c8-8162-55e11f4d494c",q.Spine_pet_173_json="2d8ca273-ae0c-4164-87df-f2fb03f6beca",q.Spine_pet_174_json="e5467dbb-9880-4f6b-9a09-aa9e73e80f27",q.Spine_pet_175_json="89a3a1dc-235c-4c0a-bae8-eea45bdd9bd0",q.Spine_pet_176_json="61e5ae0e-569e-4457-ba3e-827aa54f776c",q.Spine_pet_177_json="b8f3d505-604c-4410-8bbc-612b8e529d7d",q.Spine_pet_178_json="6ca18784-8114-4c7d-b3e9-23a0a3216b50",q.Spine_pet_179_json="3d90e9e9-a790-46c6-84f0-54e2fa516a5f",q.Spine_pet_17_json="3e80feb0-016c-4eb5-a392-245527011497",q.Spine_pet_182_json="19e16315-8cd3-49c1-ab35-b7e9495fcd5d",q.Spine_pet_183_json="891d64b0-848c-4544-b8fb-c9e6c652c089",q.Spine_pet_184_json="2ffddcdc-596d-42dd-b9ec-6d8ca7a7ffa4",q.Spine_pet_185_json="1940308d-c215-4ebd-ab11-9fb92316cce2",q.Spine_pet_186_json="85850236-7db4-4ef5-8647-5ffd3fedec95",q.Spine_pet_187_json="cfb920dc-c59e-4f90-893a-921caa50826a",q.Spine_pet_188_json="0764d625-5fd7-4a38-a3ea-cc4d64231dad",q.Spine_pet_189_json="555b795b-0391-45d5-a4c1-ec098206d375",q.Spine_pet_18_json="be25a2d3-acfa-4957-ac28-143415c7ea27",q.Spine_pet_190_json="34dfd6be-3f13-4225-9444-e28a31c0dda9",q.Spine_pet_191_json="00866b77-4bfd-49b3-b11a-7486efb1d091",q.Spine_pet_192_json="3b0c2788-776d-4ccd-8440-64dc69c84d45",q.Spine_pet_193_json="a605e8e1-0c36-4a95-9048-e987ca50d146",q.Spine_pet_194_json="901faac0-682e-404a-92b7-d29a738c8bed",q.Spine_pet_195_json="b3a8ecc7-db50-4c8a-9ea4-dcdb00b8af3f",q.Spine_pet_196_json="56c5b1c3-dfba-4ed0-be14-7c83f82b6e34";q.Spine_pet_197_json="037ed58a-b79d-4d38-bb0f-97a91011cf5c",q.Spine_pet_198_json="111d835d-d4ce-484e-a846-8354595f8bfd",q.Spine_pet_199_json="976916f1-8e0e-467c-8c51-1afe64a1765d",q.Spine_pet_19_json="382ab68b-7b4a-4543-8e81-85052c5d27a5",q.Spine_pet_1_json="624c21bd-63c2-4558-9365-78673fd6f9e5",q.Spine_pet_200_json="7103891a-2033-4a6f-bae3-fd9f78641559",q.Spine_pet_201_json="509a084a-968f-4926-83a0-22668c872064",q.Spine_pet_202_json="dad14c94-e845-4ecb-99e4-f300ca4573a7",q.Spine_pet_203_json="3711e0f9-ec0c-43f5-9759-4e95015f0e6f",q.Spine_pet_204_json="8ada4ec2-ca4e-4952-b9ce-4637c622e4b5",q.Spine_pet_205_json="a134b428-42e2-4aab-9c02-044dd2c1b260",q.Spine_pet_206_json="847eeb11-1f93-4dd7-8597-1b2ad6ff9b0b",q.Spine_pet_207_json="1ecaf902-a910-4dde-86e4-11e92aa0a6ee",q.Spine_pet_208_json="558f635e-4b4c-4680-884d-8de50612c34b",q.Spine_pet_209_json="6fa916fb-2522-4918-be93-748d700d668d",q.Spine_pet_20_json="3a58bbbb-315e-416f-ba3a-7a1c93834d7c",q.Spine_pet_210_json="9fc267e6-940f-41ce-8708-a81c186f5c75",q.Spine_pet_211_json="1dff47e6-cb50-4dbe-9f52-91050bbfd9e1",q.Spine_pet_213_json="1758538e-511d-452a-856f-0e521825ab65",q.Spine_pet_214_json="b8b3843e-e25a-451b-8226-d2ad64772b88",q.Spine_pet_215_json="e5b07215-0e47-4f2f-9252-f2e1d44a88ed",q.Spine_pet_216_json="4f92313e-21ac-489a-afcd-b38b8259b2e8",q.Spine_pet_217_json="d894ae4a-6b9b-4075-9af3-db2cafa002d1",q.Spine_pet_218_json="acd354f3-ed71-436f-829a-95fe9ab3daf3",q.Spine_pet_219_json="2960dfb4-85c1-48b2-a9e5-de4eb31d8a7f",q.Spine_pet_21_json="f7831e07-1e86-42fe-a0b2-005052911c36",q.Spine_pet_220_json="fbdd29fd-c5fa-4949-961e-08524beaf189",q.Spine_pet_221_json="eeefe934-73d8-4b04-bfa4-25ea21d1b96a",q.Spine_pet_222_json="e42fefe9-d7e3-4518-97df-20d11ce344bb",q.Spine_pet_224_json="b5b7225e-44a0-43f8-b092-d30b071ebc6c",q.Spine_pet_225_json="a841031e-2017-41cc-9271-98835518d7d0",q.Spine_pet_226_json="2fcbad8c-3410-487d-8b7f-89c1b709fbe9",q.Spine_pet_227_json="69c48023-e155-484e-822e-7b4ce30c63df",q.Spine_pet_228_json="c253cd80-1651-4441-8e04-def66208ef5c",q.Spine_pet_229_json="9631263d-2fd7-451d-aaca-4c7271bae129",q.Spine_pet_22_json="bc690cb9-907e-4255-9606-805af4ff16cb",q.Spine_pet_230_json="66a98dc3-eafa-4be2-9724-7daeffba75ef",q.Spine_pet_231_json="43587964-526f-40e2-8b51-952410eb393f",q.Spine_pet_232_json="7766769d-7919-444c-a4dc-10ce15aa4ac8",q.Spine_pet_233_json="55276168-e54c-4065-b8d1-09eaf5c0b34a",q.Spine_pet_234_json="11a9ae5b-26c6-45d5-8233-7fb589ba78c0",q.Spine_pet_235_json="a1ce3ac6-b098-476f-bab0-70df98711449",q.Spine_pet_236_json="2d92d144-fd7b-4212-85bd-287bb23161a8",q.Spine_pet_238_json="32104c62-3a28-4aea-8727-c99dc0e37c29",q.Spine_pet_239_json="8b139e78-aa76-46e4-bf69-1a2ba7fca8bf",q.Spine_pet_23_json="d2e3243f-aadf-45cc-9856-1bff37ea440e",q.Spine_pet_240_json="0229ddba-6bba-4b33-aab0-6f2be21af9cd",q.Spine_pet_243_json="05940bd4-7451-402d-85cf-8eabe4bfbe43",q.Spine_pet_244_json="fa63e4d7-a8af-407c-a972-f3477145ef0f",q.Spine_pet_245_json="ff5d0f8b-6e97-44cf-8774-82e68302450f",q.Spine_pet_247_json="d7793e14-4bc3-46f5-a877-bca5ff632831",q.Spine_pet_248_json="d11ce5f5-168d-4424-9aa6-b7f541ab783a",q.Spine_pet_249_json="f7ba7eff-7d9a-46f0-a5c7-5c7b6fc95bd5",q.Spine_pet_24_json="7db566a4-e033-4140-8ca6-0e8f84f96007",q.Spine_pet_250_json="3d3b68f2-2928-4d35-a2d5-0dd896fc8545",q.Spine_pet_251_json="ef0b0f50-c5c6-459e-845f-39227d6bea18",q.Spine_pet_252_json="e6dc8e02-d087-4462-8f36-57806bc5c8a0",q.Spine_pet_253_json="8d867ce0-a7b3-48f3-bea7-50e382b85180",q.Spine_pet_254_json="957b90a2-657d-47c6-8847-05093918c888",q.Spine_pet_255_json="ee57412d-84e3-4a45-8789-ebd1e2d994c3",q.Spine_pet_256_json="6fa72251-886a-4540-8d9f-d77fc614f254",q.Spine_pet_257_json="96eac8eb-c97a-423d-bbcf-6877d336dcbf",q.Spine_pet_258_json="cd0478e3-e9cf-4371-a2a3-8eb0254cd1ca",q.Spine_pet_25_json="1a8ccd0a-92a4-49a7-828c-bac18babd4dd",q.Spine_pet_261_json="5be5c351-5502-4e9b-a35e-727dbb5fd9e9",q.Spine_pet_262_json="aa5fe41e-574e-460d-b18c-9e5c3b786e85",q.Spine_pet_264_json="50152b35-9a0a-4317-92ac-01123b09a10f",q.Spine_pet_265_json="0d9f8d9c-18b6-4cee-b750-e6a0101ecd70",q.Spine_pet_266_json="df256134-c79a-4db9-93a9-3e6de26629f5",q.Spine_pet_267_json="33155d59-dec0-413d-a1cc-74c21b14c2ab",q.Spine_pet_268_json="7a850e9c-b1ff-4ed4-b501-b88c419bf797",q.Spine_pet_269_json="342b398f-c420-41e2-8759-57913a4356eb",q.Spine_pet_26_json="882acee2-395b-484d-adba-d27ddfa34ef2",q.Spine_pet_270_json="bdcabbc7-3633-4693-b798-c218f63c4e77",q.Spine_pet_271_json="502b4b3a-3119-481a-8192-e899a589dd5e",q.Spine_pet_272_json="353d3983-fb29-491b-9134-c964256c38b7",q.Spine_pet_273_json="41259d80-9a58-4bdb-b221-6dedc017792e",q.Spine_pet_274_json="4a49f3a4-7f18-42f0-a874-3535b53a5fc7",q.Spine_pet_275_json="29f42e24-80b1-481b-a04e-301d2245565b",q.Spine_pet_276_json="ff581b3d-3778-4402-bd50-7cf3599f45a1",q.Spine_pet_277_json="c69b275a-40c6-4b93-ae51-0b2dded1c8e5",q.Spine_pet_278_json="7423f59e-4d39-42dc-9c4d-f4a813e48694",q.Spine_pet_27_json="65c417ea-720d-40a9-b015-4fa8c66ecf57",q.Spine_pet_280_json="986c1f1a-0e12-437f-970b-54a0f4efb39b",q.Spine_pet_285_json="6d9f1fc9-faeb-4fd9-b292-e6f774f8a1d1",q.Spine_pet_286_json="c66770a4-89ce-4c36-86ee-ed90654fb90b",q.Spine_pet_287_json="82e89e29-19f1-47fc-b7b8-10aff316ddab",q.Spine_pet_288_json="6ca9649b-45c4-43f4-b321-5f39a94b9242",q.Spine_pet_289_json="3b59c88a-22ac-4b65-9520-b9c0e3f8efb8",q.Spine_pet_28_json="f85f25fc-cdad-4243-8cde-fb3a56ae72b0",q.Spine_pet_290_json="1d2505fc-146e-440f-bbbc-d8279c87f78e",q.Spine_pet_291_json="67517386-d9ee-4a5b-a4e8-5da2670ef4ba",q.Spine_pet_292_json="cf060dc7-41ee-42c1-b676-45e04eb36c7f",q.Spine_pet_293_json="b44e9ed6-4046-4ee5-a2f6-12e8c746a56c",q.Spine_pet_294_json="372d8329-44b4-4e49-bacd-2541d10aa4e5",q.Spine_pet_295_json="f03f6c33-0e08-4f0b-bfbf-2b99773e073a",q.Spine_pet_296_json="9eb7d7d2-7586-4456-94f0-bc87a23509c4",q.Spine_pet_297_json="dc59553c-4ff0-485c-bd4c-0e42fed0033d",q.Spine_pet_298_json="48d90db6-aff2-4434-b934-0c1f4c829f8b",q.Spine_pet_299_json="4e02f21a-4cf1-42c1-be9a-0cdc934189f2",q.Spine_pet_29_json="28c2da62-b05d-44e0-80a1-f74159bec7df",q.Spine_pet_2_json="ab9cd362-d049-4e74-9a67-9482af6a7903",q.Spine_pet_300_json="ac351eaf-f55f-438a-8170-6d8543cf6dab",q.Spine_pet_301_json="44b7ba23-1183-4fab-9777-c530163105c7",q.Spine_pet_302_json="b4e52c57-0245-4cdf-b7e8-d52ecf84b555",q.Spine_pet_303_json="31304e70-0c28-460a-91cf-d929a421ffaa",q.Spine_pet_304_json="0191a00d-1584-4286-8e12-63eaff14b4c8",q.Spine_pet_305_json="c18a8f49-d8f0-4bd1-93b8-e17798d0d506",q.Spine_pet_306_json="2e66a49d-c080-43f8-a6a8-7136f83516ed",q.Spine_pet_307_json="615a2cf0-2b16-443a-ae3d-fe44b1723974",q.Spine_pet_308_json="574f0155-cdc8-4ba2-95f2-01307c333374",q.Spine_pet_309_json="0b3bf0e8-4e2e-453e-bf1a-81aee55e3517",q.Spine_pet_30_json="6fdd6406-3a29-415f-9299-454cfbd59fbb",q.Spine_pet_310_json="a23985ea-fe07-4cc9-80a7-7ee5c455587f",q.Spine_pet_317_json="81dd9c8a-879a-4408-bcda-dea02d851f45",q.Spine_pet_318_json="b6debca7-71da-4674-84f2-7b48b9c60875",q.Spine_pet_319_json="3d3f8335-31fa-44d2-8428-855d1898cb29",q.Spine_pet_31_json="2ff5eefd-f16a-441f-b3ee-5a79461867c5",q.Spine_pet_320_json="a98b82e7-c029-4372-86a6-72908d434618",q.Spine_pet_321_json="678819be-6cc8-4d67-ba18-37c55e25dc6b",q.Spine_pet_322_json="70188b8c-725c-46aa-9fda-9f63c882a082",q.Spine_pet_323_json="5122bd83-a8ac-43d6-8e15-16fe61c529b8",q.Spine_pet_324_json="6129e698-ecd5-41e6-b7a0-bffc325a1fd9",q.Spine_pet_325_json="afe00374-3511-43e3-bb0d-bc349402d3a3",q.Spine_pet_326_json="4c8fd072-150b-4607-8e38-e89e07a6277c",q.Spine_pet_32_json="09b0fec9-42ff-4e1e-aba9-4941a919b149",q.Spine_pet_335_json="6b72ded7-6fd7-41d4-9908-5a2c6572b35e",q.Spine_pet_336_json="e7fa44f4-f95e-4855-a2ae-6193b2aa49d5",q.Spine_pet_337_json="076cb088-caba-4a9d-8b23-9e7f31534716",q.Spine_pet_338_json="24675028-08e2-4ebc-8566-29a30919770b",q.Spine_pet_339_json="5b19e6c4-c3eb-484d-a4d0-7a9355e85a71",q.Spine_pet_33_json="d17ab0d6-c4b2-44f6-95d2-83c5d862a250",q.Spine_pet_341_json="02c2d721-534e-40fa-ac13-790ffeb54128",q.Spine_pet_342_json="c08de98c-3ee8-4025-a9a6-cadda2233cb1",q.Spine_pet_344_json="17185171-c1de-4e71-af7d-762c1b0ec687",q.Spine_pet_346_json="500dab9d-4237-49f5-9a60-6e69ff6fe084",q.Spine_pet_34_json="cdde707d-9c5d-4b52-bbff-74d8e9df8862",q.Spine_pet_354_json="c143df10-6513-4a24-8060-237ac3dec711",q.Spine_pet_35_json="feba4f30-cd85-4876-8c4a-041d9dfc4e6e",q.Spine_pet_362_json="c2154690-b043-44ae-b433-23c0b9dd8b05",q.Spine_pet_363_json="7ecfe1c4-f20a-47f2-a923-d5f58afbab46",q.Spine_pet_36_json="734edf64-405c-4bb6-90cd-999235524419",q.Spine_pet_376_json="593aeeb7-8331-46b3-80f6-9e951a93cde0",q.Spine_pet_377_json="937880b8-f92b-461b-880f-9be65b1819e7",q.Spine_pet_37_json="d0acb997-ecbd-4a98-9f7e-f90b833dcf77",q.Spine_pet_385_json="de170494-00f2-424b-973b-3968270c17e2",q.Spine_pet_386_json="84819714-205d-4d02-a451-fced28fd1c1f",q.Spine_pet_387_json="0bc3c4e3-7026-46d3-8aa0-f3265f94f3dc",q.Spine_pet_388_json="9035e4f1-aede-4714-91e4-c1dc12bb5477",q.Spine_pet_38_json="d30943f7-dc35-470a-9b3b-ffd1a5ea9fb0",q.Spine_pet_39_json="1509e1f8-d714-4f2f-8507-d6f3c0845004",q.Spine_pet_3_json="add03fa1-e749-4028-9f5f-2006ca8ec61c",q.Spine_pet_40_json="12f8fff2-2d78-4921-80bb-2c4633017a30",q.Spine_pet_41_json="8a951385-592e-4866-a45d-4cb8b098dae1",q.Spine_pet_42_json="90dc5e5e-27bf-4b97-a99a-d09422e0a7b4",q.Spine_pet_43_json="408c81ec-ad18-4bea-8f0f-dda95dfe6e89",q.Spine_pet_44_json="a1d89955-0c4e-4b51-8810-f4cb3815f475",q.Spine_pet_45_json="619bedfe-f98f-4704-b64b-c9542c8a86c9",q.Spine_pet_46_json="79f7b288-f2a0-4552-9572-b304de66143c",q.Spine_pet_47_json="c9e962b1-b84c-44f0-b3a6-8030fdde7da9",q.Spine_pet_48_json="f758bfe7-5685-49fa-8b3a-18d93f2b7908",q.Spine_pet_49_json="bbc51b00-f855-4e47-9eba-2a762f68277d",q.Spine_pet_4_json="32d65bff-0a01-4411-8745-c048727140c2",q.Spine_pet_50_json="e9e6bb32-dff9-4b8d-acb3-3219e2683a0b",q.Spine_pet_51_json="9a8a8949-a4ff-4425-9fd1-b73774e62ebe",q.Spine_pet_52_json="08dbac2b-a7e5-4f96-ba2b-80f0b40d0788",q.Spine_pet_53_json="d381c981-16e7-44ac-ab10-6fc3dbeb085e",q.Spine_pet_54_json="cba7ed04-3099-4318-850b-f94e9ab0a89b",q.Spine_pet_55_json="e65aed4b-98a6-42c4-8d18-cb7b80df56a1",q.Spine_pet_56_json="221d7b8c-8774-4619-8bf8-199d6b3b971a",q.Spine_pet_57_json="3a8b8144-a3e1-4f37-9f79-3d85328b161b",q.Spine_pet_58_json="d401fedd-1dce-4a05-91f9-fe76b5e637e7",q.Spine_pet_59_json="38fc3b6d-36ec-468c-97fc-b394cb4fe357",q.Spine_pet_5_json="8fb4d9f5-1e7c-4a8c-9271-73f0d6fb646d",q.Spine_pet_60_json="65cf58a8-1abb-4dfa-9780-61371f97e9d3",q.Spine_pet_61_json="411b40ee-b5a9-4f55-931a-8e6ec3939387",q.Spine_pet_62_json="3874a12f-fbba-4c08-ab33-74e6ba093f91",q.Spine_pet_63_json="bd1ce8fc-2f5b-41d3-b7e0-d50d201102b1",q.Spine_pet_64_json="52117a24-42aa-458e-85ba-01c568bf342b",q.Spine_pet_65_json="23110903-a73e-4861-a011-9f532b7113ce",q.Spine_pet_66_json="57749f9b-cc40-41f1-958a-d093374231e9",q.Spine_pet_67_json="f9eafd46-3238-465c-8568-6f2ac5856ca9",q.Spine_pet_68_json="9cdd62a1-8a47-4009-af6f-ded41154f153",q.Spine_pet_69_json="1d203682-b718-4692-845c-bae34b4c26a7",q.Spine_pet_6_json="c44c9ea1-7825-4615-b226-dc0e5643b703",q.Spine_pet_70_json="8f922a86-a9fb-4c3b-876d-40fb86cc4b02",q.Spine_pet_71_json="483c041f-4cc8-4eac-b8d1-ba8bf5547479",q.Spine_pet_72_json="9adc54cf-5cfa-43c9-8308-acc108bca6ab",q.Spine_pet_73_json="5c66afeb-b3b2-411a-9ff5-85592376f267",q.Spine_pet_74_json="fafea933-9e0c-418b-9e5a-fe86f2fcc346",q.Spine_pet_75_json="0054f56f-d3aa-4d99-98fb-7593fb5f8e22",q.Spine_pet_76_json="b23cc2a4-201b-46e5-8871-8e3acc355543",q.Spine_pet_77_json="eefd8726-0799-47c6-badb-f3f82008ff3e",q.Spine_pet_78_json="28cddc60-1e65-4dec-951c-a9b243e0e7d2",q.Spine_pet_79_json="7316756f-343e-4eac-b1a5-3c3102a8fde6",q.Spine_pet_7_json="d4f40b3a-db9e-4227-975c-1c2fbc412cc0",q.Spine_pet_80_json="4ecbbb30-2198-4f9b-8e36-811a3a2f5851",q.Spine_pet_81_json="545d4399-1be1-4b1f-8c8b-8768f17f5e7c",q.Spine_pet_82_json="154eb84b-0008-45fe-b1af-4324c2b2072b",q.Spine_pet_83_json="95d85b7d-f6eb-481d-97a3-555af4d96ebd",q.Spine_pet_84_json="ee979a66-45d4-4cb5-bdfa-c5a760dddcde",q.Spine_pet_85_json="17197284-ffdf-47ef-bc06-adadde125d38",q.Spine_pet_86_json="9374647d-3952-463d-ac92-74ea856595ad",q.Spine_pet_87_json="125184d9-b7a3-48aa-96cf-55f2c717abf7",q.Spine_pet_88_json="7a74f3d7-91b0-478d-a978-59c4bc831c98",q.Spine_pet_89_json="6a64d518-11be-47f0-bfb7-3bb7efd302d7",q.Spine_pet_8_json="76b98aa0-b8f5-4558-85aa-d99b07aa9e91",q.Spine_pet_90_json="8280245b-4c0d-41a4-a3ee-61c1b15fda11",q.Spine_pet_91_json="8dfffb36-1565-4847-840e-8ffb6853c490",q.Spine_pet_92_json="fbbfa853-93e2-4b08-b58f-fb472af20e00",q.Spine_pet_93_json="6db5f3f4-62f0-4ca1-8260-ff78d42fac2a",q.Spine_pet_94_json="dd15ead8-2dd8-4cf7-821c-5daa86b6da6c",q.Spine_pet_95_json="ba7e2558-286c-4b2b-8d5d-a73ee1d8d3bc",q.Spine_pet_96_json="723f981e-5a16-43d6-811c-90bca1ce7a58",q.Spine_pet_97_json="001c63b3-b912-4cc4-a267-6b6ba46f9dbe",q.Spine_pet_98_json="53a00330-ee9f-40bb-a41f-2cea2f578e2d",q.Spine_pet_99_json="763ef1d6-8adb-44ad-b8c4-0f6452323862",q.Spine_pet_9_json="ac66a86d-2212-45e6-8075-35f05ae3d06f",q.Spine_pet_battle_rescue_back_json="1618279c-80fc-44f9-8351-ab0a792c8e53",q.Spine_pet_battle_rescue_front_json="a27f0b05-9ef5-4060-a06e-43557b7c7a2b",q.Spine_pet_battle_rescue_json="079ab5ab-0f58-4289-8c41-154d936f797b",q.Spine_pet_card_shine_json="443300f2-c3ad-4059-af40-d6f31e4e3001",q.Spine_pet_empty_state_json="12bb11bf-3ac8-4fc7-9f63-fbf4aa535984",q.Spine_pet_rescue_card_json="d1d15cbe-544c-4793-afcf-0ebfc4aae1f1",q.Spine_pet_rescue_json="8e94ea91-a3ba-4cb1-a821-34a6713565a2",q.Spine_pet_shadow_effect_back_json="a68a9e63-4d4d-403e-a7d6-89338db8e4f1",q.Spine_pet_shadow_effect_front_json="1cb949f7-e03d-414e-9306-4068ac1a1d15",q.Spine_pet_shadow_effect_json="9fceb8cc-f22d-4732-b03b-cbacc58d5aac",q.Spine_petbook_stamp_json="59792db7-52fb-4bc3-be12-555563f4b3df",q.Spine_petslot_unlock_json="74dd84ba-64a2-4f90-b9a9-b7d8d9a0be69",q.Spine_physical_blunt_json="70b97c74-dc3e-4bca-a869-4d5b2374df8d",q.Spine_physical_impact_02_json="002cafd0-673f-44d3-96c3-0a97f1092f77",q.Spine_physical_impact_json="fc0bcea0-f460-44f6-91b4-8cae6afcf9ac",q.Spine_physical_multi_impact_01_json="37ab6fd3-1d5e-4050-ad95-a1d572954472",q.Spine_physical_multi_travel_01_json="840cf48c-6ea6-4c0b-94e8-4d6e13faef1b",q.Spine_physical_pierce_json="9cb32bd0-be63-44e1-80fc-8dc73f5579eb",q.Spine_physical_slash_json="b7a6d581-0f46-4a29-9a71-fc6f116353bc",q.Spine_plant_eg_single_json="86d0078c-b0d7-40be-98de-17003291d9cf",q.Spine_plant_gryphroom_json="78c1f487-d6a0-430f-96c6-e27fb99485b0",q.Spine_plant_multi1_json="14670d48-47fb-4dc6-aa3b-35f7472ddaa5",q.Spine_plant_multi2_json="37bf9991-56b6-4689-88e5-d3f5c0d2d4a5",q.Spine_plant_multi3_json="68ea87b1-dc1f-40f4-8e81-014b99115eb7",q.Spine_plant_single1_json="01ec85a7-e4ec-4565-a0bd-0db6ba14b5f5",q.Spine_plant_single2_json="2dca9468-59a5-4b9f-8d45-70d000f596eb",q.Spine_plant_single3_json="a5d233a0-0fc9-4ca9-a15b-c19184f6f4a0",q.Spine_plant_single_create_02_json="27800f7d-7858-4543-acfb-cff0e7c4b445",q.Spine_plant_single_impact_02_json="712f6dfc-f5e1-4fc9-8096-00330d2957c8",q.Spine_plant_single_travel_02_json="5e65fa82-626d-4320-a184-e745b8235196",q.Spine_plant_single_travel_03_json="c7b19b50-253f-437a-9d4e-3d2b16958612",q.Spine_plinth_carousel_dark_json="63bc53ba-296b-4f42-930a-9d8a1d75c8b1",q.Spine_plinth_carousel_json="69ad4fa3-a8fa-49b5-87aa-112a38df01df",q.Spine_plinth_pet_158_json="1c86e40d-4138-41dd-b9d2-bdbe9bc04929",q.Spine_pmlock_elevator_json="08fdd21d-60d2-49d0-b509-db16c81a5ed2",q.Spine_pmlocks_basic_json="f3022233-9983-4236-a894-40f488343ce2",q.Spine_podium_flame_json="c30192a9-fc3a-445c-85d5-49fcd38e6c9e",q.Spine_pumpki_poof_json="2244d003-f8cd-472a-9483-5e202342aae0",q.Spine_puppetmaster_map_smoke_json="25209d4b-5f25-470a-8ce5-b76a4b82a926",q.Spine_puppetmaster_smoke_json="86320697-486a-402f-a619-d1cfc7cc2567",q.Spine_questionsanswered_confetti_json="682130c5-ae92-4565-8446-0c0bb0a09400",q.Spine_rainbow_works_json="ab1d4710-471a-4cf8-a7e8-18fb0bee27e3",q.Spine_rank_bar_json="3d79db6d-b5ac-48f0-a741-5f9500feb79c",q.Spine_rasterreveal_json="57bf17e8-b38a-4983-9ed4-293c4f43c822",q.Spine_rays_celebration_json="a47ccfc5-2b81-42f5-83a4-ed255d9864b8",q.Spine_restrictions_card_flip_json="8b960170-692b-4232-a8db-3fccc166aa8d",q.Spine_revive_json="0ff4db7b-40fa-47ed-9949-30508dbb142c",q.Spine_rift_modifier_reroll_json="cc41d68e-4734-4909-b890-bf3ea0479346",q.Spine_rift_pet_revive_OL_json="edb88c3b-65e2-4dda-9c64-b9a2f610bc37",q.Spine_rift_pet_revive_UL_json="bebd20f0-619b-4680-ac9c-a6b16218751b",q.Spine_rift_portal_astral_json="7f1c4560-6aea-43d5-9403-3d1173f6fea2",q.Spine_rift_portal_basic_json="bc72e20c-385e-4b2b-b0b2-67e34edf064c",q.Spine_rift_portal_fire_json="e88735cc-1554-4368-a604-bcd4e1fe7ec9",q.Spine_rift_portal_gold_json="4f33945f-59bb-4f19-881f-410173a12ee4",q.Spine_rift_portal_ice_json="3a6ec369-8f9c-4f09-a45d-076f05062ce3",q.Spine_rift_portal_physical_json="cb982d3e-538f-4cb3-a5ec-5477c16a6bff",q.Spine_rift_portal_plant_json="8548f003-2fdd-4cf3-ae38-e7b712f5f7ee",q.Spine_rift_portal_shadow_json="518eab39-88a6-4bee-adb2-d9179d743a34",q.Spine_rift_portal_storm_json="11230246-6f5b-4581-9d59-1dfd62bb7dd2",q.Spine_rift_portal_water_json="350d8b01-a273-4fa8-849f-1d7e552bf1bf",q.Spine_roar_impact_01_json="c982cef5-79ff-42b6-8e05-a6c389f9fa2d",q.Spine_roar_single_travel_01_json="50817345-eff4-45f6-8b8f-baf97d43a569",q.Spine_rune_equip_json="51abe61f-a912-4358-970c-8165c781472c",q.Spine_rustling_bush_json="30c554f5-f314-4466-8c4d-132d4d8c5929",q.Spine_sandpile_shipwreck_json="ab416c70-bd78-4ad7-b9ad-c3344613ad30",q.Spine_screendebris_json="ddf266b4-90c7-49d7-8dc6-c31f6c234329",q.Spine_segmented_offers_rewardclaim_json="d140a5dc-144b-49d0-8f0f-4c3279687b61",q.Spine_segmented_offers_stamp_json="eecd178b-33fb-46ee-a9be-1991375ede0d",q.Spine_shadow_boss_shield_json="20ffe378-58cb-4b1f-a3a7-5f13c00ad68b",q.Spine_shadow_fire_create_03_json="7c90bafb-2e8a-47d0-addc-4e9e3b840023",q.Spine_shadow_fire_single_impact_02_json="14747ca0-0266-4a44-988a-84bd8f34fd09",q.Spine_shadow_fire_single_impact_03_json="dba630a0-7d92-43b8-adcc-5f217636e551",q.Spine_shadow_multi1_json="8d00a6c2-3d71-44f3-b6db-7784d2a2fe54",q.Spine_shadow_multi_create_01_json="f823ad07-28b3-4761-a22d-6d0378d5745f",q.Spine_shadow_multi_create_02_json="5a58af70-04c8-45f9-a927-bba840c0afa9",q.Spine_shadow_multi_impact_01_json="55ae8376-fff4-47df-bd21-50b9368965c9",q.Spine_shadow_multi_impact_02_json="67334c48-3a25-4ec1-b9ca-2345e3687f9b",q.Spine_shadow_multi_travel_01_json="e13582f2-f864-47b7-a388-8061b6a5155f",q.Spine_shadow_plant_single_impact_02_json="b4de27b9-7f94-4705-aed2-5be14038084e",q.Spine_shadow_plant_single_travel_03_json="714db27a-6577-4004-be01-48d70b173be4",q.Spine_shadow_single1_json="e1ae5dea-ecb6-4d0b-b0fc-a8d7d7b15e22",q.Spine_shadow_single_create_01_json="f52dc182-b35a-4650-8418-d9086019b460",q.Spine_shadow_single_create_02_json="d51983d3-59fb-4485-87c7-3ddde2123cbe",q.Spine_shadow_single_impact_01_json="dd8ccc18-07a8-4a6b-b708-6e2c6f5481a7",q.Spine_shadow_single_impact_02_json="ab1afb1c-e0c2-4553-a574-cfc8ee1dd823",q.Spine_shadow_single_trail_01_json="823987b7-5991-4899-8ebb-156a95e42f53",q.Spine_shadow_single_travel_01_json="fd59918f-8d2f-4c74-8138-3749b54aceaa",q.Spine_shadow_single_travel_02_json="9868be2c-c7af-47a7-be1b-6f5c2460423d",q.Spine_shadow_summon_json="1f3c05a1-3613-49d6-ae59-b174e8b26ffe",q.Spine_shadow_water_multi_create_01_json="af192621-930a-4419-876d-a90674b58205",q.Spine_shadow_water_multi_impact_03_json="d7dfd04f-c368-458c-9bf0-d31150e55591",q.Spine_shadow_water_single_create_01_json="4b4215a9-8b31-46c1-b28a-395bf5c533ec",q.Spine_shadowclash_json="ddfdd75d-777b-4e3f-a72e-cf41a1c53709",q.Spine_shadowportal_json="f3ab5ae5-8c4c-4a06-bce6-d634f02fe8d7",q.Spine_shipwreck_bubble_json="0e05fb87-ca6e-4c9a-8694-acc6b0deb1bf",q.Spine_shipwreck_squeak_json="c8942f5a-21f3-4bbf-91c9-79dfa82319a6",q.Spine_shipwreck_tornado_json="44e7a15d-85c6-47cc-950d-6298e9ccb855",q.Spine_shipwreck_unlock_json="e337846c-b83a-41d7-a49e-97d5651c2180",q.Spine_shipwreck_whirlpool_json="8cce319b-1a79-4fc6-8fa8-d67d47014b5c",q.Spine_shiverchill_unlock_json="c951c214-d5c5-44b1-af9c-c18039cd82b8",q.Spine_shop_cardglow_json="14d063ae-f7ab-4555-acc3-413975d82146",q.Spine_shroud_json="411a3889-759f-424e-87a0-2093ab698334",q.Spine_skywatch_elevator_json="388253ab-685a-4791-8d2e-516eec48870e",q.Spine_skywatch_unlock_json="8a39400a-d58c-4d8f-bb15-4bbb89557019",q.Spine_smartblock_vfx_json="ab0445de-9cb2-4527-8224-9a8004bba0f6",q.Spine_smoke_1_json="56de05e0-5658-41a6-8972-2e27f5047c47",q.Spine_smoke_2_json="f6f6fc75-071a-4e0c-90f8-e1a713dfbb80",q.Spine_smoke_flagmask_json="857120d1-0edb-46f5-bc0d-bcf03d61b23a",q.Spine_snowpile_1_json="34cd3817-0a0c-45fa-a304-04c8b53a9cac",q.Spine_snowpile_2_json="6f814fe8-3d8f-45f3-9dfe-ff5087a02521",q.Spine_snowpile_3_json="dcb8ea90-3766-41a1-a01a-d811c56ced40",q.Spine_snowpile_shiverchill_1_json="457740d1-6c48-43cb-b787-8cc9a527b939",q.Spine_snowpile_shiverchill_2_json="d85ca9fd-1360-49e2-bfd7-bef3cbe07af7",q.Spine_snowpile_shiverchill_3_json="d8282472-29c6-46c4-8040-9ce4f2c36332",q.Spine_snowworks_json="72a5b25a-bb3e-464b-b023-9330b7cc8ffe",q.Spine_socialfeed_poof_json="e0748643-78ff-4577-a1f3-567965b360f2",q.Spine_sparkle_2_json="65e4176f-66aa-40e1-9e1b-cc491956556f",q.Spine_sparkle_button_json="d5b86d51-51e9-40c8-b11e-69b9cb25c51e",q.Spine_sparkle_button_petrescue_json="810fc55f-5b83-4ef3-94a8-f3b22bc0f5ee",q.Spine_sparkle_pbf_json="301f36f5-f242-4752-bb5c-9dc7b588e3bb",q.Spine_sparkle_worldmap_json="52970e19-53c9-4ee9-bb9c-cac5d85c68c3",q.Spine_spell_astral_impact_json="fc83527c-99a6-45de-9802-66fd576ef070",q.Spine_spell_beebee_aoe_impact_json="e0a42f0d-4274-4503-bff2-2649906be057",q.Spine_spell_bok_aoe_impact_json="a51d7221-d8fd-4346-846a-8be149b4fd16",q.Spine_spell_eve_aoe_impact_json="159c2116-0233-4c22-b246-6ca356c12dfd",q.Spine_spell_fire_impact_json="159c75ee-03f2-416d-9f7f-10526aa59cdf",q.Spine_spell_flora_aoe_impact_json="dda92d38-179c-46e9-8596-3e62a22b10b7",q.Spine_spell_fumble_json="8935cf27-c92a-4603-a3ee-0e44f3c862e8",q.Spine_spell_ice_impact_json="bf28a438-8785-4f91-aa8e-d566f6f4799d",q.Spine_spell_noot_aoe_impact_json="ad317a02-5edb-4132-b5a9-3d2a557554b3",q.Spine_spell_plant_impact_json="cb6cb725-01ad-4a04-af1c-b07e7feb1a7b",q.Spine_spell_shadow_impact_json="108f9f97-b729-43e7-89ea-0f77faf2043b",q.Spine_spell_slurpy_aoe_impact_json="e1c30b47-0f01-42b1-93c5-0eb71f8b350e",q.Spine_spell_storm_impact_json="b12ee3be-96cf-4bc2-9e4f-bfd1d354d2a4",q.Spine_spell_water_impact_json="959fcd45-0c45-4dc7-9ad4-c7574416988d",q.Spine_stage_intros_json="314c0ca6-0c20-43e8-899c-5787c3a4f30e",q.Spine_stair_lock_json="3b3faa30-1c94-4eff-8445-0e615b782494",q.Spine_starjar_json="25f0a9cd-a4ac-4780-9799-750eaad56346",q.Spine_stateChallenges_milestoneReward_json="a3638eb1-108b-45e3-ad43-0e45d2a34898",q.Spine_stateChallenges_rectangleGlow_json="a184d13b-e427-42a7-ba18-2c1ae7ac1dc1",q.Spine_statuseffect_buff_json="0984e03a-4c96-44cb-87e8-7a725c161594",q.Spine_statuseffect_burn_json="95f3e5f4-cabb-4acc-9bcb-e6c74ef4c9ee",q.Spine_statuseffect_cleanse_json="f7c7e44e-89e3-40e3-9f13-1555dc61f1ed",q.Spine_statuseffect_confuse_json="54d6b02d-e05d-4a30-b3ff-a63ae14ec788",q.Spine_statuseffect_debuff_json="aa56d6b8-2880-4900-84ae-c77452b01629",q.Spine_statuseffect_frozen_json="ee5461bd-c4a2-4cd7-861d-f2b432436f63",q.Spine_statuseffect_heal_json="afcaeb58-c01a-408e-a11b-7e73fd56c8fe",q.Spine_statuseffect_shock_json="5fca11d5-698c-4b36-9c50-09f8beb229a9",q.Spine_statuseffect_taunt_json="3b33f7bc-9213-474d-b548-27e1451875bf",q.Spine_storm_eg_single_json="ac67a755-3c46-4547-8eb8-d43a47ef34a3",q.Spine_storm_multi1_json="5ef5090e-da69-435c-8c04-465a5622ae11",q.Spine_storm_multi2_json="cf9d4964-a1eb-4798-a0e4-917c850a25f0",q.Spine_storm_multi3_json="f64da219-29ea-4e48-a795-093126882066",q.Spine_storm_single1_json="bfe8d7cb-f773-482f-820a-25b89f788cdb",q.Spine_storm_single2_json="f4d2eb09-a4f4-4a8c-a88b-3046a7f3a6dc",q.Spine_storm_single3_json="06fe4cad-96f6-432c-b1f5-d4a333239e88",q.Spine_storm_single_create_01_json="27806031-20d0-4201-881a-0f857d43e9e0",q.Spine_storm_single_impact_01_json="49aa8f66-6395-462d-aa7b-e8d3467ac3ce",q.Spine_storm_single_impact_03_json="9399362d-177f-4369-a9f6-0b490799218a",q.Spine_storm_single_trail_01_json="1cf136e9-585b-4a43-aedf-07d915303153",q.Spine_storm_single_travel_01_json="cd0f9883-d35e-496b-bfb8-f0d5a6eedda1",q.Spine_stubbornshadow_json="669693a9-f63b-4488-ab35-78c8bc49dfa6",q.Spine_teleport_fog_json="4b9872cd-ad65-44fa-ab94-a3771b4ec2b0",q.Spine_throw_gift_json="2bfdd297-bb17-4af4-91d3-86bba1f63942",q.Spine_throw_gooball_json="58c4d590-862d-4ce4-afc8-56db823b208c",q.Spine_throw_pudding_json="95fa71c8-429b-431b-8872-5884e9f22cb0",q.Spine_throw_shadowball_json="0c8864e6-7a01-4d4f-9634-0d79bbc54664",q.Spine_throw_snowball_json="6d4e13ef-839b-4027-9fad-260ec3e8319d",q.Spine_throw_staticball_json="0fdc3d0b-cf4e-47c6-ade6-2658a8c504cf",q.Spine_throw_tomato_json="c5412998-f03c-4d18-ad86-7ef12f50147f",q.Spine_tower_elevator_ice_json="af751d21-0f20-4943-8120-c470a2efb8fc",q.Spine_tower_elevator_json="03de5d63-326d-43b5-a8d0-57cf7394e64d",q.Spine_tower_unlock_json="47c8154d-4060-4faf-b9ee-90172f5b12bb",q.Spine_towertown_unlock_json="1b212ea9-d472-45b9-8391-0c00c919cf1f",q.Spine_town_unlock_json="0768d5dd-0448-4244-b3eb-f174c1c1eb8c",q.Spine_trap_door_glow_json="9a7d122c-1b21-460c-be96-a2ef2acaebe2",q.Spine_ui_roulette_json="ea743ba8-af6d-443c-97ef-0693b7ebc86b",q.Spine_ui_unlock_json="f8d80054-fd59-4027-8727-59c78ef168a3",q.Spine_ultra_chest_coins_json="b1df00b2-8582-42d6-b0bb-30ab19a1820a",q.Spine_ultra_chest_json="a2f331e3-ba0a-4c1a-8f79-c7134b1230a6",q.Spine_ultra_chest_sparkles_json="0b8d92ba-b29a-4fc5-b28b-f4c055df4ca7",q.Spine_ultra_modal_json="0a076053-adef-4912-b73a-8dca45c7ba6b",q.Spine_upgrade_radial_json="49dec81e-74df-45f1-af3d-d2eb3e37580e",q.Spine_vegabloom_button_fx_json="553151eb-91d2-453a-bd95-dccceaf88125",q.Spine_warden_bubble_container_json="87dcc185-20cc-4181-bb29-7b9aa3be4767",q.Spine_water_balloon_splash_json="9c38c71b-7b50-48d8-b5b1-dd0d13633536",q.Spine_water_eg_single_json="a5d83ac5-9a39-4f4d-971e-2a22d32d3437",q.Spine_water_multi1_json="911ec137-99b0-42a5-8b71-7dfaab36d5bb",q.Spine_water_multi2_json="24ad5a52-cb70-461e-b571-b8bc7650ec04",q.Spine_water_multi3_json="b1a6c68b-0fc3-4d4d-b621-905076602db7",q.Spine_water_multi_create_01_json="ddd9b47c-713d-4654-9782-daa66a20cda5",q.Spine_water_multi_impact_01_json="28c9205e-6b34-43f0-809f-afef80091df3",q.Spine_water_multi_impact_02_json="f203683d-ffae-4b6c-9a60-980f9d5fe962",q.Spine_water_multi_impact_03_json="ebc02f04-132a-4c72-a4ac-1e835bdd28a8",q.Spine_water_single1_json="f9b045b8-6845-419b-b619-500a4c4012af",q.Spine_water_single2_json="4ed9e0af-ae89-46fd-a151-c8cd6baa66b2",q.Spine_water_single3_json="1736e1ff-7720-49dc-bbee-da12815746ff",q.Spine_water_single_create_01_json="eb06f3ec-53fb-4e70-acf0-f70045c49533",q.Spine_water_single_create_02_json="9f4d7a2a-765a-45fd-9293-e38d12a4e90b",q.Spine_water_single_create_04_json="cee1c753-c9e1-45b3-8530-41b64d7ddf0e",q.Spine_water_single_impact_01_json="dabf6d5d-3084-461d-b401-010eada3c3e5",q.Spine_water_single_impact_02_json="64be31ab-6e40-4842-b420-098f8cef03bd",q.Spine_water_single_impact_04_json="7677528f-dd6c-4c96-ae41-3442616a9ad0",q.Spine_water_single_trail_01_json="ef3d04df-f8aa-4820-99ed-3bd8af1814a8",q.Spine_water_single_travel_01_json="29611ca2-2d5e-485e-85ae-6ca0f710cbee",q.Spine_water_single_travel_02_json="5624c1c1-9170-47dd-a0e9-9977f4e4349c",q.Spine_water_single_travel_04_json="cf2a3e86-1024-4f28-9afa-065437351bbc",q.Spine_weekly_challenge_bar_shine_json="22b27b76-f5b7-43e7-ac7c-d684bbd81aa9",q.Spine_weekly_challenge_bar_shine_narrow_json="b1ce8878-85ae-4de7-b78a-9e93cfbfae20",q.Spine_weekly_challenge_gear_splash_json="4b33100d-2eac-4626-8739-b6ccf65f51c9",q.Spine_widget_gold_back_glow_json="3c590432-e93a-4ded-9bbc-5df1b74e5ee5",q.Spine_widget_gold_curtains_json="52b4cc0c-3e71-4b94-a675-b5eb78da1836",q.Spine_win_streak_fx_json="08147bc7-1137-4834-b244-3747f2b272f0",q.Spine_wizbank_highlight_arrows_json="240127a1-6f6c-4bf5-b0d0-f8d3a7340dac",q.Spine_xp_stardust_json="feb77d5a-6b1e-4f2c-93ba-ef42bfe1d9d3",q.Spine_xpbar_json="35e6c8de-6c84-4070-81dd-d107aaf2449c",q.Starlight_wheel_ui_explosion_json="ae42147f-2626-452b-82ff-1b1c724ca2da",q.Storm_boss_18_json="1284e8c2-1f64-491d-80f9-c2d2a3b7152a",q.Ui_exclamation_point_json="adfb6f59-917d-4556-9dd1-6bc6e6592497",q.Vertical_dorm_149_json="c8fcb677-58c3-44c5-9a88-8b969dd7a3c9",q.Vertical_dorm_150_json="376f0dd1-3a79-4e5b-a130-a253df4f3d3e",q.Vertical_dorm_151_json="e97ff833-c9a5-482e-96b0-193f18994045",q.Vertical_dorm_164_json="c40bbcb5-e068-4918-a307-7f999a54b9b1",q.Vertical_dorm_169_json="45a1b43b-82de-4e5b-8b40-9c2f38dc1e38",q.Vertical_dorm_171_json="508f8f69-39f9-43d6-a967-3e95f4a30827",q.Vertical_dorm_182_json="bfba625d-606f-4074-ad3f-8227d6a90971",q.Vertical_dorm_187_json="b6a644fb-8606-4395-9578-34323b130f77",q.Vertical_dorm_202_json="194ad7e5-6c52-4b09-84a5-ad5cdcba126f",q.Vertical_dorm_204_json="84269f57-8130-4033-8cea-50f632ed0c7b",q.Vertical_dorm_206_json="fb457271-af4b-493a-8b86-bdef84f904bb",q.Vertical_dorm_213_json="ad58cb4e-07ef-45d3-8c02-ef18b226f58c",q.Vertical_dorm_228_json="94abe624-b7ed-4cb5-a5bf-88b4f055c84c",q.Vertical_dorm_235_json="be957dd8-1be1-4772-ad73-0ec86879d017",q.Vertical_dorm_236_json="d306b289-6418-4e4b-ac5a-384f6c7c9504",q.Vertical_dorm_242_json="eefb91d3-c32a-425c-bf2f-82b735f26a59",q.Vertical_dorm_247_json="de966ddc-43ee-44e6-b6eb-ddfb5f0007d5",q.Vertical_dorm_248_json="8aa786bd-7f9a-4286-ae9e-8d6c9095ef67",q.Vertical_dorm_249_json="02c10e9f-a3fc-412b-bdec-8e5d778ec0dc",q.Vertical_dorm_250_json="f397dec3-d99d-4cb8-b3f0-fa9e51117c4c",q.Vertical_dorm_251_json="408f9fec-2fc7-42ae-b3dc-51d363b3f2f3",q.Vertical_dorm_257_json="cd7d1d94-1384-4b64-814f-5568d8962fef",q.Vertical_dorm_273_json="d4ef92b6-8374-4840-8b41-6ff901a35dd6",q.Vertical_dorm_276_json="f3278cda-37b6-4158-91d9-9d816927dc65",q.Vertical_dorm_284_json="f987b2c7-8fce-4dd1-9aa5-852fe12ad2f7",q.Vertical_dorm_287_json="f935c283-a64b-40e7-b163-69912f5fb8d5",q.Water_boss_18_json="83754d21-6ea8-4c2c-8a01-a15317a5e90f",q.Wishie_mlp_json="68a39dbd-05d6-4964-935a-453b82aa1a02"}(Y||(Y={}))},47101:(q,K,z)=>{"use strict";var Y;z.d(K,{N:()=>Y}),function(q){q.Battle_academy_classroom_icetower_json="7d49da25-cd3e-454d-91ef-0a3b093d6797",q.Battle_academy_classroom_json="9fef2c8a-2ff5-4670-9588-7204f3c70691",q.Battle_academy_gh_stairs_json="1f3b1af5-5868-4801-b68b-5338e46c0014",q.Battle_academy_office_icetower_json="56774bcb-6165-4235-829e-d5558d1a231b",q.Battle_academy_office_json="7ce67cd8-aa5a-4efe-af8c-2fd128061016",q.Battle_archives_json="5d4d4526-8264-4db6-bd65-8d8be4868e2e",q.Battle_bonfire_inside_json="4f9b4c38-36d4-4dcc-83c3-aa39e345fd6c",q.Battle_bonfire_lava_json="545efb2b-e4e2-4797-927d-f5f0fadc1672",q.Battle_bonfire_outside_json="4908067d-bf10-48bd-9341-81ae43b755de",q.Battle_coliseum_outside_json="be143d35-4108-4619-9333-ef105a97d25e",q.Battle_forest_generic_json="29f4ad28-df74-4133-958f-12bbde4cc27f",q.Battle_forest_outside_json="62ae1ab1-881c-472f-bc99-7eb63564e017",q.Battle_lamplight_outside_json="f369358a-fdea-43c7-83e6-c1a5b1f3e467",q.Battle_lamplight_outside_pumpkinfest_json="087fd393-236a-4749-bdd7-dca2b7708960",q.Battle_lamplight_outside_starlight_json="9d7b7d41-fa35-41a7-af78-87398d3eeff1",q.Battle_lamplight_outside_winterfest_json="e30f311b-73b7-409c-8850-46f8ae854b3c",q.Battle_shipwreck_outside_json="19cbd9ec-281e-4fe3-80fc-72edfd2289ba",q.Battle_shipwreck_underwater_json="ef6a2f9a-5d14-4afd-8767-e34ca09db5ee",q.Battle_shiverchill_inside_json="9ee1391b-9efb-4898-ac14-7d0168d82825",q.Battle_shiverchill_outside_json="d0e470ef-38cc-4dc7-8259-ab85abd2cf5a",q.Battle_skywatch_inside_json="9b95d790-0d89-48dc-a95d-add23a4d3885",q.Battle_skywatch_outside_json="19a67124-2042-4cb6-a4b9-4a39c0d02002",q.Battle_tower_inside_json="0a2117f2-2b4e-463b-b22d-00e4b9404e03",q.Crystal_caverns_hub_json="67ec1606-d695-41ec-88ba-6876f7fe0d00",q.Crystal_caverns_phase_1_background_json="a1c2a605-dc9c-4f76-b363-bbeca6debfe9",q.Crystal_caverns_phase_1_foreground_json="364efa34-077f-4d8b-a3bc-0d7d2a6777c1",q.Crystal_caverns_phase_1_parallax_json="2e392de6-e42b-4458-ae71-287de0e58182",q.Crystal_caverns_phase_2_background_json="0759b3af-02fa-4370-ae7a-15d22f098faf",q.Crystal_caverns_phase_2_foreground_json="639a8a61-d3d5-4688-ae08-93a6c603ac7d",q.Crystal_caverns_phase_3_background_json="2bf362ab-3412-4271-acfa-d3910b5ad7fb",q.Crystal_caverns_phase_3_foreground_json="fa8fe6cf-9119-4e64-807e-de26623989d8",q.Map_academy_gh1_json="e368d1be-87e5-4430-b111-4c572c5bf5d2",q.Map_academy_gh2_json="7fac7cc0-b2ea-40ec-ab7a-8d7881a7ad85",q.Map_academy_gh3_json="66955673-b9fd-41c0-8f6e-5f6968635b0f",q.Map_academy_gh_landing1_json="8776e2d9-a129-4c22-91a9-a07641113f07",q.Map_academy_gh_landing2_json="18d3ebfe-6368-49df-8378-6209646ae4d9",q.Map_activity_zone_a1_json="6cf5e606-bc7f-4fc3-9ad0-00cda2115950",q.Map_activity_zone_a2_json="a24eb7dd-550c-4340-9958-4244e2591441",q.Map_activity_zone_b1_json="ceb89fa1-b2b5-4da6-a492-9404e3ae7b27",q.Map_activity_zone_b2_json="03655c7f-c72b-463b-93f3-d109d2ec4a04",q.Map_activity_zone_b3_json="77ec3144-7a26-4956-b9f7-fbe3410ec253",q.Map_activity_zone_c1_json="8bb9bd9f-8113-4fb7-966c-073a341a14ce",q.Map_activity_zone_c2_json="3ff46e9d-7cf2-4b06-a6da-1c45d91129a9",q.Map_archives_1_json="311dbf4a-b04a-48fe-a2a9-267e63beb953",q.Map_archives_2_json="44d9ddfa-22ce-4183-97db-501a18887620",q.Map_archives_3_json="89d5a130-6fa5-498e-8257-d33f6ed6b934",q.Map_archives_4_json="275353a0-87c9-4583-a276-072fdc6c1284",q.Map_archives_5_json="f3ae2e17-8f05-459f-8b62-91c0fa16427d",q.Map_archives_6_json="eeb51aca-74d2-40d0-81d6-204bcb6280ef",q.Map_archives_end_json="01a9311b-7cf6-4026-b028-730510f2007b",q.Map_archives_m1_json="d691783e-9b59-468b-9050-bbd2aa9d8cef",q.Map_archives_m2_json="6937feb7-cc3b-4336-bd43-1ae115460f8a",q.Map_archives_m3_json="ff2ad1f6-6321-429a-8e82-f16213a52f02",q.Map_archives_m4_json="77edf0e1-c08e-43ae-ad45-c4dc03ff139d",q.Map_archives_m5_json="89092716-a398-4cc1-a8d0-f0e842bf0f7b",q.Map_archives_m6_json="215616cc-65f2-4da3-98fe-9cca6386a647",q.Map_archives_m7_json="6585633a-8266-4743-a734-03646f2c4ccd",q.Map_archives_m8_json="736ec08d-5930-4a04-abe5-11a7cecc365e",q.Map_archives_m9_json="fdc1d768-c5c5-4b7f-8149-7e6764b0edc6",q.Map_bonfire_spire_a1_json="d12078ba-8fe3-4f4e-bc02-cb46fc26f3f2",q.Map_bonfire_spire_a4_json="cbdb465d-d4cc-43db-97b0-be7f202772d9",q.Map_bonfire_spire_b1_json="bc8ae623-0245-4eab-826c-04761cdb9c16",q.Map_bonfire_spire_b2_json="c2649e06-fb82-4bc8-9f73-8d7cc5db8b96",q.Map_bonfire_spire_b4_json="39599574-6a7b-4390-9ef6-083d7143ce62",q.Map_bonfire_spire_b5_json="dd594a6a-df51-4086-9bd6-9c70d508926c",q.Map_bonfire_spire_c1_json="a11d5293-ffc0-4f17-a0cc-8dce070aef82",q.Map_bonfire_spire_c2_json="302edc0c-4538-4427-8f9b-5ef8a1aaaf2a",q.Map_bonfire_spire_c3_json="fe6824a0-4108-473f-a655-b9e85784624d",q.Map_bonfire_spire_c4_json="83fcaf30-6470-474e-accb-104f49c3a992",q.Map_bonfire_spire_c6_json="a90760f6-6eae-47f6-88f8-bfc6d32aff74",q.Map_bonfire_spire_d1_json="e1f45bcc-ea11-40d5-bd64-92305402a869",q.Map_bonfire_spire_d2_json="96c0b5b5-592d-4315-b34e-476423793798",q.Map_bonfire_spire_d3_json="d0b6c992-94fa-49d9-8d6c-6529f1a8aaf6",q.Map_bonfire_spire_d4_json="8a16f2a1-7916-4a47-879a-eeca5bd69d31",q.Map_bonfire_spire_d5_json="9e34ab11-3be2-444c-8631-e84f650d25bb",q.Map_bonfire_spire_d6_json="419bca8c-c873-4695-ae4f-6b487dbfa996",q.Map_bonfire_spire_e5_json="503b5480-e931-4c57-8171-e06673329d8c",q.Map_bonfire_spire_e6_json="5cd6758d-d72f-4065-b431-06abc3436967",q.Map_bonfire_spire_titan_json="4ed1c250-e13a-42f9-9b49-040c5ff7c63d",q.Map_cloudzone_a0_json="13a81610-b279-4204-96be-89f52ada9289",q.Map_cloudzone_a1_json="ddabfca2-b147-40d0-a8c7-25f2a40da099",q.Map_cloudzone_b1_json="cc657f0a-5691-42a0-a80e-b147917d46b4",q.Map_cloudzone_b2_json="dd38895f-209a-4342-958f-33aa31e97c7a",q.Map_cloudzone_b3_json="fa0bd594-795c-42dc-a3ce-e60e2002e0b4",q.Map_cloudzone_c1_json="3531dedf-e8f2-452f-9c6a-21399d191fba",q.Map_cloudzone_c2_json="41d055f3-c052-4880-a9f5-221ca7e75285",q.Map_cloudzone_c3_json="fed3034d-73e3-435f-bb0f-270b1b31bfb3",q.Map_cloudzone_c4_json="79161e15-a752-4c37-b965-90847cdd4b92",q.Map_cloudzone_c5_json="e9ce0e15-6b4e-45b6-9301-d9beb0528fab",q.Map_cloudzone_d1_json="0b7cec16-769b-4309-8b8e-9a9f9a2da4be",q.Map_cloudzone_d2_json="78f761e9-8505-4df6-bf1b-36ffcdc1504d",q.Map_cloudzone_d3_json="ef7e35b2-7aa4-4324-9907-490f3a2c2637",q.Map_cloudzone_e1_json="5ab29754-ccf3-49b2-b579-ba3462ebc75d",q.Map_cloudzone_e2_json="de12de37-184f-4ca6-b594-6f5647fb50d3",q.Map_cloudzone_e3_json="26210f2e-5b07-4eb0-b3a1-cac5873c0a9e",q.Map_cloudzone_e4_json="7411bffa-00c9-412d-b5b8-bb9bfa31be9a",q.Map_cloudzone_e5_json="5e195979-4a63-46ec-a5f5-9f7a9ab64d8c",q.Map_darktower_a1_json="a62c4de0-5300-4317-a0a9-9598ac39b041",q.Map_darktower_a2_json="51efddc1-b4ab-4dcd-8ef1-3a661d2dc3d0",q.Map_darktower_a3_json="e12566fa-dc26-42dd-bda5-908c50dd36a6",q.Map_dragon_isle_a1_json="efb34781-2be6-4238-a552-c2d8b85f303d",q.Map_dyno_a0_json="d5ec0a21-90ec-445b-af1a-124353adc44e",q.Map_earth_tower_10_json="f6fb0da4-a3b1-47cb-ac4f-a2b915b65d5f",q.Map_earth_tower_11_json="65c450f0-d029-49ae-9144-b65e13a49af4",q.Map_earth_tower_12_json="d44fedf4-0696-4c30-a818-97f7454fe2fc",q.Map_earth_tower_13_json="f73470dc-4b50-4f69-9227-ee7efaaf8f95",q.Map_earth_tower_14_json="c6375e14-8644-43d2-9e2a-5f37a5cbb505",q.Map_earth_tower_15_json="e6f9f23c-0f15-4adf-bd9e-f1e17559100d",q.Map_earth_tower_1_json="cc77f431-ba69-4af1-b89c-dfc8f597daf6",q.Map_earth_tower_2_json="8e029ac4-4654-4c97-a05c-f0d1b6e72108",q.Map_earth_tower_3_json="3d275749-b660-4c6d-8a0a-4bf5be7b26b6",q.Map_earth_tower_4_json="e60ab106-eb77-4f9e-9976-438a70c53cda",q.Map_earth_tower_5_json="b5ff2b72-30da-4ce6-8087-70d19126d756",q.Map_earth_tower_6_json="f6861c24-801f-4fb9-aeca-0eca0525c4fa",q.Map_earth_tower_7_json="4122e07a-797a-4298-bc53-252533379922",q.Map_earth_tower_8_json="15d8bf9d-c300-48a9-b8d3-008c9bf1d454",q.Map_earth_tower_9_json="3ed1d40e-fcae-4bd4-bb5c-c4b5b42c732d",q.Map_earthtower_common_json="dccefce9-1c05-4c1f-bce6-257dd3d489da",q.Map_earthtower_entrance_exit_json="e78f6b6b-01f6-49c7-8709-bdafc999fdff",q.Map_earthtower_warden_json="1ab3cd34-4a81-4311-8921-9bdb508b5eb7",q.Map_forest_a3_json="0f9613a0-15b1-453c-ac95-caf71a6d2106",q.Map_forest_a4_json="be652e02-f73a-44e2-b7e8-80b4a004e81a",q.Map_forest_a5_json="ec3831e2-6820-4412-8909-258f218b086b",q.Map_forest_b5_json="df61688f-eb72-491b-bfb7-86ae6673f87a",q.Map_forest_b6_json="e73e186b-692e-4288-9266-b105a9243712",q.Map_forest_b7_json="ffde6bdc-56b3-494d-adde-3e4e68904377",q.Map_forest_b8_json="de33d472-2a90-42c6-8a92-18836f608563",q.Map_forest_c4_json="0636c558-1841-4a0c-a707-a3bc3e32b981",q.Map_forest_c7_json="237c6716-58e2-46b4-97da-4b1cbd134c0b",q.Map_forest_c8_json="91f4e20a-54e5-443c-9260-5a288944ef8c",q.Map_forest_d3_json="2d235c44-f3c0-47fa-88b2-e3ef17da226a",q.Map_forest_titan_json="5aaa3b75-0bdb-46bb-bff5-e9cc1939b8e9",q.Map_house_cool_cave_json="8aee8a68-806e-4485-a73b-159a6371f362",q.Map_house_cool_cave_unique_1_json="e4a32a1a-931b-4f81-a3e5-0c981726fd7b",q.Map_house_cool_cave_unique_2_json="030b5f0a-1d95-421c-9c39-8f101371016c",q.Map_house_exit_json="6e3821b0-137e-4c98-9f4c-cea9fb05ddae",q.Map_house_exterior_json="eb11b8eb-9559-49c9-9e21-61b775ecf3cd",q.Map_house_fire_pit_2_json="40a1b488-056a-4847-99f6-537261e90d23",q.Map_house_fire_pit_3_json="2e008042-f44b-4d68-a0dc-5fe07a3182e0",q.Map_house_fire_pit_json="dd47c602-abca-4135-be16-69fd063d8191",q.Map_house_forest_json="8994dae5-6ede-4258-9358-d2ca0fb42f92",q.Map_house_house_large_3_json="17971061-851a-46d8-8d66-1094b2cd1fa0",q.Map_house_house_large_4_json="6e77fe17-29f8-4fba-a8ff-5da649e54c34",q.Map_house_icecaves_json="5d34d393-6660-4837-81fc-8deeb1cbb61f",q.Map_house_large_0_json="963bb4e4-648d-4b80-b5b6-79b89bc0808f",q.Map_house_large_1_json="86b4384c-766e-4011-9ea8-cb09a81cd504",q.Map_house_medium_0_json="4e81e52c-8c63-4b04-bd7a-e598e2d97a4a",q.Map_house_medium_1_json="c779f818-7705-401e-b4a0-f5065262cd51",q.Map_house_small_0_json="69382cb8-511c-4e94-bfc1-bb7333f381b7",q.Map_house_small_1_json="9971dab3-54f1-4e26-bd7f-800d014441fc",q.Map_house_suburbs_json="99db977c-0fc5-474d-b6f1-dc139ee593ff",q.Map_house_treehouse_json="a92f25ef-1cef-4417-88fa-113ed219da5b",q.Map_house_treehouse_unique_1_json="a3628526-3c9a-44f7-8902-75c3640cd3b8",q.Map_house_treehouse_unique_2_json="3b796247-bec2-459e-ad29-a1b82cc28949",q.Map_ice_tower_10_json="98b3debe-07cd-4301-8ebe-742211db6c2d",q.Map_ice_tower_11_json="65da3846-69c9-4b19-9529-24498a76f894",q.Map_ice_tower_12_json="5724d45e-43c7-4d8f-90c0-0af2314e5340",q.Map_ice_tower_13_json="2adbc0ca-84c8-48c9-a5d0-7bcf669748ea",q.Map_ice_tower_14_json="45c49aea-da29-4da8-badd-f61893fa9679",q.Map_ice_tower_15_json="926ccfb4-3761-4c80-87d8-8c8699e0c9f7",q.Map_ice_tower_1_json="0e2f5edf-6efe-4b45-9dac-dea34ad33b48",q.Map_ice_tower_2_json="aeb695ff-0b35-4528-b17c-60276398c5fa",q.Map_ice_tower_3_json="f772bbae-e686-45fe-bf07-1a6cdb8d959c",q.Map_ice_tower_4_json="0bd5ab5f-010d-485a-a22a-ed7489ecf054",q.Map_ice_tower_5_json="c981753b-ba79-4216-aed3-7bb5842ddcde",q.Map_ice_tower_6_json="0e2bd8df-9e94-416f-9a7d-cfad65c00b5d",q.Map_ice_tower_7_json="247a9027-68d3-4ea1-88a3-706a5a5ed79d",q.Map_ice_tower_8_json="7abc5a4b-73b5-439a-98d5-3ae7fefbc875",q.Map_ice_tower_9_json="af8d4bf3-209b-41ae-96d2-d24038c7387a",q.Map_icetower_common_json="786d4027-d807-4f39-b094-c0896dd2567d",q.Map_icetower_entrance_exit_json="8006d32b-c9e8-4b23-8378-ea5892db1275",q.Map_icetower_warden_json="61372b71-e108-4ed4-b486-6b9425066a96",q.Map_lamplight_a1_springfest_json="6e6343a5-4b78-4cf8-93d3-26fd6fb76443",q.Map_lamplight_a2_json="dce42698-5575-4976-b648-569a3b948712",q.Map_lamplight_a2_pumpkinfest_json="82dabf44-94be-4058-a564-beec1d7e1ef4",q.Map_lamplight_a2_springfest_json="a0eafff5-da33-4ed4-b7e4-09b80b7637e3",q.Map_lamplight_a2_starlight_festival_json="a961eaa2-dfd4-4a2a-bb08-da9231bb36ad",q.Map_lamplight_a2_summerfest_json="99954158-5410-4018-aedf-e7597be0580e",q.Map_lamplight_a2_winterfest_json="4babc52a-18e5-4191-a3cc-81fa0f454f5e",q.Map_lamplight_a3_json="bfd9c837-cc31-426b-a1e3-edf0e3144e2a",q.Map_lamplight_a3_pumpkinfest_json="a1945e8f-3f41-4a83-acd2-7556768b797c",q.Map_lamplight_a3_springfest_json="afa5814c-1507-477d-afe5-6243e9e1ba29",q.Map_lamplight_a3_starlight_festival_json="68c65c8b-7a64-4a89-8304-6cf169034903",q.Map_lamplight_a3_summerfest_json="4b83b20b-6d90-495c-9577-ac8aec49e251",q.Map_lamplight_a3_winterfest_json="d2c65f0e-eaf2-40e6-84cd-d2ae29529455",q.Map_lamplight_a4_json="61263e6e-bfc9-4668-b2e8-881b76def550",q.Map_lamplight_a4_pumpkinfest_json="38153cdb-7771-43d9-acd7-c938b0b9aa6a",q.Map_lamplight_a4_starlight_festival_json="d02008b2-0110-44fb-8da6-60012bb63dba",q.Map_lamplight_a4_summerfest_json="40bd8b6e-7cf2-4164-84d2-956cc6aefd28",q.Map_lamplight_a4_winterfest_json="352ce646-9ee4-41c2-b181-6eadee3bbfd4",q.Map_lamplight_arena_lobby_json="b5624cc9-0c76-452b-bd1a-97138c13c80e",q.Map_lamplight_b0_json="32f78086-cb1c-4127-9978-6055559fd2b8",q.Map_lamplight_b0_pumpkinfest_json="dae98119-e6f6-4c07-8a93-1798a108bef5",q.Map_lamplight_b0_starlight_festival_json="d78de4de-8ef7-48c7-8528-9691447d68eb",q.Map_lamplight_b0_summerfest_json="c93f58ab-f9be-42ad-a958-7cc25328cabf",q.Map_lamplight_b0_winterfest_json="fb9f2c09-b2a3-4045-aade-77d4a1e0ce58",q.Map_lamplight_b1_json="8e811293-d379-41de-8720-c0049fa46362",q.Map_lamplight_b1_pumpkinfest_json="41c54c3b-e186-4fc5-bca7-76ded96fde5e",q.Map_lamplight_b1_starlight_festival_json="4279fa93-7996-4769-8079-5d14794c86b5",q.Map_lamplight_b1_summerfest_json="bccbf96b-2e1c-4832-9ee5-e85bee48f881",q.Map_lamplight_b1_winterfest_json="de3f41c5-5e8d-44b9-8049-991713e53204",q.Map_lamplight_b2_json="ceb45405-70a7-4f5f-8f5c-2a89cc10798e",q.Map_lamplight_b2_pumpkinfest_json="34e060a2-9a81-46c8-8b39-700b41b80bf2",q.Map_lamplight_b2_springfest_json="04b68c4b-3989-429e-9188-9c92a00d7956",q.Map_lamplight_b2_starlight_festival_json="be9cf36e-87e9-4f5a-9870-f0573e74cac0",q.Map_lamplight_b2_summerfest_json="f1d33a4f-d3fb-4f63-bdb8-90875ed157d5",q.Map_lamplight_b2_winterfest_json="9dacdf6b-b677-4847-9209-1e3edb965630",q.Map_lamplight_b3_json="7a915a22-7467-44fe-b0a5-68040ae1dc82",q.Map_lamplight_b3_pumpkinfest_json="f9856954-5342-48e7-b0a1-151c3c27bb9d",q.Map_lamplight_b3_springfest_json="a9f9cde3-4e9e-4bd3-8008-fd32ad23360c",q.Map_lamplight_b3_starlight_festival_json="19e6656b-2a3d-4daf-9777-44ffe76b6c71",q.Map_lamplight_b3_summerfest_json="ca0f361f-ba47-4361-bf6d-9143f42c98ed",q.Map_lamplight_b3_winterfest_json="b945731b-7547-4256-b2da-c85818458c7d",q.Map_lamplight_b4_json="d8e18060-6beb-45df-b1a8-118f67475439",q.Map_lamplight_b4_pumpkinfest_json="df1968b8-c265-4707-b8e9-dae14edea36d",q.Map_lamplight_b4_springfest_json="b4080056-1d32-4c8d-a560-37e551fff5f8",q.Map_lamplight_b4_starlight_festival_json="56441d64-8ac6-433b-af84-3a78de66a668",q.Map_lamplight_b4_summerfest_json="f1f14e7d-b33d-4d6b-b52a-f217303dcc7a",q.Map_lamplight_b4_winterfest_json="b7a1d9d4-7b88-4ece-83a8-54bba771225d",q.Map_lamplight_b5_json="647188fe-8c93-4c61-bf53-23240caa0e2d",q.Map_lamplight_b5_pumpkinfest_json="96ae4ae5-4e35-4a24-8410-5b7b8472683a",q.Map_lamplight_b5_starlight_festival_json="9729a2ed-918b-4933-98c5-6dd472fdb980",q.Map_lamplight_b5_summerfest_json="0ad330f9-7108-4994-82fb-039b5ed82fab",q.Map_lamplight_b5_winterfest_json="b7aad8f1-01e8-4c22-8f02-0231fdfc50e5",q.Map_lamplight_c1_json="0580bd3c-2fa0-4fa1-bbea-823f0bbeb306",q.Map_lamplight_c2_json="cd85ee5b-1eb5-47db-9287-8037e5b74973",q.Map_lamplight_c2_pumpkinfest_json="ed9156f1-593e-457f-854a-a749b4bdae61",q.Map_lamplight_c2_springfest_json="3ba57b9e-dc6b-40ba-92bc-73161b629fa3",q.Map_lamplight_c2_starlight_festival_json="637b3d70-59ee-4de5-ac4f-b59c2de065bf",q.Map_lamplight_c2_summerfest_json="1dc6d0ac-e716-4b98-bd23-aaa1e487f73c",q.Map_lamplight_c2_winterfest_json="9f155a71-5df6-4b50-bf5d-ba0fb3ac8f8e",q.Map_lamplight_c3_arena_json="64471176-0054-4f42-8987-9a1562770093",q.Map_lamplight_c3_json="e385a4f0-8957-457b-8221-7764dd7bfff1",q.Map_lamplight_c3_pumpkinfest_json="193f3dc3-263b-4d19-abdc-efdef4530e9f",q.Map_lamplight_c3_springfest_json="f2f105f7-fce2-4ade-b12f-f15dbfe1d62f",q.Map_lamplight_c3_starlight_festival_json="215ad692-55ab-4ea3-9ce3-9e44dd15df1e",q.Map_lamplight_c3_summerfest_json="2445d1e5-c0f8-4918-ae71-9d6827e9f52f",q.Map_lamplight_c3_winterfest_json="e5812a74-8a81-4872-817b-8173876d3fe8",q.Map_lamplight_c4_json="1e589d19-1816-4c5f-b13c-fd2cb2750cb7",q.Map_lamplight_c4_pumpkinfest_json="9f521645-64b3-4258-a067-e861246b6794",q.Map_lamplight_c4_springfest_json="2c4819b0-d497-4d28-8d4a-31cf492ca4eb",q.Map_lamplight_c4_starlight_festival_json="77581531-9f9c-4811-aa99-bb7bd8c770ab",q.Map_lamplight_c4_summerfest_json="4d80ca6c-00ac-4421-b946-d7f80b85f8ac",q.Map_lamplight_c4_winterfest_json="b808a71b-fcfc-4f8e-9366-6035296c128f",q.Map_lamplight_coliseum_json="295c36f9-d284-409c-9f9f-1340f09b9c0f",q.Map_lamplight_d3_springfest_json="9d93ce95-7824-437a-a474-f7cbe156f9e7",q.Map_moon_a1_json="98c8873f-cbf3-471e-b7b3-5f07b72597d1",q.Map_moon_b1_json="717ffcfc-1186-465e-adaa-88b4ca207a94",q.Map_moon_c1_json="e7cdd83d-76b0-416d-b037-58a1e0c3bba9",q.Map_moon_d1_json="37773050-b869-4531-95f3-f8119583b672",q.Map_moonlight_a2_json="4b411022-9f2f-41ed-a6ce-bd3aaf229d0c",q.Map_moonlight_a3_json="52173e05-da54-4526-ba44-5e2913387fdf",q.Map_moonlight_a4_json="2171b9c4-6217-4012-bc90-72988f023e8d",q.Map_moonlight_b0_json="60b92e5f-3e1f-41f9-bd61-6dbbf291dd98",q.Map_moonlight_b1_json="5a2ca7a2-6667-4533-9029-87c0a762d64b",q.Map_moonlight_b2_json="bd7320db-bfd1-4f65-a87d-cab576787cc6",q.Map_moonlight_b3_json="6c3a5c2e-2f1b-4e66-ad58-29c2db3ee6cb",q.Map_moonlight_b4_json="8006fb7b-645b-4fd9-8380-bd10760ddd2e",q.Map_moonlight_b5_json="a78feb3c-019f-44c6-ad34-1160574bd21b",q.Map_moonlight_c1_json="39ff980a-55bb-4f88-947d-2a19aeebf6e8",q.Map_moonlight_c2_json="3d046ff2-39fd-41a5-9fa9-4ada9be70ffe",q.Map_moonlight_c3_json="42d4fcf6-fee5-48d7-9147-ba9a6aafe728",q.Map_moonlight_c4_json="fc87db94-e007-4050-b725-7a6e3601b026",q.Map_pathing_json="ad74b143-ef72-4083-ab46-d26a78c635ae",q.Map_shipwreck_shore_a1_json="bec0fc58-9498-41d0-8ada-45d417b75ec3",q.Map_shipwreck_shore_a2_json="7828b92d-12f3-4cce-95d9-adfaae779b39",q.Map_shipwreck_shore_a3_json="74c29f00-0b9f-4d8b-b2ca-d5eb7202b2c9",q.Map_shipwreck_shore_a4_json="e8b71722-1d60-4151-a0ba-91d39c463c7e",q.Map_shipwreck_shore_a5_json="7ce77ade-9350-4373-94a1-4d4ed5699bb1",q.Map_shipwreck_shore_a7_json="3fa802db-97ff-4dbb-b2b4-c76feda8da48",q.Map_shipwreck_shore_b10_json="1a935356-f241-4326-9ac9-74e173f45aff",q.Map_shipwreck_shore_b11_json="fe0144bb-89f7-4eca-96b2-68c497aa8054",q.Map_shipwreck_shore_b12_json="4aebd662-3bca-4d9a-b924-400ac15b7900",q.Map_shipwreck_shore_b13_json="f1459839-5d3e-4aaa-a0d5-bd0d37ba51c5",q.Map_shipwreck_shore_b2_json="fbd11b50-3a91-4724-b61e-894346ef61a5",q.Map_shipwreck_shore_b4_json="b0458fc9-6b21-40b6-81b6-912a11da6728",q.Map_shipwreck_shore_b5_json="f5029804-c0c0-4e9f-9627-c4df9304c396",q.Map_shipwreck_shore_b6_json="ac6a0b84-a791-4344-9057-b92cdccf4e0d",q.Map_shipwreck_shore_b7_json="2b185475-f2cd-4ffc-9b7d-6ad5fe0af712",q.Map_shipwreck_shore_b8_json="b32775d2-a9d4-481f-840d-5e479aff59a6",q.Map_shipwreck_shore_c10_json="2ff7db73-56df-41e1-a209-4cce4a069c77",q.Map_shipwreck_shore_c11_json="4f2a8777-504e-4dee-b0fe-4e6799e220bc",q.Map_shipwreck_shore_c12_json="5efd7fe7-f0b8-42e4-8f87-4a938009f84c",q.Map_shipwreck_shore_c6_json="4aed6f9b-7835-40e5-bb0f-8a82c8deee1d",q.Map_shipwreck_shore_c7_json="ae454cb2-5374-4eb5-b6df-35d19ec2ce8a",q.Map_shipwreck_shore_c8_json="ef0bbe73-7fdb-49dd-b30c-520f6434cfb5",q.Map_shipwreck_shore_c9_json="98b2032d-5b74-4f77-b656-5f9c690ab3f9",q.Map_shipwreck_shore_titan_json="1c37b8a2-452e-4b05-81b7-807f328e6695",q.Map_shiverchill_a10_json="cdabef39-c9bb-47e9-bcbf-f00277b3dfc9",q.Map_shiverchill_a11_json="1a34be63-f9c1-4d96-b3b5-6889e832832b",q.Map_shiverchill_a2_json="edba1fdc-0d0e-45ce-850b-ff83541d9b55",q.Map_shiverchill_a3_json="bfd5c27c-e0c8-4c8d-a412-b778aa233071",q.Map_shiverchill_a4_json="1c6760f4-0e81-4fc9-9a6b-73cb45da0071",q.Map_shiverchill_a5_json="c5df7827-ecf4-49bb-8747-2e8752a6ce92",q.Map_shiverchill_a6_json="f2d082d1-52b2-4946-adab-df924380347a",q.Map_shiverchill_a7_json="4b29995f-c861-48da-9dab-745e7587c12d",q.Map_shiverchill_a9_json="30a852bc-98dd-459f-836a-b95fd7d0bb74",q.Map_shiverchill_b10_json="5c7ca665-e511-4484-8efd-ab57c80a7335",q.Map_shiverchill_b1_json="151a0cab-965f-4c29-b2a9-67f72ad02ae4",q.Map_shiverchill_b2_json="54da27d7-cfea-4113-ac75-5890faf8c4f2",q.Map_shiverchill_b3_json="19ac3604-1bbb-4b61-93de-e87836cfe63d",q.Map_shiverchill_b6_json="486e7b36-c4d7-417a-b7f1-58aa3148538c",q.Map_shiverchill_b7_json="adeb5b70-e9bb-45ca-8cf6-aa34867555d1",q.Map_shiverchill_b8_json="275892c1-37f0-4c5a-bb7e-105be4dc9401",q.Map_shiverchill_b9_json="cbfc5029-bebc-4836-a62c-1dda4e79ec38",q.Map_shiverchill_titan_json="464e035a-5fc1-4d89-ad75-de065061ad48",q.Map_skywatch_titan_json="bf21572c-1080-4e3e-9390-0d5ba3770888",q.Map_springfest_grotto_a3_json="b9752a87-c7dc-4342-b0e8-4fa103714f82",q.Map_springfest_grotto_a9_json="ad4769f4-ebb5-4dab-a52b-ccc13a72184f",q.Map_springfest_grotto_b2_json="82fde97e-35f9-4355-bf9c-bc4da0f82a0c",q.Map_springfest_grotto_b7_json="66b3b0ef-b029-4507-91e5-8e1185dcddf1",q.Revamp_battle_academy_classroom_icetower_json="bf36ed9d-a1bd-4bc6-8e07-dc2e9deb9bc2",q.Revamp_battle_academy_classroom_json="c2efc300-2e72-48d8-b646-e7c14b85fd63",q.Revamp_battle_academy_gh_json="b9aed696-a108-4316-8077-3defba917de6",q.Revamp_battle_academy_gh_stairs_json="4123602a-6dd1-4725-b802-58d05ff2d347",q.Revamp_battle_academy_office_icetower_json="5e70d317-5751-462f-98b7-e9f30afbe201",q.Revamp_battle_academy_office_json="dd1bdac4-6044-465f-8fbf-7daf26e2fe1e",q.Revamp_battle_archives_json="e15c44a9-c33f-40bc-a642-ca66f95d60e2",q.Revamp_battle_bonfire_inside_json="e3c28dc8-7dcb-44ff-a608-fd590f3fa845",q.Revamp_battle_bonfire_lava_json="a647e914-8b32-4922-b9e5-ae978a730206",q.Revamp_battle_bonfire_outside_json="dec06b03-e1bf-436d-9851-9146a4704995",q.Revamp_battle_forest_generic_json="33bc6173-8b90-4551-a073-f1d151435556",q.Revamp_battle_forest_outside_json="fefa5d15-5bc4-4f9a-bebb-3b73f2790130",q.Revamp_battle_lamplight_outside_json="a24c0a86-53dd-4cd6-b9fd-2b63e0339ea0",q.Revamp_battle_lamplight_outside_pumpkinfest_json="f6ce851b-7496-489d-a349-8ae89e8c69bc",q.Revamp_battle_lamplight_outside_starlight_json="d3ca4b14-fc38-4bbb-a796-c49304887694",q.Revamp_battle_lamplight_outside_winterfest_json="bc3d2d9d-7241-4312-9d00-8db6707b88ea",q.Revamp_battle_shipwreck_outside_json="db312186-2056-428a-9b55-2d9c06600ceb",q.Revamp_battle_shipwreck_underwater_json="0f426554-dd99-4c93-9aab-a72c55a6e247",q.Revamp_battle_shiverchill_inside_json="0c099d65-b1ce-4f12-bfb1-12af03b99690",q.Revamp_battle_shiverchill_outside_json="8ecc5bfc-7caa-4619-a85c-ba4f784beafa",q.Revamp_battle_skywatch_inside_json="52e7e267-cba9-49e0-a2ae-10ebdc9c2205",q.Revamp_battle_skywatch_outside_json="c9aba10f-0723-480e-9ed3-ff4806b70b50",q.Towertown_1up_json="821c2dcb-30c5-41d9-9dce-6c7757a133e3",q.Towertown_1up_tut_sub_json="ea1e712e-d900-4498-8f4b-d51e9cf30b4e",q.Towertown_2up_json="4ae09d06-ba26-4c60-b877-974b2d7692bc"}(Y||(Y={}))},84317:(q,K,z)=>{"use strict";var Y;z.d(K,{t:()=>Y}),function(q){q.Tileset_UI_png="1397a747-efdf-46cb-b219-ab7afea40a64",q.Tileset_academy_png="dfaca806-4f30-447f-9296-3d4c0ddca7f5",q.Tileset_academy_sup_png="359de525-b71b-4a5f-8387-ecf876420d68",q.Tileset_ancient_ruins_png="7a290c41-fbcc-41c2-bdc1-b080be93ed84",q.Tileset_archives_png="ef9f43ac-08db-418b-b39c-84757b9cc69c",q.Tileset_arena_bronze_png="c623c8b8-5f9d-448c-91f6-97d00947da9a",q.Tileset_arena_gold_night_png="49b0f7e9-9aed-4abd-9460-fbd621cadde1",q.Tileset_arena_gold_png="982ff829-3774-46a7-98ba-e8b9b356331e",q.Tileset_arena_silver_png="3604dbbb-bd44-4eee-84ec-e9da7985f562",q.Tileset_bonfire_png="5ffb004d-4278-48a0-bd1f-fd460b5dacbc",q.Tileset_classroom_firefly_png="ca2c3487-f094-4d19-b44f-147dd646bad7",q.Tileset_classroom_ice_png="0f1daa1c-7f98-4df8-b7e5-730ba9188b17",q.Tileset_classroom_png="e04c76f6-98fc-4267-ac72-387848f1c20b",q.Tileset_classroom_shiverchill_png="178d5c50-efa6-4590-8507-3b0bca7c7dda",q.Tileset_cloud_new_png="68e18d2c-a3dd-45c0-92ab-8ad9770eee88",q.Tileset_cloud_no_collisions_png="4f357cd9-056b-417b-baa6-344636e4651a",q.Tileset_cloud_png="833af31b-c3b3-4424-af2e-c96f3fdc407f",q.Tileset_collisions_png="246f9a54-ba28-4575-bb5d-03612f6bf81c",q.Tileset_darktower_png="8d229484-b7d6-485b-ac37-b0bcc1173ef0",q.Tileset_dragonisland_exterior_png="71bb74dc-4e4b-4bae-a055-aee3d7e356dc",q.Tileset_dragonisland_waterfall_png="64ba2351-501c-4744-98bf-ba40933da056",q.Tileset_exterior_general_png="fb19d855-764a-44af-a08a-d29b2f08b4db",q.Tileset_firefly_new_night_png="2d99c5d6-c502-48cf-b0ba-380e656d7cbb",q.Tileset_firefly_new_png="cea33c56-b89a-49dd-ac3c-b4998ca49d82",q.Tileset_firepit_png="c7f4d0f3-c856-4e4f-8335-6ac29489f19c",q.Tileset_forest_new_night_png="72f6597c-10a9-47e8-95fd-1bbc6901e780",q.Tileset_forest_new_png="0e5daa52-24ac-4045-9425-db4ab20b6e96",q.Tileset_forest_png="032440a2-9e11-4118-a258-52b541096fbc",q.Tileset_generic_moonfest_night_png="3d5fa3d6-a84c-4925-a6ae-18aeca404e07",q.Tileset_generic_new_night_png="ec108c59-99ac-4184-af87-8a602f1cc96e",q.Tileset_generic_new_png="7c6386ba-52c0-44ad-9a0d-54da3fccbb9c",q.Tileset_generic_png="16918ba8-4539-42cf-956f-09c71d6ac905",q.Tileset_generic_snow_png="abd6f8ab-d0b9-4d7e-86a2-8c6f65d8944e",q.Tileset_grotto_springfest_png="cdab57ce-0b92-434f-bb35-ddf1dc2dc413",q.Tileset_icecave_new_png="039df322-0618-4e4f-9233-745da57fc9da",q.Tileset_icecave_png="a8ae4050-c105-4e35-a3a8-97af719cedd0",q.Tileset_iceruins_png="d497a024-d0a2-45aa-a0b4-4c48952e875c",q.Tileset_infinity_tower_construction_png="f2ab6689-c522-4253-8f87-059e10397131",q.Tileset_interior_general_png="94d1d1f4-30eb-47ad-a6f8-8992714591b2",q.Tileset_interior_icecave_png="13e4bab5-eb18-49b8-b670-5f977e37628c",q.Tileset_interior_png="d4546866-fd36-415c-9785-a87bad977a68",q.Tileset_interior_treehouse_png="686754cd-f8ad-4a66-a2c1-7ea301652456",q.Tileset_minecarts_png="ef4ee67f-ab2d-438b-9058-a0eb075de0c6",q.Tileset_moon_exterior_png="b26d6483-0403-428f-8e9f-13813d233932",q.Tileset_moon_interior_png="43eb8a78-2f00-47d2-b463-79e9c5aa457f",q.Tileset_moonlight_extras_night_png="6829c578-7def-4abd-82a3-ac4c2fe4613f",q.Tileset_outside_png="ddf7610e-e83f-41ad-a642-680298802ed0",q.Tileset_outsidesnow_png="d3806833-c510-49c7-941c-8fdedba8bb1b",q.Tileset_railruins_png="280da4e9-2d2d-4ba8-b40c-1c4359e8fb28",q.Tileset_ship_exterior_png="09ae8073-3334-4fec-b84e-dafb09668420",q.Tileset_ship_interior_png="e6183cf5-c5d9-4982-bbd2-dad8a54a0901",q.Tileset_shiverchill_exterior_png="a1ba7f57-e537-46e5-8160-2ba8910ba7de",q.Tileset_shiverchill_footsteppath_png="168e2732-ab26-4e6a-89c6-cfcaa9e4e62a",q.Tileset_shiverchill_interior_png="ec6c712b-8866-4370-bda6-dc7cad31a703",q.Tileset_shiverchill_png="81d9ae1f-f2dc-4ff6-b866-6e773e730305",q.Tileset_shiverchill_rails_png="b5848154-d97f-4b12-9f5f-c1a0d8933aaa",q.Tileset_skies_new_png="e1aa8afc-3dd9-4749-ba63-7aa327005900",q.Tileset_skywatch_buildings_png="c7455906-0e6e-4a8c-a15b-c7362ca93501",q.Tileset_skywatch_factory_png="6415e23e-c4ed-4852-8279-ff810b39a4f3",q.Tileset_skywatch_png="46b3694d-d219-4163-9e99-29770533ac29",q.Tileset_space_background_png="f9792203-daf6-4792-ac81-a4d55b633aa4",q.Tileset_springfest_png="161ae087-1633-44e7-98c0-8171818bc692",q.Tileset_towertown_basic_png="541c640e-7ac1-4e4f-a4fd-e27a08bff5e2",q.Tileset_town_december_png="7fa641db-d014-401c-8f59-a6eb8cef8ff2",q.Tileset_town_moonfest_night_png="9a11b628-4b4a-469d-9a7d-463ddbce4579",q.Tileset_town_new_night_png="2232dd58-c29b-4b41-b506-015cec056bae",q.Tileset_town_new_png="0e1d3b5e-c4b8-49b1-9314-577a1bc53370",q.Tileset_town_november_night_png="68066241-dc49-4a6b-9b64-5191cde677f0",q.Tileset_town_november_png="ed7b770b-f3cd-424d-bf0d-a0bb70a26008",q.Tileset_town_october_night_png="74b5c47c-4a8d-494e-990c-4ce099d209a9",q.Tileset_town_october_png="4b7bf187-1e50-497b-8211-23eccefa19e4",q.Tileset_town_png="4697235d-97c6-49d7-a3fe-a9a8409a8d93",q.Tileset_town_summerfest_png="ac55de45-af6a-4fde-b362-ff3eb7977c3e",q.Tileset_tutorial_subspace_png="0a34ab36-b86c-4521-aa95-13cb44c7156d",q.Tileset_twilight_arcade_png="700dde1a-1d41-47c0-9484-e9324b56118b",q.Tileset_volcano_new_png="ae2f7959-e7cb-479c-ad53-92401bf4ac2c",q.Tileset_volcano_png="83448b36-2ce8-4062-99db-e12b35fe6e68",q.Tileset_wall_collisions_png="a6ff3c98-bb92-480f-8a2b-d9c0efe00730",q.Tileset_water_new_png="4adfca05-a4e7-4c5d-8f17-b448377bbdbe"}(Y||(Y={}))},54300:(q,K,z)=>{"use strict";var Y;z.d(K,{p:()=>Y}),function(q){q["dragonOrb-1"]="0cc2bfa1-9b87-4572-9ac1-b832daff107b",q["dragonOrb-2"]="f79d74cc-3069-4587-a6ff-72b8ebb03593",q["dragonOrb-3"]="7a710425-cad8-4020-8f18-ca316963027f",q["dragonOrb-4"]="9541cc6a-b4e8-4e11-a65b-de6fde686d24",q["riftRunKey-1"]="d356ddb2-7802-4be8-9d38-a6f83f62621b",q["riftRunKey-2"]="765f1557-dc57-47e3-b53a-360d3383fb69",q["riftRunKey-3"]="fa2ac725-959d-427a-b50f-ef5e43f8b9c8"}(Y||(Y={}))},88818:(q,K,z)=>{"use strict";var Y,Q,X,Z;z.d(K,{$6:()=>tt,Cj:()=>X,Q2:()=>Y,VE:()=>Z,e9:()=>J,yG:()=>et}),function(q){q.Attack="attack",q.Attack2="attack2",q.DanceDab="dance-dab",q.DanceMoonwalk="dance-moonwalk",q.DanceRunningman="dance-runningman",q.Dig="dig",q.Idle="idle",q.IdleHeavy="idle-heavy",q.IdlePose="idle-pose",q.IdleToPetInteract="idle-to-pet-interact",q.PetInteract="pet-interact",q.Static="static",q.Walk="walk"}(Y||(Y={})),function(q){q.Cast="cast"}(Q||(Q={})),function(q){q.Shadow="shadow",q.HairLPigtails="hair-L-pigtails",q.HatBack="hat-back",q.HairBun="hair-bun",q.HairBackLong="hair-back-long",q.HairBack="hair-back",q.Cape="cape",q.SleeveLSkin="sleeve-L-skin",q.SleeveL="sleeve-L",q.GloveLHandSkin="glove-L-hand-skin",q.GloveLHand="glove-L-hand",q.HairBehind="hair-behind",q.Weapon="weapon",q.Tail="tail",q.Back="back",q.GloveLFingersSkin="glove-L-fingers-skin",q.GloveLFingers="glove-L-fingers",q.LegLSkin="leg-L-skin",q.LegL="leg-L",q.BootLSkin="boot-L-skin",q.BootL="boot-L",q.Hip="hip",q.LegRSkin="leg-R-skin",q.LegR="leg-R",q.BootRSkin="boot-R-skin",q.BootR="boot-R",q.PauldronL="pauldron-L",q.HatMiddle="hat-middle",q.Neck="neck",q.Torso="torso",q.Belt="belt",q.Chest="chest",q.SleeveRSkin="sleeve-R-skin",q.SleeveR="sleeve-R",q.Collar="collar",q.GloveRSkin="glove-R-skin",q.GloveRWrist="glove-R-wrist",q.GloveRHand="glove-R-hand",q.Necklace="necklace",q.FaceLower="face-lower",q.FaceUpper="face-upper",q.EyeLWhite="eye-L-white",q.EyeLIris="eye-L-iris",q.EyeLOutline="eye-L-outline",q.EyeLBlink="eye-L-blink",q.EyeRWhite="eye-R-white",q.EyeRIris="eye-R-iris",q.EyeROutline="eye-R-outline",q.EyeRBlink="eye-R-blink",q.Mouth="mouth",q.Nose="nose",q.EyebrowR="eyebrow-R",q.EyebrowL="eyebrow-L",q.ExpressionFace="expression-face",q.HairInfront="hair-infront",q.HairShort="hair-short",q.HatFace="hat-face",q.HairRPigtails="hair-R-pigtails",q.PauldronR="pauldron-R",q.HatFront="hat-front",q.ExpressionUpper="expression-upper"}(X||(X={})),function(q){q.Back="back",q.Belt="belt",q.BootL="boot-L",q.BootLSkin="boot-L-skin",q.BootR="boot-R",q.BootRSkin="boot-R-skin",q.Cape="cape",q.Chest="chest",q.Collar="collar",q.ExpressionFace="expression-face",q.ExpressionUpper="expression-upper",q.EyeLBlink="eye-L-blink",q.EyeLIris="eye-L-iris",q.EyeLOutline="eye-L-outline",q.EyeLWhite="eye-L-white",q.EyeRBlink="eye-R-blink",q.EyeRIris="eye-R-iris",q.EyeROutline="eye-R-outline",q.EyeRWhite="eye-R-white",q.EyebrowL="eyebrow-L",q.EyebrowR="eyebrow-R",q.FaceLower="face-lower",q.FaceUpper="face-upper",q.GloveLFingers="glove-L-fingers",q.GloveLFingersSkin="glove-L-fingers-skin",q.GloveLHand="glove-L-hand",q.GloveLHandSkin="glove-L-hand-skin",q.GloveRHand="glove-R-hand",q.GloveRSkin="glove-R-skin",q.GloveRWrist="glove-R-wrist",q.HairBack="hair-back",q.HairBackLong="hair-back-long",q.HairBehind="hair-behind",q.HairBun="hair-bun",q.HairInfront="hair-infront",q.HairLPigtails="hair-L-pigtails",q.HairRPigtails="hair-R-pigtails",q.HairShort="hair-short",q.HatBack="hat-back",q.HatFace="hat-face",q.HatFront="hat-front",q.HatMiddle="hat-middle",q.Hip="hip",q.LegL="leg-L",q.LegLSkin="leg-L-skin",q.LegR="leg-R",q.LegRSkin="leg-R-skin",q.MouthA="mouth-A",q.MouthClose="mouth-Close",q.MouthSmile="mouth-smile",q.MouthYeah="mouth-yeah",q.Neck="neck",q.Necklace="necklace",q.Nose="nose",q.PauldronL="pauldron-L",q.PauldronR="pauldron-R",q.Shadow="shadow",q.SleeveL="sleeve-L",q.SleeveLSkin="sleeve-L-skin",q.SleeveR="sleeve-R",q.SleeveRSkin="sleeve-R-skin",q.Tail="tail",q.Torso="torso",q.Weapon="weapon"}(Z||(Z={}));const J=[["mouth-A",["mouth"]],["mouth-Close",["mouth"]],["mouth-smile",["mouth"]],["mouth-yeah",["mouth"]]],tt=[["mouth","mouth-Close"]],et=new Map([["back",[1157,0,118,104]],["belt",[1310,2,78,22]],["boot-L",[1694,217,37,38]],["boot-L-skin",[1690,76,38,38]],["boot-R",[1694,178,37,38]],["boot-R-skin",[1692,37,38,38]],["cape",[969,8,81,92]],["chest",[1436,8,41,40]],["collar",[1729,83,91,35]],["expression-face",[1055,105,133,150]],["expression-upper",[1189,105,133,150]],["eye-L-blink",[681,2,19,9]],["eye-L-iris",[1694,119,20,20]],["eye-L-outline",[108,4,23,30]],["eye-L-white",[167,5,19,29]],["eye-R-blink",[658,1,22,10]],["eye-R-iris",[1715,119,20,20]],["eye-R-outline",[72,4,35,30]],["eye-R-white",[132,5,34,29]],["eyebrow-L",[1651,7,27,25]],["eyebrow-R",[1276,1,33,23]],["face-lower",[1051,15,105,85]],["face-upper",[572,8,85,63]],["glove-L-fingers",[36,1,35,33]],["glove-L-fingers-skin",[0,1,35,33]],["glove-L-hand",[1610,19,40,40]],["glove-L-hand-skin",[1705,0,38,36]],["glove-R-hand",[1649,74,40,40]],["glove-R-skin",[1651,33,40,40]],["glove-R-wrist",[1694,140,38,37]],["hair-L-pigtails",[0,35,92,220]],["hair-R-pigtails",[93,35,92,220]],["hair-back",[1603,115,90,140]],["hair-back-long",[734,89,144,166]],["hair-behind",[879,101,175,154]],["hair-bun",[1457,107,72,148]],["hair-infront",[1490,1,119,105]],["hair-short",[772,1,117,87]],["hat-back",[186,72,200,183]],["hat-face",[1323,105,133,150]],["hat-front",[387,72,200,183]],["hat-middle",[588,72,145,183]],["hip",[1389,3,46,45]],["leg-L",[1610,60,38,54]],["leg-L-skin",[1451,50,38,54]],["leg-R",[1412,49,38,55]],["leg-R-skin",[1373,49,38,55]],["mouth-A",[722,2,21,12]],["mouth-Close",[701,3,18,8]],["mouth-smile",[214,27,15,7]],["mouth-yeah",[734,72,19,16]],["neck",[187,6,26,28]],["necklace",[186,35,43,36]],["nose",[1679,7,25,25]],["pauldron-L",[722,15,49,56]],["pauldron-R",[658,12,63,59]],["shadow",[272,5,177,66]],["sleeve-L",[230,4,41,67]],["sleeve-L-skin",[450,5,41,66]],["sleeve-R",[532,7,39,64]],["sleeve-R-skin",[492,7,39,64]],["tail",[1276,25,96,79]],["torso",[890,4,78,96]],["weapon",[1530,110,72,145]]])},10471:(q,K,z)=>{"use strict";z.d(K,{B:()=>Q,h:()=>Y});const Y=[27],Q=Y.concat([28,29,30])},46791:(q,K,z)=>{"use strict";z.d(K,{a:()=>Y});const Y=(0,z(77601).gb)({key:"members-get-7-levels",default:{enabled:!1}})},96703:(q,K,z)=>{"use strict";z.d(K,{K:()=>Y});const Y=(0,z(77601).gb)({key:"after-school-widget",activateAssociatedExperiments:1,default:{enabled:!1}})},44751:(q,K,z)=>{"use strict";z.d(K,{m:()=>Y});const Y=(0,z(77601).gb)({key:"arcadia-zone-in-math-rpg",activateAssociatedExperiments:0,default:{enabled:!1},evaluate:(q,K)=>({enabled:q.enabled&&!K.onMobileApp})})},59685:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{D:()=>Q,E:()=>Y}),function(q){q.Dumb="dumb",q.Ok="ok",q.Smart="smart",q.Tricky="tricky",q.Reversed="reversed"}(Y||(Y={})),function(q){q.Elementalist="elementalist",q.Assassin="assassin",q.Turtle="turtle"}(Q||(Q={}))},88541:(q,K,z)=>{"use strict";var Y;z.d(K,{Ct:()=>X,GM:()=>Q,d6:()=>Y}),function(q){q.Free="free",q.FreeUsed="freeUsed",q.Member="member",q.MemberUsed="memberUsed"}(Y||(Y={}));const Q={enabled:!0,cooldownTimeUtcMinutes:240,rooms:[{id:"free-play",active:!0,name:"Free Play",nameKey:"DUELS_STADIUM_ROOM_NAME_FREE_PLAY",freeBattles:1,memberBattles:1,usesElementalBoosts:!0,forceBots:!0,minBotDifficulty:-2,maxBotDifficulty:4,prize:{type:"gold",amount:50},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-2-large"},matchmakingBucket:1,style:{backingColor:"#99d8f2",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-blue-sky"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-blue-sky-disabled"},headerTextColor:"#2266aa",lockBarColor:"#2f76be",borderColor:"#2f76be",contentBackingColor:"#f3ffff",contentBorderColor:"#349fe3",costBackingColor:"#a3ddf9"}},{id:"moonlit-clash",active:!0,name:"Moonlit Clash",nameKey:"DUELS_STADIUM_ROOM_NAME_MOONLIT_CLASH",levelLock:15,timeOfDayLock:"home",freeBattles:2,memberBattles:1,usesElementalBoosts:!0,forceBots:!1,minBotDifficulty:1,maxBotDifficulty:8,entryCost:{type:"gold",amount:100},prize:{type:"gold",amount:250},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-3-large"},matchmakingBucket:1,style:{backingColor:"#6296cc",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-moon"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-moon-disabled"},headerTextColor:"#4c4892",lockBarColor:"#4c4892",borderColor:"#4c4892",contentBackingColor:"#effaff",contentBorderColor:"#349fe3",costBackingColor:"#a1d0ef"}},{id:"spell-masters",active:!0,name:"Spell Masters",nameKey:"DUELS_STADIUM_ROOM_NAME_SPELL_MASTERS",levelLock:40,freeBattles:1,memberBattles:2,usesElementalBoosts:!0,forceBots:!1,minBotDifficulty:-2,maxBotDifficulty:8,entryCost:{type:"gold",amount:250},prize:{type:"gold",amount:500},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-4-large"},matchmakingBucket:1,style:{backingColor:"#ffcd91",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-stairs"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-stairs-disabled"},headerTextColor:"#ae2d00",lockBarColor:"#aa331c",borderColor:"#aa331c",contentBackingColor:"#fffaeb",contentBorderColor:"#f89e80",costBackingColor:"#f8ce99"}},{id:"boss-hunters",active:!0,name:"Boss Hunters",nameKey:"DUELS_STADIUM_ROOM_NAME_BOSS_HUNTERS",levelLock:90,freeBattles:0,memberBattles:1,usesElementalBoosts:!0,forceBots:!1,minBotDifficulty:3,maxBotDifficulty:8,entryCost:{type:"gold",amount:400},prize:{type:"gold",amount:1e3},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-5-large"},matchmakingBucket:1,style:{backingColor:"#d17dcd",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-tower"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-tower-disabled"},headerTextColor:"#754274",lockBarColor:"#592b4a",borderColor:"#592b4a",contentBackingColor:"#ffe4fe",contentBorderColor:"#734988",costBackingColor:"#f1b5ee"}}]},X={backingColor:"#bab5c2",borderColor:"#655664",contentBackingColor:"#f2f2f0",contentBorderColor:"#655664",costBackingColor:"#d2ced8"}},4845:(q,K,z)=>{"use strict";var Y;z.d(K,{P:()=>Q,R:()=>Y}),function(q){q.LevelLocked="levelLock",q.TimeOfDayLocked="timeOfDayLock",q.NoBattlesAvailable="noBattlesAvailable",q.NoMembership="noMembership",q.NoEntryCost="noEntryCost",q.Fallback="unknownIneligibilityReason"}(Y||(Y={}));class Q{constructor(q){this._levelLockedKeys={tooltip:{title:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_LEVEL_LOCK_KEY},body:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_LEVEL_LOCK_KEY}},card:{top:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_LEVEL_LOCK_KEY}}},this._timeOfDayLockedKeys={tooltip:{title:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_TIME_OF_DAY_LOCK_KEY},body:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_TIME_OF_DAY_LOCK_KEY}},card:{top:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_TIME_OF_DAY_LOCK_KEY},bottom:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_TIME_OF_DAY_LOCK_KEY}}},this._noTicketsKeys={tooltip:{title:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_NO_TICKETS_KEY},body:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_NO_TICKETS_KEY}},card:{bottom:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_NO_TICKETS_KEY}}},this._noMembershipKeys={tooltip:{title:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_MEMBERSHIP_KEY},body:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_MEMBERSHIP_KEY}}},this._fallbackKeys={tooltip:{title:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_FALLBACK_KEY},body:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_FALLBACK_KEY}}},this._noEntryCostKeys={tooltip:{title:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_ENTRY_COST_KEY},body:{key:Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_ENTRY_COST_KEY}}},this.CHECK_TO_INELIGIBLE_REASON_KEYS_MAP=new Map([[Y.NoMembership,this._noMembershipKeys],[Y.LevelLocked,this._levelLockedKeys],[Y.TimeOfDayLocked,this._timeOfDayLockedKeys],[Y.NoBattlesAvailable,this._noTicketsKeys],[Y.NoEntryCost,this._noEntryCostKeys],[Y.Fallback,this._fallbackKeys]]),q&&(this._localizer=q)}validate(q,K){const z=[()=>this.meetsLevelRequirement(q.room,q.playerLevel),()=>this.meetsAvailableBattlesRequirement(q.room,q.isMember,q.numBattlesUsed),()=>this.meetsTimeOfDayRequirement(q.room,q.inSchoolHours)];K&&z.push(...K);let Y={eligible:!0};for(const Q of z)if(Y=Q(),!Y.eligible)break;return Y}meetsAvailableBattlesRequirement(q,K,z){const Q=-1===q.freeBattles,X=-1===q.memberBattles,Z=q.freeBattles+q.memberBattles,J=q.freeBattles>0&&z0&&z>=q.freeBattles&&z=q.levelLock;return(null===(z=this._levelLockedKeys.card)||void 0===z?void 0:z.top)&&(this._levelLockedKeys.card.top.args=[q.levelLock]),(null===(Q=this._levelLockedKeys.card)||void 0===Q?void 0:Q.bottom)&&(this._levelLockedKeys.card.bottom.args=[q.levelLock]),this._levelLockedKeys.tooltip.body.args=[q.levelLock],this.getEligibilityObject(X,Y.LevelLocked)}meetsTimeOfDayRequirement(q,K){var z,Q;if(!q.timeOfDayLock||"none"===q.timeOfDayLock)return{eligible:!0};const X="home"===q.timeOfDayLock&&!K||"school"===q.timeOfDayLock&&K,Z="school"===q.timeOfDayLock?["8:00am","4:00pm"]:["4:00pm","8:00am"];return this._timeOfDayLockedKeys.tooltip.body.args=Z,(null===(z=this._timeOfDayLockedKeys.card)||void 0===z?void 0:z.top)&&(this._timeOfDayLockedKeys.card.top.args=Z),(null===(Q=this._timeOfDayLockedKeys.card)||void 0===Q?void 0:Q.bottom)&&(this._timeOfDayLockedKeys.card.bottom.args=Z),this.getEligibilityObject(X,Y.TimeOfDayLocked)}getEligibilityObject(q,K){var z,Y,Q,X,Z,J,tt,et,it,st,nt;if(q)return{eligible:q};const at={eligible:q,ineligibleReason:{type:K,tooltip:{title:"",body:""}}};if(this._localizer&&at.ineligibleReason){const q=null!==(z=this.CHECK_TO_INELIGIBLE_REASON_KEYS_MAP.get(K))&&void 0!==z?z:this._fallbackKeys,rt=null!==(Y=q.tooltip.title.args)&&void 0!==Y?Y:[],ot=null!==(Q=q.tooltip.body.args)&&void 0!==Q?Q:[],ht=null!==(J=null===(Z=null===(X=q.card)||void 0===X?void 0:X.top)||void 0===Z?void 0:Z.args)&&void 0!==J?J:[],ct=null!==(it=null===(et=null===(tt=q.card)||void 0===tt?void 0:tt.bottom)||void 0===et?void 0:et.args)&&void 0!==it?it:[];at.ineligibleReason.tooltip={title:this._localizer.getText(q.tooltip.title.key,...rt),body:this._localizer.getText(q.tooltip.body.key,...ot)},at.ineligibleReason.card={topMessage:(null===(st=q.card)||void 0===st?void 0:st.top)?this._localizer.getText(q.card.top.key,...ht):void 0,bottomMessage:(null===(nt=q.card)||void 0===nt?void 0:nt.bottom)?this._localizer.getText(q.card.bottom.key,...ct):void 0}}return at}}Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_LEVEL_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_LEVEL_LOCK",Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_LEVEL_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_LEVEL_LOCK",Q.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_LEVEL_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_MESSAGE_LEVEL_LOCK",Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_TIME_OF_DAY_LOCK",Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_TIME_OF_DAY_LOCK",Q.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_MESSAGE_TIME_OF_DAY_LOCK",Q.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_TIME_OF_DAY_LOCK",Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_NO_TICKETS_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_NO_TICKETS",Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_NO_TICKETS_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_NO_TICKETS",Q.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_NO_TICKETS_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_NO_TICKETS",Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_MEMBERSHIP_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_MEMBERSHIP",Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_MEMBERSHIP_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_MEMBERSHIP",Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_FALLBACK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_FALLBACK",Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_FALLBACK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_FALLBACK",Q.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_ENTRY_COST_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_ENTRY_COST",Q.STADIUM_ROOM_INELIGIBLE_REASON_BODY_ENTRY_COST_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_ENTRY_COST"},60035:(q,K,z)=>{"use strict";var Y;z.d(K,{z:()=>Y}),function(q){q.ElementalBoost="elementalBoost",q.OutgoingDamageMultiplier="outgoingDamage",q.IncomingDamageMultiplier="incomingDamage",q.OutgoingHealingMultiplier="outgoingHealing",q.IncomingHealingMultiplier="incomingHealing",q.StatChange="statChange",q.DodgeChance="dodgeChance",q.RoundStartSpell="roundStartSpell",q.RoundStartAffix="roundStartAffix",q.Survivor="survivor",q.NoGear="noGear",q.Revive="revive",q.Reflect="reflect",q.RandomizeTarget="randomizeTarget",q.RemovePetsByElement="removePetsByElement",q.RemovePetsByRarity="removePetsByRarity",q.CooldownMin="cooldownMin",q.TurnTimer="turnTimer"}(Y||(Y={}))},28628:(q,K,z)=>{"use strict";var Y;z.d(K,{GJ:()=>et,Ie:()=>it,JT:()=>nt,Mb:()=>Q,OT:()=>st,XK:()=>X,gu:()=>Y,uj:()=>J,w0:()=>tt,x_:()=>rt,xn:()=>at,zJ:()=>Z}),function(q){q.Basic="basic",q.QuestPippet="quest-pippet",q.QuestPippetDefeatable="quest-pippet-defeatable",q.Ultimates="ultimates",q.Tutorial1="tutorial1",q.Tutorial2="tutorial2",q.Tutorial3="tutorial3",q.Tutorial1Revised="tutorial1revised",q.Tutorial2Revised="tutorial2revised",q.StatusEffectsTutorial="status-effects-tutorial",q.FireflyQ2Miniboss="firefly-Q2-miniboss",q.FireflyQ3Miniboss="firefly-Q3-miniboss",q.FireflyQ8TriptropTrio="firefly-Q8-triptrop-trio",q.FireflyQ12Gerald="firefly-Q12-gerald",q.SkywatchCloudMiniboss="skywatch-cloud-miniboss",q.SkywatchCloudBoss="skywatch-cloud-boss",q.SkywatchQ11Bitbots="skywatch-Q11-bitbots",q.SkywatchQ6Swarm="skywatch-Q6-swarm",q.ShiverchillQ6Ghosts="shiverchill-Q6-ghosts",q.ShiverchillQ7IceWyrm="shiverchill-Q7-ice-wyrm",q.ShiverchillQ13IceWyrm="shiverchill-Q13-ice-wyrm",q.BonfireQ12Guardian="bonfire-Q12-guardian",q.BonfireQ13Cebollini="bonfire-Q13-cebollini",q.ShipwreckQ11OldOne="shipwreck-Q11-old-one",q.Duel="duel",q.MatchmakingDuel="matchmaking-duel",q.MatchmakingBotDuel="matchmaking-bot-duel",q.Titan="titan",q.CrystalCavernsGrumpyYeti="cc-grumpy-yeti",q.CrystalCavernsCrystalThief="cc-crystal-thief",q.CrystalCavernsGlacias="cc-glacias",q.CrystalCavernsMakalu="cc-makalu",q.CrystalCavernsCrystalGolem="cc-crystal-golem",q.DarkTower="darktower",q.EndgamePippet="endgame-pippet",q.EndGameGuardianFirefly="endgame-guardian-firefly",q.EndGameGuardianShiverchill="endgame-guardian-shiverchill",q.EndGameGuardianSkywatch="endgame-guardian-skywatch",q.EndGameGuardianBonfire="endgame-guardian-bonfire",q.EndGameGuardianShipwreck="endgame-guardian-shipwreck",q.EndGamePuppetMaster="endgame-puppetmaster",q.ZoneMiniboss="zone-miniboss",q.PumpkinfestBoss="pumpkinfest-boss",q.NormalRiftRun="normal-rift-run",q.BossRiftRun="boss-rift-run",q.LootDash="loot-dash",q.FestivalDailyBoss="festival-daily-boss",q.FestivalDailyBattle="festival-daily-battle",q.FeaturedSpawn="featured-spawn"}(Y||(Y={}));const Q=[Y.NormalRiftRun];var X;!function(q){q.Victory="victory",q.Defeat="defeat",q.Escape="escape"}(X||(X={}));const Z=q=>{if(!("opponents"in q))throw new Error("No opponents have been configured")};var J,tt,et,it;!function(q){q.Wizard="wizard",q.Pet="pet",q.Boss="boss",q.Titan="titan",q.Object="object",q.Miniboss="miniboss"}(J||(J={})),function(q){q.Pet="Pet",q.Summon="Summon",q.Titan="Titan",q.Player="Player",q.Boss="Boss"}(tt||(tt={})),function(q){q.DungeonBoss="Dungeon Boss",q.TowerBoss="Tower Boss",q.ZoneBoss="Zone Boss",q.EventBoss="Event",q.FinalBoss="Final Boss",q.Wizard="Wizard",q.Mythic="Mythic",q.Enemy="Enemy"}(et||(et={})),function(q){q.FrontTop="frontTop",q.FrontMiddle="frontMiddle",q.FrontBottom="frontBottom",q.BackMiddle="backMiddle",q.Middle="middle",q.HugeUnit="hugeUnit"}(it||(it={}));const st=59,nt=37,at=q=>[et.DungeonBoss,et.TowerBoss].includes(q),rt=q=>[et.ZoneBoss,et.EventBoss].includes(q)},26738:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{m:()=>Y,x:()=>Q}),function(q){q.GOAL="goal",q.PREMIUM_GATE="premiumGate",q.PREMIUM_REWARD_CLAIM="premiumRewardClaim",q.FREE_REWARD_CLAIM="freeRewardClaim",q.INFINITE_ACTIVE="infiniteActive",q.INFINITE_GOAL="infiniteGoal",q.INFINITE_CLAIM="infiniteClaim"}(Y||(Y={})),function(q){q.GOAL="goal",q.CLAIM="claim"}(Q||(Q={}))},68834:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{H2:()=>J,IC:()=>X,Nz:()=>Z,UA:()=>Y,bm:()=>Q}),function(q){q.BecomeAMember="Become a Member"}(Y||(Y={})),function(q){q.All="All",q.Daily="Daily",q.Weekly="Weekly",q.Monthly="Monthly",q.Season="Season",q.Bonus="Bonus"}(Q||(Q={}));const X={[Q.All]:"BATTLE_PASS_QUEST_TYPE_ALL",[Q.Daily]:"BATTLE_PASS_QUEST_TYPE_DAILY",[Q.Weekly]:"BATTLE_PASS_QUEST_TYPE_WEEKLY",[Q.Monthly]:"BATTLE_PASS_QUEST_TYPE_MONTHLY",[Q.Season]:"BATTLE_PASS_QUEST_TYPE_SEASON",[Q.Bonus]:"BATTLE_PASS_QUEST_TYPE_BONUS"};var Z,J;!function(q){q.BecomeAMember="BecomeAMember",q.EvolvePet="EvolvePet"}(Z||(Z={})),function(q){q.Home="home",q.Rewards="rewards",q.Quests="quests"}(J||(J={}))},47708:(q,K,z)=>{"use strict";z.d(K,{Al:()=>Q,K_:()=>X,q6:()=>Z});var Y=z(97495);const Q={[Y.i.Regular]:!0,[Y.i.Hard]:!1,[Y.i.Expert]:!1};var X,Z;!function(q){q.Regular="EASY_MODE",q.Hard="HARD_MODE",q.Expert="EXPERT_MODE"}(X||(X={})),function(q){q[q.NotStarted=0]="NotStarted",q[q.HardModeIntroduced=1]="HardModeIntroduced",q[q.HardModeStarted=2]="HardModeStarted",q[q.ExpertModeIntroduced=3]="ExpertModeIntroduced",q[q.ExpertModeStarted=4]="ExpertModeStarted"}(Z||(Z={}));Z.HardModeIntroduced},97495:(q,K,z)=>{"use strict";var Y;z.d(K,{i:()=>Y}),function(q){q.Regular="regular",q.Hard="hard",q.Expert="expert"}(Y||(Y={}))},2090:(q,K,z)=>{"use strict";z.d(K,{u:()=>Y});const Y=(0,z(77601).gb)({key:"keep-players-in-hard-mode",activateAssociatedExperiments:1,default:{enabled:!1}})},34656:(q,K,z)=>{"use strict";z.d(K,{j:()=>J});var Y=z(29891),Q=z(64270),X=z(15821),Z=z(87490);class J{static specialOfferSectionHasContent(q,K){if(q.id!==Q.Xx.SpecialOffer)return!1;const z=!!q.emptySectionInfo&&q.emptySectionInfo.title.length>0&&q.emptySectionInfo.subtitle.length>0;return!!K||z}static calculateFinalCost(q,K,z,Y){var J,et,it,st;let nt;const at=this.getItemRewards(q);if(!q.metadata.ignorePriceTable&&(null==z?void 0:z.featureEnabled)&&1===at.length){const tt=at[0],st=K(tt.type,tt.ID),rt=null!==(J=q.metadata.currency)&&void 0!==J?J:null===(et=null==st?void 0:st.dynamicStoreBaseCost)||void 0===et?void 0:et.currencyId;if(void 0!==rt){const q=class{static computePowerLevel(q){let K=0;for(const[z,Y]of Object.entries(q))X.A.isDefined(Y)&&(z===Z.EStat.Hp?K+=.5*Y:K+=Y);return K}static findMatchingScale(q,K,z){return Object.values(q.scales).find((q=>q.enabled&&q.currencies.includes(K)&&q.items.includes(z)))}static computePriceFromScale(q,K,z){const Y=[...q.keys].sort(((q,K)=>q.value-K.value));return this.computePriceFromSortedKeys(Y,q.type,K,z,q.roundTo)}static resolveCost(q,K){return X.A.isDefined(K)&&X.A.isDefined(q.costByRarity[K])?q.costByRarity[K]:q.baseCost}static computePriceFromSortedKeys(q,K,z,Y,X){var Z;if(0===q.length)return;const J=q[0],tt=q[q.length-1];switch(K){case Q.zS.Floor:{const K=q.reduce(((q,K)=>K.value<=z?K:q),J);return this.resolveCost(K,Y)}case Q.zS.Ceiling:{const K=q.find((q=>q.value>=z));return this.resolveCost(null!=K?K:tt,Y)}case Q.zS.Linear:{const K=q.find((q=>q.value===z));if(void 0!==K)return this.resolveCost(K,Y);if(ztt.value)return this.resolveCost(tt,Y);const Q=q.reduce(((q,K)=>K.valueq.value>z)))&&void 0!==Z?Z:tt,it=(z-Q.value)/(et.value-Q.value),st=this.resolveCost(Q,Y)+it*(this.resolveCost(et,Y)-this.resolveCost(Q,Y)),nt=null!=X?X:1,at=nt>0?nt:1;return Math.round(st/at)*at}}}static lookupPrice(q,K,z,Y,X,Z,J){let tt,et,it;if(J){const Y=`${K}:${z}`;if(!J.has(Y)){const Q=this.findMatchingScale(q,K,z);J.set(Y,Q?{scale:Q,sortedKeys:[...Q.keys].sort(((q,K)=>q.value-K.value))}:null)}const Q=J.get(Y);if(!Q)return;tt=Q.scale,et=Q.sortedKeys}else{if(tt=this.findMatchingScale(q,K,z),!tt)return;et=[...tt.keys].sort(((q,K)=>q.value-K.value))}switch(tt.keyType){case Q.NR.Power:if(!X)return;it=this.computePowerLevel(X);break;case Q.NR.LevelLock:it=null!=Z?Z:0}return this.computePriceFromSortedKeys(et,tt.type,it,Y,tt.roundTo)}}.lookupPrice(z,rt,tt.type,null==st?void 0:st.rarity,null==st?void 0:st.stats,null==st?void 0:st.lockLevel,Y);void 0!==q&&(nt={type:"currency",currency:rt,value:q*(null!==(it=tt.N)&&void 0!==it?it:1)})}}if(nt||null==q.metadata.currency||null==q.metadata.cost||(nt={type:"currency",currency:tt(q.metadata.currency),value:tt(q.metadata.cost)}),!nt)for(const Q of at){const q=K(Q.type,Q.ID);if(!(null==q?void 0:q.dynamicStoreBaseCost))continue;const{currencyId:z,amount:Y}=q.dynamicStoreBaseCost;nt={type:"currency",currency:z,value:Y*(null!==(st=Q.N)&&void 0!==st?st:1)}}if(!nt)throw new Error(`No cost found for offer ${q.id}`);if(q.metadata.percentageDiscount){const K=1-q.metadata.percentageDiscount/100;nt.value=Math.ceil(nt.value*K)}return nt}static getItemRewards(q){var K;const z=[];for(const{type:Q,data:X}of null!==(K=q.onComplete)&&void 0!==K?K:[])switch(Q){case Y.s.GOT_PET:z.push({type:"pet",ID:X.id,N:1});break;case Y.s.GOT_ITEM:z.push(...X.itemDrops)}return z}}function tt(q){return"string"==typeof q?parseInt(q,10):q}},49569:(q,K,z)=>{"use strict";z.d(K,{Y:()=>Y});const Y=(0,z(77601).gb)({key:"unified-store",activateAssociatedExperiments:1,default:{enabled:!1}})},64270:(q,K,z)=>{"use strict";var Y,Q,X,Z,J,tt,et;z.d(K,{GA:()=>Q,IF:()=>J,NR:()=>st,Xx:()=>Y,g0:()=>X,qO:()=>Z,zS:()=>it}),function(q){q.SpecialOffer="SpecialOffer",q.DefeatedPets="DefeatedPets",q.Bundle="Bundle",q.RestrictionOffer="RestrictionOffer"}(Y||(Y={})),function(q){q.PetShop="pet-store",q.TitanShop="titan-shop",q.WizardCenter="wizard-center",q.SpecialOffers="special-offers",q.FestivalShop="festival-shop",q.RegionShop="region-shop",q.AcademyShop="academy-shop",q.RiftsPortal1Shop="rifts-p1-shop",q.RiftsPortal2Shop="rifts-p2-shop",q.RiftsPortal3Shop="rifts-p3-shop",q.StarlightShop="starlight-fest-store",q.PumpkinfestShop="pumpkinfest-store",q.WinterfestShop="winterfest-store",q.MoonlightShop="moonlight-fest-store",q.OfferPopup="offer-popup",q.SpringfestShop="spring-fest-store",q.SummerfestShop="summerfest-store"}(Q||(Q={})),function(q){q.AllShops="#all-shops"}(X||(X={})),function(q){q.DynamicStore="DynamicStore"}(Z||(Z={})),function(q){q.StoreKeyNotFound="store-key-not-found",q.BadStoreConfig="bad-store-config",q.UnknownError="unknown-error"}(J||(J={})),function(q){q.BadStoreConfig="bad-store-config"}(tt||(tt={})),function(q){q.Rifts="rifts"}(et||(et={}));var it,st;!function(q){q.Floor="floor",q.Ceiling="ceiling",q.Linear="linear"}(it||(it={})),function(q){q.Power="power",q.LevelLock="levelLock"}(st||(st={}))},40295:(q,K,z)=>{"use strict";var Y;z.d(K,{B:()=>Y}),function(q){q.NotStarted="NotStarted",q.LastKeystoneCutsceneViewed="LastKeystoneCutsceneViewed",q.PippetDefeated="PippetDefeated",q.Guardian1Defeated="Guardian1Defeated",q.Guardian2Defeated="Guardian2Defeated",q.Guardian3Defeated="Guardian3Defeated",q.Guardian4Defeated="Guardian4Defeated",q.Guardian5Defeated="Guardian5Defeated",q.PuppetMasterDefeated="PuppetMasterDefeated"}(Y||(Y={}))},71698:(q,K,z)=>{"use strict";z.d(K,{o:()=>Y});const Y=(0,z(77601).gb)({key:"festivals",activateAssociatedExperiments:0,default:{enabled:!0,startDates:{},endDates:{},variant:0}})},57797:(q,K,z)=>{"use strict";var Y,Q,X,Z;z.d(K,{je:()=>X,k$:()=>Z,wD:()=>Q,xK:()=>Y}),function(q){q.Story="Story",q.Season="Season",q.Rifts="Rifts",q.Member="Member",q.Coop="Coop"}(Y||(Y={})),function(q){q.GOAL="goal",q.CLAIM="claim",q.STORY="story",q.COOP="coop"}(Q||(Q={})),function(q){q.Normal="normal",q.Boss="boss"}(X||(X={})),function(q){q.Any="any",q.Normal="normal",q.Boss="boss"}(Z||(Z={}))},46902:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{Q:()=>Y}),function(q){q.AllZones="all_zones",q.Global="global",q.AllInstances="all_instances"}(Y||(Y={})),function(q){q.Xp="Xp",q.Currency="Currency",q.TitanShard="TitanShard",q.Springfest="Springfest",q.Summerfest="Summerfest",q.Pumpkinfest="Pumpkinfest",q.Winterfest="Winterfest",q.StarlightFestival="Starlight"}(Q||(Q={}))},10727:(q,K,z)=>{"use strict";z.d(K,{d3:()=>Z,tZ:()=>X});var Y=z(25308),Q=z(77601);const X={[Y.e.Normal_special_encounter]:Y.e.Ftue_revamp_normal_special_encounter},Z=(0,Q.gb)({key:"ftue-revamp-phase-1",activateAssociatedExperiments:0,default:{enabled:!1}})},28344:(q,K,z)=>{"use strict";z.d(K,{y:()=>Y});const Y=(0,z(77601).gb)({key:"ftue-revamp-phase-2",activateAssociatedExperiments:0,default:{enabled:!1}})},39324:(q,K,z)=>{"use strict";var Y,Q,X,Z;z.d(K,{$P:()=>X,fK:()=>Z}),function(q){q.Current="Current",q.Scheduled="Scheduled"}(Y||(Y={})),function(q){q.None="None",q.Hourly="Hourly",q.Daily="Daily",q.Weekly="Weekly"}(Q||(Q={})),function(q){q.AppStart="APP_START",q.EnterGameWorld="ENTER_GAME_WORLD"}(X||(X={})),function(q){q.ShopVisitNotification="shop_visit_notification"}(Z||(Z={}))},58347:(q,K,z)=>{"use strict";z.d(K,{F:()=>Y});const Y=(0,z(77601).gb)({key:"magicoin-softlock-flow-changes",activateAssociatedExperiments:0,default:!1})},89067:(q,K,z)=>{"use strict";z.d(K,{Cy:()=>Z,Jr:()=>st,Kr:()=>tt,Uk:()=>it,qe:()=>X,ts:()=>Y,uR:()=>J,yR:()=>Q});var Y,Q,X,Z,J,tt,et=z(66582);!function(q){q.AfterSchoolWidget="AfterSchoolWidget",q.Backpack="Backpack",q.Chat="Chat",q.Challenges="Challenges",q.CoreMember="CoreMember",q.Duels="Duels",q.Festival="Festival",q.FriendsList="Friends List",q.Hamburger="Hamburger",q.HouseEdit="HouseEdit",q.HouseLocked="HouseLocked",q.HouseReport="HouseReport",q.HouseUnlocked="HouseUnlocked",q.HouseUpgrade="HouseUpgrade",q.LoginRewards="Login Rewards",q.Map="Map",q.NonMember="NonMember",q.Pets="Pets",q.PlusMember="PlusMember",q.Rifts="Rifts",q.Settings="Settings",q.Shop="Shop",q.StateChallenges="StateChallenges",q.TreasureTrack="TreasureTrack",q.UltraMember="UltraMember",q.WizardCostumes="WizardCostumes",q.WizardDash="WizardDash",q.WizardWatch="Wizard Watch",q.YourGoals="Your Goals",q.YourMail="Your Mail"}(Y||(Y={})),function(q){q[q.Standard=0]="Standard",q[q.Liveops=1]="Liveops",q[q.Secondary=2]="Secondary",q[q.PlayerHub=3]="PlayerHub"}(Q||(Q={})),function(q){q[q.Always=0]="Always",q[q.AtHome=1]="AtHome",q[q.AtAnotherHome=2]="AtAnotherHome",q[q.NotHome=3]="NotHome",q[q.HomeVisitsAllowed=4]="HomeVisitsAllowed",q[q.HomeVisitsNotAllowed=5]="HomeVisitsNotAllowed",q[q.NonMember=6]="NonMember",q[q.CoreMember=7]="CoreMember",q[q.PlusMember=8]="PlusMember",q[q.UltraMember=9]="UltraMember",q[q.FestivalActive=10]="FestivalActive",q[q.ValidStateChallenge=11]="ValidStateChallenge",q[q.StateChallengeActiveOrCanCollectRewards=12]="StateChallengeActiveOrCanCollectRewards",q[q.AfterSchoolWidgetEnabled=13]="AfterSchoolWidgetEnabled",q[q.DailyLoginCalendarEnabled=14]="DailyLoginCalendarEnabled",q[q.DailyLoginCalendarUnlocked=15]="DailyLoginCalendarUnlocked",q[q.WizardWatchUnlocked=16]="WizardWatchUnlocked",q[q.PlayerGoalsEnabled=17]="PlayerGoalsEnabled",q[q.TreasureTrackUnlocked=18]="TreasureTrackUnlocked",q[q.FestivalUnlocked=19]="FestivalUnlocked",q[q.EnglishOnly=20]="EnglishOnly"}(X||(X={})),function(q){q[q.Small=64]="Small",q[q.Normal=87]="Normal",q[q.Large=98]="Large",q[q.ExtraLarge=120]="ExtraLarge"}(Z||(Z={})),function(q){q.HudGameObject="HudGameObject",q.HudRevampReusableStandardTooltip="HudRevampReusableStandardTooltip"}(J||(J={})),function(q){q.HudButtonEnabled="HudButtonEnabled",q.HudAttentionRequested="HudAttentionRequested"}(tt||(tt={}));const it={[et._$.NonMember]:Y.NonMember,[et._$.MemberCore]:Y.CoreMember,[et._$.MemberLevelUp]:Y.CoreMember,[et._$.MemberPlus]:Y.PlusMember,[et._$.MemberUltimateMath]:Y.PlusMember,[et._$.MemberUltra]:Y.UltraMember,[et._$.MemberUltimateBundle]:Y.UltraMember},st={[Y.NonMember]:"MEMBERSHIP_STATUS_FREE",[Y.CoreMember]:"MEMBERSHIP_STATUS_CORE",[Y.PlusMember]:"MEMBERSHIP_STATUS_PLUS",[Y.UltraMember]:"MEMBERSHIP_STATUS_ULTRA"}},6452:(q,K,z)=>{"use strict";z.d(K,{D:()=>J});var Y=z(95891),Q=z.n(Y),X=z(28628);const Z=JSON.parse('{"cumulativeXp":[0,14,28,42,57,73,89,106,123,141,160,180,200,221,243,266,290,315,341,368,396,425,455,486,519,553,588,625,663,703,744,787,832,878,927,977,1029,1084,1140,1199,1260,1324,1390,1459,1530,1605,1682,1762,1846,1933,2024,2118,2216,2318,2423,2534,2648,2767,2891,3020,3154,3293,3438,3589,3746,3909,4078,4255,4438,4629,4827,5033,5248,5471,5703,5944,6195,6456,6728,7010,7304,7609,7927,8257,8601,8958,9329,9716,10118,10535,10970,11422,11892,12381,12889,13418,13968,14540,15135,15753,15982,16218,16461,16711,16968,17233,17505,17785,18073,18369,18673,18985,19306,19635,19973,20320,20676,21041,21415,21799,22193,22597,23011,23435,23869,24314,24769,25235,25712,26200,26700,27211,27734,28269,28816,29375,29946,30530,31127,31737,32360,32996,33646,34310,34987,35679,36385,37105,37840,38590,39355,40135,40931,41743,42571,43415,44275,45152,46045,46955,47882,48827,49789,50769,51767,52784,53819,54873,55946,57038,58149,59280,60431,61602,62793,64005,65237,66490,67765,69061,70379,71719,73081,74465,75872,77302,78755,80232,81732,83256,84804,86377,87975,89598,91246,92919,94618,96343,98094,99872]}');class J{static getXpRewardForBattleUnit(q,K,z){switch(q.type||X.uj.Object){case X.uj.Pet:return K.type===X.w0.Summon?z.mythic:z.base;case X.uj.Titan:return z.titan;case X.uj.Boss:return K.category?(0,X.xn)(K.category)?z.repeatableBoss:(0,X.x_)(K.category)?z.singularBoss:K.category===X.GJ.FinalBoss?q.asset.id===X.OT?z.finalBoss:z.illusionBoss:K.category===X.GJ.Wizard?q.asset.id===X.JT?z.pippet:z.cloakedWizard:z.base:z.base;case X.uj.Wizard:return z.cloakedWizard;case X.uj.Miniboss:return z.miniBoss;default:return z.base}}static getXpRequiredForLevel(q,K,z){return K[q-z]}static getLevelCurve(){return Z}static getLevelFromCumulativeXp(q,K,z){return q<0?z:q>=K[K.length-1]?K.length-1+z:K.findIndex((K=>K>q))-1+z}static doesCumulativeXpMatchLevelCurve(q,K,z,Y){return q===J.getLevelFromCumulativeXp(K,z,Y)}static getRelativeXpGainedForCurrentLevel(q,K,z,Y){const Q=K-z[q-Y];return Math.max(0,Q)}static getRelativeXpRequiredForLevel(q,K,z){const Y=q-z;return 0===Y?K[Y]:Y>K.length-1?0:Math.max(0,K[Y]-K[Y-1])}static getCurrentLevelProgressPercent(q,K,z,Y){const X=q-Y;if(X<0)return 0;if(X>=z.length||K>=z[z.length-1])return 1;const Z=J.getRelativeXpGainedForCurrentLevel(q,K,z,Y),tt=J.getRelativeXpRequiredForLevel(q+1,z,Y);return tt<=0?0:Q().clamp(Z/tt,0,1)}static getXpFromNextLevelProgressPercent(q,K,z,Y){const X=J.getRelativeXpRequiredForLevel(q+1,z,Y)*Q().clamp(K,0,1);return Math.round(J.getXpRequiredForLevel(q,z,Y)+X)}}},52551:(q,K,z)=>{"use strict";z.d(K,{w:()=>tt});var Y=z(28085),Q=z(78746);const X=JSON.parse('{"xpPerOpponentDefeatedMultiplier":0.5,"revive":{"healthPercent":0.5,"revivesPerReviveLevel":{"Level0":1,"Level1":2,"Level2":3},"initialRevives":{"NonMember":"Level0","MemberLevelUp":"Level1","MemberUltimateMath":"Level2","MemberUltimateBundle":"Level2","MemberCore":"Level1","MemberPlus":"Level2","MemberUltra":"Level2"}},"matchSetup":{"maximumPlayers":8,"matchmakingTimeMs":30000,"finalCountdownMs":3000,"finalWaitTimeMs":2000},"battleSetup":{"stagesPerZone":5,"wavesPerBattleStage":{"1":[1],"2":[1],"3":[1],"4":[1,1],"5":[1,1],"6":[1,1],"7":[1,1],"8":[1,1,1],"9":[1,1,1],"10":[1,1,1],"11":[1,1,2],"12":[1,1,2],"default":[1,1,2,2,3]},"numberOfZones":1,"minEnemyLevel":2,"enemyLevelVariance":3,"treasureStagesEnabled":false,"minTreasureStageInZone":4,"maxMpPerPet":2},"postBattle":{"lootBags":{"lootBagsPerPlace":[7,5,3],"default":1},"baseLootBagItemConfig":{"goldTable":182,"currencyTable":184,"itemsTable":180,"itemChance":0.2},"memberLootBagItemConfig":{"goldTable":183,"currencyTable":185,"itemsTable":181,"itemChance":0.8}},"matchboard":{"batchUpdatesAtPlayerCount":0,"opponentBatchUpdateIntervalMs":500}}'),Z=JSON.parse('{"matchSetup":{"maximumTimeBetweenBotJoinsMs":6000,"maximumMatchSearchTimeMs":1500,"minimumMatchSearchTimeMs":3000},"opponentConfigs":{"slow":{"waveTime":{"min":90,"max":150},"questionTime":{"min":50,"max":70}},"average":{"waveTime":{"min":55,"max":90},"questionTime":{"min":30,"max":50}},"fast":{"waveTime":{"min":35,"max":55},"questionTime":{"min":15,"max":30}},"gradeMultiplier":4,"botDistributions":[{"streak":-2,"difficulty":"Easy","fastCount":0,"averageCount":3,"slowCount":4},{"streak":-5,"difficulty":"Super easy","fastCount":0,"averageCount":1,"slowCount":6},{"streak":2,"difficulty":"Hard","fastCount":2,"averageCount":3,"slowCount":2},{"streak":5,"difficulty":"Super hard","fastCount":3,"averageCount":4,"slowCount":0},{"streak":0,"difficulty":"Normal","fastCount":1,"averageCount":3,"slowCount":3}]}}'),J=JSON.parse('{"revive":{"revivesPerReviveLevel":{"Level0":"infinite","Level1":"infinite","Level2":"infinite"}},"matchSetup":{"maximumPlayers":100,"finalCountdownMs":0,"finalWaitTimeMs":3000},"battleSetup":{"maxMpPerPet":1},"quickQuizConfigs":{"transportModalDurationMs":5000,"miniumMatchmakingTimeMs":3000,"quickQuizCancelledTimeoutMs":5000},"matchboard":{"batchUpdatesAtPlayerCount":20,"opponentBatchUpdateIntervalMs":2000}}');class tt{static getConfig(q){return tt.configs[q]}}tt.configs={[Q.B1.Home]:(0,Y.ES)(X,Z),[Q.B1.QuickQuiz]:(0,Y.ES)(X,J)}},70156:(q,K,z)=>{"use strict";z.d(K,{eA:()=>Y,yB:()=>Q});const Y="infinite";var Q,X;!function(q){q.Level0="Level0",q.Level1="Level1",q.Level2="Level2"}(Q||(Q={})),function(q){q.SuperEasy="Super easy",q.Easy="Easy",q.Normal="Normal",q.Hard="Hard",q.SuperHard="Super hard"}(X||(X={}));X.Normal},78746:(q,K,z)=>{"use strict";var Y;z.d(K,{B1:()=>X,Cr:()=>st,Kn:()=>rt,Mh:()=>nt,Ns:()=>it,Os:()=>J,gK:()=>Z,kL:()=>Q,mz:()=>tt,s9:()=>at,zM:()=>Y}),function(q){q[q.None=0]="None",q[q.LobbyDefault=1]="LobbyDefault",q[q.SelectPets=2]="SelectPets",q[q.SelectFollows=3]="SelectFollows",q[q.SelectMounts=4]="SelectMounts",q[q.FindingAMatch=5]="FindingAMatch",q[q.WaitingForPlayers=6]="WaitingForPlayers",q[q.MatchmakingComplete=7]="MatchmakingComplete",q[q.MatchStartingSoon=8]="MatchStartingSoon",q[q.MatchStartingNow=9]="MatchStartingNow",q[q.MatchEndedByServer=10]="MatchEndedByServer"}(Y||(Y={}));const Q=[Y.SelectPets,Y.SelectFollows,Y.SelectMounts];var X,Z,J,tt,et,it,st;!function(q){q.QuickQuiz="QuickQuiz",q.Home="Home"}(X||(X={})),function(q){q.Bots="Bots",q.Multiplayer="Multiplayer"}(Z||(Z={})),function(q){q.Battle="Battle",q.Treasure="Treasure"}(J||(J={})),function(q){q.Lobby="lobby",q.DetailedSelection="detailedSelection"}(tt||(tt={})),function(q){q[q.YourTeam=0]="YourTeam",q[q.WaitingRoom=1]="WaitingRoom",q[q.FindAMatch=2]="FindAMatch"}(et||(et={})),function(q){q.LootDash="Wizard Dash",q.ChooseAPet="Choose a Pet",q.ChooseABuddy="Choose a Buddy",q.ChooseAMount="Choose a Mount"}(it||(it={})),function(q){q.Unfinished="Unfinished",q.Win="Win",q.Loss="Loss",q.Quit="Quit"}(st||(st={}));const nt=["pet","follow","mount"],at=5,rt=1},12022:(q,K,z)=>{"use strict";z.d(K,{G:()=>J});var Y=z(66582),Q=z(61468),X=z(70156),Z=z(78746);class J{static getNumberOfRevivesFromMemberTier(q,K){var z;const Q=Y.rH[q];if(void 0!==(null===(z=K.revive)||void 0===z?void 0:z.initialRevives[Q])){const q=K.revive.initialRevives[Q];return this.getNumberOfRevivesFromReviveLevel(q,K)}throw new Error(`Member tier "${Q}" does not have an initial revive value in the passed in config. ${JSON.stringify(K)}`)}static getNumberOfRevivesFromReviveLevel(q,K){var z,Y,Q;if(void 0!==(null===(z=K.revive)||void 0===z?void 0:z.revivesPerReviveLevel[q]))return null!==(Q=null===(Y=K.revive)||void 0===Y?void 0:Y.revivesPerReviveLevel[q])&&void 0!==Q?Q:Z.Kn;throw new Error(`Revive level "${q}" does not have a value in the passed in config. ${JSON.stringify(K)}`)}static hasRevivesRemaining(q){return q===X.eA||q>0}static getCurrentPlace(q,K,z){const Y=Q.l.countUniqueItems(K.map((q=>q.playerId))),X=new Array(Y).fill(0);for(const Q of K)Q.time<=z&&(X[Q.playerId]=Math.max(X[Q.playerId],Q.stageIndex+1));return X.filter((K=>0!==K&&K>=q)).length+1}static getMatchCompletionState(q,K,z){return q?K||z?K?Z.Cr.Quit:Z.Cr.Loss:Z.Cr.Win:Z.Cr.Unfinished}static getLootBagsCount(q,K){return(null!=K?K:Object.keys(q)).reduce(((K,z)=>K+q[z]),0)}static hasMetMinimumVictoryRequirement(q){return this.getLootBagsCount(q,["fromStreak","fromWaveComplete"])>0}}},88059:(q,K,z)=>{"use strict";z.d(K,{s:()=>Y});const Y=(0,z(77601).gb)({key:"magicoin-battle-rewards",default:{enabled:!1}})},75172:(q,K,z)=>{"use strict";z.d(K,{T:()=>Y,h:()=>Q});var Y,Q;z(48417);!function(q){q.FeatureUnlocked="feature_unlocked",q.EligibleBattleStarted="eligible_battle_started",q.IntroModalShown="intro_modal_shown",q.FirstDropReceived="first_drop_received"}(Y||(Y={})),function(q){q[q.FeatureUnlocked=0]="FeatureUnlocked",q[q.EligibleBattleStarted=1]="EligibleBattleStarted",q[q.IntroModalShown=2]="IntroModalShown",q[q.FirstDropReceived=3]="FirstDropReceived"}(Q||(Q={}))},83798:(q,K,z)=>{"use strict";z.d(K,{G:()=>Y});const Y=(0,z(77601).gb)({key:"hide-member-jar-for-new-players",default:{enabled:!1,unlockLevel:12}})},39596:(q,K,z)=>{"use strict";z.d(K,{g:()=>Y});const Y=(0,z(77601).gb)({key:"fab-member-jar-at-school",activateAssociatedExperiments:1,default:!1})},95525:(q,K,z)=>{"use strict";z.d(K,{w:()=>Y});const Y=(0,z(77601).gb)({key:"rox-three-tier-membership-stratification",activateAssociatedExperiments:0,evaluate:q=>Object.assign(Object.assign({},q),{variant:q.enabled&&q.variant?q.variant:0}),default:{enabled:!0,variant:0}})},223:(q,K,z)=>{"use strict";z.d(K,{l:()=>Z});var Y=z(8674),Q=z(77601);const X=(0,Q.gb)({key:"otp-non-member",activateAssociatedExperiments:1,default:{enabled:!1},evaluate:({enabled:q})=>q}),Z=(0,Q.gb)({key:"otp",activateAssociatedExperiments:0,evaluate:(q,K)=>{var{enabled:z,enabledOnMobile:Q}=q,Z=(0,Y.Tt)(q,["enabled","enabledOnMobile"]);return Object.assign(Object.assign({},Z),{enabled:z&&(K.isMember||K.evaluate(X))&&(!K.onMobileApp||Q)})},default:{enabled:!1,enabledOnMobile:!1,cooldown:0,storeName:void 0,spendCap:{resetTime:3,dailyLimit:void 0,monthlyLimit:void 0}}})},58182:(q,K,z)=>{"use strict";z.d(K,{N:()=>Y});const Y=(0,z(77601).gb)({key:"fab-pet-merge-2-evolution-add-new-pet",activateAssociatedExperiments:0,default:!1})},93893:(q,K,z)=>{"use strict";z.d(K,{v:()=>Y});const Y=(0,z(77601).gb)({key:"fab-secure-evolution",default:!1})},50508:(q,K,z)=>{"use strict";z.d(K,{p:()=>Y});const Y=["petHat","petRelic"]},21574:(q,K,z)=>{"use strict";z.d(K,{g:()=>et});var Y=z(26077),Q=z(15821);const X=JSON.parse('{"minimumPlayerLevel":20,"statScalers":{"1":{"hp":1.1,"power":1.1,"defence":1.1,"speed":1.1},"2":{"hp":1.2,"power":1.2,"defence":1.2,"speed":1.2},"3":{"hp":1.3,"power":1.3,"defence":1.3,"speed":1.3},"4":{"hp":1.4,"power":1.4,"defence":1.4,"speed":1.4},"5":{"hp":1.5,"power":1.5,"defence":1.5,"speed":1.5},"6":{"hp":1.6,"power":1.6,"defence":1.6,"speed":1.6}},"recipesPerProgressionType":{"OneEvolutionFamilyTier":{"0":{"ingredientCount":1,"evolutionTier":1},"1":{"ingredientCount":1,"evolutionTier":1},"2":{"ingredientCount":1,"evolutionTier":1},"3":{"ingredientCount":1,"evolutionTier":1},"4":{"ingredientCount":2,"evolutionTier":1},"5":{"ingredientCount":2,"evolutionTier":1}},"TwoEvolutionFamilyTier":{"0":{"ingredientCount":2,"evolutionTier":1},"1":{"ingredientCount":2,"evolutionTier":1},"2":{"ingredientCount":2,"evolutionTier":2},"3":{"ingredientCount":2,"evolutionTier":2},"4":{"ingredientCount":2,"evolutionTier":2},"5":{"ingredientCount":2,"evolutionTier":2}},"ThreeEvolutionFamilyTier":{"0":{"ingredientCount":2,"evolutionTier":1},"1":{"ingredientCount":2,"evolutionTier":1},"2":{"ingredientCount":3,"evolutionTier":2},"3":{"ingredientCount":3,"evolutionTier":2},"4":{"ingredientCount":3,"evolutionTier":3},"5":{"ingredientCount":3,"evolutionTier":3}},"FourEvolutionFamilyTier":{"0":{"ingredientCount":2,"evolutionTier":1},"1":{"ingredientCount":2,"evolutionTier":2},"2":{"ingredientCount":2,"evolutionTier":2},"3":{"ingredientCount":2,"evolutionTier":2},"4":{"ingredientCount":2,"evolutionTier":3},"5":{"ingredientCount":2,"evolutionTier":4}}}}'),Z=JSON.parse('{"defaultRecipesByRarity":{"common":{"0":{"ingredientCount":1,"levelCap":20,"requiredLevel":20,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":3,"levelCap":40,"requiredLevel":40,"cost":[{"type":"currency","id":27,"amount":5}],"alternateCost":null},"2":{"ingredientCount":4,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":5}],"alternateCost":null},"3":{"ingredientCount":6,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"4":{"ingredientCount":8,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"5":{"ingredientCount":12,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":15}],"alternateCost":null}},"uncommon":{"0":{"ingredientCount":0,"levelCap":40,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":2,"levelCap":40,"requiredLevel":40,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"2":{"ingredientCount":3,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"3":{"ingredientCount":4,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":20}],"alternateCost":null},"4":{"ingredientCount":4,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":20}],"alternateCost":null},"5":{"ingredientCount":5,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":30}],"alternateCost":null}},"rare":{"0":{"ingredientCount":0,"levelCap":40,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":2,"levelCap":40,"requiredLevel":40,"cost":[{"type":"currency","id":27,"amount":15}],"alternateCost":null},"2":{"ingredientCount":2,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":15}],"alternateCost":null},"3":{"ingredientCount":3,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":30}],"alternateCost":null},"4":{"ingredientCount":4,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":30}],"alternateCost":null},"5":{"ingredientCount":4,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":45}],"alternateCost":null}},"heroic":{"0":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"2":{"ingredientCount":2,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":25}],"alternateCost":null},"3":{"ingredientCount":2,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":50}],"alternateCost":null},"4":{"ingredientCount":3,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":50}],"alternateCost":null},"5":{"ingredientCount":3,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":75}],"alternateCost":null}},"legendary":{"0":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"2":{"ingredientCount":1,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":50}],"alternateCost":null},"3":{"ingredientCount":2,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":100}],"alternateCost":null},"4":{"ingredientCount":2,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":100}],"alternateCost":null},"5":{"ingredientCount":3,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":150}],"alternateCost":null}}}}'),J=JSON.parse('{"recipesByPetId":{}}');var tt=z(37016);class et{static get config(){return this._config}static get merge2RecipesByRarity(){return this._merge2RecipesByRarity}static get merge2RecipesByPetId(){return this._merge2RecipesByPetId}static minimumRankForRarity(q,K){if(K){const K=this._merge2RecipesByRarity.defaultRecipesByRarity[q];for(let q=tt.qd.MIN;q<=tt.qd.MAX;++q){const z=q;if(Q.A.isDefined(null==K?void 0:K[z])&&K[z].ingredientCount>0)return z}}return tt.qd.MIN}static parseMerge2RecipesByRarityConfig(q){const K={defaultRecipesByRarity:{}};for(const[z,X]of Object.entries(q.defaultRecipesByRarity)){const q=Y.mX[z.toLowerCase()];if(Q.A.isDefined(q)){const z={};for(const[q,K]of Object.entries(X)){const Y=parseInt(q,10);!isNaN(Y)&&Y<6&&(z[Y]={ingredientCount:K.ingredientCount,levelCap:K.levelCap,requiredLevel:K.requiredLevel,cost:K.cost,alternateCost:K.alternateCost})}K.defaultRecipesByRarity[q]=z}}return K}static parseMerge2RecipesByPetIdConfig(q){const K={recipesByPetId:{}};for(const[z,Y]of Object.entries(q.recipesByPetId)){const q={};for(const[K,z]of Object.entries(Y)){const Y=parseInt(K,10);!isNaN(Y)&&Y<6&&(q[Y]={ingredientCount:z.ingredientCount,levelCap:z.levelCap,requiredLevel:z.requiredLevel,cost:z.cost,alternateCost:z.alternateCost})}K.recipesByPetId[z]=q}return K}}et._config=Object.assign({},X),et._merge2RecipesByRarity=et.parseMerge2RecipesByRarityConfig(Z),et._merge2RecipesByPetId=et.parseMerge2RecipesByPetIdConfig(J)},50788:(q,K,z)=>{"use strict";z.d(K,{F:()=>X,J:()=>Q});var Y=z(77601);const Q=(0,Y.gb)({key:"fab-pet-merge-2-feature",default:!1}),X=(0,Y.gb)({key:"fab-pet-merge-2-evolution-disabled",default:!1})},37016:(q,K,z)=>{"use strict";z.d(K,{J1:()=>Z,_T:()=>J,o5:()=>Y,qd:()=>X,zb:()=>Q});var Y,Q;z(87490),z(48417);!function(q){q.OneEvolutionFamilyTier="OneEvolutionFamilyTier",q.TwoEvolutionFamilyTier="TwoEvolutionFamilyTier",q.ThreeEvolutionFamilyTier="ThreeEvolutionFamilyTier",q.FourEvolutionFamilyTier="FourEvolutionFamilyTier"}(Y||(Y={})),function(q){q.Success="Success",q.NotEnoughIngredients="NotEnoughIngredients",q.IncompatibleIngredients="IncompatibleIngredients",q.AlreadyMaxRank="AlreadyMaxRank",q.PetNotOwned="PetNotOwned",q.PetCannotBeMerged="PetNotMergeable",q.LevelTooLow="LevelTooLow",q.UnableToGiveFreeMerge="UnableToGiveFreeMerge"}(Q||(Q={}));const X={MIN:0,MAX:6};var Z;!function(q){q.Pet="Pet",q.MembershipReward="MembershipReward",q.MagicoinPet="MagicoinPet",q.FTUEMerge="FTUEMerge"}(Z||(Z={}));const J={defaultPetCostTableVariantKey:"mergeCosts",overridePetCostTableVariantKey:"petCosts"}},96989:(q,K,z)=>{"use strict";z.d(K,{Y:()=>Z});var Y=z(15821),Q=z(21574),X=z(37016);class Z{static getRecipeForPet(q,K){var z;const Y=null!==(z=this.PROGRESSION_TYPES_PER_EVOS[q])&&void 0!==z?z:X.o5.OneEvolutionFamilyTier;return Q.g.config.recipesPerProgressionType[Y][K]}static getMerge2RecipeForPet(q,K,z){const Y=Q.g.merge2RecipesByPetId.recipesByPetId[+q];if(Y)return Y[z];const X=Q.g.merge2RecipesByRarity.defaultRecipesByRarity[K];return null==X?void 0:X[z]}static isCompatibleIngredient(q,K,z,Q,Z){let J=!1;switch(Q.type){case X.J1.Pet:const tt=K(Q.uniqueId);if(this.isMerge1Recipe(Z)){const K=q(z.ID);if(tt&&tt.uniqueID!==z.uniqueID){const z=q(tt.ID);z.data.evolution.tier===Z.evolutionTier&&(J=this.isSameEvolutionLine(q,z,K))}}else J=Y.A.isDefined(tt)&&z.ID===tt.ID&&tt.uniqueID!==z.uniqueID;break;case X.J1.MembershipReward:case X.J1.MagicoinPet:J=!0}return J}static isSameEvolutionLine(q,K,z){if(K.ID===z.ID)return!0;if(K.data.evolution.tier>z.data.evolution.tier)return this.isSameEvolutionLine(q,z,K);const Y=K.data.curve.find((q=>q.evolveID));if(!(null==Y?void 0:Y.evolveID))return!1;if(Y.evolveID===z.ID)return!0;const Q=q(Y.evolveID);return this.isSameEvolutionLine(q,Q,z)}static canRankUp(q){return qq.uniqueID!==z.uniqueID)).forEach((K=>{var z;let J=1;const tt=q(K.uniqueID);for(let q=0;q0&&(X[K.uniqueID]=J)})),X}static selectOptimalIngredients(q,K){const z=Object.entries(q).sort(((q,K)=>q[1]-K[1])),Y=z.length;let Q=null;for(let X=1;X<1<=K&&(!Q||q{"use strict";z.d(K,{m:()=>Q,y:()=>X});var Y=z(77601);const Q=(0,Y.gb)({key:"show-pet-details-screen-update",activateAssociatedExperiments:1,default:!1}),X=(0,Y.gb)({key:"pet-details-screen-use-alternate-layout",activateAssociatedExperiments:1,default:!1})},13027:(q,K,z)=>{"use strict";var Y;z.d(K,{k:()=>Y}),function(q){q[q.StartQuest=1]="StartQuest",q[q.BattleOne=2]="BattleOne",q[q.BattleOneGotItem=3]="BattleOneGotItem",q.BattleOneB="2b-first-battle-post-tutorial",q.BattleOneGotItemB="3b-first-battle-post-tutorial-reward",q[q.BattleTwo=4]="BattleTwo",q[q.BattleTwoGotItem=5]="BattleTwoGotItem",q.BattleTwoB="4b-second-battle-post-tutorial",q.BattleTwoGotItemB="5b-second-battle-post-tutorial-reward",q.ClassCode="10-class-code-attach",q.ClassCodeGotItem="11-class-code-attach-reward",q[q.PlayAfterHours=8]="PlayAfterHours",q[q.PlayAfterHoursGotItem=9]="PlayAfterHoursGotItem",q.ProfileQuiz="12-login-credentials-quiz",q.ProfileQuizGotItem="13-login-credentials-quiz-reward",q[q.ParentAttach=6]="ParentAttach",q[q.ParentAttachGotItem=7]="ParentAttachGotItem",q.ParentAttachB="6b-parent-attach-post-ftue",q.ParentAttachGotItemB="7b-parent-attach-post-ftue-reward"}(Y||(Y={}))},49754:(q,K,z)=>{"use strict";z.d(K,{H:()=>Y});const Y=(0,z(77601).gb)({key:"fab-post-battle-rescue-screen-variants",default:{enabled:!1,magicoinCost:0}})},92240:(q,K,z)=>{"use strict";z.d(K,{h:()=>Z});var Y=z(8674),Q=z(6670),X=z(58776);class Z{static calculateState(q,K,z){var Y;let Q;const Z=K.find((K=>K.name===q));if(Z){Q=Z.defaultState;for(let q=0;q<(null===(Y=Z.stateOverrides)||void 0===Y?void 0:Y.length);q++){if(!Z.stateOverrides[q].stateTaskIds.every((q=>{var K;return(null===(K=z.find((K=>K.id===q)))||void 0===K?void 0:K.status)===X.t.COMPLETE}))){Q=Z.stateOverrides[q];break}}return Q}}static calculateStateWithPreconditions(q,K,z,Z){return(0,Y.sH)(this,void 0,void 0,(function*(){var Y;let J;const tt=K.find((K=>K.name===q));if(!tt)return;let et=yield Q.f.meetsPreconditions(Z,tt.preconditions);if(et){J=tt.defaultState;for(let q=0;q<(null===(Y=tt.stateOverrides)||void 0===Y?void 0:Y.length);q++){if(et=yield Q.f.meetsPreconditions(Z,tt.stateOverrides[q].preconditions),!et)continue;if(!tt.stateOverrides[q].stateTaskIds.every((q=>{var K;return(null===(K=z.find((K=>K.id===q)))||void 0===K?void 0:K.status)===X.t.COMPLETE}))){J=tt.stateOverrides[q];break}}return J}}))}}},70472:(q,K,z)=>{"use strict";z.d(K,{A:()=>ht});var Y=z(7247),Q=z(96684),X=z(70760),Z=z(60157),J=z(28869);class tt extends J.g{isReady(q,K){return!(!K||!(0,Z.M6)(K))&&(!(q.shopIDs&&!q.shopIDs.some((q=>q===K.shopID)))&&(!(q.shopNames&&!q.shopNames.some((q=>q===K.shopName)))&&!(q.shopCategories&&!q.shopCategories.some((q=>q===K.shopCategory)))))}getCacheKey(q){var K,z,Y;return`ShopRestriction\n ID${null===(K=q.shopIDs)||void 0===K?void 0:K.join("|")}\n Name${null===(z=q.shopNames)||void 0===z?void 0:z.join("|")}\n Category${null===(Y=q.shopCategories)||void 0===Y?void 0:Y.map((q=>q.toString())).join("|")}`}}class et extends J.g{isReady(q,K){return!(!K||!(0,Z.An)(K))&&(!(q.unitTypes&&!q.unitTypes.some((q=>q===K.unitType)))&&(!(q.unitIds&&!q.unitIds.some((q=>q===K.id)))&&(!(q.unitNames&&!q.unitNames.some((q=>q===K.name)))&&(!(q.unitNicknames&&!q.unitNicknames.some((q=>q===K.nickname)))&&!(q.unitTeams&&!q.unitTeams.some((q=>q===K.team)))))))}getCacheKey(q){var K,z,Y,Q,X;return`UnitRestriction\n Type${null===(K=q.unitTypes)||void 0===K?void 0:K.map((q=>q.toString())).join("|")}\n ID${null===(z=q.unitIds)||void 0===z?void 0:z.join("|")}\n Name${null===(Y=q.unitNames)||void 0===Y?void 0:Y.join("|")}\n Nickname${null===(Q=q.unitNicknames)||void 0===Q?void 0:Q.join("|")}\n Team${null===(X=q.unitTeams)||void 0===X?void 0:X.map((q=>q.toString())).join("|")}`}}class it extends J.g{isReady(q,K){return!(!K||!(0,Z.Rf)(K))&&this.checkRestrictions(q,K)}checkRestrictions(q,K){return!(q.ids&&!q.ids.some((q=>q===K.uniqueId)))}getCacheKey(q){return`UniqueEncounterRestriction${this.getCacheKeyFromData(q)}`}getCacheKeyFromData(q){var K;return`ID${null===(K=q.ids)||void 0===K?void 0:K.map((q=>q.toString())).join("|")}`}}const st={[Y.i.ITEM_RESTRICTIONS]:Q.x,[Y.i.SHOP_RESTRICTIONS]:tt,[Y.i.PET_RESTRICTIONS]:X.F,[Y.i.UNIT_RESTRICTIONS]:et,[Y.i.UNIQUE_ENCOUNTER_RESTRICTIONS]:it};class nt extends class{constructor(){this.reset()}doCheck(q,K,z){let Y=q.getCacheKey(K);if(Y&&!0===(null==K?void 0:K.negateResult)&&(Y=`${Y}-negate`),Y&&Y in this._resultsCache)return this._resultsCache[Y];let Q=q.isReady(K,z);return!0===(null==K?void 0:K.negateResult)&&(Q=!Q),Y&&(this._resultsCache[Y]=Q),Q}reset(){this._resultsCache={},this._cache={}}}{constructor(q){super(),this._taskParams=q}check(q,K){const z=st[q];if(void 0===z)throw new Error(`No condition handler found for type: ${q}`);const Y=new z;return this.doCheck(Y,K,this._taskParams)}}var at=z(58776),rt=z(62886),ot=z(24522);class ht{get questID(){return this._questID}get taskID(){return this._taskDefinition.id}get type(){return this._taskDefinition.completionRequirements.type}get taskDefinition(){return this._taskDefinition}get taskProgress(){return this._taskProgress}get onSetupTasks(){var q;return null!==(q=this._taskDefinition.onSetup)&&void 0!==q?q:[]}constructor(q,K,z){this._questID=q,this._taskDefinition=K,this._taskProgress=z}incrementProgressInTask(q=1){var K,z;return this.setProgressInTask((null!==(z=null===(K=this._taskProgress.data)||void 0===K?void 0:K.progress)&&void 0!==z?z:0)+q)}resetProgressInTask(){return this.setProgressInTask(0)}setProgressInTask(q){var K,z,Y,Q,X,Z,J,tt,et,it;const st=Math.max(null!==(K=this._taskDefinition.completionRequirements.data.target)&&void 0!==K?K:1,1);let nt=0,rt=q;if(rt>=st&&!this._taskDefinition.repeatable&&(this._taskProgress.status=at.t.COMPLETE,nt=1),this._taskDefinition.repeatable){nt=null===(z=this._taskDefinition.allowProgressOverflow)||void 0===z||z?Math.floor(q/st):Math.min(1,Math.floor(q/st));const K=(null!==(Q=null===(Y=this._taskProgress.data)||void 0===Y?void 0:Y.timesCompleted)&&void 0!==Q?Q:0)+nt;"number"==typeof this._taskDefinition.repeatable&&K>=this._taskDefinition.repeatable&&(this._taskProgress.status=at.t.COMPLETE,nt=Math.max(0,this._taskDefinition.repeatable-(null!==(Z=null===(X=this._taskProgress.data)||void 0===X?void 0:X.timesCompleted)&&void 0!==Z?Z:0))),rt=q%st,null!==(J=(et=this._taskProgress).data)&&void 0!==J||(et.data={progress:rt,timesCompleted:0}),this._taskProgress.data.timesCompleted=K}else null!==(tt=(it=this._taskProgress).data)&&void 0!==tt||(it.data={progress:rt});return this._taskProgress.data.progress=rt,this._taskProgress.status===at.t.COMPLETE&&delete this.taskProgress.data,nt}setResults(q){var K,z;null!==(K=(z=this._taskProgress).results)&&void 0!==K||(z.results=[]),this._taskProgress.results.push(...q)}eventMatchesTask(q,K){switch(this.type){case rt.T.PURCHASE_FROM_STORE:return this.type===q&&K.id===this._taskDefinition.id;case rt.T.NONE:return this.type===q}return this.taskMeetsRequirements(q,K,this.taskDefinition.completionRequirements)}taskShouldReset(q,K){return this.taskMeetsRequirements(q,K,this.taskDefinition.resetRequirements)}shouldSendEvent(q,K){return this.eventMatchesTask(q,K)||this.taskShouldReset(q,K)}taskMeetsRequirements(q,K,z){var Y,Q,X,Z;if(!z)return!1;if(!Object.values(rt.T).includes(q))return!1;if(z.type!==q)return!1;if((null===(Y=z.data)||void 0===Y?void 0:Y.id)&&(null===(Q=z.data)||void 0===Q?void 0:Q.id)!==K.id)return!1;if((null===(X=z.data)||void 0===X?void 0:X.type)&&(null===(Z=z.data)||void 0===Z?void 0:Z.type)!==K.type)return!1;if(z.conditions){let q=!0;const Y=new nt(K.params);for(const K of z.conditions||[])if(q=Y.check(K.type,K.data),!q)break;if(!q)return!1}return!0}getTimeUntilUnlock(){var q,K;const z=null===(K=null===(q=this._taskDefinition)||void 0===q?void 0:q.preconditions)||void 0===K?void 0:K.find((q=>q.type===ot.n.DATE_AFTER));return z?new Date(z.data.date).getTime()-Date.now():0}getTimeUntilExpiry(){var q;const K=null===(q=this._taskDefinition.preconditions)||void 0===q?void 0:q.find((q=>q.type===ot.n.DATE_BEFORE));return K?new Date(K.data.date).getTime()-Date.now():0}getPrerequisites(){return this._taskDefinition.prerequisites.filter((q=>"root"!==q))}}},6670:(q,K,z)=>{"use strict";z.d(K,{f:()=>tt});var Y=z(8674),Q=z(15821),X=z(70472),Z=z(58776),J=z(29891);class tt{static getTasksInProgress(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){var Y;if(K.status===Z.t.COMPLETE)return[];if(q.id!==K.id)throw new Error(`Quest definition (${q.id}) and player progress (${K.id}) are for different quests.`);const Q=[],J=[],tt=new Map,et=[];null===(Y=K.tasks)||void 0===Y||Y.forEach((K=>{var z;if(K)if(K.status===Z.t.COMPLETE){Q.push(K.id);const Y=q.tasks.find((q=>q.id===K.id));(null===(z=null==Y?void 0:Y.metadata)||void 0===z?void 0:z.isExperimentGate)&&et.push(K.id)}else K.status===Z.t.STOPPED?J.push(K.id):tt.set(K.id,K)})),z.reset();const it=[];for(const K of q.tasks){if(J.includes(K.id))continue;if(!K.prerequisites.filter((z=>this.isPrerequisiteValid(z,q,et,K))).every((q=>Q.includes(q))))continue;if(!(yield this.meetsPreconditions(z,K.preconditions)))continue;const Y=tt.get(K.id);Y&&it.push(new X.A(q.id,K,Y))}return it}))}static isPrerequisiteValid(q,K,z,Y){var Q,X;if(!Y.checkPrerequisiteValidity)return!0;const Z=K.tasks.find((K=>K.id===q));return!!Z&&!((null===(Q=Z.metadata)||void 0===Q?void 0:Q.experimentTaskId)&&!z.includes(null===(X=Z.metadata)||void 0===X?void 0:X.experimentTaskId))}static preprocessQuestProgress(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){var Y,Q,X,J;if(K&&q.id!==K.id)throw new Error(`Quest definition (${q.id}) and player progress (${K.id}) are for different quests.`);(null==K?void 0:K.uuid)&&K.uuid!==q.metadata.uuid&&(K.tasks=[]);const et={id:q.id,status:(null==K?void 0:K.status)||Z.t.IN_PROGRESS,tasks:[]};let it=!1;for(const st of q.tasks){let q=null===(Y=null==K?void 0:K.tasks)||void 0===Y?void 0:Y.find((q=>q.id===st.id));const nt=void 0!==q;if(q||(q=tt.generateTaskProgress(st.id)),(null==K?void 0:K.status)===Z.t.COMPLETE?null===(Q=et.tasks)||void 0===Q||Q.push({id:q.id,status:Z.t.COMPLETE,results:null==q?void 0:q.results}):null===(X=et.tasks)||void 0===X||X.push({id:q.id,status:q.status,data:q.data,results:null==q?void 0:q.results}),K&&z&&q.status===Z.t.IN_PROGRESS){let Y=!1;for(const q of st.stopConditions||[])if(Y=yield z.check(q.type,q.data),Y)break;Y&&(q.status=Z.t.STOPPED,it=!0,nt||null===(J=K.tasks)||void 0===J||J.push(q))}}return{changesMade:it,fullProgress:et}}))}static filterTasksByPreconditions(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield Promise.all(q.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){var z;return(yield Promise.all((null!==(z=q.taskDefinition.preconditions)&&void 0!==z?z:[]).map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return K.check(q.type,q.data)})))))).every((q=>q))?q:void 0})))))).filter((q=>void 0!==q))}))}static filterTaskSchemasByPreconditions(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield Promise.all(q.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){var z;return(yield Promise.all((null!==(z=q.preconditions)&&void 0!==z?z:[]).map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return K.check(q.type,q.data)})))))).every((q=>q))?q:void 0})))))).filter(Q.A.isDefined)}))}static generateTaskProgress(q){return{id:q,status:Z.t.IN_PROGRESS,data:{progress:0}}}static getTasksOfType(q,K){return q.tasks.filter((q=>q.completionRequirements.type===K))}static getTasksOfStatus(q,K){if(!q)return[];const z=[];for(const Y of q)Y.status===K&&z.push(Y.id);return z}static shouldProcessOnCompleteHandlers(q){var K,z;return!(null===(z=null===(K=q.results)||void 0===K?void 0:K.find((q=>q.type===J.s.MARK_TASK_COMPLETE)))||void 0===z?void 0:z.result)}static doesTaskGrantItems(q){var K,z;return null!==(z=null===(K=q.onComplete)||void 0===K?void 0:K.some((q=>q.type===J.s.GOT_ITEM||q.type===J.s.GOT_PET)))&&void 0!==z&&z}static meetsPreconditions(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){let z=!0;for(const Y of null!=K?K:[])if(z=yield q.check(Y.type,Y.data),!z)return!1;return!0}))}}},28869:(q,K,z)=>{"use strict";z.d(K,{g:()=>Y});class Y{getCacheKey(q){return null}}},96684:(q,K,z)=>{"use strict";z.d(K,{x:()=>X});var Y=z(60157),Q=z(28869);class X extends Q.g{isReady(q,K){return!(!K||!(0,Y.hr)(K))&&this.checkRestrictions(q,K)}checkRestrictions(q,K){return!(q.rarities&&!q.rarities.some((q=>q===K.rarity)))&&(!(q.types&&!q.types.some((q=>q===K.itemType)))&&(!(q.sources&&!q.sources.some((q=>q===K.source)))&&!(q.ids&&!q.ids.some((q=>q.toString()===K.id.toString())))))}getCacheKey(q){return`ItemRestriction${this.getCacheKeyFromData(q)}`}getCacheKeyFromData(q){var K,z,Y,Q;return`Rarity${null===(K=q.rarities)||void 0===K?void 0:K.map((q=>q.toString())).join("|")}\n Type${null===(z=q.types)||void 0===z?void 0:z.map((q=>q.toString())).join("|")}\n Source${null===(Y=q.sources)||void 0===Y?void 0:Y.map((q=>q.toString())).join("|")}\n ID${null===(Q=q.ids)||void 0===Q?void 0:Q.map((q=>q.toString())).join("|")}`}}},70760:(q,K,z)=>{"use strict";z.d(K,{F:()=>X});var Y=z(60157),Q=z(96684);class X extends Q.x{isReady(q,K){return!(!K||!(0,Y.NT)(K))&&(!!super.checkRestrictions(q,K)&&(!(q.elements&&!q.elements.some((q=>q===K.element)))&&(!(q.levelMin&&K.level&&K.levelq.levelMax))))}getCacheKey(q){var K;return`PetRestriction${super.getCacheKeyFromData(q)}\n Elements${null===(K=q.ids)||void 0===K?void 0:K.map((q=>q.toString())).join("|")}\n LevelMin${q.levelMin}LevelMax${q.levelMax}`}}},94310:(q,K,z)=>{"use strict";var Y;z.d(K,{L:()=>Y}),function(q){q.ImaniStar="Imani Star",q.MilkyWay="Milky Way",q.Starfall_1="Starfall 1",q.Starfall_2="Starfall 2",q.Starfall_3="Starfall 3",q.Starfall_4="Starfall 4",q.Starfall_5="Starfall 5",q.FestivalPrizeWheel="FestivalPrizeWheel",q.Snips="NPC Gnome Stylist",q.DragonStatue="NPC Dragon Statue",q.CurrencyDrainModal="Currency Drain Modal",q.CutsceneReplayButton="Cutscene Replay Button",q.KandiKorn="Kandi Korn",q.MoonPortal="Moon Portal",q.GrottoPortal="Grotto Portal",q.Selena="Selena",q.Verna="Verna",q.Bargo="Bargo",q.Harriet="Harriet",q.DonZorro="Don Zorro",q.HowardCornelius="Howard Cornelius",q.Athena="Athena",q.BossStatue="Boss Statue",q.MainObjective="Main Objective",q.CurrencyDrainHudOverride="Currency Drain HUD Override",q.CurrencyDrainPopup="Currency Drain Popup",q.MapOverride="Map Override",q.DailyBattles="Daily Battles",q.DailyBossBattles="Daily Boss Battles",q.InitialCutsceneSpawn="Initial Cutscene Spawn",q.FinalCutsceneSpawn="Final Cutscene Spawn"}(Y||(Y={}))},98938:(q,K,z)=>{"use strict";var Y;z.d(K,{t:()=>Y}),function(q){q.BattlePass="battle-pass",q.DailyLoginCalendar="daily-login-calendar",q.Ultimates="ultimates",q.ZoneQuests="zone-quests",q.LocalZoneQuests="local-zone-quests",q.PlayerGoals="ftue-player-goal-quests",q.DynamicStore="dynamic-store",q.Festival="festival",q.StateChallenge="state-challenge",q.NationalCup="national-cup",q.FireflyForest="firefly-forest",q.Shiverchill="shiverchill",q.BonfireSpire="bonfire-spire",q.Skywatch="skywatch",q.ShipwreckShore="shipwreck-shore",q.AcademyEndgame="academy-endgame",q.FireflyForestHard="firefly-forest-hard",q.ShiverchillHard="shiverchill-hard",q.BonfireSpireHard="bonfire-spire-hard",q.SkywatchHard="skywatch-hard",q.ShipwreckShoreHard="shipwreck-shore-hard",q.AcademyEndgameHard="academy-endgame-hard"}(Y||(Y={}))},58776:(q,K,z)=>{"use strict";var Y;z.d(K,{t:()=>Y}),function(q){q.IN_PROGRESS="in-progress",q.COMPLETE="complete",q.STOPPED="stopped"}(Y||(Y={}))},62886:(q,K,z)=>{"use strict";var Y;z.d(K,{T:()=>Y}),function(q){q.ANSWER_QUESTION_CORRECTLY="AnswerQuestionCorrectly",q.ANSWER_QUESTION_INCORRECTLY="AnswerQuestionIncorrectly",q.ATTACH_CLASS_CODE="AttachClassCode",q.ATTACH_PARENT="AttachParent",q.BUTTON_CLICK="ButtonClick",q.CAST_ASTRAL_SPELL="CastAstralSpell",q.CAST_FIRE_SPELL="CastFireSpell",q.CAST_ICE_SPELL="CastIceSpell",q.CAST_NEUTRAL_SPELL="CastNeutralSpell",q.CAST_PHYSICAL_SPELL="CastPhysicalSpell",q.CAST_PLANT_SPELL="CastPlantSpell",q.CAST_SHADOW_SPELL="CastShadowSpell",q.CAST_SPELL="CastSpell",q.CAST_STORM_SPELL="CastStormSpell",q.CAST_WATER_SPELL="CastWaterSpell",q.COLLECT_ITEM="CollectItem",q.COMPLETE_CUTSCENE="CompleteCutscene",q.COMPLETE_LOOT_DASH="CompleteLootDash",q.COMPLETE_PROFILE_QUIZ="CompleteProfileQuiz",q.DEFEAT_ENCOUNTER="DefeatEncounter",q.DEFEAT_QUEST_ENCOUNTER="DefeatQuestEncounter",q.DEFEAT_UNIT="DefeatUnit",q.ENTER_MAP="EnterMap",q.EQUIP_ITEM="EquipItem",q.EVOLVE_PET="EvolvePet",q.FSM_COMPLETE_SEQUENCE="FsmCompleteSequence",q.GAIN_PET_XP="GainPetXp",q.LET_UNIT_ESCAPE="LetUnitEscape",q.LOSE_ANY_BATTLE="LoseAnyBattle",q.MAKE_TASK_PROGRESS="MakeTaskProgress",q.MERGE_PET="MergePet",q.NONE="None",q.OPEN_CHEST="OpenChest",q.PLAY_AFTER_HOURS="PlayAfterHours",q.PLAY_ANY_BATTLE="PlayAnyBattle",q.PLAY_MINUTES="PlayMinutes",q.PURCHASE_FROM_STORE="PurchaseFromStore",q.PURCHASE_ITEM="PurchaseItem",q.PURCHASE_PET_LEVEL="PurchasePetLevel",q.QUEST_OBJECT_STATE_EVALUATED="QuestObjectStateEvaluated",q.RECEIVE_ITEM="ReceiveItem",q.RECEIVE_MULTIPLE_ITEM="ReceiveMultipleItem",q.REMOVE_ITEM="RemoveItem",q.REMOVE_MULTIPLE_ITEM="RemoveMultipleItem",q.RESCUE_PET="RescuePet",q.SPIN_WHEEL="SpinWheel",q.START_QUEST="StartQuest",q.SPEAK_WITH_NPC="SpeakWithNPC",q.TRADE_WITH_ULLA="TradeWithUlla",q.USE_ITEM="UseItem",q.WIN_TUTORIAL_BATTLE="WinTutorialBattle",q.WIN_BATTLE="WinBattle",q.WIN_ANY_BATTLE="WinAnyBattle",q.WIN_LOOT_DASH="WinLootDash"}(Y||(Y={}))},29891:(q,K,z)=>{"use strict";var Y;z.d(K,{s:()=>Y}),function(q){q.ACTIVATE_INFINITE_TIER="ActivateInfiniteTier",q.COMPLETE_TUTORIAL="CompleteTutorial",q.GOT_ITEM="GotItem",q.ENSURE_ITEM="EnsureItem",q.GOT_PET="GotPet",q.MEMBER_JAR_GOT_ITEM="MemberJarGotItem",q.GIVE_BATTLE_PASS_XP="GiveBattlePassXp",q.GIVE_ULTIMATE="GiveUltimate",q.LOAD_PREFAB="LoadPrefab",q.ENABLE_INPUT="EnableInput",q.SHOW_COLLECTED_ITEM="ShowCollectedItem",q.SEND_QUEST_SEGMENT_EVENT="SendQuestSegmentEvent",q.SEND_PLAYER_GOALS_SEGMENT_EVENT="SendPlayerGoalsSegmentEvent",q.SUBTRACT_INFINITE_BATTLE_PASS_XP="SubtractInfiniteBattlePassXp",q.MAKE_TASK_PROGRESS="MakeTaskProgress",q.MARK_QUEST_COMPLETE="MarkQuestComplete",q.MARK_TASK_COMPLETE="MarkTaskComplete",q.PLAY_DIALOGUE="PlayDialogue",q.OFFER_TELEPORT="OfferTeleport",q.SEND_CUSTOM_SEGMENT_EVENT="SendCustomSegmentEvent",q.SEND_TOASTER_NOTIFICATION="SendToasterNotification",q.SET_DAILY_LOGIN_CALENDER_TIMESTAMP="SetDailyLoginCalendarTimestamp",q.REMOVE_UNSECURE_ITEM="RemoveUnsecureItem",q.TELEPORT_TO_MAP="TeleportToMap",q.TRIGGER_STORE_OFFER="TriggerStoreOffer",q.SEND_QUEST_EVENT_VIA_HUB="SendQuestEventViaHub",q.BROADCAST="Broadcast"}(Y||(Y={}))},7247:(q,K,z)=>{"use strict";var Y;z.d(K,{i:()=>Y}),function(q){q.ITEM_RESTRICTIONS="ItemRestrictions",q.SHOP_RESTRICTIONS="ShopRestrictions",q.PET_RESTRICTIONS="PetRestrictions",q.UNIT_RESTRICTIONS="UnitRestrictions",q.UNIQUE_ENCOUNTER_RESTRICTIONS="UniqueEncounterRestrictions"}(Y||(Y={}))},24522:(q,K,z)=>{"use strict";var Y;z.d(K,{n:()=>Y}),function(q){q.DATE_BEFORE="DateIsBefore",q.DATE_AFTER="DateIsAfter",q.HAS_EXPERIMENT_FEATURE="HasExperimentFeature",q.HAS_MEMBER_FEATURE="HasMemberFeature",q.HAS_TOTAL_BATTLE_PASS_XP="HasTotalBattlePassXp",q.HAS_QUEST_SYSTEM="HasGameQuestSystem",q.DAILY_LOGIN_CALENDAR_CHECK_DATE="DailyLoginCalendarCheckDate",q.IS_DURING_SCHOOL_HOURS="IsDuringSchoolHours",q.IS_MEMBER="IsMember",q.HAS_PET_ON_TEAM_WITH_ELEMENT="HasPetOnTeamWithElement",q.ALL_PETS_ON_TEAM_HAVE_ELEMENT="AllPetsOnTeamHaveElement",q.IN_BATTLE_OF_TYPE="InBattleOfType",q.REMAINING_HEALTH="RemainingHealth",q.IS_DURING_WEEKEND="IsDuringWeekend",q.HAS_MET_STATE_CHALLENGE_GOAL="HasMetStateChallengeGoal",q.IS_IN_ZONE="IsInZone",q.IS_WEARING_GEAR="IsWearingGear",q.HAS_APPEARANCE="HasAppearance",q.MEETS_CAMPAIGN_REPLAY_NARRATIVE_REQUIREMENT="MeetsCampaignReplayNarrativeRequirement",q.IS_QUEST_TASK_COMPLETE="IsQuestTaskComplete",q.IS_LEVEL="IsLevel",q.HAS_LOCALE="HasLocale",q.MEETS_FEATURE_REQUIREMENT="MeetsFeatureRequirement",q.BATTLE_HAS_ENEMY="BattleHasEnemy"}(Y||(Y={}))},60157:(q,K,z)=>{"use strict";var Y;function Q(q){return q.taskEventType===Y.Battle}function X(q){return q.taskEventType===Y.Encounter}function Z(q){return q.taskEventType===Y.Item}function J(q){return q.taskEventType===Y.Shop}function tt(q){return q.taskEventType===Y.Pet}function et(q){return q.taskEventType===Y.Unit}z.d(K,{An:()=>et,M6:()=>J,NT:()=>tt,Q9:()=>Q,Rf:()=>X,Z7:()=>Y,hr:()=>Z}),function(q){q.Battle="Battle",q.Encounter="Encounter",q.Item="Item",q.Shop="Shop",q.Pet="Pet",q.StateChallenge="StateChallenge",q.Unit="Unit"}(Y||(Y={}))},65741:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{d:()=>Y,k:()=>Q}),function(q){q.ACTIVE="active",q.INACTIVE="inactive"}(Y||(Y={})),function(q){q.COMPLETED="completed",q.IN_PROGRESS="in-progress",q.NOT_STARTED="not-started"}(Q||(Q={}))},94428:(q,K,z)=>{"use strict";z.d(K,{H9:()=>Q,oW:()=>Y});var Y,Q;!function(q){q.WizardDash="wizardDash"}(Y||(Y={})),function(q){q.PlayerProgressUpdated="playerProgressUpdated",q.QuizEnded="quizEnded"}(Q||(Q={}))},24227:(q,K,z)=>{"use strict";z.d(K,{j:()=>X});var Y=z(87490),Q=z(24652);class X{static getBossElementFromBossType(q){let K;switch(q){case Q.ts.AstralDragon:K=Y.EElementType.Astral;break;case Q.ts.FireDragon:K=Y.EElementType.Fire;break;case Q.ts.PhysicalDragon:K=Y.EElementType.Physical;break;case Q.ts.ShadowDragon:K=Y.EElementType.Shadow;break;case Q.ts.IceWyrm:case Q.ts.IceDragon:K=Y.EElementType.Ice}return null!=K?K:Y.EElementType.Astral}static getRiftsPetReuseCost(q,K,z){var Y,Q,X,Z,J;let tt=0;if(void 0!==K.petCooldownMs&&null!==K.petCooldownMs){const Z=Math.max(0,q.timestamp+(null!==(Y=K.petCooldownMs)&&void 0!==Y?Y:0)-z);tt=Math.ceil(Z/1e3)*(null!==(Q=K.reuseCostPerSecond)&&void 0!==Q?Q:0)*Math.max((null!==(X=K.costMultiplierPerUse)&&void 0!==X?X:0)*q.reuseCount,1)}else tt=(null!==(Z=K.flatCost)&&void 0!==Z?Z:0)*(1+(null!==(J=K.costMultiplierPerUse)&&void 0!==J?J:0)*q.reuseCount);return Math.ceil(tt)}}},24652:(q,K,z)=>{"use strict";z.d(K,{Hz:()=>et,Y1:()=>Y,cn:()=>Q,rI:()=>tt,ts:()=>X,vA:()=>it});var Y,Q,X,Z=z(88022),J=z(36648);!function(q){q.KeystonesUnlocked="keystonesUnlocked",q.LevelLock="levelLock",q.OwnPetsOfElement="ownPetsOfElement",q.OwnPetsOfRarity="ownPetsOfRarity",q.PuppetMasterDefeated="puppetMasterDefeated"}(Y||(Y={})),function(q){q.Normal="normal",q.Boss="boss"}(Q||(Q={})),function(q){q.AstralDragon="astralDragon",q.FireDragon="fireDragon",q.PhysicalDragon="physicalDragon",q.ShadowDragon="shadowDragon",q.IceWyrm="iceWyrm",q.IceDragon="iceDragon"}(X||(X={}));const tt={[X.AstralDragon]:[J.q.Key_pose_dragon_astral],[X.FireDragon]:[J.q.Key_pose_dragon_fire],[X.PhysicalDragon]:[J.q.Key_pose_dragon_physical],[X.ShadowDragon]:[J.q.Key_pose_dragon_shadow],[X.IceWyrm]:[Z._.Ui_prebattle_json,"boss-ice-wyrm"],[X.IceDragon]:[J.q.Key_pose_dragon_ice]},et={[X.AstralDragon]:J.q.Background_boss_rift_sky,[X.FireDragon]:J.q.Background_boss_rift_sky,[X.PhysicalDragon]:J.q.Background_boss_rift_sky,[X.ShadowDragon]:J.q.Background_boss_rift_sky,[X.IceWyrm]:J.q.Background_boss_rift_ice,[X.IceDragon]:J.q.Background_boss_rift_ice},it={[X.AstralDragon]:"NPC_NAME_DRAGON_ASTRAL",[X.FireDragon]:"NPC_NAME_DRAGON_FIRE",[X.PhysicalDragon]:"NPC_NAME_DRAGON_PHYSICAL",[X.ShadowDragon]:"NPC_NAME_DRAGON_SHADOW",[X.IceWyrm]:"NPC_NAME_ICE_WORM",[X.IceDragon]:"NPC_NAME_DRAGON_ICE"}},42448:(q,K,z)=>{"use strict";z.d(K,{BN:()=>J,Bs:()=>vt,CN:()=>rt,JG:()=>pt,N3:()=>ht,Qm:()=>yt,R7:()=>lt,T7:()=>mt,Ty:()=>bt,VS:()=>at,X5:()=>et,_u:()=>gt,a6:()=>it,aK:()=>st,d:()=>ft,fW:()=>ut,h5:()=>nt,ni:()=>ot,vP:()=>Z,wJ:()=>tt});var Y=z(99625),Q=z(64270),X=z(87490);const Z=3;X.EElementType.Astral,X.EElementType.Physical,X.EElementType.Shadow,X.EElementType.Fire;var J,tt,et;!function(q){q[q.PortalOneKey=1]="PortalOneKey",q[q.PortalTwoKey=2]="PortalTwoKey",q[q.PortalThreeKey=3]="PortalThreeKey"}(J||(J={})),function(q){q.RewardDetermined="rewardDetermined"}(tt||(tt={})),function(q){q.Astral="astral",q.Default="default",q.Fire="fire",q.Ice="ice",q.Physical="physical",q.Plant="plant",q.Shadow="shadow",q.Storm="storm",q.Water="water"}(et||(et={}));const it={[et.Astral]:"#A4F1EE",[et.Default]:"#DDB2A5",[et.Fire]:"#FDA97B",[et.Ice]:"#B1F4F5",[et.Physical]:"#C6BCB7",[et.Plant]:"#A6FCA3",[et.Shadow]:"#C8ADFA",[et.Storm]:"#B7B0F0",[et.Water]:"#79BCFD"},st={[et.Astral]:14348986,[et.Default]:14529189,[et.Fire]:16765601,[et.Ice]:15138815,[et.Physical]:15587521,[et.Plant]:14744759,[et.Shadow]:15976433,[et.Storm]:12509680,[et.Water]:9890047},nt={[et.Astral]:"#94E8FD",[et.Default]:"#FFFFFF",[et.Fire]:"#FF9C6D",[et.Ice]:"#91DFF8",[et.Physical]:"#BBB2AD",[et.Plant]:"#9CF19D",[et.Shadow]:"#B9A5F1",[et.Storm]:"#ABA8E6",[et.Water]:"#7FCDFF"},at={[et.Astral]:1,[et.Default]:.15,[et.Fire]:1,[et.Ice]:1,[et.Physical]:1,[et.Plant]:1,[et.Shadow]:1,[et.Storm]:1,[et.Water]:1};var rt,ot;!function(q){q.NoPetsOfElement="noPetsOfElement",q.NoPetsOfRarity="noPetsOfRarity",q.OnlyPetsOfElement="onlyPetsOfElement",q.OnlyPetsOfRarity="onlyPetsOfRarity"}(rt||(rt={})),function(q){q.Portal1="portal1",q.Portal2="portal2",q.Portal3="portal3"}(ot||(ot={}));const ht={id:ot.Portal1,location:{x:640,y:140},shopNpcPrefab:Y.l.Portal1ShopNPC,shopNpcLocation:{x:540,y:340}},ct={id:ot.Portal2,location:{x:280,y:200},shopNpcPrefab:Y.l.Portal2ShopNPC,shopNpcLocation:{x:180,y:400}},dt={id:ot.Portal3,location:{x:1e3,y:200},shopNpcPrefab:Y.l.Portal3ShopNPC,shopNpcLocation:{x:900,y:400}},lt={[ot.Portal1]:ht,[ot.Portal2]:ct,[ot.Portal3]:dt},ut={[ot.Portal1]:J.PortalOneKey,[ot.Portal2]:J.PortalTwoKey,[ot.Portal3]:J.PortalThreeKey},ft={[ot.Portal1]:Q.GA.RiftsPortal1Shop,[ot.Portal2]:Q.GA.RiftsPortal2Shop,[ot.Portal3]:Q.GA.RiftsPortal3Shop},bt={[ot.Portal1]:28,[ot.Portal2]:29,[ot.Portal3]:30},pt={28:ot.Portal1,29:ot.Portal2,30:ot.Portal3};var vt;!function(q){q.DynamicStoreModalHeaderText="RIFTS_DYNAMIC_STORE_MODAL_HEADER_TEXT",q.DynamicStoreModalBodyText="RIFTS_DYNAMIC_STORE_MODAL_BODY_TEXT"}(vt||(vt={}));const gt=["currency","gold","item","pet"],mt=[28,29,30];var yt;!function(q){q.TemporaryMemberModal="TemporaryMemberModal"}(yt||(yt={}))},43516:(q,K,z)=>{"use strict";z.d(K,{v:()=>Y});var Y;z(48417);!function(q){q.OFFER_ACTIVE="Offer active",q.NO_ACTIVE_OFFER="No active offer",q.OFFER_ENDING_SOON="Offer ending soon",q.OFFER_IN_GRACE_PERIOD="Offer in grace period"}(Y||(Y={}))},86913:(q,K,z)=>{"use strict";var Y;z.d(K,{u:()=>Y}),function(q){q.Main="main",q.Side="side",q.FeaturedSpawn="featuredSpawn",q.AfterSchool="afterSchool"}(Y||(Y={}))},24030:(q,K,z)=>{"use strict";z.d(K,{$:()=>Z});var Y,Q=z(98938);!function(q){q.StateChallenge="StateChallengeQuests",q.NationalCup="NationalCupQuests"}(Y||(Y={}));var X=z(8820);const Z=q=>{var K;return null===(K=(q=>{switch(q){case X.a.StateChallenge:return{questId:Y.StateChallenge,tag:Q.t.StateChallenge};case X.a.NationalCup:return{questId:Y.NationalCup,tag:Q.t.NationalCup};default:return}})(q))||void 0===K?void 0:K.questId}},8820:(q,K,z)=>{"use strict";var Y;z.d(K,{a:()=>Y}),function(q){q.StateChallenge="STATE_CHALLENGE",q.NationalCup="NATIONAL_CUP",q.SparkCup="SPARK_CUP",q.None="NONE"}(Y||(Y={}))},43523:(q,K,z)=>{"use strict";z.d(K,{P:()=>Y});const Y=(0,z(77601).gb)({key:"status-effects",activateAssociatedExperiments:1,default:!1})},46701:(q,K,z)=>{"use strict";z.d(K,{Q:()=>Y});const Y=(0,z(77601).gb)({key:"universal-team-selection",activateAssociatedExperiments:1,default:{enabled:!1}})},76253:(q,K,z)=>{"use strict";var Y;z.d(K,{B:()=>Y}),function(q){q.None="",q.FestivalPortal="Festival-Portal",q.MemberLockedRifts="Member-Locked-Rifts",q.MemberLockedRiftsPlay="Member-Locked-Rifts-Play",q.PostBattleFlow="Post-Battle-Flow",q.WizardBank="Wizard-Bank",q.WizardCostumes="Wizard-Costumes"}(Y||(Y={}))},4903:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{W:()=>Q,s:()=>Y}),function(q){q.MemberLockedRiftsMemberIntro="member-locked-rifts-member-intro",q.MemberLockedRiftsNonMemberHome="member-locked-rifts-nonmember-home",q.MemberLockedRiftsNonMemberSchool="member-locked-rifts-nonmember-school",q.PostBattleFlowHome="post-battle-flow-home",q.PostBattleFlowSchool="post-battle-flow-school",q.ArcadiaLink="arcadia-link",q.WizardBank="wizard-bank",q.WizardCostumesTutorial="wizard-costumes-tutorial"}(Y||(Y={})),function(q){q.SD="480",q.HD="720",q.FullHD="1080"}(Q||(Q={}))},80003:(q,K,z)=>{"use strict";z.d(K,{D:()=>Y,d:()=>Z});var Y,Q=z(77601),X=z(63011);!function(q){q.NonMember="non_member",q.Core="core",q.Plus="plus",q.Ultra="ultra"}(Y||(Y={}));const Z=(0,Q.gb)({key:"wizard-bank",activateAssociatedExperiments:1,default:{enabled:!1,allowances:{}},evaluate:q=>q.enabled?q:Object.assign(Object.assign({},q),{allowances:{[Y.Ultra]:{requireAnyMemberFeature:[X.D.ULTRA_BONUS_COINS],reward:{currency:27,value:880},recurrence:"monthly.every.1"}}})})},32389:(q,K,z)=>{"use strict";z.d(K,{q:()=>Y});const Y=(0,z(77601).gb)({key:"wizard-costumes",default:{enabled:!1}})},50654:(q,K,z)=>{"use strict";var Y;z.d(K,{V:()=>Y}),function(q){q.Food="food",q.Potion="potion"}(Y||(Y={}))},95066:(q,K,z)=>{"use strict";var Y;z.d(K,{d:()=>Y}),function(q){q.Increment="increment",q.Decrement="decrement",q.Timing="timing"}(Y||(Y={}))},36525:(q,K,z)=>{"use strict";z.d(K,{i:()=>Y});class Y{constructor(){this.key=null,this.value=null}setKey(q){this.key=q}getKey(){return this.key}setValue(q){this.value=q}getValue(){return this.value}isValid(){return this.validateKey()&&this.validateValue()}serialize(){if(this.isValid())return{key:this.key,value:this.value};throw new Error("Invalid stats data.")}deserialize(q){this.setKey(q.key),this.setValue(q.value)}validateKey(){return"string"==typeof this.key&&this.key.length>0&&(q=>{const K=q.toLowerCase().match(/^([a-z.\-_0-9])+/g);return!!K&&(void 0!==(null==K?void 0:K[0])&&K[0].length===q.length)})(this.key)}validateValue(){return Number.isInteger(this.value)}}},84959:(q,K,z)=>{"use strict";z.d(K,{x:()=>nt});var Y=z(8674),Q=z(79687),X=z(2872),Z=z(85933),J=z(96051);class tt extends J.B{constructor(){super(...arguments),this.name=null}setName(q){this.name=q}getName(){return this.name}isValid(){return this.name&&this.name.isValid()}}var et=z(55110);class it extends J.B{constructor(){super(...arguments),this.appearance=null}setAppearance(q){this.appearance=q}getAppearance(){return this.appearance}isValid(){return this.appearance&&this.appearance.isValid()}}class st extends Z.z{deserialize(q){if(q&&1===q.version){const K=new it;return K.setAppearance(new tt),K.getAppearance().setName(new et.S),null!==q.appearance.name&&void 0!==q.appearance.name&&(K.getAppearance().getName().setFirstName(q.appearance.name.first),K.getAppearance().getName().setMiddleName(q.appearance.name.middle),K.getAppearance().getName().setLastName(q.appearance.name.last),K.getAppearance().getName().setNickname(q.appearance.name.nick)),void 0===K.getAppearance().getName().getNickname()&&K.getAppearance().getName().setNickname(null),K.isValid()?K:null}return null}serialize(q){return q.isValid()?{version:1,appearance:{name:{first:q.getAppearance().getName().getFirstName(),middle:q.getAppearance().getName().getMiddleName(),last:q.getAppearance().getName().getLastName(),nick:q.getAppearance().getName().getNickname()}}}:null}}let nt=class extends X.k{constructor(){super(),this.factoriesContainer=null,this.factoriesContainer=new Q.Container,this.factoriesContainer.bind("v1").to(st)}getPlayer(q){if(this.factoriesContainer.isBound(`v${q.version}`)){return this.factoriesContainer.get(`v${q.version}`).deserialize(q)}return console.log("Unable to deserialize player"),null}getAppearance(q){const K=this.factoriesContainer.get("v1").deserialize({appearance:q,version:1});return K?K.getAppearance():(console.log("Unable to deserialize appearance"),null)}};nt=(0,Y.Cg)([(0,Q.injectable)(),(0,Y.Sn)("design:paramtypes",[])],nt)},55110:(q,K,z)=>{"use strict";z.d(K,{S:()=>Q});var Y=z(96051);class Q extends Y.B{constructor(){super(...arguments),this.firstName=null,this.middleName=null,this.lastName=null,this.nickname=null}setFirstName(q){this.firstName=q}getFirstName(){return this.firstName}setMiddleName(q){this.middleName=q}getMiddleName(){return this.middleName}setLastName(q){this.lastName=q}getLastName(){return this.lastName}setNickname(q){this.nickname=q}getNickname(){return this.nickname}isValid(){const q=null===this.firstName||void 0===this.firstName||this.firstName>0,K=null===this.middleName||void 0===this.middleName||this.middleName>0,z=null===this.lastName||void 0===this.lastName||this.lastName>0,Y=null===this.nickname||void 0===this.nickname||this.nickname>0;return q||console.log(`NameData firstName invalid: ${this.firstName}`),K||console.log(`NameData middleName invalid: ${this.middleName}`),z||console.log(`NameData lastName invalid: ${this.lastName}`),Y||console.log(`NameData nickname invalid: ${this.nickname}`),q&&K&&z&&Y}}},12049:(q,K,z)=>{"use strict";z.d(K,{J:()=>X});var Y=z(95891),Q=z(96051);class X extends Q.B{constructor(){super(...arguments),this.type=null,this.ID=-1,this.cost=[]}getType(){return this.type}setType(q){this.type=q}getID(){return this.ID}setID(q){this.ID=q}getCost(){return this.cost}setCost(q){this.cost=q}isValid(){return null!==this.cost&&this.cost.length>0&&(0,Y.every)(this.cost,(q=>q.isValid()))&&null!==this.type&&this.type.length>0&&this.ID>0}}},96051:(q,K,z)=>{"use strict";z.d(K,{B:()=>Y});class Y{}},85933:(q,K,z)=>{"use strict";z.d(K,{z:()=>Z});var Y,Q=z(8674),X=z(79687);let Z=Y=class{deserializeCollection(q){return Y.deserializeCollection(q,this.deserialize)}serializeCollection(q){return Y.serializeCollection(q,this.serialize)}static deserializeCollection(q,K){const z=[];for(let Y=0;Y{"use strict";z.d(K,{k:()=>X});var Y=z(8674),Q=z(79687);let X=class{};X=(0,Y.Cg)([(0,Q.injectable)()],X)},90661:(q,K,z)=>{"use strict";z.d(K,{O:()=>Y});class Y{static areBitsSet(q,K){return(q&K)===K}static isBitSet(q,K){return Y.areBitsSet(q,1<{"use strict";var Y;z.d(K,{B:()=>Y}),function(q){q.FEATURE_HOUSE_MOVING="FEATURE_HOUSE_MOVING",q.FEATURE_HOUSE_VISITING="FEATURE_HOUSE_VISITING",q.FEATURE_STYLIST="FEATURE_STYLIST",q.FEATURE_CLOUD_MOUNT="FEATURE_CLOUD_MOUNT",q.FEATURE_SOCIAL_FEED="FEATURE_SOCIAL_FEED",q.FEATURE_BADGES="FEATURE_BADGES",q.FEATURE_BATTLE_TUTORIAL="FEATURE_BATTLE_TUTORIAL",q.FEATURE_ACADEMY="FEATURE_ACADEMY",q.FEATURE_ACADEMY_TOWERS="FEATURE_ACADEMY_TOWERS",q.FEATURE_TOWERS_PROMPT="FEATURE_TOWERS_PROMPT",q.FEATURE_SUMMERFEST_CUTSCENES="FEATURE_SUMMERFEST_CUTSCENES",q.FEATURE_SPRINGFEST_CUTSCENES="FEATURE_SPRINGFEST_CUTSCENES",q.FEATURE_STARLIGHT_CUTSCENES="FEATURE_STARLIGHT_CUTSCENES",q.FEATURE_PUMPKINFEST_CUTSCENES="FEATURE_PUMPKINFEST_CUTSCENES",q.FEATURE_WINTERFEST_CUTSCENES="FEATURE_WINTERFEST_CUTSCENES",q.FEATURE_TOWERTOWN="FEATURE_TOWERTOWN",q.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON="BREADCRUMB_CLICKED_WORLD_MAP_BUTTON",q.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE="BREADCRUMB_CLICKED_WORLD_MAP_HOUSE",q.BREADCRUMB_CLICKED_HOUSE_LOCK_BUTTON="BREADCRUMB_CLICKED_HOUSE_LOCK_BUTTON",q.BREADCRUMB_CLICKED_HOUSE_MOVE_BUTTON="BREADCRUMB_CLICKED_HOUSE_MOVE_BUTTON",q.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON="BREADCRUMB_CLICKED_CARD_VISIT_BUTTON",q.BREADCRUMB_CLICKED_CARD_STYLIST_BUTTON="BREADCRUMB_CLICKED_CARD_STYLIST_BUTTON",q.BREADCRUMB_CLICKED_DAB="BREADCRUMB_CLICKED_DAB",q.BREADCRUMB_CLICKED_DAB_EMOTE_BUTTON="BREADCRUMB_CLICKED_DAB_EMOTE_BUTTON",q.BREADCRUMB_CLICKED_DAB_DANCE_BUTTON="BREADCRUMB_CLICKED_DAB_DANCE_BUTTON",q.BREADCRUMB_CLICKED_DAB_DAB_BUTTON="BREADCRUMB_CLICKED_DAB_DAB_BUTTON",q.FEATURE_TUTORIAL="FEATURE_TUTORIAL",q.BREADCRUMB_TUTORIAL_COMPLETE="BREADCRUMB_TUTORIAL_COMPLETE",q.BREADCRUMB_TITAN_INTRO="BREADCRUMB_TITAN_INTRO",q.BREADCRUMB_TITAN_WATCHED_INTRO="BREADCRUMB_TITAN_WATCHED_INTRO",q.BREADCRUMB_TITAN_HARVEY_TALKED="BREADCRUMB_TITAN_HARVEY_TALKED",q.FEATURE_TITAN_UNLOCKED="BREADCRUMB_TITAN_UNLOCKED_HUD_BUTTON",q.BREADCRUMB_TITAN_UNLOCKED_HUD_BUTTON="BREADCRUMB_TITAN_UNLOCKED_HUD_BUTTON",q.BREADCRUMB_TITAN_UNLOCKED_DIALOGUE="BREADCRUMB_TITAN_UNLOCKED_DIALOGUE",q.BREADCRUMB_TITAN_UNLOCKED_BUTTONS="BREADCRUMB_TITAN_UNLOCKED_BUTTONS",q.BREADCRUMB_CLOUD_MOUNT_TOGGLED="BREADCRUMB_CLOUD_MOUNT_TOGGLED",q.BREADCRUMB_SOCIAL_FEED_OPENED="BREADCRUMB_SOCIAL_FEED_OPENED",q.BREADCRUMB_CLICKED_SOCIAL_BUTTON="BREADCRUMB_CLICKED_SOCIAL_BUTTON",q.BREADCRUMB_CLICKED_BADGES_BUTTON="BREADCRUMB_CLICKED_BADGES_BUTTON",q.BREADCRUMB_UNLOCK_ACADEMY="BREADCRUMB_UNLOCK_ACADEMY",q.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE="BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE",q.BREADCRUMB_FIRST_BATTLE_STARTED="BREADCRUMB_FIRST_BATTLE_STARTED",q.BREADCRUMB_FIRST_BATTLE_FINISHED="BREADCRUMB_FIRST_BATTLE_FINISHED",q.BREADCRUMB_FIRST_NEAR_DEFEAT="BREADCRUMB_FIRST_NEAR_DEFEAT",q.BREADCRUMB_FIRST_ENEMY_HURT="BREADCRUMB_FIRST_ENEMY_HURT",q.BREADCRUMB_FIRST_NFACTOR_BONUS="BREADCRUMB_FIRST_NFACTOR_BONUS",q.BREADCRUMB_FIRST_ENERGY_GAINED="BREADCRUMB_FIRST_ENERGY_GAINED",q.BREADCRUMB_FIRST_AOE_READY="BREADCRUMB_FIRST_AOE_READY",q.BREADCRUMB_FIRST_AOA_CHARGED="BREADCRUMB_FIRST_AOA_CHARGED",q.BREADCRUMB_FIRST_AOA_USED="BREADCRUMB_FIRST_AOA_USED",q.BREADCRUMB_AUTO_ATTACK_TUTORIAL="BREADCRUMB_AUTO_ATTACK_TUTORIAL",q.BREADCRUMB_FIRST_PET_RESCUABLE="BREADCRUMB_FIRST_PET_RESCUABLE",q.BREADCRUMB_FIRST_PET_RESCUED="BREADCRUMB_FIRST_PET_RESCUED",q.BREADCRUMB_FREE_RESCUE="BREADCRUMB_FREE_RESCUE",q.BREADCRUMB_EARTH_TOWER="BREADCRUMB_EARTH_TOWER",q.BREADCRUMB_FIRE_TOWER="BREADCRUMB_FIRE_TOWER",q.BREADCRUMB_ICE_TOWER="BREADCRUMB_ICE_TOWER",q.BREADCRUMB_WATER_TOWER="BREADCRUMB_WATER_TOWER",q.BREADCRUMB_STORM_TOWER="BREADCRUMB_STORM_TOWER",q.BREADCRUMB_ACADEMY_SECOND_FLOOR="BREADCRUMB_ACADEMY_SECOND_FLOOR",q.BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES="BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES",q.BREADCRUMB_ACADEMY_NO_KEYSTONES="BREADCRUMB_ACADEMY_NO_KEYSTONES",q.BREADCRUMB_ACADEMY_VISITED="BREADCRUMB_ACADEMY_VISITED",q.BREADCRUMB_COMPLETED_ELEVATOR="BREADCRUMB_COMPLETED_ELEVATOR",q.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE="BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE",q.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE="BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE",q.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE="BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE",q.FIRST_TIME_PROMPT="FIRST_TIME_PROMPT",q.NOOT_TOWER_PROMPT="NOOT_TOWER_PROMPT",q.FEATURE_COOP_BATTLE="FEATURE_COOP_BATTLE",q.BREADCRUMB_COOP_BATTLE_START="BREADCRUMB_COOP_BATTLE_START",q.BREADCRUMB_COOP_PARTY_SELECT="BREADCRUMB_COOP_PARTY_SELECT",q.BREADCRUMB_COOP_CRYSTAL_INTRO="BREADCRUMB_COOP_CRYSTAL_INTRO",q.BREADCRUMB_SUMMERFEST_INTRO="BREADCRUMB_SUMMERFEST_INTRO",q.BREADCRUMB_FIRST_SUMMERFEST_WHEEL_CLICK="BREADCRUMB_FIRST_SUMMERFEST_WHEEL_CLICK",q.BREADCRUMB_FIRST_SUMMERFEST_STYLIST_CLICK="BREADCRUMB_FIRST_SUMMERFEST_STYLIST_CLICK",q.BREADCRUMB_FIRST_SUMMERFEST_NICKNAMER_CLICK="BREADCRUMB_FIRST_SUMMERFEST_NICKNAMER_CLICK",q.BREADCRUMB_STARLIGHT_INTRO="BREADCRUMB_STARLIGHT_INTRO",q.BREADCRUMB_PUMPKINFEST_INTRO="BREADCRUMB_PUMPKINFEST_INTRO",q.BREADCRUMB_WINTERFEST_INTRO="BREADCRUMB_WINTERFEST_INTRO",q.BREADCRUMB_SPRINGFEST_INTRO="BREADCRUMB_SPRINGFEST_INTRO",q.BREADCRUMB_FIRST_SPRINGFEST_DON_ZORRO_CLICK="BREADCRUMB_FIRST_SPRINGFEST_DON_ZORRO_CLICK",q.BREADCRUMB_FIRST_SPRINGFEST_HARRIET_HOOD_CLICK="BREADCRUMB_FIRST_SPRINGFEST_HARRIET_HOOD_CLICK",q.FEATURE_DUNGEONS="BREADCRUMB_FEATURE_DUNGEONS",q.BREADCRUMB_STARTED_CRYSTAL_CAVERNS="BREADCRUMB_STARTED_CRYSTAL_CAVERNS",q.FEATURE_ULTIMATES="FEATURE_ULTIMATES",q.BREADCRUMB_ULTIMATES_FTUE="BREADCRUMB_ULTIMATES_FTUE",q.BREADCRUMB_ULTIMATES_SUBSPACE_NOTIFICATION="BREADCRUMB_ULTIMATES_SUBSPACE_NOTIFICATION",q.FEATURE_ANTI_CHURN_2="BREADCRUMB_FEATURE_ANTI_CHURN_2",q.BREADCRUMB_NEW_MEMBER="BREADCRUMB_NEW_MEMBER",q.BREADCRUMB_SEEN_NEW_MEMBER_AD="BREADCRUMB_SEEN_NEW_MEMBER_AD",q.FEATURE_QUEST_GOALS="FEATURE_QUEST_GOALS",q.BREADCRUMB_NEXT_GOAL_INTRO="BREADCRUMB_NEXT_GOAL_INTRO",q.FEATURE_WEEKLY_CHALLENGE="FEATURE_WEEKLY_CHALLENGE",q.BREADCRUMB_FIRST_CHALLENGE_COMPLETE="BREADCRUMB_FIRST_CHALLENGE_COMPLETE",q.FEATURE_PET_EVOLUTION="FEATURE_PET_EVOLUTION",q.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION="BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION",q.FEATURE_PET_UPGRADE_FTUE="FEATURE_PET_UPGRADE_FTUE",q.BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME="BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME",q.BREADCRUMB_SEEN_YOUR_TEAM_MENU="BREADCRUMB_SEEN_YOUR_TEAM_MENU",q.FEATURE_PET_GEAR="FEATURE_PET_GEAR",q.BREADCRUMB_EQUIP_PET_GEAR_FTUE="BREADCRUMB_EQUIP_PET_GEAR_FTUE",q.BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT="BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT",q.BREADCRUMB_PET_GEAR_FTUE_STEP_START="BREADCRUMB_PET_GEAR_FTUE_STEP_START",q.FEATURE_PETS_IN_ZONES="FEATURE_PETS_IN_ZONES",q.BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE="BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE",q.FEATURE_ZONE_ENTRY_ILLUSTRATION="FEATURE_ZONE_ENTRY_ILLUSTRATION",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_LAMPLIGHT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_LAMPLIGHT",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILL="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILL",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCH="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCH",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIRE="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIRE",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECK="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECK",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTHARD",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLHARD",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHHARD",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREHARD",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKHARD",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTEXPERT",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLEXPERT",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHEXPERT",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREEXPERT",q.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKEXPERT",q.FEATURE_ZONE_LOCK_CUTSCENE="FEATURE_ZONE_LOCK_CUTSCENE",q.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE="BREADCRUMB_PUPPETMASTER_WORLD_MAP_CUTSCENE",q.FEATURE_FIREFLY_QUEST_REVISIONS="FEATURE_FIREFLY_QUEST_REVISIONS",q.BREADCRUMB_SHIVERCHILL_UNLOCKED="BREADCRUMB_SHIVERCHILL_UNLOCKED",q.FEATURE_ZONE_UNLOCKED_POPUP="FEATURE_ZONE_UNLOCKED_POPUP",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE="BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH="BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE="BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH="BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY="BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER="BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO="BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE="BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN="BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT="BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM="BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE="BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE",q.FEATURE_ZONE_UNLOCKED_POPUP_HARD="FEATURE_ZONE_UNLOCKED_POPUP_HARD",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_HARD",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_HARD",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_HARD",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_HARD",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_HARD",q.FEATURE_ZONE_UNLOCKED_POPUP_EXPERT="FEATURE_ZONE_UNLOCKED_POPUP_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_EXPERT",q.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_EXPERT",q.FEATURE_ENDGAME_QUEST="FEATURE_ENDGAME_QUEST",q.BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE="BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE",q.BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE="BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE",q.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE="BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE",q.BREADCRUMB_ENDGAME_QUEST_FIRST_ACADEMY_VISIT_WITH_ALL_GEMS="BREADCRUMB_ENDGAME_QUEST_FIRST_ACADEMY_VISIT_WITH_ALL_GEMS",q.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PIPPET="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PIPPET",q.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY",q.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL",q.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE",q.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK",q.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH",q.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER",q.BREADCRUMB_ENDGAME_QUEST_FIRST_CLICK_POST_PUPPET_MASTER_PEDESTAL="BREADCRUMB_ENDGAME_QUEST_FIRST_CLICK_POST_PUPPET_MASTER_PEDESTAL",q.BREADCRUMB_ENDGAME_QUEST_WALK_SEQUENCE_SEEN="BREADCRUMB_ENDGAME_QUEST_WALK_SEQUENCE_SEEN",q.FEATURE_LEADERBOARD="FEATURE_LEADERBOARD",q.BREADCRUMB_LEADERBOARD_INTRO_VIEWED="BREADCRUMB_LEADERBOARD_INTRO_VIEWED",q.BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED="BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED",q.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED="BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED",q.FEATURE_BATTLE_PASS="FEATURE_BATTLE_PASS",q.BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED="BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED",q.BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED="BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED",q.FEATURE_CHARGED_LEVELS="FEATURE_CHARGED_LEVELS",q.BREADCRUMB_TUTORIAL_REMINDER_MAIL_SENT="BREADCRUMB_TUTORIAL_REMINDER_MAIL_SENT",q.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN="BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN",q.BREADCRUMB_CHARGED_LEVELS_CLEARED="BREADCRUMB_CHARGED_LEVELS_CLEARED",q.FEATURE_PROGRESSION_EVENTS="FEATURE_PROGRESSION_EVENTS",q.FIRST_POST_TUTORIAL_BATTLE_STARTED="FIRST_POST_TUTORIAL_BATTLE_STARTED",q.FIRST_POST_TUTORIAL_BATTLE_WON="FIRST_POST_TUTORIAL_BATTLE_WON",q.BREADCRUMB_REACHED_LEVEL_2="BREADCRUMB_REACHED_LEVEL_2",q.BREADCRUMB_REACHED_LEVEL_3="BREADCRUMB_REACHED_LEVEL_3",q.BREADCRUMB_REACHED_LEVEL_4="BREADCRUMB_REACHED_LEVEL_4",q.BREADCRUMB_REACHED_LEVEL_5="BREADCRUMB_REACHED_LEVEL_5",q.FEATURE_RIFTS="FEATURE_RIFTS",q.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN="BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN",q.BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN",q.BREADCRUMB_RIFTS_FIRST_VISIT_POST_PM_DEFEAT_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_VISIT_POST_PM_DEFEAT_CUTSCENE_SEEN",q.BREADCRUMB_FIRST_RIFT_KEY_OBTAINED="BREADCRUMB_FIRST_RIFT_KEY_OBTAINED",q.BREADCRUMB_RIFTS_GOT_FIRST_DRAGON_ORB="BREADCRUMB_RIFTS_GOT_FIRST_DRAGON_ORB",q.BREADCRUMB_RIFTS_FIRST_DRAGON_ORB_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_DRAGON_ORB_CUTSCENE_SEEN",q.BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN",q.BREADCRUMB_RIFTS_STARTED_FIRST_BOSS_RIFT="BREADCRUMB_RIFTS_STARTED_FIRST_DRAGON_RIFT",q.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS="BREADCRUMB_RIFTS_DEFEATED_FIRST_DRAGON",q.BREADCRUMB_RIFTS_OPENED_RIFT_SELECTION_MENU_FIRST_TIME="BREADCRUMB_RIFTS_OPENED_RIFT_SELECTION_MENU_FIRST_TIME",q.BREADCRUMB_RIFTS_STARTED_FIRST_RIFT_RUN="BREADCRUMB_RIFTS_STARTED_FIRST_RIFT_RUN",q.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_ROUND="BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_ROUND",q.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE="BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE",q.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN="BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN",q.BREADCRUMB_RIFTS_COMPLETED_FIRST_MAX_TIER_RIFT_RUN="BREADCRUMB_RIFTS_COMPLETED_FIRST_MAX_TIER_RIFT_RUN",q.FEATURE_SEGMENTED_OFFERS="FEATURE_SEGMENTED_OFFERS",q.BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE="BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE",q.BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN="BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN",q.BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST="BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST",q.BREADCRUMB_SEGMENTED_OFFERS_SUPPRESS_LAST_CHANCE="BREADCRUMB_SEGMENTED_OFFERS_SUPPRESS_LAST_CHANCE",q.FEATURE_PET_MERGE="FEATURE_PET_MERGE",q.BREADCRUMB_PET_MERGE_FTUE_STARTED="BREADCRUMB_PET_MERGE_FTUE_STARTED",q.BREADCRUMB_PET_MERGE_FTUE_INGREDIENTS_GIVEN="BREADCRUMB_PET_MERGE_FTUE_INGREDIENTS_GIVEN",q.BREADCRUMB_PET_MERGE_FTUE_COMPLETED="BREADCRUMB_PET_MERGE_FTUE_COMPLETED",q.FEATURE_CAMPAIGN_REPLAY="FEATURE_CAMPAIGN_REPLAY",q.BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN="BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN",q.BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN="BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN",q.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE="BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE",q.BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN="BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN",q.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN="BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN",q.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED="BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED",q.BREADCRUMB_CAMPAIGN_REPLAY_HARD_SHIVERCHILL_UNLOCKED="BREADCRUMB_CAMPAIGN_REPLAY_HARD_SHIVERCHILL_UNLOCKED",q.BREADCRUMB_CAMPAIGN_REPLAY_EXPERT_SHIVERCHILL_UNLOCKED="BREADCRUMB_CAMPAIGN_REPLAY_EXPERT_SHIVERCHILL_UNLOCKED",q.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE="BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE",q.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE="BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE",q.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED="BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED",q.FEATURE_UNIQUE_PETS="FEATURE_UNIQUE_PETS",q.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE="BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE",q.FEATURE_RESTRICTIONS="FEATURE_RESTRICTIONS",q.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE="BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET",q.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE="BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE",q.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE="BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST",q.BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE="BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE",q.BREADCRUMB_WHITE_GLOVE_MERGE_FTUE="BREADCRUMB_WHITE_GLOVE_MERGE_FTUE",q.BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE="BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE",q.BREADCRUMB_WHITE_GLOVE_RARITY_FTUE="BREADCRUMB_WHITE_GLOVE_RARITY_FTUE",q.BREADCRUMB_WHITE_GLOVE_LEVEL_FTUE="BREADCRUMB_WHITE_GLOVE_PET_LEVEL_FTUE",q.FEATURE_AFTER_SCHOOL_WIDGET="FEATURE_AFTER_SCHOOL_WIDGET",q.BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED="BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED",q.FEATURE_STATUS_EFFECTS="FEATURE_STATUS_EFFECTS",q.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED="BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED",q.BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE="BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE",q.FEATURE_MAGICOIN_BATTLE_REWARDS="FEATURE_MAGICOIN_BATTLE_REWARDS",q.BREADCRUMB_MAGICOIN_BATTLE_REWARDS_MODAL_SEEN="BREADCRUMB_MAGICOIN_BATTLE_REWARDS_MODAL_SEEN"}(Y||(Y={}))},7408:(q,K,z)=>{"use strict";z.d(K,{C:()=>Z});var Y=z(15821);class Q{constructor(q){this.name="",this.breadcrumbs={},this.name=q}addBreadcrumb(q,K,z){return K>=0&&K<32?this.breadcrumbs[q]={index:K,completes:z}:console.log(`addBreadcrumb - Breadcrumb was not added. index must be between [0, 32], provided index was ${K}`),this}getBreadcrumbMask(q){return Y.A.isDefined(this.breadcrumbs[q])?1<{"use strict";z.d(K,{V:()=>X});const Y=JSON.parse('{"currency-27":{"currency-1":{"from":[1,20,40,190,340,860,1600,5600],"to":[1,45,100,525,1060,2850,5670,20000],"roundToNearest":1},"currency-13":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-15":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-12":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-14":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-16":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-11":{"from":[1,25,100,200,500,1000,10000],"to":[1,5,18,146,1170,5266,13458],"roundToNearest":1},"currency-3":{"from":[1,25,100,200,500,1000,10000],"to":[1,5,18,146,1170,5266,13458],"roundToNearest":1},"currency-19":{"from":[1,25,100,200,500,1000,10000],"to":[1,5,18,146,1170,5266,13458],"roundToNearest":1}}}');var Q=z.t(Y,2);class X{static setOverrideRates(q){Object.keys(q).forEach((K=>{X.EXCHANGE_DATA[K]=Object.assign(Object.assign({},X.EXCHANGE_DATA[K]),q[K])}))}static from(q){return{to:X.getExchangeRate.bind(X,q)}}static applyExchangeRate(q,K){var z,Y;if(q<=0)return 0;if(X.isLinearExchangeRate(K))return X.roundToNearest(q*K,1);if(0===K.from.length||0===K.to.length||K.from.length!==K.to.length)return q;if(1===K.to.length)return X.roundToNearest(q*(K.to[0]/K.from[0]),null!==(z=K.roundToNearest)&&void 0!==z?z:1);const Q=K.from.findIndex((K=>K>q)),Z=-1===Q?K.from.length-2:0===Q?0:Q-1,J=K.from[Z],tt=K.from[Z+1],et=K.to[Z],it=K.to[Z+1],st=q-J;return X.roundToNearest(et+st*(it-et)/(tt-J),null!==(Y=K.roundToNearest)&&void 0!==Y?Y:1)}static roundToNearest(q,K){return Math.ceil(q/K)*K}static getExchangeRate(q,K){var z,Y,Q,Z;const J=`currency-${q}`,tt=`currency-${K}`;if(null===(z=X.EXCHANGE_DATA[J])||void 0===z?void 0:z[tt])return null===(Y=X.EXCHANGE_DATA[J])||void 0===Y?void 0:Y[tt];if(null===(Q=X.EXCHANGE_DATA[tt])||void 0===Q?void 0:Q[J]){const q=null===(Z=X.EXCHANGE_DATA[tt])||void 0===Z?void 0:Z[J];return X.isLinearExchangeRate(q)?1/q:{from:q.to,to:q.from}}return 1}static isLinearExchangeRate(q){return"number"==typeof q}}X.EXCHANGE_DATA=Object.assign({},Q)},77601:(q,K,z)=>{"use strict";z.d(K,{gb:()=>Z,mq:()=>tt,y8:()=>J});var Y=z(8674);const Q=Symbol(),X={};function Z({key:q,activateAssociatedExperiments:K=0,evaluate:z,default:Z}){const J="object"==typeof K?K.when:K,tt="object"==typeof K?K.canActivate:()=>(0,Y.sH)(this,void 0,void 0,(function*(){return!0})),et=(q,K)=>{tt(q,K).then((q=>{q&&K.ensureExperimentActivated()}))},it=()=>{};let st=it,nt=it;switch(J){case 0:st=et;break;case 1:nt=et}return X[q]={key:q,onSetup:st,onPostEvaluate:nt,evaluate:null!=z?z:q=>q,default:Z},{[Q]:void 0,key:q,toString:()=>`Feature(${q})`}}function J(){return Object.keys(X)}class tt{constructor(q){this._featureContexts={},this._activatedExperiments={};const K=Object.create(q.contextBase);K.evaluate=q=>this.evaluate(q),this._sharedContext=K,this._innerGetFeature=q.get,this._activateExperimentForFeature=K=>{var z;if(!q.activate)return;const Y=this._innerGetFeature(K);if(!(null===(z=Y.experimentResult)||void 0===z?void 0:z.inExperiment)||!Y.experiment)return;const Q=Y.experiment.key;this._activatedExperiments[Q]||(q.activate(Y),this._activatedExperiments[Q]=!0)}}setup(){for(const q of Object.keys(X)){const K=this.getOrCreateFeatureContext(q);K[Q].onSetup(this.evaluateSilent(K),K)}}evaluate(q){const K=this.getOrCreateFeatureContext(q);if(!K)return this._innerGetFeature(et(q)).value;const z=this.evaluateSilent(K);return K[Q].onPostEvaluate(z,K),z}evaluateSilent(q){var K;const z=q[Q],Y=null!==(K=this._innerGetFeature(z.key).value)&&void 0!==K?K:z.default;return z.evaluate(Y,q)}getOrCreateFeatureContext(q){const K=X[et(q)];if(!K)return;if(K.key in this._featureContexts)return this._featureContexts[K.key];const z=Object.create(this._sharedContext);return z[Q]=K,z.ensureExperimentActivated=()=>this._activateExperimentForFeature(K.key),this._featureContexts[K.key]=z,z}static irreversibleClearGlobalState(){for(const q of Object.keys(X))delete X[q]}}function et(q){return"string"==typeof q?q:q.key}},1717:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{$:()=>Q,u:()=>Y}),function(q){q.RequireAny="RequireAny",q.RequireAll="RequireAll",q.RequireNone="RequireNone"}(Y||(Y={})),function(q){q.Rescue="rescue",q.EvolutionTier="evolution",q.Element="element",q.Level="level",q.MergeRank="mergeRank",q.Rarity="rarity"}(Q||(Q={}))},8394:(q,K,z)=>{"use strict";z.d(K,{p:()=>J,u:()=>tt});var Y=z(10471),Q=z(50508);const X=[].concat(["pet"]).concat(["riftRunKey"]).concat(["costume"]).concat(Q.p),Z={currency:Y.B};function J(q,K){var z;return X.includes(q)||(null===(z=Z[q])||void 0===z?void 0:z.includes(K))}function tt(q,K){return 1===arguments.length?K=>tt(q,K):!!K&&K.type===q}},12596:(q,K,z)=>{"use strict";z.d(K,{R:()=>Y});class Y{static parseDateToTimestamp(q){if(null==q)return;if("number"==typeof q)return q;if(""===q)return;const K=new Date(q).getTime();return isNaN(K)?void 0:K}}},48417:(q,K,z)=>{"use strict";z.d(K,{D:()=>Y});const Y={AfterSchoolWidget:{GetRewardsStatus:"afterSchoolWidget.getRewardStatus",ClaimReward:"afterSchoolWidget.claimReward",ResetState:"afterSchoolWidget.resetState"},Battle:{Start:"battle.start",Action:"battle.action",Resume:"battle.resume",Escape:"battle.escape",Debug:{KillGore:"battle.debug.killGore",PreventDefeat:"battle.debug.preventDefeat",ForceBattleResult:"battle.debug.forceBattleResult",OverrideHomeTeamAffixes:"battle.debug.overrideHomeTeamAffixes",OverrideAwayTeamAffixes:"battle.debug.overrideAwayTeamAffixes",AddStatusEffectToUnits:"battle.debug.addStatusEffectToUnits",RemoveStatusEffectsFromUnit:"battle.debug.removeStatusEffectsFromUnit",OverrideUnitDodgeChance:"battle.debug.overrideUnitDodgeChance",SetUnitHealth:"battle.debug.setUnitHealth",SimulateBattle:"battle.debug.simulateBattle.start",SimulateStatusEffectCalculations:"battle.debug.simulateStatusEffectCalculations"},Duel:{CancelInvite:"battle.duel.cancelInvite",CreateChannel:"battle.duel.createChannel",Join:"battle.duel.join",RejectInvite:"battle.duel.rejectInvite",SendInvite:"battle.duel.sendInvite",WaitPing:"battle.duel.waitPing",OpponentDisconnect:"battle.duel.opponentDisconnect"},ClearBattleState:"battle.clearBattleState"},BattlePass:{GetPastUnclaimedRewards:"battlePass.getPastUnclaimedRewards",ClaimPastRewards:"battlePass.claimPastRewards",CompleteExpiredClaimTasks:"battlePass.completeExpiredClaimTasks",GetBattlePassXpData:"battlePass.getBattlePassXpData",Debug:"battlePass.debug",UpdateActiveQuests:"battlePass.updateActiveQuests"},BattleStats:{RecordEnd:"battleStats.recordEnd",GetBattleStats:"battleStats.getBattleStats",Debug:{OverrideMatchmakingBattleStreak:"battleStats.debug.overrideMatchmakingBattleStreak"}},CampaignReplay:{SetFeatureProgress:"campaignReplay.setFeatureProgressFromClient",GetCampaignReplayData:"campaignReplay.getCampaignReplayData",UnlockDifficultyMode:"campaignReplay.unlockDifficultyMode",SetCurrentDifficulty:"campaignReplay.setCurrentDifficulty",Debug:{ForceUnlockDifficultyMode:"campaignReplay.debugForceUnlockDifficultyMode",ResetData:"campaignReplay.debugResetData"}},Character:{CheckItems:"character.checkItems",Update:"character.update",ToolsUpdate:"character.toolsUpdate",GetFields:"character.getFields",GetFieldsOnInitialLogin:"character.getFieldsOnInitialLogin",GetMultiple:"character.getMultiple",GetPlayerAppearance:"getPlayerAppearance",UpdateCachedAppearance:"updateCachedAppearance"},ChargedLevels:{AbandonChargedLevelLosses:"chargedLevels.AbandonChargedLevelLosses",RecuperateChargedLevelLosses:"chargedLevels.RecuperateChargedLevelLosses",GetChargedLevelProgressData:"chargedLevels.GetChargedLevelProgressData",SendTutorialReminderMailer:"chargedLevels.sendTutorialReminderMailer",AwardMemberOnlyChargedLevelXp:"chargedLevels.awardMemberOnlyChargedLevelXp",UpdateDecayImmunity:"chargedLevels.updateDecayImmunity",ClearChargedLevelData:"chargedLevels.clearChargedLevelData",Debug:{SetChargedLevel:"chargedLevels.debug.setChargedLevel"}},Cooldowns:{SetCooldownFromNow:"setCooldownFromNow",SetCooldownFromCategory:"setCooldownFromCategory",Debug:{SetCooldownTimestamp:"cooldowns.debug.setCooldownTimestamp",ClearCooldown:"cooldowns.debug.clearCooldown",ClearAllCooldowns:"cooldowns.debug.clearAllCooldowns"}},CustomerSupport:{AfterCharacterChanged:"customerSupport.afterCharacterChanged"},DailyLoginCalendar:{UpdateActiveQuests:"dailyLoginCalendar.updateActiveQuests"},Debug:{ResetPlayer:"debug.resetPlayer",RemoveAllPets:"debug.removeAllPets",ForceCompleteFtueQuest:"debug.forceCompleteFtueQuest"},DuelsStadium:{GetAllDailyDuelsUsed:"duelsStadium.getAllDailyDuelsUsed"},DynamicStore:{Debug:{AddDefeatedPet:"store.debug.addDefeatedPet",RemoveDefeatedPet:"store.debug.removeDefeatedPet",ListDefeatedPets:"store.debug.listDefeatedPets",ClearDefeatedPets:"store.debug.clearDefeatedPets",ResetStoreProgress:"store.debug.resetStoreProgress"},PurchaseItem:"store.purchaseItem",GetStore:"store.getStore",GetStoreConfiguration:"store.getStoreConfiguration",GetNextSectionExpiry:"store.getNextSectionExpiry",GetHudWidgetItems:"store.getHudWidgetItems"},Education:{ReloadEducationData:"education.reloadEducationData"},ElementalBoosts:{GetCurrentElementalBoost:"elementalBoosts.GetCurrentElementalBoost",UpdateElementalBoosts:"elementalBoosts.UpdateElementalBoosts"},Endgame:{Debug:{SetProgress:"endgame.debug.setProgress"},GetProgress:"endgame.getProgress",SetProgress:"endgame.setProgress"},Events:{EnterWorld:"events.enterWorld"},Experiment:{LoadOverrides:"experiment.loadOverrides"},Festival:{GetChestData:"festival.getChestData",SetChestDate:"festival.setChestDate",SetChestSpins:"festival.setChestSpins",GetSeenCompletedTaskData:"festival.getSeenCompletedTaskData",SetCompletedTasksSeen:"festival.setCompletedTasksSeen"},FeaturedSpawn:{GetConfig:"featuredSpawn.getConfig"},GameStore:{GetStore:"gameStore.getStore"},HardCurrency:{Spend:"hardCurrency.spend",GrantCaptureTutorialMagicoin:"hardCurrency.grantCaptureTutorialMagicoin",ClaimMonthlyAllowance:"hardCurrency.claimMagicoinAllowance",ClaimAllowances:"hardCurrency.claimAllowances",GetAllowanceClaimData:"hardCurrency.getAllowanceClaimData"},Hud:{GetHudData:"Hud.getHudData"},Interactables:{OpenInteractable:"interactables.openInteractable",GetInteractableDropRate:"interactables.getInteractableDropRate",GetCooldowns:"interactables.getCooldowns",SetCooldown:"interactables.setCooldown"},LegacySpawn:{GetLegacySpawnData:"legacySpawn.getLegacySpawnData"},LootDash:{CompleteLootDashMatch:"lootDash.completeLootDashMatch",Debug:"lootDash.debug",SavePreviousMatchData:"lootDash.savePreviousMatchData",StartLootDashMatch:"lootDash.startLootDashMatch"},MagicoinBattleRewards:{ClaimMemberRewards:"magicoinBattleRewards.claimMemberRewards"},MemberJar:{GetMemberJarData:"memberJar.getMemberJarData",UpdateMemberJarRewards:"memberJar.updateMemberJarRewards",ResetMemberJarData:"memberJar.resetMemberJarData"},MembershipUpgradeReward:{CheckMemberUpgradeReward:"membershipUpgradeReward.checkMemberUpgradeReward",GetCollectedRewardsData:"membershipUpgradeReward.getCollectedRewardsData",CollectMemberUpgradeReward:"membershipUpgradeReward.collectMemberUpgradeReward"},Mail:{DeleteMail:"mail.deleteMail",DebugMail:"mail.debugMail",ReadMail:"mail.readMail",CollectMailRewards:"mail.collectMailRewards"},MultiplayerMessage:{SendMessage:"MultiplayerMessage.sendMessage"},StateChallenge:{StateChallengeRewards:"StateChallenge.sendMailRewards",NationalCupRewards:"StateChallenge.sendNationalCupMailRewards",GetStateChallengeGoalsData:"StateChallenge.getStateChallengeGoalsData",ClaimStateChallengeGoalsRewards:"StateChallenge.claimStateChallengeGoalsRewards",ClaimPreviousStateChallengeGoalsRewards:"StateChallenge.claimPreviousStateChallengeGoalsRewards",HasUnclaimedPreviousStateChallengeGoalsRewards:"StateChallenge.hasUnclaimedPreviousStateChallengeGoalsRewards",GetMilestonesRewardDataForEducation:"StateChallenge.getMilestonesRewardDataForEducation",GetEndOfChallengeRewards:"StateChallenge.getEndOfChallengeRewards",GetRewardsGrantingPeriodEndDate:"StateChallenge.getRewardsGrantingPeriodEndDate",GetProdigyCupConfigData:"StateChallenge.getProdigyCupConfigData"},OTP:{FetchOptions:"otp.fetchOptions",CollectPurchasedItems:"otp.collectPurchasedItems",UpdatePurchaseHistory:"otp.updatePurchaseHistory"},PetInventory:{GetPetInventoryData:"petInventory.getPetInventoryData",UpdateSlots:"petInventory.updateSlots",SetSlots:"petInventory.setSlots"},PetGearInventory:{CreateItem:"petGearInventory.createItem",SeenItem:"petGearInventory.seenItem",ListItem:"petGearInventory.listItem",ClearItems:"petGearInventory.clearItems",DeleteItems:"petGearInventory.deleteItem",ReceiveAdGift:"petGearInventory.receiveAdGift"},PetMerge:{Debug:{BulkUpdatePetMergeRank:"petMerge.debug.bulkUpdatePetMergeRank"},PerformMergeAction:"petMerge.performMergeAction"},Quests:{GetQuestData:"quests.getQuestData",GetQuestProgress:"quests.getQuestProgress",SendQuestEvent:"quests.sendQuestEvent",SetQuestTaskProgressTimestamp:"quests.setQuestTaskProgressTimestamp"},QuickQuiz:{Debug:"quickQuiz.debug",End:"quickQuiz.end",Start:"quickQuiz.start"},Restrictions:{GetRestrictionOffers:"restrictions.getRestrictionOffers",MarkFreeRestrictionOfferClaimed:"restrictions.markFreeRestrictionOfferClaimed"},Rifts:{AttemptSecureUnlockNextRiftTier:"rifts.attemptSecureUnlockNextRiftTier",Debug:{AddRiftsKeys:"rifts.debug.addRiftsKeys",AddRiftsStoreCurrency:"rifts.debug.addRiftsStoreCurrency",SetRiftRunDebug:"rifts.debug.setRiftRunDebug"},ExpireRiftPetCooldown:"rifts.expireRiftPetCooldown",GetTierData:"rifts.getTierData",GetConfig:"rifts.getConfig",GetFirstTimeRewardsData:"rifts.getFirstTimeRewardsData",GetInventory:"rifts.getInventory",GetSelectedPortal:"rifts.getSelectedPortal",RerollRiftBuffModifier:"rifts.rerollRiftBuffModifier",RerollRiftOpponents:"rifts.rerollRiftOpponents",ResetRiftRun:"rifts.resetRiftRun",ReuseRiftPet:"rifts.reuseRiftPet",UpdateRiftsConfigVersion:"rifts.updateRiftsConfigVersion",StartRiftRun:"rifts.startRiftRun",StartBossRift:"rifts.startBossRift",UpdateSelectedPortal:"rifts.updateSelectedPortal",UpdateTierUnlockProgress:"rifts.updateTierUnlockProgress"},SecureInventory:{DebugGiveSecureItems:"secureInventory.debugGiveSecureItems",RemoveAllSecureItemsByType:"secureInventory.removeAllSecureItemsByType"},SegmentedOffers:{RedeemOffer:"segmentedOffers.redeemOffer",GetOffers:"segmentedOffers.getOffers"},Social:{GetFriendsStatuses:"social.getFriendsStatuses",SetStatus:"social.setStatus"},Time:{GetPlayerTimezoneOffset:"time.getPlayerTimezoneOffset",GetPlayerTimezoneEntity:"time.getPlayerTimezoneEntity",SetPlayerDebugTime:"time.setPlayerDebugTime"},Ultimates:{GetQuestData:"ultimates.getQuestData",GetQuestProgress:"ultimates.getQuestProgress",SendQuestEvent:"ultimates.sendQuestEvent",GetQuestBattleData:"ultimates.getQuestBattleData",UpdateActiveQuests:"ultimates.updateActiveQuests"},Kennel:{UnsecureAdd:"kennel.unsecureAdd",Update:"kennel.update",Remove:"kennel.remove",Evolve:"kennel.evolve",MemberUpgradeEvolve:"kennel.memberUpgradeEvolve",Migrate:"kennel.migrate",Claim:"kennel.claim"},Videos:{GetConfig:"videos.getConfig"},WeekendEvents:{UpdateActiveQuests:"weekendEvents.updateActiveQuests",GetCurrentEventsData:"weekendEvents.getCurrentEventsData",GetFestivalConfigData:"weekendEvents.getFestivalConfigData",CompletePastFestivals:"weekendEvents.completePastFestivals"},WizardCostumes:{Debug:"wizardCostumes.debug",MarkCostumesSeen:"wizardCostumes.markCostumesSeen"},WizardWatch:{GetWizardWatchData:"wizardWatch.getWizardWatchData"},WeeklyChallenge:{GetWeeklyChallengeData:"weeklyChallenge.getWeeklyChallengeData"},World:{CreateChannel:"world.createChannel",GetWorldList:"world.getWorldList"},ZoneMap:{CreateChannel:"zonemap.createChannel"},UniversalTeamSelect:{GetUtsConfig:"universalTeamSelect.getUtsConfig"},AssetExperiments:{getAllExperimentsWithCustomData:"assetExperiments.getAllExperimentsWithCustomData",getAssetsForExperimentsVariations:"assetExperiments.getAssetsForExperimentsVariations"},WizardName:{GetWizardNames:"wizardName.getWizardNames"}}},5491:(q,K,z)=>{"use strict";var Y;z.d(K,{V:()=>Y}),function(q){q.Pet="pet",q.Dorm="dorm",q.Follow="follow",q.Player="player"}(Y||(Y={}))},17446:(q,K,z)=>{"use strict";var Y;z.d(K,{E:()=>Y}),function(q){q[q.Common=0]="Common",q[q.Uncommon=1]="Uncommon",q[q.Rare=2]="Rare",q[q.Heroic=3]="Heroic",q[q.Legendary=4]="Legendary"}(Y||(Y={}))},65240:(q,K,z)=>{"use strict";var Y;z.d(K,{C:()=>Y}),function(q){q.Achievement="Achievement",q.AfterSchoolWidget="after_school_widget",q.BattleChest="battle-chest",q.BattlePass="treasure-track",q.Shop="game_shop",q.Container="container",q.DailyLoginCalendar="daily_login_calendar_reward",q.UnifiedStore="unified_store",q.Interactable="Interactable",q.LevelUp="level-up",q.WorldChest="world-chest",q.WorldMemberChest="world-member-chest",q.QuestChest="quest-chest",q.QuestReward="quest-reward",q.Festival="festival",q.FestivalPrizeWheel="festival-prize-wheel",q.FestivalBossLootWheel="festival-boss-loot-wheel",q.MiniGame="mini-game",q.PrizeWheel="prize-wheel",q.Battle="battle",q.Npc="npc",q.Leaderboard="leaderboard",q.ParentGoals="parent-goal",q.ConversionJar="conversion-jar",q.ConversionOffer="conversion-offer",q.PetSlots="pet-slots",q.PetEvolution="pet-evolution",q.PetMerge="pet_merge",q.PetRescue="pet-rescue",q.PostBattle="post-battle",q.StateChallengeMilestone="state_challenge_milestone",q.StateChallengeOnboarding="state_challenge_onboarding",q.StateChallengePodium="state_challenge_podium",q.Tutorial="tutorial",q.PetRoster="pet-roster",q.WizardDashLootBag="wizard_dash_loot_bag",q.InitialMemberBonus="initial-member-bonus",q.ChargedLevelRenewal="charged-level-renewal",q.DynamicStore="DynamicStore",q.RemoveUnsecureItem="remove-unsecure-item",q.FestivalDailyRespawnBossBattle="festival-daily-respawn-boss-battle",q.FestivalCurrencyReset="festival-currency-reset",q.FestivalCurrencyConversion="festival-currency-conversion",q.Otp="otp",q.WhiteGloveService="white-glove-service",q.WizardBank="wb_modal"}(Y||(Y={}))},63011:(q,K,z)=>{"use strict";var Y;z.d(K,{D:()=>Y}),function(q){q.BATTLE_PASS_PREMIUM="battlepass_premium",q.DAILY_LOGIN_CALENDAR_ULTIMATE_REWARD="daily_login_calendar_ultimate_reward",q.DAILY_LOGIN_CALENDAR_THRESHOLD_REWARD="daily_login_calendar_threshold_reward",q.LEGACY_EPICS="epics_v1",q.WIZARD_DASH_LEVEL_1_REVIVES="wizard_dash_level_1_revives",q.WIZARD_DASH_LEVEL_2_REVIVES="wizard_dash_level_2_revives",q.MYTHICAL_EPICS="epics_v2",q.ULTIMATE_MEMBERBOX="ultimate_memberbox",q.CORE_COINS="coins_350",q.PLUS_AND_ULTRA_COINS="coins_720",q.ULTRA_BONUS_COINS="bonus_coins_880",q.ULTIMATE_BONUS_COINS="bonus_coins_ultimate_bundle_880",q.CHARGED_LEVELS_DECAY_IMMUNITY="charged_levels_decay_immunity",q.MEMBERSHIP_UPGRADE_REWARD_SMALL="membership_upgrade_reward_small",q.MEMBERSHIP_UPGRADE_REWARD_MEDIUM="membership_upgrade_reward_medium",q.MEMBERSHIP_UPGRADE_REWARD_LARGE="membership_upgrade_reward_large",q.PET_MERGE_UPSELL_REPEATABLE="pet_merge_upsell_repeatable",q.PET_EVOLUTION_UPSELL_REPEATABLE="pet_evolution_upsell_repeatable",q.MEMBER_LEVEL_BOOST="member_level_boost"}(Y||(Y={}))},66582:(q,K,z)=>{"use strict";var Y;z.d(K,{_$:()=>Y,kG:()=>X,rH:()=>Q}),function(q){q[q.NonMember=0]="NonMember",q[q.MemberLevelUp=1]="MemberLevelUp",q[q.MemberUltimateMath=2]="MemberUltimateMath",q[q.MemberUltimateBundle=3]="MemberUltimateBundle",q[q.MemberCore=101]="MemberCore",q[q.MemberPlus=102]="MemberPlus",q[q.MemberUltra=103]="MemberUltra"}(Y||(Y={}));const Q={[Y.NonMember]:"NonMember",[Y.MemberLevelUp]:"MemberLevelUp",[Y.MemberUltimateMath]:"MemberUltimateMath",[Y.MemberUltimateBundle]:"MemberUltimateBundle",[Y.MemberCore]:"MemberCore",[Y.MemberPlus]:"MemberPlus",[Y.MemberUltra]:"MemberUltra"},X=[Y.MemberUltra,Y.MemberUltimateBundle,Y.MemberUltimateMath]},2952:(q,K,z)=>{"use strict";var Y;z.d(K,{P:()=>Y}),function(q){q.FX="fx",q.Move="move",q.HostTeam="create_co_op_team",q.TeamDisbanded="co_op_team_disbanded",q.TeamUpdated="co_op_team_updated",q.HostHeartbeat="co_op_host_heartbeat",q.SyncHealth="co_op_health_sync",q.PlayerAttacked="player_attacked",q.PlayersDefeated="players_defeated",q.TitanAttacked="titan_attacked",q.TitanDefeated="titan_defeated",q.Chat="chat",q.Catapult="catapult",q.Transform="transform",q.Change="change",q.Info="info",q.CoopTeam="coopTeam"}(Y||(Y={}))},17516:(q,K,z)=>{"use strict";var Y;z.d(K,{m:()=>Y}),function(q){q.DuelInvite="DuelInvite",q.DuelInviteRejection="DuelInviteRejection",q.DuelInviteCancellation="DuelInviteCancellation",q.RequestJoinTeam="request_co_op_team_join",q.JoinTeam="join_co_op_team",q.JoinTeamFailed="join_co_op_team_failed",q.ReloadEducationData="reload_education_data",q.StartCoOpTitanMatch="start_co_op_titan",q.QuestionAnswered="question_answered",q.PlayerLeftTeam="co_op_player_left_team",q.PlayerRejoinTeam="co_op_player_rejoin_team",q.PlayerJoined="player_joined",q.QuickQuizJoinRequest="quick_quiz_join_request"}(Y||(Y={}))},92579:(q,K,z)=>{"use strict";var Y;z.d(K,{a:()=>Y}),function(q){q.offline="offline",q.available="available",q.unavailable="unavailable"}(Y||(Y={}))},73678:(q,K,z)=>{"use strict";var Y;z.d(K,{A_:()=>Y,D3:()=>Q,s0:()=>X}),function(q){q.FOREST="forest",q.SHIVERCHILL="shiverchill",q.SKYWATCH="skywatch",q.BONFIRE="bonfire_spire",q.SHIPWRECK="shipwreck_shore",q.ACADEMY="academy",q.FORESTHARD="forest_hard",q.SHIVERCHILLHARD="shiverchill_hard",q.SKYWATCHHARD="skywatch_hard",q.BONFIREHARD="bonfire_spire_hard",q.SHIPWRECKHARD="shipwreck_shore_hard",q.ACADEMYHARD="academy_hard",q.FORESTEXPERT="forest_expert",q.SHIVERCHILLEXPERT="shiverchill_expert",q.SKYWATCHEXPERT="skywatch_expert",q.BONFIREEXPERT="bonfire_spire_expert",q.SHIPWRECKEXPERT="shipwreck_shore_expert",q.ACADEMYEXPERT="academy_expert",q.LAMPLIGHT="lamplight",q.DYNO="dyno",q.HOUSE="house",q.DARKTOWER="darktower",q.ARCHIVES="archives",q.EARTHTOWER="earthtower",q.ICETOWER="icetower",q.STORMTOWER="stormtower",q.FIRETOWER="firetower",q.WATERTOWER="watertower",q.ASTRALTOWER="astraltower",q.TOWERTOWN="tower_town",q.CRYSTALCAVERNS="crystal_caverns",q.DRAGONISLE="dragon_isle",q.MOON="moon",q.SPRINGFESTGROTTO_BUNNY="springfest_grotto_bunny",q.SPRINGFESTGROTTO_FOX="springfest_grotto_fox"}(Y||(Y={}));const Q=[Y.BONFIRE,Y.FOREST,Y.SHIPWRECK,Y.SHIVERCHILL,Y.SKYWATCH],X=[...[Y.FOREST,Y.SHIVERCHILL,Y.BONFIRE,Y.SHIPWRECK,Y.SKYWATCH],...[Y.FORESTHARD,Y.SHIVERCHILLHARD,Y.BONFIREHARD,Y.SHIPWRECKHARD,Y.SKYWATCHHARD]]},10044:(q,K,z)=>{"use strict";var Y;z.d(K,{y:()=>Y}),function(q){q[q.Left=1]="Left",q[q.Right=-1]="Right"}(Y||(Y={}))},61468:(q,K,z)=>{"use strict";z.d(K,{l:()=>Z});var Y=z(95891),Q=z.n(Y),X=z(15821);class Z{static getRandomItem(q,K=0,z=0){let Y=z;if(!q)return null;z<1&&(Y=q.length);const Q=K+Math.floor(Math.random()*Y);return void 0===q[Q]?null:q[Q]}static getAddedItems(q,K){return K.filter((K=>!q.includes(K)))}static countUniqueItems(q){return new Set(q).size}static rightPad(q,K,z){return q.length>=K?q.slice():q.concat(Array(K-q.length).fill(z))}static leftPad(q,K,z){return q.length>=K?q.slice():Array(K-q.length).fill(z).concat(q)}static pad(q,K,z,Y=!1){return Y?Z.leftPad(q,K,z):Z.rightPad(q,K,z)}static guaranteeArray(q){return X.A.isDefined(q)?Array.isArray(q)?q:[q]:[]}static arraysHaveSameElements(q,K){return Q().isEmpty(Q().xor(q,K))}}},59287:(q,K,z)=>{"use strict";z.d(K,{K:()=>Q});var Y=z(95891);class Q{static sanitizeName(q){return Y.replace(q,/ /g,"_").toLowerCase()}static getWorldChannelName(q){return Q.sanitizeName(`world-${q}`)}static getZoneMapChannelName(q,K){return Q.sanitizeName(`map-${q}-${K}`)}}},38170:(q,K,z)=>{"use strict";z.d(K,{r:()=>Y});class Y{static toDateObject(q){return q instanceof Date?q:new Date(q)}static toDateUtcMs(q){return Y.toDateObject(q).getTime()}static toDateIsoString(q){return Y.toDateObject(q).toISOString()}static isDateWithinRange(q,K,z){const Q=Y.toDateUtcMs(q),X=Y.toDateUtcMs(K),Z=Y.toDateUtcMs(z);return Q>=X&&Q<=Z}static millisecondsBetween(q,K){return Math.abs(K.getTime()-q.getTime())}static daysBetween(q,K){return Math.floor(Y.millisecondsBetween(q,K)/864e5)}static monthsBetween(q,K){const z=K.getMonth()-q.getMonth()+12*(K.getFullYear()-q.getFullYear());return K.getDate()>=q.getDate()?z:z-1}}},28085:(q,K,z)=>{"use strict";z.d(K,{ES:()=>X,Um:()=>J,mg:()=>Z});var Y=z(95891),Q=z.n(Y);function X(q,K){const z=(q,K)=>{if(Array.isArray(q)){if(Array.isArray(K))return K;for(const Y in K){const X=parseInt(Y);isNaN(X)||(Q().isNil(q[X])?q[X]=K[Y]:Q().mergeWith(q[X],K[Y],z))}}},Y=Q().cloneDeep(q),X=Q().cloneDeep(K);return Q().mergeWith(Y,X,z),Y}function Z(q){return Q().cloneDeep(q)}function J(q,K){return Object.values(K).includes(q)}},30628:(q,K,z)=>{"use strict";z.d(K,{B:()=>Y});class Y{static toArray(q,K){const z=q.encode(K).finish();return Array.prototype.slice.apply(z)}static fromArray(q,K){const z=new Uint8Array(K);return q.decode(z)}}},88131:(q,K,z)=>{"use strict";var Y;z.d(K,{Q:()=>Q}),function(q){q.ObjectNotUnwrappedResult="object-not-unwrapped-result"}(Y||(Y={}));class Q{static success(q){return new this(!0,q)}static error(q){return new this(!1,q)}static fromJSON(q){var K;const z="string"==typeof q?JSON.parse(q):q;return"value"in z==!1?this.error(null!==(K=z.error)&&void 0!==K?K:Y.ObjectNotUnwrappedResult):this.success(z.value)}constructor(q,K){q?this._value=K:(this.error=K,this._throwable=new Error(null==K?void 0:K.toString()))}get(){return this._value}isSuccess(){return!this._throwable}expect(q){var K;if(this.isSuccess())return this.get();throw new Error(null!==(K=null!=q?q:this._throwable.message)&&void 0!==K?K:"Expected success but got failure",{cause:this._throwable})}toJSON(){return this.isSuccess()?{value:Object.assign({},this.get())}:{error:this.error}}}},25531:(q,K,z)=>{"use strict";z.d(K,{w:()=>Y});class Y{static format(q,...K){return Y.replaceMultiple(q,K.map(((q,K)=>`{${K}}`)),...K)}static replaceMultiple(q,K,...z){if(Y.isNullOrEmpty(q))throw new Error("Unsupported string value");if(""===q.trim())return q;if(K.length!==z.length)throw new Error("Search values and replace values args must have the same length.");let Q=q;for(let Y=0;Y{"use strict";z.d(K,{A:()=>Y});class Y{static isDefined(q){return null!=q}static traverseIfObject(q,K){return K&&q&&"object"==typeof q?q[K]:q}static isDeepEqualOrNullishAcyclic(q,K){if(!Y.isDefined(q)&&!Y.isDefined(K))return!0;if(typeof q!=typeof K)return!1;if("object"!=typeof q)return q===K;const z=q,Q=K,X=new Set;for(const Y of Object.keys(z))X.add(Y);for(const Y of Object.keys(Q))X.add(Y);let Z=!0;return X.forEach((q=>{Z&&(Z=Y.isDeepEqualOrNullishAcyclic(z[q],Q[q]))})),Z}}},35120:(q,K,z)=>{"use strict";z.d(K,{q:()=>Y});class Y{static get instance(){return this._instance}get game(){return this._game}get prodigy(){return this._prodigy}set prodigy(q){this._prodigy||(this._prodigy=q)}constructor(q){Y._instance||(Y._instance=this),window.__PNP__=this,this._game=q}destroy(){Y._instance=null,this._game=null,this._prodigy=null}}},95925:(q,K,z)=>{"use strict";var Y;z.d(K,{i:()=>Y}),function(q){q[q.JSON=0]="JSON",q[q.Image=1]="Image",q[q.Atlas=2]="Atlas",q[q.Music=3]="Music",q[q.Sound=4]="Sound",q[q.Spine=5]="Spine"}(Y||(Y={}))},66572:(q,K,z)=>{"use strict";z.d(K,{a:()=>rt});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(91207),tt=z(34829),et=z(23034),it=z(17425),st=z(30405),nt=z(35120),at=z(51477);let rt=Y=class{get assetsArray(){return this._assetsArray}get loader(){return this._loader}set flagProvider(q){this._flagProvider=q}constructor(q){this.game=null,this._assetsArray=[],this._loader=null,this._fileDownloadTimes={},this.game=q;for(let K=1;K<=7;++K)it.K.commonAssetsCached[J.E.getIconForType("emote",K)]=!0;for(let K=1;K<=5;++K)it.K.commonAssetsCached[J.E.getIconForType("dance",K)]=!0;this.addLegacyAssetCommonCacheGuids(),this.game.load.onReset.add(this.reset.bind(this)),this.setLoader(),this._loader.onLoadComplete.add(this.loadComplete.bind(this),this),this._loader.onFileStart.add(this.fileWasStarted,this),this._loader.onFileComplete.add(this.fileWasCompleted,this)}setLoader(){this._loader=this.game.load,this._loader.crossOrigin="anonymous",this._loader.baseURL=tt.s.get("GameConstants.Build.ASSETS_LOCATION")}assets(q,K,z=!0){if("string"==typeof q){for(let z=0;z{this.assets(q,((q,K)=>{K?z():Y()}),K)}))}))}reset(q=!1){if(q)for(let K=this._assetsArray.length-1;K>=0;K--){const q=this._assetsArray[K];q.isCancellable&&(q.callbacks=[],this._assetsArray.splice(K,1))}this.setLoader()}loadComplete(q){q&&X.VyI.log("Loader completed with errors.",X.$bb.Error);for(let K=this._assetsArray.length-1;K>=0;K--){const q=this._assetsArray[K];let z=!1;if(!q.isLoading)continue;q.isLoading=!1;let Y=!1;for(let K=0;K=0;q--){const K=this._assetsArray[q];if(!K.isLoading)continue;let z=!0;for(let q=0;q{const Q=Y.getHeader("Content-Length");X.Aq$.isDefined(Q)?(q.size=parseInt(Q,10)+z,this.sendDownloadMetric(K.key)):X.VyI.log(`Missing Content-Length header for ${K.key}`,X.$bb.Error)}))}else X.VyI.log("Unable to log file metrics because file has no data.",X.$bb.Warning);break;case"audio":{const z=new X.u1k;z.setBaseURI(K.requestUrl).setMethod(X.iXQ.Head),nt.q.instance.prodigy.gameContainer.get("429-aba2").sendRequest(z).then((z=>{const Y=z.getHeader("Content-Length");X.Aq$.isDefined(Y)?(q.size=parseInt(Y,10),this.sendDownloadMetric(K.key)):X.VyI.log(`Missing Content-Length header for ${K.key}`,X.$bb.Error)}));break}case"script":break;default:X.VyI.log(`Loading metric could not handle file type of: ${K.type}`,X.$bb.Error)}this.sendDownloadMetric(K.key)}}}sendDownloadMetric(q){const K=this._fileDownloadTimes[q];if(K&&X.Aq$.isDefined(K.size)){nt.q.instance.prodigy.gameContainer.get("a92-c640").assetDownloaded(K.size,(K.end-K.start)/1e3)}}addLegacyAssetCommonCacheGuids(){const q=Object.keys(it.K.commonAssetsCached);for(let K=0;K{"use strict";z.d(K,{A:()=>et});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(23034),J=z(95925),tt=z(66572);let et=class{constructor(q,K,z){this.assetLoader=null,this.cache=null,this.assetDictionary=null,this.assetLoader=q,this.cache=K,this.assetDictionary=z}loadAssets(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=(null==K?void 0:K.tag)?q.map((q=>`${q}_${K.tag}`)):q;return new Promise((q=>{this.assetLoader.assets(z,q)}))}))}loadAssetsNotCancellable(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise((K=>{this.assetLoader.assets(q,K,!1)}))}))}isLoaded(q,K){switch(K){case J.i.JSON:return this.cache.checkJSONKey(q);case J.i.Image:return this.cache.checkImageKey(q);case J.i.Music:case J.i.Sound:return this.cache.checkSoundKey(q);case J.i.Spine:return this.cache.checkJSONKey(q)&&this.cache.checkImageKey(`${q}.png`)&&this.cache.checkTextKey(`${q}Atlas`)}return!1}getAsset(q,K){switch(K){case J.i.JSON:return this.cache.getJSON(q);case J.i.Image:return this.cache.getImage(q);case J.i.Atlas:return this.cache.getFrameData(q)}return null}assignAssetData(q,K){this.assetDictionary.assignAssets({[q]:K})}loadSingleAsset(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return yield this.loadAssets([q]),this.getAsset(q,K)}))}};et=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("58f-ce01")),(0,Y.Qj)(1,(0,X.inject)("2bd-9629")),(0,Y.Qj)(2,(0,X.inject)("ae0-c648")),(0,Y.Sn)("design:paramtypes",[tt.a,Q.l2R,Z.s])],et)},51477:(q,K,z)=>{"use strict";z.d(K,{n:()=>bt});var Y=z(62459),Q=(z(96571),z(34829)),X=z(88225);class Z{constructor(q){this.callbacks={},this.listeners={},this.broadcastIdCount=0,this.game=q}clear(){let q;for(const K in this.callbacks)for(const z in this.callbacks[K]){for(q=0;this.callbacks[K][z].length>q;)this.callbacks[K][z].persistent?q++:this.callbacks[K][z].pop();0===q&&(this.callbacks[K][z]=void 0,delete this.callbacks[K][z])}for(const K in this.listeners)for(const z in this.listeners[K]){for(q=0;this.listeners[K][z].length>q;)this.listeners[K][z].persistent?q++:this.listeners[K][z].pop();0===q&&(this.listeners[K][z]=void 0,delete this.listeners[K][z])}}addAppListener(q,K,z,Q,Z=null){let J=Y.Aq$.isDefined(Q)?Q:this.game;Y.Aq$.isDefined(q)&&Y.Aq$.isDefined(K)&&Y.Aq$.isDefined(z)||Y.VyI.log("addAppListener - Invalid arguments",Y.$bb.Error),J=this.hashContext(J),void 0===this.callbacks[J]&&(this.callbacks[J]={}),void 0===this.listeners[J]&&(this.listeners[J]={}),void 0===this.callbacks[J][q]&&(this.callbacks[J][q]=[]),void 0===this.listeners[J][q]&&(this.listeners[J][q]=[]),this.callbacks[J][q].push(K),this.listeners[J][q].push(z);const tt=this.callbacks[J][q].persistent;Y.Aq$.isDefined(tt)&&Z!==tt&&X.captureException(new Error(`ROX-1681: Adding a listener to broadcast event ${q}, which previously had a listener with a persistent flag of ${tt}, but has been overridden with ${Z}. There might be missed callbacks for this event!`)),this.callbacks[J][q].persistent=Y.Aq$.isDefined(Z),this.listeners[J][q].persistent=Y.Aq$.isDefined(Z)}removeAppListener(q,K,z){let Q=Y.Aq$.isDefined(z)?z:this.game;if(Y.Aq$.isDefined(q)){if(Q=this.hashContext(Q),void 0!==this.callbacks[Q]&&void 0!==this.callbacks[Q][q]&&void 0!==this.listeners[Q]&&void 0!==this.listeners[Q][q]){for(let z=0;z=this._prevTime+1e3&&(this.record&&(this._framerate=1e3*this._frames/(q-this._prevTime),this._rollingCount++,this._rollingSum+=this._framerate,this._fpsRecordsSinceLastPing.push(Math.round(this._framerate))),this._prevTime=q,this._frames=0),q>=this._timeAtLastPing+this._pingPeriodMs){const K=Math.round(Y.cj9.average(...this._fpsRecordsSinceLastPing));let z=0,Q=0;for(let q=0;q{"use strict";z.d(K,{y:()=>tt});var Y=z(8674),Q=z(62459);class X{constructor(){this.x=0,this.y=0}get width(){if(Q.o5U.isDesktop())return Q.DX_.width;{const q=Q.DX_.width,K=window.innerWidth;return q{this.onDeviceReady()}))}getOffset(q,K=new Q.I9Y){const z=q.getBoundingClientRect(),Y=this.scrollY,X=this.scrollX,Z=document.documentElement.clientTop,J=document.documentElement.clientLeft;return K.x=z.left+X-J,K.y=z.top+Y-Z,K}getScreenOrientation(){return window.innerHeight>window.innerWidth?"portrait":"landscape"}onDeviceReady(){this.scrollX=window.pageXOffset,this.scrollY=window.pageYOffset}}class tt{get boundingParent(){var q;return this.parentIsWindow||this.isFullScreen&&!this._createdFullScreenTarget?null:null===(q=this._game.canvas)||void 0===q?void 0:q.parentNode}get isFullScreen(){return Q.DX_.isFullScreen()}get currentScaleMode(){return this.isFullScreen?this.fullScreenScaleMode:this.scaleMode}get isPortrait(){return"portrait"===this.screenOrientation}get isLandscape(){return"landscape"===this.screenOrientation}constructor(q,K=0,z=0){this._forceLandscape=!1,this._forcePortrait=!1,this._incorrectOrientation=!1,this.pageAlignHorizontally=!1,this.pageAlignVertically=!1,this.onOrientationChange=new Q.HN0,this.enterIncorrectOrientation=new Q.HN0,this.leaveIncorrectOrientation=new Q.HN0,this.onFullScreenInit=new Q.HN0,this.onFullScreenChange=new Q.HN0,this.onFullScreenError=new Q.HN0,this.scaleFactor=new Q.I9Y(1,1),this._scaleFactorInverted=new Q.I9Y(1,1),this.margin={left:0,top:0,right:0,bottom:0,x:0,y:0},this.bounds=new Q.M_G,this.aspectRatio=0,this.sourceAspectRatio=0,this.canvasOffset=new Q.I9Y(0,0),this.windowConstraints={right:"layout",bottom:""},this.scaleMode=tt.NO_SCALE,this.fullScreenScaleMode=tt.NO_SCALE,this.parentIsWindow=!1,this.parentNode=null,this.parentScaleFactor=new Q.I9Y(1,1),this.trackParentInterval=2e3,this.onSizeChange=new Q.HN0,this._onResizeContext=null,this._pendingScaleMode=null,this._gameSize=new Q.M_G,this._lastUpdate=0,this._updateThrottle=0,this._updateThrottleReset=100,this._parentBounds=new Q.M_G,this._tempBounds=new Q.M_G,this._lastReportedCanvasSize=new Q.M_G,this._lastReportedGameSize=new Q.M_G,this._booted=!1,this._dom=new J(q.device),this._game=q,this.width=K,this.height=z,this.screenOrientation=this._dom.getScreenOrientation(),window.recalculateCanvasOffset=()=>{this.recalculateCanvasOffset()},q.config&&this.parseConfig(q.config),this.setupScale(K,z)}boot(){this._orientationChange=q=>{this.orientationChange(q)},this._windowResize=q=>{this.windowResize(q)},window.addEventListener("orientationchange",this._orientationChange,!1),window.addEventListener("resize",this._windowResize,!1),this._fullScreenChange=q=>{this.fullScreenChange(q)},this._fullScreenError=q=>{this.fullScreenError(q)},document.addEventListener("webkitfullscreenchange",this._fullScreenChange,!1),document.addEventListener("mozfullscreenchange",this._fullScreenChange,!1),document.addEventListener("MSFullscreenChange",this._fullScreenChange,!1),document.addEventListener("fullscreenchange",this._fullScreenChange,!1),document.addEventListener("webkitfullscreenerror",this._fullScreenError,!1),document.addEventListener("mozfullscreenerror",this._fullScreenError,!1),document.addEventListener("MSFullscreenError",this._fullScreenError,!1),document.addEventListener("fullscreenerror",this._fullScreenError,!1),this._game.onResume.add(this._gameResumed,this),this.recalculateCanvasOffset(),this.bounds.setTo(this.canvasOffset.x,this.canvasOffset.y,this.width,this.height),this.setGameSize(this._game.width,this._game.height),this.screenOrientation=this._dom.getScreenOrientation(),this._booted=!0,null!==this._pendingScaleMode&&(this.scaleMode=this._pendingScaleMode,this._pendingScaleMode=null)}parseConfig(q){void 0!==q.scaleMode&&(this._booted?this.scaleMode=q.scaleMode:this._pendingScaleMode=q.scaleMode),void 0!==q.fullScreenScaleMode&&(this.fullScreenScaleMode=q.fullScreenScaleMode),q.fullScreenTarget&&(this.fullScreenTarget=q.fullScreenTarget),this.pageAlignHorizontally=q.alignH||!1,this.pageAlignVertically=q.alignV||!1}setupScale(q,K){let z;const Y=new Q.M_G;let X,Z;this._game.parent&&("string"==typeof this._game.parent?z=document.getElementById(this._game.parent):this._game.parent&&1===this._game.parent.nodeType&&(z=this._game.parent)),z?(this.parentNode=z,this.parentIsWindow=!1,this.getParentBounds(this._parentBounds),Y.width=this._parentBounds.width,Y.height=this._parentBounds.height):(this.parentNode=null,this.parentIsWindow=!0,Y.width=this._dom.visualBounds.width,Y.height=this._dom.visualBounds.height),"number"==typeof q?X=q:(this.parentScaleFactor.x=parseInt(q,10)/100,X=Y.width*this.parentScaleFactor.x),"number"==typeof K?Z=K:(this.parentScaleFactor.y=parseInt(K,10)/100,Z=Y.height*this.parentScaleFactor.y),X=Math.floor(X),Z=Math.floor(Z),this._gameSize.setTo(0,0,X,Z),this.updateDimensions(X,Z,!1)}setGameSize(q,K){this._gameSize.setTo(0,0,q,K),this.currentScaleMode!==tt.RESIZE&&this.updateDimensions(q,K,!0),this.queueUpdate(!0)}_gameResumed(){this.queueUpdate(!0)}queueUpdate(q){q&&(this._parentBounds.width=0,this._parentBounds.height=0),this._updateThrottle=this._updateThrottleReset}updateDimensions(q,K,z){this.width=q*this.parentScaleFactor.x,this.height=K*this.parentScaleFactor.y,this._game.width=this.width,this._game.height=this.height,this.sourceAspectRatio=this.width/this.height,this.updateScalingAndBounds(),z&&(this.currentScaleMode===tt.RESIZE&&this._game.renderer.autoDensity||this._game.renderer.resize(this.width,this.height))}updateScalingAndBounds(){this.scaleFactor.x=this._game.width/this.width,this.scaleFactor.y=this._game.height/this.height,this._scaleFactorInverted.x=this.width/this._game.width,this._scaleFactorInverted.y=this.height/this._game.height,this.aspectRatio=this.width/this.height,this._game.canvas&&this.recalculateCanvasOffset(),this.bounds.setTo(this.canvasOffset.x,this.canvasOffset.y,this.width,this.height),this._game.input&&this._game.input.scale&&this._game.input.scale.setTo(this.scaleFactor.x,this.scaleFactor.y)}getParentBounds(q=new Q.M_G,K){const z=K||this.boundingParent,Y=this._dom.visualBounds,X=this._dom.layoutBounds;if(z){const K=z.getBoundingClientRect(),Q=z.offsetParent?z.offsetParent.getBoundingClientRect():z.getBoundingClientRect();q.setTo(K.left-Q.left,K.top-Q.top,K.width,K.height);const Z=this.windowConstraints;let J;Z.right&&(J="layout"===Z.right?X:Y,q.x=Math.min(q.right,J.width)-q.width),Z.bottom&&(J="layout"===Z.bottom?X:Y,q.y=Math.min(q.bottom,J.height)-q.height)}else q.setTo(0,0,Y.width,Y.height);return q.setTo(Math.round(q.x),Math.round(q.y),Math.round(q.width),Math.round(q.height)),q}setResizeCallback(q,K){this._onResize=q,this._onResizeContext=K}signalSizeChange(){if(!Q.M_G.sameDimensions(this.bounds,this._lastReportedCanvasSize)||!Q.M_G.sameDimensions(new Q.M_G(0,0,this._game.width,this._game.height),this._lastReportedGameSize)){const q=this.width,K=this.height;this._lastReportedCanvasSize.setTo(0,0,q,K),this._lastReportedGameSize.setTo(0,0,this._game.width,this._game.height),this.onSizeChange.dispatch(this,q,K)}}setMinMax(q,K,z,Y){this.minWidth=q,this.minHeight=K,void 0!==z&&(this.maxWidth=z),void 0!==Y&&(this.maxHeight=Y)}preUpdate(){if(this._game.time.timeMS=400?0:100,this.recalculateCanvasOffset();const K=this._parentBounds.width,z=this._parentBounds.height,Y=this.getParentBounds(this._parentBounds,this.parentNode),X=Y.width!==K||Y.height!==z,Z=this.updateOrientationState();(X||Z)&&(this._onResize&&this._onResize.call(this._onResizeContext,this,Y),this.updateLayout(),this.signalSizeChange());let J=2*this._updateThrottle;this._updateThrottle0&&(this.width=Math.min(this.width,this.maxWidth)),this.maxHeight>0&&(this.height=Math.min(this.height,this.maxHeight)))}createFullScreenTarget(){const q=document.createElement("div");return q.style.margin="0",q.style.padding="0",q.style.background="#000",q}cleanupCreatedTarget(){const q=this._createdFullScreenTarget;if(q&&q.parentNode){const K=q.parentNode;K.insertBefore(this._game.canvas,q),K.removeChild(q)}this._createdFullScreenTarget=null}prepScreenMode(q){const K=!!this._createdFullScreenTarget,z=this._createdFullScreenTarget||this.fullScreenTarget;q?(K||this.fullScreenScaleMode===tt.EXACT_FIT)&&z!==this._game.canvas&&(this._fullScreenRestore={targetWidth:z.style.width,targetHeight:z.style.height},z.style.width="100%",z.style.height="100%"):(this._fullScreenRestore&&(z.style.width=this._fullScreenRestore.targetWidth,z.style.height=this._fullScreenRestore.targetHeight,this._fullScreenRestore=null),this.updateDimensions(this._gameSize.width,this._gameSize.height,!0),this.resetCanvas())}fullScreenChange(q){this.event=q,this.isFullScreen?(this.prepScreenMode(!0),this.updateLayout(),this.queueUpdate(!0)):(this.prepScreenMode(!1),this.cleanupCreatedTarget(),this.updateLayout(),this.queueUpdate(!0)),this.onFullScreenChange.dispatch(this,this.width,this.height)}fullScreenError(q){this.event=q,this.cleanupCreatedTarget(),this.onFullScreenError.dispatch(this)}destroy(){this._game.onResume.remove(this._gameResumed,this),window.removeEventListener("orientationchange",this._orientationChange,!1),window.removeEventListener("resize",this._windowResize,!1),document.removeEventListener("webkitfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("mozfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("MSFullscreenChange",this._fullScreenChange,!1),document.removeEventListener("fullscreenchange",this._fullScreenChange,!1),document.removeEventListener("webkitfullscreenerror",this._fullScreenError,!1),document.removeEventListener("mozfullscreenerror",this._fullScreenError,!1),document.removeEventListener("MSFullscreenError",this._fullScreenError,!1),document.removeEventListener("fullscreenerror",this._fullScreenError,!1),this.onOrientationChange.dispose(),this.enterIncorrectOrientation.dispose(),this.leaveIncorrectOrientation.dispose(),this.onFullScreenInit.dispose(),this.onFullScreenChange.dispose(),this.onFullScreenError.dispose(),this.onSizeChange.dispose()}startFullScreen(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.isFullScreen)return!1;try{let q=this.fullScreenTarget;q||(this.cleanupCreatedTarget(),this._createdFullScreenTarget=this.createFullScreenTarget(),q=this._createdFullScreenTarget);const K={targetElement:q};if(this.onFullScreenInit.dispatch(this,K),this._createdFullScreenTarget){const K=this._game.canvas;K.parentNode.insertBefore(q,K),q.appendChild(K)}const z=q,Y=z.requestFullscreen||z.mozRequestFullscreen||z.msRequestFullscreen||z.requestFullScreen||z.mozRequestFullScreen||z.msRequestFullScreen;Y?yield Y.call(q):z.webkitRequestFullscreen?yield z.webkitRequestFullscreen(q.ALLOW_KEYBOARD_INPUT):z.webkitRequestFullScreen?yield z.webkitRequestFullScreen(q.ALLOW_KEYBOARD_INPUT):Q.VyI.log("Platform doesn't support fullscreen API.",Q.$bb.Warning)}catch(e){return Q.RQr.logError(e,"Unable to go full screen."),setTimeout((()=>this.fullScreenError()),10),!1}return!0}))}stopFullScreen(){if(!this.isFullScreen)return!1;const q=document,K=q.cancelFullScreen||q.exitFullscreen||q.webkitCancelFullScreen||q.webkitExitFullscreen||q.msCancelFullScreen||q.msExitFullscreen||q.mozCancelFullScreen||q.mozExitFullscreen;return K?(K.call(q),!0):(Q.VyI.log("Unable to leave full screen.",Q.$bb.Error),!1)}recalculateCanvasOffset(){this._dom.getOffset(this._game.canvas,this.canvasOffset)}}tt.EXACT_FIT=0,tt.NO_SCALE=1,tt.SHOW_ALL=2,tt.RESIZE=3},10778:(q,K,z)=>{"use strict";z.d(K,{i:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120);class Z{static validateAnimationFile(q){if(!editorAPI)return Q.VyI.log("Not in editor mode",Q.$bb.Error),null;if(!q)return Q.VyI.log("no path",Q.$bb.Warning),null;if(!editorAPI.readFileSync(q))return Q.VyI.log("Path not valid / can`t read contents",Q.$bb.Warning),null;const K=editorAPI.readFileSync(q).toString();if(!K)return Q.VyI.log("Not a Valid File",Q.$bb.Warning),null;const z=JSON.parse(K);if(!z)return Q.VyI.log("Not a Valid Json",Q.$bb.Warning),null;const Y=z;return Y?Y.tweens?Y:(Q.VyI.log("Timeline has no tweens!",Q.$bb.Warning),null):(Q.VyI.log("Not a valid animation file",Q.$bb.Warning),null)}static processNewTimelineFromGUID(q,K,z){const Y=new Q.Kfn,X=new Map;return z.forEach(((q,z)=>{K[z]&&X.set(q,[...X.get(q)||[],K[z]])})),q.tweens.forEach(((q,K)=>{const z=X.get(K);if(!z)return;const Q=Y.addGameObjects(z);q.from&&q.to?Y.fromTo(Q,q.how.duration,q.from,q.to,q.ease,q.how.delay):q.to?Y.to(Q,q.how.duration,q.to,q.ease,q.how.delay):q.from&&Y.from(Q,q.how.duration,q.from,q.ease,q.how.delay)})),Y}static loadTimelineFromGUID(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise((K=>{X.q.instance.prodigy.load.assets([q],(()=>{const z=X.q.instance.game.cache.getJSON(q);K(z)}))}))}))}}class J extends Q.$KW{constructor(){super(...arguments),this.tweenInfoNodes=[],this.firstFocus=!0,this.processedTweens=[],this.tweenLinks=[]}checkAndProcessAnimationPath(q){this.validationTimeline=Z.validateAnimationFile(q),this.validationTimeline&&(this.processedTweens=[],this.validationTimeline.tweens.forEach((q=>{const K=q;K&&0!==K.GameObjectLinks.length&&this.processedTweens.push(K)})))}generate(q,K){return this.currentState=q,this.firstFocus&&(this.firstFocus=!1,q.playMode||this.checkAndProcessAnimationPath(q.animationPath)),q.playMode?this._editorAPI.switchFocusToPlayMode():this._editorAPI.switchFocusToEditMode(),Q.XRp.createVertical(this.regenerateUI())}regenerateUI(){const q=[];let K;if(K=this.currentState.playMode?Q.X9M.create({buttonText:"STOP",id:"Stop-animation",buttonIcon:Q.a2l.Stop,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{playMode:!1})}}):Q.X9M.create({buttonText:"PLAY",id:"play-animation",buttonIcon:Q.a2l.Play,onClick:()=>{this.currentState.animationPath?0!==this.currentState.gameObjects.length?this._editorAPI.modifyComponent(this._componentGuid,{playMode:!0}):this._editorAPI.showPopup("You haven`t assigned any objects :(","Nothing to animate"):this._editorAPI.showPopup("Please pick a valid .animation file first!","Uh oh")}}),q.push(Q._Lw.line()),q.push(Q.XRp.createHorizontal([Q._Lw.line(),K,Q._Lw.line()])),q.push(Q._Lw.blankLine()),this.currentState.playMode)return q;const z=Q.Hnb.create({allowedExtensions:["animation"],id:"animation",path:this.currentState.animationPath,onChange:q=>{this.clearAnimationData(),this.checkAndProcessAnimationPath(q);const K=`${q}.meta`,z=JSON.parse(this._editorAPI.readFileSync(K).toString());this._editorAPI.modifyComponent(this._componentGuid,{cachedAnimationGUID:z.guid,animationPath:q})}});return q.push(Q.XRp.createVerticalContainer([Q._Lw.halfBlankLine(),Q.XRp.createHorizontal([Q._Lw.line(),z,Q._Lw.line()]),Q._Lw.halfBlankLine()],{title:"Pick Animation File",isCollapsible:!1})),q.push(Q._Lw.halfBlankLine()),this.validationTimeline&&q.push(Q.XRp.createVerticalContainer(this.generateGameObjectNodes(),{isCollapsible:!1,title:"Game Objects"})),q}clearAnimationData(){this.validationTimeline=null,this._editorAPI.modifyComponent(this._componentGuid,{animationPath:null,gameObjects:[],gameObjectPositionList:[]})}generateIndexedPositionsForGameObjects(){const q=[];for(let K=0;K{this.generateIndexedPositionsForGameObjects()}}))}}let tt=class extends Q.uAl{constructor(){super(...arguments),this.playMode=!1,this.gameObjects=[],this.gameObjectPositionList=[]}create(){if(super.create(),!this.gameObject)return this.animationMode(!1),void Q.VyI.log("Game Object not loaded or ready for animation",Q.$bb.Warning);this.animationMode(this.playMode&&this.gameObject.activeInHierarchy)}playAnimation(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=yield Z.loadTimelineFromGUID(this.cachedAnimationGUID);K?(null===(q=this._animationWrapper)||void 0===q||q.destroyTimeline(),this._animationWrapper=Z.processNewTimelineFromGUID(K,this.gameObjects,this.gameObjectPositionList),this._animationWrapper.restart()):Q.VyI.log("animation File not found / Not a valid JSON",Q.$bb.Error)}))}animationMode(q){q&&this.playAnimation().catch((q=>{Q.VyI.log(`Timeline processing failed: ${Q.RQr.stringify(q)}`,Q.$bb.Error)}))}destroy(){var q;null===(q=this._animationWrapper)||void 0===q||q.destroyTimeline(),super.destroy()}};(0,Y.Cg)([(0,Q.tW2)("animation"),(0,Y.Sn)("design:type",String)],tt.prototype,"animationPath",void 0),(0,Y.Cg)([(0,Q.tW2)(),(0,Y.Sn)("design:type",String)],tt.prototype,"cachedAnimationGUID",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"playMode",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Q.SZi)(),(0,Y.Sn)("design:type",Array)],tt.prototype,"gameObjects",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Q.SZi)(),(0,Y.Sn)("design:type",Array)],tt.prototype,"gameObjectPositionList",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("AnimationPreview",Q.YH6.animation),(0,Q.WR4)(J)],tt)},15521:(q,K,z)=>{"use strict";z.d(K,{Z:()=>Q});var Y=z(57308);class Q{static bringToTop(q){return q.parent?(q.parent.setChildIndex(q,q.parent.children.length-1),q):q}static sendToBack(q){return q.parent?(q.parent.setChildIndex(q,0),q):q}static moveUp(q){if(!q.parent)return q;if(q.parent instanceof Y.Y)q.parent.moveUp(q);else{const K=q.parent.getChildIndex(q);K0&&q.parent.setChildIndex(q,K-1)}return q}}},74560:(q,K,z)=>{"use strict";z.d(K,{m:()=>Q});var Y=z(59231);class Q{static setInputHandler(q,K){q.input=K}static setInputEnabled(q,K,z){K?q.input?q.input&&!q.input.enabled&&q.input.start():(Q.setInputHandler(q,new Y.l(z)),q.input.start()):q.input&&q.input.enabled&&q.input.stop()}static isInputEnabled(q){var K;return!!(null===(K=q.input)||void 0===K?void 0:K.enabled)}}},29569:(q,K,z)=>{"use strict";z.d(K,{U:()=>J});var Y=z(8674),Q=z(62459),X=z(15016),Z=z(35120);class J extends Q.mk0{get input(){return Z.q.instance.game.input}shutdown(){Q.wa5.destroyActiveScene(),Z.q.instance.prodigy.notifications.resumeAll(),super.shutdown()}getParentalConsentBanner(){return(0,Y.sH)(this,void 0,void 0,(function*(){return J._parentalConsentUiHandler.getBannerGameObject()}))}showParentalConsentBanner(q){this._parentalConsentLoadPromise=J._parentalConsentUiHandler.showBanner(q)}hideParentalConsentBanner(){var q;null===(q=this._parentalConsentLoadPromise)||void 0===q||q.cancel(),J._parentalConsentUiHandler.hideBanner()}}J._parentalConsentUiHandler=new X.R},93690:(q,K,z)=>{"use strict";z.d(K,{p:()=>bt});var Y=z(62459),Q=z(68910),X=z(98252),Z=z(74560),J=z(18741),tt=z(82366),et=z(35120);class it{get justDown(){const q=this._justDown;return this._justDown=!1,q}get justUp(){const q=this._justUp;return this._justUp=!1,q}get enabled(){return this._enabled}set enabled(q){const K=!!q;K!==this._enabled&&(K||this.reset(!1),this._enabled=K)}get game(){return et.q.instance.game}constructor(q){this._enabled=!0,this.event=null,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.timeDown=0,this.duration=0,this.timeUp=-2500,this.durationUp=-2500,this.repeats=0,this.onDown=new Y.HN0,this.onHoldContext=null,this.onUp=new Y.HN0,this._justDown=!1,this._justUp=!1,this.keyCode=q}update(){this._enabled&&(this.isDown?(this.duration=this.game.time.timeMS-this.timeDown,this.repeats++,this.onHoldCallback&&this.onHoldCallback.call(this.onHoldContext,this)):this.durationUp=this.game.time.timeMS-this.timeUp)}processKeyDown(q){this._enabled&&(this.event=q,this.isDown||(this.altKey=q.altKey,this.ctrlKey=q.ctrlKey,this.shiftKey=q.shiftKey,this.isDown=!0,this.isUp=!1,this.timeDown=this.game.time.timeMS,this.duration=0,this.durationUp=this.game.time.timeMS-this.timeUp,this.repeats=0,this._justDown=!0,this.onDown.dispatch(this)))}processKeyUp(q){this._enabled&&(this.event=q,this.isUp||(this.isDown=!1,this.isUp=!0,this.timeUp=this.game.time.timeMS,this.duration=this.game.time.timeMS-this.timeDown,this.durationUp=0,this._justUp=!0,this.onUp.dispatch(this)))}reset(q=!0){this.isDown=!1,this.isUp=!0,this.timeUp=this.game.time.timeMS,this.duration=0,this.durationUp=-2500,this._enabled=!0,this._justDown=!1,this._justUp=!1,q&&(this.onDown.removeAll(),this.onUp.removeAll(),this.onHoldCallback=null,this.onHoldContext=null)}downDuration(q=50){return this.isDown&&this.duration{this.processKeyDown(q)},this._onKeyUp=q=>{this.processKeyUp(q)},this._onKeyPress=q=>{this.processKeyPress(q)},window.addEventListener("keydown",this._onKeyDown,!1),window.addEventListener("keyup",this._onKeyUp,!1),window.addEventListener("keypress",this._onKeyPress,!1),this.active=!0,this.enabled=!0,!0)}stop(){window.removeEventListener("keydown",this._onKeyDown),window.removeEventListener("keyup",this._onKeyUp),window.removeEventListener("keypress",this._onKeyPress),this._onKeyDown=null,this._onKeyUp=null,this._onKeyPress=null,this.active=!1}destroy(){this.stop(),this.clearCaptures();for(let q=0;q0;)this._keys[this._i]&&this._keys[this._i].update()}processKeyDown(q){if(this.event=q,!this.game.input.enabled||!this.enabled)return;const K=q.keyCode;this._capture[K]&&q.preventDefault(),this._keys[K]||(this._keys[K]=new it(K)),this._keys[K].processKeyDown(q),this._k=K,this.onDownCallback&&this.onDownCallback.call(this.callbackContext,q)}processKeyPress(q){this.pressEvent=q,this.game.input.enabled&&this.enabled&&this.onPressCallback&&this.onPressCallback.call(this.callbackContext,String.fromCharCode(q.charCode),q)}processKeyUp(q){if(this.event=q,!this.game.input.enabled||!this.enabled)return;const K=q.keyCode;this._capture[K]&&q.preventDefault(),this._keys[K]||(this._keys[K]=new it(K)),this._keys[K].processKeyUp(q),this.onUpCallback&&this.onUpCallback.call(this.callbackContext,q)}reset(q=!0){this.event=null;let K=this._keys.length;for(;K-- >0;)this._keys[K]&&this._keys[K].reset(q)}downDuration(q,K=50){return this._keys[q]?this._keys[q].downDuration(K):null}upDuration(q,K=50){return this._keys[q]?this._keys[q].upDuration(K):null}justPressed(q){return this._keys[q]?this._keys[q].justPressed():null}justReleased(q){return this._keys[q]?this._keys[q].justReleased():null}isDown(q){return this._keys[q]?this._keys[q].isDown:null}}class at{addMouseWheelCallback(q){return this.input.mouseWheel.callbacks.push(q)}removeMouseWheelCallback(q){const K=this.input.mouseWheel.callbacks.indexOf(q,0);K>-1&&this.input.mouseWheel.callbacks.splice(K,1)}get wheelDelta(){return this.input.mouseWheel.delta}get game(){return Y.W$e.instance.game}get input(){return et.q.instance.game.input}constructor(){this.capture=!1,this.stopOnGameOut=!1,this.callbackContext=this.game}start(){if(Y.o5U.isAndroidStockBrowser()&&this.input.touch.active)return!1;if(void 0!==this._onMouseDown)return!1;this._onMouseDown=q=>{this.onMouseDown(q)},this._onMouseMove=q=>{this.onMouseMove(q)},this._onMouseUp=q=>{this.onMouseUp(q)},this._onMouseUpGlobal=q=>{this.onMouseUpGlobal(q)},this._onMouseOutGlobal=q=>{this.onMouseOutGlobal(q)},this._onMouseOut=q=>{this.onMouseOut(q)},this._onMouseOver=q=>{this.onMouseOver(q)};const q=this.game.renderer.events.domElement;return q.addEventListener("mousedown",this._onMouseDown,!0),q.addEventListener("mousemove",this._onMouseMove,!0),q.addEventListener("mouseup",this._onMouseUp,!0),window.addEventListener("mouseup",this._onMouseUpGlobal,!0),window.addEventListener("mouseout",this._onMouseOutGlobal,!0),q.addEventListener("mouseover",this._onMouseOver,!0),q.addEventListener("mouseout",this._onMouseOut,!0),this.active=!0,this.enabled=!0,!0}onMouseDown(q){this.event=q,this.capture&&q.preventDefault(),this.mouseDownCallback&&this.mouseDownCallback.call(this.callbackContext,q),this.input.enabled&&this.enabled&&(q.identifier=0,this.input.mousePointer.start(q))}onMouseMove(q){this.event=q,this.capture&&q.preventDefault(),this.mouseMoveCallback&&this.mouseMoveCallback.call(this.callbackContext,q),this.input.enabled&&this.enabled&&(q.identifier=0,this.input.mousePointer.move(q))}onMouseUp(q){this.event=q,this.capture&&q.preventDefault(),this.mouseUpCallback&&this.mouseUpCallback.call(this.callbackContext,q),this.input.enabled&&this.enabled&&(q.identifier=0,this.input.mousePointer.stop(q))}onMouseUpGlobal(q){this.input.mousePointer.withinGame||(this.mouseUpCallback&&this.mouseUpCallback.call(this.callbackContext,q),q.identifier=0,this.input.mousePointer.stop(q))}onMouseOutGlobal(q){this.event=q,this.capture&&q.preventDefault(),this.input.mousePointer.withinGame=!1,this.input.enabled&&this.enabled&&(this.input.mousePointer.stop(q),this.input.mousePointer.resetButtons())}onMouseOut(q){this.event=q,this.capture&&q.preventDefault(),this.input.mousePointer.withinGame=!1,this.mouseOutCallback&&this.mouseOutCallback.call(this.callbackContext,q),this.input.enabled&&this.enabled&&this.stopOnGameOut&&(q.identifier=0,this.input.mousePointer.stop(q))}onMouseOver(q){this.event=q,this.capture&&q.preventDefault(),this.input.mousePointer.withinGame=!0,this.mouseOverCallback&&this.mouseOverCallback.call(this.callbackContext,q)}stop(){const q=this.game.canvas;q.removeEventListener("mousedown",this._onMouseDown,!0),q.removeEventListener("mousemove",this._onMouseMove,!0),q.removeEventListener("mouseup",this._onMouseUp,!0),q.removeEventListener("mouseover",this._onMouseOver,!0),q.removeEventListener("mouseout",this._onMouseOut,!0),window.removeEventListener("mouseup",this._onMouseUpGlobal,!0),window.removeEventListener("mouseout",this._onMouseOutGlobal,!0),this.active=!1}}class rt{get game(){return Y.W$e.instance.game}constructor(){this.active=!1,this.callbacks=[],this.delta=0,this.preventDefault=!0,this.element=this.game.canvas,this.callbackContext=this.game,this.wheelEventName=X.pF.getWheelEventName(),this.boundOnWheelHandler=this.onWheelHandler.bind(this)}start(){return!(!this.wheelEventName||this.active)&&(this.element.addEventListener(this.wheelEventName,this.boundOnWheelHandler,!0),this.active=!0,!0)}stop(){this.active&&(this.element.removeEventListener(this.wheelEventName,this.boundOnWheelHandler,!0),this.active=!1)}onWheelHandler(q){this.preventDefault&&q.preventDefault(),this.delta=Y.cj9.clamp(-q.deltaY,-1,1);for(let K=0;K{this.onPointerDown(q)},this._onMSPointerMove=q=>{this.onPointerMove(q)},this._onMSPointerUp=q=>{this.onPointerUp(q)},this._onMSPointerUpGlobal=q=>{this.onPointerUpGlobal(q)},this._onMSPointerOut=q=>{this.onPointerOut(q)},this._onMSPointerOver=q=>{this.onPointerOver(q)};const q=this.game.canvas;return q.addEventListener("MSPointerDown",this._onMSPointerDown,!1),q.addEventListener("MSPointerMove",this._onMSPointerMove,!1),q.addEventListener("MSPointerUp",this._onMSPointerUp,!1),q.addEventListener("pointerdown",this._onMSPointerDown,!1),q.addEventListener("pointermove",this._onMSPointerMove,!1),q.addEventListener("pointerup",this._onMSPointerUp,!1),q.style["-ms-content-zooming"]="none",q.style["-ms-touch-action"]="none",window.addEventListener("MSPointerUp",this._onMSPointerUpGlobal,!0),q.addEventListener("MSPointerOver",this._onMSPointerOver,!0),q.addEventListener("MSPointerOut",this._onMSPointerOut,!0),window.addEventListener("pointerup",this._onMSPointerUpGlobal,!0),q.addEventListener("pointerover",this._onMSPointerOver,!0),q.addEventListener("pointerout",this._onMSPointerOut,!0),this.active=!0,!0}onPointerDown(q){this.input.executeTouchLockCallbacks(!1,q),this.event=q,this.capture&&q.preventDefault(),this.pointerDownCallback&&this.pointerDownCallback.call(this.callbackContext,q),this.input.enabled&&this.enabled&&(q.identifier=q.pointerId,"mouse"===q.pointerType||q.pointerType===ot.POINTER_TYPE?this.input.mousePointer.start(q):this.input.startPointer(q))}onPointerMove(q){this.event=q,this.capture&&q.preventDefault(),this.pointerMoveCallback&&this.pointerMoveCallback.call(this.callbackContext,q),this.input.enabled&&this.enabled&&(q.identifier=q.pointerId,"mouse"===q.pointerType||q.pointerType===ot.POINTER_TYPE?this.input.mousePointer.move(q):this.input.updatePointer(q))}onPointerUp(q){this.input.executeTouchLockCallbacks(!0,q),this.event=q,this.capture&&q.preventDefault(),this.pointerUpCallback&&this.pointerUpCallback.call(this.callbackContext,q),q.identifier=q.pointerId,"mouse"===q.pointerType||q.pointerType===ot.POINTER_TYPE?this.input.mousePointer.stop(q,!this.input.enabled||!this.enabled):this.input.stopPointer(q,!this.input.enabled||!this.enabled)}onPointerUpGlobal(q){if("mouse"!==q.pointerType&&q.pointerType!==ot.POINTER_TYPE||this.input.mousePointer.withinGame){const K=this.input.getPointerFromIdentifier(q.identifier);K&&K.withinGame&&this.onPointerUp(q)}else this.onPointerUp(q)}onPointerOut(q){var K;let z;this.event=q,this.capture&&q.preventDefault(),"mouse"===q.pointerType||q.pointerType===ot.POINTER_TYPE?this.input.mousePointer.withinGame=!1:(z=this.input.getPointerFromIdentifier(q.identifier),z&&(z.withinGame=!1)),null===(K=this.input.mouse.mouseOutCallback)||void 0===K||K.call(this.input.mouse.callbackContext,q),this.input.enabled&&this.enabled&&this.input.mouse.stopOnGameOut&&(q.identifier=0,z?z.stop(q):this.input.mousePointer.stop(q))}onPointerOver(q){if(this.event=q,this.capture&&q.preventDefault(),"mouse"===q.pointerType||q.pointerType===ot.POINTER_TYPE)this.input.mousePointer.withinGame=!0;else{const K=this.input.getPointerFromIdentifier(q.identifier);K&&(K.withinGame=!0)}this.input.mouse.mouseOverCallback&&this.input.mouse.mouseOverCallback.call(this.input.mouse.callbackContext,q)}stop(){const q=this.game.canvas;q.removeEventListener("MSPointerDown",this._onMSPointerDown,!1),q.removeEventListener("MSPointerMove",this._onMSPointerMove,!1),q.removeEventListener("MSPointerUp",this._onMSPointerUp,!1),q.removeEventListener("pointerdown",this._onMSPointerDown,!1),q.removeEventListener("pointermove",this._onMSPointerMove,!1),q.removeEventListener("pointerup",this._onMSPointerUp,!1),window.removeEventListener("MSPointerUp",this._onMSPointerUpGlobal,!0),q.removeEventListener("MSPointerOver",this._onMSPointerOver,!0),q.removeEventListener("MSPointerOut",this._onMSPointerOut,!0),window.removeEventListener("pointerup",this._onMSPointerUpGlobal,!0),q.removeEventListener("pointerover",this._onMSPointerOver,!0),q.removeEventListener("pointerout",this._onMSPointerOut,!0),this.active=!1}}ot.POINTER_TYPE=4;class ht{get time(){return et.q.instance.game.time}constructor(q,K){this.event=null,this.isDown=!1,this.isUp=!0,this.timeDown=0,this.timeUp=0,this.altKey=!1,this.shiftKey=!1,this.ctrlKey=!1,this.value=0,this.onDown=new Y.HN0,this.onUp=new Y.HN0,this.parent=q,this.buttonCode=K}start(q,K){this.isDown||(this.isDown=!0,this.isUp=!1,this.timeDown=this.time.timeMS,this.event=q,this.value=K,q&&(this.altKey=q.altKey,this.shiftKey=q.shiftKey,this.ctrlKey=q.ctrlKey),this.onDown.dispatch(this,K))}stop(q,K){this.isUp||(this.isDown=!1,this.isUp=!0,this.timeUp=this.time.timeMS,this.event=q,this.value=K,q&&(this.altKey=q.altKey,this.shiftKey=q.shiftKey,this.ctrlKey=q.ctrlKey),this.onUp.dispatch(this,K))}startStop(q,K,z){q?this.start(K,z):this.stop(K,z)}justPressed(q=250){return this.isDown&&this.timeDown+q>this.time.timeMS}justReleased(q=250){return this.isUp&&this.timeUp+q>this.time.timeMS}reset(){this.isDown=!1,this.isUp=!0,this.timeDown=this.time.timeMS,this.altKey=!1,this.shiftKey=!1,this.ctrlKey=!1}destroy(){this.onDown.dispose(),this.onUp.dispose(),this.parent=null}get duration(){return this.isUp?-1:this.time.timeMS-this.timeDown}}var ct,dt=z(59231);!function(q){q[q.CURSOR=1]="CURSOR",q[q.CONTACT=2]="CONTACT"}(ct||(ct={}));ct.CURSOR,ct.CONTACT;class lt{get duration(){return this.isUp?-1:this.game.time.timeMS-this.timeDown}get game(){return et.q.instance.game}constructor(q,K){this.exists=!0,this.identifier=0,this._holdSent=!1,this._history=[],this._nextDrop=0,this._stateReset=!1,this.withinGame=!1,this.clientX=-1,this.clientY=-1,this.pageX=-1,this.pageY=-1,this.screenX=-1,this.screenY=-1,this.rawMovementX=0,this.rawMovementY=0,this.movementX=0,this.movementY=0,this.x=-1,this.y=-1,this.isDown=!1,this.isUp=!0,this.timeDown=0,this.timeUp=0,this.previousTapTime=0,this.totalTouches=0,this.msSinceLastClick=Number.MAX_VALUE,this.targetObject=null,this.interactiveCandidates=[],this.active=!1,this.dirty=!1,this.position=new Y.I9Y,this.positionDown=new Y.I9Y,this.positionUp=new Y.I9Y,this.downObject=null,this.circle=new Y.jlt(0,0,44),this.worldPosition={x:0,y:0},this.id=q,this.isMouse=0===q,this.pointerMode=Y.Aq$.isDefined(K)?K:ct.CURSOR|ct.CONTACT,this.leftButton=new ht(this,1),this.middleButton=new ht(this,4),this.rightButton=new ht(this,2),this.backButton=new ht(this,8),this.forwardButton=new ht(this,16),this.eraserButton=new ht(this,32)}resetButtons(){this.isDown=!1,this.isUp=!0,this.isMouse&&(this.leftButton.reset(),this.middleButton.reset(),this.rightButton.reset(),this.backButton.reset(),this.forwardButton.reset(),this.eraserButton.reset())}processButtonsDown(q,K){switch(q){case 0:this.leftButton.start(K);break;case 2:this.rightButton.start(K);break;case 1:this.middleButton.start(K);break;case 3:this.backButton.start(K);break;case 4:this.forwardButton.start(K)}}processButtonsUp(q,K){switch(q){case 0:this.leftButton.stop(K);break;case 2:this.rightButton.stop(K);break;case 1:this.middleButton.stop(K);break;case 3:this.backButton.stop(K);break;case 4:this.forwardButton.stop(K)}}processButtonsUpDown(q,K){const z=K.type.toLowerCase().substr(-4),Y="down"===z,Q="move"===z;void 0!==q?(Y&&1===q&&K.ctrlKey&&(q=2),this.leftButton.startStop(Boolean(1&q),K),this.rightButton.startStop(Boolean(2&q),K),this.middleButton.startStop(Boolean(4&q),K),this.backButton.startStop(Boolean(8&q),K),this.forwardButton.startStop(Boolean(16&q),K),this.eraserButton.startStop(Boolean(32&q),K)):void 0!==K.button?Y&&K.ctrlKey&&0===K.button?this.rightButton.start(K):Y?this.processButtonsDown(K.button,K):Q||this.processButtonsUp(K.button,K):Y?K.ctrlKey?this.rightButton.start(K):this.leftButton.start(K):(this.leftButton.stop(K),this.rightButton.stop(K))}updateButtons(q){this.button=q.button,this.processButtonsUpDown(q.buttons,q),this.isUp=!0,this.isDown=!1,(this.leftButton.isDown||this.rightButton.isDown||this.middleButton.isDown||this.backButton.isDown||this.forwardButton.isDown||this.eraserButton.isDown)&&(this.isUp=!1,this.isDown=!0)}start(q){const K=this.game.input;return Y.Aq$.isDefined(q.pointerId)&&(this.pointerId=q.pointerId),this.identifier=q.identifier,this.target=q.target,this.isMouse?this.updateButtons(q):(this.isDown=!0,this.isUp=!1),this.active=!0,this.withinGame=!0,this.dirty=!1,this._history=[],this.msSinceLastClick=this.game.time.timeMS-this.timeDown,this.timeDown=this.game.time.timeMS,this._holdSent=!1,this.move(q,!0),this.positionDown.set(this.x,this.y),(0===K.multiInputOverride||1===K.multiInputOverride||2===K.multiInputOverride&&0===K.totalActivePointers)&&(K.x=this.x,K.y=this.y,K.position.setTo(this.x,this.y),K.onDown.dispatch(this,q),K.resetSpeed(this.x,this.y)),this._stateReset=!1,this.totalTouches++,null!==this.targetObject&&(this.targetObject._touchedHandler(this),this.downObject=this.targetObject),this}update(){const q=this.game.input;this.active&&(this.updateWorldPosition(),this.dirty&&(this.dirty=!1),!1===this._holdSent&&this.duration>=q.holdRate&&((0===q.multiInputOverride||1===q.multiInputOverride||2===q.multiInputOverride&&0===q.totalActivePointers)&&q.onHold.dispatch(this),this._holdSent=!0),q.recordPointerHistory&&this.game.time.timeMS>=this._nextDrop&&(this._nextDrop=this.game.time.timeMS+q.recordRate,this._history.push({x:this.position.x,y:this.position.y}),this._history.length>q.recordLimit&&this._history.shift()))}updateWorldPosition(){this.worldPosition.x=this.x,this.worldPosition.y=this.y;const q=Y.i7d.main;if(q){const K=q.GameObject.transform.worldPosition;this.worldPosition.x=this.x+K.x-q.viewportSize.getHalfWidth(),this.worldPosition.y=this.y+K.y-q.viewportSize.getHalfHeight()}}move(q,K=!1){const z=this.game.input;return z.pollLocked?null:(void 0!==q.button&&(this.button=q.button),this.isMouse&&this.updateButtons(q),this.clientX=q.clientX,this.clientY=q.clientY,this.pageX=q.pageX,this.pageY=q.pageY,this.screenX=q.screenX,this.screenY=q.screenY,this.isMouse&&z.pointerLock.locked&&!K&&(this.rawMovementX=Y.Aq$.isDefined(q.movementX)?q.movementX:Y.Aq$.isDefined(q.mozMovementX)?q.mozMovementX:Y.Aq$.isDefined(q.webkitMovementX)?q.webkitMovementX:0,this.rawMovementY=Y.Aq$.isDefined(q.movementY)?q.movementY:Y.Aq$.isDefined(q.mozMovementY)?q.mozMovementY:Y.Aq$.isDefined(q.webkitMovementY)?q.webkitMovementY:0,this.movementX+=this.rawMovementX,this.movementY+=this.rawMovementY),this.x=(this.pageX-this.game.scale.canvasOffset.x)*z.scale.x,this.y=(this.pageY-this.game.scale.canvasOffset.y)*z.scale.y,this.updateWorldPosition(),this.position.set(this.x,this.y),this.circle.x=this.x,this.circle.y=this.y,(0===z.multiInputOverride||1===z.multiInputOverride||2===z.multiInputOverride&&0===z.totalActivePointers)&&(z.activePointer=this,z.x=this.x,z.y=this.y,z.position.setTo(z.x,z.y),z.circle.x=z.x,z.circle.y=z.y),this.withinGame=this.game.scale.bounds.contains(this.pageX,this.pageY),z.onPointerMove.dispatch(this,this.x,this.y,K,q),null===this.targetObject||this.game.paused||!0!==this.targetObject.isDragged?this.processInteractiveObjects(K):!1===this.targetObject.update(this)&&(this.targetObject=null),this)}processInteractiveObjects(q=!1){var K,z;let Y=-1,Q=null;const X=[];this.interactiveCandidates=[],this.game.renderer.events.rootBoundary.rootTarget||(this.game.renderer.events.rootBoundary.rootTarget=this.game.stage);const Z=this.game.renderer.events.rootBoundary.hitTest(this.x,this.y);let J=null==Z?void 0:Z.input;if(void 0===J&&(J=null),Math.round(this.x)!==Math.round(this.worldPosition.x)||Math.round(this.y)!==Math.round(this.worldPosition.y)){const q=this.game.renderer.events.rootBoundary.hitTest(this.worldPosition.x,this.worldPosition.y),z=null!==(K=null==q?void 0:q.input)&&void 0!==K?K:null;X.push(z)}X.push(J);for(let tt=0;tt=0&&this.duration<=Z.tapRate))){const K=this.timeUp-this.previousTapTime0&&(this.active=!1),this.withinGame=this.game.scale.bounds.contains(q.pageX,q.pageY),this.pointerId=null,this.identifier=null,this.positionUp.set(this.x,this.y),K||(null===(Y=this.targetObject)||void 0===Y||Y._releasedHandler(this),null===(Q=this.downObject)||void 0===Q||Q._releasedHandler(this),null===(X=this.downObject)||void 0===X||X._pointerOutHandler(this)),this.targetObject=null,this.downObject=null,this}justPressed(q){return!0===this.isDown&&this.timeDown+(Y.Aq$.isDefined(q)?q:this.game.input.justPressedRate)>this.game.time.timeMS}justReleased(q){return this.isUp&&this.timeUp+(Y.Aq$.isDefined(q)?q:this.game.input.justReleasedRate)>this.game.time.timeMS}reset(){!1===this.isMouse&&(this.active=!1),this.pointerId=null,this.identifier=null,this.dirty=!1,this.totalTouches=0,this._holdSent=!1,this._history.length=0,this._stateReset=!0,this.resetButtons(),this.targetObject&&this.targetObject._releasedHandler(this),this.targetObject=null}resetMovement(){this.movementX=0,this.movementY=0}}class ut{get game(){return Y.W$e.instance.game}constructor(){this.active=!1,this.locked=!1,this.onChange=new Y.HN0,this.onError=new Y.HN0;const q=this.game.device;this.element=this.game.canvas,this.boundOnChangeHandler=this.onChangeHandler.bind(this),this.boundOnErrorHandler=this.onErrorHandler.bind(this),this.pointerLockElement=q.pointerLockElement,this.pointerlockchange=q.pointerlockchange,this.pointerlockerror=q.pointerlockerror}start(){return!(!X.pF.hasPointerLockSupport()||this.active)&&(this.element.requestPointerLock||(this.element.requestPointerLock=this.element.mozRequestPointerLock||this.element.webkitRequestPointerLock),document.exitPointerLock||(document.exitPointerLock=document.mozExitPointerLock||document.webkitExitPointerLock),document.addEventListener(this.pointerlockchange,this.boundOnChangeHandler,!0),document.addEventListener(this.pointerlockerror,this.boundOnErrorHandler,!0),this.active=!0,!0)}stop(){this.active&&(document.removeEventListener(this.pointerlockchange,this.boundOnChangeHandler,!0),document.removeEventListener(this.pointerlockerror,this.boundOnErrorHandler,!0),this.active=!1)}request(){this.active&&!this.locked&&this.element.requestPointerLock()}exit(){document.exitPointerLock()}onChangeHandler(q){this.locked=document[this.pointerLockElement]===this.element,this.onChange.dispatch(this.locked,q)}onErrorHandler(q){this.onError.dispatch(q)}cleanUp(){this.onChange.dispose(),this.onError.dispose()}}class ft{get game(){return Y.W$e.instance.game}constructor(){this.active=!1,this.enabled=!0,this.callbackContext=this.game}start(){return!!X.pF.hasTouchSupport()&&(void 0===this._onTouchStart&&(this._onTouchStart=this.onTouchStart.bind(this),this._onTouchMove=this.onTouchMove.bind(this),this._onTouchEnd=this.onTouchEnd.bind(this),this._onTouchEnter=this.onTouchEnter.bind(this),this._onTouchLeave=this.onTouchLeave.bind(this),this._onTouchCancel=this.onTouchCancel.bind(this),this.game.canvas.addEventListener("touchstart",this._onTouchStart,!1),this.game.canvas.addEventListener("touchmove",this._onTouchMove,!1),this.game.canvas.addEventListener("touchend",this._onTouchEnd,!1),this.game.canvas.addEventListener("touchcancel",this._onTouchCancel,!1),this.game.canvas.addEventListener("touchenter",this._onTouchEnter,!1),this.game.canvas.addEventListener("touchleave",this._onTouchLeave,!1),this.active=!0,!0))}consumeDocumentTouches(){this._documentTouchMove=q=>{q.preventDefault()},document.addEventListener("touchmove",this._documentTouchMove,!1)}onTouchStart(q){if(this.game.input.executeTouchLockCallbacks(!1,q),this.event=q,this.game.input.enabled&&this.enabled){this.touchStartCallback&&this.touchStartCallback.call(this.callbackContext,q),this.preventDefault&&q.preventDefault();for(let K=0;K0&&this._pollCounter=bt.MAX_POINTERS)return null;const q=this.pointers.length+1,K=new lt(q,ct.CONTACT);return this.pointers.push(K),this[`pointer${q}`]=K,K}update(){if(this.keyboard&&this.keyboard.update(),this.pollLocked)this._pollCounter++;else{this.speed.x=this.position.x-this._oldPosition.x,this.speed.y=this.position.y-this._oldPosition.y,this._oldPosition.copyFrom(this.position),this.mousePointer.update();for(let q=0;q=0&&this.countActivePointers(this.maxPointers)>=this.maxPointers)return null;if(!this.pointer1.active)return this.pointer1.start(q);if(!this.pointer2.active)return this.pointer2.start(q);for(let z=2;z0;Y++)K=this.pointers[Y],K.active&&z--;return q-z}getPointer(q=!1){let K;for(let z=0;zZ.m.isInputEnabled(z),set:q=>{Z.m.setInputEnabled(z,q,z),z.cursor=q?"pointer":"auto"},configurable:!0}),z.inputEnabled=K}}bt.MAX_POINTERS=10},59231:(q,K,z)=>{"use strict";z.d(K,{l:()=>et,q:()=>Y});var Y,Q=z(62459),X=z(88225),Z=z(68910),J=z(35120),tt=z(15521);!function(q){q[q.Default=0]="Default",q[q.Shape=1]="Shape",q[q.Passthrough=2]="Passthrough"}(Y||(Y={}));class et{get game(){return J.q.instance.game}constructor(q){this.enabled=!1,this.checked=!1,this.priorityID=0,this.attachToCamera=!0,this.useHandCursor=!1,this._setHandCursor=!1,this.isDragged=!1,this.allowHorizontalDrag=!0,this.allowVerticalDrag=!0,this.bringToTop=!1,this.snapOffset=null,this.snapOnDrag=!1,this.snapOnRelease=!1,this.snapX=0,this.snapY=0,this.snapOffsetX=0,this.snapOffsetY=0,this.draggable=!1,this.boundsRect=null,this.boundsSprite=null,this.dragOffset=new Q.I9Y,this.dragFromCenter=!1,this.dragStopBlocksInputUp=!1,this.dragStartPoint=new Q.I9Y,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this.downPoint=new Q.I9Y,this.snapPoint=new Q.I9Y,this._dragPoint=new Q.I9Y,this._dragPhase=!1,this._pendingDrag=!1,this._dragTimePass=!1,this._dragDistancePass=!1,this._wasEnabled=!1,this._pointerData=[],this.sprite=q,this._pointerData.push({id:0,x:0,y:0,camX:0,camY:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1}),this._pointerData.push({id:0,x:0,y:0,camX:0,camY:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1})}getHandlerType(){return Y.Default}start(q=0,K=!1){if(!1===this.enabled){this.useHandCursor=K,this.priorityID=q;for(let q=0;q<10;q++)this._pointerData[q]={id:q,x:0,y:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1};this.snapOffset=new Q.I9Y,this.enabled=!0,this.sprite.eventMode="static",this._wasEnabled=!0}return this.sprite.events.onAddedToGroup.add(this.addedToGroup,this),this.sprite.events.onRemovedFromGroup.add(this.removedFromGroup,this),this.sprite}addedToGroup(){this._dragPhase||this._wasEnabled&&!this.enabled&&this.start()}removedFromGroup(){this._dragPhase||(this.enabled?(this._wasEnabled=!0,this.stop()):this._wasEnabled=!1)}reset(){this.enabled=!1,this.sprite.eventMode="none";for(let q=0;q<10;q++)this._pointerData[q]={id:q,x:0,y:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1}}stop(){!1!==this.enabled&&(this.enabled=!1,this.sprite.eventMode="none")}destroy(){this.enabled=!1,this.sprite&&(this._setHandCursor&&(this.game.canvas.style.cursor="",this._setHandCursor=!1),this.sprite.eventMode="none",this._pointerData.length=0,this.boundsRect=null,this.boundsSprite=null,this.sprite=null)}validForInput(q){var K,z;return!(!(this.enabled&&this.sprite&&this.sprite.transform&&0!==(null===(K=this.sprite.worldScale)||void 0===K?void 0:K.x)&&0!==(null===(z=this.sprite.worldScale)||void 0===z?void 0:z.y))||this.priorityID=q}pointerX(q=0){return this._pointerData[q].x}pointerY(q=0){return this._pointerData[q].y}pointerDown(q=0){var K,z;return null!==(z=null===(K=this._pointerData[q])||void 0===K?void 0:K.isDown)&&void 0!==z&&z}pointerUp(q=0){var K,z;return null!==(z=null===(K=this._pointerData[q])||void 0===K?void 0:K.isUp)&&void 0!==z&&z}pointerTimeDown(q=0){return this._pointerData[q].timeDown}pointerTimeUp(q=0){return this._pointerData[q].timeUp}pointerOver(q=0){var K,z,Y;if(!this.enabled)return!1;if(void 0===q){for(let q=0;q<10;q++)if(null===(K=this._pointerData[q])||void 0===K?void 0:K.isOver)return!0;return!1}return null!==(Y=null===(z=this._pointerData[q])||void 0===z?void 0:z.isOver)&&void 0!==Y&&Y}pointerOut(q=0){if(!this.enabled)return!1;if(void 0!==q)return this._pointerData[q].isOut;for(let K=0;K<10;K++)if(this._pointerData[K].isOut)return!0}pointerTimeOver(q=0){return this._pointerData[q].timeOver}pointerTimeOut(q=0){return this._pointerData[q].timeOut}pointerDragged(q=0){return this._pointerData[q].isDragged}checkPointerDown(q){var K,z,Y;if(!(q&&q.isDown&&this.enabled&&(null===(K=this.sprite)||void 0===K?void 0:K.parent)&&this.sprite.visible&&this.sprite.parent.visible&&0!==(null===(z=this.sprite.worldScale)||void 0===z?void 0:z.x)&&0!==(null===(Y=this.sprite.worldScale)||void 0===Y?void 0:Y.y)))return!1;const Q=this.attachToCamera?q.position:q.worldPosition;return this.game.input.hitTest(this.sprite,Q)}checkPointerOver(q){var K,z,Y;if(!(this.enabled&&(null===(K=this.sprite)||void 0===K?void 0:K.parent)&&this.sprite.visible&&this.sprite.parent.visible&&0!==(null===(z=this.sprite.worldScale)||void 0===z?void 0:z.x)&&0!==(null===(Y=this.sprite.worldScale)||void 0===Y?void 0:Y.y)))return!1;const Q=this.attachToCamera?q.position:q.worldPosition;return this.game.input.hitTest(this.sprite,Q)}update(q){var K,z;return!!(null===(K=this.sprite)||void 0===K?void 0:K.parent)&&(this.enabled&&this.sprite.visible&&this.sprite.parent.visible?this._pendingDrag?(this._dragDistancePass||(this._dragDistancePass=Q.cj9.distance(q.x,q.y,this.downPoint.x,this.downPoint.y)>=this.dragDistanceThreshold),this._dragDistancePass&&this._dragTimePass&&this.startDrag(q),!0):this.draggable&&this._draggedPointerID===q.id?this.updateDrag(q,!1):!!(null===(z=this._pointerData[q.id])||void 0===z?void 0:z.isOver)&&(this.checkPointerOver(q)?(this._pointerData[q.id].x=q.x-this.sprite.x,this._pointerData[q.id].y=q.y-this.sprite.y,!0):(this._pointerOutHandler(q),!1)):(this._pointerOutHandler(q),!1))}_pointerOverHandler(q,K=!1){var z,Y,Q,X,Z;if(null===this.sprite)return;const J=this._pointerData[q.id];if(J&&(!1===J.isOver||q.dirty)){const tt=!1===J.isOver;J.isOver=!0,J.isOut=!1,J.timeOver=this.game.time.timeMS,J.x=q.x-this.sprite.x,J.y=q.y-this.sprite.y,this.useHandCursor&&!1===J.isDragged&&(this.game.canvas.style.cursor="pointer",this._setHandCursor=!0),!K&&tt&&this.sprite&&(null===(z=this.sprite.events)||void 0===z||z.onInputOver.dispatch(this.sprite,q),null===(Z=null===(X=null===(Q=null===(Y=this.sprite)||void 0===Y?void 0:Y._events)||void 0===Q?void 0:Q.pointerover)||void 0===X?void 0:X.fn)||void 0===Z||Z.call(X,this.getMouseEvent(q))),this.sprite.parent&&this.sprite.parent.onChildInputOver&&this.sprite.parent.onChildInputOver.dispatch(this.sprite,q)}}getMouseEvent(q){return{data:{isPrimary:0===q.button||1===q.id,global:{x:q.x,y:q.y}},stopPropagation:()=>{}}}_pointerOutHandler(q,K=!1){var z,Y,Q,X,Z;if(null===this.sprite)return;const J=this._pointerData[q.id];J&&(J.isOver=!1,J.isOut=!0,J.timeOut=this.game.time.timeMS,this.useHandCursor&&!1===J.isDragged&&(this.game.canvas.style.cursor="",this._setHandCursor=!1),!K&&this.sprite&&(null===(z=this.sprite.events)||void 0===z||z.onInputOut.dispatch(this.sprite,q),null===(Z=null===(X=null===(Q=null===(Y=this.sprite)||void 0===Y?void 0:Y._events)||void 0===Q?void 0:Q.pointerout)||void 0===X?void 0:X.fn)||void 0===Z||Z.call(X,this.getMouseEvent(q)),this.sprite&&this.sprite.parent&&this.sprite.parent.onChildInputOut&&this.sprite.parent.onChildInputOut.dispatch(this.sprite,q)))}_touchedHandler(q){var K,z,Y,Q,Z;if(null===this.sprite)return;const J=this._pointerData[q.id];if(J&&!J.isDown&&J.isOver){if(J.isDown=!0,J.isUp=!1,J.timeDown=this.game.time.timeMS,this.downPoint.set(q.x,q.y),q.dirty=!0,this.sprite){{const q=[];let K=this.sprite.parent;for(;K;)q.unshift(K.name),K=K.parent;X.addBreadcrumb({category:"ui.click",message:q.join(" > ")})}if(null===(K=this.sprite.events)||void 0===K||K.onInputDown.dispatch(this.sprite,q),null===(Z=null===(Q=null===(Y=null===(z=this.sprite)||void 0===z?void 0:z._events)||void 0===Y?void 0:Y.pointerdown)||void 0===Q?void 0:Q.fn)||void 0===Z||Z.call(Q,this.getMouseEvent(q)),this.sprite&&this.sprite.parent&&this.sprite.parent.onChildInputDown&&this.sprite.parent.onChildInputDown.dispatch(this.sprite,q),null===this.sprite)return}this.draggable&&!1===this.isDragged&&(0===this.dragTimeThreshold&&0===this.dragDistanceThreshold?this.startDrag(q):(this._pendingDrag=!0,this._dragDistancePass=0===this.dragDistanceThreshold,this.dragTimeThreshold>0?(this._dragTimePass=!1,this.game.time.events.addTimer(this.dragTimeThreshold,this.dragTimeElapsed,this,q)):this._dragTimePass=!0)),this.bringToTop&&tt.Z.bringToTop(this.sprite)}}dragTimeElapsed(q){this._dragTimePass=!0,this._pendingDrag&&this.sprite&&this._dragDistancePass&&this.startDrag(q)}_releasedHandler(q){var K,z,Y,X,Z,J,tt,et,it;if(null===this.sprite)return;const st=this._pointerData[q.id];if(st&&st.isDown&&q.isUp){st.isDown=!1,st.isUp=!0,st.timeUp=this.game.time.timeMS,st.downDuration=st.timeUp-st.timeDown;let nt=this.checkPointerOver(q);this.sprite&&(this.dragStopBlocksInputUp&&(!this.dragStopBlocksInputUp||this.draggable&&this.isDragged&&this._draggedPointerID===q.id)||null===(K=this.sprite.events)||void 0===K||K.onInputUp.dispatch(this.sprite,q,nt),null===(Z=null===(X=null===(Y=null===(z=this.sprite)||void 0===z?void 0:z._events)||void 0===Y?void 0:Y.pointerup)||void 0===X?void 0:X.fn)||void 0===Z||Z.call(X,this.getMouseEvent(q)),Q.o5U.isMobile()&&(null===(it=null===(et=null===(tt=null===(J=this.sprite)||void 0===J?void 0:J._events)||void 0===tt?void 0:tt.pointerout)||void 0===et?void 0:et.fn)||void 0===it||it.call(et,this.getMouseEvent(q))),this.sprite&&this.sprite.parent&&this.sprite.parent.onChildInputUp&&this.sprite.parent.onChildInputUp.dispatch(this.sprite,q,nt),nt&&(nt=this.checkPointerOver(q))),st.isOver=nt,!nt&&this.useHandCursor&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),q.dirty=!0,this._pendingDrag=!1,this.draggable&&this.isDragged&&this._draggedPointerID===q.id&&this.stopDrag(q)}}updateDrag(q,K=!1){var z,Y,X,J;const tt=this.dragOffset,et=this._dragPoint,it=this._pointerData[q.id],st=this.snapPoint,nt=this.sprite,at=nt instanceof Z.Graphics;if(!("texture"in nt)&&!at)return Q.VyI.log("Error: Sprite does not implement IImage",Q.$bb.Error),!1;if(q.isUp)return this.stopDrag(q),!1;const rt=this.globalToLocal(q),ot=rt.x+et.x+tt.x,ht=rt.y+et.y+tt.y;let ct,dt;if(nt.fixedToCamera){const q=nt.cameraOffset,K=q.x,X=q.y,Z=null!==(Y=null===(z=this.game.stage.camera)||void 0===z?void 0:z.GameObject.transform.worldPosition)&&void 0!==Y?Y:Q.I9Y.ZERO;this.allowHorizontalDrag&&(q.x=ot-Z.x),this.allowVerticalDrag&&(q.y=ht-Z.y),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(q.x=Math.round((q.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,q.y=Math.round((q.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,st.setTo(q.x,q.y)),ct=q.x-K,dt=q.y-X}else{const q=null!==(J=null===(X=this.game.stage.camera)||void 0===X?void 0:X.GameObject.transform.worldPosition)&&void 0!==J?J:Q.I9Y.ZERO,K=q.x-it.camX,z=q.y-it.camY,Y=nt.x,Z=nt.y;this.allowHorizontalDrag&&(nt.x=ot+K),this.allowVerticalDrag&&(nt.y=ht+z),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(nt.x=Math.round((nt.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,nt.y=Math.round((nt.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,st.setTo(nt.x,nt.y)),ct=nt.x-Y,dt=nt.y-Z}return this.sprite.events.onDragUpdate.dispatch(nt,q,ot,ht,st,K,ct,dt),!0}justOver(q=0,K=500){return!!this._pointerData[q]&&(this._pointerData[q].isOver&&this.overDuration(q)this.boundsRect.right&&(this.sprite.cameraOffset.x=this.boundsRect.right-this.sprite.width),this.sprite.cameraOffset.ythis.boundsRect.bottom&&(this.sprite.cameraOffset.y=this.boundsRect.bottom-this.sprite.height);else{const q=this.sprite.getBounds();q.leftthis.boundsRect.right&&(this.sprite.x=this.boundsRect.right-(this.sprite.width-this.sprite.getOffsetX())),q.topthis.boundsRect.bottom&&(this.sprite.y=this.boundsRect.bottom-(this.sprite.height-this.sprite.getOffsetY()))}}checkBoundsSprite(){if(this.sprite.fixedToCamera&&this.boundsSprite.fixedToCamera)this.sprite.cameraOffset.xthis.boundsSprite.cameraOffset.x+this.boundsSprite.width&&(this.sprite.cameraOffset.x=this.boundsSprite.cameraOffset.x+this.boundsSprite.width-this.sprite.width),this.sprite.cameraOffset.ythis.boundsSprite.cameraOffset.y+this.boundsSprite.height&&(this.sprite.cameraOffset.y=this.boundsSprite.cameraOffset.y+this.boundsSprite.height-this.sprite.height);else{const q=this.sprite.getBounds();q.leftthis.boundsSprite.right&&(this.sprite.x=this.boundsSprite.right-(this.sprite.width-this.sprite.getOffsetX())),q.topthis.boundsSprite.bottom&&(this.sprite.y=this.boundsSprite.bottom-(this.sprite.height-this.sprite.getOffsetY()))}}}},60881:(q,K,z)=>{"use strict";z.d(K,{D:()=>Y});class Y{}Y.A="A".charCodeAt(0),Y.B="B".charCodeAt(0),Y.C="C".charCodeAt(0),Y.D="D".charCodeAt(0),Y.E="E".charCodeAt(0),Y.F="F".charCodeAt(0),Y.G="G".charCodeAt(0),Y.H="H".charCodeAt(0),Y.I="I".charCodeAt(0),Y.J="J".charCodeAt(0),Y.K="K".charCodeAt(0),Y.L="L".charCodeAt(0),Y.M="M".charCodeAt(0),Y.N="N".charCodeAt(0),Y.O="O".charCodeAt(0),Y.P="P".charCodeAt(0),Y.Q="Q".charCodeAt(0),Y.R="R".charCodeAt(0),Y.S="S".charCodeAt(0),Y.T="T".charCodeAt(0),Y.U="U".charCodeAt(0),Y.V="V".charCodeAt(0),Y.W="W".charCodeAt(0),Y.X="X".charCodeAt(0),Y.Y="Y".charCodeAt(0),Y.Z="Z".charCodeAt(0),Y.ZERO="0".charCodeAt(0),Y.ONE="1".charCodeAt(0),Y.TWO="2".charCodeAt(0),Y.THREE="3".charCodeAt(0),Y.FOUR="4".charCodeAt(0),Y.FIVE="5".charCodeAt(0),Y.SIX="6".charCodeAt(0),Y.SEVEN="7".charCodeAt(0),Y.EIGHT="8".charCodeAt(0),Y.NINE="9".charCodeAt(0),Y.NUMPAD_0=96,Y.NUMPAD_1=97,Y.NUMPAD_2=98,Y.NUMPAD_3=99,Y.NUMPAD_4=100,Y.NUMPAD_5=101,Y.NUMPAD_6=102,Y.NUMPAD_7=103,Y.NUMPAD_8=104,Y.NUMPAD_9=105,Y.NUMPAD_MULTIPLY=106,Y.NUMPAD_ADD=107,Y.NUMPAD_ENTER=108,Y.NUMPAD_SUBTRACT=109,Y.NUMPAD_DECIMAL=110,Y.NUMPAD_DIVIDE=111,Y.F1=112,Y.F2=113,Y.F3=114,Y.F4=115,Y.F5=116,Y.F6=117,Y.F7=118,Y.F8=119,Y.F9=120,Y.F10=121,Y.F11=122,Y.F12=123,Y.F13=124,Y.F14=125,Y.F15=126,Y.COLON=186,Y.EQUALS=187,Y.COMMA=188,Y.UNDERSCORE=189,Y.PERIOD=190,Y.QUESTION_MARK=191,Y.TILDE=192,Y.OPEN_BRACKET=219,Y.BACKWARD_SLASH=220,Y.CLOSED_BRACKET=221,Y.QUOTES=222,Y.BACKSPACE=8,Y.TAB=9,Y.CLEAR=12,Y.ENTER=13,Y.SHIFT=16,Y.CONTROL=17,Y.ALT=18,Y.CAPS_LOCK=20,Y.ESC=27,Y.SPACEBAR=32,Y.PAGE_UP=33,Y.PAGE_DOWN=34,Y.END=35,Y.HOME=36,Y.LEFT=37,Y.UP=38,Y.RIGHT=39,Y.DOWN=40,Y.PLUS=43,Y.MINUS=44,Y.INSERT=45,Y.DELETE=46,Y.HELP=47,Y.NUM_LOCK=144,Y.BACK_QUOTE=192},49237:(q,K,z)=>{"use strict";z.d(K,{$:()=>J});var Y=z(8674),Q=z(62459),X=z(12808),Z=z(76974);let J=class extends X.u{constructor(){super(...arguments),this.onClick=new Q.HN0,this.onEnabledClick=new Q.HN0,this.onDisabledClick=new Q.HN0}onUp(q,K,z){if(!this.shouldDebounce()){if(this._lastClickTime=Date.now(),this.currentState===Z.K.Down&&z){const q=[];q.push(this.onClick.dispatchAsync()),this.getButtonState()===Z.K.Down?q.push(this.onEnabledClick.dispatchAsync()):this.getButtonState()===Z.K.Disabled&&q.push(this.onDisabledClick.dispatchAsync()),this.awaitingListeners=!0,Promise.all(q).catch(Q.RQr.createHandler("Rejected promise in Button.onUp")).finally((()=>{var q,K;null===(K=null===(q=this.gameObject)||void 0===q?void 0:q.isDestroyed)||void 0===K||K||(this.awaitingListeners=!1)}))}super.onUp(q,K,z)}}onDown(q,K){this.shouldDebounce()||super.onDown(q,K)}destroy(){this.onClick.dispose(),this.onEnabledClick.dispose(),this.onDisabledClick.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onClick",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onEnabledClick",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onDisabledClick",void 0),J=(0,Y.Cg)([(0,Q.EVk)("Button",Q.YH6.ui)],J)},12808:(q,K,z)=>{"use strict";z.d(K,{u:()=>tt});var Y=z(8674),Q=z(62459),X=z(76974),Z=z(56163),J=z(13930);class tt extends Z.t{constructor(){super(...arguments),this._transition=null,this._currentState=tt.DEFAULT_STATE,this._isTransitionLocked=!1,this._awaitingListeners=!1,this._lastClickTime=0}get transition(){return this._transition}set awaitingListeners(q){this._awaitingListeners=q,this.applyCurrentState()}get currentState(){return this._currentState}set currentState(q){const K=this._currentState;this._currentState=q,this.onStateChanged(this._currentState,K)}postCreate(){super.postCreate(),this.applyCurrentState(),Q.Aq$.isDefined(this._initialLockedState)&&this.lockState(this._initialLockedState)}update(){super.update(),this._delayedLockState&&(this.lockState(this._delayedLockState),this._delayedLockState=null)}shouldDebounce(){return this.debounceTimeMs>0&&Date.now(){"use strict";var Y;z.d(K,{K:()=>Y}),function(q){q[q.Over=0]="Over",q[q.Down=1]="Down",q[q.Up=2]="Up",q[q.Disabled=3]="Disabled"}(Y||(Y={}))},24519:(q,K,z)=>{"use strict";z.d(K,{v:()=>tt});var Y,Q=z(8674),X=z(62459),Z=z(76974),J=z(13930);let tt=Y=class extends J.e{constructor(){super(...arguments),this._upStateObject=null,this._downStateObject=null,this._overStateObject=null,this._disabledStateObject=null,this.currentStateObject=null,this.avoidEmptyStates=!1}postCreate(){super.postCreate(),this._upStateObject&&(this._upStateObject.active=!1),this._downStateObject&&(this._downStateObject.active=!1),this._overStateObject&&(this._overStateObject.active=!1),this._disabledStateObject&&(this._disabledStateObject.active=!1),this.currentStateObject&&(this.currentStateObject.active=!0)}update(){var q;super.update(),!(null===(q=this.currentStateObject)||void 0===q?void 0:q.activeInHierarchy)&&this.avoidEmptyStates&&(this.currentStateObject=this.getStateObject(Y.DEFAULT_STATE),this.currentStateObject&&this.gameObject.onActiveInHierarchyChanged.dispatch())}setState(q){this.currentStateObject&&(this.currentStateObject.active=!1),this.currentStateObject=this.getStateObject(q),this.currentStateObject?this.currentStateObject.active=!0:this.avoidEmptyStates&&(this.currentStateObject=this.getStateObject(Y.DEFAULT_STATE),this.currentStateObject&&(this.currentStateObject.active=!0))}getStateObject(q){switch(q){case Z.K.Up:return this._upStateObject;case Z.K.Down:return this._downStateObject;case Z.K.Over:return this._overStateObject;case Z.K.Disabled:return this._disabledStateObject;default:return null}}};tt.DEFAULT_STATE=Z.K.Up,(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],tt.prototype,"_upStateObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],tt.prototype,"_downStateObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],tt.prototype,"_overStateObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],tt.prototype,"_disabledStateObject",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],tt.prototype,"avoidEmptyStates",void 0),tt=Y=(0,Q.Cg)([(0,X.EVk)("GameObjectTransition",X.YH6.transition)],tt)},56163:(q,K,z)=>{"use strict";z.d(K,{t:()=>Z});var Y=z(8674),Q=z(62459),X=z(35120);let Z=class extends Q.y4o{constructor(){super(...arguments),this._collisionBox=null,this._root=null,this._interactableStartupValues={events:new Q.sVA(null)},this._size=new Q.or0}get inputEnabled(){return!!this._collisionBox&&this._collisionBox.inputEnabled}set inputEnabled(q){this._collisionBox?(this._collisionBox.inputEnabled=q,this.applyUseHandCursorSetting(this._collisionBox,this.useHandCursor)):this._interactableStartupValues.inputEnable=q}get useHandCursor(){return!(!this._collisionBox||!this._collisionBox.input)&&this._collisionBox.input.useHandCursor}set useHandCursor(q){this._collisionBox?this.applyUseHandCursorSetting(this._collisionBox,q):this._interactableStartupValues.useHandCursor=q}get onInputDown(){return this.getCurrentEvents().onInputDown}get onInputUp(){return this.getCurrentEvents().onInputUp}get onInputOver(){return this.getCurrentEvents().onInputOver}get onInputOut(){return this.getCurrentEvents().onInputOut}getCurrentEvents(){return this._collisionBox?this._collisionBox.events:this._interactableStartupValues.events}create(){super.create();const q=this.getCollisionBox().events;q.onInputDown.add(this.onDown,this),q.onInputUp.add(this.onUp,this),q.onInputOver.add(this.onOver,this),q.onInputOut.add(this.onOut,this),Q.Aq$.isDefined(this._interactableStartupValues.inputEnable)&&(this.inputEnabled=this._interactableStartupValues.inputEnable),Q.Aq$.isDefined(this._interactableStartupValues.useHandCursor)&&this.applyUseHandCursorSetting(this._collisionBox,this._interactableStartupValues.useHandCursor),this.updateCollisionBox(),this.destroyStartupValues()}setInputPriority(q){const K=this.getCollisionBox();K&&(K.input.priorityID=q)}isInputTarget(q){var K;return(null===(K=q.interactiveCandidates)||void 0===K?void 0:K.length)>0&&q.interactiveCandidates[q.interactiveCandidates.length-1].sprite===this.getCollisionBox()}destroy(){var q;if(this._collisionBox){const q=this._collisionBox.events;q&&(q.onInputDown.removeAll(this),q.onInputUp.removeAll(this),q.onInputOver.removeAll(this),q.onInputOut.removeAll(this)),this._collisionBox.destroy&&this._collisionBox.destroy()}this._collisionBox=null,this.destroyStartupValues(),null===(q=this._root)||void 0===q||q.destroy(),super.destroy()}destroyStartupValues(){this._interactableStartupValues&&(this._interactableStartupValues.events&&this._interactableStartupValues.events.destroy(),this._interactableStartupValues.events=null,this._interactableStartupValues=null)}getDimensions(){const q=this._collisionBox&&!this._collisionBox._destroyed,K=q?this._collisionBox.width:0,z=q?this._collisionBox.height:0;return this._size.setTo(K,z),this._size}getCollisionBox(q=!0){return q&&!this._collisionBox&&this.createInternalCollisionBox(),this._collisionBox}onDown(q,K){}onUp(q,K,z){}onOver(q,K){}onOut(q,K){}applyUseHandCursorSetting(q,K){(null==q?void 0:q.input)&&(q.input.useHandCursor=K)}createInternalCollisionBox(){var q;this._root=X.q.instance.game.add.group(void 0,null===(q=this.gameObject)||void 0===q?void 0:q.name),this.setRootContainer(this._root),this._collisionBox=X.q.instance.game.add.sprite(0,0,"","",this._root);const K=this._collisionBox.events;this._interactableStartupValues.events.parent=this._collisionBox.events.parent,this._collisionBox.events=this._interactableStartupValues.events,this._interactableStartupValues.events=K,this._collisionBox.width=10,this._collisionBox.height=10,this._collisionBox.alpha=0,this._collisionBox.inputEnabled=!0}updateCollisionBox(){const q=this.getCollisionBox();if(this.GameObject.legacyTransform){const K=this.GameObject.legacyTransform;q.width=K.width,q.height=K.height}q.inputEnabled=this.inputEnabled,this.applyUseHandCursorSetting(q,this.useHandCursor)}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean),(0,Y.Sn)("design:paramtypes",[Boolean])],Z.prototype,"inputEnabled",null),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean),(0,Y.Sn)("design:paramtypes",[Boolean])],Z.prototype,"useHandCursor",null),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0),(0,Y.Sn)("design:paramtypes",[])],Z.prototype,"onInputDown",null),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0),(0,Y.Sn)("design:paramtypes",[])],Z.prototype,"onInputUp",null),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0),(0,Y.Sn)("design:paramtypes",[])],Z.prototype,"onInputOver",null),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0),(0,Y.Sn)("design:paramtypes",[])],Z.prototype,"onInputOut",null),Z=(0,Y.Cg)([(0,Q.EVk)("Interactable",Q.YH6.input)],Z)},54422:(q,K,z)=>{"use strict";z.d(K,{E:()=>Z});var Y=z(8674),Q=z(62459),X=z(35120);let Z=class extends Q.uAl{constructor(){super(...arguments),this._enableContinuousPress=!1,this._onKeyDown=new Q.HN0,this._isEnabled=!0}get onKeyDown(){return this._onKeyDown}create(){super.create(),Q.Aq$.isDefined(this._keyCode)&&this.initialize(this._keyCode,null,this._enableContinuousPress)}initialize(q,K=null,z=!1){this._keyCode=q,K&&this._onKeyDown.add(K),this._onKeyHandler=()=>{this._isEnabled&&this.GameObject.active&&this._onKeyDown.dispatch()},this._key=X.q.instance.game.input.keyboard.addKey(this._keyCode),this._key.onDown.add(this._onKeyHandler,this),this._enableContinuousPress=z,this._enableContinuousPress&&(this.update=()=>{this._key.isDown&&this._onKeyHandler()})}setEnabled(q){this._isEnabled=q}destroy(){this._key&&(this._key.onDown.remove(this._onKeyHandler,this),this._onKeyHandler=null,this._onKeyDown.dispose()),super.destroy()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Z.prototype,"_keyCode",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_enableContinuousPress",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"_onKeyDown",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("KeyListener",Q.YH6.input)],Z)},83133:(q,K,z)=>{"use strict";z.d(K,{l:()=>tt});var Y=z(8674),Q=z(62459),X=z(11647),Z=z(12808),J=z(76974);let tt=class extends((0,X.o)(Z.u)){constructor(){super(...arguments),this._autoAddToParentGroup=!1,this.onSelected=this.createTidySignal(),this.onSelectedStatusChanged=this.createTidySignal(),this.onUnselected=this.createTidySignal(),this.onLockedClick=this.createTidySignal(),this.onSelectedLockedClick=this.createTidySignal(),this._selected=!1,this._isSelectionLocked=!1}get isSelectionLocked(){return this._isSelectionLocked}set isSelectionLocked(q){this._isSelectionLocked=q}setSelected(q){this._selected=q,this.onSelectedStatusChanged.dispatch(q),this.applyCurrentState()}isSelected(){return this._selected}onUp(q,K,z){this.shouldDebounce()||(this._lastClickTime=Date.now(),this.currentState===J.K.Down&&z&&(this._isSelectionLocked?this.onSelectedLockedClick.dispatch():(this.isStateLocked()&&this.onLockedClick.dispatch(),this.isStateLocked()&&this.getLockedState()===J.K.Disabled||(this.dispatchFromReverseState(),this.setSelected(!this.isSelected())))),super.onUp(q,K,z))}dispatchFromCurrentState(){this._isSelectionLocked?this.onSelectedLockedClick.dispatch():this._selected?this.onSelected.dispatch():this.onUnselected.dispatch()}dispatchFromReverseState(){this._selected?this.onUnselected.dispatch():this.onSelected.dispatch()}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_autoAddToParentGroup",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onSelected",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onSelectedStatusChanged",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onUnselected",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onLockedClick",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onSelectedLockedClick",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_selected",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("Toggle",Q.YH6.ui)],tt)},94566:(q,K,z)=>{"use strict";z.d(K,{O:()=>J});var Y=z(8674),Q=z(62459),X=z(11647),Z=z(83133);let J=class extends((0,X.o)(Q.uAl)){constructor(){super(...arguments),this.autoAddChildren=!1,this.allowMultiSelect=!1,this.allowNoSelection=!1,this.toggleObjects=[],this.defaultIndex=[],this.onSelectedLockedClick=this.createTidySignal(),this.onSelectedChangedByClick=this.createTidySignal()}postCreate(){super.postCreate(),this.autoAddChildren&&this.addListenerToSignal(this.gameObject.onChildAdded,(q=>this.onChildAdded(q)));const q=0===this.defaultIndex.length||this.defaultIndex[0]>this.toggleObjects.length-1;for(let K=0;Kthis.listenToItem(q)))}onChildAdded(q){const K=q.findComponentInChildren(Z.l,!0);K&&this.addSelectable(K)}listenToItem(q){this.addListenerToSignal(q.onSelected,(()=>this.clicked(q))),this.addListenerToSignal(q.onSelectedLockedClick,(()=>this.clickLocked(q)))}clicked(q){if(!this.allowMultiSelect)for(let K=0;Kthis.toggleObjects[q])))}setSelected(...q){q.length>1&&!this.allowMultiSelect&&q.splice(1);for(const K of this.toggleObjects){const z=q.includes(K);z?K.isSelectionLocked=!0:this.setItemSelected(K,z)}}getToggles(){return this.toggleObjects}setDefaultSelectionIndex(...q){q.length>1&&!this.allowMultiSelect&&q.splice(1),this.defaultIndex=q}removeSelectable(q){const K=this.toggleObjects.indexOf(q);-1!==K&&(q.onSelected.remove(this.clicked,this),q.onSelectedLockedClick.remove(this.clickLocked,this),this.toggleObjects.splice(K,1))}clearSelectables(){this.toggleObjects.forEach((q=>this.removeSelectable(q)))}setItemSelected(q,K){q.setSelected(K),q.isSelectionLocked=!this.allowMultiSelect&&K}setItemSelectedByIndex(q,K){this.setItemSelected(this.toggleObjects[q],K)}destroy(){super.destroy()}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"autoAddChildren",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"allowMultiSelect",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"allowNoSelection",void 0),(0,Y.Cg)([(0,Q.MnK)(Z.l),(0,Q.SZi)(),(0,Y.Sn)("design:type",Array)],J.prototype,"toggleObjects",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Q.SZi)(),(0,Y.Sn)("design:type",Array)],J.prototype,"defaultIndex",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onSelectedLockedClick",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onSelectedChangedByClick",void 0),J=(0,Y.Cg)([(0,Q.EVk)("ToggleGroup",Q.YH6.ui)],J)},13930:(q,K,z)=>{"use strict";z.d(K,{e:()=>X});var Y=z(8674),Q=z(62459);let X=class extends Q.uAl{setState(q){}};X=(0,Y.Cg)([(0,Q.EVk)("Transition (abstract)")],X)},47716:(q,K,z)=>{"use strict";z.d(K,{H:()=>Z});var Y=z(8674),Q=z(62459),X=z(11472);let Z=class extends X.B{constructor(){super(...arguments),this._dataSource=null,this._createSection=()=>{const q=new Q._mx;return q.addComponent(Q.K16),q},this._createCell=()=>{const q=new Q._mx;return q.addComponent(Q.K16),q},this._numColumns=2,this._columnBuffer=15,this._sectionBuffer=15,this._rowHeight=115,this._sectionHeight=50}get dataSource(){return this._dataSource}set dataSource(q){this._dataSource=q}set createSection(q){this._createSection=q}set createCell(q){this._createCell=q}set numColumns(q){this._numColumns=q}get numColumns(){return this._numColumns}set columnBuffer(q){this._columnBuffer=q}get columnBuffer(){return this._columnBuffer}set sectionBuffer(q){this._sectionBuffer=q}get sectionBuffer(){return this._sectionBuffer}set rowHeight(q){this._rowHeight=q}get rowHeight(){return this._rowHeight}set sectionHeight(q){this._sectionHeight=q}get sectionHeight(){return this._sectionHeight}populateContentView(){super.populateContentView();let q=-(this._sectionHeight+this._sectionBuffer);for(let K=0;K{"use strict";z.d(K,{$:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(5269),tt=z(56163);let et=Y=class extends tt.t{constructor(){super(...arguments),this._pressed=!1,this._direction=J.H.Vertical,this._nib=null,this.resizingEnabled=!1,this.minNibSize=Y.DEFAULT_NIB_SIZE,this.maxNibSize=Y.DEFAULT_NIB_SIZE,this._scrollView=null}set direction(q){this._direction=q}get direction(){return this._direction}set horizontal(q){q&&(this._direction=J.H.Horizontal)}create(){super.create(),Z.q.instance.game.input.addMoveCallback(this.moveNib,this)}initialize(q,K){this._nib=q||this._nib,this._scrollView=K||this._scrollView}onDown(q,K){this._pressed=!0,this.moveNib(K,K.x,K.y)}onUp(q,K,z){this._pressed=!1,this._scrollView.scrollReleaseListener.dispatch(this.getPercent())}moveNib(q,K,z){this._pressed&&(this.direction===J.H.Vertical?this._nib.legacyTransform.y=z-this.getCollisionBox().worldTransform.ty-this._nib.legacyTransform.height/2:this._nib.legacyTransform.x=K-this.getCollisionBox().worldTransform.tx-this._nib.legacyTransform.width/2,this.limitMovement(),this._scrollView.scrollBarListener.dispatch(this.getPercent(),this._direction))}limitMovement(){this.direction===J.H.Vertical?this._nib.legacyTransform.ythis.maxNibY()&&(this._nib.legacyTransform.y=this.maxNibY()):this._nib.legacyTransform.xthis.maxNibX()&&(this._nib.legacyTransform.x=this.maxNibX())}scrollToPercent(q){this.direction===J.H.Vertical?this._nib.legacyTransform.y=-this.maxNibY()*q:this._nib.legacyTransform.x=this.maxNibX()*q,this.limitMovement()}getPercent(){return this.direction===J.H.Vertical?this._nib.legacyTransform.y/(this.getCollisionBox().height-this._nib.legacyTransform.height):this._nib.legacyTransform.x/(this.getCollisionBox().width-this._nib.legacyTransform.width)}setNibSize(q){if(!this.resizingEnabled)return;const K=this._nib.legacyTransform.scaleX,z=this._nib.legacyTransform.scaleY,Y=X.cj9.clamp((this.maxNibSize-this.minNibSize)*q+this.minNibSize,this.minNibSize,this.maxNibSize);this.direction===J.H.Vertical?this._nib.legacyTransform.height=Y:this._nib.legacyTransform.width=Y,this.limitMovement(),this._nib.findComponent(X.V09).resetImages(),this._nib.legacyTransform.scaleX=K,this._nib.legacyTransform.scaleY=z}maxNibY(){return this.getCollisionBox().height+this.getCollisionBox().y-this._nib.legacyTransform.height}maxNibX(){return this.getCollisionBox().width+this.getCollisionBox().x-this._nib.legacyTransform.width}destroy(){Z.q.instance.game.input.deleteMoveCallback(this.moveNib,this),super.destroy()}};et.DEFAULT_NIB_SIZE=87,(0,Q.Cg)([(0,X.vkK)(),(0,X.nKb)("isHorizontal"),(0,Q.Sn)("design:type",Boolean),(0,Q.Sn)("design:paramtypes",[Boolean])],et.prototype,"horizontal",null),(0,Q.Cg)([(0,X.x4W)("nib"),(0,Q.Sn)("design:type",X._mx)],et.prototype,"_nib",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],et.prototype,"resizingEnabled",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],et.prototype,"minNibSize",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],et.prototype,"maxNibSize",void 0),(0,Q.Cg)([(0,X.x4W)("scrollView"),(0,Q.Sn)("design:type",Function)],et.prototype,"_scrollView",void 0),et=Y=(0,Q.Cg)([(0,X.EVk)("ScrollBar",X.YH6.ui)],et)},11472:(q,K,z)=>{"use strict";z.d(K,{B:()=>at});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z(68910),tt=z(35120),et=z(5269),it=z(56163),st=z(12420),nt=z(89400);let at=Y=class extends it.t{get direction(){return this._direction}set vertical(q){this._direction=q?this._direction|et.H.Vertical:this._direction&et.H.Vertical}set horizontal(q){this._direction=q?this._direction|et.H.Horizontal:this._direction&et.H.Horizontal}constructor(){super(),this._direction=et.H.None,this.isKinematic=!0,this.verticalScrollBar=null,this.horizontalScrollBar=null,this.contentView=null,this.wheelStep=40,this.wheelOnOver=!0,this.allowMouseWheel=!0,this.allowTouch=!0,this._readyForInput=!1,this.scrollBarListener=new X.HN0,this.scrollReleaseListener=new X.HN0,this._pressedDown=!1,this._timestamp=0,this._startX=0,this._startY=0,this._velocityX=0,this._velocityY=0,this._velocityWheel=0,this._mouseWheelCallback=null,this._verticalScrollingEnabled=!0,this._horizontalScrollingEnabled=!0,this._mouseOverCell=null,this._mouseDownCell=null,this._mouseDragCell=null,this._previousContentViewWidth=0,this._previousContentViewHeight=0,this._lastSimulateTime=0,this._lastSimulatePoint=new J.Point,this._shouldSimulateInUpdate=!1,this.scrollBarListener.add(this.scrollToPercent.bind(this),this)}create(){super.create();const q=tt.q.instance.game.add.graphics(0,0,this.GameObject.legacyTransform.group);q.beginFill(0),q.drawRect(0,0,this.GameObject.legacyTransform.width,this.GameObject.legacyTransform.height),q.inputEnabled=!1,this.GameObject.legacyTransform.group.mask=q,this.updateScrollEnabled(et.H.Horizontal),this.updateScrollEnabled(et.H.Vertical),this._shouldSimulateInUpdate=X.o5U.isDesktop()}populateContentView(){this.contentView||(this.contentView=new X._mx(this.GameObject),this.contentView.addComponent(X.K16))}firstUpdate(){super.firstUpdate(),tt.q.instance.game.input.addMoveCallback(this.onMoveListener,this),this._mouseWheelCallback=this.mouseWheelListener.bind(this),tt.q.instance.game.input.mouse.addMouseWheelCallback(this._mouseWheelCallback),this._readyForInput=!0}onMoveListener(q,K,z){this._readyForInput&&this.allowTouch&&this.moveCanvas(q,K,z)}mouseWheelListener(q){this._readyForInput&&this.allowMouseWheel&&this.mouseWheel(q)}update(){if(super.update(),this.isKinematic&&(this._direction&et.H.Vertical)===et.H.Vertical&&Math.abs(this._velocityWheel)>Y.velocityThreshold&&(this.contentView.legacyTransform.y+=this._velocityWheel,this.limitMovement(),this._velocityWheel*=Y.deceleration),this._shouldSimulateInUpdate){const q=tt.q.instance.game.input.activePointer;Date.now()-this._lastSimulateTime>Y.SIMULATE_DELAY_MS&&(this._lastSimulatePoint.x!==q.x||this._lastSimulatePoint.y!==q.y)&&this.simulateMouseHover(q)}this.horizontalScrollBar&&this._previousContentViewWidth!==this.contentView.legacyTransform.width&&(this._previousContentViewWidth=this.contentView.legacyTransform.width,this.horizontalScrollBar.setNibSize(this.getCollisionBox().width/this._previousContentViewWidth),this.updateScrollEnabled(et.H.Horizontal)),this.verticalScrollBar&&this._previousContentViewHeight!==this.contentView.legacyTransform.height&&(this._previousContentViewHeight=this.contentView.legacyTransform.height,this.verticalScrollBar.setNibSize(this.getCollisionBox().height/this._previousContentViewHeight),this.updateScrollEnabled(et.H.Vertical))}simulateMouseHover(q,K){var z,Y;if(this._lastSimulateTime=Date.now(),this._lastSimulatePoint.x=q.x,this._lastSimulatePoint.y=q.y,!this.isInputTarget(q))return null===(z=this._mouseOverCell)||void 0===z||z.onOut.dispatch(q),this._mouseOverCell=null,void(this._mouseDownCell=null);for(const Q of K||this.contentView.findComponentsInChildren(nt.B)){if(!Q.GameObject.active){Q===this._mouseOverCell&&(this._mouseOverCell=null,this._mouseDownCell=null);continue}const K=this.isPointerOverCell(q,Q);if(K&&this._mouseOverCell===Q)return;if(K&&this._mouseOverCell!==Q)return null===(Y=this._mouseOverCell)||void 0===Y||Y.onOut.dispatch(q),this._mouseOverCell=Q,void Q.onOver.dispatch(q);K||this._mouseOverCell!==Q||(Q.onOut.dispatch(q),this._mouseOverCell=null,this._mouseDownCell=null)}}onDown(q,K){var z;this._startX=K.x,this._startY=K.y,this._pressedDown=!0,this._velocityWheel=0,this._timestamp=Date.now(),this._velocityY=this._velocityX=0,(null===(z=this._mouseOverCell)||void 0===z?void 0:z.GameObject)&&this.isPointerOverCell(K,this._mouseOverCell)||this.simulateMouseHover(K),this._mouseOverCell&&(this._mouseOverCell.onDown.dispatch(K),this._mouseDownCell=this._mouseOverCell)}onUp(q,K,z){var Y;if(this._pressedDown=!1,this._mouseDownCell)return this._mouseDownCell.onClick.dispatch(),void(this._mouseDownCell=null);this._mouseDragCell&&(this._mouseDragCell.onUp.dispatch(K),this._mouseDragCell=null),this.scrollReleaseListener.dispatch(this.getPercent(this.direction)),null===(Y=this._mouseOverCell)||void 0===Y||Y.onOver.dispatch(K)}moveCanvas(q,K,z){var Q;if(this._pressedDown&&this._mouseDownCell&&(this._mouseDragCell=this._mouseDownCell),this.shouldScroll(this.direction)&&this._pressedDown){const X=Date.now(),Z=X-this._timestamp;this._timestamp=X;let J=0;(this._direction&et.H.Horizontal)===et.H.Horizontal&&(J=K-this._startX,this._startX=K,this._velocityX=J*Y.displacement/(Z+1)*Y.initialAcceleration+this._velocityX*Y.finalAcceleration,this.contentView.legacyTransform.x+=J,this.limitMovement()),(this._direction&et.H.Vertical)===et.H.Vertical&&(J=z-this._startY,this._startY=z,this._velocityY=J*Y.displacement/(Z+1)*Y.initialAcceleration+this._velocityY*Y.finalAcceleration,this.contentView.legacyTransform.y+=J,this.limitMovement()),this._mouseDownCell&&!this.withinTapThreshold(q,this.direction)&&this.shouldScroll(this.direction)&&(null===(Q=this._mouseOverCell)||void 0===Q||Q.onOver.dispatch(q),this._mouseDownCell=null)}}withinTapThreshold(q,K){return K===et.H.Horizontal?Math.abs(q.x-q.positionDown.x)<=Y.tapThreshold:Math.abs(q.y-q.positionDown.y)<=Y.tapThreshold}mouseWheel(q){if(q.preventDefault(),!this.shouldScroll(this.direction))return;const K=this.isInputTarget(tt.q.instance.game.input.activePointer),z=this.horizontalScrollBar&&this.horizontalScrollBar.isInputTarget(tt.q.instance.game.input.activePointer)||this.verticalScrollBar&&this.verticalScrollBar.isInputTarget(tt.q.instance.game.input.activePointer);if(this.wheelOnOver&&!K&&!z)return;const Y=120*tt.q.instance.game.input.mouse.wheelDelta/this.wheelStep;this.isKinematic?this._velocityWheel+=Y:(this.contentView.legacyTransform.y+=Y,this.limitMovement())}limitMovement(){const q=this.getCollisionBox();if((this._direction&et.H.Vertical)===et.H.Vertical){let K=this.contentView.legacyTransform.y;const z=this.contentView.legacyTransform.height,Y=Z.last(this.contentView.children),Q=Y?X.Htv.getHeight(Y):0;K>q.y&&(K=q.y),K<-(z-q.height-q.y+Q)&&(K=z>q.height?-(z-q.height-q.y+Q):q.y),this.contentView.legacyTransform.y=K,this.verticalScrollBar&&this.verticalScrollBar.scrollToPercent(K/(z-q.height-q.y+Q))}if((this._direction&et.H.Horizontal)===et.H.Horizontal){let K=this.contentView.legacyTransform.x;const z=this.contentView.legacyTransform.width,Y=Z.last(this.contentView.children),Q=Y?X.Htv.getWidth(Y):0;K>q.x&&(K=q.x),K<-(z-q.width-q.x+Q)&&(K=z>q.width?-(z-q.width-q.x+Q):q.x),this.contentView.legacyTransform.x=K,this.horizontalScrollBar&&this.horizontalScrollBar.scrollToPercent(K/(z-q.width-q.x+Q))}}getPercent(q){return q===et.H.Horizontal&&this.horizontalScrollBar?this.horizontalScrollBar.getPercent():q===et.H.Vertical&&this.verticalScrollBar?this.verticalScrollBar.getPercent():0}scrollToPercent(q,K){if(!this.shouldScroll(K))return;const z=this.getCollisionBox(),Y=Z.last(this.contentView.children),Q=(q,K,z,Y,Q)=>-Q*(q-K-z+Y);K===et.H.Vertical?(this.contentView.legacyTransform.y=Q(this.contentView.legacyTransform.height,z.height,z.y,Y?X.Htv.getHeight(Y):0,q),this._velocityWheel=0):this.contentView.legacyTransform.x=Q(this.contentView.legacyTransform.width,z.width,z.x,Y?X.Htv.getWidth(Y):0,q),this.limitMovement()}scrollToPercentTween(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this.shouldScroll(K))return;this.tweenCleanup();const Y=this.getPercent(K);if(0===q-Y)return;const Q={value:Y};this._scrollTween=tt.q.instance.game.tweens.create(Q,this),this._scrollTween.onUpdate.add((()=>this.scrollToPercent(Q.value,K)));const Z=K===et.H.Vertical?this.contentView.legacyTransform.height:this.contentView.legacyTransform.width,J=1e3*z/(1e3*z/Z)*q;this._scrollTween.to({value:q},J,X.GS3.Quadratic.Out).start(),yield this._scrollTween.onTweenComplete.asPromise().catch((()=>X.RQr.createHandler("[ScrollView.scrollToPercentTween] Error scrolling to percent"))),this.tweenCleanup()}))}scrollByPixels(q,K){this.shouldScroll(K)&&(K===et.H.Vertical?this.contentView.legacyTransform.y+=q:this.contentView.legacyTransform.x+=q,this.limitMovement())}updateScrollEnabled(q){this.contentView&&(q===et.H.Vertical&&(this._verticalScrollingEnabled=this.contentView.legacyTransform.height>this.getCollisionBox().height,this.verticalScrollBar&&(this.verticalScrollBar.GameObject.legacyTransform.group.visible=this._verticalScrollingEnabled),this._verticalScrollingEnabled||(this._velocityWheel=0)),q===et.H.Horizontal&&(this._horizontalScrollingEnabled=this.contentView.legacyTransform.width>this.getCollisionBox().width,this.horizontalScrollBar&&(this.horizontalScrollBar.GameObject.legacyTransform.group.visible=this._horizontalScrollingEnabled)))}shouldScroll(q){return q===et.H.Vertical?this._verticalScrollingEnabled:q===et.H.Horizontal?this._horizontalScrollingEnabled:void 0}isPointerOverCell(q,K){const z=K.GameObject.legacyTransform;return X.M_G.containsRaw(z.group.getGlobalPosition().x,z.group.getGlobalPosition().y,z.width,z.height,q.x,q.y)}destroy(){this.tweenCleanup(),this.scrollBarListener.dispose(),this.scrollReleaseListener.dispose(),this.GameObject.legacyTransform.group.mask instanceof J.Container&&this.GameObject.legacyTransform.group.mask.destroy(),this.GameObject.legacyTransform.group.mask=null,tt.q.instance.game.input.deleteMoveCallback(this.onMoveListener,this),tt.q.instance.game.input.mouse.removeMouseWheelCallback(this._mouseWheelCallback),this._mouseWheelCallback=null,super.destroy()}tweenCleanup(){X.Aq$.isDefined(this._scrollTween)&&(this._scrollTween.destroy(),this._scrollTween=null)}};at.deceleration=.95,at.velocityThreshold=.1,at.tapThreshold=5,at.initialAcceleration=.8,at.finalAcceleration=.8,at.displacement=1e3,at.SIMULATE_DELAY_MS=100,(0,Q.Cg)([(0,X.vkK)(),(0,X.Lr6)(0),(0,X.nKb)("verticalScrolling"),(0,Q.Sn)("design:type",Boolean),(0,Q.Sn)("design:paramtypes",[Boolean])],at.prototype,"vertical",null),(0,Q.Cg)([(0,X.vkK)(),(0,X.Lr6)(0),(0,X.nKb)("horizontalScrolling"),(0,Q.Sn)("design:type",Boolean),(0,Q.Sn)("design:paramtypes",[Boolean])],at.prototype,"horizontal",null),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],at.prototype,"isKinematic",void 0),(0,Q.Cg)([(0,X.MnK)(st.$),(0,Q.Sn)("design:type",st.$)],at.prototype,"verticalScrollBar",void 0),(0,Q.Cg)([(0,X.MnK)(st.$),(0,Q.Sn)("design:type",st.$)],at.prototype,"horizontalScrollBar",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],at.prototype,"contentView",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],at.prototype,"wheelStep",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],at.prototype,"wheelOnOver",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],at.prototype,"allowMouseWheel",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],at.prototype,"allowTouch",void 0),at=Y=(0,Q.Cg)([(0,X.EVk)("ScrollView",X.YH6.ui),(0,Q.Sn)("design:paramtypes",[])],at)},53153:(q,K,z)=>{"use strict";z.d(K,{y:()=>Z});var Y=z(62459),Q=z(76974),X=z(89400);class Z extends X.B{constructor(){super(...arguments),this._base=null}postCreate(){super.postCreate(),this.setState(this._base.currentState),this.onOver.add((()=>{this.setState(Q.K.Over)})),this.onOut.add((()=>{this.setState(Q.K.Up)})),this.onDown.add((()=>{this.setState(Q.K.Down)}))}setState(q,K=!1){!K&&this.isDisabled()||(this._base.unlockState(),this._base.lockState(q))}setDisabled(q){this.setState(q?Q.K.Disabled:Q.K.Up,!0)}isDisabled(){return this._base.getButtonState()===Q.K.Disabled}updateContentView(q){this.onClick.add((()=>{q.callback()}))}setText(q){this._base.GameObject.findComponentsInChildren(Y.EYj).forEach((K=>K.text=q))}}},89400:(q,K,z)=>{"use strict";z.d(K,{B:()=>X});var Y=z(8674),Q=z(62459);class X extends Q.uAl{constructor(){super(...arguments),this._contentView=null,this.onClick=new Q.HN0,this.onOver=new Q.HN0,this.onOut=new Q.HN0,this.onDown=new Q.HN0,this.onUp=new Q.HN0}destroy(){this.onClick.dispose(),this.onOver.dispose(),this.onOut.dispose(),this.onDown.dispose(),this.onUp.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.x4W)("contentView"),(0,Y.Sn)("design:type",Q._mx)],X.prototype,"_contentView",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"onClick",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"onOver",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"onOut",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"onDown",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"onUp",void 0)},76501:(q,K,z)=>{"use strict";z.d(K,{W:()=>X});var Y=z(89400),Q=z(33961);class X{get data(){return this._data}set data(q){this._data=q}constructor(q=[]){this._data=[],this._data=q}numberOfItemsInSection(q){return this._data[q]?this._data[q].cells.length:0}titleForSection(q){return this._data[q]?this._data[q].title:""}updateSection(q,K){const z=K.findComponentInChildren(Q.C);return z&&z.updateContentView(this._data[q]),K}updateCellAt(q,K,z){const Q=z.findComponentInChildren(Y.B);return Q&&Q.updateContentView(this._data[q].cells[K]),z}}},33961:(q,K,z)=>{"use strict";z.d(K,{C:()=>X});var Y=z(8674),Q=z(62459);class X extends Q.uAl{constructor(){super(...arguments),this._contentView=null}}(0,Y.Cg)([(0,Q.x4W)("contentView"),(0,Y.Sn)("design:type",Q._mx)],X.prototype,"_contentView",void 0)},25456:(q,K,z)=>{"use strict";z.d(K,{l:()=>J});var Y=z(8674),Q=z(62459),X=z(83133),Z=z(53153);let J=class extends Z.y{constructor(){super(...arguments),this._toggle=null}postDeserialize(){super.postDeserialize(),this._base=this._toggle}create(){super.create(),this.onClick.add((()=>{this.isDisabled()||this.doToggle()}))}setSelected(q){this._toggle.isSelectionLocked||(this._toggle.setSelected(q),this.setState(this._toggle.currentState))}lockToggle(q){this._toggle.isSelectionLocked=q}isSelected(){return this._toggle.isSelected()}doToggle(){this.setSelected(!this.isSelected())}};(0,Y.Cg)([(0,Q.MnK)(X.l),(0,Y.Sn)("design:type",X.l)],J.prototype,"_toggle",void 0),J=(0,Y.Cg)([(0,Q.EVk)("ScrollViewToggle")],J)},77801:(q,K,z)=>{"use strict";z.d(K,{f:()=>J});var Y=z(8674),Q=z(62459),X=z(73797),Z=z(35120);let J=class extends Q.uAl{constructor(){super(...arguments),this._touching=!1,this.onStartTouching=new Q.HN0,this.onTouching=new Q.HN0,this.onStopTouching=new Q.HN0}create(){super.create();const q=Z.q.instance.game.broadcaster;q.addAppListener(X.pm.MovePlayer,this.pathTo.bind(this),this),q.addAppListener(X.pm.StopPlayer,this.stopMovement.bind(this),this),q.addAppListener(X.pm.GetTarget,this.getPosition.bind(this),this)}destroy(){const q=Z.q.instance.game.broadcaster;q.removeAppListener(X.pm.MovePlayer,this),q.removeAppListener(X.pm.StopPlayer,this),q.removeAppListener(X.pm.GetTarget,this),this.onStartTouching.dispose(),this.onStopTouching.dispose(),this.onTouching.dispose(),super.destroy()}update(){if(super.update(),this._touching){const q=Z.q.instance.game.input.activePointer;if(q.isDown){const K={x:q.x,y:q.y},z=Q.i7d.main;if(z){const q=z.viewportSize,Y=z.GameObject.transform.worldPosition;K.x+=Y.x-q.getHalfWidth(),K.y+=Y.y-q.getHalfHeight()}K.x=Math.round(K.x),K.y=Math.round(K.y);const Y=this.pathTo(K.x,K.y);Y&&this._touchStarted?this.onTouching.dispatch(K):Y&&!this._touchStarted&&(this._touchStarted=!0,this.onStartTouching.dispatch())}else this.stopTouching()}}startMovement(q){return this._touching=!0,!!this.pathTo(q.x,q.y)&&(this._touchStarted=!0,this.onStartTouching.dispatch(),!0)}pathTo(q,K){const z=this._pathfinder.findPath(this._pathLocomotion.GameObject.transform.worldPosition,{x:q,y:K});return!!z&&(this._pathLocomotion.setPath(z),!0)}stopMovement(){this._pathLocomotion.stop(),this.stopTouching()}stopTouching(){this._touching=!1,this._touchStarted&&(this.onStopTouching.dispatch(),this._touchStarted=!1)}getPosition(){return this._pathLocomotion.GameObject.transform.worldPosition}};(0,Y.Cg)([(0,Q.MnK)(Q.KhP),(0,Y.Sn)("design:type",Q.KhP)],J.prototype,"_pathLocomotion",void 0),(0,Y.Cg)([(0,Q.Cdj)("Pathfinder"),(0,Y.Sn)("design:type",Q.wGs)],J.prototype,"_pathfinder",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onStartTouching",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onTouching",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onStopTouching",void 0),J=(0,Y.Cg)([(0,Q.S1F)(),(0,Q.EVk)("ClickAndHoldPathfinder",Q.YH6.input)],J)},18741:(q,K,z)=>{"use strict";z.d(K,{f:()=>Y});class Y{static setCanvasPool(q){this.canvasPool=q}static create(q,K,z){return this.canvasPool.create(q,K,z)}static getFirst(){return this.canvasPool.getFirst()}static remove(q){this.canvasPool.remove(q)}static removeByCanvas(q){this.canvasPool.removeByCanvas(q)}static getTotal(){return this.canvasPool.getTotal()}static getFree(){return this.canvasPool.getFree()}static log(){console.log("CanvasPool: %s used, %s free, %s total",this.getTotal(),this.getFree(),this.canvasPool.length)}}Y.setCanvasPool(new class{constructor(){this.pool=[]}get length(){return this.pool.length}create(q,K=1,z=1){const Y=this.getFirst();let Q;return-1===Y?(Q=document.createElement("canvas"),this.pool.push({parent:q,canvas:Q})):(this.pool[Y].parent=q,Q=this.pool[Y].canvas),Q.height=z,Q.width=K,Q}remove(q){this.pool.forEach((K=>{K.parent===q&&(K.parent=null,K.canvas.width=1,K.canvas.height=1)}))}removeByCanvas(q){this.pool.forEach((K=>{K.canvas===q&&(K.parent=null,K.canvas.width=1,K.canvas.height=1)}))}getTotal(){return this.pool.filter((q=>q.parent)).length}getFree(){return this.pool.filter((q=>!q.parent)).length}getFirst(){const q=this.pool;for(let K=0;K{"use strict";z.d(K,{N:()=>X});var Y=z(68910),Q=z(35120);class X extends Y.Container{get stage(){return Q.q.instance.game.stage}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(q){this.transform.scale.set(q.x,q.y)}get worldRotation(){return this.transform.rotation}set worldRotation(q){this.transform.rotation=q}constructor(){super()}bringChildToTop(q){this.setChildIndex(q,this.children.length-1)}sendChildToBack(q){this.setChildIndex(q,0)}static bringChildToTop(q,K){q.setChildIndex(K,q.children.length-1)}static sendChildToBack(q,K){q.setChildIndex(K,0)}destroy(q={children:!0}){super.destroy(q)}}},82366:(q,K,z)=>{"use strict";z.d(K,{A:()=>tt});var Y=z(62459),Q=z(68910),X=z(35120),Z=z(74560),J=z(64835);class tt extends Q.Graphics{get inputEnabled(){return Z.m.isInputEnabled(this)}set inputEnabled(q){Z.m.setInputEnabled(this,q,this)}get left(){return Y.J6z.getLeft(this)}set left(q){Y.J6z.setLeft(this,q)}getOffsetX(){return Y.J6z.getOffsetX(this.getBounds())}getOffsetY(){return Y.J6z.getOffsetY(this.getBounds())}get right(){return Y.J6z.getRight(this)}set right(q){Y.J6z.setRight(this,q)}get offsetX(){return Y.J6z.getOffsetX(this)}set offsetX(q){Y.VyI.log("Cannot set offset of x.",Y.$bb.Warning)}get offsetY(){return Y.J6z.getOffsetY(this)}set offsetY(q){Y.VyI.log("Cannot set offset of y.",Y.$bb.Warning)}get top(){return Y.J6z.getTop(this)}set top(q){Y.J6z.setTop(this,q)}get bottom(){return Y.J6z.getBottom(this)}set bottom(q){Y.J6z.setBottom(this,q)}get centerX(){return Y.J6z.getCenterX(this)}set centerX(q){Y.J6z.setCenterX(this,q)}get centerY(){return Y.J6z.getCenterY(this)}set centerY(q){Y.J6z.setCenterY(this,q)}get z(){return this.zIndex}set z(q){this.zIndex=q}destroy(q){this._destroyed||(this.clear(),this.events&&this.events.onDestroy.dispatch(this),this.input&&this.input.destroy(),this.events&&this.events.destroy(),X.q.instance.game.tweens.removeFrom(this,!1),this.filters=null,this.mask=null,this.exists=!1,this.visible=!1,this.renderable=!1,super.destroy(q))}bringChildToTop(q){J.N.bringChildToTop(this,q)}sendChildToBack(q){J.N.sendChildToBack(this,q)}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(q){this.transform.scale.set(q.x,q.y)}get worldRotation(){return this.transform.rotation}set worldRotation(q){this.transform.rotation=q}get stage(){return X.q.instance.game.stage}constructor(q,K=0,z=0){super(),this.exists=!0,this.anchor=new Q.Point,this.renderable=!0,this.tint=16777215,this.blendMode=Q.BLEND_MODES.NORMAL,this.currentPath=null,this.isMask=!1,this.position.set(K,z),this.previousPosition=new Q.Point(K,z),this.events=new Y.sVA(this)}drawTriangle(q){const K=new Q.Polygon(q);this.drawPolygon(K)}}},57308:(q,K,z)=>{"use strict";z.d(K,{W:()=>Y,Y:()=>tt});var Y,Q=z(62459),X=z(68910),Z=z(35120),J=z(64835);!function(q){q[q.SORT_ASCENDING=0]="SORT_ASCENDING",q[q.SORT_DESCENDING=1]="SORT_DESCENDING"}(Y||(Y={}));class tt extends J.N{get world(){return new X.Point(this.worldTransform.tx,this.worldTransform.ty)}get worldGamePosition(){return new X.Point(this.worldPosition.x/window.innerWidth*this._game.width,this.worldPosition.y/window.innerHeight*this._game.height)}get z(){return this.zIndex}set z(q){this.zIndex=q}get bounds(){let q;return q=this._bounds.getRectangle(q),q}set bounds(q){this._bounds.minX=q.x,this._bounds.maxX=q.x+q.width,this._bounds.minY=q.y,this._bounds.maxY=q.y+q.height}destroy(q={children:!0}){var K;this.pendingDestroy=!1,this.onDestroy&&(this.onDestroy.dispatch(this,q.children,!q.texture),null===(K=this.onDestroy)||void 0===K||K.dispose()),this.events&&(this.events.onDestroy.dispatch(this),this.events.destroy()),this.removeFromParent(),this._game=null,this.filters=null,this.mask=null,this.onDestroy=null,this.exists=!1,this.visible=!1,this.renderable=!1,super.destroy(q)}get left(){return Q.J6z.getLeft(this)}set left(q){Q.J6z.setLeft(this,q)}get right(){return Q.J6z.getRight(this)}set right(q){Q.J6z.setRight(this,q)}get offsetX(){return Q.J6z.getOffsetX(this)}set offsetX(q){Q.VyI.log("Cannot set offset of x.",Q.$bb.Warning)}get offsetY(){return Q.J6z.getOffsetY(this)}set offsetY(q){Q.VyI.log("Cannot set offset of y.",Q.$bb.Warning)}get top(){return Q.J6z.getTop(this)}set top(q){Q.J6z.setTop(this,q)}get bottom(){return Q.J6z.getBottom(this)}set bottom(q){Q.J6z.setBottom(this,q)}get centerX(){return Q.J6z.getCenterX(this)}set centerX(q){Q.J6z.setCenterX(this,q)}get centerY(){return Q.J6z.getCenterY(this)}set centerY(q){Q.J6z.setCenterY(this,q)}get anchor(){return new X.Point(0,0)}constructor(q,K=q.stage,z="group",Y=!1){super(),this.onDestroy=new Q.HN0,this.exists=!0,this.pendingDestroy=!1,this._sortProperty="z",this.fixedToCamera=!1,this._game=q,this.name=z,this.events=new Q.sVA(this),Y?(Z.q.instance.game.stage.addChild(this),this.z=Z.q.instance.game.stage.children.length):K&&(K.addChild(this),this.z=K.children.length)}add(q,K=-1){const z=Q.Aq$.isDefined(K)?K:this.length;return K>-1&&K0){const K=this.getIndex(q),z=this.getAt(K-1);z&&this.swap(q,z)}return q}swap(q,K){this.swapChildren(q,K),this.updateZ()}updateZ(){let q=this.children.length;for(;q-- >0;)this.children[q].zIndex=q}getIndex(q){return this.children.indexOf(q)}getAt(q){return q<0||q>=this.children.length?null:this.getChildAt(q)}callAll(q,K,...z){if(!Q.Aq$.isDefined(q))return;const Y=q.split(".");let X,Z,J=K;if(Q.Aq$.isDefined(J)&&""!==J?"string"==typeof J&&(X=J.split(".")):J=null,z.length>0){Z=[];for(let q=0;qK.name===q))}update(){for(let q=this.children.length;q>=0;--q){const K=this.children[q];K&&!K._destroyed&&!1!==K.exists&&"function"==typeof K.update&&K.update(Z.q.instance.game.time.deltaMS)}}remove(q,K=!1){const z=null!==this.removeChild(q);return K&&q.destroy(),z&&this.updateZ(),z}removeBetween(q,K=this.children.length-1,z=!1,Y=!1){if(0===this.children.length)return;if(q>K||q<0||K>=this.children.length)return void Q.VyI.log(`Unable to remove between because index was out of bounds startIndex: ${q} endIndex: ${K} children length: ${this.children.length}`,Q.$bb.Error);let X=K;for(;X>=q;){const q=this.children[X];Y||void 0===q.events||q.events.onRemovedFromGroup.dispatch(q,this);const K=this.removeChild(q);z&&K&&K.destroy(),X--}this.updateZ()}}},92150:(q,K,z)=>{"use strict";z.d(K,{_:()=>it});var Y=z(62459),Q=z(68910);class X{get paused(){return this.isPaused}set paused(q){this.isPaused=q,q?this.pauseStartTime=Y.W$e.instance.game.time.timeMS:this.isPlaying&&(this.timeNextFrame=Y.W$e.instance.game.time.timeMS+this.delay)}get reversed(){return this.isReversed}set reversed(q){this.isReversed=q}get frameTotal(){return this.frames.length}get frame(){return null!==this.currentFrame?this.currentFrame.index:this.frameIndex}set frame(q){this.currentFrame=this.frameData.getFrame(this.frames[q]),null!==this.currentFrame&&(this.frameIndex=q,this.parent.setFrame(this.currentFrame),this.onUpdate&&this.onUpdate.dispatch(this,this.currentFrame))}get speed(){return 1e3/this.delay}set speed(q){q>0&&(this.delay=1e3/q)}get enableUpdate(){return null!==this.onUpdate}set enableUpdate(q){q&&null===this.onUpdate?this.onUpdate=new Y.HN0:q||null===this.onUpdate||(this.onUpdate.dispose(),this.onUpdate=null)}constructor(q,K,z,Q,X=60,Z=!1){this.frames=[],this.frameIndex=0,this.frameDiff=0,this.frameSkip=1,this.timeLastFrame=0,this.timeNextFrame=0,this.pauseStartTime=0,this.isReversed=!1,this.loopCount=0,this.isFinished=!1,this.isPlaying=!1,this.isPaused=!1,this.onStart=new Y.HN0,this.onUpdate=null,this.onComplete=new Y.HN0,this.onLoop=new Y.HN0,this.parent=q,this.name=K,this.frames=Q,this.delay=1e3/X,this.loop=Z,this.frameData=z,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.frameIndex=0,Y.W$e.instance.game.onPause.add(this.onPause,this),Y.W$e.instance.game.onResume.add(this.onResume,this)}play(q,K){return Y.Aq$.isDefined(q)&&!isNaN(q)&&(this.delay=1e3/q),Y.Aq$.isDefined(K)&&(this.loop=K),this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this.timeLastFrame=Y.W$e.instance.game.time.timeMS,this.timeNextFrame=Y.W$e.instance.game.time.timeMS+this.delay,this.frameIndex=this.isReversed?this.frames.length-1:0,this.updateCurrentFrame(!1,!0),this.parent.events.onAnimationStart.dispatch(this.parent,this),this.onStart.dispatch(this.parent,this),this.parent.animations.currentAnim=this,this.parent.animations.currentFrame=this.currentFrame,this}restart(){this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this.timeLastFrame=Y.W$e.instance.game.time.timeMS,this.timeNextFrame=Y.W$e.instance.game.time.timeMS+this.delay,this.frameIndex=0,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.parent.updateFrame(this.frameIndex),this.parent.animations.currentAnim=this,this.parent.animations.currentFrame=this.currentFrame,this.onStart.dispatch(this.parent,this)}reverse(){return this.reversed=!this.reversed,this}reverseOnce(){return this.onComplete.addOnce(this.reverse,this),this.reverse()}setFrame(q,K=!1){let z=null;if("string"==typeof q){for(let Q=0;Q=this.timeNextFrame)&&(this.frameSkip=1,this.frameDiff=Y.W$e.instance.game.time.timeMS-this.timeNextFrame,this.timeLastFrame=Y.W$e.instance.game.time.timeMS,this.frameDiff>this.delay?(this.frameSkip=Math.floor(this.frameDiff/this.delay),this.frameDiff-=this.frameSkip*this.delay):this.frameDiff=0,this.timeNextFrame=Y.W$e.instance.game.time.timeMS+(this.delay-this.frameDiff),this.isReversed?this.frameIndex-=this.frameSkip:this.frameIndex+=this.frameSkip,!this.isReversed&&this.frameIndex>=this.frames.length||this.isReversed&&this.frameIndex<=-1?this.loop?(this.frameIndex=Math.abs(this.frameIndex)%this.frames.length,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.parent.updateFrame(this.frames[this.frameIndex]),this.loopCount++,this.parent.events.onAnimationLoop.dispatch(this.parent,this),this.onLoop.dispatch(this.parent,this),!this.onUpdate||(this.onUpdate.dispatch(this,this.currentFrame),!!this.frameData)):(this.complete(),!1):this.updateCurrentFrame(!0)))}updateCurrentFrame(q,K=!1){if(!this.frameData)return!1;const z=this.currentFrame?this.currentFrame.index:-1;return this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.currentFrame&&(K||z!==this.currentFrame.index)&&this.parent.updateFrame(this.frames[this.frameIndex]),!this.onUpdate||!q||(this.onUpdate.dispatch(this,this.currentFrame),!!this.frameData)}next(q=1){let K=this.frameIndex+q;K>=this.frames.length&&(this.loop?K%=this.frames.length:K=this.frames.length-1),K!==this.frameIndex&&(this.frameIndex=K,this.updateCurrentFrame(!0))}previous(q=1){let K=this.frameIndex-q;K<0&&(this.loop?K=this.frames.length+K:K++),K!==this.frameIndex&&(this.frameIndex=K,this.updateCurrentFrame(!0))}updateFrameData(q){this.frameData=q,this.currentFrame=this.frameData?this.frameData.getFrame(this.frames[this.frameIndex%this.frames.length]):null}destroy(){this.frameData&&(Y.W$e.instance.game.onPause.remove(this.onPause,this),Y.W$e.instance.game.onResume.remove(this.onResume,this),this.parent=null,this.frames=null,this.frameData=null,this.currentFrame=null,this.isPlaying=!1,this.onStart.dispose(),this.onLoop.dispose(),this.onComplete.dispose(),this.onUpdate&&this.onUpdate.dispose())}complete(){this.frameIndex=this.frames.length-1,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.updateCurrentFrame(!1),this.isPlaying=!1,this.isFinished=!0,this.paused=!1,this.parent.events.onAnimationComplete.dispatch(this.parent,this),this.onComplete.dispatch(this.parent,this)}static generateFrameNames(q,K,z,Q="",X=0){const Z=[];let J="";if(K=z;tt--)J=Y.Aq$.pad(tt.toString(),X,"0",1),J=q+J+Q,Z.push(J);return Z}}class Z{get onLoaded(){return this._onLoaded}get frameData(){return this._frameData}get frameTotal(){return this._frameData.total}get paused(){return this.currentAnim.isPaused}set paused(q){this.currentAnim.paused=q}get name(){return this.currentAnim?this.currentAnim.name:(Y.VyI.log("Current animation not defined",Y.$bb.Warning),null)}get frame(){return this.currentFrame?this.currentFrame.index:(Y.VyI.log("Current frame not defined",Y.$bb.Warning),null)}set frame(q){if(!this.isLoaded)return this._frameLoadedListener&&this.onLoaded.remove(this._frameLoadedListener),this._frameLoadedListener=this.onFrameLoaded.bind(this,q),void this.onLoaded.addOnce(this._frameLoadedListener);if(this._frameLoadedListener=null,this.sprite.setTexture(Y.W$e.instance.game.cache.getTexture(this.sprite.key,q)),this._frameData){const K=this._frameData.getFrame(q);this.currentFrame=K||this.currentFrame}else Y.VyI.log(`Cannot set frame index: ${q}`,Y.$bb.Error)}onFrameLoaded(q){this.frame=q}get frameName(){return this.currentFrame?this.currentFrame.name:(Y.VyI.log("Current frame name not defined",Y.$bb.Warning),null)}set frameName(q){Y.Aq$.isDefined(q)||(Y.VyI.log("Animation Manager frame name set with no name.",Y.$bb.Error),console.trace()),this.sprite.setTexture(Y.W$e.instance.game.cache.getTexture(this.sprite.key,q));const K=this._frameData.getFrameByName(q);K?this.currentFrame=K:Y.VyI.log(`Cannot set frameName: ${q} for sprite with key: ${this.sprite.key} and frameData total: ${this.frameData.total}`,Y.$bb.Error)}constructor(q){this.updateIfVisible=!0,this.isLoaded=!1,this._onLoaded=new Y.HN0,this._animations=new Map,this.sprite=q}destroy(){this._animations&&this._animations.clear(),this._onLoaded.dispose(),this._animationLoadedListener=null,this._frameLoadedListener=null,this._animations=null,this._frameData=null,this.currentAnim=null,this.currentFrame=null,this.sprite=null}loadFrameData(q,K=0){return!!q&&(this.isLoaded&&this._animations.forEach((K=>{K.updateFrameData(q)})),this._frameData=q,"string"==typeof K?this.frameName=K:this.frame=K,this.isLoaded=!0,this._onLoaded.dispatch(),!0)}copyFrameData(q,K=0){return!!q&&(this._frameData=q.clone(),this.isLoaded&&this._animations.forEach((q=>{q.updateFrameData(this._frameData)})),"string"==typeof K?this.frameName=K:this.frame=K,this.isLoaded=!0,this._onLoaded.dispatch(),!0)}add(q,K,z=60,Q=!1,Z=!1){let J=[];if(K)J=K;else{const K=this._frameData.getFrames();for(let z=0;zthis._frameData.total)return!1}else if(!1===this._frameData.checkFrameName(q[z]))return!1;return!0}play(q,K,z){var Y;return this.isLoaded?(this._animationLoadedListener=null,this._animations.has(q)?this.currentAnim===this._animations.get(q)?!1===this.currentAnim.isPlaying?(this.currentAnim.paused=!1,this.currentAnim.play(K,z)):this.currentAnim:((null===(Y=this.currentAnim)||void 0===Y?void 0:Y.isPlaying)&&this.currentAnim.stop(),this.currentAnim=this._animations.get(q),this.currentAnim.paused=!1,this.currentFrame=this.currentAnim.currentFrame,this.currentAnim.play(K,z)):void 0):(this._animationLoadedListener&&this.onLoaded.remove(this._animationLoadedListener),this._animationLoadedListener=this.play.bind(this,q,K,z),this.onLoaded.addOnce(this._animationLoadedListener),this.currentAnim)}stop(q=null,K=!1){!this.currentAnim||q&&q!==this.currentAnim.name||this.currentAnim.stop(K)}update(){return!(this.updateIfVisible&&!this.sprite.visible)&&(!(!this.currentAnim||!this.currentAnim.update())&&(this.currentFrame=this.currentAnim.currentFrame,!0))}next(q=1){this.currentAnim&&(this.currentAnim.next(q),this.currentFrame=this.currentAnim.currentFrame)}previous(q=1){this.currentAnim&&(this.currentAnim.previous(q),this.currentFrame=this.currentAnim.currentFrame)}getAnimation(q){return this._animations.has(q)?this._animations.get(q):null}}var J=z(35120),tt=z(74560),et=z(64835);class it extends Q.Sprite{get inputEnabled(){return tt.m.isInputEnabled(this)}set inputEnabled(q){tt.m.setInputEnabled(this,q,this)}get smoothed(){return Y.qFr.getSmoothed(this.texture)}set smoothed(q){Y.qFr.setSmoothed(this.texture,q)}get left(){return Y.J6z.getLeft(this)}set left(q){Y.J6z.setLeft(this,q)}get right(){return Y.J6z.getRight(this)}set right(q){Y.J6z.setRight(this,q)}getOffsetX(){return Y.J6z.getOffsetX(this.getBounds())}getOffsetY(){return Y.J6z.getOffsetY(this.getBounds())}get top(){return Y.J6z.getTop(this)}set top(q){Y.J6z.setTop(this,q)}get bottom(){return Y.J6z.getBottom(this)}set bottom(q){Y.J6z.setBottom(this,q)}get centerX(){return Y.J6z.getCenterX(this)}set centerX(q){Y.J6z.setCenterX(this,q)}get centerY(){return Y.J6z.getCenterY(this)}set centerY(q){Y.J6z.setCenterY(this,q)}get frame(){return this._frame}set frame(q){this._frame=q,this.setTexture(this.game.cache.getTexture(this.key,q))}get frameName(){return this.animations.frameName}set frameName(q){q&&this.updateFrame(q)}setTexture(q,K=!1){K&&this.texture.baseTexture.destroy(),this.texture=q}updateTransform(){super.updateTransform(),this.transformCallback.dispatch(this.worldTransform,this.parent.worldTransform)}get world(){return new Q.Point(this.worldTransform.tx,this.worldTransform.ty)}get z(){return this.zIndex}set z(q){this.zIndex=q}get bounds(){let q;return q=this._bounds.getRectangle(q),q}set bounds(q){this._bounds.minX=q.x,this._bounds.maxX=q.x+q.width,this._bounds.minY=q.y,this._bounds.maxY=q.y+q.height}setFrame(q){const K=this.texture;this.texture.frame=q,K.frame.x=q.x,K.frame.y=q.y,K.frame.width=q.width,K.frame.height=q.height,q instanceof Y.wIr&&q.trimmed?(K.trim?(K.trim.x=q.spriteSourceSizeX,K.trim.y=q.spriteSourceSizeY,K.trim.width=q.sourceSizeW,K.trim.height=q.sourceSizeH):K.trim=new Q.Rectangle(q.spriteSourceSizeX,q.spriteSourceSizeY,q.sourceSizeW,q.sourceSizeH),K.frame.width=q.sourceSizeW,K.frame.height=q.sourceSizeH):q instanceof Y.wIr&&!q.trimmed&&K.trim&&(K.trim=null),q instanceof Y.wIr&&q.rotated&&(K.rotated=!0),K.requiresReTint=!0,K.updateUvs()}destroy(q){this.pendingDestroy=!1,this.events&&this.events.onDestroy.dispatch(this),this.input&&this.input.destroy(),this.animations&&this.animations.destroy(),this.events&&this.events.destroy(),this.transformCallback.dispose(),Y.W$e.instance.game.tweens.removeFrom(this,!1),this.filters=null,this.mask=null,this.exists=!1,this.visible=!1,this.renderable=!1,this.texture&&"function"==typeof this.texture.off||(this.texture=Q.Texture.EMPTY),super.destroy(q)}bringChildToTop(q){et.N.bringChildToTop(this,q)}sendChildToBack(q){et.N.sendChildToBack(this,q)}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(q){this.transform.scale=q}get worldRotation(){return this.transform.rotation}set worldRotation(q){this.transform.rotation=q}get stage(){return Y.W$e.instance.game.stage}get name(){var q;return null!==(q=this._customName)&&void 0!==q?q:this._autoGeneratedName}set name(q){this._customName=q}constructor(q,K=0,z=0,X,J,tt){super(tt||(X?q.cache.getTexture(X,J):null)),this.fixedToCamera=!1,this.scaleMin=null,this.scaleMax=null,this.transformCallbackContext=null,this.transformCallback=new Y.HN0,this.pendingDestroy=!1,this.exists=!0,this.game=q,this.key=X,this.position.set(K,z),this.previousPosition=new Q.Point(K,z),this.events=new Y.sVA(this),this.bounds=new Q.Rectangle,this.animations=new Z(this),this.updateTexture(J),this.cameraOffset=new Q.Point(K,z)}loadTexture(q,K){const z=Y.Aq$.isDefined(K)?K:0;this.setTexture(Y.W$e.instance.game.cache.getTexture(q,z)),this.key=q,this.updateTexture(z)}updateFrame(q){this.setTexture(Y.W$e.instance.game.cache.getTexture(this.key,q)),this.refreshAutoGeneratedName()}update(){this.animations&&this.animations.currentAnim&&this.animations.update();for(let q=this.children.length-1;q>-1;--q){const K=this.children[q];K&&!K._destroyed&&!1!==K.exists&&"function"==typeof K.update&&K.update()}}updateTexture(q){const K=Y.Aq$.isDefined(q)?q:0,z=this.texture.baseTexture.scaleMode===Q.SCALE_MODES.LINEAR;if(Y.Aq$.isDefined(this.key)){this.animations.stop();this.animations.loadFrameData(this.game.cache.getFrameData(this.key),K)||(this.animations.currentFrame=null)}z||(this.texture.baseTexture.scaleMode=1),this.refreshAutoGeneratedName()}refreshAutoGeneratedName(){var q,K,z;if(this._autoGeneratedName="",this.key){const Y=null!==(z=null===(K=null===(q=J.q.instance.prodigy.assets.getAsset(this.key))||void 0===q?void 0:q.data)||void 0===K?void 0:K.filename)&&void 0!==z?z:this.key;this._autoGeneratedName=this.frameName?`${Y}/${this.frameName}`:Y}}}},52080:(q,K,z)=>{"use strict";z.d(K,{Y:()=>Z});var Y=z(62459),Q=z(68910),X=z(35120);class Z extends Q.RenderTexture{get rotated(){return 0!==this.rotate}set rotated(q){Y.VyI.log("Deprecated. Please set rotate instead",Y.$bb.Warning)}setFrame(q){this.frame=q}get crop(){return this.orig}set crop(q){this.orig=q}constructor(q,K){super(q,K),this._renderer=X.q.instance.game.renderer?X.q.instance.game.renderer:Q.autoDetectRenderer()}clear(){const q=this._renderer;if(q.renderTexture){const K=q.renderTexture.current;if(q.renderTexture.bind(this),q.renderTexture.clear(),K!==this&&(null===K||(null==K?void 0:K.baseTexture))){const z=q.renderTexture.sourceFrame,Y=q.renderTexture.destinationFrame;q.renderTexture.bind(K,z,Y)}}}render(q,K=null,z=!1,Y=!1){const Q={renderTexture:this,clear:z,transform:K,skipUpdateTransform:Y};this._renderer.render(q,Q)}renderXY(q,K,z,Y=!1){this.render(q,new Q.Matrix(1,0,0,1,K,z),Y,!1)}renderRawXY(q,K,z,Y){this.render(q,new Q.Matrix(1,0,0,1,K,z),Y,!0)}destroy(q){this._renderer=null,super.destroy(q)}}},30442:(q,K,z)=>{"use strict";z.d(K,{k:()=>Z});var Y=z(62459),Q=z(68910),X=z(74560);class Z extends Q.Sprite{get inputEnabled(){return X.m.isInputEnabled(this)}set inputEnabled(q){X.m.setInputEnabled(this,q,this)}get smoothed(){return Y.qFr.getSmoothed(this.texture)}set smoothed(q){Y.qFr.setSmoothed(this.texture,q)}updateTransform(){super.updateTransform(),this.transformCallback.dispatch(this.worldTransform,this.parent.worldTransform)}get worldScale(){return new Q.Point(this.worldTransform.a,this.worldTransform.d)}get z(){return this.zIndex}set z(q){this.zIndex=q}constructor(q,K=0,z=0,X,Z,J){super(J||(X?q.cache.getTexture(X,Z):Q.Texture.EMPTY)),this.fixedToCamera=!1,this.transformCallback=new Y.HN0,this.game=q,this.events=new Y.sVA(this),this.key=X,this.position.set(K,z),this.previousPosition=new Q.Point(K,z),this.cameraOffset=new Q.Point(K,z)}destroy(q){var K;this._destroyed||(this.events&&(this.events.onDestroy.dispatch(this),this.events.destroy()),null===(K=this.input)||void 0===K||K.destroy(),this.transformCallback.dispose(),this.game.tweens.removeFrom(this,!1),this.texture&&"function"==typeof this.texture.off||(this.texture=Q.Texture.EMPTY),super.destroy(q))}getOffsetX(){return Y.J6z.getOffsetX(this.getBounds())}getOffsetY(){return Y.J6z.getOffsetY(this.getBounds())}setTexture(q,K){q!==this.key&&(this.key=q);const z=this.game.cache.getTexture(this.key,K);z!==this.texture?this.texture=z:Y.VyI.log(`Redundant set texture call in object ${this.name}`,Y.$bb.Warning)}}},24190:(q,K,z)=>{"use strict";z.d(K,{C:()=>tt});var Y=z(62459),Q=z(68910),X=z(35120),Z=z(74560),J=z(64835);class tt extends Q.TilingSprite{get inputEnabled(){return Z.m.isInputEnabled(this)}set inputEnabled(q){Z.m.setInputEnabled(this,q,this)}get smoothed(){return Y.qFr.getSmoothed(this.texture)}set smoothed(q){Y.qFr.setSmoothed(this.texture,q)}getOffsetX(){return Y.J6z.getOffsetX(this.getBounds())}getOffsetY(){return Y.J6z.getOffsetY(this.getBounds())}get left(){return Y.J6z.getLeft(this)}set left(q){Y.J6z.setLeft(this,q)}get right(){return Y.J6z.getRight(this)}set right(q){Y.J6z.setRight(this,q)}get offsetX(){return Y.J6z.getOffsetX(this)}set offsetX(q){Y.VyI.log("Cannot set offset of x.",Y.$bb.Warning)}get offsetY(){return Y.J6z.getOffsetY(this)}set offsetY(q){Y.VyI.log("Cannot set offset of y.",Y.$bb.Warning)}get top(){return Y.J6z.getTop(this)}set top(q){Y.J6z.setTop(this,q)}get bottom(){return Y.J6z.getBottom(this)}set bottom(q){Y.J6z.setBottom(this,q)}get centerX(){return Y.J6z.getCenterX(this)}set centerX(q){Y.J6z.setCenterX(this,q)}get centerY(){return Y.J6z.getCenterY(this)}set centerY(q){Y.J6z.setCenterY(this,q)}get frame(){return this._frame}set frame(q){this._frame=q,this.setTexture(this.game.cache.getTexture(this.key,q))}setTexture(q,K=!1){K&&this.texture.baseTexture.destroy(),this.texture=q}setFrame(q){const K=this.texture;this.texture.frame=q,K.frame.x=q.x,K.frame.y=q.y,K.frame.width=q.width,K.frame.height=q.height,q instanceof Y.wIr&&q.trimmed?(K.trim?(K.trim.x=q.spriteSourceSizeX,K.trim.y=q.spriteSourceSizeY,K.trim.width=q.sourceSizeW,K.trim.height=q.sourceSizeH):K.trim=new Q.Rectangle(q.spriteSourceSizeX,q.spriteSourceSizeY,q.sourceSizeW,q.sourceSizeH),K.frame.width=q.sourceSizeW,K.frame.height=q.sourceSizeH):q instanceof Y.wIr&&!q.trimmed&&K.trim&&(K.trim=null),q instanceof Y.wIr&&q.rotated&&(K.rotated=!0),K.updateUvs()}updateTransform(){super.updateTransform(),this.transformCallback&&this.transformCallback.call(this.transformCallbackContext,this.worldTransform,this.parent.worldTransform)}get world(){return new Q.Point(this.worldTransform.tx,this.worldTransform.ty)}get z(){return this.zIndex}set z(q){this.zIndex=q}get bounds(){let q;return q=this._bounds.getRectangle(q),q}set bounds(q){this._bounds.minX=q.x,this._bounds.maxX=q.x+q.width,this._bounds.minY=q.y,this._bounds.maxY=q.y+q.height}destroy(q){this.pendingDestroy=!1,this.events&&this.events.onDestroy.dispatch(this),this.input&&this.input.destroy(),this.events&&this.events.destroy(),X.q.instance.game.tweens.removeFrom(this,!1),this.filters=null,this.mask=null,this.exists=!1,this.visible=!1,this.renderable=!1,this.texture&&"function"==typeof this.texture.off||(Y.VyI.log("TileSprite had no texture assigned, which causes a stack trace in PIXI JS.",Y.$bb.Warning),this.texture=Q.Texture.EMPTY),super.destroy(q)}bringChildToTop(q){J.N.bringChildToTop(this,q)}sendChildToBack(q){J.N.sendChildToBack(this,q)}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(q){this.transform.scale=q}get worldRotation(){return this.transform.rotation}set worldRotation(q){this.transform.rotation=q}get stage(){return X.q.instance.game.stage}constructor(q,K=0,z=0,X=256,Z=256,J=null,et){super(tt.getTexture(J),X,Z),this.fixedToCamera=!1,this.scaleMin=null,this.scaleMax=null,this.transformCallbackContext=null,this.pendingDestroy=!1,this.exists=!0,this.game=q,this.tileScale=new Q.ObservablePoint(null,null,1,1),this.tilePosition=new Q.ObservablePoint(null,null),this.frameWidth=0,this.frameHeight=0,this.texture.frame.width=this.frameWidth,this.texture.frame.height=this.frameHeight,this.width=X,this.height=Z,this.key=J,this.position.set(K,z),this.previousPosition=new Q.Point(K,z),this.events=new Y.sVA(this),this.bounds=new Q.Rectangle,this.loadTexture(this.key,et),this.cameraOffset=new Q.Point(K,z)}static getTexture(q,K){return q?X.q.instance.game.cache.getTexture(q,K):new Q.Texture(new Q.BaseTexture)}loadTexture(q,K){const z=Y.Aq$.isDefined(K)?K:0;this.setTexture(X.q.instance.game.cache.getTexture(q,z)),this.key=q,this.updateTexture(z)}updateFrame(q){this.setTexture(X.q.instance.game.cache.getTexture(this.key,q))}updateTexture(q){Y.Aq$.isDefined(q);this.texture.baseTexture.scaleMode===Q.SCALE_MODES.LINEAR||(this.texture.baseTexture.scaleMode=1)}}},9591:(q,K,z)=>{"use strict";z.d(K,{w:()=>it});var Y=z(68910);class Q extends Y.BaseTexture{get source(){return this.resource.source}set source(q){this.resource&&(this.resource.source=q)}constructor(q,K=Y.SCALE_MODES.LINEAR,z=1){super(q,{scaleMode:K,resolution:z})}static fromCanvas(q,K,z=1){return 0===q.width&&(q.width=1),0===q.height&&(q.height=1),new Q(q,K,z)}}class X extends Y.utils.CanvasRenderTarget{clear(q,K,z,Y){const Q=void 0===q?0:q,X=void 0===q?0:K,Z=void 0===z?this.canvas.width:z,J=void 0===Y?this.canvas.height:Y;this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(Q,X,Z,J)}}var Z=z(57308),J=z(52080),tt=z(62459);class et extends Y.Texture{get rotated(){return 0!==this.rotate}set rotated(q){tt.VyI.log("Deprecated. Please set rotate instead",tt.$bb.Warning)}constructor(q,K,z,Y){super(q,K,z,Y),this.isTiling=!1,this.requiresReTint=!1}setFrame(q){this.frame=q}static fromCanvas(q,K=Y.SCALE_MODES.LINEAR){const z=Q.fromCanvas(q,K);return new et(z)}}class it extends J.Y{get canvas(){return this._renderTarget.canvas}get renderTarget(){return this._renderTarget}constructor(q,K,z=256,Q=256){super(new Y.BaseRenderTexture({width:z,height:Q}),new Y.Rectangle(0,0,z,Q)),this._renderTarget=new X(z,Q),this._game=q}clear(q,K,z,Y){this.renderTarget.clear(q,K,z,Y)}destroy(q){this._renderTarget.destroy(),this._renderTarget=null,super.destroy(q)}draw(q){const K=q.texture.baseTexture.scaleMode;q.texture.baseTexture.setStyle(Y.SCALE_MODES.NEAREST),this.render(q);const z=this.renderTarget.context;return z.save(),z.drawImage(q.texture.baseTexture.resource.source,q.texture.frame.x,q.texture.frame.y,q.texture.frame.width,q.texture.frame.height,q.x,q.y,q.width,q.height),z.restore(),q.texture.baseTexture.setStyle(K),this}drawGroup(q){const K=q=>{q instanceof Y.Sprite||q instanceof Y.AnimatedSprite?this.draw(q):q instanceof Z.Y&&this.drawGroup(q)},z=q.children.length;for(let Y=0;Y{const Y=new et(new Q(Z,X));this._game.cache.addImage(q,Y),K.call(z||null,Y),Z.onload=null}),Z.src=this.canvas.toDataURL("image/png"),!K){const K=new et(new Q(Z,X));return this._game.cache.addImage(q,K),K}return null}processPixelRGB(q,K,z,Y,Q,X){const Z=void 0!==z?z:0,J=void 0!==Y?Y:0,tt=void 0!==Q?Q:this._renderTarget.width,et=void 0!==X?X:this._renderTarget.height,it=Z+tt,st=J+et,nt=this._renderer.extract.pixels(this);let at;const rt={r:0,g:0,b:0,a:0,h:0,s:0,v:0,l:0,color:0,color32:0,rgba:"rgba(0, 0, 0, 0)"};let ot,ht,ct,dt,lt;for(let ut=J;ut{"use strict";z.d(K,{d:()=>J});var Y=z(62459),Q=z(95891),X=z(77938),Z=z(35120);class J{static createParticleEmitter(q,K,z,Q,X){const Z=new Y._mx(q),tt=Z.addComponent(Y.dLy);z&&tt.setPosition(z.x,z.y);const et=Z.addComponent(Y.okU);return J.applyLegacyParticleSystem(et,K,Q,X),et}static applyLegacyParticleSystem(q,K,z,J){Q.defaults(z,{x1:0,y1:0,x2:0,y2:0});const tt=X.t.getItem("particleEffect",K).data;if(Z.q.instance.prodigy.load.isFileLoaded(tt.particle.image)||Z.q.instance.prodigy.load.assets(tt.particle.image),q.totalParticles=tt.emitter.repeat,tt.emitter.frequency.min?q.emitPerSecond.setMinMax(1e3/tt.emitter.frequency.min,1e3/tt.emitter.frequency.max):q.emitPerSecond.setMinMax(1e3/tt.emitter.frequency,1e3/tt.emitter.frequency),tt.emitter.burstFrequency&&(q.burstTime=new Y.AA4,q.burstTime.setMinMax(.001*tt.emitter.burstFrequency.min,.001*tt.emitter.burstFrequency.max)),tt.particle.lifespan){const K=new Y.ZxM;tt.particle.lifespan.min?K.life.setMinMax(.001*tt.particle.lifespan.min,.001*tt.particle.lifespan.max):K.life.setMinMax(.001*tt.particle.lifespan,.001*tt.particle.lifespan),q.initializers.push(K)}const et=new Y.Qgu;if(et.imageGuid=tt.particle.image,et.frame=tt.particle.frame,q.initializers.push(et),tt.particle.animations){const K=new Y.ibt;K.frames=tt.particle.animations.clouds.frames,K.fps=tt.particle.animations.clouds.frameRate,K.loop=tt.particle.animations.clouds.loop,q.behaviours.push(K)}if(z&&"LINE_ZONE"===z.type){const K=new Y.mYY;K.lineLocation.type=Y.UvC.Random,K.point1.setTo(z.x1,z.y1),K.point2.setTo(z.x2,z.y2),q.initializers.push(K)}if(tt.particle.vx&&tt.particle.vy){Q.defaults(tt.particle,{vx:{min:0,max:0},vy:{min:0,max:0}});const K=new Y.l_K;K.x.type=K.y.type=Y.UvC.Random,K.x.setMinMax(30*tt.particle.vx.min,30*tt.particle.vx.max),K.y.setMinMax(30*tt.particle.vy.min,30*tt.particle.vy.max),q.initializers.push(K)}if(tt.particle.rotation){const K=new Y.Lzo;K.speed.setMinMax(tt.particle.rotation.delta.min,tt.particle.rotation.delta.max),q.initializers.push(K);const z=new Y.f84;z.rotation.setMinMax(tt.particle.rotation.initial.min,tt.particle.rotation.initial.max),q.initializers.push(z)}if(tt.particle.alpha)for(let Q=0;Q{q.behaviours.push(K)})),q}}},98013:(q,K,z)=>{"use strict";z.d(K,{l:()=>J});var Y=z(64835),Q=z(57308),X=z(30442),Z=z(24190);class J{static toggleDisplayObjSettings(q,K){if(q&&(q.visible=K,q.renderable=K,q instanceof X.k||q instanceof Z.C?(q.exists=K,!K&&q.inputEnabled&&(q.inputEnabled=!1)):q instanceof Q.Y&&(q.exists=K,!K&&q.interactiveChildren&&(q.interactiveChildren=!1)),q instanceof Y.N))for(let z=0;zq[K]z[K]?1:q.zIndexq[K]z[K]?-1:0)),J.updateZ(q))}static updateZ(q){let K=q.children.length;for(;K-- >0;)q.children[K].zIndex=K}static removeAll(q,K=!1){const z=q.removeChildren();if(K)for(let Y=0;Y{"use strict";var Y;z.d(K,{H:()=>Y}),function(q){q[q.None=0]="None",q[q.Vertical=1]="Vertical",q[q.Horizontal=2]="Horizontal"}(Y||(Y={}))},88701:(q,K,z)=>{"use strict";z.d(K,{C:()=>Z});var Y=z(24521),Q=z(35120),X=z(23029);class Z{getMaxCount(q){var K;const z=X.R.loadData(Y.r.PlayerStorageMaxCount_json);return null!==(K=z.itemMaxCount[q])&&void 0!==K?K:z.itemMaxCount.default}getOwnedCount(q,K){const z=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return"dorm"===q?z.house.getOwned(K):"pet"===q?z.kennel.amountOfPet(K):z.backpack.hasItem(q,K)}}},91207:(q,K,z)=>{"use strict";z.d(K,{E:()=>it,P:()=>et});var Y=z(62459),Q=z(36648),X=z(40671),Z=z(56942),J=z(35120),tt=z(44094);const et={};class it{static getAssetDependencies(q){const K=q.slice();return q.forEach((q=>{var z;const Y=null===(z=it.dependencyMapper)||void 0===z?void 0:z.getPrefabDependencyList(q);null==Y||Y.forEach((q=>{K.includes(q)||K.push(q)}))})),K}static removeAssetsFromCache(q){q.forEach((q=>{const K=J.q.instance.prodigy.assets.getAsset(q);switch(K.type){case"spine":J.q.instance.prodigy.load.removeSpine(q);break;case"json":case"streamed-map":case"tiledMap":case"streamedMap":J.q.instance.game.cache.removeJSON(q);break;case"sprite":case"spritesheet":case"single-image":case"singleImage":case"atlas":J.q.instance.game.cache.removeImage(q);break;case"audio":case"sfx":case"bgm":J.q.instance.game.cache.removeSound(q);break;default:Y.VyI.log(`Attempted to remove an asset of type ${K.type}, but a matching case was not found`,Y.$bb.Warning)}}))}static getGameImageGuidByName(q){const K=Q.q[q];return K||(Y.VyI.log(`No asset named ${q} found in ESingleimageGameAssets enum. Try \`npm run generate:localAssetEnums\``,Y.$bb.Warning),console.error(`No asset named ${q} found in ESingleimageGameAssets enum.`),it.MISSING_ASSET_GUID)}static getGameSpineGuidByName(q){const K=Z.Q[q];return K||(Y.VyI.log(`No asset named ${q} found in ESpineGameAssets enum. Try \`npm run generate:localAssetEnums\``,Y.$bb.Warning),console.error(`No asset named ${q} found in ESpineGameAssets enum.`),it.MISSING_ASSET_GUID)}static getIconForType(q,K,z){let Y;Y="gold"===q?"Icon_currency_1":`Icon_${q}_${K}`,z&&(Y+=z);const Q=et[Y];return Q||this.getGameImageGuidByName(Y)}static getDormImage(q,K){const z=`${tt.$.capitalizeFirstLetter(q)}_dorm_${K}`;return this.getGameImageGuidByName(z)}static getDormItem(q,K){const z=`${tt.$.capitalizeFirstLetter(q)}_dorm_${K}_json`;if(Z.Q[z])return Z.Q[z];const X=`${tt.$.capitalizeFirstLetter(q)}_dorm_${K}`;return Q.q[X]?Q.q[X]:(Y.VyI.log(`No asset named ${X} found in either ESingleimageGameAssets or ESpineGameAssets. Try \`npm run generate:localAssetEnums\``,Y.$bb.Warning),console.error(`No asset named ${X} found in either ESingleimageGameAssets or ESpineGameAssets.`),it.MISSING_ASSET_GUID)}static getTitanSpine(q){const K=`Default_titan_${q}_json`;return this.getGameSpineGuidByName(K)}static getTowerTownImage(q){const K=tt.$.capitalizeFirstLetter(tt.$.replaceAll(q,"-","_"));return this.getGameImageGuidByName(K)}static getTowerTownIcon(q){const K=`${tt.$.capitalizeFirstLetter(tt.$.replaceAll(q,"-","_"))}_icon`;return this.getGameImageGuidByName(K)}static getSpellGuids(q){var K,z,Q,Z;const J=[];for(const et of q){const q=null===(Q=null===(z=null===(K=null==et?void 0:et.metadata)||void 0===K?void 0:K.assets)||void 0===z?void 0:z.default)||void 0===Q?void 0:Q.assetKey,it=`${tt.$.capitalizeFirstLetter(q)}_spell`,st=null!==(Z=Y.Aq$.isDefined(q)?X.z[it]:void 0)&&void 0!==Z?Z:X.z.Spell_storm_ioncannon_single_spell;J.push(st)}return J}static getImageGuidsFromGearGuids(q){const K=[];for(const Q of q){const q=J.q.instance.game.cache.getJSON(Q);if(q)try{K.push(...q.imageIDs)}catch(z){Y.RQr.logError(z,`Failed to parse gear JSON for ${Q}`)}}return K}static resolveSingleImageAssetSource(q,K){return K?`singleImage-${K}`:q}}it.MISSING_ASSET_GUID=Q.q.Missing_asset},46808:(q,K,z)=>{"use strict";z.d(K,{T:()=>Y});const Y={1:"fc803f64-b097-4a02-9ccd-065a52f64d9f",2:"504d0d3f-da75-43dd-92ba-fe5a30187a98",3:"cb8a15b2-266f-4c7f-8d76-4df2e6128ea3",4:"3c5fc766-a784-48e9-b076-d45a0cfd1b1c",5:"bde236b5-b4e9-487e-98bb-260b68e1d508",6:"33921ba4-9f23-4b2f-b2b0-e2353ab80abc",7:"89946068-4db0-4ddb-bccb-16d2581aa2c4",8:"1d3b76f4-fb53-4c1d-82c2-3ab22372b314",9:"af47e456-af04-48ad-b12c-0c798e11f16f",10:"4a389156-2c69-4e74-8790-d55d464823f3",11:"36e72540-094c-4907-8f7f-e80dd07cc418",12:"8527f4be-1522-4ceb-8161-c45c61d9b553",13:"711f7aaf-c73a-45dc-a38c-8fce87d3a4ee",14:"212a3c6e-0113-4c17-a647-f0362a5203c9",15:"5207b7a8-d8f8-47e0-9db3-4998301c1df8",16:"223de309-a870-4aed-adaa-5cbe162c5659",17:"a9e11847-274a-406c-8599-93e017f4bc61",18:"01eb52e2-1dc9-4f65-99b7-157604cc777b",19:"c8062699-3d21-4fbd-9e5d-af23e8a9f969",20:"69bad6cf-14b6-412e-a50c-292cc979727a",21:"f0279fc2-fd10-44ee-b6d9-15c1635f42bb",22:"72fcf275-814c-406d-a7fd-a38cd3abaf51",23:"4ef72dff-a973-467c-8f7d-35883c5ec2a5",24:"14227a70-675e-4dda-90ec-13013d75df46",26:"096be956-d921-4b01-94cf-5296b2ad9dee",27:"30e7a29b-11ba-43b2-bd47-44bd53e31c69",28:"4c912ea4-5042-49b0-ac2f-137cca73c26f",29:"423af034-ebdf-406b-9ebb-18421ed7caa8",30:"9bedbfff-f5e9-47aa-bc9b-22ccfb0904d1",31:"02ad1891-5703-477d-9de8-14148e9aff74",32:"68cb0ab3-f4df-48b6-97e3-b51008bec534",33:"18ef3003-27e5-46fc-b71a-e59165184d9a",34:"ee399d49-98ac-4e40-a608-ddb51f4c0e87",35:"b4abfa7e-97d4-4d44-b342-75a6bc828896",36:"c955c422-dd5f-42ce-bf12-bf7b04e17ab1",37:"48ee416d-121b-45d2-83ed-37f0c5f2ffe7",38:"8e2aed7d-ab4e-4424-814a-b2b169891551",39:"c7179c8b-30a9-409a-8eb3-d132b660c0ac",40:"a1bd4731-a40a-4891-8cfd-6556e741c10d",41:"e5ecea46-b0a0-47ea-a0d6-fce83e3ea403",42:"514acf6d-258c-4830-bc54-7acda35afa20",43:"2762f59d-5aa4-4257-ad69-76cc508bf31d",44:"ddcc451d-87d8-43eb-85de-d5583367adfa",45:"0d57eaa5-96d9-4270-aacc-917e8957dcae",46:"4e3cf812-02d1-4a90-8611-bc2783f08f82",47:"b9e3faf7-de48-4a5f-85dd-bad1dbae21e9",48:"ed80cdbb-c6a6-4560-b28d-548a6f586f61",49:"0f5e554e-6640-4f35-aa08-5d9103c77231",50:"ed74cc80-3253-4820-9368-488434b7a019",51:"34247c91-a5c8-43d6-a462-2f24c20a0c50",52:"65207ca3-d40d-4e8f-a241-cc7f33ca9bdb",53:"5d45505f-721b-4c3c-b81f-7c862c3a172f",54:"e3bccf0e-2afd-4f08-a113-0e653b79a2d7",55:"71a7c42f-f624-4ac1-882d-256ae0566f2c",56:"05bee47c-6bee-4961-b90b-9e47dbcbf6d7",57:"9282f708-e29e-4427-b9b6-450b710542ad",58:"521eb027-0b88-479c-aa01-70f6b9598d70",59:"9349868c-3a29-47fe-8e77-ee003c8252e5",60:"f8fad4de-39bd-4ae8-8e72-e0a9b1ee7c06",61:"fd4a87c7-bd55-4dd1-9811-7be2859b9e20",62:"1a445a03-4696-4255-863b-ce63cbb0753c",63:"6ea9f2e8-3440-4c31-a895-d4d00b218d5a",64:"5b26adea-cd56-478d-b787-f979e78cc136",65:"6dfe4559-a044-40e8-850b-8b2496516e27",66:"e0eb302d-d4cf-4162-a1a8-fa14b2e1ad01",67:"48eb9712-a0ad-4a6d-93f4-f0c9c7dbbd23",68:"71356bbf-7525-4350-be62-6a28d6efce72",69:"7c530624-38bd-4e98-b6a9-4023db5660bf",70:"2e7d24a5-a7aa-45b5-9269-8cd3f972f4b4",71:"c3f4f422-e0a6-48ed-92ae-5b98281ee2bd",72:"f6dbd550-f849-4254-8c96-490327804add",73:"dde06240-581b-4a49-ac08-1a678b4670f5",74:"20afb102-02db-45e7-b3d6-5c0985965a1a",75:"fc95e252-4c38-4cb9-bfe9-38839c054e00",76:"f098c29c-b502-49e6-a6ff-be7b70e95fb2",77:"4188e5ff-c5e3-48ab-8ed6-6447c2ac7665",78:"e691781a-5ef1-43fc-b1c4-1113ea9ad0da",79:"632ea709-d268-4aa0-8792-4c0957c1829c",80:"91e08ac0-7aa4-4a2b-853d-b1850d86c32e",81:"60197ca4-edac-4623-a47c-0d949ddff287",82:"ac3e6cab-d35e-4a46-bcc7-f3603b0186a8",84:"905106d0-0376-4006-8dbf-5852c553ee6a",85:"d17939e1-10d6-4fae-8695-1a70059c7564",87:"51050525-d8bb-4fcc-8db6-6a5bfa19a9e6",88:"65b1cc51-052b-4ee9-8c52-4b808d009a57",89:"a4ce522d-ec9a-4f59-9875-15041ffdb810",90:"57697f5a-34d8-4d25-85e3-0770f71f4b3e",91:"c16c8fac-546e-4a8f-9699-96afe7d42bf2",92:"40a830be-16fe-4c13-99ed-24cf2d2acfaf",93:"e19ecfda-8a24-4a40-92bd-035c7c7e79f2",94:"b942553b-a06a-4c8c-b0a0-160effb3ec7f",95:"d17a542f-7dd9-43cb-ba9d-9fa34eb31e22",96:"a77d89fb-0220-4cc8-b50d-d84720b2dfd5",97:"5f1fc64c-f981-461c-967d-de22ba1c1500",98:"fe2b6457-7aa9-42b9-bcc9-c47ef41b8eb6",99:"9e0a7aab-93ac-4980-946e-25035091b8b2",100:"76ac585a-4bec-4c1b-958c-76d19b28dd8e",101:"24ec6c09-a2d4-4872-8d10-f8fdf8951a10",103:"f80b20e9-24ce-4f0c-852f-09efd8903b32",104:"0be93aaf-2599-432b-8319-d25b7d3e4023",105:"34767edb-4b03-48c6-b2eb-c150132d4b97",106:"56cd1746-83d6-43a6-b809-b1600abbcda4",107:"1f0be7f9-b5b9-4c2a-a34a-33db79e712d6",108:"04b2dca3-c52e-4fef-afd3-171d8e1ee624",109:"02c62104-a3c5-44ad-acbc-d02398349e1f",110:"7e90ec3c-2d07-4fe5-b988-71712f531108",111:"be607cec-dcbd-4d1c-8f61-40ff7286279f",121:"2f9ad04e-f86f-434e-beb3-482c05a3e99e",122:"eb5a918a-3042-44ba-ae91-40445f35e8fc",123:"8898a24e-c4c6-450b-b682-005af5b15d6b",125:"e604ea87-d9c3-4fd2-b572-bdbaf660949a",128:"4ba5ecb4-f37b-4222-a1f0-723ca2ed5cfa",131:"78543d0f-99f7-4779-85a0-fd5b4f1d8658",134:"c37e0a92-7388-453a-9b3e-da705f84c1f9",136:"69c4ab16-bd61-4b1c-a899-9591324cb922",137:"4213f26e-6502-4e1c-a0ab-155a252792fa",138:"1dd59d6e-6bbc-44e8-b50f-80b60ed4abb0",139:"5997e7d2-1e39-4dcd-923e-d9596703a358",140:"695f8d56-8dee-413f-acb7-d8d1d269286b",141:"28bc7b7d-291a-429d-a618-5dfa0b0ed829",142:"8334b8dd-a9a3-45c7-918d-38deaa562c04",143:"9db71127-4b69-474b-a14f-2f8e14492157",144:"75c94731-e067-4b07-ae7d-53520eff2dd8",145:"64d59196-1650-40cf-ba3d-0e1ba89f5063",146:"3261fd98-0e15-4334-9f66-7ccd7991ee92",147:"2c1a7a79-398b-4c1e-acec-e877db67468e",149:"c4f5f284-e29c-489b-bc3d-3d093f71ba11",150:"fd48539b-0b8e-4e4b-9e3e-ada16d096a68",151:"c9340a5c-d410-4835-bcd7-3e5f27a61e5c",152:"08f72fe4-cf27-44e9-9b22-eca718b4c84b",153:"f44accf3-0868-4fee-9903-4a6a31cb7d17",154:"7dda15a9-d786-486c-9699-214c9d303c15",155:"b5d1f28e-d15d-4144-92b1-4597be72a854",156:"352d96fd-87a0-42c6-86ba-f5f5f2fbd199",158:"6026dfea-1840-4632-a262-e0fefbfb2d37",159:"dd3d3de4-5a08-42e2-92df-510a9ec718e6",160:"b451c4b0-180b-402d-840b-26f383d0edfc",161:"14284996-79c0-44c2-a36b-9cffece19bc4",162:"4d8a543d-f259-4399-8bd9-95984910a158",163:"23cb292f-e6e2-4f3c-88a5-fcaf8bdf179c",164:"d0dcb964-e294-44c8-b39d-65aae4346034",165:"7564f48e-bfa9-4b94-96ae-e628e30d3b7b",166:"384bdfdf-ce86-4f1c-9f7b-be95d344b250",167:"50d655d4-5e85-46c8-8e46-c33a449ca975",168:"cb02d3b3-66a3-428a-86eb-9ce6ff58f707",169:"1de822c9-13b3-4b99-aded-e340240c382c",170:"cdd7bfe7-ebda-4a1c-80b1-e023608200b3",171:"34022fb5-3e06-4f9e-9e7d-afc2d3a5d223",172:"2142f025-9e21-4f6b-a964-6cfef5d1bc6d",173:"336e0c9c-cd1c-4301-b52a-b98e5fa5d9ba",174:"9518748a-13e3-4f2e-852b-4e42bd85ca02",175:"9e6845cb-93e4-4780-8567-058bf635f143",176:"c36b4076-771b-4e60-abaf-ddf0d4c86930",177:"94e1fe77-0dbe-4bbf-95e5-ea707007ed5c",178:"43a6e25e-06ba-402e-98b6-633e2c9018b7",179:"dfdd5ce8-8445-43a0-aaf0-3ab6d5b7d8d1",180:"80fe2449-99e6-4f0d-bdd6-8179802906cd",181:"d0886b67-9670-4eef-b452-0cd4f0a42d19",182:"1579afec-dff4-41a0-936f-4111f4f96cb3",183:"c6982a43-eb94-41bd-8684-777ab5bd19c7",184:"5f41427d-83e6-4de4-ac63-f14d0fc3447e",185:"48c32834-70fd-494c-bd4b-5d685c06eee1",186:"e647a8e2-fa3c-4aa2-94f8-c1a652a734af",187:"25901cbc-1f86-46bf-9b6b-494de314da2f",188:"6658ac4f-8942-4f2a-9694-49a5942f0e9a",189:"2dc4e86e-6667-4d39-9938-48539933a198",190:"7a3692c0-8cef-4962-a759-bcdd049a3184",191:"4d35970b-6c0d-4a82-a0ea-b49acdeece27",192:"9da76592-c6fd-4435-873e-df5681edb1b9",193:"0cbeb534-cf83-4788-97c4-bb7bceed8e84",194:"db7991d2-4bb6-4849-a9d2-43f3df2a45fb",195:"20f58865-7c92-4b2c-9e8b-e44b024fa102",196:"b3424a57-d677-4d5e-9094-046c94cb3365",197:"c211f913-5ab3-4244-8fb5-1ef606760b42",198:"b611fcac-649e-4993-b135-3a29c49b870f",199:"c60bce9b-9f18-46f0-a29f-dcb64da8fbaa",200:"2acaaf48-000f-48b0-8160-d7116868ee2e",201:"39470ffd-5db7-49e5-9b0b-3365f386c002",202:"4ebfee10-3b01-429e-a815-a5a2afdad49c",203:"f640ee73-5520-4062-be29-72bae4e60e6e",204:"9e1081ce-6b5b-44b0-a3bb-17f03b746d32",205:"50342091-df38-4d10-86d5-4b62ab768233",206:"137f95a6-1efe-40bb-b5e3-5d73da563226",207:"f74b757b-499d-4d7e-82bc-44870a73d7ec",208:"2d9e07e9-e5c9-4328-ad3d-7b76921e093f",211:"1c053f80-afa4-4de7-83a9-7bd8658b01cb",212:"3af064db-2afc-493c-930a-0b5591be4729",213:"606e07d8-e4dc-46fe-bd18-20fd59e29dc1",214:"770d667d-f843-4269-95d6-3e1496233792",215:"d52e1378-ee03-46d7-94a4-eabe3a7726ab",216:"7baf54d3-a94f-4217-a02c-de7a432d6473",217:"f98eb440-a797-4315-96fa-58c36a040b47",218:"e3df5753-c17c-4b08-9627-11d136a75347",219:"7f4c0349-a4c2-471e-849e-418bc6f30b9a",220:"1e5c1c74-9b7e-4484-b118-d4023d624ac2",222:"99b8c066-153f-4b64-8f31-f013999bd6e8",223:"817a489d-a299-4873-8889-d37f96a20879",224:"34b23e5f-0dff-43b8-bfff-90d1bf005095",225:"603e642d-43f7-435d-adf8-111edc412559",226:"ad167b80-ec13-4619-95fe-198a3dcf76c5",227:"d43edf90-57c6-44c0-b4df-01ea8fc2921b",228:"bf29d664-f591-431c-af02-dfa8ec0c6b57",229:"08027796-5d46-4e0a-b0aa-c428f0cf56f9",230:"deaf21f9-e416-437b-a348-38cf09bf8023",231:"1a816b0b-02b3-47ce-9d20-9a7728707697",232:"366bbcde-0f91-4f9b-ba36-11537a853b13",233:"6a8bfe5b-80a8-4f8f-96ba-8355ca13383b",234:"89bc34ad-a329-4d95-9d0a-81345dd3842b",235:"dece6029-923b-43a5-b114-dce4e3c77c93",236:"4b2943f7-f0a7-4a6b-a86a-18b49719e0c2",237:"83b0a5fd-afac-4336-b35c-d56592e8b7c6",238:"7b25559d-d6f2-4a16-9d0c-24d2b9fe1118",239:"3bdc600b-52e8-4267-b091-6c86ad4fd630",240:"fab69025-5aaa-4f86-b4c4-eea77d7b3734",241:"02b7bd8b-fea0-467c-aa98-5ab25670607c",242:"ad005f96-ace1-427f-b7eb-a84d0fe6264a",243:"c50c7501-139f-4d4d-a18c-8d07dfd8fa50",244:"48479669-ed5a-4848-b260-343ab900084d",245:"fd5f0b3c-4985-4063-8578-592845359f4e",246:"5a328e09-a4ef-4738-9aa9-1cb8d760826d",247:"510f2023-d98b-4671-be05-143e5accc46a",248:"49a3cb34-0e8e-44fa-9087-da28f6ac3262",249:"aba7150b-4e2b-41db-8f88-9833a7905e5e",250:"223a0cdc-8788-46dd-8654-96526508df14",251:"ff3837c0-5acb-4f1d-9581-b42634a9a5f4",252:"0b599ffd-5823-4b6b-930a-af1d4411f111",253:"ac2837f7-5ccb-4059-8a74-ee2267b28eae",254:"432cc4d2-be65-4a34-b1af-bd6415121788",255:"4d7789ce-6b07-459b-9580-67fdd9f0ad4e",256:"64f957f0-95ab-49a4-a8f1-8fb2d412962f",257:"d9b2b923-1cef-4701-bb6b-66cf4fb18a7f",258:"f3ec331d-35b8-421e-90a7-314ef44f0887",259:"da4c7159-fbb2-4b7c-9f96-1b88e91b7c88",260:"7858415c-b99f-4f6d-bff3-d9bf5e66f8dc",261:"5673ba5e-d1a8-40b2-8cfd-2d91fdca9977",262:"e64ef4fa-2ae2-46f2-bfd8-ae4dab232e46",263:"8089f5bf-ad38-42e8-ae5b-6c77b9d60e2e",264:"84b152d0-8202-420c-89bc-22a129ede8bf",265:"cf0cfdeb-04d0-4218-8fb6-be4c31a186f8",266:"56e2cb99-bcff-4bc1-ab86-1631fc1c82c8",267:"5e758c86-4462-4abd-9a4e-fa1b0fbcf0f7",268:"c74886af-7e0d-41b1-b347-cf2b5ced4885",269:"cfa2a157-1044-46cc-b7f7-fedc7f1a9efd",270:"12c7cd6a-8528-4f37-9db3-2c37422cfdad",271:"5072a2e8-93eb-478c-900a-80b8a6649496",272:"81140ff9-5019-4538-909e-ecd0f4a96508",273:"df4c4416-f741-4a2d-8f3a-a4417fc592c6",274:"62292d8d-279f-406b-93ff-cfaf076b58aa",275:"f42ddee5-4e78-44bd-bd3d-d9cbdb586bea",276:"4cb02221-b4fe-46b8-ad53-3ac666ae9d81",277:"80b17525-4e04-44a3-9c71-27b895a4e024",278:"35f406ed-3d0e-41d7-b9c6-a5286ba584dc",279:"91e32f85-b86e-4024-874e-c0d6352fc92d",280:"8f9744b7-1e48-4b25-af31-e983dad3cfe1",281:"31fe7b8f-b748-437b-9069-dee8587d8014",282:"8be164c6-81de-425c-84ea-7f0f5101ca4c",283:"1e2a857c-8213-4425-8264-bccffe30bf18",284:"903f80d7-8550-4469-a299-291251fe5cdf",285:"4c780a71-5340-4cd3-84f0-a188391b8edb",286:"e776d8a6-115a-46fa-b2e8-00ce0241d654",287:"a82ab69c-02a3-40c8-a834-8385a80aebf1",289:"65d81152-57d7-4976-a35d-866f93ae5815",291:"e3dc2984-f573-42cf-baf0-f1378b58701e",292:"fb7e84ef-e017-4834-a0ce-4cc11dffc8d2",293:"1913f297-e6b6-4361-9eb6-080f71921f87",294:"bd404e85-187e-4418-a4c8-8138c889808a",295:"d6e4a580-1b94-4c5d-b77b-f390863f8ba4",296:"aedb7485-8e26-498c-8b7d-e717987c08f7",297:"bcf28ad1-373b-4fd7-bc43-1e159725341d",298:"ec303811-f85f-413f-9634-8caabfd06d2f",299:"0b7c3353-6edc-4c40-992a-8a23cae62ee3",300:"f3c0de9d-4197-41ce-8506-9b9b3ee59a86",301:"37e9abcd-f9e8-4759-a14d-a69c44d42833",302:"354ee9b9-050b-4c02-962e-57dce14347c9",303:"0526a8bd-8dff-4ecb-a9af-7deecbabd66b",304:"1ac4dce7-c3a2-4341-ac23-02a5a4f6615e",305:"30f45757-15fb-4e3d-84e0-5d0e7c24f5a4",306:"bc4f37ea-dd54-4a7c-97d5-9f64e3a9b2c8",307:"a3d578cd-085b-4c7d-8d5c-5ac2728b517a",308:"21ab0b7c-d369-4ba6-9787-24d385447f1d",309:"3bba2a66-fa68-432e-875a-7f24223ff0d0",310:"e1442215-f547-4d1e-8b20-bd9952bb9b2c",311:"ae5bdf4f-d891-4452-ab71-647090e19bbe",312:"cc2a740d-91ad-4148-af3f-ba8565d5a2b9",313:"811ff008-78cc-4ed3-bc80-3275890ff601",314:"7c097985-7087-4043-abc7-985918c9c5d4",315:"dbe28384-132d-4ba1-9597-f5693a5c2e47",316:"e8281bf1-1e28-4240-9568-9d6669265283",317:"92fe4952-eb5c-47bb-8bf3-0fc019d6c49a",318:"5b6e5f17-5c5e-432b-a31b-2e8d726b7e0c",319:"920cf589-b733-4530-a515-0cb2cf52197d",320:"5c305e63-28e3-4cca-8be4-5910196c4d5f",321:"2d92dc5a-4bf9-40e9-9e8d-e3927b0b006c",322:"4e547add-25b8-4120-8c3f-abd47ad321fd",323:"74a944e6-b977-4ab1-8676-62f6b3fa0852",325:"012158f8-2e88-4289-bc27-8ca0af20ae33",326:"3a8f6b3a-fdb4-40e2-bb2f-f510c8dc7970",327:"99756734-c409-4a1c-9e2b-fb184385abfb",328:"63644092-6e0c-4008-b9bf-56e052e13bda",329:"c83f5774-380a-4bcd-9704-37b75eb535ac",330:"914cb856-6ae8-4492-bd57-195b4727dfe0",331:"b4933d6f-4730-445d-b4d9-d80153ea1e38",332:"37b4be5c-46be-4db7-8830-a427be35944f",333:"b6eead11-6a94-4926-b209-a48c833fb284",334:"d35485e1-ba06-4762-a8eb-8309202d1bbd",335:"e260bc51-a481-463f-b2a8-d371934176e6",336:"2100645f-a74d-432b-9cbb-240600dbd60c",337:"5d2d8057-1d1a-4fdb-86db-163c94d7d7cd",338:"c63d2ffd-78e9-4e0b-af32-9cb9729ee579",339:"f45d1d33-8e2f-4c9c-a47e-4cf1db19a1ca",340:"174e9865-8ac6-459f-abed-f6049c437d8a",341:"5b15b8d1-d9b9-4d50-90bc-e2420a380a8b",343:"7f9a4ec0-0d90-4b0f-a4f9-025a93bca33e",344:"c9d3b0f0-1385-4b5f-b73b-f755384c6d06",345:"826fde9e-0f3a-4ae2-b50d-13940715f87f",346:"3528ffb5-8832-4313-a612-c502cd69d9c4",348:"156dbee9-e95d-4694-93c6-03b7aa8e98c5",349:"503b6560-6454-44ce-897f-fb674c4de2a7",350:"a405b70f-e6de-4ae6-8f3f-beed6d9ff4c2",351:"34d38842-b451-4a6d-9c0c-bb815b376e79",352:"71f54c3a-e70f-475b-be02-ac446e464434",353:"8c28dd05-f858-4a22-b49f-44e0508da235",354:"1a6b96e1-7505-4786-935e-cc99b5903dfa",357:"988176d0-042d-48e6-89a1-4e74ea299ed9",358:"4872669c-77d5-4f02-96ac-dca4174fc076",359:"4143b4b9-7cc5-4088-9e07-edd2eb9409cc",360:"3909edca-f54d-4cad-90d7-6af556567289",361:"dc93dfc6-5aa8-4521-b827-d85cc1ccb7a7",362:"6f82f043-fad8-4549-b8ee-777661f42659",363:"529faa7d-c2b9-4093-be2c-e846a7108135",364:"43705ebf-a99d-4052-ba1f-db23639584e5",365:"847f69fd-cca6-40af-878c-84aba7177752",366:"027d61cb-8ec9-48f2-9ae6-5d202b1afac9",367:"cbfbce18-4263-4f68-b6ad-ccd75b3fc45f",368:"ce8b1180-02b5-4ce7-8e0d-f64739a1300b",369:"1c1e6d7f-cf57-456b-bb6e-7002dfd06b9e",370:"cbe930d4-390b-479c-adc3-45983a21357c",371:"9107925c-10db-48c5-8be3-c79442878f50",372:"3123994a-1477-447c-8c63-6015ab50065d",373:"9c798ef5-555b-4c03-b7c3-213652d21fa3",374:"6b3964e2-d7e7-4b09-9269-0fd0510607e6",375:"00d18425-5436-453f-aabb-2507cbfb8886",376:"8950987c-6f03-4f45-a161-a2fdcb48d11b",377:"d31a96eb-8190-4bc0-8a2c-93df4ce837d8",378:"f0105505-d0d4-41de-882b-db53c4cf184c",379:"e71144dd-f093-4a36-b40b-79330b2c402f",380:"77758c5c-fc35-42f3-af54-b2afd2c62bae",381:"22b45ec9-fe31-4cd5-a1f0-39aafecf1a89",382:"87a018f2-463a-4df5-8282-a1baf5d2abe0",383:"dc392e6f-3bb5-4c22-ab64-1ece78d4b720",384:"079367aa-95f4-4a69-b611-0d8f5cadd88d",385:"563a4fcf-fd69-48f7-a33f-3aeb9cbbab12",386:"f2d8e404-9426-4bc3-997b-20ee9614787b",387:"b8fe6772-4e70-45db-ac94-03807d2c29cf",388:"12dc2816-1bc7-4c91-8ec2-49f9e71fc56c",389:"dc9fe622-a67a-4b88-bdf3-f91931f84ac2",390:"0591ca90-f9c8-43af-a85b-5629e9c71bf6",392:"93877c15-e507-46d5-9534-31fba16886bd",394:"fc775cb1-3fc9-4ca9-a6c4-44e09fb241bd",395:"cc209739-9ca6-4781-8b81-d2369dab2477",396:"cba4e27b-007a-421b-ae3d-ca80bb7725f7",397:"c32fbece-26d7-43b7-bcad-698cd540b465",398:"04e0b298-53ac-452c-9f4f-477ee891cee2",399:"bb95e49c-7053-4edb-9bb2-2d22a1a4d8fd",400:"af3d0a70-f46e-4bdc-90a8-78b13e9e75d6",401:"9048c6aa-ce8d-425d-9c14-efeb73cb3055",402:"9d21ed51-3879-4e7c-a998-a2403b193965",403:"aa2a8aa2-2eae-4e74-bebe-cc95eb57c917",404:"a6b0b5e6-04f5-4156-a113-77d6f0ed461c",405:"2148f49b-9ee4-4e60-ae71-60637575caa3",406:"84f91d37-1a29-423a-8869-7d6df2d58411",407:"4f4ca7b6-9e03-44d4-a7f5-f254372fe451",408:"f4b85b2b-0865-4e0f-8bc2-92a42f9a9297",409:"16a826f9-8d6d-4e6d-92bb-2c67fb5aa5a8",410:"c913c045-2053-469f-aae9-64cabf3e22f8",411:"53fe1e6b-3e89-4750-9a82-80ef6b7a3da7",412:"14c030c3-e163-4167-a472-d57062c278a9",413:"fed14908-e145-4d1a-ae31-7fe23cc1fccd",415:"147e34f5-e1a4-4186-8d71-b1760e105081",417:"ecf56d28-6b95-4e39-add2-2527fae268b4",418:"3824fd5e-d75f-4db5-9ef7-4bdaf8e25b77",419:"da0068bc-3803-4b05-8bda-f76f96a91a8b",420:"5591e0ad-ecc6-494a-9121-4f4f9171fee2",421:"0704badf-9000-44e0-af63-42de090cfe62",422:"79470531-f247-41ab-9eae-7fe353f669e2",423:"819901b9-7cf0-4541-b1fb-e873f8c2dc3b",424:"d2cdc4f1-9e27-4b36-ad39-9b9c6d9d8558",426:"c778624c-abce-49cf-8363-426fee511af0",427:"c2a0bc7a-2fee-4e7b-a32c-62e32f4f90c5",428:"6181e9e3-bd5d-4e4c-827a-714e370e960e",429:"3e59e756-697c-46e5-9d68-6d6f024bfc5f",430:"73d018c9-176b-4f9a-ad9f-bb62d5fc4aae",431:"078a5b4a-0019-46e7-a078-df1d9ffa46ab",432:"1c141553-8b65-4dd6-9398-3e4e458f8ddb",433:"419e1bcb-9354-4eae-8ab3-a650c4188540",434:"cb5675f1-a15c-4e61-9a93-feceb823d6e1",435:"8aa8df9a-e2ed-4751-9188-d0527e41fbab",438:"51511cac-c7c9-4d10-bb33-a78c42f5ec68",439:"cba8f9c9-b62c-4873-a571-57e29977ae5c",440:"54d80c70-5534-4a9b-86b2-208d52e07772",441:"97c8db6d-57ea-4be2-aff8-aba319fed26f",442:"2a318f65-0bae-4e36-b551-84f93be3eede",444:"7885b29f-39fc-4577-8145-63dfbceff6e5",445:"48eaae11-08d6-4d6a-861a-d307655ad48e",446:"82acc4ed-cae0-4424-9bbe-27456d90adab",447:"aef5d065-6408-4e5e-a6f5-bdc395ce578e",448:"e84b5762-b3d5-448b-9cb3-3d0985fcd04d",449:"612a1513-1a3b-4595-897a-86520dd1085f",450:"2521a48e-7f55-4879-ac68-dd74bd1487a2",453:"70c0a518-8be9-4213-880a-9e969145fbb8",455:"81ac35d7-d7c5-45a8-b30c-3e0ed97297ff",456:"f78090fc-5f1e-48dc-8215-2825d4eec7fb",457:"026d935c-bcf3-4a4d-85fa-c757e464b020",458:"86c8c8fe-6fb5-47a5-81b8-00b9f9c91810",459:"3508c69a-337e-47fb-b694-9bd81bcf0200",460:"f7e5db39-39fb-4bea-8b2a-1515077d59d6",461:"b55a5daa-5286-4981-bca3-65a1fbeadfb0",463:"44cb5816-7653-4c8b-941f-27905efa541b",465:"373cceb4-7f45-4036-8a49-7de1c3ac67d6",466:"0d366e67-7073-4a92-86ba-f92b9782ad83",467:"af453859-a3bb-45f4-8137-ec59b3843a52",468:"ec371e9c-5108-48dc-91dc-f90e204868ad",469:"358d439c-9469-437f-a4d2-f0141aee13b5",470:"82920f4f-16e2-49d0-b138-0e3189f59769",471:"4202a0d0-28c6-42e9-a685-23e8452513ff",472:"0d729724-f289-4e92-af91-33c01bc80ec2",473:"5933364b-663b-40bb-84ac-ad2865a29a99",474:"0ab532ea-6c66-409f-8869-f030fbca04c6",475:"baf20088-5ecc-4def-941a-b0a57a0b74a1",479:"04c98e28-ed1f-416c-81d3-4fc0784cf51a",480:"12a01b2f-9bdc-4562-9fe9-5b385632cd61",481:"043bdba6-97c8-45ce-9ecc-1752efb7065c",482:"bda88deb-aca1-423c-bf56-6ed7f614a5d9",483:"b7b5dd59-f0bb-44b8-bae6-29ed6e99fbd4",485:"8f7c6c8a-9d45-4e7f-8f7c-ab52017dca0c",486:"3c7dd26d-b97a-47f4-bd2f-78c59d1c51aa",487:"e91873dd-cf4a-43bb-893f-31102f45108f",488:"f23663c4-440a-4c4f-8d47-d91ee72e5b15",489:"bcf8417b-6359-43e7-9785-2210028b6d20",490:"afc9e698-77b8-4aae-af6d-31898c9f4faa",491:"dbbab5c9-3c7c-47ab-a896-3a757191aa1b",492:"2900f01c-02af-4819-92ab-5b8f5cb70b4c",493:"b6fa975a-3c68-4fbd-8dbf-7b310fbb0ea5",494:"b89030af-5691-4493-b95b-6c55914a363d",495:"5b7fa77c-e106-49d1-8a50-fd30d6add7d0",496:"2d7788b8-e481-4f5d-aa39-b8c52ac29170",497:"666f2649-ace0-4696-9780-d034685220e2",498:"16b34b84-6ca3-4641-9353-aac17071c28a",499:"070c7f92-2031-4aaa-b70b-a941bb3e1ca1",501:"6f1b9955-bab3-41ad-b547-25edaeb5ede9",502:"7f569c4c-25b8-4b44-8177-526b8ab8157b",503:"deb4a8a1-51f0-426b-b93e-e10124aac6f5",504:"0779b9be-f064-41cc-86d0-1880bb1fd21b",505:"dfeb3c65-9c38-451b-84a2-30695868d579",506:"534113f9-fd78-4330-96cb-60ae8bd5e6bf",507:"171721fb-5707-4ca6-a63a-720ceb050943",508:"e614e66d-6b42-47f9-8cfa-08ed393f42a7",509:"b18a2200-71d6-4b84-8953-bc2b2fb1d2cc",510:"f249ac19-1c03-424b-9cec-71ef1ca0bc0c",511:"0124ca74-995c-4ac0-94cd-5882208a64ff",512:"34dc3421-4b81-4317-ba07-c49c197a17ed",513:"c2b1f0d2-b105-4e84-a25e-4767eb5d891d",514:"fa5bf8a3-11a4-40cc-a01b-741011b0cb0c",515:"f6c73014-0236-41e8-a800-3377f3445a6f",516:"7b7e6f0d-4f5b-4fcf-981d-6e0bfdf041c1",517:"44c2887e-33bb-4079-b86d-eb6c51355254",518:"67a7bd11-9c7a-42e4-a18d-3ee7e70ca835",519:"81a31dc9-e710-409f-abe0-575f12761e94",520:"b22652bb-f0ef-4d81-be04-655b16e3a779",521:"c248c8b1-4fae-42ed-8ef5-800be0d43eb3",522:"6c13c725-e537-4bb4-8692-f60ed2d0a86a",523:"cc44b924-9b89-45a1-93c3-d957262ad0c2",524:"545d11fe-d959-46f7-a5ec-fd87b7b99485",525:"cb7c9d1e-812d-4ba7-9033-c8b90d9d9fe2",526:"4ab7d0d5-5304-4c57-9a27-db2268af61ec",527:"cf900e63-412d-4e36-a708-1808d347e79f",528:"55dd2d85-d0ef-4e64-9941-a1bdf15510cb",529:"9d679a90-8501-4940-9516-82850969e803",530:"3419ced9-d7aa-41bd-9e5a-d6be9d8beb29",531:"8950c958-8bca-4c31-a8d6-fbd0720ca4e1",532:"b609e72a-928c-48d6-ab30-829f4fe7a705",533:"dd4dc09f-9d51-40b5-8846-6393951c2bdd",534:"ac514889-4da6-48d5-87aa-466390fc728f",535:"445d5673-7b53-43d1-b8c5-4be32170061f",536:"f5f8abfe-6766-4981-ad51-edc544561bf8",537:"b388ddef-c031-4e98-ae1c-e32975e7fb00",539:"34a7a6af-968e-460b-8f8e-802b9ba7440c",540:"da6bd42e-06e0-4dc5-b976-caf20800ba67",541:"5c4a143c-6103-4499-b9d5-354947fc4ca8",542:"096c42b7-328f-4c0a-96c5-b73a6d5ae0a3",543:"04d027a6-0c1f-44ca-8533-0b4cdbf1625d",544:"2ec4f959-a938-42d8-9dc4-c81d2aa10ee6",545:"36cb2e5d-2f22-478a-ba0e-ab457e71cae3",546:"a67c78cd-5248-4c80-be20-c1628ba91b03",547:"4f8ef35e-4f88-4a91-8504-50aa4c0b818c",548:"1363552b-404e-4934-8a63-e3722ac40985",549:"e93677d9-c599-40f5-a1e0-29f8e18703ff",550:"af62580e-21e5-492c-95fd-1f9269b8dce4",551:"940aa9a9-d8ba-40fe-8460-c2fd906a0187",552:"2326a266-af06-471d-91ac-2922aa209e6e",554:"dff034f0-d1e4-4863-aa9f-9fc92e92467f",555:"ff0b8d68-96a0-43f1-ae16-43d04f32bcf3",560:"e741c190-7589-4ab2-9a85-8668b3c4210a",561:"2df094ca-b6bd-4ca1-aeb3-be207554ddba",562:"a36349f7-a54a-47e2-9847-3400811999f7",563:"757fd180-0ff6-45e1-97c2-aa98f96f555b",564:"eb5cd5c8-25dd-4f7f-a72b-441a22e0f741",565:"505ae35e-457c-4dfb-a633-170572a4cdd7",566:"6681990d-e0bb-405f-96d5-959779ec0ca8",567:"9c4f6c89-7f71-445e-8471-2a3ea3c9629c",568:"5f381732-e54c-4979-b8fd-aca5397c8c6b",569:"2561442e-2c52-47f9-9a7e-2a20636e4498",570:"9e3ab9de-9b8a-4f21-8b6f-29edc0a1ba40",571:"a0d3dd32-5238-43b2-b475-603291ec6c92",572:"f70cce4d-e26c-4b8d-8ec4-13d249d99897",573:"2040e562-f68c-4c50-a6fe-1261dd1a266c",576:"cbfdca48-c3aa-438f-a67f-4d26d317e74d",577:"fd84b30d-b484-4f4d-9b46-e9f3976001cb",578:"f027a0e2-6d68-4e54-93ec-8e98fe5c2fe9",579:"4ce8d681-6a12-4845-b10f-ebf42407afde",580:"0ca8c9f6-2491-4de5-9bbd-5bd7f11c4279",581:"5c30e061-478b-4eb3-aa29-cb10ee3c1ffa",582:"29f4b7f5-e3ba-446e-8cfc-72b5989ea676",583:"8e9027db-2ad9-484f-8cf8-bcde815666ad",584:"579ffa03-9580-492c-ad39-52b5e4c1ab41",585:"298d257a-cfc4-410f-b88f-7490a5919f60",586:"8d7d1956-7cae-43f6-ae50-5e6c864b27c5",587:"4e95401f-26d8-4579-95aa-92c2e0848e17",588:"07a17daa-a30a-41e8-8a5c-341c2141910d",589:"bfea05f6-bb3d-472d-ad13-2601f2f565e1",590:"7aa91b45-f736-468b-a230-f701e4e5d537",591:"a898481f-808d-48dd-91db-cb9441348489",592:"6f2053ec-0878-4085-a82c-82a175a34a24",594:"699b2e8b-3fa0-41d7-a611-5afa37d8a5db",595:"edb041a3-1ca6-4227-aad1-375d9f64152f",596:"76bfd317-9e3d-4aaf-ac97-6feec08665a4",597:"bb0e4fe9-0e05-42b9-a1c6-8661eb5af225",598:"239994b5-7083-45e2-a3ad-e50ca244de35",601:"3e8bba0f-fc57-4411-8180-ac8948aa48ed",602:"cb5e8924-3786-4bf9-bba2-093015746764",604:"6aa5e0b9-7545-4667-94a1-ae40a3a30948",605:"decb2378-402e-4aa8-8c3c-60d53a3eb645",606:"81b1f0c0-a916-418d-819e-503b6cf2e1db",607:"ce934a91-04c7-426f-8f15-e0e7cf286b95",609:"1a6c4a6b-6b28-4bd7-87c9-d6b85bd5214e",610:"2521f763-4cda-4591-a900-a22b2165e0a6",611:"6a8dfea7-4502-4076-bd16-b836a8c26dd8",612:"f510a78c-c78e-4925-aa9a-f39e27e598d7",613:"af15c3bd-ba60-44ff-a3a6-b92fd7809ad6",614:"62f060d8-fe93-442f-8ee8-8fd134c62dc0",615:"c7db91ad-cca1-4b93-9d2e-7405e26fab5d",616:"3cf83603-330a-4678-b0d4-2168d2f2eaee",617:"b8f1822d-03b5-4810-bae3-26ba898324c1",618:"c73d11f1-e4b7-41d6-bf14-a7b77d9c479d",619:"a49b5e5a-be60-4e4d-bd7d-d17997631f50",620:"be90c9bf-2ec5-4056-93a1-e110fb943698",622:"ec57fae7-32d4-47e6-8d8d-7e29facca662",623:"02fdb444-8d07-4d29-a6e0-d838bd055fd2",624:"e60eb95d-edd6-4059-aa5f-277638962bf4",625:"b1c32946-40e5-4300-a9e1-ffebeca08c8d",626:"071a9314-cf6e-4f72-96e3-1178184c8740",627:"d7f0d300-5a11-402c-8e3f-19799012508b",628:"58577cd9-84d6-4ed6-aecb-a29fb9caaee4",629:"fcae3fa5-7f32-4534-a4f5-b681d2703bdb",630:"6caba0df-9b6b-492c-afeb-b99819731377",631:"21b3713a-c1fc-400e-93fd-5549bff7bbbc",632:"84d242fd-9351-49af-b7bc-80c63b642562",633:"cd7aebb2-b11c-4d0a-b42b-6375df078236",634:"77d7d87e-aee7-4586-88fb-b32c02aba256",635:"9b53da2f-8af0-4c29-801e-5572b4069455",636:"533091ab-295a-4cfe-8125-bb510b2f2642",638:"ecf56d28-6b95-4e39-add2-2527fae268b4",639:"956e86c9-3164-409d-9601-4ee7a68f22ff",640:"5f0eacd7-0dcd-4326-9856-4a20f3601365",641:"0b472392-029d-4f18-b03a-30585867d61c",642:"69653e47-a7bd-4d50-9d61-5e472da55d51",643:"6c070d30-d2d9-4f65-ba99-0e0c593e0374",644:"c9d43dce-e6fe-4893-be1a-57c7bd5d199c",645:"aba58103-a05e-47e6-90fb-8dcf6f46756b",647:"37a4238b-4bcf-4da7-9853-d249281c53fc"}},29738:(q,K,z)=>{"use strict";z.d(K,{s:()=>J,O:()=>st});var Y=z(8674),Q=z(62459),X=z(86663);const Z=(0,z(77601).gb)({key:"rpg-game-locale-control",activateAssociatedExperiments:0,default:{enabled:!1}});var J,tt=z(35120),et=z(76277),it=z(19850);!function(q){q.EnUs="en-us",q.Es="es",q.PtBr="pt-BR",q.DeDe="de",q.FrFr="fr",q.JaJp="ja"}(J||(J={}));class st{static get localeCode(){return this._localeCode}static determineLocale(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=X.qg(window.location.search);if(st.setLocaleCodeByString(null!==(q=K.locale)&&void 0!==q?q:K.lang))return;const z=yield this.getLocaleFromGraphQL();st.setLocaleCodeByString(z)}))}static setHTMLLangAttribute(q){document.documentElement.lang=q}static setLocaleCodeByString(q){var K;const z=null!==(K=null==q?void 0:q.toLowerCase())&&void 0!==K?K:"";if(this.isValidLocale(z))return this._localeCode=z,this.setHTMLLangAttribute(this._localeCode),!0;const Y=`${z.split("-")[0]}-`;for(const Q of Object.values(J))if(Q.startsWith(Y))return this._localeCode=Q,this.setHTMLLangAttribute(this._localeCode),!0;return!1}static isEnglishLocale(){return this._localeCode===J.EnUs}static isValidLocale(q){return Object.values(J).includes(q)}static getLocaleFromGraphQL(){return(0,Y.sH)(this,void 0,void 0,(function*(){try{const q=tt.q.instance.prodigy.gameContainer.get("271-f034");yield q.loginPromise;const K=tt.q.instance.prodigy.gameContainer.get("800-a786");return(yield K.sendRequest("query PlayerLocale { viewer { languageTag } }")).data.viewer.languageTag}catch(e){return void Q.RQr.logError(e,"Error fetching locale from GraphQL")}}))}static tryApplyLocaleOverrideFromFeatureProvider(){const q=(0,et.G)(Z);if(q.enabled&&Q.Aq$.isDefined(q.overrideLocale)){if(st.setLocaleCodeByString(q.overrideLocale)){const q=new it.K(st.localeCode);tt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).setDataSource(q)}}}}st._localeCode=J.EnUs},34829:(q,K,z)=>{"use strict";z.d(K,{A:()=>X,s:()=>Q});var Y=z(62459);class Q{static get(q){return this.constants[q]}static set(q,K){this.constants[q]=K}static setLogLevel(q){if("number"==typeof q)Y.VyI.setLogLevel(q);else switch(q){case"dev":case"verbose":case"all":Y.VyI.setLogLevel(Y.$bb.Verbose);break;case"warn":Y.VyI.setLogLevel(Y.$bb.Warning);break;case"error":default:Y.VyI.setLogLevel(Y.$bb.Error)}}static setDrops(q,K){0}static setSpawnRandomization(q){0}static getSpawnRandomization(){return!1}static setGameConstant(q,K){this.constants[q]=K}static addExperimentConstant(q){0}static setNFactor(q){0}static setCrit(q){0}static setEscapeChance(q){0}static setBench(q){0}static scaleEncounterDistance(q){0}static setRespawnTime(q=120){0}static getGameSpeed(){0}static setGameSpeed(q){0}static setFeedLimit(q){0}static overrideUserRank(q){0}static overrideUserPoints(q){0}static setUnlimitedWheelSpins(q){0}static setWheelSpinDuration(q){0}static setMonsterRadiusVisible(q){0}static setMonsterSpawnDebugLogging(q=!0){0}static setMaintainAspectRatio(q){0}static overrideLastLogin(q){0}static overrideDateToday(q){0}static resetMaxPlayerLimit(){return!!Q.isMaxOnScreenOrigSet&&(this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"]=Q.maxOnScreenPlayersMobileOrig,this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]=Q.maxOnScreenPlayersPCOrig,!0)}static setMaxPlayerLimit(q){Q.isMaxOnScreenOrigSet||(Q.isMaxOnScreenOrigSet=!0,Q.maxOnScreenPlayersMobileOrig=this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"],Q.maxOnScreenPlayersPCOrig=this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]),Y.o5U.isMobile()?this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"]=q:this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]=q}static getMaxPlayerLimit(){return Y.o5U.isMobile()?this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"]:this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]}static setKillGore(q){0}static setForceCast(q){this.constants["GameConstants.Battle.FORCE_CAST"]=q}static setForceOpponentCast(q){0}static setMorphDuration(q){0}static setCharacterCreationDate(q,K,z,Y=0,Q=0){0}static setSplitTestLane(q){this.constants["GameConstants.Features.SplitTests.DEBUG_LANE"]=q}static setHardCodedItemTablesAwardAll(q){0}static getHardCodedItemTablesAwardAll(){return!1}static setFreeBattleRewards(q){0}static setMemberBattleRewards(q){0}static getFreeBattleRewards(){return null}static getMemberBattleRewards(){return null}}Q.constants=window.__PNP_CONSTANTS_RAW__={"GameConstants.Build.VERSION":"2026.26.0","GameConstants.Build.SHOW_FPS":!1,"GameConstants.Build.SHOW_DEBUG_VALUES":[],"GameConstants.Build.MUTE_BGM":!1,"GameConstants.Build.FRAMEWORK_LOG_LEVEL":2,"GameConstants.Build.ASSETS_LOCATION":"https://cdn.prodigygame.com/game/assets/","GameConstants.Build.ASSETS_FOLDER":"v1_cache","GameConstants.Build.TELEPORT":"","GameConstants.Build.QUEST":[],"GameConstants.Build.ITEM_TYPE":[],"GameConstants.Build.KILL_GORE":!1,"GameConstants.Build.EASY_MODE":!1,"GameConstants.Build.MEMBERSHIP":!1,"GameConstants.Build.SCALE_MODE":0,"GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_LIMIT":20,"GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_RENABLE":25,"GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC":30,"GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE":20,"GameConstants.Build.MAX_ON_SCREEN_FPS_LIMITED":5,"GameConstants.Build.MIN_ON_SCREEN_PLAYERS":5,"GameConstants.Build.SKIN_FOREGROUND_FPS_THRESHOLD_LIMIT":25,"GameConstants.Build.ENABLE_FRAMERATE_METRICS":!0,"GameConstants.Build.ENABLE_LOADING_METRICS":!0,"GameConstants.Build.ENABLE_ADVANCED_METRICS":!0,"GameConstants.Build.DRAW_TRIGGERS":!1,"GameConstants.Tower.MAX_FREE_MEMBER_FLOOR":5,"GameConstants.Debug.AUTOSAVE_ENABLED":!0,"GameConstants.Debug.POPUPS_ENABLED":!0,"GameConstants.Debug.PLAYER_CARDS_ENABLED":!0,"GameConstants.Debug.ENABLE_MAP":!1,"GameConstants.Debug.BYPASS_ENTRY_SCREENS":!1,"GameConstants.Debug.GET_PET":[],"GameConstants.Debug.SET_LEVEL":0,"GameConstants.Debug.DISABLE_ACHIEVEMENTS":!1,"GameConstants.Debug.GET_GOLD":0,"GameConstants.Debug.GET_SPELL":0,"GameConstants.Debug.COMPLETE_TUTORIAL":!1,"GameConstants.Debug.FORCE_DROPS":[],"GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE":1,"GameConstants.Debug.MONSTER_RESPAWN_TIME":120,"GameConstants.Debug.WIZARDS_ENABLED":!0,"GameConstants.Debug.AUTO_RESOLVE_BATTLES_ENABLED":!1,"GameConstants.Debug.GAME_SPEED":1,"GameConstants.Debug.FAST_GAME_SPEED":0,"GameConstants.Debug.FSM_LOGGING":!1,"GameConstants.Debug.DEBUG_LOCALIZATION":!1,"GameConstants.Debug.VERBOSE_LOCALIZATION":!1,"GameConstants.Debug.AUTO_RESOLVE_TOWER_BATTLES_ENABLED":!1,"GameConstants.Debug.EDUCATION_ENABLED":!0,"GameConstants.Debug.EDUCATION_LOGGING_ENABLED":!1,"GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT":1,"GameConstants.Debug.UNLIMITED_WHEEL_SPINS":!1,"GameConstants.Debug.SKIP_MEMBERSHIP_WEBSITE":!1,"GameConstants.Debug.GIVES_MEMBERSHIP_AFTER_SKIP_WEBSITE":!1,"GameConstants.Debug.MONSTER_RADIUS_VISIBLE":!1,"GameConstants.Debug.MONSTER_SPAWN_LOGGING_ENABLED":!1,"GameConstants.Debug.CLOSE_BATTLE_RESULTS_SCREEN":!1,"GameConstants.Debug.ADD_FAKE_PLAYERS_TO_SCREEN":0,"GameConstants.Debug.WINNER_EVERY_TIME":!1,"GameConstants.Debug.DEBUG_TEST_SCREEN":!1,"GameConstants.Debug.NEXT_SKILL_ID":void 0,"GameConstants.Debug.PA_COOLDOWN_EXPIRED":void 0,"GameConstants.Debug.DEPRECATED_IOS":!1,"GameConstants.Debug.SCHOOL_START_HOUR":8,"GameConstants.Debug.SCHOOL_END_HOUR":16,"GameConstants.Debug.USER_DATA_PLATFORM":void 0,"GameConstants.Mailer.TEST_MAIL":!1,"GameConstants.FriendsList.TEST_FRIENDS_LIST":!1,"GameConstants.Debug.ENV_URL":"","GameConstants.Features.ENABLE_HOUSE_MOVING":!0,"GameConstants.Features.Wheel.COOLDOWN":5,"GameConstants.Features.Wheel.DEFAULT_SPINS":1,"GameConstants.Features.Wheel.MEMBER_SPINS":2,"GameConstants.Features.Wheel.SPIN_TIME":15e3,"GameConstants.Features.SplitTests.PLAY_AT_HOME":!0,"GameConstants.Features.SplitTests.CHARACTER_CREATION_TIME":0,"GameConstants.Features.LevelLock.ACADEMY":15,"GameConstants.Features.ParentLink.TIMEOUT":864e5,"GameConstants.Features.DailyQuestions.NOTIFICATION_TIMEOUT":9e5,"GameConstants.Features.ENABLE_MONSTER_SPAWNING":!0,"GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE":.05,"GameConstants.Battle.MEMBER_STARS_PERCENTAGE":.5,"GameConstants.Battle.MAX_NUM_PETS":1,"GameConstants.Battle.ATTACK_DAMAGE_OVERRIDE":null,"GameConstants.Battle.ESCAPE_CHANCE":.75,"GameConstants.Battle.CATCH_COST":50,"GameConstants.Battle.CATCH_COST_GOLD":500,"GameConstants.Battle.ALWAYS_SWITCH":!1,"GameConstants.Battle.FORCE_CAST":-1,"GameConstants.Battle.FORCE_OPPONENT_CAST":-1,"GameConstants.Battle.ENEMY_ACCURACY_OVERRIDE":-1,"GameConstants.Battle.SET_BENCH":null,"GameConstants.Battle.FORCE_TARGETING_ENABLED":!1,"GameConstants.Battle.AUTOMATION_ACTIONS":[],"GameConstants.Battle.AUTO_ATTACK_ENABLED":!1,"GameConstants.Battle.AUTO_ATTACK_PAUSE":!1,"GameConstants.Battle.AUTO_ATTACK_TARGET":0,"GameConstants.Battle.SKIP_ENEMY_TURN":!1,"GameConstants.Battle.SKIP_PLAYER_TURN":!1,"GameConstants.Battle.HIDE_TEMP_HEALTHBAR":!1,"GameConstants.Battle.SHOW_HITBOXES":!1,"GameConstants.Mira.MAX_HP":1e5,"GameConstants.Mira.DIFFICULTY":10,"GameConstants.Grandoff.MAX_HP":12e3,"GameConstants.Grandoff.DIFFICULTY":3,"GameConstants.Pippet.MAX_HP":null,"GameConstants.Pippet.DIFFICULTY":3,"GameConstants.Cebollini.MAX_HP":null,"GameConstants.Cebollini.DIFFICULTY":8,"GameConstants.ShadowGerald.MAX_HP":null,"GameConstants.ShadowGerald.DIFFICULTY":7,"GameConstants.Gerald.MAX_HP":null,"GameConstants.Gerald.DIFFICULTY":8,"GameConstants.OldOne.MAX_HP":null,"GameConstants.OldOne.DIFFICULTY":8,"GameConstants.IceWyrm1.MAX_HP":null,"GameConstants.IceWyrm1.DIFFICULTY":8,"GameConstants.IceWyrm2.MAX_HP":null,"GameConstants.IceWyrm2.DIFFICULTY":8,"GameConstants.FrostyStorm.MAX_HP":null,"GameConstants.FrostyStorm.DIFFICULTY":8,"GameConstants.StormyStorm.MAX_HP":null,"GameConstants.StormyStorm.DIFFICULTY":8,"GameConstants.RainyStorm.MAX_HP":null,"GameConstants.RainyStorm.DIFFICULTY":8,"GameConstants.SandyStorm.MAX_HP":null,"GameConstants.SandyStorm.DIFFICULTY":8,"GameConstants.Inactivity.DIALOG_TIMER_SECONDS":1500,"GameConstants.Inactivity.LOG_OUT_TIMER_SECONDS":300,"GameConstants.Inactivity.CANNOT_CONNECT_TIMER_SECONDS":120,"GameConstants.Inactivity.NETWORK_BOOT_TIMER_SECONDS":6e4,"GameConstants.Audio.DEFAULT_SOUND_VOLUME":.5,"GameConstants.Audio.DEFAULT_MUSIC_VOLUME":.25,"GameConstants.Audio.DEFAULT_VOICE_VOLUME":.5,"GameConstants.LocationSelection.NONE":"none","GameConstants.LocationSelection.HOME":"home","GameConstants.LocationSelection.SCHOOL":"school","GameConstants.PVP.INVITE_TIMEOUT":6e4,"GameConstants.PVP.OVERRIDE_USER_RANK":null,"GameConstants.PVP.OVERRIDE_USER_POINTS":null,"GameConstants.PVP.OVERRIDE_USER_LEADERBOARD":null,"GameConstants.PVP.BOT_TEAM":null,"GameConstants.PVP.TIMER_ENABLED":!0,"GameConstants.PVP.STARS_PER_QUESTION":10,"GameConstants.TITAN.HP_MULTIPLIER":1.5,"GameConstants.CO_OP_TITAN.TITAN_HP":10,"GameConstants.CO_OP_TITAN.CRYSTAL_HP":5,"GameConstants.CO_OP_TITAN.ATTACK_FREQUENCY":2,"GameConstants.CO_OP_TITAN.TITAN_DIFFICULTY":5,"GameConstants.CO_OP_TITAN.TITAN_BOUNTY":10,"GameConstants.CO_OP_TITAN.HOST_HEARTBEAT_TIME":5e3,"GameConstants.CO_OP_TITAN.CLIENT_HEARTBEAT_TIMEOUT":2e4,"GameConstants.DailyQuestions.OVERRIDE_LAST_LOGIN":-1,"GameConstants.DailyQuestions.OVERRIDE_DATE_TODAY":-1,"GameConstants.MorphMarbles.MORPH_DURATION_OVERRIDE":null,"GameConstants.Network.CORTEX_ROOT":void 0},Q.isMaxOnScreenOrigSet=!1,Q.DAY_IN_MS=864e5,Q.HOURS_IN_MS=36e5,Q.MINUTES_IN_MS=6e4,Q.SECONDS_IN_MS=1e3,Q.MAX_SAFE_INTEGER=9007199254740991,Q.TOWER_COMMON_ROOM_SHORTFORM="CR",Q.TOWER_WARDEN_ROOM_SHORTFORM="WR",Q.TARGET_FPS_40_MS=25,Q.SECONDS_TO_MILLISECONDS_MULTIPLIER=1e3;const X=Q},84643:(q,K,z)=>{"use strict";z.d(K,{h:()=>Z});var Y=z(8674),Q=z(79687),X=z(13956);let Z=class{debugSetConstant(q,K){0}get spawnCooldownDurationSeconds(){return this._encounterConstantsProvider.constants.spawnCooldownDuration}get weightedEncounterLevelProbabilities(){const q=this._encounterConstantsProvider.constants;return{same:q.spawnLevelChanceSame,lower:q.spawnLevelChanceLower,higher:q.spawnLevelChanceHigher}}get weightedBenchLevelProbabilities(){const q=this._encounterConstantsProvider.constants;return{same:q.benchLevelChanceSame,lower:q.benchLevelChanceLower,lowest:q.benchLevelChanceLowest}}get threatIndicatorLevel(){return this._encounterConstantsProvider.constants.threatIndicatorLevel}get encounterRatesPerDifficultyModeAndRarity(){return this._encounterConstantsProvider.constants.encounterRatesPerRarity}get encounterRatesPerDifficultyModeAndEvolutionTier(){return this._encounterConstantsProvider.constants.encounterRatesPerEvolutionTier}};(0,Y.Cg)([(0,X.b)("c77-8fb9"),(0,Y.Sn)("design:type",Object)],Z.prototype,"_encounterConstantsProvider",void 0),Z=(0,Y.Cg)([(0,Q.injectable)()],Z)},19850:(q,K,z)=>{"use strict";z.d(K,{K:()=>Z});var Y,Q=z(62459);!function(q){q.LocalizedText_csv="fc0987d5-cf10-4938-851b-164d261a026a"}(Y||(Y={}));var X=z(23029);class Z{constructor(q){this.dataLoadPromise=new Q.bnh,X.R.loadExternalData(Y.LocalizedText_csv,{tag:q,isCancellable:!1}).then((q=>{this._languageData=q,this.dataLoadPromise.resolve()})).catch((q=>{Q.RQr.logError(q,"Failed to load local localization data"),this.dataLoadPromise.reject(q)}))}getValue(q){return this._languageData?this._languageData[q]:(Q.VyI.log(`Language data not yet available. Failed to fetch key ${q}`,Q.$bb.Warning),null)}}},23029:(q,K,z)=>{"use strict";z.d(K,{R:()=>tt});var Y=z(8674),Q=z(62459);const X=JSON.parse('{"c56d5e8f-8ae7-4fe2-9771-58bd051834ca":{"battleConstants":{"baseLevelMinimum":1,"baseLevelMaximum":100,"baseLevelMaximumConfig":{"regular":100,"hard":150,"expert":200},"aoaSpellId":"1100","rescueSpellId":"1101","fumbleSpellId":"1103","multipliers":{"physical":1,"stabElement":0,"criticalHit":0.5,"finalDamage":1,"mythicDamage":1,"mythicHealth":2.5,"enemyNerf":{"min":0.72,"bonus":0.28},"hitChanceScaling":{"chanceHitOffset":0.780214333333333,"chanceHitCoefSquared":0.00000372024,"chanceHitCoefPrime":0.0013244}},"minimumHitChance":0.55,"maximumHitChance":1,"primaryStatModifier":{"tier1":0.25,"tier2":0.4},"secondaryStatModifier":{"tier1":0.15,"tier2":0.25},"equipmentModifierBaseValues":{"health":500,"power":200},"divisors":{"level":25,"aoa":3,"physical":4,"magical":2,"speedCrit":13650,"enemyNerf":34,"mergeRank":10},"damageRange":{"aoa":{"min":100,"max":9999},"spell":{"min":1,"max":9999}},"elementalMultiplier":[{"name":"physical","weakness":"neutral","resistance":"neutral","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":1,"water":1,"neutral":1}},{"name":"fire","weakness":"water","resistance":"ice","data":{"astral":1,"fire":1,"ice":1.75,"physical":1,"plant":1,"shadow":1,"storm":1,"water":0.571428571,"neutral":1}},{"name":"ice","weakness":"fire","resistance":"plant","data":{"astral":1,"fire":0.571428571,"ice":1,"physical":1,"plant":1.75,"shadow":1,"storm":1,"water":1,"neutral":1}},{"name":"plant","weakness":"ice","resistance":"storm","data":{"astral":1,"fire":1,"ice":0.571428571,"physical":1,"plant":1,"shadow":1,"storm":1.75,"water":1,"neutral":1}},{"name":"storm","weakness":"plant","resistance":"water","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":0.571428571,"shadow":1,"storm":1,"water":1.75,"neutral":1}},{"name":"water","weakness":"storm","resistance":"fire","data":{"astral":1,"fire":1.75,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":0.571428571,"water":1,"neutral":1}},{"name":"shadow","weakness":"astral","resistance":"astral","data":{"astral":1.45,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":1,"water":1,"neutral":1}},{"name":"astral","weakness":"shadow","resistance":"shadow","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1.45,"storm":1,"water":1,"neutral":1}},{"name":"neutral","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":1,"water":1,"neutral":1}}],"rescue":{"damageThreshold":0.5},"minPlayerHeartsOnEndBattle":20,"ai":{"accuracyPenalty":{"max":0.3,"levelCap":30},"fumbleChanceIncrease":0.05},"difficultyStreak":{"min":-3,"max":2},"difficultyStreakBench":{"min":-1,"max":5},"difficultyStreakLoseStep":0.05,"difficultyStreakWinStep":0.025,"xp":{"base":10,"miniBoss":25,"singularBoss":100,"repeatableBoss":75,"illusionBoss":333,"finalBoss":1000,"cloakedWizard":20,"pippet":25,"mythic":30,"titan":30},"spawns":{"spawnLevelChanceSame":0.5,"spawnLevelChanceHigher":0.2,"spawnLevelChanceLower":0.3,"benchLevelChanceSame":0.45,"benchLevelChanceLower":0.35,"benchLevelChanceLowest":0.25,"spawnCooldownDuration":660,"threatIndicatorLevel":2,"encounterRatesPerRarity":{"regular":{"0":0.45,"1":0.35,"2":0.1,"3":0.07,"4":0.03},"hard":{"0":0.1,"1":0.2,"2":0.5,"3":0.15,"4":0.05},"expert":{"0":0.06,"1":0.12,"2":0.42,"3":0.25,"4":0.15}},"encounterRatesPerEvolutionTier":{"regular":{"1":1.5,"2":1.25,"3":1,"4":0},"hard":{"1":1,"2":1.25,"3":1,"4":0},"expert":{"1":1,"2":1.15,"3":1.5,"4":0}}},"unitStatDefaults":{"initiative":5}}},"3bf8a670-5afc-4113-8d51-eec627555d6a":{"ID":1,"name":"Rift Key 1","data":{"rarity":2}},"38f2fe53-fe57-4046-b642-cbf34807ddfb":{"ID":2,"name":"Rift Key 2","data":{"rarity":2}},"478eefb5-a10f-41c1-abb2-7b4a38d17193":{"ID":3,"name":"Rift Key 3","data":{"rarity":2}}}');var Z=z(35120),J=z(95925);class tt{static get _assetLoader(){var q;return null!==(q=this._cachedAssetLoader)&&void 0!==q?q:this._cachedAssetLoader=Z.q.instance.prodigy.gameContainer.get(Q.t5G.AssetLoader)}static get dataBundleLoadPromise(){return this._dataBundleLoadPromise}static initialize(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this._assetLoader.loadAssets([this.BUNDLE_ASSET_ID]),this._dataBundle=this._assetLoader.getAsset(this.BUNDLE_ASSET_ID,J.i.JSON),this._dataBundleLoadPromise.resolve()}))}static loadData(q){var K;return null!==(K=X[q])&&void 0!==K?K:this._dataBundle[q]}static loadExternalData(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z;const Y=K.tag?`${q}_${K.tag}`:q;return null===(z=K.isCancellable)||void 0===z||z?yield this._assetLoader.loadAssets([Y]):yield this._assetLoader.loadAssetsNotCancellable([Y]),this._assetLoader.getAsset(Y,J.i.JSON)}))}}tt.BUNDLE_ASSET_ID="clientBundledData",tt._dataBundleLoadPromise=new Q.bnh},43846:(q,K,z)=>{"use strict";z.d(K,{k:()=>Z});var Y=z(62459),Q=z(35120);let X;function Z(q,...K){return null!=X||(X=Q.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService)),X.getText(q,...K)}},1195:(q,K,z)=>{"use strict";z.d(K,{E:()=>ht});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(35120),J=z(70215),tt=z(48235),et=z(73797),it=z(48813),st=z(88225),nt=z(13956),at=z(80403);class rt{get areAvailable(){return""!==this.password&&""!==this.username}get username(){var q;return null!==(q=this._username)&&void 0!==q?q:""}get password(){var q;return null!==(q=this._password)&&void 0!==q?q:""}constructor(){this.fetchLoginCredentials()}fetchLoginCredentials(){this.ready||(this.ready=new Promise(((q,K)=>{this._gqlRequestSender.sendRequest("query PlayerLoginDetails { viewer { username password } }",void 0,void 0,{retryCount:3}).then((K=>{var z,Y;if(!(null===(Y=null===(z=null==K?void 0:K.data)||void 0===z?void 0:z.viewer)||void 0===Y?void 0:Y.password))throw new Error("[Fetch Login Credentials] Login details not found in response.");this._username=K.data.viewer.username,this._password=K.data.viewer.password,q()})).catch((q=>{st.captureException(q),Q.RQr.logError(q,"Failed to get player login details"),K(new Error("Failed to get player login details."))}))})))}}(0,Y.Cg)([(0,nt.b)("800-a786"),(0,Y.Sn)("design:type",at.K)],rt.prototype,"_gqlRequestSender",void 0);var ot=z(82209);let ht=class extends ot.z{constructor(){super(...arguments),this._activeMemberships=[],this.onStatChanged=new Q.HN0}get player(){return this._player}get loginCredentials(){return this._loginCredentials}get activeMemberships(){return this._activeMemberships}initialize(q){this._player=q,Z.q.instance.game.broadcaster.addAppListener(et.H3.MembershipResponseReceived,this.refreshMembershipData,this,void 0,!0)}initLoginCredentials(){var q;this._loginCredentials=null!==(q=this._loginCredentials)&&void 0!==q?q:new rt,Promise.all([this._loginCredentials.ready,it.T.ready]).then((()=>{tt.W.checkMemberUpgradeReward().catch(Q.RQr.createHandler("Failed to check member upgrade reward")),this._player.name.setFallbackName(this._loginCredentials.username)})).catch(Q.RQr.createHandler("Failed to set fallback name for logged-in player"))}logout(){this._player&&(this._player.saveEnabled=!1,this._player=null,Z.q.instance.game.broadcaster.removeAppListener(et.H3.MembershipResponseReceived,this.refreshMembershipData,this)),this.onStatChanged.dispose()}addStars(q){const K=this._player.data.stars,z=this.getLevel(),Y=this.getBaseHearts();this._player.addStars(q),this.dispatchStatChange(J.$.Stars,this._player.data.stars,K);const Q=this.getLevel();if(Q>z){this.dispatchStatChange(J.$.Level,Q,z),this.dispatchStatChange(J.$.MaxHearts,this.getBaseHearts(),Y);const q=this._player.getBamSpells(z),K=this._player.getBamSpells(Q);for(let z=0;z{"use strict";z.d(K,{z:()=>J});var Y=z(8674),Q=z(79687),X=z(95891),Z=z.n(X);let J=class{constructor(){this._player=null}get player(){return this._player}initialize(q){this._player=q}getFirstName(){return this._player.appearance.name.getFirstName()}getMiddleName(){return this._player.appearance.name.getMiddleName()}getLastName(){return this._player.appearance.name.getLastName()}getNickname(){return this._player.appearance.name.getNickname()}getAppearance(){const q=this._player.appearance,K=this._player.equipment;return{face:q.getFace(),hair:{style:q.getHair().style,color:q.getHair().color},hat:K.getHat(),skin:q.getSkinColor(),eyeColor:q.getEyeColor(),outfit:K.getOutfit(),boot:K.getBoots(),weapon:K.getWeapon(),costume:K.getCostume()}}getStars(){return this._player.getPlayerData().stars}getUserID(){return this._player.userID}getLevel(){return this._player.getLevel()}getChargedLevel(){return this._player.getChargedLevel()}getChargedLevelCap(){return this._player.getChargedLevelCap()}getChargedLevelData(){return Z().clone(this._player.data.chargedLevelData)}getBaseHearts(){return this._player.getBaseMaxHearts(this.getLevel())}isMember(){return this._player.hasMembership()}isActivePlayer(){return!1}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},47008:(q,K,z)=>{"use strict";z.d(K,{W:()=>Z});var Y=z(8674),Q=z(79687),X=z(325);let Z=class{constructor(){this._subject=X.Q.Math}initialize(q){switch(q){case"ELA":this._subject=X.Q.ELA;break;case"SCIENCE":this._subject=X.Q.Science;break;case"MATH":default:this._subject=X.Q.Math}}getSubject(){return this._subject}};Z=(0,Y.Cg)([(0,Q.injectable)()],Z)},16571:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";var tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(8674),_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(62459),_misc_components_EComponentPath__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(28152),_IDataProviderComponent__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(44317);let DataEvalComponent=class DataEvalComponent extends _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.uAl{constructor(){super(...arguments),this.dataProviders=[],this.condition="{0} === {1}",this.evaluateOnCreate=!0,this.onTrue=new _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0,this.onFalse=new _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0,this.onResult=new _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0}create(){super.create(),this.evaluateOnCreate&&this.evaluate()}destroy(){this.onTrue.dispose(),this.onFalse.dispose(),this.onResult.dispose(),super.destroy()}evaluate(){const values=this.dataProviders.map((q=>q.getData())),windowVars={Utils:_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.Aq$},oldWindowValues={};for(const q in windowVars)oldWindowValues[q]=window[q],window[q]=windowVars[q];const finalCondition=this.condition.replace(/{(\d+)}/g,((q,K)=>`values[${K}]`)),result=eval(finalCondition);return Object.assign(window,oldWindowValues),result?this.onTrue.dispatch():this.onFalse.dispatch(),this.onResult.dispatch(result),result}};(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.SZi)(),(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.MnK)(_IDataProviderComponent__WEBPACK_IMPORTED_MODULE_2__._),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",Array)],DataEvalComponent.prototype,"dataProviders",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.W_S)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",String)],DataEvalComponent.prototype,"condition",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.vkK)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",Boolean)],DataEvalComponent.prototype,"evaluateOnCreate",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.bbQ)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0)],DataEvalComponent.prototype,"onTrue",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.bbQ)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0)],DataEvalComponent.prototype,"onFalse",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.bbQ)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0)],DataEvalComponent.prototype,"onResult",void 0),DataEvalComponent=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.EVk)("DataEval",_misc_components_EComponentPath__WEBPACK_IMPORTED_MODULE_1__.Y.data,"Evaluates conditions from data providers")],DataEvalComponent)},44317:(q,K,z)=>{"use strict";z.d(K,{_:()=>X});var Y=z(8674),Q=z(62459);let X=class extends Q.uAl{constructor(){super(...arguments),this._onDataRelay=new Q.HN0,this._relayedDataIsSpreadArray=!1}getData(){throw new Error("Method not implemented.")}relayData(){const q=this.getData();Array.isArray(q)&&this._relayedDataIsSpreadArray?this._onDataRelay.dispatch(...q):this._onDataRelay.dispatch(q)}destroy(){this._onDataRelay.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"_onDataRelay",void 0),(0,Y.Cg)([(0,Q.vkK)({toolTip:"Is the relayed data an array that should be spread when dispatched? Useful when the listener function requires multiple parameters."}),(0,Y.Sn)("design:type",Boolean)],X.prototype,"_relayedDataIsSpreadArray",void 0),X=(0,Y.Cg)([(0,Q.EVk)("IDataProviderComponent")],X)},35757:(q,K,z)=>{"use strict";z.d(K,{u:()=>Z});var Y=z(62459),Q=z(77938),X=z(88022);class Z{constructor(){this.legacyData=null,this.legacyData=z(7640)}get(q){const K=Q.t.getItem("dialogue",q);let z=null;return K?(z=K.data,""===z.avatar.frameName&&(z.avatar.frameName="face_0")):Y.VyI.log(`Failed to find dialogue item with id: ${q}`,Y.$bb.Error),z}getLegacy(q,K){let z=null;if(Y.Aq$.isDefined(this.legacyData[q])){const Q=this.legacyData[q][K];Y.Aq$.isDefined(Q)?(z=Z.createDefaultData(),z.nameKey=Z.LEGACY_ATLAS_IDS[q].name,z.avatar.atlas=Z.LEGACY_ATLAS_IDS[q].atlas,Y.Aq$.isDefined(Q.face)&&(z.avatar.frameName=`face_${Q.face}`),Y.Aq$.isDefined(Q.anim)&&(z.avatar.animationMod=`${Q.anim}`),Y.Aq$.isDefined(Q.textKey)&&(z.textKey=Q.textKey),Y.Aq$.isDefined(Q.audio)&&(z.audio.tag=Q.audio.tag,z.audio.s=Q.audio.s,z.audio.d=Q.audio.d),Y.Aq$.isDefined(Q.dimmed)&&(z.avatar.dimmed=Q.dimmed)):Y.VyI.log(`Failed to find legacy dialogue index: ${K} for key: ${q}`,Y.$bb.Error)}else Y.VyI.log(`Failed to find legacy dialogue key: ${q}`,Y.$bb.Error);return z}static createDefaultData(){return{nameKey:"",textKey:"",avatar:{atlas:"",frameName:"",animationMod:"",spineAttachment:""},audio:{tag:"",s:0,d:1}}}}Z.LEGACY_ATLAS_IDS={benni:{atlas:X._.Npc_face_benni_json,name:"NPC_NAME_BENNI"},bok:{atlas:X._.Npc_face_bok_json,name:"SHIVERCHILL_GUARDIAN"},boombox:{atlas:X._.Npc_face_boombox_json,name:"NPC_NAME_BOOMBOX"},broccolina:{atlas:X._.Npc_face_broccolina_json,name:"NPC_NAME_BROCCOLINA"},cebollini:{atlas:X._.Npc_face_cebollini_json,name:"NPC_NAME_CEBOLLINI"},clankboot:{atlas:X._.Npc_face_clankboot_json,name:"NPC_NAME_CLANKBOOT"},cumulo:{atlas:X._.Npc_face_cumulo_json,name:"NPC_NAME_CUMULO"},eugene:{atlas:X._.Npc_face_eugene_json,name:"NPC_NAME_EUGENE"},eve:{atlas:X._.Npc_face_eve_json},flora:{atlas:X._.Npc_face_flora_json,name:"NPC_NAME_FLORA"},florian:{atlas:X._.Npc_face_florian_json,name:"NPC_NAME_FLORIAN"},gale:{atlas:X._.Npc_face_gale_json,name:"NPC_NAME_GALE"},guard:{atlas:X._.Npc_face_guard_json,name:"NPC_NAME_GUARD"},harvey:{atlas:X._.Npc_face_harvey_json,name:"NPC_NAME_HARVEY"},howard_cornelius:{atlas:X._.Npc_face_howard_cornelius_json,name:"NPC_NAME_HOWARD_CORNELIUS"},julia_ghoulia:{atlas:X._.Npc_face_julia_ghoulia_json,name:"NPC_NAME_JULIA_GHOULIA"},mama_star:{atlas:X._.Npc_face_mamastar_json,name:"NPC_NAME_MAMA_STAR"},merchant:{atlas:X._.Npc_face_merchant_json,name:"NPC_NAME_MERCHANT"},mira:{atlas:X._.Npc_face_mira_json,name:"NPC_NAME_MIRA_SHADE"},morris:{atlas:X._.Npc_face_morris_json,name:"NPC_NAME_MORRIS"},"mozza-ella":{atlas:X._.Npc_face_mozza_ella_json,name:"NPC_NAME_MOZZA_ELLE"},mugs:{atlas:X._.Npc_face_mugs_json,name:"NPC_NAME_MUGS"},noot:{atlas:X._.Npc_face_noot_json,name:"NPC_NAME_NOOT"},pippet:{atlas:X._.Npc_face_pippet_json,name:"NPC_NAME_PIPPET"},puppetmaster:{atlas:X._.Npc_face_puppetmaster_raster_json,name:"NPC_NAME_PUPPETMASTER"},scoog:{atlas:X._.Npc_face_scoog_json,name:"NPC_NAME_PROFESSOR_SCOOG"},slime_guard:{atlas:X._.Npc_face_slime_guard_json,name:"NPC_NAME_GUARD_SLIME"},slime_queen:{atlas:X._.Npc_face_slime_queen_json,name:"NPC_NAME_QUEEN_GOO_LIA"},slime_worker:{atlas:X._.Npc_face_slime_worker_json,name:"NPC_NAME_WORKER_SLIME"},slurpy:{atlas:X._.Npc_face_slurpy_json,name:"NPC_NAME_SLURPY"},stache:{atlas:X._.Npc_face_stache_json,name:"NPC_NAME_STACHE"},toy:{atlas:X._.Npc_face_toy_json,name:"NPC_NAME_TOY_MERCHANT"},wizard:{atlas:X._.Npc_face_wizard_json,name:"NPC_NAME_WIZARD"},"bargo-bunny":{atlas:X._.Npc_face_bargo_bunny_json,name:"NPC_NAME_BARGO"},"don-zorro":{atlas:X._.Npc_face_don_zorro_json,name:"NPC_NAME_DON_ZORRO"},verna:{atlas:X._.Npc_face_verna_json,name:"NPC_NAME_VERNA"},harriet:{atlas:X._.Npc_face_harriet_json,name:"NPC_NAME_HARRIET_HOOD"},"sir-vey":{atlas:X._.Npc_face_sir_vey_json,name:"NPC_NAME_SIR_VEY"},potion:{atlas:X._.Npc_face_potion_json,name:"NPC_NAME_SCIENTIST_SLIME"},windsail:{atlas:X._.Npc_face_windsail_json,name:"NPC_NAME_EVE"},swoopy:{atlas:X._.Npc_face_swoopy_json,name:"NPC_NAME_SWOOPY"},jim:{atlas:X._.Npc_face_jim_json,name:"NPC_NAME_JELLY_JIM"},fishthing:{atlas:X._.Npc_face_fishthing_json,name:"NPC_NAME_MERCHANT"}}},23034:(q,K,z)=>{"use strict";z.d(K,{s:()=>at});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z(64794),tt=z(52498),et=z(44094),it=z(21314),st=z(34829),nt=z(77938);let at=class{constructor(q,K){this.assets=null,this.assets={},q.getCurrentEnvironment()!==tt.h.QABox&&(this.assets["feature-flag-data"]={type:"json",fullURL:`${K.getCDNRootUrl()}/flags/${q.getEnvironmentString()}/prodigy-game.json`})}getAsset(q){const K=this.findAsset(q);if(K)return K;let z=null,Y=null;const X=0===q.indexOf("horizontal-dorm")||0===q.indexOf("vertical-dorm")||0===q.indexOf("sheets-dorm"),tt=0===q.indexOf("default-pet-")||0===q.indexOf("reduced-pet-")||0===q.indexOf("small-pet-"),it=0===q.indexOf("male-outfit-")||0===q.indexOf("female-outfit-"),st=0===q.indexOf("above-mount-")||0===q.indexOf("below-mount-"),at=q.indexOf("tt-deco")>-1;if(0===q.indexOf("icon-")){if(z=q.split("-"),z.length>2)if("storeTab"===z[1]){const K=this.getAsset(`singleImage-${parseInt(z[2])+22}`);this.assets[q]={type:"singleImage",v:Z.get(K,"metadata.v",1),key:q}}else Y=nt.t.getItemMetadata(z[1],parseInt(z[2])),this.assets[q]={type:"singleImage",v:Z.get(Y,"vIcon",1)}}else if(X||tt||it||st||0===q.indexOf("default-boss-")||0===q.indexOf("default-follow-")||0===q.indexOf("default-titan-"))z=q.split("-"),z.length>2&&(Y=nt.t.getItemMetadata(z[1],parseInt(z[2])),Q.Aq$.isDefined(Y)&&(this.assets[q]=Y.assets[z[0]]));else if(0===q.indexOf("default-emote-"))z=q.split("-"),z.length>2&&(Y=nt.t.getItemMetadata(z[1],parseInt(z[2])).assets[z[0]],Q.Aq$.isDefined(Y)&&(this.assets[q]={type:Y.type,v:Q.Aq$.isDefined(Y)&&Q.Aq$.isDefined(Y.v)?Y.v:1}));else if(at){const K=q.substring(0,q.length-5),z=nt.t.getItemsWithFilter(J.D.ASSET_TYPE_DECORATION,(q=>q.data.tag===K));1===z.length&&(this.assets[q]={type:"singleImage",v:Z.get(z[0].metadata,"vIcon",1)})}else et.$.containsURL(q)?(z=q.split("-"),z.length>1&&(this.assets[q]={type:z[0],fullURL:z.slice(1).join("-")})):this.assets[q]={};return this.assets[q]}findAsset(q){var K,z,Y,X,Z,J,tt,et,it,st,nt;let at=this.assets[q];if(!at){const rt=null===(K=window.legacyAssetMappings)||void 0===K?void 0:K[q];rt&&(at=this.assets[rt]),at?(at.guidMapping=rt,"tileset"===at.type&&(at.w||(at.w=null!==(X=null===(Y=null===(z=null==at?void 0:at.data)||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.w)&&void 0!==X?X:null!==(J=null===(Z=null==at?void 0:at.data)||void 0===Z?void 0:Z.w)&&void 0!==J?J:40),at.h||(at.h=null!==(it=null===(et=null===(tt=null==at?void 0:at.data)||void 0===tt?void 0:tt.data)||void 0===et?void 0:et.h)&&void 0!==it?it:at.h=null!==(nt=null===(st=null==at?void 0:at.data)||void 0===st?void 0:st.h)&&void 0!==nt?nt:40))):Q.VyI.log(`No legacy asset mapping found for ${q}`,Q.$bb.Warning)}return at}getImageBounds(q){const K=this.getAsset(q);return Q.Aq$.isDefined(K)?[K.x,K.y,K.w,K.h]:[0,0,0,0]}getImagePivots(q){const K=this.getAsset(q);if(Q.Aq$.isDefined(K)){return[Q.Aq$.isDefined(K.pivotX)?K.pivotX:null,Q.Aq$.isDefined(K.pivotY)?K.pivotY:null]}return[null,null]}assignAssets(q){for(const K in q)Q.Aq$.isDefined(K)&&0!==K.length&&"undefined"!==K&&(this.assets[K]=q[K])}};at.ASSET_FOLDER=st.s.get("GameConstants.Build.ASSETS_FOLDER"),at.VERBOSE_LOGGING=!1,at=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("92f-3441")),(0,Y.Qj)(1,(0,X.inject)("ddf-6c82")),(0,Y.Sn)("design:paramtypes",[Object,it.p])],at)},40549:(q,K,z)=>{"use strict";z.d(K,{r:()=>Q});var Y=z(50654);class Q{static isPotionConsumable(q){return q.type===Y.V.Potion}static isFoodConsumable(q){return q.type===Y.V.Food}}},34992:(q,K,z)=>{"use strict";z.d(K,{g:()=>mt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z(20748),tt=z(99625),et=z(51151),it=z(65240),st=z(65050),nt=z(35120),at=z(51477),rt=z(73797),ot=z(23891),ht=z(57324),ct=z(95057),dt=z(98252),lt=z(53452),ut=z(47255),ft=z(10312),bt=z(4631),pt=z(88701),vt=z(77938);function gt(q,K){q[K].functionName=K}let mt=class{constructor(q,K){this.game=null,this.localizer=null,this.membershipParentOpen=!1,this.game=q,this.localizer=K}runFunction(q,K,z,Y,X){this.doesFunctionExist(q)?this[q].apply(this,[K,z,Y,X]):Q.VyI.log(`Error ${q} not found in MailerMethods`,Q.$bb.Verbose)}doesFunctionExist(q){return Q.Aq$.isDefined(this[q])}openStore(q){nt.q.instance.prodigy.open.store(parseInt(q[0]))}singleUseGotItem(q,K,z,Y){const Q=K=>{const Q=Y&&Y.length>0?Y[0]:null;nt.q.instance.prodigy.open.gotItem(K,Q,void 0,void 0,void 0,void 0,this.getCustomItemReceivedSegmentData(q,z)),this.game.broadcaster.broadcast(rt.zr.GiftBoxOpened,rt.HG.Mailer,[]),this.game.broadcaster.broadcast(rt.zr.MarkAsRead,rt.HG.MailView,[void 0,z])};if(lt.b.isDebugMailData(z))Q(K);else{nt.q.instance.prodigy.gameContainer.get("cc0-46e9").collectMailRewards(z).then((q=>{Q(lt.b.mergeSecureUnsecure(q.rewards,q.unsecuredRewards))})).catch((q=>{nt.q.instance.prodigy.open.message(this.localizer.getText("ERROR_DIALOG_BODY"))}))}}openGiftBox(q,K,z){if(this.game.broadcaster.broadcast(rt.zr.GiftBoxOpened,rt.HG.Mailer,[]),lt.b.isDebugMailData(z))nt.q.instance.prodigy.open.reward(z,K);else{nt.q.instance.prodigy.gameContainer.get("cc0-46e9").collectMailRewards(z).then((q=>{nt.q.instance.prodigy.open.reward(z,lt.b.mergeSecureUnsecure(q.rewards,q.unsecuredRewards))})).catch((q=>{nt.q.instance.prodigy.open.message(this.localizer.getText("ERROR_DIALOG_BODY"))}))}}openMembershipSignUp(){const q=nt.q.instance.prodigy.gameContainer;if(q.get("20f-5f67").purchase.sendFunnelStart({type:"Click-Member-Box-Mail",category:"Mailbox",contentId:void 0,adType:ct.R.Alternative}),!this.membershipParentOpen){this.membershipParentOpen=!0;nt.q.instance.prodigy.open.membershipParent(void 0,{conversionFunnelName:ut.o.FunnelClickMemberBoxMail,conversionStaticOrVideo:ct.R.Alternative}).onClose=()=>{this.membershipParentOpen=!1,q.get("20f-5f67").purchase.sendFunnelQuit("Purchase-Handoff","Close-Clicked")}}}openWizardNameSelector(q,K,z,Y){const Q=Y.pop(),X=Y.pop();nt.q.instance.prodigy.open.wizardNameSelector(!0,X,Q)}openPromoPetEgg(q,K,z,Y){nt.q.instance.prodigy.gameContainer.get("20f-5f67").yourMail.sendOpenEpicSelectorEvent(z.id);const Q=Y&&Y.length>0?Y[0]:null,X=nt.q.instance.prodigy.open.prefabMenu(tt.l.LegacyEpicsChoicePopup);X.onPrefabLoaded.addOnce((q=>{const Y=new pt.C,[J,tt]=Z.partition(K,(q=>Y.getOwnedCount(q.type,q.ID)>0)),et=tt.concat(J).slice(0,3).map((q=>q));q.findComponentInChildren(ht.m).setItems(et);const it=q.findComponentInChildren(ot.f);it.onItemAwarded.addOnce(((q,K,Y)=>{this.game.broadcaster.broadcast(rt.zr.GiftBoxOpened,rt.HG.Mailer,[]),this.game.broadcaster.broadcast(rt.zr.MarkAsRead,rt.HG.MailView,[void 0,z]),nt.q.instance.prodigy.gameContainer.get("20f-5f67").yourMail.sendClosedEpicSelectorEvent(et.map((q=>q.ID)),K)})),it.onComplete.addOnce((()=>{X.close(),null==Q||Q()}))}))}openLink(q,K,z,Y){const X=Y&&Y.length>0?Y[0]:null;dt.pF.isNativeApp()||Q.o5U.isMobile()?nt.q.instance.prodigy.open.message(this.localizer.getText("OPEN_URL_IN_APP")):Q.Aq$.isDefined(q[0])?nt.q.instance.prodigy.open.messageBox(this.localizer.getText("NOW_LEAVING_PRODIGY"),(()=>{X&&X(),ft.I.openWebsite(q[0])})):Q.VyI.log("ERROR: Not a valid link!",Q.$bb.Verbose)}openLinkAtHome(q,K,z,Y){nt.q.instance.prodigy.classModeController.isClassMode()?nt.q.instance.prodigy.open.message(this.localizer.getText("OPEN_URL_AT_HOME")):this.openLink(q,K,z,Y)}teleport(q){const K=q[0].split("-");nt.q.instance.prodigy.classModeController.isLockedZone(K[0])?nt.q.instance.prodigy.classModeController.onClassMode(K[0]):this.handleLeaving((()=>{nt.q.instance.prodigy.world.it.call(nt.q.instance.prodigy.world,...q)}))}openChargedLevelsTutorial(q,K,z,Y){const X=Y.shift();Q.VyI.log("[openChargedLevelsTutorial] called",Q.$bb.Verbose),X()}goToTitanMap(){nt.q.instance.prodigy.titansNetworkHandler.titan?nt.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?this.gotTitan(nt.q.instance.prodigy.titansNetworkHandler.titan):this.showTitanErrorMessage():(this.game.broadcaster.addAppListener(rt.RZ.GotTitans,this.gotTitan.bind(this),this,"Titan"),nt.q.instance.prodigy.titansNetworkHandler.getTitans())}gotTitan(q){if(this.game.broadcaster.removeAppListener(rt.RZ.GotTitans,this,"Titan"),q){const K=vt.t.getItem("titan",q.assetID);Q.Aq$.isDefined(K)&&this.handleLeaving((()=>{nt.q.instance.prodigy.world.it(`${K.data.zone}-Titan`)}))}else this.showTitanErrorMessage()}showTitanErrorMessage(){nt.q.instance.prodigy.open.messageBoxOkay(this.localizer.getText("TITAN_INACTIVE"))}handleLeaving(q){const K=nt.q.instance.prodigy.world.getCurrentZone();nt.q.instance.prodigy.world.getZone(K).handleLeaving(bt.j.teleport,q)}goToTreasureTrack(){var q,K;null===(q=nt.q.instance)||void 0===q||q.prodigy.open.menuCloseAll(),null===(K=nt.q.instance)||void 0===K||K.prodigy.open.battlePassMenu()}getCustomItemReceivedSegmentData(q,K){if(null==q?void 0:q.includes(it.C.FestivalCurrencyConversion))return{source_type:it.C.FestivalCurrencyConversion,source_id:nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.getFestivalInstanceName(),instance_id:K.id.toString(),instance_type:st.N.UI}}};(0,Y.Cg)([(0,J.sg)(2e3),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Array,Array,et.MailData,Array]),(0,Y.Sn)("design:returntype",void 0)],mt.prototype,"singleUseGotItem",null),(0,Y.Cg)([gt,(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Array,Array,et.MailData]),(0,Y.Sn)("design:returntype",void 0)],mt.prototype,"openGiftBox",null),(0,Y.Cg)([gt,(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],mt.prototype,"openMembershipSignUp",null),mt=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("d73-66e9")),(0,Y.Qj)(1,(0,X.inject)(Q.$Bt.LocalizationService)),(0,Y.Sn)("design:paramtypes",[at.n,Q.dTp])],mt)},36545:(q,K,z)=>{"use strict";z.d(K,{R:()=>Y});class Y{static getRandomHint(q){return Y.data[q][Math.floor(Math.random()*Y.data[q].length)]}}Y.data={none:[{textKey:"HINT_0"},{textKey:"HINT_1"},{textKey:"HINT_3"},{textKey:"HINT_4"},{textKey:"HINT_5"},{textKey:"HINT_6"},{textKey:"HINT_7"},{textKey:"HINT_8"},{textKey:"HINT_9"},{textKey:"HINT_10"},{textKey:"HINT_11"},{textKey:"HINT_12"},{textKey:"HINT_13"},{textKey:"HINT_14"},{textKey:"HINT_15"},{textKey:"HINT_16"},{textKey:"HINT_17"},{textKey:"HINT_18"},{textKey:"HINT_19"},{textKey:"HINT_20"},{textKey:"HINT_21"},{textKey:"HINT_22"},{textKey:"HINT_23"},{textKey:"HINT_24"},{textKey:"HINT_25"},{textKey:"HINT_26"}]}},47315:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{X:()=>Y}),function(q){q.Single="single",q.AOE="aoe",q.None="none"}(Y||(Y={})),function(q){q.Team="team",q.Unit="unit"}(Q||(Q={}))},77938:(q,K,z)=>{"use strict";z.d(K,{t:()=>it});var Y,Q=z(8674),X=z(62459);!function(q){q["costume-1"]="d5be4cfb-ba49-4031-9c32-c01b2c368e18",q["costume-2"]="039d6295-85f4-4501-b6c7-d52c9a1d458f",q["costume-3"]="46da74b2-31c5-415d-adf6-a0d22bdb57d9",q["costume-4"]="07ebed37-6651-4f94-bc0a-e9bf9a429119",q["costume-5"]="42fee354-cab4-4300-b07b-ce4955b5a4bb",q["costume-6"]="02521cc1-60aa-4428-9a88-7a1bd5842552",q["costume-7"]="650a7499-8ee8-494d-818e-417a81c5f7dc",q["riftRunKey-1"]="3bf8a670-5afc-4113-8d51-eec627555d6a",q["riftRunKey-2"]="38f2fe53-fe57-4046-b642-cbf34807ddfb",q["riftRunKey-3"]="478eefb5-a10f-41c1-abb2-7b4a38d17193"}(Y||(Y={}));var Z=z(88022),J=z(35120),tt=z(91207),et=(z(34829),z(23029));class it{static mergeData(q){q&&(it.data?it.data=Object.assign(Object.assign({},it.data),q):it.data=q,this.processItems(q))}static parseData(q){it.data=q,this.processItems(q)}static processItems(q){var K,z,Y;const Q={outfit:4e-4,weapon:5e-4,hat:.001,boots:.001,item:.025,currency:1},Z=[1,.75,.5,.25,.1];for(const J in q)if(q.hasOwnProperty(J)){const z=q[J];for(let q=0;q0){let q=0;Q.hasOwnProperty(J)&&(q=Q[J]);let K=1;X.Aq$.isDefined(Y.data.rarity)&&Y.data.rarity0){const q={type:J,ID:Y.ID,R:z};it.drops.push(q)}}}}this._prefabDataProvider||(this._prefabDataProvider=J.q.instance.prodigy.gameContainer.get(X.t5G.PrefabDataProvider)),null===(Y=null===(z=this._prefabDataProvider)||void 0===z?void 0:z.rebuildPrefabGuidMap)||void 0===Y||Y.call(z)}static getItem(q,K){if("gold"===q)return this.getItem("currency",1);if("firework"===q||"projectile"===q)return this.getItem("item",K);const z=it.itemMap[`${q}-${K}`];return X.Aq$.isDefined(z)?z:null}static secureGetItem(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=this.getItem(q,K);if(z)return z;if(Y[`${q}-${K}`])try{let z=et.R.loadData(Y[`${q}-${K}`]);return z||(z=yield et.R.loadExternalData(Y[`${q}-${K}`],{})),Object.assign({type:q,ID:K},z)}catch(e){X.RQr.logError(e,`Failed to load item ${q}-${K}`)}return null}))}static doesExist(q,K){return null!==it.getItem(q,K)}static getRandomItem(q){const K=it.data[q];return X.Aq$.isDefined(K)&&K.length>0?K[Math.floor(K.length*Math.random())]:null}static getItemDrops(q){let K=it.drops.slice();X.Aq$.isDefined(q)&&(K=K.concat(q));const z=[];for(let Y=0;YX.Aq$.isDefined(q.data.drop)&&q.data.drop>0&&X.Aq$.isDefined(q.data.rarity)&&q.data.rarity===K))}static getRawItems(q,K){return X.Aq$.isDefined(K)?it.getItemsWithFilter(q,(q=>X.Aq$.isDefined(q.data.rarity)&&q.data.rarity===K)):it.data.hasOwnProperty(q)?it.data[q]:[]}static getRandomizedDropsFromCreatures(q,K,z){const Y=[],Q=[];if(X.Aq$.isDefined(q)){let K;for(let z=0;z0&&Y.push(Q[0]),Y}static getRangeByAmount(q,K,z){const Y=[];for(let Q=K;Q<=K+z-1;Q++){const K=it.data[q][Q];X.Aq$.isDefined(K)&&Y.push(K)}return Y}static getItemCount(q){return X.Aq$.isDefined(it.data[q])?it.data[q].length:0}}it.itemMap={},it.drops=[]},5898:(q,K,z)=>{"use strict";z.d(K,{f:()=>Y,l:()=>Z});var Y,Q=z(62459),X=z(95891);!function(q){q[q.Kills=0]="Kills",q[q.QuestionsCorrect=1]="QuestionsCorrect",q[q.GoldEarned=2]="GoldEarned",q[q.GoldSpent=3]="GoldSpent",q[q.ArchivesRuns=4]="ArchivesRuns",q[q.GoldenPagesEarned=5]="GoldenPagesEarned",q[q.ArchiveEnemiesDefeated=6]="ArchiveEnemiesDefeated",q[q.AcademyPagesEarned=7]="AcademyPagesEarned"}(Y||(Y={}));class Z{constructor(){this.updated=!1,this.data={progress:{}}}init(q){X.isEmpty(q)||(this.data=q)}getDataAndClear(){return this.updated=!1,this.data}setTag(q,K){this.data[q]=K,this.updated=!0}getTag(q){var K;return null!==(K=this.data[q])&&void 0!==K?K:0}increment(q,K){this.setTag(q,this.getTag(q)+K)}getProgress(q){var K;return null!==(K=this.data.progress[q])&&void 0!==K?K:0}setProgress(q,K){this.data.progress[q]=K}complete(q){Q.Aq$.isDefined(this.data.progress)||(this.data.progress={}),Q.Aq$.isDefined(this.data.progress[q])?this.data.progress[q]++:this.data.progress[q]=1,this.updated=!0}}},7351:(q,K,z)=>{"use strict";z.d(K,{W:()=>Ee});var Y=z(8674),Q=z(62459),X=z(88225),Z=z(95891),J=z.n(Z),tt=z(44329),et=z(47708),it=z(97495),st=z(2090);const nt=(0,z(77601).gb)({key:"username-in-game-display",activateAssociatedExperiments:1,default:{enabled:!1}});var at=z(58776),rt=z(4903),ot=z(95066),ht=z(36525),ct=z(55110),dt=z(90633),lt=z(8394),ut=z(5491),ft=z(65240),bt=z(66582),pt=z(73678),vt=z(66207),gt=z(80105),mt=z(13956),yt=z(35120),_t=z(50503),Et=z(2212),wt=z(48235),Tt=z(55122),St=z(64794),At=z(41340),Ct=z(59510),Ot=z(24473),It=z(45918),Dt=z(80434),Rt=z(62886),Pt=z(7247);class Mt{static validateUniqueEncounterTaskState(q,K,z){var Y,Q,X,Z,J,tt;const et=null===(Y=z.taskDefinition.completionRequirements.conditions)||void 0===Y?void 0:Y.find((q=>q.type===Pt.i.UNIQUE_ENCOUNTER_RESTRICTIONS));if(!et)return;const it=yt.q.instance.prodigy.world.getZone(K),st=null!==(Z=null===(X=null===(Q=null==it?void 0:it.getQuestState())||void 0===Q?void 0:Q.req)||void 0===X?void 0:X.N)&&void 0!==Z?Z:0,nt=null!==(tt=null===(J=et.data)||void 0===J?void 0:J.ids)&&void 0!==tt?tt:[],at=nt.filter((K=>q.get(K)));at.slice(0,Math.max(0,st-(nt.length-at.length))).forEach((K=>{q.set(K,void 0)}))}static validateReceiveItemUniqueEncounterTaskState(q,K,z){var Y,Q,X,Z,J;if(z.type!==Rt.T.RECEIVE_ITEM)return;const tt=yt.q.instance.prodigy.world.getZone(K),et=null!==(X=null===(Q=null===(Y=null==tt?void 0:tt.getQuestState())||void 0===Y?void 0:Y.req)||void 0===Q?void 0:Q.N)&&void 0!==X?X:0;if(et<=0)return;const it=(null!==(J=null===(Z=z.taskDefinition.metadata)||void 0===Z?void 0:Z.locations)&&void 0!==J?J:[]).filter((q=>"string"!=typeof q&&!!q.uniqueEncounters)).reduce(((q,z)=>(Object.entries(z.uniqueEncounters).forEach((([z,Y])=>{Y.forEach((Y=>q.push(`zone-${K}-uniqueEncounters-${z}-${Y}`)))})),q)),[]);if(0===it.length)return;const st=it.filter((K=>q.get(K))),nt=it.length-st.length;st.slice(0,Math.max(0,et-nt)).forEach((K=>{q.set(K,void 0)}))}}var Nt=z(52191),xt=z(73797),Lt=z(77981),kt=z(23891),Bt=z(23082);class Ut{static updateEducationData(q,K){var z,Y;return Ut.processHomework(null!==(z=null==q?void 0:q.homework)&&void 0!==z?z:[],null!==(Y=null==K?void 0:K.homework)&&void 0!==Y?Y:[]),Object.assign(Object.assign({},q),K)}static processHomework(q,K){const z=yt.q.instance.prodigy.gameContainer.get("20f-5f67").educationData;for(const Y of K){q.find((q=>q.homeworkID===Y.homeworkID))||z.handleNewClassAssignment(Y)}for(const Y of q){K.find((q=>q.homeworkID===Y.homeworkID))||z.handleRemovedClassAssignment(Y)}}}var Ft=z(76599),Gt=z(48813),jt=z(76277),$t=z(40392),Ht=z(98252),Vt=z(34612),Wt=z(22023),qt=z(23748);class Kt{static convertLegacyStarsToModern(q,K){if(!Q.Aq$.isDefined(q))return 0;const z=this.legacyLevelFromStars(q),Y=this.legacyStarsToLevel(z-1),X=(q-Y)/(this.legacyStarsToLevel(z)-Y),Z=Tt.s.xpRequiredForLevel(z,K),J=Tt.s.xpRequiredForLevel(z+1,K);return Math.floor(qt.z.clampedLerp(Z,J,X))}static legacyStarsToLevel(q){if(q<1)return 0;let K=0;for(let z=1;z<=q;z++)K+=this.legacyEnemiesPerLevel(z);return 100*K}static legacyLevelFromStars(q){for(let K=1;K<=100;K++)if(q=Y)q.stars=J.cumulativeXp[et-1],q.nextLevelProgressPercent=1;else{const Y=ne.D.getCurrentLevelProgressPercent(et,tt,z.cumulativeXp,1),Q=Tt.s.xpRequiredForLevel(et,K),X=Tt.s.xpRequiredForLevel(et+1,K)-Q;q.stars=Q+Math.round(X*Y),q.nextLevelProgressPercent=ne.D.getCurrentLevelProgressPercent(et,q.stars,J.cumulativeXp,1)}Q.VyI.log(`[Level curve migration] stars translated: ${tt} -> ${q.stars}`,Q.$bb.Info),Q.VyI.log(`[Level curve migration] Percent to next level: ${100*q.nextLevelProgressPercent}%`,Q.$bb.Info)}}var re=z(77938),oe=z(21492),he=z(5898),ce=z(51894),de=z(27293),le=z(39984),ue=z(48208),fe=z(37465);class be{get newRescuedPets(){return this._newRescuedPets}init(q){this._newRescuedPets=null!=q?q:{}}getDataAndClear(){return this.updated=!1,this._newRescuedPets}getNumberOfNewRescues(q){var K,z;return null!==(z=null===(K=this._newRescuedPets[q])||void 0===K?void 0:K.length)&&void 0!==z?z:0}addNewRescue(q,K){const z=J().uniq(J().flatMap(this._newRescuedPets)).length;yt.q.instance.prodigy.gameContainer.get("e84-d543").getZonesForPetId(q).then((Y=>{Y.forEach((K=>{this._newRescuedPets[K]?this._newRescuedPets[K].includes(q)||(this._newRescuedPets[K].push(q),this.updated=!0):(this._newRescuedPets[K]=[q],this.updated=!0)}));const Q=J().uniq(J().flatMap(this._newRescuedPets)).length;z!==Q&&this.sendBadgeUpdatedEvent(K,Q,z)})).catch(Q.RQr.createHandler("Error adding a new rescue"))}clearNewRescues(){this._newRescuedPets={},this.updated=!0}clearRescuesForZone(q){this._newRescuedPets[q]=[],this.updated=!0}clearNewestRescuesByAmount(q,K){var z;null===(z=this._newRescuedPets[K])||void 0===z||z.splice(0,q),this.updated=!0}sendBadgeUpdatedEvent(q,K,z){yt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendBadgeUpdatedEvent({button_name:`pet_menu_${q}`,badge_value:K,previous_badge_value:z})}}var pe=z(129),ve=z(57797);class ge{constructor(){this._updated=!1,this._dailyBattleLimit=1,this._dailyBattleCount=0,this._dailyBossBattleRematchCount=0,this._isDailyBattleComplete=new Map,this._dailyBattleRefreshInterval=se.s.DAY_IN_MS,this._lastStarted=new Date(0),this._dailyPlacementMap=new Map,this._dailyEncounterMap=new Map,this._festivalProgress={instanceID:0,viewedProgressMenu:!1},this._isFestivalDailyBattle=!1,this._currentWheelID=0,this.isNewFestivalWheel=!1,this.inPostBattleFlow=!1}get updated(){return this._updated}get dailyBattleLimit(){return this._dailyBattleLimit}get dailyBattleCount(){return this._dailyBattleCount}get dailyBossBattleRematchCount(){return this._dailyBossBattleRematchCount}set dailyBossBattleRematchCount(q){this._dailyBossBattleRematchCount=q}isDailyBattleComplete(q){var K;return null!==(K=this._isDailyBattleComplete.get(q))&&void 0!==K&&K}get dailyBattleRefreshInterval(){return this._dailyBattleRefreshInterval}get festivalType(){return this._festivalType}get lastStarted(){return this._lastStarted}getDailyBattlePlacement(q){return this._dailyPlacementMap.get(q)}getDailyBattleEncounter(q){return this._dailyEncounterMap.get(q)}setDailyBattleEncounter(q,K){this._dailyEncounterMap.set(q,K)}get viewedProgressMenu(){return this._festivalProgress.viewedProgressMenu}set viewedProgressMenu(q){this._festivalProgress.viewedProgressMenu=q}get isFestivalDailyBattle(){return this._isFestivalDailyBattle}set isFestivalDailyBattle(q){this._isFestivalDailyBattle=q}get currentWheelID(){return this._currentWheelID}set currentWheelID(q){this._currentWheelID!==q&&(this._currentWheelID=q,this.isNewFestivalWheel=!0)}get currentWheelEndDate(){return this._currentWheelEndDate}set currentWheelEndDate(q){this._currentWheelEndDate=q}init(q){var K,z,Y;q&&(this._festivalType=q.festivalType,this._dailyBattleCount=null!==(K=q.currentDailyBattleCount)&&void 0!==K?K:0,this._dailyBossBattleRematchCount=null!==(z=q.currentDailyBossBattleRematchCount)&&void 0!==z?z:0,Q.Aq$.isDefined(q.lastStarted)?q.lastStarted>Date.now()?(Q.VyI.log(`Last daily start time ${q.lastStarted.toString()} is in the future. Resetting.}`,Q.$bb.Error),this._lastStarted=new Date(0)):this._lastStarted=new Date(q.lastStarted):this._lastStarted=new Date(0),this._dailyPlacementMap=Array.isArray(q.placementMap)?new Map(q.placementMap):new Map,this._dailyEncounterMap=Array.isArray(q.encounterMap)?new Map(q.encounterMap):new Map,this._isDailyBattleComplete=Array.isArray(q.isDailyBattleComplete)?new Map(q.isDailyBattleComplete):new Map,this._festivalProgress={instanceID:q.festivalID,viewedProgressMenu:null!==(Y=q.viewedProgressMenu)&&void 0!==Y&&Y})}reset(){this.init({festivalType:"",currentDailyBattleCount:0,currentDailyBossBattleRematchCount:0,lastStarted:0,isDailyBattleComplete:new Map,placementMap:new Map,encounterMap:new Map,festivalID:0,viewedProgressMenu:!1})}start(q,K,z,Y,Q){this._festivalType=q,this._dailyPlacementMap=z,this._dailyEncounterMap=Y,this._dailyBattleLimit=K,Q&&(this._dailyBattleRefreshInterval=Q*se.s.HOURS_IN_MS),this.isExpired(q)&&(this._lastStarted=Yt.R.getNow(),this._dailyBattleCount=0,this._dailyBossBattleRematchCount=0,this._dailyBattleRefreshInterval%se.s.DAY_IN_MS==0&&this._lastStarted.setHours(0,0,0,0),this._isDailyBattleComplete=new Map),this._updated=!0}playedBattle(q){if(this._updated=!0,!0!==this._isDailyBattleComplete.get(q))return q===ve.je.Normal?(this._dailyBattleCount++,void(this._dailyBattleCount>=this._dailyBattleLimit&&this._isDailyBattleComplete.set(ve.je.Normal,!0))):void this._isDailyBattleComplete.set(q,!0)}isExpired(q){return this._festivalType!==q||Date.now()>this._lastStarted.getTime()+this._dailyBattleRefreshInterval}setFestival(q){this._festivalProgress.instanceID!==q&&(this._festivalProgress={instanceID:q,viewedProgressMenu:!1}),this._updated=!0}getFestivalInstanceName(){return`${yt.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestivalName()}-${(new Date).getFullYear()}`}getFestivalProgress(){Q.VyI.log("getFestivalProgress can only be used in debug builds",Q.$bb.Error)}getData(){var q;return{festivalType:this._festivalType,currentDailyBattleCount:this._dailyBattleCount,currentDailyBossBattleRematchCount:this._dailyBossBattleRematchCount,lastStarted:Q.Aq$.isDefined(this._lastStarted)?this._lastStarted.getTime():0,isDailyBattleComplete:this._isDailyBattleComplete,placementMap:this._dailyPlacementMap,encounterMap:this._dailyEncounterMap,festivalID:this._festivalProgress.instanceID,viewedProgressMenu:null!==(q=this._festivalProgress.viewedProgressMenu)&&void 0!==q&&q}}getDataAndClear(){return this._updated=!1,this.getData()}}var me=z(3032),ye=z(10592),_e=z(84938);class Ee extends pe.a{get saveEnabled(){return this._saveEnabled}set saveEnabled(q){this._saveEnabled=q}get memberStartDate(){return yt.q.instance.prodigy.gameContainer.get("73f-58d1").memberStartDate}get memberEndDate(){return yt.q.instance.prodigy.gameContainer.get("73f-58d1").memberEndDate}get difficultyUnlocks(){var q;return null===(q=this.data)||void 0===q?void 0:q.difficultyUnlocks}get currentDifficulty(){var q;return null===(q=this.data)||void 0===q?void 0:q.currentDifficulty}get highestDifficultyUnlocked(){var q;return null!==(q=[it.i.Expert,it.i.Hard,it.i.Regular].find((q=>{var K;return null===(K=this.difficultyUnlocks)||void 0===K?void 0:K[q]})))&&void 0!==q?q:it.i.Regular}get locationSelectionType(){switch(this._locationSelectionType){case"home":case"school":case"none":return this._locationSelectionType;default:return this._locationSelectionType="home",this._locationSelectionType}}get isInBattle(){return yt.q.instance.game.state.current===Bt.G.SecureBattleRevamp}get lastVisitedDate(){return this._lastVisitedDate}get ultimateQuestId(){return this._ultimateQuestId}get ultimateTaskId(){return this._ultimateTaskId}setUltimateSessionStatus(q,K="",z=0,Y=!1){if(q===ye.n.None||q===ye.n.Transition?(this._ultimateQuestId="",this._ultimateTaskId=0):(this._ultimateQuestId=K,this._ultimateTaskId=z),this._ultimateSessionStatus!==q&&!this._ultimateSessionStatusLocked){const K=this._ultimateSessionStatus;this._ultimateSessionStatus=q,this._ultimateSessionStatusLocked=Y,this.onSessionStatusChange.dispatch(this._ultimateSessionStatus,K)}}get ultimateSessionStatus(){return this._ultimateSessionStatus}get educationData(){return this._educationData}get goalId(){return this._goalId}get hasGrade(){return this._educationData.chosenGrade>0}get userDataPlatform(){return this._userDataPlatform}set userDataPlatform(q){this._userDataPlatform=q}constructor(q){super(q),this._saveEnabled=!1,this.curriculumTreeID=null,this.parentEmail=null,this.registerDate=null,this.owners=[],this.classIDs=null,this.playerParents=[],this.playerTeachers=[],this.onEquipmentChange=new Q.HN0,this.onSessionStatusChange=new Q.HN0,this.membershipUpsell={tier:null,interval:null,upgradeOptions:[]},this.memberPrompt=!1,this.seenMapTransitionPromptThisSession=!1,this._locationSelectionType="none",this.username=null,this.grade=null,this.world=null,this.earlyBirdLastChance=!1,this.answerStreak=0,this.battleStreak=0,this.parentalLink=!1,this.isClassCodeAttached=!1,this.updated=!1,this.lastVisited=null,this.memberShareDate=null,this.tutorialCompletedThisSession=!1,this.hasUsedTicket=!1,this.onFaintData=null,this._ultimateSessionStatus=ye.n.None,this._ultimateSessionStatusLocked=!1,this._ultimateQuestId="",this._ultimateTaskId=0,this.dailyQuestions=null,this.daily=null,this._educationData=null,this._goalId=null,this._userDataPlatform="prodigy",this.battleResumeData=void 0,this.inProgressRestrictionsSeen=[],this.completedRestrictionProgressBarsSeen=[],this.completedRestrictionUnlockAnimationsSeen=[],this.coOpTeamHandler=null,this._unknownItemNameForAnalytics="Unknown Item",this._playerContainer=null,this.emotes=null,this.dailyQuestions=new ue.V,this.daily=new ge,this.newPetRescueData=new be,this._remoteLogger=yt.q.instance.prodigy.gameContainer.get("ce3-6d33"),yt.q.instance.game.broadcaster.addAppListener(xt.Y1.ClosePetsMenu,this.clearTransitionSessionStatus,this,void 0,!0),yt.q.instance.game.state.onStateChange.add(((q,K)=>{K===Bt.G.TileScreen&&this.clearTransitionSessionStatus()}))}hasMembership(){return yt.q.instance.prodigy.gameContainer.get("73f-58d1").isMember}hasLegacyMembership(){const q=this.hasMembership(),K=yt.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirementsDeprecated(15);return q&&!K}hasMembershipFeatureAccess(q){return yt.q.instance.prodigy.gameContainer.get("73f-58d1").hasFeatureAccess(q)}getActiveMembershipId(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this.hasMembership())return;const q=yield this.sendMembershipQueryRequest(),K=this.filterForMathMemberships(q.data.viewer.activeMemberships);return 0!==K.length?K[0].id:void 0}))}getAllActiveMemberships(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.sendMembershipQueryRequest()).data.viewer.activeMemberships}))}getActiveMathMembership(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this.hasMembership())return;const q=yield this.sendMembershipQueryRequest(),K=this.filterForMathMemberships(q.data.viewer.activeMemberships);return 0!==K.length?K[0]:void 0}))}getMembershipUpsellData(){return(0,Y.sH)(this,arguments,void 0,(function*(q=!1){return!q&&Q.Aq$.isDefined(this._membershipUpsellFetchPromise)?this._membershipUpsellFetchPromise:(this._membershipUpsellFetchPromise=null,this.fetchMembershipUpsell())}))}fetchMembershipUpsell(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this.hasMembership())return this.membershipUpsell.tier=bt._$.NonMember,this.membershipUpsell.upgradeOptions=[],this._membershipUpsellFetchPromise=Promise.resolve(this.membershipUpsell),this.membershipUpsell;const q=yield this.sendMembershipQueryRequest();return this._membershipUpsellFetchPromise=Promise.resolve(this.processMembershipUpgradeOptions(q)),this.membershipUpsell=yield this._membershipUpsellFetchPromise,this.membershipUpsell}))}processMembershipUpgradeOptions(q){var K;const z=this.filterForMathMemberships(q.data.viewer.activeMemberships);if(0===z.length)return;const Y=z[0].currentPackage.tier,Q=null===(K=z[0].plan)||void 0===K?void 0:K.interval;return this.membershipUpsell.upgradeOptions=z[0].upgradeOptions,1===Y?this.membershipUpsell.tier=bt._$.MemberLevelUp:2===Y&&(this.membershipUpsell.tier=z[0].upgradeOptions.length>0?bt._$.MemberUltimateMath:bt._$.MemberUltimateBundle),this.membershipUpsell.interval=Q,this.membershipUpsell.ownerIsPartialUser=z[0].ownerIsPartialUser,this.membershipUpsell.ownerHasSSOCredentials=z[0].ownerHasSSOCredentials,this.membershipUpsell}filterForMathMemberships(q){return(null!=q?q:[]).filter((q=>q.categories.includes(Lt.r.Math)))}getDailyQuestions(){return this.dailyQuestions}getUpdatedData(q=!1,K=!0){const z={},Y=[{data:this.equipment,name:"equipment"},{data:this.tutorial,name:"tutorial"},{data:this.appearance,name:"appearance"},{data:this.kennel,name:"pets"},{data:this.encounters,name:"encounters"},{data:this.quests,name:"quests"},{data:this.house,name:pt.A_.HOUSE},{data:this,name:"data"},{data:this.backpack,name:"inventory"},{data:this.state,name:"state"},{data:this.achievements,name:"achievements"}];this.validateLevel();for(let X=0;X-1?new Date(Y):new Date(z.getServerTimeMs()),Z=se.s.get("GameConstants.DailyQuestions.OVERRIDE_LAST_LOGIN"),J=Z>-1?new Date(Z):new Date(this.lastVisited),tt=q.data,st=Q.Aq$.isDefined(tt),nt=st?tt.dailyQuestions:null;this.dailyQuestions.init(nt,4,X,J,(()=>{this.updated=!0}));const at=st?tt.daily:null;return this.daily.init(at),this.newPetRescueData.init(st?tt.newPetRescueData:{}),tt&&!tt.playerTitanData&&(tt.playerTitanData={titanBattleProgress:0,seenTitanBattleProgress:0,titanID:0}),tt&&!tt.lastStoreVisitLevels&&(tt.lastStoreVisitLevels={}),tt&&!tt.unifiedStore&&(tt.unifiedStore={viewMoreStoresButtonClicks:0,viewMoreStoresButtonViews:0}),tt&&!tt.difficultyUnlocks&&(tt.difficultyUnlocks=et.Al),$t.i.DIFFICULTY_MODE=null!==(K=tt.currentDifficulty)&&void 0!==K?K:it.i.Regular,Ot.S.updateRewardedState().catch(Q.RQr.createHandler("[ActivePlayer] Error updating seven levels reward state")),Ot.S.calculateFeatureEligibility(),yt.q.instance.prodigy.gameContainer.get("04c-7c61").updateRiftsConfigVersion().catch(Q.RQr.createHandler("[ActivePlayer] Error updating rifts config to latest version")),Gt.T.ready.then((()=>{this.validateLevel(),this.updated=!0,Tt.s.validatePlayerAndPetXp(),this.updateChargedLevelsData().catch(Q.RQr.createHandler("[ActivePlayer] Error updating charged level data")),this.fetchMembershipUpsell().catch(Q.RQr.createHandler("[ActivePlayer] Error fetching membership upsell"))})).catch(Q.RQr.createHandler("[ActivePlayer] Error awaiting the experiment manager")),Et.J.featureDataHealthCheck(),tt.settings||(tt.settings={}),Object.values(_e._).forEach((q=>{var K;const z=_e.B[q];if(!(null===(K=null==z?void 0:z.data)||void 0===K?void 0:K.storedKey))return;const Y=z.data.storedKey;Q.Aq$.isDefined(tt.settings[Y])||(tt.settings[Y]=z.data.defaultValue,this.updated=!0),z.setStoredValue(tt.settings[Y]),z.onStoredValueChanged.add((q=>{this.getPlayerData().settings[Y]=q,this.updated=!0}))})),!0}return!1}transformPlayer(q,K,z,Y){super.transformPlayer(q,K,z,Y),this.updated=!0}getLatestClassIDLegacy(){return Q.Aq$.isDefined(this.classIDs)&&this.classIDs.length>0?this.classIDs[this.classIDs.length-1]:0}getEnergy(){return Q.Aq$.isDefined(this.data.energy)?this.data.energy:0}setEnergy(q){super.setEnergy(q),this.updated=!0}set team(q){this.data.team=q,this.updated=!0}get team(){return this.data.team}getRegisterDate(){return Q.Aq$.isDefined(this.registerDate)&&"string"==typeof this.registerDate&&(this.registerDate=Q.Aq$.isDefined(this.registerDate)?new Date(this.registerDate):null),this.registerDate}setParentEmail(q){this.parentEmail=q,this.updated=!0}hasValidatedParentEmail(){return Q.Aq$.isDefined(this.playerParents)&&this.playerParents.length>0}hasValidatedTeacherEmail(){return Q.Aq$.isDefined(this.playerTeachers)&&this.playerTeachers.length>0}getAnswerStreak(){return this.answerStreak}heal(){this.changeCurrentHearts(se.s.MAX_SAFE_INTEGER);const q=this.kennel.getPets();for(let K=0;Kq+K.questions.length),0)===Q.skills.reduce(((q,K)=>q+K.correct+K.incorrect),0)&&yt.q.instance.prodigy.gameContainer.get("20f-5f67").educationData.handleClassAssignmentCompleted(Q)}}getPlayerClass(){return Q.Aq$.isDefined(this.data)?this.data.defaultClass:""}setPlayerClass(q){this.data.defaultClass=q}addSpell(q){Q.Aq$.isDefined(this.data.spells)||(this.data.spells=[]),Xt.J.inArray(this.data.spells,q)||(this.data.spells.push(q),Q.Aq$.isDefined(this.data.spellbook)&&!Xt.J.inArray(this.data.spellbook,q)&&this.data.spellbook.length<6&&this.data.spellbook.push(q)),this.updated=!0}unlockMemberItems(){this.hasMembership()&&(this.memberPrompt=!1,this.updated=!0,Q.Aq$.isDefined(this.getPlayerData().nm)?this.getPlayerData().nm=2:(Q.Aq$.isDefined(this.getPlayerData().startDate)&&this.getPlayerData().startDate<(new Date).getTime()&&(this.getPlayerData().daysToConvert=((new Date).getTime()-this.getPlayerData().startDate)/864e5),this.getPlayerData().nm=1),this.backpack.unlockAllItems())}setZone(q,K){var z,Y,Z;if(Q.Aq$.isDefined(K)&&K.indexOf("scene")>-1)return;yt.q.instance.prodigy.world.getZone(q);const J=(0,jt.G)(st.u).enabled&&Et.J.isZoneMapDifficultyModeAgnostic(K)?$t.i.DIFFICULTY_MODE:null!==(Y=null===(z=$t.i.getZoneData(q))||void 0===z?void 0:z.difficultyMode)&&void 0!==Y?Y:it.i.Regular;J!==this.currentDifficulty&&(yt.q.instance.prodigy.gameContainer.get("66f-d9d3").setCurrentDifficulty(J),$t.i.setDifficultyMode(J));const tt=this.getPlayerData();tt.zone=K,Qt.w.isTitanMap(K)||(null!==(Z=tt.lastVisitedMapForZone)&&void 0!==Z||(tt.lastVisitedMapForZone={}),tt.lastVisitedMapForZone[q]=K),this.updated=!0,X.setTag("zone",K)}getLastVisitedMapForZone(q){var K;return null===(K=this.getPlayerData().lastVisitedMapForZone)||void 0===K?void 0:K[q]}changeGold(q){q>0?(this.achievements.increment(he.f.GoldEarned,q),yt.q.instance.game.broadcaster.broadcast(xt.ib.ItemReceived,void 0,[{ID:1,type:"gold",N:q,balance:this.getGold()+q}])):q<0&&(this.achievements.increment(he.f.GoldSpent,Math.min(Math.max(this.getPlayerData().gold,0),Math.abs(q))),yt.q.instance.game.broadcaster.broadcast(xt.ib.ItemConsumed,void 0,[{ID:1,type:"gold",N:q,balance:this.getGold()+q}])),this.getPlayerData().gold=this.getGold()+q,this.getPlayerData().gold<0&&delete this.getPlayerData().gold,this.getPlayerData().gold>se.s.MAX_SAFE_INTEGER&&(this.getPlayerData().gold=1e9),this.updated=!0}getInteractionIdForEquipAnalytics(q){var K;const z=yt.q.instance.prodigy.gameContainer.get("20f-5f67");return q&&null!==(K=z.featureCommon.getCurrentButtonID(q))&&void 0!==K?K:zt.$.generateUID()}equip(q,K){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z=!1,Y){var X;const Z=yield re.t.secureGetItem(K,q);if(1===(null===(X=null==Z?void 0:Z.data)||void 0===X?void 0:X.member)&&!this.hasMembership())return z&&yt.q.instance.prodigy.open.membershipInfo(void 0,{conversionFunnelName:Jt.o.FunnelUseMemberLockedItem,conversionFunnelMetadata:`${K}-${q}`}),!1;const J=this.equipment.getData()[K];switch(K){case"follow":this.equipment.setFollow(q);break;case"hat":this.equipment.setHat(q);break;case"outfit":this.equipment.setOutfit(q);break;case"weapon":this.equipment.setWeapon(q);break;case"spellRelic":this.equipment.setSpellRelic(q);break;case"boots":this.equipment.setBoots(q);break;case"mount":this.equipment.setMount(q);break;case"costume":this.equipment.setCostume(q);break;default:return Q.VyI.log(`Unrecognized equipment type ${K}.`,Q.$bb.Warning),!1}const tt=yt.q.instance.prodigy.gameContainer.get("20f-5f67"),et=this.getInteractionIdForEquipAnalytics(Y);if(tt.item.sendItemEquippedEvent({item_name:Z?Xt.J.getItemName(Z):this._unknownItemNameForAnalytics,item_type:K,item_id:q},et),Q.Aq$.isDefined(J)){const q=yield re.t.secureGetItem(K,J);tt.item.sendItemUnequippedEvent({item_name:q?Xt.J.getItemName(q):this._unknownItemNameForAnalytics,item_type:K,item_id:J},et)}return"costume"===K&&Z&&this.sendWizardCostumesAnalytics(Z,Y),this.onEquipmentChange.dispatch(K,!0),!0}))}unEquip(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=yield re.t.secureGetItem(K,q);switch(K){case"follow":this.equipment.setFollow(null);break;case"hat":this.equipment.setHat(null);break;case"outfit":this.equipment.setOutfit(null);break;case"weapon":this.equipment.setWeapon(null);break;case"spellRelic":this.equipment.setSpellRelic(null);break;case"boots":this.equipment.setBoots(null);break;case"mount":this.equipment.setMount(null);break;case"costume":this.equipment.setCostume(null);break;default:return Q.VyI.log(`Unrecognized equipment type ${K}.`,Q.$bb.Warning),!1}return yt.q.instance.prodigy.gameContainer.get("20f-5f67").item.sendItemUnequippedEvent({item_name:Y?Xt.J.getItemName(Y):this._unknownItemNameForAnalytics,item_type:K,item_id:q},this.getInteractionIdForEquipAnalytics(z)),"costume"===K&&Y&&this.sendWizardCostumesAnalytics(Y,z),this.onEquipmentChange.dispatch(K,!1),!0}))}sendWizardCostumesAnalytics(q,K){const z=yt.q.instance.prodigy.gameContainer.get("20f-5f67");z.playerIdentityAvatar.sendPlayerAvatarUpdatedEvent("costume",Xt.J.getItemName(q),{transaction_id:K?z.featureCommon.getCurrentButtonID(K):void 0})}updateMembershipVideoAdData(q){const K=yt.q.instance.prodigy.gameContainer.get("0f2-d6bd").getServerTimeMs();this.data.membershipVideoTimeStamp=K,this.updated=!0}completeDaily(q,K){this.getPlayerData()[q].isComplete=K,this.updated=!0}setSpinDate(q){this.getPlayerData()[`spinDate${q}`]=Yt.R.getDateTime(),this.updated=!0}spinWheel(q){this.getPlayerData()[`numSpins${q}`]++,this.updated=!0}canSpin(q){return[3].indexOf(q)>=0?0===this.getPlayerData()[`numSpins${q}`]||1===this.getPlayerData()[`numSpins${q}`]&&this.hasMembership()||se.s.get("GameConstants.Debug.UNLIMITED_WHEEL_SPINS"):Q.Aq$.isDefined(this.getPlayerData()[`numSpins${q}`])?this.getPlayerData()[`spinDate${q}`]!==Yt.R.getDateTime()?(this.setSpinDate(q),this.getPlayerData()[`numSpins${q}`]=0,!0):0===this.getPlayerData()[`numSpins${q}`]||1===this.getPlayerData()[`numSpins${q}`]&&this.hasMembership()||se.s.get("GameConstants.Debug.UNLIMITED_WHEEL_SPINS"):(this.setSpinDate(q),this.getPlayerData()[`numSpins${q}`]=0,!0)}canPurchaseSpin(q,K){var z;if(!K.purchaseSpinDialogueID)return!1;const Y=null!==(z=K.purchaseSpinCount)&&void 0!==z?z:1,Q=this.hasMembership()?2+Y:1+Y;return this.getPlayerData()[`numSpins${q}`]q+(K&&!K.isKnockedOut()?K.getCurrentHearts():0)),0)}addBattle(){this.getPlayerData().battleCounter=this.getBattles()+1,this.updated=!0}addWin(){this.getPlayerData().win=this.getWins()+1,this.updateStreak(!0),this.updateWinLossRatio(),this.updated=!0}addLoss(){this.getPlayerData().loss=this.getLosses()+1,this.updateStreak(!1),this.updateWinLossRatio(),this.updated=!0}updateStreak(q=!1){let K=this.getBattleStreak();K=q?K<0?1:K+=1:K>0?-1:K-=1,this.getPlayerData().battleStreak=Z.clamp(K,-Ee.PLAYER_BATTLE_STREAK_CAP,Ee.PLAYER_BATTLE_STREAK_CAP)}updateWinLossRatio(){this.getPlayerData().winLossRatio=Z.round(this.getWins()/(this.getWins()+this.getLosses()),2)}processDeserter(){return!!Q.Aq$.isDefined(this.getPlayerData().deserter)&&(delete this.getPlayerData().deserter,this.updated=!0,!0)}completeTower(q){q>this.getTowerProgress()&&(this.getPlayerData().tower=q),this.updated=!0}isBlockedByDarkTowerMemberGate(){const q=this.getTowerProgress();return!this.hasMembership()&&q<100&&q>=se.s.get("GameConstants.Tower.MAX_FREE_MEMBER_FLOOR")}swapSpells(q,K){if(Q.Aq$.isDefined(q)&&Q.Aq$.isDefined(K)){Q.Aq$.isDefined(this.getPlayerData().spellbook)||(this.getPlayerData().spellbook=this.getAllAttacks().slice(0,6));for(let z=0;z0}hasCompletedTutorial(){const q=Z.get(yt.q.instance.prodigy.world.zones,pt.A_.HOUSE,null);return Q.Aq$.isDefined(q)&&Z.get(q.getQuestState(),"ID",0)>1}hasCompletedTowerTownTutorial(){const q=new At.Y(this.game);return q.init(),q.isBreadcrumbComplete(Ct.M.TutorialCompleted)}setAllowsHouseVisitors(q){super.setAllowsHouseVisitors(q),this.updated=!0}hasUnclaimedMembershipRewards(){return this.shouldRewardCloudMount()||this.shouldRewardFromSegmentedOffer()||wt.W.hasRewardAvailable}shouldRewardCloudMount(){return this.hasMembership()&&0===this.backpack.hasItem("mount",1)}shouldRewardFromSegmentedOffer(){const q=yt.q.instance.prodigy.gameContainer.get("c21-1a3f");return!(!q.userHasOfferAvailable()||!q.meetsMembershipRequirement)&&q.rewardsForCurrentUserSegment.length>0}rewardMembershipPrizes(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K={type:"mount",ID:1},z=yt.q.instance.prodigy.gameContainer.get("c21-1a3f"),{meetsMembershipRequirement:Y,rewardsForCurrentUserSegment:X}=z,Z=[...Y&&z.userHasOfferAvailable()?X:[],...this.shouldRewardCloudMount()?[K]:[],...wt.W.hasRewardAvailable?yield wt.W.collectMemberUpgradeReward():[]];if(this.hasMembership()&&Z.length>0){this.shouldRewardCloudMount()&&Xt.J.bagItem(K,this.game,"got-item",void 0),X.length>0&&z.redeemActiveOffer();const Y=new Q._mx,J=Y.addComponent(kt.f);return J.addItems(Z,!0),J.onComplete.addOnce((()=>{null==q||q(),yt.q.instance.prodigy.game.broadcaster.broadcast(xt.H3.MembershipRewardsFlowComplete),Y.destroy()})),J.showPetsInPetCardFormat=!0,J.sourceType=ft.C.ConversionOffer,yt.q.instance.prodigy.open.rewardCloudMountMenu((()=>J.awardItem())),!0}return null==q||q(),!1}))}isItemOwned(q){let K=this.backpack.hasItem(q.type,q.ID)>0;if("dorm"===q.type)K=this.house.getOwned(q.ID)>=9;else if("dormbg"===q.type){const z=re.t.getItem("dormbg",q.ID).data;K=Q.Aq$.isDefined(z)&&z.tag===this.house.getCurrentHouseTag()}else"pet"===q.type?K=this.kennel.hasPet(q.ID):"item"===q.type?K=this.backpack.hasItem(q.type,q.ID)>=99:"hair"===q.type?K=this.appearance.getHair().style===q.ID:"eyeColor"===q.type?K=this.appearance.getEyeColor()===q.ID:"skinColor"===q.type?K=this.appearance.getSkinColor()===q.ID:"hairColor"===q.type?K=this.appearance.getHair().color===q.ID:"face"===q.type?K=this.appearance.getFace()===q.ID:"mathTownInterior"===q.type?K=this.backpack.hasItem(q.type,q.ID)>0:"mathTownFrame"!==q.type&&"mathTownDecor"!==q.type||(K=this.backpack.hasItem(q.type,q.ID)>=99);return K}getItemCount(q,K){if((0,lt.p)(q,K))return this._secureInventory.getCount({type:q,id:K});switch(q){case"dorm":return this.house.getOwned(K);case"pet":return this.kennel.amountOfPet(K);case"currency":return 1===K?this.getGold():this.backpack.hasItem(q,K);case"gold":return this.getGold()}return this.backpack.hasItem(q,K)}hasHouseItem(q){return"dorm"===q.type&&this.house.getOwned(q.ID)>0}anyPetsAboveLevel(q){const K=this.kennel.getPets();for(let z=0;zq)return!0;return!1}getDrops(){return super.getDrops().concat({type:"gold",N:100},re.t.getItemDrops())}checkVersion(){var q,K,z,Y,X,J,et,st,nt,at,ot,ht,lt;const ft=Q.Aq$.isDefined(this.getPlayerData().versionID)?this.getPlayerData().versionID:0;if(ft<1&&(Q.Aq$.isDefined(this.state.data.zone)&&Q.Aq$.isDefined(this.state.data.zone.lamplight)&&delete this.state.data.zone.lamplight,Q.Aq$.isDefined(this.state.data.zone)&&Q.Aq$.isDefined(this.state.data.zone.house)&&delete this.state.data.zone.house,this.state.updated=!0),ft<2&&this.kennel.hasPet(125)&&this.backpack.add("follow",125),ft<3){let q=this.state.get("zone-forest-quest-ID");Q.Aq$.isDefined(q)&&q>=12&&this.state.set("zone-forest-quest",{ID:13}),q=this.state.get("zone-shiverchill-quest-ID"),Q.Aq$.isDefined(q)&&q>=15&&this.state.set("zone-shiverchill-quest",{ID:16}),q=this.state.get("zone-skywatch-quest-ID"),Q.Aq$.isDefined(q)&&q>=13&&this.state.set("zone-skywatch-quest",{ID:14}),q=this.state.get("zone-bonfire_spire-quest-ID"),Q.Aq$.isDefined(q)&&q>=14&&this.state.set("zone-bonfire_spire-quest",{ID:15})}if(ft<4){Q.Aq$.isDefined(this.getPlayerData().stars)||(this.getPlayerData().stars=0),this.getPlayerData().stars=10*this.getPlayerData().stars,this.changeCurrentHearts(se.s.MAX_SAFE_INTEGER);const q=this.kennel.getPets();for(let K=0;K0&&this.backpack.consume("weapon",1e3,1),1e3===this.equipment.getWeapon()&&this.equipment.setWeapon(0)),ft<9){let q=this.backpack.hasItem("weapon",1e3);q>0&&this.backpack.consume("weapon",1e3,q),1e3===this.equipment.getWeapon()&&this.equipment.setWeapon(0),q=this.backpack.hasItem("weapon",96),q>0&&this.backpack.consume("weapon",96,q),96===this.equipment.getWeapon()&&this.equipment.setWeapon(0)}if(ft<10||ft<14){const q=Q.Aq$.isDefined(Number.MAX_SAFE_INTEGER)?Number.MAX_SAFE_INTEGER:9007199254740991;if(Q.Aq$.isDefined(this.getPlayerData().playerTransformation)&&(Q.Aq$.isDefined(this.getPlayerData().playerTransformation.maxTime)&&this.getPlayerData().playerTransformation.maxTime===q||Q.Aq$.isDefined(this.getPlayerData().playerTransformation.timeRemaining)&&this.getPlayerData().playerTransformation.timeRemaining===q)){const q=this.getMaxTimeForCurrentMorphMarbleEffect();this.getPlayerData().playerTransformation.maxTime=q,this.getPlayerData().playerTransformation.timeRemaining=q}}if(ft<11&&Q.Aq$.isDefined(this.getPlayerData().playerTransformation)&&Q.Aq$.isDefined(this.getPlayerData().playerTransformation.transformID)&&this.getPlayerData().playerTransformation.transformID>-1&&!Q.Aq$.isDefined(this.getPlayerData().playerTransformation.timeRemaining)){const q=this.getMaxTimeForCurrentMorphMarbleEffect();this.getPlayerData().playerTransformation.maxTime=q,this.getPlayerData().playerTransformation.timeRemaining=q}if(ft<12){const q=yt.q.instance.prodigy.world.getZone(pt.A_.HOUSE);q.getState("hasClickedPlayerCardVisit")&&yt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(dt.B.FEATURE_HOUSE_VISITING,dt.B.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON),q.getState("hasClickedWorldMap")&&yt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(dt.B.FEATURE_HOUSE_VISITING,dt.B.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON),q.getState("hasClickedLockButton")&&yt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(dt.B.FEATURE_HOUSE_VISITING,dt.B.BREADCRUMB_CLICKED_HOUSE_LOCK_BUTTON);const K=q.getState("houseMovingBreadcrumbs");Q.Aq$.isDefined(K)&&(K>=0&&yt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(dt.B.FEATURE_HOUSE_MOVING,dt.B.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON),K>=1&&yt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(dt.B.FEATURE_HOUSE_MOVING,dt.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE),K>=2&&yt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(dt.B.FEATURE_HOUSE_MOVING,dt.B.BREADCRUMB_CLICKED_HOUSE_MOVE_BUTTON)),Xt.J.safeDeleteObjectProperty(this.getPlayerData(),"arenaRank"),Xt.J.safeDeleteObjectProperty(this.getPlayerData(),"arenaScore"),Q.Aq$.isDefined(this.achievements)&&delete this.achievements.data.progress[13]}if(ft<13&&Xt.J.safeDeleteObjectProperty(this.getPlayerData(),"reward"),ft<15&&Q.Aq$.isDefined(this.kennel.data)){const K=[],z=[...this.kennel.data];for(let Y=0;Y{var K;return X.name===(null===(K=null==q?void 0:q.data)||void 0===K?void 0:K.name)})))||void 0===q?void 0:q.ID;if(!Q.Aq$.isDefined(Z)||Z<=0)continue;let J=!0;for(const q of K)if(Z===q){z.splice(Y,1),Y--,J=!1;break}J&&(K.push(Z),z[Y]={ID:Z,stars:0,level:1}),this.kennel.updated=!0}this.kennel.populateKennel(z)}if(ft<16&&(delete this.state.data.useOldTutorialPath,!this.hasCompletedTutorial())){delete this.getPlayerData().zone,delete this.state.data.zone.house,delete this.state.data.zone.lamplight;const q=[1,4,7,10],K=this.kennel.data.filter((K=>!Z.includes(q,K.ID)));this.kennel.populateKennel(K)}if(ft<17&&yt.q.instance.prodigy.world.getZone(pt.A_.LAMPLIGHT).isOnSequence(1,3)&&(this.getPlayerData().zone="lamplight-B0"),ft<18&&(delete this.getPlayerData().spinDate,delete this.getPlayerData().numSpins),ft<19&&this.hasCompletedTutorial()&&(null===this.appearance.getName()&&this.appearance.setName(new ct.S),Q.Aq$.isDefined(this.appearance.getName().getFirstName())||(this.appearance.getName().setFirstName(oe.C.getRandomFirstName()),this.appearance.updated=!0),Q.Aq$.isDefined(this.appearance.getName().getMiddleName())&&Q.Aq$.isDefined(this.appearance.getName().getLastName())||(this.appearance.getName().setMiddleName(oe.C.getRandomMiddleName()),this.appearance.getName().setLastName(oe.C.getRandomLastName()),this.appearance.updated=!0)),ft<20){let q=this.state.get("zone-lamplight");Z.get(this.data,"isNewTutorial",!1)&&(q=this.state.get("zone-house")),Z.get(q,"quest.ID",0)>=2&&Q.Aq$.isDefined(this.backpack)&&this.backpack.hasItem("key",13)>0||(this.state.data.tutorial={},this.state.data.zone={},this.state.data.world={},this.state.data.breadcrumbs={},this.state.updated=!0,this.backpack.data.key=[],this.backpack.updated=!0),delete this.data.isNewTutorial}if(ft<21){const q={bonfire_spire:[{questID:5,relicID:1},{questID:11,relicID:2},{questID:14,relicID:3}],shiverchill:[{questID:3,relicID:4},{questID:10,relicID:5},{questID:14,relicID:6}],skywatch:[{questID:4,relicID:7},{questID:10,relicID:8},{questID:13,relicID:9}],shipwreck_shore:[{questID:3,relicID:10},{questID:7,relicID:11},{questID:11,relicID:12}],forest:[{questID:4,relicID:13},{questID:8,relicID:14},{questID:12,relicID:15}]};Object.keys(q).forEach((K=>{for(let z=0;z{if(q.timesRescued>0){const z=re.t.getItem("pet",q.ID);let Y=Wt.P8.findPreviousEvolution(z,K);for(;Y;)Y&&this.encounters.getPetTimesRescued(Y.ID)<1&&this.encounters.addToPetTimesRescued(Y.ID,q.timesRescued),Y=Wt.P8.findPreviousEvolution(Y,K)}};q.pets.forEach(z)}if(ft<34){const q=this.encounters.getDataAndClear();Z.remove(q.pets,(q=>Wt.P8.isPetACrystalMonster(q.ID))),te.h.STARTER_PETS.forEach((K=>{const z=q.pets.find((q=>q.ID===K));(!z||z.timesRescued<1)&&this.encounters.addToPetTimesBattled(K,1)}))}if(34===ft){const q=this.encounters.getDataAndClear(),K=re.t.getCategoryItems("pet"),z=yt.q.instance.prodigy.gameContainer.get("0f2-d6bd").getServerTimeMs();for(let Q=0;Q{if(q.timesRescued>0){const z=re.t.getItem("pet",q.ID);let Y=Wt.P8.findPreviousEvolution(z,K);for(;Y;)this.encounters.getPetTimesRescued(Y.ID)<1&&this.encounters.addToPetTimesRescued(Y.ID,q.timesRescued),Y=Wt.P8.findPreviousEvolution(Y,K)}};q.pets.forEach(Y)}if(ft<35&&0===this.backpack.hasItem("mount",1)&&this.equipment.setMount(null),ft<38&&this.state.data.breadcrumbs&&Xt.J.safeDeleteObjectProperty(this.state.data.breadcrumbs,"BREADCRUMB_FEATURE_ANTI_CHURN_2"),ft<39&&(this.achievements.setTag(he.f.Kills,this.achievements.data.kills),delete this.achievements.data.kills,this.achievements.setTag(he.f.QuestionsCorrect,this.achievements.data.qC),delete this.achievements.data.qC,this.achievements.setTag(he.f.GoldEarned,this.achievements.data.gE),delete this.achievements.data.gE,this.achievements.setTag(he.f.GoldSpent,this.achievements.data.gS),delete this.achievements.data.gS),ft<41&&this.kennel.data.filter((q=>Q.Aq$.isDefined(q.catchDate))).sort(((q,K)=>q.catchDate-K.catchDate)).forEach((q=>{this.encounters.setPetFirstRescuedDate(q.ID,q.catchDate)})),ft<42){const q=new Date("2022-10-01").getTime();this.encounters.getDataAndClear().pets.filter((q=>q.timesRescued>0&&!Q.Aq$.isDefined(q.firstRescuedDate))).forEach((K=>this.encounters.setPetFirstRescuedDate(K.ID,q)))}if(ft<43&&0===this.appearance.getFace()&&this.appearance.setFace(de.q.DEFAULT_FACE),ft<44){for(const q of this.kennel.data)q.uniqueID=(0,tt.Ak)();this.kennel.updated=!0}if(ft<45&&Gt.T.ready.then((()=>{var q;const K=yt.q.instance.prodigy.world.getZone(pt.A_.SHIVERCHILL);6===(null===(q=K.getState("quest"))||void 0===q?void 0:q.ID)&&!Q.Aq$.isDefined(K.getState("furnace"))&&(this.state.data.zone[pt.A_.SHIVERCHILL]={})})).catch(Q.RQr.createHandler("ActivePlayer.ts: Could not find experiment manager ")),ft<47&&Gt.T.ready.then((()=>{var q,K,z,Y,X;if(this.hasCompletedTutorial()){const J=yt.q.instance.prodigy.world.getZone(pt.A_.FOREST),tt=(null===(q=this.data)||void 0===q?void 0:q.questSystem)===me.p.Legacy,et=!Q.Aq$.isDefined(null===(K=this.data)||void 0===K?void 0:K.questSystem),it=!Z.isEqual(null===(z=J.getQuestState())||void 0===z?void 0:z.req,null===(Y=J.getCurrentQuest())||void 0===Y?void 0:Y.req),st=J.getCurrentQuestID()>5&&this.encounters.getPetTimesRescued(ee.c.PET_AWARD_ID)<1;if(tt||et&&(it||st)){J.migrateQuestProgress();const q=yt.q.instance.prodigy.world.getZone(pt.A_.SHIVERCHILL).questHub;this.data.lastVisitedMapForZone[pt.A_.SHIVERCHILL]=q,(null===(X=this.data)||void 0===X?void 0:X.zone.includes(pt.A_.SHIVERCHILL))&&(this.data.zone=q)}}})).catch(Q.RQr.createHandler("ActivePlayer.ts: Could not find experiment manager ")),ft<48&&this.appearance.gender&&delete this.appearance.gender,ft<49&&(Q.Aq$.isDefined(this.data.questSystem)&&"object"!=typeof this.data.questSystem&&delete this.data.questSystem,this.setQuestSystem(pt.A_.FOREST,me.p.Revised)),ft<50){const q=1===this.equipment.getOutfit(),K=this.backpack.hasItem("outfit",1)>0;q&&!K&&this.equipment.setOutfit(null)}if(ft<51&&!Q.Aq$.isDefined(this.data.nextLevelProgressPercent)&&Gt.T.ready.then((()=>{ae.legacyMigrateCreatureToLevelCurve(this.getPlayerData(),ut.V.Player),this.forceSaveCharacter()})).catch(Q.RQr.createHandler("[ActivePlayer] Error awaiting the experiment manager")),ft<52&&Gt.T.ready.then((()=>{for(const q of this.kennel.data)ae.legacyMigrateCreatureToLevelCurve(q,ut.V.Player);this.kennel.updated=!0,this.forceSaveCharacter()})).catch(Q.RQr.createHandler("[ActivePlayer] Error awaiting the experiment manager")),ft<53&&Q.Aq$.isDefined(this.data.rate)&&delete this.data.rate,ft<54&&(Q.Aq$.isDefined(this.getQuestSystem("ftue"))?this.getQuestSystem("ftue")===me.p.RevisedWithPlayerGoals?this.setQuestSystem("playerGoals",me.p.PlayerGoalsFtue):this.setQuestSystem("playerGoals",me.p.PlayerGoalsPostFtue):this.hasStartedTutorial()?this.setQuestSystem("playerGoals",me.p.PlayerGoalsPostFtue):this.setQuestSystem("playerGoals",me.p.PlayerGoalsFtue),this.forceSaveCharacter()),ft<55&&this.kennel.hasPet(245)){const q=re.t.getItem("pet",245),K=null==q?void 0:q.data.unlockFollow;Q.Aq$.isDefined(K)&&this.backpack.hasItem("follow",K)<1&&this.backpack.add("follow",K)}if(ft<56&&delete this.data.battleSystem,ft<57&&Array.isArray(this.data.lastStoreVisit)){const q={};this.data.lastStoreVisit.forEach((K=>q[K[0]]=K[1])),delete this.data.lastStoreVisit,this.data.lastStoreVisitLevels=q}if(ft<58&&!1===(null===(X=this.difficultyUnlocks)||void 0===X?void 0:X.hard)){yt.q.instance.prodigy.world.getZone(pt.A_.FORESTHARD).setState("quest",{})}if(ft<59&&(Q.Aq$.isDefined(this.data.bountyScore)&&delete this.data.bountyScore,this.backpack.consume("key",5,100),this.backpack.consume("key",6,100),this.backpack.consume("key",7,100),this.backpack.consume("item",84,100),this.backpack.consume("item",85,100),this.backpack.consume("item",86,100),this.state.set("world-bounties",void 0)),ft<60){const q=yt.q.instance.prodigy.world.getZone(pt.A_.SHIVERCHILL).getState("quest");if(12===(null==q?void 0:q.ID)&&0===q.seq){const K=this.backpack.hasItem("item",74);if(3===K||4===K?q.seq=1:5===K&&(q.seq=2),q.state)for(let z=1;z<=5;z++)q.state[z.toString()]=z<=K?1:0;this.state.data.zone[pt.A_.SHIVERCHILL].quest.seq=q.seq,this.state.data.zone[pt.A_.SHIVERCHILL].quest.state=q.state,this.state.updated=!0}}if(ft<61&&(null===(J=this.state.data.zone[pt.A_.SHIVERCHILLHARD])||void 0===J||delete J.uniqueEncounters,this.state.updated=!0),ft<62){const q=new Map([["C12-shipwreck_shore_C12_R1_boss",{assetType:"hat",assetID:270}],["C9-shipwreck_shore_C9_R1_boss",{assetType:"weapon",assetID:271}],["B6-shipwreck_shore_B6_R1_boss",{assetType:"boots",assetID:145}],["B2-shipwreck_shore_B2_R1_boss",{assetType:"outfit",assetID:262}]]),K=yt.q.instance.prodigy.world.getZone(pt.A_.SHIPWRECKHARD);for(const[Q,X]of q)K.getState(`uniqueEncounters-${Q}`)&&!this.backpack.hasItem(X.assetType,X.assetID)&&this.backpack.add(X.assetType,X.assetID);const z=K.getState("quest");(null==z?void 0:z.ID)&&z.ID>11&&(this.backpack.hasItem("spellRelic",59)||this.backpack.add("spellRelic",59));const Y=yt.q.instance.prodigy.world.getZone(pt.A_.SHIVERCHILLHARD).getState("quest");(null==Y?void 0:Y.ID)&&Y.ID>13&&(this.backpack.hasItem("spellRelic",57)||this.backpack.add("spellRelic",57)),this.state.updated=!0}if(ft<63){const q=yt.q.instance.prodigy.world.getZone(pt.A_.SHIVERCHILLHARD).getState("quest"),K=this.state.data.zone[pt.A_.SHIVERCHILLHARD];if(1===(null==q?void 0:q.ID)&&2===(null==q?void 0:q.seq)){const q=["shiverchill_B10_S1_special","shiverchill_B10_S2_special","shiverchill_B10_S3_special"];for(const z of q)Q.Aq$.isDefined(null===(st=null===(et=null==K?void 0:K.uniqueEncounters)||void 0===et?void 0:et.B10)||void 0===st?void 0:st[z])&&delete K.uniqueEncounters.B10[z]}if(8===(null==q?void 0:q.ID)&&1===(null==q?void 0:q.seq)){const q=["shiverchill_B7_S1_special","shiverchill_B7_S2_special"],z=["shiverchill_B6_S1_special","shiverchill_B6_S2_special"];for(const Y of q)Q.Aq$.isDefined(null===(at=null===(nt=null==K?void 0:K.uniqueEncounters)||void 0===nt?void 0:nt.B7)||void 0===at?void 0:at[Y])&&delete K.uniqueEncounters.B7[Y];for(const Y of z)Q.Aq$.isDefined(null===(ht=null===(ot=null==K?void 0:K.uniqueEncounters)||void 0===ot?void 0:ot.B6)||void 0===ht?void 0:ht[Y])&&delete K.uniqueEncounters.B6[Y]}this.state.updated=!0}if(ft<64&&(null===(lt=this.data.questSystem)||void 0===lt||delete lt.zoneUnlockType,this.state.updated=!0),ft<65){const q=this.getPlayerData(),K=q.postBattleMemberVideo;K&&(q.featureInteractionTimestamps=Object.assign(Object.assign(Object.assign({},q.featureInteractionTimestamps),K.lastWatchedTimestamp&&{[rt.s.PostBattleFlowHome]:{timestamp:K.lastWatchedTimestamp,videoId:K.lastWatchedVideoId}}),K.lastWatchedSchoolTimestamp&&{[rt.s.PostBattleFlowSchool]:{timestamp:K.lastWatchedSchoolTimestamp,videoId:K.lastWatchedSchoolVideoId}}),delete q.postBattleMemberVideo)}if(ft<66){const q=yt.q.instance.prodigy.world.getZone(pt.A_.BONFIREHARD),K=q.getState("quest"),z=this.backpack.hasItem("key",12,it.i.Hard)>0,Y=this.hasFoundKeystone(pt.A_.BONFIREHARD);void 0!==(null==K?void 0:K.ID)&&K.ID>=1&&(!Y&&z&&K.ID<=12?(K.ID=13,K.seq=0,q.setState("lever1",1),q.setState("lever2",1),q.setState("lever3",1)):Y&&z&&K.ID<=14&&(K.ID=15,K.seq=0,q.setState("lever1",1),q.setState("lever2",1),q.setState("lever3",1)))}ft<66&&(this.getPlayerData().versionID=66,this.updated=!0)}validateTutorialState(){const q=this.hasCompletedTutorial(),K=this.hasStartedTutorial(),z=yt.q.instance.prodigy.gameContainer.get("be3-4f64"),Z="ftue",J=this.getQuestSystem(Z)===me.p.Legacy,tt=!Q.Aq$.isDefined(this.data.zone);if(tt&&!this.hasQuestSystemProperty(Z))return this.setQuestSystem(Z,me.p.RevisedWithPlayerGoals),void this.setQuestSystem("playerGoals",me.p.PlayerGoalsFtue);tt||q||z.getQuestStatus(It.M.FTUE).then((q=>(0,Y.sH)(this,void 0,void 0,(function*(){var Y,tt,et,it,st;const nt=q===at.t.COMPLETE,rt=q===at.t.IN_PROGRESS;if(nt){new Nt.G("",0).markTutorialComplete(),yt.q.instance.prodigy.world.it("forest-C8");const q=new Error("[User State Error] Tutorial completion flag does not match tutorial quest progress. See ActivePlayer.validateTutorialState()");X.captureException(q),Q.RQr.logError(q,"")}if(rt){const q=this.data.zone,K=yield z.getTasksInProgress(void 0,[It.M.FTUE]),Z=null===(st=null===(it=null===(et=null===(tt=null===(Y=null==K?void 0:K[0])||void 0===Y?void 0:Y.onSetupTasks)||void 0===tt?void 0:tt[0])||void 0===et?void 0:et.featureRequirements)||void 0===it?void 0:it.requirements)||void 0===st?void 0:st[0].currentMap;if(Q.Aq$.isDefined(Z)&&Z!==q){yt.q.instance.prodigy.world.it(Z);const q=new Error("[User State Error] User is on the wrong map for their current tutorial step. See ActivePlayer.validateTutorialState()");X.captureException(q),Q.RQr.logError(q,"")}}if(J)this.setQuestSystem(Z,me.p.RevisedWithPlayerGoals),this.setQuestSystem("playerGoals",me.p.PlayerGoalsFtue),this.resetAccount();else if(K){const K="ftue";switch(q){case at.t.IN_PROGRESS:Q.Aq$.isDefined(this.getQuestSystem(K))||(this.setQuestSystem(K,me.p.Revised),delete this.state.data.zone.academy.quest,this.state.updated=!0);break;case at.t.COMPLETE:new Nt.G("",0).markTutorialComplete();break;default:throw new Error("[ActivePlayer] QuestTaskStatus unknown")}}})))).catch(Q.RQr.createHandler("[ActivePlayer] Error when checking a player state with data from legacy and revamped tutorial"))}validateQuestState(){const q=yt.q.instance.prodigy.gameContainer.get("b37-c775"),K=this.highestDifficultyUnlocked,z=Zt.N.getCoreZonesInOrder(K).map((q=>({zoneInfo:q,keyAsset:ie.b.ZONE_KEYSTONES[q.zone],questManagerMapEntry:Dt.n[q.zone],hasFoundKeyStone:this.hasFoundKeystone(q.zone)})));q.managerSetupPromise.then((()=>{z.forEach((({keyAsset:z,questManagerMapEntry:Y,hasFoundKeyStone:X})=>{if(!Q.Aq$.isDefined(z)||!Q.Aq$.isDefined(Y))return;const{questTag:Z,questId:J}=Y,tt=q.questManagerMap.get(Z);null==tt||tt.getQuestStatus(J).then((q=>{X||q!==at.t.COMPLETE||Xt.J.bagItem({type:"key",ID:z,N:1,data:{seed:0,difficultyMode:K}},yt.q.instance.prodigy.game,"unknown",void 0,{source_type:ft.C.QuestReward})})).catch(Q.RQr.createHandler("[ActivePlayer] Error getting quest task status in validateQuestState"))})),z.forEach((({zoneInfo:K,questManagerMapEntry:z})=>{const{questTag:Y}=z,X=q.questManagerMap.get(Y);null==X||X.getTasksInProgress().then((q=>q.forEach((q=>{Mt.validateUniqueEncounterTaskState(this.state,K.zone,q),Mt.validateReceiveItemUniqueEncounterTaskState(this.state,K.zone,q)})))).catch(Q.RQr.createHandler("[ActivePlayer] Error getting tasks in progress in validateQuestState"))}));const Y=K===it.i.Hard?yt.q.instance.prodigy.world.getZone(pt.A_.SHIVERCHILLHARD):yt.q.instance.prodigy.world.getZone(pt.A_.SHIVERCHILL),X=Y.getState("quest");12===(null==X?void 0:X.ID)&&0===X.seq?this.validateCollectItemQuest(Y,74,["quest-state-1","quest-state-2","quest-state-3"]):12===(null==X?void 0:X.ID)&&1===X.seq&&this.validateCollectItemQuest(Y,74,["quest-state-1","quest-state-2","quest-state-3","quest-state-4","quest-state-5"]);const Z=K===it.i.Hard?yt.q.instance.prodigy.world.getZone(pt.A_.SKYWATCHHARD):yt.q.instance.prodigy.world.getZone(pt.A_.SKYWATCH),J=Z.getState("quest");12===(null==J?void 0:J.ID)&&0===J.seq&&this.validateCollectItemQuest(Z,82,["quest-state-0","quest-state-1"]),Vt.F.validateZoneProgressionType()})).catch(Q.RQr.createHandler("[ActivePlayer] Error awaiting quest manager hub in validateQuestState"))}validateCollectItemQuest(q,K,z){const Y=this.backpack.hasItem("item",K,q.difficultyMode),Q=z.reduce(((K,z)=>K+(q.getState(z)?1:0)),0),X=Q-Y;if(X>=0)for(let Z=X;Z-1)for(let q=117;q<=122;q++){const K=re.t.getItem("item",q).data;if(Q.Aq$.isDefined(K.effect)&&Q.Aq$.isDefined(K.effect.transform)&&K.effect.transform===this.getPlayerData().playerTransformation.transformType&&Q.Aq$.isDefined(K.effect.ID)&&K.effect.ID===this.getPlayerData().playerTransformation.transformID)return Q.Aq$.isDefined(K.effect.time)?K.effect.time:0}return 0}addAssets(q){for(let K=0;K{this.forceSaveCharacter(q,!1)}));const Y=this.saveEnabled;this.saveEnabled=!0,this.updated=!0,z.onPlayerSaved.addOnce((()=>{q&&q()})),z.updateCharacter(),this.saveEnabled=Y}resetAccount(){Q.VyI.log("Resetting account!",Q.$bb.Verbose),this.data.level=Tt.s.minLevel,this.data.stars=0,this.data.storedMemberStars=0,this.updated=!0,this.tutorial.setData({zones:{},menus:{}}),this.tutorial.updated=!0,this.backpack=new ce.H;const q=Z.filter(this.kennel.data,(q=>q.ID<=133&&q.ID>=125));let K;if(this.kennel.populateKennel(q),Z.forEach(this.kennel.data,(q=>{this.backpack.add("follow",re.t.getItem("pet",q.ID).data.unlockFollow)})),this.backpack.updated=!0,this.kennel.updated=!0,this.data.lastStoreVisitLevels={},this.appearance.setName(new ct.S),this.name.init(this.appearance.getName()),this.equipment.clearData(),this.encounters.setData(null),this.encounters.updated=!0,this.state.data.breadcrumbs[St.D.FEATURE_NAME]&&(K=this.state.data.breadcrumbs[St.D.FEATURE_NAME]),this.state.data.tutorial={},Q.Aq$.isDefined(this.state.data.zone))for(const z in this.state.data.zone){const q=Ee.ACCOUNT_RESET_ZONE_KEEPERS.indexOf(z)>-1;this.state.data.zone.hasOwnProperty(z)&&!q&&(this.state.data.zone[z]=void 0)}else this.state.data.zone={};this.state.data.world={},this.state.data.breadcrumbs={},K&&(this.state.data.breadcrumbs[St.D.FEATURE_NAME]=K),this.state.data.keystones=null,this.state.updated=!0}validateLevel(){const q=Tt.s.minLevel,K=Tt.s.activePlayerLevelCap;if(!Q.Aq$.isDefined(this.data.level)){const K=new ht.i;K.setKey("prodigy_game.APIClient.InvalidLvlValidate"),K.setValue(1),this._remoteLogger.logStat(K,ot.d.Increment),Q.VyI.log("Invalid level found, so setting to level 1.",Q.$bb.Error),this.data.level=q,this.data.stars=Tt.s.xpRequiredForLevel(q,ut.V.Player)}this.currentMaxLevel=K}setChargedLevelsData(q){var K,z,Y;const X=null===(K=this.data.chargedLevelData)||void 0===K?void 0:K.chargedLevel,Z=null==q?void 0:q.chargedLevel;this.data.chargedLevelData=q,null!==(z=(Y=this.data).unsecureChargedLevelData)&&void 0!==z||(Y.unsecureChargedLevelData={});const J=new Date(this.data.chargedLevelData.decayImmunityExpiryDate),tt=new Date;if(Q.Aq$.isDefined(X)&&Q.Aq$.isDefined(Z)&&X!==Z){this.data.chargedLevelData.hasJustReachedConversionMilestone||(this.data.chargedLevelData.hasJustReachedConversionMilestone=Ee.CHARGED_LEVELS_CONVERSION_MILESTONES.some((q=>q>X&&q<=Z))||Z===this.data.chargedLevelData.chargedLevelCap);yt.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"Charged Level",progressionNewValue:(this.getLevel()+Z).toString(),progressionPreviousValue:(this.getLevel()+X).toString(),creatureName:"Player"},{pointType:"stars",pointCount:this.getStars()+this.data.chargedLevelData.chargedLevelCumulativeXp},{decay_is_frozen:Q.Aq$.isDefined(this.data.chargedLevelData.decayImmunityExpiryDate)&&J>tt})}}updateChargedLevelsData(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;const Q=yt.q.instance.prodigy.gameContainer.get("d94-655c"),X=yt.q.instance.prodigy.breadcrumbManager;if(!X.isBreadcrumbComplete(dt.B.FEATURE_CHARGED_LEVELS,dt.B.BREADCRUMB_CHARGED_LEVELS_CLEARED)&&Et.J.shouldClearChargedLevels)return yield Q.clearChargedLevelData(),void X.completeBreadcrumb(dt.B.FEATURE_CHARGED_LEVELS,dt.B.BREADCRUMB_CHARGED_LEVELS_CLEARED);const Z=yield Q.GetChargedLevelProgressData(),J=null!==(K=null===(q=this.data.chargedLevelData)||void 0===q?void 0:q.hasReceivedFreeChargedLevel)&&void 0!==K&&K;Z.hasJustReachedConversionMilestone=null!==(Y=null===(z=this.data.chargedLevelData)||void 0===z?void 0:z.hasJustReachedConversionMilestone)&&void 0!==Y&&Y,this.setChargedLevelsData(Z),this.data.chargedLevelData&&(this.data.chargedLevelData.hasJustReceivedFreeChargedLevel=!J&&Z.hasReceivedFreeChargedLevel)}))}setSegmentedOfferState(q){this.data.segmentedOfferState=q,this.forceSaveCharacter()}clearSegmentedOfferState(){this.data.segmentedOfferState=void 0,this.forceSaveCharacter()}onEducationLoaded(q){this._educationData=Ut.updateEducationData(this._educationData,q)}setEducation(q,K){this._educationData.chosenGrade=q,this._educationData.grade=q,this._educationData.curriculumTreeID=K}initEducation(){yt.q.instance.prodigy.education.initialize(Z.cloneDeep(this._educationData)),se.s.get("GameConstants.Debug.EDUCATION_LOGGING_ENABLED")?yt.q.instance.prodigy.education.enableLogging():yt.q.instance.prodigy.education.disableLogging()}isPlayingAtSchool(){return"school"===this.locationSelectionType}setLocation(q){"school"===q&&yt.q.instance.prodigy.classModeController.setClassMode(),this._locationSelectionType=q}get playerContainer(){return this._playerContainer}set playerContainer(q){this._playerContainer=q}get isZoneQuestEnabled(){return this.ultimateSessionStatus===ye.n.None||this.ultimateSessionStatus===ye.n.CollectingItems}get isTrackingQuestEnabled(){return this.ultimateSessionStatus===ye.n.TrackingNPC||this.ultimateSessionStatus===ye.n.TamingUltimate}getUltimatePetId(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yt.q.instance.prodigy.gameContainer.get("996-2681"),K=yield q.getQuestMetaData(this.ultimateQuestId);return null==K?void 0:K.petID}))}clearTransitionSessionStatus(){this._ultimateSessionStatus===ye.n.Transition&&this.setUltimateSessionStatus(ye.n.None)}unlockSessionStatus(){this._ultimateSessionStatusLocked=!1}setQuestSystem(q,K){var z,Y;null!==(z=(Y=this.data).questSystem)&&void 0!==z||(Y.questSystem={}),this.data.questSystem[q]=K,this.updated=!0}getQuestSystem(q){var K,z;return null!==(K=(z=this.data).questSystem)&&void 0!==K||(z.questSystem={}),this.data.questSystem[q]}hasQuestSystemProperty(q){var K;return null===(K=this.data.questSystem)||void 0===K?void 0:K.hasOwnProperty(q)}isOnRevisedQuestline(q){var K;switch(null===(K=this.data.questSystem)||void 0===K?void 0:K[q]){case me.p.Revised:case me.p.RevisedWithPlayerGoals:return!0}return!1}getMemberTier(){return yt.q.instance.prodigy.gameContainer.get("73f-58d1").memberTier}isAtMaxMembershipTier(){const q=this.getMemberTier(),K=q===bt._$.MemberPlus||q===bt._$.MemberUltimateMath,z=q===bt._$.MemberUltra||q===bt._$.MemberUltimateBundle;return Ht.pF.eligibleForMembershipPurchaseForMultipleTiers()?z:K}setDefeatedPetsData(q){this.data.defeatedPets=q,this.updated=!0}getDefeatedPetsData(){var q,K;null!==(q=(K=this.data).defeatedPets)&&void 0!==q||(K.defeatedPets={featureFunnelId:zt.$.generateUID(),lastFunnelDate:new Date(Date.now()),funnelStepsSeen:{}});const z=yt.q.instance.prodigy.gameContainer.get("668-8a41").getResetTime();return this.data.defeatedPets.lastFunnelDate>=z&&this.setDefeatedPetsData(Object.assign(Object.assign({},this.data.defeatedPets),{funnelStepsSeen:{},featureFunnelId:zt.$.generateUID(),lastFunnelDate:new Date(Date.now())})),this.data.defeatedPets}sendMembershipQueryRequest(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yt.q.instance.prodigy.gameContainer.get("800-a786");return vt.D.isFeatureEnabled()?q.sendRequest("\nquery upgradeOptions ($source: UpgradeOptionSource!) {\n viewer{\n id\n username\n name\n activeMemberships {\n id\n startDate\n categories\n ownerIsPartialUser\n ownerHasSSOCredentials\n plan {\n id\n amount\n currency\n name\n interval\n }\n upgradeOptions(input: { source: $source }) {\n membershipPlans {\n id\n amount\n currency\n name\n }\n package {\n id\n name\n tier\n }\n }\n currentPackage {\n name\n tier\n id\n }\n }\n isParent\n }\n}",{source:Ht.pF.getDeviceSource()}):q.sendRequest("\nquery upgradeOptions {\n viewer{\n id\n username\n name\n activeMemberships {\n id\n startDate\n categories\n ownerIsPartialUser\n ownerHasSSOCredentials\n plan {\n id\n amount\n currency\n name\n interval\n }\n upgradeOptions {\n membershipPlans {\n id\n amount\n currency\n name\n }\n package {\n id\n name\n tier\n }\n }\n currentPackage {\n name\n tier\n id\n }\n }\n isParent\n }\n}")}))}isUsernameInGameDisplayEnabled(){var q,K,z,Y;const X=(0,jt.G)(nt);if(!(null==X?void 0:X.enabled))return!1;if(Q.Aq$.isDefined(null===(q=this.data)||void 0===q?void 0:q.lastLoginAtHome)&&Q.Aq$.isDefined(null===(K=this.data)||void 0===K?void 0:K.lastLoginAtSchool))return!1;if(Q.Aq$.isDefined(X.numberSessionsToShowUsername)){return(null!==(Y=null===(z=this.data)||void 0===z?void 0:z.sessionCount)&&void 0!==Y?Y:0)<=X.numberSessionsToShowUsername}return!0}shouldShowUsernameAbovePlayer(){return this.isUsernameInGameDisplayEnabled()}shouldShowWizardNameAbovePlayer(){return!this.isUsernameInGameDisplayEnabled()||!!(0,jt.G)(nt).showBothNames}hasMembershipUpgradeOptions(){var q,K;return((null===(K=null===(q=this.membershipUpsell)||void 0===q?void 0:q.upgradeOptions)||void 0===K?void 0:K.length)||0)>0}canPurchaseMembershipInGame(){return!this.hasMembership()||!1===this.membershipUpsell.ownerIsPartialUser&&!1===this.membershipUpsell.ownerHasSSOCredentials&&this.hasMembershipUpgradeOptions()}addExperimentToEligiblilityList(q){var K,z;null!==(K=(z=this.data).experimentEligibilityList)&&void 0!==K||(z.experimentEligibilityList=[]),Q.Aq$.isDefined(q)&&!this.data.experimentEligibilityList.includes(q)&&(this.data.experimentEligibilityList.push(q),this.updated=!0)}removeExperimentFromEligibilityList(q){if(!Q.Aq$.isDefined(this.data.experimentEligibilityList))return;const K=this.data.experimentEligibilityList.indexOf(q);-1!==K&&(this.data.experimentEligibilityList.splice(K,1),this.updated=!0)}doMembershipLapsedCheck(){const q=yt.q.instance.prodigy.gameContainer.get("73f-58d1").memberTier!==bt._$.NonMember;!q&&this.data.wasMemberLastSession&&yt.q.instance.prodigy.game.broadcaster.broadcast(xt.H3.MembershipLapsedBetweenSessions),this.data.wasMemberLastSession=q}}Ee.ACCOUNT_RESET_ZONE_KEEPERS=[pt.A_.TOWERTOWN],Ee.PLAYER_BATTLE_STREAK_CAP=3,Ee.CHARGED_LEVELS_CONVERSION_MILESTONES=[2,10,20],(0,Y.Cg)([(0,mt.b)("6d6-463e"),(0,Y.Sn)("design:type",gt.U)],Ee.prototype,"_secureInventory",void 0)},51894:(q,K,z)=>{"use strict";z.d(K,{H:()=>at});var Y,Q=z(62459),X=z(95359),Z=z(97495);!function(q){q.Unit="unit",q.Team="team"}(Y||(Y={}));var J=z(35120),tt=z(73797),et=z(30226),it=z(40549),st=z(77938),nt=z(5898);class at{constructor(){this.data=null,this.updated=!1,this.onKeyAddedToBackpack=new Q.HN0,this.data={hat:[],boots:[],weapon:[],outfit:[],item:[],fossil:[],key:[],relic:[],currency:[],follow:[],mount:[],spellRelic:[],costume:[]}}static sortBackpackGearByStats(q){q.sort(((q,K)=>{var z,Y,Q,X,Z,J,tt,et;const it=null!==(X=null!==(Q=null!==(Y=null!==(z=q.hp)&&void 0!==z?z:0+q.power)&&void 0!==Y?Y:0+q.defence)&&void 0!==Q?Q:0+q.speed)&&void 0!==X?X:0,st=null!==(et=null!==(tt=null!==(J=null!==(Z=K.hp)&&void 0!==Z?Z:0+K.power)&&void 0!==J?J:0+K.defence)&&void 0!==tt?tt:0+K.speed)&&void 0!==et?et:0;return it===st?K.ID-q.ID:st-it}))}getDataAndClear(){return this.updated=!1,this.data}unlockAllItems(){for(const q in this.data){const K=this.data[q];for(let q=0;q{switch(q){case"weapon":this.data.weapon.forEach((q=>{var K,z;const Y=st.t.getItem("weapon",q.ID);q.power=null===(z=null===(K=Y.data)||void 0===K?void 0:K.stats)||void 0===z?void 0:z.power}));break;case"hat":this.data.hat.forEach((q=>{var K,z;const Y=st.t.getItem("hat",q.ID);q.hp=null===(z=null===(K=Y.data)||void 0===K?void 0:K.stats)||void 0===z?void 0:z.hp}));break;case"outfit":this.data.outfit.forEach((q=>{var K,z;const Y=st.t.getItem("outfit",q.ID);q.defence=null===(z=null===(K=Y.data)||void 0===K?void 0:K.stats)||void 0===z?void 0:z.defence}));break;case"boots":this.data.boots.forEach((q=>{var K,z;const Y=st.t.getItem("boots",q.ID);q.speed=null===(z=null===(K=null==Y?void 0:Y.data)||void 0===K?void 0:K.stats)||void 0===z?void 0:z.speed}))}}))}setItemDifficulties(){var q,K;null===(q=this.data.key)||void 0===q||q.forEach((q=>{var K;return null!==(K=q.difficulty)&&void 0!==K?K:q.difficulty=Z.i.Regular})),null===(K=this.data.item)||void 0===K||K.forEach((q=>{var K,z;const Y=st.t.getItem(q.type,q.ID);(null===(K=null==Y?void 0:Y.data)||void 0===K?void 0:K.quest)&&(null!==(z=q.difficulty)&&void 0!==z||(q.difficulty=Z.i.Regular))}))}getTotalUnique(){let q=0;for(const K in this.data)q+=this.data[K].length;return q}setKeyItemData(q,K,z){if(Q.Aq$.isDefined(this.data.key)){for(let Y=0;Yq.ID===K))}hasItem(q,K,z=null){var Y;if("gold"===q||"currency"===q&&1===K)return 0;const Q=this.getItem(q,K,z);return Q?null!==(Y=Q.N)&&void 0!==Y?Y:1:0}hasItems(q){let K=0;for(let z=0;z0&&K++}return K}hasItemsOfType(q){return this.getBackpackItemsByType(q).length>0}hasMaxQuantityOfItem(q,K){return"currency"!==q&&this.hasItem(q,K)>=99}addKeyItem(q,K,z){var Y,X,tt;Q.Aq$.isDefined(this.data.key)||(this.data.key=[]);const et=this.data.key,it=null!==(tt=null!==(Y=null==z?void 0:z.difficultyMode)&&void 0!==Y?Y:null===(X=J.q.instance.prodigy.world.getCurrentZoneObject())||void 0===X?void 0:X.difficultyMode)&&void 0!==tt?tt:Z.i.Regular;for(let Q=0;Q99&&"currency"!==q&&(dt.N=99),J.q.instance.game.broadcaster.broadcast(tt.ib.ItemReceived,void 0,[{ID:K,type:q,N:Y,balance:dt.N}]),void(this.updated=!0);const ut={ID:K,type:q};ct>1&&(ut.N=ct),z&&(ut.L=1);const ft=null===(ht=st.t.getItem(q,K))||void 0===ht?void 0:ht.data;ft&&(Object.keys(X.IE).map((q=>X.IE[q])).forEach((q=>{var K,z;ut[q]=null!==(z=null===(K=ft.stats)||void 0===K?void 0:K[q])&&void 0!==z?z:0})),(null==ft?void 0:ft.quest)&&(ut.difficulty=lt)),this.data[q].push(ut),J.q.instance.game.broadcaster.broadcast(tt.ib.ItemReceived,void 0,[{ID:K,type:q,N:Y}]),this.updated=!0}consume(q,K,z=1){let Y=z;if(isNaN(Y)&&(Q.VyI.log(`Trying to consume item type: ${q} ID: ${K} with quantity NaN. Defaulting to 1.`,Q.$bb.Error),Y=1),Q.Aq$.isDefined(q)){const X=this.getItem(q,K);if(Q.Aq$.isDefined(X)){const Z=this.data[q];if(X.ID===K)return Q.Aq$.isDefined(X.N)?(X.N-=Y,1===X.N?delete X.N:X.N<=0&&Z.splice(Z.indexOf(X),1)):Z.splice(Z.indexOf(X),1),J.q.instance.game.broadcaster.broadcast(tt.ib.ItemConsumed,void 0,[{ID:K,type:q,N:z,balance:X.N}]),void(this.updated=!0)}}}getBackpackItemsByType(q,K=null){var z,Y;const X=this.data[q],tt=null!==(Y=null!=K?K:null===(z=J.q.instance.prodigy.world.getCurrentZoneObject())||void 0===z?void 0:z.difficultyMode)&&void 0!==Y?Y:Z.i.Regular;return Q.Aq$.isDefined(X)?X.filter((K=>!(at.invalidItems.some((z=>z.ID===K.ID&&z.type===q))||K.difficulty&&K.difficulty!==tt))):[]}getItemCount(q){let K=0;for(let z=0;z{"use strict";z.d(K,{s:()=>Y});const Y=["boots","hat","outfit","weapon","mount","follow"]},38487:(q,K,z)=>{"use strict";z.d(K,{s:()=>Z});var Y=z(62459),Q=z(67462),X=z(39984);class Z extends X.e{constructor(q,K){super(q),this.showHealthBar=!1,this.data.level=K.level,this.data.nickname=K.nickname,this.source=K}getAttacks(q){return this.source.attacks||[]}getMaxHearts(){return this.source.maxHP}getName(){return this.source.name}getElement(){return this.source.element}getID(){return this.source.ID}getStarReward(){return Y.Aq$.isDefined(this.source.starBonus)?this.source.starBonus:super.getStarReward()}chooseAction(q,K,z,Y,Q,X){return!1}getBamSpells(q){const K=this.getAttacks(),z=[];for(let Y=0;Y0?[`default-boss-${q}`]:[]}}},37639:(q,K,z)=>{"use strict";z.d(K,{K:()=>st});var Y=z(62459),Q=z(5491),X=z(50503),Z=z(67462),J=z(77938),tt=z(27293),et=z(56463),it=z(39984);class st extends it.e{constructor(q){super(q),this.creatureType=Q.V.Player,this.appearance=null,this.equipment=null,this.appearance=new tt.q,this.equipment=new et.C}init(q){return!!super.init(q)&&(Y.Aq$.isDefined(q.appearance)&&this.appearance.init(q.appearance),Y.Aq$.isDefined(q.equipment)&&this.equipment.init(q.equipment),Y.Aq$.isDefined(q.data)&&Y.Aq$.isDefined(q.data.level)&&(this.data.level=q.data.level),!0)}createDataClone(){const q=super.createDataClone();return q.equipment=this.equipment,q}getBamSpells(q=this.getLevel()){const K=[],z=[],Y=[this.getNativeSpell(z,Z.U.Native),this.getNativeSpell(K,Z.U.Native)];return this.getEquipmentSpell(Z.U.Weapon).ID>0&&Y.push(this.getEquipmentSpell(Z.U.Weapon)),this.getEquipmentSpell(Z.U.SpellRelic).ID>0&&Y.push(this.getEquipmentSpell(Z.U.SpellRelic)),Y}getStatPower(){return 5}getStatHealth(){return 5}getHeartBonus(){return this.equipment.getHeartBonuses()}getDamageBonus(){return this.equipment.getDamageBonuses()}getMaxHearts(q=null){const K=Y.Aq$.isDefined(q)?q:this.getLevel(),z=Math.min(Math.floor(X.A.getCreatureHP(this,K)*this.getHeartBonus()),it.e.MAX_HEARTS);return Math.round(z*this.modifiers.maxHearts)}getEquipmentSpell(q){const K=this.equipment.getEquipment(q);if(Y.Aq$.isDefined(K)&&K>0){const z=J.t.getItem(q,K);if(Y.Aq$.isDefined(z)&&Y.Aq$.isDefined(z.data)&&Y.Aq$.isDefined(z.data.spellID))return{ID:z.data.spellID,type:q,locked:!1}}return Z.x.getLockedEquipmentBamSpell(q)}getNativeSpell(q,K){const z=this.getLevel();for(let Q=q.length-1;Q>0;Q--){const Y=q[Q];if(z>=Y.level)return{ID:Y.spellID,locked:!1,type:K,unlockLevel:Y.level}}const Y=q[0];return{ID:Y.spellID,locked:Y.level>z,type:K,unlockLevel:Y.level}}}},27293:(q,K,z)=>{"use strict";z.d(K,{q:()=>Z});var Y=z(62459),Q=z(95891),X=z(77938);class Z{constructor(){this.hairColor=null,this.hairStyle=null,this.skinColor=null,this.eyeColor=null,this.face=null}init(q){Y.Aq$.isDefined(q.hair)&&Y.Aq$.isDefined(q.hair.style)||(q.hair={style:this.getRandomDefaultHair(),color:1},Y.Aq$.isDefined(q.hairStyle)&&(q.hair.style=q.hairStyle),Y.Aq$.isDefined(q.hairColor)&&(q.hair.color=q.hairColor)),this.hairColor=Q.get(q,"hair.color",1),this.hairStyle=Q.get(q,"hair.style",this.getRandomDefaultHair()),this.skinColor=q.skinColor,this.eyeColor=q.eyeColor,this.face=q.face}getRandomDefaultHair(){return Math.random()<.5?1:16}getHair(){return X.t.doesExist("hair",this.hairStyle)&&X.t.doesExist("hairColor",this.hairColor)?{style:this.hairStyle,color:this.hairColor}:{style:this.getRandomDefaultHair(),color:1}}setHair(q,K){this.getHair(),Y.Aq$.isDefined(q)&&X.t.doesExist("hair",q)&&q!==this.hairStyle&&(this.hairStyle=q),Y.Aq$.isDefined(K)&&X.t.doesExist("hairColor",K)&&K!==this.hairColor&&(this.hairColor=K)}getFace(){return Y.Aq$.isDefined(this.face)&&X.t.doesExist("face",this.face)||(this.face=Z.DEFAULT_FACE),this.face}setFace(q){X.t.doesExist("face",q)&&this.face!==q&&(this.face=q)}getEyeColor(){return X.t.doesExist("eyeColor",this.eyeColor)?this.eyeColor:1}setEyeColor(q){X.t.doesExist("eyeColor",q)&&(this.eyeColor=q)}getSkinColor(){return X.t.doesExist("skinColor",this.skinColor)?this.skinColor:1}setSkinColor(q){X.t.doesExist("skinColor",q)&&(this.skinColor=q)}}Z.DEFAULT_FACE=20},56463:(q,K,z)=>{"use strict";z.d(K,{C:()=>X});var Y=z(62459),Q=z(77938);class X{constructor(){this.follow=null,this.hat=null,this.outfit=null,this.weapon=null,this.spellRelic=null,this.boots=null,this.mount=null}init(q){this.follow=q.follow,this.hat=q.hat,this.outfit=q.outfit,this.weapon=q.weapon,this.spellRelic=q.spellRelic,this.boots=q.boots,this.mount=q.mount,this.costume=q.costume}getFollow(){return this.follow}setFollow(q){this.follow=q}getHat(){return this.hat}setHat(q){this.hat=q}getOutfit(){return this.outfit}setOutfit(q){this.outfit=q}getWeapon(){return this.weapon}setWeapon(q){this.weapon=q}getSpellRelic(){return this.spellRelic}setSpellRelic(q){this.spellRelic=q}getBoots(){return this.boots}setBoots(q){this.boots=q}setMount(q){this.mount=q}getMount(){return this.mount}setCostume(q){this.costume=q}getCostume(){return this.costume}getHeartBonuses(){return this.calculateAffixBonus("hearts")}getDamageBonuses(){return this.calculateAffixBonus("damage")}calculateAffixBonus(q){const K="hearts"===q||"damage"===q;let z=K?1:0;const X=this.getAllAffixes();for(let Z=0;Z0)return q}return[]}getEquipment(q){let K=0;switch(q){case"follow":K=this.follow;break;case"hat":K=this.hat;break;case"outfit":K=this.outfit;break;case"weapon":K=this.weapon;break;case"spellRelic":K=this.spellRelic;break;case"boots":K=this.boots;break;case"mount":K=this.mount;break;case"costume":K=this.costume}return Y.Aq$.isDefined(K)&&K>0?K:null}getData(){return{follow:this.follow,hat:this.hat,outfit:this.outfit,weapon:this.weapon,spellRelic:this.spellRelic,boots:this.boots,mount:this.mount,costume:this.costume}}}},34574:(q,K,z)=>{"use strict";z.d(K,{T:()=>Y,d:()=>X});var Y,Q=z(62459);!function(q){q.NotHostingTeam="NOT_HOSTING_TEAM",q.TeamFull="TEAM_FULL",q.AlreadyJoined="ALREADY_JOINED",q.Timeout="TIMEOUT"}(Y||(Y={}));class X{constructor(){this.hostID=null,this.streak=0,this.teamMembers=[],this.readyMembers=[],this.maxTeamSize=3,this.onTeamMemberJoined=new Q.HN0,this.onTeamMemberLeft=new Q.HN0,this.onTeamMemberReady=new Q.HN0}get HostID(){return this.hostID}set HostID(q){this.hostID=q}get Streak(){return this.streak}set Streak(q){this.streak=q}get TeamMembers(){return this.teamMembers}set TeamMembers(q){this.teamMembers=q}get ReadyMembers(){return this.readyMembers}set ReadyMembers(q){this.readyMembers=q}get MaxTeamSize(){return this.maxTeamSize}set MaxTeamSize(q){this.maxTeamSize=q}get OnTeamMemberJoined(){return this.onTeamMemberJoined}get OnTeamMemberLeft(){return this.onTeamMemberLeft}get OnTeamMemberReady(){return this.onTeamMemberReady}addPlayer(q,K=null){return this.teamMembers.indexOf(q)>-1?(null!==K&&(K.reason=Y.AlreadyJoined),!1):this.teamMembers.length>=this.maxTeamSize?(null!==K&&(K.reason=Y.TeamFull),!1):(this.teamMembers.push(q),this.readyMembers.push(q),this.streak=0,this.onTeamMemberReady.dispatch(q),this.onTeamMemberJoined.dispatch(q),!0)}removePlayer(q){const K=this.teamMembers.indexOf(q);if(K>-1){this.teamMembers.splice(K,1);this.readyMembers.indexOf(q)>-1&&this.readyMembers.splice(K,1),this.streak=0,this.onTeamMemberLeft.dispatch(q)}else Q.VyI.log("User was not found in team while removing",Q.$bb.Warning)}readyUpPlayer(q){if(this.teamMembers.indexOf(q)>-1){-1===this.readyMembers.indexOf(q)?(this.readyMembers.push(q),this.onTeamMemberReady.dispatch(q)):Q.VyI.log("User is already ready",Q.$bb.Warning)}else Q.VyI.log("User was not found in team to ready-up",Q.$bb.Warning)}destroy(){this.hostID=null,this.readyMembers=[],this.teamMembers=[],this.onTeamMemberJoined.dispose(),this.onTeamMemberReady.dispose(),this.onTeamMemberLeft.dispose()}}},39984:(q,K,z)=>{"use strict";z.d(K,{e:()=>ft});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(95359),tt=z(24521),et=z(87490);var it=z(6452),st=z(5491),nt=z(35120),at=z(50503),rt=z(55122),ot=z(73797),ht=z(68152),ct=z(23748),dt=z(22023),lt=z(23029),ut=z(77938);class ft{get currentMaxLevel(){var q;return null!==(q=this._currentMaxLevel)&&void 0!==q?q:rt.s.maxLevelConfig.regular}set currentMaxLevel(q){this._currentMaxLevel=Math.trunc(q)}set team(q){this.data.team=q}get team(){return this.data.team}removeTeam(){delete this.data.team}get bench(){return dt.P8.getPetBench(this.data.ID)}constructor(q){this.justLeveled=!1,this.starsEarned=0,this.data={},this.modifiers=null,this.type="B",this.creatureType=st.V.Pet,this._currentMaxLevel=rt.s.maxLevelConfig.regular,this.source=null,this.game=null,this.inPVP=!1,this.catchAttempt=0,this.starsToProcess=0,this.starsRewardBase=100,this.starsReward=100,this.pvpHP=0,this.isOpponent=!1,this.showHealthBar=!0,this.onHPChange=new Q.HN0,this.aoaTier=1,this.game=q,this.resetModifiers()}init(q){return Q.Aq$.isDefined(q)}createDataClone(){const q=new this.constructor(this.game);return q.setData(X.cloneDeep(this.data)),q}setData(q){this.data=q}static getHeartsFromCurve(q,K,z){const Y=ft.HP_BONUS[q];return 20*(Math.floor((Y+20)*z/100)-Math.floor((Y+20)*(K-1)/100))}static getLevelPercent(q,K,z){const Y=ft.levelFromStars(q,K,z);if(Y>=z)return 1;const Q=ft.starsToLevel(Y+1,K),X=ft.starsToLevel(Y,K);return(q-X)/(Q-X)}static getAttacksFromCurve(q,K,z){const Y=[];for(let X=0;X=K&&Z.lvl<=z&&Q.Aq$.isDefined(Z.a)&&Y.push(Z.a)}return Y}static getEvolutionsFromCurve(q,K,z){const Y=[];let X=!1;for(let Z=0;Z=K&&J.lvl<=z&&Q.Aq$.isDefined(tt)&&Y.push(J)}if(X){let q=Y.length;for(;q-- >0;)Q.Aq$.isDefined(Y[q].e)&&Y[q].e>0&&Y.splice(q,1)}return Y}static getAttacksOfType(q,K=null){const z=[];for(let Y=0;Y(Q.Aq$.isDefined(z)&&(Y>=K.length||z!==K[Y])&&q.push({oldId:K[Y],newId:z,newlyUnlocked:!Q.Aq$.isDefined(K[Y])}),q)),[])}getAvailableEvolutions(q=this.getLevel()){const K=ft.getEvolutionsFromCurve(this.getLevelingCurve(q),1,q),z=this.getID();let Y=[];K.sort(((q,K)=>q.lvl-K.lvl));let Q=X.findIndex(K,(q=>q.evolveID===z));Q<=-1&&(Q=X.findIndex(K,(q=>q.e===z)));const Z=Q+1;return Z>=0&&Zthis.getMaxHearts()&&(this.data.hp=this.getMaxHearts()),q=this.data.hp):q=this.getMaxHearts(),ct.z.validateInt(q,this.getMaxHearts())}getMaxHearts(q){const K=Q.Aq$.isDefined(q)?q:this.getLevel();return Math.min(Math.floor(at.A.getCreatureHP(this,K)),ft.MAX_HEARTS)}getBaseMaxHearts(q){return this.getMaxHearts(q)}updateModifier(q,K){"potion"===q?this.modifiers.potion=K:"barrier"===q?this.modifiers.barrier=K:Q.Aq$.isDefined(this.modifiers[q])&&(this.modifiers[q]+=K,this.modifiers[q]<=0&&(this.modifiers[q]=.01))}registerIncomingAttack(q,K,z,Y){}changeCurrentHeartsPercent(q){const K=Math.round(this.getMaxHearts()*q);this.changeCurrentHearts(K)}changeCurrentHearts(q,K=0){const z=this.getCurrentHearts();this.setCurrentHearts(z+q,K)}setCurrentHearts(q,K=0){const z=this.getCurrentHearts(),Y=Q.cj9.clamp(q,K,this.getMaxHearts());this.inPVP?this.pvpHP=Math.round(Y):this.data.hp=Math.round(Y),this.onHPChange.dispatch(this,Y-z)}processStars(){this.starsToProcess>0?this.addStars(this.starsToProcess):this.game.broadcaster.broadcast(ot.ig.AnimationDone,this)}addStars(q,K=!1,z=!1){if(K)return!1;if(this.isOpponent)return!1;const Y=Math.round(q);let X=!1;this.starsToProcess=0;const Z=this.getLevel(),J=nt.q.instance.prodigy.gameContainer.get("20f-5f67"),tt=ut.t.getItem("pet",this.getID());if(this.game.broadcaster.broadcast(ot.ig.StarsAdded,this,null),Z>=this.currentMaxLevel)return Q.Aq$.isDefined(tt)&&J.playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Pet Level",progressionAction:"level_capped",progressionValue:this.getLevel().toString(),creatureName:tt.data.name},{pointType:"stars",pointCount:this.getStars()}),!1;if(Q.Aq$.isDefined(this.data.stars)?this.data.stars+=Y:this.data.stars=Y,z||(this.starsEarned+=Y),this.data.level=ft.levelFromStars(this.data.stars,this.creatureType,this.currentMaxLevel),this.data.nextLevelProgressPercent=ft.getLevelPercent(this.getStars(),this.creatureType,this.currentMaxLevel),Z!==this.data.level){const q=this.data.level-Z;if(q>0){const q=nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let K;this.data===q.data&&this.data.ID===q.data.ID?K={progressionType:"Player Level",creatureName:"Player"}:Q.Aq$.isDefined(tt)&&(K={progressionType:"Pet Level",creatureName:tt.data.name}),J.playerProgression.sendPlayerProgressionAdvancedEvent(Object.assign(Object.assign({},K),{progressionNewValue:this.getLevel().toString(),progressionPreviousValue:Z.toString()}),{pointType:"stars",pointCount:this.getStars()})}this.justLeveled=!0,X=!0,this.game.broadcaster.broadcast(ot.ig.LevelUp,this,[q]),this.game.broadcaster.broadcast(ot.ig.AnyLevelUp,null,[q]),this.game.broadcaster.broadcast(ot.ig.AnyLevelUp,ot.HG.WeekendEventsLevelUp,[q])}return X}getStarsToLevel(){const q=this.getStars(),K=this.getLevel()>=this.currentMaxLevel?this.getLevel():this.getLevel()+1,z=ft.starsToLevel(K,this.creatureType);return Math.max(0,z-q)}getStarsToMaxLevel(){const q=this.getStars(),K=ft.starsToLevel(this.currentMaxLevel,this.creatureType);return Math.max(0,K-q)}getPercentToLevel(){if(this.getLevel()>=100)return 1;const q=ft.levelFromStars(this.getStars(),this.creatureType,this.currentMaxLevel),K=ft.starsToLevel(q,this.creatureType),z=ft.starsToLevel(q+1,this.creatureType);return(this.getStars()-K)/(z-K)}getStars(){var q;return Q.Aq$.isDefined(this.data.stars)||(this.data.stars=0),ct.z.validateInt(null===(q=this.data)||void 0===q?void 0:q.stars,0)}getStarRewardByDamage(q){const K=this.getMaxHearts(this.getLevel()),z=this.getCurrentHearts();let Y=0,Q=q;return Q>=z?(Q=z,Y=Math.floor(this.starsRewardBase*(Q/K)),Yut.t.getItem("spell",q.ID).metadata.assets))}getAvailableSpells(q=this.getLevel()){const K=this.getBattleAssetSpecifier(),z=ut.t.getItem(K.type,K.id).data.spells.filter((K=>K.level<=q)),Y=X.groupBy(z,(q=>q.slot));return Object.values(Y).reduce(((q,K)=>(q[K[0].slot-1]=X.maxBy(K,(q=>q.level)).id,q)),[])}getBattleAssetSpecifier(){return{type:"pet",id:this.getID()}}}ft.MAX_HEARTS=5e4,ft.HP_BONUS={"A+":4,A:3,"A-":2,"B+":1,B:0,"B-":-1,"C+":-2,C:-3,"C-":-4}},48208:(q,K,z)=>{"use strict";z.d(K,{V:()=>et});var Y=z(62459),Q=z(35120),X=z(19586),Z=z(34829),J=z(90661),tt=z(77938);class et{constructor(){this.data=et.getDefaultData(),this.previousData=null,this.currentDay=0,this.rewards=null,this.onDataUpdated=new Y.HN0}static isNewWeek(q,K,z=1){let Y=(7-K.getDay()+z)%7;0===Y&&(Y=7);const Q=K.getTime()+864e5*Y,X=new Date(Q);return X.setHours(0),X.setSeconds(0),X.setMilliseconds(0),q.getTime()>=X.getTime()}static isNewDay(q,K){const z=new Date(q.getFullYear(),q.getMonth(),q.getDate()),Y=new Date(K.getFullYear(),K.getMonth(),K.getDate());return z.getTime()>Y.getTime()}static hasDayPassed(q,K,z=1){let Y=q-z;Y<0&&(Y+=7);let Q=K-z;return Q<0&&(Q+=7),Qq.original.ID===Q.ID&&q.original.type===Q.type&&q.replacements.length>0));if(q>=0){const K=Y[q].replacements;for(let q=0;q=this.getNumRequired(this.currentDay)&&(this.setDayComplete(this.currentDay,!0),this.giveReward(this.currentDay,K,z,Y))}clearPreviousData(){this.previousData=null}hasPreviousData(){return Y.Aq$.isDefined(this.previousData)}giveReward(q,K,z,Y=null){const Q=this.getRewards(q,Y);for(let X=0;X{"use strict";z.d(K,{F:()=>st});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(51151),J=z(63011),tt=z(66582),et=z(37251),it=z(13956);let st=class{get data(){return this._data}get isMember(){var q,K;return!(null===(K=null===(q=this._data)||void 0===q?void 0:q.active)||void 0===K||!K)}get memberTier(){return this.hasFeatureAccess(J.D.BATTLE_PASS_PREMIUM)?this.hasFeatureAccess(J.D.ULTIMATE_MEMBERBOX)?this.hasFeatureAccess(J.D.ULTIMATE_BONUS_COINS)||this.hasFeatureAccess(J.D.ULTRA_BONUS_COINS)?tt._$.MemberUltra:tt._$.MemberPlus:tt._$.MemberCore:tt._$.NonMember}get memberStartDate(){return this._memberStartDate}get memberEndDate(){return this._memberEndDate}hasFeatureAccess(q){var K,z,Y;return null!==(Y=null===(z=null===(K=this._data)||void 0===K?void 0:K.features)||void 0===z?void 0:z.includes(q))&&void 0!==Y&&Y}updateFeatureAccess(){return(0,Y.sH)(this,void 0,void 0,(function*(){try{const q=yield this._catalyst.featureAccess.update();return this._data=this.convertFeatureAccessResponseToMembership(q),this.updateMembershipDates(),this._data}catch(q){throw q}}))}refreshMembership(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._data)return null;const q=yield this._catalyst.featureAccess.update(),K=this.convertFeatureAccessResponseToMembership(q);return K&&(this._data=K,this.updateMembershipDates()),this._data}))}convertFeatureAccessResponseToMembership(q){return Z.Membership.create(q.data)}updateMembershipDates(){var q;(null===(q=this._data)||void 0===q?void 0:q.active)&&(Q.Aq$.isDefined(this._data.membershipStartTs)?this._memberStartDate=new Date(this._data.membershipStartTs).toISOString():this._memberStartDate=(new Date).toISOString(),Q.Aq$.isDefined(this._data.membershipEndTs)?this._memberEndDate=new Date(this._data.membershipEndTs).toISOString():this._memberEndDate=null)}debugSetMembership(q=!0,K=(new Date).toISOString(),z){}};(0,Y.Cg)([(0,it.b)("b09-138c"),(0,Y.Sn)("design:type",et.X)],st.prototype,"_catalyst",void 0),st=(0,Y.Cg)([(0,X.injectable)()],st)},13729:(q,K,z)=>{"use strict";z.d(K,{W:()=>Y,f:()=>Q});const Y=["hat","weapon","outfit","boots","follow","spellRelic","mount","costume"],Q=["hair","eyeColor","skinColor","hairColor","face"]},73722:(q,K,z)=>{"use strict";z.d(K,{V:()=>Q});var Y=z(62459);class Q{static get instance(){var q;return null!==(q=this._instance)&&void 0!==q?q:this._instance=new Q}get selectedLocation(){return this._selectedLocation}set selectedLocation(q){this._initComplete?Y.VyI.log("Selected location is already set through identity.",Y.$bb.Warning):this._selectedLocation=q}constructor(){if(this._initComplete=!1,!Q._instance){Q._instance=this;const q=window.SW.Load.userInfo?JSON.parse(window.SW.Load.userInfo()):null;(null==q?void 0:q.premises)&&(this._selectedLocation=q.premises,this._initComplete=!0)}}isInitComplete(){return this._initComplete}}},37465:(q,K,z)=>{"use strict";z.d(K,{o:()=>_t,u:()=>yt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(44329),tt=z(24521);const et=(0,z(77601).gb)({key:"fab-no-pet-inventory-limit",default:!1});var it=z(90633),st=z(65240),nt=z(76277),at=z(35120),rt=z(72772),ot=z(25834),ht=z(73797),ct=z(13956),dt=z(22023),lt=z(44094),ut=z(69698),ft=z(6413),bt=z(34829),pt=z(23029),vt=z(77938),gt=z(55734),mt=z(63834);function yt(q,K){const z=[],Y=new Set;Q.Aq$.isDefined(q.data.team)&&0===q.data.team?q.data.team>=ft.h.MAX_TEAM_SIZE&&(q.team=q.data.team=ft.h.MAX_TEAM_SIZE-1):(q.team=q.data.team=0,q.kennel.updated=!0);for(const X of K)Q.Aq$.isDefined(X.team)&&(z[X.team]||X.team===q.data.team||X.team>=ft.h.MAX_TEAM_SIZE?(delete X.team,Y.add(X)):z[X.team]=X),Q.Aq$.isDefined(X.temporaryTeamPosition)&&(delete X.temporaryTeamPosition,Y.add(X)),Q.Aq$.isDefined(X.uniqueID)||(X.uniqueID=(0,J.Ak)(),Y.add(X));return Y.size>0&&(q.kennel.updated=!0),z}class _t{get data(){return this._petData}get petTeam(){return this._petTeam}constructor(q,K){this._petData=[],this._petTeam=new Array(ft.h.MAX_TEAM_SIZE).fill(null),this.onPetRemoved=new Q.HN0,this.updated=!1,this.player=q,this._encounterInfo=K}getDataAndClear(){return this._bridge.saveUpdatedPets(...this._petData),this.updated=!1,this._petData}populateKennel(q){this._petData=q,this._petTeam.fill(null);yt(this.player,this._petData).forEach((q=>{this._petTeam[q.team]=this.createNewPet(q)})),this._petTeam[this.player.data.team]=this.player}refreshPetTeamData(){this.refreshPetInTeamPosition(1),this.refreshPetInTeamPosition(2)}refreshPetInTeamPosition(q){const K=this.petTeam[q];null!==K&&this.setTeamPosition(K.data,q)}getPets(q=!1){return q?this._petData.filter((q=>!Q.Aq$.isDefined(q.team))):this._petData}getPrimaryPets(q=!1){let K=this.getPets(q);return dt.P8.showUniquePetsFeature()&&q&&(K=K.filter((q=>!this.getPetTeamIDs().includes(q.ID)))),dt.P8.filterPrimaryPets(K)}getPrimaryPetById(q){return dt.P8.getPrimaryPet(q,this.getPets())}getPetByID(q){var K;return null!==(K=this._petData.find((K=>K.ID===q)))&&void 0!==K?K:null}getAllPetsByID(q){return this._petData.filter((K=>K.ID===q))}getPetByUniqueID(q){var K;return null!==(K=this._petData.find((K=>K.uniqueID===q)))&&void 0!==K?K:null}petCanEquipGearType(q,K){var z;const Y=vt.t.getItem("pet",q);return null===(z=null==Y?void 0:Y.data.gearEquipSlots)||void 0===z?void 0:z.includes(K)}equipGearForPet(q,K){var z;const Y=this.getPetByUniqueID(q),X=rt.I.getPetWithEquippedGearByUniqueId(K.uuid),{type:Z,id:J}=K.data.asset;if(!Y)return this.sendItemEquipFailedEvent(Y,K,"Pet does not exist"),void Q.VyI.log(`Cannot equip ${K.itemID}, pet with ID ${q} does not exist!`,Q.$bb.Warning);if(!this.petCanEquipGearType(Y.ID,Z))return this.sendItemEquipFailedEvent(Y,K,"Pet does not support this gear type"),void Q.VyI.log(`Cannot equip ${K.itemID}, pet ${null==Y?void 0:Y.ID} does not have the gear slot ${Z}`,Q.$bb.Warning);let tt=null;X&&(null!=tt||(tt=lt.$.generateUID()),this.unequipGearForPet(X.uniqueID,Z,tt)),null!==(z=Y.gear)&&void 0!==z||(Y.gear={}),Q.Aq$.isDefined(Y.gear[Z])&&(null!=tt||(tt=lt.$.generateUID()),this.unequipGearForPet(Y.uniqueID,Z,tt)),Y.gear[Z]=K.uuid,at.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(it.B.FEATURE_PET_GEAR,it.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE)||(at.q.instance.game.broadcaster.broadcast(ht.bI.FtueCompleted),at.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(it.B.FEATURE_PET_GEAR,it.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE),rt.I.updateCachedPetGearTutorialFlag().catch((q=>Q.RQr.logError(q,"Error updating cached pet gear tutorial flag")))),this.sendItemEquipEvent(Y,K,tt),this.updated=!0}unequipGearForPet(q,K,z){var Y;const X=this.getPetByUniqueID(q);X?(null!==(Y=X.gear)&&void 0!==Y||(X.gear={}),Q.Aq$.isDefined(X.gear[K])&&this.sendItemUnequipEvent(X,K,z),X.gear[K]=null,this.updated=!0):Q.VyI.log(`Cannot unequip pet with ID ${q}, it does not exist!`,Q.$bb.Warning)}sendItemEquipEvent(q,K,z){const{type:Y,id:Q}=K.data.asset,X=vt.t.getItem(Y,Q);at.q.instance.prodigy.game.broadcaster.broadcast(ht.ig.GearUpdate,null,[q]),this._segment.item.sendItemEquippedEvent({pet_id:q.ID,item_name:X.data.name,item_type:Y,item_id:Q},z)}sendItemEquipFailedEvent(q,K,z){const{type:Y,id:Q}=K.data.asset,X=vt.t.getItem(Y,Q);this._segment.item.sendItemEquipFailedEvent({fail_reason:z,pet_id:q.ID,item_name:X.data.name,item_type:Y,item_id:Q})}sendItemUnequipEvent(q,K,z){at.q.instance.prodigy.gameContainer.get("9cf-c09f").getPetGearByUniqueId(q.gear[K]).then((K=>{const{type:Y,id:Q}=K.data.asset,X=vt.t.getItem(Y,Q);at.q.instance.prodigy.game.broadcaster.broadcast(ht.ig.GearUpdate,null,[q]),this._segment.item.sendItemUnequippedEvent({pet_id:q.ID,item_name:X.data.name,item_type:Y,item_id:Q},z)})).catch(Q.RQr.createHandler(`Error sending item_unequipped event, gear with uuid ${q.gear[K]} not found`))}createNewPet(q){return new mt.r(this.player.game,q)}setTeamPosition(q,K,z=!0){const Y=this.getTeamPosition(K);if(!this.isCreatureCurrentPlayer(Y)){if(Y)Y.removeTeam(),Y.setData(q),Y.team=K;else{const z=this.createNewPet(q);z.team=K,this._petTeam[K]=z}z&&(this.updated=!0)}}getTeamPosition(q){return this._petTeam[q]}removeAtTeamPosition(q,K=!0){const z=this.getTeamPosition(q);this.isCreatureCurrentPlayer(z)||z&&(z.removeTeam(),this._petTeam[q]=null,K&&(this.updated=!0))}swapTeamPositions(q,K){if(!this.canSwapPositions(q,K))return;const z=this.getTeamPosition(q),Y=this.getTeamPosition(K);z&&(z.team=K),Y&&(Y.team=q),this._petTeam[q]=Y,this._petTeam[K]=z,this.updated=!0}setTemporaryTeamPosition(q,K){const z=this.getPetByID(q);Q.Aq$.isDefined(z)&&(z.temporaryTeamPosition=K,this.updated=!0)}addPet(q,K,z,Y,Q){const X={ID:q,hp:null!=K?K:bt.s.MAX_SAFE_INTEGER,stars:null!=z?z:0,level:null!=Y?Y:1,nickname:Q,levelCaught:Y,catchDate:this._timeManager.getServerTimeMs(),uniqueID:(0,J.Ak)()};this.addPetFromData(X)&&this._bridge.add(X)}addPetFromData(q){if(!Q.Aq$.isDefined(q.ID))return Q.VyI.log("Malformed pet data.",Q.$bb.Error),!1;if(!q.uniqueID||this._petData.find((K=>K.uniqueID===q.uniqueID)))return Q.VyI.log("Invalid uniqueID",Q.$bb.Error,q.uniqueID),!1;const K=new gt.R(this.player.game,q);this._petData.push(q),this.updated=!0;const z=this.findEmptyTeamIndex();if(-1!==z){const K=this.getAllPetsByID(q.ID);dt.P8.showUniquePetsFeature()&&K.length>1?this.replaceDuplicateOnTeam(q.ID):this.setTeamPosition(q,z)}if(this._encounterInfo.addToPetTimesRescued(q.ID),1===this._encounterInfo.getPetTimesRescued(q.ID)&&this.player.newPetRescueData.addNewRescue(q.ID,at.q.instance.prodigy.world.getCurrentZone()),dt.P8.canPetEvolve(K,K.getLevel())){at.q.instance.prodigy.gameContainer.get("bec-c6b4").refreshAffordableEvolutionsCache()}return!0}removePet(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this._segment.item.beginSecureItemTransaction();this.removePetData(q),q.uniqueID&&(yield this._bridge.remove(q.uniqueID)),K.flush({sink_type:st.C.PetRoster,sink_id:q.ID,transaction_id:lt.$.generateUID()})}))}removePetData(q){Q.Aq$.isDefined(q.team)&&this.removeAtTeamPosition(q.team),Z().remove(this._petData,q),this.updated=!0,this.player.forceSaveCharacter();at.q.instance.prodigy.gameContainer.get("bec-c6b4").refreshAffordableEvolutionsCache(),this.onPetRemoved.dispatch(q)}findEmptyTeamIndex(){return this.petTeam.findIndex((q=>!q))}findFirstFilledIndex(){return this.petTeam.findIndex((q=>q))}hasPet(q){const K=this.getPets(!1).find((K=>K.ID===q));return Q.Aq$.isDefined(K)}amountOfPet(q){return this.getPets(!1).filter((K=>K.ID===q)).length}getNumPets(q=!1){return this.getPets(q).length}getNumUniquePets(){return new Set(this.getPets().map((q=>q.ID))).size}getTotalUniquePets(){return vt.t.getItemCount("pet")-this.getOwnershipRestrictedPetCount()}getMaxKennelSize(){let q;if((0,nt.G)(et))q=bt.s.MAX_SAFE_INTEGER;else{const K=this.getOwnershipRestrictedPetCount();q=(vt.t.getItemCount("pet")-K)*ft.h.MAX_KENNEL_SIZE_MULTIPLIER}const K=at.q.instance.prodigy.gameContainer.get("5d3-90c1").petInventoryData.permanentSlots;return Math.max(K,q)}getOwnershipRestrictedPetCount(){var q;const K=pt.R.loadData(tt.r.PetOwnershipRestrictions_json);return null!==(q=null==K?void 0:K.noOwnership.length)&&void 0!==q?q:0}isFull(){return this.getNumPets(!1)>=this.getMaxKennelSize()}canSwapPositions(q,K,z=0){const Y=this.getTeamPosition(q),Q=this.getTeamPosition(K);return!(q===z&&null===Q||K===z&&null===Y)}isCreatureCurrentPlayer(q){return q===this.player}getPetTeamIDs(){return this.getPetTeam(!1).map((q=>q.getID()))}getPetTeam(q){return q?this.petTeam.filter((q=>!this.isCreatureCurrentPlayer(q))):this.petTeam.filter((q=>q&&!this.isCreatureCurrentPlayer(q)))}isPetOnTeam(q){var K,z;return null!==(z=null===(K=this.petTeam)||void 0===K?void 0:K.some((K=>(null==K?void 0:K.getID())===q)))&&void 0!==z&&z}setPlayerToFrontPosition(){this.petTeam.findIndex((q=>q===this.player))>0&&(this.petTeam.splice(this.petTeam.indexOf(this.player),1),this.petTeam.unshift(this.player))}setPetToTopPosition(){1===this.findEmptyTeamIndex()&&this.petTeam[2]&&this.swapTeamPositions(2,1)}isPrimaryPet(q){if(!q.ID)return Q.VyI.log("Cannot check if pet is primary, pet ID is not defined",Q.$bb.Warning),!1;const K=this.getPrimaryPetById(q.ID);return(null==K?void 0:K.uniqueID)===q.uniqueID}replaceDuplicateOnTeam(q){const K=this.getPetTeam(!1).find((K=>K.getID()===q)),z=this.getPrimaryPetById(q);if(z&&K&&z.uniqueID!==K.data.uniqueID){this.unequipGearForPet(K.data.uniqueID,"petHat"),this.unequipGearForPet(K.data.uniqueID,"petRelic");const q=K.team;this.removeAtTeamPosition(K.team),this.setTeamPosition(z,q)}}destroy(){this.onPetRemoved.dispose()}}(0,Y.Cg)([(0,ct.b)("0f2-d6bd"),(0,Y.Sn)("design:type",ut.V)],_t.prototype,"_timeManager",void 0),(0,Y.Cg)([(0,ct.b)("20f-5f67"),(0,Y.Sn)("design:type",Function)],_t.prototype,"_segment",void 0),(0,Y.Cg)([(0,ct.b)(ot.T),(0,Y.Sn)("design:type",ot.T)],_t.prototype,"_bridge",void 0)},86051:(q,K,z)=>{"use strict";var Y;z.d(K,{K:()=>Q}),function(q){q[q.BAM=3]="BAM",q[q.BOOST_SELECT=4]="BOOST_SELECT",q[q.COLISEUM=8]="COLISEUM",q[q.SERVER=11]="SERVER",q[q.SERVER_SELECT=12]="SERVER_SELECT",q[q.WORLD_MAP=14]="WORLD_MAP",q[q.NICKNAMER=18]="NICKNAMER",q[q.STYLIST=21]="STYLIST",q[q.BESTIARY=23]="BESTIARY"}(Y||(Y={}));class Q{}Q.BAM={INTRO:{menu:Y.BAM,ID:0}},Q.BOOST_SELECT={INTRO:{menu:Y.BOOST_SELECT,ID:0}},Q.COLISEUM={INTRO:{menu:Y.COLISEUM,ID:0}},Q.SERVER={INTRO:{menu:Y.SERVER,ID:0}},Q.SERVER_SELECT={INTRO:{menu:Y.SERVER_SELECT,ID:0}},Q.WORLD_MAP={INTRO:{menu:Y.WORLD_MAP,ID:0}},Q.NICKNAMER={INTRO:{menu:Y.NICKNAMER,ID:0}},Q.STYLIST={INTRO:{menu:Y.STYLIST,ID:0}},Q.BESTIARY={INTRO:{menu:Y.BESTIARY,ID:0}}},55734:(q,K,z)=>{"use strict";z.d(K,{R:()=>ct});var Y=z(8674),Q=z(62459),X=z(93893),Z=z(58182),J=z(35120),tt=z(50503),et=z(55122),it=z(73797),st=z(76277),nt=z(67462),at=z(30226),rt=z(77938),ot=z(47315),ht=z(39984);class ct extends ht.e{constructor(q,K,z=null){super(q),this.nickname=null,this.setData(K),this.currentMaxLevel=null!=z?z:et.s.maxLevelConfig.regular}setData(q){if(super.setData(q),!Q.Aq$.isDefined(this.data))return;this.data.ID=q.ID,Q.Aq$.isDefined(this.data.ID)||"number"!=typeof q.gameID||(this.data.ID=q.gameID),this.nickname=this.data.nickname,delete this.data.R;const K=rt.t.getItem("pet",this.data.ID);this.source=K.data,Q.Aq$.isDefined(K.metadata.assets.default)&&(this.source.assetType=K.metadata.assets.default.type,this.source.defaultScale=K.metadata.assets.default.defaultScale),this.type=this.source.life}getAttacks(q=null){const K=[],z=this.getBamSpells();for(let Y=0;Yq.level)),Y[0]+=z[q]):Y=Q.singleShot.map((q=>q.level));for(let X=1;X0)throw new Error("Cannot evolve a pet that has evolved before");this.data.evolutionCount=K+1,et.kennel.addPet(q)}else this.data.ID=q,this.source=rt.t.getItem("pet",this.data.ID).data,this.type=this.source.life;et.encounters.addToPetTimesRescued(q),this.game.broadcaster.broadcast(it.ig.Evolved,null,[this]),et.kennel.updated=!0,et.kennel.refreshPetTeamData()}))}getID(){return this.data.ID}getName(){return Q.Aq$.isDefined(this.nickname)?this.nickname:this.source.name}getFirstName(){return this.source.name}getElement(){return this.source.element}generate(q,K){const z=Math.max(1,q-K);this.data.stars=ht.e.starsToLevel(z,this.creatureType),this.data.level=z}getLevelingCurve(q){const K=[],z=[],Y=rt.t.getItem("pet",this.getID()).data.curve;for(let X=0;X{"use strict";z.d(K,{s:()=>et});var Y=z(62459),Q=z(35120),X=z(62901),Z=z(87337),J=z(12676),tt=z(39984);class et extends tt.e{init(q){return!!super.init(q)&&(this.name=Q.q.instance.prodigy.gameContainer.resolve(X.r),this.name.init(q.npc_name),this.npcType=q.npc_type,this.sendNpcDiscoveredEvent(q),!0)}sendNpcDiscoveredEvent(q){var K;const z=Q.q.instance.prodigy.gameContainer,X=z.get(Y.$Bt.LocalizationService);if(!q)return;const tt=q.npc_type===Z.ac.Merchant?J.N.Merchant:J.N.Noot,et=null!==(K=q.npc_id)&&void 0!==K?K:tt;z.get("20f-5f67").gameWorld.sendNpcDiscoveredEvent({npc_name:q.npc_name?X.getText(q.npc_name):tt,npc_type:q.npc_type,npc_id:et,x_coord:q.x_coord,y_coord:q.y_coord,npc_animation_id:q.npc_animation_id})}getBamSpells(q){return[]}getStatPower(){return 5}getStatHealth(){return 5}getNpcType(){var q;return null!==(q=this.npcType)&&void 0!==q?q:Z.ac.Merchant}}},129:(q,K,z)=>{"use strict";z.d(K,{a:()=>xt});var Y=z(87490),Q=z(62459),X=z(95359),Z=z(113),J=z(10471),tt=z(97495),et=z(5491),it=z(73678),st=z(35120),nt=z(55122),at=z(23748),rt=z(22023),ot=z(30226),ht=z(87820),ct=z(34829),dt=z(77938),lt=z(21492),ut=z(5898),ft=z(51894),bt=z(56997),pt=z(37639),vt=z(27293),gt=z(39984);class mt{constructor(q){this._data={},this.updated=!1,this._timeManager=q}getDataAndClear(){return this.updated=!1,this._data}setData(q){var K,z,Y;this._data.ads=null!==(K=null==q?void 0:q.ads)&&void 0!==K?K:[],this._data.pets=null!==(z=null==q?void 0:q.pets)&&void 0!==z?z:[],this._data.offers=null!==(Y=null==q?void 0:q.offers)&&void 0!==Y?Y:[]}hasResolvedOffer(q){return this._data.offers.includes(q)}getResolvedOffers(){var q;return null!==(q=this._data.offers)&&void 0!==q?q:[]}setOfferResolved(q,K=!0){const z=this._data.offers.indexOf(q);K&&-1===z?(this._data.offers.push(q),this.updated=!0):K||-1===z||(this._data.offers.splice(z,1),this.updated=!0)}debugClearResolvedOffers(){0}hasSeenAd(q){return this._data.ads.includes(q)}getSeenAds(){return this._data.ads}setSeenAds(q){this._data.ads=[...q],this.updated=!0}hasPetBeenEncountered(q){return this.isPetOwned(q)||Q.Aq$.isDefined(this.getPetEncounterByID(q))}getPetEncounterByID(q){return this._data.pets.find((K=>K.ID===q))}createNewPetEncounter(q){this.updated=!0,this._data.pets.push({ID:q,firstSeenDate:this._timeManager.getServerTimeMs(),timesBattled:0,timesRescued:0,rescueAttempts:0})}onPetEncountered(q){!this.getPetEncounterByID(q)&&rt.P8.hasValidOrdinal(dt.t.getItem("pet",q))&&(this.createNewPetEncounter(q),this.updated=!0)}addToPetTimesBattled(q,K=1){if(K<1)return void Q.VyI.log("quantityToAdd in addToPetTimesBattled can not be less than 1",Q.$bb.Warning);if(!rt.P8.hasValidOrdinal(dt.t.getItem("pet",q)))return;this.updated=!0,this.onPetEncountered(q);this.getPetEncounterByID(q).timesBattled+=K}addToPetTimesRescued(q,K=1){if(K<1)return void Q.VyI.log("quantityToAdd in addToPetTimesRescued can not be less than 1",Q.$bb.Warning);if(!rt.P8.hasValidOrdinal(dt.t.getItem("pet",q)))return;this.updated=!0,this.onPetEncountered(q);this.getPetEncounterByID(q).timesRescued+=K,this.setPetFirstRescuedDate(q)}addToPetRescueAttempts(q,K=1){if(K<1)return void Q.VyI.log("quantityToAdd in addToPetTimesRescuable can not be less than 1",Q.$bb.Warning);if(!rt.P8.hasValidOrdinal(dt.t.getItem("pet",q)))return;this.updated=!0,this.onPetEncountered(q);const z=this.getPetEncounterByID(q);z.rescueAttempts||(z.rescueAttempts=0),z.rescueAttempts+=K}setPetFirstRescuedDate(q,K){if(!rt.P8.hasValidOrdinal(dt.t.getItem("pet",q)))return;this.onPetEncountered(q);const z=this.getPetEncounterByID(q);Q.Aq$.isDefined(z.firstRescuedDate)||(z.firstRescuedDate=null!=K?K:this._timeManager.getServerTimeMs())}getPetTimesBattled(q){const K=this.getPetEncounterByID(q);return K?K.timesBattled:0}getPetTimesRescued(q){const K=this.getPetEncounterByID(q);return Q.Aq$.isDefined(K)&&K.timesRescued>0?K.timesRescued:this.isPetOwned(q)?1:0}getPetFirstRescuedDate(q){var K;return null===(K=this.getPetEncounterByID(q))||void 0===K?void 0:K.firstRescuedDate}isPetOwned(q){return st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.amountOfPet(q)>0}getPetRescueAttempts(q){const K=this.getPetEncounterByID(q);return(null==K?void 0:K.rescueAttempts)?K.rescueAttempts:0}getAllTotalPetsRescued(){return this._data.pets.filter((q=>q.timesRescued>0)).length}}var yt=z(95891),_t=z(96282);class Et{constructor(){this.data={bg:{active:1,own:[1]},items:{},currentHouseTag:"suburbs"},this.updated=!1}getDataAndClear(){return this.updated=!1,this.data}getItems(){return this.data.items}hasItems(q){return yt.sumBy(q,(q=>"dorm"===q.type&&this.data.items[q.ID]?1:0))}setItems(q){Q.Aq$.isDefined(q)&&(Q.Aq$.isDefined(q.items)||(q.items=this.data.items),Q.Aq$.isDefined(q.bg)||(q.bg=this.data.bg),Q.Aq$.isDefined(q.currentHouseTag)||(q.currentHouseTag=this.data.currentHouseTag),this.data=q,Q.Aq$.isDefined(this.data.active)||(this.add(17),this.add(3),this.add(18),this.add(18),this.add(14),this.add(1),this.add(13),this.data.active=[],this.setActive(17,480,160,1,0,0,0,0),this.setActive(3,400,160,1,0,0,0,0),this.setActive(18,440,100,1,0,0,0,0),this.setActive(18,840,100,1,0,0,0,0),this.setActive(14,880,240,1,0,0,0,0),this.setActive(1,880,140,1,0,0,0,0),this.setActive(13,640,80,1,0,0,0,0)))}add(q){let K=this.data.items[q];Q.Aq$.isDefined(K)||(K=this.data.items[q]={N:0,A:[]}),K.N<9&&K.N++,this.updated=!0}getSortedActive(){const q=[];if(!Q.Aq$.isDefined(this.data.active))return q;for(const K in this.data.items)for(let z=0;zq.z-K.z)),q}snapDormItems(){var q,K;const z=_t.G.HOUSE_ITEM_GRID_SNAP_INTERVAL;null===(K=null===(q=this.data)||void 0===q?void 0:q.active)||void 0===K||K.forEach((q=>{q.x%z!=0&&(q.x=Q.cj9.snapToCeil(q.x,z),this.updated=!0),q.y%z!=0&&(q.y=Q.cj9.snapToFloor(q.y,z),this.updated=!0)}))}setAllInactive(){this.data.active=[],this.updated=!0}setActive(q,K,z,Y,X,Z,J,tt){const et=this.data.items[q];if(Q.Aq$.isDefined(et)&&et.N>this.getActive(q)){const Q={ID:q,x:K,y:z,dx:X,dy:Z,z:Y,anchorY:J,r:tt,stack:[]};return this.data.active.push(Q),this.updated=!0,Q}return null}updateActive(q,K,z,Y,Q,X,Z,J,tt){for(let et=0;et=9}getActive(q){let K=0;if(Q.Aq$.isDefined(this.data.active))for(let z=0;z=0&&Q.Aq$.isDefined(Y[J])&&Y[J]>0&&Z++}return Z}getDungeonState(q,K){let z=this._dungeonStates[K];if(!z){z=st.q.instance.prodigy.gameContainer.resolve(q),this._dungeonStates[K]=z;let Y=this.getDungeonSchema(K);Y?z.setData(Y):(Y=z.getInitializationData(),this.data.dungeons[K]=Y,z.setData(Y,!0))}return z}getDungeonSchema(q){return this.data.dungeons||(this.data.dungeons={},this._updated=!0),this.data.dungeons[q]}}class Nt{constructor(){this.data={zones:{},menus:{}},this.updated=!1}getDataAndClear(){return this.updated=!1,this.data}setData(q){Q.Aq$.isDefined(q.zones)||(q.zones={}),Q.Aq$.isDefined(q.menus)||(q.menus={}),this.data=q}getMenuValue(q){return this.getValue("menus",q.menu,q.ID)}setMenuValue(q,K){this.setValue("menus",q.menu,q.ID,K)}setValue(q,K,z=0,Y=1){Q.Aq$.isDefined(this.data[q][K])||(this.data[q][K]=[]),this.data[q][K][z]!==Y&&(this.data[q][K][z]=Y,this.updated=!0)}getValue(q,K,z=0){if(!Q.Aq$.isDefined(this.data[q][K]))return 0;const Y=this.data[q][K];return Q.Aq$.isDefined(Y[z])?Y[z]:0}}class xt extends pt.K{get isFocusModeEnabled(){return this._isFocusModeEnabled}static fromCharacter(q,K){var z,Y,Q,X,Z;const J=null===(z=K.appearance)||void 0===z?void 0:z.name,tt=new xt(q);tt.appearance.init({name:{first:null!==(Y=null==J?void 0:J.getFirstName())&&void 0!==Y?Y:1,middle:null!==(Q=null==J?void 0:J.getMiddleName())&&void 0!==Q?Q:1,last:null!==(X=null==J?void 0:J.getLastName())&&void 0!==X?X:1,nick:null!==(Z=null==J?void 0:J.getNickname())&&void 0!==Z?Z:null},hair:K.appearance.getHair(),skinColor:K.appearance.getSkinColor(),eyeColor:K.appearance.getEyeColor(),face:K.appearance.getFace()}),tt.equipment.setHat(K.equipment.getHat()),tt.equipment.setWeapon(K.equipment.getWeapon()),tt.equipment.setOutfit(K.equipment.getOutfit()),tt.equipment.setBoots(K.equipment.getBoots());const et=K.equipment.getCostume();return et&&tt.equipment.setCostume(et),tt.backpack=new ft.H,tt.data=Object.assign({},K.data),tt}constructor(q){super(q),this.tutorial=null,this.kennel=null,this.encounters=null,this.quests=null,this.house=null,this.backpack=null,this.achievements=null,this.state=null,this.et=!1,this.userID=0,this.appearanceChanged=!1,this.chatID=null,this.emoteID=null,this.danceID=null,this.grade=null,this.world=null,this.coOpTeam=null,this.earlyBirdLastChance=!1,this.transformID=null,this.currentVideoSkillId=null,this._isFocusModeEnabled=!1,this.appearance=new It(st.q.instance.prodigy.gameContainer.get("af7-d224")),this.equipment=new Rt,this.backpack=new ft.H,this.achievements=new ut.l,this.encounters=new mt(st.q.instance.prodigy.gameContainer.get("0f2-d6bd")),this.kennel=new wt.o(this,this.encounters),this.quests=new Pt,this.state=new Mt,this.house=new Et,this.house.setItems(this.house.data),this.tutorial=new Nt}createRandom(){this.equipment.setHat(dt.t.getRandomItem("hat").ID),this.equipment.setWeapon(dt.t.getRandomItem("weapon").ID),this.equipment.setOutfit(dt.t.getRandomItem("outfit").ID)}getRevampHealth(){const q=this.getLevel()+this.getChargedLevel(),K=dt.t.getItem("boss",32);return rt.P8.getBattleStats(K,q,null)[Y.EStat.Hp]+this.getGearBattleStats().total[Y.EStat.Hp]}canCatch(){return!1}getID(){return this.userID}init(q){var K;return!!super.init(q)&&(Q.Aq$.isDefined(q.userID)?this.userID=q.userID:Q.Aq$.isDefined(q.id)&&(this.userID=parseInt(q.id)),Q.Aq$.isDefined(q.data)&&(this.data=ot.J.getObject(q.data),this.currentMaxLevel=nt.s.getPlayerLevelCap(this)),Q.Aq$.isDefined(q.pets)&&this.kennel.populateKennel(ot.J.getObject(q.pets)),Q.Aq$.isDefined(q.tutorial)&&this.tutorial.setData(ot.J.getObject(q.tutorial)),Q.Aq$.isDefined(q.state)&&this.state.setData(ot.J.getObject(q.state)),this.house.setItems(Q.Aq$.isDefined(q.house)?ot.J.getObject(q.house):this.house.data),Q.Aq$.isDefined(q.inventory)&&this.backpack.setItems(ot.J.getObject(q.inventory)),Q.Aq$.isDefined(q.quests)&&this.quests.setQuests(ot.J.getObject(q.quests)),Q.Aq$.isDefined(q.achievements)&&this.achievements.init(ot.J.getObject(q.achievements)),Q.Aq$.isDefined(q.isMember)&&(this.et=1===q.isMember),(null===(K=q.appearance)||void 0===K?void 0:K.morph)&&(this.getPlayerData().playerTransformation={transformType:q.appearance.morph.type,transformID:q.appearance.morph.ID}),this.encounters.setData(q.encounters),q.isTowerTownEnabled&&(this._isFocusModeEnabled=!0),this.name=st.q.instance.prodigy.gameContainer.resolve(lt.C),this.name.init(this.appearance.getName()),!0)}initFromProtobuf(q){let K=null,z=null;q.appearance&&(K={hair:{style:q.appearance.hair.styleID,color:q.appearance.hair.colorID},eyeColor:q.appearance.eyeColorID,skinColor:q.appearance.skinColorID,face:q.appearance.faceID},q.appearance.morph&&(z={transformType:""!==q.appearance.morph.type?q.appearance.morph.type:null,transformID:q.appearance.morph.ID>0?q.appearance.morph.ID:null}));let Y=null;q.equipment&&(Y={boots:q.equipment.bootsID>0?q.equipment.bootsID:null,hat:q.equipment.hatID>0?q.equipment.hatID:null,weapon:q.equipment.weaponID>0?q.equipment.weaponID:null,outfit:q.equipment.outfitID>0?q.equipment.outfitID:null});let Q=null;q.name&&(Q={first:q.name.first>0?q.name.first:null,middle:q.name.middle>0?q.name.middle:null,last:q.name.last>0?q.name.last:null,nick:q.name.nick>0?q.name.nick:null},K?K.name=Q:K={name:Q}),this.init({appearance:K,equipment:Y,data:{level:q.level,team:q.team,playerTransformation:z},isMember:q.member,userID:q.userID})}hasMembership(){return this.et}setMembership(q){Q.Aq$.isDefined(q)?this.et=1===q.isMember:this.et=!0}transformPlayer(q,K,z,Y){var Q,X,Z;if(q===et.V.Player)this.getPlayerData().playerTransformation=null;else{const J=ct.s.get("GameConstants.MorphMarbles.MORPH_DURATION_OVERRIDE");this.getPlayerData().playerTransformation={transformType:q,transformID:K,maxTime:null!==(Q=null!=J?J:z)&&void 0!==Q?Q:0,timeRemaining:Math.max(null!==(Z=null!==(X=null!=J?J:Y)&&void 0!==X?X:z)&&void 0!==Z?Z:0,0)}}}isPlayerTransformed(){return!!this.getPlayerData().playerTransformation}getAttacks(q=null){return Q.Aq$.isDefined(this.getPlayerData().spellbook)?this.getPlayerData().spellbook.length<6&&(this.getPlayerData().spellbook=this.getAllAttacks().splice(0,6)):this.getPlayerData().spellbook=this.getAllAttacks().splice(0,6),Q.Aq$.isDefined(q)?gt.e.getAttacksOfType(this.getPlayerData().spellbook,q):this.getPlayerData().spellbook}getAllAttacks(){const q=gt.e.getAttacksFromCurve(xt.LEVEL_CURVE,1,this.getLevel());if(Q.Aq$.isDefined(this.getPlayerData().spells))for(let K=0;K-1?this.backpack.hasMaxQuantityOfItem(q,K):"dorm"===q&&this.house.hasMaxQuantityOfItem(K)}hasFoundKeystone(q){let K;switch(q){case it.A_.BONFIRE:K=Z.O.Bonfire;break;case it.A_.FOREST:K=Z.O.Firefly;break;case it.A_.SHIPWRECK:K=Z.O.Shipwreck;break;case it.A_.SHIVERCHILL:K=Z.O.Shiverchill;break;case it.A_.SKYWATCH:K=Z.O.Skywatch;break;case it.A_.BONFIREHARD:K=`${Z.O.Bonfire}_${tt.i.Hard}`;break;case it.A_.FORESTHARD:K=`${Z.O.Firefly}_${tt.i.Hard}`;break;case it.A_.SHIPWRECKHARD:K=`${Z.O.Shipwreck}_${tt.i.Hard}`;break;case it.A_.SHIVERCHILLHARD:K=`${Z.O.Shiverchill}_${tt.i.Hard}`;break;case it.A_.SKYWATCHHARD:K=`${Z.O.Skywatch}_${tt.i.Hard}`;break;case it.A_.FORESTEXPERT:case it.A_.SHIVERCHILLEXPERT:case it.A_.BONFIREEXPERT:case it.A_.SHIPWRECKEXPERT:case it.A_.SKYWATCHEXPERT:return!1}const z=ht.b.ZONE_KEYSTONES[q],Y=st.q.instance.prodigy.world.getZone(q).difficultyMode;return this.backpack.hasItem("key",z,Y)>0||this.state.get(`keystones-${K}`)>0}hasFoundAllKeystones(){return it.D3.every((q=>this.hasFoundKeystone(q)))}getNumKeystones(){return it.D3.reduce(((q,K)=>q+(this.hasFoundKeystone(K)?1:0)),0)}getBattleAssetSpecifier(){return{type:"boss",id:32}}getGearBattleStats(){var q,K;const z={boots:{},follow:{},hat:{},mount:{},outfit:{},weapon:{},total:{power:0,defence:0,speed:0,hp:0}};for(const Y of bt.s){const Q=dt.t.getItem(Y,this.equipment.getEquipment(Y));for(const Z of Object.values(X.IE)){const X=null===(K=null===(q=null==Q?void 0:Q.data)||void 0===q?void 0:q.stats)||void 0===K?void 0:K[Z];X&&(z[Y][Z]=X,z.total[Z]+=X)}}return z}getGrowthBattleStats(q){const K=dt.t.getItem("pet",q.ID),z=rt.P8.isPetOnTeam(q)?q.level+this.getChargedLevel():q.level;return rt.P8.getBattleStats(K,z,q.uniqueID)}}xt.LEVEL_CURVE=[{lvl:1,a:31},{lvl:5,a:32},{lvl:12,a:33},{lvl:22,a:34},{lvl:38,a:35},{lvl:52,a:36}]},3032:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{p:()=>Y}),function(q){q.Legacy="legacy",q.Revised="revised",q.RevisedWithPlayerGoals="revised-with-player-goals",q.PlayerGoalsFtue="player-goals-ftue",q.PlayerGoalsPostFtue="player-goals-post-ftue",q.ZoneUnlockedByLevel="zone-unlocked-by-level",q.ZoneUnlockedLinearCampaign="zone-unlocked-linear-campaign"}(Y||(Y={})),function(q){q.LastWatchedVideoId="lastWatchedVideoId",q.LastWatchedTimestamp="lastWatchedTimestamp",q.LastWatchedSchoolVideoId="lastWatchedSchoolVideoId",q.LastWatchedSchoolTimestamp="lastWatchedSchoolTimestamp"}(Q||(Q={}))},63834:(q,K,z)=>{"use strict";z.d(K,{r:()=>J});var Y=z(37016),Q=z(35120),X=z(22023),Z=z(55734);class J extends Z.R{get currentMaxLevel(){var q,K,z;return this._currentMaxLevel=X.P8.getMaxOwnableLevel(null===(q=this.data)||void 0===q?void 0:q.ID,null!==(z=null===(K=this.data)||void 0===K?void 0:K.mergeRank)&&void 0!==z?z:Y.qd.MIN),super.currentMaxLevel}set currentMaxLevel(q){super.currentMaxLevel=q}constructor(q,K){super(q,K)}createDataClone(){const q=super.createDataClone();return q.currentMaxLevel=this.currentMaxLevel,q}addStars(q,K,z){const Y=super.addStars(q,K,z);return Q.q.instance.prodigy.gameContainer.get("782-c308").kennel.updated=!0,Y}}},10592:(q,K,z)=>{"use strict";var Y;z.d(K,{n:()=>Y}),function(q){q[q.None=0]="None",q[q.CollectingItems=1]="CollectingItems",q[q.TrackingNPC=2]="TrackingNPC",q[q.TamingUltimate=3]="TamingUltimate",q[q.Transition=4]="Transition"}(Y||(Y={}))},80974:(q,K,z)=>{"use strict";z.d(K,{H:()=>J});var Y=z(62459),Q=z(35120),X=z(30226),Z=z(73722);class J{constructor(q,K,z,Y){this.serverList=null!=q?q:null,this.onServerSelectedCallback=null!=K?K:null,this.onSchoolCallback=z,this.onHomeCallback=Y}onServerSelected(q,K){var z;null===(z=this.onServerSelectedCallback)||void 0===z||z.call(this,q,K)}applyServerSelectMode(){"school"===Z.V.instance.selectedLocation?this.onSchoolSelected():"home"===Z.V.instance.selectedLocation?this.onHomeSelected():Y.VyI.log("Location is not valid.",Y.$bb.Warning)}onSchoolSelected(){var q,K;null===(q=this.onSchoolCallback)||void 0===q||q.call(this);const z=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;z.setLocation("school"),z.data.lastLoginAtSchool=Date.now(),z.data.sessionCount=(null!==(K=z.data.sessionCount)&&void 0!==K?K:0)+1,Q.q.instance.prodigy.open.server(this.serverList,this.onServerSelected.bind(this),!0)}onHomeSelected(){var q,K;null===(q=this.onHomeCallback)||void 0===q||q.call(this);const z=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;z.setLocation("home"),X.J.isDateWithinSchoolDayAndHours()?z.data.lastLoginAtSchool=Date.now():z.data.lastLoginAtHome=Date.now(),z.data.sessionCount=(null!==(K=z.data.sessionCount)&&void 0!==K?K:0)+1,Q.q.instance.prodigy.open.server(this.serverList,this.onServerSelected.bind(this),!1)}}},84938:(q,K,z)=>{"use strict";z.d(K,{_:()=>Q,B:()=>et});var Y,Q,X=z(8674),Z=z(62459);class J{constructor(q,K=0){this.priority=K,this.apply=q}}class tt{constructor(q,K=[]){this.baseValue=q,this.lenses=K}addLens(q){return this.lenses.push(q),{remove:()=>{this.lenses=this.lenses.filter((K=>K!==q))}}}getValue(){return this.lenses.sort(((q,K)=>K.priority-q.priority)).reduce(((q,K)=>K.apply(q)),this.baseValue)}}!function(q){q.MusicVolume="musicVolume",q.EffectVolume="effectVolume",q.VoiceVolume="voiceVolume",q.ScreenShake="screenShake"}(Q||(Q={}));let et=Y=class{get value(){return this._lensedValue.getValue()}constructor(q){this.onChanged=new Z.HN0,this.onStoredValueChanged=new Z.HN0,this._tweens=new Set,this.data=q,this._lensedValue=new tt(q.defaultValue),this.dispatchValue=this.dispatchValue.bind(this)}destroy(){this.onChanged.dispose(),this.onStoredValueChanged.dispose(),this._tweens.forEach((q=>{q.stop(!0),q.destroy()})),this._tweens.clear(),this._lensedValue.lenses=[]}setStoredValue(q){this._lensedValue.baseValue=q,this.onChanged.dispatch(this.value),this.onStoredValueChanged.dispatch(q)}addLens(q){const K=this._lensedValue.addLens(q);return this.onChanged.dispatch(this.value),{remove:()=>{K.remove(),this.onChanged.dispatch(this.value)}}}addSmoothedLensMultiplier(q,K=.5,z=1,Y=Z.GS3.Cubic.InOut){const Q={mult:1},X=new J((q=>q*Q.mult));let tt=this.addLens(X),et=Z.W$e.instance.game.add.tween(Q,this,!1).to({mult:q},1e3*K,Y);et.onUpdate.add(this.dispatchValue,this),this._tweens.add(et),et.start();const it=()=>{this.onChanged.dispatch(this.value),et&&(et.destroy(),this._tweens.delete(et),et=void 0)};return et.onTweenComplete.add(it),{remove:()=>{et&&et.stop(!0),et=Z.W$e.instance.game.add.tween(Q,this,!1).to({mult:1},1e3*z,Y),et.onUpdate.add(this.dispatchValue,this),this._tweens.add(et),et.start(),et.onTweenComplete.add((()=>{it(),null==tt||tt.remove(),tt=void 0})),window.setTimeout((()=>{null==tt||tt.remove()}),1e3*z+100)}}}dispatchValue(){this.onChanged.dispatch(this.value)}};et.musicVolume=new Y({name:"SETTINGS_MUSIC_VOLUME",description:"The volume of the music",defaultValue:.5,minValue:0,maxValue:1,storedKey:"bgmVolume"}),et.effectVolume=new Y({name:"SETTINGS_EFFECT_VOLUME",description:"The volume of the sound effects",defaultValue:.5,minValue:0,maxValue:1,storedKey:"sfxVolume"}),et.voiceVolume=new Y({name:"SETTINGS_VOICE_VOLUME",description:"The volume of the voice",defaultValue:.5,minValue:0,maxValue:1,storedKey:"voiceVolume"}),et.screenShake=new Y({name:"SETTINGS_SCREEN_SHAKE",description:"The intensity of the screen shake",defaultValue:1,minValue:0,maxValue:1,storedKey:"screenShake"}),et=Y=(0,X.Cg)([(0,Z.V84)(),(0,X.Sn)("design:paramtypes",[Object])],et)},89360:(q,K,z)=>{"use strict";z.d(K,{h:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(71586);class J{static get instance(){var q;return null!==(q=this._instance)&&void 0!==q?q:this._instance=new J}get autoSurfaceSessionInterval(){return this._autoSurfaceSessionInterval}constructor(){this._data=null,this._updatePending=null,this._autoSurfaceSessionInterval=0,J._instance||(J._instance=this)}getData(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;if(this._data||this.updateData(!1),Q.Aq$.isDefined(this._updatePending)&&(yield this._updatePending),null===(q=this._data)||void 0===q?void 0:q.weeklyChallengeData){const q={isTransition:this._data.isTransition,weeklyChallengeData:this._data.weeklyChallengeData};return this._data.isTransition=!1,q}return Promise.reject()}))}updateData(q=!0){if(Q.Aq$.isDefined(this._updatePending))return;const K=X.q.instance.prodigy.gameContainer.get("f70-f042");K&&(this._updatePending=new Q.bnh,K.getPlayerWeeklyChallengeData(this._goalMidPointValue,this._multiplierValue,this._goalMinValue,this._goalMaxValue).then((K=>{this._data={isTransition:!0,weeklyChallengeData:K},q&&this.sendToSegment(K),this._updatePending.resolve(),this._updatePending=null})).catch((q=>{this._updatePending.reject(),this._updatePending=null,Q.VyI.log(`WeeklyChallengeData update failed: ${Q.RQr.stringify(q)}`,Q.$bb.Warning)})))}sendToSegment(q){if(null==q?void 0:q.currentChallenge){let K=-1;q.timeRemaining>0&&(K=Math.round(2.7777777777777776e-7*q.timeRemaining));const z=Date.now(),Y=`${Z.R.getISOYearNumber(z)}w${Z.R.getISOWeekNumber(z)}`;q.currentChallenge.progressCount{"use strict";z.d(K,{s:()=>et});var Y=z(62459),Q=z(35120),X=z(62901),Z=z(37639),J=z(27293);class tt extends J.q{init(q){super.init(q),this.name=q.name}getName(){return this.name}setName(q){this.name=q}}class et extends Z.K{constructor(q){super(q),this.appearance=new tt}init(q){var K;return!!super.init(q)&&(Y.Aq$.isDefined(null===(K=q.data)||void 0===K?void 0:K.ID)&&(this.data.ID=q.data.ID),this.name=Q.q.instance.prodigy.gameContainer.resolve(X.r),this.name.init(this.appearance.getName()),!0)}getID(){var q;return null!==(q=this.data.ID)&&void 0!==q?q:0}}},86896:(q,K,z)=>{"use strict";z.d(K,{B:()=>Q});var Y=z(38487);class Q extends Y.s{constructor(q,K){super(q,K)}}},70570:(q,K,z)=>{"use strict";z.d(K,{l:()=>dt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(88022),J=z(56942),tt=z(35120),et=z(50503),it=z(60250),st=z(18633),nt=z(43531),at=z(96216),rt=z(67462),ot=z(38487),ht=z(77938);var ct=z(78673);class dt extends ot.s{static createTeam(q,K){const z=new dt(q,K);return[z,new ct.y(q,z,it.G.left),new ct.y(q,z,it.G.right)]}constructor(q,K){super(q,K),this.onBracerBreak=new Q.HN0,this._aspenFrostContainer=null,this._config=null,this.aoaTier=2,this.showHealthBar=!0,this.modifiers.takenDamageMultiplier=0,this.modifiers.barrier={offset:{x:0,y:-110},scale:{x:1,y:1}},this._config=(()=>{const q=tt.q.instance.prodigy.gameContainer.get("f71-42eb"),K=ht.t.getItem("boss",19).data;return X.merge({},K,q.getValue("aspenFrostConfigOverrides"))})(),this.source.maxHP=et.A.getCreatureHP(this)}setBossContainer(q){this._aspenFrostContainer=q}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}getAssets(){return X.concat(super.getAssets(),"voice-36-1",Z._.Npc_face_aspen_json,Z._.Boss_aspen_extras_json,J.Q.Spine_npc_aspen_json,this._config.battle.yetiAttacks.map((q=>`spell-${q}`)),this._config.battle.spiderAttacks.map((q=>`spell-${q}`)))}getBamSpells(q){return this._config.battle.yetiAttacks.map((q=>({ID:q,locked:!1,type:rt.U.Native})))}chooseAction(q,K,z,Y,Q,X){if(this._aspenFrostContainer.bracerCount>0){Q(K,Y,X,this._aspenFrostContainer.bracerCount>1?94:93,et.A.rollMissChance(q,K.getSource().modifiers.miss))}else this.runYetiExitSequence(X);return!0}runYetiExitSequence(q){return(0,Y.sH)(this,void 0,void 0,(function*(){let K;const z=()=>(K=new Q.bnh).resolve,Y=this.game.state.get("Battle"),et=(q,K)=>{at.M.radialCloud(this.game,this._aspenFrostContainer.parent,q.x,q.y,K,Z._.Boss_aspen_extras_json,"purple-cloud")};for(let q=7;q>0;--q)et({x:this._aspenFrostContainer.position.x+dt.YETI_SMOKE_OFFSET.x,y:this._aspenFrostContainer.position.y+dt.YETI_SMOKE_OFFSET.y},dt.SAND_CLOUD_RADIUS_YETI),q>1&&(yield Q.Egh.timeout(200));this._aspenFrostContainer.visible=!1;const it=this.game.add.spine(0,0,J.Q.Spine_npc_aspen_json);it.x=this._aspenFrostContainer.x,it.y=this._aspenFrostContainer.y,it.setAnimationByName(0,"idle",!0),this._aspenFrostContainer.parent.addChildAt(it,0),Y.rightStatusUI.moveOffScreen();const rt=new nt.rD(this.game),ot=rt.dataProvider;rt.addEvents([{dialogueData:ot.get(983),blockInput:!0}]),rt.start(!0,z()),yield K,this.game.add.tween(it,this).to({alpha:0},1e3,void 0,!0).onTweenComplete.addOnce(z());for(const q of Y.teams[1].team.filter((q=>q instanceof st.Z)))this.game.add.tween(q,this).to({alpha:0},1e3,void 0,!0);yield K,yield Q.Egh.timeout(2e3);const ht=tt.q.instance.prodigy.battle,ct=yield ht.replaceOpponentTeam(X.merge(this._config.spiderBattle,{starOverride:Y.mods.starOverride,disableHealing:Y.mods.disableHealing}),!1);for(const q of ct.team)q.visible=!1;yield Q.Egh.timeout(1e3);const lt=[{x:it.x+dt.LEFT_PILE_OFFSET.x,y:it.y+dt.LEFT_PILE_OFFSET.y},{x:it.x+dt.RIGHT_PILE_OFFSET.x,y:it.y+dt.RIGHT_PILE_OFFSET.y}];for(let q=2;q>0;--q)et(lt[0],dt.SAND_CLOUD_RADIUS_SPIDER),et(lt[1],dt.SAND_CLOUD_RADIUS_SPIDER),q>1&&(yield Q.Egh.timeout(200));const ut=ct.team.map(((q,K)=>{const z={x:q.x,y:q.y};return q.position.set(lt[K].x+dt.SPIDER_SPAWN_OFFSET.x,lt[K].y+dt.SPIDER_SPAWN_OFFSET.y),q.parent.setChildIndex(q,0),q.visible=!0,z}));this._aspenFrostContainer.hideBracerPiles(),yield Q.Egh.timeout(3e3),ct.team.forEach(((q,K)=>{q.walk(),this.game.add.tween(q,this).to({x:ut[K].x,y:ut[K].y},1e3,void 0,!0).onTweenComplete.addOnce((()=>{q.stand(),q.flip()}))})),Y.rightStatusUI.moveOnScreen(),yield Q.Egh.timeout(1500),q()}))}}dt.YETI_SMOKE_OFFSET={x:0,y:-100},dt.LEFT_PILE_OFFSET={x:-98,y:0},dt.RIGHT_PILE_OFFSET={x:68,y:0},dt.SPIDER_SPAWN_OFFSET={x:0,y:50},dt.SAND_CLOUD_RADIUS_SPIDER=100,dt.SAND_CLOUD_RADIUS_YETI=500},78673:(q,K,z)=>{"use strict";z.d(K,{y:()=>Z});var Y=z(95891),Q=z(50503),X=z(38487);class Z extends X.s{get boss(){return this._aspenFrostBoss}constructor(q,K,z){super(q,Y.merge(Object.assign({},K.source),K.getConfig().tree.creature)),this._aspenFrostBoss=null,this.aoaTier=2,this._aspenFrostBoss=K,this.source.maxHP=Q.A.getCreatureHP(this),this.onHPChange.add((()=>{this.getCurrentHearts()<=0&&this._aspenFrostBoss.onBracerBreak.dispatch(z)}))}chooseAction(q,K,z,Y,Q,X){return this._aspenFrostBoss.chooseAction(q,K,z,Y,Q,X)}getName(){return this._aspenFrostBoss.getName()}getStatHealth(){return this._aspenFrostBoss.getConfig().tree.hpStat}}},7914:(q,K,z)=>{"use strict";z.d(K,{b:()=>J});var Y=z(62459),Q=z(35120),X=z(50503),Z=z(38487);class J extends Z.s{chooseAction(q,K,z,Z,J,tt){const et=K,it=q/X.A.MAX_DIFFICULTY,st=et.source.getCurrentHearts(){"use strict";z.d(K,{t:()=>J});var Y=z(62459),Q=z(50503),X=z(77938),Z=z(38487);class J extends Z.s{chooseAction(q,K,z,Z,J,tt){const et=K;if(et.miniBoss)return!1;const it=q/Q.A.MAX_DIFFICULTY;et.updateClouds();const st={fire:0,ice:0,water:0,plant:0,storm:0,astral:0},nt=Z.getCurrentSource().getCurrentBamSpells();for(let Y=0;Yrt&&(at=Y,rt=nt[Y]);if("fire"===at)et.waterMode();else if("ice"===at){const q=Math.random();q<.34?et.earthMode():q<.67?et.iceMode():et.waterMode()}else if("plant"===at){const q=Math.random();q<.34?et.earthMode():q<.67?et.iceMode():et.stormMode()}else if("storm"===at)et.iceMode();else if("water"===at)Math.random()<.5?et.earthMode():et.stormMode();else{const q=Math.random();q<.25?et.earthMode():q<.5?et.iceMode():q<.75?et.waterMode():et.stormMode()}const ot=et.attacks;if(ot.length<=0)return tt(),!0;const ht=Q.A.getBestAttack(ot,this,Z.getCurrentSource(),1-it);return Y.Aq$.isDefined(ht)?(J(K,Z,tt,ht,Math.random()<.25-.25*it),!0):(tt(),!0)}}},75915:(q,K,z)=>{"use strict";z.d(K,{u:()=>ct});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(88022),J=z(56942),tt=z(50503),et=z(95946),it=z(52239),st=z(29949),nt=z(67462),at=z(38487),rt=z(35120),ot=z(77938);var ht;!function(q){q[q.shadow=0]="shadow",q[q.element1=1]="element1",q[q.element2=2]="element2",q[q.element3=3]="element3",q[q.element4=4]="element4",q[q.stunned=5]="stunned"}(ht||(ht={}));class ct extends at.s{static createTeam(q,K){return[new ct(q,K)]}constructor(q,K){super(q,K),this._bossContainer=null,this._bossContainerGameObject=null,this._config=null,this._currentElement=et.a.Shadow,this._currentEnergy=0,this._currentState=ht.shadow,this.aoaTier=2,this.showHealthBar=!0,this._config=(()=>{const q=rt.q.instance.prodigy.gameContainer.get("f71-42eb"),K=ot.t.getItem("boss",18).data;return X.merge({},K,q.getValue("crystalGolemConfigOverrides"))})(),this.source.maxHP=tt.A.getCreatureHP(this),X.merge(this.modifiers,this._config.creatureModifiers)}getAssets(){return X.concat(super.getAssets(),J.Q.Default_boss_18_json,Z._.Boss_aspen_extras_json,J.Q.Spine_flash_json,X.flatMap(X.values(this._config.battle.attacks)).map((q=>`spell-${q}`)))}getBamSpells(q){return X.flattenDeep(X.values(this._config.battle.attacks).map((q=>q.map((q=>({ID:q,locked:!1,type:nt.U.Native}))))))}setBossContainer(q){this._bossContainer=q,this._bossContainerGameObject=new Q._mx,this._bossContainerGameObject.addComponent(Q.K16),this._bossContainer.add(this._bossContainerGameObject.legacyTransform.group),this._bossContainer.castDelay=this._config.battle.castDelay}setTeam(q){this._team=q,this._team.hasManagedEnergy=!0}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}chooseAction(q,K,z,Y,Q,Z){var J;z.setEnergy(this._currentEnergy);let et=Z,it=0;switch(this._currentState){case ht.element4:it=X.sample(this._config.battle.attacks[this._currentElement].filter((q=>!new st.I(q).isSingleShot()))),z.setEnergy(this._currentEnergy=0),et=()=>{this.stun().then((()=>{Z()}))};break;case ht.stunned:return Z(),!0;default:it=X.sample(this._config.battle.attacks[this._currentElement].filter((q=>new st.I(q).isSingleShot())))}return(null!==(J=this._animationPromise)&&void 0!==J?J:Promise.resolve()).then((()=>{this._animationPromise=null,Q(K,Y,et,it,tt.A.rollMissChance(q,K.getSource().modifiers.miss))})),!0}registerIncomingAttack(q,K,z,Y){if(this._currentState!==ht.stunned&&Y.damage>=this.getCurrentHearts())return void this.stun();const Q=new st.I(K);switch(this._currentState){case ht.shadow:if(!z){const q=Q.getElement();let K=et.a.Shadow;K=X.includes(ct.SWAP_ELEMENTS,q)?q:X.sample(ct.SWAP_ELEMENTS),this.switchElement(K),++this._currentState}break;case ht.stunned:if(!z&&!Q.isSingleShot()){Q.getValue("animationType")===it.i.aoa?Y.damage=Math.floor(1.25*Y.damage):Y.damage*=3;const q=this._bossContainer.displayDamage;this._bossContainer.displayDamage=(K,z,Q)=>{this._bossContainer.showAoeDamage(Y,Q),this._bossContainer.displayDamage=q}}(z||Y.damage{"use strict";z.d(K,{e:()=>nt});var Y=z(62459),Q=z(95891),X=z(35120),Z=z(50503),J=z(77938),tt=z(47315),et=z(38487),it=z(55734),st=z(47223);class nt extends et.s{get bossCharacter(){return this._bossCharacter}static createTeam(q,K){const z={ID:117,level:K.level},Y=new nt(q,K),Q=q=>(q.actionChooser=Y,q.aoaTier=2,q);return[Q(new it.R(q,Object.assign({},z))),Q(new it.R(q,z)),Y]}constructor(q,K){super(q,K),this._bossContainer=null,this._bossContainerGameObject=null,this._config=null,this.showHealthBar=!0,this._config=(()=>{const q=X.q.instance.prodigy.gameContainer.get("f71-42eb"),K=J.t.getItem("boss",21).data;return Q.merge({},K,q.getValue("crystalThiefConfigOverrides"))})(),this._config.wizard.data=K,"string"==typeof K.nameKey&&(this._config.wizard.appearance.name=K.nameKey),this._bossCharacter=new st.s(q);const z=Object.assign({},this._config.wizard);z.data.hp=this.source.maxHP=Z.A.getCreatureHP(this),this._bossCharacter.aoaTier=2,this._bossCharacter.init(z),this._bossCharacter.actionChooser=this,Q.merge(this.modifiers,this._config.creatureModifiers),this._bossCharacter.modifiers=Object.assign({},this.modifiers)}setBossContainer(q){this._bossContainer=q,this._bossContainerGameObject=new Y._mx,this._bossContainerGameObject.addComponent(Y.K16),this._bossContainer.add(this._bossContainerGameObject.legacyTransform.group),this._bossContainer.battleShy=this._config.battle.battleShy,this._bossContainer.forceWeaponVisual=!0}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}getAssets(){return Q.concat(super.getAssets(),this._bossCharacter.getSpellAssets())}getBamSpells(q){return this._bossCharacter.getCurrentBamSpells()}chooseAction(q,K,z,Q,et,it){if(K===this._bossContainer){const X=K.source.getCurrentBamSpells(),st=[],nt=[];for(let q=0;q=3&&nt.length>0&&(z.changeEnergy(-3),at=nt[Y.cj9.between(0,nt.length-1)]),!Y.Aq$.isDefined(at))return Y.VyI.log("Invalid attack, skipping turn",Y.$bb.Warning),it(),!0;et(K,Q,it,at,Z.A.rollMissChance(q,K.getSource().modifiers.miss))}else X.q.instance.prodigy.battle.chooseAction(q,!1,K,Q.getCurrent(),z,Q,et,null,it);return!0}}},66726:(q,K,z)=>{"use strict";z.d(K,{x:()=>Q});var Y=z(38487);class Q extends Y.s{}},84705:(q,K,z)=>{"use strict";z.d(K,{Y:()=>st});var Y=z(62459),Q=z(95891),X=z(50503),Z=z(67462),J=z(56942),tt=z(38487),et=z(35120),it=z(77938);class st extends tt.s{static createTeam(q,K){return[new st(q,K)]}constructor(q,K){super(q,K),this._bossContainer=null,this._bossContainerGameObject=null,this._config=null,this._nextSpellIndex=0,this.aoaTier=2,this.showHealthBar=!0,this._config=(()=>{const q=et.q.instance.prodigy.gameContainer.get("f71-42eb"),K=it.t.getItem("boss",20).data;return Q.merge({},K,q.getValue("glaciasConfigOverrides"))})(),this.source.maxHP=X.A.getCreatureHP(this),Q.merge(this.modifiers,this._config.creatureModifiers)}setBossContainer(q){this._bossContainer=q,this._bossContainerGameObject=new Y._mx,this._bossContainerGameObject.addComponent(Y.K16),this._bossContainer.add(this._bossContainerGameObject.legacyTransform.group),this._bossContainer.castDelay=this._config.battle.castDelay}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}getAssets(){return Q.concat(super.getAssets(),J.Q.Default_boss_20_json,this._config.battle.attacks.map((q=>`spell-${q}`)))}getBamSpells(q){return this._config.battle.attacks.map((q=>({ID:q,locked:!1,type:Z.U.Native})))}chooseAction(q,K,z,Y,Q,Z){const J=this._config.battle.attacks[this._nextSpellIndex];if(++this._nextSpellIndex>=this._config.battle.attacks.length){this._nextSpellIndex=0;this.game.state.getCurrentState().teams[1].changeEnergy(-3)}return Q(K,Y,Z,J,X.A.rollMissChance(q,K.getSource().modifiers.miss)),!0}}},8811:(q,K,z)=>{"use strict";z.d(K,{C:()=>Q});var Y=z(38487);class Q extends Y.s{}},30424:(q,K,z)=>{"use strict";z.d(K,{d:()=>X});var Y=z(50503),Q=z(38487);class X extends Q.s{chooseAction(q,K,z,Q,X,Z){const J=q/Y.A.MAX_DIFFICULTY,tt=K.source.source.attacks;if(tt.length<=0)return Z(),!0;const et=Y.A.getBestAttack(tt,this,Q.getCurrentSource(),1-J),it=.25-.25*q;return X(K,Q,Z,et,Math.random(){"use strict";z.d(K,{K:()=>J});var Y=z(62459),Q=z(50503),X=z(77938),Z=z(38487);class J extends Z.s{chooseAction(q,K,z,X,Z,J){const tt=q/Q.A.MAX_DIFFICULTY,et=K.source.source.attacks,it=Q.A.getBestAttack(et,K.getSource(),X.getCurrentSource(),1-tt);return Y.Aq$.isDefined(it)?(Z(K,X,J,it,Math.random()<.25-.25*q),!0):(J(),!0)}getDrops(){return super.getDrops().concat({type:"gold",N:100},X.t.getItemDrops())}}},20786:(q,K,z)=>{"use strict";z.d(K,{i:()=>bt,F:()=>pt});var Y=z(62459),Q=z(95891),X=z(35120),Z=z(51742),J=z(36648),tt=z(56942),et=z(50503),it=z(74452),st=z(1434),nt=z(8674),at=z(79687);let rt=class{constructor(q,K){this._fsmID=null,this._fsmVariables={},this._sharedFSMVariables={},this._instancedFSMVariableQueue=[],this._currentInstanceVariables={onComplete:null,variables:{}},this._fsmService=null,this._fsmController=null,this._fsmController=K,this._fsmService=q,this._instancedFSMVariableQueue.push(this._currentInstanceVariables)}setID(q){return this._fsmID=q,this}setSharedVariables(q){return this._sharedFSMVariables=Object.assign({},q),this}setSharedVariableValue(q,K){return this._sharedFSMVariables[q]=K,this}setInstanceVariables(q){return this._currentInstanceVariables.variables=Object.assign({},q),this}setInstanceVariableValue(q,K){return this._currentInstanceVariables.variables[q]=K,this}getVariableValue(q){return this._fsmVariables[q]}setChainedFSM(q){return this.setOnCompleteCallback(q.execute.bind(q)),this}setOnCompleteCallback(q){return this._currentInstanceVariables.onComplete=q,this}execute(){let q=this._currentInstanceVariables;this._instancedFSMVariableQueue.length>1&&(q=this._instancedFSMVariableQueue.shift()),this._fsmVariables=Object.assign(Object.assign({},this._sharedFSMVariables),q.variables),this._fsmController.execute(this._fsmService.getStateMachine(this._fsmID),this._fsmVariables,q.onComplete)}queueVariablesInstance(){return this._currentInstanceVariables={onComplete:null,variables:{}},this._instancedFSMVariableQueue.push(this._currentInstanceVariables),this}getInstancedVariablesQueue(){return this._instancedFSMVariableQueue}};rt=(0,nt.Cg)([(0,at.injectable)(),(0,nt.Qj)(0,(0,at.inject)(Y.$Bt.FSMService)),(0,nt.Qj)(1,(0,at.inject)(Y.$Bt.IFSMController)),(0,nt.Sn)("design:paramtypes",[Y.CQn,Object])],rt);const ot=(...q)=>{const K=[...q],z=[];let Y=null,Q=null;for(;K.length>0;){const q=K.findIndex((q=>q instanceof rt)),X=q>-1?K[q]:null;let Z=null;if(X?(Z=q>0?ht.bind(null,[...K.splice(0,q),X.execute.bind(X)]):X.execute.bind(X),K.shift()):Z=ht.bind(null,K.splice(0)),Y){if(Q){let q=z.find((q=>q.chainedFSM===Q));q||(q={chainedFSM:Q,count:0}),z.push(q);Q.getInstancedVariablesQueue()[q.count].onComplete=Z,++q.count}}else Y=Z;X&&(Q=X)}return Y};function ht(q){const K=q.length;for(let z=0;z({ID:q,locked:!1,type:dt.U.Native})))}}var bt;!function(q){q.Wyrm="Above Ground",q.Burying="Burying Underground",q.Underground="Underground",q.Emerging="Emerging",q.Taunting="Taunting",q.Shuffling="Rocks Shuffling",q.Stunned="Stunned",q.ReturningToMiddle="Returning To Middle",q.Roaring="Roaring"}(bt||(bt={}));class pt extends lt.s{get currentState(){return this._currentState}get teamPosition(){return this._currentTeamPosition}static createTeam(q,K){return[new pt(q,K)]}constructor(q,K){super(q,K),this._currentState=bt.Wyrm,this._wyrmContainer=null,this._rocksContainers=[],this._config=null,this._currentTeamPosition=it.I.Middle,this._wyrmSpells=null,this._rocksSpells=null,this._chainedFSMCache={},this._previousHearts=0,this._phaseHPThreshold=0,this._previousRockCount=0,this._destroyedRockForm=!1,this._previousMissedSpellCount=0,this.aoaTier=2,this.showHealthBar=!0,this._config=(()=>{const q=X.q.instance.prodigy.gameContainer.get("f71-42eb"),K=ut.t.getItem("boss",17).data;return Q.merge({},K,q.getValue("shadowWyrmConfigOverrides"))})(),this._wyrmSpells=this.buildSpellsList(this._config.battle.wyrmAttacks),this._rocksSpells=this.buildSpellsList(this._config.battle.rockAttacks),Q.merge(this.modifiers,this._config.creatureModifiers);const z=X.q.instance.prodigy.gameContainer;this._chainedFSMCache[bt.Burying]=z.resolve(rt).setID(117).setSharedVariables({shadowWyrmBoss:this}),this._chainedFSMCache[bt.Stunned]=z.resolve(rt).setID(120).setSharedVariables({fsmController:z.get(Y.$Bt.IFSMController),fsmService:z.get(Y.$Bt.FSMService),game:this.game,shadowWyrmBoss:this}),this._chainedFSMCache[bt.Shuffling]=z.resolve(rt).setID(118).setSharedVariables({gameObjectFactory:this.game.add,positions:pt.WYRM_POSITIONS}),this._chainedFSMCache[bt.Emerging]=z.resolve(rt).setID(119).setSharedVariables({shadowWyrmBoss:this,emergeAnimation:"emerge"}),this._chainedFSMCache[bt.Taunting]=z.resolve(rt).setID(122).setSharedVariables({shadowWyrmBoss:this}),this._chainedFSMCache[bt.Roaring]=z.resolve(rt).setID(123).setSharedVariables({shadowWyrmBoss:this,game:this.game}),this.source.maxHP=et.A.getCreatureHP(this)*this._config.battle.hpModifier,this._previousHearts=this.getCurrentHearts(),this._phaseHPThreshold=this.getMaxHearts()*this._config.battle.phaseHPThresholdPercentage,this._previousRockCount=this.getActiveRockCount(),this._previousMissedSpellCount=X.q.instance.prodigy.battle.battleStats.spellsFailed}changeCurrentHearts(q,K){super.changeCurrentHearts(q,K),this._currentState===bt.Underground&&(this._destroyedRockForm=!0),this._currentTeamPosition!==it.I.Middle&&this.getBossTeam().onCurrentMemberHPChange.dispatch(this,q)}setBossContainer(q){this._wyrmContainer=q,this._wyrmContainer.OnLoad.addOnce((()=>{this.setSharedVariableValueForStates("shadowWyrmSpine",this._wyrmContainer.spine,[bt.Burying,bt.Stunned,bt.Roaring,bt.Taunting,bt.Emerging])})),this.setSharedVariableValueForStates("shadowWyrmContainer",this._wyrmContainer,[bt.Emerging,bt.Stunned]);for(let K=0;K<2;++K){const q=pt.WYRM_POSITIONS[K+1],z=new st.K(this.game,null,new ft(this.game,this),q.x,q.y);z.flip(),z.startLoad(),this._rocksContainers.push(z),this.parentContainerToBattleLayer(z,this._rocksContainers.length)}this._chainedFSMCache[bt.Shuffling].setSharedVariableValue("rocks",[this._wyrmContainer,...this._rocksContainers])}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}isKnockedOut(){return this._currentState===bt.Wyrm&&super.isKnockedOut()}getAssets(){return Q.concat(super.getAssets(),J.q.Cc_shadowWyrm_mound,tt.Q.Default_boss_17_json,Z.c.Sfx_wyrmroar,this._config.battle.rockAttacks.map((q=>`spell-${q}`)),this._config.battle.wyrmAttacks.map((q=>`spell-${q}`)))}getCurrentBamSpells(){return this._currentState===bt.Underground?this._rocksSpells:this._wyrmSpells}chooseAction(q,K,z,Z,J,tt){const et=this.getCurrentHearts(),st=this.getActiveRockCount(),nt=this._previousHearts!==et,at=this._previousRockCount!==st,rt=X.q.instance.prodigy.battle.battleStats.spellsFailed,ht=this._previousMissedSpellCount!==rt;if(this._previousHearts=et,this._previousRockCount=st,this._previousMissedSpellCount=rt,this._currentState===bt.Wyrm&&(this.getCurrentHearts()>this.getPhaseHPThreshold()||!nt)){const q=X.q.instance.prodigy.battle,z=this.game.state.getCurrentState();q.chooseAction(this._config.battle.difficulty,!1,K,Z.getCurrent(),z.teams[1],Z,((q,K,z,Y,Q,X)=>{J(q,K,z,Y,Q)}),null,tt)}else{if(this.getCurrentHearts()<=0){const q=[];return this._currentState===bt.Underground&&q.push(this._chainedFSMCache[bt.Emerging].queueVariablesInstance()),this._currentTeamPosition!==it.I.Middle?q.push(...this.getReturnToMiddleFSMChain()):q.push((()=>{this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions(),this.setState(bt.Wyrm)})),ot(...q)(),!0}switch(this._currentState){case bt.Wyrm:ot(this._chainedFSMCache[bt.Burying].queueVariablesInstance(),(()=>{this.setHiddenUnderground(!0),this.getBossTeam().resetOverriddenPositions()}),this.getAttackAndShuffleFSMChain(J,K,Z,tt))();break;case bt.Underground:{const q=this.getActiveRockCount();if(this._destroyedRockForm)this._destroyedRockForm=!1,2===q?ot((()=>{this.setHiddenUnderground(!1);const q=this.getBossTeam();this._rocksContainers.forEach((K=>{q.resetContainerOverriddenPosition(K)}))}),this._chainedFSMCache[bt.Stunned].queueVariablesInstance(),tt)():ot(...this.getRevealFSMChain(),this.bindAttackCallback(J,K,Z,tt,Q.sample(this._config.battle.wyrmAttacks)))();else if(q>0)if(at)ot(this._chainedFSMCache[bt.Emerging].queueVariablesInstance(),this._chainedFSMCache[bt.Taunting].queueVariablesInstance(),this._chainedFSMCache[bt.Burying].queueVariablesInstance(),this.getAttackAndShuffleFSMChain(J,K,Z,tt))();else{const q=ot(this._chainedFSMCache[bt.Emerging].queueVariablesInstance(),this._chainedFSMCache[bt.Burying].queueVariablesInstance(),this.getAttackAndShuffleFSMChain(J,K,Z,tt));ht?this.game.time.events.addTimer(1e3,q,this):q()}else ot(...this.getTauntAndReturnToMiddleFSMChain(),this.bindAttackCallback(J,K,Z,tt,73))();break}case bt.Stunned:{const q=ot(...this.getClearStunFSMChain(),this.bindAttackCallback(J,K,Z,tt,Q.sample(this._config.battle.wyrmAttacks)));ht?this.game.time.events.addTimer(1e3,q,this):q();break}default:Y.VyI.log("Shadow Wyrm is choosing action in unhandled state!!!!!",Y.$bb.Error)}}return!0}getShuffleFSMChain(q){const K=this._chainedFSMCache[bt.Shuffling],z=this._config.rockShuffle[this.getActiveRockCount()+1];return[K.setInstanceVariableValue("shuffleCount",q).setInstanceVariableValue("startRockTimeElapsed",z.timeElapsed.start).setInstanceVariableValue("endRockTimeElapsed",z.timeElapsed.end).setInstanceVariableValue("startRockDelay",z.delay.start).setInstanceVariableValue("endRockDelay",z.delay.end).queueVariablesInstance(),()=>{const q=K.getVariableValue("updatedRockPositions"),z=Object.keys(q).find((K=>q[K]===this._currentTeamPosition));this.setWyrmLocation(parseInt(z,10));const Q=this.getBossTeam(),X=this._rocksContainers.length;for(let K=0;KY.cj9.fuzzyEqual(K.x,q.x)&&Y.cj9.fuzzyEqual(K.y,q.y)));Q.overrideTeamPositionForContainer(q,z),this.parentContainerToBattleLayer(q,z)}}]}getAttackAndShuffleFSMChain(q,K,z,Y){return this.bindAttackCallback(q,K,z,(()=>{if(this.game.state.getCurrentState().teams[0].isDefeated())Y();else{const q=this._config.rockShuffle[this.getActiveRockCount()+1].shuffleCount;ot(...this.getShuffleFSMChain(ct.o.integerInRange(q.min,q.max)),Y)()}}),Q.sample(this._config.battle.rockAttacks))}getRevealFSMChain(){const q=[this._chainedFSMCache[bt.Emerging].queueVariablesInstance()];return this._currentTeamPosition!==it.I.Middle&&(q.push(this._chainedFSMCache[bt.Roaring].queueVariablesInstance()),q.push(...this.getReturnToMiddleFSMChain())),q.push((()=>{this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions()})),q}getTauntAndReturnToMiddleFSMChain(){const q=[this._chainedFSMCache[bt.Emerging].queueVariablesInstance(),this._chainedFSMCache[bt.Taunting].queueVariablesInstance()];return this._currentTeamPosition!==it.I.Middle?q.push(...this.getReturnToMiddleFSMChain()):q.push((()=>{this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions()})),q}getClearStunFSMChain(){return this._currentTeamPosition!==it.I.Middle?[this._chainedFSMCache[bt.Roaring].queueVariablesInstance(),...this.getReturnToMiddleFSMChain()]:[()=>{this._wyrmContainer.idle(),this.getBossTeam().resetOverriddenPositions(),this.setState(bt.Wyrm)}]}getReturnToMiddleFSMChain(){return[this._chainedFSMCache[bt.Burying].queueVariablesInstance(),()=>{this.swapWyrmToMiddle(),this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions()},this._chainedFSMCache[bt.Emerging].queueVariablesInstance()]}swapWyrmToMiddle(){const q=pt.WYRM_POSITIONS[it.I.Middle],K=this._rocksContainers.find((K=>Y.cj9.fuzzyEqual(K.x,q.x)&&Y.cj9.fuzzyEqual(K.y,q.y))),z=this._currentTeamPosition;this.setContainerLocation(K,this._currentTeamPosition),this.setWyrmLocation(it.I.Middle),K.position.copyFrom(pt.WYRM_POSITIONS[z]),this._wyrmContainer.position.copyFrom(q)}getActiveRockCount(){return this._currentState===bt.Wyrm?this._rocksContainers.length:this._rocksContainers.filter((q=>q.source.getCurrentHearts()>0)).length}setState(q){this._currentState=q,this._currentState===bt.Underground?this.modifiers.takenDamageMultiplier=this._config.battle.undergroundDamageMultiplier:this.modifiers.takenDamageMultiplier=1}setWyrmLocation(q){this._currentTeamPosition=q,this.setContainerLocation(this._wyrmContainer,q)}setContainerLocation(q,K){this.getBossTeam().overrideTeamPositionForContainer(q,K),this.parentContainerToBattleLayer(q,K)}buildSpellsList(q){return q.map((q=>({ID:q,locked:!1,type:dt.U.Native})))}setSharedVariableValueForStates(q,K,z){const Y=z.length;for(let Q=0;Q{K.setTargetable(q),K.source.data.hp=q?1:0,K.ran=!1}));const K=this.getBossTeam();K.team=q?[this._wyrmContainer,...this._rocksContainers]:[this._wyrmContainer]}getPhaseHPThreshold(){return this._phaseHPThreshold}bindAttackCallback(q,K,z,Y,Q){return q.bind(null,this._wyrmContainer,z,Y,Q,et.A.rollMissChance(this._config.battle.difficulty),{dmgMod:this._config.battle.damageModifier})}}pt.WYRM_POSITIONS=[new Y.I9Y(935,500),new Y.I9Y(1065,390),new Y.I9Y(1065,610)]},10655:(q,K,z)=>{"use strict";z.d(K,{A:()=>Q});var Y=z(38487);class Q extends Y.s{constructor(q,K){super(q,K),this.showHealthBar=!0}}},83668:(q,K,z)=>{"use strict";z.d(K,{o:()=>Z});var Y,Q=z(62459),X=z(50751);!function(q){q[q.Seen=0]="Seen",q[q.Defeated=1]="Defeated",q[q.StatusCount=2]="StatusCount"}(Y||(Y={}));class Z extends X.I{setBossSeen(q,K=!0){const z=this.getPersistentBossesStatus(),X=this.getBitIndexForBossStatus(q,Y.Seen);this.setPersistentBossesStatus(K?Q.OQO.setBit(z,X):Q.OQO.clearBit(z,X))}isBossSeen(q){return Q.OQO.isBitSet(this.getPersistentBossesStatus(),this.getBitIndexForBossStatus(q,Y.Seen))}setBossDefeated(q,K=!0){this.setBossDefeatedAllTime(q,K),this.setBossDefeatedCurrentRun(q,K)}setBossDefeatedAllTime(q,K=!0){const z=this.getPersistentBossesStatus(),X=this.getBitIndexForBossStatus(q,Y.Defeated);this.setPersistentBossesStatus(K?Q.OQO.setBit(z,X):Q.OQO.clearBit(z,X))}setBossDefeatedCurrentRun(q,K=!0){const z=this.getRunBossesStatus();this.setRunBossesStatus(K?Q.OQO.setBit(z,q):Q.OQO.clearBit(z,q))}isBossDefeatedAllTime(q){return Q.OQO.isBitSet(this.getPersistentBossesStatus(),this.getBitIndexForBossStatus(q,Y.Defeated))}isBossDefeatedCurrentRun(q){return Q.OQO.isBitSet(this.getRunBossesStatus(),q)}isMakaluSeen(){return this.isBossSeen(1)}setMakaluSeen(){this.setBossSeen(1)}isGrumpyYetiSeen(){return this.isBossSeen(0)}setGrumpyYetiSeen(){this.setBossSeen(0)}isCrystalGolemSeen(){return this.isBossSeen(2)}setCrystalGolemSeen(){this.setBossSeen(2)}isGlaciasSeen(){return this.isBossSeen(3)}setGlaciasSeen(){this.setBossSeen(3)}isWinstonVonLootSeen(){return this.isBossSeen(4)}setWinstonVonLootSeen(){this.setBossSeen(4)}isMakaluDefeatedAllTime(){return this.isBossDefeatedAllTime(1)}isMakaluDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(1)}setMakaluDefeated(){this.setBossDefeated(1)}isGrumpyYetiDefeatedAllTime(){return this.isBossDefeatedAllTime(0)}isGrumpyYetiDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(0)}setGrumpyYetiDefeated(){this.setBossDefeated(0)}isCrystalGolemDefeatedAllTime(){return this.isBossDefeatedAllTime(2)}isCrystalGolemDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(2)}setCrystalGolemDefeated(){this.setBossDefeated(2)}isGlaciasDefeatedAllTime(){return this.isBossDefeatedAllTime(3)}isGlaciasDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(3)}setGlaciasDefeated(){this.setBossDefeated(3)}isWinstonVonLootDefeatedAllTime(){return this.isBossDefeatedAllTime(4)}isWinstonVonLootDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(4)}setWinstonVonLootDefeated(){this.setBossDefeated(4)}getBitIndexForBossStatus(q,K){return q*Y.StatusCount+K}}},50751:(q,K,z)=>{"use strict";z.d(K,{I:()=>tt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z(10044);let tt=class{get updated(){return this._updated}constructor(q){this._updated=!1,this._data=null,this._currentPlayer=null,this._currentPlayer=q}getInitializationData(){return{persistentData:{bossesStatus:0}}}getDataAndClear(){return this._updated=!1,this._data}setData(q,K=!1){q&&(this._data=q,this._updated=this._updated||K)}getCurrentMap(){var q;return null!==(q=this.getRunSchema().currentMap)&&void 0!==q?q:null}setCurrentMap(q){this.getRunSchema().currentMap=q,this._updated=!0}getLevel(){var q;return null!==(q=this.getRunSchema().level)&&void 0!==q?q:1}isRunStarted(){return!(Z.isEmpty(this.getRunSchema())&&Z.isEmpty(this.getPhaseSchema()))}setCheckpoint(q,K,z){this.getPhaseSchema().checkpoint={index:q,location:{x:K.x,y:K.y},facingDirection:z},this._updated=!0}getCheckpointIndex(){var q,K;return null!==(K=null===(q=this.getPhaseSchema().checkpoint)||void 0===q?void 0:q.index)&&void 0!==K?K:-1}getCheckpointLocation(){var q,K;return null!==(K=null===(q=this.getPhaseSchema().checkpoint)||void 0===q?void 0:q.location)&&void 0!==K?K:null}getFacingDirection(){var q,K;return null!==(K=null===(q=this.getPhaseSchema().checkpoint)||void 0===q?void 0:q.facingDirection)&&void 0!==K?K:J.y.Left}getCompletedRuns(){var q;return null!==(q=this.getPersistentSchema().completedRuns)&&void 0!==q?q:0}setCompletedRuns(q){this.getPersistentSchema().completedRuns=q,this._updated=!0}setPersistentBossesStatus(q){this.getPersistentSchema().bossesStatus=q,this._updated=!0}getPersistentBossesStatus(){var q;return null!==(q=this.getPersistentSchema().bossesStatus)&&void 0!==q?q:0}setRunBossesStatus(q){this.getRunSchema().bossesStatus=q,this._updated=!0}getRunBossesStatus(){var q;return null!==(q=this.getRunSchema().bossesStatus)&&void 0!==q?q:0}getSeed(){var q;return null!==(q=this.getRunSchema().seed)&&void 0!==q?q:0}setMapObjectCompleted(q,K){const z=this.getMapObjectsID(q),Y=this.getPhaseSchema();let X=Y.mapObjectStatus;X||(X={},Y.mapObjectStatus=X),X[z.objectsIndex]=K?Q.OQO.setBit(X[z.objectsIndex],z.bit):Q.OQO.clearBit(X[z.objectsIndex],z.bit),this._updated=!0}isMapObjectCompleted(q){const K=this.getPhaseSchema().mapObjectStatus;if(K){const z=this.getMapObjectsID(q),Y=K[z.objectsIndex];return!!Q.Aq$.isDefined(Y)&&Q.OQO.isBitSet(Y,z.bit)}return!1}setConditionActive(q,K){const z=this.getPhaseSchema();z.conditionStatus||(z.conditionStatus={}),z.conditionStatus[q]=K}isConditionActive(q){const K=this.getPhaseSchema();return!!K.conditionStatus&&K.conditionStatus[q]}getActiveConditions(){const q=this.getPhaseSchema();return q.conditionStatus?Object.keys(q.conditionStatus).filter((K=>q.conditionStatus[K])):[]}startDungeonRun(){const q=this.getRunSchema();q.bossesStatus=0,q.currentMap=null,q.level=this._currentPlayer.getLevel(),q.seed=Date.now(),this.resetPhaseData()}resetPhaseData(){this._data?(this._data.phaseData={},this._updated=!0):Q.VyI.log("Dungeon was reset without having data initialized",Q.$bb.Warning)}resetRunData(){this._data?(this._data.runData={},this.resetPhaseData(),this._updated=!0):Q.VyI.log("Dungeon was reset without having data initialized",Q.$bb.Warning)}resetAllData(){this._data?(this._data.persistentData={},this.resetPhaseData(),this.resetRunData(),this._updated=!0):Q.VyI.log("Dungeon was reset without having data initialized",Q.$bb.Warning)}isValid(){const q=this.getRunSchema();return Q.Aq$.isDefined(q.seed)&&Q.Aq$.isDefined(q.currentMap)}getMapObjectsID(q){const K=Math.floor(q/32);return{objectsIndex:K,bit:q-32*K}}getPersistentSchema(){return this._data.persistentData||(this._data.persistentData={}),this._data.persistentData}getRunSchema(){return this._data.runData||(this._data.runData={}),this._data.runData}getPhaseSchema(){return this._data.phaseData||(this._data.phaseData={}),this._data.phaseData}};tt=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("ad2-c5b2")),(0,Y.Sn)("design:paramtypes",[Object])],tt)},21492:(q,K,z)=>{"use strict";z.d(K,{C:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(95891),tt=z(55110),et=z(87392),it=z(77938);let st=Y=class{constructor(q){this.data=null,this.localizer=null,this.localizer=q}init(q){this.data=q}initFromProtobuf(q){this.data=new tt.S,this.data.setFirstName(q.first>0?q.first:null),this.data.setMiddleName(q.middle>0?q.middle:null),this.data.setLastName(q.last>0?q.last:null),this.data.setNickname(q.nick>0?q.nick:null)}getName(){return this.validateNameData(),null===this.data.getNickname()?this.getFullName():it.t.getItem("nickname",this.data.getNickname()).data.value.replace("{first}",it.t.getItem("name",this.data.getFirstName()).data.value).replace("{middle}",it.t.getItem("name",this.data.getMiddleName()).data.value).replace("{last}",it.t.getItem("name",this.data.getLastName()).data.value)}getNameWithoutNickname(){return this.validateNameData(),this.getFullName()}getFirstName(){this.validateNameData();const q=this.data.getFirstName();return q>0?it.t.getItem("name",q).data.value:this.getFallbackName()}generateRandomName(){this.data=new tt.S,this.data.setFirstName(Y.getRandomFirstName()),this.data.setMiddleName(Y.getRandomMiddleName()),this.data.setLastName(Y.getRandomLastName())}getFullName(){if(X.Aq$.isDefined(this.data.getFirstName())){const q=it.t.getItem("name",this.data.getFirstName()).data.value;if(X.Aq$.isDefined(this.data.getMiddleName())&&X.Aq$.isDefined(null===this.data.getLastName())){const K=`${it.t.getItem("name",this.data.getMiddleName()).data.value}${it.t.getItem("name",this.data.getLastName()).data.value}`;return`${q} ${J.capitalize(K)}`}return q}return this.getFallbackName()}validateNameData(){if(this.data&&this.data.isValid()){X.Aq$.isDefined(this.data.getFirstName())&&0===it.t.getItemsWithFilter("name",(q=>0===q.data.type&&q.ID===this.data.getFirstName())).length&&this.data.setFirstName(Y.getRandomFirstName());const q=this.data.getMiddleName(),K=this.data.getLastName(),z=this.data.getNickname();X.Aq$.isDefined(q)&&X.Aq$.isDefined(K)?(0===it.t.getItemsWithFilter("name",(q=>0===q.data.type&&q.ID===this.data.getFirstName())).length&&this.data.setFirstName(Y.getRandomFirstName()),0===it.t.getItemsWithFilter("name",(K=>1===K.data.type&&K.ID===q)).length&&this.data.setMiddleName(Y.getRandomMiddleName()),0===it.t.getItemsWithFilter("name",(q=>2===q.data.type&&q.ID===K)).length&&this.data.setLastName(Y.getRandomLastName()),X.Aq$.isDefined(z)&&0===it.t.getItemsWithFilter("nickname",(q=>q.ID===z)).length&&this.data.setNickname(null)):(this.data.setMiddleName(null),this.data.setLastName(null),this.data.setNickname(null))}else this.generateRandomName()}static getRandomFirstName(){return J.sample(et.f.getFilteredFirstNames()).ID}static getRandomMiddleName(){return J.sample(et.f.getFilteredMiddleNames()).ID}static getRandomLastName(){return J.sample(et.f.getFilteredLastNames()).ID}getData(){return this.data}getFallbackName(){var q;return null!==(q=this._fallbackName)&&void 0!==q?q:this.localizer.getText("FALLBACK_NAME_WIZARD")}setFallbackName(q){this._fallbackName=q}};st=Y=(0,Q.Cg)([(0,Z.injectable)(),(0,Q.Qj)(0,(0,Z.inject)(X.$Bt.LocalizationService)),(0,Q.Sn)("design:paramtypes",[X.dTp])],st)},62901:(q,K,z)=>{"use strict";z.d(K,{r:()=>Z});var Y=z(8674),Q=z(62459),X=z(79687);let Z=class{constructor(q){this.first=null,this.last=null,this.nick=null,this.localizer=null,this.localizer=q}init(q,K=null,z=null){this.first=q,this.last=K,this.nick=z}getName(){return Q.Aq$.isDefined(this.nick)?this.localizer.getText(this.nick).replace("{first}",this.localizer.getText(this.first)).replace("{last}",this.localizer.getText(this.last)):Q.Aq$.isDefined(this.last)?this.getNameWithoutNickname():this.getFirstName()}getNameWithoutNickname(){return`${this.localizer.getText(this.first)} ${this.localizer.getText(this.last)}`}getFirstName(){return Q.Aq$.isDefined(this.first)?this.localizer.getText(this.first):""}generateRandomName(){}};Z=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)(Q.$Bt.LocalizationService)),(0,Y.Sn)("design:paramtypes",[Q.dTp])],Z)},30705:(q,K,z)=>{"use strict";z.d(K,{b:()=>Y});class Y{static debugGUI(q,K,z,Y){}static removeDebugGUI(q){}static setPropertyValue(q,K,z){}}},45373:(q,K,z)=>{"use strict";z(8674),z(79600),z(62459),z(35120),z(34829),z(23748),z(20404),z(44094)},54950:(q,K,z)=>{"use strict";z.d(K,{S:()=>pt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(99625),J=z(5491),tt=z(35120),et=z(38443),it=z(77938),st=z(85697),nt=z(55800),at=z(80573),rt=z(52156),ot=z(62430),ht=z(9831),ct=z(68152),dt=z(80060),lt=z(37773),ut=z(97317),ft=z(65732),bt=z(88022);let pt=class{constructor(q){this._prefabLoader=null,this._prefabLoader=q}loadFollowPrefab(q,K,z=null){var Y,X;(0,ct.v)(K>0,`Invalid follow ID was provided: ${K}`);let J=null;if("legacy"===q)J=this._prefabLoader.loadFromGUID(Z.l.RealLegacyFollow,z),J.findComponentInChildren(nt.a).setFollowID(K);else if("pet"===q){const Q=it.t.getItem("pet",K);(0,ct.v)(!!Q,`Pet with ID '${K}' could not be found`);const X=null!==(Y=Q.metadata.assets.default)&&void 0!==Y?Y:Q.metadata.assets.reduced;(0,ct.v)(!!X,`Pet with ID '${K}' has no default asset defined`),X.type===ht.V.spriteSheet?(J=this._prefabLoader.loadFromGUID(Z.l.SpritesheetPetFollow,z),J.findComponentInChildren(rt.X).setAsset(K)):(J=this._prefabLoader.loadFromGUID(Z.l.SpinePetFollow,z),J.findComponentInChildren(ot.N).setAssetID(K));const et=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,st="pet"===q&&!et.kennel.isPetOnTeam(K);dt.d.updateInjectedValues(J,{[ft.E.ChargedCreatureEffectTier]:lt.e.getActivePlayerChargedLevelTier(),[ft.E.ChargedCreatureEffectDisplayType]:lt.e.activePlayerHasChargedLevels&&!st?ut.X$.IDLE:ut.X$.HIDDEN})}else"spine"===q&&(J=this._prefabLoader.loadFromGUID(Z.l.SpineFollow,z),J.findComponentInChildren(ot.N).setAssetID(K));if(!Q.o5U.isMobile()){const z="pet"===q?"pet":"follow",Y=it.t.getItem(z,K),Z=null===(X=null==Y?void 0:Y.data)||void 0===X?void 0:X.particleEffects;Q.Aq$.isDefined(Z)&&tt.q.instance.prodigy.load.assets([bt._.Particles_json],(()=>{for(let q=0;q-1,"Unsupported hitbox appearance type");const Y=it.t.getItem(q,K);let Q;if(q===J.V.Pet){"spine"===Y.metadata.assets.default.type?(Q=this._prefabLoader.loadFromGUID(Z.l.DynamicSpinePet,z),Q.findComponentInChildren(ot.N).setAssetID(Y.ID)):(Q=this._prefabLoader.loadFromGUID(Z.l.DynamicSpritesheetPet,z),Q.findComponentInChildren(rt.X).setAsset(Y.ID))}else q===J.V.Dorm?(Q=this._prefabLoader.loadFromGUID(Z.l.MorphedSingleImageDorm,z),Q.findComponentInChildren(st.o).setDormItemID(Y.ID,"vertical")):q===J.V.Follow&&((0,ct.v)("legacy"===Y.metadata.type||"spine"===Y.metadata.type,"Unsupported follower type"),"legacy"===Y.metadata.type?(Q=this._prefabLoader.loadFromGUID(Z.l.MorphedLegacyFollow,z),Q.findComponentInChildren(nt.a).setFollowID(Y.ID)):"spine"===Y.metadata.type&&(Q=this._prefabLoader.loadFromGUID(Z.l.MorphedSpineFollow,z),Q.findComponentInChildren(ot.N).setAssetID(Y.ID)));return Q.findComponentInChildren(at.n).setData(q,K),Q}loadAppearancePrefab(q,K,z){(0,ct.v)("pet"===q,"Unsupported appearance type");const Y=it.t.getItem(q,K);let Q;const X=Y.metadata.assets.default;if(X)"spine"===X.type?(Q=this._prefabLoader.loadFromGUID(Z.l.SpinePet,z),Q.findComponentInChildren(ot.N).setAssetID(Y.ID)):(Q=this._prefabLoader.loadFromGUID(Z.l.SpritesheetPet,z),Q.findComponentInChildren(rt.X).setAsset(Y.ID));else{Y.metadata.assets.reduced&&(Q=this._prefabLoader.loadFromGUID(Z.l.SpritesheetPet,z),Q.findComponentInChildren(rt.X).setAsset(Y.ID,"pet","reduced"))}return Q}};pt=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("983-05a7")),(0,Y.Sn)("design:paramtypes",[Q.wNP])],pt)},52491:(q,K,z)=>{"use strict";z.d(K,{A:()=>tt});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(28152);let tt=Y=class extends X.uAl{constructor(){super(...arguments),this._depth=0,this._destroyLayerOnDestroy=!0}create(){super.create();const q=X.wa5.getActiveScene().addLayer(Y.LEGACY_MENU_LAYER_NAME,this._depth,!0),K=Z.q.instance.prodigy.open;this._previousMenuLayer=K.menuLayer,this._previousMenusGameObject=K.menusGameObject,K.menuLayer=q,this._addedMenuLayer=q,K.menusGameObject=null}destroy(){var q;const K=Z.q.instance.prodigy.open,z=K.menuLayer===this._addedMenuLayer;z&&(K.menuLayer=this._previousMenuLayer,K.menusGameObject=this._previousMenusGameObject),this._destroyLayerOnDestroy&&(z?X.wa5.getActiveScene().destroyLayer(Y.LEGACY_MENU_LAYER_NAME):null===(q=this._addedMenuLayer)||void 0===q||q.destroy(),delete this._addedMenuLayer),super.destroy()}};tt.LEGACY_MENU_LAYER_NAME="legacyMenuLayer",(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],tt.prototype,"_depth",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],tt.prototype,"_destroyLayerOnDestroy",void 0),tt=Y=(0,Q.Cg)([(0,X.EVk)("BindLegacyMenuLayer",J.Y.ui)],tt)},5885:(q,K,z)=>{"use strict";z.d(K,{E:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this.onOpenComplete=new Q.HN0}create(){super.create(),this.chestAnimator.OnAnimationComplete.addOnce((()=>{this.chestAnimator.playAnimation("idle",!0),this.inputObject.active=!0,this.guideHandAnimator.GameObject.active=!0,this.guideHandAnimator.play()}),this)}destroy(){this.onOpenComplete.dispose(),this.chestAnimator.OnAnimationComplete.removeAll(this),super.destroy()}open(){this.guideHandAnimator.GameObject.active=!1,this.chestAnimator.playAnimation("open",!1),this.chestAnimator.OnAnimationComplete.addOnce((()=>{this.onOpenComplete.dispatch()}),this)}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onOpenComplete",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.uAl),(0,Y.Sn)("design:type",Object)],Z.prototype,"chestAnimator",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Z.prototype,"inputObject",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.uAl),(0,Y.Sn)("design:type",Object)],Z.prototype,"guideHandAnimator",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("BossChest",X.Y.object)],Z)},9531:(q,K,z)=>{"use strict";z.d(K,{K:()=>at});var Y=z(8674),Q=z(62459),X=z(51742),Z=z(35120),J=z(28152),tt=z(27812),et=z(31029),it=z(92591),st=z(79825),nt=z(30488);let at=class extends et.u{constructor(){super(...arguments),this.alertSFX=X.c.Sfx_world,this.animationController=null,this._circleTrigger=null,this._waitingForAnimationController=!1,this._skipWalkAnimationOnDelayedRun=!1}update(){super.update(),this._waitingForAnimationController&&this.animationController&&(this.run(this._skipWalkAnimationOnDelayedRun),this._waitingForAnimationController=!1)}run(q=!1){if(!this.animationController)return Q.VyI.log("PlayMonsterAlertFSMComponent: Animation controller not ready, waiting for it to be initialized before running.",Q.$bb.Warning),this._waitingForAnimationController=!0,void(this._skipWalkAnimationOnDelayedRun=q);const K=!0===q?215:115;this.execute(K,{game:Z.q.instance.game,playerLocomotion:this._playerLocomotion,circleTrigger:this._circleTrigger,monsterTransform:this.animationController.GameObject.transform,chatBubble:this._chatBubble,animationController:this.animationController,monsterWalkAnimator:this.monsterWalk,monsterWalkPosition:this._mainPlayer.transform.worldPosition,sfxVolumeType:st.h.BgmSfx})}};(0,Y.Cg)([(0,Q.Bak)(),(0,Y.Sn)("design:type",String)],at.prototype,"alertSFX",void 0),(0,Y.Cg)([(0,Q.Cdj)("PlayerLocomotion"),(0,Y.Sn)("design:type",Q.KhP)],at.prototype,"_playerLocomotion",void 0),(0,Y.Cg)([(0,Q.Cdj)("MainPlayerGameObject"),(0,Y.Sn)("design:type",Q._mx)],at.prototype,"_mainPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(it.K),(0,Y.Sn)("design:type",it.K)],at.prototype,"animationController",void 0),(0,Y.Cg)([(0,Q.MnK)(nt.E),(0,Y.Sn)("design:type",nt.E)],at.prototype,"_circleTrigger",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.I),(0,Y.Sn)("design:type",tt.I)],at.prototype,"monsterWalk",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],at.prototype,"_chatBubble",void 0),at=(0,Y.Cg)([(0,Q.EVk)("PlayMonsterAlertFSM",J.Y.animation)],at)},72055:(q,K,z)=>{"use strict";z.d(K,{Q:()=>Q});var Y=z(62459);class Q extends Y.y4o{constructor(){super(...arguments),this._groupContainer=null}create(){super.create(),this._groupContainer=Y.W$e.instance.game.add.container(Y.W$e.instance.game.stage),this._groupContainer.name=this.GameObject.name,this.setRootContainer(this._groupContainer)}getDimensions(){return this.GameObject.transform instanceof Y.XVE?this.GameObject.transform.rectTransformDimensions:new Y.or0(this._groupContainer.width,this._groupContainer.height)}destroy(){this.clearRootContainer(),this._groupContainer&&this._groupContainer.destroy(),this._groupContainer=null,super.destroy()}}},63860:(q,K,z)=>{"use strict";z.d(K,{e:()=>Tt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z.n(Z),tt=z(99625),et=z(96703);var it;z(48417);!function(q){q.School="School",q.Home="Home"}(it||(it={}));var st,nt,at=z(89067),rt=z(90633),ot=z(35120),ht=z(73797),ct=z(46784),dt=z(41674),lt=z(76277),ut=z(13956),ft=z(40579),bt=z(83634),pt=z(30226),vt=z(67665),gt=z(65240),mt=z(96810),yt=z(44094),_t=z(71586);!function(q){q.AfterSchoolWidgetFtueAdvanceCallback="AFTER_SCHOOL_WIDGET_FTUE_ADVANCE_CALLBACK",q.AfterSchoolWidgetFtueCompleteCallback="AFTER_SCHOOL_WIDGET_FTUE_COMPLETE_CALLBACK",q.AfterSchoolWidgetFtueStep="AFTER_SCHOOL_WIDGET_FTUE_STEP"}(st||(st={})),function(q){q.NOT_STARTED="NOT_STARTED",q.STEP_1_WIDGET_INTRO_DIALOGUE="STEP_1_WIDGET_INTRO_DIALOGUE",q.STEP_2_CLICK_ON_GOLD_REWARD="STEP_2_CLICK_ON_GOLD_REWARD",q.STEP_3_COLLECT_GOLD_REWARD="STEP_3_COLLECT_GOLD_REWARD",q.STEP_4_MAGICOIN_REWARD_DIALOGUE="STEP_4_MAGICOIN_REWARD_DIALOGUE",q.STEP_5_CLICK_ON_MAGICOIN_REWARD="STEP_5_CLICK_ON_MAGICOIN_REWARD",q.STEP_6A_DIALOGUE_PLAY_AT_HOME="STEP_6A_DIALOGUE_PLAY_AT_HOME",q.STEP_7A_WAIT_FOR_CLOSE="STEP_7A_WAIT_FOR_CLOSE",q.STEP_8A_COMPLETE="STEP_8A_COMPLETE",q.STEP_6B_COLLECT_MAGICOIN_REWARD="STEP_6B_COLLECT_MAGICOIN_REWARD",q.STEP_7B_DIALOGUE_PLAY_EVERY_DAY="STEP_7B_DIALOGUE_PLAY_EVERY_DAY",q.STEP_8B_COMPLETE="STEP_8B_COMPLETE"}(nt||(nt={}));class Et{constructor(){this._funnelId=null}static get initialized(){return Q.Aq$.isDefined(this._instance)}static get instance(){var q;return null!==(q=this._instance)&&void 0!==q?q:this._instance=new Et}begin(){this._currentStep=0;const q=_t.R.getNowWithServerTimezoneOffset(),K=pt.J.isDateWithinSchoolDayAndHours(q);this._stepPath=K?Et.AFTER_SCHOOL_WIDGET_FTUE_STEPS_SCHOOL_HOURS:Et.AFTER_SCHOOL_WIDGET_FTUE_STEPS_HOME_HOURS,this._funnelName=K?"after_school_widget_school_ftue":"after_school_widget_home_ftue",ot.q.instance.prodigy.gameContainer.rebind(st.AfterSchoolWidgetFtueAdvanceCallback).toConstantValue(this.advanceFtueStep.bind(this)),ot.q.instance.prodigy.gameContainer.rebind(st.AfterSchoolWidgetFtueCompleteCallback).toConstantValue(this.completeFtue.bind(this)),ot.q.instance.game.broadcaster.addAppListener(ht.vy.FtueFunnelProgressionStepComplete,this.handFtueFunnelProgressionStepComplete,this,void 0),this.advanceFtueStep(),this.sendFtueFunnelStep(1)}handFtueFunnelProgressionStepComplete(q){this.sendFtueFunnelStep(q)}advanceFtueStep(){this._currentStep++,this._currentStep>=this._stepPath.length?Q.VyI.log("AfterSchoolWidgetFtueTracker: FTUE session reached the end of the path",Q.$bb.Info):(ot.q.instance.prodigy.gameContainer.rebind(st.AfterSchoolWidgetFtueStep).toConstantValue(this._stepPath[this._currentStep]),ot.q.instance.game.broadcaster.broadcast(ht.vy.FtueStepAdvanced,void 0,[this._stepPath[this._currentStep]]),Q.VyI.log(`Advancing FTUE step: ${this._stepPath[this._currentStep]}`,Q.$bb.Info))}completeFtue(){Q.VyI.log("AfterSchoolWidgetFtueTracker: FTUE session completed",Q.$bb.Info),ot.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(rt.B.FEATURE_AFTER_SCHOOL_WIDGET,rt.B.BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED),this.destroy()}sendFtueFunnelStep(q){const K="after_school_widget_school_ftue"===this._funnelName?Et.FUNNEL_STEPS_SCHOOL_HOURS:Et.FUNNEL_STEPS_HOME_HOURS;if(q<1||q>K.length)return void Q.VyI.log(`AfterSchoolWidgetFtueTracker: Invalid funnel step index ${q}`,Q.$bb.Warning);Q.Aq$.isDefined(this._funnelId)||(q>1&&Q.VyI.log(`AfterSchoolWidgetFtueTracker: Funnel step ${q} send without starting funnel`,Q.$bb.Warning),this._funnelId=yt.$.generateUID());const z=ot.q.instance.prodigy.gameContainer.get("20f-5f67"),Y={funnelType:"tutorial",funnelName:this._funnelName,funnelId:this._funnelId,stepName:K[q-1],stepIndex:q};z.playerProgression.sendAfterSchoolWidgetFunnelAdvancedEvent(Y)}destroy(){this._funnelId=null,ot.q.instance.game.broadcaster.removeAppListener(ht.vy.FtueFunnelProgressionStepComplete,this,void 0),ot.q.instance.prodigy.gameContainer.unbind(st.AfterSchoolWidgetFtueAdvanceCallback),ot.q.instance.prodigy.gameContainer.unbind(st.AfterSchoolWidgetFtueStep),Et._instance=null}}Et.AFTER_SCHOOL_WIDGET_FTUE_STEPS_SCHOOL_HOURS=[nt.NOT_STARTED,nt.STEP_1_WIDGET_INTRO_DIALOGUE,nt.STEP_2_CLICK_ON_GOLD_REWARD,nt.STEP_3_COLLECT_GOLD_REWARD,nt.STEP_4_MAGICOIN_REWARD_DIALOGUE,nt.STEP_5_CLICK_ON_MAGICOIN_REWARD,nt.STEP_6A_DIALOGUE_PLAY_AT_HOME,nt.STEP_7A_WAIT_FOR_CLOSE,nt.STEP_8A_COMPLETE],Et.AFTER_SCHOOL_WIDGET_FTUE_STEPS_HOME_HOURS=[nt.NOT_STARTED,nt.STEP_1_WIDGET_INTRO_DIALOGUE,nt.STEP_2_CLICK_ON_GOLD_REWARD,nt.STEP_3_COLLECT_GOLD_REWARD,nt.STEP_4_MAGICOIN_REWARD_DIALOGUE,nt.STEP_5_CLICK_ON_MAGICOIN_REWARD,nt.STEP_6B_COLLECT_MAGICOIN_REWARD,nt.STEP_7B_DIALOGUE_PLAY_EVERY_DAY,nt.STEP_8B_COMPLETE],Et.FUNNEL_STEPS_SCHOOL_HOURS=[mt.h.AfterSchoolWidgetHUDButtonHighlighted,mt.h.AfterSchoolWidgetHUDButtonClicked,mt.h.AfterSchoolWidgetNootExplainsDailyGift,mt.h.AfterSchoolWidgetPlayerAdvancesToRewardScreen,mt.h.AfterSchoolWidgetPlayerCollectsSchoolReward,mt.h.AfterSchoolWidgetNootExplainsHowToGetMagicoin,mt.h.AfterSchoolWidgetPlayerReturnsToRewardScreen,mt.h.AfterSchoolWidgetPlayerClicksCollectAtHomeButton,mt.h.AfterSchoolWidgetNootOopsDialog,mt.h.AfterSchoolWidgetCollectMagicoinTooltipShown,mt.h.AfterSchoolWidgetNootRemindsPlayersToReturnAfterSchool,mt.h.AfterSchoolWidgetTutorialComplete],Et.FUNNEL_STEPS_HOME_HOURS=[mt.h.AfterSchoolWidgetHUDButtonHighlighted,mt.h.AfterSchoolWidgetHUDButtonClicked,mt.h.AfterSchoolWidgetNootExplainsDailyGift,mt.h.AfterSchoolWidgetPlayerAdvancesToRewardScreen,mt.h.AfterSchoolWidgetPlayerCollectsSchoolReward,mt.h.AfterSchoolWidgetNootExplainsHowToGetMagicoin,mt.h.AfterSchoolWidgetPlayerReturnsToRewardScreen,mt.h.AfterSchoolWidgetPlayerCollectsHomeReward,mt.h.AfterSchoolWidgetNootRemindsPlayersToReturnDaily,mt.h.AfterSchoolWidgetCollectMagicoinTooltipShownAtHome,mt.h.AfterSchoolWidgetTutorialComplete];var wt=z(85985);let Tt=class{constructor(){this.onSchoolRewardStateSet=new Q.HN0,this.onHomeRewardStateSet=new Q.HN0,this.onDataSet=new Q.HN0,ot.q.instance.game.state.onStateChange.add(this.updateHudButton.bind(this)),ot.q.instance.game.broadcaster.addAppListener(ht.Y1.HUDRevampButtonAttentionGranted,this.handleHudRevampButtonAttentionGranted.bind(this),this,void 0,!0)}handleHudRevampButtonAttentionGranted(q){var K;q===at.ts.AfterSchoolWidget&&this.isFtueAvailable()&&(Et.initialized&&(null===(K=Et.instance)||void 0===K||K.destroy()),Et.instance.begin())}openAfterSchoolWidgetRewardsScreenFromHud(){Et.initialized&&Et.instance.sendFtueFunnelStep(2),ot.q.instance.prodigy.open.prefabMenu(tt.l.AfterSchoolWidgetRewardsScreen,void 0,void 0,void 0,void 0,void 0,{interfaceName:ct.B.AfterSchoolWidget,interfaceType:dt.Wm.Modal,instanceType:"reward",originType:dt.$N.ButtonClick,custom:{item_list:{home_reward:JSON.stringify(this._cachedRewardStatus.homeReward),school_reward:JSON.stringify(this._cachedRewardStatus.schoolReward)}}},!0)}isFtueAvailable(){return!!Q.Aq$.isDefined(this._cachedRewardStatus)&&((0,lt.G)(et.K).enabled&&"Available"===wt.J.calculateSchoolState()&&"Collected"!==wt.J.calculateHomeState()&&!ot.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(rt.B.FEATURE_AFTER_SCHOOL_WIDGET,rt.B.BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED))}setData(q){this._cachedRewardStatus=q,this.refreshDataOnExpiration(),this.setHomeState(),this.setSchoolState(),this.updateHudButton(),this.onDataSet.dispatch(q)}getData(){return J().cloneDeep(this._cachedRewardStatus)}setHomeState(q=wt.J.calculateHomeState()){const K=this.getData(),z=Date.now();let Y=0;switch(q){case"Locked":Y=K.homeRewardWindow.start;break;case"Collected":Y=K.homeRewardWindow.lockedStart}if(Y>z){const q=Y-z;this._homeRewardTimeout&&clearTimeout(this._homeRewardTimeout),this._homeRewardTimeout=setTimeout((()=>this.setHomeState()),q)}this.homeRewardState!==q&&(this.homeRewardState=q,this.onHomeRewardStateSet.dispatch(q))}setSchoolState(q=wt.J.calculateSchoolState()){this.schoolRewardState!==q&&(this.schoolRewardState=q,this.onSchoolRewardStateSet.dispatch(q))}refreshDataOnExpiration(){var q,K;const{homeRewardWindow:z,schoolRewardWindow:Y}=this.getData(),X=Date.now(),Z=Math.max(null!==(q=z.end)&&void 0!==q?q:0,null!==(K=Y.end)&&void 0!==K?K:0)-X;Z>0&&(this._dataExpirationTimeout&&clearTimeout(this._dataExpirationTimeout),this._dataExpirationTimeout=setTimeout((()=>{this.refreshData().catch((q=>{Q.VyI.log(`AfterSchoolWidgetService: Caught Error - ${Q.RQr.stringify(q)}`,Q.$bb.Verbose)}))}),Z))}refreshData(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this._afterSchoolWidgetNetworkHandler.getRewardStatus();this.setData(q)}))}updateHudButton(){var q,K;if(!(0,lt.G)(et.K).enabled)return;if(!Q.Aq$.isDefined(this._cachedRewardStatus))return void Q.VyI.log("AfterSchoolWidgetService: Reward status not yet fetched",Q.$bb.Error);if(!Q.Aq$.isDefined(this._hudService))return void Q.VyI.log("AfterSchoolWidgetService: HUD service not initialized",Q.$bb.Error);const z=this._cachedRewardStatus.homeRewardWindow,Y=this._cachedRewardStatus.schoolRewardWindow,X=Math.min(null!==(q=Y.start)&&void 0!==q?q:1/0,null!==(K=z.start)&&void 0!==K?K:1/0)-Date.now();X<=0?this.showCollectableRewardLabel():this._hudService.updateCachedLabelData(at.ts.AfterSchoolWidget,{labelValue:X,pillColour:"#DB1E75"}),this._hudButtonTimeout&&clearTimeout(this._hudButtonTimeout),this._hudButtonTimeout=setTimeout(this.showCollectableRewardLabel.bind(this),X)}showCollectableRewardLabel(){const q=ot.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);this._hudService.updateCachedLabelData(at.ts.AfterSchoolWidget,{labelValue:q.getText("PLUS_ULTRA_BONUS_COLLECT"),pillColour:"#098E00"})}claimSchoolReward(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.setSchoolState("Collected");try{const q=yield this._afterSchoolWidgetNetworkHandler.claimReward(it.School);if(q.amount){const K={ID:q.ID,type:q.type,N:q.amount};pt.J.bagItem(K,ot.q.instance.game,"got-item",void 0,{source_type:gt.C.AfterSchoolWidget,sink_type:gt.C.AfterSchoolWidget})}return yield this.refreshData(),!0}catch(q){return Q.VyI.log(`AfterSchoolWidgetRewardsComponent: Caught Error - ${Q.RQr.stringify(q)}`,Q.$bb.Verbose),!1}}))}claimHomeReward(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.setHomeState("Collected");try{const q=this._segment.item.beginSecureItemTransaction();return yield this._afterSchoolWidgetNetworkHandler.claimReward(it.Home),q.flush({transaction_id:"AfterSchoolWidget",source_type:gt.C.AfterSchoolWidget,sink_type:gt.C.AfterSchoolWidget}),yield this.refreshData(),!0}catch(q){return Q.VyI.log(`AfterSchoolWidgetRewardsComponent: Caught Error - ${Q.RQr.stringify(q)}`,Q.$bb.Verbose),!1}}))}};(0,Y.Cg)([(0,ut.b)("f83-f754"),(0,Y.Sn)("design:type",bt.Z)],Tt.prototype,"_afterSchoolWidgetNetworkHandler",void 0),(0,Y.Cg)([(0,ut.b)("20f-5f67"),(0,Y.Sn)("design:type",vt.Y)],Tt.prototype,"_segment",void 0),(0,Y.Cg)([(0,ut.b)("959-82c1"),(0,Y.Sn)("design:type",ft.W)],Tt.prototype,"_hudService",void 0),Tt=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Sn)("design:paramtypes",[])],Tt)},85985:(q,K,z)=>{"use strict";z.d(K,{J:()=>tt});var Y=z(8674),Q=z(79687),X=z(35120),Z=z(96703),J=z(76277);let tt=class{static calculateSchoolState(){const q=X.q.instance.prodigy.gameContainer.get("2c1-7dec").getData();return Date.now()>=q.schoolRewardWindow.start?"Available":"Collected"}static calculateHomeState(){const q=X.q.instance.prodigy.gameContainer.get("2c1-7dec").getData(),K=Date.now();return K>=q.homeRewardWindow.start?"Available":K>=q.homeRewardWindow.lockedStart?"Locked":"Collected"}static showDailyLoginCalendar(){const q=(0,J.G)(Z.K);return!((null==q?void 0:q.enabled)&&(null==q?void 0:q.replaceLoginCalendar))}};tt=(0,Y.Cg)([(0,Q.injectable)()],tt)},52743:(q,K,z)=>{"use strict";z.d(K,{Z:()=>tt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(15821),J=z(35120);let tt=class{constructor(){this.onBannerQueueUpdated=new Q.HN0,this._nextBannerId=0,this._bannerRegistry=new Map,this._bannerStack=[],this._bannersToDelete=[]}processBannerDelete(){if(this._bannersToDelete.length>0){this._bannerStack=this._bannerStack.filter((q=>!this._bannersToDelete.includes(q.id)));for(const q of this._bannersToDelete)this._bannerRegistry.delete(q);this._bannersToDelete=[],this.onBannerQueueUpdated.dispatch(this._bannerStack)}}postBanner(q){const K=this._nextBannerId,z=Object.assign({id:K},q);return this._bannerRegistry.has(K)||this._bannerStack.push(z),this._bannerRegistry.set(K,z),this.onBannerQueueUpdated.dispatch(this._bannerStack),this._nextBannerId++,K}deleteBanner(q){this._bannersToDelete.includes(q)||(0===this._bannersToDelete.length&&J.q.instance.game.app.ticker.addOnce(this.processBannerDelete.bind(this)),this._bannersToDelete.push(q))}updateBanner(q,K){const z=this._bannerRegistry.get(q);Z.A.isDefined(z)&&(Object.entries(K).forEach((([q,K])=>{z[q]=K})),this.onBannerQueueUpdated.dispatch(this._bannerStack))}getStack(){return[...this._bannerStack]}};tt=(0,Y.Cg)([(0,X.injectable)()],tt)},71543:(q,K,z)=>{"use strict";z.d(K,{p:()=>nt});var Y=z(8674),Q=z(62459),X=z(28628),Z=z(24652),J=z(35120),tt=z(23082),et=z(13956),it=z(14117);const st=[33,34,35,36,38,39,40,41,42,43,44,45,46,47];class nt{static resumeBattle(){var q,K,z,Y,et;if(!nt.canResumeBattle())return!1;const it=this._activePlayer.battleResumeData;if(!Q.Aq$.isDefined(it)){return!!(null===(q=nt._riftsSyncedDataStore.cache)||void 0===q?void 0:q.currentRiftRunProgress)&&(J.q.instance.game.state.get(tt.G.Rifts).resumeRiftRun(!1),this._activePlayer.battleResumeData=void 0,!0)}if(!Q.Aq$.isDefined(it.battleType)||!X.Mb.includes(it.battleType))return!1;if(it.nextBattleIsResume=!0,it.battleType===X.gu.NormalRiftRun){const q=null===(K=nt._riftsSyncedDataStore.cache)||void 0===K?void 0:K.currentRiftRunProgress;return q?q.type!==Z.cn.Normal?(it.nextBattleIsResume=!1,!1):(J.q.instance.game.state.get(tt.G.Rifts).resumeRiftRun(Q.Aq$.isDefined(q.chosenOpponentTeamIndex)),!0):(it.nextBattleIsResume=!1,!1)}if(void 0!==(null===(z=it.data)||void 0===z?void 0:z.battleTriggerData))return J.q.instance.prodigy.game.input.enabled=!1,J.q.instance.prodigy.world.it(it.data.battleTriggerData.encounterMap,null===(Y=it.data.battleTriggerData)||void 0===Y?void 0:Y.encounterPosition.x,null===(et=it.data.battleTriggerData)||void 0===et?void 0:et.encounterPosition.y),!0;const st={},at=q=>{J.q.instance.prodigy.world.it(J.q.instance.prodigy.world.getCurrentMap(),void 0,void 0,{battleResult:q})};return J.q.instance.prodigy.battle.start(st,(()=>at(X.XK.Escape)),(()=>at(X.XK.Victory)),(()=>at(X.XK.Defeat)),st.onFaint),!0}static canResumeBattle(){return!!this._activePlayer.hasCompletedTutorial()}static shouldStoreTriggerDataWithBattle(q){var K;if(!0===q.isQuestEncounter)return!0;if(Q.Aq$.isDefined(q.boss))return!0;if("QuestBattle"===J.q.instance.prodigy.battle.battleStats.type)return!0;return!!(null!==(K=q.opponent)&&void 0!==K?K:[]).some((q=>{var K,z;return st.includes(null!==(z=null===(K=q.data)||void 0===K?void 0:K.ID)&&void 0!==z?z:-1)}))}}(0,Y.Cg)([(0,et.b)("782-c308"),(0,Y.Sn)("design:type",Function)],nt,"_activePlayer",void 0),(0,Y.Cg)([(0,et.b)("687-0b09"),(0,Y.Sn)("design:type",it.M)],nt,"_riftsSyncedDataStore",void 0)},50503:(q,K,z)=>{"use strict";z.d(K,{A:()=>at});var Y,Q=z(62459);!function(q){q.DamageBonus="damage",q.BonusCriticalHitChance="critChance",q.HealthBonus="health",q.DamageReduction="damageReduction",q.ElementalDamageResistance="elementalResistance"}(Y||(Y={}));class X{static isElementalPotionAffix(q){return X.ELEMENTAL_POTION_AFFIXES.indexOf(q.type)>-1}static isOffensivePotion(q){return X.OFFENSIVE_POTION_TYPES.indexOf(q.affix.type)>-1}static isDefensivePotion(q){return X.DEFENSIVE_POTION_TYPES.indexOf(q.affix.type)>-1}}X.ELEMENTAL_POTION_AFFIXES=[Y.ElementalDamageResistance],X.OFFENSIVE_POTION_TYPES=[Y.DamageBonus,Y.BonusCriticalHitChance],X.DEFENSIVE_POTION_TYPES=[Y.DamageReduction,Y.ElementalDamageResistance];var Z=z(35120),J=z(34829),tt=z(40549),et=z(77938),it=z(23748),st=z(55122),nt=z(94393);class at{static getStrengths(q){return this.weakList[q]}static getWeaknesses(q){return this.strongList[q]}static getElementsStrongAgainst(q){const K=[];for(const z in this.strongList)this.strongList[z].indexOf(q)>-1&&K.push(z);return K}static isWeakAgainst(q,K){return!!Q.Aq$.isDefined(at.weakList[q])&&at.weakList[q].indexOf(K)>-1}static isStrongAgainst(q,K){return!!Q.Aq$.isDefined(at.strongList[q])&&at.strongList[q].indexOf(K)>-1}static rollMissChance(q,K=0){const z=J.A.get("GameConstants.Battle.ENEMY_ACCURACY_OVERRIDE");if(Q.Aq$.isDefined(z)&&z>=0)return Math.random()>=z;const Y=it.z.clampedLerp(this.missDifficultyRange[0],this.missDifficultyRange[1],q/at.MAX_DIFFICULTY);return Math.random()0,elementAdvantage:st.elementAdvantage,nFactor:1,miss:!1};Q.Aq$.isDefined(st.nFactor)&&(ht.nFactor=st.nFactor);const ct=J.A.get("GameConstants.Battle.ATTACK_DAMAGE_OVERRIDE");if(Q.Aq$.isDefined(ct))return ht.damage=ct,ht;const dt=Q.Aq$.isDefined(z.modifiers.takenDamageMultiplier)?z.modifiers.takenDamageMultiplier:1;return ht.damage=st.damage*(st.elementAdvantage+ot+nt+rt+this.nFactorMap[st.nFactor]+st.damageModifiers+1)*dt,ht.damage=Math.round(ht.damage),ht}static getLevel1Hp(q){return this.hpMidValue/this.hpStatRange*Math.pow(Math.pow(this.hpStatRange,.25),q-1)}static getHpInc(q){return this.hpMidIncrement/this.hpStatRange*Math.pow(Math.pow(this.hpStatRange,.25),q-1)}static calculateSpellDamage(q,K,z){var Y;const Q=q.getStatPower(),X=q.getLevel(),Z=null!==(Y=et.t.getItem("spell",z).data.tier)&&void 0!==Y?Y:1,J=this.getLevel1Hp(Q),tt=this.getHpInc(Q),it=1/this.hitsPerKillLevel1*J;return(it+it/(99/((J+99*tt)/this.hitsPerKillLevel100/this.spellTierMultipliers[2]/it-1))*(X-1))*this.spellTierMultipliers[Z-1]}static getTypeAdvantage(q,K){return at.isStrongAgainst(q.element,K.getElement())?.2:at.isWeakAgainst(q.element,K.getElement())?-.2:0}static applyModifiers(q,K,z,Z){var J,it,st,nt;const at=z.modifiers,rt=Z.modifiers;if(Q.Aq$.isDefined(at)){if(Q.Aq$.isDefined(at.potion)&&0!==at.potion){const K=et.t.getItem("item",at.potion).data;if(tt.r.isPotionConsumable(K)){const z=K.affix,Q=z.type;Q===Y.BonusCriticalHitChance?q.criticalChance=z.amount:Q===Y.DamageBonus&&(q.damageModifiers+=z.amount)}}Q.Aq$.isDefined(at.damage)&&(q.damageModifiers+=at.damage-1),q.elementAdvantage*=null!==(it=null===(J=at.elementalAdvantageMultipliers)||void 0===J?void 0:J.outgoing)&&void 0!==it?it:1}if(Q.Aq$.isDefined(rt)){if(Q.Aq$.isDefined(rt.potion)&&0!==rt.potion){const K=et.t.getItem("item",rt.potion).data;if(tt.r.isPotionConsumable(K)){const z=K.affix,Q=z.type;X.isElementalPotionAffix(z)&&Q===Y.ElementalDamageResistance?z.elements.indexOf(q.attackElementType)>-1&&(q.elementAdvantage-=z.amount):Q===Y.DamageReduction&&(q.damageModifiers-=z.amount)}}Q.Aq$.isDefined(rt.ignoreElement)&&rt.ignoreElement>0&&(q.elementAdvantage=Math.min(q.elementAdvantage,0)),q.elementAdvantage*=null!==(nt=null===(st=rt.elementalAdvantageMultipliers)||void 0===st?void 0:st.incoming)&&void 0!==nt?nt:1}return Q.Aq$.isDefined(K)&&(Q.Aq$.isDefined(K.dmgMod)&&(q.damageModifiers+=K.dmgMod),Q.Aq$.isDefined(K.nFactor)&&(q.nFactor=K.nFactor)),q}static getBestAttack(q,K,z,Y){if(q.length<=0)return null;const Q=[];for(let Z=0;ZK.dmg-q.dmg));let X=Q[Q.length-1].ID;for(let Z=0;ZY){X=Q[Z].ID;break}return X}static getEnemyLevel(q,K){return Q.cj9.clamp(Math.round(((this.hpMidValue+this.hpMidIncrement*(q-1))/this.difficultyHitsToKill[K]*3-this.hpMidValue)/this.hpMidIncrement)+1,st.s.minLevel,st.s.activePlayerLevelCap)}static getAllOutAttackDamage(q,K,z){let Y=1;return Y=z?at.allOutAttackBossDamage[K.aoaTier][q.getLiving().length]:at.allOutAttackDamage[K.aoaTier][q.getLiving().length],Q.Aq$.isDefined(K.modifiers.takenDamageMultiplier)&&(Y*=K.modifiers.takenDamageMultiplier),{damage:K.getMaxHearts()*Y,critical:!1,elementAdvantage:0,nFactor:1,miss:!1}}static calculateXP(q,K){const z=q*(Z.q.instance.prodigy.gameContainer.get("119-35f9").getMultiplier(K,nt.R.Xp)-1),Y=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasValidatedParentEmail()?q*J.A.get("GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE"):0,Q=q*J.A.get("GameConstants.Battle.MEMBER_STARS_PERCENTAGE"),X=q+z+Y;return{baseXp:Math.ceil(q),memberXp:Math.ceil(Q),totalNonMemberXp:Math.ceil(X)}}}at.ALL_OUT_ATTACK_ENERGY_COST=10,at.MAX_DIFFICULTY=10,at.AI_SWITCH_COOLDOWN=1,at.criticalChance=.05,at.criticalBonus=.15,at.randomBaseRange=[-.01,.01],at.nFactorMap=[-1,0,0,.15,.3,.5,1,1.5,1.5,1.5,1.5],at.hitsPerKillLevel1=3,at.hitsPerKillLevel100=3,at.spellTierMultipliers=[1,1.2,1.4],at.missDifficultyRange=[.35,.25],at.difficultyHitsToKill={0:4,1:3.6,2:3.5,3:3.4,4:3.3,5:3.2,6:3.1,7:3,8:3,9:3,10:3},at.xpConstant=1.042,at.hpMidValue=500,at.hpMidIncrement=100,at.hpStatRange=1.25,at.hpMaxStat=9,at.strongList={fire:["ice","earth","plant","ice & fire"],water:["fire","ice & fire"],earth:["water"],plant:["water"],storm:["water"],mech:["water"],ice:["storm","mech"],shadow:["fire","water","earth","plant","storm","mech","ice"],wizard:["shadow"],astral:["shadow"]},at.weakList={fire:["water","fire","shadow"],water:["earth","plant","storm","mech","water","shadow"],earth:["fire","ice & fire","earth","plant","shadow"],plant:["fire","ice & fire","plant","earth","shadow"],storm:["ice","ice & fire","storm","mech","shadow"],mech:["ice","ice & fire","mech","storm","shadow"],ice:["fire","ice & fire","ice","shadow"],shadow:["wizard","astral"],wizard:[],astral:[]},at.allOutAttackDamage={1:{1:.34,2:.67,3:1},2:{1:.2,2:.3,3:.4}},at.allOutAttackBossDamage={1:{1:.2,2:.3,3:.5},2:{1:.2,2:.3,3:.4}}},8693:(q,K,z)=>{"use strict";var Y;z.d(K,{J:()=>Y}),function(q){q.Miss="miss",q.Hit="normal-hit",q.CriticalHit="critical-hit",q.Cast="cast"}(Y||(Y={}))},50084:(q,K,z)=>{"use strict";z.d(K,{n:()=>Pt,a:()=>Mt});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z.n(Z),tt=z(62248),et=z(99625),it=z(56942);!function(q){q[q.AddNewPet=0]="AddNewPet",q[q.RemovePet=1]="RemovePet",q[q.PurchaseStandardBundle=2]="PurchaseStandardBundle"}(Y||(Y={}));var st=z(223),nt=z(62886),at=z(60157),rt=z(90633),ot=z(5491),ht=z(65240),ct=z(35120),dt=z(43846),lt=z(77938),ut=z(73797),ft=z(75017),bt=z(51972),pt=z(76277),vt=z(10670),gt=z(96810),mt=z(41674),yt=z(64353),_t=z(95057),Et=z(53661),wt=z(22023),Tt=z(30226),St=z(47255),At=z(55122),Ct=z(70760),Ot=z(7247),It=z(86283),Dt=z(87490);const Rt=Symbol();var Pt;!function(q){q[q.CannotAfford=0]="CannotAfford"}(Pt||(Pt={}));class Mt{constructor(q,K){this.onQuestionOpen=new X.HN0,this.onQuestionClose=new X.HN0,this.onRescueContinue=new X.HN0,this.onRescueDismissed=new X.HN0,this.onRescueFailed=new X.HN0,this.game=q,K&&(this._unitComponent=K,this._unitContainer=K.creature,this.creatureAssetID=K.creature.id),this.localizer=ct.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService)}start(){const q=lt.t.getItem("pet",this.creatureAssetID),K=ct.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=ct.q.instance.prodigy.gameContainer.get("bec-c6b4"),Y=z.petAcquisitionCost(q.ID,tt.l6.Rescue),Q=z.canAfford(Y),X=ct.q.instance.prodigy.gameContainer.get("20f-5f67");X.playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(tt.l6.Rescue,gt.l.PetHardCurrencyIntention,q.ID),It.D.isFree(ct.q.instance.prodigy.breadcrumbManager)?this.continueToRescueConfirmation():It.D.isKennelFull(K)?K.hasMembership()?this.kennelFullPopup():this.catchMorePetsPopup():Q?this.continueToRescueConfirmation():(X.item.sendInsufficientCurrencyEvent(Y,{sink_type:ht.C.PetRescue,sink_id:q.ID}),(0,pt.G)(st.l).enabled||(K.hasMembership()?this.onRescueFailed.dispatch(Pt.CannotAfford):this.showInsufficientResourcePopup(q,this._unitContainer)))}catchMemberPetPopup(q=!1){const K={conversionFunnelName:q?St.o.FunnelCatchEvolvedPet:St.o.FunnelCatchMemberLockedPet,conversionFunnelMetadata:this.creatureAssetID},z=Tt.J.showYouTubeMembershipAd(this.game,!0)?_t.R.Video:_t.R.Static;ct.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:q?"Catch-Evolved-Pet":"Catch-Member-Locked-Pet",category:"Pet",contentId:`pet-${this.creatureAssetID}`,adType:z}),this.showMemberAd(K,ft.p.MEMBER_PETS)}showMemberAd(q,K){var z;const Y=ct.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(Tt.J.shouldSuppressAd(Y,void 0)){const q={bodyText:null,xPosition:1340,yPosition:720,arrowXRelPos:1.1,arrowDirection:bt.i.DOWN};ct.q.instance.prodigy.open.memberAdSuppressionToolTip(q,!1,!1).onDismissalClick.add((()=>{this.onRescueDismissed.dispatch()}))}else{const K=null===(z=lt.t.getItem("pet",this.creatureAssetID))||void 0===z?void 0:z.data;let Y=null;X.Aq$.isDefined(K)&&(Y=ct.q.instance.prodigy.open.unifiedConversionFlow((()=>{ct.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelQuit("Click-Membership","Close-Clicked"),this.recheckCriteria()}),q,void 0,{CONTEXTUAL_CHASE_PET_SPINE_GUID:it.Q[`Spine_pet_${this.creatureAssetID}_json`],CONTEXTUAL_CHASE_PET_NAME:K.name})),X.Aq$.isDefined(Y)||ct.q.instance.prodigy.open.membershipInfo((()=>{this.recheckCriteria()}),q)}this.sendPetCapturedFailedSegmentEvent("Member Locked")}catchMorePetsPopup(){const q={conversionFunnelName:St.o.FunnelCatchMorePets,conversionFunnelMetadata:this.creatureAssetID},K=Tt.J.showYouTubeMembershipAd(this.game,!0)?_t.R.Video:_t.R.Static;ct.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:"Pet-Limit",category:"Pet",contentId:`pet-${this.creatureAssetID}`,adType:K}),this.showMemberAd(q,ft.p.MEMBER_PETS)}recheckCriteria(){ct.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasMembership()?this.start():this.onRescueDismissed.dispatch()}kennelFullPopup(){ct.q.instance.prodigy.open.messageBoxPrefab({title:"MESSAGE_TITLE_UH_OH",text:"TOO_MANY_PETS",confirmCallback:()=>{this.onRescueDismissed.dispatch()}}),this.sendPetCapturedFailedSegmentEvent("Full Kennel")}showPetSlotsFullPopup(){ct.q.instance.prodigy.open.prefabMenu(et.l.Rescue_AtHardCapTooltip,(()=>{this.onRescueDismissed.dispatch()}),void 0,!1).skipRenderTransparencyLayer=!0}showUpsellPopup(q,K=0){const z=ct.q.instance.prodigy.gameContainer.get("20f-5f67");z.purchase.sendFunnelStart({type:"Pet-Hard-Currency-Insufficient-Resources-Rescue",category:"Pet",adType:_t.R.UnifiedConversionFlow,contentId:`${q.type}-${q.ID}`,adVersion:yt.P.getAdVersion(St.o.FunnelNotEnoughCurrency)});const Y=this.getMembershipConversionAwareModalResultHandler(this._unitContainer,(()=>{z.purchase.sendFunnelQuit("Click-Membership","Close-Clicked")}));ct.q.instance.prodigy.open.unifiedConversionFlow(Y,{conversionFunnelName:St.o.FunnelNotEnoughCurrency},{type:mt.$N.Battle,id:z.battle.currentBattleID},{[Et.FK.OtpMissingMagicoin]:K})}continueToRescueConfirmation(){const q=Mt.getTaskEventData(this.creatureAssetID);Mt.sendQuestRescueEvent(q),Mt.setCooldownsOnRescue(q),this.onRescueContinue.dispatch()}static getTaskEventData(q){var K;const z=null===(K=lt.t.getItem("pet",q))||void 0===K?void 0:K.data;return{params:{taskEventType:at.Z7.Pet,rarity:z.rarity,itemType:"pet",source:ht.C.PetRescue,id:q,element:z.affinity,level:z.level}}}static sendQuestRescueEvent(q){ct.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(nt.T.RESCUE_PET,q).catch(X.RQr.createHandler("Error sending a quest event for rescuing a pet"))}static rescuePet(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q=wt.P8.showUniquePetsFeature()?this.RESCUED_PET_LEVEL:Math.min(K.level,wt.P8.getMaxOwnableLevel(K.id)),Z={type:"pet",ID:K.id,N:1,data:{level:Q,stars:At.s.xpRequiredForLevel(Q,ot.V.Pet),nickname:K.nickname}},J=()=>{Tt.J.bagItem(Z,ct.q.instance.game,"on-catch-pet",void 0,{source_type:ht.C.PostBattle,sink_type:ht.C.PetRescue,transaction_id:z})};if(q)J();else{const q=ct.q.instance.prodigy.gameContainer.get("bec-c6b4"),Q=q.petAcquisitionCost(Z.ID,tt.l6.Rescue);try{yield q.spend(null!=Q?Q:Y,{sink_type:ht.C.PetRescue,sink_id:K.id,transaction_id:z})}catch(it){return void X.RQr.logError(it,"Post battle: Not enough Magicoin to rescue pet")}J()}Mt.grantUnlockFollow(Z.ID,z,ht.C.PostBattle),Q0||Tt.J.bagItem({type:"follow",ID:Z},ct.q.instance.game,"on-catch-pet",void 0,{source_type:z,transaction_id:K})}static setCooldownsOnRescue(q){const K=X.wa5.getActiveScene().container.get("BattleController");if(!X.Aq$.isDefined(K.battleCooldownConfig))return;if(!K.battleCooldownConfig.onAction.includes(Dt.EBattleAction.RescuePet))return;if(X.Aq$.isDefined(K.battleCooldownConfig.actionRestrictions[Dt.EBattleAction.RescuePet])&&K.battleCooldownConfig.actionRestrictions[Dt.EBattleAction.RescuePet].type===Ot.i.PET_RESTRICTIONS){const z=new Ct.F;if(X.Aq$.isDefined(q.params)&&!z.isReady(K.battleCooldownConfig.actionRestrictions[Dt.EBattleAction.RescuePet].data,q.params))return}const z=ct.q.instance.prodigy.gameContainer.get("5a6-6255");"number"==typeof K.battleCooldownConfig.duration?z.setCooldownFromNow(K.battleCooldownConfig.id,K.battleCooldownConfig.duration).catch(X.RQr.createHandler("Error setting cooldown via number after rescue")):z.setCooldownFromCategory(K.battleCooldownConfig.id,K.battleCooldownConfig.duration).catch(X.RQr.createHandler("Error setting cooldown via category after rescue"))}static receivePet(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=ct.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=wt.P8.showUniquePetsFeature()?this.RESCUED_PET_LEVEL:Math.min(q.level,wt.P8.getMaxOwnableLevel(q.id)),Z={type:"pet",ID:q.id,N:1,data:{level:Q,stars:At.s.xpRequiredForLevel(Q,ot.V.Pet),nickname:q.nickname}};if(q[Rt]){const q=ct.q.instance.prodigy.gameContainer.get("5d3-90c1");yield q.fetchPetInventoryData(),z.kennel.isFull()&&(yield q.updateSlots(Y.AddNewPet,K))}else{const z=ct.q.instance.prodigy.gameContainer.get("bec-c6b4");yield z.spend(z.petAcquisitionCost(Z.ID,tt.l6.Rescue),{sink_type:ht.C.PetRescue,sink_id:q.id,transaction_id:K})}Tt.J.bagItem(Z,ct.q.instance.game,"on-catch-pet",void 0,{source_type:ht.C.Battle,transaction_id:K}),Mt.grantUnlockFollow(Z.ID,K,ht.C.Battle),ct.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(rt.B.FEATURE_BATTLE_TUTORIAL,rt.B.BREADCRUMB_FIRST_PET_RESCUED)||ct.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(rt.B.FEATURE_BATTLE_TUTORIAL,rt.B.BREADCRUMB_FIRST_PET_RESCUED),z.hasCompletedTutorial()&&z.forceSaveCharacter(),Q{ct.q.instance.prodigy.open.prefabMenu(et.l.PetRescueCardSequence,K,void 0,void 0,void 0,{PET_RESCUE_CREATURE_DATA:{ID:q.id,level:Q,name:q.name,nickname:q.nickname}})}));X.wa5.getActiveScene().container.get("BattleController").onRescueCompleted(),ct.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(tt.l6.Rescue,gt.l.PetHardCurrencyTransactionComplete,Z.ID)}))}sendPetCapturedFailedSegmentEvent(q){var K,z,Y;const Q=null===(K=lt.t.getItem("pet",this.creatureAssetID))||void 0===K?void 0:K.data,X=ct.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel;ct.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendBattlePetCaptureFailedEvent({petName:null!==(z=this._unitContainer.nickname)&&void 0!==z?z:null==Q?void 0:Q.name,petLevel:this._unitContainer.level,petElement:null==Q?void 0:Q.element,petType:wt.P8.getPetEvolutionType(this.creatureAssetID),petRarity:null==Q?void 0:Q.rarity,petRank:null!==(Y=this._unitComponent.data.mergeRank)&&void 0!==Y?Y:0,failReason:q,previousPetCopies:X.amountOfPet(Q.ID),captureSource:vt.z2.InBattle})}showInsufficientResourcePopup(q,K){var z,Y;ct.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:"Pet-Hard-Currency-Insufficient-Resources-Rescue",category:"Pet",contentId:`pet-${this.creatureAssetID}`,adType:_t.R.Static});const Q=(0,dt.k)("MAGICOIN"),X=this.getMembershipConversionAwareModalResultHandler(K,(()=>{this.sendPetCapturedFailedSegmentEvent("Insufficient Magicoin")})),Z={PET_RESCUE_ID:null==q?void 0:q.ID,PET_RESCUE_NAME:null===(z=null==q?void 0:q.data)||void 0===z?void 0:z.name,PET_RESCUE_RARITY:null===(Y=null==q?void 0:q.data)||void 0===Y?void 0:Y.rarity,PET_RESCUE_LEVEL:K.level.toString(),[Et.n7.InsufficientResource]:Q};if(!ct.q.instance.prodigy.open.unifiedConversionFlow(X,{conversionFunnelName:"Pet-Hard-Currency-Insufficient-Resources-Rescue"},void 0,Z)){ct.q.instance.prodigy.open.prefabMenu(et.l.EvolvedPet_InsufficientResources,void 0,void 0,void 0,void 0,Z).onDestroy.addOnce(X)}}getMembershipConversionAwareModalResultHandler(q,K=J().noop){let z=()=>{K(),this.onRescueDismissed.dispatch()};return ct.q.instance.game.broadcaster.addAppListener(ut.H3.MembershipResponseReceived,(K=>{"success"===K&&(z=()=>{q[Rt]=!0,this.continueToRescueConfirmation()})}),this),()=>{z()}}destroy(){ct.q.instance.game.broadcaster.removeAppListener(ut.H3.MembershipResponseReceived,this),this.onQuestionOpen.dispose(),this.onQuestionClose.dispose(),this.onRescueContinue.dispose(),this.onRescueDismissed.dispose(),this.onRescueFailed.dispose()}}Mt.RESCUED_PET_LEVEL=1},86283:(q,K,z)=>{"use strict";z.d(K,{D:()=>it});var Y=z(62459),Q=z(90633),X=z(5491),Z=z(35120),J=z(77938),tt=z(39984),et=z(22023);class it{static clearNewlyRescuableUnitsSeen(){it._seenIds.clear()}static filterForNewlyRescuable(q){const K=q.filter((q=>!this._seenIds.has(q.data.unitId)));return K.forEach((q=>this._seenIds.add(q.data.unitId))),K}static isFree(q){return!q.isBreadcrumbComplete(Q.B.FEATURE_BATTLE_TUTORIAL,Q.B.BREADCRUMB_FREE_RESCUE)}static isAtPetLimit(q){return q.kennel.getPets().filter((q=>!et.P8.isPetEpic(q.ID))).length>=q.kennel.getMaxKennelSize()}static isMemberPet(q){return Y.Aq$.isDefined(J.t.getItem("pet",q).data.member)}static hasRemainingRescueAttempts(q,K){const z=q.hasMembership()?2:1;return K.catchAttempt0}static isKennelFull(q){return q.kennel.isFull()}static sendPetLevelRestrictedSegmentEvent(q,K,z){Z.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Pet Level",progressionAction:"level_reset",progressionValue:K.toString(),creatureName:q},{pointType:"stars",pointCount:tt.e.starsToLevel(K,X.V.Pet)},{transaction_id:z})}static getPetRescueEventData(q,K){return{is_rescuable:K.isARescuableUnit(),is_new_pet:!it.hasBeenRescuedPreviously(q,K.creature.id),number_owned:q.kennel.getPets(!1).reduce(((q,z)=>z.ID===K.creature.id?q+1:q),0),times_battled:q.encounters.getPetTimesBattled(K.creature.id),times_rescued:q.encounters.getPetTimesRescued(K.creature.id)}}static sendPetRescueAvailableEvent(q){const K=Z.q.instance.prodigy.gameContainer.get("782-c308");Z.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendBattlePetRescueAvailableEvent({pet_name:q.name,pet_element:q.data.element,pet_rarity:q.data.rarity,pet_level:q.level,pet_type:et.P8.getPetEvolutionType(q.creature.id),is_new_pet:!it.hasBeenRescuedPreviously(K,q.creature.id),number_owned:K.kennel.getPets(!1).reduce(((K,z)=>z.ID===q.creature.id?K+1:K),0),times_battled:K.encounters.getPetTimesBattled(q.creature.id),times_rescued:K.encounters.getPetTimesRescued(q.creature.id)})}}it._seenIds=new Set},87239:(q,K,z)=>{"use strict";z.d(K,{x:()=>it});var Y=z(62459),Q=z(35120),X=z(36648),Z=z(77938),J=z(44094),tt=z(30226),et=z(95946);class it{static getUnlockedSpellDisplayInformation(q){const K=Z.t.getItem("spellV2",q.oldId),z=Z.t.getItem("spellV2",q.newId),Y=tt.J.convertLegacyElements(z.data.element);return{spellIcon:[X.q[J.$.capitalizeFirstLetter(z.metadata.assets.icon.assetKey)],void 0],newSpellName:z.data.name,oldSpellName:null==K?void 0:K.data.name,elementType:Y}}static getElementDisplayName(q){var K;const z=null!==(K=this._elementLocalizationMap[q])&&void 0!==K?K:"";return Q.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText(z)}}it._elementLocalizationMap={[et.a.Fire]:"ELEMENT_FIRE",[et.a.Plant]:"ELEMENT_PLANT",[et.a.Water]:"ELEMENT_WATER",[et.a.Ice]:"ELEMENT_ICE",[et.a.Storm]:"ELEMENT_STORM",[et.a.Astral]:"ELEMENT_ASTRAL",[et.a.Shadow]:"ELEMENT_SHADOW",[et.a.Physical]:"ELEMENT_PHYSICAL"}},74452:(q,K,z)=>{"use strict";z.d(K,{I:()=>Ht,u:()=>Qt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(68910),J=z(56942),tt=z(35120),et=z(57308),it=z(98013),st=z(34829),nt=z(77938),at=z(38487),rt=z(86896),ot=z(70570),ht=z(78673),ct=z(7914),dt=z(25048),lt=z(75915),ut=z(79484),ft=z(66726),bt=z(84705),pt=z(8811),vt=z(30424),gt=z(82329),mt=z(20786),yt=z(10655),_t=z(37639),Et=z(55734),wt=z(129),Tt=z(73797),St=z(93709),At=z(59968);class Ct extends St.H{constructor(q,K,z,Y,Q,X){super(q,K,z,Y,Q),this._spineKey=X}setup(){const q=tt.q.instance.prodigy.create.element(this.sprites,0,0);this._spine=this.game.add.spine(0,0,this._spineKey),this.idle(),q.add(this._spine),this.complete=!0,this.loading=!1,this._onLoad.dispatch(),this.setHitbox(nt.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox)}idle(){this._spine.setAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}attack(){At.R.prototype.attack.call(this),this._spine.setAnimationByName(0,"attack",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}}var Ot=z(18633),It=z(95946),Dt=z(23082),Rt=z(96216),Pt=z(44661),Mt=z(88022);class Nt extends St.H{constructor(q,K,z,Y,Q){super(q,K,z,Y,Q),this._currentElement=It.a.Shadow,this._aoeDamageDisplayContainers=[]}setup(){this.cacheBoss(),this._sprite=tt.q.instance.prodigy.create.element(this.sprites,0,0),this._spine=this.game.add.spine(0,0,Nt.SPINE_TAGS[It.a.Shadow]),this.idle(),this._sprite.add(this._spine),this.complete=!0,this._onLoad.dispatch(),this._flashSpine=this.game.add.spine(0,0,J.Q.Spine_flash_json);this.game.state.get(Dt.G.Battle).groupFarFront.addChild(this._flashSpine),this.setHitbox(nt.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox);for(let q=0;q<3;++q)this._aoeDamageDisplayContainers[q]=new Pt.V(this.game,this);this._aoeDamageDisplayContainers[1].offset={x:Qt.HORIZONTAL_TEAM_OFFSET,y:-Qt.VERTICAL_TEAM_OFFSET},this._aoeDamageDisplayContainers[2].offset={x:Qt.HORIZONTAL_TEAM_OFFSET,y:Qt.VERTICAL_TEAM_OFFSET}}switchElement(q,K){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z=!0){if(q!==this._currentElement){const Y=this.game.state.get(Dt.G.Battle),X=Nt.SPINE_TAGS[this._currentElement];this._currentElement=q,K&&(yield this.fadeOut());const Z=this._spine;if(z&&(this._sprite.remove(this._spine,!0),tt.q.instance.prodigy.load.removeSpine(X)),yield Promise.all([new Promise((K=>{tt.q.instance.prodigy.load.assets(Nt.SPINE_TAGS[q],K)})),Q.Egh.timeout(500)]),this._spine=this.game.add.spine(0,0,Nt.SPINE_TAGS[q]),this._sprite.add(this._spine),z||(this._sprite.remove(Z,!0),tt.q.instance.prodigy.load.removeSpine(X)),Y.rightStatusUI.setElement(q),K)return this.fadeIn()}}))}idle(){this._spine.setAnimationByName(0,"idle",!0)}attack(){At.R.prototype.attack.call(this),this._spine.setAnimationByName(0,"attack",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}fadeOut(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._spine.setAnimationByName(0,"changeOut",!1),this._flashSpine.x=this.x+Nt.FLASH_OFFSET.x,this._flashSpine.y=this.y+Nt.FLASH_OFFSET.y,this._flashSpine.setToSetupPose(!0),this._flashSpine.setAnimationByName(0,"changeOut",!1),this._flashSpine.visible=!0,yield Promise.all([new Promise((q=>{this._spine.onComplete.addOnce(q)})),new Promise((q=>{this._flashSpine.onComplete.addOnce(q)}))])}))}fadeIn(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._spine.setAnimationByName(0,"changeIn",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose(),this._flashSpine.setToSetupPose(!0),this._flashSpine.setAnimationByName(0,"changeIn",!1),this._flashSpine.onComplete.addOnce((()=>{this._flashSpine.visible=!1})),new Promise((q=>{this._spine.onComplete.addOnce(q)}))}))}die(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._spine.setAnimationByName(0,"death",!1),new Promise((q=>{this._spine.onComplete.addOnce(q)}))}))}resurrect(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield new Promise((q=>{tt.q.instance.prodigy.load.assets(Nt.SPINE_TAGS[It.a.Shadow],q)}));const q=()=>{Rt.M.radialCloud(this.game,this,Nt.SAND_CLOUD_OFFSET.x,Nt.SAND_CLOUD_OFFSET.y,Nt.SAND_CLOUD_RADIUS,Mt._.Boss_aspen_extras_json,"purple-cloud"),Rt.M.radialCloud(this.game,this,Nt.SAND_CLOUD_OFFSET.x,Nt.SAND_CLOUD_OFFSET.y,Nt.SAND_CLOUD_RADIUS,Mt._.Boss_aspen_extras_json,"purple-cloud")};let K=!1;for(let z=Nt.SAND_CLOUD_COUNT;z>0||!K;--z)q(),z===Nt.SAND_CLOUD_COUNT-Nt.SAND_CLOUD_BOSS_SPAWN&&this.switchElement(It.a.Shadow,!1,!1).then((()=>{K=!0})),yield Q.Egh.timeout(Nt.SAND_CLOUD_INTERVAL);return this._spine.setAnimationByName(0,"reveal",!1),new Promise((q=>{this._spine.onComplete.addOnce((()=>{this._spine.setAnimationByName(0,"idle",!0),q()}))}))}))}showAoeDamage(q,K){const z=q.damage,Y=Math.floor(z/3),Q=z-2*Y;for(let Z=0;Z<3;++Z)this._aoeDamageDisplayContainers[Z].showDamage(X.merge({},q,{damage:2!==Z?Y:Q}),!1,0===Z?K:void 0)}}Nt.SAND_CLOUD_RADIUS=900,Nt.SAND_CLOUD_COUNT=40,Nt.SAND_CLOUD_BOSS_SPAWN=30,Nt.SAND_CLOUD_OFFSET={x:50,y:-100},Nt.SAND_CLOUD_INTERVAL=50,Nt.FLASH_OFFSET={x:0,y:-150},Nt.SPINE_TAGS={shadow:J.Q.Default_boss_18_json,fire:J.Q.Fire_boss_18_json,water:J.Q.Water_boss_18_json,plant:J.Q.Plant_boss_18_json,ice:J.Q.Ice_boss_18_json,storm:J.Q.Storm_boss_18_json};var xt=z(37946);class Lt extends xt.v{setup(){super.setup(),this.setHitbox(nt.t.getItem("boss",21).metadata.assets.default.hitbox)}}var kt=z(99687);class Bt extends St.H{constructor(q,K,z,Y,Q){super(q,K,z,Y,Q)}setup(){this.cacheBoss();const q=tt.q.instance.prodigy.create.element(this.sprites,0,0);this._spine=this.game.add.spine(0,0,Bt.BOSS_GLACIAS_ASSET),this.idle(),q.add(this._spine),this.complete=!0,this._onLoad.dispatch(),this.setHitbox(nt.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox)}getListOfAssets(){const q=St.H.getAssets(this.source);return q.push(Bt.BOSS_GLACIAS_ASSET),q}idle(){this._spine.setAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}attack(){At.R.prototype.attack.call(this),this._spine.setAnimationByName(0,"attack",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}}Bt.BOSS_GLACIAS_ASSET=J.Q.Default_boss_20_json;class Ut extends St.H{constructor(q,K,z,Y,Q){super(q,K,z,Y,Q)}setup(){this.cacheBoss();const q=tt.q.instance.prodigy.create.element(this.sprites,0,0);this.spine=this.game.add.spine(0,0,Ut.BOSS_OLD_ONE_ASSET),this.idle(),q.add(this.spine),this.showName("Old One"),this.nameText.GameObject.legacyTransform.y=-430,this.nameText.GameObject.legacyTransform.x-=10,this.visible=!0}getListOfAssets(){const q=St.H.getAssets(this.source);return q.push(Ut.BOSS_OLD_ONE_ASSET),q}idle(){this.spine.setAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}attack(){At.R.prototype.attack.call(this),this.spine.setAnimationByName(0,"attack",!1),this.spine.addAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}}Ut.BOSS_OLD_ONE_ASSET=J.Q.Default_boss_15_json;class Ft extends St.H{constructor(q,K,z,Y,Q){super(q,K,z,Y,Q)}startLoad(){this.outOfDate=!1,this.loading=!0,tt.q.instance.prodigy.load.assets(["spine-15"],this.setup.bind(this))}setup(){this.cacheBoss();const q=tt.q.instance.prodigy.create.element(this.sprites,0,0);this.spine=this.game.add.spine(0,0,"spine-15"),this.visible=!0,this.idle(),q.add(this.spine),this.complete=!0,this.loading=!1}idle(){this.spine.setAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}attack(){At.R.prototype.attack.call(this),this.spine.setAnimationByName(0,"attack",!1),this.spine.addAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}}var Gt=z(91207),jt=z(51742);class $t extends St.H{constructor(q,K,z,Y,Q){z.modifiers.barrier={offset:{x:60,y:-160},scale:{x:2.33,y:2.33}},super(q,K,z,Y,Q)}setup(){this.cacheBoss(),tt.q.instance.prodigy.load.assets(jt.c.Sfx_attack_royal_roar);const q=tt.q.instance.prodigy.create.element(this.sprites,0,0);this.spine=this.game.add.spine(100,-100,Gt.E.getTitanSpine(this.source.source.ID)),this.idle(),q.add(this.spine),q.scale.x=1.75,q.scale.y=1.75,this.setHitbox(nt.t.getItem("titan",this.source.getID()).metadata.assets.default.hitbox),this.complete=!0,this.loading=!1,this._onLoad.dispatch()}idle(){this.spine.setAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}attack(){At.R.prototype.attack.call(this),this.spine.setAnimationByName(0,"attack",!1),this.spine.addAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}retreat(){this.spine.setAnimationByName(0,"knockout",!1)}getListOfAssets(){return[Gt.E.getTitanSpine(this.source.source.ID)]}}var Ht,Vt,Wt=z(32740),qt=z(63693),Kt=z(27625),zt=z(50664),Yt=z(30226);!function(q){q[q.Middle=0]="Middle",q[q.Back=1]="Back",q[q.Front=2]="Front"}(Ht||(Ht={})),function(q){q.Front="pet-rescue-front",q.Back="pet-rescue-behind"}(Vt||(Vt={}));class Qt{set hasManagedEnergy(q){this._hasManagedEnergy=q}get hasManagedEnergy(){return this._hasManagedEnergy}constructor(q,K,z,Y,Z,J,tt,et){this.team=[],this.enableComboAnimations=!0,this.bossTeam=!1,this.offScreenX=0,this.offScreenY=0,this.onScreenX=0,this.onScreenY=0,this.y=0,this.currentEnergy=0,this.maxEnergy=10,this._hasManagedEnergy=!1,this.playerEnergySource=null,this.onEnergyChangeStart=new Q.HN0,this.onCurrentMemberSwitch=new Q.HN0,this.onCurrentMemberHPChange=new Q.HN0,this.onMoveCreatureOut=new Q.HN0,this.onMoveCreatureIn=new Q.HN0,this.onCreatureRanAway=new Q.HN0,this._creatureContainerPosition=[],this.game=q,this.presortTeam(z),this.playerControlled=Y,this.offScreenX=Z,this.offScreenY=J,this.onScreenX=tt,this.onScreenY=et;for(let Q=0;Q=Qt.MAX_TEAM_COUNT);Q++)this.team.push(this.makeContainer(Q,z[Q],this.offScreenX));this.playerEnergySource=Qt.findFirstPlayer(this.team),this.registerSignals(),this.playerControlled&&X.forEach(this.team,(q=>{q instanceof Wt.M&&q.cacheAssets()})),st.A.get("GameConstants.Battle.SHOW_HITBOXES")&&this.team.forEach(((q,K)=>{q.loading?q.OnLoad.addOnce((()=>{this.drawBounds(K)})):this.drawBounds(K)}))}makeContainer(q,K,z){let Y,Z;const J=this.game.state.getCurrentState();let et;if(1===q?(Z=this.offScreenY-Qt.VERTICAL_TEAM_OFFSET,Y=J.groupBack):2===q?(Z=this.offScreenY+Qt.VERTICAL_TEAM_OFFSET,Y=J.groupFront):(Z=this.offScreenY,Y=J.groupMiddle),K instanceof wt.a){const q=tt.q.instance.prodigy.create.player(Y,K,1,z,Z,this.playerControlled);q.forceWeaponVisual=!0,q.loadedCallback=()=>{q.hideName(),q.createHealthBar().getOverlay().scale.x=this.playerControlled?1:-1},et=q}else if(K instanceof _t.K){const q=tt.q.instance.prodigy.create.character(Y,K,1,z,Z,!1);q.forceWeaponVisual=!0,q.loadedCallback=()=>{q.hideName(),q.createHealthBar().getOverlay().scale.x=this.playerControlled?1:-1},et=q}else if(K instanceof Et.R){const q=tt.q.instance.prodigy.create.monster(Y,K,2,z,Z,!1);if(!this.playerControlled){tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.encounters.addToPetTimesBattled(K.data.ID)}q.loadedCallback=q=>{X.includes([130,131,132,133],q.source.data.ID)&&(q.battleScale=1),q.sprites.scale.x=q.battleScale,q.sprites.scale.y=q.battleScale,q.width=Math.round(q.width),q.height=Math.round(q.height),q.hideName(),q.createHealthBar().getOverlay().scale.x=this.playerControlled?1:-1},et=q}else if(K instanceof dt.t)et=tt.q.instance.prodigy.create.cloudBoss(Y,K,z,Z,K.source.element),this.bossTeam=!0;else if(K instanceof ct.b){const q=tt.q.instance.prodigy.create.bonfireBoss(Y,K,z,Z);this.bossTeam=!0,q.scale.x=.75,q.scale.y=.75,et=q}else if(K instanceof vt.d){const q=new Ut(this.game,Y,K,z-400,Z);this.bossTeam=!0,et=q}else if(K instanceof gt.K){const q=new Ft(this.game,Y,K,z-400,Z);this.bossTeam=!0,et=q}else if(K instanceof ft.x)et=tt.q.instance.prodigy.create.forestBoss(Y,K,z,Z),this.bossTeam=!0;else if(K instanceof yt.A){const q=new $t(this.game,Y,K,z,Z);q.flip(),this.bossTeam=!0,et=q}else if(K instanceof pt.C)et=tt.q.instance.prodigy.create.shiverchillBoss(Y,K,z-350,Z),et.flip(),this.bossTeam=!0;else if(K instanceof ot.l){const q=tt.q.instance.prodigy.create.aspenFrostBoss(Y,K,z,Z);et=q,K.setBossContainer(q),this.bossTeam=!0}else if(K instanceof ht.y)et=new Ot.Z(this.game,Y,K,z,Z);else if(K instanceof bt.Y){const q=new Bt(this.game,Y,K,z,Z);et=q,K.setBossContainer(q),this.bossTeam=!0}else if(K instanceof ut.e){const q=new Lt(this.game,Y,wt.a.fromCharacter(this.game,K.bossCharacter),1,z,Z,!1,{hideMount:!0});q.createHealthBar().getOverlay().scale.x=-1,et=q,K.setBossContainer(q)}else if(K instanceof mt.F)et=tt.q.instance.prodigy.create.shadowWyrmBoss(Y,K,z-350,Z),et.flip(),K.setBossContainer(et),this.bossTeam=!0;else if(K instanceof lt.u){const q=new Nt(this.game,Y,K,z,Z);et=q,K.setBossContainer(q),K.setTeam(this),this.bossTeam=!0}else if(K instanceof rt.B){if(52===K.source.ID)K.source.useShadowAssets=!0,et=tt.q.instance.prodigy.create.forestBoss(Y,K,z,Z);else{const q=new Ct(this.game,Y,K,z,Z,K.source.spineKey);q.flip(),et=q}this.bossTeam=!0}else if(K instanceof at.s){const q=tt.q.instance.prodigy.create.boss(Y,K,z,Z);this.bossTeam=!0,Q.Aq$.isDefined(K.source.spriteOffsetY)&&(q.sprites.y+=K.source.spriteOffsetY),Q.Aq$.isDefined(K.source.spriteOffsetX)&&(q.sprites.x+=K.source.spriteOffsetX),Q.Aq$.isDefined(K.source.battleScale)&&(q.sprites.scale.x=K.source.battleScale,q.sprites.scale.y=K.source.battleScale),et=q}return et.startLoad(),et.flip(),et.pairs=[],et.visible=!1,et.getSource().isOpponent=!this.playerControlled,et.getSource().starsEarned=0,this.bossTeam&&et.createHealthBar(),et}static findFirstPlayer(q){const K=q.find((q=>q instanceof xt.v&&q.isMainPlayer));return Q.Aq$.isDefined(K)?K.source:null}getCurrentEnergy(){return this.currentEnergy}getMaxEnergy(){return this.maxEnergy}changeEnergy(q){this.currentEnergy=Math.min(this.currentEnergy+q,this.maxEnergy),this.currentEnergy<0&&(Q.VyI.log(`Energy at ${this.currentEnergy} below 0. Clamping.`,Q.$bb.Error),this.currentEnergy=0),this.playerControlled&&q<0&&(tt.q.instance.prodigy.battle.battleStats.energyCost-=q),this.onEnergyChangeStart.dispatch(this.currentEnergy),this.updatePlayerEnergy()}setEnergy(q){this.currentEnergy=Math.min(q,this.maxEnergy),this.onEnergyChangeStart.dispatch(this.currentEnergy),this.updatePlayerEnergy()}updatePlayerEnergy(){Q.Aq$.isDefined(this.playerEnergySource)&&this.playerEnergySource.setEnergy(this.getCurrentEnergy())}registerSignals(){for(let q=0;q=0;--z)for(;!this.team[z].complete;)yield Q.Egh.timeout(10);const q=this.onRightSide()?Qt.HORIZONTAL_TEAM_OFFSET:-Qt.HORIZONTAL_TEAM_OFFSET,K=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;for(let z=0;z=Qt.MAX_TEAM_COUNT);z++){if(this.team[z].getSource().isKnockedOut())continue;const Y=this.team[z];Y.visible=!0;const Q=this.onScreenX+(z===Ht.Middle?0:q);Y.walkIntoBattle?Y.speed=10:Y.x=Q,this.team[z].setPath([{x:Q,y:Y.y}],(()=>{Y===K.playerContainer&&K.playerContainer.stopHeavy()}))}this.enableComboAnimations&&(this.game.broadcaster.broadcast(Tt.J3.PvpComboMeterMoveIn,this,[]),this.enableComboAnimations=!1),this.onCurrentMemberSwitch.dispatch(this.getCurrent().source)}))}onRightSide(){return this.offScreenX>=this.game.width}movePlayerIn(q,K){Q.Aq$.isDefined(K)&&(K.complete?(this.team[0]=K,this.getCurrent().visible=!0,this.getCurrent().speed=10,this.onCurrentMemberSwitch.dispatch(this.getCurrent().source),this.enableComboAnimations&&(this.game.broadcaster.broadcast(Tt.J3.PvpComboMeterMoveIn,this,[]),this.enableComboAnimations=!1),this.getCurrent().walkIntoBattle?(this.getCurrent().speed=10,this.getCurrent().setPath([{x:this.onScreenX,y:this.getCurrent().y}],q)):(this.getCurrent().x=this.onScreenX,this.getCurrent().y=this.onScreenY,this.getCurrent().setPath([{x:this.onScreenX,y:this.getCurrent().y}],q)),this.onMoveCreatureIn.dispatch()):this.game.time.events.addTimer(10,this.movePlayerIn.bind(this,q,K),this))}movePlayerOut(q,K,z=!1){K.speed=30,K.setPath([{x:this.offScreenX+(this.offScreenX<0?-40:40),y:K.y}],(()=>{z&&(K.alpha=0),null==q||q()}),4),K===this.getCurrent()&&this.onMoveCreatureOut.dispatch()}swapPlayerIn(q,K){const z=this.team[q];this.jumpAnimation(z,this.onScreenX,this.onScreenY,K),this.swapCurrent(q),this.onCurrentMemberSwitch.dispatch(this.getCurrent().source)}swapPlayerOut(q,K){this.jumpAnimation(this.getCurrent(),q,K)}swapCurrent(q){const K=this.getCurrent();this.team[0]=this.team[q],this.team[q]=K}jumpAnimation(q,K,z,Y){const X=Math.min(q.y,z)-75;this.game.add.tween(q,this).to({x:K},500,Q.GS3.Linear.None,!0);const Z=this.game.add.tween(q,this).to({y:z},250,Q.GS3.Quadratic.In,!1);Z.onTweenComplete.add((()=>{it.l.sortChildren(q.parent,"y",et.W.SORT_ASCENDING)})),Q.Aq$.isDefined(Y)&&Z.onTweenComplete.add(Y),this.game.add.tween(q,this).to({y:X},250,Q.GS3.Quadratic.Out,!0).chain(Z)}fakeSwap(q,K,z){this.jumpAnimation(q,K.x,K.y),this.jumpAnimation(K,q.x,q.y,z)}swapPlayersHop(q,K){const z=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=this.team[K];if(this.getCurrent()&&!this.getCurrent().isDefeated()){const z=Y.parent;this.getCurrent().parent.addChild(Y),z.addChild(this.getCurrent()),this.swapPlayerOut(Y.x,Y.y),this.swapPlayerIn(K,q)}else{const z=this.game.state.getCurrentState();z.groupMiddle&&z.groupMiddle.addChild(Y),this.swapPlayerIn(K,q)}const Q=this.team[K];tt.q.instance.prodigy.gameContainer.get("20f-5f67").battle.sendBattlePositionChangedEvent({team:this.playerControlled?qt.B1.Player:qt.B1.Opponent,name:Y.getSource().getName()===z.getName()?"Player":Y.getSource().getName(),health:Y.getSource().getCurrentHearts(),character_2_name:Q.getSource().getName()===z.getName()?"Player":Q.getSource().getName(),character_2_health:Q.getSource().getCurrentHearts(),position_new:qt.Io.Front,position_old:Object.values(qt.Io)[K],automatic:!this.playerControlled}),this.onCurrentMemberSwitch.dispatch(this.getCurrent().source)}failRun(q){const K=(q,K)=>{for(let z=0;z=Qt.MAX_TEAM_COUNT);z++){const q=this.team[z];q.speed=10,0===z?q.setPath([{x:q.x+200,y:null}],K):q.setPath([{x:q.x+200,y:null}])}};tt.q.instance.prodigy.audio.playSFX(8,"run"),this.getCurrent().speed=40;for(let z=0;z=Qt.MAX_TEAM_COUNT);z++)0===z?this.team[z].setPath([{x:this.team[z].x-200,y:null}],K.bind(this,this.team[z],q),4):this.team[z].setPath([{x:this.team[z].x-200,y:null}],K.bind(this,this.team[z],void 0),4)}runAway(q=this.getCurrent(),K){if(q.captured)return;q.ran=!0;const z=()=>{K&&K()};if(this.onCreatureRanAway.dispatch(q.source),q.shouldPlayRetreatOnDefeat())q.retreat(z);else if(this.bossTeam){const K=this.game.add.tween(q,this).to({alpha:0},500,Q.GS3.Linear.None);K.onTweenComplete.add(z),K.start()}else tt.q.instance.prodigy.audio.playSFX(8,"run"),q.speed=40,q.flip(),q.moonwalk(),this.game.time.events.addTimer(500,this.movePlayerOut.bind(this,z,q,!0),this)}rescue(q){this.getCurrent().captured=!0,this.rescueCelebrationAnimation(q)}rescueCelebrationAnimation(q){const K=this.getCurrent(),z=this.getCurrent().parent,Y=new Q.oWr({color:Number.parseInt("FFFFFF",16),tintIntensity:0,blend:Q.PzZ.Lighten});K.sprites.filters=[Y];const X=this.game.add.tween(Y,this).to({tintIntensity:1},900,Q.GS3.Quadratic.In,!1,1300),Z=this.game.add.tween(Y,this).to({tintIntensity:0},300,Q.GS3.Quadratic.In,!1,900);X.chain(Z),X.start();const tt=new Kt.I(this.game,z);tt.position.set(K.x,K.y),z.swapChildren(K,tt),tt.populate({spineKey:J.Q.Spine_pet_battle_rescue_json}),tt.playAnimation(Vt.Back,!1);const et=new Kt.I(this.game,K);et.populate({spineKey:J.Q.Spine_pet_battle_rescue_json}),et.playAnimation(Vt.Front,!1,(()=>{this.game.time.events.addTimer(0,(()=>{this.game.state.get(Dt.G.Battle).groupFront.addChild(K),this.game.add.tween(K.sprites,this).to({alpha:0},800,Q.GS3.Quadratic.In,!0);const z=new Kt.I(this.game,K);z.populate({spineKey:J.Q.Spine_battle_transport_json}),z.playAnimation("exit",!1,q)}),this)}))}doPetRescueAnimation(q){this.game.state.get(Dt.G.Battle).groupFront.addChild(this.getCurrent()),tt.q.instance.prodigy.audio.playSFX(8,"run"),this.getCurrent().speed=40,this.getCurrent().moonwalk(),this.game.add.tween(this.getCurrent(),this).to({x:this.getCurrent().x+20},1500,Q.GS3.Linear.None,!0).onTweenComplete.add((()=>{this.getCurrent().speed=30,this.getCurrent().setPath([{x:-100,y:this.onScreenY+Qt.VERTICAL_TEAM_OFFSET+this.getCurrent().height/4},{x:380,y:this.onScreenY+Qt.VERTICAL_TEAM_OFFSET+this.getCurrent().height/4}],q,4)}),this)}runAwayTeam(q){if(!Q.Aq$.isDefined(this.getCurrent().captured))if(this.bossTeam)this.game.add.tween(this.getCurrent(),this).to({alpha:0},500,Q.GS3.Linear.None).start();else{tt.q.instance.prodigy.audio.playSFX(8,"run");for(let q=0;q=Qt.MAX_TEAM_COUNT);q++)this.team[q].speed=40,this.team[q].flip(),this.team[q].moonwalk(),this.team[q].ran=!0,this.game.time.events.addTimer(500,this.movePlayerOut.bind(this,null,this.team[q]),this);Q.Aq$.isDefined(q)&&this.game.time.events.addTimer(500,q,this)}}runAwayDefeated(q){const K=this.getUnRun();let z=!1;for(let Y=0;Yz)&&(K=Y,z=Z)}}return K}getDrops(){let q=[];for(let z=0;zq.getSource().isKnockedOut()&&!q.captured&&!q.ran))}getCurrent(){var q;return null!==(q=this.getContainerAtOverriddenPosition(Ht.Middle))&&void 0!==q?q:this.team[0]}getCurrentSource(){return this.getCurrent().source}getCreatures(q=!1){const K=[];for(const z of this.team)z.captured&&!q||K.push(z.source);return K}getLiving(){const q=[],K=this.getTeamSize();for(let z=0;z{Y.sprites.scale.x=-Math.abs(Y.sprites.scale.x)}),2e3),Y.visible=!0,this.team[q]=Y}drawBounds(q){let K=16711680;q===Ht.Back?K=65280:q===Ht.Front&&(K=255);const z=this.team[q],Y=new Z.Rectangle(z.getHitboxLeft(),z.getHitboxTop(),z.getHitboxWidth(),z.getHitboxHeight());zt.F.drawBounds(this.game,z.sprites,Y,K)}destroy(){this.unregisterAllSignals(),this.game=null,this.playerEnergySource=null,X.forEach(this.team,(q=>{q.destroy()})),this.team=[]}getTeamPositionForContainer(q){const K=this.getOverriddenPositionForContainer(q);return K?K.position:this.team.indexOf(q)}overrideTeamPositionForContainer(q,K){const z=this.getOverriddenPositionForContainer(q);z?z.position=K:this._creatureContainerPosition.push({container:q,position:K})}getContainerAtOverriddenPosition(q){var K;return null===(K=this._creatureContainerPosition.find((K=>K.position===q)))||void 0===K?void 0:K.container}resetContainerOverriddenPosition(q){const K=this._creatureContainerPosition.findIndex((K=>K.container===q));K>-1&&this._creatureContainerPosition.splice(K,1)}resetOverriddenPositions(){this._creatureContainerPosition=[]}getOverriddenPositionForContainer(q){return this._creatureContainerPosition.find((K=>K.container===q))}}Qt.MAX_TEAM_COUNT=3,Qt.HORIZONTAL_TEAM_OFFSET=130,Qt.VERTICAL_TEAM_OFFSET=110},94393:(q,K,z)=>{"use strict";z.d(K,{R:()=>Q,n:()=>yt});var Y,Q,X=z(8674),Z=z(62459),J=z(79687),tt=z(95891),et=z.n(tt),it=z(99625),st=z(36648),nt=z(57797),at=z(73678),rt=z(35120),ot=z(53880),ht=z(65050),ct=z(41674),dt=z(46784),lt=z(21738),ut=z(30065),ft=z(76277),bt=z(71698),pt=z(46902),vt=z(13956),gt=z(51540),mt=z(73797);!function(q){q.Xp="Xp",q.Currency="Currency",q.TitanShard="TitanShard",q.Springfest="Springfest",q.Summerfest="Summerfest",q.Pumpkinfest="Pumpkinfest",q.Winterfest="Winterfest",q.StarlightFestival="Starlight",q.MoonlightFestival="Moonlight",q.GenericFestival="Generic"}(Q||(Q={}));let yt=Y=class{constructor(){this._festivalConfigs=[],this.ELEMENTAL_ZONES=[at.A_.BONFIRE,at.A_.FOREST,at.A_.SHIPWRECK,at.A_.SHIVERCHILL,at.A_.SKYWATCH],this.INSTANCE_ZONES=[at.A_.ARCHIVES,at.A_.ASTRALTOWER,at.A_.CRYSTALCAVERNS,at.A_.DARKTOWER,at.A_.EARTHTOWER,at.A_.FIRETOWER,at.A_.ICETOWER,at.A_.LAMPLIGHT,at.A_.STORMTOWER,at.A_.WATERTOWER],this.lastFetchTime=0,this._eventMap={},this._meetsFeatureRequirement=!1,this._listeningForLevelUp=!1}awaitLoad(){return(0,X.sH)(this,void 0,void 0,(function*(){return Date.now()>this.lastFetchTime+18e5&&(this.lastFetchTime=Date.now(),this._fetchPromise=this.fetchData()),yield this._fetchPromise,this}))}fetchData(){return(0,X.sH)(this,void 0,void 0,(function*(){const{gameContainer:q}=rt.q.instance.prodigy,K=rt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let z=(yield this.getEventDataRequest()).weeks;this._festivalConfigs=(yield this.getFestivalConfigRequest()).festivals,z=z.filter((({internal:q,accountIds:z})=>!q||z.split(",").some((q=>+q.trim()===K.userID)))),this._eventMap=et().groupBy(z,(({type:q})=>q));const Q=Y.FESTIVALS.findIndex((q=>this._eventMap[q])),X=q.get("ad2-c5b2").player.daily,J=(0,ft.G)(bt.o),tt=q.get("11f-118a");if(this._meetsFeatureRequirement=yield tt.meetsRequirements(69),Q>=0&&J.enabled){const q=this._eventMap[Y.FESTIVALS[Q]];if(!q)return void Z.VyI.log(`WeekendEvents.fetchData - No festival events found for ${Y.FESTIVALS[Q]}`,Z.$bb.Error);const K=q[0];this._activeFestival={type:Q,startDate:K.startDate,endDate:K.endDate,aboutScreen:K.aboutScreen,entityId:K.entityId,zone:K.zone},X.setFestival(K.id),this._eventMap=et().omit(this._eventMap,Y.FESTIVALS)}else this._activeFestival=void 0,this._meetsFeatureRequirement=!1,X.setFestival(0);this._listeningForLevelUp||(this._listeningForLevelUp=!0,rt.q.instance.game.broadcaster.addAppListener(mt.ig.AnyLevelUp,this.onPlayerLevelUp,this,mt.HG.WeekendEventsLevelUp,!0))}))}onPlayerLevelUp(){return(0,X.sH)(this,void 0,void 0,(function*(){if(!this._activeFestival||this._meetsFeatureRequirement)return;const{gameContainer:q}=rt.q.instance.prodigy,K=q.get("11f-118a");if(this._meetsFeatureRequirement=yield K.meetsRequirements(69),!this._meetsFeatureRequirement)return;q.get("f03-2b73").completeRootTask().catch(Z.RQr.createHandler("Error completing festival root task and NONE events on level up")),rt.q.instance.prodigy.skin.applyFestival().then((()=>{rt.q.instance.game.broadcaster.broadcast(mt.Y1.HUDRevampButtonVisibilityRefreshRequested),rt.q.instance.game.broadcaster.broadcast(mt.Y1.CheckForHUDAttention)})).catch(Z.RQr.createHandler("Error initializing festival on level up"))}))}getActiveFestivalName(){var q;const K=null===(q=this.getActiveFestival())||void 0===q?void 0:q.type;return void 0!==K?Y.FESTIVALS[K].toLowerCase():""}getFestivalConfig(){if(this._activeFestival&&this._activeFestival.type>=0){const q=this._activeFestival.type;return et().findLast(this._festivalConfigs,(K=>K.name===Y.FESTIVALS[q]))}}handleFestivalProgressPopup(q,K){var z,Y,Q,X,J,tt,et,at,ut;if(!this.getActiveFestival())return void(null==q||q());const ft=rt.q.instance.prodigy.open.menus;let bt=ft.length;window.setTimeout((()=>{bt=ft.length}));const pt=()=>{if(ft.length<=bt)null==q||q();else{const K=ft[ft.length-1];if(K instanceof lt.y){const q=K.onClose;K.onClose=()=>{pt(),null==q||q()}}else null==q||q()}},vt=rt.q.instance.prodigy.gameContainer.get("f03-2b73").getAllProgressTaskCounts(),gt=this.getFestivalConfig(),mt=rt.q.instance.prodigy.gameContainer.get(Z.$Bt.LocalizationService),yt=mt.getText("X_REWARDS",(null===(z=null==gt?void 0:gt.tintableBanner)||void 0===z?void 0:z.titleText)?mt.getText(null===(Y=null==gt?void 0:gt.tintableBanner)||void 0===Y?void 0:Y.titleText):mt.getText("FESTIVAL")),_t=rt.q.instance.prodigy.open.prefabMenu(it.l.FestivalProgressMenu,pt,!0,!0,!0,{[ot.d.StoryTabActive]:(null!==(Q=vt[nt.xK.Story])&&void 0!==Q?Q:0)>0,[ot.d.CoopTabActive]:(null!==(X=vt[nt.xK.Coop])&&void 0!==X?X:0)>0,[ot.d.SeasonTabActive]:(null!==(J=vt[nt.xK.Season])&&void 0!==J?J:0)>0,[ot.d.RiftsTabActive]:(null!==(tt=vt[nt.xK.Rifts])&&void 0!==tt?tt:0)>0,[ot.d.MemberTabActive]:(null!==(et=vt[nt.xK.Member])&&void 0!==et?et:0)>0,[ot.d.BackgroundImageGuid]:null!==(at=null==gt?void 0:gt.backgroundImageGuid)&&void 0!==at?at:st.q.Background_starlight,[ot.d.TitleText]:yt,[ot.d.BannerFillColor]:null===(ut=null==gt?void 0:gt.tintableBanner)||void 0===ut?void 0:ut.bannerFillColor},Object.assign({interfaceName:dt.B.FestivalProgressionWindow,interfaceType:ct.Wm.Modal,originType:ct.$N.AutoSurfaced,originID:"festival",instanceType:ht.N.Interface},K),!0,!1,void 0,!1,!0);return _t.createContainer=!1,_t}isMultiZone(q){return q===pt.Q.Global||q===pt.Q.AllZones||q===pt.Q.AllInstances}getZoneDisplayName(q){const K=rt.q.instance.prodigy.gameContainer.get(Z.$Bt.LocalizationService);return q===pt.Q.AllInstances?K.getText("ALL_NON_ELEMENTAL_ZONES"):q===pt.Q.AllZones?K.getText("ALL_ELEMENTAL_ZONES"):q===pt.Q.Global?K.getText("PARENT_ATTACH_WORLDS"):rt.q.instance.prodigy.world.getZone(q).name}getRandomZoneID(q){const K=this.ELEMENTAL_ZONES,z=this.INSTANCE_ZONES;return q===pt.Q.AllZones?Z.lv2.getRandomItem(K):q===pt.Q.AllInstances?Z.lv2.getRandomItem(z):Z.lv2.getRandomItem(K.concat(z))}getTitanShardMultiplier(){var q,K;return null!==(K=null===(q=this._eventMap[Q.TitanShard])||void 0===q?void 0:q[0].bonusMultiplier)&&void 0!==K?K:1}getActiveFestival(){return this._meetsFeatureRequirement?this._activeFestival:void 0}getActiveFestivalWithoutRestrictions(){return this._activeFestival}getEvents(q){var K;return null!==(K=this._eventMap[q])&&void 0!==K?K:[]}getMultiplier(q,K){var z,Y,Q;const X=this.ELEMENTAL_ZONES.includes(q);return null!==(Q=null===(Y=null===(z=this._eventMap[K])||void 0===z?void 0:z.find((({zone:K})=>K===q||K===pt.Q.Global||K===pt.Q.AllZones&&X||K===pt.Q.AllInstances&&!X)))||void 0===Y?void 0:Y.bonusMultiplier)&&void 0!==Q?Q:1}getEventDataRequest(){return(0,X.sH)(this,void 0,void 0,(function*(){const q=yield this._networkHandler.getCurrentEventsData();return q||(Z.RQr.createHandler("Error loading the weekend events entity"),{weeks:[]})}))}getFestivalConfigRequest(){return(0,X.sH)(this,void 0,void 0,(function*(){const q=yield this._networkHandler.getFestivalConfigData();return q||(Z.RQr.createHandler("Error loading the festival config entity"),{festivals:[]})}))}getFestivalIcon(){const q=this.getFestivalConfig();switch(null==q?void 0:q.name){case Y.FESTIVALS[ut.Q.Springfest]:return st.q.Hud_springfest;case Y.FESTIVALS[ut.Q.Pumpkinfest]:return st.q.Hud_pumpkinfest;case Y.FESTIVALS[ut.Q.StarlightFestival]:return st.q.Hud_starlight;case Y.FESTIVALS[ut.Q.Summerfest]:return st.q.Hud_summerfest;case Y.FESTIVALS[ut.Q.Winterfest]:return st.q.Hud_winterfest;case Y.FESTIVALS[ut.Q.MoonlightFestival]:return st.q.Hud_moonlightfest;case Y.FESTIVALS[ut.Q.GenericFestival]:default:return Z.VyI.log("No valid active festival found when fetching HUD icon",Z.$bb.Warning),""}}};yt.REQUEST_TIMEOUT_DURATION_MS=1e4,yt.REQUEST_RETRY_COUNT=5,yt.FESTIVALS=[Q.Springfest,Q.Summerfest,Q.Pumpkinfest,Q.Winterfest,Q.StarlightFestival,Q.MoonlightFestival,Q.GenericFestival],(0,X.Cg)([(0,vt.b)("f67-1437"),(0,X.Sn)("design:type",gt.v)],yt.prototype,"_networkHandler",void 0),yt=Y=(0,X.Cg)([(0,J.injectable)()],yt)},95946:(q,K,z)=>{"use strict";var Y;z.d(K,{a:()=>Y}),function(q){q.Astral="astral",q.Fire="fire",q.Ice="ice",q.Physical="physical",q.Plant="plant",q.Shadow="shadow",q.Storm="storm",q.Water="water",q.Neutral="neutral",q.Earth="earth",q.Wizard="wizard",q.Mech="mech"}(Y||(Y={}))},52239:(q,K,z)=>{"use strict";var Y;z.d(K,{i:()=>Y}),function(q){q.beam="beam",q.projectile="projectile",q.aoe="aoe",q.aoa="aoa"}(Y||(Y={}))},29949:(q,K,z)=>{"use strict";z.d(K,{I:()=>J});var Y=z(62459),Q=z(95891),X=z(77938),Z=z(52239);class J{constructor(q){this.spellData=X.t.getItem("spell",q)}getEasing(q){if(Y.Aq$.isDefined(this.spellData.metadata.animationData[q])){const K=this.spellData.metadata.animationData[q].split(".");return Y.GS3[K[0]][K[1]]}return Y.GS3.Linear.None}getName(){return this.spellData.data.name}getInt(q){return Y.Aq$.isDefined(this.spellData.metadata.animationData[q])?parseInt(this.spellData.metadata.animationData[q]):0}getValue(q){return this.spellData.metadata.animationData[q]}isSingleShot(){return!Q.includes([Z.i.aoe,Z.i.aoa],this.spellData.metadata.animationData.animationType)}getElement(){return this.spellData.data.element}}},2221:(q,K,z)=>{"use strict";z.d(K,{f:()=>J});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(35120);class J extends Q.s3P{getShardCount(){const q=X.find(this.battleTeams,(q=>1===q.ID)).IsDefeated()?this.winningTiers:this.losingTiers,K=Z.q.instance.prodigy.gameContainer.get("119-35f9").getTitanShardMultiplier();for(let z=0;z=q[z].questionsCorrect)return Math.floor(q[z].shards*K);return 0}}(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],J.prototype,"battleTeams",void 0),(0,Y.Cg)([(0,Q.fFd)("LosingPrizeTiers"),(0,Y.Sn)("design:type",Array)],J.prototype,"losingTiers",void 0),(0,Y.Cg)([(0,Q.fFd)("WinningPrizeTiers"),(0,Y.Sn)("design:type",Array)],J.prototype,"winningTiers",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleStats"),(0,Y.Sn)("design:type",Object)],J.prototype,"stats",void 0)},70215:(q,K,z)=>{"use strict";var Y;z.d(K,{$:()=>Y}),function(q){q[q.MaxHearts=0]="MaxHearts",q[q.Level=1]="Level",q[q.Spell=2]="Spell",q[q.Stars=3]="Stars"}(Y||(Y={}))},35997:(q,K,z)=>{"use strict";z.d(K,{k:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this.mods={},this.onBattleStart=new Q.HN0,this.onEscape=new Q.HN0,this.onVictory=new Q.HN0,this.onDefeat=new Q.HN0}startBattle(){this.onBattleStart.dispatch();const q=X.q.instance.prodigy.world.getCurrentZone(),K=X.q.instance.prodigy.world.getZone(q).getBattleMods(),z=Object.assign(Object.assign(Object.assign({},this.mods),{pets:this.mods.pets?[...this.mods.pets]:void 0}),K);X.q.instance.prodigy.battle.start(z,(()=>this.onEscapeCallback()),(()=>this.onVictoryCallback()),(()=>this.onDefeatCallback()),z.onFaint)}setMods(q){this.mods=q}onEscapeCallback(){this.onEscape.dispatch(),this.disposeSignals(),this.onEscapeTeleport&&this.teleport(this.onEscapeTeleport)}onVictoryCallback(){this.onVictory.dispatch(),this.disposeSignals(),this.onVictoryTeleport&&this.teleport(this.onVictoryTeleport)}onDefeatCallback(){this.onDefeat.dispatch(),this.disposeSignals(),this.onDefeatTeleport&&this.teleport(this.onDefeatTeleport)}disposeSignals(){this.onEscape.dispose(),this.onVictory.dispose(),this.onDefeat.dispose()}teleport(q){var K,z;X.q.instance.prodigy.world.it(q.mapKey,null===(K=q.coordinates)||void 0===K?void 0:K.x,null===(z=q.coordinates)||void 0===z?void 0:z.y)}destroy(){this.onBattleStart.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],J.prototype,"mods",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onBattleStart",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onEscape",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onVictory",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onDefeat",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],J.prototype,"onEscapeTeleport",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],J.prototype,"onVictoryTeleport",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],J.prototype,"onDefeatTeleport",void 0),J=(0,Y.Cg)([(0,Q.EVk)("StartBattle",Z.Y.battle)],J)},76007:(q,K,z)=>{"use strict";z.d(K,{k:()=>Z});var Y=z(8674),Q=z(48417),X=z(76546);class Z extends X.D{constructor(){super(...arguments),this._getXpPromises={}}getPastUnclaimedRewards(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Q.D.BattlePass.GetPastUnclaimedRewards,{})}))}claimPastUnclaimedReward(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Q.D.BattlePass.ClaimPastRewards,{})}))}completeExpiredClaimQuests(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Q.D.BattlePass.CompleteExpiredClaimTasks,{questId:q,claimableTaskIds:K})}))}getBattlePassXpData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return void 0===this._getXpPromises[q]&&(this._getXpPromises[q]=this.makeCloudscriptRequest(Q.D.BattlePass.GetBattlePassXpData,{questId:q}),this._getXpPromises[q].finally((()=>this._getXpPromises[q]=void 0))),this._getXpPromises[q]}))}callDebugRoute(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}callBattlePassSchedulerRouteDebug(){return(0,Y.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}}},9475:(q,K,z)=>{"use strict";z.d(K,{S:()=>ut});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(26738),J=z(68834),tt=z(58776),et=z(62886),it=z(29891),st=z(24522),nt=z(66582),at=z(15821),rt=z(13956),ot=z(68152),ht=z(56567),ct=z(38156),dt=z(1959),lt=z(91207);class ut{constructor(q,K,z,Y){this._experimentFeatureTaskIds=[],this._mythicalEpicPetIds=[],this._questId=q,this._metaData=K,this._tasks=z,this.dataVersion=Y}parseTaskData(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y={};let Q=1;const X={},J=new ht.f;for(const st of q)if(!st.taskDefinition.metadata.experimentTaskId||this._experimentFeatureTaskIds.includes(st.taskDefinition.metadata.experimentTaskId)){if(st.taskDefinition.metadata.tier){const q=this.handleTierTask(st,K,Y);(null==q?void 0:q.isCompleted)&&(Q=Math.max(Q,q.tier))}st.taskDefinition.metadata.questGoalTaskType&&(yield this.handleQuestGoalTask(st,K,X,J)),!this._ftueTaskData&&st.taskDefinition.metadata.isFtue&&(this._ftueTaskData={buttonId:st.taskDefinition.completionRequirements.data.id,isCompleted:st.taskProgress.status===tt.t.COMPLETE}),st.taskDefinition.metadata.tierTaskType!==Z.m.INFINITE_GOAL&&st.taskDefinition.metadata.tierTaskType!==Z.m.INFINITE_CLAIM||this.handleInfiniteTierTask(st,z),st.taskProgress.status===tt.t.COMPLETE&&st.taskDefinition.metadata.isExperimentGate&&this._experimentFeatureTaskIds.push(st.taskID)}this._infiniteTierData&&(this._infiniteTierData.tier=Object.keys(Y).length+1,this._infiniteTierData.battlePassXpRequired=Y[this._infiniteTierData.tier-1].battlePassXpRequired,Y[this._infiniteTierData.tier]=this._infiniteTierData),Y[Math.min(Q+1,Object.keys(Y).length)].isCurrentTier=!0,this._tiers=Y,this._questGoals=Object.values(X);let et=z.total,it=0;for(const q of Object.values(this._tiers))q.isInfiniteTier||(q.targetProgress=q.battlePassXpRequired-it,q.currentProgress=Math.min(q.targetProgress,et),it+=q.targetProgress,et-=q.currentProgress)}))}handleTierTask(q,K,z){var Y,X,J,et;const it=q.taskDefinition.metadata.tier,nt=q.taskDefinition.metadata.tierTaskType;if(!it||!nt)return Q.VyI.log(`Missing tier metadata for task ${q.taskID} in quest ${q.questID}`,Q.$bb.Error),null;z[it]||(z[it]={tier:it,isCurrentTier:!1,isCompleted:!1,targetProgress:0,currentProgress:0,topPremiumReward:null,bottomPremiumReward:null,freeReward:null,battlePassXpRequired:0,isInfiniteTier:!1});const rt=z[it];switch(nt){case Z.m.GOAL:rt.isCompleted=q.taskProgress.status===tt.t.COMPLETE;const z=null===(Y=q.taskDefinition.preconditions)||void 0===Y?void 0:Y.find((q=>q.type===st.n.HAS_TOTAL_BATTLE_PASS_XP));rt.battlePassXpRequired=null!==(J=null===(X=null==z?void 0:z.data)||void 0===X?void 0:X.battlePassXpRequired)&&void 0!==J?J:0;const it=null===(et=null==z?void 0:z.data)||void 0===et?void 0:et.battlePassXpId;it&&!this._battlePassXpId&&(this._battlePassXpId=it);break;case Z.m.PREMIUM_REWARD_CLAIM:rt.bottomPremiumReward?(rt.topPremiumReward=this.parseRewardData(q,K),(0,ot.v)(at.A.isDefined(rt.topPremiumReward.itemDrop),`Reward is missing item drop data. ${q.taskID}`)):(rt.bottomPremiumReward=this.parseRewardData(q,K),(0,ot.v)(at.A.isDefined(rt.bottomPremiumReward.itemDrop),`Reward is missing item drop data. ${q.taskID}`));break;case Z.m.FREE_REWARD_CLAIM:rt.freeReward=this.parseRewardData(q,K),(0,ot.v)(at.A.isDefined(rt.freeReward.itemDrop),`Reward is missing item drop data. ${q.taskID}`);break;case Z.m.PREMIUM_GATE:break;default:Q.VyI.log(`BattlePassQuestData: Unknown tier task type: ${nt}. QuestID: ${q.questID}. TaskID: ${q.taskID}`,Q.$bb.Warning)}return rt}handleInfiniteTierTask(q,K){var z,Y,Q,X,J;switch(this._infiniteTierData||(this._infiniteTierData={tier:0,isCurrentTier:at.A.isDefined(K.currentInfinite),isCompleted:!1,targetProgress:0,currentProgress:0,timesCompleted:void 0,timesClaimed:void 0,battlePassXpRequired:0,isInfiniteTier:!0,freeReward:{rewardId:"",itemDrop:this._metaData.infiniteTier.reward,isMystery:!1,claimed:!1,claimable:!1,membershipTier:nt._$.NonMember}}),q.taskDefinition.metadata.tierTaskType){case Z.m.INFINITE_GOAL:this._infiniteTierData.targetProgress=q.taskDefinition.preconditions[0].data.infiniteXpRequired,this._infiniteTierData.currentProgress=null!==(z=K.currentInfinite)&&void 0!==z?z:0,this._infiniteTierData.timesCompleted=null!==(Q=null===(Y=q.taskProgress.data)||void 0===Y?void 0:Y.timesCompleted)&&void 0!==Q?Q:0;break;case Z.m.INFINITE_CLAIM:this._infiniteTierData.timesClaimed=null!==(J=null===(X=q.taskProgress.data)||void 0===X?void 0:X.progress)&&void 0!==J?J:0,this._infiniteTierData.freeReward.rewardId=q.taskDefinition.completionRequirements.data.id}at.A.isDefined(this._infiniteTierData.timesCompleted)&&at.A.isDefined(this._infiniteTierData.timesClaimed)&&(this._infiniteTierData.freeReward.claimable=this._infiniteTierData.timesCompleted>this._infiniteTierData.timesClaimed)}handleQuestGoalTask(q,K,z,X){return(0,Y.sH)(this,void 0,void 0,(function*(){var Y,tt,et,it,nt;const rt=q.taskDefinition.metadata.questGoalTaskType;if(!rt)return Q.VyI.log(`Missing quest goal task type for task ${q.taskID} in quest ${q.questID}`,Q.$bb.Error),null;let ht;rt===Z.x.GOAL?ht=q.taskID:rt===Z.x.CLAIM&&(ht=q.taskDefinition.prerequisites[0],(0,ot.v)(at.A.isDefined(ht),`Claim task is missing a prerequisite. ${q.taskID}`)),z[ht]||(z[ht]={goalTaskId:ht,claimTaskId:"",questType:"",questDescription:"",questGoalType:null,targetProgress:0,currentProgress:0,reward:null,hasStarted:!1,isExpired:!1,comingSoonDate:null,sortPriority:q.taskDefinition.metadata.sortPriority});const dt=z[ht];switch(rt){case Z.x.GOAL:dt.goalTaskId=q.taskID,dt.questType=q.taskDefinition.metadata.questGoalType,dt.questGoalType=q.taskDefinition.completionRequirements.type,dt.targetProgress=q.taskDefinition.completionRequirements.data.target,dt.currentProgress=null!==(tt=null===(Y=q.taskProgress.data)||void 0===Y?void 0:Y.progress)&&void 0!==tt?tt:0,dt.questDescription=ct.n.getQuestDescriptionFromDefinition(q.taskDefinition);const z=null!==(et=q.taskDefinition.metadata.questGoalName)&&void 0!==et?et:null;dt.questGoButtonAction=z?this.getGoButtonActionByName(z):this.getGoButtonActionByType(dt.questGoalType),dt.isMemberQuest=!1,dt.hasStarted=!0,dt.isExpired=!1;for(const K of q.taskDefinition.preconditions||[])K.type===st.n.DATE_AFTER&&(dt.hasStarted=yield X.check(st.n.DATE_AFTER,K.data)),K.type===st.n.DATE_BEFORE&&(dt.isExpired=!(yield X.check(st.n.DATE_BEFORE,K.data))),K.type===st.n.IS_MEMBER&&(dt.isMemberQuest=!0);const Q=dt.questType===J.bm.Bonus&&!dt.hasStarted;dt.comingSoonDate=Q?new Date(null===(nt=null===(it=q.taskDefinition.preconditions)||void 0===it?void 0:it.find((q=>q.type===st.n.DATE_AFTER)))||void 0===nt?void 0:nt.data.date):null;break;case Z.x.CLAIM:dt.claimTaskId=q.taskID,dt.reward=this.parseRewardData(q,K)}return dt}))}getGoButtonActionByName(q){let K;switch(q){case J.UA.BecomeAMember:K=J.Nz.BecomeAMember}return K}getGoButtonActionByType(q){let K;switch(q){case et.T.EVOLVE_PET:K=J.Nz.EvolvePet}return K}parseRewardData(q,K){var z,Y;if(!q)return null;let Q,X;const J=null!==(z=q.taskDefinition.onComplete)&&void 0!==z?z:[];for(const Z of J)Z.type!==it.s.GOT_ITEM?Z.type!==it.s.GIVE_ULTIMATE?Z.type!==it.s.GIVE_BATTLE_PASS_XP||(Q=Z.data.xpToGive):(X={ID:Z.data.id,type:"pet",N:1},this._mythicalEpicPetIds.push(Z.data.id)):X=Z.data.itemDrops[0];(0,ot.v)(at.A.isDefined(X)||at.A.isDefined(Q),`Reward has no item drop or battle pass xp data. ${q.taskID}`);let et=nt._$.NonMember;q.taskDefinition.metadata.tierTaskType===Z.m.PREMIUM_REWARD_CLAIM&&(et=q.taskDefinition.metadata.isUltimate?nt._$.MemberUltimateMath:nt._$.MemberLevelUp);const st={rewardId:q.taskDefinition.completionRequirements.data.id,claimable:K.includes(q.taskDefinition.id),claimed:q.taskProgress.status===tt.t.COMPLETE,isMystery:null!==(Y=q.taskDefinition.metadata.isMystery)&&void 0!==Y&&Y,membershipTier:et};return X&&(st.itemDrop=X),Q&&(st.battlePassXp=Q),st}addQuantityToChaseItemData(q,K,z){var Y;const Q=z?1:null!==(Y=q.N)&&void 0!==Y?Y:1,X=z?this.getMiniChaseItemsUltimate().find((q=>182===q.id&&"item"===q.type)):this.getMiniChaseItemsUltimate().find((K=>K.id===q.ID&&K.type===q.type));if(X&&(at.A.isDefined(X.quantity)?X.quantity+=Q:X.quantity=Q),!K){const K=z?this.getMiniChaseItemsLevelUp().find((q=>182===q.id&&"item"===q.type)):this.getMiniChaseItemsLevelUp().find((K=>K.id===q.ID&&K.type===q.type));K&&(at.A.isDefined(K.quantity)?K.quantity+=Q:K.quantity=Q)}}getStartDate(){return new Date(this._metaData.startDate).getTime()}getEndDate(){return new Date(this._metaData.endDate).getTime()}getQuestID(){return this._questId}getTasks(){return this._tasks}getNumTiers(){return Object.values(this._tiers).filter((q=>!q.isInfiniteTier)).length}getCurrentTierData(){var q;return null!==(q=Object.values(this._tiers).find((q=>q.isCurrentTier)))&&void 0!==q?q:this._tiers[0]}getCurrentTier(){var q;return this.hasInfiniteTier()&&(null===(q=this.getInfiniteTierData())||void 0===q?void 0:q.isCurrentTier)?this.getNumTiers()+1:this.getCurrentTierData().tier}getAllTierData(){return Object.values(this._tiers)}getTierData(q){return this._tiers[q]}getTiersWithReward(q,K){return Object.values(this._tiers).filter((z=>[z.freeReward,z.bottomPremiumReward,z.topPremiumReward].some((z=>{var Y,Q;return(null===(Y=null==z?void 0:z.itemDrop)||void 0===Y?void 0:Y.ID)===q&&(null===(Q=null==z?void 0:z.itemDrop)||void 0===Q?void 0:Q.type)===K})))).map((q=>q.tier)).sort(((q,K)=>q-K))}getUnclaimedRewards(){var q,K,z,Y,Q,X;const Z=[];for(const J of this.getAllTierData())J.isInfiniteTier||((null===(q=J.freeReward)||void 0===q?void 0:q.claimable)&&!(null===(K=J.freeReward)||void 0===K?void 0:K.claimed)&&Z.push(J.freeReward.itemDrop),(null===(z=J.topPremiumReward)||void 0===z?void 0:z.claimable)&&!(null===(Y=J.topPremiumReward)||void 0===Y?void 0:Y.claimed)&&Z.push(J.topPremiumReward.itemDrop),(null===(Q=J.bottomPremiumReward)||void 0===Q?void 0:Q.claimable)&&!(null===(X=J.bottomPremiumReward)||void 0===X?void 0:X.claimed)&&Z.push(J.bottomPremiumReward.itemDrop));if(this.hasInfiniteTier()){const q=this.getInfiniteTierData();let K=q.timesCompleted-q.timesClaimed;for(;K>0;)Z.push(q.freeReward.itemDrop),K--}return Z}hasInfiniteTier(){var q;const K=null===(q=this._metaData.infiniteTier)||void 0===q?void 0:q.enabled;return(!0===K||void 0===K)&&at.A.isDefined(this.getInfiniteTierData())}getInfiniteTierData(){return this._infiniteTierData}getNumUnclaimedRewards(){return this.getUnclaimedRewards().length}getTitle(){return this._metaData.title}getSeasonName(){return this._metaData.seasonName}getCurrentTierProgress(){return this.getCurrentTierData().currentProgress}getCurrentTierProgressTarget(){return this.getCurrentTierData().targetProgress}getPremiumTrackName(){return this._metaData.premiumTrackName}getPremiumTrackIconAtlasGuid(){return X._.Ui_battle_pass_json}getPremiumTrackIconFrameName(){return this._metaData.premiumTrackIconFrame}getHomeScreenPromoImageGuid(){return this._metaData.homeScreenPromoImageGuid}getHomeScreenPromoImageURL(){return this._metaData.homeScreenPromoImageURL}getQuestsScreenPanelImageGuid(){return this._metaData.questsScreenPanelImageGuid}getQuestsScreenPanelImageURL(){return this._metaData.questsScreenPanelImageURL}getRewardsScreenPanelImageGuid(){var q;return null===(q=this._metaData.rewardsScreenLeftPanelData)||void 0===q?void 0:q.rewardsScreenPanelImageGuid}getRewardsScreenPanelImageURL(){var q;return null===(q=this._metaData.rewardsScreenLeftPanelData)||void 0===q?void 0:q.rewardsScreenPanelImageURL}getUltimateActivatedTextColour(){var q;return null===(q=this._metaData.rewardsScreenLeftPanelData)||void 0===q?void 0:q.ultimateActivatedTextColour}getChasePrizes(){var q;return null!==(q=this._metaData.chasePrizes.chasePrizes)&&void 0!==q?q:[]}getChaseHeroPoseImageGuid(){return lt.E.resolveSingleImageAssetSource(this._metaData.mythicalEpicHeroPoseImageGuid,this._metaData.mythicalEpicHeroPoseImageURL)}getMythicalEpicPetIds(){return this._mythicalEpicPetIds}getChasePetsLevelUp(){return this._metaData.chasePrizes.chasePrizesLevelupMember?this._metaData.chasePrizes.chasePrizesLevelupMember.filter((q=>"pet"===q.type)):[]}getChasePetsUltimate(){return this._metaData.chasePrizes.chasePrizesUltimateMember?this._metaData.chasePrizes.chasePrizesUltimateMember.filter((q=>"pet"===q.type)):[]}getMiniChaseItemsLevelUp(){return this._metaData.chasePrizes.chasePrizesLevelupMember?this._metaData.chasePrizes.chasePrizesLevelupMember.filter((q=>{if(q.experiment){return at.A.traverseIfObject(this._featureProvider.getFeatureValue(q.experiment.feature),q.experiment.variable)===q.experiment.value===q.experiment.result}return!0})):[]}getMiniChaseItemsUltimate(){return this._metaData.chasePrizes.chasePrizesUltimateMember?this._metaData.chasePrizes.chasePrizesUltimateMember.filter((q=>{if(q.experiment){return at.A.traverseIfObject(this._featureProvider.getFeatureValue(q.experiment.feature),q.experiment.variable)===q.experiment.value===q.experiment.result}return!0})):[]}hasMadeQuestProgress(){return this._tasks.some((q=>{var K;return q.taskDefinition.metadata.questGoalTaskType===Z.x.GOAL&&(q.taskProgress.status===tt.t.COMPLETE||(null===(K=q.taskProgress.data)||void 0===K?void 0:K.progress)>0)}))}getQuestTypes(){return this._metaData.questTypes.map((q=>q.name))}getQuests(q){return q?this._questGoals.filter((K=>K.questType===q||q===J.bm.All)):this._questGoals}getQuestsToShow(q){return this.getQuests(q).filter((q=>q.hasStarted&&!q.isExpired||q.comingSoonDate))}getCompletedUnclaimedQuests(){return this.getQuests().filter((q=>q.reward.claimable&&!q.reward.claimed))}getQuestComingSoonDate(q){let K=null;for(let z=0;z{var K,z;return(null===(K=q.reward)||void 0===K?void 0:K.claimable)&&!(null===(z=q.reward)||void 0===z?void 0:z.claimed)})).length}getQuestById(q){return this._questGoals.find((K=>K.goalTaskId===q))}getFtueTask(){return this._ftueTaskData}getFtueFrames(){return this._metaData.ftueFrames}getXpId(){return this._battlePassXpId}getThreeTierCoreChaseItems(){var q;return null===(q=this._metaData.threeTierChasePrizes)||void 0===q?void 0:q.chasePrizes.coreChaseItems}getThreeTierPlusChaseItems(){var q;return null===(q=this._metaData.threeTierChasePrizes)||void 0===q?void 0:q.chasePrizes.plusChaseItems}getThreeTierUltraChaseItems(){var q;return null===(q=this._metaData.threeTierChasePrizes)||void 0===q?void 0:q.chasePrizes.ultraChaseItems}getThreeTierCoreLabels(){var q,K,z;return null!==(z=null===(K=null===(q=this._metaData.threeTierChasePrizes)||void 0===q?void 0:q.chasePrizeGroupLocalizationKeys)||void 0===K?void 0:K.coreLocalizationKeys.map((q=>this._localizer.getText(q))))&&void 0!==z?z:dt.A.CHASE_PRIZE_GROUP_LOC_KEYS.coreLocalizationKeys.map((q=>this._localizer.getText(q)))}getThreeTierPlusLabels(){var q,K,z;return null!==(z=null===(K=null===(q=this._metaData.threeTierChasePrizes)||void 0===q?void 0:q.chasePrizeGroupLocalizationKeys)||void 0===K?void 0:K.plusLocalizationKeys.map((q=>this._localizer.getText(q))))&&void 0!==z?z:dt.A.CHASE_PRIZE_GROUP_LOC_KEYS.plusLocalizationKeys.map((q=>this._localizer.getText(q)))}getThreeTierUltraLabels(){var q,K,z;return null!==(z=null===(K=null===(q=this._metaData.threeTierChasePrizes)||void 0===q?void 0:q.chasePrizeGroupLocalizationKeys)||void 0===K?void 0:K.ultraLocalizationKeys.map((q=>this._localizer.getText(q))))&&void 0!==z?z:dt.A.CHASE_PRIZE_GROUP_LOC_KEYS.ultraLocalizationKeys.map((q=>this._localizer.getText(q)))}getThreeTierCoreAnimatedPets(){var q;return null===(q=this._metaData.threeTierChasePrizes)||void 0===q?void 0:q.chasePrizeAnimatedPets.corePets}getThreeTierPlusAnimatedPets(){var q;return null===(q=this._metaData.threeTierChasePrizes)||void 0===q?void 0:q.chasePrizeAnimatedPets.plusPets}getThreeTierUltraAnimatedPets(){var q;return null===(q=this._metaData.threeTierChasePrizes)||void 0===q?void 0:q.chasePrizeAnimatedPets.ultraPets}getBattlePassChasePets(){const q=new Set,K=K=>{null==K||K.forEach((K=>{"pet"===K.type&&q.add(K.id)}))};return K(this.getChasePrizes()),K(this.getChasePetsLevelUp()),K(this.getChasePetsUltimate()),q}}ut.DEFAULT_MAGICOIN_AMOUNT=1600,(0,Y.Cg)([(0,rt.b)("9fe-5b45"),(0,Y.Sn)("design:type",Object)],ut.prototype,"_featureProvider",void 0),(0,Y.Cg)([(0,rt.b)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],ut.prototype,"_localizer",void 0)},38156:(q,K,z)=>{"use strict";z.d(K,{n:()=>st});var Y=z(8674),Q=z(62459),X=z(28344),Z=z(63011),J=z(66582),tt=z(35120),et=z(76277),it=z(44094);class st{static hasBattlePassAccess(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("11f-118a"),K=(0,et.G)(X.y).enabled,z=yield q.meetsRequirements(70);return!K||z}))}static getQuestDescriptionFromDefinition(q){var K,z;return this.getQuestDescription(null!==(z=null===(K=q.metadata)||void 0===K?void 0:K.questGoalName)&&void 0!==z?z:q.completionRequirements.type,q.completionRequirements.data.target,q.localizationKey)}static getQuestDescription(q,K,z){const Y=null!=z?z:`BATTLE_PASS_QUEST_${q.replace(/ /g,"").toUpperCase()}`,X=tt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);let Z;return Z=(null==X?void 0:X.hasText(Y))?X.getText(Y,K):`${it.$.toTitleCase(q)} x${K}`,Z.trim().replace(/ +/g," ")}static playerMembershipMeetsRewardMembership(q){const K=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=K.hasMembership(),Y=K.hasMembershipFeatureAccess(Z.D.ULTIMATE_MEMBERBOX);return!(!z||!Y)||(z&&!Y?!(q===J._$.MemberUltimateMath||q===J._$.MemberUltimateBundle):q===J._$.NonMember)}}},1959:(q,K,z)=>{"use strict";z.d(K,{A:()=>Y});class Y{}Y.CHASE_PRIZES={coreChaseItems:[{id:11,type:"currency"},{id:139,type:"follow"},{id:181,type:"follow"},{id:27,type:"currency"}],plusChaseItems:[{id:171,type:"pet"},{id:139,type:"follow"},{id:181,type:"follow"},{id:300,type:"follow"},{id:39,type:"petHat"},{id:41,type:"petHat"},{id:27,type:"currency"},{id:27,type:"currency"}],ultraChaseItems:[{id:171,type:"pet"},{id:243,type:"pet"},{id:39,type:"petHat"},{id:41,type:"petHat"},{id:139,type:"follow"},{id:181,type:"follow"},{id:300,type:"follow"},{id:13,type:"mount"},{id:1,type:"currency"},{id:1,type:"currency"},{id:11,type:"currency"},{id:11,type:"currency"}]},Y.CHASE_PRIZE_GROUP_LOC_KEYS={coreLocalizationKeys:["CORE_SHARDS","TT_CHASE_PRIZE_CORE_BUDDIES","350"],plusLocalizationKeys:["TT_CHASE_PRIZE_PLUS_MYTHICS!","TT_CHASE_PRIZE_PLUS_BUDDIES!","TT_CHASE_PRIZE_PLUS_PET_GEAR","720"],ultraLocalizationKeys:["TT_CHASE_PRIZE_ULTRA_NEW_MYTHICS","TT_CHASE_PRIZE_ULTRA_PET_GEAR","TT_CHASE_PRIZE_ULTRA_MORE_BUDDIES","TT_CHASE_PRIZE_ULTRA_MOUNT","TT_CHASE_PRIZE_ULTRA_EVEN_MORE"]},Y.MAGICOIN_COUNT_TO_DISPLAY=1600},90817:(q,K,z)=>{"use strict";z.d(K,{cM:()=>Q,gz:()=>nt});var Y,Q,X=z(8674),Z=z(62459),J=z(35120),tt=z(73797),et=z(96810),it=z(90633),st=z(44094);!function(q){q.FtueAdvanceCallback="CAMPAIGN_REPLAY_FTUE_ADVANCE_CALLBACK",q.HardModeFtueStep="CAMPAIGN_REPLAY_HARD_MODE_FTUE_STEP"}(Y||(Y={})),function(q){q.NOT_STARTED="NOT_STARTED",q.STEP_1_NOOT_DIALOGUE_INTRO="STEP_1_NOOT_DIALOGUE_INTRO",q.STEP_2_CLICK_ON_DIFFICULTY_SELECTOR="STEP_2_CLICK_ON_DIFFICULTY_SELECTOR",q.STEP_3_CLICK_ON_HARD_MODE_UNLOCK="STEP_3_CLICK_ON_HARD_MODE_UNLOCK",q.STEP_4A_REQUIREMENTS_NOT_MET_CLICK_CLOSE="STEP_4A_REQUIREMENTS_NOT_MET_CLICK_CLOSE",q.STEP_5A_CLOSE_DIFFICULTY_SELECTOR="STEP_5A_CLOSE_DIFFICULTY_SELECTOR",q.STEP_6A_RESUME_WORLD_MAP_NORMAL="STEP_6A_RESUME_WORLD_MAP_NORMAL",q.STEP_4B_REQUIREMENTS_MET_CLICK_CLOSE="STEP_4B_REQUIREMENTS_MET_CLICK_CLOSE",q.STEP_5B_ENTER_HARD_MODE="STEP_5B_ENTER_HARD_MODE",q.STEP_6B_CONFIRM_ENTER_HARD_MODE="STEP_6B_CONFIRM_ENTER_HARD_MODE",q.STEP_7B_NOOT_HARD_MODE_INTRO="STEP_7B_NOOT_HARD_MODE_INTRO",q.STEP_8B_ENTER_FIREFLY_HARD_MODE="STEP_8B_ENTER_FIREFLY_HARD_MODE"}(Q||(Q={}));class nt{constructor(){this.onFtueResolved=new Z.HN0,this._funnelId=st.$.generateUID()}static get initialized(){return Z.Aq$.isDefined(this._instance)}static get instance(){var q;return null!==(q=this._instance)&&void 0!==q?q:this._instance=new nt}beginHardModeFtue(){return(0,X.sH)(this,void 0,void 0,(function*(){yield J.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirements(59);this._currentStep=0,this._stepPath=nt.HARD_MODE_FTUE_STEPS,J.q.instance.prodigy.gameContainer.rebind(Y.FtueAdvanceCallback).toConstantValue(this.advanceFtueStep.bind(this)),this.advanceFtueStep()}))}beginHardModeFirstEntryExperience(){this._currentStep=0,this._stepPath=nt.HARD_MODE_FTUE_STEPS_ENTRY_ONLY,J.q.instance.prodigy.gameContainer.rebind(Y.FtueAdvanceCallback).toConstantValue(this.advanceFtueStep.bind(this)),J.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(it.B.FEATURE_CAMPAIGN_REPLAY,it.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED),this.advanceFtueStep()}advanceFtueStep(){this._currentStep++,this._currentStep>=this._stepPath.length?Z.VyI.log("CampaignReplayFtueSessionTracker: FTUE session reached the end of the path",Z.$bb.Info):(J.q.instance.prodigy.gameContainer.rebind(Y.HardModeFtueStep).toConstantValue(this._stepPath[this._currentStep]),J.q.instance.game.broadcaster.broadcast(tt.sn.HardModeFtueStepAdvanced,void 0,[this._stepPath[this._currentStep]]),this.handleFtueStepAnalytics(this._stepPath[this._currentStep]),Z.VyI.log(`Advancing FTUE step: ${this._stepPath[this._currentStep]}`,Z.$bb.Info))}cancelSession(){Z.VyI.log("CampaignReplayFtueSessionTracker: FTUE session canceled",Z.$bb.Info),J.q.instance.game.broadcaster.broadcast(tt.sn.HardModeFtueCanceled),this.onFtueResolved.dispatch(),this.destroy()}completeFtue(q){Z.VyI.log("CampaignReplayFtueSessionTracker: FTUE session completed",Z.$bb.Info),J.q.instance.game.broadcaster.broadcast(tt.sn.HardModeFtueCompleted),J.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(it.B.FEATURE_CAMPAIGN_REPLAY,it.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED),this.onFtueResolved.dispatch(),this.sendAnalyticsStepEvent(et.l.CampaignReplayFtueEnterHardMode,7),q&&J.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(it.B.FEATURE_CAMPAIGN_REPLAY,it.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE),this.destroy()}handleFtueStepAnalytics(q){switch(q){case Q.STEP_1_NOOT_DIALOGUE_INTRO:this.sendAnalyticsStepEvent(et.l.CampaignReplayFtueMapScreenOpened,3);break;case Q.STEP_3_CLICK_ON_HARD_MODE_UNLOCK:this.sendAnalyticsStepEvent(et.l.CampaignReplayFtueModal,4);break;case Q.STEP_4B_REQUIREMENTS_MET_CLICK_CLOSE:this.sendAnalyticsStepEvent(et.l.CampaignReplayFtueRestrictions,5),this.sendAnalyticsStepEvent(et.l.CampaignReplayFtueQualifyForHardMode,6)}}sendAnalyticsStepEvent(q,K){const z=J.q.instance.prodigy.gameContainer.get("20f-5f67"),Y={funnelName:"campaign_replay_ftue",funnelType:"tutorial",funnelId:this._funnelId,stepName:q},Q={step_index:K};z.playerProgression.sendFunnelAdvancedEvent(Y,Q)}destroy(){this.onFtueResolved.dispose(),J.q.instance.prodigy.gameContainer.unbind(Y.FtueAdvanceCallback),J.q.instance.prodigy.gameContainer.unbind(Y.HardModeFtueStep),this._funnelId=null,nt._instance=null}}nt.HARD_MODE_FTUE_STEPS=[Q.NOT_STARTED,Q.STEP_1_NOOT_DIALOGUE_INTRO,Q.STEP_2_CLICK_ON_DIFFICULTY_SELECTOR,Q.STEP_5B_ENTER_HARD_MODE,Q.STEP_6B_CONFIRM_ENTER_HARD_MODE,Q.STEP_7B_NOOT_HARD_MODE_INTRO,Q.STEP_8B_ENTER_FIREFLY_HARD_MODE],nt.HARD_MODE_FTUE_STEPS_ENTRY_ONLY=[Q.STEP_6B_CONFIRM_ENTER_HARD_MODE,Q.STEP_7B_NOOT_HARD_MODE_INTRO,Q.STEP_8B_ENTER_FIREFLY_HARD_MODE]},90975:(q,K,z)=>{"use strict";z.d(K,{Y:()=>tt});var Y=z(90633),Q=z(93867),X=z(84399),Z=z(35120),J=z(40295);class tt{static meetsNarrativeIntroRequirements(){return X.R.isFeatureEnabled()&&Q.U.isStepComplete(J.B.PuppetMasterDefeated)&&!Z.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Y.B.FEATURE_CAMPAIGN_REPLAY,Y.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN)}static meetsNarrativeCatchupRequirements(){const q=Z.q.instance.prodigy.gameContainer.get("782-c308");return X.R.isFeatureEnabled()&&q.getChargedLevel()>0&&!Q.U.isStepComplete(J.B.PuppetMasterDefeated)&&!Z.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Y.B.FEATURE_CAMPAIGN_REPLAY,Y.B.BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN)}static meetsEitherCutsceneRequirement(){return tt.meetsNarrativeIntroRequirements()||tt.meetsNarrativeCatchupRequirements()}}},2212:(q,K,z)=>{"use strict";z.d(K,{J:()=>dt});var Y=z(62459),Q=z(99625),X=z(47708),Z=z(97495),J=z(40295),tt=z(90633),et=z(73678),it=z(35120),st=z(40392),nt=z(13021),at=z(30226),rt=z(93867),ot=z(84399),ht=z(55122),ct=z(90975);class dt{static shouldShowHardModeUnlockedPopup(){const q=it.q.instance.prodigy.breadcrumbManager,K=it.q.instance.prodigy.gameContainer.get("11f-118a");return ot.R.isFeatureEnabled()&&!q.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN)&&!q.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE)&&K.meetsRequirementsDeprecated(59)}static shouldShowExpertModeUnlockedPopup(){const q=it.q.instance.prodigy.breadcrumbManager,K=it.q.instance.prodigy.gameContainer.get("11f-118a");return ot.R.isFeatureEnabled()&&!q.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN)&&!q.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE)&&K.meetsRequirementsDeprecated(60)}static showDifficultyUnlockedPopup(q,K=(()=>null)){if(q===Z.i.Regular)return Y.VyI.log("There is no difficulty unlocked popup for regular difficulty",Y.$bb.Warning),void K();const z=it.q.instance.prodigy.breadcrumbManager;it.q.instance.prodigy.open.prefabMenu(Q.l.DifficultyUnlockedModal,K,!0,!0,!1,{DifficultyMode:q});const X=q===Z.i.Hard?tt.B.BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN:tt.B.BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN;z.completeBreadcrumb(tt.B.FEATURE_CAMPAIGN_REPLAY,X),dt.sendDifficultyUnlockedEvent(q)}static sendFeatureUnlockedEvent(q,K,z){const Y={feature_name:q,feature_type:K,lock_type:z};it.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFeatureUnlockedEvent(Y)}static sendDifficultyUnlockedEvent(q){this.sendFeatureUnlockedEvent(`${q}-mode`,"difficulty-mode","player-level")}static get meetsNarrativeIntroRequirements(){return ct.Y.meetsNarrativeIntroRequirements()}static get meetsNarrativeCatchupRequirements(){return ct.Y.meetsNarrativeCatchupRequirements()}static get shouldClearChargedLevels(){if(ct.Y.meetsEitherCutsceneRequirement())return!1;return it.q.instance.prodigy.gameContainer.get("782-c308").hasChargedLevelsEnabled()}static canShowNarrativeIntro(q){if(!q)return!1;const K=q.split("-")[0];return(at.J.isCoreZone(K)||K===et.A_.HOUSE||K===et.A_.LAMPLIGHT)&&"lamplight-B3"!==q&&(this.meetsNarrativeIntroRequirements||this.meetsNarrativeCatchupRequirements)}static shouldShowWorldMapHardModeFtue(){return it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN)&&!it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED)}static shouldShowWorldMapHardModeFirstEntryDialogue(){const q=st.i.DIFFICULTY_MODE===Z.i.Hard,K=it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED),z=!it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE);return q&&K&&z}static hasStartedHardModeFirstEntryDialogueButNeverCompleted(){const q=it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED),K=!it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE),z=it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED);return q&&K&&z}static getHighestUnlockedDifficulty(){const q=it.q.instance.prodigy.gameContainer.get("11f-118a");return q.meetsRequirementsDeprecated(60)?Z.i.Expert:q.meetsRequirementsDeprecated(59)?Z.i.Hard:Z.i.Regular}static featureDataHealthCheck(){const q=it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_CAMPAIGN_REPLAY,tt.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN),K=it.q.instance.prodigy.gameContainer.get("782-c308").data.campaignReplayProgressStep;if(q&&K===X.q6.NotStarted){it.q.instance.prodigy.gameContainer.get("66f-d9d3").setProgress({step:X.q6.HardModeIntroduced})}}static shouldShowHardModePbfBannerWarning(){var q;const K=it.q.instance.prodigy.gameContainer.get("782-c308");return ot.R.isFeatureEnabled()&&!rt.U.isStepComplete(J.B.PuppetMasterDefeated)&&!1===(null===(q=K.difficultyUnlocks)||void 0===q?void 0:q.hard)&&K.getLevel()===ht.s.maxLevelConfig.regular}static isZoneMapDifficultyModeAgnostic(q){const K=q.split("-")[0],z=it.q.instance.prodigy.world.getZone(K);return!0===(null==z?void 0:z.difficultyModeAgnostic)||nt.w.isTitanMap(q)}}},72379:(q,K,z)=>{"use strict";z.d(K,{g:()=>lt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(99625),J=z(63011),tt=z(38170),et=z(35120),it=z(1195),st=z(19586),nt=z(96494),at=z(90633),rt=z(13956),ot=z(84642),ht=z(35571),ct=z(84399),dt=z(55122);let lt=class{get chargedLevelsProgressData(){return this._chargedLevelsProgressData}get showedThisSession(){return this._showedThisSession}get hasAccessToChargedLevels(){return this._loggedInPlayer.player.getLevel()>=dt.s.activePlayerLevelCap&&!this.isAboutToStartHardMode}get isPlayerInGoodStanding(){return this._chargedLevelsProgressData.chargedLevel>0}get isLosingLevels(){var q;return(null===(q=this._chargedLevelsProgressData)||void 0===q?void 0:q.recuperableXp)>0}get isAboutToStartHardMode(){return ct.R.isFeatureEnabled()&&this._featureRequirements.meetsRequirementsDeprecated(66)}get shouldShowRetention(){return ot.x.arePopupsEnabled&&this.hasAccessToChargedLevels&&!this._showedThisSession&&this.isLosingLevels}get shouldShowConversionModal(){var q,K;const z=this.hasAccessToChargedLevels&&!this._loggedInPlayer.player.hasMembershipFeatureAccess(J.D.CHARGED_LEVELS_DECAY_IMMUNITY)&&null!==(K=null===(q=this._loggedInPlayer.player.data.chargedLevelData)||void 0===q?void 0:q.hasJustReachedConversionMilestone)&&void 0!==K&&K;return this._loggedInPlayer.player.data.chargedLevelData.hasJustReachedConversionMilestone=!1,z}get shouldShowDecayImmunityModal(){var q;const K=this._loggedInPlayer.player.hasMembershipFeatureAccess(J.D.CHARGED_LEVELS_DECAY_IMMUNITY),z=this.hasAccessToChargedLevels&&K&&Q.Aq$.isDefined(null===(q=this._loggedInPlayer.player.data.chargedLevelData)||void 0===q?void 0:q.decayImmunityExpiryDate)&&!this._breadcrumbManager.isBreadcrumbComplete(at.B.FEATURE_CHARGED_LEVELS,at.B.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN);return!K&&this._breadcrumbManager.isBreadcrumbComplete(at.B.FEATURE_CHARGED_LEVELS,at.B.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN)&&this._breadcrumbManager.resetBreadcrumb(at.B.FEATURE_CHARGED_LEVELS,at.B.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN),z}get shouldShowDecayImmunityNotification(){var q,K,z;const Y=new Date,Q=new Date(null===(q=this.chargedLevelsProgressData)||void 0===q?void 0:q.decayImmunityExpiryDate),X=tt.r.daysBetween(Y,Q);if(Y.getTime()>=Q.getTime()||isNaN(X)||X<=0)return!1;return this._loggedInPlayer.player.hasMembershipFeatureAccess(J.D.CHARGED_LEVELS_DECAY_IMMUNITY)&&(null!==(z=null===(K=this._loggedInPlayer.player.data.unsecureChargedLevelData)||void 0===K?void 0:K.decayImmunityNotificationDays)&&void 0!==z?z:0)!==X&&!this.shouldShowDecayImmunityModal}init(q){this._chargedLevelsProgressData=q,this._loggedInPlayer.player.setChargedLevelsData(q)}abandonChargedLevelLosses(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._loggedInPlayer.player,K=q.getStars(),{chargedLevel:z,chargedLevelCumulativeXp:Y}=q.data.chargedLevelData,Q=yield this._chargedLevelsNetworkHandler.abandonChargedLevelLosses();q.setChargedLevelsData(Q);et.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Charged Level",progressionAction:"charge_reset",progressionValue:`${z}`,creatureName:"Player"},{pointType:"stars",pointCount:K+Y})}))}recuperateChargedLevelLosses(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=this._loggedInPlayer.player,Y=z.getStars(),{chargedLevel:Q,chargedLevelXpForCurrentLevel:X}=z.data.chargedLevelData,Z=yield this._chargedLevelsNetworkHandler.recuperateChargedLevelLosses();this._loggedInPlayer.player.setChargedLevelsData(Z);et.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Charged Level",progressionAction:"charge_renewed",progressionValue:`${Q}`,creatureName:"Player",currencyType:q,currencyAmount:K},{pointType:"stars",pointCount:X+Y})}))}showChargedLevelsRetentionModal(q){if(!this.shouldShowRetention)return void q();this._showedThisSession=!0;const K=this._loggedInPlayer.player.playerContainer;(null==K?void 0:K.isFacingLeft())&&K.flip(),this.showModal(Z.l.Charged_level_retention,q)}showChargedLevelsConversionModal(q){this.showModal(Z.l.ContextualPrompt_ChargedLevelsUltraUpsell,q)}showChargedLevelsDecayImmunityModal(q){this.showModal(Z.l.ChargedLevelsDecayImmunityModal,q)}showChargedLevelsDecayImmunityNotification(){var q;const K=new Date,z=new Date(null===(q=this.chargedLevelsProgressData)||void 0===q?void 0:q.decayImmunityExpiryDate),Y=tt.r.daysBetween(K,z);if(K.getTime()>=z.getTime()||isNaN(Y)||Y<=0)return;const X=et.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),Z=X.getText("CHARGED_LEVEL_DECAY_IMMUNITY_NOTIFICATION_TITLE"),J=X.getText("CHARGED_LEVEL_DECAY_IMMUNITY_NOTIFICATION_BODY",Y,1===Y?"":"s");et.q.instance.prodigy.notifications.initGenericNotification(st._.CHARGEDLEVELFREEZECOUNTDOWN,{modal:{action:"",title:Z,body:J}}),this._loggedInPlayer.player.data.unsecureChargedLevelData.decayImmunityNotificationDays=Y,this._loggedInPlayer.player.forceSaveCharacter()}showModal(q,K){et.q.instance.prodigy.open.prefabMenu(q,K).createContainer=!1}};(0,Y.Cg)([(0,rt.b)("d94-655c"),(0,Y.Sn)("design:type",ht.e)],lt.prototype,"_chargedLevelsNetworkHandler",void 0),(0,Y.Cg)([(0,rt.b)("ad2-c5b2"),(0,Y.Sn)("design:type",it.E)],lt.prototype,"_loggedInPlayer",void 0),(0,Y.Cg)([(0,rt.b)("fa1-8ec9"),(0,Y.Sn)("design:type",nt.F)],lt.prototype,"_breadcrumbManager",void 0),(0,Y.Cg)([(0,rt.b)("11f-118a"),(0,Y.Sn)("design:type",Object)],lt.prototype,"_featureRequirements",void 0),lt=(0,Y.Cg)([(0,X.injectable)()],lt)},37773:(q,K,z)=>{"use strict";z.d(K,{e:()=>Z});var Y=z(35120),Q=z(55122),X=z(97317);class Z{static getActivePlayerChargedLevelTier(){const q=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return this.getPlayerChargedLevelTier(q)}static get activePlayerHasChargedLevels(){return Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getChargedLevel()>0}static getPlayerChargedLevelTier(q){return this.getChargedLevelTierFromLevel(q.getChargedLevel())}static getChargedLevelTierFromLevel(q){return q>=X.QT.MAX_NONMEMBER_CHARGED_LEVEL?X.Bv.MAX_CHARGE:q>=1?X.Bv.CHARGED:X.Bv.NO_CHARGE}static formatDuelOpponentChargedLevel(q){const K=Q.s.maxLevelConfig.regular;if(q.data.level>K){const z=q.data.level-K;q.data.chargedLevelData={chargedLevel:z,chargedLevelCap:z},q.data.level=K}}}},34578:(q,K,z)=>{"use strict";var Y;z.d(K,{m:()=>Y}),function(q){q.ChargedLevelAnimationTier="CHARGED_LEVEL_ANIMATION_TIER",q.ShowChargedLevels="SHOW_CHARGED_LEVELS",q.Retention="CHARGED_LEVELS_RETENTION"}(Y||(Y={}))},97317:(q,K,z)=>{"use strict";var Y,Q,X;z.d(K,{Bv:()=>Y,QT:()=>X,Vh:()=>Z,X$:()=>Q}),function(q){q.NO_CHARGE="NO_CHARGE",q.CHARGED="CHARGED",q.MAX_CHARGE="MAX_CHARGE"}(Y||(Y={})),function(q){q.HIDDEN="HIDDEN",q.IDLE="IDLE",q.REVEAL_TO_IDLE="REVEAL_TO_IDLE",q.CHARGE_LOST="CHARGE_LOST",q.CHARGE_KEPT="CHARGE_KEPT"}(Q||(Q={})),function(q){q[q.MAX_NONMEMBER_CHARGED_LEVEL=25]="MAX_NONMEMBER_CHARGED_LEVEL",q[q.MAX_MEMBER_CHARGED_LEVEL=50]="MAX_MEMBER_CHARGED_LEVEL"}(X||(X={}));const Z="#068200"},65732:(q,K,z)=>{"use strict";var Y;z.d(K,{E:()=>Y}),function(q){q.PlayerChargedLevel="PLAYER_CHARGED_LEVEL",q.PlayerChargedLevelCap="PLAYER_CHARGED_LEVEL_CAP",q.ChargedCreatureEffectTier="CHARGED_CREATURE_EFFECT_TIER",q.ChargedCreatureEffectDisplayType="CHARGED_CREATURE_EFFECT_DISPLAY_TYPE",q.ChargeRevealEffectEnabled="CHARGE_REVEAL_EFFECT_ENABLED",q.MemberRetentionGroup="MEMBER_RETENTION_GROUP",q.ShowXpBar="CHARGED_LEVELS_SHOW_XP_BAR",q.ShowTierUp="CHARGED_LEVELS_SHOW_TIER_UP",q.LevelTierIdleAnimation="CHARGED_LEVELS_TIER_IDLE_ANIMATION",q.LevelTierUpgradeAnimation="CHARGED_LEVELS_TIER_UPGRADE_ANIMATION"}(Y||(Y={}))},47969:(q,K,z)=>{"use strict";z.d(K,{m:()=>nt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(35537),J=z(95891),tt=z.n(J);let et=class{constructor(){this._cooldowns=Promise.resolve({})}get cache(){return this._cooldowns.then((q=>tt().clone(q)))}isCooldownActive(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.getCooldownTimestamp(q);if(void 0===K)return!1;return K>(yield this.getTimeNow())}))}isCooldownExpired(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.getCooldownTimestamp(q);if(void 0===K)return!1;return K<=(yield this.getTimeNow())}))}getCooldownRemainingTime(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.getCooldownTimestamp(q);if(void 0===K)return 0;const z=yield this.getTimeNow();return Math.max(0,K-z)}))}getCooldownTimestamp(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.isValidCooldownKey(q))return(yield this._cooldowns)[q]}))}isValidCooldownKey(q){return tt().isString(q)?!tt().isEmpty(q)||(this.logError("[BaseCooldownDataProvider] Invalid cooldown key: Cooldown key cannot be an empty string."),!1):(this.logError("[BaseCooldownDataProvider] Invalid cooldown key: Cooldown key must be a string. Got: "+typeof q),!1)}};et=(0,Y.Cg)([(0,X.injectable)()],et);var it,st=z(69698);let nt=class extends et{constructor(){super(...arguments),this._cooldownRecord={},this[it]="cooldownChanges"}getTimeNow(){return this._timeManager.getServerTimeMs()}[(it=Z.sE,Z.JN)](q){return(0,Y.sH)(this,void 0,void 0,(function*(){Q.Aq$.isDefined(q.cooldowns)&&this.setCooldowns(q.cooldowns)}))}setCooldowns(q){this._cooldowns=Promise.resolve(q),this._cooldownRecord=q}logError(q){Q.VyI.log(`[CooldownsDataStore] ${q}`,Q.$bb.Error)}isCachedCooldownActive(q){const K=this._cooldownRecord[q];return void 0!==K&&K>Date.now()}};(0,Y.Cg)([(0,X.inject)("0f2-d6bd"),(0,Y.Sn)("design:type",st.V)],nt.prototype,"_timeManager",void 0),nt=(0,Y.Cg)([(0,X.injectable)()],nt)},29638:(q,K,z)=>{"use strict";z.d(K,{S:()=>J});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this.hideStartButton=!1}run(){this.hideStartButton?(this.startButton.active=!1,this._prefabLoader.loadWithDependenciesFromGUID(X.l.AdventureMap_ScrollViewLarge,this.gameObject).catch(Q.RQr.createHandler("Failed to load AdventureMapScrollBox"))):this._prefabLoader.loadWithDependenciesFromGUID(X.l.AdventureMap_ScrollViewSmall,this.gameObject).catch(Q.RQr.createHandler("Failed to load AdventureMapScrollBox"))}};(0,Y.Cg)([(0,Q.Cdj)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],J.prototype,"_prefabLoader",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"hideStartButton",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"startButton",void 0),J=(0,Y.Cg)([(0,Q.EVk)("InitAdventureMapScrollBox",Z.Y.adventureUi)],J)},48235:(q,K,z)=>{"use strict";z.d(K,{W:()=>st});var Y=z(8674),Q=z(62459),X=z(65240),Z=z(35120),J=z(73797),tt=z(48417),et=z(76546);class it extends et.D{checkMemberUpgradeReward(){return(0,Y.sH)(this,arguments,void 0,(function*(q={}){return this.makeCloudscriptRequest(tt.D.MembershipUpgradeReward.CheckMemberUpgradeReward,q,!1)}))}getCollectedRewardsData(){return(0,Y.sH)(this,arguments,void 0,(function*(q={}){return this.makeCloudscriptRequest(tt.D.MembershipUpgradeReward.GetCollectedRewardsData,q,!1)}))}collectMemberUpgradeReward(){return(0,Y.sH)(this,arguments,void 0,(function*(q={}){return this.makeCloudscriptRequest(tt.D.MembershipUpgradeReward.CollectMemberUpgradeReward,q,!1)}))}}class st{static get hasRewardAvailable(){var q;return null!==(q=this._hasRewardAvailable)&&void 0!==q&&q}static getCollectedRewardsData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.networkHandler.getCollectedRewardsData()}))}static checkMemberUpgradeReward(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.networkHandler.checkMemberUpgradeReward();return this._hasRewardAvailable=null==q?void 0:q.hasRewardAvailable,this.hasRewardAvailable}))}static collectMemberUpgradeReward(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=Z.q.instance.prodigy.gameContainer.get("20f-5f67").item.beginSecureItemTransaction(),K=yield this.networkHandler.collectMemberUpgradeReward();if(!Q.Aq$.isDefined(K))return Q.VyI.log("Member Upgrade Reward is empty",Q.$bb.Error),q.flush({}),[];const z=K.map((q=>{const{type:K,id:z,quantity:Y}=q;if(!(Y<=0))return{ID:z,type:K,N:Y}})).filter(Q.Aq$.isDefined);if(z.length>0){let q=!1;for(const K of z)if("currency"===K.type&&27===K.ID){q=!0;break}q&&Z.q.instance.game.broadcaster.broadcast(J.Lk.HardCurrencyPurchased)}return q.flush({source_type:X.C.ConversionOffer}),z}))}}st.networkHandler=new it},45024:(q,K,z)=>{"use strict";z.d(K,{e:()=>Z});var Y=z(35120),Q=z(62459),X=z(30226);class Z extends class{constructor(q,K,z,Y,Q,X){this.game=null,this.player=null,this.stateName=null,this.questId=0,this.defaultValue=null,this.completeValue=null,this.game=q,this.player=K,this.stateName=z,this.questId=Y,this.defaultValue=Q,this.completeValue=X}isInitialized(){return Q.Aq$.isDefined(this.player.state.get(this.stateName))}init(){this.player.state.set(this.stateName,{questId:this.questId,dateId:X.J.getDateId(),questState:this.defaultValue})}isComplete(){return this.player.state.get(`${this.stateName}-questState`)===this.completeValue}complete(){this.player.state.set(`${this.stateName}-questState`,this.completeValue)}hasDateIdChanged(){return X.J.getDateId()!==this.player.state.get(`${this.stateName}-dateId`)}}{constructor(q,K){super(q,K,Z.data.stateName,Z.data.questId,Z.data.defaultValue,Z.data.completeDialogue)}getSpawn(){const q=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=(new Date).getDate()+q.getLatestClassIDLegacy();return this.game.seededRandom.pick(Z.data.spawns,K)}}Z.data={stateName:"world-dailyQuests-0",questId:0,defaultValue:0,completeValue:1,completeDialogue:8,bonusStars:10,spawns:[{location:"forest-B7",dialogue:3},{location:"skywatch-A0",dialogue:5},{location:"bonfire_spire-A1",dialogue:6},{location:"shipwreck_shore-C12",dialogue:7},{location:"shiverchill-A11",dialogue:7}]}},43518:(q,K,z)=>{"use strict";z.d(K,{M:()=>nt});var Y=z(8674),Q=z(28344),X=z(58776),Z=z(34829),J=z(7351),tt=z(76277),et=z(13956),it=z(69698),st=z(85985);class nt{static hasDailyLoginCalendarAccess(){return(0,Y.sH)(this,void 0,void 0,(function*(){return!(0,tt.G)(Q.y).enabled||this._featureRequirements.meetsRequirements(71)}))}static canAutoSurfaceDailyLoginCalendar(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._activePlayer.hasCompletedTutorial())return!1;if(!(yield nt.hasDailyLoginCalendarAccess()))return!1;if(!st.J.showDailyLoginCalendar())return!1;if(this._activePlayer.data.dailyLoginCalendarSuppress)return!1;const[q,K,z]=yield Promise.all([nt.isTaskReadyToCollect(),nt.hasStandardTrackEnded(),nt.hasUltimateTrackEnded()]);return q&&!K&&!z}))}static isTaskReadyToCollect(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this._timeManager.getServerTimeMs(),z=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate,Y=yield this.getProgressOfTaskInProgress(q);return Math.min(null!=Y?Y:z,z)<=K}))}static getProgressOfTaskInProgress(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;const Y=this._timeManager.getServerTimeMs(),Q=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack(),J=null!=q?q:Q.find((q=>q.taskProgress.status===X.t.IN_PROGRESS)),tt=null!==(z=null===(K=null==J?void 0:J.taskProgress.data)||void 0===K?void 0:K.progress)&&void 0!==z?z:0;return tt-Y>=2*Z.A.DAY_IN_MS?0:tt}))}static hasUltimateTrackEnded(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._timeManager.getServerTimeMs();return(yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrackMetadata()).endDate<=q}))}static hasStandardTrackEnded(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._timeManager.getServerTimeMs();return(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate<=q}))}}(0,Y.Cg)([(0,et.b)("782-c308"),(0,Y.Sn)("design:type",J.W)],nt,"_activePlayer",void 0),(0,Y.Cg)([(0,et.b)("0f2-d6bd"),(0,Y.Sn)("design:type",it.V)],nt,"_timeManager",void 0),(0,Y.Cg)([(0,et.b)("f33-d276"),(0,Y.Sn)("design:type",Function)],nt,"_dailyLoginCalendarQuestManager",void 0),(0,Y.Cg)([(0,et.b)("11f-118a"),(0,Y.Sn)("design:type",Object)],nt,"_featureRequirements",void 0)},10730:(q,K,z)=>{"use strict";z.d(K,{v:()=>X});var Y=z(35120),Q=z(88022);class X{constructor(q){this._dungeonStartRoomExitAreaEvent=null,this.id=q}setup(q){this._map=q;const K=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(0===this.id){q.toggleDynamicLayer(q.game,1,!0,0),this._dungeonStartRoomExitAreaEvent=q.addAreaEvent(q.game,q.screen,{x:640,y:180,w:120,h:120,canReTrigger:!0},null,null,null,(()=>{const z=K.backpack.hasItem("currency",18);Y.q.instance.prodigy.open.dungeonExitMenu(q.zone.ID,5,z,!1,null,(()=>{this.moveOffDungeonStartRoomExit()}))}));const z=Y.q.instance.prodigy.create.sprite(640,180,Q._.General_core_json,"empty",{x:.5,y:.5},null,200,200);z.events.onInputUp.add((()=>{q.walkToDoorway(640,220,null)})),z.alpha=0,z.inputEnabled=!0,q.screen.content.addChild(z)}else 1===this.id&&q.addAreaEvent(q.game,q.screen,{x:640,y:400,w:150,h:150,canReTrigger:!0},null,null,null,(()=>{const z=K.backpack.hasItem("currency",18);z<5?Y.q.instance.prodigy.open.dungeonExitMenu(q.zone.ID,5,z):q.zone.openWheel(q.screen,q.zone.prizeWheelId)}))}moveOffDungeonStartRoomExit(){if(!this._dungeonStartRoomExitAreaEvent)return;const q=this._map.screen.user;q.setValidPath(this._map.screen.path,this._dungeonStartRoomExitAreaEvent.x,q.y+q.height/2)}}},28930:(q,K,z)=>{"use strict";var Y;z.d(K,{O:()=>Y}),function(q){q[q.North=0]="North",q[q.East=1]="East",q[q.South=2]="South",q[q.West=3]="West"}(Y||(Y={}))},63343:(q,K,z)=>{"use strict";z.d(K,{E:()=>Z});var Y=z(62459),Q=z(35120),X=z(96810);class Z{static sendFunnelAdvancedEvent(q,K){const z=Q.q.instance.prodigy.gameContainer.get("20f-5f67"),Y=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;z.playerProgression.sendFunnelAdvancedEvent({funnelName:"Defeated Pets",funnelType:"dynamic_store",stepName:q,funnelId:Y.getDefeatedPetsData().featureFunnelId},{step_index:K},!0)}static recordDefeatedPetsFunnelStep(q){const K=Q.q.instance.prodigy.gameContainer.get("782-c308"),z=K.getDefeatedPetsData(),X=this.STEP_NAME_TO_INDEX[q];return!(!Y.Aq$.isDefined(X)||z.funnelStepsSeen[X])&&(z.funnelStepsSeen[X]=!0,K.setDefeatedPetsData(z),this.sendFunnelAdvancedEvent(q,X),!0)}}Z.STEP_NAME_TO_INDEX={[X.l.DynamicStoreDefeatedPet]:1,[X.l.DynamicStoreLostPetsMain]:2,[X.l.DynamicStoreLostPetsTab]:3,[X.l.DynamicStoreLostPetViewed]:4,[X.l.DynamicStoreLostPetPurchased]:5}},71391:(q,K,z)=>{"use strict";z.d(K,{D:()=>et});var Y=z(8674),Q=z(62459),X=z(17446),Z=z(8770),J=z(80060),tt=z(30226);let et=class extends Q.uAl{constructor(){super(...arguments),this.expectingMultipleAdditions=!1,this._isVisible=!1,this._index=0}create(){super.create();for(const q of this._labelsParent.children)q.active=!1}show(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._index=0,this._isVisible=!0,this._runningAddition=Promise.resolve(),this._show.playAnimation()}))}addPet(q){this._runningAddition=this._runningAddition.then((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return this.addAnimationSequence(q)})))).catch(Q.RQr.createHandler("Failed to animate added pet"))}hide(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this._isVisible){this._hide.playAnimation(),this._isVisible=!1;for(const q of this._labelsParent.children)q.active=!1}}))}addAnimationSequence(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K;0===this._index&&this._firstIncrementDecoration.playAnimation(),this._increment.playAnimation();const z=Q.Egh.timeout(this.findEventMillis(this._increment,"next"));if(this._index++,yield Q.Egh.timeout(this.findEventMillis(this._increment,"incrementCounter")),this._index<=this._labelsParent.children.length){const z=null!==(K=q.rarity)&&void 0!==K?K:X.E.Common,Y=this._labelsParent.children[this._index-1];Y.active=!0,J.d.updateInjectedValues(Y,{LABEL_TEXT:`${tt.J.convertRarityToText(z)}!`,LABEL_FILL:Q.TZp.decimalToHex(Z.TZ.lerpRgb(Z.Hh[z],Q.yQ0.WHITE,this._labelFillWhiteMix)),LABEL_STROKE:Q.TZp.decimalToHex(Z.TZ.lerpRgb(Z.Hh[z],Q.yQ0.BLACK,this._labelStrokeBlackMix)),LABEL_USE_FAST_IN:this.expectingMultipleAdditions})}else Q.VyI.log("Attempted to display way too many defeated pet rarities",Q.$bb.Warning);yield z}))}findEventMillis(q,K){var z;const Y=q.timeline.tweens.find((q=>{var z;return(null===(z=q.customData)||void 0===z?void 0:z.eventName)===K}));return Y?1e3*(null!==(z=Y.how.delay)&&void 0!==z?z:0):0}};(0,Y.Cg)([(0,Q.MnK)(Q.bTj),(0,Q.YLv)("Animation to display the icon, played before any additions start"),(0,Y.Sn)("design:type",Q.bTj)],et.prototype,"_show",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.bTj),(0,Q.YLv)("Animation to hide the icon, played after all additions end"),(0,Y.Sn)("design:type",Q.bTj)],et.prototype,"_hide",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.bTj),(0,Q.YLv)("Played alongside the first addition after showing"),(0,Y.Sn)("design:type",Q.bTj)],et.prototype,"_firstIncrementDecoration",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.bTj),(0,Q.YLv)("Played on each addition, in sequence. \nThe timeline should have two steps with a customData.eventName of: \nnext: Moment when the next addition should start\nincrementCounter: Moment when the counter text should update"),(0,Y.Sn)("design:type",Q.bTj)],et.prototype,"_increment",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Q.YLv)("Object containing a bunch of labels, which will be enabled in sequence as the counter updates"),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_labelsParent",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Q.YLv)("Portion of white to mix with the rarity color for the label text fill"),(0,Y.Sn)("design:type",Number)],et.prototype,"_labelFillWhiteMix",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Q.YLv)("Portion of black to mix with the rarity color for the label text stroke/outline"),(0,Y.Sn)("design:type",Number)],et.prototype,"_labelStrokeBlackMix",void 0),et=(0,Y.Cg)([(0,Q.EVk)("DefeatedPetsBattleIcon")],et)},76016:(q,K,z)=>{"use strict";z.d(K,{P:()=>Y});var Y,Q=z(8674),X=z(62459),Z=z(64270),J=z(15821),tt=z(26932),et=z(13956),it=z(64868);!function(q){q.Available="DYNAMIC_STORE_ACCESS_POINT_AVAILABLE",q.HasNotification="DYNAMIC_STORE_ACCESS_POINT_HAS_NOTIFICATION",q.WantsAttention="DYNAMIC_STORE_ACCESS_POINT_WANTS_ATTENTION",q.MillisecondsRemaining="DYNAMIC_STORE_ACCESS_POINT_MILLISECONDS_REMAINING",q.StoreClosedCallback="DYNAMIC_STORE_ACCESS_POINT_STORE_CLOSED",q.JustSeenSegmentedOfferPopup="DYNAMIC_STORE_ACCESS_POINT_JUST_SEEN_SEGMENTED_OFFER_POPUP"}(Y||(Y={}));let st=class extends tt.z{bindContext(){const q=it._.hasDefeatedPetStore();this.updateValue(Y.Available,q),q&&(this.updateValue(Y.HasNotification,!1),this.updateValue(Y.StoreClosedCallback,(()=>{this.refresh().catch(X.RQr.createHandler("Failed to update dynamic store access point"))})),this.refresh().catch(X.RQr.createHandler("Failed to initialize dynamic store access point")))}unbindContext(){this.updateValue(Y.Available,!1),this.updateValue(Y.WantsAttention,!1),this.updateValue(Y.HasNotification,!1),this.updateValue(Y.MillisecondsRemaining,null),this.updateValue(Y.StoreClosedCallback,null)}refresh(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z;const{store:Q,offerReadById:X}=(yield this._dynamicStore.getDynamicStoreUIData({storeKey:Z.GA.PetShop})).expect("failed to get store data"),tt=Object.values(X).some((q=>!q));this.updateValue(Y.HasNotification,tt);const et=Q.sections.find((q=>q.id===Z.Xx.DefeatedPets));if(J.A.isDefined(et)&&(null!==(K=null===(q=et.offers)||void 0===q?void 0:q.length)&&void 0!==K?K:0)>0){const q=(null!==(z=et.expiresAt)&&void 0!==z?z:0)-Date.now();q>0&&this.updateValue(Y.MillisecondsRemaining,q)}}))}};(0,Q.Cg)([(0,et.b)("7a9-ac2f"),(0,Q.Sn)("design:type",Object)],st.prototype,"_dynamicStore",void 0),st=(0,Q.Cg)([(0,X.EVk)("DynamicStoreAccessPoint")],st)},77992:(q,K,z)=>{"use strict";z.d(K,{W:()=>Bt});var Y,Q=z(8674),X=z(62459),Z=z(88022),J=z(99625),tt=z(34656),et=z(64270),it=z(39324),st=z(58776),nt=z(8394),at=z(66582),rt=z(88131),ot=z(15821),ht=z(35120),ct=z(83133),dt=z(94566),lt=z(77938),ut=z(28047),ft=z(85540),bt=z(43858),pt=z(46784),vt=z(65050),gt=z(41674),mt=z(90744),yt=z(13956),_t=z(642),Et=z(95057),wt=z(16847),Tt=z(21097),St=z(79424),At=z(89192),Ct=z(53661),Ot=z(88217),It=z(77713),Dt=z(11191),Rt=z(10711),Pt=z(6719),Mt=z(80060),Nt=z(86283),xt=z(64868),Lt=z(55080),kt=z(96797);let Bt=Y=class extends ut.v{constructor(){super(...arguments),this.onPurchaseStarted=this.createTidySignal(),this.onPurchaseFinished=this.createTidySignal(),this.onPurchaseFailed=this.createTidySignal(),this.onTabSelected=this.createTidySignal(),this.onItemSelected=this.createTidySignal(),this.onWalletsLoaded=this.createTidySignal(),this.onStoreLoaded=this.createTidySignal(),this.onStoreSelected=this.createTidySignal(),this._selectedCardData=null,this._walletsLoading=!1}create(){super.create(),this._walletsLoading=!0}postCreate(){super.postCreate(),this.addListenerToSignal(this._tabSpawner.onPrefabSpawned,(q=>this.onTabLoaded(q))),this._gameNativeAppNotificationProvider.triggerNotification({id:it.fK.ShopVisitNotification})}initialize(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q,Z,it,st,nt,at,rt,dt,lt;if(!ot.A.isDefined(q))return void X.VyI.log("Dynamic Store: Error initializing store: no valid data",X.$bb.Error);this._shelfScrollLink.scrollToTop(),this._data=q;const{store:ut,offerReadById:ft,specialOffer:pt,storeKey:vt}=q,{sections:gt}=ut;null===(K=this.headerNavigation)||void 0===K||K.setSelectedTabForKey(null!=vt?vt:"");const mt=[],yt=[];for(const q of gt){const{offers:K}=q;!tt.j.specialOfferSectionHasContent(q,pt)&&(0,Rt.ty)(q)||(mt.push(this.createInjectedTabData(q,K.every((q=>ft[q.task.id])))),q.id===et.Xx.SpecialOffer&&pt?yt.push(...this.addSpecialOfferShelf(pt,q)):yt.push(...this.addItemsSection(q,K,ft)))}this._tabSpawner.destroySpawnedPrefabs();const _t=mt.map((q=>q.DYNAMIC_STORE_TAB_ICON[0]));if(yield ht.q.instance.prodigy.load.assetsAsPromise(_t),null===(Y=null===(z=this.gameObject)||void 0===z?void 0:z.isDestroyed)||void 0===Y||Y)return;const[Et]=yield Promise.all([this._shelfSpawner.spawnPrefabsWithData(yt),this._tabSpawner.spawnDefaultPrefabsFromDataArray(mt)]);if(null===(Z=null===(Q=this.gameObject)||void 0===Q?void 0:Q.isDestroyed)||void 0===Z||Z)return;for(const q of Et){const{config:K,attachedObject:z}=q,Y=null==q?void 0:q.GameObject;if(!ot.A.isDefined(Y))break;switch(null==K?void 0:K.prefabGuid){case J.l.DynamicStoreSectionHeader:const Q=null!==(it=Y.findComponent(St.D))&&void 0!==it?it:Y.addComponent(St.D);Q.stateId=this._shelfScrollLink.contextId,Q.isTab=!1,Q.register(null==K?void 0:K.data.DYNAMIC_STORE_SHELF_CATEGORY),Y.hasComponent(Ot.B)||Y.addComponent(Ot.B),null===(nt=null===(st=Y.parent)||void 0===st?void 0:st.findComponent(Dt.N))||void 0===nt||nt.triggerSort(),q.keepAlive=!0;break;case J.l.StoreItemCard:const X=null==z?void 0:z.findComponent(ct.l);if(ot.A.isDefined(X)&&(this._itemCardToggleGroup.addSelectable(X),this._selectedCardData)){const q=null===(at=this._selectedCardData.dynamicStoreData)||void 0===at?void 0:at.offers,K=null==z?void 0:z.findComponent(bt.j).getItemData();q&&(null===(rt=null==K?void 0:K.dynamicStoreData)||void 0===rt?void 0:rt.offers)&&q[0].task.id===K.dynamicStoreData.offers[0].task.id&&X.setSelected(!0)}case J.l.DynamicStoreBundlesPanel:default:Y.findComponents(Ot.B).map((q=>q.destroy())),null===(lt=null===(dt=Y.parent)||void 0===dt?void 0:dt.findComponent(Dt.N))||void 0===lt||lt.triggerSort(),q.keepAlive=!1}}this.setupWallets();const wt=this.getInjectedValue("DYNAMIC_STORE_SCROLL_TO");ot.A.isDefined(wt)&&mt.find((q=>q.DYNAMIC_STORE_SHELF_CATEGORY===wt))&&this._shelfScrollLink.scrollToGroup(wt),this.onStoreLoaded.dispatch()}))}refreshStoreContents(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.initialize(this._data)}))}notifyWalletsLoaded(){this._walletsLoading=!1,this.onWalletsLoaded.dispatch()}setupWallets(){var q;this._walletMap=new Map,null===(q=this._walletContainer)||void 0===q||q.findComponentsInChildren(wt.n).forEach((q=>{this._walletMap.set(q.currencyID,{display:q,tooltipX:q.GameObject.transform.worldPosition.x,tooltipY:q.GameObject.transform.worldPosition.y})}))}createSectionShelfData(q,K,z){var Y,Q;if(0===K.length)return[{prefabGuid:J.l.DynamicStoreEmptySection,data:{DYNAMIC_STORE_SHELF_EMPTY_TITLE:null===(Y=q.emptySectionInfo)||void 0===Y?void 0:Y.title,DYNAMIC_STORE_SHELF_EMPTY_SUBTITLE:null===(Q=q.emptySectionInfo)||void 0===Q?void 0:Q.subtitle}}];const Z=(0,Rt.K8)(K,z),et=[],it=xt._.areBundlesEnabled(),[rt,ct]=Z.reduce((([q,K],z)=>{var Y,Q;return null!==(Q=null===(Y=z.additionalItems)||void 0===Y?void 0:Y.length)&&void 0!==Q&&Q?it&&!(0,ft.w)(z)&&q.push(z):K.push(z),[q,K]}),[[],[]]),dt=rt.map((K=>{var z;const Y=K.dynamicStoreData.isNew,Q=K.additionalItems.map((q=>({[Ct.AP.ItemCardData]:{item:lt.t.getItem(q.type,q.ID),quantity:q.N},[Ct.AP.ItemCardIsNew]:Y})));let Z;const J=null===(z=K.dynamicStoreData)||void 0===z?void 0:z.offers.find((q=>q.progress.status!==st.t.COMPLETE));ot.A.isDefined(null==J?void 0:J.expiresAt)&&(Z=J.expiresAt-ht.q.instance.prodigy.timeManager.getLocalTimeMs());const et=(0,nt.p)("currency",K.currencyID)&&this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(K.currencyAmount),it=J?tt.j.getItemRewards(J.task):[],rt=(0,Rt.H9)(it)&&this._player.getMemberTier()===at._$.NonMember,ct=(0,Rt.$U)(it,this._player.getLevel()),dt=it.reduce(((q,K)=>{var z,Y,Q;return Math.max(q,null!==(Q=null===(Y=null===(z=lt.t.getItem(K.type,K.ID))||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.lockLevel)&&void 0!==Q?Q:0)}),0),ut=ot.A.isDefined(K.item.ID)&&!Nt.D.hasBeenRescuedPreviously(this._player,K.item.ID);return{prefabGuid:this.getBundlePrefab(q),data:{DYNAMIC_STORE_BUNDLE_OFFER_TITLE:K.dynamicStoreData.title,DYNAMIC_STORE_BUNDLE_OFFER_SUBTITLE:K.dynamicStoreData.subtitle,DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_DATA:[{PET_ID:K.item.ID}],DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME:K.item.data.name,DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS:Q,DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK:()=>{this._segment.featureCommon.sendButtonEvent({buttonName:`bundle_${K.dynamicStoreData.offers[0].task.id}`,interfaceType:gt.Wm.Shop,interfaceName:pt.B.DynamicStoreBundle}),rt?ht.q.instance.prodigy.open.membershipInfo(void 0):this.buyBundle(K).catch(X.RQr.createHandler("Error purchasing bundle"))},DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT:K.currencyAmount,DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY:K.currencyID,DYNAMIC_STORE_BUNDLE_IS_NEW:Y,DYNAMIC_STORE_BUNDLE_PET_IS_NEW:ut,DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED:et,DYNAMIC_STORE_BUNDLE_MEMBER_LOCKED:rt,DYNAMIC_STORE_BUNDLE_LEVEL_LOCKED:ct&&!rt,DYNAMIC_STORE_BUNDLE_LEVEL_NEEDED:this._localizer.getText("ITEMCARD_LEVEL",dt),DYNAMIC_STORE_BUNDLE_LEVEL_MESSAGE:this._localizer.getText("STORE_TOOLTIP_MESSAGE_7",dt,this._player.getLevel()),DYNAMIC_STORE_BUNDLE_TIME_REMAINING:Z}}})),ut=ct.map((K=>({prefabGuid:J.l.StoreItemCard,data:{DYNAMIC_STORE_ITEM_DATA:K,DYNAMIC_STORE_SHELF_SELECT_CARD:this.onItemCardSelected.bind(this,q.label.toLocaleLowerCase())}})));return et.push(...dt,...ut),et}getBundlePrefab(q){const K=q.prefabGUID;return K&&Object.values(J.l).includes(K)?K:J.l.DynamicStoreBundlesPanel}addSpecialOfferShelf(q,K){const z=!!ot.A.isDefined(K.expiresAt)&&K.expiresAt-ht.q.instance.prodigy.timeManager.getLocalTimeMs();return[{prefabGuid:J.l.DynamicStoreSectionHeader,data:{DYNAMIC_STORE_SHELF_CATEGORY:K.id.toString(),DYNAMIC_STORE_SHELF_LABEL:K.label,DYNAMIC_STORE_SHELF_MILLISECONDS_REMAINING:z,DYNAMIC_STORE_SHELF_CURRENCIES:{},DYNAMIC_STORE_SHELF_HEADER_COLOUR:K.colour}},{prefabGuid:J.l.DynamicStoreSegmentedOffersPanel,data:Object.assign({},kt.P.getFullOfferInjectableProperties(q))}]}addItemsSection(q,K,z){if(0===K.length&&!q.emptySectionInfo)return[];const Y=!!ot.A.isDefined(q.expiresAt)&&q.expiresAt-ht.q.instance.prodigy.timeManager.getLocalTimeMs(),Q={};return K.forEach((q=>{var K;const{currency:z}=q.task.metadata;if(ot.A.isDefined(z)){const q=null!==(K=Q[z])&&void 0!==K?K:0;Q[z]=q+1}})),[{prefabGuid:J.l.DynamicStoreSectionHeader,data:{DYNAMIC_STORE_SHELF_CATEGORY:q.id.toString(),DYNAMIC_STORE_SHELF_LABEL:q.label,DYNAMIC_STORE_SHELF_MILLISECONDS_REMAINING:Y,DYNAMIC_STORE_SHELF_CURRENCIES:Q,DYNAMIC_STORE_SHELF_HEADER_COLOUR:q.colour}},...this.createSectionShelfData(q,K,z)]}createInjectedTabData(q,K){var z,Y;const Q=q.id.toString();return Object.assign(Object.assign({DYNAMIC_STORE_SHELF_CATEGORY:Q,DYNAMIC_STORE_TAB_TEXT:q.label,DYNAMIC_STORE_TAB_ICON:Pt.y.toInjectionParams(q.icon),DYNAMIC_STORE_TAB_UNREAD:!K},ot.A.isDefined(q.config.segmentData)?{DYNAMIC_STORE_TAB_SEGMENT_NAME:null===(z=q.config.segmentData)||void 0===z?void 0:z.tabName,DYNAMIC_STORE_TAB_SEGMENT_INTERFACE_TYPE:null===(Y=q.config.segmentData)||void 0===Y?void 0:Y.interfaceType,DYNAMIC_STORE_TAB_SHOP_TAB_NAME:{shop_tab_name:this._data.store.label.toLowerCase().replace(/\W/g,"-")}}:void 0),{DYNAMIC_STORE_TAB_ON_SELECTED:()=>{this.onTabSelected.dispatch(Q)}})}onItemCardSelected(q,K){var z,Q,X,Z;const J=K.getItemData();if(!J.dynamicStoreData)throw new Error("Item card does not have dynamicStoreData");const et=J.dynamicStoreData.offers[0],it=tt.j.getItemRewards(et.task)[0],nt=J.dynamicStoreData.offers.reduce(((q,K)=>q+(K.progress.status===st.t.COMPLETE?1:0)),0),at=(0,Rt.uA)(et,((q,K)=>{var z;return null===(z=lt.t.getItem(q,K))||void 0===z?void 0:z.data})),rt=this._walletMap.get(J.currencyID);rt&&(this._itemPreview.overrideCurrencyTooltipPosition.x=rt.tooltipX,this._itemPreview.overrideCurrencyTooltipPosition.y=rt.tooltipY+Y.CURRENCY_TOOLTIP_Y_OFFSET),this.renderItemPreview(J),this._selectedCardData=J;for(const Y of J.dynamicStoreData.offers)null===(Q=(z=this._data).onOfferSeen)||void 0===Q||Q.call(z,Y.task.id);K.setNewBadge(!1),this.onItemSelected.dispatch(q,J),this._segment.shop.sendDynamicStoreItemViewedEvent({storeKey:this._data.storeKey,itemType:null!==(X=J.item.type)&&void 0!==X?X:"",itemId:null!==(Z=J.item.ID)&&void 0!==Z?Z:0,cost:at,category:q,categoryId:q,isOwned:this._player.isItemOwned({type:it.type,ID:it.ID}),itemStack:J.dynamicStoreData.itemQuantity-nt,instanceId:this._segment.featureCommon.getCurrentInterfaceID(pt.B.UnifiedStore)})}renderItemPreview(q){this._itemPreview.renderSelectedItem(q,(q=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.buyStoreItem(q)})))),this._itemPreview.onPurchaseFailure.removeAll(this),this._itemPreview.onPurchaseFailure.add(this.handlePurchaseFailure,this)}handlePurchaseFailure(q,K){var z,Y,Q,J,tt;if(ot.A.isDefined(q)){let X=null===(z=q.dynamicStoreData)||void 0===z?void 0:z.offers[0].task,Z=q;if(X||(X=null===(Q=null===(Y=this._selectedCardData)||void 0===Y?void 0:Y.dynamicStoreData)||void 0===Q?void 0:Q.offers[0].task,Z=this._selectedCardData),X){const q=(null!==(tt=null===(J=Z.additionalItems)||void 0===J?void 0:J.length)&&void 0!==tt?tt:0)>0;this.sendPurchaseFailedEvent(X,Object.assign(Object.assign({},Z.item),{type:q?"bundle":Z.item.type,id:q?+X.id:Z.item.ID,cost:{type:"currency",ID:Z.currencyID,N:Z.currencyAmount}}),K,q?{bundleName:X.metadata.displayName}:void 0)}}const et=ht.q.instance.prodigy,it=et.gameContainer.get(X.$Bt.LocalizationService);switch(K){case Tt.WE.OfferExpired:et.open.confirmationDialogWideButtons(new _t.k(it.getText("DYNAMIC_STORE_LEAVE"),(()=>{this.gameObject.destroyDeferred()}),it.getText("DIALOG_STAY"),void 0,{atlas:Z._.Ui_store_json,name:"icon-large-exclamation"},void 0,550,it.getText("MESSAGE_TITLE_OOPS"),it.getText("DYNAMIC_STORE_ERROR_OFFER_EXPIRED_BODY")));break;case Tt.WE.NotEnoughCurrency:case Tt.WE.MemberLocked:case Tt.WE.LevelLocked:break;default:X.RQr.logError(K,"Error confirming store purchase"),et.open.message(it.getText("NETWORK_ERROR"))}}buyStoreItem(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q,X,Z,J;if(!q.dynamicStoreData)return rt.Q.error(Tt.WE.NoData);const et=q.dynamicStoreData.offers.find((q=>q.progress.status!==st.t.COMPLETE));if(!et)return rt.Q.error(Tt.WE.AllPurchased);if((null!==(K=et.expiresAt)&&void 0!==K?K:1/0)<=ht.q.instance.prodigy.timeManager.getLocalTimeMs())return rt.Q.error(Tt.WE.OfferExpired);if((null!==(Y=null===(z=q.item.data)||void 0===z?void 0:z.member)&&void 0!==Y?Y:0)>0&&this._player.getMemberTier()===at._$.NonMember)return rt.Q.error(Tt.WE.MemberLocked);try{const q=tt.j.getItemRewards(et.task)[0];this.onPurchaseStarted.dispatch();const K=this._data.store.sections.find((q=>q.id===et.task.metadata.category)),z=yield this._dynamicStoreQuestManager.purchaseItem({offer:et,storeKey:this._data.storeKey,storeCategory:null!==(Q=null==K?void 0:K.label.toLowerCase())&&void 0!==Q?Q:"Unknown",categoryId:null==K?void 0:K.id.toString(),itemSegmentData:{instance_type:vt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(pt.B.UnifiedStore),sink_type:q.type,sink_id:q.ID}});this.completeItemPurchase(et);const Y=this._itemCardToggleGroup.getToggles();for(const Q of Y){const q=null===(X=Q.GameObject)||void 0===X?void 0:X.findComponentInParent(bt.j);if(ot.A.isDefined(q)){const K=null!==(J=null===(Z=q.getItemData().dynamicStoreData)||void 0===Z?void 0:Z.offers)&&void 0!==J?J:[];for(const z of K)z.task.id===et.task.id&&q.updateTask(et)}}return rt.Q.success(z)}catch(e){return this.onPurchaseFailed.dispatch(),rt.Q.error(e)}}))}buyBundle(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q;if(!this._paymentManager.canAfford({currency:q.currencyID,value:q.currencyAmount}))return this.handlePurchaseFailure(q,Tt.WE.NotEnoughCurrency),this._segment.purchase.sendFunnelStart({type:"Dynamic-Store-Hard-Currency-Insufficient-Resources-Bundle",category:"Dynamic-Store-Hard-Currency-Insufficient-Resources-Store",contentId:q.dynamicStoreData.offers[0].task.id.toString(),adType:Et.R.UnifiedConversionFlow}),yield ht.q.instance.prodigy.open.battlePassUltimateMemberUpsellModal(),void(yield this.refreshStoreContents());const X=yield this.buyStoreItem(q);if(X.isSuccess()){for(const X of null!==(z=null===(K=q.dynamicStoreData)||void 0===K?void 0:K.offers)&&void 0!==z?z:[])null===(Q=(Y=this._data).onOfferSeen)||void 0===Q||Q.call(Y,X.task.id),this._data.offerReadById[X.task.id]=!0;yield this.refreshStoreContents()}else this.handlePurchaseFailure(q,X.error)}))}sendPurchaseFailedEvent(q,K,z,Y){var Q,X;const Z=this._data.store.sections.find((K=>K.id===q.metadata.category));this._segment.shop.sendDynamicStorePurchaseFailedEvent({storeKey:this._data.storeKey,itemType:K.type,itemId:K.id,cost:{type:K.cost.type,currency:K.cost.ID,value:K.cost.N},category:null!==(Q=null==Z?void 0:Z.label.toLowerCase())&&void 0!==Q?Q:q.metadata.category,categoryId:null!==(X=null==Z?void 0:Z.id.toString())&&void 0!==X?X:q.metadata.category,failReason:z,funnelId:this._segment.purchase.getFunnelID(),instanceId:this._segment.featureCommon.getCurrentInterfaceID(pt.B.UnifiedStore),bundleData:Y})}completeItemPurchase(q){var K;this.onPurchaseFinished.dispatch(q.task.metadata.category);const z=ht.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=(0,Rt.uA)(q,((q,K)=>{var z;return null===(z=lt.t.getItem(q,K))||void 0===z?void 0:z.data}));this.onCurrencySpent(Y.currency,z.getCurrencyAmount(Y.currency,Y.type));const Q=q.progress.data,X=(0,Rt.Nx)(q);ot.A.isDefined(Q)?(Q.timesCompleted=(null!==(K=Q.timesCompleted)&&void 0!==K?K:0)+1,Q.timesCompleted>=X&&(q.progress.status=st.t.COMPLETE)):1===X?q.progress.status=st.t.COMPLETE:q.progress.data={progress:0,timesCompleted:1}}onCurrencySpent(q,K){const z=this._walletMap.get(q);z&&z.display.playSpendEffect(K)}onTabLoaded(q){const K=q.findComponent(ct.l);this._tabToggleGroup.addSelectable(K)}onGroupChanged(q,K){var z,Y;const{onOfferSeen:Q,store:X}=this._data;if(Q){const K=null!==(Y=null===(z=X.sections.find((K=>K.id===q)))||void 0===z?void 0:z.offers)&&void 0!==Y?Y:[];for(const q of K)Q(q.task.id)}Mt.d.updateInjectedValues(K.GameObject,{DYNAMIC_STORE_TAB_UNREAD:!1})}onPooledObjectEnter(q,K){var z,Y;switch(K.prefabGuid){case J.l.StoreItemCard:const K=q.findComponentInChildren(ct.l);if(this._itemCardToggleGroup.addSelectable(K),this._selectedCardData){const Q=null===(z=this._selectedCardData.dynamicStoreData)||void 0===z?void 0:z.offers,X=q.findComponent(bt.j).getItemData();Q&&(null===(Y=null==X?void 0:X.dynamicStoreData)||void 0===Y?void 0:Y.offers)&&Q[0].task.id===X.dynamicStoreData.offers[0].task.id&&K.setSelected(!0)}break;case J.l.DynamicStoreSectionHeader:}}onPooledObjectExit(q,K){switch(K.prefabGuid){case J.l.StoreItemCard:const K=q.findComponentInChildren(ct.l);(null==K?void 0:K.isSelected())&&K.setSelected(!1),this._itemCardToggleGroup.removeSelectable(K);break;case J.l.DynamicStoreBundlesPanel:case J.l.DynamicStoreSectionHeader:}}handleNavigationTabSelection(q){this._itemCardToggleGroup.setSelected(),this._selectedCardData=null,this.selectStoreWithKey(q.key)}selectStoreWithKey(q){if(ot.A.isDefined(q)){if(q===et.g0.AllShops)return void(ot.A.isDefined(this.allShopsMenuContainer)&&(this.allShopsMenuContainer.active=!0));ot.A.isDefined(this.allShopsMenuContainer)&&(this.allShopsMenuContainer.active=!1),this.onStoreSelected.dispatch(q)}}handleDataLoadOrError(q){var K,z,Y;if(!q.isSuccess())switch(X.VyI.log(null!==(z=null===(K=q.error)||void 0===K?void 0:K.message)&&void 0!==z?z:"There was an error loading store data",X.$bb.Error),null===(Y=q.error)||void 0===Y?void 0:Y.message){case et.IF.StoreKeyNotFound:return this.allShopsMenuContainer.active=!0,void this.onStoreLoaded.dispatch();default:return void ht.q.instance.prodigy.open.networkError((()=>this.gameObject.destroyDeferred()))}const Q=q.get();if("string"==typeof Q.DYNAMIC_STORE_DATA)return this.selectStoreWithKey(Q.DYNAMIC_STORE_DATA),void this.onStoreLoaded.dispatch();Mt.d.updateInjectedValues(this.gameObject,Q)}};Bt.CURRENCY_TOOLTIP_Y_OFFSET=20,(0,Q.Cg)([(0,yt.b)("668-8a41"),(0,Q.Sn)("design:type",Lt.s)],Bt.prototype,"_dynamicStoreQuestManager",void 0),(0,Q.Cg)([(0,yt.b)("ec3-31a0"),(0,Q.Sn)("design:type",mt.E)],Bt.prototype,"_paymentManager",void 0),(0,Q.Cg)([(0,yt.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Bt.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bt.prototype,"onPurchaseStarted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bt.prototype,"onPurchaseFinished",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bt.prototype,"onPurchaseFailed",void 0),(0,Q.Cg)([(0,X.MnK)(At.V),(0,Q.Sn)("design:type",At.V)],Bt.prototype,"_shelfScrollLink",void 0),(0,Q.Cg)([(0,X.MnK)(dt.O),(0,Q.Sn)("design:type",dt.O)],Bt.prototype,"_tabToggleGroup",void 0),(0,Q.Cg)([(0,X.MnK)(It.h),(0,Q.Sn)("design:type",It.h)],Bt.prototype,"_tabSpawner",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bt.prototype,"onTabSelected",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bt.prototype,"onItemSelected",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bt.prototype,"onWalletsLoaded",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bt.prototype,"onStoreLoaded",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bt.prototype,"onStoreSelected",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bt.prototype,"_walletContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bt.prototype,"allShopsMenuContainer",void 0),Bt=Y=(0,Q.Cg)([(0,X.EVk)("DynamicStore")],Bt)},282:(q,K,z)=>{"use strict";z.d(K,{Cv:()=>X});var Y,Q,X;z(53661);!function(q){q.Shelf="shelf",q.Header="header",q.SpecialOffer="special-offer",q.EmptyShelf="empty-shelf",q.Bundle="bundle"}(Y||(Y={})),function(q){q.DYNAMIC_STORE_BUNDLE_TITLE="DYNAMIC_STORE_BUNDLE_OFFER_TITLE",q.DYNAMIC_STORE_BUNDLE_SUBTITLE="DYNAMIC_STORE_BUNDLE_OFFER_SUBTITLE",q.DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_ID="DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_ID",q.DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME="DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME",q.DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS="DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS",q.DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK="DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK",q.DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT="DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT",q.DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY="DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY",q.DYNAMIC_STORE_BUNDLE_IS_NEW="DYNAMIC_STORE_BUNDLE_IS_NEW",q.DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED="DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED",q.DYNAMIC_STORE_BUNDLE_MEMBER_LOCKED="DYNAMIC_STORE_BUNDLE_MEMBER_LOCKED",q.DYNAMIC_STORE_BUNDLE_LEVEL_LOCKED="DYNAMIC_STORE_BUNDLE_LEVEL_LOCKED",q.DYNAMIC_STORE_BUNDLE_LEVEL_NEEDED="DYNAMIC_STORE_BUNDLE_LEVEL_NEEDED",q.DYNAMIC_STORE_BUNDLE_LEVEL_MESSAGE="DYNAMIC_STORE_BUNDLE_LEVEL_MESSAGE"}(Q||(Q={})),function(q){q.CouldNotGetOffers="could-not-get-store-offers"}(X||(X={}))},37816:(q,K,z)=>{"use strict";z.d(K,{q:()=>tt});var Y=z(8674),Q=z(62459),X=z(69811),Z=z(83133),J=z(11647);let tt=class extends((0,J.o)(Q.uAl)){constructor(){super(...arguments),this.onTabSelected=this.createTidySignal(),this._graphicsSwappers=[]}get data(){return this._data}get toggle(){return this._toggle}init(q){this.toggle.setSelected(!0),this.toggle.inputEnabled=!0,this._data=q,this.addListenerToSignal(this.toggle.onSelected,(()=>this.onTabSelected.dispatch(this._data))),Q.Aq$.isDefined(this.labelComponent)&&(this.labelComponent.text=q.label),this._graphicsSwappers=this.gameObject.findComponentsInChildren(X.y)}swapGraphic(q){this._graphicsSwappers.forEach((K=>K.selectGraphicAtIndex(q)))}};(0,Y.Cg)([(0,Q.Pqz)(Z.l),(0,Y.Sn)("design:type",Z.l)],tt.prototype,"_toggle",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],tt.prototype,"labelComponent",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onTabSelected",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("HeaderNavigationTab")],tt)},50379:(q,K,z)=>{"use strict";z.d(K,{c:()=>Y});const Y={label:"All Shops",key:z(64270).g0.AllShops}},24595:(q,K,z)=>{"use strict";z.d(K,{V:()=>st});var Y=z(8674),Q=z(62459),X=z(64270),Z=z(94566),J=z(69811),tt=z(11647),et=z(37816),it=z(50379);let st=class extends((0,tt.o)(Q.uAl)){constructor(){super(...arguments),this.onTabDataLoaded=this.createTidySignal(),this.onTabSelected=this.createTidySignal(),this.includeAllShopsTab=!1,this._selectedTabKey="",this._storeTabsObjects=[],this._didSetup=!1}postCreate(){var q;this._toggleGroup=null===(q=this.tabsContainerObject)||void 0===q?void 0:q.findComponent(Z.O)}setup(q){const K=Object.entries(q).map((([q,K])=>{var z;return{key:q,label:Q.Aq$.isDefined(K.nameLocalizationKey)&&""!==K.nameLocalizationKey&&null!==(z=this._baseLocalizer.getText(K.nameLocalizationKey))&&void 0!==z?z:K.label,metadata:Object.assign({},K)}}));this._storeTabsData=[...K],this.includeAllShopsTab&&this._storeTabsData.unshift(it.c),this.setTabsData(this._storeTabsData),this._didSetup=!0}updateHeader(q){if(!Q.Aq$.isDefined(q.metadata))return;const K=q.metadata.cover;this.backgroundGraphicSwapper.selectGraphicAtIndex(K),this._storeTabsObjects.forEach((q=>q.GameObject.active=!1));const z=this._storeTabsObjects.map(((q,z)=>(0,Y.sH)(this,void 0,void 0,(function*(){return this.updateTab(z,K)}))));Promise.all(z).catch(Q.RQr.createHandler("HeaderNavigationTabsControllerComponent: Could not update tabs."))}updateTab(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y;if(this._storeTabsObjects[q].swapGraphic(K),this._storeTabsData[q].key===X.g0.AllShops)return void(this._storeTabsObjects[q].GameObject.active=this.includeAllShopsTab);if(!Q.Aq$.isDefined(this._storeTabsData[q].metadata))return void(this._storeTabsObjects[q].GameObject.active=!1);const Z=null===(Y=null===(z=this._storeTabsData[q])||void 0===z?void 0:z.metadata)||void 0===Y?void 0:Y.cover;this._storeTabsObjects[q].GameObject.active=Z===K}))}setSelectedTabForKey(q){var K,z,Y;if(this._selectedTabKey=q,!this._didSetup)return void this.addOneTimeListenerToSignal(this.onTabDataLoaded,(()=>this.setSelectedTabForKey(q)));const Q=this.tabsContainerObject.children.findIndex((q=>{var K;return this._selectedTabKey===(null===(K=q.findComponent(et.q))||void 0===K?void 0:K.data.key)}));Q>=0?(null===(K=this._toggleGroup)||void 0===K||K.setItemSelectedByIndex(Q,!0),null===(z=this._toggleGroup)||void 0===z||z.setSelectedIndex(Q),this.updateHeader(this._storeTabsData[Q])):null===(Y=this._toggleGroup)||void 0===Y||Y.setSelected()}setTabsData(q,K=0){var z;Q.Aq$.isDefined(this.tabsContainerObject)&&(null===(z=this._toggleGroup)||void 0===z||z.clearSelectables(),this.tabsContainerObject.children.forEach((q=>q.destroyDeferred())),Promise.all(q.map(((q,K)=>(0,Y.sH)(this,void 0,void 0,(function*(){return[yield this._prefabLoader.loadWithDependenciesFromGUID(this.tabPrefab,this.tabsContainerObject),q,K]}))))).then((q=>{var z;q.forEach((([q,K,z])=>{var Y;const X=q.findComponent(et.q);this.tabsContainerObject.addChildAt(q,z),Q.Aq$.isDefined(X)&&(this._storeTabsObjects.push(X),null===(Y=this._toggleGroup)||void 0===Y||Y.addSelectable(X.toggle),this.addListenerToSignal(X.onTabSelected,this.setSelectedTab.bind(this)),X.init(K))})),this._selectedTabKey?this.setSelectedTabForKey(this._selectedTabKey):null===(z=this._toggleGroup)||void 0===z||z.setSelectedIndex(K),this.onTabDataLoaded.dispatch()})).catch((q=>{var K,z;Q.VyI.log("There was an error creating the tabs",Q.$bb.Error),Q.VyI.log(null===(z=(K=q).toString)||void 0===z?void 0:z.call(K),Q.$bb.Error)})))}setSelectedTab(q){this.onTabSelected.dispatch(q),this.updateHeader(q)}};(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],st.prototype,"_baseLocalizer",void 0),(0,Y.Cg)([(0,Q.i0J)(Q.Z$z.Prefab),(0,Y.Sn)("design:type",String)],st.prototype,"tabPrefab",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],st.prototype,"tabsContainerObject",void 0),(0,Y.Cg)([(0,Q.MnK)(J.y),(0,Y.Sn)("design:type",J.y)],st.prototype,"backgroundGraphicSwapper",void 0),(0,Y.Cg)([(0,Q.Cdj)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],st.prototype,"_prefabLoader",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],st.prototype,"onTabDataLoaded",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],st.prototype,"onTabSelected",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],st.prototype,"includeAllShopsTab",void 0),st=(0,Y.Cg)([(0,Q.EVk)("HeaderNavigationTabsController")],st)},55301:(q,K,z)=>{"use strict";z.d(K,{X:()=>Q,o:()=>X});var Y=z(64270);const Q={1:[Y.GA.PetShop],2:[Y.GA.WizardCenter,"ab9ae0de-23f9-41de-8a36-ef5fdd96dd51"],4:[Y.GA.SpecialOffers],5:[Y.GA.RegionShop,"ea1443ff-9180-46ed-98f2-4b3299e272b2"],6:[Y.GA.RegionShop,"c3755249-2988-4b00-ad85-c26fa7469a2e"],7:[Y.GA.RegionShop,"13bececf-ea11-49ac-b3e6-b14d83a0d246"],8:[Y.GA.RegionShop,"f9d01a0c-c701-4f49-8358-96ba8823c26b"],13:[Y.GA.StarlightShop],14:[Y.GA.PumpkinfestShop],15:[Y.GA.WinterfestShop],37:[Y.GA.SummerfestShop],71:[Y.GA.MoonlightShop],70:[Y.GA.FestivalShop],72:[Y.GA.SpringfestShop],25:[Y.GA.SpringfestShop,"6dc8149e-bb87-4976-8c24-170becc12b77"],24:[Y.GA.SpringfestShop,"d5803109-5aeb-498f-8bda-5e59fba845fc"],19:[Y.GA.RegionShop,"08e2e778-6192-46d8-a153-63f179000734"],21:[Y.GA.TitanShop],22:[Y.GA.TitanShop],35:[Y.GA.AcademyShop],36:[Y.GA.AcademyShop],46:[Y.GA.WizardCenter]},X=[40,41,42,43,44,23,9,11,12,47,66,68,69]},42959:(q,K,z)=>{"use strict";z.d(K,{I:()=>ht});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(34656),tt=z(64270),et=z(88131),it=z(7351),st=z(55080),nt=z(282),at=z(34829),rt=z(15821),ot=z(55328);let ht=Y=class{constructor(){this._cachedWidgetItems=void 0,this._lastWidgetItemFetchTime=0}getDynamicStoreUIData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y;null!==(K=q.storeSegmentIdentifier)&&void 0!==K||(q.storeSegmentIdentifier=tt.qO.DynamicStore);const Q=yield this._dynamicStoreQuestManager.getStoreOffers(q.storeKey);if(!Q.isSuccess())return X.VyI.log(`${Q.error}`,X.$bb.Error),et.Q.error(null!==(z=Q.error)&&void 0!==z?z:nt.Cv.CouldNotGetOffers);const Z=Q.get(),it=this.getPlayerData(),st=this._segmentedOffers.userCanReceiveSegmentedOffers()?this._segmentedOffers.activeOffer:void 0,at={},rt=Object.assign(Object.assign({},Z),{sections:Z.sections.filter((q=>q.id===tt.Xx.SpecialOffer?J.j.specialOfferSectionHasContent(q,st):q.offers.length>0||!!q.emptySectionInfo))});for(const q of rt.sections)for(const K of null!==(Y=q.offers)&&void 0!==Y?Y:[])at[K.task.id]=K.task.id in it.seenOffers;return this.cleanupUnusedPlayerData(it,at),et.Q.success({store:rt,offerReadById:at,specialOffer:st,onOfferSeen:q=>this.markOfferRead(q),storeKey:q.storeKey})}))}markOfferRead(q){this.getPlayerData().seenOffers[q]=Date.now(),this._player.updated=!0,this._dynamicStoreQuestManager.sendHudButtonData().catch(X.RQr.createHandler("DynamicStoreDataProvider: Could not update HUD buttons."))}getPlayerData(){var q,K;return null!==(q=(K=this._player.data).dynamicStore)&&void 0!==q||(K.dynamicStore={seenOffers:{}}),this._player.data.dynamicStore}cleanupUnusedPlayerData(q,K){const z=Date.now(),Y=z-2592e6;for(const[Q,X]of Object.entries(q.seenOffers))K[Q]?q.seenOffers[Q]=z:(!0===X||X=this._lastWidgetItemFetchTime+Y.WIDGET_ITEM_FETCH_COOLDOWN)&&(this._cachedWidgetItems=(yield this._networkHandler.getHudWidgetItems()).hudWidgetitems,this._lastWidgetItemFetchTime=Date.now()),this._cachedWidgetItems}))}};ht.WIDGET_ITEM_FETCH_COOLDOWN=at.s.HOURS_IN_MS,(0,Q.Cg)([(0,Z.inject)("782-c308"),(0,Q.Sn)("design:type",it.W)],ht.prototype,"_player",void 0),(0,Q.Cg)([(0,Z.inject)("c21-1a3f"),(0,Q.Sn)("design:type",Function)],ht.prototype,"_segmentedOffers",void 0),(0,Q.Cg)([(0,Z.inject)("668-8a41"),(0,Q.Sn)("design:type",st.s)],ht.prototype,"_dynamicStoreQuestManager",void 0),(0,Q.Cg)([(0,Z.inject)("73c-5410"),(0,Q.Sn)("design:type",ot.v)],ht.prototype,"_networkHandler",void 0),ht=Y=(0,Q.Cg)([(0,Z.injectable)()],ht)},64007:(q,K,z)=>{"use strict";z.d(K,{_:()=>Q});var Y=z(87490);class Q{}Q.ELEMENT_BOOST_TEXT_CONFIG={[Y.EElementType.Fire]:{localizationKey:"ELEMENTAL_BOOST_POPUP_FIRE",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_FIRE",textColor:"#ffdd00",textStrokeColor:"#aa133d"},[Y.EElementType.Ice]:{localizationKey:"ELEMENTAL_BOOST_POPUP_ICE",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_ICE",textColor:"#a8fbff",textStrokeColor:"#375db0"},[Y.EElementType.Physical]:{localizationKey:"ELEMENTAL_BOOST_POPUP_PHYSICAL",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_PHYSICAL",textColor:"#d6eff0",textStrokeColor:"#4a4d76"},[Y.EElementType.Plant]:{localizationKey:"ELEMENTAL_BOOST_POPUP_PLANT",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_PLANT",textColor:"#bcd442",textStrokeColor:"#2b561f"},[Y.EElementType.Storm]:{localizationKey:"ELEMENTAL_BOOST_POPUP_STORM",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_STORM",textColor:"#fdf051",textStrokeColor:"#744274"},[Y.EElementType.Water]:{localizationKey:"ELEMENTAL_BOOST_POPUP_WATER",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_WATER",textColor:"#5cd0fd",textStrokeColor:"#0f4a8f"}}},99842:(q,K,z)=>{"use strict";z.d(K,{s:()=>Z});var Y=z(8674),Q=z(95891),X=z(56567);class Z{static sampleRandomEncounter(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z,J;const tt=yield Promise.all(Object.values(q.encounters).map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return[yield Z.meetsPreconditions(null!=K?K:new X.f,q.preconditions),q]}))))),et=[];let it=0;for(const[q,K]of tt)q&&(et.push(K),it+=null!==(z=K.weight)&&void 0!==z?z:0);let st=Math.random()*it;for(const q of et)if(st-=null!==(J=q.weight)&&void 0!==J?J:0,st<=0)return q;return Q.sample(et)}))}static meetsPreconditions(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){let z=!0;for(const Y of null!=K?K:[])if(z=yield q.check(Y.type,Y.data),!z)break;return!!z}))}}},15571:(q,K,z)=>{"use strict";z.d(K,{p:()=>ht});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z.n(Z),tt=z(35120),et=z(1195),it=z(77938),st=z(65068),nt=z(3001),at=z(80434),rt=z(5708),ot=z(78889);let ht=class{constructor(){this.objectiveTypes=[st.q.RestrictedEncounter,st.q.RestrictedEncounterBlocking]}getObjectives(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=this.getActiveRestrictedEncounters(),z=tt.q.instance.prodigy.world.getCurrentZone(),X=null===(q=at.n[z])||void 0===q?void 0:q.questTag;if(!Q.Aq$.isDefined(X))return[];const Z=yield this._questManagerHub.getTasksInProgress([X]),et=yield Promise.all(K.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,J,tt,et,nt,at,rt;const{requirementsId:ht}=q,ct=null===(K=yield this.getRestrictionsForRequirements(ht))||void 0===K?void 0:K.data;if(!Q.Aq$.isDefined(ct))return[];const{requirements:dt}=null!==(z=this._featureRequirements.getProgressForRequirements(ct))&&void 0!==z?z:{requirements:[]},lt=[],{overrideQuestIds:ut}=q,ft=null!==(J=null===(Y=Z.get(X))||void 0===Y?void 0:Y.some((q=>{const{questID:K,taskID:z}=q;return null==ut?void 0:ut.some((q=>q===`${K}.${z}`))})))&&void 0!==J&&J?st.q.RestrictedEncounterBlocking:st.q.RestrictedEncounter;if(dt.every((q=>Object.values(q).every((({progress:q})=>{const[K,z]=q;return K>=z}))))){const K=it.t.getItem(null!==(tt=q.assetType)&&void 0!==tt?tt:"boss",q.assetId);return lt.push({id:`${ht}-${ct.name}-*`,text:this._localizer.getText("DEFEAT_ENEMY",null!==(rt=null!==(nt=null===(et=null==K?void 0:K.data)||void 0===et?void 0:et.nickname)&&void 0!==nt?nt:null===(at=null==K?void 0:K.data)||void 0===at?void 0:at.name)&&void 0!==rt?rt:"the enemy"),progress:{current:0,target:1},type:ft}),lt}return ot.yd({requirements:dt,objectiveIdPrefix:`${ht}-${ct.name}`,type:ft})})))));return J().flatten(et)}))}startEncounter(q,K,z){var Y,X,Z,tt;if(!Q.Aq$.isDefined(q))return;const{data:et}=this._playerDataProvider.player,it=null!==(Y=et.restrictedEncounters)&&void 0!==Y?Y:{},st=null!==(X=it[et.zone])&&void 0!==X?X:[],nt=null!==(Z=ot.Lj(K))&&void 0!==Z?Z:0,at=null!==(tt=K.uniqueId)&&void 0!==tt?tt:nt,rt=ot.Wo(K),ht={requirementsId:q,encounterUniqueId:at,assetType:rt,assetId:nt,overrideQuestIds:z},ct=st.findIndex((q=>q.encounterUniqueId===at));if(-1!==ct){if(J().isEqual(st[ct],ht))return;st[ct]=ht}else st.push(ht);it[et.zone]=st,this._playerDataProvider.player.data.restrictedEncounters=it,this._playerDataProvider.player.updated=!0,this._playerDataProvider.player.forceSaveCharacter()}getActiveRestrictedEncounters(q){var K,z;const{data:Y,state:X}=this._playerDataProvider.player,{restrictedEncounters:Z}=Y;if(!Q.Aq$.isDefined(Z))return[];const tt=[];Q.Aq$.isDefined(q)?tt.push(...null!==(K=null==Z?void 0:Z[q])&&void 0!==K?K:[]):tt.push(...J().flatten(Object.values(Z)));const et=[];for(const Q of tt){const{encounterUniqueId:q}=Q;null!==(z=X.get(q.toString()))&&void 0!==z&&z?this.stopEncounter(Q):et.push(Q)}return et}stopEncounter(q){if(!this._playerDataProvider)return;const{data:K}=this._playerDataProvider.player,{restrictedEncounters:z}=K;if(Q.Aq$.isDefined(z))for(const[Y,Q]of Object.entries(z)){const K=null==Q?void 0:Q.filter((K=>K.encounterUniqueId!==q.encounterUniqueId));if((null==K?void 0:K.length)!==(null==Q?void 0:Q.length))return this._playerDataProvider.player.data.restrictedEncounters[Y]=K,void(this._playerDataProvider.player.updated=!0)}}getRestrictionsForRequirements(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._restrictionsProvider.getRestrictionById(q)}))}};(0,Y.Cg)([(0,X.inject)("fcb-f00b"),(0,Y.Sn)("design:type",rt.X)],ht.prototype,"_restrictionsProvider",void 0),(0,Y.Cg)([(0,X.inject)("ad2-c5b2"),(0,Y.Sn)("design:type",et.E)],ht.prototype,"_playerDataProvider",void 0),(0,Y.Cg)([(0,X.inject)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],ht.prototype,"_localizer",void 0),(0,Y.Cg)([(0,X.inject)("b37-c775"),(0,Y.Sn)("design:type",nt.n)],ht.prototype,"_questManagerHub",void 0),(0,Y.Cg)([(0,X.inject)("11f-118a"),(0,Y.Sn)("design:type",Object)],ht.prototype,"_featureRequirements",void 0),ht=(0,Y.Cg)([(0,X.injectable)()],ht)},46571:(q,K,z)=>{"use strict";z.d(K,{p:()=>J});var Y=z(8674),Q=z(79687),X=z(62459),Z=z(45895);let J=class{constructor(){this._eventEncounterDataProviders=[]}getProviders(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){const Z=yield Promise.all(this._eventEncounterDataProviders.filter((q=>X.Aq$.isDefined(q)&&K&&q.isEnabledByDefault?!z.includes(q.tag):Q.includes(q.tag))).map((K=>(0,Y.sH)(this,void 0,void 0,(function*(){return[yield K.getPriority(q),K]})))));return Z.sort((([q],[K])=>q-K)),Z}))}};(0,Y.Cg)([(0,Q.multiInject)(Z.A),(0,Y.Sn)("design:type",Array)],J.prototype,"_eventEncounterDataProviders",void 0),J=(0,Y.Cg)([(0,Q.injectable)()],J)},24800:(q,K,z)=>{"use strict";z.d(K,{p:()=>nt});var Y,Q=z(8674),X=z(79687),Z=z(62459),J=z(50996),tt=z(94393),et=z(99842),it=z(35120),st=z(73678);let nt=Y=class{constructor(){this.tag=J.I.FestivalEncounterDataProvider,this.isEnabledByDefault=!0}isActive(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const z=null===(K=this._weekendEvents.getActiveFestival())||void 0===K?void 0:K.type,Y=this._weekendEvents.getFestivalConfig(),Q=it.q.instance.prodigy.world.getCurrentZone();if(!Z.Aq$.isDefined(Y)||!Z.Aq$.isDefined(z))return!1;if(!(null==Y?void 0:Y.festivalDailyData.allowInCoreZones)&&st.s0.includes(Q))return!1;for(const X of Y.festivalDailyData.zoneEncounterEntities){if(yield et.s.meetsPreconditions(q.preconditionChecker,X.preconditions))return this._selectedEncounterEntity=X,!0}return!1}))}getPriority(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return J.X[this.tag]}))}getEncounterData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!q.isOnCooldown&&Z.Aq$.isDefined(this._selectedEncounterEntity)){const K=Y.encounterCache[q.spawnId];if(!!Z.Aq$.isDefined(K)&&(yield et.s.meetsPreconditions(q.preconditionChecker,K.preconditions)))return Object.assign(Object.assign({},K),{bench:this._selectedEncounterEntity.bench});const z=yield et.s.sampleRandomEncounter(this._selectedEncounterEntity,q.preconditionChecker);return Z.Aq$.isDefined(z)?(Y.encounterCache[q.spawnId]=z,Object.assign(Object.assign({},Y.encounterCache[q.spawnId]),{bench:this._selectedEncounterEntity.bench})):void 0}}))}static clearCachedEncounters(){Y.encounterCache={}}};nt.encounterCache={},(0,Q.Cg)([(0,X.inject)("119-35f9"),(0,Q.Sn)("design:type",tt.n)],nt.prototype,"_weekendEvents",void 0),nt=Y=(0,Q.Cg)([(0,X.injectable)()],nt)},45895:(q,K,z)=>{"use strict";z.d(K,{A:()=>Y});const Y=Symbol.for("EVENT_ENCOUNTER_DATA_PROVIDER")},50996:(q,K,z)=>{"use strict";var Y;z.d(K,{I:()=>Y,X:()=>Q}),function(q){q.FestivalEncounterDataProvider="FestivalEncounterDataProvider",q.FeaturedSpawnEncounterDataProvider="FeaturedSpawnEncounterDataProvider"}(Y||(Y={}));const Q={[Y.FestivalEncounterDataProvider]:0,[Y.FeaturedSpawnEncounterDataProvider]:1}},7170:(q,K,z)=>{"use strict";var Y;z.d(K,{E:()=>Y}),function(q){q.Disabled="disabled"}(Y||(Y={}))},78889:(q,K,z)=>{"use strict";z.d(K,{$Q:()=>ct,BQ:()=>vt,LT:()=>lt,Lj:()=>it,OI:()=>ht,Ue:()=>at,W0:()=>ot,Wo:()=>st,Yu:()=>pt,bU:()=>rt,cB:()=>nt,h9:()=>ut,o_:()=>ft,sK:()=>dt,wd:()=>bt,yd:()=>gt});var Y=z(62459),Q=z(28628),X=z(15821),Z=z(35120),J=z(77938),tt=z(129),et=z(7170);function it(q){var K,z,Q;return lt(q)?null!==(K=q.boss.ID)&&void 0!==K?K:0:ut(q)?32:ct(q)?null!==(z=q.encounter[0].ID)&&void 0!==z?z:0:dt(q)?null!==(Q=q.pets[0].ID)&&void 0!==Q?Q:0:void Y.VyI.log("EncounterDataUtils.getEncounterAssetId: unable to find a valid asset ID for encounter data",Y.$bb.Warning)}function st(q){return rt(q)||!X.A.isDefined(q)?null:ct(q)?"pet":lt(q)||ut(q)?"boss":dt(q)?"pet":null}function nt(q){const K=st(q);if(null===K)return null;const z=it(q);return J.t.getItem(K,z)}function at(q){return X.A.isDefined(q)&&!rt(q)}function rt(q){return"string"==typeof q&&Object.values(et.E).includes(q)}function ot(q){var K,z,Y,Q,Z,J;return!!X.A.isDefined(q)&&(!!rt(q)||(X.A.isDefined(q.boss)||(null!==(z=null===(K=q.pets)||void 0===K?void 0:K.length)&&void 0!==z?z:0)>0||(null!==(Q=null===(Y=q.opponent)||void 0===Y?void 0:Y.length)&&void 0!==Q?Q:0)>0||(null!==(J=null===(Z=q.encounter)||void 0===Z?void 0:Z.length)&&void 0!==J?J:0)>0))}function ht(q){const{player:K}=Z.q.instance.game.rootContainer.get("ad2-c5b2");K.encounters.onPetEncountered(q)}function ct(q){var K,z;return(null!==(z=null===(K=q.encounter)||void 0===K?void 0:K.length)&&void 0!==z?z:0)>0}function dt(q){var K;return X.A.isDefined(null===(K=q.pets)||void 0===K?void 0:K[0])}function lt(q){var K;return X.A.isDefined(null===(K=q.boss)||void 0===K?void 0:K.ID)}function ut(q){return X.A.isDefined(q.opponent)}function ft(q){var K;if(!ct(q)||!X.A.isDefined(q.encounter[0].ID))return!1;const{player:z}=Z.q.instance.game.rootContainer.get("ad2-c5b2");return null!==(K=q.showNewIndicator)&&void 0!==K?K:!bt(q)&&!pt(q)&&z.hasCompletedTutorial()&&z.encounters.getPetTimesBattled(q.encounter[0].ID)<1}function bt(q){return q.revampBattleType===Q.gu.ZoneMiniboss}function pt(q){const{player:K}=Z.q.instance.game.rootContainer.get("ad2-c5b2"),{threatIndicatorLevel:z}=Z.q.instance.game.rootContainer.get("e9f-b6e7");return X.A.isDefined(q.minLevel)&&!bt(q)&&!X.A.isDefined(q.showGuideHand)&&q.minLevel-K.getLevel()>z}function vt(q){const K=[248,253,252,254,251,250,249,255],z=[188,193,192,194,191,190,189,195],Y=new tt.a(Z.q.instance.prodigy.game);return Y.init(q),q.useMetadataGear||(K.includes(Y.equipment.getHat())||Y.equipment.setHat(248),z.includes(Y.equipment.getOutfit())||Y.equipment.setOutfit(188),Y.appearance.setHair(53)),Y}function gt(q){const{requirements:K,objectiveIdPrefix:z,type:Y,includeComplete:Q}=q,Z=[];for(const[J,tt]of K.entries()){const q=Object.entries(tt);for(const[K,{text:tt,progress:et}]of q)if(X.A.isDefined(tt)){const[q,X]=et;if(q>=X&&!Q)continue;Z.push({id:`${z}-${K}-${J}`,text:tt,progress:{current:q,target:X},type:"function"==typeof Y?Y(K):Y})}}return Z}},28029:(q,K,z)=>{"use strict";z.d(K,{E:()=>J});var Y=z(62459),Q=z(95891),X=z(68910),Z=z(35120);class J{static addConfetti(q){const K=Z.q.instance.game,z=new Y._mx(q);z.name="Confetti",z.addComponent(Y.dLy);const tt=new Y.CIs;tt.xLocation.setMinMax(-8,K.width+8),tt.yLocation.setMinMax(-8,K.height+8);const et=new Y.mYY;et.point1.set(-8,-8),et.point2.set(K.width+8,-8);const{width:it,height:st}=X.Texture.WHITE,nt=new Y.Ayx;nt.callback=q=>{if(q.life=1,q.motionOffset=Q.random(2*Math.PI),q.velocity.set(Q.random(3,40,!0),80),q.angularVelocities=[Q.random(-10,10,!0),Q.random(5,12,!0),Q.random(-5,7,!0)],!q.graphic){const K=new Y._mx(q.gameObject);K.addComponent(Y.dLy),q.graphic=K.addComponent(Y.vYh),q.graphic.setTexture(X.Texture.WHITE)}q.tint=Q.sample(J.CONFETTO_COLORS),this.applyParticleTint(q)};const at=new Y.nbL;at.callback=(q,z)=>{const Y=.001*K.time.timeMS;q.life=q.position.y{"use strict";z.d(K,{U:()=>lt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(28628),tt=z(40295),et=z(90633),it=z(35120),st=z(77938),nt=z(7351),at=z(10670),rt=z(13956),ot=z(73678),ht=z(50503),ct=z(64653),dt=z(90804);class lt{static fetchProgress(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.progressData=yield this._networkHandler.getProgress(),this.progressData}))}static pushProgress(q){return(0,Y.sH)(this,void 0,void 0,(function*(){this.progressData=Z().clone(q),yield this._networkHandler.setProgress(q)}))}static isStepComplete(q){const K=Object.keys(tt.B);return K.indexOf(q)<=K.indexOf(this.progressData.step)}static getCurrentStep(){return this.progressData.step}static getNextStep(){const q=Object.values(tt.B);return q[q.indexOf(this.progressData.step)+1]}static isEndgameQuestActive(){return![tt.B.NotStarted,tt.B.PuppetMasterDefeated].includes(this.progressData.step)}static hasDefeatedPippet(){return this.isStepComplete(tt.B.PippetDefeated)}static locallyAdvanceQuest(){const q=Object.values(tt.B),K=q.indexOf(this.progressData.step);this.progressData.step=q[K+1];let z=null,Y=null;switch(this.progressData.step){case tt.B.PippetDefeated:z=4,Y=at.jT.PippetBattleWon;break;case tt.B.Guardian1Defeated:z=6,Y=at.jT.IllusionBoss1BattleWon;break;case tt.B.Guardian2Defeated:z=8,Y=at.jT.IllusionBoss2BattleWon;break;case tt.B.Guardian3Defeated:z=10,Y=at.jT.IllusionBoss3BattleWon;break;case tt.B.Guardian4Defeated:z=12,Y=at.jT.IllusionBoss4BattleWon;break;case tt.B.Guardian5Defeated:z=14,Y=at.jT.IllusionBoss5BattleWon}Y&&it.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(z,Y)}static shouldShowEndgameQuestBanner(q){return!!this.isEndgameQuestActive()&&(![ot.A_.ACADEMY,ot.A_.ARCHIVES,ot.A_.DRAGONISLE,ot.A_.TOWERTOWN].includes(q)&&(q!==ot.A_.LAMPLIGHT||!Q.Aq$.isDefined(it.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival())))}static shouldShowEndgameNootWorldMapDialogue(){return lt.progressData.step===tt.B.LastKeystoneCutsceneViewed&&!it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(et.B.FEATURE_ENDGAME_QUEST,et.B.BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE)}static getCurrentGuardianIndex(){const q=Object.values(tt.B),K=q.indexOf(this.progressData.step)-q.indexOf(tt.B.PippetDefeated);return K>=0&&K<5?K:-1}static shouldShowPuppetMasterDefeatCelebration(){const q=Date.now()-this._activePlayer.data.puppetMasterDefeatDate;return q{it.q.instance.game.broadcaster.broadcast("Prodigy.Events.Endgame.MISSED_PUPPET_MASTER_GEAR_AWARDED")}),!0)}}lt.CELEBRATION_MIN_TIME_MS=864e5,lt.CELEBRATION_MAX_TIME_MS=18144e5,lt.CELEBRATION_MAX_VIEWS=3,(0,Y.Cg)([(0,rt.b)("782-c308"),(0,Y.Sn)("design:type",nt.W)],lt,"_activePlayer",void 0),(0,Y.Cg)([(0,rt.b)("603-49ea"),(0,Y.Sn)("design:type",ct.C)],lt,"_networkHandler",void 0)},64653:(q,K,z)=>{"use strict";z.d(K,{C:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546);let J=class extends Z.D{getProgress(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Endgame.GetProgress,{},!1)}))}setProgress(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(X.D.Endgame.SetProgress,q,!1)}))}debugSetProgress(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(X.D.Endgame.Debug.SetProgress,q,!1)}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},75781:(q,K,z)=>{"use strict";z.d(K,{E:()=>at});var Y=z(62459),Q=z(99625),X=z(40295),Z=z(90633),J=z(35120),tt=z(43846),et=z(43531),it=z(10670),st=z(73678),nt=z(93867);class at{static runCollectedLastKeystoneSequence(){J.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(1,it.jT.AllGemsCollected,Z.B.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE),this.runKeystoneSequence([1408],!0)}static runAllKeystonesSequenceOnMapSetup(q){J.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(1,it.jT.AllGemsCollected,Z.B.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE),J.q.instance.prodigy.world.getCurrentZone()===st.A_.ACADEMY?this.runKeystoneSequence([1474,1476],!1,q):this.runKeystoneSequence([1474],!0,q)}static runKeystoneSequence(q,K,z){nt.U.pushProgress({step:X.B.LastKeystoneCutsceneViewed}).catch(Y.RQr.createHandler("Error setting endgame quest progress"));const Z=new et.rD,it=Z.dataProvider,st=J.q.instance.prodigy.gameContainer.get("983-05a7");let at;const rt=()=>{at.then((q=>q.destroy())).catch(Y.RQr.createHandler("Error destroying keystone dialog"))},ot=q.map((q=>({dialogueData:it.get(q),blockInput:!0})));ot.splice(ot.length-1,0,{callback:()=>at=st.loadWithDependenciesFromGUID(Q.l.AllKeystonesCelebration)}),K?ot.push({dialogueData:it.get(1409),yesButtonText:(0,tt.k)("GO_NOW"),noButtonText:(0,tt.k)("NOT_NOW"),yes:()=>{J.q.instance.prodigy.open.map({onClose:()=>{null==z||z().catch(Y.RQr.createHandler("GotAllKeystonesSequence closeCallback notNowCallback Error"))}}),rt()},no:()=>{rt(),null==z||z().catch(Y.RQr.createHandler("GotAllKeystonesSequence closeCallback notNowCallback Error"))},blockInput:!0}):ot.push({callback:()=>{rt(),null==z||z().catch(Y.RQr.createHandler("GotAllKeystonesSequence closeCallback notNowCallback Error"))}}),Z.addEvents(ot),Z.start(!0)}}},90804:(q,K,z)=>{"use strict";z.d(K,{p:()=>Y});class Y{}Y.PUPPET_MASTER_GEAR_DROPS=[{type:"hat",ID:240,N:1},{type:"outfit",ID:180,N:1},{type:"boots",ID:125,N:1},{type:"weapon",ID:251,N:1}]},87539:(q,K,z)=>{"use strict";z.d(K,{m:()=>Y});class Y{static getGuardianData(q){return z(56351)[q]}}},68607:(q,K,z)=>{"use strict";z.d(K,{n:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(82351),tt=z(28152),et=z(29834),it=z(80110);let st=Y=class extends X.uAl{constructor(){super(...arguments),this._centerFX=[],this._centerThresholds=[],this._centerAnimationNames=[],this._centerSounds=[],this._centerSpellIDs=[],this._leftFX=[],this._leftThresholds=[],this._leftAnimationNames=[],this._leftSounds=[],this._rightFX=[],this._rightThresholds=[],this._rightAnimationNames=[],this._rightSounds=[],this._centerIndex=0,this._leftIndex=0,this._rightIndex=0}setDamage(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={fx:K?this._leftFX:this._rightFX,index:K?this._leftIndex:this._rightIndex,thresholds:K?this._leftThresholds:this._rightThresholds,animations:K?this._leftAnimationNames:this._rightAnimationNames,soundFX:K?this._leftSounds:this._rightSounds},Z=this._centerSpellIDs.includes(z);if(!Z&&!this.sideThresholdMet(q,Q))return;this.startScreenShake(),yield X.Egh.timeout(Y.ANIMATION_DELAY_MS),Z&&(this._centerIndex=this.setDamagePercentage(1,{fx:this._centerFX,index:this._centerIndex,thresholds:this._centerThresholds,animations:this._centerAnimationNames,soundFX:this._centerSounds}));const J=this.setDamagePercentage(q,Q);K?this._leftIndex=J:this._rightIndex=J,yield X.Egh.timeout(Y.END_DELAY_MS)}))}getAnimators(){return[...this._leftFX,...this._centerFX,...this._rightFX]}startScreenShake(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield X.Egh.timeout(Y.SHAKE_DELAY_MS),this._screenShake.run()}))}sideThresholdMet(q,K){return!(K.index>=K.fx.length)&&q>=K.thresholds[K.index]}setDamagePercentage(q,K){if(K.index>=K.fx.length)return K.index;let z=K.thresholds[K.index];const Q=[];for(;q>=z&&(K.fx[K.index].playAnimation(K.animations[K.index],!1),Q.push(K.soundFX[K.index]),K.index+=1,!(K.index>=K.fx.length));)z=K.thresholds[K.index];return 1===Q.length?Z.q.instance.prodigy.audio.playSFXFromGUID(Q[0]):Q.length>1&&(Q.includes(J.B.Sfx_large_explosion_with_glass)?Z.q.instance.prodigy.audio.playSFXFromGUID(J.B.Sfx_large_explosion_with_glass):Z.q.instance.prodigy.audio.playSFXFromGUID(Y.DEFAULT_EXPLOSION_SOUND_FOR_MANY)),K.index}};st.SHAKE_DELAY_MS=200,st.ANIMATION_DELAY_MS=400,st.END_DELAY_MS=300,st.DEFAULT_EXPLOSION_SOUND_FOR_MANY=J.B.Sfx_long_explosion_with_rubble_A,(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(et.j),(0,Q.Sn)("design:type",Array)],st.prototype,"_centerFX",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.g11)(),(0,Q.Sn)("design:type",Array)],st.prototype,"_centerThresholds",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],st.prototype,"_centerAnimationNames",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.gfw)(J.B),(0,Q.Sn)("design:type",Array)],st.prototype,"_centerSounds",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],st.prototype,"_centerSpellIDs",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(et.j),(0,Q.Sn)("design:type",Array)],st.prototype,"_leftFX",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.g11)(),(0,Q.Sn)("design:type",Array)],st.prototype,"_leftThresholds",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],st.prototype,"_leftAnimationNames",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.gfw)(J.B),(0,Q.Sn)("design:type",Array)],st.prototype,"_leftSounds",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(et.j),(0,Q.Sn)("design:type",Array)],st.prototype,"_rightFX",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.g11)(),(0,Q.Sn)("design:type",Array)],st.prototype,"_rightThresholds",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],st.prototype,"_rightAnimationNames",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.gfw)(J.B),(0,Q.Sn)("design:type",Array)],st.prototype,"_rightSounds",void 0),(0,Q.Cg)([(0,X.MnK)(it.g),(0,Q.Sn)("design:type",it.g)],st.prototype,"_screenShake",void 0),st=Y=(0,Q.Cg)([(0,X.EVk)("DynamicBattleBackgroundFX",tt.Y.effect)],st)},44367:(q,K,z)=>{"use strict";z.d(K,{z:()=>tt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(13956);class tt extends Q.s3P{static getFeatureVariables(){var q;return Z().cloneDeep(null===(q=this._featureProvider)||void 0===q?void 0:q.getFeatureValue(this._featureName))}static isFeatureEnabled(){var q;return null===(q=this._featureProvider)||void 0===q?void 0:q.isOn(this._featureName)}}(0,Y.Cg)([(0,J.b)("9fe-5b45"),(0,Y.Sn)("design:type",Object)],tt,"_featureProvider",void 0)},82885:(q,K,z)=>{"use strict";z.d(K,{J:()=>J});var Y=z(95891),Q=z.n(Y),X=z(28085),Z=z(44367);class J extends Z.z{static isFeatureEnabled(){var q,K;return super.isFeatureEnabled()&&null!==(K=null===(q=this.getVariables())||void 0===q?void 0:q.enabled)&&void 0!==K&&K}static getVariables(){return this.getDefaultConfigCloneWithOverrides()}static getDefaultConfigCloneWithOverrides(){const q=this.getFeatureVariables();return q?(0,X.ES)(this._defaultConfig,q):Q().cloneDeep(this._defaultConfig)}}},84399:(q,K,z)=>{"use strict";z.d(K,{R:()=>et});var Y=z(8674),Q=z(99625),X=z(29887),Z=z(13956),J=z(73678),tt=z(82885);class et extends tt.J{static isFeatureEnabled(){return this._featureRequirements.meetsRequirementsDeprecated(66)&&super.isFeatureEnabled()}static isZoneAvailable(q){var K;return null===(K=this._defaultConfig.zones)||void 0===K?void 0:K.includes(q)}static sendActivationEvent(){this._featureRequirements.meetsRequirementsDeprecated(66)&&this._segmentExperimentTracker.track("campaign-replay")}}et._featureName="campaign-replay",et._defaultConfig={enabled:!1,maps:{"forest_hard-A3":Q.l.ForestA3Hard,"forest_hard-A4":Q.l.ForestA4Hard,"forest_hard-A5":Q.l.ForestA5Hard,"forest_hard-B5":Q.l.ForestB5Hard,"forest_hard-B6":Q.l.ForestB6Hard,"forest_hard-B7":Q.l.ForestB7Hard,"forest_hard-B8":Q.l.ForestB8Hard,"forest_hard-C4":Q.l.ForestC4Hard,"forest_hard-C7":Q.l.ForestC7Hard,"forest_hard-C8":Q.l.ForestC8Hard,"forest_hard-D3":Q.l.ForestD3Hard,"shiverchill_hard-A2":Q.l.ShiverchillA2Hard,"shiverchill_hard-A3":Q.l.ShiverchillA3Hard,"shiverchill_hard-A4":Q.l.ShiverchillA4Hard,"shiverchill_hard-A5":Q.l.ShiverchillA5Hard,"shiverchill_hard-A6":Q.l.ShiverchillA6Hard,"shiverchill_hard-A7":Q.l.ShiverchillA7Hard,"shiverchill_hard-A9":Q.l.ShiverchillA9Hard,"shiverchill_hard-A10":Q.l.ShiverchillA10Hard,"shiverchill_hard-A11":Q.l.ShiverchillA11Hard,"shiverchill_hard-B1":Q.l.ShiverchillB1Hard,"shiverchill_hard-B2":Q.l.ShiverchillB2Hard,"shiverchill_hard-B3":Q.l.ShiverchillB3Hard,"shiverchill_hard-B6":Q.l.ShiverchillB6Hard,"shiverchill_hard-B7":Q.l.ShiverchillB7Hard,"shiverchill_hard-B8":Q.l.ShiverchillB8Hard,"shiverchill_hard-B9":Q.l.ShiverchillB9Hard,"shiverchill_hard-B10":Q.l.ShiverchillB10Hard,"skywatch_hard-A0":Q.l.SkywatchA0Hard,"skywatch_hard-A1":Q.l.SkywatchA1Hard,"skywatch_hard-B1":Q.l.SkywatchB1Hard,"skywatch_hard-B2":Q.l.SkywatchB2Hard,"skywatch_hard-B3":Q.l.SkywatchB3Hard,"skywatch_hard-C1":Q.l.SkywatchC1Hard,"skywatch_hard-C2":Q.l.SkywatchC2Hard,"skywatch_hard-C3":Q.l.SkywatchC3Hard,"skywatch_hard-C4":Q.l.SkywatchC4Hard,"skywatch_hard-D1":Q.l.SkywatchD1Hard,"skywatch_hard-D2":Q.l.SkywatchD2Hard,"skywatch_hard-D3":Q.l.SkywatchD3Hard,"skywatch_hard-E1":Q.l.SkywatchE1Hard,"skywatch_hard-E2":Q.l.SkywatchE2Hard,"skywatch_hard-E3":Q.l.SkywatchE3Hard,"skywatch_hard-E4":Q.l.SkywatchE4Hard,"skywatch_hard-E5":Q.l.SkywatchE5Hard,"bonfire_spire_hard-A1":Q.l.BonfireSpireA1Hard,"bonfire_spire_hard-A4":Q.l.BonfireSpireA4Hard,"bonfire_spire_hard-B1":Q.l.BonfireSpireB1Hard,"bonfire_spire_hard-B2":Q.l.BonfireSpireB2Hard,"bonfire_spire_hard-B4":Q.l.BonfireSpireB4Hard,"bonfire_spire_hard-B5":Q.l.BonfireSpireB5Hard,"bonfire_spire_hard-C1":Q.l.BonfireSpireC1Hard,"bonfire_spire_hard-C2":Q.l.BonfireSpireC2Hard,"bonfire_spire_hard-C3":Q.l.BonfireSpireC3Hard,"bonfire_spire_hard-C4":Q.l.BonfireSpireC4Hard,"bonfire_spire_hard-C6":Q.l.BonfireSpireC6Hard,"bonfire_spire_hard-D1":Q.l.BonfireSpireD1Hard,"bonfire_spire_hard-D2":Q.l.BonfireSpireD2Hard,"bonfire_spire_hard-D3":Q.l.BonfireSpireD3Hard,"bonfire_spire_hard-D4":Q.l.BonfireSpireD4Hard,"bonfire_spire_hard-D5":Q.l.BonfireSpireD5Hard,"bonfire_spire_hard-D6":Q.l.BonfireSpireD6Hard,"bonfire_spire_hard-E5":Q.l.BonfireSpireE5Hard,"bonfire_spire_hard-E6":Q.l.BonfireSpireE6Hard,"shipwreck_shore_hard-A1":Q.l.ShipwreckShoreA1Hard,"shipwreck_shore_hard-A2":Q.l.ShipwreckShoreA2Hard,"shipwreck_shore_hard-A3":Q.l.ShipwreckShoreA3Hard,"shipwreck_shore_hard-A4":Q.l.ShipwreckShoreA4Hard,"shipwreck_shore_hard-A5":Q.l.ShipwreckShoreA5Hard,"shipwreck_shore_hard-A7":Q.l.ShipwreckShoreA7Hard,"shipwreck_shore_hard-B2":Q.l.ShipwreckShoreB2Hard,"shipwreck_shore_hard-B4":Q.l.ShipwreckShoreB4Hard,"shipwreck_shore_hard-B5":Q.l.ShipwreckShoreB5Hard,"shipwreck_shore_hard-B6":Q.l.ShipwreckShoreB6Hard,"shipwreck_shore_hard-B7":Q.l.ShipwreckShoreB7Hard,"shipwreck_shore_hard-B8":Q.l.ShipwreckShoreB8Hard,"shipwreck_shore_hard-B10":Q.l.ShipwreckShoreB10Hard,"shipwreck_shore_hard-B11":Q.l.ShipwreckShoreB11Hard,"shipwreck_shore_hard-B12":Q.l.ShipwreckShoreB12Hard,"shipwreck_shore_hard-B13":Q.l.ShipwreckShoreB13Hard,"shipwreck_shore_hard-C6":Q.l.ShipwreckShoreC6Hard,"shipwreck_shore_hard-C7":Q.l.ShipwreckShoreC7Hard,"shipwreck_shore_hard-C8":Q.l.ShipwreckShoreC8Hard,"shipwreck_shore_hard-C9":Q.l.ShipwreckShoreC9Hard,"shipwreck_shore_hard-C10":Q.l.ShipwreckShoreC10Hard,"shipwreck_shore_hard-C11":Q.l.ShipwreckShoreC11Hard,"shipwreck_shore_hard-C12":Q.l.ShipwreckShoreC12Hard},zones:[J.A_.FOREST,J.A_.FORESTHARD,J.A_.SHIVERCHILLHARD,J.A_.BONFIRE,J.A_.BONFIREHARD,J.A_.SKYWATCH,J.A_.SKYWATCHHARD,J.A_.SHIPWRECKHARD]},(0,Y.Cg)([(0,Z.b)("785-5cf4"),(0,Y.Sn)("design:type",X.p)],et,"_segmentExperimentTracker",void 0),(0,Y.Cg)([(0,Z.b)("11f-118a"),(0,Y.Sn)("design:type",Object)],et,"_featureRequirements",void 0)},15218:(q,K,z)=>{"use strict";z.d(K,{A:()=>Z});var Y=z(8674),Q=z(62459),X=z(13956);class Z extends Q.s3P{static get featureVariables(){var q;return this._featureVariables||(this._featureVariables=null===(q=Z._featureProvider)||void 0===q?void 0:q.getFeatureValue("difficulty-progression")),this._featureVariables}static get useRevisedDifficulty(){var q,K;return null!==(K=null===(q=this.featureVariables)||void 0===q?void 0:q.useRevisedDifficulty)&&void 0!==K&&K}static get experimentSpawnVariation(){var q;return null===(q=this.featureVariables)||void 0===q?void 0:q.spawnVariationKey}}(0,Y.Cg)([(0,X.b)("9fe-5b45"),(0,Y.Sn)("design:type",Object)],Z,"_featureProvider",void 0)},71796:(q,K,z)=>{"use strict";z.d(K,{k:()=>Z});var Y=z(8674),Q=z(62459),X=z(13956);class Z extends Q.s3P{static get useRevisedDifficulty(){return this._featureProvider.isOn("difficulty-scaling")}}(0,Y.Cg)([(0,X.b)("9fe-5b45"),(0,Y.Sn)("design:type",Object)],Z,"_featureProvider",void 0)},81137:(q,K,z)=>{"use strict";z.d(K,{x:()=>Q});var Y=z(82885);class Q extends Y.J{}Q._featureName="hud-revamp-2025",Q._defaultConfig={enabled:!1}},34616:(q,K,z)=>{"use strict";z.d(K,{N:()=>X});const Y={enableMemberJar:!0,maximumSavedBattleCount:10};var Q=z(44367);class X extends Q.z{static get maximumSavedBattleCount(){return this.featureVariables.maximumSavedBattleCount}static get featureVariables(){var q;return null!==(q=this.getFeatureVariables())&&void 0!==q?q:Y}}X._featureName="member-jar"},17148:(q,K,z)=>{"use strict";z.d(K,{k:()=>Z});var Y=z(62459),Q=z(50788),X=z(76277);class Z{static get cachedDisabledEvolutionFeature(){return Y.Aq$.isDefined(this._cachedDisabledEvolutionFeature)||(this._cachedDisabledEvolutionFeature=(0,X.G)(Q.F)),this._cachedDisabledEvolutionFeature}}Z._cachedDisabledEvolutionFeature=void 0},46725:(q,K,z)=>{"use strict";z.d(K,{D:()=>Z});var Y=z(99625),Q=z(73678),X=z(82885);class Z extends X.J{static isPrefabZoneAvailable(q){const K=this.getVariables();return this.isFeatureEnabled()&&K.zones.includes(q)||K.generallyAvailableZones.includes(q)}static getAvailablePrefabMap(q){const K=this.getVariables();return this.isFeatureEnabled()&&K.maps[q]||K.generallyAvailableMaps[q]}}Z._featureName="prefab-scenes",Z._defaultConfig={enabled:!1,zones:[],maps:{},generallyAvailableZones:[Q.A_.FOREST,Q.A_.SHIVERCHILL,Q.A_.BONFIRE,Q.A_.SKYWATCH,Q.A_.SHIPWRECK,Q.A_.MOON],generallyAvailableMaps:{"forest-A3":Y.l.ForestA3,"forest-A4":Y.l.ForestA4,"forest-A5":Y.l.ForestA5,"forest-B5":Y.l.ForestB5,"forest-B6":Y.l.ForestB6,"forest-B7":Y.l.ForestB7,"forest-B8":Y.l.ForestB8,"forest-C4":Y.l.ForestC4,"forest-C7":Y.l.ForestC7,"forest-C8":Y.l.ForestC8,"forest-D3":Y.l.ForestD3,"shiverchill-A10":Y.l.ShiverchillA10,"shiverchill-A11":Y.l.ShiverchillA11,"shiverchill-A2":Y.l.ShiverchillA2,"shiverchill-A3":Y.l.ShiverchillA3,"shiverchill-A4":Y.l.ShiverchillA4,"shiverchill-A5":Y.l.ShiverchillA5,"shiverchill-A6":Y.l.ShiverchillA6,"shiverchill-A7":Y.l.ShiverchillA7,"shiverchill-A9":Y.l.ShiverchillA9,"shiverchill-B1":Y.l.ShiverchillB1,"shiverchill-B10":Y.l.ShiverchillB10,"shiverchill-B2":Y.l.ShiverchillB2,"shiverchill-B3":Y.l.ShiverchillB3,"shiverchill-B6":Y.l.ShiverchillB6,"shiverchill-B7":Y.l.ShiverchillB7,"shiverchill-B8":Y.l.ShiverchillB8,"shiverchill-B9":Y.l.ShiverchillB9,"bonfire_spire-A1":Y.l.BonfireSpireA1,"bonfire_spire-A4":Y.l.BonfireSpireA4,"bonfire_spire-B1":Y.l.BonfireSpireB1,"bonfire_spire-B2":Y.l.BonfireSpireB2,"bonfire_spire-B4":Y.l.BonfireSpireB4,"bonfire_spire-B5":Y.l.BonfireSpireB5,"bonfire_spire-C1":Y.l.BonfireSpireC1,"bonfire_spire-C2":Y.l.BonfireSpireC2,"bonfire_spire-C3":Y.l.BonfireSpireC3,"bonfire_spire-C4":Y.l.BonfireSpireC4,"bonfire_spire-C6":Y.l.BonfireSpireC6,"bonfire_spire-D1":Y.l.BonfireSpireD1,"bonfire_spire-D2":Y.l.BonfireSpireD2,"bonfire_spire-D3":Y.l.BonfireSpireD3,"bonfire_spire-D4":Y.l.BonfireSpireD4,"bonfire_spire-D5":Y.l.BonfireSpireD5,"bonfire_spire-D6":Y.l.BonfireSpireD6,"bonfire_spire-E5":Y.l.BonfireSpireE5,"bonfire_spire-E6":Y.l.BonfireSpireE6,"shipwreck_shore-A1":Y.l.ShipwreckShoreA1,"shipwreck_shore-A2":Y.l.ShipwreckShoreA2,"shipwreck_shore-A3":Y.l.ShipwreckShoreA3,"shipwreck_shore-A4":Y.l.ShipwreckShoreA4,"shipwreck_shore-A5":Y.l.ShipwreckShoreA5,"shipwreck_shore-A7":Y.l.ShipwreckShoreA7,"shipwreck_shore-B10":Y.l.ShipwreckShoreB10,"shipwreck_shore-B11":Y.l.ShipwreckShoreB11,"shipwreck_shore-B12":Y.l.ShipwreckShoreB12,"shipwreck_shore-B13":Y.l.ShipwreckShoreB13,"shipwreck_shore-B2":Y.l.ShipwreckShoreB2,"shipwreck_shore-B4":Y.l.ShipwreckShoreB4,"shipwreck_shore-B5":Y.l.ShipwreckShoreB5,"shipwreck_shore-B6":Y.l.ShipwreckShoreB6,"shipwreck_shore-B7":Y.l.ShipwreckShoreB7,"shipwreck_shore-B8":Y.l.ShipwreckShoreB8,"shipwreck_shore-C10":Y.l.ShipwreckShoreC10,"shipwreck_shore-C11":Y.l.ShipwreckShoreC11,"shipwreck_shore-C12":Y.l.ShipwreckShoreC12,"shipwreck_shore-C6":Y.l.ShipwreckShoreC6,"shipwreck_shore-C7":Y.l.ShipwreckShoreC7,"shipwreck_shore-C8":Y.l.ShipwreckShoreC8,"shipwreck_shore-C9":Y.l.ShipwreckShoreC9,"skywatch-A0":Y.l.SkywatchA0,"skywatch-A1":Y.l.SkywatchA1,"skywatch-B1":Y.l.SkywatchB1,"skywatch-B2":Y.l.SkywatchB2,"skywatch-B3":Y.l.SkywatchB3,"skywatch-C1":Y.l.SkywatchC1,"skywatch-C2":Y.l.SkywatchC2,"skywatch-C3":Y.l.SkywatchC3,"skywatch-C4":Y.l.SkywatchC4,"skywatch-D1":Y.l.SkywatchD1,"skywatch-D2":Y.l.SkywatchD2,"skywatch-D3":Y.l.SkywatchD3,"skywatch-E1":Y.l.SkywatchE1,"skywatch-E2":Y.l.SkywatchE2,"skywatch-E3":Y.l.SkywatchE3,"skywatch-E4":Y.l.SkywatchE4,"skywatch-E5":Y.l.SkywatchE5,"moon-A1":Y.l.MoonA1,"moon-B1":Y.l.MoonB1,"moon-C1":Y.l.MoonC1,"moon-D1":Y.l.MoonD1,"academy-CR1":Y.l.AcademyCR1,"academy-CR2":Y.l.AcademyCR2,"academy-GH1":Y.l.AcademyGH1,"academy-GH2":Y.l.AcademyGH2,"academy-GH3":Y.l.AcademyGH3,"lamplight-C3":Y.l.LamplightC3,"springfest_grotto_bunny-A3":Y.l.SpringfestGrottoBunnyA3,"springfest_grotto_fox-A3":Y.l.SpringfestGrottoFoxA3,"springfest_grotto_bunny-A9":Y.l.SpringfestGrottoBunnyA9,"springfest_grotto_fox-A9":Y.l.SpringfestGrottoFoxA9,"springfest_grotto_bunny-B2":Y.l.SpringfestGrottoBunnyB2,"springfest_grotto_fox-B2":Y.l.SpringfestGrottoFoxB2,"springfest_grotto_bunny-B7":Y.l.SpringfestGrottoBunnyB7,"springfest_grotto_fox-B7":Y.l.SpringfestGrottoFoxB7}}},66207:(q,K,z)=>{"use strict";z.d(K,{D:()=>X});var Y=z(95525),Q=z(44367);class X extends Q.z{static getVariables(){return super.getFeatureVariables()}static isFeatureEnabled(){var q;return super.isFeatureEnabled()&&(null===(q=this.getVariables())||void 0===q?void 0:q.enabled)}static getVariant(){const q=this.getVariables();return this.isFeatureEnabled()&&(null==q?void 0:q.variant)?q.variant:0}static getVariantForUpgrading(){if(this.isFeatureEnabled()){let q=this.getVariant();return 0===q&&(q=2),q}return 0}}X._featureName=Y.w.key},36233:(q,K,z)=>{"use strict";z.d(K,{p:()=>et});var Y=z(8674),Q=z(38170),X=z(29887),Z=z(13956),J=z(96797),tt=z(44367);class et extends tt.z{static isFeatureEnabled(){var q;return super.isFeatureEnabled()&&(null===(q=this.getFeatureVariables())||void 0===q?void 0:q.enabled)}static getVariables(){return super.getFeatureVariables()}static sendActivationEvent(){const q=this.getVariables();q&&(Q.r.isDateWithinRange(Date.now(),q.startDate,q.endDate)||q.enabled&&J.P.isOfferInGracePeriod(q))&&this._segmentExperimentTracker.track("segmented-offers")}}et._featureName="segmented-offers",(0,Y.Cg)([(0,Z.b)("785-5cf4"),(0,Y.Sn)("design:type",X.p)],et,"_segmentExperimentTracker",void 0)},64868:(q,K,z)=>{"use strict";z.d(K,{_:()=>Q});var Y=z(82885);class Q extends Y.J{static hasDefeatedPetStore(){const q=this.getVariables();return this.isFeatureEnabled()&&!!(null==q?void 0:q.defeatedPetStore)}static getPetCostTableVariantKey(){var q;const K=this.getVariables();return this.isFeatureEnabled()&&null!==(q=null==K?void 0:K.petCostTableVariantKey)&&void 0!==q?q:""}static getExcludedCategoriesFromLegacyStore(){var q;if(!this.isFeatureEnabled())return[];const K=this.getVariables();return null!==(q=null==K?void 0:K.excludedCategoriesFromLegacyStore)&&void 0!==q?q:[]}static hasUnifiedStore(){var q;const K=this.getVariables();return this.isFeatureEnabled()&&null!==(q=null==K?void 0:K.hasUnifiedStore)&&void 0!==q&&q}static areBundlesEnabled(){var q;const K=this.getVariables();return this.isFeatureEnabled()&&null!==(q=null==K?void 0:K.enableBundles)&&void 0!==q&&q}static isFeatureEnabled(){var q,K;return super.isFeatureEnabled()&&null!==(K=null===(q=this.getVariables())||void 0===q?void 0:q.enabled)&&void 0!==K&&K}}Q._featureName="store-revamp",Q._defaultConfig={enabled:!1,defeatedPetStore:{expireAtLocalHour:4,battlesToPrompt:3},hasUnifiedStore:!1,petCostTableVariantKey:"",excludedCategoriesFromLegacyStore:["Pets"],enableBundles:!1}},53151:(q,K,z)=>{"use strict";z.d(K,{h:()=>Q});var Y=z(44367);class Q extends Y.z{static getVariables(){return super.getFeatureVariables()}static get autoPopTreasureTrack(){var q;const K=this.getVariables();return this.isFeatureEnabled()&&null!==(q=null==K?void 0:K.autoPopTreasureTrack)&&void 0!==q&&q}static isFeatureEnabled(){var q;return super.isFeatureEnabled()&&(null===(q=this.getVariables())||void 0===q?void 0:q.enabled)}}Q._featureName="treasure-track-ux"},35488:(q,K,z)=>{"use strict";z.d(K,{J:()=>nt});var Y=z(8674),Q=z(79687),X=z(62459),Z=z(13956),J=z(7001);const tt=(0,z(77601).gb)({key:"featured-spawn",activateAssociatedExperiments:0,default:{enabled:!0}});var et=z(76277),it=z(47969),st=z(12596);let nt=class{constructor(){this.FEATURED_SPAWN_ID="featured-spawn"}loadData(){return(0,Y.sH)(this,void 0,void 0,(function*(){try{const q=yield this._networkHandler.getFeaturedSpawnData();this._cachedData=q}catch(q){this._cachedData=void 0,X.VyI.log(`Error loading Featured Spawn Data: ${q}`,X.$bb.Error)}}))}cacheData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){q?this._cachedData=q:yield this.loadData()}))}getCachedData(){return this._cachedData}getTimeUntilExpiry(){var q;const K=st.R.parseDateToTimestamp(null===(q=this._cachedData)||void 0===q?void 0:q.endDate);return void 0!==K?Math.max(0,K-Date.now()):0}shouldShowMapPin(q,K){return this._featureRequirements.meetsRequirementsDeprecated(72)&&this.isActive()&&this.isZoneValid(q,K)&&!this.isOnCooldown()}isActive(){if(!this._cachedData)return!1;if(!(0,et.G)(tt).enabled)return!1;const q=Date.now(),K=st.R.parseDateToTimestamp(this._cachedData.startDate),z=st.R.parseDateToTimestamp(this._cachedData.endDate);return!(void 0!==K&&K>q)&&(!(void 0!==z&&z{"use strict";z.d(K,{t:()=>Y});const Y=(0,z(77601).gb)({key:"festival-launch-modal",default:!1,activateAssociatedExperiments:0})},51540:(q,K,z)=>{"use strict";z.d(K,{v:()=>Z});var Y=z(8674),Q=z(48417),X=z(67238);class Z extends X.D{completePastFestivals(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Q.D.WeekendEvents.CompletePastFestivals,{},!0)}))}callFestivalSchedulerRouteDebug(){return(0,Y.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}getCurrentEventsData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Q.D.WeekendEvents.GetCurrentEventsData,{},!1)}))}getFestivalConfigData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Q.D.WeekendEvents.GetFestivalConfigData,{},!1)}))}getChestData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.call(Q.D.Festival.GetChestData,{chestID:q},!0)}))}setChestDate(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.call(Q.D.Festival.SetChestDate,{chestID:q,newDateMs:K},!0)}))}setChestSpins(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.call(Q.D.Festival.SetChestSpins,{chestID:q,newSpins:K},!0)}))}getSeenCompletedTaskData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.call(Q.D.Festival.GetSeenCompletedTaskData,{},!0)}))}setCompletedTasksSeen(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.call(Q.D.Festival.SetCompletedTasksSeen,{festivalQuestId:q,taskIds:K},!0)}))}}},43754:(q,K,z)=>{"use strict";z.d(K,{W:()=>Ot});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(62248),J=z(26077),tt=z(24521),et=z(10471),it=z(77601);const st=(0,it.gb)({key:"allow-spending-earned-magicoin",activateAssociatedExperiments:1,default:!1}),nt=(0,it.gb)({key:"force-mem",activateAssociatedExperiments:1,default:!1});var at,rt=z(37016),ot=z(80003),ht=z(65240),ct=z(35120),dt=z(23029),lt=z(1195),ut=z(77938);!function(q){q.Rescue="rescue",q.Evolution="evolution",q.LostPet="lostPetCost"}(at||(at={}));var ft=z(82885);class bt extends ft.J{static get petCostTableVariationKey(){var q;return null===(q=this.getVariables())||void 0===q?void 0:q.petCostTableVariantKey}}bt._featureName="pet-capture-and-evo-costs",bt._defaultConfig={enabled:!1,petCostTableVariantKey:"evoCostRarityBaseV2"};var pt,vt=z(73797),gt=z(46784),mt=z(65050),yt=z(76277),_t=z(68152),Et=z(22023),wt=z(71586),Tt=z(30226),St=z(47968),At=z(80105),Ct=z(44094);let Ot=pt=class{constructor(q,K,z){this.onBalanceChanged=new Q.HN0,this.onAffordableCacheChanged=new Q.HN0,this._cachedAffordablePetsAmount=-1,this._cachedPetCosts=new Map,this._previousBalances=new Map,this._secureInventory=q,this._secureInventory.onChange.add((q=>{"currency"===q.type&&et.B.includes(q.id)&&(this._cachedAffordablePetsAmount=-1,this.onBalanceChanged.dispatch({currency:q.id,value:q.quantity}),this._previousBalances.set(q.id,q.quantity))}),this),ct.q.instance.game.broadcaster.addAppListener(vt.ig.AnyLevelUp,(()=>{this._cachedAffordablePetsAmount=-1}),this,null,!0),et.B.forEach((q=>{this._previousBalances.set(q,this.getBalance(q))})),K.getActiveMembershipId().catch((()=>null)).then((q=>{Q.Aq$.isDefined(q)&&this.onBalanceChanged.add((Y=>{var Q,X,Z,J;const tt=K.player;null!==(Q=(J=tt.data).seenHardCurrencyIds)&&void 0!==Q||(J.seenHardCurrencyIds=[]),tt.data.seenHardCurrencyIds.includes(Y.currency)||(tt.updated=!0,tt.data.seenHardCurrencyIds.push(Y.currency),z.item.sendItemReceivedEvent(Y.currency,null===(Z=null===(X=ut.t.getItem("currency",Y.currency))||void 0===X?void 0:X.data)||void 0===Z?void 0:Z.name,"currency",Y.value,{transaction_id:q,source_type:ht.C.InitialMemberBonus}))}),this)}),Q.RQr.createHandler("Unable to track initial hard currency balance"))}destroy(){this.onBalanceChanged.dispose(),this.onAffordableCacheChanged.dispose(),this._secureInventory.onChange.removeAll(this),ct.q.instance.game.broadcaster.removeAppListener(vt.ig.AnyLevelUp,this)}getBalance(q){var K,z;return null!==(z=null===(K=this._secureInventory.get({type:"currency",id:q}))||void 0===K?void 0:K.quantity)&&void 0!==z?z:0}getPreviousBalance(q){var K;return null!==(K=this._previousBalances.get(q))&&void 0!==K?K:0}canAfford(q){return!Q.Aq$.isDefined(q)||(!this.isHardCurrencyMemberLocked(q.value)||!et.h.includes(q.currency))&&q.value<=this.getBalance(q.currency)}isHardCurrencyMemberLocked(q=0){const K=this.getBalance(27);return!((0,yt.G)(st)&&q<=K)&&(!!(0,yt.G)(nt)&&!ct.q.instance.prodigy.gameContainer.get("782-c308").hasMembership())}spend(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!Q.Aq$.isDefined(q))return;const z=this._segment.item.beginSecureItemTransaction();yield this._networkHandler.spend(q,K.transaction_id),z.flush(K)}))}grantCaptureTutorialMagicoin(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this._segment.item.beginSecureItemTransaction(),z="Tutorial";yield this._networkHandler.grantCaptureTutorialMagicoin(z),K.flush(Object.assign({transaction_id:z,source_type:ht.C.Tutorial},q))}))}claimAllowances(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this._segment.item.beginSecureItemTransaction(),{backpackRewards:z}=yield this._networkHandler.claimAllowances(q),Y={};if(Y.transaction_id=Ct.$.generateUID(),(0,yt.G)(ot.d).enabled)Y.source_type=ht.C.WizardBank,Y.source_id=ht.C.WizardBank,Y.source_name=ht.C.WizardBank,Y.instance_type=mt.N.ShopVisit,Y.instance_id=this._segment.featureCommon.getCurrentInterfaceID(gt.B.WizardBank);else{const q=yield ct.q.instance.prodigy.gameContainer.get("9a2-c1c3").getCurrentBattlePassData().catch((q=>(Q.RQr.logError(q,"Error fetching battle pass for analytics"),null)));q&&(Y.source_type=ht.C.BattlePass,Y.source_id=`${q.getQuestID()}-ultra-bonus-${wt.R.getCurrentMonthName()}`,Y.source_name="Ultra Bonus",Y.instance_type=mt.N.BattlePass,Y.instance_id=q.getQuestID())}for(const q of z)Tt.J.bagItem(q,ct.q.instance.game,"got-item",void 0,Y);K.flush(Y)}))}getAllowanceClaimData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._networkHandler.getAllowanceClaimData()}))}petAcquisitionCost(q,K){var z;const Y=+q,X=this._cachedPetCosts.get(Y);if(null==X?void 0:X.has(K))return{currency:27,value:X.get(K)};if(!(K===Z.l6.Evolution||K===Z.l6.Rescue))return;const tt=ut.t.getItem("pet",q);if(!(null==tt?void 0:tt.data))return void Q.VyI.log(`petAcquisitionCost: Pet data does not exist for pet: ${q}`,Q.$bb.Error);const et=this.getTables().variants[bt.petCostTableVariationKey],it=J.$N[tt.data.rarity]+(null!==(z=J.gW[tt.data.category])&&void 0!==z?z:""),st=Et.P8.GetEvolutionaryLine(tt),nt=st.length,at=1+st.indexOf(Y);try{const q=et[it][nt][at][K];if(Q.VyI.log(`The pet acquisition cost for pet ${tt.ID} (${tt.name}) is ${q}`,Q.$bb.Info,{variation:bt.petCostTableVariationKey,kind:it,totalEvolutionLevels:nt,evolutionLevel:at,source:K,evolutionId:Y}),0===q)return;return this._cachedPetCosts.has(Y)||this._cachedPetCosts.set(Y,new Map),this._cachedPetCosts.get(Y).set(K,q),{currency:27,value:q}}catch(rt){throw Q.VyI.log("Pet evolution does not fit cost tables",Q.$bb.Error,{kind:it,totalEvolutionLevels:nt,evolutionLevel:at,source:K,evolutionId:Y}),rt}}petMergeIngredientCost(q){var K,z,Y,X,et,it;const st=+q,nt=ut.t.getItem("pet",st);(0,_t.v)(null==nt?void 0:nt.data,`Pet data does not exist for pet: ${q}`);const at=dt.R.loadData(tt.r.PetMergeCosts_json),ot=rt._T,ht=at.mergeCostDefaults.variants[ot.defaultPetCostTableVariantKey],ct=at.mergeCostOverrides.variants[ot.overridePetCostTableVariantKey],lt=J.$N[nt.data.rarity]+(null!==(K=J.gW[nt.data.category])&&void 0!==K?K:""),ft=null!==(Y=null===(z=nt.data.evolution)||void 0===z?void 0:z.totalEvos)&&void 0!==Y?Y:0,bt=null!==(et=null===(X=nt.data.evolution)||void 0===X?void 0:X.tier)&&void 0!==et?et:0;(0,_t.v)(ft>0&&bt>0,`Evolution data does not exist for pet: ${q}`);try{return{currency:27,value:Q.Aq$.isDefined(ct)&&Q.Aq$.isDefined(null===(it=ct[st])||void 0===it?void 0:it.mergeBaseCost)?ct[st].mergeBaseCost:ht[lt][ft][bt][Z.l6.Merge]}}catch(pt){throw Q.VyI.log("Pet is not found in merge cost tables",Q.$bb.Error,{kind:lt,totalEvolutionLevels:ft,evolutionLevel:bt,petId:st}),pt}}postProcessPets(){var q;const K=this.getTables().levelCapsEvolutionVariant[pt.CONSTANTS_DEFAULT.evolutionLevelCapVariantKey],z=ut.t.getCategoryItems("pet"),Y=this.collectPetEvolutionsByDestinationPetId(z);for(const Q of z){const z=Y.get(Q.ID);if(!z)continue;let X=-2;for(let K=Q.ID;K;K=null===(q=Y.get(K))||void 0===q?void 0:q.evolvedFrom)X++;z.curve.lvl=K.level[X]}}collectPetEvolutionsByDestinationPetId(q){const K=new Map;for(const z of q)for(const q of z.data.curve)Q.Aq$.isDefined(q.evolveID)&&K.set(q.evolveID,{evolvedFrom:z.ID,curve:q});return K}getAmountOfAffordableEvolutions(){if(-1!==this._cachedAffordablePetsAmount)return this._cachedAffordablePetsAmount;const q=ct.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return this._cachedAffordablePetsAmount=q.kennel.getPets().filter((K=>this.canAfford(this.petAcquisitionCost(K.ID,Z.l6.Evolution))&&Et.P8.canPetEvolve(q.kennel.createNewPet(K),K.level))).length,this.onAffordableCacheChanged.dispatch(),this._cachedAffordablePetsAmount}refreshAffordableEvolutionsCache(){this._cachedAffordablePetsAmount=-1,this._cachedAffordablePetsAmount=this.getAmountOfAffordableEvolutions()}getTables(){return dt.R.loadData(tt.r.PetEvolutionandRescueCosts_json)}};Ot.CONSTANTS_DEFAULT={captureTutorialCurrencyAmount:5,evolutionTutorialCurrencyAmount:15,initialCurrencyCountExistingMember:1540,petCostTableVariantKey:"evoCostRarityBaseV2",evolutionLevelCapVariantKey:"evoLvlCapV1",goToRegularPets:!1,petEvolutionAutoPrompt:{skipIfSchool:!0,skipIfExpensive:!1}},(0,Y.Cg)([(0,X.inject)("cb2-bdd4"),(0,Y.Sn)("design:type",St.b)],Ot.prototype,"_networkHandler",void 0),(0,Y.Cg)([(0,X.inject)("20f-5f67"),(0,Y.Sn)("design:type",Function)],Ot.prototype,"_segment",void 0),Ot=pt=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("6d6-463e")),(0,Y.Qj)(1,(0,X.inject)("ad2-c5b2")),(0,Y.Qj)(2,(0,X.inject)("20f-5f67")),(0,Y.Sn)("design:paramtypes",[At.U,lt.E,Function])],Ot)},88038:(q,K,z)=>{"use strict";z.d(K,{_:()=>et});var Y=z(8674),Q=z(62248),X=z(1195),Z=z(13956),J=z(30226),tt=z(43754);class et{static shouldAutomaticallyPromptEvolution(q,K){var z,Y,X,Z,et;const it=null!==(Y=null===(z=tt.W.CONSTANTS_DEFAULT)||void 0===z?void 0:z.petEvolutionAutoPrompt)&&void 0!==Y?Y:{};if((null===(X=it.skipIfSchool)||void 0===X||X)&&(J.J.isSchoolHours()||this._player.player.isPlayingAtSchool()))return!1;if(this._automaticEvolutionPromptImpressions>=(null!==(Z=it.maxAutomaticImpressionsPerSession)&&void 0!==Z?Z:1/0))return!1;if(this._battlesUntilNextPrompt>0)return!1;if(null===(et=it.skipIfExpensive)||void 0===et||et){const z=q.petAcquisitionCost(K,Q.l6.Evolution);if(!q.canAfford(z))return!1}return!0}static automaticEvolutionPromptShown(){this._automaticEvolutionPromptImpressions++}static anyEvolutionPromptShown(){var q,K,z;this._evolutionPromptImpressions++,this._battlesUntilNextPrompt=null!==(z=null===(K=null===(q=tt.W.CONSTANTS_DEFAULT)||void 0===q?void 0:q.petEvolutionAutoPrompt)||void 0===K?void 0:K.battlesBetweenPrompts)&&void 0!==z?z:0}static postBattleFlowShown(){this._battlesUntilNextPrompt--}static reset(){this._automaticEvolutionPromptImpressions=0,this._evolutionPromptImpressions=0,this._battlesUntilNextPrompt=0}}(0,Y.Cg)([(0,Z.b)("ad2-c5b2"),(0,Y.Sn)("design:type",X.E)],et,"_player",void 0),et.reset()},55839:(q,K,z)=>{"use strict";z.d(K,{x:()=>at});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(95891),tt=z.n(J),et=z(35120),it=z(68231),st=z(80403);class nt{}nt.CLASS_VS_CLASS_QUERY="\n query cvcQuery {\n viewer {\n currentClassroom {\n node {\n currentClassroomCup {\n classroomVersusClassroomLeaderboard {\n cycle {\n startsAt\n endsAt\n }\n entry {\n node {\n classroomId\n rank\n displayName\n totalAnswersCorrect\n }\n }\n entries {\n nodes {\n classroomId\n rank\n displayName\n totalAnswersCorrect\n }\n }\n }\n }\n classroomCups(filterBy: {status: COMPLETED}) {\n nodes {\n classroomVersusClassroomLeaderboard {\n entry {\n node {\n rank\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ",nt.STUDENT_VS_STUDENT_QUERY="\n query svsQuery ($studentId: ID!, $first: Int!) {\n viewer {\n currentClassroom {\n node {\n currentClassroomCup {\n studentVersusStudentLeaderboard {\n cycle {\n startsAt\n endsAt\n }\n entry (studentId: $studentId) {\n node {\n studentId\n rank\n totalAnswersCorrect\n }\n }\n entries (first: $first) {\n nodes {\n studentId\n rank\n totalAnswersCorrect\n }\n }\n }\n }\n classroomCups(filterBy: {status: COMPLETED}) {\n nodes {\n studentVersusStudentLeaderboard {\n entry (studentId: $studentId) {\n node {\n rank\n totalAnswersCorrect\n }\n }\n entries (first: $first) {\n nodes {\n studentId\n rank\n totalAnswersCorrect\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ",nt.STUDENT_VS_STUDENT_PREVIOUS_RANK_QUERY="\n query svsQuery ($studentId: ID!) {\n viewer {\n currentClassroom {\n node {\n classroomCups(filterBy: {status: COMPLETED}) {\n nodes {\n studentVersusStudentLeaderboard {\n entry (studentId: $studentId) {\n node {\n rank\n totalAnswersCorrect\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ";let at=Y=class{constructor(q){this._isThrottleClassVersusClassEnabled=!1,this._isThrottleStudentVersusStudentEnabled=!1,this._graphQl=q}sendRequestClassVersusClass(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z;try{const Q=yield this._graphQl.sendRequest(nt.CLASS_VS_CLASS_QUERY),X=null===(z=null===(K=null===(q=null==Q?void 0:Q.data)||void 0===q?void 0:q.viewer)||void 0===K?void 0:K.currentClassroom)||void 0===z?void 0:z.node;return(null==X?void 0:X.currentClassroomCup)?(this._isThrottleClassVersusClassEnabled||(this.sendRequestClassVersusClass=tt().throttle(this.sendRequestClassVersusClass,Y.REQUEST_THROTTLE_TIME_MS,{trailing:!1}),this._isThrottleClassVersusClassEnabled=!0),X):null}catch(e){return X.VyI.log(`Error sending request: ${X.RQr.stringify(e)}`,X.$bb.Error),null}}))}sendRequestStudentVersusStudent(){return(0,Q.sH)(this,arguments,void 0,(function*(q=100){var K,z,Q;const Z=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;try{const X=yield this._graphQl.sendRequest(nt.STUDENT_VS_STUDENT_QUERY,{studentId:Z.userID,first:q}),J=null===(Q=null===(z=null===(K=null==X?void 0:X.data)||void 0===K?void 0:K.viewer)||void 0===z?void 0:z.currentClassroom)||void 0===Q?void 0:Q.node;return(null==J?void 0:J.currentClassroomCup)?(this._isThrottleStudentVersusStudentEnabled||(this.sendRequestStudentVersusStudent=tt().throttle(this.sendRequestStudentVersusStudent,Y.REQUEST_THROTTLE_TIME_MS,{trailing:!1}),this._isThrottleStudentVersusStudentEnabled=!0),J):null}catch(e){return X.VyI.log(`Error sending request: ${X.RQr.stringify(e)}`,X.$bb.Error),null}}))}fetchSvSPreviousRank(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,Z,J;const tt=et.q.instance.prodigy.gameContainer.get("782-c308");try{const X=yield this._graphQl.sendRequest(nt.STUDENT_VS_STUDENT_PREVIOUS_RANK_QUERY,{studentId:tt.userID}),et=null===(J=null===(Z=null===(Q=null===(Y=null===(z=null===(K=null===(q=null==X?void 0:X.data.viewer.currentClassroom)||void 0===q?void 0:q.node)||void 0===K?void 0:K.classroomCups)||void 0===z?void 0:z.nodes)||void 0===Y?void 0:Y[0])||void 0===Q?void 0:Q.studentVersusStudentLeaderboard)||void 0===Z?void 0:Z.entry)||void 0===J?void 0:J.node;return et||null}catch(e){return X.VyI.log(`Error sending request: ${X.RQr.stringify(e)}`,X.$bb.Error),null}}))}};at.REQUEST_THROTTLE_TIME_MS=.8*it.Z.REFRESH_TIMEOUT_MS,at=Y=(0,Q.Cg)([(0,Z.injectable)(),(0,Q.Qj)(0,(0,Z.inject)("800-a786")),(0,Q.Sn)("design:paramtypes",[st.K])],at)},42113:(q,K,z)=>{"use strict";z.d(K,{n:()=>pt,O:()=>gt});var Y=z(8674),Q=z(62459),X=z(7351),Z=z(28152),J=z(96494),tt=z(90633),et=z(13956),it=z(80060),st=z(44094);class nt{constructor(q){this._data=q}get hasClassroom(){return Q.Aq$.isDefined(this._data)}}class at extends nt{constructor(q){super(q)}get cycle(){var q,K;return null===(K=null===(q=this._data)||void 0===q?void 0:q.currentClassroomCup)||void 0===K?void 0:K.classroomVersusClassroomLeaderboard.cycle}get entries(){var q,K,z;return null===(z=null===(K=null===(q=this._data)||void 0===q?void 0:q.currentClassroomCup)||void 0===K?void 0:K.classroomVersusClassroomLeaderboard.entries)||void 0===z?void 0:z.nodes.map(at.convertClassroomToEntry)}get currentUserEntry(){var q,K,z;return at.convertClassroomToEntry(null===(z=null===(K=null===(q=this._data)||void 0===q?void 0:q.currentClassroomCup)||void 0===K?void 0:K.classroomVersusClassroomLeaderboard.entry)||void 0===z?void 0:z.node)}get previousUserEntry(){var q,K,z,Y,Q,X;return at.convertClassroomToEntry(null===(X=null===(Q=null===(Y=null===(z=null===(K=null===(q=this._data)||void 0===q?void 0:q.classroomCups)||void 0===K?void 0:K.nodes)||void 0===z?void 0:z[0])||void 0===Y?void 0:Y.classroomVersusClassroomLeaderboard)||void 0===Q?void 0:Q.entry)||void 0===X?void 0:X.node)}get previousRank(){var q;return null===(q=this.previousUserEntry)||void 0===q?void 0:q.rank}get previousCyclePrize(){}static convertClassroomToEntry(q){if(q)return{id:q.classroomId,displayName:q.displayName,rank:q.rank,totalAnswersCorrect:q.totalAnswersCorrect}}}var rt,ot=z(24521),ht=z(28085),ct=z(35120),dt=z(23029),lt=z(21492);!function(q){q[q.First=0]="First",q[q.Second=1]="Second",q[q.Third=2]="Third",q[q.TopHalf=3]="TopHalf",q[q.BottomHalf=4]="BottomHalf"}(rt||(rt={}));class ut extends nt{constructor(q){var K,z,Y;super(q),this._entries=null===(Y=null===(z=null===(K=this._data)||void 0===K?void 0:K.currentClassroomCup)||void 0===z?void 0:z.studentVersusStudentLeaderboard.entries)||void 0===Y?void 0:Y.nodes.map(ut.convertStudentToEntry.bind(ut,this.currentStudentId)),this._entries&&ut.addSvsPrizeData(this._entries)}get cycle(){var q,K;return null===(K=null===(q=this._data)||void 0===q?void 0:q.currentClassroomCup)||void 0===K?void 0:K.studentVersusStudentLeaderboard.cycle}get entries(){return this._entries}get currentUserEntry(){var q;const K=this.currentStudentId;if(K)return null===(q=this._entries)||void 0===q?void 0:q.find((q=>q.id===K))}get previousUserEntry(){var q,K,z,Y,Q;return ut.convertStudentToEntry(this.currentStudentId,null===(Q=null===(Y=null===(z=null===(K=null===(q=this._data.classroomCups)||void 0===q?void 0:q.nodes)||void 0===K?void 0:K[0])||void 0===z?void 0:z.studentVersusStudentLeaderboard)||void 0===Y?void 0:Y.entry)||void 0===Q?void 0:Q.node)}get previousRank(){var q;return null===(q=this.previousUserEntry)||void 0===q?void 0:q.rank}get previousCyclePrize(){var q,K,z,Y,Q,X,Z;const J=this.currentStudentId;if(!J)return;const tt=null===(X=null===(Q=null===(Y=null===(z=null===(K=null===(q=this._data)||void 0===q?void 0:q.classroomCups)||void 0===K?void 0:K.nodes)||void 0===z?void 0:z[0])||void 0===Y?void 0:Y.studentVersusStudentLeaderboard)||void 0===Q?void 0:Q.entries)||void 0===X?void 0:X.nodes.map(ut.convertStudentToEntry.bind(ut,J));return ut.addSvsPrizeData(tt),null===(Z=null==tt?void 0:tt.find((q=>q.id===J)))||void 0===Z?void 0:Z.prize}get currentStudentId(){var q,K,z;return null===(z=null===(K=null===(q=this._data)||void 0===q?void 0:q.currentClassroomCup)||void 0===K?void 0:K.studentVersusStudentLeaderboard.entry)||void 0===z?void 0:z.node.studentId}static convertStudentToEntry(q,K){var z,Y;if(!K)return;let Q="";if(K.studentId===q){Q=ct.q.instance.prodigy.gameContainer.get("782-c308").name.getName()}else{const q=null===(Y=null===(z=ct.q.instance.prodigy.friendsListNetworkHandler.classList.find((q=>`${q.userID}`===K.studentId)))||void 0===z?void 0:z.appearance)||void 0===Y?void 0:Y.name;if(q){const K=ct.q.instance.prodigy.gameContainer.resolve(lt.C);K.initFromProtobuf(q),Q=K.getName()}}return{id:K.studentId,displayName:Q,rank:K.rank,totalAnswersCorrect:K.totalAnswersCorrect}}static addSvsPrizeData(q){var K;const z=dt.R.loadData(ot.r.SvSLeaderboardRewards_json),Y=z.topSpots.length,Q=q.filter((K=>K.rank>0&&K.rank<=q.length&&K.totalAnswersCorrect>0)),X=null===(K=Q[Q.length-1])||void 0===K?void 0:K.rank;for(const Z of Q)Z.rank<=Y?(Z.prize=(0,ht.mg)(z.topSpots[Z.rank-1]),Z.prizeIcon=Z.rank-1):Z.rank<=Y+Math.ceil((X-Y)/2)?(Z.prize=(0,ht.mg)(z.remainingTop),Z.prizeIcon=rt.TopHalf):(Z.prize=(0,ht.mg)(z.remainingBottom),Z.prizeIcon=rt.BottomHalf)}}var ft,bt,pt,vt=z(55839);!function(q){q.CurrentClassroomDisplayName="LEADERBOARD_CURRENT_CLASSROOM_DISPLAY_NAME",q.CurrentClassroomPreviousRank="LEADERBOARD_CURRENT_CLASSROOM_PREVIOUS_RANK",q.ShowNonQualifiedWindow="LEADERBOARD_SHOW_NON_QUALIFIED_WINDOW",q.CurrentLeaderboardType="LEADERBOARD_CURRENT_LEADERBOARD_TYPE"}(bt||(bt={})),function(q){q.ClassLeaderboard="classLeaderboard",q.StudentLeaderboard="studentLeaderboard"}(pt||(pt={}));let gt=ft=class extends Q.uAl{constructor(){super(...arguments),this.onCvCDataUpdate=new Q.HN0,this.onSvSDataUpdate=new Q.HN0,this.onLeaderboardResults=new Q.HN0,this.onLeaderboardPrize=new Q.HN0,this.onMsTimeRemainingUpdate=new Q.HN0,this.onInvalidClassCode=new Q.HN0,this.onDataUpdateStart=new Q.HN0,this._updateOnCreate=!0,this.currentMenuType=pt.ClassLeaderboard,this._initialized=!1}static get cachedCycleEndDate(){return ft._cachedCycleEndDate}create(){super.create(),this._updateOnCreate&&this.updateLeaderboardData()}updateLeaderboardData(q){this.onDataUpdateStart.dispatch(),this.currentMenuType=null!=q?q:this.currentMenuType;const K=this.currentMenuType===pt.ClassLeaderboard;(()=>(0,Y.sH)(this,void 0,void 0,(function*(){return K?new at(yield this._leaderboardService.sendRequestClassVersusClass()):new ut(yield this._leaderboardService.sendRequestStudentVersusStudent())})))().then((q=>{var z,Y,X,Z;if(null==q?void 0:q.hasClassroom){const J=q.currentUserEntry,tt=null==J?void 0:J.id,et={};et[bt.CurrentLeaderboardType]=this.currentMenuType,et[bt.ShowNonQualifiedWindow]=!J&&K;let nt=q.previousRank;if(!K&&(null===(z=q.previousUserEntry)||void 0===z?void 0:z.totalAnswersCorrect)<=0&&(nt=null),et[bt.CurrentClassroomPreviousRank]=null!==(Y=st.$.addOrdinalSuffix(nt))&&void 0!==Y?Y:this._localizer.getText("LEADERBOARDS_PREVIOUS_UNRANKED"),!this._initialized||!ft._cachedCycleEndDate||Date.now()>ft._cachedCycleEndDate){this._initialized=!0;let K="";(null==J?void 0:J.displayName)&&(K=st.$.truncate(J.displayName,ft.DISPLAY_NAME_MAX,!0)),et[bt.CurrentClassroomDisplayName]=K;const z=q.cycle;z&&(ft._cachedCycleEndDate=new Date(z.endsAt).getTime())}if(it.d.updateInjectedValues(this.GameObject,et),ft._cachedCycleEndDate){const z=ft._cachedCycleEndDate-Date.now();this.onMsTimeRemainingUpdate.dispatch(z);const Y=this.currentMenuType===pt.ClassLeaderboard?this._player.data.lastActiveLeaderboardDate:this._player.data.lastActiveStudentLeaderboardDate,et=K?Q.Aq$.isDefined(q.previousRank):(null===(X=q.previousUserEntry)||void 0===X?void 0:X.totalAnswersCorrect)>0;if(Q.Aq$.isDefined(Y)&&Y!==ft._cachedCycleEndDate&&et){if(this.onLeaderboardResults.dispatch(),(null===(Z=q.previousCyclePrize)||void 0===Z?void 0:Z.length)>0){const K=q.previousCyclePrize[0];this.onLeaderboardPrize.dispatch(K.type,K.ID,K.N)}}else{this.updateSavedCurrentCycle();const z=q.entries;if(z){const q=z.findIndex((q=>q.id===tt));(K?this.onCvCDataUpdate:this.onSvSDataUpdate).dispatch(z,tt,J,q)}}}}else this.onInvalidClassCode.dispatch()})).catch(Q.RQr.createHandler("Error sending Leaderboard request"))}updateSavedCurrentCycle(){switch(this.currentMenuType){case pt.ClassLeaderboard:this._player.data.lastActiveLeaderboardDate!==ft._cachedCycleEndDate&&(this._player.data.lastActiveLeaderboardDate=ft._cachedCycleEndDate,this._breadcrumbManager.resetBreadcrumb(tt.B.FEATURE_LEADERBOARD,tt.B.BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED));break;case pt.StudentLeaderboard:this._player.data.lastActiveStudentLeaderboardDate!==ft._cachedCycleEndDate&&(this._player.data.lastActiveStudentLeaderboardDate=ft._cachedCycleEndDate,this._breadcrumbManager.resetBreadcrumb(tt.B.FEATURE_LEADERBOARD,tt.B.BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED),this._breadcrumbManager.resetBreadcrumb(tt.B.FEATURE_LEADERBOARD,tt.B.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED))}}retrievePreviousSvSRankData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return ft._hasFetchedPreviousCycleSvs||(ft._previousCycleSvs=yield this._leaderboardService.fetchSvSPreviousRank(),ft._hasFetchedPreviousCycleSvs=!0),ft._previousCycleSvs}))}destroy(){this.onCvCDataUpdate.dispose(),this.onSvSDataUpdate.dispose(),this.onLeaderboardResults.dispose(),this.onLeaderboardPrize.dispose(),this.onMsTimeRemainingUpdate.dispose(),this.onInvalidClassCode.dispose(),this.onDataUpdateStart.dispose(),super.destroy()}};gt.DISPLAY_NAME_MAX=70,gt._previousCycleSvs=null,gt._hasFetchedPreviousCycleSvs=!1,(0,Y.Cg)([(0,et.b)("920-a467"),(0,Y.Sn)("design:type",vt.x)],gt.prototype,"_leaderboardService",void 0),(0,Y.Cg)([(0,et.b)("782-c308"),(0,Y.Sn)("design:type",X.W)],gt.prototype,"_player",void 0),(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],gt.prototype,"_localizer",void 0),(0,Y.Cg)([(0,Q.Cdj)("fa1-8ec9"),(0,Y.Sn)("design:type",J.F)],gt.prototype,"_breadcrumbManager",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],gt.prototype,"onCvCDataUpdate",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],gt.prototype,"onSvSDataUpdate",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],gt.prototype,"onLeaderboardResults",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],gt.prototype,"onLeaderboardPrize",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],gt.prototype,"onMsTimeRemainingUpdate",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],gt.prototype,"onInvalidClassCode",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],gt.prototype,"onDataUpdateStart",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],gt.prototype,"_updateOnCreate",void 0),gt=ft=(0,Y.Cg)([(0,Q.EVk)("LeaderboardDataProvider",Z.Y.leaderboard)],gt)},2072:(q,K,z)=>{"use strict";z.d(K,{e:()=>st});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(35120),J=z(15218),tt=z(79600),et=z(48417);class it{static getLegacySpawnData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeLegacySpawnRequest(et.D.LegacySpawn.GetLegacySpawnData)}))}static makeLegacySpawnRequest(q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K={}){try{const z=Z.q.instance.prodigy.gameContainer.get("b09-138c"),Y=yield z.cloudScript.timeoutMS(it.NETWORK_TIMEOUT_DURATION_MS).setRetryOption({retryCount:it.NETWORK_RETRY_COUNT}).execute(q,K);if(!Y.isOK())throw new tt.CatalystSdkError(tt.EErrorCode.Unknown,"Unknown Catalyst SDK Error",`${Y.status}: ${JSON.stringify(Y.data)}`);return Y.data}catch(z){throw new Error(`Error calling Cloudscript ${q}. ${z}`)}}))}}it.NETWORK_TIMEOUT_DURATION_MS=1e4,it.NETWORK_RETRY_COUNT=2;let st=class{constructor(){this.assetLoader=Z.q.instance.prodigy.gameContainer.get(Q.t5G.AssetLoader),this._getDataDirty=!1}loadDataSchemaFromJson(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return yield this.assetLoader.loadAssets([q]),Z.q.instance.game.cache.getJSON(q)}))}getMaximumSpawnsForMap(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q;const X=(yield this.fetchLegacySpawnData()).get(q);return J.A.useRevisedDifficulty?null!==(Y=null!==(z=null===(K=null==X?void 0:X.variations)||void 0===K?void 0:K.maxSpawnCount)&&void 0!==z?z:null==X?void 0:X.default.length)&&void 0!==Y?Y:0:null!==(Q=null==X?void 0:X.default.length)&&void 0!==Q?Q:0}))}getSpawnDataForMap(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=(yield this.fetchLegacySpawnData()).get(q);return K?this.getVariation(K):[]}))}getAllSpawnDataInZone(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=[],z=yield this.fetchLegacySpawnData();return Array.from(z.keys()).forEach((Y=>{if(Y.startsWith(q)){const q=this.getVariation(z.get(Y));K.push(...q)}})),K}))}getVariation(q){var K,z,Y;return J.A.useRevisedDifficulty?null!==(z=null!==(K=q.variations[J.A.experimentSpawnVariation])&&void 0!==K?K:q.default)&&void 0!==z?z:[]:null!==(Y=q.default)&&void 0!==Y?Y:[]}fetchLegacySpawnData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return!this._getDataDirty&&Q.Aq$.isDefined(this._getSpawnsPromise)||(this._getSpawnsPromise=new Promise(((q,K)=>{it.getLegacySpawnData().then((K=>{this._getDataDirty=!1;const z=new Map;K.spawns.forEach((q=>{z.set(q.mapId,q)})),q(z)})).catch((q=>{this._getDataDirty=!0,K(new Error(q))}))}))),this._getSpawnsPromise}))}};st=(0,Y.Cg)([(0,X.injectable)()],st)},55122:(q,K,z)=>{"use strict";z.d(K,{s:()=>tt});var Y=z(62459),Q=z(6452),X=z(5491),Z=z(35120),J=z(71790);class tt{static get minLevel(){return this.battleConstants.constants.baseLevelMinimum}static get maxLevelConfig(){return this.battleConstants.constants.baseLevelMaximumConfig}static getPlayerLevelCap(q){var K,z;const Q=q.getPlayerData();return Y.Aq$.isDefined(null==Q?void 0:Q.difficultyUnlocks)?(null===(K=Q.difficultyUnlocks)||void 0===K?void 0:K.expert)?this.battleConstants.constants.baseLevelMaximumConfig.expert:(null===(z=Q.difficultyUnlocks)||void 0===z?void 0:z.hard)?this.battleConstants.constants.baseLevelMaximumConfig.hard:this.battleConstants.constants.baseLevelMaximumConfig.regular:(Y.VyI.log("Player difficulty unlock data is undefined",Y.$bb.Warning),this.battleConstants.constants.baseLevelMaximum)}static get activePlayerLevelCap(){const q=Z.q.instance.prodigy.gameContainer.get("782-c308");return this.getPlayerLevelCap(q)}static get baseLevelRequiredForChargedLevels(){var q,K;const z=Z.q.instance.prodigy.gameContainer.get("782-c308");return(null===(q=z.difficultyUnlocks)||void 0===q?void 0:q.expert)||(null===(K=z.difficultyUnlocks)||void 0===K?void 0:K.hard)?this.battleConstants.constants.baseLevelMaximumConfig.expert:this.battleConstants.constants.baseLevelMaximum}static calculatePlayerOverflowXp(q){const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=this.xpRequiredForLevel(this.activePlayerLevelCap,X.V.Player),Y=Math.min(z,K.getStars())-z+q;return Math.max(0,Y)}static validatePlayerAndPetXp(){const q=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;tt.validateCreatureXp(q.data,X.V.Player,tt.activePlayerLevelCap),q.kennel.data.forEach((q=>{tt.validateCreatureXp(q,X.V.Pet,tt.activePlayerLevelCap)})),q.updated=!0,q.kennel.updated=!0}static xpRequiredForLevel(q,K){const z=Q.D.getLevelCurve(),X=Q.D.getXpRequiredForLevel(q,z.cumulativeXp,1);return null===X?(Y.VyI.log(`Level curve for ${K} is missing required data for level ${q}`,Y.$bb.Error),Q.D.getXpRequiredForLevel(z.cumulativeXp.length-1,z.cumulativeXp,1)):X}static validateCreatureXp(q,K,z){const X=Q.D.getLevelCurve().cumulativeXp;if(Y.Aq$.isDefined(q.nextLevelProgressPercent)||(q.nextLevelProgressPercent=Q.D.getCurrentLevelProgressPercent(q.level,q.stars,X,1)),q.level>=z&&(q.nextLevelProgressPercent=1),!Y.Aq$.isDefined(q.stars)||1===q.nextLevelProgressPercent||0===q.nextLevelProgressPercent)return void(q.stars=tt.xpRequiredForLevel(q.level,K));const Z=Q.D.getCurrentLevelProgressPercent(q.level,q.stars,X,1);if(!(Math.abs(q.nextLevelProgressPercent-Z)<.001)){const z=q.stars;q.stars=Q.D.getXpFromNextLevelProgressPercent(q.level,q.nextLevelProgressPercent,X,1),Y.VyI.log(`${K} xp adjusted to new level curve ${q.level} at ${q.stars} stars\n Old xp: ${z} -> New xp: ${q.stars}`,Y.$bb.Info)}}}tt.battleConstants=new J.T},18332:(q,K,z)=>{"use strict";z.d(K,{I:()=>yt});var Y=z(8674),Q=z(62459),X=z(85880),Z=z(95891),J=z.n(Z),tt=z(68910),et=z(88022),it=z(82351),st=z(99625),nt=z(56942),at=z(70156),rt=z(78746),ot=z(35120),ht=z(49237),ct=z(28152),dt=z(34603),lt=z(67665),ut=z(24110),ft=z(53661),bt=z(80060),pt=z(54174),vt=z(66397);const gt={[rt.Os.Battle]:"wave-battle",[rt.Os.Treasure]:"treasure-rush"},mt={[rt.Os.Battle]:{actionTitle:"Waves",largeIconFrame:"info-stage-wave",smallIconFrame:"stage-battle"},[rt.Os.Treasure]:{actionTitle:"Attacks",largeIconFrame:"info-stage-chest",smallIconFrame:"stage-treasure"}};let yt=class extends Q.uAl{constructor(){super(...arguments),this._stageIntroSpine=nt.Q.Spine_stage_intros_json,this._stagePositions=[],this._opponentPlayerPieces={},this._numberOfPiecesSetup=0,this._matchboardElementTweens=[],this._reviveCountTextProperties=new tt.TextStyle({fontSize:56,fill:Q.yQ0.WHITE,strokeThickness:12,stroke:Q.yQ0.ORANGE,fontFamily:Q.dBt.PaytoneOne,lineJoin:"round",trim:!0}),this._lootBagWidgetTextProperties=new tt.TextStyle({fontSize:72,fill:Q.yQ0.WHITE,strokeThickness:20,stroke:Q.Q1f.hexToColor("#363636").color,fontFamily:Q.dBt.PaytoneOne,lineJoin:"round",trim:!0})}get fullScreenCardRoot(){return this._fullScreenCardRoot}create(){super.create(),this._infoWidgetsOnScreenPos={x:this._infoWidgetsRoot.transform.localPosition.x,y:this._infoWidgetsRoot.transform.localPosition.y},this._infoWidgetsOffScreenPos={x:1280,y:this._infoWidgetsOnScreenPos.y},this._matchboardOnScreenPos={x:this._matchboardRectTransform.anchoredPivotOffset.x,y:this._matchboardRectTransform.anchoredPivotOffset.y},this._matchboardOffScreenPos={x:this._matchboardOnScreenPos.x,y:-this._matchboardOnScreenPos.y},this._stageGridLayoutOffset=this._stageGridLayout.GameObject.transform.sizeDelta.width/2,this._matchboardOffset=this._matchboardRectTransform.sizeDelta.width/2,this.setupMatchboardZones(),this._exitButton.GameObject.active=!this._lootDashManager.matchController.isQuickQuiz,this._fullScreenCardRoot.active=!1,this._lootDashManager.matchController.onOpponentAdvanced.add(this.handleOpponentStageUpdate,this),this._lootDashManager.matchController.onOpponentJoined.add((q=>{const K=q-this._numberOfPiecesSetup;this.setupOpponents(this._lootDashManager.matchController.opponents.slice(-K))})),this._lootDashPlayerPinTransform.GameObject.active=!1,this._highPlatformYPos=this._lootDashPlayerPinTransform.anchoredPivotOffset.y,this._lowPlatformYPos=this._highPlatformYPos+12,this.setupOpponents(this._lootDashManager.matchController.opponents),this.setupPlayerPiece()}postCreate(){super.postCreate(),this._stageInfoWidgetOnScreenPos={x:this._stageInfoWidgetRoot.transform.localPosition.x,y:this._stageInfoWidgetRoot.transform.localPosition.y},this._stageInfoWidgetOffScreenPos={x:this._stageInfoWidgetOnScreenPos.x,y:-(this._stageInfoWidgetSortingAnchor.getRootContainer().getBounds().height+10)},this.setupMathStreakWidget(),this.setupLootBagWidget(),this.updateStageInfoWidget(!1).catch(Q.RQr.createHandler("Error setting up stage info widget")),this._lootBagWaveCompleteIcon.active=!1,this._lootBagWaveCompleteText.GameObject.active=!1}setupMatchboardZones(){const q=this._lootDashManager.matchController.getCurrentZoneStages(),K=this._lootDashManager.matchController.currentStageIndex,z=[],Y=[];for(let Q=0;QK,[ft.eV.StageType]:X.stageType})),Y.push(bt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,st.l.LootDashStageOverlay,{[ft.eV.StageHasMultiplePlayers]:0===Q}))}Promise.all(z).then((q=>{for(const K of q)this._stageGridLayout.GameObject.addChild(K),this._stagePositions.push(K.transform.anchoredPivotOffset);this._lootDashPlayerPinTransform.setAnchoredPivotOffset(this._stagePositions[0].x,this._highPlatformYPos),this._lootDashPlayerPinTransform.GameObject.active=!0,this.cacheMatchboardAsBitmap(),this._lootDashManager.matchController.onBattleDataChanged.add((()=>{this.handleBattleDataChanged().catch(Q.RQr.createHandler("LootDashBattleUIComponent: Error handling battle data changed"))}),this),this.handleBattleDataChanged().catch(Q.RQr.createHandler("LootDashBattleUIComponent: Error handling initial battle data change"))})).catch(Q.RQr.createHandler("LootDashBattleUIComponent: Error initializing battle UI")),Promise.all(Y).then((q=>{for(const K of q)this._stageOverlayGridLayout.GameObject.addChild(K)})).catch(Q.RQr.createHandler("LootDashBattleUIComponent: Error initializing stage overlays"))}setupOpponents(q){this._numberOfPiecesSetup+=q.length;const K=[];for(let z=0;z{K.forEach(((K,z)=>{const Y=q[z],X=Y.currentStageIndex;this._stagePositions[X]?(K.active=!1,K.transform.setPosition(this._stagePositions[X].x,this._highPlatformYPos),this._lootDashManager.matchController.getPlayerHeadSprite(Y.playerId).then((q=>{this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1,bt.d.updateInjectedValues(K,{[ft.eV.MatchBoardPieceName]:`Loot Dash Opponent ${Y.playerId}`,[ft.eV.MatchBoardPieceHeadTexture]:q.texture}),this.cacheMatchboardAsBitmap()})).catch(Q.RQr.createHandler("LootDashBattleUIComponent: Error loading opponent head sprite")),this._opponentPlayerPieces[Y.playerId]=K,X!==this._lootDashManager.matchController.currentStageIndex&&this.handleOpponentStageUpdate(Y.playerId,X)):K.destroy()}))})).catch(Q.RQr.createHandler("LootDashBattleUIComponent: Error loading opponent prefab"))}setupPlayerPiece(){this._numberOfPiecesSetup++;const q=ot.q.instance.prodigy.gameContainer.get("ad2-c5b2").getUserID();this._lootDashManager.matchController.getPlayerHeadSprite(q).then((q=>{this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1,bt.d.updateInjectedValues(this._lootDashPlayerPinTransform.GameObject,{[ft.eV.MatchBoardPieceName]:"Main player piece",[ft.eV.MatchBoardPieceHeadTexture]:q.texture}),this.cacheMatchboardAsBitmap()})).catch(Q.RQr.createHandler("LootDashBattleUIComponent: Error loading player head sprite"))}handleBattleDataChanged(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,X;const Z=J().cloneDeep(this._lootDashManager.matchController.lootDashMatchData),tt=this._lootDashMatchData;if(void 0===tt)return this._mathStreakWidgetSpine.setAnimationByName(0,pt.h2[`PipFill${null!==(q=Z.currentMathStreak)&&void 0!==q?q:0}`],!1),this._lootBagCountText.text=Object.values(Z.lootBagData).reduce(((q,K)=>q+K),0).toString(),yield Promise.all([this.updateStageInfoWidget(!1),this.advancePlayerToStage(this._lootDashManager.matchController.currentStageIndex,!0)]),void(this._lootDashMatchData=Z);const et=this._lootDashManager.matchController.getCurrentZoneStages().length,it=this._lootDashManager.matchController.currentStageIndex,st=null!==(z=null===(K=null==tt?void 0:tt.currentStage)||void 0===K?void 0:K.stageIndex)&&void 0!==z?z:-1;if(this.updateStageInfoWidget(it!==st).catch(Q.RQr.createHandler("Error updating stage info widget")),it(null!==(Y=null==tt?void 0:tt.lootBagData.fromStreak)&&void 0!==Y?Y:0)?rt.s9:Z.currentMathStreak,K=null!==(X=null==tt?void 0:tt.currentMathStreak)&&void 0!==X?X:0;this.handleMathStreakChange(K,q)}this._lootDashMatchData=Z}))}getStagePosition(q){return q>=this._stagePositions.length?this._matchboardTrackEndIcon.GameObject.transform.localPosition:this._stagePositions[q]}advancePlayerToStage(q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K=!1){if(this._lootDashManager.matchController.currentStageIndex<1)return;const z=K?1:pt.I1.DEFAULT_TWEEN_DURATION,Q=this._stageGridLayout.GameObject.children[q-1].transform.localPosition.x;yield this.adjustMatchboardElementSize(this._completedTrackTransform,{width:Math.abs(Q+this._stageGridLayoutOffset),height:this._completedTrackTransform.sizeDelta.height},z),this.updateStage(q-1);for(const Y of this._lootDashManager.matchController.opponents)Y.currentStageIndex===q-1&&this.updateOpponentPiece(Y.playerId),K||this.playSfx(it.B.Loot_dash_matchboard_move);const X=this._stagePositions[q].x;yield Promise.all([this.moveMatchboardElement(this._lootDashPlayerPinTransform.GameObject,{x:X,y:this._highPlatformYPos},z).then((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return null!=K?K:this.rotatePlayerPinEnd()})))),this.adjustMatchboardElementSize(this._inProgressTrackTransform,{width:Math.abs(X+this._stageGridLayoutOffset),height:this._inProgressTrackTransform.sizeDelta.height},z),null!=K?K:this.rotatePlayerPinStart()]);for(const Y of this._lootDashManager.matchController.opponents)Y.currentStageIndex===q&&this.updateOpponentPiece(Y.playerId);this.updateStage(q)}))}rotatePlayerPinStart(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const q=this.tweenGameObjectRotation(this._lootDashPlayerPinTransform.GameObject,pt.I1.PLAYER_PIN_ROTATE_START_AMOUNT,pt.I1.PLAYER_PIN_ROTATE_START_TWEEN_DURATION);this._matchboardElementTweens.push(q),yield q.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(q),1),this.cacheMatchboardAsBitmap()}))}rotatePlayerPinEnd(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const q=this.tweenGameObjectRotation(this._lootDashPlayerPinTransform.GameObject,0,pt.I1.PLAYER_PIN_ROTATE_END_TWEEN_DURATION,Q.GS3.generateCustomElasticEase(pt.I1.PLAYER_PIN_ROTATE_ELASTIC_STRENGTH,pt.I1.PLAYER_PIN_ROTATE_ELASTICITY,!1,!0));this._matchboardElementTweens.push(q),yield q.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(q),1),this.cacheMatchboardAsBitmap()}))}movePlayerPinToEndOfMatchboard(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._stagePositions[this._stagePositions.length-1].x,K=Math.round(this._stageGridLayout.GameObject.transform.sizeDelta.width/2);yield this.adjustMatchboardElementSize(this._completedTrackTransform,{width:q+K,height:this._inProgressTrackTransform.sizeDelta.height},pt.I1.DEFAULT_TWEEN_DURATION),this.updateStage(this._stagePositions.length-1);for(const Y of this._lootDashManager.matchController.opponents)Y.currentStageIndex===this._stagePositions.length-1&&this.updateOpponentPiece(Y.playerId);this.playSfx(it.B.Loot_dash_matchboard_move);const z=this._matchboardTrackEndIcon.GameObject.transform.anchoredPivotOffset.x;yield Promise.all([this.moveMatchboardElement(this._lootDashPlayerPinTransform.GameObject,{x:z,y:this._highPlatformYPos},pt.I1.DEFAULT_TWEEN_DURATION),this.adjustMatchboardElementSize(this._inProgressTrackTransform,{width:z+this._matchboardOffset,height:this._inProgressTrackTransform.sizeDelta.height},pt.I1.DEFAULT_TWEEN_DURATION)])}))}moveMatchboardElement(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const Y=this.tweenGameObjectPosition(q,{x:K.x,y:K.y},z);this._matchboardElementTweens.push(Y),yield Y.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(Y),1),this.cacheMatchboardAsBitmap()}))}adjustMatchboardElementSize(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const Y=this.tweenRectTransformSize(q,{width:K.width,height:K.height},z);this._matchboardElementTweens.push(Y),yield Y.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(Y),1),this.cacheMatchboardAsBitmap()}))}hideAll(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield Promise.all([this.setInfoWidgetsVisibility(!1),this.hideMatchboard()])}))}showAll(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield Promise.all([this.setInfoWidgetsVisibility(!0),this.showMatchboard()])}))}setInfoWidgetsVisibility(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=q?this._infoWidgetsOnScreenPos:this._infoWidgetsOffScreenPos;this.isGameObjectAtWorldPosition(this._infoWidgetsRoot,K)||(yield this.tweenGameObjectPosition(this._infoWidgetsRoot,K).onTweenComplete.asPromise())}))}isGameObjectAtWorldPosition(q,K){return q.transform.worldPosition.x===K.x&&q.transform.worldPosition.y===K.y}showMatchboard(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.moveMatchboardElement(this._matchboardRectTransform.GameObject,this._matchboardOnScreenPos,pt.I1.DEFAULT_TWEEN_DURATION)}))}hideMatchboard(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.moveMatchboardElement(this._matchboardRectTransform.GameObject,this._matchboardOffScreenPos,pt.I1.DEFAULT_TWEEN_DURATION)}))}hideStageInfoWidget(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.tweenGameObjectPosition(this._stageInfoWidgetRoot,this._stageInfoWidgetOffScreenPos).onTweenComplete.asPromise()}))}showStageInfoWidget(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.tweenGameObjectPosition(this._stageInfoWidgetRoot,this._stageInfoWidgetOnScreenPos).onTweenComplete.asPromise()}))}tweenGameObjectPosition(q,K,z=pt.I1.DEFAULT_TWEEN_DURATION){const Y={x:q.transform.localPosition.x,y:q.transform.localPosition.y},Q=ot.q.instance.game.add.tween(Y,this);return Q.to(K,z),Q.onUpdate.add((()=>{q.transform.setPosition(Y.x,Y.y)})),Q.start(),Q}tweenGameObjectRotation(q,K,z=pt.I1.DEFAULT_TWEEN_DURATION,Y){const Q=ot.q.instance.game.add.tween(q.transform,this);return Q.to({localRotation:K},z,Y),Q.start(),Q}handleOpponentStageUpdate(q,K){const z=this._lootDashManager.matchController.currentStageIndex===K,Y=this.getStagePosition(K).x,X=z?this._highPlatformYPos:this._lowPlatformYPos;this._opponentPlayerPieces[q].active=!0;const Z=pt.I1.DEFAULT_TWEEN_DURATION,J=window.setTimeout((()=>{this._opponentPiecesRoot.addChildAt(this._opponentPlayerPieces[q],this._opponentPiecesRoot.children.length-1)}),Z/3);this.moveMatchboardElement(this._opponentPlayerPieces[q],{x:Y,y:X},Z).then((()=>{this.updateOpponentPiece(q),this.updateStage(K)})).catch((q=>{clearTimeout(J),Q.RQr.logError(q,"LootDashBattleUIComponent: Error moving opponent player piece after update")})),this.updateStage(K-1)}updateOpponentPiece(q){const K=this._lootDashManager.matchController.currentStageIndex,z=this._lootDashManager.matchController.getOpponentData(q).currentStageIndex,Y=K===z,Q=this._opponentPlayerPieces[q];Q.transform.localPosition.x!==this.getStagePosition(z).x||(Q.active=!Y,Q.transform.setPositionY(Y?this._highPlatformYPos:this._lowPlatformYPos))}updateStage(q){if(q<0||q>=this._stagePositions.length)return;let K=this._lootDashManager.matchController.opponents.filter((K=>K.currentStageIndex===q)).length;this._lootDashManager.matchController.currentStageIndex===q&&K++,bt.d.updateInjectedValues(this._stageGridLayout.GameObject.children[q],{[ft.eV.StageCurrent]:q===this._lootDashManager.matchController.currentStageIndex,[ft.eV.StageCompleted]:qthis._lootDashManager.matchController.currentStageIndex,[ft.eV.ShowStageIcon]:0===K}),bt.d.updateInjectedValues(this._stageOverlayGridLayout.GameObject.children[q],{[ft.eV.StageHasMultiplePlayers]:K>1})}tweenRectTransformSize(q,K,z=pt.I1.DEFAULT_TWEEN_DURATION){const Y={width:q.sizeDelta.width,height:q.sizeDelta.height},Q=ot.q.instance.game.add.tween(Y,this);return Q.to(K,z),Q.onUpdate.add((()=>{q.setSizeDelta(Y.width,Y.height)})),Q.start(),Q}showReviveSequence(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield ot.q.instance.prodigy.load.assetsAsPromise([nt.Q.Spine_revive_json]),this._fullScreenCardSpine.setAsset(nt.Q.Spine_revive_json);const K=q===at.eA?"∞":(q+1).toString(),z=new tt.Text(K,this._reviveCountTextProperties);z.scale.set(1,-1),z.anchor.set(.5,.5),z.position._x-=2;const Y=this._fullScreenCardSpine.getSlot(pt.I1.REVIVE_ANIMATION_SLOT_NAME).data.index;this._fullScreenCardSpine.getSpine().getSlotContainerByIndex(Y).addChild(z),this._fullScreenCardSpine.getSpine().onEvent.addOnce(((K,Y)=>{Y.data.name===pt.I1.REVIVE_UPDATE_EVENT_NAME&&(z.text=q===at.eA?"∞":q.toString())})),this.playSfx(it.B.Loot_dash_revive),this._fullScreenCardRoot.active=!0,this._fullScreenCardSpine.setAnimationByName(0,pt.I1.REVIVE_ANIMATION_NAME,!0),yield this._fullScreenCardSpine.getSpine().onComplete.asPromise(),this._fullScreenCardRoot.active=!1}))}showLootBagReceivedSequence(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this._lootBagWidgetSpine.getRootContainer();K.cacheAsBitmap=!1;const z=this._lootDashManager.matchController.lootDashMatchData,Y=Object.values(z.lootBagData).reduce(((q,K)=>q+K),0);this.playSfx(it.B.Loot_dash_loot_bag_added),this._lootBagWidgetRoot.active=!0,this._lootBagWidgetSpine.setAnimationByName(0,pt.Fi.Receive,!1),yield this._lootBagWidgetSpine.getSpine().onComplete.asPromise();for(let Q=0;Qq[pt.I1.MATH_STREAK_LOOT_BAG_ATTACHMENT_NAME])))||void 0===q?void 0:q[pt.I1.MATH_STREAK_LOOT_BAG_ATTACHMENT_NAME],z=null==K?void 0:K.region.texture;z&&this._mathStreakIconGraphic.setTexture(z)}setupLootBagWidget(){this._lootBagWidgetRoot.active=!0;ot.q.instance.prodigy.load.assetsAsPromise([nt.Q.Lootbag_widget_json]).then((()=>{this._lootBagWidgetSpine.getRootContainer().cacheAsBitmap=!0})).catch(Q.RQr.createHandler("LootDashBattleUiComponent: Failed to load loot bag widget spine")),this._lootBagWidgetSpine.setAsset(nt.Q.Lootbag_widget_json),this._lootBagCountText=new tt.Text((0).toString(),this._lootBagWidgetTextProperties),this._lootBagCountText.scale.set(1,-1),this._lootBagCountText.anchor.set(.5,.5);const q=this._lootBagWidgetSpine.getSlot(pt.I1.LOOT_BAG_ANIMATION_SLOT_NAME).data.index;this._lootBagWidgetSpine.getSpine().getSlotContainerByIndex(q).addChild(this._lootBagCountText);const K=this._lootBagWidgetRoot.transform.worldPosition;this._lootBagIconTargetPosition={x:K.x-21,y:K.y-21}}updateStageInfoWidget(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this._lootDashManager.matchController.lootDashMatchData,z=K.currentStage;if(!z)return void this._stageInfoWidgetRoot.transform.setPosition(this._stageInfoWidgetOffScreenPos.x,this._stageInfoWidgetOffScreenPos.y);const Y=mt[z.stageType],X=ot.q.instance.game.cache.getTexture(et._.Ui_loot_dash_json,Y.largeIconFrame);let Z;switch(z.stageType){case rt.Os.Battle:Z=`${K.currentWaveIndex+1} / ${z.waves.length}`;break;case rt.Os.Treasure:Z=`${K.currentWaveIndex}`}const J=K.stageData[K.currentStage.stageIndex+1];let tt;J&&(tt=ot.q.instance.game.cache.getTexture(et._.Ui_loot_dash_json,mt[J.stageType].smallIconFrame)),this._stageInfoWidgetSortingAnchor.getRootContainer().cacheAsBitmap=!1,q&&(yield this.hideStageInfoWidget(),yield Q.Egh.timeout(pt.I1.STAGE_INFO_WIDGET_UPDATE_DELAY_MS)),bt.d.updateInjectedValues(this.GameObject,{[ft.eV.StageInfoWidgetActionTitle]:Y.actionTitle,[ft.eV.StageInfoWidgetActionProgress]:Z,[ft.eV.StageInfoWidgetCurrentStageIcon]:X,[ft.eV.StageInfoWidgetNextStageIcon]:tt,[ft.eV.StageInfoWidgetShowFinishLine]:void 0===J}),yield this.showStageInfoWidget(),this._stageInfoWidgetSortingAnchor.getRootContainer().cacheAsBitmap=!0}))}handleMathStreakChange(q,K){let z;if(K<=0?(z=q<=0?pt.h2.EmptyStateStar:pt.h2[`PipLoss${q}`],q!==K&&(this.playSfx(it.B.Loot_dash_math_streak_reset),this._segment.lootDash.sendMathStreakResetEvent(q))):(z=pt.h2[`PipFill${K}`],q!==K&&(this.playSfx(it.B.Loot_dash_math_streak_increased),this._segment.lootDash.sendMathStreakContinuedEvent(K))),z){const q=this._mathStreakWidgetSpine;q.getRootContainer().cacheAsBitmap=!1,q.setAnimationByName(0,z,!1),q.getSpine().onComplete.addOnce((()=>{z===pt.h2.PipFill5?this.playStreakCompleteSequence().catch(Q.RQr.createHandler("Failed to play math streak complete sequence")):q.getRootContainer().cacheAsBitmap=!0}))}}playStreakCompleteSequence(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._mathStreakWidgetSpine,K=this._lootBagMathStreakIcon;q.getRootContainer().cacheAsBitmap=!1,this.playSfx(it.B.Loot_dash_math_streak_complete),q.setAnimationByName(0,pt.h2.PipFillFull,!1),yield q.getSpine().onComplete.asPromise(),K.active=!0,q.setAnimationByName(0,pt.h2.FullStateNoIcon,!1),yield q.getSpine().onComplete.asPromise();const z=K.transform.worldPosition,Y=Q.GS3.Quadratic.InOut,X=Q.GS3.generateCustomBackEase(-250,!0,!1);yield this.animateLootBagIcon(K,z,Y,X),K.active=!1,K.transform.worldPosition={x:z.x,y:z.y},yield this.showLootBagReceivedSequence(1),q.setAnimationByName(0,pt.h2.PipFillEmpties,!1),yield q.getSpine().onComplete.asPromise(),q.setAnimationByName(0,pt.h2.EmptyStateStar,!1),q.getRootContainer().cacheAsBitmap=!0}))}animateLootBagIcon(q,K,z,Z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=this._lootBagIconTargetPosition,J={value:0},tt=X.os.parseEase(z.value),et=X.os.parseEase(Z.value),it=ot.q.instance.game.add.tween(J,this);it.to({value:1},pt.I1.LOOT_BAG_TWEEN_TIME_MS,Q.GS3.Quadratic.Out,!0),it.onUpdate.add((()=>{q.transform.worldPosition={x:tt(J.value)*(Y.x-K.x)+K.x,y:et(J.value)*(Y.y-K.y)+K.y}})),yield it.onTweenComplete.asPromise()}))}animateWaveEndLootBagScale(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._lootBagWaveCompleteParent.transform.worldScale,K=X.os.parseEase(Q.GS3.generateCustomBackEase(-7,!0,!1).value),z={value:0},Y=ot.q.instance.game.add.tween(z,this);Y.to({value:1},pt.I1.LOOT_BAG_WAVE_COMPLETE_ICON_SCALE_TIME,Q.GS3.Quadratic.Out,!0),Y.onUpdate.add((()=>{this._lootBagWaveCompleteParent.transform.setScale(K(z.value)*q.x)})),Y.start(),yield Y.onTweenComplete.asPromise()}))}cacheMatchboardAsBitmap(){this._matchboardElementTweens.length<=0&&(this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!0)}playSfx(q){ot.q.instance.prodigy.audio.playSFXFromGUID(q)}destroy(){var q,K,z,Y;ot.q.instance.game.tweens.removeAllFromOwner(this),null===(K=null===(q=this._lootDashManager.matchController)||void 0===q?void 0:q.onBattleDataChanged)||void 0===K||K.removeAll(this),null===(Y=null===(z=this._lootDashManager.matchController)||void 0===z?void 0:z.onOpponentAdvanced)||void 0===Y||Y.remove(this.handleOpponentStageUpdate,this),super.destroy()}};(0,Y.Cg)([(0,Q.Bak)(),(0,Y.Sn)("design:type",String)],yt.prototype,"_stageIntroSpine",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],yt.prototype,"_infoWidgetsRoot",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],yt.prototype,"_stageInfoWidgetRoot",void 0),(0,Y.Cg)([(0,Q.MnK)(ut.B),(0,Y.Sn)("design:type",ut.B)],yt.prototype,"_stageInfoWidgetSortingAnchor",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.v2j),(0,Y.Sn)("design:type",Q.v2j)],yt.prototype,"_mathStreakWidgetSpine",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],yt.prototype,"_lootBagMathStreakIcon",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],yt.prototype,"_mathStreakIconGraphic",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],yt.prototype,"_lootBagWidgetRoot",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.v2j),(0,Y.Sn)("design:type",Q.v2j)],yt.prototype,"_lootBagWidgetSpine",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],yt.prototype,"_lootBagWaveCompleteParent",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],yt.prototype,"_lootBagWaveCompleteIcon",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],yt.prototype,"_lootBagWaveCompleteText",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],yt.prototype,"_fullScreenCardRoot",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.v2j),(0,Y.Sn)("design:type",Q.v2j)],yt.prototype,"_fullScreenCardSpine",void 0),(0,Y.Cg)([(0,Q.MnK)(ht.$),(0,Y.Sn)("design:type",ht.$)],yt.prototype,"_exitButton",void 0),(0,Y.Cg)([(0,Q.MnK)(ut.B),(0,Y.Sn)("design:type",ut.B)],yt.prototype,"_matchboardSortingAnchor",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],yt.prototype,"_matchboardRectTransform",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],yt.prototype,"_opponentPiecesRoot",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.Sz7),(0,Y.Sn)("design:type",Q.Sz7)],yt.prototype,"_stageGridLayout",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.Sz7),(0,Y.Sn)("design:type",Q.Sz7)],yt.prototype,"_stageOverlayGridLayout",void 0),(0,Y.Cg)([(0,Q.MnK)(dt._),(0,Y.Sn)("design:type",dt._)],yt.prototype,"_matchboardTrackStartIcon",void 0),(0,Y.Cg)([(0,Q.MnK)(dt._),(0,Y.Sn)("design:type",dt._)],yt.prototype,"_matchboardTrackEndIcon",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],yt.prototype,"_lootDashPlayerPinTransform",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],yt.prototype,"_completedTrackTransform",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],yt.prototype,"_inProgressTrackTransform",void 0),(0,Y.Cg)([(0,Q.Cdj)("1c5-a816"),(0,Y.Sn)("design:type",vt.K)],yt.prototype,"_lootDashManager",void 0),(0,Y.Cg)([(0,Q.Cdj)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],yt.prototype,"_prefabLoader",void 0),(0,Y.Cg)([(0,Q.Cdj)("20f-5f67"),(0,Y.Sn)("design:type",lt.Y)],yt.prototype,"_segment",void 0),yt=(0,Y.Cg)([(0,Q.EVk)("LootDashBattleUI",ct.Y.lootDash)],yt)},54174:(q,K,z)=>{"use strict";var Y,Q,X;z.d(K,{Fi:()=>Q,I1:()=>Z,_c:()=>X,h2:()=>Y}),function(q){q.EmptyStateStar="empty-state-star",q.FullStateLootbag="full-state-lootbag",q.FullStateNoIcon="full-state-no-icon",q.PipFill0="empty-state-star",q.PipFill1="pip-fill-1",q.PipFill2="pip-fill-2",q.PipFill3="pip-fill-3",q.PipFill4="pip-fill-4",q.PipFill5="pip-fill-5",q.PipFillEmpties="pip-fill-empties",q.PipFillFull="pip-fill-full",q.PipLoss1="pip-loss-1",q.PipLoss2="pip-loss-2",q.PipLoss3="pip-loss-3",q.PipLoss4="pip-loss-4"}(Y||(Y={})),function(q){q.Idle="idle",q.Receive="lootbag-recieve",q.Fill="lootbag-fill",q.Finish="lootbag-finish"}(Q||(Q={})),function(q){q.None="none",q.Fireworks="fireworks",q.FireworksLess="fireworks-less",q.FireworksSingle="fireworks-single"}(X||(X={}));class Z{}Z.REVIVE_ANIMATION_NAME="revive-idle",Z.REVIVE_UPDATE_EVENT_NAME="tick-down",Z.REVIVE_ANIMATION_SLOT_NAME="numbers",Z.LOOT_BAG_ANIMATION_SLOT_NAME="numbers",Z.StageIntroAnimationName="stage-idle",Z.MATH_STREAK_LOOT_BAG_ATTACHMENT_NAME="lootbag",Z.DEFAULT_TWEEN_DURATION=500,Z.LOOT_BAG_TWEEN_TIME_MS=1e3,Z.LOOT_BAG_WAVE_COMPLETE_TEXT_TWEEN_TIME_MS=1e3,Z.LOOT_BAG_WAVE_COMPLETE_DELAY_TIME_MS=1e3,Z.LOOT_BAG_WAVE_COMPLETE_ICON_SCALE_TIME=300,Z.STAGE_INFO_WIDGET_UPDATE_DELAY_MS=500,Z.PLAYER_PIN_ROTATE_START_TWEEN_DURATION=1e3,Z.PLAYER_PIN_ROTATE_START_AMOUNT=-17,Z.PLAYER_PIN_ROTATE_END_TWEEN_DURATION=600,Z.PLAYER_PIN_ROTATE_ELASTIC_STRENGTH=2.6,Z.PLAYER_PIN_ROTATE_ELASTICITY=.5},61895:(q,K,z)=>{"use strict";z.d(K,{B:()=>ut});var Y=z(8674),Q=z(62459),X=z(56942),Z=z(52551),J=z(78746),tt=z(12022),et=z(66582),it=z(35120),st=z(91207),nt=z(77938),at=z(23082),rt=z(53661),ot=z(87331),ht=z(22023),ct=z(80060),dt=z(66207);const lt=[et._$.NonMember,et._$.MemberCore,et._$.MemberLevelUp];class ut{static getInjectedValuesForNoMoreRevivesModal(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=it.q.instance.prodigy.gameContainer.get("ad2-c5b2"),X=yield Y.fetchMembershipUpsell();if(!lt.includes(null!=z?z:X.tier))return;const Z=null!=K?K:dt.D.isFeatureEnabled(),J=it.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),st=tt.G.getNumberOfRevivesFromMemberTier(et._$.MemberCore,q),nt=tt.G.getNumberOfRevivesFromMemberTier(et._$.MemberUltra,q),at=tt.G.getNumberOfRevivesFromMemberTier(et._$.MemberLevelUp,q),ot=tt.G.getNumberOfRevivesFromMemberTier(et._$.MemberUltimateMath,q),ht=J.getText("NO_MORE_REVIVES");let ct="",ut="",ft="",bt="",pt="",vt="",gt=!1,mt=!1,yt=!1,_t=!1;switch(null!=z?z:X.tier){case et._$.NonMember:Z?(ct=J.getText("BE_ULTRA_READY_AND_GET_MORE"),ut=J.getText("MEMBERSHIP_TIER_NAME_CORE"),bt=J.getText("PLUS_AND_ULTRA"),pt=`x${st}`,vt=`x${nt}`,mt=!0):(ct=J.getText("MEMBERS_GET_MORE_REVIVES"),ut=J.getText("LEVEL_UP_MEMBER"),ft=J.getText("ULTIMATE_MEMBER"),pt=`x${at}`,vt=`x${ot}`,gt=!0);break;case et._$.MemberCore:case et._$.MemberLevelUp:Z?(ct=J.getText("BE_ULTRA_READY_AND_GET_MORE"),bt=J.getText("PLUS_AND_ULTRA"),vt=`x${nt}`,_t=!0):(ct=J.getText("ULTIMATE_MEMBERS_GET_MORE_REVIVES"),ft=J.getText("ULTIMATE_MEMBER"),vt=`x${ot}`,yt=!0)}return{[rt.eV.NoMoreRevivesBannerTextCore]:ut,[rt.eV.NoMoreRevivesBannerTextPlus]:ft,[rt.eV.NoMoreRevivesBannerTextUltra]:bt,[rt.eV.NoMoreRevivesLineOneText]:ht,[rt.eV.NoMoreRevivesLineTwoText]:ct,[rt.eV.NoMoreRevivesReviveAmountTextCore]:pt,[rt.eV.NoMoreRevivesReviveAmountTextPlusAndUltra]:vt,[rt.eV.NoMoreRevivesShowCoreAndPlus]:gt,[rt.eV.NoMoreRevivesShowCoreAndUltra]:mt,[rt.eV.NoMoreRevivesShowPlusOnly]:yt,[rt.eV.NoMoreRevivesShowUltraOnly]:_t}}))}static getInjectedValuesForOwnedPetCardPet(q,K=!1){var z,Y;const Q=nt.t.getItem("pet",q.ID);return{PET_ID:q.ID,PET_DATA:q,PET:q,NAME:null!==(Y=null!==(z=q.nickname)&&void 0!==z?z:q.name)&&void 0!==Y?Y:Q.data.name,LEVEL:q.level,MERGE_RANK:ht.P8.getPetDisplayMergeRank(q.ID,q.uniqueID),SHOW_MERGE_RANK_BADGE:ht.P8.canPetAccessMergeRanks(q.ID),INPUT_ENABLED:!0,SELECTED:!1,ICON:st.E.getIconForType("pet",q.ID),SHOW_ON_TEAM:K,SHOW_EVOLVE:!1,SHOW_UPGRADE:!1,SHOW_GUIDE_HAND:!1,SHOW_ELEMENT_ICON:!0,SHOW_MEMBERLOCK_ICON:!1,SHOW_STAT_ICON:!1,SHOW_LEVEL_ICON:!0,SHOW_PET_GEAR:!0}}static getInjectedValuesForOwnedPetCardBackpackItem(q,K){var z;const Y=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q="follow"===K?Y.equipment.getFollow()===q:Y.equipment.getMount()===q,X=nt.t.getItem(K,q);return{NAME:null===(z=null==X?void 0:X.data)||void 0===z?void 0:z.name,INPUT_ENABLED:!0,ICON:st.E.getIconForType(K,q),SHOW_ON_TEAM:Q,SHOW_EVOLVE:!1,SHOW_UPGRADE:!1,SHOW_GUIDE_HAND:!1,SHOW_ELEMENT_ICON:!1,SHOW_STAT_ICON:!0,SHOW_LEVEL_ICON:!1,SHOW_PET_GEAR:!1,SHOW_MEMBERLOCK_ICON:ot.G.shouldShowMemberLockIcon(X,Y),SHOW_MERGE_RANK_BADGE:!1,STAT_ICON_DISPLAY_ITEM_ID:q,STAT_ICON_DISPLAY_ITEM_TYPE:K,ITEM_CARD_DATA:X,MERGE_RANK:0}}static getInjectedValuesForFilledTeamCardPet(q){var K,z;const Y=nt.t.getItem("pet",q.data.ID);return{PET_ID:q.data.ID,PET_DATA:q.data,NAME:null!==(z=null!==(K=q.data.nickname)&&void 0!==K?K:q.data.name)&&void 0!==z?z:Y.data.name,LEVEL:q.data.level,MERGE_RANK:ht.P8.getPetDisplayMergeRank(q.data.ID,q.data.uniqueID),SHOW_MERGE_RANK_BADGE:ht.P8.canPetAccessMergeRanks(q.data.ID),INPUT_ENABLED:!0,SPINE_GUID:X.Q[`Spine_pet_${q.data.ID}_json`],SHOW_SPINE:!0,SHOW_EMPTY_STATE:!1,SHOW_MEMBERLOCK_ICON:!1,SHOW_LEVEL:!0,SHOW_REPLACE_TOOLTIP:!1}}static setupPrefabWithRetainedContext(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=it.q.instance.prodigy.gameContainer.get("983-05a7"),X=yield ct.d.loadWithInjectedValuesAndDependenciesFromGUID(Y,q,K),Z=X.transform;return Z.setPivot(.5,.5),Z.setAnchorMin(0,0),Z.setAnchorMax(0,0),X.name=z,ut.moveObjectContextToGameObject(X,K),Q&&(X.parent=Q),X.setLayer(void 0,!0),X}))}static moveObjectContextToGameObject(q,K){const z=q.addComponent(Q.bE_);for(const Q in K)z.Container.bind(Q).toConstantValue(K[Q]);const Y=q.parent;q.parent=null,Y.destroy()}static cancelQuickQuiz(){var q,K,z;const Y=it.q.instance.prodigy.gameContainer.get("1c5-a816"),X=it.q.instance.prodigy.gameContainer.get("7f4-4464"),Z=it.q.instance.game.state.current,tt=void 0!==X.currentQuickQuizId&&!Q.Aq$.isDefined(Y.matchController)&&Z!==at.G.LootDashTransport;if(Z===at.G.LootDashTransport||tt)return null===(q=Y.transportModalTimer)||void 0===q||q.onTimerCompleted.removeAll(),Y.transportModalTimer=void 0,X.leaveQuickQuiz(),it.q.instance.prodigy.open.menuCloseAll(),void ut.openQuickQuizCancelledPopup((()=>{X.handleQuizExitFlowComplete()}));if(!(null===(K=Y.matchController)||void 0===K?void 0:K.matchType)||!(null===(z=Y.matchController)||void 0===z?void 0:z.isQuickQuiz))return;[J.zM.FindingAMatch,J.zM.WaitingForPlayers].includes(Y.lootDashState)&&(Y.cancelMatchmaking(),ut.openQuickQuizCancelledPopup((()=>Y.setState(J.zM.MatchEndedByServer))))}static openQuickQuizCancelledPopup(q,K=!0){const z=Z.w.getConfig(J.B1.QuickQuiz),Y=it.q.instance.prodigy.open.message(it.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("LOOT_DASH_QUICK_QUIZ_CANCELLED"));if(K){const K=window.setTimeout((()=>{Y.close()}),z.quickQuizConfigs.quickQuizCancelledTimeoutMs);Y.onClose=()=>{window.clearTimeout(K),q()}}else Y.onClose=()=>{q()}}}},66397:(q,K,z)=>{"use strict";z.d(K,{K:()=>Dt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(30334),J=z(82351),tt=z(36648),et=z(28628),it=z(52551),st=z(70156),nt=z(78746),at=z(12022),rt=z(63011),ot=z(35120),ht=z(129),ct=z(23082),dt=z(68152),lt=z(4764),ut=z(83267),ft=z(62886),bt=z(91207),pt=z(571),vt=z(36164);class gt{get isQuickQuiz(){return this.matchType===nt.B1.QuickQuiz}get isHomeMatch(){return this.matchType===nt.B1.Home}get numCurrentPlayers(){return this._numBotOpponents+this._numLiveOpponents+1}get numBotOpponents(){return this._numBotOpponents}get numLiveOpponents(){return this._numLiveOpponents}get totalStages(){var q,K;return null!==(K=null===(q=this._lootDashMatchData.stageData)||void 0===q?void 0:q.length)&&void 0!==K?K:0}get opponents(){return this._opponents}get lootDashMatchData(){return this._lootDashMatchData}constructor(q,K,z){this.onMatchJoined=new Q.HN0,this.onOpponentJoined=new Q.HN0,this.onOpponentAdvanced=new Q.HN0,this.onBattleDataChanged=new Q.HN0,this._numBotOpponents=0,this._numLiveOpponents=0,this._isCleanedUp=!1,this._opponents=[],this._playerHeadSprites={},this._networkHandler=q,this._playerProvider=K,this.config=z}get currentWaveIndex(){return this._lootDashMatchData.currentWaveIndex}get numWavesInCurrentStage(){var q,K;return null!==(K=null===(q=this._lootDashMatchData.currentStage)||void 0===q?void 0:q.waves.length)&&void 0!==K?K:0}get currentStageIndex(){var q,K;return null!==(K=null===(q=this._lootDashMatchData.currentStage)||void 0===q?void 0:q.stageIndex)&&void 0!==K?K:0}set revivesRemaining(q){this._revivesRemaining=q,this.onBattleDataChanged.dispatch()}get revivesRemaining(){return this._revivesRemaining}setStageData(q){this._lootDashMatchData.stageData=q}setCurrentStageData(q){var K;(null===(K=this._lootDashMatchData.currentStage)||void 0===K?void 0:K.stageIndex)!==q.stageIndex&&(this._lootDashMatchData.currentStage=q,this._lootDashMatchData.currentWaveIndex=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisStage=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisStage=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave=0,this.onBattleDataChanged.dispatch())}getCurrentZoneStages(){const q=this._lootDashMatchData.stageData.filter((q=>{var K,z;return q.zoneIndex===(null!==(z=null===(K=this._lootDashMatchData.currentStage)||void 0===K?void 0:K.zoneIndex)&&void 0!==z?z:0)}));return q.sort(((q,K)=>q.stageIndex-K.stageIndex)),q}setCurrentWaveIndex(q){this._lootDashMatchData.currentWaveIndex!==q&&(this._lootDashMatchData.currentWaveIndex=q,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave=0,this.onBattleDataChanged.dispatch())}setCurrentMathStreak(q,K){K&&(this._lootDashMatchData.lootBagData=K),this._lootDashMatchData.currentMathStreak=q,this.onBattleDataChanged.dispatch()}setLootBagData(q){this._lootDashMatchData.lootBagData=q,this.onBattleDataChanged.dispatch()}getOpponentData(q){return this._opponents.find((K=>K.playerId===q))}getPlayerHeadSprite(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return Q.Aq$.isDefined(this._playerHeadSprites[q])||(this._playerHeadSprites[q]=pt.z.createHeadFromAppearanceData(q===this._playerProvider.getUserID()?this._playerProvider.getAppearance():this.getOpponentData(q).appearanceData,{trimTransparentPixels:!1})),this._playerHeadSprites[q]}))}getLootBagRewards(){var q,K;return(null!==(K=null===(q=this._lootDashMatchData.matchRewards)||void 0===q?void 0:q.rewards)&&void 0!==K?K:[]).map((q=>q.itemData))}getMemberLootBagRewards(){var q,K;return(null!==(K=null===(q=this._lootDashMatchData.matchRewards)||void 0===q?void 0:q.memberRewards)&&void 0!==K?K:[]).map((q=>q.itemData))}joinMatch(){this._lootDashMatchData={currentWaveIndex:0,currentMathStreak:0,matchCompletionState:nt.Cr.Unfinished,lootBagData:{fromStreak:0,fromTreasureRush:0,fromFeaturedItems:0,fromMemberBonus:0,fromPlacement:0,fromWaveComplete:0},questionsAnsweredData:{totalQuestionsAnswered:0,totalQuestionsAnsweredCorrectly:0,questionsAnsweredThisStage:0,questionsAnsweredCorrectlyThisStage:0,questionsAnsweredThisWave:0,questionsAnsweredCorrectlyThisWave:0}},ot.q.instance.prodigy.gameContainer.get("20f-5f67").lootDash.sendMatchmakingStartedEvent(),ot.q.instance.prodigy.education.onQuestionAnswered.add(this.updateQuestionsAnsweredData,this)}updateQuestionsAnsweredData(q){this._lootDashMatchData.questionsAnsweredData.totalQuestionsAnswered++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisStage++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave++,q&&(this._lootDashMatchData.questionsAnsweredData.totalQuestionsAnsweredCorrectly++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisStage++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave++)}stageIntroComplete(){0===this._lootDashMatchData.currentStage.zoneIndex&&0===this._lootDashMatchData.currentStage.stageIndex&&this._networkHandler.startMatch({matchType:this.matchType}).then((q=>{this.handleStartMatchResponse(q)})).catch(Q.RQr.createHandler("Error calling to start match"))}handleStartMatchResponse(q){this._startTime=Date.now(),this._lootDashMatchData.currentStreak=q.playerStreak,this.cleanUpOpponentAssets()}completeMatch(q){this._endTime=Date.now(),this._networkHandler.completeMatch({}).then((q=>{this.handleCompleteMatchResponse(q)})).catch(Q.RQr.createHandler("Error completing Loot Dash match"))}handleCompleteMatchResponse(q){this.lootDashMatchData.matchCompletionState=at.G.getMatchCompletionState(!0,q.exitedEarly,q.ranOutOfRevives),this.lootDashMatchData.placement=q.finishPlace,this.lootDashMatchData.lootBagData=q.lootBags,this.lootDashMatchData.currentStreak=q.playerStreak,q.ranOutOfRevives&&ot.q.instance.prodigy.gameContainer.get("20f-5f67").lootDash.sendNoMoreRevivesEvent(),this.lootDashMatchData.matchRewards={rewards:q.rewards,memberRewards:q.memberRewards},this.onBattleDataChanged.dispatch(),1===q.finishPlace&&ot.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(ft.T.WIN_LOOT_DASH,{}).catch(Q.RQr.createHandler("Error sending WinLootDash event")),q.finishPlace>=1&&ot.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(ft.T.COMPLETE_LOOT_DASH,{}).catch(Q.RQr.createHandler("Error sending CompleteLootDash event"))}cleanUpOpponentAssets(){var q,K,z,Y,X,Z,J,tt,et;const it={hat:{},hair:{},face:{},skin:{},eyeColor:{},outfit:{},weapon:{},boot:{},costume:{}},st=[...this._opponents.map((q=>q.appearanceData)),this._playerProvider.getAppearance()];for(const Q of st)it.hat[Q.hat]=(null!==(q=it.hat[Q.hat])&&void 0!==q?q:0)+1,it.hair[Q.hair.style]=(null!==(K=it.hair[Q.hair.style])&&void 0!==K?K:0)+1,it.face[Q.face]=(null!==(z=it.face[Q.face])&&void 0!==z?z:0)+1,it.skin[Q.skin]=(null!==(Y=it.skin[Q.skin])&&void 0!==Y?Y:0)+1,it.eyeColor[Q.eyeColor]=(null!==(X=it.eyeColor[Q.eyeColor])&&void 0!==X?X:0)+1,it.outfit[Q.outfit]=(null!==(Z=it.outfit[Q.outfit])&&void 0!==Z?Z:0)+1,it.weapon[Q.weapon]=(null!==(J=it.weapon[Q.weapon])&&void 0!==J?J:0)+1,it.boot[Q.boot]=(null!==(tt=it.boot[Q.boot])&&void 0!==tt?tt:0)+1,it.costume[Q.costume]=(null!==(et=it.costume[Q.costume])&&void 0!==et?et:0)+1;for(const nt of this._opponents)this.getPlayerHeadSprite(nt.playerId).then((()=>{var q;const K=[];for(const z of Object.keys(it)){const Y="hair"===z?null===(q=nt.appearanceData.hair)||void 0===q?void 0:q.style:nt.appearanceData[z];if(Y&&--it[z][Y]<=0){const q=vt.R[`${z}Map`];q&&K.push(q[Y])}}K.length>0&&(bt.E.getImageGuidsFromGearGuids(K).forEach((q=>ot.q.instance.game.cache.removeImage(q))),K.forEach((q=>ot.q.instance.game.cache.removeJSON(q))))})).catch(Q.RQr.createHandler(`Error getting player head sprite for ${nt.playerId}`))}cleanup(){this._isCleanedUp=!0,this.onMatchJoined.dispose(),this.onOpponentJoined.dispose(),this.onOpponentAdvanced.dispose(),this.onBattleDataChanged.dispose(),ot.q.instance.prodigy.education.onQuestionAnswered.remove(this.updateQuestionsAnsweredData,this)}}var mt=z(32389),yt=z(94428),_t=z(76277),Et=z(13956),wt=z(32073);class Tt extends gt{constructor(q,K,z){super(q,K,z),this.matchType=nt.B1.QuickQuiz,this.matchmakingType=nt.gK.Multiplayer,this.opponentUpdatesToProcess=[],this._opponentAdvancedDelayMs=1e4,this._opponentAdvancedDelayTimeouts={};for(const Y of this._quickQuizManager._allMessages)this.handleMultiplayerMessage(Y);this._quickQuizManager.onQuickQuizMessageReceived.add(this.handleMultiplayerMessage,this)}joinMatch(){super.joinMatch(),window.setImmediate((()=>{this.onMatchJoined.dispatch(),this.onOpponentJoined.dispatch(this.numCurrentPlayers,this.numCurrentPlayers===this.config.matchSetup.maximumPlayers)}))}handleMultiplayerMessage(q){switch(q.type){case"channelData":this.handleCustomChannelDataMessage(q.channelData);break;case"userList":this.handleUserListMessage(q.userList);break;case"playerJoined":this.handlePlayerJoined(q.playerInfo);break;case"playerLeft":break;case"broadcastAction":const K=q.actionInfo;if(!K)return;switch(K.type){case yt.H9.QuizEnded:this.beginForcedEndQuickQuiz();break;case yt.H9.PlayerProgressUpdated:const q=K.data;q.playerId!==this._playerProvider.getUserID()&&this.handleOpponentUpdate(q)}}}beginForcedEndQuickQuiz(){if(this._lootDashMatchData.matchCompletionState!==nt.Cr.Unfinished)return;const q=Q.wa5.getActiveScene().container.get("BattleController");q&&q.type===et.gu.LootDash&&q.endLootDashQuickQuiz()}handleUserListMessage(q){for(const K of q)this.handlePlayerJoined(K)}handleCustomChannelDataMessage(q){const K=void 0!==this._channelData;this._channelData=q;for(const z of this._opponents){const q=z.currentStageIndex;z.currentStageIndex=this.getPlayerStageIndex(z.playerId),K&&z.currentStageIndex!==q&&this.handleOpponentUpdate({playerId:z.playerId,stageIndex:z.currentStageIndex-1,time:0})}}handlePlayerJoined(q){if(this._playerProvider.getUserID().toString()===q.userID)return;if(this._opponents.some((K=>K.playerId.toString()===q.userID)))return;this._numLiveOpponents++,this._opponents.push({playerId:Number.parseInt(q.userID),currentStageIndex:this.getPlayerStageIndex(Number.parseInt(q.userID)),appearanceData:{face:q.appearance.appearance.face,hair:{color:q.appearance.appearance.hair.color,style:q.appearance.appearance.hair.style},hat:q.appearance.equipment.hat,skin:q.appearance.appearance.skinColor,eyeColor:q.appearance.appearance.eyeColor,outfit:q.appearance.equipment.outfit,weapon:q.appearance.equipment.weapon,boot:q.appearance.equipment.boots,costume:(0,_t.G)(mt.q).enabled?q.appearance.equipment.costume:void 0}}),this.onOpponentJoined.dispatch(this.numCurrentPlayers,this.numCurrentPlayers===this.config.matchSetup.maximumPlayers);let K=this.config.matchboard.batchUpdatesAtPlayerCount;!Q.Aq$.isDefined(this.batchUpdateInterval)&&this.numCurrentPlayers>=this.getPlayerCountToBatchUpdatesAt()&&(this.batchUpdateInterval=window.setInterval(this.handleBatchedOpponentUpdates.bind(this),K))}getPlayerStageIndex(q){var K;let z=0;(null===(K=this._channelData)||void 0===K?void 0:K[`playerProgress-${q}`])&&(z=this._channelData[`playerProgress-${q}`].stageTime.stageIndex+1);let Y=0;const Q=this.getOpponentData(q);return Q&&(Y=Q.currentStageIndex),Math.max(z,Y)}handleOpponentUpdate(q){this.numCurrentPlayers>=this.getPlayerCountToBatchUpdatesAt()?this.opponentUpdatesToProcess.push(q):this.advanceOpponent(q)}advanceOpponent(q){this.getOpponentData(q.playerId).currentStageIndex=q.stageIndex+1,this._opponentAdvancedDelayTimeouts[q.playerId]=window.setTimeout((()=>{this.onOpponentAdvanced.dispatch(q.playerId,q.stageIndex+1),this._opponentAdvancedDelayTimeouts[q.playerId]=void 0}),this._opponentAdvancedDelayMs)}handleBatchedOpponentUpdates(){this.opponentUpdatesToProcess.forEach((q=>this.advanceOpponent(q))),this.opponentUpdatesToProcess.length=0}getPlayerCountToBatchUpdatesAt(){return this.config.matchboard.batchUpdatesAtPlayerCount}completeMatch(q){if(super.completeMatch(q),q){const q=this._quickQuizManager.currentAssignmentId;Q.Aq$.isDefined(q)&&q>-1&&wt.v.markAssignmentAsCompleted(q)}wt.v.addCompletedQuickQuizId(this._quickQuizManager.currentQuickQuizId),this._quickQuizManager.leaveQuickQuizChannel()}cleanup(){this._quickQuizManager.onQuickQuizMessageReceived.remove(this.handleMultiplayerMessage,this),window.clearInterval(this.batchUpdateInterval);for(const q of Object.values(this._opponentAdvancedDelayTimeouts))window.clearTimeout(q);super.cleanup()}}(0,Y.Cg)([(0,Et.b)("7f4-4464"),(0,Y.Sn)("design:type",lt.w)],Tt.prototype,"_quickQuizManager",void 0);class St{static getMatchController(q,K,z,Y){if(!q||!St.matchControllerMap[q])throw new Error(`No match controller found for match type: ${q}`);return new St.matchControllerMap[q](K,z,Y)}}St.matchControllerMap={[nt.B1.Home]:class extends gt{constructor(){super(...arguments),this.matchType=nt.B1.Home,this.matchmakingType=nt.gK.Bots,this._matchmakingTimeouts=[],this._opponentsPaused=!1}set opponentsPaused(q){this._opponentsPaused=q}joinMatch(){super.joinMatch();const q=this.config.matchSetup.maximumPlayers;this._numBotOpponents=Math.floor(Math.random()*q),this._numLiveOpponents=0;for(let z=0;z{this._isCleanedUp||(this.onMatchJoined.dispatch(),this.beginMatchmaking())})).catch(Q.RQr.createHandler("Error joining match"))}beginMatchmaking(){const q=this.config.matchSetup.maximumTimeBetweenBotJoinsMs,K=this.config.matchSetup.maximumPlayers,z=this.numCurrentPlayers>=K;this.onOpponentJoined.dispatch(this.numCurrentPlayers,z);const Y=K-this.numCurrentPlayers;for(let X=0;X{this._numBotOpponents++,this.onOpponentJoined.dispatch(this.numCurrentPlayers,this.numCurrentPlayers===K)}),Q.cj9.random(0,q)))}handleStartMatchResponse(q){super.handleStartMatchResponse(q),ot.q.instance.prodigy.gameContainer.get("20f-5f67").lootDash.sendBotDataRetrievedEvent(q.botDistribution),this._stageTimes=q.stageTimes.map((q=>Object.assign(Object.assign({},q),{playerId:this.opponents[q.playerId].playerId}))),this.startOpponents()}startOpponents(){this._remainingStageTimes=this._stageTimes.slice(),this._opponentInterval=window.setInterval((()=>{if(this._opponentsPaused)return;const q=Date.now()-this._startTime;for(;this._remainingStageTimes.length>0&&this._remainingStageTimes[0].time!(q instanceof ht.a)));z.featuredFollowEquipped=Y.featuredFollows.includes(Q.equipment.getFollow()),z.featuredFollowOwned=Y.featuredFollows.some((q=>Q.backpack.hasItem("follow",q))),!z.featuredFollowEquipped&&z.featuredFollowOwned&&z.numFeaturedItemsThatCouldBeEquipped++,z.featuredMountEquipped=Y.featuredMounts.includes(Q.equipment.getMount()),z.featuredMountOwned=Y.featuredMounts.some((q=>Q.backpack.hasItem("mount",q))),!z.featuredMountEquipped&&z.featuredMountOwned&&z.numFeaturedItemsThatCouldBeEquipped++;let Z=0;for(let et=0;etJ&&(z.numFeaturedItemsThatCouldBeEquipped+=tt-J),z.numFeaturedItemsEquipped=(z.featuredPetEquippedInSlot1?1:0)+(z.featuredPetEquippedInSlot2?1:0)+(z.featuredFollowEquipped?1:0)+(z.featuredMountEquipped?1:0),z.cappedNumFeaturedItemsOwned=Math.min(z.numFeaturedPetsOwned,2)+(z.featuredFollowOwned?1:0)+(z.featuredMountOwned?1:0),z}))}joinMatch(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._matchController=St.getMatchController(this.matchType,this.networkHandler,this._playerProvider,this.config),this._matchController.onMatchJoined.addOnce((()=>this.setState(nt.zM.WaitingForPlayers))),ot.q.instance.prodigy.gameContainer.get("20f-5f67").lootDash.lootDashMatchController=this._matchController,this._matchController.joinMatch(),this.immediateStart=void 0,this._matchType=nt.B1.Home}))}matchmakingComplete(q,K){this._matchmakingTimeouts.push(window.setTimeout((()=>{this.setState(nt.zM.MatchStartingSoon),window.setTimeout((()=>{this.setState(nt.zM.MatchStartingNow),ot.q.instance.prodigy.gameContainer.get("b37-c775").getBattleStartQuestData(et.gu.LootDash).catch((q=>{Q.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(q)})).then((q=>{this.startBattle(q)})).catch(Q.RQr.createHandler("Error continuing the battle start function in LootDashManager"))}),K)}),q))}cancelMatchmaking(){this.cleanupMatch(this._matchController),this._matchmakingTimeouts.forEach(window.clearTimeout),this._matchmakingTimeouts.length=0,this.setState(nt.zM.LobbyDefault)}startBattle(q){this.matchController.revivesRemaining=this.getNumberOfStartingRevives();const K={battleType:et.gu.LootDash,lootDashMatchType:this.matchController.matchType,opponents:{units:{}},difficulty:Z.z,activeQuestIDs:null==q?void 0:q.questIDs,questEventsToSend:null==q?void 0:q.questEvents};this.matchController.isQuickQuiz&&(K.quickQuizId=lt.w.instance().currentQuickQuizId);const z={backgroundID:[tt.q.Battle_wizarddash_bg,tt.q.Battle_wizarddash_fg],backgroundMusicID:J.B.Loot_dash_background_music,defeatData:{preventDefaultTeleport:!0},onVictory:this.handlePostBattle.bind(this),onDefeat:this.handlePostBattle.bind(this),onEscape:this.handlePostBattle.bind(this),showQiBadgeAnimations:!1};ot.q.instance.game.state.states.get(ct.G.SecureBattleRevamp).startBattleRequest(K,z)}cleanupMatch(q){q.cleanup(),this.matchController===q&&(ot.q.instance.prodigy.gameContainer.get("20f-5f67").lootDash.lootDashMatchController=null,this._matchController=null)}handlePostBattle(){const q=Q.wa5.getActiveScene().container.get("BattleController"),K=q.postBattleExpressModeController.isEnabled;if(q.prefabRoot.destroy(),this.matchController.isQuickQuiz){ot.q.instance.prodigy.gameContainer.get("7f4-4464").handleQuizExitFlowComplete()}else K?ot.q.instance.prodigy.world.teleportToCurrentMap():ot.q.instance.prodigy.open.lootDashMenu()}};Dt=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Sn)("design:paramtypes",[])],Dt)},99015:(q,K,z)=>{"use strict";z.d(K,{C:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546);let J=class extends Z.D{claimMemberRewards(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(X.D.MagicoinBattleRewards.ClaimMemberRewards,{})}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},82142:(q,K,z)=>{"use strict";z.d(K,{gT:()=>Ae});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z(20748),tt=z(35120),et=z(51477),it=z(29738),st=(z(34829),z(2272)),nt=z(75329),at=z(29546),rt=z(70399),ot=z(64794),ht=z(90736),ct=z(51365),dt=z(43844),lt=z(94909),ut=z(80070),ft=z(66930),bt=z(42862),pt=z(40410),vt=z(59510),gt=z(99625),mt=z(15521),yt=z(51972),_t=z(48199),Et=z(50348),wt=z(21457),Tt=z(10312),St=z(91207),At=z(90161),Ct=z(21573),Ot=z(99332),It=z(39258),Dt=z(43054),Rt=z(69046);class Pt{get factory(){return this._factory}constructor(q){this._factory=q}}var Mt=z(41666),Nt=z(14991);class xt{constructor(q,K,z,Y=Nt.v.Visible){this._state=Nt.v.Visible,this._tween=null,this._factoryProvider=z,this._toVisible=q,this._toHidden=K,this._state=Y}get state(){return this._state}get isTweening(){return this._state===Nt.v.SlidingIn||this._state===Nt.v.SlidingOut}cancel(q=!1){this._tween&&this.isTweening&&this._tween.stop(q)}slide(q,K=0,z=null){q&&!this.isTweening&&(this._state===Nt.v.Hidden?(this._state=Nt.v.SlidingOut,this._tween=this._factoryProvider.factory.tween(q.legacyTransform.group,this).to(this._toVisible,K)):this._state===Nt.v.Visible&&(this._state=Nt.v.SlidingIn,this._tween=this._factoryProvider.factory.tween(q.legacyTransform.group,this).to(this._toHidden,K)),this._tween.onTweenComplete.add((()=>{this._tween.onTweenComplete.removeAll(),this._state=this._state===Nt.v.SlidingIn?Nt.v.Hidden:Nt.v.Visible,this._tween=null,z&&z()}),this),this._tween.start())}}class Lt{get width(){return this._component?this._component.width:0}set width(q){this._component&&(this._component.width=q)}get text(){return this._component?this._component.text:null}set text(q){this._component&&(this._component.text=q)}get gameObject(){return this._gameObject}get onComponentLoaded(){return this._componentLoadedSignal}constructor(q,K,z){this._componentLoadedSignal=new Q.HN0,this._prefabLoader=K,this._parent=z,this._factoryProvider=new Pt(q.add),tt.q.instance.prodigy.load.assets([ot.D.ATLAS_STORE],this.assetsReady.bind(this))}destroy(){(this._tween.isTweening||this._tween.state===Nt.v.Visible)&&(this._tween.cancel(),this.setVisible(!1)),this._componentLoadedSignal.dispose(),this._gameObject.destroy()}setVisible(q,K=Lt.SLIDE_DURATION_MS,z=ot.D.TOOLTIP_STAY_DURATION,Y){this._component&&(K<=0?this._component.root.legacyTransform.y=q?ot.D.SPACE_16PX:-this._component.height-ot.D.SPACE_16PX:this._tween.isTweening||this._tween.slide(this._component.root,K,Y),q&&Q.Aq$.isDefined(z)&&z>0&&setTimeout((()=>{this.setVisible(!1,K,0,(()=>{this.destroy()}))}),z))}assetsReady(q,K){this._gameObject=this._prefabLoader.loadFromGUID(ot.D.UI_TOOLTIP_PREFAB,this._parent),this._component=this._gameObject.findComponent(Mt.Z),this._gameObject.legacyTransform.x=tt.q.instance.game.width/2,this._component&&(this._component.root.legacyTransform.y=-this._component.height-ot.D.SPACE_16PX,this._tween=new xt({y:ot.D.SPACE_16PX},{y:-this._component.height-ot.D.SPACE_16PX},this._factoryProvider,Nt.v.Hidden),this._componentLoadedSignal.dispatch())}}Lt.SLIDE_DURATION_MS=0;class kt extends At.R{get itemSelected(){return this._itemSelected}get selectionChanged(){return this._selectionChanged}constructor(q,K,z,Y,X,Z,J,et,it=null,st=null){super(q,K?K.legacyTransform.group:void 0,z,Y,[ot.D.ATLAS_STORE,ot.D.ATLAS_TOWERTOWN_MISC,ot.D.ATLAS_BUTTONS]),this._towerTownBreadcrumbManager=null,this._pages=new Map,this._smallItems=new Map,this._slots=new Map,this._itemSelected=new Q.HN0,this._selectionChanged=new Q.HN0,this._selection={},this._currentFilter=Ot.R.Rooms,this._building=!1,this._parentGameObject=null,this._parentGameObject=K,this._toolTip=X,this._storeManager=J,this._decorator=Z,this._spriteFactory=et,this._towerTownBreadcrumbManager=it,this._closeCallback=st,this._selection.decorations=new Map,tt.q.instance.prodigy.load.assets(ot.D.TAB_CLICK_SFX)}create(){this._ui=this._prefabLoader.loadFromGUID(ot.D.UI_CHOOSE_FLOOR_LOOK_PREFAB,this._parentGameObject),this._floorComponent=this._ui.findComponent(It.p),this._floorComponent.commands.add(this.execute,this),this._towerTownBreadcrumbManager&&!this._towerTownBreadcrumbManager.isBreadcrumbComplete(vt.M.TutorialCompleted)||(this._toolTip.width=250,this._toolTip.text=tt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("TT_CHOOSE_FLOOR_TITLE"),this._toolTip.setVisible(!0,Lt.SLIDE_DURATION_MS,null)),this._floorComponent.largeItemPointer.active=!1,this._floorComponent.smallItemPointer.active=!1,this._floorComponent.smallItemContainer.active=!1,this._floorComponent.largeItemContainer.active=!1,this.makeLargePrefabs(ot.D.UI_LARGE_LIST_ITEM_PREFAB,this._floorComponent.largeItemPoints),this.makeSmallPrefabs(ot.D.UI_SMALL_LIST_ITEM_PREFAB,this._floorComponent.smallItemPoints),this._decorator&&(this._decorator.itemSelected.add((q=>{this.applyDecoration(q)}),this),this._decorator.removeSelected.add((q=>{this.removeDecoration(q)}),this)),this._spriteFactory.assetsReady.add(this.assetsReady.bind(this)),this.createPage(Ot.R.Rooms,this._floorComponent.largeItemPoints),this.createPage(Ot.R.Frames,this._floorComponent.largeItemPoints),this.createPage(Ot.R.Decorations,this._floorComponent.smallItemPoints),this.startBuildingButton.onClick.add(this.consumeItems,this),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this.startBuildingButton.GameObject),this.updateView()}close(){this._toolTip.destroy(),this.removeListeners(),this.startBuildingButton.GameObject.destroy(),!this._building&&this._closeCallback&&this._closeCallback(),this._ui.destroy(),super.close()}get quitButton(){return this._floorComponent.quitButton}get startBuildingButton(){return this._floorComponent.startBuildingButton}get roomsToggleButton(){return this._floorComponent.roomsToggle}get framesToggleButton(){return this._floorComponent.framesToggle}get decorationsToggleButton(){return this._floorComponent.decorationsToggle}createPage(q,K){this._pages[q]={assetType:this.getAssetType(q),pageSize:K.length,pageCount:this._storeManager.getBackpackPageCount(this.getAssetType(q),K.length),currentPage:0,hardPoints:K}}execute(q){switch(q){case Ot.R.Rooms:case Ot.R.Frames:case Ot.R.Decorations:tt.q.instance.prodigy.audio.playSFX(ot.D.TAB_CLICK_SFX_ID,ot.D.TAB_CLICK),this._currentFilter=q,this._currentFilter!==Ot.R.Decorations&&(this._currentIndex=-1),this._decorator.showPoints(this._currentFilter===Ot.R.Decorations),this.updateView();break;case Ot.R.StartBuilding:this._building=!0,this._itemSelected.dispatch(this._selection);break;case Ot.R.PageLeft:tt.q.instance.prodigy.audio.playSFX(ot.D.BUTTON_CLICK_SFX_ID,ot.D.BUTTON_CLICK),this.pageLeft();break;case Ot.R.PageRight:tt.q.instance.prodigy.audio.playSFX(ot.D.BUTTON_CLICK_SFX_ID,ot.D.BUTTON_CLICK),this.pageRight()}}applyDecoration(q){this._currentIndex=q}removeDecoration(q){this._selection.decorations.delete(q),this.selectionChanged.dispatch(this._selection),this.updateCounter(q,1),this._slots.delete(this._currentIndex),this.applyDecoration(q)}pageLeft(){const q=this._pages[this._currentFilter];q.currentPage>0&&q.currentPage--,this.updatePageButtons(),this.updateView()}pageRight(){const q=this._pages[this._currentFilter];q.currentPage0),this._floorComponent.pageRightEnabled(q.currentPage0&&this._currentIndex>=0&&!this._slots.has(this._currentIndex)){this._selection.decorations.set(this._currentIndex,this._selectedDecor);const K=this._storeManager.getItemImageName(ot.D.ASSET_TYPE_DECORATION,this._selectedDecor);this._decorator.setAsset(this._currentIndex,St.E.getTowerTownImage(K)),this._slots.set(this._currentIndex,q),this.updateCounter(this._currentIndex)}}this.updateCursor(),this._selectionChanged&&this._selectionChanged.dispatch(this._selection)}updateCounter(q,K=-1){const z=this._slots.get(q);if(!Q.Aq$.isDefined(z))return;let Y=this._smallItems.get(z);if(Q.Aq$.isDefined(Y)){Y+=K,this._smallItems.set(z,Y);const q=this._pages[this._currentFilter],Q=q.hardPoints.length;for(let K=0;K{const Y=K.findComponentInChildren(Dt.R);K.active&&Y&&Y.assetID===q&&Y.assetType===z&&(this._floorComponent.largeItemPointer.legacyTransform.group.position=K.legacyTransform.group.position,this._floorComponent.largeItemPointer.active=this._currentFilter!==Ot.R.Decorations)}),this)}makeLargePrefabs(q,K){K.forEach((K=>{const z=this._prefabLoader.loadFromGUID(q,K).findComponentInChildren(Dt.R);if(z){const q=tt.q.instance.prodigy.create.sprite(0,0,ot.D.ATLAS_TOWERTOWN_MISC,"interior-ui-mask"),K=tt.q.instance.prodigy.create.sprite(0,0,ot.D.ATLAS_TOWERTOWN_MISC,"frame-ui-interior");q.scale.set(.5,.5),K.scale.set(.5,.5),z.frame.legacyTransform.group.addChild(q),z.interior.legacyTransform.group.addChild(K),z.selected.add(this.selectAsset,this)}}))}makeSmallPrefabs(q,K){K.forEach((K=>{const z=this._prefabLoader.loadFromGUID(q,K).findComponentInChildren(Rt.t);z&&(z.counterVisible=!1,z.selected.add(this.selectAsset,this))}))}removeListeners(){Z.union(this._floorComponent.largeItemPoints,this._floorComponent.smallItemPoints).forEach((q=>{const K=q.findComponentInChildren(Ct.s);K&&K.selected.removeAll()}))}consumeItems(){this.startBuildingButton.onClick.remove(this.consumeItems,this),this.consume(ot.D.ASSET_TYPE_FRAME,this._selection.frameID),this.consume(ot.D.ASSET_TYPE_INTERIOR,this._selection.roomID),this._selection.decorations.forEach((q=>{this.consume(ot.D.ASSET_TYPE_DECORATION,q)}))}consume(q,K){if(!Q.Aq$.isDefined(q)||!Q.Aq$.isDefined(K))return;const z=this._storeManager.consume(q,K);Q.VyI.log(`Asset of type '${q}' (${K}) was ${z?"consumed":"ignored"}.`,Q.$bb.Verbose)}showCounter(q,K,z){return this._currentFilter===q&&!this._storeManager.isDefaultItem(K,z)}destroy(){this._itemSelected.dispose(),this._selectionChanged.dispose(),super.destroy()}}var Bt=z(3836),Ut=z(68910),Ft=z(27314);class Gt{get itemSelected(){return this._itemSelected}get removeSelected(){return this._removeSelected}constructor(q,K,z){this._itemSelected=new Q.HN0,this._removeSelected=new Q.HN0,this._gameObjects=[],this._components=[],this._prefabLoader=K,this._parent=z,tt.q.instance.prodigy.load.assets([ot.D.ATLAS_TOWERTOWN_MISC],this.assetsReady.bind(this))}destroy(){this._removeSelected.dispose(),this._itemSelected.dispose(),this._components.forEach((q=>{q.destroy()})),this._gameObjects.forEach((q=>{q.destroy()}))}showPoints(q){this._gameObjects.forEach((K=>{K.active=q}),this),this._components.forEach((K=>{K.showHardPoint(q)}),this)}setAsset(q,K){this._components[q].setAsset(K),this.showPointer(Gt.HIDE_ITEMS),this.showPopup(q)}assetsReady(q,K){for(let z=0;z{X.clearAsset(),this.showPointer(z),this.removeSelected.dispatch(z)}),this),X.onSelect.add((()=>{X.popupShowing?(this.showPointer(Gt.HIDE_ITEMS),this.showPopup(z)):(this.showPopup(Gt.HIDE_ITEMS),this.showPointer(z)),this.itemSelected.dispatch(z)}),this),this._gameObjects.push(q),this._components.push(X)}this._gameObjects[1].parent=this._parent,this._gameObjects[2].parent=this._parent,this._gameObjects[3].parent=this._parent,this._gameObjects[0].parent=this._parent,this._gameObjects[4].parent=this._parent}addPoints(q,K){return new Ut.Point(q.x+K.x,q.y+K.y)}showPopup(q){for(let K=0;K{this.game.broadcaster.broadcast(ot.D.MESSAGE_ENABLE_NAVIGATION)})))}onFloatlingFlingClicked(){tt.q.instance.prodigy.audio.playSFX(ot.D.BUTTON_CLICK_SFX_ID,ot.D.BUTTON_CLICK),this._mathTower.startFloatlingFling()}onStoreButtonClicked(){tt.q.instance.prodigy.audio.playSFX(ot.D.BUTTON_CLICK_SFX_ID,ot.D.BUTTON_CLICK),this.game.broadcaster.broadcast(ot.D.MESSAGE_DISABLE_NAVIGATION),this._mathTower.openStore()}onClickSettings(){tt.q.instance.prodigy.audio.playSFX(ot.D.BUTTON_CLICK_SFX_ID,ot.D.BUTTON_CLICK),this._mathTower.openSettings((()=>{this.game.broadcaster.broadcast(ot.D.MESSAGE_ENABLE_NAVIGATION)}))}updateBreadcrumbsLocked(){this._component&&(this.updateButtonLockedFromBreadcrumb(this._component.floatlingFlingButton,vt.M.FlingUnlocked,vt.M.FlingTutorialComplete),this.updateButtonLockedFromBreadcrumb(this._component.storeButton,vt.M.FlingTutorialComplete,vt.M.StoreFirstPurchaseComplete))}updateButtonLockedFromBreadcrumb(q,K,z){this._breadcrumbManager.isBreadcrumbComplete(K)?(q.inputEnabled=!0,q.unlockState(),this._breadcrumbManager.isBreadcrumbComplete(z)?this._guideHand.get(z)&&(this._guideHand.get(z).destroy(),this._guideHand.delete(z)):this._guideHand.get(z)||this._guideHand.set(z,Ht.o.highlightObjectOnLayer(this.game,100,0,q.GameObject.legacyTransform.group,void 0))):(q.inputEnabled=!1,q.lockState(jt.K.Disabled))}close(){this.removeListeners(),super.close()}toggleVisible(q=!0){if(this._component)if(this._tweenToPullTab.state===Nt.v.Hidden)this._component.GameObject.active=q;else{let K=this._tweenToHide.state===(q?Nt.v.Hidden:Nt.v.Visible);this._tweenToHide.isTweening&&!K&&(this._tweenToHide.cancel(!0),K=!0),K&&(this._component.sliderButton.inputEnabled=!1,this._tweenToHide.slide(this._component.hudUI,Wt.SLIDE_HIDE_DURATION_MS,(()=>{this._visible=this._tweenToHide.state===Nt.v.Visible,this._component.sliderButton.inputEnabled=!0})))}else this._callOnComponentLoad=this.toggleVisible.bind(this,q)}get floatlingFlingButton(){return this._component.floatlingFlingButton}toggleFlingButton(q){this._component&&(this._breadcrumbManager.isBreadcrumbComplete(vt.M.FlingTutorialComplete)||(!this._guideHand.get(vt.M.FlingTutorialComplete)&&q?this._guideHand.set(vt.M.FlingTutorialComplete,Ht.o.highlightObjectOnLayer(this.game,100,0,this._component.floatlingFlingButton.GameObject.legacyTransform.group,void 0)):this._guideHand.get(vt.M.FlingTutorialComplete)&&!q&&(this._guideHand.get(vt.M.FlingTutorialComplete).destroy(),this._guideHand.delete(vt.M.FlingTutorialComplete))),this.toggleButton(this._component.floatlingFlingButton,q))}toggleWorldMapButton(q){this._component&&this.toggleButton(this._component.chooseTownButton,q)}bringToTop(){Q.Aq$.isDefined(this._gameObject)&&this._gameObject.bringToFront()}removeListeners(){this._component.chooseTownButton.onClick.dispose(),this._component.floatlingFlingButton.onClick.dispose(),this._component.storeButton.onClick.dispose(),this._component.settingsButton.onClick.dispose(),this._component.sliderButton.onClick.dispose()}slideUI(){tt.q.instance.prodigy.audio.playSFX(ot.D.BUTTON_CLICK_SFX_ID,ot.D.BUTTON_CLICK),this._visible&&!this._tweenToPullTab.isTweening&&(this._component.sliderButton.inputEnabled=!1,this._tweenToPullTab.slide(this._component.hudUI,Wt.SLIDE_DURATION_MS,(()=>{this._component.setSlideIndicator(this._tweenToPullTab.state),this._component.sliderButton.inputEnabled=!0})))}toggleButton(q,K){q.inputEnabled=K,K?q.unlockState():q.lockState(jt.K.Disabled)}}Wt.TOWER_TOWN_UI_PREFAB=21,Wt.UI_X_HIDE=-79,Wt.UI_X_FULL_HIDE=-179,Wt.UI_X_SHOW=0,Wt.SLIDE_DURATION_MS=200,Wt.SLIDE_HIDE_DURATION_MS=400,(0,Y.Cg)([(0,J.sg)(ot.D.BUTTON_DEBOUNCE_TIME),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],Wt.prototype,"onOpenWorldMap",null),(0,Y.Cg)([(0,J.sg)(ot.D.BUTTON_DEBOUNCE_TIME),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],Wt.prototype,"onFloatlingFlingClicked",null),(0,Y.Cg)([(0,J.sg)(ot.D.BUTTON_DEBOUNCE_TIME),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],Wt.prototype,"onStoreButtonClicked",null),(0,Y.Cg)([(0,J.sg)(ot.D.BUTTON_DEBOUNCE_TIME),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],Wt.prototype,"onClickSettings",null),(0,Y.Cg)([(0,J.sg)(ot.D.BUTTON_DEBOUNCE_TIME),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],Wt.prototype,"slideUI",null);var qt=z(27292);class Kt extends At.R{get rightButton(){return this._moveFloorComponent.rightButton}get leftButton(){return this._moveFloorComponent.leftButton}get cancelButton(){return this._moveFloorComponent.cancelButton}get saveButton(){return this._moveFloorComponent.saveButton}get warningQuitButton(){return this._moveFloorComponent.warningQuitButton}get warningObject(){return this._moveFloorComponent.warningObject}get arrowObject(){return this._moveFloorComponent.arrowObject}constructor(q,K,z,Y,Q=!0){super(q,K?K.legacyTransform.group:void 0,z,Y,[ot.D.ATLAS_TOWERTOWN_MISC,ot.D.ATLAS_BUTTONS,ot.D.ATLAS_DIALOGUES]),this._enableTooltip=Q,this._parentGameObject=K}create(){this._gameObject=this.prefabLoader.loadFromGUID(ot.D.UI_MOVE_FLOOR,this._parentGameObject),this._moveFloorComponent=this._gameObject.findComponent(qt.B),this._tooltip=this._mathTower.uiFactory.tooltip(this._mathTower.uiFactory.localizer.getText(ot.D.HEADER_MOVE_FLOOR),this._enableTooltip,ot.D.MOVE_HEADER_WIDTH,0,0),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this.rightButton.GameObject),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this.leftButton.GameObject),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this._moveFloorComponent.warningObject),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this._moveFloorComponent.arrowObject),this._moveFloorComponent.warningObject.active=!1,this._moveFloorComponent.arrowObject.active=!1}close(){this._moveFloorComponent&&this.disposeComponent(),this._gameObject&&(this._gameObject.destroy(),this._tooltip.setVisible(!1,0)),super.close()}disposeComponent(){this.rightButton.onClick.dispose(),this.leftButton.onClick.dispose(),this.saveButton.onClick.dispose(),this.cancelButton.onClick.dispose(),this.warningQuitButton.onClick.dispose(),this.rightButton.GameObject.destroy(),this.leftButton.GameObject.destroy(),this._moveFloorComponent.warningObject.destroy(),this._moveFloorComponent.arrowObject.destroy()}setWarningText(q){this._moveFloorComponent.warningText.text=q}hideUI(){this.rightButton.GameObject.active=!1,this.leftButton.GameObject.active=!1,this._gameObject.active=!1}}var zt=z(6145);class Yt extends $t.W{constructor(q,K,z,Y=null){super(q,K,ot.D.BASE_MENU_ASSET_ID,void 0,[""]),this._onClose=null,this._newGradeUI=null,this._component=null,this._prefabLoader=z,this._onClose=Y}create(){this._newGradeUI=this._prefabLoader.loadFromGUID(ot.D.UI_NEW_GRADE_PREFAB),this.parent.addChild(this._newGradeUI.legacyTransform.group),this._component=this._newGradeUI.findComponent(zt.Q),this._component.closeButton.onClick.add((()=>{tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()}))}close(){Q.Aq$.isDefined(this._onClose)&&this._onClose(),this.removeListeners(),this._newGradeUI.destroy(),super.close()}removeListeners(){this._component.closeButton.onClick.dispose()}}var Qt=z(56942),Xt=z(40295),Zt=z(75214),Jt=z(87337),te=z(23748),ee=z(93867),ie=z(77175);class se extends At.R{get quitButton(){return this._rooftopComponent.quitButton}get attackButton(){return this._rooftopComponent.attackButton}get topBanner(){return this._rooftopComponent.topBanner}get battleButton(){return this._rooftopComponent.battleButton}get onShadowSummoned(){return this._shadowSummonedSignal}get onVictory(){return this._victorySignal}get onDefeat(){return this._defeatSignal}get onIncorrectAnswer(){return this._incorrectAnswerSignal}get onCorrectAnswer(){return this._correctAnswerSignal}constructor(q,K,z,Y,X,Z){super(q,K?K.legacyTransform.group:void 0,z,Y,[ot.D.ATLAS_TOWERTOWN_MISC,ot.D.SPINE_STUBBORN_SHADOW,ot.D.SPINE_SHADOW_PORTAL,ot.D.SPINE_SHADOW_CLASH]),this._puppetMaster=null,this._shadowSummonedSignal=new Q.HN0,this._victorySignal=new Q.HN0,this._defeatSignal=new Q.HN0,this._incorrectAnswerSignal=new Q.HN0,this._correctAnswerSignal=new Q.HN0,this._parentGameObject=null,this._parentGameObject=K,this._floor=X,this._characterController=Z}create(){const q=this.prefabLoader.loadFromGUID(ot.D.UI_ROOFTOP_MASTERY,this._parentGameObject);this._rooftopComponent=q.findComponent(ie.W),this._gameObject=q,tt.q.instance.prodigy.open.menuLayer.addChild(this._rooftopComponent.GameObject.legacyTransform.group),this.attackButton.GameObject.parent=null,this.battleButton.GameObject.parent=null,this._mathTower.uiFactory.screen.background.addChild(this.attackButton.GameObject.legacyTransform.group),this._mathTower.uiFactory.screen.background.addChild(this.battleButton.GameObject.legacyTransform.group),this._portalSpine=tt.q.instance.prodigy.create.spine(0,0,ot.D.SPINE_SHADOW_PORTAL,this._mathTower.uiFactory.screen.background),this._stubbornShadowSpine=tt.q.instance.prodigy.create.spine(0,0,ot.D.SPINE_STUBBORN_SHADOW,this._mathTower.uiFactory.screen.background),this._shadowBeamSpine=tt.q.instance.prodigy.create.spine(0,0,ot.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._lightBeamSpine=tt.q.instance.prodigy.create.spine(0,0,ot.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._clashSpine=tt.q.instance.prodigy.create.spine(0,0,ot.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._spellSpine=tt.q.instance.prodigy.create.spine(0,0,ot.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._stubbornShadowSpine.visible=!1,this._portalSpine.visible=!1,this._shadowBeamSpine.visible=!1,this._clashSpine.visible=!1,this._lightBeamSpine.visible=!1,this._lightMask=this._mathTower.game.add.graphics(0,0,this._mathTower.uiFactory.screen.background),this._darkMask=this._mathTower.game.add.graphics(0,0,this._mathTower.uiFactory.screen.background)}close(){this._gameObject.destroy(),this.attackButton.GameObject.destroy(),this.battleButton&&(this.battleButton.onClick.removeAll(),this.battleButton.GameObject&&this.battleButton.GameObject.destroy()),this.resetPlayer(),this._stubbornShadowSpine.destroy(),this._portalSpine.destroy(),this._lightBeamSpine.destroy(),this._shadowBeamSpine.destroy(),this._clashSpine.destroy(),this._spellSpine.destroy(),this._shadowSummonedSignal.dispose(),this._victorySignal.dispose(),this._defeatSignal.dispose(),this._incorrectAnswerSignal.dispose(),this._correctAnswerSignal.dispose(),this._lightMask.destroy(),this._darkMask.destroy(),super.close()}setAttackButtonPosition(q){this.attackButton.GameObject.legacyTransform.group.position=q}toggleStaticUIVisibility(q){this._rooftopComponent.GameObject.active=q}spawnStubbornShadow(q,K){this._stubbornShadowSpine.position.set(q,K),this._stubbornShadowSpine.visible=!0,this._stubbornShadowSpine.setToSetupPose(),this._stubbornShadowSpine.setAnimationByName(0,ot.D.STUBBORN_SHADOW_IDLE_ANIMATION,!0)}summonStubbornShadow(q,K){this._portalSpine.visible=!0,this._portalSpine.position.set(q,K+ot.D.SHADOW_PORTAL_OFFSET.y),this._portalSpine.setToSetupPose(),this._portalSpine.rotation=Q.cj9.degToRad(90),this._portalSpine.setAnimationByName(0,ot.D.PORTAL_APPEAR_ANIMATION,!1),this._portalSpine.addAnimationByName(0,ot.D.PORTAL_IDLE_ANIMATION,!1),this._portalSpine.onComplete.add((()=>{this.finishShadowSummon(q,K)}),this),setTimeout((()=>{tt.q.instance.prodigy.audio.playSFX(ot.D.TOWER_TOWN_SFX_ID,ot.D.STUBBORN_SHADOW_DROP)}),500)}spawnPortalFTUE(q,K){const z=ee.U.isStepComplete(Xt.B.PuppetMasterDefeated)?ot.D.STUBBORN_SHADOW_OFFSET_X:0;this._portalSpine.visible=!0,this._portalSpine.position.set(q+z,K+ot.D.SHADOW_PORTAL_OFFSET.y),this._portalSpine.rotation=Q.cj9.degToRad(90),this._portalSpine.setToSetupPose(),this._portalSpine.setAnimationByName(0,ot.D.SHADOW_PORTAL_ANIMATION_APPEAR,!1),this._portalSpine.addAnimationByName(0,ot.D.SHADOW_PORTAL_ANIMATION_IDLE,!0)}startBattle(){this.topBanner.legacyTransform.x=0,this._beamStart=this._stubbornShadowSpine.position.x+ot.D.SPELL_CLASH_START_OFFSET,this._beamEnd=this._stubbornShadowSpine.position.x+ot.D.SPELL_CLASH_END_OFFSET,this.quitButton.inputEnabled=!1,this._characterController.float(!1),this._stubbornShadowSpine.setAnimationByName(0,ot.D.STUBBORN_SHADOW_DEFEND_ANIMATION,!1),this._stubbornShadowSpine.onComplete.add(this.startBeams.bind(this))}makePlayerAttack(){const q=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;Q.Aq$.isDefined(q.equipment.getEquipment("weapon"))?this.doAttackAnimation():q.equip(25,"weapon").then((()=>this.doAttackAnimation())).catch(Q.RQr.createHandler("RooftopMasteryInterface:makePlayerAttack Error equipping training wand"))}doAttackAnimation(){this._characterController.playerContainer.forceWeaponVisual=!0,this._mathTower.uiFactory.screen.user.attack(),this._characterController.playerContainer.OnLoad.add((()=>{this._characterController.float(!1),this._characterController.playerContainer.OnLoad.removeAll(this)}),this),this._characterController.playerContainer.reload()}resetPlayer(){this._characterController.playerContainer.forceWeaponVisual=!1,this._characterController.playerContainer.reload((()=>{this._characterController.float(!0)}))}startBeams(){this._stubbornShadowSpine.onComplete.removeAll(),this._stubbornShadowSpine.setAnimationByName(0,ot.D.STUBBORN_SHADOW_SUSTAIN_ANIMATION,!0),this._lightBeamSpine.position.set(this._beamStart+ot.D.SPELL_CLASH_END_OFFSET,this._stubbornShadowSpine.position.y+ot.D.SPELL_CLASH_Y_OFFSET),this._lightBeamSpine.setAnimationByName(0,ot.D.BEAM_TRAVEL_ANIMATION,!0),this._lightBeamSpine.scale.x=ot.D.BEAM_SCALE_X,this._lightBeamSpine.visible=!0,this._shadowBeamSpine.position.set(this._stubbornShadowSpine.position.x-ot.D.SPELL_CLASH_X_OFFSET,this._stubbornShadowSpine.position.y+ot.D.SPELL_CLASH_Y_OFFSET),this._shadowBeamSpine.setAnimationByName(0,ot.D.SHADOW_BEAM_TRAVEL_ANIMATION,!0),this._shadowBeamSpine.scale.x=-ot.D.BEAM_SCALE_X,this._shadowBeamSpine.visible=!0,this.makePlayerAttack(),this._spellSpine.position.set(this._beamStart+ot.D.SPELL_CLASH_END_OFFSET,this._stubbornShadowSpine.position.y+ot.D.SPELL_CLASH_Y_OFFSET),this._spellSpine.setAnimationByName(0,ot.D.SPELL_SUMMON_ANIMATION,!1),this._spellSpine.addAnimationByName(0,ot.D.SPELL_TRAVEL_ANIMATION,!0),this._spellSpine.scale.set(.5),this._clashSpine.visible=!0,this._clashSpine.setAnimationByName(0,ot.D.SPELL_CLASH_ANIMATION,!0),this._clashSpine.scale.set(ot.D.SPELL_CLASH_SCALE),this._clashSpine.position.set(this._stubbornShadowSpine.position.x,this._stubbornShadowSpine.position.y+ot.D.SPELL_CLASH_Y_OFFSET),this.setTheta(this._mathTower.education.getSkillById(this._floor.skillID).theta),this.startAttack()}startAttack(){this.attackButton.GameObject.active=!1,this.quitButton.inputEnabled=!1,this.mathTower.openQuestionForStubbornShadow(this.mathTower.activeFloor.skillID,this.onQuestionAnswered.bind(this))}onQuestionAnswered(q){let K=this._mathTower.education.getSkillById(this._floor.skillID).theta;const z=this._mathTower.game.add.tween(this,this).to({_currentTheta:K});z.onUpdate.add(this.updateTheta.bind(this)),z.onTweenComplete.add(this.onThetaTweenFinished.bind(this,q)),z.start(),this.quitButton.inputEnabled=!0}onThetaTweenFinished(q){this.updateTheta(),this._currentTheta>=ot.D.THETA_MAXIMUM?this.defeatShadow():(this.attackButton.GameObject.active=!0,q?this._correctAnswerSignal.dispatch():this._incorrectAnswerSignal.dispatch())}defeatShadow(){this.attackButton.GameObject.active=!1,this._stubbornShadowSpine.setAnimationByName(0,ot.D.STUBBORN_SHADOW_DEATH_ANIMATION,!1),this._stubbornShadowSpine.onEnd.add(this.finishBeams.bind(this)),this._lightBeamSpine.onEnd.addOnce((()=>{this._victorySignal.dispatch()}),this),setTimeout((()=>{tt.q.instance.prodigy.audio.playSFX(ot.D.TOWER_TOWN_SFX_ID,ot.D.STUBBORN_SHADOW_DEFEAT)}),500)}finishBeams(){this.attackButton.GameObject.active=!1,this._lightBeamSpine.setAnimationByName(0,ot.D.BEAM_END_ANIMATION,!1),this._shadowBeamSpine.setAnimationByName(0,ot.D.SHADOW_BEAM_END_ANIMATION,!1),this._clashSpine.setAnimationByName(0,ot.D.SPELL_CLASH_END_ANIMATION,!1),this._spellSpine.setAnimationByName(0,ot.D.SPELL_END_ANIMATION,!1),this._lightBeamSpine.onComplete.add((()=>{this._lightBeamSpine.visible=!1,this._lightBeamSpine.onComplete.dispose()})),this._shadowBeamSpine.onComplete.add((()=>{this._shadowBeamSpine.visible=!1,this._shadowBeamSpine.onComplete.dispose()})),this._clashSpine.onComplete.add((()=>{this._clashSpine.visible=!1,this._clashSpine.onComplete.dispose()})),this._spellSpine.onComplete.add((()=>{this._spellSpine.visible=!1,this._spellSpine.onComplete.dispose()}))}setTheta(q){this._currentTheta=q;const K=te.z.normalizeRange(ot.D.THETA_MINIMUM,ot.D.THETA_MAXIMUM,q),z=this._beamEnd-this._beamStart;this._clashSpine.x=this._beamStart+z*K,this._lightMask.clear(),this._lightMask.beginFill(ot.D.SPELL_MASK_FILL),this._lightMask.drawRect(this._beamStart-ot.D.SPELL_MASK_SKIN_WIDTH,this._clashSpine.y-ot.D.SPELL_MASK_OFFSET_Y,this._clashSpine.x-this._beamStart+ot.D.SPELL_MASK_SKIN_WIDTH,ot.D.SPELL_MASK_HEIGHT),this._lightBeamSpine.mask=this._lightMask,this._darkMask.clear(),this._darkMask.beginFill(ot.D.SPELL_MASK_FILL),this._darkMask.drawRect(this._clashSpine.x,this._clashSpine.y-ot.D.SPELL_MASK_OFFSET_Y,this._beamEnd-this._clashSpine.x+ot.D.SPELL_MASK_SKIN_WIDTH,ot.D.SPELL_MASK_HEIGHT),this._shadowBeamSpine.mask=this._darkMask}updateTheta(){this.setTheta(this._currentTheta)}resumeBattle(q,K){this._stubbornShadowSpine.position.set(q,K),this._stubbornShadowSpine.visible=!0,this.quitButton.inputEnabled=!1,this.startBattle()}finishShadowSummon(q,K){this._stubbornShadowSpine.position.set(q,K),this._stubbornShadowSpine.visible=!0,this._portalSpine.onComplete.removeAll(),this._portalSpine.setAnimationByName(0,ot.D.PORTAL_IDLE_ANIMATION,!0),this._stubbornShadowSpine.setAnimationByName(0,ot.D.STUBBORN_SHADOW_APPEAR_ANIMATION,!1),this._stubbornShadowSpine.addAnimationByName(0,ot.D.STUBBORN_SHADOW_IDLE_ANIMATION,!0),this._stubbornShadowSpine.onComplete.add((()=>{this._portalSpine.setAnimationByName(0,ot.D.PORTAL_DISAPPEAR_ANIMATION,!1),this._shadowSummonedSignal.dispatch(),this._stubbornShadowSpine.onComplete.removeAll()}),this)}spawnPMAndStubbornShadowFTUE(q,K){if(this._stubbornShadowSpine.position.set(q+ot.D.STUBBORN_SHADOW_OFFSET_X,K+ot.D.STUBBORN_SHADOW_OFFSET_Y),this._stubbornShadowSpine.visible=!0,this._stubbornShadowSpine.setAnimationByName(0,ot.D.STUBBORN_SHADOW_ANIMATION_APPEAR,!1),this._stubbornShadowSpine.addAnimationByName(0,ot.D.STUBBORN_SHADOW_ANIMATION_IDLE,!0),!ee.U.isStepComplete(Xt.B.PuppetMasterDefeated)){this._puppetMaster=new Zt.p(this.game,"NPC_NAME_PUPPETMASTER",Qt.Q.Spine_npc_puppetmaster_json,Jt.ac.Boss,this._mathTower.uiFactory.screen.background,q,K+ot.D.SHADOW_PORTAL_OFFSET.y,"idle",null,!0);const z=q+ot.D.PUPPET_MASTER_PORTAL_OFFSET_X,Y=K;this.game.add.tween(this._puppetMaster,this).to({x:z,y:Y},ot.D.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS).start()}}removePMandPortalFTUE(q,K){const z=q,Y=K+ot.D.SHADOW_PORTAL_OFFSET.y,Q=this.game.add.tween(this._puppetMaster,this).to({x:z,y:Y},ot.D.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS);tt.q.instance.prodigy.effects.resizeContainer(this._puppetMaster,0,ot.D.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS),Q.start(),Q.onTweenComplete.add((()=>{this._puppetMaster.destroy(),this._puppetMaster=null,Q.onTweenComplete.dispose()})),this.removePortalFTUE()}removePortalFTUE(){this._portalSpine.onComplete.add((()=>{this._portalSpine.setAnimationByName(0,ot.D.SHADOW_PORTAL_ANIMATION_DISAPPEAR,!1),this._portalSpine.onComplete.dispose()}))}}var ne=z(14151);class ae extends At.R{get cleanButton(){return this._shroudLockComponent.cleanButton}get gameObject(){return this._gameObject}get quitButton(){return this._shroudLockComponent.quitButton}get onCloudAppear(){return this._cloudAppeared}get cloudSpine(){return this._cloudSpine}constructor(q,K,z,Y){super(q,K?K.legacyTransform.group:void 0,z,Y,[ot.D.ATLAS_TOWERTOWN_MISC]),this._cloudAppeared=new Q.HN0,this._parentGameObject=null,this._parentGameObject=K}create(){this._cloudSpine=tt.q.instance.prodigy.create.spine(0,0,ot.D.SPINE_SHROUD_CLOUD);const q=this.prefabLoader.loadFromGUID(ot.D.UI_SHROUD_LOCK_PREFAB,this._parentGameObject);this._shroudLockComponent=q.findComponent(ne.q),this._rightBar=tt.q.instance.prodigy.create.sprite(this._shroudLockComponent.rightBarTransform.x,this._shroudLockComponent.rightBarTransform.y),this._leftBar=tt.q.instance.prodigy.create.sprite(this._shroudLockComponent.leftBarTransform.x,this._shroudLockComponent.leftBarTransform.y),this._middleBar=tt.q.instance.prodigy.create.sprite(this._shroudLockComponent.middleBarTransform.x,this._shroudLockComponent.middleBarTransform.y),q.legacyTransform.group.addChild(this._leftBar),q.legacyTransform.group.addChild(this._rightBar),q.legacyTransform.group.addChild(this._middleBar),this._rightBar.loadTexture(ot.D.ATLAS_TOWERTOWN_MISC,ot.D.FRAME_RIGHT_BAR),this._leftBar.loadTexture(ot.D.ATLAS_TOWERTOWN_MISC,ot.D.FRAME_LEFT_BAR),this._middleBar.loadTexture(ot.D.ATLAS_TOWERTOWN_MISC,ot.D.FRAME_MIDDLE_BAR),this._middleBar.anchor.x=0,this._middleBar.width=0,this._rightBar.visible=!1,this.setShroudCleansRemainingUI(),this._gameObject=q,tt.q.instance.prodigy.open.menuLayer.addChild(this._shroudLockComponent.GameObject.legacyTransform.group),this._mathTower.uiFactory.screen.background.addChild(this._cloudSpine),this._mathTower.uiFactory.screen.background.addChild(this._shroudLockComponent.cleanButton.GameObject.legacyTransform.group)}close(){this._cloudSpine.pendingDestroy=!0,Q.Aq$.isDefined(this.cleanButton)&&(this.cleanButton.onClick.removeAll(),this.cleanButton.GameObject&&this.cleanButton.GameObject.destroy()),this._leftBar.destroy(),this._rightBar.destroy(),this._middleBar.destroy(),Q.Aq$.isDefined(this._gameObject)&&(this._gameObject.destroy(),this._gameObject=null),this._cloudAppeared.dispose(),super.close()}setShroudCleansRemainingUI(q=ot.D.SHROUD_CLEAN_SPELLS){const K=Math.min(ot.D.SHROUD_CLEAN_SPELLS,Math.max(0,q)),z=this._rightBar.x-(this._leftBar.x+this._leftBar.width);this._middleBar.width=z*(ot.D.SHROUD_CLEAN_SPELLS-K)*(1/ot.D.SHROUD_CLEAN_SPELLS),this._rightBar.visible=K<=0,this._shroudLockComponent.statusText=`Spells remaining: ${K}`}setCleanButtonPosition(q){this._shroudLockComponent.cleanButton.GameObject.legacyTransform.group.position=q}makeCloudAppear(q=0,K=0,z=!1){this._cloudSpine.position.set(q,K),this._cloudSpine.setToSetupPose(),z||this._cloudSpine.setAnimationByName(0,"fade in",!1),this._cloudSpine.addAnimationByName(0,"idle",!0),this._cloudAppeared.dispatch()}makeCloudDisappear(q){tt.q.instance.prodigy.audio.playSFX(ot.D.TOWER_TOWN_SFX_ID,ot.D.CLEAR_SHROUD),this._cloudSpine.setToSetupPose(),this._cloudSpine.setAnimationByName(0,"fade out",!1),q&&this._cloudSpine.onComplete.add(q)}bringToTop(){mt.Z.bringToTop(this.gameObject.legacyTransform.group),mt.Z.bringToTop(this.cloudSpine),mt.Z.bringToTop(this.cleanButton.GameObject.legacyTransform.group)}hideUI(){this.quitButton.GameObject.active=!1,this._shroudLockComponent.header.active=!1,this._rightBar.visible=!1,this._leftBar.visible=!1,this._middleBar.visible=!1,this._shroudLockComponent.buttonBG.active=!1}setQuitButtonVisibility(q){this.quitButton.GameObject.active=q,this._shroudLockComponent.buttonBG.active=q}}class re{constructor(){this._assetsReady=new Q.HN0}get assetsReady(){return this._assetsReady}getItemGuid(q){return St.E.getTowerTownImage(q.data.tag)}getSprites(q){this._items=q;const K=[];q.forEach((q=>K.push(this.getItemGuid(q)))),tt.q.instance.prodigy.load.assets(K,this.assetsLoaded.bind(this))}assetsLoaded(q,K){const z=[];this._items.forEach((q=>{z.push({bitmapData:this.createSprite(q.data.tag),imageName:q.data.tag,ID:q.ID,count:q.count})})),this._assetsReady.dispatch(z)}createSprite(q){const K=St.E.getTowerTownImage(q);return tt.q.instance.prodigy.create.sprite(0,0,K).texture}}var oe=z(49237);let he=class extends Q.uAl{constructor(){super(...arguments),this._okayButton=null,this._closeButton=null,this._headerText=null,this._bodyText=null,this._okayButtonText=[]}get okayButton(){return this._okayButton}get closeButton(){return this._closeButton}get headerText(){return this._headerText.TextObject.text}set headerText(q){this._headerText.text=q}get bodyText(){return this._bodyText.TextObject.text}set bodyText(q){this._bodyText.text=q}get okayButtonText(){return this._okayButtonText[0].TextObject.text}set okayButtonText(q){this._okayButtonText.forEach((K=>K.text=q))}};(0,Y.Cg)([(0,Q.x4W)("okayButton"),(0,Y.Sn)("design:type",oe.$)],he.prototype,"_okayButton",void 0),(0,Y.Cg)([(0,Q.x4W)("closeButton"),(0,Y.Sn)("design:type",oe.$)],he.prototype,"_closeButton",void 0),(0,Y.Cg)([(0,Q.x4W)("headerText"),(0,Y.Sn)("design:type",Q.EYj)],he.prototype,"_headerText",void 0),(0,Y.Cg)([(0,Q.x4W)("bodyText"),(0,Y.Sn)("design:type",Q.EYj)],he.prototype,"_bodyText",void 0),(0,Y.Cg)([(0,Q.x4W)("okayButtonText"),(0,Y.Sn)("design:type",Array)],he.prototype,"_okayButtonText",void 0),he=(0,Y.Cg)([(0,Q.EVk)("HatStoreAdvertComponent")],he);class ce extends $t.W{constructor(q,K,z,Y){super(q,z,200),this._prefabLoader=null,this._closeCallback=null,this._prefabLoader=K,this._closeCallback=Y}create(){super.create(),this._ui=this._prefabLoader.loadFromGUID(ot.D.UI_TOWER_TOWN_MALL_HATSTORE_AD),this.parent.addChild(this._ui.legacyTransform.group),this._ui.legacyTransform.group.fixedToCamera=!0,this._ui.legacyTransform.group.cameraOffset=new Ut.Point(0,0),this._component=this._ui.findComponent(he),this._component.closeButton.onClick.add((()=>{this.close()})),this._component.okayButton.onClick.add((()=>{this.close()})),this.game.broadcaster.broadcast(ot.D.MESSAGE_DISABLE_NAVIGATION)}close(){this._closeCallback&&this._closeCallback(),tt.q.instance.prodigy.audio.playSFX(18,"pop"),super.close()}destroy(){this._component.closeButton.onClick.dispose(),this._component.okayButton.onClick.dispose(),this._ui.destroy(),super.destroy()}}var de=z(47716),le=z(12420),ue=z(76501),fe=z(43531),be=z(95946),pe=z(30376),ve=z(36730);class ge extends $t.W{constructor(q,K,z){super(q,z,200,void 0,[ot.D.ATLAS_BUTTONS,ot.D.ATLAS_TOWERTOWN_MISC,ot.D.ATLAS_TOWERTOWN,ot.D.ATLAS_STORE,ot.D.ATLAS_BAM,ot.D.ATLAS_SHARED,ot.D.ATLAS_PANELS]),this._prefabLoader=null,this._breadcrumbManager=null,this._uiFactory=null,this._mainUI=null,this._scrollViewObject=null,this._scrollView=null,this._scrollBarObject=null,this._scrollBar=null,this._mainComponent=null,this._uiFactory=K,this._prefabLoader=tt.q.instance.prodigy.gameContainer.get("983-05a7"),this._breadcrumbManager=tt.q.instance.prodigy.gameContainer.get(rt.G.BreadcrumbManager)}create(){super.create(),this._mainUI=this._prefabLoader.loadFromGUID(ot.D.UI_TOWER_TOWN_MALL_PREFAB),this._mainComponent=this._mainUI.findComponent(ve.f),this.parent.addChild(this._mainUI.legacyTransform.group),this._mainUI.legacyTransform.group.fixedToCamera=!0,this._mainUI.legacyTransform.group.cameraOffset=new Ut.Point(0,0),this._scrollViewObject=this._prefabLoader.loadFromGUID(ot.D.UI_TOWER_TOWN_MALL_SCROLLVIEW,this._mainUI),this._scrollView=this._scrollViewObject.findComponentInChildren(de.H),this._scrollBarObject=this._prefabLoader.loadFromGUID(ot.D.UI_TOWER_TOWN_MALL_SCROLLBAR,this._mainUI),this._scrollBar=this._scrollBarObject.findComponentInChildren(le.$),this._mainComponent.closeButton.onClick.add((()=>{this.game.broadcaster.broadcast(ot.D.MESSAGE_ENABLE_NAVIGATION),tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()})),this._mainComponent.GameObject.legacyTransform.group.fixedToCamera=!0,this.fillMall()}update(){super.update(),this._scrollView}destroy(){this.checkBreadcrumb(),this._mainComponent.closeButton.onClick.dispose(),this._mainUI.destroy(),this._scrollViewObject.destroy(),this._scrollBarObject.destroy(),super.destroy()}checkBreadcrumb(){if(!this._breadcrumbManager.isBreadcrumbComplete(vt.M.StoreFirstPurchaseComplete)){const q=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(q.backpack.getBackpackItemsByType(ot.D.ASSET_TYPE_FRAME).length+q.backpack.getBackpackItemsByType(ot.D.ASSET_TYPE_INTERIOR).length+q.backpack.getBackpackItemsByType(ot.D.ASSET_TYPE_DECORATION).length>ot.D.DEFAULT_ITEM_COUNT){this._breadcrumbManager.completeBreadcrumb(vt.M.StoreFirstPurchaseComplete),this._uiFactory.hud.updateBreadcrumbsLocked();const q=new fe.rD(this.game),K=[];ot.D.STORE_FTUE_OUTRO_DIALOGUE.forEach((z=>{K.push({dialogueData:q.dataProvider.get(z),blockInput:!0})})),q.addEvents(K),q.start()}}}fillMall(){const q=[],K=[],z={cells:K};q.push(z),K.push({type:be.a.Fire,storeID:ot.D.STORE_FIRE,playerCurrency:this.getCurrency(ot.D.FIRE_RESEARCH_CURRENCY)}),K.push({type:be.a.Ice,storeID:ot.D.STORE_ICE,playerCurrency:this.getCurrency(ot.D.ICE_RESEARCH_CURRENCY)}),K.push({type:be.a.Plant,storeID:ot.D.STORE_PLANT,playerCurrency:this.getCurrency(ot.D.PLANT_RESEARCH_CURRENCY)}),K.push({type:be.a.Storm,storeID:ot.D.STORE_STORM,playerCurrency:this.getCurrency(ot.D.STORM_RESEARCH_CURRENCY)}),K.push({type:be.a.Water,storeID:ot.D.STORE_WATER,playerCurrency:this.getCurrency(ot.D.WATER_RESEARCH_CURRENCY)}),K.push({storeID:ot.D.STORE_HAT,playerCurrency:0,hatStore:!0}),this._scrollView._createCell=()=>{const q=this._prefabLoader.loadFromGUID(ot.D.UI_TOWER_TOWN_MALL_SHOP_PREFAB,null);return q.findComponentInChildren(pe.l).onClick.add((q=>{tt.q.instance.prodigy.audio.playSFX(18,"pop"),q===ot.D.STORE_HAT?this._uiFactory.openHatStore((()=>{this._uiFactory.openStore()})):tt.q.instance.prodigy.open.store(q,(()=>{this._uiFactory.openStore()})),this.close()})),q},this._scrollView.dataSource=new ue.W(q),this._scrollBar._scrollView=this._scrollView,this._scrollView.verticalScrollBar=this._scrollBar,this._scrollView.populateContentView()}getCurrency(q){return tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("currency",q)}}var me=z(82443);class ye extends $t.W{constructor(q,K,z,Y,X=null){super(q,K,ot.D.BASE_MENU_ASSET_ID,void 0,[""]),this._townUpdateData=null,this._onClose=null,this._updateUI=null,this._component=null,this._localizer=tt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),this._prefabLoader=z,this._townUpdateData=Y,this._onClose=X}create(){this._updateUI=this._prefabLoader.loadFromGUID(ot.D.UI_TOWER_TOWN_UPDATE),this.parent.addChild(this._updateUI.legacyTransform.group),this._component=this._updateUI.findComponent(me.O),this._component.closeButton.onClick.add((()=>{this.close()})),this.checkTownProgress(this._townUpdateData)}close(){Q.Aq$.isDefined(this._onClose)&&this._onClose(),this.removeListeners(),this._updateUI.destroy(),super.close()}removeListeners(){this._component.closeButton.onClick.dispose()}checkTownProgress(q){this._component.blocksText=`${q.blocks} ${this._localizer.getText(ot.D.TT_UPDATE_BLOCKS_BUILT)}`,this._component.floorsText=`${q.floors} ${this._localizer.getText(ot.D.TT_UPDATE_FLOORS_MADE)}`,this._component.shroudsText=`${q.shrouds} ${this._localizer.getText(ot.D.TT_UPDATE_SHROUDS_CLEARED)}`}}class _e{get hud(){return this._hud||this.start(),this._hud}get localizer(){return this._localizer}get screen(){return this._screen}constructor(q,K,z,Y){this._prefabLoader=tt.q.instance.prodigy.gameContainer.get("983-05a7"),this._root=z.uiLayerGameObject,this._game=q,this._mathTower=K,this._screen=z,this._localizer=tt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),this._map=Y}destroy(){this._hud&&(this._hud.close(),this._hud.destroy()),this._scrim&&this._scrim.destroy()}start(){this._hud||(this._hud=new Wt(this._game,this._mathTower,this._root,this._prefabLoader)),this._scrim||(this._scrim=this._game.add.graphics(0,0),this._scrim.beginFill(16777215,ot.D.SCRIM_ALPHA),this._scrim.drawRect(0,0,this._game.width*ot.D.SCRIM_SCALE_X,this._game.height*ot.D.SCRIM_SCALE_Y),this._scrim.visible=!1)}chooseFloorLook(q,K=null){const z=new Q._mx(this.screen.backgroundGameObject);z.addComponent(Q.K16),z.legacyTransform.x+=q.x,z.legacyTransform.y+=q.y;const Y=new Lt(this._game,this._prefabLoader,this._root),X=new Gt(this._game,this._prefabLoader,z),Z=new re,J=Q.Aq$.isDefined(K)&&!K.isBreadcrumbComplete(vt.M.TutorialCompleted),et=new kt(this._game,this._root,this._mathTower,this._prefabLoader,Y,X,tt.q.instance.prodigy.gameContainer.get(rt.G.StoreManager),Z,K,J?null:()=>{X.destroy(),Y.destroy()});return et.itemSelected.add((()=>{X.destroy(),Y.destroy()}),this),et}openStore(){tt.q.instance.prodigy.open.fromFactory((()=>new ge(this._game,this,tt.q.instance.prodigy.open.menuLayer)))}openHatStore(q){tt.q.instance.prodigy.open.fromFactory((()=>new ce(this._game,this._prefabLoader,tt.q.instance.prodigy.open.menuLayer,q)))}openUpdate(q,K){tt.q.instance.prodigy.open.fromFactory((()=>new ye(this._game,tt.q.instance.prodigy.open.menuLayer,this._prefabLoader,q,K)))}openNewGradePopup(q){this._game.broadcaster.broadcast(ot.D.MESSAGE_DISABLE_NAVIGATION),tt.q.instance.prodigy.open.fromFactory((()=>new Yt(this._game,tt.q.instance.prodigy.open.menuLayer,this._prefabLoader,q)))}buildInterface(q,K=null){return new Bt._(this._game,this._screen.backgroundGameObject,this._mathTower,this._prefabLoader,K||this._mathTower.activeFloor,q.x+ot.D.IN_PROGRESS_PREFAB_X_OFFSET,q.y+ot.D.IN_PROGRESS_PREFAB_Y_OFFSET,K?Bt.i.QuickReno:null)}shroudLockInterface(){return new ae(this._game,this._screen.backgroundGameObject,this._mathTower,this._prefabLoader)}tooltip(q,K=!0,z=ot.D.TOOLTIP_WIDTH,Y=ot.D.TOOLTIP_SLIDE_DURATION,Q=ot.D.TOOLTIP_STAY_DURATION){const X=new Lt(this._game,this._prefabLoader,this._root);return X.onComponentLoaded.add(this.onTooltipLoad.bind(this,X,K,q,z,Y,Q)),X}buttonTooltip(q,K,z,Y=yt.i.LEFT,Q){const X=Y===yt.i.LEFT||Y===yt.i.RIGHT?.5:void 0,Z=Y===yt.i.UP||Y===yt.i.DOWN?.5:void 0,J=this.getTooltipX(z.GameObject,Y),tt=this.getTooltipY(z.GameObject,Y);return _t.A.displayToolTipManual(q,this._root,{arrowDirection:Y,bodyText:K,xPosition:J,yPosition:tt,proceedButtonCallback:Q,arrowYRelPos:X,arrowXRelPos:Z})}rooftopMasteryInterface(q){return new se(this._game,this._screen.backgroundGameObject,this._mathTower,this._prefabLoader,q,this._map.characterController)}moveFloorInterface(q=!0){return new Kt(this._game,this._root,this._mathTower,this._prefabLoader,q)}showTowerTownIsOpen(q,K){const z=this._localizer.getText(ot.D.TT_TOWER_TOWN_OPEN),Y=this._localizer.getText(ot.D.TT_TOWER_WORK_DONE),Q=this._localizer.getText(ot.D.TT_START_BUILDING);this.showBanner(z,Y,Q,ot.D.POPUP_TOWER_TOWN_OPEN,q,void 0,void 0,K)}showInfinityTowerIsOpen(q,K){const z=this._localizer.getText(ot.D.TT_INFINITY_TOWER_OPEN),Y=this._localizer.getText(ot.D.TT_INFINITY_TOWER_OPEN_BODY),Q=this._localizer.getText(ot.D.TT_START_BUILDING);this.showBanner(z,Y,Q,ot.D.POPUP_INFINITY_TOWER_OPEN,q,void 0,void 0,K)}showInfinityTowerIsClosed(){const q=this._localizer.getText(ot.D.TT_INFINITY_TOWER_CLOSED),K=this._localizer.getText(ot.D.TT_TOWER_CLOSED_BODY),z=this._localizer.getText(ot.D.TT_TOWER_CLOSED_LINKTXT),Y=this._localizer.getText(ot.D.TT_TOWER_CLOSED_FOOTER);this._game.broadcaster.broadcast(ot.D.MESSAGE_DISABLE_NAVIGATION),tt.q.instance.prodigy.open.bannerDialog(new wt.Z(z,(()=>{Tt.I.openWebsite(this.localizer.getText(ot.D.TT_TOWER_CLOSED_LINK))}),_e.INFINITY_TOWER_DIALOG_WIDTH,q,K,!0,ot.D.POPUP_INFINITY_TOWER_CLOSE,null,!0,(()=>{this._game.broadcaster.broadcast(ot.D.MESSAGE_ENABLE_NAVIGATION),this._game.broadcaster.broadcast(ot.D.MESSAGE_ENABLE_BUTTON)}),!0,Y))}spawnScrim(q,K,z=!1){let Y,Q;z?(Y=this._map.townRenderer.infinityRenderer,Q=Y.getFloor(Y.floors.length-1)):(Y=this._map.townRenderer.towerRenderers[q],Q=Y.getFloor(K)),mt.Z.bringToTop(Y.legacyTransform.group),Y.floors.forEach((q=>{q&&q.decorations.forEach((q=>{mt.Z.bringToTop(q.GameObject.legacyTransform.group)}))})),Y.legacyTransform.group.addChild(this._scrim),this._scrim.x=-this._mathTower.game.width*ot.D.SCRIM_OFFSET_X_IN_SCREENS,this._scrim.y=-this._mathTower.game.height*ot.D.SCRIM_OFFSET_Y_IN_SCREENS,this._scrim.visible=!0,mt.Z.bringToTop(Q.legacyTransform.group),Q.decorations.forEach((q=>{mt.Z.bringToTop(q.GameObject.legacyTransform.group)}))}spawnInfinityScrim(){this.spawnScrim(-1,-1,!0)}despawnScrim(){this._scrim&&(this._scrim.visible=!1)}showNewTownPopup(q){tt.q.instance.prodigy.open.topHeavyInformationDialog(new nt.Z(ot.D.POPUP_NEW_TOWN_BUTTON,q,st.E.Small,ot.D.NEW_TOWN_POPUP_SIZE,ot.D.POPUP_NEW_TOWN_TITLE,ot.D.POPUP_NEW_TOWN_BODY,!0,ot.D.ATLAS_SWOOPY_FACE,ot.D.ATLAS_SWOOPY_FACE_FRAME_DEFAULT,gt.l.TopHeavyHeader,gt.l.BannerDialogFooter,gt.l.TopHeavyBody))}showBanner(q,K,z,Y,Q,X=_e.INFINITY_TOWER_DIALOG_WIDTH,Z,J){if(tt.q.instance.prodigy.open.isMenuOpen(Et.L))return;const et=!!Z||void 0,it=J?()=>{J()}:()=>{this._game.broadcaster.broadcast(ot.D.MESSAGE_ENABLE_NAVIGATION)};this._game.broadcaster.broadcast(ot.D.MESSAGE_DISABLE_NAVIGATION),tt.q.instance.prodigy.open.bannerDialog(new wt.Z(z,(()=>{Q&&Q()}),X,q,K,!0,Y,null,!0,it,et,Z))}onTooltipLoad(q,K,z,Y,Q,X){q.width=Y,q.text=z,K&&q.setVisible(!0,Q,X)}getTooltipX(q,K,z=0){const Y=q.legacyTransform.group.getGlobalPosition().x-q.legacyTransform.group.pivot.x;switch(K){case yt.i.DOWN:case yt.i.UP:return Y+Math.ceil(q.legacyTransform.group.width/2);case yt.i.LEFT:return Y+q.legacyTransform.group.width;case yt.i.RIGHT:return Y-z}}getTooltipY(q,K,z=0){const Y=q.legacyTransform.group.getGlobalPosition().y-q.legacyTransform.group.pivot.y;switch(K){case yt.i.LEFT:case yt.i.RIGHT:return Y+Math.ceil(q.legacyTransform.group.height/2);case yt.i.UP:return Y+q.legacyTransform.group.height;case yt.i.DOWN:return Y-z}}}_e.INFINITY_TOWER_DIALOG_WIDTH=700;class Ee{static removeFloorsWithDuplicateSkillIds(q){const K=[...q.floors].filter((q=>q.skillID)),z=(0,Z.uniqBy)(K,"skillID");return K.filter((q=>!(0,Z.includes)(z,q))).forEach((K=>{(0,Z.remove)(q.floors,K)})),q}static removeFloorsThatArePreConstruction(q){return(0,Z.remove)(q.floors,(q=>q.isPreConstruction)),q}static removeFloorsWithSkillIdsThatMatch(q,K){return(0,Z.remove)(q.floors,(q=>!q.isComplete&&(0,Z.includes)(K,q.skillID))),q}static removeSkillIdFromInfinityTowerFloors(q){return(null==q?void 0:q.isInfinityTower)&&q.floors.forEach((q=>{q.skillID=null})),q}}const we=[ht.L.EDUCATION_QUESTION_INTERFACE_CLOSE,ht.L.EDUCATION_QUESTION_INTERFACE_OPEN,ht.L.FLOATLING_SET_LAST_THROWN,ht.L.FLOOR_AWARD_FLOATLINGS,ht.L.FLOOR_SET_BLOCK_COUNT,ht.L.TOWER_PUSH_FLOOR,ht.L.TOWER_REMOVE_FLOOR];var Te,Se;!function(q){q[q[1/0]=0]="Infinity",q[q.Build=1]="Build"}(Te||(Te={})),function(q){q.FLOOR_BUILDING_INFINITY="TowerTownInfinityTower",q.FLOOR_BUILDING="TowerTownFloorBuilding",q.QUICK_RENOVATION="TowerTownQuickRenovation",q.SHROUD_CLEAR="ShadowShroud",q.STUBBORN_SHADOW="StubbornShadow",q.TUTORIAL="TowerTownTutorialBuilding"}(Se||(Se={}));let Ae=class extends ut.v{get isClickable(){return this._isClickable}get isInfinity(){return this._isInfinity}set isInfinity(q){this._isInfinity=q}get currentTown(){return this._town}get currentGrade(){return this._gradeID}get uiFactory(){return this._uiFactory}get stateManager(){return this._stateManager}set stateManager(q){this._stateManager=q}buildUIFactory(q,K){this._uiFactory=new _e(this.game,this,q,K)}constructor(q,K,z,Y){super(),this._town=null,this._towerMode=Te.Build,this._gradeID="",this.newGrade=!1,this._isClickable=!0,this._isInfinity=!1,this._game=q,this._storage=K,this._education=z,this._events=Y,this.registerEducationHandler(this._education)}showWorldMap(q=null){tt.q.instance.prodigy.open.map({onClose:q})}destroy(){this.onUpdate&&this.onUpdate.dispose(),this.uiFactory&&this.uiFactory.destroy()}getGrade(){var q;return null!==(q=this._education.getGrade())&&void 0!==q?q:ot.D.DEFAULT_EDUCATION_GRADE}setCurrentTown(q,K=!1){let z=this._storage.getTown(q);const Y=this._storage.getTownIDs();return parseInt(q)!==ot.D.TUTORIAL_GRADE&&Y.length>0&&!Y.includes(q)&&(this.newGrade=!0),z?(this.unregisterTownHandler(z),z.onUpdate.remove(this.conditionallySaveTown.bind(this)),this.sanitizeTown(z)):z=new lt.J,this.registerTownHandler(z),K||z.onUpdate.add(this.conditionallySaveTown.bind(this)),this._gradeID=q,this._town=z,this._town.init(K),this.notifyUpdate(ht.L.TOWER_TOWN_SET_CURRENT_TOWN),z}sanitizeTown(q){const K=this.education.getMobileUnfriendlySkillIds();Ee.removeSkillIdFromInfinityTowerFloors(q.infinityTower),[...q.towers,q.infinityTower].filter((q=>q)).forEach((q=>{Ee.removeFloorsWithDuplicateSkillIds(q),Ee.removeFloorsThatArePreConstruction(q),Ee.removeFloorsWithSkillIdsThatMatch(q,K)}))}conditionallySaveTown(q){const K=!!this._town&&this._town.isTutorialTown;(0,Z.includes)(we,q.getFinalNotification().type)&&!K&&this.saveTown()}saveTown(){this.setTown()}forceSaveTown(){this.setTown()}setTown(){this._storage.setTown(this._gradeID,this._town),this.notifyUpdate(ht.L.TOWER_TOWN_SAVE_TOWN)}isEnabledForPlayer(q){const K=at.X.isMathSubjectRequirementMet(),z=it.O.isEnglishLocale();return q.isFocusModeEnabled&&K&&z}startFloatlingFling(){this._isClickable&&this.notifyUpdate(ht.L.TOWER_TOWN_FLOATLING_FLING_START)}fireEvent(q,K){this.events.handleNotification(this,new ct.L(this,q,null,K))}startHideAndSeek(){throw new Error("Start hide and seek.")}openSettings(q=null){this._isClickable&&(this.game.broadcaster.broadcast(ot.D.MESSAGE_DISABLE_NAVIGATION),tt.q.instance.prodigy.open.optionsMenu(q),this.notifyUpdate(ht.L.TOWER_TOWN_SETTINGS_OPEN))}showTownUpdate(q,K){const z={blocks:q.totalNewBlocks,floors:q.totalNewFloors,shrouds:q.totalShroudsCleared,shadows:q.totalNewStubbornShadows};this._uiFactory.openUpdate(z,K)}showNewGradePopup(q){this._uiFactory.openNewGradePopup(q)}openStore(){this._uiFactory.openStore(),this.notifyUpdate(ht.L.TOWER_TOWN_STORE_OPEN)}openQuestionForShroud(q){this.openQuestionInterfaceThenEmitNotifications(Se.SHROUD_CLEAR,!0,null,!0,q)}openQuestionForStubbornShadow(q,K){this.openQuestionInterfaceThenEmitNotifications(Se.STUBBORN_SHADOW,!1,q,!0,K)}openQuestionForFloorBuilding(q,K){this.openQuestionInterfaceThenEmitNotifications(Se.FLOOR_BUILDING,!1,q,!1,K)}openQuestionForInfinityFloorBuilding(q){this.openQuestionInterfaceThenEmitNotifications(Se.FLOOR_BUILDING_INFINITY,!0,null,!1,q)}openQuestionForQuickRenovation(q,K){this.openQuestionInterfaceThenEmitNotifications(Se.QUICK_RENOVATION,!1,q,!0,K)}openQuestionForTutorial(q){this.openQuestionInterfaceThenEmitNotifications(Se.TUTORIAL,!0,null,!1,q)}openQuestionInterfaceThenEmitNotifications(q,K,z,Y,Q){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){Q&&Q(!0,10,1,!1,!1,{});return}this._education.openQuestionInterface(K,z,Y,((K,z,Y,X,Z,J)=>{const tt={eventType:q,skill:J,wasCorrect:K};this.fireEvent(ht.L.TOWER_TOWN_QUESTION_ANSWERED,tt),Q&&Q(K,z,Y,!1,!1,J)}))}shouldUseBuildMode(){return this._towerMode===Te.Build}shouldUseInfinityTowerMode(){const q=this.getGrade(),K=this._education.getPendingSkillsByGrade(q).length;return this._towerMode===Te.Infinity||0===K}get activeInfinityFloor(){return(0,Z.last)(this._town.infinityTower.floors)}get activeFloor(){return this.isInfinity?this.activeInfinityFloor:(0,Z.last)(this._town.floors)}getActiveFloorIndexes(){if(this.isInfinity)return new Q.I9Y(-1,-1);const q=this.currentTown,K=this.activeFloor;for(let z=q.towers.length-1;z>=0;--z){const Y=q.towers[z].floors.indexOf(K);if(Y>=0)return new Q.I9Y(z,Y)}return new Q.I9Y(0,0)}get activeTower(){return this.isInfinity?this._town.infinityTower:(0,Z.last)(this._town.towers)}get currentSkillID(){const q=this._education.getCurrentSkillByGrade(this.getGrade());return q?q.ID:null}get game(){return this._game}get education(){return this._education}get events(){return this._events}removeTowers(){(0,Z.range)(this._town.towers.length).forEach((()=>{this._town.removeTower()}))}hasMinimumFloorsToMove(q){return q.floors.length>dt.o.MINIMUM_FLOOR_COUNT}isTopFloorOfTower(q,K){return K===q.floors.length-1}canMoveFloorToPrevTower(q,K){return 0===K&&Q.Aq$.isDefined(q)&&q.floors.length{const K=q.getFinalNotification().type;if(this.conditionallySaveTown(q),K===ht.L.EDUCATION_SET_ALGORITHM){const q=this._education.isCurrentAlgorithmBasicOrGameChallenge(),K=this._towerMode;this._towerMode=q?Te.Build:Te.Infinity,this._towerMode!==K&&this.notifyUpdate(ht.L.TOWER_TOWN_INFINITY_TOWER_OPEN)}}))}getFloatlingsForFling(){return this.isInfinity?this.currentTown.infinityTower.getWanderingFloatlings():this.currentTown.getWanderingFloatlings()}hasAvailableFloatlings(){return this.stateManager.map.breadCrumbManager.isBreadcrumbComplete(vt.M.FlingTutorialComplete)?this.isInfinity?this.currentTown.infinityTower.getFloatlings().length>0:this.currentTown.getAllFloatlings().length>0:this.getFloatlingsForFling().length>=ot.D.FLING_FTUE_FLOATLING_COUNT}handleUpdate(q){const K=super.handleUpdate(q);return this.events.handleNotification(this,K),K}setClickable(q){this._isClickable=q}redirectTowerTownPopup(){return tt.q.instance.prodigy.open.informationDialog(new nt.Z(ot.D.POPUP_TOWER_TOWN_GO_TO_BUTTON,(()=>{tt.q.instance.prodigy.world.it(ot.D.TOWER_TOWN_MAP)}),st.E.Medium,600,ot.D.POPUP_TOWER_TOWN_GO_TO,ot.D.POPUP_TOWER_TOWN_REDIRECT,!0,ot.D.ATLAS_SWOOPY_FACE,ot.D.ATLAS_SWOOPY_FACE_FRAME_DEFAULT))}};(0,Y.Cg)([(0,J.sg)(500,{leading:!1}),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],Ae.prototype,"saveTown",null),Ae=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("d73-66e9")),(0,Y.Qj)(1,(0,X.inject)(rt.G.Storage)),(0,Y.Qj)(2,(0,X.inject)(rt.G.Education)),(0,Y.Qj)(3,(0,X.inject)(rt.G.Events)),(0,Y.Sn)("design:paramtypes",[et.n,pt.w,ft.V,bt.s])],Ae)},26023:(q,K,z)=>{"use strict";z.d(K,{k:()=>bt});var Y=z(62459),Q=z(35120),X=z(70399),Z=z(82142),J=z(66930),tt=z(42862),et=z(40410),it=z(6191),st=z(41340),nt=z(8674),at=z(79687),rt=z(95891),ot=z(77938),ht=z(64794);let ct=class{constructor(){this._items=new Map,this._itemsReady=!1}get items(){return this._itemsReady||(this.lazyLoadItems(),this._itemsReady=!0),this._items}getItems(q){const K=this.items.get(q);return K||[]}isDefaultItem(q,K){const z=this.items.get(q);return z&&rt.find(z,(q=>q===K))===K}lazyLoadItems(){this._items.set(ht.D.ASSET_TYPE_INTERIOR,[]),this._items.set(ht.D.ASSET_TYPE_FRAME,[]);const q=ot.t.getItemsWithFilter(ht.D.ASSET_TYPE_INTERIOR,(q=>rt.get(q,"data.tag")&&q.data.tag.endsWith("-1"))).map((q=>q.ID)),K=ot.t.getItemsWithFilter(ht.D.ASSET_TYPE_FRAME,(q=>rt.get(q,"data.tag")&&q.data.tag.endsWith("-1"))).map((q=>q.ID));this._items.get(ht.D.ASSET_TYPE_INTERIOR).push(...q),this._items.get(ht.D.ASSET_TYPE_FRAME).push(...K)}};ct=(0,nt.Cg)([(0,at.injectable)()],ct);var dt=z(25863),lt=z(51477),ut=z(59510);let ft=class{get assets(){return this._assetsLoaded||(this._assetsLoaded=!0,this.addAssets()),this._assets}get backpack(){return Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack}constructor(q,K,z){this._assetsLoaded=!1,this._assets=new Map,this._imageNames=new Map,this._itemProvider=K,this._breadcrumbManager=z}getBackpackItems(q,K){const z=this.backpack.getBackpackItemsByType(q);if(0===z.length)return[];let Y=this.assets.get(q);return Y&&0!==Y.length?(K&&(Y=Y.filter((q=>q.data.tag&&q.data.tag.indexOf(`-${K}-`)>=0))),Y=Y.filter((q=>rt.find(z,(K=>K.ID===q.ID&&q.data.tag&&q.data.tag.indexOf("-bp-")<0)))),rt.sortBy(Y,(q=>q.ID))):[]}getBackpackItem(q,K){const z=this.backpack.getBackpackItemsByType(q);return rt.find(z,(q=>q.ID===K))}getBackpackPageCount(q,K,z){const Y=this.getBackpackItems(q,z);return Y&&0!==Y.length?Math.ceil(Y.length/K):0}getPagedBackpackItems(q,K,z,Y){const Q=this.getBackpackItems(q,Y);if(!Q||0===Q.length)return[];const X=K*z;return Q.slice(X,X+z)}getItemDataAt(q,K,z,Y){const Q=this.assets.get(q),X=K*Y+z;return X>=Q.length?null:Q[X].data}getItemData(q,K){const z=rt.find(this.assets.get(q),(q=>q.ID===K));return Y.Aq$.isDefined(z)?z.data:null}getItemImageName(q,K,z){const Q=`${q}-${K}${Y.Aq$.isDefined(z)&&z?"-bp":""}`;let X=this._imageNames.get(Q);if(X)return X;const Z=rt.find(this.assets.get(q),(q=>q.ID===K));if(null==Z?void 0:Z.data){if(Y.Aq$.isDefined(z)&&z){const q=Z.data.tag.split("-"),K=q.shift(),z=q.shift();return q.unshift("bp"),q.unshift(z),q.unshift(K),X=q.join("-"),this._imageNames.set(Q,X),X}return X=Z.data.tag,this._imageNames.set(Q,X),X}return null}getPage(q,K,z){const Y=this.assets.get(q);if(!Y||0===Y.length)return[];const Q=[],X=K*z,Z=Y.slice(X,X+z);return Z.forEach((q=>Q.push(q.data))),Z}getPageCount(q,K){return this.assets.get(q).length>0?Math.ceil(this._assets.get(q).length/K):0}awardDefaultItems(q){const K=[];this._itemProvider.getItems(ht.D.ASSET_TYPE_FRAME).forEach((q=>K.push({type:ht.D.ASSET_TYPE_FRAME,ID:q})));const z=this._breadcrumbManager.isBreadcrumbComplete(ut.M.DefaultFramesReceived),Y=this._breadcrumbManager.isBreadcrumbComplete(ut.M.DefaultItemsReceived);if(z)Y?q():this.awardDefaultRooms(q);else{this._breadcrumbManager.completeBreadcrumb(ut.M.DefaultFramesReceived);Q.q.instance.prodigy.open.gotItem(K,this.awardDefaultRooms.bind(this,q)).setInputEnabled(!1)}}awardDefaultRooms(q){const K=[];this._itemProvider.getItems(ht.D.ASSET_TYPE_INTERIOR).forEach((q=>K.push({type:ht.D.ASSET_TYPE_INTERIOR,ID:q}))),this._breadcrumbManager.completeBreadcrumb(ut.M.DefaultItemsReceived);Q.q.instance.prodigy.open.gotItem(K,q).setInputEnabled(!1)}pushDefaultItems(){const q=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this._itemProvider.getItems(ht.D.ASSET_TYPE_INTERIOR).forEach((K=>{q.backpack.add(ht.D.ASSET_TYPE_INTERIOR,K)})),this._itemProvider.getItems(ht.D.ASSET_TYPE_FRAME).forEach((K=>{q.backpack.add(ht.D.ASSET_TYPE_FRAME,K)}))}hasDefaultItems(){const q=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=this._itemProvider.getItems(ht.D.ASSET_TYPE_FRAME).every((K=>q.backpack.hasItem(ht.D.ASSET_TYPE_FRAME,K)>0)),z=this._itemProvider.getItems(ht.D.ASSET_TYPE_INTERIOR).every((K=>q.backpack.hasItem(ht.D.ASSET_TYPE_INTERIOR,K)>0));return K&&z}isDefaultItem(q,K){return this._itemProvider.isDefaultItem(q,K)}removeDefaultItems(){const q=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this._itemProvider.getItems(ht.D.ASSET_TYPE_INTERIOR).forEach((K=>{q.backpack.consume(ht.D.ASSET_TYPE_INTERIOR,K)})),this._itemProvider.getItems(ht.D.ASSET_TYPE_FRAME).forEach((K=>{q.backpack.consume(ht.D.ASSET_TYPE_FRAME,K)}))}consume(q,K){return q!==ht.D.ASSET_TYPE_INTERIOR&&!this._itemProvider.isDefaultItem(q,K)&&(this.backpack.consume(q,K,1),!0)}addAssets(){const q={};this.addByType(ht.D.ASSET_TYPE_INTERIOR,q),this.addByType(ht.D.ASSET_TYPE_FRAME,q),this.addByType(ht.D.ASSET_TYPE_DECORATION,q),Q.q.instance.prodigy.assets.assignAssets(q)}addByType(q,K){this._assets.set(q,[]);const z=ot.t.getItemsWithFilter(q,(q=>!0));z&&z.length>0&&z.forEach((z=>{z.data.tag?K[z.data.tag]=z.metadata:K[z.data.name]=z.metadata,this._assets.get(q).push(z)}))}};ft=(0,nt.Cg)([(0,at.injectable)(),(0,nt.Qj)(0,(0,at.inject)("d73-66e9")),(0,nt.Qj)(1,(0,at.inject)(X.G.DefaultItems)),(0,nt.Qj)(2,(0,at.inject)(X.G.BreadcrumbManager)),(0,nt.Sn)("design:paramtypes",[lt.n,ct,st.Y])],ft);class bt extends Y.PQK{installBindings(){window.__pnp_safeBind(Q.q.instance.prodigy.gameContainer,X.G.MathTower).to(Z.gT).asSingleton(),window.__pnp_safeBind(Q.q.instance.prodigy.gameContainer,X.G.Storage).to(et.w).asSingleton(),window.__pnp_safeBind(Q.q.instance.prodigy.gameContainer,X.G.StorageSerializer).to(it.Y).asSingleton(),window.__pnp_safeBind(Q.q.instance.prodigy.gameContainer,X.G.StoreManager).to(ft).asSingleton(),window.__pnp_safeBind(Q.q.instance.prodigy.gameContainer,X.G.BreadcrumbManager).to(st.Y).asSingleton(),window.__pnp_safeBind(Q.q.instance.prodigy.gameContainer,X.G.DefaultItems).to(ct).asSingleton(),window.__pnp_safeBind(Q.q.instance.prodigy.gameContainer,X.G.Education).to(J.V).asSingleton(),window.__pnp_safeBind(Q.q.instance.prodigy.gameContainer,X.G.DialogueFactory).to(dt.Y),window.__pnp_safeBind(Q.q.instance.prodigy.gameContainer,X.G.Events).to(tt.s)}}},70399:(q,K,z)=>{"use strict";var Y;z.d(K,{G:()=>Y}),function(q){q.MathTower="MathTower",q.DefaultItems="DefaultItems",q.Storage="Storage",q.StorageSerializer="StorageSerializer",q.StoreManager="StoreManager",q.BreadcrumbManager="TowerTownBreadcrumbManager",q.Education="Education",q.DialogueFactory="DialogueFactory",q.Events="Events"}(Y||(Y={}))},64794:(q,K,z)=>{"use strict";z.d(K,{D:()=>nt});var Y=z(62459),Q=z(99625),X=z(95946),Z=z(88022),J=z(56942),tt=z(36648),et=z(85855),it=z(51742),st=z(84317);class nt{}nt.FEATURE_NAME="FEATURE_TOWERTOWN",nt.TOWER_TOWN_MAP="tower_town-A1",nt.TOWER_TOWN_TUTORIAL_MAP="tower_town-A0",nt.MAP_INFINITY_TOWER_CONSTRUCTION="towertown-default-1",nt.CURRENCY_FIRE=21,nt.CURRENCY_ICE=22,nt.CURRENCY_PLANT=23,nt.CURRENCY_WATER=24,nt.CURRENCY_STORM=25,nt.ATLAS_CORE=Z._.General_core_json,nt.ATLAS_CORE_2=Z._.General_core_2_json,nt.ATLAS_ICONS=Z._.General_icons_json,nt.ATLAS_MATH_TOWER=Z._.Popup_member_modular_json,nt.ATLAS_SWOOPY_FACE=Z._.Npc_face_swoopy_json,nt.ATLAS_SHARED=Z._.Ui_shared_json,nt.ATLAS_UI_TITAN=Z._.Ui_titan_json,nt.ATLAS_SHIPWRECK_PROGRESS=Z._.Ui_shipwreck_progress_json,nt.ATLAS_SHIVERCHILL_PROGRESS=Z._.Ui_shiverchill_progress_json,nt.ATLAS_BAM=Z._.Ui_bam_json,nt.ATLAS_BUTTONS=Z._.Ui_buttons_json,nt.ATLAS_DIALOGUES=Z._.Ui_dialogues_json,nt.ATLAS_STORE=Z._.Ui_store_json,nt.ATLAS_REGISTRATION=Z._.Ui_registration_json,nt.ATLAS_TOWERTOWN_MISC=Z._.Ui_towertown_misc_json,nt.ATLAS_TOWERTOWN=Z._.Ui_towertown_json,nt.ATLAS_UI_ICONS=Z._.Ui_icons_json,nt.ATLAS_PANELS=Z._.Ui_panels_json,nt.ATLAS_FLING_TARGETS=Z._.Floatling_fling_json,nt.ATLAS_RESEARCH_POINTS=Z._.Ui_towertown_samples_json,nt.ATLAS_FLAGS=Z._.Ui_towertown_flags_json,nt.ATLAS_TOPIC_ICONS=Z._.Icon_topic_pixel_json,nt.ATLAS_SWOOPY_FACE_FRAME_LAUGH="face_0",nt.ATLAS_SWOOPY_FACE_FRAME_DEFAULT="face_1",nt.ATLAS_SWOOPY_FACE_FRAME_THINK="face_2",nt.SPINE_SHADOW_PORTAL=J.Q.Spine_shadowportal_json,nt.SPINE_SMART_BLOCK_VFX=J.Q.Spine_smartblock_vfx_json,nt.SPINE_FLOATING_FIRE_1=J.Q.Spine_npc_floatling_fire1_json,nt.SPINE_FLOATING_ICE_1=J.Q.Spine_npc_floatling_ice1_json,nt.SPINE_FLOATLING_PLANT_1=J.Q.Spine_npc_floatling_plant1_json,nt.SPINE_FLOATLING_STORM_1=J.Q.Spine_npc_floatling_storm1_json,nt.SPINE_LUMIN_TREE=J.Q.Spine_lumintree_json,nt.SPINE_SWOOPY=J.Q.Spine_npc_swoopy_json,nt.SPINE_FLING_SHIMMER=J.Q.Spine_floatlingfling_zoneshimmer_json,nt.SPINE_STUBBORN_SHADOW=J.Q.Spine_stubbornshadow_json,nt.SPINE_SHROUD_CLOUD=J.Q.Spine_shroud_json,nt.SPINE_SHADOW_CLASH=J.Q.Spine_shadowclash_json,nt.SPINE_FLAGPOLE=J.Q.Spine_smoke_flagmask_json,nt.FLOATLING_FLING_BACKGROUND=tt.q.Bg_floatling_fling,nt.FLOATLING_FLING_RESEARCH_ICONS=tt.q.Spot_samples,nt.POPUP_NO_FLOATLINGS_ICON=tt.q.Sleeping_floatlings_pop_up,nt.POPUP_INFINITY_TOWER_CLOSE=tt.q.Infinitytower_closed,nt.POPUP_INFINITY_TOWER_OPEN=tt.q.Infinitytower_open,nt.POPUP_TOWER_TOWN_OPEN=tt.q.Towertown_open,nt.FRAME_LEFT_BAR="meter-fill-left-green",nt.FRAME_RIGHT_BAR="meter-fill-right-green",nt.FRAME_MIDDLE_BAR="meter-fill-mid-green",nt.ASSET_ORANGE_FLAG_FRAME="skill-flag-g-ss",nt.ASSET_BLUE_FLAG_FRAME="skill-flag-p-a",nt.ASSET_RED_FLAG_FRAME="skill-flag-dm-p",nt.ASSET_PURPLE_FLAG_FRAME="skill-flag-m",nt.ASSET_TURQOISE_FLAG_FRAME="skill-flag-ns-n",nt.UI_BUILD_COMPONENT_PREFAB=24,nt.UI_ADD_FLOOR_PREFAB=Q.l.AddFloor,nt.UI_ARROW_HUD_PREFAB=Q.l.CameraControlHUD,nt.UI_CHOOSE_FLOOR_LOOK_PREFAB=Q.l.ChooseFloorLook,nt.UI_LARGE_LIST_ITEM_PREFAB=Q.l.FloorListLargeItem,nt.UI_SMALL_LIST_ITEM_PREFAB=Q.l.FloorListSmallItem,nt.UI_TOOLTIP_PREFAB=Q.l.ToolTip,nt.UI_SHROUD_LOCK_PREFAB=Q.l.MathTowerShroudLock,nt.UI_DECORATION_POINTS_PREFAB=Q.l.FloorDecorationPlacer,nt.UI_RESEARCH_POINTS_PANEL_PREFAB=Q.l.FloatlingFlingResearchPointPanel,nt.UI_CORNER_PREFAB=Q.l.CornerQuit,nt.UI_TOWER_TOWN_MALL_PREFAB=Q.l.TowerTownMallInterface,nt.UI_TOWER_TOWN_MALL_SHOP_PREFAB=Q.l.TowerTownMallShopComponent,nt.UI_TOWER_TOWN_MALL_SCROLLVIEW=Q.l.TowerTownShopScrollView,nt.UI_TOWER_TOWN_MALL_SCROLLBAR=Q.l.TowerTownMallScrollBar,nt.UI_TOWER_TOWN_MALL_HATSTORE_AD=Q.l.HatStoreAdvertisement,nt.UI_TUTORIAL_TAG=Q.l.TutorialTag,nt.UI_ROOFTOP_MASTERY=Q.l.RooftopMastery,nt.UI_MOVE_FLOOR=Q.l.MoveFloor,nt.UI_TOWER_TOWN_UPDATE=Q.l.TowerTownUpdate,nt.UI_QUICK_RENOVATION=Q.l.QuickRenovationComponent,nt.UI_INFINITY_TOWER_TOP_RIGHT_CONTAINER=Q.l.InfinityTowerTopRightContainer,nt.UI_CLOSED_RED_MESSAGE=Q.l.ClosedRedRectangleMessage,nt.UI_SMALL_WARNING_MESSAGE=Q.l.SmallWarningMessage,nt.UI_NEW_GRADE_PREFAB=Q.l.NewTownPopup,nt.POPUP_NO_FLOATLINGS_TITLE="FF_POPUP_NO_FLOATLING_TITLE",nt.POPUP_NO_FLOATLINGS_BODY="FF_POPUP_NO_FLOATLING_BODY",nt.POPUP_NO_FLOATLINGS_CONFIRM="BUTTON_OKAY_CAPITAL",nt.POPUP_FLING_FINISH_TITLE="FF_POPUP_FINISH_TITLE",nt.POPUP_FLING_FINISH_BODY="FF_POPUP_FINISH_BODY",nt.POPUP_FLING_FINISH_BUTTON="BUTTON_OKAY_CAPITAL",nt.POPUP_FLING_COLLECT_TITLE="FF_POPUP_COLLECT_TITLE",nt.POPUP_FLING_COLLECT_BODY="FF_POPUP_COLLECT_BODY",nt.FLING_CLICK_AND_DRAG="FF_CLICK_AND_DRAG",nt.TOOLTIP_FLOOR_FINISHED="TT_TOOLTIP_FLOOR_COMPLETE",nt.HEADER_MOVE_FLOOR="TT_MOVE_FLOOR_HEADER",nt.WARNING_TOP_FORWARD="TT_MOVE_FLOOR_TOP_ONLY_FORWARD",nt.WARNING_BOTTOM_BACK="TT_MOVE_FLOOR_BOTTOM_ONLY_BACK",nt.MOVE_FLOOR_MINIMUM_WARNING="TT_MOVE_FLOOR_MINIMUM_WARNING",nt.MOVE_FLOOR_TOP_BOTTOM="TT_MOVE_FLOOR_TOP_BOTTOM_ONLY",nt.MOVE_FLOOR_PREV_TALL="TT_MOVE_FLOOR_PREV_TALL",nt.MOVE_FLOOR_NEXT_TALL="TT_MOVE_FLOOR_NEXT_TALL",nt.MOVE_FLOOR_FIRST="TT_MOVE_FIRST_FLOOR",nt.POPUP_FLING_QUIT_CONFIRM="BUTTON_QUIT_CAPITAL",nt.POPUP_FLING_QUIT_DECLINE="BUTTON_STAY_TEAM",nt.POPUP_FLING_QUIT_TITLE="BUTTON_QUIT_QUESTION",nt.POPUP_FLING_QUIT_BODY="FF_QUIT_BODY",nt.TT_ROOMMATES="TT_ROOMMATES",nt.TT_BLOCKED_FLOOR="TT_MOVE_FLOOR_BLOCKED",nt.POPUP_STUBBORN_SHADOW_QUIT_BODY="TT_STUBBORN_SHADOW_QUIT_BODY",nt.POPUP_STUBBORN_SHADOW_QUIT_TITLE="BUTTON_QUIT_QUESTION",nt.POPUP_STUBBORN_SHADOW_QUIT_BUTTON="BUTTON_QUIT_CAPITAL",nt.POPUP_STUBBORN_SHADOW_STAY_BUTTON="BUTTON_STAY_TEAM",nt.POPUP_SHROUD_QUIT_BODY="TT_SHROUD_QUIT_CONFIRM_BODY",nt.POPUP_SHROUD_QUIT_TITLE="BUTTON_QUIT_QUESTION",nt.POPUP_SHROUD_QUIT_BUTTON="BUTTON_QUIT_CAPITAL",nt.POPUP_SHROUD_STAY_BUTTON="BUTTON_STAY_TEAM",nt.POPUP_CHOOSE_FLOOR_QUIT_BUTTON="BUTTON_QUIT_CAPITAL",nt.POPUP_CHOOSE_FLOOR_STAY_BUTTON="BUTTON_STAY_TEAM",nt.POPUP_CHOOSE_FLOOR_QUIT_TITLE="BUTTON_QUIT_QUESTION",nt.POPUP_CHOOSE_FLOOR_QUIT_BODY="TT_CHOOSE_FLOOR_QUIT_BODY",nt.TT_TOWER_WORK_DONE="TT_TOWER_WORK_DONE",nt.TT_START_BUILDING="TT_START_BUILDING",nt.TT_TOWER_TOWN_OPEN="TT_TOWER_TOWN_OPEN",nt.TT_INFINITY_TOWER_OPEN_BODY="TT_INFINITY_TOWER_OPEN_BODY",nt.TT_INFINITY_TOWER_OPEN="TT_INFINITY_TOWER_OPEN",nt.TT_FINISH_TOWER_FIRST="TT_FINISH_TOWER_FIRST",nt.TT_FINISH_TOWER_ON_ADD="TT_FINISH_TOWER_ON_ADD",nt.TT_TOWER_CLOSED_LINKTXT="TT_TOWER_CLOSED_LINKTXT",nt.TT_TOWER_CLOSED_FOOTER="TT_TOWER_CLOSED_FOOTER",nt.TT_TOWER_CLOSED_BODY="TT_TOWER_CLOSED_BODY",nt.TT_INFINITY_TOWER_CLOSED="TT_INFINITY_TOWER_CLOSED",nt.TT_TOWER_CLOSED_LINK="TT_TOWER_CLOSED_LINK",nt.TT_STORE_TOO_MANY_ITEMS="STORE_TOOLTIP_MESSAGE_2",nt.TT_STORE_ALREADY_OWNED="STORE_TOOLTIP_MESSAGE_5",nt.TT_STORE_ITEM_LOCKED="STORE_TOOLTIP_MESSAGE_6",nt.TT_STORE_ITEM_BUY_LOCKED="STORE_TOOLTIP_MESSAGE_4",nt.TT_STORE_YOU_NEED_MORE="STORE_TOOLTIP_MESSAGE_3",nt.TT_STORE_ITEM_LOCKED_HEADER="STORE_TOOLTIP_HEADER_4",nt.TT_STORE_NOT_ENOUGH_HEADER="STORE_TOOLTIP_HEADER_3",nt.TT_UPDATE_SHROUDS_CLEARED="TT_UPDATE_SHROUDS_CLEARED",nt.TT_UPDATE_BLOCKS_BUILT="TT_UPDATE_BLOCKS_BUILT",nt.TT_UPDATE_FLOORS_MADE="TT_UPDATE_FLOORS_MADE",nt.POPUP_TOWER_TOWN_REDIRECT="TOWER_TOWN_REDIRECT",nt.POPUP_TOWER_TOWN_GO_TO="TOWER_TOWN_GO_POPUP",nt.POPUP_TOWER_TOWN_GO_TO_BUTTON="TOWER_TOWN_GO_BUTTON",nt.POPUP_NEW_TOWN_BUTTON="NEW_TOWN_POPUP_BUTTON",nt.POPUP_NEW_TOWN_TITLE="NEW_TOWN_POPUP_TITLE",nt.POPUP_NEW_TOWN_BODY="NEW_TOWN_POPUP_BODY",nt.ASSET_TYPE_DECORATION="mathTownDecor",nt.ASSET_TYPE_FRAME="mathTownFrame",nt.ASSET_TYPE_INTERIOR="mathTownInterior",nt.ASSET_TYPE_STREET_FURNITURE="mathTowerOrnament",nt.BASE_MENU_ASSET_ID=74,nt.PUPPETMASTER_BGM=et.V.Bgm_puppetmaster,nt.TOWER_TOWN_BGM=et.V.Bgm_towertown,nt.FLOATLING_FLING_BGM=et.V.Bgm_floatlingfling,nt.PUPPETMASTER_BGM_ID=12,nt.TOWER_TOWN_BGM_ID=27,nt.FLOATLING_FLING_BGM_ID=28,nt.SHADOW_PORTAL_OPEN=it.c.Sfx_academy_portal_open,nt.SHADOW_PORTAL_CLOSE=it.c.Sfx_academy_portal_close,nt.TOWER_TOWN_SFX=it.c.Sfx_tower_town,nt.FLOATLING_FLING_SFX=it.c.Sfx_floatling_fling,nt.TAB_CLICK_SFX=it.c.Sfx_tab_click,nt.SHADOW_PORTAL_OPEN_ID=34,nt.SHADOW_PORTAL_CLOSE_ID=35,nt.TOWER_TOWN_SFX_ID=48,nt.FLOATLING_FLING_SFX_ID=47,nt.BUTTON_CLICK_SFX_ID=18,nt.TAB_CLICK_SFX_ID=50,nt.LAND_FLOATLING="landaFloatling",nt.LAUNCH_FLOATLING="launchaFloatling",nt.CLEAR_SHROUD="clearaShroud",nt.COMPLETE_FLOOR="completeaFloor",nt.STUBBORN_SHADOW_DEFEAT="defeataStubbornShadow",nt.STUBBORN_SHADOW_DEFEND="StubbornShadowDefend",nt.STUBBORN_SHADOW_DROP="droppingaStubbornShadow",nt.DROP_BLOCK="droppingaBlock",nt.BUTTON_CLICK="pop",nt.TAB_CLICK="pop",nt.FLAG_SMOKE_ANIMATION="spine-smoke-flagmask",nt.PORTAL_APPEAR_ANIMATION="appear",nt.PORTAL_IDLE_ANIMATION="idle",nt.PORTAL_DISAPPEAR_ANIMATION="disappear2",nt.STUBBORN_SHADOW_APPEAR_ANIMATION="appear",nt.STUBBORN_SHADOW_IDLE_ANIMATION="idle",nt.STUBBORN_SHADOW_DEFEND_ANIMATION="defend",nt.STUBBORN_SHADOW_SUSTAIN_ANIMATION="sustain",nt.STUBBORN_SHADOW_DEATH_ANIMATION="die",nt.BEAM_TRAVEL_ANIMATION="beam-travel",nt.BEAM_END_ANIMATION="beam-end",nt.SHADOW_BEAM_TRAVEL_ANIMATION="beam-travel-shadow",nt.SHADOW_BEAM_END_ANIMATION="beam-end-shadow",nt.SPELL_SUMMON_ANIMATION="summon-create",nt.SPELL_TRAVEL_ANIMATION="summon-travel",nt.SPELL_END_ANIMATION="summon-end",nt.SPELL_CLASH_ANIMATION="cap-clash",nt.SPELL_CLASH_END_ANIMATION="cap-end",nt.SHADOW_PORTAL_ANIMATION_APPEAR="appear",nt.SHADOW_PORTAL_ANIMATION_IDLE="idle",nt.SHADOW_PORTAL_ANIMATION_DISAPPEAR="disappear2",nt.STUBBORN_SHADOW_ANIMATION_APPEAR="appear",nt.STUBBORN_SHADOW_ANIMATION_IDLE="idle",nt.TOWN_BG_COLOR=8703726,nt.TUTORIAL_BG_COLOR=1585480,nt.DEFAULT_EDUCATION_GRADE=1,nt.DEFAULT_ITEM_COUNT=10,nt.ADD_FLOOR_BUTTON_OFFSET=45,nt.BLOCK_FALL_DURATION_SECONDS=.2,nt.BLOCK_FALL_HEIGHT=250,nt.BLOCK_OFFSET_X=34,nt.BLOCK_OFFSET_Y=54,nt.CAMERA_Y_OFFSET=298,nt.CAMERA_Y_OFFSET_QUICK_RENO=268,nt.CAMERA_X_OFFSET=-500,nt.PLAYER_CAMERA_OFFSET_X=180,nt.PLAYER_CAMERA_OFFSET_Y=680,nt.PLAYER_FLING_OFFSET_X=100,nt.PLAYER_FLING_OFFSET_Y=500,nt.SWOOPY_OFFSET_X=-25,nt.SWOOPY_OFFSET_Y=-90,nt.FLOOR_HEIGHT=134,nt.FLOOR_WIDTH=416,nt.FLOOR_TUTORIAL_OFFSET=320,nt.GAME_CHALLENGE_SCENARIO_ID=10001,nt.MAX_SMART_BLOCKS=10,nt.TUTORIAL_SMART_BLOCKS=5,nt.RENDERER_JUMP_PERCENTAGE=.5,nt.RENDERER_OFFSET_PERCENTAGE=.25,nt.RENDERER_OFFSET_PERCENTAGE_INFINITY_TOWER=.5,nt.TOWER_BASE_Y=450,nt.PLAYER_BASE_Y=450,nt.UI_BUILD_INTERFACE_X=250,nt.UI_BUILD_INTERFACE_Y=250,nt.UI_BUILD_INTERFACE_X_OFFSET=20,nt.MAX_DECORATION_SLOTS=5,nt.FRAME_HEIGHT=196,nt.FRAME_WIDTH=416,nt.FRAME_HALF_WIDTH=208,nt.IN_PROGRESS_PREFAB_X_OFFSET=-169,nt.IN_PROGRESS_PREFAB_Y_OFFSET=-19,nt.FLOOR_LOOK_PREFAB_X_OFFSET=-200,nt.FLOOR_LOOK_PREFAB_Y_OFFSET=-120,nt.BLOCK_APPEAR_TIMESCALE=2.5,nt.BLOCK_FALL_TIMESCALE=1.5,nt.BLOCK_FALL_MULTIPLE_DELAY=300,nt.BLOCK_FALL_SHAKE_DISTANCE=20,nt.BLOCK_FALL_SHAKE_IN_TIME=50,nt.BLOCK_FALL_SHAKE_OUT_TIME=200,nt.BLOCK_FALL_SHAKE_ANIMATION_DELAY=230,nt.MS_DAY=864e5,nt.TOOLTIP_SLIDE_DURATION=500,nt.TOOLTIP_WIDTH=380,nt.TOOLTIP_STAY_DURATION=3e3,nt.TOOLTIP_OFFSET_X=125,nt.MOVE_HEADER_WIDTH=340,nt.STUBBORN_SHADOW_OFFSET_X=140,nt.STUBBORN_SHADOW_OFFSET_Y=-90,nt.STUBBORN_SHADOW_PLAYER_OFFSET_X=-350,nt.STUBBORN_SHADOW_PLAYER_OFFSET_Y=0,nt.SHADOW_PORTAL_OFFSET=new Y.I9Y(0,-250),nt.SPELL_CLASH_START_OFFSET=-400,nt.SPELL_CLASH_END_OFFSET=-40,nt.SPELL_CLASH_X_OFFSET=20,nt.SPELL_CLASH_Y_OFFSET=30,nt.SPELL_CLASH_SCALE=.7,nt.SPELL_MASK_FILL=0,nt.SPELL_MASK_SKIN_WIDTH=60,nt.SPELL_MASK_HEIGHT=200,nt.SPELL_MASK_OFFSET_Y=100,nt.BEAM_SCALE_X=.9,nt.BUTTON_FLASH_DURATION_MS=150,nt.LUMIN_TREE_OFFSET_Y=40,nt.MOVE_FLOOR_BUTTON_OFFSET_X=200,nt.MOVE_FLOOR_WARNING_OFFSET_X=-175,nt.MOVE_FLOOR_WARNING_OFFSET_Y=-110,nt.WARNING_ARROW_OFFSET_X=20,nt.WARNING_ARROW_OFFSET_Y=-7,nt.FLOOR_FINISHED_TOOLTIP_WIDTH=350,nt.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X=120,nt.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y=90,nt.FLAG_VISIBILITY_DELAY_MS=200,nt.STUBBORN_SHADOW_BOUNDS_OFFSET_X=300,nt.STUBBORN_SHADOW_CAMERA_OFFSET_X=600,nt.NO_SKILL_FLAG_ICON_ID=-1,nt.TOWER_RENDERER_CAMERA_HEIGHT=8,nt.PUPPET_MASTER_PORTAL_OFFSET_X=-50,nt.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS=1200,nt.BUTTON_DEBOUNCE_TIME=300,nt.CHARACTER_TWEEN_DELAY_MS=200,nt.SCRIM_ALPHA=.6,nt.SCRIM_SCALE_X=20,nt.SCRIM_SCALE_Y=40,nt.SCRIM_OFFSET_X_IN_SCREENS=3,nt.SCRIM_OFFSET_Y_IN_SCREENS=10,nt.NEW_TOWN_POPUP_SIZE=300,nt.FLOATLING_WALK_AREA=new Y.M_G(-250,50,500,200),nt.FLOATLING_WALK_PIXELS_PER_SECOND=70,nt.FLOATLING_WALK_MIN_IDLE_MS=3e3,nt.FLOATLING_WALK_MAX_IDLE_MS=1e4,nt.FLOATLING_IMMEDIATE_WALK_RATIO=.2,nt.FLOATLING_FLOOR_X_OFFSET=50,nt.FLOATLING_FLOOR_Y_OFFSET=-35,nt.FLOATLING_MAX_COUNT_DISPLAYED=8,nt.FLOATLING_FLOAT_MIN_START_Y_OFFSET=-700,nt.FLOATLING_FLOAT_MAX_START_Y_OFFSET=-500,nt.FLOATLING_FLOAT_HALF_ARC_WIDTH=50,nt.FLOATLING_FLOAT_MIN_DELAY_MS=0,nt.FLOATLING_FLOAT_MAX_DELAY_MS=400,nt.FLOATLING_FLOAT_LAST_FLOATED_OFFSET_MS=600,nt.FLOATLING_FLOAT_PIXELS_PER_SECOND=60,nt.FLOATLING_FLY_AWAY_MS=1700,nt.BUTTON_OFFSET_X=65,nt.BUTTON_OFFSET_Y=34,nt.SHROUD_OFFSET_Y=30,nt.SHROUD_CLEAN_SPELLS=20,nt.THETA_MAXIMUM=3,nt.THETA_MINIMUM=-3,nt.TUTORIAL_GRADE=-1,nt.DIALOGUE_SHROUD_FTUE_1=914,nt.DIALOGUE_SHROUD_FTUE_2=915,nt.DIALOGUE_SHROUD_FTUE_3=916,nt.DIALOGUE_SHROUD_FTUE_4=917,nt.DIALOGUE_SHROUD_FTUE_POST_ENDGAME_1=1455,nt.DIALOGUE_START_CLICKING_BUTTON=920,nt.DIALOGUE_CHOOSE_THE_LOOK=921,nt.DIALOGUE_CAST_SPELLS_FOR_BLOCKS=922,nt.DIALOGUE_SPEED_UP_BLOCK_NUMBERS=923,nt.DIALOGUE_FORCE_CORRECT_ANSWER=924,nt.DIALOGUE_ALL_DONE=925,nt.DIALOGUE_RETURNING_FLOATLINGS=926,nt.DIALOGUE_GATHERED_KNOWLEDGE=927,nt.DIALOGUE_LETS_GET_TO_WORK=928,nt.DIALOGUE_THANK_GOODNESS=945,nt.DIALOGUE_LUMIN_TREE=946,nt.DIALOGUE_SHOW_YOU=947,nt.DIALOGUE_BUILDING_BASICS=952,nt.DIALOGUE_FLOATLING_TYPES=953,nt.DIALOGUE_WEAKENED_PUPPETMASTER=954,nt.FLING_FTUE_MISSED=959,nt.FLING_FTUE_POST_FLING=939,nt.FLING_FTUE_INTRO_DIALOGUES=[937,949,938,950,951],nt.FLING_FTUE_OUTRO_DIALOGUES=[969,970],nt.STORE_FTUE_OUTRO_DIALOGUE=[971,972,973],nt.DIALOGUE_WELCOME_BACK=960,nt.DIALOGUE_STUBBORN_SHADOW_FTUE_1=929,nt.DIALOGUE_STUBBORN_SHADOW_FTUE_2=956,nt.DIALOGUE_STUBBORN_SHADOW_FTUE_3=930,nt.DIALOGUE_STUBBORN_SHADOW_FTUE_4=931,nt.DIALOGUE_STUBBORN_SHADOW_FTUE_5=933,nt.DIALOGUE_STUBBORN_SHADOW_FTUE_6=957,nt.DIALOGUE_STUBBORN_SHADOW_FTUE_7=974,nt.DIALOGUE_STUBBORN_SHADOW_FTUE_8=935,nt.DIALOGUE_STUBBORN_SHADOW_FTUE_9=958,nt.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_1=1456,nt.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_2=1457,nt.DIALOGUE_STUBBORN_SHADOW_DUEL_CHOICE=934,nt.FLAG_ORANGE_SKILL_IDS=[1,2,8,42,46,47],nt.FLAG_BLUE_SKILL_IDS=[28,29,30,41,45,50,54,73,84],nt.FLAG_RED_SKILL_IDS=[14,60,75],nt.FLAG_PURPLE_SKILL_IDS=[9,48,49,62,81,82],nt.STORE_PLANT=40,nt.STORE_FIRE=41,nt.STORE_ICE=42,nt.STORE_WATER=43,nt.STORE_STORM=44,nt.STORE_HAT=-1,nt.ZONE_CURRENCY_IDS=[13,15,16,12,14],nt.ZONE_CURRENCY_PAYOUT=10,nt.SHROUD_CORRECT_PAYOUT=1,nt.ROOFTOP_CORRECT_PAYOUT=1,nt.FIRE_RESEARCH_CURRENCY=21,nt.ICE_RESEARCH_CURRENCY=22,nt.PLANT_RESEARCH_CURRENCY=23,nt.WATER_RESEARCH_CURRENCY=24,nt.STORM_RESEARCH_CURRENCY=25,nt.FLING_PIP_SPREAD=.07,nt.FLING_PIP_COUNT=12,nt.FLING_GRAVITY=98,nt.FLING_GRAVITY_POWER=3,nt.FLING_FIRE_POWER_MULTIPLIER=2,nt.FLING_FIRE_POWER_MAX=600,nt.FLING_MIN_DRAG_DISTANCE=50,nt.FLING_CAMERA_TWEEN_IN_MS=1e3,nt.FLING_CAMERA_TWEEN_OUT_MS=3e3,nt.FLING_CAMERA_LEAVE_DELAY_MS=1e3,nt.FLING_PLAYER_DELAY_OFFSET_MS=100,nt.FLING_MAX_COUNT_DISPLAYED=10,nt.FLING_WAITING_SPAWN_OFFSET=400,nt.FLING_WAITING_SPAWN_TWEEN_MS=2e3,nt.FLING_WAITING_SHARED_OFFSET=100,nt.FLING_WAITING_INDIVIDUAL_OFFSET=25,nt.FLING_WAITING_MIN_X=-180,nt.FLING_WAITING_MAX_X=-100,nt.FLING_FTUE_POINTS_PER_SHOT=140,nt.FLING_FTUE_INTRO_DIALOGUE_Y_OFFSET=120,nt.FLING_FTUE_FLOATLING_COUNT=2,nt.FLING_SCORE_MANAGER_X=532,nt.FLING_SCORE_MANAGER_Y=32,nt.SPACE_16PX=16,nt.STATE_BUILD="build",nt.STATE_CAMERA="camera",nt.STATE_CHOOSE_FLOOR="chooseFloor",nt.STATE_START="start",nt.STATE_SHROUD="shroud",nt.STATE_ROOFTOP="rooftop",nt.STATE_MOVE="move",nt.STATE_FLING="fling",nt.STATE_INFINITY="infinity",nt.STATE_INFINITY_CHOOSE_FLOOR="infinityChooseFloor",nt.STATE_INFINITY_BUILD="infinityBuild",nt.STATE_QUICK_RENO="quickReno",nt.STATE_TUTORIAL_START="tutorialStart",nt.STATE_TUTORIAL_BUILD="tutorialBuild",nt.STATE_TUTORIAL_CHOOSE_FLOOR="tutorialFloor",nt.STATE_TUTORIAL_END="tutorialEnd",nt.TUTORIAL_CUTSCENE="tower_town-intro",nt.MESSAGE_DISABLE_NAVIGATION="tt-navigation-disable",nt.MESSAGE_ENABLE_NAVIGATION="tt-navigation-enable",nt.MESSAGE_DISABLE_FLING_BUTTON="tt-fling-button-disable",nt.MESSAGE_ENABLE_FLING_BUTTON="tt-fling-button-enable",nt.MESSAGE_ENABLE_BUTTON="tt-enable-button",nt.MESSAGE_DISABLE_BUTTON="tt-disable-button",nt.ELEMENT_STRINGS=[X.a.Plant,X.a.Ice,X.a.Storm,X.a.Fire,X.a.Water],nt.FLING_CURRENCY_ORDER=[nt.CURRENCY_PLANT,nt.CURRENCY_ICE,nt.CURRENCY_STORM,nt.CURRENCY_FIRE,nt.CURRENCY_WATER],nt.MAX_FLOATLING_LEVELS=5,nt.POINTER_BOUNCE_MS=750,nt.DECORATION_PREFAB_HEIGHT=46,nt.DECORATION_FLOOR_OFFSET=20,nt.DECORATION_OFFSETS=[new Y.I9Y(-nt.FRAME_WIDTH/2,-nt.FRAME_HEIGHT/2+nt.DECORATION_PREFAB_HEIGHT/2-nt.DECORATION_FLOOR_OFFSET),new Y.I9Y(-nt.FRAME_WIDTH/2,-nt.FRAME_HEIGHT+nt.DECORATION_PREFAB_HEIGHT),new Y.I9Y(0,-nt.FRAME_HEIGHT+nt.DECORATION_PREFAB_HEIGHT),new Y.I9Y(nt.FRAME_WIDTH/2,-nt.FRAME_HEIGHT+nt.DECORATION_PREFAB_HEIGHT),new Y.I9Y(nt.FRAME_WIDTH/2,-nt.FRAME_HEIGHT/2+nt.DECORATION_PREFAB_HEIGHT/2-nt.DECORATION_FLOOR_OFFSET)],nt.DEFAULT_FLOOR_ROOM_ID=1,nt.DEFAULT_FLOOR_FRAME_ID=2,nt.TILESET_CLOUD=st.t.Tileset_cloud_png,nt.TILESET_CLOUD_NEW=st.t.Tileset_cloud_new_png,nt.TILESET_COLLISIONS=st.t.Tileset_collisions_png,nt.TILESET_FOREST_NEW=st.t.Tileset_forest_new_png,nt.TILESET_GENERIC=st.t.Tileset_generic_png,nt.TILESET_GENERIC_NEW=st.t.Tileset_generic_new_png,nt.TILESET_MATH_TOWER_BASIC="tileset-math-tower-basic",nt.TILESET_TUTORIAL_SUBSPACE=st.t.Tileset_tutorial_subspace_png,nt.TILESET_INFINITY_TOWER_CONSTRUCTION=st.t.Tileset_infinity_tower_construction_png,nt.TILESET_OUTSIDE=st.t.Tileset_outside_png,nt.TILESET_TOWERTOWN_BASIC=st.t.Tileset_towertown_basic_png,nt.TILESET_TOWN_NEW=st.t.Tileset_town_new_png},90736:(q,K,z)=>{"use strict";var Y;z.d(K,{L:()=>Y}),function(q){q[q.BREADCRUMB=0]="BREADCRUMB",q[q.FLOOR_AWARD_FLOATLINGS=1]="FLOOR_AWARD_FLOATLINGS",q[q.FLOOR_PUSH_FLOATLING=2]="FLOOR_PUSH_FLOATLING",q[q.FLOOR_SET_BLOCK_COUNT=3]="FLOOR_SET_BLOCK_COUNT",q[q.FLOOR_SET_DECORATION_POSITIONS=4]="FLOOR_SET_DECORATION_POSITIONS",q[q.FLOOR_SET_DECORATIONS=5]="FLOOR_SET_DECORATIONS",q[q.FLOOR_SET_EXTERNAL_BUILD=6]="FLOOR_SET_EXTERNAL_BUILD",q[q.FLOOR_SET_FRAME_ID=7]="FLOOR_SET_FRAME_ID",q[q.FLOOR_SET_HAS_SHROUD=8]="FLOOR_SET_HAS_SHROUD",q[q.FLOOR_SET_NUM_SPELLS=9]="FLOOR_SET_NUM_SPELLS",q[q.FLOOR_SET_ROOM_ID=10]="FLOOR_SET_ROOM_ID",q[q.FLOOR_SET_SKILL_ID=11]="FLOOR_SET_SKILL_ID",q[q.FLOOR_SET_STATE=12]="FLOOR_SET_STATE",q[q.FLOOR_START_BUILDING=13]="FLOOR_START_BUILDING",q[q.TOWER_CREATE_FLOOR=14]="TOWER_CREATE_FLOOR",q[q.TOWER_MOVE_FLOOR=15]="TOWER_MOVE_FLOOR",q[q.TOWER_PUSH_FLOOR=16]="TOWER_PUSH_FLOOR",q[q.TOWER_REMOVE_FLOOR=17]="TOWER_REMOVE_FLOOR",q[q.TOWER_ROOM_BUILT=18]="TOWER_ROOM_BUILT",q[q.TOWER_COMPLETED=19]="TOWER_COMPLETED",q[q.TOWER_SET_ACTIVE_TOWER=20]="TOWER_SET_ACTIVE_TOWER",q[q.TOWER_SET_INFINITY_TOWER=21]="TOWER_SET_INFINITY_TOWER",q[q.TOWER_SET_SIDEWALK_ID=22]="TOWER_SET_SIDEWALK_ID",q[q.TOWN_CREATE_INFINITY_TOWER=23]="TOWN_CREATE_INFINITY_TOWER",q[q.TOWN_CREATE_TOWER=24]="TOWN_CREATE_TOWER",q[q.TOWN_PUSH_TOWER=25]="TOWN_PUSH_TOWER",q[q.TOWN_REMOVE_TOWER=26]="TOWN_REMOVE_TOWER",q[q.TOWN_FIND_DESCENDED_FLOATLINGS_TOWER=27]="TOWN_FIND_DESCENDED_FLOATLINGS_TOWER",q[q.FLOATLING_SET_ELEMENT=28]="FLOATLING_SET_ELEMENT",q[q.FLOATLING_SET_EXPLORER_LEVEL=29]="FLOATLING_SET_EXPLORER_LEVEL",q[q.FLOATLING_SET_FLOOR_ASSOCIATION=30]="FLOATLING_SET_FLOOR_ASSOCIATION",q[q.FLOATLING_SET_GEAR_ELEMENT=31]="FLOATLING_SET_GEAR_ELEMENT",q[q.FLOATLING_SET_LAST_THROWN=32]="FLOATLING_SET_LAST_THROWN",q[q.FLOATLING_SET_PERSONALITY=33]="FLOATLING_SET_PERSONALITY",q[q.FLOATLING_SET_STATE=34]="FLOATLING_SET_STATE",q[q.TOWER_TOWN_FLOATLING_FLING_END=35]="TOWER_TOWN_FLOATLING_FLING_END",q[q.TOWER_TOWN_FLOATLING_FLING_START=36]="TOWER_TOWN_FLOATLING_FLING_START",q[q.TOWER_TOWN_INFINITY_TOWER_OPEN=37]="TOWER_TOWN_INFINITY_TOWER_OPEN",q[q.TOWER_TOWN_QUESTION_ANSWERED=38]="TOWER_TOWN_QUESTION_ANSWERED",q[q.TOWER_TOWN_SAVE_TOWN=39]="TOWER_TOWN_SAVE_TOWN",q[q.TOWER_TOWN_SET_CURRENT_TOWN=40]="TOWER_TOWN_SET_CURRENT_TOWN",q[q.TOWER_TOWN_SETTINGS_OPEN=41]="TOWER_TOWN_SETTINGS_OPEN",q[q.TOWER_TOWN_STORE_OPEN=42]="TOWER_TOWN_STORE_OPEN",q[q.EDUCATION_QUESTION_ANSWER=43]="EDUCATION_QUESTION_ANSWER",q[q.EDUCATION_QUESTION_ANSWER_CORRECT=44]="EDUCATION_QUESTION_ANSWER_CORRECT",q[q.EDUCATION_QUESTION_ANSWER_INCORRECT=45]="EDUCATION_QUESTION_ANSWER_INCORRECT",q[q.EDUCATION_QUESTION_INTERFACE_CLOSE=46]="EDUCATION_QUESTION_INTERFACE_CLOSE",q[q.EDUCATION_QUESTION_INTERFACE_OPEN=47]="EDUCATION_QUESTION_INTERFACE_OPEN",q[q.EDUCATION_SET_ALGORITHM=48]="EDUCATION_SET_ALGORITHM",q[q.EDUCATION_SKILL_LOCKED=49]="EDUCATION_SKILL_LOCKED",q[q.EDUCATION_SKILL_MASTERED=50]="EDUCATION_SKILL_MASTERED",q[q.EDUCATION_SKILL_UNLOCKED=51]="EDUCATION_SKILL_UNLOCKED"}(Y||(Y={}))},58604:(q,K,z)=>{"use strict";z.d(K,{R:()=>Z});var Y=z(90736);class Q{get assetID(){return this._assetID}set assetID(q){this._assetID=q}}var X=z(80070);class Z extends X.v{constructor(){super(...arguments),this._decorations=new Map}get count(){return this._decorations.size}get keys(){return Array.from(this._decorations.keys())}removeAt(q){return!!this._decorations.has(q)&&(this._decorations.delete(q),this.notifyUpdate(Y.L.FLOOR_SET_DECORATIONS),!0)}getAt(q){return this._decorations.has(q)?this._decorations.get(q):null}clear(){this._decorations.clear(),this.notifyUpdate(Y.L.FLOOR_SET_DECORATIONS)}setAt(q,K){const z=new Q;z.assetID=K,this._decorations.set(q,z),this.notifyUpdate(Y.L.FLOOR_SET_DECORATIONS)}flush(){const q=this.keys.map((q=>this.getAt(q))).filter((q=>null!==q));return this.clear(),q}}},96417:(q,K,z)=>{"use strict";z.d(K,{b:()=>it,a:()=>tt});var Y,Q=z(95946),X=z(64794),Z=z(90736),J=z(81670);!function(q){q[q.Stubborn=0]="Stubborn",q[q.Shy=1]="Shy",q[q.Socialite=2]="Socialite",q[q.ChillDude=3]="ChillDude"}(Y||(Y={}));var tt,et=z(80070);!function(q){q[q.Wandering=0]="Wandering",q[q.Awake=1]="Awake",q[q.Asleep=2]="Asleep",q[q.Floating=3]="Floating",q[q.ScaredAway=4]="ScaredAway"}(tt||(tt={}));class it extends et.v{constructor(){super(...arguments),this._state=tt.Asleep,this._gearElement=0,this._explorerLevel=0,this._lastThrown=0,this._floor=null,this._personality=Y.ChillDude,this._element=Q.a.Fire}get state(){return this._state}set state(q){this._state!==q&&(this._state=q,this.notifyUpdate(Z.L.FLOATLING_SET_STATE))}get gearElement(){return this._gearElement}set gearElement(q){this._gearElement=q,this.notifyUpdate(Z.L.FLOATLING_SET_GEAR_ELEMENT)}get explorerLevel(){return this._explorerLevel}set explorerLevel(q){this._explorerLevel=q,this.notifyUpdate(Z.L.FLOATLING_SET_EXPLORER_LEVEL)}get lastThrown(){return this._lastThrown}set lastThrown(q){this._lastThrown=q,this.updateState(),this.notifyUpdate(Z.L.FLOATLING_SET_LAST_THROWN)}get floor(){return this._floor}set floor(q){this._floor=q,this.notifyUpdate(Z.L.FLOATLING_SET_FLOOR_ASSOCIATION)}get element(){return this._element}set element(q){this._element=q,this.notifyUpdate(Z.L.FLOATLING_SET_ELEMENT)}get personality(){return this._personality}set personality(q){this._personality=q,this.notifyUpdate(Z.L.FLOATLING_SET_PERSONALITY)}get spineID(){return`spine-${J.s.getFloatlingAssetID(this.element,this.explorerLevel)}`}get researchPointID(){return`researchpoint-sm-${this.element}`}updateState(){this.state!==tt.Floating&&this.state!==tt.ScaredAway&&(this.lastThrown<=Date.now()-X.D.MS_DAY?this.state!==tt.Wandering&&(this.state=tt.Awake):this.state=tt.Asleep)}static organizeFloatlings(q){const K=new Map;return X.D.ELEMENT_STRINGS.forEach((q=>{K.set(q,[])})),q.forEach((q=>{let z=!1;for(let Y=0;YK.get(q.element)[Y].explorerLevel){K.get(q.element).splice(Y,0,q),z=!0;break}z||K.get(q.element).push(q)})),K}}},9439:(q,K,z)=>{"use strict";z.d(K,{Z:()=>ot});var Y=z(62459),Q=z(95891),X=z(35120),Z=z(76945),J=z(70399),tt=z(64794),et=z(90736),it=z(15678),st=z(58604),nt=z(96417),at=z(39666),rt=z(80070);class ot extends rt.v{get hasShroud(){return this._hasShroud}get isComplete(){return this.state===at.u.Complete}get isPreConstruction(){return this.state===at.u.ChooseLook}get roomID(){return this._roomID}set roomID(q){this._roomID=q,this.notifyUpdate(et.L.FLOOR_SET_ROOM_ID)}get skillID(){return this._skillID}set skillID(q){this._skillID=q,this.notifyUpdate(et.L.FLOOR_SET_SKILL_ID)}get frameID(){return this._frameID}set frameID(q){this._frameID=q,this.notifyUpdate(et.L.FLOOR_SET_FRAME_ID)}get blockCount(){return this._blockCount}set blockCount(q){this._blockCount!==q&&(this._blockCount=q,this.notifyUpdate(et.L.FLOOR_SET_BLOCK_COUNT))}get hasMaxBlocks(){return this.blockCount>=tt.D.MAX_SMART_BLOCKS}get isQuickReno(){return this.state===at.u.QuickReno}get isExternalBuild(){return this._isExternalBuild}set isExternalBuild(q){this._isExternalBuild=q,this.notifyUpdate(et.L.FLOOR_SET_EXTERNAL_BUILD)}get state(){return this._state}set state(q){this._state!==q&&(this._state=q,this.notifyUpdate(et.L.FLOOR_SET_STATE))}get floatlings(){return this._floatlings}get decorations(){return this._decorations}get decorationPositions(){return this._decorationPositions}set decorationPositions(q){if(q.length>tt.D.MAX_DECORATION_SLOTS)throw new Error(`Maximum decorations cannot exceed ${tt.D.MAX_DECORATION_SLOTS}`);this._decorationPositions=q,this.notifyUpdate(et.L.FLOOR_SET_DECORATION_POSITIONS)}getRestingFloatlings(){return this.floatlings.filter((q=>(q.updateState(),q.state===nt.a.Asleep||q.state===nt.a.Awake)))}getFloatlingsInState(q){return this.floatlings.filter((K=>K.state===q))}getFloatingFloatlings(){return this.floatlings.filter((q=>q.state===nt.a.Floating))}constructor(){var q,K,z;super(),this._roomID=0,this._skillID=0,this._frameID=0,this._blockCount=0,this._isExternalBuild=!1,this._hasShroud=!1,this._state=at.u.ChooseLook,this._decorations=new st.R,this._decorationPositions=[{x:-160,y:-80},{x:-160,y:-135},{x:0,y:-135},{x:160,y:-135},{x:160,y:-80}],this._floatlings=[],this._mathTower=null!==(z=null===(K=null===(q=X.q.instance)||void 0===q?void 0:q.prodigy)||void 0===K?void 0:K.gameContainer.get(J.G.MathTower))&&void 0!==z?z:null,this.registerDecorHandler(this._decorations)}calculateShroudStatus(){var q;if(!(null===(q=null==this?void 0:this._mathTower)||void 0===q?void 0:q.education))return;const K=this._mathTower.education.getSkillById(this._skillID),z=it.g.answersToUnlock(K);this._hasShroud=K&&z>0,this.notifyUpdate(et.L.FLOOR_SET_HAS_SHROUD,this._hasShroud)}cleansRemaining(q=null){var K,z,Y;const Q=q||(null===(z=null===(K=this._mathTower)||void 0===K?void 0:K.education)||void 0===z?void 0:z.getSkillById(this._skillID)),X=Q&&null!==(Y=it.g.answersToUnlock(Q))&&void 0!==Y?Y:0;return Math.max(X,0)}onShroudQuestionAnswered(){this._hasShroud&&(this.notifyUpdate(et.L.FLOOR_SET_NUM_SPELLS),this.calculateShroudStatus())}generateRandomFloatlings(q=5,K=0){((q,K)=>(0,Q.range)(K).map((()=>{const K=new nt.b;return K.gearElement=Z.o.seededRange(2,3,q),K.element=(0,Q.first)((0,Q.shuffle)([...tt.D.ELEMENT_STRINGS])),K.explorerLevel=Z.o.seededRange(0,4,q),K})))(this.skillID,q).forEach((q=>{q.lastThrown=K,this.pushFloatling(q)}))}awardFloatlings(q){const K=q.getItemData(tt.D.ASSET_TYPE_INTERIOR,this.roomID);if(!Y.Aq$.isDefined(K))return;let z=0,Q="";K.occupantLevels.forEach((q=>{const Y=new nt.b;Y.element=tt.D.ELEMENT_STRINGS[Number.parseInt(K.element)],Y.explorerLevel=q,this.pushFloatling(Y),z++,Q=Y.element})),this.notifyUpdate(et.L.FLOOR_AWARD_FLOATLINGS,{floatlingCount:z,element:Q})}pushFloatling(q){this._floatlings.push(q),q.floor=this,this.registerFloatlingHandler(q),this.notifyUpdate(et.L.FLOOR_PUSH_FLOATLING)}get isRenovating(){return(this.isQuickReno||this.state===at.u.UnderConstruction)&&this._isExternalBuild}setComplete(q=!1,K=tt.D.MAX_SMART_BLOCKS){this.blockCount=K,this.isExternalBuild=q,this.state=at.u.Complete}isInBlueprintState(){return!this.hasMaxBlocks&&ot.FULL_STATES.every((q=>this.state!==q))}setReadyForRenovation(){this.isExternalBuild=!0,this.state=at.u.Complete}setRenovation(){this.isExternalBuild=!0,this.state=at.u.QuickReno}setRenoConstruction(){this.blockCount=this.hasMaxBlocks?0:this.blockCount,this.isExternalBuild=!0,this.state=at.u.UnderConstruction}get canReceiveFloatlings(){return this.isComplete&&!this.isExternalBuild&&0===this.floatlings.length}registerFloatlingHandler(q){q.onUpdate.add(this.handleUpdate.bind(this))}registerDecorHandler(q){q.onUpdate.add(this.handleUpdate.bind(this))}}ot.FULL_STATES=[at.u.Complete,at.u.ChooseLook,at.u.QuickReno,at.u.RooftopMastery]},39666:(q,K,z)=>{"use strict";var Y;z.d(K,{u:()=>Y}),function(q){q[q.Complete=0]="Complete",q[q.UnderConstruction=1]="UnderConstruction",q[q.SkillLocked=2]="SkillLocked",q[q.RooftopMastery=3]="RooftopMastery",q[q.TowerRoof=4]="TowerRoof",q[q.ChooseLook=5]="ChooseLook",q[q.QuickReno=6]="QuickReno",q[q.MoveFloor=7]="MoveFloor"}(Y||(Y={}))},51365:(q,K,z)=>{"use strict";z.d(K,{L:()=>X});var Y=z(95891),Q=z(90736);class X{get source(){return this._source}get child(){return this._child}get type(){return this._type}get value(){return this._value}constructor(q,K,z,Y){this._source=q,this._child=z,this._type=K,this._value=Y}getLastChild(){return(0,Y.last)(this.traverseNotificationTree(this._child))}getChildren(){return this.traverseNotificationTree(this._child)}getFinalNotification(){return this._child?this.getLastChild():this}getStringType(){return Object.keys(Q.L).find((q=>{if(Q.L[q]===this._type)return q}))}traverseNotificationTree(q){const K=[],z=q=>{q._child&&(K.push(q._child),z(q._child))};return q&&(K.push(q),z(q)),K}}},43844:(q,K,z)=>{"use strict";z.d(K,{o:()=>it});var Y=z(95891),Q=z(90736),X=z(58604),Z=z(96417),J=z(9439),tt=z(39666),et=z(80070);class it extends et.v{get ornamentPositions(){return this._ornamentsPositions}get floors(){return this._floors}get ornaments(){return this._ornaments}get sideWalkAssetID(){return this._sideWalkAssetID}set sideWalkAssetID(q){this._sideWalkAssetID=q,this.notifyUpdate(Q.L.TOWER_SET_SIDEWALK_ID)}get isInfinityTower(){return this._isInfinityTower}set isInfinityTower(q){this._isInfinityTower=q,this.notifyUpdate(Q.L.TOWER_SET_INFINITY_TOWER)}get isActiveTower(){return this._isActiveTower}set isActiveTower(q){this._isActiveTower=q,this.notifyUpdate(Q.L.TOWER_SET_ACTIVE_TOWER)}constructor(q=!1){super(),this._sideWalkAssetID=0,this._isInfinityTower=!1,this._isActiveTower=!1,this._ornaments=new X.R,this._floors=[],this._ornamentsPositions=[{x:-200,y:70},{x:-100,y:70},{x:0,y:70},{x:100,y:70},{x:200,y:70}],this._isInfinityTower=q,this._isActiveTower=!0}createFloor(q,K=!1){if(!this.canAddFloor())return null;const z=new J.Z;return z.skillID=this.isInfinityTower?null:q,z.isExternalBuild=K,this._floors.push(z),this.registerFloorHandler(z),this.notifyUpdate(Q.L.TOWER_CREATE_FLOOR,{skillID:q,isInfinityTower:this.isInfinityTower}),z}hasSkillLockedFloors(){return(0,Y.filter)(this._floors,(q=>q.state===tt.u.SkillLocked)).length>0}canRemoveFloor(){return!this._isInfinityTower&&this._floors.length>it.MINIMUM_FLOOR_COUNT}canAddFloor(){return this._isInfinityTower||this._floors.length=it.MINIMUM_FLOOR_COUNT}takeFloorFrom(q,K=!1,z=!0){return!!(K||q.canRemoveFloor()&&this.canAddFloor())&&(this.pushFloor(q.removeFromBottom(!1),z),q.isActiveTower&&0===q.floors.length&&(this.isActiveTower=!0),!0)}moveFloorTo(q,K=!1,z=!0){return!!(K||this.canRemoveFloor()&&q.canAddFloor())&&(q.addFloor(this._floors.pop(),!1),q.isActiveTower&&(this.isActiveTower=!1),z&&this.notifyUpdate(Q.L.TOWER_MOVE_FLOOR),!0)}getFloatlings(){const q=[];for(let K=0;Kq.getFloatlingsInState(Z.a.Wandering))).filter((q=>q)))}removeFromTop(){const q=this._floors.pop();this.unregisterFloorHandler(q),this.notifyUpdate(Q.L.TOWER_REMOVE_FLOOR)}removeFromBottom(q=!0){const K=this._floors.shift();return this.unregisterFloorHandler(K),q&&this.notifyUpdate(Q.L.TOWER_REMOVE_FLOOR),K}removeFloors(q,K,z=!0){this._floors.splice(q,K).forEach((q=>{this.unregisterFloorHandler(q)})),z&&this.notifyUpdate(Q.L.TOWER_REMOVE_FLOOR)}addFloor(q,K=!0){this._floors.unshift(q),K&&this.notifyUpdate(Q.L.TOWER_CREATE_FLOOR,{skillID:q.skillID,isInfinityTower:this.isInfinityTower})}pushFloor(q,K=!0,z=!1){if(this.canAddFloor()){const X=(0,Y.last)(this._floors);return z&&X&&X.state!==tt.u.Complete?(this._floors.pop(),this._floors.push(q),this._floors.push(X)):this._floors.push(q),this.registerFloorHandler(q),K&&this.notifyUpdate(Q.L.TOWER_PUSH_FLOOR),!0}return!1}registerFloorHandler(q){q.onUpdate.add(this.handleUpdate.bind(this))}unregisterFloorHandler(q){q.onUpdate.remove(this.handleUpdate.bind(this))}}it.MINIMUM_FLOOR_COUNT=3,it.MAXIMUM_FLOOR_COUNT=28},94909:(q,K,z)=>{"use strict";z.d(K,{J:()=>et});var Y=z(95891),Q=z(90736),X=z(96417),Z=z(39666),J=z(43844),tt=z(80070);class et extends tt.v{get towers(){return this._towers}get floors(){return(0,Y.flatten)(this.towers.map((q=>q.floors)))}constructor(){super(),this._towers=[],this.isTutorialTown=!1,this._infinityTower=null,this._floatlingsScared=!1,this.onUpdate.add(this.handleTowerUpdate.bind(this))}init(q=!1){const K=(0,Y.last)(this.floors);K&&K.state===Z.u.RooftopMastery&&(this._floatlingsScared=!0,this.setAllFloatlingsState(X.a.ScaredAway)),this.isTutorialTown=q}canCreateTower(q){if(this._towers.length===et.MAX_TOWERS)return!1;return(et.MAX_TOWERS-this._towers.length)*J.o.MAXIMUM_FLOOR_COUNT>=q}get skillCount(){return(0,Y.sumBy)(this.towers,(q=>q.floors.length))}get infinityTower(){return this._infinityTower}getPage(q,K){const z=Math.max(0,q)*K;return this._towers.slice(z,z+K)}getPageCount(q){const K=Math.max(1,q);return Math.ceil(this._towers.length/K)}createTower(){const q=new J.o;return this._towers.push(q),this.registerTowerHandler(q),this.notifyUpdate(Q.L.TOWN_CREATE_TOWER),q}removeTower(){const q=this._towers.pop();this.notifyUpdate(Q.L.TOWN_REMOVE_TOWER),this.unregisterTowerHandler(q)}createInfinityTower(){return this._infinityTower||(this._infinityTower=new J.o(!0)),this.registerTowerHandler(this._infinityTower),this.notifyUpdate(Q.L.TOWN_CREATE_INFINITY_TOWER),this._infinityTower}getWanderingFloatlings(){return(0,Y.flatten)(this.towers.map((q=>q.getWanderingFloatlings())))}getAllFloatlings(){return(0,Y.flatten)(this.towers.map((q=>q.getFloatlings())))}pushTower(q){this._towers.push(q),this.registerTowerHandler(q),this.notifyUpdate(Q.L.TOWN_PUSH_TOWER)}getIndexesOfFloor(q){const K={floorIndex:-1,towerIndex:-1};for(let z=0;z=0){K.towerIndex=z;break}return K}setAllFloatlingsState(q){this.floors.forEach((K=>{K.floatlings.forEach((K=>{K.state=q}))}))}registerTowerHandler(q){q.onUpdate.add(this.handleUpdate.bind(this))}unregisterTowerHandler(q){q.onUpdate.remove(this.handleUpdate.bind(this))}handleTowerUpdate(q){switch(q.getFinalNotification().type){case Q.L.TOWN_CREATE_TOWER:this.towers.length>1&&(this.towers[this.towers.length-2].isActiveTower=!1);break;case Q.L.TOWN_REMOVE_TOWER:this.towers.length>0&&(this.towers[this.towers.length-1].isActiveTower=!0);break;case Q.L.FLOOR_SET_STATE:q.getLastChild().source.state===Z.u.RooftopMastery?(this._floatlingsScared=!0,this.setAllFloatlingsState(X.a.ScaredAway)):this._floatlingsScared&&(this._floatlingsScared=!1,this.setAllFloatlingsState(X.a.Asleep))}}}et.MAX_TOWERS=14},80070:(q,K,z)=>{"use strict";z.d(K,{v:()=>tt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(90736),J=z(51365);let tt=class{constructor(){this._onUpdate=new Q.HN0}get onUpdate(){return this._onUpdate}notifyUpdate(q,K){this.onUpdate.dispatch(new J.L(this,q,null,K))}handleUpdate(q){const K=new J.L(this,Z.L.BREADCRUMB,q);return this._onUpdate.dispatch(K),K}};tt=(0,Y.Cg)([(0,X.injectable)()],tt)},66930:(q,K,z)=>{"use strict";z.d(K,{V:()=>at});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(35120),J=z(51477),tt=z(90736),et=z(80070),it=z(64794),st=z(15678);class nt{static isTypeBasicOrGameChallenge(q,K){return K.isDefaultSkillSelectionType(q)||K.isAlgorithmTypeGameChallenge(q)}static getSkills(q){return q.skills?q.skills.filter((q=>st.g.isAvailable(q))):[]}static getBasicAlgorithm(q){return q.getBasicAlgorithm()}static getCurrentAlgorithm(q){return q.getNextAlgorithm()}static openQuestionAtSkill(q,K,z=!1,Y){q.showGameChallenge(K,it.D.GAME_CHALLENGE_SCENARIO_ID,0,!1,0,0,Y,z)}static openQuestion(q,K=!1,z){q.question(z,{forceAnswerBonus:!1,energyCost:0,allowTutorials:!0,canInstantWin:!1,isUserInBattle:!1,disableLock:K})}}let at=class extends et.v{getEducationSystemAPI(){const q=this._externalFactory.getEducationSystemAPI();if(!q)return Q.VyI.log("Trying to use education system API in a non-math context.",Q.$bb.Error),null;const K=q.getNextAlgorithm().type;return this._currentAlgorithmType!==K&&(this._currentAlgorithmType=K,this.notifyUpdate(tt.L.EDUCATION_SET_ALGORITHM,K)),q}constructor(q){super(),this._externalFactory=null,this._externalFactory=Z.q.instance.prodigy.education}getGrade(){return this.getEducationSystemAPI().getAlgorithmGrade()}openQuestionInterface(q,K,z,Y){const Q=q?this.getNextSkill():this.getSkillById(K),X=(q,K,z)=>{const X=Q?Q.ID:null,Z=this.getSkillById(X);this.notifyUpdate(tt.L.EDUCATION_QUESTION_ANSWER,Z),this.notifyUpdate(q?tt.L.EDUCATION_QUESTION_ANSWER_CORRECT:tt.L.EDUCATION_QUESTION_ANSWER_INCORRECT,Z),this.notifyUpdate(tt.L.EDUCATION_QUESTION_INTERFACE_CLOSE,Z),this.notifyUpdatesIfSkillChanged(Q,Z),Y&&Y(q,K,z,!1,!1,Z)};q?nt.openQuestion(this._externalFactory,z,X):Q?nt.openQuestionAtSkill(this._externalFactory,K,z,X):Y&&Y(!0),this.notifyUpdate(tt.L.EDUCATION_QUESTION_INTERFACE_OPEN,Q)}getNextSkill(){return this.getEducationSystemAPI().getNextAlgorithm().nextSkill}isCurrentAlgorithmBasicOrGameChallenge(){return nt.isTypeBasicOrGameChallenge(this._currentAlgorithmType,this.getEducationSystemAPI())}getMobileUnfriendlySkillIds(){return this.getEducationSystemAPI().nonMobileFriendlySkillIds}getSkills(){const q=this.getEducationSystemAPI(),K=nt.getBasicAlgorithm(q);return nt.getSkills(K).filter((K=>st.g.isSkillIdMobileFriendly(K.ID,q.nonMobileFriendlySkillIds)))}getSkillsByGrade(q){return st.g.getSkillsByGrade(this.getSkills(),q)}getCurrentSkillByGrade(q){return st.g.getCurrentSkillByGrade(this.getSkills(),q)}getSkillsMasteredByGrade(q){return st.g.getSkillsMasteredByGrade(this.getSkills(),q)}getPendingSkillsByGrade(q){return st.g.getPendingSkillsByGrade(this.getSkills(),q)}getSkillById(q){const K=this.getEducationSystemAPI().getAllAlgorithmSkills();return st.g.getSkillById(K,q)}notifyUpdatesIfSkillChanged(q,K){q&&K&&q.ID===K.ID&&(st.g.determineJustLocked(q,K)&&this.notifyUpdate(tt.L.EDUCATION_SKILL_LOCKED,K),st.g.determineJustUnlocked(q,K)&&this.notifyUpdate(tt.L.EDUCATION_SKILL_UNLOCKED,K),st.g.determineJustMastered(q,K)&&this.notifyUpdate(tt.L.EDUCATION_SKILL_MASTERED,K))}};at=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("d73-66e9")),(0,Y.Sn)("design:paramtypes",[J.n])],at)},42862:(q,K,z)=>{"use strict";z.d(K,{s:()=>nt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z(35120),tt=z(51477),et=z(64794),it=z(90736),st=z(37747);let nt=class{get educationApi(){return this._educationApi||(this._educationApi=J.q.instance.prodigy.education.getEducationSystemAPI(),this._educationApi||Q.VyI.log("Trying to use education system API in a non-math context.",Q.$bb.Error)),this._educationApi}constructor(q){this._game=q}handleNotification(q,K){const z=this.getNotification(K),Y=this.getTowerID(q),X=this.getActiveFloorID(q);switch(z.type){case it.L.TOWER_TOWN_FLOATLING_FLING_START:J.q.instance.prodigy.gameContainer.get("20f-5f67").economy.sendMinigameEvent("floatling-fling",!0);break;case it.L.TOWER_TOWN_FLOATLING_FLING_END:J.q.instance.prodigy.gameContainer.get("20f-5f67").economy.sendMinigameEvent("floatling-fling",!1);break;case it.L.FLOOR_AWARD_FLOATLINGS:const K=z.value;J.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.towerTownEvents.sendFloatlingCreatedEvent(K.element,K.floatlingCount);break;case it.L.FLOOR_START_BUILDING:const Z={towerID:Y,floorID:X,isInfinityFloor:q.isInfinity,algorithmType:q.isInfinity?this.getAlgoType():q.currentGrade};J.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.towerTownEvents.sendFloatlingFloorCreatedEvent(Z);break;case it.L.TOWN_CREATE_TOWER:J.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.towerTownEvents.sendFloatlingTowerCreatedEvent(Y);break;case it.L.TOWER_COMPLETED:const tt=q.currentTown.towers[Y].floors.length;J.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.towerTownEvents.sendFloatlingTowerCompletedEvent(Y,tt);break;case it.L.TOWER_ROOM_BUILT:const et=Q.Aq$.isDefined(q.stateManager.switchParams.quickRenoFloor),st=et?q.stateManager.switchParams.quickRenoFloor:q.activeFloor,nt=[];for(let q=0;q{"use strict";z.d(K,{w:()=>ht});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(35120),J=z(51477),tt=z(70399),et=z(95891);class it{static deepKeyRename(q,K){return this.deepMapKeys(q,(q=>K[q]||q))}static deepMapKeys(q,K){if(!et.isObject(q))return q;const z=q=>q.map((q=>this.deepMapKeys(q,K))),Y=q=>this.deepMapKeys(q,K);return Object.keys(q||{}).reduce(((Q,X)=>{const Z=et.isArray(q[X])?z(q[X]):et.isObject(q[X])?Y(q[X]):q[X];return Object.assign(Object.assign({},Q),{[K(X)]:Z})}),{})}}const st={blockCount:1,decorations:2,element:3,explorerLevel:4,floatlings:5,floors:6,frameID:7,gearElement:8,hasShroud:9,infinityTower:10,isActiveTower:11,isExternalBuild:12,isInfinityTower:13,lastThrown:14,numSpells:15,personality:16,roomID:17,sideWalkAssetID:18,skillID:19,towers:20,type:21};class nt{static compressKeys(q){return it.deepKeyRename(q,st)}static decompressKeys(q){return it.deepKeyRename(q,et.invert(st))}}var at,rt=z(73678),ot=z(6191);let ht=at=class{constructor(q,K){this._serializer=K}getTown(q){const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return this._serializer.deserialize(nt.decompressKeys(K.state.get(this.getTownPath(q))))}getTownIDs(){const q=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return Q.Aq$.isDefined(q.state.get(`zone-${at.TOWERTOWER_ZONE}-towns`))?Object.keys(q.state.get(`zone-${at.TOWERTOWER_ZONE}-towns`)):[]}setTown(q,K){const z=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=this._serializer.serialize(K);Y&&z.state.set(this.getTownPath(q),nt.compressKeys(Y))}getTownPath(q){return`zone-${at.TOWERTOWER_ZONE}-towns-${q}`}};ht.TOWERTOWER_ZONE=rt.A_.TOWERTOWN,ht=at=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("d73-66e9")),(0,Y.Qj)(1,(0,X.inject)(tt.G.StorageSerializer)),(0,Y.Sn)("design:paramtypes",[J.n,ot.Y])],ht)},6191:(q,K,z)=>{"use strict";z.d(K,{Y:()=>nt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z(64794),tt=z(96417),et=z(39666),it=z(94909);class st{static log(q,K){Q.VyI.log(`- TOWER TOWN - ${q}`,K)}}let nt=class{serialize(q){if(!q)return st.log("Could not serialize town in StorageSerializer because it was null",Q.$bb.Verbose),null;const K=null!==q.infinityTower?this.serializeTower(q.infinityTower):void 0;return{towers:q.towers.length>0?Array.from(Z.map(q.towers,this.serializeTower.bind(this))):void 0,infinityTower:K}}deserialize(q){return q||st.log("Could not deserialize townState in StorageSerializer because it was null",Q.$bb.Verbose),q?this.deserializeTown(q):null}serializeTower(q){return{sideWalkAssetID:q.sideWalkAssetID,isInfinityTower:q.isInfinityTower,isActiveTower:q.isActiveTower,decorations:q.ornaments.count>0?this.serializeDecorContainer(q.ornaments):void 0,floors:q.floors.length>0?Array.from(Z.map(q.floors,this.serializeFloor.bind(this))):void 0}}serializeFloor(q){const K=q.roomID,z=q.skillID,Y=q.frameID,Q=q.blockCount,X=q.isExternalBuild,J=q.state,tt=q.hasShroud;return{roomID:K,skillID:z,frameID:Y,blockCount:Q,isExternalBuild:X,type:J,decorations:0!==q.decorations.count?this.serializeDecorContainer(q.decorations):void 0,floatlings:q.floatlings&&q.floatlings.length>0?Array.from(Z.map(q.floatlings,this.serializeFloatling.bind(this))):void 0,numSpells:0,hasShroud:tt}}serializeDecorContainer(q){const K=[],z=q.keys;return Z.forEach(z,(z=>{const Y=q.getAt(z).assetID;K.push({slot:z,assetID:Y})})),K}serializeFloatling(q){return{gearElement:q.gearElement,explorerLevel:q.explorerLevel,lastThrown:q.lastThrown,personality:q.personality,element:q.element}}deserializeTown(q){const K=new it.J;if(q.infinityTower){const z=K.createInfinityTower();this.deserializeTower(z,q.infinityTower)}return q.towers&&q.towers.length>0&&this.deserializeTowers(K,q.towers),K}deserializeTowers(q,K){Z.forEach(K,(K=>{const z=q.createTower();this.deserializeTower(z,K)}))}deserializeTower(q,K){q.sideWalkAssetID=K.sideWalkAssetID,q.isInfinityTower=K.isInfinityTower,q.isActiveTower=K.isActiveTower,this.deserializeDecorations(q.ornaments,K.decorations),this.deserializeFloors(q,K.floors)}deserializeDecorations(q,K){K&&Z.forEach(K,(K=>{Q.Aq$.isDefined(K.atlasID)&&!Q.Aq$.isDefined(K.assetID)?q.setAt(K.slot,K.atlasID):(K.atlasID=void 0,q.setAt(K.slot,K.assetID))}))}deserializeFloors(q,K){K&&K.length>0&&Z.forEach(K,(K=>{const z=q.createFloor(K.skillID,K.isExternalBuild);this.deserializeDecorations(z.decorations,K.decorations),z.blockCount=K.blockCount,z.frameID=K.frameID,z.roomID=K.roomID,K.type===et.u.Complete&&z.blockCount0&&Z.forEach(K,(K=>{const z=new tt.b;this.shallowCopy(K,z),z.floor=q,q.pushFloatling(z)}))}shallowCopy(q,K){for(const z in q)K[z]=q[z]}};nt=(0,Y.Cg)([(0,X.injectable)()],nt)},41340:(q,K,z)=>{"use strict";z.d(K,{Y:()=>et});var Y=z(8674),Q=z(79687),X=z(35120),Z=z(51477),J=z(64794),tt=z(59510);let et=class{constructor(q){this._breadcrumbManager=X.q.instance.prodigy.breadcrumbManager}completeBreadcrumb(q){this._breadcrumbManager.completeBreadcrumb(J.D.FEATURE_NAME,q)}isBreadcrumbComplete(q){return this._breadcrumbManager.isBreadcrumbComplete(J.D.FEATURE_NAME,q)}resetBreadcrumb(q){this._breadcrumbManager.resetBreadcrumb(J.D.FEATURE_NAME,q)}resetBreadcrumbs(){this._breadcrumbManager.resetBreadcrumbs(J.D.FEATURE_NAME)}init(){this._breadcrumbManager.breadcrumbConfig.addFeature(J.D.FEATURE_NAME).addBreadcrumb(tt.M.DefaultItemsReceived,0).addBreadcrumb(tt.M.ShroudTutorialCompleted,1).addBreadcrumb(tt.M.FlingTutorialComplete,2).addBreadcrumb(tt.M.TutorialCompleted,3).addBreadcrumb(tt.M.ShroudTutorialFirstTime,4).addBreadcrumb(tt.M.FlingUnlocked,5).addBreadcrumb(tt.M.StoreFirstPurchaseComplete,6).addBreadcrumb(tt.M.DefaultFramesReceived,7).addBreadcrumb(tt.M.StubbornShadowTutorialOneCompleted,8).addBreadcrumb(tt.M.StubbornShadowTutorialTwoCompleted,9)}};et=(0,Y.Cg)([(0,Q.injectable)(),(0,Y.Qj)(0,(0,Q.inject)("d73-66e9")),(0,Y.Sn)("design:paramtypes",[Z.n])],et)},59510:(q,K,z)=>{"use strict";var Y;z.d(K,{M:()=>Y}),function(q){q.DefaultItemsReceived="DefaultItemsReceived",q.TutorialCompleted="TutorialComplete",q.ShroudTutorialFirstTime="ShroudTutorialFirstTime",q.ShroudTutorialCompleted="ShroudTutorialCompleted",q.FlingUnlocked="FlingUnlocked",q.FlingTutorialComplete="FlingTutorialComplete",q.StoreFirstPurchaseComplete="StoreFirstPurchaseComplete",q.DefaultFramesReceived="DefaultFramesReceived",q.StubbornShadowTutorialOneCompleted="StubbornShadowTutorialOneCompleted",q.StubbornShadowTutorialTwoCompleted="StubbornShadowTutorialTwoCompleted"}(Y||(Y={}))},25863:(q,K,z)=>{"use strict";z.d(K,{Y:()=>it});var Y=z(8674),Q=z(79687),X=z(30405),Z=z(70399),J=z(64794),tt=z(43531);class et{constructor(q,K){this._events=[],this._showGuideHand=K,this._controller=new tt.rD(q)}addDialogue(q,K=!0,z=null){return this._events.push({dialogueConfig:{dialogueData:this._controller.dataProvider.get(q),blockInput:K},condition:z}),this}addAction(q,K=null){return this._events.push({dialogueConfig:{callback:q},condition:K}),this}addGuideHand(q,K=0,z=0){return this.addAction((()=>{this._showGuideHand.addGuideHand(q,K,z)})),this}removeGuideHand(q){return this.addAction((()=>{this._showGuideHand.removeGuideHand(q)})),this}start(q,K){const z=[];for(let Y=0;Y{"use strict";z.d(K,{m:()=>Xe});var Y=z(35120),Q=z(11624),X=z(87820),Z=z(70399),J=z(64794),tt=z(73678),et=z(62459),it=z(56942),st=z(85855),nt=z(40295),at=z(73797),rt=z(75214),ot=z(87337),ht=z(79340),ct=z(93867);class dt extends ht.Z{constructor(q,K){super(q,"A1",K.concat([it.Q.Spine_shadowportal_json,st.V.Bgm_towertown,st.V.Bgm_floatlingfling]),"towertown-default-2")}setup(q,K,z){super.setup(q,K,z)}start(q,K){super.start(q,K,this.zone.bgmID),q.broadcaster.broadcast(at.Y1.HideHUD,at.HG.HUD);const z=Y.q.instance.prodigy.gameContainer.get(et.$Bt.IFSMController),Q=Y.q.instance.prodigy.gameContainer.get(et.$Bt.FSMService),X=ct.U.isStepComplete(nt.B.PuppetMasterDefeated);this._puppet=X?new rt.p(q,"NPC_NAME_STUBBORN_SHADOW",239,ot.ac.Boss,K.content,640,260,"idle"):new rt.p(q,"NPC_NAME_PUPPETMASTER",it.Q.Spine_npc_puppetmaster_json,ot.ac.Boss,K.content,640,320,"idle"),z.execute(Q.getStateMachine(200),{game:q,screen:K,scene:this,player:K.user,puppet:this._puppet,dialogueIDs:X?[1452,1453]:[918,919],path:K.path,pathfinder:K.path,isPuppetMaster:!X})}cleanup(){this._puppet&&(this._puppet.destroy(),this._puppet=null),super.cleanup()}tweenPuppet(){Y.q.instance.game.add.tween(this._puppet,this).to({x:1400},dt._walkTweenMS).start()}}dt._walkTweenMS=1700;var lt=z(8674),ut=z(95891),ft=z(88022),bt=z(60881),pt=z(75781),vt=z(68910),gt=z(43844),mt=z(15678);class yt{constructor(q,K,z){this._currentState=null,this._states=new Map,this._mathTower=q,this._mathTower.stateManager=this,this._prefabLoader=K,this._map=z,this._localizer=Y.q.instance.prodigy.gameContainer.get(et.$Bt.LocalizationService),this._dialogueController=Y.q.instance.prodigy.dialogue.create(),this._switchParams={}}addState(q,K){this._states.set(q,K),K.init(this)}changeToState(q,K={}){this._states.has(q)&&(this._switchParams=K,et.Aq$.isDefined(this._currentState)&&this._currentState.onExit(q),this._currentState=this._states.get(q),this._currentState.onEnter())}update(){this._currentState.onUpdate}get states(){return this._states}get currentState(){return this._currentState}get mathTower(){return this._mathTower}get switchParams(){return this._switchParams}get prefabLoader(){return this._prefabLoader}get localizer(){return this._localizer}get dialogueController(){return this._dialogueController}nextTowerAvailable(){const q=this._mathTower.currentTown,K=q.towers.length>0,z=q.towers[q.towers.length-1].floors.length>=gt.o.MINIMUM_FLOOR_COUNT,Y=this._mathTower.education.getPendingSkillsByGrade(this._mathTower.getGrade()),Q=q.canCreateTower(Y.length);return!K||z&&Q}nextFloorPosition(q=!1){if(this.mathTower.isInfinity)return this.nextInfinityFloorPosition();const K=this._mathTower.currentTown;let z=0===K.towers.length?0:K.towers.length-1,Y=0===K.towers.length?0:K.towers[z].floors.length;return K.towers.length>0&&!K.towers[z].canAddFloor()&&!q&&(z++,Y=1),this.getFloorPosition(z,Y)}moveToNextFloor(q=!1){const K=this._mathTower.currentTown;let z=0===K.towers.length?0:K.towers.length-1,Y=0===K.towers.length?0:K.towers[z].floors.length;K.towers.length>0&&!K.towers[z].canAddFloor()&&!q&&(z++,Y=1),this._map.townRenderer.moveToFloor(z,Y)}nextInfinityFloorPosition(){return new vt.Point(-Y.q.instance.game.width*J.D.RENDERER_OFFSET_PERCENTAGE_INFINITY_TOWER,J.D.TOWER_BASE_Y-J.D.FLOOR_HEIGHT*this.mathTower.currentTown.infinityTower.floors.length)}getFloorPosition(q,K){const z=this._mathTower.game.width*J.D.RENDERER_JUMP_PERCENTAGE,Y=this._mathTower.game.width*J.D.RENDERER_OFFSET_PERCENTAGE;return new vt.Point(q*z+Y,J.D.TOWER_BASE_Y-J.D.FLOOR_HEIGHT*K)}getCameraPosition(){return new et.I9Y(this._map.pageCamera.x,this._map.pageCamera.y)}isSkillMastered(q){const K=this._mathTower.education.getSkillById(q);return mt.g.isSkillMastered(K)}isSkillLocked(q){const K=this._mathTower.education.getSkillById(q);return mt.g.isSkillLocked(K)}get map(){return this._map}}var _t,Et=z(90736),wt=z(34603),Tt=z(29834),St=z(28402),At=z(76945),Ct=z(96417),Ot=z(51365);!function(q){q.IDLE="idle",q.WALK="walk",q.SLEEP="sleep"}(_t||(_t={}));class It extends et.uAl{constructor(){super(...arguments),this.researchScore=1}get activeTween(){return this._activeTween}set activeTween(q){this._activeTween&&this._activeTween.onDestroy.removeAll(this),this._activeTween=q,this._activeTween.onDestroy.add(this.onActiveTweenDestroyed,this)}set floatling(q){this._floatling!==q&&(this._floatling=q,this._floatling.onUpdate.add(this.updateFloatlingState,this),this.spine.setAsset(q.spineID,(()=>{this.animator.create(),this.walkTarget=null,this._researchPoint.setAsset(J.D.ATLAS_RESEARCH_POINTS,q.researchPointID),this._elementType=J.D.ELEMENT_STRINGS.indexOf(q.element),this.researchScore=q.explorerLevel+1,this.updateFloatlingState(new Ot.L(q,Et.L.FLOATLING_SET_STATE)),this.onFloatingAssetLoaded.dispatch()})))}get floatling(){return this._floatling}get spine(){return this._spine}get elementType(){return this._elementType}get walkTarget(){return this._walkTarget}set walkTarget(q){this._walkTarget=q,q?(this.playAnimation(_t.WALK),q.x>this.GameObject.legacyTransform.x?this.GameObject.legacyTransform.group.scale.set(1,1):this.GameObject.legacyTransform.group.scale.set(-1,1)):this.playAnimation(_t.IDLE)}get waitingToDescend(){return this._waitingToDescend}set waitingToDescend(q){this._waitingToDescend=q}playAnimation(q,K=!0){this.animator.playAnimation(q,K)}create(){super.create(),this._game=Y.q.instance.game;const q=new et._mx(this.GameObject);q.addComponent(et.K16),this._spine=q.addComponent(St.v),this.animator=this.spine.GameObject.addComponent(Tt.j);const K=new et._mx(this.GameObject);K.addComponent(et.K16),this._researchPoint=K.addComponent(wt._),this._researchPoint.GameObject.legacyTransform.y=30,this._researchPoint.setAnchor(.5,1),this._researchPoint.GameObject.active=!1,this._waitingToDescend=!1,this.onFloatingAssetLoaded=new et.HN0}destroy(){this.onFloatingAssetLoaded.dispose(),super.destroy()}onDisable(){super.onDisable(),window.clearTimeout(this._floatDownTimerHandle),this.activeTween&&this.activeTween.stop(!1),this._game.time.events.remove(this._walkTargetTimerEvent),this._walkTargetTimerEvent=null,this._wanderBounds=null,this._floatling&&this._floatling.onUpdate.removeAll(this)}set researchPointVisible(q){this._researchPoint.GameObject.active=q}get researchPointVisible(){return this._researchPoint.GameObject.active}startWandering(q,K=!0){this._wanderBounds=q,this.setRandomWalkTarget(),K&&this.GameObject.legacyTransform.group.position.copyFrom(this.walkTarget)}setRandomWalkTarget(){this._game.time.events.remove(this._walkTargetTimerEvent),this._walkTargetTimerEvent=null,et.Aq$.isDefined(this._wanderBounds)&&(this.walkTarget=new et.I9Y(At.o.integerInRange(this._wanderBounds.x,this._wanderBounds.width+this._wanderBounds.x),At.o.integerInRange(this._wanderBounds.y,this._wanderBounds.height+this._wanderBounds.y)))}update(){switch(super.update(),this.floatling.state){case Ct.a.Wandering:this.updateWalk();break;case Ct.a.Floating:this.updateFloat()}}updateFloat(){var q;this._activeTween&&(null===(q=this.GameObject)||void 0===q?void 0:q.legacyTransform)&&this.walkTarget&&(this.GameObject.legacyTransform.y+=J.D.FLOATLING_FLOAT_PIXELS_PER_SECOND*this._game.time.deltaMS*.001,this.GameObject.legacyTransform.y>this.walkTarget.y&&(this._activeTween.stop(!1),this._activeTween=null,this.floatling.state=Ct.a.Wandering,this._onFinishFloatDown&&this._onFinishFloatDown(),this._onFinishFloatDown=null))}updateWalk(){if(et.Aq$.isDefined(this._walkTarget)){const q=new et.I9Y(this._walkTarget.x-this.GameObject.legacyTransform.group.position.x,this._walkTarget.y-this.GameObject.legacyTransform.group.position.y);let K=J.D.FLOATLING_WALK_PIXELS_PER_SECOND*this._game.time.deltaMS*.001;K>q.getMagnitude()?(this.GameObject.legacyTransform.group.position.copyFrom(this._walkTarget),this.walkTarget=null,this._walkTargetTimerEvent=this._game.time.events.addTimer(this.getWalkDelay(),this.setRandomWalkTarget,this)):(K=Math.min(K,q.getMagnitude()),q.normalize(),q.multiply(new et.I9Y(K,K)),this.GameObject.legacyTransform.group.position.set(this.GameObject.legacyTransform.group.position.x+q.x,this.GameObject.legacyTransform.group.position.y+q.y))}}getWalkDelay(){return At.o.integerInRange(J.D.FLOATLING_WALK_MIN_IDLE_MS,J.D.FLOATLING_WALK_MAX_IDLE_MS)}floatDown(q,K,z){this.floatling.state=Ct.a.Floating,this._onFinishFloatDown=z;let Y=0;if(!K){this.GameObject.legacyTransform.x=this.GameObject.legacyTransform.x-J.D.FLOATLING_FLOAT_HALF_ARC_WIDTH,this.GameObject.legacyTransform.group.visible=!1;const q=Date.now();Y=At.o.realInRange(J.D.FLOATLING_FLOAT_MIN_DELAY_MS,J.D.FLOATLING_FLOAT_MAX_DELAY_MS),It.lastFloatlingSendTime+J.D.FLOATLING_FLOAT_LAST_FLOATED_OFFSET_MS>q&&(Y+=It.lastFloatlingSendTime+J.D.FLOATLING_FLOAT_LAST_FLOATED_OFFSET_MS-q),It.lastFloatlingSendTime=Y+q}this._walkTarget=new et.I9Y(this.GameObject.legacyTransform.x,q),window.clearTimeout(this._floatDownTimerHandle),this._waitingToDescend=!0,this._floatDownTimerHandle=window.setTimeout(this.beginTweenSideToSide.bind(this,this.GameObject.legacyTransform.x+J.D.FLOATLING_FLOAT_HALF_ARC_WIDTH,K),Y)}beginTweenSideToSide(q,K){this._activeTween&&this._activeTween.stop(),this.playAnimation(_t.IDLE),this.GameObject.legacyTransform.group.visible=!0,K||(this.GameObject.legacyTransform.y=et.i7d.main.viewMatrix.ty+At.o.realInRange(J.D.FLOATLING_FLOAT_MIN_START_Y_OFFSET,J.D.FLOATLING_FLOAT_MAX_START_Y_OFFSET)),this._waitingToDescend=!1,this._activeTween=this._game.add.tween(this.GameObject.legacyTransform,this).to({x:q},1e3,et.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start()}updateFloatlingState(q){if(q.getFinalNotification().type===Et.L.FLOATLING_SET_STATE)switch(q.getFinalNotification().source.state){case Ct.a.ScaredAway:this.playAnimation(_t.IDLE),this._game.add.tween(this.GameObject.legacyTransform.group,this).to({y:et.i7d.main.viewMatrix.ty-et.i7d.main.viewportSize.height+100,alpha:0},J.D.FLOATLING_FLY_AWAY_MS,et.GS3.Quadratic.In,!0).onTweenComplete.add((()=>{this.GameObject.active=!1}));break;case Ct.a.Asleep:this.playAnimation(_t.SLEEP)}}onActiveTweenDestroyed(){this._activeTween=null}}It.lastFloatlingSendTime=0;var Dt=z(20748),Rt=z(39666),Pt=z(25735);class Mt{init(q){this._owner=q,this._mathTower=q.mathTower}onEnter(){}onExit(){}onUpdate(){}switchState(q,K={}){this._owner.changeToState(q,K)}}class Nt extends Mt{constructor(){super(...arguments),this._defaultReturnState=J.D.STATE_CAMERA,this._activeFloor=null,this._floorPosition=null}onEnter(){this._activeFloor=this._owner.switchParams.quickRenoFloor,et.Aq$.isDefined(this._activeFloor)||(this._activeFloor=this._mathTower.activeFloor),this._buildInterface=this.getBuildInterface(),this._quitButtonObject=this._owner.prefabLoader.loadFromGUID(J.D.UI_CORNER_PREFAB,Y.q.instance.prodigy.open.menusGameObject),this._quitButton=this._quitButtonObject.findComponent(Pt.I).quitButton,this._buildInterface.onCreate.add(this.prefabCreated.bind(this)),this._buildInterface.floorFinishedSignal.add(this.floorFinished.bind(this)),this._buildInterface.wrongAnswerSignal.add(this.wrongAnswer.bind(this)),this._buildInterface.onBuildAnimationComplete.add(this.buildAnimationFinished.bind(this)),this._floorPosition=this._activeFloor.isRenovating?this._owner.switchParams.position:this._owner.nextFloorPosition();const q=new et.I9Y;q.x=this._floorPosition.x-et.i7d.main.viewMatrix.tx,q.y=this._floorPosition.y-et.i7d.main.viewMatrix.ty+60,this._flagpoleSpine=Y.q.instance.prodigy.create.spine(q.x,q.y,J.D.SPINE_FLAGPOLE,this._mathTower.uiFactory.screen.foreground),this._flagpoleSpine.visible=!1,this.spawnScrim()}spawnScrim(){const q=this._mathTower.currentTown.getIndexesOfFloor(this._activeFloor);this._mathTower.uiFactory.spawnScrim(q.towerIndex,q.floorIndex)}getBuildInterface(){if(!this._activeFloor.isRenovating)return this._floorPosition=this._owner.nextFloorPosition(),this._owner.mathTower.uiFactory.buildInterface(this._floorPosition);this._floorPosition=this._owner.switchParams.position;const q=this._activeFloor;return this._owner.mathTower.uiFactory.buildInterface(this._floorPosition,q)}onExit(){this._buildInterface.close(),this._quitButton.onClick.removeAll(),this._quitButtonObject.destroy(),this._mathTower.uiFactory.despawnScrim()}prefabCreated(){this._quitButton.onClick.add(this.quitButtonClicked.bind(this)),this._buildInterface.buildButton.onClick.add(this.buildButtonClicked.bind(this)),this._activeFloor.hasMaxBlocks?this.floorFinished():this.buildButtonClicked()}quitButtonClicked(){if(Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._activeFloor.isRenovating){const q=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this._activeFloor.decorations.flush().forEach((K=>{q.backpack.add(J.D.ASSET_TYPE_DECORATION,K.assetID)})),this._activeFloor.setReadyForRenovation()}this.switchState(this._defaultReturnState)}buildButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._quitButton.inputEnabled=!1,this._buildInterface.buildFloor()}buildAnimationFinished(){this._quitButton.inputEnabled=!0}wrongAnswer(){if(this._quitButton.inputEnabled=!0,this._owner.isSkillLocked(this._activeFloor.skillID)){this._activeFloor.state=Rt.u.SkillLocked;const q=this._mathTower.currentTown.towers.length-1,K=this._mathTower.currentTown.towers[q].floors.length-1;this.switchState(J.D.STATE_SHROUD,{towerIndex:q,floorIndex:K})}}floorFinished(){let q=J.D.STATE_CAMERA;const K=this._mathTower.education.getSkillById(this._activeFloor.skillID);!K||mt.g.isSkillMastered(K)||this._activeFloor.isRenovating?(this.completeFloor(),this._flagpoleSpine.visible=!0,this._flagpoleSpine.addAnimationByName(0,J.D.FLAG_SMOKE_ANIMATION,!1),this._mathTower.uiFactory.tooltip(this._owner.localizer.getText(J.D.TOOLTIP_FLOOR_FINISHED),!0,J.D.FLOOR_FINISHED_TOOLTIP_WIDTH)):(this._activeFloor.state=Rt.u.RooftopMastery,q=J.D.STATE_ROOFTOP);const z=this._mathTower.currentTown.towers.length-1,Y=this._mathTower.currentTown.towers[z].floors.length-1;this._mathTower.fireEvent(Et.L.TOWER_ROOM_BUILT),this.switchState(q,{towerIndex:z,floorIndex:Y})}completeFloor(){Y.q.instance.prodigy.audio.playSFX(J.D.TOWER_TOWN_SFX_ID,J.D.COMPLETE_FLOOR),this._activeFloor.setComplete()}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],Nt.prototype,"quitButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],Nt.prototype,"buildButtonClicked",null);var xt,Lt=z(15521),kt=z(51972),Bt=z(59510);class Ut extends et.JTX{get x(){return this._x}set x(q){this._x=this.bounds?Math.max(this.bounds.left,Math.min(this.bounds.right-this.cameraWidth,q)):q,this._fakeCamera.viewMatrix.tx=this._x,this._fakeCamera.GameObject.transform.worldPosition.x=this._x,this._fakeCamera.GameObject.transform.onWorldMatrixChanged.dispatch(),this.gameObject.legacyTransform.x=-this._x}get y(){return this._y}set y(q){this._y=this.bounds?Math.max(this.bounds.top,Math.min(this.bounds.bottom-this.cameraHeight,q)):q,this._fakeCamera.viewMatrix.ty=this._y,this._fakeCamera.GameObject.transform.worldPosition.y=this._y,this._fakeCamera.GameObject.transform.onWorldMatrixChanged.dispatch(),this.gameObject.legacyTransform.y=-this._y}get bounds(){return this._bounds}set bounds(q){q?(this._bounds=et.M_G.clone(q),this.updateBounds()):this._bounds=q}get cameraWidth(){return this._game.width}get cameraHeight(){return this._game.height}constructor(){super(),this._x=0,this._y=0,this._bounds=new et.M_G(0,0,0,0),this._game=Y.q.instance.game}create(){super.create(),this._fakeCamera={viewMatrix:{ty:this.y,tx:this.x,isTranslateOnly:()=>!0},viewportSize:{height:this.cameraHeight,width:this.cameraWidth,getHalfWidth:()=>this.cameraWidth/2,getHalfHeight:()=>this.cameraHeight/2},GameObject:{transform:{worldPosition:{x:this.x,y:this.y},onWorldMatrixChanged:new et.HN0}},setCameraActive:()=>{}},et.i7d._main=this._fakeCamera,this._initialBounds=new et.M_G(0,0,this.cameraWidth,this.cameraHeight),this.bounds=et.M_G.clone(this._initialBounds)}destroy(){et.i7d._main=null,this.gameObject&&(this.gameObject.legacyTransform.x=0,this.gameObject.legacyTransform.y=0),super.destroy()}updateBounds(){this.x=this._x,this.y=this._y}}!function(q){q[q.UP=0]="UP",q[q.DOWN=1]="DOWN",q[q.LEFT=2]="LEFT",q[q.RIGHT=3]="RIGHT"}(xt||(xt={}));class Ft extends Ut{clearQueues(){this._verticalQueue=null,this._horizontalQueue=null}get CanMoveUp(){return this._canMoveUp}get CanMoveDown(){return this._canMoveDown}get CanMoveLeft(){return this._canMoveLeft}get CanMoveRight(){return this._canMoveRight}get onAtEdgeChanged(){return this._onAtEdgeChanged}get onBlockedMoveAttempt(){return this._onBlockedMoveAttempt}get onBeginHorizontalTween(){return this._onBeginHorizontalTween}get onBeginVerticalTween(){return this._onBeginVerticalTween}get onUpdateHorizontalTween(){return this._onUpdateHorizontalTween}get onUpdateVerticalTween(){return this._onUpdateVerticalTween}get onEndHorizontalTween(){return this._onEndHorizontalTween}get onEndVerticalTween(){return this._onEndVerticalTween}constructor(){super(),this._cameraTransitionTimeMS=300,this.transitionEase=et.GS3.Exponential.Out,this._onFullScrollComplete=new et.HN0,this._fullScrollH=!1,this._fullScrollV=!1,this._canMoveUp=!0,this._canMoveDown=!0,this._canMoveLeft=!0,this._canMoveRight=!0,this._onAtEdgeChanged=new et.HN0,this._onBlockedMoveAttempt=new et.HN0,this._onBeginHorizontalTween=new et.HN0,this._onBeginVerticalTween=new et.HN0,this._onUpdateHorizontalTween=new et.HN0,this._onUpdateVerticalTween=new et.HN0,this._onEndHorizontalTween=new et.HN0,this._onEndVerticalTween=new et.HN0,this.transitionDistance={x:Y.q.instance.game.width,y:Y.q.instance.game.height},this._signalBindings=[],this._canMoveLeft=!0,this._broadcaster=this._game.broadcaster}onEnable(){super.onEnable();for(let q=0;q{this.scrollUp(q)}:this.CanMoveUp?(this.scrollVertical(this.y-this.transitionDistance.y,0,q),this._broadcaster.broadcast(J.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(xt.UP)}scrollDown(q=!1){et.Aq$.isDefined(this._verticalTween)&&this._verticalTween.isRunning?this._verticalQueue=()=>{this.scrollDown(q)}:this.CanMoveDown?(this.scrollVertical(this.y+this.transitionDistance.y,0,q),this._broadcaster.broadcast(J.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(xt.DOWN)}scrollLeft(q=!1){et.Aq$.isDefined(this._horizontalTween)&&this._horizontalTween.isRunning?this._horizontalQueue=()=>{this.scrollLeft(q)}:this.CanMoveLeft?(this.scrollHorizontal(this.x-this.transitionDistance.x,q),this._broadcaster.broadcast(J.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(xt.LEFT)}scrollRight(q=!1){et.Aq$.isDefined(this._horizontalTween)&&this._horizontalTween.isRunning?this._horizontalQueue=()=>{this.scrollRight(q)}:this.CanMoveRight?(this.scrollHorizontal(this.x+this.transitionDistance.x,q),this._broadcaster.broadcast(J.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(xt.RIGHT)}scrollVertical(q,K=0,z=!1){if(!this.Active)return void this.cleanup();const Y=Math.min(this.bounds.bottom,Math.max(this.bounds.top,q));this.checkVerticalLimits(Y),this._verticalTween=this._game.add.tween(this,this).to({y:Y},this._cameraTransitionTimeMS,this.transitionEase,!0,K),this._verticalTween.onTweenComplete.add(this.onCompleteVertical.bind(this)),this.onBeginVerticalTween.dispatch(Y,z),this._verticalTween.onUpdate.add(this.onUpdateVerticalTween.dispatch,this.onUpdateVerticalTween)}scrollHorizontal(q,K=!1){if(!this.Active)return void this.cleanup();const z=Math.min(this.bounds.right-this.cameraWidth,Math.max(this.bounds.left,q));this.checkHorizontalLimits(z),this._horizontalTween=this._game.add.tween(this,this).to({x:z},this._cameraTransitionTimeMS,this.transitionEase,!0),this._horizontalTween.onTweenComplete.add(this.onCompleteHorizontal.bind(this)),this.onBeginHorizontalTween.dispatch(z,K),this._horizontalTween.onUpdate.add(this.onUpdateHorizontalTween.dispatch,this.onUpdateHorizontalTween)}scrollToPosition(q,K){this._fullScrollH=!1,this._fullScrollV=!1,this.scrollHorizontal(q),this.scrollVertical(K)}get onFullScrollCompleted(){return this._onFullScrollComplete}onCompleteVertical(){this._verticalTween=null,this.onEndVerticalTween.dispatch(),this._fullScrollV=!0,this._fullScrollH&&(this._onFullScrollComplete.dispatch(),this._fullScrollH=!1,this._fullScrollV=!1),this.checkVerticalLimits(this.y),this._verticalQueue&&(this._verticalQueue(),this._verticalQueue=null),this._broadcaster.broadcast(J.D.MESSAGE_ENABLE_BUTTON)}onCompleteHorizontal(){if(this._horizontalTween=null,this.onEndHorizontalTween.dispatch(),this._fullScrollH=!0,this._fullScrollV&&(this._onFullScrollComplete.dispatch(),this._fullScrollH=!1,this._fullScrollV=!1),this.checkHorizontalLimits(this.x),this._horizontalQueue)return this._horizontalQueue(),void(this._horizontalQueue=null);this._broadcaster.broadcast(J.D.MESSAGE_ENABLE_BUTTON)}blockedMoveAttempt(q){this.cleanup(),this.onBlockedMoveAttempt.dispatch(q)}cleanup(){this._broadcaster.broadcast(J.D.MESSAGE_ENABLE_BUTTON)}setTransitionDistanceScreenRatio(q,K){this.transitionDistance.x=this._game.width*q,this.transitionDistance.y=this._game.height*K}updateBounds(){super.updateBounds(),this.checkVerticalLimits(this.y),this.checkHorizontalLimits(this.x)}checkVerticalLimits(q=0){if(!this.bounds)return;const K=q>this.bounds.top&&this.cameraHeightthis.bounds.left&&this.cameraWidth0;this.shouldAddNewFloor()?this._shouldHaveShroud||this._shouldHaveShadow||!q||this.spawnAddFloorPrefab():this.spawnInProgressFloorPrefab();const K=this._owner.map.breadCrumbManager;if(this._shouldHaveShroud)this.spawnShroudCloud();else if(this._shouldHaveShadow){if(!K.isBreadcrumbComplete(Bt.M.StubbornShadowTutorialOneCompleted)){const q=this._mathTower.currentTown.towers.length-1,K=this._mathTower.currentTown.towers[q].floors.length-1;return void this.switchState(J.D.STATE_ROOFTOP,{towerIndex:q,floorIndex:K})}K.isBreadcrumbComplete(Bt.M.StubbornShadowTutorialTwoCompleted)||K.completeBreadcrumb(Bt.M.StubbornShadowTutorialTwoCompleted),this.spawnStubbornShadow()}this.bringHUDToTop(),this._hudInterface.forceEnabledLeft=!0,this._pageCamera.onBlockedMoveAttempt.add(this.onBlockedMoveAttempt,this),this._owner.switchParams.shroudComplete&&!K.isBreadcrumbComplete(Bt.M.ShroudTutorialCompleted)&&(K.completeBreadcrumb(Bt.M.ShroudTutorialCompleted),this._owner.dialogueController.addEvents([{callback:()=>{this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_DISABLE_NAVIGATION)}},{dialogueData:this._owner.dialogueController.dataProvider.get(J.D.DIALOGUE_SHROUD_FTUE_4),blockInput:!0},{callback:()=>{this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_ENABLE_NAVIGATION)}}]),this._owner.dialogueController.start(!0)),this._owner.moveToNextFloor(this._shouldHaveShadow),this._owner.map.townRenderer.onFloorClicked.add(this.onFloorClicked.bind(this)),this.setupHorizontalTween(),this._pageCamera.onBeginVerticalTween.add((()=>{this._addFloorTooltip&&this._addFloorTooltip.close()}),this),jt.firstTimeInState&&this._mathTower.shouldUseInfinityTowerMode()&&this._owner.map.showInfinityTowerDialog(),jt.firstTimeInState=!1;const z=this._owner.mathTower.hasAvailableFloatlings()?J.D.MESSAGE_ENABLE_FLING_BUTTON:J.D.MESSAGE_DISABLE_FLING_BUTTON;this._mathTower.game.broadcaster.broadcast(z)}shouldAddNewFloor(){return!this._activeFloor||!this._activeSkill||this._activeFloor.isExternalBuild||this._activeFloor.hasMaxBlocks}closeAllInterfaces(){this._buildInterface&&(this._buildInterface.close(),this._buildInterface=null),this._shroudInterface&&(this._shroudInterface.close(),this._shroudInterface=null),this._rooftopInterface&&(this._rooftopInterface.close(),this._rooftopInterface=null),this._moveFloorInterface&&(this._moveFloorInterface.close(),this._moveFloorInterface=null),this._addFloorTooltip&&this._addFloorTooltip.close()}onExit(){this._owner.switchParams.keepHud||this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_DISABLE_NAVIGATION),et.Aq$.isDefined(this._addFloor)&&this._addFloor.GameObject&&(this._addFloor.addFloorButton.onClick.removeAll(),this._addFloor.GameObject.destroy(),this._addFloor=null),this.closeAllInterfaces(),this._owner.map.townRenderer.onFloorClicked.removeAll(),this._pageCamera.onBeginVerticalTween.removeAll(this),this._pageCamera.onBeginHorizontalTween.removeAll(this),this._pageCamera.onBlockedMoveAttempt.removeAll(this),this._hudInterface.forceEnabledLeft=!1}spawnAddFloorPrefab(){const q=this._owner.prefabLoader.loadFromGUID(J.D.UI_ADD_FLOOR_PREFAB,this._owner.map.screen.backgroundGameObject);Lt.Z.bringToTop(this._owner.map.screen.user),this._addFloor=q.findComponent(Gt.R),q.legacyTransform.group.position=this._owner.nextFloorPosition(),this._owner.nextTowerAvailable()||this._addFloor.removeNewTowerButton(),this._addFloor.addFloorButton.onClick.add(this.onAddFloorButtonClicked.bind(this)),this._mathTower.currentTown.towers[this._mathTower.currentTown.towers.length-1].floors.length===gt.o.MAXIMUM_FLOOR_COUNT?this.onNewTowerButtonClicked():this._addFloor.newTowerButton.onClick.add(this.onNewTowerButtonClicked.bind(this))}spawnInProgressFloorPrefab(){const q=this._owner.getFloorPosition(this._activeFloorIndex.x,this._activeFloorIndex.y+1),K=this._mathTower.activeFloor;this._buildInterface=this._mathTower.uiFactory.buildInterface(q),this._buildInterface.onCreate.add(this.inProgressPrefabCreated.bind(this)),K.hasShroud&&this._buildInterface.onCreate.add(this.setBuildButtonVisible.bind(this,!1)),this._owner.moveToNextFloor()}spawnShroudCloud(){this._shroudInterface=this._mathTower.uiFactory.shroudLockInterface(),this._shroudInterface.onCreate.add(this.onShroudInterfaceCreated.bind(this))}spawnStubbornShadow(){const q=this._mathTower.currentTown.towers[this._troubledFloorIndex.x].floors[this._troubledFloorIndex.y];this._rooftopInterface=this._mathTower.uiFactory.rooftopMasteryInterface(q),this._rooftopInterface.onCreate.add(this.onRooftopInterfaceCreated.bind(this))}inProgressPrefabCreated(){this._buildInterface.buildButton.onClick.add((()=>{this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._buildInterface.buildButton):(this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_DISABLE_NAVIGATION),this.switchState(J.D.STATE_BUILD,{keepHud:!0})))}),this),et.Aq$.isDefined(this._shroudInterface)&&et.Aq$.isDefined(this._shroudInterface.gameObject)&&(this._shroudInterface.bringToTop(),this.bringHUDToTop())}onAddFloorButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._addFloor.addFloorButton):(this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_DISABLE_NAVIGATION,{keepHud:!0}),this._pageCamera.onBeginHorizontalTween.removeAll(this),this._pageCamera.onBeginHorizontalTween.addOnce((()=>{this.setupHorizontalTween()}),this),this._owner.moveToNextFloor(),this._pageCamera.onFullScrollCompleted.add(this.cameraFinishedScrolling.bind(this))))}showButtonTooltip(q){const K=this._mathTower.uiFactory.localizer.getText(J.D.TT_FINISH_TOWER_ON_ADD);this._addFloorTooltip=this._mathTower.uiFactory.buttonTooltip(this._addFloorTooltip,K,q,kt.i.DOWN,this.changeState.bind(this,J.D.STATE_INFINITY,{enteringInfinity:!0}))}cameraFinishedScrolling(){this._pageCamera.onFullScrollCompleted.removeAll(),this._pageCamera.clearQueues(),this.switchState(J.D.STATE_CHOOSE_FLOOR)}onBlockedMoveAttempt(q){q===xt.LEFT&&this._owner.map.showInfinityTowerDialog(!0)}onNewTowerButtonClicked(){this._mathTower.isClickable&&(this.closeAllInterfaces(),Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._mathTower.activeTower.isActiveTower=!1,this._mathTower.fireEvent(Et.L.TOWER_COMPLETED),this._addFloor.GameObject.active=!1,this._owner.map.townRenderer.towerRenderers[this._mathTower.currentTown.towers.length-1].onLuminTreeSpawned.add(this.switchState.bind(this,J.D.STATE_CAMERA)),this._mathTower.currentTown.createTower())}bringHUDToTop(){this._hudInterface.parent.setChildIndex(this._hudInterface,this._hudInterface.parent.children.length-1),this._mathTower.uiFactory.hud.bringToTop()}onShroudInterfaceCreated(){const q=this._owner.getFloorPosition(this._troubledFloorIndex.x,this._troubledFloorIndex.y+1);this._shroudInterface.setCleanButtonPosition(new vt.Point(q.x-J.D.BUTTON_OFFSET_X,q.y+J.D.BUTTON_OFFSET_Y)),this._shroudInterface.onCloudAppear.add(this.bringHUDToTop.bind(this)),this._shroudInterface.makeCloudAppear(q.x,q.y+J.D.SHROUD_OFFSET_Y,!0),this._shroudInterface.hideUI(),this._shroudInterface.cleanButton.onClick.add(this.cleanButtonClicked.bind(this)),this._owner.moveToNextFloor()}onRooftopInterfaceCreated(){this._rooftopInterface.toggleStaticUIVisibility(!1),this._rooftopInterface.attackButton.GameObject.active=!1;const q=this._owner.nextFloorPosition(!0);this._rooftopInterface.spawnStubbornShadow(q.x,q.y+J.D.STUBBORN_SHADOW_OFFSET_Y),this._rooftopInterface.battleButton.GameObject.legacyTransform.group.position.x=q.x,this._rooftopInterface.battleButton.GameObject.legacyTransform.group.position.y=q.y+J.D.BUTTON_OFFSET_Y,this._rooftopInterface.battleButton.onClick.add(this.battleButtonClicked.bind(this))}setBuildButtonVisible(q){this._buildInterface.buildButton.GameObject.active=q}cleanButtonClicked(){this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._shroudInterface.cleanButton):this.switchState(J.D.STATE_SHROUD,{questionOnEnter:!0,towerIndex:this._troubledFloorIndex.x,floorIndex:this._troubledFloorIndex.y}))}battleButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._rooftopInterface.battleButton):this.switchState(J.D.STATE_ROOFTOP,{resumeBattle:!0,towerIndex:this._troubledFloorIndex.x,floorIndex:this._troubledFloorIndex.y}))}onFloorClicked(q,K){if(!this._mathTower.isClickable)return;Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK);const z=this._mathTower.currentTown;if(z.towers[q].floors[K].isExternalBuild)return void(this._owner.currentState!==this._owner.states.get(J.D.STATE_QUICK_RENO)&&(this._owner.map.townRenderer.towerRenderers[q].floors[K].onQuickRenoClicked(),this._owner.map.townRenderer.moveToFloor(q,K+1),this._pageCamera.clearQueues(),this.switchState(J.D.STATE_QUICK_RENO,{towerIndex:q,floorIndex:K})));const Q=z.towers.length,X=z.towers[q],Z=q-1>=0?z.towers[q-1]:null,tt=q+1{Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._moveFloorInterface.warningObject.active=!1,this._moveFloorInterface.arrowObject.active=!1}))}setupHorizontalTween(){this._pageCamera.onBeginHorizontalTween.add((()=>{this._addFloorTooltip&&this._addFloorTooltip.close()}),this)}changeState(q,K={}){this._owner.changeToState(q,K)}}jt.firstTimeInState=!0,(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],jt.prototype,"onAddFloorButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],jt.prototype,"onNewTowerButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],jt.prototype,"cleanButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],jt.prototype,"battleButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[Number,Number]),(0,lt.Sn)("design:returntype",void 0)],jt.prototype,"onFloorClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[String,Object]),(0,lt.Sn)("design:returntype",void 0)],jt.prototype,"changeState",null);var $t=z(642),Ht=z(2272);class Vt extends Mt{constructor(){super(...arguments),this._returnState=J.D.STATE_CAMERA,this._buildState=J.D.STATE_BUILD}onEnter(){const q=this._owner.nextFloorPosition();this._chooseFloor=this._mathTower.uiFactory.chooseFloorLook(q),this._chooseFloor.onCreate.add(this.onChooseFloorInterfaceCreated.bind(this)),this._chooseFloor.selectionChanged.add(this.selectionChanged.bind(this)),this._towerIndex=this._mathTower.currentTown.towers.length-1,this._floorIndex=this._mathTower.currentTown.towers[this._towerIndex].floors.length}onExit(){this._chooseFloor.close(),this._mathTower.uiFactory.despawnScrim()}onChooseFloorInterfaceCreated(){this.bindButtons(),this.setupTempFloor();const q=this.getFloorPosition();this._chooseFloor.startBuildingButton.GameObject.legacyTransform.group.position.set(q.x-J.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X,q.y+J.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y),this.spawnScrim()}spawnScrim(){this._mathTower.uiFactory.spawnScrim(this._towerIndex,this._floorIndex)}getFloorPosition(){return this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1)}bindButtons(){this._chooseFloor.quitButton.onClick.add(this.quitPopup.bind(this)),this._chooseFloor.startBuildingButton.onClick.add(this.onStartBuildingClicked.bind(this))}setupTempFloor(){const q=this.getActiveTower();this._tempFloor=q.createFloor(this._mathTower.currentSkillID),this._tempFloor.blockCount=J.D.MAX_SMART_BLOCKS,this._tempFloor.roomID=1,this._tempFloor.frameID=2}getActiveTower(){let q=this._mathTower.activeTower;return(!et.Aq$.isDefined(q)||q.floors.length>=gt.o.MAXIMUM_FLOOR_COUNT)&&(q=this._mathTower.currentTown.createTower()),q}quitPopup(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),Y.q.instance.prodigy.open.confirmationDialog(new $t.k(this._owner.localizer.getText(J.D.POPUP_CHOOSE_FLOOR_QUIT_BUTTON),this.onQuitClicked.bind(this),this._owner.localizer.getText(J.D.POPUP_CHOOSE_FLOOR_STAY_BUTTON),void 0,{atlas:J.D.ATLAS_STORE,name:"icon-large-exclamation"},Ht.E.Small,void 0,this._owner.localizer.getText(J.D.POPUP_CHOOSE_FLOOR_QUIT_TITLE),this._owner.localizer.getText(J.D.POPUP_CHOOSE_FLOOR_QUIT_BODY)))}onQuitClicked(){this._mathTower.activeTower.removeFromTop(),this.switchState(this._returnState)}onStartBuildingClicked(){this._tempFloor.blockCount=mt.g.determineNewBlockCount(this._mathTower.education.getSkillById(this._tempFloor.skillID),this._tempFloor),this._mathTower.fireEvent(Et.L.FLOOR_START_BUILDING),this._mathTower.activeFloor.state=Rt.u.UnderConstruction,this.switchState(this._buildState)}selectionChanged(q){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._tempFloor.roomID=et.Aq$.isDefined(q.roomID)?q.roomID:1,this._tempFloor.frameID=et.Aq$.isDefined(q.frameID)?q.frameID:2,this._tempFloor.decorations.clear(),q.decorations&&q.decorations.forEach(((q,K)=>{this._tempFloor.decorations.setAt(K,q)}))}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],Vt.prototype,"quitPopup",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],Vt.prototype,"onQuitClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],Vt.prototype,"onStartBuildingClicked",null);var Wt=z(75329),qt=z(65240),Kt=z(49237),zt=z(8182),Yt=z(48199),Qt=z(43531),Xt=z(23748);class Zt extends et.uAl{constructor(){super(...arguments),this._objects=[],this._deltaX=0,this._deltaY=0}get objects(){return this._objects}get deltaX(){return this._deltaX}set deltaX(q){this._deltaX=q;for(let K=0;KJ.D.ELEMENT_STRINGS.map((z=>`${q}${z}${K}`)))("bucket-")),this.targets.setAnchor(.5,1),this.targets.deltaX=170,this.shimmerSpines=[];for(let K=0;K{q.setAnimationByName(0,`idle-${J.D.ELEMENT_STRINGS[K]}`,!0)}))}isInTarget(q,K){const z=J.D.ELEMENT_STRINGS.indexOf(K);if(z>-1){const K=this.targets.objects[z].legacyTransform.x+this.GameObject.legacyTransform.x-this._targetHalfWidth,Y=this.targets.objects[z].legacyTransform.x+this.GameObject.legacyTransform.x+this._targetHalfWidth;if(q>K&&q{q.GameObject.active=!1})),this._floatlingRenderers=[],this._floatling&&(this._floatling.GameObject.active=!1,this._floatling=null),this.canFire=!1}enableInput(){this._game.input.onDown.removeAll(this),this._game.input.onUp.removeAll(this),this._game.input.onDown.add(this.onMouseDown,this),this._game.input.onUp.add(this.onMouseUp,this),this._mouseDownWhileCanFire=!1}disableInput(){this._game.input.onDown.removeAll(this),this._game.input.onUp.removeAll(this),this.onMouseUp(),this._startMousePosition=null}spawnFloatlings(q){this._floatlingRenderers=[],this._floatlings=q;const K=Math.min(q.length,J.D.FLING_MAX_COUNT_DISPLAYED);for(let Y=0;Y{q.playAnimation(_t.IDLE)})),this._floatlingRenderers.push(q)}readyNextFloatling(){if(0===this._floatlingRenderers.length)return;const q=this._floatlingRenderers[0];q.activeTween&&q.activeTween.isRunning?q.activeTween.onTweenComplete.add(this.readyNextFloatling,this):this.setFloatling(this._floatlingRenderers.shift())}setFloatling(q){this._floatling=q;const K=this.GameObject.legacyTransform.group.children.length-1;this.GameObject.legacyTransform.group.setChildIndex(this._floatling.GameObject.legacyTransform.group,K),this.GameObject.legacyTransform.group.setChildIndex(this._frontElasticImage.GameObject.legacyTransform.group,K),this.GameObject.legacyTransform.group.setChildIndex(this._foregroundImage.GameObject.legacyTransform.group,K),this._game.add.tween(this._floatling.GameObject.legacyTransform.group,this).to({x:0},500,et.GS3.Linear.None,!0);const z=this._game.add.tween(this._floatling.GameObject.legacyTransform.group,this).to({y:-100},250,et.GS3.Quadratic.Out,!1),Y=this._game.add.tween(this._floatling.GameObject.legacyTransform.group,this).to({y:0},250,et.GS3.Quadratic.In,!1);Y.onTweenComplete.add((()=>{this.canFire=!0,this.targets.highlightTarget(q.elementType),this._floatlingTweeningToSling=!1})),z.chain(Y),z.start(),this._floatlingTweeningToSling=!0,this._floatlings.length>0&&this.spawnFloatling();for(let Q=0;Q{q.playAnimation(_t.WALK)})),q.activeTween.onTweenComplete.add((()=>{q.playAnimation(_t.IDLE)})),q.activeTween.start()}}fireFloatling(){this._floatling.spine.setSlotVisibility("shadow",!1),this._startMousePosition=null,this._firingTime=0,this.canFire=!1,this.hidePips(),this._game.add.tween(this._slingImage.GameObject.legacyTransform.group,this).to({rotation:0,x:0,y:0},400,et.GS3.Elastic.Out,!0),this._slingTarget={x:0,y:0},Y.q.instance.prodigy.audio.playSFX(J.D.FLOATLING_FLING_SFX_ID,J.D.LAUNCH_FLOATLING)}onMouseDown(){this.canFire&&(this._mouseDownWhileCanFire=!0,this._game.input.activePointer.justPressed&&(this._startMousePosition={x:this._game.input.activePointer.position.x,y:this._game.input.activePointer.position.y}))}onMouseUp(){if(this.canFire&&this._mouseDownWhileCanFire)return this._mouseDistance{this._pips[K].setAlpha(0)}),K*q)}normalizePosition(){this._mousePosition.x=Math.min(this._mousePosition.x,this._startMousePosition.x),this._mousePosition.y=Math.max(this._mousePosition.y,this._startMousePosition.y)}elasticTransform(q){let K=Math.sqrt(this._slingImage.GameObject.legacyTransform.x*this._slingImage.GameObject.legacyTransform.x+this._slingImage.GameObject.legacyTransform.y*this._slingImage.GameObject.legacyTransform.y);K/=61;const z=Math.atan2(this._slingImage.GameObject.legacyTransform.y,this._slingImage.GameObject.legacyTransform.x);this._elasticMatrix.a=K*Math.cos(z),this._elasticMatrix.b=K*Math.sin(z),this._elasticMatrix.c=Math.sin(0),this._elasticMatrix.d=Math.cos(0),this._elasticMatrix.tx=q.legacyTransform.group.x,this._elasticMatrix.ty=q.legacyTransform.group.y,q.legacyTransform.group.transform.setFromMatrix(this._elasticMatrix)}update(){if(super.update(),this.elasticTransform(this._backElasticImage.GameObject),this.elasticTransform(this._frontElasticImage.GameObject),this._firingTime>=0){this._firingTime+=Y.q.instance.game.time.deltaMS/1e3;const q=this.getArcPosition(this._fireAngle,this._firePower,this._firingTime);return this._floatling.GameObject.legacyTransform.group.position.set(q.x,q.y),void(q.y>this.targets.getHeightAt(q.x)&&this.endShot())}if(this._slingImage.GameObject.legacyTransform.x=Xt.z.clampedLerp(this._slingImage.GameObject.legacyTransform.x,this._slingTarget.x,.1),this._slingImage.GameObject.legacyTransform.y=Xt.z.clampedLerp(this._slingImage.GameObject.legacyTransform.y,this._slingTarget.y,.1),this._floatling&&(this._floatlingTweeningToSling||(this._floatling.GameObject.legacyTransform.group.position.x=this._slingImage.GameObject.legacyTransform.x,this._floatling.GameObject.legacyTransform.group.position.y=this._slingImage.GameObject.legacyTransform.y)),!this._startMousePosition)return this._firePower=0,void(this._slingTarget={x:0,y:0});this._game.input.activePointer.isDown&&(this._mousePosition={x:this._game.input.activePointer.position.x,y:this._game.input.activePointer.position.y},this.normalizePosition());const q={x:this._mousePosition.x-this._startMousePosition.x,y:this._mousePosition.y-this._startMousePosition.y};if(this._fireAngle=this.calculateFireAngle(q),this._firePower=this.calculateFirePower(this._mousePosition,this._startMousePosition),this._mouseDistance0}destroy(){this._onLand.dispose(),super.destroy()}}var ee=z(65826),ie=z(15016);class se extends et.uAl{create(){super.create(),this._game=Y.q.instance.game;const q=new et._mx(this.GameObject);q.addComponent(et.K16),this.scorePrefabs=q.addComponent(Zt),this.scorePrefabs.generateFromPrefab(J.D.UI_RESEARCH_POINTS_PANEL_PREFAB,5),this.scorePrefabs.deltaX=145,this.texts=[],this.scores=[];const K=Y.q.instance.prodigy.gameContainer.get("29b-61c6");ee.b.statusRequiresConsent(K.consentStatus)&&(this.scorePrefabs.GameObject.legacyTransform.y+=ie.R.HUD_RESERVE_HEIGHT);for(let z=0;z{this.texts[q].text=this.scores[q].toString()})),z.chain(Y),z.start()}getCombinedScore(){let q=0;for(let K=0;K{q.state=Ct.a.Awake})),this._postGameSignal.addOnce(K),this.GameObject.parent.legacyTransform.group.setChildIndex(this.GameObject.legacyTransform.group,this.GameObject.parent.children.length-1),this.GameObject.active=!0,this._oldCameraBounds=this.camera.bounds,this._oldCameraPosition={x:this.camera.x,y:this.camera.y},this.GameObject.legacyTransform.y=-this.camera.bounds.height-1*this.camera.cameraHeight,this.GameObject.legacyTransform.x=this.camera.x,this.camera.bounds=null,this.camera.Active=!1;const z=this.isFtue?J.D.FLING_FTUE_INTRO_DIALOGUE_Y_OFFSET:0;this._game.add.tween(this.camera,this).to({x:this.GameObject.legacyTransform.x,y:this.GameObject.legacyTransform.y+z},J.D.FLING_CAMERA_TWEEN_IN_MS,et.GS3.Quadratic.Out,!0).onUpdateCallback(this.camera.onUpdateVerticalTween.dispatch,this.camera.onUpdateVerticalTween).onTweenComplete.add((()=>{this._catapult.Active=!0,this._catapult.spawnFloatlings(this._floatlings.slice(0)),this.isFtue?this.startFTUE():(this._quitButton.GameObject.active=!0,this.startCatapult())})),this._game.add.tween(this._scoreManager.GameObject.legacyTransform.group,this).to({y:J.D.FLING_SCORE_MANAGER_Y+z},J.D.FLING_CAMERA_TWEEN_IN_MS,et.GS3.Quadratic.Out,!0),this.characterController.tweenToPosition({x:this.GameObject.legacyTransform.group.position.x+J.D.PLAYER_FLING_OFFSET_X,y:this.GameObject.legacyTransform.group.position.y+J.D.PLAYER_FLING_OFFSET_Y},J.D.FLING_CAMERA_TWEEN_IN_MS,J.D.FLING_PLAYER_DELAY_OFFSET_MS,et.GS3.Quadratic.Out),Y.q.instance.prodigy.audio.playBGM(J.D.FLOATLING_FLING_BGM_ID,!0)}startCatapult(){this._catapult.onLand.add(this.onFloatlingLand,this),this._catapult.readyNextFloatling()}onFloatlingLand(q,K){K.floatling.lastThrown=Date.now(),q?this.animateFloatlingScore(K):this._game.add.tween(K.GameObject.legacyTransform.group,this).to({y:300,alpha:0},500,et.GS3.Quadratic.In,!0).onTweenComplete.add(this.onFloatlingScoreTweenEnd.bind(this,K)),this._catapult.readyNextFloatling()}animateFloatlingScore(q){q.researchPointVisible=!0,this._scoreManager.addScore(q.elementType,this.isFtue?J.D.FLING_FTUE_POINTS_PER_SHOT:q.researchScore);const K=this._scoreManager.scorePrefabs.objects[q.elementType].legacyTransform.group,z=this._catapult.GameObject.legacyTransform.group,Y=K.getGlobalPosition(),Q=Y.x-z.x+.5*K.width,X=Y.y-z.y;this._game.add.tween(q.GameObject.legacyTransform.group,this).to({x:Q,y:X,alpha:0},500,et.GS3.Quadratic.In,!0).onTweenComplete.add(this.onFloatlingScoreTweenEnd.bind(this,q))}onFloatlingScoreTweenEnd(q){q.GameObject.destroy(),this._catapult.hasFloatlings()||this.awardPoints(this.showEndPopup.bind(this))}startFTUE(){this._ftueTutorialLabel=this._prefabLoader.loadFromGUID(J.D.UI_TUTORIAL_TAG,Y.q.instance.prodigy.open.menusGameObject),this._ftueTutorialLabel.legacyTransform.group.position.set(32,32);const q=new Qt.rD(this._game),K=[];for(let z=0;z{this._game.add.tween(this.camera,this).to({x:this.GameObject.legacyTransform.x,y:this.GameObject.legacyTransform.y},J.D.FLING_CAMERA_TWEEN_IN_MS,et.GS3.Quadratic.Out,!0).onTweenComplete.add((()=>{this.showHowToFlingFTUE()})),this._game.add.tween(this._scoreManager.GameObject.legacyTransform.group,this).to({y:J.D.FLING_SCORE_MANAGER_Y},J.D.FLING_CAMERA_TWEEN_IN_MS,et.GS3.Quadratic.Out,!0)}}),q.addEvents(K),q.start()}showHowToFlingFTUE(){this._catapult.readyNextFloatling(),this._catapult.onLand.add(this.onFloatlingLandFTUE,this),this._ftueTooltip=this._prefabLoader.load(10,this.GameObject).findComponent(zt.p),this._ftueTooltip=Yt.A.displayToolTipAuto(this._ftueTooltip,this.GameObject,{bodyText:Y.q.instance.prodigy.gameContainer.get(et.$Bt.LocalizationService).getText(J.D.FLING_CLICK_AND_DRAG),xPosition:300,yPosition:164}),this._ftueTooltip._timeout.stop();const q=new et._mx(this.GameObject);q.addComponent(et.K16),this._ftueHand=q.addComponent(wt._),this._ftueHand.setAsset(J.D.ATLAS_ICONS,"help"),this._ftueHand.GameObject.legacyTransform.group.position.set(450,256),this._ftueHandTween=this._game.add.tween(this._ftueHand.GameObject.legacyTransform.group,this).to({x:350,y:400},2e3,et.GS3.Quadratic.In,!0,500).loop(!0)}onFloatlingLandFTUE(q,K){if(q){K.floatling.lastThrown=Date.now(),this.animateFloatlingScore(K),this.onFloatlingScoredFTUE();const q=new Qt.rD(this._game);q.addEvents([{dialogueData:q.dataProvider.get(J.D.FLING_FTUE_POST_FLING),blockInput:!0},{callback:this.showFTUEEndPopup.bind(this)}]),q.start()}else{const q=new Qt.rD(this._game);q.addEvents([{dialogueData:q.dataProvider.get(J.D.FLING_FTUE_MISSED),blockInput:!0},{callback:this._catapult.setFloatling.bind(this._catapult,K)}]),q.start()}}onFloatlingScoredFTUE(){this._catapult.onLand.removeAll(),this._ftueHandTween.stop(),this._ftueHand.GameObject.destroy(),this._ftueTooltip.GameObject.destroy(),this._ftueTooltip=null}showEndPopup(){Y.q.instance.prodigy.open.informationDialog(new Wt.Z(J.D.POPUP_FLING_FINISH_BUTTON,(()=>{this.returnToGame()}),Ht.E.Medium,void 0,J.D.POPUP_FLING_FINISH_TITLE,J.D.POPUP_FLING_FINISH_BODY,!0,J.D.ATLAS_SWOOPY_FACE,J.D.ATLAS_SWOOPY_FACE_FRAME_DEFAULT))}showFTUEEndPopup(){Y.q.instance.prodigy.open.informationDialog(new Wt.Z(J.D.POPUP_NO_FLOATLINGS_CONFIRM,this.startCatapult.bind(this),Ht.E.Medium,void 0,J.D.POPUP_FLING_COLLECT_TITLE,J.D.POPUP_FLING_COLLECT_BODY,!0,J.D.FLOATLING_FLING_RESEARCH_ICONS))}onQuitClick(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._catapult.disableInput();const q=Y.q.instance.prodigy.gameContainer.get(et.$Bt.LocalizationService);Y.q.instance.prodigy.open.confirmationDialog(new $t.k(q.getText(J.D.POPUP_FLING_QUIT_CONFIRM),(()=>{this.awardPoints(this.returnToGame.bind(this))}),q.getText(J.D.POPUP_FLING_QUIT_DECLINE),(()=>{this._catapult.enableInput()}),{atlas:J.D.ATLAS_STORE,name:"icon-large-exclamation"},Ht.E.Small,void 0,q.getText(J.D.POPUP_FLING_QUIT_TITLE),q.getText(J.D.POPUP_FLING_QUIT_BODY),!0))}awardPoints(q){if(!this.GameObject.active)return;this._quitButton.onClick.removeAll(this),this._quitButton.GameObject.active=!1,this._ftueTutorialLabel&&(this._ftueTutorialLabel.destroy(),this.breadcrumbManager.completeBreadcrumb(Bt.M.FlingTutorialComplete));const K=this._scoreManager.scores,z=[];for(let Y=0;Y0&&z.push({type:"currency",ID:J.D.FLING_CURRENCY_ORDER[Y],N:K[Y]});Y.q.instance.prodigy.gameContainer.get("20f-5f67");z.length>0?Y.q.instance.prodigy.open.gotItem(z,q,null,null,null,null,{source_type:qt.C.MiniGame}):q()}returnToGame(){this._floatlings.forEach((q=>{q.state=Ct.a.Wandering})),this._game.add.tween(this.camera,this).to({x:this._oldCameraPosition.x,y:0},J.D.FLING_CAMERA_TWEEN_OUT_MS,et.GS3.Quadratic.Out,!0,J.D.FLING_CAMERA_LEAVE_DELAY_MS).onUpdateCallback(this.camera.onUpdateVerticalTween.dispatch,this.camera.onUpdateVerticalTween).onTweenComplete.add(this.onFinishReturnToGame,this),this.characterController.tweenToPosition({x:this._oldCameraPosition.x+J.D.PLAYER_CAMERA_OFFSET_X,y:J.D.PLAYER_CAMERA_OFFSET_Y},J.D.FLING_CAMERA_TWEEN_OUT_MS,J.D.FLING_CAMERA_LEAVE_DELAY_MS+J.D.FLING_PLAYER_DELAY_OFFSET_MS,et.GS3.Quadratic.Out),Y.q.instance.prodigy.audio.playBGM(J.D.TOWER_TOWN_BGM_ID,!0)}onFinishReturnToGame(){if(this.isFtue){this._isFtue=!1;const q=new Qt.rD(this._game),K=[];J.D.FLING_FTUE_OUTRO_DIALOGUES.forEach((z=>{K.push({dialogueData:q.dataProvider.get(z),blockInput:!0})})),K.push({callback:this.onFinishReturnToGame.bind(this)}),q.addEvents(K),q.start()}else this.GameObject.active=!1,this.camera.Active=!0,this.camera.bounds=this._oldCameraBounds,this._postGameSignal.dispatch()}destroy(){this._postGameSignal.dispose(),super.destroy()}}class ae extends Mt{constructor(q){super(),this._floatlingPool=q}init(q){super.init(q),this.createFloatlingFling(),this._mathTower.onUpdate.add((q=>{q.type===Et.L.TOWER_TOWN_FLOATLING_FLING_START&&this.switchState(J.D.STATE_FLING)}))}onEnter(){super.onEnter();const q=this._owner.mathTower.getFloatlingsForFling();0!==q.length?(this._floatlingFling.startFloatlingFling(q,this.onFinishFloatlingFling.bind(this)),this._mathTower.events.handleNotification(this._mathTower,new Ot.L(this._mathTower,Et.L.TOWER_TOWN_FLOATLING_FLING_START))):this.showNoFloatlingPopup()}createFloatlingFling(){const q=new et._mx(this._owner.map.screen.backgroundGameObject);q.addComponent(et.K16),this._floatlingFling=q.addComponent(ne),this._floatlingFling.breadcrumbManager=this._owner.map.breadCrumbManager,this._floatlingFling.camera=this._owner.map.pageCamera,this._floatlingFling.GameObject.active=!1,this._floatlingFling.characterController=this._owner.map.characterController,this._floatlingFling.floatlingPool=this._floatlingPool}showNoFloatlingPopup(){Y.q.instance.prodigy.open.informationDialog(new Wt.Z(J.D.POPUP_NO_FLOATLINGS_CONFIRM,(()=>{this.returnToTownState()}),Ht.E.Medium,void 0,J.D.POPUP_NO_FLOATLINGS_TITLE,J.D.POPUP_NO_FLOATLINGS_BODY,!0,J.D.POPUP_NO_FLOATLINGS_ICON))}onFinishFloatlingFling(){this._owner.map.refreshVisibleTown(),this._mathTower.uiFactory.hud.updateBreadcrumbsLocked(),this.returnToTownState(),this._mathTower.notifyUpdate(Et.L.TOWER_TOWN_FLOATLING_FLING_END),this._mathTower.fireEvent(Et.L.TOWER_TOWN_FLOATLING_FLING_END)}returnToTownState(){this._mathTower.isInfinity?this.switchState(J.D.STATE_INFINITY):this.switchState(J.D.STATE_CAMERA)}}var re=z(3836);class oe extends Nt{constructor(){super(),this._defaultReturnState=J.D.STATE_INFINITY}getBuildInterface(){const q=this._owner.nextInfinityFloorPosition();return this._activeFloor=this._mathTower.activeFloor,new re._(this._owner.mathTower.game,this._owner.map.screen.backgroundGameObject,this._owner.mathTower,this._owner.prefabLoader,this._activeFloor,q.x+J.D.IN_PROGRESS_PREFAB_X_OFFSET,q.y+J.D.IN_PROGRESS_PREFAB_Y_OFFSET,re.i.Infinity)}wrongAnswer(){this._quitButton.inputEnabled=!0}floorFinished(){this.completeFloor(),this._mathTower.uiFactory.tooltip(this._owner.localizer.getText(J.D.TOOLTIP_FLOOR_FINISHED),!0,J.D.FLOOR_FINISHED_TOOLTIP_WIDTH),this._owner.map.townRenderer.checkAwardFloatlings(this._mathTower.activeInfinityFloor),this._mathTower.fireEvent(Et.L.TOWER_ROOM_BUILT),this.switchState(this._defaultReturnState)}spawnScrim(){this._mathTower.uiFactory.spawnInfinityScrim()}}class he extends Vt{constructor(){super(),this._buildState=J.D.STATE_INFINITY_BUILD,this._returnState=J.D.STATE_INFINITY}getActiveTower(){return this._mathTower.currentTown.infinityTower}getFloorPosition(){return this._owner.nextInfinityFloorPosition()}spawnScrim(){this._mathTower.uiFactory.spawnInfinityScrim()}onQuitClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._mathTower.currentTown.infinityTower.removeFromTop(),this.switchState(this._returnState)}onStartBuildingClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._tempFloor.blockCount=0,this._mathTower.fireEvent(Et.L.FLOOR_START_BUILDING),this._mathTower.activeInfinityFloor.state=Rt.u.UnderConstruction,this.switchState(this._buildState)}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],he.prototype,"onQuitClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],he.prototype,"onStartBuildingClicked",null);var ce=z(76974),de=z(52080),le=z(1041);class ue extends Mt{constructor(q){super(),this._maxFloorAmount=100,this._townRenderer=q}init(q){super.init(q),this._map=q.map,this.createMap()}createMap(){const q=Y.q.instance.game.width,K=Y.q.instance.game.height;this._parent=new et._mx(this._townRenderer.GameObject),setTimeout((()=>{this._townRenderer.GameObject.legacyTransform.group.setChildIndex(this._parent.legacyTransform.group,0)})),this._parent.addComponent(et.K16).group.position.set(-q,0);const z=new et._mx(this._parent);z.addComponent(et.K16);const Q=new et._mx(this._parent);Q.addComponent(et.K16);const X=new de.Y(new vt.BaseRenderTexture({width:q,height:K})),Z=new de.Y(new vt.BaseRenderTexture({width:q,height:K})),tt=Y.q.instance.prodigy.create.element(z.legacyTransform.group,0,0),it=Y.q.instance.prodigy.create.element(Q.legacyTransform.group,0,0),st=new le.Z(Y.q.instance.prodigy.gameContainer);st.init(this._map.game,tt,it,{background:z,foreground:Q},{mapName:J.D.MAP_INFINITY_TOWER_CONSTRUCTION,assets:J.D.TILESET_INFINITY_TOWER_CONSTRUCTION},(()=>{X.clear(),X.renderXY(tt,0,0,!0),z.legacyTransform.group.addChild(Y.q.instance.prodigy.create.image(0,0,void 0,void 0,X)),Z.clear(),Z.renderXY(it,0,0,!0),Q.legacyTransform.group.addChild(Y.q.instance.prodigy.create.image(0,0,void 0,void 0,Z)),tt.destroy(),it.destroy(),st.processAnimations(this._map.game,{above:Q,below:z})}))}onEnter(){super.onEnter(),this._mathTower.isInfinity=!0,this.setupTower(),this._owner.mathTower.activeFloor&&!this._owner.mathTower.activeFloor.hasMaxBlocks?this.spawnInProgressFloorPrefab():(this.clearMidFloors(),this.setupAddFloorPrefab()),this.setupCamera(),this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_ENABLE_NAVIGATION),this._map.pageCamera.onBeginHorizontalTween.add(this.onHorizontalTween,this);const q=this._owner.mathTower.hasAvailableFloatlings()?J.D.MESSAGE_ENABLE_FLING_BUTTON:J.D.MESSAGE_DISABLE_FLING_BUTTON;this._mathTower.game.broadcaster.broadcast(q)}onExit(q){super.onExit(),this._map.pageCamera.onFullScrollCompleted.removeAll(this),this._map.pageCamera.onBeginHorizontalTween.removeAll(this),et.Aq$.isDefined(this._addFloor)&&this._addFloor.GameObject&&(this._addFloor.addFloorButton.onClick.removeAll(),this._addFloor.GameObject.destroy(),this._addFloor=null),this._buildInterface&&(this._buildInterface.close(),this._buildInterface=null),q!==J.D.STATE_INFINITY_BUILD&&q!==J.D.STATE_INFINITY_CHOOSE_FLOOR&&q!==J.D.STATE_FLING?this.cleanup():this._owner.switchParams.keepHud||this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_DISABLE_NAVIGATION)}cleanup(){this._mathTower.isInfinity=!1,this._map.pageCamera.onEnable(),this._townRenderer.GameObject.active=!0,this._townRenderer.updateBounds(),this._map.cameraHUDInterface.forceEnabledRight=!1,this._map.pageCamera.onBlockedMoveAttempt.removeAll(this)}spawnInProgressFloorPrefab(){const q=this._owner.nextFloorPosition();this._buildInterface=this._mathTower.uiFactory.buildInterface(q),this._buildInterface.onCreate.add(this.inProgressPrefabCreated.bind(this))}inProgressPrefabCreated(){this._buildInterface.buildButton.onClick.add(this.onBuildButtonClicked.bind(this)),this._buildInterface.buildButton.inputEnabled=this._mathTower.shouldUseInfinityTowerMode(),this._buildInterface.buildButton.currentState=this._mathTower.shouldUseInfinityTowerMode()?ce.K.Up:ce.K.Disabled}onBuildButtonClicked(){this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_DISABLE_NAVIGATION,{keepHud:!0}),this.switchState(J.D.STATE_INFINITY_BUILD)}onHorizontalTween(q){q===-Y.q.instance.game.width&&this.switchState(J.D.STATE_CAMERA)}setupTower(){this._owner.mathTower.currentTown.infinityTower||this._owner.mathTower.currentTown.createInfinityTower()}setupCamera(){const q=Y.q.instance.game.width,K=Y.q.instance.game.height;this._map.pageCamera.onDisable();const z=this._map.pageCamera.bounds.width,Q=-q,X=-J.D.FLOOR_HEIGHT*this._mathTower.currentTown.infinityTower.floors.length,Z=-X+K;this._map.pageCamera.bounds.setTo(Q,X,z,Z),this._map.pageCamera.updateBounds(),this._map.pageCamera.onEndVerticalTween.add((()=>{this._owner.switchParams.backToTowerTown&&this.switchState(J.D.STATE_CAMERA)})),this._map.pageCamera.onFullScrollCompleted.add(this.onFinishTransitionIn,this),this._owner.switchParams.enteringInfinity?this._map.pageCamera.scrollToPosition(-q,0):this.scrollToTop()}clearMidFloors(){const q=this._owner.mathTower.currentTown.infinityTower.floors.length;if(q<=this._maxFloorAmount)return;const K=q-this._maxFloorAmount,z=Math.ceil(this._maxFloorAmount/2);this._owner.mathTower.currentTown.infinityTower.removeFloors(z,K,!0)}setupAddFloorPrefab(){const q=this._owner.prefabLoader.loadFromGUID(J.D.UI_ADD_FLOOR_PREFAB,this._map.screen.backgroundGameObject);this._addFloor=q.findComponent(Gt.R),q.legacyTransform.group.position=this._owner.nextFloorPosition(),this._addFloor.addFloorButton.onClick.add(this.onAddFloorButtonClicked.bind(this)),this._addFloor.addFloorButton.inputEnabled=this._mathTower.shouldUseInfinityTowerMode(),this._addFloor.addFloorButton.currentState=this._mathTower.shouldUseInfinityTowerMode()?ce.K.Up:ce.K.Disabled,this._addFloor.removeNewTowerButton()}onAddFloorButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_DISABLE_NAVIGATION,{keepHud:!0}),this.switchState(J.D.STATE_INFINITY_CHOOSE_FLOOR)}onFinishTransitionIn(){this._map.pageCamera.onFullScrollCompleted.removeAll(this);const q=this._map.pageCamera.bounds;q.width=Y.q.instance.game.width,this._map.pageCamera.bounds=q,this._map.cameraHUDInterface.forceEnabledRight=!0,this._map.pageCamera.onBlockedMoveAttempt.add(this.onBlockedMoveAttempt,this),this.scrollToTop(1e3)}onBlockedMoveAttempt(q){q===xt.RIGHT&&this._owner.changeToState(J.D.STATE_CAMERA)}scrollToTop(q=0){this._map.pageCamera.scrollVertical(this._owner.nextInfinityFloorPosition().y-.5*Y.q.instance.game.height,q)}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],ue.prototype,"onBuildButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],ue.prototype,"onAddFloorButtonClicked",null);class fe extends Mt{get towerIndex(){return this._towerIndex}get floorIndex(){return this._floorIndex}onEnter(){this._moveInterface=this._mathTower.uiFactory.moveFloorInterface(),this._moveInterface.onCreate.add(this.onMoveFloorInterfaceCreated.bind(this)),this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this.checkTowerFloorBoundaries()&&(this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex].state=Rt.u.MoveFloor),this._owner.map.pageCamera.onFullScrollCompleted.add(this.cameraFinishedScrolling.bind(this),this)}onExit(){this.checkTowerFloorBoundaries()&&(this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex].state=Rt.u.Complete),this._mathTower.uiFactory.despawnScrim(),this._moveInterface.close(),this._owner.map.pageCamera.onFullScrollCompleted.removeAll(this)}checkTowerFloorBoundaries(){return this._towerIndexgt.o.MINIMUM_FLOOR_COUNT;K&&Y?(this._moveInterface.leftButton.lockState(ce.K.Disabled),this._moveInterface.leftButton.onClick.add(this.leftButtonClicked.bind(this,!0)),this._moveInterface.rightButton.unlockState(),this._moveInterface.rightButton.currentState=ce.K.Up,this._moveInterface.rightButton.onClick.add(this.rightButtonClicked.bind(this))):z&&Y?(this._moveInterface.rightButton.lockState(ce.K.Disabled),this._moveInterface.rightButton.onClick.add(this.rightButtonClicked.bind(this,!0)),this._moveInterface.leftButton.unlockState(),this._moveInterface.leftButton.currentState=ce.K.Up,this._moveInterface.leftButton.onClick.add(this.leftButtonClicked.bind(this))):(this._moveInterface.rightButton.lockState(ce.K.Disabled),this._moveInterface.rightButton.onClick.add(this.rightButtonClicked.bind(this,!0)),this._moveInterface.leftButton.lockState(ce.K.Disabled),this._moveInterface.leftButton.onClick.add(this.leftButtonClicked.bind(this,!0)))}onSaveClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._revertCallback=null,this.switchState(J.D.STATE_CAMERA),this._mathTower.forceSaveTown()}onCancelClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this.reverseChanges(),this._revertCallback=null,this.switchState(J.D.STATE_CAMERA)}leftButtonClicked(q=!1){if(Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),q){const q=this._mathTower.currentTown.towers[this._towerIndex].floors.length>gt.o.MINIMUM_FLOOR_COUNT?J.D.WARNING_TOP_FORWARD:J.D.MOVE_FLOOR_MINIMUM_WARNING;this._moveInterface.warningObject.active=!0,this._moveInterface.arrowObject.active=!0;const K=this._moveInterface.leftButton.GameObject.legacyTransform.group.position,z=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._moveInterface.warningObject.legacyTransform.group.position.set(z.x-J.D.FLOOR_WIDTH/1.5,K.y+J.D.MOVE_FLOOR_WARNING_OFFSET_Y),this._moveInterface.arrowObject.legacyTransform.group.position.set(K.x+J.D.WARNING_ARROW_OFFSET_X,K.y+J.D.WARNING_ARROW_OFFSET_Y),this._moveInterface.setWarningText(this._owner.localizer.getText(q)),this._moveInterface.warningQuitButton.onClick.add(this.warningQuitButtonClicked.bind(this))}else this.bottomToTop(),this._revertCallback?this._revertCallback=null:this._revertCallback=this.topToBottom.bind(this),this.initMoveButtons()}rightButtonClicked(q=!1){if(Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),q){const q=this._mathTower.currentTown.towers[this._towerIndex].floors.length>gt.o.MINIMUM_FLOOR_COUNT?J.D.WARNING_BOTTOM_BACK:J.D.MOVE_FLOOR_MINIMUM_WARNING;this._moveInterface.warningObject.active=!0,this._moveInterface.arrowObject.active=!0;const K=this._moveInterface.rightButton.GameObject.legacyTransform.group.position,z=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._moveInterface.warningObject.legacyTransform.group.position.set(z.x-70,K.y+J.D.MOVE_FLOOR_WARNING_OFFSET_Y),this._moveInterface.arrowObject.legacyTransform.group.position.set(K.x+J.D.WARNING_ARROW_OFFSET_X,K.y+J.D.WARNING_ARROW_OFFSET_Y),this._moveInterface.setWarningText(this._owner.localizer.getText(q)),this._moveInterface.warningQuitButton.onClick.add(this.warningQuitButtonClicked.bind(this))}else this.topToBottom(),this._revertCallback?this._revertCallback=null:this._revertCallback=this.bottomToTop.bind(this),this.initMoveButtons()}topToBottom(){let q=this._mathTower.currentTown.towers[this._towerIndex+1];et.Aq$.isDefined(q)||(q=this._mathTower.currentTown.createTower()),this._mathTower.currentTown.towers[this._towerIndex].moveFloorTo(q,!0,!1),this._towerIndex++,this._floorIndex=0,this._mathTower.currentTown.towers[this._towerIndex].notifyUpdate(Et.L.TOWER_MOVE_FLOOR),this._mathTower.currentTown.towers[this._towerIndex-1].notifyUpdate(Et.L.TOWER_MOVE_FLOOR)}bottomToTop(){const q=this._mathTower.currentTown.towers[this._towerIndex-1];q.takeFloorFrom(this._mathTower.currentTown.towers[this._towerIndex],!0,!1),0===this._mathTower.currentTown.towers[this._towerIndex].floors.length&&(this._mathTower.currentTown.towers[this._towerIndex-1].isActiveTower=!1),this._mathTower.currentTown.towers[this._towerIndex].notifyUpdate(Et.L.TOWER_MOVE_FLOOR),this._towerIndex--,this._floorIndex=q.floors.length-1,this._mathTower.currentTown.towers[this._towerIndex].notifyUpdate(Et.L.TOWER_MOVE_FLOOR)}reverseChanges(){this._revertCallback&&this._revertCallback()}warningQuitButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._moveInterface.warningObject.active=!1,this._moveInterface.arrowObject.active=!1}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],fe.prototype,"onSaveClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],fe.prototype,"onCancelClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[Boolean]),(0,lt.Sn)("design:returntype",void 0)],fe.prototype,"leftButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[Boolean]),(0,lt.Sn)("design:returntype",void 0)],fe.prototype,"rightButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],fe.prototype,"warningQuitButtonClicked",null);class be extends Mt{constructor(){super(...arguments),this._returnState=J.D.STATE_CAMERA,this._buildState=J.D.STATE_BUILD}onEnter(){this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this._activeFloor=this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex],this._owner.map.townRenderer.towerRenderers[this._towerIndex].floors[this._floorIndex].setFloorVisibility(!0),this._activeFloor.roomID=J.D.DEFAULT_FLOOR_ROOM_ID,this._activeFloor.frameID=J.D.DEFAULT_FLOOR_FRAME_ID,this._activeFloor.setRenovation(),this._owner.map.pageCamera.onFullScrollCompleted.addOnce(this.cameraFinishedScrolling.bind(this),this)}cameraFinishedScrolling(){const q=this._owner.getFloorPosition(this._towerIndex,this._floorIndex);this._chooseFloor=this._mathTower.uiFactory.chooseFloorLook(q),this._chooseFloor.onCreate.add(this.onChooseFloorInterfaceCreated.bind(this)),this._chooseFloor.selectionChanged.add(this.selectionChanged.bind(this)),this._owner.map.refreshVisibleTown(),this._mathTower.uiFactory.spawnScrim(this._towerIndex,this._floorIndex)}onExit(){this._chooseFloor.close(),this._mathTower.uiFactory.despawnScrim()}onChooseFloorInterfaceCreated(){this.bindButtons();const q=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._chooseFloor.startBuildingButton.GameObject.legacyTransform.group.position.set(q.x-J.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X,q.y+J.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y)}bindButtons(){this._chooseFloor.quitButton.onClick.add(this.quitPopup.bind(this)),this._chooseFloor.startBuildingButton.onClick.add(this.onStartBuildingClicked.bind(this))}quitPopup(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),Y.q.instance.prodigy.open.confirmationDialog(new $t.k(this._owner.localizer.getText(J.D.POPUP_CHOOSE_FLOOR_QUIT_BUTTON),this.onQuitClicked.bind(this),this._owner.localizer.getText(J.D.POPUP_CHOOSE_FLOOR_STAY_BUTTON),void 0,{atlas:J.D.ATLAS_STORE,name:"icon-large-exclamation"},Ht.E.Small,void 0,this._owner.localizer.getText(J.D.POPUP_CHOOSE_FLOOR_QUIT_TITLE),this._owner.localizer.getText(J.D.POPUP_CHOOSE_FLOOR_QUIT_BODY)))}onQuitClicked(){this._owner.map.townRenderer.towerRenderers[this._towerIndex].floors[this._floorIndex].setQuickRenoPrefabVisibility(!0),this._owner.map.townRenderer.towerRenderers[this._towerIndex].floors[this._floorIndex].setFloorVisibility(!1),this._activeFloor.decorations.clear(),this._activeFloor.setComplete(!0,this._activeFloor.blockCount),this.switchState(this._returnState)}onStartBuildingClicked(){this._activeFloor.setRenoConstruction();const q=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1),K=this._activeFloor;this.switchState(this._buildState,{quickRenoFloor:K,position:q})}selectionChanged(q){this._activeFloor.roomID=et.Aq$.isDefined(q.roomID)?q.roomID:J.D.DEFAULT_FLOOR_ROOM_ID,this._activeFloor.frameID=et.Aq$.isDefined(q.frameID)?q.frameID:J.D.DEFAULT_FLOOR_FRAME_ID,this._activeFloor.decorations.clear(),q.decorations&&q.decorations.forEach(((q,K)=>{this._activeFloor.decorations.setAt(K,q)}))}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],be.prototype,"quitPopup",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],be.prototype,"onStartBuildingClicked",null);class pe{constructor(){this.items=[]}getRewards(){return this.items}addOneOf(q){const K=At.o.integerInRange(0,q.length);this.items.push(q[K])}add(q){this.items.push(q)}}class ve extends Mt{onEnter(){this._dialogueController=this._owner.dialogueController,this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this._activeFloor=this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex],this._topFloorIndex=this._mathTower.currentTown.towers[this._towerIndex].floors.length-1,this._rooftopInterface=this._mathTower.uiFactory.rooftopMasteryInterface(this._activeFloor),this._rooftopInterface.onCreate.add(this.onRooftopInterfaceCreated.bind(this))}onExit(){this._owner.map.characterController.Active=!0,this._owner.map.townRenderer.updateBounds(0),this._rooftopInterface.close()}startFTUE(){const q=this._owner.nextFloorPosition(),K=ct.U.isStepComplete(nt.B.PuppetMasterDefeated);this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(J.D.DIALOGUE_STUBBORN_SHADOW_FTUE_1),blockInput:!0},{callback:()=>{this._rooftopInterface.spawnPortalFTUE(q.x,q.y)}},{dialogueData:this._dialogueController.dataProvider.get(J.D.DIALOGUE_STUBBORN_SHADOW_FTUE_2),blockInput:!0},{callback:()=>{this._rooftopInterface.spawnPMAndStubbornShadowFTUE(q.x,q.y)}},{dialogueData:this._dialogueController.dataProvider.get(K?J.D.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_1:J.D.DIALOGUE_STUBBORN_SHADOW_FTUE_3),blockInput:!0},{dialogueData:this._dialogueController.dataProvider.get(K?J.D.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_2:J.D.DIALOGUE_STUBBORN_SHADOW_FTUE_4),blockInput:!0},{callback:()=>{K?this._rooftopInterface.removePortalFTUE():this._rooftopInterface.removePMandPortalFTUE(q.x,q.y)}}]),this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(J.D.DIALOGUE_STUBBORN_SHADOW_FTUE_5),blockInput:!0},{dialogueData:this._dialogueController.dataProvider.get(J.D.DIALOGUE_STUBBORN_SHADOW_FTUE_6),blockInput:!0}]),this._dialogueController.start(!0,this.onFirstFTUEEnd.bind(this))}onFirstFTUEEnd(){this._owner.map.breadCrumbManager.completeBreadcrumb(Bt.M.StubbornShadowTutorialOneCompleted),this._mathTower.education.isCurrentAlgorithmBasicOrGameChallenge()?this.onShadowAppeared():(this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(J.D.DIALOGUE_STUBBORN_SHADOW_FTUE_7),blockInput:!0}]),this._dialogueController.start(!0,this.switchState.bind(this,J.D.STATE_CAMERA)))}onRooftopInterfaceCreated(){const q=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1);q.set(q.x+-J.D.BUTTON_OFFSET_X,q.y+J.D.BUTTON_OFFSET_Y),this._rooftopInterface.setAttackButtonPosition(q),this._rooftopInterface.attackButton.GameObject.active=!1,this._rooftopInterface.battleButton.GameObject.active=!1,this._rooftopInterface.quitButton.onClick.add(this.onQuitButtonClicked.bind(this)),this._rooftopInterface.attackButton.onClick.add(this.onAttackButtonClicked.bind(this)),this._rooftopInterface.onVictory.add(this.onVictory.bind(this)),this._rooftopInterface.onDefeat.add(this.onDefeat.bind(this)),this._rooftopInterface.onIncorrectAnswer.add(this.onWrongAnswer.bind(this)),this._rooftopInterface.onCorrectAnswer.add(this.onCorrectAnswer.bind(this,!1));const K=ct.U.isStepComplete(nt.B.PuppetMasterDefeated);this._rooftopInterface.topBanner.legacyTransform.x=K?-280:0;const z=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1),Y=z.x+=J.D.STUBBORN_SHADOW_PLAYER_OFFSET_X,Q=z.y+=J.D.STUBBORN_SHADOW_PLAYER_OFFSET_Y;this._owner.map.characterController.tweenToPosition(new et.I9Y(Y,Q),150),this._owner.map.characterController.Active=!1,setTimeout((()=>{this.updateCameraBounds()}),J.D.CHARACTER_TWEEN_DELAY_MS)}updateCameraBounds(){const q=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1);q.set(q.x+J.D.STUBBORN_SHADOW_OFFSET_X,q.y+J.D.STUBBORN_SHADOW_OFFSET_Y),this._owner.map.townRenderer.updateBounds(-J.D.STUBBORN_SHADOW_BOUNDS_OFFSET_X),this._owner.map.pageCamera.scrollToPosition(q.x-J.D.STUBBORN_SHADOW_CAMERA_OFFSET_X,q.y-J.D.CAMERA_Y_OFFSET),this._owner.map.pageCamera.onFullScrollCompleted.addOnce(this.cameraFinishedScrolling.bind(this,q.x,q.y),this)}cameraFinishedScrolling(q,K){this._owner.map.breadCrumbManager.isBreadcrumbComplete(Bt.M.StubbornShadowTutorialOneCompleted)?this._owner.switchParams.resumeBattle?this._rooftopInterface.resumeBattle(q,K):(this._rooftopInterface.onShadowSummoned.add(this.onShadowAppeared.bind(this)),this.makeStubbornShadowAppear()):this.startFTUE()}onQuitButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),Y.q.instance.prodigy.open.confirmationDialog(new $t.k(this._owner.localizer.getText(J.D.POPUP_STUBBORN_SHADOW_QUIT_BUTTON),this.switchState.bind(this,J.D.STATE_CAMERA),this._owner.localizer.getText(J.D.POPUP_STUBBORN_SHADOW_STAY_BUTTON),void 0,{atlas:J.D.ATLAS_STORE,name:"icon-large-exclamation"},Ht.E.Small,void 0,this._owner.localizer.getText(J.D.POPUP_STUBBORN_SHADOW_QUIT_TITLE),this._owner.localizer.getText(J.D.POPUP_STUBBORN_SHADOW_QUIT_BODY)))}makeStubbornShadowAppear(){const q=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1);q.set(q.x+J.D.STUBBORN_SHADOW_OFFSET_X,q.y+J.D.STUBBORN_SHADOW_OFFSET_Y),this._rooftopInterface.summonStubbornShadow(q.x,q.y)}onShadowAppeared(){this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(J.D.DIALOGUE_STUBBORN_SHADOW_DUEL_CHOICE),blockInput:!0,yes:this.onDuelStarted.bind(this),no:this.switchState.bind(this,J.D.STATE_CAMERA)}]),this._dialogueController.start(!0)}onDuelStarted(){this._rooftopInterface.startBattle()}onAttackButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._rooftopInterface.startAttack()}onVictory(){this._activeFloor.state=Rt.u.Complete,this.onCorrectAnswer(!0,this.onVictoryEnd.bind(this))}onVictoryEnd(){this._owner.map.breadCrumbManager.isBreadcrumbComplete(Bt.M.StubbornShadowTutorialTwoCompleted)?this.switchState(J.D.STATE_CAMERA):this.startFTUEEnding()}startFTUEEnding(){this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(J.D.DIALOGUE_STUBBORN_SHADOW_FTUE_8),blockInput:!0},{dialogueData:this._dialogueController.dataProvider.get(J.D.DIALOGUE_STUBBORN_SHADOW_FTUE_9),blockInput:!0},{callback:()=>{this._owner.map.breadCrumbManager.completeBreadcrumb(Bt.M.StubbornShadowTutorialTwoCompleted)}}]),this._dialogueController.start(!0,this.switchState.bind(this,J.D.STATE_CAMERA))}onDefeat(){this.switchState(J.D.STATE_SHROUD)}onWrongAnswer(){const q=this._mathTower.education.getSkillById(this._activeFloor.skillID);mt.g.isSkillLocked(q)&&this.switchState(J.D.STATE_SHROUD,{towerIndex:this._towerIndex,floorIndex:this._floorIndex})}onCorrectAnswer(q,K){const z=J.D.ROOFTOP_CORRECT_PAYOUT+(q?J.D.ZONE_CURRENCY_PAYOUT:0);this.giveCurrency(z,K)}giveCurrency(q,K){const z=this._owner.map.storeManager.getItemData(J.D.ASSET_TYPE_INTERIOR,this._owner.mathTower.activeFloor.roomID);if(!z)return;const Q=new pe;Q.add({type:"currency",ID:J.D.ZONE_CURRENCY_IDS[Number.parseInt(z.element)],N:q}),Y.q.instance.prodigy.open.gotItem(Q.getRewards(),K)}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],ve.prototype,"onQuitButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],ve.prototype,"onAttackButtonClicked",null);class ge extends Mt{onEnter(){if(this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this._activeFloor=this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex],!this._activeFloor.hasMaxBlocks){const q=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._buildInterface=this._mathTower.uiFactory.buildInterface(q),this._buildInterface.onCreate.add(this.onBuildInterfaceCreated.bind(this))}this._shroudInterface=this._mathTower.uiFactory.shroudLockInterface(),this._shroudInterface.onCreate.add(this.onShroudInterfaceCreated.bind(this)),this._owner.map.townRenderer.moveToFloor(this._towerIndex,this._floorIndex+1)}onExit(){this._shroudInterface.pendingClose=!0,et.Aq$.isDefined(this._buildInterface)&&(this._buildInterface.pendingClose=!0)}onShroudInterfaceCreated(){const q=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);if(this._shroudInterface.setCleanButtonPosition(new vt.Point(q.x-J.D.BUTTON_OFFSET_X,q.y+J.D.BUTTON_OFFSET_Y)),this._shroudInterface.makeCloudAppear(q.x,q.y+J.D.SHROUD_OFFSET_Y),this._shroudInterface.cleanButton.GameObject.active=!1,this._shroudInterface.setShroudCleansRemainingUI(this._activeFloor.cleansRemaining()),this._owner.map.breadCrumbManager.isBreadcrumbComplete(Bt.M.ShroudTutorialFirstTime))this.initUI();else{this._shroudInterface.setQuitButtonVisibility(!1);const q=ct.U.isStepComplete(nt.B.PuppetMasterDefeated);this._owner.dialogueController.addEvents([{dialogueData:this._owner.dialogueController.dataProvider.get(q?J.D.DIALOGUE_SHROUD_FTUE_POST_ENDGAME_1:J.D.DIALOGUE_SHROUD_FTUE_1),blockInput:!0},{dialogueData:this._owner.dialogueController.dataProvider.get(J.D.DIALOGUE_SHROUD_FTUE_2),blockInput:!0}]),this._owner.dialogueController.start(!0,this.initUI.bind(this))}}initUI(){this._shroudInterface.setQuitButtonVisibility(!0),this._shroudInterface.cleanButton.GameObject.active=!0,this._shroudInterface.quitButton.onClick.add(this.onQuitButtonClicked.bind(this)),this._shroudInterface.cleanButton.onClick.add(this.onCleanButtonClicked.bind(this)),!this._owner.switchParams.questionOnEnter&&this._owner.map.breadCrumbManager.isBreadcrumbComplete(Bt.M.ShroudTutorialFirstTime)||this.onCleanButtonClicked()}onQuitButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),Y.q.instance.prodigy.open.confirmationDialog(new $t.k(this._owner.localizer.getText(J.D.POPUP_SHROUD_QUIT_BUTTON),(()=>{this.switchState(J.D.STATE_CAMERA)}),this._owner.localizer.getText(J.D.POPUP_SHROUD_STAY_BUTTON),void 0,{atlas:J.D.ATLAS_STORE,name:"icon-large-exclamation"},Ht.E.Small,void 0,this._owner.localizer.getText(J.D.POPUP_SHROUD_QUIT_TITLE),this._owner.localizer.getText(J.D.POPUP_SHROUD_QUIT_BODY)))}onCleanButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._mathTower.openQuestionForShroud(this.onQuestionAnswered.bind(this))}onQuestionAnswered(q){this._activeFloor.onShroudQuestionAnswered(),this._shroudInterface.setShroudCleansRemainingUI(this._activeFloor.cleansRemaining()),this._owner.map.breadCrumbManager.isBreadcrumbComplete(Bt.M.ShroudTutorialFirstTime)||J.D.SHROUD_CLEAN_SPELLS-this._activeFloor.cleansRemaining()!=1?q?this.giveCurrency(J.D.SHROUD_CORRECT_PAYOUT,this.checkEndOfShroud.bind(this,q)):this.checkEndOfShroud(q):(this._shroudInterface.setQuitButtonVisibility(!1),this._shroudInterface.cleanButton.GameObject.active=!1,this._owner.map.breadCrumbManager.completeBreadcrumb(Bt.M.ShroudTutorialFirstTime),this._owner.dialogueController.addEvents([{dialogueData:this._owner.dialogueController.dataProvider.get(J.D.DIALOGUE_SHROUD_FTUE_3),blockInput:!0}]),this._owner.dialogueController.start(!0,(()=>{this._shroudInterface.cleanButton.GameObject.active=!0,this._shroudInterface.setQuitButtonVisibility(!0)})))}checkEndOfShroud(q){if(this._activeFloor.cleansRemaining()<=0){const K=q?J.D.SHROUD_CORRECT_PAYOUT:0;this.giveCurrency(J.D.ZONE_CURRENCY_PAYOUT+K,this.wrapUpState.bind(this))}}wrapUpState(){this._activeFloor.state=Rt.u.UnderConstruction,this._shroudInterface.cleanButton.GameObject.active=!1,this._shroudInterface.makeCloudDisappear(this.switchState.bind(this,J.D.STATE_CAMERA,{shroudComplete:!0}))}onBuildInterfaceCreated(){this._buildInterface.buildButton.GameObject.active=!1,et.Aq$.isDefined(this._shroudInterface.gameObject)&&this._shroudInterface.bringToTop()}giveCurrency(q,K){const z=this._owner.map.storeManager.getItemData(J.D.ASSET_TYPE_INTERIOR,this._activeFloor.roomID);let Q;Q=z?J.D.ZONE_CURRENCY_IDS[Number.parseInt(z.element)]:J.D.ZONE_CURRENCY_IDS[At.o.integerInRange(0,J.D.ZONE_CURRENCY_IDS.length)];const X=new pe;X.add({type:"currency",ID:Q,N:q}),Y.q.instance.prodigy.open.gotItem(X.getRewards(),K)}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],ge.prototype,"onQuitButtonClicked",null),(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],ge.prototype,"onCleanButtonClicked",null);class me extends Mt{onEnter(){this.onCreateHUD()}onCreateHUD(){this._owner.map.breadCrumbManager.isBreadcrumbComplete(Bt.M.DefaultItemsReceived)?(this._owner.map.storeManager.hasDefaultItems()||this._owner.map.storeManager.pushDefaultItems(),window.setTimeout((()=>{this.switchState(J.D.STATE_CAMERA)}),100)):(this._mathTower.uiFactory.hud.toggleVisible(!1),this._owner.map.storeManager.awardDefaultItems(this.onDefaultItemsAwarded.bind(this)))}onDefaultItemsAwarded(){this.switchState(J.D.STATE_CAMERA)}}var ye=z(82680),_e=z(22162);class Ee extends ye.W{get forceEnabledUp(){return this._forceEnabledUp}set forceEnabledUp(q){q!==this._forceEnabledUp&&(this._forceEnabledUp=q,this.updateButtonLock(q||this._pageCamera.CanMoveUp,this._component.upButton))}get forceEnabledDown(){return this._forceEnabledDown}set forceEnabledDown(q){q!==this._forceEnabledDown&&(this._forceEnabledDown=q,this.updateButtonLock(q||this._pageCamera.CanMoveDown,this._component.downButton))}get forceEnabledRight(){return this._forceEnabledRight}set forceEnabledRight(q){q!==this._forceEnabledRight&&(this._forceEnabledRight=q,this.updateButtonLock(q||this._pageCamera.CanMoveRight,this._component.rightButton))}get forceEnabledLeft(){return this._forceEnabledLeft}set forceEnabledLeft(q){q!==this._forceEnabledLeft&&(this._forceEnabledLeft=q,this.updateButtonLock(q||this._pageCamera.CanMoveLeft,this._component.leftButton))}constructor(q,K,z,Y){super(q,z.legacyTransform.group,J.D.UI_BUILD_COMPONENT_PREFAB,void 0,[J.D.ATLAS_STORE,J.D.ATLAS_TOWERTOWN,J.D.ATLAS_TOWERTOWN_MISC,J.D.ATLAS_BUTTONS]),this._component=null,this._parentGameObject=null,this._forceEnabledUp=!1,this._forceEnabledDown=!1,this._forceEnabledRight=!1,this._forceEnabledLeft=!1,this._pageCamera=K,this._prefabLoader=Y,this._parentGameObject=z;const Q=this._prefabLoader.loadFromGUID(J.D.UI_ARROW_HUD_PREFAB,this._parentGameObject);this._component=Q.findComponent(_e.B)}create(){this._component.upButton.onClick.add((()=>{this._pageCamera.scrollUp()}),this),this._component.downButton.onClick.add((()=>{this._pageCamera.scrollDown()}),this),this._component.leftButton.onClick.add((()=>{this._pageCamera.scrollLeft()}),this),this._component.rightButton.onClick.add((()=>{this._pageCamera.scrollRight()}),this),this._pageCamera.onAtEdgeChanged.add(this.updateButtonStates,this),this.updateButtonStates(),this._pageCamera.onBeginVerticalTween.add(this.onKeystrokeOfVerticalTween,this),this._pageCamera.onBeginHorizontalTween.add(this.onKeystrokeOfHorizontalTween,this)}onKeystrokeOfVerticalTween(q,K){K&&(this._pageCamera.y-q>0?this.makeScrollButtonPop(this._component.upButton,"CanMoveUp",this.forceEnabledUp):this.makeScrollButtonPop(this._component.downButton,"CanMoveDown",this.forceEnabledDown))}onKeystrokeOfHorizontalTween(q,K){K&&(this._pageCamera.x-q>0?this.makeScrollButtonPop(this._component.leftButton,"CanMoveLeft",this.forceEnabledLeft):this.makeScrollButtonPop(this._component.rightButton,"CanMoveRight",this.forceEnabledRight))}makeScrollButtonPop(q,K,z){const Y=this._pageCamera[K]||z;this.updateButtonLock(!1,q),setTimeout(this.updateButtonLock.bind(this,Y,q),J.D.BUTTON_FLASH_DURATION_MS)}close(){this.removeListeners(),super.close()}removeListeners(){this._component.upButton.onClick.removeAll(this),this._component.downButton.onClick.removeAll(this),this._component.leftButton.onClick.removeAll(this),this._component.rightButton.onClick.removeAll(this),this._pageCamera.onAtEdgeChanged.removeAll(this)}updateButtonLock(q,K){q?K.inputEnabled||(K.unlockState(),K.inputEnabled=!0):K.inputEnabled&&(K.lockState(ce.K.Disabled),K.inputEnabled=!1)}updateButtonStates(){this.updateButtonLock(this._pageCamera.CanMoveUp||this.forceEnabledUp,this._component.upButton),this.updateButtonLock(this._pageCamera.CanMoveDown||this.forceEnabledDown,this._component.downButton),this.updateButtonLock(this._pageCamera.CanMoveLeft||this.forceEnabledLeft,this._component.leftButton),this.updateButtonLock(this._pageCamera.CanMoveRight||this.forceEnabledRight,this._component.rightButton)}}var we=z(99625),Te=z(84317),Se=z(92150);class Ae{constructor(q,K){this._container=K.background.getChildAt(2),this._camera=q,this._screen=K,this.checkBackgroundLoaded()}destroy(){window.clearTimeout(this._timeoutID),this._camera.onUpdateHorizontalTween.removeAll(this)}checkBackgroundLoaded(){this._container.children.length>0?this.createBackgroundClone():this._timeoutID=window.setTimeout(this.checkBackgroundLoaded.bind(this),1)}createBackgroundClone(){this._backgroundImage=this._container.getChildAt(0),this._backgroundImage.addChild(new Se._(this._screen.prodigyGame,Y.q.instance.game.width,0,void 0,void 0,this._backgroundImage.texture)),this._camera.onUpdateHorizontalTween.add(this.updatePositions,this)}updatePositions(){this._backgroundImage.position.x=this._camera.x-this._camera.x%Y.q.instance.game.width}}var Ce=z(97071),Oe=z(83726),Ie=(z(34829),z(9439));class De{get town(){return this._town}get floor(){return this._floor}get skill(){return this._skill}get previousBlockCount(){return this._previousBlockCount}get newBlockCount(){return this._newBlockCount}get shouldAddStubbornShadow(){return this._shouldAddStubbornShadow}get shroudIsClearing(){return this._shroudIsClearing}get shouldAddShroud(){return this._shouldAddShroud}get hasRun(){return this._hasRun}constructor(q,K,z){this._shouldAddStubbornShadow=!1,this._newBlockCount=0,this._previousBlockCount=0,this._shroudIsClearing=!1,this._shouldAddShroud=!1,this._hasRun=!1,z&&(K.skillID=z.ID),this._shouldAddShroud=!K.hasShroud&&K.cleansRemaining(z)>0;const Y=this._shouldAddShroud||K.isRenovating;this._newBlockCount=Y?K.blockCount:mt.g.determineNewBlockCount(z,K),this._shroudIsClearing=K.hasShroud&&0===K.cleansRemaining(z),this._previousBlockCount=K.blockCount,this._shouldAddStubbornShadow=!!z&&mt.g.shouldHaveStubbornShadow(z,this._newBlockCount),this._town=q,this._floor=K,this._skill=z}applyChange(){this.hasRun||(this.apply(),this._hasRun=!0)}}class Re extends De{apply(){const q=(0,ut.last)(this.town.towers)||this.town.createTower();(q.canAddFloor()?q:this.town.createTower()).pushFloor(this.floor,!0,this.floor.isExternalBuild),this.floor.blockCount=this.newBlockCount}}class Pe extends De{constructor(q,K,z,Y=!1,Q=K.state){super(q,K,z),this._hasIncorrectState=Y,this._expectedState=Q}apply(){this.floor.blockCount=this.newBlockCount,this._hasIncorrectState&&(this._expectedState!==Rt.u.Complete||this.floor.isExternalBuild?this.floor.state=this._expectedState:this.floor.setComplete())}}class Me{get _allChanges(){return[...this._updates,...this._additions]}get hasPendingChanges(){return this._allChanges.some((q=>!q.hasRun))}get additions(){return this._additions}get updates(){return this._updates}get totalNewFloors(){return this._additions.length}get totalNewBlocks(){return this._updates.map((q=>q.newBlockCount-q.previousBlockCount)).reduce(((q,K)=>q+K),0)}get totalNewShrouds(){return this._allChanges.map((q=>q.shouldAddShroud?1:0)).reduce(((q,K)=>q+K),0)}get totalShroudsCleared(){return this._allChanges.map((q=>q.shroudIsClearing?1:0)).reduce(((q,K)=>q+K),0)}get totalNewStubbornShadows(){return this._allChanges.map((q=>q.shouldAddStubbornShadow?1:0)).reduce(((q,K)=>q+K),0)}get totalUpdateChanges(){return(0,ut.sum)([this.totalNewBlocks,this.totalNewFloors,this.totalShroudsCleared])}constructor(q,K){this._updates=q,this._additions=K}applyChanges(){this._allChanges.filter((q=>!q.hasRun)).forEach((q=>{q.applyChange()}))}}class Ne{static hasIncorrectFloorState(q,K,z=!1){return q.state!==this.determineExpectedFloorState(q,K,z)}static determineExpectedFloorState(q,K,z=!1){return K&&z?mt.g.isSkillMastered(K)?Rt.u.Complete:mt.g.isSkillLocked(K)?Rt.u.SkillLocked:mt.g.shouldHaveStubbornShadow(K,mt.g.determineNewBlockCount(K,q))?Rt.u.RooftopMastery:z?Rt.u.UnderConstruction:Rt.u.Complete:Rt.u.Complete}}class xe{static generateTownUpdateSummary(q,K,z){return new Me(xe.generateUpdates(q,K),xe.generateAdditions(q,z))}static generateAdditions(q,K){return K.map((K=>{if(!q.floors.find((q=>q.skillID===K.ID)))return new Re(q,(q=>{const K=new Ie.Z,z=At.o.seededRange(1,5,q);return K.frameID=z+1,K.isExternalBuild=!0,K.roomID=z,K.skillID=q,K.state=Rt.u.Complete,K})(K.ID),K)})).filter((q=>q))}static generateUpdates(q,K){const z=q.floors.length>0?q.floors[q.floors.length-1]:null;return q.floors.map((Y=>{const Q=this.findSkillByFloor(Y,K),X=Y===z;if(this.shouldUpdateFloor(Y,Q,X)){const K=Ne.hasIncorrectFloorState(Y,Q,X),z=Ne.determineExpectedFloorState(Y,Q,X);return new Pe(q,Y,Q,K,z)}})).filter((q=>q))}static findSkillByFloor(q,K){return K.find((K=>K.ID===q.skillID))}static shouldUpdateFloor(q,K,z=!1){return!K||q.skillID===K.ID&&(Ne.hasIncorrectFloorState(q,K,z)||mt.g.getBlockDiscrepancy(K,q)>0||mt.g.shouldHaveStubbornShadow(K,mt.g.determineNewBlockCount(K,q)))}}class Le extends et.uAl{constructor(){super(...arguments),this._playerTransitionTimeMS=1e3,this._floatTweenTimeMS=1400,this._wasGrounded=!0,this.transitionEase=et.GS3.Exponential.Out,this._playerContainer=null,this._floatling=null,this._camera=null}get playerContainer(){return this._playerContainer}set playerContainer(q){this.gameObject.legacyTransform.group.addChild(q),this._playerContainer=q}get floatling(){return this._floatling}set floatling(q){this._floatling=q}get camera(){return this._camera}set camera(q){this._camera&&(this._camera.onBeginHorizontalTween.removeAll(this),this._camera.onBeginVerticalTween.removeAll(this)),this._camera=q,this._camera&&(this._camera.onBeginHorizontalTween.add(this.onBeginHorizontalCameraMovement,this),this._camera.onBeginVerticalTween.add(this.onBeginVerticalCameraMovement,this))}create(){super.create(),this._game=Y.q.instance.game}onEnable(){super.onEnable(),this._camera&&(this._camera.onBeginHorizontalTween.add(this.onBeginHorizontalCameraMovement,this),this._camera.onBeginVerticalTween.add(this.onBeginVerticalCameraMovement,this))}onDisable(){super.onDisable(),this._camera&&(this._camera.onBeginHorizontalTween.removeAll(this),this._camera.onBeginVerticalTween.removeAll(this))}onBeginHorizontalCameraMovement(q){this.Active&&(this._horizontalTween&&this._horizontalTween.stop(),this._horizontalTween=this._game.add.tween(this._playerContainer,this).to({x:q+J.D.PLAYER_CAMERA_OFFSET_X},this._playerTransitionTimeMS,this.transitionEase,!0))}onBeginVerticalCameraMovement(q){if(!this.Active)return;this._verticalTween&&this._verticalTween.stop();let K=q+J.D.PLAYER_CAMERA_OFFSET_Y;this._camera.CanMoveDown||(K=J.D.PLAYER_CAMERA_OFFSET_Y),this._verticalTween=this._game.add.tween(this._playerContainer,this).to({y:K},this._playerTransitionTimeMS,this.transitionEase,!0),this._verticalTween.onTweenComplete.removeAll(this),this.checkGrounded(K)}tweenToPosition(q,K=this._playerTransitionTimeMS,z=0,Y=this.transitionEase){this.Active&&(this._verticalTween&&this._verticalTween.stop(),this._horizontalTween&&this._horizontalTween.stop(),this._horizontalTween=this._game.add.tween(this._playerContainer,this).to({x:q.x},K,Y,!0,z),this._verticalTween=this._game.add.tween(this._playerContainer,this).to({y:q.y},K,Y,!0,z),this._verticalTween.onTweenComplete.removeAll(this),this.checkGrounded(q.y))}tweenFloatling(q,K){this._swoopyTween&&this._swoopyTween.stop(),this._swoopyTween=this._game.add.tween(this._floatling,this).to({x:q,y:K-20},this._floatTweenTimeMS,et.GS3.Quadratic.InOut).to({x:q,y:K},this._floatTweenTimeMS,et.GS3.Quadratic.InOut).loop(!0),this._swoopyTween.start()}float(q){q?this.playerContainer.float(!0):(this.playerContainer.float(!1),this.playerContainer.stand())}checkGrounded(q){this.floatling&&(!this._wasGrounded&&q>J.D.PLAYER_BASE_Y?(this.playerContainer.isMounted()||this.float(!1),this._wasGrounded=!0,this.floatling.position.set(J.D.SWOOPY_OFFSET_X-10,0),this.tweenFloatling(J.D.SWOOPY_OFFSET_X-10,0)):this._wasGrounded&&q<=J.D.PLAYER_BASE_Y&&(this.float(!0),this.floatling.position.set(J.D.SWOOPY_OFFSET_X,J.D.SWOOPY_OFFSET_Y),this.tweenFloatling(J.D.SWOOPY_OFFSET_X,J.D.SWOOPY_OFFSET_Y),this._wasGrounded=!1))}}class ke extends Oe.T{constructor(){super(...arguments),this._mathTower=null,this._storeManager=null,this._prefabLoader=null,this._breadcrumbManager=null}get characterController(){return this._characterController}setup(q,K,z){super.setup(q,K,z),this._breadcrumbManager.init(),q.transparent=!1;const Q=K.backgroundGameObject.addComponent(et.bE_),X=new Ce.p(this.game);Q.Installers.push(X),Q.runInstallers(),this._towerRoot=new et._mx(K.backgroundGameObject),this.setupCameraController(),Y.q.instance.prodigy.notifications.pause(this)}cleanup(){this._mathTower.destroy(),this.screen&&(this.screen.showMenu=!0),this._pageCamera.Active=!1,this._pageCamera.destroy(),Y.q.instance.prodigy.notifications.resume(this),Y.q.instance.prodigy.load.removeAssets(),super.cleanup()}setupCameraController(){this._pageCamera=this.screen.backgroundGameObject.addComponent(Ft),this._pageCamera.setTransitionDistanceScreenRatio(.5,.5)}setupCharacterController(){const q=Y.q.instance.prodigy.create.spine(J.D.SWOOPY_OFFSET_X,J.D.SWOOPY_OFFSET_Y,J.D.SPINE_SWOOPY);q.setToSetupPose(),q.setAnimationByName(0,"pickup",!0),this.screen.user.addChild(q),this.screen.user.hideName(),this.screen.user.float(!0),this.zone.hideFollow(this.screen),this._characterController=this.screen.backgroundGameObject.addComponent(Le),this._characterController.playerContainer=this.screen.user,this._characterController.floatling=q,this._characterController.camera=this._pageCamera,this._characterController.tweenToPosition(new et.I9Y(this._pageCamera.x,this._pageCamera.y))}generateTown(q=!1){const K=q?J.D.TUTORIAL_GRADE:this._mathTower.getGrade();this._town=this._mathTower.setCurrentTown(String(K),q)}refreshVisibleTown(){this._townRenderer.refreshVisibleFloors()}get pageCamera(){return this._pageCamera}get breadCrumbManager(){return this._breadcrumbManager}get storeManager(){return this._storeManager}get townRenderer(){return this._townRenderer}showInfinityTowerDialog(q=!1){this._stateManager.currentState!==this._stateManager.states.get(J.D.STATE_BUILD)&&(!this._mathTower.isInfinity&&this._mathTower.shouldUseInfinityTowerMode()?this._mathTower.uiFactory.showInfinityTowerIsOpen(this.onGoToInfinityButtonClicked.bind(this),this.onCloseInfinityTowerOpenDialog.bind(this)):this._mathTower.shouldUseBuildMode()&&(this._mathTower.isInfinity?this._mathTower.uiFactory.showTowerTownIsOpen(this.onGoToTowerTownClicked.bind(this),this.onCloseTowerTownOpenDialog.bind(this)):q&&!this._mathTower.isInfinity&&this._mathTower.uiFactory.showInfinityTowerIsClosed()))}onCloseTowerTownOpenDialog(){this._stateManager.changeToState(J.D.STATE_INFINITY,{backToTowerTown:!0})}onGoToTowerTownClicked(){this._stateManager.changeToState(J.D.STATE_INFINITY,{backToTowerTown:!0})}onCloseInfinityTowerOpenDialog(){this._stateManager.changeToState(J.D.STATE_CAMERA)}onGoToInfinityButtonClicked(){this._stateManager.changeToState(J.D.STATE_INFINITY,{enteringInfinity:!0})}generateTownUpdateSummary(q,K){const z=this._mathTower.education.getSkillsByGrade(K),Y=this._mathTower.education.getSkillsMasteredByGrade(K);return xe.generateTownUpdateSummary(q,z,Y)}}var Be=z(91207),Ue=z(30857);class Fe extends et._mx{get decorations(){return this._decorations}set floatlingPool(q){this._floatlingPool=q}set decorationPool(q){this._decorationPool=q}get onClick(){return this._onClickSignal}constructor(q,K,z){super(K),this._underConstruction=!1,this._decorationIDs=[],this._decorationPositions=[],this._mathTower=null,this._decorations=[],this._storeManager=null,this._prefabLoader=null,this._quickRenoPrefab=null,this._quickRenoComponent=null,this._onClickSignal=new et.HN0,this._onFinishAssetLoad=null,this._storeManager=q,this._game=Y.q.instance.game,this.addComponent(et.K16),this._mathTower=z;const Q=new et._mx(this);Q.addComponent(et.K16),this._skillBadgeFlag=Q.addComponent(wt._),this._skillBadgeFlag.setAnchor(1,1);const X=this._skillBadgeFlag.GameObject.legacyTransform.group;X.scale.set(-1,1),X.position.x+=183,X.position.y-=60,X.visible=!1;const Z=X.parent;X.setParent(this.legacyTransform.group),X.updateTransform(),X.setParent(Z);const J=new et._mx(this);J.addComponent(et.K16),this._skillBadge=J.addComponent(wt._),this._skillBadge.setAnchor(1,1);const tt=this._skillBadge.GameObject.legacyTransform.group;tt.position.x+=275,tt.position.y-=80,tt.visible=!1;const it=tt.parent;tt.setParent(this.legacyTransform.group),tt.updateTransform(),tt.setParent(it);const st=new et._mx(this);st.addComponent(et.K16),this._interior=st.addComponent(wt._);const nt=new et._mx(this);nt.addComponent(et.K16),this._frameLeft=nt.addComponent(wt._);const at=new et._mx(this);at.addComponent(et.K16),this._frameRight=at.addComponent(wt._),this._interior.setAnchor(.5,1),this._frameLeft.setAnchor(1,1),this._frameRight.setAnchor(1,1),this._frameRight.GameObject.legacyTransform.group.scale.set(-1,1);const rt=this._frameRight.GameObject.legacyTransform.group.parent;X.setParent(this.legacyTransform.group),this._frameRight.GameObject.legacyTransform.group.updateTransform(),this._frameRight.GameObject.legacyTransform.group.setParent(rt),this._flattenedSprite=Y.q.instance.prodigy.create.image(0,0,null,null),this._flattenedSprite.anchor.set(.5,1),this._flattenedSprite.alpha=.75,this.legacyTransform.group.addChild(this._flattenedSprite),this._frameLeft.setInputEnabled(!0),this._frameRight.setInputEnabled(!0),this._frameLeft.getEvents().onInputDown.add(this.floorClicked.bind(this)),this._frameRight.getEvents().onInputDown.add(this.floorClicked.bind(this)),this._prefabLoader=Y.q.instance.prodigy.gameContainer.get("983-05a7")}hideFloor(){this.disposeDecorations(),this.disposeFloatlings(),this._onFinishAssetLoad=null,this.active=!1,this._floor.onUpdate.removeAll(this),this._floor=null,et.Aq$.isDefined(this._quickRenoPrefab)&&this.removeQuickRenoPrefab()}floorClicked(){this._onClickSignal.dispatch()}disposeDecorations(){this._decorations.forEach((q=>{this.legacyTransform.group.removeChild(q.GameObject.legacyTransform.group),q.GameObject.active=!1})),this._decorations=[],this._decorationIDs=[],this._decorationPositions=[]}disposeFloatlings(){this._floatlingLeft&&(this._floatlingLeft.GameObject&&(this._floatlingLeft.GameObject.active=!1),this._floatlingLeft=null),this._floatlingRight&&(this._floatlingRight.GameObject&&(this._floatlingRight.GameObject.active=!1),this._floatlingRight=null)}updateInterior(){this._interiorID=this._storeManager.getItemImageName(J.D.ASSET_TYPE_INTERIOR,this._floor.roomID,this._underConstruction),this._interior.setAsset(Be.E.getTowerTownImage(this._interiorID)).catch(et.RQr.createHandler("Error setting _interior"))}updateFrame(){this._frameID=this._storeManager.getItemImageName(J.D.ASSET_TYPE_FRAME,this._floor.frameID,this._underConstruction),this._frameLeft.setAsset(Be.E.getTowerTownImage(this._frameID)).catch(et.RQr.createHandler("Error setting _frameLeft")),this._frameRight.setAsset(Be.E.getTowerTownImage(this._frameID)).catch(et.RQr.createHandler("Error setting _frameRight"))}updateUnderConstruction(q=!1){const K=this._floor.isInBlueprintState();(this._underConstruction!==K||q)&&(this._underConstruction=K,this.updateInterior(),this.updateFrame(),this.updateDecorations(this._underConstruction),this.setObjectVisibility(this._underConstruction),this._underConstruction&&this.loadForBlueprint())}loadForBlueprint(){this._onFinishAssetLoad=this.drawTexture.bind(this),Y.q.instance.prodigy.load.assets([this._frameID,this._interiorID,...this._decorationIDs].map((q=>Be.E.getTowerTownImage(q))),(()=>{et.Aq$.isDefined(this._onFinishAssetLoad)&&this._onFinishAssetLoad()}))}displayFloor(q){if(this._floor){if(!this._floor.isExternalBuild&&this._floor===q)return;this._floor.onUpdate.removeAll(this)}this._floor=q,this._floor.onUpdate.add(this.onFloorUpdate,this),this.onUpdateFloorState(!0),this.updateFloatlings(),this.updateFlag()}setObjectVisibility(q){this._flattenedSprite.visible=q,this._frameRight.GameObject.active=!q,this._frameLeft.GameObject.active=!q,this._interior.GameObject.active=!q,this._decorations.forEach((K=>{K.GameObject.active=!q})),this.legacyTransform.group.setChildIndex(q?this._flattenedSprite:this._interior.GameObject.legacyTransform.group,0)}drawTexture(){const q=this._game.add.renderTexture(J.D.FRAME_WIDTH,J.D.FRAME_HEIGHT);this._frameLeft.setAsset(Be.E.getTowerTownImage(this._frameID)).catch(et.RQr.createHandler("Error setting _frameLeft for drawTexture")),this._frameRight.setAsset(Be.E.getTowerTownImage(this._frameID)).catch(et.RQr.createHandler("Error setting _frameRight for drawTexture")),this._interior.setAsset(Be.E.getTowerTownImage(this._interiorID)).catch(et.RQr.createHandler("Error setting _interior for drawTexture"));const K=this._interior.sprite.visible,z=this._frameLeft.sprite.visible,Y=this._frameRight.sprite.visible;this._frameRight.sprite.scale.x=-1,this._interior.sprite.visible=!0,this._frameLeft.sprite.visible=!0,this._frameRight.sprite.visible=!0,q.renderXY(this._interior.sprite,J.D.FRAME_HALF_WIDTH,J.D.FRAME_HEIGHT),q.renderXY(this._frameLeft.sprite,J.D.FRAME_HALF_WIDTH,J.D.FRAME_HEIGHT),q.renderXY(this._frameRight.sprite,J.D.FRAME_HALF_WIDTH,J.D.FRAME_HEIGHT),this._interior.sprite.visible=K,this._frameLeft.sprite.visible=z,this._frameRight.sprite.visible=Y,this._frameRight.sprite.scale.x=1;for(let Q=0;Qq.state===K.state?0:q.state===Ct.a.Awake?1:-1)),this.removeFloatlings(q,this._floatlingLeft),this.removeFloatlings(q,this._floatlingRight),this._floatlingLeft=this.trySetFloatling(q,this._floatlingLeft,-1),this._floatlingRight=this.trySetFloatling(q,this._floatlingRight,1)}removeFloatlings(q,K){if(K){const z=q.indexOf(K.floatling);z>=0&&q.splice(z,1)}}trySetFloatling(q,K,z=1){let Y=K;return 0===q.length?(Y&&(Y.GameObject.active=!1),null):(Y||(Y=this.getFloatling(J.D.FLOATLING_FLOOR_X_OFFSET*z,J.D.FLOATLING_FLOOR_Y_OFFSET)),Y.floatling=q[0],q.splice(0,1),Y)}getFloatling(q,K){const z=this._floatlingPool.getObject().findComponent(It);return this.legacyTransform.group.addChildAt(z.GameObject.legacyTransform.group,1),z.GameObject.legacyTransform.group.alpha=0,this._game.add.tween(z.GameObject.legacyTransform.group,this).to({alpha:1},500).start(),z.GameObject.legacyTransform.group.position.set(q,K),z}updateDecorations(q=!1){this.disposeDecorations(),this._floor.decorations.keys.forEach((K=>{const z=this._floor.decorations.getAt(K);if(z){const Y=this._decorationPool.getObject();this.parent.addChild(Y);const Q=this._floor.decorationPositions[K],X=this.legacyTransform.group;Y.legacyTransform.group.position.set(Q.x+X.position.x,Q.y+X.position.y);const Z=this._storeManager.getItemImageName(J.D.ASSET_TYPE_DECORATION,z.assetID,q),tt=Y.findComponent(wt._);tt.setAsset(Be.E.getTowerTownImage(Z)),this._decorations.push(tt),this._decorationPositions.push(Q),this._decorationIDs.push(Z)}}),this)}onFloatlingStateChange(q){q.state===Ct.a.Floating&&q.floor!==this._mathTower.activeFloor&&(this._floatlingLeft&&this._floatlingLeft.floatling===q&&(this._floatlingLeft.GameObject.legacyTransform.y+=this.legacyTransform.y,this.parent.descendFloatling(this._floatlingLeft,!0),this._floatlingLeft=null),this._floatlingRight&&this._floatlingRight.floatling===q&&(this._floatlingRight.GameObject.legacyTransform.y+=this.legacyTransform.y,this.parent.descendFloatling(this._floatlingRight,!0),this._floatlingRight=null),this.updateFloatlings())}onFloorUpdate(q){let K=!1;switch(q.getFinalNotification().type){case Et.L.FLOOR_SET_STATE:this.onUpdateFloorState(),this.updateFlag(this._floor.isComplete);break;case Et.L.FLOOR_SET_ROOM_ID:K=!0,this.updateInterior();break;case Et.L.FLOOR_SET_FRAME_ID:K=!0,this.updateFrame();break;case Et.L.FLOOR_SET_DECORATIONS:K=!0,this.updateDecorations();break;case Et.L.FLOATLING_SET_STATE:this.onFloatlingStateChange(q.getFinalNotification().source)}K&&this._underConstruction&&this.loadForBlueprint()}onUpdateFloorState(q=!1){this._floor.isExternalBuild&&!this._floor.isRenovating?(this.setQuickRenoPrefabVisibility(!0),this.setFloorVisibility(!1)):(this.setQuickRenoPrefabVisibility(!1),this.updateUnderConstruction(q))}setQuickRenoPrefabVisibility(q){et.Aq$.isDefined(this._quickRenoPrefab)||(this._quickRenoPrefab=this._prefabLoader.loadFromGUID(J.D.UI_QUICK_RENOVATION,this),this._quickRenoComponent=this._quickRenoPrefab.findComponent(Ue.G),this._quickRenoComponent.quickRenovationButton.onClick.add(this.floorClicked.bind(this))),this._quickRenoPrefab.active=q}removeQuickRenoPrefab(){this._quickRenoPrefab.destroy(),this._quickRenoPrefab=null}setFloorVisibility(q){this._frameLeft.GameObject.active=q,this._frameRight.GameObject.active=q,this._interior.GameObject.active=q,et.Aq$.isDefined(this._flattenedSprite)&&(this._flattenedSprite.visible=q)}onQuickRenoClicked(){this.setFloorVisibility(!0),this.setQuickRenoPrefabVisibility(!1)}updateFlag(q=!1){if(this._floor)if(!this._floor.isComplete||this._floor.isExternalBuild||this._mathTower.isInfinity||this._mathTower.currentTown.isTutorialTown)this._skillBadge.GameObject.legacyTransform.group.visible=!1,this._skillBadgeFlag.GameObject.legacyTransform.group.visible=!1;else{const q=this._mathTower.education.getSkillById(this._floor.skillID);if(q&&et.Aq$.isDefined(q.topicGameIconAssetId)){const K=q.topicGameIconAssetId;this.setFlag(K),this._skillBadge.setAsset(J.D.ATLAS_TOPIC_ICONS,`topic-pixel-${K}`),this._skillBadge.GameObject.legacyTransform.group.visible=!0}else this.setFlag(J.D.NO_SKILL_FLAG_ICON_ID),this._skillBadge.GameObject.legacyTransform.group.visible=!1;this._skillBadgeFlag.GameObject.legacyTransform.group.visible=!0}}setFlag(q){ut.includes(J.D.FLAG_ORANGE_SKILL_IDS,q)?this._skillBadgeFlag.setAsset(J.D.ATLAS_FLAGS,J.D.ASSET_ORANGE_FLAG_FRAME):ut.includes(J.D.FLAG_BLUE_SKILL_IDS,q)?this._skillBadgeFlag.setAsset(J.D.ATLAS_FLAGS,J.D.ASSET_BLUE_FLAG_FRAME):ut.includes(J.D.FLAG_RED_SKILL_IDS,q)?this._skillBadgeFlag.setAsset(J.D.ATLAS_FLAGS,J.D.ASSET_RED_FLAG_FRAME):ut.includes(J.D.FLAG_PURPLE_SKILL_IDS,q)?this._skillBadgeFlag.setAsset(J.D.ATLAS_FLAGS,J.D.ASSET_PURPLE_FLAG_FRAME):this._skillBadgeFlag.setAsset(J.D.ATLAS_FLAGS,J.D.ASSET_TURQOISE_FLAG_FRAME)}destroy(){this._onClickSignal.dispose(),super.destroy()}}var Ge=z(36648);class je extends et._mx{get onFloorClicked(){return this._floorClickedSignal}get onLuminTreeSpawned(){return this._luminTreeSpawnedSignal}constructor(q,K,z,Q,X){super(K),this.floors=[],this.descendingFloatlings=[],this._floorClickedSignal=new et.HN0,this._luminTreeSpawnedSignal=new et.HN0,this.addComponent(et.K16),this._mathTower=q,this._floorPool=z,this._ornamentPool=Q,this._floatlingPool=X,this._game=Y.q.instance.game,this.groundFloatlingContainer=new et._mx(this),this.groundFloatlingContainer.addComponent(et.K16),this._luminTreeSpine=null}set tower(q){et.Aq$.isDefined(this._tower)&&(this._tower.onUpdate.removeAll(this),this.hideTower()),this._tower=q,this._tower.onUpdate.add(this.onTowerUpdate,this),this.floors=[];for(let K=0;K{Lt.Z.bringToTop(q.GameObject.legacyTransform.group)}));const Y=!this._tower.isActiveTower,Q=z>=this._tower.floors.length-1,X=!this._tower.isInfinityTower,Z=0===this._mathTower.education.getPendingSkillsByGrade(this._mathTower.getGrade()).length,J=0===this._tower.floors.length;Y&&Q&&X||X&&Z?this.spawnLuminTree():et.Aq$.isDefined(this._luminTreeSpine)&&this.setLuminTreeVisibility(!1),X&&Z&&J&&this.setLuminTreeVisibility(!1),et.Aq$.isDefined(this._luminTreeSpine)&&Lt.Z.bringToTop(this._luminTreeSpine),Lt.Z.bringToTop(this.groundFloatlingContainer.legacyTransform.group)}refreshFloor(q,K=!1){this.floors[q]||(this.floors[q]=this._floorPool.getObject(),this.addChild(this.floors[q]),this.floors[q].legacyTransform.y=-q*J.D.FLOOR_HEIGHT),this.floors[q].displayFloor(this._tower.floors[q]),this.floors[q].onClick.removeAll(),this.floors[q].onClick.add(this.floorClicked.bind(this,q)),K&&this.realignTower()}realignTower(){this.floors.forEach((q=>{q&&Lt.Z.bringToTop(q.legacyTransform.group)}))}getFloor(q){return this.floors[q]||this.refreshFloor(q,!0),this.floors[q]}spawnLuminTree(q=!0){const K=-this._tower.floors.length*J.D.FLOOR_HEIGHT-J.D.LUMIN_TREE_OFFSET_Y;if(et.Aq$.isDefined(this._luminTreeSpine))return this.setLuminTreeVisibility(!0),void(this._luminTreeSpine.y=K);et.Aq$.isDefined(this._luminTreeSpine)||(this._luminTreeSpine=Y.q.instance.prodigy.create.spine(0,K,J.D.SPINE_LUMIN_TREE,this.legacyTransform.group),this._luminTreeSpine.setToSetupPose(),q?(this._luminTreeSpine.setAnimationByName(0,"grow",!1),this._luminTreeSpine.onComplete.add(this.luminTreeSpawned.bind(this))):this._luminTreeSpine.setAnimationByName(0,"idle-noglow",!0)),this._luminTreeSpine.y=K}setLuminTreeVisibility(q){this._luminTreeSpine.visible=q}luminTreeSpawned(){this._luminTreeSpine.onComplete.removeAll(),this._luminTreeSpine.setAnimationByName(0,"idle-noglow",!0),this._luminTreeSpawnedSignal.dispatch()}renderOrnaments(){if(!et.Aq$.isDefined(this.ornaments)){this.ornaments=[];for(let q=0;q0;)0===q.get(z[K]).length?(q.delete(z[K]),z.splice(K,1)):(this.addGroundFloatling(q.get(z[K]).shift()),K++),K%=z.length;this.updateGroundFloatlingBounds()}addGroundFloatling(q){const K=this._floatlingPool.getObject().findComponent(It);K.floatling=q,this.groundFloatlings.push(K),this.groundFloatlingContainer.addChild(K.GameObject)}disposeGroundFloatlings(){this.groundFloatlings&&(this.groundFloatlings.forEach((q=>{q.GameObject.active=!1})),this.groundFloatlings=null)}spawnAndDescendFloatlings(q){const K=this._floatlingPool.getObject().findComponent(It);K.onFloatingAssetLoaded.addOnce((()=>{this.descendFloatling(K,!1)})),K.floatling=q}descendFloatling(q,K){this.groundFloatlingContainer.addChild(q.GameObject),Lt.Z.bringToTop(this.groundFloatlingContainer.legacyTransform.group),this.descendingFloatlings.push(q),K||(q.GameObject.legacyTransform.x=(J.D.FRAME_HALF_WIDTH+50)*(2*At.o.integerInRange(0,2)-1)),q.floatDown(J.D.FLOATLING_WALK_AREA.y+J.D.FLOATLING_WALK_AREA.height,K,this.onFinishDescend.bind(this,q))}onFinishDescend(q){q.floatling.lastThrown=0;const K=this.descendingFloatlings.indexOf(q);this.descendingFloatlings.splice(K,1),-1===this._tower.floors.indexOf(q.floatling.floor)?this._tower.notifyUpdate(Et.L.TOWN_FIND_DESCENDED_FLOATLINGS_TOWER,q):this.addFloatlingRendererToGround(q)}addFloatlingRendererToGround(q){if(et.Aq$.isDefined(this.groundFloatlings)){if(this.groundFloatlings.push(q),this.updateGroundFloatlingBounds(!1),q.GameObject.parent!==this.groundFloatlingContainer){const K=q.GameObject.legacyTransform.group.getGlobalPosition().clone();this.groundFloatlingContainer.addChild(q.GameObject),q.GameObject.legacyTransform.group.updateTransform();const z=q.GameObject.legacyTransform.group.getGlobalPosition().clone();q.GameObject.legacyTransform.group.position=new vt.Point(q.GameObject.legacyTransform.group.position.x-(z.x-K.x),q.GameObject.legacyTransform.group.position.y-(z.y-K.y))}}else q.GameObject.active=!1}offsetWaitingViews(){const q=et.i7d.main;this.descendingFloatlings.filter((q=>q.waitingToDescend)).forEach((K=>{K.GameObject.legacyTransform.y=q.viewMatrix.ty-q.viewportSize.height,this.descendFloatling(K,!0)}))}updateGroundFloatlingBounds(q=!0){const K=et.M_G.clone(J.D.FLOATLING_WALK_AREA);K.height=K.height/this.groundFloatlings.length;for(let z=0;zJ.D.FLOATLING_IMMEDIATE_WALK_RATIO&&this.groundFloatlings[z].setRandomWalkTarget(),K.y+=K.height,Lt.Z.bringToTop(this.groundFloatlings[z].GameObject.legacyTransform.group)}onTowerUpdate(q){switch(q.getFinalNotification().type){case Et.L.TOWER_CREATE_FLOOR:case Et.L.TOWER_MOVE_FLOOR:case Et.L.TOWER_PUSH_FLOOR:case Et.L.TOWER_REMOVE_FLOOR:this.renderFloors(this._floorsStart,this._floorsEnd);break;case Et.L.FLOOR_PUSH_FLOATLING:const K=q.getFinalNotification().source;K.isExternalBuild?(this.disposeGroundFloatlings(),this.renderFloors(this._floorsStart,this._floorsEnd)):this.spawnAndDescendFloatlings(K.floatlings[K.floatlings.length-1])}}destroy(){this._floorClickedSignal.dispose(),this._luminTreeSpawnedSignal.dispose(),super.destroy()}}class $e extends et.uAl{constructor(){super(...arguments),this._towerRenderers=[],this._mathTower=null,this._leftMostIndex=0,this._rightMostIndex=0,this._bottomMostIndex=0,this._topMostIndex=0,this._floorClickedSignal=new et.HN0}get infinityRenderer(){return this._infinityRenderer}get towerRenderers(){return this._towerRenderers}set town(q){this._town&&this._town.onUpdate.removeAll(this),this._town=q,this._town.onUpdate.add(this.onTownUpdate,this),this.refreshRenderers()}get floorPool(){return this._floorPool}get decorationPool(){return this._decorationPool}get floatlingPool(){return this._floatlingPool}get bottomMostIndex(){return this._bottomMostIndex}get topMostIndex(){return this._topMostIndex}get onFloorClicked(){return this._floorClickedSignal}create(){super.create(),this._game=Y.q.instance.game,this._floorPool=new et.iyL(this.createFloor.bind(this)),this._decorationPool=new et.iyL(this.createDecoration.bind(this)),this._floatlingPool=new et.iyL(this.createFloatling.bind(this),this.resetFloatling.bind(this))}init(q,K,z,Y=!1,Q){this._mathTower=Q,this._camera=K,this._storeManager=z,this.town=q,this._isTutorial=Y,this._camera.onBeginHorizontalTween.add(this.onBeginHorizontalMove,this),this._camera.onUpdateVerticalTween.add(this.onVerticalMove,this),this._mathTower.onUpdate.add(this.onMathTowerUpdate.bind(this))}moveToFloor(q,K){const z=this._camera.transitionDistance.x*(q%2==0?q:q-1),Y=J.D.TOWER_BASE_Y-J.D.FLOOR_HEIGHT*K-J.D.CAMERA_Y_OFFSET;this._camera.scrollToPosition(z,Y)}onBeginHorizontalMove(q){q=this._camera.x-this._camera.transitionDistance.x?(this._leftMostIndex>0&&(this._leftMostIndex--,this._towerRenderers[this._leftMostIndex].renderFloors(this._bottomMostIndex,this._topMostIndex)),this._camera.onEndHorizontalTween.addOnce(this.onEndHorizontalStep,this)):q>this._camera.x&&q<=this._camera.x+this._camera.transitionDistance.x?(this._rightMostIndex{this._camera.onUpdateHorizontalTween.remove(this.onHorizontalMove),this.findHorizontalEdgeIndexes()})))}onEndHorizontalStep(){!this.isTowerOnScreen(this._leftMostIndex)&&this._leftMostIndex0&&(this._towerRenderers[this._rightMostIndex].hideTower(),this._rightMostIndex--)}onHorizontalMove(){this.findHorizontalEdgeIndexes();for(let q=0;q=this._leftMostIndex&&q<=this._rightMostIndex?this._towerRenderers[q].renderFloors(this._bottomMostIndex,this._topMostIndex):this._towerRenderers[q].hideTower()}onVerticalMove(){const q=this._bottomMostIndex,K=this._topMostIndex;if(this.findVerticalEdgeIndexes(),this._bottomMostIndex!==q||this._topMostIndex!==K){if(this._mathTower.isInfinity)return void this._infinityRenderer.renderFloors(this._bottomMostIndex,this._topMostIndex);for(let q=this._leftMostIndex;q<=this._rightMostIndex;q++)this._towerRenderers[q]&&this._towerRenderers[q].renderFloors(this._bottomMostIndex,this._topMostIndex)}}floorClicked(q,K){this._floorClickedSignal.dispatch(q,K)}isTowerOnScreen(q){if(q<0||q>=this._towerRenderers.length)return!1;const K=this._towerRenderers[q].legacyTransform.group.position.x-this._camera.x;return K>0&&K=this.bottomMostIndex&&q=this._towerRenderers.length){this._leftMostIndex--;break}for(this._rightMostIndex=this._towerRenderers.length-1;this._rightMostIndex>-1&&!this.isTowerOnScreen(this._rightMostIndex);)if(this._rightMostIndex--,this._rightMostIndex<0){this._rightMostIndex++;break}}findVerticalEdgeIndexes(){this._bottomMostIndex=-Math.floor((this._camera.y+this._camera.cameraHeight-J.D.TOWER_BASE_Y)/J.D.FLOOR_HEIGHT)-1,this._topMostIndex=this._bottomMostIndex+J.D.TOWER_RENDERER_CAMERA_HEIGHT,this._bottomMostIndex=Math.max(this._bottomMostIndex,0)}refreshVisibleFloors(){if(this._mathTower.isInfinity)this._infinityRenderer.renderFloors(this._bottomMostIndex,this._topMostIndex);else if(0!==this._towerRenderers.length)for(let q=this._leftMostIndex;q<=this._rightMostIndex;q++)this._towerRenderers[q].renderFloors(this._bottomMostIndex,this._topMostIndex)}createFloatling(){const q=new et._mx(this.GameObject);return q.addComponent(et.K16),q.addComponent(It),q}resetFloatling(q){q.active=!0,q.legacyTransform.group.alpha=1,q.legacyTransform.group.visible=!0,q.legacyTransform.group.scale.set(1,1);q.findComponent(It).spine.setSlotVisibility("shadow",!0)}createFloor(){const q=new Fe(this._storeManager,null,this._mathTower);return q.floatlingPool=this._floatlingPool,q.decorationPool=this._decorationPool,q}createDecoration(){const q=new et._mx;q.addComponent(et.K16);return q.addComponent(wt._).setAnchor(.5,.5),q}checkAwardFloatlings(q){q.canReceiveFloatlings&&q.awardFloatlings(this._storeManager)}offsetWaitingFloatlings(){this._mathTower.isInfinity?this._infinityRenderer&&this._infinityRenderer.offsetWaitingViews():this._towerRenderers.forEach((q=>{q.offsetWaitingViews()}))}onTownUpdate(q){if(this.GameObject.active)switch(q.getFinalNotification().type){case Et.L.TOWN_CREATE_TOWER:case Et.L.TOWN_PUSH_TOWER:this.addTowerRenderer(!0);break;case Et.L.TOWN_REMOVE_TOWER:this._towerRenderers.pop().destroy(),this._rightMostIndex>=this._towerRenderers.length&&(this._rightMostIndex=this._towerRenderers.length-1);break;case Et.L.TOWER_CREATE_FLOOR:case Et.L.TOWER_PUSH_FLOOR:case Et.L.TOWER_MOVE_FLOOR:case Et.L.TOWER_REMOVE_FLOOR:this.updateBounds(),this.refreshVisibleFloors();break;case Et.L.FLOOR_SET_STATE:this._isTutorial||this.checkAwardFloatlings(q.getLastChild().source);break;case Et.L.TOWN_FIND_DESCENDED_FLOATLINGS_TOWER:const K=q.getLastChild().value;if(-1!==this._infinityRenderer.tower.floors.indexOf(K.floatling.floor))break;for(let q=0;q(0,lt.sH)(this,void 0,void 0,(function*(){if(!this.breadCrumbManager.isBreadcrumbComplete(Bt.M.TutorialCompleted))return Y.q.instance.prodigy.world.playScene(J.D.TUTORIAL_CUTSCENE),void this.cleanup(!1);this.setupRenderers(),this.setupCharacterController(),this.setupFTUEElements(),this.setupNavButtons(Y.q.instance.prodigy.open.menusGameObject),this.setupHUD(),this.setupStateManager(),this.setupNotifications(),setTimeout(this.processTownUpdates.bind(this),500)})),X=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;ct.U.progressData.step===nt.B.NotStarted&&X.hasFoundAllKeystones()?pt.E.runAllKeystonesSequenceOnMapSetup(Q):Q().catch(et.RQr.createHandler("TowerTownMap setup error finishing setup"))}cleanup(q=!0){var K;this.game.broadcaster.removeAppListener(J.D.MESSAGE_DISABLE_NAVIGATION,this),this.game.broadcaster.removeAppListener(J.D.MESSAGE_ENABLE_NAVIGATION,this),this.game.broadcaster.removeAppListener(J.D.MESSAGE_DISABLE_FLING_BUTTON,this),this.game.broadcaster.removeAppListener(J.D.MESSAGE_ENABLE_FLING_BUTTON,this),this.game.broadcaster.removeAppListener(J.D.MESSAGE_ENABLE_BUTTON,this),this.game.broadcaster.removeAppListener(J.D.MESSAGE_DISABLE_BUTTON,this),this._town&&this._town.onUpdate.removeAll(this),this._repeatingBackgroundController&&this._repeatingBackgroundController.destroy(),this.screen&&(q&&(null===(K=this.screen.menuBar)||void 0===K||K.destroy(),this.screen.menuBar=null),this.screen.showMenu=!0,this.screen.user.showName(),this.screen.user.float(!1)),this._mathTower.isInfinity=!1,this._hudContainer&&this._hudContainer.destroy(),this._mathTower.education.onUpdate.removeAll(this),super.cleanup()}setupCameraController(){super.setupCameraController(),this._pageCamera.registerKeyListeners(bt.D.UP,bt.D.DOWN,bt.D.LEFT,bt.D.RIGHT),this._pageCamera.registerKeyListeners(bt.D.W,bt.D.S,bt.D.A,bt.D.D)}setupNotifications(){this._mathTower.education.onUpdate.add(this.onEducationNotification,this)}generateTown(q=!1){super.generateTown(q);this._mathTower.currentTown.towers.length>0?this._mathTower.activeTower.isActiveTower=!0:this._mathTower.currentTown.createTower(),this.addCurrentTownAssets()}addCurrentTownAssets(){const q=[ft._.Towertown_frames_store_json,ft._.Towertown_interiors_store_json];et.Mnj.addAll(this.assets,q)}setupRenderers(){this._requiredLayers.forEach((q=>{let K=et.wa5.getActiveScene().getLayer(q);K||(K=et.wa5.getActiveScene().addLayer(q)),K.attachToCamera=!0}));const q=new et._mx(this.screen.backgroundGameObject);q.addComponent(et.K16),this._townRenderer=q.addComponent($e),this._townRenderer.init(this._town,this._pageCamera,this._storeManager,!1,this._mathTower),this._repeatingBackgroundController=new Ae(this.pageCamera,this.screen),this.game.stage.setBackgroundColor(J.D.TOWN_BG_COLOR)}setupCharacterController(){this.screen.user.position.set(J.D.PLAYER_CAMERA_OFFSET_X,J.D.PLAYER_CAMERA_OFFSET_Y),et.Aq$.isDefined(this.screen.user.follow)&&this.screen.user.follow.position.set(J.D.PLAYER_CAMERA_OFFSET_X,J.D.PLAYER_CAMERA_OFFSET_Y),super.setupCharacterController()}setupFTUEElements(){this._awakeFloatlings=this._mathTower.getFloatlingsForFling().length,this.breadCrumbManager.isBreadcrumbComplete(Bt.M.FlingUnlocked)&&!this.breadCrumbManager.isBreadcrumbComplete(Bt.M.FlingTutorialComplete)&&this._awakeFloatlings{this._mathTower.setClickable(!0)}),this),this.game.broadcaster.addAppListener(J.D.MESSAGE_DISABLE_BUTTON,(()=>{this._mathTower.setClickable(!1)}),this)}setupStateManager(){this._stateManager=new yt(this._mathTower,this._prefabLoader,this),this._stateManager.addState(J.D.STATE_CAMERA,new jt(this._pageCamera,this.cameraHUDInterface)),this._stateManager.addState(J.D.STATE_CHOOSE_FLOOR,new Vt),this._stateManager.addState(J.D.STATE_BUILD,new Nt),this._stateManager.addState(J.D.STATE_START,new me),this._stateManager.addState(J.D.STATE_SHROUD,new ge),this._stateManager.addState(J.D.STATE_ROOFTOP,new ve),this._stateManager.addState(J.D.STATE_MOVE,new fe),this._stateManager.addState(J.D.STATE_INFINITY,new ue(this._townRenderer)),this._stateManager.addState(J.D.STATE_INFINITY_CHOOSE_FLOOR,new he),this._stateManager.addState(J.D.STATE_INFINITY_BUILD,new oe),this._stateManager.addState(J.D.STATE_FLING,new ae(this._townRenderer.floatlingPool)),this._stateManager.addState(J.D.STATE_QUICK_RENO,new be)}disableNavigation(){this._mathTower.uiFactory.hud.toggleVisible(!1),this._mathTower.setClickable(!1),this._hudContainer.active=!1,this._pageCamera.onDisable()}enableNavigation(){this._mathTower.uiFactory.hud.toggleVisible(!0),this._hudContainer.active=!0,this._mathTower.setClickable(!0),this._pageCamera.onEnable()}enableFlingButton(){this._mathTower.uiFactory.hud.toggleFlingButton(!0)}disableFlingButton(){this._mathTower.uiFactory.hud.toggleFlingButton(!1)}setAllFloatlingsLastThrownTime(q,K){for(let z=0;z{z.lastThrown=q,z.state=K}))}processTownUpdates(){const q=this.generateTownUpdateSummary(this._town,this._mathTower.getGrade());q.hasPendingChanges?(this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_DISABLE_NAVIGATION),q.applyChanges(),q.totalUpdateChanges>0?(this._stateManager.dialogueController.addEvents([{dialogueData:this._stateManager.dialogueController.dataProvider.get(J.D.DIALOGUE_WELCOME_BACK),blockInput:!0,yes:()=>{this._mathTower.showTownUpdate(q,(()=>{Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this.startNewGradeSequence()}))},no:this.startNewGradeSequence.bind(this)}]),this._stateManager.dialogueController.start(!0)):this.startNewGradeSequence()):this.startNewGradeSequence()}startNewGradeSequence(){this._mathTower.newGrade?(this._mathTower.newGrade=!1,this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_DISABLE_NAVIGATION),this._mathTower.uiFactory.openNewGradePopup((()=>{this._mathTower.game.broadcaster.broadcast(J.D.MESSAGE_ENABLE_NAVIGATION),setTimeout((()=>{this.startGame()}),500)}))):this.startGame()}startGame(){this._mathTower.uiFactory.start(),this._stateManager.changeToState(J.D.STATE_START),this.setupInfinityTowerListener()}setupInfinityTowerListener(){this._mathTower.onUpdate.add((q=>{q.type===Et.L.TOWER_TOWN_INFINITY_TOWER_OPEN&&this.showInfinityTowerDialog()}))}checkFlingBreadcrumb(q){this.breadCrumbManager.isBreadcrumbComplete(Bt.M.FlingUnlocked)||q.state===Ct.a.Wandering&&(this._awakeFloatlings++,this._awakeFloatlings>=J.D.FLING_FTUE_FLOATLING_COUNT&&(this.breadCrumbManager.completeBreadcrumb(Bt.M.FlingUnlocked),this._mathTower.uiFactory.hud.updateBreadcrumbsLocked()))}beginFloatlingWander(){const q=(0,ut.shuffle)(this.townRenderer.floatlingPool.aliveList.generateArray());for(let z=0;z{this._buildInterface.forceRightAnswer(),this._buildInterface.buildButton.inputEnabled=!1}))}floorFinished(){this.completeFloor(),this.switchState(J.D.STATE_TUTORIAL_END)}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],We.prototype,"buildButtonClicked",null);class qe extends Mt{constructor(q){super(),this._toolTip=null,this._towerTownBreadcrumbManager=q}onEnter(){this._dialogueController=new Ve.Y(this._mathTower);const q=this._owner.nextFloorPosition();this._chooseFloor=this._mathTower.uiFactory.chooseFloorLook(q,this._towerTownBreadcrumbManager),this._chooseFloor.onCreate.add(this.setupTempFloor.bind(this)),this._chooseFloor.onCreate.add(this.bindButtons.bind(this)),this._chooseFloor.selectionChanged.add(this.selectionChanged.bind(this)),this._toolTip=Yt.A.displayToolTipSpeech(this._toolTip,Y.q.instance.prodigy.open.menusGameObject,{bodyText:Y.q.instance.prodigy.gameContainer.get(et.$Bt.LocalizationService).getText("TT_FTUE_CHOOSE_FLOOR"),xPosition:315,yPosition:350,arrowXRelPos:.7,arrowDirection:kt.i.DOWN}),this._owner.map.screen.backgroundGameObject.addChild(this._toolTip.GameObject)}bindButtons(){this._chooseFloor.startBuildingButton.onClick.add(this.onStartBuildingClicked.bind(this)),this._chooseFloor.quitButton.lockState(ce.K.Disabled),this._chooseFloor.quitButton.inputEnabled=!1,this._chooseFloor.framesToggleButton.GameObject.destroy(),this._chooseFloor.decorationsToggleButton.GameObject.destroy();const q=this.getFloorPosition(),K=q.x-J.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X;this._chooseFloor.startBuildingButton.GameObject.legacyTransform.group.position.set(K,q.y+J.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y)}getFloorPosition(){const q=this._mathTower.currentTown.towers.length-1,K=this._mathTower.currentTown.towers[q].floors.length;return this._owner.getFloorPosition(q+.5,K)}setupTempFloor(){let q=this._mathTower.activeTower;(!et.Aq$.isDefined(q)||q.floors.length>=gt.o.MAXIMUM_FLOOR_COUNT)&&(q=this._mathTower.currentTown.createTower()),this._tempFloor=q.createFloor(this._mathTower.currentSkillID),this._tempFloor.blockCount=J.D.MAX_SMART_BLOCKS,this._tempFloor.roomID=1,this._tempFloor.frameID=2,this._tempFloor.blockCount=mt.g.determineNewBlockCount(this._mathTower.education.getSkillById(this._tempFloor.skillID),this._tempFloor),this._dialogueController.addGuideHand(this._chooseFloor.roomsToggleButton.GameObject.legacyTransform.group,this._mathTower.game.width/2,30)}onStartBuildingClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._mathTower.uiFactory.tooltip(Y.q.instance.prodigy.gameContainer.get(et.$Bt.LocalizationService).getText("TT_FTUE_TUTORIAL"),!0,250,0,0),this._toolTip.close(),this._tempFloor.blockCount=0,this._chooseFloor.close(),this._mathTower.activeFloor.state=Rt.u.UnderConstruction,this._dialogueController.showCastSpells((()=>{this.switchState(J.D.STATE_TUTORIAL_BUILD)}))}selectionChanged(q){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._tempFloor.roomID=et.Aq$.isDefined(q.roomID)?q.roomID:1,this._tempFloor.frameID=et.Aq$.isDefined(q.frameID)?q.frameID:2,this._tempFloor.decorations.clear(),q.decorations&&q.decorations.forEach((K=>{this._tempFloor.decorations.setAt(K,q.decorations.get(K))})),this._hasChanged||(this._toolTip=Yt.A.displayToolTipSpeech(this._toolTip,Y.q.instance.prodigy.open.menusGameObject,{bodyText:Y.q.instance.prodigy.gameContainer.get(et.$Bt.LocalizationService).getText("TT_FTUE_START_BUILDING"),xPosition:640,yPosition:245,arrowXRelPos:.5,arrowDirection:kt.i.DOWN}),this._hasChanged=!0)}}(0,lt.Cg)([(0,Dt.sg)(J.D.BUTTON_DEBOUNCE_TIME),(0,lt.Sn)("design:type",Function),(0,lt.Sn)("design:paramtypes",[]),(0,lt.Sn)("design:returntype",void 0)],qe.prototype,"onStartBuildingClicked",null);var Ke=z(96810);class ze extends Mt{constructor(q,K){super(),this.tweenDelayMS=500,this.tweenFloatHorizontally=1e3,this.tweenFloatVertically=2800,this._pageCamera=q,this._breadcrumbManager=K}onEnter(){this._pageCamera.Active=!0,this._dialogueController=new Ve.Y(this._mathTower),this._dialogueController.showAllDone(this.spawnFloatlings.bind(this))}onExit(){this._pageCamera.Active=!1}spawnFloatlings(){const q=this.createFloatling(364,-100);this.tweenFloatling(q,420,400);const K=this.createFloatling(924,-100);this.tweenFloatling(K,988,445,600),this._dialogueController.showTutorialCompleted(this.completeTutorial.bind(this))}completeTutorial(){this._owner.map.storeManager.removeDefaultItems(),this._breadcrumbManager.completeBreadcrumb(Bt.M.TutorialCompleted),Y.q.instance.prodigy.world.it(J.D.TOWER_TOWN_MAP),Y.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:"Tower Town",funnelType:"tutorial",stepName:Ke.l.TutorialComplete})}createFloatling(q,K){const z=Y.q.instance.prodigy.create.spine(q,K,J.D.SPINE_SWOOPY);return z.setToSetupPose(),z.setAnimationByName(0,"idle",!0),z}tweenFloatling(q,K,z,Y=0){const Q=this._mathTower.game.add.tween(q,this).to({x:K},this.tweenFloatHorizontally,et.GS3.Quadratic.InOut).delay(this.tweenDelayMS+Y).yoyo(!0),X=this._mathTower.game.add.tween(q,this).to({y:z},this.tweenFloatVertically,et.GS3.Quadratic.InOut).delay(Y);Q.start(),X.start()}}class Ye extends Mt{constructor(q){super(),this._pageCamera=q}onEnter(){this._pageCamera.Active=!0,this._dialogueController=new Ve.Y(this._mathTower),this._owner.map.storeManager.pushDefaultItems(),this.spawnAddFloorPrefab()}onExit(){this._pageCamera.Active=!1,this._toolTip.destroy(),et.Aq$.isDefined(this._addFloor)&&et.Aq$.isDefined(this._addFloor.GameObject)&&(this._addFloor.addFloorButton.onClick.removeAll(),this._addFloor.GameObject.destroy()),et.Aq$.isDefined(this._buildInterface)&&this._buildInterface.close()}spawnAddFloorPrefab(){const q=this._owner.prefabLoader.loadFromGUID(J.D.UI_ADD_FLOOR_PREFAB,this._owner.map.screen.backgroundGameObject);this._addFloor=q.findComponent(Gt.R),q.legacyTransform.group.position=this._owner.nextFloorPosition(),q.legacyTransform.group.position.x+=J.D.FLOOR_TUTORIAL_OFFSET,this._addFloor.newTowerButton.GameObject.destroy(),this._addFloor.addFloorButton.GameObject.legacyTransform.y+=J.D.ADD_FLOOR_BUTTON_OFFSET,this._owner.moveToNextFloor(),this._addFloor.addFloorButton.onClick.add(this.onAddFloorButtonClicked.bind(this)),this._toolTip=this._mathTower.uiFactory.tooltip(Y.q.instance.prodigy.gameContainer.get(et.$Bt.LocalizationService).getText("TT_FTUE_TUTORIAL"),!0,250,0,0),this._addFloor.addFloorButton.inputEnabled=!1,Y.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:"Tower Town",funnelType:"tutorial",stepName:Ke.l.TutorialStart});const K=new et.I9Y(this._addFloor.addFloorButton.GameObject.legacyTransform.width,0);this._dialogueController.showSwoopyIntroduction(this._addFloor.addFloorButton.GameObject,K,(()=>{this._addFloor.addFloorButton.inputEnabled=!0}))}onAddFloorButtonClicked(){Y.q.instance.prodigy.audio.playSFX(J.D.BUTTON_CLICK_SFX_ID,J.D.BUTTON_CLICK),this._dialogueController.removeGuideHand(this._addFloor.addFloorButton.GameObject.legacyTransform.group),this.switchState(J.D.STATE_TUTORIAL_CHOOSE_FLOOR)}}class Qe extends ke{constructor(q,K,z,Y,Q,X){super(q,"A0","TOWER_TOWN_TUTORIAL_MAP",235,480,["towertown-A0"],X,"towertown-tutorial"),this._mathTower=K,this._breadcrumbManager=z,this._storeManager=Y,this._prefabLoader=Q}setup(q,K,z){super.setup(q,K,z);const Q=Y.q.instance.prodigy.create.spine(300,480,J.D.SPINE_SWOOPY,K.background);Q.setToSetupPose(),Q.setAnimationByName(0,"idle",!0),K.user.hideName(),this._pageCamera=K.backgroundGameObject.addComponent(Ft);const X=new et._mx(K.backgroundGameObject);X.addComponent(et.K16),this._townRenderer=X.addComponent($e),this._townRenderer.init(this._town,this._pageCamera,this._storeManager,!this._breadcrumbManager.isBreadcrumbComplete(Bt.M.TutorialCompleted),this._mathTower),this._mathTower.buildUIFactory(K,this),K.showMenu=!1,q.broadcaster.broadcast(at.Y1.HideHUD,at.HG.HUD),this._stateManager=new yt(this._mathTower,this._prefabLoader,this),this._stateManager.addState(J.D.STATE_TUTORIAL_START,new Ye(this._pageCamera)),this._stateManager.addState(J.D.STATE_TUTORIAL_CHOOSE_FLOOR,new qe(this._breadcrumbManager)),this._stateManager.addState(J.D.STATE_TUTORIAL_BUILD,new We),this._stateManager.addState(J.D.STATE_TUTORIAL_END,new ze(this._pageCamera,this._breadcrumbManager)),this._stateManager.changeToState(J.D.STATE_TUTORIAL_START),q.stage.setBackgroundColor(J.D.TUTORIAL_BG_COLOR)}cleanup(){super.cleanup()}}class Xe extends X.b{constructor(q){super(q),this.difficultyModeAgnostic=!0,this.name="TowerTownZone",this.ID=Xe.ZONE_ID,this.battleBG="towertown-default-2",this.defaultOnFaint="towertown-A1",this.questHub="towertown-A1",this.states=["firstVisit"],this.bgmID=J.D.TOWER_TOWN_BGM_ID,this.zoneIndex=Q.P.TowerTown;const K=Y.q.instance.prodigy.gameContainer.get(Z.G.MathTower),z=Y.q.instance.prodigy.gameContainer.get(Z.G.StoreManager),X=Y.q.instance.prodigy.gameContainer.get("983-05a7"),tt=Y.q.instance.prodigy.gameContainer.get(Z.G.BreadcrumbManager);this.maps={A0:new Qe(this,K,tt,z,X,Xe.ASSETS),A1:new He(this,K,tt,z,X,Xe.ASSETS)},this.scenes={intro:new dt(this,Xe.ASSETS)}}teleport(q,K,z,Y,Q){this.maps[q].generateTown("A0"===q),super.teleport(q,K,z,Y,Q)}teleportLoad(){Y.q.instance.prodigy.load.removeAssets(!0),super.teleportLoad()}}Xe.ZONE_ID=tt.A_.TOWERTOWN,Xe.ASSETS=[J.D.ATLAS_CORE,J.D.ATLAS_CORE_2,J.D.ATLAS_ICONS,J.D.ATLAS_UI_TITAN,J.D.ATLAS_SHIPWRECK_PROGRESS,J.D.ATLAS_SHIVERCHILL_PROGRESS,J.D.ATLAS_BUTTONS,J.D.ATLAS_DIALOGUES,J.D.ATLAS_STORE,J.D.ATLAS_REGISTRATION,J.D.ATLAS_TOWERTOWN_MISC,J.D.ATLAS_TOWERTOWN,J.D.ATLAS_PANELS,J.D.ATLAS_FLING_TARGETS,J.D.ATLAS_RESEARCH_POINTS,J.D.ATLAS_FLAGS,J.D.ATLAS_TOPIC_ICONS,J.D.ATLAS_SWOOPY_FACE,J.D.SPINE_SHADOW_PORTAL,J.D.SPINE_FLOATING_FIRE_1,J.D.SPINE_FLOATING_ICE_1,J.D.SPINE_FLOATLING_PLANT_1,J.D.SPINE_FLOATLING_STORM_1,J.D.SPINE_LUMIN_TREE,J.D.SPINE_SWOOPY,J.D.SPINE_FLING_SHIMMER,J.D.SPINE_STUBBORN_SHADOW,J.D.SPINE_SHROUD_CLOUD,J.D.SPINE_FLAGPOLE,J.D.PUPPETMASTER_BGM,J.D.TOWER_TOWN_BGM,J.D.FLOATLING_FLING_BGM,J.D.SHADOW_PORTAL_OPEN,J.D.SHADOW_PORTAL_CLOSE,J.D.TOWER_TOWN_SFX,J.D.FLOATLING_FLING_SFX,J.D.TILESET_CLOUD,J.D.TILESET_CLOUD_NEW,J.D.TILESET_COLLISIONS,J.D.TILESET_FOREST_NEW,J.D.TILESET_GENERIC,J.D.TILESET_GENERIC_NEW,J.D.TILESET_MATH_TOWER_BASIC,J.D.TILESET_TUTORIAL_SUBSPACE,J.D.TILESET_INFINITY_TOWER_CONSTRUCTION,J.D.TILESET_OUTSIDE,J.D.TILESET_TOWERTOWN_BASIC,J.D.TILESET_TOWN_NEW]},90161:(q,K,z)=>{"use strict";z.d(K,{R:()=>X});var Y=z(82680),Q=z(64794);class X extends Y.W{constructor(q,K,z,Y,X){super(q,K,Q.D.BASE_MENU_ASSET_ID,void 0,X),this._mathTower=z,this._prefabLoader=Y}get mathTower(){return this._mathTower}get prefabLoader(){return this._prefabLoader}}},3836:(q,K,z)=>{"use strict";z.d(K,{_:()=>nt,i:()=>Y});var Y,Q=z(62459),X=z(35120),Z=z(76974),J=z(64794),tt=z(15678),et=z(84938),it=z(90161),st=z(50860);!function(q){q[q.Normal=0]="Normal",q[q.Tutorial=1]="Tutorial",q[q[1/0]=2]="Infinity",q[q.QuickReno=3]="QuickReno"}(Y||(Y={}));class nt extends it.R{constructor(q,K,z,X,Z,tt,et,it=Y.Normal){super(q,K?K.legacyTransform.group:void 0,z,X,[J.D.ATLAS_MATH_TOWER,J.D.SPINE_SMART_BLOCK_VFX]),this._onBuildAnimationComplete=new Q.HN0,this._onFloorFinished=new Q.HN0,this._onWrongAnswer=new Q.HN0,this._parentGameObject=null,this._state=Y.Normal,this._parentGameObject=K,this._floor=Z,this._compX=tt,this._compY=et,this._state=it}create(){const q=this.prefabLoader.load(J.D.UI_BUILD_COMPONENT_PREFAB,this._parentGameObject);q.legacyTransform.group.position=q.legacyTransform.group.position.set(q.legacyTransform.group.position.x+this._compX,q.legacyTransform.group.position.y+this._compY),this._inProgressComponent=q.findComponent(st.v);for(let K=0;K{this.floorFinished()}),this._state===Y.Tutorial?this.quickBuild(q):this._state===Y.QuickReno?this.onSkillMastered(q):this.startBlockAnimation(q,K,!0,!0)}forceRightAnswer(){this.quickBuild(this._floor.blockCount)}onSkillMastered(q){this._floor.blockCount=J.D.MAX_SMART_BLOCKS,this.dropBlocks(q,J.D.MAX_SMART_BLOCKS,this.floorFinished.bind(this))}dropBlocks(q,K,z){for(let Y=q;Y{if(this.game){let q;Y===K-1&&(q=z),this.startBlockAnimation(Y,q,!1,!1)}}),(Y-q)*J.D.BLOCK_FALL_MULTIPLE_DELAY)}quickBuild(q){this._floor.blockCount{this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=Z.K.Up,this._onBuildAnimationComplete.dispatch()}))):this.onSkillMastered(q)}get buildButton(){return this._inProgressComponent.buildButton}get onBuildAnimationComplete(){return this._onBuildAnimationComplete}get floorFinishedSignal(){return this._onFloorFinished}get wrongAnswerSignal(){return this._onWrongAnswer}get gameObject(){return this._gameObject}floorFinished(){this._state===Y.QuickReno&&(this._state=Y.Normal),this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=Z.K.Up,setTimeout((()=>{this._onFloorFinished.dispatch()}),100)}qiCallback(q){const K=this.mathTower.education.getSkillById(this._floor.skillID);tt.g.isSkillMastered(K)&&this._state!==Y.QuickReno?this.onSkillMastered(this._floor.blockCount):q?this.onRightAnswer(this._floor.blockCount):(this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=Z.K.Up,this._onWrongAnswer.dispatch())}infinityQiCallback(q){q?this.onRightAnswer(this._floor.blockCount++):(this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=Z.K.Up,this._onWrongAnswer.dispatch())}startBlockAnimation(q,K,z=!1,Y=!1){this._inProgressComponent.setBlockEnabled(q,!0),this._inProgressComponent.setBlockGraphicVisible(q,!1),this._floor.blockCount=q+1;const Q=this._inProgressComponent.blocks[q],Z=X.q.instance.prodigy.create.spine(J.D.BLOCK_OFFSET_X,J.D.BLOCK_OFFSET_Y-J.D.BLOCK_FALL_HEIGHT,J.D.SPINE_SMART_BLOCK_VFX);Q.legacyTransform.group.addChild(Z),Z.setToSetupPose(),Z.setAnimationByName(0,"appear",!1).timeScale=J.D.BLOCK_APPEAR_TIMESCALE,Z.onComplete.add(this.makeBlockTween.bind(this,q,Z,K,z,Y)),X.q.instance.prodigy.audio.playSFX(J.D.TOWER_TOWN_SFX_ID,J.D.DROP_BLOCK)}makeBlockTween(q,K,z,Y=!1,Q=!1){this._inProgressComponent.blocks[q];K.y=J.D.BLOCK_OFFSET_Y,K.setToSetupPose(),K.setAnimationByName(0,"land2",!1).timeScale=J.D.BLOCK_FALL_TIMESCALE,this.shakeScreen(J.D.BLOCK_FALL_SHAKE_ANIMATION_DELAY);K.onComplete.removeAll(),K.onComplete.add((()=>{Y&&(this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=Z.K.Up),this._inProgressComponent.setBlockGraphicVisible(q,!0),window.setTimeout((()=>{this.deleteSpine(K)}),1),Q&&this._onBuildAnimationComplete.dispatch()}).bind(this)),z&&K.onComplete.add(z)}deleteSpine(q){q.visible=!1,q.pendingDestroy=!0}shakeScreen(q=0){const K=this.game.world.getChildAt(0),z=this.game.add.tween(K,this).to({y:J.D.BLOCK_FALL_SHAKE_DISTANCE*et.B.screenShake.value},J.D.BLOCK_FALL_SHAKE_IN_TIME,Q.GS3.Linear.None,!1,q),Y=this.game.add.tween(K,this).to({y:0},J.D.BLOCK_FALL_SHAKE_OUT_TIME,Q.GS3.Bounce.Out);z.chain(Y),z.start()}}},14991:(q,K,z)=>{"use strict";var Y;z.d(K,{v:()=>Y}),function(q){q[q.Visible=0]="Visible",q[q.Hidden=1]="Hidden",q[q.SlidingOut=2]="SlidingOut",q[q.SlidingIn=3]="SlidingIn"}(Y||(Y={}))},67844:(q,K,z)=>{"use strict";z.d(K,{R:()=>tt});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152),J=z(64794);let tt=class extends Q.uAl{constructor(){super(...arguments),this._addFloorButton=null,this._newTowerButton=null}get addFloorButton(){return this._addFloorButton}get newTowerButton(){return this._newTowerButton}removeNewTowerButton(){this.newTowerButton.GameObject.destroy(),this.addFloorButton.GameObject.legacyTransform.y+=J.D.ADD_FLOOR_BUTTON_OFFSET}};(0,Y.Cg)([(0,Q.x4W)("addFloorButton"),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_addFloorButton",void 0),(0,Y.Cg)([(0,Q.x4W)("newTowerButton"),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_newTowerButton",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("AddFloorComponent",Z.Y.towerTown)],tt)},21573:(q,K,z)=>{"use strict";z.d(K,{s:()=>Q});var Y=z(62459);class Q extends Y.uAl{constructor(){super(...arguments),this._selected=new Y.HN0}get selected(){return this._selected}onSelection(){this._selected.dispatch(this.assetID,this.assetType)}destroy(){this._selected.dispose(),super.destroy()}}},22162:(q,K,z)=>{"use strict";z.d(K,{B:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._upButton=null,this._downButton=null,this._leftButton=null,this._rightButton=null}get upButton(){return this._upButton}get downButton(){return this._downButton}get leftButton(){return this._leftButton}get rightButton(){return this._rightButton}};(0,Y.Cg)([(0,Q.x4W)("upButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_upButton",void 0),(0,Y.Cg)([(0,Q.x4W)("downButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_downButton",void 0),(0,Y.Cg)([(0,Q.x4W)("leftButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_leftButton",void 0),(0,Y.Cg)([(0,Q.x4W)("rightButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_rightButton",void 0),J=(0,Y.Cg)([(0,Q.EVk)("CameraControlHUD",Z.Y.ui)],J)},25735:(q,K,z)=>{"use strict";z.d(K,{I:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._quitButton=null}get quitButton(){return this._quitButton}};(0,Y.Cg)([(0,Q.x4W)("QuitButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_quitButton",void 0),J=(0,Y.Cg)([(0,Q.EVk)("CornerQuitComponent",Z.Y.towerTown)],J)},99332:(q,K,z)=>{"use strict";var Y;z.d(K,{R:()=>Y}),function(q){q[q.StartBuilding=0]="StartBuilding",q[q.Quit=1]="Quit",q[q.Rooms=2]="Rooms",q[q.Frames=3]="Frames",q[q.Decorations=4]="Decorations",q[q.PageLeft=5]="PageLeft",q[q.PageRight=6]="PageRight"}(Y||(Y={}))},39258:(q,K,z)=>{"use strict";z.d(K,{p:()=>it});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(76974),J=z(83133),tt=z(28152),et=z(99332);let it=class extends Q.uAl{constructor(){super(...arguments),this._largeItems=[],this._smallItems=[],this._commandSignal=new Q.HN0}get commands(){return this._commandSignal}get largeItemPointer(){return this._largeItemPointer}get smallItemPointer(){return this._smallItemPointer}get largeItemContainer(){return this._largeItemContainer}get smallItemContainer(){return this._smallItemContainer}get largeItemPoints(){return this._largeItems}get smallItemPoints(){return this._smallItems}get quitButton(){return this._quit}get startBuildingButton(){return this._startBuilding}get roomsToggle(){return this._rooms}get framesToggle(){return this._frames}get decorationsToggle(){return this._decorations}pageLeftEnabled(q){this.setPageButtonEnabled(this._pageLeft,q)}pageRightEnabled(q){this.setPageButtonEnabled(this._pageRight,q)}setPageButtonEnabled(q,K){K?(q.unlockState(),q.currentState=Z.K.Up):q.lockState(Z.K.Disabled),q.inputEnabled=K}create(){super.create(),this._startBuilding.onClick.add((()=>{this._commandSignal.dispatch(et.R.StartBuilding)})),this._quit.onClick.add((()=>{this._commandSignal.dispatch(et.R.Quit)})),this._rooms.onSelected.add((()=>{this._commandSignal.dispatch(et.R.Rooms)})),this._frames.onSelected.add((()=>{this._commandSignal.dispatch(et.R.Frames)})),this._decorations.onSelected.add((()=>{this._commandSignal.dispatch(et.R.Decorations)})),this._pageLeft.onClick.add((()=>{this._commandSignal.dispatch(et.R.PageLeft)})),this._pageRight.onClick.add((()=>{this._commandSignal.dispatch(et.R.PageRight)}))}destroy(){super.destroy(),this._startBuilding.onClick.dispose(),this._quit.onClick.dispose(),this._rooms.onSelected.dispose(),this._frames.onSelected.dispose(),this._decorations.onSelected.dispose(),this._pageLeft.onClick.dispose(),this._pageRight.onClick.dispose(),this._commandSignal.dispose()}};(0,Y.Cg)([(0,Q.x4W)("startBuilding"),(0,Y.Sn)("design:type",X.$)],it.prototype,"_startBuilding",void 0),(0,Y.Cg)([(0,Q.x4W)("quit"),(0,Y.Sn)("design:type",X.$)],it.prototype,"_quit",void 0),(0,Y.Cg)([(0,Q.x4W)("pageLeft"),(0,Y.Sn)("design:type",X.$)],it.prototype,"_pageLeft",void 0),(0,Y.Cg)([(0,Q.x4W)("pageRight"),(0,Y.Sn)("design:type",X.$)],it.prototype,"_pageRight",void 0),(0,Y.Cg)([(0,Q.x4W)("rooms"),(0,Y.Sn)("design:type",J.l)],it.prototype,"_rooms",void 0),(0,Y.Cg)([(0,Q.x4W)("frames"),(0,Y.Sn)("design:type",J.l)],it.prototype,"_frames",void 0),(0,Y.Cg)([(0,Q.x4W)("decorations"),(0,Y.Sn)("design:type",J.l)],it.prototype,"_decorations",void 0),(0,Y.Cg)([(0,Q.x4W)("largeItemPointer"),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_largeItemPointer",void 0),(0,Y.Cg)([(0,Q.x4W)("smallItemPointer"),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_smallItemPointer",void 0),(0,Y.Cg)([(0,Q.x4W)("largeItemContainer"),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_largeItemContainer",void 0),(0,Y.Cg)([(0,Q.x4W)("smallItemContainer"),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_smallItemContainer",void 0),(0,Y.Cg)([(0,Q.x4W)("largeItems"),(0,Y.Sn)("design:type",Array)],it.prototype,"_largeItems",void 0),(0,Y.Cg)([(0,Q.x4W)("smallItems"),(0,Y.Sn)("design:type",Array)],it.prototype,"_smallItems",void 0),it=(0,Y.Cg)([(0,Q.EVk)("DecorateFloorComponent",tt.Y.towerTown)],it)},27314:(q,K,z)=>{"use strict";z.d(K,{V:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(49237),J=z(28152),tt=z(64794);let et=class extends Q.uAl{constructor(){super(...arguments),this._selected=new Q.HN0,this._deleted=new Q.HN0,this._image=null,this._tween=null}get onDelete(){return this._deleted}get onSelect(){return this._selected}get popupShowing(){return this._popup&&this._popup.active}create(){super.create(),this._deleteButton.onClick.add((()=>{this._deleted.dispatch()}),this),this._selectButton.onClick.add((()=>{this._selected.dispatch()}),this),this.showPopup(!1),this.showSelected(!1),this._tween=X.q.instance.game.add.tween(this._pointer.legacyTransform.group,this).to({y:-tt.D.SPACE_16PX},tt.D.POINTER_BOUNCE_MS,Q.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start()}destroy(){this._deleteButton.onClick.dispose(),this._selectButton.onClick.dispose(),this._selected.dispose(),this._deleted.dispose(),X.q.instance.game.tweens.remove(this._tween),this.clearAsset(),this.showPopup(!1),this.showSelected(!1),super.destroy()}setAsset(q){this.clearAsset(),this._image=X.q.instance.prodigy.create.sprite(0,0,q),this._image.inputEnabled=!0,this._image.events.onInputDown.add((()=>{this.showPopup(!0),this.onSelect.dispatch()}),this),this._itemSpawn.legacyTransform.group.addChild(this._image),this.showHardPoint(!1)}clearAsset(){this._image&&(this._image.events.onInputDown.dispose(),this._itemSpawn.legacyTransform.group.removeChild(this._image),this._image.destroy(),this._image=null),this.showHardPoint(!0)}showPointer(q){this._pointer.active=q}showHardPoint(q){this.showPopup(!1),this._image?this._selectButton.GameObject.active=!1:(this.showSelected(!1),this._selectButton.GameObject.active=q)}showPopup(q){this._popup.active=q}showSelected(q){this._selectButton.GameObject.active=!0,this._solid.active=q,this._pointer.active=q,this._dashed.active=!q}};(0,Y.Cg)([(0,Q.x4W)("deleteButton"),(0,Y.Sn)("design:type",Z.$)],et.prototype,"_deleteButton",void 0),(0,Y.Cg)([(0,Q.x4W)("selectButton"),(0,Y.Sn)("design:type",Z.$)],et.prototype,"_selectButton",void 0),(0,Y.Cg)([(0,Q.x4W)("pointer"),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_pointer",void 0),(0,Y.Cg)([(0,Q.x4W)("popup"),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_popup",void 0),(0,Y.Cg)([(0,Q.x4W)("itemSpawn"),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_itemSpawn",void 0),(0,Y.Cg)([(0,Q.x4W)("solid"),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_solid",void 0),(0,Y.Cg)([(0,Q.x4W)("dashed"),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_dashed",void 0),et=(0,Y.Cg)([(0,Q.EVk)("DecorationHardPoint",J.Y.towerTown)],et)},43054:(q,K,z)=>{"use strict";z.d(K,{R:()=>et});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152),J=z(79979),tt=z(21573);let et=class extends tt.s{get assetID(){return this._assetID}get assetType(){return this._assetType}get assetVisual(){return this._assetVisual}get assetVisualMirror(){return this._assetVisualMirror}get interior(){return this._interiorRoot}get frame(){return this._frameRoot}get counterText(){return this._counterText.TextObject.text}set counterText(q){this._counterText.text=q}get counter(){const q=this._counterText.TextObject.text;return q?parseInt(q):0}set counter(q){this._counterText.text=q.toString()}get counterVisible(){return this._counterRoot.active}set counterVisible(q){this._counterRoot.active=q}create(){super.create(),this._button.onClick.add(this.onSelection,this)}setData(q,K,z,Y){this._assetType=q,this._assetID=K,this.counter=z,this._counterRoot.active=Y}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_frameRoot",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_interiorRoot",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_counterRoot",void 0),(0,Y.Cg)([(0,Q.MnK)(J.Y),(0,Y.Sn)("design:type",J.Y)],et.prototype,"_assetVisual",void 0),(0,Y.Cg)([(0,Q.MnK)(J.Y),(0,Y.Sn)("design:type",J.Y)],et.prototype,"_assetVisualMirror",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],et.prototype,"_counterText",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],et.prototype,"_button",void 0),et=(0,Y.Cg)([(0,Q.EVk)("LargeAssetListComponent",Z.Y.towerTown)],et)},27292:(q,K,z)=>{"use strict";z.d(K,{B:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._rightButton=null,this._leftButton=null,this._cancelButton=null,this._saveButton=null,this._warningQuitButton=null,this._warningObject=null}get leftButton(){return this._leftButton}get rightButton(){return this._rightButton}get saveButton(){return this._saveButton}get cancelButton(){return this._cancelButton}get warningQuitButton(){return this._warningQuitButton}get warningObject(){return this._warningObject}get warningText(){return this._warningText}get arrowObject(){return this._arrowObject}};(0,Y.Cg)([(0,Q.x4W)("rightButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_rightButton",void 0),(0,Y.Cg)([(0,Q.x4W)("leftButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_leftButton",void 0),(0,Y.Cg)([(0,Q.x4W)("cancelButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_cancelButton",void 0),(0,Y.Cg)([(0,Q.x4W)("saveButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_saveButton",void 0),(0,Y.Cg)([(0,Q.x4W)("warningQuitButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_warningQuitButton",void 0),(0,Y.Cg)([(0,Q.x4W)("warningObject"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_warningObject",void 0),(0,Y.Cg)([(0,Q.x4W)("text"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_warningText",void 0),(0,Y.Cg)([(0,Q.x4W)("arrowObject"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_arrowObject",void 0),J=(0,Y.Cg)([(0,Q.EVk)("MoveFloorComponent",Z.Y.towerTown)],J)},6145:(q,K,z)=>{"use strict";z.d(K,{Q:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._buildButton=null,this._body=null,this._title=null}get closeButton(){return this._buildButton}};(0,Y.Cg)([(0,Q.x4W)("buildButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_buildButton",void 0),(0,Y.Cg)([(0,Q.x4W)("body"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_body",void 0),(0,Y.Cg)([(0,Q.x4W)("title"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_title",void 0),J=(0,Y.Cg)([(0,Q.EVk)("NewTownPopupComponent",Z.Y.towerTown)],J)},30857:(q,K,z)=>{"use strict";z.d(K,{G:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{get newTag(){return this._newTag}get quickRenovationButton(){return this._quickRenovationButton}get newTagText(){return this._newTagText}get bodyText(){return this._bodyText}setNewTagVisibility(q){this._newTag.active=q}};(0,Y.Cg)([(0,Q.x4W)("newTag"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_newTag",void 0),(0,Y.Cg)([(0,Q.x4W)("newTagText"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_newTagText",void 0),(0,Y.Cg)([(0,Q.x4W)("bodyText"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_bodyText",void 0),(0,Y.Cg)([(0,Q.x4W)("quickRenovationButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_quickRenovationButton",void 0),J=(0,Y.Cg)([(0,Q.EVk)("QuickRenovationComponent",Z.Y.towerTown)],J)},77175:(q,K,z)=>{"use strict";z.d(K,{W:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._quitButton=null,this._attackButton=null,this._battleButton=null,this._topBanner=null}get topBanner(){return this._topBanner}get quitButton(){return this._quitButton}get attackButton(){return this._attackButton}get battleButton(){return this._battleButton}};(0,Y.Cg)([(0,Q.x4W)("quitButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_quitButton",void 0),(0,Y.Cg)([(0,Q.x4W)("attackButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_attackButton",void 0),(0,Y.Cg)([(0,Q.x4W)("battleButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_battleButton",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_topBanner",void 0),J=(0,Y.Cg)([(0,Q.EVk)("RooftopMasteryComponent",Z.Y.towerTown)],J)},14151:(q,K,z)=>{"use strict";z.d(K,{q:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._quitButton=null,this._leftBarTransform=null,this._rightBarTransform=null,this._middleBarTransform=null,this._statusText=null,this._cleanButton=null,this._header=null,this._buttonBG=null}get quitButton(){return this._quitButton}get header(){return this._header}get buttonBG(){return this._buttonBG}get cleanButton(){return this._cleanButton}get leftBarTransform(){return this._leftBarTransform}get rightBarTransform(){return this._rightBarTransform}get middleBarTransform(){return this._middleBarTransform}set statusText(q){this._statusText.text=q}};(0,Y.Cg)([(0,Q.x4W)("QuitButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_quitButton",void 0),(0,Y.Cg)([(0,Q.x4W)("LeftBar"),(0,Y.Sn)("design:type",Q.K16)],J.prototype,"_leftBarTransform",void 0),(0,Y.Cg)([(0,Q.x4W)("RightBar"),(0,Y.Sn)("design:type",Q.K16)],J.prototype,"_rightBarTransform",void 0),(0,Y.Cg)([(0,Q.x4W)("MiddleBar"),(0,Y.Sn)("design:type",Q.K16)],J.prototype,"_middleBarTransform",void 0),(0,Y.Cg)([(0,Q.x4W)("StatusText"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_statusText",void 0),(0,Y.Cg)([(0,Q.x4W)("CleanButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_cleanButton",void 0),(0,Y.Cg)([(0,Q.x4W)("ShroudHeader"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_header",void 0),(0,Y.Cg)([(0,Q.x4W)("ButtonBG"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_buttonBG",void 0),J=(0,Y.Cg)([(0,Q.EVk)("ShroudLockComponent",Z.Y.towerTown)],J)},69046:(q,K,z)=>{"use strict";z.d(K,{t:()=>tt});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152),J=z(21573);let tt=class extends J.s{constructor(){super(...arguments),this._counterRoot=null,this._assetRoot=null,this._counterText=null,this._button=null}get counterVisible(){return this._counterRoot.active}set counterVisible(q){this._counterRoot.active=q}get assetRoot(){return this._assetRoot}get counter(){const q=this._counterText.TextObject.text;return q?parseInt(q):0}set counter(q){this._counterText.text=q.toString()}get assetID(){return this._assetID}get assetType(){return this._assetType}create(){super.create(),this._button=this.GameObject.findComponent(X.$),this._button.onClick.add(this.onSelection,this)}setData(q,K,z,Y){this._assetType=q,this._assetID=K,this.counter=z,this._counterRoot.active=Y}};(0,Y.Cg)([(0,Q.x4W)("counterRoot"),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_counterRoot",void 0),(0,Y.Cg)([(0,Q.x4W)("assetRoot"),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_assetRoot",void 0),(0,Y.Cg)([(0,Q.x4W)("counterText"),(0,Y.Sn)("design:type",Q.EYj)],tt.prototype,"_counterText",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("SmallAssetListComponent",Z.Y.towerTown)],tt)},41666:(q,K,z)=>{"use strict";z.d(K,{Z:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(64794);let J=class extends Q.uAl{get root(){return this._root}get height(){return this._toolTip?this._toolTip.legacyTransform.group.height:0}get width(){return this._toolTip.legacyTransform.group.width}set width(q){this._toolTip.legacyTransform.anchorX=.5,this._toolTip.legacyTransform.group.x+=Z.D.TOOLTIP_OFFSET_X,this._toolTip.legacyTransform.group.width=q}get text(){return this._text.text}set text(q){this._text.text=q}};(0,Y.Cg)([(0,Q.x4W)("root"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_root",void 0),(0,Y.Cg)([(0,Q.x4W)("toolTip"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_toolTip",void 0),(0,Y.Cg)([(0,Q.x4W)("text"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_text",void 0),J=(0,Y.Cg)([(0,Q.EVk)("ToolTipComponent",X.Y.ui)],J)},50860:(q,K,z)=>{"use strict";z.d(K,{v:()=>et});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152),J=z(25132),tt=z(64794);let et=class extends Q.uAl{constructor(){super(...arguments),this._buildButton=null,this._blocks=[]}get buildButton(){return this._buildButton}set buildButton(q){this._buildButton=q}get blocks(){return this._blocks}setBlockEnabled(q,K){q<0||q>=tt.D.MAX_SMART_BLOCKS||(this._blocks[q].active=K)}setBlockGraphicVisible(q,K){this._blocks[q]&&(this._blocks[q].findComponent(J.$)._singleImage.alpha=K?1:0)}};(0,Y.Cg)([(0,Q.x4W)("buildButton"),(0,Y.Sn)("design:type",X.$)],et.prototype,"_buildButton",void 0),(0,Y.Cg)([(0,Q.x4W)("blocks"),(0,Y.Sn)("design:type",Array)],et.prototype,"_blocks",void 0),et=(0,Y.Cg)([(0,Q.EVk)("TowerTownInProgressFloor",Z.Y.towerTown)],et)},20583:(q,K,z)=>{"use strict";z.d(K,{u:()=>tt});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152),J=z(14991);let tt=class extends Q.uAl{constructor(){super(...arguments),this._chooseTownButton=null,this._floatlingFlingButton=null,this._storeButton=null,this._settingsButton=null,this._sliderButton=null,this._hudUI=null,this._chevrons=[]}get chooseTownButton(){return this._chooseTownButton}get floatlingFlingButton(){return this._floatlingFlingButton}get storeButton(){return this._storeButton}get settingsButton(){return this._settingsButton}get sliderButton(){return this._sliderButton}get hudUI(){return this._hudUI}setSlideIndicator(q){this._chevrons.forEach((K=>{K.GameObject.legacyTransform.group.scale.x=q===J.v.Hidden?-1:1}))}};(0,Y.Cg)([(0,Q.x4W)("chooseTownButton"),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_chooseTownButton",void 0),(0,Y.Cg)([(0,Q.x4W)("floatlingFlingButton"),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_floatlingFlingButton",void 0),(0,Y.Cg)([(0,Q.x4W)("storeButton"),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_storeButton",void 0),(0,Y.Cg)([(0,Q.x4W)("settingsButton"),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_settingsButton",void 0),(0,Y.Cg)([(0,Q.x4W)("sliderButton"),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_sliderButton",void 0),(0,Y.Cg)([(0,Q.x4W)("hudUI"),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_hudUI",void 0),(0,Y.Cg)([(0,Q.x4W)("chevrons"),(0,Y.Sn)("design:type",Array)],tt.prototype,"_chevrons",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("TowerTownHUDComponent",Z.Y.towerTown)],tt)},30376:(q,K,z)=>{"use strict";z.d(K,{l:()=>it});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(49237),J=z(89400),tt=z(28152),et=z(95946);let it=class extends J.B{constructor(){super(...arguments),this._elementalMap=new Map,this._button=null,this._headerText=null,this._currencyText=null,this._jars=[],this._colourSplash=[]}get headerText(){return this._headerText.TextObject.text}set headerText(q){this._headerText.text=q}get currencyText(){return this._currencyText.TextObject.text}set currencyText(q){this._currencyText.text=q}create(){super.create(),this._elementalMap.set(et.a.Fire,0),this._elementalMap.set(et.a.Ice,1),this._elementalMap.set(et.a.Plant,2),this._elementalMap.set(et.a.Storm,3),this._elementalMap.set(et.a.Water,4)}destroy(){super.destroy()}updateContentView(q){this._storeID=q.storeID;const K=!!Q.Aq$.isDefined(q.hatStore)&&q.hatStore;if(this._jars.forEach((q=>q.active=!1)),this._colourSplash.forEach((q=>q.active=!1)),this._headerText.GameObject.active=!K,this._currencyText.GameObject.active=!K,this._cartIcon.active=!K,this._hatStoreText.active=K,this._hatIcon.active=K,this._hatStoreColourSplash.active=K,!K){const K=this._elementalMap.get(q.type);this.headerText=`${X.capitalize(q.type)} Shop`,this.currencyText=q.playerCurrency.toString(),this._jars[K].active=!0,this._colourSplash[K].active=!0}this._button.onClick.add((()=>{this.onClick.dispatch(this._storeID)}))}};(0,Y.Cg)([(0,Q.x4W)("button"),(0,Y.Sn)("design:type",Z.$)],it.prototype,"_button",void 0),(0,Y.Cg)([(0,Q.x4W)("header"),(0,Y.Sn)("design:type",Q.EYj)],it.prototype,"_headerText",void 0),(0,Y.Cg)([(0,Q.x4W)("currency"),(0,Y.Sn)("design:type",Q.EYj)],it.prototype,"_currencyText",void 0),(0,Y.Cg)([(0,Q.x4W)("jars"),(0,Y.Sn)("design:type",Array)],it.prototype,"_jars",void 0),(0,Y.Cg)([(0,Q.x4W)("hatStoreText"),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_hatStoreText",void 0),(0,Y.Cg)([(0,Q.x4W)("hatStoreColourSplash"),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_hatStoreColourSplash",void 0),(0,Y.Cg)([(0,Q.x4W)("cartIcon"),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_cartIcon",void 0),(0,Y.Cg)([(0,Q.x4W)("hatIcon"),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_hatIcon",void 0),(0,Y.Cg)([(0,Q.x4W)("colourSplashes"),(0,Y.Sn)("design:type",Array)],it.prototype,"_colourSplash",void 0),it=(0,Y.Cg)([(0,Q.EVk)("TowerTownShopComponent",tt.Y.towerTown)],it)},36730:(q,K,z)=>{"use strict";z.d(K,{f:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._closeButton=null}get closeButton(){return this._closeButton}};(0,Y.Cg)([(0,Q.x4W)("closeButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_closeButton",void 0),J=(0,Y.Cg)([(0,Q.EVk)("TowerTownShoppingMallComponent",Z.Y.towerTown)],J)},82443:(q,K,z)=>{"use strict";z.d(K,{O:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._blocksText=null,this._shroudsText=null,this._floorsText=null,this._closeButton=null}set blocksText(q){this._blocksText.text=q}set shroudsText(q){this._shroudsText.text=q}set floorsText(q){this._floorsText.text=q}get closeButton(){return this._closeButton}};(0,Y.Cg)([(0,Q.x4W)("blocksText"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_blocksText",void 0),(0,Y.Cg)([(0,Q.x4W)("shroudsText"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_shroudsText",void 0),(0,Y.Cg)([(0,Q.x4W)("floorsText"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_floorsText",void 0),(0,Y.Cg)([(0,Q.x4W)("closeButton"),(0,Y.Sn)("design:type",X.$)],J.prototype,"_closeButton",void 0),J=(0,Y.Cg)([(0,Q.EVk)("TowerTownUpdateComponent",Z.Y.towerTown)],J)},81670:(q,K,z)=>{"use strict";z.d(K,{s:()=>Q});var Y=z(64794);class Q{static getFloatlingAssetID(q,K){const z=Y.D.ELEMENT_STRINGS.indexOf(q);return-1===z?0:this.floatlingSpineIDs[z][K+1]}}Q.floatlingSpineIDs={},Q.FLOATLING_PREFIX="spine-npc-floatling-"},15678:(q,K,z)=>{"use strict";z.d(K,{g:()=>X});var Y=z(95891),Q=z(64794);class X{static determineJustLocked(q,K){return!this.isSkillLocked(q)&&this.isSkillLocked(K)}static determineJustUnlocked(q,K){return this.isSkillLocked(q)&&!this.isSkillLocked(K)}static determineJustMastered(q,K){return!this.isSkillMastered(q)&&this.isSkillMastered(K)}static shouldHaveShroud(q){return this.isSkillLocked(q)}static shouldHaveStubbornShadow(q,K){return!this.isSkillMastered(q)&&!this.isSkillLocked(q)&&this.isBlockCountIsAtMaximumAllowed(K)&&this.isSkillCorrectCountAtBlockCountMaximum(q)}static getBlockDiscrepancy(q,K){const z=q.totalCorrectCount-K.blockCount,Y=Q.D.MAX_SMART_BLOCKS-K.blockCount;return Y=Q.D.MAX_SMART_BLOCKS}static isSkillCorrectCountAtBlockCountMaximum(q){return q.totalCorrectCount>=Q.D.MAX_SMART_BLOCKS}static getCurrentSkillByGrade(q,K){return(0,Y.first)(this.getSkillsByGrade(q,K).filter((q=>!this.isSkillMastered(q)&&!this.isSkillLocked(q))))}static getSkillsByGrade(q,K){return q.filter((q=>q.grade===K))}static getSkillsMasteredByGrade(q,K){return(0,Y.orderBy)(q.filter((q=>this.isSkillMastered(q))),["dateMastered"]).filter((q=>q.grade===K))}static getPendingSkillsByGrade(q,K){return q.filter((q=>!this.isSkillMastered(q)&&q.grade===K))}static getSkillById(q,K){return(0,Y.find)(q,["ID",K])}static answersToUnlock(q){return q?q.lock:0}static isAvailable(q){return q.isAvailable}static isSkillMastered(q){return q.hasBeenMastered}static isSkillLocked(q){return q.lock>0}static hasMaximumTheta(q){return q.theta===Q.D.THETA_MAXIMUM}static hasMinimumTheta(q){return q.theta===Q.D.THETA_MINIMUM}static isSkillIdMobileFriendly(q,K){return!(0,Y.includes)(K,q)}}},82271:(q,K,z)=>{"use strict";z.d(K,{S:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546);let J=class extends Z.D{getMemberJarData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.MemberJar.GetMemberJarData,{},!1)}))}updateMemberJarRewards(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K={rewardsToAppend:q.filter((q=>!q.isSecure))};return this.makeCloudscriptRequest(X.D.MemberJar.UpdateMemberJarRewards,K,!1)}))}resetMemberJarData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K={sevenlevelsExperimentRedeemed:q};return this.makeCloudscriptRequest(X.D.MemberJar.ResetMemberJarData,K,!1)}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},78365:(q,K,z)=>{"use strict";z.d(K,{Q:()=>X});var Y=z(24521),Q=z(23029);class X{static getMemberJarDropData(){return Q.R.loadData(Y.r.MemberJarData_json)}}},47917:(q,K,z)=>{"use strict";z.d(K,{P:()=>at});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(29834),tt=z(97518),et=z(64353),it=z(95057),st=z(47255),nt=z(34616);let at=class extends Q.uAl{constructor(){super(...arguments),this._hideWhenEmpty=!1,this._syncRibbonVisibilityWithJar=!0,this._thresholds=[],this.onUpdateViewItemCount=new Q.HN0,this.onReadyToOpenJar=new Q.HN0,this.onJarAppearFinished=new Q.HN0,this.onJarUseFinished=new Q.HN0,this.onJarRewardsSequenceFinished=new Q.HN0,this._stopOngoingAnimation=new Q.HN0}create(){super.create(),this._thresholds.sort(((q,K)=>K.atLeastFraction-q.atLeastFraction)),this._jarVisual&&this._hideWhenEmpty&&(this._jarVisual.GameObject.active=!1),this._ribbonVisual&&this._hideWhenEmpty&&this._syncRibbonVisibilityWithJar&&(this._ribbonVisual.active=!1),this._jarIsFullGameObject&&(this._jarIsFullGameObject.active=!1),this._rewardCountText&&(this._rewardCountText.GameObject.active=!1),this._goldCountText&&(this._goldCountText.GameObject.active=!1),this._currencyCountText&&(this._currencyCountText.GameObject.active=!1),this._moreItemsCountText&&(this._moreItemsCountText.GameObject.active=!1),this._starCountText&&(this._starCountText.GameObject.active=!1)}showEntityUpdate(q){this.updateView(q,!0)}showEntity(q){this.updateView(q,!1)}showEntityRedeem(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._jarVisual)return;this._jarVisual.GameObject.active=!0;const K=this.findThreshold(q);K.useAnimation&&(this._jarVisual.playAnimation(K.useAnimation,!1,!0),yield this.completeVisualAnimation());const z=this.findThreshold({savedBattleCount:0,savedRewards:[]});this._jarVisual.playAnimation(z.idleAnimation,!0)}))}updateView(q,K){var z;const Y=this.countTotalRewardsInEntity(q),Q=this.countCurrentStoredStars(),X=Y.total+Q,Z=!this._hideWhenEmpty||X>0;this.onUpdateViewItemCount.dispatch(X),(null===(z=this._jarVisual)||void 0===z?void 0:z.GameObject)&&(this._jarVisual.GameObject.active=Z),this._ribbonVisual&&this._syncRibbonVisibilityWithJar&&(this._ribbonVisual.active=Z),this._rewardCountText&&(this._rewardCountText.setTextArguments(X),this._rewardCountText.GameObject.active=X>0),this._goldCountText&&(this._goldCountText.setTextArguments(Y.gold),this._goldCountText.GameObject.active=!0),this._currencyCountText&&(this._currencyCountText.setTextArguments(Y.currency),this._currencyCountText.GameObject.active=!0),this._moreItemsCountText&&(this._moreItemsCountText.setTextArguments(Y.moreItems,1===Y.moreItems?"":"s"),this._moreItemsCountText.GameObject.active=!0),this._starCountText&&(this._starCountText.setTextArguments(Q,1===Q?"":"s"),this._starCountText.GameObject.active=!0),this._jarIsFullGameObject.active=this.isJarFull(q),this.gameObject.active?this.animateJar(q,K):this.openJarIfReady(q)}isJarFull(q){return q.savedBattleCount>=nt.N.maximumSavedBattleCount}animateJar(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=this.findThreshold(q);if(K){if(this._jarVisual.playAnimation(z.appearAnimation,!1,!0),!(yield this.completeVisualAnimation()))return;this.onJarAppearFinished.dispatch()}this.openJarIfReady(q),K&&Q.Aq$.isDefined(z.nextAnimation)?this._jarVisual.playAnimation(z.nextAnimation,!0):this._jarVisual.playAnimation(z.idleAnimation,!0)}))}completeVisualAnimation(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._stopOngoingAnimation.dispatch(),Promise.race([this._jarVisual.OnAnimationComplete.asPromise().then((()=>!0),(()=>!1)),this._stopOngoingAnimation.asPromise().then((()=>!1),(()=>!1))])}))}findThreshold(q){var K;const z=0===q.savedBattleCount?Math.min(q.savedRewards.length,1):q.savedBattleCount;return null!==(K=this._thresholds.find((q=>z>=q.atLeastFraction*nt.N.maximumSavedBattleCount)))&&void 0!==K?K:this._thresholds[0]}countTotalRewardsInEntity(q){let K=0,z=0,Y=0;for(const{itemType:Q,quantity:X}of q.savedRewards)switch(Q){case"gold":K+=X;break;case"currency":z+=X;break;default:Y+=X}return{gold:K,currency:z,moreItems:Y,total:K+z+Y}}countCurrentStoredStars(){var q;return null!==(q=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.storedMemberStars)&&void 0!==q?q:0}isReadyToOpenJar(q){const K=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return(this.countTotalRewardsInEntity(q).total>0||this.countCurrentStoredStars()>0)&&K.hasMembership()}openJarIfReady(q){this.isReadyToOpenJar(q)&&this.onReadyToOpenJar.dispatch(q)}completeRewardsSequence(){this.onJarRewardsSequenceFinished.dispatch()}destroy(){this._stopOngoingAnimation.dispose(),this.onUpdateViewItemCount.dispose(),this.onReadyToOpenJar.dispose(),this.onJarAppearFinished.dispose(),this.onJarUseFinished.dispose(),this.onJarRewardsSequenceFinished.dispose(),super.destroy()}sendPurchaseFunnelStart(q="Member-Jar",K="Member-Jar"){const z=X.q.instance.prodigy.gameContainer.get("20f-5f67"),Y=et.P.shouldUseUnifiedConversionFlow(st.o.FunnelMemberJar)?it.R.UnifiedConversionFlow:it.R.Static;z.purchase.sendFunnelStart({adType:Y,category:q,contentId:void 0,type:K,adVersion:et.P.getAdVersion(st.o.FunnelMemberJar)})}};(0,Y.Cg)([(0,Q.MnK)(J.j),(0,Y.Sn)("design:type",J.j)],at.prototype,"_jarVisual",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],at.prototype,"_ribbonVisual",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],at.prototype,"_jarIsFullGameObject",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.R),(0,Y.Sn)("design:type",tt.R)],at.prototype,"_rewardCountText",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.R),(0,Y.Sn)("design:type",tt.R)],at.prototype,"_starCountText",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.R),(0,Y.Sn)("design:type",tt.R)],at.prototype,"_goldCountText",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.R),(0,Y.Sn)("design:type",tt.R)],at.prototype,"_currencyCountText",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.R),(0,Y.Sn)("design:type",tt.R)],at.prototype,"_moreItemsCountText",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_hideWhenEmpty",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_syncRibbonVisibilityWithJar",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Array)],at.prototype,"_thresholds",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onUpdateViewItemCount",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onReadyToOpenJar",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onJarAppearFinished",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onJarUseFinished",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onJarRewardsSequenceFinished",void 0),at=(0,Y.Cg)([(0,Q.EVk)("MemberJarController",Z.Y.membership)],at)},24473:(q,K,z)=>{"use strict";z.d(K,{S:()=>at});var Y=z(8674),Q=z(46791),X=z(5491),Z=z(63011),J=z(15821),tt=z(35120),et=z(76277),it=z(48235),st=z(55122),nt=z(78365);class at{static updateRewardedState(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield it.W.getCollectedRewardsData();this.isRewarded=J.A.isDefined(null==q?void 0:q.rewarded[Z.D.MEMBER_LEVEL_BOOST])}))}static isFeatureEnabled(){return(0,et.G)(Q.a).enabled}static isEligibleForFeature(){const q=this.isFeatureEnabled(),K=this.playerNearLevelCap();return q&&!this.isRewarded&&!K}static calculateFeatureEligibility(){const q=tt.q.instance.prodigy.gameContainer.get("782-c308");q.hasMembership()||q.addExperimentToEligiblilityList(Q.a.key)}static canReceiveReward(){const q=this.isEligibleForFeature(),K=tt.q.instance.prodigy.gameContainer.get("782-c308");return q&&K.hasMembership()}static playerNearLevelCap(){var q,K;const z=tt.q.instance.prodigy.gameContainer.get("782-c308");return z.getLevel()+(null!==(K=null===(q=nt.Q.getMemberJarDropData().memberLevelBoost)||void 0===q?void 0:q.levels)&&void 0!==K?K:0)>z.currentMaxLevel}static redeemReward(){var q;const K=tt.q.instance.prodigy.gameContainer.get("782-c308"),z=nt.Q.getMemberJarDropData().memberLevelBoost.levels,Y=K.getLevel(),Q=Y+z,Z=null!==(q=K.data.stars)&&void 0!==q?q:st.s.xpRequiredForLevel(Y,X.V.Player),J=st.s.xpRequiredForLevel(Q,X.V.Player)-Z;K.addStars(J),this.isRewarded=!0,K.forceSaveCharacter();tt.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"Player Level",creatureName:"Player",progressionNewValue:Q.toString(),progressionPreviousValue:Y.toString(),progressionSubType:"membership-bonus"},{pointType:"stars",pointCount:J})}}},63731:(q,K,z)=>{"use strict";z.d(K,{Z:()=>tt});var Y=z(8674),Q=z(79687),X=z(95891),Z=z.n(X),J=z(93288);let tt=class{constructor(){this._objectiveSources=[]}registerSource(q){this._objectiveSources.push(q)}getObjectives(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield Promise.all(this._objectiveSources.filter((K=>0===K.objectiveTypes.length||K.objectiveTypes.some((K=>{var z,Y;return null===(Y=null===(z=null==q?void 0:q.types)||void 0===z?void 0:z.includes(K))||void 0===Y||Y})))).map((K=>(0,Y.sH)(this,void 0,void 0,(function*(){var z;return(yield K.getObjectives()).filter(((K,z,Y)=>{var Q,X,Z,J;return!(null!==(X=null===(Q=null==q?void 0:q.types)||void 0===Q?void 0:Q.includes(K.type))&&void 0!==X&&!X)&&(null===(J=null===(Z=null==q?void 0:q.filter)||void 0===Z?void 0:Z.call(q,K,z,Y))||void 0===J||J)})).sort(null!==(z=null==q?void 0:q.sort)&&void 0!==z?z:()=>0)})))));return Z().flatten(K)}))}};(0,Y.Cg)([(0,Q.multiInject)(J._),(0,Y.Sn)("design:type",Array)],tt.prototype,"_objectiveSources",void 0),tt=(0,Y.Cg)([(0,Q.injectable)()],tt)},93288:(q,K,z)=>{"use strict";z.d(K,{_:()=>Y});const Y=Symbol.for("OBJECTIVE_SOURCE")},65068:(q,K,z)=>{"use strict";var Y;z.d(K,{q:()=>Y}),function(q){q.RestrictedEncounter="restricted-encounter",q.RestrictedEncounterBlocking="restricted-encounter-blocking",q.QuestTask="quest-task",q.HardModeRequirement="hard-mode-requirement",q.QuestState="quest-state"}(Y||(Y={}))},49126:(q,K,z)=>{"use strict";z.d(K,{x:()=>rt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z.n(Z),tt=z(99625),et=z(35120),it=z(67665),st=z(88061),nt=z(43754),at=z(65240);let rt=class{constructor(){this._uncollectedTransactions=[]}get hasUncollectedTransactions(){return this._uncollectedTransactions.length>0}queueUncollectedTransactions(...q){for(const K of q)this._uncollectedTransactions.some((q=>q.transactionID===K.transactionID))||this._uncollectedTransactions.push(K)}acknowledgeUncollectedTransactions(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(0!==this._uncollectedTransactions.length)try{let q=0;for(const{quantity:Q}of this._uncollectedTransactions)q+=Q;const K=this._hardCurrency.getBalance(27),z=yield new Promise((z=>{let Y;Y=et.q.instance.prodigy.open.prefabMenu(tt.l.OTPCelebrationModal,void 0,void 0,void 0,void 0,{OTP_CELEBRATION_GAINS_TEXT:`+${q}`,OTP_CELEBRATION_INITIAL_VALUE:K,OTP_CELEBRATION_FINAL_VALUE:K+q,OTP_CELEBRATION_CLOSE_CALLBACK:()=>z(Y)})})),Y=et.q.instance.prodigy.open.showFullScreenSpinner();try{const q=this._segment.item.beginSecureItemTransaction(),K=yield this._otpNetwork.collectPurchasedItems(this._uncollectedTransactions);q.flush({transaction_id:K[0],source_type:at.C.Otp,source_id:K[0]}),J().pullAllWith(this._uncollectedTransactions,K,((q,K)=>q.transactionID===K))}finally{Y.destroy(),z.close()}if(this._uncollectedTransactions.length>0){const q=this._uncollectedTransactions.map((q=>q.transactionID)).join("\n");yield new Promise((K=>et.q.instance.prodigy.open.message(this._localizer.getText("ONE_TIME_PURCHASE_ACKNOWLEDGE_FAILED",q),K)))}this._segment.purchase.sendFunnelComplete()}catch(e){const K=e instanceof Error?e.message:"unknown error";Q.VyI.log(`Error acknowledging transaction: ${K}`,Q.$bb.Error)}}))}updatePurchaseHistory(q){this._otpNetwork.updatePurchaseHistory(q.quantity).catch(Q.RQr.createHandler("Error updating spend amounts."))}};(0,Y.Cg)([(0,X.inject)("ed0-b675"),(0,Y.Sn)("design:type",st.o)],rt.prototype,"_otpNetwork",void 0),(0,Y.Cg)([(0,X.inject)("20f-5f67"),(0,Y.Sn)("design:type",it.Y)],rt.prototype,"_segment",void 0),(0,Y.Cg)([(0,X.inject)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],rt.prototype,"_localizer",void 0),(0,Y.Cg)([(0,X.inject)("bec-c6b4"),(0,Y.Sn)("design:type",nt.W)],rt.prototype,"_hardCurrency",void 0),rt=(0,Y.Cg)([(0,X.injectable)()],rt)},89517:(q,K,z)=>{"use strict";z.d(K,{Y:()=>rt,F:()=>ht});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z.n(Z),tt=z(65240),et=z(35120),it=z(1195),st=z(34992),nt=z(73797),at=z(80403);const rt=Symbol("ParentGoalDataProvider"),ot=["parentReward","parentRewardMember"];let ht=class{constructor(q,K,z){this.goal=null,this.onChange=new Q.HN0,this._lastChangedAt=null,this._localCorrectAnswerCount=0,this._isInitialized=!1,this._graphQl=q,this._playerDataProvider=K,this._externalMethods=z,et.q.instance.prodigy.game.broadcaster.addAppListener(nt.zr.UpdateMailCounters,this.onMailChanged.bind(this),this,nt.HG.MailerButton,!0),et.q.instance.prodigy.game.broadcaster.addAppListener(nt.zr.UpdateMailCounters,this.onMailChanged.bind(this),this,nt.HG.Mailer,!0)}claimAllRewards(){const q=this.goal;if(!q)return void Q.VyI.log("Attempted to claim nonexistent goal, ignoring.",Q.$bb.Warning);if(!q.isComplete)return void Q.VyI.log("Attempted to claim incomplete goal, ignoring.",Q.$bb.Warning,q);this.setGoal(null);const K={source_type:tt.C.ParentGoals,source_id:"parent"},z=this.getPlayerGoalData();if(null==z?void 0:z.lastUnclaimedGoal){for(const q of this.findMailRewardsExcept(z.lastUnclaimedGoal.previousRewardMailIds)){if(q.isOpened)continue;const z=null==q?void 0:q.gameMethod;this._externalMethods.runFunction(null==z?void 0:z.name,null==z?void 0:z.params,q.attachments,q,[K]),et.q.instance.prodigy.mailNetworkHandler.deleteMail(q)}z.lastUnclaimedGoal=null}else q.rewards.length>0&&et.q.instance.prodigy.open.gotItem(q.rewards,void 0,!0,void 0,void 0,!1,K)}refresh(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.isStale())try{yield this.refreshAsync()}catch(q){Q.VyI.log("ParentGoalDataProvider Refresh failed:",Q.$bb.Error,q)}}))}setGoal(q){var K;J().isEqual(q,this.goal)||this._isInitialized&&(null==q?void 0:q.id)&&(null==q?void 0:q.id)!==(null===(K=this.goal)||void 0===K?void 0:K.id)||(q&&this.goal&&!q.isComplete||(this._localCorrectAnswerCount=0),this.goal=q,this._lastChangedAt=new Date,this._isInitialized=!0,this.onChange.dispatch(q))}markStale(){this._lastChangedAt=null}destroy(){this._educationQuestionAnswered.destroy(),this.onChange.dispose(),et.q.instance.prodigy.game.broadcaster.removeAppListener(nt.zr.UpdateMailCounters,this,nt.HG.MailerButton),et.q.instance.prodigy.game.broadcaster.removeAppListener(nt.zr.UpdateMailCounters,this,nt.HG.Mailer)}refreshAsync(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this.getPlayerGoalData();if(this.restoreGoalFromPlayerData())return;const K=yield function(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield q.sendRequest("\n query getActiveGoal {\n viewer {\n activeGoal {\n id\n goalTarget\n questionsAnswered\n studentCompletedAt\n giftSentAt\n reward {\n id\n type\n }\n }\n }\n }\n ")).data.viewer.activeGoal}))}(this._graphQl);if(!K)return void this.setGoal(null);const z=[];K.reward&&z.push({ID:K.reward.id,type:K.reward.type,N:1}),this._localCorrectAnswerCount=Math.max(K.questionsAnswered,this._localCorrectAnswerCount),this.setGoal({id:K.id,rewards:z,progress:this._localCorrectAnswerCount,target:K.goalTarget,isComplete:!1}),K.studentCompletedAt&&(q.lastUnclaimedGoal={goal:this.goal,previousRewardMailIds:this.findMailRewardsExcept([]).map((q=>q.id))})}))}findMailRewardsExcept(q=[]){return et.q.instance.prodigy.mailNetworkHandler.mailList.filter((K=>ot.includes(K.name)&&!q.includes(K.id)))}isStale(){const q=et.q.instance.prodigy.education;if(!this._educationQuestionAnswered&&q&&(this._educationQuestionAnswered=q.onQuestionAnswered.add(this.onQuestionAnswered.bind(this))),!this._lastChangedAt)return!0;const K=this._lastChangedAt.valueOf()+3e5;return Date.now()>K}onMailChanged(){this.restoreGoalFromPlayerData()}onQuestionAnswered(q){this.markStale(),q&&this.goal&&this._localCorrectAnswerCount++}getPlayerGoalData(){var q;const K=this._playerDataProvider.player.data;return null!==(q=K.parentGoal)&&void 0!==q||(K.parentGoal={}),K.parentGoal}restoreGoalFromPlayerData(){const q=this.getPlayerGoalData();if(!q.lastUnclaimedGoal)return!1;const{previousRewardMailIds:K,goal:z}=q.lastUnclaimedGoal,Y=this.findMailRewardsExcept(K);return 0===Y.length?(this.setGoal(Object.assign(Object.assign({},z),{isComplete:!1})),!0):Y.every((q=>q.isOpened))?(this.getPlayerGoalData().lastUnclaimedGoal=null,this.markStale(),this.setGoal(null),!0):(this.setGoal(Object.assign(Object.assign({},z),{isComplete:!0})),!0)}};ht=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("800-a786")),(0,Y.Qj)(1,(0,X.inject)("ad2-c5b2")),(0,Y.Qj)(2,(0,X.inject)("075-0f78")),(0,Y.Sn)("design:paramtypes",[at.K,it.E,st.g])],ht)},10674:(q,K,z)=>{"use strict";z.d(K,{q:()=>at});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(35120),J=z(77938),tt=z(73797),et=z(90633),it=z(13956),st=z(60126),nt=z(72772);let at=class{get allPetGear(){return(()=>(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.fetchPetGear()).items})))()}get allEquippedPetGear(){return(()=>(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.allPetGear).filter((q=>nt.I.getPetWithEquippedGearByUniqueId(q.uuid)))})))()}get petRelics(){return(()=>(0,Y.sH)(this,void 0,void 0,(function*(){return this.getPetGearByType("petRelic")})))()}get petHats(){return(()=>(0,Y.sH)(this,void 0,void 0,(function*(){return this.getPetGearByType("petHat")})))()}constructor(){this._fetchIsInFlight=!1,this._equippedGear=[],Z.q.instance.game.broadcaster.addAppListener(tt.bI.PetGearAdClicked,this.getPetGearAdGifts,this,void 0,!0)}getPetGearByType(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.fetchPetGear()).items.filter((K=>{var z;return(null===(z=K.data.asset)||void 0===z?void 0:z.type)===q}))}))}getPetGearByUniqueId(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.fetchPetGear()).items.find((K=>K.uuid===q))}))}refreshPetGear(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;if(this._petGearFetchPromise&&this._fetchIsInFlight)return this._petGearFetchPromise;{const K=null===(q=yield this._petGearFetchPromise)||void 0===q?void 0:q.items;return this._petGearFetchPromise=null,this.fetchPetGear().then((q=>(this.checkForPlayerReceivedFirstPetGear(K,null==q?void 0:q.items),q)))}}))}fetchPetGear(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this._petGearFetchPromise)return this._petGearFetchPromise;this._fetchIsInFlight=!0;try{return yield this._petGearFetchPromise=this._networkHandler.getOwnedPetGear().finally((()=>this._fetchIsInFlight=!1))}catch(q){return Q.RQr.logError(q,"Failed to fetch pet gear"),this._petGearFetchPromise=null,{items:[]}}}))}checkForPlayerReceivedFirstPetGear(q=[],K=[]){0===q.length&&K.length>0&&Z.q.instance.game.broadcaster.broadcast(tt.bI.ReceivedPetGear)}getSortedPetGearByType(q){return(0,Y.sH)(this,void 0,void 0,(function*(){this._equippedGear=yield this.allEquippedPetGear;const K=yield this.getPetGearByType(q);if(K.sort(this.byId.bind(this)).sort(this.byRarity.bind(this)).sort(this.byNew.bind(this)).sort(this.byEquipped.bind(this)),nt.I.shouldShowPetGearTutorialCached&&!Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").isMember()){const q=K.map((q=>J.t.getItem(q.data.asset.type,q.data.asset.id))).findIndex((q=>{var K;return 1!==(null===(K=null==q?void 0:q.data)||void 0===K?void 0:K.member)}));if(-1!==q){const z=K.splice(q,1)[0];K.unshift(z)}}return K}))}byId(q,K){return Number(q.itemID.split("-").slice(-1))-Number(K.itemID.split("-").slice(-1))}byRarity(q,K){return J.t.getItem(K.data.asset.type,K.data.asset.id).data.rarity-J.t.getItem(q.data.asset.type,q.data.asset.id).data.rarity}byNew(q,K){var z,Y,X,Z;return Q.Aq$.isDefined(null===(z=q.data)||void 0===z?void 0:z.seenAt)||Q.Aq$.isDefined(null===(Y=K.data)||void 0===Y?void 0:Y.seenAt)?Q.Aq$.isDefined(null===(X=q.data)||void 0===X?void 0:X.seenAt)?Q.Aq$.isDefined(null===(Z=K.data)||void 0===Z?void 0:Z.seenAt)?0:1:-1:0}byEquipped(q,K){return this._equippedGear.includes(q)&&this._equippedGear.includes(K)?0:this._equippedGear.includes(q)?-1:this._equippedGear.includes(K)?1:0}markGearAsSeen(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(0===q.length)return null;const K=yield this._networkHandler.markGearAsSeen(q);return(yield this.allPetGear).forEach((q=>{var z;const Y=K.items.find((K=>K.uuid===q.uuid));(null===(z=null==Y?void 0:Y.data)||void 0===z?void 0:z.seenAt)&&(q.data.seenAt=Y.data.seenAt)})),K.items}))}getPetGearAdGifts(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(Z.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(et.B.FEATURE_PET_GEAR,et.B.BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT))return Q.VyI.log("Cannot received pet gear ad gift. Gift has already been received.",Q.$bb.Warning),[];let q;try{q=yield this._networkHandler.getPetGearAdGifts()}catch(K){return Q.RQr.logError(K,"Failed to get pet gear ad gifts from WW ad"),[]}if(Z.q.instance.game.broadcaster.removeAppListener(tt.bI.PetGearAdClicked,this,void 0),Z.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_PET_GEAR,et.B.BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT),q.items.length>0){const K=[...yield this.allPetGear];Z.q.instance.prodigy.open.gotItem(q.items.map((q=>J.t.getItem(q.data.asset.type,q.data.asset.id))),(()=>this.checkForPlayerReceivedFirstPetGear(K,q.items)),!0,null,null,!0),(yield this.allPetGear).push(...q.items)}else Q.VyI.log("Cannot received pet gear ad gift. Gift response returned no items.",Q.$bb.Warning);return q.items}))}};(0,Y.Cg)([(0,it.b)("3fa-c959"),(0,Y.Sn)("design:type",st.L)],at.prototype,"_networkHandler",void 0),at=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Sn)("design:paramtypes",[])],at)},41935:(q,K,z)=>{"use strict";z.d(K,{o:()=>nt});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(28402),J=z(20597);class tt{}tt.petGearHatMap=[null,"c18d1717-37ff-4c83-aa15-a219bef52c26","67678c5a-2a3f-40f6-ace3-57bd791c0050","60b22020-28c9-47b8-a316-e945d3bbf431","d4683af0-3b7c-4bd4-b840-915a0b9ece4c","01f39c50-17ee-4b9c-8414-223bab88bf4a","dc0ca518-c75d-4d8f-864c-97bb5b27744d","34e2cd40-f396-4e07-b13c-a4f34e8afca1","fc395621-9bc5-4130-a5ab-901bfeecdbf1","0b572c65-3e16-44ee-93aa-4ab77fe51c1d","a80205c4-c2fc-4dbc-aefa-3dba91c9b48d","28849986-cc38-4196-bcea-894c0e3f4431","d6f4ca6c-57aa-4c01-8f9a-a29c43f1969b","e5db148d-9924-4f22-b544-ea22d2de0bea","11d6eb66-fbe3-4c79-a7d6-fa78299776d6","ad0d0fad-9082-4464-aa20-e0e4f28c635a","74a62e4c-bf9b-46cf-8f7c-c80feb2aa266","57f0121e-1305-4252-9f9d-051d2174729e","d6d5410f-7228-41f5-921f-0d1dc5286aa7","e5f54cca-f111-4a78-b491-8e32f198f3b7","83876be2-9bfe-4f18-bba2-7b1648621cbb","f5c6df09-3563-48c1-bc99-478a9c857d05","855aafa0-a50d-424a-b357-28d7f1f1b837","3f5e1303-56da-4fd0-9b2d-97f1c3b4bdc4","7febfab4-2799-4055-bc4b-f3e53b47d0d3","de7cfa29-2d45-4bcf-ba76-f520d268ee81","a88b291e-016f-4d81-a7aa-299dfd6a52b6","0ca819f0-9d61-4f50-83c3-bc59b466b718","27463a4a-27f7-4d22-822b-ba51342384ce","f9b09b2f-1ea4-4ad2-8352-babb6bd8a1cf","a8f487bf-38c1-4385-98d4-367f0fab3c1a","df1a1025-6b95-47dc-83ca-9b048a898c70","31b394b7-cc54-46b9-b239-b0db25592041","8cd26676-9113-4a8f-ab53-6309ab337359","dc1c4e5d-e9ff-4a7c-9fa6-8c16d34fd783","60c236fc-20f4-41f7-87ac-b5c1fd64d6b3","fdb5d8f4-f435-409e-a4d0-53a872038706","c4cef804-cd06-492d-9f4f-15993eadd7a1","78e9db0f-9622-4403-bae9-3c5a79e026c4","af57df98-b771-431d-9350-78ac38678375","0afb318d-d004-49b5-8be1-269f9cbc3240","a213bfaa-7010-4748-aeb4-c6aade659397","33155a7e-7202-4068-be8e-7f69a3b998dd","5dec792b-06d6-4576-8d6c-6099a383a8a7","fc505f6d-04c5-4bca-b18b-7380d64e367a","e7897421-1d27-49c3-b058-2f5fda1891c9","999ec657-8bc0-4dde-8422-0b5c134f7bbe","a193a9fe-a6a9-44d4-af6c-9e4bb614b635","af31ea7c-52a2-4c52-a6d1-eade789b41b8","bee1ca65-8cf9-4ba5-8bcb-1e4c77c2cd75","7a88fa27-7770-4b3a-96a1-d40611b374b6","feea9557-c418-468d-a569-e3fbd93dcfa9","efa3e8a5-cad5-4b36-b77b-8527a20e196a","c09d9af3-246c-4dce-84e6-9bdb98360d80","6cdd225f-6988-4887-8874-9309b0f7dd6b","7e6b9e0c-97dd-4736-afd5-fa452ba1fde1","de9d8419-e0a8-4d51-8063-055cd04c52bb","3029f156-7c20-4b12-b91a-eb48485275c2","4c2a3e1c-7275-4dd9-b32d-e74fa7540e81","173155db-924e-4eb5-ba7e-8dd6384406e9","272911eb-aac9-4b4c-b138-877f6811a070","046238ac-70ed-4c85-87c1-438533ed8f0e","ecd671d2-5813-445c-bd17-d2991a072756","7eae0ef1-09a9-4b8a-883e-68d2487089da","2120297d-d3a7-4f53-bd7a-08ebbd7a4a4c","413eea9a-b379-40db-94fc-da6ae1cc6f3b","8c5f1923-45c5-4747-8c96-9024a1410993","4bb9ec14-17d5-4a80-a6dd-3c2dbac71a1c","1abec9d7-410d-4621-844f-8d66e764bf42","3593e514-1410-4ab0-9eaa-db16483acc62","0dbd3a3b-cd61-4427-addc-13eb128318f9","0804fa95-9402-46dd-bbdd-767738c9ab19","8f7e640e-9207-40e4-b54c-70da3a935269","c2dd3f50-349e-4444-8d65-d9e435a937c2","88eab339-1e39-4adf-af76-007754c60e03","79d899cf-3607-4ee1-ac5b-8c31a181f009","9c9a3a17-18eb-4d3b-a975-ba2f645fc5b1","370402eb-ebae-4cc3-bba2-db852d4f1354","c7f67d62-71c0-432c-8b00-619cd2a96f14","48c91acc-55e8-4042-8bad-e6ed6865db0d","c57d5879-665b-45d0-8136-882030bd9bba","094f0584-03db-48ee-ada6-c0f9981e229b","53f27a7d-e90e-47e2-8ac5-a5645d99c7a8","13471571-21c2-4269-8581-eb6afdc73c8b","cdf895c9-0fbf-4240-8cd9-26d7d02396cb","ad755ea7-b4d2-483c-8036-ff58bf8dc7b2","2c966c38-70c8-4f2a-b997-a62bc58ad2ac","b1fae9a9-43ee-40e2-aafb-f488a8f4a2e8","14923276-d3b9-4c2e-b171-994359e0516f","251609c3-973f-4608-8922-a7b52380a4b1","1a218c90-d2bf-47f1-b908-fa1a91308335","5c469219-eaf1-420f-87f3-5c38eb12ab80","c94915bb-f301-4e04-9a0d-b894347d7c3e","1727c866-bd17-4415-b72e-b3b9e80e7d31","c7f9fc22-b640-437a-b589-242f72c85210","230da12b-5f02-46cf-b465-1a6838d7de6e","8aba827d-6966-47fe-a78e-7f8e53000ff6","a923762a-8f94-423f-af3a-632124095aad","809546ff-d30a-4b7f-9191-0b8464f58466","a14164c9-4b4a-4e65-a133-f9d3562645a3","45f2a05c-26ff-48a1-9165-e9d9534da385","2e042b99-849c-4604-bd76-23caee75de7a","a66002a0-ea33-4403-810c-77dde379d567","4c4202e8-e309-48f7-8eae-4ef2f50d91b0","3162e771-dc1d-4fe8-b309-ad04b891530f","cf0ec8b5-87dd-4b9b-bcab-b7602c08facf","03979f2e-170c-4b8f-9f3e-79bf03e9f380","3d689bc4-1375-424d-8a0d-4544f86e1a43","8ea606cb-4163-4021-a6d9-6b0f857733a4","950a5a67-bade-4e9b-b8b5-4fb7fb4bd77c","9f21dace-aa8c-4b3f-bfdd-a5deedd45621","e5ac591f-280e-4ea2-a2ee-91aa30416995","58ef7d8e-8747-492d-90e8-fbd5fc0f27bf","e1bfd055-4057-4345-bbb7-e113d2eeaeb5","2a0b4469-9154-4100-a17b-a9e7c653e181","2aabc034-feca-4c84-8bed-40f59159d1fa","095f2e67-261b-436f-a75b-eee3603f9b3c","6352271b-8d28-4cec-80aa-ad5dfe562f35","25042c90-1655-4070-a5fa-357135e72a5b","34d849ff-dc51-44f1-9b5e-43ae896a5951","add2cc97-2d16-4907-9c0d-d8d9cb2821bb","c2228f53-34d5-4b6e-a15f-bc35a7efccfb","36c6280d-a75f-46d2-bbca-2bf398af3b0a","5b687c8e-9e5b-4dfa-ad0c-603d67a510c9","386529bd-8a53-4a16-ab09-922effb7eece","ea7ad051-7bfd-46ac-8e0f-46d6a77db97c","da131b4a-1085-4e16-89bd-aade3aa3119b","f5a6256c-e538-4864-8afc-1f760645dc71","5afac8d4-4dc3-4030-aa1f-75c792b6a040","4fbd2a8a-9a76-4cb5-b1ad-10a6cf03d2d8","03242b34-4e4d-4ed8-8dc8-9620857f5eef","e269228b-e118-4347-bf7e-4e99c6953321","40f85224-82f9-467e-b805-2bfafcc14b14","a11a394c-2c30-42c8-b9fd-9fa36765d8cf","af880135-c488-4ee0-9ec7-d0d7d97f3b77","a50495ee-ec97-44fd-9311-052ff8f2c065","af79c264-2964-4533-80b8-b5c12b9c9ed2","471132f9-fee5-4e42-bd87-25ff266b5bad","e79fe436-b88c-43cd-95e1-692126ff1879","4a512fe3-3c81-4834-8204-256189f3b433","54c8e0b4-492a-41f9-9d00-483c77089f8d","0ac02e40-7185-4fb4-806b-1fca584b8fc0","92e7a1c1-adf9-471b-9210-9aa7042a7570","fba609cf-1bdd-4360-a4a9-0aac30cccba2","50d5d82e-dbc6-42a7-81ce-d1351847b4e8"],tt.petGearRelicMap=[null,"e565e4c1-faae-4bcd-b7bf-17a8fa82b02b","4d3daa38-8555-4a59-b579-a7d413ff08bf","dcb4587b-aeb7-4ecb-868e-623a2b8977c8","8c436fee-63b9-4071-9c13-ec9921394876","972ce5a9-4070-4d03-ac82-f973b179bb17","330ba7e3-d4ae-4726-bfdc-2fefcbcfd560","e4167afb-90c3-449b-9ca9-db25394151d7","93180782-3435-4dff-8453-d18eefae6af4","c6019d63-b342-468b-bd90-a8b164a9745a","c2228638-f7f6-434b-b3a0-6c5fdac4dcbc","9774fc88-dae9-41e4-8e74-ea989a68ca86","2cca773e-8d77-40f4-90fa-2415aa2042c8","6c74a732-898d-4d2e-bf74-b3db5caf2c08","0fae1ecf-a12e-4468-89d1-5cfe2c731491","fe432bf4-6c82-44ea-87a0-21473c7f6e0f","43cc6964-12af-4613-bb78-84babbdf6d1c","1a9f5e0d-2f38-43e7-aed3-d3baa11d5980","ca7f8d50-79f5-4c9b-9fde-117ed074df8f","805a0ec5-973a-4db2-a8a7-578a72af1908","d4f4a307-b49c-41ae-9db0-f50be7c5a34d","b277ebdc-dfc1-4f65-bac7-981485143571","e5329b54-bc62-48f0-9933-459ae3d5215f","d58552a8-b331-4d4a-a6be-4af863cb30fb","9f1239fc-22c5-40b8-bf8b-27d5aea2fa29","0776bafe-00ad-4330-9a8d-d27192e16f8f","f6724e18-c0b6-4362-affb-635dcdcb243e","726b27a5-10c6-469d-a866-24af58dfd98e","c0c9004c-0551-43e2-aa51-b64fd37f25b2","549ab8d1-d30b-4b0e-b74f-7f447bf72d27","74aad4b1-3092-4eb2-a626-245c6c07753b","508fbc3b-21fd-4167-938c-47c5c2479448","85bddfa9-200b-4bfa-a50a-b987f02047db","6ba91cdc-c03e-4911-97ab-46ade2083212","26de7583-5a04-4131-ac83-6f6b0180b461","8c4640ac-3f23-45ef-be2d-6921df9897e9","488d398a-b817-4f7c-b703-6c8bbdc3c9fd","0203ff16-a092-4e73-9ce7-d06f4aac4187","efcacc62-980b-4bd2-9467-fe2ec6fbb447","3e811936-f217-4bdb-abdd-e9b5cd02e998","c9cf1589-ce23-4682-a6a6-42d74f583548","dd6f3b75-55f9-415f-9a37-3a63e86dfb6c","5baf22dc-712f-44c0-839e-b8badfb49363","aaf601e3-c687-4be1-bd6d-a8403359b5ff","ceeadb29-0a91-4595-b31a-90367e14ca80","0cd748e1-138d-439c-98b8-fa0b5a095a40","076bec69-6c02-4be8-b223-77be44dce933","64890b30-d47e-4f46-8449-15c498b2a21e","07b99689-35e2-4945-91fb-1bc1592b2b16","a54397d2-62e7-493b-be0a-a84115a10490","57317ac7-83ca-4b91-be0f-d4c49daec19d","9ad61d70-64a9-4ca3-9796-5f9f68830ea3","61e85783-4439-4a4d-9f8d-53fad913a396","ac42c1b5-df00-4085-91bd-9cff255339c4","6192506b-85e4-4d65-b737-9430a8d579e7","601d1546-3271-4546-812a-366b985ad2eb","181a5ac1-274f-49da-9967-44f8c7148402","1685b401-15f1-4038-8aa1-2be1d3adfaea","ee19ef9a-d86b-468c-985a-86adfbb9aa0e","d5fbbb82-4e63-4317-8da5-a50e66779aa1","cac0cc28-49d9-40ff-85a6-9f6bd48f0207","ebc964a9-efe5-4608-906c-905fe3129a84","2829c626-044b-4304-bea3-44499dcdc6fd","a38ecc5b-e12a-4446-a312-bdb44fc3c07f","283a5111-09f6-40da-b88b-ea9106132484","acf5ee98-2c62-4698-952d-415672291fea","9ce2daf1-c131-4f36-85c0-ac289c1a49ba","ad888910-ec1d-48ee-9826-40b12bee66d2","0e5f6804-7dc5-4baf-a620-3b495d80611c","8053a052-e5dd-4cfc-9c1f-08906df52b1f","425739cd-0799-4524-b22c-e43e619dc1f7","57f6149d-563c-440b-85ff-59a6de9c1bb0","478a1bd5-e744-4bca-8b50-0c4cdc130a62","525889df-7480-4f94-800c-0cf66c537f6c","5ce905e3-a51c-4bd1-9008-21130218ed74","9c906f80-30d0-422d-99bf-44e5fa6bf923","d28078ac-6725-4c36-a55b-efd86774cf7e","05ba9cf4-8309-48b4-afed-b56475696c99","e3f5797f-723b-4026-9d7b-b99e6195630c","981307c5-7c64-408f-89c0-b7ca703ff476","730e515b-6839-4aac-a8c1-be91f0741025","00d7b723-22c6-48d9-a8f5-ee4023ab28f3","e2edc611-1d4a-4e9b-86d0-096042235f31","3d519399-5ca4-44ef-b8ba-7441f4765e45",null,"965eaef4-dd2c-4238-9c3a-050d95276064","c8e39757-794e-4cda-8ee6-eebc454e8fb8","1201b04b-a8f9-4b39-b1a1-a03d6bc0648b","84e5c0eb-84d6-4802-8f1d-2fa3857cd3c2","fcc7bc89-d241-4d26-9ff9-4c289e3283ce","a1140b9a-ce6d-46cf-9732-53666636bff8","5939ade6-c16b-4450-87cf-12e6f2eaf01b","d80e68c1-6778-435c-8277-cdc41cd05ec1","310ceb0d-c2e6-4260-b2ca-623c196a37e5","8ae5832a-f7a0-4d2c-aa7b-e0830ca17c43","bdfaf06f-9f73-427b-a40a-ec9cd373f231","9db5fa89-8776-474b-b637-5b4129e93a08","57ea3485-1f46-4ba8-8249-866dcd69c9c5","8c7af42d-a8cd-4ecd-9b93-5800849fabca","04fa078a-fd27-4b8d-8582-bf311b119be5","b0bc9e82-6762-4e47-86ea-ffc656fb81cc","1535696a-8ef4-43b2-b5b2-4fe4f1dbee90","6b14784b-e0aa-41c3-b9a2-7f9fb6acd314","a6399d08-f382-467b-9645-249ac5e34ae5","23e4bd78-7044-4da0-a8bc-01e6bbd27894","72d20335-aef9-4f52-94ff-ec279afb217d","e40e146a-e771-4447-82fb-f21ec8dc81f0","312728aa-efbf-45ae-92f1-e7ce6731c4d5","26afd9ae-428d-41f5-ad25-b5b24d9dca28","897de8ae-c5b1-477a-b55b-d38755eb7c32","28c17bb1-7aa8-4b06-972d-e9ca342f3b9a","37a37fa2-ff26-4014-9bf6-1ab7e82b56a1","97009a93-f624-40b1-be4e-dba7ff045107","3b59a5cb-e398-4ee7-998f-5feed720aea2","d89e4244-49f7-42bc-950e-d5df948e23a3","4f2eed9c-c31c-45b3-9193-76a2464be96e","cc05f3a5-679f-4f2b-9890-4837b8b84858","a8c9420d-022e-474f-bd1e-32379019c17a","b2e7103b-24f7-4fa4-b0a0-e06b9a78f1b7","2464648d-3369-4e23-b875-1c63ab4bcf1d","63da5755-04ae-42ef-b7d1-3efc9549ecde","6e605402-8361-40bf-8ebf-db4920b6b1fb","498c6410-0c03-4c95-9528-a735c50e0bf0","299ec8a6-067e-474f-83cd-45ad8ab239d4","80228696-4f96-415c-bf56-3783be400034","0f3e1a6e-fbe1-48b3-85b8-936f3ebda7ef","cbf576af-6cf7-4295-9087-8a4e7e5ba812","6b91fe88-1bdb-4913-8e93-f0b9dbd6dc6d","e2e91b6d-0fbc-46ca-8806-c2948e47c1b2","d81cc11b-6e53-4967-815c-aac25938e5d9","20596f74-b851-409e-b5fc-a92ea2d3a690","4e169c5c-d879-4ada-b196-f11b2988729c","7552a74a-781a-47b5-8143-43821edb59b7","a31e5862-b1e5-46db-a309-5806245a5399","ce2e4781-f17f-4dbd-ac7f-7bee9b7ee31d","01a441ff-33b2-42ab-8d91-555cd856b093","03482cdc-8bd5-4fc1-8e82-dfccbd242562","e82cecde-c21d-46d6-9356-f79ef72994f2","c28dcabc-d74c-4ab3-889a-2131d86d036a","c08aadf9-c509-433c-bf34-64827859efc9","cff2b8d1-ac5d-4814-864b-838ae4f3487e","694dbbdc-a285-4642-87a5-7f0c8edb8b88","dc57e08b-186f-47b1-8238-7cb01d8889e1","2a6c788b-f4fc-4337-8f32-498166af2e39","d93c2ded-e8f2-4e97-8990-3d52701d6b01","ae3e80fc-26aa-4e2b-93bc-80181c1dd25c","1b08a939-882c-4bcc-aba8-ee2ef14a0770","384f58c0-8156-4d04-8926-42d71bedcaaa"];var et=z(62889),it=z(53661),st=z(10674);let nt=class extends Q.uAl{constructor(){super(...arguments),this.runOnCreate=!0}set petData(q){this._petData=q}get petData(){var q;return null!==(q=this._petData)&&void 0!==q?q:this.getInjectedValue(it.hi.PetCreatureData)}create(){super.create(),this.runOnCreate&&this.updateGear().catch(Q.RQr.createHandler("[PetGearLoadoutComponent] Could not update gear on create"))}updateGear(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,X,Z,J,tt,et;if(q||this.petData)try{this._spine.isLoaded||(yield this._spine.OnLoaded.asPromise());const Q=null!==(K=null==q?void 0:q.petHat)&&void 0!==K?K:null===(Y=null===(z=this.petData)||void 0===z?void 0:z.gear)||void 0===Y?void 0:Y.petHat,it=null!==(X=null==q?void 0:q.petRelic)&&void 0!==X?X:null===(J=null===(Z=this.petData)||void 0===Z?void 0:Z.gear)||void 0===J?void 0:J.petRelic,st="number"==typeof Q?Q:null===(tt=yield this._inventoryManager.getPetGearByUniqueId(Q))||void 0===tt?void 0:tt.data.asset.id,nt="number"==typeof it?it:null===(et=yield this._inventoryManager.getPetGearByUniqueId(it))||void 0===et?void 0:et.data.asset.id;yield Promise.all([this.setGearOfType(null!=st?st:0,"petHat"),this.setGearOfType(null!=nt?nt:0,"petRelic")]),yield this._gearManager.refresh()}catch(it){Q.RQr.createHandler("[PetGearLoadoutComponent] error updating gear")}}))}setGearOfType(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=this.getPetGearMapByCategory(K),Y=this.getGearSlotIndexByCategory(K),X=z[q];if(!X)return void(yield this._gearManager.setGearAt(Y,null,!1));const Z=yield et.M.loadGearElementFromGuid(X);Q.Aq$.isDefined(Z)?yield this._gearManager.setGearAt(Y,Z,!1):Q.RQr.createHandler(`[PetGearLoadoutComponent] Failed to parse GearElement from file for ${X} of type ${K}`)}))}getPetGearMapByCategory(q){switch(q){case"petHat":return tt.petGearHatMap;case"petRelic":return tt.petGearRelicMap}}getGearSlotIndexByCategory(q){switch(q){case"petHat":return 0;case"petRelic":return 1}}};(0,Y.Cg)([(0,Q.Cdj)("9cf-c09f"),(0,Y.Sn)("design:type",st.q)],nt.prototype,"_inventoryManager",void 0),(0,Y.Cg)([(0,Q.Pqz)(J.B),(0,Y.Sn)("design:type",J.B)],nt.prototype,"_gearManager",void 0),(0,Y.Cg)([(0,Q.Pqz)(Z.v),(0,Y.Sn)("design:type",Z.v)],nt.prototype,"_spine",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],nt.prototype,"runOnCreate",void 0),nt=(0,Y.Cg)([(0,Q.EVk)("PetGearLoadout",X.Y.player)],nt)},19592:(q,K,z)=>{"use strict";var Y;z.d(K,{R:()=>Y}),function(q){q[q.petRelic=0]="petRelic",q[q.petHat=1]="petHat"}(Y||(Y={}))},72772:(q,K,z)=>{"use strict";z.d(K,{I:()=>rt});var Y=z(8674),Q=z(62459),X=z(90156),Z=z(35120),J=z(77938),tt=z(76277),et=z(90633),it=z(3119),st=z(25480),nt=z(56625),at=z(73678);class rt{static get shouldShowPetGearTutorialCached(){return rt.cachedTutorialEnabledFlag}static updateCachedPetGearTutorialFlag(){return(0,Y.sH)(this,void 0,void 0,(function*(){return rt.shouldShowPetGearTutorial()}))}static getEquippablePetGears(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2"),K=yield Z.q.instance.prodigy.gameContainer.get("9cf-c09f").allPetGear;return q.isMember()?K:K.filter((q=>{var K,z;return 1!==(null===(z=null===(K=J.t.getItem(q.data.asset.type,q.data.asset.id))||void 0===K?void 0:K.data)||void 0===z?void 0:z.member)}))}))}static shouldShowPetGearTutorial(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(Z.q.instance.prodigy.gameContainer.get("fa1-8ec9").isBreadcrumbComplete(et.B.FEATURE_PET_GEAR,et.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE))return this.cachedTutorialEnabledFlag=!1,this.cachedTutorialEnabledFlag;if((0,tt.G)(X.m))return this.cachedTutorialEnabledFlag=!1,this.cachedTutorialEnabledFlag;const q=Z.q.instance.prodigy.world.getCurrentZone(),K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2"),z=![at.A_.CRYSTALCAVERNS,at.A_.DARKTOWER,at.A_.TOWERTOWN].includes(q),Y=Z.q.instance.prodigy.open.menus.length>0,Q=Z.q.instance.prodigy.open.isMenuOpen(st.u),rt=Z.q.instance.prodigy.open.isMenuOpen(it.o),ot=K.player.kennel.getPets().map((q=>J.t.getItem("pet",q.ID))).some((q=>{var K;return(null===(K=q.data.gearEquipSlots)||void 0===K?void 0:K.length)>0})),ht=yield Z.q.instance.prodigy.gameContainer.get("9cf-c09f").allPetGear,ct=(null==ht?void 0:ht.length)>0,dt=K.isMember()||ht.map((q=>J.t.getItem(q.data.asset.type,q.data.asset.id))).some((q=>{var K;return 1!==(null===(K=null==q?void 0:q.data)||void 0===K?void 0:K.member)}));return this.cachedTutorialEnabledFlag=z&&ot&&ct&&dt&&(!Y||Q||rt)&&nt.s.canShowFtue(),this.cachedTutorialEnabledFlag}))}static getPetGearStats(q){var K,z,Y;return null!==(Y=null===(z=null===(K=J.t.getItem(q.data.asset.type,q.data.asset.id))||void 0===K?void 0:K.data)||void 0===z?void 0:z.stats)&&void 0!==Y?Y:{}}static getPetWithEquippedGearByUniqueId(q){return Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPets().find((K=>{var z,Y;return(null===(z=K.gear)||void 0===z?void 0:z.petHat)===q||(null===(Y=K.gear)||void 0===Y?void 0:Y.petRelic)===q}))}static getEquippedGearForPetByUniqueId(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPetByUniqueID(q);return K?this.getEquippedGearForPet(K):{}}))}static getEquippedGearForPet(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;const Y=Z.q.instance.prodigy.gameContainer.get("9cf-c09f");return{petHat:yield Y.getPetGearByUniqueId(null===(K=q.gear)||void 0===K?void 0:K.petHat),petRelic:yield Y.getPetGearByUniqueId(null===(z=q.gear)||void 0===z?void 0:z.petRelic)}}))}static getStatsOfEquippedGearForPet(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=Z.q.instance.prodigy.gameContainer.get("9cf-c09f");return(yield Promise.all(Object.values(null!=q?q:{}).map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return K.getPetGearByUniqueId(q)})))))).filter(Q.Aq$.isDefined).map(rt.getPetGearStats).reduce(((q,K)=>(Object.entries(K).forEach((([K,z])=>{var Y;null!==(Y=q[K])&&void 0!==Y||(q[K]=0),q[K]+=z})),q)),{})}))}}rt.cachedTutorialEnabledFlag=!1},52382:(q,K,z)=>{"use strict";z.d(K,{H:()=>ht});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(83133),J=z(94566),tt=z(28152),et=z(76642),it=z(94325),st=z(53661),nt=z(10674),at=z(19592),rt=z(72772),ot=z(9195);let ht=class extends Q.uAl{constructor(){super(...arguments),this._maxCardAmount=20,this._cardWidth=130,this._cardHeight=130,this._startIndexOfCurrentRange=0,this._cachedContentViewLastY=0,this._nextContentViewY=0,this._prevContentViewY=0,this._lastRowIndex=16,this._loading=!1,this.onGridInitialized=new Q.HN0,this.onGearCardSelected=new Q.HN0,this.onGridDisplayed=new Q.HN0,this.onEquippedGearChanged=new Q.HN0,this.onEmptyGrid=new Q.HN0}create(){const q=Object.create(null,{create:{get:()=>super.create}});return(0,Y.sH)(this,void 0,void 0,(function*(){q.create.call(this),this._assetType=this._petGearIdentifier===at.R.petHat?"petHat":"petRelic",this._allGearData=yield this._inventoryManager.getSortedPetGearByType(this._assetType),this._equippedGear=this._allGearData.find((q=>{var K;return(null===(K=rt.I.getPetWithEquippedGearByUniqueId(q.uuid))||void 0===K?void 0:K.uniqueID)===this._activePetData.uniqueID})),this._recycledContainer=new Q._mx,this._objectPool=new Q.iyL(this.createGearCard.bind(this),null,this.recycleGearCard.bind(this)),this._objectPool.allocate(this._maxCardAmount),this.onEmptyGrid.dispatch(0===this._allGearData.length),this.initialize()}))}initialize(){this._startIndexOfCurrentRange=0,this._cachedContentViewLastY=0,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),this._displayedGearData=this._allGearData.slice(0,Math.min(this._maxCardAmount,this._allGearData.length)),this._displayedGearData.forEach((q=>{this.addGearCard(q)})),this.calcLastRowIndex(),this.resizeContentArea(),this._gearGrid.updateAll(!1),this._objectPool.aliveList.forEach((q=>{var K;null===(K=q.findComponentInChildren(Z.l))||void 0===K||K.setSelected(!1)})),this.onGridInitialized.dispatch()}onDisplayed(){var q,K;this.onGridDisplayed.dispatch(null!==(K=null!==(q=this._selectedGear)&&void 0!==q?q:this._equippedGear)&&void 0!==K?K:null)}resizeContentArea(){const q=this._gearGrid.GameObject.findComponent(Q.XVE);q.setSizeDelta(q.widthDelta,this._gearGrid.yPositionOffset+Math.ceil(this._allGearData.length/this._gearGrid.fixedColumnCount)*this._gearGrid.rowSpacing)}createGearCard(){let q=new Q._mx;return q=this._prefabLoader.loadFromGUID(X.l.PetGearItemCard),q}recycleGearCard(q){const K=q.findComponent(ot.M);K.unbindContext(),K.onEquip.removeAll(),K.onUnequip.removeAll(),K.onSelect.removeAll();const z=q.findComponentInChildren(Z.l);z.onUnselected.dispatch(),this._toggleGroup.removeSelectable(z),this._toggleGroup.setSelectedIndex(-1),q.transform.setPosition(-this._cardHeight,-this._cardHeight),this._recycledContainer.addChild(q)}addGearCard(q,K=!1){var z;const Y=this._objectPool.getObject();Y.findComponent(Q.bE_).Container.rebind(st._R.PetGearItemData).toConstantValue(q),Y.findComponent(Q.bE_).Container.rebind(st.hi.PetCreatureData).toConstantValue(this._activePetData);const X=Y.findComponent(ot.M);X.bindContext(),X.onEquip.add(this.swapEquippedItem.bind(this)),X.onSelect.add(this.setCardSelected.bind(this,X)),(null===(z=X.equippedPetData)||void 0===z?void 0:z.uniqueID)===this._activePetData.uniqueID&&(this._equippedGear=X.gearData,Q.Aq$.isDefined(this._selectedGear)||(this._selectedGear=this._equippedGear));const J=Y.findComponentInChildren(Z.l);this._toggleGroup.addSelectable(J),this._selectedGear===X.gearData&&(X.setSelected(!0),this._toggleGroup.setItemSelected(J,!0)),K?this._gearGrid.GameObject.addChildAt(Y,0):this._gearGrid.GameObject.addChild(Y)}removeGearCard(q=!1){const K=this._gearGrid.GameObject.children.length;if(K<=0)return;const z=q?0:K-1,Y=this._gearGrid.GameObject.children[z];Y.parent=null,this._objectPool.recycleObject(Y)}updateActiveGearCards(q=!1){this._startIndexOfCurrentRange=q?Math.max(this._startIndexOfCurrentRange-this._gearGrid.fixedColumnCount,0):this._startIndexOfCurrentRange+this._gearGrid.fixedColumnCount;const K=Math.min(this._startIndexOfCurrentRange+this._maxCardAmount,this._allGearData.length);this._displayedGearData=this._allGearData.slice(this._startIndexOfCurrentRange,K),q||this.calcLastRowIndex();const z=this._displayedGearData.slice(q?0:this._lastRowIndex,q?this._gearGrid.fixedColumnCount:this._displayedGearData.length);q&&z.reverse(),z.forEach((K=>{this.addGearCard(K,q)}))}getVisibleGearCardByIndex(q=0){return q<0||q>=this._gearGrid.GameObject.children.length?null:this._gearGrid.GameObject.children[q]}update(){if(super.update(),this._scrollView.getVisibleLocalRange().x!==this._cachedContentViewLastY&&!this._loading){this._cachedContentViewLastY=this._scrollView.getVisibleLocalRange().x,!0===this._tooltip.parent.active&&(this._tooltip.parent.active=!1);const q=Math.abs(this._cachedContentViewLastY);if(q>this._nextContentViewY){this._loading=!0;for(let q=0;q=0;q--)if(q%this._gearGrid.fixedColumnCount==0){this._lastRowIndex=q;break}}calcNextYThreshold(){if(this._startIndexOfCurrentRange+this._maxCardAmount>=this._allGearData.length)return 1/0;return this._gearGrid.yPositionOffset+this._gearGrid.rowSpacing*(Math.floor(this._startIndexOfCurrentRange/this._gearGrid.fixedColumnCount)+1)}calcPrevYThreshold(){if(0===this._startIndexOfCurrentRange)return 0;return this._gearGrid.yPositionOffset+this._gearGrid.rowSpacing*Math.floor(this._startIndexOfCurrentRange/this._gearGrid.fixedColumnCount)}swapEquippedItem(){if(this._equippedGear){const q=this._gearGrid.GameObject.children.find((q=>q.findComponent(ot.M).gearData===this._equippedGear));null==q||q.findComponent(ot.M).unequipItem()}this._equippedGear=this._selectedGear,this.onEquippedGearChanged.dispatch(this._equippedGear)}setCardSelected(q){this._selectedGear=q.gearData,this.setTooltip(q),this.onGearCardSelected.dispatch(q);const K=this.gameObject.findComponentInChildren(Q.bE_,!0);if(Q.Aq$.isDefined(K)){const q=K.Container.get(st._R.PetGearItemInfoDataProvider);null==q||q.setGearItem(this._selectedGear);const z=K.Container.get(st._R.PetGearPetPreviewDataProvider);null==z||z.setGearPreviewItem(this._selectedGear)}}setTooltip(q){if(this._selectedGear===this._equippedGear||!(null==q?void 0:q.equippedPetData))return void(this._tooltip.parent.active=!1);const K=this._gearGrid.GameObject.children.indexOf(q.GameObject)%4==3?.75:.5,z=q.GameObject.transform.worldPosition.x+this._cardWidth/2,Y=q.GameObject.transform.worldPosition.y+this._cardHeight/2;this._tooltip.parent.transform.setPosition(z,Y+87),this._tooltip.parent.findComponent(Q.XVE).setPivot(K,.5),this._tooltip.findComponent(Q.XVE).setAnchorMin(K,0),this._tooltip.findComponent(Q.XVE).setAnchorMax(K,0),this._tooltip.parent.active=!0;const X=this._tooltip.parent.findComponentInChildren(et.S);X.onDispatch.removeAll(),X.addListener((()=>{q.equipItem(),this._tooltip.parent.active=!1}))}resetSelection(){this._toggleGroup.setSelectedIndex(-1);const q=this._gearGrid.GameObject.children.find((q=>q.findComponent(ot.M).gearData===this._selectedGear));null==q||q.findComponentInChildren(Z.l).onUnselected.dispatch()}destroy(){this.onGridInitialized.dispose(),this.onGearCardSelected.dispose(),this.onGridDisplayed.dispose(),this.onEquippedGearChanged.dispose(),this.onEmptyGrid.dispose();const q=this._allGearData.filter((q=>{var K;return!Q.Aq$.isDefined(null===(K=q.data)||void 0===K?void 0:K.seenAt)})).map((q=>({itemID:q.itemID,uuid:q.uuid})));this._inventoryManager.markGearAsSeen(q).catch(Q.RQr.createHandler("[Pet Gear Inventory Manager] Failed to mark gear as seen")).finally((()=>{this._objectPool.destroy(!0),this._recycledContainer.destroy(),super.destroy()}))}};(0,Y.Cg)([(0,Q.Cdj)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],ht.prototype,"_prefabLoader",void 0),(0,Y.Cg)([(0,Q.Cdj)("9cf-c09f"),(0,Y.Sn)("design:type",nt.q)],ht.prototype,"_inventoryManager",void 0),(0,Y.Cg)([(0,Q.Cdj)(st.hi.PetCreatureData),(0,Y.Sn)("design:type",Object)],ht.prototype,"_activePetData",void 0),(0,Y.Cg)([(0,Q.gfw)(at.R),(0,Y.Sn)("design:type",Number)],ht.prototype,"_petGearIdentifier",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.JTA),(0,Y.Sn)("design:type",Q.JTA)],ht.prototype,"_gearGrid",void 0),(0,Y.Cg)([(0,Q.MnK)(it.C),(0,Y.Sn)("design:type",it.C)],ht.prototype,"_scrollView",void 0),(0,Y.Cg)([(0,Q.MnK)(J.O),(0,Y.Sn)("design:type",J.O)],ht.prototype,"_toggleGroup",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ht.prototype,"_tooltip",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ht.prototype,"onGridInitialized",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ht.prototype,"onGearCardSelected",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ht.prototype,"onGridDisplayed",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ht.prototype,"onEquippedGearChanged",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ht.prototype,"onEmptyGrid",void 0),ht=(0,Y.Cg)([(0,Q.EVk)("PetGearInventoryGridManager",tt.Y.uiPet)],ht)},9195:(q,K,z)=>{"use strict";z.d(K,{M:()=>lt});var Y=z(8674),Q=z(62459),X=z(17446),Z=z(35120),J=z(91207),tt=z(1195),et=z(77938),it=z(28152),st=z(34603),nt=z(26932),at=z(26004),rt=z(64353),ot=z(95057),ht=z(53661),ct=z(47255),dt=z(72772);let lt=class extends nt.z{constructor(){super(...arguments),this.onEquip=new Q.HN0,this.onUnequip=new Q.HN0,this.onSelect=new Q.HN0}get gearData(){return this._gearData}get equippedPetData(){return this._equippedPetData}create(){super.create()}destroy(){this.unbindContext(),this.onEquip.dispose(),this.onUnequip.dispose(),this.onSelect.dispose(),super.destroy()}bindContext(){var q,K,z,Y;this._gearData=this._context.Container.get(ht._R.PetGearItemData),this._equippedPetData=dt.I.getPetWithEquippedGearByUniqueId(this._gearData.uuid),this._itemAssetData=et.t.getItem(this._gearData.data.asset.type,this._gearData.data.asset.id),this._context.Container.rebind(ht._R.PetGearItemIcon).toConstantValue(this.getGearIcon(this._gearData)),this._context.Container.rebind(ht._R.PetGearItemRarity).toConstantValue(this.getCardRarityIcon(null===(q=this._itemAssetData.data)||void 0===q?void 0:q.rarity)),this._context.Container.rebind(ht._R.PetGearItemMember).toConstantValue(null===(K=this._itemAssetData.data)||void 0===K?void 0:K.member),this._context.Container.rebind(ht._R.PetGearItemNew).toConstantValue(!Q.Aq$.isDefined(null===(z=this._gearData.data)||void 0===z?void 0:z.seenAt)),this._context.Container.rebind(ht._R.PetGearItemEquipped).toConstantValue(Q.Aq$.isDefined(this._equippedPetData)&&this._activePetData===this._equippedPetData),this._context.Container.rebind(ht._R.PetGearShowPetIcon).toConstantValue(Q.Aq$.isDefined(this._equippedPetData)),this._context.Container.rebind(ht._R.PetGearPetIcon).toConstantValue(this.getPetIcon(null===(Y=this._equippedPetData)||void 0===Y?void 0:Y.ID)),this.refreshCard(),this.gameObject.active=!0}unbindContext(){this.setSelected(!1),this._context.Container.unbind(ht._R.PetGearItemData),this._context.Container.unbind(ht._R.PetGearItemIcon),this._context.Container.unbind(ht._R.PetGearItemMember),this._context.Container.unbind(ht._R.PetGearItemNew),this._context.Container.unbind(ht._R.PetGearItemRarity),this._context.Container.unbind(ht._R.PetGearItemSelected),this._context.Container.unbind(ht._R.PetGearItemEquipped),this._context.Container.unbind(ht._R.PetGearShowPetIcon),this._context.Container.unbind(ht._R.PetGearPetIcon);const q=this.gameObject.findComponentsInChildren(st._);q&&q.forEach((q=>{var K;(null===(K=q.sprite)||void 0===K?void 0:K.frameName)||(q.sprite.key=null)})),this.refreshCard()}refreshCard(){this.gameObject.findComponentsInChildren(at.B).forEach((q=>q.consume()))}equipItem(){var q;if(null===(q=this._activePetData)||void 0===q?void 0:q.uniqueID){if(this._itemAssetData.data.member&&!this._playerData.isMember()){const q={conversionFunnelName:ct.o.FunnelPetGear,conversionStaticOrVideo:ot.R.Modal},K=rt.P.shouldUseUnifiedConversionFlow(ct.o.FunnelPetGear)?ot.R.UnifiedConversionFlow:ot.R.Modal;return Z.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:"Equip-Member-Locked-Pet-Gear",category:"Pet-Gear",contentId:this.gearData.itemID,adType:K,adVersion:rt.P.getAdVersion(ct.o.FunnelPetGear)}),void Z.q.instance.prodigy.open.membershipInfo(null,q)}this.onEquip.dispatch(),this._playerData.player.kennel.equipGearForPet(this._activePetData.uniqueID,this._gearData),this._equippedPetData=this._activePetData,this._context.Container.rebind(ht._R.PetGearItemEquipped).toConstantValue(!0),this._context.Container.rebind(ht._R.PetGearShowPetIcon).toConstantValue(!0),this._context.Container.rebind(ht._R.PetGearPetIcon).toConstantValue(this.getPetIcon(this._activePetData.ID)),this.refreshCard()}}unequipItem(){var q;(null===(q=this._activePetData)||void 0===q?void 0:q.uniqueID)&&(this.onUnequip.dispatch(),this._playerData.player.kennel.unequipGearForPet(this._activePetData.uniqueID,this._gearData.itemID.split("-")[0]),this._equippedPetData=null,this._context.Container.rebind(ht._R.PetGearItemEquipped).toConstantValue(!1),this._context.Container.rebind(ht._R.PetGearShowPetIcon).toConstantValue(!1),this._context.Container.rebind(ht._R.PetGearPetIcon).toConstantValue(null),this.refreshCard())}setSelected(q){var K,z;q&&this.onSelect.dispatch(),Q.Aq$.isDefined(null===(z=null===(K=this._gearData)||void 0===K?void 0:K.data)||void 0===z?void 0:z.seenAt)||this._context.Container.rebind(ht._R.PetGearItemNew).toConstantValue(!q),this._context.Container.rebind(ht._R.PetGearItemSelected).toConstantValue(q),this.refreshCard()}getGearIcon(q){return J.E.getIconForType(q.data.asset.type,q.data.asset.id)}getPetIcon(q){return q?J.E.getIconForType("pet",q):null}getCardRarityIcon(q){return`${X.E[q].toLowerCase()}-130x130`}};(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",tt.E)],lt.prototype,"_playerData",void 0),(0,Y.Cg)([(0,Q.Cdj)(ht.hi.PetCreatureData),(0,Y.Sn)("design:type",Object)],lt.prototype,"_activePetData",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],lt.prototype,"onEquip",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],lt.prototype,"onUnequip",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],lt.prototype,"onSelect",void 0),lt=(0,Y.Cg)([(0,Q.EVk)("PetGearItemCardDataProvider",it.Y.uiPet)],lt)},91020:(q,K,z)=>{"use strict";z.d(K,{t:()=>at});var Y,Q=z(8674),X=z(62459),Z=z(88022),J=z(36648),tt=z(17446),et=z(77938),it=z(28152),st=z(26932),nt=z(26004);let at=Y=class extends st.z{bindContext(){var q,K,z,Q;const X=et.t.getItem(null===(K=null===(q=this._petGearItem)||void 0===q?void 0:q.data)||void 0===K?void 0:K.asset.type,null===(Q=null===(z=this._petGearItem)||void 0===z?void 0:z.data)||void 0===Q?void 0:Q.asset.id),tt=Z._.Ui_pet_gear_json;this._petGearItem&&X?(this._context.Container.rebind("PetGearSlotIcon").toConstantValue(J.q[`Icon_${X.type}_${X.ID}`]),this._context.Container.rebind("PetGearSlotBackground").toConstantValue([tt,Y.RARITY_SLOT_ASSET_MAP[X.data.rarity]])):(this._context.Container.rebind("PetGearSlotIcon").toConstantValue("empty"),this._context.Container.rebind("PetGearSlotBackground").toConstantValue([tt,"pet-gear-slot-empty"])),this.gameObject.findComponentsInChildren(nt.B,!1).forEach((q=>q.consume()))}};at.RARITY_SLOT_ASSET_MAP={[tt.E.Common]:"pet-gear-slot-common",[tt.E.Uncommon]:"pet-gear-slot-uncommon",[tt.E.Rare]:"pet-gear-slot-rare",[tt.E.Heroic]:"pet-gear-slot-heroic",[tt.E.Legendary]:"pet-gear-slot-legendary"},at.GEAR_TYPE_TO_SLOT_IDENTIFIER_MAP={petRelic:"PetRelicSlotContainer",petHat:"PetHatSlotContainer"},(0,Q.Cg)([(0,X.Cdj)("PetGearSlotData",!1),(0,Q.Sn)("design:type",Object)],at.prototype,"_petGearItem",void 0),at=Y=(0,Q.Cg)([(0,X.EVk)("PetGearSlotDataProvider",it.Y.uiPet)],at)},9860:(q,K,z)=>{"use strict";z.d(K,{n:()=>rt});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(65240),tt=z(35120),et=z(73797),it=z(41674),st=z(13956),nt=z(35537),at=z(65933);let rt=class{get petInventoryData(){return this._isInitialized||X.VyI.log("PetInventoryDataProvider has not been initialized",X.$bb.Error),this._petInventoryData}constructor(){this._petInventoryData=null,this.onPetInventoryDataUpdated=new X.HN0,this._isInitialized=!1,this[Y]="petInventoryChangedData",tt.q.instance.prodigy.game.broadcaster.addAppListener(et.H3.MembershipResponseReceived,this.handleMembershipChange.bind(this),this,void 0,!0)}fetchPetInventoryData(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._networkHandler.getPetInventoryData();return this._petInventoryData=q,q}))}updateSlots(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=tt.q.instance.prodigy.gameContainer.get("20f-5f67").item.beginSecureItemTransaction();yield Promise.all([this._networkHandler.updateSlots(q),this.onPetInventoryDataUpdated.asPromise()]),z.flush({sink_type:J.C.PetSlots,transaction_id:K})}))}setSlots(q){return(0,Q.sH)(this,void 0,void 0,(function*(){0}))}destroy(){this.onPetInventoryDataUpdated.dispose(),tt.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipResponseReceived,this,void 0)}refresh(){this.fetchPetInventoryData().then((()=>{this._isInitialized=!0})).catch((q=>{X.RQr.logError(q,"Failed to fetch pet inventory data")}))}handleMembershipChange(q){"success"===q&&this.refresh()}[(Y=nt.sE,nt.JN)](q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(q.bonusJustClaimed&&q.previousSlotsValue!==q.entity.permanentSlots){tt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendPetSlotUnlockedEvent(it.No.MemberGiftAwarded,q.entity.permanentSlots,q.previousSlotsValue)}this._isInitialized=!0,this._petInventoryData=q.entity,this.onPetInventoryDataUpdated.dispatch()}))}};rt.PET_SLOT_GROUP_COUNT=3,rt.PET_SLOT_COST_VARIANT_BASE_STRING="slotsThresholdsV",(0,Q.Cg)([(0,st.b)("b39-e84d"),(0,Q.Sn)("design:type",at.Y)],rt.prototype,"_networkHandler",void 0),rt=(0,Q.Cg)([(0,Z.injectable)(),(0,Q.Sn)("design:paramtypes",[])],rt)},16383:(q,K,z)=>{"use strict";z.d(K,{l:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(16847),tt=z(9860);let et=class extends Q.uAl{create(){super.create(),this._petInventoryDataProvider.onPetInventoryDataUpdated.add(this.updateDisplay,this)}updateDisplay(){const q=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this._playerWallet&&(this._playerWallet.updateCurrencyID(1),this._playerWallet.updateAmount(q.getGold()))}destroy(){this._petInventoryDataProvider.onPetInventoryDataUpdated.remove(this.updateDisplay,this),super.destroy()}};(0,Y.Cg)([(0,Q.Cdj)("5d3-90c1"),(0,Y.Sn)("design:type",tt.n)],et.prototype,"_petInventoryDataProvider",void 0),(0,Y.Cg)([(0,Q.MnK)(J.n),(0,Y.Sn)("design:type",J.n)],et.prototype,"_playerWallet",void 0),et=(0,Y.Cg)([(0,Q.EVk)("PetInventoryController",Z.Y.petRescue)],et)},11848:(q,K,z)=>{"use strict";z.d(K,{N:()=>ft});var Y=z(8674),Q=z(62459),X=z(21574),Z=z(50788),J=z(37016),tt=z(96989),et=z(90633),it=z(65240),st=z(35120),nt=z(29738),at=z(77938),rt=z(76277),ot=z(68152),ht=z(56625),ct=z(22023),dt=z(30226),lt=z(6413),ut=z(73678);class ft{static get shouldShowPetMergeTutorial(){return ft._cacheInValidTutorialState&&nt.O.isEnglishLocale()}static set shouldShowPetMergeTutorial(q){ft._cacheInValidTutorialState=q}static hasSeenPetMergeFTUE(){return st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(et.B.FEATURE_PET_MERGE,et.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)}static awardPetMergeFtueIngredients(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;if(st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(et.B.FEATURE_PET_MERGE,et.B.BREADCRUMB_PET_MERGE_FTUE_INGREDIENTS_GIVEN))return;const K=st.q.instance.prodigy.gameContainer,z=K.get("782-c308"),Y=z.kennel;let X=ft.getChosenPetForMergeRankFTUE(K,z,Y);if(!Q.Aq$.isDefined(X)){const q=at.t.getItem("pet",lt.h.STARTER_PETS[0]);dt.J.bagItem(q,st.q.instance.prodigy.game,"got-pet",void 0,{source_type:it.C.QuestReward}),X=Y.data[Y.data.length-1]}if(!(0,rt.G)(Z.J)){(0,ot.v)(Q.Aq$.isDefined(X),"Unable to gift pet merge ingredients for FTUE");let K=at.t.getItem("pet",X.ID);const z=(0,rt.G)(Z.J)?tt.Y.getMerge2RecipeForPet(K.ID,K.data.rarity,X.mergeRank):tt.Y.getRecipeForPet(K.data.evolution.totalEvos,X.mergeRank);K=null!==(q=ct.P8.getRequiredPetMergeIngredient(K,z))&&void 0!==q?q:K;for(let q=0;qz.forceSaveCharacter(q)))}))}static getChosenPetForMergeRankFTUE(q,K,z){const Y=null!=q?q:st.q.instance.prodigy.gameContainer,X=null!=K?K:Y.get("782-c308"),et=null!=z?z:X.kennel,it=ct.P8.showUniquePetsFeature()?et.getPrimaryPets():et.getPets(),nt=(0,rt.G)(Z.J),ot=it.filter((q=>{if(!ct.P8.canPetAccessMergeRanks(q.ID)||q.mergeRank===J.qd.MAX)return!1;if(!nt)return!0;const K=at.t.getItem("pet",q.ID),z=tt.Y.getMerge2RecipeForPet(q.ID,K.data.rarity,q.mergeRank);return!!Q.Aq$.isDefined(z)&&q.level>=z.requiredLevel})),ht=ct.P8.sortPetList(ot);return ht.length>0?ht[0]:null}static cacheCanShowPetMergeTutorial(){if(!nt.O.isEnglishLocale())return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;const q=st.q.instance.prodigy.gameContainer.get("fa1-8ec9"),K=ft.hasSeenPetMergeFTUE();if(!ct.P8.canPlayerAccessPetMergeFeature()||K)return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;const z=st.q.instance.prodigy.world.getCurrentZone();let Y=![ut.A_.CRYSTALCAVERNS,ut.A_.DARKTOWER,ut.A_.TOWERTOWN,ut.A_.HOUSE].includes(z);const Q=q.isBreadcrumbComplete(et.B.FEATURE_PET_MERGE,et.B.BREADCRUMB_PET_MERGE_FTUE_STARTED);if(z!==ut.A_.ACADEMY||q.isBreadcrumbComplete(et.B.BREADCRUMB_UNLOCK_ACADEMY,et.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE)||(Y=!1),!Y)return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;let J;J=!(ct.P8.showUniquePetsFeature()&&!Q)||q.isBreadcrumbComplete(et.B.FEATURE_UNIQUE_PETS,et.B.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE);if(!ht.s.canShowFtue()||!J)return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;if((0,rt.G)(Z.J)){const q=null!==ft.getChosenPetForMergeRankFTUE();this._cacheInValidTutorialState=q}else{const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this._cacheInValidTutorialState=q.getLevel()>=X.g.config.minimumPlayerLevel}return this._cacheInValidTutorialState}}ft._cacheInValidTutorialState=!1},12472:(q,K,z)=>{"use strict";z.d(K,{r:()=>at});var Y=z(62459),Q=z(95891),X=z.n(Q),Z=z(50788),J=z(37016),tt=z(96989),et=z(76277),it=z(22023),st=z(35120),nt=z(77938);class at{static getOwnedIngredientsForRecipe(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=Y.kennel.getPets();if((0,et.G)(Z.J)){return Y.kennel.getAllPetsByID(+q.ID).filter((K=>K.uniqueID!==q.uniqueID))}return X().chain(Q).filter((Y=>tt.Y.isCompatibleIngredient(K,(q=>q===Y.uniqueID?Y:void 0),q,{type:J.J1.Pet,uniqueId:Y.uniqueID},z))).sortBy([q=>q.mergeRank,q=>{var K,z,Y;return null===(Y=null===(z=null===(K=nt.t.getItem("pet",q.ID))||void 0===K?void 0:K.data)||void 0===z?void 0:z.evolution)||void 0===Y?void 0:Y.tier},"level"]).value()}static getMergeIngredientInfo(q){var K,z,Q,X;const st=null!==(K=it.P8.getPetDisplayMergeRank(q.ID,q.uniqueID))&&void 0!==K?K:J.qd.MIN,rt=nt.t.getItem("pet",q.ID),ot={requiredIngredientsCount:0,validPetIngredientCount:0,mergeRecipe:void 0},ht=q=>nt.t.getItem("pet",q),ct=K=>{var z;return null!==(z=it.P8.getPetDisplayMergeRank(q.ID,K))&&void 0!==z?z:J.qd.MIN};if((0,et.G)(Z.J)){if(ot.mergeRecipe=tt.Y.getMerge2RecipeForPet(q.ID,rt.data.rarity,st),Y.Aq$.isDefined(ot.mergeRecipe)&&tt.Y.isMerge2Recipe(ot.mergeRecipe)){const K=at.getOwnedIngredientsForRecipe(q,ht,ot.mergeRecipe);ot.requiredIngredientsCount=null!==(Q=null===(z=ot.mergeRecipe)||void 0===z?void 0:z.ingredientCount)&&void 0!==Q?Q:0;const Y=tt.Y.getMergedIngredientCountPerPet(ct,K,q,rt.data.rarity);ot.validPetIngredientCount=Object.values(Y).reduce(((q,K)=>q+K),0),ot.willLevelOnMerge=K.some((K=>K.level>q.level))}}else{if(ot.mergeRecipe=tt.Y.getRecipeForPet(rt.data.evolution.totalEvos,st),!Y.Aq$.isDefined(ot.mergeRecipe))return;const K=at.getOwnedIngredientsForRecipe(q,ht,ot.mergeRecipe);ot.requiredIngredientsCount=null!==(X=ot.mergeRecipe.ingredientCount)&&void 0!==X?X:0,ot.validPetIngredientCount=K.length,ot.willLevelOnMerge=K.some((K=>K.level>q.level))}return ot}}},4234:(q,K,z)=>{"use strict";z.d(K,{m:()=>dt});var Y,Q=z(8674),X=z(87490),Z=z(62459),J=z(79687);!function(q){q.Hard_map_spawn_constants="195f52c5-daf3-4d6a-80f3-05f67043e2a3",q.Hard_zone_constants="e1194526-45fc-4bf3-8d8c-37475b83204f",q.Regular_map_spawn_constants="d186f15e-4a39-47fe-9005-6c14066475ea",q.Regular_zone_constants="07f88337-a630-4af0-baad-8fb01e5383c0"}(Y||(Y={}));var tt,et=z(97495),it=z(35120),st=z(77938),nt=z(22023),at=z(30226),rt=z(73678),ot=z(95946),ht=z(84399),ct=z(46725);let dt=tt=class{getPetsInZone(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const z=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let Y=[],Q=!0;const X=it.q.instance.prodigy.world.getZone(q).difficultyMode;if(ct.D.isPrefabZoneAvailable(q)||ht.R.isZoneAvailable(q)||X!==et.i.Regular){const z=yield this.getZoneConfig(q,X);Y=null!==(K=null==z?void 0:z.rescuablePets)&&void 0!==K?K:[],Q=!1}if(0===Y.length){const K=it.q.instance.prodigy.gameContainer.get("bac-9e8b");Y=(yield K.getAllSpawnDataInZone(q)).reduce(((q,K)=>{var z;return q.concat(null!==(z=K.mods.encounter)&&void 0!==z?z:[])}),[]).map((q=>q.ID))}const Z=new Map,J=new Map;return Y.forEach((q=>{const K=st.t.getItem("pet",q);if(K&&!Z.has(q)&&(Z.set(q,{ID:q,name:K.data.name,data:K.data,benchType:"main",firstRescuedDate:z.encounters.getPetFirstRescuedDate(q)}),Q)){nt.P8.getPetBench(q).forEach((K=>{const Y=st.t.getItem("pet",K.petID);Y&&!Z.has(K.petID)&&J.set(Y.ID,{ID:Y.ID,name:Y.data.name,data:Y.data,benchType:"bench",fromBench:q,firstRescuedDate:z.encounters.getPetFirstRescuedDate(Y.ID)})}))}})),Array.from(J.keys()).forEach((q=>{Z.has(q)||Z.set(q,J.get(q))})),Array.from(Z.values()).sort(((q,K)=>q.data.ordinal-K.data.ordinal)).sort(((K,z)=>K.data.element===z.data.element?0:K.data.element===tt.ElementForZoneID[q]?-1:1)).sort(((q,K)=>{var z,Y;return(null!==(z=K.firstRescuedDate)&&void 0!==z?z:0)-(null!==(Y=q.firstRescuedDate)&&void 0!==Y?Y:0)}))}))}getZoneConfig(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=(null!=K?K:it.q.instance.prodigy.world.getZone(q).difficultyMode)===et.i.Regular?Y.Regular_zone_constants:Y.Hard_zone_constants;yield it.q.instance.prodigy.gameContainer.get(Z.t5G.AssetLoader).loadAssets([z]);return(yield it.q.instance.game.cache.getJSON(z))[q.replace("_hard","")]}))}getPetsInCurrentZone(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.getPetsInZone(it.q.instance.prodigy.world.getCurrentZone())}))}getZonesForPetId(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return at.J.asyncFilter(Object.values(rt.A_),(K=>(0,Q.sH)(this,void 0,void 0,(function*(){return(yield this.getPetsInZone(K)).some((K=>K.ID===q))}))))}))}getMinMaxEnemyLevelsForZone(q){return(0,Q.sH)(this,void 0,void 0,(function*(){let K;return(ct.D.isPrefabZoneAvailable(q)||ht.R.isZoneAvailable(q))&&(K=yield this.getZoneConfig(q)),Z.Aq$.isDefined(K)||(K=yield this.getZoneConfig(q,et.i.Regular)),null==K?void 0:K.enemyLevels}))}};dt.ElementForZoneID={[rt.A_.FOREST]:X.ELegacyElementType.Earth,[rt.A_.BONFIRE]:ot.a.Fire,[rt.A_.SHIPWRECK]:ot.a.Water,[rt.A_.SHIVERCHILL]:ot.a.Ice,[rt.A_.SKYWATCH]:ot.a.Storm,[rt.A_.FORESTHARD]:X.ELegacyElementType.Earth,[rt.A_.BONFIREHARD]:ot.a.Fire,[rt.A_.SHIPWRECKHARD]:ot.a.Water,[rt.A_.SHIVERCHILLHARD]:ot.a.Ice,[rt.A_.SKYWATCHHARD]:ot.a.Storm},dt=tt=(0,Q.Cg)([(0,J.injectable)()],dt)},36811:(q,K,z)=>{"use strict";z.d(K,{V:()=>at});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(10727),J=z(35120),tt=z(46784),et=z(65050),it=z(41674),st=z(76277),nt=z(13956);class at{static loadPlayerGoalsHUDIcon(){return this._prefabLoader.loadWithDependenciesFromGUID(X.l.FtuePlayerGoalsHudIcon)}static openPlayerGoalsIfPrizeReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if((0,st.G)(Z.d3).enabled)return;const K=J.q.instance.prodigy.gameContainer.get("e47-a136");yield K.updateQuestProgress(),yield K.sendQuestEventPromise;K.surfacedTasks.some((q=>K.isPrizeReady(q)))&&(yield new Promise((K=>{J.q.instance.prodigy.open.prefabMenu(X.l.FtuePlayerGoals,K,!0,!0,!1,{},{interfaceName:tt.B.PlayerGoals,interfaceType:it.Wm.Modal,originType:q,instanceType:et.N.UI})})))}))}}(0,Y.Cg)([(0,nt.b)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],at,"_prefabLoader",void 0)},10551:(q,K,z)=>{"use strict";z.d(K,{d:()=>st});var Y=z(8674),Q=z(62459),X=z(62886),Z=z(35120),J=z(13956),tt=z(30226),et=z(3606),it=z(44677);class st{static initializePlayerGoals(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this._questManager.preloadQuestProgress(),yield st.sendStartQuest(),yield st.sendPlayAfterHoursQuestEvent(),yield st.sendAttachParentQuestEvent(),yield st.sendAttachClassCodeQuestEvent()}))}static get loggedInPlayer(){return Z.q.instance.prodigy.gameContainer.get("ad2-c5b2")}static sendStartQuest(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(X.T.START_QUEST,{id:"player-goals-quest-start"})}))}static sendPlayAfterHours(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(X.T.PLAY_AFTER_HOURS,{})}))}static sendPlayAfterHoursQuestEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){tt.J.isNightTime()&&(yield st.sendPlayAfterHours())}))}static sendAttachParent(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(X.T.ATTACH_PARENT,{})}))}static sendAttachParentQuestEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.loggedInPlayer.player.hasValidatedParentEmail()&&(yield st.sendAttachParent())}))}static sendAttachClassCode(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(X.T.ATTACH_CLASS_CODE,{id:"player-goals-collect-class-code-attach"})}))}static sendAttachClassCodeQuestEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){let q=[];try{q=yield it.p.requestClassCodes()}catch(e){return void Q.VyI.log(`Error requesting class codes: ${e.code}`,Q.$bb.Error)}if(q.length>0)try{(yield it.p.hasAttachedClassCode())||(yield st.sendAttachClassCode())}catch(e){return void Q.VyI.log(`Error getting attached classcode quest status: ${e.code}`,Q.$bb.Error)}}))}static sendCompleteProfileQuizEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(X.T.COMPLETE_PROFILE_QUIZ,{id:"player-goals-profile-quiz"})}))}}(0,Y.Cg)([(0,J.b)("e47-a136"),(0,Y.Sn)("design:type",et.n)],st,"_questManager",void 0)},44677:(q,K,z)=>{"use strict";z.d(K,{p:()=>J});var Y=z(8674),Q=z(3606),X=z(13956),Z=z(35120);class J{static requestClassCodes(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=Z.q.instance.prodigy.gameContainer.get("774-4659");return(yield q.getClassCodes()).data.player.classrooms}))}static get isQuestComplete(){return this._questManager.isQuestComplete}static hasAttachedClassCode(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._questManager.hasAttachedClassCode()}))}static availableQuestTasks(){return this._questManager.availableTasks}static pairedTaskByQuestEventId(q){return this._questManager.pairedTasks.find((K=>{var z,Y,Q,X;const Z=null===(Y=null===(z=K.taskDefinition)||void 0===z?void 0:z.metadata)||void 0===Y?void 0:Y.goalCardData,J=null===(X=null===(Q=K.awardTask.taskDefinition)||void 0===Q?void 0:Q.metadata)||void 0===X?void 0:X.goalCardData,tt=null==Z?void 0:Z.questEventId,et=null==J?void 0:J.questEventId;return tt===q||et===q}))}}(0,Y.Cg)([(0,X.b)("e47-a136"),(0,Y.Sn)("design:type",Q.n)],J,"_questManager",void 0)},46855:(q,K,z)=>{"use strict";z.d(K,{r:()=>tt});var Y=z(62459),Q=z(5491),X=z(35120),Z=z(39984),J=z(55122);class tt{constructor(q,K,z,Y){this._player=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,this.maxLevel=Y,this.baseMaxLevel=Y,this.updateCreatureXpBarInformation(q,K,z)}updateCreatureXpBarInformation(q,K,z){this.levels=[],this.starsRequiredForEachLevel=[],this.currentCreatureStars=q,this.starsToAward=z.totalNonMemberXp+(this._player.hasMembership()?z.memberXp:0);const Y=J.s.activePlayerLevelCap,Q=Z.e.levelFromStars(this.currentCreatureStars+this.starsToAward,K,Y),tt=Z.e.levelFromStars(q,K,Y);if(this.currentRelativeStars=this.currentCreatureStars-Z.e.starsToLevel(tt,K),this.creatureType=K,this.shouldDisplayChargedLevelXp(Q)){const q=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=q.data.chargedLevelData,z=J.s.activePlayerLevelCap,Y=q.getLevel()>=z?q.getLevel():z,Z=K.newLevelData.levelsGained.map((q=>q.level+Y)),et=K.newLevelData.levelsGained.map((q=>q.relativeXp));if(tt>=z)this.levels=Z,this.currentRelativeStars=K.newLevelData.startingLevelRelativeXp,this.starsRequiredForEachLevel=et,this.starsToAward=this.levels[0]=this.maxLevel){const q=Z.e.starsToLevel(this.maxLevel,K)-this.currentCreatureStars;this.starsToAward=Math.min(q,this.starsToAward),this.starsToAward=Math.max(0,this.starsToAward)}tt=J.s.activePlayerLevelCap&&(null===(z=Z.newLevelData.levelsGained)||void 0===z?void 0:z.length)>0}getStarsBetweenLevels(q){const K=q.concat(q[q.length-1]+1).filter((q=>q<=J.s.activePlayerLevelCap)).map((q=>Z.e.starsToLevel(q,this.creatureType)));return K.map(((q,z)=>q-(K[z-1]||0))).splice(1)}getLevels(q,K){return Array.from({length:Math.min(K,this.maxLevel)-q+1},((K,z)=>z+q))}}},59754:(q,K,z)=>{"use strict";z.d(K,{I:()=>vt});var Y=z(8674),Q=z(62459),X=z(66582),Z=z(35120),J=z(7351),tt=z(63352),et=z(73797),it=z(28152),st=z(41674),nt=z(67665),at=z(15485),rt=z(46784),ot=z(19633),ht=z(95057),ct=z(16847),dt=z(53661),lt=z(40743),ut=z(47255),ft=z(43754),bt=z(99015),pt=z(8838);let vt=class extends Q.uAl{constructor(){super(...arguments),this.onFreeRewardsClaimed=new Q.HN0,this.onAllRewardsClaimed=new Q.HN0}postCreate(){var q,K,z,Y;if(super.postCreate(),this._postBattleFlowData=this.getInjectedValue(dt.uo.PostBattleFlowData),!this._postBattleFlowData)return;this._segmentConversionFunnelTrigger={type:"MC-Battle-Reward",category:"battles",contentId:this._segment.postBattleFlow.getBattleId(),adType:ht.R.UnifiedConversionFlow};const X=this._currentPlayer.hasMembership(),Z=null!==(q=this._postBattleFlowData.rewards.find((q=>"currency"===q.type&&27===q.ID)))&&void 0!==q?q:void 0,J=null!==(K=this._postBattleFlowData.memberRewards.find((q=>"currency"===q.type&&27===q.ID)))&&void 0!==K?K:void 0,tt=Z&&null!==(z=Z.N)&&void 0!==z?z:1,et=J&&null!==(Y=J.N)&&void 0!==Y?Y:1,it=this._hardCurrencyDataProvider.getBalance(27)-tt-(X?et:0);this._freeRewardsMagicoinAmountText.text=`x${tt}`,this._memberRewardsMagicoinAmountText.text=`x${et}`,this._currencyDisplay.updateAmount(it),this._getFreeRewardsButton.onClick.addOnce((()=>{this._currencyDisplay.playEarnEffect(it+tt),X||this._segment.purchase.sendFunnelTriggerImpression(this._segmentConversionFunnelTrigger),this.onFreeRewardsClaimed.dispatch()}),this),this._getMemberRewardsButton.onClick.add(this.startConversionFunnel,this),this._collectAllRewardsButton.onClick.addOnce((()=>{this._currencyDisplay.playEarnEffect(it+tt+et)}),this),this.setWizardBankChestStates().catch(Q.RQr.createHandler("PostBattleFlowMagicoinRewardDisplayComponent: Failed to set wizard bank chest states")),X?this._collectAllRewardsButton.onClick.add(this.onAllRewardsClaimed.dispatch,this.onAllRewardsClaimed):this._collectAllRewardsButton.onClick.add(this.claimMemberRewardsAfterConversion,this)}destroy(){Z.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipResponseReceived,this),this._getFreeRewardsButton.onClick.removeAll(),this._getMemberRewardsButton.onClick.removeAll(),this._collectAllRewardsButton.onClick.removeAll(),this.onFreeRewardsClaimed.dispose(),this.onAllRewardsClaimed.dispose(),super.destroy()}claimMemberRewardsAfterConversion(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._segment.item.beginSecureItemTransaction();yield this._magicoinBattleRewardsNetworkHandler.claimMemberRewards(),q.flush(this._segment.postBattleFlow.getItemReceivedMetadata()),this.onAllRewardsClaimed.dispatch()}))}setWizardBankChestStates(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield Promise.all([this._coreMemberBankChestStateManager.onStateUpdated.asPromise(),this._plusMemberBankChestStateManager.onStateUpdated.asPromise(),this._ultraMemberBankChestStateManager.onStateUpdated.asPromise()]);switch(this._featureAccessData.memberTier){case X._$.NonMember:this._coreMemberBankChestStateManager.setState(pt.T.Closed),this._plusMemberBankChestStateManager.setState(pt.T.Closed),this._ultraMemberBankChestStateManager.setState(pt.T.Closed);break;case X._$.MemberCore:this._coreMemberBankChestStateManager.setState(pt.T.Open),this._plusMemberBankChestStateManager.setState(pt.T.Closed),this._ultraMemberBankChestStateManager.setState(pt.T.Closed);break;case X._$.MemberPlus:this._coreMemberBankChestStateManager.setState(pt.T.Open),this._plusMemberBankChestStateManager.setState(pt.T.Open),this._ultraMemberBankChestStateManager.setState(pt.T.Closed);break;case X._$.MemberUltra:default:this._coreMemberBankChestStateManager.setState(pt.T.Open),this._plusMemberBankChestStateManager.setState(pt.T.Open),this._ultraMemberBankChestStateManager.setState(pt.T.Open)}}))}startConversionFunnel(){this._segment.featureCommon.sendButtonEvent({buttonName:at.k.PostBattleFlowMagicoinGetMemberRewards,destinationName:rt.B.MembershipParentAd,interfaceName:rt.B.PostBattleFlowMagicoinRewardDisplay,interfaceType:st.Wm.Screen,saveClickInfo:at.k.PostBattleFlowMagicoinGetMemberRewards}),this._segment.purchase.sendFunnelStart(this._segmentConversionFunnelTrigger),Z.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:ut.o.FunnelPostBattleMagicoinGetMemberRewards,conversionStage:ut.o.StagePostBattleMagicoinClickGetMemberRewards},{id:at.k.PostBattleFlowMagicoinGetMemberRewards,type:st.$N.ButtonClick})}};(0,Y.Cg)([(0,Q.Cdj)("782-c308"),(0,Y.Sn)("design:type",J.W)],vt.prototype,"_currentPlayer",void 0),(0,Y.Cg)([(0,Q.Cdj)("0d7-66d7"),(0,Y.Sn)("design:type",bt.C)],vt.prototype,"_magicoinBattleRewardsNetworkHandler",void 0),(0,Y.Cg)([(0,Q.Cdj)("bec-c6b4"),(0,Y.Sn)("design:type",ft.W)],vt.prototype,"_hardCurrencyDataProvider",void 0),(0,Y.Cg)([(0,Q.Cdj)("73f-58d1"),(0,Y.Sn)("design:type",tt.F)],vt.prototype,"_featureAccessData",void 0),(0,Y.Cg)([(0,Q.Cdj)("20f-5f67"),(0,Y.Sn)("design:type",nt.Y)],vt.prototype,"_segment",void 0),(0,Y.Cg)([(0,Q.MnK)(ct.n),(0,Y.Sn)("design:type",ct.n)],vt.prototype,"_currencyDisplay",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.S),(0,Y.Sn)("design:type",ot.S)],vt.prototype,"_getFreeRewardsButton",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.S),(0,Y.Sn)("design:type",ot.S)],vt.prototype,"_getMemberRewardsButton",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.S),(0,Y.Sn)("design:type",ot.S)],vt.prototype,"_collectAllRewardsButton",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],vt.prototype,"_freeRewardsMagicoinAmountText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],vt.prototype,"_memberRewardsMagicoinAmountText",void 0),(0,Y.Cg)([(0,Q.MnK)(lt.r),(0,Y.Sn)("design:type",lt.r)],vt.prototype,"_coreMemberBankChestStateManager",void 0),(0,Y.Cg)([(0,Q.MnK)(lt.r),(0,Y.Sn)("design:type",lt.r)],vt.prototype,"_plusMemberBankChestStateManager",void 0),(0,Y.Cg)([(0,Q.MnK)(lt.r),(0,Y.Sn)("design:type",lt.r)],vt.prototype,"_ultraMemberBankChestStateManager",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],vt.prototype,"onFreeRewardsClaimed",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],vt.prototype,"onAllRewardsClaimed",void 0),vt=(0,Y.Cg)([(0,Q.EVk)("PostBattleFlowMagicoinRewardDisplay",it.Y.postBattleFlow)],vt)},68788:(q,K,z)=>{"use strict";z.d(K,{D:()=>ve});var Y,Q=z(8674),X=z(62459),Z=z(99625),J=z(28628),tt=z(83798),et=z(39596),it=z(50788),st=z(49754),nt=z(35120),at=z(49237),rt=z(29738),ot=z(1195),ht=z(55734),ct=z(73797),dt=z(70704),lt=z(79399),ut=z(93833),ft=z(98998),bt=z(41674),pt=z(67665),vt=z(66998),gt=z(76277),mt=z(85515),yt=z(94236),_t=z(53661),Et=z(80060),wt=z(60985),Tt=z(1312);!function(q){q.Win="win",q.Loss="loss",q.Draw="draw",q.Timeout="timeout",q.Run="run"}(Y||(Y={}));var St=z(2212),At=z(55122),Ct=z(56718),Ot=z(81914),It=z(90633),Dt=z(65050);class Rt{constructor(q,K,z,Y,Q,Z){this.onComplete=new X.HN0,this.onEvent=new X.HN0,this.postBattleFlowData=q,this.continueButton=K,this.rewardsBar=z,this.animationsInProgress=Y,this.segment=nt.q.instance.prodigy.gameContainer.get("20f-5f67"),this._mainFlowContainer=Q,this._rescueFlowContainer=Z}setup(q,K){var z;X.Aq$.isDefined(null===(z=this.continueButton)||void 0===z?void 0:z.GameObject)&&(this.continueButton.GameObject.active=!0),this.rewardsBar.active=!0,this._expressModeEnabled=q,K&&(this._interfaceName=K,this.sendInterfaceOpenedEvent())}sendInterfaceOpenedEvent(){this.segment.featureCommon.sendInterfaceEvent({interfaceName:this._interfaceName,interfaceType:bt.Wm.Screen,instanceType:Dt.N.Interface,originType:bt.$N.Battle,originID:this.segment.postBattleFlow.getBattleId()})}onAllAnimationsComplete(){}sendPlayerProgressionEvent(q){this.segment.playerProgression.sendFunnelAdvancedEvent({funnelName:"Post Battle Flow",funnelType:"battle",stepName:q,funnelId:this.segment.postBattleFlow.getBattleId()})}dispatchClickToProceed(){this.continueButton.onClick.dispatch(),this.continueButton.onEnabledClick.dispatch()}enableExpressMode(){this._expressModeEnabled=!0,this._waitingForInput&&this.dispatchClickToProceed()}destroy(){this.onComplete.dispose(),this.onEvent.dispose()}}class Pt extends Rt{setup(q){super.setup(q),this._fsmController=nt.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),this._fsmService=nt.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService)}}class Mt extends Pt{constructor(){super(...arguments),this.FSM_ID=57}setup(q){super.setup(q),this.rewardsBar.active=!1;const K=nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=K.hasCompletedTutorial(),Y=nt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(It.B.BREADCRUMB_UNLOCK_ACADEMY,It.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE),Q=nt.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirementsDeprecated(12),X=K.backpack.hasItem("key",22)>0;this._expressModeEnabled||!z||Y||!Q||X?this.onComplete.dispatch():(this.continueButton.GameObject.active=!1,this._fsmController.execute(this._fsmService.getStateMachine(this.FSM_ID),{game:nt.q.instance.game,menu:this},null))}runNextEvent(){var q;this.onComplete.dispatch(),(null===(q=this.continueButton)||void 0===q?void 0:q.GameObject)&&(this.continueButton.GameObject.active=!0)}}class Nt extends Rt{getPrefabInjectionParams(){return{}}setup(q,K){var z,Y;super.setup(q,K);const Q=nt.q.instance.prodigy.gameContainer.get("983-05a7");this._prefabPromise=Et.d.loadWithInjectedValuesAndDependenciesFromGUID(Q,this.PREFAB_GUID,Object.assign(Object.assign({},this.getPrefabInjectionParams()),{[_t.uo.PostBattleFlowData]:this.postBattleFlowData,[_t.uo.PostBattleFlowNumberOfRegularRewardCards]:Ct.S.combineRewards(null!==(z=this.postBattleFlowData.rewards)&&void 0!==z?z:[]).length,[_t.uo.PostBattleFlowNumberOfMemberRewardCards]:Ct.S.combineRewards(null!==(Y=this.postBattleFlowData.memberRewards)&&void 0!==Y?Y:[]).length})).then((q=>(this.rewardsBar.addChild(q),this.continueButton.onClick.addOnce((()=>q.destroy()),this),q.onDestroy.add((()=>this.onComplete.dispatch())),q))).catch(X.RQr.createHandler(`Failed to load prefab ${this.PREFAB_GUID}.`))}}class xt extends Nt{constructor(){super(...arguments),this.PREFAB_GUID=Z.l.Charged_levels_tutorial}setup(q){super.setup(q),this.continueButton.GameObject.active=!1,this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this._prefabPromise.then((q=>{q.transform.setPosition(-this.rewardsBar.transform.worldPosition.x,-this.rewardsBar.transform.worldPosition.y)}))}}var Lt,kt=z(88038);!function(q){q.RewardsAnimationFinished="REWARDS_ANIMATION_FINISHED",q.EvolveAutoSurfaced="EVOLVE_AUTO_SURFACED",q.StandardXPBarSequenceFinished="STANDARD_XP_BAR_SEQUENCE_FINISHED",q.RescueFlowFinished="RESCUE_FLOW_FINISHED"}(Lt||(Lt={}));class Bt extends Rt{constructor(){super(...arguments),this._timeBetweenPrompts=500}setup(q){super.setup(q),this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1,this._expressModeEnabled?this.onComplete.dispatch():this.openEvolutionPrompts().catch(X.RQr.createHandler("Failed to open evolution prompts"))}openEvolutionPrompts(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=nt.q.instance.prodigy.gameContainer.get("bec-c6b4"),K=this.postBattleFlowData.creatures.filter((q=>q.canEvolve)).sort(((q,K)=>q.creature.justLeveled&&!K.creature.justLeveled?-1:K.creature.justLeveled&&!q.creature.justLeveled?1:K.creature.getLevel()-q.creature.getLevel()));K.length>0&&this.onEvent.dispatch(Lt.EvolveAutoSurfaced),kt._.postBattleFlowShown();for(const z of K)if(kt._.shouldAutomaticallyPromptEvolution(q,z.creature.getID())){this._waitingForInput=!0;const q=yt.K.openEvolutionPromptIfEligible(z.creature,z.originalCreature,this._expressModeEnabled,bt.k.PostBattleWin);this._expressModeEnabled&&this.dispatchClickToProceed(),yield q,this._waitingForInput=!1,kt._.automaticEvolutionPromptShown(),yield X.Egh.timeout(this._timeBetweenPrompts)}this.onComplete.dispatch()}))}dispatchClickToProceed(){yt.K.attemptToForceSkip()}}var Ut=z(46784),Ft=z(47917),Gt=z(96810),jt=z(54234);class $t extends Nt{constructor(){super(...arguments),this.PREFAB_GUID=Z.l.RewardsDisplay}setup(q,K){super.setup(q,null!=K?K:Ut.B.PostBattleFlowStandardRewardDisplay),this.continueButton.GameObject.active=this.animationsInProgress.counter<=0,this.continueButton.onClick.addOnce((()=>{nt.q.instance.prodigy.gameContainer.get("20f-5f67").postBattleFlow.sendButtonEvent("post_battle_rewards","battle_rewards_dismiss"),this._waitingForInput=!1})),this.setupRewardAnimationFinishedEvent(),this.sendPlayerProgressionEvent(Gt.l.PostBattleFlowRewardsDisplay)}setupRewardAnimationFinishedEvent(){this._prefabPromise.then((q=>{q.findComponent(jt.I).onRewardsDisplayFilled.addOnce((()=>{this.onEvent.dispatch(Lt.RewardsAnimationFinished),this._waitingForInput=!0,this._expressModeEnabled&&this.dispatchClickToProceed()}))})).catch(X.RQr.createHandler("PostBattleFlowRewardDisplayState.setupRewardAnimationFinishedEvent failed"))}onAllAnimationsComplete(){super.onAllAnimationsComplete(),this.continueButton.GameObject.active=!0}}class Ht extends $t{constructor(){super(...arguments),this.PREFAB_GUID=Z.l.MemberJarRewardsDisplay}getPrefabInjectionParams(){return{[_t.uo.PostBattleFlowContinueCallback]:()=>{this.dispatchClickToProceed()}}}setup(q){nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").isMember()||this.animationsInProgress.counter>0&&this.animationsInProgress.increment(),super.setup(q,Ut.B.PostBattleFlowMemberJarRewardDisplay),this.continueButton.GameObject.active=!1}setupRewardAnimationFinishedEvent(){this._prefabPromise.then((q=>{q.findComponentInChildren(Ft.P).onJarRewardsSequenceFinished.addOnce((()=>{this.onEvent.dispatch(Lt.RewardsAnimationFinished),this._waitingForInput=!0,this._expressModeEnabled&&this.dispatchClickToProceed()}))})).catch(X.RQr.createHandler("PostBattleFlowJarRewardDisplayState.setupRewardAnimationFinishedEvent failed"))}onAllAnimationsComplete(){}}var Vt=z(59754);class Wt extends $t{constructor(){super(...arguments),this.PREFAB_GUID=Z.l.MagicoinRewardsDisplay}getPrefabInjectionParams(){return{[_t.uo.PostBattleFlowContinueCallback]:()=>{this.dispatchClickToProceed()}}}setup(q){super.setup(q,Ut.B.PostBattleFlowMagicoinRewardDisplay),this.continueButton.GameObject.active=!1}setupRewardAnimationFinishedEvent(){this._prefabPromise.then((q=>{q.findComponent(Vt.I).onFreeRewardsClaimed.addOnce((()=>{this.onEvent.dispatch(Lt.RewardsAnimationFinished),this._waitingForInput=!0,this._expressModeEnabled&&this.dispatchClickToProceed()}))})).catch(X.RQr.createHandler("PostBattleFlowMagicoinRewardDisplayState.setupRewardAnimationFinishedEvent failed"))}onAllAnimationsComplete(){}}var qt=z(5491);class Kt extends Rt{setup(q){super.setup(q),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1,this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.setupNootTipScreen()}setupNootTipScreen(){const q=this.postBattleFlowData.creatures.filter((q=>q.creature.creatureType===qt.V.Pet)).map((q=>q.creature.data.uniqueID));nt.q.instance.prodigy.open.postBattleLossMenu(q,this.postBattleFlowData.nootTipBattleInfo,this.onComplete.dispatch.bind(this.onComplete))}}class zt extends Rt{setup(q){super.setup(q),this.onEvent.dispatch(Lt.RewardsAnimationFinished),this.onComplete.dispatch()}}var Yt=z(87490),Qt=z(55346),Xt=z(58347);class Zt extends Rt{constructor(){super(...arguments),this.PBF_RESCUE_LATER="PBF_RESCUE_LATER",this.PBF_CONTINUE_LOC_KEY="PBF_CONTINUE",this.PBF_RESCUE_PETS_LOC_KEY="PBF_RESCUE_PETS",this.PBF_PETS_ARE_RESCUED_LOC_KEY="PBF_PETS_ARE_RESCUED",this._rescuablePets=[],this._rescuePetQueue=[]}setup(q){var K;super.setup(q),(null===(K=this.postBattleFlowData)||void 0===K?void 0:K.rescuablePets)&&0!==this.postBattleFlowData.rescuablePets.length?(this._mainFlowContainer&&(this._mainFlowContainer.active=!1),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!0),this.setupRescuablePets().catch((q=>{X.VyI.log("Failed to setup rescuable pets",X.$bb.Error,q)}))):this.onEvent.dispatch(Lt.RescueFlowFinished)}runRescuePetQueue(q){return(0,Q.sH)(this,void 0,void 0,(function*(){for(this._rescuePetQueue.push(q);this._rescuePetQueue.length>0;){const q=this._rescuePetQueue.pop();q&&(yield q)}}))}setupRescuablePets(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=nt.q.instance.prodigy.gameContainer.get("983-05a7"),K=X.wa5.getActiveScene().container.get(_t.sD.RescuablePetsContainer);yield q.preloadFromGUIDWithDependencies(Z.l.RescuablePet);const z=this.getRescueScreenState();this.postBattleFlowData.rescuablePets.forEach((Y=>{const J=q.loadFromGUID(Z.l.RescuablePet,K).findComponent(Qt.fL);J?(this._rescuablePets.push(J),J.setup(Y,z.showMembershipButton,(()=>this.updateRescuablePetsUI(this.getRescueScreenState().showMembershipButton)),(q=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.runRescuePetQueue(q)}))))):X.VyI.log("RescuablePetComponent not found on RescuablePet prefab",X.$bb.Error)})),this.updatePetsRescuedState(z.hasPetToRescue),z.showMembershipButton&&(nt.q.instance.prodigy.game.broadcaster.addAppListener(ct.H3.MembershipResponseReceived,this.handleMembershipChange,this),nt.q.instance.prodigy.game.broadcaster.addAppListener(ct.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this)),nt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:Ut.B.PetRescueWindow,interfaceType:bt.Wm.Window,originType:bt.$N.AutoSurfaced,instanceType:Dt.N.UI})}))}getRescueScreenState(){const q=nt.q.instance.prodigy.gameContainer,K=q.get("782-c308").canPurchaseMembershipInGame(),z=q.get("bec-c6b4"),Y=(0,gt.G)(Xt.F);let Q=K,X=!1,Z=Number.MAX_SAFE_INTEGER;return this.postBattleFlowData.rescuablePets.forEach((q=>{var J;if(q.battleStatus===Yt.EUnitBattleStatus.Defeated&&(X=!0),q.battleStatus===Yt.EUnitBattleStatus.Defeated&&(null===(J=q.cost)||void 0===J?void 0:J.value)>0){const X=z.canAfford(q.cost);Z=Math.min(Z,q.cost.value),(Y||X&&K)&&(Q=!1)}})),X||(Q=!1),z.isHardCurrencyMemberLocked(Z)&&(Q=!0),{showMembershipButton:Q,hasPetToRescue:X}}updatePetsRescuedState(q){const K=nt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),z={[_t.uo.PostBattleFlowRescueContinueButtonText]:q?K.getText(this.PBF_RESCUE_LATER):K.getText(this.PBF_CONTINUE_LOC_KEY),[_t.uo.PostBattleFlowRescueTitle]:q?K.getText(this.PBF_RESCUE_PETS_LOC_KEY):K.getText(this.PBF_PETS_ARE_RESCUED_LOC_KEY),[_t.uo.PostBattleFlowShowClouds]:q};Et.d.updateInjectedValues(this._rescueFlowContainer,z)}updateRescuablePetsUI(q){let K=!1;this._rescuablePets.forEach((z=>{z.updateUI(),z.isRescued||(K=!0,z.updateButtons(q))})),this.updatePetsRescuedState(K)}handleMembershipChange(q){const K="success"===q;this.updateRescuablePetsUI(!K),K||Et.d.updateInjectedValues(this._rescueFlowContainer,{[_t.uo.EnableRescueButtonInput]:!0})}handleMembershipRewardsFlowComplete(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.updateRescuablePetsUI(!1)}))}destroy(){super.destroy(),nt.q.instance.prodigy.game.broadcaster.removeAppListener(ct.H3.MembershipResponseReceived,this),nt.q.instance.prodigy.game.broadcaster.removeAppListener(ct.H3.MembershipRewardsFlowComplete,this)}}var Jt=z(42448),te=z(44357),ee=z(74958);class ie extends Rt{setup(q){super.setup(q),this.showDialogueIfNecessary().catch((()=>{X.RQr.createHandler("Error displaying Post Battle Flow Rift Key Obtained dialogue."),this.onComplete.dispatch()}))}showDialogueIfNecessary(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,X;const Z=nt.q.instance.prodigy,J=Z.gameContainer.get("ad2-c5b2").player,tt=Z.gameContainer.get("6d6-463e"),[et,it,st]=[null!==(K=null===(q=tt.get({type:"riftRunKey",id:Jt.BN.PortalOneKey}))||void 0===q?void 0:q.quantity)&&void 0!==K?K:0,null!==(Y=null===(z=tt.get({type:"riftRunKey",id:Jt.BN.PortalTwoKey}))||void 0===z?void 0:z.quantity)&&void 0!==Y?Y:0,null!==(X=null===(Q=tt.get({type:"riftRunKey",id:Jt.BN.PortalThreeKey}))||void 0===Q?void 0:Q.quantity)&&void 0!==X?X:0],at=Math.max(et,it,st)>0,rt=J.hasCompletedTutorial(),ot=Z.breadcrumbManager.isBreadcrumbComplete(It.B.FEATURE_RIFTS,It.B.BREADCRUMB_FIRST_RIFT_KEY_OBTAINED);rt&&!ot&&at&&(this.rewardsBar.active=!1,yield(0,te.v$)([1596]),nt.q.instance.prodigy.gameContainer.get("20f-5f67").rifts.sendRiftsFunnelAdvancedEvent(ee.fk.RiftsReceiveFirstRiftKey),Z.breadcrumbManager.completeBreadcrumb(It.B.FEATURE_RIFTS,It.B.BREADCRUMB_FIRST_RIFT_KEY_OBTAINED),this.rewardsBar.active=!0),this.onComplete.dispatch()}))}}class se extends Rt{setup(q){super.setup(q),this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1}onAllAnimationsComplete(){this.onEvent.dispatch(Lt.StandardXPBarSequenceFinished)}}var ne,ae=z(28344),re=z(4903),oe=z(34829),he=z(84415),ce=z(30226),de=z(48982),le=z(1716),ue=z(52157),fe=z(3374);!function(q){q.PetEvolution="1-evolve/in-game-pet-evolution",q.PetCollect="2-collect/in-game-pet-collect",q.MythicalEpics="3-mythical-epics/in-game-mythical-epics",q.PlayAtHome="4-play-at-home/in-game-play-at-home",q.Magicoin="5-magicoin/in-game-magicoin"}(ne||(ne={}));class be extends Rt{constructor(){super(...arguments),this._isAtSchool=!1,this.et=!1}setup(q){super.setup(q),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1,this._activePlayer=nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,this._isAtSchool=this._activePlayer.isPlayingAtSchool()||ce.J.isDateWithinSchoolDayAndHours(new Date(Date.now())),this.et=this._activePlayer.hasMembership(),this.isVideoReady().then((q=>{q?(this.openVideoPlayerMenu(),this._waitingForInput=!1):this.onComplete.dispatch()})).catch((()=>{X.RQr.createHandler("[PostBattleFlowVideoState] Error getting whether video is ready"),this.onComplete.dispatch()}))}isVideoReady(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,X;if(oe.s.get("GameConstants.Battle.SKIP_POST_BATTLE_VIDEOS"))return!1;const Z=(0,gt.G)(ae.y).enabled,J=yield(new ue.L).isReady({questId:le.E.id,taskId:"2-0"});if(Z&&!J)return!1;if(!this._activePlayer.hasCompletedTutorial())return!1;if(!this.checkRequiredBreadcrumbsComplete())return!1;yield this.refreshVideoData();const tt=null!==(z=null===(K=null===(q=this._currentVideoTypeData)||void 0===q?void 0:q.metadata)||void 0===K?void 0:K.showToMembers)&&void 0!==z&&z;if(this.et&&!tt)return!1;const et=null!==(X=null===(Q=null===(Y=this._currentVideoTypeData)||void 0===Y?void 0:Y.metadata)||void 0===Q?void 0:Q.frequencyHours)&&void 0!==X?X:0;return he.a.isFeatureReadyForNextInteraction(this._videoType,3600*et)}))}checkRequiredBreadcrumbsComplete(){const q=nt.q.instance.prodigy.breadcrumbManager;return Array.from(be.REQUIRED_BREADCRUMBS.entries()).every((([K,z])=>q.isBreadcrumbComplete(K,z)))}openVideoPlayerMenu(){var q,K,z,Y,Q,X;const Z=Object.keys(null!==(z=null===(K=null===(q=this._currentVideoTypeData)||void 0===q?void 0:q.data)||void 0===K?void 0:K.videos)&&void 0!==z?z:{});if(Z.length<=0)return void this.onComplete.dispatch();const J=de.h.selectNextVideoInFeature(this._videoType,Z);he.a.saveTimestampData(this._videoType,{videoId:J});const tt=null===(Q=null===(Y=this._currentVideoTypeData)||void 0===Y?void 0:Y.data)||void 0===Q?void 0:Q.videos[J];nt.q.instance.prodigy.open.postBattleMembershipVideoMenu(J,tt,null===(X=this._currentVideoTypeData)||void 0===X?void 0:X.metadata,this._isAtSchool,this.onComplete.dispatch.bind(this.onComplete))}refreshVideoData(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=fe.C.getVideosDataProvider(),K=this.postBattleFlowData.battleType,z=this._isAtSchool?`${K}-school`:`${K}-home`;if(this._currentVideoTypeData=yield q.getVideosDataByType(z),this._videoType=z,!this._currentVideoTypeData){const K=this._isAtSchool?re.s.PostBattleFlowSchool:re.s.PostBattleFlowHome;this._currentVideoTypeData=yield q.getVideosDataByType(K),this._videoType=K}}))}}be.REQUIRED_BREADCRUMBS=new Map([[It.B.FEATURE_ZONE_ENTRY_ILLUSTRATION,It.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST]]);class pe extends Rt{setup(q){super.setup(q),this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1}}let ve=class extends X.uAl{set continueButton(q){this._continueButton=q}get animationsInProgressSemaphore(){return this._animationsInProgressSemaphore}constructor(){super(),this._activePartyMembers=[],this._onActiveTeamChanged=new X.HN0,this._onStateEvent=new X.HN0,this._onActiveTeamInitialized=new X.HN0,this._onShowStarsGained=new X.HN0,this._stateIndex=0,this._expressModeEnabled=!1,this._showPostLossFlow=!1,this.POST_BATTLE_VIDEO_EXEMPT_TYPES=[J.gu.Tutorial1,J.gu.Tutorial1Revised,J.gu.Tutorial2,J.gu.Tutorial2Revised,J.gu.Tutorial3,J.gu.StatusEffectsTutorial,J.gu.Duel,J.gu.MatchmakingDuel,J.gu.MatchmakingBotDuel];{this._starJarController=new ft.b;const q=(0,gt.G)(it.F);nt.q.instance.game.broadcaster.addAppListener(q?ct.ig.Merged:ct.ig.Evolved,(()=>{const q=this._postBattleFlowData.creatures.filter((q=>q.creature instanceof ht.R)).map((q=>q.creature));this.updatePetSpines(q),this._onActiveTeamChanged.dispatch(q)}),this,null)}}postCreate(){var q,K;super.postCreate(),this._postBattleFlowData=this.getInjectedValue(_t.uo.PostBattleFlowData),this._rewardsScalingInfo=this.getInjectedValue(_t.uo.PostBattleFlowRewardsScalingInfo),this._segment.playerProgression.clearPlayerProgressionDataForFunnelName("Post Battle Flow"),this._segment.postBattleFlow.sendPostBattleFlowOpensEvent(),this.updatePetSpines();const z=this.getInjectedValue(_t.uo.PostBattleFlowVictory);this.showXpWarningMessage(z);const Y=this._player.player.isPlayingAtSchool(),Q=this._player.player.hasMembership();let X=!1;const Z=(0,gt.G)(tt.G);if(Z.enabled){const q=Z.unlockLevel;X=this._player.getLevel(){const K=q.creature;return K instanceof ht.R&&K.data.level===K.currentMaxLevel}));Q||Y||!st||Tt.s.startRecording("PostBattleFlowManager","post_battle_flow"),this._statesInOrder=[];const nt=this.getInjectedValue(_t.uo.PostBattleFlowBattleType);if(this._showPostLossFlow=!z&&Ct.S.isPostLossFlowAvailable(nt),this._showPostLossFlow)this.setupPostDefeatStates();else{const q=z&&!this.POST_BATTLE_VIDEO_EXEMPT_TYPES.includes(nt)&&rt.O.isEnglishLocale();this.setupPostBattleStates(it,q)}(null===(K=null===(q=this._postBattleFlowData.creatures[0].creatureXpBarInformation)||void 0===q?void 0:q.levels)||void 0===K?void 0:K.length)>1?this.playerLevelUpCelebrationFlow():this.setupDefaultFlow()}setupPostBattleStates(q,K){var z,Y,Q,X,Z;(0,gt.G)(st.H).enabled&&this._statesInOrder.push(Zt),(0,gt.G)(it.F)||this._statesInOrder.push(Bt),(null===(z=this._postBattleFlowData)||void 0===z?void 0:z.magicoinRewardGranted)?this._statesInOrder.push(Wt):(null===(Q=null===(Y=this._postBattleFlowData)||void 0===Y?void 0:Y.rewards)||void 0===Q?void 0:Q.length)>0||(null===(Z=null===(X=this._postBattleFlowData)||void 0===X?void 0:X.memberRewards)||void 0===Z?void 0:Z.length)>0?(this._statesInOrder.push(q?Ht:$t),this._statesInOrder.push(ie)):this._statesInOrder.push(zt),this._statesInOrder.push(Mt),K&&this._statesInOrder.push(be);{this._activePartyMembers.push(this._centrePartyMember),this._centrePlayerGameObject.active=!0,this._postBattleFlowData.creatures.length>1&&(this._activePartyMembers.push(this._leftPartyMember),this._leftPetSpineRootContainer.visible=!0),this._postBattleFlowData.creatures.length>2&&(this._activePartyMembers.push(this._rightPartyMember),this._rightPetSpineRootContainer.visible=!0);const q=this._postBattleFlowData.creatures.filter((q=>q.creature instanceof ht.R)).map((q=>q.creature));this._onActiveTeamInitialized.dispatch(q)}}setupPostDefeatStates(){this._expressModeEnabled=!0,this._statesInOrder.push(Kt)}finishRescueFlow(){this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this.completeCurrentState(),this.setupPostBattleFlowMemberComponentsForParty(),this._activePartyMembers[0].shouldShowChargedLevelUnlock()&&this._statesInOrder.splice(2,0,xt)}setupDefaultFlow(){this._showPostLossFlow?this.setupNextState():(0,gt.G)(st.H).enabled?(this._statesInOrder.splice(1,0,se),this.setupNextState()):(this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this._statesInOrder.unshift(se),this.setupNextState(),this.setupPostBattleFlowMemberComponentsForParty())}playerLevelUpCelebrationFlow(){this._rewardsBar.active=!1,(0,gt.G)(st.H).enabled?(this._statesInOrder.splice(1,0,pe),this.setupNextState()):(this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this._statesInOrder.unshift(pe),this.setupNextState(),this.setupPostBattleFlowMemberComponentsForParty(),this._activePartyMembers[0].shouldShowChargedLevelUnlock()&&this._statesInOrder.splice(1,0,xt))}initPetLevelUp(){this.setupPostBattleFlowMemberComponentsForParty()}evolvePet(q){const K=this._postBattleFlowData.creatures[q];if(!(K&&K.creature instanceof ht.R))return void X.VyI.log(`Warning: attempted to evolve pet in post battle flow with invalid index ${q}`,X.$bb.Warning);const z=this._postBattleFlowData.creatures[q];yt.K.openEvolutionPromptIfEligible(z.creature,z.originalCreature,!1,bt.k.PostBattleWin).then((q=>{q&&(this._leftPartyMember.enableEvolveButtonInput(!0),this._rightPartyMember.enableEvolveButtonInput(!0))})).catch(X.RQr.createHandler("Error showing evolution summary in post battle flow"))}showMergeMenu(q){const K=this._postBattleFlowData.creatures[q];if(!(K&&K.creature instanceof ht.R))return void X.VyI.log(`Warning: attempted to merge pet in post battle flow with invalid index ${q}`,X.$bb.Warning);const z=this._postBattleFlowData.creatures[q];nt.q.instance.prodigy.open.petMergeMenu(z.creature.data,bt.k.PostBattleWin,(()=>{this._leftPartyMember.enableMergeButtonInput(!0),this._rightPartyMember.enableMergeButtonInput(!0),this._leftPartyMember.updateMergeBadgeRank(),this._rightPartyMember.updateMergeBadgeRank()}))}destroy(){var q,K;null===(K=null===(q=nt.q.instance.game.state.getCurrentState())||void 0===q?void 0:q.endCombat)||void 0===K||K.call(q,Y.Win),Tt.s.stopRecording(),this._onActiveTeamChanged.dispose(),this._onStateEvent.dispose(),this._onActiveTeamInitialized.dispose(),this._onShowStarsGained.dispose(),nt.q.instance.game.broadcaster.removeAppListener(ct.ig.Evolved,this),super.destroy()}setupNextState(){var q,K,z,Y,Q;if(this._stateIndex>=this._statesInOrder.length)return void(0===(null===(K=null===(q=this._postBattleFlowData)||void 0===q?void 0:q.rewards)||void 0===K?void 0:K.length)&&0===(null===(Y=null===(z=this._postBattleFlowData)||void 0===z?void 0:z.memberRewards)||void 0===Y?void 0:Y.length)?(this._continueButton.GameObject.active=!0,this._continueButton.onClick.addOnce((()=>{this._segment.postBattleFlow.sendPBFClosedEvent(),this.endPostBattleFlow()})),this._expressModeEnabled&&(this._continueButton.onClick.dispatch(),this._continueButton.onEnabledClick.dispatch())):(this._segment.postBattleFlow.sendPBFClosedEvent(),this.endPostBattleFlow()));const Z=new this._statesInOrder[this._stateIndex](this._postBattleFlowData,this._continueButton,this._rewardsBar,this._animationsInProgressSemaphore.semaphore,this._mainFlowContainer,this._rescueFlowContainer);if(Z.onComplete.addOnce((()=>{this._stateIndex++,Z.destroy(),this.setupNextState()})),Z.onEvent.add((q=>{this._onStateEvent.dispatch(q)})),X.Aq$.isDefined(null===(Q=this._continueButton)||void 0===Q?void 0:Q.GameObject)){this._continueButton.GameObject.findComponentInChildren(X.EYj).text=this._stateIndex===this._statesInOrder.length-1?this._baseLocalizer.getText("BUTTON_DONE"):this._baseLocalizer.getText("DIALOG_CONTINUE")}this._currentState=Z,Z.setup(this._expressModeEnabled)}onAllAnimationsComplete(){this._currentState.onAllAnimationsComplete()}redeemStarsThroughMemberJar(){const q=this._starJarController.getNumberOfStoredStars(),K={baseXp:0,memberXp:Math.round(q/this._postBattleFlowData.creatures.length),totalNonMemberXp:0},z=At.s.calculatePlayerOverflowXp(K.memberXp);return this._postBattleFlowData.awardXp(K),this._player.player.data.storedMemberStars=0,this._postBattleFlowData.saveCharacterData(),z>0&&this._postBattleFlowData.awardChargedLevelStarJarXp({baseXp:0,memberXp:z,totalNonMemberXp:0}).catch(X.RQr.createHandler("[PostBattleFlowManagerComponent] Failed to award charged level star jar xp.")),{totalStarsAwarded:q,starJarXpGained:K}}visuallyRedeemStarsThroughMemberJar(q){this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this._centrePartyMember.visuallyAwardPartyMemberXpOutsideOfSetup(q),this._leftPartyMember.visuallyAwardPartyMemberXpOutsideOfSetup(q),this._rightPartyMember.visuallyAwardPartyMemberXpOutsideOfSetup(q)}completeCurrentState(){this._currentState.onComplete.dispatch()}incrementAnimationsInProgress(){this._animationsInProgressSemaphore.increment()}decrementAnimationsInProgress(){this._animationsInProgressSemaphore.decrement()}updatePetSpines(q){const K=null!=q?q:this._postBattleFlowData.creatures.filter((q=>q.creature instanceof ht.R)).map((q=>q.creature));this._petSpinesComponent.updatePetSpines(K)}enableExpressMode(q){var K;this._expressModeEnabled=!0,X.Aq$.isDefined(q)&&this.showForceEndDialog(q).catch(X.RQr.createHandler("PostBattleFlowManagerComponent.enableExpressMode failed")),null===(K=this._currentState)||void 0===K||K.enableExpressMode()}showXpWarningMessage(q){const K=wt.R.shouldShowRewardsScalingWarning(this._rewardsScalingInfo)||St.J.shouldShowHardModePbfBannerWarning();this._scaledRewardsWarning.active=q&&K}showForceEndDialog(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const z=nt.q.instance.prodigy.gameContainer.get("983-05a7");if(this._forceEndDialog=yield Et.d.loadWithInjectedValuesAndDependenciesFromGUID(z,Z.l.WarningToaster,{NOTIFICATION_BODY_TEXT:q}),this._forceEndDialog.setLayer(mt.E.Ui),!X.Aq$.isDefined(this._forceEndDialog))return;const Y=null===(K=this._forceEndDialog.findChildByName("FromBottom"))||void 0===K?void 0:K.findComponent(vt.s);null==Y||Y.runInTween()}))}setupPostBattleFlowMemberComponentsForParty(){var q,K;let z=0;for(let Y=0;Y{"use strict";z.d(K,{O:()=>ut});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(50788),J=z(5491),tt=z(76277),et=z(53661),it=z(80060),st=z(1195),nt=z(77938),at=z(39984),rt=z(28152),ot=z(25809),ht=z(95913),ct=z(72162),dt=z(55122),lt=z(50475);let ut=class extends Q.uAl{constructor(){super(...arguments),this._onXpGained=new Q.HN0,this._onMemberXpGained=new Q.HN0,this._onLevelUp=new Q.HN0,this._onChargedLevelUp=new Q.HN0,this._onSpellLearned=new Q.HN0,this._onStatGained=new Q.HN0,this._onStarsGained=new Q.HN0}setup(q,K,z,Y=!0){this._xpGained=q,this._creatureInformation=K,Y&&(this._xpBar.GameObject.active=!0,this._xpBar.onLevelUp.addOnce(((q,K)=>{const z=this.buildPopupMessagePropertiesForCreatureForLevelUp(K);this._levelUpPopupMessageManager.playPopupMessageAnimations(z).catch(Q.RQr.createHandler("Failed to play level up popup message animations."))})),this._xpBar.setup(this._creatureInformation.creatureXpBarInformation,z,!0,this.shouldShowChargedLevelUnlock()),this._onStarsGained.dispatch(this._creatureInformation.creatureXpBarInformation.starsToAward),this.playPopupMessagesForCreatureXpGain(),(0,tt.G)(Z.F)&&this.updateMergeBadgeRank())}visuallyAwardPartyMemberXpOutsideOfSetup(q){this._xpBar.GameObject.active&&(this._xpGained=q,this._creatureInformation.updateMainCreatureInformation(this._creatureInformation.creature,q),this._xpBar.fakeAwardXp(!1,q),this.playPopupMessagesForCreatureXpGain())}shouldShowChargedLevelUnlock(){var q,K;return this._creatureInformation.creatureXpBarInformation.creatureType===J.V.Player&&(null===(K=null===(q=this._currentPlayer.player.data)||void 0===q?void 0:q.chargedLevelData)||void 0===K?void 0:K.hasJustReceivedFreeChargedLevel)}buildPopupMessagePropertiesForCreatureForLevelUp(q){const K=[];if(0===q){const q=this._creatureInformation.creatureXpBarInformation.creatureType===J.V.Player&&this._creatureInformation.creatureXpBarInformation.levels[0]>dt.s.activePlayerLevelCap?ht.v4.chargeUp(this._onChargedLevelUp):ht.v4.levelUp(this._onLevelUp);K.push(q)}if(K.push(...ht.v4.battleStats(this._creatureInformation.statIncreases,this._onStatGained)),q===this._creatureInformation.creatureXpBarInformation.levels.length-2){const q=this.buildSpellLearnedPopupMessagesForCreatureLevelUp();K.push.apply(K,q)}return K}buildSpellLearnedPopupMessagesForCreatureLevelUp(){const q=[];for(const K of this._creatureInformation.unlockedSpellsDisplayInformation)q.push(ht.v4.spell(K,this._onSpellLearned));return q}playPopupMessageForPetChargedLevel(){if(!this._creatureInformation)return;const q=this._creatureInformation.creature.getBattleAssetSpecifier(),K=nt.t.getItem(q.type,q.id),z=null==K?void 0:K.data,Y=this._creatureInformation.creature.getLevel()+this._currentPlayer.getChargedLevel()-1,X=this._creatureInformation.creature.getLevel()+this._currentPlayer.getChargedLevel(),Z=at.e.getStatIncreasesFromLevelUps(z,Y,X),J=ht.v4.battleStats(Z);this._levelUpPopupMessageManager.playPopupMessageAnimations(J).catch(Q.RQr.createHandler("Failed to play level up popup message animations."))}playPopupMessagesForCreatureXpGain(){const q=[];this._currentPlayer.getLevel()>=dt.s.activePlayerLevelCap||(this._xpGained.totalNonMemberXp&&q.push({type:ct.m0.Stat,statIncreaseAmount:this._xpGained.baseXp,atlasGuid:X._.Ui_postbattle_json,atlasFrameName:"small-levelup",showSignal:this._onXpGained}),this._currentPlayer.isMember()&&this._xpGained.memberXp&&q.push({type:ct.m0.Stat,statIncreaseAmount:this._xpGained.memberXp,atlasGuid:X._.Ui_postbattle_json,atlasFrameName:"small-levelup-member",showSignal:this._onMemberXpGained}),q.length>0&&this._xpGainedPopupMessageManager.playPopupMessageAnimations(q).catch(Q.RQr.createHandler("Failed to play wizard XP gained popup messages")))}destroy(){this._onXpGained.dispose(),this._onMemberXpGained.dispose(),this._onLevelUp.dispose(),this._onChargedLevelUp.dispose(),this._onSpellLearned.dispose(),this._onStatGained.dispose(),this._onStarsGained.dispose(),super.destroy()}enableEvolveButtonInput(q){this._xpBar.evolveButton.setButtonEnabled(q)}enableMergeButtonInput(q){this._xpBar.mergeButton.setButtonEnabled(q)}updateMergeBadgeRank(){var q;it.d.updateInjectedValues(this._xpBar.GameObject,{[et.hi.YourPetPanelPetMergeRank]:null!==(q=this._creatureInformation.creature.data.mergeRank)&&void 0!==q?q:0})}};(0,Y.Cg)([(0,Q.MnK)(lt.B),(0,Y.Sn)("design:type",lt.B)],ut.prototype,"_xpBar",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.g),(0,Y.Sn)("design:type",ot.g)],ut.prototype,"_levelUpPopupMessageManager",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.g),(0,Y.Sn)("design:type",ot.g)],ut.prototype,"_xpGainedPopupMessageManager",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ut.prototype,"_onXpGained",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ut.prototype,"_onMemberXpGained",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ut.prototype,"_onLevelUp",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ut.prototype,"_onChargedLevelUp",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ut.prototype,"_onSpellLearned",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ut.prototype,"_onStatGained",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ut.prototype,"_onStarsGained",void 0),(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",st.E)],ut.prototype,"_currentPlayer",void 0),ut=(0,Y.Cg)([(0,Q.EVk)("PostBattleFlowPartyMember",rt.Y.postBattleFlow)],ut)},54234:(q,K,z)=>{"use strict";z.d(K,{I:()=>ot});var Y=z(8674),Q=z(62459),X=z(83798),Z=z(39596),J=z(1195),tt=z(77938),et=z(28152),it=z(76277),st=z(53661),nt=z(80060),at=z(56718);const rt=["r-common","r-uncommon","r-rare","r-heroic","r-legendary"];let ot=class extends Q.uAl{constructor(){super(...arguments),this._displayRegular=!0,this._displayMember=!0,this._rewardScalingThresholds=[4],this._rewardScalingRowSpacings=[84],this._rewardScalingColumnSpacings=[104],this._rewardScalingValues=[.6],this._rewardScalingColumnAmounts=[4],this.onRewardsDisplayFilled=new Q.HN0,this.onThresholdExceeded=new Q.HN0}postCreate(){const q=Object.create(null,{postCreate:{get:()=>super.postCreate}});return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;if(q.postCreate.call(this),this._postBattleFlowData=this.getInjectedValue(st.uo.PostBattleFlowData),!this._postBattleFlowData)return;const Q=this._loggedInPlayer.isMember();let J=(0,it.G)(Z.g)||!this._loggedInPlayer.player.isPlayingAtSchool()||Q;const et=(0,it.G)(X.G);if(et.enabled&&J){const q=et.unlockLevel;J=this._player.getLevel()>=q}const ot=Symbol();let ht=[];this._postBattleFlowData.rewards&&this._displayRegular&&(ht=ht.concat(this._postBattleFlowData.rewards)),this._postBattleFlowData.memberRewards&&this._displayMember&&J&&(ht=ht.concat(this._postBattleFlowData.memberRewards.map((q=>Object.assign(Object.assign({},q),{[ot]:!Q}))))),ht=at.S.combineRewards(ht),this._gridLayout.GameObject.active=!1;const ct=(yield Promise.all(ht.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return[q,yield tt.t.secureGetItem(q.type,q.ID)]})))))).filter((([,q])=>null==q?void 0:q.data));for(const[q,{data:Y}]of ct){const Q=null!==(K=q.N)&&void 0!==K?K:1,X=null!==(z=Y.rarity)&&void 0!==z?z:0,Z=rt[X],tt=q[ot],et=yield nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._cardPrefabGuid,{[st.uo.PostBattleFlowRewardCardAssetId]:q.ID,[st.uo.PostBattleFlowRewardCardAssetType]:q.type,[st.uo.PostBattleFlowRewardCardFrame]:Z,[st.uo.PostBattleFlowRewardCardMoreThanOneItem]:Q>1,[st.uo.PostBattleFlowRewardCardAmountText]:`x${Q}`,[st.uo.PostBattleFlowRewardCardMemberItem]:Y.member&&!J,[st.uo.PostBattleFlowRewardCardIsLocked]:tt||Y.member&&J});if(ht.length>this._rewardScalingThresholds[0]){const q=this._rewardScalingThresholds.findIndex(((q,K)=>K===this._rewardScalingThresholds.length-1||ht.length>q&&ht.length<=this._rewardScalingThresholds[K+1]));this._gridLayout.setRowSpacing(this._rewardScalingRowSpacings[q]),this._gridLayout.setColumnSpacing(this._rewardScalingColumnSpacings[q]),this._gridLayout.setFixedColumnCount(this._rewardScalingColumnAmounts[q]),et.transform.setScale(this._rewardScalingValues[q]),this.onThresholdExceeded.dispatch()}if(!this._gridLayout.GameObject)return;this._gridLayout.GameObject.addChild(et)}this.onRewardsDisplayFilled.dispatch(),this._gridLayout.GameObject.active=!0}))}destroy(){this.onRewardsDisplayFilled.dispose(),this.onThresholdExceeded.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(Q.JTA),(0,Y.Sn)("design:type",Q.JTA)],ot.prototype,"_gridLayout",void 0),(0,Y.Cg)([(0,Q.i0J)(Q.Z$z.Prefab),(0,Y.Sn)("design:type",String)],ot.prototype,"_cardPrefabGuid",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ot.prototype,"_displayRegular",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ot.prototype,"_displayMember",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.g11)(),(0,Y.Sn)("design:type",Array)],ot.prototype,"_rewardScalingThresholds",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.g11)(),(0,Y.Sn)("design:type",Array)],ot.prototype,"_rewardScalingRowSpacings",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.g11)(),(0,Y.Sn)("design:type",Array)],ot.prototype,"_rewardScalingColumnSpacings",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.g11)(),(0,Y.Sn)("design:type",Array)],ot.prototype,"_rewardScalingValues",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.g11)(),(0,Y.Sn)("design:type",Array)],ot.prototype,"_rewardScalingColumnAmounts",void 0),(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",Object)],ot.prototype,"_loggedInPlayer",void 0),(0,Y.Cg)([(0,Q.Cdj)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],ot.prototype,"_prefabLoader",void 0),(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",J.E)],ot.prototype,"_player",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ot.prototype,"onRewardsDisplayFilled",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ot.prototype,"onThresholdExceeded",void 0),ot=(0,Y.Cg)([(0,Q.EVk)("PostBattleFlowRewardsDisplay",et.Y.postBattleFlow)],ot)},50475:(q,K,z)=>{"use strict";z.d(K,{B:()=>ct});var Y,Q=z(8674),X=z(62459),Z=z(5491),J=z(35120),tt=z(28152),et=z(26004),it=z(93171),st=z(19633),nt=z(72379),at=z(37773),rt=z(65732),ot=z(97317),ht=z(55122);let ct=Y=class extends X.uAl{constructor(){super(...arguments),this.runOnSetup=!0,this.onSetup=new X.HN0,this.onLevelUp=new X.HN0,this.onChargedLevelUnlocked=new X.HN0,this.onBarCompletelyFinishedAnimating=new X.HN0,this.onPreviewBarReachLevelUp=new X.HN0,this._skipFakeAwardXp=!1}get _canShowChargedLevels(){var q;return(null===(q=this._creatureXpBarInformation)||void 0===q?void 0:q.creatureType)===Z.V.Player}setup(q,K=10,z=!1,Y=!1){const Q=q.levels[0];this._creatureXpBarInformation=q,this._barFillSpeed=K,this.showPreviewBar=this.delayPreview=z,this.showChargedLevelUnlock=Y,this.levelText.text=Q.toString(),this.onSetup.dispatch(Q,0);const X=ht.s.baseLevelRequiredForChargedLevels,Z=this._creatureXpBarInformation.levels[0]>X;this._canShowChargedLevels&&this.showChargedLevelUnlock&&Q<=X?this.showChargedLevelUnlockSequence():(Z&&this.showBarWithChargedLevels(),this.runOnSetup?this.fakeAwardXp():this._creatureXpBarInformation.levels[0]>=this._creatureXpBarInformation.maxLevel?(this.progressBar.setValue(1),this.showBarAtMaxLevel()):this.progressBar.setValue(this._creatureXpBarInformation.currentRelativeStars/this._creatureXpBarInformation.starsRequiredForEachLevel[0]))}drainXpBar(q){this._barFillSpeed=q>0?30:10,this.progressBar.setValue(1),this.progressBar.tweenValue(0),q<=0||this.progressBar.onComplete.addOnce((()=>{var K,z,Y;const Q=null!==(Y=null===(z=null===(K=this._chargedLevelsProgressManager)||void 0===K?void 0:K.chargedLevelsProgressData)||void 0===z?void 0:z.chargedLevel)&&void 0!==Y?Y:0,X=this._creatureXpBarInformation.baseMaxLevel+Q+(q-1);X>this._creatureXpBarInformation.maxLevel?this.showBarWithChargedLevels():this.showBarAtNonMaxLevel(),this.levelText.text=X.toString(),this.drainXpBar(q-1)}))}fakeAwardXp(q=!0,K){if(this._numTimesXpBarFilled=0,this._skipFakeAwardXp)return;q||this._creatureXpBarInformation.updateCreatureXpBarInformation(this._creatureXpBarInformation.currentCreatureStars+this._starsEarned,this._creatureXpBarInformation.creatureType,K),this._starsToAddToBar=this._starsEarned=this._creatureXpBarInformation.starsToAward;const z=this._creatureXpBarInformation.currentRelativeStars/this._creatureXpBarInformation.starsRequiredForEachLevel[0];this.previewProgressBar.setValue(z),this.progressBar.setValue(z),0===this._starsToAddToBar?(this._creatureXpBarInformation.levels[0]>=this._creatureXpBarInformation.maxLevel&&(this.progressBar.setValue(1),this.showBarAtMaxLevel()),this.showPreviewBar?this.showPreviewBar=!1:(this.progressBar.onComplete.dispatch(),this.onBarCompletelyFinishedAnimating.dispatch())):this.delayPreview||this.tweenBar(this._creatureXpBarInformation.currentRelativeStars)}tweenBar(q=0){if(this.previewProgressBar&&this.progressBar&&this.GameObject&&this._starsToAddToBar){let K=1,z=this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled],Y=q+this._starsToAddToBar===this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled];q+this._starsToAddToBar{this.tweenBar(this._creatureXpBarInformation.currentRelativeStars)})),1===K&&Q.onComplete.addOnce((()=>{if(this._canShowChargedLevels&&this.showChargedLevelUnlock&&Z)this.showBarAtMaxLevel(),this.progressBar.setValue(1),this.onChargedLevelUnlocked.dispatch();else{const q=this._canShowChargedLevels&&this._creatureXpBarInformation.levels[this._numTimesXpBarFilled]>this._creatureXpBarInformation.maxLevel;this.onPreviewBarReachLevelUp.dispatch(q)}}))):(1===K&&Q.onComplete.addOnce((()=>{this._canShowChargedLevels&&Z?this.levelText.text=this._creatureXpBarInformation.maxLevel.toString():this.onLevelUp.dispatch(this._creatureXpBarInformation.levels[this._numTimesXpBarFilled+1],this._numTimesXpBarFilled)}),this),Y&&Q.onComplete.addOnce((()=>{this.onBarCompletelyFinishedAnimating.dispatch()}))),Q.fillSpeedMS=0===this._numTimesXpBarFilled?Math.min((z-q)/this._barFillSpeed*1e3,3e3):Math.min((z-q)/this._barFillSpeed*1e3,1e3),Q.tweenValue(K)}}resetXpBar(){if(0===this._numTimesXpBarFilled?this._starsToAddToBar-=this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled]-this._creatureXpBarInformation.currentRelativeStars:this._starsToAddToBar-=this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled],this._numTimesXpBarFilled++,this._numTimesXpBarFilled>=this._creatureXpBarInformation.levels.length)return void this.onBarCompletelyFinishedAnimating.dispatch();const q=this._creatureXpBarInformation.levels[this._numTimesXpBarFilled];if(this.levelText.text=q.toString(),q>=this._creatureXpBarInformation.maxLevel)this.showBarAtMaxLevel(),this.progressBar.setValue(1),this.onBarCompletelyFinishedAnimating.dispatch();else{(this._creatureXpBarInformation.levels[this._numTimesXpBarFilled]>ht.s.baseLevelRequiredForChargedLevels?this.showBarWithChargedLevels.bind(this):this.showBarAtNonMaxLevel.bind(this))(),this.progressBar.setValue(0),this.previewProgressBar.setValue(0),this.tweenBar()}}setXPBarToZero(){this.showBarAtNonMaxLevel(),this.progressBar.setValue(0)}showChargedLevelUnlockSequence(){this.showBarAtMaxLevel(),this.progressBar.setValue(1),this.onChargedLevelUnlocked.dispatch(),this._creatureXpBarInformation.levels.unshift(ht.s.baseLevelRequiredForChargedLevels),this._creatureXpBarInformation.starsRequiredForEachLevel.unshift(0),this._starsToAddToBar=this._starsEarned=this._creatureXpBarInformation.starsToAward,this._skipFakeAwardXp=!0}getChargedXpBarAnimations(){var q;const K=at.e.getActivePlayerChargedLevelTier();return K===ot.Bv.NO_CHARGE?null:null!==(q=Y.CHARGED_LEVELS_TIER_ANIMATIONS[K])&&void 0!==q?q:null}playChargedTierUpgradeAnimations(q){var K;const z=this._creatureXpBarInformation.maxLevel,Y=ot.QT.MAX_NONMEMBER_CHARGED_LEVEL+z,Q=ot.QT.MAX_MEMBER_CHARGED_LEVEL+z;q!==Y&&q!==Q||(null===(K=this.gameObjectContext)||void 0===K||K.Container.rebind(rt.E.ShowTierUp).toConstantValue(!0),this.gameObject.findComponentsInChildren(et.B).forEach((q=>q.consume())))}showBarWithChargedLevels(){var q,K;this.progressBar.setFillColor("#A6FFFE"),this.previewProgressBar.setInnerColor("#5D8789"),this.previewProgressBar.setOuterColor("#612531"),this._maxLevelText.active=!1,null===(q=this.gameObjectContext)||void 0===q||q.Container.rebind(rt.E.ShowXpBar).toConstantValue(!0),null===(K=this.gameObjectContext)||void 0===K||K.Container.rebind(rt.E.LevelTierIdleAnimation).toConstantValue(this.getChargedXpBarAnimations()),this.gameObject.findComponentsInChildren(et.B).forEach((q=>q.consume()))}showBarAtMaxLevel(){this.progressBar.setFillColor("#A7E34E"),this.previewProgressBar.setInnerColor("#A7E34E"),this.previewProgressBar.setOuterColor("#2E573A"),this._maxLevelText.active=!0,this._canShowChargedLevels&&at.e.getActivePlayerChargedLevelTier()===ot.Bv.MAX_CHARGE&&(this._maxLevelText.findComponent(X.EYj).text=J.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MAX_CHARGE"))}showBarAtNonMaxLevel(q=!1){var K,z;this.progressBar.setFillColor("#F8CC38"),this.previewProgressBar.setInnerColor("#9D4539"),this.previewProgressBar.setOuterColor("#612531"),this._maxLevelText.active=!1,q||(null===(K=this.gameObjectContext)||void 0===K||K.Container.rebind(rt.E.ShowXpBar).toConstantValue(!1),null===(z=this.gameObjectContext)||void 0===z||z.Container.rebind(rt.E.LevelTierIdleAnimation).toConstantValue(ot.Bv.NO_CHARGE),this.gameObject.findComponentsInChildren(et.B).forEach((q=>q.consume())))}destroy(){super.destroy(),this.onSetup.dispose(),this.onLevelUp.dispose(),this.onChargedLevelUnlocked.dispose(),this.onBarCompletelyFinishedAnimating.dispose(),this.onPreviewBarReachLevelUp.dispose()}};ct.CHARGED_LEVELS_TIER_ANIMATIONS={[ot.Bv.CHARGED]:"tier-2-idle",[ot.Bv.MAX_CHARGE]:"tier-4-idle"},(0,Q.Cg)([(0,X.Cdj)("c5a-49f2"),(0,Q.Sn)("design:type",nt.g)],ct.prototype,"_chargedLevelsProgressManager",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ct.prototype,"runOnSetup",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],ct.prototype,"levelText",void 0),(0,Q.Cg)([(0,X.MnK)(it.a),(0,Q.Sn)("design:type",it.a)],ct.prototype,"progressBar",void 0),(0,Q.Cg)([(0,X.MnK)(it.a),(0,Q.Sn)("design:type",it.a)],ct.prototype,"previewProgressBar",void 0),(0,Q.Cg)([(0,X.MnK)(X.bE_),(0,Q.Sn)("design:type",X.bE_)],ct.prototype,"gameObjectContext",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ct.prototype,"onSetup",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ct.prototype,"onLevelUp",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ct.prototype,"onChargedLevelUnlocked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ct.prototype,"onBarCompletelyFinishedAnimating",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ct.prototype,"onPreviewBarReachLevelUp",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ct.prototype,"_maxLevelText",void 0),(0,Q.Cg)([(0,X.MnK)(st.S),(0,Q.Sn)("design:type",st.S)],ct.prototype,"evolveButton",void 0),(0,Q.Cg)([(0,X.MnK)(st.S),(0,Q.Sn)("design:type",st.S)],ct.prototype,"mergeButton",void 0),ct=Y=(0,Q.Cg)([(0,X.EVk)("XpBar",tt.Y.postBattleFlow)],ct)},55346:(q,K,z)=>{"use strict";z.d(K,{fL:()=>Ot});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(27842);let tt=class extends Q.uAl{constructor(){super(...arguments),this._lastPlayedMap=new Map,this._timesPlayedMap=new Map}playXpGain(){this.playSound(this._xpPlayer)}playMemberXpGain(){this.playSound(this._memberXpPlayer)}playXpParticleTrail(){this.playSound(this._xpParticleTrail)}playLevelUp(){this.playSound(this._levelUpPlayer)}playChargedLevelUp(){this.playSound(this._chargedLevelUpPlayer)}playChargedLevelUnlocked(){this.playSound(this._chargedLevelUnlocked)}playLevelUpCelebrationFanfare(){this.playSound(this._levelUpCelebrationFanfare)}playSpellLearned(){this.playSound(this._spellLearnedPlayer)}playStatGained(){this.playSound(this._statGainedPlayer)}playBarFilled(){this.playSoundSingular(this._barFillPlayer)}stopBarFilled(){this.stopSoundSingular(this._barFillPlayer)}playSound(q){const K=Date.now();K-(this._lastPlayedMap.has(q)?this._lastPlayedMap.get(q):0)>50&&(q.play(),this._lastPlayedMap.set(q,K))}playSoundSingular(q){q.isPlaying()||q.play();const K=this._timesPlayedMap.has(q)?this._timesPlayedMap.get(q):0;this._timesPlayedMap.set(q,K+1)}stopSoundSingular(q){if(!q.isPlaying())return void this._timesPlayedMap.set(q,0);const K=this._timesPlayedMap.has(q)?this._timesPlayedMap.get(q):0;K-1==0&&q.stop(),this._timesPlayedMap.set(q,K-1)}pauseBGM(){X.q.instance.prodigy.audio.pauseBGM()}resumeBGM(){X.q.instance.prodigy.audio.resumeBGM()}destroy(){this._lastPlayedMap.clear(),this._timesPlayedMap.clear(),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_xpPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_memberXpPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_xpParticleTrail",void 0),(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_levelUpPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_chargedLevelUpPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_chargedLevelUnlocked",void 0),(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_levelUpCelebrationFanfare",void 0),(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_spellLearnedPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_statGainedPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(J.J),(0,Y.Sn)("design:type",J.J)],tt.prototype,"_barFillPlayer",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("PostBattleFlowAudioController",Z.Y.postBattleFlow)],tt);z(59754),z(68788),z(81914),z(54234);var et=z(95057);let it=class extends Q.uAl{create(){super.create(),this.pbfSegment=X.q.instance.prodigy.gameContainer.get("20f-5f67").postBattleFlow}sendButtonEvent(q,K){this.pbfSegment.sendButtonEvent(q,K)}sendChestOpenEvent(q){this.pbfSegment.sendChestOpenEvent(q)}sendChestFailedToOpenEvent(q,K){this.pbfSegment.sendChestFailedToOpenEvent(q,K)}sendStarJarFunnelStartEvent(){X.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:"NonMember-Star-Jar",category:"Star-Jar",contentId:this.pbfSegment.getBattleId(),adType:et.R.PostBattleBanner})}};it=(0,Y.Cg)([(0,Q.EVk)("PostBattleFlowSegment",Q.YH6.ui)],it);var st=z(87490),nt=z(99625),at=z(50788),rt=z(49754),ot=z(17446),ht=z(66582),ct=z(77938),dt=z(7351),lt=z(73797),ut=z(53661),ft=z(8770),bt=z(22023),pt=z(80060),vt=z(44094),gt=z(30226),mt=z(91462),yt=z(76277),_t=z(10670),Et=z(71041),wt=z(53671),Tt=z(50084),St=z(86283),At=z(43754),Ct=z(99979);let Ot=class extends Q.uAl{get isRescued(){return this._isRescued}setup(q,K,z,Y){this._petRescueUnitData=q,this._isRescued=q.battleStatus===st.EUnitBattleStatus.Rescued;const Q=this._petRescueUnitData.cost;this._isFreeToRescue=void 0===Q||0===Q.value,this.setupPetInfo(),this._onPetRescued=z,this._rescuePetQueue=Y,this.updateUI(),this.updateButtons(K),pt.d.updateInjectedValues(this.GameObject,{[ut.uo.PetRescued]:this._isRescued,[ut.uo.EnableRescueButtonInput]:!this._isRescued})}setupPetInfo(){var q;const K=ct.t.getItem("pet",this._petRescueUnitData.asset.id),z=Ct.gI.getElementIconTexture(K.data.element);this._elementIcon.setTexture(z),this._petName.text=K.data.name;const Y=null!==(q=K.data.rarity)&&void 0!==q?q:ot.E.Common;this._petRarity.text=gt.J.convertRarityToText(Y),this._petRarity.stroke=ft.wB[Y],this._newPetText.active=!St.D.hasBeenRescuedPreviously(this._activePlayer,this._petRescueUnitData.asset.id),pt.d.updateInjectedValues(this.GameObject,{PET_ID:K.ID})}updateUI(){const q=this._petRescueUnitData.cost;if(this._petRescuedFrontAnimation.active=this._isRescued,this._petRescuedBackAnimation.active=this._isRescued,this._rescuedAura.active=this._isRescued,this._magicoinRescueButton.amount=q?q.value:0,(0,yt.G)(at.J)){this._mergeBarContainer.active=!0;const q=this._activePlayer.kennel.getPrimaryPetById(this._petRescueUnitData.asset.id);Q.Aq$.isDefined(q)?this._mergeBar.setup(q,!0):this._mergeBar.setup({ID:this._petRescueUnitData.asset.id,level:this._petRescueUnitData.level},!0)}}updateButtons(q){pt.d.updateInjectedValues(this.GameObject,{[ut.uo.ShowFreeRescueButton]:this._isFreeToRescue,[ut.uo.ShowMagicoinButton]:!this._isFreeToRescue&&!q,[ut.uo.ShowMembershipButton]:!this._isFreeToRescue&&q})}rescueWithMagicoin(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this.performMagicoinRescue();this._rescuePetQueue&&(yield this._rescuePetQueue(q))}))}performMagicoinRescue(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._petRescueUnitData.cost;!q||this._hardCurrencyDataProvider.canAfford(q)?yield this.rescuePet(!1):this._activePlayer.canPurchaseMembershipInGame()?this.showInsufficientResourcePopup():X.q.instance.prodigy.open.messageBoxPrefab({text:"YOU_DONT_HAVE_ENOUGH_MAGICOIN",confirmCallback:()=>{this.setRescueButtonEnabled(!0)}})}))}rescuePet(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;const Y=ct.t.getItem("pet",this._petRescueUnitData.asset.id),Z=vt.$.generateUID(),J=this._activePlayer.kennel.amountOfPet(Y.ID),tt=(0,yt.G)(rt.H),et={currency:27,value:tt.magicoinCost};yield Tt.a.rescuePet(q,{id:this._petRescueUnitData.asset.id,name:Y.data.name,nickname:Y.data.nickname,level:this._petRescueUnitData.level},Z,tt.enabled&&tt.magicoinCost>0?et:void 0).catch((q=>{Q.VyI.log("Failed to rescue pet",Q.$bb.Error,q),this.sendPetCapturedFailedSegmentEvent("Rescue API Failed")})),X.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendBattlePetCapturedEvent({petName:null!==(K=this._petRescueUnitData.nickname)&&void 0!==K?K:Y.data.name,petLevel:this._petRescueUnitData.level,petElement:Y.data.element,petType:bt.P8.getPetEvolutionType(Y.ID),petRarity:Y.data.rarity,petRank:null!==(z=this._petRescueUnitData.mergeRank)&&void 0!==z?z:0,previousPetCopies:J,captureSource:_t.z2.PostBattle},{transaction_id:Z}),this.updatePetRescuedUI()}))}updatePetRescuedUI(){this._isRescued=!0,this._onPetRescued(),pt.d.updateInjectedValues(this.GameObject,{[ut.uo.PetRescued]:!0})}openMembershipPage(){const q=this.gameObject.findComponentInParent(mt.M);if(q){X.q.instance.prodigy.game.broadcaster.addAppListener(lt.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this),X.q.instance.prodigy.game.broadcaster.addAppListener(lt.H3.MembershipResponseReceived,this.handleMembershipChange,this),q.onComplete.addOnce((()=>this.setRescueButtonEnabled(!0)));this._activePlayer.getMemberTier()===ht._$.NonMember?q.initiateMembershipPurchase():q.initiateMembershipPurchaseUpgradeWithIFrame().catch(Q.RQr.createHandler("Failed to initiate membership upgrade purchase"))}else Q.VyI.log("ProcessWebPurchaseComponent not found in parent hierarchy",Q.$bb.Error)}showInsufficientResourcePopup(){var q,K,z,Y;const Q=ct.t.getItem("pet",this._petRescueUnitData.asset.id);X.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:"Pet-Hard-Currency-Insufficient-Resources-Rescue",category:"Pet",contentId:`pet-${this._petRescueUnitData.asset.id}`,adType:et.R.Static});const Z=this._baseLocalizer.getText("MAGICOIN");X.q.instance.prodigy.open.prefabMenu(nt.l.EvolvedPet_InsufficientResources,void 0,void 0,void 0,void 0,{PET_RESCUE_ID:null==Q?void 0:Q.ID,PET_RESCUE_NAME:null===(q=null==Q?void 0:Q.data)||void 0===q?void 0:q.name,PET_RESCUE_RARITY:null===(K=null==Q?void 0:Q.data)||void 0===K?void 0:K.rarity,PET_RESCUE_LEVEL:null!==(Y=null===(z=this._petRescueUnitData.level)||void 0===z?void 0:z.toString())&&void 0!==Y?Y:"Pet Name",[ut.n7.InsufficientResource]:Z}).onDestroy.addOnce((()=>{this.sendPetCapturedFailedSegmentEvent(`Insufficient ${Z}`),this.setRescueButtonEnabled(!0)}))}sendPetCapturedFailedSegmentEvent(q){var K,z;const Y=null===(K=ct.t.getItem("pet",this._petRescueUnitData.asset.id))||void 0===K?void 0:K.data,Q=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel;X.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendBattlePetCaptureFailedEvent({petName:null==Y?void 0:Y.name,petLevel:this._petRescueUnitData.level,petElement:null==Y?void 0:Y.element,petType:bt.P8.getPetEvolutionType(this._petRescueUnitData.asset.id),petRarity:null==Y?void 0:Y.rarity,petRank:null!==(z=this._petRescueUnitData.mergeRank)&&void 0!==z?z:0,failReason:q,previousPetCopies:Q.amountOfPet(Y.ID),captureSource:_t.z2.PostBattle})}handleMembershipChange(q){const K="success"===q;X.q.instance.prodigy.game.broadcaster.removeAppListener(lt.H3.MembershipResponseReceived,this),K||X.q.instance.prodigy.game.broadcaster.removeAppListener(lt.H3.MembershipRewardsFlowComplete,this)}handleMembershipRewardsFlowComplete(){return(0,Y.sH)(this,void 0,void 0,(function*(){X.q.instance.prodigy.game.broadcaster.removeAppListener(lt.H3.MembershipRewardsFlowComplete,this),yield this.rescuePet(!0),this.setRescueButtonEnabled(!1)}))}setRescueButtonEnabled(q){pt.d.updateInjectedValues(this.gameObject,{[ut.uo.EnableRescueButtonInput]:q})}destroy(){X.q.instance.prodigy.game.broadcaster.removeAppListener(lt.H3.MembershipRewardsFlowComplete,this),X.q.instance.prodigy.game.broadcaster.removeAppListener(lt.H3.MembershipResponseReceived,this)}};(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],Ot.prototype,"_baseLocalizer",void 0),(0,Y.Cg)([(0,Q.Cdj)("782-c308"),(0,Y.Sn)("design:type",dt.W)],Ot.prototype,"_activePlayer",void 0),(0,Y.Cg)([(0,Q.Cdj)("bec-c6b4"),(0,Y.Sn)("design:type",At.W)],Ot.prototype,"_hardCurrencyDataProvider",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],Ot.prototype,"_elementIcon",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],Ot.prototype,"_petName",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ot.prototype,"_mergeBarContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(wt.J),(0,Y.Sn)("design:type",wt.J)],Ot.prototype,"_mergeBar",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],Ot.prototype,"_petRarity",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ot.prototype,"_newPetText",void 0),(0,Y.Cg)([(0,Q.MnK)(Et.Eo),(0,Y.Sn)("design:type",Et.Eo)],Ot.prototype,"_magicoinRescueButton",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ot.prototype,"_rescuedAura",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ot.prototype,"_petRescuedFrontAnimation",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ot.prototype,"_petRescuedBackAnimation",void 0),Ot=(0,Y.Cg)([(0,Q.EVk)("RescuablePet",Z.Y.postBattleFlow)],Ot);z(50475);var It=z(36648),Dt=z(34829);let Rt=class extends Q.uAl{constructor(){super(...arguments),this._source=It.q.Xp_stardust,this._autoRun=!1,this.onStartParticles=new Q.HN0,this.onStopParticles=new Q.HN0}create(){super.create(),this._autoRun&&this.run()}run(q=!1){if(q){const q=X.q.instance.prodigy.game.time.events.loop(Dt.s.TARGET_FPS_40_MS,this.gameObject.update,this.gameObject);this.gameObject.onDestroy.addOnce((()=>X.q.instance.prodigy.game.time.events.remove(q)))}const K=new Q.Qgu,z=new Q.mYY;z.point1.setTo(this._linePoint1.x,this._linePoint1.y),z.point2.setTo(this._linePoint2.x,this._linePoint2.y);const Y=new Q.ZxM;Y.life.setMinMax(this._lifespan.x,this._lifespan.y),Y.life.type=Q.UvC.Random;const Z=new Q.U8B;this.particleTargetDirection?Z.angle.setMinMax(this.getAngle()*Q.cj9.RAD_TO_DEG,this.getAngle()*Q.cj9.RAD_TO_DEG):Z.angle.setMinMax(this._angle.x*Q.cj9.RAD_TO_DEG,this._angle.y*Q.cj9.RAD_TO_DEG),Z.angle.type=Q.UvC.PhasePerSample,Z.speed.setMinMax(this._speed.x,this._speed.y);const J=new Q.hQR;J.scale.setMinMax(this._scale.x,this._scale.y);const tt=new Q.m$y;tt.endAlpha=this._alpha.x,tt.startAtLifePercentage=this._alpha.y,X.q.instance.prodigy.load.assets([It.q.Xp_stardust],(()=>{K.imageGuid=this._source,this._frame&&(K.frame=this._frame),this._particleSystem=this.gameObject.addComponent(Q.okU),this._particleSystem.emitPerSecond.setMinMax(this._particlePerSecond,this._particlePerSecond),this._particleSystem.initializers=[K,z,Y,Z,J],this._particleSystem.behaviours=[tt],this.onStartParticles.dispatch()}))}stopParticles(){var q,K;this._particleSystem&&(null===(K=null===(q=this._particleSystem)||void 0===q?void 0:q.emitPerSecond)||void 0===K||K.setMinMax(0,0),this.onStopParticles.dispatch())}getAngle(){const q=new Q.I9Y(this.particleTargetDirection.transform.worldPosition.x,this.particleTargetDirection.transform.worldPosition.y);q.subtract(this.gameObject.transform.worldPosition),q.normalize();let K=Math.acos(q.y);return q.x<0&&(K*=-1),K}destroy(){var q;this.stopParticles(),null===(q=this._particleSystem)||void 0===q||q.destroy(),this._particleSystem=null,this.onStartParticles.dispose(),this.onStopParticles.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Rt.prototype,"particleTargetDirection",void 0),(0,Y.Cg)([(0,Q.Bak)(),(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Rt.prototype,"_source",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Rt.prototype,"_frame",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Rt.prototype,"_particlePerSecond",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],Rt.prototype,"_lifespan",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],Rt.prototype,"_speed",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],Rt.prototype,"_angle",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],Rt.prototype,"_linePoint1",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],Rt.prototype,"_linePoint2",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],Rt.prototype,"_scale",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],Rt.prototype,"_alpha",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Rt.prototype,"_autoRun",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Rt.prototype,"onStartParticles",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Rt.prototype,"onStopParticles",void 0),Rt=(0,Y.Cg)([(0,Q.EVk)("XpParticleTrail",Z.Y.postBattleFlow)],Rt)},85773:(q,K,z)=>{"use strict";z.d(K,{b:()=>rt});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(82351),J=(z(34829),z(35757)),tt=z(57502),et=z(13956),it=z(22023),st=z(30226);const nt=JSON.parse('{"nootBattleTips":[{"dialogueId":1827,"showCriteria":"mergeAvailable"},{"dialogueId":1828,"showCriteria":"evolutionAvailable"},{"dialogueId":1829,"showCriteria":"elementalTypeWeakness"},{"dialogueId":1830},{"dialogueId":1831},{"dialogueId":1832},{"dialogueId":1833},{"dialogueId":1834},{"dialogueId":1835,"showCriteria":"schoolOnly"}]}');var at;let rt=at=class extends X.uAl{constructor(){super(...arguments),this._teamPets=[]}setup(q,K){this._teamPets=q,this._nootTipBattleInfo=K;const z=this.filterTips(this.processNootBattleTips()),Y=Math.floor(Math.random()*z.length);this.assignTip(z[Y])}processNootBattleTips(){return nt.nootBattleTips.map((q=>({dialogueId:q.dialogueId,showCriteria:q.showCriteria})))}filterTips(q){return q.filter((q=>"mergeAvailable"===q.showCriteria?this._teamPets.some((q=>it.P8.canPetMerge(q.data))):"evolutionAvailable"===q.showCriteria?this._teamPets.some((q=>it.P8.canPetEvolve(q,q.getLevel()))):"schoolOnly"===q.showCriteria?st.J.isDateWithinSchoolDayAndHours():"elementalTypeWeakness"!==q.showCriteria||X.Aq$.isDefined(this._nootTipBattleInfo.enemyElementWeakness)))}assignTip(q){const K=(new J.u).get(q.dialogueId);"elementalTypeWeakness"===q.showCriteria?(this._textComponent.text=this._localizer.getText(K.textKey,this._nootTipBattleInfo.enemyElementWeakness),this._dialogueAudio={tag:at.NOOT_VO_ELEMENTAL_WEAKNESS[this._nootTipBattleInfo.enemyElementWeakness]}):(this._textComponent.text=this._localizer.getText(K.textKey),this._dialogueAudio=K.audio)}playTipAudio(){this._playDialogueAudioComponent.playAudioData(this._dialogueAudio)}};rt.NOOT_VO_ELEMENTAL_WEAKNESS={[Q.EElementType.Plant]:Z.B.Voice_PostBattle_LossFlow_Noot_03_plant,[Q.EElementType.Fire]:Z.B.Voice_PostBattle_LossFlow_Noot_04_fire,[Q.EElementType.Water]:Z.B.Voice_PostBattle_LossFlow_Noot_05_water,[Q.EElementType.Storm]:Z.B.Voice_PostBattle_LossFlow_Noot_06_storm,[Q.EElementType.Astral]:Z.B.Voice_PostBattle_LossFlow_Noot_07_astral,[Q.EElementType.Shadow]:Z.B.Voice_PostBattle_LossFlow_Noot_08_shadow},(0,Y.Cg)([(0,et.b)(X.$Bt.LocalizationService),(0,Y.Sn)("design:type",X.dTp)],rt.prototype,"_localizer",void 0),(0,Y.Cg)([(0,X.MnK)(X.EYj),(0,Y.Sn)("design:type",X.EYj)],rt.prototype,"_textComponent",void 0),(0,Y.Cg)([(0,X.MnK)(tt.W),(0,Y.Sn)("design:type",tt.W)],rt.prototype,"_playDialogueAudioComponent",void 0),rt=at=(0,Y.Cg)([(0,X.EVk)("NootBattleTip")],rt)},56718:(q,K,z)=>{"use strict";z.d(K,{S:()=>et});var Y=z(62459),Q=z(77601),X=z(28628);const Z=(0,Q.gb)({key:"fab-post-loss-flow",activateAssociatedExperiments:0,default:!1}),J=[X.gu.Basic,X.gu.FireflyQ2Miniboss,X.gu.FireflyQ3Miniboss,X.gu.FireflyQ8TriptropTrio,X.gu.FireflyQ12Gerald,X.gu.SkywatchCloudMiniboss,X.gu.SkywatchCloudBoss,X.gu.SkywatchQ11Bitbots,X.gu.SkywatchQ6Swarm,X.gu.ShiverchillQ6Ghosts,X.gu.ShiverchillQ7IceWyrm,X.gu.ShiverchillQ13IceWyrm,X.gu.BonfireQ12Guardian,X.gu.BonfireQ13Cebollini,X.gu.ShipwreckQ11OldOne,X.gu.EndgamePippet,X.gu.EndGameGuardianFirefly,X.gu.EndGameGuardianShiverchill,X.gu.EndGameGuardianSkywatch,X.gu.EndGameGuardianBonfire,X.gu.EndGameGuardianShipwreck,X.gu.EndGamePuppetMaster];var tt=z(76277);class et{static isPostLossFlowAvailable(q){return(0,tt.G)(Z)&&J.includes(q)}static combineRewards(q){const K=[];return q.forEach((q=>{const z=K.findIndex((K=>Y.Aq$.isDefined(null==q?void 0:q.N)&&K.type===q.type&&("gold"===q.type||K.ID===q.ID)));z>=0?K[z].N+=q.N:K.push(q)})),K}}},20117:(q,K,z)=>{"use strict";z.d(K,{tN:()=>Y,w5:()=>J});var Y,Q,X=z(22023),Z=z(77938);!function(q){q.PetInSlot="PET_IN_SLOT",q.ShowCta="SHOW_CTA",q.PetID="PET_ID",q.PetGear="PET_GEAR",q.CtaTipArgs="CTA_TIP_ARGS",q.CloseCTA="CLOSE_CTA",q.CloseAllCTAs="CLOSE_ALL_CTA",q.OnCtasCompleted="ON_CTAS_COMPLETED"}(Y||(Y={})),function(q){q.ButtonCallback="BUTTON_CALLBACK",q.ButtonText="BUTTON_TEXT",q.CurrentEvolution="CURRENT_PET_ASSET_ID",q.NextEvolution="NEXT_PET_ASSET_ID",q.CurrentLevelText="CURRENT_LEVEL",q.NextLevelText="NEXT_LEVEL",q.CurrentMergeRank="CURRENT_MERGE_RANK",q.NextMergeRank="NEXT_MERGE_RANK"}(Q||(Q={}));class J{static getMergeCtaArgs(q,K){const z=q.pet.data.mergeRank;return{type:0,buttonCallback:K.openMergeModal.bind(K,q),currentMergeRank:z,nextMergeRank:z+1}}static getEvolutionCtaArgs(q,K){const{pet:z}=q,Y=Z.t.getItem("pet",z.data.ID),Q=X.P8.findNextEvolution(Y);return{type:2,buttonCallback:K.openEvolutionMenu.bind(K,q),currentEvoID:Y.ID,nextEvoID:Q.ID}}static GetInjectionValuesForCtaTipContent(q){switch(q.type){case 0:return J.GetMergeCtaTipInjectionValues(q);case 2:return J.GetEvolveCtaTipInjectionValues(q);case 1:return J.GetLevelUpCtaTipInjectionValues(q);default:return{}}}static GetCtaTipButtonInjectionValues(q){return Object.assign(Object.assign({},q.buttonText&&{[Q.ButtonText]:q.buttonText}),q.buttonCallback&&{[Q.ButtonCallback]:q.buttonCallback})}static GetEvolveCtaTipInjectionValues(q){return Object.assign(Object.assign({},J.GetCtaTipButtonInjectionValues(q)),{[Q.CurrentEvolution]:q.currentEvoID,[Q.NextEvolution]:q.nextEvoID})}static GetMergeCtaTipInjectionValues(q){return Object.assign(Object.assign({},J.GetCtaTipButtonInjectionValues(q)),{[Q.CurrentMergeRank]:q.currentMergeRank,[Q.NextMergeRank]:q.nextMergeRank})}static GetLevelUpCtaTipInjectionValues(q){return Object.assign(Object.assign({},J.GetCtaTipButtonInjectionValues(q)),{[Q.CurrentLevelText]:q.currentLevel,[Q.NextLevelText]:q.nextLevel})}}},96217:(q,K,z)=>{"use strict";z.d(K,{Q:()=>lt});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(1195),tt=z(63834),et=z(73797),it=z(41674),st=z(13956),nt=z(94236),at=z(53661),rt=z(22023),ot=z(80060),ht=z(11848),ct=z(85773),dt=z(20117);!function(q){q.TryAgainCallback="TRY_AGAIN_CALLBACK",q.ContinueCallback="CONTINUE_CALLBACK",q.NootTipText="NOOT_TIP_TEXT",q.NootTipExtended="NOOT_TIP_EXTENDED"}(Y||(Y={}));let lt=class extends X.uAl{constructor(){super(...arguments),this._teamSlotContainers=[],this._teamSlotPetCta=[],this._teamPets=[],this._canAccessMergeFeature=rt.P8.canPlayerAccessPetMergeFeature()&&ht.N.hasSeenPetMergeFTUE(),this._getCtaFunctions=new Map([[0,[q=>this._canAccessMergeFeature&&rt.P8.canPetAccessMergeRanks(q.data.ID)&&rt.P8.canPetMerge(q.data),q=>dt.w5.getMergeCtaArgs(q,this)]],[2,[q=>!!q&&rt.P8.canPetEvolve(q,q.getLevel()),q=>dt.w5.getEvolutionCtaArgs(q,this)]]])}postCreate(){super.postCreate(),Z.q.instance.prodigy.game.broadcaster.addAppListener(et.ig.EvolveEnd,this.onPetEvolved,this)}setUpScreen(q){this._playerContainer.active=!0,this._hasOpenCTAs=!1,this._teamSlotContainers.forEach(((q,K)=>{this._teamSlotPetCta.push({index:K,container:q})})),this._teamPets=q.teamUids?q.teamUids.map((q=>new tt.r(Z.q.instance.prodigy.game,this._loggedInPlayer.player.kennel.getPetByUniqueID(q)))):this._loggedInPlayer.player.kennel.getPetTeam(!1),this._nootTipBattleInfo=q.nootTipBattleInfo,this._nootBattleTipComponent.setup(this._teamPets,this._nootTipBattleInfo),this.updateTeamSlots(this._teamPets);const K=Object.assign(Object.assign(Object.assign({},this.getNootTipInjections(!this._hasOpenCTAs)),{[Y.ContinueCallback]:q.continueCallback.bind(this)}),q.tryAgainCallback&&{[Y.TryAgainCallback]:q.tryAgainCallback.bind(this)});ot.d.updateInjectedValues(this.gameObject,K),this._nootBattleTipComponent.playTipAudio()}updateTeamSlots(q){this._teamSlotPetCta.forEach(((K,z)=>{const Y=q[z];Y&&(K.pet=Y,this.updateTeamSlot(K))}))}updateTeamSlot(q){var K,z;const{pet:Y,container:Q}=q;if(!Y)return;const X={contentArgs:[]};let Z={[dt.tN.PetInSlot]:rt.P8.isPetOnTeam(Y.data),[dt.tN.PetID]:Y.data.ID,[dt.tN.PetGear]:Y.data.gear,[dt.tN.OnCtasCompleted]:this.onAllCTAsComplete.bind(this),[at.hi.SpinePetEvolveIdle]:rt.P8.canPetEvolve(Y,Y.getLevel())},J=!1;for(const[tt,et]of this._getCtaFunctions){et[0](Y)&&(J=!0,null!==(K=X.startingType)&&void 0!==K||(X.startingType=tt),null===(z=X.contentArgs)||void 0===z||z.push(et[1](q)))}this._hasOpenCTAs||(this._hasOpenCTAs=J),Z=Object.assign(Object.assign(Object.assign({},Z),{[dt.tN.ShowCta]:J}),J&&{[dt.tN.CtaTipArgs]:X}),ot.d.updateInjectedValues(Q,Z)}getNootTipInjections(q){return{[Y.NootTipExtended]:q}}updateOrCloseCtaOfType(q,K,z){const[Y,Q]=this._getCtaFunctions.get(q),{pet:X,container:Z}=K,J=Y(X);let tt=Object.assign({},z);if(J){const q={contentArgs:[Q(K)]};tt=Object.assign(Object.assign({},tt),{[dt.tN.CtaTipArgs]:q}),this._hasOpenCTAs=!0}else tt=Object.assign(Object.assign({},tt),{[dt.tN.CloseCTA]:!1});ot.d.updateInjectedValues(Z,tt)}openMergeModal(q){Z.q.instance.prodigy.open.petMergeMenu(q.pet.data,it.k.PostBattleLose).onPetMergeSuccess.addOnce((()=>this.onPetMerged(q)))}validateTeam(){const q=this._loggedInPlayer.player.kennel.getPetTeam(!1);this._teamSlotPetCta.forEach((K=>{const z=q.find((q=>{var z;return q.data.uniqueID===(null===(z=K.pet)||void 0===z?void 0:z.data.uniqueID)}));z?K.pet=z:(K.pet=void 0,ot.d.updateInjectedValues(K.container,{[dt.tN.CloseAllCTAs]:!1,[dt.tN.PetInSlot]:!1}))})),this._teamPets=q}onPetMerged(q){this.validateTeam(),this.updateOrCloseCtaOfType(0,q)}openEvolutionMenu(q){nt.K.openEvolutionPromptIfEligible(q.pet,null,!1,it.k.PostBattleLose).catch(X.RQr.createHandler("Failed to open evolution prompt"))}onPetEvolved(q){const K=this._teamSlotPetCta.find((K=>{var z;return(null===(z=K.pet)||void 0===z?void 0:z.data.uniqueID)===q}));K&&(this.validateTeam(),this.updateOrCloseCtaOfType(2,K),this._teamSlotPetCta.forEach((q=>{q.pet&&this.updateTeamSlot(q)})),ot.d.updateInjectedValues(this.gameObject,this.getNootTipInjections(!this._hasOpenCTAs)))}onAllCTAsComplete(){this._hasOpenCTAs?this._hasOpenCTAs=!1:ot.d.updateInjectedValues(this.gameObject,this.getNootTipInjections(!0))}destroy(){Z.q.instance.prodigy.game.broadcaster.removeAppListener(et.ig.EvolveEnd,this),this._teamSlotContainers=[],this._teamSlotPetCta=[],super.destroy()}};(0,Q.Cg)([(0,st.b)("ad2-c5b2"),(0,Q.Sn)("design:type",J.E)],lt.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],lt.prototype,"_teamSlotContainers",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_playerContainer",void 0),(0,Q.Cg)([(0,X.MnK)(ct.b),(0,Q.Sn)("design:type",ct.b)],lt.prototype,"_nootBattleTipComponent",void 0),lt=(0,Q.Cg)([(0,X.EVk)("PostLossFlowUpgradeScreen")],lt)},79368:(q,K,z)=>{"use strict";z.d(K,{k:()=>jt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z.n(Z),tt=z(70472),et=z(6670),it=z(58776),st=z(62886),nt=z(29891),at=z(35120),rt=z(88355);class ot extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K;setTimeout((()=>at.q.instance.game.broadcaster.broadcast(`Prodigy.Events.${q.category}.${q.event}`)),null!==(K=q.timeout)&&void 0!==K?K:0)}))}}var ht=z(52191);class ct extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.game.input.enabled=q.enabled}))}}var dt=z(96165);class lt extends dt.I{doTask(q){const K=Object.create(null,{doTask:{get:()=>super.doTask}});return(0,Y.sH)(this,void 0,void 0,(function*(){const z=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=q.itemDrops.reduce(((q,K)=>{var Y,X;if(!J().isNumber(K.ID)||!J().isString(K.type))return Q.VyI.log("EnsureHasItemTaskHandler: Invalid item drop data",Q.$bb.Warning),q;let Z=null!==(Y=K.N)&&void 0!==Y?Y:1;"key"===K.type&&Z>1&&(Z=1);const tt=Z-(null!==(X=z.getItemCount(K.type,K.ID))&&void 0!==X?X:0);return tt>0&&q.push(Object.assign(Object.assign({},K),{N:tt})),q}),[]);if(0===Y.length)return;const X=Object.assign(Object.assign({},q),{itemDrops:Y});yield K.doTask.call(this,X)}))}}var ut=z(97806),ft=z(52269),bt=z(99625),pt=z(80060);class vt extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){q.leaveNetworkZone&&at.q.instance.prodigy.gameContainer.get("774-4659").leaveZone(),yield pt.d.loadWithInjectedValuesAndDependenciesFromGUID(at.q.instance.prodigy.gameContainer.get("983-05a7"),q.guid,q.injectedValues).catch(Q.RQr.createHandler(`[LoadPrefabCompleteHandler] Could not load prefab: ${bt.l[q.guid]}`))}))}}var gt=z(1195),mt=z(73797),yt=z(13956),_t=z(34616),Et=z(82271);class wt extends dt.I{doTask(q){const K=Object.create(null,{doTask:{get:()=>super.doTask}});return(0,Y.sH)(this,void 0,void 0,(function*(){if(this._loggedInPlayer.isMember())return K.doTask.call(this,q);const z=at.q.instance.prodigy.game;(yield this._memberJarNetworkHandler.getMemberJarData()).savedBattleCount>=_t.N.maximumSavedBattleCount?z.broadcaster.broadcast(mt.oI.ItemsLost,z,q.itemDrops):z.broadcaster.broadcast(mt.oI.ItemsSaved,z,q.itemDrops)}))}}(0,Y.Cg)([(0,yt.b)("ad2-c5b2"),(0,Y.Sn)("design:type",gt.E)],wt.prototype,"_loggedInPlayer",void 0),(0,Y.Cg)([(0,yt.b)("7fa-e13f"),(0,Y.Sn)("design:type",Et.S)],wt.prototype,"_memberJarNetworkHandler",void 0);class Tt extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise((K=>{var z,Y,X,Z;const J=at.q.instance.prodigy.gameContainer.get("e81-40c8"),tt=at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),et=tt.getText(null!==(z=q.yesButtonLocalizationKey)&&void 0!==z?z:"BUTTON_OKAY_CAPITAL"),it=tt.getText(null!==(Y=q.noButtonLocalizationKey)&&void 0!==Y?Y:"NOT_NOW_CAPITAL"),st=at.q.instance.prodigy.world;J.addEvents([{dialogueData:J.dataProvider.get(q.dialogueID),blockInput:!0,yes:st.it.bind(st,q.targetMapTag,null===(X=q.position)||void 0===X?void 0:X.x,null===(Z=q.position)||void 0===Z?void 0:Z.y),nextButtonText:it,yesButtonText:et,isCancelButtonVisible:!0}]),J.start(!0,K,q.reenableInputOnClose,q.clearExistingDialogue)}))}))}}var St=z(61468),At=z(43531);class Ct extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise((K=>{At.rD.runDialogueSequence(St.l.guaranteeArray(q.dialogueIDs),K,q.reenableInputOnClose,q.clearExistingDialogue)}))}))}}var Ot=z(65240),It=z(77938);class Dt extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=at.q.instance.prodigy.gameContainer.get("20f-5f67");for(const Y of q.itemDrops){if(!Y.ID){Q.VyI.log(`ItemDrop ID is undefined for type: ${Y.type}. Skipping removal.`,Q.$bb.Error);continue}K.backpack.consume(Y.type,Y.ID,Y.N);const X=It.t.getItem(Y.type,Y.ID);z.item.sendItemRemovedEvent(X.ID,X.name,X.type,Y.N,this.getCustomSegmentData(X,q.sourceType))}null==K||K.forceSaveCharacter()}))}getCustomSegmentData(q,K){const z={sink_type:Ot.C.RemoveUnsecureItem,sink_id:q.ID,source_type:K};if(K===Ot.C.FestivalCurrencyReset){const q=at.q.instance.prodigy.gameContainer.get("119-35f9"),K=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily;z.instance_type=q.getActiveFestivalName()||"unknown festival",z.instance_id=K.getFestivalInstanceName()}return z}}class Rt extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.gameContainer.get("20f-5f67").sendCustomEvent(q.segmentEventType,q.segmentEventData)}))}}var Pt=z(41674);class Mt extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=at.q.instance.prodigy.gameContainer.get("20f-5f67");if(q.funnelStepId){const z={funnelName:"player_goals",funnelType:"feature",stepName:q.stepName},Y={step_index:q.funnelStepId};K.playerProgression.sendFunnelAdvancedEvent(z,Y)}if(q.goalId){const z=q.goalName;K.economy.sendGoalAchievedEvent(z,q.goalId.toString(),Pt.yO.Ftue,Pt.ss.FtueGoals,!1)}}))}}class Nt extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield at.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(q.eventType,q.eventData)}))}}class xt extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.notifications.initGenericNotification(q.notificationType)}))}}var Lt=z(34454);class kt extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=new Q._mx;Lt.w.startTaskCompleteDialogue(K,q.petID,this._questID)}))}}class Bt extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=at.q.instance.prodigy.world;if(K.getCurrentMap()===q.targetMapTag&&!q.allowSameMapWarp)return;const z=new Promise((z=>{var Y,Q;K.it(q.targetMapTag,null===(Y=q.position)||void 0===Y?void 0:Y.x,null===(Q=q.position)||void 0===Q?void 0:Q.y,void 0,{shutdownLoadState:!1,callback:()=>{z()}})}));q.awaitLoad&&(yield z,q.loadTimeout&&(q.disablePopups&&at.q.instance.prodigy.notifications.pause(this),at.q.instance.prodigy.game.input.enabled=!1,yield new Promise((K=>setTimeout(K,q.loadTimeout))),at.q.instance.prodigy.game.input.enabled=!0,q.disablePopups&&at.q.instance.prodigy.notifications.resume(this)))}))}}class Ut extends rt.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K;yield at.q.instance.prodigy.gameContainer.get("668-8a41").queueStoreOfferTrigger(q.offerId,null!==(K=q.instantTrigger)&&void 0!==K&&K)}))}}const Ft={[nt.s.COMPLETE_TUTORIAL]:ht.G,[nt.s.GOT_ITEM]:dt.I,[nt.s.ENSURE_ITEM]:lt,[nt.s.GOT_PET]:ft.uu,[nt.s.MEMBER_JAR_GOT_ITEM]:wt,[nt.s.GIVE_ULTIMATE]:ut.N,[nt.s.LOAD_PREFAB]:vt,[nt.s.ENABLE_INPUT]:ct,[nt.s.OFFER_TELEPORT]:Tt,[nt.s.PLAY_DIALOGUE]:Ct,[nt.s.SHOW_COLLECTED_ITEM]:kt,[nt.s.SEND_PLAYER_GOALS_SEGMENT_EVENT]:Mt,[nt.s.SEND_CUSTOM_SEGMENT_EVENT]:Rt,[nt.s.SEND_TOASTER_NOTIFICATION]:xt,[nt.s.REMOVE_UNSECURE_ITEM]:Dt,[nt.s.TELEPORT_TO_MAP]:Bt,[nt.s.TRIGGER_STORE_OFFER]:Ut,[nt.s.SEND_QUEST_EVENT_VIA_HUB]:Nt,[nt.s.BROADCAST]:ot};var Gt=z(56567);let jt=class{constructor(){this.onQuestTaskStart=new Q.HN0,this.onQuestTaskComplete=new Q.HN0,this._getProgressDirty=!1,this._tags=[]}setup(){return(0,Y.sH)(this,void 0,void 0,(function*(){}))}getQuestData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const{active:K,inactive:z}=yield this.fetchQuestData();return K.has(q)||z.has(q)?K.get(q)||z.get(q):(Q.VyI.log(`Tried getting quest data for quest ${q} but it doesn't exist.`,Q.$bb.Warning),null)}))}forceEnableDataUpdate(){this._getDataPromise=null}fetchQuestData(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(Q.Aq$.isDefined(this._getDataPromise))return this._getDataPromise;const q={tags:this._tags};return this._getDataPromise=new Promise(((K,z)=>{this._questNetworkHandler.getQuestData(q).then((q=>{const z=new Map,Y=new Map;q.activeQuests.forEach((q=>{z.set(q.id,q)})),q.inactiveQuests.forEach((q=>{Y.set(q.id,q)})),K({active:z,inactive:Y})})).catch((q=>{this.forceEnableDataUpdate(),z(new Error(q))}))})),this._getDataPromise}))}getQuestProgress(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.getQuestData(q);if(!K)return Q.VyI.log(`No quest progress available for ${q} because the quest data doesn't exist.`,Q.$bb.Warning),null;const{active:z,inactive:Y}=yield this.fetchQuestProgress(),X=z.get(q)||Y.get(q);return(yield et.f.preprocessQuestProgress(K,X)).fullProgress}))}getRawQuestProgress(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const{active:K,inactive:z}=yield this.fetchQuestProgress();return K.get(q)||z.get(q)||null}))}preloadQuestProgress(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.fetchQuestProgress()}))}questProgressHasBeenLoaded(){return Q.Aq$.isDefined(this._getProgressPromise)}fetchQuestProgress(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._getProgressDirty&&Q.Aq$.isDefined(this._getProgressPromise))return this._getProgressPromise;const q=!Q.Aq$.isDefined(this._getProgressPromise),K={tags:this._tags};return this._getProgressPromise=new Promise(((z,Y)=>{this._questNetworkHandler.getQuestProgress(K).then((K=>{this._getProgressDirty=!1;const Y=new Map,X=new Map;K.activeQuests.forEach((q=>{Y.set(q.id,q)})),K.inactiveQuests.forEach((q=>{X.set(q.id,q)})),z({active:Y,inactive:X}),q&&this.sendQuestEvent(st.T.NONE,{}).catch(Q.RQr.createHandler(`Error sending NONE quest event. ${JSON.stringify(this._tags)}`))})).catch((q=>{this._getProgressDirty=!0,Y(new Error(q))}))})),this._getProgressPromise}))}processQuestProgressResponse(q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K={}){var z,Y,X,Z,J,tt,st,nt,at,rt,ot;const{active:ht,inactive:ct}=yield this.fetchQuestProgress();for(const dt of q.activeQuests){if((null===(z=ht.get(dt.id))||void 0===z?void 0:z.status)===it.t.COMPLETE)continue;const q=yield this.getQuestData(dt.id);if(!Q.Aq$.isDefined(q))continue;const ct=null!==(X=null===(Y=ht.get(dt.id))||void 0===Y?void 0:Y.tasks)&&void 0!==X?X:[],lt=new Set,ut=new Map,ft=[];ct.forEach((K=>{var z;if(K.status===it.t.COMPLETE){lt.add(K.id);const Y=q.tasks.find((q=>q.id===K.id));(null===(z=null==Y?void 0:Y.metadata)||void 0===z?void 0:z.isExperimentGate)&&ft.push(K.id)}ut.set(K.id,K)}));const bt={};if(dt.status!==it.t.COMPLETE&&dt.tasks)for(const K of dt.tasks)if(K.status!==it.t.COMPLETE&&(null===(Z=K.data)||void 0===Z?void 0:Z.timesCompleted)>0){const q=ut.get(K.id);(null!==(tt=null===(J=null==q?void 0:q.data)||void 0===J?void 0:J.timesCompleted)&&void 0!==tt?tt:0)<(null===(st=K.data)||void 0===st?void 0:st.timesCompleted)&&(bt[K.id]=(null===(nt=K.data)||void 0===nt?void 0:nt.timesCompleted)-(null!==(rt=null===(at=null==q?void 0:q.data)||void 0===at?void 0:at.timesCompleted)&&void 0!==rt?rt:0))}for(const z of q.tasks){if(!z)continue;if(lt.has(z.id))continue;const Y=z.id;let X=0,Z=[];if(bt[Y]?X=bt[Y]:dt.status===it.t.COMPLETE?X=1:(Z=et.f.getTasksOfStatus(dt.tasks,it.t.COMPLETE),Z.includes(Y)&&(X=1)),X>0){if(z.metadata&&(z.metadata.parentCompleted=dt.status===it.t.COMPLETE),!ct[z.id]||et.f.shouldProcessOnCompleteHandlers(ct[z.id]))for(let q=0;qet.f.isPrerequisiteValid(K,q,ft,z))).every((q=>Z.includes(q)))&&this.onQuestTaskStart.dispatch(z)}ht.set(dt.id,dt)}for(const Q of q.inactiveQuests)ct.set(Q.id,Q)}))}getQuestTasks(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.getQuestData(q);if(null===K)return[];const z=yield this.getQuestProgress(q),Y=[];if(null==z?void 0:z.tasks)for(const Q of K.tasks)for(const K of z.tasks)if(K.id===Q.id){Y.push(new tt.A(q,Q,K));break}return Y}))}getTasksInProgress(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){var Y;const Q=yield this.fetchQuestData();let X=[];const Z=null!=K?K:Array.from(Q.active.keys());for(const K of Z){const Z=null!==(Y=Q.active.get(K))&&void 0!==Y?Y:Q.inactive.get(K);if((null==q?void 0:q.length)>0&&!this.questDataHasTags(Z,q))continue;const J=yield this.getQuestProgress(K),tt=yield et.f.getTasksInProgress(Z,J,new Gt.f(null==z?void 0:z.params));X=X.concat(tt)}return X}))}isTaskInProgress(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.getTasksInProgress(void 0,[q])).some((q=>q.taskID===K))}))}isTaskCompleted(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){var Y,Q,X;const Z=yield this.getQuestProgress(q),J=null===(Y=null==Z?void 0:Z.tasks)||void 0===Y?void 0:Y.find((q=>q.id===K)),tt=(null==J?void 0:J.status)===it.t.COMPLETE,et=!!z&&(null!==(X=null===(Q=null==J?void 0:J.data)||void 0===Q?void 0:Q.timesCompleted)&&void 0!==X?X:0)>0;return tt||et}))}getQuestStatus(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K;const z=yield this.getQuestProgress(q);return null!==(K=null==z?void 0:z.status)&&void 0!==K?K:null}))}getOverallProgress(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.fetchQuestData(),K=[],z=Array.from(q.active.keys()).concat(Array.from(q.inactive.keys()));for(const Y of z)K.push(yield this.getQuestProgress(Y));return K}))}sendQuestEvent(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=this._segment.quests.beginQuestEventTransaction();try{if((yield this.shouldSendQuestEvents([q],K,z)).some((K=>K===q))){this._sendQuestEventPromise=this._questNetworkHandler.sendQuestEvent({eventType:q,eventData:K,questIDs:z,tags:this._tags});const Y=yield this._sendQuestEventPromise;return yield this.processQuestProgressResponse(Y),Y}return{activeQuests:[],inactiveQuests:[]}}finally{Y.flush({})}}))}preSendQuestEventViaHub(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){if((yield this.shouldSendQuestEvents([q],K)).some((K=>K===q))){const q=this.getCurrentQuestID();return{manager:this,questIDs:void 0!==q?[q]:yield this.getAllActiveQuestIDs(),tags:this._tags}}return{manager:this,questIDs:[],tags:[]}}))}postSendQuestEventViaHub(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){q&&(yield this.processQuestProgressResponse(q))}))}shouldSendQuestEvents(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=yield this.getTasksInProgress(void 0,void 0,K),Q=[];for(const X of q)Y.some((q=>!(Array.isArray(z)&&z.length>0&&!z.includes(q.questID))&&q.shouldSendEvent(X,K)))&&Q.push(X);return Q}))}getQuestMetaData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.getQuestData(q);return null==K?void 0:K.metadata}))}updateQuestProgress(q){return(0,Y.sH)(this,void 0,void 0,(function*(){try{const K=q?{questIDs:[q],tags:this._tags}:{tags:this._tags},z=yield this._questNetworkHandler.getQuestProgress(K);(z.activeQuests.length>0||z.inactiveQuests.length>0)&&(yield this.processQuestProgressResponse(z))}catch(K){throw this._getProgressDirty=!0,K}}))}getQuestIDsFromItem(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=yield this.getTasksInProgress(),Y=[];return z.forEach((z=>{z.taskDefinition.completionRequirements.type===st.T.COLLECT_ITEM&&z.taskDefinition.completionRequirements.data.id===q&&z.taskDefinition.completionRequirements.data.type===K&&Y.push(z.questID)})),Y}))}getAllActiveQuestIDs(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.fetchQuestData();return this.getQuestIDsFromQuestData(K.active,q)}))}getAllInactiveQuestIDs(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.fetchQuestData();return this.getQuestIDsFromQuestData(K.inactive,q)}))}setupValidTasks(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=new Q.bnh,Y=Q.wa5.getActiveScene().container.get(Q.$Zn.PopupHandler);null==Y||Y.delayPopupsUntil(z),yield this._sendQuestEventPromise;const X=yield this.getTasksInProgress(q,K),Z=[];X.forEach((q=>{q.onSetupTasks.filter((q=>Ft[q.type]&&(!q.featureRequirements||this._featureRequirements.meetsRequirementsDeprecated(q.featureRequirements)))).forEach((K=>{Z.push(new Ft[K.type](q.questID,q.taskID).doTask(K.data).catch(Q.RQr.createHandler(`Error performing onSetup task handler. ${K.type}`)))}))})),yield Promise.all(Z),z.resolve()}))}beginAllAvailableQuests(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=(yield this.getTasksInProgress(q)).filter((q=>0===q.taskDefinition.prerequisites.length&&q.taskProgress.status!==it.t.COMPLETE));for(const q of K)yield this.sendQuestEvent(q.type,Object.assign({},q.taskDefinition.completionRequirements.data),[q.questID])}))}questDataHasTags(q,K){return J().intersection(K,q.tags).length>0}getQuestIDsFromQuestData(q,K){return(null==K?void 0:K.length)>0?Array.from(q.values()).filter((q=>this.questDataHasTags(q,K))).map((q=>q.id)):Array.from(q.keys())}getCurrentQuestID(){}cleanup(){this.onQuestTaskStart.dispose(),this.onQuestTaskComplete.dispose()}reenter(){}getTags(){return this._tags}getQuestObjectStates(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.getQuestData(q);return null==K?void 0:K.states}))}isCutsceneTaskInProgress(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return yield this._sendQuestEventPromise,(yield this.getTasksInProgress(q,K)).some((q=>q.taskDefinition.isCutscene))}))}};(0,Y.Cg)([(0,X.inject)("c4c-0948"),(0,Y.Sn)("design:type",Object)],jt.prototype,"_questNetworkHandler",void 0),(0,Y.Cg)([(0,X.inject)("11f-118a"),(0,Y.Sn)("design:type",Object)],jt.prototype,"_featureRequirements",void 0),(0,Y.Cg)([(0,X.inject)("20f-5f67"),(0,Y.Sn)("design:type",Function)],jt.prototype,"_segment",void 0),jt=(0,Y.Cg)([(0,X.injectable)()],jt)},63536:(q,K,z)=>{"use strict";z.d(K,{$:()=>tt});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546),J=z(45918);let tt=class extends Z.D{getQuestData(){return(0,Y.sH)(this,arguments,void 0,(function*(q={}){return this.makeCloudscriptRequest(X.D.Quests.GetQuestData,q,!1)}))}getQuestProgress(){return(0,Y.sH)(this,arguments,void 0,(function*(q={}){return this.makeCloudscriptRequest(X.D.Quests.GetQuestProgress,q,!1)}))}setQuestProgressTimestamp(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Quests.SetQuestTaskProgressTimestamp,q,!1)}))}sendQuestEvent(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Quests.SendQuestEvent,q,!1)}))}debugSetFtueQuestComplete(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Debug.ForceCompleteFtueQuest,{questIds:[J.M.FTUE]},!1)}))}};tt=(0,Y.Cg)([(0,Q.injectable)()],tt)},52437:(q,K,z)=>{"use strict";z.d(K,{$:()=>nt});var Y=z(8674),Q=z(62459),X=z(65240),Z=z(35120),J=z(1195),tt=z(28152),et=z(85604),it=z(43531),st=z(23082);let nt=class extends Q.uAl{constructor(){super(...arguments),this._questNPCName=et.y.Flora,this._screen=null,this._dialogueController=null}create(){var q;super.create(),this._screen=Z.q.instance.game.state.get(st.G.TileScreen),null===(q=this._screen.events)||void 0===q||q.push(this)}process(q,K,z){this._dialogueController&&this._dialogueController.close();const Y=this._playerDataProvider.player,J=null!=q?q:Z.q.instance.prodigy.world.getZone(Z.q.instance.prodigy.world.getCurrentZone());if(!Y.isZoneQuestEnabled)return;if(this._dialogueController=new it.rD(Z.q.instance.game),!Q.Aq$.isDefined(J.getQuestState()))return J.startQuest(1).onQuestEventDialogue("onStart"),this.queueEventText(J,"onStart",1),this._dialogueController.addEvents([{callback:()=>{this._screen.process()}}]),void this._dialogueController.start();const tt=J.getQuestState().ID,et=J.getQuest(tt);if(J.isQuestComplete(tt)&&!et.chain)this.queueEventText(J,"onComplete",tt),et.onQuestEventDialogue("onComplete"),this._dialogueController.addEvents([{callback:()=>{Y.saveEnabled=!1,et.end(),Q.Aq$.isDefined(et.reward)&&et.reward.length>0?(J.completeQuest(tt),Z.q.instance.prodigy.open.gotItem(et.reward,(()=>{Y.saveEnabled=!0,this._screen.process()}),null,"advanced-quest-event-reward",null,null,{source_type:X.C.QuestReward})):(J.completeQuest(tt),Y.saveEnabled=!0,this._screen.process())}}]),this._dialogueController.start();else if(!J.isQuestStarted(tt)&&Q.Aq$.isDefined(et))this.queueEventText(J,"onStart",tt),et.onQuestEventDialogue("onStart"),this._dialogueController.addEvents([{callback:()=>{J.startQuest(tt),this._screen.process()}}]),this._dialogueController.start();else if(z&&Q.Aq$.isDefined(et))this.queueEventText(J,"onStart",tt),et.onQuestEventDialogue("onStart"),this._dialogueController.start();else if(z){const q=Z.q.instance.prodigy.event.create();q.text(39,this._questNPCName),q.start()}}queueEventText(q,K,z){const Y=q.getQuest(z);if(Q.Aq$.isDefined(Y[K]))for(let Q=0;Q{"use strict";z.d(K,{G:()=>et});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(73678);const et={id:`quest-${Q.t.BonfireSpireHard}`,tags:[Q.t.LocalZoneQuests,Q.t.BonfireSpireHard],metadata:{zoneId:tt.A_.BONFIREHARD},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-introduction`}},metadata:{locations:[`${tt.A_.BONFIREHARD}-B1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-lever1-off`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[515,516]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${tt.A_.BONFIREHARD}-D1`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-lever2-off`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[517,518]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${tt.A_.BONFIREHARD}-C2`]}},{id:"3-0",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-lever3-off`}},localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${tt.A_.BONFIREHARD}-D4`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:X.T.NONE,data:{}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[519,520,521]}}}],localizationKey:"",metadata:{locations:[]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:88,target:1}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[522,523]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_RAISINS",metadata:{locations:[`${tt.A_.BONFIREHARD}-C3`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:X.T.BUTTON_CLICK,data:{id:`${tt.A_.BONFIRE}-ingredient-added`}},localizationKey:"QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",metadata:{locations:[`${tt.A_.BONFIREHARD}-E6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:X.T.NONE,data:{}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[524,525]}}}],localizationKey:"",metadata:{locations:[]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-Q6-attend-dinner`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[526,527,528,529,530]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",metadata:{locations:[`${tt.A_.BONFIREHARD}-D5`]}},{id:"7-0",prerequisites:["6-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:89,target:3}},localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_COOKING_TOOLS",metadata:{locations:[{location:`${tt.A_.BONFIREHARD}-D4`,disallowedStates:{"quest-state-2":1}},{location:`${tt.A_.BONFIREHARD}-C2`,disallowedStates:{"quest-state-1":1}},{location:`${tt.A_.BONFIREHARD}-D1`,disallowedStates:{"quest-state-0":1}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:X.T.NONE,data:{}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[531,532,533]}}}],localizationKey:"",metadata:{locations:[]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-Q8-guards`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[534,535]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",metadata:{locations:[`${tt.A_.BONFIREHARD}-C6`]}},{id:"9-0",prerequisites:["8-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:90,target:2}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:91,N:1}],additionalDialogueIds:{succeedingDialogue:[536,537]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",metadata:{locations:[`${tt.A_.BONFIREHARD}-A4`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-Q10-food-stolen`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[538,539,540,541,542,543]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_OFFER_DISH",metadata:{locations:[`${tt.A_.BONFIREHARD}-C6`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[92]}}],data:{}},localizationKey:"QUESTS_BONFIRE_SPIRE_FIND_KEY",metadata:{locations:[`${tt.A_.BONFIREHARD}-C4`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-Q11-received-strong-fire-relic`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:92,N:1}],additionalDialogueIds:{succeedingDialogue:[544,545,546]},isFake:!0}}],metadata:{locations:[`${tt.A_.BONFIREHARD}-C4`]}},{id:"12-0",prerequisites:["11-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.BonfireQ12Guardian}},localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${tt.A_.BONFIREHARD}-A4`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:X.T.OPEN_CHEST,data:{id:`${tt.A_.BONFIREHARD}-chestGuardian`}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[547,548,549]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${tt.A_.BONFIREHARD}-A4`]}},{id:"13-0",prerequisites:["12-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.BonfireQ13Cebollini}},localizationKey:"QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",metadata:{locations:[`${tt.A_.BONFIREHARD}-D6`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-Q13-post-battle`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[550,551]}}}],metadata:{locations:[`${tt.A_.BONFIREHARD}-D6`]}},{id:"14-0",prerequisites:["13-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.BONFIRE}-Q14-attend-dinner`}},localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN",metadata:{locations:[`${tt.A_.BONFIREHARD}-D5`]}},{id:"14-1",prerequisites:["14-0"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"slurpy"}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"key",ID:11}],additionalDialogueIds:{precedingDialogue:[554,555,556],succeedingDialogue:[557]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_SLURPY",metadata:{locations:[`${tt.A_.BONFIREHARD}-B1`]}}]}},63674:(q,K,z)=>{"use strict";z.d(K,{K:()=>it});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(24522),et=z(73678);const it={id:`quest-${Q.t.BonfireSpire}`,tags:[Q.t.LocalZoneQuests,Q.t.BonfireSpire],metadata:{zoneId:et.A_.BONFIRE},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.BONFIRE}-B1`}},preconditions:[{type:tt.n.IS_IN_ZONE,data:{zone:[et.A_.BONFIRE]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-introduction`}},onComplete:[{type:Z.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:X.T.BUTTON_CLICK,eventData:{id:`${et.A_.BONFIRE}-introduction`}}}],metadata:{locations:[`${et.A_.BONFIRE}-B1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-lever1-off`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[515,516]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${et.A_.BONFIRE}-D1`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-lever2-off`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[517,518]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${et.A_.BONFIRE}-C2`]}},{id:"3-0",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-lever3-off`}},localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${et.A_.BONFIRE}-D4`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:X.T.NONE,data:{}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"hat",ID:65}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[519,520,521]}}}],localizationKey:"",metadata:{locations:[]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:88,target:1}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[522,523]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_RAISINS",metadata:{locations:[`${et.A_.BONFIRE}-C3`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:X.T.BUTTON_CLICK,data:{id:`${et.A_.BONFIRE}-ingredient-added`}},localizationKey:"QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",metadata:{locations:[`${et.A_.BONFIRE}-E6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:X.T.NONE,data:{}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:1}],additionalDialogueIds:{precedingDialogue:[509,510],succeedingDialogue:[524,525]}}}],localizationKey:"",metadata:{locations:[]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-Q6-attend-dinner`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[526,527,528,529,530]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",metadata:{locations:[`${et.A_.BONFIRE}-D5`]}},{id:"7-0",prerequisites:["6-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:89,target:3}},localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_COOKING_TOOLS",metadata:{locations:[{location:`${et.A_.BONFIRE}-D4`,disallowedStates:{"quest-state-2":1}},{location:`${et.A_.BONFIRE}-C2`,disallowedStates:{"quest-state-1":1}},{location:`${et.A_.BONFIRE}-D1`,disallowedStates:{"quest-state-0":1}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:X.T.NONE,data:{}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"outfit",ID:56,N:1}],additionalDialogueIds:{succeedingDialogue:[531,532,533]}}}],localizationKey:"",metadata:{locations:[]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-Q8-guards`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[534,535]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",metadata:{locations:[`${et.A_.BONFIRE}-C6`]}},{id:"9-0",prerequisites:["8-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:90,target:2}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"item",ID:91,N:1}],additionalDialogueIds:{succeedingDialogue:[536,537]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",metadata:{locations:[`${et.A_.BONFIRE}-A4`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-Q10-food-stolen`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[538,539,540,541,542,543]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_OFFER_DISH",metadata:{locations:[`${et.A_.BONFIRE}-C6`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[92]}}],data:{}},localizationKey:"QUESTS_BONFIRE_SPIRE_FIND_KEY",metadata:{locations:[`${et.A_.BONFIRE}-C4`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-Q11-received-strong-fire-relic`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:2,N:1}],additionalDialogueIds:{precedingDialogue:[509,510]}}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:92,N:1}],additionalDialogueIds:{succeedingDialogue:[544,545,546]},isFake:!0}}],metadata:{locations:[`${et.A_.BONFIRE}-C4`]}},{id:"12-0",prerequisites:["11-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.BonfireQ12Guardian}},localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${et.A_.BONFIRE}-A4`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:X.T.OPEN_CHEST,data:{id:`${et.A_.BONFIRE}-chestGuardian`}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[547,548,549]}}},{type:Z.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:X.T.BUTTON_CLICK,eventData:{id:`${et.A_.BONFIRE}-chestGuardian`}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${et.A_.BONFIRE}-A4`]}},{id:"13-0",prerequisites:["12-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.BonfireQ13Cebollini}},localizationKey:"QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",metadata:{locations:[`${et.A_.BONFIRE}-D6`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-Q13-post-battle`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"weapon",ID:81,N:1}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[550,551]}}}],metadata:{locations:[`${et.A_.BONFIRE}-D6`]}},{id:"14-0",prerequisites:["13-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.BONFIRE}-Q14-attend-dinner`}},localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN",metadata:{locations:[`${et.A_.BONFIRE}-D5`]}},{id:"14-1",prerequisites:["14-0"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"slurpy"}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:3},{type:"key",ID:11}],additionalDialogueIds:{precedingDialogue:[554,555,510,556],succeedingDialogue:[557]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_SLURPY",metadata:{locations:[`${et.A_.BONFIRE}-B1`]}}]}},88919:(q,K,z)=>{"use strict";z.d(K,{C:()=>it});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(24522),et=z(73678);const it={id:`quest-${Q.t.FireflyForestHard}`,tags:[Q.t.LocalZoneQuests,Q.t.FireflyForestHard],metadata:{zoneId:et.A_.FORESTHARD},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.FORESTHARD}-C8`}},preconditions:[{type:tt.n.IS_IN_ZONE,data:{zone:[et.A_.FORESTHARD]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{target:2},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest_hard-uniqueEncounters-C7-forest_C7_Q2_special","zone-forest_hard-uniqueEncounters-C7-forest_C7_S2_special"]}}]},metadata:{locations:[`${et.A_.FORESTHARD}-C7`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q1-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],metadata:{locations:[`${et.A_.FORESTHARD}-C7`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.FireflyQ2Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${et.A_.FORESTHARD}-C7`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q2-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[1349]}}],metadata:{locations:[`${et.A_.FORESTHARD}-C7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q3-intro`}},metadata:{locations:[`${et.A_.FORESTHARD}-B7`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:20,target:2},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest_hard-uniqueEncounters-B7-forest_B7_S2_special","zone-forest_hard-uniqueEncounters-B7-forest_B7_Q1_special"]}}]},localizationKey:"QUESTS_FOREST_DEFEAT_LUMINITES",metadata:{locations:[`${et.A_.FORESTHARD}-B7`]}},{id:"3-2",prerequisites:["3-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q3-miniboss-intro`}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${et.A_.FORESTHARD}-B7`]}},{id:"3-3",prerequisites:["3-2"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.FireflyQ3Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${et.A_.FORESTHARD}-B7`]}},{id:"3-4",prerequisites:["3-3"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q3-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[1370,1371]}}],metadata:{locations:[`${et.A_.FORESTHARD}-B7`]}},{id:"4-0",prerequisites:["3-4"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"florian"}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{}],showGotItem:!1}}],localizationKey:"QUEST_FIND_FLORIAN",metadata:{locations:[`${et.A_.FORESTHARD}-B6`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q5-florian`}},localizationKey:"QUEST_JOB_COMPLETE",metadata:{locations:[`${et.A_.FORESTHARD}-B6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"bok"}},onComplete:[{type:Z.s.GOT_PET,data:{id:80,showPetsInCardFormat:!0,claimToken:"16c7deee-f3a8-4599-856b-acb1884aeb40",playerLevelDeltaMin:0,playerLevelDeltaMax:0}}],localizationKey:"QUEST_GO_TO_SHIVERCHILL",metadata:{locations:[`${et.A_.SHIVERCHILLHARD}-A10`]}},{id:"5-2",prerequisites:["5-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q5-bok`}},metadata:{locations:[`${et.A_.SHIVERCHILLHARD}-A10`]}},{id:"6-1",prerequisites:["5-2"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.QuestPippet}},localizationKey:"QUEST_DEFEAT_PIPPET",metadata:{locations:[`${et.A_.FORESTHARD}-B5`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q6-post-battle`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:67}],additionalDialogueIds:{succeedingDialogue:[306,307]}}}],metadata:{locations:[`${et.A_.FORESTHARD}-B5`]}},{id:"6-3",prerequisites:["6-2"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"merchant"}},localizationKey:"QUEST_TRANSLATE_NOTE",metadata:{locations:[`${et.A_.FORESTHARD}-C4`]}},{id:"6-4",prerequisites:["6-3"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q6-noot`}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${et.A_.FORESTHARD}-D3`]}},{id:"6-5",prerequisites:["6-4"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[24]}}],data:{}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${et.A_.FORESTHARD}-D3`]}},{id:"6-6",prerequisites:["6-5"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.FORESTHARD}-D3`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:["item"],ID:[24],N:1}],isFake:!0}},{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[310,311,312]}}],metadata:{locations:[`${et.A_.FORESTHARD}-D3`]}},{id:"7-0",prerequisites:["6-6"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:24,target:5}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[331],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[313,314,315]}}}],metadata:{locations:[{location:`${et.A_.FORESTHARD}-A4`,disallowedStates:{"quest-state-1":1,"quest-state-2":1}},{location:`${et.A_.FORESTHARD}-A5`,disallowedStates:{"quest-state-3":1,"quest-state-4":1,"quest-state-5":1}}]}},{id:"8-0",prerequisites:["7-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.FireflyQ8TriptropTrio}},localizationKey:"QUEST_DEFEAT_TRIPTROP_TRIO",metadata:{locations:[`${et.A_.FORESTHARD}-A3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],metadata:{locations:[`${et.A_.FORESTHARD}-A3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:"find-gerald"}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],localizationKey:"QUESTS_FOREST_FIND_GERALD",metadata:{locations:[`${et.A_.FORESTHARD}-D3`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:"fixed-flute"}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],localizationKey:"QUESTS_FOREST_FIX_FLUTE",metadata:{locations:[`${et.A_.FORESTHARD}-A5`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[70]}}],data:{}},localizationKey:"QUESTS_FOREST_COLLECT_FLUTE",metadata:{locations:[`${et.A_.FORESTHARD}-A3`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.FORESTHARD}-A3`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[331],succeedingDialogue:[325,326]}}}],metadata:{locations:[`${et.A_.FORESTHARD}-A3`]}},{id:"12-1",prerequisites:["11-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.FireflyQ12Gerald}},localizationKey:"QUESTS_FOREST_DEFEAT_GERALD",metadata:{locations:[`${et.A_.FORESTHARD}-D3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q12-post-battle`}},metadata:{locations:[`${et.A_.FORESTHARD}-D3`]}},{id:"12-3",prerequisites:["12-2"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q12-quest-complete`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"key",ID:3}]}}],metadata:{locations:[`${et.A_.FORESTHARD}-D3`]}},{id:"13-0",prerequisites:["12-3"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.SHIVERCHILLHARD}-A10`}},metadata:{locations:[`${et.A_.SHIVERCHILLHARD}-A10`]}}]}},1716:(q,K,z)=>{"use strict";z.d(K,{E:()=>it});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(24522),et=z(73678);const it={id:`quest-${Q.t.FireflyForest}`,tags:[Q.t.LocalZoneQuests,Q.t.FireflyForest],metadata:{zoneId:et.A_.FOREST},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.FOREST}-C8`}},preconditions:[{type:tt.n.IS_IN_ZONE,data:{zone:[et.A_.FOREST]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{target:2},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest-uniqueEncounters-C7-forest_C7_Q2_special","zone-forest-uniqueEncounters-C7-forest_C7_S2_special"]}}]},metadata:{locations:[`${et.A_.FOREST}-C7`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q1-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}}],metadata:{locations:[`${et.A_.FOREST}-C7`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.FireflyQ2Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${et.A_.FOREST}-C7`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q2-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}},{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[1349]}}],metadata:{locations:[`${et.A_.FOREST}-C7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q3-intro`}},localizationKey:"QUEST_LEVEL_UP",metadata:{locations:[`${et.A_.FOREST}-B7`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{target:2},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest-uniqueEncounters-B7-forest_B7_S2_special","zone-forest-uniqueEncounters-B7-forest_B7_Q1_special"]}}]},localizationKey:"QUEST_LEVEL_UP",metadata:{locations:[`${et.A_.FOREST}-B7`]}},{id:"3-2",prerequisites:["3-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q3-miniboss-intro`}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${et.A_.FOREST}-B7`]}},{id:"3-3",prerequisites:["3-2"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.FireflyQ3Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${et.A_.FOREST}-B7`]}},{id:"3-4",prerequisites:["3-3"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q3-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}},{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[1370,1371]}}],metadata:{locations:[`${et.A_.FOREST}-B7`]}},{id:"4-0",prerequisites:["3-4"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"florian"}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:13}],showGotItem:!1}}],localizationKey:"QUEST_FIND_FLORIAN",metadata:{locations:[`${et.A_.FOREST}-B6`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q5-florian`}},localizationKey:"QUEST_JOB_COMPLETE",metadata:{locations:[`${et.A_.FOREST}-B6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"bok"}},onComplete:[{type:Z.s.GOT_PET,data:{id:79,showPetsInCardFormat:!0,claimToken:"877e5cbb-48fb-4e88-bde4-6abd96fe4275",playerLevelDeltaMin:0,playerLevelDeltaMax:0}},{type:Z.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:X.T.BUTTON_CLICK,eventData:{id:`${et.A_.FOREST}-Q5-bok-receive-pet`}}}],localizationKey:"QUEST_GO_TO_SHIVERCHILL",metadata:{locations:[`${et.A_.SHIVERCHILL}-A10`]}},{id:"5-2",prerequisites:["5-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q5-bok`}},metadata:{locations:[`${et.A_.SHIVERCHILL}-A10`]}},{id:"6-1",prerequisites:["5-2"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.QuestPippet}},localizationKey:"QUEST_DEFEAT_PIPPET",metadata:{locations:[`${et.A_.FOREST}-B5`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q6-post-battle`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:67}],additionalDialogueIds:{succeedingDialogue:[306,307]}}}],metadata:{locations:[`${et.A_.FOREST}-B5`]}},{id:"6-3",prerequisites:["6-2"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"merchant"}},localizationKey:"QUEST_TRANSLATE_NOTE",metadata:{locations:[`${et.A_.FOREST}-C4`]}},{id:"6-4",prerequisites:["6-3"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q6-noot`}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${et.A_.FOREST}-D3`]}},{id:"6-5",prerequisites:["6-4"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[24]}}],data:{}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${et.A_.FOREST}-D3`]}},{id:"6-6",prerequisites:["6-5"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.FOREST}-D3`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:["item"],ID:[24],N:1}],isFake:!0}},{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[310,311,312]}}],metadata:{locations:[`${et.A_.FOREST}-D3`]}},{id:"7-0",prerequisites:["6-6"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:24,target:5}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[331],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[313,314,315]}}}],metadata:{locations:[{location:`${et.A_.FOREST}-A4`,disallowedStates:{"quest-state-1":1,"quest-state-2":1}},{location:`${et.A_.FOREST}-A5`,disallowedStates:{"quest-state-3":1,"quest-state-4":1,"quest-state-5":1}}]}},{id:"8-0",prerequisites:["7-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.FireflyQ8TriptropTrio}},localizationKey:"QUEST_DEFEAT_TRIPTROP_TRIO",metadata:{locations:[`${et.A_.FOREST}-A3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:14}]}}],metadata:{locations:[`${et.A_.FOREST}-A3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:"find-gerald"}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}}],localizationKey:"QUESTS_FOREST_FIND_GERALD",metadata:{locations:[`${et.A_.FOREST}-D3`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:"fixed-flute"}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}}],localizationKey:"QUESTS_FOREST_FIX_FLUTE",metadata:{locations:[`${et.A_.FOREST}-A5`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[70]}}],data:{}},localizationKey:"QUESTS_FOREST_COLLECT_FLUTE",metadata:{locations:[`${et.A_.FOREST}-A3`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.FOREST}-A3`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[331],succeedingDialogue:[325,326]}}}],metadata:{locations:[`${et.A_.FOREST}-A3`]}},{id:"12-1",prerequisites:["11-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.FireflyQ12Gerald}},localizationKey:"QUESTS_FOREST_DEFEAT_GERALD",metadata:{locations:[`${et.A_.FOREST}-D3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q12-post-battle`}},metadata:{locations:[`${et.A_.FOREST}-D3`]}},{id:"12-3",prerequisites:["12-2"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.FOREST}-Q12-quest-complete`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"key",ID:3}]}}],metadata:{locations:[`${et.A_.FOREST}-D3`]}},{id:"13-0",prerequisites:["12-3"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.SHIVERCHILL}-A10`}},metadata:{locations:[`${et.A_.SHIVERCHILL}-A10`]}}]}},57144:(q,K,z)=>{"use strict";z.d(K,{r:()=>it});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(24522),et=z(73678);const it={id:`quest-${Q.t.ShipwreckShoreHard}`,tags:[Q.t.LocalZoneQuests,Q.t.ShipwreckShoreHard],metadata:{zoneId:et.A_.SHIPWRECKHARD},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.SHIPWRECKHARD}-B12`}},preconditions:[{type:tt.n.IS_IN_ZONE,data:{zone:[et.A_.SHIPWRECKHARD]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"key",id:14,target:1}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[668,669,670,671]}}}],metadata:{locations:[`${et.A_.SHIPWRECKHARD}-C10`]}},{id:"2-0",prerequisites:["1-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q2-jelly-jim-intro`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[708]}}}],localizationKey:"QUESTS_SHIPWRECK_FIND_JIM",metadata:{locations:[`${et.A_.SHIPWRECKHARD}-C9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q2-1-quest-complete`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[672,673,674]}}}],localizationKey:"QUESTS_SHIPWRECK_LOOK_AROUND",metadata:{locations:[`${et.A_.SHIPWRECKHARD}-A7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:112,target:1}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[676,677,678,679,680,681,682,683]}}],metadata:{locations:[`${et.A_.SHIPWRECKHARD}-A7`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"key",id:15,target:1}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[684,685]}}}],metadata:{locations:[`${et.A_.SHIPWRECKHARD}-B7`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q5-clear-ink`}},localizationKey:"QUESTS_SHIPWRECK_CLEAR_INK",metadata:{locations:[{location:`${et.A_.SHIPWRECKHARD}-A7`,requiredStates:{inkA7:0}},{location:`${et.A_.SHIPWRECKHARD}-B6`,requiredStates:{inkB6:0}},{location:`${et.A_.SHIPWRECKHARD}-B5`,requiredStates:{inkB5:0}},{location:`${et.A_.SHIPWRECKHARD}-A5`}]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q5-quest-complete`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[686,687,688,689]}}}],metadata:{locations:[`${et.A_.SHIPWRECKHARD}-A5`]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q6-get-camera`}},onComplete:[{type:Z.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[709,710]},itemDrops:[{type:"key",ID:16,N:1}]}},{type:Z.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[708]},itemDrops:[{type:"gold",ID:1,N:400}]}}],localizationKey:"QUESTS_SHIPWRECK_GET_CAMERA",metadata:{locations:[`${et.A_.SHIPWRECKHARD}-C9`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q6-1-take-photo`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[690,691,692]}}}],localizationKey:"QUESTS_SHIPWRECK_TAKE_PHOTO",metadata:{locations:[`${et.A_.SHIPWRECKHARD}-A5`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:113,target:3}},metadata:{locations:[`${et.A_.SHIPWRECKHARD}-A2`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q7-quest-complete`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658,675],succeedingDialogue:[693,697,695]}}}],metadata:{locations:[`${et.A_.SHIPWRECKHARD}-A2`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:119,target:4},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shipwreck_shore_hard-uniqueEncounters-B8-shipwreck_shore_B8_S1_special","zone-shipwreck_shore_hard-uniqueEncounters-B8-shipwreck_shore_B8_S2_special","zone-shipwreck_shore_hard-uniqueEncounters-B7-shipwreck_shore_B7_S1_special","zone-shipwreck_shore_hard-uniqueEncounters-B7-shipwreck_shore_B7_S3_special"]}}]},metadata:{locations:[{location:`${et.A_.SHIPWRECKHARD}-B8`,uniqueEncounters:{B8:["shipwreck_shore_B8_S1_special","shipwreck_shore_B8_S2_special"]}},{location:`${et.A_.SHIPWRECKHARD}-B7`,uniqueEncounters:{B7:["shipwreck_shore_B7_S1_special","shipwreck_shore_B7_S3_special"]}}]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q8-quest-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[696,658],succeedingDialogue:[697,698,699]}}}],metadata:{locations:[`${et.A_.SHIPWRECKHARD}-B8`,`${et.A_.SHIPWRECKHARD}-B7`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q9-open-door`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[700]}}}],localizationKey:"QUESTS_SHIPWRECK_OPEN_DOOR",metadata:{locations:[`${et.A_.SHIPWRECKHARD}-B6`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:114,target:1}},metadata:{locations:[`${et.A_.SHIPWRECKHARD}-B7`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.ShipwreckQ11OldOne}},localizationKey:"QUESTS_SHIPWRECK_DEFEAT_BOSS",metadata:{locations:[`${et.A_.SHIPWRECKHARD}-C6`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q11-post-battle`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${et.A_.SHIPWRECKHARD}-C6`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q11-quest-end`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${et.A_.SHIPWRECKHARD}-B12`]}},{id:"11-3",prerequisites:["11-2"],completionRequirements:{type:X.T.NONE,data:{}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:800},{type:"key",ID:17,N:1}],additionalDialogueIds:{precedingDialogue:[658,675,702]}}}],localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${et.A_.SHIPWRECKHARD}-B12`]}}]}},76175:(q,K,z)=>{"use strict";z.d(K,{J:()=>it});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(24522),et=z(73678);const it={id:`quest-${Q.t.ShipwreckShore}`,tags:[Q.t.LocalZoneQuests,Q.t.ShipwreckShore],metadata:{zoneId:et.A_.SHIPWRECK},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${et.A_.SHIPWRECK}-B12`}},preconditions:[{type:tt.n.IS_IN_ZONE,data:{zone:[et.A_.SHIPWRECK]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"key",id:14,target:1}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[668,669,670,671]}}}],metadata:{locations:[`${et.A_.SHIPWRECK}-C10`]}},{id:"2-0",prerequisites:["1-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q2-jelly-jim-intro`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[708]}}}],localizationKey:"QUESTS_SHIPWRECK_FIND_JIM",metadata:{locations:[`${et.A_.SHIPWRECK}-C9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q2-1-quest-complete`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"boots",ID:32,N:1}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[672,673,674]}}}],localizationKey:"QUESTS_SHIPWRECK_LOOK_AROUND",metadata:{locations:[`${et.A_.SHIPWRECK}-A7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:112,target:1}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[676,677,678,679,680,681,682,683]}}],metadata:{locations:[`${et.A_.SHIPWRECK}-A7`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"key",id:15,target:1}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[684,685]}}}],metadata:{locations:[`${et.A_.SHIPWRECK}-B7`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q5-clear-ink`}},localizationKey:"QUESTS_SHIPWRECK_CLEAR_INK",metadata:{locations:[{location:`${et.A_.SHIPWRECK}-A7`,requiredStates:{inkA7:0}},{location:`${et.A_.SHIPWRECK}-B6`,requiredStates:{inkB6:0}},{location:`${et.A_.SHIPWRECK}-B5`,requiredStates:{inkB5:0}},{location:`${et.A_.SHIPWRECK}-A5`}]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q5-quest-complete`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[686,687,688,689]}}}],metadata:{locations:[`${et.A_.SHIPWRECK}-A5`]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q6-get-camera`}},onComplete:[{type:Z.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[709,710]},itemDrops:[{type:"key",ID:16,N:1}]}},{type:Z.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[708]},itemDrops:[{type:"gold",ID:1,N:200}]}}],localizationKey:"QUESTS_SHIPWRECK_GET_CAMERA",metadata:{locations:[`${et.A_.SHIPWRECK}-C9`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q6-1-take-photo`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"outfit",ID:61,N:1}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[690,691,692]}}}],localizationKey:"QUESTS_SHIPWRECK_TAKE_PHOTO",metadata:{locations:[`${et.A_.SHIPWRECK}-A5`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:113,target:3}},metadata:{locations:[`${et.A_.SHIPWRECK}-A2`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q7-quest-complete`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"spellRelic",ID:11,N:1}],additionalDialogueIds:{precedingDialogue:[658,675],succeedingDialogue:[693,697,695]}}}],metadata:{locations:[`${et.A_.SHIPWRECK}-A2`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{target:4},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shipwreck_shore-uniqueEncounters-B8-shipwreck_shore_B8_S1_special","zone-shipwreck_shore-uniqueEncounters-B8-shipwreck_shore_B8_S2_special","zone-shipwreck_shore-uniqueEncounters-B7-shipwreck_shore_B7_S1_special","zone-shipwreck_shore-uniqueEncounters-B7-shipwreck_shore_B7_S3_special"]}}]},metadata:{locations:[{location:`${et.A_.SHIPWRECK}-B8`,uniqueEncounters:{B8:["shipwreck_shore_B8_S1_special","shipwreck_shore_B8_S2_special"]}},{location:`${et.A_.SHIPWRECK}-B7`,uniqueEncounters:{B7:["shipwreck_shore_B7_S1_special","shipwreck_shore_B7_S3_special"]}}]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q8-quest-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[696,658],succeedingDialogue:[697,698,699]}}}],metadata:{locations:[`${et.A_.SHIPWRECK}-B8`,`${et.A_.SHIPWRECK}-B7`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q9-open-door`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"hat",ID:80,N:1}],additionalDialogueIds:{succeedingDialogue:[700]}}}],localizationKey:"QUESTS_SHIPWRECK_OPEN_DOOR",metadata:{locations:[`${et.A_.SHIPWRECK}-B6`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:114,target:1}},metadata:{locations:[`${et.A_.SHIPWRECK}-B7`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.ShipwreckQ11OldOne}},localizationKey:"QUESTS_SHIPWRECK_DEFEAT_BOSS",metadata:{locations:[`${et.A_.SHIPWRECK}-C6`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q11-post-battle`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${et.A_.SHIPWRECK}-C6`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${et.A_.SHIPWRECK}-Q11-quest-end`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${et.A_.SHIPWRECK}-B12`]}},{id:"11-3",prerequisites:["11-2"],completionRequirements:{type:X.T.NONE,data:{}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"spellRelic",ID:12,N:1},{type:"key",ID:17,N:1}],additionalDialogueIds:{precedingDialogue:[658,675,702]}}}],localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${et.A_.SHIPWRECK}-B12`]}}]}},38693:(q,K,z)=>{"use strict";z.d(K,{S:()=>et});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(73678);const et={id:`quest-${Q.t.ShiverchillHard}`,tags:[Q.t.LocalZoneQuests,Q.t.ShiverchillHard],metadata:{zoneId:tt.A_.SHIVERCHILLHARD},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"bok"}},metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A10`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SHIVERCHILLHARD}-B10`}},localizationKey:"QUESTS_SHIVERCHILL_INVESTIGATE_FURNACE_ROOM",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B10`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{target:3},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill_hard-uniqueEncounters-B10-shiverchill_B10_S1_special","zone-shiverchill_hard-uniqueEncounters-B10-shiverchill_B10_S2_special","zone-shiverchill_hard-uniqueEncounters-B10-shiverchill_B10_S3_special"]}}]},localizationKey:"QUESTS_SHIVERCHILL_CLEAR_FURNACE_ROOM",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B10`]}},{id:"1-3",prerequisites:["1-2"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q1-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[339,334,340,341]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B10`]}},{id:"2-0",prerequisites:["1-3"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[71]}}],data:{}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTAL",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q2-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A9`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q3-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[344,345]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_FIRST_FURNACE",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B10`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q4-shake`}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A7`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"shiverchill-miner"}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A7`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q4-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:75,N:1}],additionalDialogueIds:{succeedingDialogue:[349]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A7`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:X.T.OPEN_CHEST,data:{id:"shiverchill_hard-chest1"}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[350,334,351],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:72,N:1}],additionalDialogueIds:{succeedingDialogue:[352]}}}],localizationKey:"QUESTS_SHIVERCHILL_GET_BOKS_SHOVEL",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B6`]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.ShiverchillQ6Ghosts}},localizationKey:"QUESTS_SHIVERCHILL_FREE_MINER",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A7`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q6-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[353,354]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A7`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.ShiverchillQ7IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTALS",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B8`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q7-post-battle`}},metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B8`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[355,356,334,357]}}}]},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q8-pippet-encounter-complete`}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_CLOAKERS",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A7`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:90,target:3},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill_hard-uniqueEncounters-B6-shiverchill_B6_S1_special","zone-shiverchill_hard-uniqueEncounters-B6-shiverchill_B6_S2_special","zone-shiverchill_hard-uniqueEncounters-B7-shiverchill_B7_S1_special","zone-shiverchill_hard-uniqueEncounters-B7-shiverchill_B7_S2_special"]}}]},metadata:{locations:[{location:`${tt.A_.SHIVERCHILLHARD}-B7`,uniqueEncounters:{B7:["shiverchill_B7_S1_special","shiverchill_B7_S2_special"]}},{location:`${tt.A_.SHIVERCHILLHARD}-B6`,uniqueEncounters:{B6:["shiverchill_B6_S1_special","shiverchill_B6_S2_special"]}}]}},{id:"8-2",prerequisites:["8-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q8-end`}},metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B7`,`${tt.A_.SHIVERCHILLHARD}-B6`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[358]}}}]},{id:"9-0",prerequisites:["8-2"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:71,target:1}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_POWER_CRYSTAL",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A6`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q9-end`}},metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A6`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q10-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[359,360]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_SECOND_FURNACE",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B10`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q11-end`}},localizationKey:"QUESTS_SHIVERCHILL_CHECK_THRONE_ROOM",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B3`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[362,334,363,364,365]}}}]},{id:"12-0",prerequisites:["11-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:74,target:3}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A3`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:74,target:5}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q12-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[366,334,367]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B3`]}},{id:"13-0",prerequisites:["12-2"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILLHARD}-Q13-start`}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.ShiverchillQ13IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILLHARD}-Q13-post-battle`}},metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-A4`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"14-0",prerequisites:["13-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q14-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[368,369]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_THIRD_FURNACE",metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B10`]}},{id:"15-0",prerequisites:["14-0"],localizationKey:"QUESTS_SHIVERCHILL_GO_TO_THRONE_ROOM",completionRequirements:{type:X.T.FSM_COMPLETE_SEQUENCE,data:{}},metadata:{locations:[`${tt.A_.SHIVERCHILLHARD}-B2`]}}]}},99689:(q,K,z)=>{"use strict";z.d(K,{a:()=>et});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(73678);const et={id:`quest-${Q.t.Shiverchill}`,tags:[Q.t.LocalZoneQuests,Q.t.Shiverchill],metadata:{zoneId:tt.A_.SHIVERCHILL},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"bok"}},onComplete:[{type:Z.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:X.T.BUTTON_CLICK,eventData:{id:`${tt.A_.SHIVERCHILL}-A10-bok-start-quest`}}}],metadata:{locations:[`${tt.A_.SHIVERCHILL}-A10`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SHIVERCHILL}-B10`}},localizationKey:"QUESTS_SHIVERCHILL_INVESTIGATE_FURNACE_ROOM",metadata:{locations:[`${tt.A_.SHIVERCHILL}-B10`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{target:3},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill-uniqueEncounters-B10-shiverchill_B10_S1_special","zone-shiverchill-uniqueEncounters-B10-shiverchill_B10_S2_special","zone-shiverchill-uniqueEncounters-B10-shiverchill_B10_S3_special"]}}]},localizationKey:"QUESTS_SHIVERCHILL_CLEAR_FURNACE_ROOM",metadata:{locations:[`${tt.A_.SHIVERCHILL}-B10`]}},{id:"1-3",prerequisites:["1-2"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q1-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[339,334,340,341]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILL}-B10`]}},{id:"2-0",prerequisites:["1-3"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[71]}}],data:{}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTAL",metadata:{locations:[`${tt.A_.SHIVERCHILL}-A9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q2-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILL}-A9`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q3-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:4,N:1}],additionalDialogueIds:{precedingDialogue:[333],succeedingDialogue:[344,345]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_FIRST_FURNACE",metadata:{locations:[`${tt.A_.SHIVERCHILL}-B10`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q4-shake`}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${tt.A_.SHIVERCHILL}-A7`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:"shiverchill-miner"}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${tt.A_.SHIVERCHILL}-A7`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q4-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100},{type:"item",ID:75,N:1}],additionalDialogueIds:{succeedingDialogue:[349]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILL}-A7`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:X.T.OPEN_CHEST,data:{id:"shiverchill-chest1"}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[350,334,351],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100},{type:"item",ID:72,N:1}],additionalDialogueIds:{succeedingDialogue:[352]}}}],localizationKey:"QUESTS_SHIVERCHILL_GET_BOKS_SHOVEL",metadata:{locations:[`${tt.A_.SHIVERCHILL}-B6`]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.ShiverchillQ6Ghosts}},localizationKey:"QUESTS_SHIVERCHILL_FREE_MINER",metadata:{locations:[`${tt.A_.SHIVERCHILL}-A7`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q6-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"hat",ID:54,N:1}],additionalDialogueIds:{succeedingDialogue:[353,354]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILL}-A7`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.ShiverchillQ7IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTALS",metadata:{locations:[`${tt.A_.SHIVERCHILL}-B8`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q7-post-battle`}},metadata:{locations:[`${tt.A_.SHIVERCHILL}-B8`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[355,356,334,357]}}}]},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q8-pippet-encounter-complete`}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_CLOAKERS",metadata:{locations:[`${tt.A_.SHIVERCHILL}-A7`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:90,target:3},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill-uniqueEncounters-B6-shiverchill_B6_S1_special","zone-shiverchill-uniqueEncounters-B6-shiverchill_B6_S2_special","zone-shiverchill-uniqueEncounters-B7-shiverchill_B7_S1_special","zone-shiverchill-uniqueEncounters-B7-shiverchill_B7_S2_special"]}}]},metadata:{locations:[{location:`${tt.A_.SHIVERCHILL}-B7`,uniqueEncounters:{B7:["shiverchill_B7_S1_special","shiverchill_B7_S2_special"]}},{location:`${tt.A_.SHIVERCHILL}-B6`,uniqueEncounters:{B6:["shiverchill_B6_S1_special","shiverchill_B6_S2_special"]}}]}},{id:"8-2",prerequisites:["8-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q8-end`}},metadata:{locations:[`${tt.A_.SHIVERCHILL}-B7`,`${tt.A_.SHIVERCHILL}-B6`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[358]}}}]},{id:"9-0",prerequisites:["8-2"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:71,target:1}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_POWER_CRYSTAL",metadata:{locations:[`${tt.A_.SHIVERCHILL}-A6`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q9-end`}},metadata:{locations:[`${tt.A_.SHIVERCHILL}-A6`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q10-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:5,N:1}],additionalDialogueIds:{precedingDialogue:[333],succeedingDialogue:[359,360]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_SECOND_FURNACE",metadata:{locations:[`${tt.A_.SHIVERCHILL}-B10`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q11-end`}},localizationKey:"QUESTS_SHIVERCHILL_CHECK_THRONE_ROOM",metadata:{locations:[`${tt.A_.SHIVERCHILL}-B3`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[362,334,363,364,365]}}}]},{id:"12-0",prerequisites:["11-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:74,target:3}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${tt.A_.SHIVERCHILL}-A3`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:74,target:5}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${tt.A_.SHIVERCHILL}-B3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q12-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"outfit",ID:47,N:1}],additionalDialogueIds:{succeedingDialogue:[366,334,367]}}}],metadata:{locations:[`${tt.A_.SHIVERCHILL}-B3`]}},{id:"13-0",prerequisites:["12-2"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q13-start`}},onComplete:[{type:Z.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:X.T.BUTTON_CLICK,eventData:{id:`${tt.A_.SHIVERCHILL}-Q13-cutscene-start-finished`}}}],localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${tt.A_.SHIVERCHILL}-A4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.ShiverchillQ13IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${tt.A_.SHIVERCHILL}-A4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-Q13-post-battle`}},metadata:{locations:[`${tt.A_.SHIVERCHILL}-A4`]},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"14-0",prerequisites:["13-2"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q14-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:6,N:1}],additionalDialogueIds:{precedingDialogue:[333],succeedingDialogue:[368,369]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_THIRD_FURNACE",metadata:{locations:[`${tt.A_.SHIVERCHILL}-B10`]}},{id:"15-0",prerequisites:["14-0"],localizationKey:"QUESTS_SHIVERCHILL_GO_TO_THRONE_ROOM",completionRequirements:{type:X.T.FSM_COMPLETE_SEQUENCE,data:{}},metadata:{locations:[`${tt.A_.SHIVERCHILL}-B2`]}},{id:"15-1",prerequisites:["15-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SHIVERCHILL}-q15-end`}},localizationKey:"QUESTS_SHIVERCHILL_SPEAK_WITH_BOK",onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"weapon",ID:74,N:1}]}}],metadata:{locations:[`${tt.A_.SHIVERCHILL}-A10`]}}]}},97340:(q,K,z)=>{"use strict";z.d(K,{x:()=>et});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(73678);const et={id:`quest-${Q.t.SkywatchHard}`,tags:[Q.t.LocalZoneQuests,Q.t.SkywatchHard],metadata:{zoneId:tt.A_.SKYWATCHHARD},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:`${tt.A_.SKYWATCH}-introduction`}},metadata:{locations:[`${tt.A_.SKYWATCHHARD}-A1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:72,target:3},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-skywatch_hard-uniqueEncounters-B2-skywatch_B2_S1_special","zone-skywatch_hard-uniqueEncounters-B2-skywatch_B2_S2_special","zone-skywatch_hard-uniqueEncounters-B2-skywatch_B2_S3_special"]}}]},localizationKey:"QUESTS_SKYWATCH_DEFEAT_CLOUD_NEEKS",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-B2`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q1-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[414,422],succeedingDialogue:[423,424,425,426]}}}],metadata:{locations:[`${tt.A_.SKYWATCHHARD}-B2`]}},{id:"2-0",prerequisites:["1-2"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCHHARD}-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-C2`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q2-thief-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-C2`]}},{id:"2-2",prerequisites:["2-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q2-2-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCH}-C1`]}},{id:"2-3",prerequisites:["2-2"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q2-3-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-C3`]}},{id:"2-4",prerequisites:["2-3"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[87]}}],data:{}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-C4`]}},{id:"2-5",prerequisites:["2-4"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q2-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[427,428,429]}}}],metadata:{locations:[`${tt.A_.SKYWATCHHARD}-C4`]}},{id:"3-0",prerequisites:["2-5"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q3-note`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-B2`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-A0-found-broccolina`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"key",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[430,431,432]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-A0`]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q4-trim-vines-D1`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-D1`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q4-trim-vines-D2`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-D2`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q4-clogged-machine`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[433,434,435,436]}}}],localizationKey:"QUESTS_SKYWATCH_INSPECT_MACHINE",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-D3`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:56,target:3}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[415],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[437,438]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_CLUES",metadata:{locations:[{location:`${tt.A_.SKYWATCHHARD}-D2`,disallowedStates:{"quest-state-1":1}},{location:`${tt.A_.SKYWATCHHARD}-C3`,disallowedStates:{"quest-state-2":1}},{location:`${tt.A_.SKYWATCHHARD}-B3`,disallowedStates:{"quest-state-3":1}}]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:81,target:1}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_FACTORY_KEY",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-D1`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchQ6Swarm}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-D1`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCHHARD}-D1`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[439]}}}],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-D1`]}},{id:"7-0",prerequisites:["6-2"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[49]}}],data:{target:5}},localizationKey:"",metadata:{locations:[{location:`${tt.A_.SKYWATCHHARD}-E1`,uniqueEncounters:{E1:["skywatch_E1_S1_special","skywatch_E1_S2_special"]}},{location:`${tt.A_.SKYWATCHHARD}-E3`,uniqueEncounters:{E3:["skywatch_E3_S1_special","skywatch_E3_S2_special","skywatch_E3_Q1_special"]}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q7-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"key",ID:9,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[440,441,442]}}}],localizationKey:"",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-E1`,`${tt.A_.SKYWATCHHARD}-E3`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-B3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q8-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[443]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-B3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-C4`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q9-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[414],succeedingDialogue:[444]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-C4`]}},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-D3`]}},{id:"10-1",prerequisites:["10-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q10-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[445,446,447]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-D3`]}},{id:"11-0",prerequisites:["10-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchQ11Bitbots}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-E2`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCHHARD}-E2`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[464,465,466,467,468,469]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-E2`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q11-end`}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[415,448,449,450]}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-E2`]}},{id:"12-0",prerequisites:["11-2"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:82,target:2}},onComplete:[{type:Z.s.REMOVE_UNSECURE_ITEM,data:{itemDrops:[{type:"item",ID:82,N:2}]}},{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[414],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:83,N:1}],additionalDialogueIds:{succeedingDialogue:[451,452]}}}],localizationKey:"QUESTS_SKYWATCH_COLLECT_KEY_PARTS",metadata:{locations:[{location:`${tt.A_.SKYWATCHHARD}-D3`,disallowedStates:{"quest-state-0":1}},{location:`${tt.A_.SKYWATCHHARD}-C3`,disallowedStates:{"quest-state-1":1}}]}},{id:"13-0",prerequisites:["12-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchCloudBoss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-E4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCHHARD}-E4`}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[51]}},{type:Z.s.OFFER_TELEPORT,data:{dialogueID:1753,targetMapTag:`${tt.A_.SKYWATCHHARD}-A1`,position:{x:600,y:360}}}],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-E4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCHHARD}-A1`}},onComplete:[{type:Z.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[453,454,455]},itemDrops:[{type:"key",ID:10,N:1}]}}],localizationKey:"QUESTS_SKYWATCH_TALK_TO_BENNI",metadata:{locations:[`${tt.A_.SKYWATCHHARD}-A1`]}}]}},64891:(q,K,z)=>{"use strict";z.d(K,{x:()=>et});var Y=z(28628),Q=z(98938),X=z(62886),Z=z(29891),J=z(7247),tt=z(73678);const et={id:`quest-${Q.t.Skywatch}`,tags:[Q.t.LocalZoneQuests,Q.t.Skywatch],metadata:{zoneId:tt.A_.SKYWATCH},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:X.T.SPEAK_WITH_NPC,data:{id:`${tt.A_.SKYWATCH}-introduction`}},onComplete:[{type:Z.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:X.T.BUTTON_CLICK,eventData:{id:`${tt.A_.SKYWATCH}-introduction`}}}],metadata:{locations:[`${tt.A_.SKYWATCH}-A1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:X.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:72,target:3},conditions:[{type:J.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-skywatch-uniqueEncounters-B2-skywatch_B2_S1_special","zone-skywatch-uniqueEncounters-B2-skywatch_B2_S2_special","zone-skywatch-uniqueEncounters-B2-skywatch_B2_S3_special"]}}]},localizationKey:"QUESTS_SKYWATCH_DEFEAT_CLOUD_NEEKS",metadata:{locations:[`${tt.A_.SKYWATCH}-B2`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q1-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[414,422],succeedingDialogue:[423,424,425,426]}}}],metadata:{locations:[`${tt.A_.SKYWATCH}-B2`]}},{id:"2-0",prerequisites:["1-2"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCH}-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCH}-C2`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q2-thief-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCH}-C2`]}},{id:"2-2",prerequisites:["2-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q2-2-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCH}-C1`]}},{id:"2-3",prerequisites:["2-2"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q2-3-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCH}-C3`]}},{id:"2-4",prerequisites:["2-3"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[87]}}],data:{}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${tt.A_.SKYWATCH}-C4`]}},{id:"2-5",prerequisites:["2-4"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q2-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[427,428,429]}}}],metadata:{locations:[`${tt.A_.SKYWATCH}-C4`]}},{id:"3-0",prerequisites:["2-5"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q3-note`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${tt.A_.SKYWATCH}-B2`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-A0-found-broccolina`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"key",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[430,431,432]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${tt.A_.SKYWATCH}-A0`]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q4-trim-vines-D1`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCH}-D1`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q4-trim-vines-D2`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCH}-D2`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q4-clogged-machine`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:7,N:1}],additionalDialogueIds:{precedingDialogue:[415,460],succeedingDialogue:[433,434,435,436]}}}],localizationKey:"QUESTS_SKYWATCH_INSPECT_MACHINE",metadata:{locations:[`${tt.A_.SKYWATCH}-D3`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:56,target:3}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[415],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[437,438]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_CLUES",metadata:{locations:[{location:`${tt.A_.SKYWATCH}-D2`,disallowedStates:{"quest-state-1":1}},{location:`${tt.A_.SKYWATCH}-C3`,disallowedStates:{"quest-state-2":1}},{location:`${tt.A_.SKYWATCH}-B3`,disallowedStates:{"quest-state-3":1}}]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:81,target:1}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_FACTORY_KEY",metadata:{locations:[`${tt.A_.SKYWATCH}-D1`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchQ6Swarm}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${tt.A_.SKYWATCH}-D1`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCH}-D1`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[439]}}}],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${tt.A_.SKYWATCH}-D1`]}},{id:"7-0",prerequisites:["6-2"],completionRequirements:{type:X.T.RECEIVE_ITEM,conditions:[{type:J.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[49]}}],data:{target:5}},localizationKey:"",metadata:{locations:[{location:`${tt.A_.SKYWATCH}-E1`,uniqueEncounters:{E1:["skywatch_E1_S1_special","skywatch_E1_S2_special"]}},{location:`${tt.A_.SKYWATCH}-E3`,uniqueEncounters:{E3:["skywatch_E3_S1_special","skywatch_E3_S2_special","skywatch_E3_Q1_special"]}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q7-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"key",ID:9,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[440,441,442]}}}],localizationKey:"",metadata:{locations:[`${tt.A_.SKYWATCH}-E1`,`${tt.A_.SKYWATCH}-E3`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCH}-B3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q8-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"outfit",ID:5,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[443]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCH}-B3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCH}-C4`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q9-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[414],succeedingDialogue:[444]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCH}-C4`]}},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCH}-D3`]}},{id:"10-1",prerequisites:["10-0"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q10-end`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[415,460],succeedingDialogue:[445,446,447]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${tt.A_.SKYWATCH}-D3`]}},{id:"11-0",prerequisites:["10-1"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchQ11Bitbots}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${tt.A_.SKYWATCH}-E2`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCH}-E2`}},onComplete:[{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"hat",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[464,465,466,467,468,469]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${tt.A_.SKYWATCH}-E2`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:X.T.COMPLETE_CUTSCENE,data:{id:`${tt.A_.SKYWATCH}-Q11-end`}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[415,448,449,450]}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${tt.A_.SKYWATCH}-E2`]}},{id:"12-0",prerequisites:["11-2"],completionRequirements:{type:X.T.COLLECT_ITEM,data:{type:"item",id:82,target:2}},onComplete:[{type:Z.s.REMOVE_UNSECURE_ITEM,data:{itemDrops:[{type:"item",ID:82,N:2}]}},{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[414],clearExistingDialogue:!1}},{type:Z.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"item",ID:83,N:1}],additionalDialogueIds:{succeedingDialogue:[451,452]}}},{type:Z.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:X.T.BUTTON_CLICK,eventData:{id:`${tt.A_.SKYWATCH}-collect-key-parts`}}}],localizationKey:"QUESTS_SKYWATCH_COLLECT_KEY_PARTS",metadata:{locations:[{location:`${tt.A_.SKYWATCH}-D3`,disallowedStates:{"quest-state-0":1}},{location:`${tt.A_.SKYWATCH}-C3`,disallowedStates:{"quest-state-1":1}}]}},{id:"13-0",prerequisites:["12-0"],completionRequirements:{type:X.T.WIN_BATTLE,data:{type:Y.gu.SkywatchCloudBoss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${tt.A_.SKYWATCH}-E4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCH}-E4`}},onComplete:[{type:Z.s.PLAY_DIALOGUE,data:{dialogueIDs:[51]}},{type:Z.s.OFFER_TELEPORT,data:{dialogueID:1753,targetMapTag:"skywatch-A1",position:{x:600,y:360}}}],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${tt.A_.SKYWATCH}-E4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:X.T.ENTER_MAP,data:{id:`${tt.A_.SKYWATCH}-A1`}},onComplete:[{type:Z.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[453,454,455]},itemDrops:[{type:"spellRelic",ID:9,N:1},{type:"key",ID:10,N:1}]}}],localizationKey:"QUESTS_SKYWATCH_TALK_TO_BENNI",metadata:{locations:[`${tt.A_.SKYWATCH}-A1`]}}]}},18587:(q,K,z)=>{"use strict";z.d(K,{R:()=>Et});var Y=z(8674),Q=z(62459),X=z(26738),Z=z(89067),J=z(98938),tt=z(58776),et=z(62886),it=z(29891),st=z(24522),nt=z(51151),at=z(65240),rt=z(61468),ot=z(53151),ht=z(40579),ct=z(35120),dt=z(65050),lt=z(67665),ut=z(13956),ft=z(25480),bt=z(69698),pt=z(46014),vt=z(76007),gt=z(9475),mt=z(79368),yt=z(97806),_t=z(96165);class Et extends mt.k{constructor(){super(...arguments),this._tags=[J.t.BattlePass],this._latestDataVersion=0,this._getDataQueue=[],this.onDataChanged=new Q.HN0,this.onSlowServerRequest=new Q.HN0,this.onAllSlowServerRequestsCompleted=new Q.HN0,this.onQuestRewardAutoCollected=new Q.HN0,this._currentSlowRequestCount=0,this._lastQuestEventTime=0,this._timeouts={},this._slowRequests={},this._requestCount=0,this._lastProcessedVersion=0,this._battlePassPetIds=null}setup(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=ct.q.instance.prodigy.gameContainer.get("bec-9045");this._battleQuestEventHandler=q,this._battleQuestEventHandler.onChange.add(this.questProgressCallback,this),this.rollOverCompletedQuests().catch(Q.RQr.createHandler("Error rolling over completed quests for the battle pass")),this.completeRootTask().catch(Q.RQr.createHandler("Error completing root task for the battle pass")),ot.h.isFeatureEnabled()&&this.claimAllUnclaimedQuests().catch(Q.RQr.createHandler("Error claiming all unclaimed quests in the battle pass")),this.onDataChanged.add((()=>{this.setupBonusQuestRollover(),this.setupSeasonRollover(),this.sendHudButtonData()}))}))}cleanup(){this.onDataChanged.dispose(),this.onSlowServerRequest.dispose(),this.onAllSlowServerRequestsCompleted.dispose(),this.onQuestRewardAutoCollected.dispose(),this._battleQuestEventHandler.onChange.remove(this.questProgressCallback,this),super.cleanup()}getTasksInProgress(q,K,z){const Q=Object.create(null,{getTasksInProgress:{get:()=>super.getTasksInProgress}});return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=this.getCurrentQuestID()?[this.getCurrentQuestID()]:K;return Q.getTasksInProgress.call(this,q,Y,z)}))}getCurrentBattlePassData(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;if(void 0===this._currentBattlePass&&(yield this.updateBattlePassData()),null===this._currentBattlePass)return null;const K=this._latestDataVersion!==(null===(q=this._currentBattlePass)||void 0===q?void 0:q.dataVersion),z=this._getDataQueue.length>0;return(K||z)&&(yield new Promise((q=>this._getDataQueue.push(q)))),this._currentBattlePass}))}getCachedBattlePassData(){return this._currentBattlePass}updateBattlePassData(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._latestDataVersion++;const q=this._latestDataVersion,K=yield this.getAllActiveQuestIDs(),z=this._timeManager.getServerTimeMs();let Y;for(const et of K){const q=yield this.getQuestMetaData(et);if(new Date(q.startDate).getTime()q.taskDefinition.id)),tt),setTimeout((()=>{q===this._latestDataVersion&&(this._currentBattlePass=J,this.dispatchAndClearQueue())}),0))}))}dispatchAndClearQueue(){for(this.onDataChanged.dispatch();this._getDataQueue.length>0;)this._getDataQueue.shift().call(null)}setupBonusQuestRollover(){var q;const K=null===(q=this._currentBattlePass)||void 0===q?void 0:q.getQuestComingSoonDate();if(K){const q=this._timeManager.getServerTimeMs(),z=K.getTime();if(this._bonusQuestRolloverTimeoutId&&window.clearTimeout(this._bonusQuestRolloverTimeoutId),z-q>6048e5)return;this._bonusQuestRolloverTimeoutId=window.setTimeout((()=>{this.updateBattlePassData().catch(Q.RQr.createHandler("Failed to refresh battle pass data"))}),z-q)}}setupSeasonRollover(){var q;const K=null===(q=this._currentBattlePass)||void 0===q?void 0:q.getEndDate();if(!K)return;const z=this._timeManager.getServerTimeMs();this._seasonRolloverTimeoutId&&window.clearTimeout(this._seasonRolloverTimeoutId),K-z>6048e5||(this._seasonRolloverTimeoutId=window.setTimeout((()=>{this.onDataChanged.addOnce((()=>{this.completeRootTask().catch(Q.RQr.createHandler("Error completing root task for the battle pass"))})),this.updateBattlePassData().catch(Q.RQr.createHandler("Failed to refresh battle pass data"))}),K-z))}preloadPreviousUnclaimedRewards(){return(0,Y.sH)(this,void 0,void 0,(function*(){0!==(yield this._networkHandler.getPastUnclaimedRewards()).unclaimedRewards.length&&(this._unclaimedRewardsMail=new nt.MailData({isOpened:!1,subject:this._localizer.getText("BATTLE_PASS_UNCLAIMED_REWARDS_MAIL_SUBJECT"),sendDate:Date.now().toString(),extension:{name:pt.R.BattlePass,deleteMailOnClose:!1,trashButtonVisible:!1}}))}))}getUnclaimedRewardsMail(){return this._unclaimedRewardsMail}claimUnclaimedBattlePassRewards(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._segment.quests.beginQuestEventTransaction(),K=yield this._networkHandler.claimPastUnclaimedReward(),z=[];let Y=[];K.unclaimedRewards.forEach((q=>{q.type===it.s.GOT_ITEM?Y.push(q.data):q.type===it.s.GIVE_ULTIMATE&&z.push(q.data)}));for(const Q of z)yield new yt.N(null,null).doTask({id:Q.ID,showPetMenu:!1,sourceType:at.C.BattlePass});for(Y=ft.u.mergeItems(Y);Y.length>0;){const q=Y.splice(0,5);yield new _t.I("mailer","mailer").doTask({itemDrops:q,sourceType:at.C.BattlePass})}this._unclaimedRewardsMail=void 0,q.flush({})}))}preSendQuestEventViaHub(q,K){const z=Object.create(null,{preSendQuestEventViaHub:{get:()=>super.preSendQuestEventViaHub}});return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this.getCurrentQuestID())return{manager:this,questIDs:[],tags:[]};const Y=yield this.battlePassPreSendQuestEvent(),Q=yield z.preSendQuestEventViaHub.call(this,q,K);return Object.assign(Object.assign({},Q),{requestID:Y})}))}battlePassPreSendQuestEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._lastQuestEventTime=Date.now(),this._requestCount+=1;const q=this._requestCount;return this._slowRequests[q]=!1,this._timeouts[q]=window.setTimeout((()=>{this._slowRequests[q]=!0,this._currentSlowRequestCount++,Date.now()>=this._lastQuestEventTime+1500&&this.onSlowServerRequest.dispatch()}),1500),q}))}sendQuestEvent(q,K,z){const Q=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z;const Y=null!==(z=this._currentBattlePass)&&void 0!==z?z:yield this.getCurrentBattlePassData(),X=null==Y?void 0:Y.getQuestID();if(!X)return{activeQuests:[],inactiveQuests:[]};const Z=yield this.battlePassPreSendQuestEvent(),J=yield Q.sendQuestEvent.call(this,q,K,[X]);return yield this.battlePassPostSendQuestEvent(J,Z),J}))}postSendQuestEventViaHub(q,K){const z=Object.create(null,{postSendQuestEventViaHub:{get:()=>super.postSendQuestEventViaHub}});return(0,Y.sH)(this,void 0,void 0,(function*(){(this._currentBattlePass||(yield this.getCurrentBattlePassData()))&&(yield z.postSendQuestEventViaHub.call(this,q),yield this.battlePassPostSendQuestEvent(q,K))}))}battlePassPostSendQuestEvent(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z;if(q&&q.activeQuests.length>0){const q=null!==(z=this._currentBattlePass)&&void 0!==z?z:yield this.getCurrentBattlePassData();yield this.updateQuestDataAndProcessDifferences(q)}K&&(this._timeouts[K]&&(window.clearTimeout(this._timeouts[K]),delete this._timeouts[K]),void 0!==this._slowRequests[K]&&(this._slowRequests[K]&&(this._currentSlowRequestCount--,0===this._currentSlowRequestCount&&this.onAllSlowServerRequestsCompleted.dispatch()),delete this._slowRequests[K]))}))}questProgressCallback(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K;if(!q.progressResponses)return;for(const Y of q.progressResponses)yield this.processQuestProgressResponse(Y);const z=null!==(K=this._currentBattlePass)&&void 0!==K?K:yield this.getCurrentBattlePassData();yield this.updateQuestDataAndProcessDifferences(z)}))}updateQuestDataAndProcessDifferences(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!q)return;yield this.updateBattlePassData();const K=yield this.getCurrentBattlePassData();K&&K.dataVersion!==this._lastProcessedVersion&&(this.processQuestProgress(q,K),this._lastProcessedVersion=K.dataVersion)}))}processQuestProgress(q,K){const z=[],Y=new Map;null==q||q.getTasks().forEach((q=>{q.taskDefinition.metadata.questGoalTaskType===X.x.GOAL&&(q.taskProgress.status===tt.t.COMPLETE?z.push(q.taskID):q.taskProgress.status===tt.t.IN_PROGRESS&&Y.set(q.taskID,q))}));const Z=[],J=[];null==K||K.getTasks().forEach((q=>{q.taskDefinition.metadata.questGoalTaskType===X.x.GOAL&&(q.taskProgress.status===tt.t.COMPLETE?Z.push(q.taskID):q.taskProgress.status===tt.t.IN_PROGRESS&&J.push(q))}));const et=ct.q.instance.prodigy.gameContainer.get("20f-5f67");rt.l.getAddedItems(z,Z).forEach((q=>{var z;const Y=null==K?void 0:K.getTasks().find((K=>K.taskID===q));if(!Y)return;const X=null==K?void 0:K.getQuests().find((K=>K.goalTaskId===q));if(!X)return;et.battlePass.sendQuestGoalCompleteEvent(Y);const Z=null!==(z=X.reward.battlePassXp)&&void 0!==z?z:0;let J="default";ot.h.isFeatureEnabled()&&(J="auto_collected",this.sendRewardClaimedEvent(X.reward.rewardId).then((()=>this.onQuestRewardAutoCollected.dispatch(X))).catch(Q.RQr.createHandler(`Failed to claim battle pass reward ${X.reward.rewardId}`))),lt.Y.track("Player Progression Points Earned",{point_type:"treasure_points",point_count:Z,instance_type:dt.N.BattlePass,instance_id:K.getSeasonName(),transaction_id:et.battlePass.goalCompleteTransactionId,claim_type:J})})),J.forEach((q=>{var K,z,Q,X,Z,J,tt;const it=null===(Q=null===(z=null===(K=q.taskDefinition.preconditions)||void 0===K?void 0:K.find((q=>q.type===st.n.DATE_BEFORE)))||void 0===z?void 0:z.data)||void 0===Q?void 0:Q.date,nt=Y.get(q.taskID),at=null!==(Z=null===(X=null==nt?void 0:nt.taskProgress.data)||void 0===X?void 0:X.progress)&&void 0!==Z?Z:0;at!==(null===(J=q.taskProgress.data)||void 0===J?void 0:J.progress)&&et.battlePass.sendQuestGoalUpdatedEvent(q,(null===(tt=q.taskProgress.data)||void 0===tt?void 0:tt.progress)-at,it)}))}sendRewardClaimedEvent(q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K=1){yield this.sendQuestEvent(et.T.BUTTON_CLICK,{id:q,progressToAdd:K})}))}sendFtueViewedEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=(yield this.getCurrentBattlePassData()).getFtueTask();q&&!q.isCompleted&&(yield this.sendQuestEvent(et.T.BUTTON_CLICK,{id:q.buttonId}))}))}sendGainPetXpEvent(q){return(0,Y.sH)(this,void 0,void 0,(function*(){q<=0||(yield this.sendQuestEvent(et.T.GAIN_PET_XP,{progressToAdd:q}))}))}rollOverCompletedQuests(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.getCurrentBattlePassData();if(null===q)return;const K=[];for(const z of this._currentBattlePass.getQuests())z.isExpired&&z.reward.claimable&&K.push(z.claimTaskId);if(K.length>0){const z=yield this._networkHandler.completeExpiredClaimQuests(q.getQuestID(),K);yield this.processQuestProgressResponse(z),yield this.updateBattlePassData()}}))}getBattlePassXpData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K;const z=null!=q?q:null===(K=yield this.getCurrentBattlePassData())||void 0===K?void 0:K.getQuestID();if(z)return this._currentBattlePassXp||(this._currentBattlePassXp=(yield this._networkHandler.getBattlePassXpData(z)).data),this._currentBattlePassXp}))}completeRootTask(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.getCurrentBattlePassData();if(null===q)return;const K=q.getTasks().find((q=>"root"===q.taskID));K&&(yield this.sendQuestEvent(K.type,Object.assign({},K.taskDefinition.completionRequirements.data)))}))}claimAllUnclaimedQuests(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.getCurrentBattlePassData();null!==q&&q.getCompletedUnclaimedQuests().forEach((q=>{this.sendRewardClaimedEvent(q.reward.rewardId).catch(Q.RQr.createHandler(`Failed to claim battle pass reward ${q.reward.rewardId}`))}))}))}getCurrentQuestID(){if(this._currentBattlePass)return this._currentBattlePass.getQuestID()}sendHudButtonData(){this.getCurrentBattlePassData().then((q=>{if(!Q.Aq$.isDefined(q))return;const K=this._currentBattlePass.getNumUnclaimedRewards()+this._currentBattlePass.getUnclaimedQuestCount();if(this._hudService.updateNotificationBadge(Z.ts.TreasureTrack,K),K>0){const q=ct.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);this._hudService.updateCachedLabelData(Z.ts.TreasureTrack,{labelValue:q.getText("PLUS_ULTRA_BONUS_COLLECT")})}else{const K=ct.q.instance.prodigy.gameContainer.get("0f2-d6bd"),z=q.getEndDate()-K.getServerTimeMs();this._hudService.updateCachedLabelData(Z.ts.TreasureTrack,{labelValue:z})}})).catch(Q.RQr.createHandler("BattlePassQuestManager: Could not send hud button data."))}buildBattlePassPetIdsCache(){const q=this._currentBattlePass;if(!q)return void(this._battlePassPetIds=new Set);const K=new Set;q.getMythicalEpicPetIds().forEach((q=>K.add(q))),q.getBattlePassChasePets().forEach((q=>K.add(q))),this._battlePassPetIds=K}isPetBattlePassReward(q){return null===this._battlePassPetIds&&this.buildBattlePassPetIdsCache(),this._battlePassPetIds.has(q)}reenter(){this.setupBonusQuestRollover(),this.setupSeasonRollover()}}(0,Y.Cg)([(0,ut.b)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],Et.prototype,"_localizer",void 0),(0,Y.Cg)([(0,ut.b)("63c-09a2"),(0,Y.Sn)("design:type",vt.k)],Et.prototype,"_networkHandler",void 0),(0,Y.Cg)([(0,ut.b)("0f2-d6bd"),(0,Y.Sn)("design:type",bt.V)],Et.prototype,"_timeManager",void 0),(0,Y.Cg)([(0,ut.b)("959-82c1"),(0,Y.Sn)("design:type",ht.W)],Et.prototype,"_hudService",void 0)},60031:(q,K,z)=>{"use strict";z.d(K,{k:()=>ft});var Y,Q,X=z(8674),Z=z(62459),J=z(79687);!function(q){q.SinglePetChasePrize="SinglePetChasePrize"}(Y||(Y={})),function(q){q.STANDARD_TRACK_QUEST_TAG="standard-quest-track",q.ULTIMATE_TRACK_QUEST_TAG="ultimate-quest-track"}(Q||(Q={}));var tt=z(98938),et=z(35120),it=z(34829),st=z(96810),nt=z(13956),at=z(68152);const rt=Math.pow(2,31)-1;function ot(){let q;return function K(z,Y){(0,at.v)(Z.Aq$.isDefined(z),"Timeout expects a non-nullish endTime."),(0,at.v)("number"==typeof z||z instanceof Date,"Timeout expects a Date object or a number. Received: "+typeof z),clearTimeout(q);const Q=Date.now();let X="number"==typeof z?z:z.getTime()-Q;(0,at.v)(X>0,"Timeout expects a positive duration.");let J=0;X>rt&&(J=X-rt,X=rt),q=setTimeout((()=>{clearTimeout(q),J>0?K(J,Y):null==Y||Y()}),X)}}var ht=z(69698),ct=z(79368),dt=z(58776),lt=z(89067),ut=z(40579);let ft=class extends ct.k{constructor(){super(...arguments),this._ultimateTimer=ot(),this._standardTimer=ot(),this.onDataChanged=new Z.HN0,this.onTimeUpdated=new Z.HN0,this._tags=[tt.t.DailyLoginCalendar]}setup(){return(0,X.sH)(this,void 0,void 0,(function*(){this.sendHudButtonData().catch(Z.RQr.createHandler("DailyLoginCalendarQuestManager: Failed to send HUD button data."))}))}sendQuestEvent(q,K,z){const Y=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,X.sH)(this,void 0,void 0,(function*(){var z;const X=yield this.getActiveQuestId(Q.STANDARD_TRACK_QUEST_TAG),J=yield this.getActiveQuestId(Q.ULTIMATE_TRACK_QUEST_TAG);if(!Z.Aq$.isDefined(X)||!Z.Aq$.isDefined(J))return Z.VyI.log("Daily Login Calendar did not have an active Standard and Ultimates track",Z.$bb.Error),{activeQuests:[],inactiveQuests:[]};const tt=yield Y.sendQuestEvent.call(this,q,K,[X,J]),et=tt.activeQuests.find((q=>q.id===X));return this.sendQuestProgressUpdateEvent(yield this.getActiveStandardTrack(),null!==(z=null==et?void 0:et.tasks)&&void 0!==z?z:[]),this.onDataChanged.dispatch(),tt}))}sendQuestProgressUpdateEvent(q,K){var z,Y;if(0===K.length)return;const Q=(null!==(Y=null===(z=K[K.length-1].data)||void 0===z?void 0:z.timesCompleted)&&void 0!==Y?Y:0)>0?K.length:K.length-1,X=Q+2,Z="daily_login_calendar",J="feature";let tt=st.l.DailyLoginCalendarNthReward;1===Q?(tt=st.l.DailyLoginCalendarFirstReward,this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:Z,funnelType:J,stepName:st.l.DailyLoginCalendarAssigned},{step_index:1}),this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:Z,funnelType:J,stepName:st.l.DailyLoginCalendarViewed},{step_index:2})):Q===q.length-1?tt=st.l.DailyLoginCalendarComplete:Q===q.length&&(tt=st.l.DailyLoginCalendarLoopingReward),this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:Z,funnelType:J,stepName:tt},{step_index:X},!0)}getActiveStandardTrack(){return(0,X.sH)(this,void 0,void 0,(function*(){return this.getActiveQuestTrack(Q.STANDARD_TRACK_QUEST_TAG)}))}getActiveUltimateTrack(){return(0,X.sH)(this,void 0,void 0,(function*(){return this.getActiveQuestTrack(Q.ULTIMATE_TRACK_QUEST_TAG)}))}getActiveQuestTrack(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=yield this.getActiveQuestId(q);return Z.Aq$.isDefined(K)?this.getQuestTasks(K):[]}))}getActiveStandardTrackMetadata(){return(0,X.sH)(this,void 0,void 0,(function*(){const q=yield this.getActiveQuestTrackMetadata(Q.STANDARD_TRACK_QUEST_TAG);return this.updateToNewEventTimer(q.endDate,this._standardTimer),q}))}getActiveUltimateTrackMetadata(){return(0,X.sH)(this,void 0,void 0,(function*(){const q=yield this.getActiveQuestTrackMetadata(Q.ULTIMATE_TRACK_QUEST_TAG);return this.updateToNewEventTimer(q.endDate,this._ultimateTimer),q}))}updateToNewEventTimer(q,K){K(this.getDurationUntilCron(q),(()=>{this.forceUpdate()}))}forceUpdate(){this.clearQuestID(),this.forceEnableDataUpdate(),this.onDataChanged.dispatch()}getDurationUntilCron(q){let K=Math.max(q-this._timeManager.getServerTimeMs(),0);return K+=it.A.MINUTES_IN_MS,K+=3*it.A.SECONDS_IN_MS,K}getActiveQuestTrackMetadata(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=yield this.getActiveQuestId(q);return Z.Aq$.isDefined(K)?yield this.getQuestMetaData(K):{uuid:"",startDate:Date.now()-2*it.A.DAY_IN_MS,endDate:Date.now()-it.A.DAY_IN_MS}}))}getActiveQuestId(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=yield this.getAllActiveQuestIDs([q]);if(K.length<1)return void Z.VyI.log("No active quests found for Daily Login Calendar",Z.$bb.Error);const z=this.getCachedQuestIdByTag(q);if(Z.Aq$.isDefined(z))return z;const Y=this._timeManager.getServerTimeMs();for(const Q of K){const K=yield this.getQuestMetaData(Q);if(new Date(K.startDate).getTime()q.taskProgress.status===dt.t.IN_PROGRESS)),Q=(yield this.getActiveStandardTrackMetadata()).endDate,X=Math.min(null!==(K=null===(q=null==Y?void 0:Y.taskProgress.data)||void 0===q?void 0:q.progress)&&void 0!==K?K:Q,Q);return{targetDate:X,calendarIsEnding:X===Q,calendarEnded:z>=Q}}))}sendHudButtonData(){return(0,X.sH)(this,void 0,void 0,(function*(){const q=(yield this.getTimerData()).targetDate-et.q.instance.prodigy.gameContainer.get("0f2-d6bd").getServerTimeMs();this._hudService.updateCachedLabelData(lt.ts.LoginRewards,{labelValue:q})}))}};(0,X.Cg)([(0,nt.b)("0f2-d6bd"),(0,X.Sn)("design:type",ht.V)],ft.prototype,"_timeManager",void 0),(0,X.Cg)([(0,nt.b)("959-82c1"),(0,X.Sn)("design:type",ut.W)],ft.prototype,"_hudService",void 0),ft=(0,X.Cg)([(0,J.injectable)()],ft)},55080:(q,K,z)=>{"use strict";z.d(K,{s:()=>Ot});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(99625),tt=z(10471),et=z(34656),it=z(64270),st=z(89067),nt=z(98938),at=z(58776),rt=z(8394),ot=z(65240);!function(q){q.Bundle="bundle"}(Y||(Y={}));var ht=z(66582),ct=z(88131),dt=z(35120),lt=z(91620),ut=z(40579),ft=z(77938),bt=z(73797),pt=z(46784),vt=z(65050),gt=z(41674),mt=z(90744),yt=z(13956),_t=z(21097),Et=z(53661),wt=z(10711),Tt=z(55328),St=z(64868),At=z(43754),Ct=z(79368);class Ot extends Ct.k{constructor(){super(...arguments),this._tags=[nt.t.DynamicStore],this._defeatedPetOffers=[],this.onDefeatedPetOffersUpdated=new X.HN0,this.onStoreOffersUpdated=new X.HN0,this._nextStoreExpiryCache=-1,this._pendingOfferTriggers=[],this._triggeredOffersThisSession=[]}setup(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.updateDefeatedPetOffers().catch(X.RQr.createHandler("Could not get defeated pet offers.")),this.sendHudButtonData().catch(X.RQr.createHandler("DynamicStoreQuestManager: Could not send HUD button data."));dt.q.instance.prodigy.gameContainer.get("bec-9045").onChange.add(this.questProgressCallback,this),this.preloadQuestProgress().catch(X.RQr.createHandler("Error preloading quest progress for dynamic store"))}))}cleanup(){this.onStoreOffersUpdated.dispose(),this.onDefeatedPetOffersUpdated.dispose(),super.cleanup()}getDefeatedPetOffers(){return this._defeatedPetOffers}getResetTime(){return this._resetTime}updateDefeatedPetOffers(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;this.forceEnableDataUpdate();const K=(yield this.getStoreOffers(it.GA.PetShop)).expect().sections.find((({id:q})=>q===it.Xx.DefeatedPets));if(!(null==K?void 0:K.expiresAt))return X.VyI.log("Could not find a valid Defeated Pets section in store, returning empty set",X.$bb.Error,K),{defeatedPetOffers:[],resetTime:new Date};this._resetTime=new Date(K.expiresAt),this._defeatedPetOffers=K.offers;const z={resetTime:this._resetTime,defeatedPetOffers:K.offers};return null===(q=this.onDefeatedPetOffersUpdated)||void 0===q||q.dispatch(z),this.sendHudButtonData().catch(X.RQr.createHandler("DynamicStoreQuestManager: Could not send HUD button data.")),z}))}getStoreOffers(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._networkHandler.getStoreOffers(q)}))}getNextOfferExpiry(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(-1===this._nextStoreExpiryCache&&(this._nextStoreExpiryCache=yield this._networkHandler.getNextSectionExpiry()),this._segmentedOffers.userCanReceiveSegmentedOffers()){const q=yield this._segmentedOffers.getActiveOfferAsync();if(X.Aq$.isDefined(q)){const K=new Date(q.endDate).getTime();return Math.min(this._nextStoreExpiryCache,K)}}return this._nextStoreExpiryCache}))}purchaseItem(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;dt.q.instance.game.broadcaster.broadcast(bt.zg.PurchaseStarted);const{offer:z,storeKey:Q,storeCategory:X,categoryId:Z,itemSegmentData:J}=Object.assign({},q);yield this.preloadQuestProgress();const tt=(0,wt.uA)(z,((q,K)=>{var z;return null===(z=ft.t.getItem(q,K))||void 0===z?void 0:z.data})),it=et.j.getItemRewards(z.task),st=it[0],nt=it.length>1,at=(0,rt.p)(null!==(K=tt.type)&&void 0!==K?K:"currency",tt.currency),ht=this._segment.quests.beginQuestEventTransaction(),ct=this._segment.shop.getDynamicStoreSourceId(Q),lt=this._segment.shop.startDynamicStoreTransaction(ct),ut="string"==typeof q.itemSegmentData.instance_id?q.itemSegmentData.instance_id:this._segment.featureCommon.getCurrentInterfaceID(pt.B.UnifiedStore),gt=nt?{bundleName:z.task.metadata.displayName}:void 0,mt=this.validateOfferPurchase(z);if(!mt.isSuccess())throw this.broadcastPurchaseFailed(mt.error),this._segment.shop.sendDynamicStorePurchaseFailedEvent({storeKey:Q,itemType:nt?Y.Bundle:st.type,itemId:nt?+z.task.id:st.ID,cost:tt,category:X,categoryId:Z,instanceId:ut,bundleData:gt,failReason:mt.error,funnelId:this._segment.purchase.getFunnelID()}),new Error(`Error purchasing item: ${mt.error}`);this._lastTransactionStoreName=Q;const yt=yield this._networkHandler.purchaseItem(z.task.id,lt);if(!yt.activeQuests.find((q=>q.id===Ot.STORE_QUEST_ID)))throw ht.flush({}),this.broadcastPurchaseFailed(_t.WE.ServerPurchaseFailed),new Error("Error purchasing item. Cloudscript item purchase did not go through");return at||(yield this._paymentManager.spend(tt,"dynamicStore",Object.assign(Object.assign({},J),{transaction_id:lt,instance_type:vt.N.ShopVisit,instance_id:ut,sink_id:ct,sink_type:ot.C.Shop,sink_name:Q}))),this.forceEnableDataUpdate(),yield this.processQuestProgressResponse(yt,{customSegmentData:{instance_type:vt.N.ShopVisit,interface_name:pt.B.UnifiedStore,transaction_id:lt,instance_id:ut,source_name:Q}}),ht.flush(Object.assign(Object.assign({},J),{transaction_id:lt,instance_type:vt.N.ShopVisit,instance_id:ut,source_id:ct,source_type:ot.C.Shop,source_name:Q,sink_id:ct,sink_type:ot.C.Shop,sink_name:Q})),this._segment.shop.sendDynamicStorePurchaseCompletedEvent({storeKey:Q,itemType:nt?Y.Bundle:st.type,itemId:nt?+z.task.id:st.ID,cost:tt,category:X,categoryId:Z,instanceId:ut,bundleData:gt}),dt.q.instance.prodigy.game.broadcaster.broadcast(bt.zg.PurchaseSuccessful),!0}))}sendHudButtonData(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=(yield this.getNextOfferExpiry())-dt.q.instance.prodigy.gameContainer.get("0f2-d6bd").getServerTimeMs();this._hudService.updateCachedLabelData(st.ts.Shop,{labelValue:q});const K=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=this.getDefeatedPetOffers();let Y=0;if(X.Aq$.isDefined(K.data.dynamicStore)){let q=0;for(const Y of z)K.data.dynamicStore.seenOffers[Y.task.id]&&++q;Y=z.length-q}else Y=z.length;this._hudService.updateNotificationBadge(st.ts.Shop,Y)}))}getLastTransactionStore(){return this._lastTransactionStoreName}questProgressCallback(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(X.Aq$.isDefined(q.progressResponses))for(const K of q.progressResponses)yield this.processQuestProgressResponse(K)}))}validateOfferPurchase(q){var K,z;if((null!==(K=q.expiresAt)&&void 0!==K?K:1/0)<=dt.q.instance.prodigy.timeManager.getLocalTimeMs())return ct.Q.error(_t.WE.OfferExpired);const Y=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=(0,wt.uA)(q,((q,K)=>{var z;return null===(z=ft.t.getItem(q,K))||void 0===z?void 0:z.data})),X=et.j.getItemRewards(q.task);if((0,wt.H9)(X)&&Y.getMemberTier()===ht._$.NonMember)return ct.Q.error(_t.WE.MemberLocked);if((0,wt.$U)(X,Y.getLevel()))return ct.Q.error(_t.WE.LevelLocked);if(!this._paymentManager.canAfford(Q)){const q=(0,rt.p)(null!==(z=Q.type)&&void 0!==z?z:"currency",Q.currency);return ct.Q.error(q?_t.WE.NotEnoughCurrency:_t.WE.NotEnoughUnsecureCurrency)}return ct.Q.success(!0)}broadcastPurchaseFailed(q){dt.q.instance.game.broadcaster.broadcast(bt.zg.PurchaseFailed,void 0,[q])}queueStoreOfferTrigger(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=!1){if(this._triggeredOffersThisSession.includes(q)||!St._.areBundlesEnabled())return;const z=(yield this.getTasksInProgress()).find((K=>K.taskID===q));if(X.Aq$.isDefined(z)){const q=z.taskDefinition;this._pendingOfferTriggers.push({questId:Ot.STORE_QUEST_ID,task:q,progress:{id:q.id,status:at.t.IN_PROGRESS}}),K&&(yield this.triggerCurrentOffer())}}))}canTriggerOffer(){return St._.isFeatureEnabled()&&this._pendingOfferTriggers.length>0}triggerCurrentOffer(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._pendingOfferTriggers.shift();if(!X.Aq$.isDefined(q))return;const K=(0,wt.K8)([q])[0],z=K.dynamicStoreData.isNew,Y=K.additionalItems.map((q=>({[Et.AP.ItemCardData]:{item:ft.t.getItem(q.type,q.ID),quantity:q.N},[Et.AP.ItemCardIsNew]:z}))),Q=(0,rt.p)("currency",K.currencyID)&&tt.h.includes(K.currencyID)&&this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(K.currencyAmount),Z=`bundle_${K.dynamicStoreData.offers[0].task.id}`,et={DYNAMIC_STORE_BUNDLE_OFFER_TITLE:K.dynamicStoreData.title,DYNAMIC_STORE_BUNDLE_OFFER_SUBTITLE:K.dynamicStoreData.subtitle,DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_DATA:[{PET_ID:K.item.ID}],DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME:K.item.data.name,DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS:Y,DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK:()=>{this._segment.featureCommon.sendButtonEvent({buttonName:Z,interfaceType:gt.Wm.Modal,interfaceName:Z});const K={offer:q,storeKey:it.GA.OfferPopup,storeCategory:q.task.metadata.category,categoryId:q.task.metadata.category,itemSegmentData:{instance_type:vt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(pt.B.StoreBundlesPopup),sink_type:"bundle",sink_id:q.questId}};this.purchaseItem(K).catch(X.RQr.createHandler("Error purchasing triggered bundle"))},DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT:K.currencyAmount,DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY:K.currencyID,DYNAMIC_STORE_BUNDLE_IS_NEW:z,DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED:Q};this._triggeredOffersThisSession.push(q.task.id),yield new Promise((q=>{dt.q.instance.prodigy.open.prefabMenu(J.l.StoreBundlePopup,q,void 0,void 0,void 0,Object.assign(Object.assign({},et),{BUNDLE_POPUP_INTERFACE_NAME:Z}))}))}))}getCurrentQuestID(){return Ot.OFFER_TRIGGER_QUEST_ID}}Ot.STORE_QUEST_ID="DynamicStoreItems",Ot.OFFER_TRIGGER_QUEST_ID="DynamicStoreOfferTriggers",(0,Q.Cg)([(0,Z.inject)("ec3-31a0"),(0,Q.Sn)("design:type",mt.E)],Ot.prototype,"_paymentManager",void 0),(0,Q.Cg)([(0,Z.inject)("73c-5410"),(0,Q.Sn)("design:type",Tt.v)],Ot.prototype,"_networkHandler",void 0),(0,Q.Cg)([(0,Z.inject)("c21-1a3f"),(0,Q.Sn)("design:type",lt.D)],Ot.prototype,"_segmentedOffers",void 0),(0,Q.Cg)([(0,yt.b)("959-82c1"),(0,Q.Sn)("design:type",ut.W)],Ot.prototype,"_hudService",void 0),(0,Q.Cg)([(0,yt.b)("bec-c6b4"),(0,Q.Sn)("design:type",At.W)],Ot.prototype,"_hardCurrencyDataProvider",void 0)},53037:(q,K,z)=>{"use strict";z.d(K,{q:()=>Ot});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z.n(Z),tt=z(51540),et=z(57797),it=z(98938),st=z(58776),nt=z(24522),at=z(61468),rt=z(35120),ot=z(13956),ht=z(69698),ct=z(15821);class dt{constructor(q){this._experimentFeatureTaskIds=[],this._questId=q.questId,this._metaData=q.metadata,this._progressTasks=q.allTasks,this._questStates=q.states,this._videoAssets=q.videos,this._seenCompletedTasks=q.seenCompletedTasks,this.dataVersion=q.dataVersion}parseTaskData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;const Y=[],Q=[];for(let X=0;X{var K,z;return q.taskProgress.status===st.t.COMPLETE||(null!==(z=null===(K=q.taskProgress.data)||void 0===K?void 0:K.progress)&&void 0!==z?z:0)>0}))}getQuestById(q){return this._progressTasks.find((K=>K.taskID===q))}getUnclaimedQuestCount(q,K=!0){let z=0,Y=0,Q=0,X=0,Z=0,J=0;return this._progressTasks.filter((K=>{var z;return!q||(null===(z=K.taskDefinition.metadata)||void 0===z?void 0:z.questGoalType)===q})).forEach((q=>{var tt,et,it;if(q.taskProgress.status!==st.t.COMPLETE)return;if(!K&&q.getTimeUntilExpiry()<0)return;const nt=this._claimTasks.find((K=>K.taskID===`${q.taskID}-${Ot.FESTIVAL_CLAIM_STRING}`));nt&&(null==nt?void 0:nt.taskProgress.status)!==st.t.COMPLETE&&!(null===(tt=null==nt?void 0:nt.taskProgress.data)||void 0===tt?void 0:tt.timesCompleted)&&(z++,(null===(et=q.taskDefinition.metadata)||void 0===et?void 0:et.isMemberLocked)?Y++:Q++,this._seenCompletedTasks.taskIds.includes(q.taskID)||(X++,(null===(it=q.taskDefinition.metadata)||void 0===it?void 0:it.isMemberLocked)?Z++:J++))})),{unclaimedQuestCount:z,unclaimedMemberCount:Y,unclaimedNonMemberCount:Q,unseenQuestCount:X,unseenMemberCount:Z,unseenNonMemberCount:J}}getVideoAsset(q){var K;const z=null===(K=this._metaData.videoTypes)||void 0===K?void 0:K[q];if(ct.A.isDefined(z))return this._videoAssets[z]}updateSeenCompletedTasks(q,K){this._seenCompletedTasks=class{static updateSeenCompletedTasks(q,K,z){var Y;const Q=[];if(ct.A.isDefined(q)&&K===q.festivalId)for(const X of null!==(Y=q.taskIds)&&void 0!==Y?Y:[])Q.includes(X)||Q.push(X);for(const X of null!=z?z:[])Q.includes(X)||Q.push(X);return{festivalId:K,taskIds:Q}}}.updateSeenCompletedTasks(this._seenCompletedTasks,q,K)}}var lt,ut=z(79368),ft=z(89067),bt=z(40579),pt=z(7351),vt=z(77938),gt=z(65240),mt=z(19586),yt=z(65068),_t=z(92240),Et=z(73797),wt=z(94310),Tt=z(56567),St=z(76277),At=z(71698),Ct=z(3374);let Ot=lt=class extends ut.k{constructor(){super(...arguments),this.objectiveTypes=[yt.q.QuestState],this._tags=[it.t.Festival],this._latestDataVersion=0,this._lastProcessedVersion=0,this._getDataQueue=[],this.onDataChanged=new Q.HN0,this.onSlowServerRequest=new Q.HN0,this.onAllSlowServerRequestsCompleted=new Q.HN0,this._currentSlowRequestCount=0,this._lastQuestEventTime=0,this._timeouts={},this._slowRequests={},this._requestCount=0}setup(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.onDataChanged.add((()=>{this.sendHudButtonData()})),rt.q.instance.game.broadcaster.addAppListener(Et.H3.MembershipResponseReceived,(()=>{this.sendHudButtonData()}),this),this.completePastFestivals(),yield this.getCurrentFestivalQuestData().catch(Q.RQr.createHandler("Error getting quests for festival")),this.completeRootTask().catch(Q.RQr.createHandler("Error completing root task for festival quests"));const q=rt.q.instance.prodigy.gameContainer.get("bec-9045");this._festivalQuestEventHandler=q,this._festivalQuestEventHandler.onChange.add(this.questProgressCallback,this)}))}cleanup(){this.onDataChanged.dispose(),this.onSlowServerRequest.dispose(),this.onAllSlowServerRequestsCompleted.dispose(),this._festivalQuestEventHandler.onChange.remove(this.questProgressCallback,this),super.cleanup()}reenter(){this._currentFestivalQuests=void 0,this._getProgressPromise=void 0}getTasksInProgress(q,K,z){const Q=Object.create(null,{getTasksInProgress:{get:()=>super.getTasksInProgress}});return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=this.getCurrentQuestID()?[this.getCurrentQuestID()]:K;return Q.getTasksInProgress.call(this,q,Y,z)}))}getCurrentFestivalQuestData(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;if(void 0===this._currentFestivalQuests&&(yield this.updateFestivalQuestData()),null===this._currentFestivalQuests)return null;const K=this._latestDataVersion!==(null===(q=this._currentFestivalQuests)||void 0===q?void 0:q.dataVersion),z=this._getDataQueue.length>0;return(K||z)&&(yield new Promise((q=>this._getDataQueue.push(q)))),this._currentFestivalQuests}))}getCachedFestivalQuestData(){return this._currentFestivalQuests}completePastFestivals(){this._networkHandler.completePastFestivals().then((q=>{var K;if(!q)return;const z=rt.q.instance.prodigy.gameContainer.get("20f-5f67");null===(K=q.updatedFestivals)||void 0===K||K.forEach((q=>{var K,Y;if(!q.metadata.festivalCurrencyId)return;const Q=vt.t.getItem("currency",q.metadata.festivalCurrencyId),X=null!==(Y=null===(K=this._activePlayer.backpack.getItem(Q.type,Q.ID))||void 0===K?void 0:K.N)&&void 0!==Y?Y:0;this._activePlayer.backpack.consume("currency",q.metadata.festivalCurrencyId,9999999),z.item.sendItemRemovedEvent(Q.ID,Q.name,Q.type,X,{sink_type:gt.C.FestivalCurrencyConversion,sink_id:Q.ID,source_type:gt.C.FestivalCurrencyConversion,instance_type:q.id,instance_id:q.id})})),q.updatedFestivals.length>0&&this._activePlayer.forceSaveCharacter()})).catch(Q.RQr.createHandler("Error completing past festivals"))}updateFestivalQuestData(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,X;this._latestDataVersion++;const Z=this._latestDataVersion;let J=null;const tt=(0,St.G)(At.o);if(!tt.enabled)return this._currentFestivalQuests=null,void this.dispatchAndClearQueue();{const Q=yield this.getAllActiveQuestIDs(),X=this._timeManager.getServerTimeMs();for(const Z of Q){const Q=yield this.getQuestMetaData(Z),et=null!==(K=null===(q=null==tt?void 0:tt.startDates)||void 0===q?void 0:q[Z])&&void 0!==K?K:new Date(Q.startDate).getTime(),it=null!==(Y=null===(z=null==tt?void 0:tt.endDates)||void 0===z?void 0:z[Z])&&void 0!==Y?Y:new Date(Q.endDate).getTime();if(et{Z===this._latestDataVersion&&(this._currentFestivalQuests=rt,this.dispatchAndClearQueue())}),0))}))}dispatchAndClearQueue(){var q;for(this.onDataChanged.dispatch();this._getDataQueue.length>0;)null===(q=this._getDataQueue.shift())||void 0===q||q.call(null)}shouldSendQuestEvents(q,K,z){const Q=Object.create(null,{shouldSendQuestEvents:{get:()=>super.shouldSendQuestEvents}});return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.isFestivalLocked())?[]:Q.shouldSendQuestEvents.call(this,q,K,z)}))}preSendQuestEventViaHub(q,K){const z=Object.create(null,{preSendQuestEventViaHub:{get:()=>super.preSendQuestEventViaHub}});return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this.getCurrentQuestID())return{manager:this,questIDs:[],tags:[]};if(yield this.isFestivalLocked())return{manager:this,questIDs:[],tags:[]};const Y=yield this.festivalPreSendQuestEvent(),Q=yield z.preSendQuestEventViaHub.call(this,q,K);return Object.assign(Object.assign({},Q),{requestID:Y})}))}festivalPreSendQuestEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._lastQuestEventTime=Date.now(),this._requestCount+=1;const q=this._requestCount;return this._slowRequests[q]=!1,this._timeouts[q]=window.setTimeout((()=>{this._slowRequests[q]=!0,this._currentSlowRequestCount++,Date.now()>=this._lastQuestEventTime+1500&&this.onSlowServerRequest.dispatch()}),1500),q}))}sendQuestEvent(q,K,z){const Q=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z;const Y=null!==(z=this._currentFestivalQuests)&&void 0!==z?z:yield this.getCurrentFestivalQuestData(),X=null==Y?void 0:Y.getQuestID();if(!X)return{activeQuests:[],inactiveQuests:[]};const Z=yield this.festivalPreSendQuestEvent(),J=yield Q.sendQuestEvent.call(this,q,K,[X]);return yield this.festivalPostSendQuestEvent(J,Z),J}))}postSendQuestEventViaHub(q,K){const z=Object.create(null,{postSendQuestEventViaHub:{get:()=>super.postSendQuestEventViaHub}});return(0,Y.sH)(this,void 0,void 0,(function*(){(yield this.isFestivalLocked())||(this._currentFestivalQuests||(yield this.getCurrentFestivalQuestData()))&&(yield z.postSendQuestEventViaHub.call(this,q),yield this.festivalPostSendQuestEvent(q,K))}))}festivalPostSendQuestEvent(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z;if(q&&q.activeQuests.length>0){const q=null!==(z=this._currentFestivalQuests)&&void 0!==z?z:yield this.getCurrentFestivalQuestData();yield this.updateQuestDataAndProcessDifferences(q)}K&&(this._timeouts[K]&&(window.clearTimeout(this._timeouts[K]),delete this._timeouts[K]),void 0!==this._slowRequests[K]&&(this._slowRequests[K]&&(this._currentSlowRequestCount--,0===this._currentSlowRequestCount&&this.onAllSlowServerRequestsCompleted.dispatch()),delete this._slowRequests[K]))}))}questProgressCallback(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K;if(yield this.isFestivalLocked())return;if(!q.progressResponses)return;for(const Y of q.progressResponses)yield this.processQuestProgressResponse(Y);const z=null!==(K=this._currentFestivalQuests)&&void 0!==K?K:yield this.getCurrentFestivalQuestData();z&&(yield this.updateQuestDataAndProcessDifferences(z))}))}updateQuestDataAndProcessDifferences(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.updateFestivalQuestData();const K=yield this.getCurrentFestivalQuestData();null!==K&&K.dataVersion!==this._lastProcessedVersion&&(this.processQuestProgress(q,K),this._lastProcessedVersion=K.dataVersion)}))}processQuestProgress(q,K){const z=[],Y=[];null==q||q.getProgressTasks().forEach((q=>{q.taskProgress.status===st.t.COMPLETE?z.push(q.taskID):q.taskProgress.status===st.t.IN_PROGRESS&&Y.push(q)}));const X=[],Z=[];null==K||K.getProgressTasks().forEach((q=>{q.taskProgress.status===st.t.COMPLETE?X.push(q.taskID):q.taskProgress.status===st.t.IN_PROGRESS&&Z.push(q)})),z.forEach((q=>{const K=this._currentFestivalQuests.getClaimTasks().find((K=>K.taskID===`${q}-${lt.FESTIVAL_CLAIM_STRING}`));if(K&&K.taskProgress.status!==st.t.COMPLETE){rt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.viewedProgressMenu=!1}}));const J=rt.q.instance.prodigy.gameContainer.get("20f-5f67"),tt=at.l.getAddedItems(z,X);tt.forEach((q=>{var z;const Y=null==K?void 0:K.getTasks().find((K=>K.taskID===q));if(Y&&(J.festival.sendQuestGoalCompleteEvent(Y),this.canSendToaster(Y)&&rt.q.instance.prodigy.notifications.initGenericNotification(mt._.FESTIVALQUESTGOALCOMPLETED)),(null===(z=null==Y?void 0:Y.taskDefinition.metadata)||void 0===z?void 0:z.questGoalType)===et.xK.Story&&Y.taskDefinition.metadata.storyMetadata){let q=Y.taskDefinition.metadata.storyMetadata.segmentFunnelStepName;q||(q=Y.taskID),J.festival.sendFestivalFunnelAdvancedEvent(q)}}));const it=[...tt];Z.forEach((q=>{var K,z,Q,X,Z,tt,et,st;let at=null===(Q=null===(z=null===(K=q.taskDefinition.preconditions)||void 0===K?void 0:K.find((q=>q.type===nt.n.DATE_BEFORE)))||void 0===z?void 0:z.data)||void 0===Q?void 0:Q.date;at||(at=new Date(this._currentFestivalQuests.getEndDate()).toISOString());const rt=Y.find((K=>K.taskID===q.taskID)),ot=null!==(Z=null===(X=null==rt?void 0:rt.taskProgress.data)||void 0===X?void 0:X.progress)&&void 0!==Z?Z:0;ot!==(null===(tt=q.taskProgress.data)||void 0===tt?void 0:tt.progress)&&(J.festival.sendQuestGoalUpdatedEvent(q,(null!==(st=null===(et=q.taskProgress.data)||void 0===et?void 0:et.progress)&&void 0!==st?st:0)-ot,at),it.push(q.taskID))})),this.processMainObjective(it).catch(Q.RQr.createHandler("Error processing Festival main objective"))}sendRewardClaimedEvent(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;const Y=(null!==(z=null===(K=this._currentFestivalQuests)||void 0===K?void 0:K.getClaimTasks())&&void 0!==z?z:[]).find((K=>K.taskID===q));Y?yield this.sendQuestEvent(Y.type,Object.assign({},Y.taskDefinition.completionRequirements.data)):Q.VyI.log(`FestivalQuestManager.sendRewardClaimedEvent: claim task not found for ${q}`,Q.$bb.Error)}))}getClaimTask(q){var K,z;const Y=[],Q=null!==(z=null===(K=this._currentFestivalQuests)||void 0===K?void 0:K.getClaimTasks())&&void 0!==z?z:[];for(let X=0;X"root"===q.taskID));K&&(yield this.sendQuestEvent(K.type,Object.assign({},K.taskDefinition.completionRequirements.data)))}))}getCurrentQuestID(){if(this._currentFestivalQuests)return this._currentFestivalQuests.getQuestID()}getProgressTasks(){var q,K;return null!==(K=null===(q=this._currentFestivalQuests)||void 0===q?void 0:q.getProgressTasks())&&void 0!==K?K:[]}getProgressTaskCount(q){var K,z;return null!==(z=null===(K=this._currentFestivalQuests)||void 0===K?void 0:K.getProgressTasks().filter((K=>{var z;return q&&(null===(z=K.taskDefinition.metadata)||void 0===z?void 0:z.questGoalType)===q&&!K.taskDefinition.metadata.isHiddenQuest&&K.getTimeUntilExpiry()>=0})).length)&&void 0!==z?z:0}getAllProgressTaskCounts(){var q;const K={};return null===(q=this._currentFestivalQuests)||void 0===q||q.getProgressTasks().forEach((q=>{var z,Y;const Q=null===(z=q.taskDefinition.metadata)||void 0===z?void 0:z.questGoalType;Q&&(K[Q]=(null!==(Y=K[Q])&&void 0!==Y?Y:0)+1)})),K}getCompletedTaskCount(q,K,z,Y){let Q=0;return this.getProgressTasks().forEach((X=>{var Z,J,tt,et;if(X.taskProgress.status===st.t.COMPLETE){if("root"===X.taskID||(null===(Z=X.taskDefinition.metadata)||void 0===Z?void 0:Z.isHiddenQuest))return;if(!Y&&X.getTimeUntilExpiry()<0)return;if(q&&(null===(J=X.taskDefinition.metadata)||void 0===J?void 0:J.questGoalType)!==q)return;if(K&&(null===(tt=X.taskDefinition.metadata)||void 0===tt?void 0:tt.questGoalTaskType)!==K)return;if(z){const q=this.getClaimTask(X.taskID);if(q.taskProgress.status!==st.t.COMPLETE&&!(null===(et=q.taskProgress.data)||void 0===et?void 0:et.timesCompleted))return}Q++}})),Q}getStoryTaskCount(){var q,K;return null!==(K=null===(q=this._currentFestivalQuests)||void 0===q?void 0:q.getProgressTasks().filter((q=>{var K;return(null===(K=q.taskDefinition.metadata)||void 0===K?void 0:K.questGoalTaskType)===et.wD.STORY&&!q.taskDefinition.metadata.isHiddenQuest&&q.getTimeUntilExpiry()>=0})).length)&&void 0!==K?K:0}isFestivalTaskCompleted(q){var K,z;return(null===(z=null===(K=this._currentFestivalQuests)||void 0===K?void 0:K.getTasks().find((K=>K.taskDefinition.id===q)))||void 0===z?void 0:z.taskProgress.status)===st.t.COMPLETE}willFestivalTaskComplete(q,K,z){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z,Y=1){var Q,X;let Z;const J=this.getCurrentQuestID();J&&(Z=[J]);const tt=(yield this.getTasksInProgress(this._tags,Z)).find((K=>K.taskDefinition.id===q));return!(!(null==tt?void 0:tt.eventMatchesTask(K,z))||!(null==tt?void 0:tt.taskDefinition.completionRequirements.data.target))&&((null===(Q=tt.taskProgress.data)||void 0===Q?void 0:Q.progress)?tt.taskProgress.status===st.t.IN_PROGRESS&&(null===(X=tt.taskProgress.data)||void 0===X?void 0:X.progress)>=tt.taskDefinition.completionRequirements.data.target-Y:tt.taskDefinition.completionRequirements.data.target-Y<=0)}))}sendHudButtonData(){this.getCurrentFestivalQuestData().then((q=>{if(!ct.A.isDefined(q))return;const{unclaimedQuestCount:K,unclaimedNonMemberCount:z,unseenMemberCount:Y}=q.getUnclaimedQuestCount();if(this._hudService.updateNotificationBadge(ft.ts.Festival,this._activePlayer.hasMembership()?K:z+Y),this._activePlayer.hasMembership()&&K>0||z>0){const q=rt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);this._hudService.updateCachedLabelData(ft.ts.Festival,{labelValue:q.getText("PLUS_ULTRA_BONUS_COLLECT")})}else{const K=rt.q.instance.prodigy.gameContainer.get("0f2-d6bd"),z=q.getEndDate()-K.getServerTimeMs();this._hudService.updateCachedLabelData(ft.ts.Festival,{labelValue:z})}})).catch(Q.RQr.createHandler("FestivalQuestManager: Could not send hud button data."))}canSendToaster(q){var K,z,Y,Q,X;return!0!==(null===(K=q.taskDefinition.metadata)||void 0===K?void 0:K.isHiddenQuest)&&(null===(z=q.taskDefinition.metadata)||void 0===z?void 0:z.questGoalTaskType)!==et.wD.CLAIM&&(null===(Y=q.taskDefinition.metadata)||void 0===Y?void 0:Y.questGoalType)!==et.xK.Story&&(null===(Q=q.taskDefinition.metadata)||void 0===Q?void 0:Q.questGoalType)!==et.xK.Coop&&!0!==(null===(X=q.taskDefinition.metadata)||void 0===X?void 0:X.isExperimentGate)&&"root"!==q.taskDefinition.id}isFestivalInTimeframe(){var q;const K=null===(q=this._currentFestivalQuests)||void 0===q?void 0:q.getMetadata(),z=this._timeManager.getServerTimeMs();return void 0!==K&&new Date(K.startDate).getTime()super.isCutsceneTaskInProgress}});return(0,Y.sH)(this,void 0,void 0,(function*(){return!!this.isFestivalInTimeframe()&&z.isCutsceneTaskInProgress.call(this,q,K)}))}setupValidTasks(q,K){const z=Object.create(null,{setupValidTasks:{get:()=>super.setupValidTasks}});return(0,Y.sH)(this,void 0,void 0,(function*(){if(!(yield this.isFestivalLocked()))return this.isFestivalInTimeframe()?z.setupValidTasks.call(this,q,K):Promise.resolve()}))}markCompletedTasksSeen(q){var K,z,Y;const X=[];for(const Q of this.getProgressTasks())q&&(null===(z=null===(K=Q.taskDefinition)||void 0===K?void 0:K.metadata)||void 0===z?void 0:z.questGoalType)!==q||Q.taskProgress.status===st.t.COMPLETE&&X.push(Q.taskID);const Z=this.getCurrentQuestID();void 0!==Z&&(this._networkHandler.setCompletedTasksSeen(Z,X).catch(Q.RQr.createHandler("Error setting completed festival tasks as seen")),null===(Y=this._currentFestivalQuests)||void 0===Y||Y.updateSeenCompletedTasks(Z,X),this.sendHudButtonData())}processMainObjective(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;if(void 0===this.getCurrentQuestID()||!this._currentFestivalQuests)return;const Y=yield _t.h.calculateStateWithPreconditions(wt.L.MainObjective,this._currentFestivalQuests.getStates(),this._currentFestivalQuests.getTasks().map((q=>q.taskProgress)),new Tt.f);J().isEqual(this._mainObjectiveState,Y)&&!q.includes(null===(z=null===(K=this._mainObjectiveState)||void 0===K?void 0:K.objective)||void 0===z?void 0:z.progressTaskId)||(this._mainObjectiveState=Y,rt.q.instance.game.broadcaster.broadcast(Et.GR.ObjectiveUpdated))}))}getObjectives(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;if(void 0===this.getCurrentQuestID()||!this._currentFestivalQuests)return[];if(yield this.isFestivalLocked())return[];if(this._mainObjectiveState=yield _t.h.calculateStateWithPreconditions(wt.L.MainObjective,this._currentFestivalQuests.getStates(),this._currentFestivalQuests.getTasks().map((q=>q.taskProgress)),new Tt.f),!(null===(q=this._mainObjectiveState)||void 0===q?void 0:q.objective))return[];const X=rt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),Z=null!==(K=this._mainObjectiveState.objective.localizationKey?X.getText(this._mainObjectiveState.objective.localizationKey):this._mainObjectiveState.objective.text)&&void 0!==K?K:"";let J;if(ct.A.isDefined(this._mainObjectiveState.objective.progressTaskId)){const q=yield this.getQuestProgress(this.getCurrentQuestID()),K=null===(z=null==q?void 0:q.tasks)||void 0===z?void 0:z.find((q=>q.id===this._mainObjectiveState.objective.progressTaskId)),Q=this._currentFestivalQuests.getTasks().find((q=>q.taskID===this._mainObjectiveState.objective.progressTaskId));ct.A.isDefined(null===(Y=null==K?void 0:K.data)||void 0===Y?void 0:Y.progress)&&ct.A.isDefined(null==Q?void 0:Q.taskDefinition.completionRequirements.data.target)&&(J={current:K.data.progress,target:Q.taskDefinition.completionRequirements.data.target})}return[{id:this._mainObjectiveState.objective.id,text:Z,type:yt.q.QuestState,location:this._mainObjectiveState.objective.location,guideHand:this._mainObjectiveState.objective.guideHand,progress:J}]}))}};Ot.FESTIVAL_ROOT_TASK_ID="root",Ot.FESTIVAL_CLAIM_STRING="claim",(0,Y.Cg)([(0,ot.b)("f67-1437"),(0,Y.Sn)("design:type",tt.v)],Ot.prototype,"_networkHandler",void 0),(0,Y.Cg)([(0,ot.b)("0f2-d6bd"),(0,Y.Sn)("design:type",ht.V)],Ot.prototype,"_timeManager",void 0),(0,Y.Cg)([(0,ot.b)("782-c308"),(0,Y.Sn)("design:type",pt.W)],Ot.prototype,"_activePlayer",void 0),(0,Y.Cg)([(0,ot.b)("e7b-ae21"),(0,Y.Sn)("design:type",Ct.C)],Ot.prototype,"_videosDataProvider",void 0),(0,Y.Cg)([(0,ot.b)("959-82c1"),(0,Y.Sn)("design:type",bt.W)],Ot.prototype,"_hudService",void 0),Ot=lt=(0,Y.Cg)([(0,X.injectable)()],Ot)},87761:(q,K,z)=>{"use strict";z.d(K,{B:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(79368);class J extends Z.k{constructor(){super(...arguments),this._legacyQuestIdTracker=void 0}processQuestProgressResponse(q){const K=Object.create(null,{processQuestProgressResponse:{get:()=>super.processQuestProgressResponse}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield K.processQuestProgressResponse.call(this,q),this.updateQuestTracker()}))}updateQuestProgress(q){const K=Object.create(null,{updateQuestProgress:{get:()=>super.updateQuestProgress}});return(0,Y.sH)(this,void 0,void 0,(function*(){this._getProgressDirty=!0,yield K.updateQuestProgress.call(this,q)}))}preSendQuestEventViaHub(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z;return(null===(z=X.q.instance.prodigy.world.getCurrentZoneObject())||void 0===z?void 0:z.difficultyMode)===this._difficultyMode&&(yield this.sendQuestEvent(q,K)),{manager:this,questIDs:[],tags:[]}}))}sendQuestEvent(q,K,z){const Q=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,Y.sH)(this,void 0,void 0,(function*(){var Y,X;return null!==(Y=this._legacyQuestIdTracker)&&void 0!==Y||(this._legacyQuestIdTracker=null===(X=this.getZoneObject())||void 0===X?void 0:X.getCurrentQuestID()),Q.sendQuestEvent.call(this,q,K,z)}))}getZoneObject(){const q=X.q.instance.prodigy.world.getZone(this._zoneId);if(Q.Aq$.isDefined(q))return q;Q.VyI.log("No zone found for local zone quest manager",Q.$bb.Warning)}getCurrentQuestIDAndSequence(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;return null===(q=(yield this.getTasksInProgress())[0])||void 0===q?void 0:q.taskID.toString()}))}updateQuestTracker(){const q=this.getZoneObject();if(!q)return;const K=q.getCurrentQuestID();if(Q.Aq$.isDefined(K)&&K!==this._legacyQuestIdTracker){const z=X.q.instance.prodigy.gameContainer.get("20f-5f67");q.allQuestsAreComplete?z.quests.sendZoneQuestlineCompleteEvent(this._zoneId):z.quests.sendZoneQuestStartedEvent(this._zoneId,K),this._legacyQuestIdTracker=K}}}},3606:(q,K,z)=>{"use strict";z.d(K,{n:()=>lt});var Y=z(8674),Q=z(62459),X=z(13027),Z=z(70472);class J extends Z.A{constructor(q,K,z,Y){super(q,K,z),this.awardTask=Y}}var tt=z(98938),et=z(58776),it=z(62886),st=z(35120),nt=z(1195),at=z(3032),rt=z(73797),ot=z(13956),ht=z(30226),ct=z(79368),dt=z(56567);class lt extends ct.k{get awardAvailable(){return this._awardAvailable}get awardsAvailableCount(){return this._awardsAvailableCount}get availableTasks(){return this._availableTasks}get isQuestComplete(){return this._questComplete}get sendQuestEventPromise(){return this._sendQuestEventPromise}constructor(){super(),this._awardAvailable=!1,this.onDataChanged=new Q.HN0,this._awardsAvailableCount=0,this._questComplete=!1,this._tags=[tt.t.PlayerGoals],st.q.instance.game.broadcaster.addAppListener(rt.Ii.Victory,(()=>{this.onVictory().catch(Q.RQr.createHandler("PlayerGoalsQuestManager.onVictory"))}),this,void 0,!0)}sendQuestEvent(q,K,z){const Q=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=yield Q.sendQuestEvent.call(this,q,K,z);return this.onDataChanged.dispatch(null==K?void 0:K.id),Y}))}onVictory(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.isQuestComplete||(yield this.sendQuestEvent(it.T.WIN_ANY_BATTLE,{}))}))}preloadQuestProgress(){const q=Object.create(null,{preloadQuestProgress:{get:()=>super.preloadQuestProgress}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield q.preloadQuestProgress.call(this),yield this.updateFlags()}))}processQuestProgressResponse(q){const K=Object.create(null,{processQuestProgressResponse:{get:()=>super.processQuestProgressResponse}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield K.processQuestProgressResponse.call(this,q),yield this.updateFlags()}))}updateFlags(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.getQuestProgress(lt.PLAYER_GOALS_QUEST_ID);this._questTasks=yield this.getQuestTasks(lt.PLAYER_GOALS_QUEST_ID);const K=yield this.getTasksInProgress([tt.t.PlayerGoals]),z=this.sortByQuestOrder(this._questTasks),Y=yield this.filterByPreconditions(z);if(this._pairedTasks=this.pairTasks(Y),this._surfacedTasks=this.filterCompletedTasks(this._pairedTasks),this._availableTasks=this._pairedTasks.filter((q=>q.taskProgress.status!==et.t.COMPLETE||(null==q?void 0:q.awardTask.taskProgress.status)!==et.t.COMPLETE)),this._questComplete=(null==q?void 0:q.status)===et.t.COMPLETE||0===K.length,this._questComplete)return this._awardAvailable=!1,void(this._awardsAvailableCount=0);const Q=this.filterByAwardTasks(yield this.getTasksInProgress([tt.t.PlayerGoals])),X=[];this.surfacedTasks.forEach((q=>X.push(null==q?void 0:q.awardTask)));const Z=Q.filter((q=>X.some((K=>K.taskID===q.taskID))&&this.shouldAwardAutoSurface(q)));this._awardAvailable=Z.length>0,this._awardsAvailableCount=Z.length}))}get surfacedTasks(){return this._surfacedTasks}get pairedTasks(){return this._pairedTasks}isTaskComplete(q){return(null==q?void 0:q.taskProgress.status)===et.t.COMPLETE}isGoalTask(q){var K;return(null===(K=null==q?void 0:q.taskDefinition.prerequisites)||void 0===K?void 0:K[0])===lt.PLAYER_GOALS_START_QUEST_TASK_ID}isAwardTask(q){var K;const z=null===(K=q.taskDefinition.prerequisites)||void 0===K?void 0:K[0];return Q.Aq$.isDefined(z)&&z!==lt.PLAYER_GOALS_START_QUEST_TASK_ID}isAwardBlocked(q){return!!lt.BLOCK_AWARD_IN_TUTORIAL.includes(q.taskID)&&(this.isAwardTask(q)&&!this._loggedInPlayer.player.hasCompletedTutorial())}shouldAwardAutoSurface(q){return lt.BLOCK_AUTO_SURFACE_BEFORE_TUTORIAL_COMPLETE.includes(q.taskID)?this.isAwardTask(q)&&this._loggedInPlayer.player.hasCompletedTutorial():this.isAwardTask(q)}sortByQuestOrder(q){const K=q.concat(),z=Object.values(X.k);return K.sort(((q,K)=>z.indexOf(q.taskID)-z.indexOf(K.taskID)))}filterByPreconditions(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=q.concat(),z=new dt.f;return ht.J.asyncFilter(K,(q=>(0,Y.sH)(this,void 0,void 0,(function*(){let K=!0;if(!this._loggedInPlayer.areLoginCredentialsValid()&&q.taskID===X.k.ProfileQuiz||!this._loggedInPlayer.areLoginCredentialsValid()&&q.taskID===X.k.ProfileQuizGotItem)return!1;for(const Y of q.taskDefinition.preconditions||[])if(K=yield z.check(Y.type,Y.data),!K)break;return K}))))}))}filterByGoalTasks(q){return q.filter((q=>this.isGoalTask(q)))}filterByAwardTasks(q){return q.filter((q=>this.isAwardTask(q)))}filterCompletedTasks(q,K=4){const z=q.concat();for(;z.length>K&&this.isTaskComplete(z[0].awardTask);)z.shift();return z.length=K,z}pairTasks(q){const K=q.concat(),z=[],Y=this.filterByGoalTasks(K),Q=this.filterByAwardTasks(K);return Y.forEach((q=>{const K=Q.find((K=>{var z;return q.taskID===(null===(z=K.taskDefinition.prerequisites)||void 0===z?void 0:z[0])})),Y=new J(q.questID,q.taskDefinition,q.taskProgress,K);z.push(Y)})),z}getBattleGoal(){switch(this._loggedInPlayer.player.getQuestSystem("playerGoals")){case at.p.PlayerGoalsFtue:return X.k.BattleTwoGotItem;case at.p.PlayerGoalsPostFtue:case at.p.RevisedWithPlayerGoals:case at.p.Revised:case at.p.Legacy:default:return X.k.BattleTwoGotItemB}}getParentAttachGoal(){switch(this._loggedInPlayer.player.getQuestSystem("playerGoals")){case at.p.PlayerGoalsPostFtue:return X.k.ParentAttachB;case at.p.PlayerGoalsFtue:case at.p.RevisedWithPlayerGoals:case at.p.Revised:case at.p.Legacy:default:return X.k.ParentAttach}}hasCompletedBattles(){return this.isTaskComplete(this._pairedTasks.find((q=>q.taskID===this.getBattleGoal()||q.awardTask.taskID===this.getBattleGoal())))}hasAttachedParent(){return this.isTaskComplete(this._pairedTasks.find((q=>q.taskID===this.getParentAttachGoal()||q.awardTask.taskID===this.getParentAttachGoal())))}hasAttachedClassCode(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.isTaskComplete(this._pairedTasks.find((q=>q.taskID===X.k.ClassCode)))}))}isPrizeReady(q){return this.isTaskComplete(q)&&!this.isTaskComplete(q.awardTask)&&!this.isAwardBlocked(q.awardTask)}cleanup(){this.onDataChanged.dispose(),super.cleanup()}}lt.BLOCK_AUTO_SURFACE_BEFORE_TUTORIAL_COMPLETE=[X.k.ParentAttachGotItem,X.k.ParentAttachGotItemB,X.k.PlayAfterHoursGotItem,X.k.ClassCode,X.k.ClassCodeGotItem],lt.BLOCK_AWARD_IN_TUTORIAL=[X.k.PlayAfterHoursGotItem,X.k.ClassCodeGotItem],lt.PLAYER_GOALS_QUEST_ID="FtuePlayerGoalQuests",lt.PLAYER_GOALS_START_QUEST_TASK_ID=1,(0,Y.Cg)([(0,ot.b)("ad2-c5b2"),(0,Y.Sn)("design:type",nt.E)],lt.prototype,"_loggedInPlayer",void 0)},3001:(q,K,z)=>{"use strict";z.d(K,{n:()=>rt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(28628),J=z(98938),tt=z(62886),et=z(60157),it=z(35120),st=z(13956),nt=z(63536),at=z(80434);let rt=class{constructor(){this._questManagerMap=new Map,this.managerSetupPromise=new Promise((q=>{this._onSetupComplete=q}))}get questManagerMap(){return this._questManagerMap}init(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.setup()}))}setup(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=it.q.instance.prodigy.gameContainer;this._questManagerMap.set(J.t.BattlePass,q.get("9a2-c1c3")),this._questManagerMap.set(J.t.Festival,q.get("f03-2b73")),this._questManagerMap.set(J.t.ZoneQuests,q.get("be3-4f64")),this._questManagerMap.set(J.t.DailyLoginCalendar,q.get("f33-d276")),this._questManagerMap.set(J.t.PlayerGoals,q.get("e47-a136")),this._questManagerMap.set(J.t.DynamicStore,q.get("668-8a41")),Object.values(at.n).forEach((K=>{this._questManagerMap.set(K.questTag,q.get(K.injectionKey))})),yield Promise.all(Array.from(this._questManagerMap.values()).map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return q.setup()}))))),it.q.instance.prodigy.education.onQuestionAnswered.add(this.onQuestionAnswered,this),setInterval((()=>{this.sendQuestEventViaHub(tt.T.PLAY_MINUTES,{progressToAdd:5}).catch(Q.RQr.createHandler("Unable to send PlayMinutes quest event"))}),3e5),this._onSetupComplete()}))}sendQuestEventViaHub(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=this._segment.quests.beginQuestEventTransaction(),Q=yield Promise.all(Array.from(this._questManagerMap,(z=>(0,Y.sH)(this,[z],void 0,(function*([,z]){return z.preSendQuestEventViaHub(q,K)}))))),X=new Set,Z=new Set;for(const q of Q)q.questIDs.forEach((q=>X.add(q))),q.tags.forEach((q=>Z.add(q)));const J=Array.from(X),tt=Array.from(Z);let et;J.length>0&&tt.length>0&&(et=yield this._questNetworkHandler.sendQuestEvent({eventType:q,eventData:K,questIDs:J,tags:tt})),yield Promise.all(Q.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return q.manager.postSendQuestEventViaHub(et,q.requestID)}))))),z.flush({})}))}getBattleStartQuestData(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z={params:{taskEventType:et.Z7.Battle,battleType:null!=q?q:Z.gu.Basic,battleSubType:K,allies:[],enemies:[]}},Y=[tt.T.PLAY_ANY_BATTLE,tt.T.WIN_ANY_BATTLE,tt.T.LOSE_ANY_BATTLE],Q=yield this.shouldSendQuestEvents(Y,z);return{questIDs:Q.ids,questEvents:Q.events}}))}getCurrentQuestIDs(){const q=[];return this._questManagerMap.forEach((K=>{const z=K.getCurrentQuestID();z&&q.push(z)})),q}shouldSendQuestEvents(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=yield Promise.all(Array.from(this._questManagerMap,(z=>(0,Y.sH)(this,[z],void 0,(function*([,z]){const Y=yield z.shouldSendQuestEvents(q,K);return{id:z.getCurrentQuestID(),taskTypes:Y}}))))),Q=new Set,X=new Set;for(const q of z)q.id&&q.taskTypes.length>0&&(Q.add(q.id),q.taskTypes.forEach((q=>X.add(q))));return{ids:Array.from(Q),events:Array.from(X)}}))}onQuestionAnswered(q){return(0,Y.sH)(this,void 0,void 0,(function*(){q?yield this.sendQuestEventViaHub(tt.T.ANSWER_QUESTION_CORRECTLY,{}):yield this.sendQuestEventViaHub(tt.T.ANSWER_QUESTION_INCORRECTLY,{})}))}reenter(){it.q.instance.prodigy.education.onQuestionAnswered.remove(this.onQuestionAnswered,this),this._questManagerMap.forEach((q=>{q.cleanup(),q.reenter()})),this.init()}isCutsceneTaskInProgress(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=yield Promise.all(Array.from(this._questManagerMap.values()).map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){const K=q.getCurrentQuestID();return q.isCutsceneTaskInProgress(void 0,K?[K]:[])})))));return null!==(q=null==K?void 0:K.some((q=>!0===q)))&&void 0!==q&&q}))}setupValidTasks(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield Promise.all(Array.from(this._questManagerMap.values()).map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){const K=q.getCurrentQuestID();return q.setupValidTasks(void 0,K?[K]:[])})))))}))}getTasksInProgress(){return(0,Y.sH)(this,arguments,void 0,(function*(q=[]){const K=new Map;return 0===q.length?yield Promise.all(Array.from(this._questManagerMap,(q=>(0,Y.sH)(this,[q],void 0,(function*([q,z]){const Y=yield z.getTasksInProgress();K.set(q,Y)}))))):yield Promise.all(Array.from(this._questManagerMap,(z=>(0,Y.sH)(this,[z],void 0,(function*([z,Y]){var Q;if(q.includes(z)){const q=null!==(Q=yield null==Y?void 0:Y.getTasksInProgress())&&void 0!==Q?Q:[];K.set(z,q)}}))))),K}))}};(0,Y.Cg)([(0,st.b)("c4c-0948"),(0,Y.Sn)("design:type",nt.$)],rt.prototype,"_questNetworkHandler",void 0),(0,Y.Cg)([(0,st.b)("20f-5f67"),(0,Y.Sn)("design:type",Function)],rt.prototype,"_segment",void 0),rt=(0,Y.Cg)([(0,X.injectable)()],rt)},76846:(q,K,z)=>{"use strict";z.d(K,{C:()=>nt});var Y=z(8674),Q=z(79687),X=z(98938),Z=z(8820),J=z(2980),tt=z(59219),et=z(79368),it=z(24030),st=z(4766);class nt extends et.k{constructor(){super(...arguments),this._tags=[X.t.StateChallenge,X.t.NationalCup],this._isInitialized=!1,this._isDataDirty=!1,this._hasUnclaimedPreviousRewardsCache=void 0}setup(){const q=Object.create(null,{setup:{get:()=>super.setup}});return(0,Y.sH)(this,void 0,void 0,(function*(){this._isInitialized||(yield q.setup.call(this),this._stateChallengesDataProvider.onNewDataProcessed.add((()=>this.markDataAsDirty())),this._isInitialized=!0)}))}getStateChallengeGoalsProgress(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._currentProgressData||this._isDataDirty){this._isDataDirty=!1;const q=this._stateChallengesDataProvider.getGoalsParametersData();this._currentProgressData=yield this._stateChallengesNetworkHandler.getStateChallengeGoalsData(null!=q?q:{questionsAnswered:0,competition:Z.a.None})}return this._currentProgressData}))}markDataAsDirty(){this._isDataDirty=!0,this._hasUnclaimedPreviousRewardsCache=void 0}checkHasUnclaimedPreviousRewards(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(void 0!==this._hasUnclaimedPreviousRewardsCache)return this._hasUnclaimedPreviousRewardsCache;const{hasUnclaimedRewards:K}=yield this._stateChallengesNetworkHandler.hasUnclaimedPreviousStateChallengeGoalsRewards(q);return this._hasUnclaimedPreviousRewardsCache=K,K}))}cacheChallengeStartTaskIds(q,K){this._currentChallengeStartTaskId=q,this._previousChallengeStartTaskId=K}getCurrentChallengeUniqueId(){var q;return null===(q=this._currentChallengeStartTaskId)||void 0===q?void 0:q.split("_")[0]}getPreviousChallengeUniqueId(){var q;return null===(q=this._previousChallengeStartTaskId)||void 0===q?void 0:q.split("_")[0]}getPreviousChallengeStartTaskId(){return this._previousChallengeStartTaskId}claimStateChallengeGoalsReward(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this._stateChallengesDataProvider.getGoalsParametersData(),z=yield this._stateChallengesNetworkHandler.claimStateChallengeGoalsRewards(q,null!=K?K:{questionsAnswered:0,competition:Z.a.None});return yield this.processQuestProgressResponse(z),this._isDataDirty=!0,z}))}processPreviousChallengeRewardsResponse(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.processQuestProgressResponse(q),this._isDataDirty=!0}))}sendClassCodeQuestEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!(yield this.isClassCodeQuestCompleted())){const q=this._segment.quests.beginQuestEventTransaction();this.markDataAsDirty(),yield this.claimStateChallengeGoalsReward(nt.CLASS_CODE_QUEST_CLAIM_ID),q.flush({})}}))}isClassCodeQuestCompleted(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=null!==(q=(0,it.$)(this._stateChallengesDataProvider.viewableCompetitionPhase))&&void 0!==q?q:"";return this.isTaskCompleted(K,nt.CLASS_CODE_QUEST_TASK_ID)}))}sendCurrentChallengeStartedEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._currentChallengeStartTaskId&&((yield this.isCurrentChallengeStarted())||(this.markDataAsDirty(),yield this.claimStateChallengeGoalsReward(`${this.getCurrentChallengeUniqueId()}_claim_start`)))}))}sendPreviousChallengeStartedEvent(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K;if(this._previousChallengeStartTaskId&&!(yield this.isPreviousChallengeStarted())){const z=st.H.getPreviousChallengeCompetition(this._stateChallengesDataProvider.viewableCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.finalsPhaseEndDate),Y={questionsAnswered:null!==(K=null===(q=this._stateChallengesDataProvider.getSchoolEntryForPreviousChallenge())||void 0===q?void 0:q.correctAnswers)&&void 0!==K?K:0,competition:z},Q=yield this._stateChallengesNetworkHandler.claimPreviousStateChallengeGoalsRewards(Y,`${this.getPreviousChallengeUniqueId()}_claim_start`);yield this.processQuestProgressResponse(Q),this.markDataAsDirty()}}))}isCurrentChallengeStarted(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;if(!this._currentChallengeStartTaskId)return!1;const K=null!==(q=(0,it.$)(this._stateChallengesDataProvider.viewableCompetitionPhase))&&void 0!==q?q:"";return this.isTaskCompleted(K,this._currentChallengeStartTaskId)}))}isPreviousChallengeStarted(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._previousChallengeStartTaskId)return!1;const q=st.H.getPreviousChallengeCompetition(this._stateChallengesDataProvider.viewableCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.finalsPhaseEndDate),K=(0,it.$)(q);return!!K&&this.isTaskCompleted(K,this._previousChallengeStartTaskId)}))}}nt.CLASS_CODE_QUEST_TASK_ID="id-2025_milestone_classcode",nt.CLASS_CODE_QUEST_CLAIM_ID="id-2025_claim_classcode",(0,Y.Cg)([(0,Q.inject)("60b-c1b4"),(0,Y.Sn)("design:type",tt.E)],nt.prototype,"_stateChallengesNetworkHandler",void 0),(0,Y.Cg)([(0,Q.inject)("d00-c550"),(0,Y.Sn)("design:type",J.v)],nt.prototype,"_stateChallengesDataProvider",void 0)},45918:(q,K,z)=>{"use strict";z.d(K,{M:()=>Y,k:()=>et});var Y,Q=z(8674),X=z(98938),Z=z(35120),J=z(84642),tt=z(79368);!function(q){q.FTUE="ZoneQuest-Ftue"}(Y||(Y={}));class et extends tt.k{constructor(){super(...arguments),this._tags=[X.t.ZoneQuests]}fetchQuestData(){const q=Object.create(null,{fetchQuestData:{get:()=>super.fetchQuestData}});return(0,Q.sH)(this,void 0,void 0,(function*(){try{return yield q.fetchQuestData.call(this)}catch(K){throw Z.q.instance.prodigy.gameContainer.get("782-c308").hasCompletedTutorial()||J.x.showErrorMessageThenReturnToCurrentMap(),new Error(`ZoneQuestManager: Failed to fetch quest data from server. Original error: ${K.message}`)}}))}}},80434:(q,K,z)=>{"use strict";z.d(K,{n:()=>At});var Y=z(98938),Q=z(73678),X=z(8674),Z=z(97495),J=z(70472),tt=z(58776),et=z(62886),it=z(93867),st=z(87761);class nt extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.ACADEMY,this._tags=[Y.t.LocalZoneQuests,Y.t.AcademyEndgame],this._difficultyMode=Z.i.Regular}getTasksInProgress(q,K,z){return(0,X.sH)(this,void 0,void 0,(function*(){const q=`quest-${Y.t.AcademyEndgame}`,K=it.U.getNextStep();return K?[new J.A(q,{id:K,prerequisites:[],completionRequirements:{type:et.T.NONE,data:{}}},{id:K,status:tt.t.IN_PROGRESS})]:[]}))}}var at=z(28433);class rt extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.BONFIREHARD,this._tags=[Y.t.LocalZoneQuests,Y.t.BonfireSpireHard],this._difficultyMode=Z.i.Hard}getCurrentQuestID(){return at.G.id}}var ot=z(63674);class ht extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.BONFIRE,this._tags=[Y.t.LocalZoneQuests,Y.t.BonfireSpire],this._difficultyMode=Z.i.Regular}getCurrentQuestID(){return ot.K.id}}var ct=z(88919);class dt extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.FORESTHARD,this._tags=[Y.t.LocalZoneQuests,Y.t.FireflyForestHard],this._difficultyMode=Z.i.Hard}getCurrentQuestID(){return ct.C.id}}var lt=z(1716);class ut extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.FOREST,this._tags=[Y.t.LocalZoneQuests,Y.t.FireflyForest],this._difficultyMode=Z.i.Regular}getCurrentQuestID(){return lt.E.id}}var ft=z(57144);class bt extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.SHIPWRECKHARD,this._tags=[Y.t.LocalZoneQuests,Y.t.ShipwreckShoreHard],this._difficultyMode=Z.i.Hard}getCurrentQuestID(){return ft.r.id}}var pt=z(76175);class vt extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.SHIPWRECK,this._tags=[Y.t.LocalZoneQuests,Y.t.ShipwreckShore],this._difficultyMode=Z.i.Regular}getCurrentQuestID(){return pt.J.id}}var gt=z(38693);class mt extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.SHIVERCHILLHARD,this._tags=[Y.t.LocalZoneQuests,Y.t.ShiverchillHard],this._difficultyMode=Z.i.Hard}getCurrentQuestID(){return gt.S.id}}var yt=z(99689);class _t extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.SHIVERCHILL,this._tags=[Y.t.LocalZoneQuests,Y.t.Shiverchill],this._difficultyMode=Z.i.Regular}getCurrentQuestID(){return yt.a.id}}var Et=z(97340);class wt extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.SKYWATCHHARD,this._tags=[Y.t.LocalZoneQuests,Y.t.SkywatchHard],this._difficultyMode=Z.i.Hard}getCurrentQuestID(){return Et.x.id}}var Tt=z(64891);class St extends st.B{constructor(){super(...arguments),this._zoneId=Q.A_.SKYWATCH,this._tags=[Y.t.LocalZoneQuests,Y.t.Skywatch],this._difficultyMode=Z.i.Regular}getCurrentQuestID(){return Tt.x.id}}const At={[Q.A_.FOREST]:{injectionKey:"135-e5ce",questId:`quest-${Y.t.FireflyForest}`,questTag:Y.t.FireflyForest,manager:ut},[Q.A_.SHIVERCHILL]:{injectionKey:"474-0137",questId:`quest-${Y.t.Shiverchill}`,questTag:Y.t.Shiverchill,manager:_t},[Q.A_.BONFIRE]:{injectionKey:"065-3d66",questId:`quest-${Y.t.BonfireSpire}`,questTag:Y.t.BonfireSpire,manager:ht},[Q.A_.SHIPWRECK]:{injectionKey:"f55-c292",questId:`quest-${Y.t.ShipwreckShore}`,questTag:Y.t.ShipwreckShore,manager:vt},[Q.A_.SKYWATCH]:{injectionKey:"70a-ec7b",questId:`quest-${Y.t.Skywatch}`,questTag:Y.t.Skywatch,manager:St},[Q.A_.ACADEMY]:{injectionKey:"670-7964",questId:`quest-${Y.t.AcademyEndgame}`,questTag:Y.t.AcademyEndgame,manager:nt},[Q.A_.FORESTHARD]:{injectionKey:"319-dcbe",questId:`quest-${Y.t.FireflyForestHard}`,questTag:Y.t.FireflyForestHard,manager:dt},[Q.A_.SHIVERCHILLHARD]:{injectionKey:"ad8-0362",questId:`quest-${Y.t.ShiverchillHard}`,questTag:Y.t.ShiverchillHard,manager:mt},[Q.A_.BONFIREHARD]:{injectionKey:"e79-858c",questId:`quest-${Y.t.BonfireSpireHard}`,questTag:Y.t.BonfireSpireHard,manager:rt},[Q.A_.SHIPWRECKHARD]:{injectionKey:"012-e5e2",questId:`quest-${Y.t.ShipwreckShoreHard}`,questTag:Y.t.ShipwreckShoreHard,manager:bt},[Q.A_.SKYWATCHHARD]:{injectionKey:"997-ac2e",questId:`quest-${Y.t.SkywatchHard}`,questTag:Y.t.SkywatchHard,manager:wt}}},88355:(q,K,z)=>{"use strict";z.d(K,{y:()=>Y});class Y{constructor(q,K){this._questID=q,this._taskID=K}}},52191:(q,K,z)=>{"use strict";z.d(K,{G:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(86051),J=z(88355);class tt extends J.y{doTask(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.markTutorialComplete()}))}markTutorialComplete(){const q=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=q.tutorial;q.state.set("zone-house-quest",{ID:2}),q.state.set("zone-academy-quest",{ID:2}),q.state.set("tutorial-0",4),K.setMenuValue(Z.K.WORLD_MAP.INTRO,1),K.setMenuValue(Z.K.BESTIARY.INTRO,1),q.backpack.hasItem("key",13)||q.backpack.add("key",13),q.tutorialCompletedThisSession=!0,X.q.instance.prodigy.gameContainer.get("e47-a136").updateFlags().catch(Q.RQr.createHandler("onTutorialComplete: error updating player goals quest manager flags")),q.forceSaveCharacter(),q.saveEnabled=!1}}},97806:(q,K,z)=>{"use strict";z.d(K,{N:()=>Z});var Y=z(8674),Q=z(55122),X=z(52269);class Z extends X.uu{doTask(q){const K=Object.create(null,{doTask:{get:()=>super.doTask}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y;yield K.doTask.call(this,Object.assign(Object.assign({},q),{usePlayerLevel:!0,minLevel:Q.s.minLevel,maxLevel:Q.s.activePlayerLevelCap-X.Ai,showPetMenu:!1!==q.showPetMenu,showPetCard:null!==(z=q.showPetCard)&&void 0!==z?z:q.showGotItem,showPetsInCardFormat:null!==(Y=q.showPetsInCardFormat)&&void 0!==Y&&Y}))}))}}},96165:(q,K,z)=>{"use strict";z.d(K,{I:()=>rt});var Y,Q=z(8674),X=z(62459),Z=z(8394),J=z(65240),tt=z(35120),et=z(23891),it=z(65050),st=z(41674),nt=z(88355);!function(q){q.FreePrize="free-prize",q.PremiumPrize1="prem-prize-1",q.PremiumPrize2="prem-prize-2",q.Claim="claim"}(Y||(Y={}));const at={[Y.FreePrize]:"Free",[Y.PremiumPrize1]:"Core",[Y.PremiumPrize2]:"Plus",[Y.Claim]:"magicoin quest"};class rt extends nt.y{doTask(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Q;const Z=tt.q.instance.prodigy.gameContainer.get("20f-5f67"),st=new X._mx,nt=st.addComponent(et.f);let ot=!1,ht=!1;for(const Y of q.itemDrops){const K=rt.processSecureItemReceived(Z,Y,q.sourceType);K.award&&(ot=!0,nt.addItem(Y.type,Y.ID,Y.N,K.secure),"currency"===Y.type&&27===Y.ID&&(ht=!0))}if(!ot)return void st.destroy();q.isFake&&nt.setItemRewardAsFake(),q.sourceType&&(nt.sourceType=q.sourceType);let ct=it.N.BattlePass;if(q.sourceType===J.C.Festival){ct=null!==(z=null===(K=tt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig())||void 0===K?void 0:K.name)&&void 0!==z?z:"unknown festival"}else q.sourceType===J.C.UnifiedStore||q.sourceType===J.C.DynamicStore?ct=it.N.ShopVisit:q.sourceType!==J.C.StateChallengeOnboarding&&q.sourceType!==J.C.StateChallengeMilestone&&q.sourceType!==J.C.StateChallengePodium||(ct=it.N.StateChallenge);const dt={source_type:q.sourceType,source_id:`${this._questID}-${this._taskID}`,instance_type:ct,instance_id:this._questID};if(q.sourceType===J.C.BattlePass){let q="unknown";const K=null===(Q=this._taskID)||void 0===Q?void 0:Q.toString();(null==K?void 0:K.includes(Y.FreePrize))?q=at[Y.FreePrize]:(null==K?void 0:K.includes(Y.PremiumPrize1))?q=at[Y.PremiumPrize1]:(null==K?void 0:K.includes(Y.PremiumPrize2))?q=at[Y.PremiumPrize2]:(null==K?void 0:K.includes(Y.Claim))&&ht?q=at[Y.Claim]:(null==K?void 0:K.includes("mailer"))&&(q="mailer"),dt.source_name=q}else if(q.sourceType===J.C.DynamicStore){const q=tt.q.instance.prodigy.gameContainer.get("668-8a41").getLastTransactionStore();dt.source_name=q}for(const Y of q.itemDrops)Z.quests.questEventTransaction.setIndividualData(Y.type,Y.ID,dt);nt.awardSilently=!1===q.showGotItem,nt.showPetsInPetCardFormat=!0===q.showPetsInCardFormat,nt.customSegmentMetadata=dt,nt.additionalDialogueIds=q.additionalDialogueIds,nt.awardItem(),nt.awardSilently||(yield nt.onComplete.asPromise()),st.destroy()}))}static processSecureItemReceived(q,K,z){var Y;if("item"===K.type&&184===K.ID){const Q=tt.q.instance.prodigy.gameContainer.get("5d3-90c1"),Z=Q.petInventoryData.permanentSlots-K.N,et=Q.petInventoryData.permanentSlots;if(z===J.C.BattlePass){const K=null===(Y=q.item.getSourceTransactionData(z))||void 0===Y?void 0:Y.transaction_id;q.featureCommon.sendPetSlotUnlockedEvent(st.No.TreasureTrack,et,Z,K)}else X.VyI.log("Pet slot sourceType is not valid",X.$bb.Warning);return Q.fetchPetInventoryData().catch(X.RQr.createHandler("Error fetching pet inventory data")),{award:!1,secure:!0}}return("petHat"===K.type||"petRelic"===K.type)&&tt.q.instance.prodigy.gameContainer.get("9cf-c09f").refreshPetGear().catch(X.RQr.createHandler("GotItemTaskCompleteHandler: Error refreshing pet gear")),{award:!0,secure:(0,Z.p)(K.type,K.ID)}}}},52269:(q,K,z)=>{"use strict";z.d(K,{Ai:()=>it,uu:()=>st});var Y=z(8674),Q=z(62459),X=z(61468),Z=z(35120),J=z(43485),tt=z(55122),et=z(88355);const it=-5;class st extends et.y{doTask(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,et,st,nt,at;const rt=Z.q.instance.prodigy.gameContainer.get("996-2681");rt.questProgressHasBeenLoaded()&&(yield rt.updateQuestProgress());const ot=new Q._mx,ht=ot.addComponent(J.j);q.sourceType&&(ht.sourceType=q.sourceType);const ct=null===(K=q.usePlayerLevel)||void 0===K||K,dt=X.l.guaranteeArray(q.id).map((q=>"number"==typeof q?q:parseInt(q)))[0];q.claimToken&&(yield Z.q.instance.prodigy.gameContainer.get("9c0-de04").claim(q.claimToken,dt)),ht.showPetsInPetCardFormat=null===(Y=null!==(z=q.showPetsInCardFormat)&&void 0!==z?z:q.showPetCard)||void 0===Y||Y,ht.init(dt,1,!0),ht.setPlayerLevelDelta(null!==(et=q.playerLevelDeltaMin)&&void 0!==et?et:-10,null!==(st=q.playerLevelDeltaMax)&&void 0!==st?st:it,ct);const lt=tt.s.minLevel,ut=tt.s.activePlayerLevelCap-it;ht.setLevelMinMax(null!==(nt=q.minLevel)&&void 0!==nt?nt:lt,null!==(at=q.maxLevel)&&void 0!==at?at:ut),ht.awardSilently=!1===q.showPetCard,q.customSegmentData&&(ht.customSegmentMetadata=q.customSegmentData),ht.awardItem(),ht.awardSilently||(yield ht.onComplete.asPromise()),q.showPetMenu&&Z.q.instance.prodigy.open.pets(),ot.destroy()}))}}},55337:(q,K,z)=>{"use strict";z.d(K,{F:()=>Y});class Y{getCacheKey(q){return null}}},52157:(q,K,z)=>{"use strict";z.d(K,{L:()=>Z});var Y=z(8674),Q=z(35120),X=z(55337);class Z extends X.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=Q.q.instance.prodigy.gameContainer.get("b37-c775"),z=Array.from(K.questManagerMap.values()).map((K=>(0,Y.sH)(this,void 0,void 0,(function*(){return K.isTaskCompleted(q.questId,String(q.taskId))}))));return(yield Promise.all(z)).some((q=>q))||!1}))}getCacheKey(q){return`IsQuestTaskComplete:${q.questId}:${q.taskId}`}}},56567:(q,K,z)=>{"use strict";z.d(K,{f:()=>Bt});var Y=z(8674),Q=z(62459);var X=z(24522),Z=z(5491),J=z(35120),tt=z(55337);class et extends tt.F{isReady(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return K.kennel.petTeam.length>0&&K.kennel.petTeam.filter((q=>(null==q?void 0:q.creatureType)===Z.V.Pet)).every((K=>K.getElement()===q.element))}))}getCacheKey(q){return`AllPetsOnTeamHaveElement${q.element}`}}class it extends tt.F{isReady(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return!0}))}getCacheKey(q){return`BattleHasEnemy${q.enemies.map((q=>`${q.unitType}:${q.assetId}`)).join("|")}`}}function st(q,K){const z=[];for(const Y of K)q.hasOwnProperty(Y)||z.push(Y);return z}class nt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=st(q,["battlePassXpId"]);if(K.length>0)throw new Error(`BattlePassXpPreconditionHandler: Missing required properties: ${K.join(", ")}`);if(!Q.Aq$.isDefined(q.battlePassXpRequired)&&!Q.Aq$.isDefined(q.infiniteXpRequired))throw new Error('BattlePassXpPreconditionHandler: One of "battlePassXpRequired" or "infiniteXpRequired" is required');const z=J.q.instance.prodigy.gameContainer.get("9a2-c1c3"),Y=yield z.getBattlePassXpData(q.battlePassXpId);return Y&&Q.Aq$.isDefined(q.battlePassXpRequired)?Y.total>=q.battlePassXpRequired:!!(Y&&Q.Aq$.isDefined(q.infiniteXpRequired)&&Q.Aq$.isDefined(Y.currentInfinite))&&Y.currentInfinite>=q.infiniteXpRequired}))}getCacheKey(q){return`BattlePassXp:${q.battlePassXpId}:${q.battlePassXpRequired}`}}var at=z(58776),rt=z(34829),ot=z(13956),ht=z(69698);class ct extends tt.F{isReady(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z;const Y=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack()).find((q=>q.taskProgress.status===at.t.IN_PROGRESS)),Q=this._timeManager.getServerTimeMs(),X=null!==(z=null===(K=null===(q=null==Y?void 0:Y.taskProgress)||void 0===q?void 0:q.data)||void 0===K?void 0:K.progress)&&void 0!==z?z:0,Z=Q>=X,J=X-Q>=2*rt.A.DAY_IN_MS;return Z||J}))}getCacheKey(){return"DailyLoginCalendarCheckDatePreconditionHandler"}}(0,Y.Cg)([(0,ot.b)("0f2-d6bd"),(0,Y.Sn)("design:type",ht.V)],ct.prototype,"_timeManager",void 0),(0,Y.Cg)([(0,ot.b)("f33-d276"),(0,Y.Sn)("design:type",Function)],ct.prototype,"_dailyLoginCalendarQuestManager",void 0);class dt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=st(q,["date"]);if(K.length>0)throw new Error(`DateAfterPreconditionHandler: Missing required properties: ${K.join(", ")}`);const z=J.q.instance.prodigy.gameContainer.get("0f2-d6bd");return new Date(q.useClientTime?Date.now():z.getServerTimeMs())>=new Date(q.date)}))}getCacheKey(q){return`DateAfter:${q.date}:${q.useClientTime?"client":"server"}`}}class lt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.getMillisecondsUntilDate(q)>0}))}getMillisecondsUntilDate(q){const K=st(q,["date"]);if(K.length>0)throw new Error(`DateBeforePreconditionHandler: Missing required properties: ${K.join(", ")}`);const z=J.q.instance.prodigy.gameContainer.get("0f2-d6bd"),Y=new Date(q.useClientTime?Date.now():z.getServerTimeMs());return new Date(q.date).valueOf()-Y.valueOf()}getCacheKey(q){return`DateBefore:${q.date}:${q.useClientTime?"client":"server"}`}}class ut extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return!(q.hairStyle&&!q.hairStyle.some((q=>{var z;return q===(null===(z=K.appearance.getHair())||void 0===z?void 0:z.style)})))&&(!(q.hairColor&&!q.hairColor.some((q=>{var z;return q===(null===(z=K.appearance.getHair())||void 0===z?void 0:z.color)})))&&(!(q.skinColor&&!q.skinColor.some((q=>q===K.appearance.getSkinColor())))&&(!(q.eyeColor&&!q.eyeColor.some((q=>q===K.appearance.getEyeColor())))&&!(q.face&&!q.face.some((q=>q===K.appearance.getFace()))))))}))}getCacheKey(q){var K,z,Y,Q,X;return`HasAppearance\n HairStyle${null===(K=q.hairStyle)||void 0===K?void 0:K.map((q=>q.toString())).join("|")}\n HairColor${null===(z=q.hairColor)||void 0===z?void 0:z.map((q=>q.toString())).join("|")}\n SkinColor${null===(Y=q.skinColor)||void 0===Y?void 0:Y.map((q=>q.toString())).join("|")}\n EyeColor${null===(Q=q.eyeColor)||void 0===Q?void 0:Q.map((q=>q.toString())).join("|")}\n Face${null===(X=q.face)||void 0===X?void 0:X.map((q=>q.toString())).join("|")}`}}class ft extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=J.q.instance.prodigy.gameContainer.get("9fe-5b45");return function(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=st(q,["experimentFeatureId","experimentType","expectedValue"]);if(z.length>0)throw new Error(`ExperimentFeatureHandler: Missing required properties: ${z.join(", ")}`);if("json"!==q.experimentType&&q.experimentType!==typeof q.expectedValue)throw new Error(`ExperimentFeatureHandler: Expected value type (${typeof q.expectedValue}) does not match the experiment type (${q.experimentType})`);let Y=yield K(q.experimentFeatureId);if("json"===q.experimentType){if(void 0===q.valuePath)throw new Error("ExperimentFeatureHandler: valuePath is required for json experiment types");for(let K=0;K(0,Y.sH)(this,void 0,void 0,(function*(){return K.getFeatureValue(q)}))))}))}getCacheKey(q){let K=`ExperimentFeature:${q.experimentFeatureId}:${q.expectedValue.toString()}`;return"json"===q.experimentType&&q.valuePath&&(K+=`:${q.valuePath.join(".")}`),K}}class bt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getQuestSystem(q.questId)===q.questSystem}))}getCacheKey(q){return`HasGameQuest:${q.questId}:${q.questSystem}`}}class pt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=st(q,["feature"]);if(K.length>0)throw new Error(`HasMemberFeaturePreconditionHandler: Missing required properties: ${K.join(", ")}`);return J.q.instance.prodigy.gameContainer.get("73f-58d1").hasFeatureAccess(q.feature)}))}getCacheKey(q){return`HasMemberFeature:${q.feature}`}}class vt extends tt.F{isReady(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return!0}))}getCacheKey(){return null}}class gt extends tt.F{isReady(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.petTeam.some((K=>K.getElement()===q.element))}))}getCacheKey(q){return`HasPetOnTeamWithElement${q.element}`}}var mt=z(60157);class yt extends tt.F{isReady(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){let z,Y;if(K&&(0,mt.Q9)(K))z=K.battleType,Y=K.battleSubType;else{const q=Q.wa5.getActiveScene().container.get("BattleController");if(!q)return!1;z=q.type,Y=q.subType}return!!q.battleType.some((q=>q===z))&&!(q.battleSubType&&!q.battleSubType.some((q=>q===Y)))}))}getCacheKey(q){var K;return`InBattleOfType${q.battleType.map((q=>q.toString())).join("|")}-${null===(K=q.battleSubType)||void 0===K?void 0:K.join("|")}`}}var _t=z(71586),Et=z(30226);class wt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=_t.R.getNowWithServerTimezoneOffset();return Et.J.isDateWithinSchoolHours(q)&&Et.J.isSchoolDay(q)}))}getCacheKey(q){return"IsDuringSchoolHours"}}class Tt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=_t.R.getNowWithServerTimezoneOffset();return Et.J.isWeekend(q)}))}getCacheKey(q){return"IsDuringWeekend"}}class St extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=J.q.instance.prodigy.world;return!(q.zone&&!q.zone.some((q=>q===K.getCurrentZone())))&&!(q.map&&!q.map.some((q=>q===K.getCurrentMap())))}))}getCacheKey(q){var K,z;return`IsInZone\n Zone${null===(K=q.zone)||void 0===K?void 0:K.map((q=>q.toString())).join("|")}\n Map${null===(z=q.map)||void 0===z?void 0:z.join("|")}`}}class At extends tt.F{isReady(){return(0,Y.sH)(this,void 0,void 0,(function*(){return J.q.instance.prodigy.gameContainer.get("73f-58d1").isMember}))}getCacheKey(){return"IsMember"}}var Ct=z(52157),Ot=z(77938);class It extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(q.follow&&!q.follow.some((q=>q===K.equipment.getFollow())))return!1;if(q.followRarity){const z=Ot.t.getItem("follow",K.equipment.getFollow());if(z&&!q.followRarity.some((q=>{var K;return q===(null===(K=z.data)||void 0===K?void 0:K.rarity)})))return!1}if(q.hat&&!q.hat.some((q=>q===K.equipment.getHat())))return!1;if(q.hatRarity){const z=Ot.t.getItem("hat",K.equipment.getHat());if(z&&!q.hatRarity.some((q=>{var K;return q===(null===(K=z.data)||void 0===K?void 0:K.rarity)})))return!1}if(q.outfit&&!q.outfit.some((q=>q===K.equipment.getOutfit())))return!1;if(q.outfitRarity){const z=Ot.t.getItem("outfit",K.equipment.getOutfit());if(z&&!q.outfitRarity.some((q=>{var K;return q===(null===(K=z.data)||void 0===K?void 0:K.rarity)})))return!1}if(q.weapon&&!q.weapon.some((q=>q===K.equipment.getWeapon())))return!1;if(q.weaponRarity){const z=Ot.t.getItem("weapon",K.equipment.getWeapon());if(z&&!q.weaponRarity.some((q=>{var K;return q===(null===(K=z.data)||void 0===K?void 0:K.rarity)})))return!1}if(q.spellRelic&&!q.spellRelic.some((q=>q===K.equipment.getSpellRelic())))return!1;if(q.spellRelicRarity){const z=Ot.t.getItem("spellRelic",K.equipment.getSpellRelic());if(z&&!q.spellRelicRarity.some((q=>{var K;return q===(null===(K=z.data)||void 0===K?void 0:K.rarity)})))return!1}if(q.boots&&!q.boots.some((q=>q===K.equipment.getBoots())))return!1;if(q.bootsRarity){const z=Ot.t.getItem("boots",K.equipment.getBoots());if(z&&!q.bootsRarity.some((q=>{var K;return q===(null===(K=z.data)||void 0===K?void 0:K.rarity)})))return!1}if(q.mount&&!q.mount.some((q=>q===K.equipment.getMount())))return!1;if(q.mountRarity){const z=Ot.t.getItem("mount",K.equipment.getMount());if(z&&!q.mountRarity.some((q=>{var K;return q===(null===(K=z.data)||void 0===K?void 0:K.rarity)})))return!1}return!0}))}getCacheKey(q){var K,z,Y,Q,X,Z,J,tt,et,it,st,nt,at,rt;return`IsWearingGear\n Follow${null===(K=q.follow)||void 0===K?void 0:K.map((q=>q.toString())).join("|")}\n FollowRarity${null===(z=q.followRarity)||void 0===z?void 0:z.map((q=>q.toString())).join("|")}\n Hat${null===(Y=q.hat)||void 0===Y?void 0:Y.map((q=>q.toString())).join("|")}\n HatRarity${null===(Q=q.hatRarity)||void 0===Q?void 0:Q.map((q=>q.toString())).join("|")}\n Outfit${null===(X=q.outfit)||void 0===X?void 0:X.map((q=>q.toString())).join("|")}\n OutfitRarity${null===(Z=q.outfitRarity)||void 0===Z?void 0:Z.map((q=>q.toString())).join("|")}\n Weapon${null===(J=q.weapon)||void 0===J?void 0:J.map((q=>q.toString())).join("|")}\n WeaponRarity${null===(tt=q.weaponRarity)||void 0===tt?void 0:tt.map((q=>q.toString())).join("|")}\n SpellRelic${null===(et=q.spellRelic)||void 0===et?void 0:et.map((q=>q.toString())).join("|")}\n SpellRelicRarity${null===(it=q.spellRelicRarity)||void 0===it?void 0:it.map((q=>q.toString())).join("|")}\n Boots${null===(st=q.boots)||void 0===st?void 0:st.map((q=>q.toString())).join("|")}\n BootsRarity${null===(nt=q.bootsRarity)||void 0===nt?void 0:nt.map((q=>q.toString())).join("|")}\n Mount${null===(at=q.mount)||void 0===at?void 0:at.map((q=>q.toString())).join("|")}\n MountRarity${null===(rt=q.mountRarity)||void 0===rt?void 0:rt.map((q=>q.toString())).join("|")}`}}var Dt=z(90975);class Rt extends tt.F{isReady(){return(0,Y.sH)(this,void 0,void 0,(function*(){return Dt.Y.meetsNarrativeCatchupRequirements()||Dt.Y.meetsNarrativeIntroRequirements()}))}getCacheKey(){return"MeetsCampaignReplayNarrativeRequirement"}}class Pt extends tt.F{isReady(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return!0}))}getCacheKey(q){return`RemainingHealth${q.wizardPercent}|${q.petPercent}|${q.teamPercent}`}}class Mt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getLevel();return!(q.minLevel&&K&&Kq.maxLevel)}))}getCacheKey(q){return`IsLevel\n MinLevel${q.minLevel}\n MaxLevel${q.maxLevel}`}}var Nt=z(29738);class xt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return q.validLocales.includes(Nt.O.localeCode)}))}getCacheKey(q){var K;return`HasLocale\n ValidLocales${null===(K=q.validLocales)||void 0===K?void 0:K.map((q=>q.toString())).join("|")}`}}class Lt extends tt.F{isReady(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=J.q.instance.prodigy.gameContainer.get("11f-118a");return yield K.meetsRequirements(q.requirementID)}))}getCacheKey(q){return`MeetsFeatureRequirement_${q.requirementID}`}}const kt={[X.n.DATE_BEFORE]:lt,[X.n.DATE_AFTER]:dt,[X.n.HAS_EXPERIMENT_FEATURE]:ft,[X.n.HAS_MEMBER_FEATURE]:pt,[X.n.HAS_TOTAL_BATTLE_PASS_XP]:nt,[X.n.HAS_QUEST_SYSTEM]:bt,[X.n.DAILY_LOGIN_CALENDAR_CHECK_DATE]:ct,[X.n.IS_DURING_SCHOOL_HOURS]:wt,[X.n.IS_MEMBER]:At,[X.n.HAS_PET_ON_TEAM_WITH_ELEMENT]:gt,[X.n.ALL_PETS_ON_TEAM_HAVE_ELEMENT]:et,[X.n.IN_BATTLE_OF_TYPE]:yt,[X.n.REMAINING_HEALTH]:Pt,[X.n.IS_DURING_WEEKEND]:Tt,[X.n.HAS_MET_STATE_CHALLENGE_GOAL]:vt,[X.n.IS_IN_ZONE]:St,[X.n.HAS_APPEARANCE]:ut,[X.n.IS_WEARING_GEAR]:It,[X.n.MEETS_CAMPAIGN_REPLAY_NARRATIVE_REQUIREMENT]:Rt,[X.n.IS_QUEST_TASK_COMPLETE]:Ct.L,[X.n.IS_LEVEL]:Mt,[X.n.HAS_LOCALE]:xt,[X.n.MEETS_FEATURE_REQUIREMENT]:Lt,[X.n.BATTLE_HAS_ENEMY]:it};class Bt extends class{constructor(){this.reset()}doCheck(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){let Y=q.getCacheKey(K);if(Y&&!0===(null==K?void 0:K.negateResult)&&(Y=`${Y}-negate`),Y&&Y in this._resultsCache)return this._resultsCache[Y];let Q=yield q.isReady(K,z);return!0===(null==K?void 0:K.negateResult)&&(Q=!Q),Y&&(this._resultsCache[Y]=Q),Q}))}reset(){this._resultsCache={},this._cache={}}}{constructor(q){super(),this._taskParams=q}check(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=kt[q];if(void 0===z)return Q.VyI.log(`No precondition handler found for type: ${q}. Treating precondition as unmet (false).`,Q.$bb.Warning),!1;const Y=new z;return this.doCheck(Y,K,this._taskParams)}))}}},32073:(q,K,z)=>{"use strict";z.d(K,{v:()=>ot});var Y=z(62459),Q=z(68910),X=z(99625),Z=z(65741),J=z(94428),tt=z(35120),et=z(29738),it=z(23082),st=z(29546),nt=z(13021),at=z(61895),rt=z(19145);class ot{static canBeTransportedToQuickQuiz(q={}){if(!et.O.isEnglishLocale())return{canBeTransported:!1,info:"Player is not in English locale"};const K=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=[it.G.CharCreate,it.G.CharSelect,it.G.SplashScreen,it.G.Loading],Q=tt.q.instance.game.state.current;if(z.includes(Q))return{canBeTransported:!1,info:`${Q} is not an eligible state`};if(Q===it.G.PrefabScene){if(tt.q.instance.game.state.getCurrentState().prefabGameAssets.includes(X.l.DuelsStadiumMenu))return{canBeTransported:!1,info:"Player is in the duels stadium menu"};if(!q.skipPendingLoadCheck){const q=tt.q.instance.game.state.get(it.G.Loading);if(null==q?void 0:q.isLoadingAdditional)return{canBeTransported:!1,info:"Loading screen still has pending tasks"}}}if(!K.hasCompletedTutorial())return{canBeTransported:!1,info:"Player has not completed the tutorial"};if(tt.q.instance.prodigy.education.isQuestionInterfaceOpen)return{canBeTransported:!1,info:"Question interface is open"};if(nt.w.isInTitanParty())return{canBeTransported:!1,info:"Player is in a titan party"};if(!q.skipOpenMenuCheck){if(tt.q.instance.prodigy.open.menus.length>0||tt.q.instance.prodigy.open.renderMenus.length>0)return{canBeTransported:!1,info:"Player is in a menu"}}if(!q.skipBattleCanEndInstantlyCheck){if(Q===it.G.SecureBattleRevamp){const q=Y.wa5.getActiveScene().container.get("BattleController");if(!(null==q?void 0:q.canBattleEndInstantly())&&!(null==q?void 0:q.isBattleBeingForciblyEndedMidBattle()))return{canBeTransported:!1,info:"Battle can not end right now"}}if(Q===it.G.CoOp){if(!tt.q.instance.game.state.getCurrentState().canBattleEndInstantly())return{canBeTransported:!1,info:"CoOp Battle can not end right now"}}}return tt.q.instance.prodigy.gameContainer.get("774-4659").canUseMultiplayer()?rt.Z.instance.isInProgress()?{canBeTransported:!1,info:"Spell Status Effects Tutorial is in progress"}:{canBeTransported:!0,info:""}:{canBeTransported:!1,info:"Multiplayer is currently unavailable"}}static canBeTransportedFromBattleToQuickQuiz(){return!!tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasCompletedTutorial()}static transportPlayerToQuickQuiz(q,K){const z=new Q.Sprite(tt.q.instance.game.renderer.generateTexture(tt.q.instance.game.world,{region:new Q.Rectangle(0,0,tt.q.instance.game.width,tt.q.instance.game.height)}));switch(z.filters=[new Q.filters.BlurFilter],q){case J.oW.WizardDash:ot.ensureMapCallsCleanup(),tt.q.instance.game.state.start(it.G.LootDashTransport,!0,z,K);break;default:return void Y.RQr.createHandler("transportPlayerToQuickQuiz: Quick quiz type does not exist")}}static cancelQuickQuiz(q){switch(q){case J.oW.WizardDash:at.B.cancelQuickQuiz();break;default:return void Y.RQr.createHandler("transportPlayerToQuickQuiz: Quick quiz type does not exist")}}static addCompletedQuickQuizId(q){var K;const z=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;z.data.quickQuizData=null!==(K=z.data.quickQuizData)&&void 0!==K?K:{completedQuizIds:[]},z.data.quickQuizData.completedQuizIds.push(q),z.data.quickQuizData.completedQuizIds=z.data.quickQuizData.completedQuizIds.slice(-10),z.updated=!0}static markAssignmentAsCompleted(q){tt.q.instance.prodigy.gameContainer.get("774-4659").completeAssignment(q)}static hasCompletedQuickQuiz(q){var K,z;return null!==(z=null===(K=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.quickQuizData)||void 0===K?void 0:K.completedQuizIds.includes(q))&&void 0!==z&&z}static getPlayerProgressFromChannelData(q){const K=q[`playerProgress-${tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.userID}`];return K?K.progress:Z.k.NOT_STARTED}static isInValidSubjectForQuickQuiz(){return st.X.isMathSubjectRequirementMet()}static ensureMapCallsCleanup(){if(tt.q.instance.game.state.current===it.G.TileScreen){tt.q.instance.game.state.getCurrentState().forceMapCleanupOnShutdown()}}}},4764:(q,K,z)=>{"use strict";z.d(K,{w:()=>ft});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(65741),J=z(94428);class tt{static getChannelName(q){return`quickQuiz-${q}`}}var et=z(35120),it=z(29738),st=z(71543),nt=z(32073),at=(z(48417),z(17516)),rt=z(7351),ot=z(23082),ht=z(13956),ct=z(76546),dt=z(80403),lt=z(70330);class ut extends ct.D{constructor(q){super(),this._quickQuizManager=q,this._synapse.onNotificationReceived.add(this.handleSynapseNotifications,this)}cleanUp(){this._synapse.onNotificationReceived.remove(this.handleSynapseNotifications,this)}handleSynapseNotifications(q){switch(q.type){case at.m.QuickQuizJoinRequest:let K;if(K=et.q.instance.game.state.current===ot.G.CoOp?et.q.instance.game.state.getCurrentState():Q.wa5.getActiveScene().container.get("BattleController"),K&&nt.v.canBeTransportedFromBattleToQuickQuiz()){const z=this._localizer.getText("LOOT_DASH_QUICK_QUIZ_CANCELLING_BATTLE");if(this._quickQuizManager.currentQuickQuizId)return K.enablePostBattleExpressMode(z),void this._quickQuizManager.setMayHavePendingActiveQuizzes();const Y=Q.wa5.getActiveScene().container.get("RemoteConfig");if(Y&&(this._activePlayer.battleResumeData={battleType:K.type,data:Y.clientState}),!K.canBattleEndInstantly()){const Y={enablePostBattleFlowExpressMode:!0,forceEndMessageText:z};return void K.beginEndingBattle((()=>{this._quickQuizManager.attemptToJoinQuickQuiz(q.data.quizType,q.data.quickQuizId,q.data.channelName)}),Y)}}this._quickQuizManager.attemptToJoinQuickQuiz(q.data.quizType,q.data.quickQuizId,q.data.channelName)}}joinQuickQuizChannel(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._synapse.joinFeatureChannel(q,this.handleChannelMessages.bind(this))}))}leaveQuickQuizChannel(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._synapse.leaveFeatureChannel(q)}))}handleChannelMessages(q){this._quickQuizManager.handleChannelMessages(q)}callDebugRoute(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}getActiveQuickQuizData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return yield this.getActiveQuizzesFromGraphQL()}))}getActiveQuizzesFromGraphQL(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this._graphQlRequestSender.sendRequest("\n query getActiveQuickQuizzes {\n viewer {\n quickQuizzes {\n id\n startDate\n endDate\n assignment {\n id\n }\n }\n }\n }\n ")).data.viewer.quickQuizzes.sort(((q,K)=>q.startDate-K.startDate)).map((q=>({id:q.id,type:J.oW.WizardDash,assignmentId:q.assignment.id,startDate:q.startDate,endDate:q.endDate})))}))}}(0,Y.Cg)([(0,ht.b)("b0c-9016"),(0,Y.Sn)("design:type",lt.d)],ut.prototype,"_synapse",void 0),(0,Y.Cg)([(0,ht.b)("800-a786"),(0,Y.Sn)("design:type",dt.K)],ut.prototype,"_graphQlRequestSender",void 0),(0,Y.Cg)([(0,ht.b)("782-c308"),(0,Y.Sn)("design:type",rt.W)],ut.prototype,"_activePlayer",void 0),(0,Y.Cg)([(0,ht.b)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],ut.prototype,"_localizer",void 0);let ft=class{get currentQuickQuizId(){return this._currentQuickQuizId}get currentQuickQuizType(){return this._currentQuickQuizType}get currentAssignmentId(){return this._quizIdToAssignmentIdMap.get(this._currentQuickQuizId)}get waitingToTransport(){return Q.Aq$.isDefined(this._timerID)}constructor(){this.onQuickQuizMessageReceived=new Q.HN0,this.onQuickQuizExitFlowComplete=new Q.HN0,this.checkForValidStateIntervalMs=5e3,this._mayHavePendingActiveQuizzes=!0,this._quizIdToAssignmentIdMap=new Map,this._startTime=0,this._allMessages=[],this._onCustomDataReceived=new Q.HN0,this.quickQuizNetworkHandler=new ut(this);et.q.instance.prodigy.gameContainer.get("774-4659").onSocketReconnect.add((()=>this.onSocketReconnect()))}cleanUp(){this._startTime=0,this.quickQuizNetworkHandler.cleanUp(),this.onQuickQuizExitFlowComplete.dispose(),this.onQuickQuizMessageReceived.dispose(),this._onCustomDataReceived.dispose()}static instance(){return et.q.instance.prodigy.gameContainer.get("7f4-4464")}joinQuickQuizIfActive(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!it.O.isEnglishLocale())return;if(!nt.v.isInValidSubjectForQuickQuiz())return;if(!this._mayHavePendingActiveQuizzes)return;const K=yield this.fetchActiveQuickQuizData();this._mayHavePendingActiveQuizzes=!1;for(const z of K)this.attemptToJoinQuickQuiz(z.type,z.id,tt.getChannelName(z.id),q)}))}attemptToJoinQuickQuiz(q,K,z,Y){if(it.O.isEnglishLocale()&&nt.v.isInValidSubjectForQuickQuiz())if(nt.v.hasCompletedQuickQuiz(K))Q.VyI.log(`Quick Quiz ${K} has already been completed. Ignoring attempt to join.`,Q.$bb.Info);else{if(!this._currentQuickQuizId)return nt.v.canBeTransportedToQuickQuiz(Y).canBeTransported?(this._currentQuickQuizId=K,this._currentQuickQuizType=q,this._currentChannelName=z,window.clearInterval(this._timerID),this._timerID=void 0,void this.joinQuickQuiz().catch((q=>{Q.RQr.logError(q,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()}))):void this.createTransportTimer();this._mayHavePendingActiveQuizzes=!0}}createTransportTimer(){Q.Aq$.isDefined(this._timerID)||(this._timerID=window.setInterval((()=>{nt.v.canBeTransportedToQuickQuiz().canBeTransported&&(window.clearInterval(this._timerID),this._timerID=void 0,this._mayHavePendingActiveQuizzes=!0,this.joinQuickQuizIfActive().catch((q=>{Q.RQr.logError(q,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()})))}),this.checkForValidStateIntervalMs))}joinQuickQuiz(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._quizIdToAssignmentIdMap.has(this._currentQuickQuizId)||(yield this.fetchActiveQuickQuizData(),this._quizIdToAssignmentIdMap.has(this._currentQuickQuizId)||Q.VyI.log(`QuickQuizManager: Quick Quiz ID not found in map for quick quiz ${this._currentQuickQuizId}`,Q.$bb.Error)),yield this.quickQuizNetworkHandler.joinQuickQuizChannel(this._currentChannelName);const q=(yield this._onCustomDataReceived.asPromise())[0],K=nt.v.getPlayerProgressFromChannelData(q);if(K===Z.k.COMPLETED)return nt.v.addCompletedQuickQuizId(this._currentQuickQuizId),void this.leaveQuickQuiz();nt.v.transportPlayerToQuickQuiz(this._currentQuickQuizType,K)}))}leaveQuickQuizChannel(){this.quickQuizNetworkHandler.leaveQuickQuizChannel(this._currentChannelName).catch(Q.RQr.createHandler("Failed to leave quick quiz channel"))}leaveQuickQuiz(){this.leaveQuickQuizChannel(),this._currentQuickQuizId=void 0,this._currentQuickQuizType=void 0,this._currentChannelName=void 0,this._allMessages.length=0}handleChannelMessages(q){switch(this._allMessages.push(q),q.type){case"channelData":const K=q.channelData;K.quizStatus===Z.d.INACTIVE&&this.leaveQuickQuiz(),this._startTime=K.matchStartTime,this._onCustomDataReceived.dispatch(K);break;case"broadcastAction":const z=q.actionInfo;if(!z)return;switch(z.type){case J.H9.QuizEnded:nt.v.cancelQuickQuiz(this._currentQuickQuizType),this.leaveQuickQuizChannel()}}this.onQuickQuizMessageReceived.dispatch(q)}handleQuizExitFlowComplete(){this.leaveQuickQuiz(),this.onQuickQuizExitFlowComplete.dispatch(),this.joinQuickQuizIfActive({skipBattleCanEndInstantlyCheck:!0}).then((()=>{this.currentQuickQuizId||!this.waitingToTransport&&st.p.resumeBattle()||et.q.instance.prodigy.world.teleportToCurrentMap()})).catch((q=>{Q.RQr.logError(q,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()}))}setMayHavePendingActiveQuizzes(){this._mayHavePendingActiveQuizzes=!0}onSocketReconnect(){this.setMayHavePendingActiveQuizzes(),this.joinQuickQuizIfActive().then((()=>{this._currentQuickQuizId&&et.q.instance.prodigy.education.loadAndInitEducationData().catch(Q.RQr.createHandler("SplashScreen: Error reloading education data"))})).catch((q=>{Q.RQr.logError(q,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()}))}getMillisecondsSinceStart(){return et.q.instance.prodigy.gameContainer.get("0f2-d6bd").getServerTimeMs()-this._startTime}fetchActiveQuickQuizData(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.quickQuizNetworkHandler.getActiveQuickQuizData();for(const K of q)this._quizIdToAssignmentIdMap.set(K.id,K.assignmentId);return q}))}};ft=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Sn)("design:paramtypes",[])],ft)},43579:(q,K,z)=>{"use strict";z.d(K,{Nx:()=>J,TQ:()=>Z,_l:()=>X,fs:()=>et,wS:()=>tt});var Y,Q=z(97495);!function(q){q.DifficultyMode="DIFFICULTY_MODE",q.SelectedState="SELECTED_STATE",q.MaxLevel="MAX_LEVEL",q.TitleColor="TITLE_COLOR"}(Y||(Y={}));const X="DIFFICULTY_MODE";var Z,J;!function(q){q.Unselected="#AB5947",q.RegularSelected="#363636",q.HardSelected="#4132CF",q.ExpertSelected="#D734D4"}(Z||(Z={})),function(q){q.Select="select",q.Unlock="unlock",q.Current="current",q.ComingSoon="coming-soon"}(J||(J={}));const tt={[Q.i.Regular]:void 0,[Q.i.Hard]:59,[Q.i.Expert]:60};var et;!function(q){q.RegularHeaderText="GO_TO_EASY_MODE",q.RegularBodyText="ARE_YOU_SURE_EASY_MODE",q.HardHeaderText="GO_TO_HARD_MODE",q.HardBodyText="ARE_YOU_SURE_HARD_MODE",q.ExpertHeaderText="GO_TO_EXPERT_MODE",q.ExpertBodyText="ARE_YOU_SURE_EXPERT_MODE",q.ZoneUnavailableForDifficultyText="ZONE_UNAVAILABLE_FOR_DIFFICULTY"}(et||(et={}))},9579:(q,K,z)=>{"use strict";z.d(K,{a:()=>at});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(1717),J=z(30226),tt=z(15821),et=z(58776);const it=JSON.parse('{"i":{"N4":{"requirements":[{"dynamicStoreItemPurchaseCount":{"id":"white-glove-service-normal-mode-restrictions-free-offer","purchaseCount":1}},{"accountCreationDate":{"after":1759354069533}},{"difficultyUnlocked":"hard"},{"restrictionMet":"normal-academy-27-pet-collection"}],"evaluationStrategy":"RequireNone"}}}'),st={[Z.$.Rescue]:"BATTLE_RULES_DESCRIPTION_PETS_RESCUED",[Z.$.EvolutionTier]:"BATTLE_RULES_DESCRIPTION_EVOLUTION_LEVEL",[Z.$.Element]:"BATTLE_RULES_DESCRIPTION_ELEMENTAL_PET",[Z.$.Level]:"BATTLE_RULES_DESCRIPTION_PET_LEVEL",[Z.$.MergeRank]:"BATTLE_RULES_DESCRIPTION_MERGE_RANK",[Z.$.Rarity]:"BATTLE_RULES_DESCRIPTION_RARITY"},nt={[Z.$.Rescue]:"BATTLE_RULES_DESCRIPTION_PETS_RESCUED_SINGULAR",[Z.$.EvolutionTier]:"BATTLE_RULES_DESCRIPTION_EVOLUTION_LEVEL_SINGULAR",[Z.$.Element]:"BATTLE_RULES_DESCRIPTION_ELEMENTAL_PET_SINGULAR",[Z.$.Level]:"BATTLE_RULES_DESCRIPTION_PET_LEVEL_SINGULAR",[Z.$.MergeRank]:"BATTLE_RULES_DESCRIPTION_MERGE_RANK_SINGULAR",[Z.$.Rarity]:"BATTLE_RULES_DESCRIPTION_RARITY_SINGULAR"};class at{static getRequirementsResult(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return X.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirements(q)}))}static isEligibleForFreePetPack(){return(0,Y.sH)(this,void 0,void 0,(function*(){return X.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirements(it.i.N4)}))}static hasReceivedFreePetPack(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=X.q.instance.prodigy.gameContainer.get("668-8a41"),K=(yield q.getTasksInProgress()).find((q=>{var K;return q.taskID===(null===(K=it.i.N4.requirements[0].dynamicStoreItemPurchaseCount)||void 0===K?void 0:K.id)}));return!!K&&K.taskProgress.status===et.t.COMPLETE}))}static markFreePetPackAsClaimed(){X.q.instance.prodigy.gameContainer.get("73c-5410").markFreeRestrictionOfferClaimed().catch(Q.RQr.createHandler("RestrictionHelper: Error marking free pet pack as claimed"))}static tryResetPlayerLastUnmetBattleRequirements(){const q=X.q.instance.prodigy.gameContainer.get("782-c308");q.data.lastUnmetBattleRequirements&&at.getRequirementsResult(q.data.lastUnmetBattleRequirements.featureRequirements).then((q=>{q&&at.resetPlayerLastUnmetBattleRequirements()})).catch(Q.RQr.createHandler("[RestrictedSpawnPointComponent]: Error opening battle restrictions popup with provided requirements"))}static resetPlayerLastUnmetBattleRequirements(){const q=X.q.instance.prodigy.gameContainer.get("782-c308");q.data.lastUnmetBattleRequirements=void 0,q.updated=!0}static getRuleDescriptionKey(q){var K;const z=at.getRuleType(q);return 1===q.petCount&&null!==(K=nt[z])&&void 0!==K?K:st[z]}static getRuleDescriptionArgs(q,K){var z,Y,Q,X,tt,et,it,st;switch(q){case Z.$.EvolutionTier:return null!==(Y=null===(z=null==K?void 0:K.evolutionTier)||void 0===z?void 0:z.toString())&&void 0!==Y?Y:"";case Z.$.Element:return null!==(Q=null==K?void 0:K.affinity)&&void 0!==Q?Q:"";case Z.$.Level:return null!==(tt=null===(X=null==K?void 0:K.level)||void 0===X?void 0:X.toString())&&void 0!==tt?tt:"";case Z.$.MergeRank:return null!==(it=null===(et=null==K?void 0:K.mergeRank)||void 0===et?void 0:et.toString())&&void 0!==it?it:"";case Z.$.Rarity:return J.J.convertRarityToText(null!==(st=null==K?void 0:K.rarity)&&void 0!==st?st:0);default:return""}}static getRuleType(q){return tt.A.isDefined(null==q?void 0:q.evolutionTier)?Z.$.EvolutionTier:tt.A.isDefined(null==q?void 0:q.affinity)?Z.$.Element:tt.A.isDefined(null==q?void 0:q.level)?Z.$.Level:tt.A.isDefined(null==q?void 0:q.mergeRank)?Z.$.MergeRank:tt.A.isDefined(null==q?void 0:q.rarity)?Z.$.Rarity:Z.$.Rescue}}},53040:(q,K,z)=>{"use strict";z.d(K,{y:()=>nt});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(642),J=z(35120),tt=z(2272),et=z(75329),it=z(99429),st=z(77997);class nt{static handleAbuseReportResponsePromise(q){return(0,Y.sH)(this,void 0,void 0,(function*(){try{200===(yield q).getHttpStatusCode()?nt.displayReportingSuccessDialog():nt.displayReportingFailureDialog()}catch(K){nt.displayReportingFailureDialog()}}))}static displayReportingSuccessDialog(){const q=J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);J.q.instance.prodigy.open.informationDialog(new et.Z(q.getText("BUTTON_OKAY"),void 0,tt.E.Small,it.K.CONFIRM_WIDTH,q.getText("REPORT_SUCCESS_TITLE"),q.getText("REPORT_SUCCESS_BODY"),void 0,void 0,void 0,X.l.DefaultHeader,X.l.DefaultFooter))}static displayReportingFailureDialog(){const q=J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);J.q.instance.prodigy.open.informationDialog(new et.Z(q.getText("BUTTON_OKAY"),void 0,tt.E.Small,it.K.CONFIRM_WIDTH,q.getText("REPORT_FAILED_TITLE"),q.getText("REPORT_FAILED_BODY"),void 0,void 0,void 0,X.l.ErrorDialogHeader,X.l.DefaultFooter))}static openReportHouseConfirmationDialog(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield J.q.instance.game.renderer.extract.base64(J.q.instance.game.world),K=J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);J.q.instance.prodigy.open.confirmationDialogNoIconButtons(new Z.k(K.getText("BUTTON_NO"),void 0,K.getText("BUTTON_YES"),(()=>{this.reportHouse(q)}),void 0,tt.E.Small,it.K.CONFIRM_WIDTH,K.getText("REPORT_MODAL_TITLE"),K.getText("CONFIRM_REPORT")))}))}static reportHouse(q){const K=J.q.instance.prodigy.gameContainer.get("a42-fa21"),z=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=J.q.instance.prodigy.world.getZone(J.q.instance.prodigy.world.getCurrentZone()).screen,X=null==Y?void 0:Y.saveTag.split("-").pop(),Z={clientID:st.Z,userID:z.userID.toString(),reportedUserID:null!=X?X:"",reason:"Inappropriate House",category:"House",screenshot:q};nt.handleAbuseReportResponsePromise(K.reportAbuse(Z)).catch(Q.RQr.createHandler("Error sending abuse report"))}}},87557:(q,K,z)=>{"use strict";z.d(K,{V:()=>it});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(35120),J=z(28152),tt=z(77997),et=z(53040);let it=class extends Q.uAl{setReportedUserID(q){this.reportedUserID=q}reportPlayer(q,K){if(!(0,X.isNumber)(this.reportedUserID))return;const z=Z.q.instance.prodigy.gameContainer.get("a42-fa21"),Y=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,J={clientID:tt.Z,userID:Y.userID.toString(),reportedUserID:this.reportedUserID.toString(),reason:K,category:q,screenshot:void 0};et.y.handleAbuseReportResponsePromise(z.reportAbuse(J)).catch(Q.RQr.createHandler("Error reporting player"))}};it=(0,Y.Cg)([(0,Q.EVk)("ReportPlayer",J.Y.reporting)],it)},77997:(q,K,z)=>{"use strict";z.d(K,{Z:()=>Y,v:()=>Q});const Y="1",Q="enableReporting"},5708:(q,K,z)=>{"use strict";z.d(K,{X:()=>Z});var Y=z(8674),Q=z(79687),X=z(6030);let Z=class{getRestrictionById(q){return X[q]}};Z=(0,Y.Cg)([(0,Q.injectable)()],Z)},37050:(q,K,z)=>{"use strict";z.d(K,{Q:()=>ct});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(77601),J=z(42448);const tt=(0,Z.gb)({key:"rifts-pet-reuse-data",default:{enabled:!1,portal:J.ni.Portal2,data:{reuseCostPerSecond:.01,petCooldownMs:36e5,costMultiplierPerUse:1}},activateAssociatedExperiments:0});var et,it=z(38170),st=z(35120),nt=z(34829),at=z(76277),rt=z(44094),ot=z(30226),ht=z(38560);let ct=et=class{constructor(){this._riftsTierTotalDataMap={[J.ni.Portal1]:void 0,[J.ni.Portal2]:void 0,[J.ni.Portal3]:void 0},this._lastRiftsDataFetchMapMs={[J.ni.Portal1]:void 0,[J.ni.Portal2]:void 0,[J.ni.Portal3]:void 0}}get riftsConfig(){return this._riftsConfig}get riftsTierTotalData(){return this.selectedPortalId?this._riftsTierTotalDataMap[this.selectedPortalId]:void 0}static getRiftsDataProvider(){return st.q.instance.prodigy.gameContainer.get("81d-5606")}fetchRiftsConfig(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._riftsConfig?this._lastRiftsConfigFetchMs&&it.r.toDateUtcMs(Date.now())-this._lastRiftsConfigFetchMs>nt.s.MINUTES_IN_MS&&(this._riftsConfig=yield this._riftsNetworkHandler.getRiftsConfig(),this._lastRiftsConfigFetchMs=it.r.toDateUtcMs(Date.now())):(this._riftsConfig=yield this._riftsNetworkHandler.getRiftsConfig(),this._lastRiftsConfigFetchMs=it.r.toDateUtcMs(Date.now()));const q=(0,at.G)(tt);return q.enabled&&this._riftsConfig[q.portal]&&(this._riftsConfig[q.portal].options.petReuseData=q.data),this._riftsConfig}))}fetchRiftsTierData(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this.selectedPortalId&&(this.selectedPortalId=yield this._riftsNetworkHandler.getSelectedPortalId(),!this.selectedPortalId))return;const q=this._lastRiftsDataFetchMapMs[this.selectedPortalId];try{this._riftsTierTotalDataMap[this.selectedPortalId]?q&&it.r.toDateUtcMs(Date.now())-q>nt.s.MINUTES_IN_MS&&(this._riftsTierTotalDataMap[this.selectedPortalId]=yield this._riftsNetworkHandler.getRiftsTierData(this.selectedPortalId),this._lastRiftsDataFetchMapMs[this.selectedPortalId]=it.r.toDateUtcMs(Date.now())):(this._riftsTierTotalDataMap[this.selectedPortalId]=yield this._riftsNetworkHandler.getRiftsTierData(this.selectedPortalId),this._lastRiftsDataFetchMapMs[this.selectedPortalId]=it.r.toDateUtcMs(Date.now()))}catch(K){return}return this._riftsTierTotalDataMap[this.selectedPortalId]}))}getRiftsPortalConfig(){if(this.selectedPortalId&&this._riftsConfig)return this._riftsConfig[this.selectedPortalId];Q.VyI.log("RiftsDataProvider: Missing data when attempting get the rifts portal config",Q.$bb.Error)}getActiveRiftsPortalIds(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.fetchRiftsConfig();if(!q)return;const K=Object.values(J.ni),z=[],Y=it.r.toDateUtcMs(Date.now());for(const X of K){const K=q[X];if(!K)continue;if(Q.Aq$.isDefined(K.enabled)&&!K.enabled)continue;const Z=K.startDate?it.r.toDateUtcMs(K.startDate):void 0,J=K.endDate?it.r.toDateUtcMs(K.endDate):void 0;(void 0===Z&&void 0===J||void 0===Z&&J&&J>Y||void 0===J&&Z&&ZY)&&z.push(X)}return z}))}getRiftRunEntryCost(q){var K,z,Y,Q;const X=et.getRiftsDataProvider().getRiftsPortalConfig();return null!==(Q=null===(Y=null===(z=null===(K=null==X?void 0:X.options)||void 0===K?void 0:K.entryCostData)||void 0===z?void 0:z[q])||void 0===Y?void 0:Y.quantity)&&void 0!==Q?Q:et._DEFAULT_ENTRY_COST}getRiftKeyMagicoinCost(){var q,K;const z=et.getRiftsDataProvider().getRiftsPortalConfig();return null!==(K=null===(q=null==z?void 0:z.options)||void 0===q?void 0:q.keyMagicoinCost)&&void 0!==K?K:et._DEFAULT_KEY_MAGICOIN_COST}getCurrentRiftsId(){var q;return null===(q=this.getRiftsPortalConfig())||void 0===q?void 0:q.riftsId}static getBuffRerollCost(q){var K,z,Y;const Q=et.getRiftsDataProvider().getRiftsPortalConfig();let X=et._DEFAULT_BUFF_REROLL_MAGICOIN_COST,Z=et._DEFAULT_BUFF_REROLL_MAGICOIN_COST_MULTIPLIER*q;return(null===(K=null==Q?void 0:Q.options)||void 0===K?void 0:K.buffRerollData)&&(X=null!==(z=Q.options.buffRerollData.baseMagicoinRerollCost)&&void 0!==z?z:et._DEFAULT_BUFF_REROLL_MAGICOIN_COST,Z=Math.pow(null!==(Y=Q.options.buffRerollData.rerollCostMultiplier)&&void 0!==Y?Y:et._DEFAULT_BUFF_REROLL_MAGICOIN_COST_MULTIPLIER,q)),Math.ceil(X*Z)}static getOpponentsRerollCost(q){var K,z,Y;const Q=et.getRiftsDataProvider().getRiftsPortalConfig();let X=et._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST,Z=et._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST_MULTIPLIER*q;return(null===(K=null==Q?void 0:Q.options)||void 0===K?void 0:K.opponentsRerollData)&&(X=null!==(z=Q.options.opponentsRerollData.baseMagicoinRerollCost)&&void 0!==z?z:et._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST,Z=Math.pow(null!==(Y=Q.options.opponentsRerollData.rerollCostMultiplier)&&void 0!==Y?Y:et._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST_MULTIPLIER,q)),Math.ceil(X*Z)}static canRerollBuff(q){var K;const z=et.getRiftsDataProvider().getRiftsPortalConfig();let Y;return(null===(K=null==z?void 0:z.options)||void 0===K?void 0:K.buffRerollData)&&(Y=z.options.buffRerollData.maxRerolls),void 0===Y||q{"use strict";z.d(K,{n:()=>St});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(85855),J=z(99625),tt=z(36648),et=z(24652),it=z(35120),st=z(23082),nt=z(20705),at=z(74958),rt=z(13956),ot=z(43714),ht=z(58707),ct=z(642),dt=z(2272),lt=z(53661),ut=z(54865),ft=z(80060),bt=z(71790),pt=z(37050),vt=z(1551),gt=z(43503),mt=z(68836),yt=z(14117),_t=z(68387),Et=z(90500),wt=z(72955),Tt=z(82781);class St extends nt.f{constructor(){super(...arguments),this.persistentPrefabs=[]}get modifierGridPrefab(){return this._modifierGridPrefab}init(q=wt.I){const K=X.wa5.getActiveScene().container;K.bind(Q.BattleConstants).to(Q.BattleConstants).asSingleton(),K.bind(Q.ConstantsDataProvider).to(bt.T).asSingleton(),it.q.instance.prodigy.load.assetsAsPromise([Z.V.Bgm_intro,tt.q.Sparkle]).then((()=>{it.q.instance.prodigy.audio.playBGM(Z.V.Bgm_intro,!0),it.q.instance.prodigy.audio.resumeBGM()})).catch(X.RQr.createHandler("Failed to load the Rifts into BGM.")),this.addBackgroundFill(q===Tt.Q?"#639D95":void 0),new ut.w(q).start().catch(X.RQr.createHandler("Failed to start the RiftsStateMachine"))}setRiftRunProgress(q){switch(mt.T.riftTier=q.currentRiftTier,q.type){case et.cn.Normal:mt.T.firstBattleCompleted=q.round>1;const K=it.q.instance.prodigy.gameContainer.get("20f-5f67");K.rifts.riftRunUuid=q.riftRunSegmentUuid,K.rifts.riftRunRoundUuid=q.riftRunRoundSegmentUuid,X.Aq$.isDefined(q.chosenOpponentTeamIndex)&&(mt.T.chosenOpponentTeamIndex=q.chosenOpponentTeamIndex,mt.T.chosenHomeTeamPetUids=q.chosenHomeTeamPetUids)}}resumeRiftRun(q){var K;if(mt.T.canResumeBattle=q,q)it.q.instance.game.state.start(st.G.Rifts,void 0,Tt.Q);else switch(null===(K=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===K?void 0:K.type){case et.cn.Normal:mt.T.sawBuffPopup=!1,it.q.instance.game.state.start(st.G.Rifts,void 0,Et.R);break;case et.cn.Boss:it.q.instance.game.state.start(st.G.Rifts,void 0,_t.O);break;default:gt.L.resetRiftRunProgressAndTeleportToDragonIsle(null).catch(X.RQr.createHandler("RiftsScreen: Failed to reset rift run progress and teleport to Dragon Isle when resuming a rift run with no specified rift tier type"))}}static onRiftRunClose(q){const K=it.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);it.q.instance.prodigy.open.confirmationDialog(new ct.k(K.getText("BUTTON_QUIT_CAPITAL"),(()=>{gt.L.resetRiftRunProgressAndTeleportToDragonIsle(q).catch(X.RQr.createHandler("RiftsScreen: Failed to reset rift run progress and teleport to Dragon Isle"))}),K.getText("BUTTON_BACK_CAPITAL"),(()=>it.q.instance.prodigy.open.menuCloseAll()),void 0,dt.E.Medium,void 0,K.getText("RIFT_RUN_CLOSE_POPUP_TITLE"),K.getText("RIFT_RUN_CLOSE_POPUP_BODY")))}addBackgroundFill(q="#ddb2a5"){const K=new X._mx;K.name="BackgroundFill",K.layer="background",K.addComponent(X.dLy);const z=K.addComponent(X.Lom);z.setSize(new X.or0(1920,1080)),z.setColor(q),X.wa5.getActiveScene().addGameObject(K)}initPersistentPrefabs(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.persistentPrefabs.length||(this.persistentPrefabs=yield Promise.all([vt.Q.addModifierGridPrefab().then((q=>this._modifierGridPrefab=q)),vt.Q.addProgressTrackPrefab()]))}))}destroyPersistentPrefabs(){for(const q of this.persistentPrefabs)q.destroy();this.persistentPrefabs.length=0}updateModifierGrid(){vt.Q.updateModifierGridPrefab(this._modifierGridPrefab)}showBuffPopup(){var q,K;const z=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!z)return void X.VyI.log("RiftsScreen: Cannot show buff popup if current rift run is undefined",X.$bb.Error);if(z.type!==et.cn.Normal)return void X.VyI.log("RiftsScreen: Cannot show buff popup if current rift run is not a normal rift",X.$bb.Error);const Y=z.buffModifier;if(!Y)return void X.VyI.log("RiftsScreen: Cannot show buff popup if buff modifier is undefined",X.$bb.Error);const Q=null!==(q=null==z?void 0:z.numBuffRerolls)&&void 0!==q?q:0,Z=pt.Q.canRerollBuff(Q),tt=pt.Q.getBuffRerollCost(Q),st=z.currentRiftTier,nt=it.q.instance.prodigy.gameContainer.get("bec-c6b4");it.q.instance.prodigy.open.prefabMenu(J.l.RiftRunModifierPopup,(()=>{var q;const K=null===(q=it.q.instance.prodigy.open.menus[it.q.instance.prodigy.open.menus.length-1].prefab.findComponentInChildren(ot.x))||void 0===q?void 0:q.GameObject;K&&vt.Q.animateModifierIconToGrid(K,0),this.injectToHeaderPrefab({[lt.bL.ShowMagicoin]:!nt.isHardCurrencyMemberLocked(tt)}).catch(X.RQr.createHandler("Failed to inject magicoin show into header prefab"))}),void 0,!0,!1,{IS_BUFF:!0,MODIFIER_ICON:St.getGuidForModifierIcon(null!==(K=Y.icon)&&void 0!==K?K:""),MODIFIER_NAME:Y.caption,MODIFIER_DESCRIPTION:Y.description,MODIFIER_GOLD_BONUS:0,MODIFIER_REROLL_COST:tt,SHOW_MC_COST:!nt.isHardCurrencyMemberLocked(tt),SHOW_MEMBER_ICON:nt.isHardCurrencyMemberLocked(tt),CAN_REROLL_MODIFIER:Z,MAGICOIN_BALANCE:nt.getBalance(27),RIFT_TIER:st});it.q.instance.prodigy.gameContainer.get("20f-5f67").rifts.sendRiftRunBonusOffered(Y),this.injectToHeaderPrefab({[lt.bL.ShowMagicoin]:!1}).catch(X.RQr.createHandler("Failed to inject magicoin show into header prefab"))}injectToHeaderPrefab(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._headerPrefab){const q=it.q.instance.prodigy.gameContainer.get("983-05a7");this._headerPrefab=yield q.loadWithDependenciesFromGUID(J.l.RiftRunMenuBackground),X.wa5.getActiveScene().addGameObject(this._headerPrefab)}ft.d.updateInjectedValues(this._headerPrefab,q)}))}handleNotEnoughCurrency(q,K){var z;this._headerPrefab||X.VyI.log("RiftsScreen: Cannot handle not enough currency since the header prefab is not initialized",X.$bb.Error);const Y=null===(z=this._headerPrefab)||void 0===z?void 0:z.findComponentInChildren(ht.b);null==Y||Y.tryDismissTooltip(),null==Y||Y.handleNotEnoughCurrency(q,at.Aj.RIFT_ENCOUNTER_REROLL_TYPE,K)}closeNotEnoughCurrencyTooltip(){var q;const K=null===(q=this._headerPrefab)||void 0===q?void 0:q.findComponentInChildren(ht.b);null==K||K.tryDismissTooltip()}shutdown(){var q;this.closeNotEnoughCurrencyTooltip(),null===(q=this._headerPrefab)||void 0===q||q.destroy(),this._headerPrefab=null,this.destroyPersistentPrefabs(),super.shutdown()}static getGuidForModifierIcon(q){return tt.q[`Effect_${q}_small`]}}(0,Y.Cg)([(0,rt.b)("687-0b09"),(0,Y.Sn)("design:type",yt.M)],St.prototype,"_riftsSyncedDataStore",void 0)},1551:(q,K,z)=>{"use strict";z.d(K,{Q:()=>bt});var Y,Q,X=z(8674),Z=z(62459),J=z(88022),tt=z(99625),et=z(24652),it=z(42448),st=z(35120),nt=z(29834),at=z(23082),rt=z(13956),ot=z(85515),ht=z(43714);!function(q){q.StepSpacing="STEP_SPACING",q.StepData="STEP_DATA"}(Y||(Y={})),function(q){q.TrackBackingColor="TRACK_BACKING_COLOR",q.OuterCircleColor="OUTER_CIRCLE_COLOR",q.InnerCircleColor="INNER_CIRCLE_COLOR",q.IconImage="ICON_IMAGE",q.IsCurrentStep="IS_CURRENT_STEP",q.ProgressIndicatorOuter="PROGRESS_INDICATOR_OUTER"}(Q||(Q={}));var ct,dt=z(80060),lt=z(77713),ut=z(39785),ft=z(68836);!function(q){q.DefaultBorderColor="#655466",q.CurrentStepBorderColor="#00466E",q.FinalCurrentStepBorderColor="#7D1E3D",q.CompletedStepBorderColor="#55772F",q.DefaultInnerCircleColor="#ABA5C4",q.CurrentStepInnerCircleColor="#3D99D1",q.FinalCurrentStepInnerCircleColor="#F68F00",q.CompletedStepInnerCircleColor="#A6C755"}(ct||(ct={}));class bt{static addProgressTrackPrefab(){return(0,X.sH)(this,arguments,void 0,(function*(q=this.PROGRESS_TRACK_X,K=this.PROGRESS_TRACK_Y){const z=yield dt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,tt.l.ProgressTrack,this.getProgressTrackInjectionData());return z.transform.setPosition(q,K),z}))}static getProgressTrackInjectionData(){const q=st.q.instance.prodigy.gameContainer.get("687-0b09").cache.currentRiftRunProgress,K=(null==q?void 0:q.type)===et.cn.Normal?it.vP:1,z=(null==q?void 0:q.type)===et.cn.Normal?q.round:1;return{[Y.StepSpacing]:20,[Y.StepData]:Array.from({length:K},((q,Y)=>{const X=Y===z-1,Z=Y===K-1,tt=Y0?this.getModifierGridInjectionData():this.getEmptyModifierGridInjectionData());return Y.transform.setPosition(q,K),Y}))}static updateModifierGridPrefab(q){const K=this.getModifierGridInjectionData();q.findComponentInChildren(lt.h).GameObject.children.forEach(((q,z)=>{dt.d.updateInjectedValues(q,K.MODIFIERS[z])}))}static getModifierGridInjectionData(){const q=st.q.instance.prodigy.gameContainer.get("687-0b09").cache.currentRiftRunProgress;if(!q)return{MODIFIERS:[]};switch(q.type){case et.cn.Boss:return{MODIFIERS:q.bossRiftModifiers.map((q=>({IS_BUFF:!1,DISABLED:!1,MODIFIER_ICON:ut.n.getGuidForModifierIcon(q.icon),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:q.caption,MODIFIER_TOOLTIP_TEXT:q.description})))};case et.cn.Normal:const K=q.buffModifier,z=[...q.chosenNerfModifiers];return ft.T.chosenModifier&&z.push(ft.T.chosenModifier),{MODIFIERS:[{IS_BUFF:!0,DISABLED:!1,MODIFIER_ICON:ut.n.getGuidForModifierIcon(K.icon),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:K.caption,MODIFIER_TOOLTIP_TEXT:K.description},...z.map((q=>({IS_BUFF:!1,DISABLED:!1,MODIFIER_ICON:ut.n.getGuidForModifierIcon(q.icon),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:q.caption,MODIFIER_TOOLTIP_TEXT:q.description}))),...Array.from({length:3-z.length},(()=>({IS_BUFF:!1,DISABLED:!0})))]};default:return{MODIFIERS:[]}}}static getEmptyModifierGridInjectionData(){return{MODIFIERS:Array.from({length:4},(()=>({IS_BUFF:!1,DISABLED:!0})))}}static animateModifierIconToGrid(q,K){const z=q.findComponentInChildren(nt.j),Y=z.GameObject.parent,Q=st.q.instance.game.state.get(at.G.Rifts),X=q.findComponentInChildren(ht.x),J=Q.modifierGridPrefab.children[0].children[K].transform;Y.active=!0;const tt=q.transform.worldPosition;q.layer=ot.E.UiLayer,q.parent=null,q.transform.worldPosition=tt,X.setMovement(J.worldPosition.x-J.fullWidth/2,J.worldPosition.y-J.fullHeight/2),X.startTween(),X.onComplete.addOnce((()=>{var K;null===(K=q.findComponentInChildren(Z.okU))||void 0===K||K.destroy(),z.GameObject.active=!0,z.playAnimation("add-fx",!1),z.OnAnimationComplete.addOnce((()=>{q.destroy(),Q.updateModifierGrid()}))}))}}bt.PROGRESS_TRACK_X=1243,bt.PROGRESS_TRACK_Y=134,bt.MODIFIER_GRID_X=37,bt.MODIFIER_GRID_Y=134,bt.MODIFIER_GRID_X_IN_BATTLE=18,bt.MODIFIER_GRID_Y_IN_BATTLE=50,(0,X.Cg)([(0,rt.b)("983-05a7"),(0,X.Sn)("design:type",Z.wNP)],bt,"_prefabLoader",void 0)},43503:(q,K,z)=>{"use strict";z.d(K,{L:()=>vt});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(36648),J=z(24227),tt=z(24652),et=z(42448),it=z(90633),st=z(73678),nt=z(38170);class at{static ceilAboveEpsilon(q){return Math.ceil(q-at.EPSILON)}static round(q,K){const z=Math.pow(10,K);return Math.round(q*z)/z}static weightedRandom(q,K=100){var z;const Y=q.reduce(((q,z)=>{var Y;return q+(null!==(Y=z.weight)&&void 0!==Y?Y:K)}),0);let Q=Math.random()*Y;for(const X of q)if(Q-=null!==(z=X.weight)&&void 0!==z?z:K,Q<=0)return X;return q[0]}}at.EPSILON=1e-4;var rt=z(35120),ot=z(91207),ht=z(77938),ct=z(46784),dt=z(65050),lt=z(41674),ut=z(44094),ft=z(97447),bt=z(30226),pt=z(24409);class vt{static getWeightedRouletteReward(q){const K=at.weightedRandom(q),z=ht.t.getItem(K.type,K.id),Y=null==z?void 0:z.data;if(!z||!Y)return Q.VyI.log("RiftsUtil#getWeightedRouletteReward: Item not found",Q.$bb.Error),null;return{type:K.type,ID:K.id,N:K.quantity,data:{name:bt.J.getLocalizationNameKey(Y),flavorText:bt.J.getLocalizationFlavorKey(Y),rarity:Y.rarity}}}static visuallyAdjustDragonRouletteRewards(q){const K=q.reduce(((q,K)=>q+K.weight),0),z=q.filter((q=>"gold"===q.type||"currency"===q.type)).reduce(((q,K)=>q+K.weight),0),Y=K-z;let Q=1,X=1;if(Y>0){const q=.3;Q=K*(1-q)/z,X=K*q/Y}return q.map((q=>{const K="gold"===q.type||"currency"===q.type?q.weight*Q:q.weight*X;return{type:q.type,ID:q.id,N:q.quantity,R:K}}))}static canResumeRiftRun(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,X,Z;const J=rt.q.instance.prodigy.gameContainer.get("81d-5606"),tt=rt.q.instance.prodigy.gameContainer.get("687-0b09"),[et,it,st]=yield Promise.all([J.fetchRiftsConfig(),J.fetchRiftsTierData(),J.getActiveRiftsPortalIds()]),nt=null!==(K=null===(q=tt.cache.currentRiftRunProgress)||void 0===q?void 0:q.currentRiftTier)&&void 0!==K?K:void 0;return!(!(et&&it&&J.selectedPortalId&&(null===(z=et[J.selectedPortalId])||void 0===z?void 0:z.riftsId)===(null===(Y=null==tt?void 0:tt.cache)||void 0===Y?void 0:Y.currentRiftsId))||Q.Aq$.isDefined(nt)&&(null===(X=it[nt])||void 0===X?void 0:X.type)!==(null===(Z=tt.cache.currentRiftRunProgress)||void 0===Z?void 0:Z.type)||!(null==st?void 0:st.includes(J.selectedPortalId)))}))}static resetRiftRunProgressAndTeleportToDragonIsle(q){return(0,Y.sH)(this,void 0,void 0,(function*(){q?yield q.goToState(pt.y):rt.q.instance.prodigy.world.it(ft.j.MAP_KEY),yield rt.q.instance.prodigy.gameContainer.get("04c-7c61").resetRiftRun()}))}static getBossDisplayDataFromBossType(q){var K;const z=rt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),Y=J.j.getBossElementFromBossType(q);let X="",Z="",et="",it="";const st=tt.vA[q];return X=st?z.getText(st):ut.$.toTitleCase(q),et=tt.rI[q][0],it=null!==(K=tt.rI[q][1])&&void 0!==K?K:"",Z=tt.Hz[q],{name:X,keyPoseAtlasGuid:et,keyPoseFrame:it,element:Y,tierBackgroundImageGuid:Z}}static setUpIconGuidOverrides(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=rt.q.instance.prodigy.gameContainer.get("81d-5606"),z=yield K.fetchRiftsConfig();for(const Y of et.T7){const K=et.JG[Y];if(!z||!Q.Aq$.isDefined(K))continue;const X=null===(q=z[K])||void 0===q?void 0:q.currencyTheme;if(!X)continue;const J=`Rifts_currency_${X}`;Z.q[J]&&(ot.P[`Icon_currency_${Y}`]=Z.q[J],ot.P[`Icon_currency_${Y}_store`]=Z.q[`${J}_store`])}}))}static shouldShowRiftsCycleModal(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=rt.q.instance.prodigy.gameContainer.get("81d-5606"),z=yield K.fetchRiftsConfig();if(!z)return!1;const Y=rt.q.instance.prodigy.gameContainer.get("782-c308");let Q=!1;return Object.values(et.ni).forEach((K=>{this.checkRiftsCycleData(z[K],K,q)&&(Q=!0)})),Y.forceSaveCharacter(),Q}))}static checkRiftsCycleData(q,K,z){var Y,Q,X,Z,J,tt,et,at,ot,ht,ct,dt,lt,ut;let ft=!0,bt=!0;const pt=null!==(Y=(ut=rt.q.instance.prodigy.gameContainer.get("782-c308").data).rifts)&&void 0!==Y?Y:ut.rifts={};null!==(Q=pt.cycleData)&&void 0!==Q||(pt.cycleData={});const vt=nt.r.toDateUtcMs(Date.now()),gt=(null==q?void 0:q.startDate)?nt.r.toDateUtcMs(q.startDate):void 0,mt=(null==q?void 0:q.endDate)?nt.r.toDateUtcMs(q.endDate):void 0;let yt=null!==(Z=null===(X=pt.cycleData[K])||void 0===X?void 0:X.modalSeenCount)&&void 0!==Z?Z:0,_t=null!==(tt=null===(J=pt.cycleData[K])||void 0===J?void 0:J.skippedResets)&&void 0!==tt?tt:0;return(null===(et=null==q?void 0:q.options.cycleModalData)||void 0===et?void 0:et.cycleId)!==(null===(at=pt.cycleData[K])||void 0===at?void 0:at.lastSeenCycleId)&&(yt=0,_t=0),z!==st.A_.DRAGONISLE?(ft=!1,bt=!1):(null==q?void 0:q.enabled)?gt&>>vt||mt&&mt=q.options.cycleModalData.maxTimesSeen?ft=!1:(null===(dt=null==q?void 0:q.options.cycleModalData)||void 0===dt?void 0:dt.riftsToSkipCount)&&yt>0&&_t{"use strict";z.d(K,{L:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{enter(q=0,K){const z=function(){this.gameObject.active=!0,this._cardEnterTween.resetToStart(),this._cardEnterTween.playAnimation(),K&&this._cardEnterTween.onTweenComplete.addOnce(K)}.bind(this);window.setTimeout(z,q)}exit(q=0,K){const z=function(){this._cardExitTween.playAnimation(),this._cardExitTween.onTweenComplete.addOnce((()=>{K&&K()}))}.bind(this);window.setTimeout(z,q)}};(0,Y.Cg)([(0,Q.MnK)(Q.bTj),(0,Y.Sn)("design:type",Q.bTj)],Z.prototype,"_cardEnterTween",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.bTj),(0,Y.Sn)("design:type",Q.bTj)],Z.prototype,"_cardExitTween",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("RiftRunOpponentCardAnimationController",X.Y.rifts)],Z)},68836:(q,K,z)=>{"use strict";z.d(K,{T:()=>Q});class Y{static clear(){this.chosenModifier=null,this.riftTier=1,this.chosenHomeTeamPetUids=void 0,this.sawBuffPopup=!1}}Y.riftTier=1,Y.sawBuffPopup=!1;class Q extends Y{static clear(){super.clear(),this.chosenOpponentTeamIndex=-1,this.usedPetUids=[],this.reward=void 0,this.isFinalBattle=!1,this.firstBattleCompleted=!1,this.canResumeBattle=!1}}Q.chosenOpponentTeamIndex=-1,Q.usedPetUids=[],Q.isFinalBattle=!1},14117:(q,K,z)=>{"use strict";z.d(K,{M:()=>nt,R:()=>Q});var Y,Q,X=z(8674),Z=z(62459),J=z(79687),tt=z(24652),et=z(35120),it=z(35537),st=z(24227);!function(q){q[q.Available=1]="Available",q[q.OnCooldown=2]="OnCooldown",q[q.Expired=3]="Expired"}(Q||(Q={}));let nt=class{constructor(){this[Y]="riftsSyncedData"}get cache(){return this._cache}init(q){Z.Aq$.isDefined(this._cache)?Z.VyI.log("RiftsSyncedDataStore was already initialized",Z.$bb.Warning):this._cache=q}getUsedPetMetadata(q){var K,z,Y,Q;const X=et.q.instance.prodigy.gameContainer.get("81d-5606");if(!Z.Aq$.isDefined(X.selectedPortalId))return;const J=null===(z=null===(K=this._cache[X.selectedPortalId])||void 0===K?void 0:K.metaProgress.usedPetData)||void 0===z?void 0:z[q];return(null===(Y=this._cache.currentRiftRunProgress)||void 0===Y?void 0:Y.type)===tt.cn.Normal&&Z.Aq$.isDefined(J)&&(null===(Q=this._cache.currentRiftRunProgress)||void 0===Q?void 0:Q.usedPetUids.includes(q))?{timestamp:void 0,currentlyAvailable:!1,reuseCount:0}:J}getUsedPetReuseCost(q){var K,z;const Y=this.getUsedPetMetadata(q),Q=null===(z=null===(K=et.q.instance.prodigy.gameContainer.get("81d-5606").getRiftsPortalConfig())||void 0===K?void 0:K.options)||void 0===z?void 0:z.petReuseData;return Z.Aq$.isDefined(null==Y?void 0:Y.timestamp)&&Q?st.j.getRiftsPetReuseCost(Y,Q,Date.now()):0}isPetAvailableForUse(q){return this.getPetCooldownStatus(q)!==Q.OnCooldown}getPetCooldownStatus(q){var K,z;const Y=this.getUsedPetMetadata(q),X=et.q.instance.prodigy.gameContainer.get("81d-5606");if(!Y)return Q.Available;const J=Y.currentlyAvailable?Q.Available:Q.OnCooldown;if(void 0===Y.timestamp||Y.currentlyAvailable)return J;const tt=null===(z=null===(K=X.getRiftsPortalConfig())||void 0===K?void 0:K.options)||void 0===z?void 0:z.petReuseData;return Z.Aq$.isDefined(tt)&&void 0!==(null==tt?void 0:tt.petCooldownMs)?Date.now()>=Y.timestamp+tt.petCooldownMs?Q.Expired:Q.OnCooldown:J}hasUsedPets(){var q,K,z;if((null===(q=this._cache.currentRiftRunProgress)||void 0===q?void 0:q.type)!==tt.cn.Normal)return!1;const Y=et.q.instance.prodigy.gameContainer.get("81d-5606");return(null===(K=this._cache.currentRiftRunProgress)||void 0===K?void 0:K.usedPetUids.length)>0||Object.values(null!==(z=this._cache[Y.selectedPortalId].metaProgress.usedPetData)&&void 0!==z?z:{}).length>0}[(Y=it.sE,it.JN)](q){return(0,X.sH)(this,void 0,void 0,(function*(){this._cache=q}))}getRiftsEntityPortalEntryData(){const q=et.q.instance.prodigy.gameContainer.get("81d-5606");if(q.selectedPortalId)return this._cache[q.selectedPortalId];Z.VyI.log("RiftsSyncedDataStore: No selected portal ID when attempting to fetch the portal entry data",Z.$bb.Error)}};nt=(0,X.Cg)([(0,J.injectable)()],nt)},68387:(q,K,z)=>{"use strict";z.d(K,{O:()=>lt});var Y,Q=z(8674),X=z(87490),Z=z(62459),J=z(68910),tt=z(88022),et=z(99625),it=z(24652),st=z(35120),nt=z(23082),at=z(53661),rt=z(37050),ot=z(39785),ht=z(43503),ct=z(11673),dt=z(53027);!function(q){q.AllModifierData="ALL_MODIFIER_DATA",q.OnNext="ON_NEXT",q.BossKeyPose="BOSS_KEY_POSE",q.BossName="NAME",q.WeaknessIcon="WEAKNESS_ICON",q.BossIsSilhouetted="BOSS_IS_SILHOUETTED",q.ShowBossInfo="SHOW_INFO"}(Y||(Y={}));class lt extends ct.O{constructor(){super(...arguments),this.bossBackgroundColors={[X.EElementType.Fire]:{background:"#E2B48B",pattern:"#F1C69C"},[X.EElementType.Ice]:{background:"#86B5C6",pattern:"#96C5D6"},[X.EElementType.Plant]:{background:"#C1CC90",pattern:"#D4DFA6"},[X.EElementType.Storm]:{background:"#A58EAF",pattern:"#B49EBE"},[X.EElementType.Water]:{background:"#93A9E9",pattern:"#A3B9F9"},[X.EElementType.Shadow]:{background:"#9F99BD",pattern:"#ABA5C7"},[X.EElementType.Physical]:{background:"#93877B",pattern:"#9F9387"},[X.EElementType.Astral]:{background:"#E3D09D",pattern:"#F2DFAE"}}}enter(){const q=Object.create(null,{enter:{get:()=>super.enter}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const z=st.q.instance.game.state.get(nt.G.Rifts),Q=yield ht.L.canResumeRiftRun(),ct=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!z||!Q||(null==ct?void 0:ct.type)!==it.cn.Boss||!ct.bossType)return void(yield ht.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));yield z.initPersistentPrefabs();const lt=ht.L.getBossDisplayDataFromBossType(ct.bossType),ut=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData(),ft=this.bossBackgroundColors[lt.element],bt=this.getRestriction(),pt=rt.Q.getRestrictionBadgeData(bt);this._prefabHeaderInjectionValues={[at.bL.HeaderTitle]:lt.name,[at.bL.OnClose]:()=>{ot.n.onRiftRunClose(this._stateMachine)},[at.bL.ShowRiftKeys]:!1,[at.bL.BackgroundHex]:ft.background,[at.bL.GradientHex]:J.Color.shared.setValue(ft.background.toLowerCase()).toNumber(),[at.bL.DiamondsHex]:ft.pattern,[at.bL.DiamondsAlpha]:.8};const vt=Z.wa5.getActiveScene().container.get(X.BattleConstants),gt=!Z.Aq$.isDefined(null===(K=ut.metaProgress.bossDefeats)||void 0===K?void 0:K[ct.bossType]);this._prefabGUID=et.l.BossRiftScreen,this._prefabInjectionValues={[Y.AllModifierData]:ct.bossRiftModifiers.map((q=>({IS_BUFF:!1,DISABLED:!1,MODIFIER_ICON:ot.n.getGuidForModifierIcon(q.icon),MODIFIER_NAME:q.caption,MODIFIER_DESCRIPTION:q.description,MODIFIER_TEXT:"",MODIFIER_GOLD_BONUS:0}))),[Y.BossKeyPose]:[lt.keyPoseAtlasGuid,lt.keyPoseFrame],[Y.BossName]:lt.name,[Y.WeaknessIcon]:[tt._.Ui_battle_revamp_json,`icon-mini-element-${vt.getElementalWeakness(lt.element)}`],[Y.BossIsSilhouetted]:gt,[Y.ShowBossInfo]:!gt,[Y.OnNext]:()=>{this._stateMachine.goToState(dt.t).catch(Z.RQr.createHandler("BossRiftScreenState: Error transitioning to TeamSelectionState"))},[at.Fm.ShowRestrictionBadge]:pt.showRestrictionBadge,[at.Fm.RestrictionBadgeTest]:pt.restrictionBadgeText},yield q.enter.call(this)}))}}},86498:(q,K,z)=>{"use strict";z.d(K,{j:()=>tt});var Y=z(8674),Q=z(35120),X=z(68836),Z=z(72955),J=z(11673);class tt extends J.O{enter(){const q=Object.create(null,{enter:{get:()=>super.enter}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield q.enter.call(this);Q.q.instance.prodigy.gameContainer.get("20f-5f67").rifts.cachedCurrentBossRiftProgress=void 0,X.T.clear(),yield this._stateMachine.goToState(Z.I)}))}}},84060:(q,K,z)=>{"use strict";z.d(K,{n:()=>et});var Y=z(8674),Q=z(90633),X=z(35120),Z=z(68836),J=z(72955),tt=z(87427);class et extends tt.I{enter(){const q=Object.create(null,{enter:{get:()=>super.enter}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield q.enter.call(this);const K=Z.T.firstBattleCompleted&&!X.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Q.B.FEATURE_RIFTS,Q.B.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN),z=Z.T.firstBattleCompleted;Z.T.clear(),this._segment.rifts.cachedCurrentNormalRiftProgress=void 0,this._segment.rifts.riftInstanceUuid=void 0,K?X.q.instance.prodigy.world.playScene("dragon_isle-postFirstRift"):yield this._stateMachine.goToState(J.I,{didRiftBattle:z})}))}}},24409:(q,K,z)=>{"use strict";z.d(K,{y:()=>et});var Y=z(8674),Q=z(24652),X=z(35120),Z=z(97447),J=z(68836),tt=z(87427);class et extends tt.I{enter(){const q=Object.create(null,{enter:{get:()=>super.enter}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield q.enter.call(this);let K=!1;const z=this._riftsSyncedDataStore.cache.currentRiftRunProgress;switch(null==z?void 0:z.type){case Q.cn.Boss:this._segment.rifts.cachedCurrentBossRiftProgress=void 0,K=!0,J.T.clear();break;case Q.cn.Normal:this._segment.rifts.cachedCurrentNormalRiftProgress=void 0,this._segment.rifts.riftInstanceUuid=void 0,K=J.T.firstBattleCompleted,J.T.clear()}this._segment.rifts.riftInstanceUuid=void 0,X.q.instance.prodigy.world.it(Z.j.MAP_KEY,void 0,void 0,{didRiftBattle:K})}))}}},53232:(q,K,z)=>{"use strict";z.d(K,{X:()=>it});var Y=z(8674),Q=z(24652),X=z(68836),Z=z(43503),J=z(86498),tt=z(84060),et=z(11673);class it extends et.O{enter(){const q=Object.create(null,{enter:{get:()=>super.enter}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield q.enter.call(this);const K=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!K)return X.T.clear(),void(yield Z.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));switch(null==K?void 0:K.type){case Q.cn.Boss:yield this._stateMachine.goToState(J.j);break;case Q.cn.Normal:yield this._stateMachine.goToState(tt.n)}}))}}},90500:(q,K,z)=>{"use strict";z.d(K,{R:()=>Dt});var Y,Q=z(8674),X=z(87490),Z=z(62459),J=z(68910),tt=z(88022),et=z(99625),it=z(36648),st=z(54300),nt=z(24652),at=z(42448),rt=z(35120),ot=z(77938),ht=z(23082),ct=z(74958),dt=z(90744),lt=z(13956),ut=z(43714),ft=z(64353),bt=z(95057),pt=z(53661),vt=z(22023),gt=z(80060),mt=z(44094),yt=z(77713),_t=z(47255),Et=z(37050),wt=z(39785),Tt=z(1551),St=z(43503),At=z(82436),Ct=z(68836),Ot=z(11673),It=z(53027);!function(q){q.AllOpponentsData="ALL_OPPONENTS_DATA",q.RerollOpponents="REROLL_OPPONENTS",q.ContentAlphaTween="CONTENT_ALPHA_TWEEN",q.OpponentTeamData="OPPONENT_TEAM_DATA",q.IsMemberOption="IS_MEMBER_OPTION",q.IsMemberOptionLocked="IS_MEMBER_OPTION_LOCKED",q.CardSelectedCallback="CARD_SELECTED_CALLBACK",q.ModifierIcon="MODIFIER_ICON",q.ModifierName="MODIFIER_NAME",q.ModifierDescription="MODIFIER_DESCRIPTION",q.ModifierGoldBonus="MODIFIER_GOLD_BONUS",q.PetId="PET_ID",q.PetName="PET_NAME",q.WeaknessIcon="WEAKNESS_ICON",q.PetScale="PET_SCALE",q.PetWidthLimit="PET_WIDTH_LIMIT",q.PetHeightLimit="PET_HEIGHT_LIMIT",q.OnPetLoaded="ON_PET_LOADED",q.IsRarePet="IS_RARE_PET",q.InputBlock="INPUT_BLOCK"}(Y||(Y={}));class Dt extends Ot.O{constructor(){super(...arguments),this._teamLoadedFlags=[!1,!1,!1]}enter(){const q=Object.create(null,{enter:{get:()=>super.enter}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,X,J,tt,it;if(!((yield this.updateCachedRiftRunProgress())&&(yield St.L.canResumeRiftRun())&&Z.Aq$.isDefined(this._currentRiftProgress.nextOpponentTeamOptions)))return void(yield St.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));this._segment.rifts.sendRiftRunOpponentSelectionMenuOpenedEvent(),Ct.T.chosenModifier=null;const nt=rt.q.instance.game.state.get(ht.G.Rifts);yield nt.initPersistentPrefabs();const ot=null!==(K=this._currentRiftProgress.numOpponentRerolls)&&void 0!==K?K:0,ct=Et.Q.canRerollOpponents(ot),dt=Et.Q.getOpponentsRerollCost(ot),lt=rt.q.instance.prodigy.gameContainer.get("bec-c6b4"),ut=this.getRiftsKeyId(),ft=null!==(X=null===(z=this._secureInventory.get({type:"riftRunKey",id:ut}))||void 0===z?void 0:z.quantity)&&void 0!==X?X:0,bt=rt.q.instance.prodigy.gameContainer.get("81d-5606"),vt=bt.getRiftsPortalConfig();let gt=at.X5.Default,mt=!1;vt&&bt.selectedPortalId&&(gt=null!==(J=null==vt?void 0:vt.menuTheme)&&void 0!==J?J:at.X5.Default,mt=null!==(tt=null==vt?void 0:vt.storeEnabled)&&void 0!==tt&&tt),this._prefabHeaderInjectionValues={[pt.bL.HeaderTitle]:this._localizer.getText("RIFTS_HEADER_TITLE_OPPONENT_SELECTION"),[pt.bL.OnClose]:()=>wt.n.onRiftRunClose(this._stateMachine),[pt.bL.ShowHeaderText]:!0,[pt.bL.ShowMagicoin]:!lt.isHardCurrencyMemberLocked(dt),[pt.bL.ShowMagicoinText]:!1,[pt.bL.ShowRiftKeys]:!1,[pt.bL.StoreEnabled]:mt,[pt.bL.StoreKey]:bt.selectedPortalId?at.d[bt.selectedPortalId]:void 0,[pt.bL.RiftCurrencyId]:at.Ty[null!==(it=bt.selectedPortalId)&&void 0!==it?it:at.ni.Portal1],[pt.bL.RiftKeyAmount]:this.getRiftKeyComparisonText(ft),[pt.bL.RiftKeyIcon]:st.p[`riftRunKey-${ut}`],[pt.bL.BackgroundHex]:at.a6[gt],[pt.bL.GradientHex]:at.aK[gt],[pt.bL.DiamondsHex]:at.h5[gt],[pt.bL.DiamondsAlpha]:at.VS[gt]},this._prefabGUID=et.l.RiftRunOpponentSelection,this._prefabInjectionValues={[Y.AllOpponentsData]:this.getAllOpponentTeamsData(this._currentRiftProgress.nextOpponentTeamOptions,this._currentRiftProgress),[Y.RerollOpponents]:()=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.rerollOpponents()})),[pt.bL.OpponentsRerollCost]:dt,[pt.bL.ShowRerollMagicoinCost]:!lt.isHardCurrencyMemberLocked(dt),[pt.bL.ShowRerollMemberIcon]:lt.isHardCurrencyMemberLocked(dt),[pt.bL.CanRerollOpponents]:ct},yield q.enter.call(this)}))}updateCachedRiftRunProgress(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._riftsSyncedDataStore.cache.currentRiftRunProgress;return q&&q.type===nt.cn.Normal?(this._currentRiftProgress=q,!0):(yield St.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine),!1)}))}onOpponentCardsSpawned(q){this._teamLoadedFlags[q]=!0,this._teamLoadedFlags.indexOf(!1)>=0||this.showOpponentCardAnimation(!0)}getAllOpponentTeamsData(q,K,z=!1){return z||this._segment.rifts.sendRiftRunEncounterOffered(q,K.currentRiftTier),q.map(((q,K)=>this.getAllOpponentsData(q,K)))}getAllOpponentsData(q,K){this._teamLoadedFlags=[!1,!1,!1];const z=2===K,X={petsToLoad:q.petIds.length,teamIndex:K};return{[Y.CardSelectedCallback]:()=>(0,Q.sH)(this,void 0,void 0,(function*(){var Y;if(!z||this._player.hasMembership()){Ct.T.chosenOpponentTeamIndex=K,Ct.T.chosenModifier=q.nerfModifier;const z=null===(Y=this._prefabRoot.children[0].children[K].findComponentInChildren(ut.x))||void 0===Y?void 0:Y.GameObject;z&&Tt.Q.animateModifierIconToGrid(z,this._currentRiftProgress.round),this._stateMachine.goToState(It.t).catch(Z.RQr.createHandler("Failed to go to TeamSelectionState"))}else yield this.openMembershipPrompt()})),[Y.IsMemberOption]:z,[Y.IsMemberOptionLocked]:z&&!this._player.hasMembership(),[Y.ModifierIcon]:it.q[`Effect_${q.nerfModifier.icon}_small`],[Y.ModifierName]:q.nerfModifier.caption,[Y.ModifierDescription]:q.nerfModifier.description,[Y.ModifierGoldBonus]:q.nerfModifier.goldReward,[Y.OpponentTeamData]:q.petIds.map((q=>this.getOpponentDataFromPetID(q,X)))}}getOpponentDataFromPetID(q,K){var z,Q;const et=rt.q.instance.prodigy.gameContainer.get("81d-5606").getRiftsPortalConfig(),it=ot.t.getItem("pet",q),st=vt.P8.getElementType(it),nt=Z.wa5.getActiveScene().container.get(X.BattleConstants).getElementalWeakness(st);return{[Y.IsRarePet]:null!==(z=null==et?void 0:et.options.rarePetIds.includes(q))&&void 0!==z&&z,[Y.PetId]:q,[Y.PetName]:null===(Q=null==it?void 0:it.data)||void 0===Q?void 0:Q.name,[Y.WeaknessIcon]:[tt._.Ui_battle_revamp_json,`icon-mini-element-${nt}`],[Y.PetScale]:[-1,1],[Y.PetWidthLimit]:180,[Y.PetHeightLimit]:120,[Y.OnPetLoaded]:q=>{var z;null===(z=q.getSpine().pixiSpine)||void 0===z||z.hackTextureBySlotName("shadow",J.Texture.EMPTY);const Y=q.getRootContainer().getBounds(),Q=q.GameObject.transform.worldPosition.y-Y.bottom;q.GameObject.transform.setPosition(0,Q),0==--K.petsToLoad&&this.onOpponentCardsSpawned(K.teamIndex)}}}openMembershipPrompt(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q={round:this._currentRiftProgress.round,nerf_modifier:this._currentRiftProgress.nextOpponentTeamOptions[2].nerfModifier,opponent_team_pet_ids:this._currentRiftProgress.nextOpponentTeamOptions[2].petIds},K=ft.P.shouldUseUnifiedConversionFlow(_t.o.FunnelRiftRunMemberLockedOpponentOption)?bt.R.UnifiedConversionFlow:bt.R.DynamicMemberPrompt;return rt.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:"Rift-Run-Member-Locked-Opponent-Option",category:"Rifts",contentId:JSON.stringify(q),adType:K,adVersion:ft.P.getAdVersion(_t.o.FunnelRiftRunMemberLockedOpponentOption)}),new Promise((K=>{rt.q.instance.prodigy.open.membershipInfo(K,{conversionFunnelName:_t.o.FunnelRiftRunMemberLockedOpponentOption,conversionFunnelMetadata:JSON.stringify(q)})}))}))}rerollOpponents(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z;const Q=null!==(K=null===(q=this._currentRiftProgress)||void 0===q?void 0:q.numOpponentRerolls)&&void 0!==K?K:0,X={currency:27,value:Et.Q.getOpponentsRerollCost(Q)};if(!this._paymentManager.canAfford(X)){const q=JSON.stringify(null===(z=this._currentRiftProgress)||void 0===z?void 0:z.nextOpponentTeamOptions);return void rt.q.instance.game.state.get(ht.G.Rifts).handleNotEnoughCurrency(X,q)}Z.wa5.getActiveScene().container.get(Y.InputBlock).GameObject.active=!0;const J=this._segment.item.beginSecureItemTransaction();this._riftsNetworkHandler.rerollRiftOpponents().then((()=>{this.showOpponentCardAnimation(!1);const q=Object.assign(Object.assign({},this._segment.rifts.getRiftTransactionData()),{sink_type:ct.Aj.RIFT_ENCOUNTER_REROLL_TYPE,sink_id:mt.$.generateUID()});this._segment.rifts.sendRiftRunEncounterRerolled(this._currentRiftProgress.nextOpponentTeamOptions,this._currentRiftProgress.currentRiftTier,X.value,q.transaction_id,q.sink_id),J.flush(q)})).catch(Z.RQr.createHandler("Error rerolling rift opponents"))}))}showOpponentCardAnimation(q){const K=this._prefabRoot.findComponentsInChildren(At.L);null==K||K.forEach(((z,Q)=>{const X=q?Q===K.length-1:0===Q,J=q?150*Q:150*(K.length-(Q+1)),tt=X?()=>{var K;if(q){if(!Ct.T.sawBuffPopup&&1===(null===(K=this._currentRiftProgress)||void 0===K?void 0:K.round)){const q=rt.q.instance.game.state.get(ht.G.Rifts);Ct.T.sawBuffPopup=!0,q.showBuffPopup()}Z.wa5.getActiveScene().container.get(Y.InputBlock).GameObject.active=!1}else this.refreshOpponents()}:void 0;q?z.enter(J,tt):z.exit(J,tt)}))}refreshOpponents(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;yield this.updateCachedRiftRunProgress();const z=null!==(q=this._currentRiftProgress.numOpponentRerolls)&&void 0!==q?q:0,Q=Et.Q.canRerollOpponents(z),X=Et.Q.getOpponentsRerollCost(z),Z=rt.q.instance.prodigy.gameContainer.get("bec-c6b4");this._prefabRoot.findComponentInChildren(yt.h).destroySpawnedPrefabs(),gt.d.updateInjectedValues(this._prefabRoot,{[pt.bL.OpponentsRerollCost]:X,[pt.bL.CanRerollOpponents]:Q,[pt.bL.ShowRerollMagicoinCost]:!Z.isHardCurrencyMemberLocked(X),[pt.bL.ShowRerollMemberIcon]:Z.isHardCurrencyMemberLocked(X),[Y.AllOpponentsData]:this.getAllOpponentTeamsData(null!==(K=this._currentRiftProgress.nextOpponentTeamOptions)&&void 0!==K?K:[],this._currentRiftProgress,!0)})}))}exit(){const q=Object.create(null,{exit:{get:()=>super.exit}});return(0,Q.sH)(this,void 0,void 0,(function*(){rt.q.instance.game.state.get(ht.G.Rifts).closeNotEnoughCurrencyTooltip(),yield q.exit.call(this)}))}}(0,Q.Cg)([(0,lt.b)("ec3-31a0"),(0,Q.Sn)("design:type",dt.E)],Dt.prototype,"_paymentManager",void 0)},72955:(q,K,z)=>{"use strict";z.d(K,{I:()=>Ct});var Y,Q,X=z(8674),Z=z(62459),J=z(95891),tt=z.n(J),et=z(54300),it=z(99625),st=z(58776),nt=z(24652),at=z(42448),rt=z(90633),ot=z(38170),ht=z(35120),ct=z(34829),dt=z(77938),lt=z(73797),ut=z(74958),ft=z(53661),bt=z(77713),pt=z(10711),vt=z(80060),gt=z(30226),mt=z(97447),yt=z(68836),_t=z(37050),Et=z(43503),wt=z(68387),Tt=z(24409),St=z(90500),At=z(11673);!function(q){q.RiftRunTiersData="RIFT_RUN_TIERS_DATA",q.FocusedCardIndex="FOCUSED_CARD_INDEX",q.FirstTimeMaxRiftCompleted="FIRST_TIME_MAX_RIFT_COMPLETED",q.MaxRiftPopupOnClick="MAX_RIFT_POPUP_ON_CLICK",q.MaxRiftCardTeaserAlpha="MAX_RIFT_CARD_TEASER_ALPHA",q.RiftHeading="RIFT_HEADING",q.RiftSubHeading="RIFT_SUB_HEADING",q.RewardHeading="REWARD_HEADING",q.EnterRiftButtonText="ENTER_RIFT_BUTTON_TEXT",q.OnEnterRift="ON_ENTER_RIFT",q.LockRiftButton="LOCK_RIFT_BUTTON",q.RarePetsData="RARE_PETS_DATA",q.RiftRunRewardsData="RIFT_RUN_REWARDS_DATA",q.RiftKeyEntryCost="RIFT_KEY_ENTRY_COST",q.RiftKeyIcon="RIFT_KEY_ICON",q.RiftKeyIconSmall="RIFT_KEY_ICON_SMALL",q.MagicoinEntryCost="MAGICOIN_ENTRY_COST",q.ShowRiftKeyOnly="SHOW_RIFT_KEY_ONLY",q.ShowMagicoinOnly="SHOW_MAGICOIN_ONLY",q.ShowRiftKeyAndMagicoin="SHOW_RIFT_KEY_AND_MAGICOIN",q.ShowRiftSubHeading="SHOW_RIFT_SUB_HEADING",q.TierType="TIER_TYPE",q.BossKeyPoseData="BOSS_KEY_POSE_DATA",q.BossBackgroundImageGuid="BOSS_BACKGROUND_IMAGE_GUID",q.RiftTierLocked="RIFT_TIER_LOCKED",q.PreviousTierCompleteText="PREVIOUS_TIER_COMPLETE_TEXT",q.PreviousTierComplete="PREVIOUS_TIER_COMPLETE",q.UnlockConditionMet="UNLOCK_CONDITION_MET",q.UnlockConditionText="UNLOCK_CONDITION_TEXT",q.UnlockConditionTextSize="UNLOCK_CONDITION_TEXT_SIZE",q.InputBlocker="INPUT_BLOCKER",q.MaxRiftTierPopup="MAX_RIFT_TIER_POPUP"}(Y||(Y={})),function(q){q.RiftsHeaderTitleRiftSelection="RIFTS_HEADER_TITLE_RIFT_SELECTION",q.RiftsSelectionHeading="RIFTS_SELECTION_HEADING",q.RiftsSelectionRewardHeading="RIFTS_SELECTION_REWARD_HEADING",q.RiftsSelectionFirstTimeRewardHeading="RIFTS_SELECTION_FIRST_TIME_REWARD_HEADING",q.RiftsSelectionRewardsHeading="RIFTS_SELECTION_REWARDS_HEADING",q.RiftsSelectionEnterButton="RIFTS_SELECTION_ENTER_BUTTON",q.RiftsPreviousTierCompleteUnlockText="RIFTS_PREVIOUS_TIER_COMPLETE_UNLOCK_TEXT",q.RiftsKeystonesUnlockText="RIFTS_KEYSTONES_UNLOCK_TEXT",q.RiftsPuppetMasterDefeatedUnlockText="RIFTS_PUPPET_MASTER_DEFEATED_UNLOCK_TEXT",q.RiftsLevelLockUnlockText="RIFTS_LEVEL_LOCK_UNLOCK_TEXT",q.RiftsCurrentTierDragonsDefeatedUnlockText="RIFTS_CURRENT_TIER_DRAGON_DEFEATED_UNLOCK_TEXT",q.RiftsOwnPetsUnlockText="RIFTS_OWN_PETS_UNLOCK_TEXT"}(Q||(Q={}));class Ct extends At.O{enter(){return(0,X.sH)(this,arguments,void 0,(function*(q={didRiftBattle:!1}){var K,z,Y,Q,X;const J=ht.q.instance.prodigy.gameContainer;yield this.createLoadingOverlay();const tt=J.get("04c-7c61"),et=J.get("81d-5606"),it=et.getRiftsPortalConfig();if(!et.selectedPortalId||!it)return Z.VyI.log("RiftsSelectionMenuState: No selected portal ID or portal config found",Z.$bb.Error),void ht.q.instance.prodigy.world.it(mt.j.MAP_KEY);const st=J.get("7a9-ac2f"),nt=J.get("73c-5410");let ot,ct,dt="";try{yield this._riftsNetworkHandler.updateSelectedPortal(et.selectedPortalId);const[q,J,rt,lt]=yield Promise.all([et.fetchRiftsTierData(),this._riftsNetworkHandler.attemptSecureUnlockNextRiftTier(et.selectedPortalId),it.storeEnabled?st.getDynamicStoreUIData({storeKey:at.d[et.selectedPortalId]}):void 0,it.storeEnabled?nt.getStoreConfigurationEntity():void 0]);if(!q)return Z.RQr.logError(void 0,"RiftSelectionMenuState: Error fetching rifts data"),this.destroyLoadingOverlay(),void ht.q.instance.prodigy.world.it(mt.j.MAP_KEY);this._riftsTierData=q,this._firstTimeRewardsData=yield tt.getFirstTimeRewardsData(),(null==rt?void 0:rt.isSuccess())&&(ot=rt.get(),ct=null===(z=null===(K=null==lt?void 0:lt.storeConfigEntity)||void 0===K?void 0:K[null==ot?void 0:ot.storeKey])||void 0===z?void 0:z.nameLocalizationKey,dt=null!==(X=null===(Q=null===(Y=null==lt?void 0:lt.storeConfigEntity)||void 0===Y?void 0:Y[null==ot?void 0:ot.storeKey])||void 0===Q?void 0:Q.label)&&void 0!==X?X:"")}catch(e){return Z.RQr.logError(e,"RiftSelectionMenuState: Error fetching rifts data"),this.destroyLoadingOverlay(),void ht.q.instance.prodigy.world.it(mt.j.MAP_KEY)}ut.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(ut.fk.RiftsOpenRiftSelectionMenu,rt.B.BREADCRUMB_RIFTS_OPENED_RIFT_SELECTION_MENU_FIRST_TIME),this._riftsEntityPortalEntry=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData(),et.riftsConfig&&et.selectedPortalId&&(this._riftsPortalConfig=et.riftsConfig[et.selectedPortalId]),yield this.setUpMenu({enterParams:q,riftsDataProvider:et,riftsPortalConfig:it,dynamicStoreUiData:ot,dynamicStoreNameLocalizationKey:ct,dynamicStoreBackupName:dt})}))}setUpMenu(q){const K=Object.create(null,{enter:{get:()=>super.enter}});return(0,X.sH)(this,void 0,void 0,(function*(){var z,X,J,tt,st,rt,dt;const vt=ht.q.instance.prodigy.gameContainer;q.enterParams.didRiftBattle||this._segment.rifts.sendRiftsSelectionMenuOpenedEvent();(yield this.attemptUnsecureUnlockNextRiftTier())&&(this._riftsEntityPortalEntry=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData()),this._hardCurrencyDataProvider=vt.get("bec-c6b4");const gt=this.getRiftsKeyId(),mt=null!==(X=null===(z=this._secureInventory.get({type:"riftRunKey",id:gt}))||void 0===z?void 0:z.quantity)&&void 0!==X?X:0,yt=vt.get("bec-c6b4").getBalance(27),wt=_t.Q.getOpponentsRerollCost((null===(J=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===J?void 0:J.type)===nt.cn.Normal&&null!==(st=null===(tt=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===tt?void 0:tt.numOpponentRerolls)&&void 0!==st?st:0),St=this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(wt);let At=at.X5.Default;this._riftsPortalConfig&&(At=null!==(dt=null===(rt=this._riftsPortalConfig)||void 0===rt?void 0:rt.menuTheme)&&void 0!==dt?dt:at.X5.Default),this._prefabHeaderInjectionValues={[ft.bL.HeaderTitle]:this._localizer.getText(Q.RiftsHeaderTitleRiftSelection),[ft.bL.OnClose]:()=>{ht.q.instance.game.canvas.style.cursor="",this._stateMachine.goToState(Tt.y,q.enterParams).catch(Z.RQr.createHandler("Error exiting dragon rift menu"))},[ft.bL.OpponentsRerollCost]:wt,[ft.bL.RiftCurrencyId]:at.Ty[q.riftsDataProvider.selectedPortalId],[ft.bL.RiftKeyAmount]:this.getRiftKeyComparisonText(mt),[ft.bL.RiftKeyIcon]:et.p[`riftRunKey-${gt}`],[ft.bL.ShowHeaderText]:!1,[ft.bL.ShowMagicoin]:!St,[ft.bL.ShowMagicoinText]:!0,[ft.bL.ShowRiftKeys]:!0,[ft.bL.ShowRerollMagicoinCost]:!St,[ft.bL.ShowRerollMemberIcon]:St,[ft.bL.ShowTooltip]:!1,[ft.bL.StoreEnabled]:q.riftsPortalConfig.storeEnabled,[ft.bL.StoreKey]:at.d[q.riftsDataProvider.selectedPortalId],[ft.bL.MenuInterfaceName]:ut.zE[q.riftsDataProvider.selectedPortalId],[ft.bL.BackgroundHex]:at.a6[At],[ft.bL.GradientHex]:at.aK[At],[ft.bL.DiamondsHex]:at.h5[At],[ft.bL.DiamondsAlpha]:at.VS[At],[ft.n7.TimeRemainingMs]:this._riftsPortalConfig.endDate?ot.r.toDateUtcMs(this._riftsPortalConfig.endDate)-ot.r.toDateUtcMs(Date.now()):0,[ft.n7.ShowTimeRemaining]:Z.Aq$.isDefined(this._riftsPortalConfig.endDate)},this._prefabGUID=it.l.RiftsSelectionMenu,this._prefabInjectionValues={[Y.RiftRunTiersData]:this.getRiftRunCardsData(mt,yt),[Y.FocusedCardIndex]:Object.keys(this._riftsTierData).length-this._riftsEntityPortalEntry.metaProgress.maxRiftTier-1},yield K.enter.call(this),this._inputBlocker=Z.wa5.getActiveScene().container.get(Y.InputBlocker),this._inputBlocker.GameObject.active=!1;const Ct=Et.L.getRiftsModalLastSeenTime(q.riftsDataProvider.selectedPortalId,at.Qm.TemporaryMemberModal);if(q.riftsPortalConfig.options.useTemporaryMemberModal&&(!Ct||Date.now()-Ct>=ct.A.DAY_IN_MS))ht.q.instance.prodigy.open.openMemberLockedGoldRiftModal(),Et.L.setRiftsModalLastSeenTime(q.riftsDataProvider.selectedPortalId,at.Qm.TemporaryMemberModal);else{const K=(0,pt.KQ)(at.d[q.riftsDataProvider.selectedPortalId]);q.riftsPortalConfig.storeEnabled&&q.dynamicStoreUiData&&(!K||Date.now()-K>=ct.A.DAY_IN_MS)&&(this.openDynamicStoreModal(q),(0,pt._m)(at.d[q.riftsDataProvider.selectedPortalId]))}const Ot=this._prefabRoot.findComponentInChildren(bt.h);Ot?Ot.onAllPrefabsSpawned.addOnce((()=>this.destroyLoadingOverlay())):this.destroyLoadingOverlay(),ht.q.instance.game.broadcaster.addAppListener(lt.Lk.HardCurrencyPurchased,this.updateRiftRunCardsButtons,this)}))}exit(){const q=Object.create(null,{exit:{get:()=>super.exit}});return(0,X.sH)(this,void 0,void 0,(function*(){ht.q.instance.game.broadcaster.removeAppListener(lt.Lk.HardCurrencyPurchased,this.updateRiftRunCardsButtons,this),yield q.exit.call(this)}))}getRiftRunCardsData(q=0,K=0){var z,J,tt,it,st,at,rt;const ot=ht.q.instance.prodigy.gameContainer.get("81d-5606"),ct=this._riftsEntityPortalEntry.metaProgress.maxRiftTier,lt=[];for(let ht=Object.keys(this._riftsTierData).length;ht>0;ht--){const ut=ht>ct,bt=this._riftsTierData[ht],pt=ht-1>0?this._riftsTierData[ht-1]:void 0,vt=null==bt?void 0:bt.firstTimeReward;let mt;const yt=!!vt&&(!Z.Aq$.isDefined(this._firstTimeRewardsData[ht])||!this._firstTimeRewardsData[ht]),wt=[];yt&&vt&&(mt=null===(z=dt.t.getItem(vt.type,vt.id))||void 0===z?void 0:z.data,wt.push({type:vt.type,id:vt.id,hasItem:null!==(J=this._firstTimeRewardsData[ht])&&void 0!==J&&J}));const Tt=ot.getRiftRunEntryCost(ht),St=Math.min(q,Tt),At=Tt-St,Ot=ot.getRiftKeyMagicoinCost()*At,It=this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(Ot),Dt=_t.Q.getRestrictionBadgeData(null==bt?void 0:bt.restriction);let Rt;bt.type===nt.cn.Boss&&(Rt=Et.L.getBossDisplayDataFromBossType(bt.bossType));const Pt={[Y.RiftHeading]:(null==bt?void 0:bt.type)===nt.cn.Boss?null==Rt?void 0:Rt.name:this._localizer.getText(Q.RiftsSelectionHeading,ht),[Y.RiftSubHeading]:this._localizer.getText(Q.RiftsSelectionHeading,ht),[Y.ShowRiftSubHeading]:bt.type===nt.cn.Boss,[Y.RewardHeading]:this._localizer.getText(yt?Q.RiftsSelectionFirstTimeRewardHeading:Q.RiftsSelectionRewardsHeading,yt&&vt&&mt?gt.J.getItemName(vt):""),[Y.OnEnterRift]:()=>(0,X.sH)(this,void 0,void 0,(function*(){bt?yield this.enterRiftTier(ht,bt,St,Ot):Z.VyI.log(`RiftSelectionMenuState: No rift tier data found for tier ${ht}`,Z.$bb.Warning)})),[Y.LockRiftButton]:this.shouldLockEnterButtonForTier(ht,K,q),[Y.RarePetsData]:[null!==(tt=this._riftsPortalConfig.options.rarePetIds.slice(0,ht).map((q=>({type:"pet",id:q}))).reverse())&&void 0!==tt?tt:[],ut,Ct.MAX_RARE_PETS],[Y.RiftRunRewardsData]:[yt?wt:this.getFeaturedRiftRunTierRewards(bt,ht),ut,Ct.MAX_RIFT_RUN_REWARDS],[Y.RiftKeyIcon]:et.p[`riftRunKey-${this.getRiftsKeyId()}`],[Y.RiftKeyIconSmall]:`icon-rift-key-small-${this.getRiftsKeyId()}`,[Y.RiftKeyEntryCost]:It?Tt:St,[Y.MagicoinEntryCost]:Ot,[Y.ShowRiftKeyOnly]:Boolean(St>0&&Ot<=0||It),[Y.ShowMagicoinOnly]:Boolean(St<=0&&Ot>0&&!It),[Y.ShowRiftKeyAndMagicoin]:Boolean(St>0&&Ot>0&&!It),[Y.TierType]:bt.type,[Y.BossKeyPoseData]:[null==Rt?void 0:Rt.keyPoseAtlasGuid,null==Rt?void 0:Rt.keyPoseFrame],[Y.BossBackgroundImageGuid]:null==Rt?void 0:Rt.tierBackgroundImageGuid,[ft.Fm.ShowRestrictionBadge]:Dt.showRestrictionBadge,[ft.Fm.RestrictionBadgeTest]:Dt.restrictionBadgeText},Mt={};if(ut){Mt[Y.RiftTierLocked]=!0;let q=0;const K=null!==(it=null==pt?void 0:pt.numTierCompletionsToUnlockNextTier)&&void 0!==it?it:1;if(ht===ct+1&&(q=null!==(st=this._riftsEntityPortalEntry.metaProgress.riftTierUnlockData.maxTierCompletions)&&void 0!==st?st:0,q>K&&(q=K)),ht>1&&(Mt[Y.PreviousTierCompleteText]=this._localizer.getText(Q.RiftsPreviousTierCompleteUnlockText,ht-1,q,null!==(at=null==pt?void 0:pt.numTierCompletionsToUnlockNextTier)&&void 0!==at?at:1)),q>=K&&(Mt[Y.PreviousTierComplete]=!0),null===(rt=null==bt?void 0:bt.unlockCondition)||void 0===rt?void 0:rt.condition){const q=ht-1;Mt[Y.UnlockConditionText]=this.getUnlockConditionText(bt.unlockCondition,q),this._riftsEntityPortalEntry.metaProgress.riftTierUnlockData.hasMetUnlockCondition&&(Mt[Y.UnlockConditionMet]=!0)}}lt.push(Object.assign(Object.assign({},Pt),Mt))}return lt}updateRiftRunCardsButtons(){var q,K,z;const Q=this._prefabRoot.findComponentInChildren(bt.h);if(!Q)return;const X=ht.q.instance.prodigy.gameContainer.get("81d-5606"),Z=this.getRiftsKeyId(),J=null!==(K=null===(q=this._secureInventory.get({type:"riftRunKey",id:Z}))||void 0===q?void 0:q.quantity)&&void 0!==K?K:0,tt=this._hardCurrencyDataProvider.getBalance(27),et=this._riftsEntityPortalEntry.metaProgress.maxRiftTier;for(let it=Math.min(et>0?et+1:et+2,null!==(z=X.getMaxRiftTier())&&void 0!==z?z:-1);it>0;it--){const q=this.shouldLockEnterButtonForTier(it,tt,J),K={[Y.LockRiftButton]:q};vt.d.updateInjectedValues(Q.GameObject.children[Q.GameObject.children.length-it],K)}}shouldLockEnterButtonForTier(q,K,z){const Y=ht.q.instance.prodigy.gameContainer.get("81d-5606"),Q=Y.getRiftRunEntryCost(q),X=Math.min(z,Q),Z=Q-X,J=Y.getRiftKeyMagicoinCost()*Z;return this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(J)?X{var K,z;let Y=0;if("currency"!==q.type&&"gold"!==q.type){const Q=dt.t.getItem(q.type,q.id);Q&&(Y=null!==(z=null===(K=null==Q?void 0:Q.data)||void 0===K?void 0:K.rarity)&&void 0!==z?z:0)}return{id:q.id,type:q.type,rarity:Y}})),(q=>`${q.id}_${q.type}_${q.rarity}`));return tt().orderBy(Y,[q=>"currency"===q.type||"gold"===q.type,"rarity"],["asc","desc"]).slice(0,Math.min(Ct.MAX_RIFT_RUN_REWARDS,Y.length)).map((q=>({type:q.type,id:q.id,hasItem:this._player.getItemCount(q.type,q.id)>0&&!at._u.includes(q.type)})))}getUnlockConditionText(q,K){switch(q.condition){case nt.Y1.KeystonesUnlocked:return this._localizer.getText(Q.RiftsKeystonesUnlockText,q.value,q.value>1?"s":"");case nt.Y1.PuppetMasterDefeated:return this._localizer.getText(Q.RiftsPuppetMasterDefeatedUnlockText);case nt.Y1.LevelLock:return this._localizer.getText(Q.RiftsLevelLockUnlockText,q.value);case nt.Y1.OwnPetsOfElement:return this._localizer.getText(Q.RiftsOwnPetsUnlockText,q.value,q.data.element);case nt.Y1.OwnPetsOfRarity:return this._localizer.getText(Q.RiftsOwnPetsUnlockText,q.value,gt.J.convertRarityToText(q.data.rarity).toLowerCase());default:return""}}openDynamicStoreModal(q){const K=ht.q.instance.prodigy.gameContainer.get(Z.$Bt.LocalizationService),z=q.dynamicStoreUiData.store,Y=q.dynamicStoreUiData.offerReadById,Q=[...z.sections.reduce(((q,K)=>(q.push(...K.offers),q)),[])].filter((q=>q.progress.status===st.t.IN_PROGRESS)),X=q.dynamicStoreNameLocalizationKey&&K?K.getText(q.dynamicStoreNameLocalizationKey):q.dynamicStoreBackupName,J=q.riftsDataProvider.selectedPortalId;ht.q.instance.prodigy.open.dynamicStoreModal({[ft.YM.BodyText]:K.getText(at.Bs.DynamicStoreModalBodyText,X),[ft.YM.HeaderText]:X,[ft.YM.OfferData]:Q,[ft.YM.OfferReadById]:Y,[ft.YM.ShowTimer]:J!==at.ni.Portal1,[ft.YM.StoreKey]:at.d[J],[ft.n7.TimeRemainingMs]:q.riftsPortalConfig.endDate?new Date(q.riftsPortalConfig.endDate).getTime()-Date.now():void 0})}attemptUnsecureUnlockNextRiftTier(){return(0,X.sH)(this,void 0,void 0,(function*(){var q,K,z;let Y=!1;const Q=ht.q.instance.prodigy.gameContainer.get("81d-5606");if(!ht.q.instance.prodigy.gameContainer.get("687-0b09").cache||this._riftsEntityPortalEntry.metaProgress.maxRiftTier>=(null!==(q=Q.getMaxRiftTier())&&void 0!==q?q:-1)||this._riftsEntityPortalEntry.metaProgress.riftTierUnlockData.hasMetUnlockCondition)return Y;const X=this._riftsTierData[this._riftsEntityPortalEntry.metaProgress.maxRiftTier+1];if(!(null===(K=null==X?void 0:X.unlockCondition)||void 0===K?void 0:K.condition))return Y;const Z=ht.q.instance.prodigy.gameContainer.get("04c-7c61");switch(null===(z=null==X?void 0:X.unlockCondition)||void 0===z?void 0:z.condition){case nt.Y1.KeystonesUnlocked:this._player.getNumKeystones()>=X.unlockCondition.value&&(yield Z.updateTierUnlockProgress()),Y=!0;break;case nt.Y1.LevelLock:this._player.getLevel()>=X.unlockCondition.value&&(yield Z.updateTierUnlockProgress()),Y=!0}return Y}))}enterRiftTier(q,K,z,Q){return(0,X.sH)(this,void 0,void 0,(function*(){const X=Z.wa5.getActiveScene().container.get(Y.InputBlocker);(null==X?void 0:X.GameObject)&&(X.GameObject.active=!0);try{switch(K.type){case nt.cn.Normal:yt.T.riftTier=q,yield this._riftsNetworkHandler.startRiftRun(q,{[this.getRiftsKeyId()]:z},Q>0),yield this._stateMachine.goToState(St.R);break;case nt.cn.Boss:yt.T.riftTier=q,yield this._riftsNetworkHandler.startBossRift(q,K.bossType),yield this._stateMachine.goToState(wt.O);break;default:Z.VyI.log(`RiftSelectionMenuState: Unknown rift tier type for rift ${q}`,Z.$bb.Error)}}catch(e){Z.RQr.logError(e,`RiftSelectionMenuState: Error entering rift ${q}`)}finally{(null==X?void 0:X.GameObject)&&(X.GameObject.active=!1)}}))}}Ct.MAX_RARE_PETS=6,Ct.MAX_RIFT_RUN_REWARDS=3},11673:(q,K,z)=>{"use strict";z.d(K,{O:()=>lt});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(42448),J=z(35120),tt=z(7351),et=z(70005),it=z(23082),st=z(13956),nt=z(85515),at=z(56617),rt=z(53661),ot=z(38920),ht=z(80060),ct=z(80105),dt=z(87427);class lt extends dt.I{enter(q){const K=Object.create(null,{enter:{get:()=>super.enter}});return(0,Y.sH)(this,void 0,void 0,(function*(){if(this._preloadAssets&&(yield J.q.instance.prodigy.load.assetsAsPromise(this._preloadAssets)),this._prefabHeaderInjectionValues){let q=this._prefabHeaderInjectionValues;q=Object.assign({[rt.n7.ShowTimeRemaining]:!1},this._prefabHeaderInjectionValues),yield J.q.instance.game.state.get(it.G.Rifts).injectToHeaderPrefab(q)}this._prefabGUID&&(this._prefabRoot=yield ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,this._prefabInjectionValues),Q.wa5.getActiveScene().addGameObject(this._prefabRoot.parent)),yield K.enter.call(this,q)}))}createLoadingOverlay(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=J.q.instance.prodigy.gameContainer.get("983-05a7");this._loadingOverlay=yield q.loadWithDependenciesFromGUID(X.l.LoadingOverlay),this._loadingOverlay.addComponent(et.h),this._loadingOverlay.layer=nt.E.Result;const K=this._loadingOverlay.findComponentInChildren(at.i);null==K||K.showLoadingUI()}))}destroyLoadingOverlay(){if(!this._loadingOverlay)return;const q=this._loadingOverlay.findComponentInChildren(at.i);null==q||q.forceHideLoadingUI(),this._loadingOverlay.destroyDeferred(),this._loadingOverlay=void 0}getRiftKeyComparisonText(q){var K;const z=null===(K=J.q.instance.prodigy.gameContainer.get("81d-5606").getRiftsPortalConfig())||void 0===K?void 0:K.options.maxRiftRunKeys;return z?(0,ot.RL)(q,z):q.toString()}getRiftsKeyId(){var q;const K=J.q.instance.prodigy.gameContainer.get("81d-5606");return K.selectedPortalId&&null!==(q=Z.fW[K.selectedPortalId])&&void 0!==q?q:Z.BN.PortalOneKey}getRestriction(){var q,K;const z=J.q.instance.prodigy.gameContainer.get("81d-5606").riftsTierTotalData;if(!z)return;let Y;const Q=null===(q=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===q?void 0:q.currentRiftTier;return Q&&(Y=null===(K=z[Q])||void 0===K?void 0:K.restriction),Y}exit(){const q=Object.create(null,{exit:{get:()=>super.exit}});return(0,Y.sH)(this,void 0,void 0,(function*(){var K;null===(K=this._prefabRoot)||void 0===K||K.destroy(),yield q.exit.call(this)}))}}(0,Y.Cg)([(0,st.b)("782-c308"),(0,Y.Sn)("design:type",tt.W)],lt.prototype,"_player",void 0),(0,Y.Cg)([(0,st.b)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],lt.prototype,"_localizer",void 0),(0,Y.Cg)([(0,st.b)("6d6-463e"),(0,Y.Sn)("design:type",ct.U)],lt.prototype,"_secureInventory",void 0)},87427:(q,K,z)=>{"use strict";z.d(K,{I:()=>tt});var Y=z(8674),Q=z(13956),X=z(63546),Z=z(38560),J=z(14117);class tt extends X.${}(0,Y.Cg)([(0,Q.b)("04c-7c61"),(0,Y.Sn)("design:type",Z.B)],tt.prototype,"_riftsNetworkHandler",void 0),(0,Y.Cg)([(0,Q.b)("687-0b09"),(0,Y.Sn)("design:type",J.M)],tt.prototype,"_riftsSyncedDataStore",void 0)},82781:(q,K,z)=>{"use strict";z.d(K,{Q:()=>vt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(30334),tt=z(28628),et=z(24652),it=z(42448),st=z(90633),nt=z(35120),at=z(7351),rt=z(23082),ot=z(74958),ht=z(13956),ct=z(80494),dt=z(68836),lt=z(43503),ut=z(84060),ft=z(53232),bt=z(90500),pt=z(87427);class vt extends pt.I{enter(){const q=Object.create(null,{enter:{get:()=>super.enter}});return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,X,st,at;yield q.enter.call(this);const ot=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!ot||ot.type!==et.cn.Normal)return void(yield lt.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));const ht=nt.q.instance.prodigy.gameContainer.get("81d-5606"),ct=ht.getCurrentRiftsId(),ut=yield nt.q.instance.prodigy.gameContainer.get("b37-c775").getBattleStartQuestData(tt.gu.NormalRiftRun,ct),ft={battleType:tt.gu.NormalRiftRun,battleSubType:ct,difficulty:J.z,chosenOpponentTeamIndex:dt.T.chosenOpponentTeamIndex,chosenHomeTeamPetUids:dt.T.chosenHomeTeamPetUids,activeQuestIDs:ut.questIDs,questEventsToSend:ut.questEvents},bt=nt.q.instance.game.state.states.get(rt.G.SecureBattleRevamp);if(!(yield lt.L.canResumeRiftRun()))return yield Promise.all([bt.clearBattle(ft),lt.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine)]),void(this._player.battleResumeData=void 0);const pt=null==ot?void 0:ot.currentRiftTier;let gt;ht.riftsTierTotalData&&pt&&(gt=null===(K=ht.riftsTierTotalData[pt])||void 0===K?void 0:K.battleBackgrounds),gt||(gt=vt.DEFAULT_RIFT_RUN_BATTLE_BACKGROUNDS);const mt=null!==(z=null==ot?void 0:ot.chosenNerfModifiers)&&void 0!==z?z:[],yt=!Q.Aq$.isDefined(ot.chosenOpponentTeamIndex)||!dt.T.canResumeBattle,_t=null!==(Y=(at=this._player.data).battleResumeDataClient)&&void 0!==Y?Y:at.battleResumeDataClient={};_t.currentBackground||(_t.currentBackground=Z().sample(gt),this._player.forceSaveCharacter());const Et={backgroundID:_t.currentBackground,onVictory:this.victoryCallback.bind(this),onDefeat:this.defeatCallback.bind(this),onEscape:this.defeatCallback.bind(this),guaranteedDrops:[{type:"gold",N:null!==(st=null===(X=dt.T.chosenModifier)||void 0===X?void 0:X.goldReward)&&void 0!==st?st:mt[mt.length-1].goldReward}]};ot.round===it.vP&&(dt.T.isFinalBattle=!0),this._segment.rifts.cachedCurrentNormalRiftProgress=Z().cloneDeep(ot),dt.T.chosenModifier&&this._segment.rifts.cachedCurrentNormalRiftProgress.chosenNerfModifiers.push(dt.T.chosenModifier),dt.T.chosenHomeTeamPetUids.length>0&&this._segment.rifts.cachedCurrentNormalRiftProgress.usedPetUids.push(...dt.T.chosenHomeTeamPetUids),this._segment.rifts.sendRiftRunRoundStartedEvent(),dt.T.chosenModifier=null,yt?bt.startBattleRequest(ft,Et):bt.resumeBattleRequest(ft,Et)}))}cleanUpClientData(){var q;(null===(q=this._player.data.battleResumeDataClient)||void 0===q?void 0:q.currentBackground)&&(delete this._player.data.battleResumeDataClient.currentBackground,this._player.forceSaveCharacter())}victoryCallback(){var q;const K=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(dt.T.firstBattleCompleted=!0,this.cleanUpClientData(),ot.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(ot.fk.RiftsCompleteFirstRiftRunRound,st.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_ROUND),this._segment.rifts.sendRiftRunRoundCompletedEvent("win"),K&&K.type===et.cn.Normal){const z=this._riftsSyncedDataStore.cache.currentPortalId;if(z&&this._riftsSyncedDataStore.cache[z]){const K=null!==(q=this._riftsSyncedDataStore.cache[z].metaProgress.usedPetData)&&void 0!==q?q:{};this._segment.rifts.sendPetCooldownStartedEvents(K)}this._segment.rifts.riftRunRoundUuid=K.riftRunRoundSegmentUuid,nt.q.instance.game.state.start(rt.G.Rifts,void 0,bt.R)}else ot.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(ot.fk.RiftsCompleteRiftRunWinOrLose,st.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE),ot.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(ot.fk.RiftsCompleteRiftRunWin,st.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN),this._segment.rifts.sendRiftRunCompletedEvent(),nt.q.instance.game.state.start(rt.G.Rifts,void 0,ut.n)}defeatCallback(){this.cleanUpClientData(),dt.T.firstBattleCompleted=!0,ot.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(ot.fk.RiftsCompleteRiftRunWinOrLose,st.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE),this._segment.rifts.sendRiftRunRoundCompletedEvent("loss"),nt.q.instance.game.state.start(rt.G.Rifts,void 0,ft.X)}}vt.DEFAULT_RIFT_RUN_BATTLE_BACKGROUNDS=[ct.t.BattleBonfireInside,ct.t.BattleBonfireLava,ct.t.BattleBonfireOutside,ct.t.BattleForestGeneric,ct.t.BattleForestOutside,ct.t.BattleShipwreckInside,ct.t.BattleShipwreckOutside,ct.t.BattleShipwreckUnderwater,ct.t.BattleShiverchillInside,ct.t.BattleShiverchillOutside,ct.t.BattleSkywatchInside,ct.t.BattleSkywatchOutside],(0,Y.Cg)([(0,ht.b)("782-c308"),(0,Y.Sn)("design:type",at.W)],vt.prototype,"_player",void 0)},53027:(q,K,z)=>{"use strict";z.d(K,{t:()=>Pt});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(95891),J=z.n(Z),tt=z(88022),et=z(99625),it=z(60035),st=z(24652),nt=z(42448),at=z(35120),rt=z(91207),ot=z(77938),ht=z(51972),ct=z(23082),dt=z(53661),lt=z(22023),ut=z(80060),ft=z(44094),bt=z(47255),pt=z(37050),vt=z(39785),gt=z(43503),mt=z(68836),yt=z(14117),_t=z(68387),Et=z(90500),wt=z(11673),Tt=z(30334),St=z(82351),At=z(28628),Ct=z(86498),Ot=z(53232),It=z(87427),Dt=z(82781);class Rt extends It.I{enter(){const q=Object.create(null,{enter:{get:()=>super.enter}});return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q,Z;yield q.enter.call(this);const tt=at.q.instance.prodigy.gameContainer.get("81d-5606"),et=this._riftsSyncedDataStore.cache.currentRiftRunProgress,it=tt.riftsTierTotalData,nt=(null==et?void 0:et.currentRiftTier)?null==it?void 0:it[null==et?void 0:et.currentRiftTier]:void 0;if(!et||et.type!==st.cn.Boss||(null==nt?void 0:nt.type)!==st.cn.Boss)return void(yield gt.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));const rt=tt.getCurrentRiftsId(),ot=at.q.instance.prodigy.gameContainer.get("20f-5f67").rifts,ht=yield at.q.instance.prodigy.gameContainer.get("b37-c775").getBattleStartQuestData(At.gu.BossRiftRun,rt);let dt="";!X.Aq$.isDefined(null==nt?void 0:nt.useParallaxBackground)||nt.useParallaxBackground||(dt=null!==(z=J().sample(null!==(K=nt.battleBackgrounds)&&void 0!==K?K:Dt.Q.DEFAULT_RIFT_RUN_BATTLE_BACKGROUNDS))&&void 0!==z?z:""),ot.cachedCurrentBossRiftProgress=J().cloneDeep(et);const lt={battleType:At.gu.BossRiftRun,battleSubType:rt,difficulty:Tt.z,chosenHomeTeamPetUids:null!==(Y=mt.T.chosenHomeTeamPetUids)&&void 0!==Y?Y:[],activeQuestIDs:ht.questIDs,questEventsToSend:ht.questEvents},ut={backgroundID:dt,backgroundMusicID:null!==(Z=Rt.BOSS_BGM[null!==(Q=et.bossType)&&void 0!==Q?Q:st.ts.AstralDragon])&&void 0!==Z?Z:St.B.Bgm_battle_astral_dragon,onVictory:this.victoryCallback.bind(this),onDefeat:this.defeatCallback.bind(this),onEscape:this.defeatCallback.bind(this)};at.q.instance.game.state.states.get(ct.G.SecureBattleRevamp).startBattleRequest(lt,ut)}))}victoryCallback(){var q;const K=this._riftsSyncedDataStore.cache.currentPortalId;if(K&&this._riftsSyncedDataStore.cache[K]){const z=null!==(q=this._riftsSyncedDataStore.cache[K].metaProgress.usedPetData)&&void 0!==q?q:{};this._segment.rifts.sendPetCooldownStartedEvents(z)}this._segment.rifts.sendBossRiftCompletedEvent("win"),at.q.instance.game.state.start(ct.G.Rifts,void 0,Ct.j)}defeatCallback(){this._segment.rifts.sendBossRiftCompletedEvent("loss"),at.q.instance.game.state.start(ct.G.Rifts,void 0,Ot.X)}}Rt.BOSS_BGM={[st.ts.AstralDragon]:St.B.Bgm_battle_astral_dragon,[st.ts.FireDragon]:St.B.Bgm_battle_astral_dragon,[st.ts.PhysicalDragon]:St.B.Bgm_battle_physical_dragon,[st.ts.ShadowDragon]:St.B.Bgm_battle_shadow_dragon,[st.ts.IceWyrm]:St.B.Bgm_battle_astral_dragon,[st.ts.IceDragon]:St.B.Bgm_battle_astral_dragon};class Pt extends wt.O{constructor(){super(...arguments),this._teamPetIndices=[-1,-1],this._selectedSlotIndex=0,this._showPetSelectionDrawerSignal=new X.HN0,this._hidePetSelectionDrawerSignal=new X.HN0}enter(){const q=Object.create(null,{enter:{get:()=>super.enter}});return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;const Z=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!Z)return void(yield gt.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));this._currentRiftProgress=Z;const J=X.wa5.getActiveScene().container;at.q.instance.prodigy.gameContainer.get("81d-5606").getRiftsPortalConfig();this._restriction=this.getRestriction(),this._restrictionBadgeData=pt.Q.getRestrictionBadgeData(this._restriction),this._sortedPets=this.getSortedAndFilteredPets(this._restriction);let it=0;if(this._sortedPets.some(((q,K)=>!(q.disabledData||!this._riftsSyncedDataStore.isPetAvailableForUse(q.uniqueID))&&(this._teamPetIndices[it++]=K,it>=2))),this._prefabHeaderInjectionValues={[dt.bL.HeaderTitle]:this._localizer.getText("RIFTS_HEADER_TITLE_TEAM_SELECTION"),[dt.bL.OnClose]:()=>{vt.n.onRiftRunClose(this._stateMachine)}},this._currentRiftProgress.type===st.cn.Boss?this._prefabHeaderInjectionValues[dt.bL.OnBack]=()=>(0,Y.sH)(this,void 0,void 0,(function*(){yield this._stateMachine.goToState(_t.O)})):this._prefabHeaderInjectionValues[dt.bL.OnBack]=()=>(0,Y.sH)(this,void 0,void 0,(function*(){mt.T.chosenModifier=null;at.q.instance.game.state.get(ct.G.Rifts).updateModifierGrid(),yield this._stateMachine.goToState(Et.R)})),this._prefabGUID=et.l.RiftRunTeamSelection,this._prefabInjectionValues={ON_CHANGE_0:()=>{this.showPetSelectionDrawer(0)},ON_CHANGE_1:()=>{this.showPetSelectionDrawer(1)},ON_ELEMENTS:()=>(0,Y.sH)(this,void 0,void 0,(function*(){yield this.showElementsPopup()})),ON_START_RIFT:()=>(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._teamPetIndices.map((q=>{var K;return null===(K=this._sortedPets[q])||void 0===K?void 0:K.uniqueID})).filter((q=>q));this._currentRiftProgress.type===st.cn.Boss?(mt.T.chosenHomeTeamPetUids=q,yield this._stateMachine.goToState(Rt)):(mt.T.chosenHomeTeamPetUids=q,yield this._stateMachine.goToState(Dt.Q))})),ON_HOME_TEAM_SPAWNED:()=>{const q=J.get("PLAYER_TRANSFORM"),K=J.get("HOME_TEAM_TRANSFORM");q.GameObject.parent=K.GameObject},PLAYER_NAME:this._player.name.getName(),PLAYER_CONTAINER_WIDTH:200,PLAYER_CONTAINER_HEIGHT:170,WEAK_TO_OFFSET:18,PEDESTAL_ASSET:[tt._.Ui_rifts_json,"base-cool-grey-light"],HOME_TEAM_DATA:this._teamPetIndices.map((q=>{var K,z;if(q>=0){const Y=this._sortedPets[q],Q=ot.t.getItem("pet",Y.ID),X=lt.P8.getElementType(Q);return Object.assign(Object.assign({},this.getCommonPetInjectionData(X)),{IS_RARE_PET:!1,PET_ID:Y.ID,PET_NAME:null!==(z=null!==(K=Y.nickname)&&void 0!==K?K:Y.name)&&void 0!==z?z:Q.data.name})}return{IS_RARE_PET:!1,PET_NAME:"",WEAKNESS_ICON:""}}))},this._currentRiftProgress.type===st.cn.Boss&&this._currentRiftProgress.bossType){const q=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData(),Y=gt.L.getBossDisplayDataFromBossType(this._currentRiftProgress.bossType),Z=X.wa5.getActiveScene().container.get(Q.BattleConstants).getElementalWeakness(Y.element),J=!X.Aq$.isDefined(null===(z=null===(K=q.metaProgress)||void 0===K?void 0:K.bossDefeats)||void 0===z?void 0:z[this._currentRiftProgress.bossType]);this._prefabInjectionValues.BOSS_KEY_POSE=[Y.keyPoseAtlasGuid,Y.keyPoseFrame],this._prefabInjectionValues.BOSS_NAME=ft.$.toTitleCase(Y.name),this._prefabInjectionValues.BOSS_WEAKNESS_ICON=[tt._.Ui_battle_revamp_json,`icon-mini-element-${Z}`],this._prefabInjectionValues.BOSS_IS_SILHOUETTED=J,this._prefabInjectionValues.IS_BOSS_BATTLE=!0,this._prefabInjectionValues[dt.Fm.ShowRestrictionBadge]=this._restrictionBadgeData.showRestrictionBadge,this._prefabInjectionValues[dt.Fm.RestrictionBadgeTest]=this._restrictionBadgeData.restrictionBadgeText}else if(this._currentRiftProgress.type===st.cn.Normal){const q=at.q.instance.prodigy.gameContainer.get("81d-5606").getRiftsPortalConfig();this._prefabInjectionValues.BOSS_IS_SILHOUETTED=!1,this._prefabInjectionValues.SHOW_INFO=!1,this._prefabInjectionValues.OPPONENT_TEAM_DATA=this._currentRiftProgress.nextOpponentTeamOptions[mt.T.chosenOpponentTeamIndex].petIds.map((K=>{var z;const Y=ot.t.getItem("pet",K),Q=lt.P8.getElementType(Y);return Object.assign(Object.assign({},this.getCommonPetInjectionData(Q)),{IS_RARE_PET:null!==(z=null==q?void 0:q.options.rarePetIds.includes(K))&&void 0!==z&&z,PET_ID:K,PET_NAME:Y.data.name,PET_SCALE:[-1,1]})}))}yield q.enter.call(this),yield this.setupPetDrawer()}))}getSortedAndFilteredPets(q){const K=J().cloneDeep(this._player.kennel.getPrimaryPets());(this._currentRiftProgress.type===st.cn.Boss?this._currentRiftProgress.bossRiftModifiers:this._currentRiftProgress.type===st.cn.Normal?[...this._currentRiftProgress.chosenNerfModifiers,mt.T.chosenModifier]:[]).forEach((q=>{q.type===it.z.RemovePetsByElement?K.forEach((K=>{const z=ot.t.getItem("pet",K.ID);lt.P8.getElementType(z)===q.element&&(K.disabledData={disabledBy:q.element,disabledIcon:vt.n.getGuidForModifierIcon(q.icon)})})):q.type===it.z.RemovePetsByRarity&&K.forEach((K=>{const z=ot.t.getItem("pet",K.ID);K.disabledData&&this.isEElementType(K.disabledData.disabledBy)||z.data.rarity===q.rarity&&(K.disabledData={disabledBy:q.rarity,disabledIcon:vt.n.getGuidForModifierIcon(q.icon)})}))})),q&&K.forEach((K=>{var z,Y;const Q=null===(z=ot.t.getItem("pet",K.ID))||void 0===z?void 0:z.data;if(null!==(Y=K.disabledData)&&void 0!==Y?!Y:Q)switch(q.type){case nt.CN.OnlyPetsOfElement:Q.affinity!==q.data.element&&(K.disabledData={disabledBy:q.data.element,restriction:q});break;case nt.CN.NoPetsOfElement:Q.affinity===q.data.element&&(K.disabledData={disabledBy:q.data.element,restriction:q});break;case nt.CN.OnlyPetsOfRarity:Q.rarity!==q.data.rarity&&(K.disabledData={disabledBy:q.data.rarity,restriction:q});break;case nt.CN.NoPetsOfRarity:Q.rarity===q.data.rarity&&(K.disabledData={disabledBy:q.data.rarity,restriction:q})}}));return J().chain(K).filter("ID").orderBy([q=>X.Aq$.isDefined(q.disabledData),q=>q.mergeRank,q=>q.level],["asc","desc","desc"]).value()}setupPetDrawer(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z;this._drawerCloseOverlay=X.wa5.getActiveScene().container.get("DRAWER_CLOSE_OVERLAY");const Y=at.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("PET_DRAWER_ALREADY_USED"),Q=null===(K=null===(q=at.q.instance.prodigy.gameContainer.get("81d-5606").getRiftsPortalConfig())||void 0===q?void 0:q.options)||void 0===K?void 0:K.petReuseData,Z={START_OFFSCREEN_X:-800,TWEEN_IN_SIGNAL:this._showPetSelectionDrawerSignal,TWEEN_OUT_SIGNAL:this._hidePetSelectionDrawerSignal,ON_CLOSE:()=>{this.hidePetSelectionDrawer()},PET_DATA:this._sortedPets.reduce(((q,K,z)=>{var Z,J,tt,et;const it=ot.t.getItem("pet",K.ID);if(!it)return X.VyI.log(`Pet with ID ${K.ID} not found in items`,X.$bb.Error),q;const st={DISABLED:!1,OVERLAY_TEXT:"",DISABLED_ICON:"",PET_ID:K.ID,PET_DATA:K,NAME:null!==(J=null!==(Z=K.nickname)&&void 0!==Z?Z:K.name)&&void 0!==J?J:it.data.name,LEVEL:K.level,MERGE_RANK:lt.P8.getPetDisplayMergeRank(K.ID,K.uniqueID),SHOW_MERGE_RANK_BADGE:lt.P8.canPetAccessMergeRanks(K.ID),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_ON_TEAM:this._teamPetIndices.includes(z),SHOW_GUIDE_HAND:!1,INPUT_ENABLED:!this._teamPetIndices.includes(z)&&!this._sortedPets[z].disabledData,ON_CLICK:()=>{this.selectPet(z),this.hidePetSelectionDrawer()},ON_DISABLED_CLICK:()=>{this.showPetReuseInterface(K,it,z)},SHOW_TIME_REMAINING:!1};if(this._riftsSyncedDataStore.getPetCooldownStatus(K.uniqueID)===yt.R.Expired){const q=this._riftsSyncedDataStore.getUsedPetMetadata(K.uniqueID);this._riftsNetworkHandler.expireRiftPetCooldown(K.uniqueID).then((()=>{var z;this._segment.rifts.sendCooldownTimerEnded(q.cooldownID,K.uniqueID,null!==(z=null==Q?void 0:Q.petCooldownMs)&&void 0!==z?z:0)})).catch(X.RQr.createHandler("Error expiring pet cooldown"))}if(this._riftsSyncedDataStore.isPetAvailableForUse(K.uniqueID))K.disabledData&&(st.DISABLED=!0,st.DISABLED_ICON=null!==(et=K.disabledData.disabledIcon)&&void 0!==et?et:"");else{const q=this._riftsSyncedDataStore.getUsedPetMetadata(K.uniqueID);if(X.Aq$.isDefined(Q)&&X.Aq$.isDefined(null==Q?void 0:Q.petCooldownMs)&&X.Aq$.isDefined(q.timestamp)){const K=q.timestamp+(null!==(tt=null==Q?void 0:Q.petCooldownMs)&&void 0!==tt?tt:0)-Date.now();st.SHOW_TIME_REMAINING=!0,st.TIME_REMAINING_MS=K}else st.OVERLAY_TEXT=Y;st.DISABLED=!0}return q.push(st),q}),[]),PET_GRID_FIXED_ROW_COUNT:Math.ceil(this._sortedPets.length/4),[dt.Fm.ShowRestrictionBadge]:this._restrictionBadgeData.showRestrictionBadge,[dt.Fm.RestrictionBadgeTest]:this._restrictionBadgeData.restrictionBadgeText};this._petSelectionDrawer?ut.d.updateInjectedValues(this._petSelectionDrawer,Z):(this._petSelectionDrawer=yield ut.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,et.l.PetSelectionDrawer,Z),this._petSelectionDrawer.parent=this._prefabRoot,this._drawerCloseOverlay.onClicked.add(this.hidePetSelectionDrawer,this)),this._riftsSyncedDataStore.hasUsedPets()&&this.setupPetReuseCta(),null!==(z=this._petSpawner)&&void 0!==z||(this._petSpawner=X.wa5.getActiveScene().container.get(dt.oX.PetCardPetSpawner))}))}exit(){const q=Object.create(null,{exit:{get:()=>super.exit}});return(0,Y.sH)(this,void 0,void 0,(function*(){this._showPetSelectionDrawerSignal.dispose(),this._hidePetSelectionDrawerSignal.dispose(),yield q.exit.call(this)}))}getCommonPetInjectionData(q){const K=X.wa5.getActiveScene().container.get(Q.BattleConstants).getElementalWeakness(q);return{ELEMENT_ICON:[tt._.Ui_battle_revamp_json,`icon-mini-element-${q}`],PEDESTAL_ASSET:[tt._.Ui_rifts_json,"base-cool-grey-light"],PET_CONTAINER_WIDTH:200,PET_CONTAINER_HEIGHT:170,WEAK_TO_OFFSET:18,WEAKNESS_ICON:[tt._.Ui_battle_revamp_json,`icon-mini-element-${K}`],PET_WIDTH_LIMIT:200,PET_HEIGHT_LIMIT:150}}getReusablePetInjectionData(q,K){var z,Y,Q,X;return{PET_RESCUE_CREATURE_DATA:{ID:q.ID,name:q.name,level:q.level},PET_RESCUE_NAME:null!==(Y=null===(z=null==K?void 0:K.data)||void 0===z?void 0:z.name)&&void 0!==Y?Y:"",PET_RESCUE_RARITY:null!==(X=null===(Q=null==K?void 0:K.data)||void 0===Q?void 0:Q.rarity)&&void 0!==X?X:0,PET_RESCUE_STAMP_ENABLED:!1}}showPetSelectionDrawer(q){this._selectedSlotIndex=q,this._drawerCloseOverlay.GameObject.active=!0,this._showPetSelectionDrawerSignal.dispatch()}hidePetSelectionDrawer(){this._drawerCloseOverlay.GameObject.active=!1,this._hidePetSelectionDrawerSignal.dispatch()}setupPetReuseCta(){const q=X.wa5.getActiveScene().container.get("DRAWER_TWEEN_IN_ON_COMPLETE_SIGNAL"),K=X.wa5.getActiveScene().container.get("DRAWER_PET_GRID_LAYOUT_GAME_OBJECT");q.addOnce((()=>{const q=rt.E.getIconForType("currency",27);at.q.instance.prodigy.load.assetsAsPromise([q]).then((()=>{const q=this._sortedPets.findIndex((q=>!1===this._riftsSyncedDataStore.isPetAvailableForUse(q.uniqueID))),z=K.children[q];at.q.instance.prodigy.prefabFactory.createTooltip(z.transform,"REUSE_PET_MAGICOIN",{arrowDirection:ht.i.LEFT,iconGUID:rt.E.getIconForType("currency",27),titleKey:"PET_LOCKED"})})).catch(X.RQr.createHandler("TeamSelectionState: Failed to load magicoin icon for pet reuse tooltip"))}),this)}showElementsPopup(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield new Promise((q=>{at.q.instance.prodigy.open.prefabMenu(et.l.ElementalWeaknessChartPopup,q,void 0,!0,!1)}))}))}selectPet(q,K=!1){var z,Y;const Q=this._teamPetIndices[this._selectedSlotIndex];this._teamPetIndices[this._selectedSlotIndex]=q;const Z=q>=0?this._sortedPets[q]:null;if(Z){const q=ot.t.getItem("pet",Z.ID),Q=lt.P8.getElementType(q),J=X.wa5.getActiveScene().container.get("HOME_TEAM_TRANSFORM"),tt=q=>{q.setAnimationByName(0,"evolution",!1),q.GameObject.active=!0,q.getSpine().onComplete.addOnce((()=>{q.GameObject.active=!1}))};ut.d.updateInjectedValues(J.GameObject.children[this._selectedSlotIndex],Object.assign(Object.assign(Object.assign({},this.getCommonPetInjectionData(Q)),{IS_RARE_PET:!1,PET_ID:Z.ID,PET_NAME:null!==(Y=null!==(z=Z.nickname)&&void 0!==z?z:Z.name)&&void 0!==Y?Y:q.data.name}),K&&{REVIVE_UPPER_SPINE:tt,REVIVE_LOWER_SPINE:tt}))}else{const q=X.wa5.getActiveScene().container.get("HOME_TEAM_TRANSFORM");ut.d.updateInjectedValues(q.GameObject.children[this._selectedSlotIndex],{IS_RARE_PET:!1,PET_NAME:"",WEAKNESS_ICON:""})}if(Q>=0){const q={INPUT_ENABLED:!0,SHOW_ON_TEAM:!1};this._petSpawner.updateInjectionData(Q,q)}if(Z){const q=this._sortedPets.indexOf(Z),K={INPUT_ENABLED:!1,SHOW_ON_TEAM:!0};this._petSpawner.updateInjectionData(q,K)}}showPetReuseInterface(q,K,z){var Y,Q,Z;const J=null!==(Y=this._sortedPets[z].uniqueID)&&void 0!==Y?Y:"";if(this._riftsSyncedDataStore.isPetAvailableForUse(J)||!q.uniqueID)return;const tt=at.q.instance.prodigy.gameContainer.get("bec-c6b4"),it=at.q.instance.prodigy.gameContainer.get("81d-5606"),st=this._riftsSyncedDataStore.getUsedPetMetadata(q.uniqueID),nt=null===(Z=null===(Q=it.getRiftsPortalConfig())||void 0===Q?void 0:Q.options)||void 0===Z?void 0:Z.petReuseData;if(!nt||!st)return;const rt=this.getReusablePetInjectionData(q,K),ot=tt.getBalance(27);rt.PET_EVOLUTION_CARD_BALANCE=ot;const ht=at.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);X.Aq$.isDefined(null==nt?void 0:nt.petCooldownMs)&&X.Aq$.isDefined(null==st?void 0:st.timestamp)?(rt[dt.n7.TimeRemainingMs]=st.timestamp+nt.petCooldownMs-Date.now(),rt[dt.n7.TitleText]=ht.getText("RIFTS_USE_PET_AGAIN")):(rt[dt.n7.TitleText]=ht.getText("RIFTS_USE_PET_AGAIN_NO_TIME"),rt[dt.n7.ShowTimeRemaining]=!1);const ct=this._riftsSyncedDataStore.getUsedPetReuseCost(J);rt.PET_EVOLUTION_CARD_COST_BALANCE=ct,rt.REUSE_PET_CALLBACK=()=>{if(ot>=ct){const q=this._segment.item.beginSecureItemTransaction(),K=this._segment.rifts.getRiftTransactionData();this._riftsNetworkHandler.reuseRiftPet(J).then((()=>{var q,Y;const Q=null!==(q=null==nt?void 0:nt.petCooldownMs)&&void 0!==q?q:0,X=Q>0?Math.max(0,(st.timestamp+Q-Date.now())/1e3):0;this._segment.rifts.sendCooldownTimeSkipped(null!==(Y=st.cooldownID)&&void 0!==Y?Y:"",J,Q/1e3,X,ct,K.transaction_id),this.hidePetSelectionDrawer(),this._petSpawner.updateInjectionData(z,{INPUT_ENABLED:!0,DISABLED:!1,SHOW_TIME_REMAINING:!1,OVERLAY_TEXT:"",DISABLED_ICON:""}),this.selectPet(z,!0)})).catch(X.RQr.createHandler("TeamSelectionState: Error in the reuse pet flow")).finally((()=>q.flush(K)))}else at.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:bt.o.FunnelNotEnoughCurrencyRifts})},ut.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,et.l.RiftRunReusePetModal,rt).then((()=>{this._segment.rifts.sendOpenPetReuseInterface()})).catch(X.RQr.createHandler("Team Selection: Error loading reuse pet modal"))}isEElementType(q){return Object.values(Q.EElementType).includes(q)}}},13302:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{X:()=>Y,h:()=>Q}),function(q){q.Small="small",q.Normal="normal",q.Medium="medium",q.Large="large",q.Huge="huge"}(Y||(Y={})),function(q){q[q.Home=0]="Home",q[q.Away=1]="Away"}(Q||(Q={}))},52850:(q,K,z)=>{"use strict";z.d(K,{e:()=>ht});var Y=z(8674),Q=z(62459),X=z(36648),Z=z(28628),J=z(32389),tt=z(51151),et=z(35120),it=z(129),st=z(89360),nt=z(73797),at=z(23082),rt=z(10670),ot=z(76277);class ht{static get _duelInviteService(){return et.q.instance.prodigy.gameContainer.get("7ff-8385")}static get _localPlayer(){return et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player}static invite(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=this.getActiveInvites().find((q=>q.userID===K.userID));if(!Y)return this.rejectAllInvites(),this.sendInvite(q,K,z);this.acceptInvite(q,Y,z)}))}static getActiveInvites(){return this._duelInviteService.getInvites()}static getPlayerFromInvite(q){var K;const z=new it.a(et.q.instance.game);return q instanceof tt.DuelInviteProto?z.initFromProtobuf({userID:q.userID,appearance:q.appearance,equipment:q.equipment,name:q.name,team:q.team,member:q.member,level:q.level}):(q.name&&(q.appearance?q.appearance.name=q.name:q.appearance={name:q.name}),z.init({userID:q.userID,appearance:q.appearance,equipment:{follow:q.equipment.followID,hat:q.equipment.hatID,outfit:q.equipment.outfitID,weapon:q.equipment.weaponID,spellRelic:q.equipment.spellRelicID,boots:q.equipment.bootsID,mount:q.equipment.mountID,costume:(0,ot.G)(J.q).enabled?q.equipment.costumeID:void 0},isMember:q.member,data:{level:q.level,playerTransformation:null===(K=q.appearance)||void 0===K?void 0:K.morph}})),z}static acceptInvite(q,K,z){this._duelInviteService.acceptInvite(K),this.getActiveInvites().filter((q=>q!==K)).forEach((q=>{this.rejectInvite(q)}));const Y=this.getPlayerFromInvite(K),X=K instanceof tt.DuelInviteProto?K.roomID:K.channelName;et.q.instance.prodigy.gameContainer.get("b37-c775").getBattleStartQuestData(this.getBattleTypeFromVariant(q)).catch((q=>{Q.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(q)})).then((K=>{this.startBattle(q,Y,this._localPlayer,X,z,K)})).catch(Q.RQr.createHandler("Error continuing the battle start function in DuelInviteUI"))}static rejectInvite(q){this._duelInviteService.rejectInvite(q)}static rejectAllInvites(){for(const q of this.getActiveInvites())this.rejectInvite(q)}static sendInvite(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y={},X=new Q.bnh,Z=this._duelInviteService;Z.onInviteSent.add((q=>X.resolve(q)),Y),Z.onInviteFailed.add((q=>X.reject(q)),Y),X.finally((()=>{Z.onInviteSent.removeAll(Y),Z.onInviteFailed.removeAll(Y)})),Z.sendInvite(K);const J=yield X,it=J instanceof tt.DuelInviteProto?J.roomID:J.channelName;et.q.instance.prodigy.gameContainer.get("b37-c775").getBattleStartQuestData(this.getBattleTypeFromVariant(q)).catch((q=>{Q.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(q)})).then((Y=>{this.startBattle(q,this._localPlayer,K,it,z,Y)})).catch(Q.RQr.createHandler("Error continuing the battle start function in DuelInviteUI"))}))}static startBattle(q,K,z,Y,Q,J){var tt;const it=et.q.instance.game,st=K===et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player?z:K,ot=it.broadcaster.broadcast(nt.pm.GetTarget,it,[!0]),ht=it.state.current,ct=q=>{Q?Q():this.onBattleEnd(it,ht,ot,q)};et.q.instance.prodigy.battle.battleStats.type="PVP-Duel";const dt=et.q.instance.game.state.states.get(at.G.SecureBattleRevamp),lt={battleType:this.getBattleTypeFromVariant(q),hostUserId:`${K.getID()}`,guestUserId:`${z.getID()}`,roomId:null===(tt=et.q.instance.game.state.get(at.G.DuelMatchmaking).roomConfig)||void 0===tt?void 0:tt.id,activeQuestIDs:null==J?void 0:J.questIDs,questEventsToSend:null==J?void 0:J.questEvents},ut={backgroundID:[X.q.Battle_coliseum_outside_bg,X.q.Battle_coliseum_outside_fg],onVictory:()=>ct(Z.XK.Victory),onEscape:()=>ct(Z.XK.Escape),onDefeat:()=>ct(Z.XK.Defeat),opponent:st,channelName:Y,clearWorld:q!==rt.VB.DuelsStadium,defeatData:{preventDefaultTeleport:!0}};dt.startBattleRequest(lt,ut)}static onBattleEnd(q,K,z,Y){if(K===at.G.Tower){const K=q.state.get(at.G.Tower);K.startX=z.x,K.startY=z.y,et.q.instance.prodigy.start(at.G.Tower)}else et.q.instance.prodigy.world.it(this._localPlayer.data.zone,z.x,z.y,{battleResult:Y});et.q.instance.prodigy.gameContainer.get("14f-4faa").onWeeklyChallengeBattleEnd("PVP-Duel").then((()=>{st.h.instance.updateData()})).catch((q=>{Q.VyI.log(`BattleStats update failed at duel pvp battle end: ${Q.RQr.stringify(q)}`,Q.$bb.Warning)}))}static getBattleTypeFromVariant(q){return q===rt.VB.DuelsStadium?Z.gu.MatchmakingDuel:Z.gu.Duel}}},66840:(q,K,z)=>{"use strict";z.d(K,{D:()=>nt});var Y=z(8674),Q=z(62459),X=z(43846),Z=z(28152),J=z(80060),tt=z(17710),et=z(35120),it=z(30226),st=z(88022);let nt=class extends Q.uAl{constructor(){super(...arguments),this._addTurnsRemainingText=!1}setStatusEffect(q,K){const z=this._addTurnsRemainingText?`${q.remainingDuration} ${(0,X.k)(1===q.remainingDuration?"STATUS_EFFECT_TURN":"STATUS_EFFECT_TURNS")}`:`${q.remainingDuration}`,Y=et.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),Z=it.J.getLocalizationActiveNameKey("statusEffect",q.statusEffectId),nt=Y.hasText(Z)?Y.getText(Z):Y.getText(it.J.getLocalizationNameKey("statusEffect",q.statusEffectId)),at=it.J.getLocalizationActiveFlavorKey("statusEffect",q.statusEffectId),rt=Y.hasText(at)?Y.getText(at):Y.getText(it.J.getLocalizationFlavorKey("statusEffect",q.statusEffectId)),ot=tt.D.formatStatusEffectDescription(rt,q.remainingDuration,K);J.d.updateInjectedValues(this.GameObject,{SPELL_STATUS_EFFECT_NAME:nt,SPELL_STATUS_EFFECT_DESCRIPTION:ot,SPELL_STATUS_EFFECT_DURATION:z});const ht={atlas:st._.Ui_spell_effect_icons_json,frame:q.itemData.icon};this._icon.updateAsset(ht.atlas,ht.frame)}};(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],nt.prototype,"_icon",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],nt.prototype,"_addTurnsRemainingText",void 0),nt=(0,Y.Cg)([(0,Q.EVk)("ActiveStatusEffectUI",Z.Y.battleRevamp)],nt)},75935:(q,K,z)=>{"use strict";z.d(K,{k:()=>st});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(99625),J=z(28152),tt=z(19690),et=z(94325),it=z(66840);let st=class extends Q.uAl{constructor(){super(...arguments),this._transformsToApplyHeightReferenceTo=[]}displayEffects(q,K){var z;const Y=(null!==(z=this._gridLayout.GameObject.children)&&void 0!==z?z:[]).map((q=>q.findComponent(it.D))).filter((q=>!!q));Y.forEach((q=>{q.GameObject.active=!1}));(0,X.clone)(q).reverse().forEach(((q,z)=>{if(z>=Y.length){const q=this.addNewEntry();Y.push(q)}const Q=Y[z];Q.setStatusEffect(q,K),Q.GameObject.active=!0})),this._gridLayout.onUpdated.addOnce(this.onGridLayoutUpdated,this),this._gridLayout.updateAll()}addNewEntry(){const q=(0,tt.Ks)().loadFromGUID(Z.l.StatusEffect,this._gridLayout.GameObject);return this._gridLayout.GameObject.addChild(q),q.findComponent(it.D)}updateHeight(){const q=this.getClampedScrollAreaHeight();this._transformsToApplyHeightReferenceTo.forEach((K=>{K.heightDelta=q+8})),this._scrollView.rectTransform.heightDelta=q}getClampedScrollAreaHeight(){var q;const K=this._gridLayoutContainer.heightDelta;if(K<=274)return K;const z=null!==(q=this._gridLayout.GameObject.children)&&void 0!==q?q:[];let Y=0;for(let X=0;X{"use strict";z.d(K,{k:()=>Q,y:()=>ut});var Y,Q,X=z(8674),Z=z(87490),J=z(62459),tt=z(88022),et=z(82351),it=z(36648),st=z(43523),nt=z(76277),at=z(35120),rt=z(83133),ot=z(28152),ht=z(10670),ct=z(80060),dt=z(44094),lt=z(81531);!function(q){q.Astral1="4BDDFB",q.Astral2="8085FF",q.Astral3="FF9CB8",q.Fire="FDA915",q.Ice="BBF1FF",q.Physical="D7F5EB",q.Plant="C0E894",q.Shadow="F597E7",q.Storm="FFD406",q.Water="6DC7FF",q.Neutral="91FFEC",q.Disabled="8A827F",q.Cooldown="D5CBC4"}(Q||(Q={}));let ut=Y=class extends J.uAl{constructor(){super(...arguments),this.index=-1,this._activeUnit=null,this.onActionSelected=new J.HN0,this.onActionOnCooldownSelected=new J.HN0,this.onActionUnavailable=new J.HN0,this.onActionAvailable=new J.HN0,this.onActionDisabled=new J.HN0,this.onInactiveSelected=new J.HN0,this._sendOnInactiveSelected=!1,this._inactiveMsgArg=null}initialize(){this._inactiveMsgKey="",this._inactiveMsgArg=null,this._displayObject.active=!0,this._activeUnit=this._battleController.activeUnit,this._mainSpellList=this._activeUnit.spells.filter((q=>this._gameDataProvider.getItem("spellV2",q.spellId).data.showSpellcard)),this.checkValidity()}checkValidity(){var q,K,z;if(null===(q=this._activeUnit)||void 0===q?void 0:q.data){if(this.type===Z.EBattleAction.CastSpell&&this.index>=0){if(this._mainSpellList.length<=this.index)return void this.onActionUnavailable.dispatch();const q=this.getSpellData();if(!q)return;const Q=this._gameDataProvider.getItem("spellV2",q.spellId),X=Q.data;(0,nt.G)(st.P)||(X.statusEffects=[]);const J=Q.metadata,et=q.currentCooldown>0||this.isOneUseSpell(q.currentCooldown)||q.isLocked||this._activeUnit.currentMp0?ht=Y.COOLDOWN_TEXT:et&&(ht=Y.IS_LOCKED_TEXT);const lt={SPELLCARD_COLOR_STATE:ht,SPELLCARD_COOLDOWN_BARS_TOTAL:at,SPELLCARD_COOLDOWN_BARS_CURRENT:rt,SPELLCARD_COOLDOWN_1:this.getCooldownBarColor(rt,1,X.element),SPELLCARD_COOLDOWN_2:this.getCooldownBarColor(rt,2,X.element),SPELLCARD_COOLDOWN_3:this.getCooldownBarColor(rt,3,X.element),SPELLCARD_CENTRE_ICON:ot,SPELLCARD_MINI_ICON:[tt._.Ui_battle_revamp_json,`icon-mini-element-${X.element}${et?"-cooldown":""}`],SPELL_HAS_STATUS_EFFECT:Z.Util.isDefined(X.statusEffects)&&X.statusEffects.length>0};if(this._activeUnit.affixes.length){let q;this._activeUnit.affixes.find((K=>{var z;return K.type===Z.EAffixType.AdditiveDamageMultiplier&&(q=null===(z=K.instances.find((q=>q.element)))||void 0===z?void 0:z.element)})),Z.Util.singleOrArrayIncludes(q,X.element)&&(lt.SPELLCARD_BOOST_ICON=[tt._.Ui_battle_revamp_json,"icon-mini-buff-chevron"])}if(ct.d.updateInjectedValues(this.GameObject.parent,lt),this.onActionAvailable.dispatch(),this._activeUnit.currentMp0)return this._inactiveMsgKey=1===q.currentCooldown?"BATTLE_REVAMP_ON_COOLDOWN":"BATTLE_REVAMP_ON_COOLDOWN_PLURAL",void(this._inactiveMsgArg=q.currentCooldown)}if(this.type===Z.EBattleAction.RescuePet){if(!this._battleController.isRescueAvailable())return void this.onActionUnavailable.dispatch();this.onActionAvailable.dispatch()}}else J.VyI.log("Invalid data on active unit.",J.$bb.Error)}checkValidTargets(q,K=!1){if(q.team===Z.ESpellTeamTarget.Own&&q.unit===Z.ESpellUnitTarget.Ally){if(!this._battleController.getUnits().some((q=>{var K;return q.data.teamId===(null===(K=this._activeUnit)||void 0===K?void 0:K.data.teamId)&&q!==this._activeUnit&&q.isTargetable})))return K&&(this._inactiveMsgKey="BATTLE_REVAMP_NO_VALID_ALLY_TARGETS",this._sendOnInactiveSelected=!0),!1}return!0}isOneUseSpell(q){return-1===q}getCooldownBarColor(q,K,z){let X=Y.COOLDOWN_TEXT;return this.isOneUseSpell(q)?X=Y.IS_LOCKED_TEXT:q>=K&&(X=z===Z.EElementType.Astral?`${Z.EElementType.Astral}${K}`:z),Q[dt.$.capitalizeFirstLetter(X)]}getSpellData(){var q;return this.type===Z.EBattleAction.CastSpell&&this.index>=0?null===(q=this._mainSpellList)||void 0===q?void 0:q[this.index]:this.type===Z.EBattleAction.RescuePet?{spellId:this._battleController.battleConstants.rescueSpellId,isLocked:!1,currentCooldown:0}:null}sendActionData(){const q=this.getSpellData();if(q){at.q.instance.prodigy.audio.playSFXFromGUID(et.B.Sfx_spell_card_select);const K=this._gameDataProvider.getItem("spellV2",q.spellId).data,z=this._battleController.battleConstants.rescueSpellId===q.spellId;if(at.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendBattleInterfaceClickedEvent({object_name:`Spell Card ${K.name}`,object_type:z?ht.zA.Action:ht.zA.Spell}),0!==q.currentCooldown)return this.onActionOnCooldownSelected.dispatch(q),void(this._battleController.selectedSpell=q);this._sendOnInactiveSelected&&this.onInactiveSelected.dispatch()}this.onActionSelected.dispatch(q),this._battleController.selectedSpell=q}sendInactiveMessage(){this.clearInactiveMessage(),this._inactiveMsgArg?this._battleController.textLog.showMessage(this._inactiveMsgKey,this._inactiveMsgArg):this._battleController.textLog.showMessage(this._inactiveMsgKey)}clearInactiveMessage(){this._battleController.textLog.clearMessageQueue()}destroy(){this.onActionSelected.dispose(),this.onActionUnavailable.dispose(),this.onActionAvailable.dispose(),this.onActionDisabled.dispose(),this.onActionOnCooldownSelected.dispose(),this.onInactiveSelected.dispose(),super.destroy()}};ut.COOLDOWN_TEXT="cooldown",ut.IS_LOCKED_TEXT="disabled",(0,X.Cg)([(0,J.gfw)(Z.EBattleAction),(0,X.Sn)("design:type",String)],ut.prototype,"type",void 0),(0,X.Cg)([(0,J.g11)(),(0,X.Sn)("design:type",Number)],ut.prototype,"index",void 0),(0,X.Cg)([(0,J.Cdj)("BattleController"),(0,X.Sn)("design:type",Function)],ut.prototype,"_battleController",void 0),(0,X.Cg)([(0,J.Cdj)("GameDataProvider"),(0,X.Sn)("design:type",lt.q)],ut.prototype,"_gameDataProvider",void 0),(0,X.Cg)([(0,J.MnK)(rt.l),(0,X.Sn)("design:type",rt.l)],ut.prototype,"_toggle",void 0),(0,X.Cg)([(0,J.ERr)(),(0,X.Sn)("design:type",J._mx)],ut.prototype,"_displayObject",void 0),(0,X.Cg)([(0,J.bbQ)(),(0,X.Sn)("design:type",J.HN0)],ut.prototype,"onActionSelected",void 0),(0,X.Cg)([(0,J.bbQ)(),(0,X.Sn)("design:type",J.HN0)],ut.prototype,"onActionOnCooldownSelected",void 0),(0,X.Cg)([(0,J.bbQ)(),(0,X.Sn)("design:type",J.HN0)],ut.prototype,"onActionUnavailable",void 0),(0,X.Cg)([(0,J.bbQ)(),(0,X.Sn)("design:type",J.HN0)],ut.prototype,"onActionAvailable",void 0),(0,X.Cg)([(0,J.bbQ)(),(0,X.Sn)("design:type",J.HN0)],ut.prototype,"onActionDisabled",void 0),(0,X.Cg)([(0,J.bbQ)(),(0,X.Sn)("design:type",J.HN0)],ut.prototype,"onInactiveSelected",void 0),ut=Y=(0,X.Cg)([(0,J.EVk)("BattleActionData",ot.Y.battleRevamp)],ut)},77823:(q,K,z)=>{"use strict";z.d(K,{u:()=>Z});var Y=z(8674),Q=z(79687),X=z(39984);let Z=class{get teamCurrentHP(){return this._teamCurrentHP}constructor(q){this._activePlayer=q.player}refreshTeamCurrentHP(){const q=[];this._activePlayer.kennel.petTeam.forEach((K=>{if(K){const z=K.getCurrentHearts();q.push(Math.min(Math.round(z),X.e.MAX_HEARTS))}})),this._teamCurrentHP=q}getTeamCurrentHP(){return this._teamCurrentHP||this.refreshTeamCurrentHP(),this._teamCurrentHP}};Z=(0,Y.Cg)([(0,Q.injectable)(),(0,Y.Qj)(0,(0,Q.inject)("ad2-c5b2")),(0,Y.Sn)("design:paramtypes",[Object])],Z)},86323:(q,K,z)=>{"use strict";z.d(K,{I:()=>it});var Y=z(8674),Q=z(62459),X=z(5491),Z=z(35120),J=z(63834),tt=z(28152),et=z(68788);let it=class extends Q.y4o{constructor(){super(...arguments),this.onClosed=new Q.HN0,this.onOpened=new Q.HN0,this.onStarted=new Q.HN0,this._dropDownStart=new Q.I9Y,this._groupContainer=null,this._postBattleFlowManager=null}create(){super.create(),this._groupContainer=Z.q.instance.game.add.container(Z.q.instance.game.stage),this._groupContainer.name=this.GameObject.name,this.setRootContainer(this._groupContainer)}getDimensions(){return Q.or0.ZERO}getBattleCreatures(q){const K=Z.q.instance.prodigy.gameContainer.get("782-c308");return[K,...q.map((q=>{var z;if(!q.includes(X.V.Player)){const Y=null===(z=/^pet-(.*)$/.exec(q))||void 0===z?void 0:z[1];if(Y){const q=K.kennel.getPetByUniqueID(Y);if(q)return new J.r(K.game,q)}}return null})).filter((q=>q))]}show(q,K,z,Y,X){const J=this.getBattleCreatures(q),tt=Y.rewards;Y.skipChests&&(tt.length=0,Y.memberRewards.length=0),Z.q.instance.prodigy.prefabFactory.openPostBattleFlow({currentTeamCreatures:J,victory:K,battleType:z,postBattleRewards:{xpGained:Y.xpGained,rewards:tt,memberRewards:Y.memberRewards,rewardsScalingInfo:Y.rewardsScalingInfo,rescuablePets:Y.rescuablePets,magicoinRewardGranted:Y.magicoinRewardGranted},nootTipInfo:X}).promise.then((q=>{this.onOpened.dispatch(),this._postBattleFlowManager=q.findComponentInChildren(et.D),this._postBattleFlowManager?(this._postBattleFlowManager.OnDestroy.addOnce((()=>this.onResultClosed())),this.onStarted.dispatch(q)):this.onResultClosed()})).catch(Q.RQr.createHandler("Error with post battle flow menu"))}onResultClosed(){this.onClosed.dispatch()}destroy(){this.onClosed.dispose(),this.onOpened.dispose(),this.onStarted.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],it.prototype,"onOpened",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],it.prototype,"onStarted",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],it.prototype,"_dropDownStart",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_dropDownDuration",void 0),it=(0,Y.Cg)([(0,Q.EVk)("BattleRevampResult",tt.Y.battleRevamp)],it)},64019:(q,K,z)=>{"use strict";z.d(K,{cs:()=>ct,pV:()=>Q});var Y,Q,X,Z=z(8674),J=z(87490),tt=z(62459),et=z(95891),it=z.n(et),st=z(28628),nt=z(28152),at=z(13302),rt=z(630),ot=z(63761),ht=z(83269);!function(q){q.None="none",q.AllUnits="all",q.NonWizardUnits="nonWizard",q.WizardUnits="wizard"}(Q||(Q={})),function(q){q[q.FrontTop=0]="FrontTop",q[q.FrontMiddle=1]="FrontMiddle",q[q.FrontBottom=2]="FrontBottom",q[q.BackMiddle=3]="BackMiddle",q[q.Middle=4]="Middle",q[q.HugeUnit=5]="HugeUnit"}(X||(X={}));let ct=Y=class extends tt.uAl{constructor(){super(...arguments),this._units=[],this.teleportInBehaviour=Q.None}get id(){return this._id}get units(){return this._units.filter((q=>q.creature))}get rawUnits(){return this._units}get wizard(){return this.units.find((q=>q.type===st.uj.Wizard))}setData(q,K,z){this._id=q,this._teamData=K,this._unitData=z,this.positionTeamMembers(z)}positionTeamMembers(q){const K=1===it().keys(it().pickBy(q,{type:st.uj.Wizard})).length,z=ht.B.getUnitContainer(q[0].type).defaultSize,Q=q.every((q=>void 0!==q.slot));K&&q.sort(((q,K)=>q.type===st.uj.Wizard?-1:K.type===st.uj.Wizard?1:0)),q.forEach(((X,Z)=>{const et=X.type===st.uj.Boss?ot.H0.None:z===at.X.Huge?ot.H0.Immediate:X.teamId===J.ETeamId.Home?ot.H0.Astral:ot.H0.Shadow;let it=X.slot;1===q.length&&X.type!==st.uj.Boss&&z===at.X.Huge&&(it=st.Ie.HugeUnit);const nt=Y.TEAM_UNIT_SLOT_MAP[it],rt=this.units.find((q=>q.type===st.uj.Wizard));this.addUnitToSlot(X,Q&&tt.Aq$.isDefined(nt)?nt:this.getFallbackUnitPosition(Z),et,K&&rt?rt:void 0)}))}getFallbackUnitPosition(q){switch(q){case 0:return Y.TEAM_UNIT_SLOT_MAP[st.Ie.BackMiddle];case 1:return Y.TEAM_UNIT_SLOT_MAP[st.Ie.FrontTop];case 2:return Y.TEAM_UNIT_SLOT_MAP[st.Ie.FrontBottom];default:return Y.TEAM_UNIT_SLOT_MAP[st.Ie.FrontMiddle]}}addUnitToSlot(q,K,z,Y){var Q;const X=this._units[null!==(Q=q.unitSlot)&&void 0!==Q?Q:K];return X.setData(q,z,Y,q.scale),X}teleportIn(){return(0,Z.sH)(this,void 0,void 0,(function*(){const q=[];this._units.forEach((K=>{if(K.creature){const z=this.teleportInBehaviour===Q.AllUnits||this.teleportInBehaviour===Q.NonWizardUnits&&K.data.type!==st.uj.Wizard||this.teleportInBehaviour===Q.WizardUnits&&K.data.type===st.uj.Wizard;q.push(K.enterBattle(z))}})),yield Promise.all(q)}))}teleportOut(){return(0,Z.sH)(this,void 0,void 0,(function*(){const q=[];this._units.forEach((K=>{K.creature&&K.isAlive()&&q.push(K.playDefeated())})),yield Promise.all(q)}))}awaitUnitsLoaded(){return(0,Z.sH)(this,void 0,void 0,(function*(){return Promise.all(this.units.map((q=>(0,Z.sH)(this,void 0,void 0,(function*(){q.creature||(yield q.onDataSet.asPromise()),yield q.loadPromise})))))}))}getUnitIndex(q){return this._units.findIndex((K=>K===q))}isRescuable(){const q=this.getInjectedValue("BattleController");return this.units.some((K=>K.data.teamId===q.rightTeamId&&K.type===st.uj.Pet&&K.data.catchChance>=0&&!K.controllerUnit))}destroy(){super.destroy(),this._units.length=0}};ct.TEAM_UNIT_SLOT_MAP={[st.Ie.FrontTop]:X.FrontTop,[st.Ie.FrontMiddle]:X.FrontMiddle,[st.Ie.FrontBottom]:X.FrontBottom,[st.Ie.BackMiddle]:X.BackMiddle,[st.Ie.Middle]:X.Middle,[st.Ie.HugeUnit]:X.HugeUnit},(0,Z.Cg)([(0,tt.SZi)(),(0,tt.MnK)(rt.Xc),(0,Z.Sn)("design:type",Array)],ct.prototype,"_units",void 0),(0,Z.Cg)([(0,tt.gfw)(Q),(0,Z.Sn)("design:type",String)],ct.prototype,"teleportInBehaviour",void 0),ct=Y=(0,Z.Cg)([(0,tt.EVk)("BattleRevampTeam",nt.Y.battleRevamp)],ct)},630:(q,K,z)=>{"use strict";z.d(K,{GH:()=>Z,Xc:()=>zt,jN:()=>X,rC:()=>Q});var Y,Q,X,Z,J,tt=z(8674),et=z(87490),it=z(62459),st=z(95891),nt=z.n(st),at=z(20748),rt=z(62248),ot=z(88022),ht=z(82351),ct=z(99625),dt=z(36648),lt=z(28628),ut=z(37016),ft=z(43523),bt=z(35120),pt=z(49237),vt=z(91207),gt=z(77938),mt=z(28152),yt=z(37468),_t=z(29834),Et=z(23082),wt=z(76277),Tt=z(96810),St=z(70703),At=z(66998),Ct=z(26004),Ot=z(3583),It=z(96304),Dt=z(34958),Rt=z(16847),Pt=z(6719),Mt=z(80060),Nt=z(44094),xt=z(86283),Lt=z(34578),kt=z(97317),Bt=z(55122),Ut=z(13302),Ft=z(81531),Gt=z(35856),jt=z(29143),$t=z(46352),Ht=z(88331),Vt=z(99057),Wt=z(63761),qt=z(83269),Kt=z(92611);!function(q){q.Entrance="entrance",q.Exit="exit",q.ExitToStore="exit-to-store"}(Q||(Q={})),function(q){q.TransitionUnit="unit-show-hide",q.TransitionUi="healthbar-hide",q.StoreParticleStart="particle-start"}(X||(X={})),function(q){q.PetMergeRank="PET_MERGE_RANK",q.PetMergeBadge="PET_MERGE_BADGE"}(Z||(Z={})),function(q){q.Apply="apply",q.ApplyLarge="apply-large",q.Sustain="sustain"}(J||(J={}));let zt=Y=class extends it.uAl{constructor(){super(...arguments),this.onDataSet=new it.HN0,this.onTurnTimerExpired=new it.HN0,this.onUnitDefeated=new it.HN0,this.onUnitRevived=new it.HN0,this.onInfoTooltipShown=new it.HN0,this.onInfoTooltipHidden=new it.HN0,this.onHpSet=new it.HN0,this.onApplyDamage=new it.HN0,this._unitTooltipIsShowing=!1,this.loadPromise=Promise.resolve(),this.isRescued=!1,this.turnIndicatorOffset=null,this.onDefeatAnimationStarted=new it.HN0,this.onDefeatAnimationFinished=new it.HN0,this._defeatAnimationPlaying=!1,this.cleanUpOnDefeat=!1,this.affixes=[],this.statusEffects=[],this.onStatusEffectsChanged=new it.HN0,this.unitNameForSegment=null,this._isTargetable=!0}get creature(){return this._creature}get data(){return this._data}get overlayParent(){return this._overlayParent}get levelUi(){return this._levelUi}get statusEffectContainer(){return this._statusEffectContainer}get storeTeleportPriority(){return this._storeTeleportPriority}get unitTooltipIsShowing(){return this._unitTooltipIsShowing}set unitTooltipIsShowing(q){this._unitTooltipIsShowing!==q&&(this._unitTooltipIsShowing=q,q?this.onInfoTooltipShown.dispatch():this.onInfoTooltipHidden.dispatch())}get _teleportAnimator(){var q;switch(null===(q=this._creature)||void 0===q?void 0:q.teleportType){case Wt.H0.Astral:return this._teleportAnimatorAstral;case Wt.H0.ShadowBig:return this._teleportAnimatorShadowBig;case Wt.H0.Shadow:default:return this._teleportAnimatorShadow}}get size(){return this._creature.size}set size(q){this._creature.size=q,this.targetComponent.size=q}get scale(){return this._characterRoot.transform.localScale.y}set scale(q){this._characterRoot.transform.setScale(q)}get spellOriginOffset(){return this.size===Ut.X.Huge?{x:40,y:100}:{x:0,y:0}}get element(){return this.data.element}set element(q){this.data.element=q,this.updateWeaknessIcon()}create(){super.create();const{x:q,y:K}=this._newIndicator.transform.localPosition;this.createUnitTooltipTrigger()}destroy(){this.controllerUnit=null,this.onDataSet.dispose(),this.onTurnTimerExpired.dispose(),this.onUnitDefeated.dispose(),this.onUnitRevived.dispose(),this.onInfoTooltipShown.dispose(),this.onInfoTooltipHidden.dispose(),this.onHpSet.dispose(),this.onApplyDamage.dispose(),this.hideWaitingMessage(),this.onDefeatAnimationStarted.dispose(),this.onDefeatAnimationFinished.dispose(),this.onStatusEffectsChanged.dispose(),super.destroy()}fadeOut(){return(0,tt.sH)(this,arguments,void 0,(function*(q=!0){var K;yield null===(K=this._creature)||void 0===K?void 0:K.fadeOut(500).then((()=>{var K;q&&(this.GameObject.destroy(),null===(K=this.ultimatesUi)||void 0===K||K.GameObject.destroy())}))}))}fadeIn(){return(0,tt.sH)(this,void 0,void 0,(function*(){this._creature.visible=!0,yield this._creature.fadeIn(500)}))}get hitbox(){return this._creature.hitbox}getHitboxCenter(){const q=this._creature.hitbox;return{x:q.x+.5*q.w,y:q.y+.5*q.h}}enterBattle(q){return(0,tt.sH)(this,arguments,void 0,(function*(q,K=!1,z=!1){var Y;this._creature||(yield this.onDataSet.asPromise(),yield this.loadPromise),this._creature.ran=!1,null===(Y=this._hpBarSequence)||void 0===Y||Y.setupPulse(this._data.health.current/this._data.health.max),q?yield this.playTeleport(Q.Entrance,K,z):(this._creature.visible=!0,this._creature.handleEnter(),K&&(this.uiContent.active=!0,this.uiContent.findComponent(St.x).targetComponent.getRootContainer().alpha=1))}))}setData(q,K,z,Q=1){if(this.statusEffects.length=0,this.uiContent.active=!0,this._data=q,this.controllerUnit=z,this.scale=Q,!q)return this.clearData(),void this.onDataSet.dispatch();this._battleController.onChoosingSpell.removeAll(this),this._battleController.onChoosingSpell.add((()=>{this.updatePetRescueTooltip(),this.updateIdleStatusEffect()})),this._battleController.onSpellCardSelected.removeAll(this),this._battleController.onSpellCardSelected.add((()=>{this.updatePetRescueTooltip()}),this),this._battleController.onSpellCardUnselected.removeAll(this),this._battleController.onSpellCardUnselected.add((()=>{this.updatePetRescueTooltip()}),this),this._battleController.onSpellTargetChosen.removeAll(this),this._battleController.onSpellTargetChosen.add((()=>{this.updatePetRescueTooltip(),this.hideIdleStatusEffect()}),this),this._battleController.onBattleEnded.removeAll(this),this._battleController.onBattleEnded.add((()=>{this.updatePetRescueTooltip()}),this);const X=new(qt.B.getUnitContainer(q.type));this._creature=X,this.loadPromise=X.setData(q,this._characterRoot,K).then((()=>{X.size===Ut.X.Normal&&Q{this.statusEffects.push(q)})),q.statusEffects.length=0}clearData(){this.uiContent&&(this.uiContent.active=!1),this._unitTooltipTrigger.active=!1,this._data=null,this.isRescued=!1,this._creature&&(this._creature.creatureGameObject&&(this._creature.creatureGameObject.active=!1),this._creature.destroy(),this._creature=null),this._unitShield&&(this._unitShield.active=!1)}setUnitTooltipTriggerEnabled(q){this._unitTooltipTrigger&&(this._unitTooltipTrigger.active=q)}get battleId(){var q;return null===(q=this._data)||void 0===q?void 0:q.unitId}get name(){return this._creature.name||this.defaultName}set name(q){this._creature.name=q}get defaultName(){const q=this._data.teamId===this._battleController.leftTeam.id?bt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.name.getFallbackName():this._localizer.getText("FALLBACK_NAME_WIZARD");switch(this.type){case lt.uj.Wizard:return q;default:return Nt.$.capitalizeFirstLetter(this.type)}}get level(){return this._data.level}get currentHp(){return this._data.health.current}get maxHp(){return this._data.health.max}get currentMp(){return this._data.mp.current}get maxMp(){return this._data.mp.max}get type(){return this._data.type}get spells(){return this._data.spells}isAlive(){return!this.isDefeated()}isDefeated(){return this.isKnockedOut()||this.isRescued}isKnockedOut(){return this.currentHp<=0}get isTargetable(){return this._isTargetable&&!this.isDefeated()}set isTargetable(q){this._isTargetable=q}isARescuableUnit(){var q,K;return(null===(q=this._data)||void 0===q?void 0:q.catchChance)>=0&&(null===(K=this._data)||void 0===K?void 0:K.teamId)===this._battleController.rightTeam.id&&this.type===lt.uj.Pet&&this.isTargetable&&!this.controllerUnit}isInARescuableState(){var q;return this.isARescuableUnit()&&this._data.health.current<=(null!==(q=this._data.catchHealth)&&void 0!==q?q:this._data.health.max*this._battleController.battleConstants.rescueDamageThreshold)}playAttackAnimation(){this._creature.attack()}playSummonAnimation(){this._creature.summon()}playLevelUp(){this._creature.levelUp()}playHurt(){this._creature.hurt()}playWalk(){this._creature.walk()}defeatUnit(){return(0,tt.sH)(this,arguments,void 0,(function*(q=Q.Exit){this.onUnitDefeated.dispatch(),this.removeAllStatusEffects(),yield this.playDefeated(q)}))}reviveUnit(){this.onUnitRevived.dispatch()}playDefeated(){return(0,tt.sH)(this,arguments,void 0,(function*(q=Q.Exit){this._creature&&(this._creature.ran?this._defeatAnimationPlaying&&(yield this.onDefeatAnimationFinished.asPromise()):(this._creature.ran=!0,this.hideWaitingMessage(),this.onDefeatAnimationStarted.dispatch(),this._defeatAnimationPlaying=!0,this.setNewIndicatorActive(!1),this._creature.teleportType===Wt.H0.None||this._creature.teleportType===Wt.H0.Immediate?(yield this._creature.defeated(),this.uiContent.active=!1,this._unitTooltipTrigger.active=!1,this._unitShield&&(this._unitShield.active=!1)):yield this.playTeleport(q,!1),this._defeatAnimationPlaying=!1,this.cleanUpOnDefeat&&(yield this.cleanUpAssets()),this.onDefeatAnimationFinished.dispatch()))}))}cleanUpAssets(){return(0,tt.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,X;const Z=[...this.getInjectedValue("LeftTeamUnits"),...this.getInjectedValue("RightTeamUnits")].filter((q=>!q.isDefeated()||!q.cleanUpOnDefeat));if(Z.map((q=>q.creature.id)).includes(this.creature.id))return;const J=bt.q.instance.game.state.states.get(Et.G.SecureBattleRevamp).getUnitAssets({[this.data.unitId]:this.data});vt.E.removeAssetsFromCache(J);const tt=nt().flatMap(Z.map((q=>q.spells))),et=tt.map((q=>q.spellId)),st=this.spells.filter((q=>!et.includes(q.spellId))),at=tt.map((q=>this._gameDataProvider.getItem("spellV2",q.spellId))),rt=st.map((q=>this._gameDataProvider.getItem("spellV2",q.spellId))),ot=[],ht=[];for(const it of at)(null===(z=null===(K=null===(q=null==it?void 0:it.metadata)||void 0===q?void 0:q.assets)||void 0===K?void 0:K.icon)||void 0===z?void 0:z.assetKey)&&ot.push(Nt.$.capitalizeFirstLetter(it.metadata.assets.icon.assetKey));for(const nt of rt){const q=(null===(X=null===(Q=null===(Y=null==nt?void 0:nt.metadata)||void 0===Y?void 0:Y.assets)||void 0===Q?void 0:Q.icon)||void 0===X?void 0:X.assetKey)?Nt.$.capitalizeFirstLetter(nt.metadata.assets.icon.assetKey):null;!ot.includes(q)&&it.Aq$.isDefined(dt.q[q])&&ht.push(dt.q[q],dt.q[`${q}_cooldown`])}for(const it of ht)bt.q.instance.game.cache.removeImage(it);const ct=vt.E.getSpellGuids(at),lt=vt.E.getSpellGuids(rt),ut=vt.E.getAssetDependencies(ct),ft=vt.E.getAssetDependencies(lt),pt=nt().difference(ft,ut);vt.E.removeAssetsFromCache(pt),this._creature.animator instanceof _t.j&&this._creature.animator.spine.destroy(),this._creature.creatureGameObject.destroy(),it.C1c.markTextureGarbageCollectionFrame(),yield it.Egh.timeout(0),it.C1c.garbageCollectTextures()}))}playEscaped(){return(0,tt.sH)(this,void 0,void 0,(function*(){var q;const K=bt.q.instance.game,z=this._creature.creatureGameObject.transform,Y=(null===(q=this._data)||void 0===q?void 0:q.teamId)===this._battleController.rightTeam.id?K.width+100:-100,Q=K.add.tween(z.localPosition,z).to({x:Y},2e3,it.GS3.Quadratic.In);this.uiContent.active=!1,this._creature.flip(),this._creature.walk(),Q.start(),yield Q.onTweenComplete.asPromise()}))}setNewIndicatorActive(q=!0){if(!this._creature)return;const K=bt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=this._creature.id,Y=!xt.D.hasBeenRescuedPreviously(K,z);this._newIndicator.active=Y&&q}showRarity(){return(0,tt.sH)(this,void 0,void 0,(function*(){var q;yield null===(q=this._rarityDisplay)||void 0===q?void 0:q.showRarity(this._data.rarity)}))}updateRescuableUI(){return(0,tt.sH)(this,arguments,void 0,(function*(q=!0){this.isARescuableUnit()?(this.setNewIndicatorActive(!0),q&&(yield this.showRarity())):this.setNewIndicatorActive(!1)}))}hasAccessToSpell(q){return this.spells.some((K=>K.spellId===q))}setRescueCost(q,K,z,Y){this._rescueCost.GameObject&&(this._rescueCost.GameObject.active=q),q&&(this._rescueCost.updateCurrencyID(K),this._rescueCost.updateAmount(z,Y),this.getInjectedValue("20f-5f67").playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(rt.l6.Rescue,Tt.l.PetHardCurrencyImpression))}setOwnedCount(q){var K,z;null===(z=null===(K=this.gameObject)||void 0===K?void 0:K.isDestroyed)||void 0===z||z||Mt.d.updateInjectedValues(this.gameObject,{OWNED_COUNT:it.Aq$.isDefined(q)?this._localizer.getText(q?"PET_RESCUE_OWNED_COUNT":"PET_RESCUE_NOT_OWNED",...q?[q]:[]):""})}fadeUi(q,K){return(0,tt.sH)(this,void 0,void 0,(function*(){const z=this.uiContent.findComponent(St.x);z.startTween(q,null!=K?K:z.targetComponent.getRootContainer().alpha),yield z.onComplete.asPromise()}))}updateWeaknessIcon(){const q=this._battleController.battleConstants;this._weaknessIcon.updateAsset(ot._.Ui_battle_revamp_json,`icon-mini-element-${q.getElementalWeakness(this._data.element)}`)}setupMergeRankUi(){const q=this._data.teamId===et.ETeamId.Away,K=this._data.mergeRank;if(this.type!==lt.uj.Pet)return;const z=void 0===K||K===ut.qd.MIN,Q={};z||(Q[Z.PetMergeRank]=K),q&&(Q[Z.PetMergeBadge]=Pt.y.toInjectionParams({atlas:ot._.Ui_battle_revamp_json,frame:`${Y.PET_MERGE_BADGE_PREFIX}-purple`})),Mt.d.updateInjectedValues(this.petMergeUi,Q),this.petMergeUi.active=!z}setupIndicators(){this.updateWeaknessIcon(),this._creature.shouldShowLevel()?this._levelText.text=`${this._data.level}`:this._levelUi.active=!1,this.hpBar.setFromValues(this._data.health.current,this._data.health.max),this.mpBar.init(this._data.mp),this._data.teamId!==this._battleController.leftTeamId&&this.ultimatesUi&&this._battleController.type===lt.gu.Ultimates&&this._questDataProvider.getCurrentQuestData().then((q=>{const K=bt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=q.find((q=>q.questID===K.ultimateQuestId)),Y=Number(K.ultimateTaskId)>0?z.getTamingLevel()+1:1;this.ultimatesUi.init(Y,this._data.nickname)})).catch(it.RQr.createHandler("Error initializing mythics taming progress UI")),this.processUnitShield(),this.setupMergeRankUi()}setupRarityDisplay(){if(this._rarityDisplay){const q=Math.min(this.hitbox.h,Y.UNIT_RARITY_MAX_YSHIFT);this._rarityDisplay.GameObject.transform.setPositionY(-q)}}setupChargedLevels(){if(this._creature instanceof Kt.N&&this._creature.chargedLevel>0){const q=kt.QT.MAX_NONMEMBER_CHARGED_LEVEL,K=this.gameObject.findComponent(it.bE_);this._levelText.text=`${this._creature.level+this._creature.chargedLevel}`,K.Container.rebind(Lt.m.ShowChargedLevels).toConstantValue(!0),K.Container.rebind(Lt.m.ChargedLevelAnimationTier).toConstantValue(this._creature.chargedLevel>=q?"max-charged":"charged"),this.gameObject.findComponentsInChildren(Ct.B).forEach((q=>q.consume()))}}setupUnitTooltip(){this.unitTooltipPopupContainer=this._unitTooltipTrigger.findComponent(it.y4o).getRootContainer();const q=this.GameObject.transform.worldPosition;this._unitTooltipTrigger.transform.setPosition(q.x,q.y);const K=this._unitTooltipTrigger.findComponentInChildren(pt.$),z=K.GameObject.transform;if(z.setPosition(this.hitbox.x,this.hitbox.y),z.setSizeDelta(this.hitbox.w,this.hitbox.h),K.onClick.removeAll(),K.onClick.add((()=>{this._battleController.onClickUnitTooltip(this.battleId)})),this.petRescueTooltip){const q=this.petRescueTooltip.findComponentInChildren(pt.$);q.onClick.removeAll(),q.onClick.add((()=>{this._battleController.onClickUnitTooltip(this.battleId)}))}}updateHp(q){var K;const z=this._data.health.current;this._data.health.current=it.cj9.clamp(q,0,this.maxHp),this.hpBar.setFromValues(this._data.health.current,this._data.health.max,!0),null===(K=this._hpBarSequence)||void 0===K||K.triggerShake(this._data.health.current/this._data.health.max),this.onHpSet.dispatch(this._data.health.current,z)}updateMp(q){q===this.maxMp?this.refillMp():(this._data.mp.current=it.cj9.clamp(q,0,this.maxMp),this.mpBar.GameObject.active&&this.mpBar.updateMp(this._data.mp.current))}updateLevel(q){this._data.level=it.cj9.clamp(q,Bt.s.minLevel,Bt.s.activePlayerLevelCap),this._creature.shouldShowLevel()&&(this._levelText.text=`${this._data.level}`)}updatePetRescueTooltip(){if(!this.petRescueTooltip||!this.isARescuableUnit())return;this.petRescueTooltip.active=!0;const q=this.petRescueTooltip.findComponentInChildren(At.s),K=this._battleController.isHighlightingRescue,z=this._battleController.isChoosingSpell,Y=this._battleController.isPerformingAction,Q=null!==this._battleController.selectedSpell,X=this._unitTooltipIsShowing;!this.isInARescuableState()||!z&&!K||Y||Q||X?(this.setNewIndicatorActive(!0),q.runOutTween()):(this.setNewIndicatorActive(!1),q.runInTween())}updateIdleStatusEffect(q=!1){if(!this._battleController.isChoosingSpell&&!q)return void this.hideIdleStatusEffect();const K=this.statusEffects.filter((q=>q.itemData.type===et.EStatusEffectType.DOT));if(0===K.length)return void this.hideIdleStatusEffect();const z=K[0];this._battleController.statusEffectAnimationController.queueAnimationAction(ct.l[z.itemData.animationData.statusEffectPrefab],this._statusEffectContainer,Ot.c.getIdleAnimation(z.remainingDuration),!0,this.size)}hideIdleStatusEffect(){this._battleController.statusEffectAnimationController.hideAnimationOfType(et.EStatusEffectType.DOT,this._statusEffectContainer)}updatePersistentStatusEffects(){const q=this.statusEffects.filter((q=>q.itemData.type===et.EStatusEffectType.Bomb));if(0===q.length)return void this.hideActivePersistentStatusEffect();const K=q.sort(((q,K)=>q.remainingDuration-K.remainingDuration))[0];this._battleController.statusEffectAnimationController.queueAnimationAction(ct.l[K.itemData.animationData.statusEffectPrefab],this._statusEffectContainer,Ot.c.getIdleAnimation(K.remainingDuration),!0,this.size)}hideActivePersistentStatusEffect(){this._battleController.statusEffectAnimationController.hideAnimationOfType(et.EStatusEffectType.Bomb,this._statusEffectContainer)}alertMpEmpty(){return(0,tt.sH)(this,arguments,void 0,(function*(q=!1){return bt.q.instance.prodigy.audio.playSFXFromGUID(ht.B.Sfx_empty_mp),q?this.mpBar.alertMpEmptyAnimExtreme():this.mpBar.alertMpEmptyAnim()}))}onSelectSpell(q){q?this.mpBar.onSelectSpell(q.cost):this.mpBar.onSelectSpell(0)}processUnitShield(){this._unitShield&&(this._unitShield.active=this._data.type===lt.uj.Titan)}refillMp(){this._data.mp.current=this.maxMp,this.mpBar.GameObject.active&&(bt.q.instance.prodigy.audio.playSFXFromGUID(ht.B.Sfx_mp_refilled),this.mpBar.refillMp())}playTeleport(q,K){return(0,tt.sH)(this,arguments,void 0,(function*(q,K,z=!1){var Y;const Z=q===Q.Entrance;this.controllerUnit&&(null===(Y=this.controllerUnit)||void 0===Y||Y.playSummonAnimation(),yield it.Egh.timeout(500)),this.playTeleportAudio(Z),Z||(yield this._creature.handleExit()),this._creature.visible=!Z,this._teleportAnimator.GameObject.active=!0,this._teleportAnimator.playAnimation(q,!1,!0),this._teleportAnimator.spine.onEvent.add(((Y,Z)=>{switch(Z.data.name){case X.TransitionUnit:this._creature.visible=q===Q.Entrance,this._unitTooltipTrigger.active=!this._battleController.isUnitTooltipLocked()&&q===Q.Entrance,K&&q===Q.Entrance&&(this.uiContent.active=!0,this.fadeUi(1).catch(it.RQr.createHandler("Error showing UI"))),z&&q===Q.Entrance&&(this._healAnimation.GameObject.active=!0,this._healAnimation.OnAnimationComplete.addOnce((()=>this._healAnimation.GameObject.active=!1)),this._healAnimation.playAnimation(this._creature.teleportType===Wt.H0.ShadowBig?J.ApplyLarge:J.Apply,!1,!0),this._creature instanceof Kt.N&&this._creature.setFollowPosition());break;case X.TransitionUi:this.uiContent.active=q===Q.Entrance,this._unitTooltipTrigger.active=!this._battleController.isUnitTooltipLocked()&&q===Q.Entrance,this.ultimatesUi&&(this.ultimatesUi.GameObject.active=!1);break;case X.StoreParticleStart:{const q=this._storeParticleContainer.children[0];q&&(q.active=!0);break}}}),this),yield this._teleportAnimator.OnAnimationComplete.asPromise(),this._teleportAnimator.spine.onEvent.removeAll(this),this._teleportAnimator.GameObject.active=!1}))}playStoreTeleport(){return(0,tt.sH)(this,void 0,void 0,(function*(){yield this.playTeleport(Q.ExitToStore,!1)}))}playTeleportAudio(q){if(q)bt.q.instance.prodigy.audio.playSFXFromGUID(ht.B.Sfx_wizard_team_teleport);else{this._data.teamId===this._battleController.rightTeamId&&this._creature.teleportType===Wt.H0.Astral?bt.q.instance.prodigy.audio.playSFXFromGUID(ht.B.Sfx_teleport_rescue):bt.q.instance.prodigy.audio.playSFXFromGUID(ht.B.Sfx_teleport_defeat)}}createWaitingMessage(q,K,z){const Y={MESSAGE:this._localizer.getText(K),TIMEOUT:z};if(this._waitingMessage)Mt.d.updateInjectedValues(this._waitingMessage,Y);else{const K=bt.q.instance.prodigy.gameContainer.get("983-05a7");this._waitingMessage=Mt.d.loadWithInjectedValuesFromGUID(K,q,Y,this.gameObject);const z=Math.max(this.gameObject.transform.worldPosition.y+this.hitbox.y,this._waitingMessage.transform.fullHeight);this._waitingMessage.transform.setPosition(0,z-this.gameObject.transform.worldPosition.y)}}hideWaitingMessage(){this._waitingMessage&&(this._waitingMessage.destroyDeferred(),this._waitingMessage=null)}showOpponentWaitingMessage(q){this.createWaitingMessage(ct.l.DuelWaitingMessage,q)}showCasterWaitingMessage(q){this.createWaitingMessage(ct.l.DuelTurnTimer,void 0,q);const K=this._waitingMessage.findComponentInChildren(Dt.P);K.tweenValue(0),K.onComplete.addOnce((()=>this.onTurnTimerExpired.dispatch()))}updateLayerByPrefix(q){const K=`${q}${this.layerLevel}`;this.updateLayerByName(K)}updateLayerByName(q){this.GameObject.setLayer(q,!1),this.creature.creatureGameObject.setLayer(q,!0),this.statusEffectContainer.setLayer(q,!0),this.uiContent.setLayer(q,!0)}showAffix(q){return(0,tt.sH)(this,void 0,void 0,(function*(){const K=this.affixes.find((K=>K.type===q.type));if(K)K.instances.push(q),this.updateAffixQuantity(K);else{const K=this.getAffixIcon(q),z=K?yield this.addAffixIcon(K):void 0;if(this.affixes.push({type:q.type,instances:[q],prefab:z}),q.type===et.EAffixType.Shield){const q=this.size===Ut.X.Huge?3:Ut.X?2:1;this.creature.addBarrier(Wt.HW.LegacySprite,null,0,0,q,q)}}}))}getAffixIcon(q){if(!(0,wt.G)(ft.P))switch(q.type){case et.EAffixType.AdditiveDamageMultiplier:if(q.element){const K=Y.ELEMENTAL_BUFF_ICONS[Array.isArray(q.element)?q.element[0]:q.element];if(K)return{atlas:ot._.Ui_battle_revamp_json,frame:K}}break;case et.EAffixType.Revive:return dt.q.Effect_revive_mini;case et.EAffixType.Shield:return{atlas:ot._.Ui_battle_revamp_json,frame:"icon-small-shield-titan"}}}addAffixIcon(q){return(0,tt.sH)(this,void 0,void 0,(function*(){yield Pt.y.loadAssets(q);const K=Mt.d.loadWithInjectedValuesFromGUID(this.getInjectedValue("983-05a7"),ct.l.VisibleAffixIcon,{ICON_GUID:Pt.y.toInjectionParams(q)});return this.affixContainer.parent.active=!0,this.affixContainer.addChild(K),this.affixBackground.active=!0,K}))}updateAffixQuantity(q){if(!q.prefab)return;const K=q.instances.length;Mt.d.updateInjectedValues(q.prefab,{NUMBER:K>1?`${K}`:""})}removeAffix(q){var K;let z=-1;const Y=this.affixes.findIndex((K=>(z=K.instances.findIndex((K=>K.id===q)))>-1));if(Y<0)return;const Q=this.affixes[Y];Q.instances.splice(z,1),Q.instances.length>0?this.updateAffixQuantity(Q):(this.affixes.splice(Y,1),null===(K=Q.prefab)||void 0===K||K.destroy(),this.affixes.length<=0&&(this.affixContainer.parent.active=!1,this.affixBackground.active=!1,Q.type===et.EAffixType.Shield&&(this.creature.breakBarrier(),this.creature.removeBarrier(!1))))}addStatusEffect(q){var K;const z=null===(K=gt.t.getItem("statusEffect",q.statusEffectId))||void 0===K?void 0:K.data;if(!z)throw new Error(`Status effect item data with ID ${q.statusEffectId} not found.`);const Y=Object.assign(Object.assign({},q),{itemData:z});return this.statusEffects.push(Y),this.updateDisplayedStatusEffects(),Y}removeStatusEffect(q){const K=this.statusEffects.findIndex((K=>K.id===q));K>=0&&(this.statusEffects.splice(K,1),this.onStatusEffectsChanged.dispatch()),this._statusEffectIndicators.updateDisplayedEffects(this.statusEffects,this._data)}removeAllStatusEffects(){this.statusEffects.length>0&&(this.statusEffects.length=0,this.updateDisplayedStatusEffects(),this.updatePersistentStatusEffects())}modifyStatusEffect(q,K){const z=this.statusEffects.find((K=>K.id===q));if(z){const q=z.remainingDuration;z.remainingDuration=K,q!==K&&(this.onStatusEffectsChanged.dispatch(),this._statusEffectIndicators.updateDisplayedEffects(this.statusEffects))}}updateDisplayedStatusEffects(){this.onStatusEffectsChanged.dispatch(),this._statusEffectIndicators.updateDisplayedEffects(this.statusEffects,this.data)}showAsInteractive(q){const K=this._unitTooltipTrigger.findComponentInChildren(pt.$);K&&(K.useHandCursor=q)}createUnitTooltipTrigger(){this._unitTooltipTrigger=new it._mx(this.GameObject);const q=this._unitTooltipTrigger.addComponent(it.XVE);q.setAnchorMin(0,0),q.setAnchorMax(1,1),q.setPivot(0,0),q.setPosition(0,0),this._unitTooltipTrigger.setLayer("unit-tooltip-input-bottom",!0),this._unitTooltipTrigger.addComponent(pt.$)}};zt.UNIT_TOOLTIP_HEIGHT_MAX=100,zt.UNIT_RARITY_MAX_YSHIFT=150,zt.PET_MERGE_BADGE_PREFIX="icon-pet-merge",zt.SMALL_UNIT_SCALE_THRESHOLD=.6,zt.ELEMENTAL_BUFF_ICONS={[et.EElementType.Fire]:"icon-mini-buff-fire",[et.EElementType.Ice]:"icon-mini-buff-ice",[et.EElementType.Physical]:"icon-mini-buff-physical",[et.EElementType.Plant]:"icon-mini-buff-plant",[et.EElementType.Storm]:"icon-mini-buff-storm",[et.EElementType.Water]:"icon-mini-buff-water"},(0,tt.Cg)([(0,it.Cdj)("d24-279f"),(0,tt.Sn)("design:type",Object)],zt.prototype,"_questDataProvider",void 0),(0,tt.Cg)([(0,it.Cdj)("BattleController"),(0,tt.Sn)("design:type",Function)],zt.prototype,"_battleController",void 0),(0,tt.Cg)([(0,it.Cdj)(it.$Bt.LocalizationService),(0,tt.Sn)("design:type",it.dTp)],zt.prototype,"_localizer",void 0),(0,tt.Cg)([(0,it.Cdj)("GameDataProvider"),(0,tt.Sn)("design:type",Ft.q)],zt.prototype,"_gameDataProvider",void 0),(0,tt.Cg)([(0,it.MnK)(Gt.Ri),(0,tt.Sn)("design:type",Gt.Ri)],zt.prototype,"targetComponent",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"_overlayParent",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"_characterRoot",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"uiContent",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"_newIndicator",void 0),(0,tt.Cg)([(0,it.MnK)(Rt.n),(0,tt.Sn)("design:type",Rt.n)],zt.prototype,"_rescueCost",void 0),(0,tt.Cg)([(0,it.MnK)(it.vYh),(0,tt.Sn)("design:type",it.vYh)],zt.prototype,"_weaknessIcon",void 0),(0,tt.Cg)([(0,it.MnK)(it.EYj),(0,tt.Sn)("design:type",it.EYj)],zt.prototype,"_levelText",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"_levelUi",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"petMergeUi",void 0),(0,tt.Cg)([(0,it.MnK)(yt.z),(0,tt.Sn)("design:type",yt.z)],zt.prototype,"hpBar",void 0),(0,tt.Cg)([(0,it.MnK)(It.j),(0,tt.Sn)("design:type",It.j)],zt.prototype,"_hpBarSequence",void 0),(0,tt.Cg)([(0,it.MnK)(jt.e),(0,tt.Sn)("design:type",jt.e)],zt.prototype,"mpBar",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"affixContainer",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"affixBackground",void 0),(0,tt.Cg)([(0,it.MnK)(Vt.M),(0,tt.Sn)("design:type",Vt.M)],zt.prototype,"ultimatesUi",void 0),(0,tt.Cg)([(0,it.MnK)(_t.j),(0,tt.Sn)("design:type",_t.j)],zt.prototype,"_teleportAnimatorAstral",void 0),(0,tt.Cg)([(0,it.MnK)(_t.j),(0,tt.Sn)("design:type",_t.j)],zt.prototype,"_teleportAnimatorShadow",void 0),(0,tt.Cg)([(0,it.MnK)(_t.j),(0,tt.Sn)("design:type",_t.j)],zt.prototype,"_teleportAnimatorShadowBig",void 0),(0,tt.Cg)([(0,it.MnK)(_t.j),(0,tt.Sn)("design:type",_t.j)],zt.prototype,"_healAnimation",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"_statusEffectContainer",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"_unitShield",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"missedTurnX",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"_storeParticleContainer",void 0),(0,tt.Cg)([(0,it.g11)(),(0,tt.Sn)("design:type",Number)],zt.prototype,"_storeTeleportPriority",void 0),(0,tt.Cg)([(0,it.MnK)($t.Z),(0,tt.Sn)("design:type",$t.Z)],zt.prototype,"_rarityDisplay",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],zt.prototype,"petRescueTooltip",void 0),(0,tt.Cg)([(0,it.MnK)(Ht.m),(0,tt.Sn)("design:type",Ht.m)],zt.prototype,"_statusEffectIndicators",void 0),(0,tt.Cg)([(0,at.sg)(500),(0,tt.Sn)("design:type",Function),(0,tt.Sn)("design:paramtypes",[Boolean]),(0,tt.Sn)("design:returntype",void 0)],zt.prototype,"playTeleportAudio",null),zt=Y=(0,tt.Cg)([(0,it.EVk)("BattleRevampUnit",mt.Y.battleRevamp)],zt)},15160:(q,K,z)=>{"use strict";z.d(K,{F:()=>ut});var Y,Q=z(8674),X=z(62459),Z=z(62248),J=z(99625),tt=z(35120),et=z(28152),it=z(16847),st=z(80060),nt=z(43754),at=z(13302),rt=z(13956),ot=z(81531),ht=z(17710),ct=z(21001),dt=z(35856),lt=z(87490);let ut=Y=class extends X.uAl{constructor(){super(...arguments),this.onRescueCurrencyBalanceShown=new X.HN0,this.onRescueCurrencyBalanceHidden=new X.HN0,this._battleActions=[],this.battleTargets=[],this._currentActionData=null,this.onTargetConfirmed=new X.HN0,this.onActionChange=new X.HN0,this.onHardCurrencyBalanceTooltipHidden=new X.HN0}create(){this._battleActions=this.GameObject.findComponentsInChildren(ct.y),this._battleActions.forEach(((q,K)=>{q.onActionSelected.add(this.processActionSelected.bind(this,K),this),q.onActionOnCooldownSelected.add(this.processActionOnCooldownSelected.bind(this,K))}))}initialize(){const q=this.getInjectedValue("983-05a7"),K=this.getInjectedValue(X.$Bt.LocalizationService);this.hideRescueUi(),this._spellTooltips=this._battleActions.map((z=>{var Q,X,Z;if(z.type===lt.EBattleAction.RescuePet)return null;const tt=z.getSpellData();if(!tt)return null;const et=this._gameDataProvider.getItem("spellV2",tt.spellId).data;if(!et)return null;const it=this._battleController.getActiveUnitSpellData(tt.spellId),nt=null!==(Q=null==it?void 0:it.spellPower)&&void 0!==Q?Q:0,at=null!==(X=null==it?void 0:it.spellAccuracy)&&void 0!==X?X:0,rt=null===(Z=et.flags)||void 0===Z?void 0:Z.find((q=>q.flag===lt.ESpellFlag.ChangeHp)),ot=this._spellLevelBonusConstants.getDisplaySpellPower(rt?rt.flagValue:nt,!!rt),ct=this._spellLevelBonusConstants.getDisplaySpellAccuracy(at),dt=et.cooldown<0?K.getText("SPELL_COOLDOWN_NEVER"):0===et.cooldown?K.getText("SPELL_COOLDOWN_NONE"):`${et.cooldown}`,ut=ht.D.getStatusEffectInjectedValues(et),ft=st.d.loadWithInjectedValuesFromGUID(q,J.l.RevampSpellTooltip,Object.assign({TOOLTIP_IS_IN_COOLDOWN:tt.currentCooldown>0,TOOLTIP_ELEMENT:et.element,TOOLTIP_NAME:et.name,TOOLTIP_POWER:ot,TOOLTIP_ACCURACY:ct,TOOLTIP_COOLDOWN:dt,TOOLTIP_SELECTED:!1},ut),this._spellTooltipContainer);return ft.transform.setPosition(0,Y.SPELL_TOOLTIP_OFFSCREEN_Y),ft})),this.battleTargets=this.GameObject.findComponentsInChildren(dt.Ri),this._battleController.getUnits().forEach((q=>{this.battleTargets.push(q.targetComponent)}));for(const z of this.battleTargets)z.onTargetSelected.removeAll(this),z.onTargetSelected.add(this.processTargetSelected,this);this._spellTooltipTweens=Array(this._spellTooltips.length).fill(void 0),this._rescueCurrencyBalance.GameObject.onActiveChanged.remove(this.onRescueCurrencyBalanceActiveChanged,this),this._rescueCurrencyBalance.GameObject.onActiveChanged.add(this.onRescueCurrencyBalanceActiveChanged,this),this._rescueCurrencyBalance.GameObject.onDestroy.remove(this.onRescueCurrencyBalanceDestroyed,this),this._rescueCurrencyBalance.GameObject.onDestroy.addOnce(this.onRescueCurrencyBalanceDestroyed,this)}onRescueCurrencyBalanceActiveChanged(){this._rescueCurrencyBalance.GameObject.active?this.onRescueCurrencyBalanceShown.dispatch():this.onRescueCurrencyBalanceHidden.dispatch()}onRescueCurrencyBalanceDestroyed(){this._rescueCurrencyBalance.GameObject.active&&this.onRescueCurrencyBalanceHidden.dispatch()}processActionSelected(q,K){var z,Y,Q;this._currentActionData=K;const X=K?this._gameDataProvider.getItem("spellV2",K.spellId).data:null,Z=null===(z=null==X?void 0:X.target)||void 0===z?void 0:z.team,J=null===(Y=null==X?void 0:X.target)||void 0===Y?void 0:Y.unit;this.onActionChange.dispatch(X);const tt=this._battleController.rightTeam.rawUnits,et=(null==K?void 0:K.spellId)===this._battleController.battleConstants.rescueSpellId;this.setRescueIndicators(tt,et);const it=()=>this._battleController.activeUnit.data.teamId===this._battleController.leftTeamId?this._battleController.activeUnit:null;for(const st of this.battleTargets){const q=()=>st.isMultiTarget?(J===lt.ESpellUnitTarget.Team||J===lt.ESpellUnitTarget.Random)&&st.targets.every((q=>q.size!==at.X.Huge)):!st.isTargetDisabled()&&(J===lt.ESpellUnitTarget.Single&&(!et||st.singleTarget.isInARescuableState())||J===lt.ESpellUnitTarget.Self&&st.singleTarget===it()||J===lt.ESpellUnitTarget.Ally&&st.singleTarget!==it()||(J===lt.ESpellUnitTarget.Team||J===lt.ESpellUnitTarget.Random)&&st.singleTarget.size===at.X.Huge),z=()=>st.teamId===this._battleController.rightTeamId&&Z===lt.ESpellTeamTarget.Enemy||st.teamId===this._battleController.leftTeamId&&Z===lt.ESpellTeamTarget.Own,Y=K&&q()&&z();let tt=dt.Bp.Standard;if(X)if(null===(Q=X.flags)||void 0===Q?void 0:Q.some((q=>q.flag===lt.ESpellFlag.Rescue)))tt=dt.Bp.Rescue;else if(st.teamId===this._battleController.leftTeamId)tt=st.size===at.X.Small?dt.Bp.AssistSmall:dt.Bp.Assist;else{const q=st.singleTarget;if(q)switch(this._battleController.battleConstants.getElementalAdvantage(X.element,q.data.element)){case lt.EElementalAdvantage.Strong:tt=dt.Bp.Effective;break;case lt.EElementalAdvantage.Weak:tt=dt.Bp.Ineffective}}st.updateTargetInteractive(Y,tt,null==X?void 0:X.element)}this.showTooltip(K,q,X)}setRescueIndicators(q,K){var z;let Y;for(const Q of q){if(!X.Aq$.isDefined(null===(z=null==Q?void 0:Q.creature)||void 0===z?void 0:z.id))continue;if(!(K&&Q.isInARescuableState())){Q.setRescueCost(!1),Q.setOwnedCount(null);continue}const q=this._hardCurrency.petAcquisitionCost(Q.creature.id,Z.l6.Rescue);X.Aq$.isDefined(q)?(Q.setRescueCost(!0,q.currency,q.value),null!=Y||(Y=q.currency)):(Q.setRescueCost(!0,27,0),Y=27);const J=this.getInjectedValue("782-c308").kennel.getPets().filter((q=>q.ID===Q.creature.id)).length;Q.setOwnedCount(J)}this.setHardCurrencyBalanceDisplay(K&&X.Aq$.isDefined(Y)?{currency:Y,value:this._hardCurrency.getBalance(Y)}:null)}setHardCurrencyBalanceDisplay(q){var K;(null===(K=this._rescueCurrencyBalance)||void 0===K?void 0:K.GameObject)&&(X.Aq$.isDefined(q)?(this._rescueCurrencyBalance.GameObject.active=!0,this._rescueCurrencyBalance.updateCurrencyID(q.currency),this._rescueCurrencyBalance.updateAmount(q.value)):this._rescueCurrencyBalance.GameObject.active=!1)}processActionOnCooldownSelected(q,K){if(this._currentActionData=K,K){const z=this._gameDataProvider.getItem("spellV2",K.spellId).data;this.showTooltip(K,q,z)}}showTooltip(q,K,z){if(q&&this._spellTooltips[K]){this._spellTooltips[K].bringToFront();const Q=0!==q.currentCooldown?Y.SPELL_TOOLTIP_COOLDOWN_KEY:z.element;st.d.updateInjectedValues(this._spellTooltips[K],{TOOLTIP_SELECTED:!0,TOOLTIP_ELEMENT:Q,TOOLTIP_IS_IN_COOLDOWN:0!==q.currentCooldown}),this.tweenTooltipToY(K,Y.SPELL_TOOLTIP_ONSCREEN_Y)}this.dismissActionTooltips(K,q)}showHardCurrencyBalanceTooltip(q){const K=this._hardCurrency.petAcquisitionCost(q.id,Z.l6.Rescue);if(!X.Aq$.isDefined(K))return;const z=this._hardCurrency.getBalance(K.currency);for(const Y of this._battleController.rightTeam.rawUnits)Y.creature===q&&Y.setRescueCost(!0,K.currency,K.value,z);this._rescueCurrencyBalance.updateCurrencyID(K.currency),this._rescueCurrencyBalance.updateBudgetDifference(K.value-z)}dispatchOnHardCurrencyBalanceTooltipHidden(){this.onHardCurrencyBalanceTooltipHidden.dispatch()}dismissActionTooltips(q,K){for(let z=0;z{if(J){const K=it.percent+.4*Math.sin(it.percent*Math.PI);this._spellTooltips[q].transform.setPositionY(Q+K*Z)}else this._spellTooltips[q].transform.setPositionY(Q+it.percent*Z)})),st.onTweenComplete.addOnce((()=>{this._spellTooltips[q].transform.setPositionY(K)}))}processTargetSelected(q){this.onTargetConfirmed.dispatch(this._currentActionData,q)}targetRoulette(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q=this.battleTargets.filter((K=>!K.isMultiTarget&&!K.isTargetDisabled()&&K.canBeTargetedBySpell(q,z.data.teamId)));if(Q.length<=1)return;const X=K.targetComponent;Q.forEach((q=>q.updateTargetInteractive(!1)));const Z=(Y.ROULETTE_SLOW_WAIT_TIME-Y.ROULETTE_FAST_WAIT_TIME)/Y.ROULETTE_ITERATIONS/(Q.length-1);let J=Y.ROULETTE_FAST_WAIT_TIME;for(let q=0;q{q.updateTargetInteractive(!1)}))}hideRescueUi(){var q;if(null===(q=this._battleController.rightTeam)||void 0===q?void 0:q.rawUnits)for(const K of this._battleController.rightTeam.rawUnits)K.setNewIndicatorActive(!1),K.setRescueCost(!1),K.setOwnedCount(null);this.setHardCurrencyBalanceDisplay(null)}destroy(){var q;if(this._battleActions)for(const K of this._battleActions)K.onActionSelected.remove(this.processActionSelected,this),K.onActionOnCooldownSelected.remove(this.processActionOnCooldownSelected,this);if(this._battleActions=null,this.battleTargets)for(const K of this.battleTargets)K.onTargetSelected.remove(this.processTargetSelected,this);if(this.battleTargets=null,this._spellTooltipTweens)for(const K of this._spellTooltipTweens)null==K||K.destroy();if(this.hideRescueUi(),null===(q=this._battleController.rightTeam)||void 0===q?void 0:q.rawUnits)for(const K of this._battleController.rightTeam.rawUnits)K.setRescueCost(!1),K.setOwnedCount(null);this._hardCurrency.onBalanceChanged.removeAll(this),this.onActionChange.dispose(),this.onTargetConfirmed.dispose(),this.onHardCurrencyBalanceTooltipHidden.dispose(),this.onRescueCurrencyBalanceShown.dispose(),this.onRescueCurrencyBalanceHidden.dispose(),super.destroy()}};ut.SPELL_TOOLTIP_TWEEN_DURATION_OUT_MS=200,ut.SPELL_TOOLTIP_TWEEN_DURATION_IN_MS=200,ut.SPELL_TOOLTIP_OFFSCREEN_Y=150,ut.SPELL_TOOLTIP_ONSCREEN_Y=-5,ut.SPELL_TOOLTIP_COOLDOWN_KEY="cooldown",ut.POWER_METER_SEGMENTS=10,ut.ROULETTE_FAST_WAIT_TIME=75,ut.ROULETTE_SLOW_WAIT_TIME=150,ut.ROULETTE_FINAL_TARGET_WAIT_TIME=300,ut.ROULETTE_ITERATIONS=4,(0,Q.Cg)([(0,X.Cdj)("BattleController"),(0,Q.Sn)("design:type",Function)],ut.prototype,"_battleController",void 0),(0,Q.Cg)([(0,X.Cdj)("bec-c6b4"),(0,Q.Sn)("design:type",nt.W)],ut.prototype,"_hardCurrency",void 0),(0,Q.Cg)([(0,X.Cdj)("GameDataProvider"),(0,Q.Sn)("design:type",ot.q)],ut.prototype,"_gameDataProvider",void 0),(0,Q.Cg)([(0,rt.b)("457-d999"),(0,Q.Sn)("design:type",lt.SpellLevelBonusConstants)],ut.prototype,"_spellLevelBonusConstants",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ut.prototype,"_spellTooltipContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ut.prototype,"dismissalOverlayObject",void 0),(0,Q.Cg)([(0,X.MnK)(it.n),(0,Q.Sn)("design:type",it.n)],ut.prototype,"_rescueCurrencyBalance",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ut.prototype,"onTargetConfirmed",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ut.prototype,"onActionChange",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ut.prototype,"onHardCurrencyBalanceTooltipHidden",void 0),ut=Y=(0,Q.Cg)([(0,X.EVk)("BattleTargetController",et.Y.battleRevamp)],ut)},35856:(q,K,z)=>{"use strict";z.d(K,{Bp:()=>Q,Ri:()=>dt,fO:()=>X});var Y,Q,X,Z=z(8674),J=z(87490),tt=z(62459),et=z(68910),it=z(35120),st=z(35084),nt=z(29834),at=z(36045),rt=z(10670),ot=z(13302),ht=z(28402),ct=z(99979);!function(q){q.Standard="attack-idle",q.Effective="attack-weakness-idle",q.Ineffective="resist-idle",q.Assist="assist-idle",q.AssistSmall="assist-idle-small",q.Rescue="rescue-idle"}(Q||(Q={})),function(q){q.DownTarget="down-target",q.UpTarget="up-target",q.SelectTarget="select-target"}(X||(X={}));let dt=Y=class extends tt.uAl{constructor(){super(...arguments),this.isMultiTarget=!1,this.targets=[],this._unitHitboxes=[],this._size=ot.X.Normal,this.onTargetSelected=new tt.HN0}get singleTarget(){return 1===this.targets.length&&this.targets[0].data?this.targets[0]:null}get teamId(){var q,K;return null===(K=null===(q=this.targets.find((q=>q.data)))||void 0===q?void 0:q.data)||void 0===K?void 0:K.teamId}get size(){return this._size}set size(q){this._size=q;const K=Y.TARGET_ELLIPSE_SIZES[q];this._groundTargetTransform.setSizeDelta(K.x,K.y)}postCreate(){super.postCreate(),this.configureTarget()}configureTarget(){this.size=this._size;const q=[...this._unitHitboxes];for(const K of this.targets)if(!K.creature||K.creature.isLoaded){if(K.data){const z=K.hitbox;if(this.isMultiTarget){const q=this.groundTarget.findComponentInChildren(st.n);if(q){q.onHoverEnterInputUp.add((()=>{K.targetComponent.setArrowVisible(!0)}));const z=()=>{K.targetComponent.setArrowVisible(!1)};q.onHoverExitInputUp.add(z),q.onInputUpOutside.add(z)}}else{const q=Y.TARGET_INPUT_DATA[this._size];this._inputOverlayTransform.setSizeDelta(q.w,q.h),this._inputOverlayTransform.setPositionY(q.y),this._targetArrow.setPosition(0,z.y+Y.ARROW_Y),this._targetArrow.worldPosition={x:this._targetArrow.worldPosition.x,y:Math.max(Y.MIN_ARROW_Y,this._targetArrow.worldPosition.y)}}const Q=q.pop();Q&&(Q.GameObject.findComponent(at.X).Active=!0,Q.setPosition(z.x,z.y),Q.setSizeDelta(z.w,z.h))}}else K.creature.onLoaded.addOnce((()=>{this.configureTarget()}));for(const K of q)K.GameObject.findComponent(at.X).Active=!1}sendTargetData(){var q;const K=this.targets[0].data.teamId===this._battleController.leftTeamId?(null===(q=this.singleTarget)||void 0===q?void 0:q.battleId)===this._battleController.activeUnit.battleId?rt.zA.Self:rt.zA.Ally:rt.zA.Enemy;it.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendBattleInterfaceClickedEvent({object_name:"Target",object_type:K}),this.onTargetSelected.dispatch(this)}updateTargetInteractive(q=!1,K=Q.Standard,z){if(!this.isMultiTarget&&!this.singleTarget)return;const Y=q&&this.canShowTargetUi();if(this._targetArrow.Active=!1,this._targetArrowElement.GameObject.active=!1,this.groundTarget.active=!1,Y){this.groundTarget.active=!0;for(const q of this.groundTarget.children)q.active=!0}if(!this.isMultiTarget&&(this._targetArrow.GameObject.findComponent(nt.j).playAnimation(K,!0),z&&(K===Q.Effective||K===Q.Ineffective))){const q=this._targetArrow.GameObject.findComponent(ht.v).getSpine(),K=ct.gI.getElementIconTexture(z);if(K){const{width:z,height:Y}=this._targetArrowElement.GameObject.transform.sizeDelta;q.pixiSpine.hackTextureBySlotName("targeting-arrow-element",K,new et.Rectangle(0,0,z,Y))}}}setArrowVisible(q){const K=q&&this.canShowTargetUi();this._targetArrow.GameObject.active=K,this._targetArrow.GameObject.findComponent(nt.j).seekTo(0)}playGroundTargetAnimation(q,K=!1){q===X.SelectTarget&&this._groundTargetSpineAnimator.OnAnimationComplete.addOnce((()=>{this._battleController.getUnits().forEach((q=>{q.targetComponent.groundTarget.active=!1}))})),this._groundTargetSpineAnimator.playAnimation(`${q}${Y.TARGET_ANIMATION_SIZE_SUFFIXES[this._size]}`,K)}canShowTargetUi(){var q;return this.isMultiTarget||(null===(q=this.singleTarget)||void 0===q?void 0:q.isAlive())&&this.singleTarget.isTargetable}isTargetDisabled(){var q;return!(null===(q=this.singleTarget)||void 0===q?void 0:q.isTargetable)}canBeTargetedBySpell(q,K){switch(q){case J.ESpellTeamTarget.All:case J.ESpellTeamTarget.Any:return!0;case J.ESpellTeamTarget.Enemy:return K!==this.targets[0].data.teamId;case J.ESpellTeamTarget.Own:return K===this.targets[0].data.teamId}}highlightAndWait(q,K){return(0,Z.sH)(this,void 0,void 0,(function*(){this.groundTarget.active=!0,this.setArrowVisible(!0),K&&this.playGroundTargetAnimation(K,!1),yield tt.Egh.timeout(q),this.groundTarget.active=!1,this.setArrowVisible(!1)}))}destroy(){this.onTargetSelected.dispose(),super.destroy()}};dt.ARROW_Y=135,dt.MIN_ARROW_Y=210,dt.TARGET_ELLIPSE_SIZES={[ot.X.Small]:{x:136,y:48},[ot.X.Normal]:{x:260,y:95},[ot.X.Medium]:{x:450,y:150},[ot.X.Large]:{x:797,y:293},[ot.X.Huge]:{x:797,y:293}},dt.TARGET_INPUT_DATA={[ot.X.Small]:{x:0,y:32,w:136,h:250},[ot.X.Normal]:{x:0,y:50,w:260,h:300},[ot.X.Medium]:{x:0,y:75,w:450,h:400},[ot.X.Large]:{x:0,y:150,w:800,h:550},[ot.X.Huge]:{x:0,y:150,w:800,h:775}},dt.TARGET_ANIMATION_SIZE_SUFFIXES={[ot.X.Small]:"-small",[ot.X.Normal]:"-single",[ot.X.Medium]:"-med",[ot.X.Large]:"-aoe",[ot.X.Huge]:"-aoe"},(0,Z.Cg)([(0,tt.vkK)(),(0,Z.Sn)("design:type",Boolean)],dt.prototype,"isMultiTarget",void 0),(0,Z.Cg)([(0,tt.SZi)(),(0,tt.MnK)("BattleRevampUnitComponent"),(0,Z.Sn)("design:type",Array)],dt.prototype,"targets",void 0),(0,Z.Cg)([(0,tt.MnK)(tt.dLy),(0,Z.Sn)("design:type",tt.dLy)],dt.prototype,"_targetArrow",void 0),(0,Z.Cg)([(0,tt.MnK)(tt.vYh),(0,Z.Sn)("design:type",tt.vYh)],dt.prototype,"_targetArrowElement",void 0),(0,Z.Cg)([(0,tt.ERr)(),(0,Z.Sn)("design:type",tt._mx)],dt.prototype,"groundTarget",void 0),(0,Z.Cg)([(0,tt.MnK)(tt.XVE),(0,Z.Sn)("design:type",tt.XVE)],dt.prototype,"_groundTargetTransform",void 0),(0,Z.Cg)([(0,tt.MnK)(nt.j),(0,Z.Sn)("design:type",nt.j)],dt.prototype,"_groundTargetSpineAnimator",void 0),(0,Z.Cg)([(0,tt.MnK)(tt.XVE),(0,Z.Sn)("design:type",tt.XVE)],dt.prototype,"_inputOverlayTransform",void 0),(0,Z.Cg)([(0,tt.SZi)(),(0,tt.MnK)(tt.XVE),(0,Z.Sn)("design:type",Array)],dt.prototype,"_unitHitboxes",void 0),(0,Z.Cg)([(0,tt.Cdj)("BattleController"),(0,Z.Sn)("design:type",Function)],dt.prototype,"_battleController",void 0),(0,Z.Cg)([(0,tt.gfw)(ot.X),(0,Z.Sn)("design:type",String),(0,Z.Sn)("design:paramtypes",[String])],dt.prototype,"size",null),(0,Z.Cg)([(0,tt.bbQ)(),(0,Z.Sn)("design:type",tt.HN0)],dt.prototype,"onTargetSelected",void 0),dt=Y=(0,Z.Cg)([(0,tt.EVk)("BattleTargetData")],dt)},83441:(q,K,z)=>{"use strict";z.d(K,{O:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(29834);let J=class extends Q.uAl{get spineAnimator(){return this._spineAnimator}};(0,Y.Cg)([(0,Q.MnK)(Z.j),(0,Y.Sn)("design:type",Z.j)],J.prototype,"_spineAnimator",void 0),J=(0,Y.Cg)([(0,Q.EVk)("BattleUnitAnimatorRelay",X.Y.battleRevamp)],J)},89584:(q,K,z)=>{"use strict";z.d(K,{h:()=>ft});var Y,Q,X,Z,J,tt=z(8674),et=z(87490),it=z(62459),st=z(88022),nt=z(82351),at=z(35120),rt=z(28152),ot=z(29834),ht=z(53885),ct=z(97518),dt=z(99979);!function(q){q.NORMAL_FILL="#FFFFFF",q.NORMAL_STROKE="#363636",q.MISS_FILL="#B2B2B2",q.MISS_STROKE="#363636",q.CRITICAL_FILL="#FFF540",q.CRITICAL_STROKE="#9C341A",q.EFFECTIVE_FILL="#FFF540",q.EFFECTIVE_STROKE="#9C341A",q.INEFFECTIVE_FILL="#A8E9FF",q.INEFFECTIVE_STROKE="#094E86",q.HEAL_FILL="#A0E772",q.HEAL_STROKE="#29484A",q.DODGE_FILL="#B2B2B2",q.DODGE_STROKE="#363636"}(Q||(Q={})),function(q){q.NORMAL_ANIM="damage-normal",q.MISS_ANIM="effect-miss",q.CRITICAL_ANIM="effect-critical",q.EFFECTIVE_ANIM="effect-powerful",q.INEFFECTIVE_ANIM="effect-resist",q.DODGE_ANIM="dodge"}(X||(X={})),function(q){q.INDICATOR_SLOT="indicator",q.DAMAGE_SLOT="damage",q.BACKING_SLOT="backing"}(Z||(Z={})),function(q){q.MISS_TEXT="BATTLE_REVAMP_TEXT_MISS",q.CRITICAL_TEXT="BATTLE_REVAMP_TEXT_CRITICAL",q.EFFECTIVE_TEXT="BATTLE_REVAMP_TEXT_EFFECTIVE",q.INEFFECTIVE_TEXT="BATTLE_REVAMP_TEXT_INEFFECTIVE",q.FUMBLE_TEXT="BATTLE_REVAMP_TEXT_FUMBLE",q.REFLECT_TEXT="BATTLE_REVAMP_TEXT_REFLECT",q.ABSORB_TEXT="BATTLE_REVAMP_TEXT_ABSORB",q.DODGE_TEXT="BATTLE_REVAMP_TEXT_DODGE"}(J||(J={}));const lt={[et.EDamageInformation.Effective]:"spell-hit-powerful",[et.EDamageInformation.Ineffective]:"spell-hit-resist"},ut={[et.EDamageInformation.Effective]:2,[et.EDamageInformation.Ineffective]:0};let ft=Y=class extends it.uAl{constructor(){super(...arguments),this._onAnimationComplete=new it.HN0,this._animationName=X.NORMAL_ANIM}postCreate(){super.postCreate(),this.GameObject.active=!1;const q=this._spineComponent.getSlot(Z.DAMAGE_SLOT),K=this._spineComponent.getSpine().getSlotContainer(q);this._damageText.GameObject.transform.setScale(1,-1),this._criticalObj.transform.setScale(1,-1),this._criticalHitBacking.transform.setScale(1,-1),this._criticalHitBackingLarge.transform.setScale(1,-1),K.addChild(this._groupRelayNumber.getRootContainer());const z=this._spineComponent.getSlot(Z.INDICATOR_SLOT),Y=this._spineComponent.getSpine().getSlotContainer(z);this._indicatorSettings.GameObject.transform.setScale(1,-1),Y.addChild(this._groupRelayIndicator.getRootContainer()),this._elementalDisplay.active=!1,this._groupRelayNumber.GameObject.active=!1,this._groupRelayIndicator.GameObject.active=!1}setupAndDisplay(q,K,z,Z,tt,st={}){var nt,at,rt,ot;const{onlyShowDamageNumber:ht,onlyShowIndicator:ct,deemphasizeIndicator:dt,suppressSfx:lt}=st;this._transform.setPosition(q,K),this._damageText.text=Math.abs(z.damage).toString(),lt||(ht?this.playHitInfoSfx(z):this._spineAnimator.spine.onEvent.addOnce((()=>this.playHitInfoSfx(z)),this)),it.OQO.areBitsSet(z.damageInformation,et.EDamageInformation.Reflected)?(this._animationName=X.EFFECTIVE_ANIM,this._indicatorText.setLocalizationKey(J.REFLECT_TEXT),this.setTextColor(Q.INEFFECTIVE_FILL,Q.INEFFECTIVE_STROKE),this._damageText.GameObject.active=!1):it.OQO.areBitsSet(z.damageInformation,et.EDamageInformation.Missed)?(this.setTextColor(Q.MISS_FILL,Q.MISS_STROKE),this._animationName=X.MISS_ANIM,this._indicatorText.setLocalizationKey(null!==(nt=z.textKey)&&void 0!==nt?nt:J.MISS_TEXT),this._damageText.GameObject.active=!1):it.OQO.areBitsSet(z.damageInformation,et.EDamageInformation.Absorb)?(this._animationName=X.INEFFECTIVE_ANIM,this._indicatorText.setLocalizationKey(J.ABSORB_TEXT),this.setTextColor(Q.HEAL_FILL,Q.HEAL_STROKE)):it.OQO.areBitsSet(z.damageInformation,et.EDamageInformation.Heal)?(this.setTextColor(Q.HEAL_FILL,Q.HEAL_STROKE),this._animationName=X.NORMAL_ANIM,this._indicatorSettings.GameObject.parent.active=!1):it.OQO.areBitsSet(z.damageInformation,et.EDamageInformation.CriticalHit)?(this.setTextColor(Q.CRITICAL_FILL,Q.CRITICAL_STROKE),this._animationName=X.CRITICAL_ANIM,this._indicatorSettings.GameObject.active=!1,this._criticalObj.active=!0,this._damageText.text.length<3?this._criticalHitBacking.active=!0:this._criticalHitBackingLarge.active=!0):it.OQO.areBitsSet(z.damageInformation,et.EDamageInformation.Dodge)?(this.setTextColor(Q.DODGE_FILL,Q.DODGE_STROKE),ht?this._animationName=X.INEFFECTIVE_ANIM:(this._transform.setPositionY(K+Y.DODGE_ANIMATION_OFFSET_Y),this._animationName=X.DODGE_ANIM,this._indicatorText.setLocalizationKey(J.DODGE_TEXT),this._indicatorText.localizedText.fontSize=Y.DODGE_TEXT_SIZE,this._indicatorText.GameObject.transform.setPositionY(this._indicatorText.GameObject.transform.localPosition.y+Y.DODGE_INDICATOR_TEXT_OFFSET_Y))):it.OQO.areBitsSet(z.damageInformation,et.EDamageInformation.Effective)?(this.showElementalDisplay(z,Z),this._indicatorText.setLocalizationKey(null!==(at=z.textKey)&&void 0!==at?at:J.EFFECTIVE_TEXT),this.setTextColor(Q.EFFECTIVE_FILL,Q.EFFECTIVE_STROKE),this._animationName=X.EFFECTIVE_ANIM):it.OQO.areBitsSet(z.damageInformation,et.EDamageInformation.Ineffective)?(this.showElementalDisplay(z,Z),this._indicatorText.setLocalizationKey(null!==(rt=z.textKey)&&void 0!==rt?rt:J.INEFFECTIVE_TEXT),this.setTextColor(Q.INEFFECTIVE_FILL,Q.INEFFECTIVE_STROKE),this._animationName=X.INEFFECTIVE_ANIM):it.OQO.areBitsSet(z.damageInformation,et.EDamageInformation.Fumble)?(this._transform.setPositionY(K+Y.FUMBLE_TEXT_OFFSET_Y),this.setTextColor(Q.INEFFECTIVE_FILL,Q.INEFFECTIVE_STROKE),this._animationName=X.INEFFECTIVE_ANIM,this._indicatorText.setLocalizationKey(null!==(ot=z.textKey)&&void 0!==ot?ot:J.FUMBLE_TEXT),this._damageText.GameObject.active=!1):(this.setTextColor(Q.NORMAL_FILL,Q.NORMAL_STROKE),this._animationName=X.NORMAL_ANIM,this._indicatorSettings.GameObject.parent.active=!1),ht&&(this._indicatorText.GameObject.active=!1,this._criticalObj.active=!1,this._elementalDisplay.active=!1),ct&&(this._damageText.GameObject.active=!1,this._criticalHitBacking.active=!1,this._criticalHitBackingLarge.active=!1),dt&&(this._indicatorText.localizedText.fontSize=20),this._spineAnimator.OnAnimationComplete.addOnce((()=>{this._spineAnimator.spine.onEvent.removeAll(this),null==tt||tt(),this._onAnimationComplete.dispatch()})),this.GameObject.active=!0,this.playAnim(),this._groupRelayIndicator.GameObject.active=!0,this._groupRelayNumber.GameObject.active=!0}setTextColor(q,K){this._damageText.fill=q,this._damageText.stroke=K,this._indicatorSettings.fill=q,this._indicatorSettings.stroke=K}playAnim(){this._spineAnimator.playAnimation(this._animationName,!1)}destroy(){this._onAnimationComplete.dispose(),super.destroy()}playHitInfoSfx(q){let K;if(it.OQO.areBitsSet(q.damageInformation,et.EDamageInformation.Reflected))K=nt.B.Sfx_resist_hit;else{if(it.OQO.areBitsSet(q.damageInformation,et.EDamageInformation.Absorb))return;it.OQO.areBitsSet(q.damageInformation,et.EDamageInformation.CriticalHit)?K=nt.B.Sfx_critial_hit:it.OQO.areBitsSet(q.damageInformation,et.EDamageInformation.Dodge)?K=nt.B.Sfx_Dodge:it.OQO.areBitsSet(q.damageInformation,et.EDamageInformation.Effective)?K=nt.B.Sfx_powerful_hit:it.OQO.areBitsSet(q.damageInformation,et.EDamageInformation.Ineffective)&&(K=nt.B.Sfx_resist_hit)}K&&at.q.instance.prodigy.audio.playSFXFromGUID(K)}showElementalDisplay(q,K){if(!K)return;this._elementalDisplay.active=!0;const z=dt.gI.getElementIconTexture(K);let Y;this._elementalIcon.setTexture(z);const Q=this._elementalIcon.GameObject.transform.localPosition.y;it.OQO.areBitsSet(q.damageInformation,et.EDamageInformation.Effective)?(Y=lt[et.EDamageInformation.Effective],this._elementalIcon.GameObject.transform.setPositionY(Q+ut[et.EDamageInformation.Effective])):it.OQO.areBitsSet(q.damageInformation,et.EDamageInformation.Ineffective)&&(Y=lt[et.EDamageInformation.Ineffective],this._elementalIcon.GameObject.transform.setPositionY(Q+ut[et.EDamageInformation.Ineffective]));const X=at.q.instance.prodigy.game.cache.getTexture(st._.Ui_battle_revamp_json,Y);this._damageEffectShield.setTexture(X),this._damageEffectShield.GameObject.transform.setSizeDelta(X.width,X.height)}};ft.FUMBLE_TEXT_OFFSET_Y=50,ft.DODGE_ANIMATION_OFFSET_Y=-90,ft.DODGE_INDICATOR_TEXT_OFFSET_Y=-8,ft.DODGE_TEXT_SIZE=28,(0,tt.Cg)([(0,it.MnK)(it.XVE),(0,tt.Sn)("design:type",it.XVE)],ft.prototype,"_transform",void 0),(0,tt.Cg)([(0,it.MnK)(it.v2j),(0,tt.Sn)("design:type",it.v2j)],ft.prototype,"_spineComponent",void 0),(0,tt.Cg)([(0,it.MnK)(ot.j),(0,tt.Sn)("design:type",ot.j)],ft.prototype,"_spineAnimator",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],ft.prototype,"_criticalHitBacking",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],ft.prototype,"_criticalHitBackingLarge",void 0),(0,tt.Cg)([(0,it.MnK)(it.EYj),(0,tt.Sn)("design:type",it.EYj)],ft.prototype,"_damageText",void 0),(0,tt.Cg)([(0,it.MnK)(it.EYj),(0,tt.Sn)("design:type",it.EYj)],ft.prototype,"_indicatorSettings",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],ft.prototype,"_criticalObj",void 0),(0,tt.Cg)([(0,it.MnK)(ct.R),(0,tt.Sn)("design:type",ct.R)],ft.prototype,"_indicatorText",void 0),(0,tt.Cg)([(0,it.MnK)(ht.u),(0,tt.Sn)("design:type",ht.u)],ft.prototype,"_groupRelayNumber",void 0),(0,tt.Cg)([(0,it.MnK)(ht.u),(0,tt.Sn)("design:type",ht.u)],ft.prototype,"_groupRelayIndicator",void 0),(0,tt.Cg)([(0,it.ERr)(),(0,tt.Sn)("design:type",it._mx)],ft.prototype,"_elementalDisplay",void 0),(0,tt.Cg)([(0,it.MnK)(it.vYh),(0,tt.Sn)("design:type",it.vYh)],ft.prototype,"_damageEffectShield",void 0),(0,tt.Cg)([(0,it.MnK)(it.vYh),(0,tt.Sn)("design:type",it.vYh)],ft.prototype,"_elementalIcon",void 0),(0,tt.Cg)([(0,it.bbQ)(),(0,tt.Sn)("design:type",it.HN0)],ft.prototype,"_onAnimationComplete",void 0),ft=Y=(0,tt.Cg)([(0,it.EVk)("HitInfoController",rt.Y.battleRevamp)],ft)},29143:(q,K,z)=>{"use strict";z.d(K,{e:()=>tt});var Y,Q=z(8674),X=z(62459),Z=z(28152),J=z(29834);let tt=Y=class extends X.uAl{constructor(){super(...arguments),this.mpAnimators=[],this._mpFxAnimators=[]}init(q){this._maxMp=q.max,this._currentMp=q.current,this._middlePoint=Math.round((q.max-1)/2),this.initEmptyMp(),this.updateIndicator(!0)}updateMp(q){this._currentMp=q,this.updateIndicator()}refillMp(){this.activateFx(),this._currentMp=this._maxMp,this._emptyMp.active=!1,this._mpFxAnimators.forEach(((q,K)=>{K{K===this._middlePoint?q.playAnimation("teal_pulse-overlay",!1,!0):q.GameObject.active=!1})),yield this._mpFxAnimators[this._middlePoint].OnAnimationComplete.asPromise(),X.Egh.timeout(Y.ALERT_TIMER_MS)}))}alertMpEmptyAnimExtreme(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.activateFx();for(let q=0;q{z{K{this.updateIndicator()}),this),q.playAnimation("fx-full",!1))}))}updateIndicator(q=!1,K=0){const z=this._maxMp-this._currentMp;this.mpAnimators.forEach(((Y,Q)=>{Q{q.active=K{"use strict";z.d(K,{Z:()=>it});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(17446),J=z(28152),tt=z(29834);const et={[Z.E.Uncommon]:"uncommon",[Z.E.Rare]:"rare",[Z.E.Heroic]:"heroic",[Z.E.Legendary]:"legendary"};let it=class extends Q.uAl{showRarity(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=et[q],z=Q.Aq$.isDefined(K);if(this.GameObject.active=z,z){this._animator.playAnimation(K,!1,!0);const z=this.getRarityTextComponent(q);z&&(z.GameObject.active=!0,this.attachRarityTextToSlot(z)),yield this._animator.OnAnimationComplete.asPromise(),z&&(z.GameObject.active=!1)}}))}getRarityTextComponent(q){switch(q){case Z.E.Uncommon:return this._uncommonText;case Z.E.Rare:return this._rareText;case Z.E.Heroic:return this._heroicText;case Z.E.Legendary:return this._legendaryText;default:return null}}attachRarityTextToSlot(q){const K=q.getRootContainer(),z=this._animator.spine,Y=z.getSlot("text"),Q=z.getSpine().getSlotContainer(Y);Q.removeChildren();const Z=Q.addChild(new X.Container);Z.scale.y=-1,Z.addChild(K),Z.position.set(.5*-K.width,.5*K.height)}};(0,Y.Cg)([(0,Q.MnK)(tt.j),(0,Y.Sn)("design:type",tt.j)],it.prototype,"_animator",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],it.prototype,"_uncommonText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],it.prototype,"_rareText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],it.prototype,"_heroicText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],it.prototype,"_legendaryText",void 0),it=(0,Y.Cg)([(0,Q.EVk)("Rarity",J.Y.battleRevamp)],it)},72748:(q,K,z)=>{"use strict";z.d(K,{N:()=>J});var Y=z(8674),Q=z(62459),X=z(28829),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._unitsToHighlight=[]}destroy(){this._unitsToHighlight=[],super.destroy()}startSequence(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){0!==q.length&&(this._unitsToHighlight=q,this._overlay.setFocusLayer("overlay-top"),this.GameObject.active=!0,this.registerUnitsToFocus(),yield this._overlay.showOverlay(),this.showRescueAvailableLogMessage(K),yield this._overlay.playGlowAnimations(),yield this._overlay.hideOverlay(),K.GameObject.setLayer("overlay",!0),this.GameObject.active=!1)}))}showRescueAvailableLogMessage(q){q.GameObject.setLayer("overlay-top",!0),q.showMessage("BATTLE_REVAMP_RESCUE_AVAILABLE")}registerUnitsToFocus(){this._unitsToHighlight.forEach((q=>{var K,z,Y;const X=q.creature.creatureGameObject,Z=q.uiContent,J=null!==(Y=null===(z=null===(K=q.petRescueTooltip)||void 0===K?void 0:K.findComponentInChildren(Q.jsv))||void 0===z?void 0:z.GameObject)&&void 0!==Y?Y:null;this._overlay.addFocusableGameObject(X,void 0,!0,{applyGlow:!0}),this._overlay.addFocusableGameObject(Z,void 0,!0),J&&this._overlay.addFocusableGameObject(J)}))}};(0,Y.Cg)([(0,Q.MnK)(X.q),(0,Y.Sn)("design:type",X.q)],J.prototype,"_overlay",void 0),J=(0,Y.Cg)([(0,Q.EVk)("RescueAvailableSequence",Z.Y.battleRevamp)],J)},18278:(q,K,z)=>{"use strict";z.d(K,{b:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(28152),tt=z(90614),et=z(90351),it=z(15160);let st=Y=class extends X.uAl{constructor(){super(...arguments),this.onUiReady=new X.HN0,this._initialCardXPositions=[]}destroy(){this.onUiReady.dispose(),this._tween&&(this._tween.stop().destroy(),this._tween=null),super.destroy()}tweenSpellCards(q,K=!0){q&&(this._spellCardsContainer.active=!0),this.inputBlocker.active=!0,this._spellCards||(this._spellCards=this._spellCardsContainer.children.slice(0,-1),this._spellCards.forEach(((q,K)=>{this._initialCardXPositions.push(this._spellCardsGrid.getLayoutPositionX(K))})));const z=this._spellCards.filter((q=>q.active));if(z.forEach(((K,z)=>{q?K.transform.setPositionX(0):K.transform.setPositionX(this._initialCardXPositions[z])})),0===z.length)return;const Q=q?this._initialCardXPositions[z.length-1]:0,X=z.pop(),J={x:X.transform.localPosition.x};this._tween=Z.q.instance.game.add.tween(J,this).to({x:Q},this.getSlideDuration(z.length),et.K.getEasingFunctionFromEnum(et.i.ExponentialOut),!0,Y.SPELL_CARD_SLIDE_DELAY_MS),this._tween.onUpdate.add((()=>{X.transform.setPositionX(J.x),z.forEach(((K,z)=>{q?0===K.transform.localPosition.x&&X.transform.localPosition.x>=this._initialCardXPositions[z]&&K.transform.setPositionX(this._initialCardXPositions[z]):K.active&&X.transform.localPosition.x<=this._initialCardXPositions[z]&&(K.active=!1)}))})),this._tween.onTweenComplete.addOnce((()=>{this._spellCardsGrid.updateAll(),Z.q.instance.game.tweens.remove(this._tween),this._tween=null,q||this._spellCards.forEach((q=>{q.active=!1})),K&&(this.inputBlocker.active=!1),this.onUiReady.dispatch(q,!0)}))}getSpellCardAtIndex(q){var K,z,Y;return this._spellCardsContainer?(null===(K=this._spellCardsContainer.children)||void 0===K?void 0:K[q])||X.VyI.log(`Spell card is undefined at index: ${q}`,X.$bb.Warning):X.VyI.log("Spell card container is undefined",X.$bb.Warning),null===(Y=null===(z=this._spellCardsContainer)||void 0===z?void 0:z.children)||void 0===Y?void 0:Y[q]}getSpellCards(){var q;return this._spellCardsContainer||X.VyI.log("Spell card container is undefined",X.$bb.Warning),null===(q=this._spellCardsContainer)||void 0===q?void 0:q.children}hideSpellCards(){this._spellCardsContainer.active=!1,this.targetController.hideTargets()}getSlideDuration(q){switch(q){case 1:return 400;case 2:return 500;case 3:return 600;case 4:default:return 700}}hidePetRescue(){var q;(null===(q=this._petRescueTween.GameObject)||void 0===q?void 0:q.active)&&(this.inputBlocker.active=!0,this._petRescueTween.startTween())}};st.SPELL_CARD_SLIDE_DELAY_MS=100,(0,Q.Cg)([(0,X.Cdj)("BattleController"),(0,Q.Sn)("design:type",Function)],st.prototype,"controller",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],st.prototype,"_spellCardsContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],st.prototype,"inputBlocker",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],st.prototype,"petRescueCard",void 0),(0,Q.Cg)([(0,X.MnK)(X.JTA),(0,Q.Sn)("design:type",X.JTA)],st.prototype,"_spellCardsGrid",void 0),(0,Q.Cg)([(0,X.MnK)(tt.P),(0,Q.Sn)("design:type",tt.P)],st.prototype,"_petRescueTween",void 0),(0,Q.Cg)([(0,X.MnK)(it.F),(0,Q.Sn)("design:type",it.F)],st.prototype,"targetController",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],st.prototype,"onUiReady",void 0),st=Y=(0,Q.Cg)([(0,X.EVk)("SpellCardsController",J.Y.battleRevamp)],st)},88331:(q,K,z)=>{"use strict";z.d(K,{m:()=>tt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(28152),J=z(66840);let tt=class extends Q.uAl{create(){super.create(),this.updateDisplayedEffects([])}updateDisplayedEffects(q,K){var z;const Y=(null!==(z=this._gridLayout.GameObject.children)&&void 0!==z?z:[]).map((q=>q.findComponent(J.D))).filter((q=>!!q));this._overflowIndicator.active=q.length>Y.length,Y.forEach((q=>{q.GameObject.active=!1}));(0,X.clone)(q).sort(((K,z)=>q.indexOf(z)-q.indexOf(K))).forEach(((q,z)=>{if(z{"use strict";z.d(K,{K:()=>ot,W:()=>Y});var Y,Q=z(8674),X=z(62459),Z=z(68910),J=z(35120),tt=z(28152),et=z(29834),it=z(70703),st=z(97518),nt=z(33744),at=z(46459),rt=z(28829);!function(q){q.Click="click",q.StraightIdle="straight-idle"}(Y||(Y={}));let ot=class extends X.uAl{constructor(){super(...arguments),this.onDialogueDisplayComplete=new X.HN0}setDialogueTextKey(q,...K){this._nootDialogueLocalizationKey.localizationKey=q,this._nootDialogueLocalizationKey.setTextArguments(...K)}playNootWidgetIn(q=!0,K){q&&this._nootWidgetInAnimation.onComplete.addOnce((()=>{this.playFadeInDialogue(K)})),this._nootWidgetInAnimation.startTween()}playNootWidgetOut(){this._nootWidgetOutAnimation.startTween()}updateDialogue(q,K){this._panelOutAnimation.onComplete.addOnce((()=>{this.setDialogueTextKey(q),this.playFadeInDialogue(K)})),this.playFadeOutDialogue()}playFadeInDialogue(q){this._panelInAnimation.onComplete.addOnce((()=>{X.Aq$.isDefined(q)&&J.q.instance.prodigy.audio.playVoice(q,null),this.onDialogueDisplayComplete.dispatch()})),this._textInAnimation.startTween(),this._panelInAnimation.startTween()}playFadeOutDialogue(){this._textOutAnimation.startTween(),this._panelOutAnimation.startTween()}enableGuideHand(q=!0,K=Y.Click,z=new Z.Point(0,0),Q=0){if(this.guideHandAnimator.GameObject.active=q,q){this.guideHandAnimator.playAnimation(K,!0,!0);const q=this.guideHandAnimator.GameObject.findComponentInChildren(X.XVE);q.worldPosition=z,q.setRotation(Q)}else this.guideHandAnimator.stopAnimation()}setGuideHandLayer(q){const K=this.guideHandAnimator.GameObject.layer;return this.guideHandAnimator.GameObject.setLayer(q,!0),K}destroy(){this.onDialogueDisplayComplete.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.MnK)(nt.N),(0,Q.Sn)("design:type",nt.N)],ot.prototype,"overlayInputBlocker",void 0),(0,Q.Cg)([(0,X.MnK)(st.R),(0,Q.Sn)("design:type",st.R)],ot.prototype,"_nootDialogueLocalizationKey",void 0),(0,Q.Cg)([(0,X.MnK)(at._),(0,Q.Sn)("design:type",at._)],ot.prototype,"_nootWidgetInAnimation",void 0),(0,Q.Cg)([(0,X.MnK)(at._),(0,Q.Sn)("design:type",at._)],ot.prototype,"_nootWidgetOutAnimation",void 0),(0,Q.Cg)([(0,X.MnK)(it.x),(0,Q.Sn)("design:type",it.x)],ot.prototype,"_textInAnimation",void 0),(0,Q.Cg)([(0,X.MnK)(it.x),(0,Q.Sn)("design:type",it.x)],ot.prototype,"_textOutAnimation",void 0),(0,Q.Cg)([(0,X.MnK)(it.x),(0,Q.Sn)("design:type",it.x)],ot.prototype,"_panelInAnimation",void 0),(0,Q.Cg)([(0,X.MnK)(it.x),(0,Q.Sn)("design:type",it.x)],ot.prototype,"_panelOutAnimation",void 0),(0,Q.Cg)([(0,X.MnK)(et.j),(0,Q.Sn)("design:type",et.j)],ot.prototype,"guideHandAnimator",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ot.prototype,"dismissalOverlay",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ot.prototype,"onDialogueDisplayComplete",void 0),(0,Q.Cg)([(0,X.MnK)(rt.q),(0,Q.Sn)("design:type",rt.q)],ot.prototype,"focusOverlay",void 0),ot=(0,Q.Cg)([(0,X.EVk)("TutorialController",tt.Y.battleRevamp)],ot)},99057:(q,K,z)=>{"use strict";z.d(K,{M:()=>tt});var Y,Q=z(8674),X=z(62459),Z=z(28152),J=z(29834);!function(q){q.InBattle="pulse",q.Unlock="idle",q.EndBattle="FULL"}(Y||(Y={}));let tt=class extends X.uAl{init(q,K){this.GameObject.active=!0,this._friendshipLevel=q,this._heartAnimator.playAnimation(this.getAnimationName(Y.InBattle),!0),this._name.text=K}battleWin(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._heartAnimator.playAnimation(this.getAnimationName(Y.Unlock),!1),yield this._heartAnimator.OnAnimationComplete.asPromise(),this._heartAnimator.playAnimation(this.getAnimationName(Y.EndBattle),!0),X.Egh.timeout(200)}))}getAnimationName(q){return`Heart-${this._friendshipLevel}-${q}`}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],tt.prototype,"_name",void 0),(0,Q.Cg)([(0,X.MnK)(J.j),(0,Q.Sn)("design:type",J.j)],tt.prototype,"_heartAnimator",void 0),tt=(0,Q.Cg)([(0,X.EVk)("UltimatesUI",Z.Y.battleRevamp)],tt)},19176:(q,K,z)=>{"use strict";z.d(K,{$:()=>ot});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(62248),J=z(88022),tt=z(28628),et=z(35120),it=z(28152),st=z(66998),nt=z(80060),at=z(75935),rt=z(47215);let ot=class extends X.uAl{constructor(){super(...arguments),this.onPetRescueButtonClicked=new X.HN0,this.onTooltipClosed=new X.HN0,this._unit=null}showTooltipForUnit(q){if(!q||this._unit)return void this.hideTooltip();this._unit=q,this._unitOriginalCreatureLayer=this._unit.creature.creatureGameObject.layer,this._headerModule.active=!0,this._background.active=!0;if(this._headerModule.findComponent(rt.u).setUnitInfo(this._unit),this._rescueModule.active=this._unit.isInARescuableState(),this._background.setLayer("unit-tooltip-input-bottom",!0),this._unit.updateLayerByName("unit-tooltip-input-bottom"),this._statusEffectsModule.active=this._unit.statusEffects.length>0,this._statusEffectsModule.active){this._statusEffectsModule.findComponent(at.k).displayEffects(this._unit.statusEffects,this._unit.data)}const K=this._unit.data.teamId===Q.ETeamId.Home?230:-230;this._tooltipObject.transform.worldPosition={x:this._unit.hpBar.GameObject.transform.worldPosition.x+K,y:this._unit.GameObject.transform.worldPosition.y},this.updateActiveTooltip(),this._inOutAnimation.runInTween(),this.ensureOnScreen()}updateActiveTooltip(){this._unit&&(this.updateInjectedValues(),this._unit.unitTooltipIsShowing=!0)}updateInjectedValues(){var q,K,z,Y,Q,X,it,st;const at=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,rt=at.kennel.getPets().filter((q=>{var K;return q.ID===(null===(K=this._unit)||void 0===K?void 0:K.creature.id)})).length,ot=et.q.instance.prodigy.gameContainer.get("bec-c6b4"),ht=(null===(q=this._unit)||void 0===q?void 0:q.type)===tt.uj.Pet?ot.petAcquisitionCost(null===(K=this._unit)||void 0===K?void 0:K.creature.id,Z.l6.Rescue):void 0,ct=!(null==ht?void 0:ht.value)||0===ht.value;let dt="";(null===(z=this._unit)||void 0===z?void 0:z.isInARescuableState())&&(dt=ct?this._baseLocalizer.getText("ITEMCARD_FREE"):null===(Y=null==ht?void 0:ht.value)||void 0===Y?void 0:Y.toString());const lt=ot.isHardCurrencyMemberLocked(null==ht?void 0:ht.value),ut=ct||ot.canAfford(ht),ft=at.canPurchaseMembershipInGame(),bt=!ut&&ft||!ct&<nt.d.updateInjectedValues(this._tooltipObject,{PET_RESCUE_OWNED_COUNT:rt,UNIT_TOOLTIP_NAME:null!==(X=null===(Q=this._unit)||void 0===Q?void 0:Q.data.nickname)&&void 0!==X?X:null===(it=this._unit)||void 0===it?void 0:it.name,UNIT_TOOLTIP_RESCUE_COST:bt?"":dt,UNIT_TOOLTIP_RESCUE_SHOW_MC:!bt&&!ct,UNIT_TOOLTIP_RESCUE_SHOW_MEMBER:bt,UNIT_TOOLTIP_AFFINITY:[J._.Ui_battle_revamp_json,`icon-mini-element-${null===(st=this._unit)||void 0===st?void 0:st.data.element}`]})}dispatchPetRescueButtonClicked(){var q;(null===(q=this._unit)||void 0===q?void 0:q.isInARescuableState())&&this.onPetRescueButtonClicked.dispatch(this._unit)}hideTooltip(){this._unit&&(this._unit.updateLayerByName(this._unitOriginalCreatureLayer),this._unit.unitTooltipIsShowing=!1,this._unit.updatePetRescueTooltip(),this._inOutAnimation.runOutTween(),this.onTooltipClosed.dispatch(),this.onPetRescueButtonClicked.dispose()),this._unit=null}moveOffScreen(){this._tooltipObject.transform.worldPosition={x:-1e3,y:-1e3}}destroy(){this.onPetRescueButtonClicked.dispose(),this.onTooltipClosed.dispatch(),this.onTooltipClosed.dispose(),super.destroy()}ensureOnScreen(){if(!this._unit)return;const q=this._tooltipObject.transform,K=et.q.instance.prodigy.game.height,z=this._tooltipObject.findComponent(X.hQi);z.onResizeComplete.addOnce((()=>{const z=this._tooltipObject.findComponent(X.jsv),Y=z.getRootContainer().getBounds().top,Q=z.getRootContainer().getBounds().bottom;if(Y<0)q.worldPosition={x:q.worldPosition.x,y:q.worldPosition.y-Y};else if(Q>K){const z=Q-K;q.worldPosition={x:q.worldPosition.x,y:q.worldPosition.y-z}}})),z.sizeToChildren()}};(0,Y.Cg)([(0,X.ERr)(),(0,Y.Sn)("design:type",X._mx)],ot.prototype,"_tooltipObject",void 0),(0,Y.Cg)([(0,X.ERr)(),(0,Y.Sn)("design:type",X._mx)],ot.prototype,"_background",void 0),(0,Y.Cg)([(0,X.ERr)(),(0,Y.Sn)("design:type",X._mx)],ot.prototype,"_headerModule",void 0),(0,Y.Cg)([(0,X.ERr)(),(0,Y.Sn)("design:type",X._mx)],ot.prototype,"_statusEffectsModule",void 0),(0,Y.Cg)([(0,X.ERr)(),(0,Y.Sn)("design:type",X._mx)],ot.prototype,"_rescueModule",void 0),(0,Y.Cg)([(0,X.MnK)(st.s),(0,Y.Sn)("design:type",st.s)],ot.prototype,"_inOutAnimation",void 0),(0,Y.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Y.Sn)("design:type",X.dTp)],ot.prototype,"_baseLocalizer",void 0),ot=(0,Y.Cg)([(0,X.EVk)("UnitInfoTooltip",it.Y.battleRevamp)],ot)},47215:(q,K,z)=>{"use strict";z.d(K,{u:()=>it});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(17446),J=z(35120),tt=z(28152),et=z(80060);let it=class extends Q.uAl{constructor(){super(...arguments),this._commonRarityGameObjects=[],this._uncommonRarityGameObjects=[],this._rareRarityGameObjects=[],this._heroicRarityGameObjects=[],this._legendaryRarityGameObjects=[],this._unit=null}setUnitInfo(q){var K;this._unit&&(this._unit.unitTooltipIsShowing=!1,this._unit.updatePetRescueTooltip()),this._unit=q,this.updateActiveTooltip(),this.updateRarityDisplay(null===(K=this._unit)||void 0===K?void 0:K.data.rarity),this.updateRectTransform()}getActiveTransform(){const q=this._elementName.active?this._elementName:this._elementNameRarity.active?this._elementNameRarity:this._elementNameRarityOwned.active?this._elementNameRarityOwned:void 0;return null==q?void 0:q.transform}updateRectTransform(){if(!this._unit)return;const q=this.getActiveTransform();if(q){const K=this.GameObject.transform;K&&K.setSizeDelta(q.sizeDelta.width,q.sizeDelta.height)}}updateRarityDisplay(q){Q.Aq$.isDefined(q)&&(this._commonRarityGameObjects.forEach((K=>K.active=q===Z.E.Common)),this._uncommonRarityGameObjects.forEach((K=>K.active=q===Z.E.Uncommon)),this._rareRarityGameObjects.forEach((K=>K.active=q===Z.E.Rare)),this._heroicRarityGameObjects.forEach((K=>K.active=q===Z.E.Heroic)),this._legendaryRarityGameObjects.forEach((K=>K.active=q===Z.E.Legendary)))}updateActiveTooltip(){if(!this._unit)return;const q=this._unit.isARescuableUnit(),K=Q.Aq$.isDefined(this._unit.data.rarity);this._elementName.active=!q&&!K,this._elementNameRarity.active=!q&&K,this._elementNameRarityOwned.active=q&&K,this.updateInjectedValues(),this._unit.unitTooltipIsShowing=!0}updateInjectedValues(){var q,K,z,Y;const Q=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPets().filter((q=>{var K;return q.ID===(null===(K=this._unit)||void 0===K?void 0:K.creature.id)})).length;et.d.updateInjectedValues(this.gameObject,{PET_RESCUE_OWNED_COUNT:Q,UNIT_TOOLTIP_NAME:null!==(K=null===(q=this._unit)||void 0===q?void 0:q.data.nickname)&&void 0!==K?K:null===(z=this._unit)||void 0===z?void 0:z.name,UNIT_TOOLTIP_AFFINITY:[X._.Ui_battle_revamp_json,`icon-mini-element-${null===(Y=this._unit)||void 0===Y?void 0:Y.data.element}`]})}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_elementName",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_elementNameRarity",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_elementNameRarityOwned",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],it.prototype,"_commonRarityGameObjects",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],it.prototype,"_uncommonRarityGameObjects",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],it.prototype,"_rareRarityGameObjects",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],it.prototype,"_heroicRarityGameObjects",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],it.prototype,"_legendaryRarityGameObjects",void 0),it=(0,Y.Cg)([(0,Q.EVk)("UnitInfoTooltipHeader",tt.Y.battleRevamp)],it)},91631:(q,K,z)=>{"use strict";z.d(K,{W:()=>Z});var Y=z(62459),Q=z(35120),X=z(88022);class Z extends Y.mcf{constructor(q,K=0,z=0,Y=1,J=1){super();const tt=Q.q.instance.prodigy.create;this._barrierSprite=tt.sprite(0,0,X._.Boss_titan_barrier_json,"1",{x:.5,y:.5},(q=>this.addBarrierSpritesheet("deflect",[1,2,3,4,5,6,7,8,9,10],q))),this._breakSprite=tt.sprite(0,0,X._.Boss_titan_barrier_break_json,"1",{x:.5,y:.5},(q=>this.addBarrierSpritesheet("break",[1,2,3,4,5,6,7,8,9,10],q))),this._sparkSprite=tt.sprite(Z.SPARK_POSITION.x,Z.SPARK_POSITION.y,X._.Boss_titan_spark_json,"1",{x:.5,y:.5},(q=>this.addBarrierSpritesheet("spark",[1,2,3],q))),this.addChild(this._barrierSprite,this._breakSprite,this._sparkSprite),this.position.set(K,z),this.scale.set(Y,J),q.addChild(this)}addBarrierSpritesheet(q,K,z){z.alpha=0,z.name=q,z.smoothed=!1;z.animations.add(q,K,10,!1).onComplete.add((()=>{z.alpha=0}),z)}playHitAnimation(){this._barrierSprite.animations.stop(),this._sparkSprite.animations.stop(),this._barrierSprite.alpha=1,this._sparkSprite.alpha=1,this._barrierSprite.animations.play("deflect",10),this._sparkSprite.animations.play("spark",10)}playBreakAnimation(){this._breakSprite.alpha=1,this._sparkSprite.alpha=1,this._breakSprite.animations.play("break",10),this._sparkSprite.animations.play("spark",10)}}Z.SPARK_POSITION={x:-165,y:19}},38340:(q,K,z)=>{"use strict";z.d(K,{H:()=>nt});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(56942),J=z(29834),tt=z(13956),et=z(34234),it=z(13302),st=z(63761);class nt extends st.cw{setData(q,K,z){const Q=Object.create(null,{setData:{get:()=>super.setData}});return(0,Y.sH)(this,void 0,void 0,(function*(){var Y;yield Q.setData.call(this,q,K,z),this.hitbox.w<=nt.SMALL_CREATURE_WIDTH_MAXIMUM||(1===(null===(Y=this._battleController.getTeamById(q.teamId))||void 0===Y?void 0:Y.units.length)?this.size=it.X.Large:this.size=it.X.Medium)}))}createRenderables(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this._prefabLoader.loadWithDependenciesFromGUID(X.l.AnimatedSpineCreature,z);this._creatureGameObject=q,q.active=!1;const Y=q.findComponentInChildren(J.j);return this._animator=Y,yield new Promise((q=>{Y.spine.setAsset(nt.getBossSpineId(K.metadata.assets,K.ID),q)})),q}))}static getBossSpineId(q,K){var z,Y;return Q.Aq$.isDefined(null===(z=q.battle)||void 0===z?void 0:z.assetKey)?Z.Q[q.battle.assetKey]:"spine"===(null===(Y=q.default)||void 0===Y?void 0:Y.type)&&q.default.assetKey?Z.Q[q.default.assetKey]:`default-boss-${K}`}}nt.defaultSize=it.X.Large,nt.SMALL_CREATURE_WIDTH_MAXIMUM=200,(0,Y.Cg)([(0,et.d)("BattleController"),(0,Y.Sn)("design:type",Function)],nt.prototype,"_battleController",void 0),(0,Y.Cg)([(0,tt.b)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],nt.prototype,"_prefabLoader",void 0)},39674:(q,K,z)=>{"use strict";z.d(K,{j:()=>at});var Y=z(8674),Q=z(62459),X=z(1195),Z=z(13956),J=z(80060),tt=z(37773),et=z(97317),it=z(65732),st=z(41935),nt=z(63761);class at extends nt.cw{createRenderables(q,K,z){const X=Object.create(null,{createRenderables:{get:()=>super.createRenderables}});return(0,Y.sH)(this,void 0,void 0,(function*(){var Y;if(this.isOpponent){const K="number"==typeof q.asset.id?q.asset.id:parseInt(q.asset.id);this._loggedInPlayer.player.encounters.addToPetTimesBattled(K)}const Z=yield X.createRenderables.call(this,q,K,z);return q.petGear&&(null===(Y=Z.findComponentInChildren(st.o))||void 0===Y||Y.updateGear(Object.assign({},q.petGear)).catch(Q.RQr.createHandler("Unable to update pet gear"))),J.d.updateInjectedValues(Z,{[it.E.ChargedCreatureEffectTier]:tt.e.getChargedLevelTierFromLevel(q.chargedLevel),[it.E.ChargedCreatureEffectDisplayType]:q.chargedLevel>0?et.X$.IDLE:et.X$.HIDDEN}),Z}))}}(0,Y.Cg)([(0,Z.b)("ad2-c5b2"),(0,Y.Sn)("design:type",X.E)],at.prototype,"_loggedInPlayer",void 0)},63761:(q,K,z)=>{"use strict";z.d(K,{HW:()=>X,H0:()=>Q,cw:()=>bt});var Y,Q,X,Z=z(8674),J=z(62459),tt=z(35120),et=z(21492),it=z(29834),st=z(51315),nt=z(93833),at=z(13956),rt=z(34234),ot=z(54950),ht=z(13302),ct=z(81531),dt=z(83441),lt=z(91631),ut=z(28402);!function(q){q.Activate="activate",q.Deactive="deactive",q.Hit="hit",q.Idle="idle"}(Y||(Y={}));class ft{constructor(q,K,z=0,Q=0,X=1,Z=1){this._barrierGameObject=new J._mx(q);const tt=this._barrierGameObject.addComponent(J.dLy);tt.setPosition(tt.localPosition.x+z,tt.localPosition.y+Q),tt.setScale(X,Z);const et=this._barrierGameObject.addComponent(ut.v);this._barrierAnimator=et.GameObject.addComponent(it.j),et.setAsset(K,(()=>{this._barrierAnimator.OnAnimationComplete.addOnce((()=>{this._barrierAnimator.playAnimation(Y.Idle,!0)})),this._barrierAnimator.playAnimation(Y.Activate,!1)}))}playHitAnimation(){this._barrierAnimator.OnAnimationComplete.addOnce((()=>{this._barrierAnimator.playAnimation(Y.Idle,!0)})),this._barrierAnimator.spine&&this._barrierAnimator.playAnimation(Y.Hit,!1)}playBreakAnimation(){this._barrierAnimator.OnAnimationComplete.addOnce((()=>{this.destroy()})),this._barrierAnimator.playAnimation(Y.Deactive,!1)}destroy(){var q,K;null===(q=this._barrierAnimator)||void 0===q||q.destroy(),null===(K=this._barrierGameObject)||void 0===K||K.destroy(),this._barrierGameObject=null}}!function(q){q.Astral="astral",q.Shadow="shadow",q.ShadowBig="shadowBig",q.None="none",q.Immediate="immediate"}(Q||(Q={})),function(q){q.LegacySprite="legacySprite",q.Spine="spine"}(X||(X={}));class bt{constructor(){this._fadeAnimation=null,this.shouldFadeOnDefeat=!0,this.castSpellSfx=null,this.isLoaded=!1,this.onLoaded=new J.HN0,this.ran=!1}get creatureGameObject(){return this._creatureGameObject}get rootContainer(){return this._rootContainer}get animator(){return this._animator}get visible(){return this._creatureGameObject.active}set visible(q){this._creatureGameObject.active=q}get barrier(){return this._barrier}setData(q,K,z){return(0,Z.sH)(this,void 0,void 0,(function*(){var Y,Q,X,Z,tt,et,it,st,at,rt,ot,ct,dt;const lt=q.asset,ut=lt?this._gameDataProvider.getItem(lt.type,lt.id):null;lt&&(this.id="number"==typeof lt.id?lt.id:parseInt(lt.id),this.name=J.Aq$.isDefined(ut.data.nameKey)?this._localizer.getText(ut.data.nameKey):ut.data.name),this.nickname=q.nickname,this.isOpponent=q.teamId!==this._leftTeamId,this.teleportType=z,this.level=q.level,this.chargedLevel=null!==(Y=q.chargedLevel)&&void 0!==Y?Y:0,this._rootContainer=K.findComponent(nt.$).rootContainer,this._creatureGameObject=yield this.createRenderables(q,ut,K),this.isOpponent&&this.flip(),J.Aq$.isDefined(null===(Z=null===(X=null===(Q=null==ut?void 0:ut.metadata)||void 0===Q?void 0:Q.assets)||void 0===X?void 0:X.battle)||void 0===Z?void 0:Z.shouldFadeOnDefeat)&&(this.shouldFadeOnDefeat=null===(it=null===(et=null===(tt=null==ut?void 0:ut.metadata)||void 0===tt?void 0:tt.assets)||void 0===et?void 0:et.battle)||void 0===it?void 0:it.shouldFadeOnDefeat),J.Aq$.isDefined(null===(rt=null===(at=null===(st=null==ut?void 0:ut.metadata)||void 0===st?void 0:st.assets)||void 0===at?void 0:at.battle)||void 0===rt?void 0:rt.castSpellSfx)&&(this.castSpellSfx=null===(dt=null===(ct=null===(ot=null==ut?void 0:ut.metadata)||void 0===ot?void 0:ot.assets)||void 0===ct?void 0:ct.battle)||void 0===dt?void 0:dt.castSpellSfx),this.addAnimationRemaps(ut),this._creatureGameObject.setLayer(K.layer,!0),this.idle(),this.size=ht.X.Normal,this.recalculateHitbox(),this.isLoaded=!0,this.onLoaded.dispatch()}))}createRenderables(q,K,z){return(0,Z.sH)(this,void 0,void 0,(function*(){var Y,Q,X,Z,J;const tt=this._prefabAppearanceLoader.loadAppearancePrefab(q.asset.type,q.asset.id,z);tt.active=!1;const et=null!==(Q=null===(Y=K.metadata.assets.default)||void 0===Y?void 0:Y.battleScale)&&void 0!==Q?Q:1;return tt.transform.setScale(et,et),this._animator=null!==(J=null!==(Z=null===(X=tt.findComponentInChildren(dt.O))||void 0===X?void 0:X.spineAnimator)&&void 0!==Z?Z:tt.findComponentInChildren(it.j))&&void 0!==J?J:tt.findComponentInChildren(st.K),tt}))}addAnimationRemaps(q){var K,z,Y;if(this._animator instanceof it.j&&q){const Q=this._animator.spine,X=null===(Y=null===(z=null===(K=q.metadata)||void 0===K?void 0:K.assets)||void 0===z?void 0:z.battle)||void 0===Y?void 0:Y.animations;(null==X?void 0:X.idle)&&Q.addAnimationRemap("idle",null==X?void 0:X.idle),(null==X?void 0:X.attack)&&Q.addAnimationRemap("attack",null==X?void 0:X.attack),(null==X?void 0:X.defeat)&&Q.addAnimationRemap("defeat",null==X?void 0:X.defeat)}}addBarrier(q,K,z=0,Y=0,Q=1,Z=1){switch(q){case X.LegacySprite:this._barrier=new lt.W(this._rootContainer,z,Y,Q,Z);break;case X.Spine:J.Aq$.isDefined(K)&&(this._barrier=new ft(this._creatureGameObject,K,z,Y,Q,Z))}}removeBarrier(q=!0){var K;q&&(null===(K=this._barrier)||void 0===K||K.destroy()),this._barrier=null}get width(){return this._rootContainer.width}get height(){return this._rootContainer.height}get worldScale(){return this._creatureGameObject.transform.worldScale}get worldPosition(){return this._creatureGameObject.transform.worldPosition}get hitbox(){return this._hitbox}destroy(){this.onLoaded.dispose(),this._fadeAnimation&&(tt.q.instance.game.tweens.remove(this._fadeAnimation),this._fadeAnimation=null)}fadeOut(){return(0,Z.sH)(this,arguments,void 0,(function*(q=bt.FADE_OUT_TIME_MS){this._fadeAnimation=tt.q.instance.game.add.tween(this._rootContainer,this,!0).to({alpha:0},q,J.GS3.Quadratic.In,!0),yield this._fadeAnimation.onTweenComplete.asPromise()}))}fadeIn(){return(0,Z.sH)(this,arguments,void 0,(function*(q=bt.FADE_OUT_TIME_MS){this._rootContainer.alpha=0,this._fadeAnimation=tt.q.instance.game.add.tween(this._rootContainer,this,!0).to({alpha:1},q,J.GS3.Quadratic.In,!0),yield this._fadeAnimation.onTweenComplete.asPromise()}))}flip(){this._creatureGameObject.transform.setScale(-this._creatureGameObject.transform.localScale.x,this._creatureGameObject.transform.localScale.y)}idle(){this._animator.playAnimation("idle",!0)}attack(){this._animator instanceof it.j&&this._animator.OnAnimationComplete.addOnce((()=>{this.idle()})),this._animator.playAnimation("attack",!1)}summon(){this.attack()}defeated(){return(0,Z.sH)(this,void 0,void 0,(function*(){this.breakBarrier(),this._animator instanceof it.j&&this._animator.hasAnimation("defeat")&&(this._animator.playAnimation("defeat",!1),yield this._animator.OnAnimationComplete.asPromise()),this.shouldFadeOnDefeat&&(yield this.fadeOut())}))}breakBarrier(){var q;null===(q=this._barrier)||void 0===q||q.playBreakAnimation()}hurt(){var q;null===(q=this._barrier)||void 0===q||q.playHitAnimation()}walk(){this._animator.playAnimation("walk",!0)}levelUp(){this._animator.playAnimation("attack",!1)}shouldShowLevel(){return!0}recalculateHitbox(){const q=this.visible;this.visible=!0;const K=this._rootContainer.getBounds();this.visible=q,this._hitbox={x:K.x-this._rootContainer.worldTransform.tx,y:K.y-this._rootContainer.worldTransform.ty,w:K.width,h:K.height}}getNameFromAppearance(q){if(!q)return;const K=q.name;if(!J.Aq$.isDefined(K))return;if("string"==typeof K)return this._localizer.getText(K);return this.getNameResolver(K).getName()}getNameResolver(q){const K=tt.q.instance.prodigy.gameContainer.resolve(et.C);return K.initFromProtobuf(q),K}handleExit(){return(0,Z.sH)(this,void 0,void 0,(function*(){}))}handleEnter(){}}bt.defaultSize=ht.X.Normal,bt.FADE_OUT_TIME_MS=2e3,(0,Z.Cg)([(0,rt.d)("LeftTeamId"),(0,Z.Sn)("design:type",String)],bt.prototype,"_leftTeamId",void 0),(0,Z.Cg)([(0,at.b)("c21-4a0a"),(0,Z.Sn)("design:type",ot.S)],bt.prototype,"_prefabAppearanceLoader",void 0),(0,Z.Cg)([(0,at.b)(J.$Bt.LocalizationService),(0,Z.Sn)("design:type",J.dTp)],bt.prototype,"_localizer",void 0),(0,Z.Cg)([(0,rt.d)("GameDataProvider"),(0,Z.Sn)("design:type",ct.q)],bt.prototype,"_gameDataProvider",void 0)},83269:(q,K,z)=>{"use strict";z.d(K,{B:()=>lt});var Y=z(28628),Q=z(38340),X=z(8674),Z=z(62459),J=z(29834),tt=z(28402),et=z(63761);class it extends et.cw{get animator(){return this._animator}setData(q,K,z){const Y=Object.create(null,{setData:{get:()=>super.setData}});return(0,X.sH)(this,void 0,void 0,(function*(){this._spineGuid=`${q.asset.id}`,this.name=this.getNameFromAppearance(q.appearance),yield Y.setData.call(this,Object.assign(Object.assign({},q),{asset:null}),K,z)}))}createRenderables(q,K,z){return(0,X.sH)(this,void 0,void 0,(function*(){const q=new Z._mx(z);q.active=!1,q.addComponent(Z.dLy);const K=q.addComponent(tt.v);return yield new Promise((q=>K.setAsset(this._spineGuid,q))),this._animator=q.addComponent(J.j),q}))}idle(){this._animator.hasAnimation("idle")&&super.idle()}attack(){this._animator.hasAnimation("attack")&&super.attack()}}var st=z(39674),nt=z(99625),at=z(56942),rt=z(13956),ot=z(13302),ht=z(91631);class ct extends et.cw{setData(q,K,z){const Y=Object.create(null,{setData:{get:()=>super.setData}});return(0,X.sH)(this,void 0,void 0,(function*(){yield Y.setData.call(this,q,K,z),this.size=ot.X.Huge}))}createRenderables(q,K,z){return(0,X.sH)(this,void 0,void 0,(function*(){const q=K.metadata.assets.battle,Y=yield this._prefabLoader.loadWithDependenciesFromGUID(nt.l.AnimatedSpineCreature,z);this._barrier=new ht.W(this._rootContainer,ct.BARRIER_DATA.offset.x,ct.BARRIER_DATA.offset.y,ct.BARRIER_DATA.scale.x,ct.BARRIER_DATA.scale.y),this._animator=Y.findComponentInChildren(J.j);const Q=at.Q[q.assetKey],X=Y.findComponentInChildren(Z.v2j);return Y.transform.setScale(1.75,1.75),yield new Promise((q=>{X.setAsset(Q,q)})),X.getSpine().transform.scale.set(1,1),Y}))}addAnimationRemaps(q){super.addAnimationRemaps(q),this._animator.spine.addAnimationRemap("defeat","knockout")}shouldShowLevel(){return!1}defeated(){return(0,X.sH)(this,void 0,void 0,(function*(){this._barrier.playBreakAnimation(),this._animator.playAnimation("defeat",!1),yield this._animator.OnAnimationComplete.asPromise()}))}}ct.defaultSize=ot.X.Huge,ct.BARRIER_DATA={offset:{x:-60,y:-60},scale:{x:2.4,y:2.4}},(0,X.Cg)([(0,rt.b)("983-05a7"),(0,X.Sn)("design:type",Z.wNP)],ct.prototype,"_prefabLoader",void 0);var dt=z(92611);class lt{static getUnitContainer(q){switch(q){case Y.uj.Titan:return ct;case Y.uj.Boss:return Q.H;case Y.uj.Wizard:return dt.N;case Y.uj.Object:return it;case Y.uj.Pet:default:return st.j}}}},92611:(q,K,z)=>{"use strict";z.d(K,{N:()=>pt});var Y,Q=z(8674),X=z(62459),Z=z(99625),J=z(32389),tt=z(35120),et=z(77938),it=z(129),st=z(63115),nt=z(64889),at=z(99737),rt=z(41538),ot=z(75777),ht=z(76277),ct=z(44357),dt=z(24521),lt=z(23029);!function(q){q.hearts="hearts",q.damage="damage"}(Y||(Y={}));class ut{static getRevampLabelForAffix(q){const K=tt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);switch(q.type){case Y.hearts:return K.getText("PLAYER_CARD_REVAMP_HEALTH_BONUS");case Y.damage:return K.getText("PLAYER_CARD_REVAMP_POWER_BONUS");default:return""}}static getRevampBonusForLegacyAffix(q){const K=lt.R.loadData(dt.r.BattleRevampConstants_json).battleConstants.equipmentModifierBaseValues;if(!q.valuePercent)return 0;switch(q.type){case Y.hearts:return Math.round(q.amount*K.health);case Y.damage:return Math.round(q.amount*K.power)}}static getTotalRevampHealthBonusFromAffixes(q){return q.reduce(((q,K)=>{const z=et.t.getItem("affix",K).data;let Q=q;return z.type===Y.hearts&&(Q+=this.getRevampBonusForLegacyAffix(z)),Q}),0)}static isFollowContainer(q){return void 0!==q.stopMoving&&void 0===q.setup}static isFollowSpineContainer(q){return void 0!==q.stopMoving&&void 0!==q.setup}static isPet(q){return void 0!==q.createDog&&void 0!==q.createCat}static isLegacyGameObject(q){return void 0!==q.handleGameObjectDestroy&&void 0!==q.visible}}var ft=z(28080),bt=z(63761);class pt extends bt.cw{constructor(){super(...arguments),this._scale=1}setData(q,K,z){const Y=Object.create(null,{setData:{get:()=>super.setData}});return(0,Q.sH)(this,void 0,void 0,(function*(){var Q,X;this._scale=K.transform.localScale.y,yield Y.setData.call(this,Object.assign(Object.assign({},q),{asset:null}),K,z),this.id="number"==typeof(null===(Q=q.asset)||void 0===Q?void 0:Q.id)?q.asset.id:Number.parseInt(null===(X=q.asset)||void 0===X?void 0:X.id),this.name=this.getNameFromAppearance(q.appearance)}))}getNameResolver(q){const K=super.getNameResolver(q);return this.isOpponent||K.setFallbackName(tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").loginCredentials.username),K}createRenderables(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,Y;const Q=new it.a(tt.q.instance.game);Q.appearance.init(Object.assign(Object.assign({},q.appearance),{name:void 0}));const Z=this.isOpponent&&!(0,ht.G)(J.q).enabled?Object.assign(Object.assign({},q.equipment),{costume:void 0}):q.equipment;Q.equipment.init(Z),q.appearance.morph&&Q.setData({playerTransformation:{transformType:q.appearance.morph.type,transformID:q.appearance.morph.ID}}),Q.data.level=q.level;const et=X.Aq$.isDefined(q.chargedLevel)&&q.chargedLevel>0;Q.data.chargedLevelData={chargedLevelsEnabled:et,chargedLevel:null!==(K=q.chargedLevel)&&void 0!==K?K:0,chargedLevelCap:null!==(Y=q.chargedLevel)&&void 0!==Y?Y:0,chargedLevelXpForCurrentLevel:0,chargedLevelXpRequiredForNextLevel:0,chargedLevelCumulativeXp:0,hasReceivedFreeChargedLevel:!0,newLevelData:{levelsGained:[],startingLevelRelativeXp:0,xpGained:0},recuperableLevels:0,recuperableXp:0,costToKeepLevels:0,daysUntilLevelDecay:0,lastVisited:(new Date).toISOString()};const at=yield ft.D.createWizardObject(Q,!1);at.active=!1,z.addChild(at),this._animation=at.findComponentInChildren(nt.$);const rt=at.findComponentInChildren(st.T);return rt&&(rt.transformationChecker=this,rt.updateMountAppearance()),this.renderFollowContainer(Q,z),at}))}renderFollowContainer(q,K){const z=q.equipment.getFollow();if(pt.FOLLOW_MORPH_MARBLE_BLACKLIST.includes(z))return;const Y=et.t.getItem("follow",z);if(!Y)return;this.followContainer=tt.q.instance.prodigy.create.follow(this._rootContainer,Y.ID,1,null,pt.WIZARD_FOLLOW_OFFSET_X,pt.WIZARD_FOLLOW_OFFSET_Y);const Q=tt.q.instance.prodigy.gameContainer.get("983-05a7"),X=Object.keys(Y.data.stats).find((q=>Y.data.stats[q]>0)),J={power:Z.l.BuddyParticlePower,defence:Z.l.BuddyParticleDefence,speed:Z.l.BuddyParticleSpeed,hp:Z.l.BuddyParticleHp};this._followParticles=Q.loadFromGUID(J[X],K),this._followParticles.transform.setPosition(pt.WIZARD_FOLLOW_OFFSET_X,pt.WIZARD_FOLLOW_OFFSET_Y),this._followParticles.active=!1,(this.followContainer instanceof at.z||this.followContainer instanceof rt.g||this.followContainer instanceof ot.i)&&this.followContainer.startLoad()}setFollowPosition(q,K){this.followContainer&&this.followContainer.transform.position.set(null!=q?q:pt.WIZARD_FOLLOW_OFFSET_X,null!=K?K:pt.WIZARD_FOLLOW_OFFSET_Y)}idle(){this._animation.changeState(4)}attack(){this._animation.changeState(2)}summon(){this._animation.changeState(3)}walk(){this._animation.changeState(1)}levelUp(){this._animation.changeState(5)}recalculateHitbox(){const q=pt.WIZARD_WIDTH*this._scale,K=pt.WIZARD_HEIGHT*this._scale;this._hitbox={x:-q>>1,y:-K,w:q,h:K}}isTransformed(){return this._animation.isTransformed()}set visible(q){this._creatureGameObject.active=q,this.followContainer&&(this.followContainer.visible=q)}flip(){super.flip(),this.followContainer&&(ut.isLegacyGameObject(this.followContainer)||ut.isPet(this.followContainer)?(this.followContainer.transform.position.x=-this.followContainer.transform.position.x,this.followContainer.transform.scale.x=-this.followContainer.transform.scale.x):(ut.isFollowContainer(this.followContainer)||ut.isFollowSpineContainer(this.followContainer))&&(this.followContainer.x=-this.followContainer.x,this.followContainer.scale.x=-this.followContainer.scale.x))}handleExit(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.followContainer&&(yield(0,ct.Qx)(this,this.followContainer,{x:0,y:0,duration:1e3,ease:X.GS3.Linear.None}))}))}handleEnter(q=2e3){this.followContainer&&(this._followParticles.active=!0,tt.q.instance.game.time.events.addTimer(q,(()=>{this._followParticles.active=!1}),this),tt.q.instance.game.add.tween(this.followContainer,this,!0).to({alpha:1},q/4,X.GS3.Quadratic.In,!0))}}pt.WIZARD_HEIGHT=115,pt.WIZARD_WIDTH=120,pt.WIZARD_FOLLOW_OFFSET_X=-100,pt.WIZARD_FOLLOW_OFFSET_Y=-80,pt.FOLLOW_MORPH_MARBLE_BLACKLIST=[234,232,199,218]},65725:(q,K,z)=>{"use strict";z.d(K,{R:()=>ot,V:()=>rt});var Y=z(8674),Q=z(99625),X=z(28628),Z=z(57797),J=z(8394),tt=z(65240),et=z(35120),it=z(7351),st=z(65050),nt=z(13956),at=z(60155);const rt=["currency","gold","item","pet"];class ot extends at.V{getUnitDataForTeam(q,K){var z;const Y=this._activePlayer.daily,Q=super.getUnitDataForTeam(q,K),J=Q.find((q=>{var K,z;return q.asset.id===(null===(z=null===(K=Y.getDailyBattleEncounter(Z.je.Boss))||void 0===K?void 0:K.boss)||void 0===z?void 0:z.ID)}));if(J){const q=null!==(z=J.slot)&&void 0!==z?z:X.Ie.FrontBottom;Q.forEach((K=>{K.slot===X.Ie.BackMiddle&&K.asset.id!==J.asset.id&&(K.slot=q)})),J.slot=X.Ie.BackMiddle}return Q}showBattleResult(q,K,z,X){const Z=Object.create(null,{showBattleResult:{get:()=>super.showBattleResult}});return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z,Y,X=!0){var J,it;if(!X)return;const nt=null===(it=null===(J=et.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig())||void 0===J?void 0:J.festivalDailyData)||void 0===it?void 0:it.bossBattleRouletteData;let at=[],rt=[{type:"currency",ID:1,N:50}];nt&&(at=this.processRewards(nt.items),rt=this.processRewards(nt.fallbackItems)),yield new Promise((q=>{et.q.instance.prodigy.open.bossRewards(at,st.N.FestivalDailyBossRouletteSpin,Q.l.BossRewardUIwithnorespin,void 0,rt,q,void 0,void 0,void 0,{instanceId:this._activePlayer.daily.getFestivalInstanceName(),sourceType:tt.C.FestivalBossLootWheel})})),yield Z.showBattleResult.call(this,q,K,z,Y,X)}))}processRewards(q){let K=q.map((q=>Object.assign(Object.assign({},q),{isSecure:(0,J.p)(q.type,q.ID)})));return K=K.filter((q=>rt.includes(q.type)||this._activePlayer.getItemCount(q.type,q.ID)<=0)),K}}ot.FESTIVAL_DAILY_BOSS_BATTLE_ID="festivalDailyBoss",(0,Y.Cg)([(0,nt.b)("782-c308"),(0,Y.Sn)("design:type",it.W)],ot.prototype,"_activePlayer",void 0)},73032:(q,K,z)=>{"use strict";z.d(K,{o:()=>X});var Y=z(8674),Q=z(62459);class X{constructor(){this.onPostBattleExpressModeComplete=new Q.HN0}get isEnabled(){return this._isEnabled}get hasStarted(){return this._isEnabled&&Q.Aq$.isDefined(this._postBattleFlowManager)}enable(q){return(0,Y.sH)(this,void 0,void 0,(function*(){this._isEnabled=!0,Q.Aq$.isDefined(this._postBattleFlowManager)?this.start(q):this._message=q}))}start(q){this._postBattleFlowManager.enableExpressMode(q)}setPostBattleFlowManager(q){Q.Aq$.isDefined(this._postBattleFlowManager)||(this._postBattleFlowManager=q,this._postBattleFlowManager.OnDestroy.addOnce((()=>{this._isEnabled&&this.onPostBattleExpressModeComplete.dispatch()})),this._isEnabled&&this.start(this._message))}destroy(){this.onPostBattleExpressModeComplete.dispose()}}},60155:(q,K,z)=>{"use strict";z.d(K,{Y:()=>Ee,V:()=>Se});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(95891),J=z.n(Z),tt=z(88022),et=z(82351),it=z(85855),st=z(24521),nt=z(99625),at=z(51742),rt=z(36648),ot=z(40671),ht=z(56942),ct=z(60035),dt=z(28628),lt=z(62886),ut=z(46701),ft=z(73678),bt=z(15821),pt=z(35120),vt=z(34829),gt=z(23029),mt=z(77938),yt=z(37465),_t=z(73797),Et=z(16495),wt=z(34603),Tt=z(71857),St=z(36279),At=z(43531),Ct=z(23082),Ot=z(81617),It=z(76277),Dt=z(65050),Rt=z(41674),Pt=z(67665),Mt=z(15485),Nt=z(46784),xt=z(70703),Lt=z(2224),kt=z(98400),Bt=z(13956),Ut=z(34234),Ft=z(42430),Gt=z(3583),jt=z(17425),$t=z(60985),Ht=z(44094),Vt=z(50084),Wt=z(86283),qt=z(94393),Kt=z(71796),zt=z(78365),Yt=z(68788),Qt=z(56718),Xt=z(13302),Zt=z(21001),Jt=z(64019),te=z(15160),ee=z(83441),ie=z(72748),se=z(18278),ne=z(19176),ae=z(63761),re=z(81531),oe=z(58203),he=z(60668),ce=z(95807);class de extends ce.Z{constructor(q){super(),this.callback=q}enter(){this.callback()}}var le=z(52516),ue=z(63046),fe=z(43503);class be extends ce.Z{constructor(q){super(),this._storedSegmentData=q,this.nextState=this.nextState.bind(this)}enter(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.battleController.type===dt.gu.NormalRiftRun){const q=yield fe.L.canResumeRiftRun(),K=X.wa5.getActiveScene().container.get("NetworkHandler");if(!q)return void(yield Promise.all([fe.L.resetRiftRunProgressAndTeleportToDragonIsle(null),K.clearBattleState()]))}this.battleController.onResumeBattle().then((()=>{this.sendBattleResumeSegmentData(),this.nextState()})).catch((q=>{X.RQr.logError(q,"Error resuming a battle"),this.stateMachine.showThrownErrorDialog(q)}))}))}nextState(){this.stateMachine.goToState(ue.B)}sendBattleResumeSegmentData(){const q=this.stateMachine.getStartOrResumeSegmentData();this.stateMachine.segment.battleRevamp.sendBattleResumedEvent(Object.assign({battle_id:this.battleController.battleId,battle_type:this.stateMachine.segment.battleRevamp.getSegmentBattleType(this.stateMachine.battleType),battle_variant:this.stateMachine.segment.battleRevamp.getBattleVariant(this.stateMachine.battleType,q.variantData),battle_difficulty:q.difficulty,player_team_size:this.stateMachine.homeTeam.units.length,enemy_team_size:this.stateMachine.awayTeam.units.length,resumedData:this._storedSegmentData},q.instance))}}var pe,ve,ge=z(37987),me=z(21945),ye=z(60604),_e=z(73032);!function(q){q.SmallActivate="activate-player-small",q.SmallIdle="idle-player-small",q.SmallDeactivate="deactivate-player-small",q.NormalActivate="activate-player",q.NormalIdle="idle-player",q.NormalDeactivate="deactivate-player",q.LargeActivate="activate-boss",q.LargeIdle="idle-boss",q.LargeDeactivate="deactivate-boss"}(pe||(pe={})),function(q){q.ConcurrentPlay="animation-concurrent-play"}(ve||(ve={}));const Ee={delay:200,duration:1600,bgStartScale:.95,bgEndScale:1,fgStartScale:.82,fgEndScale:1},we=[Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.FrontBottom],Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.FrontTop],Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.BackMiddle],Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.FrontMiddle],Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.Middle]],Te=[Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.FrontBottom],Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.FrontTop],Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.FrontMiddle],Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.BackMiddle],Jt.cs.TEAM_UNIT_SLOT_MAP[dt.Ie.Middle]];class Se{get isAnsweringQuestion(){return this._isAnsweringQuestion}get isChoosingSpell(){return this._isChoosingSpell}get isPerformingAction(){return this._isPerformingAction}get isHighlightingRescue(){return this._isHighlightingRescue}get prefabRoot(){return this._prefabRoot}get spellRoot(){return this._spellRoot}getAssetList(){return this._baseAssets}get statusEffectAnimationController(){return this._statusEffectAnimationController||(this._statusEffectAnimationController=new Gt.c),this._statusEffectAnimationController}get battleConstants(){return this._battleConstants}get leftTeamId(){return Q.ETeamId.Home}get rightTeamId(){return Q.ETeamId.Away}get activeUnit(){return this._activeUnit}set activeUnitSpellData(q){this._activeUnitSpellData=q}get battleBackgroundFX(){return this._battleBackgroundFX}getSpellComponentById(q){return this._spellComponents.get(q)}getBattlePrefab(){return nt.l.RevampBattleScene}getActiveUnitSpellData(q){var K;return null===(K=this._activeUnitSpellData)||void 0===K?void 0:K.find((K=>K.spellId===q))}constructor(q){var K;this.allowVideoLessons=!0,this.selectedSpell=null,this._isAnsweringQuestion=!1,this._isChoosingSpell=!1,this._isPerformingAction=!1,this._isHighlightingRescue=!1,this._baseAssets=[at.c.Sfx_bar_fill,at.c.Sfx_results_screen,at.c.Sfx_battle,it.V.Bgm_victory,it.V.Bgm_battle,ht.Q.Spine_xpbar_json,ht.Q.Spine_character_shine_json,tt._.Ui_battle_revamp_json,tt._.Ui_battle_revamp_legacy_json,rt.q.Particle_petstore_orb_1,rt.q.Particle_petstore_1,rt.q.Battle_interstitial_bg,et.B.Sfx_critial_hit,et.B.Sfx_Dodge,et.B.Sfx_empty_mp,et.B.Sfx_fumble_poof,et.B.Sfx_heal,et.B.Sfx_mp_refilled,et.B.Sfx_powerful_hit,et.B.Sfx_resist_hit,et.B.Sfx_spell_card_hover,et.B.Sfx_spell_card_select,et.B.Sfx_teleport_defeat,et.B.Sfx_teleport_rescue,et.B.Sfx_unit_select,et.B.Sfx_vs_animation,et.B.Sfx_wizard_team_teleport,et.B.Sfx_unit_buff_positive,at.c.Sfx_qi_button_default,at.c.Sfx_qi_button_disabled,at.c.Sfx_qi_positive_action,at.c.Sfx_qi_negative_action],this._stateMachinePromise=new X.bnh,this.postBattleExpressModeController=new _e.o,this._spellCardBattleActionData=[],this._battleTargetControllerComponent=null,this.onChoosingSpell=new X.HN0,this.onSpellCardSelected=new X.HN0,this.onSpellCardUnselected=new X.HN0,this.onSpellTargetChosen=new X.HN0,this.onSpellCardsRemoved=new X.HN0,this.onBattleEnded=new X.HN0,this._spellComponents=new Map,this._battleVisualCenterPositionX=700,this._showIndicator=!0,this._isUnitTooltipLocked=!1,this._battleBackgroundFX=null,this._spellBookShowing=!1,this._ignoreUnitEntranceUIWhenMoving=!1,this.awardedXpData=null,this.postBattleRescuablePets=[],this.magicoinRewardGranted=!1,this._paintedBackgroundZoomConfigs=Ee,this._forceEndBattle=!1,this.hasMpOverrides=!1,this._spellCardsHidden=!0,this.type=null!==(K=q.battleType)&&void 0!==K?K:dt.gu.Basic,this.subType=q.battleSubType,this.battleCooldownConfig=q.cooldown,this._updateTimer=pt.q.instance.prodigy.game.time.events.loop(vt.s.TARGET_FPS_40_MS,this.update,this)}update(){this._statusEffectAnimationController&&this._statusEffectAnimationController.update()}bindNetworkHandler(){X.wa5.getActiveScene().container.bind("NetworkHandler").to(oe.m).asSingleton()}requestBattleStart(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._networkHandler.createBattle(q)}))}requestBattleSimulation(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;return(null===(z=null===(K=q.debug)||void 0===K?void 0:K.battleSim)||void 0===z?void 0:z.simCount)?this._networkHandler.createBattleSim(q):{simData:"Sim count did not exist in the config"}}))}requestBattleResume(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._networkHandler.resumeBattle()}))}getLoadingScreen(q){const K=new Ot.R;return K.data=Object.assign(Object.assign({},K.data),q),K}initBattlePrefab(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,Z;const J=X.wa5.getActiveScene(),tt=this.leftTeamId,et=this.rightTeamId;J.container.bind("LeftTeamId").toConstantValue(tt),J.container.bind("RightTeamId").toConstantValue(et),J.container.bind("82f-7065").toConstantValue(new kt.w(pt.q.instance.prodigy.education));const it=this.getUnitSpellData(q.state.units,null===(K=q.preload)||void 0===K?void 0:K.spellV2),at=this.preloadUnitSpellIcons(it),rt=this.getBattlePrefab();let ot=yield this._prefabLoader.loadWithDependenciesFromGUID(rt);this._prefabRoot=ot,yield this.loadUnitInfoTooltip(),rt!==nt.l.RevampBattleScene&&(ot=ot.findComponentInChildren(ge.$).GameObject);const ht=ot.findComponent(ge.$);J.addGameObject(this._prefabRoot),this.preloadUnitSpells(it).then((q=>{this._spellRoot=q,ot.addChild(q)})).catch(X.RQr.createHandler("Error preloading unit spells"));const ct=gt.R.loadData(st.r.BattleRevampConstants_json).battleConstants,dt=ot.findComponent(X.bE_);dt.Container.bind(Q.ConstantsDataProvider).toConstantValue({constants:ct}),dt.Container.bind("Constants").to(Q.BattleConstants).asSingleton(),this._battleConstants=dt.Container.get("Constants"),this.leftTeam=dt.getInjectedValue("BattleHomeTeam"),this.leftTeam.setData(tt,q.state.teams[tt],this.getUnitDataForTeam(q,tt)),J.container.bind("LeftTeamUnits").toConstantValue(this.leftTeam.units),this.rightTeam=dt.getInjectedValue("BattleAwayTeam"),this.rightTeam.setData(et,q.state.teams[et],this.getUnitDataForTeam(q,et)),J.container.bind("RightTeamUnits").toConstantValue(this.rightTeam.units),null===(z=q.state.statusEffects)||void 0===z||z.forEach((q=>{var K;null===(K=this.getUnitById(q.unitId))||void 0===K||K.addStatusEffect(q)})),this.shouldNotifyWhenRescueAvailable=this.rightTeam.isRescuable(),this.textLog=dt.getInjectedValue("BattleLog"),ot.findComponentInChildren(Lt.Y).playBgmID(null!==(Y=this._localConfig.backgroundMusicID)&&void 0!==Y?Y:2),ht.battleType=this.type,ht.battleController=this,ht.difficulty=null===(Z=q.state.config)||void 0===Z?void 0:Z.difficulty,ht.onVictory.addOnce((()=>{pt.q.instance.game.broadcaster.broadcast(_t.Ii.Victory)})),this.registerBattleEndHandlers(ht),yield Promise.all([at,this.leftTeam.awaitUnitsLoaded(),this.rightTeam.awaitUnitsLoaded(),this.setupBattleBackgrounds()]),this.battleResult=ht.battleResult,this.mapRoot=ht.mapRoot,this._stateMachine=ht,this._stateMachinePromise.resolve(ht),this._stateMachine.onStateChange.add(this.handleStateChange,this),this.initBattleStats(),this._stateMachine.stateUpdateQueue.push(...this.processBattleStateUpdates(q.updates));const lt=this._prefabLoader.loadFromGUID(nt.l.RescueAvailableSequence);this._rescueAvailableSequence=null==lt?void 0:lt.findComponentInChildren(ie.N)}))}registerBattleEndHandlers(q){const K=pt.q.instance.prodigy.gameContainer.get("782-c308"),z=q=>{(0,It.G)(ut.Q).enabled&&(0,yt.u)(K,K.kennel.getPets()),q()};q.onVictory.addOnce((()=>z(this._localConfig.onVictory))),q.onDefeat.addOnce((()=>z(this._localConfig.onDefeat))),q.onEscape.addOnce((()=>z(this._localConfig.onEscape)))}setupBattleBackgrounds(){return(0,Y.sH)(this,void 0,void 0,(function*(){let q;if("string"==typeof this._localConfig.backgroundID){const K=this._prefabRoot.findComponent(X.BSH);q=K.onMapLoaded.asPromise(),K.loadMap(this._localConfig.backgroundID)}else q=Promise.all(this._localConfig.backgroundID.map(((q,K)=>(0,Y.sH)(this,void 0,void 0,(function*(){const z=new X._mx(this._prefabRoot);z.layer=0===K?"backgroundImage":"foregroundImage";const Y=z.addComponent(X.XVE);0!==K&&(this._foregroundTransform=Y);const Q=z.addComponent(wt._);yield Q.setAsset(q),Q.sizeToSourceImage()})))));return q}))}startStateMachine(){this._foregroundTransform&&(this.setZoom(this._paintedBackgroundZoomConfigs.bgStartScale,this._paintedBackgroundZoomConfigs.fgStartScale),window.setTimeout((()=>this.zoomCamera(this._paintedBackgroundZoomConfigs.bgStartScale,this._paintedBackgroundZoomConfigs.bgEndScale,this._paintedBackgroundZoomConfigs.fgStartScale,this._paintedBackgroundZoomConfigs.fgEndScale,this._paintedBackgroundZoomConfigs.duration)),this._paintedBackgroundZoomConfigs.delay)),this._stateMachine.goToStart()}resumeLastBattleState(q){this._stateMachine.goToState(be,q)}getUnitSpellData(q,K=[]){const z=new Set(K);for(const Y of Object.values(q))for(const q of Y.spells)z.add(q.spellId);return Array.from(z.values()).map((q=>this._gameDataProvider.getItem("spellV2",q))).map((q=>this.applyExperimentOverrides(q)))}getTotalTeamDamagePercentage(q,K=!1){let z=!1;if(K){const K=this._stateMachine.stateUpdateQueue.find((q=>q.type===Q.EBattleStateUpdate.EndBattle));K&&K.victoriousTeamId!==q&&(z=!0)}const Y=this.getUnits().filter((K=>K.data.teamId===q)),X=Y.reduce(((q,K)=>q+K.data.health.max),0),Z=Y.reduce(((q,K)=>q+K.data.health.current),0);return z?1:1-Z/X}applyExperimentOverrides(q){var K;return(null===(K=null==q?void 0:q.metadata)||void 0===K?void 0:K.experiments)?(q.metadata.experiments.filter((q=>{const K=this._featureProvider.getFeatureValue(q.featureName);return bt.A.traverseIfObject(K,q.featureVariable)})).forEach((K=>{var z,Y;Object.keys(null!==(z=K.data)&&void 0!==z?z:[]).forEach((z=>{q.data[z]=Object.assign(q.data[z],K.data[z])})),Object.keys(null!==(Y=K.metadata)&&void 0!==Y?Y:[]).forEach((z=>{q.data[z]=Object.assign(q.metadata[z],K.metadata[z])}))})),q):q}preloadUnitSpellIcons(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y;const Q=[];for(const X of q){const q=(null===(Y=null===(z=null===(K=null==X?void 0:X.metadata)||void 0===K?void 0:K.assets)||void 0===z?void 0:z.icon)||void 0===Y?void 0:Y.assetKey)?Ht.$.capitalizeFirstLetter(X.metadata.assets.icon.assetKey):null;bt.A.isDefined(rt.q[q])&&Q.push(rt.q[q],rt.q[`${q}_cooldown`])}return new Promise(((q,K)=>{pt.q.instance.prodigy.load.assets(Q,((z,Y)=>{Y?q():K(new Error(`App.instance.prodigy.load failed for assets ${Q.join(", ")}`))}))}))}))}preloadUnitSpells(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=new X._mx;K.name="SpellRoot";return K.addComponent(X.dLy).setPositionX(this._battleVisualCenterPositionX),yield Promise.all(q.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y,Q,X;const Z=null===(Q=null===(Y=null===(z=null==q?void 0:q.metadata)||void 0===z?void 0:z.assets)||void 0===Y?void 0:Y.default)||void 0===Q?void 0:Q.assetKey,J=`${Ht.$.capitalizeFirstLetter(Z)}_spell`,tt=null!==(X=bt.A.isDefined(Z)?ot.z[J]:void 0)&&void 0!==X?X:ot.z.Spell_storm_ioncannon_single_spell,et=K.addComponent(Ft.o,!1);this._spellComponents.set(`${q.ID}`,et),et.spellGUID=tt,yield new Promise(((q,K)=>{pt.q.instance.prodigy.load.assets([tt],(()=>{pt.q.instance.game.cache.getJSON(tt)?q():K(new Error(`${J} - ${tt} not loaded, does it exist in ESpellGameAssets?`))}))})),et.create(),et.postCreate(),yield et.preloadAssets()}))))),K}))}initBattleStats(){this.battleStats=new St.g,this.battleStats.type=dt.gu.Basic,this.battleStats.startTime=pt.q.instance.prodigy.timeManager.getServerTimeMs(),this.battleStats.endTime=St.g.INVALID_TIME,this.battleStats.consumablesUsed=[],this.battleStats.enemySpellsCast=0,this.battleStats.energyCost=0,this.battleStats.epicAttack=null,this.battleStats.spellsCast=0,this.battleStats.spellsFailed=0,this.battleStats.pets=[],this.battleStats.petsRescued=[]}onStartBattle(){return(0,Y.sH)(this,arguments,void 0,(function*(q=!0){pt.q.instance.prodigy.gameContainer.get("782-c308").saveEnabled=!1,this.applyModifiers(),this.getUnits().filter((q=>(null==q?void 0:q.type)===dt.uj.Wizard)).forEach(this.remapStandAnimation);const K=[];K.push(this.leftTeam.teleportIn()),K.push(this.rightTeam.teleportIn()),yield X.Egh.timeout(2e3),yield this.playIntroSequence(),q&&(yield this.setSpellBookVisible(!0)),this.getUnits().forEach((q=>{q.uiContent.findComponent(xt.x).startTween(),q.ultimatesUi&&this.type===dt.gu.Ultimates&&q.ultimatesUi.GameObject.findComponent(xt.x).startTween()})),this.setupUnitTooltip(),yield Promise.all(K)}))}highlightRescuableUnits(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this.getTeam(Xt.h.Away).units.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return q.updateRescuableUI()}))));yield Promise.all(q)}))}onResumeBattle(){return(0,Y.sH)(this,void 0,void 0,(function*(){pt.q.instance.prodigy.gameContainer.get("782-c308").saveEnabled=!1,this.applyModifiers(),this.getUnits().filter((q=>(null==q?void 0:q.type)===dt.uj.Wizard)).forEach(this.remapStandAnimation);const q=[];this.getUnits().forEach((K=>q.push(K.enterBattle(!1,!0)))),yield this.setSpellBookVisible(!0),this.setupUnitTooltip(),this.highlightRescuableUnits().catch((q=>X.RQr.logError(q,"Error: Could not highlight rescuable units"))),yield Promise.all(q)}))}playIntroSequence(){return(0,Y.sH)(this,void 0,void 0,(function*(){pt.q.instance.prodigy.audio.playSFXFromGUID(et.B.Sfx_vs_animation),this._stateMachine.introAnimator.GameObject.active=!0,yield(0,Et.ye)(this._stateMachine.introAnimator,"vs")}))}applyModifiers(){const q=X.wa5.getActiveScene().container.get("Modifiers");for(const K of q)switch(K.type){case ct.z.TurnTimer:K.teamId===this.leftTeamId&&this.useTurnTimer(1e3*K.seconds)}}remapStandAnimation(q){var K,z,Y,Q,Z,J;const tt=(null===(Q=null===(Y=null===(z=null===(K=q.creature)||void 0===K?void 0:K.creatureGameObject)||void 0===z?void 0:z.findComponentInChildren(ee.O,!0))||void 0===Y?void 0:Y.spineAnimator)||void 0===Q?void 0:Q.spine)||(null===(J=null===(Z=q.creature)||void 0===Z?void 0:Z.creatureGameObject)||void 0===J?void 0:J.findComponentInChildren(X.v2j,!0));null==tt||tt.addAnimationRemap(Tt.$.STAND,Tt.$.STOP_HEAVY)}zoomCamera(q,K,z,Y,Q){const Z={progress:0};pt.q.instance.game.tweens.create(Z,this,!0).to({progress:1},Q,X.GS3.Quadratic.InOut).start().onUpdate.add((()=>{this.setZoom(X.cj9.linear(q,K,Z.progress),X.cj9.linear(z,Y,Z.progress))}))}setZoom(q,K){var z;X.i7d.main.GameObject.transform.setScale(1/q),null===(z=this._foregroundTransform)||void 0===z||z.setScale(K)}processBattleStateUpdates(q){return q}onPlayerAction(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this._networkHandler.doBattleAction(q,this.battleId),z=yield this.handleWaitingMessage(K),Y=this.processBattleStateUpdates(z);return this.updateBattleStats(q,Y),Y}))}attemptEscape(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._networkHandler.escapeBattle(),K=yield this.handleWaitingMessage(q),z=this.processBattleStateUpdates(K);this._stateMachine.stateUpdateQueue.push(...z),this._stateMachine.goToState(ue.B)}))}handleWaitingMessage(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=X.Egh.timeout(Se.NETWORK_LAG_MESSAGE_DELAY_MS),z=yield Promise.race([q,K]);if(Array.isArray(z))return z;this._stateMachine.isShowingNetworkErrorDialog()||this._stateMachine.showErrorDialog(ge.D.Connection,void 0,!0);const Y=yield q;return this._stateMachine.hideErrorDialog(),Y}))}updateBattleStats(q,K){switch(q.type){case Q.EBattleAction.PowerUp:q.correctAnswer?this.battleStats.spellsCast++:this.battleStats.spellsFailed++;break;case Q.EBattleAction.CastSpell:this.battleStats.spellEnergyCost=1,++this.battleStats.energyCost}}beginEndingBattle(q,K={}){this.beginEndingBattleAndGotoState([de,q],K)}beginEndingBattleAndGotoState(q,K={}){this._forceEndState=q,this.canBattleEndInstantly()?this._stateMachine.goToState(...this._forceEndState):(this._forceEndBattle=!0,K.enablePostBattleFlowExpressMode&&this.enablePostBattleExpressMode(K.forceEndMessageText))}enablePostBattleExpressMode(q){this.postBattleExpressModeController.enable(q).catch(X.RQr.createHandler("Failed to enable express mode on post-battle menus"))}canBattleEndInstantly(){return this._stateMachine&&this.canBattleEndDelayed()&&this._stateMachine.currentState instanceof le.W}isBattleBeingForciblyEndedMidBattle(){return this._forceEndState&&this._stateMachine&&this._stateMachine.currentState instanceof this._forceEndState[0]&&!this.postBattleExpressModeController.hasStarted}canBattleEndDelayed(){var q;return 0===this._stateMachine.stateUpdateQueue.length&&!this.isAnsweringQuestion&&(null===(q=this.activeUnit)||void 0===q?void 0:q.data.teamId)===this.leftTeamId}onEndGame(q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K=!0){var z;const Y=pt.q.instance.prodigy;if(q&&K){const q=null!==(z=this._localConfig.victoryMusicID)&&void 0!==z?z:1;Y.audio.isBGMPlaying(jt.K.getAssetID("bgm",q))||Y.audio.playBGM(q,!0)}this.setUnitTooltipUi(!1),this.hideSpellCards(!0,(()=>{this.setSpellBookVisible(!1).catch(X.RQr.createHandler("Error hiding spell book"))}));const Q=[];for(let X=0;X{q.assetIDs.forEach((q=>{pt.q.instance.prodigy.load.removeSpine(q)}))})),this.onBattleEnded.dispatch()}))}onVictory(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){pt.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(lt.T.WIN_BATTLE,{type:this.type}).catch(X.RQr.createHandler(`Could not send quest event for battle won: ${this.type}`));const Y=pt.q.instance.prodigy.gameContainer.get("73f-58d1");yield Y.refreshMembership();const Q=pt.q.instance.prodigy.gameContainer.get("782-c308");yield Q.updateChargedLevelsData(),yield this.showBattleResult(!1,q,K,z,!0)}))}onDefeat(){return(0,Y.sH)(this,arguments,void 0,(function*(q=!1){const K=Qt.S.isPostLossFlowAvailable(this.type);K||q||!Kt.k.useRevisedDifficulty||(yield this.showDefeatedDialogue()),this._forceEndBattle&&(this._forceEndBattle=!1,this._stateMachine.goToState(...this._forceEndState)),K&&(yield this.showBattleResult(!0,void 0,void 0,void 0,!1))}))}onEscape(){return(0,Y.sH)(this,void 0,void 0,(function*(){}))}handleBattleStartError(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return!0}))}completeBattle(q,K,z){this._stateMachine.completeBattle(q,void 0,null==K?void 0:K.rewardsScalar,z)}getTeam(q){return[this.leftTeam,this.rightTeam][q]}getTeamById(q){return this.leftTeamId===q?this.leftTeam:this.rightTeamId===q?this.rightTeam:void 0}getUnits(){return[...this.leftTeam.units,...this.rightTeam.units]}getUnitById(q){return this.getUnits().find((K=>K.battleId===q))}deactivateTurnIndicator(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=this._stateMachine.turnIndicator;K.GameObject.active&&(K.OnAnimationComplete.removeAll(K.playAnimation),K.playAnimation(Se.TURN_INDICATOR_DEACTIVATE_ANIMATIONS[(null===(q=this._activeUnit)||void 0===q?void 0:q.size)||Xt.X.Normal],!1,!0),yield K.OnAnimationComplete.asPromise(),K.GameObject.active=!1)}))}setActiveUnit(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y;if(!this._spellCardsHidden){null===(K=this.spellCardsController)||void 0===K||K.hidePetRescue();const q=new X.bnh;this.hideSpellCards(!0,q.resolve),yield q.catch(X.RQr.createHandler("Error: Could not clean up battle revamp unit ui"))}if(this._previousUnitId=null===(z=this._activeUnit)||void 0===z?void 0:z.battleId,this._activeUnit=q,q){q.creature.isOpponent||(this.showSpellCards(!0,!1),yield this.spellCardsController.onUiReady.asPromise()),yield this.setUnitIndicator(q);const K=this.getTeam(Xt.h.Away).units.filter((q=>q.isInARescuableState()));let z=[],Q=[];this.isRescueAvailable(!1)&&!q.creature.isOpponent&&(z=Wt.D.filterForNewlyRescuable(K),z.length>0&&(Q=z,this.hideVisibleUnitTooltips(),this._isHighlightingRescue=!0,yield null===(Y=this._rescueAvailableSequence)||void 0===Y?void 0:Y.startSequence(Q,this.textLog),this.shouldNotifyWhenRescueAvailable=!1,this._isHighlightingRescue=!1));const X=this.getUnits().find((q=>q.battleId===this._previousUnitId));this._showIndicator&&(q.creature.isOpponent&&!(null==X?void 0:X.creature.isOpponent)?this.textLog.showMessage("BATTLE_REVAMP_ENEMY_TURN"):q.creature.isOpponent||(this.isRescueAvailable()&&this.shouldNotifyWhenRescueAvailable?(this.textLog.showMessage("BATTLE_REVAMP_RESCUE_AVAILABLE"),this.shouldNotifyWhenRescueAvailable=!1):q.currentMp>0&&((null==X?void 0:X.creature.isOpponent)||!X)&&this.textLog.showMessage("BATTLE_REVAMP_YOUR_TURN"))),this.getTeam(Xt.h.Away).units.filter((q=>!Q.includes(q))).forEach((q=>{q.updatePetRescueTooltip()})),z.forEach((q=>{Wt.D.sendPetRescueAvailableEvent(q)}))}}))}setUnitIndicator(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;const Y=this._stateMachine.turnIndicator,Q=q.GameObject.transform.worldPosition;q.turnIndicatorOffset&&(Q.x+=q.turnIndicatorOffset.x,Q.y+=q.turnIndicatorOffset.y),(null===(K=Y.GameObject.transform.worldPosition)||void 0===K?void 0:K.x)===Q.x&&(null===(z=Y.GameObject.transform.worldPosition)||void 0===z?void 0:z.y)===Q.y&&this._stateMachine.turnIndicator.GameObject.active||(yield this.deactivateTurnIndicator(),Y.GameObject.transform.setPosition(Q.x,Q.y),Y.GameObject.active=this._showIndicator,this._showIndicator&&(Y.playAnimation(Se.TURN_INDICATOR_ACTIVATE_ANIMATIONS[q.size],!1,!0),Y.OnAnimationComplete.addOnce((()=>{Y.playAnimation(Se.TURN_INDICATOR_IDLE_ANIMATIONS[q.size],!0)}),Y.playAnimation),yield Promise.race([Y.spine.waitForEvent(ve.ConcurrentPlay),Y.OnAnimationComplete.asPromise()])))}))}setSpellBookVisible(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=q?this._stateMachine.spellBookMoveIn:this._stateMachine.spellBookMoveOut;q!==this._spellBookShowing&&(this._spellBookShowing=q,K.startTween(),yield K.onComplete.asPromise())}))}showSpellCards(q,K=!0){var z;if(this._spellCardsHidden=!1,!this.spellCardsPrefab){this.spellCardsPrefab=this._prefabLoader.loadFromGUID(nt.l.RevampActionMenu),this.spellCardsController=this.spellCardsPrefab.findComponentInChildren(se.b),this._battleTargetControllerComponent=this.spellCardsPrefab.findComponentInChildren(te.F),this.spellCardsController.getSpellCards().forEach((q=>{const K=q.findComponentInChildren(Zt.y);K&&this._spellCardBattleActionData.push(K)}));const q=this.spellCardsController.petRescueCard.findComponentInChildren(Zt.y);q&&this._spellCardBattleActionData.push(q)}this.spellCardsController.onUiReady.removeAll(),this._spellCardBattleActionData.forEach((q=>q.initialize())),null===(z=this._battleTargetControllerComponent)||void 0===z||z.initialize(),q?this.spellCardsController.tweenSpellCards(!0,K):(this.spellCardsController.onUiReady.dispatch(!0,!1),this.spellCardsController.inputBlocker.active=!1)}updateSpellCards(){this.hideSpellCards(!1,(()=>{this.showSpellCards(!1)}))}hideSpellCards(q,K){this._spellCardsHidden=!0,this.onSpellCardsRemoved.dispatch(),this.spellCardsPrefab?q?(this.spellCardsController.targetController.dismissActionTooltips(0,null),K&&this.spellCardsController.onUiReady.addOnce(K),this.spellCardsController.tweenSpellCards(!1)):(this.spellCardsController.onUiReady.dispatch(!1,!1),null==K||K()):null==K||K()}showUnitTooltip(q){if(this._isUnitTooltipLocked)return;const K=this.getUnits().find((K=>K.battleId===q));this.showUnitInfoTooltip(K)}hideVisibleUnitTooltips(){this.setVisibleUnitInfoTooltip(null)}setUnitTooltipUi(q){this._isUnitTooltipLocked||(this.hideVisibleUnitTooltips(),this.getUnits().forEach((K=>{q&&K.isAlive()?K.setUnitTooltipTriggerEnabled(!0):K.setUnitTooltipTriggerEnabled(!1)})))}updateInteractionPointerForUnits(){this.getUnits().forEach((q=>{q.showAsInteractive(this._isChoosingSpell&&(null==q?void 0:q.isAlive())&&!this._isUnitTooltipLocked)}))}setUnitTooltipLock(q){this._isUnitTooltipLocked=!1,this.setUnitTooltipUi(!q),this._isUnitTooltipLocked=q,this.updateInteractionPointerForUnits()}isUnitTooltipLocked(){return this._isUnitTooltipLocked}setupUnitTooltip(){this.onSpellCardSelected.add(this.setUnitTooltipUi.bind(this,!1)),this.onSpellCardUnselected.add(this.setUnitTooltipUi.bind(this,!0)),this.onSpellTargetChosen.add(this.setUnitTooltipUi.bind(this,!0)),this._isUnitTooltipLocked||this.setUnitTooltipUi(!0)}useTurnTimer(q){this.onChoosingSpell.removeAll(this),this.onChoosingSpell.add((()=>{this.activeUnit.showCasterWaitingMessage(q),this.activeUnit.onTurnTimerExpired.addOnce((()=>{this.activeUnit.onSelectSpell(null),this.spellCardsController.targetController.hideTargets(),this.hideSpellCards(!0),this._stateMachine.goToState(me.N,{type:Q.EBattleAction.Fumble})}),this)}),this);const K=()=>{var q,K;null===(q=this.activeUnit)||void 0===q||q.hideWaitingMessage(),null===(K=this.activeUnit)||void 0===K||K.onTurnTimerExpired.removeAll(this)};this.onSpellTargetChosen.add(K),this.onSpellCardsRemoved.add(K)}showBattleResult(q,K,z,Z){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z,Y,Z=!0){var tt,et;const it=null!==(tt=null==Y?void 0:Y.rewardsScalar)&&void 0!==tt?tt:1,st=this.getEarnedXP();$t.R.addDebugMessage("\nNon-member rewards:\n");const nt=this.getScalableBattleDrops();K&&K.length>0&&nt.push(...K.map((q=>({type:q.type,ID:q.ID,N:q.quantity,isSecure:!!q.isSecure}))));const at=this.getNonScalableBattleDrops(),rt=$t.R.bucketRewards([...$t.R.bucketAndScaleRewards(nt,it),...at]);$t.R.addDebugMessage("\nMember rewards:\n");const ot=this.getScalableMemberBattleDrops();z&&z.length>0&&ot.push(...z.map((q=>({type:q.type,ID:q.ID,N:q.quantity}))));const ht=this.getNonScalableMemberBattleDrops(),ct=$t.R.bucketRewards([...$t.R.bucketAndScaleRewards(ot,it),...ht]);$t.R.outputDebugMessages();const lt=new X.bnh;this.battleResult.onClosed.add((()=>{lt.resolve(),this._forceEndBattle&&(this._forceEndBattle=!1,this._stateMachine.goToState(...this._forceEndState))})),this.battleResult.onStarted.addOnce((q=>{const K=q.findComponentInChildren(Yt.D);this.postBattleExpressModeController.setPostBattleFlowManager(K)}));const ut=this.getTeam(Xt.h.Away).units.map((q=>q.data)),ft=J().orderBy(ut,[q=>q.type===dt.uj.Boss?1:0,q=>q.level,q=>{var K;return null!==(K=q.mergeRank)&&void 0!==K?K:0}],["desc","desc","desc"])[0],bt={enemyElementWeakness:null!==(et=this.battleConstants.getElementalWeakness(ft.element))&&void 0!==et?et:Q.EElementType.Astral};return this.battleResult.show(this.getUnitsToAward(),Z,this.type,{xpGained:st,rewards:rt,memberRewards:ct,rewardsScalingInfo:Y,rescuablePets:this.postBattleRescuablePets,skipChests:q,magicoinRewardGranted:this.magicoinRewardGranted},bt),lt}))}getEarnedXP(){var q,K;return null!==(K=null===(q=this.awardedXpData)||void 0===q?void 0:q.xpGained)&&void 0!==K?K:{baseXp:0,memberXp:0,totalNonMemberXp:0}}getUnitsToAward(){var q;return(null===(q=this.awardedXpData)||void 0===q?void 0:q.unitsToAward.length)>0?this.awardedXpData.unitsToAward:this.leftTeam.units.map((q=>q.battleId))}getUnitDataForTeam(q,K){return Object.keys(q.state.units).reduce(((z,Y)=>{const Q=q.state.units[Y];return Q.teamId===K&&(Q.unitId||(Q.unitId=Y),z.push(Q)),z}),[])}getGuaranteedDrops(){var q;const K=[],z=[],Y=null===(q=this._localConfig.guaranteedDrops)||void 0===q?void 0:q.filter(bt.A.isDefined);if(bt.A.isDefined(Y)){let q;for(let Q=0;Q0&&K.push(z[0]),this.debugCurrencyDrops("guaranteed drops",K),K}getScalableBattleDrops(){const q=pt.q.instance.prodigy.world.getCurrentZone(),K=pt.q.instance.prodigy.gameContainer.get("119-35f9").getMultiplier(q,qt.R.Currency),z=pt.q.instance.prodigy.world.getCurrentCurrency(),Y=zt.Q.getMemberJarDropData(),Q=this.getDropsFromMemberJarData(Y.nonMemberDrops,z,K);return this._localConfig.scaleGuaranteedDrops&&Q.push(...this.getGuaranteedDrops()),Q}getNonScalableBattleDrops(){return this._localConfig.scaleGuaranteedDrops?[]:this.getGuaranteedDrops()}getScalableMemberBattleDrops(){const q=[];pt.q.instance.prodigy.world.getCurrentZone()===ft.A_.ARCHIVES&&q.push({type:"gold",N:150});const K=pt.q.instance.prodigy.world.getCurrentCurrency(),z=zt.Q.getMemberJarDropData(),Y=this.getDropsFromMemberJarData(z.memberDrops,K,1);return q.push(...Y),q}getNonScalableMemberBattleDrops(){return[]}getDropsFromMemberJarData(q,K,z){const Y=[],Q=this.rightTeam.units.length;if(q.goldPerEnemy>0){const K=q.goldPerEnemy*Q*z;$t.R.addDebugMessage(`Gold per enemy total: ${K}`),Y.push({type:"gold",N:K})}if(q.gold>0){const K=q.gold*z;$t.R.addDebugMessage(`Gold: ${K}`),Y.push({type:"gold",N:K})}if(bt.A.isDefined(K)&&1!==K&&q.zoneCurrency>0){const Q=q.zoneCurrency*z;$t.R.addDebugMessage(`Zone Currency ID ${K}: ${Q}`),Y.push({type:"currency",ID:K,N:Q})}if(q.festivalCurrencyPerEnemy>0||q.festivalCurrency>0){pt.q.instance.prodigy.skin.getActiveFestivals().forEach((K=>{const z=mt.t.getItemDrops(K.getBattleDrops(Q,q.festivalCurrencyPerEnemy,q.festivalCurrency));Y.push(...z)}))}return Y}getDefeatData(){return this._localConfig.defeatData}showDefeatedDialogue(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=new At.rD(pt.q.instance.game);q.addEvents([{dialogueData:q.dataProvider.get(1535),type:At.fA.DEFAULT,blockInput:!0}]);const K=new X.bnh;return q.start(!0,(()=>{K.resolve()})),K}))}alertActiveUnitMpEmpty(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this._activeUnit.alertMpEmpty()}))}castActionResultsDisplayTriggered(){}getStateOverride(q){return this._forceEndBattle&&this.canBattleEndDelayed()?(this._forceEndBattle=!1,this._forceEndState):null}isRescueAvailable(q=!0){return!!this._activeUnit.spells.some((q=>q.spellId===this.battleConstants.rescueSpellId))&&(!!this.rightTeam.isRescuable()&&(!!this.getUnits().some((q=>q.isInARescuableState()))&&(!q||this._activeUnit.currentMp>0)))}isRescueInSpellPool(){return this.getUnits().some((q=>q.hasAccessToSpell(this.battleConstants.rescueSpellId)))}moveUnitToTeam(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){var Z,J;const tt=q.isAlive(),et=this.getTeamById(K),it=Te.find((q=>qK.setAnimationByName(0,"pet-rescue-front",!1)));const z=new X._mx(q.creature.creatureGameObject).addComponent(X.v2j);z.GameObject.sendToBack(),z.setAsset(ht.Q.Spine_pet_shadow_effect_back_json,(()=>z.setAnimationByName(0,"pet-rescue-back",!1))),yield Promise.all([K.getSpine().onComplete.asPromise(),z.getSpine().onComplete.asPromise(),this.setActiveUnit(null),(()=>(0,Y.sH)(this,void 0,void 0,(function*(){var K;yield X.Egh.timeout(2800),null===(K=q.creature.animator.spine)||void 0===K||K.getSpine().setTint(16777215)})))()]),yield q.playDefeated()}else yield Promise.all([this.setActiveUnit(null),q.playDefeated()]);st.setData(Object.assign(Object.assign({},q.data),{teamId:K}),null!=z?z:q.creature.teleportType),st.loadPromise.then((()=>(0,Y.sH)(this,void 0,void 0,(function*(){if(st.creature.creatureGameObject.active=!1,st.uiContent.active=!1,st.uiContent.findComponent(xt.x).targetComponent.getRootContainer().alpha=0,st.setUnitTooltipTriggerEnabled(!1),tt){if(Q){const q=st.creature.creatureGameObject;q.onActiveChanged.add((()=>{q.active&&(Q(st),q.onActiveChanged.removeAll(this))}),this)}yield st.enterBattle(!0,!this._ignoreUnitEntranceUIWhenMoving)}st.creature.teleportType=nt,st.controllerUnit=at})))).catch(X.RQr.createHandler("Unable to load moved unit")),st.transferStatusEffectData(q),st.updateDisplayedStatusEffects(),st.updateIdleStatusEffect(),st.updatePersistentStatusEffects(),q.clearData();const ct=X.wa5.getActiveScene().container;ct.rebind("LeftTeamUnits").toConstantValue(this.leftTeam.units),ct.rebind("RightTeamUnits").toConstantValue(this.rightTeam.units)}))}addUnitToTeam(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=this.getUnitSpellData({[q.unitId]:q});yield this.preloadUnitSpells(z),yield this.preloadUnitSpellIcons(z);const Z=pt.q.instance.game.state.states.get(Ct.G.SecureBattleRevamp);yield pt.q.instance.prodigy.load.assetsAsPromise(Z.getUnitAssets({[q.unitId]:q}));const J=this.getTeamById(K),tt=we.find((q=>q(0,Y.sH)(this,void 0,void 0,(function*(){et.creature.creatureGameObject.active=!1,et.uiContent.active=!1,et.uiContent.findComponent(xt.x).targetComponent.getRootContainer().alpha=0,et.setUnitTooltipTriggerEnabled(!1),yield et.enterBattle(!0,!this._ignoreUnitEntranceUIWhenMoving),yield et.updateRescuableUI()})))).catch(X.RQr.createHandler("Unable to load added unit"));const it=X.wa5.getActiveScene().container;it.rebind("LeftTeamUnits").toConstantValue(this.leftTeam.units),it.rebind("RightTeamUnits").toConstantValue(this.rightTeam.units)}))}handleStateChange(q){this._isAnsweringQuestion=q instanceof he.o,this._isChoosingSpell=q instanceof le.W,this._isPerformingAction=q instanceof ye.a||q instanceof me.N,this.updateInteractionPointerForUnits()}onRescueCompleted(){this.rightTeam.units.forEach((q=>{q.setNewIndicatorActive(q.isARescuableUnit())}))}onNewRound(q){1===q&&this.highlightRescuableUnits().catch((q=>X.RQr.logError(q,"Error: Could not highlight rescuable units")))}cleanUpSpellCards(){this.spellCardsController=null,this.spellCardsPrefab&&(this.spellCardsPrefab.destroy(),this.spellCardsPrefab=null)}destroy(){var q,K,z;pt.q.instance.prodigy.game.time.events.remove(this._updateTimer),null===(q=this._unitInfoTooltip)||void 0===q||q.GameObject.destroy(),this._stateMachinePromise=null;const Y=X.wa5.getActiveScene();this._prefabRoot&&(Y.removeGameObject(this._prefabRoot),this._prefabRoot.destroy()),this._prefabRoot=null,Y.container.unbind("LeftTeamId"),Y.container.unbind("RightTeamId"),Y.container.unbind("82f-7065"),Y.container.unbind("LeftTeamUnits"),Y.container.unbind("RightTeamUnits"),Y.container.unbind("NetworkHandler"),this.leftTeam=null,this.rightTeam=null,this.battleStats=null,this._rescueAvailableSequence=null,this._stateMachine&&(this._stateMachine.onVictory.removeAll(this),this._stateMachine.onDefeat.removeAll(this),this._stateMachine.onEscape.removeAll(this),this._stateMachine.onStateChange.removeAll(this),this._stateMachine.battleController=null),this.battleResult&&this.battleResult.onClosed.removeAll(this),this.battleResult=null,this._stateMachine=null,this._activeUnit=null,this.mapRoot=null,this._spellComponents.clear(),this.onChoosingSpell.dispose(),this.onSpellCardSelected.dispose(),this.onSpellCardUnselected.dispose(),this.onSpellTargetChosen.dispose(),this.onSpellCardsRemoved.dispose(),this.onBattleEnded.dispose(),this.cleanUpSpellCards(),Wt.D.clearNewlyRescuableUnitsSeen(),null===(K=this.postBattleExpressModeController)||void 0===K||K.destroy(),null===(z=this._statusEffectAnimationController)||void 0===z||z.destroy()}setVisibleUnitInfoTooltip(q){var K,z;if(this.isPerformingAction)return;const Y=null!==(K=null==q?void 0:q.isInARescuableState())&&void 0!==K&&K;q&&Y&&(this._unitInfoTooltip.onPetRescueButtonClicked.removeAll(this),this._unitInfoTooltip.onPetRescueButtonClicked.add((()=>{this.sendUnitTooltipRescueButtonClickedEvent(),this.attemptToRescueUnit(q)}),this)),this.updateWalletDisplay(Y),q&&q.onInfoTooltipHidden.addOnce(this.hideUnitInfoTooltip.bind(this),this),null===(z=this._unitInfoTooltip)||void 0===z||z.showTooltipForUnit(q),this.sendShowUnitTooltipEvent(q)}loadUnitInfoTooltip(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K;const z=yield this._prefabLoader.loadWithDependenciesFromGUID(nt.l.FullUnitInfo);this._unitInfoTooltip=z.findComponent(ne.$),null===(K=null===(q=this._unitInfoTooltip)||void 0===q?void 0:q.onTooltipClosed)||void 0===K||K.addOnce(this.hideUnitInfoTooltip.bind(this),this)}))}onClickUnitTooltip(q){this.isChoosingSpell&&this.showUnitTooltip(q)}showUnitInfoTooltip(q){(null==q?void 0:q.isAlive())&&this.setVisibleUnitInfoTooltip(q),q.updatePetRescueTooltip()}sendShowUnitTooltipEvent(q){var K;const z={interfaceName:Nt.B.BattlePetInfoWidget,interfaceType:Rt.Wm.InfoPanel,instanceType:Dt.N.UI,originType:Rt.$N.ButtonClick};bt.A.isDefined(q)||(z.closeMethod=Rt.Lv.Toggle),null===(K=this._segment)||void 0===K||K.featureCommon.sendInterfaceEvent(z)}sendUnitTooltipRescueButtonClickedEvent(){const q={buttonName:Mt.k.PetRescuePayMagicoin,interfaceName:Nt.B.BattlePetInfoWidget,interfaceType:Rt.Wm.InfoPanel,destinationName:Nt.B.PetRescueAttempt};this._segment.featureCommon.sendButtonEvent(q)}attemptToRescueUnit(q){if(!bt.A.isDefined(q)||!q.isInARescuableState())return;const K=new Vt.a(pt.q.instance.prodigy.game,q),z=q.battleId,Y=()=>{this.onSpellTargetChosen.dispatch(),this.spellCardsController.inputBlocker.active=!0,this._stateMachine.goToState(me.N,{type:Q.EBattleAction.CastSpell,id:this.battleConstants.rescueSpellId,targets:[z]}),q.updatePetRescueTooltip()};K.onRescueContinue.add((()=>{Y(),K.destroy()})),K.onRescueDismissed.add((()=>{K.destroy()})),K.onRescueFailed.add((z=>{var Y,Q,X,Z;z===Vt.n.CannotAfford?(null===(Q=null===(Y=null==this?void 0:this.spellCardsController)||void 0===Y?void 0:Y.targetController)||void 0===Q||Q.showHardCurrencyBalanceTooltip(q.creature),null===(Z=null===(X=null==this?void 0:this.spellCardsController)||void 0===X?void 0:X.targetController)||void 0===Z||Z.onHardCurrencyBalanceTooltipHidden.addOnce((()=>K.onRescueDismissed.dispatch()))):K.destroy()})),K.start()}updateWalletDisplay(q){var K,z;let Y;if(q){Y={currency:27,value:pt.q.instance.prodigy.gameContainer.get("782-c308").getCurrencyAmount(27)}}null===(z=null===(K=this.spellCardsController)||void 0===K?void 0:K.targetController)||void 0===z||z.setHardCurrencyBalanceDisplay(Y)}debugCurrencyDrops(q,K){const z=K.filter((q=>"gold"===q.type||"currency"===q.type)).map((q=>`${q.type} ${q.ID}: ${q.N}`)),Y=z.length>0?z.join(", "):"None";$t.R.addDebugMessage(`${q}:\n${Y}`)}hideUnitInfoTooltip(){this._unitInfoTooltip.onPetRescueButtonClicked.removeAll(this),this.sendShowUnitTooltipEvent(null),this.updateWalletDisplay(!1)}getStartBattleDebug(){const q=pt.q.instance.prodigy.battle,K=[],z=[],Y=[];this.getTeam(Xt.h.Away).units.forEach((q=>{var Q;"pet"===q.data.type&&(K.push(q.data.asset.id),z.push(q.level),Y.push(null!==(Q=q.data.mergeRank)&&void 0!==Q?Q:0))}));const Q=null==q?void 0:q.battleMods;return Q&&(Q.encounter=void 0,Q.maxTeamSize=void 0,Q.minTeamSize=void 0,Q.pets=void 0),`startBattle([${K.join(",")}], [${z.join(",")}], [${Y.join(",")}], ${JSON.stringify(null!=Q?Q:{})})`}}Se.NETWORK_LAG_MESSAGE_DELAY_MS=4e3,Se.TURN_INDICATOR_ACTIVATE_ANIMATIONS={[Xt.X.Small]:pe.SmallActivate,[Xt.X.Normal]:pe.NormalActivate,[Xt.X.Medium]:pe.LargeActivate,[Xt.X.Large]:pe.LargeActivate,[Xt.X.Huge]:pe.LargeActivate},Se.TURN_INDICATOR_IDLE_ANIMATIONS={[Xt.X.Small]:pe.SmallIdle,[Xt.X.Normal]:pe.NormalIdle,[Xt.X.Medium]:pe.LargeIdle,[Xt.X.Large]:pe.LargeIdle,[Xt.X.Huge]:pe.LargeIdle},Se.TURN_INDICATOR_DEACTIVATE_ANIMATIONS={[Xt.X.Small]:pe.SmallDeactivate,[Xt.X.Normal]:pe.NormalDeactivate,[Xt.X.Medium]:pe.LargeDeactivate,[Xt.X.Large]:pe.LargeDeactivate,[Xt.X.Huge]:pe.LargeDeactivate},(0,Y.Cg)([(0,Ut.d)("NetworkHandler"),(0,Y.Sn)("design:type",oe.m)],Se.prototype,"_networkHandler",void 0),(0,Y.Cg)([(0,Bt.b)("9fe-5b45"),(0,Y.Sn)("design:type",Object)],Se.prototype,"_featureProvider",void 0),(0,Y.Cg)([(0,Bt.b)("983-05a7"),(0,Y.Sn)("design:type",X.wNP)],Se.prototype,"_prefabLoader",void 0),(0,Y.Cg)([(0,Ut.d)("GameDataProvider"),(0,Y.Sn)("design:type",re.q)],Se.prototype,"_gameDataProvider",void 0),(0,Y.Cg)([(0,Bt.b)("20f-5f67"),(0,Y.Sn)("design:type",Pt.Y)],Se.prototype,"_segment",void 0),(0,Y.Cg)([(0,Ut.d)("LocalConfig"),(0,Y.Sn)("design:type",Object)],Se.prototype,"_localConfig",void 0)},71790:(q,K,z)=>{"use strict";z.d(K,{T:()=>tt});var Y=z(8674),Q=z(87490),X=z(79687),Z=z(24521),J=z(23029);let tt=class{get constants(){var q,K;return null!==(K=null===(q=J.R.loadData(Z.r.BattleRevampConstants_json))||void 0===q?void 0:q.battleConstants)&&void 0!==K?K:(new Q.HardCodedConstantsDataProvider).constants}};tt=(0,Y.Cg)([(0,X.injectable)()],tt)},80494:(q,K,z)=>{"use strict";var Y;z.d(K,{t:()=>Y}),function(q){q.BattleAcademyClassroomIceTower="battle-academy-classroom-icetower",q.BattleAcademyClassroom="battle-academy-classroom",q.BattleAcademyGh="battle-academy-gh",q.BattleAcademyGhStairs="battle-academy-gh-stairs",q.BattleAcademyOfficeIceTower="battle-academy-office-icetower",q.BattleAcademyOffice="battle-academy-office",q.BattleArchives="battle-archives",q.BattleBonfireInside="battle-bonfire-inside",q.BattleBonfireLava="battle-bonfire-lava",q.BattleBonfireOutside="battle-bonfire-outside",q.BattleBonfireTitan="battle-bonfire-titan",q.BattleForestGeneric="battle-forest-generic",q.BattleForestOutside="battle-forest-outside",q.BattleLamplightOutside="battle-lamplight-outside",q.BattleLamplightOutsidePumpkinFest="battle-lamplight-outside-pumpkinfest",q.BattleLamplightOutsidePumpkinFestNight="battle-lamplight-outside-pumpkinfest-night",q.BattleLamplightOutsideSpringfest="battle-lamplight-outside-springfest",q.BattleLamplightOutsideWinterfest="battle-lamplight-outside-winterfest",q.BattleLamplightOutsideSummerfest="battle-lamplight-outside-summerfest",q.BattleLamplightOutsideStarlight="battle-lamplight-outside-starlight",q.BattleMoon="battle-moon",q.BattleMoonlight="battle-moonlight",q.BattleShipwreckInside="battle-shipwreck-inside",q.BattleShipwreckOutside="battle-shipwreck-outside",q.BattleShipwreckUnderwater="battle-shipwreck-underwater",q.BattleShiverchillInside="battle-shiverchill-inside",q.BattleShiverchillOutside="battle-shiverchill-outside",q.BattleSkywatchInside="battle-skywatch-inside",q.BattleSkywatchOutside="battle-skywatch-outside",q.BattleTowerInside="battle-tower-inside",q.BattleGrotto="battle-grotto"}(Y||(Y={}))},81531:(q,K,z)=>{"use strict";z.d(K,{q:()=>X});var Y=z(95891),Q=z(77938);class X{constructor(q){this._overrides=null!=q?q:{}}getItem(q,K){var z;const X=Q.t.getItem(q,K),Z=null===(z=this._overrides[q])||void 0===z?void 0:z[`${K}`];return Y.merge({},X,Z)}}},17710:(q,K,z)=>{"use strict";z.d(K,{D:()=>rt});var Y=z(91323),Q=z(87490),X=z(62459),Z=z(88022),J=z(43523),tt=z(25531),et=z(29738),it=z(43846),st=z(77938),nt=z(76277),at=z(30226);class rt{static formatStatusEffectDescription(q,K,z){const Q=rt.getTargetReplacementString(z),X=et.O.isEnglishLocale()?(0,Y.t)("turn",K):(0,it.k)("STATUS_EFFECT_TURNS");return tt.w.replaceMultiple(q,["{NUMBER_OF_TURNS}","{TURNS}","{TARGET}"],K,X,Q)}static getStatusEffectInjectedValues(q){var K,z,Y;!1===(0,nt.G)(J.P)&&(q.statusEffects=[]);const Q=null===(K=q.statusEffects)||void 0===K?void 0:K[0],tt=null==Q?void 0:Q.statusEffectId;if(!X.Aq$.isDefined(tt))return{SPELL_HAS_STATUS_EFFECT:!1};const et=st.t.getItem("statusEffect",tt),ot=null==et?void 0:et.data,ht=null!==(Y=null===(z=null==Q?void 0:Q.duration)||void 0===z?void 0:z.remainingDuration)&&void 0!==Y?Y:0,ct=et?at.J.getItemName(et):"",dt=et?(0,it.k)(at.J.getLocalizationFlavorKey(et)):"";return{SPELL_HAS_STATUS_EFFECT:!0,SPELL_STATUS_EFFECT_NAME:ct,SPELL_STATUS_EFFECT_DESCRIPTION:rt.formatStatusEffectDescription(dt,ht),SPELL_STATUS_EFFECT_ICON:[Z._.Ui_spell_effect_icons_json,ot.icon]}}static getTargetReplacementString(q){switch(null==q?void 0:q.statGrowthTrackName){case Q.EStatGrowthTrackName.Boss:case Q.EStatGrowthTrackName.IllusionBoss:case Q.EStatGrowthTrackName.PuppetMaster:return(0,it.k)("TARGET_BOSS");case Q.EStatGrowthTrackName.Miniboss:case Q.EStatGrowthTrackName.Pippet:return(0,it.k)("TARGET_MINIBOSS");case Q.EStatGrowthTrackName.Wizard:case Q.EStatGrowthTrackName.HoodedWizard:return(0,it.k)("TARGET_WIZARD");case Q.EStatGrowthTrackName.DragonBoss:return(0,it.k)("TARGET_DRAGON");default:return(0,it.k)("TARGET_PET")}}}},23506:(q,K,z)=>{"use strict";z.d(K,{V:()=>X});var Y=z(62459),Q=z(59685);class X{static getBotPersonalityInstanceConfig(q,K){var z;const Q=this.globalDuelBotPersonalityConfig.streakConfig.reduce(((q,K)=>K.playerStreak>q?K.playerStreak:q),-1/0),X=this.globalDuelBotPersonalityConfig.streakConfig.reduce(((q,K)=>K.playerStreakq.playerStreak===Z)))&&void 0!==z?z:this.globalDuelBotPersonalityConfig.streakConfig[0],tt=this.globalDuelBotPersonalityConfig.timingsConfig;return{timings:{questionAnswer:{timings:{average:Y.cj9.random(tt.questionAnswer.timings.average.min,tt.questionAnswer.timings.average.max),variance:tt.questionAnswer.timings.variance},maxTimeOverPlayer:tt.questionAnswer.maxTimeOverPlayer},spellChoiceTimings:{average:Y.cj9.random(tt.spellChoiceTimings.average.min,tt.spellChoiceTimings.average.max),variance:tt.spellChoiceTimings.variance}},streakModifiers:J,personalityType:q}}}X.GLOBAL_DUEL_BOT_TIME_CONFIG={questionAnswer:{timings:{average:{min:15,max:35},variance:.3},maxTimeOverPlayer:8},spellChoiceTimings:{average:{min:4,max:8},variance:.3}},X.GLOBAL_DUEL_BOT_STREAK_BASED_CONFIG=[{playerStreak:-2,questionAnswerPenalty:.66,levelOffset:-3,streakOffset:0,elementalPrep:Q.E.Dumb},{playerStreak:-1,questionAnswerPenalty:.33,levelOffset:-2,streakOffset:0,elementalPrep:Q.E.Dumb},{playerStreak:0,questionAnswerPenalty:.25,levelOffset:-1,streakOffset:0,elementalPrep:Q.E.Dumb},{playerStreak:1,questionAnswerPenalty:.25,levelOffset:0,streakOffset:0,elementalPrep:Q.E.Dumb},{playerStreak:2,questionAnswerPenalty:.2,levelOffset:0,streakOffset:0,elementalPrep:Q.E.Ok},{playerStreak:3,questionAnswerPenalty:.15,levelOffset:0,streakOffset:1,elementalPrep:Q.E.Ok},{playerStreak:4,questionAnswerPenalty:.1,levelOffset:1,streakOffset:1,elementalPrep:Q.E.Smart},{playerStreak:5,questionAnswerPenalty:.1,levelOffset:1,streakOffset:2,elementalPrep:Q.E.Smart},{playerStreak:6,questionAnswerPenalty:.05,levelOffset:2,streakOffset:3,elementalPrep:Q.E.Tricky},{playerStreak:7,questionAnswerPenalty:.05,levelOffset:3,streakOffset:4,elementalPrep:Q.E.Tricky},{playerStreak:8,questionAnswerPenalty:0,levelOffset:4,streakOffset:5,elementalPrep:Q.E.Reversed}],X.globalDuelBotPersonalityConfig={timingsConfig:X.GLOBAL_DUEL_BOT_TIME_CONFIG,streakConfig:X.GLOBAL_DUEL_BOT_STREAK_BASED_CONFIG}},39070:(q,K,z)=>{"use strict";z.d(K,{i:()=>st});var Y=z(8674),Q=z(62459),X=z(88541),Z=z(35120),J=z(71586),tt=z(30226),et=z(4845);class it extends et.P{validateRoom(q){return super.validate({room:q.room,inSchoolHours:q.inSchoolHours,playerLevel:q.player.getLevel(),isMember:q.isMember,numBattlesUsed:q.numBattlesUsed},[()=>this.meetsEntryCostRequirement(q.room,q.player)])}meetsEntryCostRequirement(q,K){if(!q.entryCost)return{eligible:!0};const z=Array.isArray(q.entryCost)?q.entryCost:[q.entryCost],Y=z.every((q=>{var z,Y;return"gold"===q.type?K.getGold()>=q.amount:(null===(Y=K.backpack.getItem(q.type,null!==(z=q.id)&&void 0!==z?z:-1))||void 0===Y?void 0:Y.N)>=q.amount}));return this._noEntryCostKeys.tooltip.body.args=[z[0].amount,z[0].type],this.getEligibilityObject(Y,et.R.NoEntryCost)}}class st{static getValidatedRoomsConfig(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=X.GM;K.rooms=K.rooms.filter((q=>q.active));const z=Z.q.instance.prodigy.gameContainer.get("78c-f116"),Y=yield z.getDailyDuelUses(),et=J.R.getNowWithServerTimezoneOffset(),st=new it(Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService)),nt=K.rooms.map((K=>{var z,Q;return Object.assign(Object.assign(Object.assign({},K),st.validateRoom({room:K,player:q,inSchoolHours:tt.J.isDateWithinSchoolHours(et)&&tt.J.isSchoolDay(et),isMember:q.hasMembership(),numBattlesUsed:null!==(z=Y[K.id])&&void 0!==z?z:0})),{numBattlesUsed:null!==(Q=Y[K.id])&&void 0!==Q?Q:0})}));return Object.assign(Object.assign({},K),{rooms:nt})}))}}},75408:(q,K,z)=>{"use strict";z.d(K,{d:()=>gt});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z(88022),tt=z(99625),et=z(36648),it=z(88541),st=z(4845),nt=z(35120),at=z(43846),rt=z(73797),ot=z(23082),ht=z(13956),ct=z(64353),dt=z(95057),lt=z(31211),ut=z(6719),ft=z(47255),bt=z(52491),pt=z(64007),vt=z(39070);!function(q){q.PlayerPosition="PLAYER_POSITION",q.OnClose="ON_CLOSE",q.RoomsData="ROOMS_DATA",q.BackingColor="BACKING_COLOR",q.HeaderImage="HEADER_IMAGE",q.HeaderTextColor="HEADER_TEXT_COLOR",q.RoomName="ROOM_NAME",q.IsFindMatchDisabled="IS_FIND_MATCH_DISABLED",q.IsRoomCardDisabled="IS_ROOM_CARD_DISABLED",q.IsLockedLevel="IS_LOCKED_LEVEL",q.IsLockedTime="IS_LOCKED_TIME",q.LockBarColor="LOCK_BAR_COLOR",q.LockMessage="LOCK_MESSAGE",q.BorderColor="BORDER_COLOR",q.ContentBackingColor="CONTENT_BACKING_COLOR",q.ContentBorderColor="CONTENT_BORDER_COLOR",q.RewardIcon="REWARD_ICON",q.RewardText="REWARD_TEXT",q.KeyStates="KEY_STATES",q.KeyState="KEY_STATE",q.LowerLockVisible="LOWER_LOCK_VISIBLE",q.LowerLockCalendar="LOWER_LOCK_CALENDAR",q.LowerLockLock="LOWER_LOCK_LOCK",q.LowerLockMessage="LOWER_LOCK_MESSAGE",q.CostBackingColor="COST_BACKING_COLOR",q.CostText="COST_TEXT",q.CostTextColor="COST_TEXT_COLOR",q.CostIcon="COST_ICON",q.OnClickFindMatch="ON_CLICK_FIND_MATCH",q.NumBattlesUsed="NUM_BATTLES_USED",q.ElementalBoostText="ELEMENTAL_BOOST_TEXT",q.ElementalBoostTextColor="ELEMENTAL_BOOST_TEXT_COLOR",q.ElementalBoostTextStrokeColor="ELEMENTAL_BOOST_TEXT_STROKE_COLOR",q.ElementalBoostIcon="ELEMENTAL_BOOST_ICON"}(Y||(Y={}));class gt{static openDuelsStadiumMenu(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=X.wa5.getActiveScene().container.get(Y.PlayerPosition),z=null!=K?K:nt.q.instance.game.broadcaster.broadcast(rt.pm.GetTarget,nt.q.instance.game,[!0]),Q=yield vt.i.getValidatedRoomsConfig(),J=Z.uniq(Q.rooms.reduce(((q,K)=>(K.style.headerImage&&q.push(ut.y.toInjectionParams(K.style.headerImage)[0]),K.style.headerImageDisabled&&q.push(ut.y.toInjectionParams(K.style.headerImageDisabled)[0]),K.prizeIcon&&q.push(ut.y.toInjectionParams(K.prizeIcon)[0]),q)),[]));nt.q.instance.prodigy.audio.playBGM(nt.q.instance.prodigy.world.getZone(nt.q.instance.prodigy.world.getCurrentZone()).bgmID,!0),nt.q.instance.prodigy.startPrefabScene([tt.l.DuelsStadiumMenu],{preloadAssets:J,injectedValues:Object.assign(Object.assign({},yield gt.getElementalBoostInjectionDictionary()),{[Y.OnClose]:null!=q?q:gt.getCloseToMapCallback.bind(this,z),[Y.RoomsData]:Q.rooms.map((q=>{var K,Q,X,Z,J,tt,et,at,rt,ht,ct,dt,lt,ft;const bt=!q.eligible&&!!(null===(Q=null===(K=q.ineligibleReason)||void 0===K?void 0:K.card)||void 0===Q?void 0:Q.topMessage);let pt=q.style;bt&&q.ineligibleReason.type!==st.R.TimeOfDayLocked&&(pt=Object.assign(Object.assign(Object.assign({},pt),it.Ct),{headerImage:pt.headerImageDisabled}));return{[Y.BackingColor]:pt.backingColor,[Y.HeaderImage]:ut.y.toInjectionParams(pt.headerImage),[Y.HeaderTextColor]:pt.headerTextColor,[Y.RoomName]:this._localizer.getText(q.nameKey),[Y.IsRoomCardDisabled]:bt,[Y.IsFindMatchDisabled]:!q.eligible&&(null===(X=q.ineligibleReason)||void 0===X?void 0:X.type)!==st.R.NoMembership,[Y.IsLockedLevel]:!q.eligible&&(null===(Z=q.ineligibleReason)||void 0===Z?void 0:Z.type)===st.R.LevelLocked,[Y.IsLockedTime]:!q.eligible&&(null===(J=q.ineligibleReason)||void 0===J?void 0:J.type)===st.R.TimeOfDayLocked,[Y.LockBarColor]:pt.lockBarColor,[Y.LockMessage]:null===(et=null===(tt=q.ineligibleReason)||void 0===tt?void 0:tt.card)||void 0===et?void 0:et.topMessage,[Y.BorderColor]:pt.borderColor,[Y.ContentBackingColor]:pt.contentBackingColor,[Y.ContentBorderColor]:pt.contentBorderColor,[Y.KeyStates]:this.getKeyStatesInjectionList(q),[Y.LowerLockVisible]:!!(null===(rt=null===(at=q.ineligibleReason)||void 0===at?void 0:at.card)||void 0===rt?void 0:rt.bottomMessage),[Y.LowerLockCalendar]:(null===(ht=q.ineligibleReason)||void 0===ht?void 0:ht.type)===st.R.NoBattlesAvailable,[Y.LowerLockLock]:[st.R.LevelLocked,st.R.TimeOfDayLocked].includes(null===(ct=q.ineligibleReason)||void 0===ct?void 0:ct.type),[Y.LowerLockMessage]:null===(lt=null===(dt=q.ineligibleReason)||void 0===dt?void 0:dt.card)||void 0===lt?void 0:lt.bottomMessage,[Y.RewardText]:`${this.itemAmountToInjectionParams(q.prize)}\n${this._localizer.getText("GOLD")}`,[Y.RewardIcon]:ut.y.toInjectionParams(q.prizeIcon),[Y.CostBackingColor]:pt.costBackingColor,[Y.CostText]:this.itemAmountToInjectionParams(q.entryCost),[Y.CostTextColor]:q.eligible||(null===(ft=q.ineligibleReason)||void 0===ft?void 0:ft.type)!==st.R.NoEntryCost?void 0:"#b80000",[Y.OnClickFindMatch]:()=>{var K;if(q.eligible)return nt.q.instance.prodigy.gameContainer.get("20f-5f67").duelsStadium.sendRoomSelectedEvent(q),nt.q.instance.game.state.start(ot.G.DuelMatchmaking,void 0,z,q.id);(null===(K=q.ineligibleReason)||void 0===K?void 0:K.type)===st.R.NoMembership&&this.openMembershipPrompt()}}}))})})}))}static itemAmountToInjectionParams(q){return`${q?(Array.isArray(q)?q[0]:q).amount:(0,at.k)("ITEMCARD_FREE")}`}static getCloseToMapCallback(q){const K=X.wa5.getActiveScene().getLayer(bt.A.LEGACY_MENU_LAYER_NAME);nt.q.instance.prodigy.open.menuLayer=K,nt.q.instance.prodigy.open.map({onCloseButtonClicked:()=>{const K=nt.q.instance.prodigy.gameContainer.get("782-c308");nt.q.instance.prodigy.world.it(K.data.zone,null==q?void 0:q.x,null==q?void 0:q.y)}})}static getKeyStatesInjectionList(q){const K=Math.min(q.numBattlesUsed,q.freeBattles),z=Math.max(0,q.freeBattles-q.numBattlesUsed),Q=Math.max(0,q.numBattlesUsed-q.freeBattles),X=q.memberBattles-Q;return[...Z.range(K).map((()=>({[Y.KeyState]:it.d6.FreeUsed}))),...Z.range(z).map((()=>({[Y.KeyState]:it.d6.Free}))),...Z.range(Q).map((()=>({[Y.KeyState]:it.d6.MemberUsed}))),...Z.range(X).map((()=>({[Y.KeyState]:it.d6.Member})))]}static openMembershipPrompt(){let q=!1;const K=ct.P.shouldUseUnifiedConversionFlow(ft.o.FunnelLockedStadiumRoom)?dt.R.UnifiedConversionFlow:dt.R.DynamicMemberPrompt;nt.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:"Stadium-Member-Locked-Room",category:"Duels",contentId:null,adType:K,adVersion:ct.P.getAdVersion(ft.o.FunnelLockedStadiumRoom)});const z=nt.q.instance.prodigy.open;z.membershipInfo((()=>{nt.q.instance.prodigy.gameContainer.get("782-c308").hasMembership()&&!q&&(q=!0,gt.openDuelsStadiumMenu().catch(X.RQr.createHandler("Failed to open Duels Stadium Menu after closing membership prompt")))}),{conversionFunnelName:ft.o.FunnelLockedStadiumRoom});const Y=z.menus.find((q=>q instanceof lt.v));Y&&Y.onCreate.addOnce((()=>{var q;return null===(q=Y.prefabGameObject)||void 0===q?void 0:q.setLayer(bt.A.LEGACY_MENU_LAYER_NAME,!0)}))}static getElementalBoostInjectionDictionary(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=nt.q.instance.prodigy.gameContainer.get("9d1-13ea");yield q.cacheElementalBoost();const K=pt._.ELEMENT_BOOST_TEXT_CONFIG[q.elementalBoost];return{[Y.ElementalBoostText]:this._localizer.getText(K.localizationKey),[Y.ElementalBoostTextColor]:K.textColor,[Y.ElementalBoostTextStrokeColor]:K.textStrokeColor,[Y.ElementalBoostIcon]:[J._.Ui_battle_revamp_json,`icon-mini-element-${q.elementalBoost}`]}}))}static getElementalBoostModifierIconInjectionData(q){const K=pt._.ELEMENT_BOOST_TEXT_CONFIG[q];return{IS_BUFF:!0,DISABLED:!1,MODIFIER_ICON:gt.getGuidForBoostIcon(q),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:this._localizer.getText(K.localizationKey),MODIFIER_TOOLTIP_TEXT:this._localizer.getText(K.descriptionLocalizationKey)}}static getGuidForBoostIcon(q){return et.q[`Effect_${q}_buff_2_small`]}}(0,Q.Cg)([(0,ht.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],gt,"_localizer",void 0)},58203:(q,K,z)=>{"use strict";z.d(K,{m:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546);let J=class extends Z.D{get networkRequestBehaviour(){return{timeoutMs:3e4,retryCount:185,retryIntervalMs:1e3,retryIncrementMs:1e3,retryMaxDelayMs:1e4}}createBattle(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Battle.Start,{config:q})}))}createBattleSim(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Battle.Debug.SimulateBattle,{config:q})}))}doStatusEffectSim(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Battle.Debug.SimulateStatusEffectCalculations,{config:q})}))}doBattleAction(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Battle.Action,{action:q,battleId:K})}))}doDebugCommand(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){0}))}resumeBattle(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Battle.Resume,null)}))}escapeBattle(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Battle.Escape,null,!0)}))}clearBattleState(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(X.D.Battle.ClearBattleState,{},!0)}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},60668:(q,K,z)=>{"use strict";z.d(K,{o:()=>it});var Y=z(87490),Q=z(62459),X=z(35120),Z=z(34829),J=z(44094),tt=z(95807),et=z(21945);class it extends tt.Z{constructor(){super(),this._qiOpenTimeout=window.setTimeout((()=>{this.fireFailureSegmentEvent()}),2e4),this.openQI=this.openQI.bind(this)}enter(){this.openQI()}openQI(){this.battleController.alertActiveUnitMpEmpty().then((()=>{if(Q.wa5.getActiveScene().container.rebind("32f-cb16").toConstantValue(Date.now()),Z.s.get("GameConstants.Debug.EDUCATION_ENABLED")){const q=Q.wa5.getActiveScene().container.get("82f-7065");q.OnQuestionOpened.addOnce((()=>window.clearTimeout(this._qiOpenTimeout))),q.OnQuestionAnswered.addOnce(this.onQuestionAnswered.bind(this)),q.open({forceAnswerBonus:!0,energyCost:0,allowTutorials:this.battleController.allowVideoLessons,canInstantWin:!1,showTopicBadgeAnimations:this.battleController.showQiBadgeAnimations})}else this.onQuestionAnswered(Math.random(){Q.RQr.logError(q,"Error opening question interface"),this.stateMachine.showThrownErrorDialog(q)}))}onQuestionAnswered(q,K,z,Q,X,Z,J){q&&this.battleController.textLog.showMessage("BATTLE_REVAMP_TEXT_POWER_UP"),this.stateMachine.segment.battleRevamp.updateQuestionData(q,J),this.stateMachine.goToState(et.N,{type:Y.EBattleAction.PowerUp,correctAnswer:q,nFactor:null!=z?z:1})}fireFailureSegmentEvent(){X.q.instance.prodigy.gameContainer.get("20f-5f67").sendCustomEvent("Answer Question State No QI",{instance_id:J.$.generateUID(),battleId:this.battleController.battleId,battleType:this.battleController.type})}exit(){window.clearTimeout(this._qiOpenTimeout)}}},52516:(q,K,z)=>{"use strict";z.d(K,{W:()=>rt});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(82351),J=z(35120),tt=z(50084),et=z(34234),it=z(81531),st=z(60668),nt=z(95807),at=z(21945);class rt extends nt.Z{enter(){this.battleController.activeUnit.currentMp<=0?this.stateMachine.goToState(st.o):(this.attachTargetSignals(),this.battleController.onChoosingSpell.dispatch())}exit(){const q=this.battleController.spellCardsController.targetController;q.onTargetConfirmed.removeAll(this),q.onActionChange.removeAll(this.battleController.activeUnit)}attachTargetSignals(){this.battleController.updateSpellCards();const q=this.battleController.spellCardsController.targetController;q.onTargetConfirmed.add(this.processTargetConfirmed,this),q.onActionChange.add(this.battleController.activeUnit.onSelectSpell,this.battleController.activeUnit)}processTargetConfirmed(q,K){var z;try{const Y=K.targets.filter((q=>X.Aq$.isDefined(q.battleId)&&q.isTargetable)).map((q=>q.battleId));J.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_unit_select);const et=()=>{this.battleController.onSpellTargetChosen.dispatch(),this.battleController.spellCardsController.inputBlocker.active=!0,this.stateMachine.goToState(at.N,{type:Q.EBattleAction.CastSpell,id:q.spellId,targets:Y})};if(null===(z=this._gameDataProvider.getItem("spellV2",q.spellId).data.flags)||void 0===z?void 0:z.some((q=>q.flag===Q.ESpellFlag.Rescue))){const q=this.battleController.rightTeam.units.find((q=>q.data.unitId===Y[0])),K=new tt.a(J.q.instance.prodigy.game,q);K.onRescueContinue.add((()=>{et(),K.destroy()})),K.onRescueDismissed.add((()=>{this.attachTargetSignals(),K.destroy()})),K.onRescueFailed.add((z=>{if(z===tt.n.CannotAfford){const z=this.battleController.spellCardsController.targetController;z.showHardCurrencyBalanceTooltip(q.creature),z.onHardCurrencyBalanceTooltipHidden.addOnce((()=>K.onRescueDismissed.dispatch()))}else K.destroy()})),K.start()}else et()}catch(e){X.RQr.logError(e,"Error processing target"),this.stateMachine.showThrownErrorDialog(e)}}}(0,Y.Cg)([(0,et.d)("GameDataProvider"),(0,Y.Sn)("design:type",it.q)],rt.prototype,"_gameDataProvider",void 0)},78355:(q,K,z)=>{"use strict";z.d(K,{$:()=>J});var Y=z(62459),Q=z(35120),X=z(23082),Z=z(95807);class J extends Z.Z{enter(){this.battleController.onDefeat().then((()=>{const q=this.battleController.getDefeatData();if(!(null==q?void 0:q.preventDefaultTeleport)){const K=Q.q.instance.game;(null==q?void 0:q.teleportData)&&K.state.states.get(X.G.Faint).updateTeleportData(null==q?void 0:q.teleportData),K.state.start(X.G.Faint,!1)}this.stateMachine.onDefeat.dispatch()})).catch((q=>{Y.RQr.logError(q,"Error in battle defeat state"),this.stateMachine.showThrownErrorDialog(q)}))}}},69297:(q,K,z)=>{"use strict";z.d(K,{L:()=>X});var Y=z(62459),Q=z(95807);class X extends Q.Z{enter(){this.battleController.onEscape().then((()=>{this.stateMachine.onEscape.dispatch()})).catch((q=>{Y.RQr.logError(q,"Error in EscapeBattleState"),this.stateMachine.showThrownErrorDialog(q)}))}}},63046:(q,K,z)=>{"use strict";z.d(K,{B:()=>Gt});var Y=z(87490),Q=z(62459),X=z(35120),Z=z(52516),J=z(95807),tt=z(52855);class et extends tt.a{enter(){const q=this._data,K=this.battleController.getUnitById(q.affix.unitId);null==K||K.showAffix(q.affix).catch(Q.RQr.createHandler("Error adding affix to unit")).finally((()=>this.stateMachine.goToState(Gt)))}}var it=z(8674),st=z(40671),nt=z(77938),at=z(10670),rt=z(42430),ot=z(30226);class ht extends tt.a{constructor(q){super(q),this.statusEffectId=q.statusEffects[0].statusEffectId}enter(){const q=this.battleController.spellRoot.addComponent(rt.o);this.handleUpdate(q).catch(Q.RQr.createHandler(`${this._data.type}: Error handling update for ${this.statusEffectId}`)).finally((()=>{q.destroy(),this.stateMachine.goToState(Gt)}))}handleUpdate(q){return(0,it.sH)(this,void 0,void 0,(function*(){const K=nt.t.getItem("statusEffect",this.statusEffectId);if(!K)throw new Error("Status effect item not found");const z=Object.assign({id:this.statusEffectId},K.data),Y=[],Q=this._data.statusEffects;for(let q=0;q{Y.forEach((q=>this.handleDamageApplied(q)))})),q.OnDestroy.add((()=>{Y.forEach((q=>this.handleSpellCompleted(q)))})),yield q.preloadAssets(),yield q.begin({targets:Y.map((q=>({unitId:q.battleId,gameObject:q.creature.creatureGameObject,statusEffectContainer:q.statusEffectContainer}))),manager:q,multiHit:1});for(const q of Y)if(q.data.health.current<=0){const K=this.battleController.activeUnit;q.battleId===(null==K?void 0:K.battleId)&&(yield this.battleController.deactivateTurnIndicator()),yield this.defeatUnits([q])}}else Y.forEach((q=>this.handleSpellCompleted(q)))}))}getSpellGuid(q){}updateBattleUnit(q){return(0,it.sH)(this,void 0,void 0,(function*(){}))}handleDamageApplied(q){}handleSpellCompleted(q){}getSpellGuidFromName(q){if(!q)return;const K=st.z[q];if(ot.J.isGuid(K))return K;Q.VyI.log(`"${q}" is not a valid spell`,Q.$bb.Error)}sendSegmentEvent(q,K){var z,X;const Z=this.stateMachine.segment.battleRevamp,J=K.map((q=>q.unitId)),tt=J.map((q=>this.battleController.getUnitById(q))).filter((q=>void 0!==q));if(0===tt.length)return void Q.VyI.log(`No target battle units found for status effect ID ${q.id}`,Q.$bb.Error);const et=tt[0].data.teamId===Y.ETeamId.Home?at.B1.Player:at.B1.Opponent,it=q.type;let st,nt,rt,ot;q.affixes.forEach((q=>{var K;q.type===Y.EAffixType.Stat&&(st=q.stat,nt=null!==(K=q.amount)&&void 0!==K?K:q.multiplier),q.type!==Y.EAffixType.ApplyDamage&&q.type!==Y.EAffixType.BonusElement||(rt=q.element),q.type!==Y.EAffixType.ApplyDamage&&q.type!==Y.EAffixType.ApplyHealing||(ot=q.whenToTrigger)}));const ht={spell_id:K[0].spellId,status_effect_id:q.id.toString(),target_team:et,effect_type:it,modified_stat:st,modified_stat_value:nt,element:rt,trigger_type:ot};if(this._data.type===Y.EBattleStateUpdate.AddStatusEffect){const q=K[0].remainingDuration;let z;ot===Y.EWhenToTrigger.WhenDurationExpires?z=q:ot!==Y.EWhenToTrigger.StartOfTurn&&ot!==Y.EWhenToTrigger.EndOfTurn||(z=1),Z.sendSpellStatusEffectAppliedEvent(Object.assign({hit_targets:J,intended_targets:this._data.intendedTargets,rounds_active:q,rounds_till_triggered:z},ht))}if(this._data.type===Y.EBattleStateUpdate.TriggerStatusEffect){const q=K[0].remainingDuration,Y=null!==(X=null===(z=this._data.hitData)||void 0===z?void 0:z.damage)&&void 0!==X?X:0;Z.sendSpellStatusEffectTriggeredEvent(Object.assign({target:J[0],number_of_times_triggered:K[0].timesTriggered,rounds_remains_active:q,damage:Y},ht))}}}class ct extends tt.a{enter(){const q=this._data,K=q.unitData;this.battleController.addUnitToTeam(Object.assign({unitId:q.unitId},K),K.teamId).then((()=>{X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`${q.unitId} added to team ${K.teamId}`,Q.$bb.Info),this.stateMachine.goToState(Gt)})).catch(Q.RQr.createHandler(`Error adding ${q.unitId} to team ${K.teamId}`))}}var dt=z(28628),lt=z(71543),ut=z(74640);class ft extends tt.a{enter(){var q,K,z;const Y=this._data,Q=Y.victoriousTeamId?Y.victoriousTeamId===this.battleController.leftTeam.id?dt.XK.Victory:dt.XK.Defeat:dt.XK.Escape,Z=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;Y.xpToAward&&(this.battleController.awardedXpData=Y.xpToAward),this.battleController.postBattleRescuablePets=null!==(q=Y.rescuablePets)&&void 0!==q?q:[],this.battleController.magicoinRewardGranted=null!==(K=Y.magicoinRewardGranted)&&void 0!==K&&K,Z.battleStreak=null===(z=null==Y?void 0:Y.lifetimeBattleStats)||void 0===z?void 0:z.battleStreak;const J=Y.resumePreviousBattleData;J&<.p.canResumeBattle()&&(Z.battleResumeData={battleType:J.battleType,data:J.clientState}),this.stateMachine.goToState(ut.G,{battleResult:Q,rewards:Y.rewards,memberRewards:Y.memberRewards,rewardsScalingInfo:Y.rewardsScalingInfo,magicoinRewardGranted:Y.magicoinRewardGranted,magicoinRewardEligible:Y.magicoinRewardEligible,magicoinRewardGuaranteed:Y.magicoinRewardGuaranteed})}}var bt=z(60604);z(34829);class pt extends tt.a{enter(){this.stateMachine.goToState(Gt)}}var vt=z(62886),gt=z(60157),mt=z(13956),yt=z(55080);class _t extends tt.a{enter(){var q;const K=this.battleController.getUnitById(this._data.unitId);this._featureFlags.getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log("Unit defeated",Q.$bb.Info,null==K?void 0:K.isDefeated(),null==K?void 0:K.isRescued,K),K&&!K.isRescued&&(null===(q=this._dynamicStore)||void 0===q||q.forceEnableDataUpdate(),this.sendDefeatUnitEvent(K)),this.stateMachine.goToState(Gt)}sendDefeatUnitEvent(q){const K=X.q.instance.prodigy.gameContainer.get("b37-c775"),z={params:{taskEventType:gt.Z7.Unit,unitType:q.data.type,id:q.creature.id,name:q.creature.name,nickname:q.creature.nickname,team:q.data.teamId}};K.sendQuestEventViaHub(vt.T.DEFEAT_UNIT,z).catch(Q.RQr.createHandler("Error sending a quest event for defeating a unit"))}}(0,it.Cg)([(0,mt.b)("f71-42eb"),(0,it.Sn)("design:type",Object)],_t.prototype,"_featureFlags",void 0),(0,it.Cg)([(0,mt.b)("668-8a41"),(0,it.Sn)("design:type",yt.s)],_t.prototype,"_dynamicStore",void 0);class Et extends tt.a{enter(){this.run(this._data).catch((q=>{Q.RQr.logError(q,"Error letting unit escape from battle"),this.stateMachine.showThrownErrorDialog(q)}))}run(q){return(0,it.sH)(this,void 0,void 0,(function*(){X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`[Battle Revamp] A unit has escaped! Unit ID: ${q.unitId}`,Q.$bb.Verbose);const K=this.battleController.getUnitById(q.unitId);K&&(yield K.playEscaped(),this.sendUnitEscapedEvent(K)),this.stateMachine.goToState(Gt)}))}sendUnitEscapedEvent(q){const K=X.q.instance.prodigy.gameContainer.get("b37-c775"),z={params:{taskEventType:gt.Z7.Unit,unitType:q.data.type,id:q.creature.id,name:q.creature.name,nickname:q.creature.nickname,team:q.data.teamId}};K.sendQuestEventViaHub(vt.T.LET_UNIT_ESCAPE,z).catch(Q.RQr.createHandler("Error sending a quest event for a unit escaping"))}}var wt=z(99625),Tt=z(5491),St=z(31029),At=z(80060),Ct=z(55122),Ot=z(46855);class It extends tt.a{enter(){this.playerData=X.q.instance.prodigy.gameContainer.get("ad2-c5b2");const q=this._data,K=this.battleController.getUnitById(q.unitId);Q.VyI.log(`[Battle Revamp] A unit has levelled up to level ${q.level}`,Q.$bb.Info),this.battleController.type===dt.gu.FireflyQ2Miniboss&&K.type===dt.uj.Wizard?this.runFireflyQ2LevelUpTutorial(q,K).catch((q=>{Q.RQr.logError(q,"Error running FireflyQ2 LevelUp Tutorial"),this.stateMachine.showThrownErrorDialog(q)})):(K.updateLevel(q.level),this.stateMachine.goToState(Gt))}applyStarBonus(q,K){if(q.type===dt.uj.Wizard){const q=Ct.s.xpRequiredForLevel(K,Tt.V.Player),z=this.playerData.getStars();this.playerData.player.addStars(q-z)}else{const z=Ct.s.xpRequiredForLevel(K,Tt.V.Pet),Y=this.battleController.leftTeam.getUnitIndex(q),Q=this.playerData.player.kennel.petTeam.filter((q=>(null==q?void 0:q.creatureType)===Tt.V.Pet)),X=Q.length<2||Y<2?Q[0]:Q[1],Z=X.getStars();X.addStars(z-Z)}}runFireflyQ2LevelUpTutorial(q,K){return(0,it.sH)(this,void 0,void 0,(function*(){const z=this.playerData.getStars(),Y=Ct.s.xpRequiredForLevel(q.level,Tt.V.Player)-z,Z=X.q.instance.prodigy.gameContainer.get("983-05a7"),J={baseXp:Y,memberXp:0,totalNonMemberXp:Y},tt=(yield At.d.loadWithInjectedValuesAndDependenciesFromGUID(Z,wt.l.FireflyQ2MidBattleTutorial,{xpBarPositionX:K.creature.worldPosition.x-5,xpBarPositionY:K.creature.worldPosition.y+77,particleLife:K.creature.worldPosition.x<500?new Q.I9Y(1.6,1.6):new Q.I9Y(.6,.6),creatureXpBarData:new Ot.r(z,Tt.V.Pet,J,Ct.s.activePlayerLevelCap)})).findComponentInChildren(St.u);tt.run(),this.battleController.rightTeam.units.forEach((q=>{q.levelUi.setLayer("result",!0),q.creature.creatureGameObject.setLayer("result",!0)})),K.levelUi.setLayer("result",!0),K.creature.creatureGameObject.setLayer("result",!0),yield tt.fsmVariables.applyLevelUp.onDispatch.asPromise(),K.creature.isOpponent||this.applyStarBonus(K,q.level),K.playLevelUp(),K.updateLevel(q.level),yield tt.onComplete.asPromise(),this.battleController.rightTeam.units.forEach((q=>{q.levelUi.setLayer(void 0,!0),q.creature.creatureGameObject.setLayer(void 0,!0)})),K.levelUi.setLayer(void 0,!0),K.creature.creatureGameObject.setLayer(void 0,!0),this.stateMachine.goToState(Gt)}))}}class Dt extends tt.a{enter(){const q=this._data,K=this.battleController.getUnitById(q.unitId);q.mpResult>K.currentMp&&this.sendMpRecoverySegmentData(K,q.mpResult-K.currentMp),K.updateMp(q.mpResult),X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`${q.unitId} MP has been updated and it is now ${K.currentMp} !`,Q.$bb.Info),this.stateMachine.goToState(Gt)}}class Rt extends tt.a{enter(){const q=this._data,K=this.battleController.getUnitById(q.unitId);K&&(K.spells.find((K=>K.spellId===q.spellId)).currentCooldown=q.cooldown,X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`${q.unitId} spell ${q.spellId} cooldown is now ${q.cooldown} !`,Q.$bb.Info)),this.stateMachine.goToState(Gt)}}class Pt extends tt.a{enter(){const q=this._data,K=this.battleController.getUnitById(q.unitId);this.battleController.moveUnitToTeam(K,q.teamId).then((()=>{X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`${q.unitId} moved to team ${q.teamId}`,Q.$bb.Info),this.stateMachine.goToState(Gt)})).catch(Q.RQr.createHandler(`Error moving ${q.unitId} to team ${q.teamId}`))}}class Mt extends tt.a{enter(){const q=this._data.round;this.stateMachine.round=q,this.stateMachine.segment.battleRevamp.setRoundNumber(q),this.battleController.onNewRound(q),X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`Start of battle round ${q}`,Q.$bb.Verbose),this.stateMachine.goToState(Gt)}}class Nt extends tt.a{enter(){const q=this._data;for(const K of this.battleController.getUnits())K.removeAffix(q.affixId);this.stateMachine.goToState(Gt)}}class xt extends tt.a{enter(){var q;const K=this._data,z=this.battleController.getUnitById(K.unitId);z.updateHp(K.hpResult),z.reviveUnit();const Z=[z.enterBattle(!0,!0,!0).then((()=>{z.updateRescuableUI(!1).catch(Q.RQr.createHandler(`Error updating rescuable UI for ${K.unitId}`))}))];(null===(q=this.stateMachine.stateUpdateQueue[0])||void 0===q?void 0:q.type)===Y.EBattleStateUpdate.ReviveUnit&&Z.push(Q.Egh.timeout(500)),Promise.race(Z).then((()=>{X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`${K.unitId} revived with ${K.hpResult} HP`,Q.$bb.Info),this.stateMachine.goToState(Gt)})).catch(Q.RQr.createHandler(`Error reviving ${K.unitId}`))}}var Lt=z(80313);class kt extends tt.a{enter(){const q=this._data;X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`Skipping turn for unit ${q.unitId}`,Q.$bb.Info),tt.a.createHitInfoText(this.battleController.getUnitById(q.unitId),{damage:0,damageInformation:Y.EDamageInformation.Fumble,textKey:"BATTLE_REVAMP_TEXT_SKIP_TURN"}),this.stateMachine.goToState(Gt)}}var Bt=z(82351),Ut=z(8693),Ft=z(63761);class Gt extends J.Z{enter(){const q=this.battleController.getStateOverride(this.stateMachine.stateUpdateQueue[0]);if(q)return void this.stateMachine.goToState(q[0],...q.slice(1));const K=this.stateMachine.stateUpdateQueue.shift();if(!K)return void this.stateMachine.goToState(Z.W);X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`ProcessStateUpdateQueue - Processing state ${JSON.stringify(K)}`,Q.$bb.Verbose);const z=Gt.STATE_UPDATES[K.type];z?this.stateMachine.goToState(z,K):this.stateMachine.goToState(Gt)}}Gt.STATE_UPDATES={[Y.EBattleStateUpdate.CastSpell]:bt.a,[Y.EBattleStateUpdate.ModifyMp]:Dt,[Y.EBattleStateUpdate.ModifyLevel]:It,[Y.EBattleStateUpdate.ModifySpellCooldown]:Rt,[Y.EBattleStateUpdate.ModifyUnitTeam]:Pt,[Y.EBattleStateUpdate.AddUnit]:ct,[Y.EBattleStateUpdate.ReviveUnit]:xt,[Y.EBattleStateUpdate.AddAffix]:et,[Y.EBattleStateUpdate.RemoveAffix]:Nt,[Y.EBattleStateUpdate.AddStatusEffect]:class extends ht{getSpellGuid(q){return this.getSpellGuidFromName(q.applySpell)}updateBattleUnit(q){return(0,it.sH)(this,void 0,void 0,(function*(){q.unitComponent.addStatusEffect(q.statusEffectInstance)}))}handleSpellCompleted(q){q.updateIdleStatusEffect(),q.updatePersistentStatusEffects()}},[Y.EBattleStateUpdate.TriggerStatusEffect]:class extends ht{getSpellGuid(q){return this.getSpellGuidFromName(q.triggerSpell)}updateBattleUnit(q){return(0,it.sH)(this,void 0,void 0,(function*(){const K=q.clientStatusEffect.affixes;for(let z=0;z{Q.RQr.logError(q,"Error changing active unit in TriggerStatusEffectStateUpdate"),this.stateMachine.showThrownErrorDialog(q)})))}}))}handleDamageApplied(q){const K=this._data.hitData;if(!K)return;X.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Q.VyI.log(`${q.creature.name} triggered status ${this.statusEffectId} and hit points changed by ${K.damage}!`,Q.$bb.Info),q.onApplyDamage.dispatch(K),tt.a.createHitInfoText(q,K,this._data.element),q.updateHp(K.hpResult),K.damageInformation&Y.EDamageInformation.Heal?X.q.instance.prodigy.audio.playSFXFromGUID(Bt.B.Sfx_heal):(X.q.instance.prodigy.audio.playSFX(8,Ut.J.Hit),K.hpResult>0?(q.playHurt(),this.checkAndTriggerLowHealthAnimation(q,K.damage)):q.creature.teleportType===Ft.H0.Immediate&&q.playDefeated().catch(Q.RQr.createHandler("Error playing defeat animation")))}handleSpellCompleted(q){var K,z;q.updateIdleStatusEffect(),null!==(z=null===(K=this._data)||void 0===K?void 0:K.isBeingRemoved)&&void 0!==z&&z||q.updatePersistentStatusEffects()}},[Y.EBattleStateUpdate.RemoveStatusEffect]:class extends ht{getSpellGuid(q){return this.getSpellGuidFromName(q.removeSpell)}updateBattleUnit(q){return(0,it.sH)(this,void 0,void 0,(function*(){q.unitComponent.removeStatusEffect(q.statusEffectInstance.id)}))}handleSpellCompleted(q){q.updatePersistentStatusEffects()}},[Y.EBattleStateUpdate.ModifyStatusEffect]:class extends ht{updateBattleUnit(q){return(0,it.sH)(this,void 0,void 0,(function*(){q.unitComponent.modifyStatusEffect(q.statusEffectInstance.id,q.statusEffectInstance.remainingDuration),q.unitComponent.updatePersistentStatusEffects()}))}},[Y.EBattleStateUpdate.SetActiveUnit]:Lt.x,[Y.EBattleStateUpdate.EndBattle]:ft,[Y.EBattleStateUpdate.SkipTurn]:kt,[Y.EBattleStateUpdate.NewRound]:Mt,[Y.EBattleStateUpdate.Escape]:Et,[Y.EBattleStateUpdate.DefeatUnit]:_t,[Y.EBattleStateUpdate.DebugMessage]:pt}},37987:(q,K,z)=>{"use strict";z.d(K,{D:()=>Q,$:()=>Et});var Y,Q,X=z(8674),Z=z(62459),J=z(99625),tt=z(28628),et=z(35120),it=z(10778),st=z(29834),nt=z(23082),at=z(46784),rt=z(65050),ot=z(67665),ht=z(53661),ct=z(90614),dt=z(80060),lt=z(27488),ut=z(68836),ft=z(86323),bt=z(64019),pt=z(10670),vt=z(30226),gt=z(86283),mt=z(63046),yt=z(95807);class _t extends yt.Z{constructor(){super(),this.nextState=this.nextState.bind(this)}enter(){return(0,X.sH)(this,void 0,void 0,(function*(){this.battleController.onStartBattle().then((()=>{this.sendBattleStartSegmentData(),this.battleController.getUnits().forEach((q=>{this.sendBattleParticipantSegmentData(q)})),this.nextState()})).catch((q=>{Z.RQr.logError(q,"Error starting a battle"),this.stateMachine.showThrownErrorDialog(q)}))}))}nextState(){this.stateMachine.goToState(mt.B)}sendBattleStartSegmentData(){const q=this.stateMachine.getStartOrResumeSegmentData(),K=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily;K.isFestivalDailyBattle&&(q.instance=Object.assign(Object.assign({},q.instance),{instance_type:rt.N.FestivalDaily,instance_id:K.getFestivalInstanceName()}),K.isFestivalDailyBattle=!1);const{requirements:z}=Z.wa5.getActiveScene().container.get("LocalConfig"),Y=Z.Aq$.isDefined(z)&&z.length>0;this.stateMachine.segment.battleRevamp.sendBattleStartEvent(Object.assign({battle_id:this.battleController.battleId,battle_type:this.stateMachine.segment.battleRevamp.getSegmentBattleType(this.stateMachine.battleType),battle_variant:this.stateMachine.segment.battleRevamp.getBattleVariant(this.stateMachine.battleType,q.variantData),battle_difficulty:q.difficulty,player_team_size:this.stateMachine.homeTeam.units.length,enemy_team_size:this.stateMachine.awayTeam.units.length,is_restricted:Y,restrictions:z},q.instance)),this.stateMachine.segment.postBattleFlow.init()}sendBattleParticipantSegmentData(q){var K;const z=q.type===tt.uj.Wizard&&!q.creature.isOpponent,Y=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=q.type!==tt.uj.Wizard||q.creature.isOpponent?void 0:vt.J.createGearMetadata(Y.equipment.getData()),X=q.type===tt.uj.Pet&&Z.Aq$.isDefined(q.data.petGear)?vt.J.createPetGearMetadata(q.data.petGear):void 0,J=this.stateMachine.segment.battleRevamp,it=!q.creature.isOpponent||this.battleController.rightTeam.isRescuable();J.sendBattleParticipantEnteredEvent({team:q.creature.isOpponent?pt.B1.Opponent:pt.B1.Player,character_name:J.getUnitName(z,q),character_level:q.level,character_rank:q.type===tt.uj.Pet?null!==(K=q.data.mergeRank)&&void 0!==K?K:0:void 0,character_hp:q.currentHp,character_mp:q.currentMp,character_id:q.data.unitId,position:J.getUnitPosition(q,this.battleController),character_element:q.data.element,character_type:J.getBattleCharacterType(z,q.creature.id,it),character_rarity:J.getUnitRarity(z,q.data.rarity),character_max_hp:q.maxHp,character_max_mp:q.maxMp,character_power:q.data.stats.power,character_defence:q.data.stats.defence,character_speed:q.data.stats.speed,character_order:q.data.stats.initiative,crit_chance:q.data.stats.critDamage,crit_damage:this.battleController.battleConstants.criticalHitBonus,element_advantage:this.battleController.battleConstants.getElementalResistance(q.data.element),element_weakness:this.battleController.battleConstants.getElementalWeakness(q.data.element),spells_available:q.data.spells.map((q=>({spellId:q.spellId,currentCooldown:q.currentCooldown}))),is_rescuable:q.isARescuableUnit(),is_new_pet:!gt.D.hasBeenRescuedPreviously(Y,q.creature.id),number_owned:Y.kennel.getPets(!1).reduce(((K,z)=>z.ID===q.creature.id?K+1:K),0),times_battled:Y.encounters.getPetTimesBattled(q.creature.id),times_rescued:Y.encounters.getPetTimesRescued(q.creature.id),gear_hat:q.type===tt.uj.Wizard?null==Q?void 0:Q.hat:null==X?void 0:X.hat,gear_hat_rarity:q.type===tt.uj.Wizard?null==Q?void 0:Q.hat_rarity:null==X?void 0:X.hat_rarity,gear_relic:q.type===tt.uj.Wizard?null==Q?void 0:Q.relic:null==X?void 0:X.relic,gear_relic_rarity:q.type===tt.uj.Wizard?null==Q?void 0:Q.relic_rarity:null==X?void 0:X.relic_rarity,gear_outfit:null==Q?void 0:Q.outfit,gear_outfit_rarity:null==Q?void 0:Q.outfit_rarity,gear_boots:null==Q?void 0:Q.boots,gear_boots_rarity:null==Q?void 0:Q.boots_rarity,gear_weapon:null==Q?void 0:Q.weapon,gear_weapon_rarity:null==Q?void 0:Q.weapon_rarity,gear_buddy:null==Q?void 0:Q.follow,gear_buddy_rarity:null==Q?void 0:Q.follow_rarity})}}!function(q){q.Connection="BATTLE_REVAMP_ERROR_NETWORK",q.Server="BATTLE_REVAMP_ERROR_RETRY",q.Client="BATTLE_REVAMP_ERROR_FATAL"}(Q||(Q={}));let Et=Y=class extends Z.JTX{constructor(){super(...arguments),this.RETRY_HIDE_DURATION=2e3,this.stateUpdateQueue=[],this.round=0,this._currentState=null,this.onStateChange=new Z.HN0,this.onVictory=new Z.HN0,this.onDefeat=new Z.HN0,this.onEscape=new Z.HN0,this._battleCompleted=!1}get currentState(){return this._currentState}goToStart(){this.goToState(_t)}goToState(q,...K){try{this._currentState&&(this._currentState.exit(),this._currentState.destroy()),this._currentState=new q(...K),this._currentState.stateMachine=this,this._currentState.battleController=this.battleController,this.onStateChange.dispatch(this._currentState),this._currentState.enter()}catch(e){Z.RQr.logError(e,`Error transitioning to ${q.name} state`),this.showThrownErrorDialog(e)}}update(){var q;null===(q=this._currentState)||void 0===q||q.update(),super.update()}destroy(){this._currentState&&(this._currentState.exit(),this._currentState.destroy()),this._currentState=null,this.battleController=null,this.homeTeam=null,this.awayTeam=null,this.mapRoot=null,this.battleResult=null,this.onVictory.dispose(),this.onDefeat.dispose(),this.onEscape.dispose(),this.onStateChange.dispose(),this.hideErrorDialog(),super.destroy()}showThrownErrorDialog(q){q instanceof lt.r?this.showNetworkErrorDialog(q):this.showErrorDialog(void 0,q)}showNetworkErrorDialog(q){0===q.code?this.showErrorDialog(Q.Connection,q,!0):q.code>=500&&q.code<600?this.showErrorDialog(Q.Server,q):this.showErrorDialog(Q.Client,q)}isShowingNetworkErrorDialog(){return Boolean(this._errorDialogPromise)}showErrorDialog(q=Q.Client,K,z){this.showErrorDialogAsync(q,K,z).catch(Z.RQr.createHandler("Error showing error dialog"))}showErrorDialogAsync(){return(0,X.sH)(this,arguments,void 0,(function*(q=Q.Client,K,z){if(et.q.instance.game.state.current!==nt.G.SecureBattleRevamp)return;const tt=this.getInjectedValue(Z.$Bt.LocalizationService),it={[ht.ZE.Title]:tt.getText("BATTLE_REVAMP_ERROR_TITLE"),[ht.ZE.Message]:tt.getText(q),[ht.ZE.CTAButtonEnabled]:null!=z&&z,[ht.ZE.CTAButtonFunction]:()=>(0,X.sH)(this,void 0,void 0,(function*(){return this.hideErrorDialogForRetry()}))};if(Boolean(this._errorDialogPromise))dt.d.updateInjectedValues(yield this._errorDialogPromise,it);else{const q=this.getInjectedValue("983-05a7");this._errorDialogPromise=dt.d.loadWithInjectedValuesAndDependenciesFromGUID(q,J.l.PaperDialogInjectionConfigured,it),this._errorDialogPromise.then((q=>{et.q.instance.game.state.current!==nt.G.SecureBattleRevamp&&q.destroy()})).catch(Z.RQr.createHandler("Error cleaning up error dialog after state transition"))}if(!this._battleCompleted&&q===Q.Client){if(this.completeBattle("error",this.getErrorMessage(K)),K){et.q.instance.prodigy.gameContainer.get("e01-1fba").trackError(K)}Z.Egh.timeout(Y.FATAL_ERROR_BATTLE_EXIT_DELAY_MS).finally((()=>{var q;null===(q=this.getInjectedValue("BattleState"))||void 0===q||q.handleFatalBattleError()}))}}))}hideErrorDialogForRetry(){return(0,X.sH)(this,void 0,void 0,(function*(){Boolean(this._errorDialogPromise)&&this._errorDialogPromise.promise.then((q=>{q.active=!1,setTimeout((()=>{q&&(q.active=!0)}),this.RETRY_HIDE_DURATION)})).catch(Z.RQr.createHandler("Error hiding and re-enabling error dialog"))}))}hideErrorDialog(){Boolean(this._errorDialogPromise)&&(this._errorDialogPromise.cancel(),this._errorDialogPromise.promise.then((q=>q.destroy())).catch(Z.RQr.createHandler("Error cleaning up error dialog")),this._errorDialogPromise=null)}completeBattle(q,K,z,Y){var Q,X,J,tt,et;if(!this._battleCompleted){const{requirements:it}=Z.wa5.getActiveScene().container.get("LocalConfig"),st=Z.Aq$.isDefined(it)&&it.length>0;this.segment.battleRevamp.sendBattleCompleteEvent({outcome:q,rewards_scalar:z,magicoin_dropped:null!==(Q=null==Y?void 0:Y.granted)&&void 0!==Q&&Q,magicoin_drop_eligible:null!==(X=null==Y?void 0:Y.eligible)&&void 0!==X&&X,magicoin_drop_was_guaranteed:null!==(J=null==Y?void 0:Y.guaranteed)&&void 0!==J&&J,magicoin_drop_amount_free:null!==(tt=null==Y?void 0:Y.freeRewardAmount)&&void 0!==tt?tt:null,magicoin_drop_amount_member:null!==(et=null==Y?void 0:Y.memberRewardAmount)&&void 0!==et?et:null,error_detail:K,is_restricted:st,restrictions:it})}this._battleCompleted=!0}getErrorMessage(q){if(Z.Aq$.isDefined(q))return q instanceof Error&&q.message?q.message:JSON.stringify(q)}getStartOrResumeSegmentData(){var q;const K={};let z=this.segment.gameWorld.getCurrentInstanceTypeAndID(),Y=this.difficulty;switch(this.battleType){case tt.gu.Basic:case tt.gu.FestivalDailyBoss:K.units=this.battleController.rightTeam.units;break;case tt.gu.Ultimates:K.questData=null===(q=this.battleController)||void 0===q?void 0:q.currentQuestData;break;case tt.gu.MatchmakingBotDuel:z={instance_id:this.segment.featureCommon.getCurrentInterfaceID(at.B.DuelsStadium),instance_type:rt.N.DuelsStadium},Y=this.segment.duelsStadium.botDifficulty;break;case tt.gu.NormalRiftRun:z={instance_id:this.segment.rifts.riftInstanceUuid,instance_type:rt.N.RiftRun},Y=ut.T.riftTier;break;case tt.gu.BossRiftRun:z={instance_id:this.segment.rifts.riftInstanceUuid,instance_type:rt.N.BossRift},Y=ut.T.riftTier}return K.instanceType=z.instance_type,{variantData:K,instance:z,difficulty:Y}}};Et.FATAL_ERROR_BATTLE_EXIT_DELAY_MS=5e3,(0,X.Cg)([(0,Z.MnK)(bt.cs),(0,X.Sn)("design:type",bt.cs)],Et.prototype,"homeTeam",void 0),(0,X.Cg)([(0,Z.MnK)(bt.cs),(0,X.Sn)("design:type",bt.cs)],Et.prototype,"awayTeam",void 0),(0,X.Cg)([(0,Z.ERr)(),(0,X.Sn)("design:type",Z._mx)],Et.prototype,"mapRoot",void 0),(0,X.Cg)([(0,Z.MnK)(ft.I),(0,X.Sn)("design:type",ft.I)],Et.prototype,"battleResult",void 0),(0,X.Cg)([(0,Z.MnK)(st.j),(0,X.Sn)("design:type",st.j)],Et.prototype,"introAnimator",void 0),(0,X.Cg)([(0,Z.MnK)(it.i),(0,X.Sn)("design:type",it.i)],Et.prototype,"lowHealthPreviewComponent",void 0),(0,X.Cg)([(0,Z.MnK)(st.j),(0,X.Sn)("design:type",st.j)],Et.prototype,"turnIndicator",void 0),(0,X.Cg)([(0,Z.MnK)(ct.P),(0,X.Sn)("design:type",ct.P)],Et.prototype,"spellBookMoveIn",void 0),(0,X.Cg)([(0,Z.MnK)(ct.P),(0,X.Sn)("design:type",ct.P)],Et.prototype,"spellBookMoveOut",void 0),(0,X.Cg)([(0,Z.Cdj)("20f-5f67"),(0,X.Sn)("design:type",ot.Y)],Et.prototype,"segment",void 0),Et=Y=(0,X.Cg)([(0,Z.EVk)("SecureBattleRevampStateMachine")],Et)},95807:(q,K,z)=>{"use strict";z.d(K,{Z:()=>Y});class Y{enter(){}exit(){}update(){}destroy(){}}},21945:(q,K,z)=>{"use strict";z.d(K,{N:()=>Z});var Y=z(62459),Q=z(63046),X=z(95807);class Z extends X.Z{constructor(q){super(),this._action=q}enter(){this.battleController.onPlayerAction(this._action).then((q=>{this.stateMachine.stateUpdateQueue.push(...q),this.stateMachine.goToState(Q.B)})).catch((q=>{Y.RQr.logError(q,"SendPlayerActionState.enter:playerAction.sendRequest"),this.stateMachine.showThrownErrorDialog(q)}))}}},74640:(q,K,z)=>{"use strict";z.d(K,{G:()=>nt});var Y=z(62459),Q=z(28628),X=z(75172),Z=z(10670),J=z(24047),tt=z(78355),et=z(69297),it=z(95807),st=z(28496);class nt extends it.Z{constructor(q){var K,z,Y;super(),this._magicoinRewardGranted=!1,this._magicoinRewardEligible=!1,this._magicoinRewardGuaranteed=!1,this._battleResult=q.battleResult,this._rewards=q.rewards,this._memberRewards=q.memberRewards,this._rewardsScalingInfo=q.rewardsScalingInfo,this._magicoinRewardGranted=null!==(K=q.magicoinRewardGranted)&&void 0!==K&&K,this._magicoinRewardEligible=null!==(z=q.magicoinRewardEligible)&&void 0!==z&&z,this._magicoinRewardGuaranteed=null!==(Y=q.magicoinRewardGuaranteed)&&void 0!==Y&&Y}enter(){var q,K,z,it;const nt=this.stateMachine.segment;Y.C1c.markTextureGarbageCollectionFrame(),this.battleController.getUnits().forEach((q=>{var K;const z=q.type===Q.uj.Wizard&&!q.creature.isOpponent;nt.battleRevamp.sendBattleParticipantOutcomesEvent({team:q.creature.isOpponent?Z.B1.Opponent:Z.B1.Player,character_name:this.stateMachine.segment.battleRevamp.getUnitName(z,q),character_id:q.data.unitId,character_level:q.level,character_rank:q.type===Q.uj.Pet?null!==(K=q.data.mergeRank)&&void 0!==K?K:0:void 0,character_hp:q.currentHp,character_mp:q.currentMp,position:nt.battleRevamp.getUnitPosition(q,this.battleController),status:q.currentHp<=0?Z.rW.Unconscious:Z.rW.Conscious})}));const at=this._magicoinRewardGranted?null===(K=null===(q=this._rewards)||void 0===q?void 0:q.find((q=>"currency"===q.type&&27===q.ID)))||void 0===K?void 0:K.quantity:void 0,rt=this._magicoinRewardGranted?null===(it=null===(z=this._memberRewards)||void 0===z?void 0:z.find((q=>"currency"===q.type&&27===q.ID)))||void 0===it?void 0:it.quantity:void 0,ot={granted:this._magicoinRewardGranted,eligible:this._magicoinRewardEligible,guaranteed:this._magicoinRewardGuaranteed,freeRewardAmount:null!=at?at:null,memberRewardAmount:null!=rt?rt:null};this._magicoinRewardGranted&&nt.funnel.sendStep(J.F.MagicoinBattleRewardsIntro,"feature",X.T.FirstDropReceived,X.h.FirstDropReceived),this.battleController.completeBattle(this._battleResult===Q.XK.Victory?"win":"loss",this._rewardsScalingInfo,ot),this.battleController.onEndGame(this._battleResult===Q.XK.Victory).then((()=>{Y.C1c.garbageCollectTextures(),this._battleResult===Q.XK.Victory?this.stateMachine.goToState(st.u,this._rewards,this._memberRewards,this._rewardsScalingInfo):this._battleResult===Q.XK.Defeat?this.stateMachine.goToState(tt.$):this._battleResult===Q.XK.Escape&&this.stateMachine.goToState(et.L)})).catch((q=>{Y.RQr.logError(q,"Error in the end battle state"),this.stateMachine.showThrownErrorDialog(q)}))}}},28496:(q,K,z)=>{"use strict";z.d(K,{u:()=>X});var Y=z(62459),Q=z(95807);class X extends Q.Z{constructor(q,K,z){super(),this._rewards=q,this._memberRewards=K,this._rewardsScalingInfo=z}enter(){this.battleController.onVictory(this._rewards,this._memberRewards,this._rewardsScalingInfo).then((()=>{this.stateMachine.onVictory.dispatch()})).catch((q=>{Y.RQr.logError(q,"Error in victory state"),this.stateMachine.showThrownErrorDialog(q)}))}}},60604:(q,K,z)=>{"use strict";z.d(K,{a:()=>Et});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(95891),J=z.n(Z),tt=z(20748),et=z(82351),it=z(56942),st=z(28628),nt=z(62886),at=z(35120),rt=z(50084),ot=z(28402),ht=z(98193),ct=z(10670),dt=z(13956),lt=z(34234),ut=z(39571),ft=z(22023),bt=z(44094),pt=z(8693),vt=z(630),gt=z(63761),mt=z(81531),yt=z(63046),_t=z(52855);class Et extends _t.a{enter(){this.castSpell(this._data).catch((q=>{X.RQr.logError(q,"Error casting spell"),this.stateMachine.showThrownErrorDialog(q)}))}exit(){this.battleController.selectedSpell=null}castSpell(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,Z;const tt=this.battleController.activeUnit;let st;for(const J of q.targets){for(const q of J.hits)if(X.OQO.areBitsSet(q.damageInformation,Q.EDamageInformation.Reflected)){st=q;break}if(st)break}st&&_t.a.createHitInfoText(tt,st);const nt=Object.assign(Object.assign({},this._gameDataProvider.getItem("spellV2",q.id).data),{id:q.id}),ht=null!==(z=null===(K=nt.flags)||void 0===K?void 0:K.some((q=>q.flag===Q.ESpellFlag.Rescue)))&&void 0!==z&&z,ct=q.id===this.battleController.battleConstants.fumbleSpellId;ht||ct||(null==tt?void 0:tt.data.teamId)!==this.battleController.leftTeam.id||this.sendBattlePassCastSpellEvent(nt.element),at.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&X.VyI.log(`Spell ${q.id} has been cast by ${null==tt?void 0:tt.battleId}`,X.$bb.Verbose),nt.target.unit===Q.ESpellUnitTarget.Random&&(null==tt?void 0:tt.data.teamId)===this.battleController.leftTeam.id&&(yield this.battleController.spellCardsController.targetController.targetRoulette(nt.target.team,this.battleController.getUnitById(q.targets[0].unitId),tt));const dt=this.battleController.getSpellComponentById(q.id);yield dt.loadPromise;const lt=at.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1),ft=new X.v14,mt=[],wt=J().cloneDeep(q.targets);let Tt=0;const St=new Map,At=(K,z=!1)=>{var Y,Z,J,st,rt,ht;const ct=wt.find((q=>q.unitId===(null==K?void 0:K.data.unitId))),dt=null!==(Y=q.targets.find((q=>q.unitId===(null==K?void 0:K.data.unitId))).hits.length)&&void 0!==Y?Y:0,ut=(null!==(Z=St.get(K))&&void 0!==Z?Z:-1)+1;St.set(K,ut);const bt=1===(null==ct?void 0:ct.hits.length),vt=null==ct?void 0:ct.hits.shift();if(!vt)return!1;if(lt&&X.VyI.log(`${ct.unitId} has been hit and took ${vt.damage} damage!`,X.$bb.Info),K.onApplyDamage.dispatch(vt),(vt.damage||vt.mpDamage||!this.spellFlagsIncludeAny(nt.flags,Et.NO_DAMAGE_SPELL_FLAGS))&&(!vt.damage&&vt.mpDamage||(z||(X.OQO.areBitsSet(vt.damageInformation,Q.EDamageInformation.Reflected)&&(vt.damageInformation&=~Q.EDamageInformation.Reflected),vt.hitCount=dt,vt.hitIndex=ut,_t.a.createHitInfoText(K,vt,nt.element,ft.push())),K.updateHp(vt.hpResult),Tt+=vt.damage),vt.mpDamage&&K.updateMp(vt.mpResult)),z||this.spellFlagsIncludeAny(nt.flags,Et.NO_SOUND_SPELL_FLAGS)||(vt.damageInformation&Q.EDamageInformation.Missed?at.q.instance.prodigy.audio.playSFX(8,pt.J.Miss):vt.damageInformation&Q.EDamageInformation.Heal?at.q.instance.prodigy.audio.playSFXFromGUID(et.B.Sfx_heal):vt.damageInformation&Q.EDamageInformation.Fumble?at.q.instance.prodigy.audio.playSFXFromGUID(et.B.Sfx_fumble_poof):(at.q.instance.prodigy.audio.playSFX(8,pt.J.Hit),vt.hpResult>0||!bt?(K.playHurt(),this.checkAndTriggerLowHealthAnimation(K,vt.damage)):K.creature.teleportType===gt.H0.Immediate&&K.playDefeated().catch(X.RQr.createHandler("Error playing defeat animation")))),this.findSpellFlag(nt.flags,Q.ESpellFlag.Rescue)){const q=null==tt?void 0:tt.data.teamId;if(q){const z=null===(J=this.battleController.getTeamById(q))||void 0===J?void 0:J.wizard;z&&(K.controllerUnit=z)}K.creature.teleportType=gt.H0.Astral,mt.push(K)}else if(this.findSpellFlag(nt.flags,Q.ESpellFlag.StealUnit)){const q=ft.push(),z=q=>{var K;const z=new X._mx(q.creature.creatureGameObject).addComponent(ot.v);z.GameObject.name="goop-front-spine",z.GameObject.addComponent(X.dLy).setPositionY(5),z.setAsset(it.Q.Spine_pet_shadow_effect_front_json,(()=>z.setAnimationByName(0,"idle",!0)));const Y=new X._mx(q.creature.creatureGameObject).addComponent(ot.v);Y.GameObject.name="goop-back-spine",Y.GameObject.sendToBack(),Y.setAsset(it.Q.Spine_pet_shadow_effect_back_json,(()=>Y.setAnimationByName(0,"idle",!0))),null===(K=q.creature.animator.spine)||void 0===K||K.getSpine().setTint(12421347)};this.battleController.moveUnitToTeam(K,tt.data.teamId,gt.H0.Shadow,z).catch(X.RQr.createHandler(`Error moving ${null===(st=null==K?void 0:K.data)||void 0===st?void 0:st.unitId} to ${tt.data.teamId} team`)).finally(q)}else vt.hpResult<=0&&0===ct.hits.length&&mt.push(K);if((null===(rt=vt.affixes)||void 0===rt?void 0:rt.length)>0)for(const q of vt.affixes)this.playBuffSound(),K.showAffix(q).catch(X.RQr.createHandler("Error adding affix to unit"));if((null===(ht=vt.removedAffixes)||void 0===ht?void 0:ht.length)>0)for(const q of vt.removedAffixes)K.removeAffix(q);return!0};let Ct;dt.onApplyDamage.add(((q,K)=>At(q.findComponentInParent(vt.Xc,!0),K)),this),tt&&this.battleController.getUnits().forEach((q=>{q===tt?q.updateLayerByPrefix(ut.a.ActiveSideCast):q.data.teamId===tt.data.teamId?q.layerLevel{const K=this.battleController.getUnitById(q.unitId);K&&Ot.push({unitId:q.unitId,gameObject:K.creature.creatureGameObject,statusEffectContainer:K.statusEffectContainer})})),yield dt.begin({caster:Ct,targets:Ot,manager:dt,multiHit:null!==(Y=nt.hits)&&void 0!==Y?Y:1,spellOriginOffset:null==tt?void 0:tt.spellOriginOffset});do{It=!1;for(const q of wt)q.hits.length>0&&(It=!0,At(this.battleController.getUnitById(q.unitId)));It&&(yield X.Egh.timeout(500))}while(It);dt.onApplyDamage.removeAll(this),yield null===(Z=this.battleController.battleBackgroundFX)||void 0===Z?void 0:Z.setDamage(this.battleController.getTotalTeamDamagePercentage((null==tt?void 0:tt.data.teamId)===Q.ETeamId.Away?Q.ETeamId.Home:Q.ETeamId.Away,!0),(null==tt?void 0:tt.data.teamId)===Q.ETeamId.Away,nt.id),mt.find((q=>q.battleId===(null==tt?void 0:tt.battleId)))&&(yield this.battleController.deactivateTurnIndicator()),yield this.defeatUnits(mt),this.battleController.castActionResultsDisplayTriggered(),yield ft.all();const Dt=bt.$.generateUID();let Rt=0;if(ht)if(1===q.targets.length){const K=this.battleController.getUnitById(q.targets[0].unitId),z=K.creature;lt&&X.VyI.log(`${z.name} has been rescued!`,X.$bb.Info);Rt=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.amountOfPet(z.id),yield rt.a.receivePet(z,Dt),K.isRescued=!0}else X.VyI.log("Rescue spell requires a single target.",X.$bb.Error);ct?this.sendMpRecoverySegmentData(tt,0):this.sendBattleActionSegmentData({spellId:q.id,activeUnit:tt,spellData:nt,totalHitDamage:Tt,targetData:q.targets,captureTransactionId:Dt,previousPetCopies:Rt,appliedStatusEffects:q.statusEffectsApplied}),this.stateMachine.goToState(yt.B)}))}sendBattleActionSegmentData(q){var K,z,Y,X,Z,J,tt;const et=q.activeUnit,it=q.spellData,nt=q.targetData.map((q=>q.unitId)),at=nt.length>0?this.battleController.getUnitById(nt[0]):void 0,rt=this.stateMachine.segment.battleRevamp,ot=et?et.creature.isOpponent?ct.B1.Opponent:ct.B1.Player:void 0;if(rt.sendBattleActionPerformedEvent({team:ot,character_name:et?et.type!==st.uj.Wizard||et.creature.isOpponent?et.name:ht.z.PLAYER_SEGMENT_ID:void 0,character_id:null==et?void 0:et.data.unitId,mp_cost:it.cost,action_name:it.name,action_type:q.spellId===this.battleController.battleConstants.rescueSpellId?"Rescue":it.element,action_damage:q.totalHitDamage,action_modifier:(null==et?void 0:et.affixes.find((q=>q.type===Q.EAffixType.AdditiveDamageMultiplier&&q.instances.some((q=>Q.Util.singleOrArrayIncludes(q.element,it.element))))))?"duel_element_boost":void 0,target_name:1===nt.length?null==at?void 0:at.name:it.target.unit,target_type:it.target,target_team:at?at.data.teamId===Q.ETeamId.Home?ct.B1.Player:ct.B1.Opponent:void 0,target_hits:q.targetData.map((q=>{const K=this.battleController.getUnitById(q.unitId);return{target_id:q.unitId,target_name:null==K?void 0:K.name,target_position:rt.getUnitPosition(K,this.battleController),target_hp:null==K?void 0:K.currentHp,hits:rt.getHitInformation(q.hits)}})),target_hp:nt.map((q=>this.battleController.getUnitById(q).currentHp)).reduce(((q,K)=>q+K),0),target_mp:nt.map((q=>this.battleController.getUnitById(q).currentMp)).reduce(((q,K)=>q+K),0),intended_status_effects:null!==(z=null===(K=q.spellData.statusEffects)||void 0===K?void 0:K.map((q=>q.statusEffectId)))&&void 0!==z?z:[],status_effects_applied:q.appliedStatusEffects?Object.keys(q.appliedStatusEffects).map(Number):[]}),(null===(Y=null==it?void 0:it.flags)||void 0===Y?void 0:Y.some((q=>q.flag===Q.ESpellFlag.Rescue)))&&1===nt.length){const K=at;this.stateMachine.segment.battleRevamp.sendBattlePetCapturedEvent({petName:null!==(Z=null===(X=K.creature)||void 0===X?void 0:X.nickname)&&void 0!==Z?Z:K.name,petLevel:K.level,petElement:K.data.element,petType:ft.P8.getPetEvolutionType(null===(J=K.creature)||void 0===J?void 0:J.id),petRarity:K.data.rarity,petRank:null!==(tt=K.data.mergeRank)&&void 0!==tt?tt:0,previousPetCopies:q.previousPetCopies,captureSource:ct.z2.InBattle},{transaction_id:q.captureTransactionId})}}findSpellFlag(q,K){if(q)return q.find((q=>q.flag===K))}spellFlagsIncludeAny(q,K){return!!q&&q.some((q=>K.has(q.flag)))}sendBattlePassCastSpellEvent(q){const K=at.q.instance.prodigy.gameContainer.get("b37-c775"),z=`Cast${bt.$.capitalizeFirstLetter(q)}Spell`;K.sendQuestEventViaHub(z,{}).catch(X.RQr.createHandler(`Error sending a battle pass quest event for casting a spell of the ${q} element`)),K.sendQuestEventViaHub(nt.T.CAST_SPELL,{}).catch(X.RQr.createHandler("Error sending a battle pass quest event for casting a spell"))}playBuffSound(){at.q.instance.prodigy.audio.playSFXFromGUID(et.B.Sfx_unit_buff_positive)}}Et.NO_DAMAGE_SPELL_FLAGS=new Set([Q.ESpellFlag.Rescue,Q.ESpellFlag.StealUnit,Q.ESpellFlag.NoDamage]),Et.NO_SOUND_SPELL_FLAGS=new Set([Q.ESpellFlag.Rescue,Q.ESpellFlag.StealUnit,Q.ESpellFlag.NoDamage]),(0,Y.Cg)([(0,lt.d)("GameDataProvider"),(0,Y.Sn)("design:type",mt.q)],Et.prototype,"_gameDataProvider",void 0),(0,Y.Cg)([(0,dt.b)("7a9-ac2f"),(0,Y.Sn)("design:type",Object)],Et.prototype,"_dynamicStore",void 0),(0,Y.Cg)([(0,tt.sg)(200),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],Et.prototype,"playBuffSound",null)},52855:(q,K,z)=>{"use strict";z.d(K,{a:()=>ft});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(95891),J=z.n(Z),tt=z(99625),et=z(28628),it=z(35120),st=z(98193),nt=z(630),at=z(89584);class rt{static isHitEffective(q){return(q.damageInformation&Q.EDamageInformation.Effective)===Q.EDamageInformation.Effective}static isHitIneffective(q){return(q.damageInformation&Q.EDamageInformation.Ineffective)===Q.EDamageInformation.Ineffective}static isHitAbsorbed(q){return(q.damageInformation&Q.EDamageInformation.Absorb)===Q.EDamageInformation.Absorb}static extractParallelHitInfos(q,K,z){let Y=[];if(K){if(Y.push(q),z){const K=[Q.EDamageInformation.Absorb,Q.EDamageInformation.Effective,Q.EDamageInformation.Ineffective],z=this.extractFirstMatchingDamage(q,K);z&&Y.push(z)}return Y}const X=this.extractFirstMatchingDamage(q,[Q.EDamageInformation.CriticalHit,Q.EDamageInformation.Dodge]),Z=this.extractFirstMatchingDamage(q,[Q.EDamageInformation.Effective,Q.EDamageInformation.Ineffective]);return X&&Z&&!this.isHitAbsorbed(q)&&Y.push(X,Z),0===Y.length&&Y.push(q),Y}static extractFirstMatchingDamage(q,K){for(const z of K)if((q.damageInformation&z)===z)return Object.assign(Object.assign({},q),{damageInformation:z});return null}static getPrimaryDisplayConfig(q){if(!X.Aq$.isDefined(rt.primaryDisplayConfigs[q]))return null;for(const[K,z]of Object.entries(rt.primaryDisplayConfigs)){const Y=Number(K);if((q&Y)===Y)return z}return null}}rt.primaryDisplayConfigs={[Q.EDamageInformation.CriticalHit]:{textOffsetY:50,delayNext:800},[Q.EDamageInformation.Dodge]:{textOffsetY:-25,delayNext:400}};var ot=z(95807),ht=z(71391),ct=z(64868),dt=z(63343),lt=z(96810),ut=z(34234);class ft extends ot.Z{constructor(q){super(),this._data=q}static createHitInfoText(q,K,z,Y){const{hitCount:Q,hitIndex:Z}=K,J=X.Aq$.isDefined(Q)&&Q>1,et=J&&0===Z,st=rt.extractParallelHitInfos(K,J,et);let nt=0;st.forEach(((K,Q)=>{var X,Z;const ot=it.q.instance.prodigy.gameContainer.get("983-05a7").loadFromGUID(tt.l.RevampSpellHitInfo).findComponent(at.h),ht=q.creature.worldPosition.x;let ct=Math.max(q.creature.worldPosition.y+q.creature.hitbox.y,ft.DAMAGE_TEXT_MIN_Y),dt=null;const lt={onlyShowDamageNumber:!1,onlyShowIndicator:!1};J?(lt.onlyShowDamageNumber=!0,1===Q&&et&&(lt.onlyShowDamageNumber=!1,lt.onlyShowIndicator=!0,lt.suppressSfx=!0)):Q>0?(lt.onlyShowIndicator=!0,lt.deemphasizeIndicator=!0):st.length>1&&(dt=rt.getPrimaryDisplayConfig(K.damageInformation)),dt&&(ct+=null!==(X=dt.textOffsetY)&&void 0!==X?X:0),setTimeout((()=>ot.setupAndDisplay(ht,ct,K,z,Q===st.length-1?Y:void 0,lt)),nt),nt+=null!==(Z=null==dt?void 0:dt.delayNext)&&void 0!==Z?Z:0}))}sendMpRecoverySegmentData(q,K){q.creature.isOpponent||this.stateMachine.segment.battleRevamp.sendBattleMpRecoveryAttemptedEvent({character_name:q.type===et.uj.Wizard?st.z.PLAYER_SEGMENT_ID:q.name,success:!(K<=0),mp_recovered:K,automatic:!0})}checkAndTriggerLowHealthAnimation(q,K){var z;if(!(null==q?void 0:q.data))return;const Y=this.battleController.leftTeam.units.filter((q=>q.isAlive())),Q=1===Y.length?Y[0]:void 0,Z=!!Q&&Q.currentHp/Q.maxHp<.5;!q.creature.isOpponent&&K>0&&Z&&1===Y.length&&(null===(z=this.stateMachine.lowHealthPreviewComponent)||void 0===z?void 0:z.GameObject)&&(this.stateMachine.lowHealthPreviewComponent.GameObject.active=!0,this.stateMachine.lowHealthPreviewComponent.playAnimation().catch((q=>{X.VyI.log(`Unable to play low health background pulse: ${X.RQr.stringify(q)}`,X.$bb.Error)})))}defeatUnits(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;const Z=this.stateMachine.stateUpdateQueue.filter((q=>q.type===Q.EBattleStateUpdate.DefeatUnit)),tt=ct._.hasDefeatedPetStore()?this._defeatedPetsIcon:void 0,{true:et=[],false:it=[]}=J().groupBy(q,(q=>{var K;return!!(null===(K=Z.find((K=>K.unitId===q.battleId)))||void 0===K?void 0:K.storedInDefeatedPets)}));if(et.sort(((q,K)=>q.storeTeleportPriority-K.storeTeleportPriority)),null===(K=this.battleController.spellCardsController)||void 0===K||K.hidePetRescue(),yield Promise.all(it.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return q.defeatUnit(nt.rC.Exit)}))))),0===et.length||!tt)return;dt.E.recordDefeatedPetsFunnelStep(lt.l.DynamicStoreDefeatedPet),yield tt.show(),tt.expectingMultipleAdditions=et.length>1;const st=[];for(let q=0;q(0,Y.sH)(this,void 0,void 0,(function*(){yield K.defeatUnit(nt.rC.ExitToStore),tt.addPet(K.data)}))))),yield X.Egh.timeout(null!==(z=ft.EXIT_TO_STORE_STAGGER_MS[q])&&void 0!==z?z:0)}yield Promise.all(st),yield tt.hide()}))}}ft.DAMAGE_TEXT_MIN_Y=190,ft.EXIT_TO_STORE_STAGGER_MS=[150,250,250,250],(0,Y.Cg)([(0,ut.d)("DefeatedPetsIcon",!1),(0,Y.Sn)("design:type",ht.D)],ft.prototype,"_defeatedPetsIcon",void 0)},80313:(q,K,z)=>{"use strict";z.d(K,{x:()=>J});var Y=z(62459),Q=z(35120),X=z(63046),Z=z(52855);class J extends Z.a{enter(){const q=this._data,K=this.battleController.getUnits().find((K=>K.battleId===q.unitId));this.battleController.activeUnitSpellData=q.spellData,this.stateMachine.segment.battleRevamp.setTurn(q.turn),this.battleController.setActiveUnit(K).then((()=>{var q;Q.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableVerboseSecureBattle",!1)&&Y.VyI.log(`Active unit has been switched to ${null===(q=this.battleController.activeUnit)||void 0===q?void 0:q.battleId}!`,Y.$bb.Info),this.stateMachine.goToState(X.B)})).catch((q=>{Y.RQr.logError(q,"Error changing active unit"),this.stateMachine.showThrownErrorDialog(q)}))}}},61404:(q,K,z)=>{"use strict";z.d(K,{Q:()=>Y});class Y{static getWaveFadeFragment(){return"precision highp float;\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float time;\nuniform float fade;\nuniform float amplitude;\nuniform float frequency;\n\t\nvoid main(void) {\n float xOff = sin(vTextureCoord.y * frequency + time) * amplitude;\n vec2 coord = vTextureCoord + vec2(xOff, 0.0);\n vec2 mirrored = abs(mod(coord + 1.0, 2.0) - 1.0);\n vec4 color = texture2D(uSampler, mirrored);\n color *= fade;\n gl_FragColor = color;\n}\n"}static getStarfieldFragment(){return"#define PI 3.14159\nprecision highp float;\nvarying vec2 vTextureCoord;\nuniform float time;\nuniform float alpha;\nuniform vec3 bgColor;\nuniform vec3 trail1;\nuniform vec3 trail2;\n\n\nvec2 line(vec2 radialCoords, float time) {\n float angle = radialCoords.x;\n float dist = radialCoords.y;\n dist *= 0.05;\n angle *= 256.0; // multiple around\n float interRadialDistance = sin(angle * PI);\n angle = floor(angle); // round the angle\n float offset = sin(angle * 13.37); // randomized distance offset\n float speed = cos(angle * 123.45) * 0.2 + 0.5;\n float inverseTrailSize = 70.0;\n \n float yv = fract(dist + time * speed + offset) * inverseTrailSize;\n float f = yv;\n yv = yv * 0.3;\n yv = smoothstep(0.0, 1.0, yv);\n yv = 1.0 - yv;\n yv *= speed * 5.0; // faster = brighter\n \n \n \n return vec2(min(1.0, yv * interRadialDistance * interRadialDistance), f);\n}\n\nvoid main(void) {\n vec2 p = vTextureCoord * 2.0 - 1.0;\n float radialFade = length(p) - 0.01;\n float angle = atan(p.x, p.y) / PI;\n float radialStretch = 2.5 / radialFade;\n vec2 radialCoords = vec2(angle, radialStretch);\n vec2 c1 = line(radialCoords, time);\n\n float revRadialFade = 1.0 - radialFade;\n c1.x *= 1.0 - revRadialFade * revRadialFade;\n\n // vec3 col = mix(trail1, trail2, max(min(c1.y, 1.),0.)); // blend color along trail\n // vec3 col = mix(trail1, trail2, (fract(angle* 13.37))); // blend color along star\n vec3 col = mix(trail1, trail2, floor(fract(angle* 13.37)*1.99)); // stars only color 1/2\n\n col = mix(bgColor, col, c1.x);\n\n // Output to screen\n gl_FragColor = vec4(col * alpha, alpha);\n}\n"}}},45855:(q,K,z)=>{"use strict";z.d(K,{g:()=>nt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(94596),tt=z(90351),et=z(68910),it=z(61404);class st extends et.Filter{constructor(q=0){super(et.defaultFilterVertex,it.Q.getStarfieldFragment(),{time:q,bgColor:[.161,.059,.275],trail1:[.729,.612,.718],trail2:[.514,.102,.561]}),this.alpha=1,this.timeSeconds=q}apply(q,K,z,Y){this.uniforms.time=this.timeSeconds,this.uniforms.alpha=this.alpha,q.applyFilter(this,K,z,Y)}}let nt=class extends J.b{constructor(){super(...arguments),this.DEFAULT_FADE_DURATION_MS=2e3,this.speed=.5,this.fadeValue=1,this._fadeInDurationMs=this.DEFAULT_FADE_DURATION_MS,this._fadeOutDurationMs=this.DEFAULT_FADE_DURATION_MS,this._fadeInEase=tt.i.LinearNone,this._fadeOutEase=tt.i.LinearNone}initialize(){super.initialize(),this._starfieldFilter=new st,this._filterList.push(this._starfieldFilter)}fadeIn(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.fade(0,1,this._fadeInDurationMs,this._fadeInEase)}))}fadeOut(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.fade(1,0,this._fadeOutDurationMs,this._fadeOutEase)}))}fade(q,K,z,Z){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this._tween)return void Q.VyI.log("Cannot start fade, a fade is already in progress.",Q.$bb.Warning);this.fadeValue=q;const Y={fade:q};this._tween=X.q.instance.game.add.tween(Y,this).to({fade:K},z,tt.K.getEasingFunctionFromEnum(Z),!0),this._tween.onUpdate.add((()=>{this.fadeValue=Y.fade})),yield this._tween.onTweenComplete.asPromise(),this._tween=null}))}update(){super.update(),this._starfieldFilter&&(this._starfieldFilter.timeSeconds=X.q.instance.game.time.timeMS/1e3*this.speed,this._starfieldFilter.alpha=this.fadeValue)}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"speed",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_fadeInDurationMs",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_fadeOutDurationMs",void 0),(0,Y.Cg)([(0,Q.gfw)(tt.i),(0,Y.Sn)("design:type",String)],nt.prototype,"_fadeInEase",void 0),(0,Y.Cg)([(0,Q.gfw)(tt.i),(0,Y.Sn)("design:type",String)],nt.prototype,"_fadeOutEase",void 0),nt=(0,Y.Cg)([(0,Q.EVk)("StarfieldFilter",Z.Y.effect)],nt)},99979:(q,K,z)=>{"use strict";z.d(K,{XP:()=>Y,bf:()=>tt,gI:()=>et});var Y,Q=z(87490),X=z(88022),Z=z(35120);!function(q){q.fire="icon-mini-element-fire",q.water="icon-mini-element-water",q.plant="icon-mini-element-plant",q.ice="icon-mini-element-ice",q.storm="icon-mini-element-storm",q.shadow="icon-mini-element-shadow",q.physical="icon-mini-element-physical",q.astral="icon-mini-element-astral"}(Y||(Y={}));const J={[Q.EElementType.Fire]:Y.fire,[Q.EElementType.Water]:Y.water,[Q.EElementType.Plant]:Y.plant,[Q.EElementType.Ice]:Y.ice,[Q.EElementType.Storm]:Y.storm,[Q.EElementType.Shadow]:Y.shadow,[Q.EElementType.Physical]:Y.physical,[Q.EElementType.Astral]:Y.astral};var tt;!function(q){q.fire="elemental-base-fire",q.water="elemental-base-water",q.plant="elemental-base-earth",q.ice="elemental-base-ice",q.storm="elemental-base-storm",q.shadow="elemental-base-shadow",q.physical="elemental-base-physical",q.astral="elemental-base-astral"}(tt||(tt={}));Q.EElementType.Fire,tt.fire,Q.EElementType.Water,tt.water,Q.EElementType.Plant,tt.plant,Q.EElementType.Ice,tt.ice,Q.EElementType.Storm,tt.storm,Q.EElementType.Shadow,tt.shadow,Q.EElementType.Physical,tt.physical,Q.EElementType.Astral,tt.astral;class et{static getElementIconTexture(q){const K=J[q];return Z.q.instance.game.cache.getTexture(X._.Ui_battle_revamp_json,K)}}},25834:(q,K,z)=>{"use strict";z.d(K,{T:()=>at});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z.n(Z),tt=z(50508),et=z(8394),it=z(15821),st=z(1195),nt=z(80105);let at=class{constructor(){this._hasPopulatedFromSecure=!1,this._previouslyUsedByUniqueId={}}initialize(){const q=this._player.player.kennel;{const K=this._inventory.getAllOfType("pet").map((q=>{const K={uniqueID:q.data.uniqueId};return this.updateDataFromSecurePet(K,q),K}));q.populateKennel(K),this._hasPopulatedFromSecure=!0}this._inventory.onChange.removeAll(this),this._inventory.onChange.add((K=>(0,Y.sH)(this,void 0,void 0,(function*(){var z;if(!(0,et.u)("pet",K))return;let Y=q.data.find((q=>q.uniqueID===K.data.uniqueId));if(0===K.quantity)return void(Y&&(this._previouslyUsedByUniqueId[Y.uniqueID]=Y,q.removePetData(Y)));let Q=!1;Y||(Y=null!==(z=this._previouslyUsedByUniqueId[K.data.uniqueId])&&void 0!==z?z:{uniqueID:K.data.uniqueId},Q=!0),this.updateDataFromSecurePet(Y,K),this.updateTeamAssignment(K.data,Y),Q&&q.addPetFromData(Y)}))),this)}getSecureData(q){var K;return null===(K=this._inventory.getAllOfType("pet").find((K=>{var z;return(null===(z=K.data)||void 0===z?void 0:z.uniqueId)===q})))||void 0===K?void 0:K.data}add(q){this._net.add(q).then((K=>{const z=this._inventory.getAllOfType("pet").find((q=>q.data.uniqueId===K));if(!z)throw new Error("Returned pet does not exist in inventory");this.updateDataFromSecurePet(q,z)})).catch(Q.RQr.createHandler("Failed to create secure pet"))}remove(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this._net.remove(q)}))}saveUpdatedPets(...q){if(!this._hasPopulatedFromSecure)return;const K=[],z=J().keyBy(q,"uniqueID");for(const Y of this._inventory.getAllOfType("pet")){const{uniqueId:q}=Y.data,X=z[q];if(!Q.Aq$.isDefined(null==X?void 0:X.uniqueID))continue;const Z={uniqueID:q};this.updateDataFromSecurePet(Z,Y);const tt=J().omit(X,["hp","foreignSpells","evolve"]);it.A.isDeepEqualOrNullishAcyclic(Z,tt)||K.push({id:{type:Y.type,id:Y.id,uuid:Y.uuid},data:X})}0!==K.length&&this._net.update(K).catch(Q.RQr.createHandler(`Could not save updated pets ${JSON.stringify(q.map((q=>q.uniqueID)))}`))}updateDataFromSecurePet(q,K){var z;const Y=K.data;if((null==Y?void 0:Y.uniqueId)!==q.uniqueID)throw new Error("Attempted to overwrite one pet with another");q.ID=K.id,q.nickname=Y.nickname,q.level=Y.level.current,q.nextLevelProgressPercent=Y.level.percentToNext,q.stars=Y.level.stars,q.levelCaught=Y.caught.level,q.catchDate=Y.caught.date,q.mergeRank=Y.mergeRank,q.team=Y.positionInTeam,q.temporaryTeamPosition=Y.temporaryTeamPosition,q.evolutionCount=Y.evolutionCount,null!==(z=q.gear)&&void 0!==z||(q.gear={});for(const Q of tt.p)q.gear[Q]=Y.gear[Q]}updateTeamAssignment(q,K){var z;if(q.positionInTeam===K.team)return;const Y=this._player.player.kennel;Q.Aq$.isDefined(K.team)&&(null===(z=Y.getTeamPosition(K.team))||void 0===z?void 0:z.data)===K&&Y.removeAtTeamPosition(K.team),Q.Aq$.isDefined(q.positionInTeam)&&Y.setTeamPosition(K,q.positionInTeam)}};(0,Y.Cg)([(0,X.inject)("ad2-c5b2"),(0,Y.Sn)("design:type",st.E)],at.prototype,"_player",void 0),(0,Y.Cg)([(0,X.inject)("6d6-463e"),(0,Y.Sn)("design:type",nt.U)],at.prototype,"_inventory",void 0),(0,Y.Cg)([(0,X.inject)("9c0-de04"),(0,Y.Sn)("design:type",Function)],at.prototype,"_net",void 0),at=(0,Y.Cg)([(0,X.injectable)()],at)},80105:(q,K,z)=>{"use strict";z.d(K,{U:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(95891),tt=z.n(J),et=z(35537);const it="stackable";let st=class{constructor(){this.onChange=new X.HN0,this._cacheByPath={},this._cacheByUuid={},this[Y]="secureInventoryChanges"}initialize(q){this._cacheByPath={},this._cacheByUuid={};for(const K of q)this.replaceItem(K)}get(q){var K;if(X.Aq$.isDefined(q))return"string"==typeof q?this._cacheByUuid[q]:tt().get(this._cacheByPath,[q.type,q.id,null!==(K=q.uuid)&&void 0!==K?K:it])}getAllOfType(q){var K;const z=[];for(const Y of Object.values(null!==(K=this._cacheByPath[q])&&void 0!==K?K:{}))for(const q of Object.values(Y))z.push(q);return z}getCount(q){var K,z;if(!X.Aq$.isDefined(q))return 0;const Y=tt().get(this._cacheByPath,[q.type,q.id],{});return X.Aq$.isDefined(q.uuid)?null!==(z=null===(K=Y[q.uuid])||void 0===K?void 0:K.quantity)&&void 0!==z?z:0:Object.values(Y).map((q=>q.quantity)).reduce(((q,K)=>q+K),0)}[(Y=et.sE,et.JN)](q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=new Map;for(const z of q)K.set(z,this.replaceItem(z));for(const z of q){const q=K.get(z);tt().isEqual(z,q)||this.onChange.dispatch(z,q)}}))}destroy(){this.onChange.dispose()}replaceItem(q){var K;const z=null!==(K=q.uuid)&&void 0!==K?K:it,Y=[q.type,q.id,z],Q=tt().get(this._cacheByPath,Y);return q.quantity>0?(tt().setWith(this._cacheByPath,Y,q,Object),this._cacheByUuid[z]=q):(tt().unset(this._cacheByPath,Y),delete this._cacheByUuid[z]),Q}};st=(0,Q.Cg)([(0,Z.injectable)()],st)},91620:(q,K,z)=>{"use strict";z.d(K,{D:()=>yt});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(90633),tt=z(8394),et=z(98252),it=z(35120),st=z(1195),nt=z(77938),at=z(73797),rt=z(67665),ot=z(96494),ht=z(13956),ct=z(30226),dt=z(82885);!function(q){q.DualPackage="dual-package",q.UltraFocused="ultra-focused"}(Y||(Y={}));class lt extends dt.J{}lt._featureName="contextual-offers",lt._defaultConfig={enabled:!1,promptVariant:void 0};var ut=z(10674),ft=z(43516),bt=z(36233);class pt{getAvailableOffers(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=bt.p.getVariables();return(null==q?void 0:q.enabled)?[q]:[]}))}}var vt=z(3519),gt=z(96797);class mt{getAvailableOffers(){return(0,Q.sH)(this,void 0,void 0,(function*(){try{return(yield this._networkHandler.getSegmentedOffers()).offers}catch(q){return X.VyI.log(`Error loading Segmented Offers: ${q}`,X.$bb.Error),[]}}))}}(0,Q.Cg)([(0,ht.b)("9ef-4fbf"),(0,Q.Sn)("design:type",vt.U)],mt.prototype,"_networkHandler",void 0);let yt=class{get meetsMembershipRequirement(){return this._meetsMembershipRequirement}constructor(){this._dataSources=[new mt,new pt],this._meetsMembershipRequirement=!1,it.q.instance.prodigy.game.broadcaster.addAppListener(at.H3.MembershipResponseReceived,this.handleMembershipChange.bind(this),this,void 0,!0)}loadOffersFromData(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!X.Aq$.isDefined(this._cachedData)){for(const q of this._dataSources){const K=yield q.getAvailableOffers();if(K.length>0){this._cachedData=K;break}}this.checkOfferAssignment().then(this.processMembershipRequirement.bind(this)).catch(X.RQr.createHandler("Failed to process segmented offer membership requirement"))}}))}getActiveOfferAsync(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;return X.Aq$.isDefined(this._loadDataPromise)||(this._loadDataPromise=this.loadOffersFromData()),yield this._loadDataPromise,null===(q=this._cachedData)||void 0===q?void 0:q.find((q=>gt.P.isOfferActive(q)||gt.P.isOfferInGracePeriod(q)))}))}checkOfferAssignment(){return(0,Q.sH)(this,void 0,void 0,(function*(){!this.userHasOfferAvailable()&&X.Aq$.isDefined(this.activeOffer)&&(yield this.assignActiveOfferToPlayer(),this._segment.segmentedOffers.sendSegmentedOfferAssignedEvent(this.activeOffer,gt.P.getUserSegmentIndex(this.activeOffer)),this.setBreadcrumbUserHasOfferAvailable())}))}destroy(){it.q.instance.prodigy.game.broadcaster.removeAppListener(at.H3.MembershipResponseReceived,this,void 0)}handleMembershipChange(q){"success"===q&&this.processMembershipRequirement().catch(X.RQr.createHandler("Failed to process segmented offer membership requirement"))}processMembershipRequirement(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this.activeOffer)return void(this._meetsMembershipRequirement=!1);if(this.isPlayerOfferStateValid()||(this._loggedInPlayer.player.clearSegmentedOfferState(),yield this.assignActiveOfferToPlayer()),!X.Aq$.isDefined(this._loggedInPlayer.player.data.segmentedOfferState))return void(this._meetsMembershipRequirement=!1);const q=this._loggedInPlayer.player.data.segmentedOfferState;if(void 0===q.startingMembership)return void(this._meetsMembershipRequirement=this._loggedInPlayer.isMember());const K=yield this._loggedInPlayer.player.getActiveMathMembership();if(!X.Aq$.isDefined(K)||!this._loggedInPlayer.isMember())return yield this.assignActiveOfferToPlayer(),void(this._meetsMembershipRequirement=!1);q.startingMembership===K.currentPackage.id?(this._loggedInPlayer.player.data.segmentedOfferState.upgradeOptions=(null==K?void 0:K.upgradeOptions)||[],this._loggedInPlayer.player.forceSaveCharacter(),this._meetsMembershipRequirement=!1):this._meetsMembershipRequirement=!0}))}isPlayerOfferStateValid(){var q;return this.activeOffer?(null===(q=this._loggedInPlayer.player.data.segmentedOfferState)||void 0===q?void 0:q.offerId)===this.activeOffer.id:void 0===this._loggedInPlayer.player.data.segmentedOfferState}get currentOfferStatus(){const q=this.activeOffer;return q&&this._loggedInPlayer.player.hasCompletedTutorial()?gt.P.isOfferEndingSoon(q)?ft.v.OFFER_ENDING_SOON:gt.P.isOfferInGracePeriod(q)?ft.v.OFFER_IN_GRACE_PERIOD:ft.v.OFFER_ACTIVE:ft.v.NO_ACTIVE_OFFER}get rewardsForCurrentUserSegment(){const q=this.activeOffer;if(!q)return[];const K=gt.P.getUserSegment(q);return K?K.rewards:[]}get activeOffer(){var q;if(void 0!==this._cachedData)return null===(q=this._cachedData)||void 0===q?void 0:q.find((q=>gt.P.isOfferActive(q)||gt.P.isOfferInGracePeriod(q)));X.VyI.log("Attemping to read active segmented offer before it was loaded. Try getActiveOfferAsync() to first load the data",X.$bb.Warning)}assignActiveOfferToPlayer(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;this.activeOffer&&(this._loggedInPlayer.isMember()?this._loggedInPlayer.player.setSegmentedOfferState({offerId:this.activeOffer.id,startingMembership:null===(K=null===(q=yield this._loggedInPlayer.player.getActiveMathMembership())||void 0===q?void 0:q.currentPackage)||void 0===K?void 0:K.id,upgradeOptions:(yield this._loggedInPlayer.player.getMembershipUpsellData()).upgradeOptions}):this._loggedInPlayer.player.setSegmentedOfferState({offerId:this.activeOffer.id,startingMembership:void 0,upgradeOptions:[]}))}))}redeemActiveOffer(){const q=this.rewardsForCurrentUserSegment,K=this.activeOffer;q.length>0&&(this.resetSurfacingBreadcrumbs(),this._loggedInPlayer.player.clearSegmentedOfferState(),this._networkHandler.redeemOffer(K.id,gt.P.getUserSegmentIndex(K)).then((q=>{q.items.some((q=>"petHat"===q.type||"petRelic"===q.type))&&this._petGearInventory.refreshPetGear().catch(X.RQr.createHandler("Failed to refresh pet gear after redeeming segmented offer"))})).catch(X.RQr.createHandler(`Failed to redeem segmented offer. Offer ID: ${K.id}.`)).finally((()=>{this._loggedInPlayer.player.encounters.setOfferResolved(K.id)})),q.forEach((q=>{var K,z,Y;(0,tt.p)(q.type,q.ID)?this._segment.item.sendItemReceivedEvent(q.ID,null===(z=null===(K=nt.t.getItem(q.type,q.ID))||void 0===K?void 0:K.data)||void 0===z?void 0:z.name,q.type,null!==(Y=q.N)&&void 0!==Y?Y:1,{source_type:"segmented_offers_reward"}):ct.J.bagItem(q,it.q.instance.prodigy.game,"got-item",void 0)})),this.processMembershipRequirement().catch(X.RQr.createHandler("Failed to process segmented offer membership requirement")))}rejectActiveOffer(){const q=this.activeOffer;q&>.P.isOfferInGracePeriod(q)&&(this.resetSurfacingBreadcrumbs(),this._loggedInPlayer.player.encounters.setOfferResolved(q.id),this._loggedInPlayer.player.clearSegmentedOfferState(),this.processMembershipRequirement().catch(X.RQr.createHandler("Failed to process segmented offer membership requirement")))}userHasChangedSegment(){const q=this.activeOffer,K=this._currentSegmentIndex;return!!q&&(this._currentSegmentIndex=gt.P.getUserSegmentIndex(q),X.Aq$.isDefined(K)&&X.Aq$.isDefined(this._currentSegmentIndex)&&this._currentSegmentIndex!==K)}userCanReceiveSegmentedOffers(){const q=this._loggedInPlayer.player.hasCompletedTutorial(),K=!this._loggedInPlayer.isMember()||this._loggedInPlayer.player.hasMembershipUpgradeOptions();return q&&K&&!et.pF.isNativeApp()}userHasEligibleOfferAvailable(){return this.currentOfferStatus!==ft.v.NO_ACTIVE_OFFER&&this.userCanReceiveSegmentedOffers()}shouldAutoSurfaceSegmentedOffers(){return!this._loggedInPlayer.player.isPlayingAtSchool()||!lt.isFeatureEnabled()}userHasLastChance(){return this.currentOfferStatus===ft.v.OFFER_IN_GRACE_PERIOD&&!this._breadcrumbManager.isBreadcrumbComplete(J.B.FEATURE_SEGMENTED_OFFERS,J.B.BREADCRUMB_SEGMENTED_OFFERS_SUPPRESS_LAST_CHANCE)}userHasOfferAvailable(){return this._breadcrumbManager.isBreadcrumbComplete(J.B.FEATURE_SEGMENTED_OFFERS,J.B.BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE)}userHasSeenFirstOffer(){return this._breadcrumbManager.isBreadcrumbComplete(J.B.FEATURE_SEGMENTED_OFFERS,J.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN)}userHasSeenFirstBattleLost(){return this._breadcrumbManager.isBreadcrumbComplete(J.B.FEATURE_SEGMENTED_OFFERS,J.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST)}setBreadcrumbUserHasOfferAvailable(){this.activeOffer&&this._breadcrumbManager.completeBreadcrumb(J.B.FEATURE_SEGMENTED_OFFERS,J.B.BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE)}setBreadcrumbHasSeenFirstOffer(){this._breadcrumbManager.completeBreadcrumb(J.B.FEATURE_SEGMENTED_OFFERS,J.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN)}setBreadcrumbHasSeenFirstBattleLost(){this._breadcrumbManager.completeBreadcrumb(J.B.FEATURE_SEGMENTED_OFFERS,J.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST)}resetSurfacingBreadcrumbs(){this._breadcrumbManager.resetBreadcrumbs(J.B.FEATURE_SEGMENTED_OFFERS)}};(0,Q.Cg)([(0,ht.b)("ad2-c5b2"),(0,Q.Sn)("design:type",st.E)],yt.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,ht.b)("fa1-8ec9"),(0,Q.Sn)("design:type",ot.F)],yt.prototype,"_breadcrumbManager",void 0),(0,Q.Cg)([(0,ht.b)("20f-5f67"),(0,Q.Sn)("design:type",rt.Y)],yt.prototype,"_segment",void 0),(0,Q.Cg)([(0,ht.b)("9ef-4fbf"),(0,Q.Sn)("design:type",vt.U)],yt.prototype,"_networkHandler",void 0),(0,Q.Cg)([(0,ht.b)("9cf-c09f"),(0,Q.Sn)("design:type",ut.q)],yt.prototype,"_petGearInventory",void 0),yt=(0,Q.Cg)([(0,Z.injectable)(),(0,Q.Sn)("design:paramtypes",[])],yt)},3519:(q,K,z)=>{"use strict";z.d(K,{U:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(67238);let J=class extends Z.D{redeemOffer(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.call(X.D.SegmentedOffers.RedeemOffer,{offerId:q,segmentIndex:K},!0)}))}getSegmentedOffers(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.call(X.D.SegmentedOffers.GetOffers,{},!0)}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},96797:(q,K,z)=>{"use strict";z.d(K,{P:()=>ct});var Y=z(99625),Q=z(38170);class X{static isOfferInDateRange(q,K){return Q.r.isDateWithinRange(K,q.startDate,q.endDate)}static isOfferInGracePeriodDateRange(q,K){const z=new Date(q.endDate).getTime(),Y=z+q.gracePeriodDays*X.DAY_IN_MS;return Q.r.isDateWithinRange(K,z,Y)}}X.DAY_IN_MS=864e5;var Z=z(35120),J=z(91207),tt=z(34829),et=z(77938),it=z(65050),st=z(96810),nt=z(41674),at=z(64353),rt=z(95057),ot=z(53661),ht=z(47255);class ct{static isOfferActive(q){return X.isOfferInDateRange(q,Date.now())&&!ct.userHasResolvedOffer(q)}static isOfferEndingSoon(q){const K=new Date(q.endDate).getTime(),z=K-q.endingSoonDays*tt.A.DAY_IN_MS;return Q.r.isDateWithinRange(Date.now(),z,K)&&!ct.userHasResolvedOffer(q)}static isOfferInGracePeriod(q){return X.isOfferInGracePeriodDateRange(q,Date.now())&&!ct.userHasResolvedOffer(q)}static userHasResolvedOffer(q){return Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.encounters.hasResolvedOffer(q.id)}static getUserSegment(q){const K=Z.q.instance.prodigy.gameContainer.get("11f-118a");return q.segments.sort(((q,K)=>q.priority-K.priority)).find((q=>K.meetsRequirementsDeprecated({requirements:q.featureRequirements})))}static getUserSegmentIndex(q){const K=Z.q.instance.prodigy.gameContainer.get("11f-118a");return q.segments.sort(((q,K)=>q.priority-K.priority)).findIndex((q=>K.meetsRequirementsDeprecated({requirements:q.featureRequirements})))}static openConfiguredModal(q){const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=Z.q.instance.prodigy.gameContainer.get("c21-1a3f"),Q=Z.q.instance.prodigy.gameContainer.get("20f-5f67");ct.sendInterfaceOpenEvents(Q,z.activeOffer,K),Z.q.instance.prodigy.open.prefabMenu(Y.l.SegmentedOffersModal,q,void 0,!0,void 0,ct.getFullOfferInjectableProperties(z.activeOffer))}static getFullOfferInjectableProperties(q){const K=Z.q.instance.prodigy.gameContainer.get("c21-1a3f"),z=ct.getItemInjectableProperties(K.rewardsForCurrentUserSegment),Y=Z.q.instance.prodigy.gameContainer.get("20f-5f67");return Object.assign({[ot.ht.SegmentedOffersTimeRemainingMS]:ct.getOfferTimeRemaining(q),[ot.ht.SegmentedOffersEnding]:ct.isOfferInGracePeriod(q),[ot.ht.SegmentedOffersRejected]:K.rejectActiveOffer.bind(K),[ot.ht.SegmentedOffersFunnelAdvancedCTA]:ct.sendCtaFunnelAdvancedEvent.bind(this,Y,q),[ot.ht.SegmentedOffersFunnelAdvancedGotMembership]:ct.sendMembershipFunnelAdvancedEvent.bind(this,Y,q)},z)}static getItemInjectableProperties(q){"pet"!==q[0].type&&q.forEach(((K,z)=>{"pet"===K.type&&(q.splice(z,1),q.unshift(K))}));const K={};return q.forEach(((q,z)=>{K[ot.ht.SegmentedOffersItemName+z]=et.t.getItem(q.type,q.ID).data.name,K[ot.ht.SegmentedOffersItemIcon+z]=J.E.getIconForType(q.type,q.ID),K[ot.ht.SegmentedOffersItemQuantity+z]=`x${q.N}`,K[ot.ht.SegmentedOffersItemId+z]=q.ID})),K}static getOfferTimeRemaining(q){const K=new Date(q.endDate).getTime();return Math.max(K-Date.now(),0)}static sendInterfaceOpenEvents(q,K,z,Y=!0){q.featureCommon.sendInterfaceEvent({interfaceName:"segmented_offers_main",interfaceType:nt.Wm.Window,instanceType:it.N.UI,originType:Y?nt.$N.AutoSurfaced:nt.$N.ButtonClick,originID:"button-click"}),q.playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"segmented_offers",progressionSubType:K.id,progressionNewValue:(z.encounters.getResolvedOffers().length+1).toString(),progressionPreviousValue:z.encounters.getResolvedOffers().length.toString(),creatureName:"Player"})}static sendCtaFunnelAdvancedEvent(q,K){q.playerProgression.sendFunnelAdvancedEvent({funnelName:K.id,funnelType:"segmented_offers",stepName:st.l.SegmentedOffersClicked},{step_index:3});const z=at.P.shouldUseUnifiedConversionFlow(ht.o.FunnelSegmentedOffers)?rt.R.UnifiedConversionFlow:rt.R.Static;q.purchase.sendFunnelStart({adType:z,category:"segmented-offers",contentId:K.id,type:"Click-Button-Segmented-Offers",adVersion:at.P.getAdVersion(ht.o.FunnelSegmentedOffers)})}static sendMembershipFunnelAdvancedEvent(q,K){q.playerProgression.sendFunnelAdvancedEvent({funnelName:K.id,funnelType:"segmented_offers",stepName:st.l.SegmentedOffersGotMembership},{step_index:4})}}},19145:(q,K,z)=>{"use strict";z.d(K,{Z:()=>ct});var Y=z(8674),Q=z(95891),X=z.n(Q),Z=z(62459),J=z(35120),tt=z(44357),et=z(90633),it=z(77578),st=z(28628);const nt="tutorial-quests",at={revampBattleType:st.gu.StatusEffectsTutorial,difficulty:7,opponent:[{data:{ID:62},appearance:{skinColor:3,eyeColor:7,hair:{style:10,color:1}},equipment:{hat:129,boots:57,outfit:114,weapon:152},name:"NPC_NAME_FTUE_WIZARD"}],pets:[{ID:51}],screen:"battle-academy-gh-stairs"};var rt,ot=z(73678);!function(q){q.Intro="Intro",q.PreBattleAcademyCutscene="PreBattleAcademyCutscene",q.Battle="Battle",q.PostBattleAcademyCutscene="PostBattleAcademyCutscene"}(rt||(rt={}));const ht=[rt.Intro,rt.PreBattleAcademyCutscene,rt.Battle,rt.PostBattleAcademyCutscene];class ct{static get instance(){var q;return null!==(q=this._instance)&&void 0!==q?q:this._instance=new ct}constructor(){this._currentStepIndex=-1,this._segment=J.q.instance.prodigy.gameContainer.get("20f-5f67")}isInProgress(){return this._currentStepIndex>=0}runSpellStatusEffectsTutorial(q=(()=>null)){(0,tt.dD)(!1),this._previousMap=J.q.instance.prodigy.world.getCurrentMap(),this._currentStepIndex=0,this.runSequence().then((()=>{this.handleTutorialCompletion()})).catch((q=>{Z.VyI.log(`Error running Spell Status Effects Tutorial: ${q}`,Z.$bb.Error)})).finally(this.leaveTutorial.bind(this,q))}runSequence(){return(0,Y.sH)(this,void 0,void 0,(function*(){for(;this._currentStepIndex>=0&&this._currentStepIndex{J.q.instance.prodigy.world.getZone(ot.A_.ACADEMY).getScene("statusEffectFTUE1").onSceneComplete.addOnce((()=>{q()})),J.q.instance.prodigy.world.playScene("academy-statusEffectFTUE1")}))}))}playAcademyPostBattleCutscene(){return(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise((q=>{J.q.instance.prodigy.world.getZone(ot.A_.ACADEMY).getScene("statusEffectFTUE2").onSceneComplete.addOnce((()=>{q()})),J.q.instance.prodigy.world.playScene("academy-statusEffectFTUE2")}))}))}startBattle(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.getFTUEBattleMods();return new Promise((K=>{J.q.instance.prodigy.battle.start(q,(()=>{this._segment.statusEffects.sendStatusEffectFtueEvent(it.K.StatusEffectFTUEBattleCompleted),K()}),(()=>{K()}),(()=>{K()})),this._segment.statusEffects.sendStatusEffectFtueEvent(it.K.StatusEffectFTUEBattleStarted)}))}))}getFTUEBattleMods(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=J.q.instance.prodigy.gameContainer.get(Z.t5G.AssetLoader);yield K.loadAssets([nt]);const z=J.q.instance.game.cache.getJSON(nt),Y=null!==(q=null==z?void 0:z["status-effects-tutorial"])&&void 0!==q?q:at;return X().cloneDeep(Y)}))}handleTutorialCompletion(){this._segment.statusEffects.sendStatusEffectFtueEvent(it.K.StatusEffectFTUECompleted),J.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_STATUS_EFFECTS,et.B.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED)}static canShowSpellStatusEffectsTutorial(){const q=[];J.q.instance.prodigy.world.getZone(ot.A_.FOREST).getCurrentQuestID()>3||q.push("The player has not progressed far enough in the game");J.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(et.B.FEATURE_STATUS_EFFECTS,et.B.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED)&&q.push("Tutorial has already been viewed");const K=q.join("\n");return{canBeTransported:0===q.length,info:K}}leaveTutorial(q){this._currentStepIndex=-1,q(),J.q.instance.prodigy.world.it(this._previousMap),(0,tt.dD)(!0)}escapeTutorial(){if(this.isInProgress()){this._currentStepIndex=-1;const q=J.q.instance.prodigy.gameContainer.get("e81-40c8");q.isDialogueInProgress()&&q.close(!0),this.leaveTutorial((()=>null))}}}},45224:(q,K,z)=>{"use strict";z.d(K,{f:()=>Y});class Y{}Y.HARRIET_NAME="NPC_NAME_HARRIET_HOOD",Y.DON_ZORRO_NAME="NPC_NAME_DON_ZORRO",Y.BARGO_NAME="NPC_NAME_BARGO",Y.VERNA_NAME="NPC_NAME_VERNA",Y.HARRIET_NAME_SEGMENT="harriet_hood",Y.DON_ZORRO_NAME_SEGMENT="don_zorro",Y.TOWN_CENTRE="lamplight-B3",Y.HARRIET_ZONE="lamplight-A1",Y.DON_ZORRO_ZONE="lamplight-D3",Y.BARGO_ZONE="lamplight-B2",Y.VERNA_ZONE="lamplight-C3-arena",Y.MAGIC_EGGS_CURRENCY_ID=17,Y.FOX_HATS=[123,124,125,229,261,262,263,285],Y.BUNNY_HATS=[126,127,128,222,228,259,260,265,285]},37623:(q,K,z)=>{"use strict";var Y;z.d(K,{O:()=>Y}),function(q){q.POINTS="UI_POINTS",q.YOUR_CLASS="UI_YOUR_CLASS",q.YOUR_SCHOOL="UI_YOUR_SCHOOL",q.YOU_QUALIFIED="STATE_CHALLENGES_QUALIFIED",q.YOUR_PRIZES="STATE_CHALLENGES_PRIZES",q.HIGHEST_MILESTONE="STATE_CHALLENGES_HIGHEST_MILESTONE",q.NEXT_CHALLENGE="STATE_CHALLENGES_NEXT_CHALLENGE",q.STATE_CHALENGES_STARTS="STATE_CHALENGES_STARTS",q.STATE_CHALLENGES_ENDS_IN="STATE_CHALLENGES_ENDS_IN",q.STATE_CHALLENGES_ON_NOW="STATE_CHALLENGES_ON_NOW",q.STATE_CHALLENGES_CHAMPION_DESCRIPTION="STATE_CHALLENGES_CHAMPION_DESCRIPTION",q.STATE_CHALLENGES_QUALIFIED_DESCRIPTION="STATE_CHALLENGES_QUALIFIED_DESCRIPTION",q.STATE_CHALLENGE_DESCRIPTION="STATE_CHALLENGE_DESCRIPTION",q.STATE_CHALLENGES_CURRENT_TITLE="STATE_CHALLENGES_CURRENT_TITLE",q.STATE_CHALLENGES_CHAMPION_TITLE="STATE_CHALLENGES_CHAMPION_TITLE",q.LEADERBOARDS_SUBHEADING_CORRECT_ANSWERS="LEADERBOARDS_SUBHEADING_CORRECT_ANSWERS",q.CHEST_REWARD_CONGRATULATIONS="CHEST_REWARD_CONGRATULATIONS",q.STATE_CHALLENGES_CLASS_DESCRIPTION="STATE_CHALLENGES_CLASS_DESCRIPTION",q.STATE_CHALLENGES_ONLY_CLASS_DESCRIPTION="STATE_CHALLENGES_ONLY_CLASS_DESCRIPTION",q.STATE_CHALLENGES_RANK="STATE_CHALLENGES_RANK",q.STATE_CHALLENGES_TOTAL_CORRECT="STATE_CHALLENGES_TOTAL_CORRECT",q.STATE_CHALLENGES_THIS_MONTH="STATE_CHALLENGES_THIS_MONTH",q.STATE_CHALLENGES_CLAIM_REWARDS="STATE_CHALLENGES_CLAIM_REWARDS",q.STATE_CHALLENGE_CELEBRATION_BOX="STATE_CHALLENGE_CELEBRATION_BOX",q.NATIONAL_CUP_ENDED="NATIONAL_CUP_ENDED",q.NATIONAL_CUP_ENDED_LONG="NATIONAL_CUP_ENDED_LONG",q.NATIONAL_CUP_TITLE="NATIONAL_CUP_TITLE",q.NATIONAL_CUP_DESCRIPTION="NATIONAL_CUP_DESCRIPTION",q.NATIONAL_CUP_RESULTS_PENDING="NATIONAL_CUP_RESULTS_PENDING",q.NATIONAL_CUP_RESULTS_PENDING_LONG="NATIONAL_CUP_RESULTS_PENDING_LONG",q.NATIONAL_CUP_RESULTS_OFFICIAL="NATIONAL_CUP_RESULTS_OFFICIAL",q.BUTTON_NEXT_CAPITAL="BUTTON_NEXT_CAPITAL"}(Y||(Y={}))},4766:(q,K,z)=>{"use strict";z.d(K,{H:()=>Q});var Y=z(8820);class Q{static getEndDateForCurrentChallenge(q,K,z){if(q===Y.a.NationalCup&&z)return z;if(q===Y.a.StateChallenge){const q=K.getUTCFullYear(),z=K.getUTCMonth();return new Date(Date.UTC(q,z+1,1,Q.ROLLOVER_HOUR_UTC)-1)}}static isInDowntime(q,K,z,X){if(q===Y.a.NationalCup){if(!z)return!1;const q=K.getTime()-z.getTime();return q>=0&&qq.month===tt));return null===(J=null==et?void 0:et.currentSchool)||void 0===J?void 0:J.node}static getMsUntilEndOfCurrentChallenge(q,K,z){const Y=Q.getEndDateForCurrentChallenge(q,K,z);return Y?Y.getTime()-K.getTime():0}static getDaysUntilEndOfCurrentChallenge(q,K,z){let X;return X=q===Y.a.NationalCup&&z?z:Q.getEndDateForCurrentChallenge(q,K,z),X?Math.max(0,Math.ceil((X.getTime()-K.getTime())/864e5)):0}static getRepresentativeDateForPreviousChallenge(q,K,z,X){if(Q.getPreviousChallengeCompetition(q,K,X)===Y.a.NationalCup&&z&&X){const q=(z.getTime()+X.getTime())/2;return new Date(q)}const{month:Z,year:J}=Q.getPreviousStateChallengeMonthYear(K);return new Date(Date.UTC(J,Z-1,15))}static getPreviousChallengeCompetition(q,K,z){return q===Y.a.NationalCup&&z&&K>z?Y.a.NationalCup:Y.a.StateChallenge}}Q.ROLLOVER_HOUR_UTC=8,Q.ROLLOVER_WINDOW_MS=36e5*Q.ROLLOVER_HOUR_UTC},2980:(q,K,z)=>{"use strict";z.d(K,{W:()=>Q,v:()=>ht});var Y,Q,X=z(8674),Z=z(62459),J=z(79687),tt=z(95891),et=z.n(tt),it=z(8820),st=z(35120),nt=z(59114),at=z(4766),rt=z(88912),ot=z(87490);!function(q){q.CLASSROOM="CLASSROOM",q.SCHOOL="SCHOOL"}(Q||(Q={}));let ht=Y=class{constructor(){this._isCurrentlyInDownTime=!1,this._totalPhaseCorrectAnswers=0,this._hasValidClassroom=void 0,this._isInitialized=!1,this._isInRewardsGrantingPeriod=!1,this.onNewDataProcessed=new Z.HN0,this._hasAnimationPlayed=!1,this._activeCompetitionPhase=it.a.None,this._viewableCompetitionPhase=it.a.None}get isCurrentlyInDownTime(){return this._isCurrentlyInDownTime}get downtimeTitleLocalizationKeyOverride(){var q;return null===(q=this._prodigyCupConfigData)||void 0===q?void 0:q.downtimeTitleLocalizationKeyOverride}get downtimeSubtitleLocalizationKeyOverride(){var q;return null===(q=this._prodigyCupConfigData)||void 0===q?void 0:q.downtimeSubtitleLocalizationKeyOverride}get cachedRolloverHourUTC(){var q;return null===(q=this._prodigyCupConfigData)||void 0===q?void 0:q.rolloverHourUTC}get nationalCupResultsValidated(){var q;return null===(q=this._prodigyCupConfigData)||void 0===q?void 0:q.nationalCupResultsValidated}get currentClassroomData(){return this._currentClassroomData}get totalPhaseCorrectAnswers(){return this._totalPhaseCorrectAnswers}get endDate(){return this._endDate}get finalsPhaseStartDate(){return this._finalsPhaseStartDate}get finalsPhaseEndDate(){return this._finalsPhaseEndDate}get lastUpdated(){return this._lastUpdated}get isInitialized(){return this._isInitialized}get isInRewardsGrantingPeriod(){return this._isInRewardsGrantingPeriod}get hasAnimationPlayed(){return this._hasAnimationPlayed}get classroomRacerIds(){return this._classroomRacerIds}get schoolRacerIds(){return this._schoolRacerIds}get classroomPortraitIds(){return this._classroomPortraitIds}get schoolPortraitIds(){return this._schoolPortraitIds}get lastClassCodeFetched(){return this._lastClassCodeFetched}get activeCompetitionPhase(){return this._activeCompetitionPhase}get viewableCompetitionPhase(){return this._viewableCompetitionPhase}hasValidClassroom(){return(0,X.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,X;if(Z.Aq$.isDefined(this._hasValidClassroom))return this._hasValidClassroom;if("US"!==(null===(q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.geolocationData.country)||void 0===q?void 0:q.iso_code))return this._hasValidClassroom=!1,!1;const J=st.q.instance.prodigy.gameContainer.get("60b-c1b4"),tt=st.q.instance.prodigy.gameContainer.get("774-4659"),[et,it]=yield Promise.all([J.isEligibleForMenu(),tt.getCurrentClassCode()]),nt=null!==(X=null===(Q=null===(Y=null===(z=null===(K=it)||void 0===K?void 0:K.data)||void 0===z?void 0:z.player)||void 0===Y?void 0:Y.currentClassroom)||void 0===Q?void 0:Q.code)&&void 0!==X?X:void 0;return Z.Aq$.isDefined(nt)&&(this._lastClassCodeFetched=nt),this._hasValidClassroom=!Z.Aq$.isDefined(nt)||Z.Aq$.isDefined(nt)&&nt.length>0&&et,this._hasValidClassroom}))}getCurrentSchoolRanking(){return(0,X.sH)(this,void 0,void 0,(function*(){var q;return yield this.initialize(),null===(q=this._currentSchoolData)||void 0===q?void 0:q.rank}))}getSchoolEntryForPreviousChallenge(){return this._previousChallengeResults}getSchoolQualificationStatus(){return(0,X.sH)(this,void 0,void 0,(function*(){return this._qualificationStatus}))}getStateChallengesLeaderboard(q){if(!this._isInitialized||!this._currentClassroomData&&!this._currentSchoolData)return void Z.VyI.log("StateChallengesDataProvider: getStateChallengesLeaderboard: Data not initialized",Z.$bb.Warning);const K=q===Q.CLASSROOM;return{myEntry:K?this._currentClassroomData:this._currentSchoolData,competitorEntries:K?this._stateChallengeClassroomRankingMap:this._stateChallengeSchoolRankingMap}}static getNextRolloverMs(q){const K=new Date(q),z=Date.UTC(K.getUTCFullYear(),K.getUTCMonth(),K.getUTCDate(),at.H.ROLLOVER_HOUR_UTC);return q=this._cacheExpiresAt&&(this._initializationPromise=void 0,this._isInitialized=!1),this._initializationPromise||(this._initializationPromise=(()=>(0,X.sH)(this,void 0,void 0,(function*(){yield this.checkAndCacheDownTimeState(),Z.Aq$.isDefined(this._lastClassCodeFetched)&&this._hasValidClassroom&&(yield this.requestAndCacheProdigyCupData())})))()),this._initializationPromise}))}debugLogStateChallengesLeaderboard(q){const K=this.getStateChallengesLeaderboard(q);ot.Util.isDefined(K)?Z.VyI.log(`StateChallengesDataProvider from cache: ${K}`,Z.$bb.Info):this.initialize().then((()=>{const K=this.getStateChallengesLeaderboard(q);K?(Z.VyI.log("StateChallenge Leaderboard retrieved from database",Z.$bb.Info),Z.VyI.log(`StateChallengesDataProvider: ${K}`,Z.$bb.Info)):Z.VyI.log("StateChallengesDataProvider: debug: No leaderboard data available",Z.$bb.Error)})).catch((q=>{Z.VyI.log("StateChallengesDataProvider: debug: Error initializing data",Z.$bb.Error,q)}))}requestAndCacheProdigyCupData(){return(0,X.sH)(this,void 0,void 0,(function*(){var q,K,z,Q,X,J,tt,at;this._isInRewardsGrantingPeriod=!1;const rt=st.q.instance.prodigy.gameContainer.get("60b-c1b4"),ot=yield rt.fetchStateChallengesData();if(!ot||!Z.Aq$.isDefined(null===(K=null===(q=null==ot?void 0:ot.data)||void 0===q?void 0:q.viewer)||void 0===K?void 0:K.currentClassroom))return void Z.VyI.log("StateChallengesDataProvider: requestAndCacheStateChallengesData: No data received",Z.$bb.Error);const ht=null===(z=ot.data.viewer.currentClassroom.node)||void 0===z?void 0:z.classroomMonthlyLeaderboard,ct=null===(X=null===(Q=ot.data.viewer.currentClassroom.node)||void 0===Q?void 0:Q.currentProdigyCup)||void 0===X?void 0:X.stateChallengesPhase,dt=null!==(at=null===(tt=null===(J=ot.data.viewer.currentClassroom.node)||void 0===J?void 0:J.currentProdigyCup)||void 0===tt?void 0:tt.finalsPhase)&&void 0!==at?at:null;if(!Z.Aq$.isDefined(ht)||!Z.Aq$.isDefined(ct))return void Z.VyI.log("StateChallengesDataProvider: requestAndCacheStateChallengesData: Incomplete data received",Z.$bb.Warning);if(this._activeCompetitionPhase=Y.determineActivePhase(ct,dt),this._viewableCompetitionPhase=this.determineViewableCompetitionPhase(dt),this._activeCompetitionPhase===it.a.None||this._activeCompetitionPhase===it.a.SparkCup){const{rewardsGrantingPeriodEndDate:q}=yield rt.getRewardsGrantingPeriodEndDate(this._viewableCompetitionPhase);this._isInRewardsGrantingPeriod=Z.Aq$.isDefined(q)&&Date.now()<=new Date(q).getTime()}this.cacheFinalsPhaseDates(dt,ct),this._viewableCompetitionPhase===it.a.NationalCup?this.cacheNationalCupData(dt,ct.stateChallenges.nodes,ht):this.cacheStateChallengeData(ct,ht),this._cacheExpiresAt=Y.getNextRolloverMs(Date.now());const lt=[...nt.yT.classViewPetIds],ut=[...nt.yT.schoolViewPetIds];this._classroomRacerIds=et().sampleSize(lt,2),this._schoolRacerIds=et().sampleSize(ut,2),this._classroomPortraitIds=et().sampleSize(lt,3),this._schoolPortraitIds=et().sampleSize(ut,3),this._isInitialized=!0,this.onNewDataProcessed.dispatch()}))}cacheFinalsPhaseDates(q,K){if(ot.Util.isDefined(null==q?void 0:q.startDate))this._finalsPhaseStartDate=new Date(q.startDate);else{const q=new Date(K.endDate);this._finalsPhaseStartDate=new Date(Date.UTC(q.getUTCFullYear(),q.getUTCMonth()+1,1))}ot.Util.isDefined(null==q?void 0:q.endDate)&&(this._finalsPhaseEndDate=new Date(q.endDate))}determineViewableCompetitionPhase(q){if(this._activeCompetitionPhase===it.a.NationalCup||this._activeCompetitionPhase===it.a.StateChallenge)return this._activeCompetitionPhase;return null!==q&&q.competition===it.a.NationalCup&&new Date(q.endDate).getTime()=q&&z<=Y){if(K.competition===it.a.SparkCup)return it.a.SparkCup;if(K.competition===it.a.NationalCup)return it.a.NationalCup}}const Y=new Date(q.startDate).getTime(),Q=new Date(q.endDate).getTime();return z>=Y&&z<=Q?it.a.StateChallenge:it.a.None}processLeaderboard(q,K,z){q.forEach((q=>{if(void 0===q.rank||void 0===K.rank)return;const Y=Math.abs(q.rank-K.rank)<=2,Q=q.rank<=3&&!z.has(q.rank);q!==K&&(Y||Q)&&z.set(q.rank,q)}))}cacheStateChallengeData(q,K){var z,Y,Q,X,J,tt,et,it,st,nt,rt,ot,ht,ct,dt,lt;const ut=null==K?void 0:K.currentLeaderboard,ft=q.currentStateChallenge;if(!Z.Aq$.isDefined(ut)||!Z.Aq$.isDefined(ft))return void Z.VyI.log("StateChallengesDataProvider: cacheStateChallengeData: Missing classroom or school node",Z.$bb.Warning);if(this._lastUpdated=new Date(q.lastUpdated),this._endDate=q.endDate?new Date(q.endDate):new Date((new Date).getFullYear(),4,1),this._qualificationStatus={qualifiedForNationalCup:Z.Aq$.isDefined(q.nationalCupQualificationDate),wonStateChallenge:Z.Aq$.isDefined(q.stateChallengeWinnerDate)},this._currentClassroomData=null===(Y=null===(z=ut.node)||void 0===z?void 0:z.currentClassroom)||void 0===Y?void 0:Y.node,this._currentSchoolData=null===(X=null===(Q=ft.node)||void 0===Q?void 0:Q.currentSchool)||void 0===X?void 0:X.node,!Z.Aq$.isDefined(this._currentClassroomData)||!Z.Aq$.isDefined(this._currentSchoolData))return void Z.VyI.log("StateChallengesDataProvider: cacheStateChallengeData: Missing current classroom or school data",Z.$bb.Warning);this._previousChallengeResults=at.H.findPreviousChallengeResults(q.stateChallenges.nodes,this._viewableCompetitionPhase,new Date(Date.now())),this._totalPhaseCorrectAnswers=null!==(tt=null===(J=q.stateChallenges.nodes)||void 0===J?void 0:J.reduce(((q,K)=>{var z,Y,Q;return q+(null!==(Q=null===(Y=null===(z=K.currentSchool)||void 0===z?void 0:z.node)||void 0===Y?void 0:Y.correctAnswers)&&void 0!==Q?Q:0)}),0))&&void 0!==tt?tt:0,this._stateChallengeClassroomRankingMap=new Map,this._stateChallengeSchoolRankingMap=new Map;const bt=q.currentStateChallenge;this.processLeaderboard(null!==(it=null===(et=K.currentLeaderboard.node.leaderboard)||void 0===et?void 0:et.nodes)&&void 0!==it?it:[],this._currentClassroomData,this._stateChallengeClassroomRankingMap),this.processLeaderboard(null!==(rt=null===(nt=null===(st=K.currentLeaderboard.node.leaderboard)||void 0===st?void 0:st.nodes)||void 0===nt?void 0:nt.slice(0,3))&&void 0!==rt?rt:[],this._currentClassroomData,this._stateChallengeClassroomRankingMap),this.processLeaderboard(null!==(ht=null===(ot=bt.node.nearRankings)||void 0===ot?void 0:ot.nodes)&&void 0!==ht?ht:[],this._currentSchoolData,this._stateChallengeSchoolRankingMap),this.processLeaderboard(null!==(lt=null===(dt=null===(ct=bt.node.topRankings)||void 0===ct?void 0:ct.nodes)||void 0===dt?void 0:dt.slice(0,3))&&void 0!==lt?lt:[],this._currentSchoolData,this._stateChallengeSchoolRankingMap)}cacheNationalCupData(q,K,z){var Y,Q,X,J,tt;const et=z.currentLeaderboard;Z.Aq$.isDefined(et)&&Z.Aq$.isDefined(q.currentFinalsSchoolEntry)?(this._lastUpdated=new Date(q.lastUpdated),this._endDate=new Date(q.endDate),this._qualificationStatus={},this._currentClassroomData=null===(Q=null===(Y=et.node)||void 0===Y?void 0:Y.currentClassroom)||void 0===Q?void 0:Q.node,this._currentSchoolData=q.currentFinalsSchoolEntry,this._previousChallengeResults=at.H.findPreviousChallengeResults(K,this._viewableCompetitionPhase,new Date(Date.now()),q.currentFinalsSchoolEntry,this._endDate),this._totalPhaseCorrectAnswers=q.currentFinalsSchoolEntry.correctAnswers,Z.Aq$.isDefined(this._currentClassroomData)?(this._stateChallengeClassroomRankingMap=new Map,this._stateChallengeSchoolRankingMap=new Map,this.processLeaderboard(null!==(J=null===(X=z.currentLeaderboard.node.leaderboard)||void 0===X?void 0:X.nodes)&&void 0!==J?J:[],this._currentClassroomData,this._stateChallengeClassroomRankingMap),this.processLeaderboard(null!==(tt=q.leaderboard)&&void 0!==tt?tt:[],this._currentSchoolData,this._stateChallengeSchoolRankingMap),this.isInNationalCupRewardCollectionPeriod()&&!this.nationalCupResultsValidated&&(this._currentSchoolData.rank=void 0,this.processLeaderboard([],this._currentSchoolData,this._stateChallengeSchoolRankingMap),this._previousChallengeResults.rank=void 0)):Z.VyI.log("StateChallengesDataProvider: cacheNationalCupData: Missing current classroom data",Z.$bb.Warning)):Z.VyI.log("StateChallengesDataProvider: cacheNationalCupData: Missing classroom or finals school entry",Z.$bb.Warning)}getGoalsParametersData(){if(this._isInitialized&&(this._currentSchoolData||this._currentClassroomData))return{questionsAnswered:this._currentSchoolData.correctAnswers,competition:this._viewableCompetitionPhase};Z.VyI.log("StateChallengesDataProvider: getGoalsParametersData: Data not initialized",Z.$bb.Warning)}getGoalsParametersDataForPreviousChallenge(){if(!this._isInitialized||!this._previousChallengeResults)return void Z.VyI.log("StateChallengesDataProvider: getGoalsParametersDataForPreviousChallenge: Data not initialized",Z.$bb.Warning);return{questionsAnswered:this._previousChallengeResults.correctAnswers,competition:at.H.getPreviousChallengeCompetition(this.viewableCompetitionPhase,new Date(Date.now()),this._finalsPhaseEndDate)}}setAnimationPlayed(){this._hasAnimationPlayed=!0}checkAndCacheDownTimeState(){return(0,X.sH)(this,void 0,void 0,(function*(){var q;if(Z.Aq$.isDefined(this._prodigyCupConfigData))return;const K=st.q.instance.prodigy.gameContainer.get("60b-c1b4"),z=yield K.getProdigyCupConfigData();this._prodigyCupConfigData=z,(null==z?void 0:z.isInDowntimeEvent)?this._isCurrentlyInDownTime=!0:null===(q=null==z?void 0:z.useClientSideDowntimeCalculations)||void 0===q||q?this._isCurrentlyInDownTime=at.H.isInDowntime(this._viewableCompetitionPhase,new Date(Date.now()),this._finalsPhaseEndDate,null==z?void 0:z.rolloverHourUTC):this._isCurrentlyInDownTime=!1}))}isInNationalCupRewardCollectionPeriod(){return this._activeCompetitionPhase===it.a.None&&this._viewableCompetitionPhase===it.a.NationalCup}isInStateChallengesRewardCollectionPeriod(){return(this._activeCompetitionPhase===it.a.None||this._activeCompetitionPhase===it.a.SparkCup)&&this._viewableCompetitionPhase===it.a.StateChallenge}isInActiveCompetition(){return this._activeCompetitionPhase===it.a.StateChallenge||this._activeCompetitionPhase===it.a.NationalCup}getCurrentChallengeSuffixForSegmentEvents(){return this.getCompetitionPhaseSuffixForSegmentEvents(this.activeCompetitionPhase)}getPreviousChallengeSuffixForSegmentEvents(){const q=at.H.getPreviousChallengeCompetition(this.viewableCompetitionPhase,new Date(Date.now()),this._finalsPhaseEndDate);return this.getCompetitionPhaseSuffixForSegmentEvents(q)}getCompetitionPhaseSuffixForSegmentEvents(q){return rt.jp[q]}};ht=Y=(0,X.Cg)([(0,J.injectable)()],ht)},77510:(q,K,z)=>{"use strict";z.d(K,{z:()=>rt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(89067),J=z(13956),tt=z(40579),et=z(76277),it=z(35120);const st=(0,z(77601).gb)({key:"state-challenges",activateAssociatedExperiments:1,default:{enabled:!1}});var nt=z(4766),at=z(2980);let rt=class{constructor(){this.onPauseButtonClicked=new Q.HN0,this._isMenuPaused=!1}get isMenuPaused(){return this._isMenuPaused}hasActiveChallengeOrRewards(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=it.q.instance.prodigy.gameContainer.get("d00-c550");if(yield q.initialize(),q.isInActiveCompetition())return!0;if(q.isInRewardsGrantingPeriod){const K=q.getGoalsParametersDataForPreviousChallenge();if(!K)return!1;return it.q.instance.prodigy.gameContainer.get("476-a586").checkHasUnclaimedPreviousRewards(K)}return!1}))}isFeatureAvailable(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(0,et.G)(st).enabled&&it.q.instance.prodigy.gameContainer.get("d00-c550").hasValidClassroom()}))}setupHudButton(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(yield this._stateChallengesDataProvider.checkAndCacheDownTimeState(),this._stateChallengesDataProvider.isCurrentlyInDownTime)return;let q=nt.H.getMsUntilEndOfCurrentChallenge(this._stateChallengesDataProvider.activeCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.endDate);q>0&&(q+=86399999),this._hudService.updateCachedLabelData(Z.ts.StateChallenges,{labelValue:q});const K=yield this._stateChallengesDataProvider.getCurrentSchoolRanking();this._stateChallengesDataProvider.isInActiveCompetition()&&Q.Aq$.isDefined(K)&&K<30&&this._hudService.updateSecondaryLabel(Z.ts.StateChallenges,K)}))}toggleMenuPause(){this._isMenuPaused=!this._isMenuPaused,this.onPauseButtonClicked.dispatch(this._isMenuPaused)}};(0,Y.Cg)([(0,X.inject)("d00-c550"),(0,Y.Sn)("design:type",at.v)],rt.prototype,"_stateChallengesDataProvider",void 0),(0,Y.Cg)([(0,J.b)("959-82c1"),(0,Y.Sn)("design:type",tt.W)],rt.prototype,"_hudService",void 0),rt=(0,Y.Cg)([(0,X.injectable)()],rt)},88912:(q,K,z)=>{"use strict";z.d(K,{U4:()=>Y,jp:()=>Z});var Y,Q,X=z(8820);!function(q){q[q.Bronze=100]="Bronze",q[q.Silver=1e4]="Silver",q[q.Gold=1e5]="Gold",q[q.Diamond=5e5]="Diamond"}(Y||(Y={})),function(q){q.NationalCup="-nc",q.None=""}(Q||(Q={}));const Z={[X.a.NationalCup]:Q.NationalCup,[X.a.StateChallenge]:Q.None,[X.a.SparkCup]:Q.None,[X.a.None]:Q.None}},54140:(q,K,z)=>{"use strict";z.d(K,{X:()=>at});var Y=z(62459),Q=z(88818),X=z(24522),Z=z(8820),J=z(35120),tt=z(38920),et=z(44094),it=z(88912),st=z(59114),nt=z(37623);class at{static getStateChallengeRacersInjectionData(q,K,z,Q,X){const Z=X.getStateChallengesLeaderboard(q),J=Z.myEntry.rank,tt=q=>Z.competitorEntries.get(J+q),et=Y.Aq$.isDefined(J)?tt(1):void 0,it=!Y.Aq$.isDefined(et)||3===J,nt=1===J,rt=it?tt(-2):et,ot=tt(nt?2:-1);let ht=st.yT.defaultRacerOffsets;Z.competitorEntries.size>0&&Y.Aq$.isDefined(J)&&(it?ht=st.yT.heroLastRacerOffsets:nt&&(ht=st.yT.heroFirstRacerOffsets));return[{petId:Q[0],node:rt,index:0,xOffset:ht[0]},{petId:z,node:Z.myEntry,index:1,xOffset:ht[1]},{petId:Q[1],node:ot,index:2,xOffset:ht[2]}].map((({petId:q,node:z,index:Y,xOffset:Q})=>at.createFootracePetInjectionDataFromLeaderboardNode(q,K,z,Y,Q))).filter(Y.Aq$.isDefined)}static createFootracePetInjectionDataFromLeaderboardNode(q,K,z,X,Z){var tt;if(!z)return void Y.VyI.log("StateChallengesMenu: createFootracePetInjectionDataFromLeaderboardNode: node is undefined",Y.$bb.Warning);let it=Q.Q2.Walk;const at=J.q.instance.prodigy.gameContainer.get("394-6aa1");return at&&(it=at.isMenuPaused?Q.Q2.Idle:Q.Q2.Walk),{STATE_CHALLENGES_FOOTRACE_PET_ID:q,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Z,st.yT.yOffsets[X]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:it,STATE_CHALLENGES_RACER_NAME:et.$.truncate(null!==(tt=z.displayName)&&void 0!==tt?tt:"",25,!0),STATE_CHALLENGES_RACER_RANK:z.rank?et.$.addOrdinalSuffix(z.rank):nt.O.NATIONAL_CUP_RESULTS_PENDING,STATE_CHALLENGES_RACER_ANSWERS:z.correctAnswers,STATE_CHALLENGES_SCHOOL_VIEW_ACTIVE:!1,STATE_CHALLENGES_CLASS_VIEW_ACTIVE:!1,STATE_CHALLENGES_ANSWERS_VISIBLE:1!==X,STATE_CHALLENGES_SELF_BUBBLE_VISIBLE:1===X,STATE_CHALLENGES_SELF_IDENTIFIER_TEXT:K}}static getMilestoneBackingFrame(q){return q>=it.U4.Diamond?st.yT.postChallengeMilestoneAssetMap[it.U4.Diamond]:q>=it.U4.Gold?st.yT.postChallengeMilestoneAssetMap[it.U4.Gold]:q>=it.U4.Silver?st.yT.postChallengeMilestoneAssetMap[it.U4.Silver]:(it.U4.Bronze,st.yT.postChallengeMilestoneAssetMap[it.U4.Bronze])}static getQuestionsAnsweredFromTaskInThousandFormat(q){return(0,tt.Hk)(at.getQuestionsAnsweredFromTask(q),void 0,",")}static getQuestionsAnsweredFromTask(q){var K;const z=null==q?void 0:q.preconditions;if(z)for(const Q of z){const q=null===(K=Q.data)||void 0===K?void 0:K.questionsAnswered;if(Q.type===X.n.HAS_MET_STATE_CHALLENGE_GOAL&&Y.Aq$.isDefined(q))return q}return 0}static getCurrentChallengeDisplayName(q){const K=J.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService);if(q===Z.a.NationalCup)return K.getText(nt.O.NATIONAL_CUP_TITLE);const z=`MONTH_NAME_${(new Date).getUTCMonth()+1}`;return K.getText(nt.O.STATE_CHALLENGES_CURRENT_TITLE,K.getText(z))}}},21953:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{V:()=>Y,Z:()=>Q}),function(q){q.HasMilestoneRewardReady="HAS_MILESTONE_REWARD_READY",q.HasOutstandingPrerequisiteTasks="HAS_OUTSTANDING_PREREQUISITE_TASKS",q.IsCurrentChallengeStarted="IS_CURRENT_CHALLENGE_STARTED",q.WasPreviousChallengeStarted="WAS_PREVIOUS_CHALLENGE_STARTED",q.AllMilestonesFinished="ALL_MILESTONES_FINISHED",q.HasMilestoneInProgress="HAS_MILESTONE_IN_PROGRESS",q.CurrentMilestoneProgressValues="CURRENT_MILESTONE_PROGRESS_VALUES",q.QuestionsRemainingToNextMilestone="QUESTIONS_REMAINING_TO_NEXT_MILESTONE",q.DisplayRewardAssetIcon="DISPLAY_REWARD_ASSET_ICON",q.DisplayRewardQuantity="DISPLAY_REWARD_QUANTITY",q.CurrentMilestoneProgressData="CURRENT_MILESTONE_PROGRESS_DATA",q.NextMilestoneBackground="NEXT_MILESTONE_BACKGROUND",q.ShowSeeRewardsButton="SHOW_SEE_REWARDS_BUTTON"}(Y||(Y={})),function(q){q.DisplayCardRewardIndex="DISPLAY_CARD_REWARD_INDEX",q.DisplayCardRewardAssetIcon="DISPLAY_CARD_REWARD_ASSET_ICON",q.DisplayCardRewardQuantity="DISPLAY_CARD_REWARD_QUANTITY",q.DisplayCardQuestionsAnswered="DISPLAY_CARD_QUESTIONS_ANSWERED",q.DisplayCardIsCollected="DISPLAY_CARD_IS_COLLECTED",q.DisplayCardReadyToCollect="DISPLAY_CARD_READY_TO_COLLECT",q.DisplayCardIsActive="DISPLAY_CARD_IS_ACTIVE",q.DisplayCardCollectCallback="DISPLAY_CARD_COLLECT_CALLBACK",q.DisplayCardBackground="DISPLAY_CARD_BACKGROUND",q.DisplayCardIsFocused="DISPLAY_CARD_IS_FOCUSED",q.DisplayCardCollectButtonEnabledState="DISPLAY_CARD_COLLECT_BUTTON_ENABLED_STATE"}(Q||(Q={}))},25431:(q,K,z)=>{"use strict";z.d(K,{b:()=>ht});var Y=z(8674),Q=z(62459),X=z(29891),Z=z(24522),J=z(35120),tt=z(30405),et=z(38920),it=z(4766),st=z(24030),nt=z(88912),at=z(54140),rt=z(21953),ot=z(59114);class ht{static getData(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,X,tt;const ct=J.q.instance.prodigy.gameContainer.get("d00-c550"),dt=J.q.instance.prodigy.gameContainer.get("476-a586");if(yield ct.initialize(),!Q.Aq$.isDefined(ct.getGoalsParametersData()))return void Q.RQr.createHandler("[StateChallengeGoalsDataProvider] StateChallengesDataProvider is not initialized");const lt=null!==(K=null===(q=ct.getGoalsParametersData())||void 0===q?void 0:q.questionsAnswered)&&void 0!==K?K:0,ut=yield dt.getStateChallengeGoalsProgress(),ft=J.q.instance.prodigy.gameContainer.get("0f2-d6bd"),bt=new Date(ft.getServerTimeMs()),pt=ct.viewableCompetitionPhase,vt=it.H.getPreviousChallengeCompetition(pt,bt,ct.endDate),gt=ht.getFilteredTasks(ut,bt),mt=yield ht.fetchPreviousChallengeTasks(ut);let yt,_t;for(const Q of gt){const q=Q.id;if(q.endsWith("_start")){yt=q;break}}for(const Q of mt){const q=Q.id;if(q.endsWith("_start")){_t=q;break}}const Et=null!==(z=(0,st.$)(ct.viewableCompetitionPhase))&&void 0!==z?z:"",wt=null!==(Y=(0,st.$)(vt))&&void 0!==Y?Y:"",Tt=!!yt&&(yield dt.isTaskCompleted(Et,yt)),St=!!_t&&(yield dt.isTaskCompleted(wt,_t));dt.cacheChallengeStartTaskIds(yt,_t);const At=[],Ct=[],Ot=[];for(const Z of ut.taskProgress){const q=Z.taskProgressSchema.id;Q.Aq$.isDefined(ht.getMilestoneIndexFromTaskId(q))?(At.push(Z),Ct.push(q)):Ot.push(Z)}const It=At.length>0,Dt=Ot.length>0;let Rt,Pt=0,Mt=gt.length+1,Nt={ID:"",type:"",quantity:0};if(It){const q=At[0];Nt=ht.getRewardAssetDataFromTaskComplete(q.taskDefinition.onComplete),Rt=at.X.getMilestoneBackingFrame(at.X.getQuestionsAnsweredFromTask(q.taskDefinition))}for(const Q of gt){const q=ht.getMilestoneIndexFromTaskId(Q.id);if(void 0!==q){const K=null===(X=Q.preconditions)||void 0===X?void 0:X.find((q=>q.type===Z.n.HAS_MET_STATE_CHALLENGE_GOAL));if(K){const z=K.data.questionsAnswered;if(z>lt){Pt=z,Mt=q,!It&&Q.onComplete&&(Rt=at.X.getMilestoneBackingFrame(Pt),Nt=ht.getRewardAssetDataFromTaskComplete(Q.onComplete));break}}}}const xt=0===At.length&&0===Pt,Lt=xt&&!It;if(Lt&>.length>0){const q=gt[gt.length-1],K=null===(tt=q.preconditions)||void 0===tt?void 0:tt.find((q=>q.type===Z.n.HAS_MET_STATE_CHALLENGE_GOAL));if(K){Pt=K.data.questionsAnswered,Rt=at.X.getMilestoneBackingFrame(Pt),Nt=ht.getRewardAssetDataFromTaskComplete(q.onComplete)}}const kt={};for(const Q of gt){const q=Q.id,K=ht.getMilestoneIndexFromTaskId(q);void 0!==K&&(kt[String(K)]={task:Q,index:K,isCollectible:Ct.includes(q),isComplete:K1?`+${Nt.quantity}`:"",[rt.V.CurrentMilestoneProgressData]:kt,[rt.V.NextMilestoneBackground]:Rt||ot.yT.postChallengeMilestoneAssetMap[nt.U4.Diamond],[rt.V.ShowSeeRewardsButton]:Bt||Lt}}))}static getPreviousChallengeMilestoneRewards(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield ht.fetchPreviousChallengeTasks(),K=[];for(const z of q){const q=ht.getMilestoneIndexFromTaskId(z.id);void 0!==q&&K.push(...ht.getRewardsFromTaskComplete(q,z.onComplete))}return K}))}static getRewardsFromTaskComplete(q,K=[]){var z,Y;const Q=[];for(const Z of K)if(Z.type===X.s.GOT_PET||Z.type===X.s.GOT_ITEM)for(const K of null!==(Y=null===(z=Z.data)||void 0===z?void 0:z.itemDrops)&&void 0!==Y?Y:[])(null==K?void 0:K.ID)&&Q.push({type:K.type,id:Number(K.ID),milestoneIndex:q});return Q}static fetchPreviousChallengeTasks(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;const Y=J.q.instance.prodigy.gameContainer.get("d00-c550"),Q=J.q.instance.prodigy.gameContainer.get("476-a586"),X=J.q.instance.prodigy.gameContainer.get("60b-c1b4"),Z=J.q.instance.prodigy.gameContainer.get("0f2-d6bd");yield Y.initialize();const tt=new Date(Z.getServerTimeMs()),et=it.H.getRepresentativeDateForPreviousChallenge(Y.viewableCompetitionPhase,tt,Y.finalsPhaseStartDate,Y.endDate),st=Y.viewableCompetitionPhase,nt=it.H.getPreviousChallengeCompetition(st,tt,Y.endDate),at=nt===st?null!=q?q:yield Q.getStateChallengeGoalsProgress():yield X.getStateChallengeGoalsData({questionsAnswered:null!==(z=null===(K=Y.getSchoolEntryForPreviousChallenge())||void 0===K?void 0:K.correctAnswers)&&void 0!==z?z:0,competition:nt});return at?ht.getFilteredTasks(at,et):[]}))}static getMilestoneIndexFromTaskId(q){const K=q.split("_"),z=K[K.length-1];return tt.o.isNumber(z)?Number(z):void 0}static getRewardAssetDataFromTaskComplete(q=[]){var K,z;for(const Y of q)if(Y.type===X.s.GOT_ITEM||Y.type===X.s.GOT_PET){const q=null===(K=Y.data.itemDrops)||void 0===K?void 0:K[0];if(null==q?void 0:q.ID)return{ID:q.ID.toString(),type:q.type,quantity:null!==(z=q.N)&&void 0!==z?z:1}}return{ID:"",type:"",quantity:0}}static getFilteredTasks(q,K){return q.questDefinition.tasks.filter((q=>{if(!q.preconditions||!Array.isArray(q.preconditions))return!1;const z=q.preconditions.find((q=>q.type===Z.n.DATE_AFTER)),Y=q.preconditions.find((q=>q.type===Z.n.DATE_BEFORE)),Q=z?new Date(z.data.date):void 0,X=Y?new Date(Y.data.date):void 0;return!(!Q||!X)&&(K>=Q&&K<=X)}))}}},59114:(q,K,z)=>{"use strict";z.d(K,{E2:()=>Y,Tz:()=>Q,yT:()=>J});var Y,Q,X,Z=z(88912);class J{}J.classViewHeroPetId=136,J.classViewPetIds=[145,139,148,142,216,48,59,20,264],J.schoolViewHeroPetId=138,J.schoolViewPetIds=[147,141,150,144,280,49,60,22,266],J.yOffsets=[-330,-230,-100],J.defaultRacerOffsets=[718,885,1025],J.heroFirstRacerOffsets=[885,1025,718],J.heroLastRacerOffsets=[1025,718,885],J.introAnimationStartPositions=[{x:-400,y:-330},{x:-650,y:-330},{x:-900,y:-330},{x:-550,y:-230},{x:-800,y:-230},{x:-1050,y:-230},{x:-400,y:-100},{x:-650,y:-100},{x:-900,y:-100}],J.introAnimationHeroPosition={x:-100,y:-230},J.bannerTrophyAssets=["state-challenges-trophy-gold-small","state-challenges-trophy-silver-small","state-challenges-trophy-bronze-small"],J.postChallengeTrophyAssets=["state-challenges-trophy-gold","state-challenges-trophy-silver","state-challenges-trophy-bronze"],J.postChallengeMilestoneAssetMap={[Z.U4.Bronze]:"state-challenges-milestone-bronze",[Z.U4.Silver]:"state-challenges-milestone-silver",[Z.U4.Gold]:"state-challenges-milestone-gold",[Z.U4.Diamond]:"state-challenges-milestone-diamond"},function(q){q.STATE_CHALLENGES_SHOW_HEADER="STATE_CHALLENGES_SHOW_HEADER",q.STATE_CHALLENGES_DOWNTIME_TITLE_OVERRIDE="STATE_CHALLENGES_DOWNTIME_TITLE_OVERRIDE",q.STATE_CHALLENGES_DOWNTIME_SUBTITLE_OVERRIDE="STATE_CHALLENGES_DOWNTIME_SUBTITLE_OVERRIDE"}(Y||(Y={})),function(q){q.STATE_CHALLENGES_LR_TWEEN="STATE_CHALLENGES_LR_TWEEN",q.STATE_CHALLENGES_RL_TWEEN="STATE_CHALLENGES_RL_TWEEN",q.STATE_CHALLENGES_BG_INTRO_TWEEN="STATE_CHALLENGES_BG_INTRO_TWEEN",q.STATE_CHALLENGES_BG_IDLE_TWEEN="STATE_CHALLENGES_BG_IDLE_TWEEN"}(Q||(Q={})),function(q){q.STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED="STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED",q.STATE_CHALLENGES_SCHOOL_WON_CHALLENGE="STATE_CHALLENGES_SCHOOL_WON_CHALLENGE"}(X||(X={}))},74712:(q,K,z)=>{"use strict";z.d(K,{j:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z(68910),tt=z(99625),et=z(5822),it=z(47287);let st=Y=class extends X.uAl{constructor(){super(...arguments),this._gameDiscoveryEvents=[]}configure(q,K,z,Q,et){var it;let st;this._backgroundImage.image.texture.baseTexture.scaleMode=J.SCALE_MODES.LINEAR,st=q?K?[K,...Z.chain(Y.AD_PREFABS).without(K).shuffle().value(),tt.l.StaticAd_SoMuchMore]:[...Z.shuffle(Y.AD_PREFABS),tt.l.StaticAd_SoMuchMore]:[K];for(const Y of st){const z=new X._mx,Q=q?this._carousel.GameObject.transform:this._content.transform,Z=z.addComponent(X.XVE);Z.setAnchorMin(0,0),Z.setAnchorMax(0,0),Z.setPivot(0,0),Z.setSizeDelta(Q.fullWidth,Q.fullHeight),this._prefabLoader.loadWithDependenciesFromGUID(Y,z).catch(X.RQr.createHandler(`Failed to load prefab ${K}`)),null===(it=this._carousel)||void 0===it||it.addObject(z),this._content.addChild(z)}for(const Y of this._gameDiscoveryEvents)Y.value=null!=z?z:"MemberButton"}};st.AD_PREFABS=[tt.l.StaticAd_LevelUpFaster,tt.l.StaticAd_MemberBoxes,tt.l.StaticAd_MemberChests],(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],st.prototype,"_backgroundImage",void 0),(0,Q.Cg)([(0,X.MnK)(it.g),(0,Q.Sn)("design:type",it.g)],st.prototype,"_carousel",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],st.prototype,"_content",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(et.u),(0,Q.Sn)("design:type",Array)],st.prototype,"_gameDiscoveryEvents",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],st.prototype,"_prefabLoader",void 0),st=Y=(0,Q.Cg)([(0,X.EVk)("StaticAdConfig")],st)},34454:(q,K,z)=>{"use strict";z.d(K,{w:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(99625),J=z(35120),tt=z(28152),et=z(43531),it=z(18206);let st=Y=class extends X.uAl{constructor(){super(...arguments),this.onReady=new X.HN0}static startTaskCompleteDialogue(q,K,z){et.rD.runDialogueSequence([Y.DIALOGUE_COMPLETED_TASK],(()=>{J.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(Z.l.UltimatesWanderingNPCBeginTrackingPopup).then((q=>{q.findComponent(Y).init(K,z)})).catch(X.RQr.createHandler("[startTaskCompleteDialogue] Error when loading Ultimates Wandering NPC Begin Tracking Popup"))})).setParent(X.wa5.getActiveScene().getLayer(q.layer))}init(q,K){this._petID=q,this._segmentOpenPropertiesComponent.originID=K,this.onReady.dispatch()}openPetQuestProgress(){J.q.instance.prodigy.open.pets()}destroy(){this.onReady.dispose(),super.destroy()}};st.DIALOGUE_COMPLETED_TASK=1271,(0,Q.Cg)([(0,X.MnK)(it.y),(0,Q.Sn)("design:type",it.y)],st.prototype,"_segmentOpenPropertiesComponent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],st.prototype,"onReady",void 0),st=Y=(0,Q.Cg)([(0,X.EVk)("TaskCompleteDialogue",tt.Y.ultimates)],st)},37155:(q,K,z)=>{"use strict";z.d(K,{i:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(56942),J=z(35120),tt=z(77938),et=z(28152),it=z(29834);let st=Y=class extends X.uAl{get petSpine(){return this._petSpine}init(q){var K,z;const Y=tt.t.getItem("pet",q),Q=null===(z=null===(K=null==Y?void 0:Y.metadata)||void 0===K?void 0:K.assets)||void 0===z?void 0:z.default;if(null==Q?void 0:Q.assetKey){const q=Z.Q[Q.assetKey];J.q.instance.prodigy.load.assets([q],this.setAnimation.bind(this,q))}else X.VyI.log(`Pet ${q} doesn't have a default value or an assetKey configured to it`,X.$bb.Error)}setAnimation(q){this._petSpine.setAsset(q,(()=>{this._petSpineAnimator.playAnimation(Y.DEFAULT_ANIMATION,!0)}))}};st.DEFAULT_ANIMATION="idle",(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],st.prototype,"_petSpine",void 0),(0,Q.Cg)([(0,X.MnK)(it.j),(0,Q.Sn)("design:type",it.j)],st.prototype,"_petSpineAnimator",void 0),st=Y=(0,Q.Cg)([(0,X.EVk)("UltimatePet",et.Y.ultimates)],st)},52322:(q,K,z)=>{"use strict";z.d(K,{v:()=>tt});var Y=z(8674),Q=z(62459),X=z(24521),Z=z(23029),J=z(28152);let tt=class extends Q.uAl{static changeNextLocation(){this._changeLocation=!0}static getUltimatesPetLocation(q){if(this._changeLocation||!this._previousLocation[q]||""===this._previousLocation[q]){this._changeLocation=!1;const K=Z.R.loadData(X.r.UltimatesPetLocationConfig_json).ultimatesData.find((K=>K.id===q));if(!K)return Q.VyI.log(`Provided petID does not exist within generic config: ${q}`,Q.$bb.Error),"";this._previousLocation[q]=Q.lv2.getRandomItem(K.locationIDs.filter((K=>K!==this._previousLocation[q])))}return this._previousLocation[q]}};tt._previousLocation={0:""},tt._changeLocation=!1,tt=(0,Y.Cg)([(0,Q.EVk)("UltimatesLocation",J.Y.ultimates)],tt)},87742:(q,K,z)=>{"use strict";var Y;z.d(K,{e:()=>Y}),function(q){q[q.Start=0]="Start",q[q.QuestAccepted=1]="QuestAccepted",q[q.Found=2]="Found",q[q.QuestCompleted=3]="QuestCompleted"}(Y||(Y={}))},9421:(q,K,z)=>{"use strict";var Y;z.d(K,{b:()=>Y}),function(q){q[q.TrackLocked=0]="TrackLocked",q[q.TrackUnlocked=1]="TrackUnlocked",q[q.TrackInProgress=2]="TrackInProgress",q[q.Finished=3]="Finished"}(Y||(Y={}))},33359:(q,K,z)=>{"use strict";z.d(K,{P:()=>tt});var Y=z(8674),Q=z(62459),X=z(10592),Z=z(28152),J=z(67818);let tt=class extends Q.uAl{constructor(){super(...arguments),this.selfDestroy=!1}create(){super.create(),this.setInterface(),this._loggedInPlayer.player.onSessionStatusChange.addOnce(this.checkSelfDestroy,this)}checkSelfDestroy(q,K){this.gameObject&&!this.selfDestroy&&(this.noLongerTaming(q)||this.noLongerTracking(q))&&this.gameObject.destroy()}noLongerTaming(q){return this._tamingUI.active&&q!==X.n.TamingUltimate}noLongerTracking(q){return this._npcQuestUI.active&&q!==X.n.TrackingNPC}setInterface(){switch(this._loggedInPlayer.player.ultimateSessionStatus){case X.n.CollectingItems:this._collectingItemsUI.active=!0,this._npcQuestUI.active=!1,this._tamingUI.active=!1;break;case X.n.TrackingNPC:this._collectingItemsUI.active=!1,this._npcQuestUI.active=!0,this._tamingUI.active=!1;break;case X.n.TamingUltimate:this._collectingItemsUI.active=!1,this._npcQuestUI.active=!1,this._tamingUI.active=!0;break;default:this._collectingItemsUI.active=!1,this._npcQuestUI.active=!1,this._tamingUI.active=!1}}setupTamingUI(q,K=!1){this._petIcon.setItemID(q)}cancelTracking(){this.selfDestroy=!0,this._loggedInPlayer.player.setUltimateSessionStatus(X.n.None,"",0)}destroy(){this._loggedInPlayer.player.onSessionStatusChange.remove(this.checkSelfDestroy,this),super.destroy()}};(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",Object)],tt.prototype,"_loggedInPlayer",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_collectingItemsUI",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_npcQuestUI",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_tamingUI",void 0),(0,Y.Cg)([(0,Q.MnK)(J.i),(0,Y.Sn)("design:type",J.i)],tt.prototype,"_petIcon",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("UltimatesTaskViewer",Z.Y.ultimatesUi)],tt)},2775:(q,K,z)=>{"use strict";z.d(K,{m:()=>at});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(58776),J=z(62886),tt=z(35120),et=z(77938),it=z(40392),st=z(435);const nt="ultimates";let at=class{getCurrentQuestData(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("996-2681"),K=yield q.getAllActiveQuestIDs([nt]),z=yield q.getAllInactiveQuestIDs([nt]),Y=[];for(const Z of K.concat(z))try{const z=yield q.getQuestMetaData(Z),Q=yield q.getQuestTasks(Z),X=this.processServerQuest(Z,z,Q,K.includes(Z));Y.push(X)}catch(X){Q.RQr.logError(X,`Failed to setup and process quest data for ${Z}. Skipping.`)}return Y}))}processServerQuest(q,K,z,Y){const Q={petID:K.petID,questID:q,seen:this.isEpicSeen(z),startButtonID:this.getButtonID(z),status:{active:Y,completed:z.every((q=>q.taskProgress.status===Z.t.COMPLETE)),taskID:0},deadline:new Date(K.endDate),tracks:this.generateTaskTracks(z)};return new st.p(Q)}getButtonID(q){return q.find((q=>q.type===J.T.BUTTON_CLICK)).taskDefinition.completionRequirements.data.id}isEpicSeen(q){return q.filter((q=>q.type===J.T.WIN_BATTLE)).some((q=>q.taskProgress.status===Z.t.COMPLETE||q.taskProgress.data.progress>0))}generateTaskTracks(q){const K=[];return q.filter((q=>q.type===J.T.WIN_BATTLE)).forEach((z=>{var Y,Q;const X=z.taskDefinition.prerequisites[0],J=q.find((q=>q.taskID===X)),tt=J.taskDefinition.prerequisites[0],st=q.find((q=>q.taskID===tt)),nt=st.taskDefinition.completionRequirements.data.type,at=st.taskDefinition.completionRequirements.data.id,rt=st.taskDefinition.completionRequirements.data.target,ot=et.t.getItem(nt,at);K.push({collectionTask:{active:this.isTaskActive(q,st),completed:st.taskProgress.status===Z.t.COMPLETE,taskID:tt,itemType:nt,itemID:at,targetZone:it.i.getZoneData(ot.data.targetZone),verb:"Collect",subject:ot.data.name,targetAmount:rt,currentAmount:null!==(Q=null===(Y=st.taskProgress.data)||void 0===Y?void 0:Y.progress)&&void 0!==Q?Q:rt},tradeTask:{active:this.isTaskActive(q,J),completed:J.taskProgress.status===Z.t.COMPLETE,taskID:X},tameTask:{active:this.isTaskActive(q,z),completed:z.taskProgress.status===Z.t.COMPLETE,taskID:z.taskID}})})),K}isTaskActive(q,K){return K.taskDefinition.prerequisites.every((K=>q.find((q=>q.taskID===K)).taskProgress.status===Z.t.COMPLETE))}};at=(0,Y.Cg)([(0,X.injectable)()],at)},435:(q,K,z)=>{"use strict";z.d(K,{p:()=>et});var Y=z(35120),Q=z(10592),X=z(40392),Z=z(87742),J=z(9421),tt=z(52322);class et{constructor(q){this._data=q}getProgressData(){let q=Z.e.QuestCompleted;this._data.status.completed||(q=this._data.seen?Z.e.Found:this._data.tracks.some((q=>q.collectionTask.active))?Z.e.QuestAccepted:Z.e.Start);const K=this._data.tracks.some((q=>q.tradeTask.completed));return{questState:q,petId:this._data.petID,totalCollectionTasks:this.getTotalTaskTracks(),accomplishedCollectionTasks:this.getAccomplishedCollectionTasks(),tamingLevel:this.getTamingLevel(),deadline:this._data.deadline,questId:this._data.questID,nameUnlocked:K}}getTamingTaskCardData(){return this._data.tracks.map((q=>{var K,z,Z;let et=J.b.Finished;const it=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q.tradeTask.completed||(et=q.tradeTask.active&&it.ultimateSessionStatus===Q.n.TrackingNPC&&it.ultimateQuestId===this.questID&&it.ultimateTaskId===q.tradeTask.taskID?J.b.TrackInProgress:q.tradeTask.active?J.b.TrackUnlocked:J.b.TrackLocked);let st=J.b.Finished;q.tameTask.completed||(st=q.tameTask.active&&it.ultimateSessionStatus===Q.n.TamingUltimate&&it.ultimateQuestId===this.questID&&it.ultimateTaskId===q.tameTask.taskID?J.b.TrackInProgress:q.tameTask.active?J.b.TrackUnlocked:J.b.TrackLocked);const nt=tt.v.getUltimatesPetLocation(this._data.petID);return{collectingZone:null===(K=q.collectionTask.targetZone)||void 0===K?void 0:K.getName(),collectingZoneID:null===(z=q.collectionTask.targetZone)||void 0===z?void 0:z.zone,tamingZone:null===(Z=X.i.getZoneData(nt.split("-")[0]))||void 0===Z?void 0:Z.getName(),iconItemType:q.collectionTask.itemType,iconItemID:q.collectionTask.itemID,descriptionVerb:q.collectionTask.verb,descriptionSubject:q.collectionTask.subject,targetAmount:q.collectionTask.targetAmount,currentAmount:q.collectionTask.currentAmount,npcStatus:et,epicStatus:st,trackingTaskId:q.tradeTask.taskID,tamingTaskId:q.tameTask.taskID,collectingTaskId:q.collectionTask.taskID}}))}getTotalTaskTracks(){return this._data.tracks.length}getTotalTasks(){return this._data.tracks.map((q=>Object.keys(q).length)).reduce(((q,K)=>q+K),0)}getCompletedTasks(){return this._data.tracks.map((q=>Object.keys(q).map((K=>q[K].completed?1:0)).reduce(((q,K)=>q+K),0))).reduce(((q,K)=>q+K),0)}getAccomplishedCollectionTasks(){return this._data.tracks.filter((q=>q.collectionTask.completed)).length}getTamingLevel(){return this._data.tracks.reduce(((q,K)=>q+(K.tameTask.completed?1:0)),0)}isTamed(){return this._data.status.completed}getTamedData(){return Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPetByID(this._data.petID)}getUntamedCardData(){return{id:this._data.petID,accomplishedTasks:this.getCompletedTasks(),totalTasks:this.getTotalTasks()}}isActive(){return this._data.status.active}getCollectionTask(q){return this._data.tracks[q].collectionTask}setTradeQuestActiveState(q,K){this._data.tracks[q].tradeTask.active=K}setEpicQuestActiveState(q,K){this._data.tracks[q].tameTask.active=K}activateCollectionTasks(){this._data.tracks.forEach((q=>{q.collectionTask.active=!0}))}getQuestItem(q){this._data.tracks[q].collectionTask.currentAmount+=1,this._data.tracks[q].collectionTask.currentAmount>=this._data.tracks[q].collectionTask.targetAmount&&(this._data.tracks[q].collectionTask.completed=!0)}collectionQuestsStarted(){return this._data.tracks.some((q=>q.collectionTask.active))}completeTradeQuest(q){this._data.tracks[q].tradeTask.completed=!0}completeTamingQuest(q){this._data.tracks[q].tameTask.completed=!0,this._data.tracks.every((q=>q.tameTask.completed))&&(this._data.status.completed=!0)}setSeenState(q){this._data.seen=q}get buttonID(){return this._data.startButtonID}get questID(){return this._data.questID}getTradeTaskID(q){return this._data.tracks[q].tradeTask.taskID}getTamingTaskID(q){return this._data.tracks[q].tameTask.taskID}get petID(){return this._data.petID}}},19506:(q,K,z)=>{"use strict";z.d(K,{J:()=>et});var Y=z(62459),Q=z(90633),X=z(35120),Z=z(56625),J=z(22023),tt=z(73678);class et{static runUniquePetsIntroSequence(q){X.q.instance.prodigy.gameContainer.get("fa1-8ec9").completeBreadcrumb(Q.B.FEATURE_UNIQUE_PETS,Q.B.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE),this.updatePlayerKennel();const K=X.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService),z=X.q.instance.prodigy.gameContainer.get("e81-40c8"),Z=[1754,1755,1756,1757],J=Z.map(((Y,Q)=>{let J={dialogueData:z.dataProvider.get(Y),blockInput:!0};return Q===Z.length-1&&(J=Object.assign(Object.assign({},J),{yesButtonText:K.getText("PET_BOOK_TEXT"),noButtonText:K.getText("NOT_NOW"),yes:()=>{X.q.instance.prodigy.open.pets(q)},no:q})),J}));z.addEvents(J),z.start(!0)}static canShowUniquePetsIntro(){if(!J.P8.showUniquePetsFeature())return!1;const q=X.q.instance.prodigy.gameContainer.get("fa1-8ec9");if(q.isBreadcrumbComplete(Q.B.FEATURE_UNIQUE_PETS,Q.B.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE))return!1;const K=X.q.instance.prodigy.world.getCurrentZone(),z=![tt.A_.DARKTOWER,tt.A_.TOWERTOWN].includes(K),Y=q.isBreadcrumbComplete(Q.B.FEATURE_PET_MERGE,Q.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),et=q.isBreadcrumbComplete(Q.B.FEATURE_PET_MERGE,Q.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED);return z&&!(Y&&!et)&&Z.s.canShowFtue()}static updatePlayerKennel(){var q,K;const z=X.q.instance.prodigy.gameContainer.get("782-c308").kennel,Y=z.getPrimaryPets();for(const X of z.data)Y.find((q=>q.uniqueID===X.uniqueID))||((null===(q=X.gear)||void 0===q?void 0:q.petHat)&&z.unequipGearForPet(X.uniqueID,"petHat"),(null===(K=X.gear)||void 0===K?void 0:K.petRelic)&&z.unequipGearForPet(X.uniqueID,"petRelic"));const Q=z.getPetTeam(!1).map((q=>q.data));if(Q.some((q=>!Y.find((K=>K.uniqueID===q.uniqueID)))))for(const X of Q)z.removeAtTeamPosition(X.team)}}},94995:(q,K,z)=>{"use strict";z.d(K,{V:()=>Z});var Y=z(8674),Q=z(67238),X=z(48417);class Z extends Q.D{getUtsConfig(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.call(X.D.UniversalTeamSelect.GetUtsConfig,{},!0)).data}))}}},11288:(q,K,z)=>{"use strict";z.d(K,{O:()=>rt});var Y=z(8674),Q=z(79687),X=z(62459),Z=z(28628),J=z(35120),tt=z(99625),et=z(76277),it=z(46701),st=z(15821),nt=z(29438),at=z(16905);let rt=class{constructor(){this._config=void 0,this.requiredNumPets=3}setup(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!(0,et.G)(it.Q).enabled)return;const q=J.q.instance.prodigy.gameContainer.get("790-c459");this._config=yield q.getUtsConfig()}))}initiateTeamSelection(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!(0,et.G)(it.Q).enabled)return void Q();if(this.shouldShowTeamSelectionUi(q,K)){J.q.instance.prodigy.open.prefabMenu(tt.l.UniversalTeamSelectionMenu).onPrefabLoaded.addOnce((q=>{const Y=q.findComponent(at.I);try{(0,Z.zJ)(z),Y.setup(z.opponents.units)}catch(tt){X.RQr.createHandler("UniversalTeamSelectionService: Failed to assert battle start config")(tt)}Y.setBackgroundImage(K.screen).catch((q=>{X.RQr.createHandler("UniversalTeamSelectionService: Failed to set background image")(q)})),Y.onBattleStart.addOnce((()=>{Q()}));J.q.instance.prodigy.gameContainer.get("782-c308").data.utsMenuSeenDate=Date.now()}))}else Q()}))}shouldShowTeamSelectionUi(q,K){var z;const Y=J.q.instance.prodigy.gameContainer.get("782-c308");if(st.A.isDefined(Y.data.utsMenuSeenDate)){const q=(0,et.G)(it.Q).menuCooldownMs;if(st.A.isDefined(q)){if(Date.now()-Y.data.utsMenuSeenDate0)||Q.displayConditions.every((q=>(0,nt.W)(q,K))))))}};rt=(0,Y.Cg)([(0,Q.injectable)()],rt)},29438:(q,K,z)=>{"use strict";z.d(K,{W:()=>Q});var Y=z(83195);function Q(q,K){switch(q){case Y.X.TEAM_RESTRICTED:return!0;default:return!1}}},83195:(q,K,z)=>{"use strict";var Y;z.d(K,{X:()=>Y}),function(q){q.TEAM_RESTRICTED="TEAM_RESTRICTED"}(Y||(Y={}))},16905:(q,K,z)=>{"use strict";z.d(K,{I:()=>_t});var Y,Q=z(8674),X=z(87490),Z=z(62459),J=z(95891),tt=z(88022),et=z(28628),it=z(15821),st=z(35120),nt=z(77938),at=z(37465),rt=z(129),ot=z(28152),ht=z(46784),ct=z(65050),dt=z(41674),lt=z(67665),ut=z(53661),ft=z(8763),bt=z(22023),pt=z(80060),vt=z(6413),gt=z(28080),mt=z(71790),yt=z(79259);!function(q){q.PlayerName="PLAYER_NAME",q.StarCount="STAR_COUNT",q.WizardAvatar="UTS_WIZARD_AVATAR",q.BackgroundImage="BACKGROUND_IMAGE",q.ForegroundImage="BACKGROUND_FG_IMAGE",q.SlotSelected="UTS_SLOT_SELECTED",q.PetId="UTS_PET_ID",q.PetName="UTS_PET_NAME",q.PetStarCount="UTS_PET_STAR_COUNT",q.WeaknessIcon="UTS_WEAKNESS_ICON",q.IsRarePet="UTS_IS_RARE_PET",q.ElementIcon="UTS_ELEMENT_ICON",q.IsHomeTeam="UTS_IS_HOME_TEAM"}(Y||(Y={}));let _t=class extends Z.uAl{constructor(){super(...arguments),this._homeTeamPetSlots=[],this._teamDrawerPetSlots=[],this._additionalDrawerPetSlots=[],this._awayTeamPetSlots=[],this.onBattleStart=new Z.HN0,this.onLeaveBattle=new Z.HN0,this._activeTeamSelectionIndex=0,this._cachedTeamIds=[],this._cachedPetDrawerIds=[]}setup(q){const K=Z.wa5.getActiveScene().container;K.bind(X.BattleConstants).to(X.BattleConstants).asSingleton(),K.bind(X.ConstantsDataProvider).to(mt.T).asSingleton(),this._player=st.q.instance.prodigy.gameContainer.get("782-c308");const z=(0,at.u)(this._player,this._player.kennel.getPets()).filter((q=>it.A.isDefined(q))),Q=vt.h.MAX_TEAM_SIZE-1;if(z.lengthK.level-q.level)).splice(0,Q-z.length),K=z.map((q=>q.team));q.forEach(((q,Y)=>{const Q=K.includes(Y)?Y+1:Y;q.team=Q>=this._homeTeamPetSlots.length?0:Q,z.push(q)}))}z.forEach(((q,K)=>{const z=q.ID;this._cachedTeamIds.push(z),this._cachedPetDrawerIds.push(z),pt.d.updateInjectedValues(this._teamDrawerPetSlots[K],ft.j.GetOwnedPetCardInjectionValues(q,this.onPetCardClicked.bind(this),!1,!0,!0)),this.setPetData(!0,K,q)})),this.setAwayTeam(q),this.setDrawerPets(q),pt.d.updateInjectedValues(this.gameObject,{[Y.PlayerName]:this._player.getName(),[Y.StarCount]:this._player.getLevel()}),this.sendInterfaceOpenedEvent(this._player,q)}destroy(){this.onBattleStart.dispose(),this.onLeaveBattle.dispose(),super.destroy()}startBattle(){this._player.kennel.setTemporaryTeamPosition(this._cachedTeamIds[0],1),this._player.kennel.setTemporaryTeamPosition(this._cachedTeamIds[1],2),this.onBattleStart.dispatch()}setAwayTeam(q){Object.values(q).filter((q=>q.asset.type!==et.uj.Wizard)).forEach(((q,K)=>{this.setPetData(!1,K,q)}));const K=Object.values(q).find((q=>q.asset.type===et.uj.Wizard));K&&this.setupEnemyWizard(K).catch(Z.RQr.createHandler("Error setting up enemy wizard in universal team selection menu"))}setupEnemyWizard(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=this._awayTeamPetSlots[this._awayTeamPetSlots.length-1],z=new rt.a(st.q.instance.game);z.appearance.init(Object.assign(Object.assign({},q.appearance),{name:void 0})),z.equipment.init(q.equipment);const Q=yield gt.D.createWizardObject(z,!1);Q.setLayer(void 0,!0),pt.d.updateInjectedValues(K,{[Y.WizardAvatar]:Q,[Y.PetName]:q.appearance.name,[Y.PetStarCount]:q.level,[Y.IsHomeTeam]:!1,[Y.IsRarePet]:!0,[Y.SlotSelected]:!1}),K.active=!0}))}setPetData(q,K,z){var Q,J,et,it,st;const at=null!==(Q=null==z?void 0:z.ID)&&void 0!==Q?Q:z.asset.id,rt=null!==(J=null==z?void 0:z.level)&&void 0!==J?J:z.level,ot=q?this._homeTeamPetSlots[K]:this._awayTeamPetSlots[K];ot.active=!0;const ht=nt.t.getItem("pet",at),ct=bt.P8.getElementType(ht),dt=Z.wa5.getActiveScene().container.get(X.BattleConstants).getElementalWeakness(ct);pt.d.updateInjectedValues(ot,{[Y.IsRarePet]:!1,[Y.PetId]:ht.ID,[Y.PetName]:null!==(it=null===(et=ht.data)||void 0===et?void 0:et.nickname)&&void 0!==it?it:null===(st=ht.data)||void 0===st?void 0:st.name,[Y.PetStarCount]:rt,[Y.ElementIcon]:[tt._.Ui_battle_revamp_json,`icon-mini-element-${ct}`],[Y.WeaknessIcon]:[tt._.Ui_battle_revamp_json,`icon-mini-element-${dt}`],[Y.IsHomeTeam]:q,[Y.SlotSelected]:!!q&&this._activeTeamSelectionIndex===K})}setBackgroundImage(q){return(0,Q.sH)(this,void 0,void 0,(function*(){let K=q;if("string"==typeof q){const z=yt[q];K=null!=z?z:q}yield st.q.instance.prodigy.load.assetsAsPromise(K),pt.d.updateInjectedValues(this.gameObject,{[Y.BackgroundImage]:Array.isArray(K)?K[0]:K,[Y.ForegroundImage]:Array.isArray(K)?K[1]:null})}))}setActiveTeamSelectionIndex(q){if(this._activeTeamSelectionIndex===q)return;const K=this._homeTeamPetSlots[this._activeTeamSelectionIndex];pt.d.updateInjectedValues(K,{[Y.SlotSelected]:!1}),this._activeTeamSelectionIndex=q;const z=this._homeTeamPetSlots[q];pt.d.updateInjectedValues(z,{[Y.SlotSelected]:!0})}setDrawerPets(q){var K;const z=st.q.instance.prodigy.gameContainer.get("782-c308"),Y=Z.wa5.getActiveScene().container.get(X.BattleConstants),Q={};Object.values(q).forEach((q=>{var K;const z=nt.t.getItem("pet",q.asset.id),X=bt.P8.getElementType(z),Z=Y.getElementalWeakness(X);Q[Z]=(null!==(K=Q[Z])&&void 0!==K?K:0)+1}));const J=z.kennel.getPets(!1).filter((q=>!this._cachedTeamIds.includes(q.ID))).sort(((q,K)=>K.level-q.level)),tt=J.slice(0,2),et=J.filter((q=>{if(tt.includes(q))return!1;const K=nt.t.getItem("pet",q.ID),z=bt.P8.getElementType(K);return void 0!==Q[z]}));et.sort(((q,K)=>{var z,Y;const X=nt.t.getItem("pet",q.ID),Z=bt.P8.getElementType(X),J=nt.t.getItem("pet",K.ID),tt=bt.P8.getElementType(J);return(null!==(z=Q[tt])&&void 0!==z?z:0)-(null!==(Y=Q[Z])&&void 0!==Y?Y:0)})),tt.push(null!==(K=et[0])&&void 0!==K?K:J[2]),tt.filter((q=>it.A.isDefined(q))).forEach(((q,K)=>{const z=this._additionalDrawerPetSlots[K];z.active=!0,this._cachedPetDrawerIds.push(q.ID),pt.d.updateInjectedValues(z,ft.j.GetOwnedPetCardInjectionValues(q,this.onPetCardClicked.bind(this),!1,!0,!0))}))}onPetCardClicked(q){if(this._cachedTeamIds.includes(q.ID))return;const K=this._player.kennel.getPetByID(q.ID);this.setPetData(!0,this._activeTeamSelectionIndex,K);const z=this._cachedTeamIds[this._activeTeamSelectionIndex];this._cachedTeamIds[this._activeTeamSelectionIndex]=q.ID,Array.from([...this._teamDrawerPetSlots,...this._additionalDrawerPetSlots]).forEach(((q,K)=>{pt.d.updateInjectedValues(q,{[ut.ML.ShowOnTeam]:this._cachedTeamIds.includes(this._cachedPetDrawerIds[K])})})),0===this._activeTeamSelectionIndex&&this.setActiveTeamSelectionIndex(this._activeTeamSelectionIndex+1);const Y=nt.t.getItem("pet",z);this._segment.featureCommon.sendTeamUpdatedEvent(q.name,Y.data.name,{update_type:dt.jR.Manual,instanceType:ct.N.UniversalTeamSelection})}sendInterfaceOpenedEvent(q,K){const z={opponents:this.mapPetsToAnalyticsInfo(K,q),suggestedPets:this.mapPetsToAnalyticsInfo(this._cachedPetDrawerIds,q)};this._segment.featureCommon.sendInterfaceEvent({interfaceName:ht.B.UniversalTeamSelection,interfaceType:dt.Wm.Screen,instanceType:ct.N.UniversalTeamSelection,originType:dt.$N.AutoSurfaced},{map_entered_instance_type:this._segment.gameWorld.getCurrentInstanceTypeAndID(ct.N.OpenWorld).instance_type,map_entered_instance_id:this._segment.gameWorld.getCurrentInstanceTypeAndID(ct.N.OpenWorld).instance_id,item_list:z})}mapPetsToAnalyticsInfo(q,K){return Array.isArray(q)?q.map((q=>{var z,Y;const Q=nt.t.getItem("pet",q),X=K.kennel.getPetByID(q);return{name:null!==(z=X.nickname)&&void 0!==z?z:Q.name,level:X.level,rank:null!==(Y=X.mergeRank)&&void 0!==Y?Y:0}})):(0,J.map)(q,(q=>{var K,z;let Y="";if(q.asset.type===et.uj.Wizard)Y=q.appearance.name;else{Y=null===(K=nt.t.getItem("pet",q.asset.id).data)||void 0===K?void 0:K.name}return{name:Y,level:q.level,rank:null!==(z=q.mergeRank)&&void 0!==z?z:0}}))}};(0,Q.Cg)([(0,Z.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",lt.Y)],_t.prototype,"_segment",void 0),(0,Q.Cg)([(0,Z.SZi)(),(0,Z.ERr)(),(0,Q.Sn)("design:type",Array)],_t.prototype,"_homeTeamPetSlots",void 0),(0,Q.Cg)([(0,Z.SZi)(),(0,Z.ERr)(),(0,Q.Sn)("design:type",Array)],_t.prototype,"_teamDrawerPetSlots",void 0),(0,Q.Cg)([(0,Z.SZi)(),(0,Z.ERr)(),(0,Q.Sn)("design:type",Array)],_t.prototype,"_additionalDrawerPetSlots",void 0),(0,Q.Cg)([(0,Z.SZi)(),(0,Z.ERr)(),(0,Q.Sn)("design:type",Array)],_t.prototype,"_awayTeamPetSlots",void 0),_t=(0,Q.Cg)([(0,Z.EVk)("UniversalTeamSelectionMenu",ot.Y.universalTeamSelection)],_t)},3374:(q,K,z)=>{"use strict";z.d(K,{C:()=>J});var Y=z(8674),Q=z(79687),X=z(35120),Z=z(37962);let J=class{get videosConfig(){return this._videosConfig}static getVideosDataProvider(){return X.q.instance.prodigy.gameContainer.get("e7b-ae21")}fetchVideosConfig(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._videosConfig||(this._videosConfig=yield this._videosNetworkHandler.getVideosConfig()),this._videosConfig}))}getVideosDataByType(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.fetchVideosConfig();return null==K?void 0:K[q]}))}};(0,Y.Cg)([(0,Q.inject)("7d6-1068"),(0,Y.Sn)("design:type",Z.j)],J.prototype,"_videosNetworkHandler",void 0),J=(0,Y.Cg)([(0,Q.injectable)()],J)},13367:(q,K,z)=>{"use strict";z.d(K,{m:()=>nt});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z(68910),tt=z(35120),et=z(28152),it=z(87337),st=z(12676);let nt=Y=class extends X.uAl{constructor(){super(...arguments),this._onWanderingNPCPresent=new X.HN0,this._onWanderingNPCNotPresent=new X.HN0}static getSeededLocation(q){return""}create(){super.create(),J.Ticker.shared.addOnce(this.checkForWanderingNPC,this)}destroy(){this._onWanderingNPCPresent.dispose(),this._onWanderingNPCNotPresent.dispose(),J.Ticker.shared.remove(this.checkForWanderingNPC,this),super.destroy()}checkForWanderingNPC(){(Y.getSeededLocation()===this.generateLocationID()?this._onWanderingNPCPresent:this._onWanderingNPCNotPresent).dispatch()}generateLocationID(){const q=tt.q.instance.prodigy.world.getCurrentMap(),{x:K,y:z}=this.gameObject.transform.worldPosition;return`${q}-${Math.round(K)}-${Math.round(z)}`}sendDiscoveryEvent(q){const K=Y.getSeededLocation();if(K===this.generateLocationID()){const z=K.split("-");tt.q.instance.prodigy.gameContainer.get("20f-5f67").gameWorld.sendNpcDiscoveredEvent({npc_name:st.N.Ulla,npc_type:it.ac.QuestGiver,npc_id:"580",npc_animation_id:q,x_coord:(0,Z.toInteger)(z[2]),y_coord:(0,Z.toInteger)(z[3])})}}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],nt.prototype,"_onWanderingNPCPresent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],nt.prototype,"_onWanderingNPCNotPresent",void 0),nt=Y=(0,Q.Cg)([(0,X.EVk)("WanderingNPC",et.Y.ultimates)],nt)},78703:(q,K,z)=>{"use strict";z.d(K,{o:()=>nt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(28402);class tt extends Q.m$y{update(q,K){const z=q.gameObject.findComponent(J.v);null!==z?null===z.getSpine()?q.alpha=0:z.alpha=Q.cj9.linear(this.startAlpha,this.endAlpha,K):super.update(q,K)}}class et extends Q.l28{constructor(){super(...arguments),this.loopAnimation=!0}initialize(q){if(q.alpha=0,!q.gameObject.renderer){const K=q.gameObject.addComponent(J.v);q.gameObject.renderer=K}q.gameObject.renderer.setAsset(this.asset,(()=>{Q.Aq$.isDefined(this.animationName)&&this.animationName.length>0&&q.gameObject.renderer.setAnimationByName(0,this.animationName,this.loopAnimation)}))}}var it=z(76945);class st extends Q.l28{constructor(){super(...arguments),this.loopAnimation=!0}initialize(q){const K=q.gameObject.renderer;if(K){if(K.isLoaded){const q=K.getSpine().skeleton.data.animations,z=it.o.integerInRange(0,q.length);K.setAnimationByName(0,q[z].name,this.loopAnimation)}}else Q.VyI.log("No Spine Found On Particle!!",Q.$bb.Error)}}let nt=class extends Q.uAl{constructor(){super(...arguments),this._assetGUID=null,this._noteSpeed=80,this._waveHeight=200,this._noteScale=4,this._noteLifeSeconds=4,this._notesPerSecond=1,this._angleRAD=1}fireTrail(q){var K;q&&this.gameObject.transform.setPosition(q.worldPosition.x,q.worldPosition.y);const z=this.gameObject.addComponent(Q.okU);z.emitPerSecond.setMinMax(this._notesPerSecond,this._notesPerSecond);const Y=new et;Y.asset=(null===(K=this._asset)||void 0===K?void 0:K.length)>0?this._asset:this._assetGUID;const X=new st;X.loopAnimation=!0;const Z=new Q.ZxM;Z.life.setMinMax(this._noteLifeSeconds,this._noteLifeSeconds),Z.life.type=Q.UvC.Random;const J=q?this.getFireAngle(q):this._angleRAD,it=new Q.U8B;it.angle.setMinMax(J*Q.cj9.RAD_TO_DEG,J*Q.cj9.RAD_TO_DEG),it.angle.type=Q.UvC.PhasePerSample,it.speed.setMinMax(this._noteSpeed,this._noteSpeed);const nt=new Q.mYY;nt.point1.setTo(0,this._waveHeight),nt.point2.setTo(0,-this._waveHeight);const at=new Q.hQR;at.scale.setMinMax(this._noteScale,this._noteScale);const rt=new tt;rt.endAlpha=0,rt.startAtLifePercentage=.9,z.initializers=[Y,X,Z,at,nt,it],z.behaviours=[rt]}getFireAngle(q){const K=new Q.I9Y(X.q.instance.game.width/2,X.q.instance.game.height/2);K.subtract(q.worldPosition),K.normalize();let z=Math.acos(K.y);return K.x<0&&(z*=-1),z}};(0,Y.Cg)([(0,Q.Bak)(),(0,Q.i0J)(Q.Z$z.Spine),(0,Y.Sn)("design:type",String)],nt.prototype,"_assetGUID",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],nt.prototype,"_asset",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_noteSpeed",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_waveHeight",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_noteScale",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_noteLifeSeconds",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_notesPerSecond",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_angleRAD",void 0),nt=(0,Y.Cg)([(0,Q.EVk)("WanderingNPCTrail",Z.Y.ultimates)],nt)},12270:(q,K,z)=>{"use strict";z.d(K,{E:()=>X});var Y=z(80003),Q=z(66582);(0,z(39938).n)(Y.D,"WizardBankAllowance");const X=new Map([[Q._$.NonMember,Y.D.NonMember],[Q._$.MemberCore,Y.D.Core],[Q._$.MemberPlus,Y.D.Plus],[Q._$.MemberUltra,Y.D.Ultra]])},8838:(q,K,z)=>{"use strict";z.d(K,{T:()=>Y});var Y,Q=z(39938);!function(q){q.Open="Open",q.Closed="Closed",q.Disabled="Disabled"}(Y||(Y={})),(0,Q.n)(Y,"WizardBankChest")},60228:(q,K,z)=>{"use strict";z.d(K,{Bz:()=>et,Ug:()=>it,cR:()=>tt});var Y=z(8674),Q=z(62459),X=z(89067),Z=z(35120),J=z(98252);function tt(q){const{currency:K,value:z}=q;return 27===K&&z>0}function et(q){const K=Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);if(!J.pF.isNativeApp()||J.pF.eligibleVersionForMobileMembershipPurchaseForMultipleTiers())return K.getText(X.Jr[q])}function it(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=Z.q.instance.prodigy.gameContainer,K=q.get("cb2-bdd4"),z=q.get("959-82c1"),Y=q.get("73f-58d1"),J=q.get(Q.$Bt.LocalizationService),tt=(yield K.getAllowanceClaimData()).totalClaimable,it=X.Uk[Y.memberTier],st=tt.reduce(((q,K)=>q+K.value),0);z.updateNotificationBadge(it,st>0?"!":void 0),z.updateCachedLabelData(it,{labelValue:st>0?J.getText("PLUS_ULTRA_BONUS_COLLECT"):et(it)})}))}},84234:(q,K,z)=>{"use strict";z.d(K,{W:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(80105),tt=z(2265);let et=Y=class{constructor(q){this._seenCostumeIds=[],this.onCostumeDataChanged=new X.HN0,this._networkHandler=new tt.l,this._secureInventory=q}initializeCostumeData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;this._currentCostumePoolData=null==q?void 0:q.pools,this._seenCostumeIds=null!==(K=null==q?void 0:q.seenCostumeIds)&&void 0!==K?K:[],this.onCostumeDataChanged.dispatch()}))}getCurrentCostumePoolData(){var q;const K=Date.now();return null===(q=this._currentCostumePoolData)||void 0===q?void 0:q.filter((q=>(!q.startDate||q.startDate<=K)&&(!q.endDate||q.endDate>=K)))}getCurrentCostumePool(){var q;return null===(q=this.getCurrentCostumePoolData())||void 0===q?void 0:q[0]}getSeenCostumeIds(){return this._seenCostumeIds}getUnseenCostumeIds(){return[...this.getCurrentPoolCostumeIds(),...this.getOwnedCostumes().map((q=>q.id))].filter((q=>!this._seenCostumeIds.includes(q)))}markAllCurrentCostumesAsSeen(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(0===this.getUnseenCostumeIds().length)return;const q=new Set([...this._seenCostumeIds,...this.getCurrentPoolCostumeIds()]);this._seenCostumeIds=Array.from(q),yield this._networkHandler.markCostumesSeen(this._seenCostumeIds),this.onCostumeDataChanged.dispatch()}))}getCurrentPoolCostumeIds(){var q;const K=[];return(null!==(q=this.getCurrentCostumePoolData())&&void 0!==q?q:[]).forEach((q=>q.sections.forEach((q=>K.push(...q.costumeIds))))),K}getCostumesToDisplayForFtuePopup(){const q=this.getCurrentCostumePool();return q?q.sections.reduce(((q,K)=>q.concat(K.costumeIds)),[]).slice(-Y.NUM_FTUE_COSTUMES):[]}getOwnedCostumes(){return this._secureInventory.getAllOfType("costume")}cleanup(){this.onCostumeDataChanged.dispose()}};et.NUM_FTUE_COSTUMES=6,et=Y=(0,Q.Cg)([(0,Z.injectable)(),(0,Q.Qj)(0,(0,Z.inject)("6d6-463e")),(0,Q.Sn)("design:paramtypes",[J.U])],et)},33587:(q,K,z)=>{"use strict";z.d(K,{z:()=>et});var Y=z(8674),Q=z(79687),X=z(4903),Z=z(35120),J=z(73797),tt=z(84415);let et=class{initListeners(){Z.q.instance.prodigy.game.broadcaster.addAppListener(J.H3.MembershipLapsedBetweenSessions,this.onMembershipLapsed,this,void 0,!0)}onMembershipLapsed(){tt.a.clearFeatureTimestamp(X.s.WizardCostumesTutorial)}};et=(0,Y.Cg)([(0,Q.injectable)()],et)},32367:(q,K,z)=>{"use strict";z.d(K,{r:()=>wt});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(4903),J=z(35120),tt=z(73797),et=z(28152),it=z(28047),st=z(63746),nt=z(72799),at=z(1195),rt=z(97252);let ot=class extends Q.uAl{constructor(){super(...arguments),this._runOnCreate=!1,this.onGearTypeEquipped=new Q.HN0,this.onGearTypeNotEquipped=new Q.HN0}create(){this._currentPlayer?this._gearType?this._runOnCreate&&this.isGearTypeEquipped():Q.VyI.log("EquippedGearTypeComponent: No gear type specified, unable to check gear type",Q.$bb.Error):Q.VyI.log("EquippedGearTypeComponent: No current player found, unable to check gear type",Q.$bb.Error)}destroy(){this.onGearTypeEquipped.dispose(),this.onGearTypeNotEquipped.dispose(),super.destroy()}isGearTypeEquipped(){this._currentPlayer.player.equipment.getData()[this._gearType]?this.onGearTypeEquipped.dispatch():this.onGearTypeNotEquipped.dispatch()}unEquipGearType(){return(0,Y.sH)(this,arguments,void 0,(function*(q=!0){const K=this._currentPlayer.player.equipment.getData()[this._gearType];K&&(yield this._currentPlayer.player.unEquip(K,this._gearType),q&&this.isGearTypeEquipped())}))}};(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",at.E)],ot.prototype,"_currentPlayer",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ot.prototype,"_runOnCreate",void 0),(0,Y.Cg)([(0,Q.gfw)(rt.At),(0,Y.Sn)("design:type",String)],ot.prototype,"_gearType",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ot.prototype,"onGearTypeEquipped",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ot.prototype,"onGearTypeNotEquipped",void 0),ot=(0,Y.Cg)([(0,Q.EVk)("EquippedGearType",et.Y.utility)],ot);var ht=z(23082),ct=z(15485),dt=z(46784),lt=z(65050),ut=z(96073),ft=z(24047),bt=z(41674),pt=z(94325),vt=z(21418),gt=z(53661),mt=z(84415),yt=z(3374),_t=z(84234),Et=z(19609);let wt=class extends it.v{constructor(){super(...arguments),this._menuFullyInitialized=new Q.HN0,this._onScreenEquippedGearGuards=new Set,this._onScreenItemCards=new Set,this._videoType=Z.s.WizardCostumesTutorial,this.onCostumeSelected=new Q.HN0,this.onCostumeEquipped=new Q.HN0}get firstCostumeCard(){const[q]=this._onScreenItemCards;return q.GameObject.findComponent(Q.y4o).getRootContainer()}create(){super.create();const q=this._wizardCostumesDataProvider.getCurrentCostumePool();if(!q)return void Q.VyI.log("WizardCostumesMenuComponent#create: No active costume pool found. Unable to initialize the menu.",Q.$bb.Error);this._contentRoot.alpha=0,this._contentRoot.updateFilter();const K=J.q.instance.game.state.get(ht.G.TileScreen);(null==K?void 0:K.gameRenderCache)&&(K.gameRenderCache.visible=!1);const z=this.initialize({currentCostumePool:q}).catch(Q.RQr.createHandler("WizardCostumesMenuComponent#create: Failed to initialize the menu with the provided data."));this.sendCostumesFunnelStep(ut.j.MenuOpen,ut.t.MenuOpen),this._howItWorksButton.active=!1;const Y=Et.hD.isFtueFlowActive();let X=!1;const Z=[z,this.refreshVideoData().then((()=>{if(!Q.Aq$.isDefined(this._currentVideoTypeData))return this._howItWorksButton.active=!1,void Q.VyI.log("WizardCostumesMenuComponent: No video data found for the current video type.",Q.$bb.Warning);if(this._howItWorksButton.active=!0,this.shouldAutoPlayVideo()){X=!0,this.sendCostumesFunnelStep(ut.j.TutorialVideoStarted,ut.t.TutorialVideoStarted);const q=()=>{this.sendCostumesFunnelStep(ut.j.TutorialVideoFinished,ut.t.TutorialVideoFinished),Y&&Et.hD.start(this)};this.openVideoMenu(!0,q)}})).catch(Q.RQr.createHandler("WizardCostumesMenuComponent#create: Failed to refresh video data on menu creation."))];Y&&Z.push(Et.hD.preloadOverlay().catch(Q.RQr.createHandler("WizardCostumesMenuComponent#create: Failed to preload FTUE overlay."))),Promise.all(Z).then((()=>{Y&&!X&&Et.hD.start(this),this._contentRoot.alpha=1,this._contentRoot.updateFilter(),this._menuFullyInitialized.dispatch()})).catch(Q.RQr.createHandler("WizardCostumesMenuComponent#create error"))}setScrollEnabled(q){this._scrollView.lockScrollWheel=!q,this._scrollView.contentDraggingEnabled=q}resetScrollPosition(){this._scrollView.scrollToPercent(0)}destroy(){this._player.onEquipmentChange.remove(this.handleEquippedStatus,this),this._menuFullyInitialized.dispose(),this.onCostumeSelected.dispose(),this.onCostumeEquipped.dispose(),super.destroy()}initialize(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!q)return void Q.VyI.log("WizardCostumesMenuComponent#initialize: No menu data provided. Unable to initialize the menu.",Q.$bb.Error);this._wizardCostumesMenuData=q;const{currentCostumePool:K}=this._wizardCostumesMenuData,z=[];for(const q of K.sections)z.push(...this.addItemsSection({id:q.nameLocKey,label:this._baseLocalizer.getText(q.nameLocKey),colour:q.colour,expiresAt:K.endDate,displayEquippedGearCard:q.displayEquippedGearCard},q.costumeIds));const Y=this._player.equipment.getCostume();Y&&this._itemPreview.renderSelectedItem({id:Y,type:"costume",cost:{}},void 0,!0);const Z=yield this._shelfSpawner.spawnPrefabsWithData(z),J=[],tt=[];Z.forEach((q=>{q.config&&q.attachedObject&&[X.l.ItemCard,X.l.ItemCard_EquippedGear].includes(q.config.prefabGuid)&&(J.push(q.attachedObject.findComponentInChildren(nt.M).onRenderComplete.asPromise()),tt.push(q.attachedObject.findComponent(Q.y4o).getRootContainer()))})),tt.forEach((q=>q.alpha=0)),yield Promise.all(J),tt.forEach((q=>q.alpha=1)),yield this._wizardCostumesDataProvider.markAllCurrentCostumesAsSeen(),this._player.onEquipmentChange.add(this.handleEquippedStatus,this)}))}addItemsSection(q,K){const z=!!Q.Aq$.isDefined(q.expiresAt)&&q.expiresAt-J.q.instance.prodigy.timeManager.getLocalTimeMs();return[{prefabGuid:X.l.DynamicStoreSectionHeader,data:{DYNAMIC_STORE_SHELF_LABEL:q.label,DYNAMIC_STORE_SHELF_MILLISECONDS_REMAINING:z,DYNAMIC_STORE_SHELF_HEADER_COLOUR:q.colour,DYNAMIC_STORE_SHELF_CURRENCIES:[]}},...this.createSectionShelfData(q,K)]}createSectionShelfData(q,K){const z=K.map((q=>({prefabGuid:X.l.ItemCard,data:{[gt.Tl.Data]:{id:q,type:"costume"}}})));return q.displayEquippedGearCard&&z.unshift({prefabGuid:X.l.ItemCard_EquippedGear,data:{}}),z}onPooledObjectEnter(q,K){switch(K.prefabGuid){case X.l.ItemCard:{const z=q.findComponentInChildren(st.Z);if(!z)return Q.VyI.log("WizardCostumesMenuComponent#onPooledObjectEnter: Failed to find an ItemCardComponent in ItemCard prefab. Hiding the object.",Q.$bb.Error),void(q.active=!1);const Y=K.data[gt.Tl.Data];null==z||z.initializeItemCard(Y,(()=>{this.onItemCardClicked(Y.id).catch(Q.RQr.createHandler("WizardCostumesMenuComponent#onPooledObjectEnter: Failed to handle item card click event."))})),z.setNewNotificationBadgeVisibility(this._wizardCostumesDataProvider.getUnseenCostumeIds().includes(Y.id)),this._onScreenItemCards.add(z),this.adjustRectTransformsForItemCards(q);break}case X.l.ItemCard_EquippedGear:{const K=q.findComponent(ot);if(!K)return Q.VyI.log("WizardCostumesMenuComponent#onPooledObjectEnter: Failed to find an EquippedGearTypeComponent in ItemCard_EquippedGear prefab. Hiding the object.",Q.$bb.Error),void(q.active=!1);this._onScreenEquippedGearGuards.add(K),K.isGearTypeEquipped(),this.adjustRectTransformsForItemCards(q);break}}}onPooledObjectExit(q,K){switch(K.prefabGuid){case X.l.ItemCard:{const K=q.findComponentInChildren(st.Z);K&&this._onScreenItemCards.delete(K);break}case X.l.ItemCard_EquippedGear:{const K=q.findComponent(ot);K&&this._onScreenEquippedGearGuards.delete(K);break}}}adjustRectTransformsForItemCards(q){var K;const z=q.findComponent(Q.XVE);if(!z)return Q.VyI.log("WizardCostumesMenuComponent#adjustRectTransformsForItemCards: Failed to find a RectTransform in the Item Card or ItemCard_EquippedGear prefab. Hiding the object.",Q.$bb.Error),void(q.active=!1);z.setAnchorMin(0,0),z.setAnchorMax(0,0),z.setPivot(0,0);const Y=null===(K=q.parent)||void 0===K?void 0:K.findComponent(Q.XVE);Y?(Y.setAnchorMin(0,0),Y.setAnchorMax(0,0),Y.setPivot(0,0)):(Q.VyI.log("WizardCostumesMenuComponent#adjustRectTransformsForItemCards: Failed to find a RectTransform in parent of the Item Card or ItemCard_EquippedGear prefab. Hiding the object.",Q.$bb.Error),q.active=!1)}onItemCardClicked(q){return(0,Y.sH)(this,void 0,void 0,(function*(){this._onScreenItemCards.forEach((K=>{var z;(null===(z=K.itemCardData)||void 0===z?void 0:z.id)===q&&K.setNewNotificationBadgeVisibility(!1)})),this._segment.featureCommon.sendButtonEvent({buttonName:ct.k.CostumesItemCardButton,interfaceName:dt.B.WizardCostumesMenu,interfaceType:bt.Wm.Menu,instanceType:lt.N.Interface,destinationName:dt.B.ItemInfo,saveClickInfo:ct.k.CostumesItemCardButton}),J.q.instance.prodigy.open.itemInfo({ID:q,type:"costume"},void 0,vt.s.WizardCostumesMenu,ct.k.CostumesItemCardButton),this.onCostumeSelected.dispatch(),this.sendCostumesFunnelStep(ut.j.CostumePreview,ut.t.CostumePreview)}))}handleEquippedStatus(){const q=this._player.equipment.getCostume(),K=Q.Aq$.isDefined(q)&&0!==q;this._player.appearanceChanged=!0,J.q.instance.game.broadcaster.broadcast(tt.J8.PlayerAppearanceUpdated),this._onScreenEquippedGearGuards.forEach((q=>q.isGearTypeEquipped())),this._onScreenItemCards.forEach((z=>{var Y;z.setEquippedIconVisibility(K&&(null===(Y=z.itemCardData)||void 0===Y?void 0:Y.id)===q)})),K&&q?(this._itemPreview.renderSelectedItem({id:q,type:"costume",cost:{}},void 0,!0),this.onCostumeEquipped.dispatch(),this.sendCostumesFunnelStep(ut.j.CostumeEquipped,ut.t.CostumeEquipped)):this._itemPreview.setToDefaultState()}sendCostumesFunnelStep(q,K){this._segment.funnel.sendStep(ft.F.Costumes,"feature",q,K)}shouldAutoPlayVideo(){const q=J.q.instance.prodigy.gameContainer.get("782-c308");return!mt.a.doesFeatureTimestampExist(q,this._videoType)}openVideoMenu(q=!1,K){var z,Y,Z;Object.keys(null!==(Z=null===(Y=null===(z=this._currentVideoTypeData)||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.videos)&&void 0!==Z?Z:{}).length<=0?Q.VyI.log("WizardCostumesMenuComponent#openVideoMenu: No valid videos to show for the current video type. Skipping video menu.",Q.$bb.Warning):J.q.instance.prodigy.open.genericVideoMenu({videoMenuGuid:X.l.WizardCostumesVideoMenu,videoTypeData:this._currentVideoTypeData,saveTimestamp:!0,showCountdown:q,onClose:K})}refreshVideoData(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yt.C.getVideosDataProvider();this._currentVideoTypeData=yield q.getVideosDataByType(this._videoType)}))}};(0,Y.Cg)([(0,Q.Cdj)("230-ffdb"),(0,Y.Sn)("design:type",_t.W)],wt.prototype,"_wizardCostumesDataProvider",void 0),(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],wt.prototype,"_baseLocalizer",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],wt.prototype,"_howItWorksButton",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.jsv),(0,Y.Sn)("design:type",Q.jsv)],wt.prototype,"_contentRoot",void 0),(0,Y.Cg)([(0,Q.MnK)(pt.C),(0,Y.Sn)("design:type",pt.C)],wt.prototype,"_scrollView",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],wt.prototype,"_menuFullyInitialized",void 0),wt=(0,Y.Cg)([(0,Q.EVk)("WizardCostumesMenu",et.Y.wizardCostumes)],wt)},2265:(q,K,z)=>{"use strict";z.d(K,{l:()=>Z});var Y=z(8674),Q=z(48417),X=z(76546);class Z extends X.D{markCostumesSeen(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Q.D.WizardCostumes.MarkCostumesSeen,{costumeIds:q},!1)}))}callDebugRoute(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}}},19609:(q,K,z)=>{"use strict";z.d(K,{Ts:()=>at,hD:()=>ot});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(35120),J=z(7351),tt=z(73797),et=z(13956),it=z(68152),st=z(84415);const nt="wizardCostumesFtueSeen",at=12;var rt;!function(q){q.Initialize="Initialize",q.HighlightFirstCostume="Step 1",q.PointAtFirstCostume="Step 2",q.PointAtWearButton="Step 3",q.AfterEquip="Step 4",q.HighlightBackpackTab="Step 5",q.PointAtBackpackTab="Step 6",q.InsideBackpack="Step 7",q.InsideBackpack2="Step 7.1",q.PointAtCostumesTab="Step 8",q.BackInCostumes="Step 9",q.Complete="Complete"}(rt||(rt={}));class ot{constructor(){this._currentStep=rt.Initialize}static isFtueFlowActive(){return ot._ftueFlowActive}static shouldShowFtue(){return!st.a.doesFeatureTimestampExist(ot._activePlayer,nt)}static initFtue(){const q=ot._activePlayer;ot._ftueFlowActive=!0,q.saveEnabled=!1;const K=q.equipment.getCostume();Q.Aq$.isDefined(K)&&0!==K&&(q.equipment.setCostume(0),q.appearanceChanged=!0,Z.q.instance.game.broadcaster.broadcast(tt.J8.PlayerAppearanceUpdated))}static completeFtue(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=ot._activePlayer;st.a.saveTimestampData(nt),q.saveEnabled=!0,ot._ftueFlowActive=!1,yield new Promise((K=>q.forceSaveCharacter(K)))}))}static preloadOverlay(){return(0,Y.sH)(this,void 0,void 0,(function*(){return ot._preloadPromise||(ot._preloadPromise=(()=>(0,Y.sH)(this,void 0,void 0,(function*(){return Z.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(X.l.WizardCostumesFTUEOverlay).then((q=>q.active=!1))})))()),ot._preloadPromise}))}static start(q){ot._instance?ot._instance._menuComponent=q:(ot._instance=new ot,ot._instance._menuComponent=q,ot.preloadOverlay().then((q=>{var K;q.active=!0,null===(K=ot._instance)||void 0===K||K.run({stringState:Q.Uoy.getInjectedValue(q,"STRING_STATE"),highlightGraphic:Q.Uoy.getInjectedValue(q,"HIGHLIGHT_GRAPHIC"),audioPlayer:Q.Uoy.getInjectedValue(q,"AUDIO_PLAYER")})})).catch(Q.RQr.createHandler("WizardCostumesTutorialController.start: Failed to load tutorial prefab")))}run(q){var K,z;this._highlightGraphic=q.highlightGraphic,this._audioPlayer=q.audioPlayer,null===(K=this._menuComponent)||void 0===K||K.resetScrollPosition(),null===(z=this._menuComponent)||void 0===z||z.setScrollEnabled(!1),this.setState=K=>{this._currentStep=K,q.stringState.setValue(K),this.handleStateChange()},this.setState(rt.HighlightFirstCostume)}handleStateChange(){switch(this._currentStep){case rt.HighlightFirstCostume:(0,it.v)(this._menuComponent);const q=this._menuComponent.firstCostumeCard,K=Z.q.instance.game.renderer.generateTexture(q);this._highlightGraphic.setTexture(K),this._highlightGraphic.GameObject.transform.setPosition(q.getBounds().x,q.getBounds().y),this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(rt.PointAtFirstCostume)}));break;case rt.PointAtFirstCostume:(0,it.v)(this._menuComponent),this._menuComponent.onCostumeSelected.addOnce((()=>{this.setState(rt.PointAtWearButton)}));break;case rt.PointAtWearButton:(0,it.v)(this._menuComponent),this._highlightGraphic.setTexture(void 0),this._menuComponent.onCostumeEquipped.addOnce((()=>{this.setState(rt.AfterEquip)}));break;case rt.AfterEquip:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(rt.HighlightBackpackTab)}));break;case rt.HighlightBackpackTab:(0,it.v)(this._menuComponent),this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(rt.PointAtBackpackTab)})),this._menuComponent.headerNavigation.tabsContainerObject.children[1].layer="CostumesFTUEDimmer";break;case rt.PointAtBackpackTab:(0,it.v)(this._menuComponent),this._menuComponent.headerNavigation.tabsContainerObject.children[1].layer="default",this._menuComponent.OnDestroy.addOnce((()=>{this._menuComponent=void 0,this.setState(rt.InsideBackpack)}));break;case rt.InsideBackpack:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(rt.InsideBackpack2)}));break;case rt.InsideBackpack2:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(rt.PointAtCostumesTab)}));break;case rt.PointAtCostumesTab:Z.q.instance.prodigy.open.onPrefabMenuOpened.addOnce((q=>{q===X.l.WizardCostumesMenu&&this.setState(rt.BackInCostumes)}));break;case rt.BackInCostumes:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>(0,Y.sH)(this,void 0,void 0,(function*(){this.setState(rt.Complete),ot._instance=void 0,yield ot.completeFtue()}))))}}}ot._ftueFlowActive=!1,ot.ftuePopupLoading=!1,(0,Y.Cg)([(0,et.b)("782-c308"),(0,Y.Sn)("design:type",J.W)],ot,"_activePlayer",void 0)},41012:(q,K,z)=>{"use strict";z.d(K,{e:()=>st});var Y=z(8674),Q=z(62459),X=z(28344),Z=z(29738),J=z(34829),tt=z(7351),et=z(76277),it=z(13956);class st{static hasWizardWatchAccess(){return(0,Y.sH)(this,void 0,void 0,(function*(){return!!Z.O.isEnglishLocale()&&(!(0,et.G)(X.y).enabled||this._featureRequirements.meetsRequirements(7))}))}static canAutoSurfaceWizardWatch(){return(0,Y.sH)(this,void 0,void 0,(function*(){return!!(yield st.hasWizardWatchAccess())&&(!(this._activePlayer.tutorialCompletedThisSession||!this._activePlayer.hasCompletedTutorial())&&!(Q.Aq$.isDefined(this._activePlayer.data.wwCooldownTime)&&Date.now()-this._activePlayer.data.wwCooldownTime<2*J.A.HOURS_IN_MS))}))}}(0,Y.Cg)([(0,it.b)("782-c308"),(0,Y.Sn)("design:type",tt.W)],st,"_activePlayer",void 0),(0,Y.Cg)([(0,it.b)("11f-118a"),(0,Y.Sn)("design:type",Object)],st,"_featureRequirements",void 0)},3692:(q,K,z)=>{"use strict";z(10778);var Y=z(49237),Q=(z(12808),z(8674)),X=z(62459);let Z=class extends X.uAl{logOver(){this.logMessage("over")}logOut(){this.logMessage("out")}logDown(){this.logMessage("down")}logUp(){this.logMessage("up")}logClick(){this.logMessage("click")}logMessage(q){X.VyI.log(`Got button event: ${q}`,X.$bb.Info)}};Z=(0,Q.Cg)([(0,X.EVk)("ButtonTester",X.YH6.ui)],Z);var J=z(24519),tt=z(56163),et=(z(54422),z(28152));let it=class extends X.uAl{constructor(){super(...arguments),this.direction=X.e$E.Vertical,this.spacing=10,this.offset=0,this.fitChildren=!0,this.ignoreInactive=!0}postCreate(){this.gameObject.onChildAdded.add(this.updateLayout,this),this.gameObject.onChildRemoved.add(this.updateLayout,this);for(const q of this.gameObject.children)this.onChildAdded(q,!1);this.updateLayout()}destroy(){this.gameObject.onChildAdded.remove(this.updateLayout,this),this.gameObject.onChildRemoved.remove(this.updateLayout,this);for(const q of this.gameObject.children){q.onActiveChanged.remove(this.updateLayout,this);const K=q.transform;K instanceof X.XVE&&K.onDimensionsChanged.remove(this.updateLayout,this)}super.destroy()}onChildAdded(q,K=!0){q.onActiveChanged.add(this.updateLayout,this);const z=q.transform;z instanceof X.XVE&&z.onDimensionsChanged.add(this.updateLayout,this),K&&this.updateLayout()}onChildRemoved(q,K=!0){q.onActiveChanged.remove(this.updateLayout,this);const z=q.transform;z instanceof X.XVE&&z.onDimensionsChanged.remove(this.updateLayout,this),K&&this.updateLayout()}updateLayout(){let q=this.offset;for(const K of this.gameObject.children){if(this.ignoreInactive&&!K.active)continue;const z=K.transform;z&&(this.direction===X.e$E.Vertical?z.setPositionY(q):z.setPositionX(q),q+=this.spacing,z instanceof X.XVE&&(this.direction===X.e$E.Vertical?q+=z.sizeDelta.height:q+=z.sizeDelta.width))}if(this.fitChildren){const K=this.gameObject.transform;if(K instanceof X.XVE){const z=new X.or0(K.sizeDelta.width,K.sizeDelta.height);this.direction===X.e$E.Vertical?z.height=q:z.width=q,K.setSizeDelta(z.width,z.height)}}}};(0,Q.Cg)([(0,X.gfw)(X.e$E),(0,Q.Sn)("design:type",String)],it.prototype,"direction",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],it.prototype,"spacing",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],it.prototype,"offset",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"fitChildren",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"ignoreInactive",void 0),it=(0,Q.Cg)([(0,X.EVk)("ListLayout",et.Y.uiLayout)],it);z(47716);var st=z(12420),nt=z(11472),at=z(53153);let rt=class extends at.y{constructor(){super(...arguments),this._button=null}postDeserialize(){super.postDeserialize(),this._base=this._button}};(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],rt.prototype,"_button",void 0),rt=(0,Q.Cg)([(0,X.EVk)("ScrollViewButton")],rt);var ot=z(89400),ht=(z(76501),z(33961));z(25456);let ct=class extends J.v{constructor(){super(...arguments),this._selectedStateObject=null,this._selectable=null}postCreate(){super.postCreate(),this._selectedStateObject&&(this._selectedStateObject.active=this._selectable.isSelected())}getStateObject(q){return this._selectable.isSelected()?this._selectedStateObject:super.getStateObject(q)}};(0,Q.Cg)([(0,X.x4W)("selectedStateObject"),(0,Q.Sn)("design:type",X._mx)],ct.prototype,"_selectedStateObject",void 0),(0,Q.Cg)([(0,X.x4W)("selectable"),(0,Q.Sn)("design:type",Object)],ct.prototype,"_selectable",void 0),ct=(0,Q.Cg)([(0,X.EVk)("SelectedGameObjectTransition",X.YH6.transition)],ct);var dt=z(35120);let lt=class extends X.uAl{get scrollBarListener(){return this._scrollView.scrollBarListener}get scrollReleaseListener(){return this._scrollView.scrollReleaseListener}create(){super.create(),this._barWidth=this._sliderTrack.legacyTransform.width,this._barHeight=this._sliderTrack.legacyTransform.height,this._contentView=new X._mx(this.GameObject),this._contentView.addComponent(X.K16),this._contentViewChild=new X._mx(this._contentView),this._contentViewChild.addComponent(X.K16),this._scrollViewObject=new X._mx,this._scrollViewObject.addComponent(X.K16),this._scrollView=this._scrollViewObject.addComponent(nt.B,!1),this._scrollView.allowMouseWheel=!1,this._scrollView.horizontal=!0,this._scrollView.contentView=this._contentView,this._scrollView.create(),this._scrollBar=this.GameObject.addComponent(st.$),this._scrollBar.horizontal=!0,this._scrollBar.useHandCursor=!0,this._scrollBar.initialize(this._sliderNib,this._scrollView),this._scrollView.scrollBarListener.add(this.updateSlider.bind(this)),this._sliderMask=dt.q.instance.game.add.graphics(0,0,this._sliderFill.legacyTransform.group),this._sliderMask.beginFill(0),this._sliderMask.drawRect(0,0,this._barWidth,this._barHeight),this._sliderMask.inputEnabled=!1,this._sliderFill.legacyTransform.group.mask=this._sliderMask}setInputPriority(q){this._scrollBar.setInputPriority(q)}getPercent(){return this._scrollBar.getPercent()}scrollToPercent(q){this._scrollBar.scrollToPercent(q),this.updateSlider()}updateSlider(){this._sliderMask.x=this._sliderNib.legacyTransform.x-this._barWidth+this._sliderNib.legacyTransform.width/2}destroy(){this._scrollBar.destroy(),this._scrollView.destroy(),this._scrollViewObject.destroy(),this._contentView.destroy(),this._contentViewChild.destroy(),this._sliderMask.destroy(),this._sliderFill.destroy(),this._sliderTrack.destroy(),this._sliderNib.destroy(),super.destroy()}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_sliderFill",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_sliderTrack",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_sliderNib",void 0),lt=(0,Q.Cg)([(0,X.EVk)("Slider",X.YH6.ui)],lt);var ut,ft=z(83133);z(13930);!function(q){q.Vertical="vertical",q.Horizontal="horizontal"}(ut||(ut={}));class bt extends X.$KW{generate(q,K){return X.XRp.createVertical([this.waveFunction(q),this.gridLayout(q)])}waveFunction(q){var K,z,Y,Q,Z;const J=X.Gme.checkboxGroup({id:"applyForY",labelValue:"Apply for Y",inputValue:q.applyForY||!1,labelTooltip:"If it should apply on the Y coordinates"}),tt=X.Gme.checkboxGroup({id:"avoidDuplicatePositions",labelValue:"Avoid Dup. Pos.",inputValue:q.avoidDuplicatePositions||!1,labelTooltip:"Tries to avoid duplicate positions making the positioning seem continuous"}),et=X.Gme.numberGroup({id:"amplitude",labelValue:"Amplitude",inputValue:null!==(K=q.amplitude)&&void 0!==K?K:50,inputUpdateMode:X.JGO.OnTheFly,labelTooltip:"How high and how low will items be placed"}),it=X.Gme.numberGroup({id:"frequency",labelValue:"Frequecy",inputValue:null!==(z=q.frequency)&&void 0!==z?z:1.1,inputUpdateMode:X.JGO.OnTheFly,labelTooltip:"Increases and decreases how frequent overtime the cycle repeats"}),st=X.Gme.numberGroup({id:"phase",labelValue:"Phase",inputValue:null!==(Y=q.phase)&&void 0!==Y?Y:5.35,inputUpdateMode:X.JGO.OnTheFly,labelTooltip:"At which point the wave start, used to advance or retreat the starting point"}),nt=X.Gme.numberGroup({id:"timeFraction",labelValue:"Time Fraction",inputValue:null!==(Q=q.timeFraction)&&void 0!==Q?Q:5,inputUpdateMode:X.JGO.OnTheFly,labelTooltip:"Controls how many items are contained in a full wave"}),at=X.Gme.numberGroup({id:"roundStep",labelValue:"Round Step",inputValue:null!==(Z=q.roundStep)&&void 0!==Z?Z:10,inputUpdateMode:X.JGO.OnTheFly,labelTooltip:"Snap to positions following this gap"}),rt=X.XRp.createVertical([et,it,st],{title:"Wave Length Configs",isContainer:!0,startCollapsed:!1}),ot=X.XRp.createVertical([nt,at],{title:"Position Fine Tuning",isContainer:!0,startCollapsed:!1});return X.XRp.createVertical([J,tt,rt,ot],{title:"Wave Function Configs",startCollapsed:!1,isContainer:!0})}gridLayout(q){const K=X.Gme.numberGroup({id:"fixedRowCount",labelValue:"fixedRowCount",inputValue:q.fixedRowCount}),z=X.Gme.numberGroup({id:"fixedColumnCount",labelValue:"fixedColumnCount",inputValue:q.fixedColumnCount}),Y=X.Gme.checkboxGroup({id:"dynamicRowHeight",labelValue:"dynamicRowHeight",inputValue:q.dynamicRowHeight}),Q=X.Gme.checkboxGroup({id:"dynamicColumnWidth",labelValue:"dynamicColumnWidth",inputValue:q.dynamicColumnWidth}),Z=X.Gme.numberGroup({id:"rowSpacing",labelValue:"rowSpacing",inputValue:q.rowSpacing}),J=X.Gme.numberGroup({id:"columnSpacing",labelValue:"columnSpacing",inputValue:q.columnSpacing}),tt=X.Gme.numberGroup({id:"xPositionOffset",labelValue:"xPositionOffset",inputValue:q.xPositionOffset}),et=X.Gme.numberGroup({id:"yPositionOffset",labelValue:"yPositionOffset",inputValue:q.yPositionOffset}),it=X.Gme.numberGroup({id:"alignmentAnchorX",labelValue:"alignmentAnchorX",inputValue:q.alignmentAnchorX}),st=X.Gme.numberGroup({id:"alignmentAnchorY",labelValue:"alignmentAnchorY",inputValue:q.alignmentAnchorY}),nt=X.Gme.enumGroup({id:"fillPriority",labelValue:"Fill Priority",selectValue:q.fillPriority},ut),at=X.Gme.checkboxGroup({id:"reverseFillRow",labelValue:"reverseFillRow",inputValue:q.reverseFillRow}),rt=X.Gme.checkboxGroup({id:"reverseFillColumn",labelValue:"reverseFillColumn",inputValue:q.reverseFillColumn}),ot=X.Gme.numberGroup({id:"indexOffset",labelValue:"indexOffset",inputValue:q.indexOffset}),ht=X.NyS.create({id:"onUpdated",label:"On Updated",signalValue:q.onUpdated,componentGUID:this._componentGuid}),ct=X.Gme.enumGroup({id:"lastLineAlignment",labelValue:"Last Line Alignment",selectValue:q.lastLineAlignment},X.DEw);return X.XRp.createVertical([K,z,Y,Q,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct],{title:"Grid Layout Configs",startCollapsed:!1,isContainer:!0})}}let pt=class extends X.PEP{constructor(){super(...arguments),this.amplitude=50,this.frequency=1.1,this.phase=5.35,this.timeFraction=5,this.roundStep=10,this._yCache=[],this._yCacheI=0,this.applyForY=!0,this.avoidDuplicatePositions=!1,this._fixedRowCount=0,this._fixedColumnCount=0,this._dynamicRowHeight=!1,this._dynamicColumnWidth=!1,this._rowSpacing=0,this._columnSpacing=0,this._xPositionOffset=0,this._yPositionOffset=0,this._alignmentAnchorX=0,this._alignmentAnchorY=0,this._fillPriority=ut.Horizontal,this._reverseFillRow=!1,this._reverseFillColumn=!1,this._indexOffset=0,this.onUpdated=new X.HN0,this._lastLineAlignment=X.DEw.Start}get fixedRowCount(){return this._fixedRowCount}get fixedColumnCount(){return this._fixedColumnCount}get dynamicRowHeight(){return this._dynamicRowHeight}get dynamicColumnWidth(){return this._dynamicColumnWidth}get rowSpacing(){return this._rowSpacing}get columnSpacing(){return this._columnSpacing}get xPositionOffset(){return this._xPositionOffset}get yPositionOffset(){return this._yPositionOffset}get alignmentAnchorX(){return this._alignmentAnchorX}get alignmentAnchorY(){return this._alignmentAnchorY}get fillPriority(){return this._fillPriority}get indexOffset(){return this._indexOffset}set indexOffset(q){this._indexOffset=q}postDeserialize(){super.postDeserialize(),this._fixedRowCount<1&&this._fixedColumnCount<1?(X.VyI.log("At least one direction in grid needs to be a fixed size",X.$bb.Error),this._fixedRowCount=1,this._fixedColumnCount=1):this._fixedRowCount<1&&this._fixedColumnCount>=1?(this._fillPriority=ut.Horizontal,this._reverseFillRow=!1):this._fixedRowCount>=1&&this._fixedColumnCount<1&&(this._fillPriority=ut.Vertical,this._reverseFillColumn=!1)}destroy(){this.onUpdated.dispose(),super.destroy()}setFixedColumnCount(q){this._fixedColumnCount=q,this.updateAll()}setFixedRowCount(q){this._fixedRowCount=q,this.updateAll()}setXOffset(q){this._xPositionOffset=q,this.updateAll()}setYOffset(q){this._yPositionOffset=q,this.updateAll()}waveFunction(q){const K=this.getColumn(q);let z=this.amplitude*Math.sin(2*Math.PI*this.frequency*(K/this.timeFraction)+this.phase);return z=X.cj9.snapTo(z,this.roundStep),z}getLayoutPositionX(q){const K=this.getColumn(q+this._indexOffset),z=this.getTotalCellCount(),Y=this.getGameObjectList().length;if(this.fillPriority===ut.Vertical||1===this.getColumnCount()||this._dynamicColumnWidth||Y===z||q+this._indexOffset=1&&(K=this._fixedRowCount-1-K),K}getColumn(q){let K;return K=this._fillPriority===ut.Horizontal?q%this._fixedColumnCount:Math.floor(q/this._fixedRowCount),this._reverseFillColumn&&this._fixedColumnCount>=1&&(K=this._fixedColumnCount-1-K),K}getRowCount(){const q=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===ut.Horizontal?Math.ceil(q/this._fixedColumnCount):Math.min(q,this._fixedRowCount)}getColumnCount(){const q=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===ut.Horizontal?Math.min(q,this._fixedColumnCount):Math.ceil(q/this._fixedRowCount)}getTotalCellCount(){if(this._fixedRowCount>0&&this._fixedColumnCount>0)return this._fixedRowCount*this._fixedColumnCount}isFilled(){return this._fixedRowCount>=1&&this._fixedColumnCount>=1&&this.getGameObjectList().length>=this._fixedRowCount*this._fixedColumnCount}isEmpty(){return this.getGameObjectList().length<=0}setRowSpacing(q){this._rowSpacing=q,this.updateAll()}setColumnSpacing(q){this._columnSpacing=q,this.updateAll()}updateAll(q=!0){const K=this.updateCachedDimensions();super.updateAll(q),this.onUpdated.dispatch(K)}updateCachedDimensions(){this._yCache.length=0,this._yCacheI=0;const q=Math.max(1,this.getRowCount()),K=Math.max(1,this.getColumnCount()),z=new Array(q).fill(0),Y=new Array(K).fill(0),Q=this.getGameObjectList();for(let tt=Q.length-1;tt>=0;--tt){const q=this.getRow(tt),K=this.getColumn(tt),Z=Q[tt],J=X.Htv.getWidth(Z),et=X.Htv.getHeight(Z);z[q]=Math.max(z[q],et),Y[K]=Math.max(Y[K],J)}this._cachedColumnX=new Array(K),this._cachedRowY=new Array(q);let Z=this._xPositionOffset,J=this._yPositionOffset;for(let X=0;XArray(Z).fill(1))),this._tileSize=z.getTileDimensions().width>>1;const et=z.getLayers().filter((q=>{var K,z;return!X.Aq$.isDefined(null===(K=q.properties)||void 0===K?void 0:K.isAbove)&&!X.Aq$.isDefined(null===(z=q.properties)||void 0===z?void 0:z.reference)}));for(const q of et){if(!Array.isArray(q.data))continue;const X=null!==(K=yt.get(q,"properties.toggle"))&&void 0!==K?K:yt.get(q,"properties.dynamicToggle",-1);let et=tt.get(X);et||tt.set(X,et=Array(J).fill(void 0).map((()=>Array(Z).fill(1)))),q.data.forEach(((q,K)=>{const X=this.getTileCollisionString(z,Y,q);if(X)for(let z=0;z<4;++z){const q=parseInt(X[z]);if(1===q||6===q){const Y=K%Q.width,X=Math.floor(K/Q.width);et[(X<<1)+(1&z)][(Y<<1)+(z>>1)]=1===q?0:q}}}))}return this._collisionDataByGroup=tt,this.buildFinalCollisionData(),this._finalCollisionData}))}setToggleGroupVisibility(q,K){K?this._disabledGroups.delete(q):this._disabledGroups.add(q),this._finalCollisionData&&this.buildFinalCollisionData()}loadMap(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=dt.q.instance.game;let z=K.cache.getJSON(q);if(z)return new X.i4g(z);const Y=dt.q.instance.prodigy;if(yield Y.load.assetsAsPromise(q),z=K.cache.getJSON(q),z)return new X.i4g(z);throw new Error(`Failed to load map data for "${q}"`)}))}getTileCollisionString(q,K,z){var Y,Q,Z;const J=q.getTilesetForTile(z);if(!J)return null;const tt=K.getTilesets().find((q=>q.name===J.name&&q.tileproperties));if(!tt)return null;const et=(z&~X.DXe.all)-(null!==(Y=J.firstgid)&&void 0!==Y?Y:0),it=null===(Z=null===(Q=tt.tileproperties)||void 0===Q?void 0:Q[et])||void 0===Z?void 0:Z.x;if(!it)return null;const st=0!=(z&X.DXe.flippedHorizontally),nt=0!=(z&X.DXe.flippedVertically);let at=it;if(0!=(z&X.DXe.flippedDiagonally)){if(at=this.transformCollisionString(it,[3,1,2,0]),st)return this.transformCollisionString(it,[2,3,0,1]);if(nt)return this.transformCollisionString(it,[1,0,3,2])}else{if(st)return this.transformCollisionString(it,[1,0,3,2]);if(nt)return this.transformCollisionString(it,[2,3,0,1])}return at}transformCollisionString(q,K){return K.map((K=>q[K])).join("")}buildFinalCollisionData(){(0,wt.v)(this._finalCollisionData,"Final collision data not initialized"),this._finalCollisionData.forEach((q=>q.fill(1)));for(const[q,K]of Array.from(this._collisionDataByGroup.entries()))if(!this._disabledGroups.has(q))for(let z=0;zae.t.getCategoryItems(q).map((q=>{var K,z;return{label:`${(q?re.J.getItemName(q):"Unknown")||"Unknown"} (${null!==(K=null==q?void 0:q.ID)&&void 0!==K?K:"?"})`,value:String(null!==(z=null==q?void 0:q.ID)&&void 0!==z?z:"")}})).filter((q=>!!q.value)).sort(((q,K)=>Number(q.value)-Number(K.value)))}!function(q){q[q.Button=0]="Button",q[q.Toggle=1]="Toggle",q[q.InputButton=2]="InputButton",q[q.Info=3]="Info",q[q.InfoWithCopyButton=4]="InfoWithCopyButton",q[q.DropdownInput=5]="DropdownInput"}(Xt||(Xt={})),function(q){q.MapInfo="Map Info",q.Battle="Battle",q.Economy="Economy",q.Menus="Menus",q.Game="Game",q.Warps="Warps",q.Misc="Misc",q.Inventory="Inventory",q.Pets="Pets",q.Campaign="Campaign",q.Feature="Feature",q.Key="Key",q.General="General",q.GrowthbookFeatures="GrowthbookFeatures",q.WizardDash="WizardDash",q.DailyLogin="DailyLogin",q.PrefabScenes="PrefabScenes",q.DarkTower="Dark Tower",q.Rifts="Rifts",q.Encounters="Encounters",q.WizardCostumes="WizardCostumes",q.HudAttention="HUD Attention",q.RegularZones="Regular Zones",q.HardZones="Hard Zones",q.ExpertZones="Expert Zones",q.BattleUnits="Battle Units"}(Zt||(Zt={})),function(q){q.DebugMenuGoToCategory="debugMenu.goToCategory",q.DebugMenuFilterGrowthbookFeatures="debugMenu.filterGrowthbookFeatures",q.ToggleDebugMenu="toggleDebugMenu",q.Answer="answer",q.Snow="snow",q.OpenOptionsMenu="openOptionsMenu",q.CloseMenus="closeMenus",q.GetGold="getGold",q.GetCurrency="getCurrency",q.GetEpic="getEpic",q.GetSpell="getSpell",q.EasyMode="easyMode",q.HardMode="hardMode",q.KillGore="killGore",q.PreventDefeatHomeTeam="battleRevamp.preventDefeat",q.PreventDefeatEnemyTeam="battleRevamp.preventDefeat",q.BattleUnitOverrideDodge="battleRevamp.overrideUnitDodgeChance",q.BattleUnitSetHealth="battleRevamp.setUnitHealth",q.BattleSetTeamHealth="battleRevamp.setTeamHealth",q.GrabBag="grabBag",q.MaintainAspectRatio="maintainAspectRatio",q.Player="player",q.ScaleEncounterDistance="scaleEncounterDistance",q.DisableBlockingEncounters="encounters.disableBlockingEncounters",q.ResetCooldowns="encounters.resetCooldowns",q.ResetAllUniqueEncounters="encounters.resetAllUniqueEncounters",q.ResetUniqueEncountersForMap="encounters.resetUniqueEncountersForMap",q.ResetUniqueEncountersForZone="encounters.resetUniqueEncountersForZone",q.SetEnemyAccuracy="setEnemyAccuracy",q.SetGameSpeed="setGameSpeed",q.SetLevel="setLevel",q.SetMorphDuration="setMorphDuration",q.SetMembership="setMembership",q.GetMembership="getMembership",q.OpenFirstNameSelector="openFirstNameSelector",q.OpenWizardNameSelector="openWizardNameSelector",q.OpenPlayer="openPlayer",q.OpenPlayerInToolbox="openPlayerInToolbox",q.ResetAccount="resetAccount",q.ShowFpsGraph="showFpsGraph",q.EnableSkynet="enableSkynet",q.DisableSkynet="disableSkynet",q.Tp="tp",q.WarpTour="warpTour",q.CancelWarpTour="cancelWarpTour",q.PrintMousePositionOnClick="printMousePositionOnClick",q.SetGameConstant="setGameConstant",q.SetFeatureFlag="setFeatureFlag",q.RenderPrefab="renderPrefab",q.WarpMode="enableWarpMode",q.JSError="jsError",q.GetPet="getPet",q.GetPets="getPets",q.SetTriggerAreaVisibility="setTriggerAreaVisibility",q.ShowAreaEvents="showAreaEvents",q.ShowCollisions="showCollisions",q.EnablePlayerCards="enablePlayerCards",q.SetRespawnTime="setRespawnTime",q.OpenStore="openStore",q.BattleRevampKillGore="battleRevamp.killGore",q.CompleteTutorial="completeTutorial",q.UnlockAcademy="unlockAcademy",q.GetAllKeystones="getAllKeystones",q.ResetAllKeystones="resetAllKeystones",q.SetEndgameQuestStep="setQuestStep",q.GetLastKeystone="getLastKeystone",q.ResetBreadcrumbFeature="resetBreadcrumbFeature",q.ResetPrizeWheelSpins="resetPrizeWheelSpins",q.ShowDialogueDebug="showDialogueDebug",q.ShowImage="showImage",q.SetUnlimitedWheelSpins="setUnlimitedWheelSpins",q.SetDebugSubject="setDebugSubject",q.EnableTimeOverride="enableTimeOverride",q.ReenterWorld="reenterWorld",q.GetItemType="getItemType",q.GetAllUnownedPetGear="getAllUnownedPetGear",q.ClearResolvedOffers="clearResolvedOffers",q.SetPetLevel="setPetLevel",q.SetAllPetLevels="setAllPetLevels",q.GetAllUnownedPets="getAllUnownedPets",q.GetSecureItem="getSecureItem",q.GetSecureItems="getSecureItems",q.GetPetGearItem="getPetGearItem",q.AddPetSlots="addPetSlots",q.RemoveAllSecureItemsByType="removeAllSecureItemsByType",q.RemoveAllPets="removeAllPets",q.StartQuickQuiz="quickQuiz.quickStart",q.EndQuickQuiz="quickQuiz.endLast",q.EndAllQuickQuizzesForPlayer="quickQuiz.endAllForThisPlayer",q.UsePrefabScenes="usePrefabScenes",q.SetDlcTaskCollectTo="dlc.setDLCTaskCollectImmediate",q.GetRiftsKeys="getRiftsKeys",q.GetRiftsStoreCurrency="getRiftsStoreCurrency",q.ToggleInputAreas="toggleInputAreaPreview",q.EditStatusEffects="battleRevamp.editStatusEffects",q.BurnMagicoin="burnMagicoin",q.GoToDarkTowerFloor="tpTowerFloor",q.StartBattle="startBattle",q.CopyBattleToClipboard="copyBattleToClipboard",q.OpenWindow="window.open",q.ClaimAllowance="claimAllowance",q.SetLocale="locale.set",q.SkipPostBattleVideos="skipPostBattleVideos",q.UseDebugSegmentLogger="useDebugSegmentLogger",q.EnableOutfitDebugMenu="enableOutfitDebugMenu",q.GrantCostumeItem="wizardCostumes.grantCostumeItem",q.GrantAllCostumeItems="wizardCostumes.grantAllCostumeItems",q.OpenWizardCostumesMenu="wizardCostumes.openWizardCostumesMenu",q.OpenWizardCostumesFtuePopup="wizardCostumes.openWizardCostumesFtuePopup",q.ResetViewedCostumes="wizardCostumes.resetViewedCostumes",q.ResetViewedCostumesTutorial="wizardCostumes.resetViewedTutorial",q.ResetWizardCostumesFtue="wizardCostumes.resetWizardCostumesFtue",q.RenderCostumeById="wizardCostumes.renderCostumeById",q.CreateEquippedGearItemCard="wizardCostumes.createEquippedGearItemCard",q.GetCurrentCostumePoolData="wizardCostumes.getCurrentCostumePoolData",q.ForceHighlightHudButton="hudAttention.forceHighlight",q.ResetHudButtonCooldown="hudAttention.resetCooldown",q.SetWasMemberLastSession="setWasMemberLastSession"}(Jt||(Jt={}));const he=[{type:Xt.Button,command:Jt.EnableTimeOverride,title:"Enable Time Override",description:"Opens the time override menu",closeMenu:!0},{type:Xt.InputButton,command:Jt.SetLocale,title:"Set Locale",description:`Sets the game locale (${Object.values(Ut.s).map((q=>`"${q}"`)).join(", ")}). Use "en-pseudo" for pseudo-translation.`,args:{args:["en-us"],inputIdx:0},closeMenu:!1},{type:Xt.Button,command:Jt.ReenterWorld,title:"Reload World",description:"Loads the initial scene again",closeMenu:!0},{type:Xt.Button,command:Jt.Answer,title:"Open QI",description:"Opens up an education content question.",closeMenu:!0},{type:Xt.Button,command:Jt.CloseMenus,title:"Close Menus",description:"Close all Menus"},{type:Xt.Button,command:Jt.OpenPlayerInToolbox,title:"Toolbox",description:"Opens player data in toolbox"},{type:Xt.Button,command:Jt.ResetAccount,title:"Reset Account",description:"Resets the account, wiping all game data",closeMenu:!0,buttonOptions:{text:"Reset",type:jt.vX.Ruby,icon:jt.XN.Close}}],ce=[{type:Xt.Button,command:Jt.ResetHudButtonCooldown,title:"Reset Shop Cooldown",description:"Resets the cooldown for Shop HUD button attention",args:{args:["Shop"]}},{type:Xt.Button,command:Jt.ResetHudButtonCooldown,title:"Reset Treasure Track Cooldown",description:"Resets the cooldown for Treasure Track HUD button attention",args:{args:["TreasureTrack"]}},{type:Xt.Button,command:Jt.ResetHudButtonCooldown,title:"Reset Festival Cooldown",description:"Resets the cooldown for Festival HUD button attention",args:{args:["Festival"]}},{type:Xt.Button,command:Jt.ResetHudButtonCooldown,title:"Reset StateChallenges Cooldown",description:"Resets the cooldown for StateChallenges HUD button attention",args:{args:["StateChallenges"]}},{type:Xt.Button,command:Jt.ResetHudButtonCooldown,title:"Reset AfterSchoolWidget Cooldown",description:"Resets the cooldown for AfterSchoolWidget HUD button attention",args:{args:["AfterSchoolWidget"]}},{type:Xt.Button,command:Jt.ForceHighlightHudButton,title:"Highlight Treasure Track",description:"Force highlights the Treasure Track HUD button",args:{args:["TreasureTrack"]}},{type:Xt.Button,command:Jt.ForceHighlightHudButton,title:"Highlight Festival Button",description:"Force highlights the Festival HUD button",args:{args:["Festival"]}},{type:Xt.Button,command:Jt.ForceHighlightHudButton,title:"Highlight StateChallenges Button",description:"Force highlights the StateChallenges HUD button",args:{args:["StateChallenges"]}},{type:Xt.Button,command:Jt.ForceHighlightHudButton,title:"Highlight AfterSchoolWidget Button",description:"Force highlights the AfterSchoolWidget HUD button",args:{args:["AfterSchoolWidget"]}}],de=[{category:Zt.WizardDash,data:[{type:Xt.InputButton,command:Jt.StartQuickQuiz,title:"StartQuickQuiz",description:"Starts a debug Quick Quiz with optional id prefix",args:{args:["id"],inputIdx:0},closeMenu:!0},{type:Xt.Button,command:Jt.EndQuickQuiz,title:"End QuickQuiz",description:"Ends the last debug Quick Quiz created this session",closeMenu:!0},{type:Xt.Button,command:Jt.EndAllQuickQuizzesForPlayer,title:"End All Quick Quizzes",description:"Ends all debug Quick Quizzes for this player",closeMenu:!0}]},{category:Zt.DailyLogin,data:[{type:Xt.Button,command:Jt.SetDlcTaskCollectTo,title:"DLC Reward",description:"Immediately sets the next DLC reward to ready to collect",closeMenu:!0}]},{category:Zt.PrefabScenes,data:[{type:Xt.Toggle,command:Jt.UsePrefabScenes,title:"Use Prefab Scenes",description:"Toggles whether to use prefab scenes",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>ne.D.isFeatureEnabled()}]},{category:Zt.DarkTower,data:[{type:Xt.Button,command:Jt.Tp,title:"Go to Lobby",description:"Teleports to the Dark Tower lobby",args:{args:["darktower-A1"]},closeMenu:!0},{type:Xt.InputButton,command:Jt.GoToDarkTowerFloor,title:"Go to Floor",description:"Teleports to a specified floor (1-100)",args:{args:[100],inputIdx:0,useArgsValueAsDefault:!0},closeMenu:!0}]},{category:Zt.Rifts,data:[{type:Xt.InputButton,command:Jt.GetRiftsKeys,title:"Add Portal 1 Keys",description:"Enter the amount of rifts keys for portal 1 to gain",args:{args:[te.ni.Portal1,3],inputIdx:1,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetRiftsKeys,title:"Add Portal 2 Keys",description:"Enter the amount of rifts keys for portal 2 to gain",args:{args:[te.ni.Portal2,3],inputIdx:1,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetRiftsKeys,title:"Add Portal 3 Keys",description:"Enter the amount of rifts keys for portal 3 to gain",args:{args:[te.ni.Portal3,3],inputIdx:1,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetRiftsStoreCurrency,title:"Add Portal 1 Currency",description:"Enter the amount of rifts store currency for portal 1 to gain",args:{args:[28,te.ni.Portal1,100],inputIdx:2,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetRiftsStoreCurrency,title:"Add Portal 2 Currency",description:"Enter the amount of rifts store currency for portal 2 to gain",args:{args:[29,te.ni.Portal2,100],inputIdx:2,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetRiftsStoreCurrency,title:"Add Portal 3 Currency",description:"Enter the amount of rifts store currency for portal 3 to gain",args:{args:[30,te.ni.Portal3,100],inputIdx:2,useArgsValueAsDefault:!0}}]},{category:Zt.WizardCostumes,data:[{type:Xt.Button,command:Jt.OpenWizardCostumesMenu,title:"Open Wizard Costumes Menu",description:"Open the Wizard Costumes menu",closeMenu:!0},{type:Xt.Button,command:Jt.OpenWizardCostumesFtuePopup,title:"Open FTUE Popup",description:"Open the Wizard Costumes FTUE popup",closeMenu:!0},{type:Xt.InputButton,command:Jt.GrantCostumeItem,title:"Get Costume Item",description:"Grant a costume item by Id",args:{args:[1],inputIdx:0,useArgsValueAsDefault:!0}},{type:Xt.Button,command:Jt.GrantAllCostumeItems,title:"Get All Costumes",description:"Grants all costume items to the player"},{type:Xt.Button,command:Jt.RemoveAllSecureItemsByType,title:"Remove All Costumes",description:"Removes all costume inventory items from the player",args:{args:["costume"]},buttonOptions:{type:jt.vX.Ruby,icon:jt.XN.Close,text:""}},{type:Xt.Button,command:Jt.ResetViewedCostumes,title:"Reset Viewed Costumes",description:"Reset the viewed costumes list so all costumes appear as new"},{type:Xt.Button,command:Jt.ResetViewedCostumesTutorial,title:"Reset Video Viewed",description:"Reset the costumes video so it will auto-play when the menu is opened"},{type:Xt.Button,command:Jt.ResetWizardCostumesFtue,title:"Reset Costumes FTUE",description:"Reset the wizard costumes FTUE so it will trigger again"},{type:Xt.InputButton,command:Jt.RenderCostumeById,title:"Render Costume by Id",description:"Renders a costume on the item card by Id",args:{args:[1],inputIdx:0,useArgsValueAsDefault:!0}},{type:Xt.Button,command:Jt.CreateEquippedGearItemCard,title:"Create Equipped Gear Item Card",description:"Creates an equipped gear item card"},{type:Xt.Button,command:Jt.GetCurrentCostumePoolData,title:"Get Costume Pool Data",description:"Logs the current active costume pool data to the console"}]},{category:Zt.HudAttention,data:ce}],le=[{type:Xt.Button,command:Jt.UseDebugSegmentLogger,title:"Segment Logger",description:"Logs segment events to the console"},{type:Xt.Button,command:Jt.ShowFpsGraph,title:"Toggle FPS Graph",description:""},{type:Xt.Button,command:Jt.PrintMousePositionOnClick,title:"Log Mouse Position",description:"Prints mouse position on click"},{type:Xt.Button,command:Jt.MaintainAspectRatio,title:"Aspect Ratio",description:"Sets the game window to 16:9"},{type:Xt.InputButton,command:Jt.SetGameSpeed,title:"Game Speed",description:"Enter the game speed.",args:{args:[1],inputIdx:0,useArgsValueAsDefault:!0}},{type:Xt.Button,command:Jt.EnableSkynet,title:"Enable Skynet",args:{args:[.5,50]},description:"Begins spawning fake players into the scene until there are 50 fake players"},{type:Xt.Button,command:Jt.DisableSkynet,title:"Disable Skynet",description:"Stops spawning fake players into the scene, and clear any fake players"},{type:Xt.Toggle,command:Jt.ShowCollisions,title:"Show Collisions",description:"Toggles the visibility of collision boxes. Warning: If you try to open a menu with this active there will be issues.",args:{selectedArgs:[!0],unselectedArgs:[!1]},closeMenu:!0,disableMenuToggle:!0},{type:Xt.Toggle,command:Jt.ToggleInputAreas,title:"Toggle Input Preview",description:"Toggles the preview of the instantiated input areas",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:Xt.Toggle,command:Jt.EnablePlayerCards,title:"Toggle hiding player cards",description:"Toggle hiding the player cards",args:{selectedArgs:[!1],unselectedArgs:[!0]}},{type:Xt.InputButton,command:Jt.SetRespawnTime,title:"Respawn Time",description:"Sets the respawn time for monsters in seconds.",args:{args:[120],inputIdx:0,useArgsValueAsDefault:!0}},{type:Xt.Toggle,command:Jt.ShowAreaEvents,title:"Show Area Events",description:"Toggles the visibility of area events",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:Xt.Toggle,command:Jt.SetGameConstant,title:"Inactivity Timer",description:"Toggles between 10s and the default (25 mins)",args:{selectedArgs:["GameConstants.Inactivity.DIALOG_TIMER_SECONDS",10],unselectedArgs:["GameConstants.Inactivity.DIALOG_TIMER_SECONDS",1500]}},{type:Xt.Toggle,command:Jt.SetTriggerAreaVisibility,title:"Show Trigger Areas",description:"Toggles the visibility of trigger areas",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>se.s.get("GameConstants.Build.DRAW_TRIGGERS")}],ue=[{type:Xt.InputButton,command:Jt.StartBattle,title:"Start Battle",description:"Enter as 1 or 1,2,3. PetIds-first box, then levels then merge rank.",args:{args:[[1,2,3],[0,0,0],[0,0,0]],inputIdx:[0,1,2],useArgsValueAsDefault:!0},closeMenu:!0}],fe=[{type:Xt.Button,command:Jt.CopyBattleToClipboard,title:"Copy Battle Command",description:"Copies startBattle debug command to clipboard for the current battle",buttonOptions:{text:"Copy",type:jt.vX.Sapphire,icon:jt.XN.Info}},{type:Xt.Button,command:Jt.EditStatusEffects,title:"Edit Status Effects",description:"Opens the debug menu to add and remove status effects",closeMenu:!0,buttonOptions:{text:"Open",type:jt.vX.Sapphire},feature:ee.P},{type:Xt.InputButton,command:Jt.BattleSetTeamHealth,title:"Set Home Health",description:"Sets the health of all home team units to the entered value",args:{args:["home",100],inputIdx:1,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.BattleSetTeamHealth,title:"Set Enemy Health",description:"Sets the health of all enemy team units to the entered value",args:{args:["enemy",100],inputIdx:1,useArgsValueAsDefault:!0}}],be=[{type:Xt.InputButton,command:Jt.Tp,title:"Warp",description:"Warp to the entered location",args:{args:[Yt.A_.HOUSE],inputIdx:0,useArgsValueAsDefault:!0},closeMenu:!0},{type:Xt.InputButton,command:Jt.WarpTour,title:"Warp Tour",description:"Warp to all maps! Enter the delay between warps, and the zone to warp to (leave blank for all zones)",args:{args:[2,"all zones"],inputIdx:[0,1],useArgsValueAsDefault:!0},closeMenu:!0},{type:Xt.Button,command:Jt.CancelWarpTour,title:"Cancel Warp Tour",description:"Cancel an ongoing warp tour",closeMenu:!0},{type:Xt.Toggle,command:Jt.WarpMode,title:"Warp Mode",description:"Toggles between walking and warping in the map",args:{selectedArgs:[!0],unselectedArgs:[!1]}}],pe=[{type:Xt.InputButton,command:Jt.GetGold,title:"Gold",description:"Enter the amount to gain",args:{args:[1e3],inputIdx:0,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetSecureItem,title:"Magicoin",description:"Enter the amount to gain",args:{args:["currency",27,1e3],inputIdx:2,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.BurnMagicoin,title:"Burn Magicoin",description:"Enter the amount to lose",args:{args:[1e3],inputIdx:0,useArgsValueAsDefault:!0}},{type:Xt.Button,command:Jt.ClearResolvedOffers,title:"Clear Resolved Offers",description:"Clears seen segmented upsell offers so they can appear again"},{type:Xt.InputButton,command:Jt.GetCurrency,title:"Hot-Hots",description:"Enter the amount to gain",args:{args:[12,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetCurrency,title:"Florans",description:"Enter the amount to gain",args:{args:[13,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetCurrency,title:"Yars",description:"Enter the amount to gain",args:{args:[14,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetCurrency,title:"Shivers",description:"Enter the amount to gain",args:{args:[15,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetCurrency,title:"Aeros",description:"Enter the amount to gain",args:{args:[16,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:Xt.Button,command:Jt.ResetPrizeWheelSpins,title:"Reset Wheel Spins",description:"Resets the prize wheel so you can spin again"},{type:Xt.Toggle,command:Jt.SetUnlimitedWheelSpins,title:"Unlimited Wheel Spins",description:"Allows for unlimited wheel spins",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:Xt.InputButton,command:Jt.ClaimAllowance,title:"Claim Monthly Allowance",description:"Valid options: ultra, plus, core, non_member",args:{args:["ultra"],inputIdx:0,useArgsValueAsDefault:!0},feature:ie.d}],ve=[{type:Xt.Toggle,command:Jt.ScaleEncounterDistance,title:"Disable Regular Encounters",description:"Toggles whether regular encounters can trigger",args:{selectedArgs:[0],unselectedArgs:[1]},initialValue:()=>0===se.s.get("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE")},{type:Xt.Toggle,command:Jt.DisableBlockingEncounters,title:"Disable Blocking Encounters",description:"Toggles whether cloaked wizards block map exits",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>se.s.get("GameConstants.Debug.DISABLE_BLOCKING_ENCOUNTERS")},{type:Xt.Toggle,command:Jt.SetTriggerAreaVisibility,title:"Show Trigger Areas",description:"Toggles the visibility of trigger areas",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>se.s.get("GameConstants.Build.DRAW_TRIGGERS")},{type:Xt.Button,command:Jt.ResetCooldowns,title:"Reset Cooldowns",description:"Resets all active encounter cooldowns",closeMenu:!0},{type:Xt.Button,command:Jt.ResetAllUniqueEncounters,title:"Reset All Unique Encounters",description:"Reset defeated unique encounters. Cause all unique encounters in the game to respawn.",closeMenu:!0},{type:Xt.Button,command:Jt.ResetUniqueEncountersForZone,title:"Reset Uniques for this Zone",description:"Reset defeated unique encounters in this zone only.",closeMenu:!0},{type:Xt.Button,command:Jt.ResetUniqueEncountersForMap,title:"Reset Uniques for this Map",description:"Reset defeated unique encounters on this map only.",closeMenu:!0}],ge=[{category:Zt.Encounters,data:ve},{type:Xt.Toggle,command:Jt.EasyMode,title:"Easy Mode",description:"Turns easy mode on, all answers are correct",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>{var q;return!1===(null===(q=se.s.get("GameConstants.Debug.EDUCATION_ENABLED"))||void 0===q||q)}},{type:Xt.Toggle,command:Jt.HardMode,title:"Hard Mode",description:"Turns hard mode on, all answers are incorrect",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>0===se.s.get("GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT")},{type:Xt.Toggle,command:Jt.KillGore,title:"Kill Gore",description:"Spells deal max damage",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>{var q;return!0===(null!==(q=se.s.get("GameConstants.Build.KILL_GORE"))&&void 0!==q&&q)}},{type:Xt.Toggle,command:Jt.PreventDefeatEnemyTeam,title:"Prevent Defeat (Away)",description:"Prevent enemy team units from being defeated",args:{selectedArgs:[!0,1],unselectedArgs:[!1,1]}},{type:Xt.Toggle,command:Jt.PreventDefeatHomeTeam,title:"Prevent Defeat (Home)",description:"Prevent home team units from being defeated",args:{selectedArgs:[!0,0],unselectedArgs:[!1,0]}},{type:Xt.Toggle,command:Jt.SetEnemyAccuracy,title:"Toggle Enemy Accuracy",description:"Toggles 100% enemy accuracy",args:{selectedArgs:[!0,1],unselectedArgs:[!1,0]},initialValue:()=>1===se.s.get("GameConstants.Battle.ENEMY_ACCURACY_OVERRIDE")},{type:Xt.Toggle,command:Jt.SkipPostBattleVideos,title:"Skip Post Battle Videos",description:"Skips videos in post-battle flow",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>{var q;return!0===(null!==(q=se.s.get("GameConstants.Battle.SKIP_POST_BATTLE_VIDEOS"))&&void 0!==q&&q)}}],me=[{type:Xt.Button,command:Jt.SetMembership,title:"Enable Membership",description:"Grants membership for this session"},{type:Xt.Button,command:Jt.EnableOutfitDebugMenu,title:"Outfit Debug Menu",description:"Change screens to create the menu"},{type:Xt.Button,command:Jt.GrabBag,title:"Grab Bag",description:"Give the player a random assortment of all items & equipment"},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Item",description:"Pick by name, or type an item id",args:{args:["item",0],inputIdx:1},options:oe("item")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Buddy",description:"Pick by name, or type a buddy id",args:{args:["follow",0],inputIdx:1},options:oe("follow")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Mount",description:"Pick by name, or type a mount id",args:{args:["mount",0],inputIdx:1},options:oe("mount")},{type:Xt.DropdownInput,command:Jt.GetSpell,title:"Get Spell",description:"Pick by name, or type a spell id (0 to 52 are safe)",args:{args:[0],inputIdx:0},options:oe("spell")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Wand",description:"Pick by name, or type a wand id",args:{args:["weapon",0],inputIdx:1},options:oe("weapon")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Hat",description:"Pick by name, or type a hat id",args:{args:["hat",0],inputIdx:1},options:oe("hat")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Outfit",description:"Pick by name, or type an outfit id",args:{args:["outfit",0],inputIdx:1},options:oe("outfit")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Boots",description:"Pick by name, or type a boots id",args:{args:["boots",0],inputIdx:1},options:oe("boots")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Fossil",description:"Pick by name, or type a fossil id",args:{args:["fossil",0],inputIdx:1},options:oe("fossil")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Key Item",description:"Pick by name, or type a key item id",args:{args:["key",0],inputIdx:1},options:oe("key")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Relic",description:"Pick by name, or type a relic id",args:{args:["spellRelic",0],inputIdx:1},options:oe("spellRelic")},{type:Xt.DropdownInput,command:Jt.GetItemType,title:"Get Dorm Item",description:"Pick by name, or type a dorm item id",args:{args:["dorm",0],inputIdx:1},options:oe("dorm")},{type:Xt.InputButton,command:Jt.SetMorphDuration,title:"Set Morph Duration",description:"Set the duration of the morph marbles in minutes",args:{args:[5],inputIdx:0,useArgsValueAsDefault:!0}}],ye=[{type:Xt.DropdownInput,command:Jt.GetPets,title:"Get Pets",description:"Pick a pet by name, or type a comma-separated list of pet ids (ex: 100, 13, 290). Leave blank to get a random pet.",args:{args:[""],inputIdx:0},options:oe("pet")},{type:Xt.InputButton,command:Jt.SetAllPetLevels,title:"Set Pet Level",description:"Set the level of all pets in your kennel to the entered value",args:{args:[50],inputIdx:0,useArgsValueAsDefault:!0}},{type:Xt.InputButton,command:Jt.GetAllUnownedPets,title:"Get All Unowned Pets",description:"Gets all pets you don't currently have",args:{args:[99]},closeMenu:!0},{type:Xt.DropdownInput,command:Jt.RemoveAllPets,title:"Remove Pets",description:"Pick a pet by name, or type a comma-separated list of pet ids (ex: 100, 13, 290). Leave blank to remove all pets.",args:{args:[""],inputIdx:0,useArgsValueAsDefault:!0},options:oe("pet")},{type:Xt.InputButton,command:Jt.GetPetGearItem,title:"Get Pet Hat",description:"Grant a specific pet hat by id",args:{args:["petHat",0],inputIdx:1}},{type:Xt.InputButton,command:Jt.GetPetGearItem,title:"Get Pet Relic",description:"Grant a specific pet relic by id",args:{args:["petRelic",0],inputIdx:1}},{type:Xt.InputButton,command:Jt.GetAllUnownedPetGear,title:"Get Pet Gear",description:"Gets all pet gear you don't currently have. Restart may be required to view items"}],_e=[{type:Xt.Button,command:Jt.SetMembership,title:"Enable Membership",description:"Grants membership for this session"},{type:Xt.Toggle,command:Jt.SetWasMemberLastSession,title:"Set WasMemberLastSession",description:"Sets the wasMemberLastSession flag in player data",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:Xt.InputButton,command:Jt.SetLevel,title:"Set Player Level",description:"Set the player level, level will be 1 higher than the number input (ie; 99 will become level 100)",args:{args:[50],inputIdx:0,useArgsValueAsDefault:!0}},{type:Xt.Button,command:Jt.CompleteTutorial,title:"Complete Tutorial",description:"Completes the tutorial"},{type:Xt.Button,command:Jt.UnlockAcademy,title:"Unlock Academy",description:"Sets the player to level 15 and skips the entering the academy cutscene."},{type:Xt.Button,command:Jt.ResetAllKeystones,title:"Reset All Keystones",description:"Resets all keystones"},{type:Xt.Button,command:Jt.GetAllKeystones,title:"Get All Keystones",description:"Gives the player all keystones"},{type:Xt.Button,command:Jt.GetLastKeystone,title:"Get Last Keystone",description:"Gives the player the last keystone, might affect the Pippet cutscene"},{type:Xt.InputButton,command:Jt.ShowDialogueDebug,title:"Show Dialogue",description:"Open the dialogue for a given ID",args:{args:[100],inputIdx:0},closeMenu:!0},{type:Xt.InputButton,command:Jt.SetEndgameQuestStep,title:"Endgame Quest Step",description:"Not Started: 0, Keystone Cutscene: 1, Pippet Defeated: 2, Guardians Defeated: 3-7",args:{args:[0],inputIdx:0}},{type:Xt.Button,command:Jt.SetEndgameQuestStep,title:"Defeat Puppet Master",description:"Set the endgame quest step to 8, Puppet Master Defeated",args:{args:[8]}},{type:Xt.Button,command:Jt.ResetBreadcrumbFeature,title:"Reset Endgame",description:"Resets the endgame Puppet Master quests",args:{args:["FEATURE_ENDGAME_QUEST"]}}],Ee="UNIT_ID_PLACEHOLDER",we=[{type:Xt.InfoWithCopyButton,title:"Copy unit id",description:Ee,command:void 0},{type:Xt.Toggle,command:Jt.BattleUnitOverrideDodge,title:"Set dodge chance",description:"True=100% dodge, False=0% dodge",args:{selectedArgs:[Ee,!0],unselectedArgs:[Ee,!1]}},{type:Xt.InputButton,command:Jt.BattleUnitSetHealth,title:"Set Health",description:"Set the unit's health to the entered value",args:{args:[Ee,100],inputIdx:1,useArgsValueAsDefault:!0}}];var Te=z(97495),Se=z(77601);class Ae{static setOverrideValue(q,K,z){Ae.unitOverrides[q]||(Ae.unitOverrides[q]={}),Ae.unitOverrides[q][K]=z}static getOverrideValue(q,K){var z;return null===(z=Ae.unitOverrides[q])||void 0===z?void 0:z[K]}}Ae.unitOverrides={};const Ce=[Yt.A_.HOUSE,Yt.A_.EARTHTOWER,Yt.A_.ICETOWER,Yt.A_.STORMTOWER,Yt.A_.FIRETOWER,Yt.A_.WATERTOWER,Yt.A_.ASTRALTOWER,Yt.A_.CRYSTALCAVERNS];class Oe{getRootCategories(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=[{category:Zt.General,data:this.getGeneralCommands()},{category:Zt.Feature,data:this.getFeatureCommands()},{category:Zt.Economy,data:pe},{category:Zt.Game,data:le},{category:Zt.Battle,data:this.getBattleCommands()},{category:Zt.Inventory,data:me},{category:Zt.Pets,data:ye},{category:Zt.Campaign,data:_e},{category:Zt.Warps,data:this.getWarpCommands()},{category:Zt.MapInfo,data:yield this.getMapInfo()}];return this.checkForDisabledCommands(q),this.filterEmptyCategories(q)}))}static getGrowthbookFeatures(){var q;window.debugMenu.filterGrowthbookFeatures=q=>{window.debugMenu.growthbookFilter=q,De.reloadViewWithNewData(Oe.getGrowthbookFeatures())};const K={type:Xt.InputButton,command:Jt.DebugMenuFilterGrowthbookFeatures,title:"Filter features",description:"Type to filter features by name",args:{args:[""],inputIdx:0},buttonOptions:{text:"Search",icon:jt.XN.Info,type:jt.vX.Sapphire}},z=null!==(q=window.debugMenu.growthbookFilter)&&void 0!==q?q:"";return[K,...(0,Se.y8)().filter((q=>q.toLowerCase().includes(z.toLowerCase()))).map((q=>({type:Xt.Button,command:Jt.OpenWindow,args:{args:[`https://growthbook.prv.prodigygame.com/features/${q}`]},title:q,description:"Click to open Growthbook page",buttonOptions:{text:"",icon:jt.XN.Right,type:jt.vX.Sapphire},feature:{key:q}})))]}checkForDisabledCommands(q){q.forEach((q=>{"type"in q&&q.feature&&!(0,Kt._)(q.feature)&&(q.type=Xt.Button,q.description=`Feature disabled: (${q.feature.key}). Click to open GrowthBook.`,q.buttonOptions={text:"",icon:jt.XN.Right,type:jt.vX.Sapphire},q.command=Jt.OpenWindow,q.args={args:[`https://growthbook.prv.prodigygame.com/features/${q.feature.key}`]}),"category"in q&&Array.isArray(q.data)&&this.checkForDisabledCommands(q.data)}))}filterEmptyCategories(q){return q.filter((q=>"type"in q||!(!("category"in q)||!Array.isArray(q.data))&&(q.data=this.filterEmptyCategories(q.data),q.data.length>0)))}getGeneralCommands(){return[...he]}getFeatureCommands(){return[{category:Zt.GrowthbookFeatures,data:Oe.getGrowthbookFeatures()},...de]}getWarpCommands(){var q;const K=be,z=[],Y=null===(q=dt.q.instance)||void 0===q?void 0:q.prodigy.world;return Y&&z.push({category:Zt.RegularZones,data:this.getZonesCategoryData(Y,(q=>q.difficultyMode===Te.i.Regular))},{category:Zt.HardZones,data:this.getZonesCategoryData(Y,(q=>q.difficultyMode===Te.i.Hard))},{category:Zt.ExpertZones,data:this.getZonesCategoryData(Y,(q=>q.difficultyMode===Te.i.Expert))}),[...z,...K]}getBattleCommands(){const q=ge;let K;const z=X.wa5.getActiveScene().container.get("BattleController");return K=z?[...fe,this.getBattleUnitCommands(z)]:ue,[...K,...q]}getBattleUnitCommands(q){const K=q.getUnits().map((q=>{const K=Vt.$.capitalizeFirstLetter(q.data.teamId),z=q.data.unitId,Y=q.name,Q=`${K} - ${q.data.slot}`,X=[];return we.forEach((q=>{const K=JSON.parse(Vt.$.replaceAll(JSON.stringify(q),Ee,z)),Y=q.command;Y&&(K.initialValue=()=>Ae.getOverrideValue(z,Y)),X.push(K)})),{category:Q,data:X,description:`Debug commands for "${Y}"`}}));return{category:Zt.BattleUnits,data:K,description:"Commands for individual battle units"}}getMapInfo(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,Z,J,tt,et;const it=[];return it.push({type:Xt.InfoWithCopyButton,command:void 0,title:"Current Map",description:dt.q.instance.prodigy.world.getCurrentMap()},{type:Xt.Info,command:void 0,title:"Multiplayer room",description:null!==(K=null===(q=X.wa5.getActiveScene().container.get("316-5db0"))||void 0===q?void 0:q.multiplayerRoomID)&&void 0!==K?K:"none"},{type:Xt.InfoWithCopyButton,command:void 0,title:"Character ID",description:null!==(Q=null===(Y=null===(z=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2"))||void 0===z?void 0:z.player)||void 0===Y?void 0:Y.getID().toString())&&void 0!==Q?Q:"No ID found"},{type:Xt.Info,command:null,title:"Scene Type",description:(null===(Z=X.wa5.getActiveScene())||void 0===Z?void 0:Z.container.get("IS_PREFAB_MAP"))?"Prefab":"Legacy"},{type:Xt.Info,command:null,title:"Current Quest",description:null!==(et=yield null===(tt=null===(J=X.wa5.getActiveScene())||void 0===J?void 0:J.container.get("331-a8ba"))||void 0===tt?void 0:tt.getCurrentQuestIDAndSequence())&&void 0!==et?et:"None Found"}),it}))}getZonesCategoryData(q,K=(()=>!0)){return Object.values(q.zones).filter((q=>!Ce.includes(q.ID))).filter(K).map((K=>({category:`${K.name} ${K.difficultyMode!==Te.i.Regular?K.difficultyMode:""}`,data:this.getMapCommandsData(K,q)})))}getMapCommandsData(q,K){var z,Y;const Q=q.ID;return Q===Yt.A_.DARKTOWER?null!==(Y=null===(z=de.find((q=>q.category===Zt.DarkTower)))||void 0===z?void 0:z.data)&&void 0!==Y?Y:[]:Object.entries(q.maps).map((([q,z])=>{let Y=`Go to map ${z.zoneName}`,X=q;return z.zoneName===K.getCurrentMap()&&(X+=" (current)",Y="Refresh current map"),{type:Xt.Button,command:Jt.Tp,title:X,description:Y,args:{args:[`${Q}-${q}`]},closeMenu:!0}}))}}var Ie;let De=Ie=class extends X.uAl{constructor(){super(...arguments),this._debugMenuDataProvider=new Oe,this._categoryTabComponents=[],this._categoryBreadcrumbs=[]}postCreate(){super.postCreate(),window.debugMenu.goToCategory=(q,K)=>{this.openCategory(q,K)},window.debugMenu.reloadView=q=>{this._scrollViewParent.findComponent(Ne).clearCommands(),this.loadCategory(Ie.LastOpenedCategory,q).catch(X.RQr.createHandler("Error trying to open a prefab in DebugMenu"))},this.openInitialCategory()}static reloadViewWithNewData(q){window.debugMenu.reloadView(q)}createCategoryTabs(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=Gt.l.DebugMenuCategoryTab;for(let q=this._categoryTabParent.children.length-1;q>=0;q--)this._categoryTabParent.children[q].destroy();this._categoryTabComponents.length=0;for(let z=0;zq.category===Ie.LastOpenedCategory));-1===K&&(K=0);X.wa5.getActiveScene().container.get("BattleController")&&(K=q.findIndex((q=>q.category===Zt.Battle))),this.openCategory(q[K].category,q[K].data)}))}openCategory(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){this.resetCategoryTabs();const z=this._categoryBreadcrumbs.length,Y=this._categoryBreadcrumbs.findIndex((K=>K.category===q));Y>=0&&this._categoryBreadcrumbs.splice(Y);const Q=yield this._debugMenuDataProvider.getRootCategories();if(Q.some((K=>K.category===q))&&(this._categoryBreadcrumbs.length=0),this._categoryBreadcrumbs.push({category:q,data:K}),z!==this._categoryBreadcrumbs.length&&this.createCategoryTabs(this._categoryBreadcrumbs.length>1?this._categoryBreadcrumbs:Q).then((()=>{var K;return null===(K=this._categoryTabComponents.find((K=>K.category===q)))||void 0===K?void 0:K.setSelected(!0)})).catch(X.RQr.createHandler("Error trying to create the category tabs")),!X.Aq$.isDefined(this._currentCategoryObj)||this._currentCategory!==q){if(this._currentCategoryObj){this._currentCategoryObj.findComponent(Ne).clearCommands()}this.loadCategory(q,K).catch(X.RQr.createHandler("Error trying to open a prefab in DebugMenu"))}}))}resetCategoryTabs(){for(const q of this._categoryTabComponents)q.setSelected(!1)}loadCategory(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=this._scrollViewParent,Y=z.findComponent(Ne);yield Y.populateCategory(q,K),z.transform.setPosition(0,0),this._currentCategory=q,Ie.LastOpenedCategory=q,this._currentCategoryObj=z}))}closeDebugMenu(){Ie.runCloseDebugMenu()}static runCloseDebugMenu(){}};var Re;(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],De.prototype,"_scrollViewParent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],De.prototype,"_categoryTabParent",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],De.prototype,"_prefabLoader",void 0),De=Ie=(0,Q.Cg)([(0,X.EVk)("DebugMenuController",et.Y.debug)],De);let Pe=Re=class extends X.uAl{constructor(){super(...arguments),this._inputParams=[],this._defaultValue=[]}get getInputParams(){return this._inputParams}destroy(){this.destroyDatalist(),this.destroyInputField(),super.destroy()}destroyDatalist(){this._datalistInputParam&&this._datalistInputListener&&(this._datalistInputParam.htmlInputElement.removeEventListener("input",this._datalistInputListener),this._datalistInputParam.htmlInputElement.removeAttribute("list")),this._datalist&&this._datalist.remove(),this._datalist=null,this._datalistInputListener=null,this._datalistInputParam=null}setParent(q){this._parent=q}setInfo(q){var K,z,Y;if(this._info=q,this._commandDisabledBackground.active=!1,q.type===Xt.Info||q.type===Xt.InfoWithCopyButton)return void this.setInfoOnlyDebugFields(q);Re.isButtonArgs(q.args)&&q.args.useArgsValueAsDefault&&(this._defaultValue=_t().cloneDeep(q.args.args)),this.setTitle(q.title),this.setDescription(q.description),this.updateButton(null===(K=q.buttonOptions)||void 0===K?void 0:K.text,null===(z=q.buttonOptions)||void 0===z?void 0:z.type,null===(Y=q.buttonOptions)||void 0===Y?void 0:Y.icon),X.Aq$.isDefined(q.initialValue)&&this.updateState("function"==typeof q.initialValue?q.initialValue():q.initialValue);const Q=this.getFunc(this._info.command);Q?this.setFunction(Q,this._info.args):this.setValid(!1),q.feature&&!(0,Kt._)(q.feature)&&(this._commandDisabledBackground.active=!0)}setInfoOnlyDebugFields(q){this.setTitle(q.title),this.setDescription(q.description),this._commandButton&&(q.type===Xt.InfoWithCopyButton?(this._commandButton.onClick.add((()=>{const K=q.description;navigator.clipboard.writeText(K).catch((q=>{X.VyI.log(`Failed to copy debug text: ${String(q)}`,X.$bb.Error)}))})),this.updateButton("Copy",jt.vX.Sapphire,jt.XN.Info)):this._commandButton.GameObject.active=!1),this._commandToggle&&(this._commandToggle.GameObject.active=!1),this._inputParams.forEach((q=>{q.GameObject.active=!1}))}getFunc(q){return null==q?void 0:q.split(".").reduce(((q,K)=>q&&q[K]),window)}setTitle(q){this._commandTitle.text=q}setDescription(q){this._commandDescription.text=q}updateButton(q,K,z){X.Aq$.isDefined(this._commandButton)&&(this._commandButton.text=null!=q?q:"Select",this._commandButton.iconPosition=zt.d.NONE,z&&(this._commandButton.iconPosition=zt.d.RIGHT,this._commandButton.icon=z),this._commandButton.type=null!=K?K:jt.vX.Emerald,this._commandButton.regenerateButton())}setFunction(q,K){this._commandButton?(this.setButton(q,K),this._functionValid=!0,0!==this._inputParams.length&&this.setUpInputField()):this._commandToggle&&(this.setToggle(q,K),this._functionValid=!0)}setButton(q,K){this._commandButton.onClick.add((()=>{K?q(...(null==K?void 0:K.args)||[]):q()}))}setToggle(q,K){this._info.title in Re.DebugState&&this._commandToggle.setSelected(Re.DebugState[this._info.title]),K?(this._commandToggle.onSelected.add(q,void 0,void 0,...K.selectedArgs),this._commandToggle.onUnselected.add(q,void 0,void 0,...K.unselectedArgs)):(this._commandToggle.onSelected.add(q),this._commandToggle.onUnselected.add(q))}setValid(q){this._functionValid=q}getNumberOfActiveInputs(){const q=this._info.args;if(!X.Aq$.isDefined(null==q?void 0:q.inputIdx))return 0;return Wt.l.guaranteeArray(q.inputIdx).length}setUpInputField(){const q=this.getNumberOfActiveInputs();this._inputParams.forEach(((K,z)=>{if(z>=q)return void(K.GameObject.active=!1);const Y=q-z-1,Q=this._info.title+Y;Q in Re.DebugState&&(K.text=Re.DebugState[Q]),K.GameObject.active=!0,K.enablePerKeyEvents(!0),K.onTextChanged.add(this.readInputField,this,void 0,K,Y),K.onClear.add(this.readInputField,this,void 0,K,Y),this.readInputField(K.text,K,Y),this._info.type===Xt.DropdownInput&&0===Y&&X.Aq$.isDefined(this._info.options)&&this.setUpDatalist(K,Y)}))}setUpDatalist(q,K){var z;const Y=this._info.options,Q="function"==typeof Y?Y():Y;if(!Q||0===Q.length)return;const X=document.createElement("datalist"),Z=this._info.title.replace(/[^a-z0-9]/gi,"-").toLowerCase();X.id=`debug-dropdown-${Z}-${K}`,Q.forEach((q=>{const K=document.createElement("option");K.value=q.value,K.textContent=q.label,X.appendChild(K)}));(null!==(z=document.getElementById("external-ui"))&&void 0!==z?z:document.body).appendChild(X);const J=q.htmlInputElement;J.setAttribute("list",X.id),this._datalistInputListener=()=>{this.readInputField(J.value,q,K)},J.addEventListener("input",this._datalistInputListener),this._datalist=X,this._datalistInputParam=q}readInputField(q,K,z){var Y;const Q=q,Z=this._info.args;let J;if(!X.Aq$.isDefined(Z.inputIdx)||"number"!=typeof Z.inputIdx&&!Array.isArray(Z.inputIdx))return;J="number"==typeof Z.inputIdx?Z.inputIdx:Z.inputIdx[z];const tt=Re.isInputFieldValueValid(this._info,Q,J);this._inputValid=this.isWarp()?this.isWarpValid(tt.output):tt.valid;const et=!this._inputValid&&""===Q&&(null===(Y=this._defaultValue)||void 0===Y?void 0:Y.length)>0;et&&(K.htmlInputElement.placeholder=this._defaultValue[J],this._inputValid=this.isWarp()?this.isWarpValid(this._defaultValue[J]):this._inputValid),this._commandButton.inputEnabled=this._inputValid||et,this._inputValid&&!et&&(this.updateState(tt.output,z),Z.args[J]=tt.output)}static isInputFieldValueValid(q,K,z){const Y=q.args;if("string"==typeof Y.args[z])return{valid:!0,output:K};if("number"==typeof Y.args[z]){const q=parseFloat(K);if(!isNaN(q))return{valid:!0,output:q}}else if(Array.isArray(Y.args[z])&&""!==K){const q=K.split(",");if("number"==typeof Y.args[z][0]){if(q.some((q=>""===q)))return{valid:!1,output:null};const K=q.map((q=>q.trim())).map(Number);return K.some(isNaN)?{valid:!1,output:null}:{valid:!0,output:K}}if("string"==typeof Y.args[z][0]){return{valid:!0,output:q.map((q=>q))}}}return{valid:!1,output:null}}isValid(){const q=this._info.type===Xt.InputButton||this._info.type===Xt.DropdownInput;return this._functionValid&&(!q||this._inputValid)}isWarp(){return this._parent&&this._parent.getCategory()===Zt.Warps&&this._info.command!==Jt.WarpTour}isWarpValid(q){return q===Yt.A_.HOUSE||dt.q.instance.prodigy.world.isValidLocation(q)}destroyInputField(){this._inputParams&&this._inputParams.forEach((q=>{q.destroy()}))}checkOptionalProps(){this._info.disableMenuToggle&&(De._allowKeystrokeToOpenDebugMenu=!1),this._info.closeMenu&&De.runCloseDebugMenu()}logPress(){this.isValid()?X.VyI.log(`PRESSED - Running command assigned to ${this._info.title}`,X.$bb.Info):this._functionValid?this._inputValid||X.VyI.log(`${this._info.title} has invalid inputs`,X.$bb.Error):X.VyI.log(`${this._info.title} has no function assigned`,X.$bb.Error),this.isValid()?this.checkOptionalProps():this._defaultValue.length>0&&(X.VyI.log(`${this._info.title} using default values`,X.$bb.Info),this.checkOptionalProps())}logSelected(){this.isValid()?(X.VyI.log(`SELECTED - Running command assigned to ${this._info.title}`,X.$bb.Info),this.updateState(!0)):X.VyI.log(`${this._info.title} has no function assigned`,X.$bb.Error),this.isValid()&&this.checkOptionalProps()}logUnselected(){this.isValid()?(X.VyI.log(`UNSELECTED - Running command assigned to ${this._info.title}`,X.$bb.Info),this.updateState(!1)):X.VyI.log(`${this._info.title} has no function assigned`,X.$bb.Error),this.isValid()&&this.checkOptionalProps()}updateState(q,K=-1){var z;this._commandButton&&(null===(z=this._info.args)||void 0===z?void 0:z.shouldNotPersistInput)||(Re.DebugState[this._info.title+(-1!==K?K:"")]=q)}static isButtonArgs(q){return"object"==typeof q&&null!==q&&Array.isArray(q.args)&&("number"==typeof q.inputIdx||Array.isArray(q.inputIdx))}};var Me;Pe.DebugState={},(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Pe.prototype,"_commandTitle",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Pe.prototype,"_commandDescription",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],Pe.prototype,"_commandButton",void 0),(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],Pe.prototype,"_commandToggle",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Pe.prototype,"_commandDisabledBackground",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(qt.S),(0,Q.Sn)("design:type",Array)],Pe.prototype,"_inputParams",void 0),Pe=Re=(0,Q.Cg)([(0,X.EVk)("DebugMenuCommand",et.Y.debug)],Pe);let Ne=Me=class extends X.uAl{constructor(){super(...arguments),this._commandComponents=[]}getCategory(){return this._category}populateCategory(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){this._category=q,this._commands=K,yield this.createCommandButtons(),this._scrollView.setScrollPosition(0)}))}clearCommands(){for(let q=this._buttonParent.children.length;q--;)this._buttonParent.children[q].destroy();this._commandComponents=[]}destroyInputFields(){for(let q=this._commandComponents.length;q--;)this._commandComponents[q].destroyInputField()}createCommandButtons(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=Gt.l.DebugMenuCommand,K=Gt.l.DebugMenuToggle,z=Gt.l.DebugMenuInputField;let Y=0;for(const X of this._commands){const Q=yield this.createCommandButton(X,q,K,z);this._commandComponents.push(Q),Q.GameObject.transform.setPosition(0,100*Y+50),Y++}const Q=this._buttonParent.findComponent(X.XVE);Q?Q.setSizeDelta(Q.sizeDelta.width,100*Y):X.VyI.log("RectTransform was not found on the debug category button parent!",X.$bb.Error)}))}createCommandButton(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){var Q;let X,Z=q;switch("category"in q&&(Z={type:Xt.Button,args:{args:[q.category,q.data]},title:Vt.$.toTitleCase(q.category),description:null!==(Q=q.description)&&void 0!==Q?Q:`Show ${Vt.$.toTitleCase(q.category)} commands`,command:Jt.DebugMenuGoToCategory,buttonOptions:{text:"Open",type:jt.vX.Sapphire}}),Z.type){default:case Xt.Button:X=K;break;case Xt.Toggle:X=z;break;case Xt.InputButton:case Xt.DropdownInput:X=Me.inputFieldValid(Z)?Y:K}const J=(yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,X,{},this._buttonParent)).findComponent(Pe);return J.setParent(this),J.setInfo(Z),J}))}static inputFieldValid(q){const K=q.args;if(X.Aq$.isDefined(null==K?void 0:K.inputIdx)){const q=Wt.l.guaranteeArray(K.inputIdx);if(q.length>0&&q.every((q=>Number.isInteger(q)&&q>=0&&q0&&this._tween.to({y:0},this._bottomDelayMS),this._tween.to({y:this._distance},.5*this._duration,Q),(null!==(K=this._topDelayMS)&&void 0!==K?K:0)>0&&this._tween.to({y:this._distance},this._topDelayMS),this._tween.to({y:0},.5*this._duration,Q),this._tween.loop(!0).start(),this._tween.onUpdate.add((()=>{this.GameObject.legacyTransform?this.GameObject.legacyTransform.y=this._initialY+z.y:Y.setPosition(Y.localPosition.x,this._initialY+z.y)})),this.IsActiveInHierarchy||this._tween.pause()}onEnable(){var q;null===(q=this._tween)||void 0===q||q.resume(),super.onEnable()}onDisable(){var q;null===(q=this._tween)||void 0===q||q.pause(),super.onDisable()}updatePosition(q){this._initialY=q.y,this.GameObject.legacyTransform?(this.GameObject.legacyTransform.x=q.x,this.GameObject.legacyTransform.y=q.y):this.GameObject.transform.setPosition(q.x,q.y)}destroy(){dt.q.instance.game.tweens.remove(this._tween),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ue.prototype,"_distance",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ue.prototype,"_duration",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ue.prototype,"_topDelayMS",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ue.prototype,"_bottomDelayMS",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ue.prototype,"_easingCategory",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ue.prototype,"_easingType",void 0),Ue=(0,Q.Cg)([(0,X.EVk)("BobTransform",et.Y.motion)],Ue);z(5885);let Fe=class extends X.uAl{loadItemRewards(){}getItem(){}removeItem(q,K){}};Fe=(0,Q.Cg)([(0,X.EVk)("BountyRunBossItemProvider")],Fe);let Ge=class extends X.uAl{restartDungeon(){this.completeRun(),this._dungeonState.startDungeonRun(),this._dungeonState.setCurrentMap(this._startingMap),dt.q.instance.prodigy.world.it(this._startingMap)}leaveDungeon(){this.completeRun(),dt.q.instance.prodigy.world.it(this._hubMap)}completeRun(){this._dungeonState.setCompletedRuns(this._dungeonState.getCompletedRuns()+1),this._dungeonState.resetRunData()}};(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],Ge.prototype,"_dungeonState",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ge.prototype,"_hubMap",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ge.prototype,"_startingMap",void 0),Ge=(0,Q.Cg)([(0,X.EVk)("CompleteDungeonUI",et.Y.adventureUi)],Ge);let je=class extends X.uAl{continueDungeonRun(){dt.q.instance.prodigy.world.it(this._dungeonState.getCurrentMap())}};(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],je.prototype,"_dungeonState",void 0),je=(0,Q.Cg)([(0,X.EVk)("ContinueDungeonRun",et.Y.adventure)],je);var $e=z(10044);let He=class extends X.uAl{constructor(){super(...arguments),this._onPlayerSpawned=new X.HN0}spawnPlayer(){var q;let K=0,z=0,Y=1;const Q=this._dungeonState.getCheckpointLocation();if(this._injectedSpawnPosition)K=this._injectedSpawnPosition.x,z=this._injectedSpawnPosition.y,Y=null!==(q=this._injectedSpawnDirection)&&void 0!==q?q:1;else if(Q)K=Q.x,z=Q.y,Y=this._dungeonState.getFacingDirection();else{const q=this.GameObject.transform,Q=q.worldPosition;K=Q.x,z=Q.y,Y=q.localScale.x}X.i7d.main.GameObject.transform.setPosition(K,z),this._player.transform.setPosition(K,z),this._player.transform.setScale(Y,1),this._player.findComponentInChildren(X.mZY)._loadedBounds={left:K,right:K,top:z,bottom:z},this._onPlayerSpawned.dispatch()}destroy(){this._onPlayerSpawned.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],He.prototype,"_player",void 0),(0,Q.Cg)([(0,X.Cdj)("InitData-spawnPosition"),(0,Q.Sn)("design:type",X.I9Y)],He.prototype,"_injectedSpawnPosition",void 0),(0,Q.Cg)([(0,X.Cdj)("InitData-spawnFacingDirection"),(0,Q.Sn)("design:type",Number)],He.prototype,"_injectedSpawnDirection",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],He.prototype,"_dungeonState",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],He.prototype,"_onPlayerSpawned",void 0),He=(0,Q.Cg)([(0,X.EVk)("DungeonPlayerSpawner")],He);let Ve=class extends X.uAl{getSpawnData(){return null}};Ve=(0,Q.Cg)([(0,X.EVk)("SpawnDataProvider (abstract)")],Ve);let We=class extends Ve{getSpawnData(){const q=this._dungeonState.getCheckpointLocation();return q?{location:new X.I9Y(q.x,q.y),facingDirection:this._dungeonState.getFacingDirection()}:null}};(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],We.prototype,"_dungeonState",void 0),We=(0,Q.Cg)([(0,X.EVk)("DungeonSpawnDataProvider",et.Y.mapSpawning)],We);let qe=class extends X.uAl{enter(){this._dungeonState.resetRunData(),this._dungeonState.startDungeonRun(),this._dungeonState.setCurrentMap(this._startingMap),dt.q.instance.prodigy.world.it(this._startingMap)}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],qe.prototype,"_startingMap",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],qe.prototype,"_dungeonState",void 0),qe=(0,Q.Cg)([(0,X.EVk)("EnterDungeon",et.Y.adventure)],qe);var Ke=z(31029);let ze=class extends Ke.u{};ze=(0,Q.Cg)([(0,X.EVk)("HealStone")],ze);var Ye=z(35084);let Qe=class extends X.uAl{constructor(){super(...arguments),this._inputPaddingOnHover=new X.I9Y(5,5),this._applied=!1}create(){super.create(),this._hoverInput&&(this._hoverInput.onHoverEnter.add(this.applyOffset,this),this._hoverInput.onHoverExit.add(this.removeOffset,this))}destroy(){this._hoverInput&&(this._hoverInput.onHoverEnter.remove(this.applyOffset,this),this._hoverInput.onHoverExit.remove(this.removeOffset,this)),super.destroy()}onDisable(){super.onDisable(),this.removeOffset()}applyOffset(){if(this._applied)return;this._hoverInput.setOffset(-this._offset.x-this._inputPaddingOnHover.x,-this._offset.y-this._inputPaddingOnHover.y,!1),this._hoverInput.setSize(this._hoverInput.width+2*this._inputPaddingOnHover.x,this._hoverInput.height+2*this._inputPaddingOnHover.y);const q=this.GameObject.transform.localPosition;this.GameObject.transform.setPosition(q.x+this._offset.x,q.y+this._offset.y),this._applied=!0}removeOffset(){if(!this._applied)return;this._hoverInput.setOffset(0,0,!1),this._hoverInput.setSize(this._hoverInput.width-2*this._inputPaddingOnHover.x,this._hoverInput.height-2*this._inputPaddingOnHover.x);const q=this.GameObject.transform.localPosition;this.GameObject.transform.setPosition(q.x-this._offset.x,q.y-this._offset.y),this._applied=!1}};(0,Q.Cg)([(0,X.MnK)(Ye.n),(0,Q.Sn)("design:type",Ye.n)],Qe.prototype,"_hoverInput",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],Qe.prototype,"_offset",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],Qe.prototype,"_inputPaddingOnHover",void 0),Qe=(0,Q.Cg)([(0,X.EVk)("HoverOffset",et.Y.ui)],Qe);var Xe,Ze=z(68910),Je=z(92150),ti=z(88022);let ei=Xe=class extends X.y4o{constructor(){super(...arguments),this.onStart=new X.HN0,this.onEnd=new X.HN0}create(){super.create(),this.setRootContainer(this._container=new Ze.Container)}destroy(){this.onStart.dispose(),this.onEnd.dispose(),this._container.destroy(),super.destroy()}start(){this._topBox?X.VyI.log("Attempted to start a cutscene when one is already active",X.$bb.Warning):(this.showLetterbox(),this.onStart.dispatch())}end(){this._topBox?(this.hideLetterbox(),this.onEnd.dispatch()):X.VyI.log("Attempted to end a cutscene when none is active",X.$bb.Warning)}showLetterbox(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;const z=dt.q.instance.game,Y=z.width,Q=z.height,Z=z.state.getCurrentState();null===(K=null===(q=Z.getParentalConsentBanner)||void 0===q?void 0:q.call(Z))||void 0===K||K.then((q=>{q&&(q.active=!1)})),this._topBox=new Je._(z,0,-Xe.BOX_HEIGHT,ti._.Tiled_sprites_json,"overlay-small"),this._topBox.width=Y,this._topBox.height=Xe.BOX_HEIGHT,this._container.addChild(this._topBox),this._bottomBox=new Je._(z,0,Q,ti._.Tiled_sprites_json,"overlay-small"),this._bottomBox.width=Y,this._bottomBox.height=Xe.BOX_HEIGHT,this._container.addChild(this._bottomBox);const J=z.add.tween(this._topBox,this).to({y:0},Xe.TWEEN_DURATION_MS,X.GS3.Quadratic.Out).start();return z.add.tween(this._bottomBox,this).to({y:Q-Xe.BOX_HEIGHT},Xe.TWEEN_DURATION_MS,X.GS3.Quadratic.Out).start(),new Promise((q=>{J.onTweenComplete.add(q)}))}))}hideLetterbox(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;const z=dt.q.instance.game,Y=z.state.getCurrentState();null===(K=null===(q=Y.getParentalConsentBanner)||void 0===q?void 0:q.call(Y))||void 0===K||K.then((q=>{q&&(q.active=!0)}));const Q=z.add.tween(this._topBox,this).to({y:-Xe.BOX_HEIGHT},Xe.TWEEN_DURATION_MS,X.GS3.Quadratic.Out).start();return z.add.tween(this._bottomBox,this).to({y:z.height},Xe.TWEEN_DURATION_MS,X.GS3.Quadratic.Out).start(),new Promise((q=>{Q.onTweenComplete.add((()=>{this._topBox.destroy(),this._bottomBox.destroy(),this._topBox=this._bottomBox=null,q()}))}))}))}};ei.BOX_HEIGHT=50,ei.TWEEN_DURATION_MS=1e3,(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ei.prototype,"onStart",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ei.prototype,"onEnd",void 0),ei=Xe=(0,Q.Cg)([(0,X.EVk)("Letterbox",et.Y.adventure)],ei);let ii=class extends X.uAl{constructor(){super(...arguments),this._shouldCheckMembership=!0,this.membershipSuppressOn=new X.HN0,this.membershipSuppressOff=new X.HN0,this._runOnLoad=!1,this.shouldSuppressAd=!1}create(){super.create(),this.checkForMemberSuppression(),this._runOnLoad&&this.run()}run(){this.checkForMemberSuppression(),this.shouldSuppressAd?this.membershipSuppressOn.dispatch():this.membershipSuppressOff.dispatch()}checkForMemberSuppression(){this.shouldSuppressAd=re.J.shouldSuppressAd(this._loggedInPlayer.player,this._shouldCheckMembership)}destroy(){this.membershipSuppressOn.dispose(),this.membershipSuppressOff.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],ii.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ii.prototype,"_shouldCheckMembership",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ii.prototype,"membershipSuppressOn",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ii.prototype,"membershipSuppressOff",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ii.prototype,"_runOnLoad",void 0),ii=(0,Q.Cg)([(0,X.EVk)("MembershipSuppressionGuard",et.Y.membership)],ii);var si=z(34603),ni=z(51972);let ai=class extends X.uAl{constructor(){super(...arguments),this._tooltipPositionX=0,this._tooltipPositionY=0,this._tooltipPositionArrow=0}postCreate(){super.postCreate(),this._membershipSuppression&&this.updateLockState(this._membershipSuppression.shouldSuppressAd)}updateLockState(q){this._lockImage.GameObject.active=q,this._sparkles&&q&&(this._sparkles.active=!q),this._mainImage.sprite.tint=q?3355443:16777215}run(){dt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this._tooltipPositionX,yPosition:this._tooltipPositionY,arrowXRelPos:this._tooltipPositionArrow,arrowDirection:ni.i.DOWN})}};(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],ai.prototype,"_mainImage",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],ai.prototype,"_lockImage",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ai.prototype,"_sparkles",void 0),(0,Q.Cg)([(0,X.MnK)(ii),(0,Q.Sn)("design:type",ii)],ai.prototype,"_membershipSuppression",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ai.prototype,"_tooltipPositionX",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ai.prototype,"_tooltipPositionY",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ai.prototype,"_tooltipPositionArrow",void 0),ai=(0,Q.Cg)([(0,X.EVk)("LockInteractable",et.Y.adventure)],ai);var ri=z(76945);class oi{static fromRange(q,K){return class{static isDefined(q){return null!=q}static valueIsRange(q){return null!==q&&"object"==typeof q&&"min"in q&&"max"in q}static valueIsWeightedTable(q){return Array.isArray(q)&&q.length>0&&"weight"in q[0]&&"value"in q[0]}}.valueIsRange(q)?Math.floor(Math.random()*(q.max-q.min)+q.min):Math.floor(Math.random()*(null!=K?K:0-q)+q)}}class hi{static shuffle(q,K=!0){const z=yt.shuffle(Array.from(q));if(!K&&q.length>1&&z.length>1&&z[0]===q[q.length-1]){const q=z.shift(),K=Math.floor(Math.random()*(z.length-1)+1);z.splice(K,0,q)}return z}static selectElement(q){return q[oi.fromRange(0,q.length)]}static selectElements(q,K){return yt.sampleSize(K,q)}static selectFromWeightedTable(q){return hi.selectByWeight(q,(q=>q.weight)).value}static selectByWeight(q,K){const z=q.map(K),Y=Math.random()*yt.sum(z);let Q=0;return q[yt.findIndex(z,(q=>(Q+=q,Y({ID:q.ID,type:q.type})));return q.push({ID:z.fallback.ID,type:z.fallback.type}),q}const Y=this.removeOwnedItems(z.items,z.fallback),Q=[];for(let Z=0;Zq.weight));q!==z.fallback&&(Y.splice(Y.indexOf(q),1),z.fallback.weight+=q.weight),X.Aq$.isDefined(q.N)&&"number"!=typeof q.N?Q.push({ID:q.ID,type:q.type,N:ri.o.integerInRange(q.N.min,q.N.max+1)}):Q.push({ID:q.ID,type:q.type,N:q.N})}return Q}removeOwnedItems(q,K){const z=q.length,Y=[];K.weight=0;for(let Q=0;Q0&&Y.push(K),Y}};(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],ci.prototype,"_tables",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],ci.prototype,"_loggedInPlayer",void 0),ci=(0,Q.Cg)([(0,X.EVk)("LootTables",et.Y.root)],ci);let di=class extends X.JTX{getItems(){const q=ri.o.integerInRange(this._minItems,this._maxItems+1);return this.tables.getRandomItems(this.tableName,q)}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],di.prototype,"tableName",void 0),(0,Q.Cg)([(0,X.fFd)("LootTables"),(0,Q.Sn)("design:type",ci)],di.prototype,"tables",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],di.prototype,"_minItems",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],di.prototype,"_maxItems",void 0),di=(0,Q.Cg)([(0,X.EVk)("LootProvider",et.Y.root)],di);let li=class extends X.uAl{saveCheckpoint(){}};(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],li.prototype,"_checkpointPosition",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],li.prototype,"_mainPlayer",void 0),li=(0,Q.Cg)([(0,X.EVk)("CheckpointBase (abstract)")],li);let ui=class extends li{saveCheckpoint(){var q;this._index>this._dungeonState.getCheckpointIndex()&&this._dungeonState.setCheckpoint(this._index,null!==(q=this._checkpointPosition.worldPosition)&&void 0!==q?q:this.GameObject.transform.worldPosition,this._mainPlayer.transform.localScale.x)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ui.prototype,"_index",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],ui.prototype,"_dungeonState",void 0),ui=(0,Q.Cg)([(0,X.EVk)("MapCheckpoint",et.Y.adventure)],ui);let fi=class extends X.uAl{constructor(){super(...arguments),this._onMapObjectComplete=new X.HN0,this._onMapObjectIncomplete=new X.HN0}postCreate(){super.postCreate(),this._dungeonState&&(this.isCompleted()?this._onMapObjectComplete.dispatch():this._onMapObjectIncomplete.dispatch())}destroy(){this._onMapObjectComplete.dispose(),this._onMapObjectIncomplete.dispose(),super.destroy()}completeMapObject(){this._dungeonState.setMapObjectCompleted(this.mapObjectID,!0),this._onMapObjectComplete.dispatch()}isCompleted(){return this._dungeonState.isMapObjectCompleted(this.mapObjectID)}};(0,Q.Cg)([(0,X.Mts)(),(0,Q.Sn)("design:type",Number)],fi.prototype,"mapObjectID",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],fi.prototype,"_dungeonState",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],fi.prototype,"_onMapObjectComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],fi.prototype,"_onMapObjectIncomplete",void 0),fi=(0,Q.Cg)([(0,X.EVk)("MapSaveCompletionState",et.Y.adventure)],fi);var bi=z(48975),pi=z(79421);let vi=class extends X.y4o{constructor(){super(...arguments),this.minerAtlas=ti._.Npc_sprite_gnome_json,this._npcMiner=null,this._minerSize=new X.or0}create(){super.create();const q=dt.q.instance.game;this._npcMiner=new pi.N(q,null,null,null,0,0,new bi.s(q),9,6,null),this._npcMiner.stand(),this._minerSize.setTo(this._npcMiner.width,this._npcMiner.height),this.setRootContainer(this._npcMiner)}destroy(){this._npcMiner.destroy(),super.destroy()}getDimensions(){return this._minerSize}};(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],vi.prototype,"minerAtlas",void 0),vi=(0,Q.Cg)([(0,X.EVk)("MinerNPC",et.Y.object)],vi);var gi=z(28402),mi=z(54336);let yi=class extends X.uAl{constructor(){super(...arguments),this.monsterIDs=[1],this._battleDifficulty=1,this._battleScreen="battle-shiverchill-outside",this._saveStateComponent=null,this._battleStars=null}create(){super.create()}startBattle(){const q=dt.q.instance.prodigy,K=q.world.getCurrentMap(),z=new X.I9Y;z.copyFrom(this._respawnPosition.worldPosition);const Y=this._dungeonState,Q=this._mainPlayer.transform.localScale.x,Z=this._saveStateComponent.mapObjectID;q.battle.battleStats.type="DungeonMonsterBattle",q.battle.start({screen:this._battleScreen,encounter:this.monsterIDs.map((q=>({ID:q,level:this._dungeonState.getLevel()}))),difficulty:this._battleDifficulty,starOverride:this._battleStars,disableHealing:!0},(()=>{q.world.it(K)}),(()=>{Y.setMapObjectCompleted(Z,!0),q.world.it(K,z.x,z.y,{playerDirection:Q})}),null,this._loggedInPlayer.player.data.zone)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],yi.prototype,"_battleDifficulty",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],yi.prototype,"_battleScreen",void 0),(0,Q.Cg)([(0,X.MnK)(fi),(0,Q.Sn)("design:type",fi)],yi.prototype,"_saveStateComponent",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],yi.prototype,"_dungeonState",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],yi.prototype,"_respawnPosition",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],yi.prototype,"_allowCatching",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],yi.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],yi.prototype,"_battleStars",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],yi.prototype,"_loggedInPlayer",void 0),yi=(0,Q.Cg)([(0,X.EVk)("StartDungeonBattle",et.Y.adventure)],yi);let _i=class extends X.uAl{constructor(){super(...arguments),this._monsterID=null,this._spine=null,this._startBattle=null}create(){super.create();const q=ae.t.getItem("pet",this._monsterID).metadata;this._spine.setAsset(`spine-${q.assets.default.ID}`),this._startBattle.monsterIDs=[this._monsterID]}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],_i.prototype,"_monsterID",void 0),(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],_i.prototype,"_spine",void 0),(0,Q.Cg)([(0,X.MnK)(yi),(0,Q.Sn)("design:type",yi)],_i.prototype,"_startBattle",void 0),_i=(0,Q.Cg)([(0,X.EVk)("MonsterEncounter",et.Y.adventure)],_i);var Ei=z(65240),wi=z(41674),Ti=z(65050),Si=z(67665),Ai=z(51742);class Ci extends Ke.u{constructor(){super(...arguments),this._containerType=wi.ZF.WorldChest,this._instanceType=Ti.N.OpenWorld,this.openSoundEffect=Ai.c.Sfx_ui,this.revealItemSoundEffect=Ai.c.Sfx_world}showOpenChest(){this._chestImage.setFrameName(this._chestOpenFrameName)}}(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],Ci.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.gfw)(wi.ZF),(0,Q.Sn)("design:type",String)],Ci.prototype,"_containerType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ci.prototype,"_containerID",void 0),(0,Q.Cg)([(0,X.gfw)(Ti.N),(0,Q.Sn)("design:type",String)],Ci.prototype,"_instanceType",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ci.prototype,"_interactableGameObject",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Ci.prototype,"openSoundEffect",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Ci.prototype,"revealItemSoundEffect",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Ci.prototype,"_chestTransform",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ci.prototype,"_chestOpenFrameName",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Ci.prototype,"_chestImage",void 0);let Oi=class extends Ci{run(){var q;const K=this._lootProvider.getItems();if(null===(q=this._interactableGameObject)||void 0===q?void 0:q.transform){const q=dt.q.instance.prodigy.world.getCurrentZone();this._containerID=`${q}-${this._interactableGameObject.transform.worldPosition.x}-${this._interactableGameObject.transform.worldPosition.y}`}this._segment.container.sendContainerOpenedEvent(this._containerType,this._containerID,this._instanceType),this.execute(145,{game:dt.q.instance.game,chestTransform:this._chestTransform,openChestFSM:this,chestItems:K,itemCount:K.length,mapSaveState:this._mapSaveState,sourceType:this._containerType===wi.ZF.WorldChest?Ei.C.WorldChest:Ei.C.WorldMemberChest,sourceID:this._containerID,transactionID:this._segment.container.getCurrentContainerTransactionID()})}};(0,Q.Cg)([(0,X.MnK)(di),(0,Q.Sn)("design:type",di)],Oi.prototype,"_lootProvider",void 0),(0,Q.Cg)([(0,X.MnK)(fi),(0,Q.Sn)("design:type",fi)],Oi.prototype,"_mapSaveState",void 0),Oi=(0,Q.Cg)([(0,X.EVk)("OpenChestFSM",et.Y.adventureFsm)],Oi);var Ii=z(43531);let Di=class extends X.uAl{constructor(){super(...arguments),this._dialogueIDs=[],this._onFinished=new X.HN0,this._attachToGameObjectLayer=!1}destroy(){this._onFinished.dispose(),super.destroy()}play(){const q=Ii.rD.runDialogueSequence(Wt.l.guaranteeArray(this._dialogueIDs),(()=>{this._onFinished.dispatch()}));this._attachToGameObjectLayer&&q.setParent(X.wa5.getActiveScene().getLayer(this.GameObject.layer))}};(0,Q.Cg)([(0,X.SZi)(),(0,X.g11)(),(0,Q.Sn)("design:type",Array)],Di.prototype,"_dialogueIDs",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Di.prototype,"_onFinished",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Di.prototype,"_attachToGameObjectLayer",void 0),Di=(0,Q.Cg)([(0,X.EVk)("PlayDialogue",et.Y.ui)],Di);var Ri=z(51941);let Pi=class extends X.uAl{create(){var q;let K;if(super.create(),null===(q=this.gameObject.findComponentInChildren(Ri.c))||void 0===q||q.onLoadComplete.add((()=>{this.gameObject.active=!0})),K=this._dungeonState.getCheckpointIndex(),-1===K){const q=this._dungeonState.getCurrentMap(),z=this.phaseNames.indexOf(q);z>=0?K=this.phaseDefaultIDs[z]:q&&X.VyI.log(`No phase name for ${q}`,X.$bb.Error)}const z=yt.sortedIndex(this.checkpointIDs,K),Y=this.gameObject.legacyTransform,Q=this.checkpointsParent.children[z].legacyTransform;Y.x=Q.x,Y.y=Q.y}};(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],Pi.prototype,"_dungeonState",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Pi.prototype,"checkpointsParent",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.g11)(),(0,Q.Sn)("design:type",Array)],Pi.prototype,"checkpointIDs",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],Pi.prototype,"phaseNames",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.g11)(),(0,Q.Sn)("design:type",Array)],Pi.prototype,"phaseDefaultIDs",void 0),Pi=(0,Q.Cg)([(0,X.EVk)("PlayerPinProgress",et.Y.adventureUi)],Pi);let Mi=class extends Ke.u{run(){this._fsmData&&X.Aq$.isDefined(this._fsmData.ID)&&this.execute(this._fsmData.ID,this._fsmData.variables)}};(0,Q.Cg)([(0,X.Cdj)("InitData-playFSM"),(0,Q.Sn)("design:type",Object)],Mi.prototype,"_fsmData",void 0),Mi=(0,Q.Cg)([(0,X.EVk)("PlayInitDataFSM",et.Y.animation)],Mi);var Ni=z(9531);let xi=class extends X.JTX{postCreate(){if(super.postCreate(),this._playerProvider){const q=[],K=this._bossIDs.length;for(let X=0;X0?1===Q?this._localizer.getText("ADVENTURE_REMAINING_REWARDS_SINGLE"):this._localizer.getText("ADVENTURE_REMAINING_REWARDS",Q):""}}};(0,Q.Cg)([(0,X.fFd)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],xi.prototype,"_playerProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("Localization"),(0,Q.Sn)("design:type",X.dTp)],xi.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],xi.prototype,"_labelText",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],xi.prototype,"_bossIDs",void 0),xi=(0,Q.Cg)([(0,X.EVk)("RemainingRewards",et.Y.adventureUi)],xi);let Li=class extends Ke.u{run(){const q=this._lootProviderComponent.getItems();this.execute(135,{game:dt.q.instance.game,spine:this._interactableSpine.getSpine(),items:q.length>0?q:null,saveComponent:this._saveCompletionComponent,revealAnimationName:this._revealAnimationName})}};(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],Li.prototype,"_interactableSpine",void 0),(0,Q.Cg)([(0,X.MnK)(fi),(0,Q.Sn)("design:type",fi)],Li.prototype,"_saveCompletionComponent",void 0),(0,Q.Cg)([(0,X.MnK)(di),(0,Q.Sn)("design:type",di)],Li.prototype,"_lootProviderComponent",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Li.prototype,"_revealAnimationName",void 0),Li=(0,Q.Cg)([(0,X.EVk)("RevealInteractableItemFSM",et.Y.adventureFsm)],Li);var ki=z(28628);class Bi{static getBossAssetID(q){const K=Object.keys(Bi.BOSS_ID_MAP).find((K=>Bi.BOSS_ID_MAP[K]===q));return K?parseInt(K,10):null}static getBossEnum(q){var K;return null!==(K=Bi.BOSS_ID_MAP[q])&&void 0!==K?K:null}static getRevampBattleType(q){return Bi.REVAMP_BATTLE_TYPES[q]}}Bi.BOSS_ID_MAP={19:0,20:3,21:4,17:1,18:2},Bi.REVAMP_BATTLE_TYPES={0:ki.gu.CrystalCavernsGrumpyYeti,4:ki.gu.CrystalCavernsCrystalThief,3:ki.gu.CrystalCavernsGlacias,1:ki.gu.CrystalCavernsMakalu,2:ki.gu.CrystalCavernsCrystalGolem};var Ui=z(83668);let Fi=class extends X.uAl{constructor(){super(...arguments),this.preloadAtlas=ti._.Ui_cc_adventure_map_json}create(){super.create();let q=Gt.l.AdventureMap_RowUnrevealed;{const K=ae.t.getItemData("boss",Bi.getBossAssetID(this.bossID));this._crystalCavernsState.isBossDefeatedCurrentRun(this.bossID)?q=Gt.l.AdventureMap_RowDone:this._crystalCavernsState.getCheckpointIndex()===K.battleCheckpointID&&(q=Gt.l.AdventureMap_RowCurrent)}this._prefabLoader.loadFromGUID(q,this.gameObject)}};(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Fi.prototype,"preloadAtlas",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Fi.prototype,"bossID",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",Ui.o)],Fi.prototype,"_crystalCavernsState",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Fi.prototype,"_prefabLoader",void 0),Fi=(0,Q.Cg)([(0,X.EVk)("RewardRowBacking",et.Y.adventureUi)],Fi);var Gi=z(5822);let ji=class extends Gi.u{};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ji.prototype,"_firstEntryEvent",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ji.prototype,"_reentryEvent",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],ji.prototype,"_dungeonState",void 0),ji=(0,Q.Cg)([(0,X.EVk)("SendStartDungeonMetric",et.Y.adventure)],ji);var $i=z(19464);let Hi=class extends X.uAl{teleportPlayer(){this._dungeonState.resetPhaseData(),this._dungeonState.setCurrentMap(this._destinationMap),dt.q.instance.prodigy.world.it(this._destinationMap),dt.q.instance.prodigy.gameContainer.get("20f-5f67").playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent($i.lT.Complete)}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Hi.prototype,"_destinationMap",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],Hi.prototype,"_dungeonState",void 0),Hi=(0,Q.Cg)([(0,X.EVk)("TransitionDungeonPhases",et.Y.adventure)],Hi);var Vi=z(79009),Wi=z(5668),qi=z(54950);let Ki=class extends X.PQK{installBindings(){const q=dt.q.instance.prodigy.gameContainer;this.Container.bind("Localization").toConstantValue(q.get(X.$Bt.LocalizationService)),this.Container.bind("19d-cfb4").toConstantValue(dt.q.instance.prodigy.open),this.Container.bind("AnimationData").toConstantValue(new Vi.F(z(34500))),this.Container.bind("c21-4a0a").to(qi.S).asSingleton(),this.Container.bind("316-5db0").toConstantValue(new Wi.D(this.Container,q.get("774-4659")))}};Ki=(0,Q.Cg)([(0,X.Og1)("AdventureInstaller","Installer")],Ki);var zi,Yi=z(26932),Qi=z(13956),Xi=z(63860);!function(q){q.afterSchoolWidgetSchoolRewardState="AFTER_SCHOOL_WIDGET_SCHOOL_REWARD_STATE",q.afterSchoolWidgetHomeRewardState="AFTER_SCHOOL_WIDGET_HOME_REWARD_STATE",q.afterSchoolWidgetRewardTooltipActive="AFTER_SCHOOL_WIDGET_REWARD_TOOLTIP_ACTIVE",q.afterSchoolWidgetRewardTooltipState="AFTER_SCHOOL_WIDGET_REWARD_TOOLTIP_STATE",q.afterSchoolWidgetSchoolRewardAmount="AFTER_SCHOOL_WIDGET_SCHOOL_REWARD_AMOUNT",q.afterSchoolWidgetHomeRewardAmount="AFTER_SCHOOL_WIDGET_HOME_REWARD_AMOUNT"}(zi||(zi={}));let Zi=class extends Yi.z{constructor(){super(...arguments),this.onSchoolRewardClaimed=new X.HN0,this.onHomeRewardClaimed=new X.HN0}create(){super.create(),this.bindContext()}bindContext(){this.schoolRewardStateSignalBinding=this._afterSchoolWidgetService.onSchoolRewardStateSet.add((q=>this.refreshSchoolRewardState(q))),this.homeRewardStateSignalBinding=this._afterSchoolWidgetService.onHomeRewardStateSet.add((q=>this.refreshHomeRewardState(q))),this.rewardDataSignalBinding=this._afterSchoolWidgetService.onDataSet.add((()=>this.refreshRewardValues())),this.refreshSchoolRewardState(),this.refreshHomeRewardState(),this.refreshRewardValues()}refreshSchoolRewardState(q=this._afterSchoolWidgetService.schoolRewardState){X.Aq$.isDefined(q)&&(this.updateValue(zi.afterSchoolWidgetSchoolRewardState,q),this.refreshToolTipState())}refreshHomeRewardState(q=this._afterSchoolWidgetService.homeRewardState){X.Aq$.isDefined(q)&&(this.updateValue(zi.afterSchoolWidgetHomeRewardState,q),this.refreshToolTipState())}refreshToolTipState(){const{homeRewardState:q,schoolRewardState:K}=this._afterSchoolWidgetService,z=this._afterSchoolWidgetService.isFtueAvailable();"Locked"===q?(this.updateValue(zi.afterSchoolWidgetRewardTooltipState,"Locked"),this.updateValue(zi.afterSchoolWidgetRewardTooltipActive,!z)):"Collected"===K&&"Collected"===q?(this.updateValue(zi.afterSchoolWidgetRewardTooltipState,"Collected"),this.updateValue(zi.afterSchoolWidgetRewardTooltipActive,!z)):this.updateValue(zi.afterSchoolWidgetRewardTooltipActive,!1)}refreshRewardValues(){const q=this._afterSchoolWidgetService.getData().homeReward,K=this._afterSchoolWidgetService.getData().schoolReward;this.updateValue(zi.afterSchoolWidgetHomeRewardAmount,q.amount),this.updateValue(zi.afterSchoolWidgetSchoolRewardAmount,K.amount)}claimSchoolReward(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._afterSchoolWidgetService.claimSchoolReward();this.onSchoolRewardClaimed.dispatch(q)}))}claimHomeReward(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._afterSchoolWidgetService.claimHomeReward();this.onHomeRewardClaimed.dispatch(q)}))}destroy(){this.onHomeRewardClaimed.dispose(),this.onSchoolRewardClaimed.dispose(),this.schoolRewardStateSignalBinding.destroy(),this.homeRewardStateSignalBinding.destroy(),this.rewardDataSignalBinding.destroy(),super.destroy()}};(0,Q.Cg)([(0,Qi.b)("2c1-7dec"),(0,Q.Sn)("design:type",Xi.e)],Zi.prototype,"_afterSchoolWidgetService",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zi.prototype,"onSchoolRewardClaimed",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zi.prototype,"onHomeRewardClaimed",void 0),Zi=(0,Q.Cg)([(0,X.EVk)("AfterSchoolWidgetRewards",et.Y.afterSchoolWidget)],Zi);var Ji=z(18344);let ts=class extends X.uAl{constructor(){super(...arguments),this.iconGraphicComponents=[]}postCreate(){super.postCreate(),X.Aq$.isDefined(this.bannerText)&&this.setBannerText(this.bannerText),X.Aq$.isDefined(this.iconGraphicAsset)&&this.setIconGraphicAsset(this.iconGraphicAsset)}init(q){this._definition=q,this.setBannerText(q.text),this.setIconGraphicAsset(q.iconGuid)}getDefinition(){return Object.assign({},this._definition)}setIconGraphicAsset(q){if(X.Aq$.isDefined(q)){if(this.iconGraphicAsset=q,!X.Aq$.isDefined(this.iconGraphicAsset))for(const q of this.iconGraphicComponents)q.GameObject.active=!1;this._assetLoader.loadAssets([this.iconGraphicAsset]).then((()=>{for(const q of this.iconGraphicComponents)q.GameObject.active=!0,q.updateAsset(this.iconGraphicAsset)})).catch((q=>{X.VyI.log(q,X.$bb.Error)}))}}setBannerText(q){this.bannerText=q,X.Aq$.isDefined(this.bannerTextComponent)&&(this.bannerTextComponent.text=q)}};(0,Q.Cg)([(0,X.Cdj)(X.t5G.AssetLoader),(0,Q.Sn)("design:type",Ji.A)],ts.prototype,"_assetLoader",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],ts.prototype,"bannerTextComponent",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ts.prototype,"bannerText",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",Array)],ts.prototype,"iconGraphicComponents",void 0),(0,Q.Cg)([(0,X.i0J)(X.Z$z.SingleImage),(0,Q.Sn)("design:type",String)],ts.prototype,"iconGraphicAsset",void 0),ts=(0,Q.Cg)([(0,X.EVk)("BannerControllerComponent")],ts);var es=z(11647),is=z(52743);let ss=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.maxBannersToShow=3,this._isLoadingBanners=!1}postCreate(){super.postCreate(),this.updateBanners(this._bannerQueueManager.getStack()).catch((q=>X.VyI.log(q,X.$bb.Error))),this.addListenerToSignal(this._bannerQueueManager.onBannerQueueUpdated,(q=>{this.updateBanners(q).catch((q=>X.VyI.log(q,X.$bb.Error)))}))}updateBanners(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;if(this._isLoadingBanners)return;this._isLoadingBanners=!0;const z=null!==(K=this.contentContainerObject)&&void 0!==K?K:this.gameObject,Y=z.children.map((q=>q.findComponent(ts)));for(let Q=0;Q=1}}(0,Q.Cg)([(0,X.x4W)("left"),(0,Q.Sn)("design:type",ns.k)],rs.prototype,"_left",void 0),(0,Q.Cg)([(0,X.x4W)("right"),(0,Q.Sn)("design:type",ns.k)],rs.prototype,"_right",void 0),(0,Q.Cg)([(0,X.x4W)("middle"),(0,Q.Sn)("design:type",ns.k)],rs.prototype,"_middle",void 0);let os=class extends ts{constructor(){super(...arguments),this.progress=0,this.target=1}postCreate(){super.postCreate(),this.setProgress(this.progress,this.target)}init(q){super.init(q),this.setProgress(q.progress.current,q.progress.target)}setProgress(q,K){var z;this.progress=q,this.target=K;const Y=Math.min(q/K,1);X.Aq$.isDefined(this.progressLabelTextComponent)&&(this.progressLabelTextComponent.text=`${q}/${K}`),null===(z=this.progressBarComponent)||void 0===z||z.setValue(Y)}};(0,Q.Cg)([(0,X.MnK)(rs),(0,Q.Sn)("design:type",rs)],os.prototype,"progressBarComponent",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],os.prototype,"progressLabelTextComponent",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],os.prototype,"progress",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],os.prototype,"target",void 0),os=(0,Q.Cg)([(0,X.EVk)("ProgressBannerController")],os);var hs=z(35997);let cs=class extends X.uAl{constructor(){super(...arguments),this._onLoad=new X.HN0}create(){super.create(),dt.q.instance.prodigy.titansNetworkHandler.getTitans().then((()=>{this._onLoad.dispatch()}))}destroy(){this._onLoad.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],cs.prototype,"_onLoad",void 0),cs=(0,Q.Cg)([(0,X.EVk)("AwaitTitan",et.Y.titan)],cs);let ds=class extends X.uAl{constructor(){super(...arguments),this._onAlive=new X.HN0,this._onDead=new X.HN0}check(){dt.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?this._onAlive.dispatch():this._onDead.dispatch()}destroy(){this._onAlive.dispose(),this._onDead.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ds.prototype,"_onAlive",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ds.prototype,"_onDead",void 0),ds=(0,Q.Cg)([(0,X.EVk)("IsTitanAliveGuard",et.Y.titan)],ds);let ls=class extends X.uAl{constructor(){super(...arguments),this._onNew=new X.HN0,this._onNotNew=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this._onNew.dispose(),this._onNotNew.dispose(),super.destroy()}check(){dt.q.instance.prodigy.titansNetworkHandler.isNewTitan()?this._onNew.dispatch():this._onNotNew.dispatch()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ls.prototype,"_onNew",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ls.prototype,"_onNotNew",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ls.prototype,"_runOnLoad",void 0),ls=(0,Q.Cg)([(0,X.EVk)("IsTitanNewGuard",et.Y.titan)],ls);var us=z(65116),fs=z(49037);let bs=class extends X.uAl{setDestination(){const q=dt.q.instance.prodigy.titansNetworkHandler.titan;if(q){const K=`${ae.t.getItem("titan",q.assetID).data.zone}-Titan`;this.canTeleport&&(this.canTeleport.mapTag=K),this.teleport&&(this.teleport.mapTag=K)}}};(0,Q.Cg)([(0,X.MnK)(us.$),(0,Q.Sn)("design:type",us.$)],bs.prototype,"canTeleport",void 0),(0,Q.Cg)([(0,X.MnK)(fs.q),(0,Q.Sn)("design:type",fs.q)],bs.prototype,"teleport",void 0),bs=(0,Q.Cg)([(0,X.EVk)("SetTitanTeleportComponents",et.Y.titan)],bs);let ps=class extends X.uAl{constructor(){super(...arguments),this._duelInviteUpdate=new X.HN0}create(){super.create(),this.fireSignalBasedOnCurrentDuelInviteState(),this._duelInviteService.onInviteReceived.add(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteRemoved.add(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteCancelled.add(this.fireSignalBasedOnCurrentDuelInviteState,this)}destroy(){this._duelInviteUpdate.dispose(),this._duelInviteService.onInviteReceived.remove(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteCancelled.remove(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteRemoved.remove(this.fireSignalBasedOnCurrentDuelInviteState,this),super.destroy()}fireSignalBasedOnCurrentDuelInviteState(){this._duelInviteUpdate.dispatch(this._duelInviteService.getInvites().length>0)}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ps.prototype,"_duelInviteUpdate",void 0),(0,Q.Cg)([(0,X.Cdj)("7ff-8385"),(0,Q.Sn)("design:type",Object)],ps.prototype,"_duelInviteService",void 0),ps=(0,Q.Cg)([(0,X.EVk)("DuelInviteUpdate",et.Y.titan)],ps);var vs=z(56942),gs=z(52156),ms=z(53661),ys=z(18587);let _s=class extends X.uAl{constructor(){super(...arguments),this._generalChaseItems=[],this._levelupChaseItems=[],this._ultimateChaseItems=[]}create(){const q=Object.create(null,{create:{get:()=>super.create}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q,Z,J,tt;q.create.call(this),this._battlePassQuestData=yield this._questManager.getCurrentBattlePassData();const et=this._battlePassQuestData.getChasePetsLevelUp(),it=this._battlePassQuestData.getChasePetsUltimate(),st=null===(K=et[0])||void 0===K?void 0:K.id,nt=null===(z=it[0])||void 0===z?void 0:z.id,at=null===(Y=it[1])||void 0===Y?void 0:Y.id,rt={};X.Aq$.isDefined(st)&&(rt[ms.XU.LevelupMythicGuid]=vs.Q[`Spine_pet_${st}_json`]),X.Aq$.isDefined(nt)&&(rt[ms.XU.MythicGuid]=vs.Q[`Spine_pet_${nt}_json`]),X.Aq$.isDefined(at)&&(rt[ms.XU.UltimateMemberPetGuid]=vs.Q[`Spine_pet_${at}_json`]),Ht.d.updateInjectedValues(this.gameObject,rt);const ot=this._battlePassQuestData.getMiniChaseItemsUltimate();for(let q=0;qq&&(this._ultimateChaseItems[q].findComponentInChildren(X.EYj).text=1===ot[q].quantity?"":null!==(Z=null===(Q=ot[q].quantity)||void 0===Q?void 0:Q.toString())&&void 0!==Z?Z:"",this._ultimateChaseItems[q].findComponentInChildren(gs.X).setAsset(ot[q].id,ot[q].type).catch((K=>{X.VyI.log(`Battle pass was unable to load asset for ultimate chase item at index ${q}`,X.$bb.Error)})));const ht=this._battlePassQuestData.getMiniChaseItemsLevelUp();for(let q=0;qq&&(this._levelupChaseItems[q].findComponentInChildren(X.EYj).text=1===ht[q].quantity?"":null!==(tt=null===(J=ht[q].quantity)||void 0===J?void 0:J.toString())&&void 0!==tt?tt:"",this._levelupChaseItems[q].findComponentInChildren(gs.X).setAsset(ht[q].id,ht[q].type).catch((K=>{X.VyI.log(`Battle pass was unable to load asset for level up chase item at index ${q}`,X.$bb.Error)})));const ct=this._loggedInPlayer.isMember();this._nonMemberCTA.active=!ct,this._levelUpMemberCTA.active=ct,this._battlePassQuestData||X.VyI.log("Battle pass track was unable to retrieve quest data for the current battle pass.",X.$bb.Error)}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],_s.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],_s.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],_s.prototype,"_generalChaseItems",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],_s.prototype,"_levelupChaseItems",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],_s.prototype,"_ultimateChaseItems",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],_s.prototype,"_nonMemberCTA",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],_s.prototype,"_levelUpMemberCTA",void 0),_s=(0,Q.Cg)([(0,X.EVk)("BattlePassChaseItemsController",et.Y.battlePass)],_s);var Es=z(90633),ws=z(46784),Ts=z(91207);let Ss=class extends X.uAl{constructor(){super(...arguments),this._battlePassAtlas=ti._.Ui_battle_pass_json,this._complexFtue=!1,this._paginationBubbleSize=20,this._paginationBubbles=[],this._ftueFrames=[],this._additionalUiElements=[],this._currentFrame=0,this._finalFrameNextButtonTextKey="BUTTON_START_NOW"}create(){super.create(),this._closeCallback=this.getInjectedValue(ms.XU.CloseCallback),this._battlePassQuestManager.getCurrentBattlePassData().then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){const K=[];this._ftueFrames=q.getFtueFrames(),this._frameAmount=this._complexFtue?this._ftueFrames.length:1;for(let q=0;q{q.empty.Active=this._currentFrame!==K,q.full.Active=this._currentFrame===K}));else{this._paginationBubbleGrid.GameObject.active=!1;for(let q=0;q{this.handleNextClicked().catch(X.RQr.createHandler("BattlePassFtueComponent: Error setting up the next button click handler"))}))}))}handleNextClicked(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._currentFrame===this._frameAmount-1)return yield this.completeFtue(!1),void dt.q.instance.prodigy.open.battlePassMenu(ws.B.BattlePassFtue,wi.$N.AutoSurfaced,this._closeCallback);yield this.loadFrame(this._currentFrame+1),this.setUpPaginationBubbles(),yield this.setUpNextButton()}))}completeFtue(){return(0,Q.sH)(this,arguments,void 0,(function*(q=!0){if(this._complexFtue){dt.q.instance.prodigy.gameContainer.get("fa1-8ec9").completeBreadcrumb(Es.B.FEATURE_BATTLE_PASS,Es.B.BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED)}yield this._battlePassQuestManager.sendFtueViewedEvent(),this._modal.destroyDeferred(),q&&this._closeCallback()}))}};(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Ss.prototype,"_battlePassAtlas",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ss.prototype,"_modal",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Ss.prototype,"_frameImage",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ss.prototype,"_frameGameObject",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Ss.prototype,"_nextButton",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ss.prototype,"_nextButtonText",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Ss.prototype,"_complexFtue",void 0),(0,Q.Cg)([(0,X.MnK)(X.JTA),(0,Q.Sn)("design:type",X.JTA)],Ss.prototype,"_paginationBubbleGrid",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],Ss.prototype,"_battlePassQuestManager",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Ss.prototype,"_localizer",void 0),Ss=(0,Q.Cg)([(0,X.EVk)("BattlePassFtue",et.Y.battlePass)],Ss);var As=z(36648),Cs=z(97518);let Os=class extends X.uAl{constructor(){super(...arguments),this._chasePrizeImages=[]}create(){super.create(),this.setupUi().catch(X.RQr.createHandler("BattlePassHomeScreen: Failed to set up chase prizes."))}destroy(){this._goToQuestsTab.onClick.remove(this.goToQuestsTab),this._goToIntroModal.onClick.remove(this.showIntro),super.destroy()}setupUi(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=yield this._battlePassQuestManager.getCurrentBattlePassData(),z=K.getHomeScreenPromoImageGuid(),Y=Ts.E.resolveSingleImageAssetSource(z,K.getHomeScreenPromoImageURL());if(null===(q=this._splashArt)||void 0===q||q.setAsset(Y).catch(X.RQr.createHandler(`BattlePassHomeScreen: Failed to load splash art image ${z}`)),this._chasePrizeImages[0]){const q=K.getChaseHeroPoseImageGuid();this._chasePrizeImages[0].setAsset(q).catch(X.RQr.createHandler(`BattlePassHomeScreen: Failed to load chase prize image ${q}`))}const Q=K.getChasePrizes();for(let J=1;J0?q.setBarText(z):q.setBarText((0,Is.k)(this.textToDisplay))}};(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Rs.prototype,"fillColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Rs.prototype,"innerColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Rs.prototype,"outerColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Rs.prototype,"textOutlineColor",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Rs.prototype,"textToDisplay",void 0),Rs=(0,Q.Cg)([(0,X.EVk)("ProgressBarState",et.Y.battlePass)],Rs);var Ps,Ms,Ns,xs,Ls,ks,Bs=z(29834),Us=z(15485),Fs=z(21418),Gs=z(96165);!function(q){q.Common="common-130x130",q.Uncommon="uncommon-130x130",q.Rare="rare-130x130",q.Heroic="heroic-130x130",q.Legendary="legendary-130x130"}(Ps||(Ps={})),function(q){q.Free="select-nonmember",q.Premium="select-member",q.Ultimate="frame-ultramember-diamond"}(Ms||(Ms={})),function(q){q.Free="frame-free-offseason",q.Core="select-member_offseason",q.Plus="frame-ultramember-diamond-offseason"}(Ns||(Ns={})),function(q){q.Common="#C5D1F5",q.Uncommon="#53A18A",q.Rare="#3B61C5",q.Heroic="#7E44CC",q.Legendary="#EFA378"}(xs||(xs={})),function(q){q.Common="#CCD7F9",q.Uncommon="#E3EFCA",q.Rare="#B6CFFB",q.Heroic="#F7CFF7",q.Legendary="#F3D07F"}(Ls||(Ls={})),function(q){q.MysteryRewardClaimSwitch="switch"}(ks||(ks={}));const js=["#363636","#FFFFFF","#FFFFFF","#FFFFFF","#363636"],$s="generic",Hs={19:"academy-scroll",16:"aeros",2:"candy-corn",3:"generic",10:"generic",21:"generic",13:"florans",1:"gold",18:"academy-scroll",12:"hothots",22:"generic",8:"gold",17:"magic-egg",5:"magic-snowflake",7:"gold",23:"generic",20:"sand-dollar",15:"shivers",6:"gold",4:"star-shards",25:"generic",11:"titan-shards",9:"generic",14:"yars",27:"magicoin"};var Vs=z(66582);let Ws=class extends X.uAl{setUp(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;if(!this.gameObject||this.GameObject.isDestroyed)return;if(!q)return void(this.gameObject.active=!1);switch(this.gameObject.active=!0,this._levelUpMemberIcon.active=!1,this._ultimateMemberIcon.active=!1,q.membershipTier){case Vs._$.NonMember:break;case Vs._$.MemberLevelUp:case Vs._$.MemberCore:this._levelUpMemberIcon.active=!0;break;case Vs._$.MemberUltimateMath:case Vs._$.MemberUltimateBundle:case Vs._$.MemberPlus:case Vs._$.MemberUltra:this._ultimateMemberIcon.active=!0;break;default:X.VyI.log(`Unhandled member tier ${q.membershipTier} ${Vs._$[q.membershipTier]}, presenting as Ultimate as a fallback`,X.$bb.Warning),this._ultimateMemberIcon.active=!0}const z=q.itemDrop.N;z>1&&!q.isMystery?(this._counterText.Active=!0,this._counterText.text=`x${z}`):this._counterText.Active=!1;const Y=null!==(K=ae.t.getItem(q.itemDrop.type,q.itemDrop.ID).data.rarity)&&void 0!==K?K:0,Q=q.isMystery?182:q.itemDrop.ID,Z=q.isMystery?"item":q.itemDrop.type;yield Promise.all([this._background.setAsset(ti._.Ui_battle_pass_json,Object.values(Ps)[Y]),this._itemImageDataLoader.setAsset(Q,Z)])}))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ws.prototype,"_levelUpMemberIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ws.prototype,"_ultimateMemberIcon",void 0),(0,Q.Cg)([(0,X.MnK)(gs.X),(0,Q.Sn)("design:type",gs.X)],Ws.prototype,"_itemImageDataLoader",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Ws.prototype,"_background",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ws.prototype,"_counterText",void 0),Ws=(0,Q.Cg)([(0,X.EVk)("BattlePassItemCard",et.Y.battlePass)],Ws);let qs=class extends X.uAl{constructor(){super(...arguments),this.onRewardClaimed=new X.HN0}setup(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(_t().isEqual(this._infiniteTierData,q))return;this._infiniteTierData=q,this._currentTierIcon.active=q.isCurrentTier,this.setUpProgressBar(q);const K=q.timesCompleted-q.timesClaimed;this._claimButtonSparkle.GameObject.active=K>0,this.setUpClaimButton(q,K),this._itemCardSparkle.GameObject.active=K>0,this._itemCard&&q.freeReward&&(yield this._itemCard.setUp(q.freeReward).catch(X.RQr.createHandler("Failed to set up the item card in the battle pass infinite tier")),this.assignListenerToSignal(this._itemCardButton.onClick,this.itemCardClickEvent))}))}destroy(){this.onRewardClaimed.dispose(),super.destroy()}claimRewards(q){var K;this._claimButtonParent.active=!1,this._claimButtonSparkle.GameObject.active=!1,this._itemCardSparkle.GameObject.active=!1;const z=q.freeReward.rewardId,Y=q.timesCompleted-q.timesClaimed;this._questManager.sendRewardClaimedEvent(z,Y).then((()=>{new Gs.I(null,null).doTask({itemDrops:[{ID:q.freeReward.itemDrop.ID,type:q.freeReward.itemDrop.type,N:q.freeReward.itemDrop.N*Y}],showGotItem:!1,sourceType:Ei.C.BattlePass}).catch(X.RQr.createHandler("BattlePassInfiniteTierComponent: Failed to grant reward"))})).catch(X.RQr.createHandler(`BattlePassInfiniteTierComponent: Failed to claim battle pass reward ${z}`)),this._claimedAnimationAnimator.GameObject.active=!0;const Q=q.freeReward,Z=("currency"===Q.itemDrop.type||"gold"===Q.itemDrop.type)&&null!==(K=Hs[Q.itemDrop.ID])&&void 0!==K?K:$s;this._claimedAnimationAnimator.playAnimation(Z,!1)}setUpProgressBar(q){if(!this._progressBarState)return void X.VyI.log("BattlePassInfiniteTierComponent does not have a progress bar state assigned.",X.$bb.Error);const K=q.currentProgress/q.targetProgress,z=q.isCurrentTier?`${q.currentProgress} / ${q.targetProgress}`:"--";this._progressBarState.applyStateToProgressBar(this._progressBar,K,z)}setUpClaimButton(q,K){K<=0?this._claimButtonParent.active=!1:(this._claimButtonParent.active=!0,this._claimButton.useHandCursor=!0,this.setUpClaimButtonText(K),this.assignListenerToSignal(this._claimButton.onClick,this.claimButtonClickEvent))}assignListenerToSignal(q,K){q.has(K,this)||q.add(K,this)}setUpClaimButtonText(q){let K=(0,Is.k)("BTN_COLLECT");q>1&&(K+=` x${q}`),this._claimButton.text=K,this._claimButton.regenerateButton()}claimButtonClickEvent(){this._claimButton.onClick.removeAll(),this.claimRewards(this._infiniteTierData),this._claimedAnimationAnimator.OnAnimationComplete.addOnce((()=>{this.onRewardClaimed.dispatch()}));const q=dt.q.instance.prodigy.gameContainer.get("20f-5f67");q.battlePass.generateRewardClaimedTransactionId(),q.featureCommon.sendButtonEvent({buttonName:Us.k.BattlePassClaimInfiniteTierButton,interfaceName:ws.B.BattlePassMenu,interfaceType:wi.Wm.BattlePass,transactionId:q.battlePass.rewardClaimedTransactionId})}itemCardClickEvent(){const q="gold"===this._infiniteTierData.freeReward.itemDrop.type?"currency":this._infiniteTierData.freeReward.itemDrop.type;dt.q.instance.prodigy.open.itemInfo({ID:this._infiniteTierData.freeReward.itemDrop.ID,L:0,type:q},null,Fs.s.View)}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],qs.prototype,"onRewardClaimed",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],qs.prototype,"_currentTierIcon",void 0),(0,Q.Cg)([(0,X.MnK)(Ws),(0,Q.Sn)("design:type",Ws)],qs.prototype,"_itemCard",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],qs.prototype,"_itemCardButton",void 0),(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],qs.prototype,"_itemCardSparkle",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],qs.prototype,"_claimButtonParent",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],qs.prototype,"_claimButton",void 0),(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],qs.prototype,"_claimButtonSparkle",void 0),(0,Q.Cg)([(0,X.MnK)(Ds.z),(0,Q.Sn)("design:type",Ds.z)],qs.prototype,"_progressBar",void 0),(0,Q.Cg)([(0,X.MnK)(Rs),(0,Q.Sn)("design:type",Rs)],qs.prototype,"_progressBarState",void 0),(0,Q.Cg)([(0,X.MnK)(Rs),(0,Q.Sn)("design:type",Rs)],qs.prototype,"_upcomingTierProgressBarState",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],qs.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],qs.prototype,"_claimedAnimationAnimator",void 0),qs=(0,Q.Cg)([(0,X.EVk)("BattlePassInfiniteTier",et.Y.battlePass)],qs);var Ks=z(63011),zs=z(64353),Ys=z(95057),Qs=z(98252),Xs=z(66207);let Zs=class extends X.uAl{constructor(){super(...arguments),this._chaseRewardsDisplay=[]}create(){super.create(),this.updateMembershipButton(),this.setUpBattlePassDataUi().catch(X.RQr.createHandler("BattlePassLeftPanel: Failed to set up panel data")),this._battlePassQuestManager.getCurrentBattlePassData().then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){if(!q)return;const K=q.getChasePrizes();for(let q=1;qthis.updateMembershipButton())).catch((q=>X.RQr.logError(q,"Failed to open battle pass ultimate member upsell modal")))}destroy(){super.destroy(),this._memberUnlockButton.onClick.removeAll()}};(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],Zs.prototype,"_battlePassQuestManager",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",Array)],Zs.prototype,"_chaseRewardsDisplay",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Zs.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Zs.prototype,"_memberUnlockButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zs.prototype,"_memberIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zs.prototype,"_ultimateMemberIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zs.prototype,"_memberUnlockText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zs.prototype,"_ultimateMemberUnlockText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zs.prototype,"_currentUltimateMemberText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zs.prototype,"_chaseRewardsParent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zs.prototype,"_ultraMembershipWidget",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Zs.prototype,"_backgroundImage",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Zs.prototype,"_ultimateActivatedText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zs.prototype,"_mythicPet",void 0),Zs=(0,Q.Cg)([(0,X.EVk)("BattleLeftPanelComponent",et.Y.battlePass)],Zs);let Js=class extends X.uAl{create(){const q=Object.create(null,{create:{get:()=>super.create}});return(0,Q.sH)(this,void 0,void 0,(function*(){q.create.call(this);const K=yield this._questManager.getCurrentBattlePassData();if(!K)return void X.VyI.log("Battle pass track was unable to retrieve quest data for the current battle pass.",X.$bb.Error);const z=this.getInjectedValue(ms.XU.ItemTierNumber),Y=K.getTierData(z);if(!Y)return void X.VyI.log(`Battle pass track was unable to retrieve tier data for tier ${z}.`,X.$bb.Error);const Q=_t().chain([Y.topPremiumReward,Y.bottomPremiumReward]).reject((q=>q.claimable||q.claimed)).sortBy((q=>q.membershipTier)).value();if(Xs.D.isFeatureEnabled())this._levelUpMemberVisuals.active=!1,this._ultimateMemberVisuals.active=!1,this._ultraMemberVisuals.active=!0;else{const q=_t().last(Q).membershipTier!==Vs._$.MemberLevelUp;this._levelUpMemberVisuals.active=!q,this._ultimateMemberVisuals.active=q,this._ultraMemberVisuals.active=!1}Q.length>=2?yield Promise.all([this.setUpItemCard(this._leftPremiumItemCard,Q[0]),this.setUpItemCard(this._rightPremiumItemCard,Q[1])]):1===Q.length?yield this.setUpItemCard(this._midPremiumItemCard,Q[0]):X.VyI.log(`${Q.length} rewards were eligible to display`,X.$bb.Error)}))}setUpItemCard(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=yield this._prefabLoader.loadWithDependenciesFromGUID(Gt.l.BattlePassLargeItemCard);z.parent=q,yield z.findComponentInChildren(Ws).setUp(K)}))}};(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],Js.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Js.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Js.prototype,"_midPremiumItemCard",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Js.prototype,"_leftPremiumItemCard",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Js.prototype,"_rightPremiumItemCard",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Js.prototype,"_levelUpMemberVisuals",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Js.prototype,"_ultimateMemberVisuals",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Js.prototype,"_ultraMemberVisuals",void 0),Js=(0,Q.Cg)([(0,X.EVk)("BattlePassMembershipModal",et.Y.battlePass)],Js);var tn=z(68834),en=z(53151),sn=z(94566),nn=z(69698);let an=class extends X.uAl{postCreate(){super.postCreate(),this._closeCallback=this.getInjectedValue(ms.XU.CloseCallback),this._homeTabToggle.onSelected.add(this.loadScreen,this,0,tn.H2.Home),this._rewardsTabToggle.onSelected.add(this.loadScreen,this,0,tn.H2.Rewards),this._questsTabToggle.onSelected.add(this.loadScreen,this,0,tn.H2.Quests),this._battlePassQuestManager.getCurrentBattlePassData().then((q=>{const K=this.getInjectedValue(ms.XU.FocusTabOverride);q?K?this.openScreenAndSwitchTab(K):en.h.isFeatureEnabled()?this.openScreenAndSwitchTab(tn.H2.Rewards):q.hasMadeQuestProgress()?this.openScreenAndSwitchTab(tn.H2.Quests):this.openScreenAndSwitchTab(tn.H2.Home):(this.openScreenAndSwitchTab(tn.H2.Rewards),this._homeTabToggle.GameObject.active=!1,this._questsTabToggle.GameObject.active=!1)})).catch(X.RQr.createHandler("BattlePassMenuBarControllerComponent: Error setting default tab state"))}loadScreen(q){(()=>(0,Q.sH)(this,void 0,void 0,(function*(){let K;switch(this._loadingScreen.active=!0,this._inputBlocker.active=!0,this._screenContainer.children.forEach((q=>{q.destroy()})),this._screenContainer.children.length=0,q){case tn.H2.Home:K=yield this.openHomeScreen();break;case tn.H2.Rewards:K=yield this.openRewardsScreen();break;case tn.H2.Quests:yield this.openQuestsScreen()}if(K){const q=K.transform;q.setPivot(.5,.5),q.setAnchorMin(0,0),q.setAnchorMax(0,0)}this._loadingScreen.active=!1,this._inputBlocker.active=!1,this.sendTabSegmentEvent(q)})))().catch(X.RQr.createHandler("Error loading a screen in the battle pass menu"))}openHomeScreen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._battlePassQuestManager.getCurrentBattlePassData();if(!q)return null;const K=q.getEndDate()-this._timeManager.getServerTimeMs();return Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.BattlePassHomeScreen,{[ms.n7.TimeRemainingMs]:K,[ms.XU.MenuBarQuestsTabOpenCallback]:this.openScreenAndSwitchTab.bind(this,tn.H2.Quests),[ms.XU.DestroyBattlePassMenuCallback]:this.destroyBattlePassMenu.bind(this),[ms.XU.CloseCallback]:this._closeCallback.bind(this)},this._screenContainer)}))}openRewardsScreen(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;const Q=yield this._battlePassQuestManager.getCurrentBattlePassData(),Z=Q?Q.getEndDate()-this._timeManager.getServerTimeMs():0,J={[ms.n7.TimeRemainingMs]:Z,[ms.XU.PremiumTrackIconAtlasGuid]:null==Q?void 0:Q.getPremiumTrackIconAtlasGuid(),[ms.XU.PremiumTrackIconFrameName]:null==Q?void 0:Q.getPremiumTrackIconFrameName(),[ms.XU.PremiumTrackName]:null==Q?void 0:Q.getPremiumTrackName()};if(X.Aq$.isDefined(Q)){const Z=null==Q?void 0:Q.getChasePetsUltimate(),tt=null==Q?void 0:Q.getChasePrizes(),et=null!==(K=null===(q=Z[0])||void 0===q?void 0:q.id)&&void 0!==K?K:null===(z=tt[0])||void 0===z?void 0:z.id,it=null===(Y=Z[1])||void 0===Y?void 0:Y.id;X.Aq$.isDefined(et)&&(J[ms.XU.MythicGuid]=vs.Q[`Spine_pet_${et}_json`]),X.Aq$.isDefined(it)&&(J[ms.XU.UltimateMemberPetGuid]=vs.Q[`Spine_pet_${it}_json`])}const tt=Xs.D.isFeatureEnabled()?Gt.l.BattlePassThreeTierRewardsScreen:Gt.l.BattlePassRewardsScreen;return Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,tt,J,this._screenContainer)}))}openQuestsScreen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._battlePassQuestManager.getCurrentBattlePassData();if(!q)return;const K=q.getEndDate()-this._timeManager.getServerTimeMs(),z=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.BattlePassQuestsScreen,{[ms.n7.TimeRemainingMs]:K,[ms.XU.MenuBarRewardTabOpenCallback]:this.openScreenAndSwitchTab.bind(this,tn.H2.Rewards),[ms.XU.DestroyBattlePassMenuCallback]:this.destroyBattlePassMenu.bind(this),[ms.XU.CloseCallback]:this._closeCallback.bind(this)});this._screenContainer.addChild(z)}))}openScreenAndSwitchTab(q){this.loadScreen(q),this._menuTabToggleGroup.setItemSelected(this._homeTabToggle,q===tn.H2.Home),this._menuTabToggleGroup.setItemSelected(this._rewardsTabToggle,q===tn.H2.Rewards),this._menuTabToggleGroup.setItemSelected(this._questsTabToggle,q===tn.H2.Quests)}sendTabSegmentEvent(q){this._segment.featureCommon.sendTabEvent({tabName:`treasure_track_${q}_tab`,interfaceName:ws.B.BattlePassMenu,interfaceType:wi.Wm.BattlePass})}closeBattlePassMenu(){var q;null===(q=this._closeCallback)||void 0===q||q.call(this),this.gameObject.destroyDeferred()}destroyBattlePassMenu(){this.gameObject.destroyRootDeferred()}};(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],an.prototype,"_homeTabToggle",void 0),(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],an.prototype,"_rewardsTabToggle",void 0),(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],an.prototype,"_questsTabToggle",void 0),(0,Q.Cg)([(0,X.MnK)(sn.O),(0,Q.Sn)("design:type",sn.O)],an.prototype,"_menuTabToggleGroup",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],an.prototype,"_loadingScreen",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],an.prototype,"_screenContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],an.prototype,"_inputBlocker",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],an.prototype,"_battlePassQuestManager",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],an.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("0f2-d6bd"),(0,Q.Sn)("design:type",nn.V)],an.prototype,"_timeManager",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],an.prototype,"_segment",void 0),an=(0,Q.Cg)([(0,X.EVk)("BattlePassMenuBarController",et.Y.battlePass)],an);let rn=class extends X.uAl{constructor(){super(...arguments),this.onBattlePassActive=new X.HN0,this.onNoBattlePassActive=new X.HN0,this.onUnclaimedRewardCountChanged=new X.HN0,this.onUnclaimedQuestCountChanged=new X.HN0,this.onUnclaimedRewardAndQuestCountChanged=new X.HN0,this.onBattlePassDataChanged=new X.HN0,this.onSlowServerRequest=new X.HN0,this.onAllSlowServerRequestsCompleted=new X.HN0,this._hasBattlePassActiveOffSeason=!0}create(){super.create(),this.handleQuestDataChange(),this._battlePassQuestManager.onDataChanged.add(this.handleQuestDataChange,this),this._battlePassQuestManager.onSlowServerRequest.add(this.handleSlowServerRequest,this),this._battlePassQuestManager.onAllSlowServerRequestsCompleted.add(this.handleSlowServerRequestsCompleted,this),this._hasBattlePassActiveOffSeason=Xs.D.isFeatureEnabled()}destroy(){this.onBattlePassActive.dispose(),this.onNoBattlePassActive.dispose(),this.onUnclaimedRewardCountChanged.dispose(),this.onUnclaimedQuestCountChanged.dispose(),this.onUnclaimedRewardAndQuestCountChanged.dispose(),this.onBattlePassDataChanged.dispose(),this.onSlowServerRequest.dispose(),this.onAllSlowServerRequestsCompleted.dispose(),this._battlePassQuestManager.onDataChanged.remove(this.handleQuestDataChange,this),this._battlePassQuestManager.onSlowServerRequest.remove(this.handleSlowServerRequest,this),this._battlePassQuestManager.onAllSlowServerRequestsCompleted.remove(this.handleSlowServerRequestsCompleted,this),this._battlePassQuestManager.hudButton===this.gameObject&&(this._battlePassQuestManager.hudButton=null),super.destroy()}handleQuestDataChange(){this._battlePassQuestManager.getCurrentBattlePassData().then((q=>{if(!q&&!this._hasBattlePassActiveOffSeason)return this.onNoBattlePassActive.dispatch(),void(this._previousActiveStatus=!1);if(!0!==this._previousActiveStatus&&(this.onBattlePassActive.dispatch(),this._previousActiveStatus=!0),!q)return;this.onBattlePassDataChanged.dispatch();const K=this._unclaimedRewardCount!==q.getNumUnclaimedRewards(),z=this._unclaimedQuestCount!==q.getUnclaimedQuestCount();if(this._unclaimedRewardCount=q.getNumUnclaimedRewards(),this._unclaimedQuestCount=q.getUnclaimedQuestCount(),K&&this.onUnclaimedRewardCountChanged.dispatch(this._unclaimedRewardCount>0,this._unclaimedRewardCount),z&&this.onUnclaimedQuestCountChanged.dispatch(this._unclaimedQuestCount>0,this._unclaimedQuestCount),K||z&&!en.h.isFeatureEnabled()){let q=this._unclaimedRewardCount;en.h.isFeatureEnabled()||(q+=this._unclaimedQuestCount),this.onUnclaimedRewardAndQuestCountChanged.dispatch(q>0,q)}})).catch(X.RQr.createHandler("BattlePassQuestDataComponent::handleQuestDataChange Failed to get battle pass quest data"))}handleSlowServerRequest(){this.onSlowServerRequest.dispatch()}handleSlowServerRequestsCompleted(){this.onAllSlowServerRequestsCompleted.dispatch()}sendFtueViewedEvent(){this._battlePassQuestManager.sendFtueViewedEvent().catch(X.RQr.createHandler("BattlePassQuestDataComponent: Failed to send battle pass FTUE viewed event"))}setGameObjectAsHudButton(){this._battlePassQuestManager.hudButton=this.gameObject}};(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],rn.prototype,"_battlePassQuestManager",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rn.prototype,"onBattlePassActive",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rn.prototype,"onNoBattlePassActive",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rn.prototype,"onUnclaimedRewardCountChanged",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rn.prototype,"onUnclaimedQuestCountChanged",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rn.prototype,"onUnclaimedRewardAndQuestCountChanged",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rn.prototype,"onBattlePassDataChanged",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rn.prototype,"onSlowServerRequest",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rn.prototype,"onAllSlowServerRequestsCompleted",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],rn.prototype,"_hasBattlePassActiveOffSeason",void 0),rn=(0,Q.Cg)([(0,X.EVk)("BattlePassQuestData",et.Y.battlePass)],rn);var on=z(99246);let hn=class extends on.I{constructor(){super(...arguments),this.interfaceName=void 0,this.getInstanceIdFromInterface=!1}getPropertiesObject(){let q=this.instanceId;this.getInstanceIdFromInterface&&this.interfaceName&&(q=this._segment.featureCommon.getCurrentInterfaceID(this.interfaceName));return{buttonName:this.buttonName,destinationName:this.destinationName,elementType:this._elementType,elementID:this.elementId,interfaceName:this.interfaceName,interfaceType:this._interfaceType,saveClickInfo:this.saveClickInfo,instanceId:q,instanceType:this.instanceType}}};(0,Q.Cg)([(0,Qi.b)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],hn.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],hn.prototype,"buttonName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],hn.prototype,"destinationName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],hn.prototype,"elementId",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],hn.prototype,"_elementType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],hn.prototype,"interfaceName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],hn.prototype,"_interfaceType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],hn.prototype,"saveClickInfo",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],hn.prototype,"getInstanceIdFromInterface",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],hn.prototype,"instanceId",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],hn.prototype,"instanceType",void 0),hn=(0,Q.Cg)([(0,X.EVk)("SegmentButtonPropertiesProvider",et.Y.analytics)],hn);class cn extends X.uFJ{constructor(){super(...arguments),this.totalLifetime=3,this.burstTime=.4,this.lingerTime=2.4}update(q,K){const z=this.totalLifetime-q.life;if(zdt.q.instance.prodigy.game.time.events.remove(q)))}const K=new X.Qgu,z=new X.mYY;z.point1.setTo(this._linePoint1.x,this._linePoint1.y),z.point2.setTo(this._linePoint2.x,this._linePoint2.y);const Y=new dn(this.totalAnimationTime,this._maxBurstSpeed),Q=new cn,Z=this.GameObject.transform.worldMatrix.applyInverse(this.particleTargetDirection.transform.worldPosition);Q.endLocationX=Z.x,Q.endLocationY=Z.y,Q.totalLifetime=this.totalAnimationTime,Q.burstTime=this._burstTime,Q.lingerTime=this._lingerTime,dt.q.instance.prodigy.load.assets([As.q.Xp_stardust],(()=>{K.imageGuid=this._source,this._frame&&(K.frame=this._frame),this._particleSystem=this.gameObject.addComponent(X.okU),this._particleSystem.emitPerSecond.setMinMax(this._particlePerSecond,this._particlePerSecond),this._particleSystem.initializers=[K,z,Y],this._particleSystem.behaviours=[Q],this._particleSystem.worldSpace=!0,this._particleSystem.emit(this._totalParticles),this._particleSystem.emitPerSecond.setMinMax(1e-5,1e-5),this.onStartParticles.dispatch()}))}stopParticles(){this._particleSystem&&(this._particleSystem.destroy(),this._particleSystem=null,this.onStopParticles.dispatch())}destroy(){this.stopParticles(),this.onStartParticles.dispose(),this.onStopParticles.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ln.prototype,"particleTargetDirection",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ln.prototype,"_source",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ln.prototype,"_frame",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ln.prototype,"_particlePerSecond",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],ln.prototype,"_linePoint1",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],ln.prototype,"_linePoint2",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ln.prototype,"_autoRun",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ln.prototype,"onStartParticles",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ln.prototype,"onStopParticles",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ln.prototype,"_totalParticles",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ln.prototype,"totalAnimationTime",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ln.prototype,"_burstTime",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ln.prototype,"_lingerTime",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ln.prototype,"_maxBurstSpeed",void 0),ln=(0,Q.Cg)([(0,X.EVk)("ParticleBurstAndZip",et.Y.animation)],ln);var un=z(47255);let fn=class extends X.uAl{constructor(){super(...arguments),this.SINGLE_REWARD_QUEST_HEIGHT=124,this.DOUBLE_REWARD_QUEST_HEIGHT=154,this.MAGICOIN_ANIM_SPINE="magicoin",this.MAGICOIN_ICON_SIZE_DELTA=52,this.XP_ICON_FRAME_NAME="xp-icon-80x80",this.XP_ANIM_SPINE="treasure-token-burst",this.XP_ICON_SIZE_DELTA=33}create(){super.create(),this._closeCallback=this.getInjectedValue(ms.XU.CloseCallback),this._destroyBattlePassMenuCallback=this.getInjectedValue(ms.XU.DestroyBattlePassMenuCallback)}setup(q,K){K&&(this._particleAnimation.particleTargetDirection=K);const z=X.Aq$.isDefined(q.comingSoonDate),Y=q.questType;this.goButton.GameObject.active=!1,this._questCompleteIcon.active=!1,this._questData=q,this._questType.text=this._baseLocalizer.getText(tn.IC[Y]),this._questTypeComingSoon.text=this._baseLocalizer.getText(tn.IC[Y]),this._questDescription.text=q.questDescription,this._lockedIcon.active=z,this._questTypeContainer.active=!z,this._questTypeContainerComingSoon.active=z,this.setupClaimButton(q.reward),!q.questGoButtonAction||q.reward.claimable||q.reward.claimed||q.comingSoonDate||this.setupGoButton(q.questGoButtonAction);if(!q.reward.itemDrop||!q.reward.battlePassXp?this.setupSingleReward(q.reward,z):this.setupDoubleReward(q.reward,z),q.reward.claimed)this._completeProgressBarState.applyStateToProgressBar(this._progressBar,1),this._questCompleteIcon.active=!0;else if(q.reward.claimable)this._claimableProgressBarState.applyStateToProgressBar(this._progressBar,1);else if(z)this._progressBar.setValue(1),this._comingSoonProgressBarState.applyStateToProgressBar(this._progressBar,1);else{const K=q.currentProgress/q.targetProgress,z=`${q.currentProgress} / ${q.targetProgress}`;this._normalProgressBarState.applyStateToProgressBar(this._progressBar,K,z)}this._memberIcon.active=q.isMemberQuest}setupGoButton(q){let K,z;switch(q){case tn.Nz.EvolvePet:K=()=>{dt.q.instance.prodigy.open.pets(this._closeCallback),this._destroyBattlePassMenuCallback()},z=ws.B.PetsWindow;break;case tn.Nz.BecomeAMember:K=()=>{const q={conversionFunnelName:un.o.FunnelBattlePassMemberUnlock};dt.q.instance.prodigy.open.membershipInfo(this._closeCallback,q,"member-button"),this._destroyBattlePassMenuCallback()},z=ws.B.KidsMlpModalNonMember}K&&(this._goButtonSegmentProperties.destinationName=z,this.goButton.GameObject.active=!0,this.goButton.onClick.addOnce(K,this))}updateQuestData(){this._questManager.getCurrentBattlePassData().then((q=>{var K;const z=q.getQuestById(null===(K=this._questData)||void 0===K?void 0:K.goalTaskId);z&&!yt.isEqual(this._questData,z)&&this.setup(z)})).catch(X.RQr.createHandler("BattlePassQuestGoalComponent::updateQuestData Failed to update battle pass quest data"))}setupSingleReward(q,K){this.gameObject.transform.fullHeight=this.SINGLE_REWARD_QUEST_HEIGHT,q.itemDrop?this.isMagicoinReward(q)?this.setUpMagicoinReward(q.itemDrop):this.setUpItemCard(q).catch(X.RQr.createHandler("Failed to set up a single reward item card for a battle pass quest goal")):this.setUpXpReward(q),this._doubleRewardContainer.active=!1,this._singleBackground.active=!K,this._singleBackgroundComingSoon.active=K}setupDoubleReward(q,K){this.gameObject.transform.fullHeight=this.DOUBLE_REWARD_QUEST_HEIGHT,q.itemDrop&&(this.isMagicoinReward(q)?this.setUpMagicoinReward(q.itemDrop):this.setUpItemCard(q).catch(X.RQr.createHandler("Failed to set up a single reward item card for a battle pass quest goal"))),this._secondaryRewardText.text=`+${q.battlePassXp}`,this._singleBackground.active=!1,this._singleBackgroundComingSoon.active=!1,this._doubleRewardContainer.active=!0,this._doubleBackground.active=!K,this._doubleBackgroundComingSoon.active=K}setUpItemCard(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=yield this._prefabLoader.loadWithDependenciesFromGUID(Gt.l.BattlePassItemCard);K.parent=this._primaryRewardAnchor,this._primaryRewardContainer.active=!1;const z=K.findComponent(Ws);yield z.setUp(q)}))}isMagicoinReward(q){var K,z;return"currency"===(null===(K=q.itemDrop)||void 0===K?void 0:K.type)&&27===(null===(z=q.itemDrop)||void 0===z?void 0:z.ID)}setUpMagicoinReward(q){this._primaryRewardText.text=`+${q.N}`,this._primaryRewardIcon.updateAsset(As.q.Icon_currency_27);const K=this._primaryRewardIcon.GameObject.findComponent(X.XVE);K.setSizeDelta(this.MAGICOIN_ICON_SIZE_DELTA,this.MAGICOIN_ICON_SIZE_DELTA),K.setPositionY(-10)}setUpXpReward(q){this._primaryRewardText.text=`+${q.battlePassXp}`,this._primaryRewardIcon.updateAsset(ti._.Ui_battle_pass_json,this.XP_ICON_FRAME_NAME);const K=this._primaryRewardIcon.GameObject.findComponent(X.XVE);K.setSizeDelta(this.XP_ICON_SIZE_DELTA,this.XP_ICON_SIZE_DELTA),K.setPositionY(-10)}setupClaimButton(q){var K;this.claimButton.GameObject.active=q.claimable,null===(K=this.claimButton.onClick)||void 0===K||K.removeAll(),q.claimable&&(this.claimButton.inputEnabled=!0,this.claimButton.onClick.add((()=>{this.claimButton.inputEnabled=!1,this.claimButton.onClick.removeAll(),this.isMagicoinReward(q)?this._claimAnimationSpineAnimator.playAnimation(this.MAGICOIN_ANIM_SPINE,!1):this._claimAnimationSpineAnimator.playAnimation(this.XP_ANIM_SPINE,!1),this.runParticleTrail(q),this._questManager.sendRewardClaimedEvent(q.rewardId).catch(X.RQr.createHandler(`Failed to claim battle pass reward ${q.rewardId}`)),this._segment.battlePass.generateRewardClaimedTransactionId(),this._segment.featureCommon.sendButtonEvent({buttonName:Us.k.BattlePassClaimQuestButton,interfaceName:ws.B.BattlePassMenu,interfaceType:wi.Wm.BattlePass,transactionId:this._segment.battlePass.rewardClaimedTransactionId})})))}runParticleTrail(q){q.battlePassXp&&(this._particleAnimation.run(),this._particleAnimation.onStartParticles.add((()=>{window.setTimeout((()=>{this._particleAnimation.stopParticles()}),1e3*this._particleAnimation.totalAnimationTime)})))}destroy(){this.claimButton.onClick.removeAll(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],fn.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],fn.prototype,"_questType",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],fn.prototype,"_questTypeComingSoon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_questTypeContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_questTypeContainerComingSoon",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],fn.prototype,"_questDescription",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],fn.prototype,"goButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],fn.prototype,"claimButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_doubleRewardContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_singleBackground",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_singleBackgroundComingSoon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_doubleBackground",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_doubleBackgroundComingSoon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_primaryRewardContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_primaryRewardAnchor",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],fn.prototype,"_primaryRewardIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],fn.prototype,"_primaryRewardText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],fn.prototype,"_secondaryRewardText",void 0),(0,Q.Cg)([(0,X.MnK)(Ds.z),(0,Q.Sn)("design:type",Ds.z)],fn.prototype,"_progressBar",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_memberIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_lockedIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],fn.prototype,"_questCompleteIcon",void 0),(0,Q.Cg)([(0,X.MnK)(Rs),(0,Q.Sn)("design:type",Rs)],fn.prototype,"_normalProgressBarState",void 0),(0,Q.Cg)([(0,X.MnK)(Rs),(0,Q.Sn)("design:type",Rs)],fn.prototype,"_claimableProgressBarState",void 0),(0,Q.Cg)([(0,X.MnK)(Rs),(0,Q.Sn)("design:type",Rs)],fn.prototype,"_completeProgressBarState",void 0),(0,Q.Cg)([(0,X.MnK)(Rs),(0,Q.Sn)("design:type",Rs)],fn.prototype,"_comingSoonProgressBarState",void 0),(0,Q.Cg)([(0,X.MnK)(ln),(0,Q.Sn)("design:type",ln)],fn.prototype,"_particleAnimation",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],fn.prototype,"_claimAnimationSpineAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(hn),(0,Q.Sn)("design:type",hn)],fn.prototype,"_goButtonSegmentProperties",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],fn.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],fn.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],fn.prototype,"_baseLocalizer",void 0),fn=(0,Q.Cg)([(0,X.EVk)("BattlePassQuestGoal",et.Y.battlePass)],fn);let bn=class extends X.uAl{constructor(){super(...arguments),this._whiteXpIconTweenDuration=2,this._progressBarTweenInProgress=!1,this._hasBeenCreated=!1}postCreate(){super.postCreate(),this._goToRewardsCallback=this.getInjectedValue(ms.XU.MenuBarRewardTabOpenCallback),this.setUp().catch(X.RQr.createHandler("Error setting up the battle pass reward tracker on the quests screen")),this._hasBeenCreated=!0}setUp(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._questManager.getCurrentBattlePassData(),K=yield this._questManager.getBattlePassXpData(q.getXpId());this.setUpRewardDisplay(q,K).catch(X.RQr.createHandler("BattlePassQuestRewardTrackerComponent: Error setting up the reward display"))}))}updateQuestData(){!this._progressBarTweenInProgress&&this._hasBeenCreated&&this.setUp().catch(X.RQr.createHandler("Error queuing up the next quest data update for the quest tracker progress bar of the treasure track"))}destroy(){this._whiteXpIconTween&&dt.q.instance.game.tweens.remove(this._whiteXpIconTween),this._goToRewards.onClick.removeAll(),this._progressBar.onProgress.removeAll(),this._progressBar.onTweenValueComplete.removeAll(),super.destroy()}setUpRewardDisplay(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=q.getCurrentTier(),Y=q.getAllTierData(),Q=q.getTierData(z);if(!this._cachedTierData)return this.setTitleText(Q),this._progressBar.setFromValues(Q.currentProgress,Q.targetProgress),this.setUpTopGroup(q),Q.isInfiniteTier?(this._topPremiumRewardItemCard.GameObject.active=!1,this._freeRewardItemCard.GameObject.active=!1,this._bottomPremiumRewardItemCard.setUp(Q.freeReward).catch(X.RQr.createHandler("Error setting up the infinite tier reward item card in the reward tracker of the treasure track"))):(this._topPremiumRewardItemCard.setUp(Q.topPremiumReward).catch(X.RQr.createHandler("Error setting up the top premium reward item card in the reward tracker of the treasure track")),this._bottomPremiumRewardItemCard.setUp(Q.bottomPremiumReward).catch(X.RQr.createHandler("Error setting up the bottom premium reward item card in the reward tracker of the treasure track")),this._freeRewardItemCard.setUp(Q.freeReward).catch(X.RQr.createHandler("Error setting up the free reward item card in the reward tracker of the treasure track"))),this._cachedTierData=Q,void(this._previousXpData=K);const Z=K.total-this._previousXpData.total;this._previousXpData=K,Z>0?(this.tweenWhiteXpIcon(),yield this.tweenProgressBar(Y,this._cachedTierData.tier-1,Z,this._cachedTierData.currentProgress)):this.setUpTopGroup(q)}))}tweenProgressBar(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){this._progressBarTweenInProgress=!0;const Z=q[K],J=Z.targetProgress;if(this._progressBar.onProgress.removeAll(),this._progressBar.onProgress.add(((q,K,z)=>{const Y=Math.ceil(z*J);this._progressBar.setBarText(`${Y} / ${J}`)})),z>=J-Y)this._progressBar.tweenValue(1),this._progressBar.onTweenValueComplete.addOnce((()=>{(()=>(0,Q.sH)(this,void 0,void 0,(function*(){const Q=Math.min(K+1,q.length-1);yield this.onProgressBarFilled(q[Q]),yield this.tweenProgressBar(q,Q,z-(J-Y),0)})))().catch(X.RQr.createHandler("Error tweening the progress bar for the reward tracker in the quests screen of the treasure track"))}),this);else{const q=Y+z;this._progressBar.tweenValue(q/J),this._progressBar.onTweenValueComplete.addOnce((()=>{this._progressBar.setBarText(`${q} / ${J}`),this._cachedTierData=Z,this._progressBarTweenInProgress=!1,this.setUp().catch(X.RQr.createHandler("Error queuing up the next progress bar update for the reward tracker in the quests screen of the treasure track"))}),this)}}))}onProgressBarFilled(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=[];q.isInfiniteTier?(this._topPremiumRewardItemCard.GameObject.active=!1,this._freeRewardItemCard.GameObject.active=!1,K.push(this._bottomPremiumRewardItemCard.setUp(q.freeReward))):(K.push(this._topPremiumRewardItemCard.setUp(q.topPremiumReward)),K.push(this._bottomPremiumRewardItemCard.setUp(q.bottomPremiumReward)),K.push(this._freeRewardItemCard.setUp(q.freeReward))),this.setTitleText(q),this._progressBar.setValue(0),this._progressBar.setBarText(`0 / ${q.targetProgress}`),yield Promise.all(K)}))}setUpTopGroup(q){const K=q.getNumUnclaimedRewards()>0;this._topGroupReadyToClaim.active=K,this._topGroupRegular.active=!K,this._goToRewards.onClick.add(this._goToRewardsCallback.bind(this))}tweenWhiteXpIcon(){if(this._whiteXpIconTween)return;const q={progress:0};this._whiteXpIconTween=dt.q.instance.prodigy.game.add.tween(q,this).to({progress:1},1e3*this._whiteXpIconTweenDuration,X.GS3.Linear.None,!1),this._whiteXpIconTween.onUpdate.add((()=>{let K;K=q.progress<=.5?X.cj9.inverseLerp(0,.5,q.progress):X.cj9.inverseLerp(1,.5,q.progress),this._whiteXpIcon.alpha=K})),this._whiteXpIconTween.onTweenComplete.add((()=>{this._whiteXpIcon.GameObject.active=!1,dt.q.instance.game.tweens.remove(this._whiteXpIconTween),this._whiteXpIconTween=null})),this._whiteXpIcon.alpha=0,this._whiteXpIcon.GameObject.active=!0,this._whiteXpIconTween.start()}setTitleText(q){this._treasureTitle.text=q.isInfiniteTier?(0,Is.k)("TT_INFINITE_TREASURE"):(0,Is.k)("TT_TREASURE_N",q.tier.toString())}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],bn.prototype,"_treasureTitle",void 0),(0,Q.Cg)([(0,X.MnK)(Ds.z),(0,Q.Sn)("design:type",Ds.z)],bn.prototype,"_progressBar",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],bn.prototype,"particleEndLocation",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],bn.prototype,"_whiteXpIcon",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],bn.prototype,"_whiteXpIconTweenDuration",void 0),(0,Q.Cg)([(0,X.MnK)(Ws),(0,Q.Sn)("design:type",Ws)],bn.prototype,"_topPremiumRewardItemCard",void 0),(0,Q.Cg)([(0,X.MnK)(Ws),(0,Q.Sn)("design:type",Ws)],bn.prototype,"_bottomPremiumRewardItemCard",void 0),(0,Q.Cg)([(0,X.MnK)(Ws),(0,Q.Sn)("design:type",Ws)],bn.prototype,"_freeRewardItemCard",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],bn.prototype,"_topGroupReadyToClaim",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],bn.prototype,"_topGroupRegular",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],bn.prototype,"_goToRewards",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],bn.prototype,"_questManager",void 0),bn=(0,Q.Cg)([(0,X.EVk)("BattlePassQuestRewardTracker",et.Y.battlePass)],bn);let pn=class extends X.uAl{constructor(){super(...arguments),this._questTabs=[]}postCreate(){super.postCreate(),this._closeCallback=this.getInjectedValue(ms.XU.CloseCallback),this._destroyBattlePassMenuCallback=this.getInjectedValue(ms.XU.DestroyBattlePassMenuCallback),this.setUpPanelImage().catch(X.RQr.createHandler("BattlePassQuestScreenControllerComponent: Failed to set up panel image")),this._battlePassQuestManager.getCurrentBattlePassData().then((q=>{const K=q.getQuestTypes(),z=K.map((q=>{const K=tn.IC[q];if(!K)return q;const z=this._baseLocalizer.getText(K);return null!=z?z:q}));for(let Y=0;Y{this.populateQuests(K[Y]).catch(X.RQr.createHandler(`Unable to populate quests for the ${K[Y]} tab.`))}),this)}else q.active=!1}this.populateQuests(K[0]).catch(X.RQr.createHandler("Error populating quests in the battle pass quest screen controller component"))})).catch(X.RQr.createHandler("Error retrieving battle pass data for the battle pass quests screen"))}destroy(){var q;if(this._prefabLoadCancelablePromises)for(let K=0;K{const z=q=>{if(q.reward.claimable)return Number.MAX_VALUE;if(q.reward.claimed)return-Number.MAX_VALUE;if(q.sortPriority)return q.sortPriority;return q.currentProgress/q.targetProgress*100};return z(K)-z(q)})),Y=this._questGridLayout,X=[];for(let q=0;q(0,Q.sH)(this,void 0,void 0,(function*(){const K=Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.BattlePassQuestsComingSoonBanner,{[ms.n7.TimeRemainingMs]:q});this._prefabLoadCancelablePromises[0]=K,this._questGoalGameObjects[0]=yield K,this._questGoalGameObjects[0].name="QuestGoal-Banner"})))())}for(let q=0;q(0,Q.sH)(this,void 0,void 0,(function*(){const K=z[q];if(!this._questGoalGameObjects[q+1]){const z=Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.BattlePassQuest,{[ms.XU.QuestDescription]:K.questDescription,[ms.XU.QuestType]:K.questType,[ms.XU.CloseCallback]:this._closeCallback.bind(this),[ms.XU.DestroyBattlePassMenuCallback]:this._destroyBattlePassMenuCallback.bind(this)});this._prefabLoadCancelablePromises[q+1]=z,this._questGoalGameObjects[q+1]=yield z,this._questGoalGameObjects[q+1].name=`QuestGoal-${q+1}`}const Y=this._questGoalGameObjects[q+1].findComponent(fn);null==Y||Y.setup(K,this._rewardTracker.particleEndLocation)})))());yield Promise.all(X),J&&(this._questGoalGameObjects[0].active=!0,Y.GameObject.addChild(this._questGoalGameObjects[0]));for(let q=1;q{dt.q.instance.prodigy.open.itemInfo(Y)}));K||(this._cardOnClickButton.useHandCursor=!0);const J=this.getInjectedValue(ms.XU.RewardClaimedAnimationName),tt=this.getInjectedValue(ms.XU.RewardMovementAnimationName),et=this.getInjectedValue(ms.XU.ItemTierNumber);this._claimedMovementAnimator.GameObject.active=!0,this._cardOnClickButton.onClick.add((()=>{if(q){this._cardOnClickButton.onClick.removeAll(),this._audioPlayer.play(),this._segment.battlePass.generateRewardClaimedTransactionId(),this._segment.featureCommon.sendButtonEvent({buttonName:Us.k.BattlePassClaimRewardButton,interfaceName:ws.B.BattlePassMenu,interfaceType:wi.Wm.BattlePass,transactionId:this._segment.battlePass.rewardClaimedTransactionId}),this._cardOnClickButton.useHandCursor=!1;const q=(q,K)=>{K.data.name===ks.MysteryRewardClaimSwitch&&Z&&this._iconImage.setAsset(Y.itemDrop.ID,Y.itemDrop.type).catch(X.RQr.createHandler("[BattlePassRewardsScreenItemCard] Error setting the icon asset after mystery reward claim"))};this._claimedMovementAnimator.spine.onEvent.addOnce(q,this),this._claimedMovementAnimator.OnAnimationComplete.addOnce((()=>{Z||this._claimedMovementAnimator.spine.onEvent.remove(q,this),this.onRewardClaimedComplete.dispatch()})),this.GameObject.findComponentsInChildren(vn.l).forEach((q=>{q.setup()})),this.onRewardClaimed.dispatch(),this._questManager.sendRewardClaimedEvent(Y.rewardId).then((()=>this.onRewardClaimServerComplete.dispatch())).catch(X.RQr.createHandler(`Failed to claim battle pass reward ${Y.rewardId}`)),this._claimedAnimationAnimator.playAnimation(J,!1),this._claimedMovementAnimator.playAnimation(tt,!1)}else if(K)this._cardOnClickButton.useHandCursor=!1;else if(this._currentPlayer.player.isPlayingAtSchool()){const q=this._currentPlayer.player.getMemberTier(),K=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);let z="BATTLE_PASS_SCHOOL_MODE_CLAIM_TOOLTIP",Y="";q!==Vs._$.MemberLevelUp&&q!==Vs._$.MemberCore||(z="BATTLE_PASS_SCHOOL_MODE_LEVEL_UP_CLAIM_TOOLTIP",Y=K.getText(Xs.D.isFeatureEnabled()?"MEMBERSHIP_TIER_NAME_PLUS":"MEMBERSHIP_TIER_2_SHORT_NAME")),this._autoToolTip=gn.A.displayToolTipAuto(this._autoToolTip,this._tooltipContainer,{bodyText:K.getText(z,Y),xPosition:640,yPosition:100,arrowXRelPos:.7,arrowDirection:ni.i.DOWN})}else{let q=Q?"Click-Ultimate-Item-Treasure-Track":"Click-Item-Treasure-Track";Xs.D.isFeatureEnabled()&&(q=Q?"Click-Tier-2-Item-Treasure-Track":"Click-Tier-1-Item-Battle-Pass"),dt.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:q,category:"Treasure-Track",contentId:`${Y.itemDrop.type}-${Y.itemDrop.ID}`,adType:Ys.R.BattlePassUpsell}),Xs.D.isFeatureEnabled()?dt.q.instance.prodigy.open.itemInfo(Y):dt.q.instance.prodigy.open.battlePassMembershipModal(et).catch(X.RQr.createHandler("Failed to open battle pass membership modal"))}}))}destroy(){this.onRewardClaimedComplete.dispose(),this.onRewardClaimed.dispose(),this.onRewardClaimServerComplete.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],yn.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],yn.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],yn.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],yn.prototype,"_cardOnClickButton",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],yn.prototype,"onRewardClaimedComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],yn.prototype,"onRewardClaimed",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],yn.prototype,"onRewardClaimServerComplete",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],yn.prototype,"_claimedAnimationAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],yn.prototype,"_claimedMovementAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(mn.J),(0,Q.Sn)("design:type",mn.J)],yn.prototype,"_audioPlayer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yn.prototype,"_tooltipContainer",void 0),(0,Q.Cg)([(0,X.MnK)(gs.X),(0,Q.Sn)("design:type",gs.X)],yn.prototype,"_iconImage",void 0),yn=(0,Q.Cg)([(0,X.EVk)("BattlePassRewardsScreenItemCard",et.Y.battlePass)],yn);var _n=z(223),En=z(77981),wn=z(89305),Tn=z(9475),Sn=z(1959);let An=class extends X.uAl{constructor(){super(...arguments),this.coreChaseItems=[],this.plusChaseItems=[],this.ultraChaseItems=[],this.coreGroupLabels=[],this.plusGroupLabels=[],this.ultraGroupLabels=[],this.showOtpUpsell=!1}create(){const q=Object.create(null,{create:{get:()=>super.create}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,lt,ut,ft,bt;q.create.call(this),this._battlePassQuestData=yield this._questManager.getCurrentBattlePassData();const pt={};if(this._battlePassQuestData){const q=null===(K=this._battlePassQuestData)||void 0===K?void 0:K.getThreeTierPlusAnimatedPets(),J=null===(z=this._battlePassQuestData)||void 0===z?void 0:z.getThreeTierUltraAnimatedPets(),tt=null!==(Y=null==q?void 0:q[0])&&void 0!==Y?Y:void 0,et=null!==(Q=null==J?void 0:J[0])&&void 0!==Q?Q:void 0,it=null!==(Z=null==J?void 0:J[1])&&void 0!==Z?Z:void 0;X.Aq$.isDefined(tt)&&(pt[ms.XU.LevelupMythicGuid]=vs.Q[`Spine_pet_${tt}_json`]),X.Aq$.isDefined(et)&&(pt[ms.XU.MythicGuid]=vs.Q[`Spine_pet_${et}_json`]),X.Aq$.isDefined(it)&&(pt[ms.XU.UltimateMemberPetGuid]=vs.Q[`Spine_pet_${it}_json`]),pt[ms.XU.MagicoinAmount]=Tn.S.DEFAULT_MAGICOIN_AMOUNT}else pt[ms.XU.MagicoinAmount]=Tn.S.DEFAULT_MAGICOIN_AMOUNT;Ht.d.updateInjectedValues(this.gameObject,pt);const vt=this._loggedInPlayer.player.getMemberTier(),gt=(0,Kt.G)(_n.l).enabled;let mt=!1,yt=!1,_t=!1;const Et=this.showOtpUpsell&>,wt=(0,wn.nO)(En.r.English);if(Qs.pF.eligibleForMembershipPurchaseForMultipleTiers()?vt===Vs._$.NonMember?(mt=this.coreMemberCTA&&!Et,yt=!Et,_t=!0):(mt=this.coreMemberCTA&&vt===Vs._$.MemberCore&&!Et,yt=(vt===Vs._$.MemberCore||vt===Vs._$.MemberPlus&&!wt)&&!Et,_t=!wt&&vt!==Vs._$.MemberUltra):(mt=this.coreMemberCTA&&vt===Vs._$.NonMember&&!Qs.pF.isNativeApp(),yt=vt===Vs._$.NonMember||vt===Vs._$.MemberCore),!(mt||yt||_t||Et)){const q=vt===Vs._$.MemberUltra||this.showOtpUpsell?"YOU_DONT_HAVE_ENOUGH_MAGICOIN":"MEMBER_AD_VISIT_SITE_BODY";dt.q.instance.prodigy.open.message(this._localizer.getText(q)),this.GameObject.destroyDeferred()}if(mt){const q=null!==(J=Sn.A.CHASE_PRIZES.coreChaseItems)&&void 0!==J?J:[];for(let z=0;zz){if(q[z].disable){this.coreChaseItems[z].active=!1;continue}this.coreChaseItems[z].findComponentInChildren(X.EYj).text=1===q[z].quantity?"":null!==(et=null===(tt=q[z].quantity)||void 0===tt?void 0:tt.toString())&&void 0!==et?et:"",this.coreChaseItems[z].findComponentInChildren(gs.X).setAsset(q[z].id,q[z].type).catch((q=>{X.VyI.log(`Battle pass was unable to load asset for level up chase item at index ${z}`,X.$bb.Error)}))}const K=null===(it=this._battlePassQuestData)||void 0===it?void 0:it.getThreeTierCoreLabels();for(let z=0;zz){if(q[z].disable){this.plusChaseItems[z].active=!1;continue}this.plusChaseItems[z].findComponentInChildren(X.EYj).text=1===q[z].quantity?"":null!==(rt=null===(at=q[z].quantity)||void 0===at?void 0:at.toString())&&void 0!==rt?rt:"",this.plusChaseItems[z].findComponentInChildren(gs.X).setAsset(q[z].id,q[z].type).catch((q=>{X.VyI.log(`Battle pass was unable to load asset for level up chase item at index ${z}`,X.$bb.Error)}))}const K=null===(ot=this._battlePassQuestData)||void 0===ot?void 0:ot.getThreeTierPlusLabels();for(let z=0;zz){if(q[z].disable){this.ultraChaseItems[z].active=!1;continue}this.ultraChaseItems[z].findComponentInChildren(X.EYj).text=1===q[z].quantity?"":null!==(ut=null===(lt=q[z].quantity)||void 0===lt?void 0:lt.toString())&&void 0!==ut?ut:"",this.ultraChaseItems[z].findComponentInChildren(gs.X).setAsset(q[z].id,q[z].type).catch((q=>{X.VyI.log(`Battle pass was unable to load asset for ultimate chase item at index ${z}`,X.$bb.Error)}))}const K=null===(ft=this._battlePassQuestData)||void 0===ft?void 0:ft.getThreeTierUltraLabels();for(let z=0;z1&&(ht[`${tt.ChaseItemUltraQuantityPrefix}${X}`]=ot[X].quantity),ht[`${tt.ChaseItemUltraPrefix}${X}`]=[ot[X].id,ot[X].type];const ct=null!==(Q=null==J?void 0:J.getThreeTierPlusChaseItems())&&void 0!==Q?Q:Sn.A.CHASE_PRIZES.plusChaseItems,dt={};for(let X=0;X1&&(dt[`${tt.ChaseItemPlusQuantityPrefix}${X}`]=ct[X].quantity),dt[`${tt.ChaseItemPlusPrefix}${X}`]=[ct[X].id,ct[X].type];const lt=null!==(Z=null==J?void 0:J.getThreeTierCoreChaseItems())&&void 0!==Z?Z:Sn.A.CHASE_PRIZES.coreChaseItems,ut={};for(let X=0;X1&&(ut[`${tt.ChaseItemCoreQuantityPrefix}${X}`]=lt[X].quantity),ut[`${tt.ChaseItemCorePrefix}${X}`]=[lt[X].id,lt[X].type];const ft=null==J?void 0:J.getThreeTierCoreLabels(),bt=null==J?void 0:J.getThreeTierPlusLabels(),pt=null==J?void 0:J.getThreeTierUltraLabels(),vt=Object.assign(Object.assign(Object.assign({},ft.reduce(((q,K,z)=>Object.assign(Object.assign({},q),{[`${tt.ChaseItemCoreTextPrefix}${z}`]:K})),{})),bt.reduce(((q,K,z)=>Object.assign(Object.assign({},q),{[`${tt.ChaseItemPlusTextPrefix}${z}`]:K})),{})),pt.reduce(((q,K,z)=>Object.assign(Object.assign({},q),{[`${tt.ChaseItemUltraTextPrefix}${z}`]:K})),{})),gt=this._loggedInPlayer.player.getMemberTier(),mt={[tt.IsPlayerCoreMember]:gt===Vs._$.MemberCore,[tt.IsPlayerPlusMember]:gt===Vs._$.MemberPlus,[tt.IsPlayerUltraMember]:gt===Vs._$.MemberUltra,[tt.ShowCorePanel]:Vs._$.NonMember||gt===Vs._$.MemberCore,[tt.ShowCoreCta]:gt===Vs._$.NonMember,[tt.ShowPlusPanel]:gt!==Vs._$.MemberUltra,[tt.ShowPlusCta]:gt===Vs._$.NonMember||gt===Vs._$.MemberCore,[tt.ShowUltraCta]:gt!==Vs._$.MemberUltra};Ht.d.updateInjectedValues(this.gameObject,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},rt),ht),dt),ut),vt),mt))}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Cn.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],Cn.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Cn.prototype,"_bindOnCreate",void 0),Cn=(0,Q.Cg)([(0,X.EVk)("BattlePassThreeTierChaseItemsDataProvider",et.Y.battlePass)],Cn);var On,In=z(87490),Dn=z(38156);let Rn=On=class extends X.uAl{constructor(){super(...arguments),this._itemCards=[],this._loadingSpinners=[],this._itemCardPromises=[],this._pauseUpdates=0}setup(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this._tierNumber)return this._tierNumber=q,this._questManager.onDataChanged.add((()=>{this.updateData().catch(X.RQr.createHandler("Failed to update tier after battle pass data update"))}),this),this.updateData()}))}updateData(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;if(this._pauseUpdates>0)return;const z=null===(q=yield this._questManager.getCurrentBattlePassData())||void 0===q?void 0:q.getTierData(this._tierNumber);if(z&&_t().isEqual(this._currentTierData,z))return;this._currentTierData=z,this._currentTierIcon.active=null!==(K=null==z?void 0:z.isCurrentTier)&&void 0!==K&&K,this._completedTierBackground.active=!1,this._currentTierBackground.active=!1,X.Aq$.isDefined(this._uncompletedTierBackground)&&(this._uncompletedTierBackground.active=!1),z&&(z.isCompleted?(this._completedTierBackground.active=!0,this._currentTierBackground.destroy()):z.isCurrentTier?(this._currentTierBackground.active=!0,this._completedTierBackground.destroy()):X.Aq$.isDefined(this._uncompletedTierBackground)&&(this._uncompletedTierBackground.active=!0)),this.setUpProgressBar(z);(z?[z.topPremiumReward,z.bottomPremiumReward,z.freeReward]:[{rewardId:On.EMPTY_REWARD_ID,membershipTier:Vs._$.MemberUltimateMath},{rewardId:On.EMPTY_REWARD_ID,membershipTier:Vs._$.MemberLevelUp},{rewardId:On.EMPTY_REWARD_ID,membershipTier:Vs._$.NonMember}]).forEach(((q,K)=>{var Q,X;if(q){const Z=null!==(Q=null==z?void 0:z.tier)&&void 0!==Q?Q:K+1;this._itemCardPromises.push(this.setUpItemCard(this._itemCards[K],q,Z,null!==(X=null==z?void 0:z.isCompleted)&&void 0!==X&&X,this._loadingSpinners[K]).then((()=>{this._itemCards[K].findComponentInChildren(Y.$).getRootContainer().name=`Tier ${Z} ${this._itemCards[K].name}`})))}})),yield Promise.all(this._itemCardPromises.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.promise})))))}))}destroy(){this._itemCardPromises.forEach((q=>q.cancel())),this._questManager.onDataChanged.removeAll(this),super.destroy()}setUpItemCard(q,K,z,Y,Q){var Z,J,tt,et,it;const st=null===(tt=ae.t.getItem(null===(Z=K.itemDrop)||void 0===Z?void 0:Z.type,null===(J=K.itemDrop)||void 0===J?void 0:J.ID))||void 0===tt?void 0:tt.data,nt=null!==(et=null==st?void 0:st.rarity)&&void 0!==et?et:0;let at="";K.itemDrop?at=("currency"===K.itemDrop.type||"gold"===K.itemDrop.type)&&null!==(it=Hs[K.itemDrop.ID])&&void 0!==it?it:$s:Q.active=!1;const rt=K.isMystery?"claim-mystery":"claim";let ot="";(Y&&!K.claimed||Xs.D.isFeatureEnabled())&&(ot=K.membershipTier===Vs._$.MemberUltimateMath?ti._.Ui_battle_pass_ultimate_json:ti._.Ui_battle_pass_json);let ht=Ms.Free,ct=0,lt=Ns.Free;K.membershipTier===Vs._$.MemberUltimateMath?(ht=Ms.Ultimate,ct=50,lt=Ns.Plus):K.membershipTier===Vs._$.MemberLevelUp&&(ht=Ms.Premium,lt=Ns.Core);let ut=Gt.l.BattlePassRewardsScreenItemCard,ft=K.membershipTier===Vs._$.MemberLevelUp,bt=K.membershipTier===Vs._$.MemberUltimateMath,pt=Y&&!K.claimed;if(Xs.D.isFeatureEnabled()){ut=Gt.l.BattlePassRewardsScreenItemCardWithLock;const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getMemberTier();K.claimed||K.claimable?(ft=!1,bt=!1):(ft=ft&&q===Vs._$.NonMember,bt=bt&&(q===Vs._$.NonMember||q===Vs._$.MemberLevelUp||q===Vs._$.MemberCore))}else{const q=en.h.isFeatureEnabled()&&Dn.n.playerMembershipMeetsRewardMembership(K.membershipTier)||!en.h.isFeatureEnabled();pt=pt&&q}const vt=new X.kBN(((Z,J)=>{var tt,et,it;Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,ut,{[ms.XU.ItemCardRarityBackgroundAtlasGuid]:ti._.Ui_battle_pass_json,[ms.XU.ItemCardRarityBackgroundFrameName]:Object.values(Ps)[nt],[ms.XU.ItemCardClaimableBorderAtlasGuid]:ot,[ms.XU.ItemCardClaimableBorderFrameName]:ht,[ms.XU.ItemCardClaimableBorderFrameSizeDelta]:[ct,ct],[ms.XU.ItemCardOffSeasonStateAtlasGuid]:ti._.Ui_battle_pass_ultimate_json,[ms.XU.ItemCardOffSeasonStateFrameName]:lt,[ms.XU.ItemCardOffSeasonStateIsEnabled]:K.rewardId===On.EMPTY_REWARD_ID,[ms.XU.ItemCardCollectedTextBackingColour]:Object.values(xs)[nt],[ms.XU.ItemCardCollectedTextBackingStrokeColour]:Object.values(Ls)[nt],[ms.XU.ItemCardCollectedTextColour]:null!==(tt=js[nt])&&void 0!==tt?tt:"#FFFFFF",[ms.XU.ItemRewardId]:K.isMystery&&!K.claimed?182:null===(et=K.itemDrop)||void 0===et?void 0:et.ID,[ms.XU.ItemRewardType]:K.isMystery&&!K.claimed?"item":null===(it=K.itemDrop)||void 0===it?void 0:it.type,[ms.XU.ItemTierNumber]:z,[ms.XU.IsMysteryReward]:K.isMystery,[ms.XU.IsLevelupMemberReward]:ft,[ms.XU.IsUltimateMemberReward]:bt,[ms.XU.Reward]:K,[ms.XU.RewardAmount]:K.itemDrop?`x${K.itemDrop.N}`:"",[ms.XU.RewardClaimable]:K.claimable,[ms.XU.RewardClaimed]:K.claimed,[ms.XU.RewardClaimedAnimationGuid]:vs.Q.Spine_claim_currency_json,[ms.XU.RewardClaimedAnimationName]:at,[ms.XU.RewardMovementAnimationName]:rt,[ms.XU.ShowRewardClaimableAnimation]:pt,[ms.XU.RewardClaimableAnimationName]:[K.membershipTier===Vs._$.MemberUltimateMath?"idle-ready-ultimate":"idle-ready",!0],[ms.XU.ShowRewardAmount]:K.itemDrop&&!K.isMystery&&!K.claimed&&K.itemDrop.N>1,[ms.XU.TierComplete]:Y,[ms.XU.ShouldHighlightCard]:!0}).then((K=>{if(vt.cancelled||!K||K.isDestroyed)(null==K?void 0:K.isDestroyed)||K.destroy();else{q.children.forEach((q=>{q.destroy()}));const z=K.transform;K.parent=q,z.setPivot(.5,.5),z.setAnchorMin(.5,.5),z.setAnchorMax(.5,.5);const Y=K.findComponentInChildren(gs.X);Y&&(Y.isLoaded?Q.active=!1:Y.onItemDataLoaded.addOnce((()=>{Q.active=!1}))),this.setUpRewardClaimHandlers(K.findComponentInChildren(yn))}Z()})).catch(X.RQr.createHandler("Failed to load an item card in a battle pass tier"))}));return vt}setUpRewardClaimHandlers(q){q.onRewardClaimed.addOnce((()=>{this._pauseUpdates+=2}));const K=()=>{this._pauseUpdates--,this.updateData().catch(X.RQr.createHandler("Failed to update tier after pausing for reward claim"))};q.onRewardClaimServerComplete.addOnce(K),q.onRewardClaimedComplete.addOnce(K)}setUpProgressBar(q){if(this._progressBarCompleteIcon.active=!1,this._xpIcon.active=!1,this.setTierTitle(q),q)if(q.isCompleted)this.claimableRewardsExist(q)?this.applyStateToProgressBar(this._claimableProgressBarState,1):(this.applyStateToProgressBar(this._completeProgressBarState,1),Ut.O.isEnglishLocale()&&(this._progressBarCompleteIcon.active=!0));else if(q.isCurrentTier){const K=q.currentProgress/q.targetProgress,z=`${q.currentProgress} / ${q.targetProgress}`;this.applyStateToProgressBar(this._normalProgressBarState,K,z),this._xpIcon.active=!0}else this.applyStateToProgressBar(this._normalProgressBarState,0,"--");else this.applyStateToProgressBar(this._normalProgressBarState,0,"")}claimableRewardsExist(q){return q.topPremiumReward.claimable||q.bottomPremiumReward.claimable||q.freeReward.claimable}applyStateToProgressBar(q,K,z){q&&In.Util.isDefined(K)&&q.applyStateToProgressBar(this._progressBar,K,z)}setTierTitle(q){const K=q?`${q.tier}`:this._tierNumber.toString();(null==q?void 0:q.isCurrentTier)?(this._currentTierTitle.text=K,this._nonCurrentTierTitle.text=""):(this._currentTierTitle.text="",this._nonCurrentTierTitle.text=K)}};Rn.EMPTY_REWARD_ID="empty",(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],Rn.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Rn.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rn.prototype,"_currentTierBackground",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rn.prototype,"_completedTierBackground",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rn.prototype,"_uncompletedTierBackground",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Rn.prototype,"_nonCurrentTierTitle",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Rn.prototype,"_currentTierTitle",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Rn.prototype,"_itemCards",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Rn.prototype,"_loadingSpinners",void 0),(0,Q.Cg)([(0,X.MnK)(Rs),(0,Q.Sn)("design:type",Rs)],Rn.prototype,"_normalProgressBarState",void 0),(0,Q.Cg)([(0,X.MnK)(Rs),(0,Q.Sn)("design:type",Rs)],Rn.prototype,"_claimableProgressBarState",void 0),(0,Q.Cg)([(0,X.MnK)(Rs),(0,Q.Sn)("design:type",Rs)],Rn.prototype,"_completeProgressBarState",void 0),(0,Q.Cg)([(0,X.MnK)(Ds.z),(0,Q.Sn)("design:type",Ds.z)],Rn.prototype,"_progressBar",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rn.prototype,"_progressBarCompleteIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rn.prototype,"_xpIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rn.prototype,"_currentTierIcon",void 0),Rn=On=(0,Q.Cg)([(0,X.EVk)("BattlePassTier",et.Y.battlePass)],Rn);let Pn=class extends X.uAl{constructor(){super(...arguments),this.onComplete=new X.HN0,this._loadOnCreate=!1}create(){super.create(),this._loadOnCreate&&this.load().catch(X.RQr.createHandler("LoadPrefabComponent: Error loading prefab on create"))}load(q=this._prefabId){var K;const z=this.gameObject.findComponent(X.bE_),Y=Object.entries(null!==(K=null==z?void 0:z.injections)&&void 0!==K?K:{}).map((([q,K])=>({injectionName:q,data:K})));if(X.Aq$.isDefined(this._prefabGuid))return this._loader.loadWithDependenciesFromGUID(this._prefabGuid,this._parent,void 0,Y).then((q=>(this.onComplete.dispatch(),q))).catch(X.RQr.createHandler("Error loading prefab from guid!"));if(X.Aq$.isDefined(q)){const K=dt.q.instance.prodigy.gameContainer.get("PrefabService").getPrefab(q);return this._loader.loadFromJSONWithDependencies(K,this._parent,void 0,Y).then((q=>(this.onComplete.dispatch(),q))).catch(X.RQr.createHandler(`LoadPrefabComponent: Could not load prefab id ${q}`))}return new X.kBN((q=>{q(null)}))}destroy(){this.onComplete.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Pn.prototype,"_prefabId",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Pn.prototype,"_prefabGuid",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Pn.prototype,"_parent",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Pn.prototype,"_loader",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Pn.prototype,"onComplete",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Pn.prototype,"_loadOnCreate",void 0),Pn=(0,Q.Cg)([(0,X.EVk)("LoadPrefab",et.Y.utility)],Pn);var Mn,Nn=z(37394);let xn=Mn=class extends Nn.D{constructor(){super(...arguments),this.onSetupComplete=new X.HN0,this._tiersShownAtOnce=4,this._tiersMovedAtOnce=4,this._tierShowingBuffer=1,this._centerSlotFromLeft=2,this._tierGridTweenDurationMs=750,this._leftEdgeBuffer=-20,this._rightEdgeBuffer=-20,this._tiersArrayPromises=[],this._leftMostTierIndex=1}create(){super.create(),this.createAsync().catch(X.RQr.createHandler("BattlePassTrackComponent: Failed to initialize."))}createAsync(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=yield this._questManager.getCurrentBattlePassData();if(!this._tierGrid.GameObject||this._tierGrid.GameObject.isDestroyed)return;K||this._offSeasonDialog.load(),this._tierGridRectTransform=this._tierGrid.GameObject.transform,yield this.createTiers(K);const z=this.getInjectedValue(ms.XU.FocusTierOverride);if(z){const q=this.gameObject.findComponentInParent(X.bE_,!0);null==q||q.unbindInjectedValue(ms.XU.FocusTierOverride)}yield this.centerTierGridOnCurrentTier(null!=z?z:null!==(q=null==K?void 0:K.getCurrentTier())&&void 0!==q?q:1),this.onSetupComplete.dispatch(),this._questManager.onDataChanged.add(this.handleBattlePassDataChanged,this)}))}handleBattlePassDataChanged(){this.showTiers().catch(X.RQr.createHandler("Error updating tracks after battle pass data changed."))}destroy(){this._moveTrackTween&&dt.q.instance.game.tweens.remove(this._moveTrackTween),this._tiersArrayPromises.forEach((q=>{q.cancel()})),this.onSetupComplete.dispose(),this._questManager.onDataChanged.remove(this.handleBattlePassDataChanged,this),super.destroy()}update(){super.update(),this.contentDraggingEnabled&&(this._contentClicked&&!this._contentDragged?this.checkDragStartHorizontal():this._contentDragged&&this.dragContentHorizontal())}createTiers(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z;this._numberOfRegularTiers=null!==(K=null==q?void 0:q.getNumTiers())&&void 0!==K?K:Mn._DEFAULT_TIERS_OFF_SEASON;const Y=null!==(z=null==q?void 0:q.hasInfiniteTier())&&void 0!==z&&z,X=Y?this._numberOfRegularTiers+1:this._numberOfRegularTiers;this._tiersArrayPromises=new Array(X);let Z=Gt.l.BattlePassTier,J=Gt.l.BattlePassInfiniteTier;Xs.D.isFeatureEnabled()&&(Z=Gt.l.BattlePassThreeTier,J=Gt.l.BattlePassThreeTierInfiniteTier);for(let q=0;qq.active=!1));Y&&(this._tiersArrayPromises[this._numberOfRegularTiers]=this._prefabLoader.loadWithDependenciesFromGUID(J).then((q=>q.active=!1)));(yield Promise.all(this._tiersArrayPromises.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.promise})))))).forEach((q=>{this.setupTierGameObject(q)})),this._numberOfTierGridEntries=this._tierGrid.GameObject.children.length,this._maxIndex=this._numberOfTierGridEntries-this._tiersShownAtOnce+1}))}setupTierGameObject(q){q.active=!1;const K=q.transform;q.parent=this._tierGrid.GameObject,K.setPivot(.5,.5),K.setAnchorMin(0,0),K.setAnchorMax(0,0)}showTiers(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._questManager.getCurrentBattlePassData();if(!this.gameObject||this.gameObject.isDestroyed)return;const K=this._leftMostTierIndex-1,z=this._leftMostTierIndex+this._tiersShownAtOnce;for(let Y=0;Y=K&&Q<=z,Q>=K-this._tiersMovedAtOnce&&Q<=z+this._tiersMovedAtOnce&&this.setupVisibleGridObject(q,Z,Y).catch(X.RQr.createHandler("BattlePassTrackComponent: Error setting up a visible battle pass tier"))}this.setupNotificationBadges(q,this._leftMostTierIndex)}))}setupNotificationBadges(q,K){if(!q)return;const z=K+this._tiersShownAtOnce-1,Y=q.getAllTierData(),Q=q.getInfiniteTierData().timesClaimed{var Y,X,Z;const J=(null===(Y=q.freeReward)||void 0===Y?void 0:Y.claimable)||(null===(X=q.topPremiumReward)||void 0===X?void 0:X.claimable)||(null===(Z=q.bottomPremiumReward)||void 0===Z?void 0:Z.claimable)||q.isInfiniteTier&&Q;q.tierz&&J&&(this._rewardsToTheRightNotificationBadge.active=!0)}))}setupVisibleGridObject(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){var Y;const Q=null==q?void 0:q.getAllTierData(),X=null!==(Y=null==Q?void 0:Q[z])&&void 0!==Y?Y:{tier:z+1};if(X.isInfiniteTier)return this.setupInfiniteTierComponent(K,q);const Z=K.findComponent(Rn);yield Z.setup(X.tier)}))}setupInfiniteTierComponent(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=q.findComponent(qs),Y=K.getInfiniteTierData();z&&Y&&(yield z.setup(Y).catch(X.RQr.createHandler("Error setting up the infinite battle pass tier.")))}))}moveTrackToIndex(q,K=!0){this._leftMostTierIndex=X.cj9.clamp(q,1,this._maxIndex);const z=this.adjustForBuffer(this._tierGrid.GameObject.children[this._leftMostTierIndex-1].transform.localPosition.x);this.displayVisibleTiers(),this.buildTierGridTween(-z,K),this._moveTrackLeftButton.active=this._leftMostTierIndex1}centerTierGridOnCurrentTier(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this.moveTrackToIndex(q-this._centerSlotFromLeft+1,!1)}))}moveTrackRight(){this._moveTrackTween||this.moveTrackToIndex(this._leftMostTierIndex-this._tiersMovedAtOnce)}moveTrackLeft(){this._moveTrackTween||this.moveTrackToIndex(this._leftMostTierIndex+this._tiersMovedAtOnce)}buildTierGridTween(q,K=!0){const z=this._tierGridRectTransform.anchoredPivotOffset.y,Y={value:this._tierGridRectTransform.anchoredPivotOffset.x};this._moveTrackTween=dt.q.instance.game.add.tween(Y,this).to({value:q},K?this._tierGridTweenDurationMs:0,X.GS3.Quadratic.In,!1),this._moveTrackTween.onUpdate.add((()=>{this._tierGridRectTransform.setAnchoredPivotOffset(Y.value,z)})),this._moveTrackTween.onTweenComplete.add((()=>{re.J.callAfterFrameDelay((()=>{this.showTiers().catch(X.RQr.createHandler("Error updating tiers after tween.")),this._moveTrackTween=null}),3)})),this._moveTrackTween.start()}adjustForBuffer(q){return 1===this._leftMostTierIndex?q-this._leftEdgeBuffer:this._leftMostTierIndex===this._maxIndex?q+this._rightEdgeBuffer:q}displayVisibleTiers(){for(let q=this._leftMostTierIndex-1;q1}dragContentHorizontal(){const q=dt.q.instance.game.input.activePointer.x-this._lastDragMousePosition.x;this.moveContent(q),super.dragContentHorizontal()}onMouseWheel(q){super.onMouseWheel(q);const K=-X.cj9.clamp(q.deltaY,-this._maximumMouseWheelSpeed,this._maximumMouseWheelSpeed);this.moveContent(K)}};xn._DEFAULT_TIERS_OFF_SEASON=5,(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],xn.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],xn.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.MnK)(X.JTA),(0,Q.Sn)("design:type",X.JTA)],xn.prototype,"_tierGrid",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xn.prototype,"_moveTrackRightButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xn.prototype,"_rewardsToTheLeftNotificationBadge",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xn.prototype,"_moveTrackLeftButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xn.prototype,"_rewardsToTheRightNotificationBadge",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],xn.prototype,"onSetupComplete",void 0),(0,Q.Cg)([(0,X.MnK)(Pn),(0,Q.Sn)("design:type",Pn)],xn.prototype,"_offSeasonDialog",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],xn.prototype,"_tiersShownAtOnce",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],xn.prototype,"_tiersMovedAtOnce",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],xn.prototype,"_tierShowingBuffer",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],xn.prototype,"_centerSlotFromLeft",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],xn.prototype,"_tierGridTweenDurationMs",void 0),xn=Mn=(0,Q.Cg)([(0,X.EVk)("BattlePassTrack",et.Y.battlePass)],xn);var Ln=z(7351);let kn=class extends X.uAl{constructor(){super(...arguments),this.onHardModeUnlocked=new X.HN0,this.onHardModeLocked=new X.HN0,this.onExpertModeUnlocked=new X.HN0,this.onExpertModeLocked=new X.HN0,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.checkDifficultyUnlocks()}checkDifficultyUnlocks(){const q=this._activePlayer.data.difficultyUnlocks;if(!X.Aq$.isDefined(q))return void X.RQr.createHandler("DifficultyUnlocksGuardComponent.checkDifficultyUnlocks: difficultyUnlocks is undefined");const K=!0===q[Te.i.Hard],z=!0===q[Te.i.Expert];K?this.onHardModeUnlocked.dispatch():this.onHardModeLocked.dispatch(),z?this.onExpertModeUnlocked.dispatch():this.onExpertModeLocked.dispatch()}destroy(){super.destroy(),this.onHardModeUnlocked.dispose(),this.onHardModeLocked.dispose(),this.onExpertModeUnlocked.dispose(),this.onExpertModeLocked.dispose()}};(0,Q.Cg)([(0,Qi.b)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],kn.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kn.prototype,"onHardModeUnlocked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kn.prototype,"onHardModeLocked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kn.prototype,"onExpertModeUnlocked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kn.prototype,"onExpertModeLocked",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],kn.prototype,"_runOnCreate",void 0),kn=(0,Q.Cg)([(0,X.EVk)("DifficultyUnlocksGuard",et.Y.utility)],kn);var Bn=z(2212),Un=z(2090);let Fn=class extends X.uAl{create(){super.create(),this.setupDifficultyOverlay()}setupDifficultyOverlay(){var q;const K=dt.q.instance.prodigy.world.getCurrentZoneObject(),z=(0,Kt.G)(Un.u).enabled&&Bn.J.isZoneMapDifficultyModeAgnostic(this._mapTag),Y=null!==(q=this._activePlayer.currentDifficulty)&&void 0!==q?q:Te.i.Regular,Q=(null==K?void 0:K.ID)===Yt.A_.LAMPLIGHT&&dt.q.instance.prodigy.skin.isFestivalActive();if(z&&!Q&&Y!==Te.i.Regular)switch(Y){case Te.i.Hard:this._hardModeOverlay&&(this._hardModeOverlay.active=!0);break;case Te.i.Expert:this._expertModeOverlay&&(this._expertModeOverlay.active=!0)}}};(0,Q.Cg)([(0,X.Cdj)("ZONE_MAP_TAG"),(0,Q.Sn)("design:type",String)],Fn.prototype,"_mapTag",void 0),(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],Fn.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Fn.prototype,"_hardModeOverlay",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Fn.prototype,"_expertModeOverlay",void 0),Fn=(0,Q.Cg)([(0,X.EVk)("DifficultyOverlayDisplay",et.Y.zones)],Fn);var Gn=z(92591),jn=z(16495);class $n{constructor(){this._onFinished=new X.HN0}get onFinished(){return this._onFinished}enter(){}exit(){}update(){}destroy(){this._onFinished.dispose(),this._onFinished=null}finish(){this._onFinished.dispatch()}}class Hn extends $n{constructor(q,K){super(),this._animationName=null,this._animators=null,this._animators=q,this._animationName=K}enter(){(0,jn.sR)(this._animators,this._animationName,!0)}setAnimationName(q){this._animationName=q}setAnimators(q){this._animators=q}}var Vn=z(6997);class Wn extends $n{constructor(q,K){super(),this._animationName=null,this._animators=null,this._animatorSemaphore=null,this._animators=q,this._animationName=K}destroy(){var q;null===(q=this._animatorSemaphore)||void 0===q||q.destroy(),this._animatorSemaphore=null,super.destroy()}enter(){(0,wt.v)(null===this._animatorSemaphore,"Entering a state with a pending animation semaphore"),this._animatorSemaphore=new Vn.o,this._animatorSemaphore.init((()=>{this.onFinished.dispatch()}),this._animators.length);const q=this._animators.length;for(let K=0;K=this.keepChargeCost;K?z?(q.changeGold(-1*this.keepChargeCost),this.onSpendCoins.dispatch()):this.onMemberInsufficientGold.dispatch():this.onShowMembershipModal.dispatch()}addMembershipPurchaseListener(){dt.q.instance.prodigy.game.broadcaster.addAppListener(Xn.H3.MembershipResponseReceived,this.handleMembershipChange,this)}handleMembershipChange(q){"success"===q&&(dt.q.instance.prodigy.game.broadcaster.removeAppListener(Xn.H3.MembershipResponseReceived,this),this.onSpendCoins.dispatch())}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Zn.prototype,"keepChargeCost",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zn.prototype,"onTaskComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zn.prototype,"onSpendCoins",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zn.prototype,"onMemberInsufficientGold",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zn.prototype,"onShowMembershipModal",void 0),Zn=(0,Q.Cg)([(0,X.EVk)("ChargedLevelsMembershipButton")],Zn);var Jn,ta=z(5491),ea=z(88060),ia=z(90744),sa=z(97651),na=z(43754),aa=z(55122),ra=z(46855);!function(q){q.NumberLevelsLost="NUMBER_OF_LEVELS_LOST",q.KeepChargeCost="KEEP_CHARGE_COST",q.GoldCoins="GOLD_COINS",q.MagicoinAmount="MAGICOIN_AMOUNT",q.TargetGoldCoins="TARGET_GOLD_COINS",q.NotEnoughGold="CHARGED_LEVELS_NOT_ENOUGH_GOLD",q.XpBarInformation="CHARGED_LEVELS_XP_BAR_INFORMATION",q.OriginalCurrencyId="ORIGINAL_CURRENCY_ID",q.OriginalCurrencyAmount="ORIGINAL_CURRENCY_AMOUNT",q.OriginalCurrencyDifference="ORIGINAL_CURRENCY_DIFFERENCE",q.ConversionCurrencyId="CONVERSION_CURRENCY_ID",q.ConversionCurrencyAmount="CONVERSION_CURRENCY_AMOUNT",q.ConversionCurrencyDifference="CONVERSION_CURRENCY_DIFFERENCE",q.ShouldShowCurrencyConversion="SHOULD_SHOW_CURRENCY_CONVERSION",q.ConversionAnalyticsCustomData="CONVERSION_ANALYTICS_CUSTOM_DATA"}(Jn||(Jn={}));let oa=class extends Yi.z{create(){var q;super.create(),void 0!==this._chargedLevelsProgressManager.chargedLevelsProgressData&&this.bindContext(),this._playerChargedLevelDataProvider=this._mainPlayer?this._mainPlayer.findComponentInChildren(sa.e,!0):this._loggedInPlayer.player.playerContainer.playerPrefab.findComponentInChildren(sa.e,!0),null===(q=this._mainPlayer)||void 0===q||q.findComponent(ea.m).setFacingDirection($e.y.Right)}abandonChargedLevelLosses(){this.bindCurrentChargedLevelTier(),this._chargedLevelsProgressManager.abandonChargedLevelLosses().then((()=>{var q;null===(q=this._playerChargedLevelDataProvider)||void 0===q||q.showChargeLostEffect()})).catch(X.RQr.createHandler("[ChargedLevelsRetentionDataProviderComponent] Failed to abandon charged level losses"))}recuperateChargedLevelLosses(q,K){this.bindCurrentChargedLevelTier(),this._chargedLevelsProgressManager.recuperateChargedLevelLosses(q,K).then((()=>{var q;null===(q=this._playerChargedLevelDataProvider)||void 0===q||q.showChargeKeptEffect()})).catch(X.RQr.createHandler("[ChargedLevelsRetentionDataProviderComponent] Failed to recuperate charged level losses"))}bindCurrentChargedLevelTier(){var q;const K=this._chargedLevelsProgressManager.chargedLevelsProgressData.recuperableLevels,z=this._chargedLevelsProgressManager.chargedLevelsProgressData.chargedLevel;null===(q=this._playerChargedLevelDataProvider)||void 0===q||q.bindChargedLevelTier(z+K)}bindContext(){var q,K;const z=null!==(q=this.gameObject.findComponentInParent(X.bE_,!1))&&void 0!==q?q:this._context,Y=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=this._chargedLevelsProgressManager.chargedLevelsProgressData.chargedLevel,Z=this._chargedLevelsProgressManager.chargedLevelsProgressData.recuperableXp,J=this._chargedLevelsProgressManager.chargedLevelsProgressData.recuperableLevels,tt=J>1?"s":"",et=null!==(K=this._chargedLevelsProgressManager.chargedLevelsProgressData.costToKeepLevels)&&void 0!==K?K:0,it=0===et?Y.getGold():Y.getGold()-et,st=new ra.r(Z,ta.V.Player,{baseXp:0,memberXp:0,totalNonMemberXp:0},aa.s.activePlayerLevelCap),nt=this._paymentManager.exchange({currency:1,value:et},27).value,at=Y.getGold(),rt=this._hardCurrency.getBalance(27),ot=aa.s.activePlayerLevelCap;st.maxLevel=ot+Y.getChargedLevelCap(),st.levels=[ot+Q+J,ot+Q+J+1],st.currentCreatureStars=Z,st.currentRelativeStars=Z,st.starsRequiredForEachLevel=[Z+1];this.bindTo(z,Jn.ShouldShowCurrencyConversion,!0),this.bindTo(z,Jn.KeepChargeCost,et),this.bindTo(z,Jn.GoldCoins,at),this.bindTo(z,Jn.MagicoinAmount,rt),this.bindTo(z,Jn.TargetGoldCoins,it),this.bindTo(z,Jn.NotEnoughGold,it<0),this.bindTo(z,Jn.NumberLevelsLost,[J,tt]),this.bindTo(z,Jn.XpBarInformation,st),this.bindTo(z,Jn.OriginalCurrencyId,1),this.bindTo(z,Jn.OriginalCurrencyAmount,et),this.bindTo(z,Jn.OriginalCurrencyDifference,et-at),this.bindTo(z,Jn.ConversionCurrencyId,27),this.bindTo(z,Jn.ConversionCurrencyAmount,nt),this.bindTo(z,Jn.ConversionCurrencyDifference,nt-rt),this.bindTo(z,Jn.ConversionAnalyticsCustomData,{sink_type:Ei.C.ChargedLevelRenewal,sink_id:this._chargedLevelsProgressManager.chargedLevelsProgressData.chargedLevel+J})}bindTo(q,K,z){q.Container.hasBinding(K)||(q.Container.unbind(K),q.Container.bind(K).toConstantValue(z))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],oa.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("ec3-31a0"),(0,Q.Sn)("design:type",ia.E)],oa.prototype,"_paymentManager",void 0),(0,Q.Cg)([(0,X.Cdj)("bec-c6b4"),(0,Q.Sn)("design:type",na.W)],oa.prototype,"_hardCurrency",void 0),(0,Q.Cg)([(0,X.Cdj)("c5a-49f2"),(0,Q.Sn)("design:type",Kn.g)],oa.prototype,"_chargedLevelsProgressManager",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],oa.prototype,"_mainPlayer",void 0),oa=(0,Q.Cg)([(0,X.EVk)("ChargedLevelsRetentionDataProvider")],oa);let ha=class extends Yi.z{create(){super.create(),this.bindContext()}bindContext(){}bindValue(q,K,z){q.Container.hasBinding(K)||q.Container.bind(K).toConstantValue(z)}};ha=(0,Q.Cg)([(0,X.EVk)("ChargedLevelsTutorialDataProvider",et.Y.ui)],ha);var ca=z(65732),da=(z(34578),z(35571));let la=class extends X.uAl{run(){this._cloudscriptChargedLevels.sendTutorialReminderMailer().catch(X.RQr.createHandler("[SendChargedLevelsMail] Could not send tutorial reminder mailer"))}};(0,Q.Cg)([(0,X.Cdj)("d94-655c"),(0,Q.Sn)("design:type",da.e)],la.prototype,"_cloudscriptChargedLevels",void 0),la=(0,Q.Cg)([(0,X.EVk)("SendChargedLevelsMail")],la);let ua=class extends X.JTX{constructor(){super(...arguments),this._isOnCoolDown=new X.HN0,this._isNotOnCoolDown=new X.HN0,this._identifier="",this._cooldownTime=0}get cooldownTime(){return this._cooldownTime}initialize(q,K){this._identifier=q,this._cooldownTime=K}checkCooldown(){this._identifier?dt.q.instance.prodigy.gameContainer.get("d90-622c").hasCooldown(this._identifier,this.cooldownTime).then((q=>{q?this._isOnCoolDown.dispatch():this._isNotOnCoolDown.dispatch()})).catch((q=>{X.VyI.log(`Failed to check for cooldown. ${q.message}`,X.$bb.Error)})):X.VyI.log("An identifier is required to use the CooldownComponent",X.$bb.Error)}destroy(){this._isOnCoolDown.dispose(),this._isNotOnCoolDown.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ua.prototype,"_isOnCoolDown",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ua.prototype,"_isNotOnCoolDown",void 0),ua=(0,Q.Cg)([(0,X.EVk)("InteractablesCooldown",et.Y.cooldown)],ua);var fa=z(47969);let ba=class extends X.uAl{constructor(){super(...arguments),this._coolownID="",this.onCooldown=new X.HN0,this.notOnCooldown=new X.HN0,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.run().catch(X.RQr.createHandler("Error running CheckCooldownComponent"))}run(){return(0,Q.sH)(this,void 0,void 0,(function*(){(yield this._cooldowns.isCooldownActive(this._coolownID))?this.onCooldown.dispatch():this.notOnCooldown.dispatch()}))}destroy(){this.onCooldown.dispose(),this.notOnCooldown.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ba.prototype,"_coolownID",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ba.prototype,"onCooldown",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ba.prototype,"notOnCooldown",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ba.prototype,"_runOnCreate",void 0),(0,Q.Cg)([(0,X.Cdj)("a69-7d25"),(0,Q.Sn)("design:type",fa.m)],ba.prototype,"_cooldowns",void 0),ba=(0,Q.Cg)([(0,X.EVk)("CheckCooldown",et.Y.cooldown)],ba);var pa=z(86913);let va=class extends X.uAl{constructor(){super(...arguments),this._coolownID="",this._runOnCreate=!1,this._setCooldownFromSpawnCooldown=!0,this._spawnCooldownCategory=pa.u.Main}create(){super.create(),this._runOnCreate&&this.run().catch(X.RQr.createHandler("Error running SetCooldownComponent"))}run(){return(0,Q.sH)(this,arguments,void 0,(function*(q=""){if(""!==q&&(this._coolownID=q),this._setCooldownFromSpawnCooldown){dt.q.instance.prodigy.gameContainer.get("5a6-6255").setCooldownFromCategory(this._coolownID,this._spawnCooldownCategory).catch(X.RQr.createHandler("Error setting cooldown from category in SetCooldownComponent"))}}))}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],va.prototype,"_coolownID",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],va.prototype,"_runOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],va.prototype,"_setCooldownFromSpawnCooldown",void 0),(0,Q.Cg)([(0,X.gfw)(pa.u),(0,Q.Sn)("design:type",String)],va.prototype,"_spawnCooldownCategory",void 0),va=(0,Q.Cg)([(0,X.EVk)("SetCooldown",et.Y.cooldown)],va);let ga=class extends X.uAl{constructor(){super(...arguments),this.onSFXComplete=new X.HN0,this._timeouts=[]}postCreate(){super.postCreate(),this._playOnCreate&&this.playSFX()}destroy(){this.onSFXComplete.dispose(),this._timeouts.forEach((q=>{window.clearTimeout(q)})),this._timeouts.length=0,super.destroy()}playSFX(){var q;const K=()=>{dt.q.instance.prodigy.audio.playSFX(this._sfxID,this._clipName,(()=>this.onSFXCompleteHandler()))};(null!==(q=this._delay)&&void 0!==q?q:0)>0?this._timeouts.push(window.setTimeout(K,this._delay)):K()}onSFXCompleteHandler(){this.onSFXComplete.dispatch()}};(0,Q.Cg)([(0,X.W_S)(),(0,X.Bak)(),(0,Q.Sn)("design:type",String)],ga.prototype,"_sfxTag",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ga.prototype,"_sfxID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ga.prototype,"_clipName",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ga.prototype,"onSFXComplete",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ga.prototype,"_delay",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ga.prototype,"_playOnCreate",void 0),ga=(0,Q.Cg)([(0,X.EVk)("PlaySoundEffect",et.Y.audio,"Deprecated use PlayAudioGUIDComponent instead")],ga);var ma=z(70570),ya=z(75915),_a=z(79484),Ea=z(84705),wa=z(20786);const Ta=new Map([[17,wa.F.createTeam],[18,ya.u.createTeam],[19,ma.l.createTeam],[20,Ea.Y.createTeam],[21,_a.e.createTeam]]);let Sa=class extends X.uAl{constructor(){super(...arguments),this._onBossDefeated=new X.HN0,this._onBossAlive=new X.HN0}create(){if(super.create(),this._crystalCavernsState){const q=this.getStateID();null!==q&&this._crystalCavernsState.isBossDefeatedCurrentRun(q)?(this._onBossDefeated.dispatch(),this.GameObject.active=!1):this._onBossAlive.dispatch()}}destroy(){this._onBossAlive.dispose(),this._onBossDefeated.dispose(),super.destroy()}markAsSeen(){const q=this.getStateID();null!==q&&this._crystalCavernsState.setBossSeen(q),this._segment.playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent($i.lT.Boss)}getStateID(){return Bi.getBossEnum(this.bossID)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Sa.prototype,"bossID",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",Ui.o)],Sa.prototype,"_crystalCavernsState",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Sa.prototype,"_onBossDefeated",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Sa.prototype,"_onBossAlive",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],Sa.prototype,"_segment",void 0),Sa=(0,Q.Cg)([(0,X.EVk)("CrystalCavernsBossEncounter",et.Y.adventure)],Sa);let Aa=class extends X.uAl{constructor(){super(...arguments),this._introKey="COMBAT_BOSS_BATTLE",this._battleBackground="battle-shiverchill-inside",this._afterBattleFSM=null,this._battleStars=null,this._freeSwitching=!1,this._opponentSwitchDisabled=!1}startBattle(){const q=this._bossEncounter.bossID,K=ae.t.getItem("boss",q).data,z=this._crystalCavernsState,Y=this._currentPlayer.player.data.zone,Q=this._mainPlayer.transform.localScale.x,Z=new X.I9Y;Z.copyFrom(this._afterBattlePosition.worldPosition);const J=new X.I9Y;J.copyFrom(this.GameObject.transform.worldPosition);const tt=this._bossEncounter.getStateID();if(null!==tt){this._bossEncounter.markAsSeen();const X=dt.q.instance.prodigy.battle;X.battleStats.type="DungeonBossBattle",X.start({adventureRewards:K.adventureRewards,intro:this._localization.getText(this._introKey),boss:{ID:q,level:this._crystalCavernsState.getLevel(),element:K.element,name:this._localization.getText(K.nameKey),nameKey:K.nameKey,attacks:K.attacks,bossFactory:Ta.get(q)},screen:this._battleBackground,backgroundMusic:31,difficulty:K.battle.difficulty,targetingEnabled:this._targetingEnabled,starOverride:this._battleStars,freeTeamSwap:this._freeSwitching,disableHealing:!0,videoLessonInstantWinEnabled:!1,revampBattleType:Bi.getRevampBattleType(tt)},(()=>{dt.q.instance.prodigy.world.it(Y)}),(()=>{z.setBossDefeated(tt);let q=null;void 0!==this._afterBattleFSM&&(q={runFSMOnLoad:{ID:this._afterBattleFSM,variables:{game:dt.q.instance.game,encounterX:J.x,encounterY:J.y,playerIdentifier:"MainPlayerGameObject"}},playerDirection:Q}),dt.q.instance.prodigy.world.it(Y,Z.x,Z.y,q)}),null,Y)}else X.VyI.log(`Starting dungeon boss battle with unknown boss ${q}`,X.$bb.Warning)}};(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",Ui.o)],Aa.prototype,"_crystalCavernsState",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Aa.prototype,"_afterBattlePosition",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Aa.prototype,"_introKey",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Aa.prototype,"_battleBackground",void 0),(0,Q.Cg)([(0,X.MnK)(Sa),(0,Q.Sn)("design:type",Sa)],Aa.prototype,"_bossEncounter",void 0),(0,Q.Cg)([(0,X.Cdj)("Localization"),(0,Q.Sn)("design:type",X.dTp)],Aa.prototype,"_localization",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Aa.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Aa.prototype,"_afterBattleFSM",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Aa.prototype,"_battleStars",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Aa.prototype,"_freeSwitching",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Aa.prototype,"_opponentSwitchDisabled",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],Aa.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Aa.prototype,"_targetingEnabled",void 0),Aa=(0,Q.Cg)([(0,X.EVk)("StartCrystalCavernsBossBattle",et.Y.adventure)],Aa);let Ca=class extends Ke.u{constructor(){super(...arguments),this._spine=null,this._circleTrigger=null,this._facingDirection="right"}run(){this.execute(137,{game:dt.q.instance.game,playerObject:this._mainPlayer,playerTransform:this._mainPlayer.transform,facingDirection:this._facingDirection,circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,startBattleComponent:this._startBattleComponent,monsterSpine:this._spine.getSpine(),bossEncounter:this,attackAnimationName:this._attackAnimationName,idleAnimationName:this._idleAnimationName})}playEncounterSFX(){this._encounterSoundEffect&&this._encounterSoundEffect.playSFX()}};(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],Ca.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],Ca.prototype,"_spine",void 0),(0,Q.Cg)([(0,X.MnK)(mi.s),(0,Q.Sn)("design:type",mi.s)],Ca.prototype,"_circleTrigger",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Ca.prototype,"_encounterPosition",void 0),(0,Q.Cg)([(0,X.MnK)(Aa),(0,Q.Sn)("design:type",Aa)],Ca.prototype,"_startBattleComponent",void 0),(0,Q.Cg)([(0,X.MnK)(ga),(0,Q.Sn)("design:type",ga)],Ca.prototype,"_encounterSoundEffect",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ca.prototype,"_attackAnimationName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ca.prototype,"_idleAnimationName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ca.prototype,"_facingDirection",void 0),Ca=(0,Q.Cg)([(0,X.EVk)("BossEncounterFSM",et.Y.adventureFsm)],Ca);let Oa=class extends Ke.u{constructor(){super(...arguments),this.preloadSFX=Ai.c.Sfx_wyrmroar,this._spine=null,this._circleTrigger=null}run(){this.execute(138,{game:dt.q.instance.game,playerIdentifier:"MainPlayerGameObject",circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,startBattleComponent:this._startBattleComponent,monsterSpine:this._spine.getSpine(),monsterTransform:this._spine.GameObject.transform})}};(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Oa.prototype,"preloadSFX",void 0),(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],Oa.prototype,"_spine",void 0),(0,Q.Cg)([(0,X.MnK)(mi.s),(0,Q.Sn)("design:type",mi.s)],Oa.prototype,"_circleTrigger",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Oa.prototype,"_encounterPosition",void 0),(0,Q.Cg)([(0,X.MnK)(Aa),(0,Q.Sn)("design:type",Aa)],Oa.prototype,"_startBattleComponent",void 0),Oa=(0,Q.Cg)([(0,X.EVk)("MakaluEncounterFSM",et.Y.adventureFsm)],Oa);let Ia=class extends Ke.u{run(){this.execute(140,{game:dt.q.instance.game,locomotion:this._playerLocomotion,playerObject:this._mainPlayer,circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,exclamationMark:this._exclamationMarkGameObject,startBattleComponent:this._startBattleComponent})}};(0,Q.Cg)([(0,X.Cdj)("PlayerLocomotion"),(0,Q.Sn)("design:type",X.KhP)],Ia.prototype,"_playerLocomotion",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],Ia.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(mi.s),(0,Q.Sn)("design:type",mi.s)],Ia.prototype,"_circleTrigger",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Ia.prototype,"_encounterPosition",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ia.prototype,"_exclamationMarkGameObject",void 0),(0,Q.Cg)([(0,X.MnK)(Aa),(0,Q.Sn)("design:type",Aa)],Ia.prototype,"_startBattleComponent",void 0),Ia=(0,Q.Cg)([(0,X.EVk)("WinstonVonLootEncounterFSM",et.Y.adventureFsm)],Ia);var Da=z(630);let Ra=class extends Ke.u{create(){var q;super.create(),(null===(q=this._dungeonState)||void 0===q?void 0:q.isBossDefeatedCurrentRun(4))||(this.GameObject.active=!1)}run(){this.execute(143,{game:dt.q.instance.game,winstonGameObject:this._winstonVonLootGameObject,winstonFadeDuration:this._fadeDuration,mapSaveComponent:this._mapSaveStateComponent,playerIdentifier:"MainPlayerGameObject",teleportGameObject:this._teleportSpine.GameObject,teleportSpine:this._teleportSpine.getSpine(),teleportName:Da.rC.Exit,teleportSfx:this._teleportSfx})}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ra.prototype,"_winstonVonLootGameObject",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ra.prototype,"_fadeDuration",void 0),(0,Q.Cg)([(0,X.MnK)(fi),(0,Q.Sn)("design:type",fi)],Ra.prototype,"_mapSaveStateComponent",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",Ui.o)],Ra.prototype,"_dungeonState",void 0),(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],Ra.prototype,"_teleportSpine",void 0),(0,Q.Cg)([(0,X.MnK)(mn.J),(0,Q.Sn)("design:type",mn.J)],Ra.prototype,"_teleportSfx",void 0),Ra=(0,Q.Cg)([(0,X.EVk)("WinstonVonLootPostBattleFSM",et.Y.adventureFsm)],Ra);let Pa=class extends X.uAl{constructor(){super(...arguments),this.bossID=1,this.bossName="yeti",this._atlas=ti._.Ui_cc_boss_icons_json,this._border=null,this._bossImage=null,this._iconImage=null,this._isLarge=!1}create(){super.create();const q=this._isLarge?"large":"small";let K,z,Y;K=this._crystalCavernsState.isBossSeen(this.bossID),z=this._crystalCavernsState.getCheckpointIndex(),Y=this._crystalCavernsState.isBossDefeatedCurrentRun(this.bossID),this._bossImage.setAsset(this._atlas,`icon-${q}-${K?this.bossName:"questionmark"}`);const Q=ae.t.getItemData("boss",Bi.getBossAssetID(this.bossID));let Z=null,J=null;Y?(J=`icon-checkmark-${q}`,Z=`icon-${q}-green`):z===Q.battleCheckpointID?(J=`icon-sword-${q}`,Z=`icon-${q}-blue`):Z=`icon-${q}-grey`,this._border.setAsset(this._atlas,Z),X.Aq$.isDefined(J)?this._iconImage.setAsset(this._atlas,J):this._iconImage.GameObject.active=!1}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Pa.prototype,"bossID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Pa.prototype,"bossName",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Pa.prototype,"_atlas",void 0),(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",Ui.o)],Pa.prototype,"_crystalCavernsState",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Pa.prototype,"_border",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Pa.prototype,"_bossImage",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Pa.prototype,"_iconImage",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Pa.prototype,"_isLarge",void 0),Pa=(0,Q.Cg)([(0,X.EVk)("BossIconStatus",et.Y.adventureUi)],Pa);let Ma=class extends X.PQK{installBindings(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.Container.bind("DungeonState").toConstantValue(q.state.getDungeonState(Ui.o,"crystal_caverns"))}};Ma=(0,Q.Cg)([(0,X.Og1)("CrystalCavernsInstaller","Installer")],Ma);var Na=z(80110);let xa=class extends Ke.u{constructor(){super(...arguments),this._spine=null,this._circleTrigger=null}run(){this.execute(141,{game:dt.q.instance.game,playerObject:this._mainPlayer,playerPathfinder:this._playerPathfinder,circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,startBattleComponent:this._startBattleComponent,monsterSpine:this._spine.getSpine(),monsterTransform:this._spine.GameObject.transform,screenShakeComponent:this._screenShakeComponent,cameraTransform:X.i7d.main.GameObject.transform,cameraFollowController:this._mainPlayer.findComponentInChildren(X.mZY),golemRevealCameraPosition:this._golemRevealCameraPosition})}};var La;(0,Q.Cg)([(0,X.Cdj)("PlayerPathfinder"),(0,Q.Sn)("design:type",X.pV3)],xa.prototype,"_playerPathfinder",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],xa.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],xa.prototype,"_spine",void 0),(0,Q.Cg)([(0,X.MnK)(mi.s),(0,Q.Sn)("design:type",mi.s)],xa.prototype,"_circleTrigger",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],xa.prototype,"_encounterPosition",void 0),(0,Q.Cg)([(0,X.MnK)(Aa),(0,Q.Sn)("design:type",Aa)],xa.prototype,"_startBattleComponent",void 0),(0,Q.Cg)([(0,X.MnK)(Na.g),(0,Q.Sn)("design:type",Na.g)],xa.prototype,"_screenShakeComponent",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],xa.prototype,"_golemRevealCameraPosition",void 0),xa=(0,Q.Cg)([(0,X.EVk)("CrystalGolemEncounterFSM",et.Y.adventureFsm)],xa);let ka=La=class extends X.uAl{constructor(){super(...arguments),this._onMorphExpired=new X.HN0,this._playerData=null,this._lastMorphDataUpdate=0}create(){super.create(),this._playerData=this._loggedInPlayer.player.getPlayerData(),this._lastUpdateTime=Date.now()}update(){var q;super.update();const K=Date.now(),z=null===(q=this._playerData)||void 0===q?void 0:q.playerTransformation;if(z){const q=K-this._lastUpdateTime;z.timeRemaining-=q,K-this._lastMorphDataUpdate>La.FORCE_SAVE_TIME_MS&&(this._loggedInPlayer.player.updated=!0,this._lastMorphDataUpdate=K),z.timeRemaining<=0&&(this._onMorphExpired.dispatch(),this._loggedInPlayer.player.transformPlayer(ta.V.Player))}this._lastUpdateTime=K}destroy(){this._playerData=null,this._onMorphExpired.dispose(),this._onMorphExpired=null,super.destroy()}};ka.FORCE_SAVE_TIME_MS=3e4,(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ka.prototype,"_onMorphExpired",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],ka.prototype,"_loggedInPlayer",void 0),ka=La=(0,Q.Cg)([(0,X.EVk)("MorphExpiration",et.Y.playerAnimation)],ka);var Ba=z(64889),Ua=z(87337);let Fa=class extends X.uAl{constructor(){super(...arguments),this.onQuestionAnswered=new X.HN0,this.onQuestionAnsweredCorrectly=new X.HN0,this.onQuestionAnsweredIncorrectly=new X.HN0,this._isOpen=!1}destroy(){this.onQuestionAnswered.dispose(),this.onQuestionAnsweredCorrectly.dispose(),this.onQuestionAnsweredIncorrectly.dispose(),super.destroy()}answerQuestion(){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.onQuestionAnswered.dispatch(_w,0,null);_w?this.onQuestionAnsweredCorrectly.dispatch(0,null):this.onQuestionAnsweredIncorrectly.dispatch(0,null);return}if(!this._isOpen){this._isOpen=!0;const q=dt.q.instance.game.input,K=q.enabled;q.enabled=!1;const z=dt.q.instance.prodigy.notifications;z.pause(this),z.clearNotifications(),dt.q.instance.prodigy.education.question(((Y,Q,X,Z,J,tt)=>{this._isOpen=!1,q.enabled=K,z.resume(this),this.onQuestionAnswered.dispatch(Y,Q,tt),Y?this.onQuestionAnsweredCorrectly.dispatch(Q,tt):this.onQuestionAnsweredIncorrectly.dispatch(Q,tt)}),{isUserInBattle:!1,allowTutorials:!0})}}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Fa.prototype,"onQuestionAnswered",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Fa.prototype,"onQuestionAnsweredCorrectly",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Fa.prototype,"onQuestionAnsweredIncorrectly",void 0),Fa=(0,Q.Cg)([(0,X.EVk)("OpenQuestionInterface",et.Y.education)],Fa);let Ga=class extends X.uAl{constructor(){super(...arguments),this.onQuestionAnsweredSuccessfully=new X.HN0,this.onAllQuestionsAnswered=new X.HN0,this._remainingQuestions=0}create(){super.create(),this._openQuestionInterfaceComponent&&this._openQuestionInterfaceComponent.onQuestionAnswered.add(this.questionWasAnswered,this),this._remainingQuestions=this._questionCount}destroy(){this._openQuestionInterfaceComponent&&this._openQuestionInterfaceComponent.onQuestionAnswered.remove(this.questionWasAnswered,this),this.onQuestionAnsweredSuccessfully.dispose(),this.onAllQuestionsAnswered.dispose(),super.destroy()}openQuestion(){this._remainingQuestions>0&&this._openQuestionInterfaceComponent.answerQuestion()}setQuestionsRemainingCount(q){this._questionCount=q,this._remainingQuestions=q}getQuestionsRemainingCount(){return this._remainingQuestions}questionWasAnswered(q){q&&(--this._remainingQuestions,this.onQuestionAnsweredSuccessfully.dispatch(this._remainingQuestions),this._remainingQuestions<=0&&this.onAllQuestionsAnswered.dispatch())}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ga.prototype,"onQuestionAnsweredSuccessfully",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ga.prototype,"onAllQuestionsAnswered",void 0),(0,Q.Cg)([(0,X.MnK)(Fa),(0,Q.Sn)("design:type",Fa)],Ga.prototype,"_openQuestionInterfaceComponent",void 0),Ga=(0,Q.Cg)([(0,X.EVk)("AnswerQuestionsAmount",et.Y.education)],Ga);let ja=class extends X.uAl{constructor(){super(...arguments),this._isHorizontal=!1,this._isGlowing=!1}create(){super.create(),this.updateBoardAnimation()}bringToFront(){const q=this._spineAnimator.GameObject.findComponent(gi.v).getRootContainer();q.parent.setChildIndex(q,q.parent.children.length-1)}setHorizontal(q){this._isHorizontal=q,this.updateBoardAnimation()}playGlow(){this._isGlowing=!0,this.updateBoardAnimation()}playGlowRotation(){var q;this._isGlowing=!0,null===(q=this._spineAnimator)||void 0===q||q.playAnimation(this._isHorizontal?this._horizontalGlowingRotationAnimation:this._verticalGlowingRotationAnimation,!1),this._isHorizontal=!this._isHorizontal}clearGlow(){this._isGlowing=!1,this.updateBoardAnimation()}isHorizontal(){return this._isHorizontal}getAnimationName(){return this._isGlowing?this._isHorizontal?this._horizontalGlowingIdleAnimation:this._verticalGlowingIdleAnimation:this._isHorizontal?this._horizontalIdleAnimation:this._verticalIdleAnimation}updateBoardAnimation(){var q;null===(q=this._spineAnimator)||void 0===q||q.playAnimation(this.getAnimationName(),!1)}};(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],ja.prototype,"_spineAnimator",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ja.prototype,"_isHorizontal",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ja.prototype,"_horizontalIdleAnimation",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ja.prototype,"_verticalIdleAnimation",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ja.prototype,"_horizontalGlowingIdleAnimation",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ja.prototype,"_verticalGlowingIdleAnimation",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ja.prototype,"_horizontalGlowingRotationAnimation",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ja.prototype,"_verticalGlowingRotationAnimation",void 0),ja=(0,Q.Cg)([(0,X.EVk)("MinecartTrackSupply",et.Y.adventureFsm)],ja);let $a=class extends X.uAl{constructor(){super(...arguments),this._railOffset=new X.I9Y,this._flipped=!1,this._horizontalBoardOffset=new X.I9Y,this._verticalBoardOffset=new X.I9Y,this._trackBoards=[]}create(){var q,K;super.create();const z=Math.ceil(this._boardCount/this._boardsPerLayer);for(let Q=0;Q0&&this._segment.gameWorld.sendWorldObjectDiscoveredEvent({object_type:Ua.u_.MinecartBridge,object_id:"0",x_coord:null===(q=this._trackBoards[0].GameObject)||void 0===q?void 0:q.transform.worldPosition.x,y_coord:null===(K=this._trackBoards[0].GameObject)||void 0===K?void 0:K.transform.worldPosition.y})}createLayer(q,K){const z=[];for(let Y=0;Y1?Q=this._distanceBetweenBoards:Y>0&&(Q=-this._distanceBetweenBoards),K?q.transform.setPosition(this._horizontalBoardOffset.x,this._horizontalBoardOffset.y+Q):q.transform.setPosition(this._verticalBoardOffset.x+Q,this._verticalBoardOffset.y);const X=q.findComponentInChildren(ja);X.setHorizontal(K),z.push(X)}return z}getBoards(){return this._trackBoards}getRail(){return this._trackRail}getBoardCount(){return this._boardCount}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],$a.prototype,"_boardCount",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],$a.prototype,"_boardsPerLayer",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],$a.prototype,"_boardPrefabID",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],$a.prototype,"_railPrefabID",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],$a.prototype,"_railOffset",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],$a.prototype,"_distanceBetweenBoards",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],$a.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],$a.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],$a.prototype,"_flipped",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],$a.prototype,"_horizontalBoardOffset",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],$a.prototype,"_verticalBoardOffset",void 0),$a=(0,Q.Cg)([(0,X.EVk)("MinecartTrackSuppliesPile",et.Y.adventure)],$a);let Ha=class extends Ke.u{constructor(){super(...arguments),this.castSFX=Ai.c.Sfx_battle,this.onBoardPlaced=new X.HN0,this.onRailPlaced=new X.HN0,this._boardIndex=0}create(){super.create();let q=0;this._suppliesPile&&(q=this._suppliesPile.getBoardCount()),this._answerQuestionAmount&&(this._answerQuestionAmount.setQuestionsRemainingCount(q),this._answerQuestionAmount.onQuestionAnsweredSuccessfully.add(this.placeBoard,this))}destroy(){this._answerQuestionAmount&&this._answerQuestionAmount.onQuestionAnsweredSuccessfully.remove(this.placeBoard,this),this.onBoardPlaced.dispose(),this.onRailPlaced.dispose(),super.destroy()}placeBoard(q){const K=this._suppliesPile.getBoards(),z=this._suppliesPile.getBoardCount()-1,Y=K[z-this._boardIndex],Q=this._boardPositionsParent.children[this._boardIndex].transform;Y.bringToFront();const X=Y.GameObject.parent.transform.worldMatrix,Z=Q.worldMatrix,J=new Ze.Point;X.applyInverse(J,J),Z.apply(J,J),++this._boardIndex,this.execute(132,{game:dt.q.instance.game,supply:Y,sparklesGameObject:this._sparklesGameObject,playerAnimationController:this._mainPlayer.findComponentInChildren(Ba.$),supplyTransform:Y.GameObject.transform,supplyStartingPosition:Y.GameObject.transform.localPosition,supplyPosition:J,rotateSupply:this._isHorizontal===Y.isHorizontal(),morphExpiration:this._mainPlayer.findComponentInChildren(ka)},(()=>{this._boardIndex<=1?this._startingTrackDamage.active=!1:this._boardIndex>=K.length&&(this._endingTrackDamage.active=!1),this.onBoardPlaced.dispatch(),q<=0&&this.placeRail(),this._segment.gameWorld.sendWorldObjectUsedEvent({object_type:Ua.u_.MinecartBridge,object_id:""+(this._boardIndex-1)})}))}hasBoardsRemaining(){return this._boardIndex{this.onRailPlaced.dispatch(),this._segment.playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent($i.lT.Bridge)}))}run(){}};(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Ha.prototype,"castSFX",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ha.prototype,"onBoardPlaced",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ha.prototype,"onRailPlaced",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ha.prototype,"_boardPositionsParent",void 0),(0,Q.Cg)([(0,X.MnK)($a),(0,Q.Sn)("design:type",$a)],Ha.prototype,"_suppliesPile",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ha.prototype,"_xpPerQuestion",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ha.prototype,"_startingTrackDamage",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ha.prototype,"_sparklesGameObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ha.prototype,"_endingTrackDamage",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],Ha.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(Ga),(0,Q.Sn)("design:type",Ga)],Ha.prototype,"_answerQuestionAmount",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Ha.prototype,"_isHorizontal",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Ha.prototype,"_railTransform",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Ha.prototype,"_smokeTrailStart",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],Ha.prototype,"_smokeCloudOffset",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ha.prototype,"_smokeCloudCount",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Ha.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Ha.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],Ha.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.MnK)(fi),(0,Q.Sn)("design:type",fi)],Ha.prototype,"_mapSaveCompletion",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ha.prototype,"_minecartInputObject",void 0),Ha=(0,Q.Cg)([(0,X.EVk)("FixableMinecartTrack",et.Y.adventureFsm)],Ha);let Va=class extends Ke.u{run(){this.execute(142,{game:dt.q.instance.game,playerIdentifier:"MainPlayerGameObject"})}};Va=(0,Q.Cg)([(0,X.EVk)("GolemPostBattleFSM",et.Y.adventureFsm)],Va);z(29638);var Wa=z(98013);let qa=class extends X.uAl{constructor(){super(...arguments),this._imageContainer=null}setData(q){this._drop=q,q&&(Wa.l.removeAll(this._imageContainer.legacyTransform.group,!0),dt.q.instance.prodigy.icon.createFromDataAdvanced(q,this._imageContainer.legacyTransform.group,0,0).catch(X.RQr.createHandler(`LootCardComponent: Failed to create item icon ${q.type}-${q.ID}`)))}getData(){return this._drop}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],qa.prototype,"_imageContainer",void 0),qa=(0,Q.Cg)([(0,X.EVk)("LootCardComponent",et.Y.adventureUi)],qa);let Ka=class extends X.JTX{constructor(){super(...arguments),this._unobtainedItemOpacity=.5}create(){super.create();{const q=this._crystalCavernsState.isBossDefeatedAllTime(this.bossID);if(this.lootCard.active=q,this.lockedGraphic.active=!q,q){const q={type:this.itemType,ID:this.itemID};this.lootCardComponent.setData(q),this._playerProvider.player.isItemOwned(q)||(this.iconContainer.group.alpha=this._unobtainedItemOpacity)}}}};(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",Ui.o)],Ka.prototype,"_crystalCavernsState",void 0),(0,Q.Cg)([(0,X.fFd)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Ka.prototype,"_playerProvider",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ka.prototype,"bossID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ka.prototype,"itemType",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ka.prototype,"itemID",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ka.prototype,"_unobtainedItemOpacity",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ka.prototype,"lootCard",void 0),(0,Q.Cg)([(0,X.MnK)(qa),(0,Q.Sn)("design:type",qa)],Ka.prototype,"lootCardComponent",void 0),(0,Q.Cg)([(0,X.MnK)(X.K16),(0,Q.Sn)("design:type",X.K16)],Ka.prototype,"iconContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ka.prototype,"lockedGraphic",void 0),Ka=(0,Q.Cg)([(0,X.EVk)("ItemSlotStatus",et.Y.adventureUi)],Ka);let za=class extends X.uAl{constructor(){super(...arguments),this.bossID=1,this.bossName="yeti"}create(){super.create(),this.bossStatus.bossID=this.bossID,this.bossStatus.bossName=this.bossName,this.itemSlot1.bossID=this.bossID,this.itemSlot1.itemType=this.item1Type,this.itemSlot1.itemID=this.item1ID,this.itemSlot2.bossID=this.bossID,this.itemSlot2.itemType=this.item2Type,this.itemSlot2.itemID=this.item2ID,this.itemSlot3.bossID=this.bossID,this.itemSlot3.itemType=this.item3Type,this.itemSlot3.itemID=this.item3ID,this.row.bossID=this.bossID}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],za.prototype,"bossID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],za.prototype,"bossName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],za.prototype,"item1Type",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],za.prototype,"item1ID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],za.prototype,"item2Type",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],za.prototype,"item2ID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],za.prototype,"item3Type",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],za.prototype,"item3ID",void 0),(0,Q.Cg)([(0,X.MnK)(Pa),(0,Q.Sn)("design:type",Pa)],za.prototype,"bossStatus",void 0),(0,Q.Cg)([(0,X.MnK)(Ka),(0,Q.Sn)("design:type",Ka)],za.prototype,"itemSlot1",void 0),(0,Q.Cg)([(0,X.MnK)(Ka),(0,Q.Sn)("design:type",Ka)],za.prototype,"itemSlot2",void 0),(0,Q.Cg)([(0,X.MnK)(Ka),(0,Q.Sn)("design:type",Ka)],za.prototype,"itemSlot3",void 0),(0,Q.Cg)([(0,X.MnK)(Fi),(0,Q.Sn)("design:type",Fi)],za.prototype,"row",void 0),za=(0,Q.Cg)([(0,X.EVk)("InitRewardRow",et.Y.adventureUi)],za);let Ya=class extends X.uAl{constructor(){super(...arguments),this.onTutorialCompleted=new X.HN0}create(){super.create(),this._fixTrackComponent&&(this._fixTrackComponent.onBoardPlaced.addOnce(this.showFirstQuestionCorrectDialogue,this),this._fixTrackComponent.onRailPlaced.add(this.onTutorialCompleted.dispatch,this.onTutorialCompleted))}destroy(){this._fixTrackComponent&&(this._fixTrackComponent.onBoardPlaced.remove(this.showFirstQuestionCorrectDialogue,this),this._fixTrackComponent.onRailPlaced.remove(this.onTutorialCompleted.dispatch,this.onTutorialCompleted)),this.onTutorialCompleted.dispose(),super.destroy()}showSuppliesPileGuideHand(){this._guideHand.active=!0,this._guideHand.findComponent(Ue).updatePosition(this._suppliesPileLocation.localPosition)}showMinecartGuideHand(){this._guideHand.active=!0,this._guideHand.findComponent(Ue).updatePosition(this._minecartLocation.localPosition)}questionAnswered(q){this._guideHand.active=!1,q||(this._answerQuestionAmount.getQuestionsRemainingCount()>1?this._firstQuestionIncorrectDialogue.play():this._secondQuestionIncorrectDialogue.play())}completeTutorial(){this._tutorialSaveState.completeMapObject()}showFirstQuestionCorrectDialogue(){this._firstQuestionCorrectDialogue.play()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ya.prototype,"onTutorialCompleted",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ya.prototype,"_guideHand",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Ya.prototype,"_suppliesPileLocation",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Ya.prototype,"_minecartLocation",void 0),(0,Q.Cg)([(0,X.MnK)(Di),(0,Q.Sn)("design:type",Di)],Ya.prototype,"_firstQuestionCorrectDialogue",void 0),(0,Q.Cg)([(0,X.MnK)(Di),(0,Q.Sn)("design:type",Di)],Ya.prototype,"_firstQuestionIncorrectDialogue",void 0),(0,Q.Cg)([(0,X.MnK)(Di),(0,Q.Sn)("design:type",Di)],Ya.prototype,"_secondQuestionIncorrectDialogue",void 0),(0,Q.Cg)([(0,X.MnK)(Ga),(0,Q.Sn)("design:type",Ga)],Ya.prototype,"_answerQuestionAmount",void 0),(0,Q.Cg)([(0,X.MnK)(Ha),(0,Q.Sn)("design:type",Ha)],Ya.prototype,"_fixTrackComponent",void 0),(0,Q.Cg)([(0,X.Cdj)("IntroMinecartSave"),(0,Q.Sn)("design:type",fi)],Ya.prototype,"_tutorialSaveState",void 0),Ya=(0,Q.Cg)([(0,X.EVk)("MinecartFixingTutorialFSM",et.Y.adventureFsm)],Ya);var Qa=z(30488);let Xa=class extends Ke.u{create(){super.create(),this._minecartFixingTutorial.onTutorialCompleted.add(this._mapSaveState.completeMapObject,this._mapSaveState)}destroy(){this._minecartFixingTutorial.onTutorialCompleted.remove(this._mapSaveState.completeMapObject,this._mapSaveState),super.destroy()}run(){this.execute(144,{game:dt.q.instance.game,aspenExclamation:this._aspenExclamationMark,startTrigger:this._startTrigger,aspenStoreMarker:this._aspenStoreMarker,playerTransform:this._mainPlayer.transform,playerAspenPosition:this._startPosition.worldPosition,minecartFixingTutorial:this._minecartFixingTutorial})}};(0,Q.Cg)([(0,X.MnK)(Qa.E),(0,Q.Sn)("design:type",Qa.E)],Xa.prototype,"_startTrigger",void 0),(0,Q.Cg)([(0,X.MnK)(fi),(0,Q.Sn)("design:type",fi)],Xa.prototype,"_mapSaveState",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Xa.prototype,"_aspenExclamationMark",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Xa.prototype,"_aspenStoreMarker",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Xa.prototype,"_startPosition",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],Xa.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("IntroMinecartFixing"),(0,Q.Sn)("design:type",Ya)],Xa.prototype,"_minecartFixingTutorial",void 0),Xa=(0,Q.Cg)([(0,X.EVk)("MinecartIntroTutorialFSM",et.Y.adventureFsm)],Xa);let Za=class extends X.uAl{constructor(){super(...arguments),this._hideStartButton=!0,this._onMapClose=new X.HN0}destroy(){this._onMapClose.dispose(),super.destroy()}open(){dt.q.instance.prodigy.open.adventureMap(this._hideStartButton,(()=>{this._onMapClose.dispatch()}))}};var Ja;(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Za.prototype,"_hideStartButton",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Za.prototype,"_onMapClose",void 0),Za=(0,Q.Cg)([(0,X.EVk)("OpenAdventureMap",et.Y.adventureUi)],Za);let tr=Ja=class extends X.uAl{constructor(){super(...arguments),this.onHide=new X.HN0,this.onShow=new X.HN0,this._isShowing=!0}static make(q,K,z){const Y=q.addComponent(Ja,!1);return Y._trackObject=K,Y._relativeBounds=z,Y.create(),Y}get isShowing(){return this._isShowing}create(){super.create();{const q=X.i7d.main;if(!q)return;const K=q.viewportSize;this._cameraTransform=q.GameObject.transform,this._cameraHalfWidth=K.getHalfWidth(),this._cameraHalfHeight=K.getHalfHeight(),this._cameraTransform.onWorldMatrixChanged.add(this.cull,this),this._trackObject.onWorldMatrixChanged.add(this.cull,this),this.cull()}}destroy(){var q,K;null===(q=this._cameraTransform)||void 0===q||q.onWorldMatrixChanged.remove(this.cull,this),null===(K=this._trackObject.onWorldMatrixChanged)||void 0===K||K.remove(this.cull,this),this.onHide.dispose(),this.onShow.dispose(),super.destroy()}cull(){const q=this._cameraTransform.worldPosition,K=this._trackObject.worldPosition,z=K.x-q.x,Y=K.y-q.y,Q=this._relativeBounds,X=z+Q.left-this._cameraHalfWidth&&Y+Q.top-this._cameraHalfHeight;this._isShowing!==X&&(X?this.onShow.dispatch():this.onHide.dispatch()),this._isShowing=X}};(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],tr.prototype,"_trackObject",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],tr.prototype,"_relativeBounds",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],tr.prototype,"onHide",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],tr.prototype,"onShow",void 0),tr=Ja=(0,Q.Cg)([(0,X.EVk)("DynamicObjectCameraCulling",et.Y.map)],tr);let er=class extends X.uAl{constructor(){super(...arguments),this._hasValidPath=!1}create(){super.create(),this._followLocomotion&&this._followLocomotion.onPathStart.add(this.followLocomotionStarted,this),this._minFollowDistanceSq=this._minFollowDistance*this._minFollowDistance,this._maxFollowDistanceSq=this._maxFollowDistance*this._maxFollowDistance}destroy(){this._followLocomotion&&(this._followLocomotion.onPathStart.remove(this.followLocomotionStarted,this),this._followLocomotion=null),super.destroy()}update(){if(super.update(),this._followLocomotion){const q=this._followLocomotion.GameObject.transform.worldPosition,K=this._targetLocomotion.GameObject.transform.worldPosition,z=X.C1c.getDistanceSq(q,K);this._hasValidPath?zthis._maxFollowDistanceSq&&this.updateFollowPath(K,q)}}setFollowDistance(q,K){this._minFollowDistance=q,this._maxFollowDistance=K,this._minFollowDistanceSq=q*q,this._maxFollowDistanceSq=K*K}setFollowLocomotion(q){this._followLocomotion&&this._followLocomotion.onPathStart.remove(this.followLocomotionStarted,this),(0,wt.v)(!!q,"Invalid pathLocomotion was set"),this._followLocomotion=q,this._followLocomotion.onPathStart.add(this.followLocomotionStarted,this)}followLocomotionStarted(){this._hasValidPath?this.updateFollowPath(this._targetLocomotion.GameObject.transform.worldPosition,this._followLocomotion.GameObject.transform.worldPosition):this._hasValidPath=!1}updateFollowPath(q,K){var z,Y;const Q=this._pathfinder?this._pathfinder.findPath(q,K):null===(z=X.W$e.instance.game.navMeshSystem.navMesh)||void 0===z?void 0:z.findPath(q,K);if(!Q)return;const Z=null===(Y=this._followLocomotion.getPath())||void 0===Y?void 0:Y.slice(this._followLocomotion.currentPathSegment+1);this._targetLocomotion.setPath([...Q,...null!=Z?Z:[]]),this._hasValidPath=!0}};var ir;(0,Q.Cg)([(0,X.MnK)(X.KhP),(0,Q.Sn)("design:type",X.KhP)],er.prototype,"_followLocomotion",void 0),(0,Q.Cg)([(0,X.MnK)(X.KhP),(0,Q.Sn)("design:type",X.KhP)],er.prototype,"_targetLocomotion",void 0),(0,Q.Cg)([(0,X.Cdj)("Pathfinder"),(0,Q.Sn)("design:type",X.wGs)],er.prototype,"_pathfinder",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],er.prototype,"_minFollowDistance",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],er.prototype,"_maxFollowDistance",void 0),er=(0,Q.Cg)([(0,X.EVk)("FollowPathLocomotion",et.Y.motion)],er);let sr=ir=class extends X.uAl{constructor(){super(...arguments),this._petFollowCount=0,this._followSpawnOffset=new X.I9Y,this._minimumFollowDistance=0,this._maximumFollowDistance=0,this._currentFollows=[],this._spawnedPetFollows=[],this._nextPathLocomotion=null}get spawnedPetFollows(){return this._spawnedPetFollows}get petFollowCount(){return this._petFollowCount}create(){super.create(),this._nextPathLocomotion=this._playerPathLocomotion}destroy(){this._playerPathLocomotion=null,super.destroy()}spawnBuddyFollow(q){const K=ae.t.getItem("follow",q);if(!K)return;const z=K.metadata;let Y=null,Q=q;"legacy"===z.type?Y="legacy":"spine"===z.type?Y="spine":"pet"===z.type&&(Y="pet",Q=z.petID),(0,wt.v)(null!==Y,`Invalid buddy follow was attempted to load with ID: ${q}`);const Z=this._prefabAppearanceLoader.loadFollowPrefab(Y,Q,this._followParent);this._followParent||X.wa5.getActiveScene().addGameObject(Z),this.initializeFollowPrefab(Z),this._nextPathLocomotion=Z.findComponentInChildren(X.KhP)}spawnPetFollow(q){const K=this._prefabAppearanceLoader.loadFollowPrefab("pet",q,this._followParent);this._followParent||X.wa5.getActiveScene().addGameObject(K),this.initializeFollowPrefab(K),this._nextPathLocomotion=K.findComponentInChildren(X.KhP),this._spawnedPetFollows.push(q)}destroyCurrentFollows(){const q=this._currentFollows.length;if(q>0){for(let K=0;K0){dt.q.instance.game.broadcaster.addAppListener(Xn.ig.Evolved,this.petEvolved,this,null);for(const q of this.getPetsToFollow())this._followSpawner.spawnPetFollow(q)}const Y=this._playerData.player,Q=Y.equipment.getFollow();if(X.Aq$.isDefined(Q)){const X=null===(K=null===(q=ae.t.getItem("follow",Q))||void 0===q?void 0:q.metadata)||void 0===K?void 0:K.petID,Z=null===(z=ae.t.getItem("pet",X))||void 0===z?void 0:z.data;if((null==Z?void 0:Z.unlockFollow)&&(null==Z?void 0:Z.unlockFollow)===Q){const q=Y.kennel.amountOfPet(X),K=Y.kennel.getPetTeamIDs()[0]===X;(this._petFollowCount<=0||q>=2||!K)&&this._followSpawner.spawnPetFollow(X)}else this._followSpawner.spawnBuddyFollow(Q)}}unloadFollows(){dt.q.instance.game.broadcaster.removeAppListener(Xn.ig.Evolved,this,null),dt.q.instance.game.broadcaster.removeAppListener(Xn.Y1.ClosePetsMenu,this),this._followSpawner.destroyCurrentFollows()}getPetsToFollow(){if(this._petFollowCount<1)return[];const q=this._playerData.player.kennel.getPetTeamIDs();return q.length=Math.min(q.length,this._petFollowCount),q}petEvolved(q){this._playerData.player.kennel.petTeam.indexOf(q)>-1&&this.reloadFollows()}petMenuClosed(){const q=this._followSpawner.spawnedPetFollows,K=this.getPetsToFollow();(q.length!==K.length||q.some(((q,z)=>K[z]!==q)))&&this.reloadFollows()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],nr.prototype,"_petFollowCount",void 0),(0,Q.Cg)([(0,X.MnK)(sr),(0,Q.Sn)("design:type",sr)],nr.prototype,"_followSpawner",void 0),(0,Q.Cg)([(0,X.Cdj)("1eb-d7b4"),(0,Q.Sn)("design:type",Object)],nr.prototype,"_playerData",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],nr.prototype,"_loadOnCreate",void 0),nr=(0,Q.Cg)([(0,X.EVk)("PlayerPetAndFollowLoader",et.Y.follow)],nr);let ar=class extends Ke.u{constructor(){super(...arguments),this._monsterJumpHeight=80}run(){const q=new X.I9Y;q.copyFrom(this._crystalMonster.transform.worldPosition);const K=new X.I9Y(q.x,q.y-this._monsterJumpHeight);this.execute(131,{game:dt.q.instance.game,playerObject:this._mainPlayer,playerStartPosition:this._initialPlayerPosition.worldPosition,playerTransform:this._mainPlayer.transform,camera:X.i7d.main.GameObject,playerWalkTarget:this._playerWalkTarget.worldPosition,nootWalkTarget:this._nootWalkTarget.worldPosition,playerFollowSpawner:this._mainPlayer.findComponentInChildren(nr),nootTransform:this._nootGameObject.transform,nootAlertBubble:this._nootAlertBubble,playerAlertBubble:this._playerAlertBubble,nootQuestionBubble:this._nootQuestionBubble,monsterSpineTransform:this._crystalMonsterSpine.transform,monsterAlertBubble:this._crystalMonsterAlertBubble,monsterTransform:this._crystalMonster.transform,monsterJumpEnd:K,monsterJumpStart:q,monsterOffscreenPosition:this._monsterOffscreenPosition.worldPosition,monsterSpine:this._crystalMonsterSpine.findComponent(gi.v).getSpine(),nootGraphic:this._nootGraphic})}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ar.prototype,"_nootGameObject",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],ar.prototype,"_initialPlayerPosition",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],ar.prototype,"_playerWalkTarget",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],ar.prototype,"_nootWalkTarget",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ar.prototype,"_nootQuestionBubble",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ar.prototype,"_nootAlertBubble",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ar.prototype,"_playerAlertBubble",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ar.prototype,"_crystalMonster",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ar.prototype,"_crystalMonsterSpine",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ar.prototype,"_monsterJumpHeight",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ar.prototype,"_crystalMonsterAlertBubble",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],ar.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],ar.prototype,"_monsterOffscreenPosition",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],ar.prototype,"_nootGraphic",void 0),ar=(0,Q.Cg)([(0,X.EVk)("Phase1IntroFSM",et.Y.adventureFsm)],ar);var rr,or=z(88818),hr=z(24110),cr=z(63068);let dr=rr=class extends Ke.u{constructor(){super(...arguments),this.minecartSoundEffect=Ai.c.Sfx_minecart,this.minecartStopSoundEffect=Ai.c.Sfx_minecartstop,this._gearElement=new X.KDe}create(){super.create(),this._gearElement.hiddenSlots.push(or.Cj.Weapon),this._minecartAnimator&&this._minecartSpine&&(this.playIdleAnimation(),this._minecartSpine.getSpine()?this.createMask():this._minecartSpine.OnLoaded.add(this.createMask,this,0,!1))}destroy(){this._mask&&this._mask.destroy(),super.destroy()}run(){var q;null===(q=this._mainPlayer.findComponentInChildren(cr.n))||void 0===q||q.addExtraGear(this._gearElement);const K=new Ze.Point;this._mainPlayer.parent.transform.worldMatrix.applyInverse(K,K),this._minecartEntryPoint.worldMatrix.apply(K,K);const z=new Ze.Point;this.GameObject.parent.transform.worldMatrix.applyInverse(z,z),this._minecartDestination.worldMatrix.apply(z,z);const Y=new Ze.Point;this._mainPlayer.parent.transform.worldMatrix.applyInverse(Y,Y),this._minecartExit.worldMatrix.apply(Y,Y);const Q=new X.I9Y;Q.copyFrom(this.GameObject.transform.localPosition);const Z=new X.I9Y(z.x-Q.x,z.y-Q.y);this.execute(134,{game:dt.q.instance.game,playerAnimationController:this._mainPlayer.findComponentInChildren(Ba.$),playerTransform:this._mainPlayer.transform,minecartInput:this._minecartInput,minecartEntryPosition:K,minecartEntryDuration:this._minecartEntryDuration,minecart:this,minecartTransform:this.GameObject.transform,minecartFrom:Q,minecartDestination:z,minecartRideDuration:this._minecartRideDuration,playerMinecartDestination:new X.I9Y(K.x+Z.x,K.y+Z.y),minecartAnimator:this._minecartAnimator,minecartExitDuration:this._minecartExitDuration,minecartExitPosition:Y,saveState:this._mapSaveComponent,minecartStopOffset:this._minecartRideDuration-100,morphExpiration:this._mainPlayer.findComponentInChildren(ka),playerSpawnFollows:this._mainPlayer.findComponentInChildren(sr),playerFollowLoader:this._mainPlayer.findComponentInChildren(nr)})}checkTrackCompletion(){this._minecartTrackSaveState&&!this._minecartTrackSaveState.isCompleted()||(this._minecartInput.active=!0)}playMotionAnimation(){this._minecartAnimator.playAnimation(`${rr.ANIMATION_NAMES[this._minecartMovementDirection]}-motion`,!0)}playIdleAnimation(){this._minecartAnimator.playAnimation(`${rr.ANIMATION_NAMES[this._minecartMovementDirection]}-idle`,!0)}applyMaskToPlayer(){const q=this._mainPlayer.findComponentInChildren(hr.B);this._mask.visible=!0,q.getRootContainer().mask=this._mask}clearPlayerMask(){const q=this._mainPlayer.findComponentInChildren(hr.B);this._mask.visible=!1,q.getRootContainer().mask=null}addPlayerWeapon(){var q;null===(q=this._mainPlayer.findComponentInChildren(cr.n))||void 0===q||q.removeExtraGear(this._gearElement)}createMask(){const q=this._minecartSpine.getSlot(this._maskSlotName),K=this._minecartSpine.getSpine().getSlotContainer(q),z=K.getChildAt(0),Y=new X.or0(K.width/K.scale.x,K.height/K.scale.y);z.visible=!1,this._mask=dt.q.instance.game.add.graphics(),this._mask.clear(),this._mask.visible=!1,this._mask.beginFill(16776960,1),this._mask.drawRect(.5*-Y.width+z.position.x,.5*-Y.height+z.position.y,Y.width,Y.height),this._mask.endFill(),K.addChild(this._mask)}};dr.ANIMATION_NAMES={0:"X",1:"Y-D",2:"Y-U"},(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],dr.prototype,"minecartSoundEffect",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],dr.prototype,"minecartStopSoundEffect",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],dr.prototype,"_minecartAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],dr.prototype,"_minecartSpine",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],dr.prototype,"_minecartMovementDirection",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],dr.prototype,"_maskSlotName",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],dr.prototype,"_minecartEntryPoint",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],dr.prototype,"_minecartDestination",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],dr.prototype,"_minecartExit",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],dr.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(fi),(0,Q.Sn)("design:type",fi)],dr.prototype,"_minecartTrackSaveState",void 0),(0,Q.Cg)([(0,X.MnK)(fi),(0,Q.Sn)("design:type",fi)],dr.prototype,"_mapSaveComponent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],dr.prototype,"_minecartInput",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],dr.prototype,"_minecartEntryDuration",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],dr.prototype,"_minecartRideDuration",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],dr.prototype,"_minecartExitDuration",void 0),dr=rr=(0,Q.Cg)([(0,X.EVk)("RideableMinecart",et.Y.adventureFsm)],dr);const lr={[Ks.D.MEMBERSHIP_UPGRADE_REWARD_SMALL]:200,[Ks.D.MEMBERSHIP_UPGRADE_REWARD_MEDIUM]:225,[Ks.D.MEMBERSHIP_UPGRADE_REWARD_LARGE]:575};var ur,fr=z(48235);!function(q){q.UpgradeMagicoinAmountCore="UPGRADE_MAGICOIN_AMOUNT_CORE",q.UpgradeMagicoinAmountPlus="UPGRADE_MAGICOIN_AMOUNT_PLUS",q.UpgradeMagicoinAmountPlusCumulative="UPGRADE_MAGICOIN_AMOUNT_PLUS_CUMULATIVE",q.UpgradeMagicoinAmountUltra="UPGRADE_MAGICOIN_AMOUNT_ULTRA",q.UpgradeMagicoinAmountUltraCumulative="UPGRADE_MAGICOIN_AMOUNT_ULTRA_CUMULATIVE"}(ur||(ur={}));let br=class extends Yi.z{create(){super.create(),this._bindOnCreate&&this.bindContext().catch(X.RQr.createHandler("[MembershipUpgradeRewardDataProvider] Unable to bind context"))}bindContext(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield fr.W.getCollectedRewardsData(),K=this.getMagicoinRewardQuantityForFeature(q,Ks.D.MEMBERSHIP_UPGRADE_REWARD_SMALL),z=this.getMagicoinRewardQuantityForFeature(q,Ks.D.MEMBERSHIP_UPGRADE_REWARD_MEDIUM),Y=this.getMagicoinRewardQuantityForFeature(q,Ks.D.MEMBERSHIP_UPGRADE_REWARD_LARGE);Ht.d.updateInjectedValues(this.gameObject,{[ur.UpgradeMagicoinAmountCore]:K,[ur.UpgradeMagicoinAmountPlus]:z,[ur.UpgradeMagicoinAmountPlusCumulative]:K+z,[ur.UpgradeMagicoinAmountUltra]:Y,[ur.UpgradeMagicoinAmountUltraCumulative]:K+z+Y})}))}getMagicoinRewardQuantityForFeature(q,K){return X.Aq$.isDefined(q.rewarded[K])?0:lr[K]}destroy(){this.unbindContext(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],br.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],br.prototype,"_bindOnCreate",void 0),br=(0,Q.Cg)([(0,X.EVk)("MembershipUpgradeRewardDataProvider",X.YH6.injection)],br);var pr,vr=z(30405);!function(q){q.QuestManager="QuestManager",q.TaskInfo="TASK_INFO",q.TaskRepeatableIndex="TASK_REPEATABLE_INDEX",q.TaskIndex="TASK_INDEX",q.TaskInProgressIndex="TASK_IN_PROGRESS_INDEX"}(pr||(pr={}));var gr,mr=z(60031),yr=z(43518);!function(q){q.COMPLETE="complete",q.IN_PROGRESS="in-progress",q.LOCKED="locked"}(gr||(gr={}));let _r=class extends Yi.z{constructor(){super(...arguments),this.onAnimateCard=new X.HN0,this.onRefreshCards=new X.HN0,this.isCollecting=!1}create(){super.create(),this.bindContext().catch(X.RQr.createHandler("[DailyLoginCalendarCardComponent] Unable to retrieve daily login calendar metadata"))}postCreate(){super.postCreate(),this.runCalcTimeToCollect().catch(X.RQr.createHandler("[DailyLoginCalendarCardComponent] Unable to calculate time to collect"))}destroy(){this.onAnimateCard.dispose(),this.onRefreshCards.dispose(),super.destroy()}bindContext(){const q=Object.create(null,{bindContext:{get:()=>super.bindContext}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q,X;q.bindContext.call(this),this._task=this._context.Container.get(pr.TaskInfo),this._indexOfTaskInProgress=this._context.Container.get(pr.TaskInProgressIndex);const Z=this._dataProvider.player.hasMembership(),J=this._task.taskProgress.results,tt="complete"===this._task.taskProgress.status,et=this._index===this._indexOfTaskInProgress,it=null===(K=null==J?void 0:J[this._repeatableIndex])||void 0===K?void 0:K.result,st="in-progress"===this._task.taskProgress.status&&(null!==(Q=null===(Y=null===(z=this._task.taskProgress)||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.timesCompleted)&&void 0!==Q?Q:0)>this._repeatableIndex,nt=!Z&&(tt||st)&&"ItemsSaved"===it,at=(tt||st)&&"ItemsLost"===it,rt=tt&&void 0===J||tt&&Z&&"ItemsSaved"===it||st&&!nt&&!at,ot=this._timeManager.getServerTimeMs(),ht=et?yield yr.M.getProgressOfTaskInProgress(this._task):0,ct=Math.max(ht-ot,0),dt=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate,lt=yield yr.M.getProgressOfTaskInProgress(),ut=Math.min(lt,dt)===dt,ft=ot>=dt,bt=Object.assign(Object.assign({},this.getPrizes()),{IN_PROGRESS_TIME:ct,SHOW_TIMER:!!ct,SHOW_COLLECT_BUTTON:et&&!ut&&!ft,ENABLE_COLLECT_BUTTON:!ft&&!this.isCollecting&&et&&ct<=0,IS_READY_TO_COLLECT:!ft&&ct<=0,LABEL_COLLECTED:tt||st,MEMBER_LABEL_COLLECTED:rt,MEMBER_LABEL_SAVED:nt,MEMBER_LABEL_LOST:at,TASK_PROGRESS:this.taskProgressStatus(ut||ft),SHOW_CALENDAR_ENDING:et&&(ut||ft),IS_REPEATED_TASK:null===(X=this._task.taskDefinition)||void 0===X?void 0:X.repeatable,CARD_INDEX:`${this._index}`});Ht.d.updateInjectedValues(this.gameObject,bt)}))}isTaskReadyToBeCollect(){return(0,Q.sH)(this,void 0,void 0,(function*(){return yr.M.isTaskReadyToCollect()}))}runCalcTimeToCollect(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._index===this._indexOfTaskInProgress,K=this._timeManager.getServerTimeMs(),z=q?yield yr.M.getProgressOfTaskInProgress(this._task):0,Y=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate,Q=K>=Y,X=Y{this.onTaskCollectAnimationEnded.dispatch()},this.refreshRewardCards=()=>(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this.getTasks();this._rewardCards.forEach(((K,z)=>{const Y=z>=q.length?q[q.length-1]:q[z],Q={[pr.TaskInfo]:Y,[pr.TaskInProgressIndex]:this.getCurrentQuestIndex(q)};Ht.d.updateInjectedValues(K,Q);const Z=this.getCard(K);null==Z||Z.bindContext().catch(X.RQr.createHandler("[DailyLoginCalendarRewardsComponent]: Could not rebind context for reward cards")),null==Z||Z.runCalcTimeToCollect().catch(X.RQr.createHandler("[DailyLoginCalendarCardComponent] Unable to calculate time to collect"))}))}))}create(){super.create(),this.onLoadingStart.dispatch(),this.populateRewardCards().then((()=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.scrollToInProgress()})))).catch(X.RQr.createHandler("Error populating prizes")),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.onDataChangedCallback,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.add(this.onTimeUpdatedCallback,this),this.onMouseWheelHandler=this.onMouseWheelCallback.bind(this),dt.q.instance.game.input.mouse.addMouseWheelCallback(this.onMouseWheelHandler)}onTimeUpdatedCallback(){(()=>(0,Q.sH)(this,void 0,void 0,(function*(){yield this.updateTasks(),yield this.refreshRewardCards()})))().catch(X.RQr.createHandler("Error updating time on DailyLoginCalendarRewardsComponent"))}onDataChangedCallback(){(()=>(0,Q.sH)(this,void 0,void 0,(function*(){if((yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).uuid===this.currentUUID){if(yield this.checkPrizeCollectAnimation()){this.updateCurrentGameObjectInjections(),this.onTriggerTaskCollectAnimation.dispatch(),yield this.waitForSignal(this.onTaskCollectAnimationEnded);const q=this.getCard(this._currentTaskGameObject);null==q||q.onAnimateCard.dispatch(),yield this.waitForSignal(this.onTaskCollectAnimationEnded),yield vr.o.wait(1e3)}yield this.updateTasks(),yield this.refreshRewardCards(),yield this.updateCurrentTaskIndex(),this.onAnimationsFinished.dispatch()}else this.resetComponent()})))().catch(X.RQr.createHandler("Error updating data onDataChangedCallback"))}resetComponent(){this.onLoadingStart.dispatch(),this._container.children.forEach((q=>{q.active=!1,q.destroyDeferred()})),this._questTasks.length=0,this._rewardCards.length=0,this.populateRewardCards().then((()=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.scrollToInProgress()})))).catch(X.RQr.createHandler("Error populating prizes"))}checkPrizeCollectAnimation(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this.getCurrentQuestIndex(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack());return this._cachedCurrentIndex!==q}))}waitForSignal(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return new Promise((K=>{q.addOnce((()=>{K()}))}))}))}populateRewardCards(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;this._container.children.length=0;const X=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata();this.currentUUID=X.uuid;const Z=[],J=yield this.getTasks();for(const Q of J){const X=null!==(K=null===(q=Q.taskDefinition)||void 0===q?void 0:q.repeatable)&&void 0!==K&&K;if(X&&"number"==typeof X)for(let q=0;q(0,Q.sH)(this,[q,K],void 0,(function*({repeatableIndex:q,task:K},z){return yield vr.o.wait(10*z),this.instantiateChild(K,z,q,J)}))))),this._rewardCards.forEach((q=>{this._container.addChild(q),q.active=!0})),this._rewardCards}))}updateTasks(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._questTasks=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack(),this._questTasks}))}getTasks(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;return(null===(q=this._questTasks)||void 0===q?void 0:q.length)||(yield this.updateTasks()),this._questTasks}))}instantiateChild(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.CardDailyLoginCalendar,{[pr.TaskInfo]:q,[pr.TaskRepeatableIndex]:z,[pr.TaskIndex]:K,[pr.TaskInProgressIndex]:this.getCurrentQuestIndex(Y)});return Q.active=!1,Q.name=`${Q.name} ${q.taskID}`,Q}))}scrollToInProgress(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this._scrollViewRef||!this._gridLayoutRef)return;const q=this._container.children,K=yield this.updateCurrentTaskIndex(),z=X.Htv.getWidth(q[0]),Y=this._gridLayoutRef.columnSpacing,Q=(z+Y)*K-X.Htv.getWidth(this._scrollViewRef.GameObject)/2+z/2+2*Y;this._scrollViewRef.setScrollPosition(-Q),this.updateCurrentGameObjectInjections(),this.onLoadingEnd.dispatch()}))}updateCurrentTaskIndex(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._container.children,K=this.getCurrentQuestIndex(yield this.getTasks());return this._cachedCurrentIndex=K,this._currentTaskGameObject=q[K],this.updateCurrentGameObjectInjections(),K}))}updateCurrentGameObjectInjections(){var q,K;this._prefabRoot&&Ht.d.updateInjectedValues(this._prefabRoot,{CURRENT_TASK_GAME_OBJECT:this._currentTaskGameObject,CURRENT_TASK_COLLECT_BUTTON_GAME_OBJECT:null===(K=null===(q=this._currentTaskGameObject)||void 0===q?void 0:q.findChildByName("PrizeSlots"))||void 0===K?void 0:K.findChildByName("Button Collect")})}getCurrentQuestIndex(q){var K,z;let Y=q.findIndex((q=>"in-progress"===q.taskProgress.status));return q[Y].taskDefinition.repeatable&&(Y+=null!==(z=null===(K=q[Y].taskProgress.data)||void 0===K?void 0:K.timesCompleted)&&void 0!==z?z:0),Y}getCard(q){if(!q||q.isDestroyed)return null;const K=q.findComponent(_r);return K||(X.VyI.log("%c DailyLoginCalendarRewardsComponent getCard `card` %O not found to `.bindContext`, or destroyed",X.$bb.Error,"color: #00FF00; background: #000;",K),null)}isTaskReadyToBeCollect(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.refreshRewardCards(),yield this.updateCurrentTaskIndex();const q=this.getCard(this._currentTaskGameObject),K=yield yr.M.hasStandardTrackEnded();this.onTaskPrizeReady.dispatch(!K&&!!(null==q?void 0:q.isTaskReadyToBeCollect()))}))}onMouseWheelCallback(){this._rewardPopover.active&&(this._rewardPopover.active=!1)}destroy(){this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.onDataChangedCallback,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.remove(this.onTimeUpdatedCallback,this),dt.q.instance.game.input.mouse.removeMouseWheelCallback(this.onMouseWheelHandler),this.onAnimationsFinished.dispose(),this.onTaskCollectAnimationEnded.dispose(),this.onTriggerTaskCollectAnimation.dispose(),this.onTaskPrizeReady.dispose(),this.onLoadingStart.dispose(),this.onLoadingEnd.dispose(),super.destroy()}};var wr;(0,Q.Cg)([(0,X.ERr)(),(0,X.YLv)("Prefab Root to dispatch some injections"),(0,Q.Sn)("design:type",X._mx)],Er.prototype,"_prefabRoot",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,X.YLv)("Root container for the Reward Cards"),(0,Q.Sn)("design:type",X._mx)],Er.prototype,"_container",void 0),(0,Q.Cg)([(0,X.MnK)($t.C),(0,X.YLv)("Reference to the `StandardScrollView` to be navigated"),(0,Q.Sn)("design:type",$t.C)],Er.prototype,"_scrollViewRef",void 0),(0,Q.Cg)([(0,X.MnK)(pt),(0,Q.Sn)("design:type",pt)],Er.prototype,"_gridLayoutRef",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Er.prototype,"_rewardPopover",void 0),(0,Q.Cg)([(0,X.Cdj)("f33-d276"),(0,Q.Sn)("design:type",mr.k)],Er.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Er.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Er.prototype,"onLoadingStart",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Er.prototype,"onLoadingEnd",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Er.prototype,"onTriggerTaskCollectAnimation",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Er.prototype,"onTaskPrizeReady",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Er.prototype,"onAnimationsFinished",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,X.i0J)(X.Z$z.SingleImage),(0,Q.Sn)("design:type",String)],Er.prototype,"preloadSingleImage",void 0),Er=(0,Q.Cg)([(0,X.EVk)("DailyLoginCalendarRewards",void 0,"Populate items for DailyLoginCalendar")],Er);let Tr=wr=class extends X.uAl{constructor(){super(...arguments),this._playNotificationSfx=new X.HN0,this.isCalendarEnded=new X.HN0}create(){super.create(),this._broadcaster=dt.q.instance.prodigy.game.broadcaster,this._runOnCreate&&this.run().catch(X.RQr.createHandler("Error running Daily Login Calendar Timer Data Provider")),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.onDataChanges,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.add(this.onDataChanges,this)}onDataChanges(){wr._hasPlayedNotificationSfx=!1,this.run().catch(X.RQr.createHandler("Error running Daily Login Calendar Timer Data Provider"))}run(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._timeManager.getServerTimeMs(),K=yield this._dailyLoginCalendarQuestManager.getTimerData();if(K.calendarEnded)return void this._broadcaster.broadcast(Xn.rF.CalendarEnded,dt.q.instance.prodigy.game,[]);const z=K.targetDate>q?Xn.rF.CountdownStarted:Xn.rF.ReadyToCollect,Y=[K.targetDate-q];this._broadcaster.broadcast(z,dt.q.instance.prodigy.game,Y),K.calendarIsEnding&&this._broadcaster.broadcast(Xn.rF.CalendarEnding,dt.q.instance.prodigy.game,[]),z===Xn.rF.ReadyToCollect&&!wr._hasPlayedNotificationSfx&&this.IsActiveInHierarchy&&dt.q.instance.prodigy.world.getCurrentZone()!==Yt.A_.CRYSTALCAVERNS&&(wr._hasPlayedNotificationSfx=!0,this._playNotificationSfx.dispatch())}))}hasCalendarEnded(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=(yield yr.M.hasUltimateTrackEnded())&&(yield yr.M.hasStandardTrackEnded());return this.isCalendarEnded.dispatch(q),q}))}destroy(){super.destroy(),this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.onDataChanges,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.remove(this.onDataChanges,this),this.isCalendarEnded.dispose(),this._playNotificationSfx.dispose()}};Tr._hasPlayedNotificationSfx=!1,(0,Q.Cg)([(0,X.Cdj)("0f2-d6bd"),(0,Q.Sn)("design:type",nn.V)],Tr.prototype,"_timeManager",void 0),(0,Q.Cg)([(0,X.Cdj)("f33-d276"),(0,Q.Sn)("design:type",mr.k)],Tr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Tr.prototype,"_runOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Tr.prototype,"_playNotificationSfx",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Tr.prototype,"isCalendarEnded",void 0),Tr=wr=(0,Q.Cg)([(0,X.EVk)("Daily Login Calendar - Timer Data Provider",void 0,"Reads the current calendar time for the Daily Login Calendar")],Tr);var Sr=z(6670),Ar=z(58776),Cr=z(56567);let Or=class extends Yi.z{constructor(){super(...arguments),this.onUltimatePrizeReady=new X.HN0,this._initialBind=!0}create(){super.create(),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.tryBindContext,this),this._bindOnCreate&&this.tryBindContext(),dt.q.instance.prodigy.game.broadcaster.addAppListener(Xn.H3.MembershipResponseReceived,this.handleMembershipChange,this)}tryBindContext(){this.bindContext().catch(X.RQr.createHandler("[DlcUltimateTrackDataProviderComponent] Failed to bind context"))}bindContext(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;const z=yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrack(),Y=yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrackMetadata(),Q=yield this.getRewardTask(z),Z=this.getClaimTask(z),J=this.getClaimTaskProgress(Z),tt=null!==(q=Z.taskDefinition.completionRequirements.data.target)&&void 0!==q?q:J,et=Math.max(1,Y.endDate-this._timeManager.getServerTimeMs()),it=(null===(K=null==Q?void 0:Q.taskProgress)||void 0===K?void 0:K.status)===Ar.t.COMPLETE,st=[J,tt,!this._initialBind,this._initialBind?0:1200],nt={[ms.jP.ShouldShowMemberJar]:!1,[ms.jP.ThresholdPrizeMembershipTier]:Vs._$.MemberUltimateBundle,[ms.jP.ThresholdPrizePackageFeatureKey]:"daily_login_calendar_threshold_reward",[ms.jP.UltimateTrackTimeRemaining]:et,[ms.jP.UltimateTrackRewardAvailable]:yield this.isUltimatePrizeReady(),[ms.jP.UltimateTrackRewardClaimed]:it,[ms.jP.UltimateTrackProgressBarFillData]:st};(null==Y?void 0:Y.prizeDisplayConfig)?(nt[ms.jP.UltimateTrackRewardDisplayConfig]=Y.prizeDisplayConfig,Object.entries(Y.prizeDisplayConfig).forEach((([q,K])=>{nt[`${ms.jP.UltimateTrackRewardDisplayConfig}.${q}`]=K}))):X.RQr.createHandler("[DlcUltimateTrackDataProviderComponent] No prize display config found in ultimate quest metadata"),Ht.d.updateInjectedValues(this.gameObject,nt),this._initialBind=!1}))}checkIfUltimatePrizeReady(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.onUltimatePrizeReady.dispatch(yield this.isUltimatePrizeReady())}))}isUltimatePrizeReady(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;const z=yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrack(),Y=yield this.getRewardTask(z),Q=this.getClaimTask(z),X=(null===(q=null==Q?void 0:Q.taskProgress)||void 0===q?void 0:q.status)===Ar.t.COMPLETE,Z=(null===(K=null==Y?void 0:Y.taskProgress)||void 0===K?void 0:K.status)===Ar.t.COMPLETE;return X&&!Z}))}getClaimTaskProgress(q){var K,z,Y,Q,X;return(null===(K=q.taskProgress)||void 0===K?void 0:K.status)===Ar.t.COMPLETE?null!==(z=q.taskDefinition.completionRequirements.data.target)&&void 0!==z?z:0:null!==(X=null===(Q=null===(Y=null==q?void 0:q.taskProgress)||void 0===Y?void 0:Y.data)||void 0===Q?void 0:Q.progress)&&void 0!==X?X:0}handleMembershipChange(q){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.prodigy.game.broadcaster.removeAppListener(Xn.H3.MembershipResponseReceived,this),yield this._playerProvider.fetchMembershipUpsell(),yield this.bindContext()}))}getClaimTask(q){return q[0]}getRewardTask(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=new Cr.f,z=q.filter((K=>K!==this.getClaimTask(q)));return(yield Sr.f.filterTasksByPreconditions(z,K))[0]}))}destroy(){dt.q.instance.prodigy.game.broadcaster.removeAppListener(Xn.H3.MembershipResponseReceived,this),this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.tryBindContext,this),this.onUltimatePrizeReady.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Or.prototype,"_playerProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("f33-d276"),(0,Q.Sn)("design:type",mr.k)],Or.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,Q.Cg)([(0,X.Cdj)("0f2-d6bd"),(0,Q.Sn)("design:type",nn.V)],Or.prototype,"_timeManager",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Or.prototype,"_bindOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Or.prototype,"onUltimatePrizeReady",void 0),Or=(0,Q.Cg)([(0,X.EVk)("DailyLoginCalendarUltimateTrackDataProvider")],Or);var Ir=z(43333);let Dr=class extends X.uAl{postCreate(){super.postCreate(),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.run,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.add(this.run,this),this.run()}destroy(){this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.run,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.remove(this.run,this),super.destroy()}run(){this.updateTimerEndEvent().catch(X.RQr.createHandler("DailyLoginCalendarEndEventDataProvider bindContext error from updateTimerEndEvent"))}updateTimerEndEvent(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata(),K=this._timeManager.getServerTimeMs(),z=q.endDate-K,Y=z<=0;dt.q.instance.prodigy.game.broadcaster.broadcast(Xn.rF.CalendarTimeRemaining,dt.q.instance.prodigy.game,[z]),this._timerText&&Y&&this._timerText.onTimerCompleted.dispatch()}))}};(0,Q.Cg)([(0,X.Cdj)("f33-d276"),(0,Q.Sn)("design:type",mr.k)],Dr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,Q.Cg)([(0,X.Cdj)("0f2-d6bd"),(0,Q.Sn)("design:type",nn.V)],Dr.prototype,"_timeManager",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],Dr.prototype,"_timerText",void 0),Dr=(0,Q.Cg)([(0,X.EVk)("DailyLoginCalendarEndEvent",void 0,"")],Dr);var Rr=z(47728);let Pr=class extends X.uAl{setItem(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z;const Y=yield ae.t.secureGetItem(q.type,q.ID);if(!Y)throw new Error(`DailyLoginCalendarPrizeItemComponent setItem Item was not found for ${q.type}-${q.ID}`);const Q=gs.X.createImageLoadData(Y);yield this._image.setAsset(Q.source,Q.frame),null===(z=null===(K=this._quantity.GameObject)||void 0===K?void 0:K.isDestroyed)||void 0===z||z||(this._quantity.text=`x ${q.N}`,"item"===Y.type&&Y.ID&&Rr.x.isMorphMarbleAsset(Y.ID)&&(this._morphMarbleIcon.active=!0))}))}};(0,Q.Cg)([(0,X.MnK)(si._),(0,X.YLv)("Image of the prize item to be filled by invoking `setItem`"),(0,Q.Sn)("design:type",si._)],Pr.prototype,"_image",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,X.YLv)("Quantity of the prize item to be filled by invoking `setItem`"),(0,Q.Sn)("design:type",X.EYj)],Pr.prototype,"_quantity",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Pr.prototype,"_morphMarbleIcon",void 0),Pr=(0,Q.Cg)([(0,X.EVk)("DailyLoginCalendarPrizeItem",void 0,"DailyLoginCalendar prize item consumer and display")],Pr);z(28047);let Mr=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.onShopSelected=this.createTidySignal()}setup(q){if(!X.Aq$.isDefined(this.shopButtonPrefab)||!X.Aq$.isDefined(this.shopButtonsContainerObject))return;const K=Object.entries(q);K.sort(((q,K)=>q[1].cover-K[1].cover)),Promise.all(K.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.createButtonForShop(q)}))))).then((q=>{q.filter((q=>X.Aq$.isDefined(q))).forEach(((q,K)=>{this.shopButtonsContainerObject.addChildAt(q,K)}))})).catch((q=>{throw q}))}createButtonForShop(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const[K,z]=q,{label:Y,cover:Q,itemBake:X,nameLocalizationKey:Z}=z,J=Z?this._baseLocalizer.getText(Z):void 0,tt=[{injectionName:"SELECTED_BAKE",data:X},{injectionName:"SELECTED_COVER",data:Q},{injectionName:"SELECTED_URL",data:`singleImage-${X}`},{injectionName:"USING_URL_IMAGE",data:"string"==typeof X}],et=yield this._prefabLoader.loadWithDependenciesFromGUID(this.shopButtonPrefab,this.shopButtonsContainerObject,!1,tt);return Ht.d.updateInjectedValues(et,{SHOP_LABEL:null!=J?J:Y,SHOP_KEY:K,SHOP_CLICKED_CB:()=>{this.onShopSelected.dispatch(K)}}),et}))}};(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Mr.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Mr.prototype,"_baseLocalizer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Mr.prototype,"onShopSelected",void 0),(0,Q.Cg)([(0,X.i0J)(X.Z$z.Prefab),(0,Q.Sn)("design:type",String)],Mr.prototype,"shopButtonPrefab",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Mr.prototype,"shopButtonsContainerObject",void 0),Mr=(0,Q.Cg)([(0,X.EVk)("AllShopsMenuController")],Mr);var Nr=z(10471),xr=z(8394),Lr=z(59599);let kr=class extends X.uAl{constructor(){super(...arguments),this._amount=0,this._currencyID=0}set amount(q){this._amount=q}set currency(q){this._currencyID=q}refresh(){const q=(0,xr.p)("currency",this._currencyID)&&Nr.h.includes(this._currencyID)&&this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(this._amount);this._lockedState.setValue(q)}};(0,Q.Cg)([(0,Qi.b)("bec-c6b4"),(0,Q.Sn)("design:type",na.W)],kr.prototype,"_hardCurrencyDataProvider",void 0),(0,Q.Cg)([(0,X.MnK)(Lr.f),(0,Q.Sn)("design:type",Lr.f)],kr.prototype,"_lockedState",void 0),kr=(0,Q.Cg)([(0,X.EVk)("DynamicStoreBundleLockedState",et.Y.store)],kr);z(71391),z(76016),z(77992);var Br=z(16847);let Ur=class extends X.uAl{constructor(){super(...arguments),this.currencyDisplayComponents=[],this.currenciesToExclude=[]}setDisplayedCurrencies(q){const K=Object.entries(q).sort((([,q],[,K])=>K-q)).map((([q])=>parseInt(q,10))).filter((q=>!this.currenciesToExclude.includes(q)));for(const[z,Y]of this.currencyDisplayComponents.entries()){const q=K[z];Y.GameObject.active=X.Aq$.isDefined(q),Y.GameObject.active&&Y.updateCurrencyID(q)}}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(Br.n),(0,Q.Sn)("design:type",Array)],Ur.prototype,"currencyDisplayComponents",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.g11)(),(0,Q.Sn)("design:type",Array)],Ur.prototype,"currenciesToExclude",void 0),Ur=(0,Q.Cg)([(0,X.EVk)("DynamicStoreCurrencyDisplayContoller")],Ur);var Fr=z(64270),Gr=z(88131),jr=z(55328);const $r=[13,15,12,14,16,1,27];let Hr=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.onDataLoadStarted=this.createTidySignal(),this.onDataLoadFinished=this.createTidySignal(),this.onConfigurationEntityLoaded=this.createTidySignal()}postCreate(){this.loadStore().catch((q=>{this.dispatchError(q)})),this.loadConfig().catch((q=>{this.dispatchError(q)}))}loadStore(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;this.onDataLoadStarted.dispatch();const z=null!==(K=null!=q?q:this.storeName)&&void 0!==K?K:Fr.g0.AllShops;if(z===Fr.g0.AllShops)return void this.onDataLoadFinished.dispatch(Gr.Q.success({DYNAMIC_STORE_DATA:z}));const{player:Y}=this._playerDataProvider,Q=$r.map((q=>({[ms.$u.CurrencyID]:q,[ms.$u.CurrencyAmount]:Y.getCurrencyAmount(q)}))),X=yield this._dynamicStoreDataProvider.getDynamicStoreUIData({storeKey:z});if(X.isSuccess()){const q=X.get();this.onDataLoadFinished.dispatch(Gr.Q.success({MULTI_CURRENCY_WALLET_DATA:Q,DYNAMIC_STORE_DATA:q,DYNAMIC_STORE_TAB_AMOUNT:q.store.sections.length}))}else this.dispatchError(X.error)}))}loadConfig(){return(0,Q.sH)(this,void 0,void 0,(function*(){try{const{storeConfigEntity:q}=yield this._dynamicStoreRoute.getStoreConfigurationEntity();this.onConfigurationEntityLoaded.dispatch(q)}catch(e){this.dispatchError(e)}}))}dispatchError(q){if("string"==typeof q)return X.VyI.log(q,X.$bb.Error),void this.onDataLoadFinished.dispatch(Gr.Q.error(new Error(q)));const K=new Error(X.RQr.stringify(null!=q?q:"There was an error loading the dynamic store data"));X.VyI.log(K.message,X.$bb.Error),this.onDataLoadFinished.dispatch(Gr.Q.error(K))}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Hr.prototype,"onDataLoadStarted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Hr.prototype,"onDataLoadFinished",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Hr.prototype,"onConfigurationEntityLoaded",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Hr.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("7a9-ac2f"),(0,Q.Sn)("design:type",Object)],Hr.prototype,"_dynamicStoreDataProvider",void 0),(0,Q.Cg)([(0,Qi.b)("73c-5410"),(0,Q.Sn)("design:type",jr.v)],Hr.prototype,"_dynamicStoreRoute",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Hr.prototype,"storeName",void 0),Hr=(0,Q.Cg)([(0,X.EVk)("DynamicStoreDataConsumer")],Hr);let Vr=class extends X.uAl{get labelString(){return this._labelString}set labelString(q){this._labelString=(0,Is.k)(q),this.updateLabels()}get count(){return this._count}set count(q){this._count=q,this.updateLabels()}constructor(){super(),this.hideIfLessThanOne=!1,this._count=0,this._labelString=(0,Is.k)("MORE")}postCreate(){this.updateLabels()}updateLabels(){const q=this.hideIfLessThanOne&&this.count<1;this.gameObject.active=!q,this.counterText&&(this.counterText.text=`${this.getSignChar()}${this._count}`),this.labelText&&(this.labelText.text=this._labelString)}getSignChar(){return this._count>0?"+":""}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Vr.prototype,"hideIfLessThanOne",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String),(0,Q.Sn)("design:paramtypes",[String])],Vr.prototype,"labelString",null),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number),(0,Q.Sn)("design:paramtypes",[Number])],Vr.prototype,"count",null),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Vr.prototype,"counterText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Vr.prototype,"labelText",void 0),Vr=(0,Q.Cg)([(0,X.EVk)("ItemsCountCardController"),(0,Q.Sn)("design:paramtypes",[])],Vr);var Wr=z(71134),qr=z(43858),Kr=z(10711);let zr=class extends X.uAl{constructor(){super(...arguments),this._itemCards=[],this.onLoadingFinished=new X.HN0}postCreate(){var q,K;this._itemCards=null!==(K=null===(q=this.itemCardContainerObject)||void 0===q?void 0:q.findComponentsInChildren(qr.j))&&void 0!==K?K:[],this._itemCards.forEach((q=>{q.GameObject.active=!1})),this.onLoadingFinished.addOnce((()=>{var q;this.sendInterfaceOpenedEvent(),this._storeKey=this.getInjectedValue(ms.YM.StoreKey),!this._storeKey&&(null===(q=this.openStoreButton)||void 0===q?void 0:q.GameObject)&&(this.openStoreButton.GameObject.active=!1)}),this),this.setUpModal().catch(X.RQr.createHandler("DynamicStoreModalComponent: Failed to get store and quest data"))}setUpModal(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;const z=this.getInjectedValue(ms.YM.OfferData),Y=this.getInjectedValue(ms.YM.OfferReadById);if(!z||0===z.length)return void this.gameObject.destroy();const Q=(0,Kr.K8)(z,Y),X=Q.slice(0,this._itemCards.length);for(let Z=0;Z{var K;return null===(K=q.getItemData().item)||void 0===K?void 0:K.ID}));q.push(Math.max(this.moreItemsCardController.count,0)),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ws.B.DynamicStoreModal,interfaceType:wi.Wm.Window,instanceType:Ti.N.UI,originType:wi.$N.AutoSurfaced},{item_list:q})}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zr.prototype,"itemCardContainerObject",void 0),(0,Q.Cg)([(0,X.MnK)(Vr),(0,Q.Sn)("design:type",Vr)],zr.prototype,"moreItemsCardController",void 0),(0,Q.Cg)([(0,X.MnK)(Wr.l),(0,Q.Sn)("design:type",Wr.l)],zr.prototype,"_prefabModal",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],zr.prototype,"openStoreButton",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],zr.prototype,"onLoadingFinished",void 0),(0,Q.Cg)([(0,Qi.b)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],zr.prototype,"_segment",void 0),zr=(0,Q.Cg)([(0,X.EVk)("DynamicStoreModal",et.Y.store)],zr);z(282),z(37816),z(50379),z(24595);var Yr,Qr,Xr=z(69811);!function(q){q[q.Brown=0]="Brown",q[q.Grey=1]="Grey",q[q.Lavender=2]="Lavender",q[q.Blue=3]="Blue"}(Yr||(Yr={})),function(q){q[q.SpecialOffers=0]="SpecialOffers",q[q.PetStore=1]="PetStore",q[q.WizardCenter=2]="WizardCenter",q[q.TitanShop=3]="TitanShop",q[q.AcademyShop=4]="AcademyShop",q[q.RegionShop=5]="RegionShop",q[q.FestivalShop=6]="FestivalShop",q[q.LopsRiftShop=7]="LopsRiftShop",q[q.StarlightFestStore=8]="StarlightFestStore"}(Qr||(Qr={}));let Zr=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.onShopButtonClicked=this.createTidySignal(),this._selectedCover=Yr.Brown,this._selectedBake=Qr.SpecialOffers}firstUpdate(){var q,K;null===(q=this.coverSwapper)||void 0===q||q.selectGraphicAtIndex(this.selectedCover),"string"!=typeof this._selectedBake&&(null===(K=this.itemBakeSwapper)||void 0===K||K.selectGraphicAtIndex(this._selectedBake))}set selectedCover(q){var K;this._selectedCover=q,null===(K=this.coverSwapper)||void 0===K||K.selectGraphicAtIndex(this._selectedCover)}get selectedCover(){return this._selectedCover}set selectedBake(q){var K;this._selectedBake=q,"string"!=typeof q&&(null===(K=this.itemBakeSwapper)||void 0===K||K.selectGraphicAtIndex(q))}get selectedBake(){return this._selectedBake}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zr.prototype,"onShopButtonClicked",void 0),(0,Q.Cg)([(0,X.MnK)(Xr.y),(0,Q.Sn)("design:type",Xr.y)],Zr.prototype,"coverSwapper",void 0),(0,Q.Cg)([(0,X.MnK)(Xr.y),(0,Q.Sn)("design:type",Xr.y)],Zr.prototype,"itemBakeSwapper",void 0),(0,Q.Cg)([(0,X.gfw)(Yr),(0,Q.Sn)("design:type",Number),(0,Q.Sn)("design:paramtypes",[Number])],Zr.prototype,"selectedCover",null),(0,Q.Cg)([(0,X.gfw)(Qr),(0,Q.Sn)("design:type",Object),(0,Q.Sn)("design:paramtypes",[Object])],Zr.prototype,"selectedBake",null),Zr=(0,Q.Cg)([(0,X.EVk)("ShopButtonController")],Zr);let Jr=class extends X.uAl{constructor(){super(...arguments),this._parseOnCreate=!1,this.onEncounterAssetParsed=new X.HN0,this.onEncounterParsed=new X.HN0}create(){super.create(),this._parseOnCreate&&this.getEncounter().catch(X.RQr.createHandler("EncounterAssetParser: encounterAsset not set"))}parseEncounterAsset(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.encounterAsset?(yield this.assetLoader.loadAssets([this.encounterAsset]),this._spawnData=dt.q.instance.game.cache.getJSON(this.encounterAsset),this._spawnData):Promise.reject(new Error("EncounterAssetParser: encounterAsset not set"))}))}getEncounter(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.getEncounterById(this.encounterId)}))}getEncounterById(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._spawnData||(yield this.parseEncounterAsset()),this._spawnData[q])return this.onEncounterParsed.dispatch(this._spawnData[q]),this._spawnData[q];X.RQr.createHandler(`EncounterAssetParser: No encounter data found for ${q}`)}))}destroy(){this.onEncounterAssetParsed.dispose(),this.onEncounterParsed.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)(X.t5G.AssetLoader),(0,Q.Sn)("design:type",Object)],Jr.prototype,"assetLoader",void 0),(0,Q.Cg)([(0,X.tW2)("encounter"),(0,Q.Sn)("design:type",String)],Jr.prototype,"encounterAsset",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Jr.prototype,"encounterId",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Jr.prototype,"_parseOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jr.prototype,"onEncounterAssetParsed",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jr.prototype,"onEncounterParsed",void 0),Jr=(0,Q.Cg)([(0,X.EVk)("EncounterAssetParser",et.Y.mapSpawning)],Jr);var to=z(35488),eo=z(62886),io=z(87820),so=z(3001),no=z(7170),ao=z(78889),ro=z(60157);let oo=class extends X.uAl{getEncounterData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){}))}};(0,Q.Cg)([(0,X.Cdj)("EncounterMapSpawnConstants"),(0,Q.Sn)("design:type",Object)],oo.prototype,"spawnConstants",void 0),oo=(0,Q.Cg)([(0,X.EVk)("BaseEncounterDataProvider")],oo);var ho=z(10727);const co=[{isEnabled:()=>(0,Kt.G)(ho.d3).enabled,overrideMap:ho.tZ}];var lo,uo=z(22023),fo=z(17446);class bo{static rollMainEncounter(q,K=Te.i.Regular){return q.length<1?(X.VyI.log("Attempted to roll main encounter from an empty list of possible encounters",X.$bb.Error),{}):1===q.length?q[0]:q.every((q=>X.Aq$.isDefined(q.R)))?hi.selectByWeight(q,(q=>1/q.R)):hi.selectByWeight(q,(q=>bo.getEncounterWeightByRarityAndEvolution(q,K)))}static getEncounterWeightByRarityAndEvolution(q,K){var z,Y,Q,Z,J;if(!X.Aq$.isDefined(q.ID))return X.VyI.log("Encounter does not have an ID",X.$bb.Warning),0;const tt=ae.t.getItem("pet",q.ID);if(!tt)return X.VyI.log(`Could not find pet data for encounter with ID ${q.ID}`,X.$bb.Warning),0;const et=dt.q.instance.prodigy.gameContainer.get("e9f-b6e7");return et.encounterRatesPerDifficultyModeAndRarity[K][null!==(Y=null===(z=tt.data)||void 0===z?void 0:z.rarity)&&void 0!==Y?Y:fo.E.Common]*et.encounterRatesPerDifficultyModeAndEvolutionTier[K][null!==(J=null===(Z=null===(Q=tt.data)||void 0===Q?void 0:Q.evolution)||void 0===Z?void 0:Z.tier)&&void 0!==J?J:1]}}let po=lo=class extends oo{constructor(){super(...arguments),this._repeatable=!0,this.useMapSpawnConstants=!1,this._encounterOverrides={}}getEncounterData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q,Z;if(!q.isOnCooldown){if(X.Aq$.isDefined(this._encountersDataSource)&&X.Aq$.isDefined(this._encounterId)){const q=this.getUniqueEncounterId();if(!this._repeatable&&X.Aq$.isDefined(this._player.state.get(q)))return;if(lo.encounterDataCache[q])return lo.encounterDataCache[q];let J=null;for(const K of co){if(!K.isEnabled())continue;const q=K.overrideMap[this._encountersDataSource];X.Aq$.isDefined(q)&&(yield dt.q.instance.prodigy.load.assetsAsPromise([q]),J=dt.q.instance.game.cache.getJSON(q))}const tt=dt.q.instance.game.cache.getJSON(this._encountersDataSource),et=null!==(K=null==J?void 0:J[this._encounterId])&&void 0!==K?K:tt[this._encounterId];if(!et)return void X.VyI.log(`No encounter found with ID ${this._encounterId}`,X.$bb.Warning);if(X.Aq$.isDefined(et.encounter)){const q=dt.q.instance.prodigy.world.getZone(this._zoneId);et.encounter=[bo.rollMainEncounter(et.encounter,q.difficultyMode)],!X.Aq$.isDefined(et.pets)&&X.Aq$.isDefined(et.encounter[0].ID)&&(this.useMapSpawnConstants&&this.spawnConstants?(et.bench=null===(z=this.spawnConstants.benchRandoms)||void 0===z?void 0:z.map((q=>({petID:q,weight:1}))),et.minTeamSize=this.spawnConstants.minOptional,et.maxTeamSize=null!==(Y=this.spawnConstants.maxOptional)&&void 0!==Y?Y:Math.min((null!==(Z=null===(Q=et.bench)||void 0===Q?void 0:Q.length)&&void 0!==Z?Z:0)+1,3)):et.bench=uo.P8.getPetBench(et.encounter[0].ID))}return lo.encounterDataCache[q]=Object.assign(Object.assign(Object.assign({},et),this._encounterOverrides),{unique:!this._repeatable,uniqueId:q}),lo.encounterDataCache[q]}return Object.keys(this._encounterOverrides).length>0?this._encounterOverrides:void 0}}))}resetCachedEncounter(){delete lo.encounterDataCache[this.getUniqueEncounterId()]}getUniqueEncounterId(){return`zone-${this._zoneId}-uniqueEncounters-${this._mapName}-${this.sanitizeEncounterId(this._encounterId)}`}sanitizeEncounterId(q){return q.replace(/-/g,"_")}};var vo,go;po.encounterDataCache={},(0,Q.Cg)([(0,X.Cdj)("ZoneId"),(0,Q.Sn)("design:type",String)],po.prototype,"_zoneId",void 0),(0,Q.Cg)([(0,X.Cdj)("MapTag"),(0,Q.Sn)("design:type",String)],po.prototype,"_mapName",void 0),(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],po.prototype,"_player",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,X.tW2)("encounter"),(0,Q.Sn)("design:type",String)],po.prototype,"_encountersDataSource",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],po.prototype,"_encounterId",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],po.prototype,"_repeatable",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],po.prototype,"_encounterOverrides",void 0),po=lo=(0,Q.Cg)([(0,X.EVk)("BasicEncounterDataProvider",et.Y.mapSpawning)],po),function(q){q.Optional="optional",q.Mandatory="mandatory",q.Special="special",q.FeaturedSpawn="featured-spawn"}(go||(go={}));let mo=vo=class extends Yi.z{constructor(){super(...arguments),this.spawnType=go.Optional,this.spawnCooldownCategory=pa.u.Main,this._runOnCreate=!1,this.encounterDataProviders=[],this.isRespawnAllowed=!0,this._encounterValidators=[q=>X.Aq$.isDefined(q),q=>!ao.Ue(q)||!(ao.LT(q)&&66===q.boss.ID),q=>ao.W0(q)]}get encounterData(){return this._encounterData}get isOnCooldown(){return this._cooldowns.isCooldownActive(this.spawnId)}get cooldownTimeRemaining(){return this._cooldowns.getCooldownRemainingTime(this.spawnId)}get hasExpiredCooldown(){return this._cooldowns.isCooldownExpired(this.spawnId)}create(){super.create(),this._runOnCreate&&this.run().catch(X.RQr.createHandler("Error running SpawnPoint"))}run(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this._encounterData){const q=new Cr.f,K=yield Promise.all(this.encounterDataProviders.map((K=>(0,Q.sH)(this,void 0,void 0,(function*(){return K.getEncounterData({isOnCooldown:yield this.isOnCooldown,spawnId:this.spawnId,preconditionChecker:q})})))));this._encounterData=K.find((q=>this._encounterValidators.every((K=>K(q)))))}yield this.bindContext()}))}bindContext(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut;if(!this.IsActiveInHierarchy)return;if(!X.Aq$.isDefined(this._encounterData)||this._encounterData===no.E.Disabled||!vo.SPAWNED_SINCE_COOLDOWN[this.spawnId]&&!1===this.isRespawnAllowed)return void this.gameObject.destroy();const ft=ao.cB(this._encounterData),bt=null===(q=null==ft?void 0:ft.data)||void 0===q?void 0:q.name,pt=null==ft?void 0:ft.type;let vt,gt;if(ao.$Q(this._encounterData))vt=this._encounterData.encounter[0].ID,gt=null!==(z=null===(K=null==ft?void 0:ft.data)||void 0===K?void 0:K.affinity)&&void 0!==z?z:null===(Y=null==ft?void 0:ft.data)||void 0===Y?void 0:Y.element,X.Aq$.isDefined(this._encounterData.encounter[0].ID)&&(ao.OI(this._encounterData.encounter[0].ID),this.updateValue("EncounterPetId",this._encounterData.encounter[0].ID));else if(vt=null!==(et=null!==(Z=null===(Q=this._encounterData.boss)||void 0===Q?void 0:Q.ID)&&void 0!==Z?Z:null===(tt=null===(J=this._encounterData.opponent)||void 0===J?void 0:J[0])||void 0===tt?void 0:tt.id)&&void 0!==et?et:null===(st=null===(it=this._encounterData.pets)||void 0===it?void 0:it[0])||void 0===st?void 0:st.ID,gt=null!==(at=null===(nt=null==ft?void 0:ft.data)||void 0===nt?void 0:nt.element)&&void 0!==at?at:null===(rt=null==ft?void 0:ft.data)||void 0===rt?void 0:rt.affinity,ao.LT(this._encounterData)&&(null===(ot=null==ft?void 0:ft.data)||void 0===ot?void 0:ot.category)===ki.GJ.Wizard){const q=null!==(ht=ft.metadata)&&void 0!==ht?ht:{};this.updateValue("EnemyWizardPlayerData",ao.BQ(q))}else if(ao.h9(this._encounterData)){const q=this._encounterData.opponent[0];this.updateValue("EnemyWizardPlayerData",ao.BQ(q))}else ao.sK(this._encounterData)&&(ao.OI(this._encounterData.pets[0].ID),this.updateValue("EncounterPetId",this._encounterData.pets[0].ID));vo.SPAWNED_SINCE_COOLDOWN[this.spawnId]=!0,yield this.sendDiscoveryEvent(vt,bt,pt,gt);const mt=this.createBattleConfig(),yt=ao.Yu(this._encounterData),_t=ao.wd(this._encounterData),Et=ao.o_(this._encounterData);this.updateValue("EncounterSpawnId",this.spawnId),this.updateValue("CooldownCategory",this.spawnCooldownCategory),this.updateValue("EncounterShouldShowGuideHand",this._encounterData.showGuideHand),this.updateValue("EncounterShouldShowBossIndicator",_t),this.updateValue("EncounterShouldShowNewIndicator",Et),this.updateValue("EncounterShouldShowDifficultyIndicator",yt),this.updateValue("EncounterDifficultyIndicatorLevel",null!==(ut=null!==(lt=null===(dt=null===(ct=this._encounterData.encounter)||void 0===ct?void 0:ct[0])||void 0===dt?void 0:dt.level)&&void 0!==lt?lt:this._encounterData.minLevel)&&void 0!==ut?ut:this._playerDataProvider.player.getLevel()),this.updateValue("EncounterDifficultyIndicatorTier",this._encounterData.minibossDifficulty),this.updateValue("EncounterBattleMods",mt)}))}createBattleConfig(){var q,K;const z={screen:null!==(q=dt.q.instance.prodigy.skin.getSkinOverrideBattleBg(this._mapTag))&&void 0!==q?q:this._battleBg,onFaint:null===(K=this._zone)||void 0===K?void 0:K.defaultOnFaint,addZoneCurrency:!0,cooldown:{id:this.spawnId,duration:this.spawnCooldownCategory,onResult:[ki.XK.Victory],onAction:[],actionRestrictions:{}}};return X.Aq$.isDefined(this._encounterData)&&!ao.bU(this._encounterData)?Object.assign(Object.assign({},z),_t().cloneDeep(this._encounterData)):z}sendDiscoveryEvent(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={discovery_type:(yield this.hasExpiredCooldown)?"Spawned":"Existing",enemy_name:this._localization.getText(null!=K?K:"Unknown Enemy"),enemy_id:null!=q?q:0,enemy_type:null!=z?z:"Unknown Type",enemy_element:null!=Y?Y:"Unknown Element",spawn_type:this.spawnType,cooldown_type:this.spawnCooldownCategory,x_coord:this.gameObject.transform.worldPosition.x,y_coord:this.gameObject.transform.worldPosition.y};this._segment.gameWorld.sendEnemyDiscoveredEvent(Q)}))}sendCooldownStartEvent(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=yield this._cooldowns.getCooldownRemainingTime(this.spawnId);if(K<=0)return;const z={cooldown_type:Ua.NM.SpawnPoint,cooldown_subtype:this.spawnCooldownCategory,cooldown_target_type:this.spawnType,cooldown_target_id:this.spawnId,cooldown_length:K,cooldown_trigger_type:Ua.J$.Battle,cooldown_trigger_id:null!==(q=this._segment.battleRevamp.battleId)&&void 0!==q?q:"unknown"};this._segment.gameWorld.sendCooldownTimerStartedEvent(z)}))}setEncounterDefeated(){var q,K;if(!this._encounterData||ao.bU(this._encounterData))return;const z=null!==(q=ao.Lj(this._encounterData))&&void 0!==q?q:0,Y=this.getEncounterType(this._encounterData),Q=this._encounterData.uniqueId,Z=null!==(K=this._encounterData.isQuestEncounter)&&void 0!==K&&K;X.Aq$.isDefined(Q)&&X.Aq$.isDefined(po.encounterDataCache[Q])&&delete po.encounterDataCache[Q],this._encounterData.unique&&X.Aq$.isDefined(Q)&&this._playerDataProvider.player.state.set(Q,!0);let J=eo.T.DEFEAT_ENCOUNTER;Z&&(J=eo.T.DEFEAT_QUEST_ENCOUNTER),this.sendCooldownStartEvent().catch(X.RQr.createHandler(`Could not send cooldown start event for spawn point: ${this.spawnId}`)),this._questManager.sendQuestEventViaHub(J,{type:Y,id:z,params:{taskEventType:ro.Z7.Encounter,isQuestEncounter:Z,uniqueId:Q}}).catch(X.RQr.createHandler(`Could not send DEFEAT_ENCOUNTER quest event for encounter: ${Y} ${z}`))}delayRespawn(){vo.SPAWNED_SINCE_COOLDOWN[this.spawnId]=!1}getEncounterType(q){return ao.LT(q)?ki.uj.Boss:ao.wd(q)?ki.uj.Miniboss:ao.h9(q)?ki.uj.Wizard:ki.uj.Pet}destroy(){super.destroy()}};mo.SPAWNED_SINCE_COOLDOWN={},(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],mo.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("a69-7d25"),(0,Q.Sn)("design:type",fa.m)],mo.prototype,"_cooldowns",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],mo.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],mo.prototype,"_localization",void 0),(0,Q.Cg)([(0,X.Cdj)("b37-c775"),(0,Q.Sn)("design:type",so.n)],mo.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.Cdj)("Zone"),(0,Q.Sn)("design:type",io.b)],mo.prototype,"_zone",void 0),(0,Q.Cg)([(0,X.Cdj)("BattleBg"),(0,Q.Sn)("design:type",String)],mo.prototype,"_battleBg",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_MAP_TAG"),(0,Q.Sn)("design:type",String)],mo.prototype,"_mapTag",void 0),(0,Q.Cg)([(0,X.gfw)(go),(0,Q.Sn)("design:type",String)],mo.prototype,"spawnType",void 0),(0,Q.Cg)([(0,X.gfw)(pa.u),(0,Q.Sn)("design:type",String)],mo.prototype,"spawnCooldownCategory",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],mo.prototype,"spawnId",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],mo.prototype,"_runOnCreate",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(oo),(0,Q.Sn)("design:type",Array)],mo.prototype,"encounterDataProviders",void 0),mo=vo=(0,Q.Cg)([(0,X.EVk)("SpawnPoint",et.Y.mapSpawning)],mo);let yo=class extends mo{bindContext(){const q=Object.create(null,{bindContext:{get:()=>super.bindContext}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y;if(yield q.bindContext.call(this),this.IsActiveInHierarchy&&(this.updateValue("ShouldShowFeaturedSpawnTimer",X.Aq$.isDefined(this._encounterData)),this.updateValue("FeaturedSpawnTimer",this._featuredSpawnService.getTimeUntilExpiry()),X.Aq$.isDefined(this.featureRequirement))){const q=dt.q.instance.prodigy.gameContainer.get("11f-118a");if(!(yield q.meetsRequirements(this.featureRequirement))){const Q=q.getFeatureRequirementAsset(this.featureRequirement),X=null===(z=null===(K=null==Q?void 0:Q.data)||void 0===K?void 0:K.requirements)||void 0===z?void 0:z.find((q=>"level"in q)),Z=null!==(Y=null==X?void 0:X.level)&&void 0!==Y?Y:0,J=this._localization.getText("UNLOCKS_AT_LEVEL",Z.toString());this.updateValue("ShouldShowFeaturedSpawnLockMessage",!0),this.updateValue("FeaturedSpawnLockMessage",J),this.updateValue("DisableTrigger",!0)}}}))}};(0,Q.Cg)([(0,X.Cdj)("762-6549"),(0,Q.Sn)("design:type",to.J)],yo.prototype,"_featuredSpawnService",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],yo.prototype,"featureRequirement",void 0),yo=(0,Q.Cg)([(0,X.EVk)("FeaturedSpawnPoint",et.Y.mapSpawning)],yo);var _o=z(87761);let Eo=class extends oo{constructor(){super(...arguments),this._taskIds=["0-0"]}getEncounterData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return(yield this._localZoneQuestManager.getTasksInProgress()).some((q=>this._taskIds.some((K=>q.taskID===K))))?no.E.Disabled:void 0}))}};(0,Q.Cg)([(0,X.Cdj)("331-a8ba"),(0,Q.Sn)("design:type",_o.B)],Eo.prototype,"_localZoneQuestManager",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],Eo.prototype,"_taskIds",void 0),Eo=(0,Q.Cg)([(0,X.EVk)("QuestDisabledDataProvider",et.Y.mapSpawning)],Eo);let wo=class extends po{constructor(){super(...arguments),this._taskIds=["0-0"]}getEncounterData(q){const K=Object.create(null,{getEncounterData:{get:()=>super.getEncounterData}});return(0,Q.sH)(this,void 0,void 0,(function*(){const z=(yield this._localZoneQuestManager.getTasksInProgress()).some((q=>this._taskIds.some((K=>q.taskID===K)))),Y=yield K.getEncounterData.call(this,Object.assign(Object.assign({},q),{isOnCooldown:!1}));return z&&X.Aq$.isDefined(Y)?Object.assign(Object.assign({},Y),{showGuideHand:!0,isQuestEncounter:!0}):void 0}))}};(0,Q.Cg)([(0,X.Cdj)("331-a8ba"),(0,Q.Sn)("design:type",_o.B)],wo.prototype,"_localZoneQuestManager",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],wo.prototype,"_taskIds",void 0),wo=(0,Q.Cg)([(0,X.EVk)("QuestEncounterDataProvider",et.Y.mapSpawning)],wo);let To=class extends oo{getEncounterData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return{minLevel:20,maxLevel:30,encounter:[{ID:87}]}}))}};To=(0,Q.Cg)([(0,X.EVk)("TestEncounterDataProvider",et.Y.mapSpawning)],To);var So=z(24800),Ao=z(50996),Co=z(46571);let Oo=class extends oo{constructor(){super(...arguments),this._areProvidersEnabledByDefault=!0,this._encounterProviderWhitelist=[],this._encounterProviderBlacklist=[],this._eventEncounterDataProviders=[],this._setupPromise=null}setupProviders(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._setupPromise||(this._setupPromise=(()=>(0,Q.sH)(this,void 0,void 0,(function*(){this._eventEncounterDataProviders=yield this._providerManager.getProviders(q,this._areProvidersEnabledByDefault,this._encounterProviderBlacklist,this._encounterProviderWhitelist)})))()),this._setupPromise}))}getEncounterData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.setupProviders(q);for(const K of this._eventEncounterDataProviders){if(!(yield K[1].isActive(q)))continue;const z=yield K[1].getEncounterData(q);if(null!=z)return z}}))}static clearCachedEncounters(){So.p.clearCachedEncounters()}};(0,Q.Cg)([(0,X.Cdj)("271-3058"),(0,Q.Sn)("design:type",Co.p)],Oo.prototype,"_providerManager",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Oo.prototype,"_areProvidersEnabledByDefault",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.gfw)(Ao.I),(0,Q.Sn)("design:type",Array)],Oo.prototype,"_encounterProviderWhitelist",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.gfw)(Ao.I),(0,Q.Sn)("design:type",Array)],Oo.prototype,"_encounterProviderBlacklist",void 0),Oo=(0,Q.Cg)([(0,X.EVk)("EventsEncounterDataProvider")],Oo);const Io=(0,Se.gb)({key:"white-glove-restrictions",activateAssociatedExperiments:1,default:{enabled:!0,disabledRestrictionTypes:[]}}),Do=(q,K)=>!!K.enabled&&(!K.disabledRestrictionTypes||!0===K.disabledRestrictionTypes.every((K=>K!==q)));var Ro,Po=z(9579),Mo=z(56735),No=z(1312);!function(q){q.SelectedMode="SELECTED_MODE",q.NumRulesToDisplay="NUM_RULES_TO_DISPLAY",q.SelectedBossID="SELECTED_BOSS_ID",q.ShowNewRestrictionsMenu="SHOW_NEW_RESTRICTIONS_MENU",q.InterfaceOpenedSegmentCallback="INTERFACE_OPENED_SEGMENT_CALLBACK"}(Ro||(Ro={}));const xo={plant:{atlas:ti._.Ui_raster_icons_json,frame:"icon-large-earth"},ice:{atlas:ti._.Ui_raster_icons_json,frame:"icon-large-ice"},fire:{atlas:ti._.Ui_raster_icons_json,frame:"icon-large-fire"},water:{atlas:ti._.Ui_raster_icons_json,frame:"icon-large-water"},storm:{atlas:ti._.Ui_raster_icons_json,frame:"icon-large-storm"},neutral:{atlas:ti._.Ui_raster_icons_json,frame:"icon-large-neutral"},physical:{atlas:ti._.Ui_raster_icons_json,frame:"icon-large-physical"},astral:{atlas:ti._.Ui_raster_icons_json,frame:"icon-large-astral"},shadow:{atlas:ti._.Ui_raster_icons_json,frame:"icon-large-shadow"},evolution:{atlas:ti._.Ui_raster_icons_json,frame:"icon-petevolution-indicator-arrows"},rescue:{atlas:ti._.Ui_raster_icons_json,frame:"icon-pet-collected"},level:{atlas:ti._.Ui_postbattle_json,frame:"star-level"},mergeRank:{atlas:ti._.Ui_raster_icons_json,frame:"pet-info-merge-badge"},common:{atlas:ti._.Ui_raster_icons_json,frame:"icon-pet-rarity-common"},uncommon:{atlas:ti._.Ui_raster_icons_json,frame:"icon-pet-rarity-uncommon"},rare:{atlas:ti._.Ui_raster_icons_json,frame:"icon-pet-rarity-rare"},heroic:{atlas:ti._.Ui_raster_icons_json,frame:"icon-pet-rarity-heroic"},legendary:{atlas:ti._.Ui_raster_icons_json,frame:"icon-pet-rarity-legendary"}};var Lo=z(5708),ko=z(15571);let Bo=class extends mo{constructor(){super(...arguments),this.overrideQuestIds=[],this._onConfirmBattle=new X.HN0,this._onClose=new X.HN0,this._onExit=new X.HN0,this.hasMetRequirements=!1,this.isInTrigger=!1,this._encounterValidators=[q=>X.Aq$.isDefined(q)]}destroy(){this._onConfirmBattle.dispose(),this._onClose.dispose(),this._onExit.dispose(),super.destroy()}create(){super.create(),this.editorSpawnRenderOnly&&(this.editorSpawnRenderOnly.Active=!1)}createBattleConfig(){var q;const K=super.createBattleConfig();return K.requirements=null===(q=this.getBattleRequirements())||void 0===q?void 0:q.requirements,K}openBattleRestrictionsPopup(){var q;const K=this.getBattleRequirements();if(!K)return void X.VyI.log("[RestrictedSpawnPointComponent]: No battle requirements found",X.$bb.Error);(0,wt.v)(this._encounterData&&!ao.bU(this._encounterData),"Cannot apply restrictions to disabled encounters");const z=null!==(q=ao.Lj(this._encounterData))&&void 0!==q?q:0;Po.a.getRequirementsResult(K).then((q=>{var Y,Q,Z;q?(this.clearUnmetBattleRequirementsIfMatch(z),Promise.all([Po.a.isEligibleForFreePetPack(),Po.a.hasReceivedFreePetPack()]).then((([q,K])=>{q||K||Po.a.markFreePetPackAsClaimed()})).catch(X.RQr.createHandler("[RestrictedSpawnPointComponent]: Error checking if free pet pack has been received"))):this.saveLastUnmetBattleRequirements(z,K);const J=(0,Kt.G)(Io).enabled,tt=null!==(Q=null===(Y=null==K?void 0:K.requirements)||void 0===Y?void 0:Y.length)&&void 0!==Q?Q:0;q||No.s.startRecording("RestrictedSpawnPointComponent","battle_restrictions_popup"),dt.q.instance.prodigy.open.prefabMenu(Gt.l.BattleRestrictionsPopup,(()=>{dt.q.instance.prodigy.audio.resumeBGM(),dt.q.instance.game.broadcaster.broadcast(Xn.n8.RestrictionsClosed),No.s.stopRecording(),this._onClose.dispatch(),Po.a.getRequirementsResult(K).then((q=>{q&&this.clearUnmetBattleRequirementsIfMatch(z)})).catch(X.RQr.createHandler("[RestrictedSpawnPointComponent]: Error opening battle restrictions popup with provided requirements"))}),!0,!1,!1,{EncounterConfirmRestrictedBattle:this.confirmBattle.bind(this),EncounterExitRestrictedBattle:this.exitBattleRestrictionsPopup.bind(this),EncounterBattleRequirements:K,EncounterBattleRequirementsMet:q,[Ro.SelectedBossID]:z,[Ro.ShowNewRestrictionsMenu]:J,[Ro.NumRulesToDisplay]:tt,[Ro.InterfaceOpenedSegmentCallback]:this.sendEncounterDataAnalytics.bind(this)}),null===(Z=this._restrictedEncountersManager)||void 0===Z||Z.startEncounter(K.name,this._encounterData,this.overrideQuestIds)})).catch(X.RQr.createHandler("[RestrictedSpawnPointComponent]: Error opening battle restrictions popup with provided requirements"))}saveLastUnmetBattleRequirements(q,K){const z=dt.q.instance.prodigy.gameContainer.get("782-c308");z.data.lastUnmetBattleRequirements={bossID:q,featureRequirements:K,mapID:dt.q.instance.prodigy.world.getCurrentMap(),zoneID:dt.q.instance.prodigy.world.getCurrentZone(),isDoorBlocking:X.Aq$.isDefined(this.triggerToBlock)},z.updated=!0}clearUnmetBattleRequirementsIfMatch(q){var K,z;const Y=dt.q.instance.prodigy.gameContainer.get("782-c308");(null===(z=null===(K=null==Y?void 0:Y.data)||void 0===K?void 0:K.lastUnmetBattleRequirements)||void 0===z?void 0:z.bossID)===q&&Po.a.resetPlayerLastUnmetBattleRequirements()}getBattleRequirements(){var q;return null===(q=this._restrictionsProvider.getRestrictionById(this.requirementsKey))||void 0===q?void 0:q.data}instantOpenBattleRestrictionsPopupIfInRange(){this.isInTrigger&&this.openBattleRestrictionsPopup()}run(){const q=Object.create(null,{run:{get:()=>super.run}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.run.call(this),this._encounterData&&this.gameObject.active&&this.blockTrigger(!0)}))}blockTrigger(q){this.triggerToBlock&&!se.A.get("GameConstants.Debug.DISABLE_BLOCKING_ENCOUNTERS")&&(this.triggerToBlock.Active=!q)}confirmBattle(){dt.q.instance.prodigy.gameContainer.get("20f-5f67").whiteGlove.sendRestrictionFTUEEvent("Restricted battle started"),this._onClose.dispose(),this._onConfirmBattle.dispatch()}exitBattleRestrictionsPopup(){this._onExit.dispatch()}sendEncounterDataAnalytics(){var q,K,z,Y,Q,Z,J,tt,et;const it=this._encounterData,st=this.getBattleRequirements(),nt=dt.q.instance.prodigy.gameContainer.get("782-c308"),at=Object.assign(Object.assign({},st),{requirements:null==st?void 0:st.requirements.map((q=>{var K;return Object.assign(Object.assign({},q),{meetsRequirements:Mo.p.checkIfMeetsRequirement(null==q?void 0:q.kennel,nt),currentProgress:Mo.p.getPetsSchema(null==q?void 0:q.kennel,nt).length,targetProgress:null===(K=null==q?void 0:q.kennel)||void 0===K?void 0:K.petCount})}))}),rt=null===(q=it.pets)||void 0===q?void 0:q.map((q=>{var K;if(!X.Aq$.isDefined(q)||!X.Aq$.isDefined(q.ID))return;const z=ae.t.getItem("pet",q.ID);return{id:q.ID,name:null===(K=null==z?void 0:z.data)||void 0===K?void 0:K.name,level:q.level}})),ot=ae.t.getItem("boss",it.boss.ID),ht={id:null!==(z=null===(K=it.boss)||void 0===K?void 0:K.ID)&&void 0!==z?z:null===(Q=null===(Y=it.opponent)||void 0===Y?void 0:Y[0])||void 0===Q?void 0:Q.id,name:null===(Z=null==ot?void 0:ot.data)||void 0===Z?void 0:Z.name,level:null===(J=it.boss)||void 0===J?void 0:J.level,minLevel:it.minLevel,maxLevel:it.maxLevel,type:null===(tt=null==ot?void 0:ot.data)||void 0===tt?void 0:tt.type,element:null===(et=null==ot?void 0:ot.data)||void 0===et?void 0:et.affinity,restrictions:at,pets:rt},ct=dt.q.instance.prodigy.gameContainer.get("20f-5f67");ct.whiteGlove.setCurrentRestrictionData(at);const lt={interfaceName:ws.B.PreBattleScreen,interfaceType:wi.Wm.Modal,originType:wi.$N.RestrictedBattle,instanceType:Ti.N.BattleRestriction},ut=ct.gameWorld.getCurrentInstanceTypeAndID(Ti.N.OpenWorld),ft={item_list:ht,map_entered_instance_type:ut.instance_type,map_entered_instance_id:ut.instance_id};ct.featureCommon.sendInterfaceEvent(lt,ft)}get isOnCooldown(){return Promise.resolve(!1)}};(0,Q.Cg)([(0,X.Cdj)("fcb-f00b"),(0,Q.Sn)("design:type",Lo.X)],Bo.prototype,"_restrictionsProvider",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Bo.prototype,"requirementsKey",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],Bo.prototype,"overrideQuestIds",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bo.prototype,"_onConfirmBattle",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bo.prototype,"_onClose",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bo.prototype,"_onExit",void 0),(0,Q.Cg)([(0,X.MnK)(Qa.E),(0,Q.Sn)("design:type",Qa.E)],Bo.prototype,"triggerToBlock",void 0),(0,Q.Cg)([(0,X.MnK)(X.ESH),(0,Q.Sn)("design:type",X.ESH)],Bo.prototype,"editorSpawnRenderOnly",void 0),(0,Q.Cg)([(0,X.Cdj)("6a3-a1df"),(0,Q.Sn)("design:type",ko.p)],Bo.prototype,"_restrictedEncountersManager",void 0),Bo=(0,Q.Cg)([(0,X.EVk)("RestrictedSpawnPoint",et.Y.mapSpawning)],Bo);var Uo=z(84643);const Fo=()=>(q,K)=>{const z=q.create;q.create=function(){this[K],z.call(this)}};var Go=z(83726);let jo=class extends X.uAl{setComplete(){var q;if(!this._isPrefabMap)if("number"==typeof this._spawnId){const K=this._spawnId+1;if(this._map.zone.defeatMonster(this._petId,K,null!==(q=this._mods.unique)&&void 0!==q&&q,void 0,this._mods.isQuestEncounter),this._mods.unique)return;Go.T.resetMonsterRespawn(this._map.mapMonsters[K],this._mods,this._encounterConstants.spawnCooldownDurationSeconds)}else this._map.zone.setState(this._spawnId,1)}};var $o;(0,Q.Cg)([(0,X.Cdj)("e9f-b6e7"),(0,Q.Sn)("design:type",Uo.h)],jo.prototype,"_encounterConstants",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterSpawnId"),(0,Q.Sn)("design:type",Object)],jo.prototype,"_spawnId",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterPetId"),(0,Q.Sn)("design:type",Number)],jo.prototype,"_petId",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterBattleMods"),(0,Q.Sn)("design:type",Object)],jo.prototype,"_mods",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterMap"),(0,Q.Sn)("design:type",Go.T)],jo.prototype,"_map",void 0),(0,Q.Cg)([(0,X.Cdj)("IS_PREFAB_MAP"),Fo(),(0,Q.Sn)("design:type",Boolean)],jo.prototype,"_isPrefabMap",void 0),jo=(0,Q.Cg)([(0,X.EVk)("SetZoneEncounterComplete",et.Y.mapSpawning)],jo);let Ho=$o=class extends X.uAl{constructor(){super(...arguments),this.battleBackground="",this._spawnPoints=[]}create(){var q;super.create();const K=this.getInjectedValue("Zone"),z=X.Aq$.isDefined(this.battleBackground)&&this.battleBackground.length>0?this.battleBackground:K.battleBG;if(this._context.Container.bind("BattleBg").toConstantValue(z),this._context.Container.bind("EncounterZoneTag").toConstantValue(this._mapName),this._spawnPoints=this.gameObject.findComponentsInChildren(mo),X.Aq$.isDefined($o._disabledSpawnCache[this._mapName])){const q=$o._disabledSpawnCache[this._mapName];this._spawnPoints.forEach((K=>{q.includes(K.spawnId)&&K.GameObject.destroy()}))}else if(X.Aq$.isDefined(this._constantsDataSource)){const K=dt.q.instance.game.cache.getJSON(this._constantsDataSource),z=K[this._mapName.replace("_hard","")];this._minimumOptionalSpawns=null===(q=K[this._mapName])||void 0===q?void 0:q.minOptional,this.determineDisabledSpawns(),this._context.Container.bind("EncounterMapSpawnConstants").toConstantValue(z)}this._spawnPoints.filter((q=>q.spawnType===go.Optional)).filter((q=>q.IsActiveInHierarchy)).forEach((q=>{var K;null===(K=q.GameObject.findComponentInChildren(hs.k))||void 0===K||K.onVictory.addOnce((()=>this.cycleDisabledSpawns(q.spawnId)))}))}determineDisabledSpawns(){if(!X.Aq$.isDefined(this._minimumOptionalSpawns))return void X.VyI.log("SpawnManagerComponent, no minimum number of optional spawns provided",X.$bb.Warning);const q=this._spawnPoints.filter((q=>q.spawnType===go.Optional));if(q.length<=this._minimumOptionalSpawns)return void($o._disabledSpawnCache[this._mapName]=[]);const K=oi.fromRange(this._minimumOptionalSpawns,q.length+1),z=q.length-K;if(z<=0)return void($o._disabledSpawnCache[this._mapName]=[]);const Y=hi.selectElements(z,q);$o._disabledSpawnCache[this._mapName]=Y.map((q=>q.spawnId)),Y.forEach((q=>q.GameObject.destroy()))}cycleDisabledSpawns(q){var K;if(!X.Aq$.isDefined($o._disabledSpawnCache[this._mapName])||0===$o._disabledSpawnCache[this._mapName].length)return;const z=hi.selectElement($o._disabledSpawnCache[this._mapName]),Y=$o._disabledSpawnCache[this._mapName].indexOf(z);$o._disabledSpawnCache[this._mapName][Y]=q,null===(K=this._spawnPoints.find((q=>q.spawnId===z)))||void 0===K||K.delayRespawn()}};Ho._disabledSpawnCache={},(0,Q.Cg)([(0,X.Bak)(),(0,X.tW2)("constants"),(0,Q.Sn)("design:type",String)],Ho.prototype,"_constantsDataSource",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_MAP_TAG"),(0,Q.Sn)("design:type",String)],Ho.prototype,"_mapName",void 0),(0,Q.Cg)([(0,X.Pqz)(X.bE_),(0,Q.Sn)("design:type",X.bE_)],Ho.prototype,"_context",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ho.prototype,"battleBackground",void 0),Ho=$o=(0,Q.Cg)([(0,X.EVk)("SpawnManager",et.Y.mapSpawning)],Ho);var Vo,Wo=z(26004),qo=z(50503),Ko=z(23748),zo=z(15218),Yo=z(2072);let Qo=Vo=class extends Yi.z{isEncounterEnabled(q){var K,z;const Y=this._map.zone.getQuestState(),Q=this._playerDataProvider.player.state.get(`zone-${this._map.zone.ID}-uniqueEncounters-${this._map.tag}`)||{},X=q.unique?q.isQuestEncounter?1===Y.state[this._spawnId+1]:1===Q[this._spawnId+1]:(null===(K=this._map.mapMonsters[this._spawnId+1])||void 0===K?void 0:K.respawn)>(new Date).getTime(),Z=null===(z=this._map.questParams.enableMonsters)||void 0===z||z;return(q.isQuestEncounter||Z)&&!X}create(){super.create(),this.bindContext()}getNewIndicatorVisibility(q){var K,z;const Y=this._playerDataProvider.player;return null!==(z=null===(K=this._modsOverride)||void 0===K?void 0:K.showNewIndicator)&&void 0!==z?z:Y.hasCompletedTutorial()&&Y.encounters.getPetTimesBattled(q)<1}getDifficultyIndicatorVisibility(q){const K=this._playerDataProvider.player,z=dt.q.instance.prodigy.gameContainer.get("e9f-b6e7");return zo.A.useRevisedDifficulty&&q-K.getLevel()>z.threatIndicatorLevel}setPetEncountered(q){this._playerDataProvider.player.encounters.onPetEncountered(q)}getMonsterData(q){var K,z;const Y=this._spawnId+1;if(!(null===(K=this._map.mapMonsters[Y])||void 0===K?void 0:K.data)&&!(null===(z=this._map.mapMonsters[Y])||void 0===z?void 0:z.monsterData)){const K=dt.q.instance.prodigy.battle.chooseRandomMonster(q);this._map.mapMonsters[Y]={data:K,monsterData:K}}return this._map.mapMonsters[Y].monsterData}bindContext(){this._spawnManager.getSpawnDataForMap(this._map.zoneName).then((q=>{var K,z,Y,Q,Z,J,tt;const et=X.Aq$.isDefined(null===(K=this._map.mapMonsters[this._spawnId+1])||void 0===K?void 0:K.respawn),it=null===(z=q[this._spawnId])||void 0===z?void 0:z.mods,st=this.getMonsterData(null!==(Q=null===(Y=this._modsOverride)||void 0===Y?void 0:Y.encounter)&&void 0!==Q?Q:it.encounter),nt=Object.assign(Object.assign(Object.assign({},it),{range:(null==it?void 0:it.range)?Math.sqrt(it.range):Vo.DEFAULT_ENCOUNTER_RANGE,screen:this._map.battleBG,onFaint:this._map.zone.defaultOnFaint,encounter:[st],addZoneCurrency:!0,monsterData:st}),this._modsOverride),at=this.getDifficultyIndicatorVisibility(nt.minLevel),rt=nt.revampBattleType===ki.gu.ZoneMiniboss,ot=nt.minLevel>=100?null===(Z=nt.minLevel)||void 0===Z?void 0:Z.toString():null===(J=nt.minLevel)||void 0===J?void 0:J.toString().concat("+"),ht=X.Aq$.isDefined(this._map.mapMonsters[this._spawnId+1]);if(!rt&&ht&&!nt.isQuestEncounter&&zo.A.useRevisedDifficulty){const q=dt.q.instance.prodigy.gameContainer.get("e9f-b6e7");nt.level=this.getMainEncounterLevelFromProbabilitySchema(q.weightedEncounterLevelProbabilities,nt.minLevel,nt.maxLevel),nt.bench=uo.P8.getPetBench(nt.encounter[0].ID),nt.bench.forEach((K=>{K.level=this.getBenchLevelFromProbabilitySchema(q.weightedBenchLevelProbabilities,nt.level)}))}else nt.difficulty&&(nt.minLevel=null,nt.maxLevel=null);this._context.Container.rebind("EncounterBattleMods").toConstantValue(nt),this._context.Container.rebind("EncounterPetId").toConstantValue(nt.encounter[0].ID),this._context.Container.rebind("EncounterZoneTag").toConstantValue(this._map.zoneName),this._context.Container.rebind("EncounterEnabled").toConstantValue(this.isEncounterEnabled(nt)),this._context.Container.rebind("EncounterTriggerRadius").toConstantValue(nt.range*(null!==(tt=se.A.get("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"))&&void 0!==tt?tt:1)),this._context.Container.rebind("EncounterScale").toConstantValue(this.getEncounterScale(nt)),this._context.Container.rebind("EncounterSpawnTime").toConstantValue(et?1:0),this._context.Container.rebind("EncounterShouldShowGuideHand").toConstantValue(nt.showGuideHand),this._context.Container.rebind("EncounterShouldShowBossIndicator").toConstantValue(rt),this._context.Container.rebind("EncounterShouldShowNewIndicator").toConstantValue(!(rt||at)&&this.getNewIndicatorVisibility(nt.encounter[0].ID)),this._context.Container.rebind("EncounterShouldShowDifficultyIndicator").toConstantValue(at&&!nt.showGuideHand&&!rt),this._context.Container.rebind("EncounterDifficultyIndicatorLevel").toConstantValue(rt?nt.encounter[0].level:ot),this._context.Container.rebind("EncounterDifficultyIndicatorTier").toConstantValue(nt.minibossDifficulty),nt.rangeRadiusOffset&&(this._context.Container.rebind("EncounterRadiusOffsetX").toConstantValue(nt.rangeRadiusOffset.x),this._context.Container.rebind("EncounterRadiusOffsetY").toConstantValue(nt.rangeRadiusOffset.y)),this.setPetEncountered(st.ID),this.gameObject.findComponentsInChildren(Wo.B).forEach((q=>q.consume()))})).catch(X.RQr.createHandler(`Could not get spawn data for map ${this._map.zoneName}`))}getEncounterScale(q){return q.flip||q.randDir&&Math.random()>.5?[-1,1]:[1,1]}getMainEncounterLevelFromProbabilitySchema(q,K,z){const Y=K||aa.s.minLevel,Q=z||aa.s.activePlayerLevelCap,Z=this._playerDataProvider.getLevel();let J;const tt=Object.keys(q),et=Object.values(q);switch(tt[Ko.z.selectRandomWeightedSelection(et)]){case"higher":J=Z+1;break;case"lower":J=Z-1;break;default:J=Z}return X.cj9.clamp(J,Math.max(Y,aa.s.minLevel),Math.min(Q,aa.s.maxLevelConfig.regular))}getBenchLevelFromProbabilitySchema(q,K){let z;const Y=Object.keys(q),Q=Object.values(q);switch(Y[Ko.z.selectRandomWeightedSelection(Q)]){case"lower":z=K-1;break;case"lowest":z=K-2;break;default:z=K}return X.cj9.clamp(z,aa.s.minLevel,aa.s.maxLevelConfig.regular)}unbindContext(){}};Qo.DEFAULT_ENCOUNTER_RANGE=200,Qo.DANGEROUS_ENCOUNTER_LEVEL_DEFICIT=7,(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Qo.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("11f-118a"),(0,Q.Sn)("design:type",Object)],Qo.prototype,"_featureRequirements",void 0),(0,Q.Cg)([(0,X.Cdj)("bac-9e8b"),(0,Q.Sn)("design:type",Yo.e)],Qo.prototype,"_spawnManager",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterMap"),(0,Q.Sn)("design:type",Go.T)],Qo.prototype,"_map",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterSpawnId"),(0,Q.Sn)("design:type",Number)],Qo.prototype,"_spawnId",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterOverrideMods"),(0,Q.Sn)("design:type",Object)],Qo.prototype,"_modsOverride",void 0),Qo=Vo=(0,Q.Cg)([(0,X.EVk)("ZoneEncounterDataProvider",et.Y.mapSpawning)],Qo);let Xo=class extends Yi.z{get isEncounterEnabled(){var q;const K=this._map.zone.getState(this._spawnId),z=null===(q=this._map.questParams.enableWizards)||void 0===q||q,Y=X.Aq$.isDefined(K)&&0!==K;return z&&!Y&&!0}create(){super.create(),this.bindContext()}bindContext(){var q;const K=this.getBattleMods(this._assetId);this._context.Container.bind("EncounterBattleMods").toConstantValue(K),this._context.Container.rebind("EncounterZoneTag").toConstantValue(this._map.zoneName),this._context.Container.rebind("EncounterEnabled").toConstantValue(this.isEncounterEnabled),this._context.Container.rebind("EncounterTriggerRadius").toConstantValue(K.range*(null!==(q=se.A.get("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"))&&void 0!==q?q:1)),this._context.Container.rebind("EncounterSpawnTime").toConstantValue(0),this.gameObject.findComponentsInChildren(Wo.B).forEach((q=>q.consume()))}unbindContext(){}getBattleMods(q){var K,z;const Y=ae.t.getItem("boss",q),Q=this._playerDataProvider.player.getLevel(),X=null!==(z=null===(K=Y.data.battle.pets)||void 0===K?void 0:K.map((q=>({ID:parseInt(q.ID),level:qo.A.getEnemyLevel(Q,q.difficulty)}))))&&void 0!==z?z:[];return{opponent:[{data:{ID:q,level:qo.A.getEnemyLevel(Q,Y.data.battle.difficulty)},appearance:Y.metadata.appearance,equipment:Y.metadata.equipment}],pets:X,difficulty:Y.data.battle.difficulty,range:Qo.DEFAULT_ENCOUNTER_RANGE,onEnd:this._map.zoneName,screen:this._map.battleBG,onFaint:this._map.zone.defaultOnFaint}}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Xo.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterMap"),(0,Q.Sn)("design:type",Go.T)],Xo.prototype,"_map",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterSpawnId"),(0,Q.Sn)("design:type",String)],Xo.prototype,"_spawnId",void 0),(0,Q.Cg)([(0,X.Cdj)("EncounterAssetId"),(0,Q.Sn)("design:type",Number)],Xo.prototype,"_assetId",void 0),Xo=(0,Q.Cg)([(0,X.EVk)("WizardEncounterDataProvider",et.Y.mapSpawning)],Xo);let Zo=class extends X.PQK{installBindings(){var q,K;const z=null!==(K=null===(q=dt.q.instance.game.state.get(Nt.G.TileScreen).user)||void 0===q?void 0:q.playerPrefab)&&void 0!==K?K:X.wa5.getActiveScene().container.get("MainPlayerGameObject");this.Container.bind("TriggerTarget").toConstantValue(z),this.Container.bind("MainPlayerGameObject").toConstantValue(z),this.Container.bind("PlayerPathfinder").toConstantValue(z.findComponentInChildren(St.f)),this.Container.bind("PlayerLocomotion").toConstantValue(z.findComponentInChildren(X.KhP))}};Zo=(0,Q.Cg)([(0,X.Og1)("ZoneEncounterInstaller","Installer")],Zo);var Jo=z(40295),th=z(93867);let eh=class extends X.uAl{constructor(){super(...arguments),this._targetStep=Jo.B.NotStarted,this._stepCompleted=new X.HN0,this._stepIsCurrent=new X.HN0,this._stepNotStarted=new X.HN0,this._stepNotCompleted=new X.HN0}checkStep(){let q=th.U.isStepComplete(this._targetStep);th.U.progressData.step===this._targetStep?this._stepIsCurrent.dispatch():q||this._stepNotStarted.dispatch();(q?this._stepCompleted:this._stepNotCompleted).dispatch()}destroy(){this._stepIsCurrent.dispose(),this._stepNotStarted.dispose(),this._stepCompleted.dispose(),this._stepNotCompleted.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.gfw)(Jo.B),(0,Q.Sn)("design:type",String)],eh.prototype,"_targetStep",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],eh.prototype,"_stepCompleted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],eh.prototype,"_stepIsCurrent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],eh.prototype,"_stepNotStarted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],eh.prototype,"_stepNotCompleted",void 0),eh=(0,Q.Cg)([(0,X.EVk)("CheckEndgameQuestStep",et.Y.utility)],eh);let ih=class extends X.uAl{constructor(){super(...arguments),this.questIsActive=new X.HN0,this.questNotActive=new X.HN0,this.questActiveState=new X.HN0}create(){super.create(),this._checkOnCreate&&this.checkQuest()}destroy(){this.questIsActive.dispose(),this.questNotActive.dispose(),this.questActiveState.dispose(),super.destroy()}checkQuest(){const q=th.U.isEndgameQuestActive(),K=th.U.hasDefeatedPippet();this.questActiveState.dispatch(q),q?K?this.questIsActive.dispatch("ENDGAME_QUEST_BANNER_DEFEAT_PUPPET_MASTER"):this.questIsActive.dispatch("ENDGAME_QUEST_BANNER_GO_TO_ACADEMY"):this.questNotActive.dispatch()}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ih.prototype,"_checkOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ih.prototype,"questIsActive",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ih.prototype,"questNotActive",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ih.prototype,"questActiveState",void 0),ih=(0,Q.Cg)([(0,X.EVk)("CheckOnEndgameQuest",et.Y.utility)],ih);z(68607);let sh=class extends X.uAl{endgameQuestlocallyAdvance(){th.U.locallyAdvanceQuest()}};var nh;sh=(0,Q.Cg)([(0,X.EVk)("EndgameQuestLocallyAdvance",et.Y.utility)],sh),function(q){q.IsEndgameQuestActive="IsEndgameQuestActive",q.EndgameQuestStep="EndgameQuestStep",q.IsEndgameQuestCompleted="IsEndgameQuestCompleted",q.ShouldShowEndgameCelebrationConfetti="ShouldShowEndgameCelebrationConfetti",q.ShouldShowPuppetMasterDefeatScene="ShouldShowPuppetMasterDefeatScene",q.ShouldShowMissedPuppetMasterGearScene="ShouldShowMissedPuppetMasterGearScene",q.AwardMissedPuppetMasterGearCallback="AwardMissedPuppetMasterGearCallback",q.SavePuppetMasterDefeatDateCallback="SavePuppetMasterDefeatDateCallback"}(nh||(nh={}));let ah=class extends X.PQK{installBindings(){this.Container.bind(nh.IsEndgameQuestActive).toConstantValue(th.U.isEndgameQuestActive()),this.Container.bind(nh.EndgameQuestStep).toConstantValue(th.U.progressData.step),this.Container.bind(nh.IsEndgameQuestCompleted).toConstantValue(th.U.isStepComplete(Jo.B.PuppetMasterDefeated)),this.Container.bind(nh.ShouldShowEndgameCelebrationConfetti).toConstantValue(th.U.shouldShowPuppetMasterDefeatCelebration()),this.Container.bind(nh.ShouldShowPuppetMasterDefeatScene).toConstantValue(th.U.shouldShowPuppetMasterDefeatScene()),this.Container.bind(nh.ShouldShowMissedPuppetMasterGearScene).toConstantValue(th.U.shouldShowMissedPuppetMasterGearScene()),this.Container.bind(nh.AwardMissedPuppetMasterGearCallback).toConstantValue((()=>th.U.awardMissedPuppetMasterGear())),this.Container.bind(nh.SavePuppetMasterDefeatDateCallback).toConstantValue((()=>{dt.q.instance.prodigy.gameContainer.get("782-c308").data.puppetMasterDefeatDate=Date.now()}))}};ah=(0,Q.Cg)([(0,X.Og1)("EndgameQuestProgressInstaller","Installer")],ah);var rh=z(28029);let oh=class extends X.uAl{create(){super.create(),this._showConfettiOnCreate&&this.showConfetti()}showConfetti(){var q;rh.E.addConfetti(null!==(q=this._targetGameObject)&&void 0!==q?q:this.gameObject)}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],oh.prototype,"_showConfettiOnCreate",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],oh.prototype,"_targetGameObject",void 0),oh=(0,Q.Cg)([(0,X.EVk)("FullScreenConfetti",et.Y.effect)],oh);var hh=z(85126),ch=z(113);let dh=class extends X.uAl{constructor(){super(...arguments),this.PLACEMENT_EVENTS=new Map([[ch.O.Firefly,"KEYSTONE_PLACED_EVENT_FIREFLY"],[ch.O.Shiverchill,"KEYSTONE_PLACED_EVENT_SHIVERCHILL"],[ch.O.Bonfire,"KEYSTONE_PLACED_EVENT_BONFIRE"],[ch.O.Shipwreck,"KEYSTONE_PLACED_EVENT_SHIPWRECK"],[ch.O.Skywatch,"KEYSTONE_PLACED_EVENT_SKYWATCH"]]),this.KEYSTONE_ORDER=new Map([["KEYSTONE_PLACED_EVENT_FIREFLY",1],["KEYSTONE_PLACED_EVENT_SHIVERCHILL",2],["KEYSTONE_PLACED_EVENT_BONFIRE",3],["KEYSTONE_PLACED_EVENT_SHIPWRECK",4],["KEYSTONE_PLACED_EVENT_SKYWATCH",5]]),this._placeGemsComplete=new X.HN0}placeRemainingGems(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=hh.N.getKeystonesToPlace().map((q=>this.PLACEMENT_EVENTS.get(q)));if(q.sort(((q,K)=>this.KEYSTONE_ORDER.get(q)-this.KEYSTONE_ORDER.get(K))),q.length>0){for(let K=0;K{this.checkNumberOfAffordableEvolutions(50)}),this,null)}checkNumberOfAffordableEvolutions(q=0){X.Egh.timeout(q).then((()=>(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._hardCurrency.getAmountOfAffordableEvolutions();this._onNumberOfAffordablePets.dispatch(q>0,q)}))),X.RQr.createHandler("Could not count affordable evolutions"))}checkAllowanceData(q=ie.D.Ultra){this._hardCurrency.getAllowanceClaimData().then((K=>{var z,{totalClaimable:Y}=K,X=(0,Q.Tt)(K,["totalClaimable"]);const{[q]:Z}=X;if(!gh.A.isDefined(Z))return;const J=Z.availableToCollect?"available":"claimed",tt=Z.hasValidFeature?J:"needs_membership";this._onAllowanceClaimStatusChecked.dispatch(tt),this._onAllowanceAmountChecked.dispatch(Z.reward.value),this._onAllowanceDaysToCollectChecked.dispatch(null!==(z=Z.daysToCollect)&&void 0!==z?z:0),this._allowanceData=Z})).catch(X.RQr.createHandler("error checking allowance data"))}claimAllowance(){return(0,Q.sH)(this,arguments,void 0,(function*(q=ie.D.Ultra){try{yield this._hardCurrency.claimAllowances([q]),this.checkAllowanceData(q)}catch(K){X.RQr.logError(K,"Error claiming allowance")}}))}showAllowanceDetails(){if(!this._allowanceData)return void X.VyI.log("No allowance loaded, skipping modal",X.$bb.Warning);const{currency:q,value:K}=this._allowanceData.reward;this._segment.purchase.sendFunnelStart({type:"Click-Subscription-Tier-3-Treasure-Track",category:"Treasure-Track",contentId:`currency-${q}`,adType:Ys.R.BattlePassUpsell}),dt.q.instance.prodigy.open.itemInfo({claimable:this._allowanceData.hasValidFeature,claimed:this._allowanceData.hasValidFeature&&!this._allowanceData.availableToCollect,isMystery:!1,membershipTier:Vs._$.MemberUltra,rewardId:"",itemDrop:{type:"currency",ID:q,N:K}})}checkTrackedCurrencyBalance(){Nr.B.includes(this._trackedCurrencyId)&&this._onTrackedCurrencyBalanceChecked.dispatch(this._hardCurrency.getBalance(this._trackedCurrencyId))}onBalanceChanged(q){this.checkNumberOfAffordableEvolutions(100),q.currency===this._trackedCurrencyId&&(this._hardCurrency.getPreviousBalance(q.currency)>q.value?this._onTrackedCurrencySpent.dispatch(q.value):this._onTrackedCurrencyEarned.dispatch(q.value))}destroy(){this._onNumberOfAffordablePets.dispose(),this._onAllowanceClaimStatusChecked.dispose(),this._onAllowanceAmountChecked.dispose(),this._onAllowanceDaysToCollectChecked.dispose(),this._onTrackedCurrencyBalanceChecked.dispose(),this._onTrackedCurrencyEarned.dispose(),this._onTrackedCurrencySpent.dispose(),this._hardCurrency.onBalanceChanged.remove(this.onBalanceChanged,this),this._hardCurrency.onAffordableCacheChanged.remove(this._affordableChangeCallback,this),dt.q.instance.game.broadcaster.removeAppListener(Xn.ig.AnyLevelUp,this),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("bec-c6b4"),(0,Q.Sn)("design:type",na.W)],mh.prototype,"_hardCurrency",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],mh.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],mh.prototype,"_trackedCurrencyId",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mh.prototype,"_onNumberOfAffordablePets",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mh.prototype,"_onAllowanceClaimStatusChecked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mh.prototype,"_onAllowanceAmountChecked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mh.prototype,"_onAllowanceDaysToCollectChecked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mh.prototype,"_onTrackedCurrencyEarned",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mh.prototype,"_onTrackedCurrencySpent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mh.prototype,"_onTrackedCurrencyBalanceChecked",void 0),mh=(0,Q.Cg)([(0,X.EVk)("HardCurrencyDataProvider",et.Y.utility)],mh);var yh,_h,Eh=z(42113);!function(q){q.InfoPanelRank="LEADERBOARD_PANEL_RANK",q.InfoPanelDisplayName="LEADERBOARD_PANEL_DISPLAY_NAME",q.InfoPanelCorrectAnswers="LEADERBOARD_PANEL_CORRECT_ANSWERS",q.InfoPanelBorderHex="LEADERBOARD_PANEL_BORDER_HEX",q.InfoPanelBackgroundHex="LEADERBOARD_PANEL_BACKGROUND_HEX",q.InfoPanelPrize="LEADERBOARD_PANEL_PRIZE_INFO"}(yh||(yh={})),function(q){q.Border="#0068A3",q.Background="#DEF5FF"}(_h||(_h={}));let wh=class extends X.uAl{constructor(){super(...arguments),this.isCurrentPlayer=!1}get entryId(){return this._entryId}updatePanelData(q){var K;this._entryId=q.id;const z={[yh.InfoPanelRank]:q.totalAnswersCorrect<=0?this._localizer.getText("LEADERBOARDS_PREVIOUS_UNRANKED"):q.rank,[yh.InfoPanelDisplayName]:Vt.$.truncate(q.displayName,Eh.O.DISPLAY_NAME_MAX,!0),[yh.InfoPanelCorrectAnswers]:q.totalAnswersCorrect};this.isCurrentPlayer&&(z[yh.InfoPanelBackgroundHex]=_h.Background,z[yh.InfoPanelBorderHex]=_h.Border);const Y=null===(K=q.prize)||void 0===K?void 0:K[0];Y&&X.Aq$.isDefined(q.prizeIcon)&&(z[yh.InfoPanelPrize]=[`${Y.N}`,q.prizeIcon]),Ht.d.updateInjectedValues(this.GameObject,z)}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],wh.prototype,"_localizer",void 0),wh=(0,Q.Cg)([(0,X.EVk)("LeaderboardInitPanel",et.Y.leaderboard)],wh);var Th=z(61985),Sh=z(93833),Ah=z(70548),Ch=z(18206);let Oh=class extends X.uAl{constructor(){super(...arguments),this._playerAvatar=null,this._previousCycleSvs=null}get isCvCViewed(){return this._breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_LEADERBOARD,Es.B.BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED)}get isSvSViewed(){return this._breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_LEADERBOARD,Es.B.BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED)}postCreate(){super.postCreate(),this._leaderboardDataProvider.retrievePreviousSvSRankData().then((q=>{this._previousCycleSvs=q,this.checkNotificationEnabled()})).catch(X.RQr.createHandler("Error retrieving previous SvS rank data"))}destroy(){var q;null===(q=this._playerAvatar)||void 0===q||q.destroy(),super.destroy()}checkNotificationEnabled(){var q;let K,z;this._previousCycleSvs&&!((null===(q=this._previousCycleSvs)||void 0===q?void 0:q.totalAnswersCorrect)<=0)||this.isSvSViewed||this._player.data.lastActiveStudentLeaderboardDate===Eh.O.cachedCycleEndDate||this._breadcrumbManager.completeBreadcrumb(Es.B.FEATURE_LEADERBOARD,Es.B.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED),this.isSvSViewed?this.isCvCViewed||(K=this._player.data.lastActiveLeaderboardDate,z=Eh.n.ClassLeaderboard,this._segmentInterfaceProperties.interfaceName="leaderboard-notification-popup-class-vs-class"):(K=this._player.data.lastActiveStudentLeaderboardDate,z=Eh.n.StudentLeaderboard,this._segmentInterfaceProperties.interfaceName="leaderboard-notification-popup-student-vs-class",this._playerAvatar=dt.q.instance.prodigy.create.player(this._avatarRootContainer.rootContainer,this._player,1,0,0,!0,{isPreview:!0,headOnly:!0,hideMount:!0},!0,!1),this._playerAvatar.reload()),X.Aq$.isDefined(K)&&K!==Eh.O.cachedCycleEndDate?this._leaderboardDataProvider.updateLeaderboardData(z):(dt.q.instance.game.broadcaster.broadcast(Xn.Y1.UpdateSocialNotification,Xn.HG.HUD),this.destroy())}showNotification(){this.isCreated&&!this.GameObject.isDestroyed&&(this._contentContainer.active=!0,this._autoTimeout.startTimer(),this._segmentInterfaceComponent.sendInterfaceEvent())}setRank(q){"1st"===q||"2nd"===q||"3rd"===q?(this._textRankSummaryTop.GameObject.active=!0,this._textRankSummary.GameObject.active=!1):(this._textRankSummaryTop.GameObject.active=!1,this._textRankSummary.GameObject.active=!0)}};(0,Q.Cg)([(0,Qi.b)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],Oh.prototype,"_player",void 0),(0,Q.Cg)([(0,Qi.b)("fa1-8ec9"),(0,Q.Sn)("design:type",fh.F)],Oh.prototype,"_breadcrumbManager",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Oh.prototype,"_contentContainer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Oh.prototype,"_textRankSummaryTop",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Oh.prototype,"_textRankSummary",void 0),(0,Q.Cg)([(0,X.MnK)(Th.E),(0,Q.Sn)("design:type",Th.E)],Oh.prototype,"_autoTimeout",void 0),(0,Q.Cg)([(0,X.MnK)(Eh.O),(0,Q.Sn)("design:type",Eh.O)],Oh.prototype,"_leaderboardDataProvider",void 0),(0,Q.Cg)([(0,X.MnK)(Ah.S),(0,Q.Sn)("design:type",Ah.S)],Oh.prototype,"_segmentInterfaceComponent",void 0),(0,Q.Cg)([(0,X.MnK)(Ch.y),(0,Q.Sn)("design:type",Ch.y)],Oh.prototype,"_segmentInterfaceProperties",void 0),(0,Q.Cg)([(0,X.MnK)(Sh.$),(0,Q.Sn)("design:type",Sh.$)],Oh.prototype,"_avatarRootContainer",void 0),Oh=(0,Q.Cg)([(0,X.EVk)("LeaderboardNotification",et.Y.leaderboard)],Oh);var Ih=z(5269),Dh=z(2385);let Rh=class extends X.uAl{constructor(){super(...arguments),this._isInitialUpdate=!0}updatePanels(q,K){this._panelsDivider.active=!1;for(let Q=this._panelsObj.children.length;--Q>=0;)this._panelsObj.children[Q].active&&this._panelsObj.children[Q].destroy();let z=null;const Y=[];for(const[Q,Z]of Object.entries(q))Z.displayName&&(Z.totalAnswersCorrect<=0&&!X.Aq$.isDefined(z)&&(z=Number.parseInt(Q)),Y.push(new Promise((q=>{this._prefabLoader.loadWithDependenciesFromGUID(this._leaderboardType===Eh.n.ClassLeaderboard?Gt.l.LeaderboardRankingPanel:Gt.l.LeaderboardSvSRankingPanel,this._panelsObj).then((z=>{const Y=z.findComponent(wh);Y&&(K===Z.id&&(Y.isCurrentPlayer=!0),Y.updatePanelData(Z)),q()})).catch(X.RQr.createHandler("Error creating panel"))}))));Promise.all(Y).then((()=>{this._isInitialUpdate&&(this._scrollView.scrollToPercent(100,Ih.H.Vertical),this._scrollView.resetVelocityWheel(),this._isInitialUpdate=!1),z&&(this._panelsDivider.setRenderOrder(z),this._panelsDivider.active=!0),this._grid.updateAll()})).catch(X.RQr.createHandler("Error loading all panels"))}};(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Rh.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.MnK)(Dh.I),(0,Q.Sn)("design:type",Dh.I)],Rh.prototype,"_scrollView",void 0),(0,Q.Cg)([(0,X.MnK)(X.JTA),(0,Q.Sn)("design:type",X.JTA)],Rh.prototype,"_grid",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rh.prototype,"_panelsObj",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rh.prototype,"_panelsDivider",void 0),(0,Q.Cg)([(0,X.gfw)(Eh.n),(0,Q.Sn)("design:type",String)],Rh.prototype,"_leaderboardType",void 0),Rh=(0,Q.Cg)([(0,X.EVk)("LeaderboardRankingView",et.Y.leaderboard)],Rh);var Ph=z(93991);let Mh=class extends X.uAl{setTintableBanner(){}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Mh.prototype,"_titleText",void 0),(0,Q.Cg)([(0,X.MnK)(Ph.w),(0,Q.Sn)("design:type",Ph.w)],Mh.prototype,"_bannerLeftFill",void 0),(0,Q.Cg)([(0,X.MnK)(Ph.w),(0,Q.Sn)("design:type",Ph.w)],Mh.prototype,"_flagLeftFill",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Mh.prototype,"_flagLeftImage",void 0),(0,Q.Cg)([(0,X.MnK)(Ph.w),(0,Q.Sn)("design:type",Ph.w)],Mh.prototype,"_bannerRightFill",void 0),(0,Q.Cg)([(0,X.MnK)(Ph.w),(0,Q.Sn)("design:type",Ph.w)],Mh.prototype,"_flagRightFill",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Mh.prototype,"_flagRightImage",void 0),Mh=(0,Q.Cg)([(0,X.EVk)("FlagTintableBanner (abstract)")],Mh);let Nh=class extends Mh{constructor(){super(...arguments),this._rankDisplayText=""}setRank(q){this._rankDisplayText=q,this.setTintableBanner()}setTintableBanner(){let q,K;this._titleText.text=this._rankDisplayText;let z=!1,Y=!1;switch(this._rankDisplayText){case"1st":z=!0,Y=!0,q="0xD41E3C",K="icon-trophy-gold-large";break;case"2nd":z=!0,Y=!0,q="0x4864BA",K="icon-trophy-silver-large";break;case"3rd":z=!0,Y=!0,q="0x82AA28",K="icon-trophy-bronze-large";break;case"4th":case"5th":Y=!0,q="0xFEB02E"}this._flagLeftGameObject.active=z,this._flagRightGameObject.active=z,this._flagDetailsLeftGameObject.active=z,this._flagDetailsRightGameObject.active=z,this._flagLeftImage.GameObject.active=z,this._flagRightImage.GameObject.active=z,z&&(this._flagLeftFill.disableTint(),this._flagLeftFill.hexTintColor=q,this._flagLeftFill.enableTint(),this._flagRightFill.disableTint(),this._flagRightFill.hexTintColor=q,this._flagRightFill.enableTint(),this._flagLeftImage.setAsset(ti._.Ui_social_menu_json,K),this._flagRightImage.setAsset(ti._.Ui_social_menu_json,K)),this._bannerLeftGameObject.active=Y,this._bannerRightGameObject.active=Y,Y&&(this._bannerLeftFill.disableTint(),this._bannerLeftFill.hexTintColor=q,this._bannerLeftFill.enableTint(),this._bannerRightFill.disableTint(),this._bannerRightFill.hexTintColor=q,this._bannerRightFill.enableTint())}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Nh.prototype,"_bannerLeftGameObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Nh.prototype,"_flagLeftGameObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Nh.prototype,"_flagDetailsLeftGameObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Nh.prototype,"_bannerRightGameObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Nh.prototype,"_flagRightGameObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Nh.prototype,"_flagDetailsRightGameObject",void 0),Nh=(0,Q.Cg)([(0,X.EVk)("RankFlagTintableBanner")],Nh);let xh=class extends X.uAl{constructor(){super(...arguments),this._textCvC=[],this._textSvS=[],this._leaderboardType=Eh.n.ClassLeaderboard}updateDisplay(q=this._leaderboardType){this._leaderboardType=q;for(const z of this._textCvC)z.GameObject.active=q===Eh.n.ClassLeaderboard;for(const z of this._textSvS)z.GameObject.active=q===Eh.n.StudentLeaderboard;this.continueButtonCvC.GameObject.active=q===Eh.n.ClassLeaderboard;const K=q===Eh.n.StudentLeaderboard&&!dt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_LEADERBOARD,Es.B.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED);this.continueButtonSvS.GameObject.active=q===Eh.n.StudentLeaderboard&&!K,this.getPrizeButtonSvS.GameObject.active=q===Eh.n.StudentLeaderboard&&K}};(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],xh.prototype,"continueButtonCvC",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],xh.prototype,"continueButtonSvS",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],xh.prototype,"getPrizeButtonSvS",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",Array)],xh.prototype,"_textCvC",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",Array)],xh.prototype,"_textSvS",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],xh.prototype,"cvcCongratsText",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],xh.prototype,"svsCongratsText",void 0),xh=(0,Q.Cg)([(0,X.EVk)("LeaderboardResultsDisplay",et.Y.leaderboard)],xh);let Lh=class extends X.uAl{constructor(){super(...arguments),this._rankDisplayText="",this._leaderboardType=Eh.n.ClassLeaderboard,this.onContinue=new X.HN0,this.onPrize=new X.HN0,this._initialized=!1}setRank(q){this._rankDisplayText=q}setLeaderboardType(q){this._leaderboardType=q}updateDisplay(){if(this._rankDisplayText){const q=this.GameObject.findComponentInChildren(Nh);q&&q.setRank(this._rankDisplayText);const K=this.GameObject.findComponentInChildren(xh);if(K){const q=this._leaderboardType===Eh.n.ClassLeaderboard,z=q?K.cvcCongratsText:K.svsCongratsText;switch(this._rankDisplayText){case"1st":case"2nd":case"3rd":z.localizationKey=q?"LEADERBOARDS_RESULTS_RANK_TOP":"LEADERBOARDS_RESULTS_RANK_STUDENT_TOP";break;default:z.localizationKey=q?"LEADERBOARDS_RESULTS_RANK":"LEADERBOARDS_RESULTS_RANK_STUDENT"}z.setTextArguments(this._rankDisplayText),K.updateDisplay(this._leaderboardType),this._initialized||(this._initialized=!0,K.continueButtonCvC.onClick.add((()=>{this.onContinue.dispatch()})),K.continueButtonSvS.onClick.add((()=>{this.onContinue.dispatch()})),K.getPrizeButtonSvS.onClick.add((()=>{this.onPrize.dispatch()})))}}}destroy(){this.onContinue.dispose(),this.onPrize.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Lh.prototype,"onContinue",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Lh.prototype,"onPrize",void 0),Lh=(0,Q.Cg)([(0,X.EVk)("LeaderboardResultsController",et.Y.leaderboard)],Lh);z(18332);var kh=z(78746),Bh=z(90156),Uh=z(129),Fh=z(13693),Gh=z(44564),jh=z(87331),$h=z(99737),Hh=z(41538),Vh=z(75777);let Wh=class extends X.uAl{refreshFollow(){const q=this._currentPlayer.player.equipment.getFollow();this._followContainer&&(this._followContainer.destroy(),this._followContainer=null),q&&(this._followContainer=dt.q.instance.prodigy.create.follow(this._spine.getRootContainer(),q,1,null),(this._followContainer instanceof Vh.i||this._followContainer instanceof $h.z||this._followContainer instanceof Hh.g)&&this._followContainer.startLoad())}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Wh.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],Wh.prototype,"_spine",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Wh.prototype,"_localizer",void 0),Wh=(0,Q.Cg)([(0,X.EVk)("FollowDisplay",et.Y.lootDash)],Wh);var qh=z(61895),Kh=z(66397);let zh=class extends X.uAl{constructor(){super(...arguments),this._equippedPetsSetup=!1,this._activeItemCards=[],this._itemCards=[],this._onTeamItemCardMap={},this._petFilledTeamCards=[],this._emptyFilledTeamCardInjectedValues={PET_ID:-1,PET_DATA:null,NAME:"Empty",LEVEL:0,MERGE_RANK:0,SHOW_MERGE_RANK_BADGE:!1,INPUT_ENABLED:!0,SHOW_SPINE:!1,SHOW_EMPTY_STATE:!0,SHOW_REPLACE_TOOLTIP:!1,SHOW_SELECTED:!1},this._petFilledTeamCardSelected=-1}get _filledTeamCardPrefab(){return Gt.l.FilledTeamCardInjectionConfiguredMergeRank}create(){this._lootDashManager.onStateDataChanged.add(this.handleStateDataChanged,this)}handleStateDataChanged(q,K){kh.kL.includes(K)&&(this._teamUpdated||this._appearanceUpdated)&&(this._currentPlayer.player.kennel.updated=this._teamUpdated,this._currentPlayer.player.appearanceChanged=this._appearanceUpdated,this._teamUpdated=!1,this._appearanceUpdated=!1,this._currentPlayer.player.forceSaveCharacter())}setup(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this._itemType=q,this._noItemsText.GameObject.active=!1,this._teamUpdated=!1,this._appearanceUpdated=!1,this._onTeamItemCardMap={},this.setupRightPanel(),yield this.setupItemCards()}))}destroy(){this._itemCards.forEach((q=>{null===q.parent&&q.destroy()})),this._itemCardScrollViewSlider.onValueChanged.remove(this.setItemCardVisibilityOnScroll,this),this._lootDashManager.onStateDataChanged.remove(this.handleStateDataChanged,this),super.destroy()}setupRightPanel(){switch(this._itemType){case"pet":this.setActiveRightPanelDisplay(this._petRightSideContainer),this._itemCardHeaderText.text=this._baseLocalizer.getText("LOOT_DASH_YOUR_PETS"),this._equippedPetsSetup?this.resetStatesOfPetFilledTeamCards():(this.setupPetsFilledTeamCards().catch(X.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the pet filled team cards")),this._equippedPetsSetup=!0);break;case"follow":this.setActiveRightPanelDisplay(this._followRightSideDisplay.GameObject),this.setupFollowRightPanel().catch(X.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the follow right panel")),this._followRightSideDisplay.refreshFollow(),this._itemCardHeaderText.text=this._baseLocalizer.getText("LOOT_DASH_YOUR_BUDDIES");break;case"mount":this.setActiveRightPanelDisplay(this._mountRightSideContainer),this.setupMountRightPanel().catch(X.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the mount right panel")),this._itemCardHeaderText.text=this._baseLocalizer.getText("LOOT_DASH_YOUR_MOUNTS")}}setupMountRightPanel(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._currentPlayer.player.equipment.getMount();this._mountFilledTeamCard?yield this.updateFilledTeamCardForBackpackItem(q,this._mountFilledTeamCard,"mount"):(this._mountFilledTeamCard=yield this.setupFilledTeamCardForBackpackItem(q,this._mountFilledTeamCardParent,"mount"),this._characterPreview.addCharacter(this._currentPlayer.player,this._characterPreviewSortingAnchor.getRootContainer()),this._characterPreview.setInputEnabled(!1))}))}setupFollowRightPanel(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._followFilledTeamCard?yield this.updateFilledTeamCardForBackpackItem(this._currentPlayer.player.equipment.getFollow(),this._followFilledTeamCard,"follow"):this._followFilledTeamCard=yield this.setupFilledTeamCardForBackpackItem(this._currentPlayer.player.equipment.getFollow(),this._followFilledTeamCardParent,"follow")}))}setActiveRightPanelDisplay(q){this._petRightSideContainer.active=q===this._petRightSideContainer,this._followRightSideDisplay.GameObject.active=q===this._followRightSideDisplay.GameObject,this._mountRightSideContainer.active=q===this._mountRightSideContainer}setupPetsFilledTeamCards(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._cardLoadingPromise)return;const q=this._currentPlayer.player.kennel.getPetTeam(!0),K=[];K.push((()=>(0,Q.sH)(this,void 0,void 0,(function*(){var K;null===(K=this._petFilledTeamCards[0])||void 0===K||K.destroy(),this._petFilledTeamCards[0]=yield this.setupFilledTeamCardForPet(q[0],0),this._topPetFilledTeamCard.addChild(this._petFilledTeamCards[0])})))()),K.push((()=>(0,Q.sH)(this,void 0,void 0,(function*(){var K;null===(K=this._petFilledTeamCards[1])||void 0===K||K.destroy(),this._petFilledTeamCards[1]=yield this.setupFilledTeamCardForPet(q[1],1),this._bottomPetFilledTeamCard.addChild(this._petFilledTeamCards[1])})))()),this._cardLoadingPromise=Promise.all(K),yield this._cardLoadingPromise.then((()=>{this._cardLoadingPromise=null})).catch(X.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Unable to create team cards"))}))}setupFilledTeamCardForPet(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){if(q){const z=qh.B.getInjectedValuesForFilledTeamCardPet(q);return this.addOnClickCallbacksToPetFilledCards(z,K),qh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,z,`equippedPet-${q.data.ID}`)}{const q=Object.assign({},this._emptyFilledTeamCardInjectedValues);return this.addOnClickCallbacksToPetFilledCards(q,K),qh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,q,"emptyPet")}}))}addOnClickCallbacksToPetFilledCards(q,K){q.ON_CLICK=()=>{this.onPetFilledTeamCardClicked(K)},q.ON_REMOVE_CLICK=()=>{this.onPetFilledTeamCardRemoveClicked(K)},q.ON_INFO_CLICK=()=>{this.onPetFilledTeamCardInfoClicked(K)}}updateFilledTeamCardForPet(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=K?qh.B.getInjectedValuesForFilledTeamCardPet(K):this._emptyFilledTeamCardInjectedValues;Ht.d.updateInjectedValues(this._petFilledTeamCards[q],z,!0),this.setupPetsFilledTeamCards().catch(X.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the pet filled team cards"))}))}onPetCardClicked(q,K){const z=this._currentPlayer.player.kennel.getPetTeam(!0);let Y=q;if(this.resetStatesOfPetFilledTeamCards(),z.some((q=>q&&q.data.uniqueID===K.uniqueID)))return;if(!z[0]||!z[1]){const Q=z[0]?2:1;this.addPetToTeam(q,K,Q),Y=-1}this.setSelectedItemCard(Y);const Q=this._selectedItemCard>=0;for(const X of this._petFilledTeamCards)Ht.d.updateInjectedValues(X,{SHOW_REPLACE_TOOLTIP:Q})}addPetToTeam(q,K,z){this._currentPlayer.player.kennel.setTeamPosition(K,z,!1);const Y=this._currentPlayer.player.kennel.getPetTeam(!0);this._teamUpdated=!0,this.updateItemCardsForOnTeamPets(q,K),this.updateFilledTeamCardForPet(z-1,Y[z-1]).catch(X.RQr.createHandler(`LootDashDetailedSelectionScreenComponent: Failed to update the ${1===z?"top":"bottom"} filled team card`))}setSelectedItemCard(q,K=!1){if(this._selectedItemCard>=0){const q=this._itemCards[this._selectedItemCard];Ht.d.updateInjectedValues(q,{SELECTED:!1})}if(!(this._selectedItemCard!==q&&q>=0))return this._selectedItemCard=-1,void this._petFilledTeamCards.forEach((q=>{Ht.d.updateInjectedValues(q,{SHOW_SELECTED:!1})}));{const z=this._itemCards[q];K||Ht.d.updateInjectedValues(z,{SELECTED:!0}),this._petFilledTeamCards.forEach((q=>{Ht.d.updateInjectedValues(q,{SHOW_SELECTED:!0})}))}this._selectedItemCard=q}onPetFilledTeamCardClicked(q){const K=this._petFilledTeamCards[q],z=this._currentPlayer.player.kennel.getPetTeam(!0)[q];this.resetStatesOfPetFilledTeamCards(),dt.q.instance.prodigy.audio.playSFX(18,"pop"),this._selectedItemCard>=0?this.swapEquippedPet(q):z?Ht.d.updateInjectedValues(K,{SHOW_REMOVE_TOOLTIP:!0}):this._petFilledTeamCardSelected===q?this._petFilledTeamCardSelected=-1:this._petFilledTeamCardSelected=q}onItemCardClicked(q){const K=this._itemCards[q],z=K.findComponent(X.bE_);switch(dt.q.instance.prodigy.audio.playSFX(18,"pop"),this._itemType){case"pet":const Y=z.getInjectedValue("PET_DATA");this.onPetCardClicked(q,Y);break;case"follow":case"mount":this.onBackpackItemCardClicked(K,q)}}onPetFilledTeamCardRemoveClicked(q){const K=0===q?1:2;this._currentPlayer.player.kennel.removeAtTeamPosition(K),this.resetStatesOfPetFilledTeamCards(),this.updateItemCardsForOnTeamPets(),this.updateFilledTeamCardForPet(q,null).catch(X.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to update the filled team card")),this._petFilledTeamCardSelected=-1}onPetFilledTeamCardInfoClicked(q){var K;const z=this._currentPlayer.player.kennel.getPetTeam(!0)[q].data,Y=z.team,Q=()=>{this.setupPetsFilledTeamCards().catch(X.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the pet filled team cards after closing the pet menu")),this.setupItemCards().catch(X.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up pet cards after closing the pet menu"))};if((0,Kt.G)(Bh.m)){const X=null===(K=dt.q.instance)||void 0===K?void 0:K.prodigy.open.petDetailsMenu(z,Q);X.onPetGearChanged.add(this.updateItemCardsForOnTeamPets.bind(this,q)),X.onRemovePetFromTeam.add(this.onPetFilledTeamCardRemoveClicked.bind(this,q)),X.onAddPetToTeam.add(this.addPetToTeam.bind(this,q,z,Y))}else{dt.q.instance.prodigy.open.yourPetStandalone(z,{[ms.hi.YourPetPanelShowRightSideButtons]:!1}).onClose=Q}this.resetStatesOfPetFilledTeamCards()}resetStatesOfPetFilledTeamCards(){const q={SHOW_SELECTED:!1,SHOW_REMOVE_TOOLTIP:!1,SHOW_REPLACE_TOOLTIP:!1};for(const K of this._petFilledTeamCards)Ht.d.updateInjectedValues(K,q,!0)}swapEquippedPet(q){const K=this._itemCards[this._selectedItemCard],z=K.findComponent(X.bE_).getInjectedValue("PET"),Y=0===q?1:2;this._currentPlayer.player.kennel.removeAtTeamPosition(Y,!1),this._currentPlayer.player.kennel.setTeamPosition(z,Y,!1),this._teamUpdated=!0;const Q=this._currentPlayer.player.kennel.petTeam.find((q=>q.data.uniqueID===z.uniqueID));this.updateItemCardsForOnTeamPets(this._selectedItemCard,z),this.updateFilledTeamCardForPet(q,Q).catch(X.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to update the filled team card")),this.setSelectedItemCard(-1),Ht.d.updateInjectedValues(K,{SHOW_REPLACE_TOOLTIP:this._selectedItemCard>=0,SELECTED:!1},!0)}setupFilledTeamCardForBackpackItem(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!q){const q=yield qh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,this._emptyFilledTeamCardInjectedValues,`empty-${z}`,K);return"mount"===z&&Ht.d.updateInjectedValues(q,{SHOW_EMPTY_STATE:!0,SHOW_EMPTY_ICON:!1,SHOW_EMPTY_TEXT:!1},!0),Ht.d.updateInjectedValues(q,{INPUT_ENABLED:!1},!0),q}const Y=ae.t.getItem(z,q),Q=this.getInjectedValuesForFilledBackpackItemCard(Y);return yield qh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,Q,`equipped-${z}-${Y.data.ID}`,K)}))}updateFilledTeamCardForBackpackItem(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!q)return Ht.d.updateInjectedValues(K,this._emptyFilledTeamCardInjectedValues,!0),void("mount"===z&&Ht.d.updateInjectedValues(K,{SHOW_EMPTY_STATE:!0,SHOW_EMPTY_ICON:!1,SHOW_EMPTY_TEXT:!1},!0));const Y=ae.t.getItem(z,q),Q=this.getInjectedValuesForFilledBackpackItemCard(Y);Ht.d.updateInjectedValues(K,Q,!0)}))}getInjectedValuesForFilledBackpackItemCard(q){var K;const z=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return{PET_ID:-1,PET_DATA:null,NAME:null!==(K=q.data.nickname)&&void 0!==K?K:q.data.name,LEVEL:0,INPUT_ENABLED:!1,SHOW_STAT_ICON:!0,SHOW_SPINE:!1,SHOW_EMPTY_STATE:!1,SHOW_LEVEL:!1,SHOW_MEMBERLOCK_ICON:jh.G.shouldShowMemberLockIcon(q,z),SHOW_REPLACE_TOOLTIP:!1,STAT_ICON_DISPLAY_ITEM_ID:q.ID,STAT_ICON_DISPLAY_ITEM_TYPE:q.type}}setupItemCards(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=null!==(q=this._itemCards.length)&&void 0!==q?q:0;let z;switch(this.setSelectedItemCard(-1),this._itemType){case"pet":z=yield this.setupItemCardsForPets(K);break;case"follow":const q=(yield this._lootDashManager.getFeaturedItems()).featuredFollows;z=yield this.setupItemCardsForBackpackItems("follow",K,q);break;case"mount":const Y=(yield this._lootDashManager.getFeaturedItems()).featuredMounts;z=yield this.setupItemCardsForBackpackItems("mount",K,Y)}const Y=Math.max(z,K);this._activeItemCards=[];for(let Q=0;Q=K&&Ht.d.updateInjectedValues(this._itemCards[Q],{ON_CLICK:()=>this.onItemCardClicked(Q)},!0),QX.Aq$.isDefined(q)&&!(q instanceof Uh.a))).map((q=>null==q?void 0:q.data));let Z=[...Y,...this._currentPlayer.player.kennel.getPrimaryPets(!0)];if(Z.length<=0)return this._noItemsText.text=this._baseLocalizer.getText("LOOT_DASH_NO_PETS"),this._noItemsText.GameObject.active=!0,0;Z=yt.orderBy(Z,[q=>z.includes(q.ID)?1:0,q=>q.mergeRank,q=>{var K,z;return"Mythic"===(null===(z=null===(K=ae.t.getItem("pet",q.ID))||void 0===K?void 0:K.data)||void 0===z?void 0:z.category)?1:0},"level"],["desc","desc","desc","desc"]);const J=new Array(Math.max(Z.length-q,0));for(let X=0;X(0,Q.sH)(this,void 0,void 0,(function*(){const K=Y.some((q=>(null==q?void 0:q.uniqueID)===Z[X].uniqueID)),z=qh.B.getInjectedValuesForOwnedPetCardPet(Z[X],K);K&&(this._onTeamItemCardMap[X]=Z[X]),Xz.includes(q.ID)&&!z.includes(K.ID)?-1:z.includes(K.ID)&&!z.includes(q.ID)?1:0));if(X.length<=0){switch(q){case"follow":this._noItemsText.text=this._baseLocalizer.getText("LOOT_DASH_NO_BUDDIES");break;case"mount":this._noItemsText.text=this._baseLocalizer.getText("LOOT_DASH_NO_MOUNTS")}return this._noItemsText.GameObject.active=!0,0}const Z=new Array(Math.max(X.length-K,0));for(let z=0;z(0,Q.sH)(this,void 0,void 0,(function*(){const Y=qh.B.getInjectedValuesForOwnedPetCardBackpackItem(X[z].ID,q);zK+z)}}updateItemCardsForOnTeamPets(q,K){X.Aq$.isDefined(q)&&K&&(this._onTeamItemCardMap[q]=K,Ht.d.updateInjectedValues(this._itemCards[q],{SHOW_ON_TEAM:!0}));const z=this._currentPlayer.player.kennel.petTeam.map((q=>null==q?void 0:q.data.uniqueID));for(const Y of Object.keys(this._onTeamItemCardMap))this._onTeamItemCardMap[Y]&&(z.includes(this._onTeamItemCardMap[Y].uniqueID)||(this._onTeamItemCardMap[Y]=null,Ht.d.updateInjectedValues(this._itemCards[Y],{SHOW_ON_TEAM:!1})))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zh.prototype,"_petRightSideContainer",void 0),(0,Q.Cg)([(0,X.MnK)(Wh),(0,Q.Sn)("design:type",Wh)],zh.prototype,"_followRightSideDisplay",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zh.prototype,"_mountRightSideContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zh.prototype,"_topPetFilledTeamCard",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zh.prototype,"_bottomPetFilledTeamCard",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],zh.prototype,"_itemCardHeaderText",void 0),(0,Q.Cg)([(0,X.MnK)(X.Sz7),(0,Q.Sn)("design:type",X.Sz7)],zh.prototype,"_itemCardGridLayout",void 0),(0,Q.Cg)([(0,X.MnK)(Gh.H),(0,Q.Sn)("design:type",Gh.H)],zh.prototype,"_itemCardScrollViewSlider",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zh.prototype,"_itemCardScrollArea",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],zh.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zh.prototype,"_followFilledTeamCardParent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zh.prototype,"_mountFilledTeamCardParent",void 0),(0,Q.Cg)([(0,X.MnK)(Fh.Y),(0,Q.Sn)("design:type",Fh.Y)],zh.prototype,"_characterPreview",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],zh.prototype,"_noItemsText",void 0),(0,Q.Cg)([(0,X.MnK)(hr.B),(0,Q.Sn)("design:type",hr.B)],zh.prototype,"_characterPreviewSortingAnchor",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],zh.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],zh.prototype,"_baseLocalizer",void 0),(0,Q.Cg)([(0,X.Cdj)("1c5-a816"),(0,Q.Sn)("design:type",Kh.K)],zh.prototype,"_lootDashManager",void 0),zh=(0,Q.Cg)([(0,X.EVk)("LootDashDetailedSelectionScreen",et.Y.lootDash)],zh);let Yh=class extends X.uAl{findAMatch(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=(yield this._lootDashManager.getFeaturedItemsEquippedData()).numFeaturedItemsThatCouldBeEquipped;if(0===q||this._lootDashManager.hasShownFeaturedItemsConfirmation)return void this._lootDashManager.setState(kh.zM.FindingAMatch);const K=this.getNumLootBagsPlayerCouldEarn(q);this._lootDashManager.hasShownFeaturedItemsConfirmation=!0,Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.LootDashFeaturedItemConfirmationModal,{[ms.eV.FeaturedItemConfirmationModalHeaderText]:K>1?this._baseLocalizer.getText("LOOT_DASH_ADD_FEATURED_CONTENT_PLURAL",K):this._baseLocalizer.getText("LOOT_DASH_ADD_FEATURED_CONTENT",K),[ms.eV.FeaturedItemConfirmationModalBodyText]:this._baseLocalizer.getText("LOOT_DASH_CHANGE_TEAM"),[ms.eV.FeaturedItemConfirmationModalYesButtonCallback]:void 0,[ms.eV.FeaturedItemConfirmationModalNoButtonCallback]:()=>{this._lootDashManager.setState(kh.zM.FindingAMatch)}}).catch(X.RQr.createHandler("LootDashFindAMatchPanelComponent: Error creating the featured item confirmation modal"))}))}getNumLootBagsPlayerCouldEarn(q){return q}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Yh.prototype,"_baseLocalizer",void 0),(0,Q.Cg)([(0,X.Cdj)("1c5-a816"),(0,Q.Sn)("design:type",Kh.K)],Yh.prototype,"_lootDashManager",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Yh.prototype,"_prefabLoader",void 0),Yh=(0,Q.Cg)([(0,X.EVk)("LootDashFindAMatchPanel",et.Y.lootDash)],Yh);var Qh,Xh=z(85515),Zh=z(83267),Jh=z(4764);!function(q){q[q.Red=0]="Red",q[q.Yellow=1]="Yellow",q[q.Green=2]="Green"}(Qh||(Qh={}));let tc=class extends X.uAl{constructor(){super(...arguments),this._characterSetupCancelablePromises=[],this._teleportingStarted=!1,this._setupId=0,this._exitAnimators=[],this._characters=[],this._characterLoadingSpinners=[],this._bannerIcons=[]}create(){super.create(),this._lootDashManager.onStateDataChanged.add(this.onStateDataChanged,this),this._charactersInitialized=new Array(this._characters.length).fill(!1),this._playerDataProvider=Zh.E.createMockPlayerDataProvider()}destroy(){var q,K;this._lootDashManager.onStateDataChanged.remove(this.onStateDataChanged,this),null===(K=null===(q=this._lootDashManager.matchController)||void 0===q?void 0:q.onOpponentJoined)||void 0===K||K.remove(this.playerJoined,this),window.clearInterval(this._teleportingInterval),window.clearTimeout(this._teleportDelayTimeout),super.destroy()}onStateDataChanged(q){switch(q){case kh.zM.FindingAMatch:this.setup(),this.setFindingAMatchElementStates();break;case kh.zM.WaitingForPlayers:this.setWaitingForPlayersElementStates();break;case kh.zM.MatchmakingComplete:this.setMatchmakingCompleteElementStates();break;case kh.zM.MatchStartingSoon:this.setMatchStartingSoonState()}}setup(){this._setupId++,this.setDefaultElementStates(),this.initializeCharacterPrefab(this._characters[0],this._characterLoadingSpinners[0],this._currentPlayer.getAppearance()).catch(X.RQr.createHandler("LootDashWaitingRoomPanelComponent: Failed to load main player into the waiting room")),this._charactersInitialized[0]=!0,this.joinMatch().catch(X.RQr.createHandler("LootDashWaitingRoomPanelComponent: Failed to join a match"))}joinMatch(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this._lootDashManager.joinMatch(),this._lootDashManager.matchController.onOpponentJoined.add(this.playerJoined,this),this._lootDashManager.matchController.isQuickQuiz&&this._countdownTimer.onTimerCompleted.addOnce((()=>{this._lootDashManager.setState(kh.zM.MatchmakingComplete)}))}))}setDefaultElementStates(){this._characters.forEach((q=>q.active=!1)),this._characterLoadingSpinners.forEach((q=>q.active=!1)),this._charactersInitialized=this._charactersInitialized.fill(!1),this._bannerIcons.forEach((q=>q.active=!1)),this._bannerIcons[Qh.Red].active=!0,this._countdownTimer.GameObject.active=!1,this._cancelButton.GameObject.active=!1,this._leaveMatchButton.GameObject.active=!1,this._bannerText.GameObject.active=!1,this._bottomText.GameObject.active=!1,this._extraPlayerCountObject.active=!1}setFindingAMatchElementStates(){this._characters.forEach((q=>q.active=!1)),this._bannerText.text=this._baseLocalizer.getText("LOOT_DASH_FINDING_MATCH"),this._bottomText.text=this._baseLocalizer.getText("LOOT_DASH_LOOKING_FOR_MATCH"),this._bannerText.GameObject.active=!0,this._bottomText.GameObject.active=!0,this._leaveMatchButton.GameObject.active=!1,this._cancelButton.GameObject.active=!this._lootDashManager.matchController.isQuickQuiz}setWaitingForPlayersElementStates(){this._bannerIcons.forEach((q=>q.active=!1)),this._bannerIcons[Qh.Yellow].active=!0,this._bannerText.text=this._baseLocalizer.getText("LOOT_DASH_MATCH_STARTS_IN"),this._bottomText.text=this._baseLocalizer.getText("LOOT_DASH_WAITING_FOR_PLAYERS"),this._cancelButton.GameObject.active=!1,this._countdownTimer.GameObject.active=!0,this._leaveMatchButton.GameObject.active=!this._lootDashManager.matchController.isQuickQuiz;const q=this._lootDashManager.config;let K=q.matchSetup.matchmakingTimeMs;if(this._lootDashManager.matchController.isQuickQuiz){const z=q.quickQuizConfigs.transportModalDurationMs;K-=Jh.w.instance().getMillisecondsSinceStart()-z,K=Math.max(K,q.quickQuizConfigs.miniumMatchmakingTimeMs)}this._countdownTimer.setCountdownTimeMS(K)}playerJoined(q,K){this._characters.forEach(((K,z)=>{z>0&&zz?(this._extraPlayerCountObject.active=!0,this._extraPlayerCountText.text="+"+(q-z)):this._extraPlayerCountObject.active=!1,K&&!this._lootDashManager.matchController.isQuickQuiz&&this._lootDashManager.setState(kh.zM.MatchmakingComplete)}initializeCharacterPrefab(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){if(K.active=!0,q.children.length>0)return void this.setPlayerAppearance(q,K,z);const Y=new X.kBN(((Q,X)=>{Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.WizardInjectionConfigured,{"1eb-d7b4":this._playerDataProvider}).then((X=>{Y.cancelled||(X.children[0].layer=Xh.E.Default,X.parent=q,this.setPlayerAppearance(q,K,z)),Q()})).catch(X)}));this._characterSetupCancelablePromises.push(Y)}))}setPlayerAppearance(q,K,z){const Y=this._setupId;q.findComponentInChildren(cr.n).onAppearanceLoaded.add((()=>{this._teleportingStarted||(Y===this._setupId?(K.active=!1,q.active=!0):q.active=!1)})),Ht.d.updateInjectedValues(q,{[ms.n7.WizardInjectionConfiguredAppearance]:z,[ms.n7.WizardInjectionConfiguredInputEnabled]:!1})}setMatchmakingCompleteElementStates(){if(this._bottomText.GameObject.active=!1,this._lootDashManager.matchController.isQuickQuiz)return void this.teleportPlayersOut();const q=this._lootDashManager.config;this._countdownTimer.setCountdownTimeMS(q.matchSetup.finalCountdownMs),this._teleportDelayTimeout=window.setTimeout(this.teleportPlayersOut.bind(this),700)}setMatchStartingSoonState(){this._bannerIcons.forEach((q=>q.active=!1)),this._bannerIcons[Qh.Green].active=!0,this._bannerText.text=this._baseLocalizer.getText("LOOT_DASH_GAME_ON"),this._bottomText.GameObject.active=!1,this._countdownTimer.GameObject.active=!1,this._leaveMatchButton.GameObject.active=!1,this._cancelButton.GameObject.active=!1}teleportPlayersOut(){const q=_t().sample([[0,1,2,3,4,5,6,7],[0,[4,1],[5,2],[6,3],7],[0,..._t().shuffle([1,2,3,4,5,6,7])],[[0,3],[4,7],[1,2],[5,6]]]);this._teleportingStarted=!0,this._teleportingInterval=window.setInterval((()=>{let K=q.shift();K=Array.isArray(K)?K:[K],K.forEach((q=>this.teleportPlayerOut(q))),0===q.length&&window.clearInterval(this._teleportingInterval)}),1e3/q.length)}teleportPlayerOut(q){if(q>0&&!this._charactersInitialized[q])return;const K=this._characters[q],z=this._exitAnimators[q];z.GameObject.active=!0,z.playAnimation(Da.rC.Exit,!1,!0),z.spine.onEvent.add(((z,Y)=>{Y.data.name===Da.jN.TransitionUnit&&(K.active=!1,q>0&&(this._characterLoadingSpinners[q-1].active=!1))}))}cancelMatchmaking(){this._lootDashManager.cancelMatchmaking(),this._characterSetupCancelablePromises.forEach((q=>q.cancel())),this._characterSetupCancelablePromises.length=0,window.clearInterval(this._teleportingInterval),window.clearTimeout(this._teleportDelayTimeout),this._exitAnimators.forEach((q=>{q.GameObject.active=!1,q.spine.onEvent.removeAll(),q.stopAnimation()})),this._teleportingStarted=!1}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Array)],tc.prototype,"_exitAnimators",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],tc.prototype,"_characters",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],tc.prototype,"_characterLoadingSpinners",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],tc.prototype,"_bannerText",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],tc.prototype,"_bannerIcons",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],tc.prototype,"_bottomText",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],tc.prototype,"_countdownTimer",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],tc.prototype,"_cancelButton",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],tc.prototype,"_leaveMatchButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],tc.prototype,"_extraPlayerCountObject",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],tc.prototype,"_extraPlayerCountText",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],tc.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("1c5-a816"),(0,Q.Sn)("design:type",Kh.K)],tc.prototype,"_lootDashManager",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],tc.prototype,"_baseLocalizer",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],tc.prototype,"_prefabLoader",void 0),tc=(0,Q.Cg)([(0,X.EVk)("LootDashWaitingRoomPanel",et.Y.lootDash)],tc);var ec,ic,sc=z(70156);!function(q){q[q.Pet1=0]="Pet1",q[q.Pet2=1]="Pet2",q[q.Follow=2]="Follow",q[q.Mount=3]="Mount"}(ec||(ec={})),function(q){q.Add="ADD",q.Change="ITEM_TEXT_CHANGE"}(ic||(ic={}));const nc=[kh.zM.LobbyDefault,kh.zM.FindingAMatch,kh.zM.WaitingForPlayers,kh.zM.MatchmakingComplete,kh.zM.MatchStartingSoon,kh.zM.MatchStartingNow];let ac=class extends X.uAl{constructor(){super(...arguments),this._featuredIconContainers=[],this._featuredItemSelectedIcons=[],this._featuredItemNotSelectedIcons=[],this._petTeamUniqueIds=[]}create(){super.create(),this._changePetButton.onClick.add((()=>{this.openDetailedSelection("pet")})),this._changeFollowButton.onClick.add((()=>{this.openDetailedSelection("follow")})),this._changeMountButton.onClick.add((()=>{this.openDetailedSelection("mount")})),this._lootDashManager.onStateDataChanged.add(this.onStateDataChanged,this),dt.q.instance.game.broadcaster.addAppListener(Xn.H3.MembershipResponseReceived,(q=>{"success"===q&&this.setupMembershipElements()}),this)}destroy(){this._lootDashManager.onStateDataChanged.remove(this.onStateDataChanged,this),dt.q.instance.game.broadcaster.removeAppListener(Xn.H3.MembershipResponseReceived,this),super.destroy()}onStateDataChanged(q,K){switch(q){case kh.zM.LobbyDefault:this.setupMembershipElements(),this.setChangeButtonsVisibility(!0);break;case kh.zM.FindingAMatch:case kh.zM.WaitingForPlayers:this._getMoreRevivesButton.GameObject.active=!1,this.setChangeButtonsVisibility(!1)}nc.includes(q)&&!nc.includes(K)&&this.updatePanelContents().catch(X.RQr.createHandler("LootDashYourTeamPanelComponent: Failed to render the your team panel of the lobby"))}updatePanelContents(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.setupEquippedPets(),this.setupEquippedItems(),yield this.setFeaturedIconStatuses(),this.setupMembershipElements(),this._petTeamUniqueIds=this._currentPlayer.player.kennel.petTeam.filter((q=>!(q instanceof Uh.a))).map((q=>{var K;return null===(K=null==q?void 0:q.data)||void 0===K?void 0:K.uniqueID}))}))}setChangeButtonsVisibility(q){this._changePetButton.GameObject.active=q,this._changeFollowButton.GameObject.active=q,this._changeMountButton.GameObject.active=q}setFeaturedIconStatuses(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._lootDashManager.getFeaturedItemsEquippedData();q.featuredFollowOwned&&(this._featuredItemSelectedIcons[ec.Follow].active=q.featuredFollowEquipped,this._featuredItemNotSelectedIcons[ec.Follow].active=!q.featuredFollowEquipped),this._featuredIconContainers[ec.Follow].active=q.featuredFollowOwned,q.featuredMountOwned&&(this._featuredItemSelectedIcons[ec.Mount].active=q.featuredMountEquipped,this._featuredItemNotSelectedIcons[ec.Mount].active=!q.featuredMountEquipped),this._featuredIconContainers[ec.Mount].active=q.featuredMountOwned,0===q.numFeaturedPetsOwned?(this._featuredIconContainers[ec.Pet1].active=!1,this._featuredIconContainers[ec.Pet2].active=!1):(this._featuredIconContainers[ec.Pet1].active=!0,this._featuredIconContainers[ec.Pet2].active=!0,this._featuredItemSelectedIcons[ec.Pet1].active=q.featuredPetEquippedInSlot1,this._featuredItemNotSelectedIcons[ec.Pet1].active=!q.featuredPetEquippedInSlot1,this._featuredItemSelectedIcons[ec.Pet2].active=q.featuredPetEquippedInSlot2,this._featuredItemNotSelectedIcons[ec.Pet2].active=!q.featuredPetEquippedInSlot2,q.featuredPetEquippedInSlot1&&1===q.numFeaturedPetsOwned?this._featuredIconContainers[ec.Pet2].active=!1:q.featuredPetEquippedInSlot2&&1===q.numFeaturedPetsOwned&&(this._featuredIconContainers[ec.Pet1].active=!1)),q.cappedNumFeaturedItemsOwned>0?(this._featuredItemsEquippedText.text=`${q.numFeaturedItemsEquipped} / ${q.cappedNumFeaturedItemsOwned}`,this._equippedFeaturedItemsContainer.active=!0):this._equippedFeaturedItemsContainer.active=!1,0===q.cappedNumFeaturedItemsOwned&&(this._featuredItemsInfoContainer.active=!1)}))}setupEquippedPets(){const q=this._currentPlayer.player.kennel.petTeam.filter((q=>!(q instanceof Uh.a)));this.setupEquippedPet(q[0],this._petTeamUniqueIds[0],this._equippedPetLeft),this.setupEquippedPet(q[1],this._petTeamUniqueIds[1],this._equippedPetRight),q[0]&&q[1]?(this._changePetButton.text=this._baseLocalizer.getText(ic.Change),this._changePetButton.regenerateButton()):(this._changePetButton.text=this._baseLocalizer.getText(ic.Add),this._changePetButton.regenerateButton())}setupEquippedPet(q,K,z){q?(this.setupPetCard(q,z).catch(X.RQr.createHandler("LootDashYourTeamPanelComponent: Failed to render a pet card for a currently equipped pet")),z.active=!0):z.active=!1}setupPetCard(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z,Y,Q,X;const Z=ae.t.getItem("pet",q.data.ID);if(K.children.length>0){const Q={PET_ID:q.data.ID,PET_DATA:q.data,NAME:null!==(Y=null!==(z=q.data.nickname)&&void 0!==z?z:q.data.name)&&void 0!==Y?Y:Z.data.name,LEVEL:q.data.level,MERGE_RANK:uo.P8.getPetDisplayMergeRank(q.data.ID,q.data.uniqueID),SHOW_MERGE_RANK_BADGE:uo.P8.canPetAccessMergeRanks(q.data.ID),ICON:Ts.E.getIconForType("pet",q.data.ID),SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1};return void Ht.d.updateInjectedValues(K,Q)}const J={PET_ID:q.data.ID,PET_DATA:q.data,NAME:null!==(X=null!==(Q=q.data.nickname)&&void 0!==Q?Q:q.data.name)&&void 0!==X?X:Z.data.name,LEVEL:q.data.level,MERGE_RANK:uo.P8.getPetDisplayMergeRank(q.data.ID,q.data.uniqueID),SHOW_MERGE_RANK_BADGE:uo.P8.canPetAccessMergeRanks(q.data.ID),ICON:Ts.E.getIconForType("pet",q.data.ID),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_ON_TEAM:!1,SHOW_GUIDE_HAND:!1,INPUT_ENABLED:!1,SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1},tt=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.OwnedPetCardInjectionConfiguredMergeRank,J);if(K.isDestroyed)return void tt.destroy();const et=tt.transform;et.setPivot(.5,.5),et.setAnchorMin(0,0),et.setAnchorMax(0,0),tt.name=`pet-${q.data.ID}`,tt.parent=K}))}setupEquippedItems(){const q=this._currentPlayer.player.equipment.getFollow();this.setupEquippedItem(q,"follow",this._equippedFollowContainer,this._changeFollowButton,this._followImageItemDataLoader);const K=this._currentPlayer.player.equipment.getMount();this.setupEquippedItem(K,"mount",this._equippedMountContainer,this._changeMountButton,this._mountImageItemDataLoader)}setupEquippedItem(q,K,z,Y,Q){X.Aq$.isDefined(q)?(Q.setAsset(q,K).catch(X.RQr.createHandler(`LootDashYourTeamPanelComponent: Failed to render the equipped ${K}`)),z.active=!0,Y.text=this._baseLocalizer.getText(ic.Change),Y.regenerateButton()):X.Aq$.isDefined(q)||(z.active=!1,Y.text=this._baseLocalizer.getText(ic.Add),Y.regenerateButton())}setupMembershipElements(){const q=this._lootDashManager.getNumberOfStartingRevives();this._reviveCountText.text=q===sc.eA?"∞":`x${q}`;const K=this._currentPlayer.getMembershipUpsell().tier;K!==Vs._$.MemberUltimateMath&&K!==Vs._$.MemberUltimateBundle?this._getMoreRevivesButton.GameObject.active=!0:this._getMoreRevivesButton.GameObject.active=!1}openDetailedSelection(q){switch(q){case"pet":this._lootDashManager.setState(kh.zM.SelectPets);break;case"follow":this._lootDashManager.setState(kh.zM.SelectFollows);break;case"mount":this._lootDashManager.setState(kh.zM.SelectMounts)}}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ac.prototype,"_equippedPetLeft",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ac.prototype,"_equippedPetRight",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],ac.prototype,"_changePetButton",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],ac.prototype,"_changeFollowButton",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],ac.prototype,"_changeMountButton",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],ac.prototype,"_getMoreRevivesButton",void 0),(0,Q.Cg)([(0,X.MnK)(gs.X),(0,Q.Sn)("design:type",gs.X)],ac.prototype,"_followImageItemDataLoader",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ac.prototype,"_equippedFollowContainer",void 0),(0,Q.Cg)([(0,X.MnK)(gs.X),(0,Q.Sn)("design:type",gs.X)],ac.prototype,"_mountImageItemDataLoader",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ac.prototype,"_equippedMountContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ac.prototype,"_equippedFeaturedItemsContainer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],ac.prototype,"_featuredItemsEquippedText",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],ac.prototype,"_featuredIconContainers",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],ac.prototype,"_featuredItemSelectedIcons",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],ac.prototype,"_featuredItemNotSelectedIcons",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ac.prototype,"_featuredItemsInfoContainer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],ac.prototype,"_reviveCountText",void 0),(0,Q.Cg)([(0,X.Cdj)("1c5-a816"),(0,Q.Sn)("design:type",Kh.K)],ac.prototype,"_lootDashManager",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],ac.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],ac.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],ac.prototype,"_baseLocalizer",void 0),ac=(0,Q.Cg)([(0,X.EVk)("LootDashYourTeamPanel",et.Y.lootDash)],ac);let rc=class extends X.uAl{create(){this._lootDashManager.onStateDataChanged.add(this.onStateDataChanged,this)}destroy(){this._lootDashManager.onStateDataChanged.remove(this.onStateDataChanged,this),super.destroy()}onStateDataChanged(q){switch(q){case kh.zM.LobbyDefault:this.yourTeamPanel.GameObject.active=!0,this.findAMatchPanel.GameObject.active=!0,this.waitingRoomPanel.GameObject.active=!1;break;case kh.zM.FindingAMatch:this.yourTeamPanel.GameObject.active=!0,this.findAMatchPanel.GameObject.active=!1,this.waitingRoomPanel.GameObject.active=!0}}};(0,Q.Cg)([(0,X.MnK)(ac),(0,Q.Sn)("design:type",ac)],rc.prototype,"yourTeamPanel",void 0),(0,Q.Cg)([(0,X.MnK)(Yh),(0,Q.Sn)("design:type",Yh)],rc.prototype,"findAMatchPanel",void 0),(0,Q.Cg)([(0,X.MnK)(tc),(0,Q.Sn)("design:type",tc)],rc.prototype,"waitingRoomPanel",void 0),(0,Q.Cg)([(0,X.Cdj)("1c5-a816"),(0,Q.Sn)("design:type",Kh.K)],rc.prototype,"_lootDashManager",void 0),rc=(0,Q.Cg)([(0,X.EVk)("LootDashLobbyController",et.Y.lootDash)],rc);let oc=class extends X.uAl{constructor(){super(...arguments),this._screens={}}create(){super.create(),this._classCodeButton.onClick.add(this.openClassCodePopup.bind(this)),this.resetMenuToDefault(),this.loadScreen(kh.mz.Lobby).then((()=>{this._lootDashManager.onStateDataChanged.add(this.onLootDashStateChanged,this),this._lootDashManager.immediateStart?this._lootDashManager.setState(kh.zM.FindingAMatch):(this._lootDashManager.setState(kh.zM.LobbyDefault),this._closeButton.GameObject.active=!0)})).catch(X.RQr.createHandler("LootDashMenuControllerComponent: Error loading initial lobby screen"))}destroy(){Object.keys(this._screens).forEach((q=>{null===this._screens[q].parent&&this._screens[q].destroy()})),this._lootDashManager.onStateDataChanged.remove(this.onLootDashStateChanged,this),this._classCodeButton.onClick.removeAll(),super.destroy()}onLootDashStateChanged(q,K){if(q!==K)switch(q){case kh.zM.LobbyDefault:this.resetMenuToDefault(),this._closeButton.GameObject.active=!0,this.loadScreen(kh.mz.Lobby).catch(X.RQr.createHandler("LootDashMenuControllerComponent: Error loading lobby screen"));break;case kh.zM.SelectPets:this._headerText.text=kh.Ns.ChooseAPet,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!0,this.loadScreen(kh.mz.DetailedSelection,"pet").catch(X.RQr.createHandler("LootDashMenuControllerComponent: Error loading pet selection screen"));break;case kh.zM.SelectFollows:this._headerText.text=kh.Ns.ChooseABuddy,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!0,this.loadScreen(kh.mz.DetailedSelection,"follow").catch(X.RQr.createHandler("LootDashMenuControllerComponent: Error loading follow selection screen"));break;case kh.zM.SelectMounts:this._headerText.text=kh.Ns.ChooseAMount,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!0,this.loadScreen(kh.mz.DetailedSelection,"mount").catch(X.RQr.createHandler("LootDashMenuControllerComponent: Error loading mount selection screen"));break;case kh.zM.FindingAMatch:case kh.zM.WaitingForPlayers:this._headerText.text=kh.Ns.LootDash,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!1,this._classCodeButton.GameObject.active=!1;break;case kh.zM.MatchStartingNow:this.gameObject.destroy();break;case kh.zM.MatchEndedByServer:this._closeButton.onEnabledClick.dispatch(),this.OnDestroy.addOnce((()=>{dt.q.instance.prodigy.gameContainer.get("7f4-4464").handleQuizExitFlowComplete()}))}}resetMenuToDefault(){this._headerText.text=kh.Ns.LootDash,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!1,this._backButton.onClick.removeAll(),this._backButton.onClick.addOnce((()=>{this._lootDashManager.setState(kh.zM.LobbyDefault)})),this.updateClassCodeButtons().catch(X.RQr.createHandler("LootDashMenuControllerComponent: Error updating class code buttons"))}loadScreen(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K="pet"){switch(this._loadingScreen.active=!0,this._headerInputBlocker.active=!0,Object.keys(this._screens).forEach((K=>{this._screens[K]&&K!==q&&(this._screens[K].active=!1,this._screens[K].parent=null)})),q){case kh.mz.Lobby:yield this.openLobbyScreen();break;case kh.mz.DetailedSelection:yield this.openDetailedSelectionScreen(K)}this._loadingScreen.active=!1,this._headerInputBlocker.active=!1}))}openLobbyScreen(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._screens[kh.mz.Lobby]||(this._screens[kh.mz.Lobby]=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.LootDashLobby,{"1eb-d7b4":Zh.E.createMockPlayerDataProvider()}));const q=this._screens[kh.mz.Lobby];q.parent=this._screenContainer,q.active=!0}))}openDetailedSelectionScreen(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!kh.Mh.includes(q))throw new Error(`LootDashMenuControllerComponent: Invalid item type for detailed selection: ${q}`);this._screens[kh.mz.DetailedSelection]||(this._screens[kh.mz.DetailedSelection]=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.LootDashDetailedSelectionScreen,{}));const K=this._screens[kh.mz.DetailedSelection];K.parent=this._screenContainer,K.active=!0;const z=K.findComponentInChildren(zh);yield z.setup(q)}))}openClassCodePopup(){dt.q.instance.prodigy.open.prefabMenu(Gt.l.ClassCodePopup,void 0,void 0,void 0,void 0,{[ms.iu.ClassCodeSubmitSuccess]:this.updateClassCodeButtons.bind(this)})}updateClassCodeButtons(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;if(this._lootDashManager.immediateStart)return void(this._classCodeButton.GameObject.active=!1);const Q=dt.q.instance.prodigy.gameContainer.get("774-4659"),X=null===(Y=null===(z=null===(K=null===(q=yield Q.getCurrentClassCode())||void 0===q?void 0:q.data)||void 0===K?void 0:K.player)||void 0===z?void 0:z.currentClassroom)||void 0===Y?void 0:Y.code;X?(this._classCodeButton.text=`${this._baseLocalizer.getText("CLASS_CODE_TITLE")} ${X}`,this._classCodeButton.regenerateButton(),this._classCodeButton.GameObject.active=!0):this._classCodeButton.GameObject.active=!0}))}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],oc.prototype,"_headerText",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],oc.prototype,"_backButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],oc.prototype,"_closeButton",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],oc.prototype,"_classCodeButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],oc.prototype,"_loadingScreen",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],oc.prototype,"_screenContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],oc.prototype,"_headerInputBlocker",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],oc.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("1c5-a816"),(0,Q.Sn)("design:type",Kh.K)],oc.prototype,"_lootDashManager",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],oc.prototype,"_baseLocalizer",void 0),oc=(0,Q.Cg)([(0,X.EVk)("LootDashMenuController",et.Y.lootDash)],oc);let hc=class extends X.uAl{constructor(){super(...arguments),this.onStateChange=new X.HN0,this.onBattleDataChanged=new X.HN0}create(){super.create(),this._lootDashManager.onStateDataChanged.add(this.onStateChange.dispatch),this._lootDashManager.matchController.onBattleDataChanged.add(this.onBattleDataChanged.dispatch)}destroy(){this.onStateChange.dispose(),this.onBattleDataChanged.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("1c5-a816"),(0,Q.Sn)("design:type",Kh.K)],hc.prototype,"_lootDashManager",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],hc.prototype,"onStateChange",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],hc.prototype,"onBattleDataChanged",void 0),hc=(0,Q.Cg)([(0,X.EVk)("LootDashStateData",et.Y.lootDash)],hc);z(67844),z(21573),z(22162),z(25735),z(99332),z(39258),z(27314);let cc=class extends X.uAl{constructor(){super(...arguments),this._header=null,this._counters=[]}get header(){return this._header.TextObject.text}set header(q){this._header.text=q}setOccupants(q,K){K&&K.length>-1&&(this.header=q.getText(as.D.TT_ROOMMATES,K.length),this.setLevelCounts(K))}setLevelCounts(q){const K=new Map;q.forEach((q=>{let z=K.get(q);X.Aq$.isDefined(z)?z++:z=1,K.set(q,z)}));for(let z=0;zX.Aq$.isDefined(q.type))).map((q=>{var K,z;return{itemId:null!==(K=q.ID)&&void 0!==K?K:1,itemType:q.type,quantity:null!==(z=q.N)&&void 0!==z?z:1,isSecure:q.isSecure}}));if(this._memberJarController.isJarFull(K))return this._cachedPendingRewards=z,void this._memberJarController.showEntityUpdate(K);q.saveMemberStarsToJar();const Y=yield this._memberJarNetworkHandler.updateMemberJarRewards(z);this._segment.conversionJar.sendConversionJarUpdated(Object.assign(Object.assign({},this._segment.conversionJar.memberJarUpdate(Y)),{updateType:"Items Added",battleId:this._segment.postBattleFlow.getBattleId(),added:q.memberRewards,transactionId:this._segment.postBattleFlow.memberChestTransactionId})),this._memberJarController.showEntityUpdate(Y)}))}redeemMemberJar(){this.isDestroyed()||this.redeemMemberJarContinue().catch(X.RQr.createHandler("Error redeeming member jar"))}redeemMemberJarContinue(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=this.GameObject.findComponentInParent(mc.D),z=Vt.$.generateUID(),Y=Object.assign({transaction_id:z,source_type:Ei.C.ConversionJar,source_id:"Member Jar"},this._gotItem.customSegmentMetadata),Q=yield this._memberJarNetworkHandler.getMemberJarData(),X=yc.S.canReceiveReward();if(!X&&!this._memberJarController.isReadyToOpenJar(Q))return void this.onRedeemAborted.dispatch();const Z=Q.savedRewards.concat(this._cachedPendingRewards).map((q=>({type:q.itemType,ID:q.itemId,N:q.quantity,isSecure:q.isSecure})));for(const rt of Z)rt.isSecure?this.sendItemReceivedEvent(rt,Y):re.J.bagItemByType(rt,dt.q.instance.game,void 0,void 0,Y);let J,tt=0;const et=dt.q.instance.prodigy.gameContainer.get("782-c308");if(X){et.data.storedMemberStars=0,yc.S.redeemReward();const q=_c.Q.getMemberJarDropData().memberLevelBoost.levels;Z.push({type:"item",ID:252,N:q})}else{const z=null==K?void 0:K.redeemStarsThroughMemberJar();tt=null!==(q=null==z?void 0:z.totalStarsAwarded)&&void 0!==q?q:0,J=null==z?void 0:z.starJarXpGained}const it=this._memberJarController.showEntityRedeem(Q),st=yield this._memberJarNetworkHandler.resetMemberJarData(X);yc.S.isFeatureEnabled()||et.removeExperimentFromEligibilityList(Ec.a.key),Z.some((q=>vc.p.includes(q.type)))&&(yield dt.q.instance.prodigy.gameContainer.get("9cf-c09f").refreshPetGear()),this._segment.conversionJar.sendConversionJarUpdated(Object.assign(Object.assign({},this._segment.conversionJar.memberJarUpdate(st)),{updateType:"Items Claimed",battleId:this._segment.postBattleFlow.getBattleId(),removed:Z,transactionId:z})),tt>0&&Z.push({type:"item",ID:177,N:tt});let nt=0;const at=()=>{var q;this._gotItem.clearItems();for(let K=nt;K{if(ntthis._bannerQueueManager.deleteBanner(q))),null===(q=this._lastUsedGuideHand)||void 0===q||q.despawnGuideHand(),super.destroy()}init(){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.game.broadcaster.addAppListener(Xn.n8.FactoryMenuClosed,(()=>{this.updateObjectives().catch(X.RQr.createHandler("Could not get latest objectives"))}),this),dt.q.instance.game.broadcaster.addAppListener(Xn.GR.ObjectiveUpdated,(()=>{this.updateObjectives().catch(X.RQr.createHandler("Could not get latest objectives"))}),this);const q=yield this.getObjectives();for(const K of q)this.createBannerForObjective(K);this.createGuideHand(q)}))}getObjectives(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;return null===(q=this._objectiveLog)||void 0===q?void 0:q.getObjectives({types:this.objectiveTypes})}))}updateObjectives(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this.getObjectives();this.updateObjectiveBanners(q),this.createGuideHand(q)}))}createBannerForObjective(q){const K=Dc(q),z=this._bannerQueueManager.postBanner(K);this._objectiveBannerMap.set(q.id,z)}updateObjectiveBanners(q){if(this.gameObject.isDestroyed)return;const K=q.map((({id:q})=>q)),z=[];for(const[Y,Q]of this._objectiveBannerMap.entries())K.includes(Y)||(z.push(Q),this._objectiveBannerMap.delete(Y));z.forEach((q=>this._bannerQueueManager.deleteBanner(q)));for(const Y of q)this._objectiveBannerMap.has(Y.id)?this._bannerQueueManager.updateBanner(this._objectiveBannerMap.get(Y.id),Dc(Y)):this.createBannerForObjective(Y)}createGuideHand(q){var K;if(this.gameObject.isDestroyed)return;const z=q.find((q=>gh.A.isDefined(q.location)||gh.A.isDefined(q.guideHand)));gh.A.isDefined(null==z?void 0:z.guideHand)&&z.guideHand.targetMapTag===dt.q.instance.prodigy.world.getCurrentMap()?this.guideHandFromData(z):gh.A.isDefined(null==z?void 0:z.location)?this.guideHandFromLocation(z):(null===(K=this._lastUsedGuideHand)||void 0===K||K.despawnGuideHand(),Sc._guideHandActive=!1)}guideHandFromLocation(q){var K,z,Y,Q;if(!gh.A.isDefined(q.location))return;const Z=[q.location],J=Ic.P.getTargetMapsFromLocations(Z),tt=Ic.P.findShortestPathsToAllOf(dt.q.instance.prodigy.world.getCurrentMap(),J);if(tt.length>0){tt.sort(((q,K)=>q.length-K.length));const q=tt[0],Z=q.length>1?q[1]:"";if(null!==(z=null===(K=X.wa5.getActiveScene())||void 0===K?void 0:K.container.get("IS_PREFAB_MAP"))&&void 0!==z&&z)this._lastUsedGuideHand=Ic.P.manageTeleportTriggerGuideHands(Z);else{(null!==(Q=null===(Y=dt.q.instance.prodigy.world.getCurrentMapObject())||void 0===Y?void 0:Y.guideHandData)&&void 0!==Q?Q:[]).forEach((q=>{q.targetMapTag===Z&&(this.guideHandSpawner.angle=q.angle,this.guideHandSpawner.spawnGuideHand(q.position,"").catch(X.RQr.createHandler("Failed to spawn guide hand")),this._lastUsedGuideHand=this.guideHandSpawner)}))}Sc._guideHandActive=!0}}guideHandFromData(q){var K,z;if(!gh.A.isDefined(q.guideHand))return;this.guideHandSpawner.angle=q.guideHand.angle,this.guideHandSpawner.spawnGuideHand(q.guideHand.position,"").catch(X.RQr.createHandler("Failed to spawn guide hand")),this._lastUsedGuideHand=this.guideHandSpawner,Sc._guideHandActive=!0;null!==(z=null===(K=X.wa5.getActiveScene())||void 0===K?void 0:K.container.get("IS_PREFAB_MAP"))&&void 0!==z&&z&&Ic.P.despawnTeleportTriggerGuideHands()}};(0,Q.Cg)([(0,X.SZi)(),(0,X.gfw)(Cc.q),(0,Q.Sn)("design:type",Array)],Rc.prototype,"objectiveTypes",void 0),(0,Q.Cg)([(0,X.MnK)(Oc.P),(0,Q.Sn)("design:type",Oc.P)],Rc.prototype,"guideHandSpawner",void 0),(0,Q.Cg)([(0,X.Cdj)("4af-31c9"),(0,Q.Sn)("design:type",Ac.Z)],Rc.prototype,"_objectiveLog",void 0),(0,Q.Cg)([(0,X.Cdj)("db9-b0d4"),(0,Q.Sn)("design:type",is.Z)],Rc.prototype,"_bannerQueueManager",void 0),Rc=Sc=(0,Q.Cg)([(0,X.EVk)("CurrentObjectiveControllerComponent")],Rc);let Pc=class extends X.uAl{constructor(){super(...arguments),this.tierTextComponents=[],this.defaultTierValues=[]}postCreate(){super.postCreate(),this.setTiers(this.defaultTierValues)}setTiers(q){for(let K=0;K{dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:Us.k.ParentGoalTrackerNotAttached,destinationName:"parent_goal_attach_modal",elementType:"parent_goal",interfaceType:wi.Wm.Modal,interfaceName:ws.B.ParentGoalsTracker,saveClickInfo:Us.k.ParentGoalTrackerNotAttached}),dt.q.instance.prodigy.open.parentAttachMenu(null,Us.k.ParentGoalTrackerNotAttached,ws.B.ParentGoalAttachModal,{SEGMENT_QR_CODE_NAME:Bc.ParentGoalAttachment})})))}exit(){this.parts.button.GameObject.active=!1,super.exit()}}function Vc(q){var K;if(!q)return void Wc(Gt.l.ParentGoalStatusDialogNoGoal);const z=null===(K=q.rewards)||void 0===K?void 0:K[0],Y=z?{id:z.ID,type:z.type,N:z.N,L:z.L,cost:z.cost,data:z.data,receivedThroughGotItemFlow:!0}:null,Q={[ms.Tl.Data]:Y};q.progress>=q.target?Wc(Gt.l.ParentGoalStatusDialogComplete,Object.assign({},Q)):Wc(Gt.l.ParentGoalStatusDialogInProgress,Object.assign(Object.assign({},Q),{promptLabelArgs:[q.target],completionLabelArgs:[q.progress,q.target],completionRatio:q.progress/q.target}))}function Wc(q,K){return dt.q.instance.prodigy.open.prefabMenu(q,void 0,!1,!0,!1,K,void 0,void 0,void 0,void 0,!0)}class qc extends $c{constructor(){super(...arguments),this.onGoalAcquired=new X.HN0}enter(){super.enter(),this.parts.button.GameObject.active=!0,this.parts.notificationIndicator.active=!1,this.parts.spineButton.playAnimation("idle-nogoal",!0),this.destroyOnExit(this.parts.button.onEnabledClick.add((()=>{dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:Us.k.ParentGoalTrackerNoGoal,destinationName:"parent_goal_need_goal_modal",elementType:"parent_goal",interfaceType:wi.Wm.Modal,interfaceName:ws.B.ParentGoalsTracker}),Vc(null)}))),this.destroyOnExit(this.parts.dataProvider.onChange.add((q=>{q&&this.onGoalAcquired.dispatch()})))}exit(){this.parts.button.GameObject.active=!1,super.exit()}dispose(){this.onGoalAcquired.dispose(),super.dispose()}}class Kc extends $c{constructor(){super(...arguments),this.onGoalCompleted=new X.HN0}enter(){super.enter(),this.parts.button.GameObject.active=!0,this.parts.progress.GameObject.active=!0,this.destroyOnExit(this.parts.button.onEnabledClick.add((()=>{const q=dt.q.instance.prodigy.gameContainer.get("20f-5f67"),K=this.parts.dataProvider.goal.progress>=this.parts.dataProvider.goal.target;q.featureCommon.sendButtonEvent({buttonName:K?Us.k.ParentGoalTrackerNeedReward:Us.k.ParentGoalTrackerInProgress,destinationName:K?"parent_goal_need_reward_modal":"parent_goal_status_modal",elementType:"parent_goal",interfaceType:wi.Wm.Modal,interfaceName:ws.B.ParentGoalsTracker}),Vc(this.parts.dataProvider.goal)}))),this.destroyOnExit(this.parts.dataProvider.onChange.add((()=>this.refresh()))),setTimeout(this.refresh.bind(this,!0),Kc.PROGRESS_BAR_INITIAL_WAIT_MS)}exit(){this.parts.progress.GameObject.active=!1,this.parts.button.GameObject.active=!1,super.exit()}dispose(){this.onGoalCompleted.dispose(),super.dispose()}refresh(q=!1){if(!this.parts.dataProvider.goal)return void this.onGoalCompleted.dispatch();const{progress:K,target:z,isComplete:Y}=this.parts.dataProvider.goal;this.parts.notificationIndicator.active=0===K||K>=z;const Q=this.parts.progress.getFillValue();let X=K/z;const Z=X-Q;Z>0&&Zthis.onGoalCompleted.dispatch()))):Q=z?this.parts.spineButton.playAnimation("fill-complete",!1):this.parts.spineButton.playAnimation("fill",!1,!0):this.parts.spineButton.playAnimation("idle-inprogress",!0)}}Kc.PROGRESS_BAR_INITIAL_WAIT_MS=150,Kc.MINIMUM_NORMALIZED_INCREMENT=.05;class zc extends $c{constructor(){super(...arguments),this.onGoalClaimed=new X.HN0,this._bounceTimeout=null}enter(){super.enter(),this.parts.button.GameObject.active=!0,this.parts.progress.GameObject.active=!0,this.parts.notificationIndicator.active=!0,this.playInitialAnimations(),this.destroyOnExit(this.parts.button.onEnabledClick.add((()=>{dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:Us.k.ParentGoalTrackerCollectReward,destinationName:"parent_goal_collect_reward",elementType:"parent_goal",interfaceType:wi.Wm.Modal,interfaceName:ws.B.ParentGoalsTracker,saveClickInfo:Us.k.ParentGoalTrackerCollectReward}),this.parts.dataProvider.claimAllRewards()}))),this.destroyOnExit(this.parts.dataProvider.onChange.add((q=>{(null==q?void 0:q.isComplete)||this.onGoalClaimed.dispatch()})))}playAndSetupBounce(){this.parts.spineButton.playAnimation("gift-bounce",!1,!0),this._bounceTimeout=window.setTimeout(this.playAndSetupBounce.bind(this),ri.o.integerInRange(zc.BOUNCE_ANIMATION_REFRESH_MIN_MS,zc.BOUNCE_ANIMATION_REFRESH_MAX_MS))}playInitialAnimations(){this.parts.progress.setValue(1,!1),this.parts.spineButton.playAnimation("idle-complete-gift",!0),this.parts.spineButtonBacking.GameObject.active=!0,this.parts.spineButtonBacking.playAnimation("idle-complete-glow",!0),this._bounceTimeout=window.setTimeout(this.playAndSetupBounce.bind(this),ri.o.integerInRange(zc.BOUNCE_ANIMATION_REFRESH_MIN_MS,zc.BOUNCE_ANIMATION_REFRESH_MAX_MS))}exit(){this.parts.button.GameObject.active=!1,this.parts.progress.GameObject.active=!1,this.parts.notificationIndicator.active=!1,this.parts.spineButtonBacking.GameObject.active=!1,this.disposeBounceTimeout(),super.exit()}dispose(){this.onGoalClaimed.dispose(),this.disposeBounceTimeout(),super.dispose()}disposeBounceTimeout(){X.Aq$.isDefined(this._bounceTimeout)&&(clearTimeout(this._bounceTimeout),this._bounceTimeout=null)}}zc.BOUNCE_ANIMATION_REFRESH_MIN_MS=2e3,zc.BOUNCE_ANIMATION_REFRESH_MAX_MS=5e3;let Yc=class extends X.uAl{constructor(){super(...arguments),this._states=[],this._current=null,this._bindings=[]}create(){super.create(),this._noGoalButton.GameObject.active=!1,this._goalDetailButton.GameObject.active=!1,this._notificationIndicator.active=!1,this._goalProgress.GameObject.active=!1;const q=dt.q.instance.prodigy.gameContainer,K=q.get(jc.Y),z=q.get("ad2-c5b2"),Y={dataProvider:K,button:this._noGoalButton,progress:this._goalProgress,notificationIndicator:this._notificationIndicator,spineButton:this._buttonSpine,spineButtonBacking:this._buttonSpineBacking},Q={dataProvider:K,button:this._goalDetailButton,progress:this._goalProgress,notificationIndicator:this._notificationIndicator,spineButton:this._buttonSpine,spineButtonBacking:this._buttonSpineBacking};this._buttonSpineBacking.GameObject.active=!1;const X=new Hc(Y),Z=new qc(Y),J=new Kc(Q),tt=new zc(Q);this._states.push(X,Z,J,tt);const et=()=>this.setState((()=>{if(!z.hasParentLinkedEmail())return X;const q=K.goal;return q?q.isComplete?tt:J:Z})());this._bindings.push(Z.onGoalAcquired.add(et),J.onGoalCompleted.add(et),tt.onGoalClaimed.add(et)),K.refresh();dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:ws.B.ParentGoalsTracker,interfaceType:wi.Wm.Menu,originType:wi.$N.AutoSurfaced,eventName:"interface_opened"}),et()}destroy(){for(const q of this._bindings)q.destroy();for(const q of this._states)q.dispose();super.destroy()}setState(q){var K;if(!q)throw new Error("Cannot transition to null state");null===(K=this._current)||void 0===K||K.exit(),this._current=q,this._current.enter()}};(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Yc.prototype,"_noGoalButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Yc.prototype,"_goalDetailButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Yc.prototype,"_notificationIndicator",void 0),(0,Q.Cg)([(0,X.MnK)(Ds.z),(0,Q.Sn)("design:type",Ds.z)],Yc.prototype,"_goalProgress",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],Yc.prototype,"_buttonSpine",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],Yc.prototype,"_buttonSpineBacking",void 0),Yc=(0,Q.Cg)([(0,X.EVk)("ParentGoalTracker",et.Y.ui)],Yc);var Qc=z(46168),Xc=z(16815),Zc=z(8770);const Jc=Object.assign(Object.assign({},Zc.Hh),{Unequipped:16774111}),td={[fo.E.Legendary]:16777215,[fo.E.Heroic]:16777215,[fo.E.Rare]:16777215,[fo.E.Uncommon]:16777215,[fo.E.Common]:16777215,Unequipped:14732719};let ed=class extends X.uAl{get creatureData(){var q,K,z,Y;return null!==(q=this._creatureData)&&void 0!==q?q:this._parentCard instanceof Xc.Z?null===(K=this._parentCard)||void 0===K?void 0:K.displayedCreature:null===(Y=null===(z=this._parentCard)||void 0===z?void 0:z.creatureData)||void 0===Y?void 0:Y[0]}set creatureData(q){this._creatureData=q,this.isCreated&&this.onUpdateCard()}constructor(){super(),this._parentCard=null,this._kennel=this._playerData.player.kennel}create(){var q;super.create(),this.gameObject.active=!1,this._parentCard=this.GameObject.findComponentInParent(Qc.Q)||this.GameObject.findComponentInParent(Xc.Z),null===(q=this._parentCard)||void 0===q||q.onUpdateDisplay.add(this.onUpdateCard.bind(this)),!this._parentCard&&this.creatureData&&this.onUpdateCard()}onUpdateCard(){var q,K,z;if(null===(q=this._parentCard)||void 0===q?void 0:q.containsPlayer)return void(this.gameObject.active=!1);if(!this.hasPetGearAvailable())return void(this.gameObject.active=!1);this.gameObject.active=!0;const Y=this.creatureData;this.applyGearToIndicator(null===(K=null==Y?void 0:Y.gear)||void 0===K?void 0:K.petHat,this._indicatorHat),this.applyGearToIndicator(null===(z=null==Y?void 0:Y.gear)||void 0===z?void 0:z.petRelic,this._indicatorRelic)}fetchGearInfo(q,K){dt.q.instance.prodigy.gameContainer.get("9cf-c09f").getPetGearByUniqueId(q).then(K).catch((q=>{X.VyI.log(`[PetGearEquipStatusIndicator] Error setting indicator ${JSON.stringify(q)}`,X.$bb.Error)}))}hasPetGearAvailable(){const q=this.creatureData,K=this._kennel.petCanEquipGearType(q.ID,"petHat"),z=this._kennel.petCanEquipGearType(q.ID,"petRelic");return K||z}setIndicator(q,K){const z=q.findChildByName("Background"),Y=q.findChildByName("Icon"),Q=z.findComponent(X.vYh),Z=Y.findComponent(X.vYh),J=()=>Q.tint=Jc[K],tt=()=>Z.tint=td[K];Q.isCreated?J():Q.onRootContainerSet.addOnce(J),Z.isCreated?tt():Z.onRootContainerSet.addOnce(tt)}applyGearToIndicator(q,K){this.setIndicator(K,"Unequipped"),q&&this.fetchGearInfo(q,(q=>{const z=ae.t.getItem(q.data.asset.type,q.data.asset.id);this.setIndicator(K,z.data.rarity)}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],ed.prototype,"_playerData",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ed.prototype,"_indicatorHat",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ed.prototype,"_indicatorRelic",void 0),ed=(0,Q.Cg)([(0,X.EVk)("PetGearEquipStatusIndicator",et.Y.uiPetGear),(0,Q.Sn)("design:paramtypes",[])],ed);z(52382),z(9195);var id=z(95913);const sd={petHat:"PETGEAR_CATEGORY_PET_HAT",petRelic:"PETGEAR_CATEGORY_PET_RELIC"},nd={hp:"PETGEAR_BONUS_HP",power:"PETGEAR_BONUS_POWER",defence:"PETGEAR_BONUS_DEFENCE",speed:"PETGEAR_BONUS_SPEED"};let ad=class extends Yi.z{constructor(){super(...arguments),this.onSelect=new X.HN0}create(){super.create(),this._bindOnCreate&&this.bindContext()}destroy(){this.onSelect.dispose(),this.unbindContext(),super.destroy()}bindContext(){var q,K,z,Y;const Q=this._context.Container.get(ms._R.PetGearItemData);if(!X.Aq$.isDefined(Q))return void this.clearInfo();const Z=ae.t.getItem(Q.data.asset.type,Q.data.asset.id),J=null!==(K=null===(q=Z.data)||void 0===q?void 0:q.rarity)&&void 0!==K?K:fo.E.Common;let tt;this._context.Container.rebind(ms._R.PetGearItemName).toConstantValue(re.J.getLocalizationNameKey(Z)),this._context.Container.rebind(ms._R.PetGearFlavourText).toConstantValue(re.J.getLocalizationFlavorKey(Z)),this._context.Container.rebind(ms._R.PetGearItemRarityLabel).toConstantValue(re.J.convertRarityToText(J)),this._context.Container.rebind(ms._R.PetGearItemRarity).toConstantValue(J),this._context.Container.rebind(ms._R.PetGearCategoryLabel).toConstantValue(sd[Q.data.asset.type]);let et=0;if(Object.entries(null!==(Y=null===(z=Z.data)||void 0===z?void 0:z.stats)&&void 0!==Y?Y:{}).forEach((([q,K])=>{K>et&&(et=K,tt=q)})),tt){this._context.Container.rebind(ms._R.PetGearBonusStatEnabled).toConstantValue(!0);const q=ae.t.getItem("pet",this._petData.ID),K=uo.P8.getPetChargedLevelCumulative(this._petData),z=uo.P8.getBattleStats(q,K,this._petData.uniqueID);this._context.Container.rebind(ms._R.PetGearBonusStatAppliedAmount).toConstantValue(z[tt]),this._context.Container.rebind(ms._R.PetGearBonusStatIcon).toConstantValue([ti._.Ui_postbattle_json,id.BV[tt]]),this._context.Container.rebind(ms._R.PetGearBonusStatTextKey).toConstantValue(nd[tt]),this._context.Container.rebind(ms._R.PetGearBonusStatAmountText).toConstantValue(`+${et}`)}else this._context.Container.rebind(ms._R.PetGearBonusStatEnabled).toConstantValue(!1);this.gameObject.findComponentsInChildren(Wo.B).forEach((q=>q.consume())),this.onSelect.dispatch(!0)}unbindContext(){this._context.Container.rebind(ms._R.PetGearFlavourText).toConstantValue(null),this._context.Container.rebind(ms._R.PetGearItemRarityLabel).toConstantValue(null),this._context.Container.rebind(ms._R.PetGearItemRarity).toConstantValue(null),this._context.Container.rebind(ms._R.PetGearCategoryLabel).toConstantValue(null),this._context.Container.rebind(ms._R.PetGearBonusStatEnabled).toConstantValue(!0),this._context.Container.rebind(ms._R.PetGearBonusStatAppliedAmount).toConstantValue(null),this._context.Container.rebind(ms._R.PetGearBonusStatIcon).toConstantValue(null),this._context.Container.rebind(ms._R.PetGearBonusStatTextKey).toConstantValue(null),this._context.Container.rebind(ms._R.PetGearBonusStatAmountText).toConstantValue(null),this.gameObject.findComponentsInChildren(Wo.B).forEach((q=>q.consume())),this.gameObject.active=!1}setGearItem(q){X.Aq$.isDefined(q)?(this._context.Container.rebind(ms._R.PetGearItemData).toConstantValue(q),this.bindContext()):this.clearInfo()}clearInfo(){this._context.Container.rebind(ms._R.PetGearItemName).toConstantValue("PETGEAR_NO_GEAR_SELECTED"),this._context.Container.rebind(ms._R.PetGearFlavourText).toConstantValue("PETGEAR_SELECT_GEAR_ON_RIGHT"),this.gameObject.findComponentsInChildren(Wo.B).forEach((q=>q.consume())),this.onSelect.dispatch(!1)}};(0,Q.Cg)([(0,X.Cdj)(ms.hi.PetCreatureData),(0,Q.Sn)("design:type",Object)],ad.prototype,"_petData",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ad.prototype,"_bindOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ad.prototype,"onSelect",void 0),ad=(0,Q.Cg)([(0,X.EVk)("PetGearItemInfoDataProvider",et.Y.uiPet)],ad);var rd=z(10674);let od=class extends Yi.z{constructor(){super(...arguments),this._equippedGear={petRelic:null,petHat:null},this._previewGear={petRelic:null,petHat:null}}create(){super.create(),this._bindOnCreate&&this.bindContext()}destroy(){this.unbindContext(),super.destroy()}bindContext(){if(this._context.Container.rebind(ms.hi.YourPetPanelPetId).toConstantValue(this._petData.ID),X.Aq$.isDefined(this._petData.team)){const q=this._loggedInPlayer.getChargedLevel();this._context.Container.rebind(ca.E.ChargedCreatureEffectTier).toConstantValue(zn.e.getChargedLevelTierFromLevel(q)),this._context.Container.rebind(ca.E.ChargedCreatureEffectDisplayType).toConstantValue(q>0?Yn.X$.IDLE:Yn.X$.HIDDEN)}this.updateEquippedPetGearData().then((()=>{var q,K;this._context.Container.rebind(ms._R.PetGearPreviewLoadout).toConstantValue({petHat:null!==(q=this._previewGear.petHat)&&void 0!==q?q:this._equippedGear.petHat,petRelic:null!==(K=this._previewGear.petRelic)&&void 0!==K?K:this._equippedGear.petRelic}),this.invokeInjectionComponentsInChildren()})).catch((q=>{X.RQr.createHandler("[PetGearPetPreviewDataProviderComponent] Could not update equipped pet gear data")}))}invokeInjectionComponentsInChildren(){this.gameObject.findComponentsInChildren(Wo.B,!1).forEach((q=>q.consume()))}updateEquippedPetGearData(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;(null===(q=this._petData.gear)||void 0===q?void 0:q.petHat)?this._equippedGear.petHat=(yield this._gearInventoryManager.getPetGearByUniqueId(null===(K=this._petData.gear)||void 0===K?void 0:K.petHat)).uuid:this._equippedGear.petHat=null,(null===(z=this._petData.gear)||void 0===z?void 0:z.petRelic)?this._equippedGear.petRelic=(yield this._gearInventoryManager.getPetGearByUniqueId(null===(Y=this._petData.gear)||void 0===Y?void 0:Y.petRelic)).uuid:this._equippedGear.petRelic=null}))}unbindContext(){this._context.Container.rebind(ms.hi.YourPetPanelPetId).toConstantValue(null),this._context.Container.rebind(ca.E.ChargedCreatureEffectTier).toConstantValue(null),this._context.Container.rebind(ca.E.ChargedCreatureEffectDisplayType).toConstantValue(null),this._context.Container.rebind(ms._R.PetGearPreviewLoadout).toConstantValue(null),this.invokeInjectionComponentsInChildren()}setGearPreviewItem(q){X.Aq$.isDefined(q)?this._previewGear[q.data.asset.type]!==q.uuid&&(this._previewGear[q.data.asset.type]=q.uuid,this.bindContext()):this.clearGearPreviewItems()}clearGearPreviewItems(){this._previewGear.petRelic=null,this._previewGear.petHat=null,this.bindContext()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],od.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("9cf-c09f"),(0,Q.Sn)("design:type",rd.q)],od.prototype,"_gearInventoryManager",void 0),(0,Q.Cg)([(0,X.Cdj)(ms.hi.PetCreatureData),(0,Q.Sn)("design:type",Object)],od.prototype,"_petData",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],od.prototype,"_bindOnCreate",void 0),od=(0,Q.Cg)([(0,X.EVk)("PetGearPetPreviewDataProvider",et.Y.uiPet)],od);z(91020);const hd=Object.assign(Object.assign({},Zc.Hh),{Unequipped:16777215});let cd=class extends X.uAl{get creatureData(){return this._creatureData}set creatureData(q){this._creatureData=q,this.isCreated&&this.onUpdateCard()}constructor(){super(),this._kennel=this._playerData.player.kennel}create(){super.create(),this.gameObject.active=!1,this.creatureData&&this.onUpdateCard()}onUpdateCard(){var q,K;if(!this.hasPetGearAvailable())return void(this.gameObject.active=!1);this.gameObject.active=!0;const z=this.creatureData;this.applyGearToIndicator(null===(q=null==z?void 0:z.gear)||void 0===q?void 0:q.petHat,this._indicatorHat),this.applyGearToIndicator(null===(K=null==z?void 0:z.gear)||void 0===K?void 0:K.petRelic,this._indicatorRelic)}fetchGearInfo(q,K){dt.q.instance.prodigy.gameContainer.get("9cf-c09f").getPetGearByUniqueId(q).then(K).catch((q=>{X.VyI.log(`[PetGearEquipStatusIndicator] Error setting indicator ${JSON.stringify(q)}`,X.$bb.Error)}))}hasPetGearAvailable(){const q=this.creatureData,K=this._kennel.petCanEquipGearType(q.ID,"petHat"),z=this._kennel.petCanEquipGearType(q.ID,"petRelic");return K||z}setIndicator(q,K){const z="Unequipped"!==K,Y={[ms.Wg.IconEnabled]:z,[ms.Wg.BackgroundEnabled]:!z,[ms.Wg.RarityTint]:hd[K]};Ht.d.updateInjectedValues(q,Y)}applyGearToIndicator(q,K){q?this.fetchGearInfo(q,(q=>{const z=ae.t.getItem(q.data.asset.type,q.data.asset.id);this.setIndicator(K,z.data.rarity)})):this.setIndicator(K,"Unequipped")}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],cd.prototype,"_playerData",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],cd.prototype,"_indicatorHat",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],cd.prototype,"_indicatorRelic",void 0),cd=(0,Q.Cg)([(0,X.EVk)("PetGearSimpleEquipStatusIndicator",et.Y.uiPetGear),(0,Q.Sn)("design:paramtypes",[])],cd);var dd=z(72772);let ld=class extends X.uAl{constructor(){super(...arguments),this.runOnCreate=!0,this.onShouldPlayTutorial=new X.HN0,this.onShouldNotPlayTutorial=new X.HN0}postCreate(){super.postCreate(),this.runOnCreate&&this.run()}run(){dd.I.shouldShowPetGearTutorial().then((q=>{q?this.onShouldPlayTutorial.dispatch():this.onShouldNotPlayTutorial.dispatch()})).catch(X.RQr.createHandler("Error determining pet gear FTUE status."))}destroy(){this.onShouldPlayTutorial.dispose(),this.onShouldNotPlayTutorial.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ld.prototype,"runOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ld.prototype,"onShouldPlayTutorial",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ld.prototype,"onShouldNotPlayTutorial",void 0),ld=(0,Q.Cg)([(0,X.EVk)("PetGearTutorialGuard",et.Y.uiPetGear,"Used to initiate the pet-gear FTUE sequence")],ld);let ud=class extends X.uAl{constructor(){super(...arguments),this._injectionConsumes=[],this.onGearMenuLoading=new X.HN0,this.onGearMenuOpen=new X.HN0,this.onGearMenuClosed=new X.HN0}create(){var q,K,z,Q,X;super.create(),this._petHatSlotContainer=this._context.Container.get("PetHatSlotContainer"),this._petRelicSlotContainer=this._context.Container.get("PetRelicSlotContainer"),null===(K=null===(q=this._petHatSlotContainer)||void 0===q?void 0:q.GameObject.findComponentInChildren(Y.$))||void 0===K||K.onEnabledClick.add((()=>this.openGearMenu("petHat"))),null===(Q=null===(z=this._petRelicSlotContainer)||void 0===z?void 0:z.GameObject.findComponentInChildren(Y.$))||void 0===Q||Q.onEnabledClick.add((()=>this.openGearMenu("petRelic"))),this._injectionConsumes=null===(X=this.gameObject)||void 0===X?void 0:X.findComponentsInChildren(Wo.B,!1)}openGearMenu(q){const K=dt.q.instance.prodigy.open.yourPetGear(this._creatureDataSchema,q);K&&(this.onGearMenuLoading.dispatch(),K.onGearMenuOpen.add((()=>{this.onGearMenuOpen.dispatch()})),K.onGearMenuClosed.add((()=>{this.onGearMenuClosed.dispatch()})))}resolvePetGear(){var q;this._petItem=ae.t.getItem("pet",this._creatureDataSchema.ID),this._canWearPetGear=(null===(q=this._petItem.data.gearEquipSlots)||void 0===q?void 0:q.length)>0,this.setGearEnabledState(),this._canWearPetGear&&this.bindPetGear().catch((()=>{X.RQr.createHandler("Failed to bind pet gear to the widget")})).finally((()=>{this.consumeInjections()}))}setGearEnabledState(){const q={[ms.hi.YourPetPanelPetGearShowGearPanel]:this._canWearPetGear,[ms.hi.YourPetPanelPetGearSlotsDisabled]:!this._canWearPetGear};Ht.d.updateInjectedValues(this.gameObject,q)}bindPetGear(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;const z=yield this._gearManager.getPetGearByUniqueId(null===(q=this._creatureDataSchema.gear)||void 0===q?void 0:q.petHat),Y=yield this._gearManager.getPetGearByUniqueId(null===(K=this._creatureDataSchema.gear)||void 0===K?void 0:K.petRelic);this._petHatSlotContainer.Container.rebind("PetGearSlotData").toConstantValue(null!=z?z:{}),this._petRelicSlotContainer.Container.rebind("PetGearSlotData").toConstantValue(null!=Y?Y:{})}))}consumeInjections(){this._injectionConsumes.forEach((q=>q.consume()))}destroy(){this.onGearMenuLoading.dispose(),this.onGearMenuOpen.dispose(),this.onGearMenuClosed.dispose(),super.destroy()}};(0,Q.Cg)([(0,Qi.b)("9cf-c09f"),(0,Q.Sn)("design:type",rd.q)],ud.prototype,"_gearManager",void 0),(0,Q.Cg)([(0,X.Pqz)(X.bE_),(0,Q.Sn)("design:type",X.bE_)],ud.prototype,"_context",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ud.prototype,"onGearMenuLoading",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ud.prototype,"onGearMenuOpen",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ud.prototype,"onGearMenuClosed",void 0),ud=(0,Q.Cg)([(0,X.EVk)("PetGearWidget",et.Y.uiPet)],ud);var fd=z(41935),bd=(z(16383),z(58268)),pd=z(94596);let vd=class extends pd.b{initialize(){super.initialize();const q=new bd.N;q.desaturate(),this._filterList.push(q)}};vd=(0,Q.Cg)([(0,X.EVk)("GreyscaleFilter",et.Y.effect)],vd);var gd=z(67818);let md=class extends X.uAl{setup(q,K){this._itemIcon.setItemID(q.ID),this._overlay.active=!K,K?(this._stateIcon.updateAsset(ti._.Ui_raster_icons_json,"icon-medium-checkmark"),this._greyscaleFilter.removeFilter()):(this._stateIcon.updateAsset(ti._.Ui_hard_currency_json,"icon-currency-27-small"),this._greyscaleFilter.applyFilter(),this._overlayTween.playAnimation())}};(0,Q.Cg)([(0,X.MnK)(gd.i),(0,Q.Sn)("design:type",gd.i)],md.prototype,"_itemIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],md.prototype,"_stateIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.bTj),(0,Q.Sn)("design:type",X.bTj)],md.prototype,"_overlayTween",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],md.prototype,"_overlay",void 0),(0,Q.Cg)([(0,X.MnK)(vd),(0,Q.Sn)("design:type",vd)],md.prototype,"_greyscaleFilter",void 0),md=(0,Q.Cg)([(0,X.EVk)("MergeIngredient")],md);var yd=z(12472);let _d=class extends X.uAl{setup(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=!1){const z=ae.t.getItem("pet",q.ID),Y=yd.r.getMergeIngredientInfo(q),Q=Y.requiredIngredientsCount,X=uo.P8.getRequiredPetMergeIngredient(z,Y.mergeRecipe);this.missingIngredientCount=K?0:Q-Y.validPetIngredientCount,this.ingredientCount=Q,yield this._prefabLoader.preloadFromGUIDWithDependencies(this._ingredientPrefab);for(let Z=0;Z{q.GameObject.active=!1})),this.onLoadingFinished.addOnce((()=>{this.sendInterfaceOpenedEvent(),wd.E.recordDefeatedPetsFunnelStep(lh.l.DynamicStoreLostPetsMain)}),this),this.getStoreAndQuestData().catch(X.RQr.createHandler("LostPetsModalControllerComponent: Failed to get store and quest data"))}getStoreAndQuestData(){return(0,Q.sH)(this,void 0,void 0,(function*(){let q=this.getInjectedValue("LOST_PETS_OFFER_DATA"),K=this.getInjectedValue("LOST_PETS_RESET_TIME");if(!q||0===q.length){const z=yield this._dynamicStoreQuestManager.updateDefeatedPetOffers();K=z.resetTime,q=[...z.defeatedPetOffers].filter((q=>q.progress.status===Ar.t.IN_PROGRESS))}if(!q||0===q.length)return void this.gameObject.destroy();const z=yield this._dynamicStoreDataProvider.getDynamicStoreUIData({storeKey:Fr.GA.PetShop});if(!this.gameObject)return;const{offerReadById:Y}=z.expect();this.setLostPetQuests(q,Y);const Q=K.valueOf()-this._timeManager.getServerTimeMs();this.timerTextComponent.setCountdownTimeMS(Q),this.onLoadingFinished.dispatch()}))}destroy(){this.onLoadingStarted.dispose(),this.onLoadingFinished.dispose(),super.destroy()}setLostPetQuests(q,K){var z,Y;const Q=(0,Kr.K8)(q,K),X=Q.slice(0,this._petItemCards.length);for(let Z=0;Z{var K;return null===(K=q.getItemData().item)||void 0===K?void 0:K.ID}));q.push(Math.max(this.moreItemsCardController.count,0)),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ws.B.LostPetsMain,interfaceType:wi.Wm.Window,instanceType:Ti.N.UI,originType:wi.$N.AutoSurfaced},{item_list:q})}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ad.prototype,"petItemCardContainerObject",void 0),(0,Q.Cg)([(0,X.MnK)(Vr),(0,Q.Sn)("design:type",Vr)],Ad.prototype,"moreItemsCardController",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],Ad.prototype,"timerTextComponent",void 0),(0,Q.Cg)([(0,X.MnK)(Wr.l),(0,Q.Sn)("design:type",Wr.l)],Ad.prototype,"_prefabModalComponent",void 0),(0,Q.Cg)([(0,X.Cdj)("0f2-d6bd"),(0,Q.Sn)("design:type",nn.V)],Ad.prototype,"_timeManager",void 0),(0,Q.Cg)([(0,Qi.b)("668-8a41"),(0,Q.Sn)("design:type",Sd.s)],Ad.prototype,"_dynamicStoreQuestManager",void 0),(0,Q.Cg)([(0,Qi.b)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],Ad.prototype,"_segment",void 0),(0,Q.Cg)([(0,Qi.b)("7a9-ac2f"),(0,Q.Sn)("design:type",Td.I)],Ad.prototype,"_dynamicStoreDataProvider",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ad.prototype,"onLoadingStarted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ad.prototype,"onLoadingFinished",void 0),Ad=(0,Q.Cg)([(0,X.EVk)("LostPetsModalController",void 0,"A plug-and-play controller component for the LostPetsModal.prefab. See in-code docs for more.")],Ad);let Cd=class extends X.uAl{constructor(){super(...arguments),this._commonElements=[],this._uncommonElements=[],this._rareElements=[],this._heroicElements=[],this._legendaryElements=[],this._textElements=[]}updateElements(q){let K,z;switch(this._commonElements.forEach((q=>{q.active=!1})),this._uncommonElements.forEach((q=>{q.active=!1})),this._rareElements.forEach((q=>{q.active=!1})),this._heroicElements.forEach((q=>{q.active=!1})),this._legendaryElements.forEach((q=>{q.active=!1})),q){case fo.E.Common:default:K=this._commonElements,z=3552822;break;case fo.E.Uncommon:K=this._uncommonElements,z=3552822;break;case fo.E.Rare:K=this._rareElements,z=16777215;break;case fo.E.Heroic:K=this._heroicElements,z=16777215;break;case fo.E.Legendary:K=this._legendaryElements,z=3552822}K.forEach((q=>{q.active=!0})),this._textElements.forEach((q=>{q.fill=X.Q1f.numberToHexString(z)}))}};(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Cd.prototype,"_commonElements",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Cd.prototype,"_uncommonElements",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Cd.prototype,"_rareElements",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Cd.prototype,"_heroicElements",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Cd.prototype,"_legendaryElements",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",Array)],Cd.prototype,"_textElements",void 0),Cd=(0,Q.Cg)([(0,X.EVk)("PetRescueMagicoinModal",et.Y.ui)],Cd);let Od=class extends X.uAl{create(){super.create();dt.q.instance.prodigy.world.getCurrentZoneObject().createTopLeftNavigationButton()}};Od=(0,Q.Cg)([(0,X.EVk)("PetListButton",et.Y.uiPet)],Od);z(4234);var Id=z(3032);let Dd=class extends X.uAl{constructor(){super(...arguments),this.onTrue=new X.HN0,this.onFalse=new X.HN0,this.onResult=new X.HN0}create(){super.create(),this._runOnCreate&&this.compare().catch(X.RQr.createHandler("CheckPlayerGoalsQuestSystemComponent create error running compare"))}destroy(){this.onTrue.dispose(),this.onFalse.dispose(),this.onResult.dispose(),super.destroy()}compare(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._loggedInPlayer.player.getQuestSystem("playerGoals"),K=this.anyOf.includes(q);(K?this.onTrue:this.onFalse).dispatch(),this.onResult.dispatch(K)}))}};(0,Q.Cg)([(0,Qi.b)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Dd.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.gfw)(Id.p),(0,Q.Sn)("design:type",Array)],Dd.prototype,"anyOf",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Dd.prototype,"onTrue",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Dd.prototype,"onFalse",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Dd.prototype,"onResult",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Dd.prototype,"_runOnCreate",void 0),Dd=(0,Q.Cg)([(0,X.EVk)("CheckPlayerGoalsQuestSystem",et.Y.quest,"")],Dd);var Rd,Pd,Md=z(13027),Nd=z(44357),xd=z(3606);!function(q){q.HideCloseButton="HIDE_PLAYER_GOALS_CLOSE_BUTTON",q.DeliverPrize="DELIVER_PRIZE",q.HasPrize="HAS_PRIZE",q.HasNotPrize="HAS_NOT_PRIZE",q.GoalHeader="GOAL_HEADER",q.ShowAttachParentCTA="SHOW_PARENT_ATTACH_CTA",q.ShowClassCodeCTA="SHOW_CLASS_CODE_CTA",q.ShowMysteryBox="SHOW_MYSTERY_BOX",q.ReceivePrizeEvent="RECEIVE_PRIZE_EVENT",q.PrizeDescription="PRIZE_DESCRIPTION",q.PrizeImage="PRIZE_IMAGE_",q.ShowDivider="SHOW_DIVIDER",q.PrizeLayout="PRIZE_LAYOUT_",q.ClassCodeSuccess="FTUE_PLAYER_GOALS_CLASS_CODE_SUCCESS",q.ShowLoginCredentialsCTA="SHOW_LOGIN_CREDENTIALS_CTA",q.ShowProfileQuizCTA="SHOW_PROFILE_QUIZ_CTA",q.ProfileQuizBindings="PROFILE_QUIZ_BINDINGS",q.ProfileQuizComplete="PROFILE_QUIZ_COMPLETE",q.GoalFadeOut="GOAL_FADE_OUT",q.GoalFadeIn="GOAL_FADE_IN",q.GoalFadeDuration="GOAL_FADE_DURATION"}(Rd||(Rd={})),function(q){q.AwardsAvailable="FTUE_PLAYER_GOALS_AWARDS_AVAILABLE",q.QuestComplete="FTUE_PLAYER_GOALS_QUEST_COMPLETE",q.RightSideHudGameObject="FTUE_PLAYER_GOALS_RIGHT_SIDE_HUD_GAMEOBJECT"}(Pd||(Pd={}));var Ld=z(10551),kd=z(44677);let Bd=class extends Yi.z{constructor(){super(...arguments),this.SHOW_INTERVAL_MS=300,this.FADE_DURATION_MS=400,this.MAX_PRIZES_PER_GOAL=3,this._prizeIsBeingDelivered=!1,this._gridElements=[]}create(){var q;super.create(),null===(q=this._questManager)||void 0===q||q.onDataChanged.add(this.onQuestDataUpdated,this),this.tryBindContext()}onQuestDataUpdated(q){this._prizeIsBeingDelivered=!1;const K=kd.p.pairedTaskByQuestEventId(q),z=this.getIndexCompletedTask(q);if(K&&-1!==z)return this._questTasks[z]=K,this.updateElement(z),this.updateContainer(),void this.animateTaskTransition(z).then((()=>{this.tryBindContext()})).catch(X.RQr.createHandler("PlayerGoalsDataProviderComponent onQuestDataUpdated animateTaskTransition"));this.tryBindContext()}getIndexCompletedTask(q){return this._questTasks.findIndex((K=>{var z,Y,Q,X,Z,J;const tt=null===(Q=null===(Y=null===(z=K.taskDefinition)||void 0===z?void 0:z.metadata)||void 0===Y?void 0:Y.goalCardData)||void 0===Q?void 0:Q.questEventId,et=null===(J=null===(Z=null===(X=K.awardTask.taskDefinition)||void 0===X?void 0:X.metadata)||void 0===Z?void 0:Z.goalCardData)||void 0===J?void 0:J.questEventId;return tt===q||et===q}))}tryBindContext(){this.bindContext().catch(X.RQr.createHandler("[PlayerGoals] Unable to bind player goals"))}destroy(){var q;null===(q=this._questManager)||void 0===q||q.onDataChanged.remove(this.onQuestDataUpdated,this),super.destroy()}bindContext(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._questTasks=this._questTasks||this._questManager.surfacedTasks;for(let q=0;qthis._questManager.isPrizeReady(q)));(0,Nd.QQ)(dt.q.instance.game,!K),this.updateValue(Rd.HideCloseButton,K),this.updateValue(Rd.ProfileQuizBindings,this.bindProfileQuiz()),this.updateValue(ms.V8.LoginDetailsUsername,this._loggedInPlayer.loginCredentials.username),this.updateValue(ms.V8.LoginDetailsPassword,this._loggedInPlayer.loginCredentials.password)}showMysteryBox(q){if(this._questManager.isAwardBlocked(q.awardTask))return!0;return this._questManager.isPrizeReady(q)||!this._questManager.isTaskComplete(q)}bindProfileQuiz(){return{[ms.V8.LoginDetailsUsername]:this._loggedInPlayer.loginCredentials.username,[ms.V8.LoginDetailsPassword]:this._loggedInPlayer.loginCredentials.password,[Rd.ProfileQuizComplete]:(()=>{Ld.d.sendCompleteProfileQuizEvent().catch(X.RQr.createHandler("[PlayerGoals] Unable to send quest event for completion of profile quiz"))}).bind(this)}}animateTaskTransition(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=this._questManager.surfacedTasks;if(this._questTasks[0].taskID===K[0].taskID)return;yield vr.o.wait(1e3),yield this.fadeOutGoal(q,500);const z=this.fadeOutOthers(K),Y=this.fadeInAll(K);yield Promise.all(z),yield Promise.all(Y)}))}fadeOutOthers(q){var K;return!this.gameObject||(null===(K=this.gameObject)||void 0===K?void 0:K.isDestroyed)?[Promise.resolve()]:q.map(((q,K)=>(0,Q.sH)(this,void 0,void 0,(function*(){const z=this.getTaskIndex(q);yield vr.o.wait(100*K),-1!==z&&(yield this.fadeOutGoal(z,450))}))))}fadeInAll(q){var K;return!this.gameObject||(null===(K=this.gameObject)||void 0===K?void 0:K.isDestroyed)?[Promise.resolve()]:q.map(((q,K)=>(0,Q.sH)(this,void 0,void 0,(function*(){const z=200*(K+1),Y=25*K;yield vr.o.wait(z-Y),this._questTasks[K]=q,this.updateElement(K,!1),this.fadeInGoal(K,800).catch(X.RQr.createHandler("PlayerGoalsDataProviderComponent animateTaskTransition fadeInGoal"))}))))}getTaskIndex(q){return this._questTasks.findIndex((K=>q.taskID===K.taskID))}fadeOutGoal(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z;if(!this.gameObject||(null===(z=this.gameObject)||void 0===z?void 0:z.isDestroyed))return;const Y=this._gridElements[q].findComponent(X.bE_);this.updateValue(Rd.GoalFadeDuration,null!=K?K:this.FADE_DURATION_MS,Y),this.updateValue(Rd.GoalFadeOut,!0,Y),yield vr.o.wait(null!=K?K:this.FADE_DURATION_MS)}))}fadeInGoal(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z;if(!this.gameObject||(null===(z=this.gameObject)||void 0===z?void 0:z.isDestroyed))return;const Y=this._gridElements[q].findComponent(X.bE_);this.updateValue(Rd.GoalFadeDuration,null!=K?K:this.FADE_DURATION_MS,Y),this.updateValue(Rd.GoalFadeIn,!0,Y),yield vr.o.wait(null!=K?K:this.FADE_DURATION_MS)}))}};(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Bd.prototype,"_gridElements",void 0),(0,Q.Cg)([(0,X.Cdj)("e47-a136"),(0,Q.Sn)("design:type",xd.n)],Bd.prototype,"_questManager",void 0),(0,Q.Cg)([(0,Qi.b)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Bd.prototype,"_loggedInPlayer",void 0),Bd=(0,Q.Cg)([(0,X.EVk)("PlayerGoalsDataProvider",et.Y.playerGoals)],Bd);let Ud=class extends Yi.z{constructor(){super(...arguments),this._bindOnPostCreate=!0}postCreate(){var q;super.postCreate(),null===(q=this._questManager)||void 0===q||q.onDataChanged.add(this.onQuestDataUpdated,this),this._bindOnPostCreate&&this.tryBindContext()}destroy(){super.destroy()}onQuestDataUpdated(){this.tryBindContext()}tryBindContext(){this.bindContext().catch(X.RQr.createHandler("[PlayerGoals] Unable to bind player goals"))}bindContext(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;if(!this.gameObject||(null===(q=this.gameObject)||void 0===q?void 0:q.isDestroyed))return;const K=kd.p.isQuestComplete;this.updateValue(Pd.QuestComplete,K)}))}};(0,Q.Cg)([(0,X.Cdj)("e47-a136"),(0,Q.Sn)("design:type",xd.n)],Ud.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Ud.prototype,"_bindOnPostCreate",void 0),Ud=(0,Q.Cg)([(0,X.EVk)("PlayerGoalsDataProviderHud",et.Y.playerGoals)],Ud);var Fd=z(81137);let Gd=class extends X.uAl{constructor(){super(...arguments),this._playerGoalsSetup=!1}firstUpdate(){super.firstUpdate(),this.setupPlayerGoals().catch(X.RQr.createHandler("Error setting up the player goals for the player goals HUD component"))}setupPlayerGoals(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._playerGoalsSetup||Fd.x.isFeatureEnabled())return;if(this._playerGoalsSetup=!0,!X.Aq$.isDefined(this._playerGoalsHudIcon))return;const q=dt.q.instance.prodigy.gameContainer.get("e47-a136");yield q.sendQuestEventPromise;if(0===kd.p.availableQuestTasks().length)return void(this._playerGoalsHudIcon.active=!1);if(q.surfacedTasks.some((K=>q.isPrizeReady(K)))){const q=new Promise((q=>dt.q.instance.game.broadcaster.addAppListener(Xn.nN.PlayerGoalsPanelClosed,q,this)));yield q,dt.q.instance.game.broadcaster.removeAppListener(Xn.nN.PlayerGoalsPanelClosed,this),this._playerGoalsHudIcon.active=!0}else this._playerGoalsHudIcon.active=!0}))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Gd.prototype,"_playerGoalsHudIcon",void 0),Gd=(0,Q.Cg)([(0,X.EVk)("PlayerGoalsHud",et.Y.playerGoals)],Gd);let jd=class extends X.uAl{constructor(){super(...arguments),this._playerGoalsQueuedSignal=new X.HN0,this._runOnCreate=!0}create(){super.create(),this._runOnCreate&&dt.q.instance.prodigy.notifications.queuedShowPlayerGoals&&this._playerGoalsQueuedSignal.dispatch()}destroy(){this._playerGoalsQueuedSignal.dispose(),super.destroy()}setPlayerGoalsQueued(q){dt.q.instance.prodigy.notifications.queuedShowPlayerGoals=q,q&&this._playerGoalsQueuedSignal.dispatch()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],jd.prototype,"_playerGoalsQueuedSignal",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],jd.prototype,"_runOnCreate",void 0),jd=(0,Q.Cg)([(0,X.EVk)("PlayerGoalsQueueing",et.Y.playerGoals)],jd);let $d=class extends X.PQK{installBindings(){const q=dt.q.instance.prodigy.gameContainer;this.Container.bind(pr.QuestManager).toConstantValue(q.get("e47-a136"))}};$d=(0,Q.Cg)([(0,X.Og1)("FtuePlayerGoalsQuestInstaller","Installer")],$d);z(55346);const Hd=new Map([[0,Gt.l.CtaTipBodyMergePet],[1,Gt.l.CtaTipBodyLevelPet],[2,Gt.l.CtaTipBodyEvolvePet]]);var Vd=z(20117);let Wd=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.onAllCTAsCompleted=this.createTidySignal(),this._contentObjects=new Map}setUpTipWidget(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;if(!q.contentArgs||0===q.contentArgs.length)return;const z=[];q.contentArgs.forEach((q=>{if(this._contentObjects.has(q.type)){const{contentObject:K,completedCTA:z}=this._contentObjects.get(q.type);Ht.d.updateInjectedValues(K,Vd.w5.GetInjectionValuesForCtaTipContent(q)),K.active=!1,z.setValue(!1)}else z.push(Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Hd.get(q.type),Vd.w5.GetInjectionValuesForCtaTipContent(q),this._bodyContainer).then((K=>{this._contentObjects.set(q.type,{contentObject:K,completedCTA:K.findComponentInChildren(Lr.f)}),K.active=!1})).catch())})),X.Aq$.isDefined(q.startingType)?this._activeType=q.startingType:null!==(K=this._activeType)&&void 0!==K||(this._activeType=q.contentArgs[0].type),z.length>0?yield Promise.all(z).then((()=>this.setContentActive(this._activeType))).catch():this.setContentActive(this._activeType)}))}setContentActive(q){this._contentObjects.get(this._activeType).contentObject.active=!1,this._activeType=q,this._contentObjects.get(this._activeType).contentObject.active=!0}closeAllCtas(){for(const q of this._contentObjects.values()){const{contentObject:K,completedCTA:z}=q;K.active=!1,z.setValue(!0)}this.onAllCTAsCompleted.dispatch(),Ht.d.updateInjectedValues(this.gameObject,{[Vd.tN.ShowCta]:!1})}closeCta(){let q=!1;this._contentObjects.get(this._activeType).completedCTA.setValue(!0);const K=this.findNextUncompletedCTAType();X.Aq$.isDefined(K)?(q=!0,this.setContentActive(K)):this.onAllCTAsCompleted.dispatch(),Ht.d.updateInjectedValues(this.gameObject,{[Vd.tN.ShowCta]:q})}findNextUncompletedCTAType(){for(const[q,K]of this._contentObjects)if(!K.completedCTA.getValue())return q}};(0,Q.Cg)([(0,Qi.b)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Wd.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Wd.prototype,"_bodyContainer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Wd.prototype,"onAllCTAsCompleted",void 0),Wd=(0,Q.Cg)([(0,X.EVk)("CtaTipWidget")],Wd);z(85773),z(96217);let qd=class extends X.PQK{installBindings(){const q=dt.q.instance.prodigy.gameContainer;this.Container.bind(pr.QuestManager).toConstantValue(q.get("f33-d276"))}};qd=(0,Q.Cg)([(0,X.Og1)("DailyLoginCalendarInstaller","Installer")],qd);let Kd=class extends X.PQK{installBindings(){const q=dt.q.instance.prodigy.gameContainer;this.Container.bind("331-a8ba").toConstantValue(q.get("319-dcbe")),this.Container.bind(pr.QuestManager).toConstantValue(q.get("319-dcbe"))}};Kd=(0,Q.Cg)([(0,X.Og1)("FireflyForestHardZoneQuestInstaller","Installer")],Kd);let zd=class extends X.PQK{installBindings(){const q=dt.q.instance.prodigy.gameContainer;this.Container.bind("331-a8ba").toConstantValue(q.get("135-e5ce")),this.Container.bind(pr.QuestManager).toConstantValue(q.get("135-e5ce"))}};zd=(0,Q.Cg)([(0,X.Og1)("FireflyForestZoneQuestInstaller","Installer")],zd);let Yd=class extends X.PQK{installBindings(){const q=dt.q.instance.prodigy.gameContainer;this.Container.bind(pr.QuestManager).toConstantValue(q.get("be3-4f64"))}};Yd=(0,Q.Cg)([(0,X.Og1)("ZoneQuestInstaller","Installer")],Yd);let Qd=class extends Pn{constructor(){super(),this.maxSimultaneousPrefabs=1,this.onSpawned=new X.HN0,this._spawnCount=0,this._tag=`LimitedLoadPrefabComponent_${X.Aq$.generateGUID()}`}destroy(){this.onSpawned.dispose(),super.destroy()}load(){if(this.maxSimultaneousPrefabs>0){if(this._parent.children.filter((q=>q.hasOwnProperty(this._tag))).length>=this.maxSimultaneousPrefabs)return new X.kBN((q=>{q(null)}))}return this.maxTotalSpawns>0&&this._spawnCount>=this.maxTotalSpawns?new X.kBN((q=>{q(null)})):(this._spawnCount++,super.load().then((q=>(q&&(q[this._tag]=!0,this.onSpawned.dispatch(q)),q))))}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Qd.prototype,"maxSimultaneousPrefabs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Qd.prototype,"maxTotalSpawns",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Qd.prototype,"onSpawned",void 0),Qd=(0,Q.Cg)([(0,X.EVk)("LimitedLoadPrefab",et.Y.utility,"Ensures that only a limited number of a certain prefab can be active at a time."),(0,Q.Sn)("design:paramtypes",[])],Qd);class Xd{static getDailyQuestState(q){const K=null!=q?q:dt.q.instance.prodigy.world.getCurrentZoneObject(),z=re.J.getDate(),Y=K.getState("daily");if(!this.isDailyQuestState(Y))return{date:z,flags:[1,1,1,1,1],rewards:0};if(Y.date!==z){const q={date:z,flags:[1,1,1,1,1],rewards:Y.rewards};return K.setState("daily",q),q}return Y}static isDailyQuestState(q){return"object"==typeof q&&null!==q&&"date"in q&&"flags"in q&&"rewards"in q}}let Zd=class extends X.uAl{constructor(){super(...arguments),this._dailyQuestItemSpawners=[],this.onDailyQuestCollected=new X.HN0,this.onAllDailyQuestsCompleted=new X.HN0,this._zone=null,this._spawnPromises=[]}get zone(){var q;return null!==(q=this._zone)&&void 0!==q?q:this._zone=dt.q.instance.prodigy.world.getCurrentZoneObject()}create(){super.create()}destroy(){for(const q of this._spawnPromises)q.cancel();this._spawnPromises.length=0,this.onDailyQuestCollected.dispose(),this.onAllDailyQuestsCompleted.dispose(),super.destroy()}getDailySpawnPointData(){const q=dt.q.instance.game.cache.getJSON(this._dailyQuestData);return q||(X.VyI.log("[DailyQuestComponent]: No spawn point data found",X.$bb.Error),null)}spawnDailyQuestItems(){var q,K;const z=this.getDailySpawnPointData();if(!z)return void X.VyI.log("[DailyQuestComponent]: No spawn point data available",X.$bb.Error);const Y=null!==(K=null===(q=z.spawnPoints)||void 0===q?void 0:q[this._zoneMapTag])&&void 0!==K?K:0,Q=this._dailyQuestItemSpawners.length;Y===Q?this.getDailySpawnPoints().forEach(((q,K)=>{var z;if(!q.collected&&q.mapTag===this._zoneMapTag){const Y=this._dailyQuestItemSpawners[q.index];(null!==(z=Y.GameObject.findComponent(X.bE_))&&void 0!==z?z:Y.GameObject.addComponent(X.bE_)).Container.bind("ON_COLLECT_DAILY").toConstantValue((()=>{this.collectDailyQuest(K)})),this._spawnPromises.push(Y.load())}})):X.VyI.log(`[DailyQuestComponent]: Mismatch between spawn point count (${Y}) and spawner count (${Q})`,X.$bb.Error)}getDailySpawnPoints(){const q=Xd.getDailyQuestState(),K=this.getDailySpawnPointData();if(!q||!K)return X.VyI.log("[DailyQuestComponent]: Invalid daily state or spawn point data",X.$bb.Error),[];const z=new X.bsf(q.date),Y=yt.flatMap(Object.entries(K.spawnPoints),(([q,K])=>Array.from({length:K},((K,z)=>({mapTag:q,index:z})))));return z.shuffle(Y),Y.length=Math.min(Y.length,5),Y.forEach(((K,z)=>{K.collected=1!==q.flags[z]})),Y}getActiveDailySpawnPointsForMap(){return this.getDailySpawnPoints().filter((({mapTag:q,collected:K})=>q===this._zoneMapTag&&!K))}collectDailyQuest(q){if(!X.Aq$.isDefined(q))return void X.VyI.log("[DailyQuestComponent]: Invalid daily index",X.$bb.Error);const K=Xd.getDailyQuestState();K?(K.flags[q]=0,this.zone.setState("daily",K),this.onDailyQuestCollected.dispatch(q),this.checkAllDailiesCompleted()):X.VyI.log("[DailyQuestComponent]: No daily quest state found",X.$bb.Error)}checkAllDailiesCompleted(){const q=Xd.getDailyQuestState();if(!q)return!1;const K=q.flags.every((q=>0===q));return K&&this.onAllDailyQuestsCompleted.dispatch(),K}};(0,Q.Cg)([(0,X.Cdj)("ZONE_MAP_TAG"),(0,Q.Sn)("design:type",String)],Zd.prototype,"_zoneMapTag",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,X.tW2)("daily"),(0,Q.Sn)("design:type",String)],Zd.prototype,"_dailyQuestData",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(Qd),(0,Q.Sn)("design:type",Array)],Zd.prototype,"_dailyQuestItemSpawners",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zd.prototype,"onDailyQuestCollected",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zd.prototype,"onAllDailyQuestsCompleted",void 0),(0,Q.Cg)([(q,K)=>{},(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",Array)],Zd.prototype,"getDailySpawnPoints",null),Zd=(0,Q.Cg)([(0,X.EVk)("DailyQuest",et.Y.quest)],Zd);z(52437);let Jd=class extends X.uAl{constructor(){super(...arguments),this._zoneID=Yt.A_.FOREST,this.onCreate=new X.HN0,this.onQuestStarted=new X.HN0,this.onQuestComplete=new X.HN0,this.onQuestIncomplete=new X.HN0,this.onSequenceComplete=new X.HN0,this.onSequenceIncomplete=new X.HN0,this.onCheckSequence=new X.HN0,this._zone=null}get zone(){var q;return null!==(q=this._zone)&&void 0!==q?q:this._zone=dt.q.instance.prodigy.world.getZone(this._zoneID)}create(){super.create(),this.onCreate.dispatch()}checkQuestStatus(q){var K;if(!X.Aq$.isDefined(q))return void X.VyI.log("[LegacyQuestStatusComponent]: No ID provided",X.$bb.Error);(this.zone.isQuestComplete(q)||(null===(K=this.zone.getQuestState())||void 0===K?void 0:K.ID)>q?this.onQuestComplete:this.onQuestIncomplete).dispatch()}checkQuestSequenceStatus(q,K){var z;if(!X.Aq$.isDefined(q)||!X.Aq$.isDefined(K))return void X.VyI.log("[LegacyQuestStatusComponent]: No ID(s) provided",X.$bb.Error);(this.zone.isSequenceComplete(q,K)||(null===(z=this.zone.getQuestState())||void 0===z?void 0:z.ID)>q?this.onSequenceComplete:this.onSequenceIncomplete).dispatch(K)}checkCurrentQuestSequenceStatus(q){var K;(null===(K=this.zone.getQuestState())||void 0===K?void 0:K.ID)===q&&this.onCheckSequence.dispatch(this.zone.getQuestState().seq)}checkQuestStarted(q,K){(X.Aq$.isDefined(K)?this.zone.isOnQuest(q)&&!this.zone.isSequenceComplete(q,K):this.zone.isOnQuest(q))&&this.onQuestStarted.dispatch()}setQuestComplete(q){if(!X.Aq$.isDefined(q))return void X.VyI.log("[LegacyQuestStatusComponent]: No ID provided",X.$bb.Error);this.zone.completeQuest(q);const K=dt.q.instance.game.state.get(Nt.G.TileScreen);K?K.process():X.VyI.log(`[LegacyQuestStatusComponent]: TileScreen not found during complete of Quest ${q}`,X.$bb.Error)}setQuestSequenceComplete(q,K){if(X.Aq$.isDefined(q)&&X.Aq$.isDefined(K)){if(this.zone.completeSequence(q,K),!this._isPrefabMap){const z=dt.q.instance.game.state.get(Nt.G.TileScreen);z?z.process():X.VyI.log(`[LegacyQuestStatusComponent]: TileScreen not found during complete of Quest ${q} Seq ${K}`,X.$bb.Error)}}else X.VyI.log("[LegacyQuestStatusComponent]: No ID(s) provided",X.$bb.Error)}destroy(){this.onCreate.dispose(),this.onCheckSequence.dispose(),this.onSequenceComplete.dispose(),this.onSequenceIncomplete.dispose(),this.onQuestStarted.dispose(),this.onQuestComplete.dispose(),this.onQuestIncomplete.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.gfw)(Yt.A_),(0,Q.Sn)("design:type",String)],Jd.prototype,"_zoneID",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jd.prototype,"onCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jd.prototype,"onQuestStarted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jd.prototype,"onQuestComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jd.prototype,"onQuestIncomplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jd.prototype,"onSequenceComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jd.prototype,"onSequenceIncomplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jd.prototype,"onCheckSequence",void 0),(0,Q.Cg)([(0,X.Cdj)("IS_PREFAB_MAP"),Fo(),(0,Q.Sn)("design:type",Boolean)],Jd.prototype,"_isPrefabMap",void 0),Jd=(0,Q.Cg)([(0,X.EVk)("LegacyQuestStatus",et.Y.quest)],Jd);var tl=z(25308);let el=class extends X.uAl{constructor(){super(...arguments),this._onEncounterComplete=new X.HN0,this._onPostBattleVictory=new X.HN0}create(){super.create(),this._currentZone=dt.q.instance.prodigy.world.getCurrentZoneObject()}startEncounter(){const q=this.getCutsceneAssetID(),K=this.getEncounterAssetID();K&&q?dt.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(this._currentZone,q,K,(()=>this._onPostBattleVictory.dispatch()),(()=>this._onEncounterComplete.dispatch())).catch(X.RQr.createHandler(`Could not load the Pippet Encounter from guid: ${this.getEncounterAssetID()}`)):X.VyI.log(`Encounter or cutscene asset ID not defined for zone: ${this._currentZone.ID}`,X.$bb.Error)}getCutsceneAssetID(){switch(this._currentZone.ID){case Yt.A_.SHIVERCHILL:case Yt.A_.SHIVERCHILLHARD:return 202;case Yt.A_.BONFIRE:case Yt.A_.BONFIREHARD:return 204;case Yt.A_.SHIPWRECK:case Yt.A_.SHIPWRECKHARD:return 205;case Yt.A_.SKYWATCH:case Yt.A_.SKYWATCHHARD:return 206;default:return X.VyI.log(`Pippet quest encounter cutscene not defined for zone: ${this._currentZone.ID}`,X.$bb.Error),null}}getEncounterAssetID(){switch(this._currentZone.ID){case Yt.A_.SHIVERCHILL:return tl.e.Shiverchill_quests_encounter;case Yt.A_.SHIVERCHILLHARD:return tl.e.Shiverchill_hard_quests_encounter;case Yt.A_.BONFIRE:return tl.e.Bonfire_spire_quests_encounter;case Yt.A_.BONFIREHARD:return tl.e.Bonfire_spire_hard_quests_encounter;case Yt.A_.SHIPWRECK:return tl.e.Shipwreck_quests_encounter;case Yt.A_.SHIPWRECKHARD:return tl.e.Shipwreck_hard_quests_encounter;case Yt.A_.SKYWATCH:return tl.e.Skywatch_quests_encounter;case Yt.A_.SKYWATCHHARD:return tl.e.Skywatch_hard_quests_encounter;default:return X.VyI.log(`Pippet quest encounter not defined for zone: ${this._currentZone.ID}`,X.$bb.Error),null}}destroy(){this._onEncounterComplete.dispose(),this._onPostBattleVictory.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],el.prototype,"_onEncounterComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],el.prototype,"_onPostBattleVictory",void 0),el=(0,Q.Cg)([(0,X.EVk)("PippetQuestEncounter",et.Y.quest)],el);var il=z(79368);let sl=class extends X.uAl{sendEvent(){this._buttonID&&""!==this._buttonID?this._questManager.sendQuestEvent(eo.T.BUTTON_CLICK,{id:this._buttonID}).catch(X.RQr.createHandler("An error occurred while sending the button click event")):X.VyI.log("QuestButtonEventComponent attempted to send event with empty button id",X.$bb.Error)}};(0,Q.Cg)([(0,X.Cdj)(pr.QuestManager),(0,Q.Sn)("design:type",il.k)],sl.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],sl.prototype,"_buttonID",void 0),sl=(0,Q.Cg)([(0,X.EVk)("QuestButtonEvent",et.Y.ultimates)],sl);var nl=z(91323),al=z(7247);let rl=class extends X.uAl{constructor(){super(...arguments),this.onQuestTaskStart=new X.HN0,this.onQuestTaskComplete=new X.HN0,this.onQuestObjectiveChange=new X.HN0}getTag(){return this.tag}create(){var q;super.create(),this.localZoneQuestManager?(this.localZoneQuestManager.onQuestTaskStart.add((q=>{this.onQuestTaskStart.dispatch(q),this.setQuestObjective(q),this.addGuideHands().catch(X.RQr.createHandler("Failed to add guide hands"))}),this),this.localZoneQuestManager.onQuestTaskComplete.add((q=>{var K;this.onQuestTaskComplete.dispatch(q),(null===(K=q.metadata)||void 0===K?void 0:K.parentCompleted)&&this.onQuestObjectiveChange.dispatch("")}),this),this.localZoneQuestManager.getTasksInProgress().then((q=>{0!==q.length?this.setQuestObjective(q[0].taskDefinition):X.VyI.log("No tasks in progress",X.$bb.Verbose)})).catch(X.RQr.createHandler("Failed to get tasks in progress")),this.addGuideHands().catch(X.RQr.createHandler("Failed to add guide hands")),this.tag=null===(q=this._zoneMapTag)||void 0===q?void 0:q.split("-")[1]):X.VyI.log("No local zone quest manager found on quest manager component",X.$bb.Warning)}destroy(){var q,K;this.localZoneQuestManager&&(null===(q=this.localZoneQuestManager.onQuestTaskStart)||void 0===q||q.removeAll(this),null===(K=this.localZoneQuestManager.onQuestTaskComplete)||void 0===K||K.removeAll(this)),this.onQuestTaskStart.dispose(),this.onQuestTaskComplete.dispose(),this.onQuestObjectiveChange.dispose(),super.destroy()}setQuestObjective(q){var K,z,Y,Q,Z,J,tt,et;if(q.localizationKey)this.onQuestObjectiveChange.dispatch(this._localizer.getText(q.localizationKey));else if(q.completionRequirements.type===eo.T.DEFEAT_ENCOUNTER||q.completionRequirements.type===eo.T.DEFEAT_QUEST_ENCOUNTER){const Y=null!==(K=dt.q.instance.prodigy.world.getCurrentZoneObject().getQuestState())&&void 0!==K?K:{},Q=X.Aq$.isDefined(Y.req)?Y.req.N:null!==(z=q.completionRequirements.data.target)&&void 0!==z?z:1,Z=q.completionRequirements.data.id;let J;if(J=Ut.O.isEnglishLocale()?`Defeat ${Q} ${(0,nl.t)("Monster",Q)}`:Q>1?this._localizer.getText("DEFEAT_N_MONSTERS",Q):this._localizer.getText("DEFEAT_1_MONSTER"),X.Aq$.isDefined(Z)){const q=ae.t.getItem("pet",Z);if(q){const K=uo.P8.getPetDisplayName(q,q);J=Ut.O.isEnglishLocale()?`Defeat ${Q} ${(0,nl.t)(K,Q)}`:this._localizer.getText("DEFEAT_N_NAMED_MONSTERS",Q,K)}}this.onQuestObjectiveChange.dispatch(J)}else if(q.completionRequirements.type===eo.T.COLLECT_ITEM){const K=q.completionRequirements.data.type,z=Number(q.completionRequirements.data.id);this.updateWithItemAmountRemaining(K,z,null!==(Y=q.completionRequirements.data.target)&&void 0!==Y?Y:1)}else if(q.completionRequirements.type===eo.T.RECEIVE_ITEM&&(null===(Q=q.completionRequirements)||void 0===Q?void 0:Q.conditions)){const K=q.completionRequirements.conditions.find((q=>q.type===al.i.ITEM_RESTRICTIONS));if(null==K?void 0:K.data){const z=K.data,Y=null===(Z=z.types)||void 0===Z?void 0:Z[0],Q=Number(null===(J=z.ids)||void 0===J?void 0:J[0]),it=null!==(tt=dt.q.instance.prodigy.world.getCurrentZoneObject().getQuestState())&&void 0!==tt?tt:{},st=X.Aq$.isDefined(it.req)?it.req.N:null!==(et=q.completionRequirements.data.target)&&void 0!==et?et:1;return void this.updateWithItemProgressRemaining(Y,Q,st)}X.VyI.log("[QuestManagerComponent] ReceiveItem task type expects a condition of type ItemRestrictions, but none was found",X.$bb.Warning),this.onQuestObjectiveChange.dispatch(void 0)}else this.onQuestObjectiveChange.dispatch(void 0)}updateWithItemProgressRemaining(q,K,z){const Y=ae.t.getItem(q,K);let Q;Q=Ut.O.isEnglishLocale()?`Collect ${z} ${(0,nl.t)(null==Y?void 0:Y.name,z)}`:this._localizer.getText("COLLECT_N_ITEMS",z,null==Y?void 0:Y.name),this.onQuestObjectiveChange.dispatch(Q)}updateWithItemAmountRemaining(q,K,z){const Y=ae.t.getItem(q,K),Q=z-dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem(q,K);let X;X=Ut.O.isEnglishLocale()?`Collect ${Q} ${(0,nl.t)(Y.name,Q)}`:this._localizer.getText("COLLECT_N_ITEMS",Q,null==Y?void 0:Y.name),this.onQuestObjectiveChange.dispatch(X)}addGuideHands(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=Ic.P.findSceneTeleportTriggers();if(!q.length)return;const K=yield this.localZoneQuestManager.getTasksInProgress(),z=yt.uniq(yt.flatMap(K,(q=>{var K,z;return null!==(z=null===(K=q.taskDefinition.metadata)||void 0===K?void 0:K.locations)&&void 0!==z?z:[]}))),Y=Ic.P.getTargetMapsFromLocations(z),Q=Ic.P.findShortestPathsToAllOf(this._zoneMapTag,Y);if(Q.length>0){Q.sort(((q,K)=>q.length-K.length));const K=Q[0],z=K.length>1?K[1]:"";Ic.P.manageTeleportTriggerGuideHands(z,q)}}))}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rl.prototype,"onQuestTaskStart",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rl.prototype,"onQuestTaskComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rl.prototype,"onQuestObjectiveChange",void 0),(0,Q.Cg)([(0,X.Cdj)("331-a8ba"),(0,Q.Sn)("design:type",_o.B)],rl.prototype,"localZoneQuestManager",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],rl.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_MAP_TAG"),(0,Q.Sn)("design:type",String)],rl.prototype,"_zoneMapTag",void 0),rl=(0,Q.Cg)([(0,X.EVk)("QuestManager",et.Y.quest)],rl);var ol=z(85604);const hl={[ol.y.Flora]:39,[ol.y.Bok]:0,[ol.y.Slurpy]:0,[ol.y.Eve]:45,[ol.y.Broccolina]:2,[ol.y.Benni]:1,[ol.y.Gale]:14};let cl=class extends X.uAl{constructor(){super(...arguments),this._questNPCName=ol.y.Flora}interact(){var q;null===(q=this._dialogueController)||void 0===q||q.close();const K=this._playerDataProvider.player,z=this._zoneOverride?dt.q.instance.prodigy.world.getZone(this._zoneOverride):dt.q.instance.prodigy.world.getCurrentZoneObject();if(!K.isZoneQuestEnabled)return;const Y=()=>{this.getInjectedValue("b37-c775").sendQuestEventViaHub(eo.T.SPEAK_WITH_NPC,{id:this._questNPCName}).catch(X.RQr.createHandler("An error occurred while sending the SPEAK_WITH_NPC event via Quest Hub"))};this._dialogueController=new Ii.rD(dt.q.instance.game);const Q=z.getQuestState();if(!Q)return z.startQuest(1).onQuestEventDialogue("onStart"),this.queueEventText(z,"onStart",1),void this._dialogueController.start(void 0,Y);const Z=Q.ID;if(!X.Aq$.isDefined(Z))return;const J=z.getQuest(Z);if(J)this.queueEventText(z,"onStart",Z),J.onQuestEventDialogue("onStart"),this._dialogueController.start(void 0,Y);else{const q=dt.q.instance.prodigy.event.create();q.text(hl[this._questNPCName],this._questNPCName),q.function(Y),q.start()}}queueEventText(q,K,z){const Y=q.getQuest(z);if(X.Aq$.isDefined(Y[K]))for(const Q of Y[K])this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(Q),blockInput:!0}])}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],cl.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.gfw)(ol.y),(0,Q.Sn)("design:type",String)],cl.prototype,"_questNPCName",void 0),(0,Q.Cg)([(0,X.gfw)(Yt.A_),(0,Q.Sn)("design:type",String)],cl.prototype,"_zoneOverride",void 0),cl=(0,Q.Cg)([(0,X.EVk)("QuestNpc",et.Y.quest)],cl);let dl=class extends X.uAl{initFromActivePlayer(){this._questID=this._playerDataProvider.player.ultimateQuestId}setTradeEventData(q,K){this._itemID=K,this._itemType=q}sendEvent(){X.Aq$.isDefined(this._itemID)?this._questManager.sendQuestEvent(eo.T.TRADE_WITH_ULLA,{type:this._itemType,id:this._itemID},this._questID?[this._questID]:void 0).catch(X.RQr.createHandler("An error occurred while sending the NPC trade event")):X.VyI.log("QuestNPCTradeEventComponent attempted to send event with empty item id",X.$bb.Warning)}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],dl.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)(pr.QuestManager),(0,Q.Sn)("design:type",il.k)],dl.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],dl.prototype,"_itemID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],dl.prototype,"_itemType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],dl.prototype,"_questID",void 0),dl=(0,Q.Cg)([(0,X.EVk)("QuestNPCTradeEvent",et.Y.ultimates)],dl);var ll=z(95383),ul=z(98938);let fl=class extends X.uAl{constructor(){super(...arguments),this._dispatchStartOnCreate=!0,this._dispatchCompleteOnCreate=!0,this.onTaskStart=new X.HN0,this.onTaskComplete=new X.HN0,this._awaitOpenDialogues=!0}create(){if(super.create(),this._questTag&&this._questManagerHub.questManagerMap.get(this._questTag))this._questManager=this._questManagerHub.questManagerMap.get(this._questTag);else{if(!this._localZoneQuestManager)return void X.VyI.log(`QuestManager with tag [${this._questTag}] is not connected to the QuestManagerHub, and no localZoneQuestManager is available. This quest listener will not function`,X.$bb.Warning);this._questManager=this._localZoneQuestManager}this._questManager.onQuestTaskStart.add(this.handleQuestTaskStart,this),this._questManager.onQuestTaskComplete.add(this.handleQuestTaskComplete,this),this._dispatchStartOnCreate&&this.attemptDispatchTaskStart(),this._dispatchCompleteOnCreate&&this.attemptDispatchTaskComplete()}attemptDispatchTaskStart(){this._popupManager.delayPopupsUntil(this._questManager.isTaskInProgress(this.questId,this.taskId).then((q=>{var K;q&&(null===(K=this.onTaskStart)||void 0===K||K.dispatch())})).catch(X.RQr.createHandler(`Error getting "${this.questId}" "${this.taskId}" task progress`)))}attemptDispatchTaskComplete(){this._popupManager.delayPopupsUntil(this._questManager.isTaskCompleted(this.questId,this.taskId).then((q=>{var K;q&&(null===(K=this.onTaskComplete)||void 0===K||K.dispatch())})).catch(X.RQr.createHandler(`Error getting "${this.questId}" "${this.taskId}" task status`)))}destroy(){var q,K,z,Y;null===(K=null===(q=this._questManager)||void 0===q?void 0:q.onQuestTaskStart)||void 0===K||K.remove(this.handleQuestTaskStart,this),null===(Y=null===(z=this._questManager)||void 0===z?void 0:z.onQuestTaskComplete)||void 0===Y||Y.remove(this.handleQuestTaskComplete,this),this.onTaskStart.dispose(),this.onTaskComplete.dispose(),this.onTaskStart=null,this.onTaskComplete=null,super.destroy()}handleQuestTaskStart(q){q.id===this.taskId&&(this._awaitOpenDialogues&&this._dialogueEventController.isDialogueInProgress()?this._dialogueEventController.onComplete.addOnce((()=>{var q;return null===(q=this.onTaskStart)||void 0===q?void 0:q.dispatch()})):this.onTaskStart.dispatch())}handleQuestTaskComplete(q){q.id===this.taskId&&(this._awaitOpenDialogues&&this._dialogueEventController.isDialogueInProgress()?this._dialogueEventController.onComplete.addOnce((()=>{var q;return null===(q=this.onTaskComplete)||void 0===q?void 0:q.dispatch()})):this.onTaskComplete.dispatch())}};(0,Q.Cg)([(0,X.Cdj)("b37-c775"),(0,Q.Sn)("design:type",so.n)],fl.prototype,"_questManagerHub",void 0),(0,Q.Cg)([(0,X.Cdj)("331-a8ba"),(0,Q.Sn)("design:type",_o.B)],fl.prototype,"_localZoneQuestManager",void 0),(0,Q.Cg)([(0,X.gfw)(ul.t),(0,Q.Sn)("design:type",String)],fl.prototype,"_questTag",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],fl.prototype,"questId",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],fl.prototype,"taskId",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],fl.prototype,"_dispatchStartOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],fl.prototype,"_dispatchCompleteOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],fl.prototype,"onTaskStart",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],fl.prototype,"onTaskComplete",void 0),(0,Q.Cg)([(0,X.Cdj)("PopupHandler"),(0,Q.Sn)("design:type",ll.Y)],fl.prototype,"_popupManager",void 0),(0,Q.Cg)([(0,X.Cdj)("e81-40c8"),(0,Q.Sn)("design:type",Ii.rD)],fl.prototype,"_dialogueEventController",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],fl.prototype,"_awaitOpenDialogues",void 0),fl=(0,Q.Cg)([(0,X.EVk)("QuestProgressListener",et.Y.quest)],fl);var bl=z(10592);let pl=class extends X.uAl{initCurrentQuestID(){this._questID=this._playerDataProvider.player.ultimateQuestId}initCurrentTaskID(){this._taskID=this._playerDataProvider.player.ultimateTaskId}setCollectingItems(){this._playerDataProvider.player.setUltimateSessionStatus(bl.n.CollectingItems,this._questID,this._taskID)}setTrackingNPC(){this._playerDataProvider.player.setUltimateSessionStatus(bl.n.TrackingNPC,this._questID,this._taskID)}setTamingUltimate(){this._playerDataProvider.player.setUltimateSessionStatus(bl.n.TamingUltimate,this._questID,this._taskID)}setNone(){this._playerDataProvider.player.setUltimateSessionStatus(bl.n.None,this._questID,this._taskID)}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],pl.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],pl.prototype,"_questID",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Object)],pl.prototype,"_taskID",void 0),pl=(0,Q.Cg)([(0,X.EVk)("QuestSessionStatus",et.Y.ultimates)],pl);let vl=class extends X.uAl{constructor(){super(...arguments),this._eventType=eo.T.NONE,this._sendViaQuestHub=!1,this._eventProcessed=new X.HN0}sendEvent(){if(this._eventId)if(this._sendViaQuestHub){const q=this.getInjectedValue("b37-c775");if(!q)return void X.VyI.log("SendQuestEventIdComponent attempted to send event via Quest Manager Hub, but no Quest Manager Hub was found",X.$bb.Warning);q.sendQuestEventViaHub(this._eventType,{id:this._eventId}).then((()=>this._eventProcessed.dispatch())).catch(X.RQr.createHandler("An error occurred while sending the event via Quest Hub"))}else{const q=this.getInjectedValue(pr.QuestManager);if(!q)return void X.VyI.log("SendQuestEventIdComponent attempted to send event via Quest Manager, but no Quest Manager was found",X.$bb.Warning);q.sendQuestEvent(this._eventType,{id:this._eventId}).then((()=>this._eventProcessed.dispatch())).catch(X.RQr.createHandler("An error occurred while sending the event"))}else X.VyI.log("SendQuestEventIdComponent attempted to send event with an empty id",X.$bb.Warning)}destroy(){this._eventProcessed.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.gfw)(eo.T),(0,Q.Sn)("design:type",String)],vl.prototype,"_eventType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],vl.prototype,"_eventId",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],vl.prototype,"_sendViaQuestHub",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vl.prototype,"_eventProcessed",void 0),vl=(0,Q.Cg)([(0,X.EVk)("SendQuestEventId",et.Y.quest)],vl);let gl=class extends X.uAl{constructor(){super(...arguments),this._questId=null}updateQuestProgress(){this._questManager.updateQuestProgress(this._questId).catch(X.RQr.createHandler("An error occurred while checking for quest progress"))}};var ml;(0,Q.Cg)([(0,X.Cdj)(pr.QuestManager),(0,Q.Sn)("design:type",il.k)],gl.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],gl.prototype,"_questId",void 0),gl=(0,Q.Cg)([(0,X.EVk)("UpdateQuestProgress",et.Y.quest)],gl),function(q){q.SPEAK_WITH_NPC="SpeakWithNPC",q.OPEN_SHOP="OpenShop",q.LOAD_PREFAB="LoadPrefab"}(ml||(ml={}));var yl=z(94310),_l=z(92240);let El=class extends X.uAl{constructor(){super(...arguments),this._questTag=ul.t.Festival,this._objectStateID=yl.L.FestivalPrizeWheel,this._activeStateObjects=[],this._inactiveStateObjects=[],this._becomeActiveStateObjects=[],this._becomeInactiveStateObjects=[]}postCreate(){this.fetchStateData().then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){q&&(this.initializeState(),this.setupCallbacks())})))).catch(X.RQr.createHandler(`Error fetching state data for ${this._objectStateID}`))}fetchStateData(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z;if(this._currentQuestID=this._questID?this._questID:null===(q=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===q?void 0:q.getCurrentQuestID(),!this._currentQuestID)return X.VyI.log(`Quest ID was undefined when attempting to fetch state data for ${this._questTag}`,X.$bb.Verbose),!1;const Y=yield null===(K=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===K?void 0:K.getQuestObjectStates(this._currentQuestID);if(!Y)return X.VyI.log(`Could not read object state data schema for ${this._currentQuestID}`,X.$bb.Verbose),!1;const Q=yield null===(z=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===z?void 0:z.getQuestProgress(this._currentQuestID);return(null==Q?void 0:Q.tasks)?(this._objectState=yield _l.h.calculateStateWithPreconditions(this._objectStateID,Y,Q.tasks,new Cr.f),!!this._objectState||(X.VyI.log(`No state was found for ${this._objectStateID}`,X.$bb.Verbose),!1)):(X.VyI.log(`Could not read task progress data for ${this._currentQuestID}`,X.$bb.Verbose),!1)}))}initializeState(){var q,K,z,Y;this.setupActiveState(),(null===(K=null===(q=this._objectState)||void 0===q?void 0:q.sendQuestEvent)||void 0===K?void 0:K.sendOnInitialize)&&this.handleSendQuestEvent(),(null===(Y=null===(z=this._objectState)||void 0===z?void 0:z.loadPrefab)||void 0===Y?void 0:Y.loadOnInitialize)&&this.handlePrefabLoad()}setupDialogue(){var q,K,z;const Y=new Ii.rD(dt.q.instance.game),Q=[];null===(q=this._objectState.dialogue.dialogueClose)||void 0===q||q.forEach((q=>{switch(q){case ml.OPEN_SHOP:Q.push((()=>{var q,K,z,Y;const Q=null===(K=null===(q=this._objectState)||void 0===q?void 0:q.dialogue)||void 0===K?void 0:K.shopToOpen;"string"==typeof Q?dt.q.instance.prodigy.open.dynamicStore({storeKey:Q,scrollToSection:null===(Y=null===(z=this._objectState)||void 0===z?void 0:z.dialogue)||void 0===Y?void 0:Y.scrollToSection,origin:{originType:wi.$N.ButtonClick,originId:this._objectStateID}}):"number"==typeof Q&&dt.q.instance.prodigy.open.store(Q,void 0,void 0,{originType:wi.$N.ButtonClick,originID:this._objectStateID})}));break;case ml.SPEAK_WITH_NPC:Q.push((()=>{this._questManagerHub.sendQuestEventViaHub(eo.T.SPEAK_WITH_NPC,{id:this._npcName}).catch(X.RQr.createHandler("An error occurred while sending the SPEAK_WITH_NPC event via Quest Hub"))}));break;case ml.LOAD_PREFAB:Q.push((()=>{this.handlePrefabLoad()}))}})),Y.addEvents((null!==(z=null===(K=this._objectState.dialogue)||void 0===K?void 0:K.dialogueArray)&&void 0!==z?z:[]).map((q=>({dialogueData:Y.dataProvider.get(q),blockInput:!0}))));Y.start(!0,(()=>{Q.forEach((q=>q()))}))}setupActiveState(){var q;if(null===(q=this._objectState)||void 0===q?void 0:q.active){if(this._activeStateObjects.forEach((q=>{q.active=this._objectState.active.isActive})),this._inactiveStateObjects.forEach((q=>{q.active=!this._objectState.active.isActive})),void 0!==this._lastEvaluatedActiveState&&this._objectState.active.isActive!==this._lastEvaluatedActiveState){(this._objectState.active.isActive?this._becomeActiveStateObjects:this._becomeInactiveStateObjects).forEach((q=>{q.active=!0,this._objectState.active.stateChangeObjectDuration&&this._objectState.active.stateChangeObjectDuration>0&&(()=>(0,Q.sH)(this,void 0,void 0,(function*(){const K=this._objectState.active.stateChangeObjectDuration;yield X.Egh.timeout(K*se.s.SECONDS_IN_MS),q&&(q.active=!1)})))().catch(X.RQr.createHandler("Error disabling a state change object"))}))}this._lastEvaluatedActiveState=this._objectState.active.isActive}}handlePrefabLoad(){this._objectState.loadPrefab&&Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(dt.q.instance.prodigy.gameContainer.get("983-05a7"),this._objectState.loadPrefab.guid,this._objectState.loadPrefab.injectedValues,this._objectState.loadPrefab.loadAsChild?this.gameObject:void 0).catch(X.RQr.createHandler(`[QuestObjectStateComponent] Could not load prefab: ${Gt.l[this._objectState.loadPrefab.guid]}`))}handleSendQuestEvent(){this._objectState.sendQuestEvent&&(this._questManagerHub.sendQuestEventViaHub(eo.T.QUEST_OBJECT_STATE_EVALUATED,{id:this._objectStateID}).catch(X.RQr.createHandler("An error occurred while sending the QUEST_OBJECT_STATE_EVALUATED event via Quest Hub")),this._objectState.sendQuestEvent.sendCustomEvent&&this._questManagerHub.sendQuestEventViaHub(this._objectState.sendQuestEvent.customEventType,this._objectState.sendQuestEvent.customEventData).catch(X.RQr.createHandler("An error occurred while sending the a custom object state quest event via Quest Hub")),this._objectState.sendQuestEvent.ignoreCallback&&(this._skipNextEvaluation=!0))}setupCallbacks(){var q;null===(q=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===q||q.onQuestTaskComplete.add((()=>(0,Q.sH)(this,void 0,void 0,(function*(){if(this._skipNextEvaluation)return void(this._skipNextEvaluation=!1);(yield this.fetchStateData())&&this.initializeState()}))),this)}interact(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,X,Z;(null===(q=this._objectState)||void 0===q?void 0:q.dialogue)?this.setupDialogue():(null===(K=this._objectState)||void 0===K?void 0:K.loadPrefab)&&!(null===(Y=null===(z=this._objectState)||void 0===z?void 0:z.loadPrefab)||void 0===Y?void 0:Y.loadOnInitialize)?this.handlePrefabLoad():(null===(Q=this._objectState)||void 0===Q?void 0:Q.sendQuestEvent)&&!(null===(Z=null===(X=this._objectState)||void 0===X?void 0:X.sendQuestEvent)||void 0===Z?void 0:Z.sendOnInitialize)&&this.handleSendQuestEvent()}))}};(0,Q.Cg)([(0,X.gfw)(ul.t),(0,Q.Sn)("design:type",String)],El.prototype,"_questTag",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],El.prototype,"_questID",void 0),(0,Q.Cg)([(0,X.gfw)(yl.L),(0,Q.Sn)("design:type",String)],El.prototype,"_objectStateID",void 0),(0,Q.Cg)([(0,X.gfw)(ol.y),(0,Q.Sn)("design:type",String)],El.prototype,"_npcName",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],El.prototype,"_activeStateObjects",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],El.prototype,"_inactiveStateObjects",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],El.prototype,"_becomeActiveStateObjects",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],El.prototype,"_becomeInactiveStateObjects",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],El.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("b37-c775"),(0,Q.Sn)("design:type",so.n)],El.prototype,"_questManagerHub",void 0),El=(0,Q.Cg)([(0,X.EVk)("QuestObjectState",et.Y.quest)],El);let wl=class extends X.uAl{create(){super.create(),this._setupOnCreate&&this.setupQuestTasks().catch(X.RQr.createHandler("[QuestTaskSetupComponent] Error setting up quest tasks"))}setupQuestTasks(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this._questTasksSetup){this._questTasksSetup=!0;try{yield this._questManagerHub.setupValidTasks()}catch(e){X.RQr.logError(e,"[QuestTaskSetupComponent] Unable to setup tasks via QuestManagerHub")}}}))}};(0,Q.Cg)([(0,X.Cdj)("b37-c775"),(0,Q.Sn)("design:type",so.n)],wl.prototype,"_questManagerHub",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Zn.PopupHandler),(0,Q.Sn)("design:type",ll.Y)],wl.prototype,"_popupManager",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],wl.prototype,"_setupOnCreate",void 0),wl=(0,Q.Cg)([(0,X.EVk)("QuestTaskSetup",et.Y.quest)],wl);var Tl,Sl=z(37016),Al=z(1717),Cl=z(90817);!function(q){q.RulesProgressData="RULES_PROGRESS_DATA",q.RulesModuleEnabled="RULES_MODULE_ENABLED",q.RulesDescriptionKey="RULES_DESCRIPTION_KEY",q.RulesDescriptionArgs="RULES_DESCRIPTION_ARGS",q.RulesShowHelperDialogCallback="RULES_SHOW_HELPER_DIALOG_CALLBACK",q.RulesShowCompleteNowButton="RULES_SHOW_COMPLETE_NOW_BUTTON",q.RulesTooltipArgs="RULES_TOOLTIP_ARGS",q.RulesTooltipCTA="RULES_TOOLTIP_CTA",q.RulesTooltipsEnabled="RULES_TOOLTIPS_ENABLED",q.RulesIconAssetData="RULES_ICON_ASSET_DATA",q.RulesRankIconText="RULES_RANK_ICON_TEXT",q.RulesLevelIconText="RULES_LEVEL_ICON_TEXT",q.RulesProgressPercent="RULES_PROGRESS_PERCENT",q.RulesProgressBarStartValue="RULES_PROGRESS_BAR_START_VALUE",q.RulesProgressBarTargetValue="RULES_PROGRESS_BAR_TARGET_VALUE",q.RulesProgressIsComplete="RULES_PROGRESS_IS_COMPLETE",q.RulesCompletedCountDisplay="RULES_COMPLETED_COUNT_DISPLAY",q.RulesComplete="RULES_ALL_COMPLETE",q.RulesPriorityHelperCallback="RULES_PRIORITY_HELPER_CALLBACK",q.RulesWhiteGloveScreenShowing="RULES_WHITE_GLOVE_SCREEN_SHOWING"}(Tl||(Tl={}));var Ol,Il=z(43579),Dl=z(29891);!function(q){q.RestrictionMetNootDialogue1="RestrictionMetNootDialogue1",q.RestrictionMetStartUnlockAnimation="RestrictionMetStartUnlockAnimation",q.RestrictionMetUnlockAnimationPlaying="RestrictionMetUnlockAnimationPlaying",q.RestrictionMetNootDialogue2="RestrictionMetNootDialogue2",q.RestrictionMetFTUEComplete="RestrictionMetFTUEComplete",q.RestrictionNotMetFillProgressBar="RestrictionNotMetFillProgressBar",q.RestrictionNotMetNootDialogue1="RestrictionNotMetNootDialogue1",q.RestrictionNotMetNootDialogue2="RestrictionNotMetNootDialogue2",q.RestrictionNotMetWaitForNext="RestrictionNotMetWaitForNext",q.RestrictionNotMetPlayerInWhiteGloveScreen="RestrictionNotMetPlayerInWhiteGloveScreen",q.RestrictionNotMetStartUnlockAnimation="RestrictionNotMetStartUnlockAnimation",q.RestrictionNotMetUnlockAnimationPlaying="RestrictionNotMetUnlockAnimationPlaying",q.RestrictionNotMetNootDialogue3="RestrictionNotMetNootDialogue3",q.RestrictionNotMetFTUEComplete="RestrictionNotMetFTUEComplete",q.WGRescueNootDialog1="WG-Rescue-NootDialog1",q.WGRescueNootDialog2="WG-Rescue-NootDialog2",q.WGRescueFTUEComplete="WG-Rescue-FTUEComplete"}(Ol||(Ol={}));const Rl=[Ol.RestrictionMetNootDialogue1,Ol.RestrictionMetStartUnlockAnimation,Ol.RestrictionMetUnlockAnimationPlaying,Ol.RestrictionMetNootDialogue2,Ol.RestrictionMetFTUEComplete],Pl=[Ol.RestrictionNotMetFillProgressBar,Ol.RestrictionNotMetNootDialogue1,Ol.RestrictionNotMetNootDialogue2,Ol.RestrictionNotMetWaitForNext,Ol.RestrictionNotMetPlayerInWhiteGloveScreen],Ml=[Ol.RestrictionNotMetStartUnlockAnimation,Ol.RestrictionNotMetUnlockAnimationPlaying,Ol.RestrictionNotMetNootDialogue3,Ol.RestrictionNotMetFTUEComplete],Nl={[Al.$.Rescue]:[Ol.WGRescueNootDialog1,Ol.WGRescueNootDialog2,Ol.WGRescueFTUEComplete]};class xl{static get instance(){var q;return null!==(q=this._instance)&&void 0!==q?q:this._instance=new xl}constructor(){this._segment=dt.q.instance.prodigy.gameContainer.get("20f-5f67")}isBreadcrumbComplete(q){return dt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_RESTRICTIONS,q)}isWhiteGloveFTUEComplete(q){if(!Nl[q])return!0;switch(q){case Al.$.Rescue:return this.isBreadcrumbComplete(Es.B.BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE);case Al.$.MergeRank:return this.isBreadcrumbComplete(Es.B.BREADCRUMB_WHITE_GLOVE_MERGE_FTUE);case Al.$.Element:return this.isBreadcrumbComplete(Es.B.BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE);case Al.$.Rarity:return this.isBreadcrumbComplete(Es.B.BREADCRUMB_WHITE_GLOVE_RARITY_FTUE);case Al.$.Level:return this.isBreadcrumbComplete(Es.B.BREADCRUMB_WHITE_GLOVE_LEVEL_FTUE);default:return!0}}completeFTUE(q){dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Es.B.FEATURE_RESTRICTIONS,q)}hasFTUEToShow(q,K){const z=this.isBreadcrumbComplete(Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE),Y=this.isBreadcrumbComplete(Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),Q=this.isBreadcrumbComplete(Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE);return q?!z||Y&&!Q:!Y||!Q||!K.every(this.isWhiteGloveFTUEComplete,this)}initializeRestrictionFTUE(q,K,z){if(this.currentRestrictionScreenFTUE)return!1;const Y=this.isBreadcrumbComplete(Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),Q=this.isBreadcrumbComplete(Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE);let X,Z;return q?Y&&!Q?(X=Ml,Z=Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE):(X=Rl,Z=Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE):(X=Pl,Z=Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),!this.isBreadcrumbComplete(Z)&&void 0!==X&&(this.currentRestrictionScreenFTUE={steps:X,currentStepIndex:0,breadcrumb:Z},z.removeAll(this),z.add((()=>{this.currentRestrictionScreenFTUE&&(this.currentRestrictionScreenFTUE.currentStepIndex++,this.playRestrictionScreenStep(K))}),this),this.playRestrictionScreenStep(K),!0)}playRestrictionScreenStep(q){var K;const z=null===(K=this.currentRestrictionScreenFTUE)||void 0===K?void 0:K.steps[this.currentRestrictionScreenFTUE.currentStepIndex];if(this.currentRestrictionScreenFTUE&&z)return q.setValue(z),z===Ol.RestrictionNotMetPlayerInWhiteGloveScreen?(this.completeFTUE(Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),void delete this.currentRestrictionScreenFTUE):z===Ol.RestrictionNotMetFTUEComplete?(this.completeFTUE(Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE),delete this.currentRestrictionScreenFTUE,void this.completeFTUE(Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE)):z===Ol.RestrictionMetFTUEComplete?(this.completeFTUE(Es.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE),void delete this.currentRestrictionScreenFTUE):void 0}initializeWhiteGloveScreenFTUE(q,K,z){const Y=Nl[q];let Q;switch(q){case Al.$.Rescue:Q=Es.B.BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE;break;case Al.$.MergeRank:Q=Es.B.BREADCRUMB_WHITE_GLOVE_MERGE_FTUE;break;case Al.$.Element:Q=Es.B.BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE;break;case Al.$.Rarity:Q=Es.B.BREADCRUMB_WHITE_GLOVE_RARITY_FTUE;break;case Al.$.Level:Q=Es.B.BREADCRUMB_WHITE_GLOVE_LEVEL_FTUE;break;default:return}!this.isBreadcrumbComplete(Q)&&Y&&(this.currentWhiteGloveScreenFTUE={steps:Y,currentStepIndex:0,breadcrumb:Q},z.add((()=>{this.currentWhiteGloveScreenFTUE&&(this.currentWhiteGloveScreenFTUE.currentStepIndex++,this.playWhiteGloveScreenStep(K))})),this.playWhiteGloveScreenStep(K))}playWhiteGloveScreenStep(q){var K;const z=null===(K=this.currentWhiteGloveScreenFTUE)||void 0===K?void 0:K.steps[this.currentWhiteGloveScreenFTUE.currentStepIndex];if(this.currentWhiteGloveScreenFTUE&&z)if(q.setValue(z),z!==Ol.WGRescueNootDialog1){if(z!==Ol.WGRescueNootDialog2)return z===Ol.WGRescueFTUEComplete?(this.completeFTUE(this.currentWhiteGloveScreenFTUE.breadcrumb),void delete this.currentWhiteGloveScreenFTUE):void 0;this._segment.whiteGlove.sendRestrictionFTUEEvent("Noot explains paid section")}else this._segment.whiteGlove.sendRestrictionFTUEEvent("Noot explains free section")}}var Ll;!function(q){q.WHITE_GLOVE_PET_COUNT_PAID_HEADER="WHITE_GLOVE_PET_COUNT_PAID_HEADER",q.WHITE_GLOVE_PET_COUNT_PAID_INFO_SINGLE="WHITE_GLOVE_PET_COUNT_PAID_INFO_SINGLE",q.WHITE_GLOVE_PET_COUNT_PAID_INFO_MULTI="WHITE_GLOVE_PET_COUNT_PAID_INFO_MULTI",q.WHITE_GLOVE_PET_COUNT_FREE_HEADER="WHITE_GLOVE_PET_COUNT_FREE_HEADER",q.WHITE_GLOVE_PET_COUNT_FREE_INFO_SINGLE="WHITE_GLOVE_PET_COUNT_FREE_INFO_SINGLE",q.WHITE_GLOVE_PET_COUNT_FREE_INFO_MULTI="WHITE_GLOVE_PET_COUNT_FREE_INFO_MULTI",q.WHITE_GLOVE_HELPER_HEADER="WHITE_GLOVE_HELPER_HEADER",q.WHITE_GLOVE_HELPER_INFO_SINGLE="WHITE_GLOVE_HELPER_INFO_SINGLE",q.WHITE_GLOVE_HELPER_INFO_MULTI="WHITE_GLOVE_HELPER_INFO_MULTI",q.WHITE_GLOVE_PET_MERGE_FREE_INFO_MULTI="WHITE_GLOVE_PET_MERGE_FREE_INFO_MULTI",q.WHITE_GLOVE_PET_MERGE_FREE_INFO_SINGLE="WHITE_GLOVE_PET_MERGE_FREE_INFO_SINGLE",q.WHITE_GLOVE_PET_MERGE_FREE_HEADER="WHITE_GLOVE_PET_MERGE_FREE_HEADER",q.WHITE_GLOVE_RESTRICTION_TITLE="WHITE_GLOVE_RESTRICTION_TITLE"}(Ll||(Ll={}));class kl{constructor(){this.onRestrictionNeedsRechecking=new X.HN0,this.showInsufficientCurrencyTooltip=new X.HN0,this._isInPurchaseOrMemberFlow=!1,this._isWhiteGloveScreenOpen=!1,this.onWhiteGloveScreenOpened=new X.HN0,this.onWhiteGloveScreenClosed=new X.HN0}get isWhiteGloveScreenOpen(){return this._isWhiteGloveScreenOpen}cleanup(){this.onRestrictionNeedsRechecking.dispose(),this.showInsufficientCurrencyTooltip.dispose(),this.onWhiteGloveScreenOpened.dispose(),this.onWhiteGloveScreenClosed.dispose()}getHelperCallback(q,K,z){if(!Do(K,(0,Kt.G)(Io)))return;let Y;switch(K){case Al.$.MergeRank:Y=this.getMergeRankCallbackHelper(z);break;case Al.$.Rescue:Y=this.getRescueCallbackHelper(q,z);break;case Al.$.EvolutionTier:case Al.$.Element:case Al.$.Level:case Al.$.Rarity:default:return}return()=>(0,Q.sH)(this,void 0,void 0,(function*(){this._isWhiteGloveScreenOpen||(this._isWhiteGloveScreenOpen=!0,this.onWhiteGloveScreenOpened.dispatch(),this._segment.whiteGlove.sendRestrictionFTUEEvent("White Glove Service screen opened"),yield Y())}))}getMergeRankCallbackHelper(q){return()=>(0,Q.sH)(this,void 0,void 0,(function*(){const[K,z]=q(),Y=z-K,Q=this._localizer.getText(1===Y?Ll.WHITE_GLOVE_PET_MERGE_FREE_INFO_SINGLE:Ll.WHITE_GLOVE_PET_MERGE_FREE_INFO_MULTI,Y.toString());this.createHelperScreen(Gt.l.PetMergeRestrictionHelperContent,{FREE_HEADER_TEXT:this._localizer.getText(Ll.WHITE_GLOVE_PET_MERGE_FREE_HEADER),FREE_INFO_TEXT:Q}).catch(X.RQr.createHandler("Error loading access rule helper screen for merge rank")),this._segment.whiteGlove.sendHelperScreenOpenEvent(Al.$.MergeRank,{})}))}getRescueCallbackHelper(q,K){return()=>(0,Q.sH)(this,void 0,void 0,(function*(){var z;const Y=q?yield this._dynamicStoreNetworkHandler.getRestrictionOffer(q):void 0,Q=yield this.buildPetPurchaseInfo(Y,K,q),{purchaseContext:Z,injectedValues:J}=Q,{petsToPurchase:tt}=Q;Z.screen=yield this.createHelperScreen(Gt.l.PetCountRestrictionHelperContent,J,tt.length>0),Z.buildPurchaseInfo=this.buildPetPurchaseInfo.bind(this);const et=X.Uoy.getInjectedValue(Z.screen,"TUTORIAL_STRING_STATE"),it=X.Uoy.getInjectedValue(Z.screen,"TUTORIAL_ADVANCE_SIGNAL");et&&it&&xl.instance.initializeWhiteGloveScreenFTUE(Al.$.Rescue,et,it.onDispatch);const st=yield Po.a.isEligibleForFreePetPack();this._segment.whiteGlove.sendHelperScreenOpenEvent(Al.$.Rescue,{offer_data:{pets:tt.map((q=>{var K,z,Y;return{type:"pet",id:q,name:null!==(Y=null===(z=null===(K=ae.t.getItem("pet",q))||void 0===K?void 0:K.data)||void 0===z?void 0:z.name)&&void 0!==Y?Y:""}})),cost:null!==(z=null==Y?void 0:Y.metadata.cost)&&void 0!==z?z:0}},st),dt.q.instance.game.broadcaster.addAppListener(Xn.ib.ItemReceived,(z=>{if("pet"===z.type){if(this._isInPurchaseOrMemberFlow)return;this.recheckRequirementsAndUpdateScreens(q,K,Z,tt.length)}}),this),Z.screen.onDestroy.addOnce((()=>{dt.q.instance.game.broadcaster.removeAppListener(Xn.ib.ItemReceived,this)}))}))}buildPetPurchaseInfo(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){var Y,X;const Z=yield Po.a.isEligibleForFreePetPack(),[J,tt]=K(),et=[],it=dt.q.instance.prodigy.gameContainer.get("bec-c6b4");null===(Y=null==q?void 0:q.onComplete)||void 0===Y||Y.forEach((q=>{q.type===Dl.s.GOT_PET&&et.push(...q.data.id)}));const st=et.length,nt=this._localizer.getText(1===st?Ll.WHITE_GLOVE_PET_COUNT_FREE_INFO_SINGLE:Ll.WHITE_GLOVE_PET_COUNT_FREE_INFO_MULTI,st),at=this._localizer.getText(1===st?Ll.WHITE_GLOVE_PET_COUNT_PAID_INFO_SINGLE:Ll.WHITE_GLOVE_PET_COUNT_PAID_INFO_MULTI,st),rt={featureRequirementName:null!=z?z:"unknown feature",offer:q},ot=null!==(X=null==q?void 0:q.metadata.cost)&&void 0!==X?X:0,ht={MAGICOIN_COST:` ${ot}`,PET_DATA_ARRAY:et.map((q=>{var K,z,Y;return{PET_RARITY:null!==(Y=null===(z=null===(K=ae.t.getItem("pet",q))||void 0===K?void 0:K.data)||void 0===z?void 0:z.rarity)&&void 0!==Y?Y:fo.E.Common,SHOW_ELEMENT_ICON:!0,PET_ID:q}})),FREE_HEADER_TEXT:this._localizer.getText(Ll.WHITE_GLOVE_PET_COUNT_FREE_HEADER),FREE_INFO_TEXT:nt,PAID_HEADER_TEXT:this._localizer.getText(Ll.WHITE_GLOVE_PET_COUNT_PAID_HEADER),PAID_INFO_TEXT:at,SHOW_MC_BUTTON:!it.isHardCurrencyMemberLocked(ot)&&!Z,SHOW_MEMBER_BUTTON:it.isHardCurrencyMemberLocked(ot)&&!Z,ELIGIBLE_FOR_FREE_PET_PACK:Z,PURCHASE_PETS_CALLBACK:Z?()=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.claimFreePetPack(rt,et)})):this.getPurchaseOrConvertCallback(rt,this.purchasePetPack.bind(this,rt,et),K)};return{purchaseContext:rt,injectedValues:ht,petsToPurchase:et}}))}purchasePetPack(q,K){const z=q.offer;if(!z||!q.screen)return;this._isInPurchaseOrMemberFlow=!0,Ht.d.updateInjectedValues(q.screen,{SHOW_LOADING_SPINNER:!0});const Y=this._segment.whiteGlove.beginTransaction();this._dynamicStoreNetworkHandler.purchaseItem(z.id).then((()=>(0,Q.sH)(this,void 0,void 0,(function*(){var Q,Z;if(this._dynamicStoreQuestManager.updateQuestProgress().catch(X.RQr.createHandler("RestrictionHelper: Error updating quest progress after purchasing pets")),!q.screen||q.screen.isDestroyed)return;q.screen.destroyDeferred(),q.screen=void 0,this._segment.whiteGlove.sendRestrictionFTUEEvent("Player uses White Glove Service");const{offerId:J,transactionId:tt}=this._segment.whiteGlove.sendBundlePurchaseEvent(q.featureRequirementName,null!==(Z=null===(Q=q.offer)||void 0===Q?void 0:Q.metadata.displayName)&&void 0!==Z?Z:"unknown offer",K,z.metadata.currency,z.metadata.cost);q.offerId=J,q.transactionId=tt,Y.flush({source_type:Ei.C.WhiteGloveService,source_id:q.offerId,transaction_id:q.transactionId,instance_type:Ti.N.WhiteGloveOffer,instance_id:q.offerId,sink_type:Ei.C.WhiteGloveService,sink_id:q.offerId}),Po.a.tryResetPlayerLastUnmetBattleRequirements(),yield new Gs.I(null,null).doTask({itemDrops:K.map((q=>({type:"pet",ID:q,N:1}))),isFake:!0}).catch(X.RQr.createHandler("RestrictionHelper: Failed to show got item for purchased pets")),this._isInPurchaseOrMemberFlow=!1,this.onRestrictionNeedsRechecking.dispatch()})))).catch(X.RQr.createHandler("RestrictionHelper: Error purchasing pets"))}getPurchaseOrConvertCallback(q,K,z){return()=>(0,Q.sH)(this,void 0,void 0,(function*(){var Y,Q;const{offer:X,screen:Z}=q,[J,tt]=z(),et=dt.q.instance.prodigy.gameContainer.get("bec-c6b4"),it=this.getPostPurchaseBalance(null!==(Y=null==X?void 0:X.metadata.cost)&&void 0!==Y?Y:0,null!==(Q=null==X?void 0:X.metadata.currency)&&void 0!==Q?Q:27);if(it>=0&&!et.isHardCurrencyMemberLocked(it))return void K();const st=null==Z?void 0:Z.findComponentInChildren(Br.n);if(!et.isHardCurrencyMemberLocked(it)&&!(yield this.shouldAttemptConversion()))return void this.showNotEnoughCurrencyTooltip();const nt=tt-J;null==st||st.enableAutomaticUpdates(!1),this._isInPurchaseOrMemberFlow=!0,yield this.openUnifiedConversionFlow(-it,q),null==st||st.enableAutomaticUpdates(!0,!0),this._isInPurchaseOrMemberFlow=!1,this.recheckRequirementsAndUpdateScreens(q.featureRequirementName,z,q,nt)}))}shouldAttemptConversion(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=q.hasMembership(),z=(yield q.getMembershipUpsellData()).upgradeOptions.length>0,Y=!K||z;return!q.isPlayingAtSchool()&&(Y||(0,Kt.G)(_n.l).enabled)&&zs.P.shouldUseUnifiedConversionFlow(un.o.FunnelNotEnoughCurrency)}))}getPostPurchaseBalance(q,K){return dt.q.instance.prodigy.gameContainer.get("bec-c6b4").getBalance(K)-q}openUnifiedConversionFlow(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){return new Promise((z=>{const Y={type:"Restricted-Battle",category:"Restrictions",contentId:K.featureRequirementName,adType:Ys.R.Contextual,adVersion:zs.P.getAdVersionFromTriggerCategory("Restrictions")},Q=this._segment.purchase.sendFunnelTriggerImpression(Y);Q&&this._segment.purchase.sendFunnelStart(Y,Q);dt.q.instance.prodigy.open.unifiedConversionFlow((()=>{z()}),{conversionFunnelName:un.o.FunnelNotEnoughCurrency},Us.k.RestrictionsPurchase,{[ms.FK.OtpMissingMagicoin]:q})}))}))}showNotEnoughCurrencyTooltip(){this.showInsufficientCurrencyTooltip.dispatch()}createHelperScreen(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K={},z=!1){const Y=dt.q.instance.prodigy.open.prefabMenu(Gt.l.RestrictionHelperBaseScreen,void 0,!0,!0,!1,{CONTENT_GUID:q,CONTENT_INJECTION_VALUES:K,CURRENCY_DISPLAY_ID:z?27:void 0,HELPER_SCREEN_HEADER:this._localizer.getText(Ll.WHITE_GLOVE_HELPER_HEADER),HELPER_SCREEN_INFO:this._localizer.getText(z?Ll.WHITE_GLOVE_HELPER_INFO_MULTI:Ll.WHITE_GLOVE_HELPER_INFO_SINGLE),SHOW_LOADING_SPINNER:!1,SHOW_INSUFFICIENT_CURRENCY_TOOLTIP_SIGNAL:this.showInsufficientCurrencyTooltip}),Q=(yield Y.onPrefabLoaded.asPromise())[0];return Q.onDestroy.addOnce((()=>{this._isWhiteGloveScreenOpen=!1,this.onWhiteGloveScreenClosed.dispatch()})),Q}))}recheckRequirementsAndUpdateScreens(q,K,z,Y){const[Z,J]=K(),tt=J-Z;tt!==Y&&this._dynamicStoreNetworkHandler.getRestrictionOffer(q).then((Y=>(0,Q.sH)(this,void 0,void 0,(function*(){var Q,X,Z;if(!Y||tt<=0)return Po.a.tryResetPlayerLastUnmetBattleRequirements(),null===(Q=z.screen)||void 0===Q||Q.destroyDeferred(),z.screen=void 0,void this.onRestrictionNeedsRechecking.dispatch();const{purchaseContext:J,injectedValues:et}=yield z.buildPurchaseInfo(Y,K,q);J.screen=z.screen;const it=null===(Z=null===(X=z.screen)||void 0===X?void 0:X.findComponentsInChildren(Wo.B).find((q=>"CONTENT_INJECTION_VALUES"===q.id)))||void 0===Z?void 0:Z.GameObject;it&&(Ht.d.updateInjectedValues(it,et),this.onRestrictionNeedsRechecking.dispatch())})))).catch(X.RQr.createHandler("Error regenerating restriction offer"))}claimFreePetPack(q,K){this.purchasePetPack(q,K)}}(0,Q.Cg)([(0,Qi.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],kl.prototype,"_localizer",void 0),(0,Q.Cg)([(0,Qi.b)("73c-5410"),(0,Q.Sn)("design:type",jr.v)],kl.prototype,"_dynamicStoreNetworkHandler",void 0),(0,Q.Cg)([(0,Qi.b)("668-8a41"),(0,Q.Sn)("design:type",Sd.s)],kl.prototype,"_dynamicStoreQuestManager",void 0),(0,Q.Cg)([(0,Qi.b)("11f-118a"),(0,Q.Sn)("design:type",Object)],kl.prototype,"_featureRequirements",void 0),(0,Q.Cg)([(0,Qi.b)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],kl.prototype,"_segment",void 0);Al.$.Rescue,Al.$.EvolutionTier,Al.$.Element,Al.$.Level,Al.$.MergeRank,Al.$.Rarity,Al.$.Rescue,Al.$.EvolutionTier,Al.$.Element,Al.$.Level,Al.$.MergeRank,Al.$.Rarity,Al.$.Rescue,Al.$.EvolutionTier,Al.$.Element,Al.$.Level,Al.$.MergeRank,Al.$.Rarity;let Bl=class extends Yi.z{constructor(){super(...arguments),this._animatedFillDelayMS=500,this._DEFAULT_NUM_RULES_TO_DISPLAY=1,this._restrictionHelper=new kl,this._previousProgressValues=[]}create(){super.create();const q=this.getInjectedValue(Ro.NumRulesToDisplay);this._previousProgressValues.length=0;for(let K=0;K{this.bindContext().catch(X.RQr.createHandler("[AccessRulesDataProvider] Unable to rebind context after helper dialog"))})),this._restrictionHelper.onWhiteGloveScreenOpened.add((()=>{Ht.d.updateInjectedValues(this.gameObject,{[Tl.RulesWhiteGloveScreenShowing]:!0})})),this._restrictionHelper.onWhiteGloveScreenClosed.add((()=>{Ht.d.updateInjectedValues(this.gameObject,{[Tl.RulesWhiteGloveScreenShowing]:!1})}))}destroy(){this._restrictionHelper.cleanup(),super.destroy()}bindContext(){return(0,Q.sH)(this,arguments,void 0,(function*(q=!1){const K=this.getInjectedValue(Ro.NumRulesToDisplay);Ht.d.updateInjectedValues(this.gameObject,this.getAccessRulesData(this.getFeatureRequirement(),null!=K?K:this._DEFAULT_NUM_RULES_TO_DISPLAY,!q))}))}getFeatureRequirement(){return this._selectedMode=this.getInjectedValue(Ro.SelectedMode),Il.wS[this._selectedMode]}getAccessRulesData(q,K,z=!1){var Y,Q,Z,J,tt;if(!X.Aq$.isDefined(q)||!this.GameObject.activeInHierarchy)return{};let et,it,st=0,nt=[];if("number"==typeof q){const K=dt.q.instance.prodigy.gameContainer.get("11f-118a").getFeatureRequirementAsset(q).data;nt=K.requirements,et=K.name}else nt=null!==(Y=null==q?void 0:q.requirements)&&void 0!==Y?Y:[],et=q.name;const at=Math.min(K,nt.length),rt=new Array(at).fill({RULES_MODULE_ENABLED:!1});let ot=0;for(let dt=0;dt=K);dt++){const q=nt[dt].kennel;if(!X.Aq$.isDefined(null==q?void 0:q.petCount))continue;const K=Po.a.getRuleType(q),z=()=>{const z=this.getCurrentProgressCountForRuleType(K,q);return[Math.min(z,q.petCount),q.petCount]},[Y,at]=z(),ht=Y===at;ht&&st++;const ct=this.getIconAssetData(K,q),lt=K===Al.$.Rescue?[]:[Po.a.getRuleDescriptionArgs(K,q)],ut=this._restrictionHelper.getHelperCallback(et,K,z);ht||it&&K!==Al.$.Rescue||(it=ut);let ft=!1;et&&(ht?this._loggedInPlayer.player.completedRestrictionProgressBarsSeen.includes(et)||(ft=!0,this._loggedInPlayer.player.completedRestrictionProgressBarsSeen.push(et)):this._loggedInPlayer.player.inProgressRestrictionsSeen.includes(et)||(ft=!0,this._loggedInPlayer.player.inProgressRestrictionsSeen.push(et)));const bt=[this._previousProgressValues[ot],at,!1],pt=[Y,at,ft,this._animatedFillDelayMS];rt[ot]={[Tl.RulesModuleEnabled]:!0,[Tl.RulesProgressIsComplete]:ht,[Tl.RulesProgressPercent]:Y/at,[Tl.RulesProgressBarStartValue]:bt,[Tl.RulesProgressBarTargetValue]:pt,[Tl.RulesIconAssetData]:[null!==(Q=null==ct?void 0:ct.atlas)&&void 0!==Q?Q:"",null!==(Z=null==ct?void 0:ct.frame)&&void 0!==Z?Z:""],[Tl.RulesDescriptionKey]:Po.a.getRuleDescriptionKey(q),[Tl.RulesDescriptionArgs]:[q.petCount.toString(),...lt],[Tl.RulesTooltipArgs]:lt,[Tl.RulesRankIconText]:K===Al.$.MergeRank?null===(J=q.mergeRank)||void 0===J?void 0:J.toString():void 0,[Tl.RulesLevelIconText]:K===Al.$.Level?null===(tt=q.level)||void 0===tt?void 0:tt.toString():void 0,[Tl.RulesTooltipCTA]:this.getRuleGoButtonCTA(K),[Tl.RulesShowHelperDialogCallback]:ut,[Tl.RulesShowCompleteNowButton]:!ht&&X.Aq$.isDefined(ut)},this._previousProgressValues[ot]=Y,ot++}const ht=st>=ot,ct=Cl.gz.initialized;return Object.assign(Object.assign(Object.assign(Object.assign({[Tl.RulesCompletedCountDisplay]:`${st}/${ot}`,[Tl.RulesProgressData]:rt,[Tl.RulesPriorityHelperCallback]:it},z&&{EncounterBattleRequirementsMet:ht}),ht&&{[Tl.RulesComplete]:this._selectedMode}),ct&&{[Tl.RulesTooltipsEnabled]:!1}),{[Tl.RulesWhiteGloveScreenShowing]:this._restrictionHelper.isWhiteGloveScreenOpen})}getCurrentProgressCountForRuleType(q,K){let z=this._loggedInPlayer.player.kennel.getPets();switch(q){case Al.$.EvolutionTier:z=z.filter((q=>{var z,Y,Q,X,Z;return(null!==(X=null===(Q=null===(Y=null===(z=ae.t.getItem("pet",q.ID))||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.evolution)||void 0===Q?void 0:Q.tier)&&void 0!==X?X:0)>=(null!==(Z=null==K?void 0:K.evolutionTier)&&void 0!==Z?Z:0)}));break;case Al.$.Element:z=z.filter((q=>{var z,Y;return(null===(Y=null===(z=ae.t.getItem("pet",q.ID))||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.affinity)===(null==K?void 0:K.affinity)}));break;case Al.$.Level:z=z.filter((q=>{var z,Y;return(null!==(z=q.level)&&void 0!==z?z:0)>=(null!==(Y=null==K?void 0:K.level)&&void 0!==Y?Y:0)}));break;case Al.$.MergeRank:z=z.filter((q=>{var z,Y,Q,X;return(null!==(Q=uo.P8.getPetDisplayMergeRank(null!==(z=q.ID)&&void 0!==z?z:0,null!==(Y=q.uniqueID)&&void 0!==Y?Y:""))&&void 0!==Q?Q:Sl.qd.MIN)>=(null!==(X=null==K?void 0:K.mergeRank)&&void 0!==X?X:0)}));break;case Al.$.Rarity:z=z.filter((q=>{var z,Y;return(null===(Y=null===(z=ae.t.getItem("pet",q.ID))||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.rarity)===(null==K?void 0:K.rarity)}));break;case Al.$.Rescue:}return(null==K?void 0:K.unique)&&(z=z.filter(((q,K,z)=>z.findIndex((K=>K.ID===q.ID))===K))),z.length}getIconAssetData(q,K){var z;switch(q){case Al.$.EvolutionTier:return xo.evolution;case Al.$.Element:if(null==K?void 0:K.affinity)return xo[K.affinity];case Al.$.Level:return xo.level;case Al.$.Rescue:return xo.rescue;case Al.$.MergeRank:return xo.mergeRank;case Al.$.Rarity:const q=fo.E[null!==(z=null==K?void 0:K.rarity)&&void 0!==z?z:0].toLowerCase();if(null==K?void 0:K.rarity)return xo[q];default:return null}}getRuleGoButtonCTA(q){switch(q){case Al.$.MergeRank:case Al.$.Level:case Al.$.EvolutionTier:return()=>{dt.q.instance.prodigy.prefabFactory.closeAllTooltips(),Ht.d.updateInjectedValues(this.gameObject,{[Tl.RulesTooltipsEnabled]:!1}),dt.q.instance.prodigy.open.pets((()=>{Ht.d.updateInjectedValues(this.gameObject,{[Tl.RulesTooltipsEnabled]:!0}),this.bindContext().catch(X.RQr.createHandler("[AccessRulesDataProvider] Unable to rebind context after pet book close"))}))};case Al.$.Rescue:case Al.$.Element:case Al.$.Rarity:default:return()=>{dt.q.instance.prodigy.prefabFactory.closeAllTooltips(),dt.q.instance.prodigy.open.menuCloseAll()}}}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Bl.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Bl.prototype,"_bindOnCreate",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Bl.prototype,"_animatedFillDelayMS",void 0),Bl=(0,Q.Cg)([(0,X.EVk)("AccessRulesDataProvider",X.YH6.injection)],Bl);let Ul=class extends Bl{getFeatureRequirement(){return this.getInjectedValue("EncounterBattleRequirements")}setBattleRulesTooltipsEnabled(q){Ht.d.updateInjectedValues(this.gameObject,{[Tl.RulesTooltipsEnabled]:q})}};var Fl;Ul=(0,Q.Cg)([(0,X.EVk)("BattleRulesDataProvider",X.YH6.injection)],Ul),function(q){q.BossNameText="BOSS_NAME_TEXT",q.WeaknessIcon="WEAKNESS_ICON",q.RestrictionsBossImage="RESTRICTIONS_BOSS_IMAGE",q.RestrictionsBackgroundImage="RESTRICTIONS_BACKGROUND_IMAGE",q.RestrictionsBannerImage="RESTRICTIONS_BANNER_IMAGE",q.RestrictionsBossName="RESTRICTIONS_BOSS_NAME"}(Fl||(Fl={}));const Gl={14:As.q.Restriction_banner_gerald,16:As.q.Restriction_banner_icewyrm,13:As.q.Restriction_banner_cebollini,15:As.q.Restriction_banner_oldone,12:As.q.Restriction_banner_nastycloud,67:As.q.Restriction_banner_cloakedfire,68:As.q.Restriction_banner_cloakedice,69:As.q.Restriction_banner_cloakedplant,70:As.q.Restriction_banner_cloakedstorm,71:As.q.Restriction_banner_cloakedwater,72:As.q.Restriction_banner_cloakedshadow,73:As.q.Restriction_banner_cloaked,37:As.q.Restriction_banner_pippet_endgame,54:As.q.Restriction_banner_puppetmaster_illusion_endgame,55:As.q.Restriction_banner_puppetmaster_illusion_endgame,56:As.q.Restriction_banner_puppetmaster_illusion_endgame,57:As.q.Restriction_banner_puppetmaster_illusion_endgame,58:As.q.Restriction_banner_puppetmaster_illusion_endgame,59:As.q.Restriction_banner_puppetmaster},jl={59:As.q.Restriction_banner_puppetmaster_endgame},$l={59:As.q.Restriction_banner_BG_puppetmaster},Hl={[Yt.A_.BONFIRE]:As.q.Restriction_banner_BG_bonfire,[Yt.A_.FOREST]:As.q.Restriction_banner_BG_firefly,[Yt.A_.SHIPWRECK]:As.q.Restriction_banner_BG_shipwreck,[Yt.A_.SHIVERCHILL]:As.q.Restriction_banner_BG_shiverchill,[Yt.A_.SKYWATCH]:As.q.Restriction_banner_BG_skywatch,[Yt.A_.ACADEMY]:As.q.Restriction_banner_BG_academy,[Yt.A_.BONFIREHARD]:As.q.Restriction_banner_BG_bonfire,[Yt.A_.FORESTHARD]:As.q.Restriction_banner_BG_firefly,[Yt.A_.SHIPWRECKHARD]:As.q.Restriction_banner_BG_shipwreck,[Yt.A_.SHIVERCHILLHARD]:As.q.Restriction_banner_BG_shiverchill,[Yt.A_.SKYWATCHHARD]:As.q.Restriction_banner_BG_skywatch},Vl={[Yt.A_.BONFIRE]:As.q.Restriction_banner_wave_bonfire,[Yt.A_.FOREST]:As.q.Restriction_banner_wave_firefly,[Yt.A_.SHIPWRECK]:As.q.Restriction_banner_wave_shipwreck,[Yt.A_.SHIVERCHILL]:As.q.Restriction_banner_wave_shiverchill,[Yt.A_.SKYWATCH]:As.q.Restriction_banner_wave_skywatch,[Yt.A_.ACADEMY]:As.q.Restriction_banner_wave_puppetmaster,[Yt.A_.BONFIREHARD]:As.q.Restriction_banner_wave_hardmode,[Yt.A_.FORESTHARD]:As.q.Restriction_banner_wave_hardmode,[Yt.A_.SHIPWRECKHARD]:As.q.Restriction_banner_wave_hardmode,[Yt.A_.SHIVERCHILLHARD]:As.q.Restriction_banner_wave_hardmode,[Yt.A_.SKYWATCHHARD]:As.q.Restriction_banner_wave_hardmode},Wl={14:As.q.Restriction_banner_title_gerald,16:As.q.Restriction_banner_title_icewyrm,13:As.q.Restriction_banner_title_cebollini,15:As.q.Restriction_banner_title_oldone,12:As.q.Restriction_banner_title_nastycloud,67:As.q.Restriction_banner_title_cloakedwizard,68:As.q.Restriction_banner_title_cloakedwizard,69:As.q.Restriction_banner_title_cloakedwizard,70:As.q.Restriction_banner_title_cloakedwizard,71:As.q.Restriction_banner_title_cloakedwizard,72:As.q.Restriction_banner_title_cloakedwizard,73:As.q.Restriction_banner_title_cloakedwizard,37:As.q.Restriction_banner_title_pippet,54:As.q.Restriction_banner_title_puppetmaster,55:As.q.Restriction_banner_title_puppetmaster,56:As.q.Restriction_banner_title_puppetmaster,57:As.q.Restriction_banner_title_puppetmaster,58:As.q.Restriction_banner_title_puppetmaster,59:As.q.Restriction_banner_title_puppetmaster};let ql=class extends Yi.z{create(){super.create(),this._bindOnCreate&&this.bindContext().catch(X.RQr.createHandler("[BossAssetDataProvider] Unable to bind context"))}bindContext(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z;const Y=this.getInjectedValue(Ro.SelectedBossID),Q=dt.q.instance.prodigy.world.getCurrentZone(),Z=ae.t.getItem("boss",parseInt(Y)),J=null===(q=null==Z?void 0:Z.data)||void 0===q?void 0:q.affinity,tt=dt.q.instance.prodigy.gameContainer.get("56a-cc39").constants.elementalMultiplier.find((q=>q.name===J)),et=null==tt?void 0:tt.weakness,it=[Yt.A_.ACADEMY,Yt.A_.ACADEMYHARD,Yt.A_.ACADEMYEXPERT].includes(Q)&&X.Aq$.isDefined(jl[Y])?jl[Y]:Gl[Y],st=[Yt.A_.ACADEMY,Yt.A_.ACADEMYHARD,Yt.A_.ACADEMYEXPERT].includes(Q)&&X.Aq$.isDefined($l[Y])?$l[Y]:Hl[Q];Ht.d.updateInjectedValues(this.gameObject,{[Fl.BossNameText]:null!==(z=null===(K=null==Z?void 0:Z.data)||void 0===K?void 0:K.name)&&void 0!==z?z:"",[Fl.WeaknessIcon]:[ti._.Ui_battle_revamp_json,`icon-mini-element-${et}`],[Fl.RestrictionsBossImage]:it,[Fl.RestrictionsBackgroundImage]:st,[Fl.RestrictionsBannerImage]:Vl[Q],[Fl.RestrictionsBossName]:Wl[Y]})}))}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ql.prototype,"_bindOnCreate",void 0),ql=(0,Q.Cg)([(0,X.EVk)("BossAssetDataProvider",X.YH6.injection)],ql);let Kl=class extends X.uAl{constructor(){super(...arguments),this.enable=!0,this._modifiedInput=!1}run(){const q=dt.q.instance.game;q.input.enabled=this.enable,this._modifiedInput=!0,this.enable||q.input.reset(),this.enable=!this.enable}enableInput(){(0,Nd.QQ)(dt.q.instance.game,!0),this._modifiedInput=!0}disableInput(){(0,Nd.QQ)(dt.q.instance.game,!1),this._modifiedInput=!0}destroy(){this._modifiedInput&&this.enableInput(),super.destroy()}};var zl;(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Kl.prototype,"enable",void 0),Kl=(0,Q.Cg)([(0,X.EVk)("EnableInput",et.Y.input)],Kl),function(q){q.Add="Add",q.Change="Change"}(zl||(zl={}));let Yl=class extends X.uAl{constructor(){super(...arguments),this.onOpenDetailedSelection=new X.HN0}create(){super.create(),this._changePetButton.onClick.add((()=>{this.openDetailedSelection()})),this.updatePanelContents().catch(X.RQr.createHandler("YourTeamPetSelectorComponent: Failed to render the your team panel"))}updatePanelContents(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.setupEquippedPets()}))}savePlayerTeam(){this._currentPlayer.player.kennel.updated=!0,this._currentPlayer.player.forceSaveCharacter()}setupEquippedPets(){const q=this._currentPlayer.player.kennel.petTeam.filter((q=>!(q instanceof Uh.a)));this.setupEquippedPet(q[0],this._equippedPetLeft),this.setupEquippedPet(q[1],this._equippedPetRight)}setupEquippedPet(q,K){q?(this.setupPetCard(q,K).catch(X.RQr.createHandler("YourTeamPetSelectorComponent: Failed to render a pet card for a currently equipped pet")),K.active=!0):K.active=!1}setupPetCard(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z,Y,Q,X,Z,J,tt,et,it,st;const nt=ae.t.getItem("pet",q.data.ID);if(K.children.length>0){const Z={PET_ID:q.data.ID,PET_DATA:q.data,NAME:null!==(z=q.data.nickname)&&void 0!==z?z:re.J.getLocalizationNameKey(null==nt?void 0:nt.data),LEVEL:q.data.level,MERGE_RANK:uo.P8.getPetDisplayMergeRank(null!==(Y=q.data.ID)&&void 0!==Y?Y:0,null!==(Q=q.data.uniqueID)&&void 0!==Q?Q:""),ICON:Ts.E.getIconForType("pet",null!==(X=q.data.ID)&&void 0!==X?X:0),SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1};return void Ht.d.updateInjectedValues(K,Z)}const at={PET_ID:null!==(Z=q.data.ID)&&void 0!==Z?Z:0,PET_DATA:q.data,NAME:null!==(J=q.data.nickname)&&void 0!==J?J:re.J.getLocalizationNameKey(null==nt?void 0:nt.data),LEVEL:null!==(tt=q.data.level)&&void 0!==tt?tt:0,MERGE_RANK:uo.P8.getPetDisplayMergeRank(null!==(et=q.data.ID)&&void 0!==et?et:0,null!==(it=q.data.uniqueID)&&void 0!==it?it:""),ICON:Ts.E.getIconForType("pet",null!==(st=q.data.ID)&&void 0!==st?st:0),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_ON_TEAM:!1,SHOW_GUIDE_HAND:!1,INPUT_ENABLED:!1,SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1},rt=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.OwnedPetCardInjectionConfiguredMergeRank,at);if(K.isDestroyed)return void rt.destroy();const ot=rt.transform;ot.setPivot(.5,.5),ot.setAnchorMin(0,0),ot.setAnchorMax(0,0),rt.name=`pet-${q.data.ID}`,rt.parent=K}))}openDetailedSelection(){this.openDetailedSelectionScreen("pet").catch(X.RQr.createHandler("YourTeamPetSelectorComponent: Failed to open the detailed selection screen")),this.onOpenDetailedSelection.dispatch()}openDetailedSelectionScreen(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;dt.q.instance.prodigy.prefabFactory.closeAllTooltips(),this._screenContainerParent&&(this._screenContainerParent.active=!0),this._detailedSelectionScreen?this._detailedSelectionScreen.active=!0:(this._detailedSelectionLoadingScreen&&(this._detailedSelectionLoadingScreen.active=!0),this._detailedSelectionScreen=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.LootDashDetailedSelectionScreen,{},this._screenContainer),this._detailedSelectionLoadingScreen&&(null===(K=this._detailedSelectionLoadingScreen.findComponentInChildren(Kl))||void 0===K||K.enableInput(),this._detailedSelectionLoadingScreen.active=!1));const z=this._detailedSelectionScreen.findComponentInChildren(zh);yield z.setup(q)}))}destroy(){this.onOpenDetailedSelection.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Yl.prototype,"_equippedPetLeft",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Yl.prototype,"_equippedPetRight",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],Yl.prototype,"_changePetButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Yl.prototype,"_screenContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Yl.prototype,"_screenContainerParent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Yl.prototype,"_detailedSelectionLoadingScreen",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Yl.prototype,"onOpenDetailedSelection",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Yl.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Yl.prototype,"_currentPlayer",void 0),Yl=(0,Q.Cg)([(0,X.EVk)("YourTeamPetSelector",et.Y.uiPet)],Yl);var Ql=z(28559);let Xl=class extends X.uAl{constructor(){super(...arguments),this._tooltipGameObject=null,this._isTooltipCreated=!1,this.messageLocalizationArgs=[],this._useIconText=!1,this._resizeToContainer=!1,this._offset=new X.I9Y(0,0),this._useGoButton=!1,this._useCloseButton=!0,this.onTooltipClosed=new X.HN0,this.onGoClicked=new X.HN0}setGoButtonCTA(q){this.onGoClicked.add(q)}showTooltip(q){if(this._tooltipContainer.active=q,q&&!this._isTooltipCreated){dt.q.instance.prodigy.prefabFactory.tooltipsActive()&&dt.q.instance.prodigy.prefabFactory.closeAllTooltips();const q=Object.assign(Object.assign({},Ql.f),{resizeToContainer:this._resizeToContainer,iconGUID:this._iconGUID,useIconText:this._useIconText,layer:this._tooltipLayer,textArgs:this.messageLocalizationArgs,useGoButton:this._useGoButton,useCloseButton:this._useCloseButton,goButtonCTA:()=>this.onGoClicked.dispatch(),offset:this._offset});X.Aq$.isDefined(this._arrowDirection)&&(q.arrowDirection=this._arrowDirection);const K=this._tooltipContainer.transform;this._tooltipGameObject=dt.q.instance.prodigy.prefabFactory.createTooltip(K,this.messageLocalizationKey,q),this._tooltipGameObject.onDestroy.add((()=>{this.onTooltipClosed.dispatch(),this._isTooltipCreated=!1,this._tooltipGameObject=null})),this._isTooltipCreated=!0}else!q&&this._isTooltipCreated&&this.onTooltipClosed.dispatch()}destroy(){this.onTooltipClosed.dispose(),this.onGoClicked.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Xl.prototype,"_tooltipContainer",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Xl.prototype,"messageLocalizationKey",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],Xl.prototype,"messageLocalizationArgs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Xl.prototype,"_arrowDirection",void 0),(0,Q.Cg)([(0,X.i0J)(X.Z$z.SingleImage),(0,Q.Sn)("design:type",String)],Xl.prototype,"_iconGUID",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Xl.prototype,"_useIconText",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Xl.prototype,"_tooltipLayer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Xl.prototype,"_resizeToContainer",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],Xl.prototype,"_offset",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Xl.prototype,"_useGoButton",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Xl.prototype,"_useCloseButton",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Xl.prototype,"onTooltipClosed",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Xl.prototype,"onGoClicked",void 0),Xl=(0,Q.Cg)([(0,X.EVk)("CreateTooltip",X.YH6.ui)],Xl);var Zl=z(77997);let Jl=class extends X.uAl{constructor(){super(...arguments),this.onViewing=new X.HN0,this.onEditing=new X.HN0}postCreate(){var q,K;super.postCreate();{const z=dt.q.instance.prodigy.gameContainer.get("f71-42eb"),Y=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=dt.q.instance.prodigy.world.getZone(dt.q.instance.prodigy.world.getCurrentZone()).screen,X=null==Q?void 0:Q.saveTag.split("-").pop(),Z=null!==(K=null===(q=z.getValue(Zl.v))||void 0===q?void 0:q.houseReportButton)&&void 0!==K&&K;X===Y.userID.toString()?this.onEditing.dispatch():Z&&this.onViewing.dispatch()}}destroy(){this.onViewing.dispose(),this.onEditing.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jl.prototype,"onViewing",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Jl.prototype,"onEditing",void 0),Jl=(0,Q.Cg)([(0,X.EVk)("HouseHUDGuard",et.Y.reporting)],Jl);var tu=z(53040);let eu=class extends X.uAl{onClick(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield tu.y.openReportHouseConfirmationDialog()}))}};eu=(0,Q.Cg)([(0,X.EVk)("ReportHouse",et.Y.reporting)],eu);z(87557);var iu=z(76642);class su extends X.$KW{constructor(){super(...arguments),this.newSignalValue=""}generate(q,K){var z,Y;const Q=X.Gme.textGroup({id:"stringValue",labelValue:"String Value",inputValue:q.stringValue}),Z=X.Gme.checkboxGroup({id:"checkOnCreate",labelValue:"Check On Create",inputValue:q.checkOnCreate}),J=X.Gme.checkboxGroup({id:"forceChangeOnCreate",labelValue:"Change On Create",inputValue:q.forceChangeOnCreate}),tt=X.Gme.checkboxGroup({id:"fireSignalsOnSameValue",labelValue:"Fire Signals On Same Value",inputValue:q.fireSignalsOnSameValue}),et=X.NyS.create({id:"onValueChanged",label:"On Value Changed",signalValue:q.onValueChanged,componentGUID:this._componentGuid}),it=X.NyS.create({id:"onValueChecked",label:"On Value Checked",signalValue:q.onValueChecked,componentGUID:this._componentGuid}),st=null!==(z=q.stateSignals)&&void 0!==z?z:{},nt=X.XRp.createVertical([X.bl1.create({id:"addNewSignalInfo",message:"Add custom signals that dispatch when the string value matches the signal name"}),X._Lw.halfBlankLine(),X.XRp.createHorizontal([X.Gme.textGroup({id:"addSignal",labelValue:"Signal Name",inputValue:null!==(Y=this.newSignalValue)&&void 0!==Y?Y:"",onChange:(q,K)=>{this.newSignalValue=K,this._editorAPI.redrawCustomInspector()}}),X.X9M.create({id:"addSignalButton",nodeSize:"1of12",buttonText:"",buttonIcon:X.a2l.Add,buttonDisabled:""===this.newSignalValue,onClick:()=>{var q;this.newSignalValue&&(st[this.newSignalValue]=null!==(q=st[this.newSignalValue])&&void 0!==q?q:[],this._editorAPI.modifyComponent(this._componentGuid,{stateSignals:st}))}})]),X._Lw.halfBlankLine()]),at=[];return Object.keys(st).forEach((q=>{var K;at.push(X.XRp.createVerticalContainer([X.X9M.create({id:`deleteSignal-${q}`,buttonText:"Delete Signal",onClick:()=>{delete st[q],this._editorAPI.modifyComponent(this._componentGuid,{stateSignals:st})}}),X.NyS.create({id:`stateSignals-${q}`,label:`String is "${q}"`,signalValue:null!==(K=null==st?void 0:st[q])&&void 0!==K?K:[],componentGUID:this._componentGuid,propertyPath:["stateSignals",q]})],{title:`"${q}" Signal`,isCollapsible:!0,startCollapsed:!0})),at.push(X._Lw.halfBlankLine())})),X.XRp.createVertical([Q,Z,J,tt,X._Lw.halfBlankLine(),et,it,nt,...at])}}let nu=class extends X.uAl{constructor(){super(...arguments),this.checkOnCreate=!1,this.forceChangeOnCreate=!1,this.fireSignalsOnSameValue=!1,this.onValueChanged=new X.HN0,this.onValueChecked=new X.HN0,this._stateSignals={}}create(){super.create(),this.forceChangeOnCreate&&this.onValueChanged.dispatch(this.stringValue,this.previousValue),this.checkOnCreate&&this.onValueChecked.dispatch(this.stringValue),(this.forceChangeOnCreate||this.checkOnCreate)&&this._stateSignals[this.stringValue]&&this._stateSignals[this.stringValue].dispatch()}setValue(q){(this.fireSignalsOnSameValue||q!==this.stringValue)&&(this.previousValue=this.stringValue,this.stringValue=q,this.onValueChanged.dispatch(this.stringValue,this.previousValue),this._stateSignals[q]&&this._stateSignals[q].dispatch())}goToPreviousValue(){this.setValue(this.previousValue)}checkValue(){this.onValueChecked.dispatch(this.stringValue),this._stateSignals[this.stringValue]&&this._stateSignals[this.stringValue].dispatch()}destroy(){this.onValueChanged.dispose(),this.onValueChecked.dispose(),Object.values(this._stateSignals).forEach((q=>q.dispose())),super.destroy()}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],nu.prototype,"stringValue",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],nu.prototype,"checkOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],nu.prototype,"forceChangeOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],nu.prototype,"fireSignalsOnSameValue",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],nu.prototype,"onValueChanged",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],nu.prototype,"onValueChecked",void 0),(0,Q.Cg)([(0,X.OmD)(),(0,X.bbQ)(),(0,X.nKb)("stateSignals"),(0,Q.Sn)("design:type",Object)],nu.prototype,"_stateSignals",void 0),nu=(0,Q.Cg)([(0,X.WR4)(su),(0,X.EVk)("StringState",et.Y.utility)],nu);let au=class extends X.uAl{constructor(){super(...arguments),this._tweensToPlayOnUnlock=[],this._unlockSequenceDelayMS=1500,this._advanceTutorialSignal=new iu.S}create(){super.create();const q=this.getInjectedValue("EncounterBattleRequirementsMet"),K=this.getInjectedValue("EncounterBattleRequirements").requirements.map((q=>Po.a.getRuleType(q.kennel)));xl.instance.hasFTUEToShow(q,K)&&(this._segment.whiteGlove.initFTUEFunnelId(),this._segment.whiteGlove.sendRestrictionFTUEEvent("Restrictions screen opened"))}handleRequirementsMetChanged(){var q;const K=this.getInjectedValue("EncounterBattleRequirementsMet"),z=this.getInjectedValue("EncounterBattleRequirements");if(!(null==z?void 0:z.name))return;K&&this._segment.whiteGlove.sendRestrictionFTUEEvent("Restricted battle unlocked");!xl.instance.initializeRestrictionFTUE(K,this._tutorialStringState,this._advanceTutorialSignal.onDispatch)&&this.playIntroAnimations(),this._startFeature.active=K;let Y=!1;if(null===(q=null==z?void 0:z.requirements)||void 0===q?void 0:q.length)for(const Q of z.requirements){const q=Po.a.getRuleType(Q.kennel);if(Do(q,(0,Kt.G)(Io))){Y=!0;break}}this._goToHelperButton.active=!K&&Y}playIntroAnimations(){const q=this.getInjectedValue("EncounterBattleRequirementsMet"),K=this.getInjectedValue("EncounterBattleRequirements");if(!(null==K?void 0:K.name))return;if(this.gameObject.findComponentsInChildren(Wo.B,!0).forEach((q=>{q.id===Tl.RulesProgressBarTargetValue&&q.consume()})),!q)return;this._advanceTutorialSignal.onDispatch.dispatch();const z=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(z.completedRestrictionUnlockAnimationsSeen.includes(K.name)){this._padlockSpine.GameObject.active=!1;for(const q of this._tweensToPlayOnUnlock)(null==q?void 0:q.GameObject)&&(q.GameObject.active=!1);this._advanceTutorialSignal.onDispatch.dispatch()}else z.completedRestrictionUnlockAnimationsSeen.push(K.name),this._animationDelayTimeoutId=setTimeout((()=>{var q;this._padlockSpine.playAnimation("idle",!1,!0),null===(q=this._unlockSoundEffect)||void 0===q||q.play(),this.playUnlockTweens().then((()=>{this._advanceTutorialSignal.onDispatch.dispatch()})).catch(X.RQr.createHandler("Error playing unlock animation in RestrictionsPopupComponent"))}),this._unlockSequenceDelayMS)}playUnlockTweens(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=[];for(const K of this._tweensToPlayOnUnlock)K&&(q.push(K.onTweenComplete.asPromise()),K.playAnimation());yield Promise.all(q)}))}destroy(){this._segment.whiteGlove.clearFTUEFunnelId(),this._animationDelayTimeoutId&&clearTimeout(this._animationDelayTimeoutId),super.destroy()}};(0,Q.Cg)([(0,X.MnK)(X.bTj),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],au.prototype,"_tweensToPlayOnUnlock",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],au.prototype,"_padlockSpine",void 0),(0,Q.Cg)([(0,X.MnK)(mn.J),(0,Q.Sn)("design:type",mn.J)],au.prototype,"_unlockSoundEffect",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],au.prototype,"_goToHelperButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],au.prototype,"_startFeature",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],au.prototype,"_unlockSequenceDelayMS",void 0),(0,Q.Cg)([(0,X.MnK)(nu),(0,Q.Sn)("design:type",nu)],au.prototype,"_tutorialStringState",void 0),(0,Q.Cg)([(0,X.MnK)(iu.S),(0,Q.Sn)("design:type",iu.S)],au.prototype,"_advanceTutorialSignal",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],au.prototype,"_segment",void 0),au=(0,Q.Cg)([(0,X.EVk)("RestrictionsPopup",X.YH6.ui,"Consumes the injected value and assigns the value to the referenced property")],au);var ru,ou=z(24652),hu=z(74958),cu=z(58707),du=z(38560),lu=z(14117),uu=z(37050),fu=z(39785);!function(q){q.REROLL="animation"}(ru||(ru={}));let bu=class extends X.uAl{destroy(){this._notEnoughCurrencyResponse.tryDismissTooltip(),super.destroy()}updateCachedRiftRunProgress(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._riftsSyncedDataStore.cache.currentRiftRunProgress;return q&&q.type===ou.cn.Normal?(this._currentRiftRunProgress=q,!0):(X.VyI.log("RiftRunModifierPopupComponent: Cannot reroll modifier if current rift run is undefined",X.$bb.Error),!1)}))}onRerollClicked(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;this._notEnoughCurrencyResponse.tryDismissTooltip();if(!(yield this.updateCachedRiftRunProgress()))return;const K=null!==(q=this._currentRiftRunProgress.numBuffRerolls)&&void 0!==q?q:0,z={currency:27,value:uu.Q.getBuffRerollCost(K)};this._paymentManager.canAfford(z)?(this._mainBodyContent.active=!1,this.performRerollTransaction(z.value).then((()=>{this.showRerollAnimation()})).catch(X.RQr.createHandler("Error rerolling rift modifier"))):this.handleNotEnoughCurrency(z)}))}performRerollTransaction(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=this._segment.item.beginSecureItemTransaction(),z=Object.assign({},this._currentRiftRunProgress.buffModifier);yield this._riftsNetworkHandler.rerollRiftBuffModifier(this._currentRiftRunProgress.currentRiftTier);const Y=this._currentRiftRunProgress.buffModifier,Q=Object.assign(Object.assign({},this._segment.rifts.getRiftTransactionData()),{sink_type:hu.Aj.RIFT_BONUS_REROLL_TYPE,sink_id:Vt.$.generateUID()});this._segment.rifts.sendRiftRunBonusRerolled(Y,z,q,Q.transaction_id,Q.sink_id),K.flush(Q)}))}showRerollAnimation(){Ht.d.updateInjectedValues(this.gameObject,{MODIFIER_CARD_HEADER:"RIFTS_MODIFIER_REROLL"}),this._rerollAnimationSpine.GameObject.active=!0,this._rerollAnimationSpine.setAnimationByName(0,ru.REROLL,!1),this._rerollAnimationSpine.onEvent.addOnce(((q,K)=>{this._mainBodyContent.active=!0,this.refreshModifier().catch(X.RQr.createHandler("RiftRunModifierPopupComponent: Error refreshing modifier after reroll animation")),Ht.d.updateInjectedValues(this.gameObject,{MODIFIER_CARD_HEADER:"TAKE_THIS_TO_HELP"})}),this),this._rerollAnimationSpine.getSpine().onComplete.addOnce((()=>{this._rerollAnimationSpine.GameObject.active=!1}),this)}refreshModifier(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;yield this.updateCachedRiftRunProgress();const K=null!==(q=this._currentRiftRunProgress.numBuffRerolls)&&void 0!==q?q:0,z=uu.Q.canRerollBuff(K),Y=uu.Q.getBuffRerollCost(K),Q=this._currentRiftRunProgress.buffModifier,X=dt.q.instance.prodigy.gameContainer.get("bec-c6b4");Ht.d.updateInjectedValues(this.GameObject,{IS_BUFF:!0,MODIFIER_ICON:(null==Q?void 0:Q.icon)?fu.n.getGuidForModifierIcon(Q.icon):"",MODIFIER_NAME:null==Q?void 0:Q.caption,MODIFIER_DESCRIPTION:null==Q?void 0:Q.description,MODIFIER_GOLD_BONUS:0,MODIFIER_REROLL_COST:Y,SHOW_MC_COST:!X.isHardCurrencyMemberLocked(Y),SHOW_MEMBER_ICON:X.isHardCurrencyMemberLocked(Y),CAN_REROLL_MODIFIER:z,MAGICOIN_BALANCE:X.getBalance(27),RIFT_TIER:this._currentRiftRunProgress.currentRiftTier})}))}updateRerollButtons(q){this._rerollButtons.active=q,this._okayButton.active=!q}handleNotEnoughCurrency(q){const K=JSON.stringify(this._currentRiftRunProgress.buffModifier);this._notEnoughCurrencyResponse.handleNotEnoughCurrency(q,hu.Aj.RIFT_BONUS_REROLL_TYPE,K)}};(0,Q.Cg)([(0,Qi.b)("04c-7c61"),(0,Q.Sn)("design:type",du.B)],bu.prototype,"_riftsNetworkHandler",void 0),(0,Q.Cg)([(0,Qi.b)("687-0b09"),(0,Q.Sn)("design:type",lu.M)],bu.prototype,"_riftsSyncedDataStore",void 0),(0,Q.Cg)([(0,Qi.b)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],bu.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.Cdj)("ec3-31a0"),(0,Q.Sn)("design:type",ia.E)],bu.prototype,"_paymentManager",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],bu.prototype,"_rerollButtons",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],bu.prototype,"_okayButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],bu.prototype,"_mainBodyContent",void 0),(0,Q.Cg)([(0,X.MnK)(cu.b),(0,Q.Sn)("design:type",cu.b)],bu.prototype,"_notEnoughCurrencyResponse",void 0),(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],bu.prototype,"_rerollAnimationSpine",void 0),bu=(0,Q.Cg)([(0,X.EVk)("RiftRunModifierPopupComponent",et.Y.rifts)],bu);z(82436);var pu,vu=z(45224);!function(q){q.Bunny="Bunny",q.Fox="Fox"}(pu||(pu={}));let gu=class extends X.uAl{constructor(){super(...arguments),this.onAllyDialogue=new X.HN0,this.onEnemyDialogue=new X.HN0,this.onNeutralDialogue=new X.HN0,this._faction=pu.Bunny}run(){const q=this._loggedInPlayer.player.equipment.getHat(),K=this._faction===pu.Bunny?vu.f.BUNNY_HATS:vu.f.FOX_HATS,z=this._faction===pu.Bunny?vu.f.FOX_HATS:vu.f.BUNNY_HATS;K.includes(q)?this.onAllyDialogue.dispatch():z.includes(q)?this.onEnemyDialogue.dispatch():this.onNeutralDialogue.dispatch()}destroy(){this.onAllyDialogue.dispose(),this.onEnemyDialogue.dispose(),this.onNeutralDialogue.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],gu.prototype,"onAllyDialogue",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],gu.prototype,"onEnemyDialogue",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],gu.prototype,"onNeutralDialogue",void 0),(0,Q.Cg)([(0,X.gfw)(pu),(0,Q.Sn)("design:type",String)],gu.prototype,"_faction",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],gu.prototype,"_loggedInPlayer",void 0),gu=(0,Q.Cg)([(0,X.EVk)("SpringfestNPC",et.Y.festival)],gu);z(66840);var mu=z(21001),yu=z(77823),_u=(z(86323),z(64019),z(15160),z(35856),z(83441),z(571)),Eu=z(10670),wu=z(52850);let Tu=class extends X.uAl{constructor(){super(...arguments),this._maxPlayerNameLength=22,this._singleInvite=null}postCreate(){super.postCreate(),this.onDuelInviteUpdate()}onDuelInviteUpdate(){if(!this.isCreated)return;const q=wu.e.getActiveInvites(),K=q.length>0;if(this._contentContainer.active=K,K){const K=q.length>1;if(this._opponentNameText.GameObject.active=!K,this._singleOpponentLineText.GameObject.active=!K,this._multipleOpponentLineText.GameObject.active=K,this._duelButton.GameObject.active=!K,this._passButton.GameObject.active=!K,this._viewButton.GameObject.active=K,K)this.destroyOpponentPreview();else{this._singleInvite=q[0];const K=wu.e.getPlayerFromInvite(this._singleInvite);this.gameObject.active=!1,this.setOpponentData(K).catch(X.RQr.createHandler("Failed to set opponent data for duel invite notification")).finally((()=>this.gameObject.active=!0))}}}acceptSingleInvite(){wu.e.acceptInvite(Eu.VB.Standard,this._singleInvite)}rejectSingleInvite(){wu.e.rejectInvite(this._singleInvite),this._contentContainer.active=!1}setOpponentData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this.destroyOpponentPreview();const K=this._opponentContainer.findComponent(hr.B).getRootContainer(),z=yield _u.z.createHeadFromAppearanceData({hair:q.appearance.getHair(),eyeColor:q.appearance.getEyeColor(),face:q.appearance.getFace(),hat:q.equipment.getHat(),skin:q.appearance.getSkinColor(),outfit:q.equipment.getOutfit(),weapon:q.equipment.getWeapon(),boot:q.equipment.getBoots(),costume:q.equipment.getCostume()});K.addChild(z);let Y=q.getName();Y.length>this._maxPlayerNameLength&&(Y=`${Y.substr(0,this._maxPlayerNameLength)}...`),this._opponentNameText.text=Y}))}destroyOpponentPreview(){this._opponentContainer.findComponent(hr.B).getRootContainer().removeChildren()}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Tu.prototype,"_opponentContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Tu.prototype,"_contentContainer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Tu.prototype,"_opponentNameText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Tu.prototype,"_singleOpponentLineText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Tu.prototype,"_multipleOpponentLineText",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Tu.prototype,"_duelButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Tu.prototype,"_passButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Tu.prototype,"_viewButton",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Tu.prototype,"_maxPlayerNameLength",void 0),Tu=(0,Q.Cg)([(0,X.EVk)("DuelInviteNotification",et.Y.multiplayer)],Tu);z(89584),z(29143),z(46352),z(72748),z(18278),z(88331),z(75935);let Su=class extends X.uAl{constructor(){super(...arguments),this._onTextMessageFinished=new X.HN0,this._messageCancellation={},this._messageQueue=[],this._pinnedMessagePromises=[]}create(){super.create(),this._onScreenY=this.gameObject.transform.localPosition.y,this.gameObject.transform.setPositionY(this._onScreenY-this._slideDistance)}showMessage(q,...K){this.showMessageForMs(this._holdMs,q,...K)}showMessageForMs(q,K,...z){const Y=this._localizer.getText.apply(this._localizer,[K,...z]);this._messageQueue.push({message:Y,holdTimeMs:q}),this.runQueue().catch(X.RQr.createHandler("Error showing message"))}waitForMessage(q,...K){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.waitForMessageForMs(this._holdMs,q,...K)}))}waitForMessageForMs(q,K,...z){return(0,Q.sH)(this,void 0,void 0,(function*(){this.showMessageForMs(q,K,...z),this._slideTween&&(yield this._onTextMessageFinished.asPromise())}))}showPinnedMessage(q,...K){this.unpinMessage();const z=this._localizer.getText.apply(this._localizer,[q,...K]),Y=new X.bnh;this._messageQueue.push({message:z,pinPromise:Y}),this._pinnedMessagePromises.push(Y),this.runQueue().catch(X.RQr.createHandler("Error showing message"))}waitForPinnedMessage(q,...K){return(0,Q.sH)(this,void 0,void 0,(function*(){this.showPinnedMessage(q,...K),this._slideTween&&(yield this._onTextMessageFinished.asPromise())}))}unpinMessage(){const q=this._pinnedMessagePromises.shift();X.Aq$.isDefined(q)&&(q.resolve(),yt.remove(this._messageQueue,(K=>K.pinPromise===q)))}clearMessageQueue(){var q;this._slideTween&&(this._messageCancellation.cancelled=!0,this._messageCancellation={},null===(q=this._slideTween.onTweenComplete)||void 0===q||q.dispatch(),this._slideTween.stop(),dt.q.instance.game.tweens.remove(this._slideTween),this._slideTween=null),this._pinnedMessagePromises=[],this.gameObject.transform.setPositionY(this._onScreenY-this._slideDistance),this._messageQueue=[]}destroy(){this.clearMessageQueue(),this._onTextMessageFinished.dispose(),super.destroy()}runQueue(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;if(this._slideTween||!this.gameObject)return;const K=this._messageCancellation={};for(;this._messageQueue.length>=1;){const z=this._messageQueue.shift();if(this._textComponent.text=z.message,yield this.tweenBanner(1,this._slideInMs),K.cancelled)return;if(X.Aq$.isDefined(z.pinPromise)?yield z.pinPromise:yield X.Egh.timeout(null!==(q=z.holdTimeMs)&&void 0!==q?q:this._holdMs),K.cancelled)return;yield this.tweenBanner(0,this._slideOutMs)}this._slideTween=null,this._messageCancellation={},this._onTextMessageFinished.dispatch()}))}tweenBanner(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z={value:1-q},Y=this._slideTween=dt.q.instance.game.add.tween(z,this,!0).to({value:q},K,X.GS3.Linear.None,!0);Y.onUpdate.add((()=>{const q=z.value+.5*Math.sin(z.value*Math.PI);this.gameObject.transform.setPositionY(X.cj9.linear(this._onScreenY-this._slideDistance,this._onScreenY,q))})),yield Y.onTweenComplete.asPromise()}))}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Su.prototype,"_textComponent",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Su.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Su.prototype,"_slideInMs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Su.prototype,"_holdMs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Su.prototype,"_slideOutMs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Su.prototype,"_slideDistance",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Su.prototype,"_onTextMessageFinished",void 0),Su=(0,Q.Cg)([(0,X.EVk)("TextLog",et.Y.battleRevamp)],Su);z(96711),z(99057),z(19176),z(47215),z(37987),z(45855);var Au=z(43516),Cu=z(91620),Ou=z(96797);let Iu=class extends Yi.z{create(){super.create(),this._bindOnCreate&&this.bindContext()}bindContext(){const q=dt.q.instance.prodigy.gameContainer.get("20f-5f67"),K=this._segmentedOffersDataProvider.currentOfferStatus,z=this._segmentedOffersDataProvider.activeOffer;if(!X.Aq$.isDefined(z)||!this._segmentedOffersDataProvider.userCanReceiveSegmentedOffers())return void this.unbindContext();this._context.Container.rebind(ms.ht.SegmentedOffersTimeRemainingMS).toConstantValue(Ou.P.getOfferTimeRemaining(z)),this._context.Container.rebind(ms.ht.SegmentedOfferCurrentOfferStatus).toConstantValue(K);const Y=Object.assign({[ms.ht.SegmentedOffersTimeRemainingMS]:Ou.P.getOfferTimeRemaining(z),[ms.ht.SegmentedOffersEnding]:Ou.P.isOfferInGracePeriod(this._segmentedOffersDataProvider.activeOffer),[ms.ht.SegmentedOffersRejected]:this._segmentedOffersDataProvider.rejectActiveOffer.bind(this._segmentedOffersDataProvider),[ms.ht.SegmentedOffersFunnelAdvancedCTA]:Ou.P.sendCtaFunnelAdvancedEvent.bind(this,q,this._segmentedOffersDataProvider.activeOffer),[ms.ht.SegmentedOffersFunnelAdvancedGotMembership]:Ou.P.sendMembershipFunnelAdvancedEvent.bind(this,q,this._segmentedOffersDataProvider.activeOffer)},Ou.P.getItemInjectableProperties(this._segmentedOffersDataProvider.rewardsForCurrentUserSegment));this._context.Container.rebind(ms.ht.SegmentedOffersModalInjectableProperties).toConstantValue(Y),this.gameObject.findComponentsInChildren(Wo.B,!1).forEach((q=>q.consume()))}unbindContext(){this._context.Container.rebind(ms.ht.SegmentedOffersTimeRemainingMS).toConstantValue(0),this._context.Container.rebind(ms.ht.SegmentedOfferCurrentOfferStatus).toConstantValue(Au.v.NO_ACTIVE_OFFER),this._context.Container.rebind(ms.ht.SegmentedOffersModalInjectableProperties).toConstantValue({}),this.gameObject.findComponentsInChildren(Wo.B,!1).forEach((q=>q.consume()))}sendInterfaceOpenEvents(){if(!this._segmentedOffersDataProvider.activeOffer)return;const q=dt.q.instance.prodigy.gameContainer.get("20f-5f67");Ou.P.sendInterfaceOpenEvents(q,this._segmentedOffersDataProvider.activeOffer,this._loggedInPlayer.player,!1)}};(0,Q.Cg)([(0,X.Cdj)("c21-1a3f"),(0,Q.Sn)("design:type",Cu.D)],Iu.prototype,"_segmentedOffersDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Iu.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Iu.prototype,"_bindOnCreate",void 0),Iu=(0,Q.Cg)([(0,X.EVk)("Segmented Offers - Access Point Data Provider",et.Y.ui,"Data provider for the Segmented Offers access point hud icon and popup")],Iu);let Du=class extends X.PQK{installBindings(){const q=dt.q.instance.prodigy.gameContainer.get("20f-5f67"),K=dt.q.instance.prodigy.gameContainer.get("c21-1a3f");if(this.Container.bind(ms.ht.SegmentedOfferCurrentOfferStatus).toConstantValue(K.currentOfferStatus),!K.activeOffer)return void X.VyI.log("[SegmentedOffersInstaller] No active offer",X.$bb.Warning);this.Container.bind(ms.ht.SegmentedOffersTimeRemainingMS).toConstantValue(Ou.P.getOfferTimeRemaining(K.activeOffer)),this.Container.bind(ms.ht.SegmentedOffersEnding).toConstantValue(Ou.P.isOfferInGracePeriod(K.activeOffer)),this.Container.bind(ms.ht.SegmentedOffersRejected).toConstantValue(K.rejectActiveOffer.bind(K)),this.Container.bind(ms.ht.SegmentedOffersFunnelAdvancedCTA).toConstantValue(Ou.P.sendCtaFunnelAdvancedEvent.bind(this,q,K.activeOffer)),this.Container.bind(ms.ht.SegmentedOffersFunnelAdvancedGotMembership).toConstantValue(Ou.P.sendMembershipFunnelAdvancedEvent.bind(this,q,K.activeOffer));const z=Ou.P.getItemInjectableProperties(K.rewardsForCurrentUserSegment);for(const Y in z)this.Container.bind(Y).toConstantValue(z[Y])}};Du=(0,Q.Cg)([(0,X.Og1)("SegmentedOffersInstaller","Installer")],Du);var Ru=z(2980),Pu=z(77510);let Mu=class extends X.uAl{constructor(){super(),this.onPauseButtonClicked=new X.HN0,this._stateChallengesService.onPauseButtonClicked.add((q=>this.onPauseButtonClicked.dispatch(q)))}destroy(){super.destroy(),this.onPauseButtonClicked.dispose(),this._stateChallengesService.onPauseButtonClicked.remove((q=>this.onPauseButtonClicked.dispatch(q)))}toggleMenuPause(){this._stateChallengesService.toggleMenuPause()}};(0,Q.Cg)([(0,X.Cdj)("394-6aa1"),(0,Q.Sn)("design:type",Pu.z)],Mu.prototype,"_stateChallengesService",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Mu.prototype,"onPauseButtonClicked",void 0),Mu=(0,Q.Cg)([(0,X.EVk)("StateChallengesService",et.Y.stateChallenges),(0,Q.Sn)("design:paramtypes",[])],Mu);var Nu,xu,Lu=z(54140),ku=z(54865),Bu=z(76846),Uu=z(59114),Fu=z(63546),Gu=z(77713),ju=z(37623),$u=z(4766),Hu=z(8820);!function(q){q.CLASSROOM="CLASSROOM",q.SCHOOL="SCHOOL",q.NO_CLASS="NO_CLASS"}(Nu||(Nu={})),function(q){q.Default="Default",q.Qualified="Qualified",q.Champion="Champion",q.NationalCup="NationalCup"}(xu||(xu={}));class Vu extends Fu.${constructor(){super(...arguments),this._currentLeaderboardView=Ru.W.SCHOOL,this._classroomRacerIds=[],this._schoolRacerIds=[],this._classroomPortraitIds=[],this._schoolPortraitIds=[]}enter(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;this._stateChallengesService=dt.q.instance.prodigy.gameContainer.get("394-6aa1");const z=dt.q.instance.prodigy.gameContainer.get("476-a586");yield z.sendClassCodeQuestEvent().catch(X.RQr.createHandler("CurrentStateChallengeViewState: Error completing class code quest")),(yield z.isPreviousChallengeStarted())||(yield z.sendCurrentChallengeStartedEvent().catch(X.RQr.createHandler("CurrentStateChallengeViewState: Error starting current challenge"))),this._stateChallengesDataProvider=q.stateChallengesDataProvider,this._prefabGUID=Gt.l.CurrentStateChallengeView;const Y=yield this._stateChallengesDataProvider.getCurrentSchoolRanking();this._currentLeaderboardView=void 0!==Y&&Y>=Vu.LOW_PERFORMANCE_CUTOFF_RANK?Ru.W.CLASSROOM:Ru.W.SCHOOL,this._menuRootObject=q.rootMenuObject,this._classroomRacerIds=q.classroomRacerIds,this._schoolRacerIds=q.schoolRacerIds,this._classroomPortraitIds=q.classroomPortraitIds,this._schoolPortraitIds=q.schoolPortraitIds;const Q=X.wa5.getActiveScene().container.sourceContainer,Z=Q.get("STATE_CHALLENGES_GOALS_DATA_PROVIDER"),J=Z.GameObject.findComponentInChildren(X.bE_,!0);J||Z.onDataReady.addOnce((q=>{Ht.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_MILESTONE_WIDGET_VISIBLE:!0})}));const tt=this._stateChallengesDataProvider.getStateChallengesLeaderboard(Ru.W.SCHOOL),et=this._stateChallengesDataProvider.getStateChallengesLeaderboard(Ru.W.CLASSROOM),it=yield this._stateChallengesDataProvider.getSchoolQualificationStatus(),st=this.getDisplayMode(it),nt=Ut.O.localeCode,at=this._stateChallengesDataProvider.finalsPhaseStartDate;this._prefabInjectionValues=Object.assign(Object.assign(Object.assign({},this.getInjectionsForMode(st,at,nt)),{STATE_CHALLENGES_MILESTONE_WIDGET_VISIBLE:X.Aq$.isDefined(J),STATE_CHALLENGES_LEADERBOARD_TYPE:this._currentLeaderboardView,STATE_CHALLENGES_CURRENT_CLASS_DESC:et.competitorEntries.values.length>0?ju.O.STATE_CHALLENGES_CLASS_DESCRIPTION:ju.O.STATE_CHALLENGES_ONLY_CLASS_DESCRIPTION,STATE_CHALLENGES_CLASS_VIEW_NAME:null!==(K=et.myEntry.displayName)&&void 0!==K?K:"",STATE_CHALLENGES_CLASS_RANK_DELTA:et.myEntry.rankDeltaValue,STATE_CHALLENGES_CLASS_RANK_DELTA_ABS:Math.abs(et.myEntry.rankDeltaValue),STATE_CHALLENGES_SCHOOL_TAB_DATA:{label:this._localizer.getText(ju.O.YOUR_SCHOOL),metadata:{leaderboard:Ru.W.SCHOOL}},STATE_CHALLENGES_CLASS_TAB_DATA:{label:this._localizer.getText(ju.O.YOUR_CLASS),metadata:{leaderboard:Ru.W.CLASSROOM}},STATE_CHALLENGES_TOGGLE_GROUP_CALLBACK:this.onTabSelected.bind(this)}),this.setupChallengeBanner(Y>=Vu.LOW_PERFORMANCE_CUTOFF_RANK?et:tt)),this.spawnRacers();const rt=X.wa5.getActiveScene().container.sourceContainer.get(Uu.Tz.STATE_CHALLENGES_BG_IDLE_TWEEN);Q.get(Uu.Tz.STATE_CHALLENGES_BG_INTRO_TWEEN).resetToStart(),rt.resetToStart(),this._stateChallengesService&&this._stateChallengesService.isMenuPaused?rt.pauseAnimation():rt.playAnimation(),this._prefabGUID&&(this._prefabRoot=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,this._prefabInjectionValues,q.rootMenuObject),Ht.d.updateInjectedValues(q.rootMenuObject,{[Uu.E2.STATE_CHALLENGES_SHOW_HEADER]:!0}))}))}getDisplayMode(q){return this._stateChallengesDataProvider.viewableCompetitionPhase===Hu.a.NationalCup?xu.NationalCup:q.wonStateChallenge?xu.Champion:q.qualifiedForNationalCup?xu.Qualified:xu.Default}getInjectionsForMode(q,K,z){const Y=this.getDefaultStateChallengeInjections();switch(q){case xu.Champion:return Object.assign(Object.assign({},Y),this.getChampionInjectionOverrides(K,z));case xu.Qualified:return Object.assign(Object.assign({},Y),this.getQualifiedInjectionOverrides());case xu.NationalCup:return Object.assign(Object.assign({},Y),this.getNationalCupInjectionOverrides());default:return Y}}getDefaultStateChallengeInjections(){const q=$u.H.getDaysUntilEndOfCurrentChallenge(this._stateChallengesDataProvider.activeCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.endDate).toString();return{STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!1,STATE_CHALLENGES_SCHOOL_INNER_QUALIFIER_BANNER_VISIBLE:!1,STATE_CHALLENGES_HAS_WON:!1,STATE_CHALLENGES_CURRENT_VIEW_SUBTITLE_KEY:ju.O.STATE_CHALLENGES_ON_NOW,STATE_CHALLENGES_CURRENT_VIEW_TITLE:Lu.X.getCurrentChallengeDisplayName(this._stateChallengesDataProvider.viewableCompetitionPhase),STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:ju.O.STATE_CHALLENGE_DESCRIPTION,STATE_CHALLENGES_TIME_REMAINING:ju.O.STATE_CHALLENGES_ENDS_IN,STATE_CHALLENGES_TIME_REMAINING_ARGS:q}}getChampionInjectionOverrides(q,K){const z=$u.H.getDaysUntilEndOfCurrentChallenge(this._stateChallengesDataProvider.activeCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.endDate).toString();return Object.assign({STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!0,STATE_CHALLENGES_HAS_WON:!0,STATE_CHALLENGES_CURRENT_VIEW_SUBTITLE_KEY:ju.O.CHEST_REWARD_CONGRATULATIONS,STATE_CHALLENGES_CURRENT_VIEW_TITLE:this._localizer.getText(ju.O.STATE_CHALLENGES_CHAMPION_TITLE),STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:ju.O.STATE_CHALLENGES_CHAMPION_DESCRIPTION},q?{STATE_CHALLENGES_TIME_REMAINING:ju.O.STATE_CHALENGES_STARTS,STATE_CHALLENGES_TIME_REMAINING_ARGS:q.toLocaleString(K,{month:"long",day:"numeric"})}:{STATE_CHALLENGES_TIME_REMAINING_ARGS:z})}getQualifiedInjectionOverrides(){return{STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!0,STATE_CHALLENGES_SCHOOL_INNER_QUALIFIER_BANNER_VISIBLE:!0,STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:ju.O.STATE_CHALLENGES_QUALIFIED_DESCRIPTION}}getNationalCupInjectionOverrides(){return{STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:ju.O.NATIONAL_CUP_DESCRIPTION,STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!0,STATE_CHALLENGES_HAS_WON:!0}}onTabSelected(q){var K,z;if(this._currentLeaderboardView===q.metadata.leaderboard)return;this._currentLeaderboardView=q.metadata.leaderboard;const Y=this._stateChallengesDataProvider.getStateChallengesLeaderboard(this._currentLeaderboardView),Q=dt.q.instance.prodigy.gameContainer.get("476-a586");dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:ws.B.ProdigyChallenge,interfaceType:wi.Wm.Screen,instanceType:Ti.N.UI,originType:wi.$N.TabClick,originID:Us.k.StateChallengesTab},{sub_ui_name:this._currentLeaderboardView===Ru.W.CLASSROOM?"class":"school",item_list:{challenge_id:Q.getCurrentChallengeUniqueId()+this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:null===(K=null==Y?void 0:Y.myEntry)||void 0===K?void 0:K.rank}});const X=Object.assign({STATE_CHALLENGES_CLASS_VIEW_NAME:this._currentLeaderboardView===Ru.W.CLASSROOM?null===(z=null==Y?void 0:Y.myEntry)||void 0===z?void 0:z.displayName:void 0,STATE_CHALLENGES_LEADERBOARD_TYPE:this._currentLeaderboardView},this.setupChallengeBanner(Y));Ht.d.updateInjectedValues(this._prefabRoot,X),this.spawnRacers()}setupChallengeBanner(q){var K;const z=q.myEntry.rank,Y=this._currentLeaderboardView===Ru.W.CLASSROOM?Uu.yT.classViewHeroPetId:Uu.yT.schoolViewHeroPetId,Q=X.Aq$.isDefined(z);return{STATE_CHALLENGES_BANNER_PORTRAIT_ID:Y,STATE_CHALLENGES_BANNER_RANK:null!==(K=null==z?void 0:z.toString())&&void 0!==K?K:this._stateChallengesDataProvider.totalPhaseCorrectAnswers.toString(),STATE_CHALLENGE_BANNER_TROPHY_ASSET:[ti._.State_challenges_json,z<=3?Uu.yT.bannerTrophyAssets[z-1]:""],STATE_CHALLENGES_BANNER_TROPHY_VISIBLE:Q&&z<=3&&this._currentLeaderboardView!==Ru.W.CLASSROOM,STATE_CHALLENGES_BANNER_ANSWERS:q.myEntry.correctAnswers,STATE_CHALLENGES_BANNER_POINTS_TITLE:`${this._localizer.getText(ju.O.POINTS)}:`,STATE_CHALLENGES_BANNER_ICON_VISIBILITY:this._currentLeaderboardView===Ru.W.SCHOOL,STATE_CHALLENGES_BANNER_RIGHT_LOC:Q?"LEADERBOARDS_SUBHEADING_CORRECT_ANSWERS":ju.O.STATE_CHALLENGES_THIS_MONTH,STATE_CHALLENGES_BANNER_LEFT_LOC:Q?ju.O.STATE_CHALLENGES_RANK:ju.O.STATE_CHALLENGES_TOTAL_CORRECT}}spawnRacers(){this._menuRootObject.findComponentsInChildren(Gu.h).forEach((q=>{q.destroySpawnedPrefabs()}));const q=this._currentLeaderboardView===Ru.W.CLASSROOM?Uu.yT.classViewHeroPetId:Uu.yT.schoolViewHeroPetId,K=this._currentLeaderboardView===Ru.W.CLASSROOM?this._classroomRacerIds:this._schoolRacerIds,z=`${this._currentLeaderboardView===Ru.W.CLASSROOM?this._localizer.getText(ju.O.YOUR_CLASS):this._localizer.getText(ju.O.YOUR_SCHOOL)}!`;Ht.d.updateInjectedValues(this._menuRootObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:Lu.X.getStateChallengeRacersInjectionData(this._currentLeaderboardView,z,q,K,this._stateChallengesDataProvider),STATE_CHALLENGES_DISTANT_RACER_DATA:this.setupRacerPortraits()})}getStateChallengesDistanceRacerInjectionDataForIndex(q,K,z){var Y;const Q=this._stateChallengesDataProvider.getStateChallengesLeaderboard(this._currentLeaderboardView),X=this._currentLeaderboardView===Ru.W.CLASSROOM?this._classroomPortraitIds:this._schoolPortraitIds,Z=Q.competitorEntries.get(z);if(Z)return{STATE_CHALLENGES_DISTANT_RACER_ID:X[q],STATE_CHALLENGES_PORTRAIT_TROPHY_ASSET:[ti._.State_challenges_json,Uu.yT.bannerTrophyAssets[K]],STATE_CHALLENGES_RACER_NAME:Vt.$.truncate(null!==(Y=null==Z?void 0:Z.displayName)&&void 0!==Y?Y:"",35,!0),STATE_CHALLENGES_RACER_RANK:null==Z?void 0:Z.rank,STATE_CHALLENGES_RACER_ANSWERS:null==Z?void 0:Z.correctAnswers}}setupRacerPortraits(){const q=this._stateChallengesDataProvider.getStateChallengesLeaderboard(this._currentLeaderboardView).myEntry.rank,K=[];return q>3&&(4===q?(K.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(0,0,1)),K.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(1,1,2))):(K.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(0,1,2)),K.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(1,0,1)),K.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(2,2,3)))),K.filter((q=>void 0!==q))}}Vu.LOW_PERFORMANCE_CUTOFF_RANK=30;class Wu extends Fu.${enter(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=dt.q.instance.prodigy.gameContainer.get("476-a586"),z=yield K.isClassCodeQuestCompleted();this._prefabGUID=Gt.l.StateChallengesNoClassState,this._prefabRoot=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_SHOW_MAGICOIN_REWARD:!z},q.rootMenuObject.children[q.rootMenuObject.children.length-1]),dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:ws.B.ProdigyChallengeClassCode,interfaceType:wi.Wm.Screen,instanceType:Ti.N.UI,originType:wi.$N.ButtonClick});const Y=dt.q.instance.prodigy.gameContainer.get("d00-c550").activeCompetitionPhase;Ht.d.updateInjectedValues(q.rootMenuObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:this.getPetsData(),STATE_CHALLENGES_CURRENT_VIEW_TITLE:Lu.X.getCurrentChallengeDisplayName(Y),STATE_CHALLENGES_NO_CLASS_GOT_ITEM_COMPLETE:()=>{q.onClassCodeSet().then((()=>{q.rootMenuObject.findComponentsInChildren(Gu.h).forEach((q=>{q.destroySpawnedPrefabs()})),this._prefabRoot&&this._prefabRoot.destroy()})).catch(X.RQr.createHandler("StateChallengesNoClassState: Failed to handle class code set."))}});const Q=X.wa5.getActiveScene().container.sourceContainer.get(Uu.Tz.STATE_CHALLENGES_BG_IDLE_TWEEN);Q.resetToStart(),Q.playAnimation()}))}exit(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._prefabRoot&&this._prefabRoot.destroy()}))}getPetsData(){return[{STATE_CHALLENGES_FOOTRACE_PET_ID:Uu.yT.schoolViewPetIds[0],STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Uu.yT.defaultRacerOffsets[0],Uu.yT.yOffsets[0]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:or.Q2.Walk},{STATE_CHALLENGES_FOOTRACE_PET_ID:Uu.yT.schoolViewHeroPetId,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Uu.yT.defaultRacerOffsets[1],Uu.yT.yOffsets[1]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:or.Q2.Walk},{STATE_CHALLENGES_FOOTRACE_PET_ID:Uu.yT.schoolViewPetIds[1],STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Uu.yT.defaultRacerOffsets[2],Uu.yT.yOffsets[2]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:or.Q2.Walk}]}}var qu=z(21953),Ku=z(25431);class zu extends Fu.${constructor(){super(...arguments),this._RLTweenOffsetX=1e3,this._skippedIntro=!1}enter(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this._cachedStateParams=q,this._menuRootObject=q.rootMenuObject,this._prefabGUID=Gt.l.StateChallengesIntroAnimationState;const K=q.stateChallengesDataProvider,z=K.isInitialized;z||K.initialize().then((()=>{Ht.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_SKIP_BUTTON_VISIBLE:!0})})).catch(X.RQr.createHandler("StateChallengesIntroAnimationState: Error initializing StateChallengesDataProvider")),K.setAnimationPlayed(),this._prefabRoot=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_SKIP_BUTTON_VISIBLE:z,STATE_CHALLENGES_SKIP_BUTTON_CALLBACK:()=>{dt.q.instance.prodigy.gameContainer.get("476-a586").markDataAsDirty(),this._skippedIntro=!0,this._stateMachine.goToState(Vu,Object.assign(Object.assign({},this._cachedStateParams),{spawnRacers:!0})).catch(X.RQr.createHandler("StateChallengesIntroAnimationState: Error transitioning to CurrentStateChallengeViewState"))}},this._menuRootObject);const Y=this.generateIntroRacersData();Ht.d.updateInjectedValues(this._menuRootObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:Y,STATE_CHALLENGES_RACERS_SPAWNED_CALLBACK:this.onRacersSpawned.bind(this)})}))}exit(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;null===(q=this._prefabRoot)||void 0===q||q.destroy()}))}onRacersSpawned(){if(this._skippedIntro)return;const q=X.wa5.getActiveScene().container.sourceContainer,K=q.getAll(Uu.Tz.STATE_CHALLENGES_LR_TWEEN);Promise.all(K.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.playAnimation(),new Promise((K=>q.onTweenComplete.addOnce(K)))}))))).then((()=>this.onLeftRightTweenComplete())).catch(X.RQr.createHandler("StateChallengesIntroAnimationState: Error playing racer intro tweens"));const z=q.get(Uu.Tz.STATE_CHALLENGES_BG_INTRO_TWEEN);z.onTweenComplete.addOnce((()=>{z.resetToStart()})),z.playAnimation()}onLeftRightTweenComplete(){this._menuRootObject.findComponentsInChildren(Gu.h).forEach((q=>q.destroySpawnedPrefabs()));const q=Lu.X.getStateChallengeRacersInjectionData(Ru.W.SCHOOL,this._localizer.getText(ju.O.YOUR_SCHOOL),Uu.yT.schoolViewHeroPetId,this._cachedStateParams.schoolRacerIds,this._cachedStateParams.stateChallengesDataProvider);q.forEach((q=>{q.STATE_CHALLENGES_FOOTRACE_PET_POSITION[0]+=this._RLTweenOffsetX,q.STATE_CHALLENGES_ANSWERS_VISIBLE=!1,q.STATE_CHALLENGES_SELF_BUBBLE_VISIBLE=!1})),Ht.d.updateInjectedValues(this._menuRootObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:q,STATE_CHALLENGES_RACERS_SPAWNED_CALLBACK:this.onCurrentViewRacersSpawned.bind(this)})}onCurrentViewRacersSpawned(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=X.wa5.getActiveScene().container.sourceContainer.getAll(Uu.Tz.STATE_CHALLENGES_RL_TWEEN);yield Promise.all(q.map(((q,K)=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.playAnimation(),new Promise((z=>{q.onTweenComplete.addOnce((()=>{Ht.d.updateInjectedValues(q.GameObject.parent,{STATE_CHALLENGES_ANSWERS_VISIBLE:1!==K,STATE_CHALLENGES_SELF_BUBBLE_VISIBLE:1===K}),z()}))}))}))))),dt.q.instance.prodigy.gameContainer.get("476-a586").markDataAsDirty(),this._stateMachine.goToState(Vu,Object.assign({},this._cachedStateParams)).catch(X.RQr.createHandler("StateChallengesIntroAnimationState: Error transitioning to CurrentStateChallengeViewState"))}))}generateIntroRacersData(){const q=[...Uu.yT.schoolViewPetIds],K=[];for(let z=0;z0;z++){const Y=q.splice(Math.floor(Math.random()*q.length),1)[0],Q=Uu.yT.introAnimationStartPositions[z];K.push({STATE_CHALLENGES_FOOTRACE_PET_ID:Y,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Q.x,Q.y],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:or.Q2.Walk})}return K.push({STATE_CHALLENGES_FOOTRACE_PET_ID:Uu.yT.schoolViewHeroPetId,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Uu.yT.introAnimationHeroPosition.x,Uu.yT.introAnimationHeroPosition.y],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:or.Q2.Walk}),K}}class Yu extends Fu.${constructor(){super(...arguments),this._highestMilestoneAchieved=0,this._rewardSequenceIndex=0,this._maxRewardSequenceIndex=3,this._materialRewards=[],this._celebrationBoxItem={name:"Celebration Box",icon:As.q.Icon_celebration_pack,amount:0}}enter(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z;this._cachedEnterParams=q,Ht.d.updateInjectedValues(q.rootMenuObject,{[Uu.E2.STATE_CHALLENGES_SHOW_HEADER]:!1});const Y=q.stateChallengesDataProvider.getSchoolEntryForPreviousChallenge();if(!Y)return this._rewardSequenceIndex=this._maxRewardSequenceIndex,void this.showNextRewardInSequence();this._previousRank=Y.rank,this._correctAnswers=Y.correctAnswers;const Q=this.rankIsValid(this._previousRank),Z=Q&&this._previousRank<=5,J=Q&&this._previousRank<=3,tt=dt.q.instance.prodigy.gameContainer.get("20f-5f67");Z&&tt.item.beginSecureItemTransaction();const et=dt.q.instance.prodigy.gameContainer.get("60b-c1b4"),it=yield et.getEndOfChallengeRewards(this._previousRank,this._correctAnswers);this._highestMilestoneAchieved=it.highestMilestoneValue,this._finalsPhaseStartDate=q.stateChallengesDataProvider.finalsPhaseStartDate;const st=dt.q.instance.prodigy.gameContainer.get("476-a586");if(Z){this._celebrationBoxItem.name=this._localizer.getText(ju.O.STATE_CHALLENGE_CELEBRATION_BOX);const q=null===(K=it.endOfChallengeRewards)||void 0===K?void 0:K[this._previousRank],Y=ae.t.getItem("pet",null!==(z=null==q?void 0:q.ID)&&void 0!==z?z:0);if(Y){re.J.bagItem(Y,dt.q.instance.game,void 0,void 0,{source_type:Ei.C.StateChallengePodium,source_id:`${st.getPreviousChallengeUniqueId()}-${this._previousRank}`,instance_type:Ti.N.StateChallenge,instance_id:tt.featureCommon.getCurrentInterfaceID(ws.B.ProdigyChallenge),transaction_id:Vt.$.generateUID()});dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.forceSaveCharacter();const q=[{name:Y.name,icon:Ts.E.getIconForType(Y.type,Y.ID),amount:1}];1===this._previousRank?this._materialRewards=[this._celebrationBoxItem,...q]:this._materialRewards=[...q],yield dt.q.instance.prodigy.load.assetsAsPromise(this._materialRewards.map((q=>q.icon)))}else X.VyI.log(`No reward item found for rank ${this._previousRank}`,X.$bb.Warning)}this._prefabInjectionValues={STATE_CHALLENGES_BANNER_RANK:Q?Vt.$.addOrdinalSuffix(this._previousRank):this._localizer.getText(ju.O.NATIONAL_CUP_RESULTS_PENDING),STATE_CHALLENGE_BANNER_TROPHY_ASSET:[ti._.State_challenges_json,J?Uu.yT.bannerTrophyAssets[this._previousRank-1]:""],STATE_CHALLENGES_BANNER_TROPHY_VISIBLE:J,STATE_CHALLENGES_REWARD_RANK_TROPHY:[ti._.State_challenges_json,Z?Uu.yT.postChallengeTrophyAssets[Math.min(this._previousRank-1,Uu.yT.postChallengeTrophyAssets.length-1)]:""],STATE_CHALLENGES_BANNER_ANSWERS:this._correctAnswers,STATE_CHALLENGES_REWARDS_RANK_VISIBLE:Z,STATE_CHALLENGES_POST_CHALLENGE_REWARDS_VISIBLE:this._highestMilestoneAchieved>0||this._materialRewards.length>0||Z,STATE_CHALLENGES_BANNER_LEFT_LOC:ju.O.STATE_CHALLENGES_RANK},this._prefabRoot=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.StateChallengesPostChallengeView,this._prefabInjectionValues,q.rootMenuObject),dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:ws.B.ProdigyChallengeResult,interfaceType:wi.Wm.Screen,instanceType:Ti.N.UI,originType:wi.$N.ButtonClick},{item_list:{challenge_id:st.getPreviousChallengeUniqueId()+q.stateChallengesDataProvider.getPreviousChallengeSuffixForSegmentEvents()}}),this._currentSchoolRank=yield q.stateChallengesDataProvider.getCurrentSchoolRanking(),this.showNextRewardInSequence()}))}rankIsValid(q){return X.Aq$.isDefined(q)&&q>0}showNextRewardInSequence(){var q,K;const z=null!==(K=null===(q=this._cachedEnterParams)||void 0===q?void 0:q.stateChallengesDataProvider.isInNationalCupRewardCollectionPeriod())&&void 0!==K&&K?[this.showNationalCupEnded.bind(this),this.showMaterialRewards.bind(this),this.showMilestoneAchievements.bind(this)]:[this.showMaterialRewards.bind(this),this.showMilestoneAchievements.bind(this),this.showQualification.bind(this)];this._rewardSequenceIndex{q&&Ht.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NEXT_BUTTON_TEXT:this._localizer.getText(ju.O.STATE_CHALLENGES_CLAIM_REWARDS)})})).catch(X.RQr.createHandler("StateChallengesPostChallengeState: prefetchAndUpdateClaimButton"))}collectPastMilestoneRewards(){const q=dt.q.instance.prodigy.gameContainer.get("20f-5f67").item.beginSecureItemTransaction(),K=dt.q.instance.prodigy.gameContainer.get("60b-c1b4"),z=this._cachedEnterParams.stateChallengesDataProvider.getGoalsParametersDataForPreviousChallenge();if(!z)return X.VyI.log("StateChallengesPostChallengeState: Error claiming previous state challenge milestone rewards",X.$bb.Error),void this.goToNextState();K.claimPreviousStateChallengeGoalsRewards(z).then((K=>(0,Q.sH)(this,void 0,void 0,(function*(){const z=dt.q.instance.prodigy.gameContainer.get("476-a586");yield this.setSegmentDataForMilestoneRewards(q,z),q.flush({}),yield z.processPreviousChallengeRewardsResponse(K),yield Ku.b.getData(),yield z.sendCurrentChallengeStartedEvent(),dt.q.instance.game.broadcaster.broadcast(Xn.Y1.HUDRevampButtonVisibilityRefreshRequested),this.onRewardCompleteGoToNextState()})))).catch(X.RQr.createHandler("StateChallengesPostChallengeState: Error claiming previous state challenge milestone rewards"))}setSegmentDataForMilestoneRewards(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=yield Ku.b.getPreviousChallengeMilestoneRewards(),Y=dt.q.instance.prodigy.gameContainer.get("20f-5f67"),Q=K.getPreviousChallengeUniqueId(),X=this._cachedEnterParams.stateChallengesDataProvider.getPreviousChallengeSuffixForSegmentEvents();for(const K of z)q.setIndividualData(K.type,K.id,{source_id:`${Q}-${K.milestoneIndex}${X}`,instance_id:Y.featureCommon.getCurrentInterfaceID(ws.B.ProdigyChallengeResult),instance_type:Ti.N.StateChallenge,source_type:Ei.C.StateChallengeMilestone})}))}onRewardCompleteGoToNextState(){var q,K,z;null===(q=this._prefabRoot)||void 0===q||q.destroyDeferred();const Y=this._currentSchoolRank>=Vu.LOW_PERFORMANCE_CUTOFF_RANK;let Q;if(Y){Q=null===(z=null===(K=dt.q.instance.prodigy.gameContainer.get("d00-c550").getStateChallengesLeaderboard(Ru.W.CLASSROOM))||void 0===K?void 0:K.myEntry)||void 0===z?void 0:z.rank}const X=dt.q.instance.prodigy.gameContainer.get("476-a586");dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:ws.B.ProdigyChallenge,interfaceType:wi.Wm.Screen,instanceType:Ti.N.UI,originType:wi.$N.ButtonClick},{sub_ui_name:Y?"class":"school",item_list:{challenge_id:X.getCurrentChallengeUniqueId()+this._cachedEnterParams.stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:Y?Q:this._currentSchoolRank}}),this.goToNextState()}goToNextState(){dt.q.instance.prodigy.gameContainer.get("476-a586").markDataAsDirty(),this._cachedEnterParams.stateChallengesDataProvider.isInActiveCompetition()?this._stateMachine.goToState(zu,this._cachedEnterParams).catch(X.RQr.createHandler("StateChallengesPostChallengeState: goToState")):this._cachedEnterParams.rootMenuObject.destroyDeferred()}showMaterialRewards(){if(!X.Aq$.isDefined(this._previousRank)||this._previousRank>5||0===this._materialRewards.length)this._rewardSequenceIndex++,this.showNextRewardInSequence();else{const q=this._materialRewards.shift();q&&Ht.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NATIONAL_CUP_ENDED:!1,STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!0,STATE_CHALLENGES_MATERIAL_REWARD_NAME:q.name,STATE_CHALLENGES_REWARD_ICON:q.icon,STATE_CHALLENGES_REWARD_AMOUNT:`x ${q.amount}`,STATE_CHALLENGES_SHOW_REWARD_AMOUNT:q.amount>0,STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>this.showMaterialRewards(),STATE_CHALLENGES_REWARD_INFO_TEXT:ju.O.YOUR_PRIZES})}}showMilestoneAchievements(){if(0===this._highestMilestoneAchieved)return this._rewardSequenceIndex++,void this.showNextRewardInSequence();const q=Object.keys(Uu.yT.postChallengeMilestoneAssetMap).map(Number).reduce(((q,K)=>K<=this._highestMilestoneAchieved?K:q),0);Ht.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NATIONAL_CUP_ENDED:!1,STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_MILESTONE_PROGRESS_VISIBLE:!0,STATE_CHALLENGES_MILESTONE_VALUE:this._highestMilestoneAchieved,STATE_CHALLENGES_MILESTONE_CREST:[ti._.State_challenges_json,Uu.yT.postChallengeMilestoneAssetMap[q]],STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()},STATE_CHALLENGES_REWARD_INFO_TEXT:ju.O.HIGHEST_MILESTONE})}showNationalCupEnded(){var q,K;const z=null!==(K=null===(q=this._cachedEnterParams)||void 0===q?void 0:q.stateChallengesDataProvider.nationalCupResultsValidated)&&void 0!==K&&K;Ht.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_MILESTONE_PROGRESS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_QUALIFICATION_VISIBLE:!1,STATE_CHALLENGES_REWARDS_NATIONAL_CUP_ENDED:!0,STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()},NATIONAL_CUP_RESULTS_OFFICIAL_TEXT:z?ju.O.NATIONAL_CUP_RESULTS_OFFICIAL:ju.O.NATIONAL_CUP_RESULTS_PENDING_LONG,STATE_CHALLENGES_REWARD_INFO_TEXT:ju.O.NATIONAL_CUP_ENDED_LONG})}showQualification(){var q;if(this._previousRank>5)return void(this._highestMilestoneAchieved>0?(this._rewardSequenceIndex++,this.showNextRewardInSequence()):Ht.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()}}));const K=Ut.O.localeCode,z=null===(q=this._finalsPhaseStartDate)||void 0===q?void 0:q.toLocaleDateString(K,{month:"long",day:"numeric"}),Y=dt.q.instance.prodigy.gameContainer.get(X.Oap);Ht.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_MILESTONE_PROGRESS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_QUALIFICATION_VISIBLE:!0,STATE_CHALLENGES_NEXT_CHALLENGE_DATE:z?`${z}!`:Y.getText("RIFTS_MAX_RIFT_CARD_COMING_SOON"),STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()},STATE_CHALLENGES_REWARD_INFO_TEXT:ju.O.YOU_QUALIFIED,STATE_CHALLENGES_REWARDS_NEXT_BUTTON_TEXT:this.rankIsValid(this._previousRank)&&this._previousRank>1?this._localizer.getText(ju.O.NEXT_CHALLENGE):this._localizer.getText(ju.O.BUTTON_NEXT_CAPITAL)})}}class Qu extends Fu.${enter(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this._prefabGUID=Gt.l.StateChallengesNoDataState,this._prefabRoot=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_NO_DATA_BUTTON_CALLBACK:()=>{q.rootMenuObject.destroyDeferred()}},q.rootMenuObject),Ht.d.updateInjectedValues(q.rootMenuObject,{[Uu.E2.STATE_CHALLENGES_SHOW_HEADER]:!1})}))}}class Xu extends Fu.${enter(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this._prefabGUID=Gt.l.StateChallengesDownTimeState,this._prefabRoot=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_NO_DATA_BUTTON_CALLBACK:()=>{q.rootMenuObject.destroyDeferred()}},q.rootMenuObject),Ht.d.updateInjectedValues(q.rootMenuObject,{[Uu.E2.STATE_CHALLENGES_SHOW_HEADER]:!1});const K=q.stateChallengesDataProvider.downtimeTitleLocalizationKeyOverride,z=q.stateChallengesDataProvider.downtimeSubtitleLocalizationKeyOverride;(X.Aq$.isDefined(K)||X.Aq$.isDefined(z))&&Ht.d.updateInjectedValues(q.rootMenuObject,Object.assign(Object.assign({},X.Aq$.isDefined(K)&&{[Uu.E2.STATE_CHALLENGES_DOWNTIME_TITLE_OVERRIDE]:K}),X.Aq$.isDefined(z)&&{[Uu.E2.STATE_CHALLENGES_DOWNTIME_SUBTITLE_OVERRIDE]:z}))}))}}let Zu=class extends X.uAl{constructor(){super(...arguments),this.onDataInitialized=new X.HN0,this._hasUnseenChallengeResults=void 0,this.onUnseenChallengeResultsSet=new X.HN0}getRacers(){return this._racersContainer.children}create(){this.st=dt.q.instance.prodigy.gameContainer.get("774-4659");const q={[Uu.E2.STATE_CHALLENGES_SHOW_HEADER]:!0,[ms.bL.ShowHeaderText]:!1,[ms.bL.ShowMagicoinText]:!0,[ms.bL.HeaderTitle]:dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("STATE_CHALLENGES_TITLE"),[ms.bL.OnClose]:()=>{this.onCloseMenu().catch((q=>{X.VyI.log("Error attempting to close menu",X.$bb.Error,q)}))}};Ht.d.updateInjectedValues(this.gameObject,q),this._setupPromise=new X.bnh,this.setupInitialState().then((()=>{X.VyI.log("StateChallengesMenu initialized",X.$bb.Info)})).catch(X.RQr.createHandler("StateChallengesMenu: setupInitialState")).finally((()=>{this._setupPromise.resolve()}))}setUnseenChallengeResults(q){this._hasUnseenChallengeResults=Boolean(!q.getInjectedValue(qu.V.IsCurrentChallengeStarted)&&q.getInjectedValue(qu.V.WasPreviousChallengeStarted)),this.onUnseenChallengeResultsSet.dispatch()}setupInitialState(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Z,J;const tt=yield this.st.getCurrentClassCode();if(X.Aq$.isDefined(null===(Y=null===(z=null===(K=null===(q=tt)||void 0===q?void 0:q.data)||void 0===K?void 0:K.player)||void 0===z?void 0:z.currentClassroom)||void 0===Y?void 0:Y.code)){const q=[];q.push(this._stateChallengesDataProvider.initialize()),X.Aq$.isDefined(this._hasUnseenChallengeResults)||q.push(new Promise((q=>{this.onUnseenChallengeResultsSet.addOnce((()=>{q()}))}))),yield Promise.all(q),yield this._stateChallengesDataProvider.checkAndCacheDownTimeState();const K=this.getEnterStateParams();if(this._stateChallengesDataProvider.isCurrentlyInDownTime)return void(yield new ku.w(Xu).goToState(Xu,K));const z=this._stateChallengesDataProvider.getStateChallengesLeaderboard(Ru.W.CLASSROOM);if(!X.Aq$.isDefined(z))return void(yield new ku.w(Qu).goToState(Qu,K));const Y=!this._stateChallengesDataProvider.isInActiveCompetition();if(this._hasUnseenChallengeResults||Y)return void(yield new ku.w(Yu).goToState(Yu,K));const Q=yield this._stateChallengesDataProvider.getCurrentSchoolRanking(),tt=Q>=Vu.LOW_PERFORMANCE_CUTOFF_RANK;tt&&this._stateChallengesDataProvider.setAnimationPlayed();const et=null===(J=null===(Z=this._stateChallengesDataProvider.getStateChallengesLeaderboard(Ru.W.CLASSROOM))||void 0===Z?void 0:Z.myEntry)||void 0===J?void 0:J.rank;dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:ws.B.ProdigyChallenge,interfaceType:wi.Wm.Screen,instanceType:Ti.N.UI,originType:wi.$N.ButtonClick},{sub_ui_name:tt?"class":"school",item_list:{challenge_id:this._questManager.getCurrentChallengeUniqueId()+this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:tt?et:Q}}),this._stateChallengesDataProvider.hasAnimationPlayed?yield new ku.w(Vu).goToState(Vu,K):yield new ku.w(zu).goToState(zu,K)}else yield new ku.w(Wu).goToState(Wu,{rootMenuObject:this.gameObject,onClassCodeSet:()=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.setupInitialState()}))});this.onDataInitialized.dispatch()}))}getEnterStateParams(){return{rootMenuObject:this.gameObject,stateChallengesDataProvider:this._stateChallengesDataProvider,schoolRacerIds:this._stateChallengesDataProvider.schoolRacerIds,schoolPortraitIds:this._stateChallengesDataProvider.schoolPortraitIds,classroomRacerIds:this._stateChallengesDataProvider.classroomRacerIds,classroomPortraitIds:this._stateChallengesDataProvider.classroomPortraitIds}}onCloseMenu(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this._setupPromise,this.gameObject.destroyDeferred()}))}destroy(){this.onDataInitialized.dispose(),this.onUnseenChallengeResultsSet.dispose(),super.destroy()}};(0,Q.Cg)([(0,Qi.b)("d00-c550"),(0,Q.Sn)("design:type",Ru.v)],Zu.prototype,"_stateChallengesDataProvider",void 0),(0,Q.Cg)([(0,Qi.b)("476-a586"),(0,Q.Sn)("design:type",Bu.C)],Zu.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zu.prototype,"onDataInitialized",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zu.prototype,"_racersContainer",void 0),Zu=(0,Q.Cg)([(0,X.EVk)("StateChallengesMenu",et.Y.stateChallenges)],Zu);let Ju=class extends X.uAl{create(){super.create();const q=dt.q.instance.prodigy.gameContainer.get("d00-c550");q.hasValidClassroom().then((K=>{this.gameObject.active=K,q.getCurrentSchoolRanking().then((K=>{this._rankingText.text=K.toString();const z=$u.H.getDaysUntilEndOfCurrentChallenge(q.activeCompetitionPhase,new Date(Date.now()),q.endDate);this._timeLeftText.setTextArguments(z.toString())})).catch(X.RQr.createHandler("StateChallengesLegacyHUDButton: Error retrieving school rank"))})).catch(X.RQr.createHandler("StateChallengesLegacyHUDButton: Error checking for classroom validity"))}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ju.prototype,"_rankingText",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],Ju.prototype,"_timeLeftText",void 0),Ju=(0,Q.Cg)([(0,X.EVk)("StateChallengesLegacyHUDButton",et.Y.stateChallenges)],Ju);var tf=z(24030);let ef=class extends Yi.z{constructor(){super(...arguments),this.onDataReady=new X.HN0}create(){super.create();const q=(0,tf.$)(this._stateChallengesDataProvider.viewableCompetitionPhase);q&&this._stateChallengeGoalsQuestManager.getQuestTasks(q).then((()=>{this._bindOnCreate&&this.bindContext().catch(X.RQr.createHandler("[StateChallengeGoalsDataProvider] Unable to bind context after getting quest tasks"))})).catch(X.RQr.createHandler(`[StateChallengeGoalsDataProvider] Unable to get quest tasks for ${q}`))}bindContext(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield Ku.b.getData();this.gameObject&&q&&Ht.d.updateInjectedValues(this.gameObject,q),this.onDataReady.dispatch(this._context)}))}destroy(){this.onDataReady.dispose(),super.destroy()}};(0,Q.Cg)([(0,Qi.b)("d00-c550"),(0,Q.Sn)("design:type",Ru.v)],ef.prototype,"_stateChallengesDataProvider",void 0),(0,Q.Cg)([(0,Qi.b)("476-a586"),(0,Q.Sn)("design:type",Bu.C)],ef.prototype,"_stateChallengeGoalsQuestManager",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ef.prototype,"_bindOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ef.prototype,"onDataReady",void 0),ef=(0,Q.Cg)([(0,X.EVk)("StateChallengeGoalsDataProvider",X.YH6.injection)],ef);var sf,nf=z(76974),af=z(38920);!function(q){q.RewardReady="reward-ready",q.RewardCollect="reward-collect"}(sf||(sf={}));let rf=class extends X.uAl{constructor(){super(...arguments),this._scrollViewPadding=483,this._numRewardsCollected=0,this._goalPrefabs=[],this._slideTweenDurationMs=850,this._slideTweenDelayMs=100,this._fadeInTweenDurationMs=300,this._fadeInTweenDelayMultiplierMs=100,this._goalMaxScale=1.2,this._goalMinScale=.95}create(){super.create(),this.sendInterfaceSegmentEvent().catch((q=>{X.VyI.log("StateChallengeGoalsControllerComponent: Error sending Interface event.",X.$bb.Error,q)}))}destroy(){var q,K,z;null===(z=null===(K=null===(q=this._scrollView)||void 0===q?void 0:q.slider)||void 0===K?void 0:K.onValueChanged)||void 0===z||z.remove(this.scaleGoals,this),No.s.stopRecording(),super.destroy()}loadPrefabs(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this._gridLayout||!this._scrollView)return;No.s.startRecording("StateChallengeGoalsController","state_challenge_goals");const K=[];for(const Q in q)q.hasOwnProperty(Q)&&K.push(q[Q]);const z=[],Y=this.getCenteredGoalIndex(K);K.forEach((q=>{q.index=q.index-1;const K={[qu.Z.DisplayCardRewardIndex]:q.index+1,[qu.Z.DisplayCardRewardAssetIcon]:this.getAssetImageData(q.task),[qu.Z.DisplayCardRewardQuantity]:this.getAssetQuantityData(q.task),[qu.Z.DisplayCardQuestionsAnswered]:Lu.X.getQuestionsAnsweredFromTaskInThousandFormat(q.task),[qu.Z.DisplayCardIsCollected]:q.isComplete&&!q.isCollectible,[qu.Z.DisplayCardReadyToCollect]:q.isCollectible,[qu.Z.DisplayCardIsActive]:!0,[qu.Z.DisplayCardBackground]:Lu.X.getMilestoneBackingFrame(Lu.X.getQuestionsAnsweredFromTask(q.task)),[qu.Z.DisplayCardIsFocused]:q.index===Y};z.push(Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.StateChallengeGoalsCard,K))})),this._goalPrefabs=yield Promise.all(z),this._contentGameObject.addChild(this.createEmptyCell(this._scrollViewPadding)),this._goalPrefabs.forEach(((q,z)=>{const Y=K[z];this._contentGameObject.addChild(q),Ht.d.updateInjectedValues(q,{[qu.Z.DisplayCardCollectCallback]:()=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.onCollectButtonClicked(q,K,Y)}))})})),this._contentGameObject.addChild(this.createEmptyCell(this._scrollViewPadding)),this._gridLayout.updateAll();const Z=this._gridLayout.columnSpacing,J=this._goalPrefabs[0].transform.sizeDelta.width+Z;this._scrollView.slider.stepValue=J,this._scrollView.slider.onValueChanged.add(this.scaleGoals,this),this._scrollView.setScrollPosition(this.getScrollPositionForGoal(Y<2?0:Y-2)),this.scaleGoals(),this.fadeInGoals(Y<2?0:Y-2),dt.q.instance.game.add.tween(this._scrollView.slider,this).to({value:this.getScrollPositionForGoal(Y)},this._slideTweenDurationMs,X.GS3.Exponential.InOut).delay(this._slideTweenDelayMs).start()}))}getScrollPositionForGoal(q){const K=this._gridLayout.columnSpacing,z=this._goalPrefabs[0].transform.sizeDelta.width+K,Y=this._scrollView.GameObject.transform.sizeDelta.getHalfWidth();return-(this._scrollViewPadding+(q+1)*z+K/2-z/2-Y)}fadeInGoals(q){this._goalPrefabs.filter(((K,z)=>z>=q-2&&z<=q+2)).map(((q,K)=>{const z=q.findComponent(X.jsv);if(!z)return;z.alpha=0,z.updateFilter();dt.q.instance.game.add.tween(z,this).to({alpha:1},this._fadeInTweenDurationMs,X.GS3.Quadratic.Out).delay(K*this._fadeInTweenDelayMultiplierMs).start().onUpdate.add((()=>{z.updateFilter()}))}))}scaleGoals(){var q;if(!(null===(q=this._scrollView)||void 0===q?void 0:q.rectTransform))return;const K=this._scrollView.rectTransform.sizeDelta.getHalfWidth();this._goalPrefabs.forEach((q=>{const z=q.transform.worldPosition.x,Y=Math.abs(z-K),Q=Y>=K/2?this._goalMinScale:(this._goalMinScale-this._goalMaxScale)/(K/2)*Y+this._goalMaxScale;q.transform.setScale(Q,Q)}))}getAssetImageData(q){var K,z,Y;const Q=null===(Y=null===(z=null===(K=null==q?void 0:q.onComplete)||void 0===K?void 0:K[0].data)||void 0===z?void 0:z.itemDrops)||void 0===Y?void 0:Y[0];return Q?[Q.ID.toString(),Q.type]:["",""]}getAssetQuantityData(q){var K,z,Y;const Q=null===(Y=null===(z=null===(K=null==q?void 0:q.onComplete)||void 0===K?void 0:K[0].data)||void 0===z?void 0:z.itemDrops)||void 0===Y?void 0:Y[0];return(null==Q?void 0:Q.N)>1?`+${(0,af.Hk)(Q.N,void 0,",")}`:""}setButtonEnabledStates(q){q?this._closeButton.unlockState():this._closeButton.lockState(nf.K.Disabled),this._goalPrefabs.forEach((K=>{Ht.d.updateInjectedValues(K,{[qu.Z.DisplayCardCollectButtonEnabledState]:q})}))}collectMilestoneReward(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=K+1,Y=this._questManager.getCurrentChallengeUniqueId();if(!Y)return X.RQr.createHandler("[StateChallengeGoalsControllerComponent] claim ID is invalid"),void this.setButtonEnabledStates(!0);const Q=`${Y}_claim_${z}`;try{const q=dt.q.instance.prodigy.gameContainer.get("20f-5f67").item.beginSecureItemTransaction();yield this._questManager.claimStateChallengeGoalsReward(Q),q.flush({})}catch(J){X.RQr.createHandler("[StateChallengeGoalsControllerComponent] claiming reward failed")}finally{this.setButtonEnabledStates(!0)}this._numRewardsCollected+=1,q[K].isCollectible=!1;const Z=this.getCenteredGoalIndex(q);this.showNewCenteredGoal(K,Z),this._scrollView.setScrollPosition(this.getScrollPositionForGoal(Z))}))}onCollectButtonClicked(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){var Y,Q,X,Z,J,tt,et,it;const st=null===(Q=null===(Y=z.task)||void 0===Y?void 0:Y.onComplete)||void 0===Q?void 0:Q[0],nt=null===(Z=null===(X=null==st?void 0:st.data)||void 0===X?void 0:X.itemDrops)||void 0===Z?void 0:Z[0];if((null==st?void 0:st.type)===Dl.s.GOT_PET&&nt){const q=dt.q.instance.prodigy.gameContainer.get("20f-5f67"),K=dt.q.instance.prodigy.gameContainer.get("476-a586");q.item.sendItemReceivedEvent(nt.ID,null!==(et=null===(tt=null===(J=ae.t.getItem(nt.type,nt.ID))||void 0===J?void 0:J.data)||void 0===tt?void 0:tt.name)&&void 0!==et?et:"unknown",nt.type,null!==(it=nt.N)&&void 0!==it?it:1,{source_type:Ei.C.StateChallengeMilestone,source_id:`${K.getCurrentChallengeUniqueId()}-${z.index+1}${this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents()}`,instance_type:Ti.N.StateChallenge,instance_id:q.featureCommon.getCurrentInterfaceID(ws.B.ProdigyChallenge),transaction_id:Vt.$.generateUID()})}const at=q.findComponentInChildren(Bs.j);this.setButtonEnabledStates(!1),at?(at.playAnimation(sf.RewardCollect,!1),yield at.OnAnimationComplete.asPromise(),at.GameObject.parent.active=!1,yield this.collectMilestoneReward(K,z.index)):yield this.collectMilestoneReward(K,z.index)}))}createEmptyCell(q){const K=new X._mx;return K.addComponent(X.XVE,!0).setSizeDelta(q,0),this._contentGameObject.addChild(K),K}getCenteredGoalIndex(q){const K=q.findIndex((q=>q.isCollectible));if(K>=0)return K;const z=q.findIndex((q=>!q.isComplete));return-1===z?q.length-1:z}showNewCenteredGoal(q,K){if(q===K)return;const z=this._goalPrefabs[q],Y=this._goalPrefabs[K];z&&Ht.d.updateInjectedValues(z,{[qu.Z.DisplayCardIsFocused]:!1}),Y&&Ht.d.updateInjectedValues(Y,{[qu.Z.DisplayCardIsFocused]:!0})}sendInterfaceSegmentEvent(){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:ws.B.ProdigyChallengeMilestoneRewards,interfaceType:wi.Wm.Modal,instanceType:Ti.N.UI,originType:wi.$N.ButtonClick,originID:Us.k.StateChallengesViewMilestonesButton},{item_list:{challenge_id:this._questManager.getCurrentChallengeUniqueId()+this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:yield this._stateChallengesDataProvider.getCurrentSchoolRanking()}})}))}};(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],rf.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("476-a586"),(0,Q.Sn)("design:type",Bu.C)],rf.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.Cdj)("d00-c550"),(0,Q.Sn)("design:type",Ru.v)],rf.prototype,"_stateChallengesDataProvider",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],rf.prototype,"_contentGameObject",void 0),(0,Q.Cg)([(0,X.MnK)(X.Sz7),(0,Q.Sn)("design:type",X.Sz7)],rf.prototype,"_gridLayout",void 0),(0,Q.Cg)([(0,X.MnK)($t.C),(0,Q.Sn)("design:type",$t.C)],rf.prototype,"_scrollView",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],rf.prototype,"_closeButton",void 0),rf=(0,Q.Cg)([(0,X.EVk)("StateChallengeGoalsController",et.Y.stateChallenges)],rf);z(74712);var of,hf=z(82351),cf=z(6413);let df=of=class extends Yi.z{create(){super.create(),this.bindContext()}bindContext(){const q="FTUE_STARTER_PET_IS_ACTIVE_";Wt.l.pad(cf.h.STARTER_PETS,5,null).forEach(((K,z)=>{var Y,Q;const Z=ae.t.getItem("pet",K);X.Aq$.isDefined(Z)?(this._context.Container.bind(q+z).toConstantValue(!0),this._context.Container.bind("FTUE_STARTER_PET_NAME_"+z).toConstantValue(Z.data.name),this._context.Container.bind("FTUE_STARTER_PET_DEFAULT_SPINE_ID_"+z).toConstantValue(vs.Q[Z.metadata.assets.default.assetKey]),this._context.Container.bind("FTUE_STARTER_PET_UPSCALED_SPINE_ID_"+z).toConstantValue(vs.Q[Z.metadata.assets.upscaled.assetKey]),this._context.Container.bind("FTUE_STARTER_PET_ICON_ID_"+z).toConstantValue(Ts.E.getIconForType("pet",K)),this._context.Container.bind("FTUE_STARTER_PET_SFX_ID_"+z).toConstantValue(hf.B[Z.metadata.assets.interactSfx]),this._context.Container.bind("FTUE_STARTER_PET_X_POSITION_OFFSET_"+z).toConstantValue(null!==(Y=of.PET_X_POSITION_OFFSETS_MAP[Z.ID])&&void 0!==Y?Y:0),this._context.Container.bind("FTUE_STARTER_UPSCALED_PET_X_POSITION_OFFSET_"+z).toConstantValue(null!==(Q=of.UPSCALED_PET_X_POSITION_OFFSETS_MAP[Z.ID])&&void 0!==Q?Q:0)):this._context.Container.bind(q+z).toConstantValue(!1)})),this.gameObject.findComponentsInChildren(Wo.B).forEach((q=>q.consume()))}getPetIdfromIndex(q){return cf.h.STARTER_PETS[q]}};var lf;df.PET_X_POSITION_OFFSETS_MAP={139:-13,148:-10},df.UPSCALED_PET_X_POSITION_OFFSETS_MAP={139:-20,148:-20},df=of=(0,Q.Cg)([(0,X.EVk)("StarterPetDataProvider",et.Y.ftue)],df);let uf=lf=class extends Yi.z{setPetIdBySelectionIndex(q){this._petId=cf.h.STARTER_PETS[q],this.bindContext()}bindContext(){var q;const K=ae.t.getItem("pet",this._petId);if(X.Aq$.isDefined(K)){this._context.Container.bind("FTUE_SELECTED_STARTER_PET_DEFAULT_SPINE_ID").toConstantValue(vs.Q[K.metadata.assets.default.assetKey]),this._context.Container.bind("FTUE_SELECTED_STARTER_PET_UPSCALED_SPINE_ID").toConstantValue(vs.Q[K.metadata.assets.upscaled.assetKey]),this._context.Container.bind("FTUE_SELECTED_STARTER_PET_CARD_DATA").toConstantValue({PET_RESCUE_CREATURE_DATA:{ID:K.ID,name:K.data.name,level:lf.STARTER_PET_INITIAL_LEVEL},PET_RESCUE_BUTTON_TEXT_KEY:"EPIC_VIEWER_ADD_TO_TEAM",PET_RESCUE_STAMP_ENABLED:!1});const z=[{type:"pet",ID:K.ID,N:1}];this._context.Container.bind("FTUE_SELECTED_STARTER_PET_AWARD_DATA").toConstantValue(z),this._context.Container.bind("FTUE_SELECTED_STARTER_PET_INTERACT_SCENE_X_OFFSET").toConstantValue(null!==(q=lf.PET_X_POSITION_OFFSETS_MAP[this._petId])&&void 0!==q?q:0)}}};uf.PET_X_POSITION_OFFSETS_MAP={148:-60,139:150,142:50},uf.STARTER_PET_INITIAL_LEVEL=1,uf=lf=(0,Q.Cg)([(0,X.EVk)("SelectedStarterPetDataProvider",et.Y.ftue)],uf);var ff=z(435);let bf=class extends X.uAl{constructor(){super(...arguments),this.onError=new X.HN0}startBattle(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=dt.q.instance.prodigy;try{const K=this._currentPlayerProvider.player;yield this.setQuestData();const z=yield dt.q.instance.prodigy.gameContainer.get("b37-c775").getBattleStartQuestData(ki.gu.Ultimates),Y=q.world.getCurrentZone(),Q=q.world.getCurrentMapTag(),X=q.world.getZone(Y).getMap(Q).battleBG,Z={battleType:ki.gu.Ultimates,difficulty:10,isMock:this.isMockBattle,questId:K.ultimateQuestId,taskId:K.ultimateTaskId,activeQuestIDs:z.questIDs,questEventsToSend:z.questEvents},J={backgroundID:X,backgroundMusicID:2,onEscape:()=>{this.onBattleComplete(!1)},onDefeat:()=>{this.onBattleComplete(!1)},onVictory:()=>{this.onBattleComplete(!0)},onFatalError:()=>{this.onBattleComplete(!1)}};dt.q.instance.prodigy.game.state.states.get(Nt.G.SecureBattleRevamp).startBattleRequest(Z,J)}catch(e){X.VyI.log(`There was a problem loading battle data for Ultimates battle in StartUltimatesBattleComponent.startBattle: ${e.message}`,X.$bb.Error),this.onError.dispatch()}}))}setQuestData(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._currentPlayerProvider.player,K=(yield this._questDataProvider.getCurrentQuestData()).find((K=>K.questID===q.ultimateQuestId));this.tamingPhase=K.getTamingLevel(),this.ultimateQuestId=K.questID,this.petId=K.petID,this.isMockBattle=!1}))}onBattleComplete(q){const K=this._currentPlayerProvider.player;dt.q.instance.game.broadcaster.addAppListener(Xn.ig.PlayerLoaded,(()=>{const z=dt.q.instance.prodigy.open.showFullScreenSpinner();this._questManager.updateQuestProgress(this.ultimateQuestId).then((()=>{(!q||this.tamingPhase<2)&&dt.q.instance.prodigy.open.pets()})).catch((q=>{X.VyI.log(`[StartUltimateBattleComponent] Unable to load quest progress ${X.RQr.stringify(q)}`,X.$bb.Error),dt.q.instance.prodigy.open.prefabMenu(Gt.l.ErrorDialogContentRefresh).createContainer=!1})).finally((()=>{z.destroy()})),dt.q.instance.game.broadcaster.removeAppListener(Xn.ig.PlayerLoaded,this,void 0),K.unlockSessionStatus()}),this,void 0,!0),K.setUltimateSessionStatus(bl.n.Transition,"",0,!0)}destroy(){dt.q.instance.game.broadcaster.removeAppListener(Xn.ig.PlayerLoaded,this,void 0),this.onError.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],bf.prototype,"_currentPlayerProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("d24-279f"),(0,Q.Sn)("design:type",Object)],bf.prototype,"_questDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("60d-57ca"),(0,Q.Sn)("design:type",yu.u)],bf.prototype,"_battleHPProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("996-2681"),(0,Q.Sn)("design:type",il.k)],bf.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],bf.prototype,"onError",void 0),bf=(0,Q.Cg)([(0,X.EVk)("StartUltimatesBattle",et.Y.ultimates)],bf);let pf=class extends bf{setQuestData(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this._questData)return void X.VyI.log("Could not start mock ultimates battle. No UltimatesQuestData could be found in context.",X.$bb.Error);this.tamingPhase=0,this.petId=this._questData.petID,this.ultimateQuestId=this._questData.questID,this.isMockBattle=!0,this.battleDifficulty="easy";const q=this._currentPlayerProvider.player;this._currentMap=dt.q.instance.prodigy.world.getCurrentMap(),q.setUltimateSessionStatus(bl.n.TamingUltimate,this._questData.questID,-1)}))}onBattleComplete(q){const K=this._currentPlayerProvider.player;K.setUltimateSessionStatus(bl.n.Transition,"",0,!0),dt.q.instance.prodigy.world.it(this._currentMap),dt.q.instance.game.broadcaster.addAppListener(Xn.ig.PlayerLoaded,(()=>{dt.q.instance.prodigy.open.pets(),dt.q.instance.game.broadcaster.removeAppListener(Xn.ig.PlayerLoaded,this,void 0),K.unlockSessionStatus()}),this,void 0,!0)}sendSegmentEvent(){dt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:Us.k.TryABattle,interfaceType:wi.Wm.DialogBox,interfaceName:ws.B.PetsWindow,elementType:"mythic_task",elementID:this.ultimateQuestId})}};(0,Q.Cg)([(0,X.Cdj)("UltimatesQuestData"),(0,Q.Sn)("design:type",ff.p)],pf.prototype,"_questData",void 0),pf=(0,Q.Cg)([(0,X.EVk)("StartMockUltimatesBattle",et.Y.ultimates)],pf);var vf,gf=z(24285),mf=z(93171);!function(q){q.InProgress="inprogress",q.Transition="idle",q.Full="FULL"}(vf||(vf={}));let yf=class extends X.uAl{constructor(){super(...arguments),this.onValueChangeComplete=new X.HN0}setState(q,K,z){const Y=K?vf.Full:vf.InProgress;this.heartAnimator.playAnimation(this.getAnimationName(Y),!0),this._tintOverlay.active=K,this._highlightBack.active=K||q,this._highlightStroke.active=q,this._progressCompleteIcon.active=K,this._progressBarTrack.active=q,this._membershipLockIcon.active=z,setTimeout((()=>X.qFr.setSmoothed(this._membershipLockIcon.findComponentInChildren(X.vYh).image.texture,!0)),se.A.SECONDS_TO_MILLISECONDS_MULTIPLIER),this.setValue(K?1:0,!1)}setValue(q,K){if(!K)return this.setInitialState(q),this._progressBar.setValue(q),void this.onValueChangeComplete.dispatch();this._progressBar.tweenValue(q),1===q&&(this.heartAnimator.OnAnimationComplete.addOnce((()=>{this.heartAnimator.OnAnimationComplete.addOnce((()=>{this.onValueChangeComplete.dispatch()})),this.heartAnimator.stopAnimation(),this.heartAnimator.playAnimation(this.getAnimationName(vf.Full),!0)})),this.heartAnimator.stopAnimation(),this.heartAnimator.playAnimation(this.getAnimationName(vf.Transition),!1)),this._progressBar.onComplete.addOnce((()=>{1===q?this._progressCompleteIcon.active=!0:this.onValueChangeComplete.dispatch()}))}setInitialState(q){this._progressCompleteIcon.active=1===q,1===q?this.heartAnimator.playAnimation(this.getAnimationName(vf.Full),!0):this.heartAnimator.playAnimation(this.getAnimationName(vf.InProgress),!0)}getAnimationName(q){return`Heart-${this._slot}-${q}`}destroy(){this.heartAnimator.OnAnimationComplete.removeAll(),this.onValueChangeComplete.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],yf.prototype,"_slot",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],yf.prototype,"heartAnimator",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yf.prototype,"_tintOverlay",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yf.prototype,"_highlightBack",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yf.prototype,"_highlightStroke",void 0),(0,Q.Cg)([(0,X.MnK)(mf.a),(0,Q.Sn)("design:type",mf.a)],yf.prototype,"_progressBar",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yf.prototype,"_progressBarTrack",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yf.prototype,"_progressCompleteIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yf.prototype,"_membershipLockIcon",void 0),yf=(0,Q.Cg)([(0,X.EVk)("UltimatesHealthBarSegment",et.Y.ultimates)],yf);let _f=class extends X.uAl{constructor(){super(...arguments),this._segments=[],this._tamingPhase=1}get onHealthChangeComplete(){return this._activeSegment.onValueChangeComplete}setLayerDepths(q,K,z){const Y=X.wa5.getActiveScene();Y.setLayerDepth(this._background.layer,q),this._segments.forEach((q=>{Y.setLayerDepth(q.GameObject.layer,q===this._activeSegment?z:K)})),Y.setLayerDepth(this._membershipIconContainer.layer,z)}init(q,K){this._tamingPhase=X.cj9.clamp(q,1,this._segments.length),this._segments.forEach(((q,z)=>{q.setState(z===this._tamingPhase-1,z0&&(Y=(this._maxHealth-X.cj9.clamp(q,0,this._maxHealth))/this._maxHealth),this._activeSegment.setValue(Y,z)}cacheAsBitmap(q,K){K?gf.s.setLayerCacheAsBitmap(this._activeSegment.GameObject.layer,q):(gf.s.setLayerCacheAsBitmap(this._background.layer,q),this._segments.forEach((K=>{gf.s.setLayerCacheAsBitmap(K.GameObject.layer,q)})))}};(0,Q.Cg)([(0,X.MnK)(yf),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],_f.prototype,"_segments",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],_f.prototype,"_background",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],_f.prototype,"_membershipIconContainer",void 0),_f=(0,Q.Cg)([(0,X.EVk)("UltimatesBattleHealthBarComponent",et.Y.ultimatesUi)],_f);var Ef=z(37155);let wf=class extends X.uAl{constructor(){super(...arguments),this.onClose=new X.HN0}init(q,K){const z=K?"ULTIMATES_TRIAL_BATTLE_TITLE_VICTORY":"ULTIMATES_TRIAL_BATTLE_TITLE_DEFEAT",Y=K?"ULTIMATES_TRIAL_BATTLE_DESC_VICTORY":"ULTIMATES_TRIAL_BATTLE_DESC_DEFEAT",Q=this._currentPlayerProvider.player.getName();this._headerText.setLocalizationKey(z),this._descriptionText.setLocalizationKey(Y),this._descriptionText.setTextArguments(Q),this._ultimatePet.init(q)}destroy(){this.onClose.dispatch(),this.onClose.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],wf.prototype,"_currentPlayerProvider",void 0),(0,Q.Cg)([(0,X.MnK)(Ef.i),(0,Q.Sn)("design:type",Ef.i)],wf.prototype,"_ultimatePet",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],wf.prototype,"_headerText",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],wf.prototype,"_descriptionText",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wf.prototype,"onClose",void 0),wf=(0,Q.Cg)([(0,X.EVk)("UltimatesTrialPostBattle",et.Y.ultimatesUi)],wf);var Tf=z(34398);let Sf=class extends Tf.l{constructor(){super(...arguments),this._funnelName=un.o.FunnelTransitMap,this._campaign=Ys.R.None,this._sendPromotedAd=!1,this._showVideo=!0,this._injectionIdentifiers=[]}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._loggedInPlayer.player,K=q.hasMembership();return!(!q.hasCompletedTutorial()||q.memberPrompt)&&(!(!K&&re.J.isSchoolHours()||K&&q.backpack.hasItem("mount",1)>0)&&(!q.isPlayingAtSchool()||K&&0===q.backpack.hasItem("mount",1)))}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,arguments,void 0,(function*(K=!1,z=!1){yield q.open.call(this),dt.q.instance.game.broadcaster.broadcast(Xn.iZ.ToolTipClosed);const Y={};let Q;this._injectionIdentifiers.forEach((q=>Y[q]=this.getInjectedValue(q)));const Z=new Promise((q=>{Q=this._loggedInPlayer.player.rewardMembershipPrizes(q)})),J=yield Q;Z.then((()=>{if(J)this.onClose.dispatch();else{const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;dt.q.instance.prodigy.open.membershipInfo((()=>{q.memberPrompt=!0,this.onClose.dispatch()}),{conversionFunnelName:this._funnelName,conversionStaticOrVideo:this._campaign},this._analyticSource,K,Y)}})).catch(X.RQr.createHandler("Error opening membership ad"))}))}overrideConversionEvent(q,K){this._funnelName=q,this._campaign=K}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Sf.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.gfw)(un.o),(0,Q.Sn)("design:type",String)],Sf.prototype,"_funnelName",void 0),(0,Q.Cg)([(0,X.gfw)(Ys.R),(0,Q.Sn)("design:type",String)],Sf.prototype,"_campaign",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Sf.prototype,"_sendPromotedAd",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Sf.prototype,"_analyticSource",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Sf.prototype,"_showVideo",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],Sf.prototype,"_injectionIdentifiers",void 0),Sf=(0,Q.Cg)([(0,X.EVk)("OpenMembershipAdPopup",et.Y.membership)],Sf);let Af=class extends pd.b{initialize(){var q;super.initialize();const K=new bd.N,{r:z,g:Y,b:Q}=X.Q1f.hexToColor(null!==(q=this._color)&&void 0!==q?q:"#000000"),Z=X.Aq$.isDefined(this._alpha)?this._alpha:1;K.matrix=[0,0,0,0,z/255,0,0,0,0,Y/255,0,0,0,0,Q/255,0,0,0,Z,0],this._filterList.push(K)}};(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Af.prototype,"_color",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Af.prototype,"_alpha",void 0),Af=(0,Q.Cg)([(0,X.EVk)("ShadowFilter",et.Y.effect)],Af);let Cf=class extends X.uAl{constructor(){super(...arguments),this._ultimateIcon=null,this._nameText=null,this._levelText=null,this._heartsText=null,this._progressText=null,this._unknownText=null,this._tamedIconObject=null,this._levelStarObject=null,this._heartsObject=null,this.popOptions=null,this.addButton=null,this.infoButton=null,this._greyscaleFilter=null,this._shadowFilter=null,this._progressThreshold=25,this.onCardLoaded=new X.HN0}create(){super.create(),this._ultimateIcon.onIconLoaded.add((()=>{this.onCardLoaded.dispatch()}))}destroy(){super.destroy(),this.onCardLoaded.dispose()}setTamed(q,K,z){this.setPetData(q),this._tamedIconObject.active=!0,this._levelStarObject.active=!0,this._heartsObject.active=!0,this._progressText.GameObject.active=!1,this._unknownText.GameObject.active=!1,this._nameText.GameObject.active=!0,this._levelText.text=K.toString(),this._heartsText.text=z.toString(),this._greyscaleFilter.removeFilter(),this._shadowFilter.removeFilter()}setUntamed(q,K){this.setPetData(q);const z=X.cj9.clamp(K,0,100),Y=z{q.destroy()})),this._untamedList.children.slice().forEach((q=>{q.destroy()}))}showEmptyList(){this._emptyList.active=!0,this._tamedList.parent.active=!1,this._untamedList.parent.active=!1,this.dispatchLoaded()}initList(q,K){if(!q||q.length<=0)return void(K.parent.active=!1);K.parent.active=!0;K.parent.transform.posY=this._yDepth,q.forEach((q=>{this.createCard(q,K)}),this),this._yDepth+=Math.ceil(q.length/this._petRowSize)*this._petGap+this._listGap}createCard(q,K){this._prefabLoader.loadWithDependenciesFromGUID(Gt.l.UltimatesInventoryCard,K).then((z=>{this.initCard(z,q,K)})).catch((q=>{this.onError.dispatch(),X.VyI.log(`[PetInventoryViewComponent]: Error loading prefab ${Gt.l.UltimatesInventoryCard}. Reason: ${q.message}`,X.$bb.Error)}))}initCard(q,K,z){const Y=q.findComponent(Cf);Y.onCardLoaded.addOnce(this.finishedLoading.bind(this));const Q=q.findComponent(Ye.n),Z=K;if(X.Aq$.isDefined(Z.id)){const q=ae.t.getItem("pet",Z.id);Y.setUntamed(q,Math.floor(100*Z.accomplishedTasks/Z.totalTasks)),Y.infoButton.onEnabledClick.add((()=>this.onInfoClicked.dispatch(Z.id))),Q.onClicked.add((()=>{this.togglePopOptions(Y,Z.id,!1),this.onUntamedCardClicked.dispatch(Z.id)}))}else{const q=K,z=ae.t.getItem("pet",q.ID);Y.setTamed(z,q.level,uo.P8.getPetCurrentHealth(q)),Y.addButton.onEnabledClick.add(this.disablePopOptions,this),Y.addButton.onEnabledClick.add((()=>this.onAddClicked.dispatch(q))),Y.infoButton.onEnabledClick.add((()=>this.onInfoClicked.dispatch(q.ID))),Q.onClicked.add((()=>{this.togglePopOptions(Y,q.ID,!0),this._segmentButtonProperties.buttonName=q.name,this.onTamedCardClicked.dispatch(q.ID)}))}z.addChild(q)}finishedLoading(){0==--this._unloadedElements&&(this.resizeContainer(),this.dispatchLoaded(),this.fixRenderOrder(this._tamedList),this.fixRenderOrder(this._untamedList))}resizeContainer(){const q=this._emptyList.parent.transform,K=q.widthDelta;q.setSizeDelta(K,Math.max(this._yDepth,this._minimumContainerHeight))}fixRenderOrder(q){q.children.forEach(((K,z)=>K.setRenderOrder(q.children.length-z)))}dispatchLoaded(){this._unloadedElements=-1,this.onLoaded.dispatch()}togglePopOptions(q,K,z){this._tamedList.children.concat(this._untamedList.children).map((q=>q.findComponent(Cf))).filter((K=>K!==q)).forEach((q=>q.popOptions.active=!1)),q.popOptions.active=!q.popOptions.active,q.GameObject.bringToFront(),z&&this._player.player.kennel.petTeam.every((q=>(null==q?void 0:q.getID())!==K))?q.addButton.unlockState():q.addButton.lockState(nf.K.Disabled)}disablePopOptions(){this._tamedList.children.concat(this._untamedList.children).map((q=>q.findComponent(Cf))).filter((q=>q.popOptions)).forEach((q=>q.popOptions.active=!1))}destroy(){this.gameObject.onActiveInHierarchyChanged.remove(this.disablePopOptions,this),this.onTamedCardClicked.dispose(),this.onUntamedCardClicked.dispose(),this.onInfoClicked.dispose(),this.onAddClicked.dispose(),this.onLoaded.dispose(),this.onError.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Of.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Of.prototype,"_player",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Of.prototype,"_listGap",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Of.prototype,"_petGap",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Of.prototype,"_minimumContainerHeight",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Of.prototype,"_petRowSize",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Of.prototype,"_emptyList",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Of.prototype,"_tamedList",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Of.prototype,"_untamedList",void 0),(0,Q.Cg)([(0,X.MnK)(hn),(0,Q.Sn)("design:type",hn)],Of.prototype,"_segmentButtonProperties",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Of.prototype,"onLoaded",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Of.prototype,"onError",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Of.prototype,"onAddClicked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Of.prototype,"onInfoClicked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Of.prototype,"onTamedCardClicked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Of.prototype,"onUntamedCardClicked",void 0),Of=(0,Q.Cg)([(0,X.EVk)("PetInventoryView",et.Y.ultimatesUi)],Of);var If=z(62430);let Df=class extends X.uAl{constructor(){super(...arguments),this.onPostFrames=new X.HN0,this._counter=Number.MAX_SAFE_INTEGER}get counter(){return this._counter}start(){this._counter=0}update(){super.update(),this._counter=this._segments.length?X.VyI.log(`[StaticUltimatesTamingMeter] Error setting the taming level: index ${q} out of range`,X.$bb.Error):this._segments.forEach(((K,z)=>{K.active=z===q}))}};var Bf;(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],kf.prototype,"_segments",void 0),kf=(0,Q.Cg)([(0,X.EVk)("StaticUltimatesTamingMeter",et.Y.ultimatesUi)],kf);let Uf=Bf=class extends X.uAl{constructor(){super(...arguments),this.onLoaded=new X.HN0,this.onError=new X.HN0,this.onAddToTeamClicked=new X.HN0}init(q,K,z=!1){var Y,Q,X;this._componentData=q,this.nt=K,this._panelOverlay.GameObject.active=!0,this._tamedAddToTeamButton.GameObject.active=!1;this._addToTeam.GameObject.parent.active=!1,this._tamingMeter.GameObject.active=!1,this._tamedLabel.active=!1,this._leavingSoon.active=!1,this._notStartedLabel.active=!1,this._startQuest.unlockState(),K?this.initNonMember():z&&(this._ftueBreadcrumb.isIncomplete.addOnce(this.initializeFTUE,this),this._ftueBreadcrumb.checkCompletion()),this._componentData.petItem=ae.t.getItem("pet",q.petId);const Z=null===(Q=null===(Y=this._componentData.petItem)||void 0===Y?void 0:Y.metadata)||void 0===Q?void 0:Q.assets;if("spine"!==(null===(X=null==Z?void 0:Z.card)||void 0===X?void 0:X.type))throw this.onError.dispatch(),new Error(`Pet ${q.petId} doesn't have a card component with a spine associated to it`);dt.q.instance.prodigy.load.assets([`spine-${Z.card.ID}`],this.initPetAndQuestData.bind(this))}disable(){this._startQuest.lockState(nf.K.Disabled),this._panelOverlay.GameObject.active=!1}initializeFTUE(){this._startQuest.onEnabledClick.addOnce(this.finalizeFTUE,this)}finalizeFTUE(){dt.q.instance.prodigy.gameContainer.get("20f-5f67").ultimatesFTUE.sendFunnelEvent({funnelName:"mythics_ftue",funnelType:"tutorial",stepName:"open_mythic_detail_view",step:Rf.V.OpenMythicDetailView})}addToTeamClicked(q=!1){const K=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.onAddToTeamClicked.dispatch(K.kennel.getPetByID(this._componentData.petId)),q&&this.toggleAddPop()}initPetAndQuestData(){switch(this._componentData.questState){case Lf.e.Start:this.initStart();break;case Lf.e.QuestAccepted:this.initAccepted();break;case Lf.e.Found:this.initFound();break;case Lf.e.QuestCompleted:this.initCompleted()}}initStart(){this._petName.GameObject.active=!1,this._nameTease.active=!0,this._taskProgress.active=!1,this._questionMark.active=!0,this._startQuest.GameObject.active=!0,this._petSpine.onSpineItemLoaded.addOnce(this._shadowFilter.applyFilter.bind(this._shadowFilter)),this._petSpine.onSpineItemLoaded.addOnce(this._freezeFrameWait.start.bind(this._freezeFrameWait)),this._panelOverlay.GameObject.active=!1,this._addToTeam.lockState(nf.K.Disabled),this._tamedLabel.active=!1,this._unseenBackground.active=!0,this._seenBackground.active=!1,this._petElement.GameObject.active=!1,this.onLoaded.addOnce((()=>{this._leavingSoon.active=this.isLeavingSoon(),this._notStartedLabel.active=!this.nt,this._tamingMeter.GameObject.active=!1})),this.loadPetAnimation()}initAccepted(){this._petName.GameObject.active=this._componentData.nameUnlocked,this._petName.text=this._componentData.petItem.data.name,this._nameTease.active=!this._componentData.nameUnlocked,this._startQuest.GameObject.active=!1,this._questionMark.active=!0,this._addToTeam.lockState(nf.K.Disabled),this.initProgressBar(),this.initTimer(),this._tamed.active=!1,this._petSpine.onSpineItemLoaded.addOnce(this._shadowFilter.applyFilter.bind(this._shadowFilter)),this._petSpine.onSpineItemLoaded.addOnce(this._freezeFrameWait.start.bind(this._freezeFrameWait)),this._notStartedLabel.active=!1,this._tamedLabel.active=!1,this._unseenBackground.active=!0,this._seenBackground.active=!1,this._petElement.GameObject.active=!1,this.onLoaded.addOnce((()=>{this._leavingSoon.active=this.isLeavingSoon(),this._tamingMeter.GameObject.active=!0,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel)})),this.loadPetAnimation()}initFound(){this._petName.GameObject.active=!0,this._petName.text=this._componentData.petItem.data.name,this._nameTease.active=!1,this._startQuest.GameObject.active=!1,this._questionMark.active=!1,this._addToTeam.lockState(nf.K.Disabled),this.initProgressBar(),this.initTimer(),this._tamed.active=!1,this._petSpine.onSpineItemLoaded.addOnce(this._greyscaleFilter.applyFilter.bind(this._greyscaleFilter)),this._petSpine.onSpineItemLoaded.addOnce(this._freezeFrameWait.start.bind(this._freezeFrameWait)),this._notStartedLabel.active=!1,this._tamedLabel.active=!1,this._petElement.GameObject.active=!0,this._petElement.setPetID(this._componentData.petId),this._unseenBackground.active=!1,this._seenBackground.active=!0,this.onLoaded.addOnce((()=>{this._leavingSoon.active=this.isLeavingSoon(),this._tamingMeter.GameObject.active=!0,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel)})),this.loadPetAnimation()}initCompleted(){this._petName.GameObject.active=!0,this._petName.text=this._componentData.petItem.data.name,this._nameTease.active=!1,this.initProgressBar(),this._timer.GameObject.parent.active=!1,this._startQuest.GameObject.active=!1,this._questionMark.active=!1,this._taskProgress.active=!1,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel),this._tamedAddToTeamButton.GameObject.active=!0,this._notStartedLabel.active=!1,this._petElement.GameObject.active=!0,this._petElement.setPetID(this._componentData.petId),this._unseenBackground.active=!1,this._seenBackground.active=!0,this.onLoaded.addOnce((()=>{this._tamingMeter.GameObject.active=!0,this._tamedLabel.active=!this.nt,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel)})),this.loadPetAnimation(),this.gameObject.onActiveInHierarchyChanged.add(this.setTamedLockState,this),this.setTamedLockState()}initProgressBar(){this._taskProgress.active=!0;const q=this._taskProgress.findComponentInChildren(Ds.z),K=this._componentData.accomplishedCollectionTasks>=this._componentData.totalCollectionTasks,z=this._componentData.accomplishedCollectionTasks/this._componentData.totalCollectionTasks,Y=K?dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("PROGRESS_BAR_COMPLETE"):`${this._componentData.accomplishedCollectionTasks} / ${this._componentData.totalCollectionTasks}`;q.setValue(z),q.setBarText(Y)}toggleAddPop(){const q=this._addToTeam.GameObject.parent;q.active=!q.active,this._player.player.kennel.hasPet(this._componentData.petId)&&this._player.player.kennel.petTeam.every((q=>(null==q?void 0:q.getID())!==this._componentData.petId))?this._addToTeam.unlockState():this._addToTeam.lockState(nf.K.Disabled)}setTamedLockState(){var q;this._addToTeam.GameObject.parent.active&&this.toggleAddPop(),(null===(q=this._player)||void 0===q?void 0:q.player.kennel.petTeam.every((q=>(null==q?void 0:q.getID())!==this._componentData.petId)))?this._tamedAddToTeamButton.unlockState():this._tamedAddToTeamButton.lockState(nf.K.Disabled)}loadPetAnimation(){const q=this._petSpine.GameObject.parent.transform,K=this._componentData.petItem.metadata.assets.card;q.setScale(K.cardScale,K.cardScale),q.posX=K.x,q.posY=K.y,this._petSpine.onSpineItemLoaded.addOnce((()=>{this.onLoaded.dispatch(),this.restartAnimation()})),this._petSpine.setAssetID(this._componentData.petId)}restartAnimation(){this._petSpineAnimator.stopAnimation(),this._petSpineAnimator.playAnimation(Bf.DEFAULT_ANIMATION,!0)}initNonMember(){this.onLoaded.addOnce((()=>{this._membershipLock.active=!0,this._startQuest.lockState(nf.K.Disabled)}))}initTimer(){this._timer.GameObject.parent.active=!0;const q=this._componentData.deadline.valueOf()-this._timeManager.getServerTimeMs();this._timer.setCountdownTimeMS(q)}isLeavingSoon(){const q=this._componentData.questState!==Lf.e.QuestCompleted,K=!dt.q.instance.prodigy.classModeController.isClassMode(),z=uo.P8.isUltimateLeavingSoon(this._componentData.deadline,Nf.T.Week);return q&&K&&z&&!this.nt}destroy(){this.onError.dispose(),this.onLoaded.dispose(),this.onAddToTeamClicked.dispose(),this.gameObject.onActiveInHierarchyChanged.remove(this.setTamedLockState,this),super.destroy()}};Uf.DEFAULT_ANIMATION="idle",(0,Q.Cg)([(0,X.Cdj)("fa1-8ec9"),(0,Q.Sn)("design:type",fh.F)],Uf.prototype,"_breadcrumbManager",void 0),(0,Q.Cg)([(0,X.Cdj)("0f2-d6bd"),(0,Q.Sn)("design:type",nn.V)],Uf.prototype,"_timeManager",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Uf.prototype,"_player",void 0),(0,Q.Cg)([(0,X.MnK)(vd),(0,Q.Sn)("design:type",vd)],Uf.prototype,"_greyscaleFilter",void 0),(0,Q.Cg)([(0,X.MnK)(Af),(0,Q.Sn)("design:type",Af)],Uf.prototype,"_shadowFilter",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_nameTease",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Uf.prototype,"_petName",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Uf.prototype,"_startQuest",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_taskProgress",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],Uf.prototype,"_timer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_tamed",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_membershipLock",void 0),(0,Q.Cg)([(0,X.MnK)(If.N),(0,Q.Sn)("design:type",If.N)],Uf.prototype,"_petSpine",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],Uf.prototype,"_petSpineAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(Df),(0,Q.Sn)("design:type",Df)],Uf.prototype,"_freezeFrameWait",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Uf.prototype,"_addToTeam",void 0),(0,Q.Cg)([(0,X.MnK)(Ye.n),(0,Q.Sn)("design:type",Ye.n)],Uf.prototype,"_panelOverlay",void 0),(0,Q.Cg)([(0,X.MnK)(kf),(0,Q.Sn)("design:type",kf)],Uf.prototype,"_tamingMeter",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_seenBackground",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_unseenBackground",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_notStartedLabel",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_tamedLabel",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_leavingSoon",void 0),(0,Q.Cg)([(0,X.MnK)(xf.D),(0,Q.Sn)("design:type",xf.D)],Uf.prototype,"_petElement",void 0),(0,Q.Cg)([(0,X.MnK)(Mf),(0,Q.Sn)("design:type",Mf)],Uf.prototype,"_ftueBreadcrumb",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Uf.prototype,"_tamedAddToTeamButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uf.prototype,"_questionMark",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Uf.prototype,"onLoaded",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Uf.prototype,"onError",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Uf.prototype,"onAddToTeamClicked",void 0),Uf=Bf=(0,Q.Cg)([(0,X.EVk)("PetProgressCard",et.Y.ultimatesUi)],Uf);let Ff=class extends X.uAl{constructor(){super(...arguments),this._progressCards=[]}create(){super.create(),this._progressCards.forEach((q=>{q.GameObject.active=!1}))}init(q,K){this._nonMemberScroll.active=!1;const z=this._nonMemberScroll.findComponentInChildren(Y.$);z.onEnabledClick.removeAll(),z.onEnabledClick.add(this.onMembershipBenefitsButtonClicked,this);const Q=!dt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_ULTIMATES,Es.B.BREADCRUMB_ULTIMATES_FTUE);this._progressCards.forEach(((z,Y)=>{Y>=q.cardConfigs.length?z.GameObject.active=!1:(z.GameObject.active=!0,Q?(z.init(q.cardConfigs[Y],K,0===Y),Y>0&&z.disable()):z.init(q.cardConfigs[Y],K,!0))})),K&&q.tamedPets.length<1?(this.inventory.GameObject.active=!1,this._nonMemberScroll.active=!0):this.inventory.init(q.tamedPets,q.untamedPets)}onMembershipBenefitsButtonClicked(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=re.J.showYouTubeMembershipAd(dt.q.instance.game,!0)?Ys.R.Video:Ys.R.Static,K=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasLegacyMembership(),z=this._nonMemberScroll.findComponent(Sf),Y=K?"visited_mythics_pet_book_upgrade":"visited_mythics_pet_book";dt.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:Y,category:"mythics",contentId:null,adType:q}),this.gameObject.active=!1,z.overrideConversionEvent(un.o.FunnelMythics21Q4,Ys.R.Mythics21Q4),yield z.open(!0,K),this.gameObject.active=!0}))}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(Uf),(0,Q.Sn)("design:type",Array)],Ff.prototype,"_progressCards",void 0),(0,Q.Cg)([(0,X.MnK)(Of),(0,Q.Sn)("design:type",Of)],Ff.prototype,"inventory",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ff.prototype,"_nonMemberScroll",void 0),Ff=(0,Q.Cg)([(0,X.EVk)("PetHomeScreen",et.Y.ultimatesUi)],Ff);let Gf=class extends X.uAl{updateDisplayInfo(q){this._petId=q,this._petItem=ae.t.getItem("pet",this._petId),this._petItem?(this._petName.text=uo.P8.getPetDisplayName(this._petItem.data,this._petItem),this._petInfo.text=this._localizer.getText(re.J.getLocalizationFlavorKey({id:q,type:"pet"}))):X.VyI.log(`PetAboutInfoComponent: Unable to load pet item data with id ${this._petId}`,X.$bb.Error)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Gf.prototype,"_petId",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Gf.prototype,"_petName",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Gf.prototype,"_petInfo",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Gf.prototype,"_localizer",void 0),Gf=(0,Q.Cg)([(0,X.EVk)("PetAboutInfoCard",et.Y.uiPet)],Gf);var jf=z(95946);let $f=class extends X.uAl{updateDisplayInfo(q){this._petId=q,this._petItem=ae.t.getItem("pet",this._petId),this._petItem?(this.updateHearts(),this.updateElement()):X.VyI.log(`PetStatInfoComponent: Unable to load pet item data with id ${this._petId}`,X.$bb.Error)}updateHearts(){var q;const K=null!==(q=this._playerProvider.player.kennel.getPetByID(this._petId))&&void 0!==q?q:this._petItem,z=uo.P8.getPetMaxHealth(K),Y=uo.P8.getPetCurrentHealth(K),Q=(0,af.Hk)(z),X=(0,af.Hk)(Y);this._heartsProgressBar.setValue(Y/z),this._petHeartsText.text=`${X}/${Q}`}updateElement(){const q=uo.P8.getElementType(this._petItem);this._petElementText.text=Vt.$.capitalizeFirstLetter(q),this._petElementIcon.updateAsset(ti._.Ui_raster_icons_json,`icon-medium-${q===jf.a.Plant?"earth":q}`)}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],$f.prototype,"_playerProvider",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],$f.prototype,"_petId",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],$f.prototype,"_petHeartsText",void 0),(0,Q.Cg)([(0,X.MnK)(mf.a),(0,Q.Sn)("design:type",mf.a)],$f.prototype,"_heartsProgressBar",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],$f.prototype,"_petElementText",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],$f.prototype,"_petElementIcon",void 0),$f=(0,Q.Cg)([(0,X.EVk)("PetStatsInfoCard",et.Y.uiPet)],$f);var Hf=z(39984);let Vf=class extends X.uAl{constructor(){super(...arguments),this.onLoaded=new X.HN0,this.onAddToTeamClicked=new X.HN0}init(q,K,z,Y=!1){this._componentData=q,this._componentData.petItem=ae.t.getItem("pet",q.petId),Y&&this.onLoaded.addOnce((()=>{this._unlockSpineAnimator.playAnimation("epic-tamed",!1)})),this._petSpineLoader.onSpineItemLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._petSpineLoader.setAssetID(q.petId),this._tamingMeter.setTamingLevel(q.tamingLevel),this._membershipBenefitsButton.GameObject.active=!1,this._addToTeamButton.GameObject.active=!1,this._petNameHolder.active=!1,this._shadowFilter.removeFilter(),this._greyscaleFilter.removeFilter(),this._addToTeamButton.onEnabledClick.removeAll(),this._addToTeamButton.onEnabledClick.add(this.addToTeamClicked.bind(this)),K&&(this._memberLockObject.active=!0),this._canAccess=!K;const Q=this._componentData.petItem.metadata.assets.tamingView;if(Q){const q=Q.viewerScale;this._petSpineLoader.GameObject.transform.setScale(q);const K=this._petSpineLoader.GameObject.transform.localPosition;this._petSpineLoader.GameObject.transform.setPosition(K.x+Q.x,K.y+Q.y)}switch(this._petSpineAnimator.GameObject.setLayer(this.GameObject.layer),this._unknownPetName.GameObject.setLayer(this.GameObject.layer),this._untamedPetName.GameObject.setLayer(this.GameObject.layer),this._unknownPetName.GameObject.active=!1,this._untamedPetName.GameObject.active=!1,this._tamedPetDataParent.active=!1,this._lockIconObject.active=!1,q.questState){case Lf.e.Start:case Lf.e.QuestAccepted:this.initUnknown();break;case Lf.e.Found:this.initUntamed();break;case Lf.e.QuestCompleted:this.initTamed();break;default:X.VyI.log(`[Pet Taming View]: Invalid petProgressStatus ${q.questState} given`,X.$bb.Warning)}this.showTimerState(z,uo.P8.isUltimateLeavingSoon(q.deadline,Nf.T.Week),q.questState===Lf.e.QuestCompleted)}addToTeamClicked(){this.onAddToTeamClicked.dispatch({ID:this._componentData.petId})}showTimerState(q,K,z){this._timer.GameObject.parent.active=q,this._epicOfTheMonthText.active=q&&(!K||z),this._leavingSoonText.active=q&&K&&!z,this._leavingSoonAnimation.active=q&&K&&!z}initNotStarted(){this._unknownPetName.GameObject.active=!0,this._shadowFilter.applyFilter(),this._lockIconObject.active=this._canAccess,this._newEpicTasksButton.GameObject.active=!1,this._petNameHolder.active=!0,this._timer.GameObject.parent.active=!1,this._tamed.active=!1,this._tamingMeter.GameObject.parent.active=!0}initUnknown(){this._unknownPetName.GameObject.active=!this._componentData.nameUnlocked,this._untamedPetName.GameObject.active=this._componentData.nameUnlocked,this._untamedPetName.text=this._componentData.petItem.data.name,this._shadowFilter.applyFilter(),this._lockIconObject.active=this._canAccess,this._petNameHolder.active=!0,this._tamingMeter.GameObject.parent.active=!0,this._timer.GameObject.active=!0;const q=this._componentData.deadline.valueOf()-this._timeManager.getServerTimeMs();this._timer.setCountdownTimeMS(q),this._tamed.active=!1}initUntamed(){this._lockIconObject.active=this._canAccess,this._untamedPetName.GameObject.active=!0,this._untamedPetName.text=this._componentData.petItem.data.name,this._greyscaleFilter.applyFilter(),this._petNameHolder.active=!0,this._tamingMeter.GameObject.parent.active=!0,this._timer.GameObject.active=!0;const q=this._componentData.deadline.valueOf()-this._timeManager.getServerTimeMs();this._timer.setCountdownTimeMS(q),this._tamed.active=!1}initTamed(){this._lockIconObject.active=!1,this._tamedPetDataParent.active=!0,this._petSpineAnimator.playAnimation("idle",!0);const q=this._loggedInPlayer.player.kennel.getPetByID(this._componentData.petId);this._levelNumberText.text=`${q.level}`,this._tamedPetName.text=this._componentData.petItem.data.name,this._addToTeamButton.GameObject.active=!0,this._memberLockObject.active=!1;const K=Hf.e.starsToLevel(q.level,ta.V.Pet),z=(null!==q.stars?q.stars:K)-K,Y=Hf.e.starsToLevel(q.level+1,ta.V.Pet)-K;this._starsProgressBar.setValue(z/Y),this._tamingMeter.GameObject.parent.active=!1,this._timer.GameObject.active=!1,this._tamed.active=!0,this.gameObject.onActiveInHierarchyChanged.add(this.setTamedLockState,this),this.setTamedLockState()}setTamedLockState(){this._loggedInPlayer.player.kennel.petTeam.every((q=>(null==q?void 0:q.getID())!==this._componentData.petId))?this._addToTeamButton.unlockState():this._addToTeamButton.lockState(nf.K.Disabled)}destroy(){this.gameObject.onActiveInHierarchyChanged.remove(this.setTamedLockState,this),this.onLoaded.dispose(),this.onAddToTeamClicked.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Vf.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("0f2-d6bd"),(0,Q.Sn)("design:type",nn.V)],Vf.prototype,"_timeManager",void 0),(0,Q.Cg)([(0,X.MnK)(If.N),(0,Q.Sn)("design:type",If.N)],Vf.prototype,"_petSpineLoader",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Vf.prototype,"_unknownPetName",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Vf.prototype,"_lockIconObject",void 0),(0,Q.Cg)([(0,X.MnK)(Af),(0,Q.Sn)("design:type",Af)],Vf.prototype,"_shadowFilter",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Vf.prototype,"_untamedPetName",void 0),(0,Q.Cg)([(0,X.MnK)(vd),(0,Q.Sn)("design:type",vd)],Vf.prototype,"_greyscaleFilter",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Vf.prototype,"_tamedPetDataParent",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],Vf.prototype,"_petSpineAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Vf.prototype,"_levelNumberText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Vf.prototype,"_tamedPetName",void 0),(0,Q.Cg)([(0,X.MnK)(mf.a),(0,Q.Sn)("design:type",mf.a)],Vf.prototype,"_starsProgressBar",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Vf.prototype,"_addToTeamButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Vf.prototype,"_memberLockObject",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Vf.prototype,"_membershipBenefitsButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Vf.prototype,"_newEpicTasksButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Vf.prototype,"_petNameHolder",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Vf.prototype,"_epicOfTheMonthText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Vf.prototype,"_leavingSoonText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Vf.prototype,"_leavingSoonAnimation",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],Vf.prototype,"_timer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Vf.prototype,"_tamed",void 0),(0,Q.Cg)([(0,X.MnK)(kf),(0,Q.Sn)("design:type",kf)],Vf.prototype,"_tamingMeter",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],Vf.prototype,"_unlockSpineAnimator",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Vf.prototype,"onLoaded",void 0),Vf=(0,Q.Cg)([(0,X.EVk)("PetTamingView",et.Y.ultimates)],Vf);var Wf=z(9421);let qf=class extends uh.k{sendButtonEvent(){this._segment.featureCommon.sendButtonEvent(this.getPropertiesObject())}};qf=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsButton",et.Y.analytics)],qf);var Kf=z(13367);let zf=class extends X.uAl{get currentStatus(){return this._currentStatus}init(q,K=!1){switch(this.reset(),this._currentStatus=q,q){case Wf.b.TrackLocked:break;case Wf.b.TrackUnlocked:this._acceptButton.GameObject.active=!0;break;case Wf.b.TrackInProgress:this._abandonButton.GameObject.active=!0;break;case Wf.b.Finished:this._finishedIcon.active=!0;break;default:X.VyI.log(`[PetTaskStatus] unknown pet progress state ${q}`,X.$bb.Warning)}K&&(this._acceptButton.lockState(nf.K.Disabled),this._abandonButton.lockState(nf.K.Disabled))}reset(){this._acceptButton.unlockState(),this._abandonButton.unlockState(),this._acceptButton.GameObject.active=!1,this._abandonButton.GameObject.active=!1,this._finishedIcon.active=!1,this._notFinishedIcon.active=!0}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zf.prototype,"_notFinishedIcon",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],zf.prototype,"_acceptButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],zf.prototype,"_abandonButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],zf.prototype,"_finishedIcon",void 0),zf=(0,Q.Cg)([(0,X.EVk)("PetTaskStatus",et.Y.ultimates)],zf);let Yf=class extends X.uAl{constructor(){super(...arguments),this._interactableIcons=[],this._loadingSpinners=[]}setTooltipIcons(q){this._interactableIcons.length===this._loadingSpinners.length?this._interactableIcons.forEach(((K,z)=>{K.OnLoaded.addOnce((()=>{this._loadingSpinners[z].active=!1})),K.setAsset(ti._.Ui_raster_epicsv2_json,`icon-large-${q}-interactable-0${z+1}`).catch((q=>X.VyI.log(`[UltimatesTaskTooltip] There was an error setting the icon for the tooltip, ${q.message}`,X.$bb.Error)))})):X.VyI.log("[UltimatesTaskTooltip] Mismatch number of icons to loading spinners",X.$bb.Error)}destroy(){this._interactableIcons.forEach((q=>{q.OnLoaded.dispose()})),super.destroy()}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(si._),(0,Q.Sn)("design:type",Array)],Yf.prototype,"_interactableIcons",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Yf.prototype,"_loadingSpinners",void 0),Yf=(0,Q.Cg)([(0,X.EVk)("UltimatesTaskTooltip",et.Y.ultimatesUi)],Yf);let Qf=class extends X.uAl{constructor(){super(...arguments),this.onLoaded=new X.HN0,this.onChangeUltimatesSession=new X.HN0,this._onQuestActive=new X.HN0,this._onQuestInactive=new X.HN0}init(q,K,z=!0){this._memberLockedTooltip.active=!1,this._ultimatesTaskTooltip.active=!1,this._memberLocked=K,this._taskItemIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskItemIcon.setItem(q.iconItemType,q.iconItemID,!0),this._taskDescription.text=`${q.descriptionVerb} ${q.targetAmount} ${q.descriptionSubject}`,this._taskProgressBar.setValue(q.currentAmount/q.targetAmount);const Y=q.currentAmount>=q.targetAmount?dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("PROGRESS_BAR_COMPLETE"):`${q.currentAmount} / ${q.targetAmount}`;this._taskProgressBar.setBarText(Y),this._trackNPCTaskId=q.trackingTaskId,this._tameUltimateTaskId=q.tamingTaskId,this._npcTaskStatus.init(q.npcStatus,K||!z),this._epicTaskStatus.init(q.epicStatus,K||!z),this._collectButton.GameObject.active=q.npcStatus===Wf.b.TrackLocked,K||!z?this._collectButton.lockState(nf.K.Disabled):this._collectButton.unlockState(),this._collectionZoneID=q.collectingZoneID,this._goCollectSegmentConfig.destinationName=q.collectingZone,this._goCollectSegmentConfig.elementId=q.collectingTaskId.toString(),this._tameSegmentConfig.destinationName=q.tamingZone,this._tameSegmentConfig.elementId=q.tamingTaskId.toString();const Q=Kf.m.getSeededLocation().split("-")[0];this._trackSegmentConfig.destinationName=dt.q.instance.prodigy.world.getZone(Q).name,this._trackSegmentConfig.elementId=q.trackingTaskId.toString(),this._tooltipSegmentConfig.buttonName=q.descriptionSubject,this._tooltipSegmentConfig.elementId=q.collectingTaskId.toString(),this._isActive=z&&q.npcStatus!==Wf.b.Finished,(this._isActive?this._onQuestActive:this._onQuestInactive).dispatch()}setNPCStatus(q){this._collectButton.GameObject.active||this._npcTaskStatus.init(q)}get npcStatus(){return this._npcTaskStatus.currentStatus}setEpicStatus(q){this._collectButton.GameObject.active||this._epicTaskStatus.init(q)}get epicStatus(){return this._epicTaskStatus.currentStatus}startTracking(){this.onChangeUltimatesSession.dispatch(bl.n.TrackingNPC,this._trackNPCTaskId)}startTaming(){this.onChangeUltimatesSession.dispatch(bl.n.TamingUltimate,this._tameUltimateTaskId)}abandonSession(q){this.onChangeUltimatesSession.dispatch(bl.n.None,0),q?this._epicTaskStatus.init(Wf.b.TrackUnlocked):this._npcTaskStatus.init(Wf.b.TrackUnlocked)}showTooltip(){this._memberLocked&&!this._memberLockedTooltip.active&&this._isActive?this._memberLockedTooltip.active=!0:this.npcStatus{this._taskCards[K].onLoaded.addOnce(this.syncLoad,this),this._taskCards[K].init(q,Y,Q)}))}setTradeStarted(q){this._taskCards.forEach(((K,z)=>{z===q?K.setNPCStatus(Wf.b.TrackInProgress):K.npcStatus===Wf.b.TrackInProgress&&K.setNPCStatus(Wf.b.TrackUnlocked)})),this.setTamingAbandoned()}setTradeAbandoned(){this._taskCards.forEach((q=>{q.npcStatus===Wf.b.TrackInProgress&&q.setNPCStatus(Wf.b.TrackUnlocked)}))}setTamingStarted(q){this._taskCards.forEach(((K,z)=>{z===q?K.setEpicStatus(Wf.b.TrackInProgress):K.epicStatus===Wf.b.TrackInProgress&&K.setEpicStatus(Wf.b.TrackUnlocked)})),this.setTradeAbandoned()}setTamingAbandoned(){this._taskCards.forEach((q=>{q.epicStatus===Wf.b.TrackInProgress&&q.setEpicStatus(Wf.b.TrackUnlocked)}))}initPetIcon(q,K){const z=ae.t.getItem("pet",q);switch(this._petIcon.onIconLoaded.addOnce(this.syncLoad,this),this._petIcon.setItem("pet",q,!0),this._petShadowFilter.removeFilter(),this._petGreyscaleFilter.removeFilter(),K){case Lf.e.Start:case Lf.e.QuestAccepted:this._petName.setLocalizationKey(Xf.WHO_AM_I_KEY),this._petShadowFilter.applyFilter();break;case Lf.e.Found:this._petName.setLocalizationKey(""),this._petName.GameObject.findComponent(X.EYj).text=z.data.name,this._petGreyscaleFilter.applyFilter();break;case Lf.e.QuestCompleted:this._petName.setLocalizationKey(""),this._petName.GameObject.findComponent(X.EYj).text=z.data.name;break;default:X.VyI.log("[PetTasksTab] Unknown pet progress state provided",X.$bb.Warning)}}syncLoad(){--this._partsToBeLoaded<=0&&this.onLoaded.dispatch()}destroy(){this.onLoaded.dispose(),super.destroy()}};var Jf;Zf.WHO_AM_I_KEY="ULTIMATES_WHO_AM_I",(0,Q.Cg)([(0,X.MnK)(gd.i),(0,Q.Sn)("design:type",gd.i)],Zf.prototype,"_petIcon",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],Zf.prototype,"_petName",void 0),(0,Q.Cg)([(0,X.MnK)(vd),(0,Q.Sn)("design:type",vd)],Zf.prototype,"_petGreyscaleFilter",void 0),(0,Q.Cg)([(0,X.MnK)(Af),(0,Q.Sn)("design:type",Af)],Zf.prototype,"_petShadowFilter",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(Qf),(0,Q.Sn)("design:type",Array)],Zf.prototype,"_taskCards",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zf.prototype,"_loadingOverlay",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Zf.prototype,"onLoaded",void 0),Zf=Xf=(0,Q.Cg)([(0,X.EVk)("PetTasksTab",et.Y.ultimates)],Zf);let tb=Jf=class extends X.uAl{constructor(){super(...arguments),this.onLoaded=new X.HN0,this.onAddToTeamClicked=new X.HN0,this._partsToBeLoaded=-1,this._questId=""}create(){super.create(),this._statsTabToggle.GameObject.active=!1}init(q,K,z,Y,Q=!1){this._questId=q.questId,this._partsToBeLoaded=Jf.PARTS_TO_LOAD,this._tasksTabToggle.GameObject.parent.findComponent(sn.O).setSelectedIndex(0),this._tasksTabToggle.setSelected(!0),this._tasksTabToggle.onSelected.dispatch(),this._petTamingView.onLoaded.addOnce(this.syncLoad,this),this._petTamingView.init(q,z,Y,Q),this._petTamingView.onAddToTeamClicked.removeAll(),this._petTamingView.onAddToTeamClicked.add(this.addToTeamClicked.bind(this,q.petId)),this._petTasksTab.onLoaded.addOnce(this.syncLoad,this),this._petTasksTab.init(q.petId,q.questState,K,z,Y);K.filter((q=>q.npcStatus===Wf.b.Finished)).length>1?(this._petAboutInfoCard.updateDisplayInfo(q.petId),this._aboutTabToggle.unlockState(),this._aboutTabToggle.inputEnabled=!0):(this._aboutTabToggle.lockState(nf.K.Disabled),this._aboutTabToggle.inputEnabled=!1);K.every((q=>q.npcStatus===Wf.b.Finished))?(this._petStatsInfoCard.updateDisplayInfo(q.petId),this._statsTabToggle.unlockState(),this._statsTabToggle.inputEnabled=!0):(this._statsTabToggle.lockState(nf.K.Disabled),this._statsTabToggle.inputEnabled=!1)}setTradeStarted(q){this._petTasksTab.setTradeStarted(q)}setTradeAbandoned(){this._petTasksTab.setTradeAbandoned()}setTamingStarted(q){this._petTasksTab.setTamingStarted(q)}setTamingAbandoned(){this._petTasksTab.setTamingAbandoned()}addToTeamClicked(q){const K=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.onAddToTeamClicked.dispatch(K.kennel.getPetByID(q))}syncLoad(){--this._partsToBeLoaded<=0&&this.onLoaded.dispatch()}changePlayerState(q,K){this._loggedInPlayer.player.setUltimateSessionStatus(q,this._questId,K),q!==bl.n.None&&(dt.q.instance.prodigy.open.map(),this.GameObject.destroy())}destroy(){this.onLoaded.dispose(),this.onAddToTeamClicked.dispose(),super.destroy()}};var eb;tb.PARTS_TO_LOAD=2,(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],tb.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],tb.prototype,"_aboutTabToggle",void 0),(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],tb.prototype,"_statsTabToggle",void 0),(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],tb.prototype,"_tasksTabToggle",void 0),(0,Q.Cg)([(0,X.MnK)(Vf),(0,Q.Sn)("design:type",Vf)],tb.prototype,"_petTamingView",void 0),(0,Q.Cg)([(0,X.MnK)(Zf),(0,Q.Sn)("design:type",Zf)],tb.prototype,"_petTasksTab",void 0),(0,Q.Cg)([(0,X.MnK)(Gf),(0,Q.Sn)("design:type",Gf)],tb.prototype,"_petAboutInfoCard",void 0),(0,Q.Cg)([(0,X.MnK)($f),(0,Q.Sn)("design:type",$f)],tb.prototype,"_petStatsInfoCard",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],tb.prototype,"onLoaded",void 0),tb=Jf=(0,Q.Cg)([(0,X.EVk)("PetProgressInfo",et.Y.ultimatesUi)],tb),function(q){q[q.COLLECT=0]="COLLECT",q[q.TRADE=1]="TRADE",q[q.TAME=2]="TAME",q[q.COMPLETE=3]="COMPLETE"}(eb||(eb={}));let ib=class extends X.uAl{constructor(){super(...arguments),this.onLoaded=new X.HN0,this.loadingPromise=new X.bnh}get taskStep(){return this._taskStep}get taskIcon(){return this._taskIcon}init(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){this._taskIcon.isLoaded||(this.onLoaded.addOnce(this.loadingPromise.resolve),yield this.loadingPromise)}))}setButtonState(q){this._startButton&&this._stopButton&&(this._startButton.active=qWf.b.TrackUnlocked)}destroy(){var q;this.onLoaded.dispose(),null===(q=this._taskIcon)||void 0===q||q.destroy(),super.destroy()}};(0,Q.Cg)([(0,X.gfw)(eb),(0,Q.Sn)("design:type",Number)],ib.prototype,"_taskStep",void 0),(0,Q.Cg)([(0,X.MnK)(gd.i),(0,Q.Sn)("design:type",gd.i)],ib.prototype,"_taskIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],ib.prototype,"_taskDescription",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ib.prototype,"_startButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ib.prototype,"_stopButton",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ib.prototype,"onLoaded",void 0),ib=(0,Q.Cg)([(0,X.EVk)("TaskStepBase (abstract)",et.Y.ultimatesUi)],ib);let sb=class extends X.uAl{constructor(){super(...arguments),this._checkObjects=[]}configure(q){if(this._checkObjects.length>Object.keys(eb).length)X.VyI.log("[TaskProgressMeterComponent] There are too many objects listed compared to the amount of steps in ETaskStep.",X.$bb.Error);else for(let K=0;K{q.taskStep===z?(q.GameObject.active=!0,q.taskIcon.GameObject.active=z!==eb.TRADE,Y=q):q.GameObject.active=!1})),Y?(yield Y.init(q,K),Y.GameObject.active=Y.taskStep===z,this.setTradeProgressState(K.npcStatus),this.setTameProgressState(K.epicStatus)):X.VyI.log("[PetTamingTaskCardComponentV2] Error initializing the TaskStepComponent: current task step is not within the list of task containers",X.$bb.Error),this._taskProgressMeter.configure(z)}))}getCurrentTaskStep(q){let K;K=q.currentAmountq.taskStep===eb.TRADE));null==K||K.setButtonState(q)}setTameProgressState(q){this._tamingState=q;const K=this._taskContainers.find((q=>q.taskStep===eb.TAME));null==K||K.setButtonState(q)}};var ab;(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(ib),(0,Q.Sn)("design:type",Array)],nb.prototype,"_taskContainers",void 0),(0,Q.Cg)([(0,X.MnK)(sb),(0,Q.Sn)("design:type",sb)],nb.prototype,"_taskProgressMeter",void 0),nb=(0,Q.Cg)([(0,X.EVk)("PetTamingTaskCardV2",et.Y.ultimates)],nb);let rb=ab=class extends X.uAl{constructor(){super(...arguments),this._taskCards=[],this.onLoaded=new X.HN0}init(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){this._loadingContainer.active=!0;const z=ae.t.getItem("pet",q),Y=[];if(K.forEach(((q,K)=>{Y.push(this._taskCards[K].getCurrentTaskStep(q))})),Y.every((q=>q===eb.COMPLETE))){if(this.setTaskContainerVisibility(!1),this._allTasksCompleteText.setLocalizationKey(ab.QUEST_COMPLETE_TEXT),this._allTasksCompleteText.setTextArguments(z.data.name),this._petIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._petIcon.setItem("pet",q,!0),!this._petIcon.isLoaded){const q=new X.bnh;this.onLoaded.addOnce(q.resolve),yield q}}else this.setTaskContainerVisibility(!0),yield Promise.all(K.map(((K,z)=>(0,Q.sH)(this,void 0,void 0,(function*(){yield this._taskCards[z].init(q,K)})))));this._questStatusText.setLocalizationKey(ab.QUEST_STATUS_TEXT),this._questStatusText.setTextArguments(z.data.name),this.onLoaded.dispatch()}))}setTaskContainerVisibility(q){this._taskCardsContainer.active=q,this._allTasksCompleteContainer.active=!q}setTradeStarted(q){this._taskCards.forEach(((K,z)=>{z===q?K.setTradeProgressState(Wf.b.TrackInProgress):K.tradingState===Wf.b.TrackInProgress&&K.setTradeProgressState(Wf.b.TrackUnlocked)})),this.setTameAbandoned()}setTradeAbandoned(){this._taskCards.forEach((q=>{q.tradingState===Wf.b.TrackInProgress&&q.setTradeProgressState(Wf.b.TrackUnlocked)}))}setTameStarted(q){this._taskCards.forEach(((K,z)=>{z===q?K.setTameProgressState(Wf.b.TrackInProgress):K.tamingState===Wf.b.TrackInProgress&&K.setTameProgressState(Wf.b.TrackUnlocked)})),this.setTradeAbandoned()}setTameAbandoned(){this._taskCards.forEach((q=>{q.tamingState===Wf.b.TrackInProgress&&q.setTameProgressState(Wf.b.TrackUnlocked)}))}destroy(){this.onLoaded.dispose(),super.destroy()}};rb.QUEST_STATUS_TEXT="ULTIMATES_QUEST_STATUS",rb.QUEST_COMPLETE_TEXT="ULTIMATES_QUEST_COMPLETE",(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],rb.prototype,"_questStatusText",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],rb.prototype,"_allTasksCompleteText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],rb.prototype,"_taskCardsContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],rb.prototype,"_allTasksCompleteContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],rb.prototype,"_loadingContainer",void 0),(0,Q.Cg)([(0,X.MnK)(gd.i),(0,Q.Sn)("design:type",gd.i)],rb.prototype,"_petIcon",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(nb),(0,Q.Sn)("design:type",Array)],rb.prototype,"_taskCards",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rb.prototype,"onLoaded",void 0),rb=ab=(0,Q.Cg)([(0,X.EVk)("PetTasksTabV2",et.Y.ultimates)],rb);let ob=class extends X.uAl{constructor(){super(...arguments),this.onSelectionChange=new X.HN0,this.onLoaded=new X.HN0}get petTasksTab(){return this._petTasksTab}create(){super.create(),this._statsTabToggle.GameObject.active=!1}init(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){this._toggleGroup.setSelectedIndex(0),this._tasksTabToggle.unlockState(),this._tasksTabToggle.setSelected(!0),this._tasksTabToggle.onSelected.dispatch(),this.onSelectionChange.dispatch(),yield this._petTasksTab.init(q,K);K.every((q=>q.npcStatus===Wf.b.Finished))?(this._petStatsInfoCard.updateDisplayInfo(q),this._statsTabToggle.unlockState(),this._statsTabToggle.inputEnabled=!0):(this._statsTabToggle.lockState(nf.K.Disabled),this._statsTabToggle.inputEnabled=!1),this.onLoaded.dispatch()}))}setChurnedMemberState(q){this._churnedMemberContainer.active=q,this._petTasksTab.GameObject.active=!q,this.setAllTabsDisabled()}showPetTasksUnavailableState(q){const K=ae.t.getItem("pet",q);if(K){this._petTaskUnavailableContainer.findComponentInChildren(Cs.R).setTextArguments(K.data.name)}this._petTaskUnavailableContainer.active=!0,this._petTasksTab.GameObject.active=!1,this._toggleGroup.setItemSelected(this._tasksTabToggle,!1),this.setAllTabsDisabled(),this.onSelectionChange.dispatch()}hideTasksUnavailableState(){this._petTaskUnavailableContainer.active=!1,this._petTasksTab.GameObject.active=!0}setAllTabsDisabled(){this._toggleGroup.setItemSelected(this._statsTabToggle,!1),this._toggleGroup.setItemSelected(this._aboutTabToggle,!1),this._toggleGroup.setItemSelected(this._tasksTabToggle,!1),this._statsTabToggle.lockState(nf.K.Disabled),this._aboutTabToggle.lockState(nf.K.Disabled),this._tasksTabToggle.lockState(nf.K.Disabled)}destroy(){this.onSelectionChange.dispose(),this.onLoaded.dispose(),super.destroy()}};var hb;(0,Q.Cg)([(0,X.MnK)(sn.O),(0,Q.Sn)("design:type",sn.O)],ob.prototype,"_toggleGroup",void 0),(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],ob.prototype,"_statsTabToggle",void 0),(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],ob.prototype,"_aboutTabToggle",void 0),(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],ob.prototype,"_tasksTabToggle",void 0),(0,Q.Cg)([(0,X.MnK)($f),(0,Q.Sn)("design:type",$f)],ob.prototype,"_petStatsInfoCard",void 0),(0,Q.Cg)([(0,X.MnK)(Gf),(0,Q.Sn)("design:type",Gf)],ob.prototype,"_petAboutInfoCard",void 0),(0,Q.Cg)([(0,X.MnK)(rb),(0,Q.Sn)("design:type",rb)],ob.prototype,"_petTasksTab",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ob.prototype,"_churnedMemberContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ob.prototype,"_petTaskUnavailableContainer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ob.prototype,"onSelectionChange",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ob.prototype,"onLoaded",void 0),ob=(0,Q.Cg)([(0,X.EVk)("PetProgressTabController",et.Y.ultimatesUi)],ob);let cb=hb=class extends ib{init(q,K){const z=Object.create(null,{init:{get:()=>super.init}});return(0,Q.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=`${K.descriptionVerb} ${K.targetAmount} ${K.descriptionSubject}`,this._taskIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskIcon.setItem(K.iconItemType,K.iconItemID,!0),this._taskProgressBar.setValue(K.currentAmount/K.targetAmount);const Y=K.currentAmount>=K.targetAmount?dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(hb.PROGRESS_BAR_COMPLETE_TEXT):`${K.currentAmount} / ${K.targetAmount}`;this._taskProgressBar.setBarText(Y),this._collectionZoneID=K.collectingZoneID,this._goCollectSegmentConfig.destinationName=K.collectingZone,this._goCollectSegmentConfig.elementId=K.collectingTaskId.toString(),this._tooltipSegmentConfig.buttonName=K.descriptionSubject,this._tooltipSegmentConfig.elementId=K.collectingTaskId.toString(),yield z.init.call(this,q,K)}))}showTooltip(){this._ultimatesTaskTooltip.active=!this._ultimatesTaskTooltip.active,this._ultimatesTaskTooltip.findComponent(Yf).setTooltipIcons(this._collectionZoneID),this._tooltipSegmentConfig.GameObject.findComponent(qf).sendButtonEvent()}};var db;cb.PROGRESS_BAR_COMPLETE_TEXT="PROGRESS_BAR_COMPLETE",(0,Q.Cg)([(0,X.MnK)(Ds.z),(0,Q.Sn)("design:type",Ds.z)],cb.prototype,"_taskProgressBar",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],cb.prototype,"_ultimatesTaskTooltip",void 0),(0,Q.Cg)([(0,X.MnK)(hn),(0,Q.Sn)("design:type",hn)],cb.prototype,"_goCollectSegmentConfig",void 0),(0,Q.Cg)([(0,X.MnK)(hn),(0,Q.Sn)("design:type",hn)],cb.prototype,"_tooltipSegmentConfig",void 0),cb=hb=(0,Q.Cg)([(0,X.EVk)("TaskStepCollect",et.Y.ultimatesUi)],cb);let lb=db=class extends ib{init(q,K){const z=Object.create(null,{init:{get:()=>super.init}});return(0,Q.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(db.TASK_COMPLETE_TEXT),this._taskIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskIcon.setItem("pet",q,!0),yield z.init.call(this,q,K)}))}};var ub;lb.TASK_COMPLETE_TEXT="TASK_STEP_COMPLETE",lb=db=(0,Q.Cg)([(0,X.EVk)("TaskStepComplete",et.Y.ultimatesUi)],lb);let fb=ub=class extends ib{init(q,K){const z=Object.create(null,{init:{get:()=>super.init}});return(0,Q.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(ub.TAME_TEXT),this._taskIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskIcon.setItem("pet",q,!0),this._tameSegmentConfig.destinationName=K.tamingZone,this._tameSegmentConfig.elementId=K.tamingTaskId.toString(),yield z.init.call(this,q,K)}))}};var bb;fb.TAME_TEXT="TASK_STEP_TAME",(0,Q.Cg)([(0,X.MnK)(hn),(0,Q.Sn)("design:type",hn)],fb.prototype,"_tameSegmentConfig",void 0),fb=ub=(0,Q.Cg)([(0,X.EVk)("TaskStepTame",et.Y.ultimatesUi)],fb);let pb=bb=class extends ib{init(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(bb.TRADE_TEXT);const q=Kf.m.getSeededLocation().split("-")[0];this._trackSegmentConfig.destinationName=dt.q.instance.prodigy.world.getZone(q).name,this._trackSegmentConfig.elementId=K.trackingTaskId.toString()}))}};pb.TRADE_TEXT="TASK_STEP_TRADE",(0,Q.Cg)([(0,X.MnK)(hn),(0,Q.Sn)("design:type",hn)],pb.prototype,"_trackSegmentConfig",void 0),pb=bb=(0,Q.Cg)([(0,X.EVk)("TaskStepTrade",et.Y.ultimatesUi)],pb);let vb=class extends X.uAl{constructor(){super(...arguments),this.onLoaded=new X.HN0}init(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q;const X=ae.t.getItem("pet",q);this._headerLocalizationKey&&(null===(K=this._headerTextComponent)||void 0===K||K.setLocalizationKey(this._headerLocalizationKey)),null===(z=this._headerTextComponent)||void 0===z||z.setTextArguments(X.data.name),this._descriptionLocalizationKey&&(null===(Y=this._descriptionTextComponent)||void 0===Y||Y.setLocalizationKey(this._descriptionLocalizationKey)),null===(Q=this._descriptionTextComponent)||void 0===Q||Q.setTextArguments(X.data.name),this._petIcon.setItem("pet",q,!0),this._petIcon.isLoaded||(yield this._petIcon.onIconLoaded.asPromise()),this._loadingContainer.active=!1,this.onLoaded.dispatch()}))}destroy(){this.onLoaded.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],vb.prototype,"_headerLocalizationKey",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],vb.prototype,"_headerTextComponent",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],vb.prototype,"_descriptionLocalizationKey",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],vb.prototype,"_descriptionTextComponent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],vb.prototype,"_loadingContainer",void 0),(0,Q.Cg)([(0,X.MnK)(gd.i),(0,Q.Sn)("design:type",gd.i)],vb.prototype,"_petIcon",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vb.prototype,"onLoaded",void 0),vb=(0,Q.Cg)([(0,X.EVk)("UltimatesInfoDisplay",et.Y.ultimates)],vb);let gb=class extends X.uAl{init(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){this._ownedPetInfoDisplay.GameObject.active=!1,this._unavailablePetInfoDisplay.GameObject.active=!1,this._availablePetInfoDisplay.GameObject.active=!1,q?(yield this._ownedPetInfoDisplay.init(z),this._ownedPetInfoDisplay.GameObject.active=!0):K?(yield this._availablePetInfoDisplay.init(z),this._availablePetInfoDisplay.GameObject.active=!0):(yield this._unavailablePetInfoDisplay.init(z),this._unavailablePetInfoDisplay.GameObject.active=!0)}))}};var mb;(0,Q.Cg)([(0,X.MnK)(vb),(0,Q.Sn)("design:type",vb)],gb.prototype,"_ownedPetInfoDisplay",void 0),(0,Q.Cg)([(0,X.MnK)(vb),(0,Q.Sn)("design:type",vb)],gb.prototype,"_availablePetInfoDisplay",void 0),(0,Q.Cg)([(0,X.MnK)(vb),(0,Q.Sn)("design:type",vb)],gb.prototype,"_unavailablePetInfoDisplay",void 0),gb=(0,Q.Cg)([(0,X.EVk)("UltimatesBannerSpotlight",et.Y.ultimates)],gb);let yb=mb=class extends X.uAl{constructor(){super(...arguments),this._onSelected=new X.HN0,this._onLoaded=new X.HN0,this._selectedMoveAmount=48,this._selectedMoveDirection=new X.I9Y(0,1),this._selectedMoveDuration=1,this._selected=!1,this._activeButton=null}get onSelected(){return this._onSelected}get onLoaded(){return this._onLoaded}get removeFromTeamButton(){return this._removeFromTeamButton}get addToTeamButton(){return this._addToTeamButton}get canCheckInfo(){return this._questData.isActive()||this._questData.getProgressData().questState===Lf.e.QuestCompleted}get questData(){return this._questData}init(q,K=!1,z){var Y;this._initialY=this._contentView.transform.localPosition.y,this._initialX=this._contentView.transform.localPosition.x,this._questData=q,this._canEarnInTreasureTrack=K,this._battlePassEndDate=z,null===(Y=this.gameObject.findComponent(X.bE_))||void 0===Y||Y.Container.bind("UltimatesQuestData").toConstantValue(q),this.setDefaultUIState();const Q=dt.q.instance.prodigy.gameContainer.get("11f-118a");this._canAccess=Q.meetsRequirementsDeprecated(15),this._ultimateImage.setFrameName(q.petID.toString()),this.refreshCardState()}refreshCardState(){this.setDefaultUIState();const q=this._questData.getProgressData(),K=this._canEarnInTreasureTrack&&X.Aq$.isDefined(this._battlePassEndDate)||!this._canEarnInTreasureTrack&&uo.P8.isUltimateLeavingSoon(q.deadline,Nf.T.Week),z=this._playerData.player.kennel.hasPet(this._questData.petID);this._canEarnInTreasureTrack||this._questData.isActive()?z?this.determinePetAddState():K&&this.leavingSoonState(X.Aq$.isDefined(this._battlePassEndDate)?new Date(this._battlePassEndDate):q.deadline):this.unavailableState(),this._selected&&this.playSelectedAnimation()}playSelectedAnimation(){this._unavailableOverlay.active||this._innerTint.enableTint(),this._selectedBackground.active=!0,this._bloomAnimator.GameObject.active=!0,this._bloomAnimator.OnAnimationComplete.addOnce((()=>{this._bloomAnimator.playAnimation("bloom",!0)}),this),this._bloomAnimator.playAnimation("click",!1,!0)}selectionMove(){if(this._selected)return;this._selected=!0,this._cardInputOverlay.GameObject.active=!1,this._onSelected.dispatch(this._questData),this._activeButton&&(this._activeButton.GameObject.active=!0),this.playSelectedAnimation(),dt.q.instance.game.tweens.remove(this._moveTween);const q=this.getLocalPosObject();this._moveTween=dt.q.instance.game.add.tween(q,this),this._moveTween.to({x:this._initialX+this._selectedMoveAmount*this._selectedMoveDirection.x,y:this._initialY+this._selectedMoveAmount*this._selectedMoveDirection.y},this._selectedMoveDuration),this._moveTween.start()}deselectionMove(){var q;if(!this._selected)return;this._cardInputOverlay.GameObject.active=!0,this._selected=!1,this._innerTint.disableTint(this._graphicsContainer.active),this._selectedBackground.active=!1,this._bloomAnimator.GameObject.active=!1,this._moveTween&&(null===(q=this._moveTween.onTweenComplete)||void 0===q||q.removeAll(),dt.q.instance.game.tweens.remove(this._moveTween));const K=this.getLocalPosObject();this._moveTween=dt.q.instance.game.add.tween(K,this),this._moveTween.to({x:this._initialX,y:this._initialY},this._selectedMoveDuration).onTweenComplete.addOnce((()=>{this._activeButton&&(this._activeButton.GameObject.active=!1)})),this._moveTween.start()}setVisible(q){this._graphicsContainer.active=q}getLocalPosObject(){const q=new Ze.ObservablePoint((()=>{this._contentView.transform.setPosition(q.x,q.y)}),this,this._contentView.transform.localPosition.x,this._contentView.transform.localPosition.y);return q}setDefaultUIState(){this._removeFromTeamButton.GameObject.active=!1,this._addToTeamButton.GameObject.active=!1,this._activeButton&&(this._activeButton.GameObject.active=!1),this._activeButton=null,this._innerTint.disableTint(),this._selectedBackground.active=!1,this._plusIcon.active=!1,this._checkmarkIcon.active=!1,this._lockedIcon.active=!1,this._leavingSoonBanner.active=!1,this._unavailableOverlay.active=!1,this._bloomAnimator.GameObject.active=!1}leavingSoonState(q){this._leavingSoonBanner.active=!0;const K=Math.abs(Date.now()-q.getTime()),z=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(mb.DAYS_LEFT_LOCALIZATION_KEY);this._leavingSoonText.setTemplateString(z),this._leavingSoonText.setCountdownTimeMS(K)}enableAddToTeam(){this._plusIcon.active=!0,this._activeButton=this._addToTeamButton}enableRemoveFromTeam(){this._checkmarkIcon.active=!0,this._activeButton=this._removeFromTeamButton}unavailableState(){const q=this._playerData.player.kennel.hasPet(this._questData.petID);this._lockedIcon.active=!q,this._unavailableOverlay.active=!q,q&&this.determinePetAddState()}determinePetAddState(){uo.P8.isPetOnTeam(this._playerData.player.kennel.getPetByID(this._questData.petID))?this.enableRemoveFromTeam():this.enableAddToTeam()}destroy(){var q;this._onSelected.dispose(),this._onLoaded.dispose(),null===(q=this._moveTween)||void 0===q||q.stop(),dt.q.instance.game.tweens.remove(this._moveTween),super.destroy()}};yb.DAYS_LEFT_LOCALIZATION_KEY="ULTIMATES_V2_DAYS_LEFT",(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],yb.prototype,"_playerData",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],yb.prototype,"_onSelected",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],yb.prototype,"_onLoaded",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],yb.prototype,"_selectedMoveAmount",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],yb.prototype,"_selectedMoveDirection",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],yb.prototype,"_selectedMoveDuration",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yb.prototype,"_contentView",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],yb.prototype,"_removeFromTeamButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],yb.prototype,"_addToTeamButton",void 0),(0,Q.Cg)([(0,X.MnK)(Ph.w),(0,Q.Sn)("design:type",Ph.w)],yb.prototype,"_innerTint",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yb.prototype,"_selectedBackground",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yb.prototype,"_plusIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yb.prototype,"_checkmarkIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yb.prototype,"_lockedIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yb.prototype,"_leavingSoonBanner",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],yb.prototype,"_leavingSoonText",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],yb.prototype,"_ultimateImage",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yb.prototype,"_unavailableOverlay",void 0),(0,Q.Cg)([(0,X.MnK)(Ye.n),(0,Q.Sn)("design:type",Ye.n)],yb.prototype,"_cardInputOverlay",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],yb.prototype,"_bloomAnimator",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yb.prototype,"_graphicsContainer",void 0),yb=mb=(0,Q.Cg)([(0,X.EVk)("UltimatesCarouselCard",et.Y.ultimatesUi)],yb);let _b=class extends X.uAl{constructor(){super(...arguments),this._tamingLevel=0,this.maxTamingLevel=3,this.OnTransitionComplete=new X.HN0}get tamingLevel(){return this._tamingLevel}create(){super.create(),this.setTamingLevel(this._tamingLevel)}setTamingLevel(q,K){this._tamingLevel=Math.min(Math.max(q,0),this.maxTamingLevel);const z=`idle-${this._tamingLevel}`,Y=`transition-${this._tamingLevel}`;K&&this._heartSpine.OnAnimationComplete.addOnce((()=>{this._heartSpine.playAnimation(z,!1),this.OnTransitionComplete.dispatch()})),this._heartSpine.playAnimation(K?Y:z,!1)}destroy(){this.OnTransitionComplete.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],_b.prototype,"_tamingLevel",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],_b.prototype,"_heartSpine",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],_b.prototype,"maxTamingLevel",void 0),_b=(0,Q.Cg)([(0,X.EVk)("UltimatesTamingMeter",et.Y.ultimatesUi)],_b);z(33359),z(34454),z(52322);var Eb=z(12676);let wb=class extends X.uAl{constructor(){super(...arguments),this._onPlinthPresent=new X.HN0,this._onPlinthNotPresent=new X.HN0}create(){super.create(),Ze.Ticker.shared.addOnce(this.checkForPlinthPresence,this)}checkForPlinthPresence(){this.GameObject.active?this._onPlinthPresent.dispatch():this._onPlinthNotPresent.dispatch()}sendDiscoveryEvent(){dt.q.instance.prodigy.gameContainer.get("20f-5f67").gameWorld.sendNpcDiscoveredEvent({npc_name:Eb.N.UltimatesPlinth,npc_id:"ultimates_plinth",npc_type:Ua.ac.QuestGiver,npc_animation_id:"idle",x_coord:this.GameObject.transform.worldPosition.x,y_coord:this.GameObject.transform.worldPosition.y})}sendClickedEvent(){dt.q.instance.prodigy.gameContainer.get("20f-5f67").gameWorld.sendNpcClickedEvent({npc_name:Eb.N.UltimatesPlinth,npc_type:Ua.ac.QuestGiver,npc_id:"ultimates_plinth"})}destroy(){this._onPlinthPresent.dispose(),this._onPlinthNotPresent.dispose(),Ze.Ticker.shared.remove(this.checkForPlinthPresence,this),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wb.prototype,"_onPlinthPresent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wb.prototype,"_onPlinthNotPresent",void 0),wb=(0,Q.Cg)([(0,X.EVk)("UltimatesPlinth",et.Y.ultimates)],wb);let Tb=class extends X.PQK{installBindings(){{const q=dt.q.instance.prodigy.gameContainer;this.Container.bind("d24-279f").toConstantValue(q.get("d24-279f")),this.Container.bind("996-2681").toConstantValue(q.get("996-2681")),this.Container.bind(pr.QuestManager).toConstantValue(q.get("996-2681")),this.Container.bind("AnimationData").toConstantValue(new Vi.F(z(34500)))}}};Tb=(0,Q.Cg)([(0,X.Og1)("UltimatesInstaller","Installer")],Tb);z(11288),z(94995),z(83195),z(29438),z(16905),z(78703);var Sb,Ab=z(24521),Cb=z(23029);!function(q){q[q.AVAILABLE=0]="AVAILABLE",q[q.UNAVAILABLE=1]="UNAVAILABLE",q[q.COMPLETED=2]="COMPLETED"}(Sb||(Sb={}));let Ob=class extends X.uAl{get taskData(){return this._taskData}init(q){this._taskData=this.isTaskData(q)?q:this.getTaskData(q),this._iconTarget.setAsset(this._taskData.icon).catch((q=>X.VyI.log(`There was an error setting the icon for a Quest Task, ${q.message}`,X.$bb.Error)))}setTaskText(){const q={type:this._taskData.type,ID:this._taskData.id};this._name.text=(0,Is.k)(re.J.getLocalizationNameKey(q)),this._flavor.text=(0,Is.k)(re.J.getLocalizationFlavorKey(q))}setStatus(q){q===Sb.AVAILABLE?(this._greyscale.removeFilter(),this.toggle.unlockState(),this.toggle.inputEnabled=!0):(this._greyscale.applyFilter(),this.toggle.lockState(nf.K.Disabled),this.toggle.inputEnabled=!1,this._iconComplete.active=q===Sb.COMPLETED)}isTaskData(q){return void 0!==q.id}getTaskData(q){const K=ae.t.getItem(q.taskDefinition.completionRequirements.data.type,q.taskDefinition.completionRequirements.data.id);return{type:K.type,id:K.ID,name:re.J.getLocalizationNameKey(K),flavorText:re.J.getLocalizationFlavorKey(K),icon:Ts.E.getIconForType(K.type,K.ID),status:q.taskProgress.status===Ar.t.COMPLETE?Sb.COMPLETED:Sb.UNAVAILABLE}}};(0,Q.Cg)([(0,X.MnK)(ft.l),(0,Q.Sn)("design:type",ft.l)],Ob.prototype,"toggle",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ob.prototype,"_name",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ob.prototype,"_flavor",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Ob.prototype,"_iconTarget",void 0),(0,Q.Cg)([(0,X.MnK)(vd),(0,Q.Sn)("design:type",vd)],Ob.prototype,"_greyscale",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ob.prototype,"_iconComplete",void 0),Ob=(0,Q.Cg)([(0,X.EVk)("TaskDisplay",et.Y.ultimatesUi)],Ob);let Ib=class extends X.uAl{constructor(){super(...arguments),this._taskCards=[],this.taskSelected=new X.HN0}create(){super.create(),this._taskCards.forEach((q=>{const K=q.findComponent(Ob);K.toggle.onSelected.add((()=>{this.taskSelected.dispatch(K.taskData.type,K.taskData.id),K.setTaskText()}))}))}setTasks(q,K=[]){this._taskCards.length===q.length?this._taskCards.forEach(((z,Y)=>{const Q=z.findComponent(Ob);Q.init(q[Y]),K.some((q=>q.taskDefinition.completionRequirements.data.id===Q.taskData.id))&&(Q.taskData.status=Sb.AVAILABLE),Q.setStatus(Q.taskData.status)})):X.VyI.log(`Attempted to set ${q.length} items for ${this._taskCards.length} cards`,X.$bb.Error)}destroy(){this.taskSelected.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Ib.prototype,"_taskCards",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ib.prototype,"taskSelected",void 0),Ib=(0,Q.Cg)([(0,X.EVk)("TaskSelector",et.Y.ultimatesUi)],Ib);var Db=z(2775);let Rb=class extends X.uAl{constructor(){super(...arguments),this._animationStates=["idle-1","idle-2","idle-3"],this._idleDialogues=[1258,1259,1260],this.onCutsceneComplete=new X.HN0,this._poseIndex=0}create(){super.create(),dt.q.instance.prodigy.load.assets(hf.B.Voice_42_1),this._poseIndex=Math.floor(Math.random()*this._animationStates.length),this._spine.playAnimation(this._animationStates[this._poseIndex],!0)}run(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;const z=this._playerDataProvider.player.ultimateQuestId,Y=null===(q=yield this._questManager.getQuestMetaData(z))||void 0===q?void 0:q.petID,Z=this._playerDataProvider.player.ultimateSessionStatus===bl.n.TrackingNPC,J=(null!==(K=yield this._questManager.getTasksInProgress())&&void 0!==K?K:[]).filter(this.isTradingTask).filter((q=>Z&&q.questID===z)),tt=J.length>0?(yield this._questManager.getQuestTasks(z)).filter(this.isTradingTask):[],et=yield this.getRandomLoreDialogue();(class{static play(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){q?K?yield(0,Nd.v$)([z,1264]):yield(0,Nd.v$)([z,Y,1265]):yield(0,Nd.v$)([1254,1255,1256,1257])}))}}).play(this._featureRequirements.meetsRequirementsDeprecated(15),J.length>0,this._idleDialogues[this._poseIndex],et).then((()=>{this.onCutsceneComplete.dispatch(),J.length>0&&this.openTradingTaskPopup(tt,J,Y)})).catch(X.RQr.createHandler("An error occurred while trying to play UltimatesWanderingNPCDialogue"))}))}getRandomLoreDialogue(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=(yield this._ultimatesQuestDataProvider.getCurrentQuestData()).filter((q=>q.isActive())).map((q=>q.petID)),K=Cb.R.loadData(Ab.r.UltimatesPetLocationConfig_json).ultimatesData.filter((K=>q.includes(K.id))).map((q=>q.loreDialogueIDs));return X.lv2.getRandomItem((0,yt.flatten)(K))}))}destroy(){this.onCutsceneComplete.dispose(),super.destroy()}isTradingTask(q){return q.type===eo.T.TRADE_WITH_ULLA}openTradingTaskPopup(q,K,z){dt.q.instance.prodigy.open.prefabMenu(Gt.l.UltimatesItemTradePopup,void 0,void 0,void 0,void 0,{[pr.QuestManager]:dt.q.instance.prodigy.gameContainer.get("996-2681")}).onPrefabLoaded.addOnce((z=>{z.transform.setPosition(dt.q.instance.game.width/2,dt.q.instance.game.height/2),z.findComponent(Ib).setTasks(q,K),z.onDestroy.addOnce((()=>{Ii.rD.runDialogueSequence([1265],(()=>{this._playerDataProvider.player.ultimateSessionStatus!==bl.n.None&&(dt.q.instance.game.broadcaster.addAppListener(Xn.ig.PlayerLoaded,(()=>{dt.q.instance.prodigy.open.pets(),dt.q.instance.game.broadcaster.removeAppListener(Xn.ig.PlayerLoaded,this,void 0),this._playerDataProvider.player.unlockSessionStatus()}),this,void 0,!0),this._playerDataProvider.player.setUltimateSessionStatus(bl.n.Transition,"",0,!0))}))}))}))}};(0,Q.Cg)([(0,X.Cdj)("11f-118a"),(0,Q.Sn)("design:type",Object)],Rb.prototype,"_featureRequirements",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Rb.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("996-2681"),(0,Q.Sn)("design:type",il.k)],Rb.prototype,"_questManager",void 0),(0,Q.Cg)([(0,X.Cdj)("d24-279f"),(0,Q.Sn)("design:type",Db.m)],Rb.prototype,"_ultimatesQuestDataProvider",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],Rb.prototype,"_spine",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Rb.prototype,"onCutsceneComplete",void 0),Rb=(0,Q.Cg)([(0,X.EVk)("WanderingNPCBranchingDialogue",et.Y.ultimates)],Rb);var Pb,Mb,Nb,xb=z(12270),Lb=z(39938);!function(q){q.Core="GoldAnchor",q.Plus="PlusAnchor",q.Ultra="UltraAnchor"}(Pb||(Pb={})),function(q){q.Spread="SpreadAnchors",q.Tight="TightAnchors"}(Mb||(Mb={})),(0,Lb.n)(Mb,"ChestGroupLayout"),function(q){q.Sparkle="SparkleContainer",q.Arrow="ArrowContainer"}(Nb||(Nb={}));let kb=class extends X.uAl{constructor(){super(...arguments),this._allowanceLayoutMap=new Map,this._chestAnchorMap=new Map,this._layout=Mb.Tight,this._allowance=ie.D.Core,this._hasBeenInitialized=!1}get _layoutState(){return this._layout}set _layoutState(q){this.onLayoutStateChanged(q)}setLayoutState(q){this.onLayoutStateChanged(q)}set _allowanceState(q){this.onAllowanceStateChanged(q)}setAllowance(q){this.onAllowanceStateChanged(q)}postCreate(){this._allowanceLayoutMap.set(ie.D.NonMember,this.coreLayoutContainer),this._allowanceLayoutMap.set(ie.D.Core,this.coreLayoutContainer),this._allowanceLayoutMap.set(ie.D.Plus,this.plusLayoutContainer),this._allowanceLayoutMap.set(ie.D.Ultra,this.ultraLayoutContainer),this._chestAnchorMap.set(Pb.Core,this.goldChestObject),this._chestAnchorMap.set(Pb.Plus,this.plusChestObject),this._chestAnchorMap.set(Pb.Ultra,this.ultraChestObject),this._hasBeenInitialized=!0,this.updateChestLayout(),this.updateHighlightElements(),super.postCreate()}onLayoutStateChanged(q){this._layout=q,this.updateChestLayout(),this.updateHighlightElements()}onAllowanceStateChanged(q){this._allowance=q,this.updateChestLayout(),this.updateHighlightElements()}updateChestLayout(){this._allowanceLayoutMap.forEach(((q,K)=>{K===this._allowance&&(null==q||q.children.forEach((q=>{var K;q.name===this._layout&&(this._allowance===ie.D.NonMember&&(null===(K=q.findChildByName(Pb.Core))||void 0===K||K.addChild(this.goldChestObject)),Object.values(Pb).forEach((K=>{var z;null===(z=q.findChildByName(K))||void 0===z||z.addChild(this._chestAnchorMap.get(K))})))})))}))}updateHighlightElements(){var q,K;if(!this._hasBeenInitialized)return;const z=null!==(K=null===(q=this._rootHighlightContainer.findChildByName(this._allowance))||void 0===q?void 0:q.findChildByName(this._layout))&&void 0!==K?K:null;if(!z)return;const Y=z.findChildByName(Nb.Sparkle);Y&&Y.addChild(this._highlightSparkle);const Q=z.findChildByName(Nb.Arrow);Q&&Q.addChild(this._highlightArrow)}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kb.prototype,"coreLayoutContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kb.prototype,"plusLayoutContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kb.prototype,"ultraLayoutContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kb.prototype,"goldChestObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kb.prototype,"plusChestObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kb.prototype,"ultraChestObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kb.prototype,"_highlightSparkle",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kb.prototype,"_highlightArrow",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kb.prototype,"_rootHighlightContainer",void 0),(0,Q.Cg)([(0,X.gfw)(Mb),(0,Q.Sn)("design:type",String),(0,Q.Sn)("design:paramtypes",[String])],kb.prototype,"_layoutState",null),(0,Q.Cg)([(0,X.gfw)(ie.D),(0,Q.Sn)("design:type",String),(0,Q.Sn)("design:paramtypes",[String])],kb.prototype,"_allowanceState",null),kb=(0,Q.Cg)([(0,X.EVk)("WizardBankChestGroupLayoutController")],kb);var Bb=z(8838);let Ub=class extends X.uAl{constructor(){super(...arguments),this._primaryColor="#F6E38C",this._secondaryColor="#AD3E0F",this._value=0}get primaryColor(){return this._primaryColor}get secondaryColor(){return this._secondaryColor}get value(){return this._value}set value(q){this._value=q,this.setValue(q)}postCreate(){this.setValue(this._value),this.setColors(this.primaryColor,this.secondaryColor),super.postCreate()}setValue(q){this._valueTextComponent.text=`${q}`,this._borderTextComponent.text=`${q}`}setColors(q,K){if(!Vt.$.isValidHex(q))return;const z=Vt.$.isValidHex(K)?K:q;this._valueTextComponent.fill=`${q}`,this._valueTextComponent.stroke=`${z}`}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ub.prototype,"_valueTextComponent",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ub.prototype,"_borderTextComponent",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",Object)],Ub.prototype,"_primaryColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",Object)],Ub.prototype,"_secondaryColor",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Ub.prototype,"_value",void 0),Ub=(0,Q.Cg)([(0,X.EVk)("MagicoinValueText")],Ub);var Fb=z(40743);const Gb={[ie.D.NonMember]:["#F6E38C","#AD3E0F"],[ie.D.Core]:["#F6E38C","#AD3E0F"],[ie.D.Plus]:["#AEEAF2","#5C6AAA"],[ie.D.Ultra]:["#FFB1D7","#9D3E67"]},jb=800;let $b=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.onPanelButtonPressed=this.createTidySignal(),this._canCollect=!1}get canCollect(){return this._canCollect}create(){super.create(),this.gameObject.parent.active=!1,this.setAlpha(0)}update(){super.update(),this._tweenFromPosition&&this._tweenFromPosition.x!==this.gameObject.parent.transform.localPosition.x&&(this.tweenXPosition(this._tweenFromPosition.x-this.gameObject.parent.transform.localPosition.x,0,jb,0),this._tweenFromPosition=void 0)}onAllowanceTierStateChange(q){gh.A.isDefined(this._tierTextComponent)&&(this._tierTextComponent.text=Vt.$.capitalizeFirstLetter(q),this._tierTextComponent.fill=`${Gb[q][0]}`)}destroy(){dt.q.instance.prodigy.game.tweens.removeAllFromOwner(this),super.destroy()}setup(q){var K,z,Y,Q,X;const{allowanceTier:Z,currencyValue:J,forceChestState:tt,layout:et}=q;null===(K=this.allowanceStateController)||void 0===K||K.setState(Z);const it=null!=et?et:Mb.Tight;null===(z=this.layoutController)||void 0===z||z.setLayoutState(it);const{value:st}=null!=J?J:{value:0};null===(Y=this.valueTextComponent)||void 0===Y||Y.setValue(st),null===(Q=this.valueTextComponent)||void 0===Q||Q.setColors(...Gb[Z]);const nt=st>0;this._canCollect=nt,gh.A.isDefined(this.collectButtonObject)&&(this.collectButtonObject.active=nt),gh.A.isDefined(this.collectedSpineObject)&&(this.collectedSpineObject.active=!nt);const at=null!=tt?tt:nt?Bb.T.Open:Bb.T.Disabled,rt=this.checkIfPlayerNeedsMembership(Z);gh.A.isDefined(this._askParentTextObject)&&(this._askParentTextObject.active=!!nt&&rt),gh.A.isDefined(this._promptTextComponent)&&rt&&(this._promptTextComponent.text=(0,Is.k)("WIZARD_BANK_BECOME")),null===(X=this.chestStateController)||void 0===X||X.setState(at)}changeToClaimedState(){this.allowanceStateController&&this.setup({allowanceTier:this.allowanceStateController.currentState,forceChestState:Bb.T.Disabled}),this._tweenFromPosition=_t().clone(this.gameObject.parent.transform.localPosition)}checkIfPlayerNeedsMembership(q){var K;switch(null!==(K=xb.E.get(this._activePlayer.getMemberTier()))&&void 0!==K?K:ie.D.NonMember){case ie.D.Ultra:return!1;case ie.D.Plus:return q===ie.D.Ultra;case ie.D.Core:return q===ie.D.Ultra||q===ie.D.Plus;case ie.D.NonMember:default:return!0}}handleButtonPress(){this.onPanelButtonPressed.dispatch()}tweenIn(q){this.gameObject.parent.active=!0,this.tweenAlpha(0,1,q),this.tweenXPosition(50,0,jb,q)}tweenAlpha(q,K,z){const Y={value:q};this.setAlpha(q);const Q=dt.q.instance.prodigy.game.add.tween(Y,this);Q.to({value:K},jb,X.GS3.Linear.None,!0,z),Q.onUpdate.add((()=>this.setAlpha(Y.value))),Q.start()}tweenXPosition(q,K,z,Y){const Q={value:q};this.gameObject.transform.setPositionX(Q.value);const Z=dt.q.instance.prodigy.game.add.tween(Q,this);Z.to({value:K},z,X.GS3.Cubic.Out,!0,Y),Z.onUpdate.add((()=>{this.gameObject.transform.setPositionX(Q.value)})),Z.start()}setAlpha(q){this.panelRenderComponent&&(this.panelRenderComponent.alpha=q,this.panelRenderComponent.updateFilter())}};(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],$b.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],$b.prototype,"onPanelButtonPressed",void 0),(0,Q.Cg)([(0,X.MnK)(kb),(0,Q.Sn)("design:type",kb)],$b.prototype,"layoutController",void 0),(0,Q.Cg)([(0,X.MnK)(Fb.r),(0,Q.Sn)("design:type",Fb.r)],$b.prototype,"chestStateController",void 0),(0,Q.Cg)([(0,X.MnK)(Fb.r),(0,Q.Sn)("design:type",Fb.r)],$b.prototype,"allowanceStateController",void 0),(0,Q.Cg)([(0,X.MnK)(Ub),(0,Q.Sn)("design:type",Ub)],$b.prototype,"valueTextComponent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],$b.prototype,"collectButtonObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],$b.prototype,"collectedSpineObject",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],$b.prototype,"_promptTextComponent",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],$b.prototype,"_tierTextComponent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],$b.prototype,"_askParentTextObject",void 0),(0,Q.Cg)([(0,X.MnK)(X.jsv),(0,Q.Sn)("design:type",X.jsv)],$b.prototype,"panelRenderComponent",void 0),$b=(0,Q.Cg)([(0,X.EVk)("WizardBankCollectPanelController")],$b);let Hb=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.onCoinsReachedWallet=this.createTidySignal(),this._canCollect=!1}get canCollect(){return this._canCollect}setup(q){1===q.reward.currency?(this._canCollect=q.availableToCollect,q.availableToCollect?this._rewardAmountText.text=(0,af.Hk)(q.reward.value):(this._rewardAmountText.text="0",this._claimedStateSignal.run())):X.VyI.log("Attempted to setup gold widget with a non-gold claim",X.$bb.Warning)}playCollectSequence(){this._canCollect=!1,this._collectSequenceSignal.run()}notifyCoinHasReachedWallet(){this.onCoinsReachedWallet.dispatch()}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Hb.prototype,"_rewardAmountText",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],Hb.prototype,"collectButton",void 0),(0,Q.Cg)([(0,X.MnK)(iu.S),(0,Q.Sn)("design:type",iu.S)],Hb.prototype,"_claimedStateSignal",void 0),(0,Q.Cg)([(0,X.MnK)(iu.S),(0,Q.Sn)("design:type",iu.S)],Hb.prototype,"_collectSequenceSignal",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Hb.prototype,"onCoinsReachedWallet",void 0),Hb=(0,Q.Cg)([(0,X.EVk)("WizardBankGoldWidgetController")],Hb);var Vb,Wb,qb=z(4903),Kb=z(63352),zb=z(91462),Yb=z(84938),Qb=z(76253);!function(q){q.Load="on_load",q.Play="on_play"}(Wb||(Wb={}));let Xb=Vb=class extends X.y4o{constructor(){super(...arguments),this.videoFolderPath="https://cdn.prodigygame.com/videos/",this.videoName="",this.videoSizeRatio="",this.autoPlay=!0,this.videoTimeoutMs=1e4,this.showCountdownTimer=!0,this.sendPurchaseFunnelEvents=!0,this.onVideoEnded=new X.HN0,this.onVideoStarted=new X.HN0,this.onVideoPlayCancelled=new X.HN0,this.onVideoStalled=new X.HN0,this.onVideoResumed=new X.HN0,this.videoEventType=Qb.B.None,this.instanceType=Ti.N.MembershipVideo,this._resolutionIds={[qb.W.SD]:"",[qb.W.HD]:"",[qb.W.FullHD]:""},this._containerSize=new X.or0,this._isLoading=!1,this._isPlaying=!1,this._hasError=!1,this._hasNetworkConnection=!0}set funnelStartTriggerParams(q){this._funnelStartTriggerParams=q}postCreate(){var q;super.postCreate();{this._handleNetworkOfflineReference=this.onNetworkOffline.bind(this),window.addEventListener("offline",this._handleNetworkOfflineReference),this._handleNetworkOnlineReference=this.onNetworkOnline.bind(this),window.addEventListener("online",this._handleNetworkOnlineReference);const K=null!==(q=this.getInjectedValue(ms.Wr.OriginId))&&void 0!==q?q:"";this._segment.videos.sendInterfaceOpenEvent(this.videoEventType,this.instanceType,K),this.autoPlay&&this.tryLoadAndPlayVideo()}}destroy(){var q;this._isPlaying&&this.handleVideoEnd(),null===(q=this._container)||void 0===q||q.destroy(),window.removeEventListener("offline",this._handleNetworkOfflineReference),window.removeEventListener("online",this._handleNetworkOnlineReference),this.onVideoEnded.dispose(),this.onVideoStarted.dispose(),this.onVideoPlayCancelled.dispose(),this.onVideoStalled.dispose(),this.onVideoResumed.dispose(),super.destroy()}tryLoadAndPlayVideo(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.loadVideoResource().catch((()=>{this.handleVideoError(),X.VyI.log("Failed to set up video player",X.$bb.Error)}))}))}initNetworkSpeed(){return(0,Q.sH)(this,void 0,void 0,(function*(){return new Promise(((q,K)=>{const z=Date.now(),Y=new Image,X=`https://cdn.prodigygame.com/videos/video-image-purple.png?t=${z}`;Y.onerror=this.onVideoError.bind(this),Y.onload=()=>(0,Q.sH)(this,void 0,void 0,(function*(){try{const K=Date.now(),Y=Number((2940192/((K-z)/1e3)).toFixed(2));this._networkSpeedKbps=Number((Y/1e3).toFixed(2)),q()}catch(Y){K(new Error("Failed to get network speed."))}})),Y.src=X}))}))}onNetworkOffline(){this._hasNetworkConnection=!1,this._isLoading&&this.handleVideoError()}onNetworkOnline(){this._hasNetworkConnection=!0}getDimensions(){return this._containerSize.setTo(this._container.width,this._container.height),this._containerSize}getVideoIdForResolution(q=qb.W.SD){return this._resolutionIds[q]?this._resolutionIds[q]:(X.VyI.log(`HTMLVideoPlayerComponent: No GUID found for resolution ${q}; using base video name instead`,X.$bb.Warning),this.videoName)}getVideoPathFromId(q){return`${this.videoFolderPath}${q}.mp4`}getVideoIdsForAllResolutions(){return 0===Object.keys(this._resolutionIds).length?(X.VyI.log("HTMLVideoPlayerComponent: No supported resolutions found for video; using base video ID only",X.$bb.Warning),[this.getVideoIdForResolution()]):Object.keys(this._resolutionIds).map((q=>this.getVideoIdForResolution(q)))}getCachedVideoId(){let q;for(const K of this.getVideoIdsForAllResolutions())if(Vb.CACHED_VIDEO_IDS.includes(K)){q=K;break}return q}getResolution(){const q=Object.keys(this._resolutionIds);let K=qb.W.SD;for(let z=1;zVb.MIN_NETWORK_SPEED_BENCHMARKS[Y]&&(K=Y)}return K}generateFullVideoPath(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this.getCachedVideoId();if(q)this._selectedVideoId=q;else{if(Object.keys(this._resolutionIds).length>0){yield this.initNetworkSpeed();const q=this.getResolution();this._selectedVideoId=this.getVideoIdForResolution(q)}else this._selectedVideoId=this.getVideoIdForResolution();this._selectedVideoId&&Vb.CACHED_VIDEO_IDS.push(this._selectedVideoId)}return this.getVideoPathFromId(this._selectedVideoId)}))}loadVideoResource(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._isLoading=!0,this._segment.videos.setNetworkTestStartedTimestamp(),!this._hasNetworkConnection)return void this.handleVideoError();let q;try{q=yield this.generateFullVideoPath()}catch(Xv){return void this.handleVideoError()}this._segment.videos.sendVideoLoadingStartedEvent(this._selectedVideoId,this.videoEventType,this.instanceType),this.setupTimeout();const K=new Ze.VideoResource(q,{updateFPS:30,autoPlay:!1,autoLoad:!1});this._videoController=K.source;const z=()=>{this.handleVideoError()};this._videoController.addEventListener("error",z,{once:!0,capture:!0}),this._videoController.volume=Yb.B.voiceVolume.value,this._videoController.onplay=()=>{K.source.pause()},yield K.load(),this._videoController.removeEventListener("error",z),this._hasError?X.VyI.log("HTMLVideoPlayerComponent: Video encountered an error on loading video resource; closing video player",X.$bb.Error):yield this.setupVideoWithResource(K,q)}))}setupVideoWithResource(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z,Y;const Q=Ze.Texture.from(this._videoController);if(q.bind(Q.baseTexture),this._videoSprite=new Ze.Sprite(Q),this._videoController.onerror=this.onVideoError.bind(this),this._videoController.onstalled=this.videoStalled.bind(this),this._videoController.onwaiting=this.videoStalled.bind(this),!(null===(z=this._videoController)||void 0===z?void 0:z.duration))return X.VyI.log("HTMLVideoPlayerComponent: Failed to load video; closing video player",X.$bb.Error),this._segment.videos.sendVideoErrorEvent(this._selectedVideoId,Wb.Load,null===(Y=this._videoController)||void 0===Y?void 0:Y.currentTime),void this.handleVideoEnd(!1);this._videoController.onended=this.onVideoEnd.bind(this),this._isLoading=!1;try{const q=yield this.getVideoSize(K);this._segment.videos.sendVideoLoadingCompletedEvent(q)}catch(Z){X.VyI.log("HTMLVideoPlayerComponent: Failed to get video size after loading; cannot send video loading completed event to Segment",X.$bb.Warning)}this._hasError?X.VyI.log("HTMLVideoPlayerComponent: Video encountered an error on getting video size; closing video player",X.$bb.Error):yield this.finalizeVideoSetup()}))}finalizeVideoSetup(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.setupVideoContainer(),this._videoController.onplay=null,yield this.tryPlayVideo()}))}getVideoSize(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=yield fetch(q,{method:"HEAD"});return Number(K.headers.get("Content-Length"))||0}))}setupVideoContainer(){this._container||(this._container=X.W$e.instance.game.add.container(),this._container.name="Video Player Container"),this._container.addChild(this._videoSprite),this._container.interactive=!0,this._container.interactiveChildren=!0,this._container.alpha=0,this.setRootContainer(this._container)}setupTimeout(){this.clearTimeout(),this._timeoutId=window.setTimeout(this.onTimeout.bind(this),this.videoTimeoutMs)}onTimeout(){X.VyI.log("HTMLVideoPlayerComponent: Video timed out; closing video player",X.$bb.Error),this.handleVideoError()}clearTimeout(){this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=void 0)}videoStalled(){this.setupTimeout(),this.showCountdownTimer&&this.countdownTimer.stopTimer(),this._videoController.onstalled=null,this._videoController.onplaying=this.videoResumed.bind(this),this.onVideoStalled.dispatch()}videoResumed(){this.clearTimeout(),this._videoController.onplaying=null,this._videoController.onstalled=this.videoStalled.bind(this);const q=1e3*(this._videoController.duration-this._videoController.currentTime);this.showCountdownTimer&&this.countdownTimer.setCountdownTimeMS(q),this.onVideoResumed.dispatch(q)}onVideoError(){this.handleVideoError()}handleVideoError(){var q;this._hasError=!0,this.clearVideo();const K=this._isPlaying?Wb.Play:Wb.Load;this._segment.videos.sendVideoErrorEvent(this._selectedVideoId,K,null===(q=this._videoController)||void 0===q?void 0:q.currentTime),this.handleVideoEnd(!1)}tryPlayVideo(){return(0,Q.sH)(this,arguments,void 0,(function*(q=!0){try{this.setupTimeout(),this._videoController.currentTime=0,yield this._videoController.play(),this._container.alpha=1}catch(e){return X.VyI.log("HTMLVideoPlayerComponent: Failed to play video",X.$bb.Error),this.clearTimeout(),void this.handleVideoError()}this.onVideoStart()}))}onVideoStart(){this.clearTimeout(),this._isPlaying=!0,dt.q.instance.prodigy.audio.pauseBGM(),this._segment.videos.sendVideoPlayedEvent(this._videoController.duration);const q=1e3*this._videoController.duration;this.showCountdownTimer&&(this.countdownTimerContainer.active=!0,this.countdownTimer.setCountdownTimeMS(q)),this.onVideoStarted.dispatch(q)}onVideoEnd(){this.handleVideoEnd()}handleVideoEnd(q=!0){this._isPlaying=!1,this.sendPurchaseFunnelEvents&&this._segment.videos.sendFunnelTriggerImpressionEvent(this.videoEventType),q&&this._segment.videos.sendVideoStoppedEvent(this._videoController.currentTime),this.clearVideo(),this.clearTimeout(),this.countdownTimerContainer.active=!1,this.onVideoEnded.dispatch(q),dt.q.instance.prodigy.audio.resumeBGM()}onVideoCancel(){this.onVideoPlayCancelled.dispatch(),this.handleVideoEnd(!1)}clearVideo(q=!0){var K,z,Y;null===(K=this._videoController)||void 0===K||K.pause(),null===(z=this._videoController)||void 0===z||z.removeAttribute("src"),null===(Y=this._videoController)||void 0===Y||Y.load(),this._container&&(this._container.removeChild(this._videoSprite),this._container.alpha=0)}sendFunnelStart(){this._segment.videos.sendFunnelStartEvent(this._funnelStartTriggerParams)}};Xb.CACHED_VIDEO_IDS=[],Xb.MIN_NETWORK_SPEED_BENCHMARKS={[qb.W.SD]:0,[qb.W.HD]:4e3,[qb.W.FullHD]:8e3},(0,Q.Cg)([(0,Qi.b)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],Xb.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Xb.prototype,"videoFolderPath",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Xb.prototype,"videoName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Xb.prototype,"videoSizeRatio",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Xb.prototype,"autoPlay",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Xb.prototype,"videoTimeoutMs",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Xb.prototype,"countdownTimerContainer",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],Xb.prototype,"countdownTimer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Xb.prototype,"showCountdownTimer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Xb.prototype,"sendPurchaseFunnelEvents",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Xb.prototype,"onVideoEnded",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Xb.prototype,"onVideoStarted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Xb.prototype,"onVideoPlayCancelled",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Xb.prototype,"onVideoStalled",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Xb.prototype,"onVideoResumed",void 0),(0,Q.Cg)([(0,X.gfw)(Qb.B),(0,Q.Sn)("design:type",String)],Xb.prototype,"videoEventType",void 0),(0,Q.Cg)([(0,X.gfw)(Ti.N),(0,Q.Sn)("design:type",String)],Xb.prototype,"instanceType",void 0),Xb=Vb=(0,Q.Cg)([(0,X.EVk)("HTMLVideoPlayer",et.Y.uiVideo)],Xb);var Zb=z(48982),Jb=z(47968),tp=z(3374),ep=z(60228);const ip={[ie.D.NonMember]:"collect_gold_wb_button",[ie.D.Core]:"collect_core_wb_button",[ie.D.Plus]:"collect_plus_wb_button",[ie.D.Ultra]:"collect_ultra_wb_button"},sp={[ie.D.Core]:"trail-gold",[ie.D.Plus]:"trail-plus",[ie.D.Ultra]:"trail-ultra"},np={[ie.D.Core]:"gold",[ie.D.Plus]:"plus",[ie.D.Ultra]:"ultra"};var ap;!function(q){q[q.NonMember=0]="NonMember",q[q.Member=1]="Member"}(ap||(ap={}));let rp=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.panelControllers=[],this._debugMode=ap.NonMember,this._membershipPurchased=!1,this._shouldShowVideo=!1,this._claimAnimationSemaphore=0,this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE="WizardBankModalControllerComponent: Error updating Wizard Bank HUD button notifications"}postCreate(){this.init().then((()=>{this.sendMembershipFunnelStart()})).catch(X.RQr.createHandler("WizardBankModalControllerComponent: Error initializing the controller")),this._goldWidget.collectButton.onClick.add(this.startGoldCollection,this),dt.q.instance.prodigy.game.broadcaster.addAppListener(Xn.H3.MembershipResponseReceived,this.handleMembershipChange,this),super.postCreate()}destroy(){this.processMembershipFunnelQuit(),super.destroy()}init(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z;if(this.gameObject.isDestroyed||this.gameObject.isMarkedForDestruction)return;const Y=null!==(q=xb.E.get(this._featureAccessData.memberTier))&&void 0!==q?q:ie.D.NonMember,Q=Y===ie.D.NonMember;this._shouldShowVideo=Q&&Ut.O.isEnglishLocale(),[,this._lastClaimDataResponse]=yield Promise.all([this._shouldShowVideo?this.refreshVideoData():Promise.resolve(),this._hardCurrencyNetworkHandler.getAllowanceClaimData()]);const{totalClaimable:X}=this._lastClaimDataResponse;Ht.d.updateInjectedValues(this.gameObject,Object.assign({CLAIM_TRAIL_ANIMATION:null!==(K=sp[Y])&&void 0!==K?K:void 0,CLAIM_WALLET_MC_ANIMATION:null!==(z=np[Y])&&void 0!==z?z:void 0},this._shouldShowVideo?Zb.h.advanceToNextVideoAndGetInjectionData({videoTypeData:this._currentVideoTypeData}):{}));const Z=X.find((({currency:q})=>1===q)),J=gh.A.isDefined(Z)&&Z.value>0;this._goldWidget.setup({reward:{currency:1,value:J?Z.value:0},hasValidFeature:!0,availableToCollect:J}),Q?yield this.setupNonMemberContent():yield this.setupMemberContent(Y,this._lastClaimDataResponse)}))}refreshVideoData(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=tp.C.getVideosDataProvider();this._currentVideoTypeData=yield q.getVideosDataByType(qb.s.WizardBank)}))}setupNonMemberContent(){return(0,Q.sH)(this,void 0,void 0,(function*(){gh.A.isDefined(this.nonMembersContentContainer)&&(this.nonMembersContentContainer.active=!0),gh.A.isDefined(this.nonMembersContent)&&(this.nonMembersContent.active=!this._shouldShowVideo),this._videoPlayerContainer.active=this._shouldShowVideo,gh.A.isDefined(this.membersContentContainer)&&(this.membersContentContainer.active=!1),this._shouldShowVideo&&(yield this._videoPlayerComponent.tryLoadAndPlayVideo())}))}sendMembershipFunnelStart(){if(!gh.A.isDefined(this._lastClaimDataResponse))return;const q=function(q){const K=new Set;return"totalClaimable"in q?(q.totalClaimable.forEach((({currency:q,value:z})=>{z>0&&K.add(q)})),K):(Object.values(q).forEach((({availableToCollect:q,reward:z})=>{q&&z.value>0&&K.add(z.currency)})),K)}(this._lastClaimDataResponse),K=`${"gold_"+(q.has(1)?"available":"unavailable")}_${"magicoin_"+(q.has(27)?"available":"unavailable")}`,z=this.getInjectedValue("WIZARD_BANK_ORIGIN_TYPE")===wi.$N.AutoSurfaced?"AutoPop":"Membership";this._segment.purchase.sendFunnelStart({type:z,category:"wizard_bank",contentId:K,adType:Ys.R.UnifiedConversionFlow})}processMembershipFunnelQuit(){this._membershipPurchased||this._segment.purchase.sendFunnelQuit("Click-Membership","Close-Clicked")}setupMemberContent(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z,Y,Q;gh.A.isDefined(this.nonMembersContentContainer)&&(this.nonMembersContentContainer.active=!1),this._videoPlayerContainer.active=!1,gh.A.isDefined(this.membersContentContainer)&&(this.membersContentContainer.active=!0);const[X,Z,J]=this.panelControllers,{totalClaimable:tt}=K,et=tt.find((({currency:q})=>27===q)),it=(null!==(z=null==et?void 0:et.value)&&void 0!==z?z:0)>0,st=X.IsActiveInHierarchy?650:100;let nt=0;(null==X?void 0:X.GameObject)&&(X.setup({allowanceTier:q,currencyValue:et,layout:it?Mb.Spread:Mb.Tight}),X.IsActiveInHierarchy||(X.tweenIn(nt),nt+=300)),(null==Z?void 0:Z.GameObject)&&(Z.setup({allowanceTier:ie.D.Plus,currencyValue:null===(Y=K[ie.D.Plus])||void 0===Y?void 0:Y.reward,forceChestState:Bb.T.Closed}),Z.IsActiveInHierarchy||it||q!==ie.D.Core||(Z.tweenIn(st+nt),nt+=300)),(null==J?void 0:J.GameObject)&&(J.setup({allowanceTier:ie.D.Ultra,currencyValue:null===(Q=K[ie.D.Ultra])||void 0===Q?void 0:Q.reward,forceChestState:Bb.T.Closed}),J.IsActiveInHierarchy||it||q!==ie.D.Core&&q!==ie.D.Plus||(J.tweenIn(st+nt),nt+=300))}))}attemptMemberClaim(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;if(!gh.A.isDefined(this._lastClaimDataResponse))return Promise.resolve();const z=ip[null!==(q=xb.E.get(this._featureAccessData.memberTier))&&void 0!==q?q:ie.D.Core];this._segment.featureCommon.sendButtonEvent({buttonName:z,interfaceName:ws.B.WizardBank,interfaceType:wi.Wm.Modal});const Y=[],Z=null!==(K=this._lastClaimDataResponse)&&void 0!==K?K:{},{totalClaimable:J}=Z,tt=(0,Q.Tt)(Z,["totalClaimable"]);for(const[Q,{availableToCollect:X}]of Object.entries(tt))X&&Q!==ie.D.NonMember&&Y.push(Q);yield this._hardCurrencyDataProvider.claimAllowances(Y),(0,ep.Ug)().catch(X.RQr.createHandler(this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE))}))}showMembershipMLP(){var q,K,z;this._featureAccessData.memberTier!==Vs._$.NonMember?this.addListenerToPromise(null!==(z=null===(K=this._webPurchaseComponent)||void 0===K?void 0:K.initiateMembershipPurchaseUpgradeWithIFrame())&&void 0!==z?z:Promise.reject(new Error("Web purchase component not available")),(()=>null),(q=>{X.RQr.createHandler(JSON.stringify(q))})):null===(q=this._webPurchaseComponent)||void 0===q||q.initiateMembershipPurchase()}attemptNonMemberClaim(){return(0,Q.sH)(this,void 0,void 0,(function*(){gh.A.isDefined(this._lastClaimDataResponse)&&(this._segment.featureCommon.sendButtonEvent({buttonName:ip[ie.D.NonMember],interfaceName:ws.B.WizardBank,interfaceType:wi.Wm.Modal}),yield this._hardCurrencyDataProvider.claimAllowances([ie.D.NonMember]),(0,ep.Ug)().catch(X.RQr.createHandler(this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE)))}))}startGoldCollection(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.attemptNonMemberClaim(),this._goldWidget.playCollectSequence()}))}handleMembershipChange(q){this._membershipPurchased="success"===q,dt.q.instance.prodigy.game.broadcaster.removeAppListener(Xn.H3.MembershipResponseReceived,this),(0,ep.Ug)().catch(X.RQr.createHandler(this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE)),dt.q.instance.game.broadcaster.broadcast(Xn.Y1.HUDRevampButtonVisibilityRefreshRequested)}onCloseButtonClicked(){const[q]=this.panelControllers;q.canCollect&&(q.onPanelButtonPressed.dispatch(),this._claimAnimationSemaphore++),0===this._claimAnimationSemaphore&&this.gameObject.destroyDeferred()}claimAnimationComplete(){0!==this._claimAnimationSemaphore&&(this._claimAnimationSemaphore--,0===this._claimAnimationSemaphore&&this.gameObject.destroyDeferred())}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)($b),(0,Q.Sn)("design:type",Array)],rp.prototype,"panelControllers",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],rp.prototype,"nonMembersContentContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],rp.prototype,"membersContentContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],rp.prototype,"nonMembersContent",void 0),(0,Q.Cg)([(0,X.Cdj)("cb2-bdd4"),(0,Q.Sn)("design:type",Jb.b)],rp.prototype,"_hardCurrencyNetworkHandler",void 0),(0,Q.Cg)([(0,X.Cdj)("bec-c6b4"),(0,Q.Sn)("design:type",na.W)],rp.prototype,"_hardCurrencyDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("73f-58d1"),(0,Q.Sn)("design:type",Kb.F)],rp.prototype,"_featureAccessData",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],rp.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.MnK)(Hb),(0,Q.Sn)("design:type",Hb)],rp.prototype,"_goldWidget",void 0),(0,Q.Cg)([(0,X.MnK)(zb.M),(0,Q.Sn)("design:type",zb.M)],rp.prototype,"_webPurchaseComponent",void 0),(0,Q.Cg)([(0,X.MnK)(Xb),(0,Q.Sn)("design:type",Xb)],rp.prototype,"_videoPlayerComponent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],rp.prototype,"_videoPlayerContainer",void 0),(0,Q.Cg)([(0,X.gfw)(ap),(0,Q.Sn)("design:type",Number)],rp.prototype,"_debugMode",void 0),rp=(0,Q.Cg)([(0,X.EVk)("WizardBankModalController")],rp);var op=z(84234),hp=(z(33587),z(32367),z(2265),z(21097)),cp=z(79600),dp=z(79687);let lp=class{static openInteractable(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=yield this.makeQuestRequest("interactables.openInteractable",{zoneTag:q});return dt.q.instance.prodigy.gameContainer.get("d90-622c").setCooldown(q,K.cooldown),K}))}static makeQuestRequest(q,K){return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z=null){try{const z=dt.q.instance.prodigy.gameContainer.get("b09-138c"),Y=yield z.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5}).useIdempotency(!0).execute(q,K);if(!Y.isOK())throw new cp.CatalystSdkError(cp.EErrorCode.Unknown,"Unknown CatalystSDK Error",`${Y.status}: ${JSON.stringify(Y.data)}`);return Y.data.response}catch(e){return X.VyI.log(`There was a problem getting data for ${q}. ${e.message}`,X.$bb.Error),z}}))}};lp=(0,Q.Cg)([(0,dp.injectable)()],lp);class up{static getConfig(){return this._configs||(this._configs=Cb.R.loadData(Ab.r.WorldInteractablesConfig_json)),this._configs}static isIdentifierValid(q){return X.Aq$.isDefined(this.getConfig().interactables[q])}static getCooldownTime(q){return this.getInteractableAssetFromID(q).cooldownTimeMS}static interactableHasQuestItems(q){var K;return(null===(K=this.getInteractableAssetFromID(q).questDropTables)||void 0===K?void 0:K.length)>0}static getInteractableName(q){var K;return this.isIdentifierValid(q)?null===(K=this.getInteractableAssetFromID(q))||void 0===K?void 0:K.name:""}static getInteractableAssetFromID(q){const K=this.getConfig().interactables[q].assetID,z=ae.t.getItem("interactable",K).data;if(!X.Aq$.isDefined(z))throw new Error(`Error getting cooldown config for world interactable ${q}. Interactable asset ${K} doesn't exist.`);return z}}let fp=class extends X.uAl{constructor(){super(...arguments),this._checkCooldownDelay=2}update(){if(super.update(),this._checkCooldownDelay>0&&0==--this._checkCooldownDelay)try{let q=!1;const K=this.getIdentifier();if(!q&&!up.isIdentifierValid(K))throw new Error(`World interactable ${K} doesn't exist in the world interactables config.`);this._cooldownComponent.initialize(K,this.getCooldownTime()),this._cooldownComponent.checkCooldown(),up.interactableHasQuestItems(K)&&this.hasAccessToUltimates()&&dt.q.instance.prodigy.gameContainer.get("996-2681").preloadQuestProgress().catch(X.RQr.createHandler("Error preloading quest progress")),dt.q.instance.prodigy.gameContainer.get("20f-5f67").container.sendContainerDiscoveredEvent(wi.ZF.Interactable,K,this.getPosition().x,this.getPosition().y,up.getInteractableName(this.getIdentifier()))}catch(q){X.VyI.log(q.message,X.$bb.Error),this.gameObject.active=!1}}hasAccessToUltimates(){return this._featureRequirements.meetsRequirementsDeprecated(15)}getIdentifier(){const q=dt.q.instance.prodigy.world.getCurrentMap(),K=this.getPosition();return`${q}-${K.x}-${K.y}`}getPosition(){return{x:Math.round(this.gameObject.transform.worldPosition.x),y:Math.round(this.gameObject.transform.worldPosition.y)}}getCooldownTime(){return up.getCooldownTime(this.getIdentifier())}};(0,Q.Cg)([(0,X.MnK)(ua),(0,Q.Sn)("design:type",ua)],fp.prototype,"_cooldownComponent",void 0),(0,Q.Cg)([(0,X.Cdj)("11f-118a"),(0,Q.Sn)("design:type",Object)],fp.prototype,"_featureRequirements",void 0),fp=(0,Q.Cg)([(0,X.EVk)("WorldInteractable",et.Y.ultimates)],fp);let bp=class extends Ke.u{constructor(){super(...arguments),this.onInteractionStart=new X.HN0,this.onInteractionError=new X.HN0}run(){this.onInteractionStart.dispatch(),this.doRun().then((()=>{this._segment.container.sendContainerOpenedEvent(wi.ZF.Interactable,this._interactable.getIdentifier())})).catch((q=>{this._segment.container.sendContainerOpenedFailedEvent(wi.ZF.Interactable,this._interactable.getIdentifier(),hp.WE.NetworkFailure),X.RQr.logError(q,`Failed to open interactable ${this._interactable.getIdentifier()}`),this.onInteractionError.dispatch()}))}doRun(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;const z=yield lp.openInteractable(this._interactable.getIdentifier()),Y=null!==(q=z.regularItems)&&void 0!==q?q:[],Q=null!==(K=z.questItems)&&void 0!==K?K:[],X=Q.concat(Y);this._openSFX.playSFX(),this.execute(166,{game:dt.q.instance.game,spine:this._interactableSpine.getSpine(),regularItems:Y.length>0?Y:null,allItems:X.length>0?X:null,revealAnimationName:this._revealAnimationName,hasQuestItems:Q.length>0,sourceID:this._interactable.getIdentifier(),transactionID:this._segment.container.getCurrentContainerTransactionID})}))}destroy(){this.onInteractionStart.dispose(),this.onInteractionError.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Pqz)(fp),(0,Q.Sn)("design:type",fp)],bp.prototype,"_interactable",void 0),(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],bp.prototype,"_interactableSpine",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],bp.prototype,"_revealAnimationName",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],bp.prototype,"onInteractionStart",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],bp.prototype,"onInteractionError",void 0),(0,Q.Cg)([(0,X.MnK)(ga),(0,Q.Sn)("design:type",ga)],bp.prototype,"_openSFX",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],bp.prototype,"_segment",void 0),bp=(0,Q.Cg)([(0,X.EVk)("InteractablesFSM",et.Y.ultimates)],bp);let pp=class extends fp{getIdentifier(){return this._minibossRewardId}};(0,Q.Cg)([(0,X.Cdj)("MinibossInteractableRewardId"),(0,Q.Sn)("design:type",String)],pp.prototype,"_minibossRewardId",void 0),pp=(0,Q.Cg)([(0,X.EVk)("MinibossRewardInteractable",et.Y.zones)],pp);z(88552);let vp=class extends X.uAl{run(){this.gameObject.active=!1}};vp=(0,Q.Cg)([(0,X.EVk)("DeactivateSelf")],vp);let gp=class extends X.uAl{constructor(){super(...arguments),this.cutsceneTag=""}playCutscene(){this.cutsceneTag?dt.q.instance.prodigy.world.playScene(this.cutsceneTag):X.VyI.log("StartLegacyCutsceneComponent: No cutscene tag specified",X.$bb.Warning)}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],gp.prototype,"cutsceneTag",void 0),gp=(0,Q.Cg)([(0,X.EVk)("StartLegacyCutscene",et.Y.utility)],gp);let mp=class extends X.uAl{create(){super.create(),this._targetState.setValue(re.J.shouldSuppressAd(this._loggedInPlayer.player))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],mp.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(Lr.f),(0,Q.Sn)("design:type",Lr.f)],mp.prototype,"_targetState",void 0),mp=(0,Q.Cg)([(0,X.EVk)("ActivePlayerMembershipSuppressionState",et.Y.membership)],mp);let yp=class extends X.uAl{constructor(){super(...arguments),this._runOnLoad=!1,this._onNonMember=new X.HN0,this._onMember=new X.HN0,this._onLegacyMember=new X.HN0,this._onHasFeatureAccess=new X.HN0,this._onNoFeatureAccess=new X.HN0}create(){super.create(),this._runOnLoad&&this.checkMembership()}checkMembership(){this._loggedInPlayer.isMember()?(this._onMember.dispatch(),this._loggedInPlayer.player.hasLegacyMembership()&&this._onLegacyMember.dispatch()):this._onNonMember.dispatch(),this._membershipFeatureName&&(this._loggedInPlayer.player.hasMembershipFeatureAccess(this._membershipFeatureName)?this._onHasFeatureAccess.dispatch():this._onNoFeatureAccess.dispatch())}destroy(){this._onMember.dispose(),this._onNonMember.dispose(),this._onLegacyMember.dispose(),this._onHasFeatureAccess.dispose(),this._onNoFeatureAccess.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],yp.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],yp.prototype,"_runOnLoad",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],yp.prototype,"_membershipFeatureName",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.Lr6)(0),(0,X.YLv)("Fires if the player has no membership"),(0,Q.Sn)("design:type",X.HN0)],yp.prototype,"_onNonMember",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.Lr6)(0),(0,X.YLv)("Fires if the player has any membership"),(0,Q.Sn)("design:type",X.HN0)],yp.prototype,"_onMember",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.Lr6)(0),(0,X.YLv)("Fires if the player has legacy membership, after onMember"),(0,Q.Sn)("design:type",X.HN0)],yp.prototype,"_onLegacyMember",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.Lr6)(0),(0,X.YLv)('Fires if the player has access to the membership feature in "Membership Feature Name"'),(0,Q.Sn)("design:type",X.HN0)],yp.prototype,"_onHasFeatureAccess",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.Lr6)(0),(0,X.nKb)(null),(0,X.YLv)('Fires if the player does not have access to the membership feature in "Membership Feature Name"'),(0,Q.Sn)("design:type",X.HN0)],yp.prototype,"_onNoFeatureAccess",void 0),yp=(0,Q.Cg)([(0,X.EVk)("MembershipGuard",et.Y.membership)],yp);let _p=class extends X.y4o{constructor(){super(...arguments),this._tooltipArrowLocation=.5,this._tooltipArrowDirection=0}create(){super.create(),this._tooltipRoot=dt.q.instance.game.add.group(null,`${this.gameObject.name} - MembershipSuppressionTooltipComponent`),this.setRootContainer(this._tooltipRoot)}destroy(){var q;null===(q=this._tooltipRoot)||void 0===q||q.destroy(),this._tooltipRoot=null,super.destroy()}getDimensions(){return new X.or0(this._tooltipRoot.width,this._tooltipRoot.height)}showTooltip(){var q,K,z;const Y=new X.I9Y;Y.copyFrom(this.GameObject.transform.worldPosition),X.i7d.main&&null!==(z=null===(K=null===(q=X.wa5.getActiveScene())||void 0===q?void 0:q.getLayer(this.gameObject.layer))||void 0===K?void 0:K.attachToCamera)&&void 0!==z&&!z&&Y.subtract(X.i7d.main.GameObject.transform.worldPosition),this.gameObject.findComponentInParent(ai)&&(Y.y-=75);dt.q.instance.prodigy.open.memberAdSuppressionToolTip({xPosition:Y.x,yPosition:Y.y,bodyText:null,arrowXRelPos:this._tooltipArrowLocation,arrowDirection:this._tooltipArrowDirection})}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],_p.prototype,"_tooltipArrowLocation",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],_p.prototype,"_tooltipArrowDirection",void 0),_p=(0,Q.Cg)([(0,X.EVk)("MembershipSuppressionTooltip",et.Y.membership)],_p);let Ep=class extends X.uAl{constructor(){super(...arguments),this.onNameChanged=new X.HN0,this.onNameChangedInArray=new X.HN0}get tier(){return this._tier}set tier(q){this._tier=q,this.refresh()}create(){super.create(),this.refresh()}refresh(){const q=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText((0,wn.g1)(this._tier));this.onNameChanged.dispatch(q),this.onNameChangedInArray.dispatch([q])}destroy(){this.onNameChanged.dispose(),this.onNameChangedInArray.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.gfw)(Vs._$),(0,Q.Sn)("design:type",Number)],Ep.prototype,"_tier",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ep.prototype,"onNameChanged",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ep.prototype,"onNameChangedInArray",void 0),Ep=(0,Q.Cg)([(0,X.EVk)("MembershipTierDataProvider",et.Y.membership)],Ep);let wp=class extends X.uAl{constructor(){super(...arguments),this._runOnLoad=!1,this._includeNonMembers=!0,this._onUserCanUpgrade=new X.HN0,this._onUserCannotUpgrade=new X.HN0}create(){super.create(),this._runOnLoad&&this.check().catch(X.RQr.createHandler("MembershipUpsellGuardComponent, error checking upgrade options"))}check(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._includeNonMembers&&!this._loggedInPlayer.isMember())return void this._onUserCanUpgrade.dispatch();((yield this._loggedInPlayer.player.getActiveMathMembership()).upgradeOptions.length>0?this._onUserCanUpgrade:this._onUserCannotUpgrade).dispatch()}))}destroy(){this._onUserCanUpgrade.dispose(),this._onUserCannotUpgrade.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],wp.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],wp.prototype,"_runOnLoad",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],wp.prototype,"_includeNonMembers",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.Lr6)(0),(0,X.YLv)("Fires if the player has available upgrade options"),(0,Q.Sn)("design:type",X.HN0)],wp.prototype,"_onUserCanUpgrade",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.Lr6)(0),(0,X.YLv)("Fires if the player has no upgrade options"),(0,Q.Sn)("design:type",X.HN0)],wp.prototype,"_onUserCannotUpgrade",void 0),wp=(0,Q.Cg)([(0,X.EVk)("MembershipUpsellGuard",et.Y.membership)],wp);let Tp=class extends uh.k{createTrigger(q,K,z,Y){const Q=this.getCustomPropertiesObject();let X;if(z)X=z;else switch(this._defaultTriggerData){case uh.S.Zone:X=dt.q.instance.prodigy.world.getCurrentZone();break;case uh.S.Map:X=dt.q.instance.prodigy.world.getCurrentMap();break;case uh.S.Battle:X=this._segment.postBattleFlow.getBattleId()}let Z=null!=Y?Y:re.J.showYouTubeMembershipAd(dt.q.instance.game,!0)?Ys.R.Video:Ys.R.Static;zs.P.shouldUseUnifiedConversionFlowForTriggerCategory(K)&&(Z=Ys.R.UnifiedConversionFlow);const J=zs.P.getAdVersionFromTriggerCategory(K);return Object.assign({type:q,category:K,contentId:X,adType:Z,adVersion:J},Q)}sendPurchaseFunnelImpression(q,K,z,Y){this.trigger=this.createTrigger(q,K,z,Y),this.purchaseFunnelCandidate=this._segment.purchase.sendFunnelTriggerImpression(this.trigger)}sendPurchaseFunnelStart(q,K,z,Y){var Q;const X=null!==(Q=this.trigger)&&void 0!==Q?Q:this.createTrigger(q,K,z,Y);this._segment.purchase.sendFunnelStart(X,this.purchaseFunnelCandidate)}sendPurchaseFunnelStep(q){this._segment.purchase.sendFunnelStep(q)}sendPurchaseFunnelError(q,K,z){this._segment.purchase.sendFunnelError(q,K,z)}sendPurchaseFunnelQuit(q,K){this._segment.purchase.sendFunnelQuit(q,K)}sendPurchaseFunnelHandoff(q){this._segment.purchase.sendFunnelHandoff(q)}sendPurchaseFunnelComplete(){this._segment.purchase.sendFunnelComplete()}sendFunnelAdvanced(q,K,z,Y){const Q={step_index:Y};this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:q,funnelType:K,stepName:z},Q)}};Tp=(0,Q.Cg)([(0,X.EVk)("SegmentAnalytics",et.Y.analytics)],Tp);let Sp=class extends uh.k{constructor(){super(...arguments),this.audience=Uc.w.Adults}sendQrCodeViewedEvent(){this.name&&this.audience?this._segment.qrCode.sendQrCodeViewedEvent(this.name,this.audience,{},this.getPropertiesObject()):X.VyI.log("Attempted to send analytics for QR code with unset fields, ignoring",X.$bb.Info)}};(0,Q.Cg)([(0,X.gfw)(Bc),(0,Q.Sn)("design:type",String)],Sp.prototype,"name",void 0),(0,Q.Cg)([(0,X.gfw)(Uc.w),(0,Q.Sn)("design:type",String)],Sp.prototype,"audience",void 0),Sp=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsQrCode",et.Y.analytics)],Sp);var Ap,Cp=z(10312),Op=z(92661);!function(q){q.CloseThisPrompt="closeThisPrompt",q.InitiateMembershipPurchase="initiateMembershipPurchase",q.OpenMembershipParent="openMembershipParent",q.OpenWebsite="openWebsite",q.PrefabMenu="openPrefabMenu",q.None="none"}(Ap||(Ap={}));const Ip=Op.Ikc({colour:Op.YjP(),size:Op.aig().min(1),text:Op.YjP(),font:Op.YjP().optional(),wordWrapWidth:Op.aig().min(1).optional(),localizationKey:Op.YjP().optional()}),Dp=Op.Ikc({prefabMenuGuid:Op.k5n(Gt.l).optional(),url:Op.YjP().optional()}),Rp=Op.Ikc({actionName:Op.k5n(Ap),params:Dp.optional()}),Pp=Op.Ikc({text:Op.YjP().optional(),buttonAction:Rp.optional()}),Mp=Op.Ikc({buttonName:Op.YjP().optional(),interfaceName:Op.YjP().optional(),qrCodeName:Op.k5n(Bc).optional(),instanceType:Op.YjP().optional()}),Np=Op.Ikc({title:Ip.optional(),subtitle:Ip.optional(),bodyTextElements:Op.YOg(Ip).optional(),button:Pp.optional(),contentImageGuid:Op.k5n(As.q).optional(),carouselItemNum:Op.Whr().min(0).optional(),segmentProperties:Mp.optional()});Op.Ikc({name:Op.YjP(),contentTemplateGuid:Op.k5n(Gt.l),configurableElements:Np.optional(),injectableProperties:Op.g1P(Op.YjP(),Op.L5J()).optional()});let xp=class extends X.uAl{constructor(){super(...arguments),this._bodyTextElements=[]}postCreate(){var q,K;super.postCreate();{const z=this.getInjectedValue(ms.Dw.DynamicPromptContentAssetGuid),Y=Cb.R.loadData(z);if(!Y)return void X.VyI.log(`Failed to configure dynamic prompt because content configuration asset with ID: ${z} does not exist.`,X.$bb.Error);const Q=Y.configurableElements;Q&&(null!==(q=this._titleText)&&void 0!==q||(this._titleText=this.gameObject.addComponent(X.EYj)),null!==(K=this._subtitleText)&&void 0!==K||(this._subtitleText=this.gameObject.addComponent(X.EYj)),this.configureTextComponent(this._titleText,Q.title),this._subtitleTextLocalizationKey?this.configureLocalizedTextComponent(this._subtitleTextLocalizationKey,Q.subtitle):this.configureTextComponent(this._subtitleText,Q.subtitle),this._contentArtAsset.setAsset(Q.contentImageGuid).catch(X.RQr.createHandler("Failed to set the content art asset on the dynamic prompt.")),Q.bodyTextElements&&this.configureBodyTextElements(Q.bodyTextElements),Q.segmentProperties&&this.configureSegment(Q.segmentProperties),Q.button&&this.configureButtons(Q.button))}}configureBodyTextElements(q){const K=q.length,z=this._bodyTextElements.length;K>z&&X.VyI.log(`There are ${K} bodyTextElements configs, but only ${z} Text components to configure.\n The first ${z} Text components will be configured.`,X.$bb.Warning);for(let Y=0;YK-1){X.VyI.log(`There is no config defined for Text component at index ${Y} of _bodyTextElements. Completing setup.`,X.$bb.Warning);break}this.configureTextComponent(this._bodyTextElements[Y],q[Y])}}configureTextComponent(q,K){K&&(q.text=this._localizer.getText(K.text),q.fill=K.colour,q.fontSize=K.size,K.font&&(q.font=K.font),K.wordWrapWidth&&(q.wordWrap=!0,q.wordWrapWidth=K.wordWrapWidth))}configureLocalizedTextComponent(q,K){if(!K)return;q.localizationKey=K.localizationKey;const z=q.localizedText;z.fill=K.colour,z.fontSize=K.size,K.font&&(z.font=K.font),K.wordWrapWidth&&(z.wordWrap=!0,z.wordWrapWidth=K.wordWrapWidth)}configureSegment(q){this._buttonProperties&&(this._buttonProperties.interfaceName=q.interfaceName,this._buttonProperties.buttonName=q.buttonName,this._buttonProperties.saveClickInfo=q.buttonName),this._qrCode&&(this._qrCode.name=q.qrCodeName)}configureButtons(q){var K,z;let Y;switch(this.setCtaButtonText(q.text),null===(K=q.buttonAction)||void 0===K?void 0:K.actionName){case Ap.PrefabMenu:Y=()=>{var K,z;dt.q.instance.prodigy.open.prefabMenu(null===(z=null===(K=q.buttonAction)||void 0===K?void 0:K.params)||void 0===z?void 0:z.prefabMenuGuid).createContainer=!1};break;case Ap.OpenMembershipParent:if(dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.isPlayingAtSchool())Y=this.lockBecomeAMemberButtonAtSchool();else{const q=this.ctaButton.GameObject.addComponent(Tp);Y=()=>{dt.q.instance.prodigy.open.membershipParent({flavourText:this.getInjectedValue(ms.Eh.MembershipPurchaseMemberPanelAdFlavourText),frameName:this.getInjectedValue(ms.Eh.MembershipPurchaseMemberPanelAdFrameName),trackingEvent:this.getInjectedValue(ms.Eh.MembershipPurchaseMemberPanelAdTrackingEvent)},{conversionFunnelMetadata:this.getInjectedValue(ms.Eh.MembershipPurchaseConversionFunnelMetadata),conversionFunnelName:this.getInjectedValue(ms.Eh.MembershipPurchaseConversionFunnelName),conversionStage:this.getInjectedValue(ms.Eh.MembershipPurchaseConversionFunnelStage),conversionStaticOrVideo:this.getInjectedValue(ms.Eh.MembershipPurchaseConversionFunnelStaticOrVideo)},this.getInjectedValue(ms.Eh.MembershipPurchaseUpgrade),this._buttonProperties.saveClickInfo),q.sendPurchaseFunnelStep("Click-Membership")},this._buttonOverlay&&(this._buttonOverlay.onClick.add(Y),this._buttonOverlay.useHandCursor=!0)}break;case Ap.OpenWebsite:Y=()=>{var K,z;return Cp.I.openWebsite(null===(z=null===(K=q.buttonAction)||void 0===K?void 0:K.params)||void 0===z?void 0:z.url)};break;case Ap.CloseThisPrompt:Y=()=>{var q;return(null!==(q=this._rootGameObject)&&void 0!==q?q:this.gameObject).destroyDeferred()};break;case Ap.InitiateMembershipPurchase:Y=()=>(0,Q.sH)(this,void 0,void 0,(function*(){const q=this.gameObject.findComponentInChildren(zb.M,!0);q?q.initiateMembershipPurchase():X.VyI.log("No ProcessWebPurchaseComponent found on this prefab. Cannot initiate purchase.",X.$bb.Error)}));break;case Ap.None:return;default:return void X.VyI.log(`Dynamic prompt button action: ${null===(z=q.buttonAction)||void 0===z?void 0:z.actionName} is not in the enum of possible dynamic button actions`,X.$bb.Error)}this.ctaButton.onClick.add(Y)}lockBecomeAMemberButtonAtSchool(){return this.setCtaButtonText(this._localizer.getText("DYNAMIC_PROMPT_SCHOOL_BUTTON_LOCKED")),()=>{var q;return(null!==(q=this._rootGameObject)&&void 0!==q?q:this.gameObject).destroyDeferred()}}setCtaButtonText(q){const K=this._localizer.getText(q);if(this.ctaButton instanceof zt.S)this.ctaButton.text=K;else{const q=this.ctaButton.GameObject.findComponentInChildren(X.EYj);q&&(q.text=K)}}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xp.prototype,"_rootGameObject",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],xp.prototype,"_titleText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],xp.prototype,"_subtitleText",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],xp.prototype,"_subtitleTextLocalizationKey",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],xp.prototype,"_bodyTextElements",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],xp.prototype,"_contentArtAsset",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],xp.prototype,"ctaButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],xp.prototype,"_buttonOverlay",void 0),(0,Q.Cg)([(0,X.MnK)(hn),(0,Q.Sn)("design:type",hn)],xp.prototype,"_buttonProperties",void 0),(0,Q.Cg)([(0,X.MnK)(Sp),(0,Q.Sn)("design:type",Sp)],xp.prototype,"_qrCode",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],xp.prototype,"_localizer",void 0),xp=(0,Q.Cg)([(0,X.EVk)("DynamicPromptContentConfiguration",et.Y.uiDynamicPrompts)],xp);let Lp=class extends X.uAl{constructor(){super(...arguments),this._respectSchoolMode=!1,this._onCtaButtonClicked=new X.HN0,this._onDynamicPromptLoaded=new X.HN0,this._onDynamicPromptClosed=new X.HN0}showPrompt(){this._respectSchoolMode&&this._currentPlayer.player.isPlayingAtSchool()?dt.q.instance.prodigy.open.membershipSchoolAd((()=>{this._onDynamicPromptClosed.dispatch()})):(this._dynamicPrompt=dt.q.instance.prodigy.open.dynamicPrompt(this.configAsset,this.injectedValues,{originType:this._interfaceOriginType}),this._dynamicPrompt.prefab?this.configureCtaButton():this._dynamicPrompt.onPrefabLoaded.addOnce(this.configureCtaButton.bind(this)))}configureCtaButton(){const q=this._dynamicPrompt.prefab.findComponentInChildren(xp,!0);null==q||q.ctaButton.onClick.add((()=>{this._onCtaButtonClicked.dispatch()}),this),this._onDynamicPromptLoaded.dispatch(),this._dynamicPrompt.prefab.onDestroy.addOnce((()=>{this._onDynamicPromptClosed.dispatch()}),this)}close(){var q;null===(q=this._dynamicPrompt)||void 0===q||q.close(),this._dynamicPrompt=null}destroy(){this.close(),this._onCtaButtonClicked.dispose(),this._onDynamicPromptLoaded.dispose(),this._onDynamicPromptClosed.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Lp.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Lp.prototype,"_respectSchoolMode",void 0),(0,Q.Cg)([(0,X.tW2)(),(0,Q.Sn)("design:type",String)],Lp.prototype,"configAsset",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],Lp.prototype,"injectedValues",void 0),(0,Q.Cg)([(0,X.gfw)(wi.$N),(0,Q.Sn)("design:type",String)],Lp.prototype,"_interfaceOriginType",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Lp.prototype,"_onCtaButtonClicked",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Lp.prototype,"_onDynamicPromptLoaded",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Lp.prototype,"_onDynamicPromptClosed",void 0),Lp=(0,Q.Cg)([(0,X.EVk)("OpenDynamicPrompt",et.Y.membership)],Lp);const kp=(0,Se.gb)({key:"remove-parent-screen-from-conversion-flow",activateAssociatedExperiments:1,default:{enabled:!1}});let Bp=class extends X.uAl{constructor(){super(...arguments),this._conversionFunnelMetadata="",this._conversionFunnelName="",this._conversionFunnelStage="",this._conversionStaticOrVideo=Ys.R.Static,this._memberPanelAdFlavourText="",this._memberPanelAdFrameName="",this._memberPanelAdTrackingEvent="",this._originId="",this._upgrade=!1,this.onClose=new X.HN0}open(){if((0,Kt.G)(kp).enabled){const q=this.gameObject.findComponentInChildren(zb.M,!0);if(q)return void q.initiateMembershipPurchase();X.VyI.log("No ProcessWebPurchaseComponent found on this prefab. Cannot initiate purchase.",X.$bb.Error)}dt.q.instance.prodigy.open.membershipParent({flavourText:this._memberPanelAdFlavourText,frameName:this._memberPanelAdFrameName,trackingEvent:this._memberPanelAdTrackingEvent},{conversionFunnelMetadata:this._conversionFunnelMetadata,conversionFunnelName:this._conversionFunnelName,conversionStage:this._conversionFunnelStage,conversionStaticOrVideo:this._conversionStaticOrVideo},this._upgrade,this._originId).onClose=()=>{this.onClose.dispatch()}}destroy(){this.onClose.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Bp.prototype,"_conversionFunnelMetadata",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Bp.prototype,"_conversionFunnelName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Bp.prototype,"_conversionFunnelStage",void 0),(0,Q.Cg)([(0,X.gfw)(Ys.R),(0,Q.Sn)("design:type",String)],Bp.prototype,"_conversionStaticOrVideo",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Bp.prototype,"_memberPanelAdFlavourText",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Bp.prototype,"_memberPanelAdFrameName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Bp.prototype,"_memberPanelAdTrackingEvent",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Bp.prototype,"_originId",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Bp.prototype,"_upgrade",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bp.prototype,"onClose",void 0),Bp=(0,Q.Cg)([(0,X.EVk)("OpenMembershipParent",et.Y.membership)],Bp);var Up=z(11117);let Fp=class extends X.JTX{constructor(){super(...arguments),this.onClose=new X.HN0,this.onIsMember=new X.HN0,this.onIsNotMember=new X.HN0}run(){var q;if(this._playerProvider.player.hasMembership())this.onIsMember.dispatch();else{this.onIsNotMember.dispatch();const K={conversionFunnelName:this.analyticConversionFunnelName,conversionFunnelMetadata:dt.q.instance.prodigy.world.getCurrentMap()},z=dt.q.instance.prodigy.open.membershipInfo((()=>{this.onClose.dispatch()}),K,this.panelAdName?Up.R[this.panelAdName]:void 0);z&&X.wa5.getActiveScene().getLayer(null!==(q=this._adMenuLayer)&&void 0!==q?q:this.GameObject.layer).addDisplayObject(z)}}destroy(){this.onClose.dispose(),this.onIsMember.dispose(),this.onIsNotMember.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.fFd)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],Fp.prototype,"_playerProvider",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Fp.prototype,"onClose",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Fp.prototype,"onIsMember",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Fp.prototype,"onIsNotMember",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",Object)],Fp.prototype,"panelAdName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fp.prototype,"analyticConversionFunnelName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fp.prototype,"analyticConversionFunnelStage",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fp.prototype,"_adMenuLayer",void 0),Fp=(0,Q.Cg)([(0,X.EVk)("ShowAd",et.Y.membership)],Fp);z(56520);let Gp=class extends X.uAl{constructor(){super(...arguments),this._attachmentPivot=new X.I9Y(.5,.5)}create(){super.create(),this.attachToSlot().catch(X.RQr.createHandler("Error attaching render component to spine slot"))}attachToSlot(){return(0,Q.sH)(this,void 0,void 0,(function*(){let q=this._attachedRenderComponent.getRootContainer();q||(yield this._attachedRenderComponent.onRootContainerSet.asPromise(),q=this._attachedRenderComponent.getRootContainer());const K=this._spineComponent.getSlot(this._slotName);(null==K?void 0:K.attachment)||X.VyI.log(`SpineAttachComponent: Slot ${this._slotName} has no attachment and will be hidden by the Spine runtime.`,X.$bb.Warning);const z=this._spineComponent.getSpine().getSlotContainer(K);if(!z)throw new Error(`SpineAttachComponent: Slot ${this._slotName} not found on spine.`);z.removeChildren();const Y=z.addChild(new Ze.Container);Y.scale.y=-1,Y.addChild(q),Y.position.set(this._attachmentPivot.x*-q.width,this._attachmentPivot.y*q.height),this._attachedRenderComponent.GameObject.onHierarchyChanged.removeAll(this._attachedRenderComponent)}))}};(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],Gp.prototype,"_spineComponent",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Gp.prototype,"_slotName",void 0),(0,Q.Cg)([(0,X.MnK)(X.y4o),(0,Q.Sn)("design:type",X.y4o)],Gp.prototype,"_attachedRenderComponent",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],Gp.prototype,"_attachmentPivot",void 0),Gp=(0,Q.Cg)([(0,X.EVk)("SpineAttach",et.Y.animation)],Gp);let jp=class extends X.uAl{constructor(){super(...arguments),this._disableAfterStepComplete=!1,this.onComplete=new X.HN0,this._onNext=new X.HN0}destroy(){this.onComplete.dispose(),this._onNext.dispose(),super.destroy()}begin(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=this._root.Container;K.bind(this._nextCallbackInjectionId).toConstantValue((()=>this._onNext.dispatch()));try{const z=null!=q?q:this._root.GameObject.children;for(const q of z){const K=this._descendantTriggerName?q.findChildByName(this._descendantTriggerName):q;if(!X.Aq$.isDefined(K))continue;const z=this._onNext.asPromise();K.active=!0;try{yield z}catch(Xv){return}this._disableAfterStepComplete&&(K.active=!1)}}finally{this._onNext.dispose(),K.unbind(this._nextCallbackInjectionId)}this.onComplete.dispatch()}))}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],jp.prototype,"_descendantTriggerName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],jp.prototype,"_nextCallbackInjectionId",void 0),(0,Q.Cg)([(0,X.MnK)(X.bE_),(0,Q.Sn)("design:type",X.bE_)],jp.prototype,"_root",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],jp.prototype,"_disableAfterStepComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],jp.prototype,"onComplete",void 0),jp=(0,Q.Cg)([(0,X.EVk)("StaggerSequence",et.Y.animation)],jp);let $p=class extends X.y4o{create(){super.create(),this._timerRoot=dt.q.instance.game.add.group(dt.q.instance.game.stage),this.setRootContainer(this._timerRoot),this.playerMorphed=this.playerMorphed.bind(this),this.cancelledMorph=this.cancelledMorph.bind(this);const q=dt.q.instance.game.broadcaster;q.addAppListener(Xn.J8.MorphMarbleUsed,this.playerMorphed,this),q.addAppListener(Xn.J8.MorphMarbleTimerUpdated,this.update.bind(this),this),this.initTimer()}destroy(){var q;const K=dt.q.instance.game.broadcaster;K.removeAppListener(Xn.J8.MorphMarbleUsed,this),K.removeAppListener(Xn.J8.MorphMarbleTimerUpdated,this),this._morphTimer&&(this._morphTimer.destroy(),this._morphTimer=null),null===(q=this._timerRoot)||void 0===q||q.destroy(),super.destroy()}update(){super.update();const q=this._loggedInPlayer.player;if(this._morphTimer&&q)if(q.isPlayerTransformed()){const K=q.getPlayerData().playerTransformation;this._morphTimer.updateTimerValue(K.maxTime-K.timeRemaining)}else this._morphTimer.endTimer()}cancelledMorph(){this._loggedInPlayer.player.transformPlayer(ta.V.Player),dt.q.instance.game.broadcaster.broadcast(Xn.J8.MorphMarbleCancelled)}initTimer(){const q=this._loggedInPlayer.player;if(q.isPlayerTransformed()){const K=q.getPlayerData().playerTransformation;this.createTimer(K.maxTime,K.maxTime-K.timeRemaining)}}playerMorphed(q){this._morphTimer&&this._morphTimer.destroy(),this.GameObject.active=!0,this.createTimer(q.effect.time,0)}createTimer(q,K){this._morphTimer&&this._morphTimer.destroy();const z=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this._morphTimer=dt.q.instance.prodigy.create.timerControl(this._timerRoot,55,50,{maxTime:q,timeDelta:15e3,clickMessage:z.getText("MORPH_END_MESSAGE"),storedTime:K},this.cancelledMorph),this._morphTimer.onDestroy.addOnce((()=>{this._morphTimer=null}))}getDimensions(){return this.GameObject.transform instanceof X.XVE?this.GameObject.transform.rectTransformDimensions:new X.or0(this.getRootContainer().width,this.getRootContainer().height)}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],$p.prototype,"_loggedInPlayer",void 0),$p=(0,Q.Cg)([(0,X.EVk)("MorphTimerButton",et.Y.ui)],$p);let Hp=class extends X.uAl{constructor(){super(...arguments),this.targetTransforms=[],this.moveSpeed=220,this.loop=!1,this._currentTargetIndex=0,this._isMoving=!1,this.onMovementComplete=new X.HN0}destroy(){this.onMovementComplete.dispose(),super.destroy()}update(){if(!this._isMoving||!this.creatureTransform||this.targetTransforms.length<=0)return;const q=this.targetTransforms[this._currentTargetIndex];if(!q)return void this.finishMovement();const K=this.moveSpeed*dt.q.instance.game.time.deltaMS/1e3,z=q.worldPosition.x-this.creatureTransform.worldPosition.x,Y=q.worldPosition.y-this.creatureTransform.worldPosition.y,Q=Math.sqrt(z*z+Y*Y);if(Q<=K){if(this.creatureTransform.worldPosition=q.worldPosition,++this._currentTargetIndex,this._currentTargetIndex>=this.targetTransforms.length)return this.loop?void(this._currentTargetIndex=0):void this.finishMovement()}else{const q=z/Q,X=Y/Q;this.creatureTransform.worldPosition={x:this.creatureTransform.worldPosition.x+q*K,y:this.creatureTransform.worldPosition.y+X*K},this.updateFacingDirection(q)}}run(){!this.creatureTransform||this.targetTransforms.length<=0?this.onMovementComplete.dispatch():(this._isMoving=!0,this._currentTargetIndex=0,this.creatureAnimator&&this.playWalkAnimation())}updateFacingDirection(q){var K;const z=null!==(K=this.faceDirectionTransform)&&void 0!==K?K:this.creatureTransform;0!==q&&z&&(z.worldScale={x:Math.abs(z.worldScale.x)*(q<0?-1:1),y:z.worldScale.y})}playWalkAnimation(){var q;null===(q=this.creatureAnimator)||void 0===q||q.playAnimation("walk",!0)}playIdleAnimation(){var q;null===(q=this.creatureAnimator)||void 0===q||q.playAnimation("idle",!0)}finishMovement(){this._isMoving=!1,this.playIdleAnimation(),this.onMovementComplete.dispatch()}stop(){this._isMoving&&(this._isMoving=!1,this.playIdleAnimation())}};(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Hp.prototype,"creatureTransform",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Hp.prototype,"faceDirectionTransform",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],Hp.prototype,"creatureAnimator",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",Array)],Hp.prototype,"targetTransforms",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Hp.prototype,"moveSpeed",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Hp.prototype,"loop",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Hp.prototype,"onMovementComplete",void 0),Hp=(0,Q.Cg)([(0,X.EVk)("CreatureMovement",et.Y.motion),(0,X.S1F)()],Hp);class Vp extends $n{constructor(q,K,z,Y){super(),this._floatHeight=0,this._floatRange=0,this._floatDurationMS=0,this._targetTransform=null,this._floatTween=null,this._initialTransformY=0,this._targetTransform=q,this._floatHeight=K,this._floatRange=z,this._floatDurationMS=Y}destroy(){this.exit(),this._targetTransform=null,super.destroy()}enter(){const q=this._floatHeight+this._floatRange,K={y:this._floatHeight-this._floatRange},z=.5*this._floatDurationMS;this._floatTween=dt.q.instance.game.add.tween(K,this).to({y:q},z,X.GS3.Quadratic.InOut,!0,0,-1,!0).onUpdateCallback((()=>{this._targetTransform.setPosition(this._targetTransform.localPosition.x,this._initialTransformY-K.y)}))}exit(){var q;dt.q.instance.game.tweens.remove(this._floatTween),this._floatTween=null,null===(q=this._targetTransform)||void 0===q||q.setPosition(this._targetTransform.localPosition.x,this._initialTransformY)}}let Wp=class extends X.uAl{constructor(){super(...arguments),this._floatHeight=0,this._floatRange=0,this._floatPeriodMS=0}set targetTransform(q){this._targetTransform=q}create(){super.create(),this.setAnimationStates()}setAnimationStates(){const q=new Vp(this._targetTransform,this._floatHeight,this._floatRange,this._floatPeriodMS);this._animationController.setAnimationState(0,q),this._animationController.setAnimationState(1,q),this._animationController.setAnimationState(2,q),this._animationController.setAnimationState(4,q)}destroy(){this._animationController=null,this._targetTransform=null,super.destroy()}};(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Wp.prototype,"_animationController",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Wp.prototype,"_targetTransform",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Wp.prototype,"_floatHeight",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Wp.prototype,"_floatRange",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Wp.prototype,"_floatPeriodMS",void 0),Wp=(0,Q.Cg)([(0,X.EVk)("FloatAnimationStates",et.Y.animation)],Wp);class qp extends $n{constructor(q,K,z){super(),this._hopHeight=0,this._hopDurationMS=0,this._targetTransform=null,this._hopTween=null,this._initialTransformY=0,this._targetTransform=q,this._hopHeight=K,this._hopDurationMS=z}destroy(){this._targetTransform=null,dt.q.instance.game.tweens.remove(this._hopTween),this._hopTween=null,super.destroy()}enter(){const q={y:0},K=.5*this._hopDurationMS;this._initialTransformY=this._targetTransform.localPosition.y,this._hopTween=dt.q.instance.game.add.tween(q,this).to({y:this._hopHeight},K,X.GS3.Quadratic.Out).to({y:0},K,X.GS3.Quadratic.In).onUpdateCallback((()=>{this._targetTransform.setPosition(this._targetTransform.localPosition.x,this._initialTransformY-q.y)})).loop(!0).start()}exit(){dt.q.instance.game.tweens.remove(this._hopTween),this._hopTween=null,this._targetTransform.setPosition(this._targetTransform.localPosition.x,this._initialTransformY)}}let Kp=class extends X.uAl{constructor(){super(...arguments),this._hopHeight=0,this._hopDurationMS=0}create(){super.create(),this._animationController.setAnimationState(1,new qp(this._targetTransform,this._hopHeight,this._hopDurationMS))}destroy(){this._animationController=null,this._targetTransform=null,super.destroy()}};(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Kp.prototype,"_animationController",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Kp.prototype,"_targetTransform",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Kp.prototype,"_hopHeight",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Kp.prototype,"_hopDurationMS",void 0),Kp=(0,Q.Cg)([(0,X.EVk)("HopWalkAnimationStates",et.Y.animation)],Kp);z(85697);let zp=class extends X.uAl{constructor(){super(...arguments),this.onGotViewedProgressMenu=new X.HN0}postCreate(){super.postCreate(),this.updateFestivalHudNotification()}updateFestivalHudNotification(){if(this.onHUDMenuBar){const q=!dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.viewedProgressMenu;this.onGotViewedProgressMenu.dispatch(q)}}destroy(){this.onGotViewedProgressMenu.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],zp.prototype,"onGotViewedProgressMenu",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],zp.prototype,"onHUDMenuBar",void 0),zp=(0,Q.Cg)([(0,X.EVk)("FestivalProgress",et.Y.festival)],zp);var Yp=z(57797),Qp=z(53037),Xp=z(71586);let Zp=class extends X.uAl{setup(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){this._progressTask=q,this._claimTask=K,this._destroyMenuCallback=z,this.setupTierComponent(Y)}))}setDefaults(){this._progressBar.GameObject.active=!0,this._progressBarIcon.active=!0,this._tierQuestDescription.GameObject.active=!0,this._tierLockedState.active=!1,this._tierClaimedState.active=!1,this._tierClaimableState.active=!1}setupTierComponent(q){var K,z,Y,Q,Z;if(this.setDefaults(),q)return this._progressBar.GameObject.active=!1,this._tierQuestDescription.GameObject.active=!1,void(this._tierLockedState.active=!0);let J=null!==(z=null===(K=this._progressTask.taskProgress.data)||void 0===K?void 0:K.progress)&&void 0!==z?z:0;const tt=null!==(Y=this._progressTask.taskDefinition.completionRequirements.data.target)&&void 0!==Y?Y:0;let et="Complete!";this._progressTask.taskProgress.status===Ar.t.COMPLETE&&(J=tt,this._progressBarIcon.active=!1),this._progressBar.setFromValues(J,tt,!1);if(this._claimTask&&this._progressTask.taskProgress.status===Ar.t.COMPLETE&&(this._claimTask.taskProgress.status===Ar.t.COMPLETE||(null!==(Z=null===(Q=this._claimTask.taskProgress.data)||void 0===Q?void 0:Q.timesCompleted)&&void 0!==Z?Z:0)>0))this._tierClaimedState.active=!0,et="Collected!",this._replayButton.useHandCursor=!0,this._replayButton.onClick.add((()=>{this._festivalQuestManager.sendRewardClaimedEvent(this._claimTask.taskID).catch(X.RQr.createHandler("Failed to send reward claimed event.")),this._replayButton.useHandCursor=!1,this._replayButton.onClick.removeAll(),this._destroyMenuCallback()}));else if(this._claimTask&&this._progressTask.taskProgress.status===Ar.t.COMPLETE){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this._tierClaimableState.active=!0,this._progressBar.GameObject.active=!1,q.daily.viewedProgressMenu=!1,this._claimButton.useHandCursor=!0,this._claimButton.onClick.add((()=>{this._festivalQuestManager.sendRewardClaimedEvent(this._claimTask.taskID).catch(X.RQr.createHandler("Failed to send reward claimed event.")),q.daily.viewedProgressMenu=!0,this._claimButton.useHandCursor=!1,this._claimButton.onClick.removeAll(),et="Collected!",this._tierClaimedState.active=!1,this._progressBar.GameObject.active=!0,this._destroyMenuCallback()}))}this._progressBar.onFilled.add((()=>{this._progressBar.setBarText(et)}))}};(0,Q.Cg)([(0,X.Cdj)("f03-2b73"),(0,Q.Sn)("design:type",Qp.q)],Zp.prototype,"_festivalQuestManager",void 0),(0,Q.Cg)([(0,X.MnK)(Ds.z),(0,Q.Sn)("design:type",Ds.z)],Zp.prototype,"_progressBar",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Zp.prototype,"_tierQuestDescription",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],Zp.prototype,"_claimButton",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],Zp.prototype,"_replayButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zp.prototype,"_tierClaimedState",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zp.prototype,"_tierClaimableState",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zp.prototype,"_tierLockedState",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zp.prototype,"_progressBarIcon",void 0),Zp=(0,Q.Cg)([(0,X.EVk)("FestivalCoopTier",et.Y.festival)],Zp);let Jp=class extends pd.b{constructor(){super(...arguments),this._color="#FFFFFF",this._previousColor=1}get color(){return this._color}set color(q){this._color="number"==typeof q?X.Q1f.numberToHexString(q).slice(0,7):q,this.reset()}initialize(){if(super.initialize(),"tint"in this._rootContainer)return;const q=new bd.N,K=X.Q1f.hexToRGB(this._color),z=K>>16&255,Y=K>>8&255,Q=255&K;q.matrix[0]=z/255,q.matrix[6]=Y/255,q.matrix[12]=Q/255,this._filterList.push(q)}applyFilter(){"tint"in this._rootContainer?(this._previousColor=this._rootContainer.tint,this._rootContainer.tint=X.TZp.hexToDecimal(this._color,"#"),gf.s.resetCacheAsBitmap(this._rootContainer)):super.applyFilter()}removeFilter(){"tint"in this._rootContainer?(this._rootContainer.tint=this._previousColor,gf.s.resetCacheAsBitmap(this._rootContainer)):super.removeFilter()}};(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Jp.prototype,"_color",void 0),Jp=(0,Q.Cg)([(0,X.EVk)("ColorTintFilter",et.Y.effect)],Jp);class tv extends X.$KW{generate(q,K){const z=this.buildButtonNodeGroup(q),Y=this.buildFestivalTiersNodeGroup(q),Q=this.buildFestivalTabGroup(q),Z=this.buildSignalGroup(q);return X.XRp.createVertical([z,Y,Q,Z])}buildSignalGroup(q){const K=X.NyS.create({id:"onChangeTab",label:"On Change Tab",signalValue:q.onChangeTab,componentGUID:this._componentGuid}),z=X.NyS.create({id:"onChangeTabComplete",label:"On Change Tab Complete",signalValue:q.onChangeTabComplete,componentGUID:this._componentGuid});return X.XRp.createVertical([K,z],{isContainer:!0,title:"Signals",isCollapsible:!0,startCollapsed:!1})}buildFestivalTabGroup(q){const K=X.Gme.gameObjectPickerGroup({id:"storyTabNotification",labelValue:"Story Notification",gameObjectGuid:q.storyTabNotification}),z=X.Gme.gameObjectPickerGroup({id:"seasonTabNotification",labelValue:"Season Notification",gameObjectGuid:q.seasonTabNotification}),Y=X.Gme.gameObjectPickerGroup({id:"riftsTabNotification",labelValue:"Rifts Notification",gameObjectGuid:q.riftsTabNotification}),Q=X.Gme.gameObjectPickerGroup({id:"memberTabNotification",labelValue:"Member Notification",gameObjectGuid:q.memberTabNotification}),Z=X.Gme.gameObjectPickerGroup({id:"coopTabNotification",labelValue:"Coop Notification",gameObjectGuid:q.coopTabNotification}),J=X.Gme.componentPickerGroup({id:"toggleGroup",labelValue:"Toggle Group",componentType:sn.O,componentGuid:q.toggleGroup});return X.XRp.createVertical([K,z,Y,Q,Z,J],{isContainer:!0,title:"Festival Tabs",isCollapsible:!0,startCollapsed:!0})}buildFestivalTiersNodeGroup(q){const K=X.Gme.gameObjectPickerGroup({id:"tierCardContainer",labelValue:"Tier Card Container",gameObjectGuid:q.tierCardContainer}),z=X.Gme.componentPickerGroup({id:"scrollViewRef",labelValue:"Scroll View Ref",componentType:$t.C,componentGuid:q.scrollViewRef}),Y=X.Gme.componentPickerGroup({id:"gridLayoutRef",labelValue:"Grid Layout Ref",componentType:X.Sz7,componentGuid:q.gridLayoutRef}),Q=X.Gme.componentPickerGroup({id:"taskCompleteCounter",labelValue:"Task Complete Counter",componentType:X.EYj,componentGuid:q.taskCompleteCounter}),Z=X.Gme.gameObjectPickerGroup({id:"loadingObject",labelValue:"Loading Object",gameObjectGuid:q.loadingObject});return X.XRp.createVertical([K,z,Y,Q,Z],{isContainer:!0,title:"Festival Progress Tiers",isCollapsible:!0,startCollapsed:!0})}buildButtonNodeGroup(q){const K=X.Gme.componentPickerGroup({id:"shopButton",labelValue:"Shop Button",componentType:Y.$,componentGuid:q.shopButton}),z=X.Gme.componentPickerGroup({id:"ctaButton",labelValue:"CTA Button",componentType:Y.$,componentGuid:q.ctaButton});return X.XRp.createVertical([K,z],{isContainer:!0,title:"Buttons",isCollapsible:!0,startCollapsed:!0})}buildTierNodeGroup(q,K){const z=X.Gme.componentPickerGroup({id:`tier${K}Lock`,labelValue:"Lock SpineAnimator",componentType:Bs.j,componentGuid:q[`tier${K}Lock`]}),Y=X.Gme.componentPickerGroup({id:`tier${K}RewardImage`,labelValue:"Reward Image",componentType:X.vYh,componentGuid:q[`tier${K}RewardImage`]}),Q=X.Gme.componentPickerGroup({id:`tier${K}RewardText`,labelValue:"Reward Text",componentType:X.EYj,componentGuid:q[`tier${K}RewardText`]}),Z=X.Gme.componentPickerGroup({id:`tier${K}RewardQuantityText`,labelValue:"Reward Quantity Text",componentType:X.EYj,componentGuid:q[`tier${K}RewardQuantityText`]}),J=X.Gme.gameObjectPickerGroup({id:`tier${K}RewardQuantityContainer`,labelValue:"Reward Quantity Container",gameObjectGuid:q[`tier${K}RewardQuantityContainer`]}),tt=X.XRp.createVertical([Y,Q,Z,J],{isContainer:!0}),et=X.Gme.componentPickerGroup({id:`tier${K}FestivalCurrencyText`,labelValue:"Festival Currency Text",componentType:X.EYj,componentGuid:q[`tier${K}FestivalCurrencyText`]}),it=X.Gme.componentPickerGroup({id:`tier${K}AtSchoolFestivalCurrencyText`,labelValue:"At School Festival Currency Text",componentType:X.EYj,componentGuid:q[`tier${K}AtSchoolFestivalCurrencyText`]}),st=X.Gme.componentPickerGroup({id:`tier${K}FestivalCurrencyIcon`,labelValue:"Festival Currency Graphic",componentType:X.vYh,componentGuid:q[`tier${K}FestivalCurrencyIcon`]}),nt=X.Gme.componentPickerGroup({id:`tier${K}FestivalCurrencyQuantityText`,labelValue:"Festival Currency Quantity Text",componentType:X.EYj,componentGuid:q[`tier${K}FestivalCurrencyQuantityText`]}),at=X.XRp.createVertical([et,it,st,nt],{isContainer:!0}),rt=X.Gme.componentPickerGroup({id:`bar${K}Bg`,labelValue:"Bg ColorTintFilter",componentType:Jp,componentGuid:q[`bar${K}Bg`]}),ot=X.Gme.componentPickerGroup({id:`bar${K}Fill`,labelValue:"Fill ColorTintFilter",componentType:Jp,componentGuid:q[`bar${K}Fill`]}),ht=X.Gme.componentPickerGroup({id:`bar${K}ProgressBarOuter`,labelValue:"ProgressBarOuter ColorTintFilter",componentType:Jp,componentGuid:q[`bar${K}ProgressBarOuter`]}),ct=X.Gme.componentPickerGroup({id:`bar${K}ProgressText`,labelValue:"ProgressText Text",componentType:X.EYj,componentGuid:q[`bar${K}ProgressText`]}),dt=X.XRp.createVertical([rt,ot,ht,ct],{isContainer:!0});return X.XRp.createVertical([z,tt,at,dt],{isContainer:!0,title:`Tier ${K}`,isCollapsible:!0,startCollapsed:!0})}}let ev=class extends pd.b{constructor(){super(...arguments),this._strength=.5}initialize(){super.initialize();const q=new bd.N;q.brightness(this._strength,!1),this._filterList.push(q)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ev.prototype,"_strength",void 0),ev=(0,Q.Cg)([(0,X.EVk)("BrightnessFilter",et.Y.effect)],ev);let iv=class extends X.uAl{setup(q,K,z,Y,X,Z){return(0,Q.sH)(this,void 0,void 0,(function*(){this._progressTask=q,this._claimTask=K,this._destroyMenuCallback=z,this._loadingObject=X,this.setupTierComponent(Y,Z)}))}setDefaults(){this._progressBar.GameObject.active=!0,this._timeBanner.active=!0,this._tierRewardDescription.GameObject.active=!0,this._lockedByQuest.active=!1,this._lockedByTime.active=!1,this._lockedOverlay.active=!1,this._lockBanner.active=!1,this._rewardClaimable.active=!1,this._rewardClaimableHand.active=!1,this._memberRewardGameObject.active=!1,this._memberTaskGameObject.active=!1,this._morphMarbleIcon.active=!1,this._tierRewardQuantityContainer.active=!1,this._tierCollectedLabel.active=!1,this._brightnessFilter.removeFilter(),this._brightnessFilter.GameObject.active=!1,this._rewardItemButton.onClick.removeAll(),this._itemCardButton.onClick.removeAll(),this.storyArrow.active=!1}setupTierComponent(q,K){var z,Y,Q,Z,J,tt,et,it;this.setDefaults(),(null===(z=this._progressTask.taskDefinition.metadata)||void 0===z?void 0:z.questGoalType)===Yp.xK.Story&&(this.storyArrow.active=!0);const st=null===(Z=null===(Q=null===(Y=this._claimTask)||void 0===Y?void 0:Y.taskDefinition.onComplete)||void 0===Q?void 0:Q.find((q=>"GotItem"===q.type)))||void 0===Z?void 0:Z.data.itemDrops[0],nt=st?ae.t.getItem(st.type,st.ID):null;if(nt){this._brightnessFilter.GameObject.active=!0;const q=gs.X.createImageLoadData(nt);this._tierRewardImage.setAsset(q.source,q.frame).catch(X.RQr.createHandler("Unable to set image from asset data."));const K=nt.data;this._tierBackgroundImage.setAsset(ti._.Ui_battle_pass_json,Object.values(Ps)[null!==(J=K.rarity)&&void 0!==J?J:0]).catch(X.RQr.createHandler("Unable to set rarity background from asset data.")),this._tierRewardQuantityContainer.active=!1,X.Aq$.isDefined(st.N)&&st.N>1&&(this._tierRewardQuantityText.text=`x${st.N}`,this._tierRewardQuantityContainer.active=!0),"item"===st.type&&st.ID&&Rr.x.isMorphMarbleAsset(st.ID)&&(this._morphMarbleIcon.active=!0),K.member&&(this._memberRewardGameObject.active=!0),this._itemCardButton.onClick.add((()=>{dt.q.instance.prodigy.open.itemInfo(nt)}))}this._progressTask.taskDefinition.metadata.isMemberLocked&&(this._memberTaskGameObject.active=!0);let at=null!==(et=null===(tt=this._progressTask.taskProgress.data)||void 0===tt?void 0:tt.progress)&&void 0!==et?et:0;const rt=this._progressTask.taskDefinition.completionRequirements.data.target;let ot="Complete!";if(this._progressTask.taskProgress.status===Ar.t.COMPLETE&&(at=rt),this._progressBar.setFromValues(at,rt,!1),this._storybookIcon.active=(null===(it=this._progressTask.taskDefinition.metadata)||void 0===it?void 0:it.questGoalType)===Yp.xK.Story,this._claimTask&&this._progressTask.taskProgress.status===Ar.t.COMPLETE&&this._claimTask.taskProgress.status===Ar.t.COMPLETE)ot="Collected!",this._tierCollectedLabel.active=!0,this._timeBanner.active=!1,this._brightnessFilter.applyFilter();else if(this._claimTask&&this._progressTask.taskProgress.status===Ar.t.COMPLETE){ot="Complete!";const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(this._rewardClaimable.active=!0,this._progressBar.GameObject.active=!1,q.hasMembership()||!this._progressTask.taskDefinition.metadata.isMemberLocked)q.daily.viewedProgressMenu=!1,this.toggleRewardClaimableHand(K),this._rewardItemButton.useHandCursor=!0,this._rewardItemButton.onClick.add((()=>{ot="Collected!",this.claimClick(q)}));else{const q={conversionFunnelName:un.o.FunnelFestivalMemberQuest};this._rewardItemButton.onClick.add((()=>{dt.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:`${this._progressTask.questID}-${this._progressTask.taskID}-ClaimButton`,category:"festival",contentId:this._progressTask.questID,adType:Ys.R.BattlePassUpsell}),dt.q.instance.prodigy.open.membershipInfo(void 0,q,"member-button")}))}}else if(this._progressTask.getTimeUntilUnlock()>se.A.DAY_IN_MS)this._memberRewardGameObject.active=!1,this._tierRewardDescription.GameObject.active=!1,this._lockedByQuest.active=!1,this._lockedByTime.active=!0,this._progressBar.GameObject.active=!1,this._timeBanner.active=!1,this._lockBanner.active=!1,this._lockedOverlay.active=!0,this._brightnessFilter.applyFilter();else{const K=this._progressTask.getTimeUntilUnlock();this._lockedByTime.active=K>0,this._lockedByQuest.active=q&&!this._lockedByTime.active,this._tierRewardDescription.GameObject.active=!this._lockedByTime.active&&!this._lockedByQuest.active,this._lockedOverlay.active=this._lockedByTime.active||this._lockedByQuest.active,this._lockBanner.active=this._lockedByTime.active||this._lockedByQuest.active,this._progressBar.GameObject.active=!this._lockedOverlay.active,this._timeBanner.active=!this._lockedOverlay.active,this._lockedOverlay.active&&(this._memberRewardGameObject.active=!1,this._brightnessFilter.applyFilter())}this._progressBar.onFilled.add((()=>{this._progressBar.setBarText(ot)}))}claimClick(q){var K,z,Y,Q,Z,J;this._festivalQuestManager.sendRewardClaimedEvent(this._claimTask.taskID).catch(X.RQr.createHandler("Failed to send reward claimed event.")),q.daily.viewedProgressMenu=!0,this._rewardItemButton.useHandCursor=!1,this._rewardItemButton.onClick.removeAll(),this._tierCollectedLabel.active=!0,this._rewardClaimable.active=!1,this.toggleRewardClaimableHand(!1,!0),this._progressBar.GameObject.active=!0;!1===(null===(Y=null===(z=null===(K=this._claimTask)||void 0===K?void 0:K.taskDefinition.onComplete)||void 0===z?void 0:z.find((q=>q.type===Dl.s.GOT_ITEM)))||void 0===Y?void 0:Y.data.showGotItem)?(null===(Q=this._claimedAnimationAnimator)||void 0===Q||Q.playAnimation("generic",!1),this._claimedMovementBoneFollow.setup(),null===(Z=this._claimedMovementAnimator)||void 0===Z||Z.playAnimation("claim",!1)):this._destroyMenuCallback(),null===(J=this._claimAudioComponent)||void 0===J||J.play()}toggleRewardClaimableHand(q,K=!1){K&&this._rewardClaimableHand.active&&this._rewardClaimableHandNext&&this._rewardClaimableHandNext.toggleRewardClaimableHand(!0),this._rewardClaimableHand.active=q}setNextHand(q){this._rewardClaimableHandNext=q}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"storyArrow",void 0),(0,Q.Cg)([(0,X.Cdj)("f03-2b73"),(0,Q.Sn)("design:type",Qp.q)],iv.prototype,"_festivalQuestManager",void 0),(0,Q.Cg)([(0,X.MnK)(Ds.z),(0,Q.Sn)("design:type",Ds.z)],iv.prototype,"_progressBar",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_tierCollectedLabel",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],iv.prototype,"_tierRewardDescription",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],iv.prototype,"_tierRewardImage",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],iv.prototype,"_tierBackgroundImage",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],iv.prototype,"_tierRewardQuantityText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_tierRewardQuantityContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_memberRewardGameObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_memberTaskGameObject",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],iv.prototype,"_rewardItemButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],iv.prototype,"_itemCardButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_rewardClaimable",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_rewardClaimableHand",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",iv)],iv.prototype,"_rewardClaimableHandNext",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_lockedByQuest",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_lockedByTime",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_lockedOverlay",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_timeBanner",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_lockBanner",void 0),(0,Q.Cg)([(0,X.MnK)(ev),(0,Q.Sn)("design:type",ev)],iv.prototype,"_brightnessFilter",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_morphMarbleIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iv.prototype,"_storybookIcon",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],iv.prototype,"_claimedAnimationAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],iv.prototype,"_claimedMovementAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(vn.l),(0,Q.Sn)("design:type",vn.l)],iv.prototype,"_claimedMovementBoneFollow",void 0),(0,Q.Cg)([(0,X.MnK)(mn.J),(0,Q.Sn)("design:type",mn.J)],iv.prototype,"_claimAudioComponent",void 0),iv=(0,Q.Cg)([(0,X.EVk)("FestivalProgressTier",et.Y.festival)],iv);let sv=class extends X.uAl{setup(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){this._progressTask=q,this._claimTask=K,this._destroyMenuCallback=z,this.setupTierComponent(Y)}))}setDefaults(){this._lockedByQuest.active=!1,this._lockedByTime.active=!1,this._lockedBanner.active=!1}setupTierComponent(q){this.setDefaults();const K=this._progressTask.getTimeUntilUnlock();this._lockedByTime.active=K>0,this._lockedByQuest.active=q&&!this._lockedByTime.active,this._storyDescription.active=!this._lockedByTime.active&&!this._lockedByQuest.active,this._lockedBanner.active=this._lockedByTime.active||this._lockedByQuest.active}};var nv;(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],sv.prototype,"storyArrow",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],sv.prototype,"_lockedByQuest",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],sv.prototype,"_lockedByTime",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],sv.prototype,"_lockedBanner",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],sv.prototype,"_storyDescription",void 0),sv=(0,Q.Cg)([(0,X.EVk)("FestivalProgressTierStory",et.Y.festival)],sv),function(q){q[q.Claimable=3]="Claimable",q[q.Available=2]="Available",q[q.Locked=1]="Locked",q[q.Claimed=0]="Claimed"}(nv||(nv={}));let av=class extends X.uAl{constructor(){super(...arguments),this.onChangeTab=new X.HN0,this.onChangeTabComplete=new X.HN0,this._progressTierPool=[],this._storyTierPool=[],this._coopTierPool=[],this._buildTiersVersion=0,this._storyTasks=[]}postCreate(){var q,K,z;super.postCreate();{this._localizer=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),this._festivalSchema=dt.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival();const Y=dt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig();if(!Y)return X.VyI.log("Unable to retrieve Festival Config asset for menu setup. Closing menu.",X.$bb.Error),void this.GameObject.destroyDeferred();this._festivalConfig=Y;const Q=null===(q=this._toggleGroup)||void 0===q?void 0:q.getToggles(),Z=null==Q?void 0:Q.find((q=>q.GameObject.active));Z&&(null===(K=this._toggleGroup)||void 0===K||K.setDefaultSelectionIndex(Q.indexOf(Z)),null===(z=this._toggleGroup)||void 0===z||z.setItemSelected(Z,!0),Z.onSelected.dispatch())}}isTaskLocked(q,K){var z,Y;if(q.getTimeUntilUnlock()>0)return!0;return[...q.getPrerequisites(),...null!==(Y=null===(z=q.taskDefinition.metadata)||void 0===z?void 0:z.visualPrerequisites)&&void 0!==Y?Y:[]].some((q=>K.some((K=>K.taskDefinition.id===q&&K.taskProgress.status!==Ar.t.COMPLETE))))}buildTiers(){return(0,Q.sH)(this,arguments,void 0,(function*(q=!0,K=this._buildTiersVersion){var z;const Y=this._festivalQuestManager.getProgressTasks();this._storyTasks=Y.reduce(((q,K)=>{var z,Y,Q;return(null===(Q=null===(Y=null===(z=K.taskDefinition)||void 0===z?void 0:z.metadata)||void 0===Y?void 0:Y.storyMetadata)||void 0===Q?void 0:Q.storyImageGuid)&&q.push(K),q}),[]),this._progressTierPool.forEach((q=>{q.active=!1})),this._storyTierPool.forEach((q=>{q.active=!1})),this._coopTierPool.forEach((q=>{q.active=!1}));let Q=0;const X=Y.map(((q,K)=>{var z,X,Z,J;let tt=-1;if(null===(X=null===(z=q.taskDefinition)||void 0===z?void 0:z.metadata)||void 0===X?void 0:X.isHiddenQuest)return{progressTask:void 0,claimTask:void 0,priority:tt};if((null===(J=null===(Z=q.taskDefinition)||void 0===Z?void 0:Z.metadata)||void 0===J?void 0:J.questGoalType)!==this._currentTab)return{progressTask:void 0,claimTask:void 0,priority:tt};const et=this._festivalQuestManager.getClaimTask(q.taskID);return tt=q.taskDefinition.metadata.sortPriority?q.taskDefinition.metadata.sortPriority:q.taskProgress.status===Ar.t.COMPLETE&&et&&et.taskProgress.status===Ar.t.COMPLETE?nv.Claimed:q.taskProgress.status===Ar.t.COMPLETE?nv.Claimable:this.isTaskLocked(q,Y)?nv.Locked:nv.Available,tt>Q&&(Q=tt),{progressTask:q,claimTask:et,priority:tt}}));let Z,J=!0;for(let tt=Q;tt>=0;tt-=1){const q=X.filter((q=>void 0!==q.progressTask&&q.priority===tt));for(let Q=0;QK.taskDefinition.id===vt[q]&&K.taskProgress.status!==Ar.t.COMPLETE));if(void 0!==K){const q=null!==(it=null===(et=null===(tt=K.taskDefinition.metadata)||void 0===tt?void 0:tt.questName)||void 0===et?void 0:et.toString())&&void 0!==it?it:K.taskID;gt=q.length>=Rr.x.LONG_QUEST_NAME_CHAR_LENGTH?this._localizer.getText(Rr.x.LONG_PREREQUISITE_TEXT_KEY,q):this._localizer.getText(Rr.x.SHORT_PREREQUISITE_TEXT_KEY,q),mt++}}mt>1&&(gt=this._localizer.getText(Rr.x.MULTIPLE_PREREQUISITES_TEXT_KEY));const yt=(null===(st=q.taskDefinition.metadata)||void 0===st?void 0:st.questGoalTaskType)===Yp.wD.STORY,_t=(null===(nt=q.taskDefinition.metadata)||void 0===nt?void 0:nt.questGoalTaskType)===Yp.wD.COOP,Et=void 0!==(null===(at=q.taskDefinition.metadata)||void 0===at?void 0:at.storyMetadata);let wt=Gt.l.FestivalProgressTier,Tt=this._progressTierPool;yt?(wt=Gt.l.FestivalProgressStoryTier,Tt=this._storyTierPool):_t&&(wt=Gt.l.FestivalCoopTier,Tt=this._coopTierPool);let St="";St=Et?q.taskProgress.status===Ar.t.COMPLETE?this._localizer.getText(Rr.x.STORY_COMPLETE_TEXT_KEY):null===(ot=null===(rt=q.taskDefinition.metadata)||void 0===rt?void 0:rt.storyMetadata)||void 0===ot?void 0:ot.storyDescription:Dn.n.getQuestDescription(q.taskDefinition.completionRequirements.type,q.taskDefinition.completionRequirements.data.target,q.taskDefinition.localizationKey);const At=this._storyTasks.filter((q=>q.taskProgress.status!==Ar.t.COMPLETE));At.length>0&&q===At[0]&&(gt=null!==(ht=this.overrideQuestUnlockString(vt,Y))&&void 0!==ht?ht:gt);let Ct="";Ct=bt>=0?this._localizer.getText(Rr.x.DAYS_LEFT_TEXT_KEY,Math.ceil(bt/se.s.DAY_IN_MS)):pt?this._localizer.getText("READY"):this._localizer.getText("");const Ot={QUEST_DESCRIPTION:St,TIMER_TEXT:bt>0?void 0:Ct,TIMER_TEXT_VALUE:bt>0?bt:void 0,QUEST_UNLOCKS_IN:this.getQuestUnlockText(ft),STORY_GRAPHIC:Et?null===(dt=null===(ct=q.taskDefinition.metadata)||void 0===ct?void 0:ct.storyMetadata)||void 0===dt?void 0:dt.storyImageGuid:""};let It=Tt.find((q=>!q.active));if(It)Ht.d.updateInjectedValues(It,Ot);else{if(It=yield Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,wt,Ot).catch(X.RQr.createHandler("Error creating a festival tier prefab")),this._buildTiersVersion!==J)return It.active=!1,Tt.push(It),null;Tt.push(It)}const Dt=It.findComponent(iv);return yt?null===(lt=It.findComponent(sv))||void 0===lt||lt.setup(q,K,(()=>this.GameObject.destroy()),(null==gt?void 0:gt.length)>0).catch(X.RQr.createHandler("Failed to setup story tier component.")):_t?null===(ut=It.findComponent(Zp))||void 0===ut||ut.setup(q,K,(()=>this.GameObject.destroy()),(null==gt?void 0:gt.length)>0).catch(X.RQr.createHandler("Failed to setup coop tier component.")):Dt&&Dt.setup(q,K,(()=>this.GameObject.destroy()),(null==gt?void 0:gt.length)>0,this._loadingObject,Z).catch(X.RQr.createHandler("Failed to setup tier component.")),It.active=!0,It.name=`Festival Progress Tier ${q.taskID}`,[It,Dt]}))}setTaskProgressForTab(q){var K,z,Y,Q;if(q===Yp.xK.Story){const Y=null===(K=this._festivalQuestManager)||void 0===K?void 0:K.getCompletedTaskCount(q,Yp.wD.STORY),Q=null===(z=this._festivalQuestManager)||void 0===z?void 0:z.getStoryTaskCount();this._taskCompleteCounter.text=this._localizer.getText(Rr.x.PROGRESS_STORY_KEY,Y,Q)}else{const K=null===(Y=this._festivalQuestManager)||void 0===Y?void 0:Y.getCompletedTaskCount(q),z=null===(Q=this._festivalQuestManager)||void 0===Q?void 0:Q.getProgressTaskCount(q);this._taskCompleteCounter.text=this._localizer.getText(Rr.x.PROGRESS_COMPLETE_KEY,K,z)}}destroy(){++this._buildTiersVersion,[this._progressTierPool,this._storyTierPool,this._coopTierPool].forEach((q=>{q.forEach((q=>{q.parent||q.destroy()}))})),this.onChangeTab.dispose(),this.onChangeTabComplete.dispose(),super.destroy()}changeTab(q){this._currentTab=q,this.onChangeTab.dispatch(),this.setTaskProgressForTab(q),this.setTabNotifications(q),this._festivalQuestManager.markCompletedTasksSeen(q);const K=++this._buildTiersVersion;this.buildTiers(!0,K).then((()=>{this.gameObject&&!this.gameObject.isDestroyed&&(this._scrollViewRef.scrollToPercent(this.getTabScrollPercent(q)),this.onChangeTabComplete.dispatch())})).catch(X.RQr.createHandler("Failed to rebuild tiers for Festival Progress Menu when switching tabs."))}setTabNotifications(q){var K,z,Y,Q,X,Z;const J=null===(K=this._festivalQuestManager)||void 0===K?void 0:K.getCachedFestivalQuestData(),tt=this._activePlayer.hasMembership(),et={unclaimedQuestCount:0,unclaimedMemberCount:0,unclaimedNonMemberCount:0,unseenQuestCount:0,unseenMemberCount:0,unseenNonMemberCount:0},it=null!==(z=null==J?void 0:J.getUnclaimedQuestCount(Yp.xK.Story))&&void 0!==z?z:et,st=null!==(Y=null==J?void 0:J.getUnclaimedQuestCount(Yp.xK.Season))&&void 0!==Y?Y:et,nt=null!==(Q=null==J?void 0:J.getUnclaimedQuestCount(Yp.xK.Rifts))&&void 0!==Q?Q:et,at=null!==(X=null==J?void 0:J.getUnclaimedQuestCount(Yp.xK.Member))&&void 0!==X?X:et,rt=null!==(Z=null==J?void 0:J.getUnclaimedQuestCount(Yp.xK.Coop))&&void 0!==Z?Z:et;this._storyTabNotification.active=q!==Yp.xK.Story&&(tt?it.unclaimedQuestCount:it.unclaimedNonMemberCount+it.unseenMemberCount)>0,this._seasonTabNotification.active=q!==Yp.xK.Season&&(tt?st.unclaimedQuestCount:st.unclaimedNonMemberCount+st.unseenMemberCount)>0,this._riftsTabNotification.active=q!==Yp.xK.Rifts&&(tt?nt.unclaimedQuestCount:nt.unclaimedNonMemberCount+nt.unseenMemberCount)>0,this._memberTabNotification.active=q!==Yp.xK.Member&&(tt?at.unclaimedQuestCount:at.unclaimedNonMemberCount+at.unseenMemberCount)>0,this._coopTabNotification.active=q!==Yp.xK.Coop&&(tt?rt.unclaimedQuestCount:rt.unclaimedNonMemberCount+rt.unseenMemberCount)>0}getTabScrollPercent(q){var K,z,Y,Q,Z,J;let tt=0,et=0,it=0,st=0,nt=0,at=0,rt=0,ot=0,ht=0;const ct=this._gridLayoutRef.columnSpacing,dt=this._scrollViewRef.GameObject.findComponent(X.XVE).widthDelta,lt=this._tierCardContainer.findComponent(X.XVE).widthDelta-dt;let ut=0,ft=0;switch(q){case Yp.xK.Story:st=null===(K=this._festivalQuestManager)||void 0===K?void 0:K.getCompletedTaskCount(Yp.xK.Story,Yp.wD.STORY),at=null===(z=this._festivalQuestManager)||void 0===z?void 0:z.getCompletedTaskCount(Yp.xK.Story,Yp.wD.GOAL,!0);const q=null!==(Q=null===(Y=this._tierCardContainer.children[0])||void 0===Y?void 0:Y.findComponent(sv))&&void 0!==Q?Q:null===(Z=this._tierCardContainer.children[0])||void 0===Z?void 0:Z.findComponent(iv);q&&(q.storyArrow.active=!1);for(let K=0;K{const z=K.find((K=>K.taskID===q));return(null==z?void 0:z.taskProgress.status)===Ar.t.COMPLETE})))return this._localizer.getText(Rr.x.QUEST_LAMPLIGHT_PROMPT_KEY)}getQuestUnlockText(q){let K=this._localizer.getText(Rr.x.FESTIVAL_QUEST_COMING_SOON_KEY);const z=Xp.R.getNow(),Y=new Date(z.getTime()+q),Q=Y.getDate()===z.getDate(),X=Y.getDate()===z.getDate()+1;return re.J.isDateWithinSchoolHours(z)&&Q?K=this._localizer.getText(Rr.x.FESTIVAL_TIER_RETURN_TODAY_KEY):X&&(K=this._localizer.getText(Rr.x.FESTIVAL_TIER_RETURN_TOMORROW_KEY)),K}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",Y.$)],av.prototype,"_shopButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",Y.$)],av.prototype,"_ctaButton",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],av.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("f03-2b73"),(0,Q.Sn)("design:type",Qp.q)],av.prototype,"_festivalQuestManager",void 0),(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],av.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],av.prototype,"_tierCardContainer",void 0),(0,Q.Cg)([(0,X.MnK)(X.Sz7),(0,Q.Sn)("design:type",X.Sz7)],av.prototype,"_gridLayoutRef",void 0),(0,Q.Cg)([(0,X.MnK)($t.C),(0,Q.Sn)("design:type",$t.C)],av.prototype,"_scrollViewRef",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],av.prototype,"_storyTabNotification",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],av.prototype,"_seasonTabNotification",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],av.prototype,"_riftsTabNotification",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],av.prototype,"_memberTabNotification",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],av.prototype,"_coopTabNotification",void 0),(0,Q.Cg)([(0,X.MnK)(sn.O),(0,Q.Sn)("design:type",sn.O)],av.prototype,"_toggleGroup",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],av.prototype,"_taskCompleteCounter",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],av.prototype,"_loadingObject",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],av.prototype,"onChangeTab",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],av.prototype,"onChangeTabComplete",void 0),av=(0,Q.Cg)([(0,X.EVk)("FestivalProgressMenuSetup",et.Y.festival),(0,X.WR4)(tv)],av);var rv,ov=z(94393),hv=z(30065),cv=z(65725);!function(q){q.PortalNonMemberSchool="PortalNonMemberSchool",q.PortalNonMemberHome="PortalNonMemberHome",q.PortalMember="PortalMember"}(rv||(rv={}));var dv=z(84415);let lv=class extends X.uAl{constructor(){super(...arguments),this._originType=wi.$N.ButtonClick,this.onOpen=new X.HN0}get prefabMenu(){return this._prefabMenu}openFestivalProgressMenu(){var q;this._prefabMenu=Rr.x.openFestivalProgressMenu(this._originType,this._originID),null===(q=this._prefabMenu)||void 0===q||q.onPrefabLoaded.addOnce((q=>{this.onOpen.dispatch(q)}))}openFestivalAboutMenu(){var q;this._prefabMenu=Rr.x.openFestivalAboutMenu(this._originType,this._originID),null===(q=this._prefabMenu)||void 0===q||q.onPrefabLoaded.addOnce((q=>{this.onOpen.dispatch(q)}))}updateViewedProgressMenu(){this._activePlayer.daily.viewedProgressMenu||(this._activePlayer.daily.viewedProgressMenu=!0,this._activePlayer.getDataAndClear(),this._activePlayer.forceSaveCharacter())}openFestivalStore(){var q;let K;switch(null===(q=this._weekendEvents.getActiveFestival())||void 0===q?void 0:q.type){case hv.Q.Springfest:K=72;break;case hv.Q.Summerfest:K=37;break;case hv.Q.Pumpkinfest:K=14;break;case hv.Q.Winterfest:K=15;break;case hv.Q.StarlightFestival:K=13;break;case hv.Q.MoonlightFestival:K=71;break;case hv.Q.GenericFestival:K=70;break;default:X.RQr.createHandler("Could not find an About Menu prefab for the current active festival"),K=3}dt.q.instance.prodigy.open.store(K,void 0,void 0,{originType:wi.$N.ButtonClick})}openFestivalRoulette(q=0){var K,z;const Y=null===(z=null===(K=this._weekendEvents.getFestivalConfig())||void 0===K?void 0:K.festivalDailyData)||void 0===z?void 0:z.festivalChestRouletteData;let Q=[],X=[{type:"currency",ID:1,N:50}];Y&&(Q=this.processRewards(Y[q].items),X=this.processRewards(Y[q].fallbackItems)),dt.q.instance.prodigy.open.bossRewards(Q,Ti.N.FestivalChestRouletteSpin,Gt.l.FestivalChestRewardUI,void 0,X,void 0,void 0,void 0,void 0,{instanceId:this._activePlayer.daily.getFestivalInstanceName(),sourceType:Ei.C.FestivalBossLootWheel})}processRewards(q){return q.map((q=>Object.assign(Object.assign({},q),{isSecure:(0,xr.p)(q.type,q.ID)}))).filter((q=>cv.V.includes(q.type)||this._activePlayer.getItemCount(q.type,q.ID)<=0))}openFestivalPortalVideoPopup(q,K,z,Y,Q,Z,J){var tt,et,it,st;const nt=dv.a.getMostRecentFeatureTimestamp(this._activePlayer,Object.keys(rv));if(this._activePlayer.hasMembership()&&nt>(null!==(et=null===(tt=this._questManager.getCachedFestivalQuestData())||void 0===tt?void 0:tt.getStartDate())&&void 0!==et?et:0)){if(gh.A.isDefined(J))return void dt.q.instance.prodigy.open.prefabMenu({prefabID:J,isModal:!0});dt.q.instance.prodigy.world.it(q,K,z)}const at=this._activePlayer.isPlayingAtSchool()||re.J.isDateWithinSchoolDayAndHours(new Date(Date.now()));let rt=rv.PortalNonMemberHome;this._activePlayer.hasMembership()?rt=rv.PortalMember:at&&(rt=rv.PortalNonMemberSchool);const ot=null===(it=this._questManager.getCachedFestivalQuestData())||void 0===it?void 0:it.getVideoAsset(rt);if(!gh.A.isDefined(ot))return void X.VyI.log(`No video asset defined for ${rt} when trying to open the portal video popup`,X.$bb.Error);const ht=yt.sample(Object.keys(ot.data.videos));if(!gh.A.isDefined(ht))return void X.VyI.log("No video id defined when trying to open the portal video popup",X.$bb.Error);const ct={type:ws.B.FestivalPortalVideo,category:"festival",contentId:null,adType:Ys.R.Video};dt.q.instance.prodigy.open.prefabMenu({prefabID:Gt.l.FestivalPortalVideoPopup,runUpdate:!0,injectablePropertiesDictionary:{[ms.Ut.VideoId]:ht,[ms.Ut.VideoAtSchool]:at,[ms.Ut.SupportedResolutionIds]:ot.data.videos[ht].supportedResolutionIds,[ms.Ut.SizeRatio]:null===(st=ot.metadata)||void 0===st?void 0:st.sizeRatio,[ms.Ut.VideoMember]:this._activePlayer.hasMembership(),[ms.Ut.FunnelStartTrigger]:ct,[ms.V8.LoginDetailsUsername]:this._loggedInPlayer.loginCredentials.username,[ms.V8.LoginDetailsPassword]:this._loggedInPlayer.loginCredentials.password,[ms.Wr.HomeImageGuid]:Z,[ms.Wr.MemberFollowupPrefabGuid]:J,[ms.Wr.MemberImageGuid]:Y,[ms.Wr.OriginId]:this._originID,[ms.Wr.SchoolImageGuid]:Q,[ms.Wr.TargetMapTag]:q,[ms.Wr.TargetPosition]:{x:K,y:z}}}),dv.a.saveTimestampData(rt)}destroy(){this.onOpen.dispose(),this._prefabMenu=void 0,super.destroy()}};var uv;(0,Q.Cg)([(0,X.gfw)(wi.$N),(0,Q.Sn)("design:type",String)],lv.prototype,"_originType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],lv.prototype,"_originID",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],lv.prototype,"onOpen",void 0),(0,Q.Cg)([(0,Qi.b)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],lv.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,Qi.b)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],lv.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,Qi.b)("119-35f9"),(0,Q.Sn)("design:type",ov.n)],lv.prototype,"_weekendEvents",void 0),(0,Q.Cg)([(0,Qi.b)("f03-2b73"),(0,Q.Sn)("design:type",Qp.q)],lv.prototype,"_questManager",void 0),lv=(0,Q.Cg)([(0,X.EVk)("OpenFestivalMenu",et.Y.festival)],lv),function(q){q.Summerfest="summerfest",q.Springfest="springfest",q.Winterfest="winterfest",q.StarlightFestival="starlight-festival",q.Pumpkinfest="pumpkinfest-0"}(uv||(uv={}));let fv=class extends X.uAl{constructor(){super(...arguments),this.FESTIVAL_HUD_ICONS_MAP=new Map([[hv.Q.Winterfest,uv.Winterfest],[hv.Q.Springfest,uv.Springfest],[hv.Q.Summerfest,uv.Summerfest],[hv.Q.StarlightFestival,uv.StarlightFestival],[hv.Q.Pumpkinfest,uv.Pumpkinfest],[hv.Q.MoonlightFestival,uv.StarlightFestival],[hv.Q.GenericFestival,uv.StarlightFestival]])}postCreate(){var q;let K;super.postCreate();{const z=null===(q=dt.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival())||void 0===q?void 0:q.type;if(!X.Aq$.isDefined(z))return;const Y=this.FESTIVAL_HUD_ICONS_MAP.get(z);if(!X.Aq$.isDefined(Y))return;K=Y}this._upStateGraphic.updateAsset(ti._.General_icons_hud_json,K),this._overStateGraphic.updateAsset(ti._.General_icons_hud_json,K)}};(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],fv.prototype,"_upStateGraphic",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],fv.prototype,"_overStateGraphic",void 0),fv=(0,Q.Cg)([(0,X.EVk)("SetFestivalHudIcon",et.Y.festival)],fv);let bv=class extends X.uAl{constructor(){super(...arguments),this.onFestivalActive=new X.HN0,this.onFestivalInactive=new X.HN0}create(){super.create(),this._runOnCreate&&this.processFestivalState()}processFestivalState(){const q=this._weekendEvents.getActiveFestival();gh.A.isDefined(q)?this._listenForSpecificFestival&&this._festivals.includes(q.type)?this.onFestivalActive.dispatch():this._listenForSpecificFestival?this.onFestivalInactive.dispatch():this.onFestivalActive.dispatch():this.onFestivalInactive.dispatch()}destroy(){this.onFestivalActive.dispose(),this.onFestivalInactive.dispose()}};(0,Q.Cg)([(0,X.Cdj)("119-35f9"),(0,Q.Sn)("design:type",ov.n)],bv.prototype,"_weekendEvents",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],bv.prototype,"onFestivalActive",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],bv.prototype,"onFestivalInactive",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],bv.prototype,"_runOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],bv.prototype,"_listenForSpecificFestival",void 0),(0,Q.Cg)([(0,X.gfw)(hv.Q),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],bv.prototype,"_festivals",void 0),bv=(0,Q.Cg)([(0,X.EVk)("FestivalListener",et.Y.festival)],bv);let pv=class extends X.uAl{create(){super.create();{const q=[this._spineAnimator];this._animationController.setAnimationState(0,new Hn(q,"idle")),this._animationController.setAnimationState(1,new Hn(q,"walk"))}}destroy(){this._animationController=null,this._spineAnimator=null,super.destroy()}};(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],pv.prototype,"_animationController",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],pv.prototype,"_spineAnimator",void 0),pv=(0,Q.Cg)([(0,X.EVk)("SpineFollowAnimationStates",et.Y.follow)],pv);let vv=class extends X.uAl{constructor(){super(...arguments),this._followSpine=null,this._followID=null}get followID(){return this._followID}create(){super.create(),null!==this._followID&&this._followSpine&&this.updateFollowSpine()}destroy(){this._followSpine=null,super.destroy()}setFollowID(q){this._followID=q,this.updateFollowSpine()}updateFollowSpine(){(0,wt.v)(null!==this._followID&&this._followID>0,"Invalid follow ID was loaded");const q=ae.t.getItem("follow",this._followID).metadata.assets.default;(0,wt.v)("spine"===q.type,`Invalid spine follow data for ID: ${this._followID}`),this._followSpine.setAsset(`spine-${q.ID}`)}};(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],vv.prototype,"_followSpine",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],vv.prototype,"_followID",void 0),vv=(0,Q.Cg)([(0,X.EVk)("SpineFollowAppearance",et.Y.follow)],vv);var gv=z(55800),mv=z(80573);let yv=class extends X.uAl{create(){super.create(),this._legacyFollowAppearance.onFollowLoaded.add(this.mapMorphedAppearanceData,this)}destroy(){this._legacyFollowAppearance.onFollowLoaded.remove(this.mapMorphedAppearanceData,this),super.destroy()}mapMorphedAppearanceData(){const q=this._legacyFollowAppearance.followParent;this._morphedAppearance.appearanceRenderComponent=q.findComponentInChildren(hr.B),this._morphedAppearance.animationController=q.findComponentInChildren(Gn.K)}};(0,Q.Cg)([(0,X.MnK)(mv.n),(0,Q.Sn)("design:type",mv.n)],yv.prototype,"_morphedAppearance",void 0),(0,Q.Cg)([(0,X.MnK)(gv.a),(0,Q.Sn)("design:type",gv.a)],yv.prototype,"_legacyFollowAppearance",void 0),yv=(0,Q.Cg)([(0,X.EVk)("MorphedLegacyFollow",et.Y.follow)],yv);let _v=class extends X.uAl{create(){super.create(),this._legacyAppearanceLoader.onFollowLoaded.add(this.legacyAppearanceWasLoaded,this)}destroy(){this._legacyAppearanceLoader.onFollowLoaded.remove(this.legacyAppearanceWasLoaded,this),this._boundAnimationController&&(this._pathLocomotion.onPathStart.remove(this._boundAnimationController.changeState,this._boundAnimationController),this._pathLocomotion.onPathEnd.remove(this._boundAnimationController.changeState,this._boundAnimationController),this._boundAnimationController=null),this._legacyAppearanceLoader=null,this._pathLocomotion=null,super.destroy()}legacyAppearanceWasLoaded(){this._boundAnimationController=this._legacyAppearanceLoader.followParent.findComponentInChildren(Gn.K),(0,wt.v)(null!==this._boundAnimationController,"No animation controller found in follow prefab"),this._boundAnimationController.changeState(0),this._pathLocomotion.onPathStart.add(this._boundAnimationController.changeState,this._boundAnimationController,0,1),this._pathLocomotion.onPathEnd.add(this._boundAnimationController.changeState,this._boundAnimationController,0,0)}};(0,Q.Cg)([(0,X.MnK)(gv.a),(0,Q.Sn)("design:type",gv.a)],_v.prototype,"_legacyAppearanceLoader",void 0),(0,Q.Cg)([(0,X.MnK)(X.KhP),(0,Q.Sn)("design:type",X.KhP)],_v.prototype,"_pathLocomotion",void 0),_v=(0,Q.Cg)([(0,X.EVk)("LegacyFollowAnimationBinding",et.Y.follow)],_v);class Ev extends $n{constructor(q,K){super(),this._animationData=null,this._animationTargets=null,this._bindPosition={},this._frameElapsedCache={},this._animationData=K,this._animationTargets=Object.assign({},q);const z=Object.keys(this._animationTargets),Y=z.length;for(let Q=0;QJ.interval){const q=Math.floor(tt.elapsed/J.interval);tt.frame+=q,tt.elapsed-=J.interval*q;const z=J.frames.length,Y=z-1;if(this._animationData.loop){if(tt.frame>Y){const q=Math.floor(tt.frame/z);tt.frame-=q*z}}else tt.frame>Y&&(tt.frame=Y);this.updateGameObjectTargetProperty(K,X,J.frames[tt.frame])}}}updateGameObjectTargetProperty(q,K,z){const Y=this._animationTargets[q];switch((0,wt.v)(null!==Y,"No animation target found for key frame animation"),K){case"x":{const K=Y.transform;K.setPosition(this._bindPosition[q].position.x+z,K.localPosition.y);break}case"y":{const K=Y.transform;K.setPosition(K.localPosition.x,this._bindPosition[q].position.y+z);break}case"xScale":{const q=Y.transform;q.setScale(z,q.localScale.y);break}case"yScale":{const q=Y.transform;q.setScale(q.localScale.x,z);break}case"angle":Y.transform.setRotation(z);break;case"visible":Y.active=z;break;case"frameName":Y.findComponentInChildren(si._).setFrameName(z)}}isAnimationComplete(){const q=Object.keys(this._frameElapsedCache),K=q.length;for(let z=0;zq.replace(K,z))))}}return Y}}let Tv=class extends wv{create(){super.create();const q=this.processAnimationData(z(88505),"{rodentTag}",this._rodentTag),K={body:this._rodentBody,legs:this._rodentLegs};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Tv.prototype,"_rodentBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Tv.prototype,"_rodentLegs",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Tv.prototype,"_rodentTag",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Tv.prototype,"_animationController",void 0),Tv=(0,Q.Cg)([(0,X.EVk)("RodentAnimationStates",et.Y.followAnimationState)],Tv);let Sv=class extends wv{create(){super.create();const q=this.processAnimationData(z(48687),"{catTag}",this._catTag),K={body:this._catBody,legs:this._catLegs,tail:this._catTail};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Sv.prototype,"_catBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Sv.prototype,"_catLegs",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Sv.prototype,"_catTail",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Sv.prototype,"_catTag",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Sv.prototype,"_animationController",void 0),Sv=(0,Q.Cg)([(0,X.EVk)("CatAnimationStates",et.Y.followAnimationState)],Sv);let Av=class extends wv{create(){super.create();const q=this.processAnimationData(z(24625),"{dogTag}",this._dogTag),K={body:this._dogBody,legs:this._dogLegs,tail:this._dogTail};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Av.prototype,"_dogBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Av.prototype,"_dogLegs",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Av.prototype,"_dogTail",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Av.prototype,"_dogTag",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Av.prototype,"_animationController",void 0),Av=(0,Q.Cg)([(0,X.EVk)("DogAnimationStates",et.Y.followAnimationState)],Av);let Cv=class extends wv{create(){super.create();const q=this.processAnimationData(z(77628),"{birdTag}",this._birdTag),K={body:this._birdBody};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Cv.prototype,"_birdBody",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Cv.prototype,"_birdTag",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Cv.prototype,"_animationController",void 0),Cv=(0,Q.Cg)([(0,X.EVk)("BirdAnimationStates",et.Y.followAnimationState)],Cv);let Ov=class extends wv{create(){super.create();const q=this.processAnimationData(z(22967),"{lizardTag}",this._lizardTag),K={body:this._lizardBody,head:this._lizardHead,tail:this._lizardTail};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ov.prototype,"_lizardBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ov.prototype,"_lizardHead",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ov.prototype,"_lizardTail",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ov.prototype,"_lizardTag",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Ov.prototype,"_animationController",void 0),Ov=(0,Q.Cg)([(0,X.EVk)("LizardAnimationStates",et.Y.followAnimationState)],Ov);let Iv=class extends wv{create(){super.create();const q=this.processAnimationData(z(43081),"{turtleTag}",this._turtleTag),K={body:this._turtleBody,legs:this._turtleLegs};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Iv.prototype,"_turtleBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Iv.prototype,"_turtleLegs",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Iv.prototype,"_turtleTag",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Iv.prototype,"_animationController",void 0),Iv=(0,Q.Cg)([(0,X.EVk)("TurtleAnimationStates",et.Y.followAnimationState)],Iv);let Dv=class extends X.uAl{create(){super.create();const q=z(45221),K={body:this._reindeerBody,legs:this._reindeerLegs,tail:this._reindeerTail};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Dv.prototype,"_reindeerBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Dv.prototype,"_reindeerLegs",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Dv.prototype,"_reindeerTail",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Dv.prototype,"_animationController",void 0),Dv=(0,Q.Cg)([(0,X.EVk)("ReindeerAnimationStates",et.Y.followAnimationState)],Dv);let Rv=class extends X.uAl{create(){super.create();const q=z(11475),K={body:this._penguinBody,head:this._penguinHead};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rv.prototype,"_penguinBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rv.prototype,"_penguinHead",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Rv.prototype,"_animationController",void 0),Rv=(0,Q.Cg)([(0,X.EVk)("PenguinAnimationStates",et.Y.followAnimationState)],Rv);let Pv=class extends X.uAl{create(){super.create();const q=z(35002),K={body:this._snowmanBody,head:this._snowmanHead};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Pv.prototype,"_snowmanBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Pv.prototype,"_snowmanHead",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Pv.prototype,"_animationController",void 0),Pv=(0,Q.Cg)([(0,X.EVk)("SnowmanAnimationStates",et.Y.followAnimationState)],Pv);let Mv=class extends X.uAl{create(){super.create();const q=z(67987),K={body:this._pandaBody};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Mv.prototype,"_pandaBody",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Mv.prototype,"_animationController",void 0),Mv=(0,Q.Cg)([(0,X.EVk)("PandaAnimationStates",et.Y.followAnimationState)],Mv);let Nv=class extends X.uAl{create(){super.create();const q=z(43168),K={body:this._sheepBody,legs:this._sheepLegs};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Nv.prototype,"_sheepBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Nv.prototype,"_sheepLegs",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Nv.prototype,"_animationController",void 0),Nv=(0,Q.Cg)([(0,X.EVk)("SheepAnimationStates",et.Y.followAnimationState)],Nv);let xv=class extends X.uAl{create(){super.create();const q=z(60296),K={body:this._cactusBody,head:this._cactusFlower};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xv.prototype,"_cactusBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xv.prototype,"_cactusFlower",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],xv.prototype,"_animationController",void 0),xv=(0,Q.Cg)([(0,X.EVk)("CactusAnimationStates",et.Y.followAnimationState)],xv);let Lv=class extends X.uAl{create(){super.create();const q=z(85218),K={body:this._foxBody,legs:this._foxLegs,tail:this._foxTail};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Lv.prototype,"_foxBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Lv.prototype,"_foxLegs",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Lv.prototype,"_foxTail",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Lv.prototype,"_animationController",void 0),Lv=(0,Q.Cg)([(0,X.EVk)("FoxAnimationStates",et.Y.followAnimationState)],Lv);let kv=class extends X.uAl{create(){super.create();const q=z(98179),K={body:this._rodentBody};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kv.prototype,"_rodentBody",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],kv.prototype,"_animationController",void 0),kv=(0,Q.Cg)([(0,X.EVk)("SparkleRodentAnimationStates",et.Y.followAnimationState)],kv);let Bv=class extends X.uAl{create(){super.create();const q=z(74109),K={body:this._catBody,legs:this._catLegs,tail:this._catTail};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bv.prototype,"_catBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bv.prototype,"_catLegs",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bv.prototype,"_catTail",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Bv.prototype,"_animationController",void 0),Bv=(0,Q.Cg)([(0,X.EVk)("SparkleCatAnimationStates",et.Y.followAnimationState)],Bv);let Uv=class extends X.uAl{create(){super.create();const q=z(67131),K={body:this._dogBody,legs:this._dogLegs,tail:this._dogTail};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uv.prototype,"_dogBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uv.prototype,"_dogLegs",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Uv.prototype,"_dogTail",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Uv.prototype,"_animationController",void 0),Uv=(0,Q.Cg)([(0,X.EVk)("SparkleDogAnimationStates",et.Y.followAnimationState)],Uv);let Fv=class extends wv{create(){super.create();const q=z(57131),K={body:this._lizardBody,head:this._lizardHead,tail:this._lizardTail};this._animationController.setAnimationState(0,new Ev(K,q.idle)),this._animationController.setAnimationState(1,new Ev(K,q.walk))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Fv.prototype,"_lizardBody",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Fv.prototype,"_lizardHead",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Fv.prototype,"_lizardTail",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],Fv.prototype,"_animationController",void 0),Fv=(0,Q.Cg)([(0,X.EVk)("FireLizardAnimationStates",et.Y.followAnimationState)],Fv);let Gv=class extends X.uAl{constructor(){super(...arguments),this._lastKnownFollowID=null,this._lastKnownPetTeam=null}create(){super.create(),this.checkFollowUpdates=this.checkFollowUpdates.bind(this),this._lastKnownFollowID=this._currentPlayer.player.equipment.getFollow(),this._lastKnownPetTeam=this._currentPlayer.player.kennel.getPetTeamIDs();const q=dt.q.instance.game.broadcaster;q.addAppListener(Xn.J8.PlayerEditingMenuClosed,this.checkFollowUpdates,this),q.addAppListener(Xn.J8.PlayerAppearanceUpdated,this.checkFollowUpdates,this)}destroy(){const q=dt.q.instance.game.broadcaster;q.removeAppListener(Xn.J8.PlayerEditingMenuClosed,this),q.removeAppListener(Xn.J8.PlayerAppearanceUpdated,this),this._playerFollowLoader=null,super.destroy()}checkFollowUpdates(){let q=!1;const K=this._currentPlayer.player.equipment.getFollow();K!==this._lastKnownFollowID&&(q=!0);const z=this._currentPlayer.player.kennel.getPetTeamIDs();if(!q){const K=z.length;if(K!==this._lastKnownPetTeam.length)q=!0;else for(let Y=0;Y0,Q="prodigy"===K.userDataPlatform,X=z.getValue("showClassCodeOnLogin",!1)&&!this.isClassCodeUpdateOnCooldown(),Z=z.getValue("showClassCodeOnLoginIfNotInAClass",!1)&&!Y,J=null===(q=z.getClassCodePromptCurriculumBlacklist())||void 0===q?void 0:q.includes(K.educationData.curriculumTreeID),tt=(X||Z)&&Q&&!J;this.showClassCodeScreen(tt,Y)}isClassCodeUpdateOnCooldown(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!X.Aq$.isDefined(q.data.classCodeUpdateTimestamp))return!1;const K=new Date(q.data.classCodeUpdateTimestamp).getFullYear(),z=new Date(q.data.classCodeUpdateTimestamp).getMonth(),Y=new Date(q.data.classCodeUpdateTimestamp).getDate();let Q;Q=z>Vv.b.CLASSCODE_COOLDOWN_MONTH||z===Vv.b.CLASSCODE_COOLDOWN_MONTH&&Y>=Vv.b.CLASSCODE_COOLDOWN_DATE?new Date(K+1,Vv.b.CLASSCODE_COOLDOWN_MONTH,Vv.b.CLASSCODE_COOLDOWN_DATE):new Date(K,Vv.b.CLASSCODE_COOLDOWN_MONTH,Vv.b.CLASSCODE_COOLDOWN_DATE);const Z=Q.getTime();return Date.now()=$v.CLASS_CODE_CHECK_DATE)return void this.setNextButtonHandGuideActive(!0)}}showClassCodeDialog(){dt.q.instance.prodigy.open.prefabMenu(Gt.l.ClassCodePopup,void 0,void 0,void 0,void 0,{[ms.iu.ClassCodeSubmitSuccess]:this.setClassCodeMenuActive.bind(this,!1)})}setClassCodeMenuActive(q){this._classCodeContainer.active=q}setNextButtonHandGuideActive(q){this._nextButtonHandGuideContainer.active=q}};Wv.CLASS_CODE_CHECK_DATE=143801786e4,(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Wv.prototype,"_classCodeContainer",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],Wv.prototype,"updateButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Wv.prototype,"_nextButtonHandGuideContainer",void 0),(0,Q.Cg)([(0,X.Cdj)("a92-c640"),(0,Q.Sn)("design:type",Hv.U)],Wv.prototype,"_metricsManager",void 0),Wv=$v=(0,Q.Cg)([(0,X.EVk)("CharacterSelectScreenManager",et.Y.uiDialog)],Wv);z(4035),z(32259);let qv=class extends X.uAl{constructor(){super(...arguments),this._dialogueIds=[],this._finalButtonLocalizationKey=null,this.onDialogueAdvanced=new X.HN0,this.onDialogueClosed=new X.HN0,this._blockInputDuringDialogue=!0,this.reenableInputOnClose=!0,this.clearExistingDialogue=!0}start(){this._dialogueIds.forEach(((q,K)=>{this._dialogueEventController.addEvents([{dialogueData:this._dialogueEventController.dataProvider.get(q),blockInput:this._blockInputDuringDialogue,nextButtonText:this._finalButtonLocalizationKey&&K===this._dialogueIds.length-1?dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(this._finalButtonLocalizationKey):null}])})),this._dialogueEventController.onAdvance.add(this.onDialogueAdvanced.dispatch,this.onDialogueAdvanced),this._dialogueEventController.start(!0,(()=>{this.onDialogueClosed.dispatch(),this._dialogueEventController.onAdvance.remove(this.onDialogueAdvanced.dispatch,this.onDialogueAdvanced)}),this.reenableInputOnClose,this.clearExistingDialogue)}setDialogueIds(q){this._dialogueIds=Array.isArray(q)?q:[q]}destroy(){this.onDialogueClosed.dispose(),this.onDialogueAdvanced.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("e81-40c8"),(0,Q.Sn)("design:type",Ii.rD)],qv.prototype,"_dialogueEventController",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.g11)(),(0,Q.Sn)("design:type",Array)],qv.prototype,"_dialogueIds",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],qv.prototype,"_finalButtonLocalizationKey",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],qv.prototype,"onDialogueAdvanced",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],qv.prototype,"onDialogueClosed",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],qv.prototype,"_blockInputDuringDialogue",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],qv.prototype,"reenableInputOnClose",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],qv.prototype,"clearExistingDialogue",void 0),qv=(0,Q.Cg)([(0,X.EVk)("DialogueEventController",et.Y.uiDialog)],qv);let Kv=class extends X.uAl{constructor(){super(...arguments),this._tooltipSchema={bodyText:""},this.onComplete=new X.HN0}displayTooltip(){const q=dt.q.instance.prodigy.open.overlayToolTip(gn.A.TOOLTIP_SPEECH,{bodyText:this._displayText.localizedText.text,xPosition:this._tooltipSchema.xPosition,yPosition:this._tooltipSchema.yPosition,arrowXRelPos:this._tooltipSchema.arrowXRelPos,arrowYRelPos:this._tooltipSchema.arrowYRelPos,arrowDirection:parseInt(this._tooltipSchema.arrowDirection)});this._onCompleteHandler=()=>{this.onComplete.dispatch()},q.onDismissalClick.add(this._onCompleteHandler,this)}destroy(){this.onComplete.dispose(),this._onCompleteHandler=null,super.destroy()}};(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],Kv.prototype,"_displayText",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],Kv.prototype,"_tooltipSchema",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Kv.prototype,"onComplete",void 0),Kv=(0,Q.Cg)([(0,X.EVk)("DisplayTooltipOverlay",et.Y.uiDialog)],Kv);var zv=z(89067);class Yv extends X.uAl{constructor(){super(...arguments),this.onAnimationEnded=new X.HN0,this.onAnimationStarted=new X.HN0}create(){super.create(),this._broadcaster=dt.q.instance.game.broadcaster}animate(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this.hudButtonType();this.onAnimationStarted.dispatch(!0),this._broadcaster.broadcast(Xn.Y1.HUDAttentionManagerUpdated,void 0,[q,!0,void 0])}))}createWidget(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=!1){const z=this.hudButtonType();this._broadcaster.broadcast(Xn.Y1.HUDAttentionManagerUpdated,void 0,[z,K,q])}))}destroy(){this.onAnimationEnded.dispose(),this.onAnimationStarted.dispose(),super.destroy()}}(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Yv.prototype,"onAnimationEnded",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Yv.prototype,"onAnimationStarted",void 0);let Qv=class extends Yv{constructor(){super(...arguments),this._hudButtonType=zv.ts.AfterSchoolWidget}needsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){return dt.q.instance.prodigy.gameContainer.get("2c1-7dec").isFtueAvailable()}))}highlightButton(){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.game.broadcaster.broadcast(Xn.Y1.HUDRevampButtonAttentionGranted,void 0,[this._hudButtonType]),yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(q){return(0,Q.sH)(this,void 0,void 0,(function*(){yield q()}))}};Qv=(0,Q.Cg)([(0,X.EVk)("HudAfterSchoolWidget",et.Y.uiHudManager)],Qv);var Xv,Zv=z(96703),Jv=z(85985),tg=z(41012),eg=z(29546);function ig(){const q=dt.q.instance.prodigy,K=q.world.getZone(q.world.getCurrentZone()).screen,z=q.gameContainer.get("782-c308"),Y=null==K?void 0:K.saveTag.split("-").pop();return z.userID.toString()===Y}function sg(q){const K=dt.q.instance.prodigy;K.gameContainer.get("782-c308").setAllowsHouseVisitors(q),K.open.messageBoxPrefab({text:q?"HOUSE_VISITING_UNLOCKED":"HOUSE_VISITING_LOCKED"}),dt.q.instance.game.broadcaster.broadcast(Xn.Y1.HUDRevampButtonVisibilityRefreshRequested)}class ng{static openAndWait(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return new Promise((K=>q(K)))}))}static openWizardBank(){(0,Kt.G)(ie.d).enabled?dt.q.instance.prodigy.open.openWizardBank({originType:wi.$N.ButtonClick,originId:Us.k.MemberHudButton}):this.openMLP()}static openMLP(){const q=this._activePlayer.getMemberTier();if(q===Vs._$.MemberUltra)return;if(!Qs.pF.eligibleForMembershipPurchaseForMultipleTiers()&&(q===Vs._$.MemberPlus||q===Vs._$.MemberUltimateMath))return;this._segment.purchase.sendFunnelStart({type:"Click-HUD-Button",category:"HUD",contentId:dt.q.instance.prodigy.world.getCurrentMap(),adType:Ys.R.UnifiedConversionFlow,adVersion:zs.P.getAdVersionFromTriggerCategory("HUD")});dt.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:"Click-HUD-Button"})||dt.q.instance.prodigy.open.battlePassUltimateMemberUpsellModal().catch(X.RQr.createHandler("HUDMembershipButtonComponent: Could not open MLP."))}static openDailyLoginCalendar(q){dt.q.instance.prodigy.open.dailyLoginCalendar().catch(X.RQr.createHandler("HudButtonUtils: Could not open Daily Login Calendar")).finally(q)}static openChat(){const q=dt.q.instance.game,K=dt.q.instance.prodigy;q.broadcaster.broadcast(Xn.Y1.HideHUD,Xn.HG.HUD),K.open.chat(q.broadcaster.broadcast.bind(q.broadcaster,Xn.Y1.ShowHUD,Xn.HG.HUD))}static areVisibilityConditionsTrue(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z;const Y=null!==(z=null===(K=Xv.BUTTON_DATA[q])||void 0===K?void 0:K.visibilityConditions)&&void 0!==z?z:[zv.qe.Always],X=yield Promise.all(Y.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.isHudButtonConditionMet(q)})))));return Y.every(((q,K)=>!0===X[K]))}))}static getButtonEnabledConditionsResult(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z;const Y=null!==(z=null===(K=Xv.BUTTON_DATA[q])||void 0===K?void 0:K.enabledConditions)&&void 0!==z?z:[zv.qe.Always],X=yield Promise.all(Y.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.isHudButtonConditionMet(q)}))))),Z=Y.filter(((q,K)=>!X[K]));return[0===Z.length,Z]}))}static isHudButtonConditionMet(q){return(0,Q.sH)(this,void 0,void 0,(function*(){switch(q){case zv.qe.AtHome:{const q=dt.q.instance.game.state.get(Nt.G.TileScreen);return gh.A.isDefined(null==q?void 0:q.zoneName)&&Ic.P.isHouse(q.zoneName)&&ig()}case zv.qe.AtAnotherHome:{const q=dt.q.instance.game.state.get(Nt.G.TileScreen);return gh.A.isDefined(null==q?void 0:q.zoneName)&&Ic.P.isHouse(q.zoneName)&&!ig()}case zv.qe.NotHome:{const q=dt.q.instance.game.state.get(Nt.G.TileScreen);return gh.A.isDefined(null==q?void 0:q.zoneName)&&!Ic.P.isHouse(q.zoneName)}case zv.qe.HomeVisitsAllowed:return this._activePlayer.getAllowsHouseVisitors();case zv.qe.HomeVisitsNotAllowed:return!this._activePlayer.getAllowsHouseVisitors();case zv.qe.NonMember:return this._activePlayer.getMemberTier()===Vs._$.NonMember;case zv.qe.CoreMember:{const q=this._activePlayer.getMemberTier();return q===Vs._$.MemberCore||q===Vs._$.MemberLevelUp}case zv.qe.PlusMember:{const q=this._activePlayer.getMemberTier();return q===Vs._$.MemberPlus||q===Vs._$.MemberUltimateMath}case zv.qe.UltraMember:{const q=this._activePlayer.getMemberTier();return q===Vs._$.MemberUltra||q===Vs._$.MemberUltimateBundle}case zv.qe.FestivalActive:return gh.A.isDefined(dt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig());case zv.qe.FestivalUnlocked:return dt.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirements(69);case zv.qe.ValidStateChallenge:return dt.q.instance.prodigy.gameContainer.get("394-6aa1").isFeatureAvailable();case zv.qe.StateChallengeActiveOrCanCollectRewards:return dt.q.instance.prodigy.gameContainer.get("394-6aa1").hasActiveChallengeOrRewards();case zv.qe.AfterSchoolWidgetEnabled:return!0===(0,Kt.G)(Zv.K).enabled;case zv.qe.DailyLoginCalendarEnabled:return Jv.J.showDailyLoginCalendar();case zv.qe.DailyLoginCalendarUnlocked:return yr.M.hasDailyLoginCalendarAccess();case zv.qe.WizardWatchUnlocked:return tg.e.hasWizardWatchAccess();case zv.qe.PlayerGoalsEnabled:return!(0,Kt.G)(ho.d3).enabled;case zv.qe.TreasureTrackUnlocked:return Dn.n.hasBattlePassAccess();case zv.qe.EnglishOnly:return Ut.O.isEnglishLocale();case zv.qe.Always:default:return!0}}))}static getDisabledTooltipText(q,K){const z=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);switch(K[0]){case zv.qe.TreasureTrackUnlocked:{const Y=this.getValueForFeatureRequirement(q,K);return gh.A.isDefined(Y)?z.getText("REACH_LEVEL_X_TO_UNLOCK",Y):z.getText("HUD_BUTTON_UNAVAILABLE")}case zv.qe.FestivalUnlocked:{const Y=this.getValueForFeatureRequirement(q,K),Q=dt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig();if(gh.A.isDefined(Y)&&gh.A.isDefined(Q)){const q=z.getText(Q.tintableBanner.titleText);return z.getText("FESTIVAL_UNLOCKS_AT_LEVEL",q,Y)}return z.getText("HUD_BUTTON_UNAVAILABLE")}default:return z.getText("HUD_BUTTON_UNAVAILABLE")}}static getDisabledButtonLabelText(q,K){const z=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);switch(K[0]){case zv.qe.TreasureTrackUnlocked:case zv.qe.FestivalUnlocked:{const Y=this.getValueForFeatureRequirement(q,K);return gh.A.isDefined(Y)?z.getText("LEVEL_X",Y):z.getText("ITEMCARD_LOCKED")}default:return z.getText("ITEMCARD_LOCKED")}}static getValueForFeatureRequirement(q,K){switch(K[0]){case zv.qe.TreasureTrackUnlocked:return eg.X.getLevelRequirement(70);case zv.qe.FestivalUnlocked:return eg.X.getLevelRequirement(69);default:return}}static getButtonTooltipDirection(q){switch(q){case zv.yR.Liveops:return ni.i.RIGHT;default:return ni.i.DOWN}}}Xv=ng,ng.BUTTON_DATA={[zv.ts.AfterSchoolWidget]:{iconProvider:q=>"a4b76834-dd0e-49df-984a-d33fe014f383",onClick:()=>{dt.q.instance.prodigy.gameContainer.get("2c1-7dec").openAfterSchoolWidgetRewardsScreenFromHud()},buttonSize:zv.Cy.Normal,visibilityConditions:[zv.qe.AfterSchoolWidgetEnabled],analyticsProperties:{interfaceName:ws.B.HUD,buttonName:"after-school-widget-button",destinationName:"after_school_widget_rewards_screen"}},[zv.ts.Backpack]:{iconProvider:q=>"932d246b-c406-4781-81dc-f4761ceb97b9",onClick:()=>{dt.q.instance.prodigy.open.backpack()},visibilityConditions:[zv.qe.NotHome],analyticsProperties:{buttonName:"backpack-button"}},[zv.ts.Chat]:{iconProvider:q=>"097bf81a-9354-4837-a7fd-5d07463e8809",onClick:()=>Xv.openChat(),analyticsProperties:{buttonName:"chat-button"}},[zv.ts.Challenges]:{iconProvider:q=>"123a9839-b689-4fa8-bf6c-4cb850c18ec6",onClick:()=>dt.q.instance.prodigy.open.social(),visibilityConditions:[zv.qe.NotHome,zv.qe.EnglishOnly],analyticsProperties:{buttonName:"social-button",destinationName:"social_screen"}},[zv.ts.CoreMember]:{iconProvider:q=>"5c233329-4c2d-4589-a7b5-be79087e7e16",onClick:()=>Xv.openWizardBank(),visibilityConditions:[zv.qe.CoreMember],buttonSize:zv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Kt.G)(ie.d).enabled?ws.B.WizardBank:"",saveClickInfo:Us.k.MemberHudButton}},[zv.ts.Duels]:{iconProvider:q=>"c67d47dd-322d-45eb-b3dd-175bf71e53ef",analyticsProperties:{buttonName:"duels-button"}},[zv.ts.Festival]:{iconProvider:q=>dt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalIcon(),onClick:()=>(0,Q.sH)(void 0,void 0,void 0,(function*(){return Xv.openAndWait(Rr.x.openFestivalProgressMenu.bind(Rr.x,wi.$N.ButtonClick,Us.k.Festival))})),visibilityConditions:[zv.qe.FestivalActive],enabledConditions:[zv.qe.FestivalUnlocked],analyticsProperties:{buttonName:Us.k.Festival,destinationName:ws.B.FestivalProgressionWindow,saveClickInfo:Us.k.Festival}},[zv.ts.FriendsList]:{iconProvider:q=>"ab57214a-ee29-4af9-bff7-a9b5c133e730",onClick:()=>{dt.q.instance.prodigy.open.friendsList()},analyticsProperties:{buttonName:"friend-button"}},[zv.ts.Hamburger]:{iconProvider:q=>"b074e226-1fa6-4f14-bbf2-8668776b21ac",analyticsProperties:{buttonName:"hamburger-button"}},[zv.ts.HouseEdit]:{iconProvider:q=>"a088c398-06c5-4899-87d0-a72bbd2f454d",onClick:()=>dt.q.instance.game.broadcaster.broadcast(Xn.F0.OpenEditor),visibilityConditions:[zv.qe.AtHome],analyticsProperties:{buttonName:"house-edit-button"}},[zv.ts.HouseLocked]:{iconProvider:q=>"ea98ef3c-7d8d-4a99-8edc-47bcabd72052",onClick:()=>sg(!0),visibilityConditions:[zv.qe.AtHome,zv.qe.HomeVisitsNotAllowed],analyticsProperties:{buttonName:"house-unlock-button"}},[zv.ts.HouseReport]:{iconProvider:q=>"decfb13a-a7ee-4d42-82aa-b3a41cd29741",onClick:()=>{tu.y.openReportHouseConfirmationDialog()},visibilityConditions:[zv.qe.AtAnotherHome],analyticsProperties:{buttonName:"house-report-button"}},[zv.ts.HouseUnlocked]:{iconProvider:q=>"23550ac0-65c3-423c-b94f-5b24175b436e",onClick:()=>sg(!1),visibilityConditions:[zv.qe.AtHome,zv.qe.HomeVisitsAllowed],analyticsProperties:{buttonName:"house-lock-button"}},[zv.ts.HouseUpgrade]:{iconProvider:q=>"2949c8c6-3d9c-4bef-b434-d9d75dfab75b",onClick:()=>dt.q.instance.prodigy.world.getZone(Yt.A_.HOUSE).openHouseStore(),visibilityConditions:[zv.qe.AtHome],analyticsProperties:{buttonName:"house-upgrade-button"}},[zv.ts.LoginRewards]:{iconProvider:q=>q===zv.yR.Liveops?"b5db5845-13c6-4ec1-92cb-e81cd3b1e8ad":"a62096ab-ae16-4cc4-bf92-2dfeaad9e1f6",onClick:()=>(0,Q.sH)(void 0,void 0,void 0,(function*(){return Xv.openAndWait(Xv.openDailyLoginCalendar)})),analyticsProperties:{buttonName:"daily-login-calendar-launch-button",destinationName:"daily_login_calendar_main"},visibilityConditions:[zv.qe.DailyLoginCalendarEnabled],enabledConditions:[zv.qe.DailyLoginCalendarUnlocked]},[zv.ts.Map]:{iconProvider:q=>"6b825a7e-fe52-4bb5-82f0-cd1b448b4eb0",onClick:()=>{const{demandsExclusiveAttention:q}=dt.q.instance.prodigy.gameContainer.get("959-82c1").getCachedButtonData(zv.ts.Map);dt.q.instance.prodigy.open.map({disableClose:q,disableZoneGoals:q,disableDifficultyModeSelect:q})},analyticsProperties:{buttonName:"map-button",destinationName:"map_screen"}},[zv.ts.NonMember]:{iconProvider:q=>"66eec2c1-e4df-409c-8a68-7c581ce2bb05",onClick:()=>Xv.openWizardBank(),visibilityConditions:[zv.qe.NonMember],buttonSize:zv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Kt.G)(ie.d).enabled?ws.B.WizardBank:"",saveClickInfo:Us.k.MemberHudButton}},[zv.ts.Pets]:{iconProvider:q=>"2bd3e716-979f-4018-8407-d959230736fb",onClick:()=>{dt.q.instance.prodigy.open.pets()},visibilityConditions:[zv.qe.NotHome],analyticsProperties:{buttonName:"pets-button",destinationName:"pet_book_window",interfaceName:"pet_book_window"}},[zv.ts.PlusMember]:{iconProvider:q=>"5a68a494-0005-4063-b9ac-826a6b005dad",onClick:()=>Xv.openWizardBank(),visibilityConditions:[zv.qe.PlusMember],buttonSize:zv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Kt.G)(ie.d).enabled?ws.B.WizardBank:"",saveClickInfo:Us.k.MemberHudButton}},[zv.ts.Rifts]:{iconProvider:q=>"7c85a67b-dd5f-441d-a988-63a9fc186f58",analyticsProperties:{buttonName:"rifts-button"}},[zv.ts.Settings]:{iconProvider:q=>"234ca838-35f1-49fe-82f2-bf382624537d",onClick:()=>dt.q.instance.prodigy.open.optionsMenu(),analyticsProperties:{buttonName:"options-button"}},[zv.ts.Shop]:{iconProvider:q=>"d4dc7070-8a0c-47ba-a2ad-36de33ab6531",onClick:()=>dt.q.instance.prodigy.open.dynamicStore({origin:{originType:wi.$N.ButtonClick,originId:"unifiedStore-button"}}),visibilityConditions:[zv.qe.NotHome],buttonSize:zv.Cy.ExtraLarge,analyticsProperties:{buttonName:"unifiedStore-button",destinationName:"unified_store_main"}},[zv.ts.StateChallenges]:{iconProvider:q=>"60c5cf92-41a2-41d9-bbff-93803d411c63",visibilityConditions:[zv.qe.ValidStateChallenge,zv.qe.StateChallengeActiveOrCanCollectRewards],onClick:()=>{dt.q.instance.prodigy.open.prefabMenu(Gt.l.StateChallengesMenu)},analyticsProperties:{buttonName:"state-challenges-button",destinationName:"prodigy_challenge"}},[zv.ts.TreasureTrack]:{iconProvider:q=>q===zv.yR.Liveops?"5164fbfe-17ee-4def-9157-678de69a623a":"aa6673a2-b225-4046-be6e-df593a578be9",onClick:()=>(0,Q.sH)(void 0,void 0,void 0,(function*(){const q=dt.q.instance.prodigy.open.battlePassMenu();yield q.onPrefabLoaded.asPromise()})),visibilityConditions:[zv.qe.NotHome],enabledConditions:[zv.qe.TreasureTrackUnlocked],analyticsProperties:{buttonName:"treasureTrackHud-button",destinationName:"treasure_track_main"}},[zv.ts.UltraMember]:{iconProvider:q=>"5991c63f-4d9b-459a-9cb6-317bff008268",visibilityConditions:[zv.qe.UltraMember],onClick:()=>Xv.openWizardBank(),buttonSize:zv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Kt.G)(ie.d).enabled?ws.B.WizardBank:"",saveClickInfo:Us.k.MemberHudButton}},[zv.ts.WizardDash]:{iconProvider:q=>"db3fe015-bc76-4737-8550-68bce8ec631c",onClick:()=>dt.q.instance.prodigy.open.lootDashMenu(),visibilityConditions:[zv.qe.NotHome,zv.qe.EnglishOnly],analyticsProperties:{buttonName:"wizardDashHud-button",destinationName:"wizard_dash_lobby"}},[zv.ts.WizardWatch]:{iconProvider:q=>"dea91059-3077-4589-9dcc-47b227862a7a",onClick:()=>{dt.q.instance.prodigy.open.socialFeed(void 0,"from-menu")},analyticsProperties:{buttonName:"feed-button"},visibilityConditions:[zv.qe.EnglishOnly],enabledConditions:[zv.qe.WizardWatchUnlocked]},[zv.ts.YourGoals]:{iconProvider:q=>q===zv.yR.Liveops?"922ac122-1c06-45c0-89e8-452b7474ca3a":"eb9a2046-45c3-4f78-a6ae-71df128c85ce",onClick:()=>(0,Q.sH)(void 0,void 0,void 0,(function*(){return Xv.openAndWait(dt.q.instance.prodigy.open.prefabMenu.bind(dt.q.instance.prodigy.open,Gt.l.FtuePlayerGoals))})),analyticsProperties:{buttonName:"player_goals"},visibilityConditions:[zv.qe.PlayerGoalsEnabled]},[zv.ts.YourMail]:{iconProvider:q=>"371de630-5798-45cf-a7c4-50a713c7f1a3",onClick:()=>{dt.q.instance.prodigy.open.mailer()},analyticsProperties:{buttonName:"mail-button"}},[zv.ts.WizardCostumes]:{iconProvider:q=>"",analyticsProperties:{buttonName:Us.k.CostumesHudButton,destinationName:ws.B.WizardCostumesMenu,saveClickInfo:Us.k.CostumesHudButton}}},(0,Q.Cg)([(0,Qi.b)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],ng,"_segment",void 0),(0,Q.Cg)([(0,Qi.b)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],ng,"_activePlayer",void 0);let ag=class extends X.uAl{constructor(){super(...arguments),this._hudButtons=[],this._currentHudButton=null}get hudButtons(){return this._hudButtons}get currentHudButton(){return this._currentHudButton}create(){super.create(),this._broadcaster=dt.q.instance.game.broadcaster,this._broadcaster.addAppListener(Xn.Y1.CheckForHUDAttention,this.checkIfNextHudButtonNeedsAttention,this)}destroy(){super.destroy(),this._broadcaster.removeAppListener(Xn.Y1.CheckForHUDAttention,this)}onEnable(){var q,K;super.onEnable(),this._currentHudButton=null,null!==(K=null===(q=this.gameObject)||void 0===q?void 0:q.isDestroyed)&&void 0!==K&&!K&&this.checkOnEnable()&&this.checkIfNextHudButtonNeedsAttention().catch(X.RQr.createHandler("Error showing HUD attention"))}checkOnEnable(){var q,K;if(null!==(K=null===(q=X.wa5.getActiveScene())||void 0===q?void 0:q.container.get("IS_PREFAB_MAP"))&&void 0!==K&&K)return this._popupManager.popupsProcessed;{const q=dt.q.instance.game.state.get(Nt.G.TileScreen);return null==q?void 0:q.popupsProcessed}}checkIfNextHudButtonNeedsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this.Active&&se.A.get("GameConstants.Debug.POPUPS_ENABLED")&&!dt.q.instance.prodigy.notifications.isPaused())try{let q;dt.q.instance.game.input.enabled=!1;for(const K of this._hudButtons){const[[z],Y]=yield Promise.all([ng.getButtonEnabledConditionsResult(K.hudButtonType()),K.needsAttention()]);if(z&&Y){if(this._currentHudButton&&this._currentHudButton===K)continue;q=K;break}}q&&(this._currentHudButton=q,yield q.highlightButton())}finally{dt.q.instance.game.input.enabled=!0}}))}};(0,Q.Cg)([(0,X.Cdj)("PopupHandler"),(0,Q.Sn)("design:type",ll.Y)],ag.prototype,"_popupManager",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(Yv),(0,Q.Sn)("design:type",Array)],ag.prototype,"_hudButtons",void 0),ag=(0,Q.Cg)([(0,X.EVk)("HudAttentionManagerHandler",et.Y.uiPopup)],ag);var rg=z(17740);let og=class extends Yv{constructor(){super(...arguments),this._hudButtonType=zv.ts.Festival}needsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=dt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig();if(this._currentFestival=dt.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival(),!q||!this._currentFestival)return!1;const K=this.checkIfFestivalAboutToEnd(this._currentFestival);return!this.hasCurrentFestivalBeenSeen(K)}))}highlightButton(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;null!==(K=this._festivalTravelModalEnabled)&&void 0!==K||(this._festivalTravelModalEnabled=(0,Kt.G)(rg.t)),this._festivalTravelModalEnabled&&dt.q.instance.prodigy.world.getCurrentZone()!==Yt.A_.LAMPLIGHT&&!this.hasCurrentFestivalBeenSeen()?(this.updateFestivalSeenFlag(),Rr.x.openTravelModal(wi.$N.HudClick)):(this.updateFestivalSeenFlag(),yield q())}))}checkIfFestivalAboutToEnd(q){if(!q)return!1;const K=Date.now();return new Date(q.endDate).getTime()-K<=1728e5}updateFestivalSeenFlag(){var q,K;if(!this._currentFestival)return;const z=dt.q.instance.prodigy.gameContainer.get("782-c308");null!==(q=(K=z.data).hudAttentionSeenFlags)&&void 0!==q||(K.hudAttentionSeenFlags={});const Y=this.checkIfFestivalAboutToEnd(this._currentFestival);z.data.hudAttentionSeenFlags[zv.ts.Festival]={identifier:Y?`${this._currentFestival.type}-expiring`:String(this._currentFestival.type)}}hasCurrentFestivalBeenSeen(q){var K;if(!this._currentFestival)return!1;const z=(null!==(K=dt.q.instance.prodigy.gameContainer.get("782-c308").data.hudAttentionSeenFlags)&&void 0!==K?K:{})[zv.ts.Festival];return!!X.Aq$.isDefined(null==z?void 0:z.identifier)&&(q?z.identifier===`${this._currentFestival.type}-expiring`:z.identifier===String(this._currentFestival.type))}destroy(){dt.q.instance.game.broadcaster.removeAppListener(Xn.bI.FtueCompleted,this),super.destroy()}};og=(0,Q.Cg)([(0,X.EVk)("HudFestival",et.Y.uiHudManager)],og);let hg=class extends Yv{constructor(){super(...arguments),this._hudButtonType=zv.ts.Pets}needsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){return dd.I.shouldShowPetGearTutorial()}))}highlightButton(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.game.broadcaster.addAppListener(Xn.bI.FtueCompleted,(()=>{}),this),dt.q.instance.game.broadcaster.broadcast(Xn.bI.ReceivedPetGear)}))}destroy(){dt.q.instance.game.broadcaster.removeAppListener(Xn.bI.FtueCompleted,this),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("OnHudLoadedSignal"),(0,Q.Sn)("design:type",iu.S)],hg.prototype,"_onHudLoaded",void 0),hg=(0,Q.Cg)([(0,X.EVk)("HudPetGearPopup",et.Y.uiHudManager)],hg);var cg,dg=z(50788),lg=z(11848),ug=z(215),fg=z(19690);!function(q){q.Image1="IMAGE_1",q.Image2="IMAGE_2",q.Image3="IMAGE_3",q.Image4="IMAGE_4",q.Image5="IMAGE_5"}(cg||(cg={}));const bg={[cg.Image1]:As.q.Pet_Merge_FTUE_New_Menu_slide1,[cg.Image2]:As.q.Pet_Merge_FTUE_New_Menu_slide2,[cg.Image3]:As.q.Pet_Merge_FTUE_New_Menu_slide3,[cg.Image4]:As.q.Pet_Merge_FTUE_New_Menu_slide4,[cg.Image5]:As.q.Pet_Merge_FTUE_New_Menu_slide5},pg={[cg.Image1]:As.q.Pet_Merge_FTUE_New_Menu_slide1,[cg.Image2]:As.q.Pet_Merge_FTUE_New_Menu_slide2merge2,[cg.Image3]:As.q.Pet_Merge_FTUE_New_Menu_slide3,[cg.Image4]:As.q.Pet_Merge_FTUE_New_Menu_slide4,[cg.Image5]:As.q.Pet_Merge_FTUE_New_Menu_slide5merge2};let vg=class extends Yv{constructor(){super(...arguments),this._hudButtonType=zv.ts.Pets}destroy(){this.removeAllListeners(),super.destroy()}needsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){return!this._breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_PET_MERGE,Es.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&(!!uo.P8.canPlayerAccessPetMergeFeature()&&lg.N.cacheCanShowPetMergeTutorial())}))}triggerAction(){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.game.broadcaster.addAppListener(Xn.ki.FtueCompleted,(()=>{this.removeAllListeners()}),this),this._breadcrumbManager.completeBreadcrumb(Es.B.FEATURE_PET_MERGE,Es.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),this._segmentAnalytics.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(ug.S4.TutorialUnlocked),yield lg.N.awardPetMergeFtueIngredients();const q=yield(0,fg.Ks)().loadWithDependenciesFromGUID(Gt.l.PetMergeFTUE);if((0,Kt.G)(Bh.m)){const K=(0,Kt.G)(dg.J),z=K?pg:bg,Y=Object.values(z),Q=Object.assign({PET_MERGE_2_ENABLED:K},z);yield dt.q.instance.prodigy.load.assetsAsPromise(Y).then((()=>{Ht.d.updateInjectedValues(q,Q)})).catch((q=>{X.VyI.log("Failed to load images on for the variant FTUE",X.$bb.Error)}))}q.transform.setPosition(dt.q.instance.game.width>>1,dt.q.instance.game.height>>1),q.setLayer(Xh.E.OverlayLayer,!0),X.wa5.getActiveScene().addGameObject(q)}))}highlightButton(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}removeAllListeners(){dt.q.instance.game.broadcaster.removeAppListener(Xn.ki.FtueCompleted,this)}};(0,Q.Cg)([(0,X.Cdj)("fa1-8ec9"),(0,Q.Sn)("design:type",fh.F)],vg.prototype,"_breadcrumbManager",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],vg.prototype,"_segmentAnalytics",void 0),vg=(0,Q.Cg)([(0,X.EVk)("HudPetMergePopup",et.Y.uiHudManager)],vg);var gg=z(24695);let mg=class extends Yv{constructor(){super(...arguments),this.WIDGET_ITEM_ATTENTION_COOLDOWN=se.s.DAY_IN_MS,this._hudButtonType=zv.ts.Shop,this._currentItem=void 0}needsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!(yield ng.areVisibilityConditionsTrue(zv.ts.Shop)))return!1;const q=yield this._dataProvider.getHudWidgetItems();for(const K of q)if(!this.hasShopItemBeenSeen(K))return this._currentItem=K,!0;return!1}))}highlightButton(){return(0,Q.sH)(this,void 0,void 0,(function*(){gh.A.isDefined(this._currentItem)&&(this.updateItemSeenFlag(this._currentItem),yield this.createWidget(this.getWidgetData(this._currentItem)))}))}getWidgetData(q){var K,z,Y,Q,X,Z,J,tt;const et=null!==(z=null===(K=q.metadata.hudWidgetData)||void 0===K?void 0:K.prefab)&&void 0!==z?z:Gt.l.BaseHUDWidget;let it={ORIGIN_ID:`shop-widget-${q.id}`,STORE_TO_OPEN:null===(Y=q.metadata.hudWidgetData)||void 0===Y?void 0:Y.storeKey,SECTION_TO_OPEN:q.metadata.category,TITLE_TEXT_KEY:null!==(X=null===(Q=q.metadata.hudWidgetData)||void 0===Q?void 0:Q.title)&&void 0!==X?X:q.metadata.displayName};if(et===Gt.l.FeaturedPetWidget){const K=null===(Z=q.onComplete)||void 0===Z?void 0:Z.find((q=>q.type===Dl.s.GOT_PET));let z=0,Y=In.EElementType.Physical;if(Array.isArray(null==K?void 0:K.data.itemDrops)&&K.data.itemDrops.length>0){z=K.data.itemDrops[0].ID;const q=ae.t.getItem("pet",z);gh.A.isDefined(q)&&(Y=uo.P8.getElementType(q))}it=Object.assign(Object.assign({},it),{TITLE_TEXT_KEY:null!==(tt=null===(J=q.metadata.hudWidgetData)||void 0===J?void 0:J.title)&&void 0!==tt?tt:"PET_OF_THE_WEEK",BACKGROUND_IMAGE_GUID:gg.N.ELEMENT_TO_WIDGET_BG_MAP[Y],PET_SPINE_GUID:z})}return{prefab:et,injectionData:it}}hudButtonType(){return this._hudButtonType}triggerAction(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;gh.A.isDefined(this._currentItem)?yield dt.q.instance.prodigy.open.dynamicStoreAsync({storeKey:null===(K=this._currentItem.metadata.hudWidgetData)||void 0===K?void 0:K.storeKey,scrollToSection:this._currentItem.metadata.category,origin:{originType:wi.$N.ButtonClick,originId:Us.k.UnifiedStore}}):yield q()}))}hasShopItemBeenSeen(q){var K,z;const Y=(null!==(K=this._activePlayer.data.hudAttentionSeenFlags)&&void 0!==K?K:{})[zv.ts.Shop];if(!gh.A.isDefined(Y))return!1;const Q=null===(z=Y.flags)||void 0===z?void 0:z.find((K=>K.identifier===q.id));return!!gh.A.isDefined(Q)&&!(gh.A.isDefined(Q.cooldownTimestamp)&&Q.cooldownTimestamp<=Date.now())}updateItemSeenFlag(q){var K,z,Y,Q,X;null!==(K=(X=this._activePlayer.data).hudAttentionSeenFlags)&&void 0!==K||(X.hudAttentionSeenFlags={});const Z=this._activePlayer.data.hudAttentionSeenFlags[zv.ts.Shop],J=null!==(z=null==Z?void 0:Z.flags)&&void 0!==z?z:[],tt=J.findIndex((K=>K.identifier===q.id)),et={identifier:q.id,cooldownTimestamp:Date.now()+(null!==(Q=null===(Y=q.metadata.hudWidgetData)||void 0===Y?void 0:Y.cooldown)&&void 0!==Q?Q:this.WIDGET_ITEM_ATTENTION_COOLDOWN)};tt>=0?J[tt]=et:J.push(et),this._activePlayer.data.hudAttentionSeenFlags[zv.ts.Shop]={identifier:zv.ts.Shop,flags:J}}};var yg;(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],mg.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("7a9-ac2f"),(0,Q.Sn)("design:type",Td.I)],mg.prototype,"_dataProvider",void 0),mg=(0,Q.Cg)([(0,X.EVk)("HudShop",et.Y.uiHudManager)],mg);let _g=yg=class extends Yv{constructor(){super(...arguments),this._hudButtonType=zv.ts.StateChallenges}needsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=dt.q.instance.prodigy.gameContainer.get("d00-c550"),z=dt.q.instance.prodigy.gameContainer.get("394-6aa1");yield K.initialize();if(!(yield z.isFeatureAvailable()))return!1;const Y=this.checkIfStateChallengeAboutToEnd();if(!this.hasCurrentStateChallengeBeenSeen(Y))return!0;const Q=(null!==(q=dt.q.instance.prodigy.gameContainer.get("782-c308").data.hudAttentionSeenFlags)&&void 0!==q?q:{})[zv.ts.StateChallenges],X=Date.now();return!!((null==Q?void 0:Q.cooldownTimestamp)&&X>=Q.cooldownTimestamp&&(yield this.hasPendingReward()))}))}hasCurrentStateChallengeBeenSeen(q){var K;const z=(null!==(K=dt.q.instance.prodigy.gameContainer.get("782-c308").data.hudAttentionSeenFlags)&&void 0!==K?K:{})[zv.ts.StateChallenges];if(!X.Aq$.isDefined(null==z?void 0:z.identifier))return!1;const Y=Date.now(),Q=new Date(Y).getMonth()+1;return q?z.identifier===`${Q}-expiring`:z.identifier===Q}hasPendingReward(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=dt.q.instance.prodigy.gameContainer.get("d00-c550"),K=(0,tf.$)(q.viewableCompetitionPhase);if(!K)return!1;const z=dt.q.instance.prodigy.gameContainer.get("476-a586");yield z.getQuestTasks(K);const Y=yield Ku.b.getData();return!!Y&&Y[qu.V.HasMilestoneRewardReady]}))}highlightButton(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this.updateStateChallengeSeenFlag(),yield q()}))}checkIfStateChallengeAboutToEnd(){const q=Date.now(),K=new Date(q);return new Date(K.getFullYear(),K.getMonth()+1,0,23,59,59,999).getTime()-q<=1728e5}updateStateChallengeSeenFlag(){var q,K;const z=dt.q.instance.prodigy.gameContainer.get("782-c308");null!==(q=(K=z.data).hudAttentionSeenFlags)&&void 0!==q||(K.hudAttentionSeenFlags={});const Y=this.checkIfStateChallengeAboutToEnd(),Q=Date.now(),X=new Date(Q).getMonth()+1;z.data.hudAttentionSeenFlags[zv.ts.StateChallenges]={identifier:Y?`${X}-expiring`:X,cooldownTimestamp:Date.now()+yg.STATE_CHALLENGE_REWARD_NOTIFICATION_COOLDOWN}}destroy(){dt.q.instance.game.broadcaster.removeAppListener(Xn.bI.FtueCompleted,this),super.destroy()}};_g.STATE_CHALLENGE_REWARD_NOTIFICATION_COOLDOWN=864e5,_g=yg=(0,Q.Cg)([(0,X.EVk)("HudStateChallenge",et.Y.uiHudManager)],_g);let Eg=class extends Yv{constructor(){super(...arguments),this._hudButtonType=zv.ts.TreasureTrack}destroy(){this._battlePassDataPromise&&(this._battlePassDataPromise.cancel(),this._battlePassDataPromise=void 0),super.destroy()}needsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=this._loggedInPlayer.player;if(!K.hasCompletedTutorial()||K.tutorialCompletedThisSession)return!1;this._battlePassDataPromise=new X.kBN(((q,K)=>{this._battlePassQuestManager.getCurrentBattlePassData().then(q).catch(K)}));const z=yield this._battlePassDataPromise;return!1===(null===(q=null==z?void 0:z.getFtueTask())||void 0===q?void 0:q.isCompleted)}))}highlightButton(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield dt.q.instance.prodigy.open.battlePassFtue()}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Eg.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],Eg.prototype,"_battlePassQuestManager",void 0),Eg=(0,Q.Cg)([(0,X.EVk)("HudTreasureTrack",et.Y.uiHudManager)],Eg);var wg=z(19609),Tg=z(45385),Sg=z(72799);let Ag=class extends Yv{create(){super.create(),this._root.active=!1,this._renderPlayerAsTexture.onRenderComplete.addOnce((()=>{this._root.active=!0})),this._activePlayer.onEquipmentChange.add(this.updateAvatarAppearance,this),dt.q.instance.game.broadcaster.addAppListener(Xn.ig.AnyLevelUp,this.updateWizardLevelText,this),this._wizardCostumesDataProvider.onCostumeDataChanged.add(this.updateNotificationBadge,this),this.updateNotificationBadge(),this.updateWizardLevelText()}updateNotificationBadge(){const q=this._wizardCostumesDataProvider.getUnseenCostumeIds().length;this._notificationBadge.updateNumberedNotificationBadge(q>0,q)}updateWizardLevelText(){this._levelText.text=this._activePlayer.getLevel().toString()}updateAvatarAppearance(){this._renderPlayerAsTexture.renderPlayerAsTexture()}needsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){return!(this._activePlayer.getLevel()0||wg.hD.shouldShowFtue())}))}highlightButton(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.animate()}))}hudButtonType(){return zv.ts.WizardCostumes}triggerAction(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this._segment.featureCommon.sendButtonEvent({buttonName:Us.k.CostumesHudButton,interfaceName:ws.B.HUD,interfaceType:wi.Wm.HUD,destinationName:ws.B.WizardCostumesMenu,saveClickInfo:Us.k.CostumesHudButton}),dt.q.instance.prodigy.open.openWizardCostumesMenu(wi.$N.ButtonClick,Us.k.CostumesHudButton),dt.q.instance.game.broadcaster.broadcast(Xn.Y1.CheckForHUDAttention)}))}destroy(){this._wizardCostumesDataProvider.onCostumeDataChanged.removeAll(this),this._activePlayer.onEquipmentChange.removeAll(this),dt.q.instance.game.broadcaster.removeAppListener(Xn.ig.AnyLevelUp,this),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],Ag.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],Ag.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.Cdj)("230-ffdb"),(0,Q.Sn)("design:type",op.W)],Ag.prototype,"_wizardCostumesDataProvider",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Ag.prototype,"_root",void 0),(0,Q.Cg)([(0,X.MnK)(Tg.e),(0,Q.Sn)("design:type",Tg.e)],Ag.prototype,"_notificationBadge",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ag.prototype,"_levelText",void 0),(0,Q.Cg)([(0,X.MnK)(Sg.M),(0,Q.Sn)("design:type",Sg.M)],Ag.prototype,"_renderPlayerAsTexture",void 0),Ag=(0,Q.Cg)([(0,X.EVk)("HudWizardCostumes",et.Y.uiHudManager)],Ag);var Cg=z(21738);let Og=class extends X.uAl{constructor(){super(...arguments),this.prefabIsOnStack=new X.HN0,this.prefabIsNotOnStack=new X.HN0}destroy(){this.prefabIsOnStack.dispose(),this.prefabIsNotOnStack.dispose(),super.destroy()}menuStackCloseAll(){dt.q.instance.prodigy.open.menuCloseAll()}isPrefabMenuOnStack(q){const K=dt.q.instance.prodigy.open.menus;for(const z of K)if(z instanceof Cg.y&&z.prefabID===q)return void this.prefabIsOnStack.dispatch();this.prefabIsNotOnStack.dispatch()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Og.prototype,"prefabIsOnStack",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Og.prototype,"prefabIsNotOnStack",void 0),Og=(0,Q.Cg)([(0,X.EVk)("MenuStackManager",X.YH6.ui)],Og);let Ig=class extends X.uAl{constructor(){super(...arguments),this._modalFilters=null,this._modalRenderTexture=null,this._isBlurred=!1}create(){this._background=X.wa5.getActiveScene().getLayer(Xh.E.BackgroundLayer),this._content=X.wa5.getActiveScene().getLayer(Xh.E.ContentLayer),this._foreground=X.wa5.getActiveScene().getLayer(Xh.E.ForegroundLayer),this._gameRenderCache=new X._mx,this._gameRenderCache.name=Xh.E.GameRenderCacheLayer,this._gameRenderCacheBaseRenderer=this._gameRenderCache.addComponent(X.jsv)}blur(){this.bitmapCacheContainer(!0)}unBlur(){this.bitmapCacheContainer(!1)}fadeOutCachedContainer(q){if(!this._gameRenderCacheBaseRenderer.getRootContainer().visible)return;dt.q.instance.game.add.tween(this._gameRenderCache,this).to({alpha:0},100,X.GS3.Quadratic.Out).start().onTweenComplete.add(this.clearAndResetCachedContainer.bind(this,q))}clearAndResetCachedContainer(q){q.filters=null,q.visible=!1,q.removeChildren()}setUpModalTransition(q){this.clearAndResetCachedContainer(q);const K=dt.q.instance.game.renderer;if(null===this._modalFilters){const q=new Ze.filters.BlurFilter;this._modalFilters=[q]}const z=Ze.RenderTexture.create({width:dt.q.instance.game.width,height:dt.q.instance.game.height});null===this._modalRenderTexture&&(this._modalRenderTexture=Ze.RenderTexture.create({width:dt.q.instance.game.width,height:dt.q.instance.game.height}));const Y={renderTexture:z,clear:!0,transform:void 0,skipUpdateTransform:!1},Q=Object.assign(Object.assign({},Y),{clear:!1}),X=Object.assign(Object.assign({},Y),{renderTexture:this._modalRenderTexture});K.render(this._background,Y),K.render(this._content,Q),K.render(this._foreground,Q);const Z=new Ze.Container;Z.addChild(new Ze.Sprite(z)),Z.filters=this._modalFilters,K.render(Z,X),Z.destroy(),q.addChild(new Ze.Sprite(this._modalRenderTexture)),q.alpha=1,q.visible=!0}bitmapCacheContainer(q){const K=this._gameRenderCacheBaseRenderer.getRootContainer();q?this.setUpModalTransition(K):this.fadeOutCachedContainer(K),this.setLayerVisibility(!q)}setLayerVisibility(q){this._background.visible=q,this._content.visible=q,this._foreground.visible=q,this._hudGameObject.active=q,this._isBlurred=!q}destroy(){var q;super.destroy(),this._isBlurred&&(this.clearAndResetCachedContainer(this._gameRenderCacheBaseRenderer.getRootContainer()),this.setLayerVisibility(!0)),dt.q.instance.game.tweens.removeAllFromOwner(this),this._gameRenderCache.destroy(),this._modalFilters&&(this._modalFilters.length=0),null===(q=this._modalRenderTexture)||void 0===q||q.destroy()}};(0,Q.Cg)([(0,X.Cdj)(zv.uR.HudGameObject),(0,Q.Sn)("design:type",X._mx)],Ig.prototype,"_hudGameObject",void 0),Ig=(0,Q.Cg)([(0,X.EVk)("ModalPopupBlurController",et.Y.uiPopup)],Ig);var Dg=z(60155);let Rg=class extends X.uAl{constructor(){super(...arguments),this._currentPopup=null}create(){super.create(),this.shouldShowPopupButton()?(dt.q.instance.prodigy.load.assets([Gt.l.MoreMagicAtHomePopup]),this._button.active=!0):this._button.active=!1}openPopup(){if(this._currentPopup)return;this._button.active=!1,this._currentPopup=dt.q.instance.prodigy.open.prefabMenu(Gt.l.MoreMagicAtHomePopup,(()=>{this._button.active=!0,this._currentPopup=null}),!1,!0,!1)}closePopup(){this._currentPopup&&(this._currentPopup.close(),this._currentPopup=null)}shouldShowPopupButton(){return this._battleController.hasMpOverrides&&re.J.isDateWithinSchoolDayAndHours()}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Rg.prototype,"_button",void 0),(0,Q.Cg)([(0,X.Cdj)("BattleController"),(0,Q.Sn)("design:type",Dg.V)],Rg.prototype,"_battleController",void 0),Rg=(0,Q.Cg)([(0,X.EVk)("MoreMagicAtHomePopupController",et.Y.uiPopup)],Rg);let Pg=class extends Tf.l{constructor(){super(...arguments),this._notificationAtlas=ti._.Ui_social_feed_json,this._notificationSfx=Ai.c.Sfx_toaster_open}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._achievementData=dt.q.instance.prodigy.achievements.updateAchievementsCompletion(),this._achievementData.length>0}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),this._achievementData||(this._achievementData=dt.q.instance.prodigy.achievements.updateAchievementsCompletion()),this.onClose.dispatch();for(const q of this._achievementData)this._loggedInPlayer.player.achievements.complete(q.ID)}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Pg.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Pg.prototype,"_notificationAtlas",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Pg.prototype,"_notificationSfx",void 0),Pg=(0,Q.Cg)([(0,X.EVk)("OpenAchievementToasters",et.Y.uiPopup)],Pg);let Mg=class extends Tf.l{destroy(){this._battlePassDataPromise&&(this._battlePassDataPromise.cancel(),this._battlePassDataPromise=void 0),super.destroy()}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=this._loggedInPlayer.player;if(!(yield Dn.n.hasBattlePassAccess()))return!1;if(!K.hasCompletedTutorial()||K.tutorialCompletedThisSession)return!1;this._battlePassDataPromise=new X.kBN(((q,K)=>{this._battlePassQuestManager.getCurrentBattlePassData().then(q).catch(K)}));const z=yield this._battlePassDataPromise;return!1===(null===(q=null==z?void 0:z.getFtueTask())||void 0===q?void 0:q.isCompleted)}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),yield dt.q.instance.prodigy.open.battlePassFtue((()=>{this.onClose.dispatch()}))}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Mg.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("9a2-c1c3"),(0,Q.Sn)("design:type",ys.R)],Mg.prototype,"_battlePassQuestManager",void 0),Mg=(0,Q.Cg)([(0,X.EVk)("OpenBattlePassFtuePopup",et.Y.uiDialog)],Mg);z(46361);let Ng=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;const z=null!==(K=null===(q=this._loggedInPlayer.player.data)||void 0===q?void 0:q.zone)&&void 0!==K?K:"";return Bn.J.canShowNarrativeIntro(z)}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),dt.q.instance.prodigy.world.it("lamplight-B3")}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Ng.prototype,"_loggedInPlayer",void 0),Ng=(0,Q.Cg)([(0,X.EVk)("OpenCampaignNarrativePopup",et.Y.uiPopup)],Ng);let xg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._chargedLevelsProgressManager.shouldShowConversionModal}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),this._chargedLevelsProgressManager.showChargedLevelsConversionModal((()=>{this.onClose.dispatch()}))}))}};(0,Q.Cg)([(0,X.Cdj)("c5a-49f2"),(0,Q.Sn)("design:type",Kn.g)],xg.prototype,"_chargedLevelsProgressManager",void 0),xg=(0,Q.Cg)([(0,X.EVk)("OpenChargedLevelConversionModalPopup",et.Y.uiPopup)],xg);let Lg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._chargedLevelsProgressManager.shouldShowDecayImmunityModal}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),this._chargedLevelsProgressManager.showChargedLevelsDecayImmunityModal((()=>{this.onClose.dispatch()}))}))}};(0,Q.Cg)([(0,X.Cdj)("c5a-49f2"),(0,Q.Sn)("design:type",Kn.g)],Lg.prototype,"_chargedLevelsProgressManager",void 0),Lg=(0,Q.Cg)([(0,X.EVk)("OpenChargedLevelsDecayImmunityModalPopup",et.Y.uiPopup)],Lg);let kg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=aa.s.baseLevelRequiredForChargedLevels;return this._loggedInPlayer.getLevel()>=q&&this._chargedLevelsProgressManager.shouldShowRetention}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),this._chargedLevelsProgressManager.showChargedLevelsRetentionModal((()=>{this.onClose.dispatch()}))}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],kg.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("c5a-49f2"),(0,Q.Sn)("design:type",Kn.g)],kg.prototype,"_chargedLevelsProgressManager",void 0),kg=(0,Q.Cg)([(0,X.EVk)("OpenChargedLevelsRetentionPopup",et.Y.uiPopup)],kg);let Bg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return yr.M.canAutoSurfaceDailyLoginCalendar()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),dt.q.instance.prodigy.open.dailyLoginCalendar().then((()=>{this.onClose.dispatch()})).catch(X.RQr.createHandler("Failed to open Daily Login Calendar popup"))}))}};Bg=(0,Q.Cg)([(0,X.EVk)("OpenDailyLoginCalendarPopup",et.Y.uiPopup)],Bg);var Ug=z(75781);let Fg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return th.U.progressData.step===Jo.B.NotStarted&&this._loggedInPlayer.player.hasFoundAllKeystones()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),Ug.E.runAllKeystonesSequenceOnMapSetup((()=>(0,Q.sH)(this,void 0,void 0,(function*(){this.onClose.dispatch()}))))}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Fg.prototype,"_loggedInPlayer",void 0),Fg=(0,Q.Cg)([(0,X.EVk)("OpenEndGameKeystonesSequence",et.Y.uiPopup)],Fg);let Gg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return Bn.J.shouldShowExpertModeUnlockedPopup()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),Bn.J.showDifficultyUnlockedPopup(Te.i.Expert,(()=>{this.onClose.dispatch()}))}))}};Gg=(0,Q.Cg)([(0,X.EVk)("OpenExpertModeUnlockPopup",et.Y.uiPopup)],Gg);let jg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=dt.q.instance.prodigy.gameContainer.get("c21-1a3f"),K=q.shouldAutoSurfaceSegmentedOffers()&&q.userHasLastChance();return q.userHasEligibleOfferAvailable()&&K}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K;yield q.open.call(this);const z=dt.q.instance.prodigy.gameContainer,Y=z.get("c21-1a3f");z.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:null===(K=Y.activeOffer)||void 0===K?void 0:K.id,funnelType:"segmented_offers",stepName:lh.l.SegmentedOffersGotExpired},{step_index:5}),Ou.P.openConfiguredModal((()=>{this.onClose.dispatch()}))}))}};jg=(0,Q.Cg)([(0,X.EVk)("OpenExpiringSegmentOffers",et.Y.uiPopup)],jg);let $g=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return gg.N.shouldShowFeaturedPetPopup()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),gg.N.openFeaturedPetPopup((()=>{this.onClose.dispatch()}))}))}};$g=(0,Q.Cg)([(0,X.EVk)("OpenFeaturedPetPopupComponent",et.Y.uiPopup)],$g);let Hg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return!!this._loggedInPlayer.player.hasCompletedTutorial()&&Rr.x.shouldShowCurrencyDrainPopup(yl.L.CurrencyDrainPopup)}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),Rr.x.openCurrencyDrainModal(wi.$N.AutoSurfaced,(()=>{this.onClose.dispatch()}))}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Hg.prototype,"_loggedInPlayer",void 0),Hg=(0,Q.Cg)([(0,X.EVk)("OpenFestivalCurrencyDrainPopup",et.Y.uiPopup)],Hg);let Vg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return Bn.J.shouldShowHardModeUnlockedPopup()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),Bn.J.showDifficultyUnlockedPopup(Te.i.Hard,(()=>{this.onClose.dispatch()}))}))}};Vg=(0,Q.Cg)([(0,X.EVk)("OpenHardModeUnlockPopup",et.Y.uiPopup)],Vg);var Wg=z(40392);let qg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=Bn.J.shouldShowWorldMapHardModeFtue(),K=Bn.J.hasStartedHardModeFirstEntryDialogueButNeverCompleted();return q||K}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this);const K=dt.q.instance.prodigy.open.map({disableClose:!0,onClose:()=>this.onClose.dispatch()});Bn.J.hasStartedHardModeFirstEntryDialogueButNeverCompleted()&&K.onCreate.addOnce((()=>{Wg.i.setDifficultyMode(Te.i.Hard)}))}))}};qg=(0,Q.Cg)([(0,X.EVk)("OpenHardModeWorldmapFTUE",et.Y.uiPopup)],qg);var Kg=z(34612);let zg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return Kg.F.shouldShowLinearCampaignZoneLockTransition()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),Kg.F.activateLinearCampaignTransitionCutscene(),dt.q.instance.game.broadcaster.addAppListener(Xn.n8.WorldMapZoneSelected,(()=>this.onClose.dispatch()),this)}))}};zg=(0,Q.Cg)([(0,X.EVk)("OpenLinearCampaignTransitionPopup",et.Y.uiPopup)],zg);var Yg=z(51477);let Qg=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=this._game.state.getCurrentState(),z=dt.q.instance.prodigy.gameContainer.get("c21-1a3f"),Y=(null===(q=null==K?void 0:K.screenData)||void 0===q?void 0:q.battleResult)===ki.XK.Defeat&&!z.userHasSeenFirstOffer();return z.userHasEligibleOfferAvailable()&&Y}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this);const K=dt.q.instance.prodigy.gameContainer.get("c21-1a3f");Ou.P.openConfiguredModal((()=>{K.setBreadcrumbHasSeenFirstBattleLost(),this.onClose.dispatch()}))}))}};(0,Q.Cg)([(0,X.Cdj)("d73-66e9"),(0,Q.Sn)("design:type",Yg.n)],Qg.prototype,"_game",void 0),Qg=(0,Q.Cg)([(0,X.EVk)("OpenLostBattleSegmentOffers",et.Y.uiPopup)],Qg);var Xg=z(64868);let Zg=class extends Tf.l{constructor(){super(...arguments),this._filteredOffers=[],this._resetTime=void 0}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y,Q,X,Z;if(Xg._.isFeatureEnabled()){const J=this._game.state.getCurrentState(),tt=dt.q.instance.prodigy.gameContainer,et=null!==(K=null===(q=null==J?void 0:J.screenData)||void 0===q?void 0:q.battleResult)&&void 0!==K&&K,it=null!==(Y=null===(z=null==J?void 0:J.screenData)||void 0===z?void 0:z.didRiftBattle)&&void 0!==Y&&Y;if(et||it){const q=tt.get("14f-4faa"),{sessionBattles:K}=yield q.getBattleStats(),z=this._loggedInPlayer.player.isPlayingAtSchool(),Y=null!==(Z=null===(X=null===(Q=Xg._.getVariables())||void 0===Q?void 0:Q.defeatedPetStore)||void 0===X?void 0:X.battlesToPrompt)&&void 0!==Z?Z:3,J=K.length%Y==0,et=0!==K.length&&K[K.length-1].battleType===ki.gu.NormalRiftRun;if(z||J||et){const q=tt.get("668-8a41"),{resetTime:K,defeatedPetOffers:z}=yield q.updateDefeatedPetOffers();if(this._resetTime=K,this._filteredOffers=[...z].filter((q=>q.progress.status===Ar.t.IN_PROGRESS)),this._filteredOffers.length>0)return!0}}}return!1}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),dt.q.instance.prodigy.open.prefabMenu(Gt.l.LostPetModal,(()=>{this.onClose.dispatch()}),!0,!0,!1,{LOST_PETS_OFFER_DATA:this._filteredOffers,LOST_PETS_RESET_TIME:this._resetTime})}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Zg.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("d73-66e9"),(0,Q.Sn)("design:type",Yg.n)],Zg.prototype,"_game",void 0),Zg=(0,Q.Cg)([(0,X.EVk)("OpenLostPetsModalPopup",et.Y.uiPopup)],Zg);var Jg=z(88059),tm=z(75172),em=z(24047);let im=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!(0,Kt.G)(Jg.s).enabled)return!1;return!dt.q.instance.prodigy.gameContainer.get("fa1-8ec9").isBreadcrumbComplete(Es.B.FEATURE_MAGICOIN_BATTLE_REWARDS,Es.B.BREADCRUMB_MAGICOIN_BATTLE_REWARDS_MODAL_SEEN)}))}open(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=dt.q.instance.prodigy;q.gameContainer.get("fa1-8ec9").completeBreadcrumb(Es.B.FEATURE_MAGICOIN_BATTLE_REWARDS,Es.B.BREADCRUMB_MAGICOIN_BATTLE_REWARDS_MODAL_SEEN),q.gameContainer.get("20f-5f67").funnel.sendStep(em.F.MagicoinBattleRewardsIntro,"feature",tm.T.IntroModalShown,tm.h.IntroModalShown),q.open.prefabMenu({prefabID:Gt.l.MagicoinBattleRewardsModal,interfaceEventProps:{interfaceName:ws.B.PostBattleFlowMagicoinIntro,interfaceType:wi.Wm.Modal,instanceType:Ti.N.Interface,originType:wi.$N.AutoSurfaced},sendEvents:!0,sendCloseEvent:!1,closeCallback:()=>{this.onClose.dispatch()}})}))}};im=(0,Q.Cg)([(0,X.EVk)("OpenMagicoinBattleRewardsModalPopup",et.Y.uiPopup)],im);let sm=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._loggedInPlayer.player,K=q.hasMembership();return!(!q.hasCompletedTutorial()&&q.memberPrompt)&&(!(!K&&re.J.isSchoolHours()||K&&q.backpack.hasItem("mount",1)>0)&&(!(q.isPlayingAtSchool()||!q.hasUnclaimedMembershipRewards())&&(q.seenMapTransitionPromptThisSession=!0,zs.P.shouldUseUnifiedConversionFlow(un.o.FunnelTransitMap))))}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),dt.q.instance.prodigy.open.unifiedConversionFlow((()=>{this.onClose.dispatch()}),{conversionFunnelName:un.o.FunnelTransitMap,conversionStage:un.o.StageTransitMap},wi.$N.AutoSurfaced)}))}};(0,Q.Cg)([(0,X.Cdj)("d73-66e9"),(0,Q.Sn)("design:type",Yg.n)],sm.prototype,"_game",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],sm.prototype,"_loggedInPlayer",void 0),sm=(0,Q.Cg)([(0,X.EVk)("OpenMapTransitionAdPopup",et.Y.uiPopup)],sm);var nm=z(26691);let am=class extends X.uAl{constructor(){super(...arguments),this._onYes=new X.HN0,this._onNo=new X.HN0,this._yesOnly=!1}run(){dt.q.instance.prodigy.open.messageBoxPrefab({text:this.messageKey,buttonState:this._yesOnly?nm.D.OkayButton:nm.D.YesNoButtons,confirmCallback:()=>{this._onYes.dispatch()},noCallback:this._yesOnly?void 0:()=>{this._onNo.dispatch()}})}destroy(){this._onYes.dispose(),this._onNo.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],am.prototype,"messageKey",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],am.prototype,"_onYes",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],am.prototype,"_onNo",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],am.prototype,"_yesOnly",void 0),am=(0,Q.Cg)([(0,X.EVk)("OpenMessageBox",et.Y.uiDialog)],am);let rm=class extends Tf.l{create(){super.create(),this._otpService=dt.q.instance.prodigy.gameContainer.get("2f0-c49e"),this._openOnCreate&&this.canOpen().then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){q&&(yield this.open())})))).catch(X.RQr.createHandler("Error opening OPT Unclaimed popup"))}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._otpService.hasUncollectedTransactions}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),this._otpService.acknowledgeUncollectedTransactions().catch(X.RQr.createHandler("Error opening OPT Unclaimed popup"))}))}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],rm.prototype,"_openOnCreate",void 0),rm=(0,Q.Cg)([(0,X.EVk)("OpenOTPUnclaimedPopup",et.Y.uiDialog)],rm);var om=z(32073);let hm=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;return X.Aq$.isDefined(this._quickQuizManager.currentQuickQuizId)||(null===(q=this._quickQuizManager)||void 0===q?void 0:q.waitingToTransport)&&om.v.canBeTransportedToQuickQuiz({skipPendingLoadCheck:!0}).canBeTransported}))}close(){this.onClose.dispatch()}open(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;null===(q=this._quickQuizManager)||void 0===q||q.onQuickQuizExitFlowComplete.addOnce((()=>{this.close()}))}))}};(0,Q.Cg)([(0,X.Cdj)("7f4-4464"),(0,Q.Sn)("design:type",Jh.w)],hm.prototype,"_quickQuizManager",void 0),hm=(0,Q.Cg)([(0,X.EVk)("OpenPendingQuickQuiz",et.Y.uiDialog)],hm);let cm=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return dd.I.shouldShowPetGearTutorial()}))}open(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(X.Aq$.isDefined(this._onHudLoaded)){if(0===this._onHudLoaded.dispatchCount)try{yield this.waitForHud()}catch(q){return void X.VyI.log("OpenPetGearPopupComponent: Error waiting for HUD to load, skipping FTUE popup.",X.$bb.Error)}dt.q.instance.game.broadcaster.addAppListener(Xn.bI.FtueCompleted,(()=>{this.onClose.dispatch()}),this),dt.q.instance.game.broadcaster.broadcast(Xn.bI.ReceivedPetGear)}else X.VyI.log("OpenPetGearPopupComponent: No HUD loaded signal defined, skipping FTUE popup.",X.$bb.Error)}))}waitForHud(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!X.Aq$.isDefined(this._onHudLoaded))throw new Error("OpenPetGearPopupComponent: No HUD loaded signal defined, skipping FTUE popup.");const q=this._onHudLoaded.onDispatch.asPromise(),K=X.Egh.timeout(5e3).then((()=>{throw X.VyI.log("OpenPetGearPopupComponent: Hud load timed out, skipping FTUE popup.",X.$bb.Error),new Error("HUD load timeout")}));yield Promise.race([q,K])}))}destroy(){dt.q.instance.game.broadcaster.removeAppListener(Xn.bI.FtueCompleted,this),super.destroy()}};var dm;(0,Q.Cg)([(0,X.Cdj)("OnHudLoadedSignal"),(0,Q.Sn)("design:type",iu.S)],cm.prototype,"_onHudLoaded",void 0),cm=(0,Q.Cg)([(0,X.EVk)("OpenPetGearPopup",et.Y.uiDialog)],cm),function(q){q.Image1="IMAGE_1",q.Image2="IMAGE_2",q.Image3="IMAGE_3",q.Image4="IMAGE_4",q.Image5="IMAGE_5"}(dm||(dm={}));const lm={[dm.Image1]:As.q.Pet_Merge_FTUE_New_Menu_slide1,[dm.Image2]:As.q.Pet_Merge_FTUE_New_Menu_slide2,[dm.Image3]:As.q.Pet_Merge_FTUE_New_Menu_slide3,[dm.Image4]:As.q.Pet_Merge_FTUE_New_Menu_slide4,[dm.Image5]:As.q.Pet_Merge_FTUE_New_Menu_slide5},um={[dm.Image1]:As.q.Pet_Merge_FTUE_New_Menu_slide1,[dm.Image2]:As.q.Pet_Merge_FTUE_New_Menu_slide2merge2,[dm.Image3]:As.q.Pet_Merge_FTUE_New_Menu_slide3,[dm.Image4]:As.q.Pet_Merge_FTUE_New_Menu_slide4,[dm.Image5]:As.q.Pet_Merge_FTUE_New_Menu_slide5merge2};let fm=class extends Tf.l{constructor(){super(...arguments),this._checkIfLoadedOnPrefabMap=!1}create(){if(super.create(),this._openOnCreate){if(this._checkIfLoadedOnPrefabMap&&X.Aq$.isDefined(this._popupManager))return;this.canOpen().then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){q&&(yield this.open())})))).catch(X.RQr.createHandler("Error opening pet merge FTUE popup"))}}destroy(){this.removeAllListeners(),super.destroy()}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return!this._breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_PET_MERGE,Es.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&(!!uo.P8.canPlayerAccessPetMergeFeature()&&lg.N.cacheCanShowPetMergeTutorial())}))}open(){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.game.broadcaster.addAppListener(Xn.ki.FtueCompleted,(()=>{this.removeAllListeners(),this.onClose.dispatch()}),this),this._breadcrumbManager.completeBreadcrumb(Es.B.FEATURE_PET_MERGE,Es.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),this._segmentAnalytics.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(ug.S4.TutorialUnlocked),yield lg.N.awardPetMergeFtueIngredients();const q=yield(0,fg.Ks)().loadWithDependenciesFromGUID(Gt.l.PetMergeFTUE);if((0,Kt.G)(Bh.m)){const K=(0,Kt.G)(dg.J),z=K?um:lm,Y=Object.values(z),Q=Object.assign({PET_MERGE_2_ENABLED:K},z);yield dt.q.instance.prodigy.load.assetsAsPromise(Y).then((()=>{Ht.d.updateInjectedValues(q,Q)})).catch((q=>{X.VyI.log("Failed to load images on for the variant FTUE",X.$bb.Error)}))}q.transform.setPosition(dt.q.instance.game.width>>1,dt.q.instance.game.height>>1),q.setLayer(Xh.E.OverlayLayer,!0),X.wa5.getActiveScene().addGameObject(q)}))}removeAllListeners(){dt.q.instance.game.broadcaster.removeAppListener(Xn.ki.FtueCompleted,this)}};(0,Q.Cg)([(0,X.Cdj)("PopupHandler"),(0,Q.Sn)("design:type",ll.Y)],fm.prototype,"_popupManager",void 0),(0,Q.Cg)([(0,X.Cdj)("fa1-8ec9"),(0,Q.Sn)("design:type",fh.F)],fm.prototype,"_breadcrumbManager",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],fm.prototype,"_segmentAnalytics",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],fm.prototype,"_openOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],fm.prototype,"_checkIfLoadedOnPrefabMap",void 0),fm=(0,Q.Cg)([(0,X.EVk)("OpenPetMergePopup",et.Y.uiDialog)],fm);let bm=class extends X.uAl{open(){dt.q.instance.prodigy.open.pets()}};bm=(0,Q.Cg)([(0,X.EVk)("OpenPetbook",et.Y.ui)],bm);var pm=z(6476),vm=z(36811);let gm=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return!(0,Kt.G)(ho.d3).enabled&&this._player.hasCompletedTutorial()&&this._questManager.awardsAvailableCount>0}))}close(){this.onClose.dispatch()}open(){return(0,Q.sH)(this,void 0,void 0,(function*(){try{yield vm.V.openPlayerGoalsIfPrizeReady(wi.$N.AutoSurfaced)}catch(q){X.VyI.log(`Error opening player goals: ${q}`,X.$bb.Error)}this.close()}))}};(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],gm.prototype,"_player",void 0),(0,Q.Cg)([(0,X.Cdj)("e47-a136"),(0,Q.Sn)("design:type",xd.n)],gm.prototype,"_questManager",void 0),gm=(0,Q.Cg)([(0,X.EVk)("OpenPlayerGoalsPopup",et.Y.uiDialog)],gm);z(22866),z(85056);let mm=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=this._game.state.getCurrentState(),z=dt.q.instance.prodigy.gameContainer.get("c21-1a3f"),Y=X.Aq$.isDefined(null===(q=K.screenData)||void 0===q?void 0:q.battleResult)&&!z.userHasSeenFirstOffer();return z.userHasEligibleOfferAvailable()&&Y}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K;yield q.open.call(this);const z=dt.q.instance.prodigy.gameContainer,Y=z.get("c21-1a3f");z.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:null===(K=Y.activeOffer)||void 0===K?void 0:K.id,funnelType:"segmented_offers",stepName:lh.l.SegmentedOffersViewed},{step_index:2}),Ou.P.openConfiguredModal((()=>{Y.setBreadcrumbHasSeenFirstOffer(),this.onClose.dispatch()}))}))}};(0,Q.Cg)([(0,X.Cdj)("d73-66e9"),(0,Q.Sn)("design:type",Yg.n)],mm.prototype,"_game",void 0),mm=(0,Q.Cg)([(0,X.EVk)("OpenSegmentOffersAfterBattlePopup",et.Y.uiPopup)],mm);let ym=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=dt.q.instance.prodigy.gameContainer.get("c21-1a3f"),K=this._loggedInPlayer.player.justLeveled&&q.userHasChangedSegment();return q.userHasEligibleOfferAvailable()&&K}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this);const K=dt.q.instance.prodigy.gameContainer.get("c21-1a3f");K.resetSurfacingBreadcrumbs(),Ou.P.openConfiguredModal((()=>{K.setBreadcrumbHasSeenFirstOffer(),this.onClose.dispatch()}))}))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],ym.prototype,"_loggedInPlayer",void 0),ym=(0,Q.Cg)([(0,X.EVk)("OpenSegmentOffersOnSegmentChangePopup",et.Y.uiPopup)],ym);let _m=class extends Tf.l{constructor(){super(...arguments),this._shouldCheckNotifications=!1}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._loggedInPlayer.player.hasCompletedTutorial()&&dt.q.instance.prodigy.notifications.canPlayNotification()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),this.onClose.dispatch(),dt.q.instance.prodigy.notifications.playNextNotification()}))}onFirstPopup(){this._shouldCheckNotifications=!0}update(){if(super.update(),this._shouldCheckNotifications){const{open:q,notifications:K}=dt.q.instance.prodigy;0===q.menus.length&&0===q.renderMenus.length&&null===q.chatMenu&&null===K.notificationTimer&&K.startTimer()}}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],_m.prototype,"_loggedInPlayer",void 0),_m=(0,Q.Cg)([(0,X.EVk)("OpenSocialToasters",et.Y.uiPopup)],_m);var Em=z(19145);let wm=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=Em.Z.canShowSpellStatusEffectsTutorial(),K=q.canBeTransported?"":`Reason: ${q.info}`;return X.VyI.log(`${(new Date).toISOString()} Spell Status Effects tutorial ready state\ncan be transported: ${q.canBeTransported}\n${K}`,X.$bb.Info),q.canBeTransported}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),Em.Z.instance.runSpellStatusEffectsTutorial((()=>{this.onClose.dispatch()}))}))}};wm=(0,Q.Cg)([(0,X.EVk)("OpenSpellStatusEffectsTutorial",et.Y.uiPopup)],wm);let Tm=class extends Tf.l{constructor(){super(...arguments),this._menuVisuals=null}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=dt.q.instance.prodigy.gameContainer.get(uc.G.MathTower),K=this._loggedInPlayer.player;return q.isEnabledForPlayer(K)&&K.hasCompletedTutorial()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this);const K=dt.q.instance.prodigy.gameContainer.get(uc.G.MathTower).redirectTowerTownPopup();this._menuVisuals=K}))}getRootDisplayObject(){return this._menuVisuals}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Tm.prototype,"_loggedInPlayer",void 0),Tm=(0,Q.Cg)([(0,X.EVk)("OpenTowerTownPopup",et.Y.uiDialog)],Tm);let Sm=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return!1}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),this.onClose.dispatch()}))}};Sm=(0,Q.Cg)([(0,X.EVk)("OpenTrialMembershipEndedPopup",et.Y.uiDialog)],Sm);let Am=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._dynamicStoreQuestManager.canTriggerOffer()}))}close(){this.onClose.dispatch()}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),yield this._dynamicStoreQuestManager.triggerCurrentOffer()}))}};(0,Q.Cg)([(0,Qi.b)("668-8a41"),(0,Q.Sn)("design:type",Sd.s)],Am.prototype,"_dynamicStoreQuestManager",void 0),Am=(0,Q.Cg)([(0,X.EVk)("OpenTriggeredOfferPopup",et.Y.uiPopup)],Am);z(99617);var Cm=z(19506);let Om=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return Cm.J.canShowUniquePetsIntro()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),Cm.J.runUniquePetsIntroSequence((()=>this.onClose.dispatch()))}))}};Om=(0,Q.Cg)([(0,X.EVk)("OpenUniquePetsIntroSequence",et.Y.uiPopup)],Om);let Im=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){const{enabled:q}=(0,Kt.G)(ie.d);if(!q)return!1;this._lastClaimData=yield this._networkHandler.getAllowanceClaimData();const{totalClaimable:K}=this._lastClaimData;return K.some(ep.cR)}))}open(){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.prodigy.open.openWizardBank({originType:wi.$N.AutoSurfaced},(()=>{this.onClose.dispatch()}))}))}};(0,Q.Cg)([(0,X.Cdj)("cb2-bdd4"),(0,Q.Sn)("design:type",Jb.b)],Im.prototype,"_networkHandler",void 0),Im=(0,Q.Cg)([(0,X.EVk)("OpenWizardBankModalPopupComponent",et.Y.membership)],Im);var Dm=z(32389);let Rm=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return!!(0,Kt.G)(Dm.q).enabled&&(!(this._activePlayer.getLevel()super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),dt.q.instance.prodigy.open.openWizardCostumesMenu(wi.$N.AutoSurfaced),this.onClose.dispatch()}))}};(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],Rm.prototype,"_activePlayer",void 0),Rm=(0,Q.Cg)([(0,X.EVk)("OpenWizardCostumesFtuePopup",et.Y.uiDialog)],Rm);z(24981);var Pm=z(4631);let Mm=class extends X.uAl{constructor(){super(...arguments),this.onZoneHandlesLeaving=new X.HN0,this.onZoneDoesNotHandleLeaving=new X.HN0}destroy(){this.onZoneHandlesLeaving.dispose(),this.onZoneDoesNotHandleLeaving.dispose(),super.destroy()}handleLeaving(){const q=dt.q.instance.prodigy.world.getZone(dt.q.instance.prodigy.world.getCurrentZone());q?q.handleLeaving(this._leavingType,(()=>{this.onZoneHandlesLeaving.dispatch()})):this.onZoneDoesNotHandleLeaving.dispatch()}};(0,Q.Cg)([(0,X.gfw)(Pm.j),(0,Q.Sn)("design:type",Number)],Mm.prototype,"_leavingType",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Mm.prototype,"onZoneHandlesLeaving",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Mm.prototype,"onZoneDoesNotHandleLeaving",void 0),Mm=(0,Q.Cg)([(0,X.EVk)("HandleLeavingGuard",et.Y.MapTeleport)],Mm);let Nm=class extends X.uAl{constructor(){super(...arguments),this._isCloseMapDisabled=!1,this._disableZoneGoals=!1,this._closeOtherMenus=!1,this._hideDifficultySelector=!1,this._lockClassDisabledZones=!1,this._lockedZones=[],this._awardGemForZoneID="",this._injectedValues={},this._onWorldMapClosed=new X.HN0,this.difficultyOverride=void 0}overrideZoneHandlesLeavingEvent(){this._awardGemForZoneID?Wg.i.setNextVisitParameters(Object.assign(Object.assign({},this.getWorldMapOptions(this._awardGemForZoneID.length>0)),{onInitialized:q=>{q.showGemAwardedSequence(this._awardGemForZoneID).catch((()=>X.VyI.log("Failed to show gem awarded sequence",X.$bb.Error)))}})):(this.difficultyOverride&&!Wg.i.isInDifficultyMode(this.difficultyOverride)&&Wg.i.setDifficultyMode(this.difficultyOverride),Wg.i.setNextVisitParameters(Object.assign({},this.getWorldMapOptions())))}getWorldMapOptions(q=!1){return q||this.setLockClassDisabledZones(),{disableClose:this._isCloseMapDisabled,forceLock:this._lockedZones,onClose:()=>this._onWorldMapClosed.dispatch(),disableZoneGoals:this._disableZoneGoals,injectedValues:this._injectedValues,disableDifficultyModeSelect:this._hideDifficultySelector,difficultyMode:this.difficultyOverride,autoOpenDialogueForZoneID:this._autoOpenDialogueForZoneID}}setLockClassDisabledZones(){if(this._lockClassDisabledZones){const q=dt.q.instance.prodigy.classModeController.getInClassDisabledZones().filter((q=>!1===this._lockedZones.includes(q)));this._lockedZones.push(...q)}}openWorldMap(){this._closeOtherMenus&&dt.q.instance.prodigy.open.menuCloseAll(),this.difficultyOverride&&!Wg.i.isInDifficultyMode(this.difficultyOverride)&&Wg.i.setDifficultyMode(this.difficultyOverride),dt.q.instance.prodigy.open.map(this.getWorldMapOptions())}destroy(){this._onWorldMapClosed.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("HandleLeavingGuard"),(0,Q.Sn)("design:type",Mm)],Nm.prototype,"_handleLeavingGuard",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Nm.prototype,"_isCloseMapDisabled",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Nm.prototype,"_disableZoneGoals",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Nm.prototype,"_closeOtherMenus",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Nm.prototype,"_hideDifficultySelector",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Nm.prototype,"_lockClassDisabledZones",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],Nm.prototype,"_lockedZones",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Nm.prototype,"_awardGemForZoneID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Nm.prototype,"_autoOpenDialogueForZoneID",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],Nm.prototype,"_injectedValues",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Nm.prototype,"_onWorldMapClosed",void 0),(0,Q.Cg)([(0,X.gfw)(Te.i),(0,Q.Sn)("design:type",String)],Nm.prototype,"difficultyOverride",void 0),Nm=(0,Q.Cg)([(0,X.EVk)("OpenWorldMap",et.Y.ui)],Nm);let xm=class extends X.uAl{constructor(){super(...arguments),this._yesButtonText="BUTTON_OKAY_CAPITAL",this._hideCancelButton=!1,this.onYes=new X.HN0,this.onNo=new X.HN0}start(){const q=dt.q.instance.prodigy.gameContainer.get("e81-40c8"),K=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),z=K.hasText(this._yesButtonLocalizationKey)?K.getText(this._yesButtonLocalizationKey):K.getText(this._yesButtonText);q.addEvents([{dialogueData:q.dataProvider.get(this._dialogueID),blockInput:!0,yes:()=>this.onYes.dispatch(),no:()=>this.onNo.dispatch(),nextButtonText:this._nextButtonText,yesButtonText:z,isCancelButtonVisible:!this._hideCancelButton}]),q.start(!0)}destroy(){this.onYes.dispose(),this.onNo.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],xm.prototype,"_dialogueID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],xm.prototype,"_nextButtonText",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],xm.prototype,"_yesButtonLocalizationKey",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],xm.prototype,"_yesButtonText",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],xm.prototype,"_hideCancelButton",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],xm.prototype,"onYes",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],xm.prototype,"onNo",void 0),xm=(0,Q.Cg)([(0,X.EVk)("OpenYesNoDialogue",et.Y.uiDialog)],xm);var Lm=z(38454),km=z(15804);let Bm=class extends Tf.l{constructor(){super(...arguments),this.onSkipped=new X.HN0,this._contentInputBlocker=null}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;return this._zoneName=null!==(q=this._loggedInPlayer.player.data.zone)&&void 0!==q?q:"",!!km.h.shouldShowEntryIllustration(this._zoneName)||(this.onSkipped.dispatch(),!1)}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),this.setupContentInputBlocker(),this.openZoneEntryIllustration((()=>{this.onClose.dispatch()}))}))}openZoneEntryIllustration(q){km.h.openZoneEntryIllustrationPrefabForZone(this._zoneName.split("-")[0]).then((K=>{this._game.broadcaster.broadcast(Xn.Y1.HideHUD,Xn.HG.HUD),this.destroyContentInputBlocker(),K.findComponentInChildren(Lm.V).onComplete.addOnce((()=>{this._game.broadcaster.broadcast(Xn.Y1.ShowHUD,Xn.HG.HUD),null==q||q(),K.destroy()}))})).catch(X.RQr.createHandler("Could not load the zone entry illustration prefab"))}setupContentInputBlocker(){if(X.Aq$.isDefined(this._contentInputBlocker))return;this._contentInputBlocker=new X._mx,this._contentInputBlocker.addComponent(X.dLy);this._contentInputBlocker.addComponent(Ye.n).setSize(this._game.width,this._game.height),this._contentInputBlocker.setLayer(Xh.E.ForegroundLayer)}destroyContentInputBlocker(){var q;null===(q=this._contentInputBlocker)||void 0===q||q.destroy(),this._contentInputBlocker=null}destroy(){this.onSkipped.dispose(),this.destroyContentInputBlocker(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Bm.prototype,"onSkipped",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],Bm.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("d73-66e9"),(0,Q.Sn)("design:type",Yg.n)],Bm.prototype,"_game",void 0),Bm=(0,Q.Cg)([(0,X.EVk)("OpenZoneEntryIllustration",et.Y.uiPopup)],Bm);var Um=z(5075);let Fm=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return Um.H.canShowEntryPopup()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),dt.q.instance.prodigy.open.prefabMenu(Gt.l.ZoneUnlockedPopup,(()=>{Um.H.completeEntryBreadcrumb(),this.onClose.dispatch()}),void 0,void 0,void 0,{ZONE_STATUS_MODAL_TYPE:Um.A.UNLOCKED,ZONE_STATUS_POPUP_TARGET_ID:Wg.i.getHighestAvailableZoneData().zone})}))}};Fm=(0,Q.Cg)([(0,X.EVk)("OpenZoneUnlockedPopup",et.Y.uiPopup)],Fm);let Gm=class extends X.uAl{_setVisibility(q){dt.q.instance.game.broadcaster.broadcast(q?Xn.Y1.ShowHUD:Xn.Y1.HideHUD,Xn.HG.HUD,[])}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}};(0,Q.Cg)([(0,X.DTs)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[Boolean]),(0,Q.Sn)("design:returntype",void 0)],Gm.prototype,"_setVisibility",null),Gm=(0,Q.Cg)([(0,X.EVk)("ToggleHUD",et.Y.ui)],Gm);let jm=class extends X.uAl{getCustomData(){const q={},K=this._loggedInPlayer.player.kennel.petTeam,z=K.length;for(let Y=0;Y{this.image.sprite.setTexture(q.texture),this.image.sprite.key=this.cacheKey;const K=dt.q.instance.game.cache.getFrameData(this.sourceImageKey);K&&(this.cacheColoredAnimationFrames(q,K),this.image.sprite.animations.loadFrameData(K)),this.onImageRecolored.dispatch()})),q}))}cacheColoredAnimationFrames(q,K){const z=q.texture,Y=new Ze.Rectangle(0,0,z.width,z.height),Q=K.total;for(let X=0;X{this.GameObject&&(this.clearRenderer(),this.createAttributeRenderer(),this.onAssetChanged.dispatch())})).catch((q=>{throw X.VyI.log(`CustomizablePlayerAttribute#updateAttribute: ${q}`,X.$bb.Error),new Error(q)}))}))}destroy(){this.clearRenderer(),this.onIDChanged.dispose(),this.onAssetChanged.dispose(),super.destroy()}clearRenderer(){const q=this.GameObject.findComponent(si._);null!==q&&q.destroy()}}(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],iy.prototype,"onAssetChanged",void 0);(0,Q.Cg)([(0,X.Cdj)(X.t5G.AssetLoader),(0,Q.Sn)("design:type",Object)],class extends iy{constructor(){super(...arguments),this.colorizeComponent=null,this.onColorIDChanged=new X.HN0,this.colorID=null}get ColorID(){return this.colorID}set ColorID(q){this.colorID=q,this.onColorIDChanged.dispatch()}create(){super.create(),this.colorizeComponent=this.GameObject.addComponent(ey)}updateAttribute(){const q=Object.create(null,{updateAttribute:{get:()=>super.updateAttribute}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K;yield q.updateAttribute.call(this);const z=null===(K=this.GameObject)||void 0===K?void 0:K.findComponent(si._);z&&(this.colorizeComponent.Image=z,yield this.updateColor())}))}updateColor(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this.isValidColor()){const q=this.colorizeComponent.sourceImageKey=this.getSourceImageKey();this.assetLoader.isLoaded(q,X.iO0.Image)||(yield this.assetLoader.loadAssets([q])),this.colorizeComponent.colorReplaceData=this.getColorReplaceData(),this.colorizeComponent.cacheKey=this.getCacheKey(),this.colorizeComponent.replaceColor().catch((q=>{X.VyI.log(`Could not replace color on colorized player attribute, ${q.message}`,X.$bb.Warning)}))}else X.VyI.log(`ColoredCustomizablePlayerAttribute: Set invalid color ${this.ColorID}`,X.$bb.Warning)}))}destroy(){this.onColorIDChanged.dispose(),super.destroy()}}.prototype,"assetLoader",void 0);let sy=class extends X.uAl{constructor(){super(...arguments),this._quantity=1,this.onItemConsumed=new X.HN0}destroy(){this.onItemConsumed.dispose(),super.destroy()}consumeItem(){this._itemType&&this._itemID&&(this._player.backpack.consume(this._itemType,this._itemID,this._quantity),this.onItemConsumed.dispatch(this._itemType,this._itemID,this._quantity),this._player.forceSaveCharacter())}setItem(q,K,z=1){this._itemType=q,this._itemID=K,this._quantity=z}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],sy.prototype,"_itemType",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],sy.prototype,"_itemID",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],sy.prototype,"_quantity",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],sy.prototype,"onItemConsumed",void 0),(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],sy.prototype,"_player",void 0),sy=(0,Q.Cg)([(0,X.EVk)("ConsumeItem",et.Y.saving)],sy);let ny=class extends X.uAl{constructor(){super(...arguments),this._enable=!0}enablePlayerSaving(){this._loggedInPlayer.player.saveEnabled=this._enable}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ny.prototype,"_enable",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],ny.prototype,"_loggedInPlayer",void 0),ny=(0,Q.Cg)([(0,X.EVk)("EnablePlayerSaving",et.Y.saving)],ny);let ay=class extends X.uAl{constructor(){super(...arguments),this.onXPReceived=new X.HN0,this._afterBattle=!1}destroy(){this.onXPReceived.dispose(),super.destroy()}setXPEarned(q){this._xpEarned=q}showSummary(){const q=qo.A.calculateXP(this._xpEarned),K=this._loggedInPlayer.player,z=K.kennel.petTeam.filter((q=>q));dt.q.instance.prodigy.open.resultsMenu(z,q,[],[],void 0,void 0,this._afterBattle).onClose=()=>{this.onXPReceived.dispatch(),K.updated=!0,K.kennel.updated=!0};const Y=dt.q.instance.prodigy.gameContainer.get("20f-5f67");Y.playerProgression.sendPlayerProgressionPointsEarnedEvent({pointType:"stars",pointCount:q.totalNonMemberXp+(K.hasMembership()?q.memberXp:0)},{instanceID:Y.playerMovementAndDiscovery.getCurrentRunInstanceID(Ti.N.CrystalCaverns),instanceType:Ti.N.CrystalCaverns})}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ay.prototype,"onXPReceived",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ay.prototype,"_xpEarned",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ay.prototype,"_afterBattle",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],ay.prototype,"_loggedInPlayer",void 0),ay=(0,Q.Cg)([(0,X.EVk)("GivePlayerXP",et.Y.player)],ay);z(43485);let ry=class extends X.uAl{heal(){this._loggedInPlayer.player.heal()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],ry.prototype,"_loggedInPlayer",void 0),ry=(0,Q.Cg)([(0,X.EVk)("HealPlayerTeam",et.Y.player)],ry);var oy=z(20136);class hy extends X.$KW{generate(q,K){return X.XRp.createVertical([X.Gme.checkboxGroup({id:"applyOnCreate",labelValue:"Apply On Create",inputValue:q.applyOnCreate}),X.Gme.numberGroup({id:"alpha",labelValue:"Alpha",inputValue:q.alpha,onChange:(q,K)=>{const z=X.cj9.clamp(K,hy.MIN_ALPHA,hy.MAX_ALPHA);z!==K&&this._editorAPI.modifyComponent(this._componentGuid,{alpha:z})}})])}}hy.MIN_ALPHA=0,hy.MAX_ALPHA=1;let cy=class extends pd.b{initialize(){super.initialize();const q=new oy.Z;q.alpha=this.alpha,this._filterList.push(q)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],cy.prototype,"alpha",void 0),cy=(0,Q.Cg)([(0,X.EVk)("AlphaPIXIFilter",et.Y.effect),(0,X.WR4)(hy)],cy);var dy=z(47389);let ly=class extends X.uAl{create(){super.create(),this._appearanceSelector&&(this._playerData?(this._appearanceSelector.onAppearanceLoaded.add(this.updatePlayerOpacity,this),this.updatePlayerOpacity()):X.VyI.log("InvisibilityCloakOpacityComponent: Failed to initialize the component due to missing player data provider",X.$bb.Error))}destroy(){var q;null===(q=this._appearanceSelector.onAppearanceLoaded)||void 0===q||q.remove(this.updatePlayerOpacity,this),super.destroy()}updatePlayerOpacity(){116===this._playerData.player.equipment.getOutfit()?(this._alphaFilterComponent.alpha=this._equippedOpacity,this._alphaFilterComponent.reset()):this.clearEffect()}clearEffect(){this._alphaFilterComponent&&(this._alphaFilterComponent.alpha=1,this._alphaFilterComponent.removeFilter())}};(0,Q.Cg)([(0,X.Cdj)("1eb-d7b4"),(0,Q.Sn)("design:type",Object)],ly.prototype,"_playerData",void 0),(0,Q.Cg)([(0,X.MnK)(dy.b),(0,Q.Sn)("design:type",dy.b)],ly.prototype,"_appearanceSelector",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ly.prototype,"_equippedOpacity",void 0),(0,Q.Cg)([(0,X.MnK)(cy),(0,Q.Sn)("design:type",cy)],ly.prototype,"_alphaFilterComponent",void 0),ly=(0,Q.Cg)([(0,X.EVk)("InvisibilityCloakOpacity",et.Y.playerAnimation)],ly);var uy=z(63398);let fy=class extends X.uAl{constructor(){super(...arguments),this._showWeapon=!1,this._onAppearanceReloaded=new X.HN0}get onAppearanceReloaded(){return this._onAppearanceReloaded}create(){super.create(),this.reloadPlayerAppearance=this.reloadPlayerAppearance.bind(this);const q=dt.q.instance.game.broadcaster;q.addAppListener(Xn.J8.PlayerEditingMenuClosed,this.reloadPlayerAppearance,this),q.addAppListener(Xn.J8.PlayerAppearanceUpdated,this.reloadPlayerAppearance,this)}postCreate(){super.postCreate(),this.loadPlayerAppearance()}destroy(){const q=dt.q.instance.game.broadcaster;q.removeAppListener(Xn.J8.PlayerEditingMenuClosed,this),q.removeAppListener(Xn.J8.PlayerAppearanceUpdated,this),this._onAppearanceReloaded.dispose(),this._onAppearanceReloaded=null,super.destroy()}addWeapon(q){this._weapon=q,this._showWeapon=!0,this.reloadPlayerAppearance()}removeWeapon(){this._showWeapon=!1,this._weapon=null,this.reloadPlayerAppearance()}loadPlayerAppearance(){const q=this._playerData.getAppearance();q.weapon=this._showWeapon?this._weapon:q.weapon,this._playerAppearanceSelector.setAppearance(q).catch(X.RQr.createHandler("Could not set player appearance"))}reloadPlayerAppearance(){this.loadPlayerAppearance(),this._onAppearanceReloaded.dispatch()}};(0,Q.Cg)([(0,X.Pqz)(dy.b),(0,Q.Sn)("design:type",dy.b)],fy.prototype,"_playerAppearanceSelector",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],fy.prototype,"_playerData",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],fy.prototype,"_onAppearanceReloaded",void 0),fy=(0,Q.Cg)([(0,X.EVk)("MainPlayerAppearanceListener",et.Y.playerAnimation)],fy);X.uAl;var by,py=z(89717),vy=z(63115),gy=z(39325),my=z(44356);class yy extends X.y4o{static make(q,K){const z=q.addComponent(yy,!1);return z.sprite=K,z.create(),z}create(){super.create(),this.setRootContainer(this.sprite)}getDimensions(){return new X.or0(this.sprite.width,this.sprite.height)}}let _y=by=class extends X.uAl{constructor(){super(...arguments),this._emoteSprite=null,this._timer=null,this._tween=null}showEmote(q){const K=ae.t.getItem("emote",q);if(!K)return X.VyI.log(`Emote ID ${q} is not valid.`,X.$bb.Warning),void dt.q.instance.prodigy.gameContainer.get("20f-5f67").playerIdentityAvatar.sendEmoteFailedEvent({emote_name:K.data.name,emote_type:my.H.Emote,fail_reason:`Emote ID ${q} is not valid.`});this.showBubbleEmote(q)}showAnimatedEmote(q){this.stopBubbleEmote()}showBubbleEmote(q){this.stopAnimatedEmote(),this.stopBubbleEmote(),this._bubble.active=!0,this._emoteSprite=yy.make(this._emoteIcon,dt.q.instance.prodigy.create.sprite(0,0,Ts.E.getIconForType("emote",q),null,null,null,by.EMOTE_ICON_SIZE,by.EMOTE_ICON_SIZE)),this._emoteSprite.sprite.name=`Chat Bubble Icon ${q}`,this._bubble.transform.localScale.x=0,this._bubble.transform.localScale.y=0,this._tween=dt.q.instance.game.add.tween(this._bubble.transform.localScale,this).to({x:1.2,y:1.2},200,X.GS3.Quadratic.Out).to({x:.8,y:1},200,X.GS3.Quadratic.In).to({x:1,y:.8},200,X.GS3.Quadratic.Out).to({x:1,y:1},200,X.GS3.Quadratic.In).start(),this._timer=window.setTimeout((()=>{this.stopBubbleEmote()}),by.BUBBLE_EMOTE_DURATION)}stopAnimatedEmote(){this.cleanUpTimer()}stopBubbleEmote(){this._bubble&&(this._bubble.active=!1),this._emoteSprite&&(this._emoteSprite.destroy(),this._emoteSprite=null),this._tween&&(this._tween.remove(),this._tween=null),this.cleanUpTimer()}cleanUpTimer(){null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null)}destroy(){this.stopAnimatedEmote(),this.stopBubbleEmote(),super.destroy()}};var Ey;_y.EMOTE_ICON_SIZE=40,_y.BUBBLE_EMOTE_DURATION=3e3,(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],_y.prototype,"_bubble",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],_y.prototype,"_emoteIcon",void 0),_y=by=(0,Q.Cg)([(0,X.EVk)("PlayerChatEmote",et.Y.player)],_y);let wy=Ey=class extends X.uAl{constructor(){super(...arguments),this._chatStarted=new X.HN0,this._chatEnded=new X.HN0,this._timer=null}setChat(q){X.Aq$.isDefined(q)?(this._chatText.GameObject.active=!0,this._chatText.text=`"${q}"`,null===this._timer?this._chatStarted.dispatch():window.clearTimeout(this._timer),this._timer=window.setTimeout((()=>{this.clearChat()}),Ey.CHAT_TIMER)):X.VyI.log("Invalid chat message received",X.$bb.Error)}clearChat(){var q;X.Aq$.isDefined(this._timer)&&(window.clearTimeout(this._timer),this._timer=null),(null===(q=this._chatText)||void 0===q?void 0:q.GameObject)&&(this._chatText.GameObject.active=!1),this._chatEnded.dispatch()}destroy(){this._chatStarted.dispose(),this._chatEnded.dispose(),this.clearChat(),super.destroy()}};wy.CHAT_TIMER=5e3,(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],wy.prototype,"_chatText",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wy.prototype,"_chatStarted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wy.prototype,"_chatEnded",void 0),wy=Ey=(0,Q.Cg)([(0,X.EVk)("PlayerChatMessage",et.Y.player)],wy);let Ty=class extends X.JTX{startDance(q){this._pathLocomotion.stop(),this._animationStateController.playAnimation(q)}};(0,Q.Cg)([(0,X.MnK)(gy.F),(0,Q.Sn)("design:type",gy.F)],Ty.prototype,"_animationStateController",void 0),(0,Q.Cg)([(0,X.MnK)(X.KhP),(0,Q.Sn)("design:type",X.KhP)],Ty.prototype,"_pathLocomotion",void 0),Ty=(0,Q.Cg)([(0,X.EVk)("PlayerDance",et.Y.player)],Ty);let Sy=class extends uy.k{create(){super.create(),this.setCurrentToBindPose()}updateFrameName(q){const K=this.GameObject.findComponent(si._);null!==K&&K.setFrameName(`${this.AnimationTargetKey}_${q}`)}};Sy=(0,Q.Cg)([(0,X.EVk)("PlayerKeyFrameAnimator",et.Y.playerAnimation)],Sy);let Ay=class extends X.uAl{constructor(){super(...arguments),this.onPlayerMoved=new X.HN0,this.onPlayerStopped=new X.HN0,this._isStopped=!0}create(){var q,K;super.create();const z=dt.q.instance.game.state.get(Nt.G.TileScreen);(null==z?void 0:z.user)?(this._mainPlayerContainer=z.user,null===(q=this._mainPlayerContainer)||void 0===q||q.onPathFound.add(this.playerSetPath,this),null===(K=this._mainPlayerContainer)||void 0===K||K.onStand.add(this.playerStopped,this)):this._playerLocomotion?(this._playerLocomotion.onPathStart.add(this.playerSetPath,this),this._playerLocomotion.onPathEnd.add(this.playerStopped,this)):X.VyI.log(`PlayerMovementSignalComponent attached to ${this.gameObject.name}. No TileScreen or PathLocomotionComponent found.`,X.$bb.Warning)}playerSetPath(q){this.onPlayerMoved.dispatch(),this._isStopped=!1}playerStopped(){this._isStopped||this.onPlayerStopped.dispatch(),this._isStopped=!0}destroy(){var q,K,z,Y;this.onPlayerStopped.dispose(),this.onPlayerMoved.dispose(),null===(q=this._mainPlayerContainer)||void 0===q||q.onPathFound.remove(this.playerSetPath,this),null===(K=this._mainPlayerContainer)||void 0===K||K.onStand.remove(this.playerSetPath,this),null===(z=this._playerLocomotion)||void 0===z||z.onPathStart.remove(this.playerSetPath,this),null===(Y=this._playerLocomotion)||void 0===Y||Y.onPathEnd.remove(this.playerStopped,this),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("PlayerLocomotion"),(0,Q.Sn)("design:type",X.KhP)],Ay.prototype,"_playerLocomotion",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ay.prototype,"onPlayerMoved",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Ay.prototype,"onPlayerStopped",void 0),Ay=(0,Q.Cg)([(0,X.EVk)("PlayerMovementSignal",et.Y.motion)],Ay);var Cy=z(37193);let Oy=class extends X.uAl{create(){super.create(),this.updateNameplate(),dt.q.instance.game.broadcaster.addAppListener(Xn.J8.PlayerAppearanceUpdated,this.updateNameplate,this)}updateNameplate(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._playerData){{const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2");this._playerData.isActivePlayer()&&q.player.shouldShowUsernameAbovePlayer()?q.player.shouldShowWizardNameAbovePlayer()?(this._nameLabel.text=this._playerData.player.getName(),this._secondaryNameLabel.text=q.loginCredentials.username):(this._nameLabel.text=q.loginCredentials.username,this._nameLabel.stroke=Zh.E.USERNAME_DISPLAY_STROKE_COLOR,this._nameLabel.strokeThickness=Zh.E.USERNAME_DISPLAY_STROKE_THICKNESS,this._nameLabel.fontSize=Zh.E.USERNAME_DISPLAY_FONT_SIZE,this._nameLabel.update()):this._nameLabel.text=this._playerData.player.getName()}{const q=this._playerData.isMember();if(this._membershipIcon.GameObject.active=q,q){if(Xs.D.isFeatureEnabled()&&this._playerData.isActivePlayer()){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getMemberTier(),K=Cy.i.PLAYER_MEMBERSHIP_ICON_IMAGES[q];K&&(yield this._membershipIcon.setAsset(K.atlas,K.frame))}this._membershipIcon.isLoaded||(yield new Promise((q=>{this._membershipIcon.OnLoaded.addOnce(q)})));const q=this._nameLabel.TextObject;this._membershipIcon.GameObject.transform.setPosition(Math.floor(-.5*(q.width+this._membershipIcon.getWidth()+1)),Math.floor(q.y+1)),this._nameLabel.GameObject.transform.setPosition(Math.floor(.5*this._membershipIcon.getWidth()),0)}}}}))}destroy(){dt.q.instance.game.broadcaster.removeAppListener(Xn.J8.PlayerAppearanceUpdated,this)}};(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Oy.prototype,"_membershipIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Oy.prototype,"_nameLabel",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Oy.prototype,"_secondaryNameLabel",void 0),(0,Q.Cg)([(0,X.Cdj)("1eb-d7b4"),(0,Q.Sn)("design:type",Object)],Oy.prototype,"_playerData",void 0),Oy=(0,Q.Cg)([(0,X.EVk)("PlayerNameplate",et.Y.player)],Oy);z(6190);var Iy=z(82209);let Dy=class extends X.uAl{constructor(){super(...arguments),this._enableInput=!0,this._facingDirection=$e.y.Right,this._onPlayerSpawned=new X.HN0}spawn(q){this._spawnParent.children.forEach((q=>q.destroy()));const K=new Iy.z,z={"1eb-d7b4":K,FacingDirection:this._facingDirection};K.initialize(q),Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Gt.l.RemotePlayer,z,this._spawnParent).then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){this.GameObject&&!this.GameObject.isDestroyed&&(this._playerGameObject=q,this._playerGameObject.active=!1,this.setInputEnabled(),this.setAlertHeight(),this.setAnimations(),yield this.setPlayerAppearance(K),!this.GameObject||this.GameObject.isDestroyed||this._playerGameObject.isDestroyed||(this._playerGameObject.active=!0,this._onPlayerSpawned.dispatch(this._playerGameObject)))})))).catch(X.RQr.createHandler("[SpawnPlayerAppearanceComponent] Error loading Player Prefab"))}setPlayerAppearance(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=this._playerGameObject.findComponentInChildren(dy.b).setAppearance(q.getAppearance()).catch(X.RQr.createHandler("[SpawnPlayerAppearanceComponent] setAppearance failed")),z=this._playerGameObject.findComponentInChildren(vy.T),Y=z?z.updateMountAppearance().catch(X.RQr.createHandler("[SpawnPlayerAppearanceComponent] updateMountAppearance failed")):Promise.resolve();yield Promise.all([K,Y])}))}setInputEnabled(){this._playerGameObject.findComponentInChildren(pm.T).GameObject.active=this._enableInput}setAlertHeight(){const q=this._playerGameObject.findComponentInChildren(Oy),K=this._speechBubble.transform;K.setPosition(K.localPosition.x,q.GameObject.transform.localPosition.y)}setAnimations(){const q=this._playerGameObject.findComponentInChildren(Gn.K);this._alertFSM.animationController=q,q.changeState(0);const K=this._playerGameObject.findComponentInChildren(X.KhP);this._alertFSM.monsterWalk.onMoveStart.addOnce((()=>K.setPath([this.gameObject.transform.worldPosition,this._alertFSM.monsterWalk.MoveTarget])))}destroy(){this._onPlayerSpawned.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],Dy.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Dy.prototype,"_spawnParent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Dy.prototype,"_speechBubble",void 0),(0,Q.Cg)([(0,X.MnK)(Ni.K),(0,Q.Sn)("design:type",Ni.K)],Dy.prototype,"_alertFSM",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Dy.prototype,"_enableInput",void 0),(0,Q.Cg)([(0,X.gfw)($e.y),(0,Q.Sn)("design:type",Number)],Dy.prototype,"_facingDirection",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Dy.prototype,"_onPlayerSpawned",void 0),Dy=(0,Q.Cg)([(0,X.EVk)("SpawnPlayerAppearance",et.Y.player)],Dy);z(97530),z(54584),z(86675),z(48215),z(17737);let Ry=class extends X.uAl{constructor(){super(...arguments),this._bodyLocalizationKey="MULTIPLIER_AD_BODY_TITANSHARD"}create(){super.create(),this._bodyMessage.text=this._localizer.getText(this._bodyLocalizationKey,this._weekendEvents.getTitanShardMultiplier())}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Ry.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ry.prototype,"_bodyLocalizationKey",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ry.prototype,"_bodyMessage",void 0),(0,Q.Cg)([(0,X.Cdj)("119-35f9"),(0,Q.Sn)("design:type",ov.n)],Ry.prototype,"_weekendEvents",void 0),Ry=(0,Q.Cg)([(0,X.EVk)("SetTitanShardEventAdText",et.Y.uiAd)],Ry);var Py=z(46902),My=z(59347);let Ny=class extends X.uAl{setTeleportMapTag(q){this._canTeleport&&(this._canTeleport.mapTag=q),this._teleport&&(this._teleport.mapTag=q),q&&(this._teleportMessage.key=this._localizer.getText("TRAVEL_CONFIRM_MESSAGE",dt.q.instance.prodigy.world.getZone(q.split("-")[0]).name))}setupTeleport(q){this.setTeleportMapTag(Wg.i.getTeleportMapTag(this._weekendEvents.isMultiZone(q)?this._weekendEvents.getRandomZoneID(q):q))}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Ny.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.MnK)(us.$),(0,Q.Sn)("design:type",us.$)],Ny.prototype,"_canTeleport",void 0),(0,Q.Cg)([(0,X.MnK)(fs.q),(0,Q.Sn)("design:type",fs.q)],Ny.prototype,"_teleport",void 0),(0,Q.Cg)([(0,X.MnK)(My.S),(0,Q.Sn)("design:type",My.S)],Ny.prototype,"_teleportMessage",void 0),(0,Q.Cg)([(0,X.Cdj)("119-35f9"),(0,Q.Sn)("design:type",ov.n)],Ny.prototype,"_weekendEvents",void 0),Ny=(0,Q.Cg)([(0,X.EVk)("SetupEventAdTeleport",et.Y.uiAd)],Ny);let xy=class extends X.uAl{constructor(){super(...arguments),this._bodyLocalizationKey="MULTIPLIER_AD_BODY_CURRENCY",this.ZoneCurrencyAssets={[Yt.A_.SHIVERCHILL]:As.q._2xShivers_CurrencyWeekend,[Yt.A_.SHIPWRECK]:As.q._2xYars_CurrencyWeekend,[Yt.A_.SKYWATCH]:As.q._2xAeros_CurrencyWeekend,[Yt.A_.FOREST]:As.q._2xFlorians_CurrencyWeekend,[Yt.A_.BONFIRE]:As.q._2xHotHots_CurrencyWeekend,[Py.Q.AllZones]:As.q._2xAll_CurrencyWeekend}}create(){super.create();const q=this._weekendEvents.getEvents(ov.R.Currency);let K="",z="",Y="";q.forEach(((Q,X)=>{this.setAdImage(this.getAdImage(Q.zone)),K+=this._weekendEvents.getZoneDisplayName(Q.zone),z+=Q.bonusMultiplier,Y+=this.getCurrencyType(Q.zone),X===q.length-2?(K+=" & ",z+=" & ",Y+=" & "):X!==q.length-1&&(K+=", ",z+=", ",Y+=", "),this._setupEventAdTeleport.setupTeleport(Q.zone)})),this._bodyMessage.text=this._localizer.getText(this._bodyLocalizationKey,z,Y,K)}getCurrencyType(q){if(q===Py.Q.Global||q===Py.Q.AllZones)return this._localizer.getText("MONEY");if(q===Py.Q.AllInstances)return this._localizer.getText("GOLD");const K=dt.q.instance.prodigy.world.getZone(q).currency;return K?ae.t.getItem("currency",K).data.name:this._localizer.getText("GOLD")}getAdImage(q){var K;return null!==(K=this.ZoneCurrencyAssets[q])&&void 0!==K?K:As.q.CurrencyWeekend_gold_coin}setAdImage(q){var K;null===(K=this._adImage)||void 0===K||K.setAsset(q)}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],xy.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],xy.prototype,"_bodyLocalizationKey",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],xy.prototype,"_bodyMessage",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],xy.prototype,"_adImage",void 0),(0,Q.Cg)([(0,X.Cdj)("119-35f9"),(0,Q.Sn)("design:type",ov.n)],xy.prototype,"_weekendEvents",void 0),(0,Q.Cg)([(0,X.MnK)(Ny),(0,Q.Sn)("design:type",Ny)],xy.prototype,"_setupEventAdTeleport",void 0),xy=(0,Q.Cg)([(0,X.EVk)("SetupCurrencyEventAd",et.Y.uiAd)],xy);let Ly=class extends X.uAl{constructor(){super(...arguments),this._bodyLocalizationKey="MULTIPLIER_AD_BODY_XP"}create(){super.create();const q=this._weekendEvents.getEvents(ov.R.Xp);let K="",z="";q.forEach(((Y,Q)=>{K+=this._weekendEvents.getZoneDisplayName(Y.zone),z+=Y.bonusMultiplier,Q===q.length-2?(K+=" & ",z+=" & "):Q!==q.length-1&&(K+=", ",z+=", "),this._setupEventAdTeleport.setupTeleport(Y.zone)})),this._bodyMessage.text=this._localizer.getText(this._bodyLocalizationKey,z,K)}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Ly.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Ly.prototype,"_bodyLocalizationKey",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Ly.prototype,"_bodyMessage",void 0),(0,Q.Cg)([(0,X.Cdj)("119-35f9"),(0,Q.Sn)("design:type",ov.n)],Ly.prototype,"_weekendEvents",void 0),(0,Q.Cg)([(0,X.MnK)(Ny),(0,Q.Sn)("design:type",Ny)],Ly.prototype,"_setupEventAdTeleport",void 0),Ly=(0,Q.Cg)([(0,X.EVk)("SetupXpEventAd",et.Y.uiAd)],Ly);let ky=class extends X.uAl{postCreate(){super.postCreate(),this.applyBlendMode()}applyBlendMode(){if(this.target){const q=this.target.getRootContainer();"blendMode"in q?q.blendMode=this._blendMode:X.VyI.log("This RenderComponent type is not yet supported.",X.$bb.Error)}}};var By;(0,Q.Cg)([(0,X.MnK)(X.y4o),(0,Q.Sn)("design:type",X.y4o)],ky.prototype,"target",void 0),(0,Q.Cg)([(0,X.gfw)(Ze.BLEND_MODES),(0,Q.Sn)("design:type",Number)],ky.prototype,"_blendMode",void 0),ky=(0,Q.Cg)([(0,X.EVk)("BlendModeRender",et.Y.effect)],ky),function(q){q[q.Clamp=0]="Clamp",q[q.Shrink=1]="Shrink",q[q.Grow=2]="Grow",q[q.None=3]="None"}(By||(By={}));let Uy=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.widthMode=By.Clamp,this.heightMode=By.Clamp,this.widthBounds=new X.I9Y(Number.MIN_VALUE,Number.MAX_VALUE),this.heightBounds=new X.I9Y(Number.MIN_VALUE,Number.MAX_VALUE)}postCreate(){this.addListenerToSignal(this._rectTransform.onRecalculatedBounds,this.limitRectToBounds.bind(this)),this.limitRectToBounds()}limitRectToBounds(){const{widthDelta:q,heightDelta:K}=this._rectTransform;this._rectTransform.setSizeDelta(this.getValueWithBounds(q,this.widthBounds,this.widthMode),this.getValueWithBounds(K,this.heightBounds,this.heightMode))}getValueWithBounds(q,K,z){return(()=>{switch(z){case By.Shrink:return Math.min(q,K.x);case By.Grow:return Math.max(q,K.y);case By.None:return q;case By.Clamp:default:return X.cj9.clamp(q,K.x,K.y)}})()}};(0,Q.Cg)([(0,X.Pqz)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],Uy.prototype,"_rectTransform",void 0),(0,Q.Cg)([(0,X.gfw)(By),(0,Q.Sn)("design:type",Number)],Uy.prototype,"widthMode",void 0),(0,Q.Cg)([(0,X.gfw)(By),(0,Q.Sn)("design:type",Number)],Uy.prototype,"heightMode",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],Uy.prototype,"widthBounds",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],Uy.prototype,"heightBounds",void 0),Uy=(0,Q.Cg)([(0,X.EVk)("BoundRectSize",et.Y.uiLayout,"Bind the size of a rect transform to these magic vectors!")],Uy);z(44725);let Fy=class extends X.y4o{constructor(){super(...arguments),this._atlas=null,this._dotImageDefault=null,this._dotImageInProgress=null,this._dotImageComplete=null,this._lineImageDefault=null,this._lineImageComplete=null,this._customEndImageDefault=null,this._customEndImageInProgress=null,this._customEndImageComplete=null,this._lineOffsetX=0,this._endOffsetX=0,this._fixedLength=-1,this._actualTotalLength=0,this._dotsDefault=[],this._dotsInProgress=[],this._dotsComplete=[],this._linesDefault=[],this._linesComplete=[],this.onDiscreteImageProgressMeterCreated=new X.HN0}create(){super.create(),this.addNewDot(),this.addNewLine(),this.onDiscreteImageProgressMeterCreated.dispatch()}addNewDot(q=!1){this.createImage(q&&this._customEndImageDefault?this._customEndImageDefault:this._dotImageDefault,this._dotsDefault,!0),this.createImage(q&&this._customEndImageInProgress?this._customEndImageInProgress:this._dotImageInProgress,this._dotsInProgress,!0),this.createImage(q&&this._customEndImageComplete?this._customEndImageComplete:this._dotImageComplete,this._dotsComplete,!0)}addNewLine(){this.createImage(this._lineImageDefault,this._linesDefault),this.createImage(this._lineImageComplete,this._linesComplete)}createImage(q,K,z=!1){const Y=new X._mx(this.gameObject);Y.addComponent(X.dLy);const Q=Y.addComponent(X.vYh);Q.updateAsset(this._atlas,q),Q.GameObject.active=!0,z&&Q.GameObject.sendToBack(),K.push(Y)}setFixedLength(q){this._actualTotalLength=0?this._fixedLength:null!=K?K:0,this._totalLength!==this._actualTotalLength){for(this._actualTotalLength=this._totalLength;this._dotsDefault.length=0&&this._dotsDefault.length===this._totalLength-1);for(;this._linesDefault.length=0?this._endOffsetX:0,X=Yq,this._dotsInProgress[z].active=z===q,this._dotsComplete[z].active=z=q,this._linesComplete[z].active=z{var K;q.keyCode===Hy.D.ENTER&&(null===(K=this.submitButton)||void 0===K?void 0:K.getButtonState())!==nf.K.Disabled&&this.submitButton.IsActiveInHierarchy&&this.submitForm()}))}destroy(){this.onSubmit.dispose(),super.destroy()}submitForm(){const q=this.gameObject.findComponentsInChildren(qt.S).map((q=>q._input.value));this.onSubmit.dispatch(...q)}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Vy.prototype,"onSubmit",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],Vy.prototype,"submitButton",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Vy.prototype,"submitOnEnter",void 0),Vy=(0,Q.Cg)([(0,X.EVk)("Form",et.Y.uiInput)],Vy);let Wy=class extends X.uAl{constructor(){super(...arguments),this._loadingAtlas=ti._.General_core_json,this.onStartLoading=new X.HN0,this.onAssetLoaded=new X.HN0,this.forceNativeImageSize=!1}init(){X.Aq$.isDefined(this._loadingSpinner)||(this._loadingSpinner=this.gameObject.addComponent(si._)),this._loadingSpinner.setAsset(this._loadingAtlas,"loading").then((()=>{this.gameObject.isDestroyed||this._loadingSpinner.GameObject.isDestroyed||(this._loadingTween?this._loadingTween.stop():this._loadingTween=dt.q.instance.game.add.tween(this._loadingSpinner.GameObject.transform,this._loadingSpinner.GameObject).to({localRotation:360},2e3,X.GS3.Linear.None,!1,0,-1),this._loadingSpinner.Active&&this._loadingTween.start())})).catch(X.RQr.createHandler("Failed to load loading spinner")),this._loadingSpinner.Active=!1}updateAsset(q,K){var z;this._loadingSpinner||this.init(),this.onStartLoading.dispatch(q,K),dt.q.instance.prodigy.load.isFileLoaded(q)?this.setAsset(q,K):(null===(z=this._loadingTween)||void 0===z||z.start(),this._graphic.Active=!1,this._loadingSpinner.Active=!0,dt.q.instance.prodigy.load.assets(q,(()=>this.setAsset(q,K))))}setAsset(q,K){var z;if(null===(z=this._loadingTween)||void 0===z||z.stop(),this._graphic.Active=!0,this._loadingSpinner.Active=!1,this.gameObject.transform.localRotation=0,this.onAssetLoaded.dispatch(q,K),this._graphic.updateAsset(q,K),this.forceNativeImageSize){const q=this.gameObject.findComponent(X.XVE);X.Aq$.isDefined(q)&&(q.widthDelta=this._graphic.getDimensions().width,q.heightDelta=this._graphic.getDimensions().height)}}destroy(){this.onStartLoading.dispose(),this.onAssetLoaded.dispose(),dt.q.instance.game.tweens.remove(this._loadingTween),this._loadingTween=null,super.destroy()}};(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Wy.prototype,"_loadingAtlas",void 0),(0,Q.Cg)([(0,X.Pqz)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],Wy.prototype,"_graphic",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Wy.prototype,"onStartLoading",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Wy.prototype,"onAssetLoaded",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Wy.prototype,"forceNativeImageSize",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],Wy.prototype,"_loadingSpinner",void 0),Wy=(0,Q.Cg)([(0,X.EVk)("GraphicAssetLoader",et.Y.utility)],Wy);z(12861);let qy=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.setWidth=!0,this.setHeight=!0}postCreate(){var q;this._parentRect=null===(q=this.gameObject.parent)||void 0===q?void 0:q.findComponent(X.XVE),null!=this._parentRect&&this.addListenerToSignal(this._parentRect.onDimensionsChanged,this.updateDimensions.bind(this)),this.addListenerToSignal(this._rectTransform.onDimensionsChanged,this.updateDimensions.bind(this)),this.updateDimensions()}updateDimensions(){null!=this._parentRect&&this._rectTransform.setSizeDelta(this.setWidth?this._parentRect.fullWidth:this._rectTransform.fullWidth,this.setHeight?this._parentRect.fullHeight:this._rectTransform.fullHeight)}};(0,Q.Cg)([(0,X.Pqz)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],qy.prototype,"_rectTransform",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],qy.prototype,"setWidth",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],qy.prototype,"setHeight",void 0),qy=(0,Q.Cg)([(0,X.EVk)("GrowToContainer",et.Y.uiLayout,"Size your object to fill its container (uses width and height instead of anchors)")],qy);z(21397),z(79979);var Ky=z(23034),zy=z(7259);let Yy=class extends X.uAl{constructor(){super(...arguments),this._id="",this._placeholder="",this._tabindex=0,this._clearable=!0,this._showMaxCharacter=!0,this.minCharacter=4,this.maxCharacter=250,this._textColor="#363636",this._backgroundColor="#fff5eb",this._backgroundColorDisabled="#f0f0f0",this._padding=15,this._borderRadius=10,this._borderWidth=1,this._borderStyle="solid",this._borderColor="#363636",this._bottomTextColor="#9f9f9f",this._overMaxCharacterTextColor="#f10000",this._showScrollbarAlways=!0,this._fontFamily=null,this._fontSize=18,this._rows=7,this._outer=document.createElement("div"),this._input=document.createElement("textarea"),this._scrollbarStyle=null,this._bottom=null,this._maxCharactersIndicator=null,this._clearContainer=null,this._clearIcon=document.createElement("i"),this._clearText=document.createElement("div"),this._canvas=null,this._onTextChanged=new X.HN0,this._onFocusChanged=new X.HN0,this.onClear=new X.HN0,this.onTextValid=new X.HN0,this._showExternalPrompt=!1}get id(){return this._id?this._id:null}set text(q){this._input&&(this._input.value=q)}get text(){return this._input?this._input.value:null}get htmlText(){if(this._input)return this.escapeHTML(this._input.value)}get htmlOuterElement(){return this._outer}get htmlTextareaElement(){return this._input}get onTextChanged(){return this._onTextChanged}get onFocusChanged(){return this._onFocusChanged}create(){super.create(),this._localizer=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),this.createOuter(),this.createTextarea(this._outer),this.isShowMaxLength()&&this.createMaxLengthIndicator(this.getBottom(this._outer)),this._clearable&&this.createClearButton(this.getBottom(this._outer)),this.isExternalPromptRequired()&&(this._showExternalPrompt=!0),this.applyTransform(),this.addListeners()}isExternalPromptRequired(){return X.o5U.isAndroid()}setDisabled(q){this._input.disabled=q,this._input.style.backgroundColor=q?this._backgroundColorDisabled:this._backgroundColor}setClearContainerVisibility(q){this._clearContainer&&(this._clearContainer.style.display=q?"flex":"none")}addListeners(){this._onTextChangedHandler=q=>{this.setClearContainerVisibility(""!==this.text),this.updateMaxLengthIndicator(),this._onTextChanged.dispatch()},this._onFocusHandler=q=>{if(this._showExternalPrompt)return q.preventDefault(),q.stopImmediatePropagation(),void this._input.blur();this.handleFocusChanged(!0),this._onFocusChanged.dispatch()},this._onBlurHandler=q=>{if(this._showExternalPrompt)return q.preventDefault(),void q.stopImmediatePropagation();this.handleFocusChanged(!1)},this._onClickHandler=q=>(0,Q.sH)(this,void 0,void 0,(function*(){this._input.blur();const q=yield zy.y.showTextareaPrompt(this._placeholder,this.text,this.maxCharacter);X.Aq$.isDefined(q)&&(this.text=q,this.setClearContainerVisibility(""!==this.text),this.updateMaxLengthIndicator(),this._onTextChanged.dispatch())})),this._showExternalPrompt&&this._input.addEventListener("click",this._onClickHandler),this._input.addEventListener("focus",this._onFocusHandler),this._input.addEventListener("blur",this._onBlurHandler),this._onResizeHandler=q=>{window.setTimeout((()=>{this.applyTransform()}),1)},window.addEventListener("resize",this._onResizeHandler),this.enablePerKeyEvents(!0)}getPositionRelativeToParent(q,K={x:0,y:0}){const z={x:K.x+(q.legacyTransform?q.legacyTransform.x:q.transform.localPosition.x),y:K.y+(q.legacyTransform?q.legacyTransform.y:q.transform.localPosition.y)};return q.parent?this.getPositionRelativeToParent(q.parent,z):z}applyTransform(){this._canvas||(this._canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0]),this.setStyle("paddingLeft","0"),this.setStyle("paddingRight","0"),this.setStyle("paddingTop","0"),this.setStyle("paddingBottom","0"),this.setStyle("borderLeftWidth","0"),this.setStyle("borderRightWidth","0"),this.setStyle("borderTopWidth","0"),this.setStyle("borderBottomWidth","0");const{x:q,y:K}=this.getPositionRelativeToParent(this.GameObject);let z,Y;this.GameObject.transform instanceof X.XVE?(z=this.GameObject.transform.sizeDelta.width,Y=this.GameObject.transform.sizeDelta.height):this.GameObject.legacyTransform?(z=this.GameObject.legacyTransform.width,Y=this.GameObject.legacyTransform.height):X.VyI.log("The GameObject needs to have a RectTransform or LegacyTransform attached to it in order to size the input field appropriately.",X.$bb.Error);const Q=this._canvas.clientHeight/dt.q.instance.game.world.height,Z=this._canvas.clientWidth/dt.q.instance.game.world.width,J=Q*K+(this._outer.style.marginTop?parseInt(this._outer.style.marginTop):0),tt=Z*q+(this._outer.style.marginLeft?parseInt(this._outer.style.marginLeft):0),et=Q*this._fontSize;re.J.setOuterHeight(this._outer,Q*Y),re.J.setOuterWidth(this._outer,Z*z);const it=this._outer.style;it.top=`${J}px`,it.left=`${tt}px`,it.fontSize=`${et}px`,it.paddingTop=Q*this._padding+"px",it.paddingBottom=Q*this._padding+"px",it.paddingLeft=Z*this._padding+"px",it.paddingRight=Z*this._padding+"px";const st=this.GameObject.findComponentInParent(nt.B),at=null==st?void 0:st.getCollisionBox();at&&(Kat.worldTransform.ty+at.height||qat.worldTransform.tx+at.width?this.setStyle("display","none"):this.setStyle("display","unset"))}setVisible(q){this._outer.style.visibility=q?"visible":"hidden"}setOpacity(q){this._outer.style.opacity=q}setStyle(q,K){this._outer.style.setProperty(q,K)}enablePerKeyEvents(q){q?this._input.addEventListener("keyup",this._onTextChangedHandler):this._input.removeEventListener("keyup",this._onTextChangedHandler)}handleFocusChanged(q){q?dt.q.instance.game.input.keyboard.clearCaptures():dt.q.instance.game.input.keyboard.addKeyCapture([Hy.D.BACKSPACE])}removeExisting(){var q,K;this._scrollbarStyle&&document.head.removeChild(this._scrollbarStyle),null===(q=document.getElementById(this._id))||void 0===q||q.remove(),null===(K=this._bottom)||void 0===K||K.remove()}update(){super.update(),this.applyTransform()}destroy(){super.destroy(),this.onTextValid.dispose(),this._onTextChanged.dispose(),this._onFocusChanged.dispose(),this.onClear.dispose(),this._input.removeEventListener("keyup",this._onTextChangedHandler),this._input.removeEventListener("click",this._onClickHandler),this._input.removeEventListener("focus",this._onFocusHandler),this._input.removeEventListener("blur",this._onBlurHandler),window.removeEventListener("resize",this._onResizeHandler),this._onTextChangedHandler=null,this._onClickHandler=null,this._onFocusHandler=null,this._onBlurHandler=null,this._onResizeHandler=null,this._clearContainer&&(this._onClearClicked=null,this._clearContainer.removeEventListener("click",this._onClearClicked)),this.removeExisting()}createOuter(){this._outer.id=this._id;const q=this._outer.style;q.position="absolute",q.backgroundColor=this._backgroundColor,q.paddingLeft=`${this._padding}px`,q.paddingTop=`${this._padding}px`,q.paddingRight=`${this._padding}px`,q.paddingBottom=`${this._padding}px`,q.borderRadius=`${this._borderRadius}px`,q.borderWidth=`${this._borderWidth}px`,q.borderStyle=this._borderStyle,q.borderColor=this._borderColor,X.Aq$.isDefined(this._fontFamily)&&(q.fontFamily=this._fontFamily);document.getElementById("external-ui").appendChild(this._outer)}createTextarea(q){this._input.value="",this._input.id=`${this._id}textarea`,this._input.autocapitalize="off",this._input.autocomplete="off",this._input.tabIndex=this._tabindex,this._input.placeholder=X.Aq$.isDefined(this._placeholder)?this._placeholder:"",this._input.rows=this._rows;const K=this._input.style;K.padding="0px",K.margin="0px",K.resize="none",K.border="0px",K.backgroundColor="transparent",K.borderStyle="none",K.outline="none",K.color=this._textColor,K.textAlign="left",K.boxShadow="none",K.cursor="auto",this._showScrollbarAlways&&(K.overflowY="scroll"),q.appendChild(this._input),this.applyCustomScrollbarStyle()}applyCustomScrollbarStyle(){this._scrollbarStyle=document.createElement("style"),document.head.appendChild(this._scrollbarStyle),this._scrollbarStyle.innerHTML=`\n #${this._input.id}::-webkit-scrollbar {\n width: 32px;\n }\n #${this._input.id}::-webkit-scrollbar-track {\n border-image: url('${this.getSingleImageURL(338)}') 32 32;\n border-style: solid;\n border-width: 32px 0px 32px 32px;\n }\n #${this._input.id}::-webkit-scrollbar-thumb {\n border-image: url('${this.getSingleImageURL(339)}') 33 33;\n border-style: solid;\n border-width: 33px 0px 33px 33px;\n min-height: 66px;\n }\n `}getSingleImageURL(q){const K=dt.q.instance.prodigy.assets.getAsset(`singleImage-${q}`),z=K.filename;return`${se.s.get("GameConstants.Build.ASSETS_LOCATION")}${Ky.s.ASSET_FOLDER}/single-images/${z}/${K.v}/${z}.png`}getBottom(q){return this._bottom||(this._bottom=document.createElement("div"),this._bottom.style.color=this._bottomTextColor,q.appendChild(this._bottom)),this._bottom}isShowMaxLength(){return this._showMaxCharacter&&this.maxCharacter>0}createMaxLengthIndicator(q){this._maxCharactersIndicator=document.createElement("div");const K=this._maxCharactersIndicator.style;K.float="left",K.color=this._bottomTextColor,q.appendChild(this._maxCharactersIndicator),this.updateMaxLengthIndicator()}updateMaxLengthIndicator(){this._input.style.opacity=this._input.textLength>0?"1.0":"0.5",this._maxCharactersIndicator.innerText=this._localizer.getText("TEXTAREA_CHARACTERS",this._input.textLength,this.maxCharacter);const q=this._input.textLength>this.maxCharacter;this._maxCharactersIndicator.style.color=q?this._overMaxCharacterTextColor:this._bottomTextColor,this.onTextValid.dispatch(!q&&this._input.textLength>=this.minCharacter)}createClearButton(q){this._clearContainer=document.createElement("div"),this._clearContainer.style.float="right";const K=document.createElement("div");K.style.float="left",K.style.verticalAlign="middle",K.appendChild(this._clearIcon),this._clearContainer.appendChild(K),this._clearContainer.appendChild(this._clearText),this._clearIcon.className="fa fa-times",this._clearText.innerText=this._localizer.getText("INPUT_CLEAR"),X.Aq$.isDefined(this._fontFamily)&&(this._clearText.style.fontFamily=this._fontFamily),this._clearContainer.id=`${this._id}clear`,this._clearContainer.style.display="none",this._clearContainer.style.cursor="pointer",this.setClearContainerVisibility(!1),q.appendChild(this._clearContainer),this._onClearClicked=()=>{this.text="",this.setClearContainerVisibility(!1),this.updateMaxLengthIndicator(),this._input.focus(),this.onClear.dispatch()},this._clearContainer.addEventListener("click",this._onClearClicked)}escapeHTML(q){const K=document.createElement("textarea");return K.innerText=q,K.innerHTML.replace(/"/g,""").replace(/'/g,"'")}};(0,Q.Cg)([(0,X.W_S)(),(0,X.Lr6)(0),(0,X.nKb)("name"),(0,Q.Sn)("design:type",String)],Yy.prototype,"_id",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Yy.prototype,"_placeholder",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Yy.prototype,"_tabindex",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Yy.prototype,"_clearable",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Yy.prototype,"_showMaxCharacter",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Yy.prototype,"minCharacter",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Yy.prototype,"maxCharacter",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Yy.prototype,"_textColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Yy.prototype,"_backgroundColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Yy.prototype,"_backgroundColorDisabled",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Yy.prototype,"_padding",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Yy.prototype,"_borderRadius",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Yy.prototype,"_borderWidth",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Yy.prototype,"_borderStyle",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Yy.prototype,"_borderColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Yy.prototype,"_bottomTextColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],Yy.prototype,"_overMaxCharacterTextColor",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Yy.prototype,"_showScrollbarAlways",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Yy.prototype,"_fontFamily",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Yy.prototype,"_fontSize",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Yy.prototype,"_rows",void 0),Yy=(0,Q.Cg)([(0,X.EVk)("InputTextarea",et.Y.uiInput)],Yy);let Qy=class extends X.uAl{constructor(){super(...arguments),this.canBeEmpty=!1,this.onTextInvalid=new X.HN0,this.onTextValid=new X.HN0,this.onTextInvalidOnBlur=new X.HN0,this.invalid=!1}create(){super.create(),this._validationRegex&&(this.regex=new RegExp(this._validationRegex)),this._input.onTextChanged.add(this.performValidation,this),this._input.onBlur.add(this.updateErrorState,this)}destroy(){this.onTextInvalid.dispose(),this.onTextValid.dispose(),this.onTextInvalidOnBlur.dispose(),super.destroy()}performValidation(){this.invalid=!1,""===this._input.text?this.canBeEmpty||(this.invalid=!0,this._errorText.text=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("ERROR_INPUT_EMPTY")):this.regex&&(this.regex.test(this._input.text)?this.invalid=!1:(this.invalid=!0,this._errorText.text=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(this._errorMessageKey))),this.invalid?this.onTextInvalid.dispatch():(this.onTextValid.dispatch(),this._input.setInError(!1),this._errorText.GameObject.active=!1,this._errorText.text="")}updateErrorState(){this.invalid&&(this.onTextInvalidOnBlur.dispatch(),this._errorText.GameObject.active=!0,this._input.setInError(!0))}};(0,Q.Cg)([(0,X.MnK)(qt.S),(0,Q.Sn)("design:type",qt.S)],Qy.prototype,"_input",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Qy.prototype,"_validationRegex",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Qy.prototype,"_errorMessageKey",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Qy.prototype,"canBeEmpty",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Qy.prototype,"_errorText",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Qy.prototype,"onTextInvalid",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Qy.prototype,"onTextValid",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],Qy.prototype,"onTextInvalidOnBlur",void 0),Qy=(0,Q.Cg)([(0,X.EVk)("InputTextValidation",et.Y.uiInput)],Qy);var Xy=z(65231);let Zy=class extends Xy.s{constructor(){super(...arguments),this._imageContainer=null,this._backgroundContainer=null,this._rarityContainer=null,this._rarityConfig=null,this._rarityAtlas=ti._.Ui_card_json}get rarity(){var q,K;return null!==(K=null===(q=this._item.data)||void 0===q?void 0:q.rarity)&&void 0!==K?K:fo.E.Common}updateCard(){super.updateCard(),this.updateBackground()}get backgroundPrefabID(){return this.getRarityPrefabID()}updateBackground(){(0,fg.Ks)().load(this.backgroundPrefabID,this._backgroundContainer)}resetCard(){super.resetCard(),Wa.l.removeAll(this._backgroundContainer.legacyTransform.group,!0)}getRarityPrefabID(){switch(this.rarity){case fo.E.Legendary:return this._rarityConfig.rarityPrefabLegendary;case fo.E.Heroic:return this._rarityConfig.rarityPrefabEpic;case fo.E.Rare:return this._rarityConfig.rarityPrefabRare;case fo.E.Uncommon:return this._rarityConfig.rarityPrefabUncommon;case fo.E.Common:default:return this._rarityConfig.rarityPrefabCommon}}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zy.prototype,"_imageContainer",void 0),(0,Q.Cg)([(0,X.x4W)("rarityContainer"),(0,Q.Sn)("design:type",X._mx)],Zy.prototype,"_backgroundContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Zy.prototype,"_rarityContainer",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],Zy.prototype,"_rarityConfig",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],Zy.prototype,"_rarityAtlas",void 0),Zy=(0,Q.Cg)([(0,X.EVk)("LegacyItemCard",et.Y.ui)],Zy);var Jy,t_=z(63746);z(14801);!function(q){q[q.Name=0]="Name",q[q.FlavorText=1]="FlavorText"}(Jy||(Jy={}));let e_=class extends X.uAl{constructor(){super(...arguments),this._textTypeToRetrieve=Jy.Name,this._itemID=-1,this._itemType=""}create(){super.create(),this._itemType&&this._itemID&&this.updateText().catch(X.RQr.createHandler("Error updating text from item: "))}updateText(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield ae.t.secureGetItem(this._itemType,this._itemID);switch((0,wt.v)(null!==q,`Item was not found for ${this._itemType}-${this._itemID}`),this._textTypeToRetrieve){case Jy.Name:this._targetText.text=this._localizer.getText(re.J.getLocalizationNameKey(q));break;case Jy.FlavorText:this._targetText.text=this._localizer.getText(re.J.getLocalizationFlavorKey(q));break;default:X.VyI.log("Error updating text from item: Invalid text type",X.$bb.Error)}}))}setAsset(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=null){(q!==this._itemID||X.Aq$.isDefined(K)&&K!==this._itemType)&&(this._itemID=q,X.Aq$.isDefined(K)&&(this._itemType=K),yield this.updateText())}))}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],e_.prototype,"_targetText",void 0),(0,Q.Cg)([(0,X.gfw)(Jy),(0,Q.Sn)("design:type",Number)],e_.prototype,"_textTypeToRetrieve",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],e_.prototype,"_itemID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],e_.prototype,"_itemType",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],e_.prototype,"_localizer",void 0),e_=(0,Q.Cg)([(0,X.EVk)("ItemNameTextLoader",et.Y.item)],e_);let i_=class extends X.uAl{constructor(){super(...arguments),this._petSpineItemDataLoaders=[]}postCreate(){super.postCreate(),this.updatePetSpines()}updatePetSpines(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.petTeam.filter((q=>X.Aq$.isDefined(q)&&q.creatureType!==ta.V.Player));q.length>this._petSpineItemDataLoaders.length?X.VyI.log("There are not enough renderers to load all team pet spines.",X.$bb.Error):q.forEach(((q,K)=>{var z,Y;const Q=q.getID(),Z=this._petSpineItemDataLoaders[K];Z.setAssetID(Q),null===(Y=null===(z=Z.GameObject)||void 0===z?void 0:z.findComponentInChildren(fd.o))||void 0===Y||Y.updateGear(q.data.gear).catch(X.RQr.createHandler)}))}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(If.N),(0,Q.Sn)("design:type",Array)],i_.prototype,"_petSpineItemDataLoaders",void 0),i_=(0,Q.Cg)([(0,X.EVk)("LoadActiveTeamPetSpines",et.Y.animation)],i_);z(70704);let s_=class extends X.uAl{create(){if(super.create(),!this.primitive){const q=this.gameObject.addComponent(X.Lom),K=this.gameObject.legacyTransform;q.setSize(new X.or0(K.width,K.height)),this.primitive=q}this.target||(this.target=this.gameObject.legacyTransform),this.target.group.mask=this.primitive.getGraphics()}};(0,Q.Cg)([(0,X.MnK)(X.K16),(0,Q.Sn)("design:type",X.K16)],s_.prototype,"target",void 0),(0,Q.Cg)([(0,X.MnK)(X.sG1),(0,Q.Sn)("design:type",X.sG1)],s_.prototype,"primitive",void 0),s_=(0,Q.Cg)([(0,X.EVk)("Mask",et.Y.effect)],s_);let n_=class extends X.uAl{postCreate(){if(super.postCreate(),!this.primitive){const q=this.gameObject.addComponent(X.Lom),K=this.gameObject.findComponent(X.XVE);q.setSize(new X.or0(K.widthDelta,K.heightDelta)),this.primitive=q}this.target.getRootContainer()?this.applyMask():this.target.onRootContainerSet.addOnce(this.applyMask,this)}applyMask(){this.target.getRootContainer().mask=this.primitive.getGraphics()}};var a_,r_;(0,Q.Cg)([(0,X.MnK)(X.y4o),(0,Q.Sn)("design:type",X.y4o)],n_.prototype,"target",void 0),(0,Q.Cg)([(0,X.MnK)(X.sG1),(0,Q.Sn)("design:type",X.sG1)],n_.prototype,"primitive",void 0),n_=(0,Q.Cg)([(0,X.EVk)("MaskRenderComponent",et.Y.effect)],n_),function(q){q[q.Rectangle=0]="Rectangle",q[q.Circle=1]="Circle",q[q.Polygon=2]="Polygon"}(r_||(r_={}));let o_=a_=class extends X.uAl{constructor(){super(...arguments),this.maskType=r_.Rectangle}create(){super.create(),this.gameObject.onActiveChanged.add(this.applyMask),this.OnActiveChanged.add(this.applyMask)}applyMask(){if(this.getTarget(),!this.Active)return this.primitive=null,void this.applyMaskToTarget();this.getMask(new X.or0(this._target.width,this._target.height)),this.applyMaskToTarget()}getTarget(){let q=this.targetGameObject.findComponent(X.y4o);q||(q=this.targetGameObject.findComponent(X.K16)),q instanceof X.y4o?(this._target=q.getRootContainer(),q.onRootContainerSet.remove(this.applyMask),this._target||q.onRootContainerSet.addOnce(this.applyMask)):q instanceof X.K16&&(this._target=q)}getMask(q){const K=a_.MASK_TYPES[this.maskType];if(this.primitive=this.gameObject.findComponent(K),!this.primitive){const z=this.gameObject.addComponent(K);switch(z.constructor){case X.Lom:z.setSize(q);break;case X.ESH:z.setRadius(q.width);break;case X.Uuu:z.setPoints([new Ze.Point(0,0),new Ze.Point(q.width,0),new Ze.Point(q.width,q.height),new Ze.Point(0,q.height)])}this.primitive=z}this.primitive.create()}applyMaskToTarget(){var q,K;this._target instanceof Ze.Container?this._target.mask=null===(q=this.primitive)||void 0===q?void 0:q.getGraphics():this._target instanceof X.K16&&(this._target.group.mask=null===(K=this.primitive)||void 0===K?void 0:K.getGraphics())}destroy(){this.targetGameObject=null,this._target=null,this.primitive=null,super.destroy()}};o_.MASK_TYPES={[r_.Rectangle]:X.Lom,[r_.Circle]:X.ESH,[r_.Polygon]:X.Uuu},(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],o_.prototype,"targetGameObject",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],o_.prototype,"maskType",void 0),o_=a_=(0,Q.Cg)([(0,X.EVk)("MaskRenderer",et.Y.effect)],o_);let h_=class extends X.uAl{constructor(){super(...arguments),this.movementScale=1}create(){super.create(),this._initialLocalPosition=new X.I9Y,this._initialLocalPosition.copyFrom(this._transform.localPosition),this._initialWorldPosition=new X.I9Y,this._initialWorldPosition.copyFrom(this._transform.worldPosition),this._cameraTransform=X.i7d.main.GameObject.transform,this._cameraTransform.onWorldMatrixChanged.add(this.onCameraMoved,this),this.onCameraMoved()}destroy(){this._cameraTransform.onWorldMatrixChanged.remove(this.onCameraMoved,this),super.destroy()}onCameraMoved(){const q=new X.I9Y;q.copyFrom(this._cameraTransform.worldPosition),q.subtract(this._initialWorldPosition);const K=new X.I9Y;K.copyFrom(this._initialLocalPosition),K.x+=q.x*this.movementScale,K.y+=q.y*this.movementScale,this._transform.setPosition(Math.round(K.x),Math.round(K.y))}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],h_.prototype,"movementScale",void 0),(0,Q.Cg)([(0,X.Pqz)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],h_.prototype,"_transform",void 0),h_=(0,Q.Cg)([(0,X.EVk)("Parallax",et.Y.motion)],h_);z(57349),z(42838);let c_=class extends X.uAl{updateStats(q,K,z){const Y=ae.t.getItem("pet",q),Q=uo.P8.getBattleStats(Y,K,z);this._healthAmountText.text=Q.hp.toString(),this._speedAmountText.text=Q.speed.toString(),this._powerAmountText.text=Q.power.toString(),this._defenceAmountText.text=Q.defence.toString()}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],c_.prototype,"_healthAmountText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],c_.prototype,"_speedAmountText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],c_.prototype,"_powerAmountText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],c_.prototype,"_defenceAmountText",void 0),c_=(0,Q.Cg)([(0,X.EVk)("PetInfoScreenCard",et.Y.uiPet)],c_);z(41851);let d_=class extends X.uAl{constructor(){super(...arguments),this.maxWidth=0,this.maxHeight=0}create(){var q;super.create(),this.sizeToTarget(),null===(q=this._target.GameObject.transform)||void 0===q||q.onWorldMatrixChanged.add(this.sizeToTarget,this)}destroy(){var q;null===(q=this._target.GameObject.transform)||void 0===q||q.onWorldMatrixChanged.removeAll(this),super.destroy()}sizeToTarget(){var q;const K=null===(q=this._target.GameObject)||void 0===q?void 0:q.transform,z=this._target.getRootContainer();if(!K||!z)return;K.onWorldMatrixChanged.removeAll(this),K.pixiTransform;const Y=Math.round(z.width/z.scale.x),Q=Math.round(z.height/z.scale.y),Z=Math.min(this.maxWidth<=0?1:this.maxWidth/Y,this.maxHeight<=0?1:this.maxHeight/Q,1);X.cj9.isNearlyEqual(K.localScale.x,Z)||K.setScale(Z,Z),K.onWorldMatrixChanged.add(this.sizeToTarget,this)}};(0,Q.Cg)([(0,X.Pqz)(X.y4o),(0,Q.Sn)("design:type",X.y4o)],d_.prototype,"_target",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.xkT)("sizeToTarget"),(0,Q.Sn)("design:type",Number)],d_.prototype,"maxWidth",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.xkT)("sizeToTarget"),(0,Q.Sn)("design:type",Number)],d_.prototype,"maxHeight",void 0),d_=(0,Q.Cg)([(0,X.EVk)("RenderComponentSizeLimiter",et.Y.uiLayout)],d_);let l_=class extends X.uAl{constructor(){super(...arguments),this._ignoreTypecase=!1,this.onResult=new X.HN0}create(){super.create(),this._input.enablePerKeyEvents(!0),this._input.onTextChanged.add(this.validate,this),this._input.onBlur.add(this.validate,this)}validate(){if(""===this._input.text)return;const q=this.isInputValid();q?this._input.setValid(!0):this._input.setInError(!0),this.onResult.dispatch(q)}isInputValid(){return""!==this._validationString&&(this._ignoreTypecase&&"password"!==this._input.getType()?this._input.text.toLowerCase()===this._validationString.toLowerCase():this._input.text===this._validationString)}destroy(){this.onResult.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Pqz)(qt.S),(0,Q.Sn)("design:type",qt.S)],l_.prototype,"_input",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],l_.prototype,"_validationString",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],l_.prototype,"_ignoreTypecase",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],l_.prototype,"onResult",void 0),l_=(0,Q.Cg)([(0,X.EVk)("SimpleInputTextValidation",et.Y.uiInput)],l_);var u_;z(25132);!function(q){q.intersect=function(q,K){return{left:Math.max(q.left,K.left),right:Math.min(q.right,K.right),top:Math.max(q.top,K.top),bottom:Math.min(q.bottom,K.bottom)}}}(u_||(u_={}));class f_{constructor(){this._indices=[],this._vertices=[],this._uvs=[]}clipGeometry(q,K,z,Y){return this.clip={left:q,right:K,top:z,bottom:Y},this}addAxisAlignedQuad(q,K,z,Y,Q,X,Z,J){if(this.clip){const tt=Math.max(q,this.clip.left),et=Math.min(K,this.clip.right),it=Math.max(z,this.clip.top),st=Math.min(Y,this.clip.bottom);if(tt>=et||it>=st)return this;tt!==q&&(Q=this.mapValueInRange(tt,q,K,Q,X),q=tt),et!==K&&(X=this.mapValueInRange(et,q,K,Q,X),K=et),it!==z&&(Z=this.mapValueInRange(it,z,Y,Z,J),z=it),st!==Y&&(J=this.mapValueInRange(st,st,Y,J,J),Y=st)}let tt=this._vertices.length>>1;return this._indices.push(tt,tt,++tt,++tt,++tt,tt),this._vertices.push(q,z,q,Y,K,z,K,Y),this._uvs.push(Q,Z,Q,J,X,Z,X,J),this}addAxisAlignedQuadFromSubTexture(q,K,z,Y,Q){if(Q.trim){const{x:X,y:Z,width:J,height:tt}=Q.trim;q+=X,K+=X+J-Q.width,z+=Z,Y+=Z+tt-Q.height}const X=Q.frame,Z=Q.baseTexture.width,J=Q.baseTexture.height;return this.addAxisAlignedQuad(q,K,z,Y,X.left/Z,X.right/Z,X.top/J,X.bottom/J)}createMesh(q){const K=new Float32Array(this._vertices),z=new Float32Array(this._uvs),Y=new Uint16Array(this._indices);return new Ze.SimpleMesh(q,K,z,Y,Ze.DRAW_MODES.TRIANGLE_STRIP)}updateMesh(q){const K=q.visible;return K&&(q.visible=!1),q.geometry.getIndex().update(new Uint16Array(this._indices)),q.verticesBuffer.update(new Float32Array(this._vertices)),q.uvBuffer.update(new Float32Array(this._uvs)),K&&(q.visible=!0),this}mapValueInRange(q,K,z,Y,Q){return Y+(q-K)/(z-K)*(Q-Y)}}let b_=class extends X.y4o{constructor(){super(...arguments),this._topLeft=null,this._topRight=null,this._bottomLeft=null,this._bottomRight=null,this._topCenter=null,this._bottomCenter=null,this._leftCenter=null,this._rightCenter=null,this._center=null,this._tiling=!1,this._mesh=null,this._elementGroupSize=new X.or0}get _allElements(){return[this._topLeft,this._topCenter,this._topRight,this._leftCenter,this._center,this._rightCenter,this._bottomLeft,this._bottomCenter,this._bottomRight]}get clip(){return this._clip}set clip(q){this._clip=q,this.updateMesh()}get tint(){var q;return null===(q=this._mesh)||void 0===q?void 0:q.tintValue}set tint(q){const K="number"==typeof q?q:X.Q1f.hexToRGB(q);this._mesh?this._mesh.tint=K:this._initialTint=K}get alpha(){var q;return null===(q=this._mesh)||void 0===q?void 0:q.alpha}set alpha(q){this._mesh?this._mesh.alpha=q:this._initialAlpha=q}create(){super.create();const q=X.W$e.instance.game.cache.getTexture(this._center.atlas,this._center.frame);this._mesh=new Ze.SimpleMesh(new Ze.Texture(q.baseTexture),void 0,void 0,void 0,Ze.DRAW_MODES.TRIANGLE_STRIP),this._mesh.visible=!1,this.updateMesh(),X.Aq$.isDefined(this._initialTint)&&(this._mesh.tint=this._initialTint),X.Aq$.isDefined(this._initialAlpha)&&(this._mesh.alpha=this._initialAlpha),this.setRootContainer(this._mesh),this.gameObject.onDestroy.add((()=>{this.gameObject.transform instanceof X.XVE&&this.gameObject.transform.onRecalculatedBounds.remove(this.resizeToMatchRectTransform,this)}))}postCreate(){super.postCreate(),this.gameObject.transform instanceof X.XVE&&this.gameObject.transform.onRecalculatedBounds.add(this.resizeToMatchRectTransform,this)}isNineSlice(){return!!(this._topLeft&&this._topRight&&this._bottomLeft&&this._bottomRight)}isHorizontal3Slice(){return this._leftCenter&&this._rightCenter&&!this._topCenter&&!this._bottomCenter}isVertical3Slice(){return this._topCenter&&this._bottomCenter&&!this._leftCenter&&!this._rightCenter}updateMesh(){if(!this._mesh)return;const q=new f_;this._clip&&(q.clip=this._clip);const K=this._allElements.map((q=>q?this.getElementTexture(q):null)),z=K.map((q=>q?{x:q.width,y:q.height}:{x:0,y:0})),Y=Math.max(z[0].x,z[3].x,z[6].x),Q=Math.max(z[2].x,z[5].x,z[8].x),X=Math.max(z[0].y,z[1].y,z[2].y),Z=Math.max(z[6].y,z[7].y,z[8].y),J=this.getTargetDimensions(),tt=J.x-Y-Q,et=J.y-X-Z,it=Y+tt,st=X+et;this._topLeft&&q.addAxisAlignedQuadFromSubTexture(Y-z[0].x,Y,X-z[0].y,X,K[0]),this._topCenter&&q.addAxisAlignedQuadFromSubTexture(Y,it,X-z[1].y,X,K[1]),this._topRight&&q.addAxisAlignedQuadFromSubTexture(it,it+z[2].x,X-z[2].y,X,K[2]),this._leftCenter&&q.addAxisAlignedQuadFromSubTexture(Y-z[3].x,Y,X,st,K[3]),!this._tiling||this.isNineSlice()?q.addAxisAlignedQuadFromSubTexture(Y,it,X,st,K[4]):this.isHorizontal3Slice()?this.performTilingInOneDirection(!0,tt,et,q,K[4],Y,X):this.isVertical3Slice()&&this.performTilingInOneDirection(!1,et,tt,q,K[4],Y,X),this._rightCenter&&q.addAxisAlignedQuadFromSubTexture(it,it+z[5].x,X,st,K[5]),this._bottomLeft&&q.addAxisAlignedQuadFromSubTexture(Y-z[6].x,Y,st,st+z[6].y,K[6]),this._bottomCenter&&q.addAxisAlignedQuadFromSubTexture(Y,it,st,st+z[7].y,K[7]),this._bottomRight&&q.addAxisAlignedQuadFromSubTexture(it,it+z[8].x,st,st+z[8].y,K[8]),q.updateMesh(this._mesh)}getElementTexture(q){return X.W$e.instance.game.cache.getTexture(q.atlas,q.frame)}performTilingInOneDirection(q,K,z,Y,Q,X,Z){const J=K/(q?Q.width:Q.height);if(J<=0)return;const tt=Y.clip;let et,it=X,st=Z,nt=Q.width,at=Q.height,rt=0,ot=0;q?(et={left:X,right:X+K,top:Z,bottom:z},rt=nt,at=z):(et={left:X,right:X+z,top:Z,bottom:Z+K},ot=at,nt=z),tt&&(et=u_.intersect(tt,et)),Y.clip=et;for(let ht=0;ht")],b_);let p_=class extends X.uAl{constructor(){super(...arguments),this.onEvent=new X.HN0}create(){super.create(),this._spine.onEvent.add(((q,K)=>{var z,Y;((null!==(Y=null===(z=this._eventName)||void 0===z?void 0:z.length)&&void 0!==Y?Y:0)<1||K.data.name===this._eventName)&&this.onEvent.dispatch(q,K)}))}destroy(){this.onEvent.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.MnK)(gi.v),(0,Q.Sn)("design:type",gi.v)],p_.prototype,"_spine",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],p_.prototype,"_eventName",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],p_.prototype,"onEvent",void 0),p_=(0,Q.Cg)([(0,X.EVk)("SpineEventListener",et.Y.animation)],p_);let v_=class extends Yi.z{constructor(){super(...arguments),this._canEvolve=!1,this._justReadyToEvolve=!1}bindContext(){this.bindWithData(this._canEvolve,this._justReadyToEvolve)}bindWithData(q,K){this._canEvolve=q,this._justReadyToEvolve=K,this._context.Container.rebind(ms.hi.SpinePetEvolveBurst).toConstantValue(q&&K),this._context.Container.rebind(ms.hi.SpinePetEvolveIdle).toConstantValue(q),this.gameObject.findComponentsInChildren(Wo.B).forEach((q=>q.consume()))}setContainerData(q,K){this._canEvolve=q,this._justReadyToEvolve=K}};v_=(0,Q.Cg)([(0,X.EVk)("SpinePetDataProvider",et.Y.data)],v_);var g_=z(27625);let m_=class extends X.uAl{constructor(){super(...arguments),this._spineAssetID=null,this._animation=null,this._loop=!1}create(){super.create();const q=dt.q.instance.game;this._spineUI=new g_.I(q,this.GameObject.legacyTransform.group),this._spineUI.populate({spineKey:this._spineAssetID,animation:this._animation,loop:this._loop})}playAnimation(q,K){const z=X.Aq$.isDefined(q)?q:this._animation,Y=X.Aq$.isDefined(K)?K:this._loop;this._spineUI.playAnimation(z,Y)}};(0,Q.Cg)([(0,X.W_S)(),(0,X.nKb)("id"),(0,Q.Sn)("design:type",String)],m_.prototype,"_spineAssetID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,X.nKb)("animation"),(0,Q.Sn)("design:type",String)],m_.prototype,"_animation",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,X.nKb)("loop"),(0,Q.Sn)("design:type",Boolean)],m_.prototype,"_loop",void 0),m_=(0,Q.Cg)([(0,X.EVk)("SpineRendererUI",et.Y.ui)],m_);let y_=class extends X.uAl{constructor(){super(...arguments),this._hiddenSlots=[]}postCreate(){super.postCreate(),this._targetSpineComponent?this._targetSpineComponent.isLoaded?(this._spine=this._targetSpineComponent.getSpine()._pixiSpine,this.updateHiddenSlots()):this._targetSpineComponent.OnLoaded.addOnce((()=>{this._spine=this._targetSpineComponent.getSpine()._pixiSpine,this.updateHiddenSlots()})):X.VyI.log("[SpineSlotVisibilityController] No target spine component set",X.$bb.Info)}updateHiddenSlots(){this._hiddenSlots.forEach((q=>{this.hideSlot(q)}))}hideSlot(q){var K,z,Y,Q,X,Z,J,tt,et;const it=null===(z=null===(K=this._spine)||void 0===K?void 0:K.skeleton)||void 0===z?void 0:z.findSlotIndex(q);-1!==it&&null!==(null===(X=null===(Q=null===(Y=this._spine)||void 0===Y?void 0:Y.skeleton)||void 0===Q?void 0:Q.slots[it])||void 0===X?void 0:X.attachment)&&(null===(Z=this._spine)||void 0===Z||Z.hackTextureBySlotIndex(it,Ze.Texture.EMPTY),null===(et=null===(tt=null===(J=dt.q.instance)||void 0===J?void 0:J.game)||void 0===tt?void 0:tt.broadcaster)||void 0===et||et.broadcast(Xn.B.SlotVisibilityChanged,"SlotVisibility",[this.gameObject,q,!1]))}addHiddenSlot(q){this._hiddenSlots.includes(q)||(this._hiddenSlots.push(q),this.updateHiddenSlots())}unsetHiddenSlot(q){var K,z,Y,Q;this._hiddenSlots.includes(q)&&(null===(K=this._spine)||void 0===K||K.hackTextureBySlotName(q,null),this._hiddenSlots.splice(this._hiddenSlots.indexOf(q),1),null===(Q=null===(Y=null===(z=dt.q.instance)||void 0===z?void 0:z.game)||void 0===Y?void 0:Y.broadcaster)||void 0===Q||Q.broadcast(Xn.B.SlotVisibilityChanged,"SlotVisibility",[this.gameObject,q,!0]))}};(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],y_.prototype,"_targetSpineComponent",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],y_.prototype,"_hiddenSlots",void 0),y_=(0,Q.Cg)([(0,X.EVk)("SpineSlotVisibilityController",et.Y.ui)],y_);var __,E_=z(95359);!function(q){q.HighestStat="highestStat"}(__||(__={}));const w_={[E_.IE.Hp]:"small-stat-health",[E_.IE.Defence]:"small-stat-defense",[E_.IE.Power]:"small-stat-power",[E_.IE.Speed]:"small-stat-dodge"};let T_=class extends X.uAl{constructor(){super(...arguments),this._itemId=void 0,this._itemType=void 0,this.runOnCreate=!0}create(){super.create(),this.runOnCreate&&this.setIcon()}setIcon(){var q,K;const z=this.getInjectedValue((0,ms.F)("STAT_ICON_DISPLAY_ITEM_ID")),Y=this.getInjectedValue((0,ms.F)("STAT_ICON_DISPLAY_ITEM_TYPE")),Q=null===(q=ae.t.getItem(Y,z))||void 0===q?void 0:q.data;if(null==Q?void 0:Q.stats){let q;switch(this._statIconDisplayCriteria){case __.HighestStat:q=Object.keys(Q.stats).reduce(((q,K)=>Q.stats[q]>=Q.stats[K]?q:K))}const z=w_[q],Y=ti._.Ui_battle_revamp_json;null===(K=this._icon)||void 0===K||K.setAsset(Y,z).catch(X.RQr.createHandler(`StatIconDisplayComponent: Failed to set the asset for the icon with frame ${z} in atlas ${Y}`))}}};(0,Q.Cg)([(0,X.gfw)(__),(0,Q.Sn)("design:type",String)],T_.prototype,"_statIconDisplayCriteria",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,Q.Sn)("design:type",si._)],T_.prototype,"_icon",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],T_.prototype,"runOnCreate",void 0),T_=(0,Q.Cg)([(0,X.EVk)("StatIconDisplay",et.Y.ui)],T_);let S_=class extends X.uAl{constructor(){super(...arguments),this._rarityAtlas=ti._.Ui_card_json,this._rarityConfig=null}changeRarity(q,K=!1){var z;if(!this._backgroundObject||q!==this._currentRarity||K!==this._currentLockedStatus){null===(z=this._loadBackgroundPromise)||void 0===z||z.cancel();const Y=K?this._rarityConfig.lockedItemPrefab:this.getBackgroundPrefabID(q);this._loadBackgroundPromise=X.Uoy.getInjectedValue(this.gameObject,"983-05a7").loadWithDependencies(Y),this._loadBackgroundPromise.then((z=>{var Y;null===(Y=this._backgroundObject)||void 0===Y||Y.destroy(),this._backgroundObject=z,this._cardBanner.active=!K,this._cardBannerDimmed.active=K,this.gameObject.addChild(this._backgroundObject),this._currentRarity=q,this._currentLockedStatus=K})).catch(X.RQr.createHandler("Error loading card rarity background"))}}clearBackground(){var q,K;null===(q=this._backgroundObject)||void 0===q||q.destroy(),null===(K=this._loadBackgroundPromise)||void 0===K||K.cancel(),this._currentRarity=null,this._currentLockedStatus=null}getBackgroundPrefabID(q){switch(q){case fo.E.Legendary:return this._rarityConfig.rarityPrefabLegendary;case fo.E.Heroic:return this._rarityConfig.rarityPrefabEpic;case fo.E.Rare:return this._rarityConfig.rarityPrefabRare;case fo.E.Uncommon:return this._rarityConfig.rarityPrefabUncommon;case fo.E.Common:default:return this._rarityConfig.rarityPrefabCommon}}destroy(){var q;null===(q=this._loadBackgroundPromise)||void 0===q||q.cancel(),super.destroy()}};(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],S_.prototype,"_rarityAtlas",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],S_.prototype,"_rarityConfig",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],S_.prototype,"_cardBanner",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],S_.prototype,"_cardBannerDimmed",void 0),S_=(0,Q.Cg)([(0,X.EVk)("ItemRarityBackground",X.YH6.ui)],S_);let A_=class extends X.uAl{constructor(){super(...arguments),this._quantityText=null,this._quantityCircle=null,this._displayThresholdMin=1,this._displayThresholdMax=99}setQuantity(q){q>=this._displayThresholdMin?(this.setIconVisible(!0),q{var Y,Q;q.active=z===(null!==(Q=null===(Y=K.data)||void 0===Y?void 0:Y.rarity)&&void 0!==Q?Q:0)})),this._stackElements&&(this._stackElements.active=z>1),this._itemAmountText.text=z.toString()}destroy(){this.onImageLoaded.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],C_.prototype,"_rarityBackgrounds",void 0),(0,Q.Cg)([(0,X.MnK)(gs.X),(0,Q.Sn)("design:type",gs.X)],C_.prototype,"_itemIconContainer",void 0),(0,Q.Cg)([(0,X.MnK)(Sg.M),(0,Q.Sn)("design:type",Sg.M)],C_.prototype,"_renderPlayerAsTexture",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],C_.prototype,"_stackElements",void 0),(0,Q.Cg)([(0,X.MnK)(e_),(0,Q.Sn)("design:type",e_)],C_.prototype,"_itemNameText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],C_.prototype,"_itemAmountText",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],C_.prototype,"onImageLoaded",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Function)],C_.prototype,"_currentPlayer",void 0),C_=(0,Q.Cg)([(0,X.EVk)("StoreItemDisplayCard",et.Y.ui)],C_);z(46548);let O_=class extends X.y4o{constructor(){super(...arguments),this._repeatXCount=0,this._repeatYCount=0,this._renderTexture=null,this._sprite=null}create(){super.create();const q=dt.q.instance.game;this._renderTexture=q.add.renderTexture(this._tileColumns*(this._repeatXCount+1)*this._tileSize,this._tileRows*(this._repeatYCount+1)*this._tileSize),this._sprite=dt.q.instance.prodigy.create.image(0,0,void 0,void 0,this._renderTexture),this._sprite.roundPixels=!0,this._sprite.smoothed=!1,this.setRootContainer(this._sprite);const K=dt.q.instance.prodigy.gameContainer.get(X.t5G.AssetLoader);K.isLoaded(this._tilesetKey,X.iO0.Image)?this.renderTiles():K.loadAssets([this._tilesetKey]).then((()=>{this.renderTiles()}))}destroy(){this._sprite.destroy(),this._renderTexture.destroy(!0),super.destroy()}renderTiles(){const q=dt.q.instance.game.cache.getImage(this._tilesetKey);if(!q)return;const K=q.width/this._tileSize,z=dt.q.instance.prodigy.create.image(0,0,this._tilesetKey),Y=this._tileColumns*(this._repeatXCount+1),Q=this._tileRows*(this._repeatYCount+1);for(let X=0;X{this._loadedPrefab=q,q.active=this._videoEnded})).catch(X.RQr.createHandler("VideoFollowUpComponent: Error loading follow-up prefab")))}onVideoEnded(){X.Aq$.isDefined(this._followUpGuid)&&(this._videoEnded=!0,X.Aq$.isDefined(this._loadedPrefab)&&(this._loadedPrefab.active=!0),this.hideObjects())}onMembershipAcquired(){this._followUpGuid=this.getInjectedValue(ms.Wr.MemberFollowupPrefabGuid),X.Aq$.isDefined(this._followUpGuid)?(this.hideObjects(),dt.q.instance.prodigy.game.broadcaster.addAppListener(Xn.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this)):this._fallbackSignal.dispatch()}handleMembershipRewardsFlowComplete(){dt.q.instance.prodigy.game.broadcaster.removeAppListener(Xn.H3.MembershipRewardsFlowComplete,this),dt.q.instance.prodigy.open.prefabMenu({prefabID:this._followUpGuid,isModal:!0})}hideObjects(){for(const q of this._objectsToHide)q.active=!1}destroy(){var q;null===(q=this._loadingPromise)||void 0===q||q.cancel(),this._loadingPromise=void 0,this._closeSignal.dispose(),this._fallbackSignal.dispose(),dt.q.instance.prodigy.game.broadcaster.removeAppListener(Xn.H3.MembershipRewardsFlowComplete,this),super.destroy()}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],I_.prototype,"_followUpGuid",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],I_.prototype,"_prefabParent",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],I_.prototype,"_objectsToHide",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],I_.prototype,"_closeSignal",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],I_.prototype,"_fallbackSignal",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],I_.prototype,"_prefabLoader",void 0),I_=(0,Q.Cg)([(0,X.EVk)("VideoFollowUpComponent",et.Y.uiVideo)],I_);z(71072);let D_=class extends X.uAl{constructor(){super(...arguments),this._onAllowed=new X.HN0,this._onDisallowedMessageClosed=new X.HN0}check(){const q=this._featureFlags.getValue("enableYouTubeAd",!1),K=this._featureFlags.getValue("enableYouTubeTimeCheck",!0),z=this._featureFlags.getValue("useServerTimeForVideoLockout",!0)?new Date(dt.q.instance.prodigy.timeManager.getServerTimeMs()):new Date;let Y=null;q?K&&re.J.isSchoolDay(z)&&re.J.isDateWithinSchoolHours(z)?Y="OPENING_A_VIDEO_DURING_SCHOOL":Qs.pF.isNativeApp()&&(Y="OPEN_URL_IN_APP"):Y="YOUTUBE_DISABLED_MESSAGE",Y?dt.q.instance.prodigy.open.message(this._localizer.getText(Y),(()=>{this._onDisallowedMessageClosed.dispatch()})):this._onAllowed.dispatch()}destroy(){this._onAllowed.dispose(),this._onDisallowedMessageClosed.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.Oap)],D_.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.Cdj)("f71-42eb"),(0,Q.Sn)("design:type",Object)],D_.prototype,"_featureFlags",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],D_.prototype,"_onAllowed",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],D_.prototype,"_onDisallowedMessageClosed",void 0),D_=(0,Q.Cg)([(0,X.EVk)("OpenVideoGuard",et.Y.uiVideo)],D_);var R_=z(95429);let P_=class extends X.uAl{sendCTA(){this.send("click-CTA")}sendClose(){this.send("close-popup")}send(q){this._gameCompleteEvent.name=q,this._gameCompleteEvent.value=this._videoMenu.videoPlayer.errorReason?"-1":this._videoMenu.getMinimumThresholdReached().toString()}};(0,Q.Cg)([(0,X.MnK)(R_.k),(0,Q.Sn)("design:type",R_.k)],P_.prototype,"_videoMenu",void 0),(0,Q.Cg)([(0,X.MnK)(zm.b),(0,Q.Sn)("design:type",zm.b)],P_.prototype,"_gameCompleteEvent",void 0),P_=(0,Q.Cg)([(0,X.EVk)("SendVideoCloseMetric",et.Y.uiVideo)],P_);let M_=class extends X.uAl{getCustomData(){return{video_loaded:this._videoMenu.videoPlayer.isReady,error_msg:this._videoMenu.videoPlayer.errorReason}}};(0,Q.Cg)([(0,X.MnK)(R_.k),(0,Q.Sn)("design:type",R_.k)],M_.prototype,"_videoMenu",void 0),M_=(0,Q.Cg)([(0,X.EVk)("AppendVideoData",et.Y.uiVideo)],M_);z(62053);var N_=z(83142),x_=z(11682);let L_=class extends N_.D{constructor(){super(...arguments),this._menu=null,this._icon=null,this._tooltip=null,this._headerText=null,this._messageText=null,this._highlightText=null,this._highlightBox=null}loadVideoConfig(q){const K=q;this._tooltip.active=!1;const z=X.Aq$.isDefined(K.header),Y=X.Aq$.isDefined(K.message),Q=X.Aq$.isDefined(K.icon);z&&Y&&Q&&this.setUpTooltip(K)}setUpTooltip(q){var K;this._headerText&&(this._headerText.TextObject.text=q.header),this._messageText&&(this._messageText.TextObject.text=q.message),X.Aq$.isDefined(q.highlight)?this._highlightText&&(this._highlightText.TextObject.text=q.highlight):this._highlightBox.active=!1,null===(K=this._icon)||void 0===K||K.setAsset(q.icon),this.addVideoStartListener(q.videoID)}addVideoStartListener(q){this._menu.videoPlayer.onPlayerStateChange.add((()=>{this._tooltip.active||this._menu.videoPlayer.getPlayerState()!==x_.w.Playing||(this._tooltip.active=!0)}))}};(0,Q.Cg)([(0,X.MnK)(R_.k),(0,X.Lr6)(0),(0,X.nKb)("menu"),(0,Q.Sn)("design:type",R_.k)],L_.prototype,"_menu",void 0),(0,Q.Cg)([(0,X.MnK)(si._),(0,X.Lr6)(0),(0,X.nKb)("icon"),(0,Q.Sn)("design:type",si._)],L_.prototype,"_icon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,X.Lr6)(0),(0,X.nKb)("tooltip"),(0,Q.Sn)("design:type",X._mx)],L_.prototype,"_tooltip",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,X.Lr6)(0),(0,X.nKb)("header"),(0,Q.Sn)("design:type",X.EYj)],L_.prototype,"_headerText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,X.Lr6)(0),(0,X.nKb)("message"),(0,Q.Sn)("design:type",X.EYj)],L_.prototype,"_messageText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,X.Lr6)(0),(0,X.nKb)("highlight"),(0,Q.Sn)("design:type",X.EYj)],L_.prototype,"_highlightText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,X.Lr6)(0),(0,X.nKb)("highlightBox"),(0,Q.Sn)("design:type",X._mx)],L_.prototype,"_highlightBox",void 0),L_=(0,Q.Cg)([(0,X.EVk)("VideoTooltipComponent",et.Y.uiVideo)],L_);let k_=class extends X.uAl{constructor(){super(...arguments),this.anyFestivalIsActive=new X.HN0,this.specificFestivalIsActive=new X.HN0,this.specificFestivalIsNotActive=new X.HN0,this._runOnLoad=!0}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this.anyFestivalIsActive.dispose(),this.specificFestivalIsActive.dispose(),this.specificFestivalIsNotActive.dispose(),super.destroy()}check(){var q;const K=null===(q=dt.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival())||void 0===q?void 0:q.type;X.Aq$.isDefined(K)?(this.anyFestivalIsActive.dispatch(),this.festivalID===K?this.specificFestivalIsActive.dispatch():this.specificFestivalIsNotActive.dispatch()):this.specificFestivalIsNotActive.dispatch()}};(0,Q.Cg)([(0,X.gfw)(hv.Q),(0,Q.Sn)("design:type",Number)],k_.prototype,"festivalID",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],k_.prototype,"anyFestivalIsActive",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],k_.prototype,"specificFestivalIsActive",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],k_.prototype,"specificFestivalIsNotActive",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],k_.prototype,"_runOnLoad",void 0),k_=(0,Q.Cg)([(0,X.EVk)("ActiveFestivalGuard",et.Y.utility)],k_);var B_=z(72012);let U_=class extends B_.y{constructor(){super(...arguments),this._booleanStates=[]}create(){super.create(),this.checkStatesValue();const q=this._booleanStates.length;for(let K=0;K.5?1:-1;this.gameObject.transform.setScale(q*z,K)}}};(0,Q.Cg)([(0,X.gfw)(sE),(0,Q.Sn)("design:type",String)],nE.prototype,"_startingDirection",void 0),(0,Q.Cg)([(0,X.gfw)(sE),(0,Q.Sn)("design:type",String)],nE.prototype,"_targetDirection",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],nE.prototype,"_runOnCreate",void 0),nE=(0,Q.Cg)([(0,X.EVk)("FaceDirection",et.Y.utility)],nE);let aE=class extends X.uAl{constructor(){super(...arguments),this._shouldFlipOnXAxis=!0,this._shouldFlipOnYAxis=!1,this._isLeftFacing=!1,this._isTopFacing=!1,this._shouldRunOnUpdate=!1}create(){super.create(),this.faceCenter()}update(){super.update(),this._shouldRunOnUpdate&&this.faceCenter()}faceCenter(){const q=dt.q.instance.game.width/2,K=dt.q.instance.game.height/2,z=this.GameObject.transform?this.GameObject.transform.worldPosition:this.GameObject.legacyTransform.group.getGlobalPosition(),Y=this.GameObject.transform?this.GameObject.transform.localScale:this.GameObject.legacyTransform.group.scale;let Q=Y.x,X=Y.y;this._shouldFlipOnXAxis&&(Q=this._isLeftFacing?z.xq?-Math.abs(Y.x):Math.abs(Y.x)),this._shouldFlipOnYAxis&&(X=this._isTopFacing?z.yK?-Math.abs(Y.y):Math.abs(Y.y)),this.GameObject.transform?this.GameObject.transform.setScale(Q,X):(this.GameObject.legacyTransform.group.scale.x=Q,this.GameObject.legacyTransform.group.scale.y=X)}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],aE.prototype,"_shouldFlipOnXAxis",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],aE.prototype,"_shouldFlipOnYAxis",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],aE.prototype,"_isLeftFacing",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],aE.prototype,"_isTopFacing",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],aE.prototype,"_shouldRunOnUpdate",void 0),aE=(0,Q.Cg)([(0,X.EVk)("FaceTowardCenterComponent",et.Y.utility)],aE);var rE=z(64593);let oE=class extends X.uAl{toggleFullScreen(){dt.q.instance.prodigy.game.scale.isFullScreen?this.exitFullScreen():this.enterFullScreen()}enterFullScreen(){dt.q.instance.prodigy.game.scale.fullScreenScaleMode=rE.y.EXACT_FIT,dt.q.instance.prodigy.game.scale.fullScreenTarget=document.body,dt.q.instance.prodigy.game.scale.startFullScreen()}exitFullScreen(){dt.q.instance.prodigy.game.scale.stopFullScreen()}};oE=(0,Q.Cg)([(0,X.EVk)("FullScreen",et.Y.utility)],oE);let hE=class extends X.uAl{constructor(){super(...arguments),this.onInFullscreenMode=new X.HN0,this.onNotInFullscreenMode=new X.HN0,this.runOnLoad=!1}create(){super.create(),this.runOnLoad&&this.check()}destroy(){this.onInFullscreenMode.dispose(),this.onNotInFullscreenMode.dispose(),super.destroy()}check(){dt.q.instance.prodigy.game.scale.isFullScreen?this.onInFullscreenMode.dispatch():this.onNotInFullscreenMode.dispatch()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],hE.prototype,"onInFullscreenMode",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],hE.prototype,"onNotInFullscreenMode",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],hE.prototype,"runOnLoad",void 0),hE=(0,Q.Cg)([(0,X.EVk)("FullScreenGuard",et.Y.utility)],hE);let cE=class extends At._{constructor(){super(...arguments),this._onComparisonTrue=new X.HN0,this._onComparisonFalse=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this._onComparisonTrue.dispose(),this._onComparisonFalse.dispose(),super.destroy()}check(){var q;(null===(q=se.A.get(this._gameConstantKey))||void 0===q?void 0:q.toString())===this._comparisonString?this._onComparisonTrue.dispatch():this._onComparisonFalse.dispatch()}getData(){return se.A.get(this._gameConstantKey)}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],cE.prototype,"_onComparisonTrue",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],cE.prototype,"_onComparisonFalse",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],cE.prototype,"_runOnLoad",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],cE.prototype,"_gameConstantKey",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],cE.prototype,"_comparisonString",void 0),cE=(0,Q.Cg)([(0,X.EVk)("GameConstantComparatorGuard",et.Y.utility)],cE);let dE=class extends X.uAl{constructor(){super(...arguments),this._index=0,this._onValueExtracted=new X.HN0}extractValue(q){!q||this._index>=q.length?X.VyI.log("[GetValueFromArrayComponent] Warning: Attempting to extract value from an array with an index out of bounds",X.$bb.Warning):this._onValueExtracted.dispatch(q[this._index])}destroy(){this._onValueExtracted.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],dE.prototype,"_index",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],dE.prototype,"_onValueExtracted",void 0),dE=(0,Q.Cg)([(0,X.EVk)("GetValueFromArray",et.Y.utility)],dE);let lE=class extends X.uAl{constructor(){super(...arguments),this._booleanStates=[],this.onResult=new X.HN0,this._value=!1}get value(){return this._value}checkEvery(){this._value=this._booleanStates.every((q=>!0===q.getValue())),this.onResult.dispatch(this.value)}destroy(){this.onResult.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(B_.y),(0,Q.Sn)("design:type",Array)],lE.prototype,"_booleanStates",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],lE.prototype,"onResult",void 0),lE=(0,Q.Cg)([(0,X.EVk)("GroupBooleanStateCheckValue",et.Y.utility)],lE);let uE=class extends X.uAl{constructor(){super(...arguments),this.hideWhenNotMobile=!1}create(){this.gameObject.active=X.o5U.isMobile()===this.hideWhenNotMobile}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],uE.prototype,"hideWhenNotMobile",void 0),uE=(0,Q.Cg)([(0,X.EVk)("HideOnMobile",et.Y.utility)],uE);z(70005);let fE=class extends X.uAl{constructor(){super(...arguments),this._onHome=new X.HN0,this._onSchool=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.checkLocation()}checkLocation(){this._playerData.player.isPlayingAtSchool()?this._onSchool.dispatch():this._onHome.dispatch()}destroy(){this._onSchool.dispose(),this._onHome.dispose(),super.destroy()}checkLocationForZone(q){dt.q.instance.prodigy.classModeController.isLockedZone(q)?this._onSchool.dispatch():this._onHome.dispatch()}showZoneLockMessage(q){dt.q.instance.prodigy.classModeController.onClassMode(q)}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],fE.prototype,"_playerData",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],fE.prototype,"_onHome",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],fE.prototype,"_onSchool",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],fE.prototype,"_runOnLoad",void 0),fE=(0,Q.Cg)([(0,X.EVk)("IsAtHomeOrSchool",et.Y.utility)],fE);let bE=class extends X.uAl{constructor(){super(...arguments),this._zones=[],this.isInZone=new X.HN0,this.isNotInZone=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.checkIfPlayerIsInZone()}destroy(){this.isInZone.dispose(),this.isNotInZone.dispose(),super.destroy()}checkIfPlayerIsInZone(){let q=!1;this._zones.forEach((K=>{dt.q.instance.prodigy.world.getCurrentZone()===K&&(q=!0)})),q?this.isInZone.dispatch():this.isNotInZone.dispatch()}};(0,Q.Cg)([(0,X.SZi)(),(0,X.gfw)(Yt.A_),(0,Q.Sn)("design:type",Array)],bE.prototype,"_zones",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],bE.prototype,"isInZone",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],bE.prototype,"isNotInZone",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],bE.prototype,"_runOnLoad",void 0),bE=(0,Q.Cg)([(0,X.EVk)("IsInZoneGuard",et.Y.utility)],bE);let pE=class extends X.uAl{constructor(){super(...arguments),this._parentTransform=null,this._scaleX=1,this._scaleY=1}update(){super.update(),this._parentTransform.localScale.x!==this._scaleX&&(this.gameObject.transform.localScale.x*=-1,this._scaleX=this._parentTransform.localScale.x),this._parentTransform.localScale.y!==this._scaleY&&(this.gameObject.transform.localScale.y*=-1,this._scaleY=this._parentTransform.localScale.y)}};(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],pE.prototype,"_parentTransform",void 0),pE=(0,Q.Cg)([(0,X.EVk)("KeepScaleOrientation",et.Y.utility)],pE);let vE=class extends X.uAl{constructor(){super(...arguments),this._holdOnCreate=!0,this._isCritical=!1,this._timeoutMs=0,this.onComplete=new X.HN0,this.onTimeout=new X.HN0,this.onError=new X.HN0}create(){super.create(),this._holdOnCreate&&this.registerWithLoadingScreen()}registerWithLoadingScreen(){if(X.Aq$.isDefined(this._promise))return void X.VyI.log("LoadingWaitComponent is already registered with the loading screen. Call complete() or fail() before registering again.",X.$bb.Error);this._promise=new X.bnh,this._timeoutMs>0&&(this._timeoutId=window.setTimeout((()=>{this.timeout()}),this._timeoutMs));const q=dt.q.instance.game.state.get(Nt.G.Loading);q?q.waitFor(this._promise,this._isCritical):X.VyI.log("Loading screen not available, cannot register LoadingWaitComponent",X.$bb.Warning)}complete(){var q;this.clearTimeout(),null===(q=this._promise)||void 0===q||q.resolve(),this._promise=void 0,this.onComplete.dispatch()}fail(q="Operation failed"){var K;this.clearTimeout(),null===(K=this._promise)||void 0===K||K.reject(q),this._promise=void 0,this.onError.dispatch(q)}timeout(){var q,K;this._timeoutId=void 0,this._isCritical?null===(q=this._promise)||void 0===q||q.reject(new Error("Loading operation timed out")):null===(K=this._promise)||void 0===K||K.resolve(),this.onTimeout.dispatch()}clearTimeout(){X.Aq$.isDefined(this._timeoutId)&&(window.clearTimeout(this._timeoutId),this._timeoutId=void 0)}destroy(){this._promise=void 0,this.clearTimeout(),this.onComplete.dispose(),this.onTimeout.dispose(),this.onError.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.vkK)(),(0,X.YLv)("If true, the loading screen will be held immediately upon creation."),(0,Q.Sn)("design:type",Boolean)],vE.prototype,"_holdOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,X.YLv)("If true, loading will show an error popup if the operation fails."),(0,Q.Sn)("design:type",Boolean)],vE.prototype,"_isCritical",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.YLv)("Optional timeout in milliseconds. Set to 0 for no timeout."),(0,Q.Sn)("design:type",Number)],vE.prototype,"_timeoutMs",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vE.prototype,"onComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vE.prototype,"onTimeout",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vE.prototype,"onError",void 0),vE=(0,Q.Cg)([(0,X.EVk)("LoadingScreenHold",et.Y.utility)],vE);let gE=class extends X.uAl{create(){super.create(),this.logOnCreate&&this.LogMessage()}LogMessage(q){let K="";q&&q.length>0?K=q:this.defaultMessage&&this.defaultMessage.length>0&&(K=this.defaultMessage),X.VyI.log(`[PREFAB LOG]: ${K}`,X.$bb.Verbose)}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],gE.prototype,"defaultMessage",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],gE.prototype,"logOnCreate",void 0),gE=(0,Q.Cg)([(0,X.EVk)("Log",et.Y.utility)],gE);let mE=class extends X.uAl{constructor(){super(...arguments),this.membershipSuppressOn=new X.HN0,this.membershipSuppressOff=new X.HN0,this._shouldSuppressAd=!1}set suppressAdEnabled(q){this._shouldSuppressAd=q}get suppressAdEnabled(){return this._shouldSuppressAd}create(){super.create(),this.suppressAdEnabled=re.J.shouldSuppressAd(dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player)}run(){this._shouldSuppressAd?this.membershipSuppressOn.dispatch():this.membershipSuppressOff.dispatch()}destroy(){this.membershipSuppressOn.dispose(),this.membershipSuppressOff.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mE.prototype,"membershipSuppressOn",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mE.prototype,"membershipSuppressOff",void 0),mE=(0,Q.Cg)([(0,X.EVk)("MembershipSuppression",et.Y.membership)],mE);let yE=class extends X.uAl{constructor(){super(...arguments),this.onIsVisible=new X.HN0,this.onNotVisible=new X.HN0}create(){super.create(),this._broadcaster=dt.q.instance.game.broadcaster,this._broadcaster.addAppListener(Xn.J8.MorphMarbleUsed,this.dispatchIsVisible.bind(this),this),this._broadcaster.addAppListener(Xn.J8.MorphMarbleCancelled,this.checkMorphMarbleState.bind(this),this),this._runOnLoad&&this.checkMorphMarbleState()}destroy(){var q,K;this.onIsVisible.dispose(),this.onNotVisible.dispose(),null===(q=this._broadcaster)||void 0===q||q.removeAppListener(Xn.J8.MorphMarbleUsed,this),null===(K=this._broadcaster)||void 0===K||K.removeAppListener(Xn.J8.MorphMarbleCancelled,this),super.destroy()}checkMorphMarbleState(){this._playerProvider.player.isPlayerTransformed()?this.onIsVisible.dispatch():this.onNotVisible.dispatch()}dispatchIsVisible(){this.onIsVisible.dispatch()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],yE.prototype,"_playerProvider",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],yE.prototype,"_runOnLoad",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],yE.prototype,"onIsVisible",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],yE.prototype,"onNotVisible",void 0),yE=(0,Q.Cg)([(0,X.EVk)("MorphMarbleState",et.Y.utility)],yE);let _E=class extends X.uAl{constructor(){super(...arguments),this._checkOnCreate=!1,this._onValueChanged=new X.HN0,this._onValueChecked=new X.HN0}create(){super.create(),this._checkOnCreate&&this.checkValue()}setValue(q){q!==this._numberValue&&(this._numberValue=q,this._onValueChanged.dispatch(this._numberValue))}checkValue(){this._onValueChecked.dispatch(this._numberValue)}destroy(){this._onValueChanged.dispose(),this._onValueChecked.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],_E.prototype,"_numberValue",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],_E.prototype,"_checkOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],_E.prototype,"_onValueChanged",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],_E.prototype,"_onValueChecked",void 0),_E=(0,Q.Cg)([(0,X.EVk)("NumberState",et.Y.utility)],_E);let EE=class extends X.uAl{constructor(){super(...arguments),this.reportInitialState=!1,this.treatInactiveAsOffScreen=!1,this.onStateChange=new X.HN0,this.onEnteredScreen=new X.HN0,this.onLeftScreen=new X.HN0}create(){super.create(),this._gameWidth=X.W$e.instance.game.width,this._gameHeight=X.W$e.instance.game.height,this.reportInitialState?this.checkOnScreenIfActive():this._isOnScreen=this.isOnScreen(),this.gameObject.transform.onWorldMatrixChanged.add(this.checkOnScreenIfActive,this)}destroy(){this.gameObject.transform.onWorldMatrixChanged.remove(this.checkOnScreenIfActive,this),this.onStateChange.dispose(),this.onEnteredScreen.dispose(),this.onLeftScreen.dispose(),super.destroy()}checkOnScreenIfActive(){this.Active&&this.checkOnScreen()}checkOnScreen(){const q=this.isOnScreen();q!==this._isOnScreen&&(this._isOnScreen=q,this.onStateChange.dispatch(q),q?this.onEnteredScreen.dispatch():this.onLeftScreen.dispatch())}isOnScreen(){if(this.treatInactiveAsOffScreen&&!this.gameObject.active)return!1;const q=this.gameObject.transform;if(q instanceof X.XVE){const K=q.worldPosition.x,z=q.worldPosition.y,Y=K+q.widthDelta,Q=z+q.heightDelta;return K=0&&z=0}return q.worldPosition.x=0&&q.worldPosition.y=0}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],EE.prototype,"reportInitialState",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],EE.prototype,"treatInactiveAsOffScreen",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],EE.prototype,"onStateChange",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],EE.prototype,"onEnteredScreen",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],EE.prototype,"onLeftScreen",void 0),EE=(0,Q.Cg)([(0,X.EVk)("OnScreenState",et.Y.object)],EE);z(57502);let wE=class extends X.uAl{constructor(){super(...arguments),this._onHasCompletedTutorial=new X.HN0,this._onHasNotCompletedTutorial=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this._onHasCompletedTutorial.dispose(),this._onHasNotCompletedTutorial.dispose(),super.destroy()}check(){dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasCompletedTutorial()?this._onHasCompletedTutorial.dispatch():this._onHasNotCompletedTutorial.dispatch()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wE.prototype,"_onHasCompletedTutorial",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wE.prototype,"_onHasNotCompletedTutorial",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],wE.prototype,"_runOnLoad",void 0),wE=(0,Q.Cg)([(0,X.EVk)("PlayerHasCompletedTutorialGuard",et.Y.utility)],wE);let TE=class extends X.uAl{getCustomData(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return{[this._customDataPropertyName]:q.backpack.hasItem(this._key,this._id)>0}}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],TE.prototype,"_customDataPropertyName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],TE.prototype,"_key",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],TE.prototype,"_id",void 0),TE=(0,Q.Cg)([(0,X.EVk)("PlayerHasItemCustomData",et.Y.utility)],TE);let SE=class extends X.uAl{constructor(){super(...arguments),this.doesHaveItem=new X.HN0,this.doesNotHaveItem=new X.HN0}destroy(){this.doesHaveItem.dispose(),this.doesNotHaveItem.dispose(),super.destroy()}hasItem(){dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem(this._key,this._id)>0?this.doesHaveItem.dispatch():this.doesNotHaveItem.dispatch()}};var AE;(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],SE.prototype,"_key",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],SE.prototype,"_id",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],SE.prototype,"doesHaveItem",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],SE.prototype,"doesNotHaveItem",void 0),SE=(0,Q.Cg)([(0,X.EVk)("PlayerHasItemGuard",et.Y.utility)],SE),function(q){q.HasAnyItem="AnHasAnyItemy",q.HasAllItems="HasAllItems"}(AE||(AE={}));let CE=class extends X.uAl{constructor(){super(...arguments),this._dispatchOnCreate=!1,this._whenToDispatchHasItems=AE.HasAnyItem,this.doesHaveItems=new X.HN0,this.doesNotHaveItems=new X.HN0}create(){super.create(),this._dispatchOnCreate&&this.hasItem()}destroy(){this.doesHaveItems.dispose(),this.doesNotHaveItems.dispose(),super.destroy()}hasItem(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(this._whenToDispatchHasItems===AE.HasAnyItem){(this._keys.some(((K,z)=>{const Y=this._ids[z];return q.backpack.hasItem(K,Y)>0}))?this.doesHaveItems:this.doesNotHaveItems).dispatch()}else if(this._whenToDispatchHasItems===AE.HasAllItems){let K=!0;this._keys.forEach(((z,Y)=>{const Q=this._ids[Y];0===q.backpack.hasItem(z,Q)&&(K=!1)})),K?this.doesHaveItems.dispatch():this.doesNotHaveItems.dispatch()}}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],CE.prototype,"_dispatchOnCreate",void 0),(0,Q.Cg)([(0,X.gfw)(AE),(0,Q.Sn)("design:type",String)],CE.prototype,"_whenToDispatchHasItems",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],CE.prototype,"_keys",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.g11)(),(0,Q.Sn)("design:type",Array)],CE.prototype,"_ids",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],CE.prototype,"doesHaveItems",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],CE.prototype,"doesNotHaveItems",void 0),CE=(0,Q.Cg)([(0,X.EVk)("PlayerHasMultipleItemGuard",et.Y.utility)],CE);let OE=class extends X.uAl{constructor(){super(...arguments),this._callPromiseFunctions=new X.HN0,this.onPromisesResolved=new X.HN0,this.onPromiseRejected=new X.HN0}destroy(){this._callPromiseFunctions.dispose(),this.onPromiseRejected.dispose(),this.onPromisesResolved.dispose(),super.destroy()}callPromises(){const q=this._callPromiseFunctions._bindings,K=q.map((q=>q.listener.apply(q.context))).filter((q=>q instanceof Promise));(0,wt.v)(K.length===q.length,"Invalid function was added to the promises signal"),Promise.all(K).then((()=>{this.onPromisesResolved.dispatch()})).catch((()=>{this.onPromiseRejected.dispatch()}))}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],OE.prototype,"_callPromiseFunctions",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],OE.prototype,"onPromisesResolved",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],OE.prototype,"onPromiseRejected",void 0),OE=(0,Q.Cg)([(0,X.EVk)("PromiseAwaiter",et.Y.utility)],OE);var IE=z(20404);let DE=class extends X.uAl{constructor(){super(...arguments),this.onCheckTrue=new X.HN0,this.onCheckFalse=new X.HN0}checkQueryParamExists(){(IE.b.isQueryParameterSetForSession(this._assetID)?this.onCheckTrue:this.onCheckFalse).dispatch()}destroy(){this.onCheckTrue.dispose(),this.onCheckFalse.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],DE.prototype,"_assetID",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],DE.prototype,"onCheckTrue",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],DE.prototype,"onCheckFalse",void 0),DE=(0,Q.Cg)([(0,X.EVk)("QueryParamExistsGuard",et.Y.web)],DE);let RE=class extends X.uAl{constructor(){super(...arguments),this._runOnCreate=!1,this._decisionThreshold=.5,this._onBelowThreshold=new X.HN0,this._onAboveThreshold=new X.HN0}create(){super.create(),this._runOnCreate&&this.run()}run(){Math.random()=this._maxValue&&X.VyI.log("RandomComponent: Invalid range - minValue must be less than maxValue",X.$bb.Error)}getData(){return this._wholeNumbersOnly?ri.o.integerInRange(this._minValue,this._maxValue):ri.o.realInRange(this._minValue,this._maxValue)}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ME.prototype,"_wholeNumbersOnly",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ME.prototype,"_minValue",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.YLv)("Max is exclusive. i.e. 4 will return up to 3.9999 (or 3 if whole numbers)"),(0,Q.Sn)("design:type",Number)],ME.prototype,"_maxValue",void 0),ME=(0,Q.Cg)([(0,X.EVk)("RandomNumberDataProvider",et.Y.utility)],ME);let NE=class extends X.uAl{get anchorMinX(){return this._rectTransform.anchorMin.x}set anchorMinX(q){this._rectTransform.setAnchorMin(q,this.anchorMinY)}get anchorMinY(){return this._rectTransform.anchorMin.y}set anchorMinY(q){this._rectTransform.setAnchorMin(this.anchorMinX,q)}get anchorMaxX(){return this._rectTransform.anchorMax.x}set anchorMaxX(q){this._rectTransform.setAnchorMax(q,this.anchorMaxY)}get anchorMaxY(){return this._rectTransform.anchorMax.y}set anchorMaxY(q){this._rectTransform.setAnchorMax(this.anchorMaxX,q)}get width(){return this._rectTransform.sizeDelta.width}set width(q){this._rectTransform.sizeDelta=new X.or0(q,this.height)}get height(){return this._rectTransform.sizeDelta.height}set height(q){this._rectTransform.sizeDelta=new X.or0(this.width,q)}get pivotX(){return this._rectTransform.pivot.x}set pivotX(q){this._rectTransform.pivot=new X.I9Y(q,this.pivotY)}get pivotY(){return this._rectTransform.pivot.y}set pivotY(q){this._rectTransform.pivot=new X.I9Y(this.pivotX,q)}get rotation(){return this._rectTransform.localRotation}set rotation(q){this._rectTransform.setRotation(q)}get scaleX(){return this._rectTransform.localScale.x}set scaleX(q){this._rectTransform.setScale(q,this.scaleY)}get scaleY(){return this._rectTransform.localScale.y}set scaleY(q){this._rectTransform.setScale(this.scaleX,q)}get posX(){return this._rectTransform.posX}set posX(q){this._rectTransform.posX=q}get yPos(){return this._rectTransform.posY}set yPos(q){this._rectTransform.posY=q}};(0,Q.Cg)([(0,X.Pqz)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],NE.prototype,"_rectTransform",void 0),NE=(0,Q.Cg)([(0,X.EVk)("RectTransformWrapper",et.Y.animation)],NE);let xE=class extends X.uAl{reparent(){this._gameObject.parent=this._targetGameObject}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xE.prototype,"_gameObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xE.prototype,"_targetGameObject",void 0),xE=(0,Q.Cg)([(0,X.EVk)("ReparentGameObject",et.Y.utility)],xE);let LE=class extends X.uAl{constructor(){super(...arguments),this._onReplacementComplete=new X.HN0}run(){const q=[];this._targetTiledLayer.findComponentsInChildren(X.w4d).filter((q=>q.tag===this._tagName)).sort(((q,K)=>K.GameObject.legacyTransform.group.position.y-q.GameObject.legacyTransform.group.position.y)).forEach((K=>(0,Q.sH)(this,void 0,void 0,(function*(){const z=K.GameObject.legacyTransform.group.position.x,Y=K.GameObject.legacyTransform.group.position.y,Q=K.GameObject.parent;K.GameObject.destroy();const Z=this._prefabLoader.loadWithDependencies(this._prefabID).promise;q.push(Z),Z.then((q=>{Q.addChild(q),q.transform?q.transform.setPosition(z,Y):(q.legacyTransform.x=z,q.legacyTransform.y=Y)})).catch((q=>{X.VyI.log(`Could not load a prefab as tile replacement: ${q.message}`,X.$bb.Error)}))})))),Promise.all(q).then((()=>{this._onReplacementComplete.dispatch()})).catch((q=>{X.VyI.log(`Error loading one or more tile replacements: ${q.message}`,X.$bb.Error),this._onReplacementComplete.dispatch()}))}destroy(){this._onReplacementComplete.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],LE.prototype,"_targetTiledLayer",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],LE.prototype,"_prefabID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],LE.prototype,"_tagName",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],LE.prototype,"_onReplacementComplete",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],LE.prototype,"_prefabLoader",void 0),LE=(0,Q.Cg)([(0,X.EVk)("ReplaceTileWithPrefab",et.Y.utility)],LE);let kE=class extends X.uAl{constructor(){super(...arguments),this._bounds=new X.I9Y(100,100),this._limitMaxScale=!1,this._maxScale=new X.I9Y,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.applyScaling()}setBounds(q){this._bounds=q,this.applyScaling()}setBoundsXY(q,K){this._bounds.x=q,this._bounds.y=K,this.applyScaling()}applyScaling(){var q,K,z,Y;if(!this._spine.isLoaded)return void this._spine.OnLoaded.addOnce(this.applyScaling,this);const Q=this._spine.getDimensions().width,X=this._spine.getDimensions().height;let Z;Z=this._limitMaxScale?Math.min(Math.min(null!==(K=null===(q=this._maxScale)||void 0===q?void 0:q.x)&&void 0!==K?K:1/0,this._bounds.x/Q),Math.min(null!==(Y=null===(z=this._maxScale)||void 0===z?void 0:z.y)&&void 0!==Y?Y:1/0,this._bounds.y/X)):Math.min(this._bounds.x/Q,this._bounds.y/X),this.gameObject.transform.setScale(Z)}};(0,Q.Cg)([(0,X.Pqz)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],kE.prototype,"_spine",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],kE.prototype,"_bounds",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],kE.prototype,"_limitMaxScale",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],kE.prototype,"_maxScale",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],kE.prototype,"_runOnCreate",void 0),kE=(0,Q.Cg)([(0,X.EVk)("ScaleSpineToBounds",et.Y.utility)],kE);let BE=class extends X.uAl{constructor(){super(...arguments),this._scale=new X.I9Y(1,1),this._bounds=new X.I9Y(100,100),this._scaleToBoundsWidth=!1,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.applyScaling()}setScale(q){this._scale=q}setBounds(q){this._bounds=q}applyScaling(){if(!this._spine.isLoaded)return void this._spine.OnLoaded.addOnce(this.applyScaling,this);if(this._scaleToBoundsWidth){const q=Math.max(this._bounds.x/this._spine.getDimensions().width,1);this.setScale(new X.I9Y(q,q))}const q=this._spine.getDimensions().width*this._scale.x,K=this._spine.getDimensions().height*this._scale.y;q>this._bounds.x||K>this._bounds.y?X.VyI.log("[ScaleSpineWithinBoundsComponent] Spine dimensions are larger than specified boundaries -- scaling not applied.",X.$bb.Verbose):this.gameObject.transform.setScale(this._scale.x,this._scale.y)}};(0,Q.Cg)([(0,X.Pqz)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],BE.prototype,"_spine",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],BE.prototype,"_scale",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],BE.prototype,"_bounds",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],BE.prototype,"_scaleToBoundsWidth",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],BE.prototype,"_runOnCreate",void 0),BE=(0,Q.Cg)([(0,X.EVk)("ScaleSpineWithinBounds",et.Y.utility)],BE);let UE=class extends X.uAl{constructor(){super(...arguments),this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.adopt()}adopt(){this._adoptiveParent.addChild(this.GameObject)}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],UE.prototype,"_adoptiveParent",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],UE.prototype,"_runOnCreate",void 0),UE=(0,Q.Cg)([(0,X.EVk)("SetParent",et.Y.utility)],UE);let FE=class extends X.uAl{logout(){dt.q.instance.prodigy.gameContainer.get("774-4659").logout()}};FE=(0,Q.Cg)([(0,X.EVk)("Settings",et.Y.utility)],FE);let GE=class extends X.uAl{constructor(){super(...arguments),this.signal=new X.HN0}fire(q){this.signal.dispatch(q)}destroy(){this.signal.dispose(),super.destroy()}};var jE;(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],GE.prototype,"signal",void 0),GE=(0,Q.Cg)([(0,X.EVk)("SignalDummy",et.Y.utility)],GE);let $E=jE=class extends X.uAl{constructor(){super(...arguments),this._templateString=jE.TEMPLATE_TOKEN,this._groupSeparator=" ",this._weeksTemplate="",this._daysTemplate="",this._hoursTemplate="",this._minutesTemplate="",this._secondsTemplate=""}set weeksTemplate(q){this._weeksTemplate=q,this.updateTimeTemplate()}set daysTemplate(q){this._daysTemplate=q,this.updateTimeTemplate()}set hoursTemplate(q){this._hoursTemplate=q,this.updateTimeTemplate()}set minutesTemplate(q){this._minutesTemplate=q,this.updateTimeTemplate()}set secondsTemplate(q){this._secondsTemplate=q,this.updateTimeTemplate()}create(){super.create(),this._timeRemainingText.onTimerUpdated.add(this.updateTimeTemplate,this),this._timeRemainingText.onTimerCompleted.add(this.updateTimeTemplate,this),this.updateTimeTemplate()}destroy(){this._timeRemainingText.onTimerUpdated.remove(this.updateTimeTemplate,this),this._timeRemainingText.onTimerCompleted.remove(this.updateTimeTemplate,this),super.destroy()}updateTimeTemplate(){var q;const K=[["w",this._timeRemainingText.weekRemaining],["d",this._timeRemainingText.daysRemaining],["h",this._timeRemainingText.hoursRemaining],["m",this._timeRemainingText.minutesRemaining],["s",this._timeRemainingText.secondsRemaining]],z=[this.getSegmentTemplate(this.localizeIfPossible(this._weeksTemplate),K[0][1]),this.getSegmentTemplate(this.localizeIfPossible(this._daysTemplate),K[1][1]),this.getSegmentTemplate(this.localizeIfPossible(this._hoursTemplate),K[2][1]),this.getSegmentTemplate(this.localizeIfPossible(this._minutesTemplate),K[3][1]),this.getSegmentTemplate(this.localizeIfPossible(this._secondsTemplate),K[4][1])];if(this._hideCompletedTimeComponents){const q=this._timeRemainingText.smallestTimeGroup;for(;K.length>0&&K[0][1]<=0&&K[0][0]!==q;)K.shift(),z.shift()}this._maxGroups>0&&z.length>this._maxGroups&&(z.length=this._maxGroups);const Y=z.filter((q=>q.length>0)).join(this._groupSeparator),Q=(null===(q=this._templateString)||void 0===q?void 0:q.length)>0?this.localizeIfPossible(this._templateString).replace(jE.TEMPLATE_TOKEN,Y):jE.TEMPLATE_TOKEN;this._timeRemainingText.setTemplateString(Q)}getSegmentTemplate(q,K){const z=q.includes("{p}")?"{p}":"{s}",Y=1!==K?"s":"";return q.split(z).join(Y)}localizeIfPossible(q){return this._localizer.hasText(q)?this._localizer.getText(q):q}};$E.TEMPLATE_TOKEN="{t}",(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],$E.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],$E.prototype,"_timeRemainingText",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],$E.prototype,"_templateString",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],$E.prototype,"_groupSeparator",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],$E.prototype,"_hideCompletedTimeComponents",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],$E.prototype,"_maxGroups",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],$E.prototype,"_weeksTemplate",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],$E.prototype,"_daysTemplate",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],$E.prototype,"_hoursTemplate",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],$E.prototype,"_minutesTemplate",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],$E.prototype,"_secondsTemplate",void 0),$E=jE=(0,Q.Cg)([(0,X.EVk)("TimeRemainingTemplateUpdate",et.Y.ui)],$E);var HE=z(95798);let VE=class extends X.uAl{disableAreaEvents(){const q=dt.q.instance.game.state.get(Nt.G.TileScreen);null==q||q.events.forEach((q=>{q instanceof HE.o&&q.disable()}))}};VE=(0,Q.Cg)([(0,X.EVk)("ToggleLegacyMapAreaEvents",et.Y.map)],VE);var WE=z(56903);let qE=class extends X.uAl{constructor(){super(...arguments),this.unseenAds=new X.HN0,this._runOnLoad=!1}create(){super.create(),dt.q.instance.game.broadcaster.addAppListener(Xn.Y1.RefreshWizardWatchAdCount,this.checkUnseenAdCount,this,Xn.HG.HUD),WE.A.getWizardWatchData().then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){WE.A.getActiveEntityAds(),this._runOnLoad&&this.checkUnseenAdCount()})))).catch(X.RQr.createHandler("Error loading data for Wizard Watch ads"))}destroy(){this.unseenAds.dispose(),dt.q.instance.game.broadcaster.removeAppListener(Xn.Y1.RefreshWizardWatchAdCount,this,Xn.HG.HUD),super.destroy()}checkUnseenAdCount(){const q=WE.A.getUnseenActiveAdCount();this.unseenAds.dispatch(q>0,q>0?q:0)}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],qE.prototype,"unseenAds",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],qE.prototype,"_runOnLoad",void 0),qE=(0,Q.Cg)([(0,X.EVk)("UnseenAdCount",et.Y.utility)],qE);var KE=z(36045);let zE=class extends KE.X{isPointOverShape(q){const K=this.worldPointToParent(q,this._rectTransform),z=this._rectTransform.getBounds(),Y=new X.or0(z.right-z.left,z.bottom-z.top),Q=z.left+Y.getHalfWidth(),Z=z.top+Y.getHalfHeight(),J=2*(Q-K.x)/Y.width,tt=2*(Z-K.y)/Y.height;return J*J+tt*tt<1}};(0,Q.Cg)([(0,X.Pqz)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],zE.prototype,"_rectTransform",void 0),zE=(0,Q.Cg)([(0,X.EVk)("EllipseShape",et.Y.inputShapes)],zE);z(77442);let YE=class extends KE.X{isPointOverShape(q){const K=this.worldPointToParent(q,this._rectTransform),z=this._rectTransform.getBounds();return K.x>=z.left&&K.x=z.top&&K.yK.Active&&K.isPointOverShape(q)))}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(KE.X),(0,Q.Sn)("design:type",Array)],QE.prototype,"_shapes",void 0),QE=(0,Q.Cg)([(0,X.EVk)("ShapeGroup",et.Y.inputShapes)],QE);var XE=z(43924),ZE=z.n(XE);class JE{static createSeeded(q){return new JE(ZE()(q.toString()))}static get DEFAULT(){return this._defaultInstance}constructor(q=Math.random){this._rngFunction=q}setRandomNumberGenerator(q){this._rngFunction=q}getReal(q=1){return this._rngFunction()*q}getRealInRange(q,K){return this.getReal(K-q)+q}getInteger(q=Number.MAX_SAFE_INTEGER){return Math.floor(this._rngFunction()*q)}getIntegerInRange(q,K){return this.getInteger(K-q)+q}getSeed(){return this.getInteger()^this.getInteger()}shuffle(q){for(let K=q.length-1;K>0;K--){const z=this.getInteger(K),Y=q[z];q[z]=q[K],q[K]=Y}return q}}JE._defaultInstance=new JE(Math.random);class tw{constructor(q){this._tableData=q}getItem(q,K=JE.DEFAULT){const z=this.getItemWithWeight(q,K);return z&&delete z.weight,z}getItemWithWeight(q,K=JE.DEFAULT){const z=this.buildWeightedItemList(q),Y=this.selectRandomTableElement(z.items,z.totalItemWeights,K);return Y?{type:Y.type,ID:Y.ID,quantity:this.getItemQuantity(Y,K),weight:Y.weight}:null}getUniqueItemsWithWeight(q,K,z=JE.DEFAULT){const Y=[],Q=this.buildWeightedItemList(K),X=Q.items;for(let Z=0;Z0){const q=this.selectRandomTableElement(Q.items,Q.totalItemWeights,z),K=X.indexOf(q);K>-1&&(X.splice(K,1),Q.totalItemWeights-=q.weight,Y.push({type:q.type,ID:q.ID,quantity:this.getItemQuantity(q,z),weight:q.weight}))}else{const q=this._tableData[0].fallback;Y.push({type:q.type,ID:q.ID,quantity:this.getItemQuantity(q,z),weight:1})}return Y}getUniqueItems(q,K,z=JE.DEFAULT){return this.getUniqueItemsWithWeight(q,K,z).map((q=>({type:q.type,ID:q.ID,quantity:q.quantity})))}getItems(q,K,z=JE.DEFAULT){const Y=[];for(let Q=0;Q-1;--Q){const X=q[Q],Z=K.getMaxCount(X.type);if(Z>0){const Q=K.getOwnedCount(X.type,X.ID)+q.filter((q=>q.type===X.type&&q.ID===X.ID)).map((q=>q.quantity)).reduce(((q,K)=>q+K),0);if(Q>Z){const q=Q-Z;X.quantity>1&&qq.items)),z=K.length;let Y=0;for(let Q=0;Q-1&&q.getOwnedCount(z.type,z.ID)>=X&&(K[Q]=Object.assign(Object.assign({},this._tableData[0].fallback),{weight:z.weight}))}return{totalItemWeights:Y,items:K}}}var ew=z(88701);let iw=class extends At._{create(){super.create();const q=ae.t.getItem("itemTable",this._itemTableAssetId);(null==q?void 0:q.data)?this._itemTable=new tw([q.data]):X.VyI.log(`[ItemTableComponent]: No item table data found for asset ID ${this._itemTableAssetId}`,X.$bb.Error)}getData(){if(!this._itemTable)return X.VyI.log("[ItemTableComponent]: Item table is not initialized.",X.$bb.Error),null;const q=this._itemTable.getItem(this._activePlayerItemStorage);return q?[q.type,q.ID,q.quantity]:(X.VyI.log(`[ItemTableComponent]: Failed to retrieve item from ItemTable ${this._itemTableAssetId}.`,X.$bb.Warning),null)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],iw.prototype,"_itemTableAssetId",void 0),(0,Q.Cg)([(0,X.Cdj)("8d6-c0dc"),(0,Q.Sn)("design:type",ew.C)],iw.prototype,"_activePlayerItemStorage",void 0),iw=(0,Q.Cg)([(0,X.EVk)("ItemTableDataProvider",et.Y.item)],iw);let sw=class extends X.uAl{destroy(){this._popupManager?this.enableNotifications():dt.q.instance.prodigy.notifications.resume(this),super.destroy()}disableNotifications(){(0,Nd.dU)(this._popupManager,this)}enableNotifications(){(0,Nd.EK)(this._popupManager,this)}};(0,Q.Cg)([(0,X.Cdj)("PopupHandler"),(0,Q.Sn)("design:type",ll.Y)],sw.prototype,"_popupManager",void 0),sw=(0,Q.Cg)([(0,X.EVk)("EnableNotifications",et.Y.ui)],sw);z(38268);let nw=class extends X.uAl{constructor(){super(...arguments),this._useLocalAssets=!1,this.hasMetRequirements=new X.HN0,this.hasNotMetRequirements=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.checkRequirements()}destroy(){this.hasMetRequirements.dispose(),this.hasNotMetRequirements.dispose(),super.destroy()}checkRequirements(){let q;if(this._useLocalAssets){if(q=dt.q.instance.game.cache.getJSON(this._requirementsDataSource)[this.requirementsKey].data,!q)return void X.VyI.log(`[MeetsFeatureRequirementsComponent]: Cannot find local asset for requirement ${this.requirementsKey}`,X.$bb.Error)}else q=this._requirementsID;Po.a.getRequirementsResult(q).then((q=>{q?this.hasMetRequirements.dispatch():this.hasNotMetRequirements.dispatch()})).catch(X.RQr.createHandler("[MeetsFeatureRequirementsComponent]: Error checking requirements"))}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],nw.prototype,"_useLocalAssets",void 0),(0,Q.Cg)([(0,X.okD)((q=>!q._useLocalAssets)),(0,X.g11)(),(0,Q.Sn)("design:type",Number)],nw.prototype,"_requirementsID",void 0),(0,Q.Cg)([(0,X.okD)((q=>q._useLocalAssets)),(0,X.Bak)(),(0,X.tW2)("requirements"),(0,Q.Sn)("design:type",String)],nw.prototype,"_requirementsDataSource",void 0),(0,Q.Cg)([(0,X.okD)((q=>q._useLocalAssets)),(0,X.W_S)(),(0,Q.Sn)("design:type",String)],nw.prototype,"requirementsKey",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],nw.prototype,"hasMetRequirements",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],nw.prototype,"hasNotMetRequirements",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],nw.prototype,"_runOnLoad",void 0),nw=(0,Q.Cg)([(0,X.EVk)("MeetsFeatureRequirements",et.Y.saving)],nw);let aw=class extends X.uAl{destroy(){this.resume(),super.destroy()}pause(){dt.q.instance.prodigy.notifications.pause(this)}resume(){dt.q.instance.prodigy.notifications.resume(this)}resumeAll(){dt.q.instance.prodigy.notifications.resumeAll()}clearNotifications(q=!1){dt.q.instance.prodigy.notifications.clearNotifications(q)}pauseAndClearNotifications(q=!1){this.pause(),this.clearNotifications(q)}};aw=(0,Q.Cg)([(0,X.EVk)("NotificationController",et.Y.ui)],aw);let rw=class extends At._{getData(){return dt.q.instance.prodigy.notifications.isPaused()}};rw=(0,Q.Cg)([(0,X.EVk)("NotificationsPausedDataProvider",et.Y.dataProvider)],rw);var ow=z(642),hw=z(75329);let cw=class extends X.uAl{constructor(){super(...arguments),this.onDialogueOpened=new X.HN0,this.onDialogueClosed=new X.HN0}destroy(){this.onDialogueOpened.dispose(),this.onDialogueClosed.dispose(),super.destroy()}openWebsite(){if(Qs.pF.isNativeApp()||X.o5U.isMobile()){const q=new hw.Z(this._localizer.getText("BUTTON_OKAY_CAPITAL"),(()=>{this.onDialogueClosed.dispatch()}),void 0,void 0,this._localizer.getText("UH_OH_TITLE"),this._localizer.getText("OPEN_URL_IN_APP"));dt.q.instance.prodigy.open.informationDialog(q),this.onDialogueOpened.dispatch()}else if(X.Aq$.isDefined(this.websiteLink)){const q=new ow.k(this._localizer.getText("BUTTON_YES_CAPITAL"),(()=>{Cp.I.openWebsite(this.websiteLink),this.onDialogueClosed.dispatch()}),this._localizer.getText("BUTTON_NO_CAPITAL"),(()=>{this.onDialogueClosed.dispatch()}),{atlas:ti._.Ui_store_json,name:"icon-large-exclamation"},void 0,void 0,this._localizer.getText("LOGIN_LEAVE_GAME"),this._localizer.getText("NOW_LEAVING_PRODIGY"));dt.q.instance.prodigy.open.confirmationDialog(q),this.onDialogueOpened.dispatch()}else X.VyI.log("ERROR: Not a valid link!",X.$bb.Verbose)}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],cw.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],cw.prototype,"websiteLink",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],cw.prototype,"onDialogueOpened",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],cw.prototype,"onDialogueClosed",void 0),cw=(0,Q.Cg)([(0,X.EVk)("OpenWebsite",X.YH6.ui)],cw);var dw=z(81623);let lw=class extends X.uAl{constructor(){super(...arguments),this.isInstalled=new X.HN0,this.isNotInstalled=new X.HN0}checkInstallState(){(dw.u.PWA_INSTALLED_DURING_CURRENT_SESSION?this.isInstalled:this.isNotInstalled).dispatch()}destroy(){this.isInstalled.dispose(),this.isNotInstalled.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],lw.prototype,"isInstalled",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],lw.prototype,"isNotInstalled",void 0),lw=(0,Q.Cg)([(0,X.EVk)("PWAInstalledGuardCurrentSession",et.Y.web)],lw);let uw=class extends X.uAl{constructor(){super(...arguments),this.isInstalled=new X.HN0,this.isNotInstalled=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this.isInstalled.dispose(),this.isNotInstalled.dispose(),super.destroy()}check(){(this._pwaService.isPWAInstalled()?this.isInstalled:this.isNotInstalled).dispatch()}};(0,Q.Cg)([(0,X.Cdj)("7c9-f733"),(0,Q.Sn)("design:type",dw.u)],uw.prototype,"_pwaService",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],uw.prototype,"isInstalled",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],uw.prototype,"isNotInstalled",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],uw.prototype,"_runOnLoad",void 0),uw=(0,Q.Cg)([(0,X.EVk)("PWAInstalledGuard",et.Y.web)],uw);var fw=z(95066),bw=z(36525);let pw=class extends X.uAl{constructor(){super(...arguments),this.onPWAAccept=new X.HN0,this.onPWADismiss=new X.HN0,this.onError=new X.HN0,this.onRegisterSuccess=new X.HN0}registerServiceWorker(){this._pwaInstallerService.registerServiceWorker().then((q=>{q?this.onRegisterSuccess.dispatch():this.onError.dispatch()})).catch((()=>{this.onError.dispatch()}))}promptInstall(){var q,K;if(dw.u.PWA_INSTALLED_DURING_CURRENT_SESSION){dw.u.PWA_BEFORE_INSTALL_DEFERRED_EVENT=null,this.onPWAAccept.dispatch();const q=new bw.i;q.setKey("prodigy_game.PWAInstallFromURLIcon"),q.setValue(1);dt.q.instance.prodigy.gameContainer.get("ce3-6d33").logStat(q,fw.d.Increment)}else(null===(q=this._pendingInstallState)||void 0===q?void 0:q.getValue())?X.VyI.log("previous promptInstall promise never resolved.",X.$bb.Warning):(null===(K=this._pendingInstallState)||void 0===K||K.setValue(!0),this._pwaInstallerService.promptInstall().then((q=>{var K;null===(K=this._pendingInstallState)||void 0===K||K.setValue(!1),"accepted"===q?this.onPWAAccept.dispatch():"dismissed"===q?this.onPWADismiss.dispatch():this.onError.dispatch()})).catch((()=>{var q;null===(q=this._pendingInstallState)||void 0===q||q.setValue(!1),this.onError.dispatch()})))}destroy(){this.onPWAAccept.dispose(),this.onPWADismiss.dispose(),this.onError.dispose(),this.onRegisterSuccess.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("7c9-f733"),(0,Q.Sn)("design:type",dw.u)],pw.prototype,"_pwaInstallerService",void 0),(0,Q.Cg)([(0,X.MnK)(Lr.f),(0,Q.Sn)("design:type",Lr.f)],pw.prototype,"_pendingInstallState",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],pw.prototype,"onPWAAccept",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],pw.prototype,"onPWADismiss",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],pw.prototype,"onError",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],pw.prototype,"onRegisterSuccess",void 0),pw=(0,Q.Cg)([(0,X.EVk)("PWAInstaller",et.Y.web)],pw);let vw=class extends X.uAl{constructor(){super(...arguments),this.isSupported=new X.HN0,this.isNotSupported=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this.isSupported.dispose(),this.isNotSupported.dispose(),super.destroy()}check(){(this._pwaService.isPlatformSupported()?this.isSupported:this.isNotSupported).dispatch()}};(0,Q.Cg)([(0,X.Cdj)("7c9-f733"),(0,Q.Sn)("design:type",dw.u)],vw.prototype,"_pwaService",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vw.prototype,"isSupported",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vw.prototype,"isNotSupported",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],vw.prototype,"_runOnLoad",void 0),vw=(0,Q.Cg)([(0,X.EVk)("PWAPlatformSupportedGuard",et.Y.web)],vw);z(25809);var gw=z(29044);let mw=class extends X.uAl{constructor(){super(...arguments),this.onNotificationAccept=new X.HN0,this.onNotificationBlock=new X.HN0,this.onNotificationDismiss=new X.HN0,this.onComplete=new X.HN0,this.onError=new X.HN0}requestPermission(){this._notificationInstallerService.notificationPermissionRequest().then((q=>{q.hasChanged?"granted"===q.status?this.onNotificationAccept.dispatch():"denied"===q.status&&this.onNotificationBlock.dispatch():"default"===q.status&&this.onNotificationDismiss.dispatch(),"granted"===q.status?this.registerServiceWorkerForFirebase():this.onComplete.dispatch()})).catch((()=>{this.onError.dispatch()}))}registerServiceWorkerForFirebase(){this._notificationInstallerService.registerServiceWorkerForFirebase().then((q=>{q?this.onComplete.dispatch():this.onError.dispatch()})).catch((()=>{this.onError.dispatch()}))}destroy(){this.onNotificationAccept.dispose(),this.onNotificationBlock.dispose(),this.onNotificationDismiss.dispose(),this.onComplete.dispose(),this.onError.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("161-a31c"),(0,Q.Sn)("design:type",gw.F)],mw.prototype,"_notificationInstallerService",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mw.prototype,"onNotificationAccept",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mw.prototype,"onNotificationBlock",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mw.prototype,"onNotificationDismiss",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mw.prototype,"onComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mw.prototype,"onError",void 0),mw=(0,Q.Cg)([(0,X.EVk)("PushNotificationInstaller",et.Y.web)],mw);let yw=class extends X.uAl{updateTextAndPosition(q,K,z){this.updateTextKey(q),this.updatePosition(K,z)}updateTextKey(q){this._localizedText.setLocalizationKey(q)}updatePosition(q,K){this.gameObject.transform.setPosition(q,K)}};(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],yw.prototype,"_localizedText",void 0),yw=(0,Q.Cg)([(0,X.EVk)("TutorialNootDialogue")],yw);z(67820),z(8083),z(1559),z(81617);let _w=class extends X.uAl{constructor(){super(...arguments),this._signInButton=null,this._registerButton=null,this._policyButton=null,this._websiteButton=null,this._forgotPassword=null,this._errorIcon=null,this._errorMessage=null,this._usernameTooltip=null,this._passwordTooltip=null,this._usernameTooltipObj=null,this._passwordTooltipObj=null,this._hideForTutorialObjects=[]}get signInButton(){return this._signInButton}get registerButton(){return this._registerButton}get policyButton(){return this._policyButton}get websiteButton(){return this._websiteButton}get forgotPassword(){return this._forgotPassword}get errorIcon(){return this._errorIcon}get errorMessage(){return this._errorMessage}get usernameTooltip(){return this._usernameTooltip}get passwordTooltip(){return this._passwordTooltip}get usernameTooltipObj(){return this._usernameTooltipObj}get passwordTooltipObj(){return this._passwordTooltipObj}get hideForTutorialObjects(){return this._hideForTutorialObjects}};(0,Q.Cg)([(0,X.x4W)("signInButton"),(0,Q.Sn)("design:type",Y.$)],_w.prototype,"_signInButton",void 0),(0,Q.Cg)([(0,X.x4W)("registerButton"),(0,Q.Sn)("design:type",Y.$)],_w.prototype,"_registerButton",void 0),(0,Q.Cg)([(0,X.x4W)("policyButton"),(0,Q.Sn)("design:type",Y.$)],_w.prototype,"_policyButton",void 0),(0,Q.Cg)([(0,X.x4W)("websiteButton"),(0,Q.Sn)("design:type",Y.$)],_w.prototype,"_websiteButton",void 0),(0,Q.Cg)([(0,X.x4W)("forgotPassword"),(0,Q.Sn)("design:type",Y.$)],_w.prototype,"_forgotPassword",void 0),(0,Q.Cg)([(0,X.x4W)("errorIcon"),(0,Q.Sn)("design:type",X._mx)],_w.prototype,"_errorIcon",void 0),(0,Q.Cg)([(0,X.x4W)("errorMessage"),(0,Q.Sn)("design:type",X.EYj)],_w.prototype,"_errorMessage",void 0),(0,Q.Cg)([(0,X.x4W)("usernameTooltip"),(0,Q.Sn)("design:type",X.EYj)],_w.prototype,"_usernameTooltip",void 0),(0,Q.Cg)([(0,X.x4W)("passwordTooltip"),(0,Q.Sn)("design:type",X.EYj)],_w.prototype,"_passwordTooltip",void 0),(0,Q.Cg)([(0,X.x4W)("usernameTooltipObj"),(0,Q.Sn)("design:type",X._mx)],_w.prototype,"_usernameTooltipObj",void 0),(0,Q.Cg)([(0,X.x4W)("passwordTooltipObj"),(0,Q.Sn)("design:type",X._mx)],_w.prototype,"_passwordTooltipObj",void 0),(0,Q.Cg)([(0,X.x4W)("hideForTutorialObjects"),(0,Q.Sn)("design:type",Array)],_w.prototype,"_hideForTutorialObjects",void 0),_w=(0,Q.Cg)([(0,X.EVk)("LoginPrefab")],_w);z(49334);var Ew=z(20705);z(21134),z(77302),z(26022);Ew.f;var ww=z(48757);z(14335);let Tw=class extends on.I{constructor(){super(...arguments),this._funnelIDKey="funnelId"}getPropertiesObject(){return{[this._funnelIDKey]:this._segment.purchase.getFunnelID()}}};(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Function)],Tw.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Tw.prototype,"_funnelIDKey",void 0),Tw=(0,Q.Cg)([(0,X.EVk)("PurchaseFunnelIDPropertiesProvider",et.Y.analytics)],Tw);var Sw=z(35569);let Aw=class extends uh.k{constructor(){super(...arguments),this.funnelName="academy_towers",this.funnelType="story",this.step=Sw.D.FirstKeystonePlaced}sendFunnelEvent(){this._segment.academyTowers.sendFunnelEvent({funnelName:this.funnelName,funnelType:this.funnelType,step:this.step},...this.stepArgs)}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Aw.prototype,"funnelName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Aw.prototype,"funnelType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Aw.prototype,"step",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],Aw.prototype,"stepArgs",void 0),Aw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsAcademyTowers",et.Y.analytics)],Aw);var Cw=z(16887);let Ow=class extends uh.k{constructor(){super(...arguments),this.stepIndex=Cw.g.StepOne,this.stepName=Cw.f.PermissionNeeded}sendFunnelAdvancedEvent(){this._segment.consent.sendFunnelAdvancedSegmentEvent(this.stepIndex,this.stepName)}};(0,Q.Cg)([(0,X.gfw)(Cw.g),(0,Q.Sn)("design:type",Number)],Ow.prototype,"stepIndex",void 0),(0,Q.Cg)([(0,X.gfw)(Cw.f),(0,Q.Sn)("design:type",String)],Ow.prototype,"stepName",void 0),Ow=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsConsent",et.Y.analytics)],Ow);let Iw=class extends uh.k{constructor(){super(...arguments),this._containerType=wi.ZF.Interactable,this._instanceType=Ti.N.OpenWorld,this._failReason=hp.WE.MemberLocked}sendContainerDiscoveredEvent(){this._segment.container.sendContainerDiscoveredEvent(this._containerType,this._containerID,Math.round(this.gameObject.transform.worldPosition.x),Math.round(this.gameObject.transform.worldPosition.y))}sendContainerOpenedEvent(){this._segment.container.sendContainerOpenedEvent(this._containerType,this._containerID,this._instanceType)}sendContainerOpenedFailedEvent(){this._segment.container.sendContainerOpenedFailedEvent(this._containerType,this._containerID,this._failReason,this._instanceType)}};(0,Q.Cg)([(0,X.gfw)(wi.ZF),(0,Q.Sn)("design:type",String)],Iw.prototype,"_containerType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Iw.prototype,"_containerID",void 0),(0,Q.Cg)([(0,X.gfw)(Ti.N),(0,Q.Sn)("design:type",String)],Iw.prototype,"_instanceType",void 0),(0,Q.Cg)([(0,X.gfw)(hp.WE),(0,Q.Sn)("design:type",String)],Iw.prototype,"_failReason",void 0),Iw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsContainer",et.Y.analytics)],Iw);let Dw=class extends uh.k{constructor(){super(...arguments),this.instanceOrigin=$i.W5.New,this.milestoneType=$i.lT.Healstone,this.exitOutcome=$i.Yj.Exit}sendCrystalCavernsEnteredEvent(){this._segment.playerMovementAndDiscovery.sendCrystalCavernsEnteredEvent(this.instanceOrigin);const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q.kennel.petTeam.forEach((K=>{K&&this._segment.playerMovementAndDiscovery.sendCrystalCavernsParticipantsEvent({name:K.getName()===q.getName()?"Player":K.getName(),type:K.getElement(),health:K.getCurrentHearts()})}))}sendCrystalCavernsMilestoneReachedEvent(){this._segment.playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent(this.milestoneType)}sendCrystalCavernsCompletedEvent(){this._segment.playerMovementAndDiscovery.sendCrystalCavernsCompletedEvent(this.exitOutcome)}};(0,Q.Cg)([(0,X.gfw)($i.W5),(0,Q.Sn)("design:type",String)],Dw.prototype,"instanceOrigin",void 0),(0,Q.Cg)([(0,X.gfw)($i.lT),(0,Q.Sn)("design:type",String)],Dw.prototype,"milestoneType",void 0),(0,Q.Cg)([(0,X.gfw)($i.Yj),(0,Q.Sn)("design:type",String)],Dw.prototype,"exitOutcome",void 0),Dw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsCrystalCaverns",et.Y.analytics)],Dw);let Rw=class extends uh.k{sendCustomEvent(){this._segment.sendCustomEvent(this._customEvent,this.getPropertiesObject())}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Rw.prototype,"_customEvent",void 0),Rw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsCustom",et.Y.analytics)],Rw);let Pw=class extends uh.k{constructor(){super(...arguments),this.funnelName=em.F.EndGame,this.funnelType=em.M.Chapter,this.stepName=Eu.jT.IllusionBoss1FirstTimeBattleStart}sendEndGameFunnelAdvancedEvent(){this._segment.battleRevamp.sendBattleFunnelAdvancedEvent({funnel_name:this.funnelName,funnel_type:this.funnelType,step_index:this.stepIndex,step_name:this.stepName})}};(0,Q.Cg)([(0,X.gfw)(em.F),(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Pw.prototype,"funnelName",void 0),(0,Q.Cg)([(0,X.gfw)(em.M),(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Pw.prototype,"funnelType",void 0),(0,Q.Cg)([(0,X.gfw)(Eu.jT),(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Pw.prototype,"stepName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",Number)],Pw.prototype,"stepIndex",void 0),Pw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsEndgame",et.Y.analytics)],Pw);let Mw=class extends uh.k{sendFeatureUnlockedEvent(){const q=this.getPropertiesObject(),K=q.FEATURE_NAME,z=q.FEATURE_TYPE,Y=q.LOCK_TYPE;Bn.J.sendFeatureUnlockedEvent(K,z,Y)}sendDifficultyUnlockedEvent(q){Bn.J.sendDifficultyUnlockedEvent(q)}};Mw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsFeatureUnlock",et.Y.analytics)],Mw);let Nw=class extends uh.k{constructor(){super(...arguments),this.npcName="",this.npcType=Ua.ac.Merchant}sendNpcDiscoveredEvent(){var q,K;this._segment.gameWorld.sendNpcDiscoveredEvent({npc_name:this.npcName,npc_type:this.npcType,x_coord:null===(q=this.GameObject.transform)||void 0===q?void 0:q.worldPosition.x,y_coord:null===(K=this.GameObject.transform)||void 0===K?void 0:K.worldPosition.y,npc_animation_id:"idle"})}sendNpcClickedEvent(){this._segment.gameWorld.sendNpcClickedEvent({npc_name:this.npcName,npc_type:this.npcType})}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Nw.prototype,"npcName",void 0),(0,Q.Cg)([(0,X.gfw)(Ua.ac),(0,Q.Sn)("design:type",String)],Nw.prototype,"npcType",void 0),Nw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsNpc",et.Y.analytics)],Nw);let xw=class extends uh.k{constructor(){super(...arguments),this.stepName=lh.l.TutorialStart}sendFunnelAdvancedEvent(){this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:this.stepName})}};(0,Q.Cg)([(0,X.gfw)(lh.l),(0,Q.Sn)("design:type",String)],xw.prototype,"stepName",void 0),xw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsOnboarding",et.Y.analytics)],xw);let Lw=class extends uh.k{sendFunnelAdvancedEvent(q){this._segment.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(q)}};Lw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsPetMerge",et.Y.analytics)],Lw);let kw=class extends Iw{create(){var q;super.create();{const K=dt.q.instance.prodigy.world.getCurrentZone();(null===(q=this._interactableGameObject)||void 0===q?void 0:q.transform)&&(this._containerID=`${K}-${this._interactableGameObject.transform.worldPosition.x}-${this._interactableGameObject.transform.worldPosition.y}`)}}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],kw.prototype,"_interactableGameObject",void 0),kw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsPositionedContainer",et.Y.analytics)],kw);let Bw=class extends uh.k{sendTabEvent(){const q=this.getPropertiesObject(),K=this.getCustomPropertiesObject();X.Aq$.isDefined(q.tabName)&&X.Aq$.isDefined(q.interfaceType)&&this._segment.featureCommon.sendTabEvent(q,K)}};Bw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsTab",et.Y.analytics)],Bw);z(7910);let Uw=class extends uh.k{constructor(){super(...arguments),this.objectId="",this.objectType=Ua.u_.Teleporter,this.failedReason=Ua.kN.MemberLocked}sendWorldObjectDiscoveredEvent(){this._segment.gameWorld.sendWorldObjectDiscoveredEvent({object_type:this.objectType,object_id:this.objectId,x_coord:this.gameObject.transform.worldPosition.x,y_coord:this.gameObject.transform.worldPosition.y})}sendWorldObjectUsedEvent(){this._segment.gameWorld.sendWorldObjectUsedEvent({object_type:this.objectType,object_id:this.objectId})}sendWorldObjectUsedFailedEvent(){this._segment.gameWorld.sendWorldObjectUsedFailedEvent({object_type:this.objectType,object_id:this.objectId,fail_reason:this.failedReason})}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Uw.prototype,"objectId",void 0),(0,Q.Cg)([(0,X.gfw)(Ua.u_),(0,Q.Sn)("design:type",String)],Uw.prototype,"objectType",void 0),(0,Q.Cg)([(0,X.gfw)(Ua.kN),(0,Q.Sn)("design:type",String)],Uw.prototype,"failedReason",void 0),Uw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsWorldObject",et.Y.analytics)],Uw);let Fw=class extends on.I{get destinationName(){return this._destinationName}set destinationName(q){this._destinationName=q}getPropertiesObject(){return{buttonName:this.buttonName,destinationName:this.destinationName,elementType:this._elementType,elementID:this.elementId,interfaceName:this.interfaceName,interfaceType:this._interfaceType,saveClickInfo:this.saveClickInfo,instanceId:this._instanceId}}};(0,Q.Cg)([(0,X.gfw)({gold:"keep-charged-level-gold-button",magicoin:"keep-charged-level-magicoin-button"}),(0,Q.Sn)("design:type",String)],Fw.prototype,"buttonName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fw.prototype,"_destinationName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fw.prototype,"elementId",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fw.prototype,"_elementType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fw.prototype,"interfaceName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fw.prototype,"_interfaceType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fw.prototype,"saveClickInfo",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Fw.prototype,"_instanceId",void 0),Fw=(0,Q.Cg)([(0,X.EVk)("SegmentButtonChargedLevelsPropertiesProvider",et.Y.analytics)],Fw);let Gw=class extends on.I{getPropertiesObject(){let q={};return this._customProperties&&(q=Object.assign({},this._customProperties)),q}addPropertiesObject(q){this._customProperties=Object.assign(Object.assign({},this._customProperties),q)}addProperty(q,K){this._customProperties=Object.assign(Object.assign({},this._customProperties),{[q]:K})}};(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],Gw.prototype,"_customProperties",void 0),Gw=(0,Q.Cg)([(0,X.EVk)("SegmentCustomPropertiesProvider",et.Y.analytics)],Gw);let jw=class extends on.I{getPropertiesObject(){var q;return{tabName:this._tabName,interfaceName:null!==(q=this._interfaceName)&&void 0!==q?q:"",interfaceType:this._interfaceType,instanceType:this._instanceType,saveClickInfo:this.saveClickInfo}}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],jw.prototype,"_tabName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],jw.prototype,"_interfaceName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],jw.prototype,"_interfaceType",void 0),(0,Q.Cg)([(0,X.gfw)(Ti.N),(0,Q.Sn)("design:type",String)],jw.prototype,"_instanceType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],jw.prototype,"saveClickInfo",void 0),jw=(0,Q.Cg)([(0,X.EVk)("SegmentTabPropertiesProvider",et.Y.analytics)],jw);let $w=class extends X.uAl{sendEntryIllustrationEvent(q){this._segment.featureCommon.sendInterfaceEvent({interfaceName:`zone_entry_illustration_${this._zoneId}_${q+1}`,interfaceType:wi.Wm.Popup,originType:q>0?wi.$N.ButtonClick:wi.$N.AutoSurfaced,eventName:"interface_opened"})}};(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Function)],$w.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.gfw)(Yt.A_),(0,Q.Sn)("design:type",String)],$w.prototype,"_zoneId",void 0),$w=(0,Q.Cg)([(0,X.EVk)("ZoneEntryIllustrationSegment",et.Y.analytics)],$w);let Hw=class extends uh.k{sendFunnelAdvanced(q=this.getPropertiesObject().funnelStepName){this._segment.festival.sendFestivalFunnelAdvancedEvent(q)}};Hw=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsFestival",et.Y.analytics,"Used for various festival analytics events for prefabs")],Hw);var Vw=z(99134);let Ww=class extends on.I{getPropertiesObject(){return{funnelStepName:this._funnelStepName}}};(0,Q.Cg)([(0,X.gfw)(Vw.v),(0,Q.Sn)("design:type",String)],Ww.prototype,"_funnelStepName",void 0),Ww=(0,Q.Cg)([(0,X.EVk)("SegmentFestivalPropertyProvider",et.Y.analytics,"Provides various properties for festival segment events")],Ww);var qw=z(74846);z(50118);let Kw=class extends X.uAl{constructor(){super(...arguments),this._onComplete=new X.HN0}get OnComplete(){return this._onComplete}destroy(){this._onComplete.dispose(),super.destroy()}play(){this._isLooping?((0,jn.sR)(this._animators,this._animationName,this._isLooping),this._hasFinished=!0,this._onComplete.dispatch()):(this._hasFinished=!1,(0,jn.ye)(this._animators,this._animationName).then((()=>{this._onComplete.dispatch(),this._hasFinished=!0})))}hasFinishedPlaying(){return this._hasFinished}setAnimationData(q,K){this._animationName=q,this._isLooping=K}};(0,Q.Cg)([(0,X.Cdj)("Animators"),(0,Q.Sn)("design:type",Object)],Kw.prototype,"_animators",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Kw.prototype,"_animationName",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Kw.prototype,"_isLooping",void 0),Kw=(0,Q.Cg)([(0,X.EVk)("PlayInjectedAnimators",et.Y.animation)],Kw);z(22637),z(99898),z(44977),z(37854),z(16184);var zw=z(54001);z(71554);let Yw=class extends X.uAl{performTween(){this._parabolicTween&&this._startPositionTransform?this._parabolicTween.startTween(this._startPositionTransform.localPosition.x,this._startPositionTransform.localPosition.y,0,0):X.VyI.log("Cannot perform parabolic tween, missing required parameters.",X.$bb.Error)}};(0,Q.Cg)([(0,X.Pqz)(zw.y),(0,Q.Sn)("design:type",zw.y)],Yw.prototype,"_parabolicTween",void 0),(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],Yw.prototype,"_startPositionTransform",void 0),Yw=(0,Q.Cg)([(0,X.EVk)("ParabolicTweenTo")],Yw);z(1823),z(70703);var Qw=z(66998);let Xw=class extends X.uAl{constructor(){super(...arguments),this._elapsed=0,this._animationTimer=null}create(){super.create(),this._animationTimer=ri.o.integerInRange(this._minimumTimeToPlay,this._maximumTimeToPlay)}update(){super.update(),this._elapsed+=dt.q.instance.game.time.deltaMS,this._elapsed>this._animationTimer&&(this._ambientAnimationClip.play(),this._elapsed=0,this._animationTimer=ri.o.integerInRange(this._minimumTimeToPlay,this._maximumTimeToPlay))}};(0,Q.Cg)([(0,X.MnK)(qw.Q),(0,Q.Sn)("design:type",qw.Q)],Xw.prototype,"_ambientAnimationClip",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Xw.prototype,"_minimumTimeToPlay",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Xw.prototype,"_maximumTimeToPlay",void 0),Xw=(0,Q.Cg)([(0,X.EVk)("PlayAmbientAnimation",et.Y.animation)],Xw);let Zw=class extends X.uAl{constructor(){super(...arguments),this._animators=[],this._loopInitialAnimation=!1}create(){super.create(),this._initialAnimation&&(0,jn.sR)(this._animators,this._initialAnimation,this._loopInitialAnimation)}playAnimation(q,K){(0,jn.sR)(this._animators,q,K)}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(Sy),(0,Q.Sn)("design:type",Array)],Zw.prototype,"_animators",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],Zw.prototype,"_initialAnimation",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],Zw.prototype,"_loopInitialAnimation",void 0),Zw=(0,Q.Cg)([(0,X.EVk)("PlayPlayerKeyframeAnimators",et.Y.animation)],Zw);let Jw=class extends Na.g{constructor(){super(...arguments),this.rampUpDuration=500,this._cycleIndex=-1,this._toTargetPosition=new X.I9Y,this._fromTargetPosition=new X.I9Y}update(){if(super.update(),this.isRunning())if(this._shakeTime+=dt.q.instance.game.time.deltaMS,this._shakeTimethis._cycleIndex&&(z>=this.cycles-1?this._toTargetPosition.setTo(0,0):z>this._cycleIndex+1?this.randomizePosition(this._fromTargetPosition):this._fromTargetPosition.copyFrom(this._toTargetPosition),this.randomizePosition(this._toTargetPosition),this._cycleIndex=z);const Q=this.rampUpDuration>0?Math.min(1,q*(this.durationMS/this.rampUpDuration)):1,Z=this.falloffDuration>0?Math.min(1,(1-q)*(this.durationMS/this.falloffDuration)):1,J=this.amplitude*Q*Z*Yb.B.screenShake.value;this._cameraTransform.setPosition(this._cameraInitialX+Math.floor(X.cj9.linear(this._fromTargetPosition.x,this._toTargetPosition.x,Y)*J),this._cameraInitialY+Math.floor(X.cj9.linear(this._fromTargetPosition.y,this._toTargetPosition.y,Y)*J))}else this._cameraTransform.setPosition(this._cameraInitialX,this._cameraInitialY),this._loadAreaCameraFollowController.Active=!0,this._shakeTime=null,this.onComplete.dispatch()}randomizePosition(q){q.x=2*Math.random()-1,q.y=2*Math.random()-1}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],Jw.prototype,"rampUpDuration",void 0),Jw=(0,Q.Cg)([(0,X.EVk)("ShuffleScreenShake",et.Y.motion)],Jw);z(2224);let tT=class extends X.uAl{constructor(){super(...arguments),this._volume=1}destroy(){this._audio&&(this.stopSFX(),this._audio.destroy()),super.destroy()}playSFX(){const q=X.Aq$.isDefined(this._volume)?this._volume:1,K=Yb.B.effectVolume.value*q;this._audio=dt.q.instance.prodigy.audio.playSound(this._sfxID,!0,K),Yb.B.effectVolume.onChanged.add((K=>{this._audio.volume=K*q}),this)}stopSFX(){this._audio&&(this._audio.stop(),Yb.B.effectVolume.onChanged.removeAll(this))}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],tT.prototype,"_sfxID",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],tT.prototype,"_volume",void 0),tT=(0,Q.Cg)([(0,X.EVk)("PlayLoopedSoundEffect",et.Y.audio)],tT);z(86730);let eT=class extends X.uAl{constructor(){super(...arguments),this._timeMS=0}startTimer(){this._timer=window.setTimeout((()=>{this._sfx.playSFX()}),this._timeMS)}destroy(){X.Aq$.isDefined(this._timer)&&(window.clearTimeout(this._timer),this._timer=null),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],eT.prototype,"_timeMS",void 0),(0,Q.Cg)([(0,X.MnK)(ga),(0,Q.Sn)("design:type",ga)],eT.prototype,"_sfx",void 0),eT=(0,Q.Cg)([(0,X.EVk)("PlaySoundEffectTimer",et.Y.audio)],eT);let iT=class extends X.uAl{constructor(){super(...arguments),this._timers=[]}startSequence(){var q;null===(q=this._timers)||void 0===q||q.forEach((q=>{q.startTimer()}))}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(eT),(0,Q.Sn)("design:type",Array)],iT.prototype,"_timers",void 0),iT=(0,Q.Cg)([(0,X.EVk)("PlaySoundEffectSequence",et.Y.audio)],iT);let sT=class extends X.uAl{complete(){dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(this._breadcrumbFeatureName,this._breadcrumbName)}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],sT.prototype,"_breadcrumbFeatureName",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],sT.prototype,"_breadcrumbName",void 0),sT=(0,Q.Cg)([(0,X.EVk)("CompleteBreadcrumb",et.Y.saving)],sT);let nT=class extends X.uAl{constructor(){super(...arguments),this.breadcrumbCompleted=new X.HN0}create(){super.create(),dt.q.instance.prodigy.breadcrumbManager.onBreadcrumbCompleted.add(this.breadcrumbCompleted.dispatch,this.breadcrumbCompleted)}destroy(){this.breadcrumbCompleted.dispose(),dt.q.instance.prodigy.breadcrumbManager.onBreadcrumbCompleted.remove(this.breadcrumbCompleted.dispatch,this.breadcrumbCompleted),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],nT.prototype,"breadcrumbCompleted",void 0),nT=(0,Q.Cg)([(0,X.EVk)("OnBreadcrumbCompleted",et.Y.saving)],nT);let aT=class extends X.uAl{constructor(){super(...arguments),this.onCanAfford=new X.HN0,this.onCannotAfford=new X.HN0}create(){super.create(),this._checkOnCreate&&this.check()}destroy(){this.onCanAfford.dispose(),this.onCannotAfford.dispose(),super.destroy()}check(){if(!X.Aq$.isDefined(this.currencyId)||!X.Aq$.isDefined(this.amount))return void X.VyI.log("[CanAffordPaymentGuardComponent] Cannot check; Currency ID or Amount are undefined",X.$bb.Warning);const q={currency:this.currencyId,value:this.amount};this._paymentManager.canAfford(q)?this.onCanAfford.dispatch():(this.canSendEvent()&&dt.q.instance.prodigy.gameContainer.get("20f-5f67").item.sendInsufficientCurrencyEvent(q,{sink_type:this.sinkType,sink_id:this.sinkId}),this.onCannotAfford.dispatch())}canSendEvent(){return!(!X.Aq$.isDefined(this.sinkType)||!X.Aq$.isDefined(this.sinkId)||this.sinkType.length<1)&&("string"!=typeof this.sinkId||this.sinkId.length>0)}};(0,Q.Cg)([(0,X.Cdj)("ec3-31a0"),(0,Q.Sn)("design:type",ia.E)],aT.prototype,"_paymentManager",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],aT.prototype,"_checkOnCreate",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aT.prototype,"currencyId",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aT.prototype,"amount",void 0),(0,Q.Cg)([(0,X.gfw)(Ei.C),(0,Q.Sn)("design:type",String)],aT.prototype,"sinkType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",Object)],aT.prototype,"sinkId",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],aT.prototype,"onCanAfford",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],aT.prototype,"onCannotAfford",void 0),aT=(0,Q.Cg)([(0,X.EVk)("CanAffordPaymentGuard",et.Y.economy)],aT);var rT=z(2519);let oT=class extends X.uAl{constructor(){super(...arguments),this._validClassCode=!1,this.OnDuplicateClassCodeEntered=new X.HN0,this.OnValidClassCodeEntered=new X.HN0,this.OnInputFieldUpdated=new X.HN0,this.OnValidClassCodeSet=new X.HN0,this.OnFailedSetClassCode=new X.HN0,this.OnAttemptedSetClassCode=new X.HN0,this._processingCode=!1}create(){super.create(),this._gameNetworkManager=dt.q.instance.prodigy.gameContainer.get("774-4659"),this._gameNetworkManager.getCurrentClassCode().then((q=>{var K,z,Y,Q;this._existingClassCode=null===(Q=null===(Y=null===(z=null===(K=q)||void 0===K?void 0:K.data)||void 0===z?void 0:z.player)||void 0===Y?void 0:Y.currentClassroom)||void 0===Q?void 0:Q.code})).catch((()=>{X.RQr.createHandler("ClassCodeSection: Failed to get current class code")}))}destroy(){this.OnDuplicateClassCodeEntered.dispose(),this.OnValidClassCodeEntered.dispose(),this.OnInputFieldUpdated.dispose(),this.OnValidClassCodeSet.dispose(),this.OnFailedSetClassCode.dispose(),this.OnAttemptedSetClassCode.dispose(),super.destroy()}validateClassCode(q){const K=Vv.b.reformatClassCode(q);K!==this._existingClassCode?(this._classCodeInput=K,this._validClassCode=Vv.b.isValidClassCode(this._classCodeInput),this._validClassCode?this.OnValidClassCodeEntered.dispatch():this.OnInputFieldUpdated.dispatch()):this.OnDuplicateClassCodeEntered.dispatch()}onSaveClassCodeClicked(){this._validClassCode&&!this._processingCode&&(this._processingCode=!0,dt.q.instance.prodigy.audio.playSFX(18,"pop"),this._gameNetworkManager.attachClassCode(this._classCodeInput,(()=>this.onAttachClassCodeAttempted(!0)),(()=>this.onAttachClassCodeAttempted(!1))).catch(X.RQr.createHandler("Error attaching class code")).finally((()=>{this._processingCode=!1})))}onAttachClassCodeAttempted(q){if(!q)return void this.OnFailedSetClassCode.dispatch();const K=dt.q.instance.prodigy.gameContainer.get("782-c308");K&&(K.isClassCodeAttached=!0,K.data.classCodeUpdateTimestamp=Date.now(),K.updated=!0),this.OnValidClassCodeSet.dispatch()}checkAndCompleteClassCodeQuest(){dt.q.instance.prodigy.gameContainer.get("476-a586").sendClassCodeQuestEvent().catch(X.RQr.createHandler("[ClassCodeRegistrationHandlerComponent] Error completing class code quest"))}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],oT.prototype,"OnDuplicateClassCodeEntered",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],oT.prototype,"OnValidClassCodeEntered",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],oT.prototype,"OnInputFieldUpdated",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],oT.prototype,"OnValidClassCodeSet",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],oT.prototype,"OnFailedSetClassCode",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],oT.prototype,"OnAttemptedSetClassCode",void 0),oT=(0,Q.Cg)([(0,X.EVk)("ClassCodeRegistrationHandler",et.Y.education)],oT);z(20706);let hT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["externalFactory"],{inBattle:!1})}execute(){super.execute();if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.finish({answerCorrect:_w,responseTime:0});return}const q=this.findParameter("externalFactory"),K=this.findParameter("inBattle");q.question(((q,K,z,Y,Q,X)=>{this.finish({answerCorrect:q,responseTime:K,skillData:X})}),{isUserInBattle:K,allowTutorials:!0})}};hT=(0,Q.Cg)([(0,X.ba9)("AnswerQuestion")],hT);let cT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["items"],{silent:!1,wait:!0,eventType:null,noRepeat:!1,sourceType:Ei.C.Interactable,sourceID:null,transactionID:null,fakeAward:!1})}execute(){super.execute();let q=this.findParameter("items");const K=this.findParameter("silent"),z=this.findParameter("wait"),Y=this.findParameter("eventType"),Q=this.findParameter("noRepeat"),X=this.findParameter("sourceType"),Z=this.findParameter("sourceID"),J=this.findParameter("transactionID"),tt=this.findParameter("fakeAward"),et=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(Q&&(q=q.filter((q=>et.backpack.hasItem(q.type,q.ID)<=0))),K){for(const K of q)re.J.bagItem(K,dt.q.instance.game,"interactable",void 0,{item_id:K.ID,transaction_id:J,source_type:X,source_id:Z});this.finish()}else z?(0,Nd.MQ)(q,Y,X,Z,J,tt).then((()=>{this.finish()})):((0,Nd.GP)(q,Y),this.finish());null==et||et.forceSaveCharacter()}};cT=(0,Q.Cg)([(0,X.ba9)("AwardItems")],cT);let dT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["type","properties"])}execute(){super.execute(),this.finish()}};dT=(0,Q.Cg)([(0,X.ba9)("BroadcastGameEvent")],dT);let lT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["events"])}execute(){super.execute();this.findParameter("events").forEach((q=>{const K=q.eventType,z=q.eventData;switch(K){case"Funnel Advanced":dt.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent(z)}})),this.finish()}};lT=(0,Q.Cg)([(0,X.ba9)("BroadcastSegmentGameEvent")],lT);let uT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["cameraTransform","targetTransform"],{cameraFollowController:null,enableFollowController:!1,panTimeMs:1e3})}execute(){const q=this.findParameter("cameraTransform"),K=this.findParameter("targetTransform"),z=this.findParameter("cameraFollowController"),Y=this.findParameter("enableFollowController"),Q=this.findParameter("panTimeMs");(0,Nd.lz)(q,K,Q,Y,z).then((()=>{this.finish()}))}};uT=(0,Q.Cg)([(0,X.ba9)("CameraPan")],uT);let fT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["featureName","breadcrumbName"])}execute(){super.execute();const q=this.findParameter("featureName"),K=this.findParameter("breadcrumbName");dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Es.B[q],Es.B[K]),this.finish()}};fT=(0,Q.Cg)([(0,X.ba9)("CompleteBreadcrumb")],fT);let bT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest"])}execute(){super.execute();const q=dt.q.instance.prodigy.world.getZone(this.findParameter("zone"));q&&q.completeQuest(this.findParameter("quest")),this.finish()}};bT=(0,Q.Cg)([(0,X.ba9)("CompleteQuest")],bT);let pT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest","sequence"])}execute(){super.execute();const q=this.findParameter("zone"),K=this.findParameter("quest"),z=this.findParameter("sequence"),Y=dt.q.instance.prodigy.world.getZone(q);Y&&Y.completeSequence(this.findParameter("quest"),this.findParameter("sequence"));const Q=dt.q.instance.prodigy.gameContainer.get("b37-c775");Q&&Q.sendQuestEventViaHub(eo.T.FSM_COMPLETE_SEQUENCE,{}).catch(X.RQr.createHandler(`Failed to send FSM_COMPLETE_SEQUENCE quest event (zone: ${q}, quest: ${K}, sequence: ${z})`)),this.finish()}};pT=(0,Q.Cg)([(0,X.ba9)("CompleteSequence")],pT);let vT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["type","ID"],{amount:1})}execute(){super.execute();dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.consume(this.findParameter("type"),this.findParameter("ID"),this.findParameter("amount")),this.finish()}};vT=(0,Q.Cg)([(0,X.ba9)("ConsumeItem")],vT);let gT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["creature","ID"],{height:100,dontHide:!1,durationMS:3e3})}execute(){super.execute();const q=this.findParameter("creature");if(q){const K=this.findParameter("ID"),z=this.findParameter("height"),Y=this.findParameter("dontHide"),Q=this.findParameter("durationMS");q.chat(K,z,Y,Q)}this.finish()}};gT=(0,Q.Cg)([(0,X.ba9)("CreateChatBubble")],gT);let mT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["parent","x","y"])}execute(){super.execute();const q=this.findParameter("parent");let K=null;q&&(K=dt.q.instance.prodigy.create.element(q,this.findParameter("x"),this.findParameter("y"))),this.finish({element:K})}};mT=(0,Q.Cg)([(0,X.ba9)("CreateElement")],mT);var yT=z(5898),_T=z(28930);let ET=class extends X.rcl{constructor(){super(...arguments),this.collected=!1}validate(){return super.validate()&&this.validateParameters(["map","config","x","y"],{})}execute(){super.execute(),this.map=this.findParameter("map"),this.config=this.findParameter("config"),this.x=this.findParameter("x"),this.y=this.findParameter("y"),this.y+=25,X.Aq$.isDefined(this.config)&&(this.goldenPage=dt.q.instance.prodigy.create.sprite(this.x,this.y,As.q.Golden_page),this.goldenPage.anchor.x=.5,this.goldenPage.anchor.y=1,this.goldenPage.inputEnabled=!0,this.goldenPage.events.onInputUp.add((()=>{this.checkPathToPedestal(0)})),this.map.screen.content.addChild(this.goldenPage),this.map.game.add.tween(this.goldenPage,this).to({y:this.y-20},1400,X.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start(),this.config.sendSegmentEvents("Container Discovered","golden-page",{x:this.x,y:this.y})),this.finish()}checkPathToPedestal(q){let K=0,z=0;switch(q){case _T.O.North:z=-15;break;case _T.O.East:K=80,z=80;break;case _T.O.South:z=120;break;case _T.O.West:K=-80,z=80;break;default:return X.VyI.log("No path can be found to the pedestal! Fix the position or map collisions.",X.$bb.Error),void this.collect()}this.map.screen.path.reset(),this.map.screen.path.findPath(this.map.screen.user.x,this.map.screen.user.y,this.x+K,this.y+z,!0).then((K=>{K?this.map.screen.user.setPath(K,(()=>{this.collect()})):this.checkPathToPedestal(q+1)})).catch(X.RQr.createHandler("Unable to find path to pedestal"))}collect(){if(!this.collected){this.config.sendSegmentEvents("Container Opened","golden-page"),dt.q.instance.prodigy.open.gotItem([{type:"currency",ID:this.config.id,N:this.config.quantity}],null,null,null,null,null,{source_type:Ei.C.Interactable}),this.map.addCollected("goldenPage");dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.achievements.increment(yT.f.GoldenPagesEarned,this.config.quantity),this.map.game.broadcaster.broadcast(Xn.$i.TargetCollected),this.goldenPage.destroy(),this.collected=!0}}};ET=(0,Q.Cg)([(0,X.ba9)("CreateGoldenPageDungeonComponent")],ET);let wT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["parent","type","ID","x","y"],{anchor:null})}execute(){super.execute();const q=this.findParameter("parent");let K=null;q&&(K=dt.q.instance.prodigy.icon.createIcon(this.findParameter("x"),this.findParameter("y"),Ts.E.getIconForType(this.findParameter("type"),this.findParameter("ID")),this.findParameter("anchor")),q.addChild(K)),this.finish({icon:K})}};wT=(0,Q.Cg)([(0,X.ba9)("CreateIcon")],wT);let TT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["map","config","x","y"],{})}execute(){super.execute();const q=this.findParameter("map"),K=this.findParameter("config"),z=this.findParameter("x"),Y=this.findParameter("y");if(X.Aq$.isDefined(K)){const Q=[];yt.forEach(K.drops,((q,K)=>{const z={type:"",ID:0,N:0};z.type=q.getType(),z.ID=q.getID(),z.N=q.getQuantity(),Q.push(z)}));const X={difficulty:K.difficulty,randDir:!0,encounter:[{ID:K.id}],drops:Q,dropsDisabled:!0,minTeamSize:K.minTeamSize,maxTeamSize:K.maxTeamSize,bench:K.bench};q.addMonster(q.game,q.screen,1,z,Y,!0,X)}this.finish()}};TT=(0,Q.Cg)([(0,X.ba9)("CreateMonsterDungeonComponent")],TT);let ST=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["map","config","positions"])}execute(){super.execute(),this.map=this.findParameter("map"),this.config=this.findParameter("config");const q=this.findParameter("positions");if(X.Aq$.isDefined(this.config)){for(let K=0;K{this.map.screen.path.findPath(this.map.screen.user.x,this.map.screen.user.y,q[K].x,q[K].y,!0).then((q=>{q?this.map.screen.user.setPath(q,(()=>{this.collect(z,K)})):X.VyI.log("Path to this page cannot be found. Fix the position.",X.$bb.Error)})).catch(X.RQr.createHandler("Unable to find path to page"))})),this.map.screen.content.addChild(z)}q&&q.length>0&&this.config.sendSegmentEvents("Container Discovered","academy-page-0",{x:q[0].x,y:q[0].y})}this.finish()}collect(q,K){this.config.sendSegmentEvents("Container Opened",`academy-page-${K}`),dt.q.instance.prodigy.open.gotItem([{type:"currency",ID:this.config.id,N:1}],null,null,null,null,null,{source_type:Ei.C.Interactable}),q.destroy(),this.map.addCollected(`page-${K}`),this.map.game.broadcaster.broadcast(Xn.f7.PagesCollected)}};ST=(0,Q.Cg)([(0,X.ba9)("CreatePageDungeonComponent")],ST);let AT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["prefabLoader","parent","offset","count","wait"])}execute(){super.execute();let q=this.findParameter("count");const K=()=>{--q,q<=0&&this.finish()},z=this.findParameter("prefabLoader"),Y=this.findParameter("parent"),Q=this.findParameter("offset"),X=this.findParameter("wait");for(let Z=0;Z{q.transform.setPosition(Q.x*Z,Q.y*Z);q.findComponent(Bs.j).OnAnimationComplete.addOnce((()=>{dt.q.instance.game.time.events.addTimer(1,(()=>{q.destroy()}),[]),X&&K()}),this)}));X||this.finish()}};AT=(0,Q.Cg)([(0,X.ba9)("CreateSmokeCloudRow")],AT);let CT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["map","ID","animation","x","y"],{layer:Xh.E.ContentLayer,loop:!0,flip:!1,randomDelay:!1,fadeIn:0,animationChain:[],name:null})}execute(){super.execute(),this.map=this.findParameter("map");const q=this.findParameter("x"),K=this.findParameter("y"),z=this.findParameter("ID"),Y=this.findParameter("animation"),Q=this.findParameter("layer"),X=this.findParameter("loop"),Z=this.findParameter("flip"),J=this.findParameter("randomDelay"),tt=this.findParameter("fadeIn"),et=this.findParameter("animationChain");dt.q.instance.prodigy.load.assets([`spine-${z}`],(()=>{this.create(this.map,z,Y,q,K,X,Q,Z,J?100*ri.o.integerInRange(0,20):0,tt,et)})),this.finish()}create(q,K,z,Y,Q,Z,J,tt,et,it,st){let nt=null,at=null;const rt=q.game.add.spine(Y,Q,`spine-${K}`);rt.onDestroy.add((K=>{null!==nt&&(clearTimeout(nt),nt=null),at&&(q.game.tweens.remove(at),at=null)}).bind(this,rt)),rt.setToSetupPose(),rt.scale.x*=tt?-1:1,q.screen[J].addChild(rt);const ot=this.findParameter("name");if(X.Aq$.isDefined(ot)&&(rt.name=ot),0===st.length)et>0?(rt.visible=!1,nt=window.setTimeout((()=>{rt.visible=!0,at=this.fadeIn(rt,it),rt.setAnimationByName(0,z,Z)}),et)):(rt.setAnimationByName(0,z,Z),at=this.fadeIn(rt,it));else{rt.setAnimationByName(0,st[0],!1);for(let q=1;q0){q.alpha=0;const z=this.map.game.add.tween(q,this);return z.to({alpha:1},K,X.GS3.Linear.None,!0),z}}};CT=(0,Q.Cg)([(0,X.ba9)("CreateSpine")],CT);let OT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["parent","x","y","source"],{frame:null,width:null,height:null,anchor:null,alpha:1,inputEnabled:!1})}execute(){super.execute();const q=this.findParameter("parent");let K=null;q&&(K=dt.q.instance.prodigy.create.sprite(this.findParameter("x"),this.findParameter("y"),this.findParameter("source"),this.findParameter("frame"),this.findParameter("anchor"),null,this.findParameter("width"),this.findParameter("height")),K.alpha=this.findParameter("alpha"),K.inputEnabled=this.findParameter("inputEnabled"),q.addChild(K)),this.finish({sprite:K})}};OT=(0,Q.Cg)([(0,X.ba9)("CreateSprite")],OT);let IT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["object"])}execute(){this.findParameter("object").destroy(),this.finish()}};IT=(0,Q.Cg)([(0,X.ba9)("Destroy")],IT);let DT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["enable","game"])}execute(){super.execute();const q=this.findParameter("game"),K=this.findParameter("enable");(0,Nd.QQ)(q,K),this.finish()}};DT=(0,Q.Cg)([(0,X.ba9)("EnableInput")],DT);let RT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["enable"])}execute(){super.execute(),(0,Nd.dD)(this.findParameter("enable")),this.finish()}};RT=(0,Q.Cg)([(0,X.ba9)("EnableSave")],RT);let PT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["x","y","w","h","time"],{wait:!0,randomize:!1})}execute(){super.execute();const q=this.findParameter("x"),K=this.findParameter("y"),z=this.findParameter("w"),Y=this.findParameter("h"),Q=this.findParameter("time"),X=this.findParameter("randomize");this.findParameter("wait")?dt.q.instance.prodigy.effects.explode(q,K,z,Y,Q,this.finish.bind(this),X):(dt.q.instance.prodigy.effects.explode(q,K,z,Y,Q,null,X),this.finish())}};PT=(0,Q.Cg)([(0,X.ba9)("Explode")],PT);let MT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["graphic","duration"])}execute(){const q=this.findParameter("graphic"),K=this.findParameter("duration");dt.q.instance.game.add.tween(q.image,this).to({alpha:0},K,X.GS3.Quadratic.Out,!0).onTweenComplete.add(this.finish,this)}};MT=(0,Q.Cg)([(0,X.ba9)("FadeOutGraphic")],MT);let NT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["transform","duration"])}execute(){const q=this.findParameter("transform"),K=this.findParameter("duration");dt.q.instance.game.add.tween(q.group,this).to({alpha:0},K,X.GS3.Quadratic.Out,!0).onTweenComplete.add(this.finish,this)}};NT=(0,Q.Cg)([(0,X.ba9)("FadeOutLegacyTransform")],NT);let xT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["spine","duration"])}execute(){const q=this.findParameter("spine"),K=this.findParameter("duration");dt.q.instance.game.add.tween(q.spine,this).to({alpha:0},K,X.GS3.Quadratic.Out,!0).onTweenComplete.add(this.finish,this)}};xT=(0,Q.Cg)([(0,X.ba9)("FadeOutSpine")],xT);let LT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["durationMS","renderComponent","targetAlpha"],{initialAlpha:null,wait:!1})}execute(){const q=this.findParameter("renderComponent"),K=this.findParameter("durationMS"),z=this.findParameter("targetAlpha"),Y=q.getRootContainer(),Q=this.findParameter("wait"),Z=this.findParameter("initialAlpha");null===Z||Number.isNaN(Z)||(Y.alpha=Z);dt.q.instance.game.add.tween(Y,this).to({alpha:z},K,X.GS3.Quadratic.Out,!0).onTweenComplete.addOnce((()=>{Y.alpha=z,Q&&this.finish()})),Q||this.finish()}};LT=(0,Q.Cg)([(0,X.ba9)("FadeRenderComponent")],LT);let kT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["target","componentType"])}execute(){const q=this.findParameter("target"),K=X.XFX[this.findParameter("componentType")];K?this.finish({component:q.findComponent(K)}):this.finish()}};kT=(0,Q.Cg)([(0,X.ba9)("FindComponent")],kT);let BT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["creature"])}execute(){const q=this.findParameter("creature");q&&q.flip(),this.finish()}};BT=(0,Q.Cg)([(0,X.ba9)("FlipCreature")],BT);let UT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["zone"])}execute(){super.execute();const q=dt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let K=0;q&&(K=q.getState("daily").rewards),this.finish({result:K})}};UT=(0,Q.Cg)([(0,X.ba9)("GetDailyRewardCount")],UT);let FT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["zone","state"])}execute(){super.execute();const q=dt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let K=null;if(q){const z=q.getState(this.findParameter("state"));X.Aq$.isDefined(z)&&(K=z)}this.finish({result:K})}};FT=(0,Q.Cg)([(0,X.ba9)("GetZoneState")],FT);let GT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["type","ID"])}execute(){super.execute();const q=this.findParameter("type"),K=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let z=0;switch(q){case"pet":z=K.kennel.hasPet(this.findParameter("ID"))?1:0;break;default:z=K.backpack.hasItem(q,this.findParameter("ID"))}this.finish({amount:z})}};GT=(0,Q.Cg)([(0,X.ba9)("HasItem")],GT);let jT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["screen","hide"])}execute(){super.execute();const q=this.findParameter("screen");q&&(q.hideHex=this.findParameter("hide")),this.finish()}};jT=(0,Q.Cg)([(0,X.ba9)("HideFollow")],jT);let $T=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["element","show"],{xOffset:0,yOffset:0})}execute(){super.execute();const q=this.findParameter("element");q&&q.highlight(this.findParameter("show"),this.findParameter("xOffset"),this.findParameter("yOffset")),this.finish()}};$T=(0,Q.Cg)([(0,X.ba9)("HighlightElement")],$T);let HT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["creature","time"],{wait:!0,xOffset:0,height:0})}execute(){const q=this.findParameter("creature");if(q){const K=this.findParameter("time"),z=this.findParameter("xOffset"),Y=this.findParameter("height");this.findParameter("wait")?q.hop(1e3*K,this.finish.bind(this),z,Y):(q.hop(1e3*K,null,z,Y),this.finish())}else this.finish()}};HT=(0,Q.Cg)([(0,X.ba9)("Hop")],HT);let VT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["transform","time"],{wait:!0,xOffset:0,height:0})}execute(){const q=this.findParameter("transform"),K=q.localPosition,z=this.findParameter("time"),Y=this.findParameter("xOffset"),Q=dt.q.instance.game.add.tween(q.localPosition,this).to({y:K.y-this.findParameter("height")},z,X.GS3.Quadratic.Out).to({y:K.y},z,X.GS3.Quadratic.In).start();0!==Y&&dt.q.instance.game.add.tween(q.localPosition,this).to({x:K.x+Math.floor(.5*Y)},z,X.GS3.Linear.None).to({x:K.x+Y},z,X.GS3.Linear.None).start(),this.findParameter("wait")?Q.onTweenComplete.addOnce((()=>{this.finish()})):this.finish()}};VT=(0,Q.Cg)([(0,X.ba9)("HopTransform")],VT);let WT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["difficulty"])}execute(){super.execute();const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=this.findParameter("difficulty");let z=!1;K&&(z=q.difficultyUnlocks[K]),this.finish({result:z})}};WT=(0,Q.Cg)([(0,X.ba9)("IsDifficultyUnlocked")],WT);let qT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest"])}execute(){super.execute();const q=dt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let K=!1;q&&(K=q.isOnQuest(this.findParameter("quest"))),this.finish({result:K})}};qT=(0,Q.Cg)([(0,X.ba9)("IsOnQuest")],qT);let KT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest","sequence"])}execute(){super.execute();const q=dt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let K=!1;q&&(K=q.isOnSequence(this.findParameter("quest"),this.findParameter("sequence"))),this.finish({result:K})}};KT=(0,Q.Cg)([(0,X.ba9)("IsOnSequence")],KT);let zT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest"])}execute(){super.execute();const q=dt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let K=!1;q&&(K=q.isQuestComplete(this.findParameter("quest"))),this.finish({result:K})}};zT=(0,Q.Cg)([(0,X.ba9)("IsQuestComplete")],zT);let YT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["target","position"])}execute(){const q=this.findParameter("target");q.onMoveEnd.addOnce(this.finish,this),q.MoveTarget=this.findParameter("position")}};YT=(0,Q.Cg)([(0,X.ba9)("MoveToTarget")],YT);let QT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters([])}execute(){dt.q.instance.prodigy.audio.pauseBGM(),this.finish()}};QT=(0,Q.Cg)([(0,X.ba9)("PauseMusic")],QT);let XT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["animator","animationName"],{loop:!1,wait:!0})}execute(){const q=this.findParameter("animator"),K=this.findParameter("animationName");q&&K?(q.playAnimation(K,this.findParameter("loop"),!0),this.findParameter("wait")?q.OnAnimationComplete.addOnce((()=>{this.finish()})):this.finish()):(X.VyI.log("Missing animation name or ref to animator",X.$bb.Error),this.finish())}};XT=(0,Q.Cg)([(0,X.ba9)("PlayAnimation")],XT);let ZT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["animationClip"],{wait:!1})}execute(){const q=this.findParameter("animationClip"),K=this.findParameter("wait");q?K?(q.OnComplete.addOnce((()=>{this.finish()})),q.play()):(q.play(),this.finish()):(X.VyI.log("Missing ref to animationClip",X.$bb.Error),this.finish())}};ZT=(0,Q.Cg)([(0,X.ba9)("PlayAnimationClip")],ZT);let JT=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["animators","animationName"],{loop:!1,wait:!0})}execute(){const q=this.findParameter("animators"),K=this.findParameter("animationName");this.findParameter("wait")?(0,jn.ye)(q,K).then((()=>{this.finish()})):((0,jn.sR)(q,K,this.findParameter("loop")),this.finish())}};JT=(0,Q.Cg)([(0,X.ba9)("PlayAnimators")],JT);let tS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["x","y","parent"],{wait:!1,delay:0})}execute(){const q=this.findParameter("wait");dt.q.instance.prodigy.effects.firework(this.findParameter("x"),this.findParameter("y"),q?()=>{this.finish()}:null,this.findParameter("parent"),this.findParameter("delay")),q||this.finish()}};tS=(0,Q.Cg)([(0,X.ba9)("PlayFirework")],tS);let eS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["ID"],{loop:!0})}execute(){const q=dt.q.instance.prodigy.gameContainer.get(X.t5G.AssetLoader),K=this.findParameter("ID");"string"==typeof K?q.loadAssets([K]).then((()=>this.playBgm(K))).catch(X.RQr.createHandler(`Error playing music asset ${K}`)):this.playBgm(K),this.finish()}playBgm(q){dt.q.instance.prodigy.audio.playBGM(q,this.findParameter("loop")),dt.q.instance.prodigy.audio.resumeBGM()}};eS=(0,Q.Cg)([(0,X.ba9)("PlayMusic")],eS);let iS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["scene"],{})}execute(){super.execute();const q=this.findParameter("scene");dt.q.instance.prodigy.world.playScene(q)}};iS=(0,Q.Cg)([(0,X.ba9)("PlayScene")],iS);var sS=z(79825);let nS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["ID","clip"],{wait:!1,delay:0,playDuration:null,fadeTime:200})}execute(){var q;const K=this.findParameter("ID"),z=this.findParameter("clip"),Y=this.findParameter("delay"),Q=null!==(q=this.findParameter("sfxVolumeType"))&&void 0!==q?q:sS.h.Sfx,X=dt.q.instance.prodigy.audio.getVolumeForType(Q);Y>0?dt.q.instance.game.time.events.addTimer(Y,(()=>{this.playSFX(K,z,X)}),this):this.playSFX(K,z,X)}playSFX(q,K,z){const Y=this.findParameter("playDuration"),Q=this.findParameter("wait");if(Y>0){const Z=Yb.B.effectVolume.value,J=dt.q.instance.prodigy.audio.playSFX(q,K,void 0,1,!1,z),tt=this.findParameter("fadeTime");J&&!J.isDestroyed&&(J.loop=!0,J.volume=0,dt.q.instance.game.add.tween(J,this).to({volume:Z},tt,X.GS3.Linear.None,!0),dt.q.instance.game.add.tween(J,this).to({volume:0},tt,X.GS3.Linear.None,!0,Y-2*tt).onTweenComplete.addOnce((()=>{Q&&this.finish()})))}else Q?dt.q.instance.prodigy.audio.playSFX(q,K,this.finish.bind(this),1,!1,z):dt.q.instance.prodigy.audio.playSFX(q,K,void 0,1,!1,z);Q||this.finish()}};nS=(0,Q.Cg)([(0,X.ba9)("PlaySound")],nS);let aS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["spine","animationName"],{loop:!1,wait:!0})}execute(){const q=this.findParameter("spine"),K=this.findParameter("animationName"),z=this.findParameter("loop");X.Aq$.isDefined(q)&&X.Aq$.isDefined(K)?this.findParameter("wait")?(0,Nd.qb)(q,K,z).then((()=>{this.finish()})):q instanceof gi.v?q.isLoaded?((0,Nd.ce)(q,K,z),this.finish()):q.OnLoaded.addOnce((()=>{(0,Nd.ce)(q,K,z),this.finish()})):((0,Nd.ce)(q,K,z),this.finish()):(X.VyI.log("Missing animation name or ref to spine",X.$bb.Error),this.finish())}};aS=(0,Q.Cg)([(0,X.ba9)("PlaySpine")],aS);let rS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["target"])}execute(){super.execute();this.findParameter("target").run(),this.finish()}};rS=(0,Q.Cg)([(0,X.ba9)("RunComponent")],rS);let oS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["transform","targetScale","duration"],{initialScale:null,wait:!1})}execute(){const q=this.findParameter("transform"),K=this.findParameter("targetScale"),z=this.findParameter("initialScale"),Y=this.findParameter("duration"),Q=this.findParameter("wait"),Z=q.localScale;let J={x:Z.x,y:Z.y};z&&(q.setScale(z.x,z.y),J=Object.assign({},z)),dt.q.instance.game.add.tween(J,this).to({x:K.x,y:K.y},Y,X.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{q.setScale(J.x,J.y)})).onTweenComplete.addOnce((()=>{q.setScale(K.x,K.y),Q&&this.finish()})),Q||this.finish()}};oS=(0,Q.Cg)([(0,X.ba9)("ScaleTransform")],oS);let hS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["eventName","eventData"])}execute(){super.execute(),this.finish()}};hS=(0,Q.Cg)([(0,X.ba9)("SendAdvancedEvent")],hS);let cS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["eventType","eventData"])}execute(){super.execute();const q=this.findParameter("eventType"),K=this.findParameter("eventData");dt.q.instance.prodigy.gameContainer.get("be3-4f64").sendQuestEvent(q,K).catch(X.RQr.createHandler(`Error sending quest event, ${q}`)),this.finish()}};cS=(0,Q.Cg)([(0,X.ba9)("SendZoneQuestEvent")],cS);let dS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["target","active"])}execute(){super.execute();const q=this.findParameter("target"),K=this.findParameter("active");q&&(q instanceof X.uAl?(0,Nd.pf)(q,K):(0,Nd.Ry)(q,K)),this.finish()}};dS=(0,Q.Cg)([(0,X.ba9)("SetActive")],dS);let lS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["animationController","state"],{loop:!1,wait:!0})}execute(){const q=this.findParameter("animationController"),K=this.findParameter("state"),z=this.findParameter("wait");q.changeState(K),z&&q.currentState?q.currentState.onFinished.addOnce(this.finish,this):this.finish()}};lS=(0,Q.Cg)([(0,X.ba9)("SetAnimationControllerState")],lS);let uS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["zone","count"])}execute(){super.execute();const q=dt.q.instance.prodigy.world.getZone(this.findParameter("zone"));q&&q.setState("daily",{date:q.getState("daily").date,flags:q.getState("daily").flags,rewards:this.findParameter("count")}),this.finish()}};uS=(0,Q.Cg)([(0,X.ba9)("SetDailyRewardCount")],uS);let fS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["player","flag"])}execute(){const q=this.findParameter("player");q&&(q.evtProc=this.findParameter("flag")),this.finish()}};fS=(0,Q.Cg)([(0,X.ba9)("SetEventProcessing")],fS);var bS=z(34234);let pS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["pathfinder","target"],{faceTransform:null})}execute(){var q;const K=null!==(q=this.findParameter("locomotion"))&&void 0!==q?q:X.wa5.getActiveScene().container.get("PlayerLocomotion"),z=Wt.l.guaranteeArray(this.findParameter("target")),Y=this.findParameter("faceTransform");this.runWaypoints(K,z,Y)}runWaypoints(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y=K.length;for(let Q=0;Q{q.setPosition(Y.x,Y.y)})),K?Q.onTweenComplete.addOnce(this.finish,this):this.finish(),Q.start()}};RS=(0,Q.Cg)([(0,X.ba9)("ShakeChestTransform")],RS);let PS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["character","ID"],{overlayMode:!1,showYesNo:!1,reenableInputOnClose:!0})}execute(){super.execute();const q=dt.q.instance.prodigy.dialogue.create(),K=this.findParameter("showYesNo"),z=this.findParameter("ID"),Y=this.findParameter("character"),Q=this.findParameter("overlayMode"),X=this.findParameter("reenableInputOnClose");if(z.constructor===Array){const Y=z;for(let z=0;z{this.finish()}),q);K&&z.setParent(K)}};MS=(0,Q.Cg)([(0,X.ba9)("ShowDialogueV2")],MS);let NS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["ID"],{overlayMode:!1,showYesNo:!1})}execute(){super.execute();const q=new Ii.rD(dt.q.instance.game),K=this.findParameter("showYesNo"),z=this.findParameter("ID"),Y=this.findParameter("overlayMode");let Q;if(Q=z.constructor===Array?yt.map(z,(K=>this.createDialogue(q,K,Y))):[this.createDialogue(q,z,Y)],K){const q=Q[Q.length-1];q.yes=()=>{this.finishWithAnswer(!0)},q.no=()=>{this.finishWithAnswer(!1)}}q.addEvents(Q),q.start(!0,K?void 0:()=>{this.finish({results:!1})})}createDialogue(q,K,z){return{dialogueData:q.dataProvider.get(K),blockInput:!z}}finishWithAnswer(q,K){X.Aq$.isDefined(K)&&K.close(),this.finish({result:q})}logAction(){super.logAction();const q=this.findParameter("ID"),K=this.findParameter("character");if(Array.isArray(q)){const z=q;for(let q=0;q{this.finish({dialogueSelection:"yes"})},no:()=>{this.finish({dialogueSelection:"no"})}}]),z.start(!0)}};xS=(0,Q.Cg)([(0,X.ba9)("ShowYesNoDialogue")],xS);let LS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["gameObjectFactory","rocks","positions","startDelay","endDelay","startTimeElapsed","endTimeElapsed","shuffleCount"])}execute(){super.execute();const q={0:0,1:1,2:2},K=this.findParameter("rocks"),z=this.findParameter("positions"),Y=z.length,Q=this.findParameter("startDelay"),Z=this.findParameter("endDelay"),J=this.findParameter("startTimeElapsed"),tt=this.findParameter("endTimeElapsed"),et=this.findParameter("shuffleCount"),it=this.findParameter("gameObjectFactory");let st=null,nt=null;const at={};for(let rt=0;rtX.cj9.fuzzyEqual(q.position.x,z[rt].x)&&X.cj9.fuzzyEqual(q.position.y,z[rt].y)));for(let X=0;X1?J+X/(et-1)*(tt-J):tt;let ot=0;X>0&&(ot=Q+(X-1)/(et-2)*(Z-Q));let ht=null;do{ht=ri.o.getUniqueRandomNumbers(0,Y,2).sort(((q,K)=>q-K))}while(nt&&nt[0]===ht[0]&&nt[1]===ht[1]);const ct=at[ht[0]];K.push(this.createRockTween(ct,it,z[ht[1]],rt,ot,0===X));const dt=at[ht[1]];if(K.push(this.createRockTween(dt,it,z[ht[0]],rt,ot,0===X)),K[0].onUpdate.add((function(){const q=this;if(q.invert===q.obj1.y>q.obj2.y&&!q.swapped){const K=q.obj1.parent;q.obj2.parent.addChild(q.obj1),K.addChild(q.obj2),q.swapped=!0}}),{obj1:ct,obj2:dt,swapped:!1,invert:z[ht[0]].y{const z=K;q.onTweenComplete.addOnce((()=>{z.start()}))}))}at[ht[1]]=ct,at[ht[0]]=dt;const lt=q[ht[1]];q[ht[1]]=q[ht[0]],q[ht[0]]=lt,st=K,nt=ht}st?st[st.length-1].onTweenComplete.addOnce((()=>{this.finish({newRockPositions:q})})):this.finish({rockPositions:q})}createRockTween(q,K,z,Y,Q,Z){return K.tween(q,this).to({x:z.x,y:z.y},Y,X.GS3.Quadratic.InOut,Z,Q)}};LS=(0,Q.Cg)([(0,X.ba9)("ShuffleRocks")],LS);let kS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["transform","scaleTimeMS"],{initialScale:2,targetScale:1,correctionAmounts:[-.03,.03,-.01,0],correctionTimes:[250,200,150,100],wait:!1})}execute(){const q=this.findParameter("transform"),K=this.findParameter("initialScale"),z=this.findParameter("targetScale"),Y=this.findParameter("scaleTimeMS"),Q=this.findParameter("correctionAmounts"),Z=this.findParameter("correctionTimes"),J=this.findParameter("wait"),tt={value:K},et=dt.q.instance.game.add.tween(tt,this).to({value:z+Q[0]},Y,X.GS3.Quadratic.InOut),it=Z.length;for(let st=1;st{q.setScale(tt.value,tt.value),J&&this.finish()})),et.onUpdateCallback((()=>{q.setScale(tt.value)})),et.start(),J||this.finish()}};kS=(0,Q.Cg)([(0,X.ba9)("SlamTransform")],kS);let BS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["ID"],{parent:null,createParent:!0,x:0,y:0,xScale:1,yScale:1})}execute(){super.execute();const q=this.findParameter("ID"),K=this.findParameter("parent"),z=this.findParameter("x"),Y=this.findParameter("y"),Q=this.findParameter("createParent");this.loadPrefab(q,K,z,Y,Q)}loadPrefab(q,K,z,Y,Q){let Z;Q&&(Z=new X._mx(yt.defaultTo(K,void 0)),Z.addComponent(X.K16),Z.legacyTransform.x=z,Z.legacyTransform.y=Y,Z.legacyTransform.scaleX=this.findParameter("xScale"),Z.legacyTransform.scaleY=this.findParameter("yScale"));dt.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependencies(q,Z).then((q=>{!Q&&q.transform&&(q.transform.setPosition(z,Y),q.transform.setScale(this.findParameter("xScale"),this.findParameter("yScale"))),this.finish({instance:q})}))}};BS=(0,Q.Cg)([(0,X.ba9)("SpawnPrefab")],BS);let US=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["data"],{defeatZone:null})}execute(){super.execute();const q=this.findParameter("data"),K=()=>{this.finish({isVictory:!0})};dt.q.instance.prodigy.battle.start(q,K,K,(()=>{this.finish({isVictory:!1})}),this.findParameter("defeatZone"))}};US=(0,Q.Cg)([(0,X.ba9)("StartBattle")],US);let FS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["zone","map","data"],{introText:null,wait:!1})}execute(){super.execute();const q=this.findParameter("zone");if(q){const K=this.findParameter("map"),z=this.findParameter("introText"),Y=this.findParameter("data");this.findParameter("wait")?q.getBattle(K,z,Y,this.finish.bind(this))():(q.getBattle(K,z,Y,null)(),this.finish())}else this.finish()}};FS=(0,Q.Cg)([(0,X.ba9)("StartZoneBattle")],FS);let GS=class extends X.rcl{execute(){super.execute(),dt.q.instance.prodigy.audio.pauseBGM(),this.finish()}};GS=(0,Q.Cg)([(0,X.ba9)("StopBackgroundMusic")],GS);var jS=z(79340);let $S=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["map"],{x:null,y:null,data:null,loadingData:{},wait:1e3,asScene:!1,assets:[]})}execute(){super.execute();const q=this.findParameter("map"),K=this.findParameter("x"),z=this.findParameter("y"),Y=this.findParameter("loadingData");if(Y.callback=()=>{dt.q.instance.game.time.events.addTimer(this.findParameter("wait"),(()=>{this.finish()}),[])},this.findParameter("asScene")){const Q=q.split("-"),X=dt.q.instance.prodigy.world.getZone(Q[0]),Z=new jS.Z(X,Q[1],this.findParameter("assets"),null,K,z);X.initScene(Z,Y)}else dt.q.instance.prodigy.world.it(q,K,z,this.findParameter("data"),Y)}};$S=(0,Q.Cg)([(0,X.ba9)("Teleport")],$S);let HS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["game","rectTransform","target","duration"],{from:null,wait:!0})}execute(){const q=this.findParameter("game"),K=this.findParameter("rectTransform"),z=this.findParameter("target"),Y=this.findParameter("from"),Q=this.findParameter("duration"),X=this.findParameter("wait"),Z=(0,Nd.XL)(q,K,z,Q,Y);X?Z.then((()=>{this.finish()})):this.finish()}};HS=(0,Q.Cg)([(0,X.ba9)("TweenRectTransformOffset")],HS);let VS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["transform","target","duration"],{from:null,wait:!0,ease:X.GS3.Quadratic.InOut})}execute(){const q=this.findParameter("transform"),K=this.findParameter("target"),z=this.findParameter("from"),Y=this.findParameter("duration"),Q=this.findParameter("ease"),X=this.findParameter("wait"),Z=(0,Nd.qe)(q,K,Y,z,Q);X?Z.then((()=>{this.finish()})):this.finish()}};VS=(0,Q.Cg)([(0,X.ba9)("TweenTransform")],VS);let WS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters([],{questID:null})}execute(){super.execute();const q=this.findParameter("questID");dt.q.instance.prodigy.gameContainer.get("996-2681").updateQuestProgress(q).catch(X.RQr.createHandler("There was a problem updating quest progress")).finally((()=>this.finish()))}};WS=(0,Q.Cg)([(0,X.ba9)("UpdateQuestData")],WS);let qS=class extends X.rcl{validate(){return super.validate()&&this.validateParameters(["signal"])}execute(){this.findParameter("signal").onDispatch.addOnce(this.finish,this)}};qS=(0,Q.Cg)([(0,X.ba9)("WaitForSignal")],qS);let KS=class extends Wo.B{consume(){if(X.Aq$.isDefined(this.id)){const q=this.getInjectedValue(this.id);q instanceof Function?q(this._targetComponent):X.Aq$.isDefined(q)&&X.VyI.log("InjectableConsumeInteractionComponent: Value is not a function!",X.$bb.Error)}else X.VyI.log("InjectableConsumeInteractionComponent: Value has not been set!",X.$bb.Error)}};KS=(0,Q.Cg)([(0,X.EVk)("InjectableComponentInteractionComponent",X.YH6.injection)],KS);let zS=class extends Wo.B{constructor(){super(...arguments),this.onDispatch=new X.HN0}create(){super.create(),this.consume()}consume(){var q;super.consume();const K=this.getInjectedValue(this.id);K instanceof X.HN0&&(null===(q=this._boundSignal)||void 0===q||q.remove(this.onDispatch.dispatch,this),K.add(this.onDispatch.dispatch,this.onDispatch),this._boundSignal=K)}destroy(){var q;null===(q=this._boundSignal)||void 0===q||q.remove(this.onDispatch.dispatch,this.onDispatch),this._boundSignal=null,this.onDispatch.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],zS.prototype,"onDispatch",void 0),zS=(0,Q.Cg)([(0,X.EVk)("InjectedSignal",et.Y.injection,"Allows an injected signal to be hooked up in a prefab")],zS);let YS=class extends X.uAl{fire(){const q=this.getInjectedValue(this._id);q instanceof X.HN0?q.dispatch():"function"==typeof q?q():X.Aq$.isDefined(q)&&X.VyI.log("InjectCallback attempted to fire a non-callable value:",X.$bb.Warning,q)}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],YS.prototype,"_id",void 0),YS=(0,Q.Cg)([(0,X.EVk)("InjectionCallback",et.Y.injection)],YS);let QS=class extends X.uAl{constructor(){super(...arguments),this._bindMultiple=!1,this._unbindOnDestroy=!0,this._boundValue=null}postDeserialize(){super.postDeserialize(),this._boundValue=this._targetComponent?X.Aq$.isDefined(this._targetProperty)&&this._targetProperty in this._targetComponent?this._targetComponent[this._targetProperty]:this._targetComponent:this.GameObject;const q=X.wa5.getActiveScene().container;this._bindMultiple?q.bind(this._id).toConstantValue(this._boundValue):q.rebind(this._id).toConstantValue(this._boundValue)}destroy(){if(this._unbindOnDestroy){const q=X.wa5.getActiveScene().container;if(q.hasBinding(this._id))if(this._bindMultiple){const K=q.sourceContainer,z=K.getAll(this._id).filter((q=>q!==this._boundValue));K.unbind(this._id);for(const q of z)K.bind(this._id).toConstantValue(q)}else q.get(this._id)===this._boundValue&&q.unbind(this._id)}super.destroy()}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],QS.prototype,"_id",void 0),(0,Q.Cg)([(0,X.MnK)(X.uAl),(0,Q.Sn)("design:type",X.uAl)],QS.prototype,"_targetComponent",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],QS.prototype,"_targetProperty",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],QS.prototype,"_bindMultiple",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],QS.prototype,"_unbindOnDestroy",void 0),QS=(0,Q.Cg)([(0,X.EVk)("InjectionExpose",et.Y.injection)],QS);let XS=class extends X.uAl{constructor(){super(...arguments),this.rebindOnCreate=!0}create(){super.create(),this.rebindOnCreate&&this.rebind()}rebind(){this.sourceIdentifiers.forEach(((q,K)=>{const z=this.targetIdentifiers[K]||q;q===z&&this.context.Container.hasBinding(q)&&this.context.Container.unbind(q);const Y=this.getInjectedValue(q);this.context.Container.rebind(z).toConstantValue(Y)}))}};(0,Q.Cg)([(0,X.Pqz)(X.bE_),(0,Q.Sn)("design:type",X.bE_)],XS.prototype,"context",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],XS.prototype,"rebindOnCreate",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],XS.prototype,"sourceIdentifiers",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],XS.prototype,"targetIdentifiers",void 0),XS=(0,Q.Cg)([(0,X.EVk)("InjectionRelay",X.YH6.injection,"Rebinds all values to a new local context, possibly with different identifiers")],XS);let ZS=class extends X.uAl{constructor(){super(...arguments),this.data={}}inject(){var q;Ht.d.updateInjectedValues(null!==(q=this.targetObject)&&void 0!==q?q:this.gameObject,this.data)}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],ZS.prototype,"targetObject",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],ZS.prototype,"data",void 0),ZS=(0,Q.Cg)([(0,X.EVk)("Injector")],ZS);let JS=class extends X.PQK{installBindings(){this.Container.rebind("316-5db0").toConstantValue(new Wi.D(this.Container,dt.q.instance.prodigy.gameContainer.get("774-4659")))}cleanup(){var q;null===(q=this.Container)||void 0===q||q.unbind("316-5db0")}};JS=(0,Q.Cg)([(0,X.Og1)("SocketServiceInstaller","Installer")],JS);var tA=z(30441);let eA=class extends X.uAl{get visible(){return this._renderComponent.Active}set visible(q){this._renderComponent.Active=q}setPath(q,K,z){X.Aq$.isDefined(z)&&(this._pathLocomotion.speed=z);const Y=q.map((q=>new X.I9Y(q.x,q.y)));Y.unshift(new X.I9Y(this.GameObject.transform.worldPosition.x,this.GameObject.transform.worldPosition.y)),this._pathLocomotion.setPath(Y),K&&this._pathLocomotion.onPathEnd.addOnce(K)}hop(q=100,K=null,z=0,Y=20){const Q={x:this.GameObject.transform.localPosition.x,y:this.gameObject.transform.localPosition.y},Z={x:this.GameObject.transform.localPosition.x,y:this.gameObject.transform.localPosition.y},J={x:Z.x+z,y:Z.y-Y},tt=dt.q.instance.game.add.tween(Z,this).to({y:J.y},q,X.GS3.Quadratic.Out).to({y:Q.y},q,X.GS3.Quadratic.In),et=dt.q.instance.game.add.tween(Z,this).to({x:J.x},2*q,X.GS3.Linear.None);tt.onUpdate.add((()=>this.gameObject.transform.setPosition(Z.x,Z.y))),tt.onTweenComplete.addOnce((()=>{dt.q.instance.prodigy.game.tweens.remove(tt),dt.q.instance.prodigy.game.tweens.remove(et),null==K||K()})),tt.start(),et.start()}flip(){const q=this.GameObject.transform.localScale.y,K=this.GameObject.transform.localScale.x;this.GameObject.transform.setScale(-1*K,q)}chat(q,K,z,Y=3e3){var Q;const X=q+12,Z=this._renderComponent.getRootContainer(),J=this.gameObject.transform.worldPosition;null!==(Q=this._chatBubble)&&void 0!==Q||(this._chatBubble=new tA.R(dt.q.instance.prodigy.game,Z,J.x,J.y-K,z,Y)),this._chatBubble.setID(X)}faceToward(q){const K=this.GameObject.transform.localScale.y,z=Math.abs(this.GameObject.transform.localScale.x),Y=q>this.GameObject.transform.worldPosition.x?z:-z;this.GameObject.transform.setScale(Y,K)}};(0,Q.Cg)([(0,X.Pqz)(X.KhP),(0,Q.Sn)("design:type",X.KhP)],eA.prototype,"_pathLocomotion",void 0),(0,Q.Cg)([(0,X.Pqz)(X.y4o),(0,Q.Sn)("design:type",X.y4o)],eA.prototype,"_renderComponent",void 0),eA=(0,Q.Cg)([(0,X.EVk)("CreatureContainerRelay",et.Y.root)],eA);z(53885);let iA=class extends X.uAl{postCreate(){super.postCreate();{const q=this.GameObject,K=this.getLayerContainer();if(K){const z=this._renderComponent.getRootContainer();if(K.addChild(z),this._layerType===Xh.E.ContentLayer){z.transform=new Ze.Transform;const K=()=>{z.x=q.transform.worldPosition.x,z.y=q.transform.worldPosition.y};K(),q.transform.onWorldMatrixChanged.add(K),q.onDestroy.addOnce((()=>q.transform.onWorldMatrixChanged.remove(K)))}else z.x=q.transform.worldPosition.x,z.y=q.transform.worldPosition.y}const z=dt.q.instance.prodigy.game.time.events.loop(se.s.TARGET_FPS_40_MS,q.update,q);q.onDestroy.addOnce((()=>dt.q.instance.prodigy.game.time.events.remove(z)))}}getLayerContainer(){const q=dt.q.instance.game.state.get(Nt.G.TileScreen);switch(this._layerType){case Xh.E.BackgroundLayer:return q.background;case Xh.E.ContentLayer:return q.content;case Xh.E.ForegroundLayer:return q.foreground;case Xh.E.DifficultyModeOverlay:return q.difficultyOverlay;case Xh.E.UiLayer:return q.uiLayer;case Xh.E.GameRenderCacheLayer:return q.gameRenderCache;case Xh.E.MenusLayer:return q.menus;case Xh.E.DialogueLayer:return q.dialogue;case Xh.E.OverlayLayer:return q.overlay;case Xh.E.ConsentLayer:default:return X.VyI.log("[LegacyLayerRelayComponent] Could not assign to a layer container.",X.$bb.Error),null}}};(0,Q.Cg)([(0,X.gfw)(Xh.E),(0,Q.Sn)("design:type",String)],iA.prototype,"_layerType",void 0),(0,Q.Cg)([(0,X.Pqz)(X.y4o),(0,Q.Sn)("design:type",X.y4o)],iA.prototype,"_renderComponent",void 0),iA=(0,Q.Cg)([(0,X.EVk)("LegacyLayerRelay",et.Y.root)],iA);z(68370);let sA=class extends X.uAl{get playerContainer(){return this._playerDataProvider.player.playerContainer}showName(q=null){this.playerContainer.showName(q)}setPosition(q,K){this.playerContainer.transform.position.set(q,K)}setPath(q,K,z){this.playerContainer.setPath(q,K,z)}hop(q=100,K=null,z=0,Y=20){this.playerContainer.hop(q,K,z,Y)}flip(){this.playerContainer.flip()}chat(q,K,z,Y){this.playerContainer.chat(q,K,z,Y)}get position(){return this.playerContainer.transform.position}get scale(){return this.playerContainer.transform.scale}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],sA.prototype,"_playerDataProvider",void 0),sA=(0,Q.Cg)([(0,X.EVk)("MainPlayerContainerRelay",et.Y.root)],sA);let nA=class extends X.uAl{constructor(){super(...arguments),this.onPathFound=new X.HN0,this.onStand=new X.HN0}get x(){return this._mainPlayerGameObject.transform.localPosition.x}get y(){return this._mainPlayerGameObject.transform.localPosition.y}destroy(){this.onPathFound.dispose(),this.onStand.dispose(),super.destroy()}disableMovement(){dt.q.instance.game.input.enabled=!1;this.getInjectedValue("PlayerPathfinder").stopMovement()}setPath(q,K=(()=>null)){if(0===q.length)return void K();const z=this.getInjectedValue("PlayerLocomotion");z.onPathComplete.addOnce(K),z.setPath(q)}};(0,Q.Cg)([(0,bS.d)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],nA.prototype,"_mainPlayerGameObject",void 0),nA=(0,Q.Cg)([(0,X.EVk)("MainPlayerGameObjectRelay",et.Y.map)],nA);z(73402),z(65165);let aA=class extends X.uAl{constructor(){super(...arguments),this._durationMs=600,this._rotationSpeed=.4,this._rotationVariance=100,this._maxStarScale=1.8,this._rotationVarianceDamping=3}create(){super.create();const q=this._starObject=this._prefabLoader.loadFromGUID(this._starsPrefabGUID);q.active=!1,this._starTransform=q.transform,this._sprite=q.findComponentInChildren(X.vYh).image,this._sprite.smoothed=!0}destroy(){var q;(null===(q=this._starObject)||void 0===q?void 0:q.isDestroyed)||this._starObject.destroy(),super.destroy()}startStar(){this._starTransform.setPosition(1/0,1/0),this._starTransform.setScale(0),this._starObject.active=!0,this._animationTime=this._sizeAnimationTime=0,this._touching=!0}moveStar(q){q&&this._starTransform.setPosition(q.x,q.y)}stopStar(){this._touching=!1}update(){super.update();const q=dt.q.instance.game.time.deltaMS;if(this._animationTime+=q,this._sizeAnimationTime+=q,this._touching){const q=.5*this._durationMs;this._sizeAnimationTime>q&&(this._sizeAnimationTime=q)}const K=this._sizeAnimationTime/this._durationMs;if(K<1){this._starTransform.setScale(K*this._maxStarScale,K*this._maxStarScale);const q=this._animationTime*this._rotationSpeed/this._rotationVariance;this._starTransform.localRotation=(q+Math.sin(q)/this._rotationVarianceDamping)*this._rotationVariance,this._sprite.alpha=Math.min(1,2-2*K)}else this._starObject.active=!1}};(0,Q.Cg)([(0,X.Bak)(),(0,X.W_S)(),(0,Q.Sn)("design:type",String)],aA.prototype,"_starsPrefabGUID",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aA.prototype,"_durationMs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aA.prototype,"_rotationSpeed",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aA.prototype,"_rotationVariance",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aA.prototype,"_maxStarScale",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aA.prototype,"_rotationVarianceDamping",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],aA.prototype,"_prefabLoader",void 0),aA=(0,Q.Cg)([(0,X.S1F)(),(0,X.EVk)("PlayMovementStarsAnimation",et.Y.animation)],aA);let rA=class extends X.uAl{constructor(){super(...arguments),this._pathData=[],this._speed=null,this._fromCurrent=!1,this._onComplete=new X.HN0}run(){(0,yt.isNumber)(this._speed)&&(this._targetLocomotionComponent.speed=this._speed);const q=this._pathData.map((q=>new X.I9Y(q.x,q.y)));this._fromCurrent&&q.unshift(new X.I9Y(this._targetLocomotionComponent.GameObject.transform.worldPosition.x,this._targetLocomotionComponent.GameObject.transform.worldPosition.y)),this._targetLocomotionComponent.setPath(q),this._targetLocomotionComponent.onPathEnd.addOnce(this._onComplete.dispatch,this._onComplete)}destroy(){this._targetLocomotionComponent.onPathEnd.remove(this._onComplete.dispatch,this._onComplete),this._onComplete.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.MnK)(X.KhP),(0,Q.Sn)("design:type",X.KhP)],rA.prototype,"_targetLocomotionComponent",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Array)],rA.prototype,"_pathData",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rA.prototype,"_speed",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],rA.prototype,"_fromCurrent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],rA.prototype,"_onComplete",void 0),rA=(0,Q.Cg)([(0,X.EVk)("SetPath",et.Y.motion)],rA);let oA=class extends X.uAl{stop(){var q,K;this._playerLocomotion&&this._playerLocomotion.stop();const z=dt.q.instance.game.state.get(Nt.G.TileScreen);null===(K=null===(q=null==z?void 0:z.user)||void 0===q?void 0:q.setPath)||void 0===K||K.call(q,[])}};(0,Q.Cg)([(0,X.Cdj)("PlayerLocomotion"),(0,Q.Sn)("design:type",X.KhP)],oA.prototype,"_playerLocomotion",void 0),oA=(0,Q.Cg)([(0,X.EVk)("StopPlayer",et.Y.motion)],oA);let hA=class extends X.uAl{constructor(){super(...arguments),this.onComplete=new X.HN0}run(){var q;const K=X.wa5.getActiveScene().container;if(K.get("IS_PREFAB_MAP")){K.get("ACTIVE_PLAYER_POSITION")&&X.wa5.getActiveScene().container.rebind("ACTIVE_PLAYER_POSITION").toConstantValue({x:this.gameObject.transform.worldPosition.x,y:this.gameObject.transform.worldPosition.y})}const z=null===(q=K.get("MainPlayerGameObject"))||void 0===q?void 0:q.transform;if(z){z.worldPosition=this.gameObject.transform.worldPosition;const q=z.GameObject.findComponentInChildren(ea.m);q&&X.Aq$.isDefined(this._facingDirection)&&q.setFacingDirection(this._facingDirection)}else{const q=dt.q.instance.game.state.get(Nt.G.TileScreen);(null==q?void 0:q.user)?(q.user.position=this.gameObject.transform.worldPosition,q.user.faceToward(this.gameObject.transform.worldPosition.x+100*-this._facingDirection)):X.VyI.log("[TeleportPlayerToThisComponent] No player transform found. Unable to teleport the player to the specified position.",X.$bb.Error)}}destroy(){this.onComplete.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],hA.prototype,"onComplete",void 0),(0,Q.Cg)([(0,X.gfw)($e.y),(0,Q.Sn)("design:type",Number)],hA.prototype,"_facingDirection",void 0),hA=(0,Q.Cg)([(0,X.EVk)("TeleportPlayerToThis",et.Y.motion)],hA);var cA=z(48129),dA=z(39473),lA=z(35564);class uA{constructor(q,K,z){this._spawnedPlayers=0,this._players=new Map,this.onPlayerSpawned=new X.HN0,this._prefabLoader=q,this._spawnContainer=K,this._remotePlayerSpawnLimiter=z}destroy(){this.onPlayerSpawned.dispose(),this._destroyed=!0}addPlayer(q,K,z){const Y=dt.q.instance.prodigy.gameContainer.get("11f-118a"),Q=yt.map(dt.q.instance.prodigy.friendsListNetworkHandler.friendsList.concat(dt.q.instance.prodigy.friendsListNetworkHandler.classList),"userID");if(!Y.meetsRequirementsDeprecated(9)&&-1===yt.indexOf(Q,q.userID))return void X.VyI.log(`Only classmates and friends are added below level 5. Player will not be added. ${q.userID}`,X.$bb.Verbose);let Z;if(X.VyI.log(`Adding player ${q.userID} to the map`,X.$bb.Verbose),z)Z={x:z.x,y:z.y};else{const K=this._players.get(q.userID);K&&!this.isRemotePlayer(K)&&(Z={x:K.x,y:K.y})}const J={player:q,appearance:K,appearanceUpdated:!0,shouldBeSpawned:!1,pendingOperations:new X.aSj,position:Z};this._players.set(q.userID,J),this.prioritizePlayers()}hasPlayer(q){return this.isRemotePlayer(this._players.get(q))}getSpawnedPlayerGameObject(q){const K=this._players.get(q);if(!this.isRemotePlayer(K))return null;const z=K.gameObject;return(null==z?void 0:z.active)&&K.shouldBeSpawned?z:null}removePlayer(q){const K=this._players.get(q);this._players.delete(q),this.isRemotePlayer(K)&&(this.despawnPlayer(K,!0),this.prioritizePlayers())}updatePlayer(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z;const Y=this._players.get(q.userID);if(!this.isRemotePlayer(Y))return void X.VyI.log(`Attempted to update player ${q.userID} appearance, but that player isn't spawned`,X.$bb.Warning);const Q=yield Y.pendingOperations.push();if(!this._destroyed){const Q=Y.appearance.follow!==K.follow;Y.player.init(q),Y.appearance=K,Y.appearanceUpdated=!0,Y.gameObject&&(Q&&(null===(z=Y.gameObject.findComponentInChildren(nr))||void 0===z||z.reloadFollows()),yield Promise.all([Y.gameObject.findComponentInChildren(dy.b).setAppearance(K),Y.gameObject.findComponentInChildren(Oy).updateNameplate()]),Y.gameObject.findComponentInChildren(vy.T).updateMountAppearance())}Q()}))}movePlayer(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y=this._players.get(q);if(!this.isRemotePlayer(Y))return void this._players.set(q,{x:K,y:z});const Q=yield Y.pendingOperations.push();this._destroyed||(Y.position?(Y.position.x=K,Y.position.y=z,Y.gameObject&&this._pathfinder.findPathAsync(Y.gameObject.transform.worldPosition,Y.position).then((q=>{var K,z;q&&(null===(z=null===(K=Y.gameObject)||void 0===K?void 0:K.findComponentInChildren(X.KhP))||void 0===z||z.setPath(q))}))):(Y.position={x:K,y:z},this.prioritizePlayers())),Q()}))}prioritizePlayers(){var q,K,z,Y,Q;const Z=dt.q.instance.prodigy.friendsListNetworkHandler,J=yt.map(Z.friendsList.concat(Z.classList),"userID"),tt=[],et=null===(q=X.i7d.main)||void 0===q?void 0:q.GameObject.transform.worldPosition;let it=0;for(const[X,at]of Array.from(this._players.entries()))if(this.isRemotePlayer(at)){if(J.includes(X))this.spawnPlayer(at);else if(at.position){const q=et?Math.abs(at.position.x-et.x)+Math.abs(at.position.y-et.y):0,X=null!==(z=null===(K=at.gameObject)||void 0===K?void 0:K.active)&&void 0!==z?z:at.shouldBeSpawned,Z=null===(Q=null===(Y=at.cullingComponent)||void 0===Y?void 0:Y.isShowing)||void 0===Q||Q,J=X?Z?0:700:800;tt.push([at,q+J])}this.willPlayerBeVisible(at)&&++it}let st=this._players.size-tt.length;const nt=this._remotePlayerSpawnLimiter.evaluateLimit(this._spawnedPlayers,it);tt.sort(((q,K)=>q[1]-K[1]));for(const[at,rt]of tt)if(st{this._onPlayerSpawned.dispatch(q)}),this),this.socketService.onConnect.add(this.forceBroadcastPlayerPosition,this);const q=dt.q.instance.game.broadcaster;q.addAppListener(Xn.J8.PlayerEditingMenuClosed,this.broadcastAppearanceChanged.bind(this),this),q.addAppListener(Xn.J8.PlayerAppearanceUpdated,this.broadcastAppearanceChanged.bind(this),this),q.addAppListener(Xn.J8.MorphMarbleUsed,this.broadcastMorphStart.bind(this),this),q.addAppListener(Xn.J8.MorphMarbleCancelled,this.broadcastMorphEnd.bind(this),this),q.addAppListener(Xn.pm.StopPlayer,this.broadcastStopPlayer,this),dt.q.instance.prodigy.open.chatOpened.add(this.onChatOpened,this);const K=dt.q.instance.prodigy.gameContainer.get("247-28af");K.onFire.add(this.fxFired,this),K.onComplete.add(this.fxEnded,this),this._gameNetworkManager.startInactiveTimer()}startSpawnLimiter(){this._remotePlayerSpawnLimiter.enteredZone(),this._reprioritizeIntervalId=window.setInterval((()=>{this._remotePlayerManager.prioritizePlayers()}),fA.REPRIORITIZE_INTERVAL_MS)}destroy(){window.clearInterval(this._reprioritizeIntervalId),this._gameNetworkManager.stopInactiveTimer(),this.socketService.onConnect.remove(this.forceBroadcastPlayerPosition,this),this._onPlayerSpawned.dispose();const q=dt.q.instance.game.broadcaster;q.removeAppListener(Xn.J8.PlayerEditingMenuClosed,this),q.removeAppListener(Xn.J8.PlayerAppearanceUpdated,this),q.removeAppListener(Xn.J8.MorphMarbleUsed,this),q.removeAppListener(Xn.J8.MorphMarbleCancelled,this),q.removeAppListener(Xn.pm.StopPlayer,this),dt.q.instance.prodigy.open.chatOpened.remove(this.onChatOpened,this),dt.q.instance.prodigy.open.chatMenu&&(dt.q.instance.prodigy.open.chatMenu.chatIDSelected.remove(this.handleChatSelected,this),dt.q.instance.prodigy.open.chatMenu.emoteIDSelected.remove(this.handleEmoteSelected,this),dt.q.instance.prodigy.open.chatMenu.danceIDSelected.remove(this.handleDanceSelected,this));const K=dt.q.instance.prodigy.gameContainer.get("247-28af");K.onFire.remove(this.fxFired,this),K.onComplete.remove(this.fxEnded,this),this._remotePlayerManager.destroy(),super.destroy()}update(){if(super.update(),this._nextPosition&&Date.now()-this._lastPositionBroadcast>fA.POSITION_BROADCAST_INTERVAL){const q={action:lA.x.Move,data:{target:{x:this._nextPosition.x,y:this._nextPosition.y}}};this.socketService.broadcastMessage(q),this._lastPosition=this._nextPosition,this._nextPosition=void 0,this._lastPositionBroadcast=Date.now()}}receivedMessage(q){var K;null===(K=fA.MESSAGE_HANDLER_FUNCTIONS[q.action])||void 0===K||K.call(this,"data"in q?q.data:void 0)}playerJoined(q){this.forceBroadcastPlayerPosition()}playerLeft(q){this._remotePlayerManager.removePlayer(q)}handlePlayerInfo(q){var K;if(!q.appearance)return;null!==(K=q.equipment)&&void 0!==K||(q.equipment={});const z={skin:q.appearance.skinColor,face:q.appearance.face,eyeColor:q.appearance.eyeColor,hair:q.appearance.hair,outfit:q.equipment.outfit,hat:q.equipment.hat,weapon:q.equipment.weapon,boot:q.equipment.boots,follow:q.equipment.follow,costume:(0,Kt.G)(Dm.q).enabled?q.equipment.costume:void 0};if(this._remotePlayerManager.hasPlayer(q.userID))this._remotePlayerManager.updatePlayer(q,z);else{const K=new Uh.a(dt.q.instance.game);K.init(q),this._remotePlayerManager.addPlayer(K,z)}}handlePlayerMoved(q){q.userID!==this._mainPlayer.getUserID()&&this._remotePlayerManager.movePlayer(q.userID,q.target.x,q.target.y)}handleChatReceived(q){const K=this._remotePlayerManager.getSpawnedPlayerGameObject(q.userID);K&&(X.Aq$.isDefined(q.emoteID)?K.findComponentInChildren(_y).showEmote(q.emoteID):X.Aq$.isDefined(q.chatID)?K.findComponentInChildren(wy).setChat(this._theChatManager.getPhrase(q.chatID)):X.Aq$.isDefined(q.danceID)&&K.findComponentInChildren(Ty).startDance(q.danceID))}forceBroadcastPlayerPosition(){this._lastPositionBroadcast=0,this._lastPosition=void 0,this.broadcastPlayerPosition()}broadcastPlayerPosition(q){var K,z;void 0===q&&(q=null===(z=null===(K=this._mainPlayerGameObject)||void 0===K?void 0:K.transform)||void 0===z?void 0:z.worldPosition),q&&(this.socketService.isDisconnected||(this._nextPosition||!this._lastPosition||Math.abs(q.x-this._lastPosition.x)+Math.abs(q.y-this._lastPosition.y)>fA.POSITION_BROADCAST_OFFSET_THRESHOLD)&&(this._nextPosition=q))}broadcastAppearanceChanged(){this.socketService.isDisconnected||this.socketService.broadcastMessage({action:lA.x.Change})}broadcastMorphStart(q){var K,z;if(this.socketService.isDisconnected)return;const Y={action:lA.x.Transform,data:{showEffect:!0,transformID:null===(K=q.effect)||void 0===K?void 0:K.ID,transformType:null===(z=q.effect)||void 0===z?void 0:z.transform}};this.socketService.broadcastMessage(Y)}broadcastMorphEnd(){if(this.socketService.isDisconnected)return;const q={action:lA.x.Transform,data:{showEffect:!0}};this.socketService.broadcastMessage(q)}broadcastStopPlayer(){this.socketService.isDisconnected||this.forceBroadcastPlayerPosition()}handlePlayerChanged(q){var K;if(!this._remotePlayerManager.hasPlayer(q.userID))return;null!==(K=q.equipment)&&void 0!==K||(q.equipment={});const z={skin:q.appearance.skinColor,face:q.appearance.face,eyeColor:q.appearance.eyeColor,hair:q.appearance.hair,outfit:q.equipment.outfit,hat:q.equipment.hat,weapon:q.equipment.weapon,follow:q.equipment.follow,boot:q.equipment.boots,costume:(0,Kt.G)(Dm.q).enabled?q.equipment.costume:void 0};this._remotePlayerManager.updatePlayer(q,z)}handlePlayerTransform(q){const K=this._remotePlayerManager.getSpawnedPlayerGameObject(q.userID),z=null==K?void 0:K.findComponentInChildren(py.R);z&&(q.transformType&&q.transformID?z.transformPlayerWithEffect(q.transformType,q.transformID):z.isMorphed()&&z.clearMorphedAppearance())}onChatOpened(){dt.q.instance.prodigy.open.chatMenu.chatIDSelected.add(this.handleChatSelected,this),dt.q.instance.prodigy.open.chatMenu.emoteIDSelected.add(this.handleEmoteSelected,this),dt.q.instance.prodigy.open.chatMenu.danceIDSelected.add(this.handleDanceSelected,this)}handleChatSelected(q){this._mainPlayerGameObject.findComponentInChildren(wy).setChat(this._theChatManager.getPhrase(q)),this._mainPlayer.player.chatID=null}handleEmoteSelected(q){var K,z,Y;this._mainPlayerGameObject.findComponentInChildren(_y).showEmote(q),this._mainPlayer.player.emoteID=null;const Q=null!==(Y=null===(z=null===(K=ae.t.getItem("emote",q))||void 0===K?void 0:K.data)||void 0===z?void 0:z.name)&&void 0!==Y?Y:q.toString();dt.q.instance.prodigy.gameContainer.get("20f-5f67").playerIdentityAvatar.sendEmoteUsedEvent({emote_name:Q,emote_type:my.H.Emote})}handleDanceSelected(q){this._mainPlayerGameObject.findComponentInChildren(Ty).startDance(q),this._mainPlayer.player.danceID=null,dt.q.instance.prodigy.gameContainer.get("20f-5f67").playerIdentityAvatar.sendEmoteUsedEvent({emote_name:q,emote_type:my.H.Dance})}handleFxReceived(q){const K=this._remotePlayerManager.getSpawnedPlayerGameObject(q.userID);K&&dt.q.instance.prodigy.effects.playFX(q.type,K.transform.worldPosition.x,K.transform.worldPosition.y,q.x,q.y,void 0,this._fxContainer)}fxFired(){var q;dt.q.instance.prodigy.game.input.enabled=!1,null===(q=this._mainPlayerGameObject.findComponentInChildren(X.KhP))||void 0===q||q.stop(),this.broadcastStopPlayer()}fxEnded(){dt.q.instance.prodigy.game.input.enabled=!0}};pA.POSITION_BROADCAST_INTERVAL=1e3,pA.POSITION_BROADCAST_OFFSET_THRESHOLD=75,pA.REPRIORITIZE_INTERVAL_MS=1e3,pA.MESSAGE_HANDLER_FUNCTIONS={[lA.x.Info]:fA.prototype.handlePlayerInfo,[lA.x.Move]:fA.prototype.handlePlayerMoved,[lA.x.Chat]:fA.prototype.handleChatReceived,[lA.x.FX]:fA.prototype.handleFxReceived,[lA.x.Change]:fA.prototype.handlePlayerChanged,[lA.x.Transform]:fA.prototype.handlePlayerTransform},(0,Q.Cg)([(0,Qi.b)("774-4659"),(0,Q.Sn)("design:type",Cp.I)],pA.prototype,"_gameNetworkManager",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],pA.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.Cdj)("cd7-a413"),(0,Q.Sn)("design:type",bA.Z)],pA.prototype,"_remotePlayerSpawnLimiter",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],pA.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],pA.prototype,"_mainPlayerGameObject",void 0),(0,Q.Cg)([(0,X.Cdj)("aae-4f6a"),(0,Q.Sn)("design:type",dA.S)],pA.prototype,"_theChatManager",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pA.prototype,"_spawnContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pA.prototype,"_fxContainer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],pA.prototype,"_onPlayerSpawned",void 0),pA=fA=(0,Q.Cg)([(0,X.EVk)("MapMultiplayerController",et.Y.multiplayer)],pA);let vA=class extends Ve{getSpawnData(){var q;const K=this._streamedMap.mapData.entry,z=null!==(q=null==K?void 0:K[this._entryPointID])&&void 0!==q?q:null==K?void 0:K.default;return z?{location:{x:z.x,y:z.y},facingDirection:z.facingLeft?$e.y.Left:$e.y.Right}:null}};(0,Q.Cg)([(0,X.Cdj)("StreamedMap"),(0,Q.Sn)("design:type",X.Ee5)],vA.prototype,"_streamedMap",void 0),(0,Q.Cg)([(0,X.Cdj)("InitData-spawnLocationName"),(0,Q.Sn)("design:type",String)],vA.prototype,"_entryPointID",void 0),vA=(0,Q.Cg)([(0,X.EVk)("EntryPointSpawnDataProvider",et.Y.mapSpawning)],vA);let gA=class extends Ve{getSpawnData(){var q;return this._injectedSpawnPosition?{location:{x:this._injectedSpawnPosition.x,y:this._injectedSpawnPosition.y},facingDirection:null!==(q=this._injectedSpawnDirection)&&void 0!==q?q:$e.y.Right}:null}};(0,Q.Cg)([(0,X.Cdj)("InitData-spawnPosition"),(0,Q.Sn)("design:type",X.I9Y)],gA.prototype,"_injectedSpawnPosition",void 0),(0,Q.Cg)([(0,X.Cdj)("InitData-spawnFacingDirection"),(0,Q.Sn)("design:type",Number)],gA.prototype,"_injectedSpawnDirection",void 0),gA=(0,Q.Cg)([(0,X.EVk)("InjectedPositionSpawnDataProvider",et.Y.mapSpawning)],gA);let mA=class extends Ve{getSpawnData(){var q;return null===(q=this._saveDataComponent)||void 0===q?void 0:q.getData()}};(0,Q.Cg)([(0,X.g8Q)(X.Tyz),(0,Q.Sn)("design:type",X.Tyz)],mA.prototype,"_saveDataComponent",void 0),mA=(0,Q.Cg)([(0,X.EVk)("MapSaveSpawnDataProvider",et.Y.mapSpawning)],mA);let yA=class extends Ve{getSpawnData(){const q=this.GameObject.transform,K=q.worldPosition;return{location:{x:K.x,y:K.y},facingDirection:q.localScale.x<0?$e.y.Left:$e.y.Right}}};yA=(0,Q.Cg)([(0,X.EVk)("TransformSpawnDataProvider",et.Y.mapSpawning)],yA);let _A=class extends X.uAl{constructor(){super(...arguments),this._spawnProviders=[],this._onPlayerSpawned=new X.HN0}spawnPlayer(){let q;if(this._spawnProviders.find((K=>q=K.getSpawnData())),q){const K=q.location.x,z=q.location.y;X.i7d.main.GameObject.transform.setPosition(K,z),this._player.transform.setPosition(K,z),this.GameObject.parent.findComponentInChildren(ea.m).setFacingDirection(q.facingDirection);this._player.findComponentInChildren(X.mZY)._loadedBounds={left:K,right:K,top:z,bottom:z}}this._onPlayerSpawned.dispatch()}destroy(){this._onPlayerSpawned.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],_A.prototype,"_player",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(Ve),(0,Q.Sn)("design:type",Array)],_A.prototype,"_spawnProviders",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],_A.prototype,"_onPlayerSpawned",void 0),_A=(0,Q.Cg)([(0,X.EVk)("PlayerSpawner",et.Y.mapSpawning)],_A);let EA=class extends X.uAl{constructor(){super(...arguments),this._loadingData={}}set position(q){this._position=q}set battleResult(q){this._loadingData.battleResult=q}set target(q){this.targetMapTag=q}set entrance(q){this.entranceName=q}run(){var q,K;dt.q.instance.prodigy.world.it(this.targetMapTag,null===(q=this._position)||void 0===q?void 0:q.x,null===(K=this._position)||void 0===K?void 0:K.y,Object.assign({spawnLocationName:this.entranceName},this._loadingData),{mapEnteredTransitionType:this._transitionTypeOverride})}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],EA.prototype,"targetMapTag",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],EA.prototype,"entranceName",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],EA.prototype,"_position",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],EA.prototype,"_transitionTypeOverride",void 0),EA=(0,Q.Cg)([(0,X.EVk)("TeleportToMap",et.Y.MapTeleport)],EA);let wA=class extends mi.s{postCreate(){super.postCreate();const q=dt.q.instance.game.state.get(Nt.G.TileScreen);q&&(this._playerContainer=q.user)}containsTarget(){var q,K;if(!(null===(K=null===(q=this._playerContainer)||void 0===q?void 0:q.transform)||void 0===K?void 0:K.worldTransform))return super.containsTarget();const z=this.GameObject.transform.worldPosition,Y=this._playerContainer.transform.worldTransform,Q=new X.I9Y(Y.tx,Y.ty),Z=X.C1c.getDistanceSq(z,Q);return 0!==Z&&Z<=this.radius*this.radius}update(){if(super.update(),this._playerContainer){const q=this.containsTarget();this._isTargetInBounds?q||this.onExit.dispatch():q&&this.onEnter.dispatch(),this._isTargetInBounds=q}}};wA=(0,Q.Cg)([(0,X.EVk)("CircleTriggerLegacyMap",et.Y.trigger)],wA);let TA=class extends Qa.E{create(){super.create(),this.gameObject.transform instanceof X.XVE&&(this._width=this.gameObject.transform.fullWidth,this._height=this.gameObject.transform.fullHeight)}containsTarget(){const q=this.target.transform.worldPosition,K=this.gameObject.transform.worldPosition;return this.gameObject.transform instanceof X.XVE&&(K.x-=this.gameObject.transform.pivot.x*this._width,K.y-=this.gameObject.transform.pivot.y*this._height),X.M_G.containsRaw(K.x,K.y,this._width,this._height,q.x,q.y)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],TA.prototype,"_width",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],TA.prototype,"_height",void 0),TA=(0,Q.Cg)([(0,X.EVk)("RectTrigger",et.Y.trigger)],TA);let SA=class extends X.uAl{constructor(){super(...arguments),this._onMapsCombined=new X.HN0,this._mapCombiner=null,this._combinedPromise=new X.bnh}create(){super.create(),X.wa5.getActiveScene().container.bind("AwaitMapCombiner").toConstantValue(this),this._streamedMap.onMapLoaded.addOnce(this.mapWasLoaded,this)}destroy(){this._streamedMap.onMapLoaded.remove(this.mapWasLoaded,this),this._mapCombiner&&(this._mapCombiner.onMapsCombined.remove(this.mapsCombined,this),this._mapCombiner=null),this._onMapsCombined.dispose(),super.destroy()}mapWasLoaded(){this._streamedMap.map.onLoadedBlocksChanged.addOnce(this.blocksLoaded,this)}blocksLoaded(){var q,K;this._mapCombiner=this._streamedMap.GameObject.findComponentInChildren(X.Phd),null===(K=null===(q=this._mapCombiner)||void 0===q?void 0:q.hasCombinedMaps())||void 0===K||K?this.mapsCombined():this._mapCombiner.onMapsCombined.addOnce(this.mapsCombined,this)}mapsCombined(){this._onMapsCombined.dispatch(),this._combinedPromise.resolve()}awaitCombinedMaps(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this._combinedPromise}))}};(0,Q.Cg)([(0,X.MnK)(X.Ee5),(0,Q.Sn)("design:type",X.Ee5)],SA.prototype,"_streamedMap",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],SA.prototype,"_onMapsCombined",void 0),SA=(0,Q.Cg)([(0,X.EVk)("AwaitMapCombiner",et.Y.tiled)],SA);let AA=class extends X.eXg{constructor(){super(...arguments),this._onCombined=new X.HN0}create(){super.create(),(()=>{(0,Q.sH)(this,void 0,void 0,(function*(){var q;this._streamedMap&&(yield null===(q=this._streamedMap)||void 0===q?void 0:q.awaitLoaded()),this._mapCombiner&&(yield this._mapCombiner.awaitCombinedMaps()),this._onCombined.dispatch()}))})()}destroy(){this._onCombined.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("StreamedMap"),(0,Q.Sn)("design:type",X.Ee5)],AA.prototype,"_streamedMap",void 0),(0,Q.Cg)([(0,X.Cdj)("AwaitMapCombiner"),(0,Q.Sn)("design:type",SA)],AA.prototype,"_mapCombiner",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],AA.prototype,"_onCombined",void 0),AA=(0,Q.Cg)([(0,X.EVk)("AwaitMapLoad",et.Y.map)],AA);let CA=class extends X.AY_{constructor(){super(...arguments),this._initialActiveConditions=[]}create(){super.create();for(const q of this._initialActiveConditions)this._dungeonState.setConditionActive(q,!0)}getActiveConditions(){return this._dungeonState.getActiveConditions()}setConditionActive(q,K){this._dungeonState.setConditionActive(q,K)}};(0,Q.Cg)([(0,X.Cdj)("DungeonState"),(0,Q.Sn)("design:type",ke.I)],CA.prototype,"_dungeonState",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],CA.prototype,"_initialActiveConditions",void 0),CA=(0,Q.Cg)([(0,X.EVk)("DungeonConditionEvaluator",et.Y.adventure)],CA);let OA=class extends X.uAl{constructor(){super(...arguments),this._id="default",this._facingLeft=!1}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],OA.prototype,"_id",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],OA.prototype,"_facingLeft",void 0),OA=(0,Q.Cg)([(0,X.EVk)("MapEntryPoint",et.Y.map)],OA);let IA=class extends X.eXg{constructor(){super(...arguments),this._checkOnLoad=!0,this._onEnteredViaPoint=new X.HN0,this._notEnteredViaPoint=new X.HN0}create(){if(super.create(),this._checkOnLoad){const q=X.wa5.getActiveScene().container,K=`${this._id}_triggered`;q.hasBinding(K)||(q.bind(K).toConstantValue(!0),(()=>{(0,Q.sH)(this,void 0,void 0,(function*(){this._streamedMap&&(yield this._streamedMap.awaitLoaded()),this._mapCombiner&&(yield this._mapCombiner.awaitCombinedMaps()),this.checkEntryPoint()}))})())}}destroy(){this._onEnteredViaPoint.dispose(),this._notEnteredViaPoint.dispose(),super.destroy()}checkEntryPoint(){this.getEntryPointName(this._playerEntryPoint)===this.getEntryPointName(this._matchEntryPointName)?this._onEnteredViaPoint.dispatch():this._notEnteredViaPoint.dispatch()}getEntryPointName(q){return q||"default"}};(0,Q.Cg)([(0,X.Cdj)("InitData-spawnLocationName"),(0,Q.Sn)("design:type",String)],IA.prototype,"_playerEntryPoint",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],IA.prototype,"_checkOnLoad",void 0),(0,Q.Cg)([(0,X.Cdj)("StreamedMap"),(0,Q.Sn)("design:type",X.Ee5)],IA.prototype,"_streamedMap",void 0),(0,Q.Cg)([(0,X.Cdj)("AwaitMapCombiner"),(0,Q.Sn)("design:type",SA)],IA.prototype,"_mapCombiner",void 0),(0,Q.Cg)([(0,X.MnK)(OA),(0,X.nKb)("entryPoint"),(0,X.Wf4)(),(0,Q.Sn)("design:type",OA)],IA.prototype,"_matchEntryPoint",void 0),(0,Q.Cg)([(0,X.DTs)(),(0,X.W_S)(),(0,Q.Sn)("design:type",String)],IA.prototype,"_matchEntryPointName",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],IA.prototype,"_onEnteredViaPoint",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],IA.prototype,"_notEnteredViaPoint",void 0),IA=(0,Q.Cg)([(0,X.EVk)("EntryPointTrigger",et.Y.map)],IA);let DA=class extends X.uAl{constructor(){super(),this._layerList=[],this._activeScene=null,this._activeScene=X.wa5.getActiveScene()}create(){super.create();const q=this._layerList.length;for(let K=0;K{this.onGracePeriodDaysLeftSet.dispatch(q),this.handleGracePeriodRequiredChange()}),this),this._parentalConsentService.onGracePeriodMsLeftSet.add((q=>{this.onGracePeriodMsLeftSet.dispatch(q),this.handleGracePeriodRequiredChange()}),this),this._checkStatusOnCreate&&(this.handleConsentStatusChange(this._parentalConsentService.consentStatus,!1),this.onGracePeriodDaysLeftSet.dispatch(this._parentalConsentService.gracePeriodDaysLeft),this.onGracePeriodMsLeftSet.dispatch(this._parentalConsentService.gracePeriodMsLeft))}destroy(){this._parentalConsentService.onConsentStatusChange.removeAll(this),this._parentalConsentService.onGracePeriodDaysLeftSet.removeAll(this),this._parentalConsentService.onGracePeriodMsLeftSet.removeAll(this),this.clearApprovalAutoDismissTimeout(),this.onConsentStatusChange.dispose(),this.onHumanReadableConsentStatusChange.dispose(),this.onGracePeriodDaysLeftSet.dispose(),this.onGracePeriodMsLeftSet.dispose(),this.onGracePeriodRequiredSet.dispose(),this.onConsentRequired.dispose(),this.onNoConsentRequired.dispose(),this.onConsentStatusMessageAvailable.dispose(),this.onBannerDismissed.dispose(),this.onConsentRequested.dispose(),this.onConsentNotRequested.dispose(),this.onConsentGranted.dispose(),this.onConsentRequestSuccess.dispose(),this.onConsentRequestError.dispose(),this.onConsentRequestFirstSuccess.dispose(),super.destroy()}dismissApprovalMessage(){this.clearApprovalAutoDismissTimeout(),this.onBannerDismissed.dispatch()}clearApprovalAutoDismissTimeout(){X.Aq$.isDefined(xA._approvalAutoDismissTimeout)&&(window.clearTimeout(xA._approvalAutoDismissTimeout),xA._approvalAutoDismissTimeout=null)}handleConsentStatusChange(q,K=!0){const z=LA.b.statusRequiresConsent(q);switch(q!==LA.P.Approved||X.Aq$.isDefined(xA._approvalAutoDismissTimeout)||(xA._approvalAutoDismissTimeout=window.setTimeout((()=>this.dismissApprovalMessage()),xA.APPROVAL_AUTO_DISMISS_TIME_MS)),this.onConsentStatusChange.dispatch(q),this.onHumanReadableConsentStatusChange.dispatch(LA.b.getConsentStatusMessage(q)),q){case LA.P.NotRequested:this.onConsentNotRequested.dispatch();break;case LA.P.Requested:this.onConsentRequested.dispatch();break;case LA.P.Approved:this.onConsentGranted.dispatch()}z?this.onConsentRequired.dispatch():this.onNoConsentRequired.dispatch();const Y=z||K&&q===LA.P.Approved&&X.Aq$.isDefined(xA._approvalAutoDismissTimeout);this.onConsentStatusMessageAvailable.dispatch(Y),this.handleGracePeriodRequiredChange()}handleGracePeriodRequiredChange(){this.onGracePeriodRequiredSet.dispatch(LA.b.statusRequiresConsent(this._parentalConsentService.consentStatus)&&this._parentalConsentService.gracePeriodMsLeft>0)}sendConsentRequest(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=this._parentalConsentService.consentStatus===LA.P.NotRequested;yield this._parentalConsentService.sendConsentRequest(q).then((()=>{K&&this.onConsentRequestFirstSuccess.dispatch(),this.onConsentRequestSuccess.dispatch()})).catch((q=>{this.onConsentRequestError.dispatch(X.RQr.getMessage(q))}))}))}};kA.APPROVAL_AUTO_DISMISS_TIME_MS=6e4,(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onConsentStatusChange",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onHumanReadableConsentStatusChange",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onGracePeriodDaysLeftSet",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onGracePeriodMsLeftSet",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onGracePeriodRequiredSet",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onConsentRequired",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onNoConsentRequired",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onConsentStatusMessageAvailable",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onBannerDismissed",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onConsentRequested",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onConsentNotRequested",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onConsentGranted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onConsentRequestError",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onConsentRequestSuccess",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kA.prototype,"onConsentRequestFirstSuccess",void 0),(0,Q.Cg)([(0,X.Cdj)("29b-61c6"),(0,Q.Sn)("design:type",LA.b)],kA.prototype,"_parentalConsentService",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],kA.prototype,"_checkStatusOnCreate",void 0),kA=xA=(0,Q.Cg)([(0,X.EVk)("ParentalConsentService",et.Y.web)],kA);z(20597);var BA,UA=z(57975),FA=z.n(UA),GA=z(62889),jA=z(8900);let $A=BA=class extends X.wvl{constructor(){super(...arguments),this.fileExtension="gear"}initialize(q,K){super.initialize(q,K),this._path=this._editorAPI.getFilePath(this._fileGuid),this._gear=X.KDe.fromGearFile(JSON.parse(this._editorAPI.readFileSync(this._path).toString()))}generate(q,K){if(!this._path)return X.bl1.create({id:`failed-${this.fileExtension}-path-${this._fileGuid}`,iconType:X.ATc.Error,message:`Failed to get filepath for ${this._fileGuid} (likely a race condition with the editors internal file structure). Please re-select the file.`});const z=[GA.M.generateGearHelperNode(this._editorAPI,this.fileExtension),this.generateGearInfoNode(),this.generateHiddenSlotsNode(),this.generateSlotsToNotRecolorNode(),this.generateAttachmentArrayNode()];return X.XRp.createVertical(z)}generateGearInfoNode(){const q=this._path.substring(0,this._path.lastIndexOf(`/${this.fileExtension}/`)),K=FA().basename(this._path,`.${this.fileExtension}`),z=FA().join(q,"images",K),Y=[];return Y.push(X.ly.create({id:`${this.fileExtension}-type-${this._fileGuid}`,labelValue:`${this.fileExtension} is a ${FA().basename(q)} type`}),X.XRp.createHorizontal([X.ly.create({id:`${this.fileExtension}-image-path-${this._fileGuid}`,labelValue:`Image path: ${z.substring(z.indexOf("/assets/"))}`}),X.X9M.create({id:`open-${this.fileExtension}-image-folder-${this._fileGuid}`,buttonText:"",buttonIcon:X.a2l.Folder,nodeSize:"1of12",onClick:()=>{this._editorAPI.externalOpenFolder(z)}})])),X.XRp.createVertical(Y,{isCollapsible:!0,startCollapsed:!1,title:`Info: ${K}`})}generateHiddenSlotsNode(){const q=[X.Gme.dropdownGroup({id:`hidden-slot-quick-dropdown-${this._fileGuid}`,labelValue:"Hidden Slot Presets",selectValue:"selectAnOption",selectOptions:Object.keys(BA.hiddenAttachmentPresets),onChange:q=>{const K="string"==typeof q?q:Object.keys(BA.hiddenAttachmentPresets)[q];if("clear"===K)this._gear.hiddenSlots.length=0;else{const q=new Set(this._gear.hiddenSlots||[]);BA.hiddenAttachmentPresets[K].forEach((K=>q.add(K))),this._gear.hiddenSlots=Array.from(q)}const z=X.KDe.toGearFile(this._gear);dt.q.instance.game.cache.addJSON(this._fileGuid,z),this._editorAPI.writeToPath(this._path,z),this._editorAPI.redrawCustomInspector()}})];return q.push(X._Lw.line(),X.IqD.create({label:"Hidden Slots",id:`hidden-slots-${this._fileGuid}`,arrayType:X.bJb.Enum,enumeration:or.VE,value:this._gear.hiddenSlots,onChange:q=>{this._gear.hiddenSlots=q;const K=X.KDe.toGearFile(this._gear);dt.q.instance.game.cache.addJSON(this._fileGuid,K),this._editorAPI.writeToPath(this._path,K),this._editorAPI.redrawCustomInspector()}})),X.XRp.createVertical(q,{isCollapsible:!0,startCollapsed:!1,title:"Hidden Slots"})}generateSlotsToNotRecolorNode(){const q=[X.Gme.dropdownGroup({id:`do-not-recolor-slot-quick-dropdown-${this._fileGuid}`,labelValue:"Do Not Recolor Presets",selectValue:"selectAnOption",selectOptions:Object.keys(BA.doNotRecolorAttachmentPresets),onChange:q=>{const K="string"==typeof q?q:Object.keys(BA.doNotRecolorAttachmentPresets)[q];if("clear"===K)this._gear.slotsToNotRecolor.length=0;else{const q=new Set(this._gear.slotsToNotRecolor||[]);BA.doNotRecolorAttachmentPresets[K].forEach((K=>q.add(K))),this._gear.slotsToNotRecolor=Array.from(q)}const z=X.KDe.toGearFile(this._gear);dt.q.instance.game.cache.addJSON(this._fileGuid,z),this._editorAPI.writeToPath(this._path,z),this._editorAPI.redrawCustomInspector()}})];return q.push(X.IqD.create({label:"Do Not Recolor Slots",id:`do-not-recolor-slots-${this._fileGuid}`,arrayType:X.bJb.Enum,enumeration:or.VE,value:this._gear.slotsToNotRecolor||[],onChange:q=>{this._gear.slotsToNotRecolor=q;const K=X.KDe.toGearFile(this._gear);dt.q.instance.game.cache.addJSON(this._fileGuid,K),this._editorAPI.writeToPath(this._path,K),this._editorAPI.redrawCustomInspector()}})),X.XRp.createVertical(q,{isCollapsible:!0,startCollapsed:!1,title:"Do Not Recolor Slots"})}generateAttachmentArrayNode(){const q=X.IqD.create({label:"Attachments",id:`gear-array-${this._fileGuid}`,value:this._gear.attachments,arrayType:X.bJb.GenericObject,insertElementCallbacks:new Map([["default",()=>({name:"",imageGuid:""})]]),onChange:q=>{this._gear.attachments=q;const K=X.KDe.toGearFile(this._gear);dt.q.instance.game.cache.addJSON(this._fileGuid,K),this._editorAPI.writeToPath(this._path,K),this._editorAPI.redrawCustomInspector()},getElementInspector:this.generateElementNode.bind(this)});return X.XRp.createVertical([q],{isCollapsible:!0,startCollapsed:!1,title:"Attachment Editor"})}generateElementNode(q,K){const z=[X.ly.create({id:`attachment-label-${K}`,labelValue:`Attachment '${q.name}'`}),X.ly.create({id:`guid-label-${K}`,labelValue:`Guid '${q.imageGuid}'`})];return q.transform?z.push(this.generateTransformInspector(q,K)):z.push(X.ly.create({id:`missing-transform-${K}-${this._fileGuid}`,labelValue:`Default transform in use at ${K}`}),X.X9M.create({id:`add-missing-transform-${K}-${this._fileGuid}`,buttonText:"Add Transform",onClick:()=>{q.transform={x:0,y:0,scaleX:1,scaleY:1}}})),X.XRp.createVertical(z,{isCollapsible:!0,startCollapsed:!0,title:`${q.name} - ${q.transform?"custom":"default"} Transform`})}generateTransformInspector(q,K){const z=X.fqe.create({id:`transform-x-${K}-${this._fileGuid}`,inputValue:q.transform.x,inputType:"number",labelValue:"x",inputUpdateMode:X.JGO.Confirm,propertyPath:[`${K}`,"transform","x"]}),Y=X.fqe.create({id:`transform-y-${K}-${this._fileGuid}`,inputValue:q.transform.y,inputType:"number",labelValue:"y",inputUpdateMode:X.JGO.Confirm,propertyPath:[`${K}`,"transform","y"]}),Q=X.fqe.create({id:`transform-scalex-${K}-${this._fileGuid}`,inputValue:q.transform.scaleX,inputType:"number",labelValue:"scaleX",inputUpdateMode:X.JGO.Confirm,propertyPath:[`${K}`,"transform","scaleX"]}),Z=X.fqe.create({id:`transform-scaley-${K}-${this._fileGuid}`,inputValue:q.transform.scaleY,inputType:"number",labelValue:"scaleY",inputUpdateMode:X.JGO.Confirm,propertyPath:[`${K}`,"transform","scaleY"]});return X.XRp.createVertical([X.XRp.createHorizontal([z,Y]),X.XRp.createHorizontal([Q,Z])])}};$A.hiddenAttachmentPresets={selectAnOption:[],clear:[],hideFace:jA.M.instance.faceAttachments,hideBody:jA.M.instance.skinAttachments,hideAllHair:jA.M.instance.hairAttachments,hideBackAndShort:[or.VE.HairBun,or.VE.HairRPigtails,or.VE.HairLPigtails,or.VE.HairBack,or.VE.HairBehind,or.VE.HairBackLong,or.VE.HairShort],hideBackFull:[or.VE.HairBun,or.VE.HairRPigtails,or.VE.HairLPigtails,or.VE.HairBack,or.VE.HairBehind,or.VE.HairBackLong],hideBackExceptLong:[or.VE.HairBun,or.VE.HairRPigtails,or.VE.HairLPigtails,or.VE.HairBack,or.VE.HairBehind]},$A.doNotRecolorAttachmentPresets={selectAnOption:[],clear:[],face:jA.M.instance.faceAttachments,hair:jA.M.instance.hairAttachments,skin:jA.M.instance.skinAttachments,eyes:jA.M.instance.eyeAttachments},$A=BA=(0,Q.Cg)([(0,X.aw3)("gear")],$A);let HA=class extends $A{constructor(){super(...arguments),this.fileExtension="petgear"}};HA.hiddenAttachmentPresets={selectAnOption:[],clear:[]},HA=(0,Q.Cg)([(0,X.aw3)("petgear")],HA);let VA=class extends Yi.z{create(){super.create(),this._bindOnCreate&&this.bindContext()}bindContext(){var q;this._context.Container.rebind("PLAYER_GOLD_COINS").toConstantValue(this._dataProvider.player.getGold()),this._context.Container.rebind("CHARGED_LEVEL_CAP").toConstantValue(this._dataProvider.player.getChargedLevelCap()),this._context.Container.rebind("PLAYER_FIRST_NAME").toConstantValue(this._dataProvider.player.getFirstName()),this._context.Container.rebind("PLAYER_WIZARD_NAME").toConstantValue(null!==(q=this._dataProvider.player.getNameWithoutNickname().split(" ")[1])&&void 0!==q?q:""),this._context.Container.rebind("PLAYER_CHARGED_LEVEL_CUMULATIVE").toConstantValue(this._dataProvider.player.getChargedLevelCumulative())}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],VA.prototype,"_dataProvider",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],VA.prototype,"_bindOnCreate",void 0),VA=(0,Q.Cg)([(0,X.EVk)("ActivePlayerDataProvider",et.Y.player)],VA);z(32500);var WA=z(55950),qA=z(36164);let KA=class extends X.uAl{constructor(){super(...arguments),this.texts=[],this.types=[],this._indexes={},this._gearIndex=-1}nextAssetType(q){const K=qA.R[`${q}Map`];if(!K||0===K.length)return void X.VyI.log(`No map of type ${q} in GearMaps.ts`,X.$bb.Error);this._indexes[q]||(this._indexes[q]=0);let z=this._indexes[q];for(z++;!K[z];)z>=K.length?z=0:z++;this.setTypeIndex(q,z,K)}prevAssetType(q){const K=qA.R[`${q}Map`];if(!K)return void X.VyI.log(`No map of type ${q} in GearMaps.ts`,X.$bb.Error);this._indexes[q]||(this._indexes[q]=0);let z=this._indexes[q];for(z--;!K[z];)z<0?z=K.length-1:z--;this.setTypeIndex(q,z,K)}setTypeIndex(q,K,z){this._indexes[q]=K,-1===this._gearIndex&&(this._gearIndex=this._gear.gear.length),this._gear.gear[this._gearIndex]=z[K],this._gear.postCreate(),this._color.refresh(),this.updateTextUI(q,K)}updateTextUI(q,K){const z=this.types.indexOf(q);this.texts.forEach(((q,Y)=>{const Q=this.types[Y].substring(0,1).toUpperCase()+this.types[Y].substring(1);q.text=Y===z?`${Q}-${K}`:Q}))}};(0,Q.Cg)([(0,X.Pqz)(Ri.c),(0,Q.Sn)("design:type",Ri.c)],KA.prototype,"_gear",void 0),(0,Q.Cg)([(0,X.Pqz)(WA.y),(0,Q.Sn)("design:type",WA.y)],KA.prototype,"_color",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",Array)],KA.prototype,"texts",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],KA.prototype,"types",void 0),KA=(0,Q.Cg)([(0,X.EVk)("GearEditorHelper","Editor")],KA);z(131);let zA=class extends X.uAl{constructor(){super(...arguments),this.time=1e3,this._index=0,this._timer=1e3}postCreate(){super.postCreate(),this.manager=this.gameObject.findComponent(Ri.c)}update(){super.update(),this._timer<0&&(this._timer=this.time,this._index"character"===q.name))?Y.slots.find((q=>"character"===q.name))?null:"Spine file missing character slot":"Spine file missing character bone":"Spine file missing bones and slots"}validateParticle(){if(!this._mount)return"Failed to load mount file";const q=this._mount.particlesGuid;if(null==q)return null;const K=this._editorAPI.getFilePath(q);if(!K)return"Particle system file not found";let z=null;try{z=this._editorAPI.readFileSync(K).toString()}catch(e){X.RQr.logError(e,"Failed to read particle system file")}return z?z.includes("ParticleSystem")?null:"Particle system file missing ParticleSystem component":"Failed to load particle system file"}generateVectorInspector(q,K,z){const Y=null!=K?K:new X.I9Y(0,0),Q=X.ly.create({id:`offset-${q}-label-${this._fileGuid}`,labelValue:"Offset"}),Z=X.fqe.create({id:`offset-${q}-x-${this._fileGuid}`,inputValue:Y.x,inputType:"number",labelValue:"x",inputUpdateMode:X.JGO.Confirm,onChange:(q,K)=>z("x",K)}),J=X.fqe.create({id:`offset-${q}-y-${this._fileGuid}`,inputValue:Y.y,inputType:"number",labelValue:"y",inputUpdateMode:X.JGO.Confirm,onChange:(q,K)=>z("y",K)});return X.XRp.createVertical([Q,X.XRp.createHorizontal([Z,J])])}generateParticlesPickerInspector(){var q;const K=X.ly.create({id:`particle-label-${this._fileGuid}`,labelValue:"Particles"}),z=X.Hnb.create({id:`particles-${this._fileGuid}`,path:null!==(q=this._particleFilePath)&&void 0!==q?q:void 0,allowedExtensions:[".prefab"],onChange:q=>this.onParticleChange(q)});return X.XRp.createVertical([X._Lw.line(`particle-divider-${this._fileGuid}`),K,z])}onParticleOffsetChange(q,K){if(!this._mount)return void X.VyI.log("No mount to update",X.$bb.Error);let z;if("string"==typeof K)z=parseFloat(K);else{if("number"!=typeof K)return void X.VyI.log("Invalid value type for offset",X.$bb.Error);z=K}this._mount.particleOffset||(this._mount.particleOffset=new X.I9Y(0,0)),this._mount.particleOffset[q]=z,this.writeMountFile(),this._editorAPI.redrawCustomInspector()}onMountOffsetChange(q,K){if(!this._mount)return void X.VyI.log("No mount to update",X.$bb.Error);let z;if("string"==typeof K)z=parseFloat(K);else{if("number"!=typeof K)return void X.VyI.log("Invalid value type for offset",X.$bb.Error);z=K}this._mount.offset[q]=z,this.writeMountFile(),this._editorAPI.redrawCustomInspector()}onParticleChange(q){if(this._mount){try{if(q){const K=this._editorAPI.readFileSync(`${q}.meta`).toString(),z=JSON.parse(K).guid;this._mount.particlesGuid=z}else this._mount.particlesGuid=void 0;this.writeMountFile()}catch(e){X.RQr.logError(e,"Failed to parse particle meta file")}this._editorAPI.redrawCustomInspector()}else X.VyI.log("No mount to update",X.$bb.Error)}generateSpinePickerInspector(){return X.ICs.create({id:`spine-picker-${this._fileGuid}`,guid:this._mount.spineGuid,onChange:this.onSpineChange.bind(this)})}onSpineChange(q){this._mount?(this._mount.spineGuid=q,this.writeMountFile(),this._editorAPI.redrawCustomInspector()):X.VyI.log("No mount to update",X.$bb.Error)}writeMountFile(){this._mountFilePath?this._editorAPI.writeToPath(this._mountFilePath,QA.u.toMountFile(this._mount)):X.VyI.log("No path to write mount file to",X.$bb.Error)}generate(q,K){var z,Y;if(!this._mountFilePath)return X.bl1.create({id:`failed-mount-path-${this._fileGuid}`,iconType:X.ATc.Error,message:`Failed to get filepath for ${this._fileGuid} (likely a race condition with the editors internal file structure). Please re-select the file.`});this._errorMessage=null!==(Y=null!==(z=this.validateSpine())&&void 0!==z?z:this.validateParticle())&&void 0!==Y?Y:null;const Q=[];return this._errorMessage&&Q.push(X.bl1.create({id:`mount-error-${this._fileGuid}`,iconType:X.ATc.Error,message:this._errorMessage})),Q.push(this.generateVectorInspector("mount",this._mount.offset,this.onMountOffsetChange.bind(this))),Q.push(this.generateSpinePickerInspector()),Q.push(this.generateParticlesPickerInspector()),Q.push(this.generateVectorInspector("particle",this._mount.particleOffset,this.onParticleOffsetChange.bind(this))),X.XRp.createVertical(Q)}};XA=(0,Q.Cg)([(0,X.aw3)("mount")],XA);let ZA=class extends X.uAl{constructor(){super(...arguments),this._boundPreviewUpdate=null,this._updateTween=null,this._tweenState={t:0},this._isIdle=!0,this._mountParticles=null}create(){super.create(),X.VyI.log("The mount preview component is only intended for use inside of the editor.",X.$bb.Error),this._mountComponent.isMountReady?this.onMountReady():this._mountComponent.mountReady.addOnce(this.onMountReady,this)}editorUpdate(q){this._mountComponent.update(),q.update()}onMountReady(){this._mountParticles=null,this._mountComponent.removeParticleEffect(),this._mountComponent.hasInternalParticleEffect()&&this._mountComponent.addInternalParticleEffect().then((q=>{this._mountParticles=q})).catch(X.RQr.createHandler("Could not add internal particle effect in editor."));const q=this._mountComponent.playerObject.findComponent(vn.l);q?(this._boundPreviewUpdate||(this._boundPreviewUpdate=this.editorUpdate.bind(this,q)),this._updateTween||(this._updateTween=X.W$e.instance.game.add.tween(this._tweenState,this),this._updateTween.to({t:1},1e3,X.GS3.Linear.None,!0,0,-1,!0)),this._updateTween.onUpdate.removeAll(),this._updateTween.onUpdate.add(this._boundPreviewUpdate)):X.VyI.log("No player spine bone follower found for player",X.$bb.Error)}toggleWalkAnimation(){this._isIdle?this._mountComponent.playAnimation("walk"):this._mountComponent.playAnimation("idle"),this._isIdle=!this._isIdle}destroy(){var q,K;this._mountParticles=null,null===(q=this._mountComponent)||void 0===q||q.removeParticleEffect(),null===(K=this._updateTween)||void 0===K||K.destroy()}};(0,Q.Cg)([(0,X.Pqz)(YA.N),(0,Q.Sn)("design:type",YA.N)],ZA.prototype,"_mountComponent",void 0),ZA=(0,Q.Cg)([(0,X.EVk)("MountPreview",X.YH6.animation)],ZA);let JA=class extends X.uAl{constructor(){super(...arguments),this._allowNotOwned=!1,this._equipOnCreate=!1}create(){super.create(),this._equipOnCreate&&this.equipItem()}run(){this.equipItem()}equipItem(){if(!X.Aq$.isDefined(this._type))return void X.VyI.log("PlayerEquipItemComponent: item type required",X.$bb.Error);const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;(this._allowNotOwned||q.backpack.hasItem(this._type,this._id))&&q.equip(this._id,this._type).then((()=>{var q,K,z;return null===(z=null===(K=null===(q=this._playerDataProvider)||void 0===q?void 0:q.player)||void 0===K?void 0:K.playerContainer)||void 0===z?void 0:z.reload()})).catch(X.RQr.createHandler(`PlayerEquipItemComponent:equipItem Failed to equip item ${this._type}-${this._id}`))}unequipItem(){if(!X.Aq$.isDefined(this._type))return void X.VyI.log("PlayerEquipItemComponent: item type required",X.$bb.Error);const q=this._playerDataProvider.player;q.equipment[this._type]===this._id&&q.unEquip(this._id,this._type).then((()=>{var q,K,z;return null===(z=null===(K=null===(q=this._playerDataProvider)||void 0===q?void 0:q.player)||void 0===K?void 0:K.playerContainer)||void 0===z?void 0:z.reload()})).catch(X.RQr.createHandler(`PlayerEquipItemComponent:unequipItem Failed to unequip item ${this._type}-${this._id}`))}unequipCurrentOfType(){if(!X.Aq$.isDefined(this._type))return void X.VyI.log("PlayerEquipItemComponent: item type required",X.$bb.Error);const q=this._playerDataProvider.player;q.equipment[this._type]&&q.unEquip(q.equipment[this._type],this._type).then((()=>{var q,K,z;return null===(z=null===(K=null===(q=this._playerDataProvider)||void 0===q?void 0:q.player)||void 0===K?void 0:K.playerContainer)||void 0===z?void 0:z.reload()})).catch(X.RQr.createHandler(`PlayerEquipItemComponent:unequipCurrentOfType Failed to unequip current item of type ${this._type}`))}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],JA.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],JA.prototype,"_id",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],JA.prototype,"_type",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],JA.prototype,"_allowNotOwned",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],JA.prototype,"_equipOnCreate",void 0),JA=(0,Q.Cg)([(0,X.EVk)("PlayerEquipItem",et.Y.player)],JA);let tC=class extends X.uAl{constructor(){super(...arguments),this._equipOnCreate=!1}create(){super.create(),this._equipOnCreate&&this.equipPet()}run(){this.equipPet()}equipPet(){if(!X.Aq$.isDefined(this._petId))return void X.VyI.log("PlayerEquipPetComponent: pet ID required",X.$bb.Error);const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=q.kennel.getPetTeamIDs();if(K.includes(this._petId))uo.P8.showUniquePetsFeature()&&q.kennel.replaceDuplicateOnTeam(this._petId);else{const z=uo.P8.isPetEvolvedStarter(K[1])?1:2,Y=q.kennel.getAllPetsByID(this._petId),Q=uo.P8.showUniquePetsFeature()?uo.P8.getPrimaryPet(this._petId,Y):this.getHighestLevelPet(Y);if(!Q)return void X.VyI.log(`PlayerEquipPetComponent: pet with ID ${this._petId} not found in kennel; cannot equip`,X.$bb.Error);q.kennel.removeAtTeamPosition(z),q.kennel.setTeamPosition(Q,z)}}getHighestLevelPet(q){if(q&&0!==q.length)return q.sort(((q,K)=>K.level-q.level)),q[0]}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],tC.prototype,"_petId",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],tC.prototype,"_equipOnCreate",void 0),tC=(0,Q.Cg)([(0,X.EVk)("PlayerEquipPet",et.Y.player)],tC);z(47734);var eC=z(97252);let iC=class extends X.PQK{installBindings(){this.Container.bind("PLAYER_APPEARANCE_SCALING").toConstantValue(eC.M.UPSCALED_4x)}};iC=(0,Q.Cg)([(0,X.Og1)("PlayerUpscalingInstaller","Installer")],iC);z(77409);var sC=z(42430),nC=z(91016),aC=z(39571),rC=z(90351);class oC extends X.$KW{generate(q,K){this._dropdownOptions||(this._dropdownOptions=Array.from(sC.o.spellConstructors.keys()),this._dropdownOptions.unshift(oC.ADD_STEP));const z=this.displayWarnings();if(z)return z;const Y=[];Y.push(X.X9M.create({id:"begin-button",buttonText:"Begin",onClick:()=>{this._editorAPI.switchFocusToPlayMode(),this.getComponent().begin()}})),Y.push(X.X9M.create({id:"save-button",buttonText:"Save",onClick:()=>{const q=this.getSpell(),K=this._editorAPI.getFilePath(q.spellGUID);this._editorAPI.writeToPath(K,this.getJSONString(q))}})),Y.push(X.Gme.numberGroup({id:"multiHit",labelValue:"Multi-Hit",inputValue:q.multiHit})),Y.push(X.Gme.gameObjectPickerGroup({id:"caster",labelValue:"Spell Caster",gameObjectGuid:q.caster}));const Q=[];for(let Z=0;Z<3;Z++)Q.push(X.WVg.create({id:`target.${Z}`,gameObjectGuid:q.targets[Z],propertyPath:["targets",`${Z}`]}));return Y.push(X.XRp.createVertical(Q,{isCollapsible:!0,title:"Spell Targets"})),Y.push(X._Lw.line()),Y.push(this.createSpellEditor(this.getSpell().steps)),Y.push(X._Lw.line()),Y.push(X._6c.create({id:"add-end",selectValue:0,selectOptions:this._dropdownOptions,onChange:q=>{if(q===oC.ADD_STEP)return;this.getSpell().steps.push(sC.o.spellConstructors.get(q)()),this.updateCache()}})),X.XRp.createVertical(Y)}displayWarnings(){var q;const K=this.getComponent();return K?(null===(q=K.spell)||void 0===q?void 0:q.steps)?null:X.XRp.createVertical([X.bl1.create({id:"missing-spell-steps",message:"Either no SpellComponent found, SpellComponent.spellGUID is undefined, or the .spell file is not yet loaded",iconType:X.ATc.Warning}),X.X9M.create({id:"refresh-button",buttonText:"Refresh"})]):X.XRp.createVertical([X.bl1.create({id:"missing-component",message:"SpellTestComponent is missing, please interact with another ui element to force a redraw",iconType:X.ATc.Warning}),X.X9M.create({id:"refresh-button",buttonText:"Refresh"})])}getComponent(){return this._editorAPI.getComponent(this._componentGuid)}getSpell(){var q;return null===(q=this.getComponent())||void 0===q?void 0:q.spell}getJSONString(q){return JSON.stringify({steps:q.steps},((q,K)=>q.startsWith("__")?K:q.startsWith("_")?void 0:K),"\t")}updateCache(){const q=this.getSpell();dt.q.instance.game.cache.addJSON(q.spellGUID,JSON.parse(this.getJSONString(q))),this._editorAPI.modifyComponent(this._componentGuid,{})}createSpellEditor(q){const K=[];for(let z=0;z{const K=this.getSpell(),z=K.steps[q-1];K.steps[q-1]=K.steps[q],K.steps[q]=z,this.updateCache()}})),K.push(X.X9M.create({id:`move-down-${q}`,buttonText:"⬇️",buttonDisabled:q===this.getSpell().steps.length-1,onClick:()=>{const K=this.getSpell(),z=K.steps[q+1];K.steps[q+1]=K.steps[q],K.steps[q]=z,this.updateCache()}})),K.push(X._6c.create({id:`add-${q}`,selectValue:0,selectOptions:this._dropdownOptions,onChange:K=>{if(K===oC.ADD_STEP)return;this.getSpell().steps.splice(q,0,sC.o.spellConstructors.get(K)()),this.updateCache()}})),K.push(X.ly.create({id:`break-${q}`,labelValue:" "})),K.push(X.X9M.create({id:`delete-${q}`,buttonText:"❌",onClick:()=>{this.getSpell().steps.splice(q,1),this.updateCache()}})),X.XRp.createHorizontal(K)}getSpellStepInspector(q,K){const z=[this.getSpellStepHeader(K)];return q?(q._spellComponent=this.getSpell(),Object.keys(q).filter((q=>!q.startsWith("_"))).forEach((Y=>{const Q=(q,z)=>{this.getSpell().steps[K][Y]=z,this.updateCache()},Z={id:Y+Math.random(),labelValue:Y,inputUpdateMode:X.JGO.Confirm},J=q.getOverrideInspectorNode(Y,Z.id,Q);if(!0===J)if("target"===Y)z.push(X.Gme.enumGroup(Object.assign(Object.assign({},Z),{selectValue:q[Y],onChange:q=>{Q(0,q)}}),nC.Wo));else if("blend"===Y)z.push(X.Gme.enumGroup(Object.assign(Object.assign({},Z),{selectValue:q[Y],onChange:q=>{Q(0,q)}}),X.PzZ));else if("PlayAnimationStep"!==q.__type||"animation"!==Y&&"returnToLoop"!==Y)if(-1!==Y.indexOf("ffset"))z.push(X.XRp.createHorizontal([X.ly.create(Z),X.Gme.numberGroup(Object.assign(Object.assign({},Z),{id:`x-${Z.id}`,labelValue:"x",inputValue:q[Y].x,onChange:(z,Q)=>{q[Y].x=Q;this.getSpell().steps[K]=q,this.updateCache()}})),X.Gme.numberGroup(Object.assign(Object.assign({},Z),{id:`y-${Z.id}`,labelValue:"y",inputValue:q[Y].y,onChange:(z,Q)=>{q[Y].y=Q;this.getSpell().steps[K]=q,this.updateCache()}}))]));else if(-1!==Y.indexOf("Ease"))z.push(X.Gme.enumGroup(Object.assign(Object.assign({},Z),{selectValue:q[Y],onChange:q=>{Q(0,q)}}),rC.i));else if("layerOverride"===Y)z.push(X.Gme.enumGroup(Object.assign(Object.assign({},Z),{selectValue:q[Y],onChange:q=>{Q(0,q)}}),nC.Cr));else if("prefabID"===Y)z.push(X.T7t.create(Object.assign(Object.assign({},Z),{guid:q[Y],onChange:q=>{Q(0,q)}})));else if("spineID"===Y)z.push(X.ICs.create(Object.assign(Object.assign({},Z),{guid:q[Y],onChange:q=>{Q(0,q)}})));else switch(Z.inputValue=q[Y],Z.onChange=Q,typeof q[Y]){case"string":z.push(X.Gme.textGroup(Z));break;case"boolean":z.push(X.Gme.checkboxGroup(Z));break;case"number":z.push(X.Gme.numberGroup(Z));break;case"function":break;default:z.push(X.ly.create({id:Math.random().toString(),labelValue:`Unknown parameter ${Y} - ${typeof q[Y]}. Please update SpellTestInspector`}))}else z.push(X.Gme.dropdownGroup(Object.assign(Object.assign({},Z),{selectValue:q[Y],selectOptions:oC.ANIMATION_NAMES,onChange:q=>{Q(0,q)}})));else!1!==J&&z.push(J)})),X.XRp.createVertical(z,{isCollapsible:!0,title:q.__type})):X.XRp.createVertical(z)}}oC.ADD_STEP="add step",oC.ANIMATION_NAMES=["attack","idle","walk"];let hC=class extends X.uAl{constructor(){super(...arguments),this.multiHit=0,this.targets=[],this._playing=!1}begin(){this._playing||(this._playing=!0,this.GameObject.children.forEach((q=>{q===this.caster?this.updateLayerByName(q,aC.a.ActiveSideCast):q.name.charAt(0)===this.caster.name.charAt(0)?this.getLayerLevel(q.layer)({unitId:`target-${K}`,gameObject:q,statusEffectContainer:q}))),manager:this.spell,multiHit:this.multiHit}).then((()=>{this._playing=!1})).catch((q=>{this._playing=!1,console.error(q)})))}updateLayerByName(q,K){const z=`${K}${this.getLayerLevel(q.layer)}`;q.setLayer(z,!0)}getLayerLevel(q){const K=parseInt(q.charAt(q.length-1));return vr.o.isNumber(K)||console.log("ERROR: layer name requires a numerical suffix value"),K}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],hC.prototype,"multiHit",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],hC.prototype,"caster",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],hC.prototype,"targets",void 0),(0,Q.Cg)([(0,X.Pqz)(sC.o),(0,Q.Sn)("design:type",sC.o)],hC.prototype,"spell",void 0),(0,Q.Cg)([(0,X.GO0)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],hC.prototype,"begin",null),hC=(0,Q.Cg)([(0,X.WR4)(oC),(0,X.EVk)("SpellTest",X.YH6.animation)],hC);z(90076);let cC=class extends X.JTX{constructor(){super(...arguments),this._rewardItems=[],this._replacementItems=[]}create(){const q=this.getInjectedValue(ms.Co.WeightedRewards),K=this.getInjectedValue(ms.Co.FallbackRewards);q&&(this._rewardItems=q),K&&(this._replacementItems=Wt.l.guaranteeArray(K))}getItem(){return this._rewardItems.length>0?this.getWeightedItem(this._rewardItems):this.getWeightedItem(this._replacementItems)}getWeightedItem(q){return hi.selectByWeight(q,(q=>{var K;return null!==(K=q.R)&&void 0!==K?K:1}))}};(0,Q.Cg)([(0,X.SZi)(),(0,X.vCS)(),(0,Q.Sn)("design:type",Array)],cC.prototype,"_rewardItems",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Array)],cC.prototype,"_replacementItems",void 0),cC=(0,Q.Cg)([(0,X.EVk)("BossItems",et.Y.adventure)],cC);z(55237);var dC=z(96268);let lC=class extends X.JTX{constructor(){super(...arguments),this.itemCardScale=1}create(){super.create(),this._pool=new X.iyL(this.loadCard.bind(this),this.setCardData.bind(this))}getObject(){return this._pool.getObject()}reloadCards(){this._pool.aliveList.forEach((q=>{this.setCardData(q)}))}loadCard(){const q=this._prefabLoader.loadFromGUID(Gt.l.ItemCard);return this.setCardData(q),q.addComponent(dC.a),q}setCardData(q){q.transform.setScale(this.itemCardScale,this.itemCardScale);const K=q.findComponentInChildren(t_.Z),z=this.itemProvider.getItem();K&&(K.initializeOnPostCreate=!1,K.initializeItemCard({id:z.ID,type:z.type,L:z.L,N:z.N,cost:z.cost,data:z.data,receivedThroughGotItemFlow:!1}))}destroy(){this._pool.destroy(),super.destroy()}};(0,Q.Cg)([(0,X.MnK)(X.uAl),(0,Q.Sn)("design:type",Object)],lC.prototype,"itemProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],lC.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],lC.prototype,"itemCardScale",void 0),lC=(0,Q.Cg)([(0,X.EVk)("ItemCardPool",et.Y.adventureUi)],lC);var uC=z(23283),fC=z(71041),bC=z(34374);let pC=class extends X.JTX{constructor(){super(...arguments),this._respinTextKey="RESPIN_ROULETTE"}destroy(){var q,K;null===(K=null===(q=this._currencyDisplay)||void 0===q?void 0:q.onCurrencyUpdateComplete)||void 0===K||K.remove(this.handleCurrencyUpdateComplete,this),super.destroy()}run(){this._roulette.headerText.text=this._localizer.getText(this._respinTextKey),this.card.active=!1,this._roulette.reset(),this._roulette.isRespin=!0,this._roulette.GameObject.active=!0,this.respinButtonsContainer.active=!0,this.setupCurrencyRespin()}setupCurrencyRespin(){if(this._currencyId=this.getInjectedValue(ms.Co.CurrencyId),this._respinCost=this.getInjectedValue(ms.Co.RespinCost),!X.Aq$.isDefined(this._currencyId)||!X.Aq$.isDefined(this._respinCost))return void X.VyI.log("ResetBossRewardsComponent: Missing currency ID and/or respin cost for currency respin setup",X.$bb.Error);if(!(this._currencyRespinButton&&this._makePaymentComponent&&this._currencyDisplay&&this._currencyDisplayContainer&&this._notEnoughCurrencyTooltip&&this._notEnoughCurrencyText))return void X.VyI.log("ResetBossRewardsComponent: Missing required components for currency respin setup",X.$bb.Error);Ht.d.updateInjectedValues(this._currencyDisplayContainer,{CURRENCY_DISPLAY_ID:this._currencyId}),this._currencyRespinButton.currency=this._currencyId,this._currencyRespinButton.amount=this._respinCost,this._currencyRespinButton.regenerateButton(),this._makePaymentComponent.currencyId=this._currencyId,this._makePaymentComponent.amount=this._respinCost;const q={sink_type:Ei.C.PrizeWheel};this._roulette.instanceTypeForSegmentEvent!==Ti.N.RiftRun&&this._roulette.instanceTypeForSegmentEvent!==Ti.N.BossRift||(this._makePaymentComponent.customData=Object.assign({sink_id:this._segment.rifts.getRiftsRewardSpinUuid(),transaction_id:this._segment.rifts.getRiftsRewardSpinTransactionUuid(),instance_id:this._segment.rifts.riftInstanceUuid,instance_type:this._roulette.instanceTypeForSegmentEvent},q)),this._makePaymentComponent.onFailure.add((()=>{this.handleNotEnoughCurrency(),this.sendPrizeWheelSpinFailedEvent(hp.WE.NotEnoughCurrency)})),this._currencyDisplay.onCurrencyUpdateComplete.add(this.handleCurrencyUpdateComplete,this),this._currencyDisplayContainer.active=!0}handleNotEnoughCurrency(){const q=this._currentPlayer.player.getMemberTier(),K=this._respinCost-this._currentPlayer.player.getCurrencyAmount(this._currencyId);if(!Nr.h.includes(this._currencyId)||this._currentPlayer.player.isPlayingAtSchool()||Vs.kG.includes(q))return this._notEnoughCurrencyText.text=27===this._currencyId?this._localizer.getText("YOU_NEED_MORE_MAGICOIN",K):this._localizer.getText("YOU_NEED_MORE_CURRENCY",K),void(this._notEnoughCurrencyTooltip.active=!0);const z={conversionFunnelName:un.o.FunnelNotEnoughCurrencyRifts,conversionStage:un.o.StageClickRouletteSpinAgain,conversionStaticOrVideo:Ys.R.Static};this._segment.purchase.sendFunnelStart({type:"Click-Roulette-Spin-Again",category:"Rifts",contentId:`${this._currencyId}-${K}`,adType:Ys.R.Static}),dt.q.instance.prodigy.open.membershipInfo(void 0,z)}handleCurrencyUpdateComplete(q){q&&(this._currencyDisplayContainer.active=!1),this._currencyRespinButton.regenerateButton()}sendPrizeWheelSpinFailedEvent(q){this._roulette.instanceTypeForSegmentEvent===Ti.N.RiftRun||this._roulette.instanceTypeForSegmentEvent===Ti.N.BossRift?this._segment.rifts.sendRiftsPrizeWheelSpinFailedEvent(this._roulette.instanceTypeForSegmentEvent,q):this._segment.economy.sendPrizeWheelSpinFailedEvent(uC.U.LuckyLoot,q)}};(0,Q.Cg)([(0,X.MnK)(bC.i),(0,Q.Sn)("design:type",bC.i)],pC.prototype,"_roulette",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pC.prototype,"card",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pC.prototype,"respinButtonsContainer",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],pC.prototype,"_respinTextKey",void 0),(0,Q.Cg)([(0,X.MnK)(fC.Eo),(0,Q.Sn)("design:type",fC.Eo)],pC.prototype,"_currencyRespinButton",void 0),(0,Q.Cg)([(0,X.MnK)(rT.E),(0,Q.Sn)("design:type",rT.E)],pC.prototype,"_makePaymentComponent",void 0),(0,Q.Cg)([(0,X.MnK)(Br.n),(0,Q.Sn)("design:type",Br.n)],pC.prototype,"_currencyDisplay",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pC.prototype,"_currencyDisplayContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pC.prototype,"_notEnoughCurrencyTooltip",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],pC.prototype,"_notEnoughCurrencyText",void 0),(0,Q.Cg)([(0,X.fFd)(X.$Zn.Localization),(0,Q.Sn)("design:type",X.dTp)],pC.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],pC.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],pC.prototype,"_segment",void 0),pC=(0,Q.Cg)([(0,X.EVk)("ResetBossRewards",et.Y.adventureUi)],pC);let vC=class extends X.uAl{constructor(){super(...arguments),this.maxScale=1.5,this.window=.5,this._rouletteScaling=!1,this._positionOffset=300}create(){super.create(),this.roulette.onStart.add(this.setScalingEnabled,this,0,!0),this.roulette.onComplete.add(this.setScalingEnabled,this,0,!1)}destroy(){this.roulette.onStart.remove(this.setScalingEnabled,this),this.roulette.onComplete.remove(this.setScalingEnabled,this),super.destroy()}update(){if(super.update(),this._rouletteScaling)for(const q of this.roulette.GameObject.children){const K=q.transform;let z=(K.anchoredPivotOffset.x+this._positionOffset)/this.roulette.width-.5;z/=this.window,z+=.5,z=X.cj9.clamp(z,0,1);const Y=this.GameObject.findComponent(lC).itemCardScale,Q=this.quadraticYoyoEase(z)*(this.maxScale-Y)+Y;K.setScale(Q,Q)}}setScalingEnabled(q){this._rouletteScaling=q}quadraticYoyoEase(q){return q<.5?q*q*4:4*(q*(q-2)+1)}};(0,Q.Cg)([(0,X.MnK)(bC.i),(0,Q.Sn)("design:type",bC.i)],vC.prototype,"roulette",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],vC.prototype,"maxScale",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],vC.prototype,"window",void 0),vC=(0,Q.Cg)([(0,X.EVk)("RouletteScaleAnimator")],vC);let gC=class extends X.uAl{create(){super.create(),this._audio=dt.q.instance.prodigy.audio,this.roulette.onStart.add(this.setTickSFXSignal,this,0,!0),this.roulette.onComplete.add(this.setTickSFXSignal,this,0,!1)}destroy(){this.roulette.onStart.remove(this.setTickSFXSignal,this),this.roulette.onComplete.remove(this.setTickSFXSignal,this),super.destroy()}setTickSFXSignal(q){q?this.roulette.onTick.add(this.playSFX,this):this.roulette.onTick.remove(this.playSFX,this)}playSFX(){this._audio.playSFX(19,"tick")}};(0,Q.Cg)([(0,X.MnK)(bC.i),(0,Q.Sn)("design:type",bC.i)],gC.prototype,"roulette",void 0),gC=(0,Q.Cg)([(0,X.EVk)("RouletteTicker")],gC);var mC=z(24190);let yC=class extends X.y4o{constructor(){super(...arguments),this.onStateAvailable=new X.HN0,this._spinnerPadding=35,this._root=null,this._size=new X.or0}create(){super.create();const q=dt.q.instance.game;this._root=q.add.group(q.stage),this.setRootContainer(this._root),this._size.copyFrom(X.i7d.main.viewportSize);const K=new mC.C(q,0,0,this._size.width,this._size.height,ti._.Tiled_sprites_json,"load");K.inputEnabled=!0,this._root.addChild(K),this._spinner=this._root.addChild(dt.q.instance.prodigy.create.sprite(0,0,ti._.General_core_json,"loading")),this._spinner.position.set(this._size.width-.5*this._spinner.width-this._spinnerPadding,this._size.height-.5*this._spinner.height-this._spinnerPadding),this._spinner.anchor.set(.5,.5),q.add.tween(this._spinner,this).to({angle:360},2e3,X.GS3.Linear.None,!0,0,-1)}destroy(){this.onStateAvailable.dispose(),this._root.destroy(),super.destroy()}getDimensions(){return this._size}hide(){this._spinner.visible=!1,dt.q.instance.game.add.tween(this._root,this).to({alpha:0},this._hideFadeTime,X.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.onStateAvailable.dispatch(),this.GameObject.destroy()}))}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],yC.prototype,"onStateAvailable",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],yC.prototype,"_spinnerPadding",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],yC.prototype,"_hideFadeTime",void 0),yC=(0,Q.Cg)([(0,X.EVk)("LoadingScreen",et.Y.ui)],yC);z(25983);var _C,EC=z(46318);let wC=_C=class extends hr.B{constructor(){super(...arguments),this.onWheelClose=new X.HN0}destroy(){this.onWheelClose.dispose(),super.destroy()}openWheel(q=_C.WONDER_WHEEL_ID){if(q!==_C.TWILIGHT_WHEEL_ID||re.J.isNightTime())new EC.Q(dt.q.instance.prodigy.game,this.getRootContainer(),this._loggedInPlayer.player,null,q,-55,(()=>{this.onWheelClose.dispatch()}),!0);else{dt.q.instance.prodigy.open.twilightWheelPopup((()=>{this.onWheelClose.dispatch()})).setParent(this.getRootContainer())}}};wC.WONDER_WHEEL_ID=1,wC.TWILIGHT_WHEEL_ID=2,(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],wC.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wC.prototype,"onWheelClose",void 0),wC=_C=(0,Q.Cg)([(0,X.EVk)("PrizeWheel",X.YH6.ui)],wC);var TC,SC=z(31818),AC=z(40579);!function(q){q.HudButtonLabelValue="HudButtonLabelValue",q.HudButtonLabelPillColour="HudButtonLabelPillColour"}(TC||(TC={}));let CC=class extends X.uAl{constructor(){super(...arguments),this.NORMAL_FONT=12,this.LARGE_FONT=16,this.ICON_VERTICAL_OFFSET=22,this.ICON_SECONDARY_VERTICAL_OFFSET=17,this.DEFAULT_LABEL_PILL_COLOUR="#db1e75",this._type=zv.ts.Backpack,this._style=zv.yR.Standard,this.onExclusiveAttentionChanged=new X.HN0,this.onNotificationBadgeUpdated=new X.HN0,this._currentWidget=null,this._enabled=!0}create(){var q;super.create(),null!==(q=this.rootGameObject)&&void 0!==q||(this.rootGameObject=this.gameObject),this._broadcaster=dt.q.instance.game.broadcaster,this._labelText=this.label.findComponentInChildren(X.EYj),this._labelTimerText=this.label.findComponentInChildren(Ir.U),this._broadcaster.addAppListener(Xn.Y1.HUDRevampStartOperation,this.onHudOperationStarted.bind(this),this,void 0,!0),this._broadcaster.addAppListener(Xn.Y1.HUDRevampEndOperation,this.onHudOperationEnded.bind(this),this,void 0,!0),this._broadcaster.addAppListener(Xn.Y1.HUDRevampButtonDataUpdated,this.onNotificationDataUpdated,this),this._broadcaster.addAppListener(Xn.Y1.HUDRevampButtonVisibilityRefreshRequested,this.onVisibilityRefreshRequested,this),this._broadcaster.addAppListener(Xn.n8.MenuOpened,this.destroyWidget,this),this._broadcaster.addAppListener(Xn.n8.FactoryMenuOpened,this.destroyWidget,this),this._broadcaster.addAppListener(Xn.Y1.HUDAttentionManagerUpdated,this.processButtonAttention,this),this._hudAttentionManagerHandler=X.wa5.getActiveScene().container.get("HudAttentionHandler")}postCreate(){this.updateButton().catch(X.RQr.createHandler("HudButtonComponent: Failed to update button on postCreate"))}destroy(){X.Aq$.isDefined(this._broadcaster)&&(this._broadcaster.removeAppListener(Xn.Y1.HUDRevampStartOperation,this),this._broadcaster.removeAppListener(Xn.Y1.HUDRevampEndOperation,this),this._broadcaster.removeAppListener(Xn.Y1.HUDRevampButtonDataUpdated,this),this._broadcaster.removeAppListener(Xn.Y1.HUDRevampButtonVisibilityRefreshRequested,this),this._broadcaster.removeAppListener(Xn.Y1.HUDAttentionManagerUpdated,this),this._broadcaster.removeAppListener(Xn.n8.MenuOpened,this),this._broadcaster.removeAppListener(Xn.n8.FactoryMenuOpened,this)),this.onNotificationBadgeUpdated.dispose(),this.onExclusiveAttentionChanged.dispose(),this.destroyWidget(),super.destroy()}onHudOperationStarted(){this.button.inputEnabled=!1}onHudOperationEnded(){this.button.inputEnabled=!0}onVisibilityRefreshRequested(){this.updateVisibility().catch(X.RQr.createHandler("HudButtonComponent: Failed to update appearance on visibility refresh"))}onNotificationDataUpdated(q){if(q!==this._type)return;const K=this._hudService.getCachedButtonData(this._type);this.updateNotificationBadge(K.notificationData),this.updateLabel(K.labelData),this.updateAlternateLabel(K.alternateLabel),this.onExclusiveAttentionChanged.dispatch(K.demandsExclusiveAttention)}setTypeSilently(q){this._type!==q&&(this._type=q)}getType(){return this._type}setStyleSilently(q){this._style!==q&&(this._style=q)}getStyle(){return this._style}updateButton(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;if(!this._type)return;const z=ng.BUTTON_DATA[this._type];if(this.rootGameObject.active=!1,this.button.onClick.removeAll(this),!X.Aq$.isDefined(z))return;const Y=z.iconProvider(this._style),[Z,[J,tt]]=yield Promise.all([dt.q.instance.prodigy.load.assetsAsPromise(Y),ng.getButtonEnabledConditionsResult(this._type)]);if(this._enabled=J,ng.BUTTON_DATA[this._type]!==z)return;this.icon.updateAsset(Y),this.icon.sizeToSourceImage();const{buttonName:et,interfaceName:it,destinationName:st,saveClickInfo:nt}=z.analyticsProperties;if(this.segmentProperties.buttonName=et,this.segmentProperties.interfaceName="function"==typeof it?it():null!==(q=null!=it?it:z.analyticsProperties.buttonName)&&void 0!==q?q:"",this.segmentProperties.destinationName="function"==typeof st?st():null!=st?st:"",this.segmentProperties.saveClickInfo="function"==typeof nt?nt():null!=nt?nt:"",this.button.onClick.add((()=>this.segment.sendButtonEvent()),this),(X.Aq$.isDefined(z.onClick)||X.Aq$.isDefined(this._injectedClickEvent))&&this.button.onEnabledClick.add((()=>(0,Q.sH)(this,void 0,void 0,(function*(){yield this.handleButtonClick()}))),this),X.Aq$.isDefined(this._injectedClickEvent)&&this.button.onEnabledClick.add(this._injectedClickEvent,this),this.button.onClick.add(this.disableAttentionAnimation,this),this._enabled)this.lockedLabel.active=!1,this.button.onDisabledClick.removeAll(this),this.button.inputEnabled=0!==this.button.onClick.getBindingsCount();else{this.button.lockState(nf.K.Disabled);const q=ng.getDisabledTooltipText(this._type,tt),z=ng.getDisabledButtonLabelText(this._type,tt);this.button.onDisabledClick.add((()=>{gn.A.displayTooltipTargeted(this._reusableStandardTooltip,this._hudGameObject,{bodyText:q,arrowDirection:ng.getButtonTooltipDirection(this._style)},this.icon.GameObject)}),this),null===(K=this.gameObject.findComponentInChildren(vd))||void 0===K||K.applyFilter(),this.lockedLabel.findComponentInChildren(X.EYj).text=z,this.button.inputEnabled=!0,this.lockedLabel.active=!0}switch(this.resizeButtonToData(z),this.onNotificationDataUpdated(this._type),Ht.d.updateInjectedValues(this.gameObject,{[zv.Kr.HudButtonEnabled]:this._enabled}),this.nameLabel.findComponent(X.EYj).text=this._localizer.getText(this._type.replace(" ","_").toUpperCase()),this.nameLabel.active=this._style===zv.yR.PlayerHub,this._style){case zv.yR.Liveops:break;case zv.yR.Secondary:this.icon.tint=12747129,this.icon.GameObject.transform.setPositionY(this.ICON_SECONDARY_VERTICAL_OFFSET);break;default:this.icon.GameObject.transform.setPositionY(this.ICON_VERTICAL_OFFSET)}yield this.updateVisibility()}))}resizeButtonToData(q){var K;if(this._style===zv.yR.Liveops)return;const z=null!==(K=q.buttonSize)&&void 0!==K?K:zv.Cy.Normal;this.gameObject.findComponent(X.XVE).setSizeDelta(z,z)}setInjectedClickEvent(q){this._injectedClickEvent=q}updateVisibility(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.rootGameObject.active=yield ng.areVisibilityConditionsTrue(this._type)}))}handleButtonClick(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=ng.BUTTON_DATA[this._type];dt.q.instance.game.broadcaster.broadcast(Xn.Y1.HUDRevampStartOperation);const{hudButton:z,needsAttention:Y}=yield this.checkIfCurrentHudButtonNeedsAttention();try{if((Y||X.Aq$.isDefined(this._currentWidget))&&X.Aq$.isDefined(z)){if(yield z.triggerAction((()=>(0,Q.sH)(this,void 0,void 0,(function*(){var q;yield null===(q=K.onClick)||void 0===q?void 0:q.call(K)})))),Y){const q=this._hudAttentionManagerHandler.currentHudButton;q&&this._type===(null==q?void 0:q.hudButtonType())&&dt.q.instance.game.broadcaster.broadcast(Xn.Y1.CheckForHUDAttention)}}else yield null===(q=K.onClick)||void 0===q?void 0:q.call(K)}catch(Z){X.RQr.createHandler("HudButtonComponent: Error during HUD button callback")(Z)}finally{dt.q.instance.game.broadcaster.broadcast(Xn.Y1.HUDRevampEndOperation)}}))}checkIfCurrentHudButtonNeedsAttention(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;if(!X.Aq$.isDefined(this._hudAttentionManagerHandler))return{hudButton:null,needsAttention:!1};const K=this._hudAttentionManagerHandler.currentHudButton;if(X.Aq$.isDefined(K)&&this._type===K.hudButtonType())return{hudButton:K,needsAttention:yield K.needsAttention()};const z=null!==(q=this._hudAttentionManagerHandler.hudButtons)&&void 0!==q?q:[];for(const Y of z)if(this._type===Y.hudButtonType())return{hudButton:Y,needsAttention:yield Y.needsAttention()};return{hudButton:null,needsAttention:!1}}))}defaultHandleButtonClick(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;yield Promise.all([null===(K=q.onClick)||void 0===K?void 0:K.call(q)]).catch(X.RQr.createHandler("Error during HUD button callback"))}))}disableAttentionAnimation(){Ht.d.updateInjectedValues(this.gameObject,{[zv.Kr.HudAttentionRequested]:!1})}processButtonAttention(q,K,z){var Y;if(q===this._type){if(this.rootGameObject.active=!0,X.Aq$.isDefined(z)){X.Aq$.isDefined(this._currentWidget)&&this.destroyWidget();const q=dt.q.instance.prodigy.gameContainer.get("983-05a7");Ht.d.loadWithInjectedValuesAndDependenciesFromGUID(q,z.prefab,null!==(Y=z.injectionData)&&void 0!==Y?Y:{},this.widgetParent).then((q=>{this._currentWidget=q})).catch(X.RQr.createHandler("Error creating a HUD widget"))}Ht.d.updateInjectedValues(this.gameObject,{[zv.Kr.HudAttentionRequested]:K})}}updateLabel(q){var K,z;if(!this._enabled)return void(this.label.active=!1);const Y=(null!==(K=ng.BUTTON_DATA[this._type].buttonSize)&&void 0!==K?K:zv.Cy.Normal)===zv.Cy.ExtraLarge?this.LARGE_FONT:this.NORMAL_FONT;this._labelText.fontSize=Y;const Q=null==q?void 0:q.labelValue;if(X.Aq$.isDefined(Q)&&("string"==typeof Q||Q>0)){const q=this.animatedLabelToggle(Q);this.label.active=!q,this.animatedCollectButton.active=q,"string"==typeof Q?(this._labelText.text=Q,this._labelTimerText.stopTimer()):this._labelTimerText.setCountdownTimeMS(Q)}else this.label.active=!1;Ht.d.updateInjectedValues(this.gameObject,{[TC.HudButtonLabelValue]:null==q?void 0:q.labelValue,[TC.HudButtonLabelPillColour]:null!==(z=null==q?void 0:q.pillColour)&&void 0!==z?z:this.DEFAULT_LABEL_PILL_COLOUR})}animatedLabelToggle(q){return this._style===zv.yR.Liveops&&"string"==typeof q}updateAlternateLabel(q){const K=X.Aq$.isDefined(q)&&("string"==typeof q||q>0);if(this.alternateLabel.active=K,K){this.alternateLabel.findComponentInChildren(X.EYj).text=String(q)}}updateNotificationBadge(q){var K;this.notificationBadge.GameObject.active=!1,this._enabled&&(X.Aq$.isDefined(q)&&("string"==typeof q?""===q?this.notificationBadge.updateEmptyNotificationBadge(!0):this.notificationBadge.updateNonNumberedNotificationBadge(!0):q>0&&this.notificationBadge.updateNumberedNotificationBadge(!0,q)),null===(K=this.onNotificationBadgeUpdated)||void 0===K||K.dispatch())}hasActiveNotificationBadge(){return this.notificationBadge.GameObject.active}destroyWidget(){X.Aq$.isDefined(this._currentWidget)&&!this._currentWidget.isDestroyed&&this._currentWidget.destroy(),this._currentWidget=null}};(0,Q.Cg)([(0,X.gfw)(zv.ts),(0,Q.Sn)("design:type",String)],CC.prototype,"_type",void 0),(0,Q.Cg)([(0,X.gfw)(zv.yR),(0,Q.Sn)("design:type",Number)],CC.prototype,"_style",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],CC.prototype,"icon",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],CC.prototype,"button",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],CC.prototype,"label",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],CC.prototype,"animatedCollectButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],CC.prototype,"alternateLabel",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],CC.prototype,"nameLabel",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],CC.prototype,"lockedLabel",void 0),(0,Q.Cg)([(0,X.MnK)(Tg.e),(0,Q.Sn)("design:type",Tg.e)],CC.prototype,"notificationBadge",void 0),(0,Q.Cg)([(0,X.MnK)(qf),(0,Q.Sn)("design:type",qf)],CC.prototype,"segment",void 0),(0,Q.Cg)([(0,X.MnK)(hn),(0,Q.Sn)("design:type",hn)],CC.prototype,"segmentProperties",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],CC.prototype,"widgetParent",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],CC.prototype,"tooltipTarget",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],CC.prototype,"onExclusiveAttentionChanged",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],CC.prototype,"rootGameObject",void 0),(0,Q.Cg)([(0,X.Cdj)(zv.uR.HudGameObject),(0,Q.Sn)("design:type",X._mx)],CC.prototype,"_hudGameObject",void 0),(0,Q.Cg)([(0,X.Cdj)(zv.uR.HudRevampReusableStandardTooltip),(0,Q.Sn)("design:type",SC.tX)],CC.prototype,"_reusableStandardTooltip",void 0),(0,Q.Cg)([(0,Qi.b)("959-82c1"),(0,Q.Sn)("design:type",AC.W)],CC.prototype,"_hudService",void 0),(0,Q.Cg)([(0,Qi.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],CC.prototype,"_localizer",void 0),CC=(0,Q.Cg)([(0,X.EVk)("HudButton")],CC);var OC=z(15819),IC=z(28344);const DC=["PLAYER_INFO_WIDGET","PET_ZONE_WIDGET","ARCHIVES_WIDGET","MORPH_MARBLE_WIDGET"];let RC=class extends X.uAl{constructor(){super(...arguments),this._activeWidgets=new Set}create(){super.create(),this._widgetMap={PET_ZONE_WIDGET:this._petZoneWidget,MORPH_MARBLE_WIDGET:this._morphMarbleWidget,PLAYER_INFO_WIDGET:this._playerInfoWidget,ARCHIVES_WIDGET:this._archivesWidget};const q=dt.q.instance.prodigy.world,K=q.getCurrentZone(),z=q.getCurrentMapTag(),Y=q.getCurrentMapObject(),Q=(0,Kt.G)(IC.y).enabled;if(this.setPetZoneWidget(!Q&&re.J.isCoreZone(K)&&"Titan"!==z),K===Yt.A_.ARCHIVES&&Y instanceof OC.M){const q=Y.hudCounterContainer;X.lx6.make(this._widgetMap.ARCHIVES_WIDGET,q),this.setArchivesWidget(!0)}this.setPlayerInfoWidget(!0)}setPetZoneWidget(q){q&&dt.q.instance.prodigy.world.getCurrentZoneObject().setUpPetsInZoneButton(this._petZoneWidget),this.updateWidget("PET_ZONE_WIDGET",q)}setMorphMarbleWidget(q){this.updateWidget("MORPH_MARBLE_WIDGET",q)}setPlayerInfoWidget(q){(0,Kt.G)(Dm.q).enabled?this.updateWidget("PLAYER_INFO_WIDGET",q):this.updateWidget("PLAYER_INFO_WIDGET",!1)}setArchivesWidget(q){this.updateWidget("ARCHIVES_WIDGET",q)}updateWidget(q,K){K?this._activeWidgets.add(q):this._activeWidgets.delete(q);let z=0;for(const Y of DC){if(!X.Aq$.isDefined(this._widgetMap[Y]))continue;let q=this._activeWidgets.has(Y);z>=2&&(q=!1),this._widgetMap[Y].active=q,q&&z++}}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],RC.prototype,"_petZoneWidget",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],RC.prototype,"_morphMarbleWidget",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],RC.prototype,"_playerInfoWidget",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],RC.prototype,"_archivesWidget",void 0),RC=(0,Q.Cg)([(0,X.EVk)("HudContextManager",et.Y.uiHudManager)],RC);var PC=z(78407);let MC=class extends X.uAl{constructor(){super(...arguments),this.maxButtons=5,this._onLiveOpsHudButtonsLoaded=new X.HN0}create(){this.instantiateButtons().catch(X.RQr.createHandler("HUD: Error creating liveops buttons"))}instantiateButtons(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield this._hudDataProvider.getHudData(),K=(yield Promise.all(q.liveopsButtonData.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return(yield ng.areVisibilityConditionsTrue(q.type))?q:void 0})))))).filter(Boolean),z=[],Y=Math.min(K.length,this.maxButtons);for(let Q=0;Q(0,Q.sH)(this,void 0,void 0,(function*(){return(yield ng.areVisibilityConditionsTrue(q))?q:void 0})))))).filter(Boolean),Y=[];for(const Q of z)Y.push({HUD_REVAMP_BUTTON_TYPE:Q,HUD_REVAMP_BUTTON_STYLE:zv.yR.PlayerHub,HUD_REVAMP_BUTTON_CLICK_EVENT:()=>this.hideMenu()});yield this._prefabSpawner.spawnDefaultPrefabsFromDataArray(Y),this._spawnedHudButtons=this._prefabSpawner.spawnedPrefabs.map((q=>q.findComponent(CC)));for(const Q of this._spawnedHudButtons)Q.onNotificationBadgeUpdated.add((()=>this.onChildNotificationBadgeUpdate()));this.onChildNotificationBadgeUpdate()}))}openMenu(){this._segment.featureCommon.sendInterfaceEvent({interfaceName:"hamburger_menu",interfaceType:wi.Wm.Window,originType:wi.$N.ButtonClick}),this._hudMenu.active=!0}hideMenu(){this._hudMenu.active=!1}onChildNotificationBadgeUpdate(){let q=!1;for(const K of this._spawnedHudButtons)if(K.hasActiveNotificationBadge()){q=!0;break}this._hamburgerButton.updateNotificationBadge(q?"":void 0)}};(0,Q.Cg)([(0,Qi.b)("0c3-2fd0"),(0,Q.Sn)("design:type",PC._)],NC.prototype,"_hudDataProvider",void 0),(0,Q.Cg)([(0,Qi.b)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],NC.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.MnK)(Gu.h),(0,Q.Sn)("design:type",Gu.h)],NC.prototype,"_prefabSpawner",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],NC.prototype,"_hudMenu",void 0),(0,Q.Cg)([(0,X.MnK)(CC),(0,Q.Sn)("design:type",CC)],NC.prototype,"_hamburgerButton",void 0),NC=(0,Q.Cg)([(0,X.EVk)("HudSecondaryMenu")],NC);let xC=class extends X.uAl{create(){super.create(),this.updateText()}setItem(q,K){this._itemType=q,this._itemID=K,this.updateText()}updateText(){var q;if(!this._text||!this._itemID||!this._itemType)return;(null===(q=ae.t.getItem(this._itemType,this._itemID))||void 0===q?void 0:q.data)||X.VyI.log(`Invalid or missing item data found for itemID ${this._itemID} of type ${this._itemType}`,X.$bb.Warning),this._text.text=(0,Is.k)(`${this._itemType}_${this._itemID}_FLAVORTEXT`.toUpperCase())}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],xC.prototype,"_text",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],xC.prototype,"_itemType",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],xC.prototype,"_itemID",void 0),xC=(0,Q.Cg)([(0,X.EVk)("ItemFlavorText",et.Y.ui)],xC);z(57324),z(98762);var LC,kC=z(6719);let BC=LC=class extends X.uAl{constructor(){super(...arguments),this._gridAssetsData=[],this._fillGridWithEmptyCells=!0,this._onGridAssetsAdded=new X.HN0,this._waitForAllLoadedToActivate=!1}addGridAssets(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){var Y,Q;this._gridAssetsData=q,this._maxAssetsToShow=null!==(Y=null!=z?z:this._maxAssetsToShow)&&void 0!==Y?Y:q.length;const X=this._gridAssetsData.slice(0,this._maxAssetsToShow),Z=[];for(let q=0;q0,"Items per page must be greater than 0"),this._itemsPerPage=q,this.updateChangePageComponent()}setData(q){(0,wt.v)(!!q,"Data must be a valid array"),this._data=q,this.updateChangePageComponent()}getCurrentPageItems(){return this._currentPage}updateChangePageComponent(){this._changePageButtons.setMaximumPage(Math.max(1,Math.ceil(this._data.length/this._itemsPerPage))),this.updateCurrentPageItems()}updateCurrentPageItems(){const q=this._itemsPerPage*(this._changePageButtons.currentPage-1);this._currentPage=this._data.slice(q,q+this._itemsPerPage),this._onPageItemsChanged.dispatch()}}let GC=class extends X.uAl{constructor(){super(...arguments),this._gridElements=[]}create(){var q;super.create(),0!==this._gridElements.length||(null===(q=this._gridLayout)||void 0===q?void 0:q.isEmpty())||this._gridLayout.GameObject.children.forEach((q=>this._gridElements.push(q))),this._changePageButtons&&this._gridElements.length>0&&(this._dataPaginator=new FC(this._changePageButtons,this._gridViewData,this._gridElements.length),this._dataPaginator.onPageItemsChanged.add(this.updateGridElements,this))}destroy(){var q;null===(q=this._dataPaginator)||void 0===q||q.destroy(),super.destroy()}updateGridElements(){if(this._dataPaginator){const q=this._gridElements.length,K=this._dataPaginator.getCurrentPageItems(),z=K.length;for(let Y=0;Ythis.validateComponent(q.component,q.name)))}validateComponent(q,K){q||X.VyI.log(`ClassCodeSection: ${K} is required but not defined`,X.$bb.Error)}destroy(){var q,K,z,Y,Q;this._onClassCodeSuccess.dispose(),this._onClassCodeTextChanged.dispose(),null===(q=this.saveScrollViewButton)||void 0===q||q.onClick.removeAll(this),null===(K=this.changeScrollViewButton)||void 0===K||K.onClick.removeAll(this),null===(z=this.editSaveScrollViewButton)||void 0===z||z.onClick.removeAll(this),null===(Y=this.editCancelScrollViewButton)||void 0===Y||Y.onClick.removeAll(this),null===(Q=this.learnMoreScrollViewButton)||void 0===Q||Q.onClick.removeAll(this),super.destroy()}setInputVisibility(q){document.getElementById("external-ui").style.setProperty("display",q?"unset":"none")}setUpClassCodeInput(){this._classCodeInput.enablePerKeyEvents(!0),this._classCodeInput.onTextChanged.add(this.classCodeTextChanged,this),this._classCodeInput.onClear.add(this.classCodeTextChanged,this)}setUpButtons(){switch(this._operationMode){case HC.ScrollView:this.changeScrollViewButton.onClick.add(this.onChangeClicked,this),this.editCancelScrollViewButton.onClick.add(this.onEditCancelClicked,this),this.learnMoreScrollViewButton.onClick.add(this.onLearnMoreClicked,this);break;case HC.Simple:this.simpleModeLearnMoreButton.onEnabledClick.add(this.onLearnMoreClicked.bind(this))}this.disableSaveButtons()}classCodeTextChanged(){const q=this.classCodeInput.text,K=Vv.b.reformatClassCode(q);K!==q&&(this.classCodeInput.text=K),this._onClassCodeTextChanged.dispatch(K)}setClassCode(q){q?dt.q.instance.prodigy.education.loadAndInitEducationData().then((()=>{this.validStatusContainer.active=!1,this._operationMode!==HC.Simple&&this.changeClassCodeButtonView(),gn.A.displayToolTipAuto(null,null,{bodyText:dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("CLASS_CODE_SAVED"),xPosition:635,yPosition:100})})).then((()=>(0,Q.sH)(this,void 0,void 0,(function*(){return Ld.d.sendAttachClassCodeQuestEvent()})))).then((()=>{this._onClassCodeSuccess.dispatch()})).catch((()=>{this.failedValidationView(),this.enableSaveButtons()})):this.failedValidationView()}onChangeClicked(){dt.q.instance.prodigy.audio.playSFX(18,"pop"),this.editClassCodeButtonView()}onEditCancelClicked(){dt.q.instance.prodigy.audio.playSFX(18,"pop"),this.changeClassCodeButtonView()}onLearnMoreClicked(){dt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1),dt.q.instance.prodigy.open.learnMore("HEY_TEACHERS","CLASS_CODE_LEARN_MORE_HEADER","CLASS_CODE_LEARN_MORE_BODY",(()=>{this.setInputVisibility(!0)}),void 0,this.GameObject.layer!==Xh.E.Default?this.GameObject.layer:void 0)}enableSaveButtons(){switch(this._operationMode){case HC.ScrollView:this.saveScrollViewButton.inputEnabled=!0,this.editSaveScrollViewButton.inputEnabled=!0,this.saveScrollViewButton.currentState=nf.K.Up,this.editSaveScrollViewButton.currentState=nf.K.Up;break;case HC.Simple:this.simpleModeSaveButton.unlockState()}}disableSaveButtons(){switch(this._operationMode){case HC.ScrollView:this.saveScrollViewButton.inputEnabled=!1,this.editSaveScrollViewButton.inputEnabled=!1,this.saveScrollViewButton.currentState=nf.K.Disabled,this.editSaveScrollViewButton.currentState=nf.K.Disabled;break;case HC.Simple:this.simpleModeSaveButton.lockState(nf.K.Disabled)}}successfulValidationView(){this.enableSaveButtons(),this.classCodeInput.setInError(!1),this.validStatusContainer.active=!0,this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1),this.classCodeInput.setInError(!1)}failedValidationView(){this.disableSaveButtons(),this.classCodeInput.setInError(!0),this.validStatusContainer.active=!1,this.invalidStatusContainer.active=!0,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1)}neutralValidationView(){this.disableSaveButtons(),this.classCodeInput.setInError(!1),this.validStatusContainer.active=!1,this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1)}duplicateClassValidationView(){this.disableSaveButtons(),this.classCodeInput.setInError(!0),this.validStatusContainer.active=!1,this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!0)}standardButtonView(){switch(this._operationMode){case HC.ScrollView:this.saveScrollViewButton.GameObject.active=!0,this.changeScrollViewButton.GameObject.active=!1,this.editClassCodeContainer.active=!1,this.inClassStatusContainer.active=!1;break;case HC.Simple:this.simpleModeSaveButton.GameObject.active=!0}this.classCodeInput.setVisible(this.GameObject.activeInHierarchy),this.classCodeInput._input.blur(),this.classCodeInput.text="",this.classCodeInput.setInError(!1),this.classCodeText.GameObject.active=!0,this.initialText.GameObject.active=!0}changeClassCodeButtonView(){this.saveScrollViewButton.GameObject.active=!1,this.changeScrollViewButton.GameObject.active=!0,this.editClassCodeContainer.active=!1,this.classCodeInput.setVisible(!1),this.classCodeInput._input.blur(),this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1),this.validStatusContainer.active=!1,this.inClassStatusContainer.active=!0,this.classCodeText.GameObject.active=!1,this.initialText.GameObject.active=!1}editClassCodeButtonView(){this.classCodeInput.setDisabled(!1),this.saveScrollViewButton.GameObject.active=!1,this.changeScrollViewButton.GameObject.active=!1,this.editClassCodeContainer.active=!0,this.classCodeInput.setVisible(!0),this.classCodeInput._input.focus(),this.classCodeInput.text="",this.classCodeInput.setInError(!1),this.inClassStatusContainer.active=!1,this.classCodeText.GameObject.active=!0,this.initialText.GameObject.active=!0}};WC.DEBOUNCE_MS=500,(0,Q.Cg)([(0,X.gfw)(HC),(0,Q.Sn)("design:type",Number)],WC.prototype,"_operationMode",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],WC.prototype,"_changeScrollViewButton",void 0),(0,Q.Cg)([(0,X.MnK)(qt.S),(0,Q.Sn)("design:type",qt.S)],WC.prototype,"_classCodeInput",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],WC.prototype,"_classCodeText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],WC.prototype,"_editClassCodeContainer",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],WC.prototype,"_editCancelScrollViewButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],WC.prototype,"_editSaveScrollViewButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],WC.prototype,"_inClassStatusContainer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],WC.prototype,"_initialText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],WC.prototype,"_invalidStatusContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],WC.prototype,"_duplicateClassStatusContainer",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],WC.prototype,"_learnMoreScrollViewButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],WC.prototype,"simpleModeLearnMoreButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],WC.prototype,"_saveScrollViewButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],WC.prototype,"simpleModeSaveButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],WC.prototype,"_validStatusContainer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],WC.prototype,"_onClassCodeSuccess",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],WC.prototype,"_onClassCodeTextChanged",void 0),(0,Q.Cg)([(0,VC.sg)(WC.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],WC.prototype,"onChangeClicked",null),(0,Q.Cg)([(0,VC.sg)(WC.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],WC.prototype,"onEditCancelClicked",null),(0,Q.Cg)([(0,VC.sg)(WC.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],WC.prototype,"onLearnMoreClicked",null),WC=(0,Q.Cg)([(0,X.EVk)("ClassCodeOptionsSection")],WC);let qC=class extends X.uAl{constructor(){super(...arguments),this.localization=null,this._autoClick={}}create(){super.create(),this.localization=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),this.setUpButtons()}setUpButtons(){this._linkButton.onClick.add(this.onLinkParentAccountClicked.bind(this))}setInputVisibility(q){document.getElementById("external-ui").style.setProperty("display",q?"unset":"none")}onLinkParentAccountClicked(){dt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);dt.q.instance.prodigy.open.parentAttachMenu((()=>{this.setInputVisibility(!0)})).onPrefabLoaded.addOnce((q=>q.setLayer(Xh.E.Result,!0)))}};var KC;qC.DEBOUNCE_MS=500,(0,Q.Cg)([(0,X.MnK)(X.Sjx),(0,Q.Sn)("design:type",X.Sjx)],qC.prototype,"_linkButton",void 0),(0,Q.Cg)([(0,VC.sg)(qC.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],qC.prototype,"onLinkParentAccountClicked",null),qC=(0,Q.Cg)([(0,X.EVk)("CompletedParentSection")],qC);let zC=KC=class extends X.uAl{constructor(){super(...arguments),this._serverIcons=[]}setServerData(q){this.setupServerFill(q.full),q.meta&&this.setupServerImage(q.meta)}setupServerFill(q){let K=KC.NORMAL_TINT;q>=KC.WARNING_MAX?K=KC.DANGER_TINT:q>KC.NORMAL_MAX&&(K=KC.WARNING_TINT);const z=100/this._serverIcons.length;for(let Y=0;Y0&&q>=Y*z;Q.active=Z,Z&&(Q.findComponent(X.vYh).getRootContainer().tint=K)}}setupServerImage(q){var K;let z;if(null===(K=this._sprite)||void 0===K||K.destroy(),X.Aq$.isDefined(q.ID)&&"pet"===q.type){const K=ae.t.getItem("pet",q.ID);("spine"===yt.get(K,"metadata.assets.default.type",null)||yt.get(K,"metadata.assets.spine",!1))&&(z={x:-.06,y:.05})}this._sprite=dt.q.instance.prodigy.icon.createFromData(q,0,0,z,(q=>{this._serverImage.setTexture(q.texture)})),this._serverImage.setTexture(this._sprite.texture)}destroy(){var q;null===(q=this._sprite)||void 0===q||q.destroy(),super.destroy()}};zC.NORMAL_MAX=80,zC.WARNING_MAX=95,zC.NORMAL_TINT=8111468,zC.WARNING_TINT=15194464,zC.DANGER_TINT=14307665,(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],zC.prototype,"_serverIcons",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],zC.prototype,"_serverImage",void 0),zC=KC=(0,Q.Cg)([(0,X.EVk)("WorldInfoCard")],zC);let YC=class extends X.uAl{create(){super.create();const q=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this._worldInfoText.text=q.getText("WORLD_INFO_PLAY_TOGETHER"),this._serverNameLabel.text=q.getText("WORLD_INFO_YOU_ARE_IN"),this._worldInfoTitle.text=q.getText("WORLD_INFO_TITLE"),this._offlineText1.text=q.getText("WORLD_OFFLINE_TEXT_1"),this._offlineText2.text=q.getText("WORLD_OFFLINE_TEXT_2"),this._offlineView.active=!1,this._onlineView.active=!1}setServerData(q){q.full=Math.max(1,q.full);const K=X.Aq$.isDefined(q);K&&(this._serverNameText.text=q.name,this._infoCard.setServerData(q)),this._onlineView.active=K,this._offlineView.active=!K}destroy(){super.destroy()}};(0,Q.Cg)([(0,X.MnK)(zC),(0,Q.Sn)("design:type",zC)],YC.prototype,"_infoCard",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],YC.prototype,"_worldInfoTitle",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],YC.prototype,"_serverNameText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],YC.prototype,"_worldInfoText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],YC.prototype,"_serverNameLabel",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],YC.prototype,"_offlineText1",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],YC.prototype,"_offlineText2",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,X.Lr6)(0),(0,Q.Sn)("design:type",X._mx)],YC.prototype,"_offlineView",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,X.Lr6)(0),(0,Q.Sn)("design:type",X._mx)],YC.prototype,"_onlineView",void 0),YC=(0,Q.Cg)([(0,X.EVk)("WorldInfo")],YC);let QC=class extends X.uAl{postCreate(){var q,K,z;super.postCreate();const Y=null===(K=null===(q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2"))||void 0===q?void 0:q.player)||void 0===K?void 0:K.world;Y&&(null===(z=this.worldInfoSelection)||void 0===z||z.setServerData(Y))}};(0,Q.Cg)([(0,X.MnK)(YC),(0,Q.Sn)("design:type",YC)],QC.prototype,"worldInfoSelection",void 0),QC=(0,Q.Cg)([(0,In.injectable)(),(0,X.EVk)("CurrentWorld")],QC);var XC=z(99429),ZC=z(2272);let JC=class extends X.uAl{constructor(){super(...arguments),this._linkParentScrollViewButton=null,this._noRewardsScrollViewButton=null,this.localization=null}get linkParentScrollViewButton(){return this._linkParentScrollViewButton}get noRewardsScrollViewButton(){return this._noRewardsScrollViewButton}create(){super.create(),this.localization=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),this.setUpButtons()}destroy(){super.destroy(),this.linkParentScrollViewButton.onClick.removeAll(this),this.noRewardsScrollViewButton.onClick.removeAll(this)}setUpButtons(){this.linkParentScrollViewButton.onClick.add(this.onLinkParentAccountClicked,this),this.noRewardsScrollViewButton.onClick.add(this.onNoRewardClicked,this)}setInputVisibility(q){document.getElementById("external-ui").style.setProperty("display",q?"unset":"none")}linkParent(q){const K=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=re.J.getEnvironmentURL(),Y=()=>{dt.q.instance.prodigy.gameContainer.get("774-4659").logout()},Q=()=>{this.setInputVisibility(!0)};K.isPlayingAtSchool()?dt.q.instance.prodigy.open.parentalLoginPopup():dt.q.instance.prodigy.open.confirmationDialog(new ow.k(this.localization.getText("PARENTAL_POPUP_LOGIN"),Y,this.localization.getText("BUTTON_STAY_TEAM"),Q,{atlas:ti._.Ui_store_json,name:"icon-large-exclamation"},ZC.E.Small,XC.K.CONFIRM_WIDTH,this.localization.getText("LINK_PARENT_NO_REWARDS"),this.localization.getText("PARENT_LINK_POST_CLICK"))),Cp.I.openWebsite(`${z}/#start-now?usertype=parent&utm_source=student-referral&utm_medium=register-prompt`)}onLinkParentAccountClicked(){dt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);dt.q.instance.prodigy.open.parentAttachMenu((()=>{this.setInputVisibility(!0)}),Us.k.LinkParent).onPrefabLoaded.addOnce((q=>q.setLayer(Xh.E.Result,!0)))}onNoRewardClicked(){dt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);dt.q.instance.prodigy.open.confirmationDialog(new ow.k(this.localization.getText("PARENTAL_POPUP_LOGIN"),(()=>{dt.q.instance.prodigy.gameContainer.get("774-4659").logout()}),this.localization.getText("BUTTON_STAY_TEAM"),(()=>{this.setInputVisibility(!0)}),{atlas:ti._.Ui_store_json,name:"icon-large-exclamation"},ZC.E.Small,XC.K.CONFIRM_WIDTH,this.localization.getText("LINK_PARENT_NO_REWARDS"),this.localization.getText("PARENT_LINK_POST_CLICK")))}};JC.DEBOUNCE_MS=500,(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],JC.prototype,"_linkParentScrollViewButton",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],JC.prototype,"_noRewardsScrollViewButton",void 0),(0,Q.Cg)([(0,VC.sg)(JC.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],JC.prototype,"onLinkParentAccountClicked",null),(0,Q.Cg)([(0,VC.sg)(JC.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],JC.prototype,"onNoRewardClicked",null),JC=(0,Q.Cg)([(0,X.EVk)("ParentSection")],JC);let tO=class extends X.uAl{constructor(){super(...arguments),this.fullscreenTitle=null,this.fullscreenToggle=null}create(){super.create(),this._canGoFullscreen=!X.o5U.isMobile()&&Qs.pF.isFullscreenSupported(),this.setUpButtons();const q=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this.fullscreenTitle.text=q.getText("SCREEN_SIZE_TITLE"),this.fullscreenToggle.setText(q.getText("FULLSCREEN_LABEL"))}setUpButtons(){this._canGoFullscreen&&this.fullscreenToggle.onClick.add(this.onFullscreenToggleClicked,this)}onFullscreenToggleClicked(){this.fullscreenToggle.isDisabled()||(dt.q.instance.prodigy.audio.playSFX(18,"pop"),this.toggleFullscreen())}toggleFullscreen(){dt.q.instance.prodigy.game.scale.isFullScreen?this.exitFullscreen():this.enterFullscreen()}enterFullscreen(){dt.q.instance.prodigy.game.scale.fullScreenScaleMode=rE.y.EXACT_FIT,dt.q.instance.prodigy.game.scale.fullScreenTarget=document.body,dt.q.instance.prodigy.game.scale.startFullScreen().catch(X.RQr.createHandler("Failed to start fullscreen."))}exitFullscreen(){dt.q.instance.prodigy.game.scale.stopFullScreen()}isFullscreen(){return dt.q.instance.prodigy.game.scale.isFullScreen}};tO.DEBOUNCE_MS=500,(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],tO.prototype,"fullscreenTitle",void 0),(0,Q.Cg)([(0,X.MnK)(rt),(0,Q.Sn)("design:type",rt)],tO.prototype,"fullscreenToggle",void 0),(0,Q.Cg)([(0,VC.sg)(tO.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],tO.prototype,"onFullscreenToggleClicked",null),tO=(0,Q.Cg)([(0,X.EVk)("ScreenSizeSection")],tO);var eO=z(93690);let iO=class extends X.uAl{constructor(){super(...arguments),this.tabs=[],this.tabContents=[],this.defaultSelectedTabIndex=0,this._selectedTabIndex=0}set selectedTabIndex(q){this._selectedTabIndex=q,this.updateTabs()}get selectedTabIndex(){return this._selectedTabIndex}postCreate(){this.tabs.forEach(((q,K)=>{q.onClick.add((()=>{this.selectedTabIndex=K}),this);const z=q.renderComponent.getRootContainer();z&&eO.p.patchPhaserInteraction(z,!0)})),this.selectedTabIndex=this.defaultSelectedTabIndex}destroy(){super.destroy(),this.tabs.forEach((q=>{q.onClick.removeAll(this)}))}updateTabs(){for(let q=0;q=q.length)return void this.onMissingSpell.dispatch();this.onFilledSpell.dispatch();const K=ae.t.getItem("spellV2",q[this.spellIndex]),z=K.data,Y=K.metadata,Q=this.isOneUseSpell(z.cooldown)?z.warmup:z.cooldown,Z=this.isOneUseSpell(z.cooldown)?z.cooldown:Q-z.cooldown,J=yield this.loadIcon(Y),tt={SPELLCARD_COLOR_STATE:z.element,SPELLCARD_COOLDOWN_BARS_TOTAL:Q,SPELLCARD_COOLDOWN_BARS_CURRENT:Z,SPELLCARD_COOLDOWN_1:this.getCooldownBarColor(Z,1,z.element),SPELLCARD_COOLDOWN_2:this.getCooldownBarColor(Z,2,z.element),SPELLCARD_COOLDOWN_3:this.getCooldownBarColor(Z,3,z.element),SPELLCARD_CENTRE_ICON:J,SPELLCARD_MINI_ICON:[ti._.Ui_battle_revamp_json,`icon-mini-element-${z.element}`]};this.GameObject&&!this.GameObject.isDestroyed&&Ht.d.updateInjectedValues(this.GameObject,tt,!1)}))}loadIcon(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=this.getCentreIcon(q);return new Promise((q=>{dt.q.instance.prodigy.load.assets([K],(()=>{q(K)}))}))}))}getCentreIcon(q){var K,z;return(null===(z=null===(K=q.assets)||void 0===K?void 0:K.icon)||void 0===z?void 0:z.assetKey)?As.q[Vt.$.capitalizeFirstLetter(q.assets.icon.assetKey)]:As.q.Spell_fire_fireball_single}isOneUseSpell(q){return-1===q}getCooldownBarColor(q,K,z){let Y="cooldown";return this.isOneUseSpell(q)?Y="disabled":q>=K&&(Y=z===In.EElementType.Astral?`${In.EElementType.Astral}${K}`:z),mu.k[Vt.$.capitalizeFirstLetter(Y)]}destroy(){this.onMissingSpell.dispose(),this.onFilledSpell.dispose(),dt.q.instance.prodigy.game.broadcaster.removeAppListener(Xn.ig.Evolved,this),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)(ms.hi.PetCreatureData),(0,Q.Sn)("design:type",Object)],nO.prototype,"_petData",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.YLv)("Index of the spell this component represents"),(0,Q.Sn)("design:type",Number)],nO.prototype,"spellIndex",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Dispatched if spell slot is empty"),(0,Q.Sn)("design:type",X.HN0)],nO.prototype,"onMissingSpell",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Dispatched if spell slot is empty"),(0,Q.Sn)("design:type",X.HN0)],nO.prototype,"onFilledSpell",void 0),nO=(0,Q.Cg)([(0,X.EVk)("SpellCardData",et.Y.uiPet)],nO);var aO=z(55734),rO=z(17710);let oO=class extends Yi.z{constructor(){super(...arguments),this.spellIndex=-1}create(){super.create(),dt.q.instance.prodigy.game.broadcaster.addAppListener(Xn.ig.Evolved,this.onEvolvePet.bind(this),this),dt.q.instance.prodigy.game.broadcaster.addAppListener(Xn.ig.GearUpdate,this.onGearEquip.bind(this),this),dt.q.instance.prodigy.game.broadcaster.addAppListener(Xn.ig.AnyLevelUp,this.onLevelPet.bind(this),this),this.bindContext()}bindContext(){super.bindContext(),this.fillTooltip()}onEvolvePet(){this.bindContext()}onGearEquip(){this.bindContext()}onLevelPet(){this.bindContext()}fillTooltip(q=!1){if(!this.GameObject)return;if(this.spellIndex<0)return void X.VyI.log("SpellIndex unset or invalid.",X.$bb.Error);const K=new aO.R(dt.q.instance.game,this._petData);let z;if(q)z=K.getAvailableSpells(K.currentMaxLevel);else if(z=K.getAvailableSpells(),this.spellIndex>=z.length)return;const Y=ae.t.getItem("spellV2",z[this.spellIndex]).data,Q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getGrowthBattleStats(this._petData),Z=rO.D.getStatusEffectInjectedValues(Y);dd.I.getStatsOfEquippedGearForPet(this._petData.gear).then((q=>{for(const K in q)"number"==typeof Q[K]&&"number"==typeof q[K]&&(Q[K]+=q[K])})).catch(X.RQr.createHandler("Error when adding pet gear.")).finally((()=>{const q=Object.assign({TOOLTIP_IS_IN_COOLDOWN:!1,TOOLTIP_ELEMENT:Y.element,TOOLTIP_NAME:Y.name,TOOLTIP_POWER:this.getPower(Q.power,this._petData.level,Y),TOOLTIP_ACCURACY:this.getCasterAccuracy(Q.speed,this._petData.level,Y),TOOLTIP_COOLDOWN:this.getCooldown(Y),TOOLTIP_SELECTED:!0},Z);Ht.d.updateInjectedValues(this.GameObject,q,!1)}))}getPower(q,K,z){var Y;const Q=null===(Y=z.flags)||void 0===Y?void 0:Y.find((q=>q.flag===In.ESpellFlag.ChangeHp)),X=Q?Q.flagValue:this._spellLevelBonusConstants.getSpellPower({casterValue:q,spellBaseValue:z.damage,upgradeType:z.upgradeType,level:K});return this._spellLevelBonusConstants.getDisplaySpellPower(X,!!Q).toString()}getCasterAccuracy(q,K,z){const Y=this._spellLevelBonusConstants.getSpellSpeed({casterValue:q,spellBaseValue:z.accuracySpeedBonus,upgradeType:z.upgradeType,level:K});return this._spellLevelBonusConstants.getDisplaySpellAccuracy(Y)}determineAccuracyTier(q){return q<.7?"SPELL_ACCURACY_TIER_4":q<.85?"SPELL_ACCURACY_TIER_3":q<1?"SPELL_ACCURACY_TIER_2":"SPELL_ACCURACY_TIER_1"}getCooldown(q){const K=this.getInjectedValue(X.$Bt.LocalizationService);let z;return z=q.cooldown<0?K.getText("SPELL_COOLDOWN_NEVER"):0===q.cooldown?K.getText("SPELL_COOLDOWN_NONE"):`${q.cooldown}`,z}destroy(){super.destroy(),dt.q.instance.prodigy.game.broadcaster.removeAppListener(Xn.ig.Evolved,this)}};(0,Q.Cg)([(0,X.Cdj)(ms.hi.PetCreatureData),(0,Q.Sn)("design:type",Object)],oO.prototype,"_petData",void 0),(0,Q.Cg)([(0,Qi.b)("457-d999"),(0,Q.Sn)("design:type",In.SpellLevelBonusConstants)],oO.prototype,"_spellLevelBonusConstants",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.YLv)("Index of the spell this component represents"),(0,Q.Sn)("design:type",Number)],oO.prototype,"spellIndex",void 0),oO=(0,Q.Cg)([(0,X.EVk)("SpellTooltipData",et.Y.uiPet)],oO);z(56345);let hO=class extends ot.B{constructor(){super(...arguments),this._titleWhite=null,this._titleGrey=null,this._selectedGraphic=null}updateContentView(q){this._titleWhite.text=q.title,this._titleGrey.text=q.title,this._titleWhite.GameObject.active=!1,this._titleGrey.GameObject.active=!0,this._selectedGraphic.active=!1,this.onClick.add(((K=!0)=>{this._selectedGraphic.active=!0,this._titleWhite.GameObject.active=!0,this._titleGrey.GameObject.active=!1,q.onClick(this._selectedGraphic,K,(()=>{this._titleWhite.GameObject.active=!1,this._titleGrey.GameObject.active=!0}))})),q.selected&&this.onClick.dispatch(!1)}};(0,Q.Cg)([(0,X.x4W)("titleWhite"),(0,Q.Sn)("design:type",X.EYj)],hO.prototype,"_titleWhite",void 0),(0,Q.Cg)([(0,X.x4W)("titleGrey"),(0,Q.Sn)("design:type",X.EYj)],hO.prototype,"_titleGrey",void 0),(0,Q.Cg)([(0,X.x4W)("selectedGraphic"),(0,Q.Sn)("design:type",X._mx)],hO.prototype,"_selectedGraphic",void 0),hO=(0,Q.Cg)([(0,X.EVk)("RegistrationCellPrefab")],hO);let cO=class extends ht.C{constructor(){super(...arguments),this._title=null,this._singleRow=null,this._doubleRow=null,this._tripleRow=null,this._numberOfColumns=3}updateContentView(q){this._title.text=q.title;const K=q.cells.length/this._numberOfColumns;this._singleRow.active=K<=1,this._doubleRow.active=K<=2&&K>1,this._tripleRow.active=K<=3&&K>2}};(0,Q.Cg)([(0,X.x4W)("title"),(0,Q.Sn)("design:type",X.EYj)],cO.prototype,"_title",void 0),(0,Q.Cg)([(0,X.x4W)("singleRow"),(0,Q.Sn)("design:type",X._mx)],cO.prototype,"_singleRow",void 0),(0,Q.Cg)([(0,X.x4W)("doubleRow"),(0,Q.Sn)("design:type",X._mx)],cO.prototype,"_doubleRow",void 0),(0,Q.Cg)([(0,X.x4W)("tripleRow"),(0,Q.Sn)("design:type",X._mx)],cO.prototype,"_tripleRow",void 0),cO=(0,Q.Cg)([(0,X.EVk)("RegistrationSectionPrefab")],cO);let dO=class extends X.uAl{constructor(){super(...arguments),this._animate=!1,this._bounce=null}create(){super.create(),this.gameObject.onActiveInHierarchyChanged.add((()=>{this.animateArrow(this.gameObject.active)}))}animateArrow(q){var K;this._animate=q,this._animate?(this._bounce||(this._bounce=dt.q.instance.game.add.tween(this.gameObject.transform.localPosition,this).to({y:this.gameObject.transform.localPosition.y-5},1e3,X.GS3.Quadratic.InOut,!0,0,se.s.MAX_SAFE_INTEGER,!0)),this._bounce.isRunning||this._bounce.start()):(this.gameObject.transform.setPositionY(0),null===(K=this._bounce)||void 0===K||K.stop())}destroy(){this._bounce&&(this._bounce.stop(),dt.q.instance.game.tweens.remove(this._bounce),this._bounce=null),super.destroy()}};dO=(0,Q.Cg)([(0,X.EVk)("ItemCardArrow",X.YH6.ui)],dO);var lO=z(55301),uO=z(59701);let fO=class extends X.uAl{constructor(){super(...arguments),this._onRequirementsMet=new X.HN0}create(){super.create(),this._isZoneStore=uO.W.isPrimaryMajorZoneStore(this._storeID),this._isZoneStore&&(dt.q.instance.prodigy.gameContainer.get("884-efd8").getStore(this._storeID).then((([q,K])=>{q?X.VyI.log(`[OpenStoreComponent] Error retrieving the store with ID: ${this._storeID}`,X.$bb.Error):this._storeData=K})).catch(X.RQr.createHandler(`[OpenStoreComponent] Error retrieving the store with ID: ${this._storeID}`)),this._requirementsID>=0&&this._featureRequirements.meetsRequirementsDeprecated(this._requirementsID)&&this._onRequirementsMet.dispatch())}destroy(){this._onRequirementsMet.dispose(),super.destroy()}openStore(){var q,K,z,Y;const Q=new Ii.rD(dt.q.instance.game),Z=`${null===(q=Q.dataProvider.get(this._openStoreDialogueID))||void 0===q?void 0:q.textKey}_${ws.B.Dialogue}`,J=dt.q.instance.prodigy.world.getCurrentZone(),tt=dt.q.instance.prodigy.world.getCurrentMapTag();if(this._featureRequirements.meetsRequirementsDeprecated(this._requirementsID)){this._segment.featureCommon.sendInterfaceEvent({interfaceName:Z,interfaceType:wi.Wm.Shop,instanceType:Ti.N.ShopVisit,originType:wi.$N.Npc,originID:`${J}-${tt}-${this._storeID}`});const q=Q.dataProvider.get(this._openStoreDialogueID);this._isZoneStore&&(q.args=[null===(K=this._storeData)||void 0===K?void 0:K.getName()]);const[Y,et]=null!==(z=lO.X[this._storeID])&&void 0!==z?z:[],it=`${Y}${X.Aq$.isDefined(et)?`_${et}`:""}`.replace("-","_");if(!q)return void this.openStoreMenu(Z,it);Q.addEvents([{dialogueData:q,type:Ii.fA.STORE,yes:()=>this.openStoreMenu(Z,it),no:()=>this.dismissStoreMenu(Z,it),blockInput:!0}])}else{const q=Q.dataProvider.get(this._unmetRequirementsDialogueID);this._isZoneStore&&(q.args=[ae.t.getItem("currency",null===(Y=this._storeData)||void 0===Y?void 0:Y.getStoreCurrencyID()).data.name]),Q.addEvents([{dialogueData:q,blockInput:!0}])}Q.start(!0)}openStoreMenu(q,K){this.sendDialogueSegmentEvents(Us.k.Shop,q,K),dt.q.instance.prodigy.open.store(this._storeID)}dismissStoreMenu(q,K){this.sendDialogueSegmentEvents(Us.k.NotNow,q,K)}sendDialogueSegmentEvents(q,K,z){this._segment.featureCommon.sendButtonEvent({buttonName:q,interfaceName:K,interfaceType:wi.Wm.DialogBox,saveClickInfo:q,destinationName:z}),this._segment.featureCommon.sendInterfaceEvent({interfaceName:K,interfaceType:wi.Wm.DialogBox,instanceType:Ti.N.Interface,closeMethod:wi.Lv.ButtonClick})}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],fO.prototype,"_storeID",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],fO.prototype,"_requirementsID",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],fO.prototype,"_openStoreDialogueID",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],fO.prototype,"_unmetRequirementsDialogueID",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],fO.prototype,"_onRequirementsMet",void 0),(0,Q.Cg)([(0,X.Cdj)("11f-118a"),(0,Q.Sn)("design:type",Object)],fO.prototype,"_featureRequirements",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],fO.prototype,"_segment",void 0),fO=(0,Q.Cg)([(0,X.EVk)("OpenStore",et.Y.uiDialog)],fO);z(63811),z(25317),z(74208),z(32456),z(13751);let bO=class extends X.uAl{constructor(){var q;super(...arguments),this._onMenuClosed=new X.HN0,this._closeCallback=null,this.menuFactory=null===(q=dt.q.instance)||void 0===q?void 0:q.prodigy.open}map(q,K,z,Y,Q){return this.menuFactory.map({disableClose:q,forceLock:K,onClose:z,forceUnlock:Y,disableZoneGoals:Q})}firstNameSelector(q,K=!1){this.menuFactory.firstNameSelector(q,K)}wizardNameSelector(q,K,z){this.menuFactory.wizardNameSelector(q,K,z)}openChatFromHUD(){this.menuFactory.chat(dt.q.instance.game.broadcaster.broadcast.bind(dt.q.instance.game.broadcaster,Xn.Y1.ShowHUD,Xn.HG.HUD))}openWorldMapFromHUD(){this.menuFactory.map()}openWorldMapForDifficultyMode(q){Wg.i.setDifficultyMode(q)}openWorldMapWithZoneLockCutscene(){this.menuFactory.map({disableClose:!0,disableZoneGoals:!0}).activateZoneLockCutscene()}openMessageWithLocalizationKey(q){this.menuFactory.message(this._localizer.getText(q))}openMessageWithLocalizationKeyAndArgs(q,...K){this.menuFactory.message(this._localizer.getText(q,...K))}openBattlePassMenu(){var q;const K=this.getInjectedValue(ms.XU.ToasterNotificationId);this.menuFactory.battlePassMenu(this._originId,this._originType,null!==(q=this._closeCallback)&&void 0!==q?q:void 0,K)}openBattlePassUltimateMemberUpsellModal(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.menuFactory.battlePassUltimateMemberUpsellModal().then((()=>this._onMenuClosed.dispatch())).catch(X.RQr.createHandler("Error opening battle pass ultimate member upsell modal from the legacy menu factory component."))}))}openLootDashMenu(){this.menuFactory.lootDashMenu({originId:this._originId,originType:this._originType})}openDynamicStore(q,K){const z=null!=q?q:this._storeKey,Y=null!=K?K:this._storeScrollToSection;this.menuFactory.dynamicStore({closeCallback:this._onMenuClosed.dispatch.bind(this._onMenuClosed),origin:{originType:this._originType,originId:this._originId},storeKey:z,scrollToSection:Y})}openNicknamer(){const q=dt.q.instance.prodigy.gameContainer.get("3b0-2652"),K=dt.q.instance.prodigy.world.getCurrentZone().replace("_hard",""),z=q.isAvailable(K)?q.getNicknameData(K):[];this.menuFactory.nicknamer(z,this._player.playerContainer,K)}showMessageWithLocalizationKey(q){this.menuFactory.message(this._localizer.getText(q))}openDifficultySelector(){this.menuFactory.difficultySelector((()=>this._onMenuClosed.dispatch())).catch(X.RQr.createHandler("Error opening difficulty selector from the legacy menu factory component."))}openDifficultySelectorConfirmationModal(q){const K=null!=q?q:this.getInjectedValue(Il._l);K?this.menuFactory.difficultySelectorConfirmationModal(K):X.VyI.log("LegacyMenuFactoryComponent: Failed to find get the difficulty mode via injected value",X.$bb.Error)}openArchiveEntranceMenu(){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.prodigy.open.archiveEntranceMenu(Yt.A_.ARCHIVES,(()=>{this._onMenuClosed.dispatch()}))}))}openYourMailMenu(){this.menuFactory.mailer()}openNetworkErrorPopup(){this.menuFactory.networkError((()=>{this._onMenuClosed.dispatch()}))}destroy(){this._closeCallback=null,this._onMenuClosed.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],bO.prototype,"_originId",void 0),(0,Q.Cg)([(0,X.gfw)(wi.$N),(0,Q.Sn)("design:type",String)],bO.prototype,"_originType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],bO.prototype,"_storeKey",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],bO.prototype,"_storeScrollToSection",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],bO.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],bO.prototype,"_player",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],bO.prototype,"_onMenuClosed",void 0),bO=(0,Q.Cg)([(0,X.EVk)("LegacyMenuFactory",X.YH6.ui)],bO);z(29281);let pO=class extends X.uAl{assignScrollToSection(q){this._scrollToSection=q}assignButtonCallback(q){q&&this._goNowButton.onInputUp.add((()=>{dt.q.instance.prodigy.open.dynamicStore({storeKey:q,scrollToSection:this._scrollToSection,origin:{originType:wi.$N.WizardWatch,originId:Us.k.WizardWatchButton}})}))}};(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],pO.prototype,"_goNowButton",void 0),pO=(0,Q.Cg)([(0,X.EVk)("WizardWatchAdItem")],pO);var vO;z(31091);let gO=vO=class extends X.uAl{constructor(){super(...arguments),this.onPlayerAppearanceUpdated=new X.HN0}create(){super.create(),this._metricsManager.sendOnboardingFunnelEvent(lh.l.LoadGame),this._metricsManager.sendOnboardingFunnelEvent(lh.l.CreateCharacter),this._loggedInPlayer.player.saveEnabled=!1,this._loggedInPlayer.player.appearance.setName(null),this.randomizeAppearance()}randomizeAppearance(){const q=JE.createSeeded(Date.now()),K=vO.HAIR_STYLES[q.getIntegerInRange(0,vO.HAIR_STYLES.length-1)],z=vO.HAIR_COLORS[q.getIntegerInRange(0,vO.HAIR_COLORS.length-1)],Y=q.getRealInRange(0,1)>.5,Q=Math.floor(3*q.getRealInRange(0,1))+1,X=Math.floor(2*q.getRealInRange(0,1))+4;this._loggedInPlayer.player.setDefault(Y?X:Q,K,z),this._loggedInPlayer.player.forceSaveCharacter(),this.onPlayerAppearanceUpdated.dispatch(this._loggedInPlayer.getAppearance())}onCharacterCreateComplete(){var q;const K=this._loggedInPlayer.player.getPlayerData();delete K.reset,K.school="none",null!==(q=K.startDate)&&void 0!==q||(K.startDate=(new Date).getTime());[lh.l.CustomizeCharacter,lh.l.SelectLocation,lh.l.CompleteSignup].forEach((q=>{this._metricsManager.sendOnboardingFunnelEvent(q)})),this._loggedInPlayer.player.forceSaveCharacter()}destroy(){this.onPlayerAppearanceUpdated.dispose(),super.destroy()}};gO.SKIN_COLORS=[1,2,3,4,5,14],gO.EYE_COLORS=[1,2,3,4,6,8],gO.HAIR_COLORS=[1,2,3,4,5,6],gO.HAIR_STYLES=[5,10,20,41,37,53],(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],gO.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],gO.prototype,"onPlayerAppearanceUpdated",void 0),(0,Q.Cg)([(0,X.Cdj)("a92-c640"),(0,Q.Sn)("design:type",Object)],gO.prototype,"_metricsManager",void 0),gO=vO=(0,Q.Cg)([(0,X.EVk)("CharacterCreate",et.Y.uiCharCreate)],gO);let mO=class extends X.uAl{init(q,K=null,z=null){this._button.onEnabledClick.add(K),this.gameObject.findComponentsInChildren(si._).forEach((K=>{K.sprite.tint=q})),z&&this.gameObject.findComponentsInChildren(X.EYj).forEach((q=>{q.GameObject.active=!0,q.text=z.toString()}))}};var yO,_O;(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],mO.prototype,"_button",void 0),mO=(0,Q.Cg)([(0,X.EVk)("CharacterPaletteButton",et.Y.uiCharCreate)],mO),function(q){q.EyeColor="eyeColor",q.SkinColor="skinColor",q.HairColor="hairColor",q.HairStyle="hairStyle"}(_O||(_O={}));let EO=yO=class extends X.uAl{constructor(){super(...arguments),this.paletteType=_O.EyeColor,this.onPlayerAppearanceUpdated=new X.HN0,this._paletteKeys=[]}setTitle(q){this._textKey.setLocalizationKey(q)}init(){switch(this.paletteType){case _O.EyeColor:this._paletteKeys=gO.EYE_COLORS;break;case _O.SkinColor:this._paletteKeys=gO.SKIN_COLORS;break;case _O.HairColor:this._paletteKeys=gO.HAIR_COLORS;break;case _O.HairStyle:this._paletteKeys=gO.HAIR_STYLES}const q=dt.q.instance.prodigy.gameContainer.get("983-05a7");this._paletteKeys.forEach(((K,z)=>{q.loadWithDependenciesFromGUID(Gt.l.CharacterPaletteButton,null).then((q=>{q.parent=this._grid.GameObject,this._grid.updateAll(!0);const Y=this.getPaletteTint(K);q.findComponentInChildren(mO).init(Y,this.changeVisuals.bind(this,K),this.paletteType===_O.HairStyle?z+1:null)})).catch(X.RQr.createHandler("[Character Palette Selector] Error loading the character palette button"))}))}getPaletteTint(q){if(this.paletteType===_O.HairStyle)return yO.HAIRSTYLE_TINT;const K=Object.values(_O).indexOf(this.paletteType);return Zc.TZ.rgbArrayToHex(ae.t.getItemData(this.paletteType,q).colors[K])}changeVisuals(q){const K=this._playerDataProvider.player;switch(this.paletteType){case _O.EyeColor:K.appearance.setEyeColor(q);break;case _O.SkinColor:K.appearance.setSkinColor(q);break;case _O.HairColor:K.appearance.setHair(null,q);break;case _O.HairStyle:K.appearance.setHair(q)}this.onPlayerAppearanceUpdated.dispatch(this._playerDataProvider.getAppearance())}destroy(){this.onPlayerAppearanceUpdated.dispose(),super.destroy()}};EO.HAIRSTYLE_TINT=548722,(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],EO.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.gfw)(_O),(0,Q.Sn)("design:type",String)],EO.prototype,"paletteType",void 0),(0,Q.Cg)([(0,X.MnK)(X.JTA),(0,Q.Sn)("design:type",X.JTA)],EO.prototype,"_grid",void 0),(0,Q.Cg)([(0,X.MnK)(Cs.R),(0,Q.Sn)("design:type",Cs.R)],EO.prototype,"_textKey",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],EO.prototype,"onPlayerAppearanceUpdated",void 0),EO=yO=(0,Q.Cg)([(0,X.EVk)("CharacterPaletteSelector",et.Y.uiCharCreate)],EO);var wO=z(73722),TO=z(80974);let SO=class extends X.uAl{constructor(){super(),this.onServerSelected=new X.HN0,this.openWorld=yt.throttle(this.openWorld,1e3,{trailing:!1})}openWorld(){this.setHomeOrSchool()||this.chooseServer(!1,!1)}setHomeOrSchool(q,K){if(this._servers){const z=new TO.H(this._servers,this.chooseServer.bind(this),q,K);return wO.V.instance.isInitComplete()||(wO.V.instance.selectedLocation="school"),z.applyServerSelectMode(),!0}return!1}chooseServer(q,K){K||(this.onServerSelected.dispatch(),dt.q.instance.prodigy.world.enter().catch(X.RQr.createHandler("Error entering world")))}destroy(){this.onServerSelected.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("InitData-servers"),(0,Q.Sn)("design:type",Array)],SO.prototype,"_servers",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],SO.prototype,"onServerSelected",void 0),SO=(0,Q.Cg)([(0,X.EVk)("OpenServerSelect",et.Y.uiCharCreate),(0,Q.Sn)("design:paramtypes",[])],SO);z(47878);var AO=z(79998);let CO=class extends X.uAl{constructor(){super(...arguments),this._rarityBackground=AO.u.Pet_card_bg_bw,this._rarity=fo.E.Common,this._rarityTintMap=Object.assign({[-1]:12500670},Zc.Hh),this._rarityStrokeMap={[-1]:"#766685",[fo.E.Common]:"#766685",[fo.E.Uncommon]:"#477251",[fo.E.Rare]:"#505796",[fo.E.Heroic]:"#812A93",[fo.E.Legendary]:"#AE0000"},this._rarityImageMap={[-1]:AO.u.Pet_card_bg_bw,[fo.E.Common]:AO.u.Pet_card_bg_common,[fo.E.Uncommon]:AO.u.Pet_card_bg_uncommon,[fo.E.Rare]:AO.u.Pet_card_bg_rare,[fo.E.Heroic]:AO.u.Pet_card_bg_heroic,[fo.E.Legendary]:AO.u.Pet_card_bg_legendary}}changeStrokeMap(q){this._rarityStrokeMap=q,this.updateGraphic()}changeTintMap(q){this._rarityTintMap=q,this.updateGraphic()}changeImageMap(q){this._rarityImageMap=q,dt.q.instance.prodigy.load.isFileLoaded(this._rarityImageMap[this._rarity])?this.updateGraphic():this.loadAssets()}changeRarity(q){this._rarity=q,dt.q.instance.prodigy.load.isFileLoaded(this._rarityImageMap[this._rarity])?this.updateGraphic():this.loadAssets()}loadAssets(){const q=Object.values(this._rarityImageMap);dt.q.instance.prodigy.load.assetsAsPromise(q).then((()=>{this.updateGraphic()})).catch((q=>{X.VyI.log("Failed to load images on rarity graphic state component",X.$bb.Error)}))}updateGraphic(){const q={[ms.Wg.RarityGraphic]:this._rarityImageMap[this._rarity],[ms.Wg.RarityTint]:this._rarityTintMap[this._rarity],[ms.Wg.RarityStroke]:this._rarityStrokeMap[this._rarity]};Ht.d.updateInjectedValues(this.gameObject,q)}};(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],CO.prototype,"_rarityBackground",void 0),(0,Q.Cg)([(0,X.gfw)(fo.E),(0,Q.Sn)("design:type",Number)],CO.prototype,"_rarity",void 0),(0,Q.Cg)([(0,X.npj)(),(0,Q.Sn)("design:type",Object)],CO.prototype,"_rarityTintMap",void 0),(0,Q.Cg)([(0,X.npj)(),(0,Q.Sn)("design:type",Object)],CO.prototype,"_rarityStrokeMap",void 0),(0,Q.Cg)([(0,X.npj)(),(0,Q.Sn)("design:type",Object)],CO.prototype,"_rarityImageMap",void 0),CO=(0,Q.Cg)([(0,X.EVk)("RarityGraphicState")],CO);var OO=z(93375);let IO=class extends X.uAl{};(0,Q.Cg)([(0,X.gfw)(OO.f),(0,Q.Sn)("design:type",String)],IO.prototype,"hudStyle",void 0),IO=(0,Q.Cg)([(0,X.EVk)("HUDStyle",et.Y.ui)],IO);let DO=class extends X.uAl{constructor(){super(...arguments),this.onStandardHUDStyle=new X.HN0,this.onHouseHUDStyle=new X.HN0,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.checkHUDStyle()}checkHUDStyle(){const q=dt.q.instance.prodigy.game.state.getCurrentState(),K=q instanceof ww.c?q:null,z=X.wa5.getActiveScene().gameObjects.find((q=>q.findComponentInChildren(IO))),Y=null==z?void 0:z.findComponentInChildren(IO);switch(K?K.hudMenuStyle:null==Y?void 0:Y.hudStyle){case void 0:X.VyI.log("HUDStyleGuardComponent could not determine HUD Style; current screen does not appear to have a HUD",X.$bb.Warning);break;case OO.f.House:this.onHouseHUDStyle.dispatch();break;case OO.f.Standard:default:this.onStandardHUDStyle.dispatch()}}destroy(){this.onStandardHUDStyle.dispose(),this.onHouseHUDStyle.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],DO.prototype,"onStandardHUDStyle",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],DO.prototype,"onHouseHUDStyle",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],DO.prototype,"_runOnCreate",void 0),DO=(0,Q.Cg)([(0,X.EVk)("HUDStyleGuard",et.Y.ui)],DO);let RO=class extends X.uAl{constructor(){super(...arguments),this._kennelSizeThreshold=3}create(){super.create(),!this.checkPlayerHasUpgradedPet()&&this.checkPlayerHasHitPetThreshold()?(this._petMenuNotificationDown.active=!0,this._petMenuNotificationUp.active=!0):(this._petMenuNotificationDown.active=!1,this._petMenuNotificationUp.active=!1)}checkPlayerHasHitPetThreshold(){var q,K;return(null===(K=null===(q=this._currentPlayer)||void 0===q?void 0:q.player.kennel)||void 0===K?void 0:K.getPets().length)>=this._kennelSizeThreshold}checkPlayerHasUpgradedPet(){return this._breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_PET_UPGRADE_FTUE,Es.B.BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME)}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],RO.prototype,"_petMenuNotificationDown",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],RO.prototype,"_petMenuNotificationUp",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],RO.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("fa1-8ec9"),(0,Q.Sn)("design:type",fh.F)],RO.prototype,"_breadcrumbManager",void 0),RO=(0,Q.Cg)([(0,X.EVk)("HUDPetMenuNotifier",et.Y.ui)],RO);let PO=class extends X.uAl{postCreate(){const q=Object.create(null,{postCreate:{get:()=>super.postCreate}});return(0,Q.sH)(this,void 0,void 0,(function*(){q.postCreate.call(this),dt.q.instance.prodigy.game.broadcaster.addAppListener(Xn.H3.MembershipResponseReceived,this.handleMembershipChange,this),this.updateHudMembershipFromCacheData()}))}updateHudMembershipFromCacheData(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2");this.updateHudButtons(q.getMembershipUpsell())}handleMembershipChange(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2"),K=yield q.fetchMembershipUpsell();this.updateHudButtons(K)}))}updateHudButtons(q){var K,z;if(X.Aq$.isDefined(this.memberButton)&&X.Aq$.isDefined(this.ultimateMemberButton)&&X.Aq$.isDefined(this.coreMemberButton)&&X.Aq$.isDefined(this.plusMemberButton)&&X.Aq$.isDefined(this.ultraMemberButton)){if(Xs.D.isFeatureEnabled()){if(!Fd.x.isFeatureEnabled()){const Y=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getMemberTier();this.memberButton.active=!1,this.ultimateMemberButton.active=!1,this.coreMemberButton.active=!Qs.pF.isNativeApp()&&Y===Vs._$.NonMember,this.plusMemberButton.active=Qs.pF.isNativeApp()&&(Y===Vs._$.NonMember||Y===Vs._$.MemberCore)||!Qs.pF.isNativeApp()&&Y===Vs._$.MemberCore&&(null===(K=null==q?void 0:q.upgradeOptions)||void 0===K?void 0:K.length)>0,this.ultraMemberButton.active=!Qs.pF.isNativeApp()&&Y===Vs._$.MemberPlus&&(null===(z=null==q?void 0:q.upgradeOptions)||void 0===z?void 0:z.length)>0}}else{const K=(q.tier===Vs._$.MemberLevelUp||q.tier===Vs._$.MemberUltimateMath||q.tier===Vs._$.MemberCore||q.tier===Vs._$.MemberPlus)&&q.upgradeOptions.length>0;this.memberButton.active=!K&&q.tier===Vs._$.NonMember,this.ultimateMemberButton.active=K,this.coreMemberButton.active=!1,this.plusMemberButton.active=!1,this.ultraMemberButton.active=!1}this._grid.updateAll()}}destroy(){dt.q.instance.prodigy.game.broadcaster.removeAppListener(Xn.H3.MembershipResponseReceived,this),super.destroy()}};(0,Q.Cg)([(0,X.MnK)(X.JTA),(0,Q.Sn)("design:type",X.JTA)],PO.prototype,"_grid",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],PO.prototype,"memberButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],PO.prototype,"ultimateMemberButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],PO.prototype,"coreMemberButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],PO.prototype,"plusMemberButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],PO.prototype,"ultraMemberButton",void 0),PO=(0,Q.Cg)([(0,X.EVk)("HUDMembershipButtonComponent",et.Y.ui)],PO);z(28832),z(29853),z(5679),z(52211);var MO=z(53671),NO=z(21574),xO=z(96989);let LO=class extends X.uAl{constructor(){super(...arguments),this.onPetMergeSuccess=new X.HN0,this._willPetLevelOnMerge=!1}setup(q,K){this.mergeModalCloseCallback=K,this._petData=q,this.updateMergeProperties()}updateMergeProperties(){var q,K,z;const Y=uo.P8.canPlayerAccessPetMergeFeature(this._activePlayer),Q=(null!==(q=uo.P8.getPetDisplayMergeRank(this._petData.ID,this._petData.uniqueID))&&void 0!==q?q:Sl.qd.MIN)>=Sl.qd.MAX;this.mergeBar.setup(this._petData,Y);let Z={requiredIngredientsCount:0,validPetIngredientCount:0,mergeRecipe:void 0};Q||(Z=yd.r.getMergeIngredientInfo(this._petData),this._willPetLevelOnMerge=null!==(K=Z.willLevelOnMerge)&&void 0!==K&&K,xO.Y.isMerge2Recipe(Z.mergeRecipe)&&(this._merge2LevelRequirement=Z.mergeRecipe.requiredLevel)),X.Aq$.isDefined(this._merge2LevelRequirement)&&this._petData.level=Z.requiredIngredientsCount),this.mergeButton.regenerateButton(),this.mergeButton.GameObject.active=Y&&!Q,this.mergeNotAvailableText.GameObject.active=!Y;const J=Y&&Q;if(this.duplicateText.GameObject.active=J,J){const q=Math.max(0,this._activePlayer.kennel.amountOfPet(this._petData.ID)-1);this.duplicateText.text=this._localizer.getText("PET_DETAILS_PET_DUPLICATES",q)}if(!Y){const q=null!==(z=NO.g.config.minimumPlayerLevel)&&void 0!==z?z:0;this.mergeNotAvailableText.text=this._localizer.getText("PET_SCREEN_GET_LEVEL_TO_MERGE",q)}}onPetMergeClicked(){if(this.mergeButton.isButtonEnabled){dt.q.instance.prodigy.open.petMergeMenu(this._petData,wi.k.PetBook,(()=>{this.onPetMergeSubMenuClosed()})).onPetMergeSuccess.add((q=>{this.onPetMergeSuccess.dispatch(q,this._willPetLevelOnMerge)}))}else this.mergeButton.inputEnabled&&X.Aq$.isDefined(this._merge2LevelRequirement)&&(this._tooltip.GameObject.active=!0,this._tooltip.body=this._localizer.getText("MERGE_LEVEL_REQUIREMENT_TOOLTIP_DESCRIPTION",this._merge2LevelRequirement))}onPetMergeSubMenuClosed(){this.updateMergeProperties(),this.mergeModalCloseCallback&&this.mergeModalCloseCallback()}destroy(){this.onPetMergeSuccess.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],LO.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],LO.prototype,"mergeNotAvailableText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],LO.prototype,"duplicateText",void 0),(0,Q.Cg)([(0,X.MnK)(MO.J),(0,Q.Sn)("design:type",MO.J)],LO.prototype,"mergeBar",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],LO.prototype,"mergeButton",void 0),(0,Q.Cg)([(0,Qi.b)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],LO.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],LO.prototype,"_buttonSparkles",void 0),(0,Q.Cg)([(0,X.MnK)(SC.tX),(0,Q.Sn)("design:type",SC.tX)],LO.prototype,"_tooltip",void 0),LO=(0,Q.Cg)([(0,X.EVk)("MergeWidgetController")],LO);let kO=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.onTabSelected=this.createTidySignal()}get toggle(){return this._toggle}get data(){return this._data}init(q){this.toggle.setSelected(!0),this.toggle.inputEnabled=!0,this._data=q,this.addListenerToSignal(this.toggle.onSelected,(()=>this.onTabSelected.dispatch(this._data))),X.Aq$.isDefined(this.labelComponent)&&(this.labelComponent.text=q.label),X.Aq$.isDefined(this.graphicComponent)&&this.graphicComponent.updateAsset(q.iconId,q.iconFrame)}};(0,Q.Cg)([(0,X.Pqz)(ft.l),(0,Q.Sn)("design:type",ft.l)],kO.prototype,"_toggle",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],kO.prototype,"labelComponent",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],kO.prototype,"graphicComponent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],kO.prototype,"onTabSelected",void 0),kO=(0,Q.Cg)([(0,X.EVk)("NavigationTab")],kO);let BO=class extends X.uAl{setup(q){var K;this._statName.text=q.name,this._statValue.text=q.value,this._statIcon.updateAsset(q.iconAtlasId,q.iconAsset),this._chargedTier1Background.active=q.chargedEffectTier===Yn.Bv.CHARGED,this._chargedTier2Background.active=q.chargedEffectTier===Yn.Bv.MAX_CHARGE,this._background.active=null!==(K=q.showBackground)&&void 0!==K&&K,this._chargedTier1Background.active=q.chargedEffectTier===Yn.Bv.CHARGED,this._chargedTier2Background.active=q.chargedEffectTier===Yn.Bv.MAX_CHARGE,this._statGearBoost.GameObject.active=q.hasAnyGearBoost,q.hasAnyGearBoost&&(this._statGearBoost.text=q.gearBoost)}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],BO.prototype,"_statName",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],BO.prototype,"_statValue",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],BO.prototype,"_statGearBoost",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],BO.prototype,"_statIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],BO.prototype,"_chargedTier1Background",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],BO.prototype,"_chargedTier2Background",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],BO.prototype,"_background",void 0),BO=(0,Q.Cg)([(0,X.EVk)("PetInfoStat",et.Y.uiPetMenu)],BO);let UO=class extends X.uAl{setup(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=Math.abs(this._statsGrid.sizeDelta.height)/q.length;yield this._prefabLoader.preloadFromGUIDWithDependencies(this._statPrefab);for(let z=0;zq.destroyDeferred())),Promise.all(this._tabs.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return[yield this._prefabLoader.loadWithDependenciesFromGUID(this._tabPrefab,this._tabsContainerObject),q]}))))).then((q=>{q.forEach((([K,z],Y)=>{var Q;const Z=K.findComponent(kO);if(X.Aq$.isDefined(Z)){null===(Q=this._toggleGroup)||void 0===Q||Q.addSelectable(Z.toggle),z.onTabSelected&&this.addListenerToSignal(Z.onTabSelected,z.onTabSelected.bind(this)),Z.init(z);const K=""!==this._currentTabKey&&this._currentTabKey===z.key||""===this._currentTabKey&&this._defaultSelectedTabIndex===Y;Z.toggle.setSelected(K),1===q.length&&(Z.toggle.inputEnabled=!1)}}))})).catch(X.RQr.createHandler("There was an error creating the tabs")))}setPetStatsData(){this._statsPrefab&&this._tabsContainerObject&&(this._contentObject.children.forEach((q=>q.destroyDeferred())),this._prefabLoader.loadWithDependenciesFromGUID(this._statsPrefab,this._contentObject).then((q=>{const K=q.findComponent(UO);K?this.updateStats(K):X.VyI.log("Failed to find PetInfoStatTab component in statsPrefab",X.$bb.Error)})).catch(X.RQr.createHandler("Failed to load statsPrefab")))}updatePetInfo(){const q=this._tabs.find((q=>q.key===this._currentTabKey));(null==q?void 0:q.onTabSelected)&&q.onTabSelected()}updateStats(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this._currentTabKey=this._statsTabData.key;const K=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=ae.t.getItem("pet",this._petData.ID),Y=uo.P8.isPetOnTeam(this._petData)&&K.getChargedLevel()>0,Q=Y?zn.e.getActivePlayerChargedLevelTier():Yn.Bv.NO_CHARGE,X=Y?this._petData.level+K.getChargedLevel():this._petData.level,Z=uo.P8.getBattleStats(z,X,this._petData.uniqueID),J=yield this.getPetGearBoosts(),tt=Object.values(J).some((q=>q>0)),et=this._statDisplayConfigs.map((q=>{var K,z;return{name:this._localizer.getText(q.labelLocalizedKey),value:null!==(z=null===(K=Z[q.stat])||void 0===K?void 0:K.toString())&&void 0!==z?z:"",gearBoost:J[q.stat]&&J[q.stat]>0?`+${J[q.stat]}`:"",iconAsset:q.iconAsset,chargedEffectTier:Q,iconAtlasId:q.iconAtlasId,hasAnyGearBoost:tt}}));yield q.setup(et)}))}getPetGearBoosts(){return(0,Q.sH)(this,void 0,void 0,(function*(){return dd.I.getStatsOfEquippedGearForPet(this._petData.gear)}))}setPetLoreData(){this._currentTabKey=this._loreTabData.key,this._statsPrefab&&this._tabsContainerObject&&(this._contentObject.children.forEach((q=>q.destroyDeferred())),this._prefabLoader.loadWithDependenciesFromGUID(this._lorePrefab,this._contentObject).then((()=>this.updateLoreData())).catch((q=>{var K;X.VyI.log("Failed to load descriptionPrefab",X.$bb.Error),X.VyI.log(null===(K=null==q?void 0:q.toString)||void 0===K?void 0:K.call(q),X.$bb.Error)})))}updateLoreData(){const q=ae.t.getItem("pet",this._petData.ID),K={[ms.hi.YourPetInfoLoreText]:this._localizer.getText(`${q.type}_${q.ID}_FLAVORTEXT`.toUpperCase())};Ht.d.updateInjectedValues(this.gameObject,K)}};(0,Q.Cg)([(0,X.Cdj)("9cf-c09f"),(0,Q.Sn)("design:type",rd.q)],FO.prototype,"_gearManager",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],FO.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.i0J)(X.Z$z.Prefab),(0,Q.Sn)("design:type",String)],FO.prototype,"_tabPrefab",void 0),(0,Q.Cg)([(0,X.i0J)(X.Z$z.Prefab),(0,Q.Sn)("design:type",String)],FO.prototype,"_statsPrefab",void 0),(0,Q.Cg)([(0,X.i0J)(X.Z$z.Prefab),(0,Q.Sn)("design:type",String)],FO.prototype,"_lorePrefab",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],FO.prototype,"_defaultSelectedTabIndex",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],FO.prototype,"_tabsContainerObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],FO.prototype,"_contentObject",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],FO.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,Qi.b)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],FO.prototype,"_activePlayer",void 0),FO=(0,Q.Cg)([(0,X.EVk)("PetInfoWidgetController")],FO);let GO=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this._spellIndex=-1,this.onCardSelectedSignal=this.createTidySignal(),this.onCardDeselectedSignal=this.createTidySignal(),this._isUnlocked=!1}setup(q,K){this._petData=q,this.updateSpellCard().catch(X.RQr.createHandler)}updateSpellCard(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K;if(!this.GameObject)return;if(this._spellIndex<0)return void X.VyI.log("SpellIndex unset or invalid.",X.$bb.Error);const z=ae.t.getItem("pet",this._petData.ID).data.spells.find((q=>q.slot===this._spellIndex+1)),Y=null!==(q=null==z?void 0:z.level)&&void 0!==q?q:0;if(Y>uo.P8.getMaxOwnableLevel(this._petData.ID,this._petData.mergeRank))return void(this.gameObject.active=!1);this.gameObject.active=!0,this._isUnlocked=null!==(K=z&&this._petData.level>=z.level)&&void 0!==K&&K;const Q=ae.t.getItem("spellV2",z.id),Z=Q.data,J=Q.metadata,tt=this.isOneUseSpell(Z)?Z.warmup:Z.cooldown,et=this.isOneUseSpell(Z)?Z.cooldown:tt-Z.cooldown;this._spellLevel.text=(0,Is.k)("LEADERBOARD_CLASS_LEVEL_SHORT",Y),this._spellElementIcon.updateAsset(ti._.Ui_battle_revamp_json,`icon-mini-element-${Z.element}`),this._lockedState.active=!this._isUnlocked;const it=yield this.loadIcon(J,this._isUnlocked),st={SPELLCARD_COLOR_STATE:this._isUnlocked?Z.element:"cooldown",SPELLCARD_COOLDOWN_BARS_TOTAL:tt,SPELLCARD_COOLDOWN_BARS_CURRENT:et,SPELLCARD_COOLDOWN_1:this.getCooldownBarColor(et,1,Z),SPELLCARD_COOLDOWN_2:this.getCooldownBarColor(et,2,Z),SPELLCARD_COOLDOWN_3:this.getCooldownBarColor(et,3,Z),SPELLCARD_CENTRE_ICON:it,SPELLCARD_MINI_ICON:[ti._.Ui_battle_revamp_json,`icon-mini-element-${this._isUnlocked?Z.element:`${Z.element}-cooldown`}`]};this.GameObject&&!this.GameObject.isDestroyed&&Ht.d.updateInjectedValues(this.GameObject,st,!1)}))}isOneUseSpell(q){return-1===q.cooldown}loadIcon(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=this.getSpellIcon(q,K);return new Promise((q=>{dt.q.instance.prodigy.load.assets([z],(()=>{q(z)}))}))}))}getSpellIcon(q,K){var z,Y;const Q=K?"":"_cooldown";return(null===(Y=null===(z=q.assets)||void 0===z?void 0:z.icon)||void 0===Y?void 0:Y.assetKey)?As.q[`${Vt.$.capitalizeFirstLetter(q.assets.icon.assetKey)}${Q}`]:As.q.Spell_fire_fireball_single}getCooldownBarColor(q,K,z){let Y="cooldown";return this.isOneUseSpell(z)?Y="disabled":q>=K&&(Y=z.element===In.EElementType.Astral?`${In.EElementType.Astral}${K}`:z.element),mu.k[Vt.$.capitalizeFirstLetter(Y)]}onCardSelected(){this.onCardSelectedSignal.dispatch(this),this._tooltipInOutAnimation.runInTween(),this._highLight.active=!0}onCardDeselected(){this.onCardDeselectedSignal.dispatch(this),this._tooltipInOutAnimation.runOutTween(),this._highLight.active=!1}};(0,Q.Cg)([(0,X.g11)(),(0,X.YLv)("Index of the spell this component represents"),(0,Q.Sn)("design:type",Number)],GO.prototype,"_spellIndex",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],GO.prototype,"_highLight",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],GO.prototype,"_spellElementIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],GO.prototype,"_spellLevel",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],GO.prototype,"_lockedState",void 0),(0,Q.Cg)([(0,X.MnK)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],GO.prototype,"_toolTip",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],GO.prototype,"onCardSelectedSignal",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],GO.prototype,"onCardDeselectedSignal",void 0),(0,Q.Cg)([(0,X.MnK)(Qw.s),(0,Q.Sn)("design:type",Qw.s)],GO.prototype,"_tooltipInOutAnimation",void 0),GO=(0,Q.Cg)([(0,X.EVk)("SpellsWidgetCard")],GO);let jO=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this._cards=[],this._currentCardSelected=null}setup(q){this._petData=q,this._cards=this.gameObject.findComponentsInChildren(GO);for(const K of this._cards)K.setup(this._petData),K.onCardSelectedSignal.add(this.onCardSelected.bind(this)),K.onCardDeselectedSignal.add(this.onCardDeselected.bind(this))}updateCards(q){this._petData=q;for(const K of this._cards)K.setup(this._petData)}onCardSelected(q){null!==this._currentCardSelected&&this._currentCardSelected.onCardDeselected(),this._currentCardSelected=q}onCardDeselected(q){this._currentCardSelected===q&&(this._currentCardSelected=null)}};jO=(0,Q.Cg)([(0,X.EVk)("SpellsWidgetController")],jO);var $O;z(63086);!function(q){q.bossID="PREBATTLE_POPUP_BOSS_ID",q.mapID="PREBATTLE_POPUP_MAP_ID",q.zoneID="PREBATTLE_POPUP_ZONE_ID",q.isDoorBlocking="PREBATTLE_POPUP_IS_DOOR_BLOCKING",q.name="PREBATTLE_POPUP_NAME",q.banner="PREBATTLE_POPUP_BANNER",q.mapIcon="PREBATTLE_POPUP_MAP_ICON",q.descriptionLocalizationKey="PREBATTLE_POPUP_DESCRIPTION_LOCALIZATION_KEY",q.descriptionArg="PREBATTLE_POPUP_DESCRIPTION_ARG"}($O||($O={}));let HO=class extends Tf.l{canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=dt.q.instance.prodigy.gameContainer,z=K.get("11f-118a"),Y=K.get("782-c308"),Q=null===(q=null==Y?void 0:Y.data)||void 0===q?void 0:q.lastUnmetBattleRequirements;return gh.A.isDefined(null==Q?void 0:Q.featureRequirements)&&z.meetsRequirementsDeprecated(Q.featureRequirements)}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this);const K=dt.q.instance.prodigy.gameContainer.get("782-c308").data.lastUnmetBattleRequirements;dt.q.instance.prodigy.open.prefabMenu(Gt.l.PrebattlePopup,(()=>this.onClose.dispatch()),void 0,void 0,void 0,{[$O.bossID]:K.bossID,[$O.zoneID]:K.zoneID,[$O.mapID]:K.mapID,[$O.isDoorBlocking]:K.isDoorBlocking},{interfaceName:ws.B.RestrictedBattleCallbackScreen,interfaceType:wi.Wm.Modal,originType:wi.$N.BattleRestrictionsMet,instanceType:Ti.N.UI,custom:{instance_id:Vt.$.generateUID(),restrictions:K.featureRequirements}},!0),Po.a.resetPlayerLastUnmetBattleRequirements()}))}};HO=(0,Q.Cg)([(0,X.EVk)("OpenPrebattlePopup",et.Y.uiDialog)],HO);const VO={14:{banner:"replay-unlock-gerald",nootTextKey:"GERALD_QUEST_POPUP_DESCRIPTION"},16:{banner:"replay-unlock-icewyrm",nootTextKey:"ICE_WYRM_QUEST_POPUP_DESCRIPTION"},13:{banner:"replay-unlock-cebollini",nootTextKey:"CEBOLLINI_QUEST_POPUP_DESCRIPTION"},15:{banner:"replay-unlock-oldone",nootTextKey:"OLD_ONE_QUEST_POPUP_DESCRIPTION"},12:{banner:"replay-unlock-nastycloud",nootTextKey:"NASTY_CLOUD_QUEST_POPUP_DESCRIPTION"},54:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"GERALD_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},55:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"ICE_WYRM_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},56:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"CEBOLLINI_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},57:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"OLD_ONE_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},58:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"NASTY_CLOUD_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},37:{banner:"replay-unlock-pippet",nootTextKey:"PIPPET_QUEST_POPUP_DESCRIPTION"},59:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"PUPPET_MASTER_FINAL_QUEST_POPUP_DESCRIPTION"}};let WO=class extends Yi.z{create(){super.create(),this.bindContext()}bindContext(){var q,K,z,Y;const Q=ae.t.getItem("boss",this.bossID);if(!Q)return;let Z;Z=(null===(q=Q.data)||void 0===q?void 0:q.category)===ki.GJ.Wizard&&Q.ID!==ki.JT?((q,K)=>{const z=K?"CLOAKED_WIZARD_BLOCKING_POPUP_DESCRIPTION":"CLOAKED_WIZARD_POPUP_DESCRIPTION",Y=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("CLOAKED_WIZARD");return{nootTextKey:z,banner:q===jf.a.Physical||q===jf.a.Astral?"replay-unlock-cloaked-wizard":`replay-unlock-cloaked-wizard-${q}`,name:Y}})(null===(K=Q.data)||void 0===K?void 0:K.affinity,this.isDoorBlocking):VO[this.bossID],this.updateValue($O.name,null!==(z=null==Z?void 0:Z.name)&&void 0!==z?z:null===(Y=Q.data)||void 0===Y?void 0:Y.name),this.updateValue($O.banner,null==Z?void 0:Z.banner),this.updateValue($O.descriptionLocalizationKey,null==Z?void 0:Z.nootTextKey),this.updateValue($O.descriptionArg,Wg.i.getZoneName(this.zoneID)),this.updateValue($O.mapIcon,`icon-zone-${Wg.i.getZoneTagForZoneId(this.zoneID)||this.zoneID.replace(/_hard|_expert/,"")}`)}};(0,Q.Cg)([(0,X.Cdj)($O.bossID),(0,Q.Sn)("design:type",Number)],WO.prototype,"bossID",void 0),(0,Q.Cg)([(0,X.Cdj)($O.mapID),(0,Q.Sn)("design:type",String)],WO.prototype,"mapID",void 0),(0,Q.Cg)([(0,X.Cdj)($O.zoneID),(0,Q.Sn)("design:type",String)],WO.prototype,"zoneID",void 0),(0,Q.Cg)([(0,X.Cdj)($O.isDoorBlocking),(0,Q.Sn)("design:type",Boolean)],WO.prototype,"isDoorBlocking",void 0),WO=(0,Q.Cg)([(0,X.EVk)("PrebattlePopupComponent",et.Y.uiDialog)],WO);z(88217);var qO=z(48842);let KO=class extends Yi.z{constructor(){super(...arguments),this.NEWLY_RESCUED_STAMP_INTERVAL_MS=300}create(){super.create(),this._context.Container.bind("PET_ZONE_CARD_IS_RESCUED").toConstantValue(null),this._context.Container.bind("PET_ZONE_CARD_ICON_ID").toConstantValue(null),this._context.Container.bind("PET_ZONE_CARD_RESCUED_STAMP_DELAY").toConstantValue(null)}destroy(){this.unbindContext(),super.destroy()}bindContext(){this._petId=this._context.Container.get("ELEMENT_VIEW_DATA");const q=this.getRescuedStampDelay(),K=X.Aq$.isDefined(q),z=this._context.Container.get("PET_ZONE_MENU_STATE")===qO.SB.InZone;this._context.Container.rebind("PET_ZONE_CARD_IS_RESCUED").toConstantValue(this.isPetOwned()&&!z||this.isPetOwned()&&z&&!K),this._context.Container.rebind("PET_ZONE_CARD_ICON_ID").toConstantValue(this.getPetIconName()),z&&this._context.Container.rebind("PET_ZONE_CARD_RESCUED_STAMP_DELAY").toConstantValue(q),this.gameObject.findComponentsInChildren(Wo.B).forEach((q=>q.consume())),this.gameObject.active=!0}unbindContext(){this._context.Container.unbind("PET_ZONE_CARD_IS_RESCUED"),this._context.Container.unbind("PET_ZONE_CARD_ICON_ID"),this._context.Container.unbind("PET_ZONE_CARD_RESCUED_STAMP_DELAY");const q=this.gameObject.findComponentInChildren(si._);q&&(q.sprite.key=null),this.gameObject.active=!1}isPetOwned(){return X.Aq$.isDefined(dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.encounters.getPetFirstRescuedDate(this._petId))}getRescuedStampDelay(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.newPetRescueData.newRescuedPets[dt.q.instance.prodigy.world.getCurrentZone()];if(q){const K=q.findIndex((q=>q===this._petId));return-1===K?null:K*this.NEWLY_RESCUED_STAMP_INTERVAL_MS}return null}getPetIconName(){return Ts.E.getIconForType("pet",this._petId)}};KO=(0,Q.Cg)([(0,X.EVk)("PetGridDataProvider",et.Y.uiPetsInZones)],KO);z(41968);let zO=class extends X.uAl{constructor(){super(...arguments),this.obfuscateOnCreate=!0,this.obfuscationCharacter="*",this._isObfuscated=!1}create(){this._originalText=this._targetText.text,this.obfuscateOnCreate&&this.toggleObfuscation()}toggleObfuscation(){this._targetText.text=this._isObfuscated?this._originalText:this.obfuscationCharacter.repeat(this._originalText.length),this._isObfuscated=!this._isObfuscated}setOriginalText(q){this._originalText=q,this._isObfuscated?this._targetText.text=this.obfuscationCharacter.repeat(this._originalText.length):this._targetText.text=this._originalText}};(0,Q.Cg)([(0,X.Pqz)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],zO.prototype,"_targetText",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],zO.prototype,"obfuscateOnCreate",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],zO.prototype,"obfuscationCharacter",void 0),zO=(0,Q.Cg)([(0,X.EVk)("TextObfuscationComponent",X.YH6.ui)],zO);var YO=z(21644);let QO=class extends X.uAl{setupButtonCallback(){{const q=YO.p1[this._unifiedStoreButton];let K;if(q){const z=(0,YO.Bi)(q);z?K=()=>{dt.q.instance.prodigy.open.store(z,void 0,void 0,{originType:wi.$N.ButtonClick})}:"customCallback"in q?K=q.customCallback:(q.name,X.VyI.log(`The unified store button: ${q.name} has no associated action.`,X.$bb.Error))}K&&this._button.onClick.add(K)}}};(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],QO.prototype,"_button",void 0),(0,Q.Cg)([(0,X.gfw)(YO.Uh),(0,Q.Sn)("design:type",String)],QO.prototype,"_unifiedStoreButton",void 0),QO=(0,Q.Cg)([(0,X.EVk)("UnifiedStoreButton",et.Y.uiUnifiedStore)],QO);let XO=class extends X.uAl{postCreate(){super.postCreate();const q=(0,yt.cloneDeep)(YO.ju);Xg._.hasDefeatedPetStore()&&q.unshift(YO.Uh.OpenDynamicStore),this._gridLayout&&q.forEach((q=>{var K,z,Y,Q;const Z=YO.p1[q],J=new X._mx,tt=J.addComponent(X.XVE);tt.setAnchorMin(0,0),tt.setAnchorMax(0,0),tt.setPivot(0,0);const et=J.addComponent(X.bE_);et.Container.bind(ms.zw.UnifiedStoreButton).toConstantValue(q),et.Container.bind(ms.zw.UnifiedStoreButtonName).toConstantValue(Z.name),et.Container.bind(ms.zw.UnifiedStoreButtonImageFrame).toConstantValue(Z.imageFrame),et.Container.bind(ms.zw.UnifiedStoreButtonIconFrame).toConstantValue(Z.iconFrame),et.Container.bind(ms.zw.UnifiedStoreSegmentButtonName).toConstantValue(null!==(z=null===(K=Z.segmentData)||void 0===K?void 0:K[ms.zw.UnifiedStoreSegmentButtonName])&&void 0!==z?z:Z.name),et.Container.bind(ms.zw.UnifiedStoreSegmentDestinationName).toConstantValue(null!==(Q=null===(Y=Z.segmentData)||void 0===Y?void 0:Y[ms.zw.UnifiedStoreSegmentDestinationName])&&void 0!==Q?Q:void 0),this._prefabLoader.loadWithDependenciesFromGUID(Gt.l.UnifiedStoreButton,J).catch(X.RQr.createHandler(`Failed to load unified store button prefab for the button named ${Z.name}.`)),this._gridLayout.GameObject.addChild(J)}))}};(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],XO.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.MnK)(X.JTA),(0,Q.Sn)("design:type",X.JTA)],XO.prototype,"_gridLayout",void 0),XO=(0,Q.Cg)([(0,X.EVk)("UnifiedStoreButtonGrid",et.Y.uiUnifiedStore)],XO);var ZO=z(49569);let JO=class extends X.uAl{open(){const{enabled:q}=(0,Kt.G)(ZO.Y);if(q)return void dt.q.instance.prodigy.open.dynamicStore({origin:{originType:wi.$N.HudClick,originId:Us.k.UnifiedStore}});const K=this._currentPlayer.player.data.zone,z=Object.values(YO.p1).find((q=>q.zone&&(null==K?void 0:K.includes(q.zone))));let Y;z&&(Y=(0,YO.Bi)(z)),Y?dt.q.instance.prodigy.open.store(Y,void 0,void 0,{interfaceType:wi.Wm.Shop,instanceType:Ti.N.ShopVisit,originType:wi.$N.HudClick}):dt.q.instance.prodigy.open.prefabMenu(Gt.l.UnifiedStoreBase,void 0,!0,!1,!0,void 0,{interfaceName:ws.B.UnifiedStoreBase,interfaceType:wi.Wm.Menu,originType:wi.$N.HudClick,originID:Us.k.UnifiedStore,instanceType:Ti.N.Interface},!0,!1,void 0,!0)}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],JO.prototype,"_currentPlayer",void 0),JO=(0,Q.Cg)([(0,X.EVk)("UnifiedStoreHudButton",et.Y.uiUnifiedStore)],JO);let tI=class extends X.uAl{constructor(){super(...arguments),this.canBake=!0,this.bakeOnCreate=!0,this._defaultRenderComponent=null,this._originalTexture=null}create(){super.create(),this.setUpTextureFunctions(),this.bakeOnCreate&&this.bakeTexture()}setUpTextureFunctions(){this._defaultRenderComponent instanceof si._?(this._setTextureFunction=this.setImageTexture,this._getTextureFunction=this.getImageTexture):this._defaultRenderComponent instanceof X.vYh&&(this._setTextureFunction=this.setGraphicTexture,this._getTextureFunction=this.getGraphicTexture)}findObjectFilters(){return this.gameObject.findComponentsInChildren(pd.b).reduce(((q,K)=>(q.push(...K.filterList),q)),[])}bakeTexture(){var q,K,z;if(!this.canBake)return;const Y=this.findObjectFilters(),Q=[new X.dbg];Q[0].filters=Y,this._originalTexture=null!==(K=null===(q=this._getTextureFunction)||void 0===q?void 0:q.call(this))&&void 0!==K?K:null,this._originalTexture?(this._bakeTexture=new X.X2n(this._originalTexture,Q),null===(z=this._setTextureFunction)||void 0===z||z.call(this,this._bakeTexture)):X.VyI.log("No starting texture found for BakeTextureComponent",X.$bb.Warning)}unbakeTexture(){var q;this._originalTexture&&(null===(q=this._setTextureFunction)||void 0===q||q.call(this,this._originalTexture)),this.destroyTexture()}destroyTexture(){var q;null===(q=this._bakeTexture)||void 0===q||q.destroy()}getImageTexture(){const q=this._defaultRenderComponent;return dt.q.instance.game.cache.getTexture(q.getImageKey(),q.getFrame())}setImageTexture(q){this._defaultRenderComponent.sprite.setTexture(q)}setGraphicTexture(q){this._defaultRenderComponent.setTexture(q)}getGraphicTexture(){const q=this._defaultRenderComponent;return dt.q.instance.game.cache.getTexture(q.atlasKey,q.frame)}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],tI.prototype,"canBake",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],tI.prototype,"bakeOnCreate",void 0),(0,Q.Cg)([(0,X.Pqz)(X.y4o),(0,Q.Sn)("design:type",X.y4o)],tI.prototype,"_defaultRenderComponent",void 0),tI=(0,Q.Cg)([(0,X.EVk)("BakeTexture",et.Y.ui)],tI);let eI=class extends X.uAl{create(){super.create(),this._button&&this._button.onInputDown.add(this.playSFX,this)}destroy(){this._button.onInputDown.removeAll(this),super.destroy()}playSFX(){this._button.getButtonState()===nf.K.Disabled?this._disabledSoundEffect.playSFX():this._buttonSoundEffect.playSFX()}};(0,Q.Cg)([(0,X.MnK)(ga),(0,Q.Sn)("design:type",ga)],eI.prototype,"_buttonSoundEffect",void 0),(0,Q.Cg)([(0,X.MnK)(ga),(0,Q.Sn)("design:type",ga)],eI.prototype,"_disabledSoundEffect",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],eI.prototype,"_button",void 0),eI=(0,Q.Cg)([(0,X.EVk)("ButtonStateSoundEffect",et.Y.ui)],eI);z(47287);let iI=class extends X.uAl{updateText(q){this._buttonObject.children.forEach((K=>{const z=K.findComponentInChildren(Cs.R);null==z||z.setLocalizationKey(q)}))}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],iI.prototype,"_buttonObject",void 0),iI=(0,Q.Cg)([(0,X.EVk)("ChangeButtonText",X.YH6.ui)],iI);let sI=class extends X.uAl{constructor(){super(...arguments),this.offset=new X.I9Y(0,0),this._track=!1,this._isTracking=!1}get source(){return this._source}set source(q){this.setUpTracking(!1),this._source=q,this.setUpTracking(this._track)}get track(){return this._track}set track(q){this._track=q,this.setUpTracking(q)}create(){super.create(),this.setUpTracking(this._track)}destroy(){this.track=!1,super.destroy()}copy(){var q;if(!this._source)return null;const K=null!==(q=this.target)&&void 0!==q?q:this.GameObject,z={x:this._source.transform.worldPosition.x+this.offset.x,y:this._source.transform.worldPosition.y+this.offset.y};return K.transform.worldPosition=z,K.transform.localPosition}setUpTracking(q){this._source&&q!==this._isTracking&&(q?this._source.transform.onWorldMatrixChanged.add(this.copy,this):this._source.transform.onWorldMatrixChanged.remove(this.copy,this),this._isTracking=q)}};(0,Q.Cg)([(0,X.ERr)(),(0,X.YLv)("GameObject to copy position from"),(0,Q.Sn)("design:type",X._mx),(0,Q.Sn)("design:paramtypes",[X._mx])],sI.prototype,"source",null),(0,Q.Cg)([(0,X.ERr)(),(0,X.YLv)("GameObject to copy position to (optional)"),(0,Q.Sn)("design:type",X._mx)],sI.prototype,"target",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],sI.prototype,"offset",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean),(0,Q.Sn)("design:paramtypes",[Boolean])],sI.prototype,"track",null),sI=(0,Q.Cg)([(0,X.EVk)("CopyPosition",et.Y.ui,"Copy the position of another `GameObject` when invoking `copy()`")],sI);let nI=class extends X.uAl{create(){super.create(),this._changePageButtons.onPageChanged.add(this.updateText,this),this._changePageButtons.onMaxPageChanged.add(this.updateText,this),this.updateText()}destroy(){this._changePageButtons.onPageChanged.remove(this.updateText,this),this._changePageButtons.onMaxPageChanged.remove(this.updateText,this),super.destroy()}updateText(){this._pageDisplayText.text=this._localizationSystem.getText(this._currentPageLocalizationKey,this._changePageButtons.currentPage,this._changePageButtons.maximumPage)}};(0,Q.Cg)([(0,X.MnK)(UC.a),(0,Q.Sn)("design:type",UC.a)],nI.prototype,"_changePageButtons",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],nI.prototype,"_currentPageLocalizationKey",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],nI.prototype,"_pageDisplayText",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],nI.prototype,"_localizationSystem",void 0),nI=(0,Q.Cg)([(0,X.EVk)("CurrentPageDisplay",et.Y.uiPagination)],nI);let aI=class extends X.uAl{constructor(){super(...arguments),this._texts=[],this._nonFadeTimeMs=2500,this._fadeInTimeMs=2500,this._fadeOutTimeMs=2500,this._currentTextIndex=0}startCycle(){0!==this._texts.length?(this._currentTextIndex=0,this._texts.forEach((q=>{q.alpha=0})),this._texts[0].alpha=1,this.waitOnCurrentText()):X.VyI.log("MemberJarCyclingText: Texts array is empty",X.$bb.Warning)}waitOnCurrentText(){this._nonFadeTimer=dt.q.instance.game.time.create(!1),this._nonFadeTimer.addTimer(this._nonFadeTimeMs,this.fadeOutCurrentText,this),this._nonFadeTimer.start()}fadeOutCurrentText(){const q=this._texts[this._currentTextIndex];this._activeTween=dt.q.instance.game.add.tween(q,this).to({alpha:0},this._fadeOutTimeMs,X.GS3.Linear.None,!0),this._activeTween.onTweenComplete.addOnce((()=>{this._activeTween=null,this.fadeInNextText()}))}fadeInNextText(){this._currentTextIndex=(this._currentTextIndex+1)%this._texts.length;const q=this._texts[this._currentTextIndex];this._activeTween=dt.q.instance.game.add.tween(q,this).to({alpha:1},this._fadeInTimeMs,X.GS3.Cubic.InOut,!0),this._activeTween.onTweenComplete.addOnce((()=>{this._activeTween=null,this.waitOnCurrentText()}))}destroy(){this._activeTween&&(dt.q.instance.game.tweens.remove(this._activeTween),this._activeTween=null),dt.q.instance.game.time.destroy(this._nonFadeTimer),this._nonFadeTimer=null,super.destroy()}};(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",Array)],aI.prototype,"_texts",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aI.prototype,"_nonFadeTimeMs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aI.prototype,"_fadeInTimeMs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aI.prototype,"_fadeOutTimeMs",void 0),aI=(0,Q.Cg)([(0,X.EVk)("CyclingText",et.Y.ui)],aI);var rI=z(82366);let oI=class extends X.y4o{constructor(){super(...arguments),this._pageCount=1,this._currentPage=0,this._dotRadius=5,this._dotSpacing=10,this._selectedPageColor="#8c8c8c",this._selectedPageAlpha=1,this._unselectedPageColor="#cccccc",this._unselectedPageAlpha=1,this._pageTransitionTimeMs=500,this._pageDots=[]}create(){super.create(),this.setRootContainer(new Ze.Container),this.createPageDot(),this.setPageCount(this._pageCount),this.setCurrentPage(this._currentPage,0)}destroy(){this._pageDotTexture.destroy(),super.destroy()}getDimensions(){return new X.or0(this._totalWidth,2*this._dotRadius)}setPageCount(q){for(;this._pageDots.length>q;)this._pageDots.pop().destroy();const K=this.getRootContainer();for(;this._pageDots.length{Q.tint=Zc.TZ.lerpRgb(Q.tintValue,K,q.percent)})).start()}}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],oI.prototype,"_pageCount",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],oI.prototype,"_currentPage",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],oI.prototype,"_dotRadius",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],oI.prototype,"_dotSpacing",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],oI.prototype,"_selectedPageColor",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],oI.prototype,"_selectedPageAlpha",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],oI.prototype,"_unselectedPageColor",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],oI.prototype,"_unselectedPageAlpha",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],oI.prototype,"_pageTransitionTimeMs",void 0),oI=(0,Q.Cg)([(0,X.EVk)("DotPagination",et.Y.uiPagination)],oI);z(28829),z(96304);var hI=z(23365);let cI=class extends hI.s{constructor(){super(...arguments),this._durationMS=1e3,this._repeatCount=0,this.onHexCodeStringUpdate=new X.HN0,this.onHexCodeNumberUpdate=new X.HN0}startTween(){super.startTween(),this.doTween(this._from,this._to)}startTweenReverse(){super.startTween(),this.doTween(this._to,this._from)}doTween(q,K){const z="number"==typeof q?X.Q1f.numberToHexString(q).slice(0,-2):q,Y="number"==typeof K?X.Q1f.numberToHexString(K).slice(0,-2):K;if(this.dispatchColorUpdate(z),!this._tween){const q={value:z};this._tween=X.W$e.instance.game.add.tween(q,this).to({value:Y},this._durationMS,rC.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{if(q.value.startsWith("rgba")){const K=q.value.match(/\d+/g),z=Zc.TZ.rgbToHex(parseInt(K[0]),parseInt(K[1]),parseInt(K[2]));this.dispatchColorUpdate(X.Q1f.numberToHexString(z).slice(0,-2))}})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this.dispatchColorUpdate(Y),this.onComplete.dispatch()}))}}dispatchColorUpdate(q){this.onHexCodeStringUpdate.dispatch(q),this.onHexCodeNumberUpdate.getBindingsCount()>0&&this.onHexCodeNumberUpdate.dispatch(X.Q1f.hexToRGB(q))}destroy(){this.onHexCodeStringUpdate.dispose(),this.onHexCodeNumberUpdate.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],cI.prototype,"_from",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],cI.prototype,"_to",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],cI.prototype,"_durationMS",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],cI.prototype,"_repeatCount",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],cI.prototype,"onHexCodeStringUpdate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],cI.prototype,"onHexCodeNumberUpdate",void 0),cI=(0,Q.Cg)([(0,X.EVk)("HexColorCodeTween")],cI);var dI;z(68239);let lI=dI=class extends X.uAl{set rarity(q){this.setupBannerWithRarity(q)}create(){super.create(),this.setupBannerWithRarity(this._rarity)}setupBannerWithRarity(q){this._rarity=q,this._bannerText.text=dI.RARITY_LOCALIZATION_KEYS[q],this._bannerText.fill=dI.FONT_COLOURS[q],this._bannerBackerCommon.active=q===fo.E.Common,this._bannerBackerUncommon.active=q===fo.E.Uncommon,this._bannerBackerRare.active=q===fo.E.Rare,this._bannerBackerHeroic.active=q===fo.E.Heroic,this._bannerBackerLegendary.active=q===fo.E.Legendary}};lI.FONT_COLOURS={[fo.E.Common]:"#363636",[fo.E.Uncommon]:"#363636",[fo.E.Rare]:"#FFFFFF",[fo.E.Heroic]:"#FFFFFF",[fo.E.Legendary]:"#363636"},lI.RARITY_LOCALIZATION_KEYS={[fo.E.Common]:"RARITY_COMMON",[fo.E.Uncommon]:"RARITY_UNCOMMON",[fo.E.Rare]:"RARITY_RARE",[fo.E.Heroic]:"RARITY_HEROIC",[fo.E.Legendary]:"RARITY_LEGENDARY"},(0,Q.Cg)([(0,X.gfw)(fo.E),(0,Q.Sn)("design:type",Number)],lI.prototype,"_rarity",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],lI.prototype,"_bannerText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lI.prototype,"_bannerBackerCommon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lI.prototype,"_bannerBackerUncommon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lI.prototype,"_bannerBackerRare",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lI.prototype,"_bannerBackerHeroic",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lI.prototype,"_bannerBackerLegendary",void 0),lI=dI=(0,Q.Cg)([(0,X.EVk)("ItemRarityBanner",X.YH6.ui)],lI);var uI;z(79424),z(89192);let fI=uI=class extends X.y4o{constructor(){super(...arguments),this._spinnerSpeed=3,this.onStateAvailable=new X.HN0}get spinningTween(){return this._spinningTween}create(){super.create();{const q=this._spinnerSpeed>=0?360:-360,K=uI.BASE_SPINNING_TIME_MS/Math.abs(this._spinnerSpeed);this._spinningTween=dt.q.instance.game.add.tween(this._spinnerImage.GameObject.transform,this).to({localRotation:q},K,X.GS3.Linear.None,!0,0,-1),this._hideFadeTime>0&&this.hide(this._hideFadeTime)}}destroy(){this._spinningTween&&(this._spinningTween.stop(),dt.q.instance.game.tweens.remove(this._spinningTween)),this._spinningTween=null,this.onStateAvailable.dispose(),super.destroy()}hide(q){dt.q.instance.game.add.tween(this._spinnerImage,this._spinnerImage).to({alpha:0},q,X.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.onStateAvailable.dispatch()}))}show(q){dt.q.instance.game.add.tween(this._spinnerImage,this._spinnerImage).to({alpha:1},q,X.GS3.Linear.None,!0)}};fI.BASE_SPINNING_TIME_MS=1e3,(0,Q.Cg)([(0,X.MnK)(X.y4o),(0,Q.Sn)("design:type",X.y4o)],fI.prototype,"_spinnerImage",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],fI.prototype,"_spinnerSpeed",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],fI.prototype,"_hideFadeTime",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],fI.prototype,"onStateAvailable",void 0),fI=uI=(0,Q.Cg)([(0,X.EVk)("LoadingSpinner",et.Y.ui)],fI);z(56617);let bI=class extends At._{constructor(){super(...arguments),this.localizedText=new X.HN0}destroy(){this.localizedText.dispose(),super.destroy()}localize(q=this.key){const K=this.localizer.getText(q);return this.localizedText.dispatch(K),K}getData(){return this.localizer.getText(this.key)}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],bI.prototype,"localizer",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],bI.prototype,"key",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],bI.prototype,"localizedText",void 0),bI=(0,Q.Cg)([(0,X.EVk)("Localizer",et.Y.utility)],bI);let pI=class extends X.uAl{create(){super.create(),this._imageAndQuantityQuantity=this._imageAndQuantityRoot.findComponentInChildren(X.EYj)}setData(q){if(this._drop=q,q){Wa.l.removeAll(this._imageOnlyImage.legacyTransform.group,!0),Wa.l.removeAll(this._imageAndQuantityImage.legacyTransform.group,!0);const K=q.N>1;this._imageOnlyRoot.active=!K,this._imageAndQuantityRoot.active=K;const z=K?this._imageAndQuantityImage:this._imageOnlyImage;if(q.image){const[K,Y]=kC.y.toInjectionParams(q.image);dt.q.instance.prodigy.create.sprite(0,0,K,Y,void 0,(q=>{q.smoothed=!0,z.legacyTransform.group.addChild(q)}))}else dt.q.instance.prodigy.icon.createFromDataAdvanced(q,z.legacyTransform.group,0,0).then((([q,K])=>X.qFr.setSmoothed(K.texture,!0))).catch(X.RQr.createHandler(`LootCardWithQuantityComponent: Failed to create item icon ${q.type}-${q.ID}`));K&&(this._imageAndQuantityQuantity.text=q.N.toString())}}getData(){return this._drop}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pI.prototype,"_imageOnlyRoot",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pI.prototype,"_imageOnlyImage",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pI.prototype,"_imageAndQuantityRoot",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pI.prototype,"_imageAndQuantityImage",void 0),pI=(0,Q.Cg)([(0,X.EVk)("LootCardWithQuantityComponent",et.Y.adventureUi)],pI);z(90614),z(43714);let vI=class extends hI.s{constructor(){super(...arguments),this._from=0,this._to=1,this._durationMS=1e3,this._repeatCount=0,this.onUpdate=new X.HN0,this.roundValues=!1}startTween(){if(super.startTween(),!this._tween){const q={value:this._from};this._tween=X.W$e.instance.game.add.tween(q,this).to({value:this._to},this._durationMS,rC.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{const K=this.roundValues?Math.round(q.value):q.value;this.onUpdate.dispatch(K)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween();const q=this.roundValues?Math.round(this._to):this._to;this.onUpdate.dispatch(q),this.onComplete.dispatch()}))}}destroy(){this.onUpdate.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],vI.prototype,"_from",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],vI.prototype,"_to",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],vI.prototype,"_durationMS",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],vI.prototype,"_repeatCount",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vI.prototype,"onUpdate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],vI.prototype,"roundValues",void 0),vI=(0,Q.Cg)([(0,X.EVk)("NumericTween")],vI);z(33744);let gI=class extends X.uAl{constructor(){super(...arguments),this.offset=0,this.clampPosition=!1,this.minPosition=0,this.maxPosition=0}create(){var q;super.create(),this.setContainerPosition(null===(q=this.anchorTarget.fillTransform)||void 0===q?void 0:q.rectTransformDimensions.width),this.anchorTarget.onProgress.add((()=>{var q;this.setContainerPosition(null===(q=this.anchorTarget.fillTransform)||void 0===q?void 0:q.rectTransformDimensions.width)})),this.anchorTarget.onToggleAnchors.add((q=>{this.gameObject.active=q}))}destroy(){var q,K;super.destroy(),null===(q=this.anchorTarget.onProgress)||void 0===q||q.dispose(),null===(K=this.anchorTarget.onToggleAnchors)||void 0===K||K.dispose()}setContainerPosition(q=0){const K=q-(this.isInnerContainer?this.container.rectTransformDimensions.width:0)+this.offset;this.container.posX=this.clampPosition?X.cj9.clamp(K,this.minPosition,this.maxPosition):K}};(0,Q.Cg)([(0,X.MnK)(mf.a),(0,Q.Sn)("design:type",mf.a)],gI.prototype,"anchorTarget",void 0),(0,Q.Cg)([(0,X.MnK)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],gI.prototype,"container",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],gI.prototype,"offset",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],gI.prototype,"clampPosition",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],gI.prototype,"minPosition",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],gI.prototype,"maxPosition",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],gI.prototype,"isInnerContainer",void 0),gI=(0,Q.Cg)([(0,X.EVk)("ProgressBarAnchor",et.Y.ui)],gI);let mI=class extends X.uAl{constructor(){super(...arguments),this.onFillValueIncrease=new X.HN0,this.onFillValueDecrease=new X.HN0,this.onFillValueUnchanged=new X.HN0,this.onBarFillValueMaxed=new X.HN0}listen(q,K,z){z-K>0?this.onFillValueIncrease.dispatch():z-K<0?this.onFillValueDecrease.dispatch():this.onFillValueUnchanged.dispatch(),z>=1&&this.onBarFillValueMaxed.dispatch()}destroy(){this.onFillValueDecrease.dispose(),this.onFillValueIncrease.dispose(),this.onFillValueUnchanged.dispose(),this.onBarFillValueMaxed.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mI.prototype,"onFillValueIncrease",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mI.prototype,"onFillValueDecrease",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mI.prototype,"onFillValueUnchanged",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],mI.prototype,"onBarFillValueMaxed",void 0),mI=(0,Q.Cg)([(0,X.EVk)("ProgressBarChangeListener",et.Y.ui)],mI);let yI=class extends X.uAl{countAsPercent(q,K,z){this._text.text=`${Math.floor(100*z)}%`}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],yI.prototype,"_text",void 0),yI=(0,Q.Cg)([(0,X.EVk)("ProgressBarCounter")],yI);var _I;z(34958),z(12408),z(46459),z(41365);!function(q){q[q.None=0]="None",q[q.Value=1]="Value",q[q.Percentage=2]="Percentage",q[q.PercentagePreNormalized=3]="PercentagePreNormalized",q[q.Rounded=4]="Rounded",q[q.OneDecimal=5]="OneDecimal"}(_I||(_I={}));let EI=class extends X.uAl{constructor(){super(...arguments),this.valueDisplay=_I.Value,this.updateOnSettingChange=!1}postCreate(){var q,K;super.postCreate(),this._setting=Yb.B[this.settingType],void 0!==this._setting?(this._setting.onChanged.add(this.onSettingChange,this),this.label.text=this.getInjectedValue(X.$Bt.LocalizationService).getText(this._setting.data.name),this.slider.minValue=null!==(q=this._setting.data.minValue)&&void 0!==q?q:0,this.slider.maxValue=null!==(K=this._setting.data.maxValue)&&void 0!==K?K:this._setting.data.defaultValue,this.slider.value=this._setting.value,this.slider.onValueChanged.add(this.onSliderChange,this),this.updateValueText(),this.slider.value=this._setting.value):X.VyI.log(`SettingSlider: postCreate: setting is undefined, no setting named ${this.settingType} found`,X.$bb.Error)}destroy(){var q;null===(q=this._setting)||void 0===q||q.onChanged.remove(this.onSettingChange,this),this.slider.onValueChanged.remove(this.onSliderChange,this),this._setting=void 0,super.destroy()}updateValueText(){var q,K;if(!this.valueText)return;if(this.valueDisplay===_I.None)return void(this.valueText.GameObject.active=!1);this.valueText.GameObject.active=!0;const z=null!==(K=null===(q=this._setting)||void 0===q?void 0:q.value)&&void 0!==K?K:0;switch(this.valueDisplay){case _I.Value:this.valueText.text=z.toString();break;case _I.Percentage:this.valueText.text=`${Math.round(100*this.slider.normalizedValue)}%`;break;case _I.PercentagePreNormalized:this.valueText.text=`${Math.round(100*this.slider.value)}%`;break;case _I.Rounded:this.valueText.text=Math.round(z).toString();break;case _I.OneDecimal:this.valueText.text=z.toFixed(1)}}onSliderChange(q){void 0!==this._setting?(this._setting.setStoredValue(q),this.updateValueText()):X.VyI.log(`SettingSlider: onSliderChange: setting is undefined, no setting named ${this.settingType} found`,X.$bb.Error)}onSettingChange(q){this.updateOnSettingChange&&this.slider.value!==q&&(this.slider.value=q)}};(0,Q.Cg)([(0,X.gfw)(Yb._),(0,Q.Sn)("design:type",String)],EI.prototype,"settingType",void 0),(0,Q.Cg)([(0,X.MnK)(Gh.H),(0,Q.Sn)("design:type",Gh.H)],EI.prototype,"slider",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],EI.prototype,"label",void 0),(0,Q.Cg)([(0,X.gfw)(_I),(0,Q.Sn)("design:type",Number)],EI.prototype,"valueDisplay",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],EI.prototype,"valueText",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],EI.prototype,"updateOnSettingChange",void 0),EI=(0,Q.Cg)([(0,X.EVk)("SettingSlider")],EI);var wI=z(95865);let TI=class extends wI.A{constructor(){super(...arguments),this._shakeDurationMs=1e3,this._amplitudeX=0,this._amplitudeY=0,this._repeatCount=0,this._disabled=!1}set disabled(q){this._disabled=q}startTween(){if(super.startTween(),!this._tween&&!this._disabled){const q=this._targetGameObject.transform;(0,wt.v)(!!q,"Cannot be attached to a GameObject without a transform");const K={amplitudeX:0,amplitudeY:0},z={x:q.localPosition.x,y:q.localPosition.y};this._tween=dt.q.instance.game.add.tween(K,this).to({amplitudeX:this._amplitudeX,amplitudeY:this._amplitudeY},this._shakeDurationMs,rC.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{const Y=this._easing===rC.i.LinearNone?this._amplitudeX:K.amplitudeX,Q=this._easing===rC.i.LinearNone?this._amplitudeY:K.amplitudeY;q.setPosition(z.x+Math.random()*Y*2-Y,z.y+Math.random()*Q*2-Q)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),q.setPosition(z.x,z.y),this.onComplete.dispatch()}))}}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],TI.prototype,"_shakeDurationMs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],TI.prototype,"_amplitudeX",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],TI.prototype,"_amplitudeY",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],TI.prototype,"_repeatCount",void 0),TI=(0,Q.Cg)([(0,X.EVk)("ShakeTransform",et.Y.motion)],TI);z(57103);let SI=class extends X.y4o{constructor(){super(...arguments),this._alpha=1,this._tint="#FFFFFF"}set alpha(q){this._alpha=q,this._sprite&&(this._sprite.alpha=q)}get alpha(){return this._alpha}set tint(q){this._tint=q,this._sprite&&(this._sprite.tint=Ze.Color.shared.setValue(q.toLowerCase()).toNumber())}get tint(){return this._tint}create(){super.create(),this._atlas&&this.createTilingSprite().catch(X.RQr.createHandler("Failed to create tiling sprite"))}createTilingSprite(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this.gameObject.transform;if(!(q instanceof X.XVE))return;dt.q.instance.prodigy.load.isFileLoaded(this._atlas)||(yield dt.q.instance.prodigy.load.assetsAsPromise(this._atlas));const K=new Ze.TilingSprite(dt.q.instance.game.cache.getTexture(this._atlas,this._frame),q.fullWidth,q.fullHeight);K.alpha=this._alpha,K.tint=Ze.Color.shared.setValue(this._tint).toNumber(),this._sprite=K,this.setRootContainer(K)}))}getDimensions(){const q=this.getRootContainer();return q?new X.or0(q.width,q.height):X.or0.ZERO}};(0,Q.Cg)([(0,X.W_S)(),(0,X.Bak)(),(0,Q.Sn)("design:type",String)],SI.prototype,"_atlas",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],SI.prototype,"_frame",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],SI.prototype,"_alpha",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],SI.prototype,"_tint",void 0),SI=(0,Q.Cg)([(0,X.EVk)("TiledUISprite",et.Y.ui)],SI);let AI=class extends((0,es.o)(X.y4o)){constructor(){super(...arguments),this._sizeOffset=X.I9Y.ZERO,this._tint="#FFFFFF",this._alpha=1,this._tilePositionSpeed=X.I9Y.ZERO,this._onSpriteLoaded=new X.HN0,this._containerSize=new X.or0,this._listenerCreated=!1}postCreate(){super.postCreate(),this.createBackground()}update(){if(super.update(),null!=this._tileSprite){const q=dt.q.instance.game.time.deltaMS/1e3;this._tileSprite.tilePosition.x+=this._tilePositionSpeed.x*q,this._tileSprite.tilePosition.y+=this._tilePositionSpeed.y*q}}destroy(){this._onSpriteLoaded.dispose(),this._container.destroy(),super.destroy()}getDimensions(){return this._containerSize.setTo(this._container.width,this._container.height),this._containerSize}createBackground(){this.createTiledBackground().catch((q=>{X.VyI.log(`There was an error creating a tiled background:\n${q}`,X.$bb.Error)}))}createTiledBackground(){return(0,Q.sH)(this,void 0,void 0,(function*(){dt.q.instance.prodigy.load.isFileLoaded(this._tilingGraphic)||(yield this._assetLoader.loadAssets([this._tilingGraphic])),null!=this._tileSprite&&(this._container.removeChild(this._tileSprite),this._tileSprite.destroy(),this._tileSprite=null);const q=dt.q.instance.game.cache.getTexture(this._tilingGraphic),K=this.GameObject.transform.rectTransformDimensions;null!=q&&(this._tileSprite=new Ze.TilingSprite(q,K.width+this._sizeOffset.x,K.height+this._sizeOffset.y),this._tileSprite.tint=Ze.utils.string2hex(this._tint),this._tileSprite.alpha=this._alpha,null==this._container&&(this._container=dt.q.instance.game.add.container(),this.setRootContainer(this._container)),this._container.addChild(this._tileSprite)),this._listenerCreated||(this.addListenerToSignal(this._rectTransform.onDimensionsChanged,this.createBackground.bind(this)),this._listenerCreated=!0),this._onSpriteLoaded.dispatch()}))}};(0,Q.Cg)([(0,X.Cdj)(X.t5G.AssetLoader),(0,Q.Sn)("design:type",Ji.A)],AI.prototype,"_assetLoader",void 0),(0,Q.Cg)([(0,X.Pqz)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],AI.prototype,"_rectTransform",void 0),(0,Q.Cg)([(0,X.i0J)(X.Z$z.SingleImage),(0,Q.Sn)("design:type",String)],AI.prototype,"_tilingGraphic",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],AI.prototype,"_sizeOffset",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],AI.prototype,"_tint",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],AI.prototype,"_alpha",void 0),(0,Q.Cg)([(0,X._Hz)(),(0,Q.Sn)("design:type",X.I9Y)],AI.prototype,"_tilePositionSpeed",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],AI.prototype,"_onSpriteLoaded",void 0),AI=(0,Q.Cg)([(0,X.EVk)("TilingSprite",X.YH6.ui,"Tiles a graphic contained inside the object RectTransform")],AI);let CI=class extends X.uAl{postCreate(){super.postCreate(),this.text.text="Interact for test log messages",this.slider.onValueChanged.add((()=>{this.text.text=`Slider: ${this.slider.value.toString()}`}))}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],CI.prototype,"text",void 0),(0,Q.Cg)([(0,X.MnK)(Gh.H),(0,Q.Sn)("design:type",Gh.H)],CI.prototype,"slider",void 0),CI=(0,Q.Cg)([(0,X.EVk)("UI Test",X.YH6.ui)],CI);var OI,II=z(89360),DI=z(25286),RI=z(3119),PI=z(8096);let MI=OI=class extends X.uAl{constructor(){super(...arguments),this.onProgressReceived=new X.HN0,this.onTimeRemaining=new X.HN0,this.onItemDataReceived=new X.HN0,this.paramSwapItemData=new X.HN0,this.onMemberItemDataReceived=new X.HN0,this.paramSwapMemberItemData=new X.HN0,this.onSplashImageReceived=new X.HN0,this.onPreviousDataExists=new X.HN0,this.onAllDataReceived=new X.HN0,this.onAutoSurface=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.getWeeklyChallengeData()}getWeeklyChallengeData(){this._waitingForLoad&&(this._waitingForLoad.active=!1),II.h.instance.getData().then((q=>{var K,z,Y,Q;if(!(null==q?void 0:q.weeklyChallengeData))throw new Error("Data object is undefined.");if(!q.weeklyChallengeData.currentChallenge)throw new Error("No current challenge exists.");this._waitingForLoad&&(this._waitingForLoad.active=!0);const Z=q.weeklyChallengeData.currentChallenge.progressCount,J=q.weeklyChallengeData.currentChallenge.goalCount;this.onProgressReceived.dispatch(Z,J);const tt=q.weeklyChallengeData.timeRemaining;this.onTimeRemaining.dispatch(tt);const et=null===(K=q.weeklyChallengeData.previousChallenge)||void 0===K?void 0:K.reward.default.ID,it=null===(z=q.weeklyChallengeData.previousChallenge)||void 0===z?void 0:z.reward.default.type,st=null===(Y=q.weeklyChallengeData.previousChallenge)||void 0===Y?void 0:Y.reward.member.ID,nt=null===(Q=q.weeklyChallengeData.previousChallenge)||void 0===Q?void 0:Q.reward.member.type,at=q.weeklyChallengeData.currentChallenge.reward.default.ID,rt=q.weeklyChallengeData.currentChallenge.reward.default.type,ot=q.weeklyChallengeData.currentChallenge.reward.member.ID,ht=q.weeklyChallengeData.currentChallenge.reward.member.type,ct=q.weeklyChallengeData.previousChallenge&&q.weeklyChallengeData.previousChallenge.progressCount>=q.weeklyChallengeData.previousChallenge.goalCount&&!this.checkRewardOwned(it,et,nt,st)&&dt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_WEEKLY_CHALLENGE,Es.B.BREADCRUMB_FIRST_CHALLENGE_COMPLETE);ct?(this.onItemDataReceived.dispatch(it,et),this.onMemberItemDataReceived.dispatch(nt,st),this.paramSwapItemData.dispatch(et,it),this.paramSwapMemberItemData.dispatch(st,nt)):(this.onItemDataReceived.dispatch(rt,at),this.onMemberItemDataReceived.dispatch(ht,ot),this.paramSwapItemData.dispatch(at,rt),this.paramSwapMemberItemData.dispatch(ot,ht));let lt=!1;if(Z>=J&&this.checkRewardOwned(rt,at,ht,ot)&&(lt=!0),lt&&-1===q.weeklyChallengeData.timeRemaining)throw new Error("No future challenge exists.");this.onAllDataReceived.dispatch(Z,J,tt,q.isTransition,lt,ct);const ut=q.weeklyChallengeData.currentChallenge.splashImage;if(X.Aq$.isDefined(ut)&&ut.length>0&&this.onSplashImageReceived.dispatch(q.weeklyChallengeData.currentChallenge.splashImage),ct){const q=dt.q.instance.prodigy.open.findMenuByType(RI.o);null==q||q.forceClose(),this.onPreviousDataExists.dispatch()}lt||ct||this.checkAutoSurface()})).catch((q=>{X.VyI.log(`Weekly Challenge feature is disabled. WeeklyChallengeDataComponent found no data: ${X.RQr.stringify(q)}`,X.$bb.Verbose),this._disableOnError&&(this._disableOnError.active=!1)}))}checkRewardOwned(q,K,z,Y){const Q="dorm"===q?this._player.player.house.getOwned(K)>0:this._player.player.backpack.hasItem(q,K)>0,X="dorm"===z?this._player.player.house.getOwned(Y)>0:this._player.player.backpack.hasItem(z,Y)>0;return Q||X}checkAutoSurface(){if(OI._isSessionCountUpdated)return;if(dt.q.instance.prodigy.open.isMenuOpen(DI.g)||dt.q.instance.prodigy.open.isMenuOpen(RI.o)||dt.q.instance.prodigy.open.isMenuOpen(PI.a))return;OI._isSessionCountUpdated=!0;const q=this._player.player.data;if(X.Aq$.isDefined(q.weeklySessionTimestamp)||(q.weeklySessionTimestamp=0),X.Aq$.isDefined(q.weeklySessionCount)){Xp.R.getISOWeekNumber(q.weeklySessionTimestamp)===Xp.R.getISOWeekNumber(Date.now())?q.weeklySessionCount+=1:q.weeklySessionCount=0}else q.weeklySessionCount=0;II.h.instance.autoSurfaceSessionInterval>0&&q.weeklySessionCount%II.h.instance.autoSurfaceSessionInterval==0?this.onAutoSurface.dispatch():0===II.h.instance.autoSurfaceSessionInterval&&(re.J.isDateWithinSameDay(new Date,new Date(q.weeklySessionTimestamp))||this.onAutoSurface.dispatch()),q.weeklySessionTimestamp=Date.now(),this._player.player.updated=!0}destroy(){this.onProgressReceived.dispose(),this.onTimeRemaining.dispose(),this.onItemDataReceived.dispose(),this.paramSwapItemData.dispose(),this.onMemberItemDataReceived.dispose(),this.paramSwapMemberItemData.dispose(),this.onSplashImageReceived.dispose(),this.onPreviousDataExists.dispose(),this.onAllDataReceived.dispose(),this.onAutoSurface.dispose(),super.destroy()}};var NI;MI._isSessionCountUpdated=!1,(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],MI.prototype,"_player",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"onProgressReceived",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"onTimeRemaining",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"onItemDataReceived",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"paramSwapItemData",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"onMemberItemDataReceived",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"paramSwapMemberItemData",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"onSplashImageReceived",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"onPreviousDataExists",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"onAllDataReceived",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],MI.prototype,"_waitingForLoad",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],MI.prototype,"_disableOnError",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],MI.prototype,"onAutoSurface",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],MI.prototype,"_runOnLoad",void 0),MI=OI=(0,Q.Cg)([(0,X.EVk)("WeeklyChallengeData",et.Y.data)],MI),function(q){q.Standard="standard",q.Hidden="hidden",q.RewardAvailable="reward_available"}(NI||(NI={}));let xI=class extends X.uAl{constructor(){super(...arguments),this.onRewardUi=new X.HN0,this.onNotRewardUi=new X.HN0,this.uiMode=NI.Standard}updateProgressDisplay(q,K,z=0,Y=!1,Q=!1,Z=!1){this.clearDisplay();const J=Boolean(q>=K);J&&!Q?this.onRewardUi.dispatch():this.onNotRewardUi.dispatch();const tt=Boolean((J&&Y||!J)&&!Q);this._progressBarObject.active=tt,this._timeRemainingObject.active=tt,tt&&(this._timeRemainingTimer&&(z>=0?this._timeRemainingTimer.setCountdownTimeMS(z):this._timeRemainingObject.active=!1),this._progressBar&&(this._progressShineObject.active=Y,Y&&this._shineAnimation.playAnimation(this._shineAnimationName,!1,!0),J?(this._progressBar.setValue(1),this._progressBar.setBarText(dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(this._progressBarCompleteLocalizedTextKey)),this._progressBar.setFillColor(this._progressBarCompleteFillColor),this._progressBar.setOuterColor(this._progressBarCompleteOutlineColor),this._progressBar.setTextOutlineColor(this._progressBarCompleteOutlineColor),Y&&this._claimRewardTimeout.startTimer()):(this._progressBar.setValue(q/K),this._progressBar.setBarText(`${q} / ${K}`)))),!J||Q||Y||this._claimRewardTimeout.onTimeout.dispatch(),this._nextChallengeObject.active=Q,Q&&this._nextChallengeTimer&&(z>=0?this._nextChallengeTimer.setCountdownTimeMS(z):this._nextChallengeObject.active=!1),this.toggleOverlayOnClick(!J&&!Z)}clearDisplay(){this._notificationBadgeObject.active=!1,this._claimRewardObject.active=!1,this._nextChallengeObject.active=!1,this._timeRemainingObject.active=!1,this._progressShineObject.active=!1,this._progressBarObject.active=!1,this._overlayButton.onClick.active=!1,this.uiMode=NI.Standard}shiftHudUi(q){this.uiMode===NI.Hidden&&this._hudUi.transform.setPositionX(q)}toggleOverlayOnClick(q){this._overlayButton.onClick.active=q,this._overlayButton.useHandCursor=q}destroy(){this.onRewardUi.dispose(),this.onNotRewardUi.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.MnK)(Tg.e),(0,Q.Sn)("design:type",Tg.e)],xI.prototype,"_notificationBadge",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],xI.prototype,"_timeRemainingTimer",void 0),(0,Q.Cg)([(0,X.MnK)(Ir.U),(0,Q.Sn)("design:type",Ir.U)],xI.prototype,"_nextChallengeTimer",void 0),(0,Q.Cg)([(0,X.MnK)(Bs.j),(0,Q.Sn)("design:type",Bs.j)],xI.prototype,"_shineAnimation",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],xI.prototype,"_shineAnimationName",void 0),(0,Q.Cg)([(0,X.MnK)(Ds.z),(0,Q.Sn)("design:type",Ds.z)],xI.prototype,"_progressBar",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],xI.prototype,"_progressBarCompleteFillColor",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],xI.prototype,"_progressBarCompleteOutlineColor",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],xI.prototype,"_progressBarCompleteLocalizedTextKey",void 0),(0,Q.Cg)([(0,X.MnK)(Th.E),(0,Q.Sn)("design:type",Th.E)],xI.prototype,"_claimRewardTimeout",void 0),(0,Q.Cg)([(0,X.MnK)(Y.$),(0,Q.Sn)("design:type",Y.$)],xI.prototype,"_overlayButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xI.prototype,"_notificationBadgeObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xI.prototype,"_claimRewardObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xI.prototype,"_nextChallengeObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xI.prototype,"_timeRemainingObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xI.prototype,"_progressShineObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xI.prototype,"_progressBarObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],xI.prototype,"_hudUi",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],xI.prototype,"onRewardUi",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],xI.prototype,"onNotRewardUi",void 0),xI=(0,Q.Cg)([(0,X.EVk)("WeeklyChallengePanelController",X.YH6.ui)],xI);let LI=class extends X.uAl{constructor(){super(...arguments),this._showNotification=new X.HN0,this._hideNotification=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.updateNotification()}destroy(){this._showNotification.dispose(),this._hideNotification.dispose(),super.destroy()}updateNotification(){!this.hasSeenCrystalCaverns()&&this.isCrystalCavernsEnabled()||this.isTitanUnlocked()&&this.isNewTitan()||this.shouldShowAcademyIndicator()||this.shouldShowKeystoneIndicator()?this._showNotification.dispatch():this._hideNotification.dispatch()}hasSeenCrystalCaverns(){return this._breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_DUNGEONS,Es.B.BREADCRUMB_STARTED_CRYSTAL_CAVERNS)}isCrystalCavernsEnabled(){return dt.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableCrystalCaverns",!0)}isNewTitan(){const q=dt.q.instance.prodigy.titansNetworkHandler;return q.isTitanAlive()&&q.isNewTitan()}isTitanUnlocked(){return this._featureRequirements.meetsRequirementsDeprecated(8)}shouldShowAcademyIndicator(){return this._breadcrumbManager.isBreadcrumbComplete(Es.B.BREADCRUMB_UNLOCK_ACADEMY,Es.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE)&&!this._breadcrumbManager.isBreadcrumbComplete(Es.B.BREADCRUMB_UNLOCK_ACADEMY,Es.B.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON)}shouldShowKeystoneIndicator(){return hh.N.anyKeystonesToPlace()&&this._breadcrumbManager.isBreadcrumbComplete(Es.B.FEATURE_ACADEMY_TOWERS,Es.B.BREADCRUMB_ACADEMY_NO_KEYSTONES)}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],LI.prototype,"_showNotification",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],LI.prototype,"_hideNotification",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],LI.prototype,"_runOnLoad",void 0),(0,Q.Cg)([(0,X.Cdj)("11f-118a"),(0,Q.Sn)("design:type",Object)],LI.prototype,"_featureRequirements",void 0),(0,Q.Cg)([(0,X.Cdj)("fa1-8ec9"),(0,Q.Sn)("design:type",fh.F)],LI.prototype,"_breadcrumbManager",void 0),LI=(0,Q.Cg)([(0,X.EVk)("WorldMapButtonNotificationLogic")],LI);var kI;z(45902),z(72849);!function(q){q.Add="add",q.Subtract="subtract",q.Multiply="multiply",q.Divide="divide",q.Remainder="remainder"}(kI||(kI={}));let BI=class extends X.uAl{constructor(){super(...arguments),this.operation=kI.Add,this.operand=1,this.onResult=new X.HN0}run(q){switch(this.operation){default:case kI.Add:return this.onResult.dispatch(q+this.operand);case kI.Subtract:return this.onResult.dispatch(q-this.operand);case kI.Multiply:return this.onResult.dispatch(q*this.operand);case kI.Divide:return this.onResult.dispatch(q/this.operand);case kI.Remainder:return this.onResult.dispatch(q%this.operand)}}destroy(){this.onResult.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.gfw)(kI),(0,Q.Sn)("design:type",String)],BI.prototype,"operation",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],BI.prototype,"operand",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],BI.prototype,"onResult",void 0),BI=(0,Q.Cg)([(0,X.EVk)("Arithmetic",et.Y.utility)],BI);z(80882);var UI=z(88253);let FI=class extends X.uAl{constructor(){super(...arguments),this.runOnCreate=!1,this._watchMode=!1,this._watchInterval=1e3,this.testIsPlaying=!1,this.onCutsceneChange=new X.HN0,this.onIsPlaying=new X.HN0,this.onIsNotPlaying=new X.HN0,this.onStartedPlaying=new X.HN0,this.onStoppedPlaying=new X.HN0,this.onDebugPrintVariables=new X.HN0,this.wasPlaying=!1,this._firstUpdateCalled=!1}get watchMode(){return this._watchMode}set watchMode(q){this._watchMode=q,!this.GameObject.isDestroyed&&this._firstUpdateCalled&&(q?this.startWatchMode():this.stopWatchMode())}create(){super.create(),this.runOnCreate&&(this.check(),this.watchMode&&this.startWatchMode())}firstUpdate(){this._firstUpdateCalled=!0}startWatchMode(){this.stopWatchMode(),this._watchIntervalRefId=setInterval((()=>this.check()),this._watchInterval)}stopWatchMode(){clearInterval(this._watchIntervalRefId)}check(q=!1){const K=UI.M.isCutscenePlaying();this.dispatchSignals(K,q),this.dispatchDebugSignals(),this.wasPlaying=K}dispatchSignals(q,K=!1){(this.wasPlaying!==q||K)&&(this.onCutsceneChange.dispatch(q),q&&this.onIsPlaying.dispatch(),!q&&this.onIsNotPlaying.dispatch(),this.wasPlaying&&this.onStoppedPlaying.dispatch(),!this.wasPlaying&&this.onStartedPlaying.dispatch())}destroy(){this.stopWatchMode(),this.onCutsceneChange.dispose(),this.onIsPlaying.dispose(),this.onIsNotPlaying.dispose(),this.onStartedPlaying.dispose(),this.onStoppedPlaying.dispose(),this.onDebugPrintVariables.dispose(),super.destroy()}dispatchDebugSignals(){const q=UI.M.getCutsceneDeterminers();this.onDebugPrintVariables.dispatch(JSON.stringify(q,void 0,2))}};(0,Q.Cg)([(0,X.vkK)(),(0,X.YLv)("Run on create"),(0,Q.Sn)("design:type",Boolean)],FI.prototype,"runOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,X.YLv)("enabled will invoke `check()` method on a given interval"),(0,Q.Sn)("design:type",Boolean)],FI.prototype,"_watchMode",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.YLv)("Interval in milliseconds where`check()` will be invoked"),(0,Q.Sn)("design:type",Number)],FI.prototype,"_watchInterval",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,X.YLv)("TEST_ONLY_PROPERTY - Used only for testing in editor"),(0,Q.Sn)("design:type",Boolean)],FI.prototype,"testIsPlaying",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Fires the current prediction for a cutscene playing(true/false) "),(0,Q.Sn)("design:type",X.HN0)],FI.prototype,"onCutsceneChange",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Fires only when the cutscene is playing"),(0,Q.Sn)("design:type",X.HN0)],FI.prototype,"onIsPlaying",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Fires only when the cutscene is not playing"),(0,Q.Sn)("design:type",X.HN0)],FI.prototype,"onIsNotPlaying",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Fires when a cutscene starts playing"),(0,Q.Sn)("design:type",X.HN0)],FI.prototype,"onStartedPlaying",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Fires when a cutscene stops playing"),(0,Q.Sn)("design:type",X.HN0)],FI.prototype,"onStoppedPlaying",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Fires with checked variables"),(0,Q.Sn)("design:type",X.HN0)],FI.prototype,"onDebugPrintVariables",void 0),FI=(0,Q.Cg)([(0,X.EVk)("CutsceneChecker",et.Y.utility,"Utility component that tries to guess if a cutscene is playing and respond with signals")],FI);let GI=class extends((0,es.o)(X.uAl)){constructor(){super(...arguments),this.debug=!1,this.zeroOutPlaceholderTransforms=!1,this.resizePlaceholderToObject=!1,this.prefabGuid=null,this.preloadDependencies=!0,this.spawnedObjectWidth=100,this.spawnedObjectHeight=100,this.staggerPlaceholderCreation=!1,this.onPlaceholdersCreated=new X.HN0,this.onObjectScreenEntered=new X.HN0,this.onObjectScreenExited=new X.HN0,this.placeholders=[],this._pendingPlaceholderOperations=new Map}create(){var q;super.create(),this.staggerPlaceholderCreation=null!==(q=window.asdf)&&void 0!==q?q:this.staggerPlaceholderCreation,this._objectPool=new X.iyL((()=>this.spawnPrefab())),this._objectPool.autoRecycleOnDisable=!1,this._deadPoolContainer||(this._deadPoolContainer=new X._mx(this.gameObject),this._deadPoolContainer.name=`${this.gameObject.name} dead pool`,this._deadPoolContainer.active=!1,this._deadPoolContainer.addComponent(X.dLy))}postCreate(){var q;const K=null===(q=this.container)||void 0===q?void 0:q.findComponent(X.XVE);X.Aq$.isDefined(K)&&this.addListenerToSignal(K.onDimensionsChanged,(()=>{this.checkAllPlaceholdersOnScreen()}))}update(){super.update(),this._pendingPlaceholderOperations.forEach(((q,K)=>{var z;if(null!==q){if(0===K.children.length){const z=this._objectPool.getObject();if(Ht.d.updateInjectedValues(z,this._injectionData[q]),z.parent=K,this.resizePlaceholderToObject){const q=z.findComponent(X.XVE),Y=K.findComponent(X.XVE);Y.setSizeDelta(q.widthDelta,q.heightDelta),q.onDimensionsChanged.add((()=>{Y.setSizeDelta(q.widthDelta,q.heightDelta)}),this)}this.onObjectScreenEntered.dispatch(z)}}else for(const Y of K.children)this.onObjectScreenExited.dispatch(Y),this._objectPool.recycleObject(Y),null===(z=Y.findComponent(X.XVE))||void 0===z||z.onDimensionsChanged.removeAll(this),Y.parent=this._deadPoolContainer})),this._pendingPlaceholderOperations.clear()}destroy(){this._injectionData=null,this.onObjectScreenEntered.dispose(),this.onObjectScreenExited.dispose(),this.onPlaceholdersCreated.dispose(),super.destroy()}spawnPrefabsFromDataArray(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=[...q];if(this._injectionData=K,this.preloadDependencies&&(yield this.preloadPrefab(),K!==this._injectionData))return;const z=this.staggerPlaceholderCreation?this.getInjectedValue(X.t5G.FrameWorkManager):void 0;yield X.Ff4.completeGeneratorAsync(this.createPlaceholders(K),z),this.checkAllPlaceholdersOnScreen(),this.onPlaceholdersCreated.dispatch()}))}destroySpawnedPrefabs(){var q;this._injectionData=null;for(let K;K=null===(q=this._objectPool.aliveList.head)||void 0===q?void 0:q.object;)this._objectPool.recycleObject(K);this._objectPool.flush(!0);for(const K of this.placeholders)K.destroy();this.placeholders.length=0,this._pendingPlaceholderOperations.clear()}updateInjectionData(q,K){var z;yt.merge(this._injectionData[q],K),(null===(z=this.placeholders[q].children[0])||void 0===z?void 0:z.active)&&Ht.d.updateInjectedValues(this.placeholders[q].children[0],K)}*createPlaceholders(q){for(let K=0;K{this.checkPlaceholderOnScreen(z,q)})),this.debug&&z.addComponent(X.Lom).setColor("00ff00"),z.parent=null!==(K=this.container)&&void 0!==K?K:this.gameObject,z}preloadPrefab(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this._prefabLoader.preloadFromGUIDWithDependencies(this.prefabGuid)}))}spawnPrefab(){return this._prefabLoader.loadFromGUID(this.prefabGuid)}checkAllPlaceholdersOnScreen(){for(const[q,K]of this.placeholders.entries())this.checkPlaceholderOnScreen(K,q)}checkPlaceholderOnScreen(q,K){const z=re.J.isObjectOnScreen(q)?K:null;this._pendingPlaceholderOperations.set(q,z)}removePrefabAt(q){var K;const z=this.placeholders[q];if(z){for(const q of z.children)this.onObjectScreenExited.dispatch(q),this._objectPool.recycleObject(q),null===(K=q.findComponent(X.XVE))||void 0===K||K.onDimensionsChanged.removeAll(this),q.parent=this._deadPoolContainer;z.destroy(),this.placeholders.splice(q,1),this._injectionData.splice(q,1);for(let K=q;K{this.checkPlaceholderOnScreen(q,K)})))}}}updateAllInjectionData(q){for(;this.placeholders.length>q.length;)this.removePrefabAt(this.placeholders.length-1);for(;this.placeholders.length{this.checkPlaceholderOnScreen(q,K)})))}this.checkAllPlaceholdersOnScreen()}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],GI.prototype,"debug",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],GI.prototype,"zeroOutPlaceholderTransforms",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],GI.prototype,"resizePlaceholderToObject",void 0),(0,Q.Cg)([(0,X.Cdj)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],GI.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],GI.prototype,"prefabGuid",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],GI.prototype,"preloadDependencies",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],GI.prototype,"container",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],GI.prototype,"_deadPoolContainer",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],GI.prototype,"spawnedObjectWidth",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],GI.prototype,"spawnedObjectHeight",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],GI.prototype,"staggerPlaceholderCreation",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],GI.prototype,"onPlaceholdersCreated",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],GI.prototype,"onObjectScreenEntered",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],GI.prototype,"onObjectScreenExited",void 0),GI=(0,Q.Cg)([(0,X.EVk)("DataArrayPooledPrefabSpawner",et.Y.utility,"Spawns a pooled prefab for each item in a data array, injecting the data into the prefab")],GI);let jI=class extends X.uAl{constructor(){super(...arguments),this.argumentIndex=0,this.dataPath="",this.onDataExtracted=new X.HN0}extract(...q){if(q.length<=this.argumentIndex)return null;const K=q[this.argumentIndex],z=X.Aq$.isDefined(this.dataPath)&&""!==this.dataPath?yt.get(K,this.dataPath):K;return this.onDataExtracted.dispatch(z),z}destroy(){this.onDataExtracted.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],jI.prototype,"argumentIndex",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,X.YLv)("Data path compatible with lodash get"),(0,Q.Sn)("design:type",String)],jI.prototype,"dataPath",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],jI.prototype,"onDataExtracted",void 0),jI=(0,Q.Cg)([(0,X.EVk)("DataExtraction",et.Y.utility,"Extracts data from given arguments")],jI);let $I=class extends X.uAl{constructor(){super(...arguments),this.debugSize=!1,this.debugColour=!1,this.rectColour="#ff0000",this.width=1920,this.height=1080}postCreate(){}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],$I.prototype,"debugSize",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],$I.prototype,"debugColour",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",Object)],$I.prototype,"rectColour",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],$I.prototype,"width",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],$I.prototype,"height",void 0),(0,Q.Cg)([(0,X.Pqz)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],$I.prototype,"_rectTransform",void 0),$I=(0,Q.Cg)([(0,X.EVk)("DebugRectTransform")],$I);let HI=class extends X.uAl{constructor(){super(...arguments),this._checkOnCreate=!1,this._onNativeApp=new X.HN0,this._onNonNativeApp=new X.HN0,this._onThreeTierElegibilityCheck=new X.HN0}create(){super.create(),this._checkOnCreate&&this.checkDevice()}checkDevice(){Qs.pF.isNativeApp()?this._onNativeApp.dispatch():this._onNonNativeApp.dispatch(),this._onThreeTierElegibilityCheck.dispatch(Qs.pF.eligibleForMembershipPurchaseForMultipleTiers())}destroy(){this._onNativeApp.dispose(),this._onNonNativeApp.dispose(),this._onThreeTierElegibilityCheck.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],HI.prototype,"_checkOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],HI.prototype,"_onNativeApp",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],HI.prototype,"_onNonNativeApp",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],HI.prototype,"_onThreeTierElegibilityCheck",void 0),HI=(0,Q.Cg)([(0,X.EVk)("Device",et.Y.utility)],HI);z(10704);let VI=class extends X.uAl{constructor(){super(...arguments),this.onTrigger=new X.HN0,this._fireOnCreate=!1}create(){super.create(),this._fireOnCreate&&this.trigger()}destroy(){this.onTrigger.dispose(),super.destroy()}trigger(){this.onTrigger.dispatch(this.component)}};var WI,qI;(0,Q.Cg)([(0,X.MnK)(X.uAl),(0,Q.Sn)("design:type",X.uAl)],VI.prototype,"component",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],VI.prototype,"onTrigger",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],VI.prototype,"_fireOnCreate",void 0),VI=(0,Q.Cg)([(0,X.EVk)("GetComponentReference")],VI),function(q){q.EqualToConstant="===",q.EquivalentToConstant="==",q.GreaterThanConstant=">",q.GreaterThanOrEqualToConstant=">=",q.LessThanConstant="<",q.LessThanOrEqualToConstant="<="}(qI||(qI={}));let KI=WI=class extends X.uAl{constructor(){super(...arguments),this.comparisonFunction=qI.EqualToConstant,this.onTrue=new X.HN0,this.onFalse=new X.HN0,this.onResult=new X.HN0,this.onNegatedResult=new X.HN0}destroy(){this.onTrue.dispose(),this.onFalse.dispose(),this.onResult.dispose(),this.onNegatedResult.dispose(),super.destroy()}baseCompare(q,K){const z=WI.COMPARISON_FUNCTIONS[this.comparisonFunction](q,K);(z?this.onTrue:this.onFalse).dispatch(),this.onResult.dispatch(z),this.onNegatedResult.dispatch(!z)}};KI.COMPARISON_FUNCTIONS={[qI.EqualToConstant]:(q,K)=>q===K,[qI.EquivalentToConstant]:(q,K)=>q==K,[qI.GreaterThanConstant]:(q,K)=>q>K,[qI.GreaterThanOrEqualToConstant]:(q,K)=>q>=K,[qI.LessThanConstant]:(q,K)=>qq<=K},(0,Q.Cg)([(0,X.gfw)(qI),(0,Q.Sn)("design:type",String)],KI.prototype,"comparisonFunction",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],KI.prototype,"onTrue",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],KI.prototype,"onFalse",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],KI.prototype,"onResult",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],KI.prototype,"onNegatedResult",void 0),KI=WI=(0,Q.Cg)([(0,X.EVk)("Comparison (abstract)")],KI);let zI=class extends KI{constructor(){super(...arguments),this.constant=0}compare(q){this.baseCompare(q,this.constant)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],zI.prototype,"constant",void 0),zI=(0,Q.Cg)([(0,X.EVk)("NumberComparison",et.Y.utility)],zI);z(41170);let YI=class extends X.uAl{constructor(){super(...arguments),this.onMemberTier=new X.HN0,this.onHighestMemberTierTrue=new X.HN0,this.onHighestMemberTierFalse=new X.HN0}create(){super.create()}checkMemberTier(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.onMemberTier.dispatch(q.getMemberTier())}checkHighestMembershipTier(){const q=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;(Vs.kG.includes(q.getMemberTier())?this.onHighestMemberTierTrue:this.onHighestMemberTierFalse).dispatch()}destroy(){this.onMemberTier.dispose(),this.onHighestMemberTierTrue.dispose(),this.onHighestMemberTierFalse.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],YI.prototype,"onMemberTier",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],YI.prototype,"onHighestMemberTierTrue",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],YI.prototype,"onHighestMemberTierFalse",void 0),YI=(0,Q.Cg)([(0,X.EVk)("PlayerMemberTier",et.Y.player,"")],YI);z(11191),z(61917);let QI=class extends X.uAl{constructor(){super(...arguments),this._parameters=[],this.onTrigger=new X.HN0}destroy(){this.onTrigger.dispose(),super.destroy()}trigger(...q){const K=this._parameters.map((K=>{if("string"==typeof K){const z=K.match(/^\[(\d+)\]$/);if(z){const K=parseInt(z[1]);return q[K]}if(K.match(/^\d+(\.\d*)?$/))return parseFloat(K)}return K}));this.onTrigger.dispatch(...K)}};(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Object)],QI.prototype,"_parameters",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],QI.prototype,"onTrigger",void 0),QI=(0,Q.Cg)([(0,X.EVk)("SignalParameterRemix",et.Y.utility)],QI);let XI=class extends KI{constructor(){super(...arguments),this.comparisonFunction=qI.EqualToConstant,this.constant=""}compare(q){this.baseCompare(q,this.constant)}};(0,Q.Cg)([(0,X.DTs)(),(0,X.gfw)(qI),(0,Q.Sn)("design:type",String)],XI.prototype,"comparisonFunction",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],XI.prototype,"constant",void 0),XI=(0,Q.Cg)([(0,X.EVk)("StringComparison",et.Y.utility)],XI);var ZI=z(47008),JI=z(325);let tD=class extends KI{constructor(){super(...arguments),this.comparisonFunction=qI.EqualToConstant}compare(){this.baseCompare(this._subjectProvider.getSubject(),this.subject)}};(0,Q.Cg)([(0,X.DTs)(),(0,X.gfw)(qI),(0,Q.Sn)("design:type",String)],tD.prototype,"comparisonFunction",void 0),(0,Q.Cg)([(0,X.gfw)(JI.Q),(0,Q.Sn)("design:type",String)],tD.prototype,"subject",void 0),(0,Q.Cg)([(0,X.Cdj)("8f9-f0fc"),(0,Q.Sn)("design:type",ZI.W)],tD.prototype,"_subjectProvider",void 0),tD=(0,Q.Cg)([(0,X.EVk)("SubjectComparison",et.Y.utility)],tD);let eD=class extends X.uAl{constructor(){super(...arguments),this._startDelayMs=0,this._intervalMs=1e3,this._autoStart=!0,this._fireOnStart=!1,this.onInterval=new X.HN0}create(){super.create(),this._autoStart&&this.start()}destroy(){dt.q.instance.game.time.destroy(this._timer),this._timer=null,this.onInterval.dispose(),super.destroy()}start(){this._timer=dt.q.instance.game.time.create(!1),this._startDelayMs>0?(this._timer.addTimer(this._startDelayMs,this.startLoop,this),this._timer.start()):this.startLoop()}startLoop(){this._fireOnStart&&this.onInterval.dispatch(),this._timer.loop(this._intervalMs,this.onInterval.dispatch,this.onInterval),this._timer.start()}};var iD;(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],eD.prototype,"_startDelayMs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],eD.prototype,"_intervalMs",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],eD.prototype,"_autoStart",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],eD.prototype,"_fireOnStart",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],eD.prototype,"onInterval",void 0),eD=(0,Q.Cg)([(0,X.EVk)("TimeInterval",et.Y.utility)],eD);let sD=iD=class extends X.uAl{constructor(){super(...arguments),this._networkCheckMinTimeMS=6e4,this.friendsListEventSignal=new X.HN0,this._broadcaster=dt.q.instance.game.broadcaster}create(){super.create(),this._broadcaster.addAppListener(Xn.sd.GetTotalFriendRequests,this.process,this,Xn.HG.HUD,!1),this._broadcaster.addAppListener(Xn.sd.RequestReceived,this.process,this,Xn.HG.HUD,!1),this._broadcaster.addAppListener(Xn.sd.RequestRejected,this.process,this,Xn.HG.HUD,!1),this._broadcaster.addAppListener(Xn.sd.RequestAccepted,this.process,this,Xn.HG.HUD,!1),this._broadcaster.addAppListener(Xn.sd.RequestCancelled,this.process,this,Xn.HG.HUD,!1),this.fetchFriendRequestsAndFriends(),this.process()}fetchFriendRequestsAndFriends(){const q=dt.q.instance.prodigy.timeManager.getServerTimeMs();q-this._networkCheckMinTimeMS>=iD._lastNetworkCheckTime&&(dt.q.instance.game.broadcaster.broadcast(Xn.sd.GetTotalFriendRequests,Xn.HG.FriendsList),iD._lastNetworkCheckTime=q)}destroy(){this._broadcaster.removeAppListener(Xn.sd.GetTotalFriendRequests,this,Xn.HG.HUD),this._broadcaster.removeAppListener(Xn.sd.RequestReceived,this,Xn.HG.HUD),this._broadcaster.removeAppListener(Xn.sd.RequestRejected,this,Xn.HG.HUD),this._broadcaster.removeAppListener(Xn.sd.RequestAccepted,this,Xn.HG.HUD),this._broadcaster.removeAppListener(Xn.sd.RequestCancelled,this,Xn.HG.HUD),this.friendsListEventSignal.dispose(),super.destroy()}process(){const q=dt.q.instance.prodigy.friendsListNetworkHandler;this.friendsListEventSignal.dispatch(q.hasPendingRequests())}};sD._lastNetworkCheckTime=0,(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],sD.prototype,"_networkCheckMinTimeMS",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],sD.prototype,"friendsListEventSignal",void 0),sD=iD=(0,Q.Cg)([(0,X.EVk)("FriendsListChangeListener",et.Y.multiplayer)],sD);let nD=class extends X.uAl{constructor(){super(...arguments),this.mailEventSignal=new X.HN0}create(){super.create();{dt.q.instance.game.broadcaster.addAppListener(Xn.zr.UpdateMailCounters,this.process,this,Xn.HG.MailerButton);const q=dt.q.instance.prodigy.mailNetworkHandler.mailTotals;q&&this.process(q),dt.q.instance.prodigy.mailNetworkHandler.getAllMail(!1)}}destroy(){dt.q.instance.game.broadcaster.removeAppListener(Xn.zr.UpdateMailCounters,this,Xn.HG.MailerButton),this.mailEventSignal.dispose(),super.destroy()}process({totalUnread:q}){if(q>0){const K=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.mailEventSignal.dispatch(!re.J.shouldSuppressAd(K)&&!K.tutorialCompletedThisSession,q)}else this.mailEventSignal.dispatch(!1,0)}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],nD.prototype,"mailEventSignal",void 0),nD=(0,Q.Cg)([(0,X.EVk)("MailChangeListener",et.Y.multiplayer)],nD);let aD=class extends X.uAl{constructor(){super(...arguments),this.onIconsLoaded=new X.HN0,this._iconCount=0}create(){super.create(),X.Aq$.isDefined(this._petID)&&this.setPetID(this._petID)}setPetID(q){this._petID!==q&&(this._petID=q,this._iconCount++,this._petIcon.onIconLoaded.addOnce(this.iconLoaded,this),this._petIcon.setItemID(q),this._iconCount++,this._elementIcon.onIconLoaded.addOnce(this.iconLoaded,this),this._elementIcon.setPetID(q))}iconLoaded(){this._iconCount--,0===this._iconCount&&this.onIconsLoaded.dispatch()}destroy(){this.onIconsLoaded.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.MnK)(gd.i),(0,Q.Sn)("design:type",gd.i)],aD.prototype,"_petIcon",void 0),(0,Q.Cg)([(0,X.MnK)(xf.D),(0,Q.Sn)("design:type",xf.D)],aD.prototype,"_elementIcon",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],aD.prototype,"_petID",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],aD.prototype,"onIconsLoaded",void 0),aD=(0,Q.Cg)([(0,X.EVk)("ElementalPetDisplay",et.Y.uiPet)],aD);let rD=class extends X.uAl{create(){super.create(),this.refreshPlayerAppearance()}refreshPlayerAppearance(){this._playerAppearance.setAppearance(this._loggedInPlayer.getAppearance())}};(0,Q.Cg)([(0,X.MnK)(dy.b),(0,Q.Sn)("design:type",dy.b)],rD.prototype,"_playerAppearance",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],rD.prototype,"_loggedInPlayer",void 0),rD=(0,Q.Cg)([(0,X.EVk)("LoggedInPlayerAppearanceLoader",et.Y.playerAnimation)],rD);let oD=class extends X.PQK{installBindings(){this.Container.bind("AnimationData").toConstantValue(new Vi.F(z(34500)))}};oD=(0,Q.Cg)([(0,X.Og1)("PlayerAnimationDataInstaller","Installer")],oD);let hD=class extends X.PQK{installBindings(){const q=dt.q.instance.prodigy.gameContainer;this.Container.bind("1eb-d7b4").toConstantValue(q.get("ad2-c5b2"))}};var cD;hD=(0,Q.Cg)([(0,X.Og1)("PlayerDataInstaller","Installer")],hD);let dD=cD=class extends X.uAl{constructor(){super(...arguments),this._teleportOutClips=[],this._teleportInClips=[],this.onTeleportOut=new X.HN0,this.onTeleportIn=new X.HN0,this._disableInput=!0}create(){super.create(),this._flashClip.GameObject.active=!1,this.gameObject.active=!1,this._belowObject=this.gameObject.children.find((q=>"Below"===q.name))}alignToTarget(){this.teleportObject&&(this.GameObject.transform.worldPosition=this.teleportObject.transform.worldPosition)}playOut(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z;this.setupTeleportCommon(),null===(q=this._teleportOutSoundEffect)||void 0===q||q.playSFX(),null===(K=this._teleportOutSoundTimer)||void 0===K||K.startTimer(),null===(z=this._screenShake)||void 0===z||z.run(),this._flashClip.OnComplete.addOnce((()=>{this._flashClip.GameObject.active=!1})),yield this.playTeleportCommon([...this._teleportOutClips,this._flashClip])}))}playIn(){return(0,Q.sH)(this,arguments,void 0,(function*(q=0){var K,z;return this.setupTeleportCommon(),this.teleportObject.active=!1,q>0&&(yield X.Egh.timeout(q)),null===(K=this._teleportInSoundEffect)||void 0===K||K.playSFX(),null===(z=this._teleportInSoundTimer)||void 0===z||z.startTimer(),this.playTeleportCommon(this._teleportInClips)}))}setupTeleportCommon(){this.setInputEnabled(!1),this.gameObject.active=!0,this.sortBelowObject()}playTeleportCommon(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const z=new X.v14;for(const Y of q)Y.animator.spine.onEvent.add(this.processEvent,this),Y.OnComplete.addOnce((()=>{Y.animator.spine.onEvent.remove(this.processEvent,this)})),Y.OnComplete.addOnce(z.push()),Y.play();yield z.all(),null===(K=this._screenShake)||void 0===K||K.forceCompletion(),this.restoreBelowObjectSorting(),this.gameObject.active=!1,this.setInputEnabled(!0)}))}processEvent(q,K){var z;switch(K.data.name){case cD.OUT_EVENT:this.onTeleportOut.dispatch(),this.teleportObject.active=!1;break;case cD.IN_EVENT:this.onTeleportIn.dispatch(),this.teleportObject.active=!0,null===(z=this.teleportObject.findComponent(X.y4o))||void 0===z||z.getRootContainer().updateTransform();break;case cD.FLASH_EVENT:this._flashClip.GameObject.active=!0,this._flashClip.play(!0)}}setInputEnabled(q){this._disableInput&&(0,Nd.QQ)(dt.q.instance.game,q)}sortBelowObject(){const q=this.teleportObject.parent.children.indexOf(this.teleportObject);this.teleportObject.parent.addChildAt(this._belowObject,q)}restoreBelowObjectSorting(){this.gameObject.addChild(this._belowObject)}destroy(){this.onTeleportOut.dispose(),this.onTeleportIn.dispose(),super.destroy()}};dD.OUT_EVENT="ch-out",dD.IN_EVENT="ch-in",dD.FLASH_EVENT="flash",(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],dD.prototype,"teleportObject",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(qw.Q),(0,Q.Sn)("design:type",Array)],dD.prototype,"_teleportOutClips",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(qw.Q),(0,Q.Sn)("design:type",Array)],dD.prototype,"_teleportInClips",void 0),(0,Q.Cg)([(0,X.MnK)(qw.Q),(0,Q.Sn)("design:type",qw.Q)],dD.prototype,"_flashClip",void 0),(0,Q.Cg)([(0,X.MnK)(Na.g),(0,Q.Sn)("design:type",Na.g)],dD.prototype,"_screenShake",void 0),(0,Q.Cg)([(0,X.MnK)(ga),(0,Q.Sn)("design:type",ga)],dD.prototype,"_teleportInSoundEffect",void 0),(0,Q.Cg)([(0,X.MnK)(ga),(0,Q.Sn)("design:type",ga)],dD.prototype,"_teleportOutSoundEffect",void 0),(0,Q.Cg)([(0,X.MnK)(eT),(0,Q.Sn)("design:type",eT)],dD.prototype,"_teleportInSoundTimer",void 0),(0,Q.Cg)([(0,X.MnK)(eT),(0,Q.Sn)("design:type",eT)],dD.prototype,"_teleportOutSoundTimer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],dD.prototype,"onTeleportOut",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],dD.prototype,"onTeleportIn",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],dD.prototype,"_disableInput",void 0),dD=cD=(0,Q.Cg)([(0,X.EVk)("TeleportEffect",et.Y.effect)],dD);let lD=class extends X.uAl{playOut(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._teleportEffect.teleportObject=this._mainPlayer,this._teleportEffect.alignToTarget(),this._teleportEffect.onTeleportOut.add((()=>{this.unloadFollows()})),yield this._teleportEffect.playOut(),this._teleportEffect.onTeleportOut.removeAll()}))}playIn(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._teleportEffect.teleportObject=this._mainPlayer,this._teleportEffect.alignToTarget(),this._teleportEffect.onTeleportIn.add((()=>{this.reloadFollows()})),yield this._teleportEffect.playIn(),this._teleportEffect.onTeleportIn.removeAll()}))}unloadFollows(){const q=this._mainPlayer.findComponentInChildren(nr);null==q||q.unloadFollows()}reloadFollows(){const q=this._mainPlayer.findComponentInChildren(nr);null==q||q.reloadFollows()}};(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObject"),(0,Q.Sn)("design:type",X._mx)],lD.prototype,"_mainPlayer",void 0),(0,Q.Cg)([(0,X.MnK)(dD),(0,Q.Sn)("design:type",dD)],lD.prototype,"_teleportEffect",void 0),lD=(0,Q.Cg)([(0,X.EVk)("PlayerTeleportEffect",et.Y.effect)],lD);z(28080);let uD=class extends X.uAl{constructor(){super(...arguments),this._onKeystonesToPlace=new X.HN0,this._onNoKeystonesToPlace=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}check(){hh.N.anyKeystonesToPlace()?this._onKeystonesToPlace.dispatch():this._onNoKeystonesToPlace.dispatch()}destroy(){this._onKeystonesToPlace.dispose(),this._onNoKeystonesToPlace.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],uD.prototype,"_onKeystonesToPlace",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],uD.prototype,"_onNoKeystonesToPlace",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],uD.prototype,"_runOnLoad",void 0),uD=(0,Q.Cg)([(0,X.EVk)("AnyKeystonesToPlaceGuard",et.Y.utility)],uD);let fD=class extends Ke.u{run(){var q;const K=this._playerContainer?[new X.I9Y(this._playerContainer.x,this._playerContainer.y)].concat(this.path):this.path;this.execute(194,{game:dt.q.instance.game,playerContainer:null!==(q=this._playerContainer)&&void 0!==q?q:this._playerData.player.playerContainer,playerLocomotion:this._playerLocomotion,monsterAnimationController:this.monsterAnimationController,circleTrigger:this._circleTrigger,path:K})}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],fD.prototype,"_playerData",void 0),(0,Q.Cg)([(0,X.Cdj)("MainPlayerGameObjectRelay"),(0,Q.Sn)("design:type",nA)],fD.prototype,"_playerContainer",void 0),(0,Q.Cg)([(0,X.Cdj)("PlayerLocomotion"),(0,Q.Sn)("design:type",X.KhP)],fD.prototype,"_playerLocomotion",void 0),(0,Q.Cg)([(0,X.MnK)(Gn.K),(0,Q.Sn)("design:type",Gn.K)],fD.prototype,"monsterAnimationController",void 0),(0,Q.Cg)([(0,X.MnK)(mi.s),(0,Q.Sn)("design:type",mi.s)],fD.prototype,"_circleTrigger",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X._Hz)(),(0,Q.Sn)("design:type",Array)],fD.prototype,"path",void 0),fD=(0,Q.Cg)([(0,X.EVk)("Q3MinibossGateFSM",et.Y.zoneForest)],fD);let bD=class extends Ke.u{run(){this.execute(188,{game:dt.q.instance.game,target:this._playerData.player.playerContainer,path:[new X.I9Y(910,480)]})}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],bD.prototype,"_playerData",void 0),bD=(0,Q.Cg)([(0,X.EVk)("TroptropTrioDialogueFSM",et.Y.zoneForest)],bD);let pD=class extends Ke.u{run(){this.execute(187,{game:dt.q.instance.game,chatBubble:this._chatBubble,monsterTransform:this._monsterTransform})}};(0,Q.Cg)([(0,X.MnK)(X.dLy),(0,Q.Sn)("design:type",X.dLy)],pD.prototype,"_monsterTransform",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],pD.prototype,"_chatBubble",void 0),pD=(0,Q.Cg)([(0,X.EVk)("TroptropTrioFSM",et.Y.zoneForest)],pD);let vD=class extends X.PQK{installBindings(){var q,K;const z="forest-Q2-Q3-miniboss-level",Y=dt.q.instance.prodigy.gameContainer.get("ad2-c5b2"),Q=dt.q.instance.prodigy.world.getCurrentZoneObject().getQuestState(),X=dt.q.instance.prodigy.world.getCurrentZoneObject().difficultyMode===Te.i.Hard?Math.max(aa.s.maxLevelConfig.regular,Y.getLevel()+2):Y.getLevel()+2,Z=null!==(K=null===(q=null==Q?void 0:Q.state)||void 0===q?void 0:q[z])&&void 0!==K?K:Math.min(X,aa.s.activePlayerLevelCap);(null==Q?void 0:Q.state)&&(Q.state[z]=Z);const J={encounter:[{ID:96}],level:Z,onEnd:"forest-C7",screen:"battle-forest-outside",onFaint:"forest-C8",backgroundMusic:hf.B.Bg_bossbattle_firefly,revampBattleType:3===(null==Q?void 0:Q.ID)?ki.gu.FireflyQ3Miniboss:ki.gu.FireflyQ2Miniboss};this.Container.bind("EncounterBattleMods").toConstantValue(J),this.Container.bind("EncounterDifficultyIndicatorLevel").toConstantValue(Z)}};vD=(0,Q.Cg)([(0,X.Og1)("ForestQ2MinibossEncounterInstaller","Installer")],vD);let gD=class extends X.uAl{constructor(){super(...arguments),this._onVisitingAllowed=new X.HN0,this._onVisitingNotAllowed=new X.HN0,this._runOnLoad=!1}create(){super.create(),this._player=this.getInjectedValue("ad2-c5b2").player,this._runOnLoad&&this.isVisitingAllowed()}destroy(){this._onVisitingAllowed.dispose(),this._onVisitingNotAllowed.dispose(),super.destroy()}isVisitingAllowed(){var q;(null===(q=this._player)||void 0===q?void 0:q.getAllowsHouseVisitors())?this._onVisitingAllowed.dispatch():this._onVisitingNotAllowed.dispatch()}allowVisiting(){var q;null===(q=this._player)||void 0===q||q.setAllowsHouseVisitors(!0)}denyVisiting(){var q;null===(q=this._player)||void 0===q||q.setAllowsHouseVisitors(!1)}};(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],gD.prototype,"_onVisitingAllowed",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],gD.prototype,"_onVisitingNotAllowed",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],gD.prototype,"_runOnLoad",void 0),gD=(0,Q.Cg)([(0,X.EVk)("HouseVisitorsGuard",et.Y.utility)],gD);let mD=class extends X.uAl{openHouseStore(){dt.q.instance.prodigy.world.getZone(Yt.A_.HOUSE).openHouseStore()}};mD=(0,Q.Cg)([(0,X.EVk)("OpenHouseStore",et.Y.ui)],mD);let yD=class extends X.uAl{constructor(){super(...arguments),this.isUnderwater=!1,this.bubblePrefab=Gt.l.Bubble,this.playerAnimationController=null,this._playerSpineAnimator=null}create(){super.create(),this.isUnderwater&&(this.playerAnimationController?(this._playerSpineAnimator=this.playerAnimationController.getSpineAnimator(),this._playerSpineAnimator?this._playerSpineAnimator.isLoaded?this.addBubbleEffectToPlayer():this._playerSpineAnimator.spine.OnLoaded.addOnce(this.addBubbleEffectToPlayer,this):X.VyI.log("No player spine animator set on wizard animation controller, skipping underwater setup.",X.$bb.Error)):X.VyI.log("No player animation controller set for underwater component, skipping spine animator setup.",X.$bb.Error))}addBubbleEffectToRemotePlayer(q){if(!this.isUnderwater)return;if(!q)return void X.VyI.log("No player object provided to add bubble effect.",X.$bb.Error);const K=q.findComponentInChildren(Ba.$);if(!K)return void X.VyI.log("No WizardAnimationControllerComponent found on player object, cannot add bubble effect.",X.$bb.Error);const z=K.getSpineAnimator();z?this.addBubbleEffectToPlayer(z):X.VyI.log("No SpineAnimator found on player animation controller, cannot add bubble effect.",X.$bb.Error)}addBubbleEffectToPlayer(q=this._playerSpineAnimator){q?X.W$e.instance.prefabLoaderInstance.loadWithDependenciesFromGUID(this.bubblePrefab,q.GameObject).then((K=>{K.transform.setScale(8,8),K.transform.setPositionY(-448);const z=K.findComponent(vn.l);z?z.setup({spineComponent:q.spine,boneName:"hip",slotName:"hip",followAxis:3,followRotation:!1,followScale:4,boneFollowerTransform:K.transform}):X.VyI.log("No SpineBoneFollowerComponent found on bubble prefab, cannot set up bubble effect.",X.$bb.Error)})).catch(X.RQr.createHandler(`Unable to load the bubble prefab: ${this.bubblePrefab}`)):X.VyI.log("No player spine animator available to add bubble effect.",X.$bb.Error)}};(0,Q.Cg)([(0,X.vkK)({toolTip:"Is this map underwater? Should a breathing bubble be shown?"}),(0,Q.Sn)("design:type",Boolean)],yD.prototype,"isUnderwater",void 0),(0,Q.Cg)([(0,X.gfw)(Gt.l),(0,Q.Sn)("design:type",String)],yD.prototype,"bubblePrefab",void 0),(0,Q.Cg)([(0,X.MnK)(Ba.$,{toolTip:"The animation controller for the main player in the underwater zone."}),(0,Q.Sn)("design:type",Ba.$)],yD.prototype,"playerAnimationController",void 0),yD=(0,Q.Cg)([(0,X.EVk)("BreathingBubble",et.Y.zoneShipwreckShore)],yD);let _D=class extends X.uAl{chatWithNpc(){var q;const K=new Ii.rD,z=this.getInjectedValue("782-c308"),Y=dt.q.instance.prodigy.world.getCurrentZoneObject(),Q=dt.q.instance.prodigy.world.getZone(ch.O.Shiverchill),Z=Xd.getDailyQuestState(Q);Y.isOnQuest(4)||Y.isOnQuest(5)?Y.isOnSequence(4,1)?K.addEvents([{dialogueData:K.dataProvider.get(379),blockInput:!0},{dialogueData:K.dataProvider.get(380),blockInput:!0},{callback:()=>{const q=this.getInjectedValue("b37-c775");q?q.sendQuestEventViaHub(eo.T.SPEAK_WITH_NPC,{id:"shiverchill-miner"}).catch(X.RQr.createHandler("An error occurred while sending the event via Quest Hub")):X.VyI.log("Attempted to send event via Quest Manager Hub, but no Quest Manager Hub was found",X.$bb.Warning)}}]):K.addEvents([{dialogueData:K.dataProvider.get(380),blockInput:!0}]):Y.isOnQuest(6)?K.addEvents([{dialogueData:K.dataProvider.get(384),blockInput:!0}]):(null===(q=Y.getQuestState())||void 0===q?void 0:q.ID)>=6&&(0===z.backpack.hasItem("item",80)?K.addEvents([{dialogueData:K.dataProvider.get(399),blockInput:!0},{dialogueData:K.dataProvider.get(402),blockInput:!0},{dialogueData:K.dataProvider.get(403),blockInput:!0},{dialogueData:K.dataProvider.get(404),blockInput:!0}]):z.backpack.hasItem("item",80)<5?(K.addEvents([{dialogueData:K.dataProvider.get(399),blockInput:!0},{dialogueData:K.dataProvider.get(391),blockInput:!0}]),4===z.backpack.hasItem("item",80)&&K.addEvents([{dialogueData:K.dataProvider.get(397),blockInput:!0}])):z.backpack.hasItem("item",80)>4&&Z.rewards<5?K.addEvents([{dialogueData:K.dataProvider.get(398),blockInput:!0},{callback:()=>{z.saveEnabled=!1,Q.setState("daily",{date:Z.date,flags:Z.flags,rewards:5}),dt.q.instance.prodigy.open.gotItem([{type:"item",ID:76,N:5}],void 0,void 0,void 0,void 0,void 0,{source_type:Ei.C.Npc})}},{dialogueData:K.dataProvider.get(392),blockInput:!0},{callback:()=>{z.saveEnabled=!0}}]):z.backpack.hasItem("item",80)>4&&z.backpack.hasItem("item",80)<10&&Z.rewards>4?(K.addEvents([{dialogueData:K.dataProvider.get(399),blockInput:!0},{dialogueData:K.dataProvider.get(392),blockInput:!0}]),9===z.backpack.hasItem("item",80)&&K.addEvents([{dialogueData:K.dataProvider.get(397),blockInput:!0}])):z.backpack.hasItem("item",80)>9&&Z.rewards<10?K.addEvents([{dialogueData:K.dataProvider.get(398),blockInput:!0},{callback:()=>{z.saveEnabled=!1,Q.setState("daily",{date:Z.date,flags:Z.flags,rewards:10}),dt.q.instance.prodigy.open.gotItem([{type:"item",ID:77,N:10}],void 0,void 0,void 0,void 0,void 0,{source_type:Ei.C.Npc})}},{dialogueData:K.dataProvider.get(393),blockInput:!0},{callback:()=>{z.saveEnabled=!0}}]):z.backpack.hasItem("item",80)>9&&z.backpack.hasItem("item",80)<25&&Z.rewards>9?(K.addEvents([{dialogueData:K.dataProvider.get(399),blockInput:!0},{dialogueData:K.dataProvider.get(393),blockInput:!0}]),24===z.backpack.hasItem("item",80)&&K.addEvents([{dialogueData:K.dataProvider.get(397),blockInput:!0}])):z.backpack.hasItem("item",80)>24&&Z.rewards<25?K.addEvents([{dialogueData:K.dataProvider.get(398),blockInput:!0},{callback:()=>{z.saveEnabled=!1,Q.setState("daily",{date:Z.date,flags:Z.flags,rewards:25}),dt.q.instance.prodigy.open.gotItem([{type:"hat",ID:10}],void 0,void 0,void 0,void 0,void 0,{source_type:Ei.C.Npc})}},{dialogueData:K.dataProvider.get(394),blockInput:!0},{callback:()=>{z.saveEnabled=!0}}]):z.backpack.hasItem("item",80)>24&&z.backpack.hasItem("item",80)<50&&Z.rewards>24?(K.addEvents([{dialogueData:K.dataProvider.get(399),blockInput:!0},{dialogueData:K.dataProvider.get(394),blockInput:!0}]),49===z.backpack.hasItem("item",80)&&K.addEvents([{dialogueData:K.dataProvider.get(397),blockInput:!0}])):z.backpack.hasItem("item",80)>49&&Z.rewards<50?K.addEvents([{dialogueData:K.dataProvider.get(398),blockInput:!0},{callback:()=>{z.saveEnabled=!1,Q.setState("daily",{date:Z.date,flags:Z.flags,rewards:50}),dt.q.instance.prodigy.open.gotItem([{type:"outfit",ID:6}],void 0,void 0,void 0,void 0,void 0,{source_type:Ei.C.Npc})}},{dialogueData:K.dataProvider.get(395),blockInput:!0},{callback:()=>{z.saveEnabled=!0}}]):z.backpack.hasItem("item",80)>49&&z.backpack.hasItem("item",80)<75&&Z.rewards>49?(K.addEvents([{dialogueData:K.dataProvider.get(399),blockInput:!0},{dialogueData:K.dataProvider.get(395),blockInput:!0}]),74===z.backpack.hasItem("item",80)&&K.addEvents([{dialogueData:K.dataProvider.get(397),blockInput:!0}])):z.backpack.hasItem("item",80)>74&&Z.rewards<75?K.addEvents([{dialogueData:K.dataProvider.get(398),blockInput:!0},{callback:()=>{z.saveEnabled=!1,Q.setState("daily",{date:Z.date,flags:Z.flags,rewards:75}),dt.q.instance.prodigy.open.gotItem([{type:"weapon",ID:13}],void 0,void 0,void 0,void 0,void 0,{source_type:Ei.C.Npc})}},{dialogueData:K.dataProvider.get(396),blockInput:!0},{callback:()=>{z.saveEnabled=!0}}]):z.backpack.hasItem("item",80)>74&&z.backpack.hasItem("item",80)<99&&Z.rewards>74?(K.addEvents([{dialogueData:K.dataProvider.get(399),blockInput:!0},{dialogueData:K.dataProvider.get(396),blockInput:!0}]),98===z.backpack.hasItem("item",80)&&K.addEvents([{dialogueData:K.dataProvider.get(397),blockInput:!0}])):z.backpack.hasItem("item",80)>98&&Z.rewards<99?K.addEvents([{dialogueData:K.dataProvider.get(398),blockInput:!0},{callback:()=>{z.saveEnabled=!1,Q.setState("daily",{date:Z.date,flags:Z.flags,rewards:99}),dt.q.instance.prodigy.open.gotItem([{type:"hat",ID:56}],void 0,void 0,void 0,void 0,void 0,{source_type:Ei.C.Npc}),z.saveEnabled=!0}}]):K.addEvents([{dialogueData:K.dataProvider.get(408),blockInput:!0}])),K.start()}};var ED;_D=(0,Q.Cg)([(0,X.EVk)("ShiverchillMinerNpc")],_D),function(q){q.NormalChest="A",q.QuestChest="B",q.MemberChest="C"}(ED||(ED={}));let wD=class extends X.uAl{constructor(){super(...arguments),this.chestType=ED.NormalChest,this.rewards=[{ID:0,type:"gold",N:100}],this.onAttemptOpen=new X.HN0,this.onOpening=new X.HN0,this.onCollected=new X.HN0,this.onGotItemClosed=new X.HN0}create(){var q;super.create(),null===(q=this._gameObjectContext)||void 0===q||q.bindInjectedValues({ZONE_CHEST_ID:this.chestId,ZONE_CHEST_TYPE:this.chestType,ZONE_CHEST_REWARD:this.rewards})}destroy(){this.onAttemptOpen.dispose(),this.onOpening.dispose(),this.onCollected.dispose(),this.onGotItemClosed.dispose(),super.destroy()}collect(){if(this.onAttemptOpen.dispatch(),this.chestType===ED.MemberChest&&!this._activePlayer.hasMembership())return this.broadcastMemberChestOpenedFailedEvents(),void(re.J.shouldSuppressAd(this._activePlayer)?this.showMemberAdSuppressionToolTip():this.showAd());this.chestKey&&0===this._activePlayer.backpack.hasItem(this.chestKey.type,this.chestKey.id)?this.handleChestLocked():this.initChestOpening()}initChestOpening(){this._activePlayer.saveEnabled=!1,dt.q.instance.game.input.enabled=!1;dt.q.instance.prodigy.game.add.tween(this.gameObject.transform.localPosition,this).to({x:"-=5"},50,X.GS3.Linear.None).to({x:"+=10"},150,X.GS3.Linear.None).to({x:"-=10"},150,X.GS3.Linear.None).to({x:"+=5"},50,X.GS3.Linear.None).to({y:"-=50"},200,X.GS3.Quadratic.Out).to({y:"+=50"},200,X.GS3.Quadratic.In).to({y:"-=20"},100,X.GS3.Quadratic.Out).to({y:"+=20"},100,X.GS3.Quadratic.In).start().onTweenComplete.add(this.openChest,this,1),this.onOpening.dispatch()}handleChestLocked(){var q;let K=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SOMETHING");if(this.chestKey){const z=null===(q=ae.t.getItem(this.chestKey.type,this.chestKey.id))||void 0===q?void 0:q.data;K=(null==z?void 0:z.name)?z.name:K}dt.q.instance.prodigy.open.messageBoxPrefab({text:"CHEST_LOCKED_MESSAGE",textArgs:[K]})}broadcastMemberChestOpenedFailedEvents(){const q=zs.P.shouldUseUnifiedConversionFlow(un.o.FunnelOpenMemberChestWorld)?Ys.R.UnifiedConversionFlow:re.J.showYouTubeMembershipAd(dt.q.instance.game,!0)?Ys.R.Video:Ys.R.Static;this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-World",category:"World",contentId:dt.q.instance.prodigy.world.getCurrentMap(),adType:q,adVersion:zs.P.getAdVersion(un.o.FunnelOpenMemberChestWorld)}),this._segment.container.sendContainerOpenedFailedEvent(wi.ZF.WorldMemberChest,this.chestId,hp.WE.MemberLocked,Ti.N.OpenWorld)}showMemberAdSuppressionToolTip(){const q=this._bounds,K=new X.or0(X.Htv.getWidth(q.GameObject),X.Htv.getHeight(q.GameObject)),z=q.GameObject.transform.worldPosition,Y=z.x;let Q,Z,J;Z=z.x>dt.q.instance.game.width/2?.75:.25,z.y>dt.q.instance.game.height/2?(Q=z.y+K.getHalfHeight(),J=ni.i.UP):(Q=z.y-K.getHalfHeight(),J=ni.i.DOWN),dt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:Y,yPosition:Q,arrowXRelPos:Z,arrowDirection:J})}showAd(){const q={conversionFunnelName:un.o.FunnelOpenMemberChestWorld,conversionFunnelMetadata:dt.q.instance.prodigy.world.getCurrentMap()};dt.q.instance.prodigy.open.membershipInfo(void 0,q)}openChest(){var q;const K=this._activePlayer;dt.q.instance.prodigy.world.getZone(dt.q.instance.prodigy.world.getCurrentZone()).setState(this.chestId,1),X.Aq$.isDefined(null===(q=this.chestKey)||void 0===q?void 0:q.id)&&K.backpack.consume(this.chestKey.type,this.chestKey.id,1),K.saveEnabled=!0,dt.q.instance.game.input.enabled=!0,dt.q.instance.prodigy.open.gotItem(this.rewards,(()=>{this.onGotItemClosed.dispatch()}),void 0,"open-chest",void 0,void 0,{source_type:this.chestType!==ED.QuestChest?this.chestType===ED.NormalChest?Ei.C.WorldChest:Ei.C.WorldMemberChest:void 0}),this.chestType!==ED.NormalChest&&this.chestType!==ED.MemberChest||this._segment.container.sendContainerOpenedEvent(this.chestType===ED.NormalChest?wi.ZF.WorldChest:wi.ZF.WorldMemberChest,this.chestId,Ti.N.OpenWorld),this.checkQuestProgress(),this.onCollected.dispatch()}checkQuestProgress(){this.getInjectedValue("b37-c775").sendQuestEventViaHub(eo.T.OPEN_CHEST,{id:`${dt.q.instance.prodigy.world.getCurrentZone()}-${this.chestId}`}).catch(X.RQr.createHandler(`Error sending the OPEN_CHEST event via Quest Hub (${this.chestId})`))}};(0,Q.Cg)([(0,X.Pqz)(X.bE_),(0,Q.Sn)("design:type",X.bE_)],wD.prototype,"_gameObjectContext",void 0),(0,Q.Cg)([(0,X.Cdj)("782-c308"),(0,Q.Sn)("design:type",Ln.W)],wD.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],wD.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],wD.prototype,"chestId",void 0),(0,Q.Cg)([(0,X.gfw)(ED),(0,Q.Sn)("design:type",String)],wD.prototype,"chestType",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],wD.prototype,"chestKey",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.vCS)(),(0,Q.Sn)("design:type",Array)],wD.prototype,"rewards",void 0),(0,Q.Cg)([(0,X.MnK)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],wD.prototype,"_bounds",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wD.prototype,"onAttemptOpen",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wD.prototype,"onOpening",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wD.prototype,"onCollected",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],wD.prototype,"onGotItemClosed",void 0),wD=(0,Q.Cg)([(0,X.EVk)("Chest")],wD);var TD=z(51540);class SD{static getChestState(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=Xp.R.getNowWithServerTimezoneOffset(),z=K.getHours()>=(re.J.isWeekend(K)?8:16),Y=z?Xp.R.getDateTimeTomorrowLocal():Xp.R.getDateTimeLocal(),Q=yield this.festivalNetworkHandler.getChestData(q);return(null==Q?void 0:Q.lastChestDateOpenMs)!==Y?(yield this.festivalNetworkHandler.setChestDate(q,Y),yield this.festivalNetworkHandler.setChestSpins(q,0),0):0===Q.festivalChestSpins?0:z?1:2}))}static attemptChestSpin(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=yield this.getChestState(q);return 0===K&&(yield this.festivalNetworkHandler.setChestSpins(q,1)),K}))}}(0,Q.Cg)([(0,Qi.b)("f67-1437"),(0,Q.Sn)("design:type",TD.v)],SD,"festivalNetworkHandler",void 0);let AD=class extends X.uAl{constructor(){super(...arguments),this.onClickClaimable=new X.HN0,this.onClickNotClaimable=new X.HN0}create(){super.create(),this.setChestGraphic().catch(X.RQr.createHandler("[FestivalChestComponent] Could not set chest graphic for festival chest."))}setChestGraphic(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._chestVisualState=yield SD.getChestState(this._chestID),this.activeGameObject.active=0===this._chestVisualState,this.inactiveGameObject.active=0!==this._chestVisualState}))}chestClicked(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._clicksDisabled)return;let q;this._clicksDisabled=!0;try{q=yield SD.attemptChestSpin(this._chestID)}catch(z){return void X.VyI.log("Error getting a response from FestivalChestUtil.attemptChestSpin",X.$bb.Error)}finally{this._clicksDisabled=!1}0===q&&0!==this._chestVisualState&&(q=2);const K=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);switch(q){case 0:this._chestVisualState=1,this.onClickClaimable.dispatch(this);break;case 1:dt.q.instance.prodigy.open.messageBoxOkay(K.getText("FESTIVAL_CHEST_COME_BACK_TOMORROW"),K.getText("BUTTON_OKAY"),null),this.onClickNotClaimable.dispatch(this);break;case 2:dt.q.instance.prodigy.open.messageBoxOkay(K.getText("FESTIVAL_CHEST_COME_BACK_LATER"),K.getText("BUTTON_OKAY"),null),this.onClickNotClaimable.dispatch(this)}}))}destroy(){this.onClickClaimable.dispose(),this.onClickNotClaimable.dispose()}setClicksEnabled(){this._clicksDisabled=!1}setClicksDisabled(){this._clicksDisabled=!0}};(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],AD.prototype,"activeGameObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],AD.prototype,"inactiveGameObject",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],AD.prototype,"_chestID",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],AD.prototype,"onClickClaimable",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],AD.prototype,"onClickNotClaimable",void 0),AD=(0,Q.Cg)([(0,X.EVk)("FestivalChest",et.Y.festival)],AD);let CD=class extends At._{constructor(){super(...arguments),this._chestState=2,this.onChestStateReady=new X.HN0}create(){super.create(),SD.getChestState(this._chestID).then((q=>{this._chestState=q,this.onChestStateReady.dispatch()})).catch(X.RQr.createHandler("[FestivalChestDataComponent] Could not get chest state."))}getData(){return this._chestState}destroy(){this.onChestStateReady.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],CD.prototype,"_chestID",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],CD.prototype,"onChestStateReady",void 0),CD=(0,Q.Cg)([(0,X.EVk)("FestivalChestData",et.Y.festival)],CD);let OD=class extends X.uAl{constructor(){super(...arguments),this._onAttemptOpen=new X.HN0,this._onOpening=new X.HN0,this._onCollected=new X.HN0}collect(){this._zone=dt.q.instance.prodigy.world.getZone(dt.q.instance.prodigy.world.getCurrentZone());const q=this._playerDataProvider.player;if(this._onAttemptOpen.dispatch(),"C"===this._chestType&&!q.hasMembership())return this.broadcastMemberChestOpenedFailedEvents(),void(re.J.shouldSuppressAd(this._playerDataProvider.player)?this.showMemberAdSuppressionToolTip():this.showAd());X.Aq$.isDefined(this._chestKey)&&0===q.backpack.hasItem(this._chestKey.type,this._chestKey.ID)?this.handleChestLocked():this.initChestOpening()}initChestOpening(){const q=this._playerDataProvider.player,K=q.playerContainer;q.saveEnabled=!1,dt.q.instance.game.input.enabled=!1,K.evtProc=!0;dt.q.instance.prodigy.game.add.tween(this.gameObject.transform.localPosition,this).to({x:"-=5"},50,X.GS3.Linear.None).to({x:"+=10"},150,X.GS3.Linear.None).to({x:"-=10"},150,X.GS3.Linear.None).to({x:"+=5"},50,X.GS3.Linear.None).to({y:"-=50"},200,X.GS3.Quadratic.Out).to({y:"+=50"},200,X.GS3.Quadratic.In).to({y:"-=20"},100,X.GS3.Quadratic.Out).to({y:"+=20"},100,X.GS3.Quadratic.In).start().onTweenComplete.add(this.openChest,this,1),this._onOpening.dispatch()}handleChestLocked(){var q;let K=dt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SOMETHING");if(this._chestKey){const z=null===(q=ae.t.getItem(this._chestKey.type,this._chestKey.ID))||void 0===q?void 0:q.data;K=(null==z?void 0:z.name)?z.name:K}dt.q.instance.prodigy.open.messageBoxPrefab({text:"CHEST_LOCKED_MESSAGE",textArgs:[K]})}broadcastMemberChestOpenedFailedEvents(){const q=zs.P.shouldUseUnifiedConversionFlow(un.o.FunnelOpenMemberChestWorld)?Ys.R.UnifiedConversionFlow:re.J.showYouTubeMembershipAd(dt.q.instance.game,!0)?Ys.R.Video:Ys.R.Static;this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-World",category:"World",contentId:dt.q.instance.prodigy.world.getCurrentMap(),adType:q,adVersion:zs.P.getAdVersion(un.o.FunnelOpenMemberChestWorld)}),this._segment.container.sendContainerOpenedFailedEvent(wi.ZF.WorldMemberChest,this._chestId,hp.WE.MemberLocked,Ti.N.OpenWorld)}showMemberAdSuppressionToolTip(){const q=this._chestBounds,K=new X.or0(X.Htv.getWidth(q.GameObject),X.Htv.getHeight(q.GameObject)),z=q.GameObject.transform.worldPosition,Y=z.x;let Q,Z,J;Z=z.x>dt.q.instance.game.width/2?.75:.25,z.y>dt.q.instance.game.height/2?(Q=z.y+K.getHalfHeight(),J=ni.i.UP):(Q=z.y-K.getHalfHeight(),J=ni.i.DOWN),dt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:Y,yPosition:Q,arrowXRelPos:Z,arrowDirection:J})}showAd(){const q={conversionFunnelName:un.o.FunnelOpenMemberChestWorld,conversionFunnelMetadata:dt.q.instance.prodigy.world.getCurrentMap()};dt.q.instance.prodigy.open.membershipInfo(null,q)}openChest(){const q=this._playerDataProvider.player;this._zone.setState(this._chestId,1),X.Aq$.isDefined(this._chestKey)&&q.backpack.consume(this._chestKey.type,this._chestKey.ID,1),q.playerContainer.evtProc=!1,q.saveEnabled=!0,dt.q.instance.game.input.enabled=!0,dt.q.instance.prodigy.open.gotItem(this._rewards,this.checkQuestProgress,null,"open-chest",void 0,void 0,{source_type:"B"!==this._chestType?"A"===this._chestType?Ei.C.WorldChest:Ei.C.WorldMemberChest:null}),"A"!==this._chestType&&"C"!==this._chestType||this._segment.container.sendContainerOpenedEvent("A"===this._chestType?wi.ZF.WorldChest:wi.ZF.WorldMemberChest,this._chestId,Ti.N.OpenWorld),this._onCollected.dispatch()}checkQuestProgress(){var q;null===(q=dt.q.instance.game.state.get(Nt.G.TileScreen))||void 0===q||q.process()}destroy(){super.destroy(),this._onAttemptOpen.dispose(),this._onOpening.dispose(),this._onCollected.dispose()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],OD.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Si.Y)],OD.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.MnK)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],OD.prototype,"_chestBounds",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],OD.prototype,"_onAttemptOpen",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],OD.prototype,"_onOpening",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],OD.prototype,"_onCollected",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_CHEST_ID"),(0,Q.Sn)("design:type",String)],OD.prototype,"_chestId",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_CHEST_KEY"),(0,Q.Sn)("design:type",Object)],OD.prototype,"_chestKey",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_CHEST_TYPE"),(0,Q.Sn)("design:type",String)],OD.prototype,"_chestType",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_CHEST_REWARD"),(0,Q.Sn)("design:type",Array)],OD.prototype,"_rewards",void 0),OD=(0,Q.Cg)([(0,X.EVk)("LegacyZoneChestCollectEvent",et.Y.map)],OD);let ID=class extends Yi.z{constructor(){super(...arguments),this._bindOnCreate=!1,this._onContextBound=new X.HN0}create(){super.create(),this._zone=this.getCurrentZone(),this._bindOnCreate&&this.bindContext()}bindContext(){var q;let K=null;if(!X.Aq$.isDefined(this._chestType)){K="A";for(let z=0;z=500&&(K="C")}}X.Aq$.isDefined(K)&&this._context.Container.rebind("ZONE_CHEST_TYPE").toConstantValue(K),this._context.Container.rebind("ZONE_CHEST_IS_ENABLED").toConstantValue(!this.areZoneChestsDisabledByQuest()),this._context.Container.rebind("ZONE_CHEST_STATE").toConstantValue(this.getZoneChestState()),this._context.Container.rebind("ZONE_CHEST_IS_CLOSED").toConstantValue(this.isChestClosed()),this._context.Container.rebind("ZONE_CHEST_IS_HIGHLIGHTED").toConstantValue(this.isChestHighlighted()),this.gameObject.findComponentsInChildren(Wo.B).forEach((q=>q.consume())),this._onContextBound.dispatch()}areZoneChestsDisabledByQuest(){var q;const K=null===(q=this._zone.getMap(dt.q.instance.prodigy.world.getCurrentMapTag()))||void 0===q?void 0:q.questParams;return!1===(null==K?void 0:K.enableChests)}unbindContext(){}getCurrentZone(){return dt.q.instance.prodigy.world.getZone(dt.q.instance.prodigy.world.getCurrentZone())}getZoneChestState(){let q;const K=this.isChestClosed();switch(this._chestType){default:case"A":q=K?"NORMAL_CHEST_CLOSED":"NORMAL_CHEST_OPENED";break;case"B":q=K?"QUEST_CHEST_CLOSED":"QUEST_CHEST_OPENED";break;case"C":q=K?"MEMBER_CHEST_CLOSED":"MEMBER_CHEST_OPENED"}return q}isChestClosed(){const q=this._zone.getState(this._chestId);return!X.Aq$.isDefined(q)||0===q}isChestHighlighted(){var q;const K=this._zone.getQuestState();if(!X.Aq$.isDefined(K)||!X.Aq$.isDefined(K.req)||dt.q.instance.game.state.current===Nt.G.PrefabScene)return!1;const z=this._playerDataProvider.player;for(let Y=0;Yz.backpack.hasItem(K.req.type,K.req.ID))return!0}return!1}destroy(){super.destroy(),this._onContextBound.dispose()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Mt.E)],ID.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_CHEST_ID"),(0,Q.Sn)("design:type",String)],ID.prototype,"_chestId",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_CHEST_TYPE"),(0,Q.Sn)("design:type",String)],ID.prototype,"_chestType",void 0),(0,Q.Cg)([(0,X.Cdj)("ZONE_CHEST_REWARD"),(0,Q.Sn)("design:type",Array)],ID.prototype,"_rewards",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ID.prototype,"_bindOnCreate",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ID.prototype,"_onContextBound",void 0),ID=(0,Q.Cg)([(0,X.EVk)("ZoneChestDataProvider",et.Y.map)],ID);var DD=z(64544);let RD=class extends X.uAl{constructor(){super(...arguments),this._floor=1,this._runOnLoad=!1,this.isEqual=new X.HN0,this.isGreaterThan=new X.HN0,this.isLesserThan=new X.HN0}create(){super.create(),this._runOnLoad&&this.checkTowerCurrentFloor()}destroy(){this.isEqual.dispose(),this.isGreaterThan.dispose(),this.isLesserThan.dispose(),super.destroy()}checkTowerCurrentFloor(){const q=this._academyTowerDataProvider.getCurrentFloor();q===this._floor?this.isEqual.dispatch():q{switch(q){case PD.NextFloorOrdinal:K.push(Vt.$.addOrdinalSuffix(this._academyTowerDataProvider.getNextFloor()));break;case PD.Element:K.push(Vt.$.capitalizeFirstLetter(this._academyTowerDataProvider.getElement()));break;case PD.BattlesWon:K.push(this._academyTowerDataProvider.getBattlesWon().toString());break;case PD.TotalBattles:K.push(this._academyTowerDataProvider.getTotalBattles().toString());break;case PD.CurrentFloorOrdinal:K.push(Vt.$.addOrdinalSuffix(this._academyTowerDataProvider.getCurrentFloor()));break;case PD.NextFloor:K.push(this._academyTowerDataProvider.getNextFloor().toString());break;case PD.CurrentFloor:K.push(this._academyTowerDataProvider.getCurrentFloor().toString())}})),this._localizedText.text=this._localizer.getText(this._localizationKey,...K)}};(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],MD.prototype,"_localizer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],MD.prototype,"_localizedText",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],MD.prototype,"_localizationKey",void 0),(0,Q.Cg)([(0,X.MnK)(DD.w),(0,Q.Sn)("design:type",DD.w)],MD.prototype,"_academyTowerDataProvider",void 0),(0,Q.Cg)([(0,X.gfw)(PD),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],MD.prototype,"_formatTypes",void 0),MD=(0,Q.Cg)([(0,X.EVk)("AcademyTowerLocalizedKeyText",et.Y.academy)],MD);let ND=class extends X.uAl{constructor(){super(...arguments),this._battlesWon=1,this._runOnLoad=!1,this.isEqual=new X.HN0,this.isGreaterThan=new X.HN0,this.isLesserThan=new X.HN0}create(){super.create(),this._runOnLoad&&this.checkBattlesWon()}destroy(){this.isEqual.dispose(),this.isGreaterThan.dispose(),this.isLesserThan.dispose(),super.destroy()}checkBattlesWon(){const q=this._academyTowerDataProvider.getBattlesWon();q===this._battlesWon?this.isEqual.dispatch():q{dt.q.instance.prodigy.open.menuCloseAll();const q=Number(this._storeIdToOpen);isNaN(q)?dt.q.instance.prodigy.open.dynamicStore({storeKey:this._storeIdToOpen,origin:{originType:wi.$N.ButtonClick}}):dt.q.instance.prodigy.open.store(q,void 0,void 0,{originType:wi.$N.ButtonClick})}));const q=this.getInjectedValue("b37-c775");q&&q.sendQuestEventViaHub(eo.T.BUTTON_CLICK,{id:this._questEventId}).catch(X.RQr.createHandler("An error occurred while sending a quest event from the CurrencyDrainModal"))}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",Object)],BD.prototype,"_storeIdToOpen",void 0),(0,Q.Cg)([(0,X.MnK)(zt.S),(0,Q.Sn)("design:type",zt.S)],BD.prototype,"_actionButton",void 0),BD=(0,Q.Cg)([(0,X.EVk)("CurrencyDrainModalComponent",et.Y.festival)],BD);let UD=class extends X.uAl{constructor(){super(...arguments),this.onSkinProcessed=new X.HN0}create(){super.create(),this.processActiveSkin()}processActiveSkin(){for(const q of dt.q.instance.prodigy.skin.active){const K=q.getOverrideName(this._mapTag);if(void 0!==K)return void this.onSkinProcessed.dispatch(K)}this.onSkinProcessed.dispatch()}destroy(){this.onSkinProcessed.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ZONE_MAP_TAG"),(0,Q.Sn)("design:type",String)],UD.prototype,"_mapTag",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],UD.prototype,"onSkinProcessed",void 0),UD=(0,Q.Cg)([(0,X.EVk)("SkinManager",et.Y.festival)],UD)},88552:(q,K,z)=>{"use strict";z.d(K,{Z:()=>X});var Y=z(8674),Q=z(62459);let X=class extends Q.uAl{constructor(){super(...arguments),this.onClose=new Q.HN0}destroy(){this.onClose.dispose(),super.destroy()}run(){var q;this.onClose.dispatch(),null===(q=this.menu)||void 0===q||q.close()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"onClose",void 0),X=(0,Y.Cg)([(0,Q.EVk)("CloseMenu")],X)},95798:(q,K,z)=>{"use strict";z.d(K,{K:()=>Y,o:()=>st});var Y,Q=z(62459),X=z(95891),Z=z(35120),J=z(34829),tt=z(98623),et=z(30226),it=z(88022);!function(q){q[q.UP=0]="UP",q[q.UP_RIGHT=45]="UP_RIGHT",q[q.RIGHT=90]="RIGHT",q[q.DOWN_RIGHT=135]="DOWN_RIGHT",q[q.DOWN=180]="DOWN",q[q.DOWN_LEFT=225]="DOWN_LEFT",q[q.LEFT=270]="LEFT",q[q.UP_LEFT=315]="UP_LEFT"}(Y||(Y={}));class st extends tt.H{constructor(q,K,z,tt,et,st,nt=Y.UP,at,rt){var ot,ht;super(q,K,z.x,z.y),this.isBlocked=!1,this.data={},this.canReTrigger=!1,this.callback=null,this.frameCount=0,this.fired=!1,this.forceVisible=!1,this.data=z,this.user=tt,this.path=et,this.canReTrigger=X.get(z,"canReTrigger",!1),this.callback=rt?null:st;const ct=X.get(z,"guideHandPathToX",z.x),dt=X.get(z,"guideHandPathToY",z.y);let lt=nt;Q.Aq$.isDefined(lt)||(lt=z.x<50?z.y<50?Y.UP_LEFT:z.y>670?Y.DOWN_LEFT:Y.LEFT:z.x>1230?z.y<50?Y.UP_RIGHT:z.y>670?Y.DOWN_RIGHT:Y.RIGHT:z.y<50?Y.UP:z.y>60?Y.DOWN:Y.LEFT);const ut=this.add(Z.q.instance.prodigy.create.sprite(0,0,it._.General_core_json,"area-pointer"));ut.anchor.set(.5,0),ut.angle=lt,ut.inputEnabled=!0,ut.events.onInputDown.add(this.moveTo.bind(this,ct,dt)),this.handSprite=ut,rt&&z.disabledGraphic&&(this.forceVisible=!0,ut.visible=!1,this.add(Z.q.instance.prodigy.create.sprite(null!==(ot=z.arrowOffsetX)&&void 0!==ot?ot:0,null!==(ht=z.arrowOffsetY)&&void 0!==ht?ht:0,z.disabledGraphic,void 0,{x:.5,y:.5})));let ft=0;lt>Y.UP&<Y.DOWN&<<360&&(ft=30);let bt=0;lt>Y.LEFT||ltY.RIGHT&<null)){var K,z;this.callback=q,this.data.disabledGraphic&&(this.forceVisible=!0,this.handSprite.visible=!1,this.add(Z.q.instance.prodigy.create.sprite(null!==(K=this.data.arrowOffsetX)&&void 0!==K?K:0,null!==(z=this.data.arrowOffsetY)&&void 0!==z?z:0,this.data.disabledGraphic,void 0,{x:.5,y:.5})))}update(){if(super.update(),this.user.evtProc||this.fired&&!this.canReTrigger)return;if(!(this.frameCount<=0))return void this.frameCount--;this.frameCount=5;let q=!1;Q.Aq$.isDefined(this.data.r)&&Q.cj9.distance(this.user.x,this.user.y,this.x,this.y)<=this.data.r||!Q.Aq$.isDefined(this.data.r)&&Q.Aq$.isDefined(this.data.w)&&this.user.x>=this.x-Math.floor(this.data.w/2)&&this.user.x<=this.x+Math.floor(this.data.w/2)&&this.user.y>=this.y-Math.floor(this.data.h/2)&&this.user.y<=this.y+Math.floor(this.data.h/2)?q=!this.fired:this.canReTrigger&&(this.fired=!1),q&&(this.fired=!0,Q.Aq$.isDefined(this.callback)&&this.callback())}process(q,K,z=""){return this.visible=this.forceVisible,this.checkDistance(q,K,z)}setClosest(){this.visible=!0}getTarget(){return this.data.target}checkDistance(q,K,z){if(!Q.Aq$.isDefined(this.data.target)||!Q.Aq$.isDefined(z)||z===q.questHub&&q.getCurrentQuestID()!==q.finalQuestId)return null;if(`${q.ID}-${K.getTag()}`===z)return 1;const Y=(q,K,X)=>{if(!Q.Aq$.isDefined(X)||et.J.inArray(K,X))return null;if(z===X)return K.length+1;const Z=X.split("-"),J=q.getZone(Z[0]);if(!Q.Aq$.isDefined(J))return null;const tt=J.getMap(Z[1]).locations;let it=null;for(let z=0;z1180?Math.floor(.5*this.data.w):0),K=this.y+(this.data.y<100?-Math.floor(.5*this.data.h):this.data.y>620?Math.floor(.5*this.data.h):0),z=this.data.w*(this.data.x<100||this.data.x>1180?1:.5),Y=this.data.h*(this.data.y<100||this.data.y>620?1:.5));const X=this.game.add.graphics(0,0);return X.beginFill(0,.75),this.data.rect?X.drawRect(q-.5*z,K-.5*Y,z,Y):X.drawEllipse(q,K,z,Y),X}}},73797:(q,K,z)=>{"use strict";var Y,Q,X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt,St,At,Ct,Ot,It,Dt,Rt,Pt,Mt,Nt,xt,Lt,kt,Bt,Ut,Ft,Gt,jt,$t;z.d(K,{$i:()=>At,AU:()=>ut,B:()=>Bt,Bk:()=>gt,F0:()=>pt,GR:()=>$t,H3:()=>It,HG:()=>dt,Ii:()=>st,J3:()=>it,J8:()=>Tt,Lk:()=>Dt,RZ:()=>wt,Y1:()=>ht,_D:()=>Mt,bI:()=>xt,bS:()=>St,bv:()=>bt,cN:()=>at,f7:()=>Ct,fP:()=>ft,gJ:()=>vt,hw:()=>J,iZ:()=>Ot,ib:()=>Ut,ig:()=>nt,ki:()=>Lt,lT:()=>ot,lc:()=>X,n8:()=>Et,nN:()=>Nt,oI:()=>et,oL:()=>Gt,ph:()=>rt,pm:()=>yt,rF:()=>kt,sd:()=>mt,sn:()=>Ft,u0:()=>Z,vy:()=>jt,zg:()=>Rt,zr:()=>ct}),function(q){q.ShowDrops="Prodigy.Events.VictoryManager.SHOW_DROPS",q.Complete="Prodigy.Events.VictoryManager.COMPLETE"}(Y||(Y={})),function(q){q.Audio="Prodigy.Events.SystemMenu.REFRESH_AUDIO_MENU"}(Q||(Q={})),function(q){q.AddChild="Prodigy.Events.Screen.ADD_CHILD",q.GetLayer="Prodigy.Events.Screen.GET_LAYER",q.EnableBackground="Prodigy.Events.Screen.ENABLE_BACKGROUND",q.EnableContent="Prodigy.Events.Screen.ENABLE_CONTENT"}(X||(X={})),function(q){q.PlayerAdded="Prodigy.Events.WalkableScreen.PLAYER_ADDED",q.PlayerUpdate="Prodigy.Events.WalkableScreen.PLAYER_UPDATED"}(Z||(Z={})),function(q){q.Done="Prodigy.Events.FlyingStars.DONE",q.PippetStarsDone="Prodigy.Events.FlyingPippetStars.DONE",q.MemberStarsDone="Prodigy.Events.FlyingMemberStars.DONE"}(J||(J={})),function(q){q.Done="Prodigy.Events.OpenJar.DONE"}(tt||(tt={})),function(q){q.ItemsLost="Prodigy.Event.MemberJar.ITEMS_LOST",q.ItemsSaved="Prodigy.Event.MemberJar.ITEMS_SAVED"}(et||(et={})),function(q){q.GetIsRunning="Prodigy.Events.Battle.GET_IS_RUNNING",q.PopupClosed="Prodigy.Events.Battle.POPUP_CLOSED",q.EndBattle="Prodigy.Events.Battle.END_BATTLE",q.PvpComboIncrease="Prodigy.Events.Battle.PVP_COMBO_INCREASE",q.PvpComboBreak="Prodigy.Events.Battle.PVP_COMBO_BREAK",q.PvpUpdate="Prodigy.Events.Battle.PVP_UPDATE",q.PvpComboMeterMoveIn="Prodigy.Events.Battle.PVP_COMBO_METRE_MOVE_IN",q.PvpComboMeterMoveOut="Prodigy.Events.Battle.PVP_COMBO_METRE_MOVE_OUT"}(it||(it={})),function(q){q.DismissalOverlay="Prodigy.Events.RevampBattle.DISMISSAL_OVERLAY",q.Victory="Prodigy.Events.RevampBattle.VICTORY"}(st||(st={})),function(q){q.AnimationDone="Prodigy.Events.Creature.ANIMATION_DONE",q.LevelUp="Prodigy.Events.Creature.LEVEL_UP",q.AnyLevelUp="Prodigy.Events.Creature.ANY_LEVEL_UP",q.StarsAdded="Prodigy.Events.Creature.STARS_ADDED",q.PlayerLoaded="Prodigy.Events.Creature.PLAYER_LOADED",q.LevelUpAnimation="Prodigy.Events.Creature.LEVEL_UP_ANIMATION",q.ProcessedAllEvents="Prodigy.Events.Creature.PROCESSED_ALL_EVENTS",q.EvolveStart="Prodigy.Events.Creature.EVOLVE_START",q.EvolveEnd="Prodigy.Events.Creature.EVOLVE_END",q.Evolved="Prodigy.Events.Creature.EVOLVED",q.GearUpdate="Prodigy.Events.Creature.GEAR_UPDATE",q.Merged="Prodigy.Events.Creature.MERGED"}(nt||(nt={})),function(q){q.ShowPippetBattleBonus="Prodigy.Events.Chest.SHOW_PIPPET_BATTLE_BONUS",q.ShowMemberStars="Prodigy.Events.Chest.SHOW_MEMBER_STARS"}(at||(at={})),function(q){q.EnableDynamicLayer="Prodigy.Events.Map.ENABLE_DYNAMIC_LAYER"}(rt||(rt={})),function(q){q.Setup="Prodigy.Events.NetworkHandlers.SETUP",q.LoginError="Prodigy.Events.NetworkHandlers.LOGIN_ERROR",q.ArcadiaHandoffSuccess="Prodigy.Events.NetworkHandlers.ARCADIA_HANDOFF_SUCCESS",q.ArcadiaHandoffFailure="Prodigy.Events.NetworkHandlers.ARCADIA_HANDOFF_FAILURE"}(ot||(ot={})),function(q){q.HideHUD="Prodigy.Events.HUD.HIDE_HUD",q.ShowHUD="Prodigy.Events.HUD.SHOW_HUD",q.RefreshHUD="Prodigy.Events.HUD.REFRESH_HUD_ICONS",q.SetClickedWorldMap="Prodigy.Events.HUD.SET_CLICKED_WORLD_MAP",q.WorldMapOpened="Prodigy.Events.HUD.WORLD_MAP_OPENED",q.HideChatNotif="Prodigy.Events.HUD.HIDE_CHAT_NOTIF",q.ClosePetsMenu="Prodigy.Events.HUD.CLOSE_PETS_MENU",q.ShowRightSideHUD="Prodigy.Events.HUD.SHOW_RIGHT_HUD",q.HideRightSideHUD="Prodigy.Events.HUD.HIDE_RIGHT_HUD",q.RefreshWizardWatchAdCount="Prodigy.Events.HUD.REFRESH_WIZARD_WATCH_AD_COUNT",q.HighlightMapButton="Prodigy.Events.HUD.HIGHLIGHT_MAP_BUTTON",q.HidePetUpgradeNotification="Prodigy.Events.HUD.HIDE_PET_UPGRADE_NOTIFICATION",q.UpdateSocialNotification="Prodigy.Events.HUD.UPDATE_SOCIAL_NOTIFICATION",q.HUDRevampDemandAttention="Prodigy.Events.HUD.HUD_REVAMP_DEMAND_ATTENTION",q.HUDRevampStartOperation="Prodigy.Events.HUD.HUD_REVAMP_START_OPERATION",q.HUDRevampEndOperation="Prodigy.Events.HUD.HUD_REVAMP_END_OPERATION",q.HUDRevampButtonDataUpdated="Prodigy.Events.HUD.HUD_REVAMP_BUTTON_DATA_UPDATED",q.HUDRevampButtonVisibilityRefreshRequested="Prodigy.Events.HUD.HUD_REVAMP_BUTTON_VISIBILITY_REFRESH_REQUESTED",q.HUDRevampButtonAttentionGranted="Prodigy.Events.HUD.HUD_REVAMP_ATTENTION_GRANTED",q.HUDRevampExclusiveAttentionChanged="Prodigy.Events.HUD.HUD_REVAMP_EXCLUSIVE_ATTENTION_CHANGED",q.HUDAttentionManagerUpdated="Prodigy.Events.HUD.HUD_ATTENTION_MANAGER_UPDATED",q.CheckForHUDAttention="Prodigy.Events.HUD.CHECK_FOR_HUD_ATTENTION"}(ht||(ht={})),function(q){q.GetAllMailSuccess="Prodigy.Events.Mailer.GET_ALL_MAIL_SUCCESS",q.GetAllMailFailure="Prodigy.Events.Mailer.GET_ALL_MAIL_FAILURE",q.MarkAsRead="Prodigy.Events.Mailer.MARK_AS_READ",q.MarkAsReadFailure="Prodigy.Events.Mailer.MARK_AS_READ_FAILED",q.DeleteMailSuccess="Prodigy.Events.Mailer.DELETE_MAIL_SUCCESSFUL",q.DeleteMailFailure="Prodigy.Events.Mailer.DELETE_MAIL_FAILURE",q.UpdateMailCounters="Prodigy.Events.Mailer.UPDATE_MAIL_COUNTERS",q.ShowIndicator="Prodigy.Events.Mailer.SHOW_INDICATOR",q.GiftBoxOpened="Prodigy.Events.Mailer.GIFT_BOX_OPENED",q.CloseList="Prodigy.Events.Mailer.CLOSE_LIST"}(ct||(ct={})),function(q){q.Card="Card",q.ChatButton="chatButton",q.FriendsList="FriendsList",q.FriendsListOfActualFriends="FriendsListOfActualFriends",q.HUD="HUD",q.MailerButton="ProdigyMailerButton",q.Mailer="ProdigyMailer",q.MailView="ProdigyMailView",q.NetworkHandlers="NetworkHandlers",q.Titan="Titan",q.WeekendEventsLevelUp="WeekendEvents.AnyLevelUp"}(dt||(dt={})),function(q){q.OnGetDataComplete="Prodigy.Events.Boss.ON_GET_DATA_COMPLETE"}(lt||(lt={})),function(q){q.Update="Prodigy.Events.GameObj.UPDATE",q.PlayerInitialized="Prodigy.Events.GameObj.PLAYER_INITIALIZED"}(ut||(ut={})),function(q){q.Loaded="Prodigy.Events.Boot.LOADED"}(ft||(ft={})),function(q){q.WorkerLoadComplete="Prodigy.Events.Loading.WORKER_LOAD_COMPLETE",q.FestivalInitialized="Prodigy.Events.Loading.FESTIVAL_INITIALIZED",q.AnalyticsInitialized="Prodigy.Events.Loading.ANALYTICS_INITIALIZED"}(bt||(bt={})),function(q){q.ClickedHouseIcon="Prodigy.Events.House.CLICKED_HOUSE_ICON",q.OpenEditor="Prodigy.Events.House.OPEN_EDITOR",q.CloseEditor="Prodigy.Events.House.CLOSE_EDITOR"}(pt||(pt={})),function(q){q.InkBlasted="Prodigy.Events.ShipwreckShore.INK_BLASTED",q.InkGroupDestroyed="Prodigy.Events.ShipwreckShore.INK_GROUP_DESTROYED"}(vt||(vt={})),function(q){q.OnMouseWheel="Prodigy.Events.Input.ON_MOUSE_WHEEL"}(gt||(gt={})),function(q){q.GotFriendsList="Prodigy.Events.FriendsList.GOT_FRIENDS_LIST",q.GotFriendsListAppearance="Prodigy.Events.FriendsList.GOT_FRIENDS_LIST_APPEARANCE",q.GetTotalFriendRequests="Prodigy.Events.FriendsList.GET_TOTAL_FRIEND_REQUESTS",q.GetTotalFriendRequestsFailure="Prodigy.Events.FriendsList.GET_TOTAL_FRIEND_REQUESTS_FAILURE",q.ClearFriendRequestsCache="Prodigy.Events.FriendsList.CLEAR_FRIEND_REQUESTS_CACHE",q.GetFriendRequestList="Prodigy.Events.FriendsList.GET_FRIEND_REQUEST_LIST",q.GotFriendRequestList="Prodigy.Events.FriendsList.GOT_FRIEND_REQUEST_LIST",q.GetFriendList="Prodigy.Events.FriendsList.GET_FRIENDS_LIST",q.SetRequests="Prodigy.Events.FriendsList.SET_REQUESTS",q.SendRequest="Prodigy.Events.FriendsList.SEND_REQUEST",q.CancelRequest="Prodigy.Events.FriendsList.CANCEL_REQUEST",q.AcceptRequest="Prodigy.Events.FriendsList.ACCEPT_REQUEST",q.RejectRequest="Prodigy.Events.FriendsList.REJECT_REQUEST",q.RequestSent="Prodigy.Events.FriendsList.REQUEST_SENT",q.RequestCancelled="Prodigy.Events.FriendsList.REQUEST_CANCELLED",q.RequestReceived="Prodigy.Events.FriendsList.REQUEST_RECEIVED",q.RequestAccepted="Prodigy.Events.FriendsList.REQUEST_ACCEPTED",q.RequestRejected="Prodigy.Events.FriendsList.REQUEST_REJECTED",q.RemoveFriend="Prodigy.Events.FriendsList.REMOVE_FRIEND",q.FriendRemoved="Prodigy.Events.FriendsList.FRIEND_REMOVED",q.GetFriendshipStatus="Prodigy.Events.FriendsList.GET_FRIENDSHIP_STATUS",q.GotFriendshipStatus="Prodigy.Events.FriendsList.GOT_FRIENDSHIP_STATUS",q.FriendsAppearanceUpdated="Prodigy.Events.FriendsList.FRIENDS_APPEARANCE_UPDATED",q.IllogicalRequestAction="Prodigy.Events.FriendsList.ILLOGICAL_REQUEST_ACTION"}(mt||(mt={})),function(q){q.MovePlayer="Prodigy.Events.PlayerLocomotion.MOVE_PLAYER",q.StopPlayer="Prodigy.Events.PlayerLocomotion.STOP_PLAYER",q.GetTarget="Prodigy.Events.PlayerLocomotion.GET_TARGET"}(yt||(yt={})),function(q){q.SetBackgroundPanelTileDimensions="Prodigy.Events.LocationPage.SET_BACKGROUND_PANEL_TILE_DIMENSIONS",q.GetBackgroundPanelTileDimensions="Prodigy.Events.LocationPage.GET_BACKGROUND_PANEL_TILE_DIMENSIONS"}(_t||(_t={})),function(q){q.TabButtonClicked="Prodigy.Events.UI.TAB_BUTTON_CLICKED",q.TabSelected="Prodigy.Events.UI.TAB_SELECTED",q.ChildAdded="Prodigy.Events.UI.CHILD_ADDED",q.ChildRemoved="Prodigy.Events.UI.CHILD_REMOVED",q.MenuOpened="Prodigy.Events.UI.MENU_OPENED",q.FactoryMenuOpened="Prodigy.Events.UI.FACTORY_MENU_OPENED",q.FactoryMenuClosed="Prodigy.Events.UI.FACTORY_MENU_CLOSED",q.MountTogglePressed="Prodigy.Events.UI.MOUNT_TOGGLE_PRESSED",q.WorldMapZoneSelected="Prodigy.Events.UI.WORLD_MAP_ZONE_SELECTED",q.WorldMapDifficultyModeChanged="Prodigy.Events.UI.WORLD_MAP_DIFFICULTY_MODE_CHANGED",q.DialogClosed="prodigy.Events.UI.DIALOG_CLOSED",q.GotItemClosed="prodigy.Events.UI.GOT_ITEM_CLOSED",q.SegmentedOfferDialogClosed="prodigy.Events.UI.SEGMENTED_OFFER_DIALOG_CLOSED",q.RestrictionsClosed="Prodigy.Events.UI.RESTRICTIONS_CLOSED",q.FestivalProgressClosed="Prodigy.Events.UI.FESTIVAL_PROGRESS_CLOSED",q.FestivalVideoClosed="Prodigy.Events.UI.FESTIVAL_VIDEO_CLOSED"}(Et||(Et={})),function(q){q.GotTitans="Prodigy.Events.Titan.GOT_TITANS",q.GotTitan="Prodigy.Events.Titan.GOT_TITAN",q.Catapult="Prodigy.Events.Titan.CATAPULT"}(wt||(wt={})),function(q){q.PlayerAppearanceUpdated="Prodigy.Events.PlayerContainer.PLAYER_APPEARANCE_UPDATED",q.PlayerEditingMenuClosed="Prodigy.Events.PlayerContainer.PLAYEREDITINGMENUCLOSED",q.NewAnimationStateSet="Prodigy.Events.PlayerContainer.NEW_ANIMATION_STATE_SET",q.MorphMarbleUsed="Prodigy.Events.PlayerContainer.MORPH_MARBLE_USED",q.MorphMarbleCancelled="Prodigy.Events.PlayerContainer.MORPH_MARBLE_CANCELLED",q.MorphMarbleTimerUpdated="Prodigy.Events.PlayerContainer.MORPH_MARBLE_TIMER_UPDATED"}(Tt||(Tt={})),function(q){q.POST_MESSAGE_RECEIVED="Prodigy.Events.Web.POST_MESSAGE_RECEIVED"}(St||(St={})),function(q){q.TargetCollected="Prodigy.Events.Dungeon.TARGET_COLLECTED"}(At||(At={})),function(q){q.PagesCollected="Prodigy.Events.Achievements.PAGES_COLLECTED",q.ClaimedRewardsUpdated="Prodigy.Events.Achievements.CLAIMED_REWARDS_UPDATED"}(Ct||(Ct={})),function(q){q.ToolTipClosed="Prodigy.Events.ToolTip.CLOSE"}(Ot||(Ot={})),function(q){q.MembershipLapsedBetweenSessions="Prodigy.Events.Membership.LAPSED_BETWEEN_SESSIONS",q.MembershipResponseReceived="Prodigy.Events.Membership.RESPONSE_RECEIVED",q.MembershipRewardsFlowComplete="Prodigy.Events.Membership.REWARDS_FLOW_COMPLETE"}(It||(It={})),function(q){q.HardCurrencyPurchased="Prodigy.Events.HardCurrency.HARD_CURRENCY_PURCHASED"}(Dt||(Dt={})),function(q){q.PurchaseStarted="Prodigy.Events.DynamicStore.PURCHASE_STARTED",q.PurchaseSuccessful="Prodigy.Events.DynamicStore.PURCHASE_SUCCESSFUL",q.PurchaseFailed="Prodigy.Events.DynamicStore.PURCHASE_FAILED"}(Rt||(Rt={})),function(q){q.StarJarRedeemed="Prodigy.Events.PostBattleFlow.STAR_JAR_REDEEMED"}(Pt||(Pt={})),function(q){q.PuppetmasterWorldMapSpell="Prodigy.Events.EZoneUnlockScalingEvents.PUPPETMASTER_LOCKS_ZONES",q.PuppetmasterCutsceneComplete="Prodigy.Events.EZoneUnlockScalingEvents.PUPPETMASTER_CUTSCENE_COMPLETE"}(Mt||(Mt={})),function(q){q.PlayerGoalsOpenPanel="Prodigy.Events.EPlayerGoalsQuestEvent.PLAYER_GOALS_OPEN_PANEL",q.PlayerGoalsPanelClosed="Prodigy.Events.EPlayerGoalsQuestEvent.PLAYER_GOALS_PANEL_CLOSED",q.PlayerGoalsClosed="Prodigy.Events.EPlayerGoalsQuestEvent.PLAYER_GOALS_CLOSED"}(Nt||(Nt={})),function(q){q.ReceivedPetGear="Prodigy.Events.PET_GEAR.RECEIVED_PET_GEAR",q.FtueStarted="Prodigy.Events.PET_GEAR.FTUE_STARTED",q.FtueCompleted="Prodigy.Events.PET_GEAR.FTUE_COMPLETED",q.PetGearAdClicked="Prodigy.Events.PetGear.AD_CLICKED"}(xt||(xt={})),function(q){q.AbleToMerge="Prodigy.Event.PET_MERGE.ABLE_TO_MERGE",q.FtueStarted="Prodigy.Events.PET_MERGE.FTUE_STARTED",q.FtuePetMenuOpened="Prodigy.Events.FTUE_PET_MERGE.PET_MENU_OPEN",q.FtueMergeModalLoaded="Prodigy.Events.FTUE_PET_MERGE.MERGE_MODAL_LOADED",q.FtueCompleted="Prodigy.Events.PET_MERGE.FTUE_COMPLETED"}(Lt||(Lt={})),function(q){q.CountdownStarted="Prodigy.Events.DailyLoginCalendar.COUNTDOWN_STARTED",q.CountdownTask="Prodigy.Events.DailyLoginCalendar.COUNTDOWN_TASK",q.ReadyToCollect="Prodigy.Events.DailyLoginCalendar.READY_TO_COLLECT",q.CalendarEnding="Prodigy.Events.DailyLoginCalendar.CALENDAR_ENDING",q.CalendarEnded="Prodigy.Events.DailyLoginCalendar.CALENDAR_ENDED",q.CalendarTimeRemaining="Prodigy.Events.DailyLoginCalendar.CALENDAR_TIME_REMAINING"}(kt||(kt={})),function(q){q.SlotVisibilityChanged="Prodigy.Events.SLOT_VISIBILITY_CHANGED"}(Bt||(Bt={})),function(q){q.ItemConsumed="Prodigy.Events.Item.ITEM_CONSUMED",q.ItemReceived="Prodigy.Events.Item.ITEM_RECEIVED"}(Ut||(Ut={})),function(q){q.HardModeFtueStepAdvanced="Prodigy.Events.CampaignReplayFtue.HARD_MODE_FTUE_STEP_ADVANCED",q.HardModeFtueCanceled="Prodigy.Events.CampaignReplayFtue.HARD_MODE_FTUE_CANCELLED",q.HardModeFtueCompleted="Prodigy.Events.CampaignReplayFtue.HARD_MODE_FTUE_COMPLETED"}(Ft||(Ft={})),function(q){q.HardModeJustUnlocked="Prodigy.Events.CampaignReplay.HARD_MODE_JUST_UNLOCKED",q.ExpertModeJustUnlocked="Prodigy.Events.CampaignReplay.EXPERT_MODE_JUST_UNLOCKED",q.DifficultyUnlockRequestFailed="Prodigy.Events.CampaignReplay.DIFFICULTY_UNLOCK_REQUEST_FAILED",q.DifficultyModeChangeFailed="Prodigy.Events.CampaignReplay.DIFFICULTY_MODE_CHANGE_FAILED"}(Gt||(Gt={})),function(q){q.FtueStepAdvanced="Prodigy.Events.AfterSchoolWidget.FTUE_STEP_ADVANCED",q.FtueFunnelProgressionStepComplete="Prodigy.Events.AfterSchoolWidget.FTUE_FUNNEL_PROGRESSION_STEP_COMPLETE"}(jt||(jt={})),function(q){q.ObjectiveUpdated="Prodigy.Events.Objectives.OBJECTIVE_UPDATED"}($t||($t={}))},79421:(q,K,z)=>{"use strict";z.d(K,{N:()=>tt});var Y=z(62459),Q=z(88022),X=z(35120),Z=z(34829),J=z(59968);class tt extends J.R{constructor(q,K,z,Z,J,tt,et,it,st,nt){super(q,K,et,null,J,tt),this.sprite=null,this.animWalk=null,this.animStand=null,this.head=null,this.indicator=null,this.nameOffsetX=-5,5===st&&this.nameText.GameObject.legacyTransform.group.position.set(0,-135),this.sprite=this.sprites.addChild(X.q.instance.prodigy.create.sprite(0,0,Q._.Npc_sprite_gnome_json,"npc_0",void 0,this.onTextureLoaded.bind(this))),this.sprite.x-=Math.floor(this.sprite.width/2),this.sprite.y=-this.sprite.height,this.head=X.q.instance.prodigy.create.element(this.sprites,this.sprite.x,0);const at=13-(2===st||3===st||4===st?5:5===st?20:6===st?22:0),rt=this.head.add(X.q.instance.prodigy.create.sprite(at,0,Q._.Npc_sprite_gnome_json,`hat_${Y.Aq$.isDefined(st)?st:1}`));rt.y=10-rt.height;const ot=this.head.add(X.q.instance.prodigy.create.sprite(0,0,Q._.Npc_sprite_gnome_json,`head_${Y.Aq$.isDefined(it)?it:1}`));Y.Aq$.isDefined(nt)&&(ot.inputEnabled=!0,ot.events.onInputDown.add((()=>{this.clicked(z,Z,nt)})),rt.inputEnabled=!0,rt.events.onInputDown.add((()=>{this.clicked(z,Z,nt)})),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add((()=>{this.clicked(z,Z,nt)}))),this.stand(),this.showName(),this.repositionName()}onTextureLoaded(q){q&&(this.animWalk=q.animations.addIfFound("walk",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),this.animWalk.frame=0,this.animStand=q.animations.addIfFound("stand",["npc_8","npc_9","npc_10","npc_11","npc_12","npc_13","npc_14","npc_15"],10,!0),this.animStand.frame=0)}flip(){super.flip(),this.repositionName()}update(){if(super.update(),Y.Aq$.isDefined(this.animWalk)&&Y.Aq$.isDefined(this.animStand)){let q="npc_0";1===this.mode?q=this.animStand.currentFrame.name:0===this.mode&&(q=this.animWalk.currentFrame.name),Y.Aq$.isDefined(this.head)&&(this.head.y=this.sprite.y-15+tt.frameOffsets[q])}}setIndicator(q){Y.Aq$.isDefined(this.indicator)||(this.indicator=X.q.instance.prodigy.create.sprite(0,-70,Q._.General_icons_json,q),this.indicator.anchor.set(.5,1),this.indicatorE.add(this.indicator),this.game.add.tween(this.indicator,this).to({y:this.indicator.y-50},1e3,Y.GS3.Quadratic.InOut,!0,0,Z.s.MAX_SAFE_INTEGER,!0)),this.indicator.frameName=q}clicked(q,K,z){K.findPath(q.x,q.y,this.x-20,this.y+20,!0).then((K=>{K&&q.setPath(K,(()=>{null==z||z()}))})).catch(Y.RQr.createHandler("Unable to find path to gnome")),this.sendNpcClickedEvent()}repositionName(){this.nameText.GameObject.legacyTransform.x=Math.round((this.sprites.scale.x<0?-1:1)*this.nameOffsetX)}}tt.frameOffsets={npc_0:0,npc_1:0,npc_2:2,npc_3:1,npc_4:0,npc_5:0,npc_6:2,npc_7:1,npc_8:0,npc_9:0,npc_10:1,npc_11:2,npc_12:4,npc_13:5,npc_14:4,npc_15:3}},96535:(q,K,z)=>{"use strict";z.d(K,{U:()=>J});var Y=z(62459),Q=z(35120),X=z(59968),Z=z(88022);class J extends X.R{constructor(q,K,z,Y,X,J,tt){super(q,K,tt,null,z,Y),this.body=this.add(Q.q.instance.prodigy.create.sprite(-35,0,Z._.Npc_sprite_cebollini_json,"mini",void 0,this.onTextureLoaded.bind(this))),this.body.anchor.set(0,1),this.sprites.addChild(this.body),this.nameText.GameObject.legacyTransform.y+=40,this.showName()}onTextureLoaded(q){q&&(q.animations.add("stand",["mini","mini1","mini2","mini3","mini2","mini1"],10,!0,!1),q.animations.play("stand",void 0,!1))}bossStart(q){this.rightArm=this.add(Q.q.instance.prodigy.create.sprite(50,-30,Z._.Npc_sprite_cebollini_json,"hand_1")),this.body=this.add(Q.q.instance.prodigy.create.sprite(-40,-90,Z._.Npc_sprite_cebollini_json,"body")),this.head=this.add(Q.q.instance.prodigy.create.sprite(-20,-45,Z._.Npc_sprite_cebollini_json,"face_1")),this.hat=this.add(Q.q.instance.prodigy.create.sprite(-55,-135,Z._.Npc_sprite_cebollini_json,"hat_0")),this.leftArm=this.add(Q.q.instance.prodigy.create.sprite(-50,-30,Z._.Npc_sprite_cebollini_json,"hand_2")),this.sprites.addChild(this.rightArm),this.sprites.addChild(this.body),this.sprites.addChild(this.head),this.sprites.addChild(this.hat),this.sprites.addChild(this.leftArm),q.add.tween(this.head,this).to({y:"-=1"},200,Y.GS3.Linear.None).to({y:"+=2"},500,Y.GS3.Linear.None).to({y:this.head.y},400,Y.GS3.Linear.None).loop(!0).start(),q.add.tween(this.hat,this).to({y:"-=1"},200,Y.GS3.Linear.None).to({y:"+=2"},500,Y.GS3.Linear.None).to({y:this.hat.y},400,Y.GS3.Linear.None).loop(!0).start(),q.add.tween(this.leftArm,this).to({y:"+=2"},800,Y.GS3.Linear.None).delay(600).to({y:this.leftArm.y},800,Y.GS3.Linear.None).loop(!0).start(),this.rightArm.frameName="spatula_0",this.rightArm.y=this.rightArm.y-60,this.rightArm.x=this.rightArm.x-15}entreeStart(){this.rightArm.frameName="spatula_1",this.rightArm.x=this.rightArm.x+15,this.hat.frameName="hat_1"}dessertStart(){this.hat.frameName="hat_2",this.hat.x=this.hat.x-20,this.hat.y=this.hat.y-5,this.head.frameName="face_2"}}},86949:(q,K,z)=>{"use strict";z.d(K,{u:()=>Y});class Y{constructor(){this.gameObject=null}create(){}update(){}destroy(){}hasUniqueInstance(){return!1}}},19273:(q,K,z)=>{"use strict";z.d(K,{_:()=>Z});var Y=z(62459),Q=z(35120),X=z(57308);class Z extends X.Y{constructor(q,K,z,Y=0,X=0){let Z;for(super(q,K),this.initialized=!1,this.components=[],this.metricsManager=Q.q.instance.prodigy.gameContainer.get("a92-c640"),this.metricsManager.objectCreated("GameObject"),Z=0;Z{"use strict";z.d(K,{j:()=>it});var Y=z(59838),Q=z(62459),X=z(35120),Z=z(31427);class J extends Z.A{constructor(q,K){super(q,K)}create(){super.create(),this.sprite=X.q.instance.prodigy.create.image(0,0,"",""),this.gameObject.add(this.sprite),this.sprite.position.set(0,0),this.updateSource()}postLoad(q,K){K&&(this.updateSpriteSource(),this.onLoaded.dispatch())}setAnchor(q,K){this.sprite.anchor.set(q,K)}setScale(q,K){this.sprite.scale.set(q,K)}getScale(){return this.sprite.scale}getWorld(){return this.sprite.world}getWidth(){return this.sprite.width}getHeight(){return this.sprite.height}setAlpha(q){this.sprite.alpha=q}setPosition(q,K){this.sprite.position.set(q,K)}draggingStopped(){this.resetAfterDrag&&(this.gameObject.x+=this.sprite.x,this.gameObject.y+=this.sprite.y,this.sprite.x=0,this.sprite.y=0)}getEvents(){return this.sprite.events}setInputEnabled(q=!0){Q.Aq$.isDefined(this.sprite)?(this.sprite.inputEnabled=!0,q?this.sprite.events.onDragStop.add(this.draggingStopped,this,-99):this.sprite.events.onDragStop.remove(this.draggingStopped,this)):this.onLoaded.addOnce(this.setInputEnabled,this,0,q)}enableDragging(q,K,z,Y){this.sprite.inputEnabled&&(this.sprite.input.enableDrag(q,K),void 0!==z&&void 0!==Y&&this.sprite.input.enableSnap(z,Y))}disableDragging(){this.sprite.inputEnabled&&this.sprite.input.disableDrag()}getBounds(){const q=this.sprite.getBounds(),K=this.getWorld();return new Q.M_G(K.x,K.y,q.width,q.height)}resetToOrigin(){this.sprite&&(this.sprite.x=0,this.sprite.y=0)}setAsset(q,K){"singleImage"===K.type&&(this.source=q,this.metadata=K,this.updateSource())}updateSource(){X.q.instance.game.cache.checkImageKey(this.source)?(this.updateSpriteSource(),this.onLoaded.dispatch()):X.q.instance.prodigy.load.assets([this.source],this.postLoad.bind(this))}updateSpriteSource(){var q;null===(q=this.sprite)||void 0===q||q.loadTexture(this.source),Q.Aq$.isDefined(this.metadata.frame)&&(this.sprite.frame=this.metadata.frame)}getInputHandler(){return Q.Aq$.isDefined(this.sprite)?this.sprite.input:null}setAngle(q){this.sprite.angle=q}hasAnimations(){return Q.Aq$.isDefined(this.sprite.animations.frameData)}getAnimationLength(q){return this.sprite.animations.frameData?this.sprite.animations.frameData.total:0}playAnimation(q,K,z){this.sprite.animations.frame=z,this.sprite.animations.play(q,void 0,K)}destroy(){this.sprite&&(this.sprite.destroy(),this.sprite=null),super.destroy()}}var tt=z(34829);class et extends J{constructor(q,K){super(q,K)}setAsset(q,K){if("spritesheet"===K.type){this.source=q,this.metadata=K,this.sprite.animations.stop();for(let q=0;q{"use strict";z.d(K,{A:()=>Z});var Y=z(62459),Q=z(68910),X=z(86949);class Z extends X.u{constructor(q,K){super(),this.resetAfterDrag=!1,this.source=q,this.metadata=K,this.onLoaded=new Y.HN0}create(){super.create()}setAnchor(q,K){}setScale(q,K){}getScale(){return new Q.Point(1,1)}setAlpha(q){}setPosition(q,K){}getWorld(){return new Q.Point}getWidth(){return 0}getHeight(){return 0}getEvents(){return null}setInputEnabled(q=!0){}enableDragging(q,K,z,Y){}disableDragging(){}draggingStopped(){}getBounds(){return new Y.M_G(0,0,0,0)}resetToOrigin(){}hasAnimations(){return!1}getAnimationLength(q){return 0}playAnimation(q,K,z){}setAsset(q,K){}getInputHandler(){return null}setAngle(q){}hasUniqueInstance(){return!0}destroy(){super.destroy()}}},59838:(q,K,z)=>{"use strict";z.d(K,{F:()=>it});var Y=z(62459),Q=z(95891),X=z(68910),Z=z(35120),J=z(34829),tt=z(88022),et=z(31427);class it extends et.A{constructor(q,K){super(q,K),this.spine=null,this.spineInputSlot=null,this.inputSprite=null,this.inputGroup=null,this._defaultScale=new X.Point(1,1),this._destroyed=!1;const z=this.metadata;this.anchor=new X.Point(0,0),this._game=Z.q.instance.game,Y.Aq$.isDefined(z.anchor)?this.spineAnchor=new X.Point(Y.Aq$.isDefined(z.anchor.x)?z.anchor.x:.5,Y.Aq$.isDefined(z.anchor.y)?z.anchor.y:0):this.spineAnchor=new X.Point(.5,0),this.spineInputSlot=null,this.inputSprite=null,this.dragOffset=new X.Point(0,0)}create(){super.create(),this.updateSource()}postLoad(q,K){K&&(this.updateSpineSource(),this.onLoaded.dispatch())}updateSource(){if(Y.Aq$.isDefined(this.source)){const q=this._game.cache.checkJSONKey(this.source),K=this._game.cache.checkImageKey(`${this.source}.png`),z=this._game.cache.checkTextKey(`${this.source}Atlas`),Y=this._game.cache.checkSpineKey(this.source);q&&K&&z||Y?(this.updateSpineSource(),this.onLoaded.dispatch()):Z.q.instance.prodigy.load.assets([this.source],this.postLoad.bind(this))}}updateSpineSource(){if(!this.spine&&this.gameObject&&this._game){this.spine=this._game.add.spine(0,0,this.source,this.gameObject),this.spine.setToSetupPose();const q=this.spine.skeleton.findSlot("input_hitbox");if(q){const K=this.spine.getSlotContainer(q);if(K){this.spineInputSlot=q,K.getChildAt(0).alpha=0;const z=q.getAttachment();this.dragOffset.set(.5*K.width-z.x-(q.bone?q.bone.x+q.bone.skeleton.getRootBone().x:0),.5*K.height+z.y+(q.bone?q.bone.y+q.bone.skeleton.getRootBone().y:0)),this.inputGroup=Z.q.instance.prodigy.create.group(this.gameObject),this.inputGroup.position.set(this.spine.x-this.dragOffset.x,this.spine.y-this.dragOffset.y),this.inputSprite=this.inputGroup.addChild(Z.q.instance.prodigy.create.image(0,0,tt._.General_core_json,"overlay-small")),this.inputSprite.alpha=0,this.inputSprite.width=K.width,this.inputSprite.height=K.height}}this.resetToOrigin()}}setAsset(q,K){var z;"spine"===K.type&&(this.source=q,this.metadata=K,null===(z=this.spine)||void 0===z||z.destroy(),this.spine=null,this.updateSource())}setAnchor(q,K){if(this.spine){const z=this.getAnchorOffset(),Y=this.getSpineAnchorOffset();this.anchor.x=q,this.anchor.y=K,this.setPosition(this.spine.x+z.x-Y.x,this.spine.y+z.y-Y.y)}else this._destroyed||this.onLoaded.addOnce((()=>this.setAnchor(q,K)))}setScale(q,K){if(this.spine){const z=this.getAnchorOffset(),Y=this.getSpineAnchorOffset();this.spine.scale.x=q,this.spine.scale.y=K,this.setPosition(this.spine.x+z.x-Y.x,this.spine.y+z.y-Y.y)}else this._destroyed||this.onLoaded.addOnce(this.setScale,this,0,q,K)}getScale(){return this.spine?this.spine.scale:this._defaultScale}setAlpha(q){if(this.spine){const K=this.spine.skeleton;for(let z=0;z{"use strict";var Y;z.d(K,{T:()=>Y}),function(q){q[q.Top=1]="Top",q[q.Middle=2]="Middle",q[q.Bottom=4]="Bottom",q[q.Left=8]="Left",q[q.Center=16]="Center",q[q.Right=32]="Right",q[q.TopLeft=9]="TopLeft",q[q.TopCenter=17]="TopCenter",q[q.TopRight=33]="TopRight",q[q.MiddleLeft=10]="MiddleLeft",q[q.MiddleCenter=18]="MiddleCenter",q[q.MiddleRight=34]="MiddleRight",q[q.BottomLeft=12]="BottomLeft",q[q.BottomCenter=20]="BottomCenter",q[q.BottomRight=36]="BottomRight"}(Y||(Y={}))},9976:(q,K,z)=>{"use strict";z.d(K,{E:()=>Z});var Y,Q=z(62459),X=z(47332);!function(q){q[q.Normal=0]="Normal",q[q.Bold=1]="Bold",q[q.Italic=2]="Italic",q[q.BoldAndItalic=3]="BoldAndItalic"}(Y||(Y={}));class Z extends Q.uAl{constructor(){super(...arguments),this.textSource=null,this.alignment=X.T.TopLeft,this.textObject=null}get TextObject(){return this.textObject}set Source(q){null!==this.textSource&&this.textSource.OnTextChanged.removeAll(this),this.textSource=q,this.textSource.OnTextChanged.add(this.updateText,this),this.updateText()}get Source(){return this.textSource}set Font(q){Q.dBt[q]?this.textObject.font=Q.dBt[q]:this.textObject.font=Q.dBt.LuckiestGuy,this.updateAlignment()}get Font(){return this.textObject.font}set FontStyle(q){this.textObject.fontStyle=(q&Y.Italic)===Y.Italic?Q.EQV.Italic:Q.EQV.Normal,this.textObject.fontWeight=(q&Y.Bold)===Y.Bold?Q.vLr.Bold:Q.vLr.Normal,this.updateAlignment()}get FontStyle(){let q=Y.Normal;return"italic"===this.textObject.fontStyle&&(q|=Y.Italic),"bold"===this.textObject.fontWeight&&(q|=Y.Bold),q}set FontSize(q){this.textObject.fontSize=q,this.updateAlignment()}get FontSize(){return this.textObject.fontSize}set LineSpacing(q){this.textObject.lineSpacing=q,this.updateAlignment()}get LineSpacing(){return this.textObject.lineSpacing}set Alignment(q){this.alignment=q,this.updateAlignment()}get Alignment(){return this.alignment}set FillColor(q){this.isValidColor(q)?this.textObject.fill=q:Q.VyI.log(`Fill color was provided was not a valid color ${q}.`,Q.$bb.Warning)}get FillColor(){return this.textObject.fill}set BlendMode(q){this.textObject.TextObject.blendMode=q}get BlendMode(){return this.textObject.TextObject.blendMode}set StrokeColor(q){this.isValidColor(q)?this.textObject.stroke=q:Q.VyI.log(`Stroke color was provided was not a valid color ${q}.`,Q.$bb.Warning)}get StrokeColor(){return this.textObject.stroke}set StrokeThickness(q){this.textObject.strokeThickness=q,this.updateAlignment()}get StrokeThickness(){return this.textObject.strokeThickness}set ShadowAlpha(q){this.textObject.dropShadowAlpha=q,this.updateAlignment()}get ShadowAlpha(){return this.textObject.dropShadowAlpha}set ShadowAngle(q){this.textObject.dropShadowAngle=q,this.updateAlignment()}get ShadowAngle(){return this.textObject.dropShadowAngle}set ShadowColor(q){this.isValidColor(q)?this.textObject.dropShadowColor=q:Q.VyI.log(`Shadow color was provided was not a valid color ${q}.`,Q.$bb.Warning)}get ShadowColor(){return this.textObject.dropShadowColor}set ShadowBlur(q){this.textObject.dropShadowBlur=q}get ShadowBlur(){return this.textObject.dropShadowBlur}set ShadowDistance(q){this.textObject.dropShadowDistance=q,this.updateAlignment()}get ShadowDistance(){return this.textObject.dropShadowDistance}set TextConfig(q){Q.Aq$.isDefined(q.font)&&(this.Font=q.font),Q.Aq$.isDefined(q.fontSize)&&(this.FontSize=q.fontSize),Q.Aq$.isDefined(q.fontWeight)&&("bold"===q.fontWeight?this.FontStyle=Y.Bold:this.FontStyle=Y.Normal),Q.Aq$.isDefined(q.fill)&&(this.FillColor=q.fill),Q.Aq$.isDefined(q.blendMode)&&(this.BlendMode=q.blendMode),Q.Aq$.isDefined(q.stroke)&&(this.StrokeColor=q.stroke),Q.Aq$.isDefined(q.strokeThickness)&&(this.StrokeThickness=q.strokeThickness),Q.Aq$.isDefined(q.shadowAlpha)&&(this.ShadowAlpha=q.shadowAlpha),Q.Aq$.isDefined(q.shadowAngle)&&(this.ShadowAngle=q.shadowAngle),Q.Aq$.isDefined(q.shadowDistance)&&(this.ShadowDistance=q.shadowDistance),Q.Aq$.isDefined(q.shadowColor)&&(this.ShadowColor=q.shadowColor),Q.Aq$.isDefined(q.shadowBlur)&&(this.ShadowBlur=q.shadowBlur)}get TextWidth(){return this.textObject.TextObject.width}get TextHeight(){return this.textObject.TextObject.height}create(){super.create(),this.textObject=new Q.EYj,this.textObject.GameObject=this.GameObject,this.textObject.create();const q=this.textObject.TextObject;q.visible=this.Active,this.GameObject.legacyTransform.group.addChild(q),this.OnActiveChanged.add((()=>q.visible=this.Active))}destroy(){this.textSource&&this.textSource.OnTextChanged.removeAll(this),this.textSource=null,this.textObject.destroy(),this.textObject=null,this.OnActiveChanged.dispose(),super.destroy()}setText(q){this.Source instanceof Q.uFU&&this.Source.getText()===q||(this.Source=new Q.uFU(q))}updateText(){null===this.textObject?Q.VyI.log("Trying to update the text on a Text component before the text object was created.",Q.$bb.Warning):(this.textObject.text=this.Source.getText(),this.updateAlignment())}updateAlignment(){const q=this.Alignment,K=this.textObject.TextObject;(q&X.T.Center)===X.T.Center?(K.x=-Math.round(.5*K.width),this.textObject.align=Q.If$.Center):(q&X.T.Right)===X.T.Right?(K.x=-K.width,this.textObject.align=Q.If$.Right):(K.position.x=0,this.textObject.align=Q.If$.Left),(q&X.T.Middle)===X.T.Middle?K.position.y=-Math.round(.5*K.height):(q&X.T.Bottom)===X.T.Bottom?K.position.y=-K.height:K.position.y=0}isValidColor(q){return!!/^#[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8}$/.test(q)}}},75017:(q,K,z)=>{"use strict";z.d(K,{p:()=>Y});class Y{}Y.BUY_ITEM_FLAVOUR_TEXT="PLAY_AT_HOME_BUY_ITEM",Y.DEFAULT={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests"},Y.MEMBER_HUD={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_MEMBER_HUD"},Y.NOT_MEMBER_HUD={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_NOT_MEMBER_HUD"},Y.TWILIGHT_WHEEL={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_TWILIGHT_WHEEL"},Y.MEMBER_BOUNTY={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_MEMBER_BOUNTY"},Y.MEMBER_CHESTS={frameName:"icons/member-chests",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_MEMBER_CHESTS"},Y.BUDDIES={frameName:"icons/cute-and-cool-buddies",trackingEvent:"Feature-Buddies",flavourText:Y.BUY_ITEM_FLAVOUR_TEXT},Y.HOUSE_ITEMS={frameName:"icons/special-house-furniture",trackingEvent:"Feature-HouseItems",flavourText:Y.BUY_ITEM_FLAVOUR_TEXT},Y.NEW_HOUSE={frameName:"icons/new-house",trackingEvent:"Feature-NewHouse",flavourText:Y.BUY_ITEM_FLAVOUR_TEXT},Y.MORE_GOLD={frameName:"icons/more-gold",trackingEvent:"Feature-MoreGold",flavourText:"PLAY_AT_HOME_MORE_GOLD"},Y.MORE_EXP={frameName:"icons/level-faster",trackingEvent:"Feature-LevelFaster",flavourText:"PLAY_AT_HOME_MORE_EXP"},Y.MORE_EXP_CLASS_LEADERS={frameName:"icons/level-faster",trackingEvent:"Feature-LevelFaster",flavourText:"PLAY_AT_HOME_MORE_EXP_CLASS_LEADERS"},Y.WHEEL_SPIN={frameName:"icons/more-spins",trackingEvent:"Feature-MoreSpins",flavourText:"PLAY_AT_HOME_WHEEL_SPIN"},Y.MEMBER_PETS={frameName:"icons/catch-more-pets",trackingEvent:"Feature-MorePets",flavourText:"PLAY_AT_HOME_MEMBER_PETS"},Y.CATCH={frameName:"icons/second-catch",trackingEvent:"Feature-SecondCatchChance"},Y.BOOSTS={frameName:"icons/minigame-boosts",trackingEvent:"Feature-MinigameBoosts"},Y.STYLE={frameName:"icons/cool-new-styles",trackingEvent:"Feature-NewStyles",flavourText:Y.BUY_ITEM_FLAVOUR_TEXT},Y.TOWER={frameName:"icons/climb-the-dark-tower",trackingEvent:"Feature-DarkTower",flavourText:"PLAY_AT_HOME_TOWER"},Y.POTIONS={frameName:"icons/potions",trackingEvent:"Feature-PowerfulPotions",flavourText:Y.BUY_ITEM_FLAVOUR_TEXT},Y.DANCE={frameName:"icons/dab-dance",trackingEvent:"Feature-Dab",flavourText:"PLAY_AT_HOME_DANCE"},Y.CLOUD_MOUNT={frameName:"icons/cloud-mount",trackingEvent:"Feature-CloudMount"},Y.MORPH_MARBLE={frameName:"icons/morph-marble",trackingEvent:"Feature-MorphMarble",flavourText:Y.BUY_ITEM_FLAVOUR_TEXT},Y.BUY_ITEM={frameName:"icons/iconbox-TEST",trackingEvent:"PremiumItems",flavourText:Y.BUY_ITEM_FLAVOUR_TEXT},Y.PREMIUM_ITEM={frameName:"icons/iconbox-TEST",trackingEvent:"PremiumItems",flavourText:"PLAY_AT_HOME_PREMIUM_ITEM"},Y.VISIT_HOUSE={frameName:"icons/friends-visit-house",trackingEvent:"Feature-VisitHouse"},Y.BIGGER_ROSTER={frameName:"icons/iconbox-TEST",trackingEvent:"BiggerRoster"},Y.NICKNAME={frameName:"icons/iconbox-TEST",trackingEvent:"Nickname",flavourText:"PLAY_AT_HOME_NICKNAME"},Y.EVOLVE_PETS={frameName:"icons/evolve-pets",trackingEvent:"Nickname",flavourText:"PLAY_AT_HOME_EVOLVE_PETS"}},37193:(q,K,z)=>{"use strict";z.d(K,{i:()=>X});var Y=z(88022),Q=z(66582);class X{}X.PLAYER_MEMBERSHIP_ICON_IMAGES={[Q._$.NonMember]:void 0,[Q._$.MemberLevelUp]:void 0,[Q._$.MemberUltimateMath]:void 0,[Q._$.MemberUltimateBundle]:void 0,[Q._$.MemberCore]:{atlas:Y._.Ui_member_tiers_json,frame:"core-membership-icon-name-small"},[Q._$.MemberPlus]:{atlas:Y._.Ui_member_tiers_json,frame:"plus-membership-icon-name-small"},[Q._$.MemberUltra]:{atlas:Y._.Ui_member_tiers_json,frame:"ultra-membership-icon-name-small"}}},77981:(q,K,z)=>{"use strict";var Y;z.d(K,{r:()=>Y}),function(q){q.Math="MATH",q.English="ENGLISH",q.UltimateBundle="MATH_ENGLISH_BUNDLE"}(Y||(Y={}))},89305:(q,K,z)=>{"use strict";z.d(K,{Sz:()=>et,g1:()=>tt,jK:()=>nt,nO:()=>st,nQ:()=>it,ty:()=>at});var Y=z(8674),Q=z(62459),X=z(66582),Z=z(35120),J=z(66207);function tt(q){return J.D.isFeatureEnabled()&&q>0?`MEMBERSHIP_TIER_${q}_SHORT_NAME_STRATIFICATION`:`MEMBERSHIP_TIER_${q}_SHORT_NAME`}function et(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){if(q.player.hasMembershipUpgradeOptions()){K.purchase.sendFunnelHandoff("Membership-Upgrade-IFrame",{purchaseOrder:it(z)});const Y=Z.q.instance.prodigy.gameContainer.get("ddf-6c82"),Q=yield q.getActiveMembershipId(),X=J.D.isFeatureEnabled()?`?group=science_variant_${J.D.getVariantForUpgrading()}`:"",tt=Z.q.instance.prodigy.gameContainer.get("f6c-ff5c");yield tt.createIFrame(Y.getMembershipUpgradeUrl(Q).concat(X),"upgrade-iframe-closed")}else at()}))}function it(q){if(J.D.isFeatureEnabled())switch(q){case"tier_1":return X.rH[X._$.MemberCore];case"tier_2":return X.rH[X._$.MemberPlus];case"tier_3":return X.rH[X._$.MemberUltra];default:return""}else switch(q){case"tier_1":return X.rH[X._$.MemberLevelUp];case"tier_2":case"tier_3":return X.rH[X._$.MemberUltimateMath];default:return""}}function st(q){return Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").activeMemberships.map((q=>{var K;return null!==(K=q.categories)&&void 0!==K?K:[]})).some((K=>K.includes(q)))}function nt(q){switch(q){case X._$.MemberCore:case X._$.MemberLevelUp:return"tier_1";case X._$.MemberPlus:case X._$.MemberUltimateMath:return"tier_2";case X._$.MemberUltra:case X._$.MemberUltimateBundle:default:return"tier_3"}}function at(){const q=Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("MEMBERSHIP_UPGRADES_UNAVAILABLE");Z.q.instance.prodigy.open.messageBoxOkay(q)}},91462:(q,K,z)=>{"use strict";z.d(K,{M:()=>Gt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(62886),tt=z(35120),et=(z(34829),z(1195)),it=z(48235),st=z(44367);class nt extends st.z{static applyCheckoutStyling(q){document.getElementsByTagName("body")[0].className=q?nt.CHECKOUT_STYLE_CLASS_NAME:null}}nt._featureName="game-overlay-checkout",nt.CHECKOUT_STYLE_CLASS_NAME="game-overlay-checkout-experiment";var at=z(73797),rt=z(28152),ot=z(15485),ht=z(46784),ct=z(65050),dt=z(41674),lt=z(67665),ut=z(95525);const ft=(0,z(77601).gb)({key:"combined-otp",activateAssociatedExperiments:1,default:{enabled:!1},evaluate:({enabled:q},K)=>({enabled:q&&!K.isMember})});var bt,pt,vt,gt=z(223);!function(q){q.Selection="selection",q.Combined="combined"}(bt||(bt={})),function(q){q[q.DailySpendCap=0]="DailySpendCap",q[q.MonthlySpendCap=1]="MonthlySpendCap",q[q.Forbidden=2]="Forbidden",q[q.Cooldown=3]="Cooldown"}(pt||(pt={})),function(q){q.OtpMobilePurchaseSuccessful="otpPurchaseSuccessful",q.OtpMobilePurchaseFailed="otpPurchaseFailed",q.OtpMobileNoPurchaseOptions="otpNoPurchaseOptions",q.OtpMobilePurchasePending="otpPurchasePending"}(vt||(vt={}));const mt=["membership-flow-closed","upgrade-iframe-closed","membership-iframe-closed"];var yt=z(66582),_t=z(13956),Et=z(49126),wt=z(76277),Tt=z(5018),St=z(67510),At=z(2272),Ct=z(75329),Ot=z(99183),It=z(94236),Dt=z(53661),Rt=z(98252),Pt=z(30226),Mt=z(88061),Nt=z(10312),xt=z(21314),Lt=z(20352),kt=z(60654),Bt=z(77981),Ut=z(89305);class Ft{static open(q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt,at){return prodigyWeb.membershipFlow.open(q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt,at)}static openUrl(q,K,z,Y,Q=!1,X=null,Z=null){return prodigyWeb.membershipFlow.openUrl(q,K,z,Y,Q,X,Z)}static getMembershipFlowUrl(q,K,z,Q,X,Z,J,tt,et,it){return(0,Y.sH)(this,void 0,void 0,(function*(){return prodigyWeb.membershipFlow.getMembershipFlowUrl(q,K,z,Q,X,Z,J,tt,et,it)}))}static getMembershipDirectPurchaseFlowUrl(q,K,z,Q,X,Z,J,tt,et,it,st,nt){return(0,Y.sH)(this,void 0,void 0,(function*(){return prodigyWeb.membershipFlow.getMembershipDirectPurchaseFlowUrl(q,K,z,Q,X,Z,J,tt,et,it,st,nt)}))}static getAuthenticatedUrl(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return prodigyWeb.membershipFlow.getAuthenticatedUrl(q,K)}))}static getCombinedOtpPurchaseFlowUrl(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=encodeURIComponent(JSON.stringify({priceOptions:K}));return prodigyWeb.membershipFlow.getCombinedOtpPurchaseFlowUrl(q,z)}))}}let Gt=class extends Q.uAl{constructor(){super(...arguments),this.OTP_SPEND_CAP_CUSTOM_EVENT_NAME="Spend Cap",this.OTP_SPEND_CAP_EVENT_NAME="spend_cap",this.MEMBERSHIP_UPDATE_RETRY_COUNT=4,this.OTP_UNAVAILABLE_PARAMETERS={[pt.Forbidden]:{messageTitleKey:"ERROR",messageBodyKey:"NETWORK_FORBIDDEN",interfaceName:"otp_spend_cap_blacklist"},[pt.MonthlySpendCap]:{messageTitleKey:"OTP_MONTHLY_CAP_HIT_TITLE",messageBodyKey:"OTP_MONTHLY_CAP_HIT_BODY",interfaceName:"otp_spend_cap_monthly"},[pt.DailySpendCap]:{messageTitleKey:"OTP_DAILY_CAP_HIT_TITLE",messageBodyKey:"OTP_DAILY_CAP_HIT_BODY",interfaceName:"otp_spend_cap_daily"},[pt.Cooldown]:{messageTitleKey:"MESSAGE_TITLE_OOPS",messageBodyKey:"OTP_COOLDOWN_BODY",interfaceName:"otp_spend_cap_cooldown"}},this.onQrUrlRetrieved=new Q.HN0,this.onComplete=new Q.HN0,this.onMembershipFlowSuccess=new Q.HN0,this.onMembershipStatusUpdateStarted=new Q.HN0,this._respectSchoolMode=!0,this._listenOnPurchaseFlowOnly=!1,this._otpFunnelPurchaseOrder="OTP-GenericMC",this._retryTimeoutMs=5e3,this._analyticEvents={},this._upgrade=!1,this._handoffPurchaseOrder="",this._failureProcessing=!1,this._purchaseProcessing=!1}postCreate(){var q,K,z;super.postCreate(),this._memberAd={frameName:this.getInjectedValue(Dt.Eh.MembershipPurchaseMemberPanelAdFrameName),trackingEvent:this.getInjectedValue(Dt.Eh.MembershipPurchaseMemberPanelAdTrackingEvent),flavourText:this.getInjectedValue(Dt.Eh.MembershipPurchaseMemberPanelAdFlavourText)},this._analyticEvents={conversionFunnelName:this.getInjectedValue(Dt.Eh.MembershipPurchaseConversionFunnelName),conversionFunnelMetadata:this.getInjectedValue(Dt.Eh.MembershipPurchaseConversionFunnelMetadata),conversionStage:this.getInjectedValue(Dt.Eh.MembershipPurchaseConversionFunnelStage),conversionStaticOrVideo:this.getInjectedValue(Dt.Eh.MembershipPurchaseConversionFunnelStaticOrVideo)},this._upgrade=this.getInjectedValue(Dt.Eh.MembershipPurchaseUpgrade),this._listenOnPurchaseFlowOnly||this.setupPurchaseListener(),this.requestMembershipFlowUrl("qrCode").then((q=>this.onQrUrlRetrieved.dispatch(q)),(q=>{this.onQrUrlRetrieved.getBindingsCount()>0&&Q.RQr.logError(q,"Failed to retrieve Membership Landing Page URL for QR Code")})),this._generateOtpUrlPromise=this.generateOtpUrl(),this.shouldUseMobileOTP()&&(null===(z=null===(K=null===(q=window.SW)||void 0===q?void 0:q.OTP)||void 0===K?void 0:K.initOneTimePurchases)||void 0===z||z.call(K,this.handleMobileOtpCallback.bind(this)).catch(Q.RQr.createHandler("Failed to initialize native app OTP purchases")))}shouldUseMobileOTP(){return(Rt.pF.isNativeAndroidApp()||Rt.pF.isNativeIOSApp())&&Rt.pF.eligibleVersionForMobileOtpPurchase()}setupPurchaseListener(){tt.q.instance.game.broadcaster.addAppListener(at.bS.POST_MESSAGE_RECEIVED,((q,K)=>{try{const q="string"==typeof K?JSON.parse(K):K;if(this._failureProcessing&&("fail"===q.success||!1===q.success))return;mt.includes(q.name)&&!this._purchaseProcessing&&(this._purchaseProcessing=!0,Q.Aq$.isDefined(q.transactionId)?this.processOtpMessage(q):this.processMembershipMessage(q))}catch(z){Q.RQr.logError(z,"Error receiving purchase post message"),this.completeFlow()}}),this,tt.q.instance.game)}completeFlow(){this._purchaseProcessing=!1,this._failureProcessing=!1,this._listenOnPurchaseFlowOnly&&this.clearPostMembershipListener(),this.onComplete.dispatch()}clearPostMembershipListener(){tt.q.instance.game.broadcaster.removeAppListener(at.bS.POST_MESSAGE_RECEIVED,this,tt.q.instance.game)}processMembershipMessage(q){"upgrade-iframe-closed"===q.name&&(this._upgrade=!0),this.finishUpgrade(q.success).catch(Q.RQr.createHandler("ProcessWebPurchaseComponent: Error finishing upgrade"))}initiateMembershipPurchase(q,K,z){var Y,X,Z,J,et,it,st;const at=tt.q.instance.prodigy.gameContainer,rt=this._currentPlayer.player,ot=null!=K?K:"tier_1";if(this._respectSchoolMode&&rt.isPlayingAtSchool())return tt.q.instance.prodigy.open.membershipSchoolAd(),void this.completeFlow();if(Rt.pF.isNativeAmazonApp()||(Rt.pF.isNativeAndroidApp()||Rt.pF.isNativeIOSApp())&&!Rt.pF.eligibleVersionForMobileMembershipPurchase())return tt.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.sendFunnelHandoffEvent("Visit-Site-Dialog",ot),void this.completeFlow();this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener();try{this._gameNetworkManager.stopInactiveTimer();const K=at.get("b09-138c").authHandler.getIdentityToken(),tt=null!==(Y=rt.username)&&void 0!==Y?Y:rt.getName(),it=!rt.isPlayingAtSchool();if(nt.isFeatureEnabled()&&(nt.applyCheckoutStyling(!0),Pt.J.applyBlurToScreen(!0)),Q.Aq$.isDefined(this._analyticEvents)){let Y=0;Q.Aq$.isDefined(null===(X=this._memberAd)||void 0===X?void 0:X.adID)&&(Y=this._memberAd.adID);const st=(0,wt.G)(ut.w).variant;if((null==q?void 0:q.useDirectPurchaseFlow)||nt.isFeatureEnabled())Ft.getMembershipDirectPurchaseFlowUrl(null!==(Z=null==q?void 0:q.billingInterval)&&void 0!==Z?Z:12,null!==(J=null==q?void 0:q.category)&&void 0!==J?J:Bt.r.Math,null!==(et=null==q?void 0:q.tier)&&void 0!==et?et:2,Y,this._analyticEvents.conversionFunnelName,this._segment.purchase.getFunnelID(),it,this._analyticEvents.conversionFunnelMetadata,"ctaButton",this._analyticEvents.conversionStaticOrVideo,K,st.toString()).then((q=>{const K=Ft.openUrl(tt,rt.userID,void 0,q,!1,(0,Ut.nQ)(ot),z);this.sendFunnelHandoffEvent(K,ot)})).catch(Q.RQr.createHandler("Could not get membership URL"));else{const q=Ft.open(tt,rt.userID,void 0,Y,this._analyticEvents.conversionFunnelName,it,this._analyticEvents.conversionFunnelMetadata,at.get("304-25b9").getSessionToken(),this._analyticEvents.conversionStaticOrVideo,this._upgrade,K,st.toString(),(0,Ut.nQ)(ot),z);this.sendFunnelHandoffEvent(q,ot)}}}catch(e){Q.VyI.log(e,Q.$bb.Error),tt.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_ERROR_BODY")),this._segment.purchase.sendFunnelError("Purchase-Handoff","Handoff-Exception",e?null!==(it=e.message)&&void 0!==it?it:null===(st=e.toString)||void 0===st?void 0:st.call(e):e)}}initiateMembershipPurchaseUpgradeWithIFrame(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._webFrameManager.canOpenIframe())return;const K=this._currentPlayer.player;if(this._respectSchoolMode&&K.isPlayingAtSchool())return tt.q.instance.prodigy.open.membershipSchoolAd(),void this.completeFlow();const z=this.getMembershipUpgradeInterval(this._currentPlayer),Y=tt.q.instance.prodigy.gameContainer.get("f71-42eb").getOverrideForMinVersionForMobileMembershipTierPurchases();if(K.hasMembership())if(Rt.pF.eligibleVersionForMobileMembershipPurchaseForMultipleTiers(Y))0===this._currentPlayer.getMembershipUpsell().upgradeOptions.length?(0,Ut.ty)():(this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),this.initiateMembershipPurchase(void 0,q,z));else{if(Rt.pF.isNativeAmazonApp()||Rt.pF.isNativeAndroidApp()||Rt.pF.isNativeIOSApp())return tt.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.sendFunnelHandoffEvent("Visit-Site-Dialog",q),void this.completeFlow();this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),yield(0,Ut.Sz)(this._currentPlayer,this._segment,q)}else this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),this.initiateMembershipPurchase(void 0,q,z)}))}getMembershipUpgradeInterval(q){var K;return null!==(K=q.getMembershipUpsell().interval)&&void 0!==K?K:null}finishUpgrade(){return(0,Y.sH)(this,arguments,void 0,(function*(q=!1){let K;if(this._gameNetworkManager.startInactiveTimer(),nt.isFeatureEnabled()&&(nt.applyCheckoutStyling(!1),Pt.J.applyBlurToScreen(!1)),K="boolean"==typeof q?q?"success":"fail":q,"success"!==K)yield this.processMembershipResult(K);else try{yield this.updateMembershipStatus(this.MEMBERSHIP_UPDATE_RETRY_COUNT),this._currentPlayer.player.hasMembership()?yield this.processMembershipResult(K):yield this.processMembershipResult("pending")}catch(e){Q.VyI.log(`Membership purchase pending due to the following: ${e}`,Q.$bb.Warning),yield this.processMembershipResult("pending")}}))}processMembershipResult(q){return(0,Y.sH)(this,void 0,void 0,(function*(){switch(tt.q.instance.prodigy.game.broadcaster.broadcast(at.H3.MembershipResponseReceived,void 0,[q]),q){case"success":{let q=Z().noop;this._currentPlayer.player.unlockMemberItems(),yield this._currentPlayer.fetchMembershipUpsell(),tt.q.instance.prodigy.gameContainer.get("9a2-c1c3").sendQuestEvent(J.T.NONE,{}).catch(Q.RQr.createHandler("Error sending NONE quest event after membership purchase."));const K=tt.q.instance.prodigy.open.getTopmostConversionPrefabIndex();q=K>-1?()=>{tt.q.instance.prodigy.open.menuCloseAllUntil(K)}:tt.q.instance.prodigy.open.menus[1]instanceof It.K?()=>{tt.q.instance.prodigy.open.menuCloseAllUntil(1)}:tt.q.instance.prodigy.open.menus[0]instanceof Ot.k||tt.q.instance.prodigy.open.menus[0]instanceof St.v||tt.q.instance.prodigy.open.menus[0]instanceof kt.i?()=>{tt.q.instance.prodigy.open.menuCloseAllUntil(0)}:()=>{tt.q.instance.prodigy.open.menuCloseAll()};{const K=q;q=()=>{K(),this.completeFlow()}}const z=this._currentPlayer.player.hasUnclaimedMembershipRewards();if(z){const K=q;q=()=>{this._currentPlayer.player.rewardMembershipPrizes(K).catch(Q.RQr.createHandler("Error rewarding membership prizes."))}}tt.q.instance.prodigy.open.membershipSuccess("paid",(()=>{q(),this.onMembershipFlowSuccess.dispatch(),z||tt.q.instance.prodigy.game.broadcaster.broadcast(at.H3.MembershipRewardsFlowComplete)}),{origin_type:dt.$N.MembershipUpgrade,origin_id:this._segment.segmentDataCache[lt.r.MembershipBundleModalInstanceId],instance_type:ct.N.KidsMlpUpgradeComplete});const Y=this._currentPlayer.player.getMemberTier();this._segment.purchase.sendFunnelComplete({purchaseOrder:yt.rH[Y],triggerTier:(0,Ut.jK)(Y)})}break;case"pending":tt.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_PENDING_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending");break;case"deferred":tt.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_DEFERRED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending-Parent-Approval");break;case"fail":default:this._failureProcessing=!0,(Rt.pF.isNativeAndroidApp()||Rt.pF.isNativeIOSApp())&&Rt.pF.eligibleVersionForMobileMembershipPurchase()?(this._segment.featureCommon.sendButtonEvent({buttonName:ot.k.MembershipUpgradeOkay,interfaceType:dt.Wm.Popup,interfaceName:ht.B.KidsMlpUpgradeFail}),this.completeFlow()):tt.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_FAILED_BODY"),(()=>{this._segment.featureCommon.sendButtonEvent({buttonName:ot.k.MembershipUpgradeOkay,interfaceType:dt.Wm.Popup,interfaceName:ht.B.KidsMlpUpgradeFail}),this.completeFlow()})),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ht.B.KidsMlpUpgradeFail,interfaceType:dt.Wm.Popup,originID:this._segment.segmentDataCache[lt.r.MembershipBundleModalInstanceId],originType:this._upgrade?dt.$N.MembershipUpgrade:dt.$N.MembershipPurchase,instanceType:ct.N.KidsMlpUpgradeFail}),this._segment.purchase.sendFunnelError("Purchase-Handoff","Payment-Failed","Payment-Failed")}}))}updateMembershipStatus(){return(0,Y.sH)(this,arguments,void 0,(function*(q=3){this.onMembershipStatusUpdateStarted.dispatch();const K=tt.q.instance.prodigy.gameContainer.get("73f-58d1"),z=tt.q.instance.prodigy.gameContainer.get("d94-655c");tt.q.instance.prodigy.loading(!0,!0);let Y=!1;try{const Q=yield K.refreshMembership();if(Q){if(!Q.active&&q>0)return yield this.retryUpdateMembershipStatus(q-1);Y=Q.active,yield Tt.G.loadFeatures(),yield z.updateDecayImmunity(),yield this._currentPlayer.player.updateChargedLevelsData(),yield it.W.checkMemberUpgradeReward()}}catch(X){Q.RQr.logError(X,"MembershipParent.updateMembershipStatus - failed on refreshMembership")}return tt.q.instance.prodigy.loading(!1),Y}))}retryUpdateMembershipStatus(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return yield Q.Egh.timeout(this._retryTimeoutMs),this.updateMembershipStatus(q)}))}requestMembershipFlowUrl(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K;const z=tt.q.instance.prodigy.gameContainer;return Ft.getMembershipFlowUrl(Q.Aq$.isDefined(null===(K=this._memberAd)||void 0===K?void 0:K.adID)?this._memberAd.adID:0,this._analyticEvents.conversionFunnelName,!z.get("ad2-c5b2").player.isPlayingAtSchool(),this._analyticEvents.conversionFunnelMetadata,this._analyticEvents.conversionStaticOrVideo,this._upgrade,z.get("b09-138c").authHandler.getIdentityToken(),q,this._segment.purchase.getFunnelID(),(0,wt.G)(ut.w).variant.toString())}))}sendFunnelHandoffEvent(q,K){this._handoffPurchaseOrder=(0,Ut.nQ)(K),this._segment.purchase.sendFunnelHandoff(q,{triggerTier:K,purchaseOrder:this._handoffPurchaseOrder})}generateOtpUrl(){return(0,Y.sH)(this,void 0,void 0,(function*(){const{storeName:q}=(0,wt.G)(gt.l);if(Q.Aq$.isDefined(q)){if(this._cachedFetchOptionResult=yield this._otpNetworkHandler.fetchOptions(q),(0,wt.G)(ft).enabled){const q=tt.q.instance.prodigy.gameContainer.get("b09-138c").authHandler.getIdentityToken();return Ft.getCombinedOtpPurchaseFlowUrl(q,this._cachedFetchOptionResult.options)}return this._urlProvider.getOtpUrl(this._cachedFetchOptionResult.options)}}))}initiateOtp(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!(0,wt.G)(gt.l).enabled||!this._webFrameManager.canOpenIframe())return;const q=tt.q.instance.prodigy,K=this._currentPlayer.player;if(K.isPlayingAtSchool())q.open.membershipSchoolAd(),this.completeFlow();else if(Rt.pF.isNativeAndroidApp()||Rt.pF.isNativeIOSApp())Rt.pF.eligibleVersionForMobileOtpPurchase()?0===this._cachedFetchOptionResult.options.length?(this.showOtpUnavailablePopup(this._cachedFetchOptionResult.spendCapHit),this.completeFlow()):yield this.initOtpForNativeApp(this._cachedFetchOptionResult.options):(q.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.completeFlow());else if(Rt.pF.isNativeAmazonApp())q.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.completeFlow();else{const z=yield this._generateOtpUrlPromise.then((q=>Q.Aq$.isDefined(q)?q:(Q.VyI.log("Error generating otp url: Invalid store name",Q.$bb.Error),""))),Y=(0,wt.G)(ft).enabled;Y||0!==this._cachedFetchOptionResult.options.length?z&&z.length>0?(this._gameNetworkManager.stopInactiveTimer(),this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),Y?Ft.openUrl(K.getName(),K.userID,void 0,z,!0):yield this._webFrameManager.createIFrame(z,"membership-iframe-closed"),this._segment.purchase.sendFunnelHandoff(void 0,{purchaseOrder:this._otpFunnelPurchaseOrder})):(q.open.message(this._localizer.getText("FEATURE_DISABLED")),this._segment.purchase.sendFunnelError("Purchase-Handoff","Handoff-Exception","No OTP store available"),this.completeFlow()):(this.showOtpUnavailablePopup(this._cachedFetchOptionResult.spendCapHit),this.completeFlow())}}))}showOtpUnavailablePopup(q){var K,z;const Y=tt.q.instance.prodigy,Q=Y.gameContainer.get("20f-5f67"),X=this.OTP_UNAVAILABLE_PARAMETERS[q],Z=(0,wt.G)(gt.l);let J=null;q===pt.MonthlySpendCap?J=null!==(K=Z.spendCap.monthlyLimit)&&void 0!==K?K:null:q===pt.DailySpendCap&&(J=null!==(z=Z.spendCap.dailyLimit)&&void 0!==z?z:null),Q.featureCommon.sendInterfaceEvent({interfaceName:X.interfaceName,interfaceType:dt.Wm.Window}),Q.sendCustomEvent(this.OTP_SPEND_CAP_CUSTOM_EVENT_NAME,{event:this.OTP_SPEND_CAP_EVENT_NAME,funnel_id:Q.purchase.getFunnelID(),cap_type:X.interfaceName,cap_amount:J,currency_id:27}),Y.open.informationDialog(new Ct.Z(this._localizer.getText("BUTTON_OKAY_CAPITAL"),void 0,At.E.Small,void 0,this._localizer.getText(X.messageTitleKey),this._localizer.getText(X.messageBodyKey)))}finishOtp(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!(0,wt.G)(gt.l).enabled)return;this._gameNetworkManager.startInactiveTimer();const K=tt.q.instance.prodigy;switch(q.success){case"success":this._otpService.updatePurchaseHistory(q),this._otpService.queueUncollectedTransactions({transactionID:q.transactionId,quantity:q.quantity,analyticsTransactionID:this._segment.purchase.getFunnelID()});try{yield this._otpService.acknowledgeUncollectedTransactions(),this.completeFlow(),tt.q.instance.game.broadcaster.broadcast(at.Lk.HardCurrencyPurchased)}catch(z){throw this._segment.purchase.sendFunnelError("Purchase-Handoff","Handoff-Exception",z),z}break;case"pending":K.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_PENDING_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending");break;case"deferred":K.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_DEFERRED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending-Parent-Approval");break;case"noPurchaseOptions":case"fail":this._failureProcessing=!0,(Rt.pF.isNativeAndroidApp()||Rt.pF.isNativeIOSApp())&&Rt.pF.eligibleVersionForMobileOtpPurchase()?this.completeFlow():K.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_FAILED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelQuit("Purchase-Handoff","Close-Clicked");break;default:this._failureProcessing=!0,K.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_FAILED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelQuit("Purchase-Handoff","Close-Clicked")}}))}processOtpMessage(q){this.finishOtp(q).catch(Q.RQr.createHandler("Failed to finish OTP"))}handleMobileOtpCallback(q){var K,z,Y;const{message:X,data:Z}=q;try{let q={name:"",success:"fail",transactionId:"",quantity:0};switch(X){case vt.OtpMobilePurchaseSuccessful:q={name:X,success:"success",transactionId:String(null===(K=null==Z?void 0:Z.transaction)||void 0===K?void 0:K.transactionIdentifier)||"",quantity:null!==(Y=null===(z=null==Z?void 0:Z.productData)||void 0===z?void 0:z.quantity)&&void 0!==Y?Y:0};break;case vt.OtpMobilePurchaseFailed:q={name:X,success:"fail",transactionId:"",quantity:0};break;case vt.OtpMobileNoPurchaseOptions:q={name:X,success:"noPurchaseOptions",transactionId:"",quantity:0};break;case vt.OtpMobilePurchasePending:q={name:X,success:"pending",transactionId:"",quantity:0}}this.finishOtp(q)}catch(J){Q.RQr.logError(J,"Failed to finish OTP")}}initOtpForNativeApp(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;if(Rt.pF.isNativeApp())if(this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),null===(z=null===(K=null===window||void 0===window?void 0:window.SW)||void 0===K?void 0:K.OTP)||void 0===z?void 0:z.startOneTimePurchase){const K=Date.now();!this._lastOtpStartTime||K-this._lastOtpStartTime>5e3?(this._lastOtpStartTime=K,window.SW.OTP.startOneTimePurchase(q).catch(Q.RQr.createHandler("startOneTimePurchase Error"))):Q.VyI.log("startOneTimePurchase called too quickly, ignoring.",Q.$bb.Warning)}else Q.VyI.log("startOneTimePurchase is not available - Mobile OTP not initialized",Q.$bb.Error)}))}destroy(){tt.q.instance.game.broadcaster.removeAppListener(at.bS.POST_MESSAGE_RECEIVED,this,tt.q.instance.game),this.onQrUrlRetrieved.dispose(),this.onComplete.dispose(),this.onMembershipFlowSuccess.dispose(),this.onMembershipStatusUpdateStarted.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Gt.prototype,"onQrUrlRetrieved",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Gt.prototype,"onComplete",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Gt.prototype,"onMembershipFlowSuccess",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Gt.prototype,"onMembershipStatusUpdateStarted",void 0),(0,Y.Cg)([(0,Q.Cdj)("20f-5f67"),(0,Y.Sn)("design:type",Function)],Gt.prototype,"_segment",void 0),(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",et.E)],Gt.prototype,"_currentPlayer",void 0),(0,Y.Cg)([(0,_t.b)("f6c-ff5c"),(0,Y.Sn)("design:type",Lt.j)],Gt.prototype,"_webFrameManager",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Gt.prototype,"_respectSchoolMode",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Gt.prototype,"_listenOnPurchaseFlowOnly",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Gt.prototype,"_otpFunnelPurchaseOrder",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Gt.prototype,"_retryTimeoutMs",void 0),(0,Y.Cg)([(0,_t.b)("2f0-c49e"),(0,Y.Sn)("design:type",Et.x)],Gt.prototype,"_otpService",void 0),(0,Y.Cg)([(0,_t.b)("ed0-b675"),(0,Y.Sn)("design:type",Mt.o)],Gt.prototype,"_otpNetworkHandler",void 0),(0,Y.Cg)([(0,_t.b)("774-4659"),(0,Y.Sn)("design:type",Nt.I)],Gt.prototype,"_gameNetworkManager",void 0),(0,Y.Cg)([(0,_t.b)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],Gt.prototype,"_localizer",void 0),(0,Y.Cg)([(0,_t.b)("ddf-6c82"),(0,Y.Sn)("design:type",xt.p)],Gt.prototype,"_urlProvider",void 0),Gt=(0,Y.Cg)([(0,Q.EVk)("ProcessWebPurchase",rt.Y.membership)],Gt)},91160:(q,K,z)=>{"use strict";var Y;z.d(K,{u:()=>Y}),function(q){q.Boot="boot",q.BootFeatureFlags="boot.feature_flags",q.BootGameData="boot.game_data",q.BootFeatureRevision="boot.feature_revisions",q.BootAssets="boot.assets",q.BootLocalization="boot.localization",q.BootRebuildGUID="boot.rebuild_guids",q.BootStartNextState="boot.start_next_state",q.Splash="splash",q.SplashCreate="splash.create",q.SplashLoadQI="splash.load_QI",q.SplashLoadQIEducationStatus="splash.load_QI.education_status",q.SplashLoadQILoadQuestion="splash.load_QI.load_question",q.SplashLoadQILoadQuestionInterface="splash.load_QI.load_question_interface",q.SplashLoadGame="splash.load_game",q.SplashTitans="splash.titans",q.SplashLogin="splash.login",q.SplashIapInit="splash.iap_init",q.SplashUpdateFeatureAccess="splash.update_feature_access",q.SplashCharacter="splash.character",q.SplashFetchEndGameQuestData="splash.fetch_end_game_quest_data",q.SplashInitFeatureProvider="splash.init_feature_provider",q.SplashEducation="splash.education",q.SplashParentalConsentService="splash.parental_consent_service",q.SplashSegment="splash.segment",q.SplashSetupFeatureProvider="splash.setup_feature_provider",q.SplashWorldList="splash.world_list",q.SplashRegistrationMenu="splash.registration_menu",q.SplashPlayerEducationInit="splash.player_education_init",q.SplashPrefabRequest="splash.prefab_request",q.ServerMenuSelection="server_menu",q.ServerMenuSuggestedServers="server_menu.suggested_servers",q.ServerMenuShowAllServers="server_menu.all_servers",q.ServerMenuConnect="server_menu.connect",q.PrefabLoaderScene="prefab_loader_scene",q.PrefabLoaderSceneAssetPreload="prefab_loader_scene.asset_preload",q.PrefabLoaderScenePrefabLoading="prefab_loader_scene.prefab_loading",q.PrefabLoaderSceneConsentBanner="prefab_loader_scene.consent_banner",q.SingleAssetLoading="load_single_asset",q.World="world",q.WorldRemotePlayerSpawnLimiterInit="world.remotePlayerSpawnLimiter",q.WorldSynapseMultiplayerServiceConnection="world.synapse_multiplayer_service_connection",q.WorldNetworkHandlerEnterWorld="world.network_handler_enter_world",q.WorldInitProgressDataManager="world.init_progress_datamanager",q.WorldSynchedRiftDataInit="world.synched_rift_data_init",q.WorldFeaturedSpawnDataInit="world.featured_spawn_data_init",q.WorldDynamicStoreQuestManagerSetup="world.dynamic_store_quest_manager_setup",q.WorldInventoryInit="world.inventory_init",q.WorldHudDataInit="world.hud_data_init",q.WorldSegmentAnalyticsSetup="world.segment_analytics_setup",q.WorldElementalBoostCache="world.elemental_boost_cache",q.WorldPippetEncounterInit="world.pippet_encounter_init",q.WorldGetTowerData="world.get_tower_data",q.WorldInitTowerData="world.init_tower_data",q.WorldJoinActiveQuiz="world.join_active_quiz",q.WorldPlayerGoalsInit="world.player_goals_init",q.WorldEnterMap="world.enter_map",q.WorldSegmentedOffersDataInit="world.segmented_offers_data_init",q.WorldWizardCostumeDataInit="world.wizard_costume_data_init",q.LoadingState="loadingstate",q.LoadingStateAssetsLoad="loadingstate.assets_load",q.LoadingStateAdditionalLoadPromise="loadingstate.additional_load_promise",q.QuestManagerHubSetup="quest_manager_hub_setup"}(Y||(Y={}))},28152:(q,K,z)=>{"use strict";var Y;z.d(K,{Y:()=>Y}),function(q){q.root="",q.analytics="Analytics",q.animation="Animation",q.audio="Audio",q.battle="Battle",q.battleRevamp="Battle Revamp",q.creature="Creature",q.creatureAnimation="Creature/Animation",q.data="Data",q.dataProvider="Data/Provider",q.debug="Debug",q.economy="Economy",q.effect="Effect",q.player="Creature/Player",q.playerAnimation="Creature/Player/Animation",q.follow="Creature/Follow",q.followAnimationState="Creature/Follow/Animation State",q.education="Education",q.injection="Injection",q.input="Input",q.inputShapes="Input/Shapes",q.item="Item",q.map="Map",q.tiled="Map/Tiled",q.mapSpawning="Map/Spawning",q.MapTeleport="Map/Teleport",q.membership="Membership",q.motion="Motion",q.multiplayer="Multiplayer",q.object="Object",q.saving="Saving",q.stateChallenges="StateChallenges",q.store="Store",q.transition="Transition",q.cooldown="Cooldown",q.trigger="Trigger",q.ui="UI",q.uiAchievement="UI/Achievement",q.uiCharCreate="UI/CharCreate",q.uiDialog="UI/Dialog",q.uiInput="UI/Input",q.uiLayout="UI/Layout",q.uiPagination="UI/Pagination",q.uiPet="UI/Pet",q.uiPetGear="UI/PetGear",q.uiPetMerge="UI/PetMerge",q.uiAd="UI/Ad",q.uiVideo="UI/Video",q.uiDynamicPrompts="UI/Dynamic Prompts",q.uiUnifiedStore="UI/Unified Store",q.uiPetsInZones="UI/Pets In Zones",q.uiPopup="UI/Popup",q.utility="Utility",q.uiPetMenu="UI/Pet Menu",q.universalTeamSelection="UI/Universal Team Selection",q.uiHudManager="UI/Hud Manager",q.web="Web",q.reporting="Reporting",q.ultimates="Ultimates",q.ultimatesUi="Ultimates/UI",q.quest="Quest",q.zones="Zones",q.zoneForest="Zones/Forest",q.zoneShipwreckShore="Zones/Shipwreck Shore",q.adventure="Feature/Adventure",q.adventureFsm="Feature/Adventure/FSM",q.adventureUi="Feature/Adventure/UI",q.academy="Feature/Academy",q.festival="Feature/Festival",q.leaderboard="Feature/Leaderboard",q.postBattleFlow="Feature/Post Battle Flow",q.towerTown="Feature/Tower Town",q.titan="Feature/Titan",q.ftue="Feature/FTUE",q.petRescue="Feature/Pet Rescue",q.battlePass="Feature/Battle Pass",q.worldMapDuelsStadium="Feature/World Map/Duels Stadium",q.chargedLevels="Feature/Charged Levels",q.lootDash="Feature/Loot Dash",q.playerGoals="Feature/Player Goals",q.rifts="Feature/Rifts",q.afterSchoolWidget="Feature/After School Widget",q.wizardCostumes="Feature/Wizard Costumes"}(Y||(Y={}))},17331:(q,K,z)=>{"use strict";z.d(K,{H:()=>tt,_:()=>Y});var Y,Q=z(62459),X=z(35120),Z=z(77078),J=z(28402);!function(q){q[q.Up=0]="Up",q[q.Down=1]="Down"}(Y||(Y={}));class tt extends Q.uAl{init(q,K,z){this.screen=q,this.enterCallback=z,K===Y.Up?(this.openAnimation="open going up",this.closeAnimation="close going up"):(this.openAnimation="open going down",this.closeAnimation="close going down")}create(){super.create();const q=this.gameObject.findComponentInChildren(J.v);this.spine=q.getSpine(),this.input=this.gameObject.findComponentInChildren(Z.p),this.input.InputEnabled=!0,this.input.onClicked.add((()=>{this.walkTo()}))}walkTo(){this.screen.user.setValidPath(this.screen.path,this.gameObject.transform.localPosition.x+12,this.gameObject.transform.localPosition.y+160,(q=>({}))),this.spine.setAnimationByName(0,this.openAnimation),this.spine.onComplete.addOnce((()=>{this.enter()})),X.q.instance.prodigy.audio.playSFX(17,"elevator")}enter(){this.screen.user.setValidPath(this.screen.path,this.gameObject.transform.localPosition.x+12,this.gameObject.transform.localPosition.y+90,(q=>(Q.Aq$.isDefined(q)&&(this.screen.content.removeChild(this.screen.user),this.screen.below.add(this.screen.user),this.spine.setAnimationByName(0,this.closeAnimation),X.q.instance.prodigy.audio.playSFX(17,"elevator-doors"),this.spine.onComplete.addOnce((()=>{this.enterCallback()}))),{})))}exit(){this.spine.setAnimationByName(0,this.openAnimation),X.q.instance.prodigy.audio.playSFX(17,"elevator-doors"),this.spine.onComplete.addOnce((()=>{this.screen.below.remove(this.screen.user),this.screen.content.addChild(this.screen.user),this.screen.user.setValidPath(this.screen.path,this.gameObject.transform.localPosition.x+12,this.gameObject.transform.localPosition.y+160,(q=>({}))),this.spine.setAnimationByName(0,this.closeAnimation),X.q.instance.prodigy.audio.playSFX(17,"elevator-doors")}))}}},96282:(q,K,z)=>{"use strict";z.d(K,{G:()=>st});var Y=z(62459),Q=z(35120),X=z(91207),Z=z(77938),J=z(86949),tt=z(31427),et=z(70123),it=z(59838);class st extends J.u{constructor(q,K,z,Q){super(),this.onItemDrag=new Y.HN0,this.onItemDropped=new Y.HN0,this.onItemMoved=new Y.HN0,this.onItemInputDown=new Y.HN0,this.canRevert=null,this.orientation=0,this.assetData=null,this.assetMetadata=null,this.editable=!1,this.itemID=z,this.orientation=Q,this.parentHouse=K}create(){super.create(),this.updateItemData()}setItemID(q){this.itemID!==q&&(this.itemID=q,this.updateItemData())}updateItemData(){this.assetData=Z.t.getItem("dorm",this.itemID).data,this.assetMetadata=Z.t.getItem("dorm",this.itemID).metadata,this.updateSprite()}getAssetName(){return Y.Aq$.isDefined(this.assetData)?`${this.getOrientation()}-dorm-${this.itemID}`:""}isAnimated(){if(Y.Aq$.isDefined(this.assetMetadata)){const q=this.getOrientation();return Y.Aq$.isDefined(this.assetMetadata.assets[q])&&Y.Aq$.isDefined(this.assetMetadata.assets[q].animations)&&Y.Aq$.isDefined(this.assetMetadata.assets[q].animations.idle)}return!1}canRotate(){return Y.Aq$.isDefined(this.assetData)&&this.assetData.r>0}getScaleX(){return Y.Aq$.isDefined(this.assetData)&&this.assetData.r>0&&this.orientation>1?-1:1}updateSprite(q=!1){let K=this.gameObject.findComponent(tt.A);Y.Aq$.isDefined(K)?K.setAsset(X.E.getDormItem(this.getStrictOrientation(),this.itemID),this.assetMetadata.assets[this.getOrientation()]):(K=this.initRenderInterface(),q&&(this.setEditable(!1),this.setEditable(!0))),K.setScale(this.getScaleX(),1),K.hasAnimations()&&K.playAnimation("idle",!0,Math.random()*K.getAnimationLength("idle"))}initRenderInterface(){const q=et.j.createRenderer(X.E.getDormItem(this.getStrictOrientation(),this.itemID),this.assetMetadata.assets[this.getOrientation()]);return this.gameObject.addComponent(q),q.setAnchor(.5,0),q.resetAfterDrag=!0,q}rotateItem(){if(this.editable&&this.canRotate()){const q=this.assetMetadata.assets[this.getOrientation()].type;this.orientation+=2===this.assetData.r?2:1,this.orientation>3&&(this.orientation=0);const K=this.assetMetadata.assets[this.getOrientation()].type,z=this.getRenderer();Y.Aq$.isDefined(q)&&Y.Aq$.isDefined(K)&&q!==K?(this.setEditable(!1),this.gameObject.removeComponent(z),z.destroy()):z.onLoaded.addOnce((()=>{this.setEditable(!1),this.setEditable(!0)})),this.updateSprite(!0)}}setEditable(q=!0){this.editable!==q&&(this.editable=q,this.editable?this.registerInputHandlers():this.unregisterInputHandlers())}registerInputHandlers(){const q=this.getRenderer();q.setInputEnabled(),q.enableDragging(!0,!0,20,20);const K=q.getEvents();Y.Aq$.isDefined(K)&&(K.onDragStart.add(this.dragStarted,this),K.onDragUpdate.add(this.dragUpdated,this),K.onDragStop.add(this.dragStopped,this),K.onInputDown.add(this.itemFocused,this))}unregisterInputHandlers(){const q=this.getRenderer();q.setInputEnabled(!1),q.disableDragging();const K=q.getEvents();Y.Aq$.isDefined(K)&&(K.onDragStart.remove(this.dragStarted,this),K.onDragUpdate.remove(this.dragUpdated,this),K.onDragStop.remove(this.dragStopped,this),K.onInputDown.remove(this.itemFocused,this))}getRenderer(){return this.gameObject.findComponent(tt.A)}dragStarted(){Q.q.instance.game.stage.addChild(this.gameObject),this.onItemDrag.dispatch()}dragUpdated(){if(Y.Aq$.isDefined(this.parentHouse)){const q=this.getRenderer();q instanceof it.F||q.setAlpha(this.parentHouse.canPlaceItem(this)?1:.5)}}dragStopped(){if(Y.Aq$.isDefined(this.parentHouse)?this.parentHouse.content.addChild(this.gameObject):Q.q.instance.game.add.existing(this.gameObject),!Y.Aq$.isDefined(this.parentHouse)||this.parentHouse.canPlaceItem(this)){const q=this.getRenderer(),K=q.getWorld();if(this.onItemDropped.dispatch(this,K.x,K.y),q instanceof it.F){const z=q.getSpineObjectOffset();K.x+=z.x,K.y+=z.y}const z=Y.cj9.snapToCeil(K.x,st.HOUSE_ITEM_GRID_SNAP_INTERVAL),Q=Y.cj9.snapToFloor(K.y,st.HOUSE_ITEM_GRID_SNAP_INTERVAL);this.onItemMoved.dispatch(this,this.gameObject.x,this.gameObject.y,z,Q),this.canRevert=!0,this.gameObject.x=z,this.gameObject.y=Q,q.resetToOrigin()}else{if(!this.canRevert)return void this.gameObject.destroy();{const q=this.getRenderer(),K=q.getWorld();this.onItemDropped.dispatch(this,K.x,K.y),q.resetToOrigin()}}}itemFocused(){this.onItemInputDown.dispatch()}resetItem(){this.getRenderer().setAlpha(1)}getOrientation(){return"horizontal"===this.getStrictOrientation()?"horizontal":"vertical"}getStrictOrientation(){return this.assetData.r>0&&1==(1&this.orientation)?"horizontal":"vertical"}destroy(){this.onItemDrag.dispose(),this.onItemDropped.dispose(),this.onItemMoved.dispose(),this.onItemInputDown.dispose(),super.destroy()}}st.HOUSE_ITEM_GRID_SNAP_INTERVAL=20},16495:(q,K,z)=>{"use strict";z.d(K,{QW:()=>X,ib:()=>J,sR:()=>Q,ye:()=>Z});var Y=z(8674);const Q=(q,K,z)=>{if(Array.isArray(q))for(let Y=0;Y{if(Array.isArray(q))for(let K=0;K(0,Y.sH)(void 0,void 0,void 0,(function*(){if(Array.isArray(q)){const z=[];for(let Q=0;Q(0,Y.sH)(void 0,void 0,void 0,(function*(){return new Promise((Y=>{q[z].OnAnimationComplete.addOnce(Y),q[z].playAnimation(K,!1)}))})))(Q));return Promise.all(z).then((()=>Promise.resolve()))}return new Promise((z=>{q.OnAnimationComplete.addOnce(z),q.playAnimation(K,!1)}))})),J=(q,K,z)=>(0,Y.sH)(void 0,void 0,void 0,(function*(){for(let z=0;z{"use strict";z.d(K,{R:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.uAl{create(){super.create();X.q.instance.prodigy.gameContainer.get("774-4659").startInactiveTimer()}destroy(){X.q.instance.prodigy.gameContainer.get("774-4659").stopInactiveTimer(),super.destroy()}};J=(0,Y.Cg)([(0,Q.EVk)("InactivityDialog",Z.Y.uiDialog)],J)},27812:(q,K,z)=>{"use strict";z.d(K,{I:()=>it});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(53885),J=z(73402),tt=z(30226),et=z(28152);let it=class extends Q.uAl{constructor(){super(...arguments),this.moveSpeed=220,this.moveTarget=null,this.roundTarget=!1,this.isMoving=!1,this._deltaPos=new Q.I9Y,this.initToCurrentPosition=!1,this.onMoveStart=new Q.HN0,this.onMoveEnd=new Q.HN0,this.lastFrameTime=null,this.localTargetPos=null,this._normalizedMoveVector=new Q.I9Y}get MoveSpeed(){return this.moveSpeed}set MoveSpeed(q){this.moveSpeed=q}get MoveTarget(){return this.moveTarget}set MoveTarget(q){this.roundTarget?this.moveTarget=new Q.I9Y(Math.round(this.moveTarget.x),Math.round(this.moveTarget.y)):this.moveTarget=new Q.I9Y(q.x,q.y)}get RoundTarget(){return this.roundTarget}set RoundTarget(q){this.roundTarget=q}get IsMoving(){return this.isMoving}get deltaPos(){return this._deltaPos}create(){if(super.create(),this.initToCurrentPosition){const{x:q,y:K}=this.GameObject.transform.worldPosition;this.moveTarget=new Q.I9Y(q,K)}this.lastFrameTime=X.q.instance.game.time.timeMS}update(){if(super.update(),this.updateLocalTargetPos(),this.isMoving||this.hasReachedTarget()||(this.isMoving=!0,this.onMoveStart.dispatch()),this.isMoving){let q=null;if(this.GameObject.transform)if(this.GameObject.transform instanceof J.N){q=this.GameObject.findComponent(Z.u).getRootContainer().transform.position}else q=this.GameObject.transform.localPosition;else{const K=this.GameObject.legacyTransform.group.position;q=new Q.I9Y(K.x,K.y)}const K=this.localTargetPos.x{"use strict";z.d(K,{$:()=>X});var Y=z(8674),Q=z(62459);class X extends Q.JTX{create(){super.create(),this.socketService.onMessage.add(this.receivedMessage,this),this.socketService.onPlayerJoined.add(this.playerJoined,this),this.socketService.onPlayerDisconnect.add(this.playerLeft,this)}destroy(){this.socketService.onMessage.remove(this.receivedMessage,this),this.socketService.onPlayerJoined.remove(this.playerJoined,this),this.socketService.onPlayerDisconnect.remove(this.playerLeft,this),super.destroy()}playerJoined(q){}playerLeft(q){}}(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],X.prototype,"socketService",void 0)},25809:(q,K,z)=>{"use strict";z.d(K,{g:()=>rt});var Y=z(8674),Q=z(62459),X=z(30226),Z=z(72162),J=z(99625),tt=z(53661);class et extends Z.O6{constructor(q,K,z,Y){var Q,X,Z;super(J.l.SpellLearnedPopupMessage,K,z,Y);const et=q.spellIcon[0];let it;q.spellIcon[1]&&(it=q.spellIcon[1]),this._injectablePropertiesDictionary={[tt.FO.PopupMessageAtlasGuid]:et,[tt.FO.PopupMessageText]:q.spellName,[tt.FO.PopupMessageTextFill]:null!==(Q=q.fill)&&void 0!==Q?Q:"#ffffff",[tt.FO.PopupMessageTextStroke]:null!==(X=q.stroke)&&void 0!==X?X:"#000000",[tt.FO.PopupMessageTextStrokeThickness]:null!==(Z=q.strokeThickness)&&void 0!==Z?Z:0},it&&(this._injectablePropertiesDictionary=Object.assign({[tt.FO.PopupMessageAtlasFrameName]:it},this._injectablePropertiesDictionary))}}class it extends Z.O6{constructor(q,K,z,Y){var Q,X,Z;super(J.l.StatPopupMessage,K,z,Y),this._injectablePropertiesDictionary={[tt.FO.PopupMessageAtlasFrameName]:q.atlasFrameName,[tt.FO.PopupMessageAtlasGuid]:q.atlasGuid,[tt.FO.PopupMessageText]:`+${q.statIncreaseAmount}`,[tt.FO.PopupMessageTextFill]:null!==(Q=q.fill)&&void 0!==Q?Q:"#ffffff",[tt.FO.PopupMessageTextStroke]:null!==(X=q.stroke)&&void 0!==X?X:"#000000",[tt.FO.PopupMessageTextStrokeThickness]:null!==(Z=q.strokeThickness)&&void 0!==Z?Z:5}}}class st extends Z.O6{constructor(q,K,z,Y){var Q,X;super(J.l.TextPopupMessage,K,z,Y),this._injectablePropertiesDictionary={[tt.FO.PopupMessageText]:q.text,[tt.FO.PopupMessageTextFill]:q.fill,[tt.FO.PopupMessageTextStroke]:null!==(Q=q.stroke)&&void 0!==Q?Q:"#000000",[tt.FO.PopupMessageTextStrokeThickness]:null!==(X=q.strokeThickness)&&void 0!==X?X:0}}}class nt{static popupMessage(q,K){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z=0,Y=0){let X;switch(q.type){case Z.m0.Text:X=new st(q,K,z,Y);break;case Z.m0.Stat:X=new it(q,K,z,Y);break;case Z.m0.SpellLearned:X=new et(q,K,z,Y);break;default:return Q.VyI.log("The popup message being created does not have a valid type.",Q.$bb.Error),null}return yield X.init(),X}))}}var at=z(28152);let rt=class extends Q.uAl{constructor(){super(...arguments),this.delayBetweenPopups=0,this.onPopupMessageAnimationSequenceStarted=new Q.HN0,this.onPopupMessageAnimationSequenceComplete=new Q.HN0,this.onPopupMessageEntranceComplete=new Q.HN0,this._popups=[],this._signalBindingsToCleanUp=new Set}playPopupMessageAnimations(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(0!==q.length){0===this._popups.length&&this.onPopupMessageAnimationSequenceStarted.dispatch();for(const K of q){const q=yield nt.popupMessage(K,this.GameObject);if(!q)continue;const z=q.onPopupStarted.addOnce((()=>{var q;this._signalBindingsToCleanUp.delete(z),null===(q=K.showSignal)||void 0===q||q.dispatch()}));this._signalBindingsToCleanUp.add(z);const Y=q.onEntranceComplete.addOnce((()=>{this._signalBindingsToCleanUp.delete(Y),this.onPopupMessageEntranceComplete.dispatch(q,K.type),this._enteringNowPopup=null,this.showNextPopup()}));this._signalBindingsToCleanUp.add(Y);const Q=q.onPopupComplete.addOnce((()=>{var z;this._signalBindingsToCleanUp.delete(Q),q.cleanup(),X.J.removeFromArray(q,this._popups),null===(z=K.hideSignal)||void 0===z||z.dispatch(),0===this._popups.length&&this.onPopupMessageAnimationSequenceComplete.dispatch()}));this._signalBindingsToCleanUp.add(Q),this._popups.push(q)}this.showNextPopup()}}))}showNextPopup(){if(this._enteringNowPopup)return;const q=this._popups.find((q=>q.currentState===Z.jk.Created));if(!q)return;this._enteringNowPopup=q;const K=this._popups[0]===q?0:this.delayBetweenPopups;if(this.shouldPushPopupsUp)for(const z of this._popups){if(z===q)break;z.tweenYPos(z.getYPos()-q.popupHeight,null,K)}q.setYPos(0),q.tweenYPos(q.getYPos()-q.popupHeight,null,K),q.playAnimation(K)}destroy(){this._signalBindingsToCleanUp.forEach((q=>q.destroy())),this.onPopupMessageAnimationSequenceComplete.dispose(),this.onPopupMessageAnimationSequenceStarted.dispose(),this.onPopupMessageEntranceComplete.dispose(),this._popups.forEach((q=>q.cleanup())),super.destroy()}};(0,Y.Cg)([(0,Q.vkK)(),(0,Q.Lr6)(0),(0,Q.YLv)("If true, popups will push previous popups up. If false, popups will overlap."),(0,Y.Sn)("design:type",Boolean)],rt.prototype,"shouldPushPopupsUp",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Q.Lr6)(0),(0,Q.YLv)("Number of ms to wait before starting the next popup in the queue"),(0,Y.Sn)("design:type",Number)],rt.prototype,"delayBetweenPopups",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],rt.prototype,"onPopupMessageAnimationSequenceStarted",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],rt.prototype,"onPopupMessageAnimationSequenceComplete",void 0),rt=(0,Y.Cg)([(0,Q.EVk)("PopupMessageManager",at.Y.ui)],rt)},76642:(q,K,z)=>{"use strict";z.d(K,{S:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this.runOnCreate=!1,this.runOnEnable=!1,this.onDispatch=new Q.HN0}get dispatchCount(){return this.onDispatch.dispatchCount}create(){super.create(),this.runOnCreate&&this.run()}onEnable(){super.onEnable(),this.runOnEnable&&this.run()}destroy(){this.onDispatch.dispose(),super.destroy()}run(q){this.onDispatch.dispatch(q)}addListener(q){this.onDispatch.add(q)}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"runOnCreate",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"runOnEnable",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onDispatch",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("Signal",X.Y.utility)],Z)},56520:(q,K,z)=>{"use strict";z.d(K,{L:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z.n(Z),tt=z(68910),et=z(35120),it=z(28152);let st=Y=class extends X.uAl{constructor(){super(...arguments),this._frames=[],this._graphicTintColor="#ffffff",this._shuffleFrames=!0,this._frameSeparation=100,this.onSpinComplete=new X.HN0,this.onTargetChosen=new X.HN0,this._itemObjects=[]}get isSpinning(){return this._shouldSpin}create(){var q,K;super.create(),this._itemMaxY=.5*((null!==(K=null===(q=this._rectTransform)||void 0===q?void 0:q.fullHeight)&&void 0!==K?K:this._frameSeparation)+this._frameSeparation),this._shuffleFrames&&(this._frames=J().shuffle(this._frames)),J().times(this._frames.length,(()=>this.addItemGraphic()))}destroy(){var q;this.onSpinComplete.dispose(),this.onTargetChosen.dispose(),null===(q=this._spinPromise)||void 0===q||q.cancel(),this._spinTween&&et.q.instance.game.tweens.remove(this._spinTween),super.destroy()}addItemGraphic(){const q=new X._mx(this.gameObject),K=q.addComponent(X.XVE);K.setAnchorMin(.5,.5),K.setAnchorMax(.5,.5),K.setPivot(.5,.5),K.setPositionY(((this._frames.length>>1)-this._itemObjects.length)*this._frameSeparation);const z=q.addComponent(X.vYh);this._graphicTintColor&&(z.tint=X.TZp.hexToDecimal(this._graphicTintColor)),z.updateAsset(this._atlas,this._frames[this._itemObjects.length]);const Y=z.getDimensions();K.setSizeDelta(Y.width,Y.height),this._itemObjects.push([z,K])}startSpin(){this._shouldSpin=!0,this._spinPromise=new X.kBN(((q,K)=>{(()=>(0,Q.sH)(this,void 0,void 0,(function*(){if(yield this.tweenItems(this._frameSeparation,Y.SPIN_LEAD_IN_TIME_MS,X.GS3.Back.In),this._spinPromise.cancelled)return;let K;if(yield new Promise((q=>{K=()=>{this._spinPromise.cancelled||!this._shouldSpin?q():this.offsetItems(tt.Ticker.shared.deltaMS/Y.SPIN_CYCLE_TIME_MS*this._frameSeparation)},tt.Ticker.shared.add(K)})),tt.Ticker.shared.remove(K),this._spinPromise.cancelled)return;const z=J()(this._itemObjects).filter((q=>q[1].localPosition.y<-this._itemMaxY)).maxBy((q=>q[1].localPosition.y));this.onTargetChosen.dispatch(z),yield this.tweenItems(-z[1].localPosition.y,2*Y.SPIN_CYCLE_TIME_MS,X.GS3.Back.Out),this.onSpinComplete.dispatch(),q()})))().catch((q=>{X.RQr.logError(q,"Error in slot spin animation"),K(q)})).finally((()=>{this._spinPromise=null,this._spinTween=null}))}))}stopSpin(){this._shouldSpin=!1}offsetItems(q){for(const K of this._itemObjects){let z=K[1].localPosition.y+q;z>this._itemMaxY&&(z-=this._itemObjects.length*this._frameSeparation),K[1].setPositionY(z)}}tweenItems(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y={lastOffset:0,offset:0};this._spinTween=et.q.instance.game.add.tween(Y,this).to({offset:q},K,z,!0),this._spinTween.onUpdate.add((()=>{const q=Y.offset-Y.lastOffset;Y.lastOffset=Y.offset,this.offsetItems(q)})),yield this._spinTween.onTweenComplete.asPromise()}))}};st.SPIN_LEAD_IN_TIME_MS=1e3,st.SPIN_CYCLE_TIME_MS=100,(0,Q.Cg)([(0,X.Pqz)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],st.prototype,"_rectTransform",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,X.W_S)(),(0,Q.Sn)("design:type",String)],st.prototype,"_atlas",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],st.prototype,"_frames",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",String)],st.prototype,"_graphicTintColor",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],st.prototype,"_shuffleFrames",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],st.prototype,"_frameSeparation",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],st.prototype,"onSpinComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],st.prototype,"onTargetChosen",void 0),st=Y=(0,Q.Cg)([(0,X.EVk)("SlotMachineAnimation",it.Y.animation)],st)},85697:(q,K,z)=>{"use strict";z.d(K,{o:()=>it});var Y=z(8674),Q=z(62459),X=z(91207),Z=z(77938),J=z(68152),tt=z(28152),et=z(34603);let it=class extends Q.uAl{constructor(){super(...arguments),this._dormImage=null,this._dormItemID=null,this._orientation=null}get dormItemID(){return this._dormItemID}create(){super.create(),this._dormImage.OnLoaded.add(this.updateOffset,this),null!==this._dormItemID&&this._dormImage&&null!==this._orientation&&this.updateDormImage()}destroy(){this._dormImage.OnLoaded.remove(this.updateOffset,this),this._dormImage=null,super.destroy()}setDormItemID(q,K){this._dormItemID=q,this._orientation=K,this.updateDormImage()}updateDormImage(){(0,J.v)(null!==this._dormItemID&&this._dormItemID>0,"Invalid dorm item ID was loaded");const q=Z.t.getItem("dorm",this._dormItemID).metadata.assets[this._orientation];(0,J.v)("singleImage"===q.type,`Invalid singleImage dorm item data for ID: ${this._dormItemID}`),this._dormImage.setAsset(X.E.getDormImage(this._orientation,this._dormItemID)).catch(Q.RQr.createHandler("Error setting _dormImage"))}updateOffset(){const q=this._dormImage.getDimensions();this._dormImage.GameObject.transform.setPosition(-q.getHalfWidth(),-q.height)}};(0,Y.Cg)([(0,Q.MnK)(et._),(0,Y.Sn)("design:type",et._)],it.prototype,"_dormImage",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_dormItemID",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],it.prototype,"_orientation",void 0),it=(0,Y.Cg)([(0,Q.EVk)("SingleImageDormItem",tt.Y.object)],it)},53880:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{J:()=>Q,d:()=>Y}),function(q){q.StoryTabActive="STORY_TAB_ACTIVE",q.CoopTabActive="COOP_TAB_ACTIVE",q.SeasonTabActive="SEASON_TAB_ACTIVE",q.RiftsTabActive="RIFTS_TAB_ACTIVE",q.MemberTabActive="MEMBER_TAB_ACTIVE",q.BackgroundImageGuid="BACKGROUND_IMAGE_GUID",q.TitleText="TITLE_TEXT",q.BannerFillColor="BANNER_FILL_COLOR"}(Y||(Y={})),function(q){q.BackgroundImageGuid="BACKGROUND_IMAGE_GUID",q.TitleText="TITLE_TEXT",q.FestivalAtlasGuid="FESTIVAL_ATLAS_GUID",q.LeftColumnText="LEFT_COLUMN_TEXT",q.LeftColumnFrame="LEFT_COLUMN_FRAME",q.RightColumnText="RIGHT_COLUMN_TEXT",q.RightColumnFrame="RIGHT_COLUMN_FRAME",q.MiddleColumnText="MIDDLE_COLUMN_TEXT",q.MiddleColumnFrame="MIDDLE_COLUMN_FRAME"}(Q||(Q={}))},55741:(q,K,z)=>{"use strict";z.d(K,{l:()=>it});var Y=z(8674),Q=z(20136),X=z(58268),Z=z(62459),J=z(68910),tt=z(28152),et=z(28402);let it=class extends Z.uAl{constructor(){super(...arguments),this._targetTransform=null,this._boneFollower=null,this._followAxis=3,this._followRotation=!1,this._followScale=3,this._followAlpha=!0,this._followTint=!1,this._localOffset=new Z.I9Y(0,0),this._previousLocalOffset=new Z.I9Y(0,0),this._bone=null,this._slot=null,this._boneFollowerLocalTransform=new J.Matrix,this._localMatrix=new J.Matrix,this._bonesPreviousPosition=new Z.I9Y(0,0),this._transformsNewPosition=new Z.I9Y(0,0),this._setupFunctions=new Map([["spineComponent",q=>this.setupSpine(q.spineComponent)],["boneName",q=>this.setupBone(q.boneName)],["slotName",q=>this.setupSlot(q.slotName)],["followAxis",q=>{this._followAxis=q.followAxis}],["followRotation",q=>{this._followRotation=q.followRotation}],["followScale",q=>{this._followScale=q.followScale}],["boneFollower",q=>this.setupFollower(q.boneFollower)],["boneFollowerTransform",q=>{this.targetTransform=q.boneFollowerTransform}]])}set targetTransform(q){const K=q.GameObject.findComponentInChildren(Z.y4o,!0);K&&(this.setupFollower(K.getRootContainer())||K.onRootContainerSet.addOnce(this.onFollowerRootContainerSet.bind(this,K)),this._targetTransform=q)}set followAxis(q){this._followAxis=q}set followRotation(q){this._followRotation=q}set followScale(q){this._followScale=q}set localOffset(q){this._localOffset.set(q.x,q.y)}create(){super.create()}setup(q=null){var K;if(!Z.Aq$.isDefined(null===(K=this._spineComponent)||void 0===K?void 0:K.OnLoaded)||this._spineComponent.isLoaded)if(q)Object.keys(q).forEach((K=>{this._setupFunctions.get(K)(q)}));else{if(!this._spineComponent)return;if(!this._boneFollower&&this._targetTransform){const q=this._targetTransform.GameObject.findComponentInChildren(Z.y4o,!0);if(!q)return;this.setupFollower(q.getRootContainer())||q.onRootContainerSet.addOnce(this.onFollowerRootContainerSet.bind(this,q))}!this._bone&&Z.Aq$.isDefined(this._boneName)&&0!==this._boneName.length&&this.setupBone(this._boneName),!this._slot&&Z.Aq$.isDefined(this._slotName)&&0!==this._slotName.length&&this.setupSlot(this._slotName)}else this._spineComponent.OnLoaded.addOnce((()=>{this.setup(q)}))}setupBone(q){return this._bone=this._spineComponent.getBone(q),!!this._bone&&(this._boneName=q,this._bonesPreviousPosition.set(this._bone.worldX,this._bone.worldY),!0)}setupFollower(q){return!!q&&(this._boneFollower=q,this._boneFollowerLocalTransform.copyFrom(this._boneFollower.transform.localTransform),this._localMatrix.copyFrom(this._boneFollowerLocalTransform),!0)}setupSlot(q){return this._slot=this._spineComponent.getSlot(q),!!this._slot&&(this._slotName=q,!0)}destroyOnAnimationComplete(q){this._spineComponent.getSpine().onStart.addOnce((()=>{this._spineComponent.getSpine().onComplete.addOnce((()=>{this._spineComponent.getSpine().setToSetupPose(),this.Active=!1,this.destroy(),null==q||q()}))}))}update(){super.update(),this._bone&&this._boneFollower&&(this._boneFollower.filters=[],this._followAlpha&&this.filterAlpha(this._boneFollower),this._followTint&&this.filterTint(this._boneFollower),this._targetTransform?(4!==this._followAxis&&(this._transformsNewPosition.x=this._targetTransform.localPosition.x+(this._bone.worldX-this._bonesPreviousPosition.x)+(this._localOffset.x-this._previousLocalOffset.x),this._transformsNewPosition.y=this._targetTransform.localPosition.y+(this._bone.worldY-this._bonesPreviousPosition.y)+(this._localOffset.y-this._previousLocalOffset.y),this._targetTransform.setPosition(2!==this._followAxis?this._transformsNewPosition.x:this._targetTransform.localPosition.x,1!==this._followAxis?this._transformsNewPosition.y:this._targetTransform.localPosition.y),this._bonesPreviousPosition.x=this._bone.worldX,this._bonesPreviousPosition.y=this._bone.worldY,this._previousLocalOffset.x=this._localOffset.x,this._previousLocalOffset.y=this._localOffset.y),4!==this._followScale&&this._targetTransform.setScale(2!==this._followScale?this._bone.scaleX:this._targetTransform.localScale.x,1!==this._followScale?this._bone.scaleY:this._targetTransform.localScale.y),this._followRotation&&this._targetTransform.setRotation(this._bone.rotation)):(this._localMatrix.copyFrom(this._boneFollowerLocalTransform),4!==this._followAxis&&(this._localMatrix.translate(2!==this._followAxis?this._bone.worldX+this._localOffset.x:0,1!==this._followAxis?this._bone.worldY+this._localOffset.y:0),this._boneFollower.transform.setFromMatrix(this._localMatrix)),4!==this._followScale&&(this._boneFollower.scale=new J.Point(2!==this._followScale?this._bone.scaleX:this._boneFollower.scale.x,1!==this._followScale?this._bone.scaleY:this._boneFollower.scale.y)),this._followRotation&&(this._boneFollower.rotation=this._bone.rotation),this._boneFollower.updateTransform()))}setupSpine(q){return q?(this._spineComponent=q,!0):(Z.VyI.log("SpineComponent cannot be null or undefined",Z.$bb.Error),!1)}onFollowerRootContainerSet(q){q.onRootContainerSet.remove(this.onFollowerRootContainerSet,this),this.setupFollower(q.getRootContainer())||Z.VyI.log("Bone Follower cannot be null or undefined",Z.$bb.Error)}filterTint(q){var K;if(!(null===(K=this._slot)||void 0===K?void 0:K.color))return;const z=new X.N;z.matrix[0]=this._slot.color.r,z.matrix[6]=this._slot.color.g,z.matrix[12]=this._slot.color.b,q.filters.push(z)}filterAlpha(q){var K;if(!(null===(K=this._slot)||void 0===K?void 0:K.color))return;const z=new Q.Z;z.alpha=this._slot.color.a,q.filters.push(z)}destroy(){this._spineComponent=null,this._bone=null,this._slot=null,this._boneFollower=null,this._boneName=null,this._slotName=null,this._targetTransform=null,super.destroy()}};(0,Y.Cg)([(0,Z.MnK)(Z.dLy),(0,Y.Sn)("design:type",Z.dLy)],it.prototype,"_targetTransform",void 0),(0,Y.Cg)([(0,Z.MnK)(et.v),(0,Y.Sn)("design:type",et.v)],it.prototype,"_spineComponent",void 0),(0,Y.Cg)([(0,Z.W_S)(),(0,Y.Sn)("design:type",String)],it.prototype,"_boneName",void 0),(0,Y.Cg)([(0,Z.W_S)(),(0,Y.Sn)("design:type",String)],it.prototype,"_slotName",void 0),(0,Y.Cg)([(0,Z.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_followAxis",void 0),(0,Y.Cg)([(0,Z.vkK)(),(0,Y.Sn)("design:type",Boolean)],it.prototype,"_followRotation",void 0),(0,Y.Cg)([(0,Z.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_followScale",void 0),(0,Y.Cg)([(0,Z.vkK)(),(0,Y.Sn)("design:type",Boolean)],it.prototype,"_followAlpha",void 0),(0,Y.Cg)([(0,Z.vkK)(),(0,Y.Sn)("design:type",Boolean)],it.prototype,"_followTint",void 0),(0,Y.Cg)([(0,Z.DTs)(),(0,Y.Sn)("design:type",Z.I9Y),(0,Y.Sn)("design:paramtypes",[Z.I9Y])],it.prototype,"localOffset",null),(0,Y.Cg)([(0,Z.DTs)(),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[J.Container]),(0,Y.Sn)("design:returntype",Boolean)],it.prototype,"setupFollower",null),(0,Y.Cg)([(0,Z.DTs)(),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Function]),(0,Y.Sn)("design:returntype",void 0)],it.prototype,"destroyOnAnimationComplete",null),(0,Y.Cg)([(0,Z.DTs)(),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[et.v]),(0,Y.Sn)("design:returntype",Boolean)],it.prototype,"setupSpine",null),(0,Y.Cg)([(0,Z.DTs)(),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Z.y4o]),(0,Y.Sn)("design:returntype",void 0)],it.prototype,"onFollowerRootContainerSet",null),it=(0,Y.Cg)([(0,Z.EVk)("SpineBoneFollower",tt.Y.animation)],it)},55800:(q,K,z)=>{"use strict";z.d(K,{a:()=>tt});var Y=z(8674),Q=z(62459),X=z(77938),Z=z(68152),J=z(28152);let tt=class extends Q.uAl{constructor(){super(...arguments),this._followParent=null,this._followID=null,this._onFollowLoaded=new Q.HN0,this._followAppearance=null}get followID(){return this._followID}get followParent(){return this._followParent}get onFollowLoaded(){return this._onFollowLoaded}create(){super.create(),null!==this._followID&&this._followParent&&this.updateFollowAppearance()}destroy(){this._onFollowLoaded.dispose(),this._followParent=null,super.destroy()}setFollowID(q){this._followID=q,this.updateFollowAppearance()}updateFollowAppearance(){this._followAppearance&&this._followAppearance.destroy(),(0,Z.v)(null!==this._followID&&this._followID>0,"Invalid follow ID was loaded");const q=X.t.getItem("follow",this._followID).metadata.assets.prefab;(0,Z.v)("prefab"===(null==q?void 0:q.type),`Invalid follow prefab data for ID: ${this._followID}`),this._followAppearance=this._prefabLoader.load(q.ID,this._followParent),this._onFollowLoaded.dispatch()}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_followParent",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_followID",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"_onFollowLoaded",void 0),(0,Y.Cg)([(0,Q.Cdj)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],tt.prototype,"_prefabLoader",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("LegacyFollowAppearance",J.Y.follow)],tt)},77078:(q,K,z)=>{"use strict";z.d(K,{p:()=>J});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(36303);let J=class extends Z.O{constructor(){super(...arguments),this._width=100,this._height=100}get Width(){return this._width}set Width(q){this._width=q,this.redrawInputRect()}get Height(){return this._height}set Height(q){this._height=q,this.redrawInputRect()}getInputRect(){return new X.Rectangle(-.5*this._width,-.5*this._height,this._width,this._height)}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_width",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_height",void 0),J=(0,Y.Cg)([(0,Q.EVk)("Input")],J)},36303:(q,K,z)=>{"use strict";z.d(K,{O:()=>nt});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(35120),J=z(74560),tt=z(77442),et=z(59231);class it extends et.l{constructor(q,K){var z;if(super(q),this._shape=K,K instanceof tt.k){const K=q,Y=null===(z=K.containsPoint)||void 0===z?void 0:z.bind(q);Y&&(K.containsPoint=q=>!this._shape.isPointOverShape(q)&&(!!Y&&Y(q)))}}getHandlerType(){return this._shape instanceof tt.k?et.q.Passthrough:et.q.Shape}checkPointerOver(q){return super.checkPointerOver(q)&&this.isPointOverShape(q.position)}checkPointerDown(q){return super.checkPointerDown(q)&&this.isPointOverShape(q.position)}isPointOverShape(q){return this._shape.isPointOverShape(q)}}var st=z(36045);class nt extends Q.y4o{constructor(){super(...arguments),this._inputGraphic=null,this.onClicked=new Q.HN0,this.onHoverEnter=new Q.HN0,this.onHoverExit=new Q.HN0,this.onHoverEnterInputUp=new Q.HN0,this.onHoverExitInputUp=new Q.HN0,this.onInputDown=new Q.HN0,this.onInputUp=new Q.HN0,this.onInputUpOutside=new Q.HN0,this._onInputEnabledChanged=new Q.HN0,this._priorityID=0,this._useHandCursor=!1,this._forceAttachToCamera=!1,this._spriteDimensions=new Q.or0,this.sendClickLocationWithOnClick=!0,this._cooldownTimeMs=0}set useHandCursor(q){this._useHandCursor=q,this._useHandCursor&&this._inputGraphic.input.pointerOver()&&(Z.q.instance.game.canvas.style.cursor="pointer")}get useHandCursor(){return this._useHandCursor}get InputEnabled(){return this._inputGraphic.inputEnabled}set InputEnabled(q){this._inputGraphic.inputEnabled=q,this._onInputEnabledChanged.dispatch();const K=Z.q.instance.game.input.activePointer;null!==K&&K.targetObject===this._inputGraphic.input&&K.swapTarget(null)}onEnable(){this.InputEnabled=!0,super.onEnable()}onDisable(){this.InputEnabled=!1,super.onDisable()}set blockType(q){this._inputGraphic.input.blockType=q}create(){super.create(),this._inputParent=Z.q.instance.game.add.group(),this._inputParent.name=`${this.GameObject.name} - InputBase parent`,this._inputGraphic=Z.q.instance.prodigy.create.image(0,0,void 0,0,X.Texture.WHITE),this._inputParent.addChild(this._inputGraphic),this._inputGraphic.name=`${this.GameObject.name} - Input sprite`,this.customShape&&J.m.setInputHandler(this._inputGraphic,new it(this._inputGraphic,this.customShape)),this._inputGraphic.inputEnabled=!0,this._priorityID&&(this._inputGraphic.input.priorityID=this._priorityID);Q.wa5.getActiveScene()&&(this.updateAttachToCamera(),this.gameObject.onHierarchyChanged.add(this.updateAttachToCamera,this),this.gameObject.onLayerChanged.add(this.updateAttachToCamera,this)),this.setRootContainer(this._inputParent),this._inputGraphic.events.onInputDown.add(((q,K)=>{const z=q.input.attachToCamera?K.position:K.worldPosition,Y=new Q.I9Y(z.x,z.y);this.gameObject.activeInHierarchy&&!this.isOnCooldown()&&(this.onClicked.dispatch(...this.sendClickLocationWithOnClick?[Y]:[]),this._lastClickTime=Date.now(),this.onInputDown.dispatch())}),this),this._inputGraphic.events.onInputUp.add(((q,K)=>{q.input.checkPointerOver(K)?this.onInputUp.dispatch():this.onInputUpOutside.dispatch()}),this),this._inputGraphic.events.onInputOver.add(((q,K)=>{this._useHandCursor&&(Z.q.instance.game.canvas.style.cursor="pointer"),this.onHoverEnter.dispatch(),K.isDown||this.onHoverEnterInputUp.dispatch()}),this),this._inputGraphic.events.onInputOut.add(((q,K)=>{this._useHandCursor&&(Z.q.instance.game.canvas.style.cursor=""),this.onHoverExit.dispatch(),K.isDown||K.justReleased()||this.onHoverExitInputUp.dispatch()}),this),this.redrawInputRect()}destroy(){var q;this.gameObject.onHierarchyChanged.remove(this.updateAttachToCamera,this),this.gameObject.onLayerChanged.remove(this.updateAttachToCamera,this),Z.q.instance.game.canvas.style.cursor="",null===(q=this._inputParent)||void 0===q||q.destroy(),this.onClicked.dispose(),this.onHoverEnter.dispose(),this.onHoverExit.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose(),this.onInputUpOutside.dispose(),this.onHoverEnterInputUp.dispose(),this.onHoverExitInputUp.dispose(),this._onInputEnabledChanged.dispose(),super.destroy(),this._inputGraphic=null}getDimensions(){return this._spriteDimensions}redrawInputRect(){var q;if(this._inputGraphic){const K=this.getInputRect();this._inputGraphic.alpha=0;const z=null===(q=this.gameObject)||void 0===q?void 0:q.transform;z?z instanceof Q.XVE||(this._inputGraphic.width=K.width,this._inputGraphic.height=K.height,this._inputGraphic.position.set(K.x,K.y)):(this._inputGraphic.width=K.width,this._inputGraphic.height=K.height,this._inputGraphic.x=K.x,this._inputGraphic.y=K.y),this._spriteDimensions.setTo(this._inputGraphic.width,this._inputGraphic.height)}}updateAttachToCamera(){const q=Q.wa5.getActiveScene();q&&(this._inputGraphic.input.attachToCamera=this._forceAttachToCamera||q.getLayer(this.gameObject.layer).attachToCamera)}isOnCooldown(){return this._cooldownTimeMs>0&&Date.now(){"use strict";z.d(K,{n:()=>tt});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(28152),J=z(36303);let tt=class extends J.O{constructor(){super(...arguments),this._width=100,this._height=100,this._offset=new Q.I9Y(0,0),this._inputSize=new Q.or0(100,100)}get width(){return this._width}get height(){return this._height}onEnable(){}onDisable(){}setSize(q,K,z=!0){this._width=q,this._height=K,this._inputSize.setTo(this._width,this._height),z&&this.redrawInputRect()}setOffset(q,K,z=!0){this._offset.setTo(q,K),z&&this.redrawInputRect()}getInputRect(){return new X.Rectangle(this._offset.x,this._offset.y,this._width,this._height)}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_width",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_height",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],tt.prototype,"_offset",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("InputOverlay",Z.Y.input)],tt)},27952:(q,K,z)=>{"use strict";z.d(K,{t:()=>tt});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(28152),J=z(36303);let tt=class extends J.O{getInputRect(){let q=0,K=0,z=100,Y=100;const{legacyTransform:Z,transform:J}=this.gameObject;return Z?({width:z,height:Y}=Z):J instanceof Q.XVE?({left:q,top:K,rectTransformDimensions:{width:z,height:Y}}=J):Q.VyI.log("RectInput missing valid Transform",Q.$bb.Error),new X.Rectangle(q,K,z,Y)}};tt=(0,Y.Cg)([(0,Q.EVk)("RectInput",Z.Y.input)],tt)},28047:(q,K,z)=>{"use strict";z.d(K,{v:()=>rt});var Y=z(8674),Q=z(62459),X=z(94566),Z=z(7351),J=z(24595),tt=z(43754),et=z(67665),it=z(13956),st=z(21097),nt=z(11647),at=z(10704);class rt extends((0,nt.o)(Q.uAl)){constructor(){super(...arguments),this.onItemSelected=this.createTidySignal()}}(0,Y.Cg)([(0,it.b)("20f-5f67"),(0,Y.Sn)("design:type",et.Y)],rt.prototype,"_segment",void 0),(0,Y.Cg)([(0,it.b)("782-c308"),(0,Y.Sn)("design:type",Z.W)],rt.prototype,"_player",void 0),(0,Y.Cg)([(0,it.b)("9dc-186c"),(0,Y.Sn)("design:type",Object)],rt.prototype,"_gameNativeAppNotificationProvider",void 0),(0,Y.Cg)([(0,it.b)("bec-c6b4"),(0,Y.Sn)("design:type",tt.W)],rt.prototype,"_hardCurrencyDataProvider",void 0),(0,Y.Cg)([(0,Q.MnK)(J.V),(0,Y.Sn)("design:type",J.V)],rt.prototype,"headerNavigation",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],rt.prototype,"onItemSelected",void 0),(0,Y.Cg)([(0,Q.MnK)(at.f),(0,Y.Sn)("design:type",at.f)],rt.prototype,"_shelfSpawner",void 0),(0,Y.Cg)([(0,Q.MnK)(st.NL),(0,Y.Sn)("design:type",st.NL)],rt.prototype,"_itemPreview",void 0),(0,Y.Cg)([(0,Q.MnK)(X.O),(0,Y.Sn)("design:type",X.O)],rt.prototype,"_itemCardToggleGroup",void 0)},88060:(q,K,z)=>{"use strict";z.d(K,{m:()=>J});var Y=z(8674),Q=z(62459),X=z(10044),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._isMoving=!1,this._initialScaleX=1}create(){super.create(),this._initialFaceTarget&&this.setFacingDirection(this._initialFaceTarget.worldPosition.x{"use strict";z.d(K,{U:()=>J});var Y=z(8674),Q=z(62459),X=z(68152),Z=z(28152);let J=class extends Q.uAl{closeFail(){this.close(!1)}closeSucceed(){this.close(!0)}close(q){(0,X.v)(!!this.openDialog,"Missing OpenBooleanDialog"),this.prefabRoot.destroy(),(q?this.openDialog.onSuccess:this.openDialog.onFail).dispatch(),this.openDialog=null}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"prefabRoot",void 0),J=(0,Y.Cg)([(0,Q.EVk)("CloseBooleanDialogPrefab",Z.Y.uiDialog)],J)},32259:(q,K,z)=>{"use strict";z.d(K,{e:()=>tt});var Y=z(8674),Q=z(62459),X=z(68152),Z=z(28152),J=z(4035);let tt=class extends Q.uAl{constructor(){super(...arguments),this.onFail=new Q.HN0,this.onSuccess=new Q.HN0}destroy(){this.onFail.dispose(),this.onSuccess.dispose(),super.destroy()}configure(q){const K=q.findComponentInChildren(J.U);(0,X.v)(!!K,"Missing CloseBooleanDialog component"),K.openDialog=this}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onFail",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onSuccess",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("ConfigureBooleanDialogPrefab",Z.Y.uiDialog)],tt)},46361:(q,K,z)=>{"use strict";z.d(K,{S:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(68152),J=z(28152),tt=z(4035);let et=class extends Q.uAl{constructor(){super(...arguments),this.onFail=new Q.HN0,this.onSuccess=new Q.HN0}destroy(){this.onFail.dispose(),this.onSuccess.dispose(),super.destroy()}open(){const q=X.q.instance.prodigy.open.prefabMenu(this._prefabID);return q.onPrefabLoaded.addOnce((q=>{const K=q.findComponentInChildren(tt.U);(0,Z.v)(!!K,"Missing CloseBooleanDialog component"),K.openDialog=this})),q}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_prefabID",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],et.prototype,"onFail",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],et.prototype,"onSuccess",void 0),et=(0,Y.Cg)([(0,Q.EVk)("OpenBooleanDialogPrefab",J.Y.uiDialog)],et)},6476:(q,K,z)=>{"use strict";z.d(K,{T:()=>tt});var Y=z(8674),Q=z(62459),X=z(92579),Z=z(35120),J=z(28152);let tt=class extends Q.uAl{open(){this.IsActiveInHierarchy&&Z.q.instance.prodigy.open.card(this._playerData.player,!0,X.a.available)}};(0,Y.Cg)([(0,Q.Cdj)("1eb-d7b4"),(0,Y.Sn)("design:type",Object)],tt.prototype,"_playerData",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("OpenPlayerCard",J.Y.uiDialog)],tt)},34398:(q,K,z)=>{"use strict";z.d(K,{l:()=>Z});var Y=z(8674),Q=z(62459),X=z(35120);class Z extends Q.uAl{constructor(){super(...arguments),this.onClose=new Q.HN0,this.onOpen=new Q.HN0}open(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.onOpen.dispatch()}))}onFirstPopup(){}create(){super.create(),this.onOpen.add(this.onOpenCallback,this),this.onClose.add(this.onCloseCallback,this)}onOpenCallback(){const q=X.q.instance.prodigy.world.getCurrentZoneObject();null==q||q.togglePetsInZoneButtonVisibility(!1)}onCloseCallback(){const q=X.q.instance.prodigy.world.getCurrentZoneObject();null==q||q.togglePetsInZoneButtonVisibility(!0)}destroy(){this.onClose.dispose(),this.onOpen.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onClose",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onOpen",void 0)},22866:(q,K,z)=>{"use strict";z.d(K,{l:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._onClosed=new Q.HN0,this.onOpen=new Q.HN0,this._isModal=!0,this._skipTransparency=!1,this._skipStopPlayer=!1,this._createContainer=!0,this._obeyMenuStackVisibility=!1}get prefabMenu(){return this._prefabMenu}destroy(){this.onOpen.dispose(),this._onClosed.dispose(),this._prefabMenu=null,super.destroy()}open(){var q;this._prefabMenu=X.q.instance.prodigy.open.prefabMenu(null!==(q=this._prefabGuid)&&void 0!==q?q:this._prefabID,(()=>{this._onClosed.dispatch()}),!0,this._isModal,this._skipTransparency,this._injectablePropertiesDictionary,void 0,void 0,void 0,void 0,this._obeyMenuStackVisibility),this._prefabMenu.createContainer=this._createContainer,this._prefabMenu.skipStopPlayer=this._skipStopPlayer,this._prefabMenu.onPrefabLoaded.addOnce((q=>{this.onOpen.dispatch(q)}))}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_prefabID",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"_prefabGuid",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"_onClosed",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onOpen",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_isModal",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_skipTransparency",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_skipStopPlayer",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_createContainer",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],J.prototype,"_injectablePropertiesDictionary",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_obeyMenuStackVisibility",void 0),J=(0,Y.Cg)([(0,Q.EVk)("OpenPrefabMenu",Z.Y.uiDialog)],J)},85056:(q,K,z)=>{"use strict";z.d(K,{k:()=>et});var Y=z(8674),Q=z(62459),X=z(98252),Z=z(35120),J=z(28152),tt=z(34398);const et="lastReviewPopupVersion";let it=class extends tt.l{canOpen(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(X.pF.appType()!==X.uC.NATIVE_APP)return!1;const q=X.pF.getNativeAppVersion(),K=window.localStorage.getItem(et);if(!q||q===K)return!1;const z=this._loggedInPlayer.player;return!(!z.justLeveled||!this._featureRequirements.meetsRequirementsDeprecated(14))&&(z.justLeveled=!1,window.localStorage.setItem(et,q),!0)}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),Z.q.instance.prodigy.open.rating((()=>{this.onClose.dispatch()}))}))}};(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",Object)],it.prototype,"_loggedInPlayer",void 0),(0,Y.Cg)([(0,Q.Cdj)("11f-118a"),(0,Y.Sn)("design:type",Object)],it.prototype,"_featureRequirements",void 0),it=(0,Y.Cg)([(0,Q.EVk)("OpenRatingPopup",J.Y.uiPopup)],it)},99617:(q,K,z)=>{"use strict";z.d(K,{I:()=>nt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(41674),J=z(64353),tt=z(95057),et=z(47255),it=z(28152),st=z(34398);let nt=class extends st.l{constructor(){super(...arguments),this._forwardedInjectionIdentifiers=[],this._funnelName=et.o.FunnelClickHUDButton,this._funnelStage=et.o.StageClickCTA,this._sendFunnelStart=!1,this.onRulesetSuccess=new Q.HN0,this.onRulesetFail=new Q.HN0}canOpen(){return(0,Y.sH)(this,void 0,void 0,(function*(){return Q.Aq$.isDefined(J.P.evaluateUnifiedConversionFlowRules(this._funnelName))}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Y.sH)(this,arguments,void 0,(function*(K={}){yield q.open.call(this),(yield this.canOpen())?(this._sendFunnelStart&&X.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({adType:tt.R.UnifiedConversionFlow,adVersion:J.P.getAdVersion(this._funnelName),category:"currency",contentId:this._funnelStartTriggerContent,type:"magicoin_currency_button"}),X.q.instance.prodigy.open.unifiedConversionFlow(this.onPromptClosed.bind(this),{conversionFunnelName:this._funnelName,conversionStage:this._funnelStage},{id:this._analyticSource,type:this._analyticSourceType},this.getInjectableValues(K)),this.onRulesetSuccess.dispatch()):this.onRulesetFail.dispatch()}))}onPromptClosed(){var q;null===(q=this.onClose)||void 0===q||q.dispatch()}destroy(){this.onRulesetFail.dispose(),this.onRulesetSuccess.dispose(),super.destroy()}getInjectableValues(q={}){const K=Object.assign({},q);return this._forwardedInjectionIdentifiers.forEach((q=>{K[q]=this.getInjectedValue(q)})),K}};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.W_S)(),(0,Y.Sn)("design:type",Array)],nt.prototype,"_forwardedInjectionIdentifiers",void 0),(0,Y.Cg)([(0,Q.gfw)(et.o),(0,Y.Sn)("design:type",String)],nt.prototype,"_funnelName",void 0),(0,Y.Cg)([(0,Q.gfw)(et.o),(0,Y.Sn)("design:type",String)],nt.prototype,"_funnelStage",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],nt.prototype,"_analyticSource",void 0),(0,Y.Cg)([(0,Q.gfw)(Z.$N),(0,Y.Sn)("design:type",String)],nt.prototype,"_analyticSourceType",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],nt.prototype,"_sendFunnelStart",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],nt.prototype,"_funnelStartTriggerContent",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],nt.prototype,"onRulesetSuccess",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],nt.prototype,"onRulesetFail",void 0),nt=(0,Y.Cg)([(0,Q.EVk)("OpenUnifiedConversionFlow",it.Y.uiPopup)],nt)},24981:(q,K,z)=>{"use strict";z.d(K,{S:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(99625),J=z(35120),tt=z(41012),et=z(28152),it=z(34398);let st=Y=class extends it.l{static get openedThisSession(){return Y._openedThisSession}canOpen(){return(0,Q.sH)(this,void 0,void 0,(function*(){return tt.e.canAutoSurfaceWizardWatch()}))}open(){const q=Object.create(null,{open:{get:()=>super.open}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.open.call(this),Y._openedThisSession=!0,this._loggedInPlayer.player.data.wwCooldownTime=Date.now();J.q.instance.prodigy.open.socialFeed((()=>{J.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(Z.l.PushNotificationPermission).catch((q=>{X.VyI.log("Error loading push notification permission prefab",X.$bb.Error)})),this.onClose.dispatch()}),"from-login")}))}};st._openedThisSession=!1,(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],st.prototype,"_loggedInPlayer",void 0),st=Y=(0,Q.Cg)([(0,X.EVk)("OpenWizardWatchPopup",et.Y.uiPopup)],st)},95383:(q,K,z)=>{"use strict";z.d(K,{Y:()=>it});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(34829),J=z(28152),tt=z(73797),et=z(34398);let it=class extends Q.uAl{constructor(){super(...arguments),this.onPopupClosed=new Q.HN0,this.onNoPopupAvailable=new Q.HN0,this._openPopupsOnCreate=!1,this._popups=[],this._currentPopup=null,this._isFirstPopup=!0,this._popupDelayPromises=[],this._popupsProcessed=!1}get popupsProcessed(){return this._popupsProcessed}postCreate(){super.postCreate(),this._openPopupsOnCreate&&Promise.all(this._popupDelayPromises).catch((()=>{Q.VyI.log("Popups have been suppressed",Q.$bb.Verbose)})).then((()=>(0,Y.sH)(this,void 0,void 0,(function*(){var q,K;null===(K=null===(q=this.gameObject)||void 0===q?void 0:q.isDestroyed)||void 0===K||K||(yield this.openNextPopup())})))).catch(Q.RQr.createHandler("Error showing popups"))}destroy(){this._popupDelayPromises.length=0;const q=X.q.instance.prodigy.world.getCurrentZoneObject();null==q||q.destroyPetsInZoneButton(),X.q.instance.prodigy.notifications.clearNotifications(),this.onPopupClosed.dispose(),this.onNoPopupAvailable.dispose(),super.destroy()}openNextPopup(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this._isFirstPopup){this._isFirstPopup=!1;for(const K of this._popups)try{K.onFirstPopup()}catch(q){Q.RQr.logError(q,"Error in onFirstPopup")}}if(this.Active&&Z.A.get("GameConstants.Debug.POPUPS_ENABLED")&&!X.q.instance.prodigy.notifications.isPaused())try{let q;X.q.instance.game.input.enabled=!1;for(const K of this._popups){if(yield K.canOpen()){q=K;break}}q?(this._currentPopup=q,this._currentPopup.onClose.addOnce((()=>{this._currentPopup=null,this.onPopupClosed.dispatch(),X.q.instance.game.broadcaster.broadcast(tt.Y1.CheckForHUDAttention),this._popupsProcessed=!0})),yield q.open()):(this.onNoPopupAvailable.dispatch(),X.q.instance.game.broadcaster.broadcast(tt.Y1.CheckForHUDAttention),this._popupsProcessed=!0)}finally{X.q.instance.game.input.enabled=!0}}))}isShowingPopup(){return null!==this._currentPopup}delayPopupsUntil(q){this._popupDelayPromises.push(q)}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],it.prototype,"onPopupClosed",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],it.prototype,"onNoPopupAvailable",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],it.prototype,"_openPopupsOnCreate",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(et.l),(0,Y.Sn)("design:type",Array)],it.prototype,"_popups",void 0),it=(0,Y.Cg)([(0,Q.EVk)("PopupPriorityHandler",J.Y.uiPopup)],it)},71134:(q,K,z)=>{"use strict";z.d(K,{l:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(76642);let J=class extends Q.uAl{constructor(){super(...arguments),this._onCloseAnimationFinished=new Q.HN0,this._onClose=new Q.HN0}get onClose(){return this._onClose}close(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;this._closeAnimationSignal.run(),null===(q=this._disableInputSignal)||void 0===q||q.run(),yield this._onCloseAnimationFinished.asPromise(),this._onClose.dispatch()}))}markCloseAnimationAsFinished(){this._onCloseAnimationFinished.dispatch()}destroy(){this._onClose.dispose(),this._onCloseAnimationFinished.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(Z.S),(0,Y.Sn)("design:type",Z.S)],J.prototype,"_closeAnimationSignal",void 0),(0,Y.Cg)([(0,Q.MnK)(Z.S),(0,Y.Sn)("design:type",Z.S)],J.prototype,"_disableInputSignal",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"_onCloseAnimationFinished",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"_onClose",void 0),J=(0,Y.Cg)([(0,Q.EVk)("PrefabModalComponent",X.Y.uiDialog)],J)},93963:(q,K,z)=>{"use strict";z.d(K,{b:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this._customDataComponents=[]}sendEvent(){}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Z.prototype,"type",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Z.prototype,"name",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",Number)],Z.prototype,"id",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Z.prototype,"value",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],Z.prototype,"_custom",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(Q.uAl),(0,Y.Sn)("design:type",Array)],Z.prototype,"_customDataComponents",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("SendGameCompleteEvent",X.Y.analytics)],Z)},5822:(q,K,z)=>{"use strict";z.d(K,{u:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this._customDataComponents=[]}sendEvent(){}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Z.prototype,"eventType",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Z.prototype,"type",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Z.prototype,"subtype",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Z.prototype,"value",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],Z.prototype,"custom",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(Q.uAl),(0,Y.Sn)("design:type",Array)],Z.prototype,"_customDataComponents",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("SendGameDiscoveryEvent",X.Y.analytics)],Z)},61840:(q,K,z)=>{"use strict";z.d(K,{C:()=>J});var Y=z(8674),Q=z(62459),X=z(95946),Z=z(28152);let J=class extends Q.uAl{get type(){return this._type}};(0,Y.Cg)([(0,Q.gfw)(X.a),(0,Y.Sn)("design:type",String)],J.prototype,"_type",void 0),J=(0,Y.Cg)([(0,Q.EVk)("ElementType",Z.Y.uiPet)],J)},52894:(q,K,z)=>{"use strict";z.d(K,{u:()=>st});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(35120),J=z(63834),tt=z(94236),et=z(53661),it=z(28152);let st=class extends Q.uAl{constructor(){super(...arguments),this.onMenuClose=new Q.HN0}destroy(){this.onMenuClose.dispose(),super.destroy()}openEvolutionMenu(){tt.K.openEvolutionPromptIfEligible(new J.r(Z.q.instance.prodigy.game,this.creatureDataSchema)).then((q=>{q&&(this.evolveButton.inputEnabled=!0,this.onMenuClose.dispatch())})).catch(Q.RQr.createHandler("Failed to open evolution prompt"))}};(0,Y.Cg)([(0,Q.Cdj)(et.hi.YourPetPanelPetData),(0,Y.Sn)("design:type",Object)],st.prototype,"creatureDataSchema",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],st.prototype,"evolveButton",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],st.prototype,"onMenuClose",void 0),st=(0,Y.Cg)([(0,Q.EVk)("OpenEvolutionMenu",it.Y.uiPet,"A component that allows for the evolution menu to be opened for a given pet")],st)},51790:(q,K,z)=>{"use strict";z.d(K,{s:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(61840);let J=class extends Q.uAl{constructor(){super(...arguments),this._elementalGraphic=[]}setElementalBanner(q){this._elementalGraphic.forEach((K=>{K.GameObject.active=K.type===q}))}};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(Z.C),(0,Y.Sn)("design:type",Array)],J.prototype,"_elementalGraphic",void 0),J=(0,Y.Cg)([(0,Q.EVk)("PetElementalGraphic",X.Y.uiPet)],J)},79512:(q,K,z)=>{"use strict";z.d(K,{o:()=>rt});var Y,Q=z(8674),X=z(62459),Z=z(56942),J=z(35120),tt=z(63834),et=z(97518),it=z(22023),st=z(28152),nt=z(29834),at=z(51790);let rt=Y=class extends X.uAl{init(q){var K,z;this.loadPet(q),this.setElementIcon(null===(K=null==q?void 0:q.data)||void 0===K?void 0:K.element),this._petName.text=null===(z=null==q?void 0:q.data)||void 0===z?void 0:z.name;const Q=it.P8.GetEvolutionaryLine(q);this._petEvolutionIndex.setLocalizationKey(Y.EVOLUTION_INDEX_TEXT),this._petEvolutionIndex.setTextArguments(this.getEvolutionIndex(q.ID,Q))}loadPet(q){var K,z;const Y=null===(z=null===(K=null==q?void 0:q.metadata)||void 0===K?void 0:K.assets)||void 0===z?void 0:z.default;if(Y)if("spritesheet"===Y.type){J.q.instance.prodigy.create.monster(this._petSpine.getRootContainer(),new tt.r(J.q.instance.game,{ID:q.ID,level:1}),2,0,0).startLoad()}else{const q=(null==Y?void 0:Y.assetKey)?Z.Q[Y.assetKey]:`spine-${null==Y?void 0:Y.ID}`;J.q.instance.prodigy.load.assets([q],this.setAnimation.bind(this,q))}else X.VyI.log(`[PetEvolutionDisplayComponent] Pet ${null==q?void 0:q.ID} does not have a default value or an assetKey configured to it`,X.$bb.Error)}setAnimation(q){this._petSpine.setAsset(q,(()=>{this._petSpineAnimator.playAnimation(Y.DEFAULT_ANIMATION,!0)}))}setElementIcon(q){this._petElementIcon.setElementalBanner(q)}getEvolutionIndex(q,K){return K.findIndex((K=>K===q))+1}};rt.DEFAULT_ANIMATION="idle",rt.EVOLUTION_INDEX_TEXT="EVOLUTION_INDEX_TEXT",(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],rt.prototype,"_petSpine",void 0),(0,Q.Cg)([(0,X.MnK)(nt.j),(0,Q.Sn)("design:type",nt.j)],rt.prototype,"_petSpineAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(at.s),(0,Q.Sn)("design:type",at.s)],rt.prototype,"_petElementIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],rt.prototype,"_petName",void 0),(0,Q.Cg)([(0,X.MnK)(et.R),(0,Q.Sn)("design:type",et.R)],rt.prototype,"_petEvolutionIndex",void 0),rt=Y=(0,Q.Cg)([(0,X.EVk)("PetEvolutionDisplay",st.Y.uiPet)],rt)},80711:(q,K,z)=>{"use strict";z.d(K,{l:()=>At});var Y,Q,X=z(8674),Z=z(62459),J=z(62248),tt=z(93893),et=z(90633),it=z(65240),st=z(66582),nt=z(76277),at=z(77938),rt=z(35120),ot=z(49237),ht=z(1195),ct=z(43754),dt=z(65050),lt=z(96810),ut=z(41674),ft=z(13956),bt=z(95057),pt=z(97518),vt=z(53661),gt=z(22023),mt=z(44094),yt=z(30226),_t=z(28152),Et=z(99617),wt=z(51790),Tt=z(79512),St=z(9853);!function(q){q[q.PET_EVOLUTION=0]="PET_EVOLUTION",q[q.GIFT_EVOLUTION=1]="GIFT_EVOLUTION"}(Q||(Q={}));let At=Y=class extends Z.uAl{constructor(){super(...arguments),this._interfaceName="new_evolution_window",this._menuType=Q.PET_EVOLUTION,this._isEvolving=!1,this._openingInsufficientResourcesModal=!1}init(q,K){var z,X,tt;if(this._currentPetCreatureData=q,this._currentPetItem=at.t.getItem("pet",q.getID()),this._evolutionPetItem=gt.P8.findNextEvolution(this._currentPetItem),this._evolutionSource=K,!this._currentPetItem||!this._evolutionPetItem)return void Z.VyI.log(`[PetEvolutionMenuComponent] Creature id ${q.getID()} is not valid`,Z.$bb.Error);null===(z=this._currentPetDisplay)||void 0===z||z.init(this._currentPetItem),null===(X=this._evolutionPetDisplay)||void 0===X||X.init(this._evolutionPetItem),null===(tt=this._elementBanner)||void 0===tt||tt.setElementalBanner(this._currentPetItem.data.element);const it=rt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,nt=rt.q.instance.prodigy.gameContainer.get("ad2-c5b2").isMember();if(this._menuType!==Q.GIFT_EVOLUTION||nt)this._evolveText&&(this._evolveText.GameObject.active=!1);else{const q=!rt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(et.B.FEATURE_PET_EVOLUTION,et.B.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION);this._evolveText.setLocalizationKey(q?Y.FREE_EVOLUTION_TEXT_KEY:Y.FREE_EVOLUTION_UNAVAILABLE_TEXT_KEY),this._evolveText.setTextArguments(this._currentPetItem.data.name)}this._segment.featureCommon.sendInterfaceEvent({interfaceName:this._interfaceName,interfaceType:ut.Wm.Window,originType:ut.$N.ButtonClick,instanceType:dt.N.UI,eventName:"interface_opened"},{evolution_source:this._evolutionSource}),this._timeOpened=Date.now();const ot=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,J.l6.Evolution),ht=this._hardCurrency.canAfford(ot),ct=it.getMemberTier();(ht||ct===st._$.MemberUltra)&&this.sendHardCurrencyFunnelEvent(lt.l.PetHardCurrencyImpression)}startEvolutionFromMembershipPurchase(){return(0,X.sH)(this,void 0,void 0,(function*(){if(this._isEvolving)return;this._isEvolving=!0;const q=mt.$.generateUID(),K=this._currentPetCreatureData.data.uniqueID;(0,nt.G)(tt.v)&&(this._secureTransaction=this._segment.item.beginSecureItemTransaction(),yield this._evolutionSequence.evolvePet(this._currentPetCreatureData,!0)),yield this.triggerEvolutionFlow(q,K)}))}startEvolution(){return(0,X.sH)(this,void 0,void 0,(function*(){if(this._isEvolving)return;this._isEvolving=!0;const q=mt.$.generateUID(),K=this._currentPetCreatureData.data.uniqueID;try{if((0,nt.G)(tt.v))this._secureTransaction=this._segment.item.beginSecureItemTransaction(),yield this._evolutionSequence.evolvePet(this._currentPetCreatureData,!1);else{const z=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,J.l6.Evolution);yield this._hardCurrency.spend(z,{sink_type:it.C.PetEvolution,sink_id:K,transaction_id:q})}}catch(z){return Z.RQr.logError(z,"Attempted to evolve pet with no funds"),void this._evolutionSequence.completeSequence(K)}yield this.triggerEvolutionFlow(q,K)}))}triggerEvolutionFlow(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){const z=this._currentPetCreatureData.getLevel(),Y=this._currentPetCreatureData.team,Q=this._currentPetCreatureData.getName();(0,nt.G)(tt.v)?(this._secureTransaction.flush({sink_type:it.C.PetEvolution,sink_id:K,transaction_id:q}),this.updatePlayerDataAfterEvolution(z,Q,Y)):(this._segment.item.sendItemRemovedEvent(this._currentPetItem.ID,this._currentPetItem.name,this._currentPetItem.type,1,{sink_type:it.C.PetEvolution,sink_id:K,transaction_id:q}),this._segment.item.sendItemReceivedEvent(this._evolutionPetItem.ID,this._evolutionPetItem.name,this._evolutionPetItem.type,1,{source_type:it.C.PetEvolution,source_id:K,transaction_id:q}),yield this._evolutionSequence.evolvePet(this._currentPetCreatureData),this.updatePlayerDataAfterEvolution(z,Q,Y)),this._segment.playerProgression.sendPetEvolvedEvent({petName:this._evolutionPetItem.data.name,petLevel:z,petRank:gt.P8.getPetDisplayMergeRank(this._currentPetCreatureData.data.ID,K),petOldName:Q,petType:gt.P8.getPetEvolutionType(this._evolutionPetItem.ID),evolutionSource:this._evolutionSource},{transaction_id:q})}))}updatePlayerDataAfterEvolution(q,K,z){this._loggedInPlayer.player.forceSaveCharacter(),this.sendHardCurrencyFunnelEvent(lt.l.PetHardCurrencyTransactionComplete),this._isEvolving=!1,Z.Aq$.isDefined(z)&&this._segment.featureCommon.sendTeamUpdatedEvent(this._evolutionPetItem.data.name,K,{pet_added_level:q,pet_added_rank:gt.P8.getPetDisplayMergeRank(this._evolutionPetItem.data.ID,this._currentPetCreatureData.data.uniqueID)})}sendEvolutionIntention(){this.sendHardCurrencyFunnelEvent(lt.l.PetHardCurrencyIntention);const q=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,J.l6.Evolution);this._hardCurrency.canAfford(q)||this._segment.item.sendInsufficientCurrencyEvent(q,{sink_type:it.C.PetEvolution,sink_id:this._currentPetCreatureData.data.ID})}sendPopupClosedEvent(q){this._segment.featureCommon.sendInterfaceEvent({interfaceName:this._interfaceName,interfaceType:ut.Wm.Window,originType:ut.$N.ButtonClick,instanceType:dt.N.UI,eventName:"interface_closed",closeMethod:q},{durationSeconds:(Date.now()-this._timeOpened)/1e3,evolution_source:this._evolutionSource})}sendPetEvolutionCancelledEvent(){this._segment.playerProgression.sendPetEvolutionCancelledEvent({petName:this._currentPetCreatureData.getName(),petLevel:this._currentPetCreatureData.getLevel(),petElement:this._currentPetCreatureData.getElement(),petRank:gt.P8.getPetDisplayMergeRank(this._currentPetCreatureData.data.ID,this._currentPetCreatureData.data.uniqueID),evolutionSource:this._evolutionSource})}sendPurchaseFunnelStartEvent(){const q=yt.J.showYouTubeMembershipAd(rt.q.instance.prodigy.game,!0)?bt.R.Video:bt.R.Static;this._segment.purchase.sendFunnelStart({type:"Pet-Evolution-Member-Lock",category:"Pet",contentId:`pet-${this._currentPetCreatureData.getID()}`,adType:q})}sendHardCurrencyFunnelEvent(q){this._segment.playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(J.l6.Evolution,q,this._currentPetItem.ID)}handleInsufficientCurrency(){if(this._openingInsufficientResourcesModal)return;const q=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,J.l6.Evolution);if(this._loggedInPlayer.player.isPlayingAtSchool())this.showMessageBox();else if(Z.Aq$.isDefined(this.openUnifiedConversionFlowComponent)){this.openUnifiedConversionFlowComponent.onRulesetFail.addOnce((()=>{this.showDefaultInsufficientPopup(),this.openUnifiedConversionFlowComponent.onRulesetSuccess.removeAll(this)}),this),this.openUnifiedConversionFlowComponent.onRulesetSuccess.addOnce((()=>{this.openUnifiedConversionFlowComponent.onRulesetFail.removeAll(this)}));const K=this._hardCurrency.getBalance(q.currency);this._openingInsufficientResourcesModal=!0,this.openUnifiedConversionFlowComponent.open({[vt.FK.OtpMissingMagicoin]:q.value-K}).catch(Z.RQr.createHandler("PetEvolutionMenuComponent: Error opening unified conversion flow")).finally((()=>{this._openingInsufficientResourcesModal=!1}))}else this.showDefaultInsufficientPopup()}showDefaultInsufficientPopup(){this._openingInsufficientResourcesModal=!0,rt.q.instance.prodigy.open.message(this._baseLocalizer.getText("YOU_DONT_HAVE_ENOUGH_MAGICOIN"),(()=>{this._openingInsufficientResourcesModal=!1}))}showMessageBox(){Z.Aq$.isDefined(this.messageBox)?this.messageBox.active=!0:this.showDefaultInsufficientPopup()}hideMessageBox(){Z.Aq$.isDefined(this.messageBox)&&(this.messageBox.active=!1)}showLegacyInsufficientResourcesModal(){Z.Aq$.isDefined(this.insufficientResourcesModal)&&(this.insufficientResourcesModal.active=!0)}};At.FREE_EVOLUTION_TEXT_KEY="USE_FREE_EVOLUTION_TEXT",At.FREE_EVOLUTION_UNAVAILABLE_TEXT_KEY="ALREADY_USED_FREE_EVOLUTION_TEXT",(0,X.Cg)([(0,ft.b)("20f-5f67"),(0,X.Sn)("design:type",Function)],At.prototype,"_segment",void 0),(0,X.Cg)([(0,ft.b)("ad2-c5b2"),(0,X.Sn)("design:type",ht.E)],At.prototype,"_loggedInPlayer",void 0),(0,X.Cg)([(0,Z.gfw)(Q),(0,X.Sn)("design:type",Number)],At.prototype,"_menuType",void 0),(0,X.Cg)([(0,Z.MnK)(Tt.o),(0,X.Sn)("design:type",Tt.o)],At.prototype,"_currentPetDisplay",void 0),(0,X.Cg)([(0,Z.MnK)(Tt.o),(0,X.Sn)("design:type",Tt.o)],At.prototype,"_evolutionPetDisplay",void 0),(0,X.Cg)([(0,Z.MnK)(wt.s),(0,X.Sn)("design:type",wt.s)],At.prototype,"_elementBanner",void 0),(0,X.Cg)([(0,Z.MnK)(pt.R),(0,X.Sn)("design:type",pt.R)],At.prototype,"_evolveText",void 0),(0,X.Cg)([(0,Z.MnK)(St.d),(0,X.Sn)("design:type",St.d)],At.prototype,"_evolutionSequence",void 0),(0,X.Cg)([(0,Z.MnK)(Et.I),(0,X.Sn)("design:type",Et.I)],At.prototype,"openUnifiedConversionFlowComponent",void 0),(0,X.Cg)([(0,Z.ERr)(),(0,X.Sn)("design:type",Z._mx)],At.prototype,"messageBox",void 0),(0,X.Cg)([(0,Z.ERr)(),(0,X.Sn)("design:type",Z._mx)],At.prototype,"insufficientResourcesModal",void 0),(0,X.Cg)([(0,ft.b)("bec-c6b4"),(0,X.Sn)("design:type",ct.W)],At.prototype,"_hardCurrency",void 0),(0,X.Cg)([(0,Z.Cdj)(Z.$Bt.LocalizationService),(0,X.Sn)("design:type",Z.dTp)],At.prototype,"_baseLocalizer",void 0),(0,X.Cg)([(0,Z.MnK)(ot.$),(0,X.Sn)("design:type",ot.$)],At.prototype,"skipButton",void 0),At=Y=(0,X.Cg)([(0,Z.EVk)("PetEvolutionMenu",_t.Y.uiPet)],At)},9853:(q,K,z)=>{"use strict";z.d(K,{d:()=>pt});var Y,Q=z(8674),X=z(62459),Z=z(56942),J=z(62886),tt=z(60157),et=z(65240),it=z(35120),st=z(77938),nt=z(63834),at=z(73797),rt=z(97518),ot=z(22023),ht=z(28152),ct=z(55741),dt=z(29834),lt=z(76277),ut=z(58182),ft=z(99625),bt=z(39674);let pt=Y=class extends X.uAl{constructor(){super(...arguments),this.onSequenceStarted=new X.HN0,this.onSequenceComplete=new X.HN0}evolvePet(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=!1){const z=q.getAllEvolutions()[0],Y=(null==z?void 0:z.evolveID)?z.evolveID:z.e,Q=st.t.getItem("pet",q.getID()),Z=ot.P8.findNextEvolution(Q);Q&&Z?(this.loadPet(Q,this._petCurrentSpine,this._petCurrentAnimator),this.loadPet(Z,this._petEvoSpine,this._petEvoAnimator),this._evolutionCompletedText.setTextArguments(Q.data.name,Z.data.name),this._currentPetNameText.text=Q.data.name,this._evoPetNameText.text=Z.data.name,yield q.evolve(Y,K),this.sendQuestEvolveEvent(Q),this.playSequence(q.data.uniqueID,Z)):X.VyI.log(`[PetEvolutionSequenceComponent] Creature id ${q.getID()} is not valid`,X.$bb.Error)}))}playSequence(q,K){this.onSequenceStarted.dispatch(),this._spineBone.setup(),this._newSpineBone.setup(),this._evolutionSequenceAnimator.playAnimation("evolution",!1,!0),this._evolutionSequenceAnimator.spine.onEvent.add(((q,K)=>{K.data.name===Y.CHANGE_EVENT&&(this._petCurrentSpine.GameObject.active=!1,this._petEvoSpine.GameObject.active=!0,this._newSpineBone.targetTransform=this._petEvoSpine.GameObject.transform,this._evolvingText.GameObject.active=!1,this._currentPetNameText.GameObject.active=!1,this._evoPetNameText.GameObject.active=!1,this._congratulatoryText.GameObject.active=!0,this._evolutionCompletedText.GameObject.active=!0),K.data.name===Y.ATTACK_EVENT&&(this._petEvoAnimator.playAnimation(Y.ATTACK_ANIMATION,!1),this._petEvoAnimator.OnAnimationComplete.addOnce((()=>{this._petEvoAnimator.playAnimation(Y.IDLE_ANIMATION,!0)})))}));const z=(0,lt.G)(ut.N)?()=>this.openPetItemCard(q,K):()=>this.completeSequence(q);this._evolutionSequenceAnimator.OnAnimationComplete.addOnce(z)}openPetItemCard(q,K){const z=new bt.j;z.id=K.ID,z.level=1,z.name=K.data.name,this._petEvoAnimator.stopAnimation(),it.q.instance.prodigy.game.broadcaster.broadcast(at.ig.EvolveEnd),it.q.instance.prodigy.open.prefabMenu(ft.l.PetRescueCardSequence,(()=>{this.completeSequence(q)}),void 0,!1,!0,{PET_RESCUE_CREATURE_DATA:Object.assign(Object.assign({},z),{ID:K.ID})})}completeSequence(q){this._petEvoAnimator.stopAnimation(),it.q.instance.prodigy.game.broadcaster.broadcast(at.ig.EvolveEnd,null,[q]),this.onSequenceComplete.dispatch()}loadPet(q,K,z){var Q,J;const tt=null===(J=null===(Q=null==q?void 0:q.metadata)||void 0===Q?void 0:Q.assets)||void 0===J?void 0:J.default;if(tt)if("spritesheet"===tt.type){it.q.instance.prodigy.create.monster(K.getRootContainer(),new nt.r(it.q.instance.game,{ID:q.ID,level:1}),2,0,0).startLoad()}else{const q=(null==tt?void 0:tt.assetKey)?Z.Q[tt.assetKey]:`spine-${null==tt?void 0:tt.ID}`;it.q.instance.prodigy.load.assets([q],(()=>{K.setAsset(q,(()=>{z.playAnimation(Y.IDLE_ANIMATION,!0)}))}))}else X.VyI.log(`[PetEvolutionSequenceComponent] Pet ${null==q?void 0:q.ID} does not have a default value or an assetKey configured to it`,X.$bb.Error)}sendQuestEvolveEvent(q){const K={params:{taskEventType:tt.Z7.Pet,rarity:q.data.rarity,itemType:"pet",source:et.C.PetEvolution,id:q.data.ID,element:q.data.affinity,level:q.data.level}};it.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(J.T.EVOLVE_PET,K).catch(X.RQr.createHandler("Error sending a quest event for evolving a pet"))}destroy(){this.onSequenceStarted.dispose(),this.onSequenceComplete.dispose(),super.destroy()}};pt.ATTACK_ANIMATION="attack",pt.IDLE_ANIMATION="idle",pt.CHANGE_EVENT="pet-change",pt.ATTACK_EVENT="attack-ani",(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],pt.prototype,"_petCurrentSpine",void 0),(0,Q.Cg)([(0,X.MnK)(dt.j),(0,Q.Sn)("design:type",dt.j)],pt.prototype,"_petCurrentAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],pt.prototype,"_petEvoSpine",void 0),(0,Q.Cg)([(0,X.MnK)(dt.j),(0,Q.Sn)("design:type",dt.j)],pt.prototype,"_petEvoAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(dt.j),(0,Q.Sn)("design:type",dt.j)],pt.prototype,"_evolutionSequenceAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(ct.l),(0,Q.Sn)("design:type",ct.l)],pt.prototype,"_spineBone",void 0),(0,Q.Cg)([(0,X.MnK)(ct.l),(0,Q.Sn)("design:type",ct.l)],pt.prototype,"_newSpineBone",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],pt.prototype,"_currentPetNameText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],pt.prototype,"_evoPetNameText",void 0),(0,Q.Cg)([(0,X.MnK)(rt.R),(0,Q.Sn)("design:type",rt.R)],pt.prototype,"_evolvingText",void 0),(0,Q.Cg)([(0,X.MnK)(rt.R),(0,Q.Sn)("design:type",rt.R)],pt.prototype,"_congratulatoryText",void 0),(0,Q.Cg)([(0,X.MnK)(rt.R),(0,Q.Sn)("design:type",rt.R)],pt.prototype,"_evolutionCompletedText",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],pt.prototype,"onSequenceStarted",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],pt.prototype,"onSequenceComplete",void 0),pt=Y=(0,Q.Cg)([(0,X.EVk)("PetEvolutionSequence",ht.Y.uiPet)],pt)},78675:(q,K,z)=>{"use strict";z.d(K,{d:()=>it});var Y=z(8674),Q=z(62459),X=z(5491),Z=z(9531),J=z(54950),tt=z(28152),et=z(80573);let it=class extends Q.uAl{constructor(){super(...arguments),this._onMonsterClicked=new Q.HN0,this._enableInput=!0}destroy(){var q,K,z;null===(z=null===(K=null===(q=this.monsterAppearance)||void 0===q?void 0:q.input)||void 0===K?void 0:K.onClicked)||void 0===z||z.remove(this._onMonsterClicked.dispatch,this._onMonsterClicked),this._onMonsterClicked.dispose(),super.destroy()}spawn(q){this._spawnParent.children.forEach((q=>q.destroy())),this.monsterAppearance=this._prefabAppearanceLoader.loadHitboxAppearancePrefab(X.V.Pet,q,this._spawnParent).findComponentInChildren(et.n),this.monsterAppearance.input.InputEnabled=this._enableInput,this._alertFSM?(this.setAlertHeight(),this.monsterAppearance.onHitboxUpdate.add(this.setAlertHeight,this),this._alertFSM.animationController=this.monsterAppearance.animationController):Q.VyI.log(`[SpawnMonsterAppearanceComponent]: No alert FSM component found for monster with ID ${q}`,Q.$bb.Warning),this.monsterAppearance.animationController.changeState(0),this._enableInput&&this.monsterAppearance.input.onClicked.add(this._onMonsterClicked.dispatch,this._onMonsterClicked)}setAlertHeight(){const q=this._speechBubble.transform;q.setPosition(q.localPosition.x,this.monsterAppearance.input.GameObject.transform.localPosition.y)}};(0,Y.Cg)([(0,Q.Cdj)("c21-4a0a"),(0,Y.Sn)("design:type",J.S)],it.prototype,"_prefabAppearanceLoader",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_spawnParent",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],it.prototype,"_speechBubble",void 0),(0,Y.Cg)([(0,Q.MnK)(Z.K),(0,Y.Sn)("design:type",Z.K)],it.prototype,"_alertFSM",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],it.prototype,"_onMonsterClicked",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],it.prototype,"_enableInput",void 0),it=(0,Y.Cg)([(0,Q.EVk)("SpawnMonsterAppearance",tt.Y.creature)],it)},93718:(q,K,z)=>{"use strict";z.d(K,{i:()=>tt});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(34603),J=z(63398);let tt=class extends J.k{constructor(){super(...arguments),this._atlasKey=null}set AtlasKey(q){this._atlasKey=q}updateFrameName(q){const K=this.GameObject.findComponent(Z._);null!==K&&K.setFrameName(`${this._atlasKey}/${this.animationName}/${this.AnimationTargetKey}-${q}`)}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],tt.prototype,"_atlasKey",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("BuddyKeyFrameAnimator",X.Y.creatureAnimation)],tt)},80573:(q,K,z)=>{"use strict";z.d(K,{n:()=>et});var Y=z(8674),Q=z(62459),X=z(77938),Z=z(92591),J=z(28152),tt=z(35084);let et=class extends Q.uAl{constructor(){super(...arguments),this.onHitboxUpdate=new Q.HN0,this._type=null,this._id=null}get input(){return this._inputOverlay}setData(q,K){this._type=q,this._id=K,this.updateInputSize()}updateInputSize(){var q,K,z,Y;if(this._type&&Q.Aq$.isDefined(this._id)){const Z=X.t.getItem(this._type,this._id),J=Z.metadata.assets?Z.metadata.assets[this._assetKey]:null,tt=null==J?void 0:J.hitbox,et=this.appearanceRenderComponent.getDimensions();this._inputOverlay.setSize(null!==(q=null==tt?void 0:tt.width)&&void 0!==q?q:et.width,null!==(K=null==tt?void 0:tt.height)&&void 0!==K?K:et.height),Q.Aq$.isDefined(null==tt?void 0:tt.x)&&Q.Aq$.isDefined(null==tt?void 0:tt.y)?this._inputOverlay.GameObject.transform.setPosition(tt.x,tt.y):this._inputOverlay.GameObject.transform.setPosition(.5*-this._inputOverlay.width+(null!==(z=null==tt?void 0:tt.xOffset)&&void 0!==z?z:0),-this._inputOverlay.height+(null!==(Y=null==tt?void 0:tt.yOffset)&&void 0!==Y?Y:0)),this.onHitboxUpdate.dispatch()}}destroy(){this.onHitboxUpdate.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(Q.y4o),(0,Y.Sn)("design:type",Q.y4o)],et.prototype,"appearanceRenderComponent",void 0),(0,Y.Cg)([(0,Q.MnK)(Z.K),(0,Y.Sn)("design:type",Z.K)],et.prototype,"animationController",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.n),(0,Y.Sn)("design:type",tt.n)],et.prototype,"_inputOverlay",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],et.prototype,"_assetKey",void 0),et=(0,Y.Cg)([(0,Q.EVk)("DynamicAppearance",J.Y.creature)],et)},23891:(q,K,z)=>{"use strict";z.d(K,{f:()=>at});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(62886),J=z(65240),tt=z(35120),et=z(77938),it=z(47728),st=z(30226),nt=z(28152);let at=class extends Q.uAl{constructor(){super(...arguments),this._isFake=!1,this._noDialogue=!1,this.awardSilently=!1,this._showPetsInPetCardFormat=!1,this._shouldSendQuestEvent=!0,this._customSegmentMetadata={},this._useFestivalContext=!1,this.additionalDialogueIds={},this._items=[],this.onItemAwarded=new Q.HN0,this.onComplete=new Q.HN0,this._shouldRefreshMultiplayer=!1}set showPetsInPetCardFormat(q){this._showPetsInPetCardFormat=q}set sourceType(q){this._sourceType=q}get customSegmentMetadata(){return this._customSegmentMetadata}set customSegmentMetadata(q){this._customSegmentMetadata=q}get singleItemData(){return this._itemType&&this._itemID?et.t.getItem(this._itemType,this._itemID):null}create(){super.create(),Q.Aq$.isDefined(this._itemType)&&Q.Aq$.isDefined(this._itemID)&&(this._items=[{type:this._itemType,ID:this._itemID,N:this._itemQuantity}])}destroy(){this.onItemAwarded.dispose(),this.onComplete.dispose(),super.destroy()}setItemRewardAsFake(){this._isFake=!0}awardItem(){var q;if(this._sourceType&&(this._customSegmentMetadata.source_type=this._sourceType),this._useFestivalContext){const q=it.x.getFestivalSegmentContext();this._customSegmentMetadata.instance_type=q.instance_type,this._customSegmentMetadata.instance_id=q.instance_id}const K=null!==(q=this.getItemData())&&void 0!==q?q:[],z=this.getInjectedValue("b37-c775");if(this._isFake)this._shouldSendQuestEvent&&z.sendQuestEventViaHub(Z.T.COLLECT_ITEM,{type:this._itemType,id:this._itemID,progress:this._loggedInPlayer.player.backpack.hasItem(this._itemType,this._itemID)}).catch(Q.RQr.createHandler("[GotItemComponent] Error sending quest event."));else for(const Y of K)this._loggedInPlayer.setSavingEnabled(!1),st.J.bagItemByType(Y,tt.q.instance.game,void 0,void 0,this._customSegmentMetadata),this._shouldSendQuestEvent?z.sendQuestEventViaHub(Z.T.COLLECT_ITEM,{type:this._itemType,id:this._itemID,progress:this._loggedInPlayer.player.backpack.hasItem(this._itemType,this._itemID)}).then((()=>{var q;null===(q=this._loggedInPlayer.player)||void 0===q||q.forceSaveCharacter(null,!0)})).catch(Q.RQr.createHandler("[GotItemComponent] Error sending quest event.")).finally((()=>{this._loggedInPlayer.setSavingEnabled(!0)})):this._loggedInPlayer.player.forceSaveCharacter();this.awardSilently?this.complete():this.doAwardItemSequence(K).catch(Q.RQr.createHandler("[GotItemComponent] Error awarding item.")),this.onItemAwarded.dispatch(this._itemType,this._itemID,this._itemQuantity)}doAwardItemSequence(){return(0,Y.sH)(this,arguments,void 0,(function*(q=[]){const K=this._showPetsInPetCardFormat?q.filter((q=>"pet"!==q.type)):q;if(K.length>0&&(yield new Promise((q=>{this._gotItem=tt.q.instance.prodigy.open.gotItem(K,q,!this._noDialogue,void 0,void 0,!0,this._customSegmentMetadata,this.additionalDialogueIds)}))),this._showPetsInPetCardFormat&&q.length>0){const K=q.filter((q=>"pet"===q.type)),z=K.length;let Y=0;for(;Y{var z,Q,Z;tt.q.instance.prodigy.open.prefabMenu(X.l.PetRescueCardSequence,K,void 0,!1,!0,{PET_RESCUE_CREATURE_DATA:{ID:q.ID,level:null!==(Q=null===(z=q.data)||void 0===z?void 0:z.level)&&void 0!==Q?Q:1,name:null!==(Z=null==Y?void 0:Y.name)&&void 0!==Z?Z:""}})})),Z++}))}getItemData(){return this._items}setItem(q,K,z=1,Y=!1){this._itemType=q,this._itemID=K,this._itemQuantity=z,this._isFake=Y,this._items=[{type:this._itemType,ID:this._itemID,N:this._itemQuantity}]}addItem(q,K,z=1,Y=!1){this._isFake=Y,this._items.push({type:q,ID:K,N:z})}addItems(q,K=!1){this._isFake=K,this._items.push(...q)}clearItems(){this._items=[]}close(){var q;null===(q=this._gotItem)||void 0===q||q.close()}complete(){!this._isFake&&this._shouldRefreshMultiplayer&&(Q.VyI.log("Forcing a reconnect to the multiplayer server",Q.$bb.Verbose),tt.q.instance.prodigy.gameContainer.get("774-4659").refreshMultiplayer(),this._shouldRefreshMultiplayer=!1),this.onComplete.dispatch()}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],at.prototype,"_itemType",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],at.prototype,"_itemID",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],at.prototype,"_itemQuantity",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_isFake",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_noDialogue",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"awardSilently",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_showPetsInPetCardFormat",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_shouldSendQuestEvent",void 0),(0,Y.Cg)([(0,Q.gfw)(J.C),(0,Y.Sn)("design:type",String)],at.prototype,"_sourceType",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],at.prototype,"_customSegmentMetadata",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_useFestivalContext",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],at.prototype,"additionalDialogueIds",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onItemAwarded",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onComplete",void 0),(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",Object)],at.prototype,"_loggedInPlayer",void 0),at=(0,Y.Cg)([(0,Q.EVk)("GotItem",nt.Y.item)],at)},43485:(q,K,z)=>{"use strict";z.d(K,{j:()=>ht});var Y=z(8674),Q=z(62459),X=z(5491),Z=z(77938),J=z(50503),tt=z(55122),et=z(22023),it=z(28152),st=z(30226),nt=z(35120),at=z(13956),rt=z(25834),ot=z(23891);let ht=class extends ot.f{constructor(){super(...arguments),this._itemType="pet",this._usePlayerLevel=!1,this._playerLevelDeltaMin=0,this._playerLevelDeltaMax=0,this._minLevel=1,this._maxLevel=null}init(q,K=1,z=!1){this.setItem(this._itemType,q,K,z)}setPlayerLevelDelta(q,K,z=!0){this._usePlayerLevel=z,this._playerLevelDeltaMin=q,this._playerLevelDeltaMax=K}setLevelMinMax(q,K){this._minLevel=q,this._maxLevel=K}awardItem(){var q;let K=[];if(this._isFake){K=this.getItemData();const z=K.findIndex((q=>"pet"===q.type)),{data:Y,ID:X}=K.splice(z,1)[0];let Z;const J=this._loggedInPlayer.player.kennel;for(let K=J.data.length-1;K>=0;--K){const z=J.data[K];if(z.ID===X&&!(null===(q=this._bridge.getSecureData(z.uniqueID))||void 0===q?void 0:q.caught.legacySource)){Z=z;break}}Y&&Q.Aq$.isDefined(Z)&&(Z.level=Y.level,Z.stars=Y.stars,J.updated=!0)}super.awardItem();for(const z of K)st.J.bagItemByType(z,nt.q.instance.game,void 0,void 0,this._customSegmentMetadata)}getItemData(){var q;const K=null===(q=Z.t.getItem(this._itemType,this._itemID))||void 0===q?void 0:q.data;if(!K)return Q.VyI.log(`[GotPetComponent] Failed to find item data for ${this._itemType} ${this._itemID}`,Q.$bb.Error),null;const z=[this.getPetItemData()];return K.unlockFollow&&z.push({type:"follow",ID:K.unlockFollow}),"pet"===this._itemType&&et.P8.isPetEpic(this._itemID)&&(this._shouldRefreshMultiplayer=!0),z}getPetItemData(){var q,K;const z=null===(q=Z.t.getItem(this._itemType,this._itemID))||void 0===q?void 0:q.data;let Y=this._minLevel;if(this._usePlayerLevel){const q=Math.min(this._playerLevelDeltaMin,this._playerLevelDeltaMax),K=Math.max(this._playerLevelDeltaMin,this._playerLevelDeltaMax);Y=this._loggedInPlayer.getLevel()+Math.floor(Q.cj9.random(q,K+1))}return Y=Q.cj9.clamp(Y,this._minLevel,null!==(K=this._maxLevel)&&void 0!==K?K:tt.s.activePlayerLevelCap),{type:this._itemType,ID:this._itemID,N:this._itemQuantity,data:{seed:0,level:Y,stars:tt.s.xpRequiredForLevel(Y,X.V.Pet),hp:J.A.getHPFromParams(Y,z.statHealth||5)}}}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],ht.prototype,"_itemType",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ht.prototype,"_usePlayerLevel",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],ht.prototype,"_playerLevelDeltaMin",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],ht.prototype,"_playerLevelDeltaMax",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],ht.prototype,"_minLevel",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],ht.prototype,"_maxLevel",void 0),(0,Y.Cg)([(0,at.b)(rt.T),(0,Y.Sn)("design:type",rt.T)],ht.prototype,"_bridge",void 0),ht=(0,Y.Cg)([(0,Q.EVk)("GotPet",it.Y.saving)],ht)},63398:(q,K,z)=>{"use strict";z.d(K,{k:()=>tt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(35120),J=z(79009);class tt extends Q.JTX{constructor(){super(...arguments),this.onAnimationComplete=new Q.HN0,this.isAnimating=!1,this.animationName=null,this.loopOverride=!0,this.bindData={position:{x:0,y:0},scale:{x:1,y:1},angle:0},this.animationData=null,this.currentFrameData={},this.targetKey=null}get OnAnimationComplete(){return this.onAnimationComplete}get AnimationTargetKey(){return this.targetKey}set AnimationTargetKey(q){this.targetKey=q}setCurrentToBindPose(){this.bindData.position={x:this.GameObject.legacyTransform.x,y:this.GameObject.legacyTransform.y},this.bindData.angle=this.GameObject.legacyTransform.group.angle,this.bindData.scale={x:this.GameObject.legacyTransform.group.scale.x,y:this.GameObject.legacyTransform.group.scale.y}}playAnimation(q,K,z){if(this.isAnimating){if(this.animationName===q){const q=Object.keys(this.currentFrameData),K=q.length;for(let z=0;zq[z].frames.length-1===K.frame))&&(this.onAnimationComplete.dispatch(),this.stopAnimation())}}}updateX(q){this.GameObject.legacyTransform.group.position.x=this.bindData.position.x+q}updateY(q){this.GameObject.legacyTransform.group.position.y=this.bindData.position.y+q}updateAngle(q){this.GameObject.legacyTransform.group.angle=q}updateXScale(q){this.GameObject.legacyTransform.group.scale.x=q}updateYScale(q){this.GameObject.legacyTransform.group.scale.y=q}updateVisible(q){this.GameObject.active=q}stopAnimation(){this.isAnimating=!1,this.GameObject.legacyTransform.group.position.set(this.bindData.position.x,this.bindData.position.y),this.GameObject.legacyTransform.group.angle=this.bindData.angle,this.GameObject.legacyTransform.group.scale.set(this.bindData.scale.x,this.bindData.scale.y),this.GameObject.active=!0}updateFrame(q,K){const z=this.animationData.animatedProperties[K],Y=this.getCurrentFrameForProperty(K),Q=Math.floor((q+Y.elapsed)/z.interval);let X=Y.frame+Q;const Z=z.frames.length-1;X>=Z&&(this.animationData.loop?X%=z.frames.length:X=Z);const J=this.currentFrameData[K];return J.frame=X,J.elapsed=J.elapsed+q-z.interval*Q,J}updateFrameProperty(q,K,z,Y){const Q=this.updateFrame(q,K);null!==Q&&Y(z[K].frames[Q.frame])}getCurrentFrameForProperty(q){return Q.Aq$.isDefined(this.currentFrameData[q])||(this.currentFrameData[q]={elapsed:0,frame:0}),this.currentFrameData[q]}destroy(){this.onAnimationComplete.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],tt.prototype,"targetKey",void 0),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(2,(0,Q.vQZ)("AnimationData")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[String,Boolean,J.F]),(0,Y.Sn)("design:returntype",void 0)],tt.prototype,"playAnimation",null)},89717:(q,K,z)=>{"use strict";z.d(K,{R:()=>st});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(54950),J=z(73797),tt=z(28152),et=z(29834),it=z(80573);let st=class extends Q.uAl{constructor(){super(...arguments),this._onSmokeCloudShown=new Q.HN0,this._onPlayerMorphStarted=new Q.HN0,this._onPlayerMorphEnded=new Q.HN0,this._onMorphedAppearanceClicked=new Q.HN0,this._morphedObject=null,this._morphedAppearance=null}get morphedAppearance(){return this._morphedAppearance}get onPlayerMorphStarted(){return this._onPlayerMorphStarted}get onPlayerMorphEnded(){return this._onPlayerMorphEnded}create(){if(super.create(),this._playerData){if(this._playerData.player.isPlayerTransformed()&&this.createMorphAppearance(),this.transformPlayer=this.transformPlayer.bind(this),this.clearMorphedAppearance=this.clearMorphedAppearance.bind(this),this._playerData.isActivePlayer()){const q=X.q.instance.game.broadcaster;q.addAppListener(J.J8.MorphMarbleUsed,this.transformPlayer,this),q.addAppListener(J.J8.MorphMarbleCancelled,this.clearMorphedAppearance,this)}}else Q.VyI.log("MorphTransformationComponent: Failed to initialize the component due to missing player data provider",Q.$bb.Error)}destroy(){var q;if(X.q.instance.game.time.events.remove(this._smokeTimer),this._onSmokeCloudShown.dispose(),this._onSmokeCloudShown=null,this._onPlayerMorphStarted.dispose(),this._onPlayerMorphStarted=null,this._onPlayerMorphEnded.dispose(),this._onPlayerMorphEnded=null,this._morphedObject&&(this._morphedAppearance.input.onClicked.remove(this._onMorphedAppearanceClicked.dispatch,this._onMorphedAppearanceClicked),this._morphedAppearance=null,this._morphedObject=null),this._onMorphedAppearanceClicked.dispose(),this._onMorphedAppearanceClicked=null,null===(q=this._playerData)||void 0===q?void 0:q.isActivePlayer()){const q=X.q.instance.game.broadcaster;q.removeAppListener(J.J8.MorphMarbleUsed,this),q.removeAppListener(J.J8.MorphMarbleCancelled,this)}super.destroy()}isMorphed(){var q,K;return(null===(K=null===(q=this._playerData)||void 0===q?void 0:q.player)||void 0===K?void 0:K.isPlayerTransformed())&&Q.Aq$.isDefined(this._morphedAppearance)}createMorphAppearance(){var q;this._morphedObject&&this.destroyMorphAppearance();const K=this._playerData.player.getPlayerData().playerTransformation;K&&(this._morphedObject=this._appearanceLoader.loadHitboxAppearancePrefab(K.transformType,K.transformID,this.gameObject),this._morphedAppearance=this._morphedObject.findComponentInChildren(it.n),this._morphedAppearance.input.onClicked.add(this._onMorphedAppearanceClicked.dispatch,this._onMorphedAppearanceClicked),this._morphedAppearance.appearanceRenderComponent.GameObject.setLayer(void 0,!0),null===(q=this._onPlayerMorphStarted)||void 0===q||q.dispatch())}clearMorphedAppearance(){null!==this._morphedObject&&this.showSmokeCloud((()=>{var q;this.destroyMorphAppearance(),null===(q=this._onPlayerMorphEnded)||void 0===q||q.dispatch()}))}clearMorphedAppearanceWithoutEffect(){var q;this.destroyMorphAppearance(),null===(q=this._onPlayerMorphEnded)||void 0===q||q.dispatch()}destroyMorphAppearance(){var q;null===(q=this._morphedObject)||void 0===q||q.destroy(),this._morphedObject=null,this._morphedAppearance=null}transformPlayer(q){this.transformPlayerWithEffect(q.effect.transform,q.effect.ID,q.effect.time)}transformPlayerWithEffect(q,K,z=6e3,Y){this._playerData.player.transformPlayer(q,K,z,Y),this.showSmokeCloud(this.createMorphAppearance)}transformPlayerWithoutEffect(q,K,z=6e3,Y){this._playerData.player.transformPlayer(q,K,z,Y),this.createMorphAppearance()}showSmokeCloud(q){var K;this._playerData.isActivePlayer()&&(X.q.instance.game.input.enabled=!1,X.q.instance.game.input.reset()),this._smokeTimer=X.q.instance.game.time.events.addTimer(400,q,this),this._playerData.isActivePlayer()&&(this._smokeAnimator?this._smokeAnimator.OnAnimationComplete.addOnce((()=>X.q.instance.game.input.enabled=!0)):X.q.instance.game.input.enabled=!0),null===(K=this._smokeAnimator)||void 0===K||K.playAnimation("spine-smoke-2",!1,!0),this._onSmokeCloudShown.dispatch()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],st.prototype,"_onSmokeCloudShown",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],st.prototype,"_onPlayerMorphStarted",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],st.prototype,"_onPlayerMorphEnded",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],st.prototype,"_onMorphedAppearanceClicked",void 0),(0,Y.Cg)([(0,Q.MnK)(et.j),(0,Y.Sn)("design:type",et.j)],st.prototype,"_smokeAnimator",void 0),(0,Y.Cg)([(0,Q.Cdj)("1eb-d7b4"),(0,Y.Sn)("design:type",Object)],st.prototype,"_playerData",void 0),(0,Y.Cg)([(0,Q.Cdj)("c21-4a0a"),(0,Y.Sn)("design:type",Z.S)],st.prototype,"_appearanceLoader",void 0),st=(0,Y.Cg)([(0,Q.EVk)("MorphTransformation",tt.Y.playerAnimation)],st)},63115:(q,K,z)=>{"use strict";z.d(K,{T:()=>st});var Y,Q=z(8674),X=z(62459);!function(q){q.Clamshell_mount="01b0fac7-6659-4a4b-8c9e-e0ba6bdd814d",q.Cloud_mount="1292a7de-833f-4f57-b59e-e00c942f62e1",q.Coin_mount="b5e58a6c-a45c-465b-9549-d44632d25974",q.Flowers_mount="0434f3ed-7a2f-4e70-9f59-9f208cf80831",q.Mount_12_mount="eacb8d01-7722-4a58-a3ed-0557bb595490",q.Mount_13_mount="a1cfd064-10e9-4f4e-8620-f3f9a40c9c4d",q.Mount_14_mount="3065f309-5410-4974-84ab-67a0f72fd07f",q.Mount_15_mount="44c46fb8-0a97-458f-8167-29305b00a139",q.Mount_16_mount="ec8a9fd8-4fd1-4316-bb4d-d106b556c74b",q.Mount_17_mount="30d63d06-820b-46d9-8374-e85dff1b5244",q.Mount_18_mount="e1d22939-2dd0-4713-893a-f88020942d46",q.Mount_19_mount="5f31ac1d-1847-46a2-b540-ed7d65c5d9db",q.Mount_20_mount="a589dc3d-42e1-4ee9-b4a1-9c1a8ad41432",q.Mount_21_mount="61b0b8a3-506a-4645-af01-0bd446612ece",q.Mount_22_mount="82e7063c-ae67-40b6-b147-5944a5f168f9",q.Mount_23_mount="3a164ae8-0bd1-40ba-8542-d407f9316c47",q.Mount_24_mount="689d94a6-061c-4f10-84f9-7b79a3c233cb",q.Mount_25_mount="0db7bf9a-7e3b-46bc-a3fc-913207039867",q.Mount_26_mount="7959719b-58df-47de-8f66-c8a004eb0f58",q.Mount_27_mount="f6f5a970-bd24-46b2-b5f9-b453b8defe91",q.Mount_28_mount="bce878c1-a0d0-4103-9032-959e047e5a6f",q.Mount_29_mount="2842e909-4a6f-4bf6-a3a6-88c52c7088a7",q.Mount_30_mount="400cdf0b-ffda-4e6b-8fe0-85a09937efa1",q.Mount_31_mount="c2df8c8f-db83-488b-a4c0-e93f33799b95",q.Mount_32_mount="9fb4c701-9376-4abc-b0c4-a0d51031f058",q.Mount_33_mount="54b0b61a-e283-41f9-b7d0-6f5c05581a95",q.Mount_34_mount="5ac56738-6022-4f42-b2e2-69488f15741b",q.Mount_35_mount="7ac360b8-1676-4d92-b269-a65ceb5a0433",q.Mount_36_mount="bf9c6ec9-22ec-462a-9234-5b902040209a",q.Mount_37_mount="1bb50f3c-7e3d-4ca4-a1f0-7e05077ca897",q.Mount_38_mount="9817e829-895c-4602-a3fc-16391e7f3122",q.Mount_39_mount="f38096ba-715a-4aa1-9a80-b47730b8c4f3",q.Mount_40_mount="38e4de2e-94b8-4c33-b8a4-b47fdf2dd189",q.Mount_41_mount="905efbb2-1357-405b-871d-48a1f3e2f2b3",q.Mount_42_mount="23ec77e0-7da7-413b-9e6e-0609a6b2b77d",q.Mount_43_mount="04387aa5-95db-41ad-83f0-ea233b65e5a8",q.Mount_44_mount="87f9f92a-a0f5-4230-9a07-44d8c1f6c488",q.Mount_45_mount="9d1677d9-dc6f-439e-bb5a-fac54852bdbf",q.Mount_46_mount="01267385-f2de-4c73-8faa-b924021decff",q.Mount_47_mount="6cf715f3-6a1d-4908-9ee7-83a17da3817f",q.Mount_48_mount="85b49bda-42a4-4ca6-998b-72c3892472ac",q.Mount_49_mount="3ac41c6d-8b2b-4b86-80ce-0eddd406c2f5",q.Rainbow_cloud_mount="f65753d9-9ffb-4b5b-96b2-440062f35e5f",q.Storm_cloud_mount="ce2010d2-f3ce-4811-94a7-17ef018625d7",q.Surfboard_mount="9138b7ad-f8f7-43e7-af73-64c64b75214b",q.Test_mount="bc30712a-feb9-46a1-bc27-c4c02b2a4db6",q.Treasure_chest_mount="a9cb6b76-7977-4865-9711-ee3cf1956846",q.Tube_mount="36f07d74-1ec1-4406-80fc-133bea288f85"}(Y||(Y={}));var Z=z(35120),J=z(77938),tt=z(73797),et=z(1492),it=z(28152);let st=class extends X.uAl{constructor(){super(...arguments),this._onMount=new X.HN0,this._onDismount=new X.HN0,this._transformationNotSupported=!1,this._transformationChecker=null,this._pendingCheckerResolvers=[],this._mountID=null,this._listenerEnabled=!0,this._updateMountAppearanceQueue=Promise.resolve()}get onMount(){return this._onMount}get onDismount(){return this._onDismount}get transformationChecker(){return this._transformationChecker}set transformationChecker(q){if(this._transformationChecker=q,q&&this._pendingCheckerResolvers.length>0){const q=this._pendingCheckerResolvers;this._pendingCheckerResolvers=[],q.forEach((q=>q()))}}create(){if(super.create(),!this._playerData)return void X.VyI.log("MountListenerComponent: Failed to initialize the component due to missing player data provider",X.$bb.Error);const q=Z.q.instance.game.broadcaster;this._playerData.isActivePlayer()&&(q.addAppListener(tt.J8.PlayerEditingMenuClosed,this.updateMountAppearance,this),q.addAppListener(tt.J8.PlayerAppearanceUpdated,this.updateMountAppearance,this)),q.addAppListener(tt.J8.MorphMarbleUsed,this.updateMountAppearance,this),q.addAppListener(tt.J8.MorphMarbleCancelled,this.updateMountAppearance,this),q.addAppListener(tt.J8.MorphMarbleTimerUpdated,this.updateMountAppearance,this)}destroy(){var q,K,z;null===(q=this._onMount)||void 0===q||q.dispose(),this._onMount=null,null===(K=this._onDismount)||void 0===K||K.dispose(),this._onDismount=null,this.mountComponent=null;{const q=Z.q.instance.game.broadcaster;(null===(z=this._playerData)||void 0===z?void 0:z.isActivePlayer())&&(q.removeAppListener(tt.J8.PlayerEditingMenuClosed,this),q.removeAppListener(tt.J8.PlayerAppearanceUpdated,this)),q.removeAppListener(tt.J8.MorphMarbleUsed,this),q.removeAppListener(tt.J8.MorphMarbleCancelled,this),q.removeAppListener(tt.J8.MorphMarbleTimerUpdated,this)}if(this._transformationChecker=null,this._pendingCheckerResolvers.length>0){const q=this._pendingCheckerResolvers;this._pendingCheckerResolvers=[],q.forEach((q=>q()))}super.destroy()}updateMountAppearance(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._updateMountAppearanceQueue=this._updateMountAppearanceQueue.then((()=>(0,Q.sH)(this,void 0,void 0,(function*(){var q;this._transformationChecker||this._transformationNotSupported||(X.VyI.log("No transformation checker set for mount listener. Deferring update until a transformation checker is set.",X.$bb.Verbose),yield new Promise((q=>{this._pendingCheckerResolvers.push(q)}))),this.mountComponent&&((null===(q=this._transformationChecker)||void 0===q?void 0:q.isTransformed())?yield this.setMountAppearanceFromId(0):yield this.setMountAppearanceFromId())})))),yield this._updateMountAppearanceQueue}))}addParticleSystem(q){var K,z,Y;if(this.mountComponent)if(this.mountComponent.hasInternalParticleEffect())this.mountComponent.addInternalParticleEffect().catch(X.RQr.createHandler("Could not add internal particle effect."));else if(null===(Y=null===(z=null===(K=q.metadata)||void 0===K?void 0:K.assets)||void 0===z?void 0:z.particles)||void 0===Y?void 0:Y.ID){const K=q.metadata.assets.particles;this.mountComponent.addParticleEffectByID(K.ID,K.x,K.y),this.mountComponent.pauseParticles()}else this.mountComponent.removeParticleEffect()}setMountAppearanceFromId(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Q;if(!this._listenerEnabled||!this._playerData)return;const Z=null!=q?q:this._playerData.player.equipment.getMount();if(Z!==this._mountID)if(this._mountID=Z,this._mountID>0){const q=J.t.getItem("mount",this._mountID);(null===(K=q.data)||void 0===K?void 0:K.mountGuid)||(X.VyI.log(`ERROR: Mount item ${this._mountID} does not have a GUID, defaulting to Cloud`,X.$bb.Error),q.data.mountGuid=Y.Cloud_mount);const Q=q.data.mountGuid;try{if(yield this.mountComponent.setMount(Q),!this.mountComponent)return;this.addParticleSystem(q),null===(z=this._onMount)||void 0===z||z.dispatch()}catch(tt){X.RQr.logError(tt,"ERROR: Unable to update mount appearance.")}}else try{if(yield this.mountComponent.clearMount(),!this.mountComponent)return;null===(Q=this._onDismount)||void 0===Q||Q.dispatch()}catch(tt){X.RQr.logError(tt,"ERROR: Unable to clear mount appearance.")}}))}setListenersEnabled(q=!0){this._listenerEnabled=q}};(0,Q.Cg)([(0,X.Pqz)(et.N),(0,Q.Sn)("design:type",et.N)],st.prototype,"mountComponent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],st.prototype,"_onMount",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],st.prototype,"_onDismount",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],st.prototype,"_transformationNotSupported",void 0),(0,Q.Cg)([(0,X.Cdj)("1eb-d7b4"),(0,Q.Sn)("design:type",Object)],st.prototype,"_playerData",void 0),st=(0,Q.Cg)([(0,X.EVk)("MountListener",it.Y.playerAnimation)],st)},39325:(q,K,z)=>{"use strict";z.d(K,{F:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(29834);let J=class extends Q.uAl{playAnimation(q){var K;(null===(K=this._spineAnimator)||void 0===K?void 0:K.hasAnimation(q))?this._spineAnimator.playAnimation(q,!0):Q.Aq$.isDefined(this._spineAnimator)&&Q.VyI.log(`ERROR: Animation ${q} not found in player SpineAnimator`,Q.$bb.Error)}};(0,Y.Cg)([(0,Q.MnK)(Z.j),(0,Y.Sn)("design:type",Z.j)],J.prototype,"_spineAnimator",void 0),J=(0,Y.Cg)([(0,Q.EVk)("PlayerAnimationStates",X.Y.playerAnimation)],J)},47389:(q,K,z)=>{"use strict";z.d(K,{b:()=>J});var Y=z(8674),Q=z(62459),X=z(63068),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this.onAppearanceLoaded=new Q.HN0,this.onAppearanceDone=new Q.HN0}create(){super.create(),this._appearanceData&&this.setAppearance(this._appearanceData)}setAppearance(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y;q.outfit||(q.outfit=1);const Z=null===(Y=null===(z=null===(K=this.gameObject)||void 0===K?void 0:K.parent)||void 0===z?void 0:z.parent)||void 0===Y?void 0:Y.findComponentInChildren(X.n);return Z?(yield Z.fromPlayerAppearanceData(q).catch(Q.RQr.createHandler("fromPlayerAppearanceData failed in PlayerAppearanceSelector")),this.onAppearanceLoaded.dispatch()):this.onAppearanceLoaded.dispatch(),Promise.resolve()}))}destroy(){this.onAppearanceLoaded.dispose(),this.onAppearanceDone.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onAppearanceLoaded",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onAppearanceDone",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],J.prototype,"_appearanceData",void 0),J=(0,Y.Cg)([(0,Q.EVk)("PlayerAppearanceSelector",Z.Y.playerAnimation)],J)},6190:(q,K,z)=>{"use strict";z.d(K,{q:()=>it});var Y=z(8674),Q=z(62459),X=z(65240),Z=z(35120),J=z(65050),tt=z(30226),et=z(28152);let it=class extends Q.JTX{constructor(){super(...arguments),this.eventType="got-item",this.awardSourceType=X.C.PrizeWheel,this.instanceType=J.N.OpenWorld,this.awardItems=!0,this.onComplete=new Q.HN0}destroy(){this.onComplete.dispose(),super.destroy()}run(){if(this.awardItems){for(const q of this.items)q.isSecure||tt.J.bagItem(q,Z.q.instance.game,this.eventType,void 0,{source_type:this.awardSourceType,instance_type:this.instanceType,instance_id:this.instanceId});this.onComplete.dispatch()}else this.onComplete.dispatch()}addItem(q,K,z=1){this.items.push({type:q,ID:K,N:z})}setItem(q,K,z=1){this.items=[{type:q,ID:K,N:z}]}};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.vCS)(),(0,Y.Sn)("design:type",Array)],it.prototype,"items",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],it.prototype,"eventType",void 0),(0,Y.Cg)([(0,Q.gfw)(X.C),(0,Y.Sn)("design:type",String)],it.prototype,"awardSourceType",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],it.prototype,"onComplete",void 0),it=(0,Y.Cg)([(0,Q.EVk)("SilentAwardItems",et.Y.player)],it)},64889:(q,K,z)=>{"use strict";z.d(K,{$:()=>st});var Y=z(8674),Q=z(62459),X=z(92591),Z=z(71857),J=z(28152),tt=z(29834),et=z(89717),it=z(63115);let st=class extends Q.uAl{constructor(){super(...arguments),this._isMounted=!1,this._currentStateID=0}get currentState(){return this._activeController.currentState}create(){super.create(),this._isMounted=!1,this._activeController=this._playerController,this._morphTransformation.onPlayerMorphStarted.add(this.setMorphController,this),this._morphTransformation.onPlayerMorphEnded.add(this.clearMorphController,this),this._mountListener.onMount.add(this.setMounted,this),this._mountListener.onDismount.add(this.clearMounted,this),this._mountListener.transformationChecker=this}getSpineAnimator(){return this._spineAnimator}setMorphController(){this._activeController=this._morphTransformation.morphedAppearance.animationController,this.changeState(this._currentStateID),this._mountListener.updateMountAppearance()}clearMorphController(){this._activeController=this._playerController,this.changeState(this._currentStateID)}setMounted(){this._isMounted=!0,this.changeState(this._currentStateID)}clearMounted(){this._isMounted&&(this._isMounted=!1,this.changeState(this._currentStateID))}isTransformed(){return this._morphTransformation.isMorphed()}changeState(q){this._currentStateID=q,this._isMounted&&[0,4,1].includes(q)?this._morphTransformation.isMorphed()&&this._activeController.changeState(0):this._morphTransformation.isMorphed()&&this._activeController.changeState(q),this._spineAnimator.GameObject.active=this._activeController===this._playerController;const K=this._spineAnimator;K&&(K.OnAnimationComplete.removeAll(),2===q?(K.playAnimation(Z.$.ATTACK,!1),K.OnAnimationComplete.addOnce((()=>{K.playAnimation(Z.$.STOP_HEAVY,!0)}))):3===q?(K.playAnimation(Z.$.ATTACK2,!1),K.OnAnimationComplete.addOnce((()=>{K.playAnimation(Z.$.STOP_HEAVY,!0)}))):5===q?(K.playAnimation(Z.$.ATTACK,!1),K.OnAnimationComplete.addOnce((q=>{q===Z.$.ATTACK&&(K.playAnimation(Z.$.DANCE_RUNNINGMAN,!1),K.OnAnimationComplete.addOnce((()=>{K.playAnimation(Z.$.STOP_HEAVY,!0)})))}))):1===q?K.playAnimation(this._isMounted?Z.$.WALK_FLOAT:Z.$.WALK,!0):4===q?K.playAnimation(Z.$.STOP_HEAVY,!0):K.playAnimation(Z.$.STAND,!0))}destroy(){var q,K,z,Y;this._morphTransformation&&(null===(q=this._morphTransformation.onPlayerMorphStarted)||void 0===q||q.removeAll(this),null===(K=this._morphTransformation.onPlayerMorphEnded)||void 0===K||K.removeAll(this)),this._mountListener&&(null===(z=this._mountListener.onMount)||void 0===z||z.removeAll(this),null===(Y=this._mountListener.onDismount)||void 0===Y||Y.removeAll(this)),this._playerController=null,this._morphTransformation=null,this._mountListener=null,super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(X.K),(0,Q.Lr6)(0),(0,Q.nKb)("defaultAnimationController"),(0,Y.Sn)("design:type",X.K)],st.prototype,"_playerController",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.j),(0,Y.Sn)("design:type",tt.j)],st.prototype,"_spineAnimator",void 0),(0,Y.Cg)([(0,Q.MnK)(et.R),(0,Y.Sn)("design:type",et.R)],st.prototype,"_morphTransformation",void 0),(0,Y.Cg)([(0,Q.MnK)(it.T),(0,Y.Sn)("design:type",it.T)],st.prototype,"_mountListener",void 0),st=(0,Y.Cg)([(0,Q.EVk)("WizardAnimationController",J.Y.playerAnimation)],st)},13693:(q,K,z)=>{"use strict";z.d(K,{Y:()=>it});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z(35120),tt=z(129),et=z(71857);let it=Y=class extends X.uAl{constructor(){super(...arguments),this._characterContainer=null,this._character=null,this._timeout=null,this._loadOnCreate=!1,this._adjustForMount=!1,this._hideMount=!1,this._animationState=et.$.SETUP,this.onLoaded=new X.HN0,this._inputEnabled=!0}create(){super.create(),this._loadOnCreate&&this.addDefaultPlayerCharacter()}addDefaultPlayerCharacter(){var q;const K=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=K.equipment.getMount()>0;this.addCharacter(K,null===(q=this._baseRenderComponent)||void 0===q?void 0:q.getRootContainer(),0,this._adjustForMount&&z?Y._MOUNT_OFFSET:0)}addCharacter(q,K,z,Y){var Q;void 0===K&&(K=null===(Q=this.GameObject.legacyTransform)||void 0===Q?void 0:Q.group),void 0===z&&(z=0),void 0===Y&&(Y=0),this._character=new tt.a(J.q.instance.game),this._character.appearance=Z.clone(q.appearance),this._character.equipment=Z.clone(q.equipment),this._character.data.chargedLevelData=Z.clone(q.data).chargedLevelData,this._character.data.level=Z.clone(q.data).level,this._characterContainer=J.q.instance.prodigy.create.player(K,this._character,1,z,Y,!1,{isPreview:!0,hideMount:this._hideMount}),this._characterContainer.forceWeaponVisual=!0,this._characterContainer.reload(),this._characterContainer.onFullyLoaded.addOnce((()=>{var q,K;this._animationState!==et.$.SETUP&&(null===(q=this._characterContainer)||void 0===q||q.setNewAnimationState(this._animationState)),null===(K=this._characterContainer)||void 0===K||K.setSpriteInput(this._inputEnabled),this.onLoaded.dispatch()}))}removeCharacter(){var q;null===(q=this._characterContainer)||void 0===q||q.destroy(),this._characterContainer=null}setEquipment(q,K){var z;this._character?("outfit"===q?this._character.equipment.setOutfit(K,!0):"hat"===q?this._character.equipment.setHat(K,!0):"weapon"===q?this._character.equipment.setWeapon(K,!0):"boots"===q?this._character.equipment.setBoots(K,!0):"mount"===q?this._character.equipment.setMount(K,!0):"costume"===q?this._character.equipment.setCostume(K,!0):X.VyI.log("Item type is unknown.",X.$bb.Warning),null===(z=this._characterContainer)||void 0===z||z.reload()):X.VyI.log("Character is undefined.",X.$bb.Warning)}setInputEnabled(q){var K;null===(K=this._characterContainer)||void 0===K||K.setSpriteInput(q),this._inputEnabled=q}setAppearance(q,K){var z;if(this._character){if("hair"===q)this._character.appearance.setHair(K);else if("hairColor"===q){const q=this._character.appearance.getHair().style;this._character.appearance.setHair(q,K)}else"face"===q?this._character.appearance.setFace(K):"eyeColor"===q?this._character.appearance.setEyeColor(K):"skinColor"===q?this._character.appearance.setSkinColor(K):X.VyI.log("Item type is unknown.",X.$bb.Warning);null===(z=this._characterContainer)||void 0===z||z.reload()}else X.VyI.log("Character is undefined.",X.$bb.Warning)}transformEffect(q,K=1e3){null!==this._timeout&&window.clearTimeout(this._timeout),this._timeout=window.setTimeout((()=>{var K;null===(K=this._characterContainer)||void 0===K||K.transformToItem(q.transform,q.ID,!0,0)}),K)}destroy(){this.removeCharacter(),window.clearTimeout(this._timeout),this.onLoaded.dispose(),super.destroy()}};it._MOUNT_OFFSET=36,(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"_loadOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"_adjustForMount",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"_hideMount",void 0),(0,Q.Cg)([(0,X.gfw)(et.$),(0,Q.Sn)("design:type",String)],it.prototype,"_animationState",void 0),(0,Q.Cg)([(0,X.MnK)(X.jsv),(0,Q.Sn)("design:type",X.jsv)],it.prototype,"_baseRenderComponent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],it.prototype,"onLoaded",void 0),it=Y=(0,Q.Cg)([(0,X.EVk)("CharacterPreview")],it)},44725:(q,K,z)=>{"use strict";z.d(K,{u:()=>nt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(35120),J=z(55734),tt=z(129),et=z(22023),it=z(19690),st=z(28152);let nt=class extends Q.uAl{get renderContainer(){return this._renderContainer}addCreature(q,K=!1){this._renderContainer&&this._renderContainer.destroy(),q instanceof tt.a?this.renderPlayer(q):this.renderMonster(q,K)}renderPlayer(q){const K=new tt.a(Z.q.instance.game);return K.appearance=X.clone(q.appearance),K.equipment=X.clone(q.equipment),K.data.level=X.clone(q.data.level),K.data.chargedLevelData=X.clone(q.data.chargedLevelData),this._renderContainer=(0,it.vt)().player(this.GameObject.legacyTransform.group,K,1,0,0,!1,{isPreview:!0}),this._renderContainer.forceWeaponVisual=!0,this._renderContainer.standStill(),this._renderContainer.OnLoad.add((()=>{this._renderContainer.setSpriteInput(!1)})),this._renderContainer.startLoad(),this._renderContainer}renderMonster(q,K){var z;const Y=new J.R(Z.q.instance.game,q.data);return this._renderContainer=(0,it.vt)().monster(this.GameObject.legacyTransform.group,Y,1,0,0),Q.Aq$.isDefined(null===(z=Y.source)||void 0===z?void 0:z.defaultScale)&&(this._renderContainer.sprites.scale.x=Y.source.defaultScale,this._renderContainer.sprites.scale.y=Y.source.defaultScale),this._renderContainer.OnLoad.add((()=>{K?this._renderContainer.stand():this._renderContainer.stopAllAnimations();const z=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getChargedLevel()>0&&et.P8.isPetOnTeam(q.data);this._renderContainer.setChargedEffectVisibility(z)})),this._renderContainer.startLoad(),this._renderContainer}destroy(){var q;null===(q=this._renderContainer)||void 0===q||q.destroy(),this._renderContainer=null,super.destroy()}};nt=(0,Y.Cg)([(0,Q.EVk)("CreaturePreview",st.Y.creatureAnimation)],nt)},24382:(q,K,z)=>{"use strict";z.d(K,{j:()=>X});var Y=z(62459),Q=z(35120);class X extends Y.uAl{constructor(){super(...arguments),this.onUpdateDisplay=new Y.HN0}get game(){return Q.q.instance.game}get name(){return null}get isCardValid(){return!1}updateDisplay(){this.isCardValid&&(this.resetCard(),this.updateCard(),this.onUpdateDisplay.dispatch())}updateCard(){}resetCard(){}clearCard(){this.resetCard()}destroy(){this.onUpdateDisplay.dispose(),super.destroy()}}},37468:(q,K,z)=>{"use strict";z.d(K,{z:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(43846),J=z(93171),tt=z(38920);!function(q){q.Fraction="fraction",q.Percentage="percentage"}(Y||(Y={}));let et=class extends X.uAl{constructor(){super(...arguments),this._initialValue=0,this._filledText="",this._textDisplayType=Y.Fraction,this._denominator=10,this._numerator=void 0,this._formatDisplayText=!1,this._initialFillColor="#FFFFFF",this._initialBgColor="#FFFFFF",this._initialOuterColor="#FFFFFF",this._initialTextOutlineColor="#902736",this._changeColorMidpoint=!1,this._midpointThreshold=.5,this._middleFillColor="#FFFFFF",this._middleBgColor="#FFFFFF",this._middleOuterColor="#FFFFFF",this._middleTextOutlineColor="#FFFFFF",this._changeColorOnComplete=!1,this.waitForAnimationCompleteToChangeColours=!1,this._completeThreshold=1,this._completeFillColor="#FFFFFF",this._completeBgColor="#FFFFFF",this._completeOuterColor="#FFFFFF",this._completeTextOutlineColor="#FFFFFF",this.onTweenValueStart=new X.HN0,this.onTweenValueComplete=new X.HN0,this.onFilled=new X.HN0}get progressBar(){return this._progressBar}get onProgress(){return this._progressBar.onProgress}create(){super.create(),this._initialColors={outerColor:this._initialOuterColor,bgColor:this._initialBgColor,fillColor:this._initialFillColor,textOutlineColor:this._initialTextOutlineColor},this._middleColors={outerColor:this._middleOuterColor,bgColor:this._middleBgColor,fillColor:this._middleFillColor,textOutlineColor:this._middleTextOutlineColor},this._completeColors={outerColor:this._completeOuterColor,bgColor:this._completeBgColor,fillColor:this._completeFillColor,textOutlineColor:this._completeTextOutlineColor},this.updateColors(this._initialColors),this.setValue(this._initialValue)}destroy(){super.destroy(),this.onTweenValueStart.dispose(),this.onTweenValueComplete.dispose(),this.onFilled.dispose()}setOuterColor(q){this._outlineGraphic.tint="number"==typeof q?q:X.Q1f.hexToColor(q).color}setBackgroundColor(q){this._innerGraphic.tint="number"==typeof q?q:X.Q1f.hexToColor(q).color}setFillColor(q){this._fillGraphic.tint="number"==typeof q?q:X.Q1f.hexToColor(q).color}setTextOutlineColor(q){this._barText.stroke="number"==typeof q?X.Q1f.numberToHexString(q):q}setBarText(q){this._barText.TextObject.destroyed||(this._barText.text=q)}hideBarText(){this._barText.Active=!1}showBarText(){this._barText.Active=!0}setBarTextStrokeColor(q){this._barText.TextObject.destroyed||(this._barText.stroke=q)}setValue(q,K=!1,z=0){this._initialValue=q,this.updateText(),K?(this._progressBar.tweenValue(q,z),this.onTweenValueStart.dispatch(),this._progressBar.onProgress.add((()=>{this.updateText()}),this),this._progressBar.onComplete.addOnce((()=>{this._progressBar.onProgress.removeAll(),this.updateText(),this.onTweenValueComplete.dispatch(),this.setColorsBasedOnValue(q),this.isFilledCheck()}))):(this._progressBar.setValue(q),this.updateText(),this.isFilledCheck()),K&&this.waitForAnimationCompleteToChangeColours||this.setColorsBasedOnValue(q)}setColorsBasedOnValue(q){this._changeColorOnComplete&&q>=this._completeThreshold?this.updateColors(this._completeColors):this._changeColorMidpoint&&this._changeColorMidpoint&&q>=this._midpointThreshold?this.updateColors(this._middleColors):this.updateColors(this._initialColors)}updateColors(q){this._activeColors!==q&&(this._activeColors=q,this.setOuterColor(q.outerColor),this.setBackgroundColor(q.bgColor),this.setFillColor(q.fillColor),this.setTextOutlineColor(q.textOutlineColor))}setFromValues(q,K,z=!1,Y=0,Q){this._numerator=q,this._denominator=K,z&&X.Aq$.isDefined(Q)&&this.setValue(Q/K,!1),this.setValue(q/K,z,Y)}updateText(){const q=this._progressBar.fillValue;if(1!==q||""===this._filledText)if(this._textDisplayType===Y.Fraction){let K=q*this._denominator;K=this._numerator&&this._numerator>K?Math.ceil(K):Math.floor(K),this._formatDisplayText?this.setBarText(`${(0,tt.Hk)(K,0,",")} / ${(0,tt.Hk)(this._denominator,0,",")}`):this.setBarText(`${K} / ${this._denominator}`)}else this._textDisplayType===Y.Percentage&&this.setBarText(`${Math.round(100*q)}%`);else this.setBarText((0,Z.k)(this._filledText))}tweenValue(q){this._progressBar.tweenValue(q),this._progressBar.onComplete.addOnce((()=>this.onTweenValueComplete.dispatch()))}getFillValue(){return this._progressBar.fillValue}isFilledCheck(){this._progressBar.fillValue>=1&&this.onFilled.dispatch()}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],et.prototype,"_initialValue",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],et.prototype,"_filledText",void 0),(0,Q.Cg)([(0,X.gfw)(Y),(0,Q.Sn)("design:type",String)],et.prototype,"_textDisplayType",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.okD)((q=>q._textDisplayType===Y.Fraction)),(0,Q.Sn)("design:type",Number)],et.prototype,"_denominator",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],et.prototype,"_formatDisplayText",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",Object)],et.prototype,"_initialFillColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",Object)],et.prototype,"_initialBgColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",Object)],et.prototype,"_initialOuterColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",Object)],et.prototype,"_initialTextOutlineColor",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],et.prototype,"_changeColorMidpoint",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.okD)((q=>q._changeColorMidpoint)),(0,Q.Sn)("design:type",Number)],et.prototype,"_midpointThreshold",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,X.okD)((q=>q._changeColorMidpoint)),(0,Q.Sn)("design:type",String)],et.prototype,"_middleFillColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,X.okD)((q=>q._changeColorMidpoint)),(0,Q.Sn)("design:type",String)],et.prototype,"_middleBgColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,X.okD)((q=>q._changeColorMidpoint)),(0,Q.Sn)("design:type",String)],et.prototype,"_middleOuterColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,X.okD)((q=>q._changeColorMidpoint)),(0,Q.Sn)("design:type",String)],et.prototype,"_middleTextOutlineColor",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],et.prototype,"_changeColorOnComplete",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],et.prototype,"waitForAnimationCompleteToChangeColours",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.okD)((q=>q._changeColorOnComplete)),(0,Q.Sn)("design:type",Number)],et.prototype,"_completeThreshold",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,X.okD)((q=>q._changeColorOnComplete)),(0,Q.Sn)("design:type",String)],et.prototype,"_completeFillColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,X.okD)((q=>q._changeColorOnComplete)),(0,Q.Sn)("design:type",String)],et.prototype,"_completeBgColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,X.okD)((q=>q._changeColorOnComplete)),(0,Q.Sn)("design:type",String)],et.prototype,"_completeOuterColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,X.okD)((q=>q._changeColorOnComplete)),(0,Q.Sn)("design:type",String)],et.prototype,"_completeTextOutlineColor",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"onTweenValueStart",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"onTweenValueComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"onFilled",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],et.prototype,"_outlineGraphic",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],et.prototype,"_innerGraphic",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],et.prototype,"_fillGraphic",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],et.prototype,"_barText",void 0),(0,Q.Cg)([(0,X.MnK)(J.a),(0,Q.Sn)("design:type",J.a)],et.prototype,"_progressBar",void 0),et=(0,Q.Cg)([(0,X.EVk)("DynamicProgressBar",X.YH6.ui)],et)},11624:(q,K,z)=>{"use strict";var Y;z.d(K,{P:()=>Y}),function(q){q[q.None=-1]="None",q[q.Firefly=0]="Firefly",q[q.Shiverchill=1]="Shiverchill",q[q.Skywatch=2]="Skywatch",q[q.Bonfire=3]="Bonfire",q[q.Shipwreck=4]="Shipwreck",q[q.Academy=5]="Academy",q[q.Darktower=6]="Darktower",q[q.Lamplight=7]="Lamplight",q[q.Dyno=8]="Dyno",q[q.House=9]="House",q[q.TowerTown=10]="TowerTown",q[q.DuelsStadium=11]="DuelsStadium",q[q.DragonIsle=12]="DragonIsle",q[q.FireflyHard=13]="FireflyHard",q[q.ShiverchillHard=14]="ShiverchillHard",q[q.BonfireHard=15]="BonfireHard",q[q.ShipwreckHard=16]="ShipwreckHard",q[q.SkywatchHard=17]="SkywatchHard",q[q.AcademyHard=18]="AcademyHard",q[q.Arcadia=19]="Arcadia"}(Y||(Y={}))},50873:(q,K,z)=>{"use strict";z.d(K,{k:()=>X});var Y=z(62459),Q=z(18280);class X extends Y.uAl{constructor(){super(...arguments),this.maskWidth=0,this.maskHeight=0,this.isHorizontal=!0,this.targetMask=null}get Width(){return this.maskWidth}set Width(q){this.maskWidth=q,this.updateSize()}get Height(){return this.maskHeight}set Height(q){this.maskHeight=q,this.updateSize()}get IsHorizontal(){return this.isHorizontal}set IsHorizontal(q){this.isHorizontal=q,this.updateMaskAnchor(),this.updateSize()}create(){super.create(),this.targetMask=this.GameObject.findComponent(Q.n),this.updateMaskAnchor()}setFillPercent(q){const K=Y.cj9.clamp(q,0,1);this.isHorizontal?this.targetMask.updateAnchor(this.maskWidth*(1-K),0):this.targetMask.updateAnchor(0,this.maskHeight*(1-K))}updateMaskAnchor(){this.isHorizontal?this.targetMask.setAnchor(0,.5*this.maskHeight,this.maskWidth,this.maskHeight):this.targetMask.setAnchor(.5*this.maskWidth,0,this.maskWidth,this.maskHeight)}updateSize(){this.isHorizontal?(this.targetMask.GameObject.legacyTransform.x=.5*-this.maskWidth,this.targetMask.setAnchor(0,.5*this.maskHeight,this.maskWidth,this.maskHeight)):(this.targetMask.GameObject.legacyTransform.y=.5*-this.maskHeight,this.targetMask.setAnchor(.5*this.maskWidth,0,this.maskWidth,this.maskHeight))}}},12861:(q,K,z)=>{"use strict";z.d(K,{A:()=>tt});var Y=z(8674),Q=z(62459),X=z(8770),Z=z(28152),J=z(84246);let tt=class extends J.j{applyEffect(q){if(q&&q.data)for(let K=0;K{"use strict";z.d(K,{w:()=>st});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(53661),J=z(35120),tt=z(73797),et=z(13956),it=z(21314);let st=class extends Q.uAl{constructor(){super(...arguments),this._openIFrameOnLoad=!0,this._iFrameWidth=480,this._iFrameHeight=700,this._iFrameBorderRadius=12,this.onIFrameClosed=new Q.HN0}create(){super.create(),this._iFrame=document.createElement("iframe"),this._iFrameSource=this.getInjectedValue(Z.n7.IFrameSource),this._closePostMessage=this.getInjectedValue(Z.n7.IFrameClosePostMessage),this.st=J.q.instance.prodigy.gameContainer.get("774-4659"),this.st.stopInactiveTimer()}postCreate(){super.postCreate(),this._openIFrameOnLoad&&this.setup(),this._closePostMessage&&J.q.instance.game.broadcaster.addAppListener(tt.bS.POST_MESSAGE_RECEIVED,((q,K)=>{let z=null;if(z="string"==typeof K?JSON.parse(K):K,z.name===this._closePostMessage){document.getElementById("external-ui").removeChild(this._iFrame),this.st.startInactiveTimer(),this.gameObject.destroyDeferred(),this.onIFrameClosed.dispatch()}}),this,J.q.instance.game)}destroy(){this._iFrame&&this._iFrame.remove(),this._closePostMessage&&J.q.instance.game.broadcaster.removeAppListener(tt.bS.POST_MESSAGE_RECEIVED,this,J.q.instance.game),this.onIFrameClosed.dispose(),super.destroy()}setup(){if(!this._iFrameSource)return void Q.VyI.log("IFrameComponent: No source provided for the iframe.",Q.$bb.Error);const q=document.getElementById("game-container").getElementsByTagName("canvas")[0],K=this._iFrame.style;this._iFrame.setAttribute("src",this._iFrameSource),this._iFrame.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),this._iFrame.setAttribute("allow",`payment ${this._urlProvider.getRootUrl()};`),K.position="absolute",K.display="block";const z=q.clientWidth>1}px)`,K.top=`calc(50% - ${Y>>1}px)`,K.borderRadius=`${this._iFrameBorderRadius}px`;document.getElementById("external-ui").appendChild(this._iFrame)}};(0,Y.Cg)([(0,et.b)("ddf-6c82"),(0,Y.Sn)("design:type",it.p)],st.prototype,"_urlProvider",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],st.prototype,"_openIFrameOnLoad",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],st.prototype,"_iFrameWidth",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],st.prototype,"_iFrameHeight",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],st.prototype,"_iFrameBorderRadius",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],st.prototype,"onIFrameClosed",void 0),st=(0,Y.Cg)([(0,Q.EVk)("IFrame",X.Y.ui)],st)},65231:(q,K,z)=>{"use strict";z.d(K,{s:()=>st});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(98013),J=z(6719),tt=z(19690),et=z(28152),it=z(24382);let st=class extends it.j{constructor(){super(...arguments),this._imageContainer=null}setItemData(q){this._item=q}get isCardValid(){return!!this._item}updateCard(){super.updateCard(),this.updateIcon()}resetCard(){Z.l.removeAll(this._imageContainer.legacyTransform.group,!0)}updateIcon(q){if(this.itemIsImageItemDrop(this._item)){const[K,z]=J.y.toInjectionParams(this._item.image);X.q.instance.prodigy.create.sprite(0,0,K,z,void 0,(K=>{null==K||K.setParent(this._imageContainer.legacyTransform.group),null==q||q(K)}))}else(0,tt.mD)().createFromDataAdvanced(this._item,this._imageContainer.legacyTransform.group,0,0).then((([K,z])=>null==q?void 0:q(z))).catch(Q.RQr.createHandler(`IconCard: Failed to create icon from item data for ${this._item.type}-${this._item.ID}`))}itemIsImageItemDrop(q){return void 0!==q.image}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],st.prototype,"_imageContainer",void 0),st=(0,Y.Cg)([(0,Q.EVk)("IconCard",et.Y.ui)],st)},34603:(q,K,z)=>{"use strict";z.d(K,{_:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(95925),J=z(57750),tt=z(28152);let et=class extends Q.y4o{constructor(){super(...arguments),this._initialAtlas="",this._initialFrame=null,this._initialAlpha=1,this._initialTint="#FFFFFF",this.resizeOnLoad=!1,this.resizeLimitedToParentSize=!1,this._currentAtlas="",this._currentFrame=void 0,this._sprite=null,this._isLoaded=!1,this.onLoaded=new Q.HN0,this.onAssetSet=new Q.HN0,this._alwaysDispatchOnLoaded=!1}get isLoaded(){return this._isLoaded}get sprite(){return this._sprite}get OnLoaded(){return this.onLoaded}create(){super.create(),this._currentAtlas=this._initialAtlas,this._currentFrame=this._initialFrame,this._sprite=X.q.instance.prodigy.create.sprite(0,0),this._sprite.roundPixels=!0,this.setRootContainer(this._sprite),this._initialAtlas&&this.setAsset(this._initialAtlas,this._initialFrame),this.setAlpha(this._initialAlpha),"string"==typeof this._initialTint?this.tint(parseInt(this._initialTint.substring(1),16)):"number"==typeof this._initialTint?this.tint(this._initialTint):Q.VyI.log("%c Image create failed to apply tint "+typeof this._initialTint,Q.$bb.Error,"color: #FF0000; background: #000;")}setAnchor(q,K){this._sprite.anchor.set(q,K)}tint(q){this.sprite?this._sprite.tint=q:this._initialTint=`#${q.toString(16)}`}setScale(q,K){this._sprite.scale.set(q,K)}getScale(){return this._sprite.scale}setAlpha(q){this.sprite?this._sprite.alpha=q:this._initialAlpha=q}getWorld(){return this._sprite.world}getWidth(){return this._sprite.width}getHeight(){return this._sprite.height}getEvents(){return this._sprite.events}setInputEnabled(q=!0){this._sprite.inputEnabled=q}enableDragging(q,K,z,Y){this._sprite.inputEnabled&&(this._sprite.input.enableDrag(q,K),Q.Aq$.isDefined(z)&&Q.Aq$.isDefined(Y)&&this._sprite.input.enableSnap(z,Y))}disableDragging(){this._sprite.input.disableDrag()}getBounds(){const q=this._sprite.getBounds();return new Q.M_G(q.x,q.y,q.width,q.height)}resetToOrigin(){this._sprite.position.set(0,0)}setAsset(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this._isLoaded=!1,this._currentAtlas=q,this._currentFrame=K,this.onAssetSet.dispatch(),this._sprite){this._targetSource=q,this._targetFrame=K;const z=this.getAssetLoader();if(!z.isLoaded(q,Z.i.Image))return yield z.loadAssets([q]),void(q===this._targetSource&&!this._sprite._destroyed&&z.isLoaded(q,Z.i.Image)&&(yield this.setAsset(q,this._targetFrame)));this._sprite.key!==q?(this._sprite.loadTexture(q,K),this._isLoaded=!0,this.resizeOnLoad&&this.sizeToSourceImage(),this.onLoaded.dispatch()):K?this.setFrameName(K):this._alwaysDispatchOnLoaded&&this.onLoaded.dispatch(),this.sprite.name||(this.sprite.name=`${q}/${K}`)}else this._initialAtlas=q,this._initialFrame=K;this.updateSmooth()}))}getInputHandler(){return this._sprite.input}hasUniqueInstance(){return!0}setAngle(q){this._sprite.angle=q}setFrame(q){this._sprite.frame=q}sizeToSourceImage(){const q=this.gameObject.transform;if(!(q instanceof Q.XVE))return;q.fullWidth=this._sprite.width,q.fullHeight=this._sprite.height;const K=this.gameObject.parent.transform;if(this.resizeLimitedToParentSize&&K instanceof Q.XVE){const z=K.fullWidth>K.fullHeight?K.worldScale.x*q.fullWidth/K.fullWidth:K.worldScale.y*q.fullHeight/K.fullHeight;z>1&&(q.fullWidth/=z,q.fullHeight/=z)}}setFrameName(q){this._sprite&&Q.Aq$.isDefined(this._sprite.key)?this._sprite.frameName=q:(this._initialFrame=q,this._targetFrame=q),this._currentFrame=q}getImageKey(){return this._currentAtlas}getFrame(){return this._currentFrame}destroy(){null!==this._sprite&&this._sprite.destroy(),this.onLoaded.dispose(),this.onAssetSet.dispose(),super.destroy()}getDimensions(){return!this._sprite||this._sprite[J.k.DESTROYED]?(Q.VyI.log("Cannot get dimensions, sprite has been destroyed.",Q.$bb.Error),new Q.or0(0,0)):new Q.or0(this._sprite.width,this._sprite.height)}getAssetLoader(){var q;return this.GameObject&&null!==(q=this.assetLoader)&&void 0!==q?q:X.q.instance.prodigy.gameContainer.get(Q.t5G.AssetLoader)}};(0,Y.Cg)([(0,Q.Cdj)(Q.t5G.AssetLoader),(0,Y.Sn)("design:type",Object)],et.prototype,"assetLoader",void 0),(0,Y.Cg)([(0,Q.Bak)(),(0,Q.W_S)(),(0,Q.Lr6)(0),(0,Q.nKb)("atlas"),(0,Y.Sn)("design:type",String)],et.prototype,"_initialAtlas",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.Lr6)(0),(0,Q.nKb)("frame"),(0,Y.Sn)("design:type",String)],et.prototype,"_initialFrame",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Q.Lr6)(0),(0,Q.nKb)("alpha"),(0,Y.Sn)("design:type",Number)],et.prototype,"_initialAlpha",void 0),(0,Y.Cg)([(0,Q.iEU)(),(0,Q.Lr6)(0),(0,Q.nKb)("tint"),(0,Y.Sn)("design:type",Object)],et.prototype,"_initialTint",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],et.prototype,"resizeOnLoad",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],et.prototype,"resizeLimitedToParentSize",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],et.prototype,"onLoaded",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],et.prototype,"onAssetSet",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],et.prototype,"_alwaysDispatchOnLoaded",void 0),et=(0,Y.Cg)([(0,Q.EVk)("Image",tt.Y.root)],et)},38042:(q,K,z)=>{"use strict";z.d(K,{p:()=>X});var Y=z(62459),Q=z(34603);class X extends Y.uAl{constructor(){super(...arguments),this.onComplete=new Y.HN0,this.onLoop=new Y.HN0,this.currentAnimation=null}get OnAnimationComplete(){return this.onComplete}playAnimation(q,K,z){const Y=this.GameObject.findComponent(Q._);if(null!==Y){const Q=Y.sprite;if(!Q.key)return void Y.OnLoaded.addOnce(this.playAnimation,this,-Number.MAX_SAFE_INTEGER,q,K);const X=Q.animations.getAnimation(this.currentAnimation);null!==X&&(X.onComplete.removeAll(this),X.onLoop.removeAll(this));const Z=Q.animations.getAnimation(q);Z?(Z.onComplete.removeAll(this),Z.onComplete.addOnce((()=>{this.onComplete.dispatch()}),this),Z.onLoop.removeAll(this),Z.onLoop.add((()=>{this.onLoop.dispatch(Z.loopCount)}),this),Q.animations.play(q,z,K),this.currentAnimation=q):this.onComplete.dispatch()}}stopAnimation(){const q=this.GameObject.findComponent(Q._);null!==q&&q.sprite.animations.stop()}createAnimationSequence(q,K,z,Y){const X=this.GameObject.findComponent(Q._);null!==X&&X.sprite.animations.add(q,K,z,Y,!0)}destroy(){const q=this.GameObject.findComponent(Q._);if(null==q?void 0:q.sprite){const K=q.sprite.animations.getAnimation(this.currentAnimation);K&&(K.onComplete.removeAll(this),K.onLoop.removeAll(this))}this.onComplete.dispose(),this.onLoop.dispose(),super.destroy()}}},84246:(q,K,z)=>{"use strict";z.d(K,{j:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(92150);class J extends Q.uAl{constructor(){super(...arguments),this._baseGameObject=null,this._anchorCorrectionOffsetX=0,this._anchorCorrectionOffsetY=0}initialize(q){if(this._baseGameObject.legacyTransform.group.children.length<=1)return;const K=this._baseGameObject.legacyTransform.group.getChildAt(1).exists;K||(this._baseGameObject.legacyTransform.group.getChildAt(1).exists=!0);const z=this._baseGameObject.legacyTransform.x,Y=this._baseGameObject.legacyTransform.y;this._baseGameObject.legacyTransform.x-=this._baseGameObject.legacyTransform.group.getGlobalPosition().x-this._anchorCorrectionOffsetX,this._baseGameObject.legacyTransform.y-=this._baseGameObject.legacyTransform.group.getGlobalPosition().y-this._anchorCorrectionOffsetY,this._baseGameObject.legacyTransform.group.updateTransform(),this._bmd=X.q.instance.game.add.bitmapData(this._baseGameObject.legacyTransform.width,this._baseGameObject.legacyTransform.height),this._bmd.drawGroup(this._baseGameObject.legacyTransform.group),this._bmd.update(),this._bmdWidth=Math.floor(this._bmd.width),this._bmdHeight=Math.floor(this._bmd.height);const Q=this._bmd.renderTarget.context.getImageData(0,0,this._bmdWidth,this._bmdHeight);this.applyEffect(Q),this._bmd.renderTarget.context.putImageData(Q,0,0),this._bmd.generateTexture(q,(K=>{var z,Y;if(!(null===(Y=null===(z=this.GameObject)||void 0===z?void 0:z.legacyTransform)||void 0===Y?void 0:Y.group))return;const Q=new Z._(X.q.instance.game,0,0,void 0,void 0,K);Q.name=q,this.GameObject.legacyTransform.group.addChild(Q)}),this),this._baseGameObject.legacyTransform.x=z,this._baseGameObject.legacyTransform.y=Y,this._baseGameObject.legacyTransform.group.updateTransform(),K||(this._baseGameObject.legacyTransform.group.getChildAt(1).exists=!1)}destroy(){this._bmd&&(this._bmd.clear(),this._bmd.destroy()),this._bmd=null,super.destroy()}}(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_baseGameObject",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_anchorCorrectionOffsetX",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_anchorCorrectionOffsetY",void 0)},52156:(q,K,z)=>{"use strict";z.d(K,{X:()=>ht});var Y,Q=z(8674),X=z(62459),Z=z(54300),J=z(88022),tt=z(99625),et=z(36648),it=z(91207),st=z(77938),nt=z(68152),at=z(19690),rt=z(28152),ot=z(34603);let ht=Y=class extends X.uAl{constructor(){super(...arguments),this._targetImage=null,this._itemID=null,this._itemType=null,this._assetKey=null,this._updateTransformOnLoad=!0,this._onItemDataLoaded=new X.HN0}get onItemDataLoaded(){return this._onItemDataLoaded}get isLoaded(){var q,K;return null!==(K=null===(q=this._targetImage)||void 0===q?void 0:q.isLoaded)&&void 0!==K&&K}get assetID(){return this._itemID}create(){super.create(),this._updateTransformOnLoad&&this._targetImage.OnLoaded.add(this.updateOffset,this),"gold"===this._itemType&&(this._itemType="currency",this._itemID=1),this._targetImage&&this._itemType&&this._itemID&&this.updateTargetImage().catch(X.RQr.createHandler("Unable to load image"))}destroy(){var q;null===(q=this._loadSpineEffectIconPromise)||void 0===q||q.cancel(),this._updateTransformOnLoad&&this._targetImage.OnLoaded.remove(this.updateOffset,this),this._targetImage=null,this._onItemDataLoaded.dispose(),super.destroy()}setItem(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!(null==q?void 0:q.ID))throw new Error("Item ID is not defined");yield this.setAsset(q.ID,q.type)}))}setAsset(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=null,z=null){(q!==this._itemID||X.Aq$.isDefined(K)&&K!==this._itemType||X.Aq$.isDefined(z)&&z!==this._assetKey)&&(this._itemID=q,X.Aq$.isDefined(K)&&(this._itemType=K),X.Aq$.isDefined(z)&&(this._assetKey=z),yield this.updateTargetImage())}))}updateTargetImage(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=yield st.t.secureGetItem(this._itemType,this._itemID);(0,nt.v)(null!==K,`Item was not found for ${this._itemType}-${this._itemID}`);const z=Y.createImageLoadData(K,this._assetKey);this.addItemEffects(K);try{yield null===(q=this._targetImage)||void 0===q?void 0:q.setAsset(z.source,z.frame)}catch(Q){X.RQr.logError(Q,"Error loading image from item")}this._onItemDataLoaded.dispatch()}))}addItemEffects(q){var K,z,Y;this._targetImage&&(null===(K=this._effectIcon)||void 0===K||K.destroy(),X.Aq$.isDefined(null===(Y=null===(z=q.data)||void 0===z?void 0:z.effect)||void 0===Y?void 0:Y.transform)&&(X.Aq$.isDefined(this._loadSpineEffectIconPromise)&&this._loadSpineEffectIconPromise.cancel(),this._loadSpineEffectIconPromise=(0,at.Ks)().loadWithDependenciesFromGUID(tt.l.MorphMarbleIconSpine),this._loadSpineEffectIconPromise.then((q=>{var K,z;const Y=null===(K=st.t.getItem(this._itemType,this._itemID))||void 0===K?void 0:K.data;this._effectIcon=q,this.gameObject&&(null===(z=null==Y?void 0:Y.effect)||void 0===z?void 0:z.transform)?this.gameObject.addChild(this._effectIcon):q.destroy()})).catch(X.RQr.createHandler("Error loading item effect icon spine"))))}removeItemEffects(){var q,K;null===(q=this._effectIcon)||void 0===q||q.destroy(),(null===(K=this.gameObject)||void 0===K?void 0:K.children)&&(this.gameObject.children.length=0)}updateOffset(){const q=this._targetImage.getDimensions();this._targetImage.GameObject.transform instanceof X.XVE?(this._targetImage.GameObject.transform.setSizeDelta(q.width,q.height),this._targetImage.GameObject.transform.anchoredPivotOffset=new X.I9Y(-q.getHalfWidth(),-q.height)):this._targetImage.GameObject.transform.setPosition(-q.getHalfWidth(),-q.height)}static createImageAssetSourceName(q,K,z="default"){var Y,Q;const X=`Icon_${q}_${K}`,J=it.P[X];return J||(null!==(Q=null!==(Y=et.q[X])&&void 0!==Y?Y:Z.p[`${q}-${K}`])&&void 0!==Q?Q:`${z}-${q}-${K}`)}static createImageLoadData(q,K){var z,Q,Z,tt,et,st,nt;const at=null===(Q=null===(z=q.metadata)||void 0===z?void 0:z.assets)||void 0===Q?void 0:Q[K];if(null==at?void 0:at.atlas)return{source:at.atlas,frame:at.frame};switch(q.type){case"gold":return{source:it.E.getIconForType("currency",1)};case"eyeColor":case"skinColor":return{source:J._.General_icons_json,frame:"empty"};case"mathTownInterior":return{source:J._.Towertown_interiors_store_json,frame:q.data.tag};case"mathTownFrame":return{source:J._.Towertown_frames_store_json,frame:q.data.tag};case"mathTownDecor":return{source:it.E.getTowerTownIcon(q.data.tag)};case"item":if(X.Aq$.isDefined(null===(Z=q.data.effect)||void 0===Z?void 0:Z.transform))return{source:it.E.getIconForType(q.data.effect.transform,q.data.effect.ID)};break;case"boots":case"hat":case"weapon":case"follow":case"outfit":case"dorm":case"hairColor":case"costume":if(!X.Aq$.isDefined(K))return{source:it.E.getIconForType(q.type,q.ID)};break;case"pet":if("spritesheet"===(null===(tt=q.data)||void 0===tt?void 0:tt.assetType)||"spritesheet"===(null===(nt=null===(st=null===(et=q.metadata)||void 0===et?void 0:et.assets)||void 0===st?void 0:st.reduced)||void 0===nt?void 0:nt.type))return{source:`${K}-${q.type}-${q.ID}`};break;case"currency":if(27===q.ID&&"upscaled"===K)return{source:J._.Ui_battle_pass_ultimate_json,frame:"magicoin-pile"}}return{source:Y.createImageAssetSourceName(q.type,q.ID,K)}}};(0,Q.Cg)([(0,X.MnK)(ot._),(0,Q.Sn)("design:type",ot._)],ht.prototype,"_targetImage",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],ht.prototype,"_itemID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ht.prototype,"_itemType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ht.prototype,"_assetKey",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ht.prototype,"_updateTransformOnLoad",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ht.prototype,"_onItemDataLoaded",void 0),ht=Y=(0,Q.Cg)([(0,X.EVk)("ImageItemDataLoader",rt.Y.data)],ht)},79979:(q,K,z)=>{"use strict";z.d(K,{Y:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(92150);let J=class extends Q.y4o{constructor(){super(...arguments),this._image=null,this._atlas="",this._frame="",this._uniformScale=1}create(){super.create(),this._group=X.q.instance.prodigy.create.group(void 0,"ImagePlaceholder",!1),this.setRootContainer(this._group),this._atlas&&(this._image=new Z._(X.q.instance.game,0,0,this._atlas,this._frame),this._image.scale.set(this._uniformScale,this._uniformScale),this._group.addChild(this._image))}changeImage(q,K,z){var Y;null===(Y=this._image)||void 0===Y||Y.destroy(),this._image=new Z._(X.q.instance.game,0,0,void 0,void 0,q);const J=!!Q.Aq$.isDefined(z)&&z,tt=Q.Aq$.isDefined(K)?K:1;this._image.scale.set(J?-tt:tt,tt),this._group.addChild(this._image)}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"_atlas",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"_frame",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_uniformScale",void 0),J=(0,Y.Cg)([(0,Q.EVk)("ImagePlaceholder")],J)},38181:(q,K,z)=>{"use strict";z.d(K,{S:()=>nt});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(35120),J=z(60881),tt=z(11472),et=z(43846),it=z(7259),st=z(28152);let nt=class extends Q.y4o{constructor(){super(...arguments),this._id="",this._placeholder="",this._tabindex=0,this._showPasswordByDefault=!1,this._newPassword=!1,this._clearable=!1,this._backgroundColor=null,this._borderRadius=null,this._fontFamily=null,this._showInputPromptOnAndroid=!0,this._enablePerKeyEvents=!1,this._input=document.createElement("input"),this._eye=document.createElement("i"),this._check=document.createElement("check"),this._eyeEnabled=!1,this._checkEnabled=!1,this._clearContainer=null,this._clearIcon=document.createElement("i"),this._clearText=document.createElement("div"),this._canvas=null,this._style={},this.onTextChanged=new Q.HN0,this.onFocusChanged=new Q.HN0,this.onBlur=new Q.HN0,this._onTogglePasswordShowHide=new Q.HN0,this.onClear=new Q.HN0,this._clearContainerVisible=!1,this._showPrompt=!1,this._previousTextValue=""}get id(){return this._id?this._id:null}get text(){return this._input?this._input.value:null}set text(q){this._input&&(this._previousTextValue=this._input.value,this._input.value=q,this._previousTextValue!==q&&this._onTextChangedHandler(null))}get htmlInputElement(){return this._input}get onTogglePasswordShowHide(){return this._onTogglePasswordShowHide}create(){super.create();const q=new X.Container;q.on("destroyed",this.destroy,this),this.setRootContainer(q),this._input.value="",this._input.id=this._id,this._input.className="game-input",this._input.autocapitalize="off",this._input.autocomplete="off",this._input.tabIndex=this._tabindex,this._input.placeholder=Q.Aq$.isDefined(this._placeholder)?Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(this._placeholder):"",this._type&&(this._input.type=this._type),Q.Aq$.isDefined(this._backgroundColor)&&(this._input.style.backgroundColor=`#${this._backgroundColor}`),Q.Aq$.isDefined(this._borderRadius)&&(this._input.style.borderRadius=`${this._borderRadius}px`),Q.Aq$.isDefined(this._fontFamily)&&(this._input.style.fontFamily=this._fontFamily);document.getElementById("external-ui").appendChild(this._input);"password"===this._type&&this._clearable&&Q.VyI.log("This input field is set as both a password field and as clearable. Due to padding issues, the clear button will not be displayed.",Q.$bb.Warning),"password"===this._type?(this.createEye(),this._showPasswordByDefault&&this._onEyeClicked()):this._clearable&&this.createClear(),Q.o5U.isAndroid()&&(this._showPrompt=this._showInputPromptOnAndroid),this.applyTransform(),this.addListeners(),this.enablePerKeyEvents(this._enablePerKeyEvents)}createEye(){if(!this._eyeEnabled){this._eyeEnabled=!0,this._showPasswordByDefault?this._eye.className="fa fa-eye":this._eye.className="fa fa-eye-slash",this._eye.id=`${this._id}eye`,this._eye.style.position="absolute",this._eye.style.left="0px",this._eye.style.top="0px",this._eye.style.fontSize="25px",this._eye.style.color="#363636";document.getElementById("external-ui").appendChild(this._eye);this._onEyeClicked=()=>{this.togglePasswordShowHide(),this._onTogglePasswordShowHide.dispatch()},this._eye.addEventListener("click",this._onEyeClicked)}}createCheck(){if(!this._checkEnabled){this._checkEnabled=!0,this._check.className="fa fa-check-circle",this._check.id=`${this._id}check`,this._check.style.position="absolute",this._check.style.left="0px",this._check.style.top="0px",this._check.style.fontSize="25px",this._check.style.color="#A5C754";document.getElementById("external-ui").appendChild(this._check)}}setDisabled(q){this._input.disabled=q,this._input.style.backgroundColor=q?"#F0F0F0":"#FFFFFF"}setInError(q){if(this._input.style.backgroundColor=q?"#FEC4C4":"#FFFFFF",this._input.style.border=q?"1px solid #E03E3E":"1px solid #363636",this._input.style.outline=q?"none":"",this._checkEnabled){const q=document.getElementById(`${this._id}check`);Q.Aq$.isDefined(q)&&q.remove(),this._checkEnabled=!1}}setValid(q){this._input.style.backgroundColor=q?"#F2F7E8":"#FFFFFF",this._input.style.border=q?"1px solid #6B9F27":"1px solid #363636",this._input.style.outline=q?"none":"",this.createCheck()}setClearContainerVisibility(q){this._clearContainer&&(this._clearContainerVisible=q,this._clearContainer.style.display=this._clearContainerVisible?"flex":"none")}createClear(){this._clearContainer=document.createElement("div"),this._clearContainer.appendChild(this._clearIcon),this._clearContainer.appendChild(this._clearText),this._clearIcon.className="fa fa-times",this._clearText.innerText=(0,et.k)("INPUT_CLEAR"),Q.Aq$.isDefined(this._fontFamily)&&(this._clearText.style.fontFamily=this._fontFamily),this._clearContainer.id=`${this._id}clear`,this._clearContainer.style.display="none",this._clearContainer.style.position="absolute",this._clearContainer.style.left="0px",this._clearContainer.style.top="0px",this._clearContainer.style.fontSize="25px",this._clearContainer.style.color="#363636",this._clearContainer.style.cursor="pointer",this.setClearContainerVisibility(!1);document.getElementById("external-ui").appendChild(this._clearContainer);this._onClearClicked=()=>{this.text="",this.setClearContainerVisibility(!1),this.onClear.dispatch()},this._clearContainer.addEventListener("click",this._onClearClicked)}togglePasswordShowHide(){this._eyeEnabled&&("password"===this._type?(this.setType("text"),this._eye.className="fa fa-eye"):(this.setType("password"),this._eye.className="fa fa-eye-slash"))}addListeners(){this._onTextChangedHandler=q=>{this.setClearContainerVisibility(""!==this.text),this.onTextChanged.dispatch(this.text)},this._onFocusHandler=q=>{if(this._showPrompt)return q.preventDefault(),q.stopImmediatePropagation(),void this._input.blur();this.handleFocusChanged(!0),this.onFocusChanged.dispatch()},this._onBlurHandler=q=>{if(this._showPrompt)return q.preventDefault(),void q.stopImmediatePropagation();this.handleFocusChanged(!1),this.onBlur.dispatch()},this._onClickHandler=q=>(0,Y.sH)(this,void 0,void 0,(function*(){this._input.blur();const q=yield it.y.showPrompt(this._placeholder,this.text);Q.Aq$.isDefined(q)&&(this.text=q,this.setClearContainerVisibility(""!==this.text),this.onTextChanged.dispatch(this.text))})),this._showPrompt&&this._input.addEventListener("click",this._onClickHandler),this._input.addEventListener("focus",this._onFocusHandler),this._input.addEventListener("blur",this._onBlurHandler),this.gameObject.onActiveInHierarchyChanged.add((()=>{this.setVisible(this.gameObject.activeInHierarchy)}),this)}getPositionRelativeToParent(q){const K=q,z={x:0,y:0};return K.transform instanceof Q.XVE?(z.x=K.transform.worldMatrix.tx-K.transform.sizeDelta.width*K.transform.pivot.x,z.y=K.transform.worldMatrix.ty-K.transform.sizeDelta.height*K.transform.pivot.y):K.legacyTransform?(z.x+=K.legacyTransform.group.worldTransform.tx,z.y+=K.legacyTransform.group.worldTransform.ty):Q.VyI.log("The GameObject needs to have a RectTransform or LegacyTransform attached to it in order to size the input field appropriately.",Q.$bb.Error),z}applyTransform(){let q,K;this.GameObject.transform instanceof Q.XVE?(q=this.GameObject.transform.sizeDelta.width,K=this.GameObject.transform.sizeDelta.height):this.GameObject.legacyTransform?(q=this.GameObject.legacyTransform.width,K=this.GameObject.legacyTransform.height):Q.VyI.log("The GameObject needs to have a RectTransform or LegacyTransform attached to it in order to size the input field appropriately.",Q.$bb.Error);const{x:z,y:Y}=this.getPositionRelativeToParent(this.GameObject);this._canvas||(this._canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0]);const X=this._canvas.clientHeight/Z.q.instance.game.world.height;this._input.style.height=X*K+"px";const J=this._canvas.clientWidth/Z.q.instance.game.world.width;this._input.style.width=J*q+"px";const et=X*Y+(this._input.style.marginTop?parseInt(this._input.style.marginTop):0),it=J*z+(this._input.style.marginLeft?parseInt(this._input.style.marginLeft):0),st=X*K*.5;this.setStyle("top",`${et}px`),this.setStyle("left",`${it}px`),this.setStyle("font-size",`${st}px`);const nt=this.GameObject.findComponentInParent(tt.B),at=null==nt?void 0:nt.getCollisionBox();let rt=!1;if(at&&(Yat.worldTransform.ty+at.height||zat.worldTransform.tx+at.width?(this.setStyle("display","none"),rt=!0):this.setStyle("display","unset")),this._eyeEnabled&&(this._eye.style.top=`${et+.2*parseInt(this._input.style.height)}px`,this._eye.style.left=(this._checkEnabled?it-35:it)+.95*parseInt(this._input.style.width)-st+"px",this._eye.style.fontSize=`${st}px`,this.setStyle("padding-right",`${st+5+.05*parseInt(this._input.style.width)}px`)),this._checkEnabled&&(this._check.style.top=`${et+.2*parseInt(this._input.style.height)}px`,this._check.style.left=it+.95*parseInt(this._input.style.width)-st+"px",this._check.style.fontSize=`${st}px`,this.setStyle("padding-right",`${st+5+.05*parseInt(this._input.style.width)}px`)),this._clearContainer){this._clearContainer.style.display=this._clearContainerVisible&&!rt?"flex":"none",this._clearContainer.style.top=`${et+.25*parseInt(this._input.style.height)}px`,this._clearContainer.style.fontSize=.7*st+"px";const q=this._clearContainer.clientWidth+4;this._clearContainer.style.left=it+parseInt(this._input.style.width)-q+"px",this._clearIcon.style.paddingTop=.09*parseInt(this._input.style.height)+"px",this._clearIcon.style.paddingRight=.015*parseInt(this._input.style.width)+"px",this.setStyle("padding-right",`${q}px`)}if(Q.Aq$.isDefined(this._style))for(const Q in this._style)this._style.hasOwnProperty(Q)&&this.setStyle(Q,this._style[Q])}setVisible(q){q?(this._input.type=this._type,""!==this.text&&this.setClearContainerVisibility(q)):(this._input.type="hidden",this.setClearContainerVisibility(q))}setOpacity(q){this.setStyle("opacity",q),this._eyeEnabled&&(this._eye.style.opacity=q),this._checkEnabled&&(this._check.style.opacity=q),this._clearContainer&&(this._clearContainer.style.opacity=q)}setStyle(q,K){this._input.style.setProperty(q,K)}setType(q){Q.Aq$.isDefined(q)&&(this._type=q,this._input.type=this._type)}getType(){return this._type}setTypeToPassword(){"password"!==this._type&&"text"!==this._type&&(this._type="password",this._input.type=this._type,this.createEye(),this._showPasswordByDefault&&this._onEyeClicked())}enablePerKeyEvents(q){q?this._input.addEventListener("keyup",this._onTextChangedHandler):this._input.removeEventListener("keyup",this._onTextChangedHandler)}handleFocusChanged(q){q?Z.q.instance.game.input.keyboard.clearCaptures():Z.q.instance.game.input.keyboard.addKeyCapture([J.D.BACKSPACE])}removeExisting(){var q;const K=document.getElementById(this._id);if(Q.Aq$.isDefined(K)&&!this._newPassword&&K.remove(),this._eyeEnabled){const q=document.getElementById(`${this._id}eye`);Q.Aq$.isDefined(q)&&q.remove()}if(this._checkEnabled){const q=document.getElementById(`${this._id}check`);Q.Aq$.isDefined(q)&&q.remove()}null===(q=this._clearContainer)||void 0===q||q.remove()}getDimensions(){return this.GameObject.transform instanceof Q.XVE?new Q.or0(this.GameObject.transform.sizeDelta.width,this.GameObject.transform.sizeDelta.height):this.GameObject.legacyTransform?new Q.or0(this.GameObject.legacyTransform.width,this.GameObject.legacyTransform.height):new Q.or0(100,100)}update(){super.update(),this.applyTransform()}destroy(){var q;super.destroy(),this.onTextChanged.dispose(),this.onFocusChanged.dispose(),this.onBlur.dispose(),this._onTogglePasswordShowHide.dispose(),this.onClear.dispose(),this._input.removeEventListener("keyup",this._onTextChangedHandler),this._input.removeEventListener("click",this._onClickHandler),this._input.removeEventListener("focus",this._onFocusHandler),this._input.removeEventListener("blur",this._onBlurHandler),null===(q=this.gameObject)||void 0===q||q.onActiveInHierarchyChanged.removeAll(this),this._onTextChangedHandler=null,this._onClickHandler=null,this._onFocusHandler=null,this._onBlurHandler=null,this._eyeEnabled&&(this._onEyeClicked=null,this._eye.removeEventListener("click",this._onEyeClicked)),this._clearContainer&&(this._onClearClicked=null,this._clearContainer.removeEventListener("click",this._onClearClicked)),this.removeExisting()}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],nt.prototype,"_type",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.Lr6)(0),(0,Q.nKb)("name"),(0,Y.Sn)("design:type",String)],nt.prototype,"_id",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],nt.prototype,"_placeholder",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_tabindex",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],nt.prototype,"_showPasswordByDefault",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],nt.prototype,"_newPassword",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],nt.prototype,"_clearable",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],nt.prototype,"_backgroundColor",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],nt.prototype,"_borderRadius",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],nt.prototype,"_fontFamily",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],nt.prototype,"_showInputPromptOnAndroid",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],nt.prototype,"_enablePerKeyEvents",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],nt.prototype,"onTextChanged",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],nt.prototype,"onFocusChanged",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],nt.prototype,"onClear",void 0),nt=(0,Y.Cg)([(0,Q.EVk)("InputText",st.Y.uiInput)],nt)},63746:(q,K,z)=>{"use strict";z.d(K,{Z:()=>ct});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(17446),J=z(35120),tt=z(77938),et=z(24110),it=z(53661),st=z(30226),nt=z(28152),at=z(35084),rt=z(52156),ot=z(72799);const ht=["eyeColor","hairColor","skinColor"];let ct=class extends Q.uAl{constructor(){super(...arguments),this._rarityBackgrounds=[],this._rarityCounters=[],this.initializeOnPostCreate=!0,this._onClickReference=void 0}get itemCardData(){return this._itemCardData}get itemData(){return this._itemData}postCreate(){super.postCreate(),this.initializeOnPostCreate&&this.initializeItemCard(this.getInjectedValue(it.Tl.Data),this.getInjectedValue(it.Tl.OnClick))}destroy(){this._onClickReference&&(this._inputOverlay.onClicked.remove(this._onClickReference,this),this._onClickReference=void 0),super.destroy()}initializeItemCard(q,K){this.resetItemCard(),this._itemCardData=q,q?tt.t.secureGetItem(q.type,q.id).then((z=>{var Y,tt,et;if(!this.GameObject.isDestroyed&&(null===(Y=this._itemCardData)||void 0===Y?void 0:Y.id)===(null==q?void 0:q.id)&&(null===(tt=this._itemCardData)||void 0===tt?void 0:tt.type)===(null==q?void 0:q.type)&&z.data){if(this._itemData=z.data,this._rarityBackgrounds[null!==(et=this._itemData.rarity)&&void 0!==et?et:0].active=!0,this._itemNameText.text=st.J.getItemName(z),this._itemData.rarity===Z.E.Rare||this._itemData.rarity===Z.E.Heroic?this._itemNameText.fill=X.Color.shared.setValue(16777215).toHex():this._itemNameText.fill=X.Color.shared.setValue(3552822).toHex(),this._equippedIcon.active=this._currentPlayer.player.equipment.hasItemEquipped(q.type,q.id),this._memberIcon.active=!!this._itemData.member,this.handleRarityCounters(),"costume"===q.type)this._playerContainer.active=!0,this._imageItemDataLoader.GameObject.active=!1,this._renderPlayerAsTextureComponent.renderPlayerAsTexture(Object.assign(Object.assign({},this._currentPlayer.getAppearance()),{costume:q.id}));else if(ht.includes(q.type)){this._playerContainer.active=!1,this._imageItemDataLoader.GameObject.active=!1;J.q.instance.prodigy.icon.createFromData(z).setParent(this._itemImageSortingAnchor.getRootContainer())}else this._imageItemDataLoader.removeItemEffects(),this._imageItemDataLoader.setAsset(q.id,q.type).catch(Q.RQr.createHandler("ItemCardComponent: Failed to load the icon for the item card")),this._playerContainer.active=!1,this._imageItemDataLoader.GameObject.active=!0;this._onClickReference=null!=K?K:void 0,this._onClickReference&&this._inputOverlay.onClicked.add(this._onClickReference,this),this._inputOverlay.useHandCursor=!!K}})).catch((()=>{this.setCardState(!0)})):this.setCardState(!0)}resetItemCard(){this.setCardState(!1),this._rarityBackgrounds.forEach((q=>{q.active=!1})),this._equippedIcon.active=!1,this._memberIcon.active=!1,this._onClickReference&&(this._inputOverlay.onClicked.remove(this._onClickReference,this),this._onClickReference=void 0)}handleRarityCounters(){var q,K,z;if(!Q.Aq$.isDefined(this._itemCardData.N)||1===this._itemCardData.N)return void(this._rarityCounters[null!==(q=this._itemData.rarity)&&void 0!==q?q:0].active=!1);this._rarityCounters[null!==(K=this._itemData.rarity)&&void 0!==K?K:0].active=!0;const Y=this._rarityCounters[null!==(z=this._itemData.rarity)&&void 0!==z?z:0].findComponentInChildren(Q.EYj);this._itemCardData.receivedThroughGotItemFlow&&(Y.fontSize=24,Y.font=Q.dBt.PaytoneOne),Y.text=`${this._itemCardData.receivedThroughGotItemFlow?"x":""}${this._itemCardData.N}${this._itemCardData.max?`/${this._itemCardData.max}`:""}`}setCardState(q){this._nonEmptyState.active=!q,this._emptyState.active=q}setNewNotificationBadgeVisibility(q){this._newNotificationBadge.active=q}setEquippedIconVisibility(q){this._equippedIcon.active=q}};(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",Function)],ct.prototype,"_currentPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(rt.X),(0,Y.Sn)("design:type",rt.X)],ct.prototype,"_imageItemDataLoader",void 0),(0,Y.Cg)([(0,Q.MnK)(et.B),(0,Y.Sn)("design:type",et.B)],ct.prototype,"_itemImageSortingAnchor",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ct.prototype,"_itemNameText",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],ct.prototype,"_rarityBackgrounds",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],ct.prototype,"_rarityCounters",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_memberIcon",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_equippedIcon",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"revealOverlay",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_nonEmptyState",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_emptyState",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_playerContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.M),(0,Y.Sn)("design:type",ot.M)],ct.prototype,"_renderPlayerAsTextureComponent",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_newNotificationBadge",void 0),(0,Y.Cg)([(0,Q.MnK)(at.n),(0,Y.Sn)("design:type",at.n)],ct.prototype,"_inputOverlay",void 0),ct=(0,Y.Cg)([(0,Q.EVk)("Item Card",nt.Y.ui)],ct)},85540:(q,K,z)=>{"use strict";z.d(K,{r:()=>et,w:()=>tt});var Y=z(58776),Q=z(15821),X=z(35120),Z=z(64868),J=z(10711);function tt(q){var K,z;const Y=q.item;if(Q.A.isDefined(q.dynamicStoreData)&&Z._.isFeatureEnabled()){return et(q)===(null!==(z=null===(K=q.dynamicStoreData)||void 0===K?void 0:K.itemQuantity)&&void 0!==z?z:1)}const J=X.q.instance.game.rootContainer.get("ad2-c5b2");return!(!J||!Y)&&J.player.isItemOwned({type:Y.type,ID:Y.ID})}function et(q){var K,z,Q,X;const Z=null!==(z=null===(K=q.dynamicStoreData)||void 0===K?void 0:K.offers)&&void 0!==z?z:[];let tt=0;if(Z.length>1)Z.forEach((q=>{q.progress.status===Y.t.COMPLETE&&tt++}));else{const q=Z[0].progress,K=(0,J.Nx)(Z[0]);tt=q.status===Y.t.COMPLETE?K:null!==(X=null===(Q=q.data)||void 0===Q?void 0:Q.timesCompleted)&&void 0!==X?X:0}return tt}},14801:(q,K,z)=>{"use strict";z.d(K,{m:()=>Bt});var Y,Q=z(8674),X=z(62459),Z=z(36648),J=z(56942),tt=z(12049),et=z(17446),it=z(66582),st=z(35120),nt=z(1195),at=z(77938),rt=z(66207),ot=z(73797),ht=z(65050),ct=z(41674),dt=z(67665),lt=z(15485),ut=z(46784),ft=z(24110),bt=z(19633),pt=z(64353),vt=z(95057),gt=z(25317),mt=z(21097),yt=z(21418),_t=z(98252),Et=z(44094),wt=z(30226),Tt=z(47255),St=z(99737),At=z(41538),Ct=z(75777),Ot=z(28152),It=z(13693),Dt=z(52156),Rt=z(29834),Pt=z(51972);!function(q){q[q.BuyButtonIndex=0]="BuyButtonIndex",q[q.MemberBuyButtonIndex=1]="MemberBuyButtonIndex",q[q.WearButtonIndex=2]="WearButtonIndex",q[q.LockedWearButtonIndex=3]="LockedWearButtonIndex",q[q.MemberWearButtonIndex=4]="MemberWearButtonIndex",q[q.RemoveButtonIndex=5]="RemoveButtonIndex",q[q.HideButtonIndex=6]="HideButtonIndex",q[q.ShowButtonIndex=7]="ShowButtonIndex",q[q.UseButtonIndex=8]="UseButtonIndex",q[q.RideButtonIndex=9]="RideButtonIndex",q[q.EquipButtonIndex=10]="EquipButtonIndex",q[q.UpsellButtonIndex=11]="UpsellButtonIndex",q[q.TreasurePointsButtonIndex=12]="TreasurePointsButtonIndex",q[q.LockedEquipButtonIndex=13]="LockedEquipButtonIndex",q[q.MemberEquipButtonIndex=14]="MemberEquipButtonIndex"}(Y||(Y={}));const Mt=["hat","outfit","boots","weapon","mount","spellRelic","costume"],Nt=["hair","hairColor","face","skinColor","eyeColor"],xt=1.55,Lt={pet:1,dorm:1.25,mathTownFrame:.75,mathTownInterior:.75,mathTownDecor:.75,hair:xt,hairColor:xt,face:xt,skinColor:xt,eyeColor:xt,follow:xt,item:xt,currency:xt,spellRelic:xt,weapon:xt,hat:xt,outfit:xt,boots:xt,mount:1,costume:xt};var kt;!function(q){q.WEAR="ITEM_BUTTON_WEAR",q.REMOVE="ITEM_BUTTON_REMOVE",q.RIDE="ITEM_BUTTON_RIDE",q.BUY="ITEM_BUTTON_BUY"}(kt||(kt={}));let Bt=class extends X.uAl{constructor(){super(),this._rarityBanners=[],this._oneLineItemNameRarityBanners=[],this._twoLineItemNameRarityBanners=[],this._stratifiedMemberTierLabelTexts=[],this._buttons=[],this._owned=!1}setup(q,K=yt.s.View,z,Y){let Q,Z;this.hideElements(),this._mode=K,this._gearBattleStats=this._currentPlayer.player.getGearBattleStats(),this._closeCallback=z,q instanceof tt.J?(Q=q.getType(),Z=q.getID(),this._cost=q.getCost()[0]):this.isBattlePassReward(q)?(Q=q.itemDrop.type,Z=q.itemDrop.ID,this._locked=q.claimable):(Q=q.type,Z=q.ID,X.Aq$.isDefined(q.L)&&(this._locked=1===q.L)),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ut.B.ItemInfo,interfaceType:ct.Wm.InfoPanel,instanceType:ht.N.Interface,originType:ct.$N.ButtonClick,originID:Y}),at.t.secureGetItem(Q,Z).then((z=>{var Y,tt;if(z){if(this._itemData=z,this._itemType=Q,this._itemId=Z,this._owned=this._currentPlayer.player.backpack.hasItem(Q,Z)>0,!this._itemData.data)return X.VyI.log(`ItemDetailsModalComponent: Item data is missing for item type ${Q} and item id ${Z}, closing the modal`,X.$bb.Error),void this.GameObject.destroyDeferred();if(!this._owned){const q=st.q.instance.prodigy.gameContainer.get("6d6-463e");this._owned=q.getCount({type:Q,id:Z})>0}if(X.Aq$.isDefined(this._locked)||(this._locked=1===this._itemData.data.member),this._itemDescription.text=this._localizer.getText(wt.J.getLocalizationFlavorKey(this._itemData)),this._previewContainer.transform.setScale(null!==(Y=Lt[this._itemType])&&void 0!==Y?Y:1),this._memberIcon.active=1===this._itemData.data.member,this._rarity=this._itemData.data.rarity,this.isBattlePassReward(q)&&q.membershipTier===it._$.MemberUltra&&(this._rarity=5),this.setupRarity(),this.setupOptionalProperties(K),"follow"===this._itemType?this.setupFollowItem():Mt.includes(this._itemType)?this.setupWearableEquipmentItem(K):Nt.includes(this._itemType)?this.setupAppearanceItem():"pet"===this._itemType?(this._spine.OnLoaded.addOnce((()=>{this._spineAnimator.playAnimation("idle",!0)}),this),this._spine.setAsset(J.Q[`Spine_pet_${this._itemId}_json`])):(null===(tt=this._itemData.data.effect)||void 0===tt?void 0:tt.transform)?this.setupMorphMarbleItem():this.setupIcon(),K===yt.s.Buy){for(const q of this._buttons)q.GameObject.active=!1;this.setupPurchaseableItem()}else if(K===yt.s.View)for(const q of this._buttons)q.GameObject.active=!1;this.isBattlePassReward(q)&&this.setupBattlePassReward(q)}})).catch(X.RQr.createHandler(`ItemDetailsModalComponent: Failed to load item data for ${Q} ${Z}`))}close(q=!1){this._closeCallback&&this._closeCallback.apply(this,[q]),this.GameObject.destroyDeferred()}hideElements(){this._rarityBanners.forEach((q=>{q.active=!1})),this._oneLineItemNameRarityBanners.forEach((q=>{q.active=!1})),this._twoLineItemNameRarityBanners.forEach((q=>{q.active=!1})),this._itemName.text="",this._itemDescription.text="",this._memberIcon.active=!1,this._gearStat1.GameObject.active=!1,this._gearStat2.GameObject.active=!1,this._spellStat.GameObject.active=!1,this._costContainer.active=!1,this._levelLockContainer.active=!1,this._levelLockText.text="",this._bonusBackground.active=!1,this._buttons.forEach((q=>{q.GameObject.active=!1}))}setupRarity(){var q,K,z;if(this._itemData.data){if(this._itemName.text=wt.J.getItemName(this._itemData),this._rarityBanners.forEach((q=>q.active=!1)),this._oneLineItemNameRarityBanners.forEach((q=>q.active=!1)),this._twoLineItemNameRarityBanners.forEach((q=>q.active=!1)),this._itemName.wordWrap=!1,(null===(q=this._itemName.GameObject)||void 0===q?void 0:q.transform).sizeDelta.width<=300?this._oneLineItemNameRarityBanners[null!==(K=this._rarity)&&void 0!==K?K:et.E.Common].active=!0:(this._twoLineItemNameRarityBanners[null!==(z=this._rarity)&&void 0!==z?z:et.E.Common].active=!0,this._itemName.wordWrap=!0,this._itemName.updateText()),X.Aq$.isDefined(this._rarity)){this._rarityBanners[this._rarity].active=!0}this._rarity===et.E.Rare||this._rarity===et.E.Heroic?this._itemName.fill="#ffffff":this._itemName.fill="#363636"}}addCharacter(q=!1,K=!1,z=!1){this._characterPreview.addCharacter(this._currentPlayer.player,this._characterPreviewSortingAnchor.getRootContainer()),this._characterPreview.setInputEnabled(!1),q&&this._characterPreview.setEquipment("mount",null),K&&this._characterPreview.setEquipment("hat",null),z&&this._characterPreview.setEquipment("costume",null)}setupOptionalProperties(q){var K,z,Y;if(!this._itemData)return;if(q===yt.s.Buy){this._costContainer.active=!0;let q="[mail-gold] ";const K=wt.J.getPurchasePrice(this._itemData.data,this._cost);"currency"===this._cost.getType()&&1===this._cost.getID()||(q=`[${at.t.getItem(this._cost.getType(),this._cost.getID()).data.icon}] `),st.q.instance.prodigy.create.font(this._currencyIconSortingAnchor.getRootContainer(),0,0,q);const z=this._costContainer.findComponentInChildren(X.EYj);z&&(z.text=`${K}`)}const Q=this._itemData.data.spellID;if(X.Aq$.isDefined(Q)){const q=at.t.getItem("spellV2",Q);if(q){const Q=null===(Y=null===(z=null===(K=null==q?void 0:q.metadata)||void 0===K?void 0:K.assets)||void 0===z?void 0:z.icon)||void 0===Y?void 0:Y.assetKey,X=Z.q[Et.$.capitalizeFirstLetter(Q)];this._spellStat.setSpellStatData({name:q.data.name,iconGuid:X,element:q.data.element}),this._spellStat.GameObject.active=!0}}if(X.Aq$.isDefined(this._itemData.data.stats)&&"pet"!==this._itemType&&"spellRelic"!==this._itemType){const q={};for(const Y in this._itemData.data.stats)this._itemData.data.stats[Y]>0&&(q[Y]=this._itemData.data.stats[Y]);const K=Object.keys(q)[0],z=Object.keys(q)[1];K&&this.setupGearStatDisplay(K,this._gearStat1),z&&this.setupGearStatDisplay(z,this._gearStat2)}}setupGearStatDisplay(q,K){var z;let Y=0;this._gearBattleStats[this._itemType]&&(Y=null!==(z=this._gearBattleStats[this._itemType][q])&&void 0!==z?z:0),K.setGearStatData(q,this._itemData.data.stats[q],this._itemData.data.stats[q]-Y),K.GameObject.active=!0}activateButton(q,K){this._buttons[q].GameObject.active=!0,this._buttons[q].onClick.add(K,this)}setupWearableEquipmentItem(q){var K,z,Q,Z,J,tt;"spellRelic"===this._itemType?this.setupIcon():(this.addCharacter("mount"!==this._itemType,!1,!mt.Dq.includes(this._itemType)),this._characterPreview.setEquipment(this._itemType,this._itemId)),"costume"===this._itemType&&this._segment.item.sendCostumePreviewedEvent(this._itemId,wt.J.getItemName(this._itemData),null!==(z=1===(null===(K=this._itemData.data)||void 0===K?void 0:K.member))&&void 0!==z&&z,null!==(Q=this._rarity)&&void 0!==Q?Q:et.E.Common);const it=this._currentPlayer.player,nt=it.equipment.hasItemEquipped(this._itemType,this._itemId),at=this._locked&&1===(null===(Z=this._itemData.data)||void 0===Z?void 0:Z.member),rt=it.hasMembership(),ot=!X.Aq$.isDefined(null===(J=this._itemData.data)||void 0===J?void 0:J.lockLevel)||this._currentPlayer.getLevel()>=this._itemData.data.lockLevel,ht=(!at||rt)&&ot,ct=(q=kt.WEAR)=>{const K=`${this._localizer.getText(q)}-button`;this.sendButtonEvent(K),it.equip(this._itemId,this._itemType,!0,K).then((q=>{q&&(it.appearanceChanged=!0,st.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(X.RQr.createHandler(`ItemDetailsModalComponent:setupWearableEquipmentItem Failed to equip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close(!0)}))};nt?this.activateButton(Y.RemoveButtonIndex,(()=>{const q=`${this._localizer.getText(kt.REMOVE)}-button`;this.sendButtonEvent(q),it.unEquip(this._itemId,this._itemType,q).then((q=>{q&&(it.appearanceChanged=!0,st.q.instance.prodigy.audio.playSFX(18,"blop"))})).catch(X.RQr.createHandler(`ItemDetailsModalComponent:setupWearableEquipmentItem Failed to unequip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close()}))})):q===yt.s.WizardCostumesMenu&&"costume"===this._itemType?at&&!rt?this.activateButton(Y.MemberWearButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(kt.WEAR)}-button`,ut.B.MembershipParentAd),this.memberLockedEquipFlow()})):this.activateButton(Y.WearButtonIndex,(()=>ct(kt.WEAR))):this._owned&&"mount"===this._itemType?this.activateButton(Y.RideButtonIndex,(()=>ct(kt.RIDE))):this._owned&&ht?this.activateButton("weapon"===this._itemType?Y.EquipButtonIndex:Y.WearButtonIndex,(()=>ct())):this._owned&&!ot?(this._levelLockText.text=`Level ${null===(tt=this._itemData.data)||void 0===tt?void 0:tt.lockLevel}`,this._levelLockContainer.active=!0,this.activateButton("weapon"===this._itemType?Y.LockedEquipButtonIndex:Y.LockedWearButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(kt.WEAR)}-button`),this.levelLockedEquipFlow()}))):this._owned&&at&&!rt&&this.activateButton("weapon"===this._itemType?Y.MemberEquipButtonIndex:Y.MemberWearButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(kt.WEAR)}-button`,ut.B.MembershipParentAd),this.memberLockedEquipFlow()}))}setupAppearanceItem(){this.addCharacter(!0,"hair"===this._itemType||"hairColor"===this._itemType,!mt.Dq.includes(this._itemType)),this._characterPreview.setAppearance(this._itemType,this._itemId)}setupIcon(){this._imageItemDataLoader.setAsset(this._itemId,this._itemType,"upscaled").catch(X.RQr.createHandler("ItemDetailsModalComponent: Failed to load item icon"))}setupFollowItem(){var q;const K=st.q.instance.prodigy.create.follow(this._spine.getRootContainer(),this._itemId,1,null),z=this._currentPlayer.player,Q=this._locked&&1===(null===(q=this._itemData.data)||void 0===q?void 0:q.member),Z=z.hasMembership();(K instanceof Ct.i||K instanceof St.z||K instanceof At.g)&&K.startLoad();z.equipment.hasItemEquipped(this._itemType,this._itemId)?this.activateButton(Y.RemoveButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(kt.REMOVE)}-button`),z.unEquip(this._itemId,this._itemType).then((q=>{q&&(z.appearanceChanged=!0,st.q.instance.prodigy.audio.playSFX(18,"blop"))})).catch(X.RQr.createHandler(`ItemDetailsModalComponent:setupFollowItem Failed to unequip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close()}))})):this._owned&&Q&&!Z?this.activateButton(Y.MemberEquipButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(kt.WEAR)}-button`,ut.B.MembershipParentAd),this.memberLockedEquipFlow()})):this._owned&&this.activateButton(Y.EquipButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(kt.WEAR)}-button`),z.equip(this._itemId,this._itemType,!0).then((q=>{q&&(z.appearanceChanged=!0,st.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(X.RQr.createHandler(`ItemDetailsModalComponent:setupFollowItem Failed to equip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close()}))}))}setupMorphMarbleItem(){this.addCharacter(!0),this._characterPreview.transformEffect({transform:this._itemData.data.effect.transform,ID:this._itemData.data.effect.ID}),this.activateButton(Y.UseButtonIndex,(()=>{this.sendButtonEvent(lt.k.Use),this.checkTransformation()}))}setupPurchaseableItem(){const q=()=>{this.sendButtonEvent(`${this._localizer.getText(kt.BUY)}-button`),this.close(!0)};this._itemData.data.member?this.activateButton(Y.MemberBuyButtonIndex,q):this.activateButton(Y.BuyButtonIndex,q)}setupBattlePassReward(q){if(q.membershipTier===it._$.MemberUltra&&(this._bonusBackground.active=!0),q.claimed||q.claimable)return;if(this._buttons.some((q=>q.GameObject.active)))return;if(this._currentPlayer.player.membershipUpsell.tier>=q.membershipTier)return;if(!rt.D.isFeatureEnabled())return;this._stratifiedMemberAvailabilityLabel.GameObject.active=!0;let K=0;switch(q.membershipTier){case it._$.MemberUltra:case it._$.MemberUltimateBundle:K=2;break;case it._$.MemberPlus:case it._$.MemberUltimateMath:K=1;break;case it._$.MemberCore:case it._$.MemberLevelUp:}const z=this._stratifiedMemberTierLabelTexts.slice(K,_t.pF.eligibleForMembershipPurchaseForMultipleTiers()?this._stratifiedMemberTierLabelTexts.length:-1).map((q=>this._localizer.getText(q))),Q=z.length;1===Q?this._stratifiedMemberAvailabilityLabel.text=`${z[0]} ${this._localizer.getText("ITEM_DETAILS_MEMBERSHIP_ONLY")}`:2===Q?this._stratifiedMemberAvailabilityLabel.text=`${z[0]} & ${z[1]}`:Q>2?this._stratifiedMemberAvailabilityLabel.text=`${z.slice(0,-1).join(", ")} & ${z[Q-1]}`:X.VyI.log("No tiers to show for this item membership requirement",X.$bb.Error),this.activateButton(Y.UpsellButtonIndex,(()=>{st.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:"Click-Item-Treasure-Track"})||st.q.instance.prodigy.open.battlePassUltimateMemberUpsellModal().catch(X.RQr.createHandler("ItemDetailsModalComponent: Failed to open battle pass ultimate member upsell modal"))}))}memberLockedEquipFlow(){const q=pt.P.shouldUseUnifiedConversionFlow(Tt.o.FunnelUseMemberLockedItem)?vt.R.UnifiedConversionFlow:wt.J.showYouTubeMembershipAd(st.q.instance.game,!0)?vt.R.Video:vt.R.Static,K={conversionFunnelName:this._mode===yt.s.WizardCostumesMenu?Tt.o.FunnelEquipMemberLockedCostume:Tt.o.FunnelEquipBackpackLockedItem,conversionFunnelMetadata:`${this._itemType}-${this._itemId}`};this._segment.purchase.sendFunnelStart({type:this._mode===yt.s.WizardCostumesMenu?"Equip-Member-Locked-Costume":"Equip-Member-Locked-Item-Backpack",category:"Item-Equip",contentId:`${this._itemType}-${this._itemId}`,adType:q,adVersion:pt.P.getAdVersion(Tt.o.FunnelUseMemberLockedItem)}),this._segment.item.sendItemEquipFailedEvent({item_name:wt.J.getItemName(this._itemData),item_type:this._itemType,item_id:this._itemId,fail_reason:"Member Locked"}),wt.J.shouldSuppressAd(this._currentPlayer.player)?st.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:820,yPosition:462,arrowXRelPos:.5,arrowDirection:Pt.i.DOWN}):st.q.instance.prodigy.open.membershipInfo(null,K)}levelLockedEquipFlow(){var q,K;const z=pt.P.shouldUseUnifiedConversionFlow(Tt.o.FunnelEquipLevelLockedItem)?vt.R.UnifiedConversionFlow:wt.J.showYouTubeMembershipAd(st.q.instance.game,!0)?vt.R.Video:vt.R.Static,Y=this._localizer.getText("LEVEL_LOCK_EQUIP",null===(q=this._itemData.data)||void 0===q?void 0:q.name,null===(K=this._itemData.data)||void 0===K?void 0:K.lockLevel),Q=st.q.instance.prodigy.open.message(Y),X=`${this._itemType}-${this._itemId}`;Q.onClose=()=>{var q;this._currentPlayer.player.hasMembership()||wt.J.shouldSuppressAd(this._currentPlayer.player)||(this._segment.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Backpack",category:"Item-Equip",contentId:X,adType:z,adVersion:pt.P.getAdVersion(Tt.o.FunnelEquipLevelLockedItem)}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(q=this._itemData.data)||void 0===q?void 0:q.name,item_type:this._itemType,item_id:this._itemId,fail_reason:"Level Locked"}),st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Tt.o.FunnelEquipLevelLockedItem,conversionFunnelMetadata:X}))}}checkTransformation(){var q,K;X.Aq$.isDefined(null===(q=this._itemData.data)||void 0===q?void 0:q.effect)&&X.Aq$.isDefined(null===(K=this._itemData.data.effect)||void 0===K?void 0:K.transform)&&(this._currentPlayer.player.isPlayerTransformed()?st.q.instance.prodigy.open.messageBox(this._localizer.getText("MORPH_START_NEW"),(()=>{this.useTransformation()})):this.useTransformation())}useTransformation(){var q,K,z,Y;const Q=this._currentPlayer.player;null===(q=Q.playerContainer)||void 0===q||q.transformToItem(this._itemData.data.effect.transform,this._itemData.data.effect.ID,!0,null===(z=null===(K=this._itemData.data)||void 0===K?void 0:K.effect)||void 0===z?void 0:z.time),Q.backpack.consume(this._itemType,this._itemId),st.q.instance.game.broadcaster.broadcast(ot.J8.MorphMarbleUsed,void 0,[this._itemData.data]),this.close(!0),this._segment.item.sendItemUsedEvent({item_id:`${this._itemId}`,item_name:null===(Y=this._itemData.data)||void 0===Y?void 0:Y.name,item_type:"morph",item_count:1})}sendButtonEvent(q,K){this._segment.featureCommon.sendButtonEvent(Object.assign({buttonName:q,interfaceName:ut.B.ItemInfo,interfaceType:ct.Wm.InfoPanel,instanceType:ht.N.Interface,saveClickInfo:q},K?{destinationName:K}:{}))}isBattlePassReward(q){return"rewardId"in q&&"string"==typeof q.rewardId&&"itemDrop"in q}};(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Bt.prototype,"_rarityBanners",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Bt.prototype,"_oneLineItemNameRarityBanners",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],Bt.prototype,"_twoLineItemNameRarityBanners",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],Bt.prototype,"_stratifiedMemberTierLabelTexts",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Bt.prototype,"_stratifiedMemberAvailabilityLabel",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bt.prototype,"_previewContainer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Bt.prototype,"_itemName",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Bt.prototype,"_itemDescription",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bt.prototype,"_memberIcon",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bt.prototype,"_bonusBackground",void 0),(0,Q.Cg)([(0,X.MnK)(It.Y),(0,Q.Sn)("design:type",It.Y)],Bt.prototype,"_characterPreview",void 0),(0,Q.Cg)([(0,X.MnK)(ft.B),(0,Q.Sn)("design:type",ft.B)],Bt.prototype,"_characterPreviewSortingAnchor",void 0),(0,Q.Cg)([(0,X.MnK)(X.v2j),(0,Q.Sn)("design:type",X.v2j)],Bt.prototype,"_spine",void 0),(0,Q.Cg)([(0,X.MnK)(Rt.j),(0,Q.Sn)("design:type",Rt.j)],Bt.prototype,"_spineAnimator",void 0),(0,Q.Cg)([(0,X.MnK)(Dt.X),(0,Q.Sn)("design:type",Dt.X)],Bt.prototype,"_imageItemDataLoader",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bt.prototype,"_costContainer",void 0),(0,Q.Cg)([(0,X.MnK)(ft.B),(0,Q.Sn)("design:type",ft.B)],Bt.prototype,"_currencyIconSortingAnchor",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],Bt.prototype,"_levelLockContainer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],Bt.prototype,"_levelLockText",void 0),(0,Q.Cg)([(0,X.MnK)(gt.D),(0,Q.Sn)("design:type",gt.D)],Bt.prototype,"_gearStat1",void 0),(0,Q.Cg)([(0,X.MnK)(gt.D),(0,Q.Sn)("design:type",gt.D)],Bt.prototype,"_gearStat2",void 0),(0,Q.Cg)([(0,X.MnK)(gt.D),(0,Q.Sn)("design:type",gt.D)],Bt.prototype,"_spellStat",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.MnK)(bt.S),(0,Q.Sn)("design:type",Array)],Bt.prototype,"_buttons",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",nt.E)],Bt.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",dt.Y)],Bt.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Bt.prototype,"_localizer",void 0),Bt=(0,Q.Cg)([(0,X.EVk)("ItemDetailsModal",Ot.Y.ui),(0,Q.Sn)("design:paramtypes",[])],Bt)},70704:(q,K,z)=>{"use strict";z.d(K,{J:()=>tt});var Y=z(8674),Q=z(62459),X=z(41935),Z=z(28152),J=z(62430);let tt=class extends Q.uAl{constructor(){super(...arguments),this._petSpineItemDataLoaders=[]}updatePetSpines(q){q.length>this._petSpineItemDataLoaders.length?Q.VyI.log("There are not enough renderers to load all team pet spines.",Q.$bb.Error):q.forEach(((q,K)=>{var z,Y;const Z=q.getID(),J=this._petSpineItemDataLoaders[K];J.setAssetID(Z),null===(Y=null===(z=J.GameObject)||void 0===z?void 0:z.findComponentInChildren(X.o))||void 0===Y||Y.updateGear(q.data.gear).catch(Q.RQr.createHandler)}))}};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(J.N),(0,Y.Sn)("design:type",Array)],tt.prototype,"_petSpineItemDataLoaders",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("LoadPetSpines",Z.Y.animation)],tt)},18280:(q,K,z)=>{"use strict";z.d(K,{n:()=>X});var Y=z(62459),Q=z(35120);class X extends Y.uAl{constructor(){super(...arguments),this.maskGraphic=null,this.origX=0,this.origY=0}create(){super.create(),this.maskGraphic=Q.q.instance.game.add.graphics(0,0,this.GameObject.legacyTransform.group)}destroy(){this.maskGraphic.destroy(),super.destroy()}updateAnchor(q,K){this.maskGraphic.x=this.origX-q,this.maskGraphic.y=this.origY-K}setAnchor(q,K,z,Y){this.maskGraphic.clear(),this.maskGraphic.beginFill(16777215,1),this.maskGraphic.drawRect(-q,-K,z,Y),this.maskGraphic.endFill(),this.origX=this.maskGraphic.x,this.origY=this.maskGraphic.y}getGraphicSource(){return this.maskGraphic}}},72799:(q,K,z)=>{"use strict";z.d(K,{M:()=>tt});var Y=z(8674),Q=z(62459),X=z(83267),Z=z(17002),J=z(571);let tt=class extends Q.uAl{constructor(){super(...arguments),this._runOnCreate=!0,this.onRenderComplete=new Q.HN0,this._displayMount=!0,this._displayWand=!0,this._displayCostume=!0}create(){super.create(),this._mockPlayerDataProvider=X.E.createMockPlayerDataProvider(this._displayMount),this._runOnCreate&&this.renderPlayerAsTexture()}destroy(){this.onRenderComplete.dispose(),super.destroy()}renderPlayerAsTexture(q){if(!this._currentPlayer)return void Q.VyI.log("RenderPlayerAsTextureComponent: Failed to render the player due to the logged in player data provider returning no data",Q.$bb.Error);if(!this._playerGraphic)return void Q.VyI.log("RenderPlayerAsTextureComponent: Failed to render the player due to no player graphic being available",Q.$bb.Warning);const K=null!=q?q:this._currentPlayer.getAppearance(),z=Object.assign(Object.assign({},K),{costume:this._displayCostume?K.costume:void 0,weapon:this._displayWand?K.weapon:void 0});J.z.createFullBodyFromAppearanceData(z,this._mockPlayerDataProvider).then((q=>{const K=this._playerGraphic.GameObject.findComponent(Q.XVE);if(!K)return void Q.VyI.log("RenderPlayerAsTextureComponent: Failed to render the player due to the player graphic missing a RectTransform component",Q.$bb.Error);const z=Z.f.getScaledTextureFromSpriteWithAspectRatio(q,K.sizeDelta.width,K.sizeDelta.height);this._playerGraphic.setTexture(z),this.onRenderComplete.dispatch()})).catch(Q.RQr.createHandler("RenderPlayerAsTextureComponent: Failed to render the player sprite"))}};(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",Function)],tt.prototype,"_currentPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],tt.prototype,"_playerGraphic",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_runOnCreate",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onRenderComplete",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_displayMount",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_displayWand",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_displayCostume",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("RenderPlayerAsTexture",Q.YH6.render)],tt)},35189:(q,K,z)=>{"use strict";z.d(K,{e:()=>tt});var Y=z(8674),Q=z(62459),X=z(76974),Z=z(24519),J=z(28152);let tt=class extends Z.v{constructor(){super(...arguments),this._secondState=!1}set SecondState(q){this._secondState=q,this.refreshState()}get SecondState(){return this._secondState}postCreate(){this._upSecondStateObject&&(this._upSecondStateObject.active=!1),this._downSecondStateObject&&(this._downSecondStateObject.active=!1),this._overSecondStateObject&&(this._overSecondStateObject.active=!1),this._disableSecondStateObject&&(this._disableSecondStateObject.active=!1),super.postCreate()}refreshState(){this.setState(this.currentState)}getStateObject(q){const K=this.SecondState?this.getSecondStateObject(q):super.getStateObject(q);return K&&(this.currentState=q),K}getSecondStateObject(q){switch(q){case X.K.Up:return this._upSecondStateObject;case X.K.Down:return this._downSecondStateObject;case X.K.Over:return this._overSecondStateObject;case X.K.Disabled:return this._disableSecondStateObject;default:return null}}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_upSecondStateObject",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_downSecondStateObject",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_overSecondStateObject",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_disableSecondStateObject",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("SecondStateGameObjectTransition",J.Y.ui)],tt)},25132:(q,K,z)=>{"use strict";z.d(K,{$:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(68152),J=z(28152);let tt=class extends Q.uAl{constructor(){super(...arguments),this._singleImage=null,this._imageID=0}create(){super.create(),(0,Z.v)(!!this.GameObject.legacyTransform,"Gameobject is missing Legacy Transform");const q="number"==typeof this._imageID?`singleImage-${this._imageID.toString()}`:this._imageID;this._singleImage=X.q.instance.prodigy.create.sprite(0,0,q),this.GameObject.legacyTransform.group.addChild(this._singleImage)}};(0,Y.Cg)([(0,Q.g11)(),(0,Q.nKb)("singleImageID"),(0,Y.Sn)("design:type",Number)],tt.prototype,"_imageID",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("SingleImage",J.Y.root)],tt)},29834:(q,K,z)=>{"use strict";z.d(K,{j:()=>it});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(28152),J=z(16495);class tt extends Q.$KW{generate(q,K){const z=this.getAnimationGroup(q),Y=Q.Gme.checkboxGroup({id:"loopAnimation",labelValue:"Loop Animation",inputValue:q.loopAnimation}),X=Q.Gme.numberGroup({id:"startTimeSeconds",labelValue:"Start Time in Seconds",inputValue:q.startTimeSeconds}),Z=Q.NyS.create({id:"onAnimationComplete",label:"On Animation Complete",signalValue:q.onAnimationComplete,componentGUID:this._componentGuid});return Q.XRp.createVertical([z,Y,X,Z])}getAnimationGroup(q){var K;const z=this._editorAPI.getComponent(this._componentGuid),Y=null===(K=null==z?void 0:z.spine)||void 0===K?void 0:K.getAnimationNames();let X;return X=(null==Y?void 0:Y.length)?Q.Gme.dropdownGroup({id:"animation",labelValue:"Animation",selectOptions:q.animation?["None",...Y]:Y,selectValue:q.animation,onChange:q=>{"None"===q&&this._editorAPI.modifyComponent(this._componentGuid,{animation:void 0})}}):Q.Gme.textGroup({id:"animation",labelValue:"Animation",inputValue:q.animation}),X}}var et=z(28402);let it=class extends Q.uAl{constructor(){super(...arguments),this.onAnimationComplete=new Q.HN0,this._initialAnimation=null,this._loopAnimation=!0,this._startTimeSeconds=0,this._paused=!1,this._isLoaded=!1}get spine(){return this._spineComponent}get OnAnimationComplete(){return this.onAnimationComplete}get paused(){return this._paused}set paused(q){this._paused=q,this.spine&&(this.spine.paused=q)}get isLoaded(){return this._isLoaded}create(){if(super.create(),this._spineComponent=this._spineComponent||this.gameObject.findComponent(et.v),this._isLoaded=!1,!this.spine)return Q.VyI.log(`SpineAnimator missing SpineComponent on ${this.toString()}`,Q.$bb.Error),void this.destroy();this.spine.isLoaded?this.onLoaded():this.spine.OnLoaded.addOnce(this.onLoaded,this,0)}onLoaded(){this._isLoaded=!0,this.spine.paused=this._paused,this._initialAnimation&&this.playAnimation(this._initialAnimation,this._loopAnimation)}playAnimation(q,K,z=!1,Y=!1,X=0){if(!this._isLoaded)return this._initialAnimation=q,void(this._loopAnimation=K);const Z=this.spine.getSpine();if(!(null==Z?void 0:Z.destroyed))if(null==Z?void 0:Z.state){if(!this.hasAnimation(q))return void Q.VyI.log(`No animation named ${q} on spine ${Z.name}`,Q.$bb.Warning);const J=Z.state.tracks[0];if(!z&&J&&J.animation.name===q)return;if(Z.onComplete.removeAll(this),Y||(K?Z.onComplete.add((()=>{this.onAnimationComplete.dispatch(q)}),this):Z.onComplete.addOnce((()=>{this.onAnimationComplete.dispatch(q)}),this)),Z.lastTime=Date.now(),X>0){Z.state.setAnimation(0,q,K).mixDuration=X}else Z.setToSetupPose(),this.spine.setAnimationByName(0,q,K);this.seekTo(this._startTimeSeconds),Z.state.apply(Z.skeleton)}else this.spine.OnLoaded.addOnce(this.playAnimation,this,0,q,K,z,Y,X)}playAnimationNumTimes(q,K,z=!1){this.playAnimation(q,!1,z),K>1&&this.onAnimationComplete.addOnce((()=>{this.playAnimationNumTimes(q,K-1,!0)}))}playAnimationSequence(q,...K){return(0,Y.sH)(this,void 0,void 0,(function*(){yield(0,J.ib)(this,K,q)}))}stopAnimation(){var q;if(!this.spine)return void Q.VyI.log(`[SpineAnimator.stopAnimation]: Invalid _spineComponent ${this.toString()}`,Q.$bb.Error);const K=this.spine.getSpine();K&&(null===(q=K.onComplete)||void 0===q||q.removeAll(this),K.setToSetupPose(),K.state.clearTracks())}seekTo(q){var K;if(!this.spine)return void Q.VyI.log(`[SpineAnimator.seekTo]: Invalid _spineComponent ${this.toString()}`,Q.$bb.Error);const z=null===(K=this.spine.getSpine())||void 0===K?void 0:K.state;z?z.tracks[0].trackTime=q:Q.VyI.log(`[SpineAnimator.seekTo]: State is invalid for ${this.toString()}`,Q.$bb.Error)}hasAnimation(q){var K,z,Y,Q;return null===(Y=null===(z=null===(K=this.spine)||void 0===K?void 0:K.getSpine())||void 0===z?void 0:z.state)||void 0===Y?void 0:Y.hasAnimation(null===(Q=this.spine)||void 0===Q?void 0:Q.getRemappedAnimation(q))}applySkin(q){if(!this.spine)return void Q.VyI.log(`[SpineAnimator.applySkin] Invalid _spineComponent ${this.toString()}`,Q.$bb.Error);const K=this.spine.getSpine(),z=K.skeleton.data.findSkin(q);K.setSkin(z);const Y=K.skeleton.slots;for(let X=0;X{"use strict";z.d(K,{v:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.v2j{setAsset(q,K){{const z=X.q.instance.prodigy.assets.getAsset(q);(null==z?void 0:z.guidMapping)?super.setAsset(z.guidMapping,K,this.loadAsset.bind(this)):super.setAsset(q,K,this.loadAsset.bind(this))}}loadAsset(q,K){X.q.instance.prodigy&&X.q.instance.prodigy.load.assets([q],(()=>{super.setAsset(q,K)}))}getEventNames(){var q,K,z,Y,Q;return null!==(Q=null===(Y=null===(z=null===(K=null===(q=this.getSpine())||void 0===q?void 0:q.skeleton)||void 0===K?void 0:K.data)||void 0===z?void 0:z.events)||void 0===Y?void 0:Y.map((q=>q.name)))&&void 0!==Q?Q:[]}getAnimationNames(){var q,K,z,Y,Q;return null!==(Q=null===(Y=null===(z=null===(K=null===(q=this.getSpine())||void 0===q?void 0:q.skeleton)||void 0===K?void 0:K.data)||void 0===z?void 0:z.animations)||void 0===Y?void 0:Y.map((q=>q.name)))&&void 0!==Q?Q:[]}waitForEvent(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this.getEventNames();if(-1===K.indexOf(q))return void Q.VyI.log(`No event named ${q} found in spine, available events: ${K.join(", ")}`,Q.$bb.Warning);let z=null;yield new Promise((K=>{z=this.getSpine().onEvent.add(((z,Y)=>{Y.data.name===q&&K()}),this).listener})).then((()=>{this.getSpine().onEvent.remove(z,this)}))}))}};J=(0,Y.Cg)([(0,Q.EVk)("Spine",Z.Y.animation)],J)},62430:(q,K,z)=>{"use strict";z.d(K,{N:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(56942),J=z(77938),tt=z(68152),et=z(28152),it=z(28402);let st=Y=class extends X.uAl{constructor(){super(...arguments),this._targetSpine=null,this._itemID=null,this._itemType=null,this._assetKey=null,this._onSpineItemLoaded=new X.HN0}get onSpineItemLoaded(){return this._onSpineItemLoaded}get isLoaded(){var q,K;return null!==(K=null===(q=this._targetSpine)||void 0===q?void 0:q.isLoaded)&&void 0!==K&&K}get assetID(){return this._itemID}create(){super.create(),this._targetSpine&&null!==this._itemType&&null!==this._itemID&&null!==this._assetKey&&this.updateTargetSpine()}destroy(){this._targetSpine=null,this._onSpineItemLoaded.dispose(),super.destroy()}setAssetID(q){this._itemID=q,this.updateTargetSpine()}updateTargetSpine(){var q;const K=J.t.getItem(this._itemType,this._itemID);(0,tt.v)(null!==K,`Item was not found for ${this._itemType}-${this._itemID}`);const z=null===(q=K.metadata.assets)||void 0===q?void 0:q[this._assetKey],Q=this._targetSpine.GameObject.transform;if((null==z?void 0:z.defaultScale)&&(Q.localScale.x=z.defaultScale,Q.localScale.y=z.defaultScale),null==z?void 0:z.flip){const q=Q.localScale;Q.setScale(-1*q.x,q.y)}const X=Y.createSpineAssetSourceName(K,this._itemType,this._itemID,this._assetKey);this._targetSpine.OnLoaded.addOnce((()=>{this._onSpineItemLoaded.dispatch()})),this._targetSpine.setAsset(X)}static createSpineAssetSourceName(q,K,z,Y="default"){var Q;const J=null===(Q=q.metadata.assets)||void 0===Q?void 0:Q[Y];return"follow"===K&&X.Aq$.isDefined(z)&&Z.Q[`Default_follow_${z}_json`]?Z.Q[`Default_follow_${z}_json`]:X.Aq$.isDefined(null==J?void 0:J.assetKey)?Z.Q[J.assetKey]:X.Aq$.isDefined(null==J?void 0:J.ID)?`spine-${J.ID}`:`${Y}-${K}-${z}`}};(0,Q.Cg)([(0,X.MnK)(it.v),(0,Q.Sn)("design:type",it.v)],st.prototype,"_targetSpine",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],st.prototype,"_itemID",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],st.prototype,"_itemType",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],st.prototype,"_assetKey",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],st.prototype,"_onSpineItemLoaded",void 0),st=Y=(0,Q.Cg)([(0,X.EVk)("SpineItemDataLoader",et.Y.data)],st)},51315:(q,K,z)=>{"use strict";z.d(K,{K:()=>J});var Y=z(8674),Q=z(62459),X=z(34603),Z=z(38042);let J=class extends Z.p{constructor(){super(...arguments),this._loopAnimation=!1,this._onInitialize=new Q.HN0,this._image=null}create(){super.create(),this._image=this.GameObject.findComponent(X._);const q=this._image.sprite;q&&null!==q.key?this.initImage():this._image.OnLoaded.addOnce(this.initImage,this)}destroy(){this._onInitialize.dispose(),super.destroy()}initImage(){const q=this._image.sprite;q.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0);const K=q.animations.add("idle",[8,9,10,11,12,13,14,15],10,!0);q.animations.add("attack",[16,17,18,19,20,21,22,23],10).onComplete.add(K.play,K),q.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),this._initialAnimation&&this.playAnimation(this._initialAnimation,this._loopAnimation),this._onInitialize.dispatch()}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"_initialAnimation",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_loopAnimation",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"_onInitialize",void 0),J=(0,Y.Cg)([(0,Q.EVk)("SpritesheetAnimator")],J)},43858:(q,K,z)=>{"use strict";z.d(K,{j:()=>lt});var Y,Q=z(8674),X=z(62459),Z=z(64868),J=z(35120),tt=z(34829),et=z(1195),it=z(64794),st=z(16847),nt=z(30405),at=z(38920),rt=z(28152),ot=z(93833);!function(q){q[q.Owned=0]="Owned",q[q.Locked=1]="Locked",q[q.Default=2]="Default"}(Y||(Y={}));var ht=z(34603),ct=z(52156),dt=z(85540);let lt=class extends X.uAl{constructor(){super(...arguments),this._localizer=null,this._rarityBackgrounds=[],this._itemIconContainer=null,this._stateIcon=null,this._currencyBannerLocked=null,this._levelLockContainer=null,this._costContainer=null,this._quantityCanBuyText=null,this._stackElements=null,this._arrow=null,this._newBadge=null,this._stateIconConfig=null,this._currentCardState=null,this.bounce=null,this._showMembershipLockIcon=!0}get _item(){var q;return null===(q=this._itemCardData)||void 0===q?void 0:q.item}get _amount(){var q;return null===(q=this._itemCardData)||void 0===q?void 0:q.currencyAmount}get _currencyID(){var q;return null===(q=this._itemCardData)||void 0===q?void 0:q.currencyID}setShowMembershipLockIcon(q){this._showMembershipLockIcon=q}create(){super.create(),this._localizer=J.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService)}setItemData(q){this._itemCardData=q,this._rootContainerComponent.name=`${q.item.type}-${q.item.ID}-card`,this.updateCard()}getItemData(){return Object.assign({},this._itemCardData)}updateItemData(q){var K,z;this.setItemData(q),this.setNewBadge(null!==(z=null===(K=q.dynamicStoreData)||void 0===K?void 0:K.isNew)&&void 0!==z&&z)}setNewBadge(q){this._newBadge.active=q}getItem(){return this._itemCardData.item}setPlayerGearStats(q,K=!1){this._playerGearStats=q}get isCardValid(){return!(!this._itemCardData.item||!this._activePlayer)}updateDisplay(){if(!this.isCardValid)return;const q=this._itemCardData.item;Promise.all([this._itemIconContainer.setAsset(q.ID,q.type),this.updateCardState(this._currentCardState)]).catch(X.RQr.createHandler("Error updating store item card")),this._rarityBackgrounds.forEach(((K,z)=>{var Y,Q;K.active=z===(null!==(Q=null===(Y=q.data)||void 0===Y?void 0:Y.rarity)&&void 0!==Q?Q:0)})),this.updateQuantityCanBuy(),this.animateArrow(!0)}updateTask(q){if(this._itemCardData.dynamicStoreData){const K=this._itemCardData.dynamicStoreData.offers.findIndex((K=>K.task.id===q.task.id));K>-1&&(this._itemCardData.dynamicStoreData.offers[K]=q)}this.updateCard()}updateCard(){this.setCardState(),this.updateDisplay()}updateQuantityCanBuy(){var q,K;const z=null!==(K=null===(q=this._itemCardData.dynamicStoreData)||void 0===q?void 0:q.itemQuantity)&&void 0!==K?K:1;if(Z._.isFeatureEnabled()&&z>1){this._stackElements.active=!0;const q=(0,dt.r)(this._itemCardData),K=q>0?`${q.toString()}/${z.toString()}`:z.toString();this._quantityCanBuyText.text=K}else this._stackElements.active=!1}updateCardState(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Q,Z;this._stateIcon.Active=!1;const J=this._costContainer.findComponentInChildren(X.EYj);J.GameObject.transform.setPositionX(0);const tt=[];switch(q){case Y.Owned:J.text=this._localizer.getText("ITEMCARD_OWNED"),this._currencyDisplay.setIconVisible(!1),tt.push(this.setStateIcon(this._stateIconConfig.atlas,this._stateIconConfig.frameOwned)),this.showLockedElements(!1);break;case Y.Locked:this._levelLockContainer.findComponentInChildren(X.EYj).text=this._localizer.getText("ITEMCARD_LEVEL",null!==(Z=null===(Q=null===(z=null===(K=this._itemCardData)||void 0===K?void 0:K.item)||void 0===z?void 0:z.data)||void 0===Q?void 0:Q.lockLevel)&&void 0!==Z?Z:""),this.showLockedElements(!0);break;case Y.Default:default:this._itemCardData.currencyAmount>0&&!this.memberLockHardCurrency()?(this._currencyDisplay.setIconVisible(!0),J.text=(0,at.Hk)(this._itemCardData.currencyAmount),J.GameObject.transform.setPositionX(2*J.text.length+2),this._currencyDisplay.updateCurrencyID(this._itemCardData.currencyID),this._currencyDisplay.updateAmount(this._itemCardData.currencyAmount)):(this._currencyDisplay.setIconVisible(!1),J.text=this.memberLockHardCurrency()?"":this._localizer.getText("ITEMCARD_FREE")),this.showLockedElements(!1)}this._showMembershipLockIcon&&q!==Y.Owned&&this.isMembershipLocked()&&tt.push(this.setStateIcon(this._stateIconConfig.atlas,this._stateIconConfig.frameMembership)),yield Promise.all(tt)}))}showLockedElements(q){this._costContainer.active=!q,this._currencyBannerLocked.active=q,this._levelLockContainer.active=q}setCardState(){this.isOwned()?this._currentCardState=Y.Owned:this.isLevelLocked()?this._currentCardState=Y.Locked:this._currentCardState=Y.Default}setStateIcon(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this._stateIcon.setAsset(q,K),this._stateIcon.Active=!0}))}getCardState(){return this._currentCardState}isOwned(){return(0,dt.w)(this._itemCardData)}isLevelLocked(){var q,K;const z=this._itemCardData.item;return!(!this._activePlayer||!z)&&nt.o.isLevelLocked(this._activePlayer.player,null!==(K=null===(q=z.data)||void 0===q?void 0:q.lockLevel)&&void 0!==K?K:0)}isMathTowerConsumableItem(q){return q===it.D.ASSET_TYPE_FRAME||q===it.D.ASSET_TYPE_DECORATION||q===it.D.ASSET_TYPE_STREET_FURNITURE}isMembershipLocked(){const q=this._itemCardData.item;return!!q&&(1===q.data.member&&"pet"!==q.type||this.memberLockHardCurrency())}memberLockHardCurrency(){const q=J.q.instance.prodigy.gameContainer.get("bec-c6b4");return 27===this._itemCardData.currencyID&&q.isHardCurrencyMemberLocked(this._itemCardData.currencyAmount)}animateArrow(q){q?(this.bounce||(this._arrow.onDestroy.add((()=>{this.bounce&&(this.bounce.stop(),J.q.instance.game.tweens.remove(this.bounce),this.bounce=null)})),this.bounce=J.q.instance.game.add.tween(this._arrow.transform.localPosition,this).to({y:this._arrow.transform.localPosition.y-5},1e3,X.GS3.Quadratic.InOut,!0,0,tt.A.MAX_SAFE_INTEGER,!0)),this.bounce.start()):(this._arrow.transform.setPositionY(0),this.bounce.remove(),this.bounce=null)}destroy(){J.q.instance.game.tweens.remove(this.bounce),this.bounce=null,super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",et.E)],lt.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],lt.prototype,"_rarityBackgrounds",void 0),(0,Q.Cg)([(0,X.MnK)(ct.X),(0,X.Lr6)(0),(0,Q.Sn)("design:type",ct.X)],lt.prototype,"_itemIconContainer",void 0),(0,Q.Cg)([(0,X.MnK)(ht._),(0,Q.Sn)("design:type",ht._)],lt.prototype,"_stateIcon",void 0),(0,Q.Cg)([(0,X.MnK)(st.n),(0,Q.Sn)("design:type",st.n)],lt.prototype,"_currencyDisplay",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_currencyBannerLocked",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_levelLockContainer",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_costContainer",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],lt.prototype,"_quantityCanBuyText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_stackElements",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_arrow",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],lt.prototype,"_newBadge",void 0),(0,Q.Cg)([(0,X.vCS)(),(0,Q.Sn)("design:type",Object)],lt.prototype,"_stateIconConfig",void 0),(0,Q.Cg)([(0,X.MnK)(ot.$),(0,Q.Sn)("design:type",ot.$)],lt.prototype,"_rootContainerComponent",void 0),lt=(0,Q.Cg)([(0,X.EVk)("StoreItemCard",rt.Y.ui)],lt)},46548:(q,K,z)=>{"use strict";z.d(K,{t:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(84246);let J=class extends Z.j{constructor(){super(...arguments),this._strokeColor=null}applyEffect(q){const K=[];for(let Y=0;Y{"use strict";z.d(K,{E:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this._durationInMilliseconds=0,this.onStart=new Q.HN0,this.onTimeout=new Q.HN0,this.passArgsOnTimeout=!1,this._timerOn=!1}create(){this._autoStartTimer&&this.startTimer(),super.create()}startTimer(...q){this.Active&&!this._timerOn&&Q.Aq$.isDefined(this._durationInMilliseconds)&&(this._timerOn=!0,this._timer=window.setTimeout((()=>{this.onTimeoutCallback(...q)}),this._durationInMilliseconds),this.onStart.dispatch())}onTimeoutCallback(...q){this.Active&&(this.resetTimer(),this.passArgsOnTimeout?this.onTimeout.dispatch(...q):this.onTimeout.dispatch())}stop(q=!1){q?this.onTimeoutCallback():this.resetTimer()}resetTimer(){this._timerOn=!1,window.clearTimeout(this._timer),this._timer=null}onDisable(){this.resetTimer(),super.onDisable()}destroy(){this.onStart.dispose(),this.onTimeout.dispose(),this.resetTimer(),super.destroy()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Z.prototype,"_durationInMilliseconds",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_autoStartTimer",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onStart",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onTimeout",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"passArgsOnTimeout",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("Timeout",X.Y.root)],Z)},17509:(q,K,z)=>{"use strict";z.d(K,{e:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(84246);let J=class extends Z.j{constructor(){super(...arguments),this._tintColor=null}applyEffect(q){Q.Aq$.isDefined(this._tintColor)||(this._tintColor=16777215..toString());const K=Q.Q1f.hexToRGBArray(Number(this._tintColor)),z=K[0],Y=K[1],X=K[2];if(q&&q.data)for(let Q=0;Q{"use strict";z.d(K,{w:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.y4o{constructor(){super(...arguments),this._hexTintColor="0xFFFFFF",this._alpha=1,this._isTinted=!1,this._created=!1,this._renderTextureDimensions=new Q.or0}set hexTintColor(q){this._hexTintColor=q}create(){super.create(),this._root=X.q.instance.game.add.group(),this._root.name=`${this.GameObject.name} - TintRenderComponent`,this.setRootContainer(this._root)}postCreate(){super.postCreate(),this._created=!0,this.Active&&this._tintOnCreate&&(this.enableTint(),this._isTinted=!0)}destroy(){var q;this._targetRenderComponent.onRootContainerSet.remove(this.enableTint,this),this.disableTint(),null===(q=this._root)||void 0===q||q.destroy(),this._root=null,super.destroy()}onEnable(){super.onEnable(),this._isTinted&&this.enableTint()}onDisable(){super.onDisable(),this.isCreated&&this._isTinted&&(this.disableTint(),this._isTinted=!0)}getDimensions(){return this._renderTextureDimensions}enableTint(){var q,K;if(!this._created)return void(this._tintOnCreate=!0);const z=this._targetRenderComponent.getRootContainer(),Y=this._targetRenderComponent.GameObject.transform;if(Y instanceof Q.XVE)if(this._targetRenderComponent.IsActiveInHierarchy)if(z){const Z=Y.rectTransformDimensions;if(this._renderTextureDimensions.setTo(Z.width,Z.height),!this._renderTextureDimensions.isNearlyEqual(Q.or0.ZERO)){this._renderComponentToTexture=X.q.instance.game.add.renderTexture(this._renderTextureDimensions.width,this._renderTextureDimensions.height);const J=new Q.I9Y(Z.width*Y.pivot.x,Z.height*Y.pivot.y),tt=Q.i7d.main;if(!(null===(K=null===(q=Q.wa5.getActiveScene())||void 0===q?void 0:q.getLayer(this._targetRenderComponent.GameObject.layer))||void 0===K?void 0:K.attachToCamera)&&tt){const q=tt.GameObject.transform.worldPosition,K=tt.viewportSize;J.add(new Q.I9Y(q.x-K.getHalfWidth(),q.y-K.getHalfHeight()))}const et={x:Y.worldPosition.x,y:Y.worldPosition.y};Y.worldPosition=new Q.I9Y(J.x,J.y),z.displayObjectUpdateTransform(),this._renderComponentToTexture.render(z),Y.worldPosition=et,this._imageNode||(this._imageNode=X.q.instance.prodigy.create.image(this._renderTextureDimensions.getHalfWidth(),this._renderTextureDimensions.getHalfHeight(),void 0,null,this._renderComponentToTexture),this._root.add(this._imageNode)),this._imageNode.tint=parseInt(this._hexTintColor,16),this._imageNode.alpha=Math.min(Math.max(this._alpha,0),1),this._imageNode.anchor.set(.5,.5),z.visible=!1,z.renderable=!1,this._isTinted=!0}}else this._targetRenderComponent.onRootContainerSet.addOnce(this.enableTint,this);else this._targetRenderComponent.GameObject.onActiveInHierarchyChanged.addOnce(this.enableTint,this);else Q.VyI.log("Target render component must have a RectTransform",Q.$bb.Error)}disableTint(q=!0){this._imageNode&&(this._imageNode.destroy(),this._imageNode=null),this._renderComponentToTexture&&(this._renderComponentToTexture.clear(),this._renderComponentToTexture.destroy(!0),this._renderComponentToTexture=null);{const K=this._targetRenderComponent.getRootContainer();K&&(K.visible=q,K.renderable=!0,this._isTinted=!1)}}};(0,Y.Cg)([(0,Q.MnK)(Q.y4o),(0,Y.Sn)("design:type",Q.y4o)],J.prototype,"_targetRenderComponent",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"_hexTintColor",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_alpha",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_tintOnCreate",void 0),J=(0,Y.Cg)([(0,Q.EVk)("TintRenderComponent",Z.Y.effect)],J)},8182:(q,K,z)=>{"use strict";z.d(K,{p:()=>tt});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(61985),J=z(51972);let tt=class extends J.f{constructor(){super(...arguments),this._timeout=null}startTimer(){this._timeout.startTimer()}close(){this._timeout.stop(!0)}};(0,Y.Cg)([(0,Q.x4W)("timeout"),(0,Y.Sn)("design:type",Z.E)],tt.prototype,"_timeout",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("ToolTipAuto",X.Y.ui)],tt)},51972:(q,K,z)=>{"use strict";z.d(K,{f:()=>Z,i:()=>Y});var Y,Q=z(8674),X=z(62459);!function(q){q[q.UP=0]="UP",q[q.DOWN=1]="DOWN",q[q.LEFT=2]="LEFT",q[q.RIGHT=3]="RIGHT"}(Y||(Y={}));class Z extends X.uAl{constructor(){super(...arguments),this._headerMessageText=null,this._bodyMessageText=null,this._indicatorArrowVertical=null,this._indicatorArrowHorizontal=null,this._leftSideBorderOffset=0,this._rightSideBorderOffset=0}postCreate(){super.postCreate(),this.GameObject.active=!1,this._cachedTextPositionYHeader=this._headerMessageText.GameObject.legacyTransform.group.position.y,this._cachedTextPositionYBody=this._bodyMessageText.GameObject.legacyTransform.group.position.y,this._cachedTextPositionYAverage=.5*(this._cachedTextPositionYHeader+this._cachedTextPositionYBody),this._leftSideBorderOffset=this._bodyMessageText.GameObject.legacyTransform.group.position.x,this._rightSideBorderOffset=this._background.GameObject.legacyTransform.width-this._bodyMessageText.GameObject.legacyTransform.group.position.x}initializeText(q,K,z){this._bodyMessageText.text=q,X.Aq$.isDefined(K)&&0!==K.length?(this._headerMessageText.text=K,this._bodyMessageText.GameObject.legacyTransform.group.position.y=this._cachedTextPositionYBody):(this._headerMessageText.text="",this._bodyMessageText.GameObject.legacyTransform.group.position.y=this._cachedTextPositionYAverage),this.resizeSlicedGraphic(this._background,this.getBackgroundWidth(),this._background.GameObject.legacyTransform.height);const Y=this.GameObject.active;this.GameObject.active=!0,this.GameObject.legacyTransform.anchorX=this.GameObject.legacyTransform.anchorX,this.GameObject.legacyTransform.anchorY=this.GameObject.legacyTransform.anchorY,this.GameObject.active=Y}resizeSlicedGraphic(q,K,z){q.GameObject.legacyTransform.group.removeChild(q.elementsGroup),q.GameObject.legacyTransform.group.cacheAsBitmap=!1,q.elementsGroup.destroy(),q._rootContainer=null,q.elementsGroup=null,q.GameObject.legacyTransform.group.getChildAt(0).width=K,q.GameObject.legacyTransform.group.getChildAt(0).height=z,q.create()}getBackgroundWidth(){const q=Math.max(this._headerMessageText.TextObject.width,this._bodyMessageText.TextObject.width);return this._leftSideBorderOffset+q+this._rightSideBorderOffset}setIndicatorArrow(q,K=.5,z=.5){const Q=this.GameObject.legacyTransform;switch(q){case Y.UP:this._indicatorArrowHorizontal.destroy(),this.setArrow(q,this._indicatorArrowVertical,1,this.getBackgroundWidth()*K,0),this.setAnchor(Q,K,0);break;case Y.DOWN:this.setArrow(q,this._indicatorArrowVertical,-1,this.getBackgroundWidth()*K,this._cachedGameObjectHeight),this.setAnchor(Q,K,1),this._indicatorArrowHorizontal.destroy();break;case Y.LEFT:this._indicatorArrowVertical.destroy(),this.setArrow(q,this._indicatorArrowHorizontal,-1,2,this._cachedGameObjectHeight*z),this.setAnchor(Q,0,z);break;case Y.RIGHT:this._indicatorArrowVertical.destroy(),this.setArrow(q,this._indicatorArrowHorizontal,1,this.getBackgroundWidth()-2,this._cachedGameObjectHeight*z),this.setAnchor(Q,1,z);break;default:this._indicatorArrowVertical.destroy(),this._indicatorArrowHorizontal.destroy()}}setArrow(q,K,z,Q,X){q===Y.UP||q===Y.DOWN?K.legacyTransform.group.scale.y=z:K.legacyTransform.group.scale.x=z,K.legacyTransform.group.position.set(Q,X)}setAnchor(q,K,z){q.anchorX=K,q.anchorY=z}}(0,Q.Cg)([(0,X.x4W)("headerMessageText"),(0,Q.Sn)("design:type",X.EYj)],Z.prototype,"_headerMessageText",void 0),(0,Q.Cg)([(0,X.x4W)("bodyMessageText"),(0,Q.Sn)("design:type",X.EYj)],Z.prototype,"_bodyMessageText",void 0),(0,Q.Cg)([(0,X.x4W)("background"),(0,Q.Sn)("design:type",X.V09)],Z.prototype,"_background",void 0),(0,Q.Cg)([(0,X.x4W)("indicatorArrow"),(0,Q.Sn)("design:type",X._mx)],Z.prototype,"_indicatorArrowVertical",void 0),(0,Q.Cg)([(0,X.x4W)("indicatorArrowHorizontal"),(0,Q.Sn)("design:type",X._mx)],Z.prototype,"_indicatorArrowHorizontal",void 0)},82125:(q,K,z)=>{"use strict";z.d(K,{i:()=>et});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(76974),J=z(28152),tt=z(51972);let et=class extends tt.f{constructor(){super(...arguments),this._callbacks=[],this._numLayoutObjects=0}postCreate(){super.postCreate(),this._cachedGameObjectHeight=this.GameObject.legacyTransform.height}setCallbacks(q){if(Q.Aq$.isDefined(q)){this._callbacks=q,this._numLayoutObjects=this._callbacks.length;const K=this.GameObject.findComponentInChildren(Q.JTA);for(let q=0;q{"use strict";z.d(K,{f:()=>X,y:()=>Q});var Y=z(51972);class Q{}Q.CENTER=.5,Q.LEFT=0,Q.RIGHT=1,Q.TOP=0,Q.BOTTOM=1;const X={arrowAnchor:Q.CENTER,tooltipAnchor:Q.CENTER,arrowDirection:Y.i.DOWN,useCloseButton:!0}},48199:(q,K,z)=>{"use strict";z.d(K,{A:()=>rt});var Y=z(62459),Q=z(99625),X=z(35120),Z=z(31818),J=z(8182),tt=z(82125),et=z(64191),it=z(8674),st=z(28152),nt=z(51972);let at=class extends nt.f{postCreate(){super.postCreate(),this._cachedGameObjectHeight=this.GameObject.legacyTransform.height}initializeText(q,K){super.initializeText(q,K),this.GameObject.active=!0}close(){this.GameObject.active=!1}};at=(0,it.Cg)([(0,Y.EVk)("ToolTipSpeech",st.Y.ui)],at);class rt{static displayToolTipAuto(q,K,z){const Y=rt.setToolTip(J.p,q,K,rt.TOOLTIP_AUTO);return rt.updateBaseDisplay(Y,z),Y.close(),Y.startTimer(),Y}static displayTooltipTargeted(q,K,z,Y){let J=q;if(!J){J=X.q.instance.prodigy.gameContainer.get("983-05a7").loadFromGUID(Q.l.StandardTooltip,K).findComponentInChildren(Z.tX)}return J.setFromSchema(z),J.setTarget(Y,K),J}static displayToolTipManual(q,K,z){const Q=rt.setToolTip(et.q,q,K,rt.TOOLTIP_MANUAL),X=Y.Aq$.isDefined(z.proceedButtonCallback);return X?(Q.setProceedButtonVisibility(!0),Q.setCallback(z.proceedButtonCallback)):Q.setProceedButtonVisibility(!1),rt.updateBaseDisplay(Q,z,X),Y.Aq$.isDefined(z.arrowXRelPos)||Y.Aq$.isDefined(z.arrowYRelPos)?Q.setIndicatorArrow(z.arrowDirection,z.arrowXRelPos,z.arrowYRelPos):Q.setIndicatorArrow(z.arrowDirection,.5,null),Q}static displayToolTipSpeech(q,K,z){const Y=rt.setToolTip(at,q,K,rt.TOOLTIP_SPEECH);return rt.updateBaseDisplay(Y,z),Y.setIndicatorArrow(z.arrowDirection,z.arrowXRelPos,z.arrowYRelPos),Y}static displayToolTipCustomManual(q,K,z,Y){const Q=rt.setToolTip(et.q,q,K,z);return Q.setProceedButtonVisibility(!1),rt.updateBaseDisplay(Q,Y),Q.setIndicatorArrow(Y.arrowDirection,Y.arrowXRelPos,Y.arrowYRelPos),Q}static displayToolTipButtonGrid(q,K,z,Q,X=!0,Z){const J=rt.setToolTip(tt.i,q,K,Q);return J.GameObject.active=X,rt.updateBaseDisplay(J,z),Y.Aq$.isDefined(z.arrowDirection)&&J.setIndicatorArrow(z.arrowDirection,z.arrowXRelPos,z.arrowYRelPos),Y.Aq$.isDefined(Z)&&Z.length>0&&J.setCallbacks(Z),J}static updateBaseDisplay(q,K,z){q.initializeText(K.bodyText,K.headerText,z),Y.Aq$.isDefined(K.xPosition)&&(q.GameObject.legacyTransform.group.position.x=K.xPosition),Y.Aq$.isDefined(K.yPosition)&&(q.GameObject.legacyTransform.group.position.y=K.yPosition),q.GameObject.legacyTransform.group.updateTransform()}static setToolTip(q,K,z,Y){if(!K){const K=X.q.instance.prodigy.gameContainer.get("983-05a7");return("number"==typeof Y?K.load(Y,z):K.loadFromGUID(Y,z)).findComponentInChildren(q)}return K}}rt.TOOLTIP_AUTO=10,rt.TOOLTIP_MANUAL=11,rt.TOOLTIP_SPEECH=108},64191:(q,K,z)=>{"use strict";z.d(K,{q:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(49237),J=z(28152),tt=z(51972);let et=class extends tt.f{constructor(){super(...arguments),this._closeButton=null,this._proceedButton=null,this._proceedButtonText=null}postCreate(){super.postCreate(),this._rightSideBorderOffset+=this._closeButton.GameObject.legacyTransform.width+this._proceedButton.GameObject.legacyTransform.width,this._closeButton.onClick.add((()=>{X.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()})),this._cachedGameObjectHeight=this.GameObject.legacyTransform.height}initializeText(q,K,z){super.initializeText(q,K),this._closeButton.GameObject.legacyTransform.group.position.x=this.getBackgroundWidth()-this._rightSideBorderOffset*(Q.Aq$.isDefined(z)&&z?.25:.5),z&&(this._proceedButton.GameObject.legacyTransform.group.position.x=this.getBackgroundWidth()-.7*this._rightSideBorderOffset),this.GameObject.active=!0}setCallback(q){this._proceedButton.onClick.add((()=>{q(),X.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()})),this._proceedButtonText.text="Go"}setProceedButtonVisibility(q){q?this._proceedButton.GameObject.active||(this._rightSideBorderOffset+=this._proceedButton.GameObject.legacyTransform.width,this._proceedButton.GameObject.active=!0):this._proceedButton.GameObject.active&&(this._rightSideBorderOffset-=this._proceedButton.GameObject.legacyTransform.width,this._proceedButton.GameObject.active=!1)}close(){this.GameObject.active=!1}destroy(){this._closeButton.onClick.remove(this.close,this),super.destroy()}};(0,Y.Cg)([(0,Q.x4W)("closeButton"),(0,Y.Sn)("design:type",Z.$)],et.prototype,"_closeButton",void 0),(0,Y.Cg)([(0,Q.x4W)("proceedButton"),(0,Y.Sn)("design:type",Z.$)],et.prototype,"_proceedButton",void 0),(0,Y.Cg)([(0,Q.x4W)("proceedButtonText"),(0,Y.Sn)("design:type",Q.EYj)],et.prototype,"_proceedButtonText",void 0),et=(0,Y.Cg)([(0,Q.EVk)("ToolTipManual",J.Y.ui)],et)},97530:(q,K,z)=>{"use strict";z.d(K,{d:()=>ut});var Y=z(8674),Q=z(62459),X=z(65240),Z=z(35120),J=z(1195),tt=z(73797),et=z(65116),it=z(49037),st=z(93171),nt=z(68152),at=z(44094),rt=z(20952),ot=z(28152),ht=z(22866),ct=z(34603),dt=z(19633),lt=z(86675);let ut=class extends Q.uAl{init(q){this._achievementData=q;const K=Z.q.instance.prodigy.achievements;this._title.text=K.getName(q),this._description.text=K.getDesc(q),this._achievementStars.init(q),this._progressBar.setValue(K.getProgress(q)),this._fractionText.text=K.getCompletionText(q);const z=q.data.reward;if(z){this._rewardIcon.setAsset(Z.q.instance.prodigy.icon.iconKey(z)).catch(Q.RQr.createHandler("Error setting achievement reward image")),this._goButton.GameObject.active=!1,this._claimButton.GameObject.active=!1,this._claimedText.active=!1,this._rewardCheckmark.active=!1;const Y=q.data.mapKey;K.isRewardClaimed(q)?(this._claimedText.active=!0,this._rewardCheckmark.active=!0):K.isComplete(q)?this._claimButton.GameObject.active=!0:Y?(this._canTeleport.mapTag=Y,this._teleport.mapTag=Y,this._openTravelConfirm.onOpen.add((q=>q.findComponent(Q.bE_).getInjectedValue("bodyTextComponent").text=this._localizer.getText("TRAVEL_CONFIRM_MESSAGE",Z.q.instance.prodigy.world.getZone(Y.split("-")[0]).name))),this._goButton.GameObject.active=!0):(this._claimButton.inputEnabled=!1,this._claimButton.GameObject.active=!0)}}claimReward(){const q=Z.q.instance.prodigy.achievements;(0,nt.v)(!q.isRewardClaimed(this._achievementData),"Achievement reward was claimed even though it has already been marked claimed."),this._claimButton.inputEnabled=!1;const K=at.$.generateUID(),z=this._achievementData.ID;Z.q.instance.prodigy.open.gotItem([this._achievementData.data.reward],void 0,void 0,void 0,void 0,void 0,{transaction_id:K,source_type:X.C.Achievement,source_id:z.toString()}),Z.q.instance.prodigy.gameContainer.get("20f-5f67").create.achievementComplete({level:this._playerProvider.getLevel(),session_uuid:this._uuidProvider.getUUID(),achievement_name:q.getName(this._achievementData),achievement_id:z,transaction_id:K}).send(),this._playerProvider.player.achievements.complete(z),Z.q.instance.game.broadcaster.broadcast(tt.f7.ClaimedRewardsUpdated,void 0,[q.getUnclaimedRewards()])}};(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",J.E)],ut.prototype,"_playerProvider",void 0),(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],ut.prototype,"_localizer",void 0),(0,Y.Cg)([(0,Q.Cdj)("d7b-2375"),(0,Y.Sn)("design:type",rt.H)],ut.prototype,"_uuidProvider",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ut.prototype,"_title",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ut.prototype,"_description",void 0),(0,Y.Cg)([(0,Q.MnK)(lt.u),(0,Y.Sn)("design:type",lt.u)],ut.prototype,"_achievementStars",void 0),(0,Y.Cg)([(0,Q.MnK)(st.a),(0,Y.Sn)("design:type",st.a)],ut.prototype,"_progressBar",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ut.prototype,"_fractionText",void 0),(0,Y.Cg)([(0,Q.MnK)(ct._),(0,Y.Sn)("design:type",ct._)],ut.prototype,"_rewardIcon",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ut.prototype,"_rewardCheckmark",void 0),(0,Y.Cg)([(0,Q.MnK)(dt.S),(0,Y.Sn)("design:type",dt.S)],ut.prototype,"_claimButton",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ut.prototype,"_claimedText",void 0),(0,Y.Cg)([(0,Q.MnK)(dt.S),(0,Y.Sn)("design:type",dt.S)],ut.prototype,"_goButton",void 0),(0,Y.Cg)([(0,Q.MnK)(et.$),(0,Y.Sn)("design:type",et.$)],ut.prototype,"_canTeleport",void 0),(0,Y.Cg)([(0,Q.MnK)(it.q),(0,Y.Sn)("design:type",it.q)],ut.prototype,"_teleport",void 0),(0,Y.Cg)([(0,Q.MnK)(ht.l),(0,Y.Sn)("design:type",ht.l)],ut.prototype,"_openTravelConfirm",void 0),ut=(0,Y.Cg)([(0,Q.EVk)("InitAchievementCard",ot.Y.uiAchievement)],ut)},54584:(q,K,z)=>{"use strict";z.d(K,{x:()=>at});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(99625),J=z(35120),tt=z(5269),et=z(2385),it=z(28152),st=z(97530),nt=z(48215);let at=class extends Q.uAl{constructor(){super(...arguments),this._onInitComplete=new Q.HN0}create(){super.create(),this._scrollView=this.GameObject.findComponentInChildren(et.I)}init(q){const K=this._contentObject.children;for(let Y=K.length;--Y>=0;)K[Y].destroy();this._zoneRequirementText.run(q.data.zone);const z=J.q.instance.prodigy.achievements;X.sortBy(q.achievements,(q=>z.isComplete(q)?q.data.reward?z.isRewardClaimed(q)?2:0:2:1)).forEach((q=>this._prefabLoader.loadFromGUID(q.data.reward?Z.l.AchievementCardWithReward:Z.l.AchievementCard,this._contentObject).findComponent(st.d).init(q))),this._scrollView.scrollToPercent(100,tt.H.Vertical),this._scrollView.resetVelocityWheel(),this._onInitComplete.dispatch()}destroy(){this._onInitComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.Cdj)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],at.prototype,"_prefabLoader",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"_onInitComplete",void 0),(0,Y.Cg)([(0,Q.MnK)(nt.Y),(0,Y.Sn)("design:type",nt.Y)],at.prototype,"_zoneRequirementText",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],at.prototype,"_contentObject",void 0),at=(0,Y.Cg)([(0,Q.EVk)("InitAchievementScrollview",it.Y.uiAchievement)],at)},86675:(q,K,z)=>{"use strict";z.d(K,{u:()=>et});var Y=z(8674),Q=z(62459),X=z(1195),Z=z(68152),J=z(28152),tt=z(88022);let et=class extends Q.uAl{constructor(){super(...arguments),this._evenStars=[],this._oddStars=[]}init(q){const K=q.data.ranks.length;(0,Z.v)(K<=5,`There are over 5 ranks in achievement ${q.ID}: ${q.data.title}`),(0,Z.v)(K>0,`There are no ranks in achievement ${q.ID}: ${q.data.title}`);const z=Math.min(this._playerProvider.player.achievements.getProgress(q.ID),K),Y=K%2==0;this._evenStarsParent.active=Y,this._oddStarsParent.active=!Y;const Q=Y?this._evenStars:this._oddStars,X=(Q.length-K)/2,J=[[X,"empty"],[X+z,"star-full"],[X+K,"star-empty"],[Q.length,"empty"]];let et=0;for(const[Z,it]of J)for(;et=K}};(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",X.E)],et.prototype,"_playerProvider",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_bigStar",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_evenStarsParent",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_oddStarsParent",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Array)],et.prototype,"_evenStars",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Array)],et.prototype,"_oddStars",void 0),et=(0,Y.Cg)([(0,Q.EVk)("InitAchievementStars",J.Y.uiAchievement)],et)},48215:(q,K,z)=>{"use strict";z.d(K,{Y:()=>J});var Y=z(8674),Q=z(62459),X=z(40392),Z=z(28152);let J=class extends Q.uAl{run(q){let K;const z=q&&(K=X.i.BUTTONS_CONFIG.find((K=>K.zone===q)))&&!K.meetsRequirements();this._textObject.active=z,z&&(this._text.text=K.getGenericLockMessage())}};(0,Y.Cg)([(0,Q.Cdj)("11f-118a"),(0,Y.Sn)("design:type",Object)],J.prototype,"_featureRequirement",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_textObject",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_text",void 0),J=(0,Y.Cg)([(0,Q.EVk)("SetZoneRequirementText",Z.Y.uiAchievement)],J)},17737:(q,K,z)=>{"use strict";z.d(K,{n:()=>J});var Y=z(8674),Q=z(62459),X=z(44357);var Z=z(28152);let J=class extends Q.uAl{create(){super.create(),this._defaultBG.active=!0,this._unseenBG.active=!1}run(){(class{static play(q,K,z,Q,Z,J){return(0,Y.sH)(this,void 0,void 0,(function*(){(0,X.Ry)(q,!1),(0,X.Ry)(K,!0),(0,X.Wf)(Z,J),yield(0,X.yH)(z,{x:.97,y:.97},300),yield(0,X.yH)(z,{x:1.03,y:1.03},200),yield(0,X.yH)(z,{x:.99,y:.99},250),yield(0,X.yH)(z,{x:1,y:1},100),yield(0,X.yH)(Q,{x:.96,y:.96},200),yield(0,X.yH)(Q,{x:1.04,y:1.04},200),yield(0,X.yH)(Q,{x:.98,y:.98},150),yield(0,X.yH)(Q,{x:1,y:1},100)}))}}).play(this._defaultBG,this._unseenBG,this._adTransform,this._newIcon,this._title,this._titleTargetPosition.localPosition)}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_defaultBG",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_unseenBG",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.dLy),(0,Y.Sn)("design:type",Q.dLy)],J.prototype,"_adTransform",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.dLy),(0,Y.Sn)("design:type",Q.dLy)],J.prototype,"_newIcon",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.dLy),(0,Y.Sn)("design:type",Q.dLy)],J.prototype,"_title",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.dLy),(0,Y.Sn)("design:type",Q.dLy)],J.prototype,"_titleTargetPosition",void 0),J=(0,Y.Cg)([(0,Q.EVk)("InitializeAd",Z.Y.uiAd)],J)},94596:(q,K,z)=>{"use strict";z.d(K,{b:()=>Z});var Y=z(8674),Q=z(62459),X=z(24285);class Z extends Q.uAl{constructor(){super(...arguments),this._applyOnCreate=!1,this._filterList=[]}get filterList(){return this._filterList}create(){super.create(),this._renderComponent||(this._renderComponent=this.gameObject.findComponent(Q.y4o)),this._renderComponent.getRootContainer()?this.onRootContainerInitialized():this._renderComponent.onRootContainerSet.add((()=>{this.onRootContainerInitialized()}))}destroy(){this._rootContainer&&!this._rootContainer.destroyed&&this.removeFilter(),super.destroy()}onRootContainerInitialized(){this.initialize(),this._applyOnCreate&&this.applyFilter()}initialize(){this._rootContainer=this._renderComponent.getRootContainer(),this._rootContainer&&(this._rootContainer.filters||(this._rootContainer.filters=[]))}reset(){this._rootContainer&&(this.removeFilter(),this._filterList=[],this.initialize(),this.applyFilter())}applyFilter(){var q;(null===(q=this._rootContainer)||void 0===q?void 0:q.filters)&&(this._filterList.forEach((q=>{-1===this._rootContainer.filters.indexOf(q)&&this._rootContainer.filters.push(q)})),X.s.resetCacheAsBitmap(this._rootContainer))}removeFilter(){var q;(null===(q=this._rootContainer)||void 0===q?void 0:q.filters)&&(this._rootContainer.filters=this._rootContainer.filters.filter((q=>!this._filterList.includes(q))),X.s.resetCacheAsBitmap(this._rootContainer))}}(0,Y.Cg)([(0,Q.Pqz)(Q.y4o),(0,Y.Sn)("design:type",Q.y4o)],Z.prototype,"_renderComponent",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_applyOnCreate",void 0)},57349:(q,K,z)=>{"use strict";z.d(K,{$:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(54524);let J=class extends Z.K{constructor(){super(...arguments),this._addButtonSignal=new Q.HN0}get emptyText(){return this._emptyText}get choosePetText(){return this._choosePetText}get clickToAddText(){return this._clickToAddText}get addSignal(){return this._addButtonSignal}setSelected(q){super.setSelected(q),this._addIcon.active=!q,this._emptyText.active=!q,this._choosePetText.active=q}onCardClick(){super.onCardClick(),this.addButtonClicked()}addButtonClicked(){this.addSignal.dispatch(null,this.teamPosition)}destroy(){this._addButtonSignal.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.x4W)("addIcon"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_addIcon",void 0),(0,Y.Cg)([(0,Q.x4W)("emptyText"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_emptyText",void 0),(0,Y.Cg)([(0,Q.x4W)("choosePetText"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_choosePetText",void 0),(0,Y.Cg)([(0,Q.x4W)("clickToAddText"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_clickToAddText",void 0),J=(0,Y.Cg)([(0,Q.EVk)("EmptyTeamCard",X.Y.uiPet)],J)},42838:(q,K,z)=>{"use strict";z.d(K,{s:()=>tt});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(50873),J=z(18280);let tt=class extends Q.uAl{constructor(){super(...arguments),this._currentMask=null,this._fillMask=null}postCreate(){super.postCreate(),this.createMask(),this.applyMask(this._currentMask)}applyMask(q){this._currentMask=q,this._fillImage.legacyTransform.group.mask=this._currentMask.getGraphicSource()}removeMask(){this._currentMask=null,this._fillImage.legacyTransform.group.mask=null}set fillPercent(q){this._fillMask.setFillPercent(q)}createMask(){const q=new Q._mx(this.gameObject);q.addComponent(Q.K16),q.name="Mask",this._currentMask=q.addComponent(J.n),this._fillMask=q.addComponent(Z.k);const K=this._fillImage.legacyTransform.width,z=this._fillImage.legacyTransform.height;this._fillMask.Width=K,this._fillMask.Height=z,q.legacyTransform.x+=.5*K,q.legacyTransform.y+=.5*z}};(0,Y.Cg)([(0,Q.x4W)("fillImage"),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_fillImage",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("FillBarComponent",X.Y.ui)],tt)},46168:(q,K,z)=>{"use strict";z.d(K,{Q:()=>ct});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(35120),J=z(98013),tt=z(37773),et=z(65732),it=z(97317),st=z(22023),nt=z(80060),at=z(49282),rt=z(28152),ot=z(44725),ht=z(54524);let ct=class extends ht.K{constructor(){super(...arguments),this._editSignal=new Q.HN0,this._addMode=!1}get editSignal(){return this._editSignal}get creatureData(){return[this._creatureData]}postCreate(){super.postCreate(),this._bottomPanel.legacyTransform.group.getChildAt(1).exists=!0,this._staticBackgroundContainer.legacyTransform.group.exists=!1}setDisplayCreature(q,K=!1){this.containsPlayer=K,this._creatureData=q.data,this._itemData=q.source,this._displayCreature=q,this.containsPlayer&&this._cardShadow&&(this._cardShadow.active=!1);const z=this.containsPlayer?tt.e.getActivePlayerChargedLevelTier():it.Bv.NO_CHARGE,Y=tt.e.activePlayerHasChargedLevels?it.X$.IDLE:it.X$.HIDDEN;nt.d.updateInjectedValues(this.gameObject,{[et.E.ChargedCreatureEffectTier]:z,[et.E.ChargedCreatureEffectDisplayType]:Y,MERGE_RANK:0})}get isCardValid(){return!(!this._displayCreature||!this._creatureData)}get name(){return this.containsPlayer?"You!":st.P8.getPetDisplayName(this._itemData,this._creatureData,15)}get tooltipPosition(){return this._tooltipPosition.legacyTransform.group.getGlobalPosition()}get worldPosition(){const q=this.GameObject.legacyTransform.group.worldTransform;return new X.Point(q.tx,q.ty)}onCardClick(){this._addMode?this.sendData(this._creatureData,this.teamPosition):(super.onCardClick(),this.editSignal.dispatch(this,this._creatureData,this.teamPosition))}updateCard(){this.setNameText(this.name);let q=st.P8.getPetLevel(this._creatureData);if(this.containsPlayer){q+=Z.q.instance.prodigy.gameContainer.get("782-c308").getChargedLevel()}this.setLevelText(q),this.containsPlayer&&tt.e.getActivePlayerChargedLevelTier()!==it.Bv.NO_CHARGE&&(this._levelText.fill=it.Vh);const K=st.P8.getPetDisplayMergeRank(this._displayCreature.data.ID,this._displayCreature.data.uniqueID),z=!(this.containsPlayer||void 0===K);if(this._mergeRankBadge.active=z,z){const q={MERGE_RANK:K,SHOW_MERGE_RANK_BADGE:st.P8.canPetAccessMergeRanks(this._creatureData.ID)};nt.d.updateInjectedValues(this.gameObject,q,!0)}this.setCreaturePreview(this._displayCreature),this.setElement(this._creatureData.ID)}setNameText(q){this._nameText.text=null!=q?q:this._nameText.text}setElement(q){this._wizardElementDisplay.active=this.containsPlayer,this._elementDisplay.GameObject.active=!this.containsPlayer,this.containsPlayer||this._elementDisplay.setPetID(q)}setLevelText(q){var K;this._levelText.text=null!==(K=q.toString())&&void 0!==K?K:this._levelText.text}setCreaturePreview(q){this._creaturePreview.addCreature(q,!0)}setDefaultState(){super.setDefaultState(),this._addMode=!1,this._clickPanel.active=!1}setAddMode(){super.setHighlighted(!0),this._addMode=!0,this._clickPanel.active=!0,Z.q.instance.prodigy.audio.playSFX(18,"pop")}setEditMode(q){super.setHighlighted(q)}resetCard(){J.l.removeAll(this._creaturePreview.GameObject.legacyTransform.group,!0)}destroy(){var q;(null===(q=this._staticBackgroundContainer)||void 0===q?void 0:q.legacyTransform)&&(this._staticBackgroundContainer.legacyTransform.group.cacheAsBitmap=!1,this._staticBackgroundContainer.legacyTransform.group.destroy()),this._editSignal.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ct.prototype,"_nameText",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.u),(0,Y.Sn)("design:type",ot.u)],ct.prototype,"_creaturePreview",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ct.prototype,"_levelText",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_mergeRankBadge",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Q.nKb)("clickTextPanel"),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_clickPanel",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_tooltipPosition",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_bottomPanel",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Q.nKb)("backgroundContainer"),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_staticBackgroundContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(at.D),(0,Y.Sn)("design:type",at.D)],ct.prototype,"_elementDisplay",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_wizardElementDisplay",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_cardShadow",void 0),ct=(0,Y.Cg)([(0,Q.EVk)("FilledTeamCard",rt.Y.uiPet)],ct)},16815:(q,K,z)=>{"use strict";z.d(K,{Z:()=>ut});var Y,Q=z(8674),X=z(62459),Z=z(50788),J=z(37016),tt=z(96989),et=z(49237),it=z(77938),st=z(12472),nt=z(76277),at=z(22023),rt=z(80060),ot=z(49282),ht=z(28152),ct=z(65231),dt=z(35189),lt=z(29834);let ut=Y=class extends ct.s{constructor(){super(...arguments),this._stackBackgrounds=[],this._stackShadows=[],this._isCardInputDisabled=!1,this._onUpdateCanBeEvolved=new X.HN0}get creatureData(){return this._creatureData}get displayedCreature(){var q;return this._creatureData?null!==(q=this._creatureData.find((q=>at.P8.isPetOnTeam(q))))&&void 0!==q?q:this._creatureData[0]:null}get onInputOver(){return this._cardInteraction.onInputOver}get onInputOut(){return this._cardInteraction.onInputOut}postCreate(){super.postCreate(),this._bottomPanel.legacyTransform.group.getChildAt(1).exists=!0,this._staticBackgroundContainer.legacyTransform.group.exists=!1}setPetData(q,K){var z;super.setItemData(K),this._elementDisplay.setPetID(null!==(z=null==q?void 0:q[0].ID)&&void 0!==z?z:1),this._creatureData=q;for(let Y=0;YY.getMergeUpgradeSuggestion(q)));rt.d.updateInjectedValues(this.gameObject,{SHOW_MERGE_RANK_BADGE:K,MERGE_RANK:q,READY_TO_MERGE:z},!0)}}setOnTeamContainer(){this._onTeamContainer.active=this._creatureData.some((q=>at.P8.isPetOnTeam(q)))}setUpgradeState(){let q=at.P8.getUpgradeSuggestion(this.displayedCreature);for(let K=0;!q&&Kit.t.getItem("pet",q)),Y).length{"use strict";z.d(K,{K:()=>tt});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(24382),J=z(35189);class tt extends Z.j{constructor(){super(...arguments),this._sendDataSignal=new Q.HN0,this._sendClickSignal=new Q.HN0,this._isCardInputEnabled=!1,this._isSelected=!1,this._containsPlayer=!1}set teamPosition(q){this._teamPosition=q,this._teamPositionText.text=(q+1).toString()}get teamPosition(){return this._teamPosition}get sendDataSignal(){return this._sendDataSignal}get sendClickSignal(){return this._sendClickSignal}get isSelected(){return this._isSelected}set containsPlayer(q){this._containsPlayer=q}get containsPlayer(){return this._containsPlayer}setDefaultState(){this.setSelected(!1),this.enableCardInput(!0),this.enableTransparency(!1)}setPlayerState(){this.setSelected(!1),this.enableCardInput(!1),this.enableTransparency(!1)}setHighlighted(q){this._cardState.SecondState=q}setSelected(q){this._isSelected=q,this.setHighlighted(q),this.enableCardInput(!q)}enableCardInput(q){this._isCardInputEnabled=q,this._cardInteraction.inputEnabled=q}enableTransparency(q){this.GameObject.legacyTransform.group.alpha=q?.7:1}create(){super.create(),this.setDefaultState(),this._cardInteraction.onClick.add((()=>{this.onCardClick()}))}onCardClick(){this.reportClick(),this.setSelected(!0)}reportClick(){this.sendClickSignal.dispatch()}sendData(q,K){this.sendDataSignal.dispatch(q,K)}addClickListener(q){this.sendClickSignal.add(q.onCardClicked,q)}addDataReceiver(q){this.sendDataSignal.add(q.receivePetData,q)}destroy(){this._sendDataSignal.dispose(),this._sendClickSignal.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.x4W)("cardInteraction"),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_cardInteraction",void 0),(0,Y.Cg)([(0,Q.x4W)("cardState"),(0,Y.Sn)("design:type",J.e)],tt.prototype,"_cardState",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],tt.prototype,"_teamPositionText",void 0)},41851:(q,K,z)=>{"use strict";z.d(K,{v:()=>it});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(49237),tt=z(76974),et=z(28152);!function(q){q[q.DEFAULT=1]="DEFAULT",q[q.INVERTED=-1]="INVERTED"}(Y||(Y={}));let it=class extends X.uAl{constructor(){super(...arguments),this.swapSignal=new X.HN0,this.failedSwapSignal=new X.HN0,this.finishEditingSignal=new X.HN0}postCreate(){super.postCreate(),this._rightSwapButton.GameObject.active=!1,this.rightIcons=this._rightSwapButton.GameObject.findComponentsInChildren(X.vYh),this.leftIcons=this._leftSwapButton.GameObject.findComponentsInChildren(X.vYh),this._kennel=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel,this._confirmButton.onClick.add((()=>{Z.q.instance.prodigy.audio.playSFX(18,"pop"),this.doneEditing()})),this._leftSwapButton.onClick.add((()=>{this.tryToSwap(this._canSwapLeft,this._leftSwapPosition)})),this._rightSwapButton.onClick.add((()=>{this.tryToSwap(this._canSwapRight,this._rightSwapPosition)}))}tryToSwap(q,K){q?this.swap(K,this._currentTeamPosition):(Z.q.instance.prodigy.audio.playSFX(67,"button-disabled"),this.failedSwapSignal.dispatch())}setSwapPositions(q){switch(this._currentTeamPosition=q,q){case 0:this._leftSwapPosition=1,this._rightSwapPosition=2,this.flipRightIcons(Y.DEFAULT),this.flipLeftIcons(Y.DEFAULT);break;case 1:this._leftSwapPosition=2,this._rightSwapPosition=0,this.flipRightIcons(Y.DEFAULT),this.flipLeftIcons(Y.INVERTED);break;case 2:this._leftSwapPosition=1,this._rightSwapPosition=0,this.flipRightIcons(Y.INVERTED),this.flipLeftIcons(Y.DEFAULT)}}setSwapButtonsEnabled(){this._canSwapLeft=this._kennel.canSwapPositions(this._currentTeamPosition,this._leftSwapPosition,1),this._canSwapRight=this._kennel.canSwapPositions(this._currentTeamPosition,this._rightSwapPosition,1),this._canSwapLeft?this._leftSwapButton.unlockState():this._leftSwapButton.lockState(tt.K.Disabled),this._canSwapRight?this._rightSwapButton.unlockState():this._rightSwapButton.lockState(tt.K.Disabled)}movePanel(q){this.gameObject.legacyTransform.group.position.set(q.x,q.y)}flipRightIcons(q){this.rightIcons.forEach((K=>{K.GameObject.legacyTransform.group.scale.y=q}))}flipLeftIcons(q){this.leftIcons.forEach((K=>{K.GameObject.legacyTransform.group.scale.y=q}))}swap(q,K){this.swapSignal.dispatch(q,K)}doneEditing(){this.finishEditingSignal.dispatch()}setActive(q){this.gameObject.active=q}destroy(){this.swapSignal.dispose(),this.finishEditingSignal.dispose(),this.failedSwapSignal.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.x4W)("confirmButton"),(0,Q.Sn)("design:type",J.$)],it.prototype,"_confirmButton",void 0),(0,Q.Cg)([(0,X.x4W)("leftSwapButton"),(0,Q.Sn)("design:type",J.$)],it.prototype,"_leftSwapButton",void 0),(0,Q.Cg)([(0,X.x4W)("rightSwapButton"),(0,Q.Sn)("design:type",J.$)],it.prototype,"_rightSwapButton",void 0),it=(0,Q.Cg)([(0,X.EVk)("TeamSwapPanel",et.Y.uiPet)],it)},62053:(q,K,z)=>{"use strict";z.d(K,{I:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{getCustomData(){return{adId:this.adID,value:this._videoMenu.videoPlayer.errorReason?-1:this._videoMenu.getMinimumThresholdReached()}}};(0,Y.Cg)([(0,Q.MnK)("VideoMenuComponent"),(0,Y.Sn)("design:type",Function)],Z.prototype,"_videoMenu",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("AppendVideoProgress",X.Y.uiVideo)],Z)},83142:(q,K,z)=>{"use strict";z.d(K,{D:()=>Q});var Y=z(62459);class Q extends Y.uAl{}},71072:(q,K,z)=>{"use strict";z.d(K,{V:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(46361),tt=z(83142);let et=class extends tt.D{loadVideoConfig({adID:q,videoID:K,header:z,message:Y}){Q.Aq$.isDefined(q)&&(this._adID=q),K&&(this.videoID=K),z&&(this.tooltipHeaderKey=z),Y&&(this.tooltipMessageKey=Y)}open(){this._menuOpener.open().onPrefabLoaded.addOnce((q=>{const K={videoID:this.videoID,adID:this._adID,header:this.tooltipHeaderKey?this._localizer.getText(this.tooltipHeaderKey):void 0,message:this.tooltipMessageKey?this._localizer.getText(this.tooltipMessageKey):void 0,icon:this.tooltipIconAsset};for(const z of q.findComponentsInChildren(tt.D))z.loadVideoConfig(K);X.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendPostOpenedEvent(this._adID.toString())}))}destroy(){super.destroy()}};(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],et.prototype,"_localizer",void 0),(0,Y.Cg)([(0,Q.MnK)(J.S),(0,Y.Sn)("design:type",J.S)],et.prototype,"_menuOpener",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],et.prototype,"videoID",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],et.prototype,"tooltipHeaderKey",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],et.prototype,"tooltipMessageKey",void 0),(0,Y.Cg)([(0,Q.Bak)(),(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],et.prototype,"tooltipIconAsset",void 0),et=(0,Y.Cg)([(0,Q.EVk)("OpenVideo",Z.Y.uiVideo)],et)},95429:(q,K,z)=>{"use strict";z.d(K,{k:()=>nt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(49237),J=z(28152),tt=z(93963),et=z(62053),it=z(83142),st=z(11682);let nt=class extends it.D{constructor(){super(...arguments),this._videoPlayer=null,this._closeButton=null,this._ctaButton=null,this._minThresholdReached=0}get videoPlayer(){return this._videoPlayer}get closeButton(){return this._closeButton}get callToActionButton(){return this._ctaButton}update(){super.update(),this.calculateMinimumThreshold()}loadVideoConfig(q){this.videoPlayer.youtubeID=q.videoID,this.videoPlayer.init(),this._closeMetric.id=q.adID,this._closeMetric2&&(this._closeMetric2.adID=q.adID)}calculateMinimumThreshold(){if(this._videoPlayer&&this._minThresholdReached<100)if(this._videoPlayer.getPlayerState()===st.w.Playing){const q=this._videoPlayer.getPercentPlayed();q>this._minThresholdReached&&(this._minThresholdReached=q)}else this._videoPlayer.getPlayerState()===st.w.Ended&&(this._minThresholdReached=100)}getMinimumThresholdReached(){return this._minThresholdReached}destroy(){X.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendPostClosedEvent(this._closeMetric.id.toString(),this._videoPlayer.isReady),this.closeButton.onClick.dispose(),this.callToActionButton.onClick.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(st.H),(0,Q.Lr6)(0),(0,Q.nKb)("videoPlayer"),(0,Y.Sn)("design:type",st.H)],nt.prototype,"_videoPlayer",void 0),(0,Y.Cg)([(0,Q.MnK)(Z.$),(0,Q.Lr6)(0),(0,Q.nKb)("close"),(0,Y.Sn)("design:type",Z.$)],nt.prototype,"_closeButton",void 0),(0,Y.Cg)([(0,Q.MnK)(Z.$),(0,Q.Lr6)(0),(0,Q.nKb)("callToAction"),(0,Y.Sn)("design:type",Z.$)],nt.prototype,"_ctaButton",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.b),(0,Y.Sn)("design:type",tt.b)],nt.prototype,"_closeMetric",void 0),(0,Y.Cg)([(0,Q.MnK)(et.I),(0,Y.Sn)("design:type",et.I)],nt.prototype,"_closeMetric2",void 0),nt=(0,Y.Cg)([(0,Q.EVk)("VideoMenuComponent",J.Y.uiVideo)],nt)},11682:(q,K,z)=>{"use strict";z.d(K,{H:()=>et,w:()=>Q});var Y,Q,X=z(8674),Z=z(62459),J=z(35120),tt=z(28152);!function(q){q[q.Unstarted=-1]="Unstarted",q[q.Ended=0]="Ended",q[q.Playing=1]="Playing",q[q.Paused=2]="Paused",q[q.Buffering=3]="Buffering",q[q.VideoCued=5]="VideoCued"}(Q||(Q={}));let et=Y=class extends Z.uAl{constructor(){super(...arguments),this._urlID="",this._autoCreateComponent=!0,this._showControls=!0,this._autoPlay=!0,this._iframe=document.createElement("iframe"),this._canvas=null,this._ytPlayerObject=null,this._onPlayerReady=new Z.HN0,this._onPlayerError=new Z.HN0,this._onPlayerStateChange=new Z.HN0,this._cachedHeightRatio=-1,this._cachedWidthRatio=-1,this._isReady=!1,this._initWaiting=!1,this._isInit=!1,this._errorReason=null}get errorReason(){return this._errorReason}set youtubeID(q){this._urlID=q}get youtubeID(){return this._urlID}set showControls(q){this._showControls=q}get showControls(){return this._showControls}get onPlayerReady(){return this._onPlayerReady}get onPlayerError(){return this._onPlayerError}get onPlayerStateChange(){return this._onPlayerStateChange}get isReady(){return this._isReady}create(){if(super.create(),this._canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0],!Y.GOOGLE_YTPLAYER_API_LOADED){const q=document.createElement("script");q.src=`${Y.YOUTUBE_BASE_URL}player_api`,q.onerror=()=>{this._errorReason="YTPlayer API failed to load"};const K=document.getElementsByTagName("script")[0];K.parentNode.insertBefore(q,K)}}postCreate(){super.postCreate(),this._autoCreateComponent&&this.init()}init(){this._isInit?this.logError("Attempting to initialize more than once."):(this._isInit=!0,Y.GOOGLE_YTPLAYER_API_LOADED?this.createYTPlayerObject():this._initWaiting=!0)}createYTPlayerObject(){if(this._isReady)this.logError("Attempting to create YTPlayer object more than once.");else{if(this._iframe){this._isReady=!0,this._resumeAudioOnRemove=!!J.q.instance.prodigy.audio.currentBgm&&J.q.instance.prodigy.audio.currentBgm.isPlaying,J.q.instance.prodigy.audio.pauseBGM(),this._iframe.setAttribute("class","youtube"),this._iframe.setAttribute("id","ytplayer"),this.updateSrc(),this._iframe.style.position="absolute",this._iframe.style.display="block",this._autoPlay&&(this._iframe.allow="autoplay");document.getElementById("external-ui").appendChild(this._iframe),this.applyTransform()}else this.logError("YouTube iframe is undefined.");this._errorReason="timeout on loading",this._ytPlayerObject=new window.YT.Player("ytplayer",{events:{onReady:()=>{this.onPlayerReadyHandler()},onError:q=>{this.onPlayerErrorHandler(q)},onStateChange:()=>{this.onPlayerStateChangeHandler()}},origin:window.location.origin})}}onPlayerReadyHandler(){this._errorReason=null,this._onPlayerReady.dispatch()}onPlayerErrorHandler(q){switch(q.data){case 2:this._errorReason="Invalid parameter";break;case 5:this._errorReason="HTML 5 player error";break;case 100:this._errorReason="Video not found";break;case 101:this._errorReason="Video not playable"}this._onPlayerError.dispatch()}onPlayerStateChangeHandler(){this._onPlayerStateChange.dispatch()}applyVideoURL(q){this._urlID=q,this._isReady?this.updateSrc():this.logError("Attempting to set url before player is ready. Waiting for initialization.")}updateSrc(){if(Z.Aq$.isDefined(this._urlID)&&0!==this._urlID.length){let q,K;q=this._showControls?1:0,K=this._autoPlay?1:0,this._iframe.setAttribute("src",`${Y.YOUTUBE_BASE_URL}embed/${this._urlID}?autoplay=${K.toString()}&modestbranding=1&controls=${q.toString()}&rel=0&enablejsapi=1`)}else this.logError("YouTube id is required.")}applyTransform(){const q=this._canvas.clientHeight/J.q.instance.game.height,K=this._canvas.clientWidth/J.q.instance.game.width;if(q!==this._cachedHeightRatio||K!==this._cachedWidthRatio){const z=this.GameObject.legacyTransform.width,Y=this.GameObject.legacyTransform.height,Q=this.GameObject.legacyTransform.x,X=this.GameObject.legacyTransform.y;this._iframe.style.height=q*Y+"px",this._iframe.style.width=K*z+"px";const Z=q*X,J=K*Q;this._iframe.style.top=`${Z}px`,this._iframe.style.left=`${J}px`,this._cachedHeightRatio=q,this._cachedWidthRatio=K}}setVisible(q){this._iframe&&(q?(this._iframe.style.visibility="visible",this._iframe.style.display="block"):(this._iframe.style.visibility="hidden",this._iframe.style.display="none"))}playVideo(){var q;(null===(q=this._ytPlayerObject)||void 0===q?void 0:q.playVideo)&&this._ytPlayerObject.playVideo()}stopVideo(q=!1){var K;(null===(K=this._ytPlayerObject)||void 0===K?void 0:K.pauseVideo)&&(this._ytPlayerObject.pauseVideo(),q&&this._ytPlayerObject.seekTo(0))}getPlayerState(){var q;return(null===(q=this._ytPlayerObject)||void 0===q?void 0:q.getPlayerState)?this._ytPlayerObject.getPlayerState():-1}getPercentPlayed(){var q;return(null===(q=this._ytPlayerObject)||void 0===q?void 0:q.getDuration)&&0!==this._ytPlayerObject.getDuration()?Math.floor(this._ytPlayerObject.getCurrentTime()/this._ytPlayerObject.getDuration()*100):0}update(){super.update(),Y.GOOGLE_YTPLAYER_API_LOADED&&(this._initWaiting?(this._initWaiting=!1,this.createYTPlayerObject()):this._isReady&&this.applyTransform())}logError(q){Z.VyI.log(`YouTubeVideo Component: ${q}`,Z.$bb.Verbose)}destroy(){var q;this._resumeAudioOnRemove&&J.q.instance.prodigy.audio.resumeBGM(),this._iframe&&(this._iframe.remove(),this._iframe=null),(null===(q=this._ytPlayerObject)||void 0===q?void 0:q.destroy)&&(this._ytPlayerObject.destroy(),this._ytPlayerObject=null),this._onPlayerReady.dispose(),this._onPlayerError.dispose(),this._onPlayerStateChange.dispose(),super.destroy()}};et.GOOGLE_YTPLAYER_API_LOADED=!1,et.YOUTUBE_BASE_URL="https://www.youtube.com/",(0,X.Cg)([(0,Z.W_S)(),(0,Z.nKb)("id"),(0,X.Sn)("design:type",String)],et.prototype,"_urlID",void 0),(0,X.Cg)([(0,Z.vkK)(),(0,Z.nKb)("autoCreate"),(0,X.Sn)("design:type",Boolean)],et.prototype,"_autoCreateComponent",void 0),(0,X.Cg)([(0,Z.vkK)(),(0,Z.nKb)("showControls"),(0,X.Sn)("design:type",Boolean)],et.prototype,"_showControls",void 0),(0,X.Cg)([(0,Z.vkK)(),(0,Z.nKb)("autoPlay"),(0,X.Sn)("design:type",Boolean)],et.prototype,"_autoPlay",void 0),et=Y=(0,X.Cg)([(0,Z.EVk)("YouTubeVideo",tt.Y.uiVideo)],et),window.onYouTubeIframeAPIReady=()=>{et.GOOGLE_YTPLAYER_API_LOADED=!0}},31029:(q,K,z)=>{"use strict";z.d(K,{u:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(95383);class tt extends Q.$KW{generate(q,K){const z=Q.Gme.checkboxGroup({id:"closeMenus",labelValue:"Close Menus",inputValue:q.closeMenus}),Y=Q.Gme.numberGroup({id:"assetId",labelValue:"Asset ID",inputValue:q.assetId}),X=Q.NyS.create({id:"onComplete",label:"On FSM Complete",signalValue:q.onComplete,componentGUID:this._componentGuid});return Q.XRp.createVertical([z,Y,X,this.createVariablesRecordGroup(q,K)])}createVariablesRecordGroup(q,K){var z;const Y=Object.keys(null!==(z=q.fsmVariables)&&void 0!==z?z:{}),X=Q.XRp.createHorizontal([Q.fqe.create({id:"addComponentKey",inputType:"text",inputValue:K.addComponentKey,onChange:(q,K)=>{this._editorAPI.saveComponentMetadata(this._componentGuid,{[q]:K})}}),Q.X9M.create({id:"addComponentButton",buttonText:"+ Component",onClick:()=>{K.addComponentKey.length<1||Y.includes(K.addComponentKey)||(this._editorAPI.modifyComponent(this._componentGuid,{fsmVariables:Object.assign(Object.assign({},q.fsmVariables),{[K.addComponentKey]:null})}),this._editorAPI.saveComponentMetadata(this._componentGuid,{addComponentKey:void 0}))}})]),Z=Y.map((K=>Q.XRp.createHorizontal([Q.Gme.componentPickerGroup({id:K,labelValue:K,componentType:"any",componentGuid:q.fsmVariables[K],propertyPath:["fsmVariables",K],onChange:z=>{this._editorAPI.modifyComponent(this._componentGuid,{fsmVariables:Object.assign(Object.assign({},q.fsmVariables),{[K]:z})})}}),Q.X9M.create({id:"removeComponentButton",buttonText:"X",nodeSize:"1of12",onClick:()=>{delete q.fsmVariables[K],this._editorAPI.modifyComponent(this._componentGuid,{fsmVariables:q.fsmVariables})}})])));return Z.push(X),Q.XRp.createVertical(Z,{title:"FSM Variables",isContainer:!0,isCollapsible:!0,startCollapsed:!0})}}let et=class extends Q.uAl{constructor(){super(...arguments),this.fsmVariables={},this.onStart=new Q.HN0,this.onComplete=new Q.HN0,this._closeMenus=!0}run(){this.execute(this.assetId,Object.assign({game:X.q.instance.prodigy.game},this.fsmVariables))}execute(q,K,z=null){this._closeMenus&&X.q.instance.prodigy.open.menuCloseAll();const Y=X.q.instance.prodigy.notifications;Y.pause(this),Y.clearNotifications(),this._popupManager&&(this._popupManager.Active=!1),this.onStart.dispatch(K),this.fsmController.execute(this.fsmService.getStateMachine(q),K,(()=>{this._popupManager&&(this._popupManager.Active=!0),Y.resume(this),null==z||z(),this.onComplete.dispatch(K)}))}destroy(){this.onStart.dispose(),this.onComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"assetId",void 0),(0,Y.Cg)([(0,Q.OmD)(),(0,Q.MnK)(Q.uAl),(0,Y.Sn)("design:type",Object)],et.prototype,"fsmVariables",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],et.prototype,"onStart",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],et.prototype,"onComplete",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],et.prototype,"_closeMenus",void 0),(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.IFSMController),(0,Y.Sn)("design:type",Object)],et.prototype,"fsmController",void 0),(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.FSMService),(0,Y.Sn)("design:type",Q.CQn)],et.prototype,"fsmService",void 0),(0,Y.Cg)([(0,Q.Cdj)("PopupHandler"),(0,Y.Sn)("design:type",J.Y)],et.prototype,"_popupManager",void 0),et=(0,Y.Cg)([(0,Q.WR4)(tt),(0,Q.EVk)("FSM",Z.Y.utility)],et)},72012:(q,K,z)=>{"use strict";z.d(K,{y:()=>X});var Y=z(8674),Q=z(62459);let X=class extends Q.uAl{constructor(){super(...arguments),this._currentValue=!1,this._onValueChanged=new Q.HN0,this._onValueChangedToTrue=new Q.HN0,this._onValueChangedToFalse=new Q.HN0}get onValueChanged(){return this._onValueChanged}destroy(){this._onValueChanged.dispose(),this._onValueChangedToTrue.dispose(),this._onValueChangedToFalse.dispose(),super.destroy()}setValue(q){q!==this._currentValue&&(this._currentValue=q,this._onValueChanged.dispatch(),!0===q?this._onValueChangedToTrue.dispatch():!1===q&&this._onValueChangedToFalse.dispatch())}getValue(){return this._currentValue}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"_onValueChanged",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"_onValueChangedToTrue",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"_onValueChangedToFalse",void 0),X=(0,Y.Cg)([(0,Q.EVk)("BooleanStateBase (abstract)")],X)},59599:(q,K,z)=>{"use strict";z.d(K,{f:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(72012);let J=class extends Z.y{create(){var q;super.create(),this.setValue((null===(q=this._saveData)||void 0===q?void 0:q.getData())||this._booleanValue)}setValue(q){super.setValue(q),this._booleanValue=q,this._saveData&&this._saveData.setData(q)}toggleValue(){this.setValue(!this._booleanValue)}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_booleanValue",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.Tyz),(0,Y.Sn)("design:type",Q.Tyz)],J.prototype,"_saveData",void 0),J=(0,Y.Cg)([(0,Q.EVk)("BooleanState",X.Y.utility)],J)},37251:(q,K,z)=>{"use strict";z.d(K,{X:()=>it});var Y,Q=z(8674),X=z(79600),Z=z(62459),J=z(3332),tt=z(79687),et=z(35120);let it=Y=class{constructor(){const q=et.q.instance.prodigy.gameContainer.get("ddf-6c82"),K=q.getCortexRootURL(),z=q.getMultiplayerRootURL();this.init(`${Y.CLIENT_ID}`,{serviceRootURL:K}),this.multiplayer=new J.Multiplayer(`${Y.CLIENT_ID}`,z)}setToken(q,K,z,Y){X.catalystSDK.setToken(q,K,{header:z,body:Y}),"jwt"===q&&K&&this.multiplayer.authenticate(K).catch((q=>{Z.VyI.log("[CatalystSDKWrapper] Failed to authenticate multiplayer client",Z.$bb.Error)}))}init(q,K){X.catalystSDK.init(q,K),X.catalystSDK.authHandler.setCallback("onRenewJWTError",this.onRenewJWTError.bind(this))}onRenewJWTError(q){et.q.instance.prodigy.gameContainer.get("774-4659").showTokenExpiredPopup()}get cloudScript(){return X.catalystSDK.cloudScript}get mailer(){return X.catalystSDK.mailer}get gameAssetsExperiments(){return X.catalystSDK.gameAssetsExperiments}get featureAccess(){return X.catalystSDK.featureAccess}get genericRequest(){return X.catalystSDK.genericRequest}get authHandler(){return X.catalystSDK.authHandler}get isLoggedIn(){return X.catalystSDK.authHandler.isLoggedIn()}};it.CLIENT_ID=1,it=Y=(0,Q.Cg)([(0,tt.injectable)(),(0,Q.Sn)("design:paramtypes",[])],it)},77065:(q,K,z)=>{"use strict";z.d(K,{B:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(38920),J=z(28152);let tt=class extends Q.uAl{constructor(){super(...arguments),this._speedMS=500,this.onStart=new Q.HN0,this.onComplete=new Q.HN0,this._autoStart=!1,this._useFormatting=!1,this._tweenObject=null}set initialNumber(q){this._initialNumber=q}set targetNumber(q){this._targetNumber=q}set speedMS(q){this._speedMS=q}create(){super.create(),this._autoStart&&this.startCounter()}startCounter(){if(this._textObject){if(!this._initialNumber){const q=parseInt(this._textObject.text);isNaN(q)||(this._initialNumber=q)}this._tweenObject={target:this._initialNumber},this._activeTween=X.q.instance.game.add.tween(this._tweenObject,this._tweenObject),this._activeTween.to({target:this._targetNumber},this._speedMS,Q.GS3.Quadratic.Out,!1),this._activeTween.onUpdate.add((()=>{this.setValue(this._tweenObject.target)})),this._activeTween.onTweenComplete.addOnce((()=>{this.setValue(this._targetNumber),this.onComplete.dispatch(),this._activeTween.destroy()})),this._activeTween.onStart.addOnce((()=>{this.onStart.dispatch()})),this._activeTween.start()}else Q.VyI.log("The text component with the number to tween for the CounterTextComponent has not been set.",Q.$bb.Error)}setValue(q){!this._textObject.GameObject||this._textObject.GameObject.isDestroyed||this._textObject.GameObject.isMarkedForDestruction||(this._textObject.text=this._useFormatting?(0,Z.Hk)(q):Math.floor(q).toString())}destroy(){this.onStart.dispose(),this.onComplete.dispose(),X.q.instance.game.tweens.remove(this._activeTween),super.destroy()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_initialNumber",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_targetNumber",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_speedMS",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],tt.prototype,"_textObject",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onStart",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onComplete",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_autoStart",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_useFormatting",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("CounterText",J.Y.ui)],tt)},79399:(q,K,z)=>{"use strict";z.d(K,{R:()=>J});var Y=z(8674),Q=z(62459),X=z(6997),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this.onSemaphoreFired=new Q.HN0,this.onSemaphoreCountUpdate=new Q.HN0,this._initialCount=1}get semaphore(){return this._semaphore}create(){super.create(),this._initialCount>1&&this.initialize(this._initialCount)}destroy(){this.clear(),this.onSemaphoreFired.dispose(),this.onSemaphoreCountUpdate.dispose(),super.destroy()}decrement(){var q;null===(q=this._semaphore)||void 0===q||q.decrement(),this.onSemaphoreCountUpdate.dispatch()}increment(){var q;null===(q=this._semaphore)||void 0===q||q.increment(),this.onSemaphoreCountUpdate.dispatch()}clear(){var q;null===(q=this._semaphore)||void 0===q||q.destroy(),this._semaphore=null}initialize(q){var K;null===(K=this._semaphore)||void 0===K||K.destroy(),this._semaphore=new X.o,this._semaphore.init((()=>{this.onSemaphoreFired.dispatch()}),q)}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onSemaphoreFired",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onSemaphoreCountUpdate",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Q.tfT)(Q.LkC.greaterThan(0)),(0,Y.Sn)("design:type",Number)],J.prototype,"_initialCount",void 0),J=(0,Y.Cg)([(0,Q.EVk)("CountingSemaphore",Z.Y.utility)],J)},93833:(q,K,z)=>{"use strict";z.d(K,{$:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this._runInEditor=!1,this._visible=!0,this._cacheAsBitmap=!1,this._alpha=1,this._name=""}get rootContainer(){return this._rootContainer}get visible(){return this._rootContainer.visible}set visible(q){this._visible=q,this._rootContainer&&(this._rootContainer.visible=q)}get cacheAsBitmap(){return this._rootContainer?this._rootContainer.cacheAsBitmap:this._cacheAsBitmap}set cacheAsBitmap(q){this._cacheAsBitmap=q,this._rootContainer&&(this._rootContainer.cacheAsBitmap=q)}get alpha(){return this._rootContainer?this._rootContainer.alpha:this._alpha}set alpha(q){this._alpha=q,this._rootContainer&&(this._rootContainer.alpha=q)}get mask(){return this._rootContainer?this._rootContainer.mask:null}set mask(q){this._rootContainer&&(q instanceof Q.y4o?this._rootContainer.mask=q.getRootContainer():this._rootContainer.mask=q)}get name(){return this._rootContainer?this._rootContainer.name:this._name}set name(q){this._rootContainer?this._rootContainer.name=q:this._name=q}create(){super.create(),this._renderComponent?this._renderComponent.getRootContainer()?this.initializeProperties():this._renderComponent.onRootContainerSet.addOnce(this.initializeProperties,this):Q.VyI.log("Could not get root container, this object has no render component",Q.$bb.Warning)}initializeProperties(){this._rootContainer=this._renderComponent.getRootContainer(),this._rootContainer.alpha=this._alpha,this._rootContainer.visible=this._visible,this._rootContainer.cacheAsBitmap=this._cacheAsBitmap,this._name&&(this._rootContainer.name=this._name)}};(0,Y.Cg)([(0,Q.Pqz)(Q.y4o),(0,Y.Sn)("design:type",Q.y4o)],Z.prototype,"_renderComponent",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_runInEditor",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_visible",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_cacheAsBitmap",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Z.prototype,"_alpha",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.YLv)("The name to give to the Pixi object this component is attached to"),(0,Y.Sn)("design:type",String)],Z.prototype,"_name",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("GetRootContainer",X.Y.utility)],Z)},70005:(q,K,z)=>{"use strict";z.d(K,{h:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(34829),J=z(28152);let tt=class extends Q.uAl{create(){super.create(),this.attachUpdateFunction()}attachUpdateFunction(){const q=X.q.instance.prodigy.game.time.events.loop(Z.A.TARGET_FPS_40_MS,this.GameObject.update,this.GameObject);this.GameObject.onDestroy.addOnce((()=>X.q.instance.prodigy.game.time.events.remove(q)))}};tt=(0,Y.Cg)([(0,Q.EVk)("HookGameObjectUpdate",J.Y.utility)],tt)},57502:(q,K,z)=>{"use strict";z.d(K,{W:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(68152),J=z(28152);let tt=class extends Q.uAl{constructor(){super(...arguments),this.onDialogueAudioComplete=new Q.HN0}playAudioSprite(q,K,z){this.playAudioData({tag:q,dataTag:K,soundId:z})}playAudioData(q){(0,Z.v)(Q.Aq$.isDefined(q),"PlayDialogueAudio needs defined audio data");const K=[q.tag];q.dataTag&&K.push(q.dataTag),X.q.instance.prodigy.load.assets(K,(()=>{X.q.instance.prodigy.audio.playDialogue(q,(()=>{this.onDialogueAudioComplete.dispatch()}))}))}destroy(){this.onDialogueAudioComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onDialogueAudioComplete",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("PlayDialogueAudio",J.Y.utility)],tt)},77442:(q,K,z)=>{"use strict";z.d(K,{k:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(36045);let J=class extends Z.X{constructor(){super(...arguments),this._inputShapes=[],this._passthroughShapes=[]}isPointOverShape(q){var K;return!!this._inputShapes.some((K=>K.isPointOverShape(q)))&&(null===(K=this._passthroughShapes)||void 0===K?void 0:K.every((K=>K.isPointOverShape(q))))}};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(Z.X),(0,Y.Sn)("design:type",Array)],J.prototype,"_inputShapes",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(Z.X),(0,Y.Sn)("design:type",Array)],J.prototype,"_passthroughShapes",void 0),J=(0,Y.Cg)([(0,Q.EVk)("PassThroughInputShape",X.Y.inputShapes)],J)},36045:(q,K,z)=>{"use strict";z.d(K,{X:()=>X});var Y=z(8674),Q=z(62459);let X=class extends Q.uAl{isPointOverShape(q){return!0}worldPointToParent(q,K){const z=K.worldMatrix.applyInverse(q);return K.localMatrix.apply(z)}};X=(0,Y.Cg)([(0,Q.EVk)("Shape (abstract)")],X)},93709:(q,K,z)=>{"use strict";z.d(K,{H:()=>et});var Y=z(62459),Q=z(35120),X=z(98013),Z=z(77938),J=z(17425),tt=z(59968);class et extends tt.R{constructor(q,K,z,Y,Q){super(q,K,z,2,Y,Q),this.game=q,this.source=z,this.assets=this.getListOfAssets(),this.walkIntoBattle=!1}startLoad(){super.startLoad(),this.loading=!0,this.assets=this.getListOfAssets(),Q.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(q,K){if(!Y.Aq$.isDefined(this.game)||!K||!Y.Aq$.isDefined(this.assets))return;this.cacheBoss(),X.l.removeAll(this.sprites,!0);const z=this.assets[0];let J;J=Q.q.instance.prodigy.assets.getImageBounds(z),this.body=Q.q.instance.prodigy.create.sprite(0,0,z),this.sprites.addChild(this.body),this.body.x=-J[0],this.body.y=-J[3];let tt=null;try{this.sprites.children.forEach((q=>{q.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0,!0),q.animations.add("stand",[0,1,2,3,4,5,6,7],10,!0,!0)})),tt=this.body.animations.add("attack",[8,9,10,11,12,13,14,15],10)}catch(e){this.sprites.children.forEach((q=>{q.animations.add("walk",[0],10,!0,!0),q.animations.add("stand",[0],10,!0,!0)})),tt=this.body.animations.add("attack",[0],10)}tt.onComplete.add(this.stand,this),this.sprites.children.forEach((q=>{q.animations.play("stand")})),this.setHitbox(Z.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox),this.complete=!0,this.loading=!1,this._onLoad.dispatch()}attack(){try{super.attack(),this.sprites.children.forEach((q=>{q.animations.play("attack")}))}catch(e){Y.VyI.log("Error trying to play BossContainer Attack animation",Y.$bb.Error)}}getListOfAssets(){return et.getAssets(this.source)}static getAssets(q){return q.getAssets()}cacheBoss(){J.K.cacheAssets(this.game,this.getListOfAssets(),J.K.zoneAssetsCached)}setRootOffset(q){this._rootOffset=q?{x:q.x,y:q.y}:{x:0,y:0}}}},30441:(q,K,z)=>{"use strict";z.d(K,{R:()=>tt});var Y=z(62459),Q=z(35120),X=z(91207),Z=z(98623),J=z(88022);class tt extends Z.H{constructor(q,K,z,X,Z,tt=3e3){super(q,K,z,X,"Chat Bubble"),this.chatID=0,this.dontHide=Y.Aq$.isDefined(Z)&&Z,this.durationMS=tt,this.add(Q.q.instance.prodigy.create.sprite(-38,-72,J._.General_icons_json,"chat/bubble"))}setID(q){Y.Aq$.isDefined(this.game)&&(this.visible=!0,this.chatID++,this.scale.x=0,this.scale.y=0,this.game.add.tween(this.scale,this).to({x:1.2,y:1.2},200,Y.GS3.Quadratic.Out).to({x:.8,y:1},200,Y.GS3.Quadratic.In).to({x:1,y:.8},200,Y.GS3.Quadratic.Out).to({x:1,y:1},200,Y.GS3.Quadratic.In).start(),Y.Aq$.isDefined(this.emote)&&this.emote.destroy(),this.emote=Q.q.instance.prodigy.create.sprite(-18,-62,X.E.getIconForType("emote",q),null,null,null,40,40),this.emote.name=`Chat Bubble Icon ${q}`,this.add(this.emote),this.dontHide||this.game.time.events.addTimer(this.durationMS,this.onTimerEvent.bind(this,this.chatID),this))}onTimerEvent(q){q===this.chatID&&(this.visible=!1)}}},59968:(q,K,z)=>{"use strict";z.d(K,{R:()=>gt,W:()=>ft});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(88022),J=z(35120),tt=z(92150),et=z(77938),it=z(48975),st=z(73797),nt=z(23082),at=z(12676),rt=z(44356),ot=z(98623),ht=z(57750),ct=(z(34829),z(35564)),dt=z(88253);class lt{constructor(q){this.target={x:-1,y:-1},this.lastTargetBroadcasted={x:-1,y:-1},this.lastUpdateCount=0,this.isMainPlayer=!1,this.game=q}setup(q,K,z){this.screen=q,this.creatureContainer=K,this.isMainPlayer=z,this.isMainPlayer&&(this.game.broadcaster.addAppListener(st.pm.MovePlayer,this.onMovePlayer.bind(this),this),this.game.broadcaster.addAppListener(st.pm.StopPlayer,this.onStopPlayer.bind(this),this),this.game.broadcaster.addAppListener(st.pm.GetTarget,this.onGetTarget.bind(this),this),this.onVisibilityChangedBound=this.onVisibilityChanged.bind(this),document.addEventListener("visibilitychange",this.onVisibilityChangedBound,!1))}destroy(){this.isMainPlayer&&(this.game.broadcaster.removeAppListener(st.pm.MovePlayer,this),this.game.broadcaster.removeAppListener(st.pm.StopPlayer,this),this.game.broadcaster.removeAppListener(st.pm.GetTarget,this),document.removeEventListener("visibilitychange",this.onVisibilityChangedBound,!1)),this.creatureContainer=null,this.game=null,this.screen=null,this.onVisibilityChangedBound=null}update(){J.q.instance.prodigy.updateCount%lt.UPDATE_INTERVAL==0&&(-1===this.target.x&&-1===this.target.y&&(this.creatureContainer.x>0||this.creatureContainer.y>0)&&(this.target.x=this.creatureContainer.x,this.target.y=this.creatureContainer.y),this.broadcastPosition())}broadcastPosition(){if(this.isMainPlayer&&!this.creatureContainer.evtProc&&(this.lastTargetBroadcasted.x!==this.target.x||this.lastTargetBroadcasted.y!==this.target.y)&&J.q.instance.prodigy.updateCount-this.lastUpdateCount>lt.EMIT_MESSAGE&&(Q.cj9.distanceSq(this.target.x,this.target.y,this.lastTargetBroadcasted.x,this.lastTargetBroadcasted.y)>lt.DISTANCE_THRESHOLD||J.q.instance.prodigy.updateCount-this.lastUpdateCount>2*lt.EMIT_MESSAGE)){this.lastUpdateCount=J.q.instance.prodigy.updateCount,this.lastTargetBroadcasted.x=this.target.x,this.lastTargetBroadcasted.y=this.target.y;J.q.instance.prodigy.gameContainer.get("774-4659").emitMessage({action:ct.x.Move,data:{target:this.target}})}}onGetTarget(q=!1){if(q)return Object.assign({},this.target);const{x:K,y:z}=this.screen.path.xyToTile(this.target.x,this.target.y);return{x:K,y:z}}onFindPath(q){var K;if(this.game&&q){const z=this.screen.path.xyToTile(q[0].x,q[0].y);this.creatureContainer.setPath(q,null!==(K=this.screen.path.getCallback(z.x,z.y,this.isMainPlayer))&&void 0!==K?K:void 0),this.broadcastPosition()}}setNewTarget(q,K){const z=this.screen.path.xyToTile(q,K);this.screen.path.isNodeOpen(z.x,z.y)&&(this.creatureContainer.x<=0&&this.creatureContainer.y<=0?(this.creatureContainer.x=q,this.creatureContainer.y=K,Q.Aq$.isDefined(this.creatureContainer.follow)&&(this.creatureContainer.follow.x=q,this.creatureContainer.follow.y=K-1)):this.target.x===q&&this.target.y===K||this.screen.path.findPath(this.creatureContainer.x,this.creatureContainer.y,q,K,this.isMainPlayer).then((q=>this.onFindPath(q))).catch(Q.RQr.createHandler("Unable to find path to target")),this.target.x=q,this.target.y=K)}onMovePlayer(q,K){const z=this.screen.path.xyToTile(q,K);return!!this.screen.path.isNodeOpen(z.x,z.y)&&(this.target.x=q,this.target.y=K,this.screen.path.findPath(this.creatureContainer.x,this.creatureContainer.y,q,K,this.isMainPlayer).then((q=>this.onFindPath(q))).catch(Q.RQr.createHandler("Unable to find path to target")),!0)}onVisibilityChanged(){dt.M.isCutscenePlaying||this.onStopPlayer()}onStopPlayer(){this.screen.isMapScreen&&(this.target.x=this.creatureContainer.x,this.target.y=this.creatureContainer.y,this.creatureContainer.stand(),this.creatureContainer.stopMoveTween())}}lt.DISTANCE_THRESHOLD=4,lt.EMIT_MESSAGE=120,lt.UPDATE_INTERVAL=200;class ut extends ot.H{constructor(q,K,z){super(q,K),this.emoteElement=null,this.setEmoteData(z)}setEmoteData(q){}}ut.EMOTE_DURATION=3;var ft,bt=z(44661),pt=z(85515);class vt{constructor(q,K,z){this.starList=[],this.game=q,this.x=K-10,this.y=z-10,this.animate()}animate(){for(let q=0;q<10;q++)this.addStar(80*q+50*Math.random(),9===q)}finish(){this.game.broadcaster.broadcast(st.hw.Done,this.game,null)}addStar(q,K){const z=J.q.instance.prodigy.create.sprite(this.x+20*Math.random(),this.y+20*Math.random(),Z._.General_core_2_json,"user-star");this.starList.push(z),z.anchor.set(.5,.5),z.scale.set(0,0),z.angle+=Math.round(90*Math.random()),this.game.broadcaster.broadcast(st.lc.AddChild,this.game,[z,pt.E.OverlayLayer]);const Y=.3*Math.random(),X=this.game.add.tween(z.scale,this).to({x:1,y:1},200,Q.GS3.Quadratic.Out).delay(q),tt=this.game.add.tween(z.scale,this).to({x:1.3,y:1.3},250,Q.GS3.Quadratic.InOut),et=this.game.add.tween(z.scale,this).to({x:Y+1,y:Y+1},250,Q.GS3.Quadratic.InOut),it=this.game.add.tween(z.scale,this).to({x:0,y:0},200,Q.GS3.Quadratic.In);it.onTweenComplete.add(this.onStarComplete.bind(this,z),z),K&&it.onTweenComplete.add(this.finish.bind(this),this),X.chain(tt),tt.chain(et),et.chain(it),this.game.add.tween(z,this).to({y:10*Math.random()+90},900,Q.GS3.Quadratic.In).delay(q).start(),this.game.add.tween(z,this).to({x:40*Math.random()+279},900,Q.GS3.Quadratic.Out).delay(q).start(),X.start()}onStarComplete(q){q.visible=!1}destroy(){this.game.tweens.removeAllFromOwner(this);for(const q of this.starList)q.destroy();this.starList.length=0}}!function(q){q[q.Walk=0]="Walk",q[q.Stand=1]="Stand",q[q.Moonwalk=2]="Moonwalk",q[q.Attack=3]="Attack",q[q.Stopped=4]="Stopped"}(ft||(ft={}));class gt extends ot.H{get OnLoad(){return this._onLoad}constructor(q,K,z,Y,X,tt){var et;if(super(q,K),this.walkSpeed=1.5,this.ran=!1,this._onLoad=new Q.HN0,this.nameText=null,this.chatText=null,this.complete=!1,this.captured=null,this.potionIcon=null,this.potencyIcon=null,this.statusEffects=null,this.onPathFound=new Q.HN0,this.onStopped=new Q.HN0,this.onStand=new Q.HN0,this.locomotion=null,this.speed=10,this.fxQueue=0,this.pairs=null,this.evtProc=!1,this.castDelay=0,this.walkIntoBattle=!0,this.battleShy=!1,this.rt=null,this.nameY=0,this.source=z,this.setScale=Q.Aq$.isDefined(Y)?Y:1,this.x=Math.floor(X),this.y=Math.floor(tt),this.ran=this.source.data.hp<=0,this.sprites=J.q.instance.prodigy.create.element(this,0,0),this.indicatorE=J.q.instance.prodigy.create.element(this),this.rt=J.q.instance.prodigy.gameContainer.get("aae-4f6a"),null===(et=this.source.modifiers)||void 0===et?void 0:et.barrier){const q=this.source.modifiers.barrier;this.barrierSprite=J.q.instance.prodigy.create.sprite(0,0,Z._.Boss_titan_barrier_json,"1",{x:.5,y:.5},this.addBarrierSpritesheet.bind(this,"deflect",[1,2,3,4,5,6,7,8,9,10])),this.barrierSpriteBreak=J.q.instance.prodigy.create.sprite(0,0,Z._.Boss_titan_barrier_break_json,"1",{x:.5,y:.5},this.addBarrierSpritesheet.bind(this,"break",[1,2,3,4,5,6,7,8,9,10])),this.barrierSpriteSpark=J.q.instance.prodigy.create.sprite(-165*q.scale.x,19*q.scale.y,Z._.Boss_titan_spark_json,"1",{x:.5,y:.5},this.addBarrierSpritesheet.bind(this,"spark",[1,2,3])),this.add(this.barrierSprite),this.add(this.barrierSpriteBreak),this.add(this.barrierSpriteSpark)}this.nameY=1===Y?-130:-230,z instanceof it.s&&(this.nameY=-150),this.nameText=J.q.instance.prodigy.create.nameFont(this,0,this.nameY,""),this.nameText.GameObject.legacyTransform.group.name="name-text",z instanceof it.s&&this.showName(),this.chatText=J.q.instance.prodigy.create.nameFont(this,0,this.nameY,""),this.chatText.FillColor="#FFB600",this.chatText.GameObject.legacyTransform.group.name="chat-text",this.showChat(!1),this.onDestroy.add(this.stopListeners,this),this.initListeners()}showName(q=null){let K=null;K=Q.Aq$.isDefined(q)?q:this.source.getName(),Q.Aq$.isDefined(K)&&(this.nameText.setText(K),this.nameText.Active=!0)}hideName(){this.nameText.Active=!1,this.nameText.TextObject.TextObject.visible=!1}showChat(q){this.chatText.Active=q,this.chatText.TextObject.TextObject.visible=q}float(q){Q.Aq$.isDefined(this.floatTween)?q||(this.sprites.y=this.sprites.oldY,this.floatTween.stop(),delete this.floatTween):q&&(this.sprites.children.length>0?(this.sprites.oldY=this.sprites.y,this.sprites.y=this.sprites.y-10,this.floatTween=this.game.add.tween(this.sprites,this.sprites).to({y:"-=20"},1400,Q.GS3.Quadratic.InOut).to({y:"+=20"},1400,Q.GS3.Quadratic.InOut).loop(!0),this.floatTween.start()):Q.VyI.log("Cannot tween float because sprites has no children",Q.$bb.Warning))}chat(q,K,z,Y){if(this.game){const Q=q+12;this.chatBubble?this.chatBubble.setID(Q):this.chatBubble=J.q.instance.prodigy.effects.chatBubble(this,Q,K,z,Y)}}startChat(q){if(Q.Aq$.isDefined(this.game)){const K=this.rt.getPhrase(q);Q.Aq$.isDefined(K)&&(Q.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),this.hideName(),this.showChat(!0),this.game.add.tween(this.chatText.GameObject.legacyTransform.group,this).to({y:this.nameText.GameObject.legacyTransform.y-10},500,Q.GS3.Quadratic.Out).to({y:this.nameText.GameObject.legacyTransform.y},500,Q.GS3.Quadratic.In).start(),this.chatText.setText(`"${K}"`),this.timer=window.setInterval((()=>{this.endChat()}),5e3))}}endChat(){Q.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),this.timer=null,this.chatText.Active=!1,this.showName()}hop(q=100,K=null,z=0,Y=20){const X=this.game.add.tween(this,this).to({y:this.y-Y},q,Q.GS3.Quadratic.Out).to({y:this.y},q,Q.GS3.Quadratic.In).start();this.game.add.tween(this,this).to({x:this.x+Math.floor(z/2)},q,Q.GS3.Linear.None).to({x:this.x+z},q,Q.GS3.Linear.None).start(),Q.Aq$.isDefined(K)&&X.onTweenComplete.addOnce(K)}setPath(q,K,z){if(!q||!this.game)return;this.stopMoveTween();const Y=Q.Aq$.isDefined(z)?z:this.walkSpeed;let X=null,Z=null,J=this.x,tt=this.y;for(let et=q.length-1;et>=0;et--){const K=q[et];Q.Aq$.isDefined(K.x)||(K.x=J),Q.Aq$.isDefined(K.y)||(K.y=tt);const z=Q.cj9.distance(K.x,K.y,J,tt);if(0===z)continue;Q.Aq$.isDefined(X)||(X=this.game.add.tween(this,this),Z=this.game.add.tween(this.sprites.scale,this));const it=Math.abs(this.sprites.scale.x);X.to({x:K.x,y:K.y},6*z/Y,Q.GS3.Linear.None),Z.to({x:K.x>J?it:-it},1,Q.GS3.Linear.None),Z.to({},6*z/Y-100,Q.GS3.Linear.None),J=K.x,tt=K.y}if(Q.Aq$.isDefined(X)){let z=1;const Y=()=>{0==--z&&Q.Aq$.isDefined(K)&&K(q)};X.onTweenComplete.addOnce(this.stand,this),X.onTweenComplete.addOnce(Y),Q.Aq$.isDefined(this.onPathFound)&&this.onPathFound.dispatch(q),this.walk(),X.start(),this.moveTween=X,Q.Aq$.isDefined(Z)&&(++z,Z.onTweenComplete.addOnce(Y),Z.start())}else Q.Aq$.isDefined(K)&&K(q),this.stand()}setValidPath(q,K,z,Y,X=!0){q.findPath(this.x,this.y,K,z,X).then((q=>{this.setPath(q,Y)})).catch(Q.RQr.createHandler("Unable to find path"))}walk(){this.mode!==ft.Walk&&(this.mode=ft.Walk,this.playAll("walk"))}flip(){this.sprites.scale.x=-this.sprites.scale.x}faceToward(q){const K=Math.abs(this.sprites.scale.x);this.sprites.scale.x=q>this.x?K:-K}stand(){this.mode!==ft.Stand&&(this.mode=ft.Stand,this.playAll("stand"),this.x=Math.round(this.x),this.y=Math.round(this.y),this.onStand.dispatch())}playAll(q){const K=this.sprites.children.length;for(let z=0;z{q(),this.source instanceof it.s&&this.sendNpcClickedEvent()}))}sendNpcClickedEvent(){var q,K,z,Y,Q;const X=""===(null===(K=null===(q=this.source)||void 0===q?void 0:q.name)||void 0===K?void 0:K.getName())?at.N.Merchant:null===(Y=null===(z=this.source)||void 0===z?void 0:z.name)||void 0===Y?void 0:Y.getName(),Z=`NPC_ID_${X}`;J.q.instance.prodigy.gameContainer.get("20f-5f67").gameWorld.sendNpcClickedEvent({npc_name:X,npc_type:null===(Q=this.source)||void 0===Q?void 0:Q.getNpcType(),npc_id:Z})}onFxAnimationDone(){this.fxQueue>0&&(this.fxQueue--,0===this.fxQueue&&this.game.broadcaster.broadcast(st.ig.AnimationDone,this.source,[]))}onStarsAdded(){!0===this.game.broadcaster.broadcast(st.J3.GetIsRunning,this.game)&&(this.fxQueue++,this.flyingStars=new vt(this.game,this.x,this.y-(this.height-35)))}onCreatureLevelUp(q,K){this.game.state.current!==nt.G.TileScreen&&this.fxQueue++}doBarrierAnimation(){this.barrierSprite.alpha=1,this.barrierSpriteSpark.alpha=1,this.barrierSprite.animations.play("deflect",10),this.barrierSpriteSpark.animations.play("spark",10)}doBarrierBreakAnimation(){this.barrierSpriteBreak.alpha=1,this.barrierSpriteSpark.alpha=1,this.barrierSpriteBreak.animations.play("break",10),this.barrierSpriteSpark.animations.play("spark",10)}addBarrierSpritesheet(q,K,z){z.alpha=0,z.name=q;const Y=this.source.modifiers.barrier;z.x+=Y.offset.x,z.y+=Y.offset.y,z.scale.set(Y.scale.x,Y.scale.y),z.smoothed=!1;z.animations.add(q,K,10,!1).onComplete.add((()=>{z.alpha=0}),z)}displayDamage(q,K,z,Y=J.q.instance.prodigy.effects.characterText.bind(J.q.instance.prodigy.effects)){this.getSource().modifiers.barrier&&(this.getSource().getCurrentHearts()>0?this.doBarrierAnimation():(this.doBarrierBreakAnimation(),q.damage=9999,q.critical=!0,this.retreat())),this.healthOverlay?this.healthOverlay.showDamage(q,K,z,Y):Q.VyI.log("Health overlay missing from CreatureContainer.",Q.$bb.Error)}displayHeal(q,K){this.healthOverlay.showHealingHealthBar(q,K)}createHealthBar(q){return this.nameText&&this.hideName(),this.healthOverlay=null!=q?q:new bt.V(this.game,this),this.healthOverlay}doPuppetBreakAnimation(q){this.healthOverlay.doPuppetBreakAnimation(q)}getHitboxWidth(){return this._hitbox?this._hitbox.width:Math.abs(this.sprites.width)}getHitboxHeight(){return this._hitbox?this._hitbox.height:Math.abs(this.sprites.height)}getHitboxLeft(){return this._hitbox?this._hitbox.xOffset-.5*this._hitbox.width:Q.J6z.getLeft(this.sprites)}getHitboxTop(){return this._hitbox?this._hitbox.yOffset-this._hitbox.height:Q.J6z.getTop(this.sprites)}getTargetingOffset(){return 0}destroy(q={children:!0}){Q.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),this.timer=null,this.rt=null,this.stopTweens(),this.follow&&this.follow.destroy(),this.follow=null,this.locomotion&&(this.locomotion.destroy(),this.locomotion=null),this.healthOverlay&&(this.healthOverlay.destroy(),this.healthOverlay=null),this.nameText&&this.nameText.GameObject.destroy(),this.nameText=null,this.chatText&&this.chatText.GameObject.destroy(),this.chatText=null,this.chatBubble&&this.chatBubble.destroy(),this.chatBubble=null,this.onPathFound.dispose(),this.onStopped.dispose(),this.onStand.dispose(),this._onLoad.dispose(),this.sprites&&(Q.W$e.instance.game.tweens.removeAllFromOwner(this.sprites),this.sprites.destroy()),this.floatTween=null,this.moveTween=null,this.indicatorE&&this.indicatorE.destroy(),this.indicatorE=null,this.flyingStars&&this.flyingStars.destroy(),this.flyingStars=null,this.loadedCallback=null,this.statusEffects&&(this.statusEffects.length=0),this.statusEffects=null,this.pairs&&(this.pairs.length=0),super.destroy(q)}getSource(){return this.source}retreat(q){}shouldPlayRetreatOnDefeat(){return!1}patrol(q,K){this.setPath(q,this.patrol.bind(this,q,K))}}},44661:(q,K,z)=>{"use strict";z.d(K,{V:()=>tt});var Y=z(62459),Q=z(35120),X=z(34829),Z=z(14088),J=z(88022);class tt{constructor(q,K){this.offset={x:0,y:0},this.game=q,this.target=K,this.healthOverlay=new Z.h(q,31,K,[J._.Ui_shared_json]),this.healthOverlay.addOnLoadCallback((()=>{this._healthbar=this.healthOverlay.getUiElement("healthBar"),this._healhBarYOffset=this._healthbar.y,this._healthbar.alpha=0,this._healthbar.setPercentComplete(1),this.puppetControllerBreak=this.healthOverlay.getUiElement("puppetControllerBreak")}))}showDamage(q,K=!1,z,Y=Q.q.instance.prodigy.effects.characterText.bind(Q.q.instance.prodigy.effects)){this.onDisplaysCompleteCallback=z,this.damageObject=q,this._showHealthBar=K,q.miss?this.showMiss():this.showDamageNumbers(Y)}showHealingHealthBar(q,K){this._showHealthBar=!0,this._healthbar.setPercentComplete(Math.max(0,this.target.source.getCurrentHearts()-q)/this.target.source.getMaxHearts()),this.showHealthOverlay(K)}getTargetPercent(){return this.target.source.getCurrentHearts()/this.target.source.getMaxHearts()}showHealthOverlay(q){if(this._showHealthBar&&this.healthOverlay&&!X.s.get("GameConstants.Battle.HIDE_TEMP_HEALTHBAR")){this._healthbar.y=this._healhBarYOffset-this.target.getHitboxHeight()+this.offset.y;const K=this.getTargetPercent(),z=this._healthbar.getPercentageComplete();if(Y.cj9.isNearlyEqual(K,z))null==q||q();else{const Q={percent:z},X=300;this.game.add.tween(this._healthbar,this).to({alpha:1},X,Y.GS3.Linear.None,!0);const Z=this.game.add.tween(this._healthbar,this);Z.to({alpha:0},X,Y.GS3.Linear.None,!0,tt.DURATION+X),q&&Z.onTweenComplete.add(q,this),Z.start();const J=this.game.add.tween(Q,this).to({percent:K},tt.DURATION,Y.GS3.Cubic.Out,!1,X);J.onUpdate.add((()=>{this._healthbar.setPercentComplete(Q.percent)}),this),J.start()}}else null==q||q()}showMiss(){Q.q.instance.prodigy.effects.fadeFlyingImage(this.target.x+this.offset.x,this.target.y+this.offset.y-(this.target.height>>1),J._.General_battle_json,"text-miss"),this.game.time.events.addTimer(tt.DURATION,(()=>{Y.Aq$.isDefined(this.onDisplaysCompleteCallback)&&this.doCallback()}),this)}showDamageNumbers(q=Q.q.instance.prodigy.effects.characterText.bind(Q.q.instance.prodigy.effects)){q||(q=Q.q.instance.prodigy.effects.characterText),q(`-${this.damageObject.damage}`,this.target.x+this.offset.x,this.target.y+this.offset.y,0,{size:1,fontID:12,mono:44},this.showHealthOverlay.bind(this,this.showCritical.bind(this,q))),this.damageObject.damage>0&&this.showNFactor(q)}showCritical(q=Q.q.instance.prodigy.effects.characterText.bind(Q.q.instance.prodigy.effects)){this.damageObject.critical&&this.damageObject.damage>0?Q.q.instance.prodigy.effects.characterImage(Q.q.instance.prodigy.create.sprite(this.target.x+this.offset.x,this.target.y+this.offset.y+50,J._.General_battle_json,"text-critical-hit"),100,this.doCallback.bind(this)):this.showTypeAdvantage(q)}showNFactor(q=Q.q.instance.prodigy.effects.characterText.bind(Q.q.instance.prodigy.effects)){this.damageObject.nFactor>2&&q(Q.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("COMBAT_CAST_BONUS_HIT"),this.target.x+this.offset.x,this.target.y+this.offset.y+50,100,null,null)}showTypeAdvantage(q=Q.q.instance.prodigy.effects.characterText.bind(Q.q.instance.prodigy.effects)){this.damageObject.elementAdvantage>0&&this.damageObject.damage>0?q(Q.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("EFFECT_ATTACK_POWERFUL"),this.target.x+this.offset.x,this.target.y+this.offset.y+50,100,null,(()=>{this.doCallback()})):this.damageObject.elementAdvantage<0&&this.damageObject.damage>0?q(Q.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("EFFECT_ATTACK_WEAK"),this.target.x+this.offset.x,this.target.y+this.offset.y+50,100,null,(()=>{this.doCallback()})):this.doCallback()}doPuppetBreakAnimation(q){this.puppetControllerBreak.visible=!0,this.puppetControllerBreak.y-=this.target.getHitboxHeight()-this.offset.y,this.puppetControllerBreak.x+=this.offset.x-120,this.puppetControllerBreak.playAnimation("animation",!1,q)}getOverlay(){return this.healthOverlay}doCallback(){Y.Aq$.isDefined(this.onDisplaysCompleteCallback)&&this.onDisplaysCompleteCallback()}destroy(){this._showHealthBar=!1,this.damageObject=null,this.target=null,this.onDisplaysCompleteCallback=null,this._healthbar=null,this.puppetControllerBreak=null,this.game=null,this.healthOverlay&&(this.healthOverlay.destroy(),this.healthOverlay=null)}}tt.DURATION=2e3},71857:(q,K,z)=>{"use strict";var Y;z.d(K,{$:()=>Y}),function(q){q.STAND="idle",q.WALK="walk",q.DIG="dig",q.STOP_TO_IDLE="stop-to-idle",q.IDLE_YAWN="idle-yawn",q.STOP_HEAVY="idle-heavy",q.ATTACK="attack",q.ATTACK_BIG="attack",q.ATTACK2="attack2",q.STAND_FLOAT="idle",q.WALK_FLOAT="idle",q.FLOAT_DIG="dig",q.ATTACK_FLOAT="attack",q.ATTACK2_FLOAT="attack2",q.SETUP="idle",q.DANCE_SHIMMY="dance-shimmy",q.DANCE_HAMMER="dance-hammer",q.DANCE_MOONWALK="dance-moonwalk",q.DANCE_RUNNINGMAN="dance-runningman",q.DANCE_DAB="dance-dab",q.STATIC="static"}(Y||(Y={}))},99737:(q,K,z)=>{"use strict";z.d(K,{z:()=>tt});var Y=z(62459),Q=z(23082),X=z(95373),Z=z(59968),J=z(32740);class tt extends J.M{constructor(q,K,z,Q,Z,J,tt){super(q,K,z,Q,Y.Aq$.isDefined(J)?J:Z.x,Y.Aq$.isDefined(tt)?tt:Z.y-1,!1),this.onTargetStopped=new Y.HN0,Y.Aq$.isDefined(Z)&&(this.followController=new X.u(q,this,Z))}update(){super.update(),Y.Aq$.isDefined(this.followController)&&this.followController.update()}getPosition(){return this.position}pathTo(q){let K;K=this.game.state.get(Q.G.TileScreen).path,K||(K=this.game.state.get(Q.G.Museum).path),K?this.setValidPath(K,q.x,q.y,this.targetStopped.bind(this),!0):Y.VyI.log("No pathfinder found!",Y.$bb.Error)}isMoving(){return this.mode===Z.W.Walk}stopMoving(){this.stopMoveTween(),this.stand()}targetStopped(){this.onTargetStopped.dispatch()}destroy(){this.onTargetStopped.dispose(),super.destroy()}}},41538:(q,K,z)=>{"use strict";z.d(K,{g:()=>tt});var Y=z(62459),Q=z(23082),X=z(95373),Z=z(59968),J=z(73877);class tt extends J.P{constructor(q,K,z,Q,Z,J,tt){var et;super(q,K,z,Q,Y.Aq$.isDefined(J)?J:null!==(et=null==Z?void 0:Z.x)&&void 0!==et?et:0,Y.Aq$.isDefined(tt)?tt:(null==Z?void 0:Z.y)?Z.y-1:0,!0),this.onTargetStopped=new Y.HN0,Y.Aq$.isDefined(Z)&&(this.followController=new X.u(q,this,Z))}update(){super.update(),Y.Aq$.isDefined(this.followController)&&this.followController.update()}getPosition(){return this.position}pathTo(q){let K;K=this.game.state.get(Q.G.TileScreen).path,K||(K=this.game.state.get(Q.G.Museum).path),K?this.setValidPath(K,q.x,q.y,this.targetStopped.bind(this),!0):Y.VyI.log("No pathfinder found!",Y.$bb.Error)}isMoving(){return this.mode===Z.W.Walk}stopMoving(){this.stopMoveTween(),this.stand()}setup(q,K){super.setup(q,K),this.sprites.scale.x=this.setScale,this.sprites.scale.y=this.setScale}targetStopped(){this.onTargetStopped.dispatch()}destroy(){this.onTargetStopped.dispose(),super.destroy()}}},32740:(q,K,z)=>{"use strict";z.d(K,{M:()=>ct});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(56942),J=z(51742),tt=z(35120),et=z(98013),it=z(77938),st=z(37773),nt=z(65732),at=z(97317),rt=z(17425),ot=z(80060),ht=z(59968);class ct extends ht.R{constructor(q,K,z,Y,X,Z,J,tt){super(q,K,z,Y,X,Z),this.newIndicatorTweens=[],2!==Y||Q.Aq$.isDefined(it.t.getItem("pet",z.data.ID).metadata.assets.default)||(this.sprites.scale.x=this.sprites.scale.y=2),this.forceSimple=J,this.assets=ct.getAssets(this.source,this.setScale,this.forceSimple),this.onClick=tt}static getAssets(q,K,z,Y){const X=it.t.getItem("pet",q.data.ID).metadata.assets;let tt=null;tt=1!==K&&Q.Aq$.isDefined(X.default)?"default":"reduced";let et=[];if("default"===tt&&z&&!Y&&(tt="small"),Q.Aq$.isDefined(X.default)&&"spine"===X.default.type)et.push(X.default.assetKey?Z.Q[X.default.assetKey]:`spine-${X.default.ID}`);else{const K=q.getID();switch(et.push(`${tt}-pet-${K}`),K){case 125:et=et.concat([J.c.Sfx_attack_storm_wrath]);break;case 126:et=et.concat([J.c.Sfx_attack_forest_fury]);break;case 127:et=et.concat([J.c.Sfx_attack_frigid_blast]);break;case 128:et=et.concat([J.c.Sfx_attack_tidal_twister]);break;case 129:et=et.concat([J.c.Sfx_attack_hot_snow])}}return et}startLoad(q){super.startLoad(),this.loading=!0,this.assets=ct.getAssets(this.source,this.setScale,this.forceSimple),Q.Aq$.isDefined(q)&&(this.assets=this.assets.concat(q)),this.loadPrefabs().then((()=>tt.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this)))).catch((q=>{Q.VyI.log(`Error loading prefabs for MonsterContainer; ${q.message}`,Q.$bb.Error),tt.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}))}loadPrefabs(){const q=Object.create(null,{loadPrefabs:{get:()=>super.loadPrefabs}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield q.loadPrefabs.call(this);const K=tt.q.instance.prodigy.gameContainer.get("983-05a7"),z=K.loadWithDependenciesFromGUID(X.l.LegacyBattleNewIndicator,null);return z.then((q=>{var K;this.newIndicator=q,(null===(K=this.newIndicator)||void 0===K?void 0:K.legacyTransform)&&this.addChild(this.newIndicator.legacyTransform.group),this.newIndicator.active=!1,this._onLoad.addOnce((()=>{this.initializeNewIndicatorPosition()}))})).catch(Q.RQr.createHandler("Error loading NewIndicator for Pet")),ot.d.loadWithInjectedValuesAndDependenciesFromGUID(K,X.l.Charged_level_effect_top,{[nt.E.ChargedCreatureEffectTier]:st.e.getActivePlayerChargedLevelTier(),[nt.E.ChargedCreatureEffectDisplayType]:st.e.activePlayerHasChargedLevels?at.X$.IDLE:at.X$.HIDDEN}).then((q=>{this.chargedFxTop=q,this.addChildAt(this.chargedFxTop.findComponent(Q.y4o).getRootContainer(),this.children.length-1),this.chargedFxTop.active=!1})).catch(Q.RQr.createHandler("Error loading Charged Level Effect (top) for Pet")),ot.d.loadWithInjectedValuesAndDependenciesFromGUID(K,X.l.Charged_level_effect_bottom,{[nt.E.ChargedCreatureEffectTier]:st.e.getActivePlayerChargedLevelTier(),[nt.E.ChargedCreatureEffectDisplayType]:st.e.activePlayerHasChargedLevels?at.X$.IDLE:at.X$.HIDDEN}).then((q=>{this.chargedFxBottom=q,this.addChildAt(this.chargedFxBottom.findComponent(Q.y4o).getRootContainer(),0),this.chargedFxBottom.active=!1})).catch(Q.RQr.createHandler("Error loading Charged Level Effect (bottom) for Pet")),Promise.all([z.promise])}))}setup(q,K){if(!Q.Aq$.isDefined(this.game)||Q.Aq$.isDefined(K)&&!K||!Q.Aq$.isDefined(this.assets))return;et.l.removeAll(this.sprites,!0);const z=this.assets[0];let Y=null;const X=it.t.getItem("pet",this.source.data.ID).metadata.assets.default;Q.Aq$.isDefined(X)&&(Y=X.battleScale);const Z=tt.q.instance.prodigy.assets.getAsset(z);if(Q.Aq$.isDefined(Z)&&this.setHitbox(Z.hitbox),Q.Aq$.isDefined(Z)&&Q.Aq$.isDefined(Z.battleScale)?this.battleScale=Z.battleScale:Q.Aq$.isDefined(Y)?this.battleScale=Y:this.battleScale=1,this.forceSimple){const q=tt.q.instance.prodigy.assets.getImageBounds(z);this.body=tt.q.instance.prodigy.create.sprite(0,0,z),this.sprites.addChild(this.body),this.body.x=-q[0],this.body.y=-this.body.height,this.onClick&&(this.body.inputEnabled=!0,this.body.events.onInputDown.add(this.onClick))}else{const q=tt.q.instance.prodigy.assets.getImageBounds(z),K=-q[0],Y=-q[3];this.body=tt.q.instance.prodigy.create.sprite(K,Y,z),this.sprites.addChild(this.body),this.onClick&&(this.body.inputEnabled=!0,this.body.events.onInputDown.add(this.onClick)),this.sprites.children.forEach((q=>{q.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0,!0),q.animations.add("stand",[8,9,10,11,12,13,14,15],10,!0,!0)}));try{this.body.animations.add("attack",[16,17,18,19,20,21,22,23],10).onComplete.add(this.stand,this)}catch(e){Q.VyI.log(`MonsterContainer setting attack animation failed ${this.name}`,Q.$bb.Warning)}this.stand()}Math.abs(this.sprites.scale.x)<=1&&Q.Aq$.toggleDisplayObjSmooth(this.sprites,!0),this.complete=!0,this.loading=!1,Q.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(this),this._onLoad.dispatch()}attack(){super.attack(),this.playAll("attack")}damaged(){}getSource(){return this.source}cacheAssets(){rt.K.cacheAssets(this.game,this.assets,rt.K.commonAssetsCached)}setNewIndicatorVisibility(q){this.newIndicator&&(this.newIndicator.active=q,q?this.startNewIndicatorEntryAnimation():this.stopNewIndicatorEntryAnimation())}startNewIndicatorEntryAnimation(){var q;if(this.initializeNewIndicatorPosition(),!(null===(q=this.newIndicator)||void 0===q?void 0:q.legacyTransform))return;const K=this.newIndicator.legacyTransform.group.y;this.newIndicator.legacyTransform.group.y+=30,this.newIndicator.legacyTransform.group.alpha=0;const z=tt.q.instance.game.add.tween(this.newIndicator.legacyTransform.group,this).to({y:K-10,alpha:1},500,Q.GS3.Quadratic.InOut).start();z.onTweenComplete.addOnce((()=>{this.newIndicatorTweens.push(tt.q.instance.game.add.tween(this.newIndicator.legacyTransform.group,this).to({y:K},500,Q.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start())})),this.newIndicatorTweens.push(z)}stopNewIndicatorEntryAnimation(){this.newIndicatorTweens.forEach((q=>{q.stop(),q.destroy()})),this.newIndicatorTweens.length=0,this.initializeNewIndicatorPosition()}initializeNewIndicatorPosition(){var q;(null===(q=this.newIndicator)||void 0===q?void 0:q.legacyTransform)&&(this.newIndicator.legacyTransform.group.y=-this.getHitboxHeight(),this.newIndicator.legacyTransform.group.x=-this.getHitboxWidth()/2)}setChargedEffectVisibility(q){this.chargedFxTop.active=q,this.chargedFxBottom.active=q}destroy(q={children:!0}){var K,z,Y;null===(K=this.newIndicator)||void 0===K||K.destroy(),this.newIndicator=null,this.stopNewIndicatorEntryAnimation(),null===(z=this.chargedFxTop)||void 0===z||z.destroy(),this.chargedFxTop=null,null===(Y=this.chargedFxBottom)||void 0===Y||Y.destroy(),this.chargedFxBottom=null,this.onClick=null,this.assets.length=0,super.destroy(q)}}},73877:(q,K,z)=>{"use strict";z.d(K,{P:()=>ct});var Y=z(62459),Q=z(68910),X=z(99625),Z=z(56942),J=z(35120),tt=z(98013),et=z(77938),it=z(83441),st=z(53885),nt=z(53661),at=z(80060),rt=z(62430),ot=z(59968),ht=z(32740);class ct extends ht.M{constructor(q,K,z,Y,Q,X,Z=!1){super(q,K,z,Y,Q,X,!0,null),this._walkOnSetup=!1,this._standOnSetup=Z;const J=et.t.getItem("pet",this.source.data.ID).metadata.assets;this.monsterAsset=J.spine?J.spine:J.default}startLoad(){this._setupSemaphore=2,super.startLoad(),this.loading=!0,this.assets=this.monsterAsset.assetKey?[Z.Q[this.monsterAsset.assetKey]]:[`spine-${this.monsterAsset.ID}`],J.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}walk(){(this._walkOnSetup||this.mode!==ot.W.Walk)&&(this.mode=ot.W.Walk,this._spineAnimator?(this._spineAnimator.playAnimation("walk",!0),this._walkOnSetup=!1):this._walkOnSetup=!0)}stand(){this.mode!==ot.W.Stand&&this._spineComponent&&(this.mode=ot.W.Stand,this._spineAnimator.playAnimation("idle",!0))}attack(){ot.R.prototype.attack.call(this),setTimeout((()=>{this._spineAnimator&&(this._spineAnimator.playAnimation("attack",!1),this._spineAnimator.OnAnimationComplete.addOnce((()=>{this.stand()})))}),10)}getAnimationEventTime(q,K){return Y.E3R.getAnimationEventTime(this._spineComponent.getSpine(),q,K)}playAll(q){this._spineAnimator.playAnimation(q,!0)}setup(q,K){if(--this._setupSemaphore>0||!Y.Aq$.isDefined(this.game)||Y.Aq$.isDefined(K)&&!K||!Y.Aq$.isDefined(this.assets))return;if(tt.l.removeAll(this.sprites,!0),this._petPrefab)return;const z=J.q.instance.prodigy.gameContainer.get("983-05a7");at.d.loadWithInjectedValuesAndDependenciesFromGUID(z,X.l.SpinePetLegacyTransform,{[nt.hi.PetCreatureData]:this.source.data}).then((q=>this.postSetup(q))).catch(Y.RQr.createHandler("Error loading Legacy Spine Pet Prefab"))}postSetup(q){if(this.destroyed||q.isDestroyed)return;this._petPrefab=q,this._petPrefab.setLayer(void 0,!0),this._petPrefab.findComponentInChildren(rt.N).setAssetID(this.source.data.ID),this._spineComponent=q.findComponentInChildren(it.O).spineAnimator.spine,this._spineAnimator=q.findComponentInChildren(it.O).spineAnimator;const K=this._spineComponent.GameObject.transform;K.GameObject.parent.transform.setScale(this.setScale,this.setScale),K.GameObject.parent.transform.setScale(Y.Aq$.isDefined(this.monsterAsset.flip)&&this.monsterAsset.flip?-this.setScale:this.setScale,this.setScale),this.battleScale=Y.Aq$.isDefined(this.monsterAsset.battleScale)?this.monsterAsset.battleScale:1,this.sprites.addChild(q.findComponent(st.u).getRootContainer()),this.sprites.visible=!1,Y.Aq$.toggleDisplayObjSmooth(this.sprites,!0),this.complete=!0,this.loading=!1,this._spineComponent.isLoaded?this.onSpineLoadComplete():this._spineComponent.OnLoaded.addOnce((()=>{this.onSpineLoadComplete()}))}onSpineLoadComplete(){this.sprites.visible=!0,this._walkOnSetup?this.walk():this._standOnSetup&&this.stand(),Y.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(this),this._onLoad.dispatch()}initializeNewIndicatorPosition(){var q;(null===(q=this.newIndicator)||void 0===q?void 0:q.legacyTransform)&&(this.newIndicator.legacyTransform.group.x=-this._spineComponent.getSpine().getBounds().width/2,this.newIndicator.legacyTransform.group.y=-this._spineComponent.getSpine().getBounds().height)}setChargedEffectVisibility(q){var K;null===(K=this._spineComponent.getSpine().pixiSpine)||void 0===K||K.hackTextureBySlotName("shadow",q?Q.Texture.EMPTY:null),super.setChargedEffectVisibility(q)}destroy(q={children:!0}){this._petPrefab&&this._petPrefab.destroy(),this._petPrefab=null,this._spineComponent=null,super.destroy(q)}}ct.DEFAULT_FRAME_RATE=10},37946:(q,K,z)=>{"use strict";z.d(K,{v:()=>Ct});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(5491),J=z(35120),tt=z(82209),et=z(77938),it=z(66207),st=z(73797),nt=z(37193),at=z(23082),rt=z(35564),ot=z(63115),ht=z(83267),ct=z(99625),dt=z(98013),lt=z(65732),ut=z(83441),ft=z(44356),bt=z(53885),pt=z(32500),vt=z(51941),gt=z(47734),mt=z(80060),yt=z(6476),_t=z(89717),Et=z(39325),wt=z(47389),Tt=z(59968),St=z(71857);class At extends Tt.R{get isMainPlayer(){return this._isMainPlayer}get appearanceConfig(){return this._appearanceConfig}constructor(q,K,z,Y,X,Z,J=!1,tt=null){super(q,K,z,Y,X,Z),this.clickEnabled=!0,this.animState=St.$.STATIC,this.lastSmoothing=null,this._isMainPlayer=!1,this.data={},this.flagsToComplete=0,this.collisionHead=null,this.collisionBody=null,this.clickCallback=null,this.forceWeaponVisual=!1,this._isMainPlayer=!!Q.Aq$.isDefined(J)&&J,this._appearanceConfig={isPreview:null==tt?void 0:tt.isPreview,headOnly:null==tt?void 0:tt.headOnly,hideHat:null==tt?void 0:tt.hideHat,hideMount:null==tt?void 0:tt.hideMount,hideWeapon:null==tt?void 0:tt.hideWeapon,chargeRevealEnabled:null==tt?void 0:tt.chargeRevealEnabled},Q.Aq$.isDefined(At.smoothOverride)&&(this.lastSmoothing=At.smoothOverride)}static overrideSmoothing(q){At.smoothOverride=q}getSlotContainer(q){const K=this._spineComponent.getSpine(),z=K.skeleton;return K.getSlotContainerByIndex(z.findSlotIndex(q))}forceOutfit(q){var K;null===(K=this._playerAppearanceSelector)||void 0===K||K.setAppearance(Object.assign(Object.assign({},this._playerDataProvider.getAppearance()),q)).catch(Q.RQr.createHandler("Could not override player appearance"))}startLoad(){super.startLoad(),this.loading=!0,this.postStartLoad()}postStartLoad(){this.setup()}setup(){if(this._playerPrefab)return;const q=J.q.instance.prodigy.gameContainer.get("983-05a7"),K={"1eb-d7b4":this._playerDataProvider,[lt.E.ChargeRevealEffectEnabled]:!this._appearanceConfig.headOnly&&this._appearanceConfig.chargeRevealEnabled};if(this._appearanceConfig.headOnly)mt.d.loadWithInjectedValuesAndDependenciesFromGUID(q,ct.l.MainPlayerIcon,K).then((q=>this.postSetupPlayerIcon(q))).catch(Q.RQr.createHandler("Error loading Main Player Icon Prefab"));else{const z=this.isMainPlayer?ct.l.MainPlayer:ct.l.RemotePlayer;mt.d.loadWithInjectedValuesAndDependenciesFromGUID(q,z,K).then((q=>this.postSetup(q))).catch(Q.RQr.createHandler("Error loading Main Player Prefab"))}}postSetup(q){var K;if(At.HAS_FINISHED_FIRST_LOAD=!0,this.destroyed||q.isDestroyed)return;this._spineAnimator=q.findComponentInChildren(ut.O).spineAnimator,this._spineComponent=this._spineAnimator.spine,this._emoteManagerComponent=q.findComponentInChildren(pt.h),this._animationController=q.findComponentInChildren(Et.F),this._morphTransformation=q.findComponentInChildren(_t.R),q.setLayer(void 0,!0),this._playerAppearanceSelector=q.findComponentInChildren(wt.b),this._playerDataProvider||(this._playerDataProvider=q.findComponentInChildren(Q.bE_).Container.get("1eb-d7b4"));const z=this._spineAnimator.GameObject.transform,Y=z.localScale.x,X=z.localScale.y;z.setScale(Y,X),z.GameObject.parent.transform.setScale(this.setScale,this.setScale);const Z=q.findComponent(bt.u).getRootContainer();this.sprites.addChild(Z),this.sprites.visible=!1,this.setupCollisionBlock(),this.x=Math.round(this.x),this.y=Math.round(this.y),this._playerPrefab=q,null===(K=q.findComponentInChildren(vt.c))||void 0===K||K.onLoadComplete.addOnce((()=>this.onLoadComplete())),this._spineComponent.isLoaded?this.loadAppearance().catch(Q.RQr.createHandler("Could not load player appearance")):this._spineComponent.OnLoaded.addOnce((()=>{this.loadAppearance().catch(Q.RQr.createHandler("Could not load player appearance"))}))}loadAppearance(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._playerDataProvider.getAppearance();if(!q)throw new Error("Could not load PlayerAppearanceData");return this._appearanceConfig.hideWeapon&&(q.weapon=null),this._playerPrefab.findComponentInChildren(wt.b).setAppearance(q)}))}postSetupPlayerIcon(q){var K,z;if(this.destroyed||q.isDestroyed)return;q.setLayer(void 0,!0),this._spineComponent=q.findComponentInChildren(Q.v2j);const Y=q.findComponent(bt.u).getRootContainer();this.sprites.addChild(Y),this.sprites.visible=!1,this._playerDataProvider||(this._playerDataProvider=q.findComponentInChildren(Q.bE_).Container.get("1eb-d7b4")),null===(K=q.findComponentInChildren(vt.c))||void 0===K||K.onLoadComplete.addOnce((()=>this.onLoadComplete())),q.findComponentInChildren(gt.z).updatePlayerAppearance(null===(z=this._playerDataProvider)||void 0===z?void 0:z.getAppearance()),this.x=Math.round(this.x),this.y=Math.round(this.y),this._playerPrefab=q}cleanup(){dt.l.removeAll(this.sprites,!0),this.sprites.alpha=1}onLoadComplete(){this.handlePostSprites(),Q.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(),this._onLoad.dispatch(),this.complete=!0,this.loading=!1,this.sprites.visible=!0,Q.Aq$.isDefined(this.game)&&this.game.broadcaster.broadcast(st.ig.PlayerLoaded,this.game,[this])}handlePostSprites(){this._appearanceConfig.headOnly||this.stand()}setupCollisionBlock(){Q.Aq$.isDefined(this.game)&&(this.collisionHead=this.sprites.addChild(J.q.instance.prodigy.create.emptySprite(-40,-100,70*this.sprites.scale.y,60*this.sprites.scale.y)),this.collisionHead.alpha=0,this.collisionHead.events.onInputDown.add(this.playerClicked.bind(this)),this.collisionBody=this.sprites.addChild(J.q.instance.prodigy.create.emptySprite(-30,-41,50*this.sprites.scale.y,40*this.sprites.scale.y)),this.collisionBody.alpha=0,this.collisionBody.events.onInputDown.add(this.playerClicked.bind(this)),this.setSpriteInput(!0))}reload(q){var K;super.reload(q),(null===(K=this._spineComponent)||void 0===K?void 0:K.isLoaded)&&this.loadAppearance().then((()=>this.OnLoad.dispatch())).catch(Q.RQr.createHandler("Could not load player appearance"))}setSpriteInput(q){this.collisionHead&&(this.collisionHead.inputEnabled=q),this.collisionBody&&(this.collisionBody.inputEnabled=q),this._playerPrefab&&(this._playerPrefab.findComponentInChildren(yt.T).GameObject.active=q)}randomSetup(){this.source.equipment.setOutfit(Math.floor(56*Math.random()+1)),this.source.equipment.setHat(Math.random()>.4?Math.floor(56*Math.random()+1):null),this.source.equipment.setWeapon(Math.floor(56*Math.random()+1)),this.source.appearance.setHair(Math.floor(15*Math.random())+1,Math.floor(21*Math.random())+1),this.source.appearance.setEyeColor(Math.floor(15*Math.random())+1),this.source.appearance.setFace(Math.floor(15*Math.random())+1),this.source.appearance.setSkinColor(Math.floor(5*Math.random())+1)}setData(){this.data={hair:this.source.appearance.getHair(),eyeColor:this.source.appearance.getEyeColor(),face:this.source.appearance.getFace(),skinColor:this.source.appearance.getSkinColor(),weapon:this.source.equipment.getWeapon(),hat:this.source.equipment.getHat(),boots:this.source.equipment.getBoots(),outfit:Q.Aq$.isDefined(this.source.equipment.getOutfit())?this.source.equipment.getOutfit():1},this.data.faceColor=et.t.getItemMetadata("skinColor",this.data.skinColor).faceColor}playerClicked(){Q.Aq$.isDefined(this.clickCallback)&&this.clickEnabled&&this.clickCallback()}damaged(){}setNewAnimationState(q,K){this.animState===q&&q===St.$.WALK||this._appearanceConfig.headOnly||(this._animationController?(Q.Aq$.isDefined(this.game)&&this.game.broadcaster.broadcast(st.J8.NewAnimationStateSet,this,[q]),K&&this._spineAnimator.OnAnimationComplete.addOnce(K,this),this.animState=q,this._morphTransformation.isMorphed()?this.playMorphedAnimationState(q):this._animationController.playAnimation(q)):this.loading?this.animState=q:Q.VyI.log("ERROR: No AnimationController found on CharacterContainer",Q.$bb.Error))}playMorphedAnimationState(q){let K;switch(q){case St.$.ATTACK:case St.$.ATTACK_BIG:case St.$.ATTACK_FLOAT:K=2;break;case St.$.WALK:K=1;break;case St.$.WALK_FLOAT:default:K=0}this._morphTransformation.morphedAppearance.animationController.changeState(K)}walk(){this.setNewAnimationState(St.$.WALK)}stand(){this.x=Math.round(this.x),this.y=Math.round(this.y),this.playStandAnimation()}playStandAnimation(){this.setNewAnimationState(St.$.STAND)}standStill(){this.setNewAnimationState(St.$.STATIC)}moonwalk(){this.setNewAnimationState(St.$.WALK)}dig(q,K){this.setNewAnimationState(St.$.DIG,(()=>this.animState===St.$.WALK?this.walk():this.stand())),setTimeout(K,1e3)}attack(){super.attack(),this.setNewAnimationState(St.$.ATTACK,this.stopHeavy.bind(this))}stopHeavy(){this.setNewAnimationState(St.$.STOP_HEAVY)}setWeaponHidden(q=!0){this._appearanceConfig.hideWeapon=q,this._playerPrefab&&this.loadAppearance().catch(Q.RQr.createHandler("Could not load character appearance"))}dance(q){var K;if(this.stopTweens(),this.isMainPlayer&&J.q.instance.prodigy.gameContainer.get("20f-5f67").playerIdentityAvatar.sendEmoteUsedEvent({emote_name:q,emote_type:ft.H.Dance}),q===St.$.STAND)return void this.stand();const z=null===(K=this._emoteManagerComponent)||void 0===K?void 0:K.emoteAssets.find((K=>K.name===q));z?this.setNewAnimationState(z.name):Q.VyI.log(`ERROR: No EmoteAsset found for dance ID ${q}`,Q.$bb.Error)}playAnimatedEmote(q){}stopAnimatedEmote(){}update(){super.update(),this.locomotion&&this.locomotion.update(),this.lastSmoothing!==At.smoothOverride&&(this.lastSmoothing=At.smoothOverride,this.reload())}destroy(q={children:!0}){this._playerPrefab&&this._playerPrefab.destroy(),this._playerPrefab=null,this._animationController=null,this._spineAnimator=null,this._spineComponent=null,this._emoteManagerComponent=null,this._morphTransformation=null,this._playerAppearanceSelector=null,this.collisionHead=null,this.collisionBody=null,this.clickCallback=null,this._playerDataProvider=null,super.destroy(q)}}At.IDLE_WAIT_TIME_MIN=1e4,At.IDLE_WAIT_TIME_MAX=15e3,At.HAS_FINISHED_FIRST_LOAD=!1,At.smoothOverride=null;class Ct extends At{get OnTransformTimerCreate(){return this.onTransformTimerCreate}get playerPrefab(){return this._playerPrefab}constructor(q,K,z,Y,X,Z,et,it=null,nt=!1,at=!0){super(q,K,z,Y,X,Z,et,it),this.onTransformTimerCreate=new Q.HN0,this.onFullyLoaded=new Q.HN0,this._disableTransform=!1,this._handleLocomotionEvents=!0,this._transformID=null,this._transformationCompleted=!1,this._mountListener=null,this._isMounted=!1,this._timerForPlayerDataUpdate=0,this._updateTime=null,this._membershipSprite=null,this._playerDataSchema=null,this.secondaryNameText=null,this._secondaryNameYOffset=30,this._playerDataSchema=this.source.data,this._disableTransform=nt,this._handleLocomotionEvents=at,this._playerNameplatePositionY=this.nameText.GameObject.legacyTransform.y,this.isMainPlayer?(this._playerDataProvider=J.q.instance.prodigy.gameContainer.get("ad2-c5b2"),this.game.broadcaster.addAppListener(st.n8.MountTogglePressed,this.toggleMount.bind(this),this,"mount"),this._handleLocomotionEvents&&this.game.broadcaster.addAppListener(st.pm.StopPlayer,this.broadcastStopPlayer,this),this.game.broadcaster.addAppListener(st.J8.MorphMarbleCancelled,this.broadcastPlayerTransformCancelled,this)):(this._playerDataProvider=new tt.z,this._playerDataProvider.initialize(z)),this.cullable=!0}showName(q=null){if(super.showName(q),this._isMainPlayer&&this._playerDataProvider.player.shouldShowUsernameAbovePlayer()&&(this._playerDataProvider.player.shouldShowWizardNameAbovePlayer()?(this.secondaryNameText||(this.secondaryNameText=J.q.instance.prodigy.create.nameFont(this,0,this.nameY-this._secondaryNameYOffset,"")),this.secondaryNameText.setText(this._playerDataProvider.loginCredentials.username),this.secondaryNameText.StrokeColor=ht.E.USERNAME_DISPLAY_STROKE_COLOR,this.secondaryNameText.StrokeThickness=ht.E.USERNAME_DISPLAY_STROKE_THICKNESS,this.secondaryNameText.FontSize=ht.E.USERNAME_DISPLAY_FONT_SIZE,this.secondaryNameText.Active=!0):(this.nameText.setText(this._playerDataProvider.loginCredentials.username),this.nameText.StrokeColor=ht.E.USERNAME_DISPLAY_STROKE_COLOR,this.nameText.StrokeThickness=ht.E.USERNAME_DISPLAY_STROKE_THICKNESS,this.nameText.FontSize=ht.E.USERNAME_DISPLAY_FONT_SIZE)),this.source.hasMembership()){if(!this._membershipSprite){let q=X._.Ui_common_neutral_json,K="misc/membership-icon-small";if(it.D.isFeatureEnabled()&&this._isMainPlayer){const z=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getMemberTier(),Y=nt.i.PLAYER_MEMBERSHIP_ICON_IMAGES[z];Y&&(q=Y.atlas,K=Y.frame)}this._membershipSprite=J.q.instance.prodigy.create.sprite(0,0,q,K,new Q.I9Y(.5,.5)),this.add(this._membershipSprite)}this.nameText.GameObject.legacyTransform.x=0;const q=-2,K=-2;this._membershipSprite.x=this.nameText.GameObject.legacyTransform.x-.5*this.nameText.TextWidth+q,this._membershipSprite.y=this.nameText.GameObject.legacyTransform.y+.5*this.nameText.TextHeight+K,this.nameText.GameObject.legacyTransform.x+=Math.floor(.5*this._membershipSprite.width),this._membershipSprite.visible=!0}else this._membershipSprite&&(this._membershipSprite.visible=!1),this.nameText.GameObject.legacyTransform.x=0}hideName(){super.hideName(),this.secondaryNameText&&(this.secondaryNameText.Active=!1,this.secondaryNameText.TextObject.TextObject.visible=!1),this._membershipSprite&&(this._membershipSprite.visible=!1)}startLoad(){this._transformID=this.source.transformID,super.startLoad()}setup(){if(super.setup(),this.isTransformed()){this._playerDataSchema.playerTransformation.transformID>-1&&!this._disableTransform&&(this.flagsToComplete++,this.setTransformationContainer(this._playerDataSchema.playerTransformation.transformType,this._playerDataSchema.playerTransformation.transformID),this._transformationCompleted=!0)}}postSetup(q){if(super.postSetup(q),!this.destroyed&&!q.isDestroyed&&(this._spineComponent.getRootContainer().visible=!this.isTransformed(),this._morphTransformation)){const q=()=>(0,Y.sH)(this,void 0,void 0,(function*(){return this.updateMountAppearance().catch(Q.RQr.createHandler("Failed to update player mount appearance"))}));this._morphTransformation.onPlayerMorphStarted.add(q,this),this._morphTransformation.onPlayerMorphEnded.add(q,this)}}cleanup(){var q,K,z,Y;this._morphTransformation&&(null===(q=this._morphTransformation.onPlayerMorphStarted)||void 0===q||q.removeAll(this),null===(K=this._morphTransformation.onPlayerMorphEnded)||void 0===K||K.removeAll(this)),this._mountListener&&(null===(z=this._mountListener.onMount)||void 0===z||z.removeAll(this),null===(Y=this._mountListener.onDismount)||void 0===Y||Y.removeAll(this)),super.cleanup()}handlePostSprites(){var q,K;this._appearanceConfig.headOnly||(this.isTransformed()&&this._playerDataSchema.playerTransformation.transformID>-1&&!this._disableTransform?null===(q=this._morphTransformation)||void 0===q||q.transformPlayerWithoutEffect(this._playerDataSchema.playerTransformation.transformType,this._playerDataSchema.playerTransformation.transformID,this._playerDataSchema.playerTransformation.maxTime,this._playerDataSchema.playerTransformation.timeRemaining):null===(K=this._morphTransformation)||void 0===K||K.clearMorphedAppearanceWithoutEffect(),this._mountListener=this._playerPrefab.findComponentInChildren(ot.T),this._mountListener.onMount.add((()=>{this._isMounted=!0,this.adjustNameplatePosition()})),this._mountListener.onDismount.add((()=>{this._isMounted=!1,this.adjustNameplatePosition()})),this._appearanceConfig.hideMount&&this._mountListener.setListenersEnabled(!1),this._mountListener.transformationChecker=this,this.updateMountAppearance().catch(Q.RQr.createHandler("Failed to update player mount appearance")),this.animState===St.$.WALK?(this.animState=St.$.SETUP,this.walk()):this.stand())}adjustNameplatePosition(){var q;const K=this.isMounted()?-40:0;if(this.nameText.GameObject.legacyTransform.y=this._playerNameplatePositionY+K,null===(q=this._membershipSprite)||void 0===q?void 0:q.visible){const q=-2;this._membershipSprite.y=this.nameText.GameObject.legacyTransform.y+.5*this.nameText.TextHeight+q}this.secondaryNameText&&(this.secondaryNameText.GameObject.legacyTransform.y=this._playerNameplatePositionY-this._secondaryNameYOffset+K)}updateMountAppearance(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K;yield null!==(K=null===(q=this._mountListener)||void 0===q?void 0:q.updateMountAppearance())&&void 0!==K?K:Promise.resolve()}))}onLoadComplete(){var q;this.handlePostSprites(),Q.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(),this._onLoad.dispatch(),this.complete=!0,this.loading=!1;const K=()=>{this.destroyed||(this.sprites.visible=!0,Q.Aq$.isDefined(this.game)&&this.game.broadcaster.broadcast(st.ig.PlayerLoaded,this.game,[this]),this.onFullyLoaded.dispatch())},z=null===(q=this._mountListener)||void 0===q?void 0:q.updateMountAppearance();Q.Aq$.isDefined(z)?z.then(K).catch(Q.RQr.createHandler("Failed to update player mount appearance")):K()}setData(){var q;this.data={hair:this.source.appearance.getHair(),eyeColor:this.source.appearance.getEyeColor(),face:this.source.appearance.getFace(),skinColor:this.source.appearance.getSkinColor(),weapon:this.source.equipment.getWeapon(),hat:this.source.equipment.getHat(),outfit:null!==(q=this.source.equipment.getOutfit())&&void 0!==q?q:1,boots:this.source.equipment.getBoots(),mount:this.source.equipment.getMount()},this.data.faceColor=et.t.getItemMetadata("skinColor",this.data.skinColor).faceColor}broadcastPlayerFullInfo(q){if(this.locomotion){const K={action:rt.x.Info,data:{target:this.locomotion.target,appearance:this.source.appearance.getData(),isMember:this.source.hasMembership()?1:0,equipment:this.source.equipment.getData(),data:this.source.data,team:this.source.data.team}};null!==this.source.coOpTeam&&(K.data.coOpTeam=this.source.coOpTeam),Q.Aq$.isDefined(q)&&(K.target=q);J.q.instance.prodigy.gameContainer.get("774-4659").emitMessage(K)}}broadcastStopPlayer(){J.q.instance.prodigy.gameContainer.get("774-4659").emitMessage({action:rt.x.Move,data:{target:{x:this.x,y:this.y}}})}disableMovement(){this.evtProc=!0,this.game.input.enabled=!1,this.setPath([]),this.setNewAnimationState(St.$.STAND),this.broadcastStopPlayer()}walk(){var q,K;this.isMounted()?(null===(q=this._mountListener)||void 0===q||q.mountComponent.resumeParticles(),null===(K=this._mountListener)||void 0===K||K.mountComponent.playAnimation(St.$.WALK,.25),this.setNewAnimationState(St.$.STAND)):this.setNewAnimationState(St.$.WALK)}stand(){var q,K;this.x=Math.round(this.x),this.y=Math.round(this.y),this.isMounted()?(null===(q=this._mountListener)||void 0===q||q.mountComponent.pauseParticles(),null===(K=this._mountListener)||void 0===K||K.mountComponent.playAnimation(St.$.STAND,.25)):this.playStandAnimation(),this.onStand.dispatch()}isMounted(){return this._isMounted}toggleMount(){if(this.isMounted())return void this.unmount();let q=this.source.equipment.lastEquippedMount;if(!Q.Aq$.isDefined(q)||0===q){const K=this.source.backpack.getBackpackItemsByType("mount");K.length>0&&(q=K[0].ID)}this.mount(q);J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.appearanceChanged=!0}mount(q){Q.Aq$.isDefined(q)&&this.source.equipment.setMount(q)}unmount(){var q;this.source.equipment.setMount(null),null===(q=this._mountListener)||void 0===q||q.updateMountAppearance()}setTransformationContainer(q,K){const z=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q===Z.V.Pet&&z.encounters.onPetEncountered(K)}setVisible(q){this._spineComponent.getRootContainer().visible=q}transformToItem(q,K,z,Y){var Q,X;if(q===Z.V.Player)return this._playerDataSchema.playerTransformation=null,void this._morphTransformation.clearMorphedAppearance();if(this.isMainPlayer){this.source.transformPlayer(q,K,Y);J.q.instance.prodigy.gameContainer.get("774-4659").emitMessage({action:rt.x.Transform,data:{transformType:q,transformID:K,showEffect:z}})}else this.source.transformPlayer(q,K,0);z?null===(Q=this._morphTransformation)||void 0===Q||Q.transformPlayerWithEffect(q,K,Y):null===(X=this._morphTransformation)||void 0===X||X.transformPlayerWithoutEffect(q,K,Y),this.updateMountAppearance()}resetItemTransformation(q){var K,z,Y;this.source.transformPlayer(Z.V.Player),q?null===(K=this._morphTransformation)||void 0===K||K.clearMorphedAppearance():null===(z=this._morphTransformation)||void 0===z||z.clearMorphedAppearanceWithoutEffect(),null===(Y=this.game)||void 0===Y||Y.broadcaster.broadcast(st.J8.MorphMarbleTimerUpdated)}broadcastPlayerTransformCancelled(){var q;this.source.transformPlayer(Z.V.Player);J.q.instance.prodigy.gameContainer.get("774-4659").emitMessage({action:rt.x.Transform,data:{showEffect:!0}}),null===(q=this.game)||void 0===q||q.broadcaster.broadcast(st.J8.MorphMarbleTimerUpdated)}update(){var q;if(super.update(),null!==this.source.emoteID&&(this.emote(this.source.emoteID),this.source.emoteID=null),null!==this.source.chatID&&(this.startChat(this.source.chatID),this.source.chatID=null),null!==this.source.danceID){J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.dance(this.source.danceID),this.source.danceID=null}null===this._updateTime&&(this._updateTime=Date.now());const K=this.game.state.get(at.G.TileScreen),z=(null==K?void 0:K.isMapScreen)&&K.complete,Y=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(this.isMainPlayer&&this._transformationCompleted&&z&&Q.Aq$.isDefined(null===(q=this._playerDataSchema.playerTransformation)||void 0===q?void 0:q.timeRemaining)&&Y)if(this._playerDataSchema.playerTransformation.timeRemaining>0){const q=Date.now()-this._updateTime;Y.data.playerTransformation.timeRemaining-=q,this._timerForPlayerDataUpdate+=q,this._timerForPlayerDataUpdate>=3e4&&(Y.updated=!0,this._timerForPlayerDataUpdate=0),this.appearanceConfig.isPreview||this.game.broadcaster.broadcast(st.J8.MorphMarbleTimerUpdated)}else Y.data.playerTransformation.transformID>-1&&(this._timerForPlayerDataUpdate=0);this._updateTime=Date.now()}destroy(q={children:!0}){this.isMainPlayer&&(this.game.broadcaster.removeAppListener(st.n8.MountTogglePressed,this,"mount"),this._handleLocomotionEvents&&this.game.broadcaster.removeAppListener(st.pm.StopPlayer,this),this.game.broadcaster.removeAppListener(st.J8.MorphMarbleCancelled,this),this.secondaryNameText&&(this.secondaryNameText.GameObject.destroy(),this.secondaryNameText=null)),this.cleanup(),this._membershipSprite&&this._membershipSprite.destroy(),this._membershipSprite=null,this.onTransformTimerCreate.dispose(),this.onFullyLoaded.dispose(),super.destroy(q)}isTransformed(){return this._playerDataSchema.playerTransformation&&!this._appearanceConfig.headOnly}}},60250:(q,K,z)=>{"use strict";z.d(K,{G:()=>Y,I:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z(35120),tt=z(93709),et=z(59968),it=z(88022);!function(q){q[q.left=0]="left",q[q.right=1]="right"}(Y||(Y={}));class st extends tt.H{hasBracer(q){return this._hasBracer[q]}get bracerCount(){return Z.sumBy(this._hasBracer,(q=>q?1:0))}constructor(q,K,z,Y,Q){super(q,K,z,Y,Q),this._hasBracer=[!0,!0],this._shouldBreakBracer=[!1,!1],this._bracerPiles=[null,null],this._parentElement=K,z.onBracerBreak.add(this.setShouldBreakBracer,this)}setup(){this.cacheBoss();const q=J.q.instance.prodigy.create.element(this.sprites,0,0);this._spine=this.game.add.spine(0,0,"default-boss-19"),this.idle(),q.add(this._spine),this.complete=!0;for(const K in Y)this._bracerPiles[K]=J.q.instance.prodigy.create.image(0,0,it._.Boss_aspen_extras_json,st.BRACER_PILE_ATLAS_FRAMES[K]),this._bracerPiles[K].visible=!1,this._bracerPiles[K].scale.x=-1,this._bracerPiles[K].anchor.set(.5,1),this._parentElement.addChild(this._bracerPiles[K]);this.castDelay=this.getAnimationEventTime("attack-Bracers_both","cast"),this._onLoad.dispatch()}idle(){const q=this.getBracerStateString();this._spine.setAnimationByName(0,`idle-Bracers_${q}`,!0),this._spine.setToSetupPose()}attack(){et.R.prototype.attack.call(this);const q=this.getBracerStateString();this._spine.setAnimationByName(0,`attack-Bracers_${q}`,!1),this._spine.addAnimationByName(0,`idle-Bracers_${q}`,!0),this._spine.setToSetupPose()}setShouldBreakBracer(q){this._shouldBreakBracer[q]=!0}breakBracers(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=Object.assign({},this._shouldBreakBracer),z=this.getBracerStateString();for(const q in Y)this._hasBracer[q]=this._hasBracer[q]&&!this._shouldBreakBracer[q],this._shouldBreakBracer[q]=!1;const Q=this.getBracerStateString();yield X.Egh.timeout(q),yield new Promise((q=>{this._spine.setAnimationByName(0,`break-Bracers_${z}-${Q}`,!1).onComplete=q,this._spine.setToSetupPose()})),this._spine.setAnimationByName(0,`idle-Bracers_${Q}`,!0);for(const q in Y)K[q]&&(this._bracerPiles[q].x=this.x+st.BRACER_PILE_OFFSET.x,this._bracerPiles[q].y=this.y+st.BRACER_PILE_OFFSET.y,this._bracerPiles[q].visible=!0)}))}getBracerStateString(){const q=this._hasBracer[Y.left],K=this._hasBracer[Y.right];return q?K?"both":"left":K?"right":"none"}hideBracerPiles(){for(const q of this._bracerPiles)q.visible=!1}getAnimationEventTime(q,K){return X.E3R.getAnimationEventTime(this._spine,q,K)}update(){this._shouldBreakBracer.some((q=>q))&&this.breakBracers(3e3),super.update()}destroy(){this.source.onBracerBreak.remove(this.setShouldBreakBracer,this),super.destroy()}}st.BRACER_PILE_OFFSET={x:-16,y:29},st.BRACER_PILE_ATLAS_FRAMES=["bracer-pile-l","bracer-pile-r"]},18633:(q,K,z)=>{"use strict";z.d(K,{Z:()=>tt});var Y=z(62459),Q=z(35120),X=z(51742),Z=z(56942),J=z(59968);class tt extends J.R{constructor(q,K,z,Y,Q){super(q,K,z,.5,Y,Q),this._idleState=0,this.game=q,this.source=z,this.assets=[Z.Q.Spine_crystal_clumps_json,X.c.Sfx_crystalbreak,X.c.Sfx_crystalclumpdestroy],this.pairs=[],this.walkIntoBattle=!1,z.onHPChange.add(this.damaged,this)}startLoad(){super.startLoad(),this.loading=!0,Q.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(q,K){var z;if(!this.game||!K||!this.assets)return;const Y=Z.Q.Spine_crystal_clumps_json;this._spine=this.game.add.spine(0,0,Y),this._spine.setAnimationByName(0,"idle-1",!0),this.add(this._spine);const X=Q.q.instance.prodigy.assets.getAsset(Y),J=null===(z=null==X?void 0:X.data)||void 0===z?void 0:z.hitbox;this.setHitbox(J),this.complete=!0,this.loading=!1,this.createHealthBar().getOverlay().scale.x=-1}attack(){}damaged(){const q=this.source.boss.getConfig().tree.breakThresholds;let K=0;const z=this.source.getCurrentHearts()/this.source.getMaxHearts();for(const Y of q)zthis._idleState&&(Q.q.instance.prodigy.audio.playSFX(56,"break",void 0,.25),K===q.length+1&&Y.Egh.timeout(tt.CRYSTAL_DESTROY_DELAY_MS).then((()=>{Q.q.instance.prodigy.audio.playSFX(57,"destroy",void 0,.9)})),this._idleState=K,this._spine.setAnimationByName(0,`crack-${K}`),this._spine.addAnimationByName(0,`idle-${K+1}`,!0))}shouldPlayRetreatOnDefeat(){return!0}retreat(q){q()}destroy(){this.source.onHPChange.remove(this.damaged,this),super.destroy()}}tt.CRYSTAL_DESTROY_DELAY_MS=2700},99687:(q,K,z)=>{"use strict";z.d(K,{X:()=>it});var Y=z(62459),Q=z(95891),X=z(35120),Z=z(98013),J=z(26657),tt=z(59968),et=z(88022);class it extends tt.R{constructor(q,K,z,Y,X){super(q,K,z,2,Y,X),this.tweens=[],this.idleTween=[],this.attackTween=[],this.atlas="",this.atlas=Q.get(z,"source.useShadowAssets",!1)?et._.Boss_gerald_shadow_json:et._.Boss_gerald_json}startLoad(){super.startLoad(),this.loading=!0,X.q.instance.prodigy.load.assets([this.atlas],this.setup.bind(this))}setup(q,K){super.startLoad(),Y.Aq$.isDefined(this.sprite)&&Z.l.removeAll(this.sprite,!0),this.hideName(),this.sprite=X.q.instance.prodigy.create.element(this.sprites,130,-300),this.sprite.scale.x=-1;const z=17,Q=95,tt=this.sprite.addChild(X.q.instance.prodigy.create.sprite(z,Q,this.atlas,"arm-left-1")),et=22,it=43,st=this.sprite.addChild(X.q.instance.prodigy.create.sprite(et,it,this.atlas,"shoulder")),nt=94,at=216,rt=this.sprite.addChild(X.q.instance.prodigy.create.sprite(nt,at,this.atlas,"leg")),ot=62,ht=226,ct=this.sprite.addChild(X.q.instance.prodigy.create.sprite(ot,ht,this.atlas,"foot-left")),dt=118,lt=190,ut=this.sprite.addChild(X.q.instance.prodigy.create.sprite(dt,lt,this.atlas,"waist")),ft=52,bt=46,pt=this.sprite.addChild(X.q.instance.prodigy.create.sprite(ft,bt,this.atlas,"body")),vt=156,gt=215,mt=this.sprite.addChild(X.q.instance.prodigy.create.sprite(vt,gt,this.atlas,"leg")),yt=163,_t=224,Et=this.sprite.addChild(X.q.instance.prodigy.create.sprite(yt,_t,this.atlas,"foot-right")),wt=193,Tt=94,St=this.sprite.addChild(X.q.instance.prodigy.create.sprite(wt,Tt,this.atlas,"arm-right-1")),At=69,Ct=15,Ot=this.sprite.addChild(X.q.instance.prodigy.create.sprite(At,Ct,this.atlas,"head")),It=67,Dt=58,Rt=this.sprite.addChild(X.q.instance.prodigy.create.sprite(It,Dt,this.atlas,"jaw")),Pt=131,Mt=43,Nt=this.sprite.addChild(X.q.instance.prodigy.create.sprite(Pt,Mt,this.atlas,"shoulder"));this.idleTween.push(new J.s(Ot)),this.idleTween[0].set("x",[At,At-4,At-9,At-11,At-11,At-6,At-3,At,At+3,At+4,At+4,At+2],100,9999),this.idleTween.push(new J.s(Ot)),this.idleTween[1].set("y",[Ct,Ct,Ct+3,Ct+6,Ct+8,Ct+10,Ct+11,Ct+9,Ct+7,Ct+5,Ct+3,Ct+2],100,9999),this.idleTween.push(new J.s(Rt)),this.idleTween[2].set("x",[It,It-3,It-9,It-9,It-9,It-5,It-2,It,It+3,It+4,It+4,It+2],100,9999),this.idleTween.push(new J.s(Rt)),this.idleTween[3].set("y",[Dt,Dt+2,Dt+7,Dt+14,Dt+16,Dt+17,Dt+16,Dt+12,Dt+9,Dt+5,Dt+3,Dt+2],100,9999),this.idleTween.push(new J.s(Nt)),this.idleTween[4].set("x",[Pt,Pt-2,Pt-3,Pt-3,Pt-3,Pt-2,Pt-1,Pt+1,Pt+2,Pt+3,Pt+3,Pt+1],100,9999),this.idleTween.push(new J.s(Nt)),this.idleTween[5].set("y",[Mt,Mt+2,Mt+4,Mt+5,Mt+6,Mt+6,Mt+6,Mt+4,Mt+4,Mt+3,Mt+3,Mt+1],100,9999),this.idleTween.push(new J.s(tt)),this.idleTween[6].set("frameName",["arm-left-1","arm-left-1","arm-left-2","arm-left-3","arm-left-3","arm-left-3","arm-left-3","arm-left-2","arm-left-1","arm-left-1","arm-left-1","arm-left-1"],100,9999);const xt=10,Lt=100,kt=7,Bt=103,Ut=196,Ft=101,Gt=196,jt=106;this.idleTween.push(new J.s(St)),this.idleTween[7].set("x",[wt,wt+1,Ut,Gt,Gt-4,Gt-6,Gt-7,Ut-4,wt-1,wt-2,wt-2,wt-1],100,9999),this.idleTween.push(new J.s(St)),this.idleTween[8].set("y",[Tt,Tt+2,Ft,jt,jt+6,jt+5,jt+4,Ft+4,Tt+7,Tt+4,Tt+2,Tt+1],100,9999),this.idleTween.push(new J.s(st)),this.idleTween[9].set("x",[et,et+2,et+3,et+3,et+3,et+2,et+1,et-1,et-2,et-3,et-3,et-1],100,9999),this.idleTween.push(new J.s(st)),this.idleTween[10].set("y",[it,it+2,it+4,it+5,it+6,it+6,it+6,it+4,it+4,it+2,it,it-1],100,9999),this.idleTween.push(new J.s(St)),this.idleTween[11].set("frameName",["arm-right-1","arm-right-1","arm-right-2","arm-right-3","arm-right-3","arm-right-3","arm-right-3","arm-right-2","arm-right-1","arm-right-1","arm-right-1","arm-right-1"],100,9999),this.idleTween.push(new J.s(tt)),this.idleTween[12].set("x",[z,z+3,xt+6,kt,kt+1,kt+2,kt+4,xt+4,z+1,z+2,z+3,z+2],100,9999),this.idleTween.push(new J.s(tt)),this.idleTween[13].set("y",[Q,Q+2,Lt+7,Bt,Bt+1,Bt,Bt-1,Lt,Q+2,Q+1,Q,Q-2],100,9999),this.idleTween.push(new J.s(rt)),this.idleTween[14].set("x",[nt,nt-1,nt-1,nt-1,nt-1,nt-1,nt,nt,nt,nt,nt,nt],100,9999),this.idleTween.push(new J.s(rt)),this.idleTween[15].set("y",[at,at,at+1,at+1,at+1,at+1,at+1,at,at,at,at,at],100,9999),this.idleTween.push(new J.s(ct)),this.idleTween[16].set("x",[ot],100,9999),this.idleTween.push(new J.s(ct)),this.idleTween[17].set("y",[ht],100,9999),this.idleTween.push(new J.s(mt)),this.idleTween[18].set("x",[vt,vt+1,vt+1,vt+1,vt+1,vt+1,vt,vt,vt,vt,vt,vt],100,9999),this.idleTween.push(new J.s(mt)),this.idleTween[19].set("y",[gt,gt,gt+1,gt+1,gt+1,gt+1,gt+1,gt,gt,gt,gt,gt],100,9999),this.idleTween.push(new J.s(Et)),this.idleTween[20].set("x",[yt],100,9999),this.idleTween.push(new J.s(Et)),this.idleTween[21].set("y",[_t],100,9999),this.idleTween.push(new J.s(pt)),this.idleTween[22].set("x",[ft,ft-1,ft-1,ft-1,ft-1,ft,ft+1,ft+2,ft+3,ft+3,ft+3,ft+3],100,9999),this.idleTween.push(new J.s(pt)),this.idleTween[23].set("y",[bt,bt+1,bt+2,bt+3,bt+4,bt+5,bt+4,bt+3,bt+2,bt+1,bt,bt-1],100,9999),this.idleTween.push(new J.s(ut)),this.idleTween[24].set("x",[dt,dt-1,dt-1,dt-1,dt-1,dt,dt+1,dt+2,dt+3,dt+3,dt+3,dt+2],100,9999),this.idleTween.push(new J.s(ut)),this.idleTween[25].set("y",[lt,lt+2,lt+4,lt+6,lt+8,lt+9,lt+8,lt+6,lt+4,lt+2,lt,lt-1],100,9999),this.idleTween.push(new J.s(tt)),this.idleTween[26].set("angle",[0],100,9999),this.idleTween.push(new J.s(tt)),this.idleTween[27].set("visible",[!0],100,9999),this.attackTween.push(new J.s(Ot)),this.attackTween[0].set("x",[At,At-6,At-15,At-27,At-32,At-34,At-33,At-30,At-19,At-7],100,9999),this.attackTween.push(new J.s(Ot)),this.attackTween[1].set("y",[Ct,Ct+6,Ct+13,Ct+20,Ct+22,Ct+22,Ct+20,Ct+16,Ct+12,Ct+5],100,9999),this.attackTween.push(new J.s(Rt)),this.attackTween[2].set("x",[It,It-6,It-14,It-26,It-31,It-33,It-32,It-29,It-18,It-7],100,9999),this.attackTween.push(new J.s(Rt)),this.attackTween[3].set("y",[Dt,Dt+8,Dt+20,Dt+29,Dt+31,Dt+31,Dt+29,Dt+23,Dt+13,Dt+7],100,9999),this.attackTween.push(new J.s(Nt)),this.attackTween[4].set("x",[et,et-4,et+5,et+12,et+16,et+19,et+21,et+25,et+22,et+15],100,9999),this.attackTween.push(new J.s(st)),this.attackTween[5].set("y",[it,it,it-5,it-10,it-11,it-10,it-9,it-5,it,it+2],100,9999),this.attackTween.push(new J.s(tt)),this.attackTween[6].set("frameName",["arm-left-1","arm-left-1","arm-left-1","arm-left-4","arm-left-2","arm-left-5","arm-left-3","arm-left-4","arm-left-4","arm-left-4"],100,9999),this.attackTween.push(new J.s(tt)),this.attackTween[7].set("x",[z,z-5,z-8,z-42-15,z-47+90,z+15+50,z+82+20,z+81+80,z,z+-38],100,9999),this.attackTween.push(new J.s(tt)),this.attackTween[8].set("y",[Q,Q-4,Q-13,Q+73-100,Q+34-65-20,Q+45-185,Q-48+40,Q+17,Q,Q+112],100,9999),this.attackTween.push(new J.s(Nt)),this.attackTween[9].set("x",[Pt,Pt-8,Pt-36,Pt-44,Pt-48,Pt-51,Pt-48,Pt-42,Pt-30,Pt-6],100,9999),this.attackTween.push(new J.s(Nt)),this.attackTween[10].set("y",[Mt,Mt+25,Mt+48,Mt+52,Mt+55,Mt+54,Mt+54,Mt+47,Mt+38,Mt+13],100,9999),this.attackTween.push(new J.s(St)),this.attackTween[11].set("frameName",["arm-right-1","arm-right-4","arm-right-5","arm-right-5","arm-right-5","arm-right-5","arm-right-5","arm-right-5","arm-right-4","arm-right-1"],100,9999),this.attackTween.push(new J.s(St)),this.attackTween[12].set("x",[193,132,58,39,34,35,45,58,127,187],100,9999),this.attackTween.push(new J.s(St)),this.attackTween[13].set("y",[94,125,162,162,162,162,162,162,135,108],100,9999),this.attackTween.push(new J.s(rt)),this.attackTween[14].set("x",[nt,nt-2,nt-5,nt-18,nt-21,nt-22,nt-21,nt-19,nt-12,nt-5],100,9999),this.attackTween.push(new J.s(rt)),this.attackTween[15].set("y",[at,at-2,at-3,at,at,at+1,at+1,at+1,at+1,at+1],100,9999),this.attackTween.push(new J.s(ct)),this.attackTween[16].set("x",[ot,ot-1,ot-7,ot-23,ot-24,ot-23,ot-22,ot-21,ot-15,ot-11],100,9999),this.attackTween.push(new J.s(ct)),this.attackTween[17].set("y",[ht,ht-9,ht-16,ht,ht,ht,ht,ht,ht,ht],100,9999),this.attackTween.push(new J.s(mt)),this.attackTween[18].set("x",[vt,vt,vt,vt-4,vt-7,vt-8,vt-8,vt-6,vt-3,vt-1],100,9999),this.attackTween.push(new J.s(mt)),this.attackTween[19].set("y",[gt,gt,gt,gt,gt,gt,gt,gt,gt,gt],100,9999),this.attackTween.push(new J.s(Et)),this.attackTween[20].set("x",[yt,yt,yt-2,yt-5,yt-6,yt-6,yt-5,yt-3,yt-2,yt],100,9999),this.attackTween.push(new J.s(Et)),this.attackTween[21].set("y",[_t,_t,_t,_t,_t,_t,_t,_t,_t,_t],100,9999),this.attackTween.push(new J.s(pt)),this.attackTween[22].set("x",[ft,ft-3,ft-8,ft-11,ft-12,ft-13,ft-12,ft-11,ft-8,ft-3],100,9999),this.attackTween.push(new J.s(pt)),this.attackTween[23].set("y",[bt,bt+4,bt+6,bt+7,bt+7,bt+7,bt+7,bt+7,bt+6,bt+3],100,9999),this.attackTween.push(new J.s(ut)),this.attackTween[24].set("x",[dt,dt-3,dt-8,dt-11,dt-12,dt-13,dt-12,dt-11,dt-8,dt-3],100,9999),this.attackTween.push(new J.s(ut)),this.attackTween[25].set("y",[lt,lt+4,lt+6,lt+7,lt+7,lt+7,lt+7,lt+7,lt+6,lt+3],100,9999),this.attackTween.push(new J.s(tt)),this.attackTween[26].set("angle",[0,0,0,0,90,90,180,180,270,270],100,9999),this.attackTween.push(new J.s(tt)),this.attackTween[27].set("visible",[!0,!0,!0,!0,!0,!0,!0,!0,!1,!1],100,9999),this.attackTween[0].end(this.playIdle.bind(this)),this.playIdle(),this.complete=!0,this.loading=!1,this._onLoad.dispatch()}playIdle(){if(1!==this.mode){this.mode=1,this.tweens=this.idleTween;for(let q=0;q{"use strict";z.d(K,{K:()=>et});var Y=z(62459),Q=z(35120),X=z(98013),Z=z(17425),J=z(59968),tt=z(56942);class et extends J.R{constructor(q,K,z,Y,Q){super(q,K,z,1,Y,Q),this._spine=null,this.game=q,this.source=z,this.assets=[tt.Q.Default_boss_17_json],this.pairs=[]}startLoad(){super.startLoad(),this.loading=!0,Q.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(q,K){Y.Aq$.isDefined(this.game)&&K&&Y.Aq$.isDefined(this.assets)&&(X.l.removeAll(this.sprites,!0),this._spine=this.game.add.spine(0,0,tt.Q.Default_boss_17_json),this._spine.setToSetupPose(),this._spine.setAnimationByName(0,"mound-blue",!1),this.sprites.addChild(this._spine),this.complete=!0,this.loading=!1,this.createHealthBar())}attack(){}cacheBoss(){Z.K.cacheAssets(this.game,this.assets,Z.K.zoneAssetsCached)}displayDamage(q,K,z){this._spine.setAnimationByName(0,"mound-blue",!1),z()}shouldPlayRetreatOnDefeat(){return!0}retreat(q){this._spine.setAnimationByName(0,"mound-blue",!1),this.game.time.events.addTimer(1e3,q,this)}setTargetable(q){this._spine.setToSetupPose(),this._spine.setAnimationByName(0,q?"mound-purple":"mound-blue",!1),this.source.setRockActive(q)}getHitboxHeight(){return super.getHitboxHeight()+et.HITBOX_HEIGHT_OFFSET}getHitboxTop(){return super.getHitboxTop()+et.HITBOX_TOP_OFFSET}}et.HITBOX_TOP_OFFSET=45,et.HITBOX_HEIGHT_OFFSET=-50},85604:(q,K,z)=>{"use strict";var Y;z.d(K,{y:()=>Y}),function(q){q.Benni="benni",q.Bok="bok",q.Broccolina="broccolina",q.Eve="eve",q.Flora="flora",q.Slurpy="slurpy",q.Wheeler="wheeler",q.Spinner="spinner",q.Snips="snips",q.ImaniStar="imani-star",q.Gale="gale",q.Selena="selena",q.MoonPortal="moon-portal",q.Bargo="bargo",q.Verna="verna",q.DonZorro="don-zorro",q.Harriet="harriet",q.HowardCornelius="howard-cornelius",q.Athena="athena",q.GrottoPortal="grotto-portal",q.KandiKorn="kandi-korn"}(Y||(Y={}))},75214:(q,K,z)=>{"use strict";z.d(K,{p:()=>tt});var Y=z(62459),Q=z(35120),X=z(48975),Z=z(29834),J=z(59968);class tt extends J.R{constructor(q,K,z,Z,J,et,it,st,nt,at,rt,ot){super(q,J,new X.s(q),null,et,it),this.onClick=new Y.HN0;const ht=Q.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService);this.spineNPC=Q.q.instance.prodigy.create.spineNPC(this,z,st,0,0,{text:ht.getText(K),parent:nt},{npcType:Z,npcXCoord:et,npcYCoord:it},(()=>{this.onClick.dispatch()}),void 0,ot),this._rootContainer=this.spineNPC.parent.legacyTransform.group,at&&this.flip(),rt&&(this._rootContainer.alpha=0,this.fade(tt.FADE_IN_OPACITY,tt.FADE_IN_MS))}flip(){this.spineNPC.legacyTransform.group.scale.x=-1}faceToward(q){this.spineNPC.legacyTransform.group.scale.x=q>=this.x?1:-1}fade(q=0,K=1e3){var z;null===(z=this.game.add.tween(this._rootContainer,this))||void 0===z||z.to({alpha:q},K,Y.GS3.Quadratic.In,!0)}playAll(q,K=!0){const z=this.spineNPC.findComponent(Z.j);z.hasAnimation(q)&&z.playAnimation(q,K)}}tt.FADE_IN_OPACITY=1,tt.FADE_IN_MS=800},18155:(q,K,z)=>{"use strict";z.d(K,{N:()=>st});var Y=z(62459),Q=z(35120),X=z(56942),Z=z(34829),J=z(45024),tt=z(87337),et=z(29834),it=z(75214);class st extends it.p{constructor(q,K,z,Y,J,et,it){super(q,K,X.Q.Spine_npc_pippet_json,tt.ac.Boss,z,Y,J,et),this.user=it;const st=Q.q.instance.prodigy.gameContainer.get("f71-42eb"),nt=st.getValue("pippetMaxHP",Z.s.get("GameConstants.Pippet.MAX_HP")),at=null===nt?void 0:parseInt(nt,10);this.mods={boss:{ID:37,maxHP:at,element:"shadow",attacks:[73],name:"Pippet",tag:"pippet",pippetBattle:!0},drops:[{type:"currency",ID:3,N:1}],difficulty:parseInt(st.getValue("pippetDifficulty",Z.s.get("GameConstants.Pippet.DIFFICULTY")),10)}}process(q,K){this.zone=q,this.map=K}alert(){const q=Q.q.instance.prodigy.event.create();Q.q.instance.prodigy.world.pippetEncounterDaily.isComplete()?this.completeDailyCutscene(q):(this.user.disableMovement(),this.startDailyCutscene(q,this.user)),q.start()}startDailyCutscene(q,K){q.function(this.chat.bind(this,1,150,!0)),q.function(this.faceToward.bind(this,K.x)),q.delay(1e3),q.function((()=>{this.chatBubble.destroy(),this.endChat()})),q.delay(300),q.text(Q.q.instance.prodigy.world.pippetEncounterSpawn.dialogue,"pippet"),q.sound(19,"monster"),q.function(this.startBattle.bind(this))}completeDailyCutscene(q){q.text(J.e.data.completeDialogue,"pippet"),q.function((()=>{this.nameText.Active=!1})),q.set(this.pivot,"y",.5*-this.height),q.set(this,"y",this.y-.5*this.height),q.tween(this.scale,{x:0,y:0},1e3,Y.GS3.Linear.None,!0),q.tween(this,{x:640,y:-200,rotation:360},1e3,Y.GS3.Linear.None),q.set(Q.q.instance.prodigy.world,"pippetEncounterSpawn",null),q.set(this,"visible",!1)}startBattle(){const q=this.map.getLocation(),K={x:this.user.x,y:this.user.y};this.mods.screen=this.map.battleBG,Q.q.instance.prodigy.battle.battleStats.type="PippetBattle",this.zone.getBattle(this.map,Q.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("COMBAT_PIPPET_BATTLE"),this.mods,(()=>{Q.q.instance.prodigy.world.pippetEncounterDaily.complete(),Q.q.instance.prodigy.world.it(q,K.x,K.y)}))()}walk(){const q=this.spineNPC.findComponent(et.j);q.hasAnimation("walk")&&q.playAnimation("walk",!0)}stand(){const q=this.spineNPC.findComponent(et.j);q.hasAnimation("idle")&&q.playAnimation("idle",!0)}}},75777:(q,K,z)=>{"use strict";z.d(K,{i:()=>rt});var Y=z(62459),Q=z(87337),X=z(35120),Z=z(77938),J=z(48975),tt=z(23082),et=z(17425),it=z(95373),st=z(26657),nt=z(59968),at=z(88022);class rt extends nt.R{constructor(q,K,z,X,tt,et,st){const nt=new J.s(q);nt.init({npc_name:"",npc_type:Q.ac.Pet,x_coord:et,y_coord:st,npc_animation_id:"idle"}),super(q,K,nt,null,Y.Aq$.isDefined(et)?et:Y.Aq$.isDefined(X)?X.x:0,Y.Aq$.isDefined(st)?st:Y.Aq$.isDefined(X)?X.y:-1),this.mode=-1,this.tweens=[],this.itemData=Z.t.getItem("follow",z).data,this.assets=["pets"],this.onTargetStopped=new Y.HN0,Y.Aq$.isDefined(X)&&(this.followController=new it.u(q,this,X))}destroy(){this.stopTweens(),this.onTargetStopped.dispose(),super.destroy()}startLoad(){super.startLoad(),this.loading=!0,this.assets=[at._.General_pets_json,at._.General_core_2_json],X.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(q,K){if(!Y.Aq$.isDefined(this.game)||!K||!Y.Aq$.isDefined(this.assets))return;const z=this.itemData.tag;this.sprite=X.q.instance.prodigy.create.element(this.sprites,0,0),z.indexOf("cat")>-1?z.indexOf("sparkle")>-1?this.createSparkleCat(z,this.itemData.spriteOffsets):this.createCat(z,this.itemData.spriteOffsets):z.indexOf("dog")>-1?z.indexOf("sparkle")>-1?this.createSparkleDog(z):this.createDog(z):z.indexOf("rodent")>-1?z.indexOf("sparkle")>-1?this.createSparkleRodent(z):this.createRodent(z):z.indexOf("bird")>-1?this.createBird(z):z.indexOf("lizard")>-1?this.createLizard(z):z.indexOf("turtle")>-1?this.createTurtle(z,this.itemData.spriteOffsets):z.indexOf("reindeer")>-1?this.createReindeer(z):z.indexOf("penguin")>-1?this.createPenguin(z):z.indexOf("snowman")>-1?this.createSnowman(z):z.indexOf("panda")>-1?this.createPanda(z):z.indexOf("sheep")>-1?this.createSheep(z):z.indexOf("cactus")>-1?this.createCactus(z):z.indexOf("fox")>-1&&this.createFox(z),Y.Aq$.isDefined(this.itemData.extraAnims)&&this.itemData.extraAnims.forEach((q=>{const K=this.sprite.addChild(X.q.instance.prodigy.create.sprite(q.offsets.x,q.offsets.y,at._.General_pets_json,`${z}/${q.animFrames[0]}`));let Y=null;Y="walk"===q.targetCycle?this.walkTween:this.standTween,Y.push(new st.s(K)),Y[Y.length-1].set("frameName",q.animFrames.map((q=>`${z}/${q}`),this),80,9999)}),this),this.complete=!0,this.loading=!1,this.stopMoving(),Y.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(),this._onLoad.dispatch()}setupWalk(q){const K=`${q}/walk/`;this.walkTween=[],this.walkTween.push(new st.s(this.body)),this.walkTween[0].set("y",[this.body.y,this.body.y+1],150,9999),this.walkTween.push(new st.s(this.legs)),this.walkTween[1].set("frameName",[`${K}legs-0`,`${K}legs-1`,`${K}legs-2`,`${K}legs-3`],150,9999),Y.Aq$.isDefined(this.tail)&&(this.walkTween.push(new st.s(this.tail)),this.walkTween[2].set("frameName",[`${K}tail-0`,`${K}tail-1`],150,9999),this.walkTween.push(new st.s(this.tail)),this.walkTween[3].set("y",[this.tail.y,this.tail.y+1],150,9999))}setupStand(q){const K=`${q}/idle/`;this.standTween=[],Y.Aq$.isDefined(this.tail)&&(this.standTween.push(new st.s(this.tail)),this.standTween[0].set("y",[this.tail.y+6],1e4,9999),this.standTween.push(new st.s(this.tail)),this.standTween[1].set("frameName",[`${K}tail-0`,`${K}tail-1`,`${K}tail-2`],150,9999))}setSpriteDefaults(q){const K=(q,K)=>{Y.Aq$.isDefined(K)&&(Y.Aq$.isDefined(K._defaultAnims)&&(K.frameName=K._defaultAnims[q]),Y.Aq$.isDefined(K._defaultVisibility)&&(K.visible=K._defaultVisibility[q]),Y.Aq$.isDefined(K._defaults)&&(K.x=K._defaults[q][0],K.y=K._defaults[q][1]))};K(q,this.head),K(q,this.body),K(q,this.legs),K(q,this.tail)}createCat(q,K){const z=Y.Aq$.isDefined(K)?K:{};Y.Aq$.isDefined(z.tail)||(z.tail={x:-12,y:1}),Y.Aq$.isDefined(z.body)||(z.body={x:0,y:0}),Y.Aq$.isDefined(z.legs)||(z.legs={x:-1,y:29}),this.tail=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0+z.tail.x,0+z.tail.y,at._.General_pets_json,`${q}/walk/tail-0`)),this.body=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0+z.body.x,0+z.body.y,at._.General_pets_json,`${q}/walk/body-0`)),this.legs=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0+z.legs.x,0+z.legs.y,at._.General_pets_json,`${q}/walk/legs-0`)),this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(this.body.width/2),this.setupWalk(q),this.setupStand(q)}createSparkleCat(q,K){const z=Y.Aq$.isDefined(K)?K:{};Y.Aq$.isDefined(z.tail)||(z.tail={x:-12,y:1}),Y.Aq$.isDefined(z.body)||(z.body={x:0,y:0}),Y.Aq$.isDefined(z.legs)||(z.legs={x:-1,y:29}),this.tail=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0+z.tail.x,0+z.tail.y,at._.General_pets_json,`${q}/walk/tail-0`)),this.tail._defaultVisibility={walk:!0,stand:!1},this.body=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0+z.body.x,0+z.body.y,at._.General_pets_json,`${q}/walk/body-0`)),this.body._defaults={walk:[0,0],stand:[-12,0]},this.legs=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0+z.legs.x,0+z.legs.y,at._.General_pets_json,`${q}/walk/legs-0`)),this.legs._defaultVisibility={walk:!0,stand:!1},this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(.5*this.body.width),this.setupWalk(q);const Q=`${q}/idle/`;this.standTween=[],this.standTween.push(new st.s(this.body)),this.standTween[0].set("frameName",[`${Q}body-0`,`${Q}body-1`,`${Q}body-2`,`${Q}body-3`],150,9999)}createDog(q){this.tail=this.sprite.addChild(X.q.instance.prodigy.create.sprite(-12,9,at._.General_pets_json,`${q}/walk/tail-0`)),this.body=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0,0,at._.General_pets_json,`${q}/walk/body-0`)),this.legs=this.sprite.addChild(X.q.instance.prodigy.create.sprite(-1,33,at._.General_pets_json,`${q}/walk/legs-0`)),this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(this.body.width/2),this.setupWalk(q),this.setupStand(q)}createSparkleDog(q){this.tail=this.sprite.addChild(X.q.instance.prodigy.create.sprite(-12,9,at._.General_pets_json,`${q}/walk/tail-0`)),this.tail._defaultVisibility={walk:!0,stand:!1},this.body=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0,0,at._.General_pets_json,`${q}/walk/body-0`)),this.body._defaults={walk:[0,0],stand:[-12,0]},this.legs=this.sprite.addChild(X.q.instance.prodigy.create.sprite(-1,33,at._.General_pets_json,`${q}/walk/legs-0`)),this.legs._defaultVisibility={walk:!0,stand:!1},this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(.5*this.body.width),this.setupWalk(q);const K=`${q}/idle/`;this.standTween=[],this.standTween.push(new st.s(this.body)),this.standTween[0].set("frameName",[`${K}body-0`,`${K}body-1`,`${K}body-2`,`${K}body-3`],150,9999)}createRodent(q){this.body=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0,0,at._.General_pets_json,`${q}/walk/body-0`)),this.legs=this.sprite.addChild(X.q.instance.prodigy.create.sprite(2,18,at._.General_pets_json,`${q}/walk/legs-0`)),this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(this.body.width/2),this.setupWalk(q),this.setupStand(q)}createSparkleRodent(q){this.body=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0,0,at._.General_pets_json,`${q}/walk/body-0`)),this.sprite.y=-this.body.height,this.sprite.x=-Math.floor(.5*this.body.width);const K=`${q}/walk/`;this.walkTween=[],this.walkTween.push(new st.s(this.body)),this.walkTween[0].set("frameName",[`${K}body-0`,`${K}body-1`,`${K}body-2`,`${K}body-3`],150,9999);const z=`${q}/idle/`;this.standTween=[],this.standTween.push(new st.s(this.body)),this.standTween[0].set("frameName",[`${z}body-0`,`${z}body-1`,`${z}body-2`,`${z}body-3`],150,9999)}createBird(q){const K=Y.Aq$.isDefined(this.itemData.numWalkAnimFrames)?this.itemData.numWalkAnimFrames:4;this.body=this.sprite.addChild(X.q.instance.prodigy.create.sprite(0,0,at._.General_pets_json,`${q}/walk/body-0`)),this.sprite.y=-this.body.height-30,this.sprite.x=-Math.floor(this.body.width/2);const z=`${q}/walk/`;this.walkTween=[],this.walkTween.push(new st.s(this.body));const Q=[];for(let Y=0;Y0){this.standTween.push(new st.s(this.body)),this.standTween.push(new st.s(this.tail));for(let q=0;q{"use strict";z.d(K,{Z:()=>et});var Y=z(62459),Q=z(35120),X=z(99625),Z=z(42113),J=z(24110),tt=z(98623);class et extends tt.H{constructor(q,K,z=0,tt=0){super(q,K,z,tt);Q.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(X.l.LeaderboardView).then((q=>{const K=new Y._mx;K.addComponent(Y.dLy),K.addComponent(J.B).getRootContainer().setParent(this),K.addChild(q),this._leaderboardPrefab=q,this._leaderboardDataProvider=q.findComponent(Z.O),this._lastLeaderboardRefresh=Date.now()})).catch(Y.RQr.createHandler("Could not load leaderboards"))}destroy(){var q;null===(q=this._leaderboardPrefab)||void 0===q||q.destroy(),super.destroy()}update(){var q;super.update(),this._lastLeaderboardRefresh+et.REFRESH_TIMEOUT_MS{"use strict";z.d(K,{R:()=>it});var Y=z(62459),Q=z(35120),X=z(29738),Z=z(84938),J=z(79825),tt=z(57750),et=z(17425);class it{static isAudioSprite(q){return Y.Aq$.isDefined(q.s)&&Y.Aq$.isDefined(q.d)||Y.Aq$.isDefined(q.dataTag)&&Y.Aq$.isDefined(q.soundId)}static isLegacyAudioSprite(q){return Y.Aq$.isDefined(q.s)&&Y.Aq$.isDefined(q.d)}constructor(q){this.game=null,this.currentBgm=null,this.autoplay=!0,this.currentVoice=null,this._doNotResume=!1,this.game=q;let K=null,z=null;void 0!==document.hidden?(K="hidden",z="visibilitychange"):void 0!==document.msHidden?(K="msHidden",z="msvisibilitychange"):void 0!==document.webkitHidden?(K="webkitHidden",z="webkitvisibilitychange"):void 0!==document.mozHidden&&(K="mozHidden",z="mozvisibilitychange"),null!==K&&document.addEventListener(z,this.onVisibilityChanged.bind(this,K)),Z.B.musicVolume.onChanged.add(this.setBGMVolume,this)}clearOldSounds(){let q=this.game.sound.sounds.length-1;for(;q>=0;){const K=this.game.sound.sounds[q];K&&!K.isDestroyed&&!K[tt.k.DESTROYED]&&K.isPlaying||this.game.sound.sounds.splice(q,1),q--}}playSFX(q,K,z=null,X=1,J=!1,tt){var it;this.clearOldSounds();const st=et.K.getAssetID("sfx",q),nt=null===(it=Q.q.instance.prodigy.assets.getAsset(st))||void 0===it?void 0:it.data;if(!nt)return Y.VyI.log(`Could not find ${st} in assets, so cannot play the sfx.`,Y.$bb.Warning),null==z||z(),null;const at=nt.clips[K],rt=(null!=tt?tt:Z.B.effectVolume.value)*X,ot=this.game.cache.getSound(st);return ot?(ot.addMarker("play",at.s,at.d),ot.playMarker("play",0,rt,J,void 0,z),ot):(Y.VyI.log(`Could not play sfx-${q} as it was not in the cache.`,Y.$bb.Warning),null==z||z(),null)}playSFXFromGUID(q,K=null,z=0,Y=-1,Q=!1){this.clearOldSounds();const X=Z.B.effectVolume.value,J=this.game.sound.add(q,X);let tt;return J&&!J.isDestroyed&&J.sound&&null!==J.sound.instances?(tt=!1,this.setupMarker(J,K,z,Y,X,Q)):(tt=!0,this.logSoundError(J,"sound effect")),tt&&K&&this.game.time.events.addTimer(1,K,this),J}playSound(q,K=!1,z){const Q=Y.o5U.getIOSVersion();this.clearOldSounds();const X=null!=z?z:Z.B.effectVolume.value,J=et.K.getAssetID("sfx",q),tt=this.game.cache.getSound(J);return tt?(tt.addMarker("play",0,tt.duration),tt.playMarker("play",0,X,K&&(null===Q||Q>9))):Y.VyI.log(`Could not play sfx-${q} as it was not in the cache.`,Y.$bb.Warning),tt}playBGM(q,K){var z;const Q=Y.o5U.getIOSVersion();if(null!==Q&&Q<=9)return;const X=et.K.getAssetID("bgm",q);if(this.currentBgm&&et.K.matchingAssets(this.currentBgm.key,X))return;null===(z=this.currentBgm)||void 0===z||z.stop(),this.clearOldSounds();const J=this.game.cache.getSound(X);J?(J.singleInstance=!0,this.currentBgm=J,this.currentBgm.playWithOptions({start:0,volume:Z.B.musicVolume.value,loop:K})):Y.VyI.log(`Background music not found in cache: ${X}`,Y.$bb.Error)}pauseBGM(){var q;null===(q=this.currentBgm)||void 0===q||q.pause()}resumeBGM(){var q;null===(q=this.currentBgm)||void 0===q||q.resume()}setBGMVolume(q){var K,z;(null===(z=null===(K=this.currentBgm)||void 0===K?void 0:K.instances)||void 0===z?void 0:z[0])&&(this.currentBgm.instances[0].volume=q)}playDialogue(q,K=(()=>null)){var z;if(this.clearOldSounds(),!X.O.isEnglishLocale())return Y.VyI.log(`Skipping dialogue ${q.tag} because it is not localized`,Y.$bb.Info),Y.Egh.timeout(it.FAKE_DIALOGUE_DURATION_MS).finally((()=>null==K?void 0:K())).catch((()=>Y.RQr.createHandler("[AudioController] Error with dialogue timeout"))),null;null===(z=this.currentVoice)||void 0===z||z.stop(),this._bgmLens&&(this._bgmLens.remove(),this._bgmLens=void 0);const Q=Z.B.voiceVolume.value,J=this.game.sound.add(q.tag,Q);if(J&&!J.isDestroyed&&J.sound&&null!==J.sound.instances){this.currentBgm&&Q>0&&(this._bgmLens=Z.B.musicVolume.addSmoothedLensMultiplier(.25)),it.isAudioSprite(q)?it.isLegacyAudioSprite(q)?this.setupMarker(J,K,q.s,q.d,Q):this.playAudioSprite(J,q,Q,K):this.setupMarker(J,K,0,J.duration,Q),this.currentVoice=J;const z=()=>{this._bgmLens&&(this._bgmLens.remove(),this._bgmLens=void 0),this.currentVoice=null};this.currentVoice.onStop.add(z,this),this.currentVoice.onComplete.add(z,this)}else this.logSoundError(J,"voice"),this.game.time.events.addTimer(1,K,this);return J}playVoice(q,K,z=0,Y=-1){return this.playDialogue({tag:q,s:z,d:Y},K)}stopVoice(){this.currentVoice&&(this.currentVoice.destroy(),this.currentVoice=null),this._bgmLens&&(this._bgmLens.remove(),this._bgmLens=void 0)}onVisibilityChanged(q){(Y.o5U.isIOS()||Y.o5U.isAndroid())&&(document[q]?(this._doNotResume=this.currentBgm&&!this.currentBgm.isPlaying,this.pauseBGM(),this.currentVoice&&this.currentVoice.pause()):(this._doNotResume?this._doNotResume=!1:this.resumeBGM(),this.currentVoice&&this.currentVoice.resume()))}isVoicePlaying(q){return this.currentVoice&&!this.currentVoice.isDestroyed&&this.currentVoice.isPlaying&&et.K.matchingAssets(this.currentVoice.key,q)}playAudioSprite(q,K,z,Q=(()=>null)){var X;if(!q.sprites.hasOwnProperty(K.soundId)){const z=this.game.cache.getJSON(K.dataTag);if(!(null===(X=null==z?void 0:z.spritemap)||void 0===X?void 0:X.hasOwnProperty(K.soundId)))return Y.VyI.log(`Could not play audio sprite ${K.soundId}, failed to load sprite data JSON`,Y.$bb.Error),void Q();q.addSprites(z.spritemap)}q.volume=z,q.play(K.soundId,Q)}setupMarker(q,K,z,Y,Q,X){q.volume=Q;const Z=-1!==Y?Y:q.duration;q.addMarker("play",z,Z),q.playMarker("play",0,Q,X,void 0,K)}logSoundError(q,K){q?q.isDestroyed?Y.VyI.log(`Cannot play ${K} because sound has been destroyed`,Y.$bb.Error):q.sound?q.sound.instances||Y.VyI.log(`Cannot play ${K} because pixi sound has been destroyed`,Y.$bb.Error):Y.VyI.log(`Cannot play ${K} because pixi sound has not been set`,Y.$bb.Error):Y.VyI.log(`Cannot play ${K} because sound does not exist`,Y.$bb.Error)}isBGMPlaying(q){return this.currentBgm&&!this.currentBgm.isDestroyed&&this.currentBgm.isPlaying&&et.K.matchingAssets(this.currentBgm.key,q)}getVolumeForType(q){switch(q){case J.h.Sfx:return Z.B.effectVolume.value;case J.h.Bgm:case J.h.BgmSfx:return Z.B.musicVolume.value;case J.h.VoiceClip:return Z.B.voiceVolume.value;default:return Y.VyI.log(`Invalid AudioType. Cannot get volume for type ${q}.`,Y.$bb.Error),0}}}it.FAKE_DIALOGUE_DURATION_MS=2e3},36279:(q,K,z)=>{"use strict";z.d(K,{g:()=>Y});class Y{constructor(){this.startTime=Y.INVALID_TIME,this.endTime=Y.INVALID_TIME,this.type="",this.energy=0,this.energyCost=0,this.turnsRemaining=1,this.battleCustomMeta={},this.startHealth=0,this.endHealth=0,this.pets=[],this.spellsCast=0,this.spellsFailed=0,this.enemySpellsCast=0,this.enemySpellsCastFail=0,this.epicAttack=null,this.consumablesUsed=[],this.petsRescued=[],this.rescuesSuccessful=[],this.spellEnergyCost=null}}Y.INVALID_TIME=-1},42749:(q,K,z)=>{"use strict";z.d(K,{m:()=>at});var Y=z(37692),Q=z(62459),X=z(95891),Z=z(68910),J=z(35120),tt=z(9591),et=z(18741),it=z(77938),st=z(8770),nt=z(17425);class at{constructor(q){this.game=null,this.baseDictionary={},this.isBaseReady={},this.isColorReady={},this.baseColor=[],this.newColor=[],this.game=q}static useFilter(q){return q.renderer.type===Z.RENDERER_TYPE.WEBGL&&q.renderer.context.webGLVersion>1}getColorReplacedSprite(q,K,z,Y=2){at.useFilter(this.game)?this.getColorReplacedSpriteGL(q,K,z):this.checkColorAsset(q,K,Y,(Y=>{J.q.instance.prodigy.create.sprite(0,0,this.generateAssetName(q,K),0,null,(q=>{z(q)}))}))}getColorReplacedSpriteGL(q,K,z){let X=[];for(let Y=0;Y{const K=new Y.N(X);K.resolution=Z.settings.RESOLUTION,q.filters=[K],q.smoothed=!1;const Q=Z.RenderTexture.create({width:q.width,height:q.height});this.game.renderer.render(q,{renderTexture:Q});const tt=J.q.instance.prodigy.create.sprite(0,0);tt.texture=Q,z(tt)}))}checkColorAsset(q,K,z,Y){const X=this.generateAssetName(q,K);let Z=Q.Aq$.isDefined(this.isColorReady[X]);if(Z&&(this.isColorReady[X].ready?this.game.cache.checkImageKey(X)?this.safeCallback(Y,X):Z=!1:this.isColorReady[X].callbacks.push(Y)),!Z){let Z=Q.Aq$.isDefined(this.isBaseReady[q]);Z&&(this.isBaseReady[q].ready?this.game.cache.checkImageKey(q)?(this.isColorReady[X]={ready:!1,callbacks:[Y]},this.generateNewColor(q,K,X,z)):Z=!1:this.isBaseReady[q].callbacks.push({colorReplaceData:K,callback:Y})),Z||(this.isBaseReady[q]={ready:!1,callbacks:[{colorReplaceData:K,callback:Y}]},J.q.instance.prodigy.create.sprite(0,0,q,0,null,this.onBaseColorReady.bind(this,q,z)))}}clearCache(q=!1){q?(this.isColorReady={},this.isBaseReady={}):(this.clearEntries(this.isColorReady),this.clearEntries(this.isBaseReady))}clearEntries(q){for(const K of Object.keys(q))q[K].ready&&!this.game.cache.checkImageKey(K)&&delete q[K]}generateAssetName(q,K){let z=q;for(let Y=0;Y0;){const q=this.isBaseReady[z.key].callbacks.pop(),Y=this.generateAssetName(z.key,q.colorReplaceData);Q.Aq$.isDefined(this.isColorReady[Y])?this.isColorReady[Y].ready?this.safeCallback(q.callback,Y):this.isColorReady[Y].callbacks.push(q.callback):(this.isColorReady[Y]={ready:!1,callbacks:[q.callback]},this.generateNewColor(z.key,q.colorReplaceData,Y,K))}else for(this.isBaseReady[q].ready=!0,this.baseDictionary[q]=z;this.isBaseReady[q].callbacks.length>0;){const K=this.isBaseReady[q].callbacks.pop(),z=this.generateAssetName(q,K.colorReplaceData);this.safeCallback(K.callback,z)}}pixelColorReplace(q){const K=X.findIndex(this.baseColor,(K=>q.r===K[0]&&q.g===K[1]&&q.b===K[2]));return K>-1?Object.assign(Object.assign({},q),{r:this.newColor[K][0],g:this.newColor[K][1],b:this.newColor[K][2]}):q}generateNewColor(q,K,z,Y){const X=new tt.w(this.game,null,this.baseDictionary[q].width,this.baseDictionary[q].height);X.draw(this.baseDictionary[q]),X.update();let Z=[],J=[];for(let tt=0;tt=0;Q--)Z[Q][0]===J[Q][0]&&Z[Q][1]===J[Q][1]&&Z[Q][2]===J[Q][2]&&(Z.splice(Q,1),J.splice(Q,1));this.baseColor=Z,this.newColor=J,X.processPixelRGB(this.pixelColorReplace,this),X.generateTexture(z,this.textureGenerated.bind(this,q,z,X,Y))}textureGenerated(q,K,z,Y,X){const Z=this.game.cache.getFrameData(q);if(Z&&this.game.cache.addTextureAtlas(K,X,Z),2===Y?nt.K.cacheAsset(this.game,K,nt.K.zoneAssetsCached):1===Y&&nt.K.cacheAsset(this.game,K,nt.K.commonAssetsCached),J.q.instance.prodigy.assets.assignAssets({[K]:{type:"singleImage",v:1}}),z.clear(),et.f.removeByCanvas(z.canvas),z.destroy(),this.isColorReady[K].callbacks){const q=this.isColorReady[K].callbacks;for(let z=0;z{"use strict";z.d(K,{Z:()=>J});var Y=z(62459),Q=z(95891),X=z(35757),Z=z(43531);class J extends Z.rD{constructor(){super(...arguments),this.menuLayer=void 0}startDeprecated(q,K,z,Z,J,tt=!0,et=!0){var it,st;const nt={type:J,windowPosition:Z,blockInput:!K};for(let at=0;atvoid 0!==q));this.start(!K,z,tt,et)}setText(q,K=null,z=null){if(isNaN(q)){const K=q,z={legacyData:{index:K.index,face:K.face,audio:K.audio},text:K.text,yes:K.yes,no:K.no,callback:K.callback,hideNext:K.hideNext,type:K.type,preserveNextEvent:K.preserveNextEvent};this.addEvents([z])}else{const Y={legacyData:{index:q},yes:K,no:z};this.addEvents([Y])}}}},43531:(q,K,z)=>{"use strict";z.d(K,{DG:()=>Y,fA:()=>Q,rD:()=>rt});var Y,Q,X=z(8674),Z=z(62459),J=z(79687),tt=z(35120),et=z(51477),it=z(29738),st=z(35757),nt=z(73797),at=z(8872);!function(q){q[q.Top=0]="Top",q[q.Middle=1]="Middle",q[q.Bottom=2]="Bottom"}(Y||(Y={})),function(q){q[q.DEFAULT=0]="DEFAULT",q[q.STORE=1]="STORE",q[q.WHEEL=2]="WHEEL",q[q.EQUIP=3]="EQUIP",q[q.START=4]="START",q[q.FOLLOW=5]="FOLLOW",q[q.LEAVE=6]="LEAVE",q[q.CHANGE=7]="CHANGE",q[q.CURRENCY=8]="CURRENCY"}(Q||(Q={}));let rt=class{set skipCounter(q){this._skipCounter=q}get skipCounter(){return this._skipCounter}constructor(q=tt.q.instance.game){this.game=null,this._onClose=[],this.onAdvance=new Z.HN0,this.onComplete=new Z.HN0,this.eventQueue=[],this.dataProvider=null,this.current=null,this.currentDialogue=null,this._skipCounter=0,this._previousDialogueAudioTag=null,this._reenableInputOnClose=!0,this.game=q,this.dataProvider=new st.u}addEvents(q){this.eventQueue.push(...q)}setParent(q){this._dialogueParent=q,this.currentDialogue&&q.addChild(this.currentDialogue)}start(q=!1,K,z=!0,Y=!0){this.currentDialogue?this._previousDialogueAudioTag=this.currentDialogue.dialogueConfig.dialogueData?this.currentDialogue.dialogueConfig.dialogueData.audio.tag:null:(this._previousDialogueAudioTag=null,this.game.input.enabled=!q),Y&&this.closeDialogue(!1),K&&this._onClose.push(K),this._reenableInputOnClose=z,tt.q.instance.prodigy.notifications.pause(this),this.currentDialogue||this.next()}next(){var q;if(this.eventQueue.length>0){if(this.current=this.eventQueue.splice(0,this.skipCounter+1)[this.skipCounter],this.skipCounter=0,Object.keys(this.current).length>0)if(Z.Aq$.isDefined(this.current.callback))0===this.eventQueue.length?(this.close(!1,!0),this.onComplete.dispatch(),this.current.callback()):(this.current.callback(),this.next());else{const K=[];if(Z.Aq$.isDefined(this.current.dialogueData)&&(it.O.isEnglishLocale()&&K.push(this.current.dialogueData.audio.tag),K.push(this.current.dialogueData.avatar.atlas),at.R.isAudioSprite(this.current.dialogueData.audio)&&!at.R.isLegacyAudioSprite(this.current.dialogueData.audio)&&it.O.isEnglishLocale()&&K.push(this.current.dialogueData.audio.dataTag)),Z.Aq$.isDefined(this.currentDialogue)&&this.currentDialogue.game)this.currentDialogue.updateSchema(this.current,K),this.onAdvance.dispatch();else if(this.currentDialogue=tt.q.instance.prodigy.open.characterDialogue(this.current,this.next.bind(this),K),null===(q=this._dialogueParent)||void 0===q||q.addChild(this.currentDialogue),Z.Aq$.isDefined(this._previousDialogueAudioTag)&&(!this.currentDialogue.dialogueConfig.dialogueData||this.currentDialogue.dialogueConfig.dialogueData.audio.tag!==this._previousDialogueAudioTag)){const q=this.game.cache.getSound(this._previousDialogueAudioTag);(null==q?void 0:q.sound)&&!q.isDecoding&&this.game.cache.removeSound(this._previousDialogueAudioTag),this._previousDialogueAudioTag=null}}}else this.close(!1,!0),this.onComplete.dispatch()}closeDialogue(q=!1){if(this.game.input.enabled||(this.game.input.enabled=this._reenableInputOnClose),Z.Aq$.isDefined(this.currentDialogue)){if(q&&this.currentDialogue.dialogueConfig.dialogueData&&""!==this.currentDialogue.dialogueConfig.dialogueData.audio.tag){const q=this.game.cache.getSound(this.currentDialogue.dialogueConfig.dialogueData.audio.tag);(null==q?void 0:q.sound)&&!q.isDecoding&&this.game.cache.removeSound(this.currentDialogue.dialogueConfig.dialogueData.audio.tag)}this.currentDialogue.close(),this.currentDialogue=null}}close(q=!1,K=!1){this.closeDialogue(K),this.eventQueue=[],this._dialogueParent=void 0;const z=[...this._onClose];this._onClose=[],q||z.forEach((q=>q())),tt.q.instance.game.broadcaster.broadcast(nt.n8.DialogClosed),tt.q.instance.prodigy.notifications.resume(this)}static shouldLoadDialogueAudio(){return it.O.isEnglishLocale()}static runDialogueSequence(q,K,z=!0,Y=!0){const Q=tt.q.instance.prodigy.gameContainer.get("e81-40c8");return Q.addEvents(q.map((q=>"number"==typeof q?{dialogueData:Q.dataProvider.get(q),blockInput:!0}:q.id?Object.assign({dialogueData:Q.dataProvider.get(q.id),blockInput:!0},q):q))),Q.start(!0,K,z,Y),Q}isDialogueInProgress(){return this.eventQueue.length>0}};rt=(0,X.Cg)([(0,J.injectable)(),(0,X.Sn)("design:paramtypes",[et.n])],rt)},19586:(q,K,z)=>{"use strict";var Y;z.d(K,{_:()=>Y}),function(q){q[q.DEFAULT=0]="DEFAULT",q[q.ACHIEVEMENTS=1]="ACHIEVEMENTS",q[q.ITEMRARE=2]="ITEMRARE",q[q.MEMBERSHIP=3]="MEMBERSHIP",q[q.STOREPURCHASE=4]="STOREPURCHASE",q[q.MEMBERBOX=5]="MEMBERBOX",q[q.PARENTREWARD=6]="PARENTREWARD",q[q.ITEMGENERIC=7]="ITEMGENERIC",q[q.LAMPLIGHTPURCHASE=8]="LAMPLIGHTPURCHASE",q[q.ITEMWHEEL=9]="ITEMWHEEL",q[q.QUESTIONSANSWERED=10]="QUESTIONSANSWERED",q[q.NAMECHANGE=13]="NAMECHANGE",q[q.BATTLEPASSQUESTGOALCOMPLETED=15]="BATTLEPASSQUESTGOALCOMPLETED",q[q.CHARGEDLEVELFREEZECOUNTDOWN=17]="CHARGEDLEVELFREEZECOUNTDOWN",q[q.FESTIVALQUESTGOALCOMPLETED=18]="FESTIVALQUESTGOALCOMPLETED"}(Y||(Y={}))},95373:(q,K,z)=>{"use strict";z.d(K,{u:()=>Z});var Y=z(62459),Q=z(68910),X=z(23082);class Z{constructor(q,K,z){this.waitingToFollowDelay=0,this.lastTargetPosition=new Q.Point,this.game=q,this.source=K,K.onTargetStopped.add(this.targetStopped,this),K.onDestroy.addOnce(this.handleDestroy,this),this.target=z,z.onPathFound.add(this.targetMoving,this),z.onStopped.add(this.targetStopped,this)}handleDestroy(){this.source.onTargetStopped.remove(this.targetStopped,this),this.target.onPathFound.remove(this.targetMoving,this),this.target.onStopped.remove(this.targetStopped,this)}update(){const q=this.source.getPosition(),K=Y.cj9.distance(q.x,q.y,this.target.position.x,this.target.position.y);if(this.waitingToFollowDelay>1)--this.waitingToFollowDelay;else if(this.waitingToFollowDelay>0)if(Y.Aq$.isDefined(this.queuedPath)&&this.queuedPath.length>=3){const z=new Y.I9Y(this.target.position.x-q.x,this.target.position.y-q.y),Q=new Y.I9Y(this.target.position.x-this.lastTargetPosition.x,this.target.position.y-this.lastTargetPosition.y);if(Q.getMagnitudeSq()<=0){const q=new Y.I9Y(this.queuedPath[this.queuedPath.length-2].x,this.queuedPath[this.queuedPath.length-2].y),K=new Y.I9Y(this.queuedPath[this.queuedPath.length-3].x,this.queuedPath[this.queuedPath.length-3].y);Q.set(K.x-q.x,K.y-q.y)}const J=K>this.lastTargetDistance||Q.dot(z)>0;if((K>Z.MAX_FOLLOW_DISTANCE||this.source.isMoving())&&J){const K=new Y.I9Y(this.queuedPath[0].x,this.queuedPath[0].y);if(Y.cj9.distance(K.x,K.y,q.x,q.y)>Z.MAX_FOLLOW_DISTANCE){const q=this.game.state.get(X.G.TileScreen),K=this.getPointNearPathEnd(this.queuedPath,Z.MIN_FOLLOW_DISTANCE);Y.Aq$.isDefined(q)&&Y.Aq$.isDefined(K)&&this.source.pathTo(new Y.I9Y(K.x,K.y))}this.queuedPath=null,this.waitingToFollowDelay=0}else this.stop()}else this.stop(),this.waitingToFollowDelay=0;this.lastTargetPosition=this.target.position,this.lastTargetDistance=K}targetMoving(q){const K=this.source.getPosition();this.queuedPath=q.concat({x:this.target.x,y:this.target.y},{x:K.x,y:K.y}),this.waitingToFollowDelay=2}targetStopped(){this.queuedPath=null,this.waitingToFollowDelay=2}stop(){this.source.stopMoving()}getPointNearPathEnd(q,K,z){if(!Y.Aq$.isDefined(q))return null;const Q=Y.Aq$.isDefined(z)?z:0;if(Q>q.length-2)return null;const X=new Y.I9Y(q[Q].x,q[Q].y),Z=new Y.I9Y(q[Q+1].x,q[Q+1].y),J=Y.cj9.distance(X.x,X.y,Z.x,Z.y);if(J{"use strict";z.d(K,{b:()=>tt});var Y=z(62459),Q=z(5491),X=z(35120),Z=z(39984),J=z(55122);class tt{constructor(){const q=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;Y.Aq$.isDefined(q.data.storedMemberStars)||(q.data.storedMemberStars=0),Y.Aq$.isDefined(q.data.memberStarsExpirationDate)||(q.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime())}getNextExpirationDate(){const q=new Date(Date.now()),K=new Date(Date.now());return 0!==q.getDay()&&K.setDate(q.getDate()+(7-q.getDay())),K.setSeconds(59),K.setMinutes(59),K.setHours(23),K.setMilliseconds(0),K}hasExpired(){return!1}storeMemberStars(q){const K=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;K.data.storedMemberStars+=q,K.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime(),this.sendStarJarUpdate(K,"Items Added")}claimStarJar(){var q;const K=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.sendStarJarUpdate(K,"Items Claimed");const z=null!==(q=K.data.storedMemberStars)&&void 0!==q?q:0;return K.data.storedMemberStars=0,z}doLoseStars(){if(!this.hasExpired())return!1;const q=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return this.sendStarJarUpdate(q,"Jar Refreshed"),q.data.storedMemberStars=0,q.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime(),!0}getNumberOfLevels(q){const K=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=K.getStars(),Y=K.getLevel(),tt=K.data.storedMemberStars/q;return Z.e.levelFromStars(z+tt,Q.V.Player,J.s.activePlayerLevelCap)-Y}getNumberOfStoredStars(){let q=0;const K=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return Y.Aq$.isDefined(K.data.storedMemberStars)&&(q=K.data.storedMemberStars),q}getStarJarTier(){return this.calculateStarJarTier(this.getNumberOfStoredStars())}calculateStarJarTier(q){return q>90?4:q>60?3:q>30?2:q>1?1:0}updateExpirationDate(){X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime()}sendStarJarUpdate(q,K){}}},26657:(q,K,z)=>{"use strict";z.d(K,{s:()=>Q});var Y=z(62459);class Q{constructor(q){this.current=null,this.noSkipFrames=!1,this.tweens=[],this.tweenVars={},this.onEndCallbacks=[],this.index=0,this.src=q}start(q,K,z){this.current=null,this.index=0,this.startTime=Y.Aq$.isDefined(q)?q:Date.now();for(let Y=0;Y=this.tweenVars.next){this.tweenVars.next+=this.current.delay;for(let q=0;q=this.current.end&&(this.current=null,Y.Aq$.isDefined(this.onComplete)&&this.onComplete())}else{if(this.current){const K=Math.floor((q-this.current.start)/this.current.delay)*this.current.delay+this.current.start,z=q-this.current.delay,Q=z-this.current.lastUpdate>this.current.delay;if(!this.noSkipFrames&&z<=this.current.lastUpdate||Q)return"set"!==this.current.type||Y.Aq$.isDefined(this.tweenVars.next)||(this.tweenVars.next=this.current.start+this.current.delay,this.tweenVars.frame=0,this.src[this.current.tag]=this.current.frames[0]),Q&&(this.current.lastUpdate=K),null;if(this.current.lastUpdate=K,"set"===this.current.type)if(Y.Aq$.isDefined(this.tweenVars.next)||(this.tweenVars.next=this.current.start+this.current.delay,this.tweenVars.frame=0,this.src[this.current.tag]=this.current.frames[0]),q>=this.current.end)this.src[this.current.tag]=this.current.frames[this.current.frames.length-1];else if(q>=this.tweenVars.next){if(this.tweenVars.next+=this.current.delay,this.tweenVars.frame++,this.tweenVars.frame>=this.current.frames.length){this.tweenVars.frame=0;for(let q=0;q=this.current.end&&(this.current=null,Y.Aq$.isDefined(this.onComplete)&&this.onComplete())}this.current||(this.tweenVars={},this.index>=this.tweens.length?this.startTime=null:(this.current=this.tweens[this.index],this.index++))}}}},16051:(q,K,z)=>{"use strict";z.d(K,{c:()=>Z});var Y=z(24521),Q=z(35120),X=z(23029);class Z{static get instance(){return this._instance||(this._instance=new Z),this._instance}constructor(){this._petXPBoostData=null,this._isPetXPBoostDataEmpty=!0,this.areRequirementsMet()&&(this._petXPBoostData=X.R.loadData(Y.r.PetXPBoostData_json)),this._isPetXPBoostDataEmpty=!this._petXPBoostData||!(Object.keys(this._petXPBoostData).length>0)}getBoostMultiplier(q=Q.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return 1;const K=this._petXPBoostData.zone.indexOf(q);return K<0?1:this._petXPBoostData.xpMultiplier[K]}getEligiblePetIDs(q=Q.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const K=this._petXPBoostData.zone.indexOf(q);return K<0?null:this._petXPBoostData.petIDs[K]}isPlayerZoneEligible(q=Q.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return!1;return!(this._petXPBoostData.zone.indexOf(q)<0)}getFtueData(q=Q.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const K=this._petXPBoostData.zone.indexOf(q);return K<0?null:this._petXPBoostData.ftue[K]}getSecondPlusScreenData(q=Q.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const K=this._petXPBoostData.zone.indexOf(q);return K<0?null:this._petXPBoostData.secondPlusScreen[K]}getResultsMenuText(q=Q.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const K=this._petXPBoostData.zone.indexOf(q);return K<0?null:this._petXPBoostData.resultMenu[K]}getWizardWatchData(){return this._isPetXPBoostDataEmpty?null:this._petXPBoostData.wizardWatch}areRequirementsMet(){return Q.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirementsDeprecated(52)}isPlayerQualified(q=Q.q.instance.prodigy.world.getCurrentZone()){return this.isPlayerZoneEligible(q)&&this.areRequirementsMet()}}},9831:(q,K,z)=>{"use strict";var Y;z.d(K,{V:()=>Y}),function(q){q.singleImage="singleImage",q.spriteSheet="spritesheet",q.spine="spine",q.atlas="atlas"}(Y||(Y={}))},96216:(q,K,z)=>{"use strict";z.d(K,{M:()=>mt});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(95891),tt=z(88022),et=z(99625),it=z(56942),st=z(35120),nt=z(24190),at=z(51477),rt=z(77938),ot=z(84938),ht=z(73797),ct=z(22637),dt=z(37854),lt=z(99898),ut=z(44977),ft=z(16184),bt=z(1823),pt=z(85515),vt=z(76945),gt=z(30441);let mt=Y=class{constructor(q,K){this.game=q,this._prefabLoader=K}setSource(q){this.screen=q}cleanup(q){for(let K=0;K{J.destroy(),X.Aq$.isDefined(Z)&&Z()})),X.Aq$.isDefined(Y)&&(it.delay(Y),et.delay(Y)),it.start(),et.start(),it}characterImage(q,K,z){q.y-=150,q.anchor.set(.5,.5),q.scale.set(0,0),this.game.broadcaster.broadcast(ht.lc.AddChild,this.game,[q,pt.E.OverlayLayer]);const Y=this.game.add.tween(q.scale,this).to({y:1,x:1},800,X.GS3.Elastic.InOut),Q=this.game.add.tween(q,this).to({y:"-=100"},1600,X.GS3.Quadratic.Out).to({alpha:0},200,X.GS3.Quadratic.Out);Q.onTweenComplete.add((()=>{q.destroy(),X.Aq$.isDefined(z)&&z()})),X.Aq$.isDefined(K)&&(Q.delay(K),Y.delay(K)),Q.start(),Y.start()}chatBubble(q,K=13,z=100,Y=!1,Q=3e3){const X=new gt.R(this.game,q,0,-z,Y,Q);return X.setID(K),X}explode(q,K,z,Y,Q,Z,J){const et=Math.ceil(z/80),it=Math.ceil(Y/80),nt=[];let at,rt;for(let X=0;X{X.setLayer(null==Y?void 0:Y.layer,!0),X.findComponentInChildren(dt.v).playEffect(q,K,z,Q)}))}confetti(q,K,z,Y=this.screen.foregroundGameObject,Q=0){this._prefabLoader.loadWithDependenciesFromGUID(et.l.Confetti,Y).then((Q=>{Q.setLayer(null==Y?void 0:Y.layer,!0),Q.findComponentInChildren(ct.k).playEffect(q,K,z)}))}waterBalloon(q,K,z,Y,Q,X=this.screen.foregroundGameObject){this._prefabLoader.loadWithDependenciesFromGUID(et.l.WaterBalloon,X).then((Z=>{Z.setLayer(null==X?void 0:X.layer,!0),Z.findComponentInChildren(bt.k,!0).playEffect(q,K,z,Y,Q)}))}paintBalloon(q,K,z,Y,Q,X=this.screen.foregroundGameObject){this._prefabLoader.loadWithDependenciesFromGUID(et.l.PaintBalloon,X).then((Z=>{Z.setLayer(null==X?void 0:X.layer,!0),Z.findComponentInChildren(ft.J,!0).playEffect(q,K,z,Y,Q)}))}projectile(q,K,z,Y,Z,J){return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z,Y,Q,Z,J=this.screen.foregroundGameObject){var tt,et;const st=it.Q[null===(et=null===(tt=rt.t.getItem("fx",Q).metadata.assets)||void 0===tt?void 0:tt.default)||void 0===et?void 0:et.assetKey],nt=rt.t.getItem("fx",Q).data.spineID,at=yield"string"==typeof Z?this._prefabLoader.loadWithDependenciesFromGUID(Z,J):this._prefabLoader.loadWithDependencies(Z,J);return new Promise((Q=>at.findComponent(X.v2j).setAsset(null!=st?st:`spine-${nt}`,(()=>at.findComponent(lt.F).playEffect(q,K,z,Y,null==J?void 0:J.layer,Q)))))}))}fireworkFX(q,K,z,Y,Q=this.screen.foregroundGameObject,X=0){"string"==typeof z?this._prefabLoader.loadWithDependenciesFromGUID(z,Q).then((z=>{z.findComponent(ut.e).playEffect(q,K,null==Q?void 0:Q.layer,Y)})):this._prefabLoader.loadWithDependencies(z,Q).then((z=>{z.findComponent(ut.e).playEffect(q,K,null==Q?void 0:Q.layer,Y)}))}goldWork(q,K,z){const Y=75*Math.random()+25,Q=Math.random(),Z=100*Q-50,J=Math.floor(3*Math.random()+1),et=[];for(let X=1;X{it.destroy()})),at.onTweenComplete.add(z)}fadeFlyingImage(q,K,z,Y){const Q=st.q.instance.prodigy.create.sprite(q,K,z,Y);Q.anchor.set(.5,.5),this.game.broadcaster.broadcast(ht.lc.AddChild,this.game,[Q,pt.E.OverlayLayer]);const Z=this.game.add.tween(Q,this).to({y:Q.y-100},1300,X.GS3.Quadratic.Out).to({alpha:0},200,X.GS3.Quadratic.Out);Z.onTweenComplete.add((()=>{Q.visible=!1}),Q),Z.start()}spellLearned(q,K,z){let Y=!1;const Q=(q,Q)=>{K.addChild(Q),Q.anchor.set(3,3),Q.angle=60*q;const Z=this.game.add.tween(Q,this).to({angle:"+=1000"},3500,X.GS3.Linear.None).to({alpha:0},500,X.GS3.Linear.None);Z.onTweenComplete.add((()=>{Q.destroy(),X.Aq$.isDefined(z)&&!Y&&(Y=!0,z())})),Z.start(),this.game.add.tween(Q.anchor,this).to({x:.5,y:.5},1500,X.GS3.Linear.None).delay(2e3).to({x:5,y:5},500,X.GS3.Linear.None).start()};for(let X=0;X<6;X++)st.q.instance.prodigy.icon.createFromData(q,K.width/2,K.height/2,null,Q.bind(this,X))}resizeContainer(q,K=0,z=800){this.game.add.tween(q.scale,this).to({x:K,y:K},z,X.GS3.Linear.None,!0)}static radialCloud(q,K,z,Y,Q,Z,tt,et){const it=new X.jlt(z,Y,Q);let nt=8;const at=()=>{--nt,nt<=0&&et()};for(let rt=0;rt{q&&q.destroy()})),et&&ht.onTweenComplete.add(at)}}};mt.PVP=230,mt.MIDDLE=300,mt.BOTTOM=500,mt.BASE=600,mt.TOP=100,mt.SMALL=2,mt.MEDIUM=1,mt=Y=(0,Q.Cg)([(0,Z.injectable)(),(0,Q.Qj)(0,(0,Z.inject)("d73-66e9")),(0,Q.Qj)(1,(0,Z.inject)("983-05a7")),(0,Q.Sn)("design:paramtypes",[at.n,X.wNP])],mt)},571:(q,K,z)=>{"use strict";z.d(K,{z:()=>rt});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(99625),J=z(35120),tt=z(24110),et=z(53885),it=z(63068),st=z(80060),nt=z(17002),at=z(30226);class rt{static createPixiSpriteFromAppearanceData(q,K,z){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z,Y={}){var Z;const tt=J.q.instance.prodigy.gameContainer.get("983-05a7"),et=yield st.d.loadWithInjectedValuesAndDependenciesFromGUID(tt,K,null!==(Z=Y.injectedValues)&&void 0!==Z?Z:{}).catch(Q.RQr.createHandler("PlayerSpriteFactory: Error loading player prefab to generate sprite"));yield et.findComponentInChildren(it.n).fromPlayerAppearanceData(q),yield at.J.waitForFrames(1);const rt=J.q.instance.game.renderer.generateTexture(et.findComponentInChildren(z).getRootContainer());et.destroy(),Q.qFr.setSmoothed(rt,!0);const ot=new X.Sprite(rt);return!1===Y.trimTransparentPixels?ot:nt.f.trimTransparentPixels(ot,J.q.instance.game.renderer)}))}static createHeadFromAppearanceData(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return rt.createPixiSpriteFromAppearanceData(Object.assign(Object.assign({},q),{outfit:null,weapon:null,boot:null}),Z.l.MainPlayerIcon,et.u,K)}))}static createFullBodyFromAppearanceData(q,K){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z={}){const Y=Object.assign(Object.assign({},z.injectedValues),{"1eb-d7b4":K});return rt.createPixiSpriteFromAppearanceData(q,Z.l.RemotePlayer,tt.B,Object.assign(Object.assign({},z),{injectedValues:Y}))}))}}},95913:(q,K,z)=>{"use strict";z.d(K,{BV:()=>et,v4:()=>st});var Y=z(87490),Q=z(62459),X=z(95359),Z=z(88022),J=z(35120),tt=z(72162);const et={[X.IE.Defence]:"defense",[X.IE.Hp]:"health",[X.IE.Power]:"spell",[X.IE.Speed]:"dodge"},it={[Y.EElementType.Astral]:"#F8E48F",[Y.ELegacyElementType.Earth]:"#C7F28F",[Y.EElementType.Fire]:"#FE9C8E",[Y.EElementType.Ice]:"#EBFDFF",[Y.ELegacyElementType.Mech]:"#CCE8EA",[Y.EElementType.Neutral]:"#FFFFFF",[Y.EElementType.Physical]:"#CCE8EA",[Y.EElementType.Plant]:"#C7F28F",[Y.EElementType.Shadow]:"#A581B0",[Y.EElementType.Storm]:"#FFE71C",[Y.EElementType.Water]:"#A4D4FF",[Y.ELegacyElementType.Wizard]:"#F8E48F"};class st{static levelUp(q,K){return{type:tt.m0.Text,text:J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("LEVEL_UP"),fill:"#FFF540",stroke:"#9C341A",strokeThickness:5,showSignal:q,hideSignal:K}}static chargeUp(q,K){return{type:tt.m0.Text,text:J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("CHARGE_UP"),fill:"#FFF540",stroke:"#9C341A",strokeThickness:5,showSignal:q,hideSignal:K}}static battleStats(q,K,z){const Y=[];return Object.keys(q).forEach((Q=>{const X=this.battleStat(Q,q[Q],K,z);X&&Y.push(X)})),Y}static battleStat(q,K,z,Y){return!q||K<=0?null:{type:tt.m0.Stat,atlasGuid:Z._.Ui_postbattle_json,atlasFrameName:et[q],statIncreaseAmount:K,showSignal:z,hideSignal:Y}}static spell(q,K,z){return{fill:it[q.elementType],type:tt.m0.SpellLearned,spellIcon:q.spellIcon,spellName:q.newSpellName,evolved:!1,showSignal:K,stroke:"#363636",strokeThickness:5}}}},72162:(q,K,z)=>{"use strict";z.d(K,{O6:()=>it,jk:()=>tt,m0:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(80060),J=z(24110);var tt,et;!function(q){q[q.Created=0]="Created",q[q.Entering=1]="Entering",q[q.Playing=2]="Playing",q[q.Exiting=3]="Exiting",q[q.Complete=4]="Complete"}(tt||(tt={})),function(q){q[q.Text=0]="Text",q[q.Stat=1]="Stat",q[q.SpellLearned=2]="SpellLearned"}(et||(et={}));class it{get currentState(){return this._currentState}get popupHeight(){return this._gameObject.findComponent(J.B).getRootContainer().height}constructor(q,K,z,Y){this.onPopupStarted=new Q.HN0,this.onEntranceComplete=new Q.HN0,this.onPopupComplete=new Q.HN0,this._prefabGuid=q,this._parent=K,this._x=z,this._y=Y,this._prefabLoader=X.q.instance.prodigy.gameContainer.get("983-05a7")}init(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._gameObject=yield Z.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGuid,this._injectablePropertiesDictionary),this._gameObject.parent=this._parent;this._gameObject.transform.setAnchoredPivotOffset(this._x,this._y);const q=this._gameObject.findComponentsInChildren(Q.y4o).map((q=>q.getRootContainer()));for(const K of q)K.alpha=0;this._currentState=tt.Created}))}playAnimation(q=0){const K={value:0},z=this._gameObject.findComponentsInChildren(Q.y4o).map((q=>q.getRootContainer()));for(const Y of z)Y.alpha=0;this.onPopupStarted.dispatch(),this._tween=X.q.instance.game.add.tween(K,this).to({value:1},2e3,Q.GS3.Quadratic.In,!0,q).onUpdateCallback((()=>{if(K.value<.2){this._currentState=tt.Entering;for(const q of z)q.alpha=K.value/.2}else if(K.value>.8){this._currentState=tt.Exiting;for(const q of z)q.alpha=(1-K.value)/.2}else{this._currentState!==tt.Playing&&(this._currentState=tt.Playing,this.onEntranceComplete.dispatch());for(const q of z)q.alpha=1}})),this._tween.onTweenComplete.addOnce((()=>{z.forEach((q=>{q.alpha=0})),this._currentState=tt.Complete,this.onPopupComplete.dispatch()}))}setYPos(q){this._gameObject.transform.setPositionY(q)}getYPos(){return this._gameObject.transform.posY}tweenYPos(q,K,z=0){const Y=null!=K?K:400,Z=this.getYPos(),J={value:0};this._yPositionTween=X.q.instance.game.add.tween(J,this,!0).to({value:1},Y,Q.GS3.Quadratic.In,!0,z).onUpdateCallback((()=>{this._gameObject.transform.setPositionY(Q.cj9.clampedLerp(Z,q,J.value))}))}cleanup(){X.q.instance.game.tweens.remove(this._tween),X.q.instance.game.tweens.remove(this._yPositionTween),this.onPopupStarted.dispose(),this.onEntranceComplete.dispose(),this.onPopupComplete.dispose(),this._gameObject.destroy()}}},67820:(q,K,z)=>{"use strict";z.r(K),z.d(K,{Boot:()=>mx});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z.n(Z),tt=z(68910),et=z(86663),it=z(88022),st=z(35120),nt=z(29569),at=z(64593),rt=z(87490),ot=z(85855),ht=z(51742),ct=z(56942),dt=z(79687);!function(q){q.StoreDataProvider="StoreDataProvider",q.CacheExpirationStrategy="CacheExpirationStrategy",q.CacheStorageStrategy="CacheStorageStrategy",q.DungeonDataProvider="DungeonDataProvider",q.SurveyDataProvider="SurveyDataProvider"}(Y||(Y={}));var lt=z(2872),ut=z(85933),ft=z(96051);class bt extends ft.B{constructor(){super(...arguments),this.seed=null,this.gridWidth=0,this.gridHeight=0,this.minCritPathLength=0,this.maxCritPathLength=0,this.monsterIDs=[],this.minEncounters=0,this.maxEncounters=0,this.monsterDrops=[],this.goldenPages=0,this.minPages=0,this.maxPages=0,this.battleDifficulty=3,this.extraPaths=null,this.normalRooms=[],this.monsterRooms=[],this.endRoom=null}setSeed(q){this.seed=q}getSeed(){return this.seed}setGridWidth(q){this.gridWidth=q}getGridWidth(){return this.gridWidth}setGridHeight(q){this.gridHeight=q}getGridHeight(){return this.gridHeight}setMinCritPathLength(q){this.minCritPathLength=q}getMinCritPathLength(){return this.minCritPathLength}setMaxCritPathLength(q){this.maxCritPathLength=q}getMaxCritPathLength(){return this.maxCritPathLength}setMonsterIDs(q){this.monsterIDs=q}getMonsterIDs(){return this.monsterIDs}setMinEncounters(q){this.minEncounters=q}getMinEncounters(){return this.minEncounters}setMaxEncounters(q){this.maxEncounters=q}getMaxEncounters(){return this.maxEncounters}setMonsterDrops(q){this.monsterDrops=q}getMonsterDrops(){return this.monsterDrops}setGoldenPages(q){this.goldenPages=q}getGoldenPages(){return this.goldenPages}setMinPages(q){this.minPages=q}getMinPages(){return this.minPages}setMaxPages(q){this.maxPages=q}getMaxPages(){return this.maxPages}setBattleDifficulty(q){this.battleDifficulty=q}getBattleDifficulty(){return this.battleDifficulty}setExtraPaths(q){this.extraPaths=q}getExtraPaths(){return this.extraPaths}setNormalRooms(q){this.normalRooms=q}getNormalRooms(){return this.normalRooms}setMonsterRooms(q){this.monsterRooms=q}getMonsterRooms(){return this.monsterRooms}setEndRoom(q){this.endRoom=q}getEndRoom(){return this.endRoom}isValid(){return this.gridWidth>0&&this.gridHeight>0&&this.minCritPathLength>0&&this.maxCritPathLength>0&&this.monsterIDs.length>0&&this.minEncounters>0&&this.maxEncounters>0&&this.monsterDrops.length>0&&(0,Z.every)(this.monsterDrops,(q=>q.isValid()))&&this.goldenPages>0&&this.minPages>0&&this.maxPages>0&&this.normalRooms.length>0&&(0,Z.every)(this.normalRooms,(q=>q.isValid()))&&this.monsterRooms.length>0&&(0,Z.every)(this.monsterRooms,(q=>q.isValid()))&&null!==this.endRoom&&this.endRoom.isValid()}}class pt extends ft.B{constructor(){super(...arguments),this.type="",this.ID=0,this.quantity=0}setType(q){this.type=q}getType(){return this.type}setID(q){this.ID=q}getID(){return this.ID}setQuantity(q){this.quantity=q}getQuantity(){return this.quantity}isValid(){return this.ID>0&&this.quantity>0&&this.type.length>0}}class vt extends ft.B{constructor(){super(...arguments),this.minLength=0,this.maxLength=0,this.minPaths=0,this.maxPaths=0}setMinLength(q){this.minLength=q}getMinLength(){return this.minLength}setMaxLength(q){this.maxLength=q}getMaxLength(){return this.maxLength}setMinPaths(q){this.minPaths=q}getMinPaths(){return this.minPaths}setMaxPaths(q){this.maxPaths=q}getMaxPaths(){return this.maxPaths}isValid(){return this.minLength>0&&this.maxLength>0&&this.minPaths>0&&this.maxPaths>0}}class gt extends ft.B{constructor(){super(...arguments),this.tileMap="",this.fsmId=0}setTileMap(q){this.tileMap=q}getTileMap(){return this.tileMap}setFSM(q){this.fsmId=q}getFSM(){return this.fsmId}isValid(){return this.fsmId>0&&this.tileMap.length>0}}class mt extends ut.z{deserialize(q){let K=new bt;return null!==q&&1===q.version&&(K.setSeed(q.seed),K.setGridWidth(q.gridWidth),K.setGridHeight(q.gridHeight),K.setMinCritPathLength(q.minCritPathLength),K.setMaxCritPathLength(q.maxCritPathLength),K.setMonsterIDs(q.monsterIDs),K.setMinEncounters(q.minEncounters),K.setMaxEncounters(q.maxEncounters),K.setMonsterDrops(ut.z.deserializeCollection(q.monsterDrops,mt.deserializeMonstersDrop)),K.setGoldenPages(q.goldenPages),K.setMinPages(q.minPages),K.setMaxPages(q.maxPages),K.setBattleDifficulty(q.battleDifficulty),K.setExtraPaths(mt.deserializePath(q.extraPaths)),K.setNormalRooms(ut.z.deserializeCollection(q.normalRooms,mt.deserializeRoom)),K.setMonsterRooms(ut.z.deserializeCollection(q.monsterRooms,mt.deserializeRoom)),K.setEndRoom(mt.deserializeRoom(q.endRoom))),K.isValid()||(K=null),K}serialize(q){let K=null;return q.isValid()&&(K={version:1,seed:q.getSeed(),gridWidth:q.getGridWidth(),gridHeight:q.getGridHeight(),minCritPathLength:q.getMinCritPathLength(),maxCritPathLength:q.getMaxCritPathLength(),monsterIDs:q.getMonsterIDs(),minEncounters:q.getMinEncounters(),maxEncounters:q.getMaxEncounters(),monsterDrops:ut.z.serializeCollection(q.getMonsterDrops(),mt.serializeMonstersDrop),goldenPages:q.getGoldenPages(),minPages:q.getMinPages(),maxPages:q.getMaxPages(),battleDifficulty:q.getBattleDifficulty(),extraPaths:mt.serializePath(q.getExtraPaths()),normalRooms:ut.z.serializeCollection(q.getNormalRooms(),mt.serializeRoom),monsterRooms:ut.z.serializeCollection(q.getMonsterRooms(),mt.serializeRoom),endRoom:mt.serializeRoom(q.getEndRoom())}),K}static deserializeMonstersDrop(q){const K=new pt;return K.setID(q.ID),K.setType(q.type),K.setQuantity(q.N),K}static serializeMonstersDrop(q){return{type:q.getType(),ID:q.getID(),N:q.getQuantity()}}static deserializeRoom(q){const K=new gt;return K.setFSM(q.fsmId),K.setTileMap(q.tileMap),K}static serializeRoom(q){return{tileMap:q.getTileMap(),fsmId:q.getFSM()}}static deserializePath(q){const K=new vt;return K.setMinLength(q.minLength),K.setMaxLength(q.maxLength),K.setMinPaths(q.minPaths),K.setMaxPaths(q.maxPaths),K}static serializePath(q){return{minLength:q.getMinLength(),maxLength:q.getMaxLength(),minPaths:q.getMinPaths(),maxPaths:q.getMaxPaths()}}}let yt=class extends lt.k{constructor(q){super(),this.dataProvider=null,this.container=null,this.dataProvider=q,this.container=new dt.Container,this.container.bind("v1").to(mt)}getDungeon(q){const K=this.dataProvider.getDungeon(q);return this.container.get(`v${K.version}`).deserialize(K)}};yt=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)(Y.DungeonDataProvider)),(0,Q.Sn)("design:paramtypes",[Object])],yt);var _t=z(84959),Et=z(76572);let wt=class{constructor(q){this.storageExpiration=null,this.storageExpiration=q}getValue(q){var K;return this.hasValue(q)&&!(null===(K=this.storageExpiration)||void 0===K?void 0:K.hasExpired(q))?this.retrieveValueFromStorage(q):null}invalidate(){var q;null===(q=this.storageExpiration)||void 0===q||q.invalidate()}storeValue(q,K){var z;null===(z=this.storageExpiration)||void 0===z||z.cacheItem(q),this.storeValueInStorage(q,K)}};wt=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)(Y.CacheExpirationStrategy)),(0,Q.Sn)("design:paramtypes",[Object])],wt);let Tt=class{};Tt=(0,Q.Cg)([(0,dt.injectable)()],Tt);class St extends ft.B{constructor(){super(...arguments),this.type=null,this.ID=-1,this.amount=1}getType(){return this.type}setType(q){this.type=q}getAmount(){return this.amount}setAmount(q){this.amount=q}getID(){return this.ID}setID(q){this.ID=q}isValid(){return this.ID>0&&this.amount>0&&null!==this.type&&this.type.length>0}}class At extends ft.B{constructor(){super(...arguments),this.name=null,this.pages=null,this.merchantAvatar=null,this.currencyType=null,this.currencyID=-1}getName(){return this.name}setName(q){this.name=q}getPages(){return this.pages}setPages(q){this.pages=q}getMerchantAvatar(){return this.merchantAvatar}setMerchantAvatar(q){this.merchantAvatar=q}getStoreCurrencyType(){return this.currencyType}setStoreCurrencyType(q){this.currencyType=q}getStoreCurrencyID(){return this.currencyID}setStoreCurrencyID(q){this.currencyID=q}isValid(){return null!==this.merchantAvatar&&this.merchantAvatar.isValid()&&null!==this.name&&this.name.length>0&&null!==this.currencyType&&this.currencyType.length>0&&this.currencyID>0&&null!==this.pages&&this.pages.length>0&&(0,Z.every)(this.pages,(q=>q.isValid()))}}var Ct,Ot=z(12049);class It extends ft.B{constructor(){super(...arguments),this.tag=null,this.frame="",this.scale={x:1,y:1},this.position={x:0,y:0}}getAssetTag(){return this.tag}setAssetTag(q){this.tag=q}getAssetFrame(){return this.frame}setAssetFrame(q){this.frame=q}getScale(){return this.scale}setScale(q,K){this.scale.x=q,this.scale.y=K}getPosition(){return this.position}setPosition(q,K){this.position.x=q,this.position.y=K}isValid(){return null!==this.tag&&this.tag.length>0}}class Dt extends ft.B{constructor(){super(...arguments),this.itemType=null,this.itemID=-1,this.topText=null,this.bottomText=null}getItemType(){return this.itemType}setItemType(q){this.itemType=q}getItemID(){return this.itemID}setItemID(q){this.itemID=q}getTopText(){return this.topText}setTopText(q){this.topText=q}getBottomText(){return this.bottomText}setBottomText(q){this.bottomText=q}isValid(){return null!==this.itemType&&this.itemType.length>0&&this.itemID>0}}class Rt extends ft.B{constructor(){super(...arguments),this.button=null,this.items=null}getButton(){return this.button}setButton(q){this.button=q}isDefault(){return this.isDefaultTab}setIsDefault(q){this.isDefaultTab=q}getStoreItems(){return this.items}setStoreItems(q){this.items=q}isValid(){return null!==this.button&&this.button.isValid()&&null!==this.items&&this.items.length>0&&(0,Z.every)(this.items,(q=>q.isValid()))}}let Pt=Ct=class extends ut.z{deserialize(q){let K=new At;return null!==q&&1===q.version&&(K.setName(q.name),K.setStoreCurrencyID(q.currencyID),K.setStoreCurrencyType(q.currencyType),K.setMerchantAvatar(Ct.deserializeMerchantAvatar(q.merchantAvatar)),K.setPages(Ct.deserializeCollection(q.pages,Ct.deserializeTab))),K.isValid()||(K=null),K}serialize(q){let K=null;return q.isValid()&&(K={version:1,name:q.getName(),currencyID:q.getStoreCurrencyID(),currencyType:q.getStoreCurrencyType(),merchantAvatar:Ct.serializeMerchantAvatar(q.getMerchantAvatar()),pages:Ct.serializeCollection(q.getPages(),Ct.serializeTab)}),K}static deserializeMerchantAvatar(q){const K=new It;return K.setAssetFrame(q.frame),K.setAssetTag(q.tag),K.setPosition(q.position.x,q.position.y),K.setScale(q.scale.x,q.scale.y),K}static serializeMerchantAvatar(q){return{tag:q.getAssetTag(),frame:q.getAssetFrame(),position:Object.assign({},q.getPosition()),scale:Object.assign({},q.getScale())}}static deserializeTab(q){const K=new Rt;return K.setButton(Ct.deserializeTabButton(q.btn)),K.setIsDefault(q.isDefault),K.setStoreItems(Ct.deserializeCollection(q.items,Ct.deserializeStoreItem)),K}static serializeTab(q){return{btn:Ct.serializeTabButton(q.getButton()),isDefault:q.isDefault(),items:Ct.serializeCollection(q.getStoreItems(),Ct.serializeStoreItem)}}static deserializeTabButton(q){const K=new Dt;return K.setItemType(q.icon.type),K.setItemID(q.icon.ID),K.setTopText(q.top),K.setBottomText(q.bot),K}static serializeTabButton(q){return{icon:{type:q.getItemType(),ID:q.getItemID()},bot:q.getBottomText(),top:q.getTopText()}}static deserializeStoreItem(q){const K=new Ot.J;return K.setType(q.type),K.setID(q.ID),K.setCost(Ct.deserializeCollection(q.cost,Ct.deserializeStoreCost)),K}static serializeStoreItem(q){return{ID:q.getID(),type:q.getType(),cost:Ct.serializeCollection(q.getCost(),Ct.serializeStoreCost)}}static deserializeStoreCost(q){const K=new St;return K.setAmount(q.N),K.setType(q.type),K.setID(q.ID),K}static serializeStoreCost(q){return{N:q.getAmount(),ID:q.getID(),type:q.getType()}}};Pt=Ct=(0,Q.Cg)([(0,dt.injectable)()],Pt);let Mt=class extends lt.k{constructor(q,K){super(),this.dataProvider=null,this.cache=null,this.factoriesContainer=null,this.dataProvider=q,this.cache=K,this.factoriesContainer=new dt.Container,this.factoriesContainer.bind("v1").to(Pt)}getStore(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=`store-${q}`;let z=this.cache.getValue(K);if(null===z){const[Y,Q]=yield this.dataProvider.getStore(q);if(!Q)return null!==Y?[Y,null]:[new Et._("Store was not found"),null];z=this.factoriesContainer.get(`v${Q.version}`).deserialize(Q),this.cache.storeValue(K,z)}return[null,z]}))}invalidateCache(){this.cache.invalidate()}};Mt=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)(Y.StoreDataProvider)),(0,Q.Qj)(1,(0,dt.inject)(Y.CacheStorageStrategy)),(0,Q.Sn)("design:paramtypes",[Tt,wt])],Mt);let Nt=class extends wt{constructor(q){super(q),this.cache={}}hasValue(q){return void 0!==this.cache[q]}invalidate(){super.invalidate(),this.cache={}}retrieveValueFromStorage(q){return this.cache[q]}storeValueInStorage(q,K){this.cache[q]=K}};Nt=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)(Y.CacheExpirationStrategy)),(0,Q.Sn)("design:paramtypes",[Object])],Nt);let xt=class{constructor(){this.cacheTime={},this.expiryMilliseconds=3e5}setExpiryTimeInMinutes(q){this.expiryMilliseconds=6e4*q}setExpiryTimeInSeconds(q){this.expiryMilliseconds=1e3*q}cacheItem(q){this.cacheTime[q]=Date.now()}hasExpired(q){return void 0===this.cacheTime[q]||Date.now()>this.cacheTime[q]+this.expiryMilliseconds}invalidate(){this.cacheTime={}}};xt=(0,Q.Cg)([(0,dt.injectable)()],xt);var Lt=z(7408),kt=z(51540),Bt=z(55080),Ut=z(40579),Ft=z(76277);const Gt=(0,z(77601).gb)({key:"game-native-app-notification-config",activateAssociatedExperiments:0,evaluate:q=>Object.assign(Object.assign({},q),{notifications:q.enabled&&Array.isArray(q.notifications)?[...q.notifications]:[]}),default:{enabled:!0,notifications:[]}});var jt=z(98252);let $t=class{isNativeAppNotificationFeatureEnabled(){return jt.pF.isNativeApp()&&(0,Ft.G)(Gt).enabled}getNativeAppNotifications(){const q=(0,Ft.G)(Gt).notifications;return this.isNativeAppNotificationFeatureEnabled()&&(null==q?void 0:q.length)>0?q:[]}getNativeAppNotificationFromTriggerType(q){return this.getNativeAppNotifications().filter((K=>K.notificationTrigger===q))}getNativeAppNotificationFromId(q){return this.getNativeAppNotifications().filter((K=>(null==K?void 0:K.id)===q))}presentOrScheduleNativeAppNotification({triggerType:q,id:K}){var z,Y,Q;let X;return q&&(X=this.getNativeAppNotificationFromTriggerType(q)),!X&&K&&(X=this.getNativeAppNotificationFromId(K)),!!X&&(null===(Q=null===(Y=null===(z=window.SW)||void 0===z?void 0:z.NATIVE_APP_NOTIFICATIONS)||void 0===Y?void 0:Y.presentOrScheduleNotification)||void 0===Q||Q.call(Y,X),!0)}triggerNotification({triggerType:q,id:K}){try{if(!this.isNativeAppNotificationFeatureEnabled())return;this.presentOrScheduleNativeAppNotification({triggerType:q,id:K})}catch(z){X.RQr.createHandler("Error presenting native app notification")(z)}}};$t=(0,Q.Cg)([(0,dt.injectable)()],$t);let Ht=class{triggerNotification(){}};Ht=(0,Q.Cg)([(0,dt.injectable)()],Ht);var Vt=z(83634),Wt=z(88061),qt=z(20352),Kt=z(88701),zt=z(91207),Yt=z(24521),Qt=z(23029);let Xt=class{get constants(){var q,K;return this.assetData||(this.assetData=null===(K=null===(q=Qt.R.loadData(Yt.r.BattleRevampConstants_json))||void 0===q?void 0:q.battleConstants)||void 0===K?void 0:K.spawns),this.assetData}};Xt=(0,Q.Cg)([(0,dt.injectable)()],Xt);let Zt=class{constructor(){this.constants=z(94554)}};Zt=(0,Q.Cg)([(0,dt.injectable)()],Zt);var Jt=z(84643),te=z(34829),ee=z(1195),ie=z(48417);class se{static getStoreId(q){return this._overrideMap||this.populateOverrideMap(),this._overrideMap.has(q)?this._overrideMap.get(q):q}static populateOverrideMap(){var q;const K=st.q.instance.prodigy.gameContainer.get("9fe-5b45");this._overrideMap=new Map;for(const z of this._experimentsToCheck){const Y=null!==(q=K.getFeatureValue(z))&&void 0!==q?q:[];for(const q of Y)this._overrideMap.has(q.storeId)||this._overrideMap.set(q.storeId,q.override)}}}se._experimentsToCheck=[];var ne=z(76546);let ae=class extends ne.D{getStore(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const z=null!==(K=se.getStoreId(q))&&void 0!==K?K:q;try{return[null,yield this.makeCloudscriptRequest(ie.D.GameStore.GetStore,{storeId:z},!1)]}catch(Y){return[new Et._(Y.message),null]}}))}};ae=(0,Q.Cg)([(0,dt.injectable)()],ae);var re=z(47008),oe=z(79600),he=z(95066),ce=z(36525),de=z(37629);class le extends de.c{getContentType(){return"application/json"}getData(){return JSON.stringify(this.getJson())}}var ue,fe=z(78686),be=z(69698);fe.defaults.storage=window.sessionStorage;let pe=ue=class{constructor(q){this.timeManager=null,this.timeManager=q}handleErrorCallback(){st.q.instance.prodigy.gameContainer.get("774-4659").logout(!0)}isLoggedIn(){const q=fe.remember(ue.JWT_STORAGE_KEY,window.sessionStorage);return this.validate(q)}getToken(){const q=fe.get(ue.JWT_STORAGE_KEY,window.sessionStorage);return q.startsWith("Bearer")?q.substring(7):q}authenticateRequest(q){q.setHeader("Authorization",fe.get(ue.JWT_STORAGE_KEY,window.sessionStorage),!0)}validate(q){if(X.Aq$.isDefined(q)&&X.Aq$.isDefined(q.claim)){const K=this.timeManager.getServerTimeMs()/1e3;if((!X.Aq$.isDefined(q.claim.exp)||q.claim.exp>K)&&(!X.Aq$.isDefined(q.claim.nbf)||q.claim.nbf{if(q.isOK())return q.data;throw new Error(`Unexpected result: ${JSON.stringify(q)}`)})).catch((q=>{const K=q;throw K.code===oe.EErrorCode.ScriptError&&500===K.errorInfo.status&&X.VyI.log(`[WeeklyChallengeService] ${K.errorInfo.result.message}`,X.$bb.Verbose),X.VyI.log(`WeeklyChallengeService.getPlayerWeeklyChallengeData caught an error : ${X.RQr.stringify(q)}`,X.$bb.Warning),q}));Q.resolve(J)}catch(e){Q.reject(e)}finally{this._getWeeklyChallengeGoalPromise=null}return Q}))}};ye.REQUEST_TIMEOUT_DURATION_MS=1e4,ye.REQUEST_RETRY_COUNT=5,ye=me=(0,Q.Cg)([(0,dt.injectable)()],ye);var _e=z(23034),Ee=z(77938);class we{calculateDamage(q,K,z,Y=0,Q=1){let Z=0;X.Aq$.isDefined(q)&&X.Aq$.isDefined(q.data.damage)&&(Z=q.data.damage);const J=q.data.element,tt=z.getElement();return"Glacial Shield"!==q.data.name&&0===z.modifiers.ignoreElement&&(this.isStrong(J,tt)?Z+=4:this.isWeak(J,tt)&&(Z-=3,Z<=0&&(Z=2))),Z=Math.floor(10*Z*Q),Math.max(Math.floor(Z+(X.Aq$.isDefined(Y)?Y:0)),0)}isStrong(q,K){return X.Aq$.isDefined(q)&&X.Aq$.isDefined(K)&&("fire"===q&&("ice"===K||"earth"===K||"ice & fire"===K)||"water"===q&&("fire"===K||"ice & fire"===K)||"earth"===q&&"water"===K||"storm"===q&&"water"===K||"mech"===q&&"mech"===K||"ice"===q&&("storm"===K||"mech"===K)||"shadow"===q&&"wizard"!==K||"wizard"===q&&"shadow"===K)}isWeak(q,K){return X.Aq$.isDefined(q)&&X.Aq$.isDefined(K)&&("fire"===q&&"water"===K||"water"===q&&("earth"===K||"storm"===K||"mech"===K)||"earth"===q&&("fire"===K||"ice & fire"===K)||"storm"===q&&"ice"===K||"ice & fire"===K||"mech"===q&&"ice"===K||"ice & fire"===K||"ice"===q&&"fire"===K||"ice & fire"===K||"shadow"===q&&"wizard"===K||"wizard"!==q&&"shadow"===K)}getBestAttack(q,K,z=0){if(q.length<=0)return null;const Y=[];let Q;for(let J=0;JK.dmg-q.dmg));let X=Y[Y.length-1].ID,Z=z;for(let J=0;JZ){X=Y[J].ID;break}Z*=.75}return this.getAttack(X)}getAttack(q){return Ee.t.getItem("spell",q)}getHealingAttack(q){let K;for(let z=0;zst.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(z.textKey),configurable:!0})}}}get(q,K){return this.data[q][K]}}var Se=z(34992),Ae=z(36545),Ce=z(15821);let Oe=class{get constants(){return Ce.A.isDefined(this._spellLevelBonuses)||(this._spellLevelBonuses=Qt.R.loadData(Yt.r.SpellLevelBonusConfigs_json).spellLevelBonusConstants),this._spellLevelBonuses}};Oe=(0,Q.Cg)([(0,dt.injectable)()],Oe);var Ie,De=z(7351),Re=z(63352),Pe=z(54950),Me=z(63860),Ne=z(52743),xe=z(35537);let Le=class{constructor(){this.onChange=new X.HN0,this[Ie]="questProgress"}get value(){return this._value}[(Ie=xe.sE,xe.JN)](q){return(0,Q.sH)(this,void 0,void 0,(function*(){this._value=q,this.onChange.dispatch(q)}))}destroy(){this.onChange.dispose()}};Le=(0,Q.Cg)([(0,dt.injectable)()],Le);var ke,Be=z(129),Ue=z(23082),Fe=z(10670),Ge=z(13956),je=z(51151),$e=z(30628),He=z(52850),Ve=z(75408);let We=ke=class{constructor(){this.onMatched=new X.HN0,this.onWaitTimeExhausted=new X.HN0,this.onMatchmakingFailure=new X.HN0,this.onQuit=new X.HN0,this.onHostInviteReceived=new X.HN0}startMatchmaking(q){return(0,Q.sH)(this,void 0,void 0,(function*(){(yield this._theNetworkManager.startMatchmaking(q))?(this._boundMatchedCallback=this.processMatchedMessage.bind(this),this._boundWaitTimeExhaustedCallback=this.processWaitTimeExhaustedMessage.bind(this),this._boundDisconnectCallback=this.processDisconnection.bind(this),this._matchmakingSocket.addListener(X.KZk.Matched,this._boundMatchedCallback),this._matchmakingSocket.addListener(X.KZk.WaitTimeExhausted,this._boundWaitTimeExhaustedCallback),this._matchmakingSocket.addListener(X.KZk.Disconnect,this._boundDisconnectCallback),yield Promise.race([this.onQuit.asPromise(),this.onMatched.asPromise(),this.onWaitTimeExhausted.asPromise()]).finally((()=>{this.quitMatchmaking()}))):this.onMatchmakingFailure.dispatch(new Error("Matchmaking: Error connecting to the matcher api"))}))}quitMatchmaking(){this.onQuit.dispatch(),this._matchmakingSocket.removeListener(X.KZk.Matched,this._boundMatchedCallback),this._matchmakingSocket.removeListener(X.KZk.WaitTimeExhausted,this._boundWaitTimeExhaustedCallback),this._matchmakingSocket.removeListener(X.KZk.Disconnect,this._boundDisconnectCallback),this._boundMatchedCallback=null,this._boundWaitTimeExhaustedCallback=null,this._boundDisconnectCallback=null,this._theNetworkManager.quitMatchmaking()}processMatchedMessage(q){const K=$e.B.fromArray(je.DuelInviteProto,q.opponentData.data),z=new Be.a(st.q.instance.game);z.initFromProtobuf({userID:K.userID,appearance:K.appearance,equipment:K.equipment,name:K.name,team:K.team,member:K.member,level:K.level});const Y={opponent:z,isOpponentHost:q.opponentData.host};this.onMatched.dispatch(Y)}processWaitTimeExhaustedMessage(){this.onWaitTimeExhausted.dispatch()}processDisconnection(){this.onMatchmakingFailure.dispatch(new Error("Matchmaking: Disconnected while matchmaking was running"))}startDuel(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(q.isOpponentHost){const K=this._inviteService.getInvites().find((K=>K.userID===q.opponent.userID));if(K)return void this.handleInviteReceived(q.opponent.userID,K);this._inviteService.onInviteReceived.add(this.handleInviteReceived.bind(this,q.opponent.userID),this);const z=X.Egh.timeout(ke.HOST_INVITE_WAIT_TIME_MS).then((()=>{throw new Error("Timed out waiting for host invite")}));yield Promise.race([this.onHostInviteReceived.asPromise(),z]).finally((()=>{this._inviteService.onInviteReceived.removeAll(this)}))}else yield He.e.invite(Fe.VB.DuelsStadium,q.opponent,this.onDuelEnd.bind(this))}))}onDuelEnd(){st.q.instance.game.state.get(Ue.G.DuelMatchmaking).roomConfig=null,Ve.d.openDuelsStadiumMenu().catch(X.RQr.createHandler("Error going back to Duels Stadium menu"))}handleInviteReceived(q,K){K.userID===q&&(this._inviteService.onInviteReceived.removeAll(this),this.onHostInviteReceived.dispatch(),He.e.acceptInvite(Fe.VB.DuelsStadium,K,this.onDuelEnd.bind(this)))}destroy(){this.onMatched.dispose(),this.onWaitTimeExhausted.dispose(),this.onMatchmakingFailure.dispose(),this.onQuit.dispose(),this.onHostInviteReceived.dispose()}};We.HOST_INVITE_WAIT_TIME_MS=7e3,(0,Q.Cg)([(0,Ge.b)("9b1-43f3"),(0,Q.Sn)("design:type",Object)],We.prototype,"_matchmakingSocket",void 0),(0,Q.Cg)([(0,Ge.b)("774-4659"),(0,Q.Sn)("design:type",Function)],We.prototype,"_theNetworkManager",void 0),(0,Q.Cg)([(0,Ge.b)("7ff-8385"),(0,Q.Sn)("design:type",Object)],We.prototype,"_inviteService",void 0),We=ke=(0,Q.Cg)([(0,dt.injectable)()],We);var qe,Ke=z(17516),ze=z(70330);!function(q){q[q.ServiceUnreachable=0]="ServiceUnreachable",q[q.BattleRoomUnavailable=1]="BattleRoomUnavailable",q[q.Unknown=2]="Unknown"}(qe||(qe={}));var Ye,Qe=z(67665);!function(q){q.Accept="Accept",q.Decline="Decline"}(Ye||(Ye={}));var Xe,Ze=z(52498);let Je=Xe=class{constructor(q){this.jsonData={},this.environment=null,this.loggedFeatureFlagErrors=[],this.environment=q,this.baseAssetsUrl=`${te.s.get("GameConstants.Build.ASSETS_LOCATION")}${te.s.get("GameConstants.Build.ASSETS_FOLDER")}/`}initializeWithJson(q){this.jsonData=q}getValue(q,K=null){var z;if(X.Aq$.isDefined(this.jsonData[q]))return this.jsonData[q];if((null===(z=this.jsonData.enableVerboseFeatureFlagLogging)||void 0===z||z)&&!this.loggedFeatureFlagErrors.includes(q)){this.loggedFeatureFlagErrors.push(q);let z=`Could not find feature flag value for key: ${q}. `;z+=`Returning the default: ${String("object"==typeof K?JSON.stringify(K):K)}`,X.VyI.log(z,X.$bb.Verbose)}return K}getItemsDataURI(){let q=this.getValue("gameDataVersion");return q=X.Aq$.isDefined(q)&&"0"!==q?`${q}/`:"",`${this.getValue("gameDataPath")}${q}game-metadata.json`}getAssetsDataURI(){var q;const K=st.q.instance.prodigy.gameContainer.get("92f-3441").getCurrentEnvironment(),z=this.getAssetURLSuffix(K);let Y;if(null===(q=window.gameEnvironmentVariables)||void 0===q?void 0:q.loadAssetsFromPrevEnv){const q=window.gameEnvironmentVariables.prevEnvId;Y=`${this.baseAssetsUrl}assets-metadata-${q}.json${z}`}else{const q=this.getLocalAssetVersion();Y=`${this.getBaseAssetsURL()}/${q}assets-metadata.json${z}`}return Y}getDependencyMapURI(){var q;const K=st.q.instance.prodigy.gameContainer.get("92f-3441").getCurrentEnvironment(),z=this.getAssetURLSuffix(K);let Y;if(null===(q=window.gameEnvironmentVariables)||void 0===q?void 0:q.loadAssetsFromPrevEnv){const q=window.gameEnvironmentVariables.prevEnvId;Y=`${this.baseAssetsUrl}dependencyMap-${q}.json${z}`}else{const q=this.getLocalAssetVersion();Y=`${this.getBaseAssetsURL()}/${q}dependencyMap.json${z}`}return Y}getAssetPathConfigURI(){var q;const K=st.q.instance.prodigy.gameContainer.get("92f-3441").getCurrentEnvironment(),z=this.getAssetURLSuffix(K);let Y;if(null===(q=window.gameEnvironmentVariables)||void 0===q?void 0:q.loadAssetsFromPrevEnv){const q=window.gameEnvironmentVariables.prevEnvId;Y=`${this.baseAssetsUrl}assetPathConfig-${q}.json${z}`}else{const q=this.getLocalAssetVersion();Y=`${this.getBaseAssetsURL()}/${q}assetPathConfig.json${z}`}return Y}getLocalAssetVersion(){let q=this.getValue("gameAssetsVersion");return q=q&&"0"!==q?`${q}/`:"",q}getPrefabsURIs(){var q;const K=this.getLocalAssetVersion(),z=st.q.instance.prodigy.gameContainer.get("92f-3441").getCurrentEnvironment();let Y,Q;if(null===(q=window.gameEnvironmentVariables)||void 0===q?void 0:q.loadAssetsFromPrevEnv){Q=`-${window.gameEnvironmentVariables.prevEnvId}`,Y=this.baseAssetsUrl}else Q="",Y=`${this.getBaseAssetsURL()}/${K}`;const X=[];for(let Z=0;Z{})}destroy(){this.onInviteReceived.dispose(),this.onInviteCancelled.dispose(),this.onInviteRejected.dispose(),this.onInviteFailed.dispose(),this.onInviteSent.dispose(),this.onInviteRemoved.dispose()}getInvites(){return this._invites}sendInvite(q){this.verboseLog("Retrieving room ID for battle room service");const K=q.userID;this._battleService.getRoomId(`${K}`).then((z=>{var Y,Q,X,Z,J;this.verboseLog(`Retrieved room ID ${z}. Sending invite to user ${K}.`);const tt=this._loggedInPlayer.player,et=tt.getPlayerData().playerTransformation,it=tt.appearance.getData(),nt=tt.equipment.getData(),at=tt.appearance.getName(),rt=je.DuelInviteProto.create({roomID:z,userID:tt.userID,team:tt.data.team,member:tt.hasMembership()?1:0,level:tt.getLevel(),appearance:{faceID:it.face,hair:{styleID:it.hair.style,colorID:it.hair.color},skinColorID:it.skinColor,eyeColorID:it.eyeColor,morph:et?{type:et.transformType,ID:et.transformID}:null},equipment:{hatID:nt.hat,bootsID:nt.boots,weaponID:nt.weapon,outfitID:nt.outfit,costumeID:nt.costume},name:{first:at.getFirstName(),middle:at.getMiddleName(),last:at.getLastName(),nick:at.getNickname()}});this._multiplayerSocket.emitEvent("message",{action:si.Invite,target:K,data:$e.B.toArray(je.DuelInviteProto,rt)}),this._segment.social.sendDuelRequestSentEvent({opponent_id:K,is_classmate:st.q.instance.prodigy.friendsListNetworkHandler.isClassmate(K),is_friend:st.q.instance.prodigy.friendsListNetworkHandler.isFriend(K),opponent_hat_id:null===(Y=q.equipment)||void 0===Y?void 0:Y.getHat(),opponent_boots_id:null===(Q=q.equipment)||void 0===Q?void 0:Q.getBoots(),opponent_outfit_id:null===(X=q.equipment)||void 0===X?void 0:X.getOutfit(),opponent_relic_id:null===(Z=q.equipment)||void 0===Z?void 0:Z.getSpellRelic(),opponent_wand_id:null===(J=q.equipment)||void 0===J?void 0:J.getWeapon()}),this.onInviteSent.dispatch(rt)})).catch((q=>{X.RQr.logError(q,"MultiplayerSocketDuelingInviteService - Failed to retrieve roomID: ");switch((q instanceof ti?q:new ti(ei.Unknown)).type){case ei.ApiMaintenance:this.onInviteFailed.dispatch(qe.BattleRoomUnavailable);break;case ei.ServiceUnreachable:this.onInviteFailed.dispatch(qe.ServiceUnreachable);break;default:this.onInviteFailed.dispatch(qe.Unknown)}}))}rejectInvite(q){const K=this._invites.indexOf(q);K>-1?(this.verboseLog(`Sending invite rejection to user ${q.userID}`),this.sendRejectInvite(q),this.sendDuelRequestAnsweredEvent(K,q,Ye.Decline),this.onInviteRemoved.dispatch(this._invites.splice(K,1)[0])):X.VyI.log(`MultiplayerSocketDuelingInviteService - Could not find invite ${JSON.stringify(q instanceof je.DuelInviteProto?q.toJSON():q)} to reject`,X.$bb.Warning)}sendRejectInvite(q){const K=je.DuelRejectionProto.create({userID:this._loggedInPlayer.player.userID});this._multiplayerSocket.emitEvent("message",{action:si.InviteRejected,target:q.userID,data:$e.B.toArray(je.DuelRejectionProto,K)})}acceptInvite(q){const K=this._invites.indexOf(q);K>-1?(this.verboseLog(`Accepting invite ${JSON.stringify(q instanceof je.DuelInviteProto?q.toJSON():q)}`),this.sendDuelRequestAnsweredEvent(K,q,Ye.Accept),this.onInviteRemoved.dispatch(this._invites.splice(K,1)[0])):X.VyI.log(`MultiplayerSocketDuelingInviteService - Invite was accepted but not found in list. Nothing will send. ${JSON.stringify(q instanceof je.DuelInviteProto?q.toJSON():q)}`,X.$bb.Warning)}cancelInvite(q){this.verboseLog(`Sending cancellation to user ${q}.`);const K=je.DuelCancellationProto.create({userID:this._loggedInPlayer.player.userID});this._multiplayerSocket.emitEvent("message",{action:si.InviteCancelled,target:q,data:$e.B.toArray(je.DuelCancellationProto,K)})}processMessage(q){const K=this._featureFlags.getValue("enableVerboseDuelService",!1);switch(q.action){case si.Invite:{const z=$e.B.fromArray(je.DuelInviteProto,q.data);this._invites.push(z),this._segment.social.sendDuelRequestReceivedEvent({opponent_id:z.userID,is_classmate:st.q.instance.prodigy.friendsListNetworkHandler.isClassmate(z.userID),is_friend:st.q.instance.prodigy.friendsListNetworkHandler.isFriend(z.userID)}),this.onInviteReceived.dispatch(z),K&&this.verboseLog(`Received invite from other user ${JSON.stringify(z.toJSON())}`);break}case si.InviteRejected:{const z=$e.B.fromArray(je.DuelRejectionProto,q.data);K&&this.verboseLog(`Received rejection from other user ${JSON.stringify(z.toJSON())}`),this.onInviteRejected.dispatch(z.userID);break}case si.InviteCancelled:{const z=$e.B.fromArray(je.DuelCancellationProto,q.data),Y=this._invites.findIndex((q=>q.userID===z.userID));Y>-1?(K&&this.verboseLog(`Received cancellation from other user ${JSON.stringify(z.toJSON())}`),this.onInviteCancelled.dispatch(this._invites.splice(Y,1)[0])):X.VyI.log(`MultiplayerSocketDuelingInviteService - Invite was cancelled by user ${z.userID}, but not found`,X.$bb.Warning);break}}}sendDuelRequestAnsweredEvent(q,K,z){const Y=st.q.instance.prodigy.friendsListNetworkHandler;this._segment.social.sendDuelRequestAnsweredEvent({opponent_id:K.userID,is_classmate:Y.isClassmate(K.userID),is_friend:Y.isFriend(K.userID),friends:Y.friendsList.length,classmates:Y.classList.length,index:q,challenges_pending:this._invites.length,challenge_response:z})}verboseLog(q){X.VyI.log(`${this.serviceName} - ${q}`,X.$bb.Verbose)}};(0,Q.Cg)([(0,Ge.b)("8a8-c77c"),(0,Q.Sn)("design:type",Object)],ni.prototype,"_multiplayerSocket",void 0),(0,Q.Cg)([(0,Ge.b)("ad2-c5b2"),(0,Q.Sn)("design:type",ee.E)],ni.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,Ge.b)("f71-42eb"),(0,Q.Sn)("design:type",Je)],ni.prototype,"_featureFlags",void 0),(0,Q.Cg)([(0,Ge.b)("10c-d37d"),(0,Q.Sn)("design:type",ii)],ni.prototype,"_battleService",void 0),(0,Q.Cg)([(0,Ge.b)("20f-5f67"),(0,Q.Sn)("design:type",Qe.Y)],ni.prototype,"_segment",void 0),ni=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Sn)("design:paramtypes",[])],ni);let ai=class extends ni{get serviceName(){return"SynapseDuelingInviteService"}constructor(){super(),this._synapse.onNotificationReceived.add(this.processNotification,this)}destroy(){this._synapse.onNotificationReceived.remove(this.processNotification,this),super.destroy()}sendInvite(q){const K=Object.create(null,{sendInvite:{get:()=>super.sendInvite}});return(0,Q.sH)(this,void 0,void 0,(function*(){var z,Y,Q,Z,J;const tt=q.userID,et=this._loggedInPlayer.player,it=et.getPlayerData().playerTransformation,nt=et.appearance.getData(),at=et.equipment.getData(),rt=et.appearance.getName(),ot={userID:et.userID,member:et.hasMembership()?1:0,level:et.getLevel()+et.getChargedLevel(),appearance:{face:nt.face,hair:{style:nt.hair.style,color:nt.hair.color},skinColor:nt.skinColor,eyeColor:nt.eyeColor,morph:it?{type:it.transformType,ID:it.transformID}:null},equipment:{hatID:at.hat,bootsID:at.boots,weaponID:at.weapon,outfitID:at.outfit,costumeID:at.costume},name:{first:rt.getFirstName(),middle:rt.getMiddleName(),last:rt.getLastName(),nick:rt.getNickname()}};try{this.verboseLog(`Attempting invite via notification service to user ${tt}`);const X=yield this._battleService.sendInvite(`${tt}`,ot);this._legacyInviteSent=!X.wasInvited,X.wasInvited?(this.verboseLog(`User was invited to channel name ${X.channelName}.`),this._segment.social.sendDuelRequestSentEvent({opponent_id:tt,is_classmate:st.q.instance.prodigy.friendsListNetworkHandler.isClassmate(tt),is_friend:st.q.instance.prodigy.friendsListNetworkHandler.isFriend(tt),opponent_hat_id:null===(z=q.equipment)||void 0===z?void 0:z.getHat(),opponent_boots_id:null===(Y=q.equipment)||void 0===Y?void 0:Y.getBoots(),opponent_outfit_id:null===(Q=q.equipment)||void 0===Q?void 0:Q.getOutfit(),opponent_relic_id:null===(Z=q.equipment)||void 0===Z?void 0:Z.getSpellRelic(),opponent_wand_id:null===(J=q.equipment)||void 0===J?void 0:J.getWeapon()}),this.onInviteSent.dispatch(X)):(this.verboseLog(`User is not on the notification service. Sending legacy invite with channel name ${X.channelName}.`),K.sendInvite.call(this,q))}catch(e){X.RQr.logError(e,"SynapseDuelingInviteService - Failed to retrieve roomID"),this.onInviteFailed.dispatch(qe.Unknown)}}))}sendRejectInvite(q){q instanceof je.DuelInviteProto?super.sendRejectInvite(q):(this.verboseLog(`Sending rejection to user ${q.userID}.`),this._battleService.rejectInvite(`${q.userID}`).catch(X.RQr.createHandler(`Error sending invite rejection to ${q.userID}`)))}cancelInvite(q){this._legacyInviteSent?super.cancelInvite(q):(this.verboseLog(`Sending cancellation to user ${q}.`),this._battleService.cancelInvite(`${q}`).catch(X.RQr.createHandler(`Error sending invite cancellation to ${q}`)))}processNotification(q){switch(q.type){case Ke.m.DuelInvite:{const K=q.data;this._invites.push(K),this._segment.social.sendDuelRequestReceivedEvent({opponent_id:K.userID,is_classmate:st.q.instance.prodigy.friendsListNetworkHandler.isClassmate(K.userID),is_friend:st.q.instance.prodigy.friendsListNetworkHandler.isFriend(K.userID)}),this.onInviteReceived.dispatch(K),this.verboseLog(`Received invite from other user ${JSON.stringify(K)}`);break}case Ke.m.DuelInviteRejection:{const{userId:K}=q.data;this.verboseLog(`Received rejection from user ${K}`),this.onInviteRejected.dispatch(parseInt(K));break}case Ke.m.DuelInviteCancellation:{const{userId:K}=q.data,z=this._invites.findIndex((q=>`${q.userID}`===K));z>-1?(this.verboseLog(`Received cancellation from user ${K}`),this.onInviteCancelled.dispatch(this._invites.splice(z,1)[0])):X.VyI.log(`SynapseDuelingInviteService - Invite was cancelled by user ${K}, but not found`,X.$bb.Warning);break}}}};(0,Q.Cg)([(0,Ge.b)("b0c-9016"),(0,Q.Sn)("design:type",ze.d)],ai.prototype,"_synapse",void 0),ai=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Sn)("design:paramtypes",[])],ai);var ri=z(94393),oi=z(76007),hi=z(40295),ci=z(78889),di=z(93867),li=z(84399),ui=z(65068);let fi=class{constructor(){this.objectiveTypes=[ui.q.RestrictedEncounterBlocking],this.onObjectiveUpdated=new X.HN0}getObjectives(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;if(!li.R.isFeatureEnabled()||!di.U.isStepComplete(hi.B.PuppetMasterDefeated))return[];const{requirements:K}=null!==(q=this._featureRequirements.getProgressForRequirements(59))&&void 0!==q?q:{requirements:[]};return K.every((q=>Object.values(q).every((({progress:q})=>{const[K,z]=q;return K>=z}))))?[]:(0,ci.yd)({requirements:K,objectiveIdPrefix:"hard-mode-req",type:ui.q.HardModeRequirement})}))}};(0,Q.Cg)([(0,dt.inject)("11f-118a"),(0,Q.Sn)("design:type",Object)],fi.prototype,"_featureRequirements",void 0),fi=(0,Q.Cg)([(0,dt.injectable)()],fi);var bi=z(47708);var pi,vi=z(97495),gi=z(73797),mi=z(55122);let yi=class{constructor(){this[pi]="campaignReplayChangedData"}[(pi=xe.sE,xe.JN)](q){return(0,Q.sH)(this,void 0,void 0,(function*(){X.Aq$.isDefined(q.newProgressStep)&&this.handleNewProgressStep(q.newProgressStep),X.Aq$.isDefined(q.newDifficultyUnlocks)&&this.handleNewDifficultyUnlocks(q.newDifficultyUnlocks),X.Aq$.isDefined(q.newDifficultySelected)&&this.handleNewDifficultySelected(q.newDifficultySelected)}))}handleNewProgressStep(q){switch(q){case bi.q6.HardModeIntroduced:mi.s.validatePlayerAndPetXp(),this.fetchChargedLevelsData();break;case bi.q6.ExpertModeStarted:this.fetchChargedLevelsData()}X.VyI.log(`[CampaignReplaySideEffectEventHandler] New progress step: ${q}`,X.$bb.Verbose)}fetchChargedLevelsData(){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.updateChargedLevelsData().catch(X.RQr.createHandler("CampaignReplaySideEffectEventHandler: Could not update charged levels data"))}handleNewDifficultyUnlocks(q){var K,z;if("object"!=typeof(z=q)||null===z||!Object.entries(z).every((([q,K])=>q in bi.Al&&"boolean"==typeof K)))return void X.VyI.log(`[CampaignReplaySideEffectEventHandler] Invalid difficulty unlocks: ${JSON.stringify(q)}`,X.$bb.Error);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2"),Q=null!==(K=Y.player.data.difficultyUnlocks)&&void 0!==K?K:bi.Al,Z=Object.keys(q).filter((K=>q[K]&&!Q[K]));Z.includes(vi.i.Hard)&&(X.VyI.log("[CampaignReplaySideEffectEventHandler] Hard mode just unlocked",X.$bb.Verbose),st.q.instance.game.broadcaster.broadcast(gi.oL.HardModeJustUnlocked)),Z.includes(vi.i.Expert)&&(X.VyI.log("[CampaignReplaySideEffectEventHandler] Expert mode just unlocked",X.$bb.Verbose),st.q.instance.game.broadcaster.broadcast(gi.oL.ExpertModeJustUnlocked));const tt=J().cloneDeep(q);Y.player.data.difficultyUnlocks=tt,mi.s.validatePlayerAndPetXp(),X.VyI.log(`[CampaignReplaySideEffectEventHandler] New difficulty unlocks applied: ${JSON.stringify(Y.player.data.difficultyUnlocks)}`,X.$bb.Verbose)}handleNewDifficultySelected(q){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.currentDifficulty=q,X.VyI.log(`[CampaignReplaySideEffectEventHandler] New difficulty selected: ${q}`,X.$bb.Verbose)}};yi=(0,Q.Cg)([(0,dt.injectable)()],yi);var _i,Ei=z(72379),wi=z(47969);let Ti=_i=class{constructor(q){this._activeCooldowns={},this._timeManager=q}setCooldown(q,K){this._activeCooldowns[q]=K}hasCooldown(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.fetchCooldowns();const z=this._timeManager.getServerTimeMs(),Y=this._activeCooldowns[q];return X.Aq$.isDefined(Y)&&zq.indexOf("page")>=0)))}sendSegmentEvents(q,K,z){switch(q){case"Container Discovered":this._segment.container.sendContainerDiscoveredEvent(Si.ZF.Interactable,K,null==z?void 0:z.x,null==z?void 0:z.y,`${Si.ZF.Interactable}--${K}`);break;case"Container Opened":this._segment.container.sendContainerOpenedEvent(Si.ZF.Interactable,K)}}}var Ci=z(10730);class Oi{constructor(q,K,z=1,Y=1,Q=3,X=null){this.id=q,this.drops=K,this.minTeamSize=z,this.maxTeamSize=Y,this.difficulty=Q,this.bench=X}setup(q){q.dungeonZone.collectedItems[q.key].indexOf("monster")<0&&(q.monsterConfig=this)}}var Ii=z(28930);let Di=class{constructor(){this.config=null,this.randomDataGenerator=null}initDungeon(q){this.config=q,this.randomDataGenerator=new X.bsf([this.config.getSeed()])}createLayout(){X.VyI.log(`Creating dungeon from seed: ${this.config.getSeed()}`,X.$bb.Verbose),this.layout={seed:this.config.getSeed(),mapConfigs:[],start:null,end:null};for(let Q=0;Q=z)return null;if(q>=this.config.getGridWidth()||K>=this.config.getGridHeight()||q<0||K<0)return null;if(X.Aq$.isDefined(this.layout.mapConfigs[q][K]))return null;const Z={x:q,y:K,tilemap:null,initFsm:null,connections:[],components:[]};this.layout.mapConfigs[q][K]=Z;const J=Y+1;if(J>=z)return Q&&(Z.components.push(new Ci.v(1)),this.layout.end=Z),Z;let tt=this.randomDataGenerator.integerInRange(0,3);0===tt&&Q&&1===J&&(tt=this.randomDataGenerator.integerInRange(1,3));let et=null;const it=tt;do{const Y={x:q,y:K};switch(tt){case Ii.O.North:Y.y--;break;case Ii.O.East:Y.x++;break;case Ii.O.South:Y.y++;break;case Ii.O.West:Y.x--}if(et=this.addRoomsToPath(Y.x,Y.y,z,J,Q),X.Aq$.isDefined(et))return this.connectRooms(et,Z),Z;tt=(tt+1)%4}while(tt!==it);return this.layout.mapConfigs[q][K]=null,null}addMonsters(q){const K=this.getAllRooms(!1);for(let z=0;zz===K[q]))}}addExtraPaths(q){const K=this.getAllRooms(!1);this.randomDataGenerator.shuffle(K);let z=0;for(;K.length>0&&zZ.findIndex(Y,q)>=0))}z!==q&&X.VyI.log(`Could create all extra paths. Target: ${q}, Created: ${z}`,X.$bb.Warning)}addGoldenPages(q){const K=this.getAllRooms(!1);this.randomDataGenerator.shuffle(K);const z=Z.remove(K,(q=>Z.findIndex(q.components,(q=>q instanceof Oi))>=0));let Y=0;for(;Y.5&&(Y=2,z++),K[z].components.push(new Ai(19,Y))}}assignRoomTilemaps(){const q=this.getAllRooms();let K=[...this.config.getNormalRooms()],z=[...this.config.getMonsterRooms()];this.randomDataGenerator.shuffle(K),this.randomDataGenerator.shuffle(z);for(let Y=0;Yq instanceof Ci.v&&1===q.id))>=0)Q.tilemap=this.config.getEndRoom().getTileMap(),Q.initFsm=this.config.getEndRoom().getFSM();else{let q=null,Y=K;Z.findIndex(Q.components,(q=>q instanceof Ai&&18===q.id))>=0&&(Y=z),q=Y.shift(),Q.tilemap=q.getTileMap(),X.Aq$.isDefined(q.getFSM())&&(Q.initFsm=q.getFSM()),0===K.length&&(K=[...this.config.getNormalRooms()],this.randomDataGenerator.shuffle(K)),0===z.length&&(z=[...this.config.getMonsterRooms()],this.randomDataGenerator.shuffle(z))}}}getAllRooms(q=!0){let K=[];for(let z=0;zX.Aq$.isDefined(q))));return q||(K=Z.filter(K,(q=>Z.findIndex(q.components,(q=>q instanceof Ci.v))<0))),K}findRandomEmptyAdjacentRoom(q){let K=this.randomDataGenerator.integerInRange(0,3);const z=K;do{const z={x:q.x,y:q.y};switch(K){case 0:z.y--;break;case 1:z.x++;break;case 2:z.y++;break;case 3:z.x--}if(z.x=0&&z.y>=0&&!X.Aq$.isDefined(this.layout.mapConfigs[z.x][z.y]))return z;K=(K+1)%4}while(K!==z);return null}connectRooms(q,K){let z=0,Y=0;q.xK.x?(z=3,Y=1):q.y>K.y?(z=0,Y=2):q.y{this.openExitMenu(q)}));if(q.dungeonZone.collectedItems[q.key].indexOf("floorIntro")<0&&!this._towerZone.isTowerComplete()){q.dungeonZone.addCollected(q.key,"floorIntro");const K=new Ni.rD(st.q.instance.game),z=this._towerZone.getFloorConfig(this._towerZone.CurrentFloor).dialogueIDs,Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.previousZone===Bi.EARTH_TOWER_CR?()=>{xi.c.instance.isPlayerQualified()&&st.q.instance.game.time.events.addTimer(te.s.SECONDS_TO_MILLISECONDS_MULTIPLIER*xi.c.instance.getFtueData().delayInSeconds,(()=>{st.q.instance.prodigy.open.prefabMenu(Pi.l.PetXPBoostFTUEPopup).createContainer=!1}),null,null)}:null;K.addEvents(z.map((q=>({dialogueData:K.dataProvider.get(q),blockInput:!0})))),K.start(!1,Y)}}}openExitMenu(q){if(this._towerZone.isTowerComplete()&&this._towerZone.isWardenSaved)if(this._towerZone.goalCollected{const q=st.q.instance.prodigy.world.getCurrentZone();st.q.instance.prodigy.world.getZone(q).exitDungeon()};st.q.instance.prodigy.open.bossRewards(z,Li.N.TowerRun,void 0,void 0,K,Y)}else this._towerZone.isTowerComplete()?this.goToCommonRoom(q):this._towerZone.CurrentFloor===this._towerZone.TotalFloors?this.showTowerBattleWarningPopup():this.showGotoNextFloorPopup()}showGotoNextFloorPopup(){const q=st.q.instance.prodigy.open.prefabMenu(Pi.l.AcademyTowerGotoNextFloorPopup);q.createContainer=!1,q.onPrefabLoaded.addOnce((q=>{q.transform&&q.findComponentInChildren(ki.l).setCallbacks(this.showTowerBattleWarningPopup.bind(this),this.goToNextFloor.bind(this),this._elevator.exit.bind(this._elevator))}))}showTowerBattleWarningPopup(){const q=st.q.instance.prodigy.open.prefabMenu(Pi.l.AcademyTowerExitPopup);q.createContainer=!1;const K=this._elevator.exit.bind(this._elevator),z=this.goToCommonRoom.bind(this);q.onPrefabLoaded.addOnce((q=>{q.transform&&q.findComponentInChildren(ki.l).setCallbacks(z,void 0,K)}))}goToNextFloor(q){this.onFloorExit(q),q.dungeonZone.enterDungeon()}goToCommonRoom(q){this.onFloorExit(q),this._towerZone.sendSegmentEvent("Tower Run Completed"),st.q.instance.prodigy.world.it(this._towerZone.commonRoom)}onFloorExit(q){this._towerZone.monstersDefeated===this._towerZone.goalTotal&&(this._towerZone.setFloor(this._towerZone.CurrentFloor,!0),this._towerZone.sendSegmentEvent("Tower Floor Completed"))}}Bi.EARTH_TOWER_CR="earthtower-CR";let Ui=class extends Di{createLayout(){X.VyI.log(`Creating dungeon from seed: ${this.config.getSeed()}`,X.$bb.Verbose),this.layout={seed:this.config.getSeed(),mapConfigs:[],start:null,end:null};for(let Q=0;Qq instanceof Ci.v&&0===q.id))>=0)Y.tilemap=this.config.getEndRoom().getTileMap(),Y.initFsm=this.config.getEndRoom().getFSM();else{let q=null;q=K.shift(),Y.tilemap=q.getTileMap(),X.Aq$.isDefined(q.getFSM())&&(Y.initFsm=q.getFSM()),0===K.length&&(K=[...this.config.getNormalRooms()],this.randomDataGenerator.shuffle(K))}}}addCriticalPath(q){const K=Math.floor(this.config.getGridWidth()/2),z=Math.floor(this.config.getGridHeight()/2);this.layout.start=this.addRoomsToPath(K,z,q,0,!0),X.Aq$.isDefined(this.layout.start)?this.layout.start.components.push(new Bi(0)):X.VyI.log("Could not add Critical Path",X.$bb.Verbose)}addMonsters(q){let K=this.getAllRooms(!1);Z.remove(K,(q=>q===this.layout.end)),K=[this.layout.end].concat(K);const z=Z.map(this.config.getMonsterIDs(),(q=>({petID:q,weight:1})));for(let Y=0;Y1?[parseInt(K[0]),parseInt(K[1])]:[parseInt(q),0]}}var Is,Ds=z(56567);let Rs=Is=class{getQuestData(){return(0,Q.sH)(this,arguments,void 0,(function*(q={}){if(!1===q.active)return{activeQuests:[],inactiveQuests:[]};return{activeQuests:Is.ZONE_QUESTS.filter((K=>!q.questIDs||q.questIDs.includes(K.id))).filter((K=>!q.tags||q.tags.every((q=>{var z;return null===(z=K.tags)||void 0===z?void 0:z.includes(q)})))),inactiveQuests:[]}}))}getQuestProgress(){return(0,Q.sH)(this,arguments,void 0,(function*(q={}){const K=yield this.getQuestData(q);return{activeQuests:K.activeQuests.map((q=>this.generateQuestProgressFromLegacyQuestState(q))),inactiveQuests:K.inactiveQuests.map((q=>this.generateQuestProgressFromLegacyQuestState(q)))}}))}generateQuestProgressFromLegacyQuestState(q){var K;const z=[],Y=st.q.instance.prodigy.world.getZone(q.metadata.zoneId).getQuestState();if(null===(K=q.tasks)||void 0===K||K.forEach((q=>{(0,vs.v)("string"==typeof q.id,`Task ID is expected to be a string (found "${q.id}")`);const[K,Q]=q.id.split("-").map((q=>parseInt(q))),X=Y&&(Y.ID>K||Y.ID===K&&Y.seq>Q);z.push({id:q.id,status:X?bs.t.COMPLETE:bs.t.IN_PROGRESS,data:X?void 0:{progress:0}})})),Y){const q=z.find((q=>q.id===`${Y.ID}-${Y.seq}`)),K=z.find((q=>q.status===bs.t.IN_PROGRESS));if(!q&&K){const[q,z]=K.id.toString().split("-").map((q=>parseInt(q)));Y.ID=q,Y.seq=z}}return{id:q.id,status:z.some((q=>q.status===bs.t.IN_PROGRESS))?bs.t.IN_PROGRESS:bs.t.COMPLETE,tasks:z}}setQuestProgressTimestamp(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.getQuestProgress({questIDs:[q.questId]})}))}sendQuestEvent(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const z=new Ds.f,Y=yield this.getQuestData(q),Q=yield this.getQuestProgress(q);for(const Z of Y.activeQuests){const Y=Q.activeQuests.find((q=>q.id===Z.id));if(!Y)continue;const J=(yield fs.f.getTasksInProgress(Z,Y,z)).find((K=>K.shouldSendEvent(q.eventType,q.eventData)));if(J){const z=st.q.instance.prodigy.world.getZone(Z.metadata.zoneId),Y=null!==(K=z.getQuestState())&&void 0!==K?K:{};if(!X.Aq$.isDefined(null==Y?void 0:Y.ID)){[Y.ID,Y.seq]=Os.splitTaskId(J.taskID),Y.state={},Y.req=this.generateQuestRequirementsForTask(J.taskDefinition,Z),z.setState("quest",Y);st.q.instance.prodigy.gameContainer.get("782-c308").state.updated=!0}yield this.advanceTaskProgress(Y,Z,J,q.eventData)}}return this.getQuestProgress({questIDs:q.questIDs,tags:q.tags})}))}advanceTaskProgress(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){var Q,Z,J,tt,et;const it=null!==(Z=null!==(Q=Y.progress)&&void 0!==Q?Q:Y.progressToAdd)&&void 0!==Z?Z:1,nt=null!==(J=z.taskDefinition.completionRequirements.data.target)&&void 0!==J?J:1,at=st.q.instance.prodigy.gameContainer.get("782-c308");if(it>=nt)yield this.advanceQuestState(q,K,z);else switch(z.type){case ps.T.DEFEAT_ENCOUNTER:case ps.T.DEFEAT_QUEST_ENCOUNTER:case ps.T.RECEIVE_ITEM:if(X.Aq$.isDefined(null===(tt=q.req)||void 0===tt?void 0:tt.N)||(q.req=this.generateQuestRequirementsForTask(z.taskDefinition,K),(0,vs.v)(X.Aq$.isDefined(null===(et=q.req)||void 0===et?void 0:et.N),`Quest requirements incorrectly defined for defeat enemy task ${z.taskID}`)),q.req.N-=it,q.req.N<=0)return void(yield this.advanceQuestState(q,K,z));at.state.updated=!0;break;case ps.T.COLLECT_ITEM:if((0,vs.v)(X.Aq$.isDefined(Y.progress),"eventData.progress cannot be empty for the COLLECT_ITEM task; please send the total number of collected items as progress when this event is dispatched"),Y.progress>=nt)return void(yield this.advanceQuestState(q,K,z));break;default:X.VyI.log(`Task progress could not be made for quest ${z.questID} task ${z.taskID}`,X.$bb.Error)}}))}advanceQuestState(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){var Y,Q,X,Z;const[J,tt]=Os.splitTaskId(z.taskID),et=null!==(Y=q.ID)&&void 0!==Y?Y:J,it=null!==(Q=q.seq)&&void 0!==Q?Q:tt,nt=null===(X=K.tasks)||void 0===X?void 0:X.find((q=>{var K;return null===(K=q.prerequisites)||void 0===K?void 0:K.includes(`${et}-${it}`)})),[at,rt]=Os.splitTaskId(null!==(Z=null==nt?void 0:nt.id)&&void 0!==Z?Z:`${et+1}-0`),ot=st.q.instance.prodigy.gameContainer.get("782-c308");q.ID=at,q.seq=rt,et!==at&&(q.state={}),nt&&(q.req=this.generateQuestRequirementsForTask(nt,K)),ot.state.updated=!0,null==ot||ot.forceSaveCharacter(),nt&&(yield this.handleAutoCompletedQuests(nt))}))}handleAutoCompletedQuests(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;if((null===(K=null==q?void 0:q.completionRequirements)||void 0===K?void 0:K.type)===ps.T.NONE){const q={eventType:ps.T.NONE,eventData:{}};yield this.sendQuestEvent(q)}}))}generateQuestRequirementsForTask(q,K){var z,Y,Q;if(q.metadata.questRequirements)return q.metadata.questRequirements;switch(q.completionRequirements.type){case ps.T.DEFEAT_ENCOUNTER:case ps.T.DEFEAT_QUEST_ENCOUNTER:return X.Aq$.isDefined(q.completionRequirements.data.id)?{type:"pet",N:q.completionRequirements.data.target,ID:+q.completionRequirements.data.id}:{type:"clear",N:q.completionRequirements.data.target};case ps.T.COLLECT_ITEM:case ps.T.RECEIVE_ITEM:return{type:"item",N:q.completionRequirements.data.target,ID:+(null!==(z=q.completionRequirements.data.id)&&void 0!==z?z:1)};default:const[Z,J]=Os.splitTaskId(q.id),tt=(null!==(Q=null===(Y=K.tasks)||void 0===Y?void 0:Y.filter((q=>Os.splitTaskId(q.id)[0]===Z)))&&void 0!==Q?Q:[]).map((q=>Os.splitTaskId(q.id)[1]));return{type:"seq",N:Math.max(...tt)+1}}}};Rs.ZONE_QUESTS=[_s.E,ys.C,Ss.a,Ts.S,ms.K,gs.G,ws.J,Es.r,Cs.x,As.x],Rs=Is=(0,Q.Cg)([(0,dt.injectable)()],Rs);var Ps=z(18587),Ms=z(60031),Ns=z(53037),xs=z(3606),Ls=z(3001),ks=z(76846),Bs=z(98938),Us=z(79368);class Fs extends Us.k{constructor(){super(...arguments),this._tags=[Bs.t.Ultimates]}}var Gs,js=z(45918),$s=z(80434),Hs=z(63536),Vs=z(4764);let Ws=Gs=class extends ge{constructor(){super(...arguments),this.previouslyReportedUserIDs=new Set}reportAbuse(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this.previouslyReportedUserIDs.has(null==q?void 0:q.reportedUserID))return Promise.reject(new Error("User has already been reported"));this.previouslyReportedUserIDs.add(q.reportedUserID);const K=this.createRequest(X.iXQ.Post,Gs.CORTEX_REPORT_ABUSE_ENDPOINT,q,Gs.REQUEST_TIMEOUT_DURATION_MS);return this._httpClient.sendRequest(K)}))}};Ws.REQUEST_TIMEOUT_DURATION_MS=1e4,Ws.CORTEX_REPORT_ABUSE_ENDPOINT="v1/reporting.reportAbuse",Ws=Gs=(0,Q.Cg)([(0,dt.injectable)()],Ws);var qs=z(5708),Ks=z(14117),zs=z(37050),Ys=z(77823),Qs=z(71790),Xs=z(67238);class Zs extends Xs.D{add(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const{uniqueId:K}=yield this.call(ie.D.Kennel.UnsecureAdd,{data:q},!0);return K}))}update(q){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.call(ie.D.Kennel.Update,{update:q},!0)}))}evolve(q){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.call(ie.D.Kennel.Evolve,{uniqueId:q},!0)}))}memberUpgradeEvolve(q){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.call(ie.D.Kennel.MemberUpgradeEvolve,{uniqueId:q},!0)}))}remove(q){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.call(ie.D.Kennel.Remove,{uniqueId:q},!0)}))}claim(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.call(ie.D.Kennel.Claim,{token:q,petId:K},!0)}))}}var Js=z(25834),tn=z(80105),en=z(91620),sn=z(3519),nn=z(2980),an=z(77510),rn=z(2775),on=z(11288),hn=z(94995),cn=z(3374),dn=z(84234),ln=z(33587),un=z(46808);let fn=class{constructor(){this._prefabGuidMap=new Map}getPrefab(q){var K;const z=un.T[q];if(this._prefabGuidMap.has(z))return this._prefabGuidMap.get(z).prefab;const Y=Ee.t.getItem("prefab",q);if(!(null===(K=null==Y?void 0:Y.data)||void 0===K?void 0:K.prefab))throw new Error(`Missing item data for prefab ${q}`);return Y.data.prefab}getPrefabItem(q){return this._prefabGuidMap.get(q)}getPrefabFromGUID(q){return this._prefabGuidMap.has(q)?this._prefabGuidMap.get(q).prefab:(X.VyI.log(`Prefab with guid ${q} not found in the PrefabDataProvider`,X.$bb.Warning),null)}rebuildPrefabGuidMap(){var q;(null===(q=Ee.t.data)||void 0===q?void 0:q.prefab)&&Ee.t.data.prefab.forEach((q=>{var K;q.guid&&(null===(K=q.data)||void 0===K?void 0:K.prefab)&&this._prefabGuidMap.set(q.guid,q.data)}))}};fn=(0,Q.Cg)([(0,dt.injectable)()],fn);var bn=z(37251),pn=z(51477),vn=z(44094),gn=z(20952),mn=z(73678),yn=z(90661),_n=z(19464),En=z(90633),wn=z(30405),Tn=z(5898),Sn=z(3862),An=z(17425),Cn=z(87820),On=z(65240),In=z(23283),Dn=z(64353),Rn=z(95057),Pn=z(21097),Mn=z(76945),Nn=z(30226),xn=z(47255),Ln=z(46318);class kn extends Ln.Q{constructor(q,K,z,Y,Q){super(q,K,z,Y,Q,0),this.prizeItems=[],this.poofSpine=null,this.prizeItems=Ln.Q.getWheelItems(q,Q),this.assetID=Q,st.q.instance.prodigy.notifications.clearNotifications(!0),this.game.input.enabled=!1,An.K.cacheAsset(this.game,ct.Q.Spine_ui_roulette_json,An.K.zoneAssetsCached),st.q.instance.prodigy.load.assets([ct.Q.Spine_ui_roulette_json],(()=>{this.startSpin()}))}start(){}endSpin(){this.numSpins++,this.itemDrop=Ee.t.getItem(this.prizeItems[this.selectedIndex].item.type,this.prizeItems[this.selectedIndex].item.ID),this.popPrize(this.itemDrop,this.selectedIndex)}showDialogue(q){this.game.input.enabled=!0,this.dialogueController=st.q.instance.prodigy.dialogue.create();for(let K=0;K{st.q.instance.prodigy.open.membershipInfo((()=>{this.close()}),{conversionFunnelName:xn.o.FunnelSecondWheelSpin})}});const K=Dn.P.shouldUseUnifiedConversionFlow(xn.o.FunnelSecondWheelSpin)?Rn.R.UnifiedConversionFlow:Nn.J.showYouTubeMembershipAd(this.game,!0)?Rn.R.Video:Rn.R.Static,Y=q.get("20f-5f67");Y.purchase.sendFunnelStart(Object.assign(Object.assign({},this.getSegmentPurchaseFunnelTriggerTypeAndCategory()),{contentId:`prizeWheel-${this.assetID}`,adType:K,adVersion:Dn.P.getAdVersion(xn.o.FunnelSecondWheelSpin)})),Y.economy.sendPrizeWheelSpinFailedEvent(In.U.PrizeWheel,Pn.WE.MemberLocked)}this.showDialogue(z)}else this.close()}startSpin(){super.startSpin(),this.game.input.enabled=!1,Nn.J.isDefined(this.dialogueController)&&this.dialogueController.close(),st.q.instance.prodigy.gameContainer.get("20f-5f67").economy.sendPrizeWheelSpunEvent(In.U.PrizeWheel)}tryAgain(){const q={yes:this.trySpin.bind(this),no:this.close.bind(this),text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(this.data.spinAgainDialogue),anim:4};this.showDialogue([q])}close(){st.q.instance.prodigy.notifications.startTimer(),this.game.input.enabled=!0;const q=st.q.instance.prodigy.world.getCurrentZone();st.q.instance.prodigy.world.getZone(q).exitDungeon(this.itemDrop),super.close()}getSegmentPurchaseFunnelTriggerTypeAndCategory(){return{type:"Second-Reward-Wheel-Spin",category:"Reward"}}popPrize(q,K){let z=q;if(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.isItemOwned({type:q.type,ID:q.ID})){const q={type:"currency",ID:19,N:this.prizeItems[K].item.duplicateValue};z=q}st.q.instance.prodigy.create.sprite(this.wheel.x+10,this.wheel.y+20,st.q.instance.prodigy.icon.iconKey(q),null,{x:.5,y:.5},(q=>{this.add(q),q.scale.x=2,q.scale.y=2,this.poofSpine=this.game.add.spine(this.wheel.x,this.wheel.y,ct.Q.Spine_ui_roulette_json),this.poofSpine.setToSetupPose(),this.poofSpine.setAnimationByName(0,"animation",!1).time=4.4,this.add(this.poofSpine);const K=st.q.instance.prodigy.event.create();K.function((()=>{this.game.add.tween(q,this).to({y:X.cj9.between(-100,-50)},1e3,X.GS3.Quadratic.Out).to({y:900},1e3,X.GS3.Quadratic.In).delay(400).start(),this.game.add.tween(q,this).to({x:X.cj9.between(500,780),angle:Math.floor(Mn.o.integerInRange(90,360))},2e3,X.GS3.Linear.None).delay(400).start()})),K.delay(2200),K.function((()=>{if("currency"===z.type){q.alpha=0;for(let K=0;K{this.game.input.enabled=!0,st.q.instance.prodigy.open.gotItem([z],(()=>{this.numSpins<2?this.tryAgain():this.close()}),null,null,null,null,{source_type:On.C.PrizeWheel})})),K.start()}))}}class Bn extends Cn.b{enterDungeon(q){X.Aq$.isDefined(q)?this.generatorConfig.setSeed(q):null===this.generatorConfig.getSeed()&&this.generatorConfig.setSeed(Date.now()),this.resetCooldown(),this.dungeon=st.q.instance.prodigy.gameContainer.get(this.dungeonGenerator),this.dungeon.initDungeon(this.generatorConfig),this.dungeonLayout=this.dungeon.createLayout(),this.collectedItems=null;const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=K.backpack.hasItem("currency",18);K.backpack.consume("currency",18,z),this.teleportInDungeon(this.dungeonLayout.start,640,280)}teleportInDungeon(q,K=640,z=280){X.Aq$.isDefined(this.collectedItems)||(this.collectedItems={}),this.mapConfig=q,this.teleport(this.mapConfig.tilemap,K,z,null,{fadeIn:!0,fadeOut:!0,time:200})}handleLeaving(q,K){this.resetCooldown(),this.consumeTargetCollectible(),super.handleLeaving(q,K)}exitDungeon(q=null){st.q.instance.prodigy.world.it(this.exitMap,855,480)}resetCooldown(){Sn.B.setLastDungeonRun(this.game,this.ID,Date.now());st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.updated=!0}getBattleMods(){return{difficulty:this.generatorConfig.getBattleDifficulty(),drops:[{ID:19,type:"currency",N:5}]}}addCollected(q,K){X.Aq$.isDefined(this.collectedItems[q])||(this.collectedItems[q]=[]),this.collectedItems[q].push(K)}defeatMonster(q,K,z){super.defeatMonster(q,K,z),this.map.addCollected("monster"),this.ID===mn.A_.ARCHIVES&&st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.achievements.increment(Tn.f.ArchiveEnemiesDefeated,1)}goToEnd(){const q=this.dungeon.getAllRooms();for(let K=0;K{new kn(this.game,q.uiLayer,Q,q,K)}));const X=Date.now();Sn.B.setDungeonRunCompleteTime(this.game,this.ID,X)}}var Un=z(4631),Fn=z(85126),Gn=z(84317),jn=z(85182);class $n extends jn.T{constructor(q,K,z){super(q,K,1,"",{type:"seq",N:1},[`${z}-CR`],[],[],[],[],!1),this._towerName=z}setup(q,K,z){return super.setup(q,K,z),z.getTag()!==te.s.TOWER_COMMON_ROOM_SHORTFORM||this.zone.isQuestComplete(1)||st.q.instance.prodigy.world.playScene(`${this._towerName}-intro`),{quit:!0}}}var Hn=z(71802);class Vn extends Hn.D{constructor(q,K,z,Y,Q){super(q,`floor${Y}`,"",640,300,[...K,ht.c.Sfx_academy_portal_open,ct.Q.Spine_archive_door_glow_json],z,Q),this.counterUI=48,this.doorways=[{area:{x:640,y:220},exit:{x:640,y:560},walkTarget:{x:640,y:260}},{area:{x:1215,y:400},exit:{x:140,y:430},walkTarget:{x:1155,y:430}},{area:{x:640,y:640},exit:{x:640,y:300},walkTarget:{x:640,y:595}},{area:{x:60,y:400},exit:{x:1135,y:430},walkTarget:{x:120,y:430}}],this.floor=Y}setup(q,K,z){super.setup(q,K,z);const Y=this.zone;X.Aq$.isDefined(Y.postBattleNootDialogue)&&Y.postBattleNootDialogue.start(!0,(()=>{Y.postBattleNootDialogue=null}),!0),this.dungeonZone.goalCollected===this.dungeonZone.goalTotal&&this.guideToExit(0)}start(q,K){super.start(q,K);const z=this.zone.Element;st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_ACADEMY,`BREADCRUMB_${z.toUpperCase()}_TOWER`),st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_ACADEMY,En.B.BREADCRUMB_ACADEMY_SECOND_FLOOR)}addDoorGlow(q,K){}getName(){const q=this.zone.Element.toUpperCase();return this.zone.isTowerComplete()?st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(`MAP_${q}_TOWER`):st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(`MAP_${q}_TOWER_FLOOR`,this.floor)}}var Wn=z(25531),qn=z(77078),Kn=z(35569),zn=z(83726);class Yn extends zn.T{constructor(q,K,z){super(q,te.s.TOWER_COMMON_ROOM_SHORTFORM,`MAP_${z}_COMMON_ROOM`,1100,525,[Yn.ACADEMY_CR_1,q.wardenRoom],K),this.elevator=null,this.elevatorGuideHand=null,this._towerZone=null,this._towerZone=q}setup(q,K,z){super.setup(q,K,z),this.elevator=this.screen.contentGameObject.findChildByName("elevator"),this.elevator.addComponent(Mi.H).init(K,Mi._.Up,(()=>{this.enterTowerFloor()}));const Y=it._.General_core_json,Q="area-pointer",Z=this._towerZone.Element;st.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(Pi.l.AcademyTowerExitSign,K.aboveGameObject).catch((q=>{X.VyI.log(`Could not load tower exit sign: ${q.message}`,X.$bb.Warning)}));const J=st.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Pi.l.AcademyCommonRoomSignage);if(st.q.instance.prodigy.load.assets([Pi.l.AcademyCommonRoomSignage],(()=>{st.q.instance.prodigy.gameContainer.get("983-05a7").loadFromJSONWithDependencies(J,K.aboveGameObject,void 0,void 0,Pi.l.AcademyCommonRoomSignage).catch((q=>{X.VyI.log(`Could not load Academy Room Signage: ${q.message}`,X.$bb.Warning)}))})),(!st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_ACADEMY,`BREADCRUMB_${Z.toUpperCase()}_TOWER`)||this._towerZone.isBossDefeated&&this._towerZone.isWardenSaved&&!st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_ACADEMY_TOWERS,this._towerZone.elevatorBreadcrumb))&&(this.elevatorGuideHand=this.screen.foreground.addChild(st.q.instance.prodigy.create.sprite(this.elevator.transform.localPosition.x+20,this.elevator.transform.localPosition.y+80,Y,Q)),this.elevatorGuideHand.anchor.set(.5,.5),this.game.add.tween(this.elevatorGuideHand,this).to({y:this.elevatorGuideHand.y+25},400,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0)),st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_ACADEMY,En.B.BREADCRUMB_ACADEMY_SECOND_FLOOR)||this.segment.academyTowers.sendFunnelEvent({funnelName:Wn.w.format("{0}_tower",this._towerZone.Element),funnelType:"feature",step:Kn.D.TowerCommonRoom}),this._towerZone.isTowerComplete()&&!this._towerZone.isWardenSaved){const q=this.elevator.findComponentInChildren(qn.p);q.onClicked.removeAll(),q.onClicked.add((()=>{const q=new Ni.rD(st.q.instance.game);q.addEvents([{dialogueData:q.dataProvider.get(this._towerZone.NootSaveWardenID),blockInput:!0}]),q.start(!1)}));const K=this.screen.foreground.addChild(st.q.instance.prodigy.create.sprite(400,240,Y,Q));K.anchor.set(.5,.5),this.game.add.tween(K,this).to({y:K.y+25},400,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0)}const tt=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(tt.backpack.hasItem("item",this._towerZone.WardenRoomKeyID)>0)!xi.c.instance.isPlayerQualified()||this._towerZone.isBossDefeated||this._towerZone.isWardenSaved||tt.data.previousZone!==tt.data.zone&&tt.data.previousZone!==Yn.ACADEMY_CR_1||st.q.instance.game.time.events.addTimer(te.s.SECONDS_TO_MILLISECONDS_MULTIPLIER*xi.c.instance.getFtueData().delayInSeconds,(()=>{st.q.instance.prodigy.open.prefabMenu(Pi.l.PetXPBoostFTUEPopup).createContainer=!1}),null,null),this.addAreaEvent(q,K,{x:400,y:200,w:100,h:150,rect:!0},this._towerZone.wardenRoom,640,590,(()=>{st.q.instance.prodigy.world.it(this._towerZone.wardenRoom)}));else{const q=st.q.instance.prodigy.create.sprite(400,200,Y,"empty",{x:.5,y:.5},null,120,160);q.inputEnabled=!0,q.alpha=0,q.events.onInputUp.add((()=>{this.screen.user.setValidPath(this.screen.path,400,260,(()=>(st.q.instance.prodigy.open.message(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TOWER_WARDEN_LOCKED")),{})))})),this.screen.content.addChild(q)}this.addAreaEvent(q,K,{x:1230,y:525,w:180,h:100,rect:!0},Yn.ACADEMY_CR_1,0,0)}enterTowerFloor(){if(this._towerZone.isBossDefeated&&this._towerZone.isWardenSaved){const q=st.q.instance.prodigy.event.create();q.enableInput(!0),q.function((()=>{st.q.instance.prodigy.open.towerEntranceMenu(this._towerZone.ID,this._towerZone.ItemTableID,(()=>{this.elevator.findComponent(Mi.H).exit()}))})),q.start()}else{this._towerZone.sendSegmentEvent("Tower Run Started");st.q.instance.prodigy.world.zones[this._towerZone.ID].enterDungeon()}}cleanup(){this.elevator&&(this.elevator.destroy(),this.elevator=null),this.elevatorGuideHand&&(this.elevatorGuideHand.destroy(),this.elevatorGuideHand=null),super.cleanup()}}Yn.ACADEMY_CR_1="academy-CR1";class Qn extends zn.T{constructor(q,K,z){super(q,te.s.TOWER_WARDEN_ROOM_SHORTFORM,`MAP_${z}_WARDEN_ROOM`,640,590,[q.commonRoom],K),this._towerZone=q}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:640,y:640,w:180,h:80,rect:!0},this._towerZone.commonRoom,400,350);const Y=K.contentGameObject.findChildByName(this._towerZone.Boss.tmxName),Q=K.contentGameObject.findChildByName(this._towerZone.Warden.name),X=K.aboveGameObject.findChildByName("bubble");this._towerZone.isBossDefeated?(Y.active=!1,X.active=!1,Q.active=!1,this._towerZone.isWardenSaved||this._towerZone.playScene("freeWarden")):this._towerZone.playScene("battleShadowBoss")}}var Xn=z(75781),Zn=z(79340);class Jn extends Zn.Z{constructor(q,K){super(q,te.s.TOWER_WARDEN_ROOM_SHORTFORM,K),this._towerZone=q}setup(q,K,z){super.setup(q,K,z),K.user.x=640,K.user.y=590}start(q,K){super.start(q,K,23);const z=()=>(0,Q.sH)(this,void 0,void 0,(function*(){const z=K.addNPC(720,590,it._.Npc_sprite_noot_json);z.float(!0);const Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),Q=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);Y.execute(Q.getStateMachine(this._towerZone.FsmIDs.bossBattle),{game:q,screen:K,scene:this,player:K.user,noot:z,map:this},null)})),Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;di.U.progressData.step===hi.B.NotStarted&&Y.hasFoundAllKeystones()?Xn.E.runAllKeystonesSequenceOnMapSetup(z):z().catch(X.RQr.createHandler("AcademyTowerBossBattle start error invoking finishStarting()"))}startBattle(){st.q.instance.prodigy.battle.start({drops:[{type:"gold",N:100}],boss:{ID:this._towerZone.Boss.ID,element:this._towerZone.Element,name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(this._towerZone.Boss.localizedTextRef),attacks:this._towerZone.Boss.attacks,shadowBoss:!0,spineKey:this._towerZone.Boss.spineKey},screen:this._towerZone.Boss.battleBG,difficulty:this._towerZone.Boss.difficulty},null,(()=>{st.q.instance.prodigy.world.getZone(this._towerZone.ID).setBossDefeated(!0),st.q.instance.prodigy.gameContainer.get("20f-5f67").academyTowers.sendFunnelEvent({funnelName:Wn.w.format("{0}_tower",this._towerZone.Element),funnelType:"feature",step:Kn.D.TowerComplete}),st.q.instance.prodigy.world.it(this._towerZone.wardenRoom)}),null,this._towerZone.commonRoom)}}class ta extends Zn.Z{constructor(q,K,z){super(q,te.s.TOWER_COMMON_ROOM_SHORTFORM,K),this._fsmID=z}setup(q,K,z){super.setup(q,K,z)}start(q,K){super.start(q,K,11);const z=K.addNPC(950,525,it._.Npc_sprite_noot_json);z.float(!0),z.walkSpeed=2,z.visible=!0,z.flip(),K.user.x=1100,K.user.y=525,K.user.flip();const Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),Q=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);Y.execute(Q.getStateMachine(this._fsmID),{scene:this,game:q,screen:K,zone:this.zone,player:K.user,noot:z,path:K.path,pathfinder:K.path},null)}}var ea=z(28402),ia=z(48975),sa=z(87337),na=z(59968);class aa extends na.R{constructor(q,K,z,Y,Q){const X=st.q.instance.game,Z=new ia.s(X);Z.init({npc_name:null==Q?void 0:Q.localizedTextRef,npc_type:sa.ac.QuestGiver,x_coord:z,y_coord:Y,npc_animation_id:"idle"}),super(X,K,Z,null,z,Y),this._warden=Q,this.setup()}setup(){const q=st.q.instance.prodigy.create.element(this.sprites,0,0);this._wardenSpine=this.game.add.spine(0,0,this._warden.spine),this._wardenSpine.setAnimationByName(0,"idle",!0),q.add(this._wardenSpine),this.setupCollisionBlock(q),this.showName(),this.nameText.GameObject.legacyTransform.y=this._warden.nameTextPos.y,this.nameText.GameObject.legacyTransform.x=this._warden.nameTextPos.x,this._warden.flipSpine&&(this._wardenSpine.scale.x=-1,this.flip())}setupCollisionBlock(q){this._collisionBlock=q.add(st.q.instance.prodigy.create.emptySprite(-.5*q.width+0,-q.height,q.width,q.height)),this._collisionBlock.alpha=0,this._collisionBlock.inputEnabled=!0,this._collisionBlock.events.onInputDown.add(this.onClicked.bind(this))}onClicked(){const q=new Ni.rD(this.game);q.addEvents(this._warden.freedDialogueIDs.map((K=>({dialogueData:q.dataProvider.get(K),blockInput:!0})))),q.start(),this.sendNpcClickedEvent()}}class ra extends Zn.Z{constructor(q,K){super(q,te.s.TOWER_WARDEN_ROOM_SHORTFORM,K),this._towerZone=q}setup(q,K,z){super.setup(q,K,z),K.contentGameObject.findChildByName(this._towerZone.Boss.tmxName).active=!1}enterScene(q,K,z){super.enterScene(q,K,z)}start(q,K){var z;super.start(q,K,this._towerZone.bgmID),K.user.x=640,K.user.y=450,K.user.flip();const Y=K.addNPC(720,450,it._.Npc_sprite_noot_json);Y.float(!0),Y.flip();const Q=K.contentGameObject.findChildByName(this._towerZone.Warden.name);Q.active=!1;const Z=new aa(K,K.content,Q.transform.localPosition.x+this._towerZone.Warden.offset.x,Q.transform.localPosition.y+this._towerZone.Warden.offset.y,this._towerZone.Warden);Z.flip();const J=null!==(z=this._towerZone.Warden.bubbleAnimName)&&void 0!==z?z:"idle-tandem1",tt=K.aboveGameObject.findChildByName("bubble");this._bubble=tt.findComponentInChildren(ea.v),this._bubble.getSpine().setAnimationByName(0,J,!0);const et=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),nt=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);et.execute(nt.getStateMachine(this._towerZone.FsmIDs.freeWarden),{game:q,screen:K,scene:this,player:K.user,warden:Z,noot:Y,map:this,bubble:this._bubble,path:K.path,pathfinder:K.path},null)}popBubble(){var q;const K=null!==(q=this._towerZone.Warden.bubblePopName)&&void 0!==q?q:"pop";this._bubble.getSpine().setAnimationByName(0,K)}cleanup(){this._bubble&&(this._bubble.destroy(),this._bubble=null),super.cleanup()}}class oa extends Bn{get WardenRoomKeyID(){return this._towerData.wardenRoomKeyID}get TowerEventName(){return this._towerData.towerEventName}get Warden(){return this._towerData.warden}get Element(){return this._towerData.element}get KeystoneZone(){return this._towerData.keystone.zone}get Boss(){return this._towerData.boss}get FsmIDs(){return this._towerData.fsmIDs}get TotalFloors(){return this._towerData.floorConfigs.length}get ItemTableID(){return this._towerData.itemTableID}get NootSaveWardenID(){return this._towerData.saveWardenDialogueID}constructor(q,K){super(q),this.elevatorBreadcrumb=En.B.BREADCRUMB_COMPLETED_ELEVATOR,this._towerData=null,this._academyTowerID=K,this.assets=[Gn.t.Tileset_classroom_png,Gn.t.Tileset_collisions_png,ht.c.Sfx_world,ht.c.Sfx_skywatch,ct.Q.Spine_tower_elevator_json],this.dungeonGenerator="4b8-3156"}init(q,K,z){super.init(q,K,z),z.zoneName!==this.wardenRoom&&z.zoneName!==this.commonRoom?this.bgmID=this._towerData.BGM.dungeon:this.isWardenSaved?this.bgmID=this._towerData.BGM.completed:this.bgmID=this._towerData.BGM.incomplete,X.Aq$.isDefined(this.getCurrentQuest())||this.startQuest(1),this.game.broadcaster.addAppListener(gi.f7.PagesCollected,(()=>{this.updatePagesCounter()}),this)}initData(){if(!X.Aq$.isDefined(this._towerData)){this._towerData=Ee.t.getItem("academyTower",this._academyTowerID).data,this.name=this._towerData.name,this.ID=this._towerData.towerID,this.wardenRoom=`${this.ID}-${te.A.TOWER_WARDEN_ROOM_SHORTFORM}`,this.commonRoom=`${this.ID}-${te.A.TOWER_COMMON_ROOM_SHORTFORM}`,this.questHub=this.ID,this.assets=[...this.assets,...this._towerData.assets],this.goalTotal=this._towerData.battlesPerFloor,this.exitMap=this.commonRoom,this.defaultOnFaint=this.commonRoom,this.prizeWheelId=this._towerData.itemTableID,this.battleBG=this._towerData.battleBG,this.bgmID=this._towerData.BGM.incomplete;const q=this.Warden.spine;this.maps={CR:new Yn(this,this.assets,this.TowerEventName.toUpperCase()),WR:new Qn(this,[...this.assets,q,ct.Q.Spine_warden_bubble_container_json],this.TowerEventName.toUpperCase())},this.quests={1:new $n(this,this.assets,this.ID)},this.scenes={intro:new ta(this,[...this.assets,q,this.Warden.atlas,ot.V.Bgm_fun],this.FsmIDs.intro),battleShadowBoss:new Jn(this,this.assets),freeWarden:new ra(this,[...this.assets,q,ht.c.Sfx_bubble_pop])}}}updatePagesCounter(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let K=q.state.get(`towers-${this.ID}-achievementPagesCount`);K=X.Aq$.isDefined(K)?K:0,K++,q.state.set(`towers-${this.ID}-achievementPagesCount`,K)}handleLeaving(q,K){if(q!==Un.j.mapTeleport){const z=st.q.instance.prodigy.world.getCurrentMap().split("-")[1];if(z!==te.A.TOWER_COMMON_ROOM_SHORTFORM&&z!==te.A.TOWER_WARDEN_ROOM_SHORTFORM){const q=this.goalCollected;st.q.instance.prodigy.open.dungeonExitMenu(this.ID,this._towerData.battlesPerFloor,q,!1,K)}else super.handleLeaving(q,K)}else this.sendSegmentEvent("Tower Run Completed"),super.handleLeaving(q,K)}get CurrentFloor(){if(0===this.FloorStates)return 1;for(let q=1;q<=this.TotalFloors;q++)if(!yn.O.areBitsSet(this.FloorStates,1<0}setBossDefeated(q){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.set(`towers-${this.ID}-boss`,q)}get isBossDefeated(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return Z.get(q.state.data,`towers.${this.ID}.boss`,!1)}get isWardenSaved(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return Z.get(q.state.data,`towers.${this.ID}.wardenSaved`,!1)}get goalCollected(){return this.monstersDefeated}getBattleMods(){const q=super.getBattleMods(),K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return this.CurrentFloor===this.TotalFloors&&0===K.backpack.hasItem("item",this._towerData.wardenRoomKeyID)&&this.monstersDefeated===this._towerData.battlesPerFloor-1&&q.drops.push({ID:this._towerData.wardenRoomKeyID,type:"item",N:1}),q}getFloorConfig(q){return this._towerData.floorConfigs[q-1]}defeatMonster(q,K,z,Y=[]){if(super.defeatMonster(q,K,z),this.monstersDefeated===this._towerData.battlesPerFloor){this.postBattleNootDialogue=st.q.instance.prodigy.dialogue.create();const q=!this.isWardenSaved&&this.isTowerComplete()?this._towerData.afterKeyFoundDialogueIDs:[267];this.postBattleNootDialogue.addEvents(q.map((q=>({dialogueData:this.postBattleNootDialogue.dataProvider.get(q),blockInput:!0}))))}const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let X=oa.getAchievementMonstersCount(this.game,this.ID);Y.length>0?Y.forEach((q=>{this._towerData.achievementMonsterIDs.includes(q.getID())&&X++})):this._towerData.achievementMonsterIDs.includes(q)&&X++,Q.state.set(`towers-${this.ID}-achievementMonstersCount`,X),this.skipProgressBarAnimation=!1}exitDungeon(q=null){this.isBossDefeated&&this.sendSegmentEvent("Tower Floor Completed"),this.sendSegmentEvent("Tower Run Completed"),super.exitDungeon(q)}static getAchievementMonstersCount(q,K){const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=z.state.get(`towers-${K}-achievementMonstersCount`);return wn.o.isNumber(Y)?Y:(z.state.set(`towers-${K}-achievementMonstersCount`,0),0)}static getAchievementPagesCount(q,K){const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=z.state.get(`towers-${K}-achievementPagesCount`);return wn.o.isNumber(Y)?Y:(z.state.set(`towers-${K}-achievementPagesCount`,0),0)}enterDungeon(q){const K=this.getFloorConfig(this.CurrentFloor).generator;this.generatorConfig=st.q.instance.prodigy.gameContainer.get("094-f32c").getDungeon(K),super.enterDungeon(q),this.sendSegmentEvent("Tower Floor Started"),this.isWardenSaved&&!st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_ACADEMY_TOWERS,this.elevatorBreadcrumb)&&st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_ACADEMY_TOWERS,this.elevatorBreadcrumb)}teleport(q,K,z,Y,Q){if(st.q.instance.prodigy.world.getZone(mn.A_.ACADEMY).getKeystoneState(this.KeystoneZone)===Fn.s.Placed){let Z=Q;q!==te.A.TOWER_COMMON_ROOM_SHORTFORM&&q!==te.A.TOWER_WARDEN_ROOM_SHORTFORM&&"end"!==q||(Z={}),X.Aq$.isDefined(Q.timeWhenPreviousZoneLoaded)&&(Z.timeWhenPreviousZoneLoaded=Q.timeWhenPreviousZoneLoaded),X.Aq$.isDefined(Q.callback)&&(Z.callback=Q.callback),X.Aq$.isDefined(this.mapConfig)&&q!==te.A.TOWER_COMMON_ROOM_SHORTFORM&&q!==te.A.TOWER_WARDEN_ROOM_SHORTFORM&&(this.map=new Vn(this,this.assets,this.mapConfig,this.CurrentFloor,`map-${this.Element}-tower`),this.maps={CR:this.maps[te.A.TOWER_COMMON_ROOM_SHORTFORM],WR:this.maps[te.A.TOWER_WARDEN_ROOM_SHORTFORM],[q]:this.map}),super.teleport(q,K,z,Y,Z)}else st.q.instance.prodigy.world.it(mn.A_.HOUSE)}cleanup(){this.game.broadcaster.removeAppListener(gi.f7.PagesCollected,this),super.cleanup()}start(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(X.Aq$.isDefined(this._towerData.betaPopup)&&Object.values(this.quests).length=this._towerData.betaPopup.cooldownTimeInSeconds&&(Y.data.betaPopupCooldownTime=q.getTime(),st.q.instance.prodigy.open.prefabMenu(this._towerData.betaPopup.prefabID))}super.start(q,K,z)}sendSegmentEvent(q){const K=st.q.instance.prodigy.gameContainer.get("20f-5f67").playerMovementAndDiscovery,z=this.TowerEventName,Y=this.isWardenSaved?_n.ss.Random:_n.ss.Normal;switch(q){case"Tower Run Completed":K.sendTowerRunCompletedEvent(z,this.isTowerComplete());break;case"Tower Floor Completed":K.sendTowerRunFloorCompletedEvent({tower_type:z,floor_id:this.isWardenSaved?this.TotalFloors:this.CurrentFloor-1,floor_type:Y});break;case"Tower Floor Started":K.sendTowerRunFloorStartedEvent({tower_type:z,floor_id:this.CurrentFloor,floor_type:Y});break;case"Tower Run Started":K.sendTowerRunStartedEvent(z,this.isTowerComplete())}}}let ha=class{constructor(q,K,z,Y){this.game=null,this.game=q,this.localizer=K,this.playerProvider=z,this.uuidProvider=Y}updateAchievementsCompletion(){const q=st.q.instance.prodigy.gameContainer.get("11f-118a");return te.A.get("GameConstants.Debug.DISABLE_ACHIEVEMENTS")?[]:Ee.t.getCategoryItems("achievement").filter((K=>{if(!K.data.group)return!1;if(K.data.requirements){if(!q.meetsRequirementsDeprecated(K.data.requirements))return!1}const z=this.playerProvider.player.achievements.getProgress(K.ID);if(z>=K.data.ranks.length)return!1;const Y=this.getAchievementValue(K.data.valueFunction);return Y>=K.data.ranks[z]&&(Y>=K.data.ranks.length&&!K.data.reward&&st.q.instance.prodigy.gameContainer.get("20f-5f67").create.achievementComplete({level:this.playerProvider.getLevel(),session_uuid:this.uuidProvider.getUUID(),achievement_name:this.getName(K),achievement_id:K.ID,transaction_id:vn.$.generateUID()}).send(),!0)}))}isComplete(q){return this.playerProvider.player.achievements.getProgress(q.ID)>=q.data.ranks.length}isRewardClaimed(q){return this.playerProvider.player.achievements.getProgress(q.ID)>q.data.ranks.length}canClaimReward(q){return q.data.reward&&this.playerProvider.player.achievements.getProgress(q.ID)===q.data.ranks.length}getCompletionText(q){const K=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);return this.isComplete(q)?K.getText("ACHIEVEMENT_FINISHED"):this.getProgress(q)>=1?K.getText("ACHIEVEMENT_COMPLETED"):`${this.getCurrent(q)} / ${this.getTarget(q)}`}getCurrent(q){let K=this.getAchievementValue(q.data.valueFunction);return(!X.Aq$.isDefined(K)||K<0)&&(K=0),K}getTarget(q){const K=this.playerProvider.player.achievements.getProgress(q.ID);return K>=q.data.ranks.length?0:q.data.ranks[K]}getProgress(q){if(this.isComplete(q))return 1;const K=this.getCurrent(q),z=this.getTarget(q);return Math.min(1,K/z)}getName(q){return this.localizer.getText(q.data.title)}getCategory(q){return this.localizer.getText(q.data.title)}getDesc(q){let K=this.playerProvider.player.achievements.getProgress(q.ID);K>=q.data.ranks.length&&(K=q.data.ranks.length-1);const z=q.data.ranks[K];return X.Aq$.isDefined(z)?this.localizer.getText(q.data.desc).replace("[X]",z.toString()):"Nothing"}getUnclaimedRewards(q=Ee.t.getCategoryItems("achievement")){return q.filter((q=>this.canClaimReward(q)))}processValue(q){return this.playerProvider.player.achievements.getTag(q)}getAchievementValue(q){var K;let z=0;const Y=this.playerProvider.player,Q=Y.backpack,Z=Y.kennel,J=Y.house,tt=Y.state,et=q.params,it=q.type;switch(it){case"hasPlayerCompletedTutorial":z=Y.hasCompletedTutorial()?1:0;break;case"processValue":z=this.processValue(et.achievementTag);break;case"numberOfItemsInBackpack":z=Q.getItemCount(et.backpackItemsTypes);break;case"numberOfItemsInHouse":z=J.getItemCount();break;case"numberOfActiveItemsInHouse":z=J.getActiveCount();break;case"numberOfPets":z=Z.getNumPets();break;case"playerLevel":z=Y.getLevel();break;case"playerRelicCount":z=Y.getNumRelics();break;case"numberOfCompletedQuests":z=tt.getCompletedQuests(et.zone);break;case"areItemsPresentInBackpack":z=Q.hasItems(et.backpackItems)+J.hasItems(et.backpackItems);break;case"givenTagInZone":z=tt.getZoneVars(this.game,et.zone,et.zoneTag);break;case"getSingleStateValue":z=null!==(K=tt.get(et.state))&&void 0!==K?K:0;break;case"numberOfStatesCompletedInShipwreckShore":z=st.q.instance.prodigy.world.getZone(mn.A_.SHIPWRECK).getCompletedStatesCount(et.shipwreckShoreStates);break;case"playerAnswerStreakCount":z=Y.getAnswerStreak();break;case"masteredSkillsCount":z=st.q.instance.prodigy.education.getMasteredSkills();break;case"towerProgress":z=Y.getTowerProgress();break;case"playerColiseumRank":z=Y.getColiseum();break;case"isElementalTowerBossDefeated":z=st.q.instance.prodigy.world.getZone(et.elementalTower).isBossDefeated?1:0;break;case"towerPageCount":z=oa.getAchievementPagesCount(this.game,et.elementalTower);break;case"towerMonsterCount":z=oa.getAchievementMonstersCount(this.game,et.elementalTower);break;case"elementalTowerCurrentFloor":z=st.q.instance.prodigy.world.getZone(et.elementalTower).CurrentFloor;break;case"isSingleItemPresentInBackpack":{const q=et.backpackItems[0];z=Q.hasItem(q.type,q.ID);break}default:(0,vs.v)(!1,`No achievement value function "${it}"`)}return(0,vs.v)(X.Aq$.isDefined(z),`The return value from getAchievementValue for value function "${it}" is not valid.`),z}};ha=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)("d73-66e9")),(0,Q.Qj)(1,(0,dt.inject)(X.$Bt.LocalizationService)),(0,Q.Qj)(2,(0,dt.inject)("ad2-c5b2")),(0,Q.Qj)(3,(0,dt.inject)("d7b-2375")),(0,Q.Sn)("design:paramtypes",[pn.n,X.dTp,ee.E,gn.H])],ha);var ca=z(8872),da=z(30334),la=z(47315);class ua{static getEncounterRate(q){const K=Ee.t.getItem("pet",q).data;return X.Aq$.isDefined(K)?X.Aq$.isDefined(K.R)?K.R:1:0}process(){const q=14549017,K=Ee.t.getCategoryItems("pet"),z=[4,4,4,4,4,4,4,12,30,30];let Y='';for(let Q=0;Q`;Y+='';for(let Q=0;Q"+z.ID+'"}Y+="
    IDIconMemberElementLifePowerNameDescriptionInformation


    '+(z.data.member?"yes":"no")+''+z.data.element+''+z.data.life+''+z.data.power+'"+z.data.name+'"+z.data.flavorText+'
    '+J+"
    "+tt+"
    ",X.VyI.log(Y,X.$bb.Verbose)}}var fa=z(38487),ba=z(86896),pa=z(7914),va=z(25048),ga=z(66726),ma=z(8811),ya=z(30424),_a=z(82329),Ea=z(10655),wa=z(37639),Ta=z(55734),Sa=z(89360),Aa=z(47223),Ca=z(71543),Oa=z(50503),Ia=z(71796),Da=z(93709),Ra=z(32740),Pa=z(36279);class Ma{get battleMods(){return this._battleMods}constructor(q,K){this.game=null,this.battleStats=null,this.game=q,this.metricsManager=K,this.battleStats=new Pa.g}start(q,K,z,Y,Q,Z=!1){st.q.instance.prodigy.gameContainer.get("b37-c775").getBattleStartQuestData(q.revampBattleType).catch((q=>{X.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(q)})).then((X=>{this.continueBattleStart(q,K,z,Y,Q,X)})).catch(X.RQr.createHandler("Error continuing the battle start function in BattleController"))}continueBattleStart(q,K,z,Y,Q,J){var tt,et,it,nt,at,rt,ot,ht,ct,dt,lt,ut,ft;const bt=Z.extend({},Ma.MOD_DEFAULTS,q);this._battleMods=bt;const pt=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,vt=!0===(null===(tt=pt.battleResumeData)||void 0===tt?void 0:tt.nextBattleIsResume),gt=st.q.instance.prodigy.world.getZone(st.q.instance.prodigy.world.getCurrentZone()),mt=null==gt?void 0:gt.getMap(st.q.instance.prodigy.world.getCurrentMapTag()),yt=X.Aq$.isDefined(q.difficulty)?q.difficulty:da.z,_t=Math.max(mi.s.minLevel,Oa.A.getEnemyLevel(pt.getLevel(),yt)),Et=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),wt=this.initBattle(bt,_t),Tt=(null===(et=bt.boss)||void 0===et?void 0:et.ID)?Ee.t.getItem("boss",bt.boss.ID):null,St=wt.reduce(((q,K,z)=>{var Y;return q[`enemy-${z}`]=Object.assign(Object.assign({},K.data),{asset:{id:K.getID(),type:this.getCreatureUnitType(K)},appearance:K instanceof Aa.s?this.translateWizardAppearance(K.appearance):void 0,equipment:K instanceof Aa.s?this.translateWizardEquipment(K.equipment):void 0,ignoreEquipmentSpells:K instanceof Aa.s?null===(Y=null==Tt?void 0:Tt.metadata)||void 0===Y?void 0:Y.ignoreEquipmentSpells:void 0,drops:K.getDrops().filter((q=>q)),nickname:K.data.nickname&&Et.hasText(K.data.nickname)?Et.getText(K.data.nickname):K.data.nickname,level:K.data.level,mergeRank:K.data.mergeRank,skipDefeatedPetStep:K.data.skipDefeatedPetStep}),q}),{}),At={battleType:null!==(it=bt.revampBattleType)&&void 0!==it?it:Hi.gu.Basic,minTeamSize:bt.minTeamSize,maxTeamSize:bt.maxTeamSize,level:null!==(nt=this.getLevelRangeConfig(bt.minLevel,bt.maxLevel))&&void 0!==nt?nt:bt.level,difficulty:bt.difficulty,opponents:{units:St},cooldown:bt.cooldown,activeQuestIDs:null==J?void 0:J.questIDs,questEventsToSend:null==J?void 0:J.questEvents};X.Aq$.isDefined(q.towerFloor)&&(At.currentFloor=q.towerFloor,At.rouletteResult=q.revampRouletteNumber,At.opponents.units={});const Ct=null!==(at=(ft=pt.data).battleResumeDataClient)&&void 0!==at?at:ft.battleResumeDataClient={};At.clientState=null!==(ot=null===(rt=pt.battleResumeData)||void 0===rt?void 0:rt.data)&&void 0!==ot?ot:{},vt||(Ct.currentBackground=null!==(ht=q.screen)&&void 0!==ht?ht:null==mt?void 0:mt.battleBG,Ca.p.shouldStoreTriggerDataWithBattle(bt)&&(At.clientState.battleTriggerData={encounterMap:st.q.instance.prodigy.world.getCurrentMap(),encounterPosition:this.game.broadcaster.broadcast(gi.pm.GetTarget,this.game,[!0])}),pt.updated=!0);const Ot=st.q.instance.prodigy,It=null===(ct=Ot.world.getZone(null==Q?void 0:Q.split("-")[0]))||void 0===ct?void 0:ct.getOnFaintData(),Dt={backgroundID:null!==(dt=Ct.currentBackground)&&void 0!==dt?dt:"battle-coliseum-outside",backgroundMusicID:q.backgroundMusic,victoryMusicID:q.victoryMusic,onEscape:K?()=>K():()=>st.q.instance.prodigy.world.teleportToCurrentMap(),onDefeat:Y?()=>Y():()=>st.q.instance.prodigy.world.teleportToCurrentMap(),onVictory:()=>{z(q,wt)},addZoneCurrency:q.addZoneCurrency,enableTeamDrops:!q.dropsDisabled,scaleGuaranteedDrops:q.scaleGuaranteedDrops,guaranteedDrops:q.drops,defeatData:{teleportData:It},showQiBadgeAnimations:null!==(lt=q.showQiBadgeAnimations)&&void 0!==lt?lt:bt.showQiBadgeAnimations,requirements:bt.requirements},Rt=Ot.game.state.states.get(Ue.G.SecureBattleRevamp);vt?Rt.resumeBattleRequest(At,Dt):st.q.instance.prodigy.gameContainer.get("c91-4e66").initiateTeamSelection(null!==(ut=q.revampBattleType)&&void 0!==ut?ut:Hi.gu.Basic,q,At,(()=>Rt.startBattleRequest(At,Dt))).catch(X.RQr.createHandler("BattleController: Error initiating universal team selection before starting battle"))}getLevelRangeConfig(q,K){if(X.Aq$.isDefined(q)&&X.Aq$.isDefined(K))return{min:q,max:K}}getCreatureUnitType(q){return q instanceof Aa.s?Hi.uj.Wizard:q instanceof Ea.A?Hi.uj.Titan:q instanceof fa.s?Hi.uj.Boss:Hi.uj.Pet}replaceOpponentTeam(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=!0){const z=this.game.state.get(Ue.G.Battle),Y=Z.extend({},Ma.MOD_DEFAULTS,q);return yield z.replaceOpponentTeam(this.initBattle(Y,this.battleStats.level),Y,K),z.teams[1]}))}onEndBattle(){const q=st.q.instance.prodigy.battle.battleStats.type;st.q.instance.prodigy.gameContainer.get("14f-4faa").onWeeklyChallengeBattleEnd(q).then((()=>{Sa.h.instance.updateData()})).catch((q=>{X.VyI.log(`BattleStats update failed: ${X.RQr.stringify(q)}`,X.$bb.Warning)})),st.q.instance.prodigy.load.removeAssets(),this._assets=null}chooseAction(q,K,z,Y,Q,Z,J,tt,et){const it=z.source.getCurrentBamSpells();if(it.length<=0)return X.VyI.log(`Enemy ${z.name} has no spells. Skipping turn.`,X.$bb.Warning),void et();if(K&&Math.random()-1?at=rt:Math.random()<=q/Oa.A.MAX_DIFFICULTY&&Q.getCurrentEnergy()>=3&&nt.length>0&&(Q.changeEnergy(-3),at=nt[X.cj9.between(0,nt.length-1)]),!X.Aq$.isDefined(at))return X.VyI.log("Invalid attack, skipping turn",X.$bb.Warning),void et();J(z,Z,et,at,Oa.A.rollMissChance(q,z.getSource().modifiers.miss))}getBattleLevel(q=null){let K=0;if(X.Aq$.isDefined(q))for(let z=0;zq))}battleScore(q,K,z,Y){const Q=Oa.A.getBestAttack(q.getSource().getAttacks(),q.getSource(),K.getSource(),1-Y),X=Oa.A.getBestAttack(K.getSource().getAttacks(),K.getSource(),q.getSource(),1-Y),Z=Oa.A.calculateDamage(q.getSource(),q.getSource()instanceof wa.K,K.getSource(),Q,{}).damage;if(0===Z)return Number.NEGATIVE_INFINITY;const J=Oa.A.calculateDamage(K.getSource(),K.getSource()instanceof wa.K,q.getSource(),X,{}).damage;if(0===J)return Number.POSITIVE_INFINITY;let tt=q.source.getMaxHearts();z||(tt=Math.max(tt-J,0));return tt/J-q.source.getMaxHearts()/Z+(q.battleShy?Ma.BATTLE_SHY_MODIFIER:0)}chooseRandomMonster(q){X.Aq$.isDefined(Ma.DEBUG_OVERRIDE_MONSTER_ID)&&(q=[{ID:Ma.DEBUG_OVERRIDE_MONSTER_ID,R:1}]);let K=0;for(let Y=0;Y=et.difficultyStreakBench.max;return z=Z&&J?1:J||it?Y:Z||nt?Q:Y>=Q?Y:Mn.o.integerInRange(Y,Q+1),z}initBattle(q,K){var z,Y,Q,J,tt,et,it;const st=[],nt=this.determineOpponentTeamSize(q.minTeamSize,q.maxTeamSize);if(X.Aq$.isDefined(q.boss)){X.Aq$.isDefined(q.boss.level)||(q.boss.level=K),q.boss.level+=X.Aq$.isDefined(q.boss.levelOffset)?q.boss.levelOffset:0;const tt=null!==(z=q.minLevel)&&void 0!==z?z:mi.s.minLevel,et=null!==(Y=q.maxLevel)&&void 0!==Y?Y:mi.s.activePlayerLevelCap;q.boss.level=Z.clamp(q.boss.level,tt,et);const it=Ee.t.getItem("boss",q.boss.ID);(null===(Q=null==it?void 0:it.data)||void 0===Q?void 0:Q.category)===Hi.GJ.Wizard&&it.ID!==Hi.JT?(q.opponent=[{data:{ID:q.boss.ID,level:q.boss.level,nickname:q.boss.nickname}}],q.difficulty=null!==(J=it.data.difficulty)&&void 0!==J?J:q.difficulty,st.push(...this.initNonBossEnemyTeam(q,K,nt))):st.push(...this.initBossEnemyTeam(q,K,nt))}else st.push(...this.initNonBossEnemyTeam(q,K,nt));if(X.Aq$.isDefined(q.pets))for(let at=0;at3&&(st.length=3),X.Aq$.isDefined(q.opponent))for(let Z=0;Z=3&&(st.length=3)}if(X.Aq$.isDefined(q.teamModifiers))for(let X=0;X0){const K=q.encounter[0];Y={ID:K.ID,level:K.level,drops:X.Aq$.isDefined(K.drops)?K.drops:[],nickname:K.nickname}}else{if(!(q.pets&&q.pets.length>0))return;Y=Object.assign(Object.assign({},q.pets[0]),{ID:q.pets[0].ID,level:q.pets[0].level+(null!==(z=q.pets[0].levelOffset)&&void 0!==z?z:0),nickname:q.pets[0].nickname}),q.pets.shift()}return X.Aq$.isDefined(Y.level)&&!q.scale&&(Q=Y.level),this.initEnemy(Y,q,Q)}}initBackupEnemy(q,K,z){if(!X.Aq$.isDefined(q))return;const Y=Math.random()*Z.sumBy(q,(q=>q.weight));let Q=0;for(let Z=0;ZK===q)))return!1;const K=q.split("-")[0];return(K!==mn.A_.LAMPLIGHT||void 0===st.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival())&&(!!this.lockedZones.includes(K)||!!this.lockedMaps.includes(q))}onClassMode(q,K){const z=q.split("-"),Y=Na.i.getZoneData(z[0]);st.q.instance.prodigy.open.classModeMessage(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(Y.classCodeKey),K,null,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(Y.nameKey),Y.classModeFrame,{isModal:!0},Y.nameKey)}}var La=z(42749),ka=z(67255),Ba=z(68370),Ua=z(28962);let Fa=class{get OnDownBlocked(){return this.onDownBlocked}set InputMask(q){this.inputMask=q}constructor(q){this.onDownBlocked=new X.HN0,this.inputMask=0,this.input=q.input}setBlockType(q,K){q.blockType=K}getBlockType(q){var K;return null!==(K=null==q?void 0:q.blockType)&&void 0!==K?K:0}inputFilter(q,K,z){return this.lastTarget=z,this.isBlocked(z)?null:z}handleClick(){X.Aq$.isDefined(this.lastTarget)&&this.isBlocked(this.lastTarget)&&this.onDownBlocked.dispatch()}isBlocked(q){return 0==(this.inputMask&this.getBlockType(q))}start(){this.input.onDown.add(this.handleClick,this),this.input.setInteractiveCandidateHandler(this.inputFilter,this)}pause(){this.input.onDown.remove(this.handleClick,this),this.input.setInteractiveCandidateHandler(null,this)}destroy(){this.pause(),this.onDownBlocked.dispose(),this.inputMask=0,this.lastTarget=null}};Fa=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)("d73-66e9")),(0,Q.Sn)("design:paramtypes",[pn.n])],Fa);var Ga=z(23748),ja=z(35564);class $a{constructor(q,K){this.ot=q,this._player=K}sendEffectMessage(q,K,z){const Y={action:ja.x.FX,data:{type:q,x:K,y:z}};this.ot.emitMessage(Y)}}let Ha=class{get onBegin(){return this._onBegin}get onComplete(){return this._onComplete}get onFire(){return this._onFire}constructor(q,K,z,Y){this._onBegin=new X.HN0,this._onComplete=new X.HN0,this._onFire=new X.HN0,this._fxSocketHandler=null,this._game=q,this._effects=st.q.instance.prodigy.effects,this._fxSocketHandler=new $a(st.q.instance.prodigy.gameContainer.get("774-4659"),Y.player),this._prefabLoader=K,this._localizer=z}doEffect(q){var K,z;const Y=q.data.effect.fx,Q=Ee.t.getItem("fx",Y).data,Z=Q.type;if("projectile"===Z)this.doProjectile(Y,Q.name,Q.projectileCount,Q.delay);else if("firework"===Z){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer,Q=X.wa5.getActiveScene().container.get("MainPlayerGameObject"),Z=null!==(z=null===(K=null==q?void 0:q.transform)||void 0===K?void 0:K.position)&&void 0!==z?z:Q.transform.worldPosition;this._fxSocketHandler.sendEffectMessage(Y),this._effects.playFX(Y,Z.x,Z.y,void 0,void 0,(()=>{this._onComplete.dispatch()})),this._onFire.dispatch()}}reset(){this.destroyUI(),this._onBegin.removeAll(),this._onFire.removeAll(),this._onComplete.removeAll()}doProjectile(q,K,z,Y){this._onBegin.dispatch(),this._inputBlocker=new Fa(this._game),this._inputBlocker.InputMask=Ua.z.AIMING_OVERLAY|Ua.z.SYSTEM_INFO|Ua.z.REAR_OVERLAY,this._inputBlocker.start(),this._clickOverlay=new X._mx,this._clickOverlay.layer="ui",this._clickOverlay.addComponent(X.K16),this._clickOverlay.legacyTransform.x=.5*this._game.width,this._clickOverlay.legacyTransform.y=.5*this._game.height;const Q=this._clickOverlay.addComponent(qn.p);Q.Width=this._game.width,Q.Height=this._game.height,Q.blockType=Ua.z.AIMING_OVERLAY;const Z=this._prefabLoader.loadFromGUID(Pi.l.WaterBalloonInstructionPanel);Z.findComponentInChildren(X.EYj).text=this._localizer.getText("PROJECTILE_INSTRUCTIONS",K),this._instructionContainer=new X._mx,this._instructionContainer.layer="ui",this._instructionContainer.addComponent(X.dLy),Ba.b.make(this._instructionContainer,Z.legacyTransform),Q.onClicked.addOnce((()=>{const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer,Q=X.wa5.getActiveScene().container.get("MainPlayerGameObject"),Z=X.Aq$.isDefined(K),J=Z?K.position:Q.transform.worldPosition,tt=Z?this._game.input:Ga.z.convertScreenToWorldPosition(this._game.input);this._fxSocketHandler.sendEffectMessage(q,tt.x,tt.y);let et=z;do{const K=1===et;window.setTimeout((()=>{this._effects.playFX(q,J.x,J.y,tt.x,tt.y,(()=>{K&&this._onComplete.dispatch()}))}),Y*et),et--}while(et>0);this.endEffect(!0)}),this)}endEffect(q){this.destroyUI(),q?this._onFire.dispatch():this._onComplete.dispatch()}destroyUI(){var q,K,z;null===(q=this._clickOverlay)||void 0===q||q.destroy(),null===(K=this._instructionContainer)||void 0===K||K.destroy(),null===(z=this._inputBlocker)||void 0===z||z.destroy()}};Ha=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)("d73-66e9")),(0,Q.Qj)(1,(0,dt.inject)("983-05a7")),(0,Q.Qj)(2,(0,dt.inject)(X.$Bt.LocalizationService)),(0,Q.Qj)(3,(0,dt.inject)("ad2-c5b2")),(0,Q.Sn)("design:paramtypes",[pn.n,X.wNP,X.dTp,ee.E])],Ha);var Va=z(55110),Wa=z(21492);let qa=class{constructor(q,K,z){this.providers=new Map,this.localizationService=K,z.forEach((q=>{this.providers.set(q.getZoneID(),q)}))}isAvailable(q){if(!this.providers.has(q))return!1;const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return this.providers.get(q).isActive(K)}isLocked(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(X.Aq$.isDefined(q.member)&&q.member&&!K.hasMembership())return!0;if(!X.Aq$.isDefined(q.req))return!1;for(let z=0;z{st.q.instance.game.tweens.remove(this.currentTween),this.currentTween=this.game.add.tween(this,this).delay(q),this.currentTween.onTweenComplete.add(this.closeNotification,this)}))}closeNotification(){this.game&&(st.q.instance.game.tweens.remove(this.currentTween),this.currentTween=this.game.add.tween(this.notificationContainer,this).to({alpha:0},250,X.GS3.Linear.None,!0,0),this.currentTween.onTweenComplete.add(this.close,this))}runNotificationCallback(){this.notificationCallback(),this.closeNotification()}onPause(){var q;this.visible=!1,null===(q=this.currentTween)||void 0===q||q.pause()}onResume(){var q;this.visible=!0,null===(q=this.currentTween)||void 0===q||q.resume()}close(){var q;this.currentTween&&st.q.instance.game.tweens.remove(this.currentTween),this.game&&st.q.instance.prodigy.notifications.notificationPlayed(),null===(q=this.closeCallback)||void 0===q||q.call(this),super.close()}}nr.configModifiers={};class ar extends nr{constructor(q,K,z,Y=null,Q=null){super(q,K,47,z,Y,Q,[it._.Ui_daily_question_json,ct.Q.Spine_questionsanswered_confetti_json]),this.stopAnimation=!1,this.closeButton=null,this.contractButton=null,this.rewardsButton=null,this.rewardsButtonComplete=null,this.game=q}preprocess(){this.queuePostCreateCallback((()=>{this.renderCell()}),(()=>{this.setAnimation(1e4)}))}onCloseClickCallback(q=null){this.close(),q()}renderCell(){if(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getDailyQuestions().isCurrentDayComplete()){const q=this.add(st.q.instance.prodigy.create.sprite(-10,-10,it._.General_core_json,"overlay-small"),0);q.width=1300,q.height=740,q.alpha=0,q.inputEnabled=!0}this.contractButton.onUpCallback=this.onCloseClickCallback.bind(this,this.closeNotification.bind(this)),this.closeButton.onUpCallback=this.onCloseClickCallback.bind(this,this.closeNotification.bind(this)),this.rewardsButton.onDownCallback=this.onCloseClickCallback.bind(this,st.q.instance.prodigy.open.dailyQuestionsMenu.bind(st.q.instance.prodigy.open)),this.rewardsButtonComplete.onDownCallback=this.onCloseClickCallback.bind(this,st.q.instance.prodigy.open.dailyQuestionsMenu.bind(st.q.instance.prodigy.open,null,!0)),this.sliderAnimation(),this.progressBarTween.start()}sliderAnimation(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getDailyQuestions(),K=q.getNumRequiredToday();q.hasPreviousData()?this.progressSlider.setPercentComplete(q.getPreviousNumAnsweredToday()/K):this.progressSlider.setPercentComplete(q.getNumAnsweredToday()/K),q.clearPreviousData(),this.counterText.setText(`${Math.floor(this.progressSlider.getPercentageComplete()*K)}/${K}`);const z={percent:this.progressSlider.getPercentageComplete()};let Y=0;const Q=q.getNumAnsweredToday()/K;Y=Ga.z.clampedLerp(.01,1,Q),this.progressBarTween=this.game.add.tween(z,this),this.progressBarTween.to({percent:Y},1e3,X.GS3.Cubic.Out,!1,500),this.progressBarTween.onUpdateCallback((()=>{this.stopAnimation||(this.progressSlider.setPercentComplete(z.percent),this.counterText.setText(`${Math.floor(this.progressSlider.getPercentageComplete()*K)}/${K}`))})),this.progressBarTween.onTweenComplete.add((()=>{if(!this.stopAnimation&&(this.progressSlider.setPercentComplete(Y),this.counterText.setText(`${q.getNumAnsweredToday()}/${K}`),1===Y)){this.closeButton.visible=!1,this.contractButton.onUpCallback=this.onCloseClickCallback.bind(this,st.q.instance.prodigy.open.dailyQuestionsMenu.bind(st.q.instance.prodigy.open,null,!0));const q=this.game.add.spine(300,10,ct.Q.Spine_questionsanswered_confetti_json);q.setAnimationByName(0,"animation",!0),this.notificationContainer.add(q,5),this.rewardsButton.onDownCallback=null;this.game.add.tween(this.rewardsButton.scale,this).to({x:0,y:0},200,X.GS3.Linear.None).start(),this.rewardsButtonComplete.scale=new tt.Point(0,0),this.rewardsButtonComplete.visible=!0,this.rewardsButtonComplete.onDownCallback=null;const K=this.game.add.tween(this.rewardsButtonComplete.scale,this).to({x:1,y:1},200,X.GS3.Back.InOut,!1,200);K.start(),K.onTweenComplete.add((()=>{this.rewardsButtonComplete.onDownCallback=this.onCloseClickCallback.bind(this,st.q.instance.prodigy.open.dailyQuestionsMenu.bind(st.q.instance.prodigy.open,null,!0))})),this.progressSliderComplete.visible=!0,this.progressSliderComplete.setPercentComplete(1)}}))}onPause(){super.onPause(),X.Aq$.isDefined(this.progressBarTween)&&this.progressBarTween.pause()}onResume(){super.onResume(),X.Aq$.isDefined(this.progressBarTween)&&this.progressBarTween.resume()}closeNotification(){this.stopAnimation=!0,this.progressBarTween.onTweenComplete.removeAll(),this.progressBarTween.stop(),st.q.instance.game.tweens.remove(this.currentTween),this.currentTween=this.game.add.tween(this.notificationContainer,this).to({alpha:0},250,X.GS3.Linear.None,!0,0),this.progressSlider.getPercentageComplete()>=1&&this.currentTween.onTweenComplete.add(st.q.instance.prodigy.open.dailyQuestionsMenu.bind(st.q.instance.prodigy.open,null,!0,"wait"),st.q.instance.prodigy.open),this.currentTween.onTweenComplete.add(this.close,this)}close(){this.stopAnimation=!0,this.progressBarTween.onTweenComplete.removeAll(),st.q.instance.game.tweens.remove(this.progressBarTween),st.q.instance.game.tweens.remove(this.currentTween),super.close()}}var rr=z(38156),or=z(53151),hr=z(19586),cr=z(80060),dr=z(53661);class lr extends nr{constructor(q,K,z,Y=null,Q=null,Z,J){super(q,K,null,z,Y,Q),this._notificationPrefabAsset=Pi.l.ToasterNotification,this._notificationType=hr._.DEFAULT,this._notificationDelay=8e3,this._showHideDuration=250,this._mapChanged=!1,this.game=q,this._localizer=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Z&&(this._notificationPrefabAsset=Z),J&&(this._notificationType=J),st.q.instance.prodigy.world.mapChanged.addOnce((()=>{this._mapChanged=!0})),st.q.instance.prodigy.gameContainer.get("20f-5f67").social.sendToastNotificationGeneratedEvent({toast_id:`${this._notificationType}`,category:z.notificationConfig.data.category,friends:st.q.instance.prodigy.friendsListNetworkHandler.friendsList.length,classmates:st.q.instance.prodigy.friendsListNetworkHandler.classList.length})}preprocess(){this.renderCell()}renderCell(){var q,K,z,Y;const Q=null!==(K=null===(q=X.wa5.getActiveScene())||void 0===q?void 0:q.container.get("IS_PREFAB_MAP"))&&void 0!==K&&K,Z=st.q.instance.prodigy.gameContainer.get("983-05a7");cr.d.loadWithInjectedValuesAndDependenciesFromGUID(Z,this._notificationPrefabAsset,{NOTIFICATION_ICON_GUID:this.data.notificationConfig.data.icon,NOTIFICATION_TITLE_TEXT:this.data.notificationConfig.data.modal.title,NOTIFICATION_BODY_TEXT:this.data.notificationConfig.data.modal.body,NOTIFICATION_ID:this.data.notificationConfig.ID},Q||null===(Y=null===(z=X.i7d.main)||void 0===z?void 0:z.GameObject)||void 0===Y?void 0:Y.parent).then((q=>{this._prefabGameObject=q,this.runShowToasterTween()})).catch(X.RQr.createHandler("Failed to load the battle pass toaster"))}runShowToasterTween(){const q={value:this._prefabGameObject.transform.anchoredPivotOffset.y};this.currentTween=st.q.instance.game.add.tween(q,this._prefabGameObject).to({value:Math.abs(q.value)},this._showHideDuration,X.GS3.Linear.None,!0).onUpdateCallback((()=>{var K;null===(K=this._prefabGameObject.transform)||void 0===K||K.setPositionY(q.value)})),this.currentTween.onTweenComplete.add((()=>{var q;null===(q=this.currentTween)||void 0===q||q.stop(),window.setTimeout((()=>{this.runHideToasterTween()}),this._notificationDelay)}),this)}runHideToasterTween(){var q;if(this.game&&!this._prefabGameObject.isDestroyed){null===(q=this.currentTween)||void 0===q||q.stop();const K={value:this._prefabGameObject.transform.anchoredPivotOffset.y};this.currentTween=st.q.instance.game.add.tween(K,this._prefabGameObject).to({value:-K.value},this._showHideDuration,X.GS3.Linear.None,!0).onUpdateCallback((()=>{var q;null===(q=this._prefabGameObject.transform)||void 0===q||q.setPositionY(K.value)})),this.currentTween.onTweenComplete.addOnce((()=>this.close()),this)}}close(){var q;null===(q=this._prefabGameObject)||void 0===q||q.destroy(),super.close()}}class ur extends lr{constructor(q,K,z,Y=null,Q=null,X=!1,Z=[]){super(q,K,z,Y,Q),this._notificationPrefabAsset=Pi.l.BattlePassToaster,this._notificationType=hr._.BATTLEPASSQUESTGOALCOMPLETED,this._particleDelay=500,this._showTreasureTrackDelay=1500,this._multiple=!1,this._autoCollectedQuestData=[],this._multiple=X,this._autoCollectedQuestData=Z,this._notificationPrefabAsset=or.h.isFeatureEnabled()?Pi.l.BattlePassToasterWithParticles:Pi.l.BattlePassToaster}renderCell(){this.renderCellAsync().catch(X.RQr.createHandler("Failed to render battle pass notification cell"))}renderCellAsync(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;if(!(yield rr.n.hasBattlePassAccess()))return void this.close();if(!(yield st.q.instance.prodigy.gameContainer.get("9a2-c1c3").getCurrentBattlePassData())||or.h.isFeatureEnabled()&&0===this._autoCollectedQuestData.length)return void this.close();this.setToasterText();const Q=st.q.instance.prodigy.gameContainer.get("983-05a7"),Z=or.h.isFeatureEnabled()?Pi.l.BattlePassToasterWithParticles:Pi.l.BattlePassToaster,J=null!==(K=null===(q=X.wa5.getActiveScene())||void 0===q?void 0:q.container.get("IS_PREFAB_MAP"))&&void 0!==K&&K;yield st.q.instance.prodigy.load.assetsAsPromise(Z);const tt=yield cr.d.loadWithInjectedValuesAndDependenciesFromGUID(Q,Z,{[dr.XU.GoalCompleteToasterTitle]:this._toasterTitleText,[dr.XU.GoalCompleteToasterDescription]:this._toasterBodyText,[dr.XU.ToasterNotificationId]:this.data.notificationConfig.ID},J||null===(Y=null===(z=X.i7d.main)||void 0===z?void 0:z.GameObject)||void 0===Y?void 0:Y.parent);this._prefabGameObject=tt,this.runShowToasterTween()}))}setToasterText(){const q=this._autoCollectedQuestData.length;if(or.h.isFeatureEnabled())if(q>1){const K=this._autoCollectedQuestData.reduce(((q,K)=>q+K.reward.battlePassXp),0);this._toasterTitleText=this._localizer.getText("BATTLE_PASS_NUM_QUESTS_COMPLETE_TOASTER_HEADER",q),this._toasterBodyText=this._localizer.getText("BATTLE_PASS_EXPERIENCE_GAINED_TOASTER_BODY",K.toLocaleString())}else this._toasterTitleText=this._localizer.getText("BATTLE_PASS_SPECIFIC_QUEST_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._autoCollectedQuestData[0].questDescription;else this._multiple||q>1?(this._toasterTitleText=this._localizer.getText("BATTLE_PASS_MULTIPLE_QUESTS_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._localizer.getText("BATTLE_PASS_MULTIPLE_QUESTS_COMPLETE_TOASTER_BODY")):(this._toasterTitleText=this._localizer.getText("BATTLE_PASS_QUEST_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._localizer.getText("BATTLE_PASS_QUEST_COMPLETE_TOASTER_BODY"))}runShowToasterTween(){super.runShowToasterTween(),this.currentTween.onTweenComplete.add((()=>{window.setTimeout((()=>{this.playParticleAnimation()}),this._particleDelay),or.h.autoPopTreasureTrack&&window.setTimeout((()=>{this.openTreasureTrackMenu()}),this._particleDelay+this._showTreasureTrackDelay)}),this)}playParticleAnimation(){var q,K;const z=null===(q=this._prefabGameObject.findComponentInChildren(X.okU,!0))||void 0===q?void 0:q.GameObject,Y=null==z?void 0:z.findChildByName("anchor"),Q=null===(K=st.q.instance.prodigy.gameContainer.get("9a2-c1c3"))||void 0===K?void 0:K.hudButton;Y&&Q?(Y.transform.worldPosition=Q.transform.worldPosition,z.parent.active=!0):X.VyI.log("Cannot find required elements to play BattlePassNotificationCell particle animation.",X.$bb.Warning)}openTreasureTrackMenu(){const q=st.q.instance.prodigy;q.gameContainer.get("9a2-c1c3").getCurrentBattlePassData().then((K=>(0,Q.sH)(this,void 0,void 0,(function*(){K&&K.getNumUnclaimedRewards()>0&&!this._mapChanged&&0===q.open.menus.length&&q.open.battlePassMenu(),this.close()})))).catch(X.RQr.createHandler("Failed to get battle pass quest data."))}}class fr{static loadWithInjectedValuesAndDependencies(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){return cr.d.loadWithInjectedValuesAndDependenciesFromGUID(q,K,z)}))}static loadWithInjectedValues(q,K,z){return cr.d.loadWithInjectedValuesFromGUID(q,K,z)}}var br=z(36648);class pr extends lr{constructor(q,K,z,Y,Q){super(q,K,z,Y,Q,Pi.l.FestivalToaster,hr._.FESTIVALQUESTGOALCOMPLETED),this._notificationPrefabAsset=Pi.l.FestivalToaster,this._notificationType=hr._.FESTIVALQUESTGOALCOMPLETED}renderCell(){var q,K;const z=st.q.instance.prodigy.gameContainer.get("119-35f9");if(null===(q=z.getActiveFestival())||void 0===q?void 0:q.type){this.setToasterText();const q=st.q.instance.prodigy.gameContainer.get("983-05a7");fr.loadWithInjectedValuesAndDependencies(q,Pi.l.FestivalToaster,{FESTIVAL_TOASTER_TITLE:this._toasterTitleText,FESTIVAL_TOASTER_BODY:this._toasterBodyText,FESTIVAL_TOASTER_GRAPHIC:null!==(K=z.getFestivalIcon())&&void 0!==K?K:br.q.Hud_parent_gifts_circle}).then((q=>{this._prefabGameObject=q,this.runShowToasterTween()})).catch(X.RQr.createHandler("Failed to load the festival quest toaster"))}}setToasterText(){this._toasterTitleText=this._localizer.getText("FESTIVAL_QUEST_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._localizer.getText("FESTIVAL_QUEST_COMPLETE_TOASTER_BODY")}}class vr{constructor(q){this.game=null,this.isPlaying=!1,this.currentNotification=null,this.notificationQueue=[],this.notificationTimer=null,this.timerDispatch=null,this.timerOverride=!1,this.queuedShowPlayerGoals=!1,this.notificationBlockers=new Set,this._autoCollectedQuestData=[],this.game=q,this.isPlaying=!1;st.q.instance.prodigy.gameContainer.get("9a2-c1c3").onQuestRewardAutoCollected.add((q=>this._autoCollectedQuestData.push(q)))}initGenericNotification(q,K={}){const z=this.getConfig(q);X.Aq$.isDefined(z)&&(z.data=Object.assign(Object.assign({},z.data),K),this.pushNotification({notificationConfig:z,callback:null}))}initNotificationWithTimer(q,K,z=!1){const Y=this.getConfig(q);return X.Aq$.isDefined(Y)&&(this.timerDispatch=z?window.setTimeout(this.initNotificationWithTimer.bind(this,q,K,z),K):window.setTimeout(this.pushNotification.bind(this,{notificationConfig:Y,callback:null}),K),this.pushNotification({notificationConfig:Y,callback:null})),this.timerDispatch}isPaused(){return this.notificationBlockers.size>0}pause(q){this.notificationBlockers.add(q),this.onPause()}resume(q){this.notificationBlockers.delete(q),this.isPaused()||this.onResume()}resumeAll(){this.notificationBlockers.clear(),this.onResume()}clearNotificationDispatch(q=null){X.Aq$.isDefined(this.timerDispatch)&&(X.Aq$.isDefined(q)?clearTimeout(q):clearTimeout(this.timerDispatch))}onPause(){X.Aq$.isDefined(this.currentNotification)&&this.currentNotification.onPause()}onResume(){X.Aq$.isDefined(this.currentNotification)&&this.currentNotification.onResume()}pushNotification(q){this.notificationQueue.length<3&&!q.notificationConfig.data.autoShare&&this.notificationQueue.unshift(q)}startTimer(q=!1){this.timerOverride&&!q||(this.timerOverride=!1,this.stopTimer(),this.notificationTimer=this.game.time.events.addTimer(vr.toasterTimeout,this.playNextNotification,this))}stopTimer(){this.game.time.events.remove(this.notificationTimer),this.notificationTimer=null}canPlayNotification(){var q;const K=st.q.instance.prodigy.open,z=st.q.instance.game.state.get(Ue.G.TileScreen);return!this.isPlaying&&!this.isPaused()&&0===K.menus.length&&0===K.renderMenus.length&&null===K.chatMenu&&this.notificationQueue.length>0&&(null===(q=null==z?void 0:z.zone)||void 0===q?void 0:q.ID)!==mn.A_.TOWERTOWN}playNextNotification(){this.canPlayNotification()&&this.notificationQueue.length>0&&this.playNotification(this.notificationQueue.shift()),this.startTimer()}clearNotifications(q=!1){X.Aq$.isDefined(this.currentNotification)&&(this.currentNotification.close(),this.notificationPlayed()),X.Aq$.isDefined(this.notificationTimer)&&(this.timerOverride=q,this.stopTimer())}removeQueuedNotificationOfType(q){const K=this.notificationQueue.length;return this.notificationQueue=this.notificationQueue.filter((K=>!q.includes(K.notificationConfig.ID))),K-this.notificationQueue.length}playNotification(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!this.isPlaying&&K.hasCompletedTutorial()){if(this.isPlaying=!0,q.notificationConfig.ID===hr._.CHARGEDLEVELFREEZECOUNTDOWN)this.currentNotification=new lr(this.game,this.menuLayer,q,q.callback,null);else if(q.notificationConfig.ID===hr._.BATTLEPASSQUESTGOALCOMPLETED){const K=this.removeQueuedNotificationOfType([hr._.BATTLEPASSQUESTGOALCOMPLETED]);this.currentNotification=new ur(this.game,this.menuLayer,q,q.callback,null,K>0,this._autoCollectedQuestData),this._autoCollectedQuestData=[]}else q.notificationConfig.ID===hr._.FESTIVALQUESTGOALCOMPLETED?this.currentNotification=new pr(this.game,this.menuLayer,q,q.callback,null):"QuestionsAnswered"===q.notificationConfig.data.category&&(this.currentNotification=new ar(this.game,this.menuLayer,q,q.callback,null));if(!X.Aq$.isDefined(this.currentNotification))return void this.notificationPlayed();this.currentNotification.preprocess(),this.isPaused()&&this.currentNotification.onPause()}else this.pushNotification(q)}notificationPlayed(){this.isPlaying=!1,this.currentNotification=null}getConfig(q){return Nn.J.copyObject(Ee.t.getItem("gameFeed",q))}}vr.toasterTimeout=3e3;var gr=z(38443);class mr extends Ra.M{constructor(q,K,z,Y,Q,J,tt,et,it,st,nt,at,rt){super(q,K,new Ta.R(q,{ID:et.monsterData.ID,nickname:et.monsterData.nickname}),1,z,Y,null,at),this.monsterData=et.monsterData,this.unique=it||!1,this.onEnc=st,this.encountered=!1,this.ID=tt,this.user=Q,this.path=J,this.screen=rt;X.Aq$.isDefined(et.range)||(et.range=mr.DEFAULT_MOD_LENGTH*mr.DEFAULT_MOD_LENGTH*1),et.ignorePathfindingForAlert=Z.get(et,"ignorePathfindingForAlert",!1),et.unique=it,this.mods=et,et.randDir&&Math.random()<.5&&this.flip(),this.mods.encounter=[this.monsterData],nt&&(this.alpha=.5,this.respawnTimer=(new Date).getTime()+1e4),this.reload(),this.visible=!1}process(q){this.zone=q;let K=!1;this.highlight(!1),this.visible=!0;const z=q.getQuestState();if(!X.Aq$.isDefined(z)||!X.Aq$.isDefined(z.req))return;this.unique&&1===z.state[this.ID]&&(this.visible=!1);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if("pet"===z.req.type&&z.req.N>0&&this.source.getID()===z.req.ID&&this.mods.isQuestEncounter)K=!0;else if("item"===z.req.type&&Y.backpack.hasItem("item",z.req.ID)0&&(X.Aq$.isDefined(this.mods.drops)||(this.mods.drops=[]),this.mods.drops.push(...q))}{const q=Fn.N.getAllTowerData().map((q=>q.towerID));this.zone.ID===mn.A_.ARCHIVES?st.q.instance.prodigy.battle.battleStats.type="ArchivesMonsterEncounter":q.includes(this.zone.ID)?(st.q.instance.prodigy.battle.battleStats.type=this.zone.ID,st.q.instance.prodigy.battle.battleStats.battleCustomMeta={floor_number:this.zone.CurrentFloor,encounter_number:this.zone.monstersDefeated+1}):st.q.instance.prodigy.battle.battleStats.type="RandomMonsterEncounter";const K=this.zone.getBattleMods();this.mods=Object.assign(Object.assign({},this.mods),K),st.q.instance.prodigy.battle.start(this.mods,this.onEndBattle.bind(this,this.game,this.zone,this.mods.onEnd,this.source.getID(),this.ID,!1,this.unique,this.onEnc,void 0,this.x,this.y),this.onBattleWin.bind(this,this.game,this.zone,this.mods.onEnd,this.source.getID(),this.ID,this.unique,this.onEnc,this.x,this.y),this.onDefeat,this.mods.onFaint)}}setVisible(q){this.visible=q}patrol(q){this.encountered||this.setPath(q,this.patrol.bind(this,q))}}mr.DEFAULT_MOD_LENGTH=200;var yr=z(98013);class _r extends mr{constructor(q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt){super(q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt);const at=Ee.t.getItem("pet",this.source.data.ID).metadata.assets;this.monsterAsset=at.spine?at.spine:at.default}startLoad(){super.startLoad([ct.Q.Spine_memberpet_icon_json])}setup(q,K){if(K){if(yr.l.removeAll(this.sprites,!0),this.spine=this.game.add.spine(0,0,this.assets[0]),this.spine.setToSetupPose(),this.spine.setAnimationByName(0,"idle",!0),this.spine.scale.x=X.Aq$.isDefined(this.monsterAsset.flip)&&this.monsterAsset.flip?-1:1,this.sprites.addChild(this.spine),X.Aq$.toggleDisplayObjSmooth(this.sprites,!0),this.onClick){const q=st.q.instance.prodigy.create.image(0,0,null);q.alpha=0,q.width=this.getHitboxWidth(),q.height=this.getHitboxHeight(),q.inputEnabled=!0,q.events.onInputDown.add(this.onClick),q.anchor.set(.5,1),this.add(q)}this.complete=!0,this.loading=!1,X.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(this),this._onLoad.dispatch()}}walk(){this.spine?(this.spine.setToSetupPose(),this.spine.setAnimationByName(0,"walk",!0)):this._onLoad.addOnce(this.walk,this)}stand(){this.spine?(this.spine.setToSetupPose(),this.spine.setAnimationByName(0,"idle",!0)):this._onLoad.addOnce(this.stand,this)}}var Er=z(95373),wr=z(57750),Tr=z(86949),Sr=z(31427);class Ar extends Tr.u{constructor(q,K){super(),this._isIdling=!1,this._renderer=null,this.onTargetStopped=new X.HN0,this.onDestroy=new X.HN0,X.Aq$.isDefined(K)&&(this._followController=new Er.u(q,this,K),this.walkSpeed=K.walkSpeed)}create(){super.create(),this._renderer=this.gameObject.findComponent(Sr.A),this._renderer.setAnchor(.5,0),this.stopMoving()}destroy(){this.stopTweens(),this.onDestroy.dispatch(),this.onDestroy.dispose(),this.onTargetStopped.dispose(),super.destroy()}update(){super.update(),X.Aq$.isDefined(this._followController)&&this._followController.update()}walk(){this._isIdling&&(this._renderer.playAnimation("walk",!0),this._isIdling=!1)}stand(){this._isIdling||(this._renderer.playAnimation("idle",!0),this._isIdling=!0,this.gameObject.x=Math.round(this.gameObject.x),this.gameObject.y=Math.round(this.gameObject.y))}setValidPath(q,K,z,Y,Q=!0){q.findPath(this.gameObject.x,this.gameObject.y,K,z,Q).then((q=>{this.setPath(q,Y)})).catch(X.RQr.createHandler("Unable to find path for follow"))}setPath(q,K,z){if(!q||!st.q.instance.game)return;this.stopTweens();const Y=null!=z?z:this.walkSpeed;let Q=null,Z=null,J=this.gameObject.x,tt=this.gameObject.y;for(let et=q.length-1;et>=0;et--){const K=q[et];X.Aq$.isDefined(K.x)||(K.x=J),X.Aq$.isDefined(K.y)||(K.y=tt);const z=X.cj9.distance(K.x,K.y,J,tt);if(0===z)continue;X.Aq$.isDefined(Q)||(Q=st.q.instance.game.add.tween(this.gameObject,this),Z=st.q.instance.game.add.tween(this.gameObject.scale,this));const it=Math.abs(this.gameObject.scale.x);Q.to({x:K.x,y:K.y},6*z/Y,X.GS3.Linear.None),Z.to({x:K.x>J?it:-it},1,X.GS3.Linear.None),Z.to({},6*z/Y-100,X.GS3.Linear.None),J=K.x,tt=K.y}X.Aq$.isDefined(Q)?(Q.onTweenComplete.addOnce(this.stand,this),X.Aq$.isDefined(K)&&Q.onTweenComplete.addOnce(K),this.walk(),X.Aq$.isDefined(Q)&&Q.start(),X.Aq$.isDefined(Z)&&Z.start()):(X.Aq$.isDefined(K)&&K(),this.stand())}stopTweens(){X.Aq$.isDefined(st.q.instance.game)&&(st.q.instance.game.tweens.removeFrom(this.gameObject,!1),this.gameObject&&!this.gameObject[wr.k.DESTROYED]&&st.q.instance.game.tweens.removeFrom(this.gameObject.scale))}getPosition(){return this.gameObject.position}pathTo(q){let K;K=st.q.instance.game.state.get(Ue.G.TileScreen).path,K||(K=st.q.instance.game.state.get(Ue.G.Museum).path),K?this.setValidPath(K,q.x,q.y,this.targetStopped.bind(this),!0):X.VyI.log("No pathfinder found!",X.$bb.Error)}isMoving(){return!this._isIdling}stopMoving(){this._isIdling||(this._renderer.playAnimation("idle",!0),this._isIdling=!0)}targetStopped(){this.onTargetStopped.dispatch()}}class Cr extends Tr.u{constructor(q){super(),this.text=null,this.xCoord=0,this.yCoord=0,this.text=q.text,this.xCoord=q.x,this.yCoord=q.y}create(){super.create(),st.q.instance.prodigy.create.nameFont(this.gameObject,this.gameObject.position.x+this.xCoord,this.gameObject.position.y+this.yCoord,this.text)}}var Or=z(59838);class Ir extends Tr.u{constructor(q){super(),this.animations=null,this.timesPlayed=0,this.targetLoops=0,this.nextIdleAnim=0,this.renderer=null,this.animations=q}create(){super.create(),this.renderer=this.gameObject.findComponent(Or.F),this.renderer.setAnchor(.5,0),this.idle()}idle(){X.Aq$.isDefined(this.renderer.spine)?(this.chooseRandomAnimation(),this.renderer.spine.onComplete.has(this.chooseRandomAnimation,this)&&this.renderer.spine.onComplete.remove(this.chooseRandomAnimation,this),this.renderer.spine.onComplete.add(this.chooseRandomAnimation,this)):(this.renderer.onLoaded.has(this.idle,this)&&this.renderer.onLoaded.remove(this.idle,this),this.renderer.onLoaded.addOnce(this.idle,this))}chooseRandomAnimation(){this.timesPlayed===this.targetLoops?(this.targetLoops=this.animations[this.nextIdleAnim].min+Math.floor(Math.random()*(this.animations[this.nextIdleAnim].max+1-this.animations[this.nextIdleAnim].min)),this.renderer.getAnimationLength(this.animations[this.nextIdleAnim].name)>0&&this.renderer.playAnimation(this.animations[this.nextIdleAnim].name,!0),this.timesPlayed=1,this.nextIdleAnim++,this.nextIdleAnim=this.nextIdleAnim%this.animations.length):this.timesPlayed++}}var Dr=z(19273),Rr=z(24110);class Pr extends Tr.u{get system(){return this._system}constructor(q){super(),this._particleEffectData=null,this._particleEffectData=q}create(){super.create(),this._systemObject=new X._mx,this._systemObject.addComponent(X.dLy),this._systemObject.addComponent(X.K16),this._systemObject.addComponent(Rr.B);const q=st.q.instance.game.state.get(st.q.instance.game.state.current);q?q.backgroundGameObject?q.backgroundGameObject.addChild(this._systemObject):X.VyI.log("ParticleEmitter no background game object to parent to",X.$bb.Error):X.VyI.log("ParticleEmitter no screen to parent to",X.$bb.Error),this._system=gr.d.createParticleEmitter(this._systemObject,this._particleEffectData.ID)}update(){super.update(),this._systemObject.transform.setPosition(this.gameObject.x+this._particleEffectData.x,this.gameObject.y+this._particleEffectData.y)}fade(q,K){this._maxAlpha||(this._maxAlpha=new X.wPU,this._system.behaviours.push(this._maxAlpha)),st.q.instance.game.add.tween(this._maxAlpha,this).to({maximumAlpha:q},K,X.GS3.Cubic.Out).start()}setAlpha(q){this._maxAlpha.maximumAlpha=q}destroy(){this._system&&(this._system.destroy(),this._system=null),this._systemObject&&(this._systemObject.destroy(),this._systemObject=null),super.destroy()}}var Mr=z(70123),Nr=z(48951),xr=z(26691),Lr=z(98623);class kr extends Lr.H{constructor(q,K,z,Y,Q,Z){super(q,K,z,Y),this.callback=null,this.maxTime=6e4,this.timeDelta=1e4,this.radius=30,this.clickMessage="",this.hideElements=[],this.blocks=[],this.currentBlockIndex=-1,this.renderer=null,this.gameObject=null,this.time=0,this.endTransformMessage=null,this.numberOfSquares=[],this.activeTweens=[],this.name="timer",this.callback=Z,X.Aq$.isDefined(Q.maxTime)&&(this.maxTime=Q.maxTime),X.Aq$.isDefined(Q.timeDelta)&&(this.timeDelta=Q.timeDelta),X.Aq$.isDefined(Q.radius)&&(this.radius=Q.radius),X.Aq$.isDefined(Q.clickMessage)&&(this.clickMessage=Q.clickMessage),X.Aq$.isDefined(Q.hideElements)&&(this.hideElements=Q.hideElements),X.Aq$.isDefined(Q.storedTime)&&(this.storedTime=Q.storedTime),this.setup()}destroy(q={children:!0}){for(const K of this.activeTweens)K.isDestroyed||K.remove();this.activeTweens.length=0,super.destroy(q)}setup(){for(let K=0;K{X.Aq$.isDefined(this.time)||(this.time=0),this.time+=1/60,this.updateTimerVisuals(this.time,.5,10)}:()=>{}}onClick(){this.endTransformMessage=st.q.instance.prodigy.open.messageBoxPrefab({buttonState:xr.D.YesNoButtons,text:this.clickMessage,confirmCallback:this.callback,noCallback:()=>{this.endTransformMessage=null}})}setupTimerVisuals(q,K,z){const Y=q/K,Q=Math.floor(360/Y/3),Z=Math.floor(360/Y)*Math.PI/180,J=3*Math.PI/180,tt=X.Aq$.isDefined(this.storedTime)?Math.floor(this.storedTime/K-1):-1;this.numberOfSquares=[];const et=(q,K,z,Y)=>{q&&!q[wr.k.DESTROYED]?(q.anchor.set(.5,.5),q.scale.x=3*Y*.1,q.angle=180*z/Math.PI-90,K.add(q)):X.VyI.log("Timer cannot setup square because sprite was destroyed.",X.$bb.Warning)},nt=(q,K,z,Y,Q,X)=>{if(this.numberOfSquares[q]--,0===this.numberOfSquares[q]){et(X,K,Y,Q);const q=st.q.instance.prodigy.create.element(this,0,0),Z=this.game.add.renderTexture(74,74);Z.renderXY(K,37,37,!0),q.add(st.q.instance.prodigy.create.image(-37,-37,void 0,void 0,Z)),K.destroy(),this.blocks.push({block:q,direction:z})}};for(let X=0;Xtt){const z=st.q.instance.prodigy.create.sprite(rt,ot,it._.Ui_timer_json,ht,null,nt.bind(this,X,q,Y,K,ct));q&&!z[wr.k.DESTROYED]&&et(z,q,K,ct)}else q.destroy()}}}updateTimerVisuals(q,K,z){let Y=Math.floor(q/K-1);const Q=X.Aq$.isDefined(this.storedTime)?Math.floor(this.storedTime/K-1)+1:-1;if(Q>-1&&(Y-=Q),Y>this.currentBlockIndex&&Y{for(let q=0;q{this.containerLoaded=!0,this.onContainerLoaded.dispatch()})).catch(X.RQr.createHandler(`ItemContainer: failed to draw card for ${this.name}`))}drawCard(q){return(0,Q.sH)(this,void 0,void 0,(function*(){let K,z;if(K="gold"===this.itemType?{type:this.itemType}:"spell"===this.itemType?st.q.instance.prodigy.attacks.getAttack(this.ID):yield Ee.t.secureGetItem(this.itemType,this.ID),(null==K?void 0:K.data)&&"pet"===this.itemType){const q=this.itemObject.data.nickname;K.data.nickname=X.Aq$.isDefined(q)?q:K.data.name}switch(q){case Wr.s.Icon:z=this.createSmall(K,!0);break;case Wr.s.IconNoBackground:z=this.createSmall(K,!1);break;case Wr.s.Inventory:this.createInventory(K);break;case Wr.s.Store:this.createStore(K);break;case Wr.s.Card:this.createCard(K);break;case Wr.s.Info:z=this.createLarge(K);break;case Wr.s.StylistCard:this.createStylistCard(K)}X.Aq$.isDefined(z)&&(yield z)}))}createPanel(q,K,z,Y,Q){if(X.Aq$.isDefined(this.panel)&&this.panel.destroy(),X.Aq$.isDefined(Q))this.panel=st.q.instance.prodigy.create.panel(this,0,0,z,Y,Q);else if("gold"===this.itemType)this.panel=st.q.instance.prodigy.create.panel(this,0,0,z,Y,"item-currency");else if("spell"===this.itemType)this.panel=st.q.instance.prodigy.create.panel(this,0,0,z,Y,`item-${this.itemType}`);else if("item"===this.itemType&&!X.Aq$.isDefined(K)||"fossil"===this.itemType||"currency"===this.itemType||Vr.f.includes(this.itemType))this.panel=st.q.instance.prodigy.create.panel(this,0,0,z,Y,"item-common");else if(X.Aq$.isDefined(K)){let q=null;switch(K){case 0:q="common";break;case 1:q="uncommon";break;case 2:q="rare";break;case 3:q="epic";break;case 4:q="legend";break;default:q="common"}this.panel=st.q.instance.prodigy.create.panel(this,0,0,z,Y,`item-${q}`)}else this.panel=st.q.instance.prodigy.create.panel(this,0,0,z,Y,"empty");X.Aq$.isDefined(this.onClick)&&this.panel.setClickable(this.onDown.bind(this))}createSmall(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){this.panel=st.q.instance.prodigy.create.element(this,0,0);const z=X.Aq$.isDefined(q);let Y=null,Q=null;const Z={x:0,y:0};if(X.Aq$.isDefined(K)&&!K||(Q=st.q.instance.prodigy.create.sprite(0,0,it._.General_core_json,z?"white-icon":"empty-icon"),this.panel.add(Q),Z.x=10,Z.y=10),z?[Y]=yield st.q.instance.prodigy.icon.createFromDataAdvanced(q,this.panel,Z.x,Z.y):Y=st.q.instance.prodigy.create.sprite(Z.x,Z.y,it._.General_icons_json,`empty-${this.itemType}`),this.panel.add(Y),X.Aq$.isDefined(this.onClick)){let q=null;if(X.Aq$.isDefined(Q))q=Q;else if(Y instanceof wr.k)q=Y;else for(let K=0;K1?2:8,K.lines>2&&(K.destroy(),K=st.q.instance.prodigy.create.font(this,-5,0,q.data.name,{width:180,size:16,align:"center",lineHeight:18}),K.y=2),"gold"===this.itemType?(this.panel.add(st.q.instance.prodigy.icon.gold(40,50)),K.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("CURRENCY_GOLD_COINS"))):"spell"===this.itemType?yield st.q.instance.prodigy.icon.createFromDataAdvanced(q,this.panel,40,70):"item"===this.itemType&&X.Aq$.isDefined(q.type)&&"potion"===q.type?yield st.q.instance.prodigy.icon.createFromDataAdvanced({type:this.itemType,ID:this.ID},this.panel,40,60):"hairColor"===this.itemType||"eyeColor"===this.itemType||"skinColor"===this.itemType||"face"===this.itemType?this.panel.add(st.q.instance.prodigy.icon.createFromData(q,40,50,null,this.onTextureLoaded.bind(this))):"hair"===this.itemType?this.panel.add(st.q.instance.prodigy.icon.createFromData(q,80,100,null,null)):(yield st.q.instance.prodigy.icon.createFromDataAdvanced(q,this.panel,40,50),"pet"===this.itemType&&X.Aq$.isDefined(q.data.nickname)&&K.setText(q.data.nickname)),"gold"===this.itemType||"currency"===this.itemType){const q=this.N>=1?`${this.N}`:"1";st.q.instance.prodigy.create.font(this.panel,0,165,q,{width:160,align:"center"})}else if(this.N>1){"currency"!==this.itemType&&this.panel.add(st.q.instance.prodigy.create.sprite(10,150,it._.General_icons_json,"mail-empty"));const q=X.Aq$.isDefined(this.N)?String(this.N):"99";"currency"===this.itemType?st.q.instance.prodigy.create.font(this.panel,0,165,q,{width:160,align:"center"}):st.q.instance.prodigy.create.font(this.panel,10,155,q,{width:40,align:"center"})}}))}onTextureLoaded(q){if(q){const K=X.Aq$.getCenteredXY(q.width,q.height,0,0,this.panel.width,this.panel.height);q.x=K.x,q.y=K.y}}createLarge(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q;if(!X.Aq$.isDefined(q))return;this.createPanel(null,q.data.rarity,19,10);const Z=new jr.C(this.game,3,40,230,360,it._.Tiled_sprites_json,"overlay-small");Z.alpha=.1,this.panel.add(Z);const J=Ee.t.getItem(q.type,q.ID).data,tt="item"===q.type&&X.Aq$.isDefined(J.effect)&&X.Aq$.isDefined(J.effect.transform),et=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(st.q.instance.prodigy.create.font(this,0,0,(0,Ka.k)(Nn.J.getLocalizationNameKey(q)),{fontID:9,size:36,width:680,align:"center"}),Vr.f.includes(q.type)||"hat"===q.type||"weapon"===q.type||"outfit"===q.type||"boots"===q.type||tt){const K=this.createCharacterPreview(q,40,65,!1);tt&&this.transformEffect(J,K)}else if("follow"===q.type){const Z=null!==(z=null===(K=q.metadata)||void 0===K?void 0:K.x)&&void 0!==z?z:120,J=null!==(Q=null===(Y=q.metadata)||void 0===Y?void 0:Y.y)&&void 0!==Q?Q:160;this.followContainer=st.q.instance.prodigy.create.follow(this.panel,q.ID,1,null,Z,J),X.Aq$.isDefined(this.followContainer.reload)&&this.followContainer.reload()}else if("pet"===q.type){const K=qr.N.createSpineAssetSourceName(q,q.type,q.ID);st.q.instance.prodigy.load.assets([K],(()=>{st.q.instance.prodigy.create.spine(120,300,K,this.panel).setAnimationByName(0,"idle",!0)}))}else yield st.q.instance.prodigy.icon.createFromDataAdvanced(q,this.panel,80,80);st.q.instance.prodigy.create.font(this.panel,260,60,(0,Ka.k)(Nn.J.getLocalizationFlavorKey(q)),{size:20,fontID:8,width:480,lineHeight:30}),X.Aq$.isDefined(q.data.lockLevel)&&et.getLevel()0&&!K.hasMembership()){if(X.Aq$.isDefined(q.isGift)&&q.isGift)return;Nn.J.shouldSuppressAd(K)?(this.panel.add(st.q.instance.prodigy.create.sprite(110,150,it._.General_icons_json,"icon-medium-lock")),this.onClick=()=>{this.showTooltipAboveThisItem()}):this.panel.add(st.q.instance.prodigy.create.sprite(110,150,it._.General_icons_json,"mail-member"))}}createCharacterPreview(q,K,z,Y){if(!X.Aq$.isDefined(q))return null;Y&&st.q.instance.prodigy.create.panel(this,K,z,4,5,"shine");const Q=new Be.a(this.game),Z=new zr(this.game,this,K-88,z-75,Q,1,!1);return this.resetPlayer(Q,Z,q),Z.user}resetPlayer(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=Y.appearance.getHair();let X=Q.color,Z=Q.style,tt=Y.appearance.getEyeColor(),et=Y.appearance.getSkinColor(),it=Y.appearance.getFace(),nt=Y.equipment.getEquipment("outfit"),at=Y.equipment.getEquipment("hat"),rt=Y.equipment.getEquipment("weapon"),ot=Y.equipment.getEquipment("boots");"hair"===z.type?Z=z.ID:"eyeColor"===z.type?tt=z.ID:"skinColor"===z.type?et=z.ID:"hairColor"===z.type?X=z.ID:"face"===z.type?it=z.ID:"outfit"===z.type?nt=z.ID:"hat"===z.type?at=z.ID:"weapon"===z.type?(rt=z.ID,K.user.forceWeaponVisual=!0):"boots"===z.type&&(ot=z.ID),q.appearance.setHair(Z,X),q.appearance.setEyeColor(tt),q.appearance.setSkinColor(et),q.appearance.setFace(it),q.equipment.setOutfit(nt,!1),q.equipment.setHat(at,!1),q.equipment.setWeapon(rt,!1),q.equipment.setBoots(ot,!1),q.data.chargedLevelData=J().clone(Y.data).chargedLevelData,q.data.level=J().clone(Y.data).level,q.appearanceChanged=!0,K.user.reload()}createStore(q){if(!X.Aq$.isDefined(q))return;this.createMedium(q);const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=K.backpack.hasItem(this.itemType,this.ID);this.owned=z>0,"dorm"===this.itemType?this.owned=K.house.getOwned(this.ID)>=9:"pet"===this.itemType?this.owned=K.kennel.hasPet(this.ID):"dormbg"===this.itemType?this.owned=K.house.getCurrentHouseTag()===q.data.tag:"hair"===this.itemType?this.owned=K.appearance.getHair().style===this.ID:"eyeColor"===this.itemType?this.owned=K.appearance.getEyeColor()===this.ID:"skinColor"===this.itemType?this.owned=K.appearance.getSkinColor()===this.ID:"hairColor"===this.itemType?this.owned=K.appearance.getHair().color===this.ID:"face"===this.itemType&&(this.owned=K.appearance.getFace()===this.ID),this.cost=this.itemObject.cost;let Y="[mail-gold]";if("currency"===this.cost.type&&1===this.cost.ID||(Y=`[${Ee.t.getItem(this.cost.type,this.cost.ID).data.icon}]`),"item"===this.itemType&&z>=99||"item"!==this.itemType&&this.owned){let q;q="dorm"===this.itemType||z>=99?st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("ITEM_MAX"):"hair"===this.itemType||"eyeColor"===this.itemType||"skinColor"===this.itemType||"hairColor"===this.itemType||"face"===this.itemType?st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("ITEM_CURRENT"):st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("ITEM_OWNED"),st.q.instance.prodigy.create.font(this.panel,10,166,q,{size:20})}else this.cost.N>0&&st.q.instance.prodigy.create.font(this.panel,6,166,Y+Nn.J.numberToString(this.cost.N),{size:20});q.data.member>0&&(Nn.J.shouldSuppressAd(K)?(this.panel.add(st.q.instance.prodigy.create.sprite(120,160,it._.General_icons_json,"icon-medium-lock")),this.onClick=()=>{this.showTooltipAboveThisItem()}):this.panel.add(st.q.instance.prodigy.create.sprite(120,160,it._.General_icons_json,"mail-member")))}createStylistCard(q){if(!X.Aq$.isDefined(q))return;this.createCharacterPreview(q,0,0,!0);const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q.data.member>0&&!K.hasMembership()&&(X.Aq$.isDefined(q.isGift)&&q.isGift||(Nn.J.shouldSuppressAd(K)?(this.panel.add(st.q.instance.prodigy.create.sprite(110,150,it._.General_icons_json,"icon-medium-lock")),this.onClick=()=>{this.showTooltipAboveThisItem()}):this.panel.add(st.q.instance.prodigy.create.sprite(110,150,it._.General_icons_json,"mail-member"))))}onDown(){X.Aq$.isDefined(this.onClick)&&this.onClick({type:this.itemType,ID:this.ID},this.owned,this.price)}showTooltipAboveThisItem(){st.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this.worldPosition.x+.5*this.width,yPosition:this.worldPosition.y+7,arrowXRelPos:.5,arrowDirection:Kr.i.DOWN})}update(){if(super.update(),X.Aq$.isDefined(this.followContainer)){if(X.Aq$.isDefined(this.followContainer.player)&&(this.followContainer.player=null),X.Aq$.isDefined(this.followContainer.findComponent)&&!X.Aq$.isDefined(this.renderComponent)){const q=this.followContainer.findComponent(Ar);X.Aq$.isDefined(q)&&this.followContainer.removeComponent(q),X.Aq$.isDefined(this.followContainer.findComponent(Sr.A))&&(this.renderComponent=this.followContainer.findComponent(Sr.A))}if(X.Aq$.isDefined(this.itemContainerWalking)||(this.itemContainerWalking=!0),!X.Aq$.isDefined(this.itemContainerAnimDuration)||this.itemContainerAnimDuration<=0){this.itemContainerAnimDuration=0;let q=!1;this.itemContainerWalking?X.Aq$.isDefined(this.followContainer.tweens)&&X.Aq$.isDefined(this.followContainer.standTween)?(this.followContainer.stand(),q=!0):X.Aq$.isDefined(this.renderComponent)&&(this.renderComponent.playAnimation("idle",!0),q=!0):X.Aq$.isDefined(this.followContainer.tweens)&&X.Aq$.isDefined(this.followContainer.standTween)?(this.followContainer.walk(),q=!0):X.Aq$.isDefined(this.renderComponent)&&(this.renderComponent.playAnimation("walk",!0),q=!0),q&&(this.itemContainerAnimDuration=3e3*Math.random()+1e3,this.itemContainerWalking=!this.itemContainerWalking)}X.Aq$.isDefined(this.followTimer)||(this.followTimer=new X.gXL(this.game)),this.itemContainerAnimDuration-=this.game.app.ticker.deltaMS}}destroy(){var q;null===(q=this._transformEventController)||void 0===q||q.end(),this.onContainerLoaded.dispose(),super.destroy()}}var Qr=z(73877),Xr=z(37946);class Zr extends Lr.H{constructor(q,K,z,Y,Q){if(super(q,K,z,Y),this.eventFormat=!1,!Q){st.q.instance.prodigy.create.panel(this,0,0,6,2,"white").alpha=.8}this.text=st.q.instance.prodigy.create.font(this,0,10,"00:00",{width:240,size:40,align:"center"}),this.msg=st.q.instance.prodigy.create.font(this,0,55,"",{width:240,size:16,align:"center"})}processTime(q){if(q<=0)return"00:00";const K=Math.floor(q/36e5),z=Math.floor((q-36e5*K)/6e4),Y=Math.floor((q-36e5*K-6e4*z)/1e3);let Q;0===K?Q="00":K<10&&(Q=`0${K}`);let Z=`${z}`;0===z?Z="00":z<10&&(Z=`0${z}`);let J=`${Y}`;return 0===Y?J="00":Y<10&&(J=`0${Y}`),"00"===Q?`${Z}:${J}`:K<24?`${Q}:${Z}:${J}`:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TIMER_FORMAT_DAYS",Math.floor(K/24))}processTimeFormatted(q){if(q<=0)return"0";const K=Math.floor(q/864e5);let z=q-864e5*K;const Y=Math.floor(z/36e5);z-=36e5*Y;const Q=Math.floor(z/6e4);let Z=Y.toString();Y<10&&(Z=`0${Y}`);let J=Q.toString();return Q<10&&(J=`0${Q}`),st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TIMER_FORMAT",K,Z,J)}setTime(q){this.target=q,this.text.setText(this.eventFormat?this.processTimeFormatted(q):this.processTime(q))}setMsg(q){this.msg.setText(q)}start(q,K,z=!1){this.eventFormat=z,this.setTime(q),this.callback=K,this.targetTime=(new Date).getTime()+this.target,this.clear(),this.timer=window.setInterval(this.process.bind(this),100)}pause(){this.paused=this.targetTime-(new Date).getTime()}resume(){this.targetTime=(new Date).getTime()+this.paused,this.paused=null}blink(){this.game.add.tween(this.text,this).to({y:0},500,X.GS3.Quadratic.Out).to({y:10},500,X.GS3.Quadratic.In).start()}addTime(q){this.targetTime+=q,this.process(),this.blink()}clear(){X.Aq$.isDefined(this.timer)&&(window.clearInterval(this.timer),this.timer=null)}process(){if(X.Aq$.isDefined(this.paused))return;const q=this.targetTime-(new Date).getTime();this.text.setText(this.eventFormat?this.processTimeFormatted(q):this.processTime(q)),q<=0&&(this.clear(),X.Aq$.isDefined(this.callback)&&this.callback())}isInProgress(){return X.Aq$.isDefined(this.timer)}destroy(){this.clear(),super.destroy()}}var Jr=z(60250),to=z(96535);class eo extends Da.H{constructor(q,K,z,Y,Q){super(q,K,z,Y,Q),this.foodMode="soup",this.previousHP=this.source.getCurrentHearts()}setup(q,K){if(!X.Aq$.isDefined(this.game)||!K||!X.Aq$.isDefined(this.assets))return;this.cacheBoss(),this.potParts={pot:st.q.instance.prodigy.create.sprite(-100,0,it._.Boss_bonfire_json,"pot"),lid:st.q.instance.prodigy.create.sprite(140,-140,it._.Boss_bonfire_json,"pot-lid")},this.potParts.lid.anchor.set(1,1),this.potParts.pot.anchor.set(0,1),this.add(this.potParts.pot),this.add(this.potParts.lid),this.burgerParts={dish:st.q.instance.prodigy.create.sprite(300,-50,it._.Boss_bonfire_json,"dish"),bottom:st.q.instance.prodigy.create.sprite(320,-10,it._.Boss_bonfire_json,"burger-bottom"),top:st.q.instance.prodigy.create.sprite(510,-70,it._.Boss_bonfire_json,"burger-lid")},this.burgerParts.top.anchor.set(1,1),this.burgerParts.bottom.anchor.set(0,1),this.add(this.burgerParts.dish),this.burgerParts.dish.visible=!1,this.add(this.burgerParts.bottom),this.burgerParts.bottom.visible=!1,this.add(this.burgerParts.top),this.burgerParts.top.visible=!1,this.cakeParts={dish:st.q.instance.prodigy.create.sprite(300,-50,it._.Boss_bonfire_json,"dish"),lava:st.q.instance.prodigy.create.sprite(310,0,it._.Boss_bonfire_json,"lava"),face:st.q.instance.prodigy.create.sprite(350,10,it._.Boss_bonfire_json,"expression-1"),strawberry:st.q.instance.prodigy.create.sprite(400,-200,it._.Boss_bonfire_json,"berry")},this.cakeParts.face.animations.add("attack",["expression-1","expression-2","expression-3","expression-3","expression-3","expression-2","expression-1"],10,!1,!1),this.cakeParts.lava.anchor.set(0,1),this.cakeParts.face.anchor.set(0,1),this.add(this.cakeParts.dish),this.cakeParts.dish.visible=!1,this.add(this.cakeParts.lava),this.cakeParts.lava.visible=!1,this.add(this.cakeParts.face),this.cakeParts.face.visible=!1,this.add(this.cakeParts.strawberry),this.cakeParts.strawberry.visible=!1;const z=new ia.s(this.game);z.init({npc_name:"",npc_type:sa.ac.Boss,x_coord:-100,y_coord:0,npc_animation_id:"idle"}),this.npc=new to.U(this.game,this,-100,0,it._.Npc_sprite_cebollini_json,null,z),this.npc.flip(),this.npc.bossStart(this.game),this.complete=!0,this.loading=!1}setDoneCallback(q){this.doneAnimationCallback=q}attack(){let q,K;na.R.prototype.attack.call(this);const z=st.q.instance.prodigy.animation;"soup"===this.foodMode?(q=st.q.instance.prodigy.event.create(),q.animation(z.rotate.bind(z,this.potParts.lid,35,1e3,0,null,!0)),q.animation(z.translate.bind(z,this.potParts.lid,"+=0","-=20",1e3,0,null,!0),!0),q.animation(z.rotate.bind(z,this.potParts.lid,0,1e3,0,null,!0)),q.animation(z.translate.bind(z,this.potParts.lid,"+=0","+=20",1e3,0,null,!0)),K=st.q.instance.prodigy.event.create(),K.animation(z.rotate.bind(z,this.potParts.pot,-10,1e3,0,null,!0),!0),K.animation(z.rotate.bind(z,this.potParts.pot,0,1e3,0,null,!0)),q.start(),K.start()):"burger"===this.foodMode?(q=st.q.instance.prodigy.event.create(),q.animation(z.rotate.bind(z,this.burgerParts.top,25,700,0,null,!0)),q.animation(z.translate.bind(z,this.burgerParts.top,"+=0","-=20",700,0,null,!0),!0),q.animation(z.rotate.bind(z,this.burgerParts.top,0,700,0,null,!0)),q.animation(z.translate.bind(z,this.burgerParts.top,"+=0","+=20",700,0,null,!0)),K=st.q.instance.prodigy.event.create(),K.animation(z.rotate.bind(z,this.burgerParts.bottom,-10,700,0,null,!0),!0),K.animation(z.rotate.bind(z,this.burgerParts.bottom,0,700,0,null,!0)),q.start(),K.start()):"cake"===this.foodMode&&this.cakeParts.face.animations.play("attack",void 0,!1)}startEntree(){this.foodMode="burger",this.npc.entreeStart();const q=new Ni.rD(this.game);q.addEvents([{callback:()=>{this.entreeEvent(q)}},{dialogueData:q.dataProvider.getLegacy("cebollini",11),blockInput:!0,hideNext:!0}]),q.start()}entreeEvent(q){const K=st.q.instance.prodigy.event.create();K.enableInput(!1);const z=Object.keys(this.potParts);for(let Q=0;Q{this.dessertEvent(q)}},{dialogueData:q.dataProvider.getLegacy("cebollini",12),blockInput:!0,hideNext:!0}]),q.start()}dessertEvent(q){const K=st.q.instance.prodigy.event.create();K.enableInput(!1);const z=Object.keys(this.burgerParts);for(let Q=0;Q0,z=X.Aq$.isDefined(this.data.bot)&&this.data.bot.length>0;if(K&&(q+=this.data.top,z&&(q+="-")),z&&(q+=this.data.bot),0===q.length&&X.Aq$.isDefined(this.data.icon)){const K=X.Aq$.isDefined(this.data.atlas)?this.data.atlas:Ee.t.getIconAtlas(this.data.icon),z=Ee.t.getIconFrame(this.data.icon);X.Aq$.isDefined(K)&&(q=X.Aq$.isDefined(z)?`${K}-${z}`:K)}return X.Aq$.isDefined(this.name)&&""!==this.name||(this.name=q),q}}class po extends wr.k{constructor(q,K,z,Y,Q,X=null,Z,J){super(q,K,z,Y,Q[0],X),this.frames=[],this.frameIndex=0,this.frames=Q,this.scaleValues=Z,this.positionValues=J,this.updateFrameProperties()}get frameNumber(){return this.frameIndex}set frameNumber(q){X.Aq$.isDefined(this.frames)&&(this.frameIndex=Math.floor(q),this.frameName=this.frames[this.frameIndex],this.updateFrameProperties())}updateFrameProperties(){X.Aq$.isDefined(this.scaleValues)&&(this.scale.x=this.scaleValues[this.frameIndex],this.scale.y=this.scaleValues[this.frameIndex]),X.Aq$.isDefined(this.positionValues)&&(this.x=this.positionValues[this.frameIndex].x,this.y=this.positionValues[this.frameIndex].y)}}var vo=z(85313),go=z(26657);class mo extends Lr.H{setDefaultYPos(q){this.defaultYPos=q}constructor(q,K,z,Y,Q,Z,J,tt,et,it=!1,nt,at){super(q,K,z,Y,Z),this.sprite=null,this._active=!0,this.callback=null,this.animatedSprite=null,this.animatedSpritePos=null,this.animTween=null,this.sfxID=null,this.sfxClip=null,this.spriteOverlay=null,this.spriteOverlayX=0,this.spriteOverlayY=0,this.defaultYPos=0,this.callback=J,this.sprite=st.q.instance.prodigy.create.sprite(0,0,Q,Z,null,this.onSpriteLoaded.bind(this),nt,at),this.add(this.sprite),X.Aq$.isDefined(tt)&&X.Aq$.isDefined(et)&&(this.animatedSprite=st.q.instance.prodigy.create.sprite(et.x,et.y,Q,tt[0]),this.animatedSpritePos=et,this.add(this.animatedSprite),this.animTween=new go.s(this.animatedSprite),this.animTween.set("frameName",tt,200,9999),this.animTween.start()),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add(this.onDown,this),it||(this.sprite.events.onInputUp.add(this.onUp,this),this.sprite.events.onInputOver.add(this.onOver,this)),this.sprite.events.onInputOut.add(this.onOut,this),this.sfxID=18,this.sfxClip="pop",this.onDestroy.add(this.handleDestroy.bind(this))}update(){super.update();const q=Date.now();X.Aq$.isDefined(this.animTween)&&this.animTween.update(q)}setActive(){this._active=!0,this.sprite.tint=16777215}setInactive(q=5789784){this._active=!1,this.sprite.tint=q,this.sprite.y=this.defaultYPos,X.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y),X.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY)}select(){this.sprite.tint=7447253}deselect(){this._active=!0,this.sprite.tint=16777215,this.sprite.y=this.defaultYPos,X.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY),X.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y)}isActive(){return this._active}addOverlay(q,K,z,Y){return X.Aq$.isDefined(this.spriteOverlay)&&this.spriteOverlay.destroy(),this.spriteOverlayX=q,this.spriteOverlayY=K,this.spriteOverlay=st.q.instance.prodigy.create.sprite(q,K,z,Y),this.add(this.spriteOverlay),this.spriteOverlay}onDown(){this.game?this._active?(st.q.instance.prodigy.audio.playSFX(this.sfxID,this.sfxClip),this.sprite.y=this.defaultYPos,X.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y),X.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY),X.Aq$.isDefined(this.callback)&&this.callback()):st.q.instance.prodigy.audio.playSFX(49,this.sfxClip):X.VyI.log("onDown called on destroyed Button",X.$bb.Warning)}onUp(){this.game?this._active&&this.sprite.input.pointerOver()&&(this.sprite.y=this.defaultYPos-3,X.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y-3),X.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY-3)):X.VyI.log("onUp called on destroyed Button",X.$bb.Warning)}onOver(){this.game?this._active&&(this.sprite.y=this.defaultYPos-3,X.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y-3),X.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY-3)):X.VyI.log("onOver called on destroyed Button",X.$bb.Warning)}onOut(){this.game?this._active&&(this.sprite.y=this.defaultYPos,X.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y),X.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY)):X.VyI.log("onOut called on destroyed Button",X.$bb.Warning)}handleDestroy(){this.visible=!1,this.sprite&&this.sprite.destroy(),this.animTween=null,this.callback=null}onSpriteLoaded(){X.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY,this.spriteOverlay.x=this.spriteOverlayX)}}class yo extends Lr.H{constructor(q,K,z,Y,Q,Z,J,tt,et,nt,at,rt,ot){super(q,K,z,Y),this.back=null,this.bar=null,this.icon=null,this.label=null,this.direction=0,this.fillFunction=null,this.onFill=null,this.current=0,this.target=0,this.delay=0,this.currentLevel=0,this.speed=1,this.callback=null,this.fillFunction=tt,this.direction=J,this.onFill=ot,this.back=this.add(st.q.instance.prodigy.create.sprite(0,0,it._.General_core_json,"overlay-small")),this.bar=this.add(st.q.instance.prodigy.create.sprite(1,Z-1,it._.General_core_json,"overlay-light")),this.bar.anchor.set(0,1),this.back.width=Q,this.back.height=Z,this.bar.width=Q-2,this.bar.height=Z-2,this.bar.tint=X.Aq$.isDefined(et)?et:16777215,this.bar.alpha=at,this.icon=st.q.instance.prodigy.create.element(this,-Math.floor((80-Q)/2),-60),X.Aq$.isDefined(nt)&&("string"==typeof nt?this.icon.add(st.q.instance.prodigy.create.sprite(0,0,it._.General_icons_json,nt)):this.icon.add(st.q.instance.prodigy.icon.createFromData(nt,0,0))),this.label=st.q.instance.prodigy.create.font(this.icon,0,20,"",{size:30,width:80,align:"center"}),this.current=0,this.target=0,this.delay=0,this.currentLevel=0,rt&&(this.back.visible=!1),this.setBar()}update(){super.update(),this.current!==this.target?(this.delay--,this.delay<=0&&(this.delay=this.speed,this.currentthis.target&&this.current--,this.setBar())):X.Aq$.isDefined(this.callback)&&(this.callback(),this.callback=null)}setValue(q){this.current=this.target=q,this.setBar()}addValue(q,K,z){return this.target+=q,this.target<0&&(this.target=0),X.Aq$.isDefined(K)?this.speed=K:this.speed=1,this.callback=z,this.target}getValue(){return this.current}getLevel(){return this.currentLevel}setBar(){let q={target:0,text:null,color:null},K={target:0,text:null,color:null},z=1,Y=0,Q=!0;for(;Q;){if(q=this.fillFunction(z),-1===q.target){this.current=this.target,Y=1,Q=!1;break}if(this.currentthis.currentLevel?(X.Aq$.isDefined(this.onFill)&&this.onFill(z),this.game.add.tween(this.icon,this).to({y:-70},250,X.GS3.Quadratic.Out).to({y:-60},250,X.GS3.Quadratic.In).start()):z=this.pages&&(this.page=this.pages-1),0===this.page?this.up.setInactive():this.up.setActive(),this.page===this.pages-1?this.down.setInactive():this.down.setActive(),this.scroll.y=this.diff*this.page+50,this.scroll.y<50&&(this.scroll.y=50),this.callback(this.page)}}class Ao extends Lr.H{constructor(q,K,z,Y,Q,Z,J){super(q,K,z,Y),this.page=0,this.len=0,this.isVertical=!1,this.bar=null,this.lower=null,this.higher=null,this.slide=null,this.pages=0,this.paging=0,this.inc=0,this.items=0,this.itemsPerPage=0,this.callback=null,this.len=Q-100,this.isVertical=Z,J&&this.game.broadcaster.addAppListener(gi.Bk.OnMouseWheel,this.onScroll.bind(this),this,"Input",!1),this.isVertical?this.bar=this.add(new jr.C(this.game,50,0,Q,50,it._.Tiled_sprites_json,"slider")):this.bar=this.add(new jr.C(this.game,0,0,Q,50,it._.Tiled_sprites_json,"slider")),this.bar.inputEnabled=!0,this.bar.events.onInputDown.add(this.barClick,this),this.isVertical?(this.lower=st.q.instance.prodigy.create.button(this,50,0,it._.General_core_json,"arrow-btn-back",this.btnClick.bind(this,-1)),this.higher=st.q.instance.prodigy.create.button(this,50,this.len+50,it._.General_core_json,"arrow-btn-next",this.btnClick.bind(this,1))):(this.lower=st.q.instance.prodigy.create.button(this,0,0,it._.General_core_json,"arrow-btn-back",this.btnClick.bind(this,-1)),this.higher=st.q.instance.prodigy.create.button(this,this.len+50,0,it._.General_core_json,"arrow-btn-next",this.btnClick.bind(this,1))),this.lower.setInactive(),this.higher.setInactive(),this.isVertical&&(this.bar.angle=90,this.lower.angle=90,this.higher.angle=90);const tt=this.isVertical?new X.M_G(0,50,50,this.len):new X.M_G(50,0,this.len,50);this.slide=this.add(st.q.instance.prodigy.create.sprite(tt.x,tt.y,it._.General_core_json,"btn-white")),this.slide.anchor.set(this.isVertical?0:.5,this.isVertical?.5:0),this.slide.visible=!1,this.slide.inputEnabled=!0,this.slide.input.enableDrag(),this.slide.input.boundsRect=tt,this.slide.events.onDragStop.add(this.onDragStop,this)}getCurrentIndex(){return this.page*this.paging}destroy(q={children:!0}){X.Aq$.isDefined(this.game)&&this.game.broadcaster.removeAppListener(gi.Bk.OnMouseWheel,this,"Input"),super.destroy(q)}reset(q,K,z,Y){this.items=q,this.callback=Y,X.Aq$.isDefined(K)?this.itemsPerPage=K:this.itemsPerPage=1,this.paging=z<0?this.itemsPerPage:1,z>=0?(this.page=Math.max(0,z-K),this.pages=Math.max(1,this.items-this.itemsPerPage+1)):(this.page=0,this.pages=Math.max(1,Math.ceil(this.items/this.itemsPerPage))),this.inc=this.pages>1?(this.len-50)/(this.pages-1):this.len-50,this.slide.visible=this.pages>1,this.btnClick(0),this.callback(this.page*this.paging)}process(){this.callback(this.page*this.paging)}onDragStop(){let q=0;q=this.isVertical?Math.round((this.slide.y-50-25)/this.inc):Math.round((this.slide.x-50-25)/this.inc),this.btnClick(q-this.page)}barClick(q,K){let z=0;z=this.isVertical?Math.round((K.y-this.bar.world.y-50-25)/this.inc):Math.round((K.x-this.bar.world.x-50-25)/this.inc),this.btnClick(z-this.page)}btnClick(q){const K=this.page;this.page+=q,this.page>this.pages-1&&(this.page=this.pages-1),this.page<0&&(this.page=0),0===this.page?this.lower.setInactive():this.lower.setActive(),this.page===this.pages-1?this.higher.setInactive():this.higher.setActive(),this.isVertical?this.slide.y=75+Math.round(this.inc*this.page):this.slide.x=75+Math.round(this.inc*this.page),K!==this.page&&this.callback(this.page*this.paging)}onScroll(q){X.Aq$.isDefined(this.game)&&this.visible&&this.btnClick(-Math.floor(this.game.input.mouse.wheelDelta))}}class Co extends Lr.H{constructor(q,K,z,Y,Q,Z){super(q,K,z,Y),this.callback=null,this.contents=null,this.topIcon=null,this.isActive=!0,this.oldY=null,this.tween=null,this.callback=Z,this.contents=st.q.instance.prodigy.create.element(this,0,0);let J=!1;for(let tt=0;ttht.setNewIndicatorVisibility(!0))),ct.encounters.onPetEncountered(ot.ID),ht}character(q,K,z,Y,Q,X=!1,Z=null){const J=Be.a.fromCharacter(this.game,K);return new Xr.v(this.game,q,J,z,Y,Q,X,Z)}player(q,K,z,Y,Q,X=!1,Z=null,J=!1,tt=!0){return new Xr.v(this.game,q,K,z,Y,Q,X,Z,J,tt)}timer(q,K,z,Y=!1){return new Zr(this.game,q,K,z,Y)}houseItem(q,K,z,Y,Q,X){return new Dr._(this.game,q,[new Br.G(this.game,X,K,Q)],z,Y)}snow(q,K=!1){if(!K&&!Nn.J.isAvgFrameRateAboveThreshold(te.s.get("GameConstants.Build.SKIN_FOREGROUND_FPS_THRESHOLD_LIMIT")))return;const z={type:"LINE_ZONE",x1:-200,y1:0,x2:this.game.width,y2:0},Y=[new X.d53];gr.d.createParticleEmitter(q,1,new X.I9Y(0,0),z,Y),gr.d.createParticleEmitter(q,2,new X.I9Y(0,0),z,Y)}animatedSpineNPC(q,K,z,Y,Q,Z,J,tt,et){const it=Mr.j.createRenderer(K,Y),nt=st.q.instance.prodigy.gameContainer.get("20f-5f67"),at=new Dr._(this.game,q,[it,new Ir(J),new Cr(z)],Q,Z);if(X.Aq$.isDefined(et)){const q=()=>{it.setInputEnabled(!0),it.getEvents().onInputDown.add((()=>{et(),nt.gameWorld.sendNpcClickedEvent({npc_name:null==z?void 0:z.text,npc_type:null==z?void 0:z.npcType})}),it)};X.Aq$.isDefined(it.spine)?q():it.onLoaded.addOnce(q)}return nt.gameWorld.sendNpcDiscoveredEvent({npc_name:null==z?void 0:z.text,npc_type:null==z?void 0:z.npcType,x_coord:Q,y_coord:Z,npc_animation_id:"idle"}),at}spineNPC(q,K,z,Y,Q,Z,J,tt,et=!1,it){const nt=st.q.instance.prodigy.gameContainer.get("20f-5f67"),at=new X._mx;at.addComponent(X.K16).group.position.set(Y,Q),q.addChild(at.legacyTransform.group);const rt=new X._mx(at);rt.addComponent(X.K16),rt.legacyTransform.group.scale.x=et?-1:1,Z&&(rt.name=Z.text);const ot=rt.addComponent(ea.v),ht=rt.addComponent(Ur.j);return ot.OnLoaded.addOnce((()=>{var q,Y,Q;ht.playAnimation(z,!0);const et=rt.legacyTransform.group.getLocalBounds();if(Z){let{x:K,y:z}=Z.parent?at.legacyTransform.group.getGlobalPosition():{x:0,y:0};K+=null!==(q=Z.x)&&void 0!==q?q:0,z+=et.y+(null!==(Y=Z.y)&&void 0!==Y?Y:-25),this.nameFont(null!==(Q=Z.parent)&&void 0!==Q?Q:at.legacyTransform.group,K,z,Z.text)}const st=new X._mx(rt);st.addComponent(X.K16),st.legacyTransform.group.position.set(.5*et.width+et.x,.5*et.height+et.y);const ot=st.addComponent(qn.p);ot.Width=et.width,ot.Height=et.height,ot.onClicked.add((()=>{var q;J&&nt.gameWorld.sendNpcClickedEvent({npc_name:null!==(q=null==Z?void 0:Z.text)&&void 0!==q?q:"unknown name",npc_type:J.npcType,npc_id:`${K}`},it),null==tt||tt()}))})),ot.setAsset("number"==typeof K?`spine-${K}`:K),J&&nt.gameWorld.sendNpcDiscoveredEvent({npc_name:null==Z?void 0:Z.text,npc_type:J.npcType,x_coord:J.npcXCoord,y_coord:J.npcYCoord,npc_id:`${K}`,npc_animation_id:z}),rt}timerControl(q,K,z,Y,Q){return new kr(this.game,q,K,z,Y,Q)}nicknamerPedestal(q,K,z,Y,Q,Z){if(!st.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirementsDeprecated(48))return;const J=st.q.instance.prodigy.create.element(Y,Q,Z),tt=st.q.instance.prodigy.gameContainer,et=tt.get("20f-5f67"),nt=tt.get("3b0-2652"),at=nt.isAvailable(K)?nt.getNicknameData(K):[],rt=J.add(st.q.instance.prodigy.create.sprite(0,-100,it._.General_core_2_json,"namer"));0===at.length?J.alpha=.5:(rt.events.onInputDown.add(st.q.instance.prodigy.open.nicknamer.bind(st.q.instance.prodigy.open,at,z,K)),rt.inputEnabled=!0);const ot=J.add(st.q.instance.prodigy.create.sprite(20,-90,it._.General_core_2_json,"feather"));this.game.add.tween(ot,this).to({x:40,y:-98},1500,X.GS3.Linear.None,!0,0,te.s.MAX_SAFE_INTEGER,!0),et.gameWorld.sendWorldObjectDiscoveredEvent({object_type:sa.u_.Nicknamer,x_coord:Q,y_coord:Z})}notificationBadge(q,K){const z=new Nr.c(this.game).createUIElements(Ee.t.getItem("ui",97).data.elements,q);return z.find((q=>"badgeNumber"===q.name)).setText(K.toString()),z[0]}}var Io,Do=z(5491),Ro=z(93718),Po=z(34603),Mo=z(79009);class No extends X.uAl{constructor(){super(...arguments),this._walkTween=null}get OnAnimationComplete(){return this._walkTween.onTweenComplete}create(){super.create(),this.createWalkTween()}createWalkTween(){this._walkTween=st.q.instance.game.add.tween(this.GameObject.legacyTransform.group,this,!1).to({y:-20},150,X.GS3.Quadratic.Out).to({y:0},150,X.GS3.Quadratic.In)}playAnimation(q,K){"walk"===q?(this._walkTween.killed&&this.createWalkTween(),this._walkTween.loop(K).start()):this.stopAnimation()}stopAnimation(){this._walkTween.killed||this._walkTween.loop(!1)}destroy(){this._walkTween&&(this._walkTween.remove(),this._walkTween=null),super.destroy()}}!function(q){q.default="default",q.reduced="reduced",q.vertical="vertical",q.horizontal="horizontal"}(Io||(Io={}));class xo{constructor(){}static Instantiate(q,K,z){const Y=new X._mx(K);Y.addComponent(X.K16),Y.legacyTransform.x=z.offset.x,Y.legacyTransform.y=z.offset.y,Y.name="sprite appearance";const Q=new X._mx(Y);Q.addComponent(X.K16);const Z=Q.addComponent(Po._);Z.setAsset(z.assetKey),Y.legacyTransform.x-=.5*Z.getWidth(),Y.legacyTransform.y-=Z.getHeight();const J=Y.addComponent(X.bE_);return X.Aq$.isDefined(z.hitbox.width)||(z.hitbox.width=Z.getWidth()),X.Aq$.isDefined(z.hitbox.height)||(z.hitbox.height=Z.getHeight()),J.Container.bind("Hitbox").toConstantValue(z.hitbox),Y}}var Lo=z(51315);var ko=z(9831);let Bo=class{constructor(q,K){this._game=q,this._assetLoader=K}create(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q=this.getData(K,z,Y);return yield this._assetLoader.loadAssets([Q.assetKey]),this.selectAppearance(q,Q)}))}selectAppearance(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){switch(K.animationType){case ko.V.atlas:return class{constructor(){}static Instantiate(q,K,Y){const Q=new X._mx(K);Q.addComponent(X.K16),Q.legacyTransform.x=Y.offset.x,Q.legacyTransform.y=Y.offset.y;const Z=new X._mx(Q);Z.addComponent(X.K16),Z.addComponent(Po._).setAsset(it._.General_pets_json,`${Y.buddyTag}/walk/body-0`);const J=Z.addComponent(Ro.i);J.AtlasKey=Y.buddyTag,J.AnimationTargetKey="body",J.setCurrentToBindPose();const tt=new X._mx(Q);tt.addComponent(X.K16),tt.legacyTransform.x=2,tt.legacyTransform.y=18,tt.addComponent(Po._).setAsset(it._.General_pets_json,`${Y.buddyTag}/walk/legs-0`);const et=tt.addComponent(Ro.i);et.AtlasKey=Y.buddyTag,et.AnimationTargetKey="legs",et.setCurrentToBindPose(),Q.legacyTransform.x-=.5*Q.legacyTransform.width,Q.legacyTransform.y-=Q.legacyTransform.height;const st=Q.addComponent(X.bE_);X.Aq$.isDefined(Y.hitbox.width)||(Y.hitbox.width=Q.legacyTransform.width),X.Aq$.isDefined(Y.hitbox.height)||(Y.hitbox.height=Q.legacyTransform.height),st.Container.bind("Hitbox").toConstantValue(Y.hitbox),st.Container.bind("AnimationData").toConstantValue(new Mo.F(z(73792)));const nt=Q.addComponent(X.Fid);return nt.Identifier="Animators",nt.Components=[J,et],Q}}.Instantiate(this._game,q,K);case ko.V.spine:return class{constructor(){}static Instantiate(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=new X._mx(K);q.name="spine appearance",q.addComponent(X.K16),q.legacyTransform.x=z.offset.x,q.legacyTransform.y=z.offset.y;const Y=q.addComponent(ea.v),Q=new Promise((q=>{Y.OnLoaded.addOnce(q)}));Y.setAsset(z.assetKey);const Z=q.addComponent(X.bE_),J=q.addComponent(X.Fid);return J.Identifier="Animators",J.Components=[q.addComponent(Ur.j)],yield Q,X.Aq$.isDefined(z.hitbox.width)||(z.hitbox.width=Y.getSpine().width),X.Aq$.isDefined(z.hitbox.height)||(z.hitbox.height=Y.getSpine().height),Z.Container.bind("Hitbox").toConstantValue(z.hitbox),q}))}}.Instantiate(this._game,q,K);case ko.V.singleImage:return class{constructor(){}static Instantiate(q,K,z){const Y=xo.Instantiate(q,K,z);Y.name="dorm appearance";const Q=Y.addComponent(X.Fid);Q.Identifier="Animators";const Z=Y.findComponentInChildren(Po._).GameObject.addComponent(No);return Q.Components=[Z],Y}}.Instantiate(this._game,q,K);case ko.V.spriteSheet:return class{constructor(){}static Instantiate(q,K,z){const Y=xo.Instantiate(q,K,z);Y.name="spritesheet appearance";const Q=Y.addComponent(X.Fid);Q.Identifier="Animators";const Z=Y.findComponentInChildren(Po._).GameObject.addComponent(Lo.K);return Q.Components=[Z],Y}}.Instantiate(this._game,q,K);default:return void X.VyI.log(`Bad anim type ${K.animationType}`,X.$bb.Error)}}))}getData(q,K,z){var Y,Q,Z,J;const tt=Ee.t.getItem(q,K),et=tt.metadata.assets;let it=z;if(!X.Aq$.isDefined(it))switch(q){case Do.V.Follow:case Do.V.Pet:it=Io.default;break;case Do.V.Dorm:it=Io.vertical;break;default:X.VyI.log(`Bad marble transform type: ${q}`,X.$bb.Error)}const st=null==et?void 0:et[it],nt={x:0,y:0};(null==st?void 0:st.rootOffset)&&(nt.x=X.Aq$.isDefined(st.rootOffset.x)?st.rootOffset.x:0,nt.y=X.Aq$.isDefined(st.rootOffset.y)?st.rootOffset.y:0);const at={xOffset:0,yOffset:0,width:null,height:null};(null==st?void 0:st.hitbox)&&(at.xOffset=X.Aq$.isDefined(st.hitbox.xOffset)?st.hitbox.xOffset:0,at.yOffset=X.Aq$.isDefined(st.hitbox.yOffset)?st.hitbox.yOffset:0,at.width=st.hitbox.width,at.height=st.hitbox.height);const rt={type:q,ID:K,size:it,offset:nt,hitbox:at,animationType:null!==(Y=null==st?void 0:st.type)&&void 0!==Y?Y:ko.V.spine,assetKey:null,buddyTag:tt.data.tag};return rt.assetKey=this.getAssetKeys(rt,null==st?void 0:st.ID,null!==(Q=tt.metadata.guid)&&void 0!==Q?Q:ct.Q[null===(J=null===(Z=tt.metadata.assets)||void 0===Z?void 0:Z.default)||void 0===J?void 0:J.assetKey]),rt}getAssetKeys(q,K,z){if(z)return z;switch(q.animationType){case ko.V.atlas:return it._.General_pets_json;case ko.V.spine:return`spine-${K}`;case ko.V.singleImage:case ko.V.spriteSheet:return`${q.size}-${q.type}-${q.ID}`;default:return void X.VyI.log(`Bad anim type ${q.animationType}`,X.$bb.Error)}}};Bo=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)("d73-66e9")),(0,Q.Qj)(1,(0,dt.inject)(X.t5G.AssetLoader)),(0,Q.Sn)("design:paramtypes",[pn.n,Object])],Bo);class Uo{constructor(q){this.game=null,this.game=q}create(){return this._dialogueController.close(),this._dialogueController}}(0,Q.Cg)([(0,Ge.b)("e81-40c8"),(0,Q.Sn)("design:type",ka.Z)],Uo.prototype,"_dialogueController",void 0);var Fo=z(96216);class Go{constructor(q,K){this.game=null,this.ID=0,this.npc=null,this.dialogue=[],this.events=[],this.game=q,this.ID=K,this.end()}start(){this.text(),this.next()}end(q=null){null==q||q(),this.npc=null,this.dialogue=[],this.events=[]}next(){if(this.events.length>0){const q=this.events[0];this.events.splice(0,1),q()}else this.end()}add(q){this.text(),this.events.push(q)}text(q,K,z){if(!X.Aq$.isDefined(q)&&0===this.dialogue.length)return;const Y=st.q.instance.prodigy.dialogue.create();if(this.dialogue.length>0&&(K!==this.npc||!X.Aq$.isDefined(q))){const q=(q,K,Q)=>{for(let z=0;z{q(),K()}).bind(this,this.next.bind(this)))}animation(q,K=!1){this.add((()=>{K?q().onTweenComplete.add(this.next.bind(this)):(q(),this.next())}).bind(this))}enableInput(q){this._inputEnabled=q,this.add((()=>{if(this.game.input.enabled=q,!q)for(let q=0;q{st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.saveEnabled=q,this.next()}).bind(this))}set(q,K,z){this.add((()=>{q[K]=z,this.next()}))}path(q,K,z,Y=!1){this.add((()=>{Y?(q.setPath(K,null,z),this.next()):q.setPath(K,this.next.bind(this),z)}).bind(this))}validPath(q,K,z,Y,Q=!1){this.add((Q=>{Q?(q.setValidPath(K,z,Y,null),this.next()):q.setValidPath(K,z,Y,this.next.bind(this))}).bind(this,Q))}hop(q,K,z,Y,Q=!1){this.add((()=>{Q?(q.hop(K,null,z,Y),this.next()):q.hop(K,this.next.bind(this),z,Y)}).bind(this))}delay(q){this.add(this.game.time.events.addTimer.bind(this.game.time.events,q,this.next,this))}explode(q,K,z,Y,Q,X=!1,Z=!1){this.add((()=>{X?(st.q.instance.prodigy.effects.explode(q,K,z,Y,Q,null,Z),this.next()):st.q.instance.prodigy.effects.explode(q,K,z,Y,Q,this.next.bind(this),Z)}).bind(this))}fire(q,K,z,Y,Q,X,Z=!1){this.add((()=>{Z?(st.q.instance.prodigy.effects.fire(q,K,z,Y,Q,X),this.next()):st.q.instance.prodigy.effects.fire(q,K,z,Y,Q,X,this.next.bind(this))}).bind(this))}shake(q,K,z,Y,Q=!1){this.add((()=>{Q?(st.q.instance.prodigy.effects.shake(q,K,z,Y),this.next()):st.q.instance.prodigy.effects.shake(q,K,z,Y,this.next.bind(this))}).bind(this))}sound(q,K,z=!1){if(z)this.add(st.q.instance.prodigy.audio.playSFX.bind(st.q.instance.prodigy.audio,q,K,this.next.bind(this)));else{const z=()=>{st.q.instance.prodigy.audio.playSFX(q,K),this.next()};this.add(z)}}bgm(q){this.add((()=>{X.Aq$.isDefined(q)?(st.q.instance.prodigy.audio.playBGM(q,!0),st.q.instance.prodigy.audio.resumeBGM()):st.q.instance.prodigy.audio.pauseBGM(),this.next()}).bind(this))}tween(q,K,z,Y,Q){this.add((()=>{const X=this.game.add.tween(q,this).to(K,z,Y);Q?this.next():X.onTweenComplete.add(this.next.bind(this)),X.start()}).bind(this))}cameraFlash(){this.add((()=>{const q=st.q.instance.prodigy.create.group();q.addChild(new jr.C(this.game,0,0,st.q.instance.game.width,st.q.instance.game.height,it._.Tiled_sprites_json,"overlay-light")),q.alpha=0,st.q.instance.prodigy.audio.playSFX(20,"camera");const K=this.game.add.tween(q,this).to({alpha:1},150,X.GS3.Linear.None).to({alpha:0},150,X.GS3.Linear.None);K.onTweenComplete.add((()=>{q.destroy(),this.set(q,"visible",!1),this.next()})),K.start()}).bind(this))}reward(q,K){X.Aq$.isDefined(q)&&q.length>0&&this.add(st.q.instance.prodigy.open.gotItem.bind(st.q.instance.prodigy.open,q,this.next.bind(this),null,K))}popup(q){this.add(st.q.instance.prodigy.open.message.bind(st.q.instance.prodigy.open,q,this.next.bind(this)))}functionCallback(q){this.add((()=>{q(this.next.bind(this))}).bind(this))}}class jo{constructor(q){this.game=null,this.eventID=0,this.game=q}create(){return this.eventID++,new Go(this.game,this.eventID)}}var $o=z(60881),Ho=z(84938),Vo=z(96494),Wo=z(76599),qo=z(325);let Ko=class{constructor(){this.addAuthorizationHeader=null,this.addAccessTokenHeader=null,this.addAccessTokenBody=null,this._loginPromise=new X.bnh}get userID(){return this._userID}get accessToken(){return this._accessToken}get loginPromise(){return this._loginPromise}setAuthorizationData(q,K){this._userID=q,this.setAuthorizationToken(K)}setAuthorizationToken(q){if(this._accessToken=q,q){this.createAuthorizationHeaderClosure(q),this.createAccessTokenHeaderClosure(q),this.createAccessTokenBodyClosure(q);st.q.instance.prodigy.gameContainer.get("b09-138c").setToken("identityToken",q,!1,!1),this._loginPromise.resolve()}}createAuthorizationHeaderClosure(q){(()=>{const K=q;this.addAuthorizationHeader=q=>{q.setHeader("Authorization",`Bearer ${K}`)}})()}createAccessTokenHeaderClosure(q){(()=>{const K=q;this.addAccessTokenHeader=q=>{q.setHeader("identityToken",K)}})()}createAccessTokenBodyClosure(q){(()=>{const K=q;this.addAccessTokenBody=q=>{switch(q.getMethod()){case X.iXQ.Get:q.setQueryParameter("identityToken",K);break;case X.iXQ.Head:break;default:let z=q.getBody();z||(z=new de.c,q.setBody(z)),z.setJson(Object.assign(Object.assign({},z.getJson()),{identityToken:K}))}}})()}isLoggedIn(){return null!==this.addAuthorizationHeader}authenticateRequest(q){if(!this.isLoggedIn())throw new Error("Attempting to authenticate with Identity when not logged in.");q.setHeader("userID",`${this._userID}`),this.addAuthorizationHeader(q)}logout(){this.addAuthorizationHeader=null,this.addAccessTokenHeader=null,this.addAccessTokenBody=null}addValuesToHeader(q){if(!this.isLoggedIn())throw new Error("Attempting to add access token with Identity when not logged in.");this.addAccessTokenHeader(q)}addValuesToBody(q){if(!this.isLoggedIn())throw new Error("Attempting to add access token with Identity when not logged in.");this.addAccessTokenBody(q)}};function zo(q){return void 0!==q.showQuestion}Ko=(0,Q.Cg)([(0,dt.injectable)()],Ko);class Yo{get isQuestionInterfaceOpen(){return this._isQuestionInterfaceOpen}constructor(q){this._staticQuestionList=[{skillId:392,questionId:18171},{skillId:392,questionId:18204},{skillId:436,questionId:20103},{skillId:436,questionId:20120},{skillId:1204,questionId:56219},{skillId:1204,questionId:56231},{skillId:1274,questionId:59834},{skillId:1274,questionId:59865},{skillId:224,questionId:10194},{skillId:224,questionId:10224}],this.isNew=!1,this.game=null,this.rankUpArray=null,this.game=q,this.st=st.q.instance.prodigy.gameContainer.get("774-4659"),this.onQuestionAnswered=new X.HN0,this.onQuestionInterfaceOpened=new X.HN0,this.onQuestionInterfaceClosed=new X.HN0,this._isQuestionInterfaceOpen=!1,this._areSoundsLoaded=!1,this._answerCallback=null,this._answerData=null,this._synapse.onNotificationReceived.add(this.handleEducationSynapseNotification,this)}get shouldShowStaticQuestions(){return!1}openFull(){this.game.stage.visible=!1}closeFull(){this.game.stage.visible=!0}showMathQuestion(q,K,z){var Y,Q,Z,J,tt,et,it;st.q.instance.prodigy.gameContainer.get("e01-1fba").setView("question-interface");const nt=null!=z?z:{};this._isQuestionInterfaceOpen=!0,this.onQuestionInterfaceOpened.dispatch(),this.st.stopInactiveTimer(),this.game.input.keyboard.clearCaptures(),this.reduceBGMVolumeBeforeQuestion();let at=1;X.Aq$.isDefined(nt.forceAnswerBonus)&&(at=nt.forceAnswerBonus?1:0);const rt=null!==(Y=nt.allowTutorials)&&void 0!==Y&&Y,ot={selector:"#external-content",userID:this._playerDataProvider.player.userID,callback:this.answerQuestion.bind(this,K),classIDs:this._playerDataProvider.player.classIDs,volume:Ho.B.effectVolume.value,isTeacher:!1,hideCallback:this.openFull.bind(this),showAnswerBonus:at,showAnswerBonusAnimation:0,showTutorial:rt,canInstantWin:null!==(Q=nt.canInstantWin)&&void 0!==Q&&Q,numQuestions:0,instantWinDialogueCallback:null,showProgressBarOnQuestionComplete:!1,progressBarFrom:0,progressBarTo:0,isUserInBattle:null===(Z=nt.isUserInBattle)||void 0===Z||Z,isBattleRevampExperiment:null===(J=nt.revampBattleOverride)||void 0===J||J,disableLock:null!==(tt=nt.disableLock)&&void 0!==tt&&tt,sessionUuid:this._uuidProvider.getUUID(),showTopicBadgeAnimations:null===(et=nt.showTopicBadgeAnimations)||void 0===et||et};if(this.shouldShowStaticQuestions){const K=null!==(it=this._playerDataProvider.player.getPlayerData().qiStaticQuestionIndex)&&void 0!==it?it:0,z=this._staticQuestionList[K];return this._playerDataProvider.player.getPlayerData().qiStaticQuestionIndex=K>=this._staticQuestionList.length-1?0:K+1,this._playerDataProvider.player.updated=!0,void q.showGameChallenge(Object.assign(Object.assign(Object.assign({},ot),z),{disableLock:!0,scenarioId:1}))}q.showQuestion(ot)}showELAQuestion(q,K){this._isQuestionInterfaceOpen||(this._isQuestionInterfaceOpen=!0,this.onQuestionInterfaceOpened.dispatch(),this._areSoundsLoaded=!1,st.q.instance.prodigy.load.assets([ht.c.Sfx_qi_button_default,ht.c.Sfx_qi_button_disabled,ht.c.Sfx_qi_positive_action,ht.c.Sfx_qi_negative_action],((q,K)=>{this._areSoundsLoaded=K})),this.st.stopInactiveTimer(),this.game.input.keyboard.clearCaptures(),this.reduceBGMVolumeBeforeQuestion(),q.open({onClose:this.elaQuestionInterfaceClosedCallback.bind(this),onAnswer:this.answerElaQuestion.bind(this,K),answerLimit:1,preventAbruptClose:!0}))}playSound(q){this._areSoundsLoaded&&st.q.instance.prodigy.audio.playSFXFromGUID(q,void 0,void 0,void 0,!1)}elaQuestionInterfaceClosedCallback(){this._answerData||(this._answerData=this.createEmptyAnswerSchema(),this._answerData.wasCorrect=!1),this.answerQuestion(this._answerCallback,this._answerData),this._isQuestionInterfaceOpen=!1,this.onQuestionInterfaceClosed.dispatch(),this.st.startInactiveTimer(),this.restoreBGMVolumeAfterQuestion(),this.game.input.keyboard.addKeyCapture([$o.D.BACKSPACE])}question(q,K){this._answerCallback=null!=q?q:null,this._answerData=null,zo(QI)?this.showMathQuestion(QI,q,K):this.showELAQuestion(QI,q)}updateStrandBasedPlacementTest(q){X.VyI.log("updateStrandBasedPlacementTest",X.$bb.Verbose),X.VyI.log(JSON.stringify(q),X.$bb.Verbose),this.st.updateStrandBasedPlacementTest(q).catch(X.RQr.createHandler("Error updating strand-based placement test"))}createEmptyAnswerSchema(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return{wasCorrect:!1,respTime:0,nFactor:0,awardPrize:!1,awardInstantWin:!1,isMember:q.hasMembership(),playLocation:q.locationSelectionType,sessionID:this._uuidProvider.getUUID(),chances:[],numQuestions:0,skillID:0,currentTheta:0,hwID:0,type:Wo.w.DEFAULT,questionID:0,questionType:void 0}}answerElaQuestion(q,K){const z=this.createEmptyAnswerSchema();z.wasCorrect=K.wasCorrect,this._answerCallback=q,this._answerData=z}answerQuestion(q,K){X.Aq$.isDefined(K.dontSendToAnswersPipeline)&&K.dontSendToAnswersPipeline||this.shouldShowStaticQuestions||!zo(QI)||this.st.answerQuestion(K).catch(X.RQr.createHandler("Error answering question"));const z={ID:K.skillID,theta:K.currentTheta};if(K.numQuestions>=1)K.numQuestions--,this.question(q,{forceAnswerBonus:!1,energyCost:0,allowTutorials:!1}),X.VyI.log(`calling next question, ${K.numQuestions} remain`,X.$bb.Verbose);else{this._isQuestionInterfaceOpen=!1,this.onQuestionInterfaceClosed.dispatch(),this.st.startInactiveTimer(),this.restoreBGMVolumeAfterQuestion(),this.game.input.keyboard.addKeyCapture([$o.D.BACKSPACE]),this.closeFull();st.q.instance.prodigy.gameContainer.get("e01-1fba").setView("game"),this._playerDataProvider.player.onQuestionAnswered(K),X.Aq$.isDefined(q)&&q(K.wasCorrect,K.respTime,K.nFactor,K.awardPrize,K.awardInstantWin,z)}this.onQuestionAnswered.dispatch(K.wasCorrect,K)}reduceBGMVolumeBeforeQuestion(){this._questionVolumeToken||(this._questionVolumeToken=Ho.B.musicVolume.addSmoothedLensMultiplier(.05))}restoreBGMVolumeAfterQuestion(){this._questionVolumeToken&&(this._questionVolumeToken.remove(),this._questionVolumeToken=void 0)}initializeMathQI(q,K){this._playerDataProvider.player.grade=X.Aq$.isDefined(q.chosenGrade)?q.chosenGrade:void 0,X.Aq$.isDefined(q.curriculumTreeID)&&(this._playerDataProvider.player.curriculumTreeID=q.curriculumTreeID),this.shouldShowStaticQuestions||(K.on("assignment-complete",this.finishAssignment.bind(this)),K.on("update-user",this.updateUser.bind(this)),K.on("grade-complete",this.finishGrade.bind(this)),K.on("placement-complete",this.finishPlacement.bind(this)),K.on("placement-test-by-strand-update placement-test-by-strand-complete",this.updateStrandBasedPlacementTest.bind(this)),K.on("update-plan-student",this.updatePlanStudent.bind(this)),K.on("topics-ranked-up",this.updateBreadcrumbs.bind(this))),K.on("video-start",(()=>{st.q.instance.prodigy.audio.pauseBGM()})),K.on("video-stop",(()=>{st.q.instance.prodigy.audio.resumeBGM()})),K.on("get-video-lesson-urls",this.getVideoLessonSignedUrls.bind(this)),K.initWithConfig({studentData:q})}initializeELAQI(q,K){const z=this._subjectProvider.getSubject()===qo.Q.ELA?"ELA":"SCIENCE";K.config({subject:z,authProvider:()=>{const q=st.q.instance.prodigy.gameContainer.get("9e9-b33d");return{userId:this._identityAuthProvider.userID,identityToken:this._identityAuthProvider.accessToken,gameJwt:q.getToken()}},playerProvider:()=>{const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return{isMember:q.hasMembership(),playLocation:q.locationSelectionType}},gameProvider:()=>({gameTheme:"RPG",sessionUuid:this._uuidProvider.getUUID(),onPlayDefaultButtonSound:this.playSound.bind(this,ht.c.Sfx_qi_button_default),onPlayDisabledButtonSound:this.playSound.bind(this,ht.c.Sfx_qi_button_disabled),onPlayPositiveActionSound:this.playSound.bind(this,ht.c.Sfx_qi_positive_action),onPlayNegativeActionSound:this.playSound.bind(this,ht.c.Sfx_qi_negative_action)})})}initialize(q){zo(QI)?this.initializeMathQI(q,QI):this.initializeELAQI(q,QI)}loadAndInitEducationData(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=st.q.instance.prodigy.gameContainer.get("774-4659");this._isQuestionInterfaceOpen&&(yield this.onQuestionInterfaceClosed.asPromise());try{const Y=yield z.loadEducation(K.userID),Q=Object.assign(Object.assign({},Y),{goalId:K.goalId,grade:null!==(q=Y.grade)&&void 0!==q?q:Y.chosenGrade});K.onEducationLoaded(Q),K.setEducation(Q.chosenGrade,Q.curriculumTreeID),K.initEducation(),K.updated=!0}catch(Y){throw X.RQr.logError(Y,"Error loading and initializing education data"),Y}}))}getStudentData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q,X,Z,J,tt;if(zo(QI))return QI.fetchStudentData({identityToken:this._identityAuthProvider.accessToken,userId:q});this._subjectProvider.getSubject();const et=yield this.st.fetchStudentData(qo.Q.Math);return{userID:q,chosenGrade:(null===(z=null===(K=et.player)||void 0===K?void 0:K.chosenGrade)||void 0===z?void 0:z.chosenGradeNumber)||void 0,grade:(null===(Q=null===(Y=et.player)||void 0===Y?void 0:Y.grade)||void 0===Q?void 0:Q.gradeNumber)||void 0,curriculumTreeID:(null===(Z=null===(X=et.player)||void 0===X?void 0:X.curriculum)||void 0===Z?void 0:Z.id)||void 0,goalId:(null===(tt=null===(J=et.player)||void 0===J?void 0:J.grade)||void 0===tt?void 0:tt.gradeNumber)||void 0}}))}processAnswerResponses(){zo(QI)&&X.Aq$.isDefined(QI.processAnswerResponses)&&QI.processAnswerResponses()}getMasteredSkills(){return zo(QI)?QI.getMasteredSkills():0}getAllTopicBadges(){return zo(QI)?QI.getAllTopicBadges():[]}getRankUpBadges(){return this.rankUpArray}updateUser(q){if(!q.usesGraphQLPlacementTestCompleteMutation){const K=q;X.Aq$.isDefined(K.grade)&&"number"==typeof K.grade?this.st.updatePlayerGrade(K).catch((q=>Nn.J.logUpdateUserFailed())):Nn.J.logUpdateUserFailed(2)}}getVideoLessonSignedUrls(q){if(!zo(QI))return void X.VyI.log("Cannot fetch video lesson URLs for non-math QI.",X.$bb.Error);this.st.getVideoLessonSignedUrls(q.videoURL,q.captionsURL,(q=>{QI.trigger("video-lesson-urls-fetch-success",q)}),(()=>{QI.trigger("video-lesson-urls-fetch-failure"),X.VyI.log("Fetching signed video lesson URLs for user failed.",X.$bb.Error)}))}updatePlanStudent(q){this.st.updatePlanStudent(q)}updateBreadcrumbs(q){if(this.rankUpArray=q,zo(QI)&&X.Aq$.isDefined(this.rankUpArray)&&this.rankUpArray.length>0)for(let K=0;Kq.id===this.rankUpArray[K].collectionId));for(let z=0;z=q.topics[z].ranks[q.topics[z].ranks.length-1]&&this._breadcrumbManager.resetBreadcrumbs(En.B.FEATURE_BADGES)}}finishPlacement(q){this.st.finishPlacement(Object.assign(Object.assign({},q),{grade:parseInt(q.grade,10)})).catch(X.RQr.createHandler("Error finishing placement test"))}finishAssignment(q){this.st.completeAssignment(q.assignmentID)}finishGrade(q){}isVideoLessonActive(){return!!zo(QI)&&X.Aq$.isDefined(QI.createVideoLessonForSkillWithOptions)}getAvailableLessonReport(){return zo(QI)?QI.getAvailableLessonReport():[]}createVideoLesson(q,K){return zo(QI)?QI.createVideoLessonForSkillWithOptions(q,K):null}enableLogging(){zo(QI)&&QI.enableLogging()}disableLogging(){zo(QI)&&X.Aq$.isDefined(QI.disableLogging)&&QI.disableLogging()}showGameChallenge(q,K=1,z=0,Y=!1,Q=66,X=33,Z,J=!1){if(!zo(QI))return;const tt={selector:"#external-content",userID:this._playerDataProvider.player.userID,callback:this.answerQuestion.bind(this,Z),classIDs:this._playerDataProvider.player.classIDs,volume:Ho.B.effectVolume.value,isTeacher:!1,hideCallback:this.openFull.bind(this),showAnswerBonus:0,showAnswerBonusAnimation:0,showTutorial:!1,skillId:q,scenarioId:K,numQuestions:z,canInstantWin:!1,showProgressBarOnQuestionComplete:Y,progressBarFrom:Q,progressBarTo:X,isUserInBattle:!1,disableLock:J,sessionUuid:this._uuidProvider.getUUID()};this.reduceBGMVolumeBeforeQuestion(),QI.showGameChallenge(tt)}showProgressBar(q,K){zo(QI)&&QI.showProgress(q,K)}showBannerComplete(){zo(QI)&&QI.bannerComplete()}doesSkillIDHaveLesson(q){return!!zo(QI)&&QI.doesSkillIDHaveLesson(q)}getEducationSystemAPI(){return zo(QI)?QI.EducationSystemAPI:null}handleEducationSynapseNotification(q){switch(q.type){case Ke.m.ReloadEducationData:st.q.instance.prodigy.education.loadAndInitEducationData().catch(X.RQr.createHandler("SplashScreen: Error reloading education data"))}}}(0,Q.Cg)([(0,Ge.b)("ad2-c5b2"),(0,Q.Sn)("design:type",ee.E)],Yo.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,Ge.b)("d7b-2375"),(0,Q.Sn)("design:type",gn.H)],Yo.prototype,"_uuidProvider",void 0),(0,Q.Cg)([(0,Ge.b)("fa1-8ec9"),(0,Q.Sn)("design:type",Vo.F)],Yo.prototype,"_breadcrumbManager",void 0),(0,Q.Cg)([(0,Ge.b)("271-f034"),(0,Q.Sn)("design:type",Ko)],Yo.prototype,"_identityAuthProvider",void 0),(0,Q.Cg)([(0,Ge.b)("8f9-f0fc"),(0,Q.Sn)("design:type",re.W)],Yo.prototype,"_subjectProvider",void 0),(0,Q.Cg)([(0,Ge.b)("b0c-9016"),(0,Q.Sn)("design:type",ze.d)],Yo.prototype,"_synapse",void 0);var Qo=z(8770),Xo=z(83267),Zo=z(17002);class Jo extends Lr.H{constructor(q,K,z,Y,Q,X,Z,J){super(q,K,z,Y),this.sprite=st.q.instance.prodigy.create.sprite(0,0,Q,0),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add(this.onClicked,this),this.add(this.sprite),this.callback=J,this.font=st.q.instance.prodigy.create.font(this,0,60,"",{size:20,width:100,align:"left"}),this.icon=st.q.instance.prodigy.create.font(this,0,0,"@",{size:16}),this.icon.alpha=0,this.add(this.icon),this.visible=!1,this.setValue(Q,X,Z)}setValue(q,K,z){if(z<=0||!X.Aq$.isDefined(z))return this.visible=!1,this.icon.alpha=0,void this.font.setText("");this.visible=!0,X.Aq$.isDefined(q)&&X.Aq$.isDefined(this.sprite.key)&&this.sprite.loadNewTexture(q,K),X.Aq$.isDefined(K)&&(this.sprite.frameName=K),this.font.setText(X.Aq$.isDefined(z)&&z>1?`${z}`:"")}setCallback(q){this.callback=q}onClicked(){X.Aq$.isDefined(this.callback)&&this.callback()}centerAnchor(){this.sprite.anchor.set(.5,.5)}}var th=z(571);class eh{constructor(q){this.game=q}createIcon(q,K,z,Y=null,Q,X,Z,J=!0){return An.K.cacheAsset(this.game,z,An.K.zoneAssetsCached),new wr.k(this.game,q,K,z,null,Y,Q,X,Z,J)}gold(q,K,z,Y,Q,X){return this.createIcon(q,K,zt.E.getIconForType("currency",1),z,Y,Q,X)}createFromData(q,K,z,Y=null,Q,Z,J,tt){let et;if("gold"===q.type)return this.gold(K,z,Y,Q,Z,J);if("hairColor"===q.type)return et=st.q.instance.prodigy.create.sprite(K,z,it._.General_icons_json,this.iconKey(q),Y,Q,Z,J),et.tint=Qo.TZ.rgbToHex(q.data.colors[2][0],q.data.colors[2][1],q.data.colors[2][2]),et;if("eyeColor"===q.type)return et=st.q.instance.prodigy.create.sprite(K,z,it._.General_icons_json,this.iconKey(q),Y,Q,Z,J),et.tint=Qo.TZ.rgbArrayToHex(q.data.colors[0]),et;if("skinColor"===q.type)return et=st.q.instance.prodigy.create.sprite(K,z,it._.General_icons_json,this.iconKey(q),Y,Q,Z,J),et.tint=Qo.TZ.rgbArrayToHex(q.data.colors[1]),et;if("hair"===q.type){const Y=this.iconKey(q),X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.appearance.getHair().color;return et=st.q.instance.prodigy.create.sprite(K,z),st.q.instance.prodigy.colorReplaceController.checkColorAsset(Y,[{color:X,itemColor:"hairColor"}],2,(q=>{const K=`${Y}-${X}`,z=st.q.instance.prodigy.create.sprite(0,0,K);z.loadTexture(K),et.addChild(z),z.anchor.set(.5,.5),Q&&Q(et)})),et}return X.Aq$.isDefined(q.type)&&X.Aq$.isDefined(q.ID)?this.createIcon(K,z,this.iconKey(q),Y,Q,Z,J,tt):st.q.instance.prodigy.create.sprite(0,0,Ee.t.getIconAtlas(q),Nn.J.convertItemToIcon(q))}createFromDataAdvanced(q,K,z,Y,Z,J,tt,et){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q=st.q.instance.prodigy.create.element(K,z,Y),nt=null!=J?J:K.width-2*z,at=null!=tt?tt:K.height-2*Y;let rt;const ot=new Promise((q=>{rt=q}));let ht=null;const dt=Z?new X.I9Y(.5,1):null;if("gold"===q.type)ht=this.gold(0,0,Z,rt,J,tt);else if("hairColor"===q.type)ht=st.q.instance.prodigy.create.sprite(0,0,it._.General_icons_json,this.iconKey(q),dt,rt,J,tt),ht.tint=Qo.TZ.rgbToHex(q.data.colors[2][0],q.data.colors[2][1],q.data.colors[2][2]);else if("eyeColor"===q.type)ht=st.q.instance.prodigy.create.sprite(0,0,it._.General_icons_json,this.iconKey(q),dt,rt,J,tt),ht.tint=Qo.TZ.rgbArrayToHex(q.data.colors[0]);else if("skinColor"===q.type)ht=st.q.instance.prodigy.create.sprite(0,0,it._.General_icons_json,this.iconKey(q),dt,rt,J,tt),ht.tint=Qo.TZ.rgbArrayToHex(q.data.colors[1]);else if("mathTownInterior"===q.type)ht=st.q.instance.prodigy.create.sprite(-20,0,it._.Towertown_interiors_store_json,this.iconKey(q),dt,rt,J,tt);else if("mathTownFrame"===q.type)ht=st.q.instance.prodigy.create.sprite(-20,15,it._.Towertown_frames_store_json,this.iconKey(q),dt,rt,J,tt);else if("mathTownDecor"===q.type)ht=this.createIcon(0,0,this.iconKey(q),Z,rt,J,tt,et);else if("costume"===q.type){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2");ht=yield th.z.createFullBodyFromAppearanceData(Object.assign(Object.assign({},q.getAppearance()),{weapon:null,follow:null}),Xo.E.createMockPlayerDataProvider(!1)),Zo.f.resizeSpriteMaintainingAspectRatio(ht,nt,at),ht.anchor.set(.5,.5),ht.position.set(nt/2,at/2),null==rt||rt()}else ht=X.Aq$.isDefined(q.type)&&X.Aq$.isDefined(q.ID)?this.createIcon(0,0,this.iconKey(q),Z,rt,J,tt,et):st.q.instance.prodigy.create.sprite(0,0,Ee.t.getIconAtlas(q),Nn.J.convertItemToIcon(q));if(yield ot,Q.add(ht),"item"===q.type){const K=Ee.t.getItem(q.type,q.ID).data;if(X.Aq$.isDefined(K.effect)&&X.Aq$.isDefined(K.effect.transform)){const q=Mr.j.createRenderer(ct.Q.Spine_morph_marble_icon_json,{type:"spine",anchor:{x:.5,y:.5}});new Dr._(this.game,ht,[q]),q.playAnimation("mini",!0)}}return[Q,ht]}))}createWithQuantity(q,K,z,Y,Q,X){return new Jo(this.game,q,K,z,Y,null,Q,X)}iconKey(q){if("gold"===q.type)return zt.E.getIconForType("item",26);if("hairColor"===q.type||"skinColor"===q.type||"eyeColor"===q.type)return"empty";if("mathTownInterior"===q.type||"mathTownFrame"===q.type||"mathTowerOrnament"===q.type)return q.data.tag;if("mathTownDecor"===q.type)return`${q.data.tag}-icon`;if("item"===q.type){const K=Ee.t.getItem(q.type,q.ID);if(!K)return X.VyI.log(`No item found for type - ${q.type}, ID - ${q.ID}`,X.$bb.Error),"empty";{const q=K.data;if(X.Aq$.isDefined(q.effect)&&X.Aq$.isDefined(q.effect.transform))return zt.E.getIconForType(q.effect.transform,q.effect.ID)}}return zt.E.getIconForType(q.type,q.ID)}}var ih,sh=z(88225),nh=z(49569),ah=z(64270),rh=z(90156),oh=z(80003),hh=z(32389),ch=z(66207),dh=z(63343),lh=z(77992),uh=z(55301),fh=z(72772),bh=z(11848),ph=z(82351),vh=z(223),gh=z(50788),mh=z(37016),yh=z(96989),_h=z(60157);!function(q){q[q.None=0]="None",q[q.AtSchool=1]="AtSchool",q[q.Standard=2]="Standard",q[q.UltraFocussed=3]="UltraFocussed"}(ih||(ih={}));var Eh,wh=z(48199),Th=z(77065),Sh=z(215),Ah=z(46784),Ch=z(85515),Oh=z(87821),Ih=z(21738),Dh=z(642),Rh=z(16847),Ph=z(22023),Mh=z(19690),Nh=z(37773),xh=z(97317),Lh=z(17148),kh=z(99979),Bh=z(12472);!function(q){q[q.Disabled=0]="Disabled",q[q.Merge=1]="Merge",q[q.MagicoinMerge=2]="MagicoinMerge",q[q.MembershipUpsell=3]="MembershipUpsell",q[q.OtpUpsell=4]="OtpUpsell"}(Eh||(Eh={}));class Uh extends Ih.y{constructor(q,K,z){const Y=(0,Ft.G)(gh.J);super(st.q.instance.game,q,Y?Pi.l.PetMerge2Modal:Pi.l.PetMergeModal,K,!0),this._showPetMergeDrawer=new X.HN0,this._hidePetMergeDrawer=new X.HN0,this._resetPetMergeDrawerScroll=new X.HN0,this._selectedIngredientSlotIndex=-1,this._onSelectedIngredientsChanged=new X.HN0,this._mergeButtonMode=Eh.Merge,this._upsellModalType=ih.None,this.onPetMergeSuccess=new X.HN0,this._petMerge2Enabled=!1,this._isInFTUE=!1,st.q.instance.prodigy.load.assets([ph.B.Sfx_pet_merge_beam_effect,ph.B.Voice_noot_merge_ready_to_merge]),this.isModal=!1,this.skipRenderTransparencyLayer=!1,this._mergeTarget=z,this._petItem=Ee.t.getItem("pet",this._mergeTarget.ID),this._petMerge2Enabled=Y,this._injectablePropertiesDictionary=this.getMergeModalData();const Q=st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED);this._isInFTUE=!Q&&st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),this.onPrefabLoaded.addOnce((()=>{var q,K;const z=X.wa5.getActiveScene().container;if(this._petMerge2Enabled){const Y=this._isInFTUE&&!Q;this._ingredientWidget=z.get(dr.OA.IngredientWidget),null===(q=this._ingredientWidget)||void 0===q||q.setup(this._mergeTarget,Y).catch((()=>{X.VyI.log("Unable to set up ingredientWidget in PetMergeMenu",X.$bb.Warning)})),this._mergeBar=z.get(dr.OA.MergeBar),null===(K=this._mergeBar)||void 0===K||K.setup(this._mergeTarget,!0,Y)}else this._ingredientCardSpawner=z.get(dr.OA.IngredientCardSpawner),this._drawerCardSpawner=z.get(dr.oX.PetCardPetSpawner);this.setFTUEStatePetRank(),this.setupMergeButtonMode().catch(X.RQr.createHandler("Error setting up upsell modal")),this._targetPetSpineComponent=z.get(dr.OA.PetSpineComponent),this._mergeRankBadge=z.get(dr.OA.MergeRankBadge).GameObject,this._fanfareParentTransform=z.get(dr.OA.MergeFanfare),this._middlePanelBackingRectTransform=z.get(dr.OA.MiddlePanelBacking),this.bindMagicoinDisplayToPurchase()})),this._isInFTUE&&!this._petMerge2Enabled&&this.onPrefabLoaded.addOnce((()=>{st.q.instance.prodigy.audio.playDialogue({tag:ph.B.Voice_noot_merge_ready_to_merge,s:0,d:-1})})),this._segment.featureCommon.sendInterfaceEvent({interfaceName:Ah.B.PetMergePowerUpModal,interfaceType:Si.Wm.Window,originType:Si.$N.ButtonClick,originID:"merge_modal_interface",instanceType:Li.N.UI});const Z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this._confirmationDialogConfig=new Dh.k(Z.getText("BUTTON_YES_CAPITAL"),(()=>{this._segment.featureCommon.sendButtonEvent({buttonName:"Yes",destinationName:"your_pet_menu",interfaceType:Si.Wm.Window,interfaceName:Ah.B.PetMergePowerUpModal,saveClickInfo:Ah.B.PetMergePowerUpModal}),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(Sh.Eu.PetMergeConfirm),this.performMerge().catch(X.RQr.createHandler("Error merging pets"))}),Z.getText("BUTTON_NO_CAPITAL"),void 0,{atlas:it._.Ui_store_json,name:"icon-large-exclamation"},void 0,void 0,Z.getText("MERGE_CONFIRMATION_TITLE"),Z.getText("MERGE_CONFIRMATION_BODY"),!0),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(Sh.Eu.PetMergeSelectMerge)}create(){super.create(),(0,Mh.Ks)().preloadFromGUIDWithDependencies(Pi.l.PetMergeConsumedIngredient),(0,Mh.Ks)().preloadFromGUIDWithDependencies(Pi.l.PetMergePetFanfare),(0,Mh.Ks)().preloadFromGUIDWithDependencies(Pi.l.MergeSuccessBadgeVFX),this.onPetMergeSuccess.add(this.playFanfareAnimations.bind(this))}close(){var q;this._showPetMergeDrawer.dispose(),this._hidePetMergeDrawer.dispose(),this._resetPetMergeDrawerScroll.dispose(),this._onSelectedIngredientsChanged.dispose(),this.onPetMergeSuccess.dispose(),null===(q=this._hardCurrencyDataProvider)||void 0===q||q.onBalanceChanged.removeAll(this),super.close()}getMergeModalData(){var q;const K=st.q.instance.prodigy.gameContainer.get("782-c308"),z=this._petItem.data,Y=this._mergeTarget.mergeRank,Q=Ph.P8.isPetOnTeam(this._mergeTarget),J=K.getChargedLevel(),tt=Q&&J>0,et=tt?Nh.e.getChargedLevelTierFromLevel(J):xh.Bv.NO_CHARGE,it=et===xh.Bv.MAX_CHARGE,nt=Ph.P8.getBattleStats(this._petItem,this._mergeTarget.level,this._mergeTarget.uniqueID),at=Ph.P8.getBattleStats(this._petItem,this._mergeTarget.level,this._mergeTarget.uniqueID,1),rt=this._petMerge2Enabled?yh.Y.getMerge2RecipeForPet(this._petItem.ID,z.rarity,Y):yh.Y.getRecipeForPet(z.evolution.totalEvos,Y);this._validPetIngredientList=Bh.r.getOwnedIngredientsForRecipe(this._mergeTarget,(q=>Ee.t.getItem("pet",q)),rt);const ot=st.q.instance.prodigy.gameContainer.get("fa1-8ec9"),ht=this._petMerge2Enabled&&ot.isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&!ot.isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED);this._requiredIngredientCount=rt.ingredientCount;const ct=this._validPetIngredientList.length;this._selectedIngredientPetIndices=Z.range(Math.min(this._requiredIngredientCount,ct));const dt=ht?0:this._requiredIngredientCount-ct,lt=ct>this._requiredIngredientCount,ut=[this._mergeTarget,...this._selectedIngredientPetIndices.map((q=>this._validPetIngredientList[q]))],ft=null!==(q=ut.find((q=>q.nickname)))&&void 0!==q?q:this._mergeTarget,bt=Math.max(...ut.map((q=>q.level))),pt=Ph.P8.getRequiredPetMergeIngredient(this._petItem,rt),vt=this.getMagicoinCostForMerge(pt.ID,dt,rt),gt=this._hardCurrencyDataProvider.getBalance(27),mt=vt.value>0&>>=vt.value&&!this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(vt.value);this._mergeButtonMode=dt<=0?Eh.Merge:mt?Eh.MagicoinMerge:Eh.Disabled;const yt=this._mergeButtonMode!==Eh.Disabled,_t=(this._petMerge2Enabled||vt.value>0)&&!this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(vt.value);return{TITLE_TEXT:this._localizer.getText("PET_MERGE_MODAL_TITLE",Ph.P8.getPetDisplayName(this._petItem,ft)),CURRENCY_DISPLAY_ID:27,CURRENCY_DISPLAY_AMOUNT:gt,MAGICOIN_PRICE:vt.value,SHOW_MAGICOIN_PRICE:_t,SHOW_MEMBER_ICON:this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(vt.value)&&this._mergeButtonMode!==Eh.Merge,UPDATE_MAGICOIN_BUDGET:gt,LEVEL_TEXT:`${bt}`,MERGE_RANK:Y,STAT_TEXT_COLOR:tt?Oh.o.CHARGED_STAT_COLOR_MAP[z.rarity]:void 0,HEALTH:nt.hp,ADDITIONAL_HEALTH:"+"+(at.hp-nt.hp),POWER:nt.power,ADDITIONAL_POWER:"+"+(at.power-nt.power),SPEED:nt.speed,ADDITIONAL_SPEED:"+"+(at.speed-nt.speed),DEFENCE:nt.defence,ADDITIONAL_DEFENCE:"+"+(at.defence-nt.defence),IS_CHARGED:tt,CHARGED_TIER_1:tt&&!it,CHARGED_TIER_2:it,RARITY:z.rarity,ELEMENT:z.affinity,INGREDIENT_CARD_DATA:Z.range(this._requiredIngredientCount).map((q=>{var K;const z=this._validPetIngredientList[q],Y=null!=z?z:this._mergeTarget,Q={SELECTED:!1,PET_ID:Y.ID,PET_DATA:Y,NAME:null,LEVEL:1,MERGE_RANK:0,SHOW_MERGE_RANK_BADGE:!1,SHOW_ON_TEAM:!1,SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_STATIC_EVOLVE:!1,SHOW_GUIDE_HAND:!1,SHOW_PET_GEAR:!0};if(z)return Object.assign(Object.assign({},Q),{DISABLED:!1,INPUT_ENABLED:yt,ON_CLICK:()=>{if(lt)this.showMergePetDrawer(q);else{const K=this._ingredientCardSpawner.spawnedPrefabs[q];st.q.instance.prodigy.audio.playSFX(49,"pop");const z={bodyText:this._localizer.getText("PET_MERGE_MODAL_EXACT_INGREDIENTS")},Y=wh.A.displayTooltipTargeted(void 0,K,z,K);X.Aq$.isDefined(Y)&&Y.GameObject.setLayer(Ch.E.OverlayLayer,!0)}},NAME:Ph.P8.getPetDisplayName({type:"pet",ID:z.ID},z),NAME_ALIGN_H:X.If$.Left,LEVEL:z.level,MERGE_RANK:Ph.P8.getPetDisplayMergeRank(z.ID,z.uniqueID),SHOW_MERGE_RANK_BADGE:Ph.P8.canPetAccessMergeRanks(z.ID)});{const q=null!==(K=Ph.P8.getRequiredPetMergeIngredient(this._petItem,rt))&&void 0!==K?K:this._petItem;return Object.assign(Object.assign({},Q),{PET_ID:q.ID,PET_DATA:{ID:q.ID},DISABLED:!0,INPUT_ENABLED:!1,NAME:this._localizer.getText("PET_MERGE_MODAL_DISABLED_SLOT_TEXT"),NAME_ALIGN_H:X.If$.Center,LEVEL:1,MERGE_RANK:0,SHOW_MERGE_RANK_BADGE:!1,SHOW_ELEMENT_ICON:!1,SHOW_LEVEL_ICON:!1,SHOW_PET_GEAR:!1})}})),PET_ID:this._mergeTarget.ID,PET_GEAR:this._mergeTarget.gear,CHARGED_CREATURE_EFFECT_TIER:et,CHARGED_CREATURE_EFFECT_DISPLAY_TYPE:tt?xh.X$.IDLE:xh.X$.HIDDEN,DRAWER_DATA:{PET_DATA:this._validPetIngredientList.map(((q,K)=>({PET_ID:q.ID,PET_DATA:q,NAME:Ph.P8.getPetDisplayName(Ee.t.getItem("pet",q.ID).data,q),LEVEL:q.level,MERGE_RANK:q.mergeRank,SHOW_MERGE_RANK_BADGE:Ph.P8.canPetAccessMergeRanks(q.ID),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_STATIC_EVOLVE:!1,SHOW_ON_TEAM:K=this._requiredIngredientCount,ON_CLICK:()=>{this.selectIngredient(K)}}))),PET_GRID_FIXED_COLUMN_COUNT:2,DRAWER_WIDTH:444,DRAWER_HEIGHT:720,TITLE:this._localizer.getText("PET_MERGE_MODAL_DRAWER_TITLE"),START_OFFSCREEN_X:-800,TWEEN_IN_SIGNAL:this._showPetMergeDrawer,TWEEN_OUT_SIGNAL:this._hidePetMergeDrawer,RESET_SCROLL_SIGNAL:this._resetPetMergeDrawerScroll,ON_CLOSE:()=>{this.hideMergePetDrawer()}},MERGE_ENABLED:yt,MERGE_SUCCESS_SIGNAL:this.onPetMergeSuccess,ON_MERGE_CLICK:()=>this.onMergeButtonClicked(vt),PET_STANDEE:kh.bf[z.affinity],MERGE_BUTTON_TEXT:this._localizer.getText(dt>0?"GET_PETS_AND_MERGE":"MERGE"),PET_MERGE_MODAL_CLOSE_BUTTON:()=>this.sendMergeCancelledEvent()}}onMergeButtonClicked(q){const K=st.q.instance.prodigy.gameContainer.get("fa1-8ec9"),z=this._petMerge2Enabled&&K.isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&!K.isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED),Y=()=>this._segment.item.sendInsufficientCurrencyEvent(q,{sink_type:On.C.PetMerge,sink_id:this._mergeTarget.ID});if(st.q.instance.prodigy.audio.stopVoice(),this._petMerge2Enabled||this.hideMergePetDrawer(),(0,vs.v)(this._mergeButtonMode!==Eh.Disabled),this._mergeButtonMode===Eh.OtpUpsell)Y(),this.showOtpUpsellModal(q);else if(this._mergeButtonMode===Eh.MembershipUpsell)Y(),(0,vs.v)(this._upsellModalType!==ih.None),this.showMembershipUpsellModal(this._upsellModalType);else{const q=Object.assign(this._mergeTarget,{mergeRank:this._mergeTarget.mergeRank}),K=this._selectedIngredientPetIndices.map((q=>{const K=this._validPetIngredientList[q];return Object.assign(K,{mergeRank:K.mergeRank})})),Y=!z&&Uh.doesMergeRequireConfirmation(q,K),Q=Y?Ah.B.PetMergePowerUpWarning:Ah.B.PetMergePowerUpModal,Z=this._petMerge2Enabled?this._ingredientWidget.missingIngredientCount:this._ingredientCardSpawner.spawnedPrefabs.length-K.length;this._segment.featureCommon.sendButtonEvent({buttonName:Z>0?"merge magicoin":"merge",destinationName:Y?"warning_pop_up":"your_pet_menu",interfaceType:Si.Wm.Window,interfaceName:Q,saveClickInfo:Q});const J=4;this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(Z>0?Sh.Eu.PetMergeMagicoin:Sh.Eu.PetMergeFinalizeMerge,J),Y?(this._segment.featureCommon.sendInterfaceEvent({interfaceType:Si.Wm.Window,interfaceName:Q,originType:Si.$N.ButtonClick,originID:Q,instanceType:Li.N.UI}),st.q.instance.prodigy.open.confirmationDialog(this._confirmationDialogConfig)):z?this.performMerge([{type:mh.J1.FTUEMerge}]).catch(X.RQr.createHandler("Error attempting a ftue pet merge")):this.performMerge().catch(X.RQr.createHandler("Error merging pets"))}}showMergePetDrawer(q){this.selectIngredientSlot(q),this._showPetMergeDrawer.dispatch()}hideMergePetDrawer(){this.selectIngredientSlot(-1),this._hidePetMergeDrawer.dispatch()}selectIngredientSlot(q){if(this._ingredientCardSpawner&&this._selectedIngredientSlotIndex!==q){if(this._selectedIngredientSlotIndex>-1){const q={SELECTED:!1};cr.d.updateInjectedValues(this._ingredientCardSpawner.spawnedPrefabs[this._selectedIngredientSlotIndex],q)}if(q>-1){const K={SELECTED:!0};cr.d.updateInjectedValues(this._ingredientCardSpawner.spawnedPrefabs[q],K)}this._selectedIngredientSlotIndex=q}}selectIngredient(q){if(this._selectedIngredientSlotIndex<0)return;this._drawerCardSpawner.updateInjectionData(this._selectedIngredientPetIndices[this._selectedIngredientSlotIndex],{SHOW_ON_TEAM:!1,INPUT_ENABLED:!0});this._drawerCardSpawner.updateInjectionData(q,{SHOW_ON_TEAM:!0,INPUT_ENABLED:!1});const K=this._validPetIngredientList[q],z={PET_ID:K.ID,PET_DATA:K,NAME:Ph.P8.getPetDisplayName(Ee.t.getItem("pet",K.ID).data,K),LEVEL:K.level,MERGE_RANK:Ph.P8.getPetDisplayMergeRank(K.ID,K.uniqueID),SHOW_MERGE_RANK_BADGE:Ph.P8.canPetAccessMergeRanks(K.ID)};cr.d.updateInjectedValues(this._ingredientCardSpawner.spawnedPrefabs[this._selectedIngredientSlotIndex],z),this._selectedIngredientPetIndices[this._selectedIngredientSlotIndex]=q,this._onSelectedIngredientsChanged.dispatch()}updatePetStatsUI(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._mergeTarget.mergeRank,K=Ph.P8.getBattleStats(this._petItem,this._mergeTarget.level,this._mergeTarget.uniqueID);if(cr.d.updateInjectedValues(this.prefabContainer,{MERGE_RANK:q,MERGE_ENABLED:!1,INGREDIENT_CARD_DATA:[]},!0),!this._petMerge2Enabled)for(let Y=0;Yq.dispose()))}yield X.Egh.timeout(500);{const q=new X.HN0;cr.d.updateInjectedValues(this.prefabContainer,{POWER_STAT_SWIPE:q},!0),q.dispatch(),cr.d.updateInjectedValuesWithDelay(this.prefabContainer,{MERGE_POWER:K.power},!0,z).then((()=>q.dispose()))}yield X.Egh.timeout(500);{const q=new X.HN0;cr.d.updateInjectedValues(this.prefabContainer,{SPEED_STAT_SWIPE:q},!0),q.dispatch(),cr.d.updateInjectedValuesWithDelay(this.prefabContainer,{MERGE_SPEED:K.speed},!0,z).then((()=>q.dispose()))}yield X.Egh.timeout(500);{const q=new X.HN0;cr.d.updateInjectedValues(this.prefabContainer,{DEFENCE_STAT_SWIPE:q},!0),q.dispatch(),cr.d.updateInjectedValuesWithDelay(this.prefabContainer,{MERGE_DEFENCE:K.defence},!0,z).then((()=>q.dispose()))}cr.d.updateInjectedValues(this.prefabContainer,{ADDITIONAL_HEALTH:"",ADDITIONAL_POWER:"",ADDITIONAL_SPEED:"",ADDITIONAL_DEFENCE:""},!0)}))}playFanfareAnimations(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=yield(0,Mh.Ks)().loadWithDependenciesFromGUID(Pi.l.PetMergeConsumedIngredient,this._middlePanelBackingRectTransform.GameObject);K.active=!1;const z=[];let Y,Q="Merge_1_3";this._petMerge2Enabled?Y=this._ingredientWidget.ingredientCount:(Y=this._ingredientCardSpawner.spawnedPrefabs.length,Q=`Merge_1_${Y}`);const Z=K.findComponentInChildren(Ur.j);if(cr.d.updateInjectedValues(this.prefabContainer,{ORB_ANIMATION_COMPLETE:Z.OnAnimationComplete},!0),Z.OnAnimationComplete.add(this.updatePetStatsUI.bind(this)),!this._petMerge2Enabled)for(let tt=0;ttq.GameObject.activeInHierarchy)),rt=at.GameObject.findComponent(Ur.j),ot=at.getSpine(),ht=at.getSlot("Text");if(ht){const q=ot.getSlotContainer(ht),K=q.addChild(new tt.Container);K.scale.set(1,-1);const z=et.getRootContainer(),Y=12;K.addChild(z),K.pivot.set(z.width/2,z.height/2),q.addChild(K),K.position.set(0,Y)}yield rt.OnAnimationComplete.asPromise(),yield X.Egh.timeout(1500),this._segment.featureCommon.sendInterfaceEvent({interfaceName:Ah.B.PetMergePowerUpModal,interfaceType:Si.Wm.Window,instanceType:Li.N.UI,closeMethod:Si.Lv.Done}),this.close()}))}performMerge(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;st.q.instance.game.input.enabled=!1;let z,Y=null!=q?q:this._selectedIngredientPetIndices.map((q=>({type:mh.J1.Pet,uniqueId:this._validPetIngredientList[q].uniqueID})));if(this._petMerge2Enabled&&!q){const q=null===(K=Ee.t.getItem("pet",this._mergeTarget.ID))||void 0===K?void 0:K.data,z=yh.Y.getMerge2RecipeForPet(this._mergeTarget.ID,q.rarity,this._mergeTarget.mergeRank),Q=q=>{var K;return null!==(K=Ph.P8.getPetDisplayMergeRank(this._mergeTarget.ID,q))&&void 0!==K?K:mh.qd.MIN},X=st.q.instance.prodigy.gameContainer.get("782-c308").kennel.getAllPetsByID(this._mergeTarget.ID).filter((q=>q.uniqueID!==this._mergeTarget.uniqueID)).map((q=>({ID:this._mergeTarget.ID,uniqueID:q.uniqueID}))),Z=yh.Y.getMergedIngredientCountPerPet(Q,X,{ID:this._mergeTarget.ID,uniqueID:this._mergeTarget.uniqueID},q.rarity);Y=yh.Y.selectOptimalIngredients(Z,z.ingredientCount).map((q=>({uniqueId:q,type:mh.J1.Pet})))}z=this._petMerge2Enabled?this._ingredientWidget.missingIngredientCount:this._ingredientCardSpawner.spawnedPrefabs.length-Y.length,z>0&&!q&&(Y.length=this._petMerge2Enabled?this._ingredientWidget.ingredientCount:this._ingredientCardSpawner.spawnedPrefabs.length,Y.fill({type:mh.J1.MagicoinPet},-z));const Q=st.q.instance.prodigy.open.showFullScreenSpinner(),Z=this._mergeTarget.mergeRank;yield Uh.performMergeAction(this._mergeTarget.uniqueID,Y).then((q=>{var K,Y;if(q===mh.zb.Success){this._segment.playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"Pet Rank",progressionNewValue:`${this._mergeTarget.mergeRank}`,progressionPreviousValue:`${Z}`,creatureName:Nn.J.getLocalizationNameKey(null===(K=this._petItem)||void 0===K?void 0:K.data),transactionId:this._segment.petMerge.petMergeTransactionId});const q=z>0?5:6;this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(Sh.Eu.PetMergeCompleted,q),cr.d.updateInjectedValues(this.prefabContainer,{MERGE_ENABLED:!1},!0),this.onPetMergeSuccess.dispatch(),this.game.broadcaster.broadcast(gi.ig.Merged,null,[this._mergeTarget])}else{let K,z="",Q=[];switch(q){case mh.zb.AlreadyMaxRank:z="PET_MERGE_FAIL_MAX";break;case mh.zb.IncompatibleIngredients:z="PET_MERGE_FAIL_INCOMPATIBLE";break;case mh.zb.NotEnoughIngredients:z="PET_MERGE_FAIL_INGREDIENTS";break;case mh.zb.PetNotOwned:z="PET_MERGE_FAIL_NO_PET_FOUND",Q=[null!==(Y=this._mergeTarget.uniqueID)&&void 0!==Y?Y:""];break;case mh.zb.PetCannotBeMerged:default:z="PET_MERGE_FAIL_GENERAL"}st.q.instance.prodigy.open.messageBoxPrefab({text:z,textArgs:Q,confirmCallback:K});const Z=this._selectedIngredientPetIndices.map((q=>{const K=this._validPetIngredientList[q];return`{ ${Ph.P8.getPetDisplayName(Ee.t.getItem("pet",K.ID).data,K)}, Id: ${K.ID} }`})).join(",");z+=`. TargetPet: { ${Ph.P8.getPetDisplayName(Ee.t.getItem("pet",this._mergeTarget.ID).data,this._mergeTarget)}, Id: ${this._mergeTarget.ID} }, ingredients: ${Z}, isInFTUE: ${this._isInFTUE}`;const J=new Error(z);sh.captureException(J),X.RQr.logError(J,"Pet merge failed!")}})).catch((q=>{sh.captureException(q),X.RQr.logError(q,`Pet merge failed! Pet Id: ${this._mergeTarget.ID}`)})).finally((()=>{Q.destroy(),st.q.instance.game.input.enabled=!0}))}))}static performMergeAction(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=st.q.instance.prodigy.gameContainer,Y=z.get("782-c308").kennel,Q=Y.getPetByUniqueID(q).mergeRank,Z=z.get("197-2868"),J=z.get("20f-5f67"),tt=K.map((q=>q.type===mh.J1.Pet?Y.getPetByUniqueID(q.uniqueId):null)).filter((q=>null!==q)),et=J.item.beginSecureItemTransaction(),it=yield Z.performMergeAction(q,K);if(it.result!==mh.zb.Success)return it.result;const nt=!st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),at=Y.getPetByUniqueID(q),rt=Ee.t.getItem("pet",at.ID),ot=null==rt?void 0:rt.data,ht=(0,Ft.G)(gh.J)?yh.Y.getMerge2RecipeForPet(rt.ID,ot.rarity,Q):yh.Y.getRecipeForPet(ot.evolution.totalEvos,Q);return nt&&Uh.completePetMergeFTUE(at,ht.ingredientCount),X.Aq$.isDefined(at.team)&&Lh.k.cachedDisabledEvolutionFeature&&(Y.updated=!0,Y.refreshPetTeamData()),K.some((q=>q.type===mh.J1.MagicoinPet))?J.petMerge.sendPetMergedMagicoinEvents({ingredients:tt,ingredientBypass:ht.ingredientCount-tt.length,basePetData:at,previousRank:Q}):K.some((q=>q.type===mh.J1.MembershipReward))?J.petMerge.sendPetMergedUpsellEvents({ingredientBypass:ht.ingredientCount,basePetData:at,previousRank:Q}):J.petMerge.sendPetsMergedEvents({ingredients:tt,basePetData:at,previousRank:Q}),Uh.sendMergePetQuestEvent(ot),J.featureCommon.sendFetchPetRosterEvent([at,...tt],{trigger_type:"pet_merge",trigger_id:J.petMerge.petMergeId,fetch_scope:Si.oi.Partial}),et.flush({transaction_id:J.petMerge.petMergeTransactionId,sink_type:On.C.PetMerge}),it.result}))}static doesMergeRequireConfirmation(q,K){if((0,Ft.G)(gh.J))return!1;if(0===K.length)return!1;const z=q.mergeRank;for(const Z of K){if(Z.mergeRank>z)return!0}let Y=0;!!q.nickname&&Y++;for(const Z of K){if(!!Z.nickname&&(Y++,Y>1))return!0}const Q=Ee.t.getItem("pet",q.ID).data.evolution.totalEvos,X=yh.Y.getRecipeForPet(Q,z);if(yh.Y.isMerge1Recipe(X))for(const Z of K){if(Ee.t.getItem("pet",Z.ID).data.evolution.tier>X.evolutionTier)return!0}return!1}setFTUEStatePetRank(){if(bh.N.shouldShowPetMergeTutorial){st.q.instance.game.broadcaster.broadcast(gi.ki.FtueMergeModalLoaded);const q=this._mergeButtonMode!==Eh.Merge;cr.d.updateInjectedValues(this.prefabContainer,Object.assign({[dr.$z.PetMergeModalFTUEEnabled]:!0,[dr.$z.PetMergeModalFTUECloseButtonEnabled]:q},q&&{[dr.$z.PetMergeModalCloseButton]:()=>{Uh.escapePetMergeFTUE(this._mergeTarget.uniqueID)}}))}}static escapePetMergeFTUE(q){var K;const z=st.q.instance.prodigy.gameContainer.get("782-c308").kennel.getPetByUniqueID(q),Y=null===(K=Ee.t.getItem("pet",z.ID))||void 0===K?void 0:K.data,Q=(0,Ft.G)(gh.J)?yh.Y.getMerge2RecipeForPet(z.ID,Y.rarity,z.mergeRank):yh.Y.getRecipeForPet(Y.evolution.totalEvos,z.mergeRank);Uh.completePetMergeFTUE(z,Q.ingredientCount,!0)}static completePetMergeFTUE(q,K,z=!1){const Y=st.q.instance.prodigy.gameContainer.get("20f-5f67");st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED),bh.N.shouldShowPetMergeTutorial=!1,st.q.instance.game.broadcaster.broadcast(gi.ki.FtueCompleted),Y.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(Sh.S4.TutorialComplete),z&&Y.petMerge.sendPetMergeCancelledEvent(q,K,!0)}setupMergeButtonMode(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._mergeButtonMode===Eh.Disabled){if((0,Ft.G)(vh.l).enabled){const q=this._mergeTarget.mergeRank,K=this._petMerge2Enabled?yh.Y.getMerge2RecipeForPet(this._petItem.ID,this._petItem.data.rarity,q):yh.Y.getRecipeForPet(this._petItem.data.evolution.totalEvos,q),z=Ph.P8.getRequiredPetMergeIngredient(this._petItem,K);let Y;Y=this._petMerge2Enabled?this._ingredientWidget.missingIngredientCount:this._ingredientCardSpawner.spawnedPrefabs.length-this._selectedIngredientPetIndices.length;const Q=this.getMagicoinCostForMerge(z.ID,Y,K);this._mergeButtonMode=this._hardCurrencyDataProvider.canAfford(Q)?Eh.MagicoinMerge:Eh.OtpUpsell}else{const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this._upsellModalType=yield class{static getEligibleUpsellModalTypeForPlayer(q){return(0,Q.sH)(this,void 0,void 0,(function*(){let K=ih.None;const z=q.hasMembership(),Y=q.isPlayingAtSchool();if(z){const z=yield q.getMembershipUpsellData();0!==z.upgradeOptions.length&&(K=Y?ih.AtSchool:1===z.upgradeOptions.length?ih.UltraFocussed:ih.Standard)}else K=Y?ih.AtSchool:ih.Standard;return K}))}}.getEligibleUpsellModalTypeForPlayer(q),this._upsellModalType!==ih.None&&(this._mergeButtonMode=Eh.MembershipUpsell)}this._mergeButtonMode!==Eh.Disabled&&cr.d.updateInjectedValues(this.prefabContainer,{MERGE_ENABLED:!0},!0)}}))}bindMagicoinDisplayToPurchase(){var q;const K=this._hardCurrencyDataProvider.getBalance(27),z=this.prefabContainer.findComponentInChildren(Rh.n),Y=this.prefabContainer.findComponentInChildren(Th.B);null==z||z.updateAmount(K),Y&&(Y.initialNumber=K,null===(q=this._hardCurrencyDataProvider)||void 0===q||q.onBalanceChanged.add((()=>{const q=this._hardCurrencyDataProvider.getBalance(27);Y.targetNumber=q,Y.startCounter(),cr.d.updateInjectedValues(this.prefabContainer,{MERGE_ENABLED:!1,UPDATE_MAGICOIN_BUDGET:q},!0),this._mergeButtonMode=Eh.Disabled,this.setupMergeButtonMode().catch(X.RQr.createHandler("Error setting up Merge button mode"))}),this))}showOtpUpsellModal(q){this.sendFunnelStartEvent();const K=st.q.instance.prodigy.gameContainer.get("782-c308").getCurrencyAmount(q.currency),z=Z.noop;st.q.instance.prodigy.open.unifiedConversionFlow(z,{conversionFunnelName:xn.o.FunnelNotEnoughCurrency},null,{[dr.FK.OtpMissingMagicoin]:q.value-K})}sendFunnelStartEvent(){const q={type:"Pet-Merge-Not-Enough-Ingredients",category:"Pet-Merge",contentId:`${this._mergeTarget.ID}`,contentType:"Pet-Merge-Not-Enough-Ingredients",adType:Rn.R.Contextual,adVersion:Dn.P.getAdVersionFromTriggerCategory("Pet-Merge")},K=this._segment.purchase.sendFunnelTriggerImpression(q);this._segment.purchase.sendFunnelStart(q,K)}showMembershipUpsellModal(q){if(!jt.pF.eligibleForMembershipPurchaseForMultipleTiers())return void st.q.instance.prodigy.open.messageBoxPrefab({text:"YOU_DONT_HAVE_ENOUGH_MAGICOIN"});if(this._upsellModalType===ih.AtSchool)return void st.q.instance.prodigy.open.membershipSchoolAd();if(this.sendFunnelStartEvent(),Dn.P.shouldUseUnifiedConversionFlow(xn.o.FunnelPetMergeNotEnoughCurrency)){const q=Z.noop;return void st.q.instance.prodigy.open.unifiedConversionFlow(q,{conversionFunnelName:xn.o.FunnelPetMergeNotEnoughCurrency})}let K="";switch(q){case ih.Standard:K=Pi.l.ContextualPromptPetMergeDualPackage;break;case ih.UltraFocussed:K=Pi.l.ContextualPromptPetMergeUltraFocused;break;default:throw new Error(`Invalid upsell modal type: ${q}`)}const z=this._mergeTarget.mergeRank,Y=Ee.t.getItem("pet",this._mergeTarget.ID),Q={CONTEXTUAL_CHASE_PET_SPINE_GUID:ct.Q[`Spine_pet_${this._mergeTarget.ID}_json`],CONTEXTUAL_CHASE_PET_NAME:Nn.J.getLocalizationNameKey(Y),CONTEXTUAL_CONTENT_OLD_RANK:z,CONTEXTUAL_CONTENT_NEW_RANK:z+1};st.q.instance.prodigy.open.petMergeUpsellModal(K,Q).onDestroy.addOnce(this.getMembershipConversionAwareModalResultHandler())}getMagicoinCostForMerge(q,K,z){const Y=this._hardCurrencyDataProvider.petMergeIngredientCost(q);return(0,vs.v)(!!Y,`Couldn't find cost for pet id: ${q}`),Y.value*=Math.max(K,0),yh.Y.isMerge2Recipe(z)&&z.cost.forEach((q=>{"currency"===q.type&&27===q.id&&(Y.value+=q.amount)})),Y}getMembershipConversionAwareModalResultHandler(){let q=Z.noop;return st.q.instance.game.broadcaster.addAppListener(gi.H3.MembershipResponseReceived,(K=>{"success"===K&&(q=()=>{this.performMerge([{type:mh.J1.MembershipReward}]).catch(X.RQr.createHandler("Error performing merge action during upsell"))})}),this),()=>{q()}}static sendMergePetQuestEvent(q){const K={params:{taskEventType:_h.Z7.Pet,rarity:q.rarity,itemType:"pet",source:On.C.PetMerge,id:q.ID,element:q.affinity,level:q.level}};st.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(ps.T.MERGE_PET,K).catch(X.RQr.createHandler("Error sending a quest event for merging a pet"))}sendMergeCancelledEvent(){this._isInFTUE||this._segment.petMerge.sendPetMergeCancelledEvent(this._mergeTarget,this._requiredIngredientCount,!1)}destroy(){this._showPetMergeDrawer.dispose(),this._hidePetMergeDrawer.dispose(),this._resetPetMergeDrawerScroll.dispose(),this._onSelectedIngredientsChanged.dispose(),this.onPetMergeSuccess.dispose(),super.destroy()}}(0,Q.Cg)([(0,Ge.b)("bec-c6b4"),(0,Q.Sn)("design:type",Ji.W)],Uh.prototype,"_hardCurrencyDataProvider",void 0),(0,Q.Cg)([(0,Ge.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Uh.prototype,"_localizer",void 0);var Fh=z(96217);class Gh extends Ih.y{constructor(q,K,z,Y){super(st.q.instance.game,q,Pi.l.PostLossFlowScreen,K,!0),this.onPrefabLoaded.addOnce((()=>{this.prefab.findComponentInChildren(Fh.Q).setUpScreen({continueCallback:this.close.bind(this),teamUids:Y,nootTipBattleInfo:z})}))}}var jh=z(43579),$h=z(74712),Hh=z(12270),Vh=z(32367),Wh=z(19609),qh=z(63119),Kh=z(17291),zh=z(32492);class Yh extends Kh.b{constructor(q,K){super(q,K,null,{hideContent:!1,hideMenu:!1}),this.classCode=null,this.classCodeNextButton=null,this.classCodeBackButton=null,this.error=null,this.codeField=null,this._spinner=null,this._blockingOverlay=null,this._localizer=null,this.onClassCodeSubmitComplete=new X.HN0,this._localizer=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),st.q.instance.prodigy.load.assets(X.Aq$.isDefined(X.Aq$.getUrlVariable("unlock"))?[it._.General_core_2_json,it._.Font_black_json,it._.General_icons_json,it._.Ui_common_neutral_json,it._.Font_button_json,it._.Font_general_json,br.q.Bg_generic_outdoor,br.q.Bg_battle_forest]:[it._.General_core_2_json,it._.Font_black_json,"monster-small-125","monster-small-126","monster-small-127","monster-small-128","monster-small-129",it._.General_icons_json,it._.Ui_common_neutral_json,it._.Font_button_json,it._.Font_general_json,br.q.Bg_generic_outdoor,br.q.Bg_battle_forest],(()=>{this.menuSetup()}))}menuSetup(){st.q.instance.game.broadcaster.addAppListener(gi.bS.POST_MESSAGE_RECEIVED,((q,K)=>{"class-code-entry"===K.name&&this.setCode(K.classCode)}),this,st.q.instance.game),this._blockingOverlay=this.addChild(st.q.instance.prodigy.create.sprite(0,0,it._.General_core_json,"overlay-small")),this._blockingOverlay.width=this.game.width,this._blockingOverlay.height=this.game.height,this._blockingOverlay.alpha=.5,this._blockingOverlay.inputEnabled=!0,this.classCode=st.q.instance.prodigy.create.element(this,340,170),st.q.instance.prodigy.create.panel(this.classCode,0,0,12,8),this.classCodeNextButton=To.createNextButton(st.q.instance.game,this.classCode,350,370,this.submit.bind(this)),this.classCodeBackButton=To.createCloseButton(st.q.instance.game,this.classCode,50,370,this.close.bind(this)),st.q.instance.prodigy.create.font(this.classCode,10,25,this._localizer.getText("CHARACTER_SELECT_ENTER_CLASS"),{size:30,width:600,align:"center"}),this.error=st.q.instance.prodigy.create.font(this.classCode,0,300,"",{width:600,align:"center"}),this.codeField=qh.F.createInputField(st.q.instance.game,this.classCode,"classcodeg","",650-.5*qh.F.WIDTH_MEDIUM,285,qh.F.WIDTH_MEDIUM,qh.F.HEIGHT_MEDIUM,"textg");const q=this.classCode.add(st.q.instance.prodigy.create.sprite(40,200,it._.General_core_json,"overlay-light"));q.alpha=.2,q.width=520,q.height=70,q.inputEnabled=!0,q.events.onInputDown.add(this.getCode,this),st.q.instance.prodigy.create.font(this.classCode,50,210,this._localizer.getText("CHARACTER_SELECT_NO_CLASS_CODE"),{size:20,align:"center",width:500}),this._spinner=this.classCode.add(st.q.instance.prodigy.create.sprite(300,125,it._.General_core_json,"loading")),this._spinner.anchor.set(.5,.5),st.q.instance.game.add.tween(this._spinner,this).to({angle:360},2e3,X.GS3.Linear.None,!0,0,te.A.MAX_SAFE_INTEGER,!1),this._spinner.visible=!1,this.visible=!0}close(){st.q.instance.game.broadcaster.removeAppListener(gi.bS.POST_MESSAGE_RECEIVED,this,st.q.instance.game),this.classCode=null,this.classCodeNextButton=null,this.classCodeBackButton=null,this.error=null,this.codeField=null,this._spinner=null,this.onClassCodeSubmitComplete.dispose(),super.close()}getCode(){st.q.instance.prodigy.open.learnMore("HEY_TEACHERS","CLASS_CODE_LEARN_MORE_HEADER","CLASS_CODE_LEARN_MORE_BODY",(()=>{this.codeField.setVisible(!0)}),(()=>{this.codeField.clearEvents(!1),this.codeField.setVisible(!1),st.q.instance.game.input.keyboard.clearCaptures()}))}setCode(q){this.codeField.clearEvents(!0),st.q.instance.game.input.keyboard.addKeyCapture([$o.D.BACKSPACE]),this.codeField.setValue(q)}validationComplete(q){if(this._spinner.visible=!1,q){this.codeField.setVisible(!1);const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;st.q.instance.prodigy.open.message(this._localizer.getText("CHARACTER_SELECT_NEW_CLASS_BODY"),this.classCodeComplete.bind(this),"star",this._localizer.getText("CHARACTER_SELECT_NEW_CLASS_TITLE")),q.isClassCodeAttached=!0,q.data.classCodeUpdateTimestamp=Date.now()}else this.classCodeBackButton.visible=!0,this.classCodeNextButton.visible=!0,this.codeField.show(0),this.error.setText(this._localizer.getText("CHARACTER_SELECT_ERROR_INVALID_CLASS_CODE"))}submit(){const q=zh.b.reformatClassCode(this.codeField.getValue());if(zh.b.isValidClassCode(q)){this.codeField.hide(0),this.error.setText(""),this.classCodeBackButton.visible=!1,this.classCodeNextButton.visible=!1,this._spinner.visible=!0;st.q.instance.prodigy.gameContainer.get("774-4659").attachClassCode(q,this.validationComplete.bind(this,!0),this.validationComplete.bind(this,!1))}else this.error.setText(this._localizer.getText("CHARACTER_SELECT_ERROR_NO_CLASS_CODE"))}classCodeComplete(){this.onClassCodeSubmitComplete.dispatch(),this.close()}}var Qh=z(96810),Xh=z(15485),Zh=z(65088),Jh=z(35452);class tc extends sr.W{constructor(q,K,z,Y,Q,X,Z,J){super(q,K,X,{},Z),this.dungeon=null,this.closeButton=null,this.mainPanelButtons=null,this.actionContainer=null,this.zoneName=z,this.dungeon=st.q.instance.prodigy.world.zones[this.zoneName],this.lockoutDuration=Y,this.lastAttemptTime=Q,this.onClose=J}create(){super.create(),this.closeButton.onClickCallback=()=>{this.close()};const q=tc.getMinutesSinceLastAttempt(this.lastAttemptTime,Date.now());this.setEntranceTemplate(this.lockoutDuration,q)}setEntranceTemplate(q,K){}onEnterButtonClick(){this.dungeon.enterDungeon()}onCatalogButtonClick(q=null){st.q.instance.prodigy.open.dungeonPrizesMenu(this.zoneName,null!=q?q:this.dungeon.prizeWheelId)}static getMinutesSinceLastAttempt(q,K){return Math.floor((K-q)/6e4)}}class ec extends tc{constructor(q,K,z,Y){super(q,K,z,0,0,35,[ht.c.Sfx_results_screen,it._.Popup_ui_roulette_json,it._.Npc_face_gale_json,it._.Ui_shared_json],Y)}setEntranceTemplate(q,K){const z=q/6e4;if(K>=z){const q=this.instantiateTemplate("unusedAttemptsTemplate",this.mainPanelButtons);q.enterButton.onUpCallback=()=>{this.onEnterButtonClick()},q.catalogButton.onUpCallback=()=>{this.onCatalogButtonClick()},this.instantiateTemplate("unusedAttemptsContent",this.actionContainer)}else{this.instantiateTemplate("maxAttemptsTemplate",this.mainPanelButtons).catalogSoloButton.onUpCallback=()=>{this.onCatalogButtonClick()};const q=this.instantiateTemplate("maxAttemptsContent",this.actionContainer),Y=""+(z-K);q.timerText.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DUNGEON_ENTRANCE_TIMER",Y)),q["max-titleText1"].setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DUNGEON_ENTRANCE_LOCKOUT",this.dungeon.name))}}}var ic=z(8096);class sc extends sr.W{constructor(q,K,z,Y=[]){super(q,K,24,z,Y.concat([it._.Ui_common_neutral_json,it._.Popup_travel_json])),this.okayButton=null,this.okayText=null}preprocess(q,K=null,z=null,Y){const Q=X.Aq$.isDefined(K)?`[${K}] ${z}`:z;this.updateConfigModifierProperty("lockImage","frameName",Y),this.updateConfigModifierProperty("bannerText","text",Q),this.updateConfigModifierProperty("contentText","text",q),this.setGameRenderState(!0)}setOkay(q=null,K){this.okayButton.visible=!0,this.okayText.setText(X.Aq$.isDefined(q)?q:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("BUTTON_OKAY_CAPITAL")),K&&this.setCloseCallback(K),this.okayButton.onClickCallback=this.close.bind(this)}}var nc=z(48208);class ac extends sr.W{constructor(q,K,z,Y,Q){super(q,K,49,null,[it._.Ui_daily_question_json,ct.Q.Spine_questionsanswered_confetti_json]),this.animate=!1,super.setCloseCallback(z);const X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.dailyQuestions=X.getDailyQuestions(),this.animate=Y}create(){super.create(),this.addCards(),this.addDialog()}addCards(){const q=[];for(let K=0;K<7;K++){const z={day:K,rewardData:this.dailyQuestions.getRewards(K,this.game)};this.dailyQuestions.getCurrentDay()===K?q.push(this.createPrizeCard(z)):nc.V.hasDayPassed(this.dailyQuestions.getCurrentDay(),K)?this.dailyQuestions.isDayComplete(K)?q.push(this.createGreenCard(z)):q.push(this.createGreyCard(z)):q.push(this.createYellowCard(z))}for(let K=1;K1?q[K-1].width+q[K-1].x+25:25;q[K].position=new tt.Point(z,"prizeCard"===q[K].name?230:350-q[K].height/2)}q[0].position=new tt.Point(q[q.length-1].width+q[q.length-1].x+25,350-q[0].height/2)}addDialog(){const q=st.q.instance.prodigy.dialogue.create(),K=this.dailyQuestions.isCurrentDayComplete()?259:258;q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(`DIALOGUE_NOOT_${K}`,this.dailyQuestions.getNumRequired(this.dailyQuestions.getCurrentDay())),face:0,hideNext:!1}),q.startDeprecated("noot",!1,this.close.bind(this))}createGreenCard(q){const K=this.instantiateTemplate("greenCard",this);return this.createIconGroup(q,K),K.greenCard}createGreyCard(q){const K=this.instantiateTemplate("greyCard",this);return this.createIconGroup(q,K),K.iconGroup.alpha=.6,K.valueText.alpha=.6,K.greyCard}createYellowCard(q){const K=this.instantiateTemplate("yellowCard",this);return this.createIconGroup(q,K),K.burst.visible=0===q.day||6===q.day,K.yellowCard}createPrizeCard(q){const K=this.instantiateTemplate("prizeCard",this);this.createIconGroup(q,K);const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(this.animate){const q=this.game.add.spine(300,10,ct.Q.Spine_questionsanswered_confetti_json);q.setAnimationByName(0,"animation",!0),this.titleContainer.add(q,!1,5),K.whiteSquare.image.scale=new tt.Point(1,1),K.whiteSquare.image.alpha=0,K.checkmark.image.anchor=new tt.Point(.5,.5),K.checkmark.image.scale=new tt.Point(0,0),K.checkmark.visible=!0;const z=this.game.add.tween(K.whiteSquare.image,this).to({alpha:1},500,X.GS3.Linear.None,!1,0);z.start(),z.onTweenComplete.add((()=>{K.blueCellMatte.visible=!1,K.greenCellMatte.visible=!0;const q=this.game.add.tween(K.whiteSquare.image,this).to({alpha:0},500,X.GS3.Linear.None,!1,250),z=this.game.add.tween(K.checkmark.image.scale,this).to({x:1,y:1},200,X.GS3.Back.InOut,!1,400);q.chain(z),q.start()}))}else z.getDailyQuestions().isDayComplete(q.day)?(K.blueCellMatte.visible=!1,K.greenCellMatte.visible=!0,K.whiteSquare.visible=!1):(K.whiteSquare.visible=!1,K.checkmark.visible=!1);return K.prizeCard}createIconGroup(q,K){let z=Nn.J.getDayName(this.game,q.day);const Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Q=this.dailyQuestions.getCurrentDay();let Z=Q+1;if(Z>6&&(Z=0),q.day===this.dailyQuestions.getCurrentDay()?z=Y.getText("WEEKDAY_NAME_TODAY"):q.day!==Z||nc.V.hasDayPassed(Q,Z,this.dailyQuestions.getResetDayIndex())||(z=Y.getText("WEEKDAY_NAME_TOMORROW")),K.titleText.setText(z),q.rewardData.length>1){const z=this.game.add.graphics(0,0);z.beginFill(0),z.drawRect(-25,-10,130,100),z.endFill(),K.iconGroup.add(z),K.iconGroup.mask=z,K.iconGroup.add(st.q.instance.prodigy.icon.createIcon(8,16,zt.E.getIconForType(q.rewardData[2].type,q.rewardData[2].ID),{x:0,y:0}),0),K.iconGroup.add(st.q.instance.prodigy.icon.createIcon(-28,-10,zt.E.getIconForType(q.rewardData[0].type,q.rewardData[0].ID),{x:0,y:0}),0),K.iconGroup.add(st.q.instance.prodigy.icon.createIcon(28,-10,zt.E.getIconForType(q.rewardData[1].type,q.rewardData[1].ID),{x:0,y:0}),0),K.valueText.setText("Coin Bundle!")}else K.iconGroup.add(st.q.instance.prodigy.icon.createIcon(0,0,zt.E.getIconForType(q.rewardData[0].type,q.rewardData[0].ID),{x:0,y:0}),0),K.valueText.setText(`${q.rewardData[0].N} ${Ee.t.getItemData(q.rewardData[0].type,q.rewardData[0].ID).name}`)}}class rc extends sr.W{constructor(q,K,z,Y,Q,X=!1,Z,J){super(q,K,z===mn.A_.ARCHIVES?36:62,{},[ht.c.Sfx_results_screen,it._.Popup_ui_roulette_json]),this.closeButton=null,this.leaveButton=null,this.stayButton=null,this.goldenPagesPanel=null,this.warningContainer=null,this.endRoom=!1,this.zoneName=z,this.maxGoldenPages=Y,this.currentGoldenPages=Q,this.leaveCallback=Z,this.endRoom=X,this.setCloseCallback(J)}create(){super.create(),this.titleText.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("ARCHIVES_EXIT_TITLE",this.zoneName===mn.A_.ARCHIVES?"the Archives":st.q.instance.prodigy.world.zones[this.zoneName].name)),this.closeButton.onUpCallback=()=>{this.close()},this.stayButton.onUpCallback=()=>{this.close()},this.leaveButton.onUpCallback=()=>{this.onLeaveButtonClick()},this.populatePageIcons(),this.endRoom||this.populateWarning()}onLeaveButtonClick(){if(X.Aq$.isDefined(this.leaveCallback))this.leaveCallback();else{const q=st.q.instance.prodigy.world.zones[this.zoneName];q.resetCooldown(),q.exitDungeon()}this.close()}populatePageIcons(){for(let q=0;q=this.currentGoldenPages?this.instantiateTemplate("greyedPageGraphic",this.goldenPagesPanel):this.instantiateTemplate("goldenPageGraphic",this.goldenPagesPanel)}populateWarning(){this.maxGoldenPages===this.currentGoldenPages?this.instantiateTemplate("allPagesWarning",this.warningContainer):this.instantiateTemplate("missingPagesWarning",this.warningContainer)}}class oc extends sr.W{constructor(q,K,z,Y,Q){if(super(q,K,37,{},[ht.c.Sfx_results_screen,it._.Popup_ui_roulette_json]),this.prizeItems=[],this.closeButton=null,this.upperPrizesPanel=null,this.lowerPrizesPanel=null,this.dungeon=null,this.dungeon=st.q.instance.prodigy.world.zones[z],this.prizeDataID=Y,this.closeCallback=Q,this.dungeon.ID===mn.A_.ARCHIVES)this.prizeItems=Ln.Q.getWheelItems(q,this.prizeDataID);else{const q=Ee.t.getItem("itemTable",this.prizeDataID).data.items;for(let K=0;K{X.Aq$.isDefined(this.closeCallback)&&this.closeCallback(),this.close()};let q="",K="";this.dungeon.ID===mn.A_.ARCHIVES?(q="ARCHIVES_PRIZES_TITLE",K="ARCHIVES_PRIZES_MESSAGE"):(q="TOWER_PRIZES_TITLE",K="TOWER_PRIZES_MESSAGE"),this.ArchivesPrizesTitle.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(q,this.dungeon.name)),this.ArchivesMenuTitle.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(K,this.dungeon.name)),this.populatePrizes(this.prizeItems).catch(X.RQr.createHandler("DungeonPrizesMenu: Failed to populate prizes"))}populatePrizes(q){return(0,Q.sH)(this,void 0,void 0,(function*(){yield Promise.all(q.map(((q,K)=>(0,Q.sH)(this,void 0,void 0,(function*(){if(!q.item.type||void 0===q.item.ID)return void X.VyI.log(`DungeonPrizesMenu: Prize item missing type or ID: ${q.item.type}-${q.item.ID}`,X.$bb.Error);const z=yield Ee.t.secureGetItem(q.item.type,q.item.ID);z?yield this.addPrizeElement(z,K<4?this.upperPrizesPanel:this.lowerPrizesPanel,this.checkItemOwned(z)?"prizeItemPanel-owned":"prizeItemPanel"):X.VyI.log(`DungeonPrizesMenu: Failed to retrieve item data for prize ${q.item.type}-${q.item.ID}`,X.$bb.Error)})))))}))}addPrizeElement(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y=this.instantiateTemplate(z,K);Y.itemName.setText(q.data.name),Y[z].onClickCallback=this.viewPrizeInfo.bind(this,q);const Q=Y.prizeGraphic.width,X=Y.prizeGraphic.height,[Z,J]=yield st.q.instance.prodigy.icon.createFromDataAdvanced(q,Y.prizeGraphic,0,0,{x:.5,y:.5},.5*Q,.5*X);J&&(J.width=Q,J.height=X),Z.children.length>1&&(Z.x=-10,Z.y=-20,Z.getChildAt(1).x=10,Z.getChildAt(1).y=-25)}))}viewPrizeInfo(q){st.q.instance.prodigy.open.itemInfo(q,null,Wr.s.View)}checkItemOwned(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return"dorm"===q.type?K.hasHouseItem({type:q.type,ID:q.ID}):K.backpack.hasItem(q.type,q.ID)>0}}var hc=z(76974),cc=z(5269),dc=z(87392),lc=z(31091),uc=z(49237),fc=z(12420),bc=z(11472),pc=z(38181),vc=z(28152);let gc=class extends X.uAl{constructor(){super(...arguments),this._button=null,this._downStateText=null,this._overStateText=null,this._upStateText=null}get button(){return this._button}get downStateText(){return this._downStateText}get overStateText(){return this._overStateText}get upStateText(){return this._upStateText}};(0,Q.Cg)([(0,X.MnK)(uc.$),(0,Q.Sn)("design:type",uc.$)],gc.prototype,"_button",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],gc.prototype,"_downStateText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],gc.prototype,"_overStateText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],gc.prototype,"_upStateText",void 0),gc=(0,Q.Cg)([(0,X.EVk)("CustomKeyboardLetter")],gc);let mc=class extends X.uAl{constructor(){super(...arguments),this._alphabet=[],this._gridLayout=null,this._initializeOnCreate=!0,this.onButtonClicked=new X.HN0,this._customKeyboardLetters=[]}get alphabet(){return this._alphabet}get gridLayout(){return this._gridLayout}get initializeOnCreate(){return this._initializeOnCreate}create(){super.create(),this._initializeOnCreate&&this.initialize()}destroy(){super.destroy(),this.onButtonClicked&&this.onButtonClicked.dispose()}initialize(){const q=st.q.instance.prodigy.gameContainer.get("983-05a7");this.createLetterGameObjects(q,this._customKeyboardLetters,this._gridLayout)}setVisible(q){q&&this._customKeyboardLetters.forEach((q=>{q.button.transition.setState(hc.K.Up)})),this.GameObject.active=q}createLetterGameObjects(q,K,z){for(let Y=0;Y{st.q.instance.prodigy.audio.playSFX(18,"pop"),this.onButtonClicked.dispatch(this._alphabet[Y])})),K.push(Q)}}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",Array)],mc.prototype,"_alphabet",void 0),(0,Q.Cg)([(0,X.MnK)(X.JTA),(0,Q.Sn)("design:type",X.JTA)],mc.prototype,"_gridLayout",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],mc.prototype,"_initializeOnCreate",void 0),mc=(0,Q.Cg)([(0,X.EVk)("CustomKeyboard",vc.Y.uiInput)],mc);let yc=class extends X.uAl{constructor(){super(...arguments),this._backButton=null,this._chooseNameText=null,this._closeButton=null,this._customKeyboard=null,this._doneButton=null,this._nameGridLayout=null,this._nameText=null,this._noNameContainer=null,this._randomButton=null,this._scrollBar=null,this._scrollView=null,this._searchInput=null,this._titleText=null,this._youChoseText=null,this._headerText=null}get backButton(){return this._backButton}get chooseNameText(){return this._chooseNameText}get closeButton(){return this._closeButton}get customKeyboard(){return this._customKeyboard}get doneButton(){return this._doneButton}get nameGridLayout(){return this._nameGridLayout}get nameText(){return this._nameText}get noNameContainer(){return this._noNameContainer}get randomButton(){return this._randomButton}get scrollBar(){return this._scrollBar}get scrollView(){return this._scrollView}get searchInput(){return this._searchInput}get titleText(){return this._titleText}get youChoseText(){return this._youChoseText}get headerText(){return this._headerText}};(0,Q.Cg)([(0,X.MnK)(uc.$),(0,Q.Sn)("design:type",uc.$)],yc.prototype,"_backButton",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],yc.prototype,"_chooseNameText",void 0),(0,Q.Cg)([(0,X.MnK)(uc.$),(0,Q.Sn)("design:type",uc.$)],yc.prototype,"_closeButton",void 0),(0,Q.Cg)([(0,X.MnK)(mc),(0,Q.Sn)("design:type",mc)],yc.prototype,"_customKeyboard",void 0),(0,Q.Cg)([(0,X.MnK)(uc.$),(0,Q.Sn)("design:type",uc.$)],yc.prototype,"_doneButton",void 0),(0,Q.Cg)([(0,X.MnK)(X.JTA),(0,Q.Sn)("design:type",X.JTA)],yc.prototype,"_nameGridLayout",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],yc.prototype,"_nameText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yc.prototype,"_noNameContainer",void 0),(0,Q.Cg)([(0,X.MnK)(uc.$),(0,Q.Sn)("design:type",uc.$)],yc.prototype,"_randomButton",void 0),(0,Q.Cg)([(0,X.MnK)(fc.$),(0,Q.Sn)("design:type",fc.$)],yc.prototype,"_scrollBar",void 0),(0,Q.Cg)([(0,X.MnK)(bc.B),(0,Q.Sn)("design:type",bc.B)],yc.prototype,"_scrollView",void 0),(0,Q.Cg)([(0,X.MnK)(pc.S),(0,Q.Sn)("design:type",pc.S)],yc.prototype,"_searchInput",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],yc.prototype,"_titleText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],yc.prototype,"_youChoseText",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],yc.prototype,"_headerText",void 0),yc=(0,Q.Cg)([(0,X.EVk)("FirstNameSelectorPrefab")],yc);class _c extends sr.W{constructor(q,K,z,Y=!1){super(q,K,200,{},[it._.Ui_store_json,it._.Ui_bam_json,it._.Popup_ui_roulette_json,it._.Ui_registration_json,it._.Ui_raster_icons_json,it._.Ui_raster_pets_menu_json,ht.c.Sfx_book_open,ht.c.Sfx_adding_pet_to_team]),this.prefabRoot=null,this._prefabLoader=null,this._localizer=null,this._selectedFirstNameID=null,this._selectedCell=null,this._firstNameCells=[],this._nameSelected=!1,this._fromStylistShop=!1,this._autoClick={},this.onClose=z,this._fromStylistShop=Y}create(){super.create(),this._prefabLoader=st.q.instance.prodigy.gameContainer.get("983-05a7"),this._localizer=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),this._activePlayer=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,this._menuGameObject=this._prefabLoader.loadFromGUID(Pi.l.FirstNameSelector),this.prefabRoot.addChild(this._menuGameObject.legacyTransform.group),this._menuPrefab=this._menuGameObject.findComponentInChildren(yc),this._menuPrefab.customKeyboard.onButtonClicked.add(this.showNamesThatStartWithX,this),this.setUpButtons(),this.setUpSearchBar(),this.updateScrollView(),this.standardView(),st.q.instance.prodigy.audio.playSFX(64,"book-open")}destroy(){var q,K;null===(K=null===(q=this._menuPrefab)||void 0===q?void 0:q.customKeyboard)||void 0===K||K.onButtonClicked.remove(this.showNamesThatStartWithX,this),super.destroy()}setUpButtons(){this._menuPrefab.backButton.onClick.add((()=>{st.q.instance.prodigy.audio.playSFX(18,"pop"),this.back()})),this._menuPrefab.randomButton.onClick.add((()=>{st.q.instance.prodigy.audio.playSFX(18,"pop"),this.random()})),this._menuPrefab.doneButton.onClick.add((()=>{this.done()})),this._menuPrefab.doneButton.lockState(hc.K.Disabled),this._fromStylistShop&&this._menuPrefab.closeButton.onClick.add((()=>{st.q.instance.prodigy.audio.playSFX(18,"pop"),this.onClose=null,this.close()})),this._menuPrefab.closeButton.GameObject.active=this._fromStylistShop}setUpSearchBar(){this._menuPrefab.searchInput.enablePerKeyEvents(!0),this._menuPrefab.searchInput.onTextChanged.add(this.showNamesBasedOnSearch,this),this._menuPrefab.searchInput.onClear.add(this.showNamesBasedOnSearch,this)}onNameSelected(q,K,z){this._selectedCell!==z&&(this._selectedCell&&(this._selectedCell.lockToggle(!1),this._selectedCell.setSelected(!1)),this._selectedCell=z,this._selectedCell.lockToggle(!0),this._selectedFirstNameID=K,this._menuPrefab.chooseNameText.GameObject.active=!1,this._menuPrefab.youChoseText.GameObject.active=!0,this._menuPrefab.nameText.GameObject.active=!0,this._menuPrefab.nameText.text=q,this._nameSelected||(this._menuPrefab.doneButton.unlockState(),this._menuPrefab.doneButton.transition.setState(hc.K.Up),this._nameSelected=!0))}populateScrollView(q){let K=dc.f.getFilteredFirstNames();if(K=K.filter((K=>K.data.name.substring(0,q.length).toUpperCase()===q.toUpperCase())),this._firstNameCells.length=0,K.length>0){const q=this._menuPrefab.nameGridLayout.GameObject;this._menuPrefab.noNameContainer.active=!1;for(let z=0;z=0;K--)q[K].destroy();this._menuPrefab.nameGridLayout.update()}standardView(){this._menuPrefab.backButton.GameObject.active=!1,this._menuPrefab.customKeyboard.setVisible(!0),this._menuPrefab.scrollView.GameObject.active=!1,this._menuPrefab.noNameContainer.active=!1,this._menuPrefab.searchInput.setVisible(this.shouldShowInput()),this._menuPrefab.titleText.GameObject.active=!this.shouldShowInput(),this._menuPrefab.titleText.text=this._localizer.getText("FIRST_NAME_SELECTOR_TITLE_DEFAULT"),this._menuPrefab.headerText.GameObject.active=!0}startingLetterView(q){this._menuPrefab.customKeyboard.setVisible(!1),this._menuPrefab.searchInput.setVisible(!1),this._menuPrefab.scrollView.GameObject.active=!0,this._menuPrefab.backButton.GameObject.active=!0,this._menuPrefab.backButton.transition.setState(hc.K.Up),this._menuPrefab.titleText.GameObject.active=!0,this._menuPrefab.titleText.text=this._localizer.getText("FIRST_NAME_SELECTOR_TITLE_LETTER").replace("%LETTER%",q),this._menuPrefab.headerText.GameObject.active=!1}searchView(){this._menuPrefab.customKeyboard.setVisible(!1),this._menuPrefab.scrollView.GameObject.active=!0,this._menuPrefab.backButton.GameObject.active=!1,this._menuPrefab.searchInput.setVisible(!0),this._menuPrefab.titleText.GameObject.active=!1,this._menuPrefab.headerText.GameObject.active=!1}showNamesThatStartWithX(q){this.cleanUpExistingNameObjects(),this.startingLetterView(q),this.populateScrollView(q),this.updateScrollView()}showNamesBasedOnSearch(){""===this._menuPrefab.searchInput.text?this.standardView():(this.cleanUpExistingNameObjects(),this.searchView(),this.populateScrollView(this._menuPrefab.searchInput.text)),this.updateScrollView()}updateScrollView(){this._menuPrefab.scrollView.scrollToPercent(0,cc.H.Vertical),this._menuPrefab.scrollBar.scrollToPercent(0),this._menuPrefab.scrollView.updateScrollEnabled(cc.H.Vertical)}close(){this._firstNameCells.length=0,this._menuGameObject.destroy(),super.close()}done(){var q;this._nameSelected?(st.q.instance.prodigy.audio.playSFX(61,"add-pet"),wh.A.displayToolTipAuto(null,null,{bodyText:this._localizer.getText("NAME_CHANGE_SUCCESS"),xPosition:635,yPosition:100}),this._activePlayer.appearance.getName().setFirstName(this._selectedFirstNameID),this._activePlayer.appearance.updated=!0,this._activePlayer.name.init(this._activePlayer.appearance.getName()),null===(q=this._activePlayer.playerContainer)||void 0===q||q.showName(),this.close()):(st.q.instance.prodigy.audio.playSFX(18,"pop"),st.q.instance.prodigy.open.overlayToolTip(wh.A.TOOLTIP_MANUAL,{bodyText:this._localizer.getText("FIRST_NAME_SELECT_CHOOSE_NAME"),xPosition:950,yPosition:533,arrowDirection:Kr.i.DOWN}))}back(){this.standardView(),this.updateScrollView()}random(){this._selectedCell&&(this._selectedCell.lockToggle(!1),this._selectedCell.setSelected(!1)),this._menuPrefab.chooseNameText.GameObject.active=!1,this._menuPrefab.youChoseText.GameObject.active=!0,this._menuPrefab.nameText.GameObject.active=!0;const q=Wa.C.getRandomFirstName();this._selectedFirstNameID=q;const K=Ee.t.getItem("name",q).data.value.toString();this._menuPrefab.nameText.text=K,this._firstNameCells.some((z=>{if(z.getName()===K)return z.setSelected(!0),this.onNameSelected(K,q,z),!0})),this._nameSelected||(this._menuPrefab.doneButton.unlockState(),this._menuPrefab.doneButton.transition.setState(hc.K.Up),this._nameSelected=!0)}}var Ec=z(92579);class wc{static createSocialStatusIcons(q){const K=st.q.instance.game.renderer;return Object.keys(wc.SOCIAL_STATUS_RENDER_PARAMS).reduce(((z,Y)=>{const Q=wc.SOCIAL_STATUS_RENDER_PARAMS[Y],X=Math.floor(q*wc.SOCIAL_STATUS_ICON_RESOLUTION),Z=wc.SOCIAL_STATUS_ICON_RESOLUTION,J=X+Z<<1,et=(new tt.Graphics).lineStyle(Z,Q.strokeColor).beginFill(Q.fillColor).drawCircle(X+Z,X+Z,X).endFill(),it=tt.RenderTexture.create({scaleMode:tt.SCALE_MODES.LINEAR,width:J,height:J});return K.render(et,{renderTexture:it}),z[Y]=it,z}),{})}static getSocialStatusText(q){return this._localizer.getText(wc.SOCIAL_STATUS_RENDER_PARAMS[q].locKey)}}wc.SOCIAL_STATUS_ICON_RESOLUTION=2,wc.SOCIAL_STATUS_RENDER_PARAMS={[Ec.a.available]:{fillColor:1429577,strokeColor:811284,locKey:"USER_SOCIAL_STATUS_AVAILABLE"},[Ec.a.offline]:{fillColor:10461087,strokeColor:4934475,locKey:"USER_SOCIAL_STATUS_OFFLINE"},[Ec.a.unavailable]:{fillColor:16762624,strokeColor:11962126,locKey:"USER_SOCIAL_STATUS_UNAVAILABLE"}},(0,Q.Cg)([(0,Ge.b)(X.$Bt.LocalizationService,!1),(0,Q.Sn)("design:type",X.dTp)],wc,"_localizer",void 0);class Tc extends sr.W{constructor(q,K){super(q,K,14,Tc.configModifiers,[it._.Ui_shared_json,it._.Ui_forest_progress_json,it._.Ui_shipwreck_progress_json,it._.Ui_shiverchill_progress_json]),this.friendCellList=[],this.friendsList=[],this.classList=[],this.friendRequestList=[],this._playerStatusMeta=[],q.broadcaster.addAppListener(gi.sd.RequestCancelled,this.onListUpdate.bind(this),this,"FriendsList"),q.broadcaster.addAppListener(gi.sd.FriendRemoved,this.onListUpdate.bind(this),this,"FriendsList"),q.broadcaster.addAppListener(gi.sd.RequestAccepted,this.onListUpdate.bind(this),this,"FriendsList"),q.broadcaster.addAppListener(gi.sd.RequestRejected,this.onListUpdate.bind(this),this,"FriendsList"),this.currentInterfaceName=Ah.B.FriendsList,this._socialStatusIcons=wc.createSocialStatusIcons(9)}create(){this.fireInterfaceEvent({originType:Si.$N.ButtonClick,originID:Xh.k.Friend}),super.create()}preprocess(){this.getLists(),this.queuePostCreateCallback(this.fillView.bind(this,this.friendsList),this.setButtons.bind(this))}update(){super.update(),this._socialStatusIcons&&this.refreshPlayerStatuses()}onListUpdate(){this.getLists(),this.setButtons(),this.fillView(this.friendsList,!1)}getLists(){st.q.instance.prodigy.friendsListNetworkHandler.getFriendRequestList(0,st.q.instance.prodigy.friendsListNetworkHandler.getFriendsCap()).then((()=>{this.updateFriendRequestList()})),st.q.instance.prodigy.friendsListNetworkHandler.getUserAppearance(st.q.instance.prodigy.friendsListNetworkHandler.classList,!0),this.friendsList=st.q.instance.prodigy.friendsListNetworkHandler.friendsList,this.classList=st.q.instance.prodigy.friendsListNetworkHandler.classList,this.updateFriendRequestList()}updateFriendRequestList(){this.friendRequestList=st.q.instance.prodigy.friendsListNetworkHandler.friendRequestList,this.requestsButton&&(this.requestsButton.visible=this.friendRequestList.length>0)}setButtons(){const q=this.titleBanner,K=q.text;q.setText(this._localizer.getText("FRIENDS_LIST_TITLE"));const z=K.width+70-q.width;z>0&&(q.width+=z,q.x=q.parent.width-q.width>>1,K.scale.x=1/q.scale.x,K.x=q.width-K.width/K.scale.x>>1,K.y=q.height-K.height>>1),this.friendText.setText(this._localizer.getText("FRIENDS_LIST_FRIENDS_BUTTON")),this.classmatesText.setText(this._localizer.getText("FRIENDS_LIST_CLASSMATES_BUTTON")),this.closeButton.onClickCallback=q=>{this.fireButtonEvent({buttonName:Xh.k.X,destinationName:st.q.instance.prodigy.world.getCurrentZone()}),this.close(q)},this.friendButton.onUpCallback=this.fillView.bind(this,this.friendsList),this.classmatesButton.onUpCallback=this.fillView.bind(this,this.classList,!0),this.requestsButton.onUpCallback=st.q.instance.prodigy.open.friendRequests.bind(st.q.instance.prodigy.open,this.preprocess.bind(this)),this.updateFriendRequestList()}setupScrollBar(){this.friendScrollView.linkScrollBar(this.friendScrollBar),this.friendScrollView.setToScrollPercent(0)}fillView(q,K=!1){this.friendButton.setActive(K),this.classmatesButton.setActive(!K),this.clearScrollView(),Z.remove(q,(q=>!X.Aq$.isDefined(q.appearance)||!X.Aq$.isDefined(Z.get(q,"data.level",null))));const z=Z.sortBy(Z.map(q,(q=>{const K=new Be.a(this.game);return K.init(q),{player:K,status:q.status}})),(q=>q.player.getNameWithoutNickname()));for(let Y=0;Y=3){const q=Q[Q.length-1];Z="";for(let K=0;K{var q;st.q.instance.prodigy.open.card(st.q.instance.prodigy.friendsListNetworkHandler.getFriend(z[Y].player.userID),!1,null===(q=this._playerStatusMeta.find((q=>q.userId===z[Y].player.userID)))||void 0===q?void 0:q.status)},this.friendCellList.push(q)}this.friendContents.layoutElement.calculateChildren(),this.friendScrollView.setupVisibleIndices(),this.friendScrollView.calculateMaxScrollDist(),this.setupScrollBar(),z.length<=0&&(K?this.noFriendsText.setText(this._localizer.getText("UI_ZONE_NO_CLASSMATES")):this.noFriendsText.setText(this._localizer.getText("UI_ZONE_NO_FRIENDS"))),this.noFriendsElement.visible=z.length<=0,this.friendScrollBar.visible=z.length>2,this.fireTabEvent({tabName:q===this.classList?"classmatesButton":"friendButton"}),this._socialStatusIcons&&this.refreshPlayerStatuses(!0)}clearScrollView(){this.friendScrollView.clearScrollView(),this._playerStatusMeta=[],this.friendCellList=[],this.setupScrollBar()}refreshPlayerStatuses(q=!1){if(X.Aq$.isDefined(this._playerStatusRefreshPromise))return;if(!q&&Date.now()>this._lastPlayerStatusRefresh+1e3)return;const K=Z.uniq([...this.friendsList.map((q=>`${q.userID}`)),...this.classList.map((q=>`${q.userID}`))]);0!==K.length&&(this._playerStatusRefreshPromise=this._synapse.getFriendsStatuses(K),this._playerStatusRefreshPromise.then((q=>{var K;for(const z of this._playerStatusMeta){const Y=null!==(K=q[`${z.userId}`])&&void 0!==K?K:Ec.a.offline;Y!==z.status&&(z.sprite.texture=this._socialStatusIcons[Y],z.text.text=wc.getSocialStatusText(Y),z.text.position.set(-24-z.text.width,1),z.container.visible=!0,z.status=Y)}})).finally((()=>{this._lastPlayerStatusRefresh=Date.now(),this._playerStatusRefreshPromise=null})))}close(q){this.game.broadcaster.removeAppListener(gi.sd.RequestCancelled,this,"FriendsList"),this.game.broadcaster.removeAppListener(gi.sd.FriendRemoved,this,"FriendsList"),this.game.broadcaster.removeAppListener(gi.sd.RequestAccepted,this,"FriendsList"),this.game.broadcaster.removeAppListener(gi.sd.RequestRejected,this,"FriendsList"),null==q||q(),this.fireInterfaceEvent({closeMethod:Si.Lv.X}),super.close()}}Tc.FRIEND_PANEL_WIDTH=375,Tc.FRIEND_PANEL_PADDING=7,Tc.configModifiers={},(0,Q.Cg)([(0,Ge.b)("b0c-9016"),(0,Q.Sn)("design:type",ze.d)],Tc.prototype,"_synapse",void 0),(0,Q.Cg)([(0,Ge.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Tc.prototype,"_localizer",void 0);var Sc=z(44357),Ac=z(4324);class Cc extends sr.W{constructor(q,K,z){super(q,K,42,{},[ct.Q.Spine_academygh_addkeystone_json]),this.closeButton=null,this.keystonesContainer=null,this.allPlacedText=null,this.localizer=null,this.academyZone=null,this.localizer=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),this.setCloseCallback(z),this.academyZone=st.q.instance.prodigy.world.getZone(mn.A_.ACADEMY)}create(){super.create(),this.closeButton.onUpCallback=()=>{st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:Ah.B.KeystonePopup,interfaceType:Si.Wm.Menu,closeMethod:Si.Lv.CloseButton}),this.close()};const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=Fn.N.getAllTowerData();for(let z=0;z0;if(X.Aq$.isDefined(et)&&et!==Fn.s.None){const q=Mr.j.createRenderer(ct.Q.Spine_academygh_addkeystone_json,{type:"spine"});q.playAnimation(`keystone-idle-${Y.keystone.zone}`,!0),new Dr._(this.game,Z[Q],[q],1,3),tt.setText(this.localizer.getText("KEYSTONE_UNLOCKED"))}else this.allPlacedText.visible=!1,J.tint=5789784,J.inputEnabled=!0,it?(Z[Q].highlight(!0,-60,-35),J.tint=15132390,tt.setText(this.localizer.getText("KEYSTONE_READY")),J.events.onInputUp.add((()=>{this.placeOnPedestal(Y.keystone,Y.element).catch(X.RQr.createHandler(`Error placing ${Y.element} keystone`))}))):(tt.setText(""),J.events.onInputUp.add((()=>{this.popupMessage(this.localizer.getText("KEYSTONE_PEDESTAL_NOT_FOUND"))})))}st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:Ah.B.KeystonePopup,interfaceType:Si.Wm.Menu})}placeOnPedestal(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this.academyZone.anyKeystonesPlaced()){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.set("keystones-first",Object.assign({element:K},q)),st.q.instance.prodigy.gameContainer.get("20f-5f67").academyTowers.sendFunnelEvent({funnelName:"academy_towers",funnelType:"story",step:Kn.D.FirstKeystonePlaced},K)}this.close(),st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:Ah.B.KeystonePopup,interfaceType:Si.Wm.Menu,closeMethod:Si.Lv.KeystonePlaced});const z=st.q.instance.prodigy.world.getZone(mn.A_.ACADEMY).getMap("GH2");Sc.QQ(this.game,!1),Ac.k.setGuideHandActive(!1),yield Ac.k.placeKeystone(this.game,z.screen,q,K),Sc.QQ(this.game,!0)}))}popupMessage(q){const K=this.localizer.getText("BUTTON_OKAY_UPPERCASE");st.q.instance.prodigy.open.messageBoxOkay(q,K,null)}}class Oc extends sr.W{constructor(q,K,z,Y=null,Q){super(q,K,45,X.Aq$.isDefined(Q)?Q:{},[it._.Popup_ui_roulette_json]),this.skipButton=null,this.watchButton=null,this.openVideoCallback=null,this.onClose=Y,this.openVideoCallback=z}create(){super.create(),this.skipButton.onUpCallback=()=>{this.close()},this.watchButton.onUpCallback=()=>{this.openVideo()}}openVideo(){X.Aq$.isDefined(this.openVideoCallback)&&(this.onClose=null,this.openVideoCallback()),this.close()}}var Ic=z(25983);class Dc extends sr.W{constructor(q,K,z,Y,Q){super(q,K,200,void 0,[]),this.onPrefabLoaded=new X.HN0,this._confirmCallback=null,this._closeCallback=null,this._skipCloseCallback=!1,this._confirmCallback=Y,this._closeCallback=Q,this._zoneData=z}create(){super.create(),st.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(Pi.l.MapLocationDialog).then((q=>{var K;this._ui=q,this._ui.onDestroy.add(this.destroy,this),null===(K=this._rearOverlay)||void 0===K||K.destroy(),this.configure(this._ui)}))}setSkipCallback(){this._skipCloseCallback=!0}close(){var q;this._skipCloseCallback||null===(q=this._closeCallback)||void 0===q||q.call(this),this._ui.destroy(),this.onPrefabLoaded.dispose(),this._skipCloseCallback=!1,super.close()}configure(q){var K;if(null===(K=this._zoneData)||void 0===K?void 0:K.useLocationDialogPrefab){const K=q.findComponent(Ic.s),z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Y=Na.i.isZoneLocked(this._zoneData.zone);Y?K.showOneButton(this._zoneData.splashImage,this._zoneData.getLockName(),this._zoneData.getLockMessage(),z.getText("BUTTON_OKAY_CAPITAL"),Y):K.showTwoButton(this._zoneData.splashImage,this._zoneData.getName(),this._zoneData.getSummary(),z.getText("NOT_NOW"),this._zoneData.getGoButtonText(),Y),K.onClose.addOnce((()=>{var q;null===(q=this._closeCallback)||void 0===q||q.call(this),this._ui.destroy(),this.destroy()})),K.onConfirm.addOnce((()=>{var q;null===(q=this._confirmCallback)||void 0===q||q.call(this)})),this.onPrefabLoaded.dispatch(this._ui)}}}var Rc=z(11117);class Pc extends sr.W{constructor(q,K,z){super(q,K,51,{},[it._.Popup_ui_roulette_json,it._.Npc_face_noot_json,it._.Popup_member_modular_json]),this.okayButton=null,this.setCloseCallback(z)}create(){super.create(),st.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelQuit("At-School-Dialog","At-School"),this.okayButton.onUpCallback=()=>{this.close()}}setUIConfig(q){}}var Mc=z(31211),Nc=z(91315),xc=z(53452);class Lc extends sr.W{constructor(q,K,z){super(q,K,4,z),this.mailData=null,this.attachments=[],this.attachmentImageID=0,this.shouldRenderAttachments=!0,this._externalMethods=null,this.closeButton=null,this.titleText=null,this.bodyText=null,this.imageContainer=null,this.imageLoader=null,this.loadingSpinner=null,this.actionButtonText=null,this.actionButtonContainer=null,this.actionButton=null,this.attachmentContainer=null,this.content=null,this.woodBackground=null,this.deleteMailCallback=null,q.broadcaster.addAppListener(gi.zr.MarkAsRead,this.markAsReadFailed,this,gi.HG.Mailer),this._externalMethods=st.q.instance.prodigy.gameContainer.get("075-0f78")}preprocess(q){this.mailData=q,"noImage"!==q.image&&(Nn.J.isGuid(q.image)?this.preloadLocalMailImage(q.image):this.addImageToAssets(q.image,q.vImage)),this.queuePostCreateCallback((()=>{this.tweenLoader(),this.renderMenu(),this.closeButton.onClickCallback=this.close.bind(this)})),q.isOpened||this.isSingleUse()||this.queuePostCreateCallback((()=>{this.game.broadcaster.broadcast(gi.zr.MarkAsRead,gi.HG.MailView,[()=>{this.markReadSuccess()},this.mailData])}))}close(){this.game.broadcaster.removeAppListener(gi.zr.MarkAsReadFailure,this,gi.HG.Mailer),this.game.broadcaster.removeAppListener(gi.zr.MarkAsRead,this,gi.HG.Mailer),super.close(),this.destroy()}setDeleteMailCallback(q){this.deleteMailCallback=q}markReadSuccess(){if(!this.matchGameMethod(this._externalMethods.openGiftBox.functionName))if(xc.b.isDebugMailData(this.mailData)){const q=this.mailData.attachments;X.Aq$.isDefined(q)&&q.length>0&&st.q.instance.prodigy.open.gotItem(q,null,null,"mail-open",null,null,{source_type:On.C.Container})}else{st.q.instance.prodigy.gameContainer.get("cc0-46e9").collectMailRewards(this.mailData).then((q=>{const K=xc.b.mergeSecureUnsecure(q.rewards,q.unsecuredRewards);X.Aq$.isDefined(K)&&K.length>0&&st.q.instance.prodigy.open.gotItem(K,null,null,"mail-open",null,null,{source_type:On.C.Container})})).catch((q=>{const K=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);st.q.instance.prodigy.open.message(K.getText("ERROR_DIALOG_BODY"))}))}}markAsReadFailed(){if(X.Aq$.isDefined(this.game)){const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);st.q.instance.prodigy.open.message(q.getText("MAIL_UNAVAILABLE"),this.closeOnFailed.bind(this),null,q.getText("MESSAGE_TITLE_OOPS"))}}renderMenu(){this.titleText.setText(this.mailData.subject.toUpperCase()),this.bodyText.setText(this.mailData.message),this.renderImages(),this.renderCheckItOutButton(),this.renderAttachments(),this.resize()}renderImages(){if("noImage"===this.mailData.image)return;const q=this.mailData.image.length>0?this.mailData.image:br.q.Letter_mail_open_image;st.q.instance.prodigy.create.sprite(Math.floor(this.imageContainer.width/2),Math.floor(this.imageContainer.height/2),q,null,{x:.5,y:.5},this.fixImage.bind(this),null,null)}tweenLoader(){if("noImage"===this.mailData.image)return this.imageContainer.destroy(),void this.resize();this.imageLoader.image.pivot.x=.5,this.imageLoader.image.pivot.y=.5,this.imageLoader.image.anchor.x=.5,this.imageLoader.image.anchor.y=.5,this.imageLoader.image.x+=.5*this.imageLoader.width,this.imageLoader.image.y+=.5*this.imageLoader.height,this.loadingSpinner=this.game.add.tween(this.imageLoader.image,this).to({angle:360},2e3,X.GS3.Linear.None,!0,0,te.s.MAX_SAFE_INTEGER,!1)}fixImage(q){X.Aq$.isDefined(this.loadingSpinner)&&(st.q.instance.game.tweens.remove(this.loadingSpinner),this.loadingSpinner=null),this.imageLoader.visible=!1;const K=this.imageContainer.width-40;if(this.imageContainer.add(q),q.smoothed=!0,q.y=.5*this.imageContainer.height,q.width>K){const z=1-(q.width-K)/K;q.scale.x=z,q.scale.y=z}this.resize()}renderCheckItOutButton(){var q;if(X.Aq$.isDefined(this.mailData.gameMethod)&&this._externalMethods.doesFunctionExist(this.mailData.gameMethod.name)){const K=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this.matchGameMethod(this._externalMethods.openGiftBox.functionName)?X.Aq$.isDefined(this.actionButtonText)&&(this.actionButtonText.setText(K.getText("MAIL_CLICK_TO_OPEN")),(null===(q=this.mailData.attachments)||void 0===q?void 0:q.length)>0&&this.actionButtonText.setText(K.getText("MAIL_OPEN_MY_BOX"))):this.matchGameMethod(this._externalMethods.openMembershipSignUp.functionName)&&this.actionButtonText.setText(K.getText("MAIL_BECOME_A_MEMBER")),X.Aq$.isDefined(this.mailData.gameMethod.buttonText)&&""!==this.mailData.gameMethod.buttonText&&this.actionButtonText.setText(this.mailData.gameMethod.buttonText.toUpperCase()),this.isSingleUse()&&(this.shouldRenderAttachments=!1),this.actionButtonContainer.visible=this.shouldShowActionButtonContainer(),this.actionButton.onClickCallback=this.runMailAction.bind(this,this.mailData.gameMethod)}else this.actionButtonContainer.visible=!1}isSingleUse(){return xc.b.isSingleUse(this.mailData)}shouldShowActionButtonContainer(){return!(this.mailData.isOpened&&this.isSingleUse()||this.mailData.isCollected)}matchGameMethod(q){return xc.b.mailHasGameMethod(this.mailData,q)}renderAttachments(){var q;if(!this.shouldRenderAttachments)return void this.attachmentContainer.destroy();this.attachmentImageID=0;const K=this.attachmentContainer;for(let z=0;z<(null===(q=this.mailData.attachments)||void 0===q?void 0:q.length);z++){const q=this.instantiateTemplate("attachmentItem",K);this.attachments.push(q);const Y=this.mailData.attachments[z],Q=st.q.instance.prodigy.icon.iconKey(Y);st.q.instance.prodigy.icon.createIcon(Math.floor(.5*q.attachmentItem.width),Math.floor(.5*q.attachmentItem.height)-3,Q,{x:.5,y:.5},(q=>{this.attachments[this.attachmentImageID++].attachmentImage.add(q)})),X.Aq$.isDefined(Y.N)&&Y.N>1&&(q.amount.visible=!0,q.amount.setText(Y.N.toString()))}this.attachments.length<=0&&this.attachmentContainer.destroy()}runMailAction(q){this.matchGameMethod(this._externalMethods.openGiftBox.functionName)?this.mailData.isOpened||(this.actionButtonContainer.visible=!1,st.q.instance.prodigy.gameContainer.get("20f-5f67").container.sendContainerOpenedEvent(Si.ZF.MonthlyMemberBox,null,Li.N.OpenWorld)):this.actionButtonContainer.visible=this.shouldShowActionButtonContainer(),this._externalMethods.runFunction(q.name,q.params,this.mailData.attachments,this.mailData,[()=>{this.close()},this.deleteMailCallback])}resize(){this.content.layoutElement.calculateChildren();const q=this.content.layoutElement.getContentHeight()+30;this.woodBackground.resize(this.woodBackground.width-20,q),this.woodBackground.y=Math.floor((this.game.height-q)/2)}closeOnFailed(){this.game.broadcaster.broadcast(gi.zr.CloseList,gi.HG.Mailer),this.close()}preloadLocalMailImage(q){Object.values(br.q).includes(q)?st.q.instance.prodigy.load.assets(q):X.VyI.log(`Could not find local image with GUID: ${q} in ESingleImageGameAssets.`,X.$bb.Error)}addImageToAssets(q,K=1){const z={};z[q]={type:"singleImage",v:X.Aq$.isDefined(K)&&K>0?K:1},st.q.instance.prodigy.assets.assignAssets(z)}}const kc={XP_BONUS:{frameName:"small-star-boost",trackingEvent:"XPBonus-Icon-Click"},BUDDY_FOX:{frameName:"get-fox-buddy",trackingEvent:"Buddy-Icon-Click"},BUDDY_SPARKLE_PUP:{frameName:"get-sparkle-pup-buddy",trackingEvent:"Buddy-Icon-Click"},FIREWORKS:{frameName:"get-free-fireworks",trackingEvent:"Fireworks-Icon-Click"},TRACKING_EVENT_MOBILE:"Mobile-Message-Displayed",TRACKING_EVENT_SIGN_UP:"Signup-Button-Click",TRACKING_EVENT_PLAY_ONLY:"Signup-Button-Play",TRACKING_EVENT_LINK_PARENT:"Signup-Button-LinkParent",TRACKING_EVENT_POPUP_SHOWN:"Popup-Shown",TRACKING_EVENT_SCHOOL_HOURS:"School-Hours-Message-Displayed",TRACKING_EVENT_RECEIVED_REWARDS:"Parent-Benefits-Rewards-Received",MESSAGE_MOBILE:"PARENT_LINK_MOBILE_MESSAGE",MESSAGE_POST_CLICK:"PARENT_LINK_POST_CLICK",MESSAGE_SCHOOL_HOURS:"PARENT_LINK_SCHOOL_HOURS",ATLAS:it._.Popup_parent_link_json,DESCRIPTION_TEXT_BG_HEIGHT_PERCENT:.25,REWARD_ICONS_BG_HEIGHT_PERCENT:.5,LINK_ACCOUNT_BG_HEIGHT_PERCENT:.88,CLOSE_BTN_OFFSET:{x:-10,y:10},BODY_TEXT_OFFSET:{x:40,y:0},ICON_TWEEN_TIME_MS:125,ICON_TWEEN_DELAY_MS:125,ICON_TWEEN_AMOUNT_Y:20,SUCCESS_POPUP_CONFIG:{headerText:"PARENTAL_LINK_TITLE_SUCCESS",bodyText:"PARENT_LINK_SUCCESS_BODY",showCloseButton:!1},AT_SCHOOL_POPUP_CONFIG:{headerText:"PARENTAL_LINK_TITLE",bodyText:"PARENTAL_LINK_CONTENT_SCHOOL",showCloseButton:!0}};var Bc=z(71586);class Uc extends sr.W{constructor(q,K,z,Y,Q){super(q,K,26,void 0,[it._.Ui_common_neutral_json,it._.Popup_ui_roulette_json,it._.Ui_store_json]),this.popupConfig=null,this.onRewardIconClickCallback=null,this.onContinueCallback=null,this.onCloseCallback=null;st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.parentalLink=!0,this.onContinueCallback=Q,this.onCloseCallback=Y,this.popupConfig=z,this.onRewardIconClickCallback=null,super.queuePostCreateCallback((()=>{this.setupMenu()}))}setupMenu(){const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);switch(this.popupConfig){case kc.AT_SCHOOL_POPUP_CONFIG:this.instantiateTemplate("atSchoolContainer",this.findUIElement("buttonTemplateContainer")).playAtSchoolButton.onClickCallback=()=>{this.onContinueClick()};break;case kc.SUCCESS_POPUP_CONFIG:this.instantiateTemplate("successContainer",this.findUIElement("buttonTemplateContainer")).okayButton.onClickCallback=()=>{this.onOkayClick()}}this.popupConfig.showCloseButton&&(this.findUIElement("closeButton").visible=!0,this.findUIElement("closeButton").onClickCallback=()=>{X.Aq$.isDefined(this.onCloseCallback)&&this.onCloseCallback(),this.close()}),this.findUIElement("bannerText").setText(q.getText(this.popupConfig.headerText)),this.findUIElement("contentText").setText(q.getText(this.popupConfig.bodyText)),this.renderFeatureIcons(0,this.findUIElement("woodBackground"))}renderFeatureIcons(q,K,z=3,Y=40,Q=80){const Z=[kc.XP_BONUS,kc.BUDDY_SPARKLE_PUP,kc.FIREWORKS];for(let J=q;J{this.onRewardIconClickCallback(z.trackingEvent)}:null,et=st.q.instance.prodigy.create.button(K,(Y+170)*(J-q)+Q,205,kc.ATLAS,z.frameName,tt);this.popupConfig===kc.AT_SCHOOL_POPUP_CONFIG&&et.setInactive(16777215)}}onOkayClick(){const q=()=>{X.Aq$.isDefined(this.onCloseCallback)&&this.onCloseCallback(),this.close(),wh.A.displayToolTipAuto(null,null,{bodyText:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("PARENTAL_LINK_TITLE_SUCCESS"),xPosition:635,yPosition:100})};0===st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("follow",34)?st.q.instance.prodigy.open.gotItem([{type:"follow",ID:34,N:1},{type:"item",ID:76,N:10}],q,null,"parental-link"):q()}onContinueClick(q=null){X.Aq$.isDefined(this.onContinueCallback)&&this.onContinueCallback();const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.popupConfig===kc.AT_SCHOOL_POPUP_CONFIG?K.data.atSchoolTimestamp=Bc.R.getDateTime():K.data.atHomeTimestamp=Bc.R.getDateTime(),this.close()}static isInfoRequired(q){return!q.parentalLink&&!Nn.J.isSchoolHours()&&!q.hasValidatedParentEmail()&&q.hasCompletedTutorial()}static isSuccessRequired(q){return q.hasValidatedParentEmail()&&q.hasCompletedTutorial()&&q.backpack.hasItem("follow",34)<=0}}class Fc extends sr.W{constructor(q,K){super(q,K,40,{},[it._.Popup_ui_roulette_json,it._.Ui_shared_json])}create(){super.create();const q=st.q.instance.prodigy.gameContainer.get("774-4659");this.findUIElement("backButton").onUpCallback=()=>{this.close()},this.findUIElement("loginButton").onUpCallback=()=>{q.logout()}}}var Gc=z(39984),jc=z(99183);class $c extends jc.k{constructor(q,K,z,Y,Q,Z,J,tt,et=!0){super(q,K,z,Y,Q,Z,J,103,[it._.Ui_raster_icons_json,it._.Ui_raster_icons_json,br.q.Ui_pet_xp_sunburst_white],tt,et),this._eligibleCreaturesForBoost=[],this._nonEligibleCreatures=[],this._onElementsInstantiated=new X.HN0,this._multiplier=xi.c.instance.getBoostMultiplier(),this.currentCreatures&&(this._eligibleCreaturesForBoost=this.currentCreatures.filter((q=>q instanceof Ta.R&&xi.c.instance.getEligiblePetIDs().includes(q.data.ID))),this._nonEligibleCreatures=this.currentCreatures.filter((q=>!this._eligibleCreaturesForBoost.includes(q))),this.queuePostCreateCallback(this.instantiateElements.bind(this)),this._onElementsInstantiated.addOnce((()=>{this._onElementsInstantiated.dispose(),this.changeSunburstBackgroundTint(16772830,16706454),this.createCreatureDisplays(),this.addXPBarMultiplierPill(),this.setStarsEarnedMessage(this._nonEligibleCreatures,this.xpGained.totalNonMemberXp),this.loadBottomDisplayCreatureIcons(this._nonEligibleCreatures,this._nonEligibleCreaturesAvatars),this.loadBottomDisplayCreatureIcons(this._eligibleCreaturesForBoost,this._eligibleCreaturesAvatars,!0),this.setupUIElements(),this.buildEventsQueue(),this.buildCommonEventsQueue(),this.animateDropIn()})))}addXPBarMultiplierPill(){this._eligibleCreaturesForBoost.forEach((q=>{const K=this.currentCreatures.indexOf(q),z=this.creatureDisplays[K],Y=this.instantiateTemplate($c.XP_BAR_MULTIPLIER_PILL,z.xpBar),Q=`${this._multiplier}x`;Y[$c.BOOST_MULTIPLIER_TEXT].setText(Q)}))}setStarsEarnedMessage(q,K){this._battleStarsEarned.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText($c.MAX_STARS_EARNED));let z=!1;q.forEach((q=>{const Y=mi.s.activePlayerLevelCap;if(!z&&Gc.e.levelFromStars(q.getStars()+K,q.creatureType,Y){Y.standStill()}))}}else if(X instanceof Aa.s){const q=st.q.instance.prodigy.create.character(K,X,$c.SCALE_VALUE,z,0,!1,{isPreview:!0,hideMount:!0});q.y=q.height,q.reload((()=>{q.standStill()}))}else{const q=st.q.instance.prodigy.create.sprite(0,0,zt.E.getIconForType("pet",X.data.ID),null,{x:.5,y:.5}),Y=st.q.instance.prodigy.create.element(K,z,0);Y.scale=new tt.Point($c.SCALE_VALUE,$c.SCALE_VALUE),Y.height=q.height,Y.add(q)}}z&&K.children.forEach((q=>{const K=this.instantiateTemplate("bottomDisplayMultiplierPill",q),z=`${this._multiplier}x`;K[$c.BOOST_MULTIPLIER_TEXT].setText(z)}))}changeSunburstBackgroundTint(q,K){this._sunBurstRect.tint=X.yQ0.WHITE,this._bottomDisplaySunBurst.image.tint=X.yQ0.WHITE,this._sunBurstRect.tint=q,this._bottomDisplaySunBurst.image.tint=K}instantiateElements(){this._battleStarsEarned=this.findUIElement("battleStarsEarned"),this._nonEligibleCreaturesAvatars=this.findUIElement("nonEligibleCreaturesAvatars"),this._eligibleCreaturesAvatars=this.findUIElement("eligibleCreaturesAvatars"),this._bottomDisplaySunBurstBg=this.findUIElement("bottomDisplaySunBurstBg"),this._sunBurstRect=new tt.Graphics,this._sunBurstRect.beginFill(16777215),this._sunBurstRect.drawRoundedRect(0,0,this._bottomDisplaySunBurstBg.width,this._bottomDisplaySunBurstBg.height,$c.ROUND_RECT_RADIUS),this._sunBurstRect.endFill(),this._bottomDisplaySunBurstBg.add(this._sunBurstRect),this._bottomDisplaySunBurst=this.findUIElement("bottomDisplaySunBurst"),this._onElementsInstantiated.dispatch()}showBottomDisplayCreatureIconsAndText(q){q.visible=!0,this._battleStarsEarned.visible=!0,this._battleStarsEarned.alpha=1,this.game.add.tween(this._battleStarsEarned.scale,this).from({x:0,y:0},1e3,X.GS3.Back.Out,!0).onTweenComplete.add(this.runNextEvent.bind(this))}buildEventsQueue(){this.eventQueue.push(this.runNextEvent.bind(this,300),this.showBottomDisplayCreatureIconsAndText.bind(this,this._nonEligibleCreaturesAvatars),this.applyXPGainToTeam.bind(this,this._nonEligibleCreatures,this.xpGained.totalNonMemberXp),this.runNextEvent.bind(this,1e3),(()=>{this.game.add.tween(this._battleStarsEarned,this).to({alpha:0},1e3,X.GS3.Back.Out,!0).onTweenComplete.add((()=>{this._nonEligibleCreaturesAvatars.visible=!1,this._battleStarsEarned.visible=!1,this.runNextEvent()}))}),this.setBottomDisplayForEligibleCreatures.bind(this),this.showBottomDisplayCreatureIconsAndText.bind(this,this._eligibleCreaturesAvatars),this.applyXPGainToTeam.bind(this,this._eligibleCreaturesForBoost,this.xpGained.totalNonMemberXp*this._multiplier),this.unlockAcademyDialogue.bind(this),this.unlockNootTowerDialogue.bind(this),...this.buildPopupEvents(),this.runNextEvent.bind(this,1500),this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainer,this.runNextEvent.bind(this)),(()=>{this.changeSunburstBackgroundTint(16772830,16706454),this.runNextEvent()}))}setBottomDisplayForEligibleCreatures(){this.changeSunburstBackgroundTint(15924460,13236420),this._battleStarsEarned.textObject.style.fill=4027215,this._battleStarsEarned.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText($c.MAX_STARS_EARNED));let q=!1;const K=this.xpGained.totalNonMemberXp*this._multiplier;this._eligibleCreaturesForBoost.forEach((z=>{const Y=mi.s.activePlayerLevelCap;if(!q&&Gc.e.levelFromStars(z.getStars()+K,z.creatureType,Y)0}getBannerLocKey(){return"SUMMARY_POPUP_NEW_HEARTS"}setup(){st.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),st.q.instance.prodigy.create.sprite(0,0,it._.General_battle_json,"icon-heart",new X.I9Y(.5,.5),(q=>{X.Aq$.isDefined(this.spriteHolder)&&(this.spriteHolder.add(q),this.game.add.tween(q.scale,this).from({x:0,y:0},1e3,X.GS3.Elastic.Out,!0))})),this.setActionText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SUMMARY_POPUP_HEARTS_EARNED",this.currentCreature.getFirstName(),this.numHeartsGained))}}var Yc=z(87239);class Qc extends Kc.l{constructor(q,K,z,Y){super(q,K,z,Y,21),this.newAttackList=[],this.newAttackList=Y.diffAvailableSpellsV2(z.getLevel()),this.queuePostCreateCallback(this.showNextSpell.bind(this),this.setupButton.bind(this))}showNextSpell(){this.newAttackList.length<=0?this.close():(st.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.loadSpell(this.newAttackList.shift()))}loadSpell(q){var K;const z=Yc.x.getUnlockedSpellDisplayInformation(q);q.newlyUnlocked?this.setActionText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SUMMARY_POPUP_SPELL_UNLOCKED",this.currentCreature.getFirstName(),z.newSpellName)):this.setActionText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SUMMARY_POPUP_SPELL_EVOLVED",z.oldSpellName,z.newSpellName));const Y=Nn.J.convertLegacyElements(z.elementType);this.ballDisplay.image.loadTexture(it._.Ui_battle_revamp_legacy_json,`pet-icon-backers-${Y}`),this.okayButton.visible=!1,null===(K=this.spellIcon)||void 0===K||K.destroy(),this.spellIcon=st.q.instance.prodigy.create.sprite(0,0,z.spellIcon[0],z.spellIcon[1],new X.I9Y(.5,.5),(q=>{if(X.Aq$.isDefined(this.spriteHolder)){this.spriteHolder.add(q);this.game.add.tween(q.scale,this).from({x:0,y:0},1e3,X.GS3.Elastic.Out,!0),st.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.okayButton.visible=!0}}))}setupButton(){this.okayButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:Xh.k.Okay}),this.showNextSpell()}}isRequired(){return this.newAttackList.length>0}getBannerLocKey(){return"SUMMARY_POPUP_NEW_SPELL"}}var Xc=z(47717);class Zc extends sr.W{constructor(q,K,z,Y){super(q,K,9,{modifyProperty:[{element:"rewardsContainer",property:"visible",value:!z},{element:"infoContainer",property:"visible",value:z},{element:"shardsInfoText",property:"textKey",value:Y}],addChildren:[],modifyTemplateProperty:[]}),this.infoToggle=!1,this.closeButton=null,this.playerProgress=0,this.percentageComplete=0,this.progressSlider=null,this.timer=null,this.infoToggle=z}preprocess(){this.queuePostCreateCallback((()=>{this.openTween(),this.game.broadcaster.addAppListener(gi.RZ.GotTitan,(()=>{this.renderBar()}),this,"TitanProgress",!1),this.closeButton.onClickCallback=this.close.bind(this),this.callTitanHits()}))}close(q){X.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),X.Aq$.isDefined(q)&&q(),this.game.broadcaster.removeAppListener(gi.RZ.GotTitan,this,"TitanProgress"),super.close()}callTitanHits(){this.infoToggle||st.q.instance.prodigy.titansNetworkHandler.getTitan(st.q.instance.prodigy.titansNetworkHandler.titan.id,"TitanProgress")}renderBar(){st.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?(this.playerProgress=Z.get(st.q.instance.prodigy.titansNetworkHandler,"titan.hits",0),this.percentageComplete=this.playerProgress/70,this.setProgress(),this.makeNotches()):this.titanDeadKick()}setProgress(){this.progressSlider.setPercentComplete(this.percentageComplete,!0)}makeNotches(){const q=st.q.instance.prodigy.titansNetworkHandler.titan.increments,K=st.q.instance.prodigy.titansNetworkHandler.titan.rewards;for(let z=0;zq[z]&&zq[z]&&z===q.length-1?this.instantiateTemplate("notch",this.progressSlider).notch:this.instantiateTemplate("notchFade",this.progressSlider).notchFade,Y.x=this.progressSlider.getPositionAtPercent(Math.min(q[z]/70,.95))+Y.width,Y.y=Y.defaultY=75,Y.children[2].setText(K[z].toString())}}titanDeadKick(){const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),K=st.q.instance.prodigy.open.message(q.getText("TITAN_DEFEATED_MESSAGE"),(()=>{this.close((()=>{st.q.instance.prodigy.world.goToZoneHub(st.q.instance.prodigy.world.getCurrentZone())}))}),null,q.getText("TITAN_DEFEATED_TITLE"),null,{isModal:!1});K.queuePostCreateCallback((()=>{K.okayButton.setInputBlockPriority(Ua.z.SYSTEM_INFO)}))}}class Jc extends sr.W{get ui(){return this._ui}constructor(q,K,z,Y,Q=!1){super(q,K,200,{},[it._.Ui_buttons_json,it._.Ui_dialogues_json,it._.Ui_store_json,it._.Ui_shared_json,it._.Ui_icons_json,ht.c.Sfx_store_equip,ht.c.Sfx_store_purchase,ht.c.Sfx_ui]),this.prefabRoot=null,this._ui=null,this._dismissalButton=null,this.onDismissalClick=new X.HN0,this._xPosition=0,this._yPosition=0,this._arrowXRelPos=.5,this._arrowYRelPos=.5,this._arrowDirection=Kr.i.DOWN,this._tooltipSchema={bodyText:""},this.background.visible=!1,this.isModal=Q,this._tooltipPrefabID=z,this._tooltipSchema=Y,X.Aq$.isDefined(this._tooltipSchema.xPosition)||(this._tooltipSchema.xPosition=this._xPosition),X.Aq$.isDefined(this._tooltipSchema.yPosition)||(this._tooltipSchema.yPosition=this._yPosition),X.Aq$.isDefined(this._tooltipSchema.arrowXRelPos)||(this._tooltipSchema.arrowXRelPos=this._arrowXRelPos),X.Aq$.isDefined(this._tooltipSchema.arrowYRelPos)||(this._tooltipSchema.arrowYRelPos=this._arrowYRelPos),X.Aq$.isDefined(this._tooltipSchema.arrowDirection)||(this._tooltipSchema.arrowDirection=this._arrowDirection)}create(){super.create(),this.background.visible=!1;const q=st.q.instance.prodigy.gameContainer.get("983-05a7");if(this._ui=q.load(Jc.PREFAB_ID),this.prefabRoot.addChild(this._ui.legacyTransform.group),this._dismissalButton=this._ui.findComponentInChildren(uc.$),this._dismissalButton.onClick.add((()=>{this.dismissalClicked()})),this._tooltipPrefabID===wh.A.TOOLTIP_SPEECH)wh.A.displayToolTipSpeech(null,this._ui,this._tooltipSchema);else{let q=null;q=wh.A.displayToolTipCustomManual(q,this._ui,this._tooltipPrefabID,this._tooltipSchema),q.GameObject.findComponentsInChildren(uc.$)[0].onClick.add((()=>{this.dismissalClicked()}))}this.game.broadcaster.addAppListener(gi.Bk.OnMouseWheel,(()=>{this.dismissalClicked()}),this,"Input",!1)}dismissalClicked(){X.Aq$.isDefined(this.game)&&this.game.broadcaster.removeAppListener(gi.Bk.OnMouseWheel,this,"Input"),this.onDismissalClick.dispatch(),this.close()}destroy(q){this.onDismissalClick.dispose(),this._ui&&(this._ui.destroy(),this._ui=null),super.destroy(q)}}Jc.PREFAB_ID=123;class td extends tc{constructor(q,K,z,Y,Q){const X=xi.c.instance.isPlayerQualified(),Z=[ht.c.Sfx_results_screen,it._.Popup_ui_roulette_json,it._.Npc_face_gale_json];X&&Z.push(br.q.Ui_pet_xp_boost_graphic),super(q,K,z,0,0,X?102:61,Z,Q),this._itemTableID=Y}setEntranceTemplate(q,K){if(xi.c.instance.isPlayerQualified())this.setExperimentEntranceMenu();else{const q=this.instantiateTemplate("unusedAttemptsTemplate",this.mainPanelButtons);q.enterButton.onUpCallback=()=>{this.onEnterButtonClick()},q.catalogButton.onUpCallback=()=>{this.onCatalogButtonClick(this._itemTableID)};this.instantiateTemplate("unusedAttemptsContent",this.actionContainer)["unused-titleText1"].setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TOWER_ENTRANCE_WELCOME",this.dungeon.name))}const z=this.dungeon.name.charAt(0).toUpperCase()+this.dungeon.name.slice(1);this.MenuTitle.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TOWER_ENTRANCE_LOCKOUT_TITLE",z))}setExperimentEntranceMenu(){const q=xi.c.instance.getSecondPlusScreenData(),K=this.findUIElement("petXPBoostInfoContainer");K.getChildByName("pet-xp-boost-multiplier").setText(`${xi.c.instance.getBoostMultiplier()}${td.BOOST_MULTIPLIER_SUFFIX}`);K.getChildByName("pet-xp-boost-description").setText(q.petXpBoostDescription);this.findUIElement("actionContainer").getChildByName("tower-action-description").setText(q.towerActionDescription);const z=this.findUIElement("CatalogButtonContainer").getChildByName("catalogButton"),Y=z.getChildByName("catalogButtonText");z.onUpCallback=()=>{this.onCatalogButtonClick(this._itemTableID)},Y.setText(q.leftButtonText);const Q=this.findUIElement("EnterButtonContainer").getChildByName("enterButton"),X=Q.getChildByName("enterButtonText");Q.onUpCallback=()=>{this.onEnterButtonClick()},X.setText(q.rightButtonText)}onEnterButtonClick(){this.dungeon.dungeonNameEvent||st.q.instance.prodigy.gameContainer.get("20f-5f67").playerMovementAndDiscovery.sendTowerRunStartedEvent(this.dungeon.name,!0),super.onEnterButtonClick()}}td.BOOST_MULTIPLIER_SUFFIX="x";class ed extends sr.W{constructor(q,K,z,Y,Q,X){super(q,K,59,{},[ht.c.Sfx_results_screen,it._.Ui_shared_json]),this.closeButton=null,this.centerCRButton=null,this.commonRoomButton=null,this.floorButton=null,this.zone=z,this.leaveCallback=Q,this.nextfloorCallback=Y,this.setCloseCallback(X)}create(){super.create(),this.closeButton.onUpCallback=()=>{this.close()},this.menuTitle.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TOWER_EXIT_TITLE",this.zone.CurrentFloor));const q=this.zone;if(q.CurrentFloor===q.TotalFloors)this.titleText.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(`TOWER_EXIT_${q.Warden.name.toUpperCase}`)),this.centerCRButton.onUpCallback=()=>{this.leaveCallback(),this.close()},this.floorButton.visible=!1,this.commonRoomButton.visible=!1;else{this.centerCRButton.visible=!1,this.commonRoomButton.onUpCallback=()=>{this.leaveCallback(),this.close()},this.floorButtonText.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TOWER_EXIT_TO_FLOOR",this.zone.CurrentFloor+1));this.zone.monstersDefeated===this.zone.goalTotal?this.floorButton.onUpCallback=()=>{this.nextfloorCallback(),this.close()}:this.floorButton.setActive(!1,5789784)}}}class id extends sr.W{constructor(q,K,z){super(q,K,65,null,[it._.Popup_member_modular_json,it._.Popup_gohome_json,it._.Ui_social_feed_json]),this.okayButton=null,this.graphicContainer=null,this.setCloseCallback(z)}create(){super.create(),this.okayButton.onUpCallback=()=>{this.close()};const q=this.add(st.q.instance.prodigy.create.sprite(0,0,br.q.Wheel_twilight_large));q.anchor.set(.5,.5),this.graphicContainer.addChild(q)}}var sd=z(54422);let nd=class extends X.uAl{constructor(){super(...arguments),this._nameText=null}set text(q){this._nameText.text=q}set align(q){this._nameText.boundsAlignH=q,this._nameText.update()}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,X.Lr6)(0),(0,X.nKb)("nameText"),(0,Q.Sn)("design:type",X.EYj)],nd.prototype,"_nameText",void 0),nd=(0,Q.Cg)([(0,X.EVk)("WizardNameDisplayPrefab")],nd);var ad=z(47287);let rd=class extends X.uAl{constructor(){super(...arguments),this._enableButtonHolding=!0,this._holdScrollIntervalDelay=200,this._lastClickTime=0}set enableButtonHolding(q){this._enableButtonHolding=q}set holdScrollIntervalDelay(q){this._holdScrollIntervalDelay=q}get holdScrollIntervalDelay(){return this._holdScrollIntervalDelay}get positiveButton(){return this._positiveButton}get negativeButton(){return this._negativeButton}get canScrollPositive(){return this._carousel.canScrollPositive}get canScrollNegative(){return this._carousel.canScrollNegative}create(){super.create(),this.setUpButtons(),st.q.instance.prodigy.load.assets([ht.c.Sfx_button_disabled_state,ht.c.Sfx_ui]),this._carousel.allowMouseInput&&(this._carousel.onStartedScrolling.add(this.updateButtonStates,this),this._carousel.onFinishedScrolling.add(this.updateButtonStates,this)),this._heldTimer=st.q.instance.game.time.create(!1),this._heldTimer.loop(this._holdScrollIntervalDelay,(()=>{this.scrollCarousel(this._lastDirection)}),this)}destroy(){var q,K;st.q.instance.game.time.destroy(this._heldTimer),this._heldTimer=null,this._carousel&&(null===(q=this._carousel.onStartedScrolling)||void 0===q||q.removeAll(this),null===(K=this._carousel.onFinishedScrolling)||void 0===K||K.removeAll(this)),super.destroy()}setUpButtons(){this.negativeButton.onInputDown.add((()=>{this.scrollCarousel(-1),this.startHeldTimer()})),this.negativeButton.onInputUp.add((()=>{this.endHeldTimer()})),this.positiveButton.onInputDown.add((()=>{this.scrollCarousel(1),this.startHeldTimer()})),this.positiveButton.onInputUp.add((()=>{this.endHeldTimer()}))}updateButtonStates(){this.canScrollNegative?this.negativeButton.unlockState():this.negativeButton.lockState(hc.K.Disabled),this.canScrollPositive?this.positiveButton.unlockState():this.positiveButton.lockState(hc.K.Disabled)}scrollCarousel(q){const K=Date.now();this.debounceTimeMs>0&&K-this._lastClickTime{this.getRandomName()})),this._menuPrefab.GameObject.addComponent(sd.E).initialize($o.D.ENTER,(()=>{this.done()})),this._menuPrefab.GameObject.addComponent(sd.E).initialize($o.D.SPACEBAR,(()=>{this.done()})),this._menuPrefab.GameObject.addComponent(sd.E).initialize($o.D.UP,(()=>{this.enableCarouselHighlighters(),this._activeCarouselInput.scrollCarousel(-1),this._activeCarouselInput.startHeldTimer()})),this._menuPrefab.GameObject.addComponent(sd.E).initialize($o.D.DOWN,(()=>{this.enableCarouselHighlighters(),this._activeCarouselInput.scrollCarousel(1),this._activeCarouselInput.startHeldTimer()})),st.q.instance.game.input.keyboard.addKey($o.D.UP).onUp.add(this.endTimerHandler,this),st.q.instance.game.input.keyboard.addKey($o.D.DOWN).onUp.add(this.endTimerHandler,this),this._menuPrefab.GameObject.addComponent(sd.E).initialize($o.D.RIGHT,(()=>{this.switchCarousels(1)})),this._menuPrefab.GameObject.addComponent(sd.E).initialize($o.D.LEFT,(()=>{this.switchCarousels(-1)})),this._menuPrefab.GameObject.addComponent(sd.E).initialize($o.D.TAB,(()=>{this.switchCarousels(0)}))}switchCarousels(q){st.q.instance.prodigy.audio.playSFX(18,"pop"),0===q?(this._activateMiddleNameCarousel=!this._activateMiddleNameCarousel,this._activeCarouselInput=this._activateMiddleNameCarousel?this._menuPrefab.middleNameCarouselInput:this._menuPrefab.lastNameCarouselInput):-1!==q||this._activateMiddleNameCarousel?1===q&&this._activateMiddleNameCarousel&&(this._activateMiddleNameCarousel=!1,this._activeCarouselInput=this._menuPrefab.lastNameCarouselInput):(this._activateMiddleNameCarousel=!0,this._activeCarouselInput=this._menuPrefab.middleNameCarouselInput),this._menuPrefab.middleNameHighlighter.active=this._activateMiddleNameCarousel,this._menuPrefab.lastNameHighlighter.active=!this._activateMiddleNameCarousel}disableCarouselHighlighters(){this._menuPrefab.middleNameHighlighter.active=!1,this._menuPrefab.lastNameHighlighter.active=!1}enableCarouselHighlighters(){this._menuPrefab.middleNameHighlighter.active=this._activateMiddleNameCarousel,this._menuPrefab.lastNameHighlighter.active=!this._activateMiddleNameCarousel}endTimerHandler(){this._activeCarouselInput.endHeldTimer()}setUpButtons(){this._menuPrefab.closeButton.onClick.add((()=>{this.close()})),this._menuPrefab.randomButton.onClick.add((()=>{this.disableCarouselHighlighters(),this.getRandomName()})),this._menuPrefab.doneButton.onClick.add((()=>{this.done()})),this._menuPrefab.middleNameCarouselInput.positiveButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.middleNameCarouselInput.negativeButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.lastNameCarouselInput.positiveButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.lastNameCarouselInput.negativeButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.middleNameCarousel.onStartedScrolling.add(this.updateMiddleName,this),this._menuPrefab.lastNameCarousel.onStartedScrolling.add(this.updateLastName,this)}close(){this._onCloseCallback&&this._onCloseCallback(),this.endTimerHandler(),st.q.instance.game.input.keyboard.addKey($o.D.UP).onUp.remove(this.endTimerHandler,this),st.q.instance.game.input.keyboard.addKey($o.D.DOWN).onUp.remove(this.endTimerHandler,this),this._menuGameObject.destroy(),super.close()}done(){var q;st.q.instance.prodigy.audio.playSFX(61,"add-pet"),wh.A.displayToolTipAuto(null,null,{bodyText:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NAME_CHANGE_SUCCESS"),xPosition:640,yPosition:100}),this._activePlayer.appearance.getName().setMiddleName(this._selectedMiddleName.ID),this._activePlayer.appearance.getName().setLastName(this._selectedLastName.ID),this._activePlayer.appearance.updated=!0,this._activePlayer.name.init(this._activePlayer.appearance.getName()),null===(q=this._activePlayer.playerContainer)||void 0===q||q.showName(),this._activePlayer.forceSaveCharacter(),this._onDoneCallback&&this._onDoneCallback(),this.close()}}var cd=z(2272);class dd extends sr.W{constructor(q,K,z){super(q,K,5,z,[it._.Icons_menu_json,it._.Font_black_json,it._.Ui_shared_json]),this.mailPerPage=4,this.currentlyDisplayedMailItems=[],this.currentPage=0,this.closeButton=null,this.pageLeftButton=null,this.pageRightButton=null,this.mailIconEmpty=null,this.mailDisplay=null,this.mailIcon=null,this.mailCount=null,this.leftButtonUnreadIndicator=null,this.rightButtonUnreadIndicator=null,this.arrowLeftGraphic=null,this.arrowRightGraphic=null,this.noMailNotice=null,this.woodBackground=null;const Y=st.q.instance.prodigy;this.mailExtensionController=Y.gameContainer.get("e14-9e08"),this.game.broadcaster.addAppListener(gi.zr.DeleteMailFailure,this.onMailActionFailure,this,gi.HG.Mailer),this.game.broadcaster.addAppListener(gi.zr.CloseList,this.close,this,gi.HG.Mailer),this.currentInterfaceName=Ah.B.YourMail,this.networkHandler=Y.mailNetworkHandler}create(){super.create(),this.fireInterfaceEvent({originType:Si.$N.ButtonClick,originID:Xh.k.Mail})}preprocess(){this.queuePostCreateCallback((()=>{this.buttonSetup(),this.fetchMail()}))}close(q){X.Aq$.isDefined(this.game)&&(this.game.broadcaster.removeAppListener(gi.zr.GiftBoxOpened,this,gi.HG.Mailer),this.game.broadcaster.removeAppListener(gi.zr.DeleteMailFailure,this,gi.HG.Mailer),this.game.broadcaster.removeAppListener(gi.zr.GetAllMailSuccess,this,gi.HG.Mailer),this.game.broadcaster.removeAppListener(gi.zr.GetAllMailFailure,this,gi.HG.Mailer),this.game.broadcaster.removeAppListener(gi.zr.CloseList,this,gi.HG.Mailer),this.removeCachedMailNotificationImages(),X.Aq$.isDefined(q)&&q()),this.fireInterfaceEvent({closeMethod:Si.Lv.CloseButton}),super.close()}buttonSetup(){this.closeButton.onClickCallback=q=>{this.fireButtonEvent({buttonName:Xh.k.X,destinationName:st.q.instance.prodigy.world.getCurrentZone()}),this.close(q)},this.pageLeftButton.onClickCallback=this.pageLeft.bind(this),this.pageRightButton.onClickCallback=this.pageRight.bind(this),this.pageLeftButton.scale.x=-1,this.pageLeftButton.visible=!1,this.pageRightButton.visible=!1}fetchMail(){this.mailIconEmpty.visible=!0,this.game.broadcaster.addAppListener(gi.zr.GetAllMailSuccess,this.onFetchMailSuccess,this,gi.HG.Mailer),this.game.broadcaster.addAppListener(gi.zr.GetAllMailFailure,this.onMailActionFailure,this,gi.HG.Mailer),st.q.instance.prodigy.mailNetworkHandler.getAllMail(!0)}onFetchMailSuccess(){this.renderMailItems(this.currentPage),this.updateMailCounter(),this.updatePageButtons(),this.updateNoMailNotice()}onMailActionFailure(){if(X.Aq$.isDefined(this.game)){const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);st.q.instance.prodigy.open.message(q.getText("MAIL_UNAVAILABLE"),(()=>{this.close()}),null,q.getText("MESSAGE_TITLE_OOPS"))}}renderMailItems(q){if(q<0||q+1>this.getNumPages())return;this.currentPage=q,this.clearMailDisplay();const K=this.networkHandler.mailList,z=this.currentPage*this.mailPerPage;let Y=0;for(let Q=z;Q0,this.pageRightButton.visible=this.currentPage0){this.leftButtonUnreadIndicator.visible=!1,this.arrowLeftGraphic.visible=!0;for(let K=this.currentPage*this.mailPerPage-1;K>0;K--)if(!q[K].isOpened){this.leftButtonUnreadIndicator.visible=!0,this.arrowLeftGraphic.visible=!1;break}}if(this.currentPage{this.woodBackground.visible=!0,this.game.broadcaster.removeAppListener(gi.zr.GiftBoxOpened,this,gi.HG.Mailer)}),(()=>this.deleteMail(K,!0))),st.q.instance.prodigy.gameContainer.get("20f-5f67").yourMail.sendOpenMailEvent(K.id,!K.isOpened,K.attachments),xc.b.isSingleUse(K)?this.game.broadcaster.addAppListener(gi.zr.GiftBoxOpened,this.updateOpenedStatus.bind(this,q,!0),this,gi.HG.Mailer,null):this.updateOpenedStatus(q,!0)}updateOpenedStatus(q,K){this.networkHandler.setRead(q,K),this.currentlyDisplayedMailItems[q%this.mailPerPage].openButtonGraphic.visible=K,this.currentlyDisplayedMailItems[q%this.mailPerPage].unOpenButtonGraphic.visible=!K,this.updateMailCounter(),this.updatePageButtons(),this.updateNoMailNotice(),this.updateMailEntry(q)}deleteMail(q,K=!1){if(q.isOpened||K)this.networkDeleteMailCall(q);else{const K=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);st.q.instance.prodigy.open.petsCustomDialog(new Dh.k(K.getText("BUTTON_DELETE_TEAM"),(()=>this.networkDeleteMailCall(q)),K.getText("CANCEL"),void 0,{atlas:it._.Ui_store_json,name:"icon-large-exclamation"},cd.E.Small,500,K.getText("BUTTON_DELETE_TEAM"),K.getText("MAILBOX_DELETE_MESSAGE")))}}networkDeleteMailCall(q){this.networkHandler.deleteMail(q),this.currentPage>=this.getNumPages()&&(this.currentPage=Math.max(this.currentPage-1,0)),this.clearMailDisplay(),this.updateMailCounter(),this.renderMailItems(this.currentPage),this.updatePageButtons(),this.updateNoMailNotice()}getNumPages(){return Math.ceil(this.networkHandler.mailList.length/this.mailPerPage)}removeCachedMailNotificationImages(){const q=this.networkHandler.mailList;for(let K=0;Ksuper.create}});return(0,Q.sH)(this,void 0,void 0,(function*(){q.create.call(this),this._ui=yield this._prefabLoader.loadWithDependenciesFromGUID(Pi.l.AdventureMap_Template).promise,this.addChild(this._ui.legacyTransform.group);const K=this._ui.findComponentInChildren(ld.S);K.hideStartButton=this._isStartAdventure,K.run(),this._ui.findComponentInChildren(ud.Z).menu=this}))}close(){var q;null===(q=this._closeCallback)||void 0===q||q.call(this),super.close()}destroy(){this._ui.destroy(),super.destroy()}}var bd=z(67510),pd=z(15521);class vd extends sr.W{constructor(q,K,z){super(q,K,55,{isModal:!0}),this.onGreenButton=new X.HN0,this.onRedButton=new X.HN0,this.game=q,this.config=z,this.queuePostCreateCallback((()=>{this.configureText(),this.configureButtons()}))}configureText(){this.body.setText(this.config.body),X.Aq$.isDefined(this.config.title)&&(this.title=this.instantiateTemplate("title",this.matte).title,this.title.setText(this.config.title),pd.Z.bringToTop(this.body))}configureButtons(){this.greenButtonText.setText(this.config.greenButton.text),this.greenButton.onUpCallback=()=>{this.onGreenButton.dispatch()};const q=st.q.instance.prodigy.gameContainer.get("2f9-57ba");if(q.setBlockType(this.greenButton.button.image.input,Ua.z.LOBBY),X.Aq$.isDefined(this.config.greenButton.callback)&&this.onGreenButton.add(this.config.greenButton.callback),this.onGreenButton.add(this.close.bind(this)),X.Aq$.isDefined(this.config.redButton)){const K=this.instantiateTemplate("redButton",this.buttonGroup),z=K.redButton;pd.Z.sendToBack(z),z.onUpCallback=()=>{this.onRedButton.dispatch()},q.setBlockType(z.button.image.input,Ua.z.LOBBY),X.Aq$.isDefined(this.config.redButton.callback)&&this.onRedButton.add(this.config.redButton.callback),this.onRedButton.add(this.close.bind(this));K.redButtonText.setText(this.config.redButton.text)}}destroy(){this.onGreenButton.dispose(),this.onRedButton.dispose(),super.destroy()}}class gd extends sr.W{get OnCreateClicked(){return this.onCreateClicked}get OnJoinClicked(){return this.onJoinClicked}constructor(q,K,z,Y){super(q,K,52),this.onCreateClicked=new X.HN0,this.onJoinClicked=new X.HN0,this.hostCards=[],this.shareScrollPercent=0,this.playersInfo=z,this.coOpTeamsHandler=Y,this.queuePostCreateCallback((()=>{this.setButtons(),this.renderPlayer(),this.fillView(),this.runTutorial()}))}getTeamList(){const q=this.coOpTeamsHandler.AvailableTeams,K=Z.filter(q,(q=>X.Aq$.isDefined(this.playersInfo[q.hostID])));let z=Z.filter(st.q.instance.prodigy.friendsListNetworkHandler.friendsList,(q=>0!==q.status));z=z.concat(st.q.instance.prodigy.friendsListNetworkHandler.classList);const Y=Z.map(K,(q=>this.extractCardInfo(this.playersInfo[q.hostID],q,z)));return Y.sort(((q,K)=>q.friend!==K.friend?(K.friend?1:0)-(q.friend?1:0):K.teamSize-q.teamSize)),Y}extractCardInfo(q,K,z){return{userID:q.userID,teamSize:K.teamMembers.length,friend:Z.some(z,(K=>K.userID===q.userID)),appearance:q.appearance,equipment:q.equipment,isMember:1===q.isMember,icons:[],cell:null}}setButtons(){this.createButton.onUpCallback=()=>{this.onCreateClicked.dispatch(),this.close()},this.closeButton.onClickCallback=super.close.bind(this)}renderPlayer(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=new Be.a(this.game);K.init({appearance:q.appearance.getData(),equipment:q.equipment.getData()});const z=st.q.instance.prodigy.create.player(this.playerWindowMask,K,1,80,95,!1,{isPreview:!0,hideMount:!0});z.mask=this.playerWindowMask.mask,z.forceWeaponVisual=!0,z.reload()}fillView(){this.hostCards=this.getTeamList();const q=this.hostCards.length<1;this.noTeamsAvailable.visible=q,q||(this.fillFeedGroup(),this.orderFeedCells()),this.feedContents.layoutElement.calculateChildren(),this.feedScrollView.setupVisibleIndices(),this.feedScrollView.calculateMaxScrollDist(),this.setupScrollBar(),this.feedScrollBar.visible=this.hostCards.length>1}setupScrollBar(){X.Aq$.isDefined(this.feedScrollView)&&(this.feedScrollView.linkScrollBar(this.feedScrollBar),this.feedScrollView.setToScrollPercent(this.shareScrollPercent))}fillFeedGroup(){for(let q=0;q=q.teamSize?q.icons[X].setImageFrameName("Images/icon-teammate-off"):q.icons[X].setImageFrameName("Images/icon-teammate-on");const Z=new Be.a(this.game);Z.init(q);const J=st.q.instance.prodigy.create.player(Y.friendCircle,Z,1,80,130,!1,{isPreview:!0,hideMount:!0});J.forceWeaponVisual=!0,J.reload();const tt=st.q.instance.prodigy.gameContainer.resolve(Wa.C);tt.init(Z.appearance.getName());const et=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("CO_OP_PARTY_CELL_FRIEND");Y.nameText.setText(`${tt.getName()}${q.friend?et:""}`),Y.memberIcon.visible=q.isMember,q.teamSize>2?(Y.joinButton.visible=!1,Y.fullText.visible=!0):Y.joinButton.onUpCallback=()=>{this.onJoinClicked.dispatch(q.userID),this.close()},q.cell=Y}orderFeedCells(){for(let q=0;q1}runTutorial(){const q=En.B.FEATURE_COOP_BATTLE,K=En.B.BREADCRUMB_COOP_PARTY_SELECT;if(!st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(q,K)){let z=new Ni.rD(this.game);z.addEvents([{dialogueData:z.dataProvider.get(291),blockInput:!0},{callback:()=>st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q,K)}]),z.start(!0,(()=>z=null)),this.onJoinClicked.addOnce((()=>{null==z||z.close()}))}}destroy(){this.onCreateClicked.dispose(),this.onJoinClicked.dispose(),super.destroy()}}gd.MAX_HEADCOUNT=3;var md=z(50348);let yd=class extends X.uAl{constructor(){super(...arguments),this._confirmButton=null,this._dismissButton=null}get confirmButton(){return this._confirmButton}get dismissButton(){return this._dismissButton}};(0,Q.Cg)([(0,X.x4W)("ConfirmButton"),(0,Q.Sn)("design:type",uc.$)],yd.prototype,"_confirmButton",void 0),(0,Q.Cg)([(0,X.x4W)("DismissButton"),(0,Q.Sn)("design:type",uc.$)],yd.prototype,"_dismissButton",void 0),yd=(0,Q.Cg)([(0,X.EVk)("ConfirmationDialogFooter")],yd);let _d=class extends X.uAl{constructor(){super(...arguments),this._headerText=null,this._headerIcon=null}get headerText(){return this._headerText}get headerIcon(){return this._headerIcon}};(0,Q.Cg)([(0,X.x4W)("headerText"),(0,Q.Sn)("design:type",X.EYj)],_d.prototype,"_headerText",void 0),(0,Q.Cg)([(0,X.x4W)("headerIcon"),(0,Q.Sn)("design:type",X._mx)],_d.prototype,"_headerIcon",void 0),_d=(0,Q.Cg)([(0,X.EVk)("ConfirmationDialogHeader")],_d);var Ed=z(38134);class wd extends Ed.u{constructor(q,K,z=new Dh.k){super(q,K,z),this._confirmationDialogConfig=null,this._headerPrefabID=Pi.l.ConfirmationDialogHeader,this._bodyPrefabID=Pi.l.ConfirmationDialogBody,this._footerPrefabID=Pi.l.ConfirmationDialogFooter,this._confirmationDialogConfig=z,this.configObj={elements:[]},this.isModal=!1}createHeader(){const q=this._prefabLoader.loadFromGUID(this._headerPrefabID,this._prefabComponent.header).findComponent(_d);X.Aq$.isDefined(this._confirmationDialogConfig.headerTitle)&&(q.headerText.text=this._confirmationDialogConfig.headerTitle),X.Aq$.isDefined(this._confirmationDialogConfig.headerIcon)&&q.headerIcon.legacyTransform.group.addChild(new lo._(this.game,0,0,this._confirmationDialogConfig.headerIcon.atlas,this._confirmationDialogConfig.headerIcon.name))}createBody(){this._prefabLoader.loadFromGUID(this._bodyPrefabID,this._prefabComponent.body).findComponentInChildren(X.EYj).text=this._confirmationDialogConfig.bodyMessage}createFooter(){const q=this._prefabLoader.loadFromGUID(this._footerPrefabID,this._prefabComponent.footer),K=q.findComponent(yd);this._confirmationDialogConfig.confirmButtonCallback&&K.confirmButton.onClick.add(this._confirmationDialogConfig.confirmButtonCallback),this._confirmationDialogConfig.dismissButtonCallback&&K.dismissButton.onClick.add(this._confirmationDialogConfig.dismissButtonCallback),K.confirmButton.onClick.add(this.close.bind(this)),K.dismissButton.onClick.add(this.close.bind(this));const z=q.findComponentsInChildren(X.EYj);for(let Y=0;Y0?Q:X,this._creaturePreviews[q].setTransparency(X)}onLoadPreviewHandler(q,K,z){q.GameObject.active=!0,this._gridLayout.updateAll(!1),st.q.instance.prodigy.load.isFileLoaded(Ra.M.getAssets(q.renderContainer.source,1)[0])||X.VyI.log("Creature asset is not loaded",X.$bb.Error);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.encounters;Y.hasPetBeenEncountered(q.creatureID)?0===Y.getPetTimesRescued(q.creatureID)&&q.applyGreyscale(.3):q.applyGreyscale(0),q.setTransparency(z?.7:1),this.carousel.setToIndex(K),++this._finalOnLoadCount>=this._creaturePreviews.length&&this.allPreviewsLoaded()}allPreviewsLoaded(){this._finishedLoadingPreview=!0,this.updateButtonStates()}destroy(){this._creaturePreviews.forEach((q=>{q.OnLoad.removeAll(this)})),this._creaturePreviews.length=0,this._carouselContainer.destroy(),this._carouselContainer=null}}var Gd=z(56461),jd=z(25930);class $d{get prefabComponent(){return this._petStatsPrefabComponent}constructor(q){this._panelGameObject=null,this._petStatsPrefabComponent=null;const K=st.q.instance.prodigy.gameContainer.get("983-05a7");this._panelGameObject=K.loadFromGUID(Pi.l.Pets_RightSideStatsPanel),q.addChild(this._panelGameObject.legacyTransform.group),this._petStatsPrefabComponent=this._panelGameObject.findComponentInChildren(jd.J)}}class Hd extends Gd.A{constructor(q,K,z,Y){super(q,K,200,{},[]),this.prefabRoot=null,this._headerComponent=null,this._gameObject=null,this._statsPanelContainerGO=null,this._statsPanel=null,this._currentPetItemID=0,this._petEvolutions=null,this._previousPetItemIndices=[],this.isModal=!1,this.background.visible=!1,Y&&(this._headerComponent=Y),this.setDataID(z),this._encounterInfo=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.encounters}create(){super.create();const q=st.q.instance.prodigy.gameContainer.get("983-05a7");this._gameObject=q.loadFromGUID(Pi.l.Pets_PetInfoMenu),this.prefabRoot.addChild(this._gameObject.legacyTransform.group),this._headerComponent&&(this._headerComponent.backToPetBookButton.onClick.add(this.close,this),this._headerComponent.backToPetBookButton.GameObject.addComponent(sd.E).initialize($o.D.ESC,(()=>{this.close(),this._headerComponent.onSubMenuClose.dispatch()}))),this.loadStatsPanel(),this.loadEvolutionCarousel(),this.updateDisplay(),st.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu");const K=Ee.t.getItem("pet",this._currentPetItemID);st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendPetDetailsViewedEvent(K,"pet-info")}loadEvolutionCarousel(){this._petGeneralPanelContainer=new X._mx,this._petGeneralPanelContainer.addComponent(X.K16),this._gameObject.addChild(this._petGeneralPanelContainer),this._petEvolutionsPanel=new Fd(this._petGeneralPanelContainer.legacyTransform.group),this._petEvolutionsPanel.addEvolutions(this._petEvolutions,this._currentPetItemIndex),this._petEvolutionsPanel.carousel.onFinishedScrolling.add(this.finishScrolling,this),this._petEvolutionsPanel.carousel.onScrollingToCompletion.add(this.changeTransparencyWhileScrolling,this);const q=()=>{this.tryToMoveCarousel(this._petEvolutionsPanel.canScrollPositive,1)};this._petEvolutionsPanel.panelPrefab.nextButton.onClick.add(q);const K=()=>{this.tryToMoveCarousel(this._petEvolutionsPanel.canScrollNegative,-1)};this._petEvolutionsPanel.panelPrefab.previousButton.onClick.add(K),this._petEvolutionsPanel.panelPrefab.previousButton.GameObject.addComponent(sd.E).initialize($o.D.LEFT,K),this._petEvolutionsPanel.panelPrefab.nextButton.GameObject.addComponent(sd.E).initialize($o.D.RIGHT,q)}loadStatsPanel(){this._statsPanelContainerGO=new X._mx,this._statsPanelContainerGO.addComponent(X.K16),this._gameObject.addChild(this._statsPanelContainerGO),this._statsPanel=new $d(this._statsPanelContainerGO.legacyTransform.group),this._statsPanel.prefabComponent.aboutToggle.GameObject.active=!0,this._statsPanel.prefabComponent.statsToggle.GameObject.active=!1;const q=this._statsPanel.prefabComponent.statsPanel.findComponentInChildren(X.JTA);q.GameObject.children[1].destroy(),q.GameObject.children[0].destroy(),q.updateAll(),this._statsPanel.prefabComponent.spellsToggle.GameObject.destroy();const K=this._statsPanel.prefabComponent.aboutToggle.GameObject.findComponentsInChildren(X.EYj);for(let Z=0;Z{this.setAboutActive(),st.q.instance.prodigy.audio.playSFX(68,"paper-tab")};this._statsPanel.prefabComponent.aboutToggle.onSelected.add(Y);const Q=()=>{this.setStatsActive(),st.q.instance.prodigy.audio.playSFX(68,"paper-tab")};this._statsPanel.prefabComponent.statsToggle.onSelected.add(Q),this._statsPanel.prefabComponent.aboutToggle.GameObject.addComponent(sd.E).initialize($o.D.TAB,(()=>{const q=this._statsPanel.prefabComponent.aboutToggle.isSelected(),K=this._statsPanel.prefabComponent.GameObject.findComponentInChildren(Md.O);K.setItemSelected(this._statsPanel.prefabComponent.aboutToggle,!q),K.setItemSelected(this._statsPanel.prefabComponent.statsToggle,q),q?Q():Y()}))}tryToMoveCarousel(q,K){q?(st.q.instance.prodigy.audio.playSFX(18,"pop"),this.changeActiveID(K),this._petEvolutionsPanel.updateButtonStates(),this.updateDisplay()):st.q.instance.prodigy.audio.playSFX(67,"button-disabled")}setDataID(q){this._petEvolutions=Ph.P8.GetEvolutionaryLine(Ee.t.getItem("pet",q)),this._currentPetItemIndex=this._petEvolutions.findIndex((K=>K===q)),this._currentPetItemID=this._petEvolutions[this._currentPetItemIndex]}changeActiveID(q){this._previousPetItemIndices.push(this._currentPetItemIndex),this._currentPetItemIndex=X.cj9.clamp(this._currentPetItemIndex+q,0,this._petEvolutions.length-1),this._currentPetItemID=this._petEvolutions[this._currentPetItemIndex],this._petEvolutionsPanel.carousel.scrollToNextLocation(q)}finishScrolling(){this._petEvolutionsPanel.setCreaturePedestalTransparent(this._currentPetItemIndex,1),this._previousPetItemIndices.forEach((q=>{this._petEvolutionsPanel.setCreaturePedestalTransparent(q,.7)})),this._previousPetItemIndices=[]}changeTransparencyWhileScrolling(q){this._petEvolutionsPanel.setCreaturePedestalTransparent(this._currentPetItemIndex,1,1,q),this._previousPetItemIndices.forEach((K=>{this._petEvolutionsPanel.setCreaturePedestalTransparent(K,.7,-1,q)}))}setAboutActive(){this._statsPanel.prefabComponent.statsPanel.active=!1,this._encounterInfo.hasPetBeenEncountered(this._currentPetItemID)?(this._statsPanel.prefabComponent.aboutPanel.active=!0,this._statsPanel.prefabComponent.learnMorePanel.active=!1):(this._statsPanel.prefabComponent.learnMorePanel.active=!0,this._statsPanel.prefabComponent.aboutPanel.active=!1)}setStatsActive(){this._statsPanel.prefabComponent.aboutPanel.active=!1,this._encounterInfo.hasPetBeenEncountered(this._currentPetItemID)?(this._statsPanel.prefabComponent.statsPanel.active=!0,this._statsPanel.prefabComponent.learnMorePanel.active=!1):(this._statsPanel.prefabComponent.learnMorePanel.active=!0,this._statsPanel.prefabComponent.statsPanel.active=!1)}updateDisplay(){const q=Ee.t.getItem("pet",this._currentPetItemID);this._statsPanel.prefabComponent.textAbout.text=(0,Ka.k)(Nn.J.getLocalizationFlavorKey(q)),this._statsPanel.prefabComponent.fillBarAttackAndHearts.fillPercent=.1*q.data.statPower,this.updateElementDisplay(q),this.updateEvolveDisplay(q),this.updateEvolutionDisplay(q,this._currentPetItemIndex,this._petEvolutions.length),this.updateEncounterDisplay(q),this._statsPanel.prefabComponent.statsToggle.isSelected()?this.setStatsActive():this.setAboutActive()}updateElementDisplay(q){this._statsPanel.prefabComponent.textElement.text=vn.$.capitalizeFirstLetter(Ph.P8.getElementType(q));const K=this._statsPanel.prefabComponent.iconContainerElement.findComponent(X.vYh);K&&K.destroy(),yr.l.removeAll(this._statsPanel.prefabComponent.iconContainerElement.legacyTransform.group,!0);const z=this._statsPanel.prefabComponent.iconContainerElement.addComponent(X.vYh,!1);let Y;switch(Ph.P8.getElementType(q)){case Nd.a.Water:Y=this._statsPanel.prefabComponent.elementIconFrameWater;break;case Nd.a.Fire:Y=this._statsPanel.prefabComponent.elementIconFrameFire;break;case Nd.a.Storm:Y=this._statsPanel.prefabComponent.elementIconFrameStorm;break;case Nd.a.Ice:Y=this._statsPanel.prefabComponent.elementIconFrameIce;break;case Nd.a.Plant:default:Y=this._statsPanel.prefabComponent.elementIconFrameEarth}z.create(),z.updateAsset(this._statsPanel.prefabComponent.elementIconAtlas,Y)}updateEvolveDisplay(q){const K=Ph.P8.getEvolutionLVL(q);X.Aq$.isDefined(K)?(this._statsPanel.prefabComponent.rowObjectEvolveLevel.active=!0,this._statsPanel.prefabComponent.textEvolveLevel.text=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("LEVEL_AND_COLON",K)):this._statsPanel.prefabComponent.rowObjectEvolveLevel.active=!1}updateEvolutionDisplay(q,K,z){this._petEvolutionsPanel.panelPrefab.evolutionNumber.text=`Evolution ${K+1} of ${z}`,this._petEvolutionsPanel.panelPrefab.setBackground(Ph.P8.getElementType(q))}updateEncounterDisplay(q){const K=!!this._encounterInfo.hasPetBeenEncountered(q.ID);this._petEvolutionsPanel.panelPrefab.petName.text=K?(0,Ka.k)(Nn.J.getLocalizationNameKey(q)):"???";const z=Ph.P8.hasValidOrdinal(q)?q.data.ordinal:-1;this._petEvolutionsPanel.panelPrefab.petBookNumber.text=`# ${z.toString()}`,this._petEvolutionsPanel.panelPrefab.seenPanel.active=K,this._petEvolutionsPanel.panelPrefab.unseenPanel.active=!K,K&&(this._petEvolutionsPanel.panelPrefab.rescuedTimes.text=`Rescued: ${this._encounterInfo.getPetTimesRescued(q.ID)}`)}close(){var q,K,z,Y,Q;null===(q=this._petEvolutionsPanel)||void 0===q||q.destroy(),null===(K=this._statsPanel)||void 0===K||K.prefabComponent.aboutToggle.onSelected.dispose(),null===(z=this._statsPanel)||void 0===z||z.prefabComponent.statsToggle.onSelected.dispose(),null===(Y=this._statsPanel)||void 0===Y||Y.prefabComponent.GameObject.destroy(),this._headerComponent&&(this._headerComponent.backToPetBookButton.onClick.remove(this.close,this),null===(Q=this._headerComponent.backToPetBookButton.GameObject.findComponent(sd.E))||void 0===Q||Q.destroy()),this._statsPanelContainerGO&&this._statsPanelContainerGO.destroy(),this._gameObject&&this._gameObject.destroy(),super.close()}}var Vd=z(52382);class Wd extends Gd.A{constructor(q,K,z,Y,Q,Z){super(q,K,200,{},[]),this.onGearMenuOpen=new X.HN0,this.onGearMenuClosed=new X.HN0,this.isModal=!1,this.background.visible=!1,Z&&(this._headerComponent=Z),this._contentLayer=null!=Q?Q:this,this._gearType=Y,this._currentDataSchema=z}create(){const q=Object.create(null,{create:{get:()=>super.create}});return(0,Q.sH)(this,void 0,void 0,(function*(){var K;q.create.call(this);const z=X.Aq$.isDefined(this._headerComponent);this._prefabLoader=st.q.instance.prodigy.gameContainer.get("983-05a7");const Y=st.q.instance.prodigy.gameContainer.get("9cf-c09f"),Q=X.Aq$.isDefined(null===(K=this._currentDataSchema)||void 0===K?void 0:K.gear)?this._currentDataSchema.gear[this._gearType]:null,Z=X.Aq$.isDefined(Q)?yield Y.getPetGearByUniqueId(this._currentDataSchema.gear[this._gearType]):null;cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Pi.l.Pets_YourPetGearMenu,{[dr._R.PetGearType]:this._gearType,[dr._R.PetGearInitialGearDisplay]:Z,[dr._R.PetGearHeaderEnable]:!z,[dr._R.PetGearHeaderClose]:this.close.bind(this),[dr.hi.PetCreatureData]:this._currentDataSchema}).then((q=>this.setUpMenuPrefab(q))).catch((q=>{X.VyI.log("Unable to load Pets - Your Pet Gear Menu prefab",X.$bb.Error)}))}))}setUpMenuPrefab(q){q&&!this.destroyed&&(this._gameObject=q,this._contentLayer&&this._contentLayer.addChild(this._gameObject.findComponentInChildren(X.y4o).getRootContainer()),this._gameObject.transform.setPosition(640,360),this._headerComponent&&(this._headerComponent.setTitleText("PETGEAR_MENU_TITLE"),this._headerComponent.backToYourPetButton.onClick.add(this.close,this),this._headerComponent.backToYourPetButton.GameObject.addComponent(sd.E).initialize($o.D.ESC,(()=>{fh.I.shouldShowPetGearTutorialCached||(this.close(),this._headerComponent.onSubMenuEsc.dispatch(this))}))),st.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu"),fh.I.shouldShowPetGearTutorialCached&&this.displayPetGearFtue(),this.onGearMenuOpen.dispatch())}displayPetGearFtue(){var q;st.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Qh.l.PetGearGearMenu},{step_index:4});const K=this._gameObject.findComponentInChildren(X.bE_,!0),z=K.Container.get(dr.oD.PetGearFtueEnabledInputTransform),Y=K.Container.get(dr.oD.PetGearFtueOverlayGameObject);null===(q=this._gameObject.findComponentsInChildren(Vd.H))||void 0===q||q.forEach((q=>{const K=()=>{var K;if(!X.Aq$.isDefined(Y)||Y.isDestroyed)return;Y.active=!0,q.resetSelection();const Q=null===(K=q.getVisibleGearCardByIndex(0))||void 0===K?void 0:K.findComponent(X.XVE);X.Aq$.isDefined(Q)&&(z.GameObject.active=!0,z.setPosition(Q.worldPosition.x-Q.widthDelta*Q.pivot.x,Q.worldPosition.y-Q.heightDelta*Q.pivot.y),z.fullWidth=Q.fullWidth,z.fullHeight=Q.fullHeight)};q.onGridDisplayed.add(K),q.onGridInitialized.add(K),q.onGearCardSelected.add((()=>{X.Aq$.isDefined(Y)&&!Y.isDestroyed&&(z.GameObject.active=!1)})),q.onEquippedGearChanged.addOnce((()=>{fh.I.updateCachedPetGearTutorialFlag().catch(X.RQr.createHandler("Failed to update cached pet gear tutorial flag")).finally((()=>{Y.destroy()}))}))}))}close(){var q;this._headerComponent&&(this._headerComponent.setTitleText(""),this._headerComponent.backToYourPetButton.onClick.remove(this.close,this),null===(q=this._headerComponent.backToYourPetButton.GameObject.findComponent(sd.E))||void 0===q||q.destroy()),this._gameObject&&this._gameObject.destroy(),this._gearType=null,this._currentDataSchema=null,this.onGearMenuClosed.dispatch(),this.onGearMenuClosed.dispose(),this.onGearMenuOpen.dispose(),super.close()}}var qd=z(38097),Kd=z(52142),zd=z(3119);class Yd{get rootNode(){return this._root}constructor(q){this._root=q}}class Qd{get tree(){return this._tree}set tree(q){this._tree=q}get currentNode(){return this._currentNode}set currentNode(q){this._currentNode=q}constructor(q){this._currentNode=null,this.visitedNodes=[],this.skipInVisitedStack=[],this._tree=q,this.currentNode=this.tree.rootNode}start(){this.currentNode.onVisited()}getNextChildNode(){return this.currentNode.getAllChildNodes().length>0?this.currentNode.getAllChildNodes()[0]:null}setNodeAsVisited(q){-1===this.skipInVisitedStack.indexOf(q)&&this.visitedNodes.push(q)}nextNode(q){return this.currentNode?this.currentNode.getAllChildNodes().length>0?(X.Aq$.isDefined(q)&&0!==q.length?this.currentNode=this.currentNode.getChildNodeByName(q):this.currentNode=this.currentNode.getAllChildNodes()[0],this.currentNode?X.Aq$.isDefined(this.currentNode.onVisited)&&this.currentNode.onVisited():"exit"===q?this.currentNode=null:X.VyI.log(`Branch not found: ${q}.`,X.$bb.Error)):this.currentNode=null:X.VyI.log("currentNode not defined.",X.$bb.Error),this.currentNode}prevNode(){return this.visitedNodes.length>0?(this.currentNode=this.visitedNodes.pop(),X.Aq$.isDefined(this.currentNode.onVisited)&&this.currentNode.onVisited()):this.currentNode=null,this.currentNode}}var Xd=z(1041);class Zd extends Tr.u{constructor(q,K,z){super(),this.game=q,this.screen=K,this.mapData=z,this.tiledParser=new Xd.Z(st.q.instance.prodigy.gameContainer)}create(){super.create()}render(q){X.Aq$.isDefined(q)&&(this.mapData=q),this.below=st.q.instance.prodigy.create.element(this.screen.background,0,0),this.above=st.q.instance.prodigy.create.element(this.screen.foreground,0,0);const K=st.q.instance.prodigy.create.element(this.screen.background,0,0),z=st.q.instance.prodigy.create.element(this.screen.foreground,0,0);this.area=this.tiledParser.init(this.game,K,z,this.screen,this.mapData,(()=>{st.q.instance.prodigy.textureBelow.clear(),st.q.instance.prodigy.textureBelow.renderXY(K,0,0,!0),this.below.add(st.q.instance.prodigy.create.image(0,0,void 0,void 0,st.q.instance.prodigy.textureBelow)),st.q.instance.prodigy.textureAbove.clear(),st.q.instance.prodigy.textureAbove.renderXY(z,0,0,!0),this.above.add(st.q.instance.prodigy.create.image(0,0,void 0,void 0,st.q.instance.prodigy.textureAbove)),this.tiledParser.processAnimations(this.game,this),K.destroy(),z.destroy()}))}update(){super.update()}destroy(){this.screen=null,this.mapData=null,this.tiledParser=null,this.below=null,this.above=null,super.destroy()}}var Jd=z(93833),tl=z(77302),el=z(29738),il=z(10312);class sl extends sr.W{constructor(q,K,z,Y){super(q,K,200,{},[it._.General_icons_json,it._.Ui_bam_json,it._.Ui_buttons_json,it._.Ui_store_json,it._.Ui_card_json,it._.Ui_registration_json,it._.Ui_icons_json,it._.Ui_panels_json,ht.c.Sfx_store_equip,ht.c.Sfx_store_purchase,ht.c.Sfx_registration]),this.prefabRoot=null,this._ui=null,this._headerPrefab=null,this._data=null,this._playingSFX=null,this._headerPrefab=Y,this._data=z,this._headerPrefab.policyLink.onClicked.add((()=>{this.onPrivacyPolicyClick()})),this._headerPrefab.websiteLink.onClicked.add((()=>{this.onWebsiteLinkClick()})),this.isModal=!1,this.background.visible=!1,this._localizer=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService)}create(){super.create(),this._headerPrefab.nextButton.onClick.add(this.nextClicked,this),this._headerPrefab.backButton.onClick.add(this.backClicked,this)}loadFromPrefab(q,K){const z=st.q.instance.prodigy.gameContainer.get("983-05a7");return this._ui="string"==typeof K?z.loadFromGUID(K):z.load(K),0===this._ui.findComponents(Jd.$).length&&this._ui.addComponent(Jd.$),0===this._ui.findComponents(X.jsv).length&&this._ui.addComponent(X.jsv),this.prefabRoot.addChild(this._ui.findComponent(Jd.$).rootContainer),this._ui.findComponentInChildren(q)}changeTitle(q){this._headerPrefab.title.text=this._localizer.getText(q)}initializeAudio(q,K){el.O.isEnglishLocale()?(this.changeAudio(q,K),-1===this._data.soundHasBeenPlayed.indexOf(q)&&(this.playAudio(q),this._data.soundHasBeenPlayed.push(q))):this._headerPrefab.soundButton.Active=!1}changeAudio(q,K){this._headerPrefab.soundButton.onClick.removeAll(),this._headerPrefab.soundButton.onClick.add((()=>{this.playAudio(q),K&&("location"===K?this.sendAnalytics("audio",K,null):this.sendAnalytics("audio",K,this._data.isSchool?"school":"home"))}))}playAudio(q){this._playingSFX&&this._playingSFX.stop(),this._playingSFX=st.q.instance.prodigy.audio.playSFX(46,q)}setCharacter(q){this._headerPrefab.faceContainer.active=q}headerVisible(q=!0){this._headerPrefab&&(this._headerPrefab.title.GameObject.active=q,this._headerPrefab.soundButton.GameObject.active=q,this._headerPrefab.nextButton.GameObject.active=q,this._headerPrefab.backButton.GameObject.active=q)}nextClicked(){this._playingSFX&&this._playingSFX.stop(),this._headerPrefab.nextButton.currentState===X.ZIW.Disabled?this.disabledNextClicked():(st.q.instance.prodigy.audio.playSFX(18,"pop"),this.continueNext())}continueNext(){this.saveToData(!0),this.close(),this._headerPrefab.dispatchNext(this._customInputData),this.headerCleanup()}continueBack(){this.saveToData(!1),this.close(),this._headerPrefab.dispatchBack(this._customInputData),this.headerCleanup()}disabledNextClicked(){}backClicked(){this._playingSFX&&this._playingSFX.stop(),st.q.instance.prodigy.audio.playSFX(18,"pop"),this.continueBack()}disableNext(){this._headerPrefab.nextButton.setState(X.ZIW.Disabled)}enableNext(){this._headerPrefab.nextButton.setState(X.ZIW.Default)}static isScreenActive(q,K){return!0}headerCleanup(){this._headerPrefab.nextButton.onClick.remove(this.nextClicked,this),this._headerPrefab.backButton.onClick.remove(this.backClicked,this),this._headerPrefab=null}sendAnalytics(q,K,z,Y){X.Aq$.isDefined(Y)&&this.metricsManager.sendOnboardingFunnelEvent(Y)}onPrivacyPolicyClick(){this.customOnPopupOpen(),this.sendAnalytics("popup","redirect","privacy"),st.q.instance.prodigy.open.confirmationDialog(new Dh.k(this._localizer.getText("BUTTON_LEAVE_TEAM"),(()=>{this.customOnPopupClose(),il.I.openWebsite("www.prodigygame.com/privacy-policy/")}),this._localizer.getText("BUTTON_STAY_TEAM"),(()=>{this.customOnPopupClose()}),{atlas:it._.Ui_store_json,name:"icon-large-exclamation"},cd.E.Small,500,this._localizer.getText("LOGIN_LEAVE_GAME"),this._localizer.getText("LOGIN_LEAVE_BODY")))}onWebsiteLinkClick(){this.customOnPopupOpen(),this.sendAnalytics("popup","redirect","website"),st.q.instance.prodigy.open.confirmationDialog(new Dh.k(this._localizer.getText("BUTTON_LEAVE_TEAM"),(()=>{this.customOnPopupClose(),il.I.openWebsite("www.prodigygame.com")}),this._localizer.getText("BUTTON_STAY_TEAM"),(()=>{this.customOnPopupClose()}),{atlas:it._.Ui_store_json,name:"icon-large-exclamation"},cd.E.Small,500,this._localizer.getText("LOGIN_LEAVE_GAME"),this._localizer.getText("LOGIN_LEAVE_BODY")))}customOnPopupOpen(){}customOnPopupClose(){}close(){this._headerPrefab&&(this._headerPrefab.policyLink.onClicked.removeAll(),this._headerPrefab.websiteLink.onClicked.removeAll()),this._playingSFX&&this._playingSFX.stop(),this._ui&&this._ui.destroy(),super.close()}}let nl=class extends X.uAl{constructor(){super(...arguments),this._classCodeElement=null,this._messageSuccess=null,this._messageErrorEmpty=null,this._messageErrorInvalid=null,this._learnMoreText=null,this._footerTextObject=null,this._countryContainerObject=null,this._moreInfoButton=null,this._noCodeButton=null,this._title=null}get classCodeElement(){return this._classCodeElement}get messageSuccess(){return this._messageSuccess}get messageErrorEmpty(){return this._messageErrorEmpty}get messageErrorInvalid(){return this._messageErrorInvalid}get footerText(){return this._footerTextObject}get learnMoreText(){return this._learnMoreText}get countryContainerObject(){return this._countryContainerObject}get moreInfoButton(){return this._moreInfoButton}get noCodeButton(){return this._noCodeButton}get title(){return this._title}};(0,Q.Cg)([(0,X.x4W)("classCodeElement"),(0,Q.Sn)("design:type",pc.S)],nl.prototype,"_classCodeElement",void 0),(0,Q.Cg)([(0,X.x4W)("messageSuccess"),(0,Q.Sn)("design:type",X._mx)],nl.prototype,"_messageSuccess",void 0),(0,Q.Cg)([(0,X.x4W)("messageErrorEmpty"),(0,Q.Sn)("design:type",X._mx)],nl.prototype,"_messageErrorEmpty",void 0),(0,Q.Cg)([(0,X.x4W)("messageErrorInvalid"),(0,Q.Sn)("design:type",X._mx)],nl.prototype,"_messageErrorInvalid",void 0),(0,Q.Cg)([(0,X.x4W)("learnMoreText"),(0,Q.Sn)("design:type",X.EYj)],nl.prototype,"_learnMoreText",void 0),(0,Q.Cg)([(0,X.x4W)("footerTextObject"),(0,Q.Sn)("design:type",X.EYj)],nl.prototype,"_footerTextObject",void 0),(0,Q.Cg)([(0,X.x4W)("countryContainerObject"),(0,Q.Sn)("design:type",X._mx)],nl.prototype,"_countryContainerObject",void 0),(0,Q.Cg)([(0,X.x4W)("moreInfoButton"),(0,Q.Sn)("design:type",uc.$)],nl.prototype,"_moreInfoButton",void 0),(0,Q.Cg)([(0,X.x4W)("noCodeButton"),(0,Q.Sn)("design:type",uc.$)],nl.prototype,"_noCodeButton",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,X.nKb)("title"),(0,Q.Sn)("design:type",String)],nl.prototype,"_title",void 0),nl=(0,Q.Cg)([(0,X.EVk)("RegistrationClassCodePrefab")],nl);class al extends sl{constructor(q,K,z,Y){super(q,K,z,Y),this._prefabComponent=null,this._submissionError=!1,this._headerPrefab.backButton.GameObject.active=!1}static isScreenActive(q,K){return(!X.Aq$.isDefined(q.curriculumTreeID)||!X.Aq$.isDefined(q.educationData.curriculumTreeID))&&super.isScreenActive(q,K)}create(){super.create(),this._prefabComponent=this.loadFromPrefab(nl,Pi.l.RegistrationClassCode),this.changeTitle(this._prefabComponent.title),this.initializeAudio("classCodeAskTeacher","class_code"),X.Aq$.isDefined(this._data.classCode)||(this._data.classCode=""),this._spinner=this.add(st.q.instance.prodigy.create.sprite(640,350,it._.General_core_json,"loading")),this._spinner.anchor.set(.5,.5),st.q.instance.game.add.tween(this._spinner,this).to({angle:360},2e3,X.GS3.Linear.None,!0,0,te.s.MAX_SAFE_INTEGER,!1),this._spinner.visible=!1,this._prefabComponent.messageSuccess.active=!1,this._prefabComponent.messageErrorEmpty.active=!1,this._prefabComponent.messageErrorInvalid.active=!1,this._prefabComponent.footerText.text=this._localizer.getText("REGISTRATION_CLASS_CODE_FIND"),this._prefabComponent.learnMoreText.text=this._localizer.getText("REGISTRATION_LEARN_MORE"),this._prefabComponent.learnMoreText.drawUnderline(0,this._prefabComponent.learnMoreText.text.length),this._prefabComponent.classCodeElement.setStyle("text-align","center"),this._headerPrefab.backButton.GameObject.active=!1,this.disableNext(),this._customInputData="school",this.setCharacter(!0),this._prefabComponent.noCodeButton.onClick.add((()=>{st.q.instance.prodigy.audio.playSFX(18,"pop"),this._customInputData="home",this.continueNext()})),this._prefabComponent.moreInfoButton.onClick.add((()=>{this.sendAnalytics("get_class_code","click_button",null),st.q.instance.prodigy.open.learnMore("HEY_TEACHERS","CLASS_CODE_LEARN_MORE_HEADER","CLASS_CODE_LEARN_MORE_BODY",(()=>{this._prefabComponent.classCodeElement.setVisible(!0)}),(()=>{this._prefabComponent.classCodeElement.text="",this.updateDisplay(),st.q.instance.game.input.keyboard.clearCaptures(),this._prefabComponent.classCodeElement.setVisible(!1)}))})),st.q.instance.game.broadcaster.addAppListener(gi.bS.POST_MESSAGE_RECEIVED,((q,K)=>{"class-code-entry"===K.name&&(st.q.instance.game.input.keyboard.addKeyCapture([$o.D.BACKSPACE]),this._prefabComponent.classCodeElement.text=K.classCode,"undefined"===this._prefabComponent.classCodeElement.text?this._prefabComponent.classCodeElement.text="":(this.updateDisplay(),this.sendAnalytics("get_class_code","autofill_class_code",null)))}),this,st.q.instance.game),this.addListeners(),this.sendAnalytics("default_signup","class_code","school",Qh.l.EnterClassCode);"clever"===st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.userDataPlatform&&(this._customInputData="home",this.continueNext())}addListeners(){this._prefabComponent.classCodeElement.onFocusChanged.add(this.updateDisplay,this),this._prefabComponent.classCodeElement.enablePerKeyEvents(!0),this._prefabComponent.classCodeElement.onTextChanged.add(this.updateDisplay,this)}updateDisplay(){this.setInputColour(this._prefabComponent.classCodeElement,!1),this._prefabComponent.messageErrorEmpty.active=!1,this._prefabComponent.messageErrorInvalid.active=!1,this._prefabComponent.messageSuccess.active=!1,this._headerPrefab.nextButton.currentState===X.ZIW.Disabled&&this.setCharacter(!0);let q=this._prefabComponent.classCodeElement.text;q=zh.b.reformatClassCode(q),this._prefabComponent.classCodeElement.text=q,0===q.length?(this.setCharacter(!0),this.disableNext()):zh.b.isValidClassCode(q)?(this._data.classCode=q,this.enableNext()):this._headerPrefab.nextButton.currentState!==X.ZIW.Disabled&&(this.setCharacter(!0),this.disableNext())}disabledNextClicked(){this.showInvalidClassCodeMessage()}showInvalidClassCodeMessage(){this._spinner.visible=!1,this.setCharacter(!0),this.setInputColour(this._prefabComponent.classCodeElement,!0),this._prefabComponent.messageSuccess.active=!1,this.isEmptyInput(this._prefabComponent.classCodeElement)?this._prefabComponent.messageErrorEmpty.active=!0:(this._prefabComponent.messageErrorInvalid.active=!0,this._submissionError||(this._submissionError=!0,st.q.instance.prodigy.audio.playSFX(46,"classCodeSubmitError")))}saveToData(q){q||(this._data.classCode="")}setInputColour(q,K=!1){K?(q.setStyle("border","2px solid red"),q.setStyle("background-color","#ffcccc")):(q.setStyle("border","1px solid rgb(54, 54, 54)"),q.setStyle("background-color","#ffffff"))}isEmptyInput(q){return!(X.Aq$.isDefined(q.text)&&0!==q.text.length)}customOnPopupOpen(){this._prefabComponent.classCodeElement.setVisible(!1)}customOnPopupClose(){this._prefabComponent.classCodeElement.setVisible(!0)}continueNext(){if("school"===this._customInputData&&this._data.classCode.length>0){this._spinner.visible=!0,this.disableNext();st.q.instance.prodigy.gameContainer.get("774-4659").attachClassCode(this._data.classCode,(()=>this.classCodeAttach(!0)),(()=>this.classCodeAttach(!1))).catch(X.RQr.createHandler("Error attaching class code"))}else{this._customInputData="home",this._spinner.visible=!0;const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q.educationData.curriculumTreeID=this._data.curriculumTreeID,q.curriculumTreeID=this._data.curriculumTreeID,this.mutateCurriculumAndContinue(this._data.curriculumTreeID).catch(X.RQr.createHandler("Error setting curriculum"))}}classCodeAttach(q){if(q){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q.isClassCodeAttached=!0,q.data.classCodeUpdateTimestamp=Date.now();st.q.instance.prodigy.gameContainer.get("774-4659").getCurriculumAndGrade(q).then((K=>{this._data.grade=K.chosenGrade,this._data.curriculumTreeID=K.curriculumTreeID,this._data.skipNextRequery=!0,q.onEducationLoaded(K),q.setEducation(K.chosenGrade,K.curriculumTreeID),super.continueNext()})).catch((()=>{this.showInvalidClassCodeMessage()}))}else this.showInvalidClassCodeMessage()}mutateCurriculumAndContinue(q){const K=Object.create(null,{continueNext:{get:()=>super.continueNext}});return(0,Q.sH)(this,void 0,void 0,(function*(){const z=st.q.instance.prodigy.gameContainer.get("774-4659"),Y=(q,K)=>{Nn.J.logSetCurriculumFailed()};X.Aq$.isDefined(q)&&(yield z.setCurriculum({curriculumTreeID:q},void 0,Y).catch(X.RQr.createHandler("Error setting curriculum"))),this._spinner.visible=!1,K.continueNext.call(this)}))}removeListeners(){this._prefabComponent.classCodeElement.onFocusChanged.dispose(),this._prefabComponent.classCodeElement.enablePerKeyEvents(!1),this._prefabComponent.classCodeElement.onTextChanged.dispose()}destroy(){this._headerPrefab.backButton.setState(X.ZIW.Default),this._headerPrefab.backButton.inputEnabled=!0,this._headerPrefab.backButton.GameObject.active=!0,st.q.instance.game.broadcaster.removeAppListener(gi.bS.POST_MESSAGE_RECEIVED,this,st.q.instance.game),this._prefabComponent.noCodeButton.onClick.removeAll(),this.removeListeners(),super.destroy()}}var rl=z(19633),ol=z(27952);let hl=class extends X.uAl{constructor(){super(...arguments),this._title=null,this._soundButton=null,this._policyLink=null,this._websiteLink=null,this._nextButton=null,this._backButton=null,this._faceContainer=null,this._onNext=new X.HN0,this._onBack=new X.HN0,this._onDone=new X.HN0}get title(){return this._title}get soundButton(){return this._soundButton}get policyLink(){return this._policyLink}get websiteLink(){return this._websiteLink}get faceContainer(){return this._faceContainer}get nextButton(){return this._nextButton}get backButton(){return this._backButton}get onNext(){return this._onNext}get onBack(){return this._onBack}get onDone(){return this._onDone}dispatchNext(q){this._onNext.dispatch(q)}dispatchBack(q){this._onBack.dispatch(q)}dispatchDone(){this._onDone.dispatch()}destroy(){this._onNext.dispose(),this._onBack.dispose(),this._onDone.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],hl.prototype,"_title",void 0),(0,Q.Cg)([(0,X.MnK)(uc.$),(0,Q.Sn)("design:type",uc.$)],hl.prototype,"_soundButton",void 0),(0,Q.Cg)([(0,X.MnK)(ol.t),(0,Q.Sn)("design:type",ol.t)],hl.prototype,"_policyLink",void 0),(0,Q.Cg)([(0,X.MnK)(ol.t),(0,Q.Sn)("design:type",ol.t)],hl.prototype,"_websiteLink",void 0),(0,Q.Cg)([(0,X.MnK)(rl.S),(0,Q.Sn)("design:type",rl.S)],hl.prototype,"_nextButton",void 0),(0,Q.Cg)([(0,X.MnK)(rl.S),(0,Q.Sn)("design:type",rl.S)],hl.prototype,"_backButton",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],hl.prototype,"_faceContainer",void 0),hl=(0,Q.Cg)([(0,X.EVk)("RegistrationHeaderPrefab")],hl);var cl=z(72937);class dl extends sl{constructor(q,K,z,Y){super(q,K,z,Y)}create(){super.create(),this.headerVisible(!1),this._data.showLoaderAtEndOfFlow&&cl.u.showLoaderIfHidden(),st.q.instance.prodigy.education.loadAndInitEducationData().then((()=>this.doneClicked())).catch((q=>{var K;null===(K=st.q.instance.prodigy.game.state.getCurrentState())||void 0===K||K.onError(tl.S.makeLoadSkillsError(q))}))}saveToData(q){this._data.loginState=1}doneClicked(){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.forceSaveCharacter(),this.saveToData(!0),this.close(),this._headerPrefab.dispatchDone()}}class ll extends class{get branchName(){return this._branchName}get onVisited(){return this._onVisited}set onVisited(q){this._onVisited=q}get isNodeActive(){return this._isNodeActive}constructor(q,K,z){this._children=[],this._onVisited=q,this._isNodeActive=z,this._branchName=K}addChild(q){this._children.push(q)}getAllChildNodes(){return this._children}getChildNodeByName(q){for(let K=0;K(0,Q.sH)(this,[q],void 0,(function*([q,K]){if(K){if(this.game)return this._cachedGradeInfo=K,this._prefabComponent?this.populateGradesTiles(this._cachedGradeInfo.data.curriculum):this._data.curriculumGradeInfo=this._cachedGradeInfo.data.curriculum,Promise.resolve();X.VyI.log("Grade info returned but RegistrationChooseGrade has been destroyed.",X.$bb.Warning)}else if(q)throw new Error(q.getErrorMessage())})))).catch((q=>{X.VyI.log(`Failed to get grade data for curriculum with ID ${Z} - ${q.message}`,X.$bb.Warning),st.q.instance.prodigy.audio.playSFX(46,"oops"),st.q.instance.prodigy.open.informationDialog(new Sd.Z("PARENT_ATTACH_TRY_AGAIN",(()=>{this.continueBack()}),cd.E.Small,500,"ERROR","ERROR_DIALOG_BODY",void 0,void 0,void 0,Pi.l.ErrorDialogHeader,Pi.l.ErrorDialogFooter))}))}fetchCurriculumGradeResponseData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){let K=null,z=null;const Y=st.q.instance.prodigy.gameContainer.get("800-a786");return yield Y.sendRequest(`query CurriculumGrades { curriculum(id:${q}){ id name grades{ nodes { name id number } } } }`).then((q=>{K=q})).catch((q=>{z=new Et._(q)})),[z,K]}))}create(){super.create(),this.disableNext(),this.changeTitle(""),this._prefabComponent=this.loadFromPrefab(ul,pl.CHOOSE_GRADE_PREFAB_ID),this._prefabComponent.footerTextObject.text=this._localizer.getText("REGISTRATION_WHY_NEED_INFO");const q=this._localizer.getText("REGISTRATION_LEARN_MORE");this._prefabComponent.clickHereTextObject.text=q,this._prefabComponent.clickHereTextObject.drawUnderline(0,q.length),this._prefabComponent.moreInfoButton.onClick.add((()=>{st.q.instance.prodigy.open.informationDialog(new Sd.Z("BUTTON_OKAY_CAPITAL",null,cd.E.Small,500,"REGISTRATION_WHY_NEED_GRADE","REGISTRATION_WHY_NEED_GRADE_REASON")),this.sendAnalytics("popup","information","grade")})),this.hasCorrectGradeInfosForCurriculum(this._data.curriculumTreeID,this._data.curriculumGradeInfo)&&this.populateGradesTiles(this._data.curriculumGradeInfo),this.setCharacter(!0),this.sendAnalytics("default_signup","grade","home",Qh.l.EnterGrade)}populateGradesTiles(q){const K=[],z=this._prefabComponent.GameObject.findComponent(Md.O),Y=X.Aq$.isDefined(this._data.grade)?this._data.grade:-1;let Q=pl.GRADE_LOC_INFOS[pl.DEFAULT_GRADE_LOC_INFOS_INDEX];q.grades.nodes.length>0&&(Q=pl.determineLocInfo(q.grades.nodes[0].name,pl.GRADE_LOC_INFOS,Q,this._localizer)),this.changeTitle(this._localizer.getText(Q.titleKey)),this.initializeAudio(Q.audioKey,"grade");const Z=this._localizer.getText(Q.gradeTextKey);for(let X=0;X{st.q.instance.prodigy.audio.playSFX(18,"pop"),this.onGradeSelected(Q.number)})),K.push(tt),z.addSelectable(tt.toggleObject),Q.number===Y&&(z.setItemSelected(tt.toggleObject,!0),this.onGradeSelected(Q.number))}const J=this._prefabComponent.gradeContainerObject.findComponent(X.XVE);this.positionGradeTiles(K,J.widthDelta,J.heightDelta,pl.BUTTON_SPACING)}saveToData(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q?(this._data.grade=K.grade=this._selectedGrade,K.updated=!0):(delete this._data.grade,K.grade=null),this._cachedGradeInfo&&(this._data.curriculumGradeInfo=this._cachedGradeInfo.data.curriculum)}positionGradeTiles(q,K,z,Y){if(q.length<=0)return void X.VyI.log("positionGradeTiles - no grades to position",X.$bb.Warning);const Q=q[0].GameObject.findComponent(X.XVE),Z=Q.widthDelta+Y,J=Q.heightDelta+Y,tt=Math.min(Math.floor(K/Z),q.length),et=Math.floor(.5*(K-tt*Z))+.5*Y,it=Math.floor(.5*(z-Math.ceil(q.length/tt)*J))+.5*Y;for(let X=0;X0}static determineLocInfo(q,K,z,Y){let Q=z;for(let X=0;Xsuper.continueNext}});return(0,Q.sH)(this,void 0,void 0,(function*(){const z=st.q.instance.prodigy.gameContainer.get("774-4659"),Y=(q,K)=>{Nn.J.logSetInitialGradesFailed()};X.Aq$.isDefined(q)&&(yield z.setInitialGrades({grade:q},void 0,Y).catch(X.RQr.createHandler("Error setting init grades"))),K.continueNext.call(this)}))}static isScreenActive(q,K){return(!X.Aq$.isDefined(q.educationData.grade)||!X.Aq$.isDefined(q.educationData.chosenGrade))&&super.isScreenActive(q,K)}}pl.CHOOSE_GRADE_PREFAB_ID=64,pl.GRADE_BUTTON_PREFAB_ID=65,pl.BUTTON_SPACING=20,pl.GRADE_LOC_INFOS=[{gradeTextKey:"REGISTRATION_GRADE",titleKey:"REGISTRATION_GRADE_TITLE",audioKey:"whatGrade"},{gradeTextKey:"REGISTRATION_LEVEL",titleKey:"REGISTRATION_LEVEL_TITLE",audioKey:"whatLevel"},{gradeTextKey:"REGISTRATION_YEAR",titleKey:"REGISTRATION_YEAR_TITLE",audioKey:"whatYear"},{gradeTextKey:"REGISTRATION_CLASS",titleKey:"REGISTRATION_CLASS_TITLE",audioKey:"whatClass"}],pl.DEFAULT_GRADE_LOC_INFOS_INDEX=0;class vl{static fetchAvailableCurriculumCountries(){return(0,Q.sH)(this,void 0,void 0,(function*(){let q=null,K=null;const z=st.q.instance.prodigy.gameContainer.get("800-a786");return yield z.sendRequest(vl.FETCH_CURRICULUM_OFFERINGS).then((K=>{q=K})).catch((q=>{K=new Et._(q)})),[K,q]}))}static removeSubdivisionsWithNoDefaultCurriculum(q){q.data.curriculumOfferings.countries.forEach((q=>{q.subdivisions=q.subdivisions.filter((q=>null!==q.defaultCurriculum))}))}}vl.FETCH_CURRICULUM_OFFERINGS="query Find_Countries_With_Offerings {curriculumOfferings { defaultCurriculum(subject:MATH) { name id } countries { name id defaultCurriculum(subject:MATH){ name id } subdivisions{ id name defaultCurriculum(subject:MATH){ name id }}}}}";let gl=class extends X.uAl{constructor(){super(...arguments),this._learnMoreText=null,this._footerTextObject=null,this._countryContainerObject=null,this._moreInfoButton=null}get footerText(){return this._footerTextObject}get learnMoreText(){return this._learnMoreText}get countryContainerObject(){return this._countryContainerObject}get moreInfoButton(){return this._moreInfoButton}};(0,Q.Cg)([(0,X.x4W)("learnMoreText"),(0,Q.Sn)("design:type",X.EYj)],gl.prototype,"_learnMoreText",void 0),(0,Q.Cg)([(0,X.x4W)("footerTextObject"),(0,Q.Sn)("design:type",X.EYj)],gl.prototype,"_footerTextObject",void 0),(0,Q.Cg)([(0,X.x4W)("countryContainerObject"),(0,Q.Sn)("design:type",X._mx)],gl.prototype,"_countryContainerObject",void 0),(0,Q.Cg)([(0,X.x4W)("moreInfoButton"),(0,Q.Sn)("design:type",uc.$)],gl.prototype,"_moreInfoButton",void 0),gl=(0,Q.Cg)([(0,X.EVk)("RegistrationChooseCountryPrefab")],gl);let ml=class extends X.uAl{constructor(){super(...arguments),this._countryTextObjects=[],this._toggleObject=null}get countryText(){return this._countryTextObjects[0].text}set countryText(q){for(let K=0;K(0,Q.sH)(this,[q],void 0,(function*([q,K]){return K?(vl.removeSubdivisionsWithNoDefaultCurriculum(K),this._cachedCurriculumLocationInfos=K.data.curriculumOfferings.countries,this._cachedCurriculumLocationInfos.push({name:(0,Ka.k)("ACCOUNT_LOCATION_TITLE_OTHER"),id:"Other",defaultCurriculum:K.data.curriculumOfferings.defaultCurriculum,subdivisions:[]}),this._prefabComponent&&this.populateCountries(this._cachedCurriculumLocationInfos),Promise.resolve()):(X.VyI.log(`Failed to get curriculum country data - ${q.getErrorMessage()}`,X.$bb.Warning),Promise.reject(new Error("No curriculum country data")))})))).catch((()=>{this.game&&(st.q.instance.prodigy.audio.playSFX(46,"oops"),st.q.instance.prodigy.open.informationDialog(new Sd.Z("PARENT_ATTACH_TRY_AGAIN",(()=>{this.continueBack()}),cd.E.Small,500,"ERROR","ERROR_DIALOG_BODY",void 0,void 0,void 0,Pi.l.ErrorDialogHeader,Pi.l.ErrorDialogFooter)))}))}create(){super.create(),this.disableNext(),this._prefabComponent=this.loadFromPrefab(gl,yl.CHOOSE_COUNTRY_PREFAB_ID),this.changeTitle(this._localizer.getText("REGISTRATION_LOCATION_TITLE")),this.initializeAudio("whereYouLive","country"),this._prefabComponent.footerText.text=this._localizer.getText("REGISTRATION_WHY_NEED_INFO"),this._prefabComponent.learnMoreText.text=this._localizer.getText("REGISTRATION_LEARN_MORE"),this._prefabComponent.learnMoreText.drawUnderline(0,this._prefabComponent.learnMoreText.text.length),this._prefabComponent.moreInfoButton.onClick.add((()=>{st.q.instance.prodigy.open.informationDialog(new Sd.Z("BUTTON_OKAY_CAPITAL",null,cd.E.Small,500,"REGISTRATION_LOCATION_DIALOG_TITLE","REGISTRATION_LOCATION_DIALOG_BODY")),this.sendAnalytics("popup","information","location")})),this.hasCurriculumLocationInfos(this._cachedCurriculumLocationInfos)&&this.populateCountries(this._cachedCurriculumLocationInfos),this.setCharacter(!1),this.sendAnalytics("default_signup","country","home",Qh.l.EnterCountry)}populateCountries(q){const K=[],z=st.q.instance.prodigy.gameContainer.get("983-05a7"),Y=this._prefabComponent.GameObject.findComponent(Md.O);for(let Z=0;Z{st.q.instance.prodigy.audio.playSFX(18,"pop"),this.onCountrySelected(Q.id)})),K.push(tt),Y.addSelectable(tt.toggleObject),Q.id===J&&(Y.setItemSelected(tt.toggleObject,!0),this.onCountrySelected(Q.id))}const Q=this._prefabComponent.countryContainerObject.findComponent(Jd.$).rootContainer;this.positionCountryTiles(K,Q.width,Q.height,yl.BUTTON_SPACING)}positionCountryTiles(q,K,z,Y){if(q.length<=0)return void X.VyI.log("positionCountryTiles - no grades to position",X.$bb.Warning);const Q=q[0].GameObject.findComponent(X.XVE),Z=Q.widthDelta+Y,J=Q.heightDelta+Y,tt=Math.min(Math.floor(K/Z),q.length),et=Math.floor(.5*(K-tt*Z))+.5*Y,it=Math.floor(.5*(z-Math.ceil(q.length/tt)*J))+.5*Y;for(let X=0;X0?(this._customInputData="showsub",delete this._data.curriculumTreeID):(this._customInputData="skipsub",this._data.curriculumTreeID=q.defaultCurriculum.id)}else delete this._data.selectedCountryId,delete this._data.curriculumTreeID}hasCurriculumLocationInfos(q){return q&&q.length>0}onCountrySelected(q){this._selectedCountryId=q,this.enableNext()}findCountryInfo(q,K){return K.find((K=>K.id===q))}static isScreenActive(q,K){if(X.Aq$.isDefined(K.selectedCountryId)&&X.Aq$.isDefined(K.curriculumTreeID))return!1;return!X.Aq$.isDefined(q.curriculumTreeID)}}yl.CHOOSE_COUNTRY_PREFAB_ID=67,yl.COUNTRY_BUTTON_PREFAB_ID=66,yl.BUTTON_SPACING=20;var _l=z(47716),El=z(76501);let wl=class extends X.uAl{constructor(){super(...arguments),this._moreInfoButton=null}get moreInfoButton(){return this._moreInfoButton}};(0,Q.Cg)([(0,X.x4W)("moreInfoButton"),(0,Q.Sn)("design:type",uc.$)],wl.prototype,"_moreInfoButton",void 0),wl=(0,Q.Cg)([(0,X.EVk)("RegistrationChooseSubPrefab")],wl);class Tl extends sl{constructor(){super(...arguments),this._prefabComponent=null,this._selectedCurriculumTreeId=-1,this._selectedSubName="",this._selectedSubLocation=null,this._selectedTextCallback=null}create(){super.create(),this.disableNext();const q=Tl.findCountryInfo(this._data.selectedCountryId,this._data.curriculumLocationInfos);q.subdivisions.length>0?(this._prefabComponent=this.loadFromPrefab(wl,Tl.CHOOSE_SUB_PREFAB_ID),this.changeTitle(q.name),"US"===q.id?this.initializeAudio("chooseState","sub-country"):this.initializeAudio("whereYouLive","sub-country"),this.sendAnalytics("default_signup","sub-country","home",Qh.l.EnterSubCountry),this._prefabComponent.moreInfoButton.onClick.add((()=>{this.onSubSelected(q.defaultCurriculum.id,"",null,!1),this.continueNext()})),this.populateRegions(q)):X.VyI.log("No sub data found.",X.$bb.Error),this.setCharacter(!1)}populateRegions(q){const K=st.q.instance.prodigy.gameContainer.get("983-05a7");this._scrollViewComponent=this.loadFromPrefab(_l.H,Pi.l.RegistrationScrollView),this._scrollViewComponent.GameObject.legacyTransform.group.addChild(this._scrollViewComponent.getCollisionBox()),this._scrollViewComponent.GameObject.legacyTransform.x=250,this._scrollViewComponent.GameObject.legacyTransform.y=210;let z=null;const Y=[],Q=q.subdivisions.sort(((q,K)=>{const z=q.name.toLowerCase(),Y=K.name.toLowerCase();return zY?1:0}));let Z="";for(let J=0;JK.loadFromGUID(Pi.l.RegistrationCell,null),this._scrollViewComponent._createSection=()=>K.loadFromGUID(Pi.l.RegistrationSection,null),z.data.length>1&&(this._scrollBarComponent=this.loadFromPrefab(fc.$,Pi.l.RegistrationScrollBar),this._scrollBarComponent._scrollView=this._scrollViewComponent,this._scrollBarComponent.GameObject.legacyTransform.group.addChild(this._scrollBarComponent.getCollisionBox()),this._scrollBarComponent.GameObject.legacyTransform.x=1015,this._scrollBarComponent.GameObject.legacyTransform.y=210,this._scrollViewComponent.verticalScrollBar=this._scrollBarComponent),this._scrollViewComponent.populateContentView()}saveToData(q){q?(this._data.curriculumTreeID=this._selectedCurriculumTreeId,this._data.selectedSubCountryName=this._selectedSubName):(delete this._data.curriculumTreeID,delete this._data.selectedSubCountryName)}onSubSelected(q,K,z,Y=!0,Q){Y&&st.q.instance.prodigy.audio.playSFX(18,"pop"),this._selectedSubLocation&&this._selectedSubLocation!==z&&(this._selectedSubLocation.active=!1,this._selectedTextCallback()),this._selectedSubLocation=z,this._selectedTextCallback=Q,this._selectedCurriculumTreeId=q,this._selectedSubName=K,this.enableNext()}static findCountryInfo(q,K){return null==K?void 0:K.find((K=>K.id===q))}static isScreenActive(q,K){if(X.Aq$.isDefined(K.selectedCountryId)&&X.Aq$.isDefined(K.curriculumTreeID))return!1;const z=X.Aq$.isDefined(q.curriculumTreeID),Y=Tl.findCountryInfo(K.selectedCountryId,K.curriculumLocationInfos);return(null==Y?void 0:Y.subdivisions.length)>0&&!z}close(){var q,K,z,Y,Q;super.close(),!1===(null===(q=null==this?void 0:this._prefabComponent.GameObject)||void 0===q?void 0:q.isDestroyed)&&this._prefabComponent.GameObject.destroy(),!1===(null===(z=null===(K=this._scrollViewComponent)||void 0===K?void 0:K.GameObject)||void 0===z?void 0:z.isDestroyed)&&this._scrollViewComponent.GameObject.destroy(),!1===(null===(Q=null===(Y=this._scrollBarComponent)||void 0===Y?void 0:Y.GameObject)||void 0===Q?void 0:Q.isDestroyed)&&this._scrollBarComponent.GameObject.destroy()}}Tl.CHOOSE_SUB_PREFAB_ID=68;class Sl extends sr.W{constructor(q,K,z,Y=!0,Q=!1){super(q,K,200,{},[it._.General_icons_json,it._.Ui_bam_json,it._.Ui_buttons_json,it._.Ui_store_json,it._.Ui_card_json,it._.Ui_registration_json,it._.Ui_icons_json,it._.Ui_panels_json,ht.c.Sfx_store_equip,ht.c.Sfx_store_purchase,Gn.t.Tileset_collisions_png,Gn.t.Tileset_firefly_new_png,"map-forest-b8","map-pathing"]),this.prefabRoot=null,this._data={},this.headerPrefab=null,this._onEndCallback=z,this._createBackdrop=Y;const Z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;X.Aq$.isDefined(Z.curriculumTreeID)&&X.Aq$.isDefined(Z.educationData.curriculumTreeID)?this._awaitingLocationPromise=Promise.resolve():this._awaitingLocationPromise=this.autoSelectCountryAndSubdivision(),this._data.soundHasBeenPlayed=[],this._data.showLoaderAtEndOfFlow=Q,this._activePlayer=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player}create(){super.create(),this._awaitingLocationPromise.finally((()=>{this.initMenu()}))}initMenu(){if(this._createBackdrop){const q=new Zd(st.q.instance.game,this.prefabRoot);this.prefabRoot[Ch.E.ForegroundLayer]=st.q.instance.game.add.group(this.prefabRoot),this.prefabRoot[Ch.E.BackgroundLayer]=st.q.instance.game.add.group(this.prefabRoot),q.render({mapName:"map-forest-b8"}),this.prefabRoot.addChild(q.above)}const q=st.q.instance.prodigy.gameContainer.get("983-05a7").loadFromGUID(Pi.l.RegistrationHeader);this.headerPrefab=q.findComponentInChildren(hl),this.prefabRoot.addChild(q.findComponent(Jd.$).rootContainer);const K=st.q.instance.prodigy.create.sprite(0,0,it._.Npc_face_noot_json,"face_0");K.scale.x=-1,this.headerPrefab.faceContainer.findComponent(Jd.$).rootContainer.addChild(K),this.headerPrefab.faceContainer.active=!1,this.createFlowTree(),this.flowTreeTraverser.currentNode.isNodeActive(this._activePlayer,this._data)?(this.flowTreeTraverser.currentNode.shouldHideLoader()&&window.hideGameLoader(),this.flowTreeTraverser.start()):this.getNextNode(),this.headerPrefab.onNext.add((()=>{this.flowTreeTraverser.setNodeAsVisited(this.flowTreeTraverser.currentNode),this.setupDataAndGetNextNode()}),this),this.headerPrefab.onBack.add(this.getPrevNode,this),this.headerPrefab.onDone.add(this.setupDataAndGetNextNode,this),this.metricsManager.sendOnboardingFunnelEvent(Qh.l.SignIn),jt.pF.isDeprecatedIOS()&&st.q.instance.prodigy.open.informationDialog(jt.pF.PERFORMANCE_WARNING_CONFIG)}createFlowTree(){const q=X.Aq$.isDefined(this._activePlayer.curriculumTreeID),K=this._activePlayer.hasGrade,z=this._activePlayer.classIDs.length>0;let Y=null;const Q=this.createTreeNode(dl,"success",dl.isScreenActive,!1);if(z&&K&&q)Y=Q;else{const z=[this.createTreeNode(al,"classCode",al.isScreenActive,!0),this.createTreeNode(yl,"country",yl.isScreenActive,!0),this.createTreeNode(Tl,"subdivision",Tl.isScreenActive,!0),this.createTreeNode(pl,"grade",pl.isScreenActive,!0),Q];!K&&q&&(this._data.curriculumTreeID=this._activePlayer.curriculumTreeID),z.forEach(((q,K)=>{Kst.q.instance.prodigy.open.registration(q,this._data,this.headerPrefab)),K,z,Y)}getNextNode(){this.flowTreeTraverser.getNextChildNode()?this.flowTreeTraverser.getNextChildNode().isNodeActive(this._activePlayer,this._data)?(this.flowTreeTraverser.nextNode(),this.toggleBackVisibility(this.flowTreeTraverser.visitedNodes.length>=1),this.flowTreeTraverser.currentNode.shouldHideLoader()&&window.hideGameLoader()):(this.flowTreeTraverser.currentNode=this.flowTreeTraverser.getNextChildNode(),this.getNextNode()):this.endFlow()}getPrevNode(){this.toggleBackVisibility(this.flowTreeTraverser.visitedNodes.length>1),this.flowTreeTraverser.prevNode()||this.endFlow()}toggleBackVisibility(q){this.headerPrefab.backButton.GameObject.active=q}endFlow(){if(this.headerPrefab.onNext.removeAll(),this.headerPrefab.onBack.removeAll(),this.headerPrefab.onDone.removeAll(),this._onEndCallback){const q=X.Aq$.isDefined(this._data.loginState)?this._data.loginState:0,K={username:this._data.username,password:this._data.password};1===q&&this.metricsManager.sendOnboardingFunnelEvent(Qh.l.FirstLogin),this._onEndCallback(q,K)}this.close()}autoSelectCountryAndSubdivision(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;try{const Q=st.q.instance.prodigy.gameContainer.get("577-9956"),[,Z]=yield Q.getData(),[,J]=yield vl.fetchAvailableCurriculumCountries();vl.removeSubdivisionsWithNoDefaultCurriculum(J);const tt=null===(K=null===(q=null==J?void 0:J.data)||void 0===q?void 0:q.curriculumOfferings)||void 0===K?void 0:K.countries.find((q=>q.id===Z.country.iso_code));let et=null,it=null;if((null==Z?void 0:Z.subdivisions)&&(null==tt?void 0:tt.subdivisions))for(const q of Z.subdivisions){const K=tt.subdivisions.find((K=>K.name===q.name));if(et=null==K?void 0:K.defaultCurriculum.id,it=null==K?void 0:K.name,et)break}this._data.selectedCountryId=(null==tt?void 0:tt.id)||"Other",this._data.curriculumTreeID=et||(null===(z=null==tt?void 0:tt.defaultCurriculum)||void 0===z?void 0:z.id)||(null===(Y=null==J?void 0:J.data)||void 0===Y?void 0:Y.curriculumOfferings.defaultCurriculum.id),this._data.selectedSubCountryName=it||"";const nt=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!al.isScreenActive(nt,this._data)){const q=st.q.instance.prodigy.gameContainer.get("774-4659");nt.educationData.curriculumTreeID=this._data.curriculumTreeID,nt.curriculumTreeID=this._data.curriculumTreeID;const K=(q,K)=>{Nn.J.logSetCurriculumFailed()};yield q.setCurriculum({curriculumTreeID:this._data.curriculumTreeID},void 0,K).catch(X.RQr.createHandler("Error setting curriculum"))}}catch(Q){X.VyI.log("Error sending first login event",X.$bb.Error)}}))}setupDataAndGetNextNode(){if(this.flowTreeTraverser.getNextChildNode())return this._data.skipNextRequery||this.flowTreeTraverser.getNextChildNode().shouldSkipRequery()?(this._data.skipNextRequery=!1,void this.getNextNode()):void this.setupEducationData().catch((q=>{var K;null===(K=st.q.instance.prodigy.game.state.getCurrentState())||void 0===K||K.onError(q)}));this.endFlow()}setupEducationData(){return(0,Q.sH)(this,void 0,void 0,(function*(){try{const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=st.q.instance.prodigy.gameContainer.get("774-4659"),z=yield X.Egh.autoRetry((()=>(0,Q.sH)(this,void 0,void 0,(function*(){return K.getCurriculumAndGrade(q)})))),Y=Object.assign(Object.assign({},z),{goalId:q.goalId});q.onEducationLoaded(Y),this.getNextNode()}catch(e){throw tl.S.makeLoadSkillsError(e)}}))}close(){this._data.soundHasBeenPlayed=[],this.prefabRoot.destroy(),this.headerPrefab.destroy(),super.close()}}var Al=z(62248);var Cl,Ol=z(64868),Il=z(43858);!function(q){q.V1="shop_v1_",q.V2="shop_v2_",q.V3="shop_v3_"}(Cl||(Cl={}));var Dl=z(59701),Rl=z(45385),Pl=z(21644),Ml=z(88131),Nl=z(90744),xl=z(10471);class Ll extends sr.W{constructor(q,K,z,Y,Q){super(q,K,70,{},[it._.Ui_store_json,it._.Ui_card_json,it._.Ui_buttons_json,it._.Ui_raster_icons_json,ht.c.Sfx_store_equip,ht.c.Sfx_store_purchase,ht.c.Sfx_button_disabled_state,ht.c.Sfx_tab_click,it._.Ui_raster_icons_json].concat(null!=Y?Y:[])),this._closeCallback=null,this.onItemPurchased=new X.HN0,this.storeData=null,this.storeID=-1,this.petPurchaseLevel=1,this._isPurchaseInProgress=!1,this.game=q,this.storeID=z,this._closeCallback=Q,this.isFullScreenUI=!0}getStore(){return this.storeData}buyItem(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._isPurchaseInProgress)return Ml.Q.success(!1);const K=Ee.t.getItem(q.getType(),q.getID()),z=q.getCost()[0],Y=this.storeData.getName(),Q=st.q.instance.prodigy.gameContainer.get("20f-5f67");let Z=K;Q.shop.sendShopPurchaseCompletedEvent(Cl.V2,this.storeData,q);const J=`${Cl.V2}${this.storeData.getName()}`,tt={sink_id:J,sink_type:On.C.Shop,instance_type:Li.N.Interface,instance_id:Q.featureCommon.getCurrentInterfaceID(J)};try{if(this._isPurchaseInProgress=!0,yield this._paymentManager.spend({currency:z.getID(),value:z.getAmount(),type:z.getType()},"store",tt),X.Aq$.isDefined(K.data)?Z=K.data:"pet"===q.getType()&&(Z={ID:q.getID()}),X.Aq$.isDefined(K.data)&&"pet"===q.getType()){const K=new Ta.R(this.game,{ID:q.getID()}).getMaxHearts(this.petPurchaseLevel);Z=Object.assign(Object.assign({},Z),{hp:K})}Nn.J.bagItem({ID:q.getID(),type:q.getType(),N:1,data:Z},this.game,"store",Y,{source_type:On.C.Shop,instance_type:Li.N.Interface,instance_id:Q.featureCommon.getCurrentInterfaceID(J)}),this.sendBuyAnalytics(q,K,z),xl.B.includes(z.getID())&&this.sendSecureCurrencySpendAnalytics(z,tt).catch(X.RQr.createHandler("Error sending secure item spend analytics")),this.onItemPurchased.dispatch(q)}catch(e){return Ml.Q.error(e)}finally{this._isPurchaseInProgress=!1}return Ml.Q.success(!0)}))}sendBuyAnalytics(q,K,z){const Y=X.Aq$.isDefined(K.member)&&1===K.member,Q=st.q.instance.prodigy.gameContainer,Z=Q.get("ad2-c5b2").player;if(Y&&!Z.hasMembership()){let K={};"pet"===q.getType()&&Z.kennel.isFull()||(K={conversionFunnelName:xn.o.FunnelBuyMemberItem,conversionFunnelMetadata:`${q.getType()}-${q.getID()}`});const z=Dn.P.shouldUseUnifiedConversionFlow(xn.o.FunnelBuyMemberItem)?Rn.R.UnifiedConversionFlow:Nn.J.showYouTubeMembershipAd(this.game,!0)?Rn.R.Video:Rn.R.Static;Q.get("20f-5f67").purchase.sendFunnelStart({type:"Store-Buy-Member-Item",category:"Store",contentId:`${q.getType()}-${q.getID()}`,adType:z,adVersion:Dn.P.getAdVersion(xn.o.FunnelBuyMemberItem)})}}sendSecureCurrencySpendAnalytics(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z,Y;const Q=yield Ee.t.secureGetItem(q.getType(),q.getID());this._segment.item.sendItemRemovedEvent(q.getID(),null!==(Y=null===(z=null==Q?void 0:Q.data)||void 0===z?void 0:z.name)&&void 0!==Y?Y:"unknown",q.getType(),q.getAmount(),K)}))}close(){this._closeCallback&&this._closeCallback(),super.close()}destroy(){this.onItemPurchased.dispose(),super.destroy()}}(0,Q.Cg)([(0,Ge.b)("ec3-31a0"),(0,Q.Sn)("design:type",Nl.E)],Ll.prototype,"_paymentManager",void 0);var kl=z(63811);let Bl=class extends X.uAl{initializeComponents(q){this.categoryTabs=[this.categoryTab0,this.categoryTab1,this.categoryTab2,this.categoryTab3,this.categoryTab4,this.categoryTab5,this.categoryTab6];for(let K=0;K{st.q.instance.prodigy.audio.playSFX(18,"pop"),K()})),this._prefabComponent.currencyIconContainer.addComponent(Po._).setAsset(zt.E.getIconForType("currency",this.currencyData.ID)).catch(X.RQr.createHandler("Unable to load currency icon for store")),this.updatePlayerCurrency()}updatePlayerCurrency(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;1===this.currencyData.ID?this._prefabComponent.currencyAmount.text=q.getGold().toLocaleString("en-US").replace(/,/g," "):this._prefabComponent.currencyAmount.text=q.backpack.hasItem(this.currencyData.type,this.currencyData.ID).toLocaleString("en-US").replace(/,/g," ")}}class Fl extends Ll{constructor(q,K,z,Y,Q,X){super(q,K,z,[it._.Ui_panels_json],Y),this._categories=[],this._currentCategory=0,this._currentPaginationIndex=0,this._categoryPageCount=0,this._merchantDataOverride={},this._sortedPageItems={},this._storePrefabID=null!=Q?Q:Pi.l.Store,this._overrideInterfaceOpened=null!=X?X:{},this._activePlayer=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player}create(){super.create(),this._hardCurrencyDataProvider=st.q.instance.prodigy.gameContainer.get("bec-c6b4"),this._localizer=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),this._activePlayer.onEquipmentChange.add(this.onEquipmentChanged,this);st.q.instance.prodigy.gameContainer.get("884-efd8").getStore(this.storeID).then((([q,K])=>{q?this.onGetStoreFailure(q):this.onGetStoreSuccess(K)})).catch(X.RQr.createHandler("Unable to load store data"))}onGetStoreSuccess(q){if(X.Aq$.isDefined(this.game)){this.storeData=q,this._categories=this.storeData.getPages();for(const q of this._categories)for(const K of q.getStoreItems()){const q=K.getCost()[0],z=this.getItemData(K);this.applyCostOverrides(z,q)}this.loadFromPrefab()}}onGetStoreFailure(q){X.VyI.log(`Store with ID: ${this.storeID} could not be loaded - ${q.getErrorMessage()}`,X.$bb.Warning),st.q.instance.prodigy.open.message(this._localizer.getText("STORE_OPEN_FAILED_MESSAGE"),this.close.bind(this),null,this._localizer.getText("STORE_OPEN_FAILED_TITLE"))}loadFromPrefab(){const q=new X._mx;q.addComponent(Rr.B).getRootContainer().setParent(this);let K=this.storeData.getName();switch(this.storeID){case 62:K="Winterfest Shop";break;case 63:K="Fox Faction";break;case 64:K="Bunny Faction"}if(19===this.storeID&&st.q.instance.prodigy.skin.isFestivalActive("Summerfest")){const q=new It;q.setAssetFrame("face_3"),q.setAssetTag(it._.Npc_face_merchant_json),q.setPosition(80,160),this.storeData.setMerchantAvatar(q)}q.addComponent(X.bE_).Container.bind(dr.n7.StoreName).toConstantValue(K);st.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(this._storePrefabID,q).then((q=>{this._prefab=q,this._prefabComponent=this._prefab.findComponentInChildren(Bl),this._prefabComponent.initializeComponents(this);const K=this.storeData.getName();this.currentInterfaceName=Cl.V2+K,this._prefabComponent.sideBar&&(this._prefabComponent.sideBar.shopInterfaceName=this.currentInterfaceName,this._prefabComponent.sideBar.shopId=this.storeID),Pl.ju.map((q=>(0,Pl.Bi)(Pl.p1[q]))).includes(this.storeID)&&(this._prefabComponent.storeName.active=!1,this._prefabComponent.unifiedStoreButtonContainer.active=!0),this._topBar=new Ul(this.game,this._prefabComponent),this.initializeStore(),this.setupViewMoreStoresButton()})).catch(X.RQr.createHandler("Unable to load store prefab"))}setupViewMoreStoresButton(){var q;const K=this._activePlayer.getPlayerData().unifiedStore;K&&K.viewMoreStoresButtonClicks<3&&K.viewMoreStoresButtonViews<5?(this._prefabComponent.viewMoreStoresButton.onClick.addOnce((()=>{this._activePlayer.data.unifiedStore.viewMoreStoresButtonClicks++,this._activePlayer.forceSaveCharacter()})),null===(q=this._prefabComponent.spineAnimation.findComponentInChildren(Ur.j))||void 0===q||q.playAnimation("sparkle",!0),this._activePlayer.data.unifiedStore.viewMoreStoresButtonViews++,this._activePlayer.forceSaveCharacter()):this._prefabComponent.spineAnimation.active=!1,this._prefabComponent.viewMoreStoresButton.onClick.addOnce((()=>{this.fireButtonEvent({interfaceName:this.currentInterfaceName,interfaceType:Si.Wm.Menu,buttonName:Xh.k.ViewMoreStores,saveClickInfo:Xh.k.ViewMoreStores}),this.fireInterfaceEvent({interfaceName:Ah.B.UnifiedStoreBase,interfaceType:Si.Wm.Menu,originType:Si.$N.ButtonClick,originID:Xh.k.ViewMoreStores})}),this)}setMerchant(q){q&&(this._merchantDataOverride=q)}initializeStore(){var q;this._topBar.initialize({ID:this.storeData.getStoreCurrencyID(),type:this.storeData.getStoreCurrencyType()},this.close.bind(this)),this._currentClickedItemCards=[],this.initializeCategoryTabs(),this.setupPaginationCallbacks(),this.refreshItemDisplay(),this.setMerchant(),this.onItemPurchased.add((q=>{this._topBar.updatePlayerCurrency(),this._prefabComponent.sideBar.renderBottomPanel(),this._prefabComponent.sideBar.renderButtons();const K=this._selectedCard.GameObject.parent.findComponent(Il.j),z=this.generateItemCardData(q);K.setItemData(z),K.updateDisplay()})),this._segment.featureCommon.sendInterfaceEvent(Object.assign({interfaceName:`${Cl.V2}${this.storeData.getName()}`,interfaceType:Si.Wm.Menu,originType:null!==(q=this._overrideInterfaceOpened.originType)&&void 0!==q?q:Si.$N.NpcClick},this._overrideInterfaceOpened))}generateItemCardData(q){const K=this.getItemData(q),z=q.getCost()[0];return{item:K,currencyAmount:z.getAmount(),currencyID:z.getID()}}applyCostOverrides(q,K){if(q.data.dynamicStoreBaseCost){const z=q.data.dynamicStoreBaseCost;return K.setType("currency"),K.setID(z.currencyId),void K.setAmount(z.amount)}if("pet"===q.type){const z=this._hardCurrencyDataProvider.petAcquisitionCost(q.ID,Al.l6.Rescue);if(z)return K.setType("currency"),K.setID(z.currency),void K.setAmount(z.value)}}refreshItemDisplay(){this.refreshPagination(),this.getItemsForPage(this._currentPaginationIndex)}initializeCategoryTabs(){let q=0;for(let K=0;K{this._currentCategory!==K&&(st.q.instance.prodigy.audio.playSFX(50,"pop"),this._currentCategory=K,this.refreshItemDisplay(),this._prefabComponent.sideBar.setToDefaultState(),this.game.broadcaster.broadcast(gi.iZ.ToolTipClosed))}));const Q=Y.findComponentsInChildren(X.EYj),Z=Y.findComponentInChildren(Rl.e);for(let q=0;q0&&this._prefabComponent.categoryFill.transform.setPositionY((this._categories.length+1-q)*this._prefabComponent.categoryTabs[0].transform.rectTransformDimensions.height+5)}hasNewItems(q){var K;const z=(null===(K=this._activePlayer.data.lastStoreVisitLevels)||void 0===K?void 0:K[this.storeID])||1,Y=this._activePlayer.getLevel();for(let Q=0;Qz&&X>z&&X<=Y&&-1===this._currentClickedItemCards.indexOf(Z))return!0}return!1}setupPaginationCallbacks(){this._prefabComponent.nextButton.onClick.add((()=>{st.q.instance.prodigy.audio.playSFX(18,"pop"),this._prefabComponent.backButton.inputEnabled=!0,this._prefabComponent.backButton.currentState=2,this._prefabComponent.backButtonDisabled.active=!1,this._currentPaginationIndex+=1,this._currentPaginationIndex+1>=this._categoryPageCount&&(this._prefabComponent.nextButton.inputEnabled=!1,this._prefabComponent.nextButtonDisabled.active=!0),this._prefabComponent.pageNumber.text=this._localizer.getText("PAGE_NUMBER",this._currentPaginationIndex+1,this._categoryPageCount),this.getItemsForPage(this._currentPaginationIndex),this._prefabComponent.sideBar.setToDefaultState(),this.game.broadcaster.broadcast(gi.iZ.ToolTipClosed),this.updatePaginationBadges()})),this._prefabComponent.backButton.onClick.add((()=>{st.q.instance.prodigy.audio.playSFX(18,"pop"),this._prefabComponent.nextButton.inputEnabled=!0,this._prefabComponent.nextButton.currentState=2,this._prefabComponent.nextButtonDisabled.active=!1,this._currentPaginationIndex-=1,this._currentPaginationIndex-1<0&&(this._prefabComponent.backButton.inputEnabled=!1,this._prefabComponent.backButtonDisabled.active=!0),this._prefabComponent.pageNumber.text=this._localizer.getText("PAGE_NUMBER",this._currentPaginationIndex+1,this._categoryPageCount),this.getItemsForPage(this._currentPaginationIndex),this._prefabComponent.sideBar.setToDefaultState(),this.game.broadcaster.broadcast(gi.iZ.ToolTipClosed),this.updatePaginationBadges()}))}refreshPagination(){this._currentPaginationIndex=0,this._categoryPageCount=Math.ceil(this._categories[this._currentCategory].getStoreItems().length/Fl.NUM_ITEMS_PER_PAGE),this._prefabComponent.backButton.inputEnabled=!1,this._prefabComponent.backButtonDisabled.active=!0;const q=this._prefabComponent.nextButton.GameObject.findComponentInChildren(Rl.e);this._prefabComponent.backButton.GameObject.findComponentInChildren(Rl.e).setActive(!1),q.setActive(!1),1===this._categoryPageCount?(this._prefabComponent.nextButton.inputEnabled=!1,this._prefabComponent.nextButtonDisabled.active=!0):(this._prefabComponent.nextButton.inputEnabled=!0,this._prefabComponent.nextButton.currentState=2,this._prefabComponent.nextButtonDisabled.active=!1),this._prefabComponent.pageNumber.text=this._localizer.getText("PAGE_NUMBER",1,this._categoryPageCount),this.updatePaginationBadges()}updatePaginationBadges(){this.setupSortedPageItems();const q=Math.max(0,(this._currentPaginationIndex-1)*Fl.NUM_ITEMS_PER_PAGE),K=Math.min(this._sortedPageItems[this._currentCategory].length,this._currentPaginationIndex*Fl.NUM_ITEMS_PER_PAGE),z=Math.max(0,(this._currentPaginationIndex+1)*Fl.NUM_ITEMS_PER_PAGE),Y=Math.min(this._sortedPageItems[this._currentCategory].length,(this._currentPaginationIndex+2)*Fl.NUM_ITEMS_PER_PAGE),Q=this._sortedPageItems[this._currentCategory].slice(q,K),X=this._sortedPageItems[this._currentCategory].slice(z,Y),Z=this._prefabComponent.nextButton.GameObject.findComponentInChildren(Rl.e);this._prefabComponent.backButton.GameObject.findComponentInChildren(Rl.e).setActive(this.hasNewItems(Q)),Z.setActive(this.hasNewItems(X))}setupSortedPageItems(){if(!this._sortedPageItems[this._currentCategory]){const q=this._categories[this._currentCategory].getStoreItems();this._sortedPageItems[this._currentCategory]=Z.orderBy(q,[q=>Dl.W.isItemOwned(this._activePlayer,{ID:q.getID(),type:q.getType()})?1:0,q=>this.getItemData(q).data.lockLevel,q=>q.getCost()[0].getID(),q=>q.getCost()[0].getAmount(),q=>this.getItemData(q).data.ID],["asc","asc","asc","asc","asc"])}}getItemsForPage(q){for(const Y of Z.clone(this._prefabComponent.cardPanel.children))Y.destroy();this._selectedCard=null;const K=this._activePlayer.getGearBattleStats();this.setupSortedPageItems();const z=st.q.instance.prodigy.gameContainer.get("983-05a7");for(let Y=q*Fl.NUM_ITEMS_PER_PAGE;Y{var q;this._selectedCard&&(this._selectedCard.setSelected(!1),this._selectedCard.inputEnabled=!0,this._selectedCard.GameObject.findComponentInParent(Il.j).animateArrow(!1)),Z.animateArrow(!0),Z.setNewBadge(!1);const K=Z.getItem().ID;-1===this._currentClickedItemCards.indexOf(K)&&this._currentClickedItemCards.push(K),this._selectedCard=J,J.inputEnabled=!1;const z=this.getItemData(Q),Y=Q.getCost()[0];this._prefabComponent.sideBar.renderSelectedItem({type:Q.getType(),id:Q.getID(),cost:{type:Y.getType(),ID:Y.getID(),N:Y.getAmount()},member:null===(q=z.data)||void 0===q?void 0:q.member},this.buyItem.bind(this,Q)),this._segment.shop.sendShopItemViewedEvent(Cl.V2,this.storeData,Q),this._prefabComponent.sideBar.onEquipItem.removeAll(this),this._prefabComponent.sideBar.onPurchaseFailure.removeAll(this),this._prefabComponent.sideBar.onEquipItem.add((q=>{this._segment.featureCommon.sendButtonEvent({buttonName:q.member?Xh.k.EquipMemberItem:Xh.k.EquipItem,destinationName:"equip-shop-item",interfaceType:Si.Wm.Shop,interfaceName:`${this.storeID}`,elementType:Q.getType(),elementID:`${Q.getID()}`})}),this),this._prefabComponent.sideBar.onPurchaseFailure.add(((q,K)=>{this._segment.shop.sendShopPurchaseFailedEvent(Cl.V2,this.storeData,Q,K)}),this),this._prefabComponent.sideBar.onPurchaseSuccess.add((q=>{this._segment.featureCommon.sendButtonEvent({buttonName:Xh.k.BuyItem,destinationName:"buy-shop-item",interfaceType:Si.Wm.Shop,interfaceName:`${this.storeID}`,elementType:Q.getType(),elementID:`${Q.getID()}`})}),this),this.game.broadcaster.broadcast(gi.iZ.ToolTipClosed)}));const tt=this.generateItemCardData(Q);Z.setItemData(tt),Z.setPlayerGearStats(K),Z.updateDisplay()}}getItemData(q){return Ee.t.getItem(q.getType(),q.getID())}shouldCloseAllOpenMenus(q=!1){var K;return null!==(K=st.q.instance.prodigy.world.getCurrentZone()!==mn.A_.TOWERTOWN&&st.q.instance.prodigy.world.getCurrentZone()!==mn.A_.CRYSTALCAVERNS&&!q)&&void 0!==K&&K}onEquipmentChanged(){const q=this._activePlayer.getGearBattleStats();for(const K of this._prefabComponent.cardPanel.children)K.findComponent(Il.j).setPlayerGearStats(q,!0)}close(q=!1){var K,z;const Y=this.storeData.getName();this.shouldCloseAllOpenMenus(q)&&st.q.instance.prodigy.open.menuCloseAll(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:`${Cl.V2}${Y}`,interfaceType:Si.Wm.Menu,closeMethod:Si.Lv.CloseButton}),null!==(K=(z=this._activePlayer.data).lastStoreVisitLevels)&&void 0!==K||(z.lastStoreVisitLevels={}),this._activePlayer.data.lastStoreVisitLevels[this.storeID]=this._activePlayer.getLevel(),this._activePlayer.forceSaveCharacter(),super.close()}destroy(){this._prefab&&this._prefab.destroy(),this._prefab=null,this._prefabComponent=null,this._topBar=null,this._activePlayer.onEquipmentChange.removeAll(this),this.storeData=null,this._categories=[],this._selectedCard=null,this._localizer=null,this._hardCurrencyDataProvider=null,this._sortedPageItems={},this._currentClickedItemCards.length=0,super.destroy()}}Fl.NUM_ITEMS_PER_PAGE=6,Fl.NUM_ITEMS_PER_ROW=3,Fl.ITEM_CARDS_OFFSET=215,Fl.ITEM_ROW_OFFSET=255;var Gl=z(83142),jl=z(95429);class $l extends sr.W{get onCloseClicked(){return this._onCloseClicked}constructor(q,K,z,Y){super(q,K,200,null),this._ui=null,this._onCloseClicked=new X.HN0,this._menuComponent=null,this._components=[],this._callToAction=z,this._videoConfig=Y}create(){var q;super.create();const K=st.q.instance.prodigy.gameContainer.get("983-05a7");this._ui=K.load(null!==(q=this._videoConfig.videoPrefabID)&&void 0!==q?q:121,st.q.instance.prodigy.open.menusGameObject),this._components=this._ui.findComponentsInChildren(Gl.D,!0),this._components.forEach((q=>{q.loadVideoConfig(this._videoConfig)})),this._menuComponent=this._ui.findComponent(jl.k),this._menuComponent.closeButton.onClick.addOnce((()=>{st.q.instance.prodigy.audio.playSFX(18,"pop"),this._onCloseClicked.dispatch(),this.close()})),this._callToAction?this._menuComponent.callToActionButton.onClick.addOnce((()=>{st.q.instance.prodigy.audio.playSFX(18,"pop"),this._callToAction(),this.close()})):this._menuComponent.callToActionButton.GameObject.active=!1}setActive(q){super.setActive(q),this._menuComponent.videoPlayer.setVisible(q)}destroy(){this._menuComponent.destroy(),this._ui.destroy(),this._onCloseClicked.dispose(),super.destroy()}getPlayer(){return this._menuComponent}}class Hl extends Jh.a{constructor(q,K,z,Y){super(q,K,0,0,st.q.instance.prodigy.textureMenu),this.content=null,this.nameText=null,this.bar=null,this.closeBtn=null,this.btns=null,this.selectedBtn=null,this.names=[],this.content=st.q.instance.prodigy.create.element(this),this.onClose=Y,this.page=0,z?this.create():this.createAdvanced()}selectNamesList(){this.names=dc.f.getFilteredFirstNames()}create(){this.selectNamesList(),this.addTransparent();const q=st.q.instance.prodigy.create.element(this.background,320,150),K=st.q.instance.prodigy.create.element(q,0,0);st.q.instance.prodigy.create.panel(K,0,0,16,10,"shine"),K.add(new jr.C(this.game,11,80,618,40,it._.Tiled_sprites_json,"blue-top")),K.add(new jr.C(this.game,11,120,618,200,it._.Tiled_sprites_json,"blue-mid")),K.add(new jr.C(this.game,11,320,618,40,it._.Tiled_sprites_json,"blue-top2"));const z=st.q.instance.prodigy.create.panel(K,40,-20,14,2,"banner");super.create(),this.nameText=st.q.instance.prodigy.create.font(this,q.x+z.x,q.y+z.y+15,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NAME_CHANGE_NAME_WIZARD"),{width:z.width,align:"center",size:36,fontID:9}),this.bar=st.q.instance.prodigy.create.slider(this,q.x+30,q.y+80+20,240,!0,!0),this.closeBtn=st.q.instance.prodigy.create.textButton(this,490,q.y+400-25,{text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NAME_CHANGE_BUTTON_DONE"),icon:"yes",size:To.MED},(()=>{this.close()})),this.closeBtn.setInactive(),this.content=st.q.instance.prodigy.create.element(this,this.bar.x+70,this.bar.y),this.btns=[];for(let Y=0;Y<12;Y++){const q=st.q.instance.prodigy.create.panel(this.content,Y%2*260,40*Math.floor(Y/2),6,1,"lb");q.text=st.q.instance.prodigy.create.font(q,0,5,"",{width:240,align:"center",size:20}),q.setClickable(this.setName.bind(this,Y),null,this.onNameOver.bind(this,q),this.onNameOut.bind(this,q)),this.btns.push(q)}this.bar.reset(Math.ceil(this.names.length/12),1,0,(q=>{this.setPage(q)}))}setPage(q){this.setName(null),X.Aq$.isDefined(this.selectedBtn)&&this.selectedBtn.changePanel("lb"),this.selectedBtn=null,this.page=q;for(let K=0;K<12;K++){const z=this.btns[K];12*q+K>=this.names.length?z.visible=!1:(z.text.setText(this.names[12*q+K].data.value),z.visible=!0)}}setName(q){if(X.Aq$.isDefined(q)){this.onNameDown(q);const K=this.btns[q],z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;z.appearance.getName().setFirstName(this.names[12*this.page+q].ID),z.appearance.updated=!0,this.nameText.setText(K.text.text),this.closeBtn.setActive()}else this.nameText.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NAME_CHANGE_NAME_WIZARD")),this.closeBtn.setInactive()}createAdvanced(){this.addTransparent();const q=st.q.instance.prodigy.create.element(this.background,320,150),K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=st.q.instance.prodigy.create.element(q,0,0);st.q.instance.prodigy.create.panel(z,0,0,16,10,"shine"),z.add(new jr.C(this.game,11,80,618,40,it._.Tiled_sprites_json,"blue-top")),z.add(new jr.C(this.game,11,120,618,200,it._.Tiled_sprites_json,"blue-mid")),z.add(new jr.C(this.game,11,320,618,40,it._.Tiled_sprites_json,"blue-top2"));const Y=st.q.instance.prodigy.create.panel(z,40,-20,14,2,"banner");super.create();const Q=K.getFirstName();this.nameText=st.q.instance.prodigy.create.font(this,q.x+Y.x,q.y+Y.y+18,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NAME_CHANGE_CHOOSE_TITLE"),{width:Y.width,align:"center",size:30}),this.closeBtn=st.q.instance.prodigy.create.textButton(this,490,q.y+400-25,{text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NAME_CHANGE_BUTTON_DONE"),icon:"yes",size:To.MED},(()=>{this.close()})),this.closeBtn.setInactive(),this.content=st.q.instance.prodigy.create.element(this,q.x+120,q.y+80+20),this.btns=[];for(let X=0;X<6;X++){const q=st.q.instance.prodigy.create.panel(this.content,0,40*X,12,1,"lb");q.text=st.q.instance.prodigy.create.font(q,0,5,"",{width:480,align:"center",size:20}),q.setClickable(this.setLongName.bind(this,X),null,this.onNameOver.bind(this,q),this.onNameOut.bind(this,q)),this.btns.push(q)}st.q.instance.prodigy.create.button(this,q.x+30,q.y+80+20,it._.General_icons_json,"dice",(()=>{this.randomNames(Q)})),this.randomNames(Q)}randomNames(q){this.setName(null),X.Aq$.isDefined(this.selectedBtn)&&this.selectedBtn.changePanel("lb"),this.selectedBtn=null;const K=[];let z=0;this.names=[];for(let Y=0;Y<6;Y++)do{const Q=Z.sample(Ee.t.getItemsWithFilter("name",(q=>1===q.data.type))),X=Z.sample(Ee.t.getItemsWithFilter("name",(q=>2===q.data.type))),J=Z.capitalize(`${Q.data.value}${X.data.value}`);this.btns[Y].text.setText(`${q} ${J}`),K.indexOf(J)<0&&(K.push(J),this.names.push({middle:Q.ID,last:X.ID}),++z)}while(z===Y)}setLongName(q){this.onNameDown(q);const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;K.appearance.getName().setMiddleName(this.names[q].middle),K.appearance.getName().setLastName(this.names[q].last),K.appearance.updated=!0,this.nameText.setText(this.btns[q].text.text),this.closeBtn.setActive()}onNameDown(q){X.Aq$.isDefined(this.selectedBtn)&&this.selectedBtn.changePanel("lb"),this.selectedBtn=this.btns[q],this.btns[q].changePanel("lb-green")}onNameOver(q){q.changePanel("lb-green")}onNameOut(q){q!==this.selectedBtn&&q.changePanel("lb")}}class Vl extends Hl{constructor(q,K,z,Y){super(q,K,z,Y),this.previousPlayerName=null;const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.previousPlayerName=Q.appearance.getName(),this.setPage(0)}create(){super.create(),st.q.instance.prodigy.create.button(this,930,140,it._.General_icons_json,"close",(()=>{this.closeMenuWithoutSettingName()}))}selectNamesList(){this.names=dc.f.getFilteredFirstNames()}closeMenuWithoutSettingName(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.onClose=null,q.appearance.setName(this.previousPlayerName),this.close()}}var Wl,ql=z(51894),Kl=z(35084),zl=z(63746);!function(q){q.BackpackCostumesTab="costumes",q.WizardCostumesMenuBackpackTab="backpack"}(Wl||(Wl={}));class Yl extends Jh.a{constructor(q,K,z){super(q,K,0,0,st.q.instance.prodigy.textureMenu),this.player=null,this.content=null,this.bar=null,this._playerContainer=null,this.equip=null,this.itemType=null,this.owned=[],this._pageSize=6,this._itemCards=Array(this._pageSize).fill(new X._mx),this._itemCardsCreatedCount=0,this._buttons=[],this._segment=st.q.instance.prodigy.gameContainer.get("20f-5f67"),this.player=z,this.currentInterfaceName=Ah.B.Backpack,this.create(),this.cullable=!0}create(){this.addTransparent(),this.content=st.q.instance.prodigy.create.element(this,560,200);const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this._buttons=[{type:"hat",icon:{type:"hat",ID:5},bot:q.getText("BACKPACK_BUTTON_HATS")},{type:"outfit",icon:{type:"outfit",ID:1},bot:q.getText("BACKPACK_BUTTON_OUTFITS")},{type:"weapon",icon:{type:"weapon",ID:1},bot:q.getText("BACKPACK_BUTTON_WANDS")},{type:"spellRelic",icon:{type:"spellRelic",ID:13},bot:q.getText("BACKPACK_BUTTON_RELICS")},{type:"boots",icon:{type:"boots",ID:7},bot:q.getText("BACKPACK_BUTTON_BOOTS")},{type:"follow",icon:{type:"follow",ID:2},bot:q.getText("BACKPACK_BUTTON_BUDDIES")},{type:"item",icon:{type:"item",ID:5},bot:q.getText("BACKPACK_BUTTON_ITEMS")},{type:"currency",icon:{type:"item",ID:26},bot:q.getText("BACKPACK_BUTTON_CURRENCY")},{type:"mount",icon:{type:"mount",ID:1},bot:q.getText("BACKPACK_BUTTON_MOUNT")}];const K={buttons:{offset:{x:-150,y:0},iconOffset:{x:0,y:0}},banner:{frameName:"banner",atlasID:0,width:29},closeButton:void 0};let z=0;(0,Ft.G)(hh.q).enabled&&(this._buttons.unshift({type:"costume",atlas:it._.Ui_wizard_costumes_json,icon:"icon-costume-0",bot:q.getText("BACKPACK_BUTTON_COSTUMES"),callback:()=>{this._segment.featureCommon.sendTabEvent({tabName:Wl.BackpackCostumesTab,interfaceName:Ah.B.Backpack,interfaceType:Si.Wm.Menu,saveClickInfo:Wl.BackpackCostumesTab}),st.q.instance.prodigy.open.openWizardCostumesMenu(Si.$N.TabClick,Wl.BackpackCostumesTab)}}),K.buttons.spacing=107,z=1);const Y=this.createBaseSetup(31,16,"shine",Ah.B.Backpack,this._buttons,!0,void 0,K,void 0,!0),Q=st.q.instance.prodigy.create.element(Y,-20,-40);Q.setRenderState(!0),Q.add(new jr.C(this.game,71,200,429,40,it._.Tiled_sprites_json,"blue-top")),Q.add(new jr.C(this.game,71,240,469,380,it._.Tiled_sprites_json,"blue-mid")),Q.add(new jr.C(this.game,71,620,429,40,it._.Tiled_sprites_json,"blue-top2")),Q.add(new jr.C(this.game,500,240,40,380,it._.Tiled_sprites_json,"blue-side2")),Q.add(new jr.C(this.game,60,240,40,380,it._.Tiled_sprites_json,"blue-side")),Q.add(st.q.instance.prodigy.create.sprite(500,200,it._.General_core_json,"blue-corner2")),Q.add(st.q.instance.prodigy.create.sprite(500,620,it._.General_core_json,"blue-corner3")),Q.add(st.q.instance.prodigy.create.sprite(60,200,it._.General_core_json,"blue-corner")),Q.add(st.q.instance.prodigy.create.sprite(60,620,it._.General_core_json,"blue-corner4")),st.q.instance.prodigy.create.panel(Q,100,230,10,10,"white").alpha=.5,super.create(),this.bar=st.q.instance.prodigy.create.slider(this,1200,240,380,!0,!0),this._playerContainer=st.q.instance.prodigy.create.player(this,this.player,1,300,0,!0,{isPreview:!0,chargeRevealEnabled:!0}),this._playerContainer.scale.set(2,2),(0,Ft.G)(hh.q).enabled&&(this._playerContainer.clickCallback=()=>st.q.instance.prodigy.open.openWizardCostumesMenu()),this.equip=st.q.instance.prodigy.create.element(this,80,220),this.setMode(z),this.reload()}setActive(q){super.setActive(q),this._itemCards.forEach((K=>K.active=q))}setMode(q){var K,z;super.setMode(q),this.clearContents(),this.itemType=null!==(z=null===(K=this._buttons[q])||void 0===K?void 0:K.type)&&void 0!==z?z:"hat",this._segment.featureCommon.sendTabEvent({tabName:this.itemType,interfaceName:Ah.B.Backpack,interfaceType:Si.Wm.Menu}),this.listItemsOfType()}clearContents(){var q;null===(q=this.content)||void 0===q||q.removeAll(!0)}itemSelected(q){var K;st.q.instance.prodigy.open.itemInfo({ID:q.ID,L:q.L,type:null!==(K=q.type)&&void 0!==K?K:this.itemType},this.reload.bind(this),Wr.s.Equip)}reload(q){const K=[];for(let Q=0;Q{this._segment.featureCommon.sendButtonEvent({buttonName:Xh.k.BackpackCostumesSlot,interfaceName:Ah.B.Backpack,interfaceType:Si.Wm.Menu,destinationName:Ah.B.WizardCostumesMenu,saveClickInfo:Xh.k.BackpackCostumesSlot}),st.q.instance.prodigy.open.openWizardCostumesMenu(Si.$N.ButtonClick,Xh.k.BackpackCostumesSlot)}),((0,Ft.G)(hh.q).enabled||("mount"===Vr.W[Q]&&(Y=170),"costume"!==Vr.W[Q]))&&K.push(st.q.instance.prodigy.create.item(null,Y,Z,{id:q.ID,type:q.type},Wr.s.Icon,z))}const z=[];K.forEach((q=>z.push(q.onContainerLoaded.asPromise()))),Promise.all(z).then((()=>{this.equip.removeAll(!0),K.forEach((q=>this.equip.addChild(q)))})).catch(X.RQr.createHandler("BackpackMenu: Error loading equipped items")),this.game.input.clearEnterCallback(),this._playerContainer.reload(),this._playerContainer.updateMountAppearance();const Y=495+(this.player.equipment.getMount()>0?40:0);this._playerContainer.y=Y,this.bar.process(),q&&this.close()}scrollItems(q){var K,z;if(this.page=X.Aq$.isDefined(q)?q:this.page,this.clearContents(),this.owned=this.getItemsOfCurrentType(),ql.H.sortBackpackGearByStats(this.owned),this.owned.length<=0&&"spellRelic"===this.itemType)this._itemCards.forEach((q=>{q&&(q.active=!1)})),st.q.instance.prodigy.create.font(this.content,30,50,"Earn Relics by completing quests in areas all over the island!",{width:480,align:"center"});else{this._itemCards.forEach((q=>{q&&(q.active=!0)}));for(let q=this.page;q=this.owned.length?void 0:{id:X.Aq$.isDefined(this.owned[q].ID)?this.owned[q].ID:this.owned[q].gameID,type:null!==(K=this.owned[q].type)&&void 0!==K?K:this.itemType,L:this.owned[q].L,N:this.owned[q].N,max:this.owned[q].max};if(this._itemCardsCreatedCount{this._itemCards[Y]=q})).catch(X.RQr.createHandler("Error creating item card in backpack"));else{const K=this._itemCards[Y%this._pageSize];null===(z=null==K?void 0:K.findComponentInChildren(zl.Z))||void 0===z||z.initializeItemCard(Q);const X=K.findComponentInChildren(Kl.n);null==X||X.onClicked.removeAll(),Q&&(null==X||X.onClicked.add(this.itemSelected.bind(this,this.owned[q]),this))}}}}listItemsOfType(){this.owned=this.getItemsOfCurrentType(),this.bar.reset(this.owned.length-3,3,-1,this.scrollItems.bind(this))}getItemsOfCurrentType(){const q=this.player.backpack.getBackpackItemsByType(this.itemType),K=st.q.instance.prodigy.gameContainer.get("6d6-463e"),z=K.getAllOfType(this.itemType).map((q=>({ID:q.id,type:q.type,N:q.quantity})));"item"===this.itemType&&z.push(...K.getAllOfType("riftRunKey").map((q=>({ID:q.id,type:q.type,N:q.quantity}))));const Y=Qt.R.loadData(Yt.r.BackpackConfiguration_json),Q=z.concat(q);return Y.hiddenItemIDs[this.itemType]?Q.filter((q=>!Y.hiddenItemIDs[this.itemType].includes(q.ID))):Q}close(){var q;const K=st.q.instance.prodigy.gameContainer;Xr.v.overrideSmoothing(null),null===(q=K.get("ad2-c5b2").player.playerContainer)||void 0===q||q.reload(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:Ah.B.Backpack,interfaceType:Si.Wm.Menu,closeMethod:Si.Lv.CloseButton,instanceType:Li.N.Interface}),this.clearContents(),this._itemCards.forEach((q=>null==q?void 0:q.destroy())),this._itemCards.length=0,this.game.broadcaster.broadcast(gi.J8.PlayerEditingMenuClosed,this.game,[]),this._playerContainer=null,super.close()}destroy(q={children:!0}){this.owned.length=0,this.bar.destroy(),this.bar=null,this.player=null,super.destroy(q)}}var Ql,Xl=z(60654),Zl=z(20748),Jl=z(50475),tu=z(87557),eu=z(77997),iu=z(29546);class su extends Jh.a{constructor(q,K,z,Y,Q){super(q,K,0,0,st.q.instance.prodigy.textureMenu),this._socialStatusElements={},this._xpBarGameObject=null,this.player=z,this.retrievePlayerFriendStatus();const X=this.loggedInPlayerProvider.player,Z=this.player.userID===X.userID;this._allowDuelByDefault=Y,this.showFriendSocialStatus=!Z&&[1,su.IS_CLASSMATE].includes(this._friendStatus),this._socialStatusElements.status=Q,q.broadcaster.addAppListener(gi.sd.RequestSent,this.setupFriendRequestButton.bind(this),this,gi.HG.Card,!1),q.broadcaster.addAppListener(gi.sd.RequestCancelled,this.setupFriendRequestButton.bind(this),this,gi.HG.Card,!1),q.broadcaster.addAppListener(gi.sd.RequestAccepted,this.setupFriendRequestButton.bind(this),this,gi.HG.Card,!1),q.broadcaster.addAppListener(gi.sd.RequestRejected,this.setupFriendRequestButton.bind(this),this,gi.HG.Card,!1),q.broadcaster.addAppListener(gi.sd.FriendRemoved,this.setupFriendRequestButton.bind(this),this,gi.HG.Card,!1),q.broadcaster.addAppListener(gi.J8.PlayerAppearanceUpdated,this.updateAppearance.bind(this),this,gi.HG.Card,!1),this.currentInterfaceName=Ah.B.PlayerCard,this.create()}create(){if(this.destroyed)return;const q=this.loggedInPlayerProvider.player,K=this.player.userID===q.userID;this.addTransparent();this.base=st.q.instance.prodigy.create.element(this,240,120),st.q.instance.prodigy.create.panel(this.base,0,0,20,2,"card-top"),st.q.instance.prodigy.create.panel(this.base,0,80,20,10,"card-bot"),this.showFriendSocialStatus&&(this.createExtendedPanel(),this._socialStatusIcons=wc.createSocialStatusIcons(12),st.q.instance.prodigy.create.panel(this.base,0,440,20,2,"card-top-extended"));const z=q.equipment.getMount()>0;this.playerContainer=st.q.instance.prodigy.create.player(this.base,this.player,1.65,125,z?360:320,!1,{isPreview:!0,chargeRevealEnabled:!0}),this.playerContainer.reload(),this.playerName=st.q.instance.prodigy.create.font(this.base,10,3,`${this.player.hasMembership()?"[membership] ":""}${this.player.getName()}`,{size:36,fontID:9}),this.setupXpBar(K),st.q.instance.prodigy.create.button(this.base,768,-10,it._.General_icons_json,"close",(()=>{this.segment.featureCommon.sendButtonEvent({buttonName:Xh.k.X,interfaceName:this.currentInterfaceName,interfaceType:Si.Wm.Menu}),this.close()})),this.buttons=[],K?this.setupPlayer(this.buttons):this.setupStranger(this.buttons),this.content=st.q.instance.prodigy.create.element(this.base),this.setMode(0,0),super.create(),this.segment.featureCommon.sendInterfaceEvent({interfaceName:this.currentInterfaceName,interfaceType:Si.Wm.Menu,originType:Si.$N.ButtonClick}),this.sendTabClickEvent(this.buttons[0].data.bot)}close(){this.game.broadcaster.broadcast(gi.J8.PlayerEditingMenuClosed,this.game,[]),this.game.broadcaster.removeAppListener(gi.sd.RequestSent,this,gi.HG.Card),this.game.broadcaster.removeAppListener(gi.sd.RequestCancelled,this,gi.HG.Card),this.game.broadcaster.removeAppListener(gi.sd.RequestAccepted,this,gi.HG.Card),this.game.broadcaster.removeAppListener(gi.sd.RequestRejected,this,gi.HG.Card),this.game.broadcaster.removeAppListener(gi.sd.FriendRemoved,this,gi.HG.Card),this.game.broadcaster.removeAppListener(gi.J8.PlayerAppearanceUpdated,this,gi.HG.Card),this.segment.featureCommon.sendInterfaceEvent({interfaceName:this.currentInterfaceName,interfaceType:Si.Wm.Menu,instanceType:Li.N.Interface,closeMethod:Si.Lv.CloseButton}),super.close()}destroy(q={children:!0}){var K,z;null===(K=this.reportingModalLoader)||void 0===K||K.cancel(),null===(z=this.reportingModalPrefab)||void 0===z||z.destroy(),this._xpBarGameObject&&this._xpBarGameObject.destroy(),this._xpBarGameObject=null,this.exclamationSprite&&(this.game.tweens.removeAllFromOwner(this),this.exclamationSprite.destroy()),this.exclamationSprite=null,this.playerContainer&&this.playerContainer.destroy(),this.playerContainer=null,this.playerName&&this.playerName.destroy(),this.playerName=null,this.base&&this.base.destroy(),this.base=null,this._socialStatusIcons=null,this.content=null,super.destroy(q)}setupPlayer(q){const K=this.loggedInPlayerProvider.player,z=33,Y=350,Q=K.state.get("zone-lamplight");st.q.instance.prodigy.create.advButton(this.base,z,Y,{icon:"move",top:this.localization.getText("PLAYER_CARD_GO_TO_HOUSE_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_GO_TO_HOUSE_BUTTON_BOT")},(()=>{this.toHouse()})).setActive(!X.Aq$.isDefined(Q)||!X.Aq$.isDefined(Q.quest)||Q.quest.ID>1),K.hasCompletedTutorial()&&st.q.instance.prodigy.create.advButton(this.base,161,Y,{atlas:it._.Store_stylist_json,icon:"stylist-icon",top:this.localization.getText("PLAYER_CARD_CHANGE_STYLE_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_CHANGE_STYLE_BUTTON_BOT")},(()=>{X.Aq$.isDefined(this.stylistBreadcrumbIndicator)&&(this.stylistBreadcrumbIndicator.destroy(),this.stylistBreadcrumbIndicator=null),st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_STYLIST,En.B.BREADCRUMB_CLICKED_CARD_STYLIST_BUTTON),st.q.instance.prodigy.open.stylistStore(null,null,null),this.sendTabClickEvent(this.localization.getText("PLAYER_CARD_CHANGE_STYLE_BUTTON_BOT"))})),q.push(st.q.instance.prodigy.create.advButton(this.base,289,Y,{icon:"bag",top:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_BOT")},this.setMode.bind(this,0,0))),q.push(st.q.instance.prodigy.create.advButton(this.base,417,Y,{icon:{type:"item",ID:21},bot:this.localization.getText("PLAYER_CARD_GEMS_BUTTON_BOT")},this.setMode.bind(this,1,1))),q.push(st.q.instance.prodigy.create.advButton(this.base,545,Y,{icon:{type:"item",ID:75},top:this.localization.getText("PLAYER_CARD_KEY_ITEMS_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_KEY_ITEMS_BUTTON_BOT")},this.setMode.bind(this,2,2))),q.push(st.q.instance.prodigy.create.advButton(this.base,673,Y,{icon:"player",top:this.localization.getText("PLAYER_CARD_STATS_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_STATS_BUTTON_BOT")},this.setMode.bind(this,3,3)))}setupStranger(q){var K,z,Y;const Q=this.loggedInPlayerProvider.player,Z=this.player,J=Z.getAllowsHouseVisitors()&&this.featureRequirements.meetsRequirementsDeprecated(38),et=33,nt=350,at=null!==(z=null===(K=this.featureFlagProvider.getValue(eu.v))||void 0===K?void 0:K.playerCardReportButton)&&void 0!==z&&z,rt=st.q.instance.prodigy.gameContainer.get("774-4659"),ot=st.q.instance.prodigy.create.advButton(this.base,et,nt,{icon:"move",top:this.localization.getText("PLAYER_CARD_VISIT_HOUSE_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_VISIT_HOUSE_BUTTON_BOT")},(()=>{this.toHouse()}));ot.setActive(!1),rt.getCharData(Z.userID.toString(),["system"],(q=>{const K=X.Aq$.isDefined(q)?q[Z.userID]:null,z=X.Aq$.isDefined(K)&&X.Aq$.isDefined(K.system)&&K.system.is_house_locked;ot.setActive(J&&!z)})),J&&Q.hasCompletedTutorial()&&!st.q.instance.prodigy.classModeController.isClassMode()&&(st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_HOUSE_VISITING,En.B.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON)||(this.exclamationSprite=this.createBreadcrumbIndicator(this.game,this.base,it._.General_icons_json,"exclamation",ot))),st.q.instance.prodigy.classModeController.isClassMode()&&ot.setActive(!1),this._duelButton=st.q.instance.prodigy.create.advButton(this.base,161,nt,{icon:"challenge",top:this.localization.getText("PLAYER_CARD_BATTLE_BUTTON_TOP")},(()=>{this.sendDuelInvite()}));const ht=Z.getLevel()>=(null!==(Y=iu.X.getLevelRequirement(9))&&void 0!==Y?Y:5);if(this._duelButton.setActive(this._allowDuelByDefault&&!this.showFriendSocialStatus&&ht),q.push(st.q.instance.prodigy.create.advButton(this.base,et+128*(3+Number(!at)),nt,{icon:"bag",top:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_BOT")},this.setMode.bind(this,0,0))),q.push(st.q.instance.prodigy.create.advButton(this.base,et+128*(4+Number(!at)),nt,{icon:"player",top:this.localization.getText("PLAYER_CARD_STATS_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_STATS_BUTTON_BOT")},this.setMode.bind(this,3,1))),at){const q=st.q.instance.prodigy.create.button(this.base,673,400,it._.General_core_json,"btn-mini",(()=>{const q=st.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Pi.l.ReportPlayerPopup);this.reportingModalLoader=this.prefabLoader.loadFromJSONWithDependencies(q,void 0,void 0,void 0,Pi.l.ReportPlayerPopup),this.reportingModalLoader.then((q=>{this.reportingModalPrefab=q,q.findComponent(tu.V).setReportedUserID(Z.userID)}))})),K=this.localization.getText("PLAYER_CARD_REPORT_BUTTON_TEXT");st.q.instance.prodigy.create.font(q.sprite,5,14,K,{size:16,align:"center",width:q.width-10})}const ct=new tt.Container;ct.visible=!1,ct.position.set(10,480),this.base.addChild(ct);const dt=new tt.Sprite;dt.scale.set(1/wc.SOCIAL_STATUS_ICON_RESOLUTION),ct.addChild(dt);const lt=new tt.Text("",{fontFamily:X.dBt.ABeeZee,fontSize:24,fill:3552822});lt.position.set(35,-1),ct.addChild(lt),this._socialStatusElements.container=ct,this._socialStatusElements.sprite=dt,this._socialStatusElements.text=lt,this.showFriendSocialStatus&&this._socialStatusElements.status&&this.setPlayerSocialStatus(this._socialStatusElements.status),this.setupFriendRequestButton(289,nt)}setupXpBar(q=!0){this.prefabLoader.loadWithDependenciesFromGUID(Pi.l.XPBar).then((K=>{if(this.destroyed||K.isDestroyed)return K.destroy(),K;K.transform.setPosition(435,215),K.findComponent(X.y4o).getRootContainer().setParent(this);const z=K.findComponent(Jl.B);z.runOnSetup=!1,z.levelText.text=this.player.getChargedLevelCumulative().toString();const Y=this.player.currentMaxLevel,Q=this.player.getMaximumChargedLevel(),Z=this.player.getChargedLevelCumulative()>=Q,J=Z||!q,tt=this.player.getPlayerData().chargedLevelData;if(X.Aq$.isDefined(tt)&&this.player.getChargedLevelCumulative()>=Y){const q=J?1:tt.chargedLevelXpForCurrentLevel/tt.chargedLevelXpRequiredForNextLevel;z.progressBar.setValue(q),this.player.getChargedLevel()>0&&(z.levelText.fill=xh.Vh,z.showBarWithChargedLevels())}else{const q=this.player.getStars(),K=Gc.e.starsToLevel(this.player.getLevel(),Do.V.Player),Y=q-K,Q=Gc.e.starsToLevel(this.player.getLevel()+1,Do.V.Player)-K,X=J?1:Y/Q;z.progressBar.setValue(X)}return Z&&z.showBarAtMaxLevel(),this._xpBarGameObject=K,K})).catch(X.RQr.createHandler("[Card]: XPBar Prefab failed to load"))}setupFriendRequestButton(q,K){if(X.Aq$.isDefined(this.game)){if(!st.q.instance.prodigy.friendsListNetworkHandler.hasReceivedFriends)return}else X.VyI.log("Friend Button failed to render",X.$bb.Error);if(this._friendStatus===su.IS_CLASSMATE)return;let z,Y,Q=null,Z="delete-friend";1===this._friendStatus?(z=this.localization.getText("PLAYER_CARD_REMOVE_FRIEND_TOP"),Y=this.localization.getText("PLAYER_CARD_REMOVE_FRIEND_BOT"),Q=gi.sd.RemoveFriend):0===this._friendStatus?(z=this.localization.getText("PLAYER_CARD_CANCEL_FRIEND_TOP"),Y=this.localization.getText("PLAYER_CARD_CANCEL_FRIEND_BOT"),Q=gi.sd.CancelRequest):(z=this.localization.getText("PLAYER_CARD_ADD_FRIEND_TOP"),Y=this.localization.getText("PLAYER_CARD_ADD_FRIEND_BOT"),Q=gi.sd.SendRequest,Z="add-friend");let J=q,tt=K;this.cmdFriendRequest&&(X.Aq$.isDefined(q)&&X.Aq$.isDefined(K)||(J=this.cmdFriendRequest.x,tt=this.cmdFriendRequest.y),this.cmdFriendRequest.destroy()),this.cmdFriendRequest=st.q.instance.prodigy.create.advButton(this.base,J,tt,{atlas:it._.Icons_menu_json,icon:Z,top:z,bot:Y},this.onRequestClicked.bind(this,Q))}retrievePlayerFriendStatus(){var q,K;if(st.q.instance.prodigy.friendsListNetworkHandler.classList.some((q=>q.userID===this.player.userID)))this._friendStatus=su.IS_CLASSMATE;else{const z=st.q.instance.prodigy.friendsListNetworkHandler.friendsList;this._friendStatus=null!==(K=null===(q=z.find((q=>q.userID===this.player.userID)))||void 0===q?void 0:q.status)&&void 0!==K?K:null}}refreshPlayerSocialStatus(){X.Aq$.isDefined(this._playerStatusRefreshPromise)||Date.now()>this._lastPlayerStatusRefresh+3e4||(this._playerStatusRefreshPromise=this._synapse.getFriendsStatuses([`${this.player.userID}`]),this._playerStatusRefreshPromise.then((q=>{const K=this._socialStatusElements,z=q[`${this.player.userID}`];X.Aq$.isDefined(z)&&z!==K.status&&this.setPlayerSocialStatus(z),this._lastPlayerStatusRefresh=Date.now()})).finally((()=>{this._playerStatusRefreshPromise=null})))}setPlayerSocialStatus(q){const K=this._socialStatusElements;K.status=q,K.sprite.texture=this._socialStatusIcons[K.status],K.text.text=wc.getSocialStatusText(K.status),K.container.visible=!0,this._duelButton.setActive(q===Ec.a.available)}onRequestClicked(q){q===gi.sd.RemoveFriend?st.q.instance.prodigy.open.messageBoxPrefab({title:this.localization.getText("PLAYER_CARD_CONFIRM_REMOVE_TITLE"),text:"PLAYER_CARD_CONFIRM_REMOVE_BODY",textArgs:[this.player.getName()],buttonState:xr.D.YesNoButtons,confirmCallback:()=>{this.game.broadcaster.broadcast(q,gi.HG.Card,[this.player.userID])}}):this.game.broadcaster.broadcast(q,gi.HG.Card,[this.player.userID])}setMode(q,K){var z;const Y=this.loggedInPlayerProvider.player;if(this.buttons[q]&&this.page!==q&&this.sendTabClickEvent(null===(z=this.buttons[q].data)||void 0===z?void 0:z.bot),this.page=q,super.setMode(K),this.content.removeAll(!0),0===q)for(let Q=0;Q=mi.s.activePlayerLevelCap&&(q=this.localization.getText("PLAYER_CARD_MAX")),Y=st.q.instance.prodigy.create.panel(this.content,500,65,4,2,"stat"),st.q.instance.prodigy.create.font(Y,5,5,this.localization.getText("PLAYER_CARD_STARS"),{size:20}),st.q.instance.prodigy.create.font(Y,-20,46,q,{fontID:8,align:"center",width:200}),Y=st.q.instance.prodigy.create.panel(this.content,330,155,4,2,"stat"),st.q.instance.prodigy.create.font(Y,5,5,this.localization.getText("PLAYER_CARD_GOLD"),{size:20}),st.q.instance.prodigy.create.font(Y,5,46,`${this.player.getGold()}`,{fontID:8,align:"right",width:145}),Y=st.q.instance.prodigy.create.panel(this.content,500,155,4,2,"stat"),st.q.instance.prodigy.create.font(Y,5,5,this.localization.getText("PLAYER_CARD_TOWER"),{size:20}),st.q.instance.prodigy.create.font(Y,5,46,this.localization.getText("PLAYER_CARD_FLOOR",this.player.getTowerProgress()),{fontID:8,align:"center",width:145})}}toHouse(){const q=this.loggedInPlayerProvider.player;if(this.player.userID!==q.userID){const q=st.q.instance.prodigy.friendsListNetworkHandler.friendsList.length,K=st.q.instance.prodigy.friendsListNetworkHandler.classList.length;this.segment.social.sendHouseVisitedEvent({friends:q,classmates:K,friend_id:this.player.userID})}if(st.q.instance.prodigy.classModeController.isClassMode())st.q.instance.prodigy.open.classModeMessage(this.localization.getText("WORLD_YOUR_HOUSE_CLASS_MODE"),null,null,this.localization.getText("WORLD_YOUR_HOUSE"),"popup-travel-home",{isModal:!0});else{if(!this.featureRequirements.meetsRequirementsDeprecated(38))return void st.q.instance.prodigy.open.lamplightLevelLock("PLAYER_CARD_GO_TO_HOUSE_BUTTON_BOT");{const q=st.q.instance.prodigy.world.getZone(st.q.instance.prodigy.world.getCurrentZone());q?q.handleLeaving(Un.j.teleport,(()=>{this.teleportToHouse()})):this.teleportToHouse()}}this.sendTabClickEvent("move")}sendDuelInvite(){st.q.instance.prodigy.loading(!0,!0),He.e.invite(Fe.VB.Standard,this.player).catch(this.duelInviteFailed.bind(this))}sendGift(){st.q.instance.prodigy.open.messageBoxPrefab({title:"SEND_GIFT_FEATURE_SOON_MESSAGE_TITLE",text:"SEND_GIFT_FEATURE_SOON_MESSAGE_BODY"})}update(){super.update(),this.showFriendSocialStatus&&this.refreshPlayerSocialStatus()}updatePlayerContainerOffset(){if(this.playerContainer){const q=this.loggedInPlayerProvider.player.equipment.getMount()>0;this.playerContainer.y=q?360:320}}updatePlayer(q){this.playerContainer.reload(),this.playerContainer.updateMountAppearance(),this.updatePlayerContainerOffset(),this.game.input.clearEnterCallback(),this.setMode(q,q)}updateAppearance(){this.playerContainer&&(this.playerContainer.reload(),this.updatePlayerContainerOffset(),this.playerName.setText(this.player.getName()))}itemSelected(q,K,z,Y){X.Aq$.isDefined(q)&&st.q.instance.prodigy.open.itemInfo({ID:q,type:K},this.updatePlayer.bind(this,Y),z)}openPouch(q){X.Aq$.isDefined(this.player.equipment.getEquipment(q))?this.itemSelected(this.player.equipment.getEquipment(q),q,Wr.s.Equip,0):st.q.instance.prodigy.open.pouch(q,this.updatePlayer.bind(this,0),null)}createBreadcrumbIndicator(q,K,z,Y,Q){const Z=st.q.instance.prodigy.create.sprite(0,0,z,Y);K.addChild(Z);const J=Nn.J.getOptionalParameter(Q,K),tt=X.Aq$.getCenteredXY(Z.width,0,J.x,J.y,J.width,0);return Z.x=tt.x,Z.y=J.y-Z.height,q.add.tween(Z,this).to({y:Z.y-10},400,X.GS3.Quadratic.InOut,!0,0,-1,!0),Z}teleportToHouse(){X.Aq$.isDefined(this.exclamationSprite)&&(this.exclamationSprite.destroy(),st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_HOUSE_VISITING,En.B.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON)),st.q.instance.prodigy.loading(!0);const q=q=>{const K=null==q?void 0:q[this.player.userID];(null==K?void 0:K.house)&&(st.q.instance.prodigy.loading(!1),this.player.house.setItems(K.house),st.q.instance.prodigy.world.it(mn.A_.HOUSE,null,null,{player:this.player}))};st.q.instance.prodigy.gameContainer.get("774-4659").getCharData(this.player.userID.toString(),[mn.A_.HOUSE],q,q),this.segment.featureCommon.sendInterfaceEvent({interfaceName:this.currentInterfaceName,interfaceType:Si.Wm.Menu,instanceType:Li.N.Interface,closeMethod:Si.Lv.TeleportButton})}duelInviteFailed(q){st.q.instance.prodigy.loading(!1),st.q.instance.prodigy.open.messageBoxPrefab({text:"BATTLE_API_MAINTENANCE_MESSAGE"})}sendTabClickEvent(q){this.segment.featureCommon.sendTabEvent({tabName:q,interfaceName:this.currentInterfaceName,interfaceType:Si.Wm.Menu})}createExtendedPanel(){const q=this.game.cache,K=q.getTextureAtlas(it._.General_core_json);if(K.frameData.getFrameByName("card-top-extended-top"))return;const z=K.frameData,Y=q.getTexture(it._.General_core_json).baseTexture,Q=[["corner","corner4"],["corner2","corner3"],["corner3","corner2"],["corner4","corner"],["top","top2"],["top2","top"]];for(const X of Q){const K=z.getFrameByName(`card-top-${X[0]}`),Q=K.clone();Q.name=`card-top-extended-${X[1]}`,Q.y=K.y+K.height,Q.height=-K.height,z.addFrame(Q);const Z=q.getTexture(it._.General_core_json,K.name),J=new tt.Texture(Y,Z.frame.clone());J.frame.y=Q.y,J.frame.height=Q.height,J.updateUvs(),J.frame.y=K.y,J.frame.height=K.height,q.addImage(it._.General_core_json,J,Q.name)}}}su.IS_CLASSMATE=2,(0,Q.Cg)([(0,X.fFd)("11f-118a"),(0,Q.Sn)("design:type",Object)],su.prototype,"featureRequirements",void 0),(0,Q.Cg)([(0,X.fFd)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],su.prototype,"localization",void 0),(0,Q.Cg)([(0,X.fFd)("ad2-c5b2"),(0,Q.Sn)("design:type",ee.E)],su.prototype,"loggedInPlayerProvider",void 0),(0,Q.Cg)([(0,X.fFd)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],su.prototype,"prefabLoader",void 0),(0,Q.Cg)([(0,X.fFd)("f71-42eb"),(0,Q.Sn)("design:type",Object)],su.prototype,"featureFlagProvider",void 0),(0,Q.Cg)([(0,X.fFd)("20f-5f67"),(0,Q.Sn)("design:type",Qe.Y)],su.prototype,"segment",void 0),(0,Q.Cg)([(0,X.fFd)("b0c-9016"),(0,Q.Sn)("design:type",ze.d)],su.prototype,"_synapse",void 0),(0,Q.Cg)([(0,Zl.sg)(2e3),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],su.prototype,"sendDuelInvite",null);class nu extends Jh.a{constructor(q,K){super(q,K,0,0,st.q.instance.prodigy.textureMenu),this.panel=null,this.content=null,this.create()}create(){this.addTransparent(),this.panel=st.q.instance.prodigy.create.panel(this,240,80,20,14,"shine"),this.panel.setRenderState(!0),st.q.instance.prodigy.create.button(this,this.panel.x+760,this.panel.y-10,it._.General_icons_json,"close",this.close.bind(this)),this.panel.add(new jr.C(this.game,11,120,778,40,it._.Tiled_sprites_json,"blue-top")),this.panel.add(new jr.C(this.game,11,160,778,300,it._.Tiled_sprites_json,"blue-mid")),this.panel.add(new jr.C(this.game,11,460,778,40,it._.Tiled_sprites_json,"blue-top2")),st.q.instance.prodigy.create.panel(this.panel,200,-10,10,2,"banner"),st.q.instance.prodigy.create.font(this,290,86,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SPELLBOOK_TITLE"),{fontID:9,size:36,width:720,align:"center"}),st.q.instance.prodigy.create.panel(this.panel,240,140,8,4,"white").alpha=.5,st.q.instance.prodigy.create.font(this.panel,250,150,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SPELLBOOK_DESCRIPTION"),{fontID:8,width:318}),this.content=st.q.instance.prodigy.create.element(this,500,170),super.create(),this.updateSpells()}updateSpells(){X.Aq$.isDefined(this.content)&&this.content.destroy(),this.content=st.q.instance.prodigy.create.element(this,290,180);const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getAttacks(),K=[[0,0],[0,1],[1,1],[2,1],[3,1],[3,0]];for(let z=0;z<6;z++)z>=q.length?st.q.instance.prodigy.create.panel(this.content,180*K[z][0],220*K[z][1],4,5,"empty"):st.q.instance.prodigy.prefabFactory.createItemCard(this.content,180*K[z][0],220*K[z][1],{id:q[z],type:"spell"},Wr.s.Inventory,this.spellSelected.bind(this,q[z])).catch(X.RQr.createHandler('Error creating item card for player spells in the "Character" spell menu'))}spellSelected(q){st.q.instance.prodigy.open.pouch("spell",this.updateSpells.bind(this),q)}}!function(q){q.Dance="dance",q.Expression="emote"}(Ql||(Ql={}));var au=z(44356),ru=z(87776);class ou extends Lr.H{constructor(q,K,z,Y,Q,Z){super(q,K,z,Y,Z),this.onHide=new X.HN0,this.onIDSelected=new X.HN0,this.buttonData=null,this.currentPage=0,this.iconsPerPage=6,this.emoteButtons=[],this.emotesPanel=null,this.nextPage=null,this.prevPage=null,this.dabIndicatorImage=null,this._fxHandler=null,this.buttonData=Q.filter((q=>!(null==q?void 0:q.isEventEmote))),this._fxHandler=st.q.instance.prodigy.gameContainer.get("247-28af"),this.createPanel()}createPanel(){this.emotesPanel=st.q.instance.prodigy.create.element(this,0,0);this.emotesPanel.add(st.q.instance.prodigy.create.sprite(0,0,it._.General_chat_hud_json,"tabmenu")).inputEnabled=!0,this.nextPage=st.q.instance.prodigy.create.button(this.emotesPanel,366,47,it._.General_chat_hud_json,"arrow",this.loadEmotes.bind(this,1)),this.nextPage.sprite.rotateMiddleBased(0),this.nextPage.name="Next Arrow",this.prevPage=st.q.instance.prodigy.create.button(this.emotesPanel,-7,47,it._.General_chat_hud_json,"arrow",this.loadEmotes.bind(this,-1)),this.prevPage.sprite.rotateMiddleBased(180),this.prevPage.name="Previous Arrow";st.q.instance.prodigy.create.button(this.emotesPanel,165,-5,it._.General_chat_hud_json,"closetabarrow1",this.hide.bind(this),null,null,!0).name="Close Arrow",this.loadEmotes(0)}loadEmotes(q){for(let Y=0;Y=K&&(this.currentPage=K,this.nextPage.setInactive());const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;for(let Y=this.currentPage*this.iconsPerPage;Y{const q={bodyText:null,xPosition:720,yPosition:585,arrowXRelPos:.2,arrowDirection:Kr.i.DOWN};st.q.instance.prodigy.open.memberAdSuppressionToolTip(q,!0,!1)}),q=st.q.instance.prodigy.create.button(this.emotesPanel,Y%this.iconsPerPage*54+45,47,zt.E.getIconForType(K.type,K.id),null,Q,null,null,!1,48,50);const X=this.setButtonIcon.bind(this,q);Nn.J.shouldSuppressAd(z)?(q.sprite.tint=6710886,st.q.instance.prodigy.create.sprite(32,-3,it._.Ui_icons_json,"icon-mini-lock",null,X)):st.q.instance.prodigy.create.sprite(32,-3,br.q.Icon_mini_member_b,null,null,X)}Nn.J.shouldSuppressAd(z)||st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.BREADCRUMB_CLICKED_DAB,En.B.BREADCRUMB_CLICKED_DAB_DAB_BUTTON)||(this.dabIndicatorImage=st.q.instance.prodigy.create.image(0,0,it._.General_icons_json,"exclamation"),q.addChild(this.dabIndicatorImage),this.dabIndicatorImage.x+=3,this.dabIndicatorImage.y-=42,q.y+=21,this.game.add.tween(this.dabIndicatorImage,this).to({y:this.dabIndicatorImage.y-10},400,X.GS3.Quadratic.InOut,!0,0,-1,!0))}else q=st.q.instance.prodigy.create.button(this.emotesPanel,Y%this.iconsPerPage*54+45,47,zt.E.getIconForType(K.type,K.id),null,this.sendEmote.bind(this,K.name,K.type),null,null,!1,48,50);q.x-=Math.floor(.5*q.width),q.y-=Math.floor(.5*q.height)}else if("item"===this.buttonData[Y].type){const Q=this.buttonData[Y],X=z.backpack.hasItem(K.type,Q.ID),Z=it._.General_chat_hud_json,J=`${K.type}-${Q.ID}${X<=0?"-grey":""}`;q=st.q.instance.prodigy.create.button(this.emotesPanel,Y%this.iconsPerPage*54+45,47,Z,J,null,null,null,0===X,48,50),q.x-=Math.floor(.5*q.width),q.y-=Math.floor(.5*q.height);const tt=st.q.instance.prodigy.create.sprite(-5,-5,Z,"quantitybg");q.sprite.addChild(tt);const et=new ru.b(this.game,tt);et.populate({text:`${X}`,style:15,fontSize:15,boundsAlignH:"center",boundsAlignV:"middle"}),et.position.set(11,14),q.callback=()=>{this.useConsumable(K,q,et)}}else{st.q.instance.prodigy.skin.isFestivalActive("Summerfest")&&25===K.id&&(K.id=28),q=st.q.instance.prodigy.create.button(this.emotesPanel,Y%this.iconsPerPage*54+45,47,it._.General_chat_hud_json,"backgroundbutton",this.sendEmote.bind(this,K.id,this.buttonData[Y].type),null,null,!1,48,50),q.x-=Math.floor(.5*q.width),q.y-=Math.floor(.5*q.height);const z=q.addOverlay(5,5,zt.E.getIconForType(K.type,K.id),null);K.isDisabled&&(z.tint=5789784)}this.buttonData[Y].isDisabled&&(q.sprite.events.onInputDown.add((()=>{st.q.instance.prodigy.audio.playSFX(67,"button-disabled")})),q.setInactive()),q.name=`Chat ${this.buttonData[Y].type} ${K.name}`,this.emoteButtons.push(q)}}setButtonIcon(q,K){q.sprite.addChild(K)}danceMemberPrompt(q){const K=st.q.instance.prodigy.gameContainer.get("20f-5f67"),z=Dn.P.shouldUseUnifiedConversionFlow(xn.o.FunnelClickMemberDance)?Rn.R.UnifiedConversionFlow:Nn.J.showYouTubeMembershipAd(this.game,!0)?Rn.R.Video:Rn.R.Static;K.purchase.sendFunnelStart({type:"Click-Member-Dance-Emote",category:"Social",contentId:`${q.type}-${q.id}`,adType:z,adVersion:Dn.P.getAdVersion(xn.o.FunnelClickMemberDance)}),K.playerIdentityAvatar.sendEmoteFailedEvent({emote_name:q.name,emote_type:au.H.Dance,fail_reason:"Member Locked"}),st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.BREADCRUMB_CLICKED_DAB,En.B.BREADCRUMB_CLICKED_DAB_DAB_BUTTON),this.game.broadcaster.broadcast(gi.Y1.HideChatNotif,gi.HG.ChatButton),st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:xn.o.FunnelClickMemberDance})}sendEmote(q,K){const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(X.Aq$.isDefined(q)){const Y=st.q.instance.prodigy.gameContainer.get("774-4659");if("dance"===K){if(this._danceCooldown)return;"dab"===q&&(this.dabIndicatorImage&&this.dabIndicatorImage.destroy(),st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.BREADCRUMB_CLICKED_DAB,En.B.BREADCRUMB_CLICKED_DAB_DAB_BUTTON),this.game.broadcaster.broadcast(gi.Y1.HideChatNotif,gi.HG.ChatButton)),z.danceID=q,Y.emitMessage({action:ja.x.Chat,data:{danceID:q}}),this._danceCooldown&&clearTimeout(this._danceCooldown),this._danceCooldown=setTimeout((()=>{clearTimeout(this._danceCooldown),this._danceCooldown=null}),ou.DANCE_COOLDOWN_MS)}else z.emoteID=q,Y.emitMessage({action:ja.x.Chat,data:{emoteID:q}});this.onIDSelected.dispatch(q)}}useConsumable(q,K,z){var Y;const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let Z=Q.backpack.hasItem(q.type,q.ID);Z>0&&(this._fxHandler.onFire.addOnce((()=>{Q.backpack.consume(q.type,q.ID),Z--,z.setText(`${Z}`),Z<=0&&(K.sprite.frameName=`${q.type}-${q.ID}-grey`,K.setInactive(X.yQ0.WHITE))})),this._fxHandler.doEffect(q),st.q.instance.prodigy.gameContainer.get("20f-5f67").item.sendItemUsedEvent({item_id:q.ID.toString(),item_name:null==q?void 0:q.name,item_type:null===(Y=Ee.t.getItem("fx",q.data.effect.fx))||void 0===Y?void 0:Y.data.type,item_count:1,instance_type:Li.N.OpenWorld,instance_id:""}))}hide(){this.visible=!1,this.onHide.dispatch()}destroy(){this.onHide.dispose(),this.onIDSelected.dispose(),super.destroy()}}ou.DANCE_COOLDOWN_MS=1e3;class hu extends Lr.H{constructor(q,K,z){super(q,K,null,null,"Chat Menu"),this.textField=null,this.chatIDSelected=new X.HN0,this.HALF_PANEL_WIDTH=178,this.HALF_SUGGESTION_WIDTH=234,this.onClose=null,this.data=[],this.expressions=[],this.dances=[],this.consumables=[],this.currentText="",this.suggestions=[],this.emotesPanel=null,this.emoteButton=null,this.dancesPanel=null,this.danceButton=null,this.consumablesPanel=null,this.currentPanel=null,this.results=[],this.indicatorImage=null,this.rt=null,this._backgroundPanelHeight=80,this.onClose=z,this.rt=st.q.instance.prodigy.gameContainer.get("aae-4f6a"),this.data=this.rt.getPhrases();const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=Y.emotes;this.expressions=Q.filter((q=>q.type===Ql.Expression)),this.dances=Q.filter((q=>q.type===Ql.Dance)),this.consumables=Ee.t.getItemsWithFilter("item",(q=>X.Aq$.isDefined(q.data.effect)&&X.Aq$.isDefined(q.data.effect.fx)&&Y.backpack.hasItem(q.type,q.ID)>0)),this.createMenu()}close(){X.Aq$.isDefined(this.onClose)&&this.onClose(),this.onClose=null,this.suggestions=[],this.emotesPanel=null,this.emoteButton=null,this.dancesPanel=null,this.danceButton=null,this.textField=null,this.results=[],this.indicatorImage=null,st.q.instance.prodigy.open.chatMenu=null,this.rt=null,this.chatIDSelected.dispose(),st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:Ah.B.Chat,interfaceType:Si.Wm.DialogBox,closeMethod:Si.Lv.CloseButton,instanceType:Li.N.Interface}),this.destroy()}destroy(q={children:!0}){this.consumablesPanel.destroy(),this.consumablesPanel=null,super.destroy(q)}createMenu(){st.q.instance.prodigy.notifications.clearNotifications();const q=st.q.instance.prodigy.create.element(this,this.game.width/2,638);for(let Q=1;Q<=5;Q++){const K=st.q.instance.prodigy.create.panel(q,-this.HALF_SUGGESTION_WIDTH,-40*Q-8,12,1,"lb"),z={panel:K,text:st.q.instance.prodigy.create.font(K,10,5,""),textID:0};z.panel.setClickable(this.selectItem.bind(this,z)),z.panel.visible=!1,this.suggestions.push(z)}this.emotesPanel=new ou(this.game,q,this.game.width/2-this.HALF_PANEL_WIDTH,567,this.expressions,"Emotes Panel"),this.emotesPanel.visible=!1,this.emotesPanel.onHide.add((()=>{this.setCurrentPanel(null),this.determineDanceBreadcrumbState()})),this.emoteIDSelected=this.emotesPanel.onIDSelected,this.add(this.emotesPanel),this.dancesPanel=new ou(this.game,q,this.game.width/2-this.HALF_PANEL_WIDTH,567,this.dances,"Dance Panel"),this.dancesPanel.visible=!1,this.dancesPanel.onHide.add((()=>{this.setCurrentPanel(null),this.determineDanceBreadcrumbState()})),this.danceIDSelected=this.dancesPanel.onIDSelected,this.add(this.dancesPanel),this.consumablesPanel=new ou(this.game,q,this.game.width/2-this.HALF_PANEL_WIDTH,567,this.consumables,"Consumables Panel"),this.consumablesPanel.visible=!1,this.consumablesPanel.onHide.add((()=>{this.setCurrentPanel(null)})),this.add(this.consumablesPanel);const K=st.q.instance.prodigy.create.element(q,0,0),z=K.add(st.q.instance.prodigy.create.emptySprite(0,0,0,this._backgroundPanelHeight));z.alpha=0;let Y=0;K.add(st.q.instance.prodigy.create.sprite(Y,0,it._.General_core_json,"HUD-end")),Y+=30;for(let Q=0;Q<7;Q++)K.add(st.q.instance.prodigy.create.sprite(Y,0,it._.General_core_json,"HUD-mid")),Y+=62;Y+=30,K.add(st.q.instance.prodigy.create.sprite(Y,0,it._.General_core_json,"HUD-end")).scale.x=-1,K.x-=Y/2,z.width=Y,z.inputEnabled=!0,Y=10,this.emoteButton=st.q.instance.prodigy.create.button(K,Y,17,it._.General_chat_hud_json,"emotebutton",(()=>{this.togglePanel(this.emotesPanel)})),Y+=53,this.danceButton=st.q.instance.prodigy.create.button(K,Y,17,it._.General_chat_hud_json,"dancebutton",(()=>{this.togglePanel(this.dancesPanel)})),Y+=53,st.q.instance.prodigy.create.button(K,Y,17,it._.General_chat_hud_json,"consumablebutton",(()=>{this.togglePanel(this.consumablesPanel)})),Y+=53,K.add(st.q.instance.prodigy.create.sprite(Y,17,it._.General_chat_hud_json,"chatendcap"));for(let Q=0;Q<5;Q++)Y+=40,K.add(st.q.instance.prodigy.create.sprite(Y,17,it._.General_chat_hud_json,"chatmiddlebar"));K.add(st.q.instance.prodigy.create.sprite(Y+80,17,it._.General_chat_hud_json,"chatendcap")).scale.x=-1,this.textField=new qh.F(this.game,this,"chat-input",null,568,663,230,35,{background:"transparent",border:"none"},"off"),this.textField.input.onkeyup=this.search.bind(this,!0),st.q.instance.prodigy.create.button(K,423,17,it._.General_chat_hud_json,"chatbutton",this.setChatFocus.bind(this),null,null,!0),st.q.instance.prodigy.create.button(K,463,-7,it._.General_chat_hud_json,"closebutton",(()=>{st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:Xh.k.X,destinationName:st.q.instance.prodigy.world.getCurrentZone(),interfaceName:Ah.B.Chat,interfaceType:Si.Wm.HUD}),this.close()}));st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.isPlayerTransformed()?this.setChatButtons(!1):this.determineDanceBreadcrumbState()}setChatButtons(q){q?(this.emoteButton.setActive(),this.danceButton.setActive()):(this.emoteButton.setInactive(),this.danceButton.setInactive())}togglePanel(q){this.setCurrentPanel(this.currentPanel===q?null:q)}setCurrentPanel(q){this.currentPanel&&(this.currentPanel.visible=!1),this.currentPanel=q,this.currentPanel&&(this.currentPanel.visible=!0,this.clearSearch()),this.textField.setFocus(null===q),this.determineDanceBreadcrumbState()}setChatFocus(){this.setCurrentPanel(null),setTimeout((()=>{this.textField.setFocus(!0)}),100)}selectItem(q){this.clearSearch(),this.sendChat(q.textID)}search(q){const K=this.textField.getValue();q&&this.setCurrentPanel(null),K.length<=0?this.results=[]:K.lengthq.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join(".*"),Q=new RegExp(Y,"i"),X=q=>{const K=q.toLowerCase().trim();return K===z?100:K.startsWith(z)?75:K.includes(z)?50:Q.test(K)?25:0};return K.map((q=>({item:q,score:X(q)}))).filter((({score:q})=>q>0)).sort(((q,K)=>K.score-q.score)).map((({item:q})=>q))}}class cu extends Jh.a{constructor(q,K,z,Y){super(q,K,0,0,st.q.instance.prodigy.textureMenu),this.callback=null,this.panel=null,this.callback=Y,this.createWithID(z)}createWithID(q){this.panel=st.q.instance.prodigy.create.panel(this,400,200,12,9,"shine"),this.panel.add(new jr.C(this.game,11,80,458,40,it._.Tiled_sprites_json,"blue-top")),this.panel.add(new jr.C(this.game,11,120,458,120,it._.Tiled_sprites_json,"blue-mid")),this.panel.add(new jr.C(this.game,11,240,458,40,it._.Tiled_sprites_json,"blue-top2"));const K={type:"pet",ID:q};this.panel.add(st.q.instance.prodigy.icon.createFromData(K,40,30)),st.q.instance.prodigy.create.font(this.panel,140,35,(0,Ka.k)(Nn.J.getLocalizationNameKey(K)),{size:36,fontID:9}),st.q.instance.prodigy.create.font(this.panel,40,130,(0,Ka.k)(Nn.J.getLocalizationFlavorKey(K)),{width:400,fontID:8}),st.q.instance.prodigy.create.button(this,this.panel.x+440,this.panel.y-10,it._.General_icons_json,"close",(()=>{this.closeWithSuccess(!1)})),st.q.instance.prodigy.create.textButton(this,this.panel.x+65,this.panel.y+290,{icon:"yes",text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("CHOOSE_PET_BUTTON"),size:To.LG},(()=>{this.closeWithSuccess(!0)})),this.create()}closeWithSuccess(q){q&&this.callback(),super.close()}}var du=z(86051);class lu extends Kh.b{constructor(q,K,z){if(super(q,K,du.K.COLISEUM),this.player=null,this.index=0,this.opponentName=null,this.opponentTitle=null,this.description=null,this.itemIcon=null,this.defeat=null,this.scrollRightButton=null,this.scrollLeftButton=null,this.challengeButton=null,this.data=null,this.opponent=null,this.petV=null,this.playerV=null,this.locked=!1,this.player=z,!X.Aq$.isDefined(lu.data[0].title))for(const Y of lu.data)Object.defineProperty(Y,"title",{get:()=>st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(Y.titleKey)}),Object.defineProperty(Y,"description",{get:()=>st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(Y.descriptionKey)});this.setup()}menuSetup(){super.menuSetup();const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this.index=0;const K=this.game.width,z=st.q.instance.prodigy.create.sprite(120,140,it._.General_core_2_json,"char-container");this.add(z),st.q.instance.prodigy.create.panel(this,K-600-120,140,12,6),st.q.instance.prodigy.create.panel(this,K-300-120,480,6,2),this.opponentName=st.q.instance.prodigy.create.font(this,K-600-120+50,150,"",{size:40}),this.opponentTitle=st.q.instance.prodigy.create.font(this,K-600-120+50,180,"",{width:500,align:"right"}),this.description=st.q.instance.prodigy.create.font(this,K-600-120+30,230,"",{size:20,width:540}),st.q.instance.prodigy.create.font(this,880,490,q.getText("COLISEUM_REWARD"),{size:30}),this.itemIcon=st.q.instance.prodigy.icon.createWithQuantity(this,1020,470,zt.E.getIconForType("item",26),1),this.defeat=st.q.instance.prodigy.create.sprite(270,460,it._.General_icons_json,"yes"),this.add(this.defeat),this.scrollRightButton=st.q.instance.prodigy.create.button(this,374,430,it._.General_icons_json,"next",this.shift.bind(this,1)),this.scrollLeftButton=st.q.instance.prodigy.create.button(this,164,430,it._.General_icons_json,"back",this.shift.bind(this,-1)),this.challengeButton=st.q.instance.prodigy.create.textButton(this,K-600-120+300-150,410,{text:q.getText("COLISEUM_BUTTON_CHALLENGE"),icon:{type:"weapon",ID:4},size:To.MED},this.challenge.bind(this)),this.showFrame("leaderboard",q.getText("ARENA_TITLE"),[]);const Y=st.q.instance.prodigy.create.textButton(this,0,0,{icon:"close",text:q.getText("BUTTON_CLOSE")},this.close.bind(this));this.showBtns([],[Y]);const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.index=Math.min(Q.getColiseum(),lu.data.length-1),this.shift(0),this.setupComplete=!0}shift(q){this.index+=q,this.scrollLeftButton.setActive(),this.scrollRightButton.setActive(),this.index<=0&&(this.index=0,this.scrollLeftButton.setInactive()),this.index>=lu.data.length-1&&(this.index=lu.data.length-1,this.scrollRightButton.setInactive()),this.changeOpponent()}changeOpponent(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(this.data=lu.data[this.index],this.opponent=new Aa.s(this.game),this.opponent.init(this.data.opponent),X.Aq$.isDefined(this.petV)&&this.petV.destroy(),this.data.pets.length>0){const K=Z.first(this.data.pets);this.petV=st.q.instance.prodigy.create.monster(this,new Ta.R(this.game,K),1,250,350),q.encounters.onPetEncountered(K.ID),this.petV.reload(),this.petV.OnLoad.addOnce((()=>{this.petV.stand()}))}X.Aq$.isDefined(this.playerV)&&this.playerV.destroy(),this.playerV=st.q.instance.prodigy.create.character(this,this.opponent,1,360,380),this.data.pets.length<=0&&(this.playerV.x-=55),this.playerV.reload();const K=this.data.drops[0];"gold"===K.type?this.itemIcon.setValue(zt.E.getIconForType("item",26),null,K.N):this.itemIcon.setValue(st.q.instance.prodigy.icon.iconKey(K),null,1);let z="";if(this.index>Math.floor(this.player.getLevel()/5)||this.index>q.getColiseum()){let K=!1,Y=!1;this.index>Math.floor(this.player.getLevel()/5)&&(K=!0),this.index>q.getColiseum()&&(Y=!0),z=K&&Y?1===this.index?st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_LEVEL_DEFEAT_SINGLE",5*this.index,this.opponent.getName()):st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_LEVEL_DEFEAT_PLURAL",5*this.index,this.opponent.getName()):K?st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_LEVEL",5*this.index,this.opponent.getName()):1===this.index?st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_DEFEAT_SINGLE",this.opponent.getName()):st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_DEFEAT_PLURAL",this.opponent.getName()),this.locked=!0,this.challengeButton.visible=!0,this.challengeButton.setInactive(),this.defeat.visible=!1}else this.index{X.Aq$.isDefined(K)&&K>z.getColiseum()&&z.setColiseum(K),st.q.instance.prodigy.world.it("lamplight-coliseum")};delete lu.data[q].opponent.data.hp;const Q=lu.data[q].pets;if(X.Aq$.isDefined(Q))for(let X=0;X{this._segment.featureCommon.sendInterfaceEvent({interfaceName:Ah.B.ItemInfo,interfaceType:Si.Wm.InfoPanel,instanceType:Li.N.Interface,closeMethod:Si.Lv.ButtonClick}),Y.apply(this,q)},this.callback=Y,st.q.instance.prodigy.load.assets([it._.Font_black_json],this.create.bind(this))}create(){var q;this.addTransparent();const K=new tt.Container;this.addChild(K),this.panel=st.q.instance.prodigy.create.panel(K,230,100,21,12,"shine"),this.panel.setRenderState(!0),st.q.instance.prodigy.create.button(this,this.panel.x+800,this.panel.y-10,it._.General_icons_json,"close",(()=>{this.sendButtonEvent(Xh.k.X),this.close()}));let z=null,Y=null;const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.mode===Wr.s.Buy?(z=st.q.instance.prodigy.create.item(this,270,140,{id:this.item.getID(),type:this.item.getType()},Wr.s.Info),Y=Ee.t.getItem(this.item.getType(),this.item.getID()).data):(z=st.q.instance.prodigy.create.item(this,270,140,{id:this.item.ID,type:this.item.type},Wr.s.Info),Y=Ee.t.getItem(this.item.type,this.item.ID).data);const Z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);switch(this.mode){case Wr.s.Buy:z.containerLoaded?this.createBuyModeUI(z,Y):z.onContainerLoaded.addOnce((()=>{this.createBuyModeUI(z,Y)}));break;case Wr.s.Equip:{let K="";const z=this.item;1!==z.L||Q.hasMembership()||(K=Nn.J.shouldSuppressAd(Q)?"[icon-medium-lock] ":"[membership] ");["hat","weapon","outfit","boots","follow","back","spellRelic","mount","costume"].includes(z.type)?Q.equipment.getEquipment(z.type)===z.ID?(K=Z.getText("ITEM_BUTTON_REMOVE"),st.q.instance.prodigy.create.textButton(this,290,435,{text:K,size:To.SMALL},(()=>{this.sendButtonEvent(`${K}-button`),this.unequipItem()}))):("follow"===z.type?K+=Z.getText("ITEM_BUTTON_SHOW"):"mount"===z.type?K+=Z.getText("ITEM_BUTTON_RIDE"):K+=Z.getText("ITEM_BUTTON_WEAR"),st.q.instance.prodigy.create.textButton(this,290,435,{text:K,size:To.SMALL},(()=>{this.sendButtonEvent(`${K}-button`),this.equipItem()}))):X.Aq$.isDefined(null===(q=Y.effect)||void 0===q?void 0:q.transform)&&st.q.instance.prodigy.create.textButton(this,290,435,{text:Z.getText("ITEM_BUTTON_USE"),icon:"up",size:To.SMALL},(()=>{this.sendButtonEvent(Xh.k.Use),this.checkTransformation(Y)}));break}case Wr.s.Item:{let q="";1!==this.item.L||Q.hasMembership()||(q="[membership] "),q+=Z.getText("ITEM_BUTTON_USE"),st.q.instance.prodigy.create.textButton(this,290,435,{text:q,size:To.SMALL},(()=>{this.sendButtonEvent(`${q}-button`),this.useItem(this.item)}));break}}super.create(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:Ah.B.ItemInfo,interfaceType:Si.Wm.InfoPanel,instanceType:Li.N.Interface,originType:Si.$N.ButtonClick,originID:Xh.k.Item})}createBuyModeUI(q,K){const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("ITEM_BUTTON_BUY"),Q="[mail-gold] ";const Z=this.item.getCost()[0];"currency"===Z.getType()&&1===Z.getID()||(Q=`[${Ee.t.getItem(Z.getType(),Z.getID()).data.icon}] `);const J=Ee.t.getItem(this.item.getType(),this.item.getID()),tt=Nn.J.getPurchasePrice(J.data,Z);tt>0?st.q.instance.prodigy.create.font(this,290,385,`${Q}${tt}`,{align:"center",width:200,size:30,iconOffsetY:6}):Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("ITEM_TEXT_CHANGE"),1!==K.member||z.hasMembership()||(Y=`[membership] ${Y}`),st.q.instance.prodigy.create.textButton(this,290,435,{text:Y,size:To.SMALL},(()=>{this.sendButtonEvent(`${Y}-button`),this.close(!0)}))}checkTransformation(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;X.Aq$.isDefined(q.effect)&&X.Aq$.isDefined(q.effect.transform)&&(K.isPlayerTransformed()?st.q.instance.prodigy.open.messageBoxPrefab({text:"MORPH_START_NEW",buttonState:xr.D.YesNoButtons,confirmCallback:()=>{this.useTransformation(q)}}):this.useTransformation(q))}useTransformation(q){var K;const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;null===(K=z.playerContainer)||void 0===K||K.transformToItem(q.effect.transform,q.effect.ID,!0,q.effect.time),z.backpack.consume(this.item.type,this.item.ID),st.q.instance.game.broadcaster.broadcast(gi.J8.MorphMarbleUsed,void 0,[q]),this.close(!0),this._segment.item.sendItemUsedEvent({item_id:this.item.ID.toString(),item_name:null==q?void 0:q.name,item_type:"morph",item_count:1})}useItem(q){var K,z;const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;1!==q.L||Y.hasMembership()||(st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:xn.o.FunnelUseMemberLockedItem}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(z=null===(K=Ee.t.getItem(this.item.type,this.item.ID))||void 0===K?void 0:K.data)||void 0===z?void 0:z.name,item_type:this.item.type,item_id:this.item.ID,fail_reason:"Member Locked"}))}equipItem(){var q,K;const z=st.q.instance.prodigy.gameContainer,Y=z.get("ad2-c5b2").player,Q=Ee.t.getItem(this.item.type,this.item.ID).data,Z=X.Aq$.isDefined(Q.lockLevel)&&Y.getLevel(){var q,K;Y.hasMembership()||Nn.J.shouldSuppressAd(Y)||(this._segment.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Backpack",category:"Item-Equip",contentId:Z,adType:J,adVersion:Dn.P.getAdVersion(xn.o.FunnelEquipLevelLockedItem)}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(K=null===(q=Ee.t.getItem(this.item.type,this.item.ID))||void 0===q?void 0:q.data)||void 0===K?void 0:K.name,item_type:this.item.type,item_id:this.item.ID,fail_reason:"Member Locked"}),st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:xn.o.FunnelEquipLevelLockedItem,conversionFunnelMetadata:Z}))}}else Y.equip(this.item.ID,this.item.type).then((q=>{q&&(Y.appearanceChanged=!0,st.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(X.RQr.createHandler(`ItemInfo:equipItem Error equipping item ${this.item.type}-${this.item.ID}`)).finally((()=>{this.close()}));else{const z={conversionFunnelName:xn.o.FunnelEquipBackpackLockedItem,conversionFunnelMetadata:`${tt.type}-${tt.ID}`};this._segment.purchase.sendFunnelStart({type:"Equip-Member-Locked-Item-Backpack",category:"Item-Equip",contentId:`${tt.type}-${tt.ID}`,adType:J}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(K=null===(q=Ee.t.getItem(this.item.type,this.item.ID))||void 0===q?void 0:q.data)||void 0===K?void 0:K.name,item_type:this.item.type,item_id:this.item.ID,fail_reason:"Member Locked"}),Nn.J.shouldSuppressAd(Y)?st.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:394,yPosition:430,arrowXRelPos:.5,arrowDirection:Kr.i.DOWN}):st.q.instance.prodigy.open.membershipInfo(null,z)}}unequipItem(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=this.item;q.unEquip(K.ID,K.type).then((K=>{K&&(q.appearanceChanged=!0,st.q.instance.prodigy.audio.playSFX(18,"blop"))})).catch(X.RQr.createHandler(`ItemInfo:unequipItem Error unequipping item ${K.type}-${K.ID}`)).finally((()=>{this.close()}))}sendButtonEvent(q){this._segment.featureCommon.sendButtonEvent({buttonName:q,interfaceName:Ah.B.ItemInfo,interfaceType:Si.Wm.InfoPanel})}}class bu extends fu{createBuyModeUI(q,K){super.createBuyModeUI(q,K);const z=st.q.instance.prodigy.create.textButton(this,0,0,{text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("HOUSE_BUTTON_VISIT"),size:To.SMALL},(()=>{st.q.instance.prodigy.world.getZone(mn.A_.HOUSE).gotoPreview(K.tag)}));z.y=435;const Y=q.width/3;z.x=X.Aq$.getCenteredXY(z.width,0,q.x+Y,0,2*Y,0).x}}var pu=z(95130);class vu extends sr.W{constructor(q,K,z,Y,Q){super(q,K,34,{},[it._.Popup_ui_roulette_json,it._.Ui_icons_json,it._.Ui_shared_json]),this.buttonList=[],this.nicknames=z,this.user=Y,this.zoneID=Q,this.nicknameController=st.q.instance.prodigy.gameContainer.get("3b0-2652"),this.currentInterfaceName=Ah.B.NicknamerMenu}create(){super.create(),this.closeButton.onClickCallback=()=>{this.fireButtonEvent({buttonName:Xh.k.X}),this.close()},this.applyButton.onClickCallback=()=>{this.fireButtonEvent({buttonName:Xh.k.SaveName}),this.apply()},this.applyButton.setActive(!1),this.populateNicknames(),this.findElement(ru.b,"titleText").setText(this.nicknameController.getNicknamerTitle(this.zoneID)),this.fireInterfaceEvent({originType:Si.$N.WorldObject})}populateNicknames(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.appearance;this.addNicknameElement(null,q,!1,-1,!X.Aq$.isDefined(q.getName().getNickname()));for(let K=0;K{this.close()})),this.content=st.q.instance.prodigy.create.element(this,260,180),st.q.instance.prodigy.create.panel(this,(this.game.width-880)/2,180,22,10,"white"),st.q.instance.prodigy.create.font(this,290,120,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(`POUCH_CHOOSE_${this.itemType.toUpperCase()}`),{fontID:9,size:36,width:720,align:"center"}),super.create(),this.setMode(0)}setActive(q){super.setActive(q),this._itemCards.forEach((K=>K.active=q))}close(){X.Aq$.isDefined(this.bar)&&this.bar.destroy(),this.player=null,this._itemCards.forEach((q=>null==q?void 0:q.destroy())),this._itemCards.length=0,this.clearContents(),super.close()}setMode(q){super.setMode(q),this.listItemsOfType()}switchSpell(q){q!==this.selected&&this.player.swapSpells(this.selected,q),this.close()}clearContents(){X.Aq$.isDefined(this.content)&&this.content.destroy()}scrollItems(q){var K,z;this.clearContents(),this.content=st.q.instance.prodigy.create.element(this,35,140);let Y=0;for(let Q=q;Q{this.switchSpell(this.owned[Q].ID)})).then((q=>{this._itemCards[Z]=q})).catch(X.RQr.createHandler("Error creating item card for spell in the pouch"));else{const z=this._itemCards[Z%this._pageSize];null===(K=null==z?void 0:z.findComponentInChildren(zl.Z))||void 0===K||K.initializeItemCard(q);const Y=z.findComponentInChildren(Kl.n);null==Y||Y.onClicked.removeAll(),q&&(null==Y||Y.onClicked.add((()=>{this.switchSpell(this.owned[Q].ID)}),this))}}else{const q=Q>=this.owned.length?void 0:{id:this.owned[Q].ID,type:this.itemType,N:this.owned[Q].N,L:this.owned[Q].L};if(this._itemCardsCreatedCount{q&&this.equipItem(this.owned[Q])})).then((q=>{this._itemCards[Z]=q})).catch(X.RQr.createHandler("Error creating item card for item in the pouch"));else{const K=this._itemCards[Z%this._pageSize];null===(z=null==K?void 0:K.findComponentInChildren(zl.Z))||void 0===z||z.initializeItemCard(q);const Y=K.findComponentInChildren(Kl.n);null==Y||Y.onClicked.removeAll(),q&&(null==Y||Y.onClicked.add((()=>{this.equipItem(this.owned[Q])}),this))}}Y++}}listItemsOfType(){if(X.Aq$.isDefined(this.bar)&&this.bar.destroy(),"spell"===this.itemType){const q=this.player.getAllAttacks();this.owned=[];for(let K=0;K{this.scrollItems(q)}))}equipItem(q){const K=st.q.instance.prodigy.gameContainer,z=K.get("20f-5f67"),Y=K.get("ad2-c5b2").player,Q=Nn.J.showYouTubeMembershipAd(this.game,!0)?Rn.R.Video:Rn.R.Static,Z=(this.itemType,q.ID,Ee.t.getItem(this.itemType,q.ID).data);if(X.Aq$.isDefined(Z.lockLevel)&&Y.getLevel(){var K,X;if(!Y.hasMembership()&&!Nn.J.shouldSuppressAd(Y)){const Y=`${this.itemType}-${q.ID}`;z.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Pouch",category:"Item-Equip",contentId:Y,adType:Q}),z.item.sendItemEquipFailedEvent({item_name:null===(X=null===(K=Ee.t.getItem(this.itemType,q.ID))||void 0===K?void 0:K.data)||void 0===X?void 0:X.name,item_type:this.itemType,item_id:q.ID,fail_reason:"Member Locked"}),st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:xn.o.FunnelEquipLevelLockedItem,conversionFunnelMetadata:Y})}}}else this.player.equip(q.ID,this.itemType,!0).then((q=>{q&&(Y.appearanceChanged=!0,st.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(X.RQr.createHandler(`Pouch:equipItem Error equipping item ${this.itemType}-${q.ID}`)).finally((()=>{this.close()}))}}class mu extends Kh.b{constructor(q,K,z){super(q,K,null,{hideMenu:!0,hideContent:!1}),this.callback=z;try{jt.pF.appType()===jt.uC.NATIVE_APP&&window.postMessage(JSON.stringify({type:"REVIEW_APP"}),window.location.origin)}catch(e){X.VyI.log(e,X.$bb.Error)}this.close()}close(q){X.Aq$.isDefined(this.callback)&&this.callback(),super.close()}}var yu=z(73722),_u=(z(45373),z(24285));class Eu extends Kh.b{constructor(q,K,z){super(q,K,du.K.SERVER_SELECT,{hideMenu:!0,hideContent:!0}),this.dialogue=null,this.isClosed=!1,this._timeLoadStartedMS=null,this._timeLoadStartedMS=Date.now(),this._serverSelectMode=z,this._serverSelectMode.onServerSelected=this.onServerSelected.bind(this),st.q.instance.prodigy.load.assets([it._.Ui_home_school_server_json],this.setup.bind(this))}setup(){super.setup(),st.q.instance.prodigy.load.assets([it._.Ui_titan_json,it._.Ui_shipwreck_progress_json,it._.Ui_shiverchill_progress_json,br.q.Bg_generic_outdoor]);const q=st.q.instance.prodigy.gameContainer.get("a92-c640");null!==q.timeToPlayMS&&q.timeToPlayMS>0&&(q.timeToPlayMS+=Date.now()-this._timeLoadStartedMS)}menuSetup(){super.menuSetup(),this.add(st.q.instance.prodigy.create.sprite(0,0,br.q.Bg_generic_outdoor));this.createPanel(40,245,it._.Ui_home_school_server_json,"school-image","PREMISES_SELECT_SCHOOL",this.onSchoolClick.bind(this)),this.createPanel(this.game.width-(40*Eu.PANEL_DIMENSIONS.tileNumWidth+40),245,it._.Ui_home_school_server_json,"house-image","PREMISES_SELECT_HOME",this.onHomeClick.bind(this));const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=st.q.instance.prodigy.create.player(this,q,2,640,500);K.reload(),K.showName(),this.createDialogue(),st.q.instance.prodigy.create.panel(this,240,this.game.height-80,20,3,"shine2"),st.q.instance.prodigy.create.textButton(this,260,this.game.height-60,{icon:"back",text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("BUTTON_BACK")},this.onBackClick.bind(this))}onMenuOpen(q){this.isClosed||(this.showDialogue(q),this.visible=!0)}createPanel(q,K,z,Y,Q,Z){const J=st.q.instance.prodigy.create.panel(this,q,K,Eu.PANEL_DIMENSIONS.tileNumWidth,Eu.PANEL_DIMENSIONS.tileNumHeight,"shine2"),et=st.q.instance.prodigy.create.element(J,0,0),nt=40,at=Eu.PANEL_DIMENSIONS.tileNumWidth*nt-22,rt=Eu.PANEL_DIMENSIONS.tileNumHeight*nt-120,ot=rt-80;J.add(et),et.add(new jr.C(this.game,11,36,at,nt,it._.Tiled_sprites_json,"blue-top")),et.add(new jr.C(this.game,11,76,at,ot,it._.Tiled_sprites_json,"blue-mid")),et.add(new jr.C(this.game,11,76+ot,at,nt,it._.Tiled_sprites_json,"blue-top2"));const ht=st.q.instance.prodigy.create.button(J,0,0,z,Y,Z);let ct=X.Aq$.getCenteredXY(ht.width,ht.height,11,36,at,rt);ht.x=ct.x,ht.y=ct.y;const dt=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),lt=st.q.instance.prodigy.create.font(J,0,0,dt.getText(Q),{fontID:9,size:36}),ut=76+ot+nt;return ct=X.Aq$.getCenteredXY(lt.width,lt.height,11,ut,at,J.height-ut-11),lt.x=ct.x,lt.y=ct.y-2,J.highlight(!0,40,60),st.q.instance.game.renderer.type===tt.RENDERER_TYPE.CANVAS&&_u.s.cacheAsBitmap(et),J}onServerSelected(q,K){var z,Y;K?this.visible=!0:(null===(Y=(z=this._serverSelectMode).onServerSelectedCallback)||void 0===Y||Y.call(z,q,K),this.close())}onSchoolClick(){!st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasValidatedParentEmail()&&this.canViewParentalLink()?(this.destroyDialogue(),st.q.instance.prodigy.open.parentalLinkAtSchoolPrompt(this.createDialogue.bind(this),this.onSchoolSuccess.bind(this))):(this.destroyDialogue(),this.onSchoolSuccess())}onSchoolSuccess(){this.close(),yu.V.instance.selectedLocation="school",this._serverSelectMode.applyServerSelectMode()}onHomeClick(){this.close(),yu.V.instance.selectedLocation="home",this._serverSelectMode.applyServerSelectMode(),this.visible=!1}onBackClick(){var q,K;if("prodigy"===st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.userDataPlatform)null===(K=(q=this._serverSelectMode).onServerSelectedCallback)||void 0===K||K.call(q,!1,!0),this.close();else{st.q.instance.prodigy.gameContainer.get("774-4659").logout()}}showDialogue(q){this.destroyDialogue(),q&&this.createDialogue()}destroyDialogue(){X.Aq$.isDefined(this.dialogue)&&(this.dialogue.close(),this.dialogue=null)}createDialogue(){this.dialogue=st.q.instance.prodigy.dialogue.create(),this.dialogue.setText(177),this.dialogue.startDeprecated("noot",!0,null,0)}close(){this.destroyDialogue(),this.isClosed=!0,super.close()}canViewParentalLink(q=!1){if(0===te.A.get("GameConstants.Features.ParentLink.TIMEOUT"))return!0;const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let z;return z=q?K.data.atHomeTimestamp:K.data.atSchoolTimestamp,!X.Aq$.isDefined(z)||Bc.R.getDateTime()-z>=te.A.get("GameConstants.Features.ParentLink.TIMEOUT")}}Eu.PANEL_DIMENSIONS={tileNumWidth:11,tileNumHeight:9};var wu=z(39324),Tu=z(91160);class Su extends Kh.b{constructor(q,K,z,Y,Q=!1){super(q,K,du.K.SERVER),this.callback=null,this.servers=[],this.isAutoSelect=!1,this.backButton=null,this.playOfflineButton=null,this.content=null,this.serverPage=null,this.scroll=null,this._metrics=null,this.name="Server Select";st.q.instance.prodigy.gameContainer.get("088-1d4c").startTracing(Tu.u.ServerMenuSelection),this.callback=Y,this.servers=z,this.isAutoSelect=Q,this._metrics={offline:!1,openTime:Date.now(),clickTime:null,buttonIndex:null,worldName:null},this.setup()}static getSuggested(q,K,z){if(q.length{Y.push(q)})),Y}static determineSuggestedWorldsForLoadBalancing(q,K){let z=[],Y=Su.groupServersByCluster(q,K);Y=Y.sort(((q,K)=>Su.determineTotalWorldListFullness(q)-Su.determineTotalWorldListFullness(K)));for(let Q=0;QK.full-q.full)),K=Su.getSuggested(q,Su.SUGGESTED_NUM-z.length,Q===Y.length-1);if(z=z.concat(K),z.length>=Su.SUGGESTED_NUM)break}return z.sort(((q,K)=>K.full-q.full))}menuSetup(){super.menuSetup();const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this.showFrame("map",q.getText("SERVER_CHOOSE_WORLD_TITLE"),[],void 0,48),st.q.instance.prodigy.create.font(this,125,60,q.getText("SERVER_PICK_SAME_WORLD"),{size:20}),this.playOfflineButton=st.q.instance.prodigy.create.textButton(this,930,20,{size:To.MED,icon:"next",text:q.getText("SERVERS_BUTTON_PLAY_OFFLINE")},(()=>this.playOffline())),this.backButton=st.q.instance.prodigy.create.textButton(this,50,650,{icon:"back",text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("BUTTON_BACK")},this.exitMenu.bind(this,!1,!0)),this.content=st.q.instance.prodigy.create.element(this,0,0),this.showSuggestedServers(),this.setupComplete=!0}showSuggestedServers(){const q=st.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Tu.u.ServerMenuSuggestedServers);const K={},z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Q=st.q.instance.prodigy.gameContainer.get("11f-118a");if(this.content.removeAll(!0),!X.Aq$.isDefined(this.servers)){st.q.instance.prodigy.create.font(this.content,0,320,Y.getText("SERVER_LOADING_LIST"),{size:30,width:this.game.width,align:"center"});return void st.q.instance.prodigy.gameContainer.get("774-4659").getWorldList(this.showSuggestedServers.bind(this),this.showError.bind(this,Y.getText("SERVER_ERROR_FAILED_LOAD"),this.showSuggestedServers.bind(this)))}const Z=Su.determineSuggestedWorldsForLoadBalancing(this.servers,st.q.instance.prodigy.gameContainer.get("f71-42eb"));K.suggested_worlds_count=Z.length;for(let tt=0;tt0?(Y=K.sort(((q,K)=>q.id.toString().localeCompare(K.id.toString()))),z=Y[q%Y.length]):X.VyI.log("Server.determineClassWorld - worldData array is empty. Could not determine class world",X.$bb.Verbose),z}showAllServers(){const q=st.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Tu.u.ServerMenuShowAllServers);const K={};this._metrics.openTime=X.Aq$.isDefined(this._metrics.openTime)?this._metrics.openTime:Date.now(),this.content.removeAll(!0),this.playOfflineButton.visible=!0,this.backButton.visible=!0;const z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);if(!X.Aq$.isDefined(this.servers)){st.q.instance.prodigy.create.font(this.content,0,320,z.getText("SERVER_LOADING_LIST"),{size:30,width:this.game.width,align:"center"});return void st.q.instance.prodigy.gameContainer.get("774-4659").getWorldList(this.showAllServers.bind(this),this.showError.bind(this,z.getText("SERVER_ERROR_FAILED_LOAD"),this.showAllServers.bind(this)))}const Y=this.servers.sort(((q,K)=>q.name.localeCompare(K.name)));K.total_worlds_count=Y.length,this.serverPage=st.q.instance.prodigy.create.element(this.content,200,180),this.scroll=st.q.instance.prodigy.create.scrollBar(this.content,60,180,345,this.setPage.bind(this,Y)),this.scroll.setPages(Math.floor((Y.length-1)/9+1)),st.q.instance.prodigy.create.textButton(this.content,880,650,{size:To.LG,text:z.getText("SERVERS_BUTTON_MY_WORLDS"),icon:"star"},this.showSuggestedServers.bind(this)),K.all_servers_displayed=!0,q.endTracing(Tu.u.ServerMenuShowAllServers,K)}setPage(q,K){this.serverPage.removeAll(!0);let z=0;for(let Y=9*K;Y<9*K+9&&Y{this._metrics.clickTime=Date.now(),this._metrics.buttonIndex=Q,this._metrics.worldName=J,this.sendServerSelectedEvent(Q),this.connect(q,tt)}),this),X.Aq$.isDefined(q.meta)){let K;if(X.Aq$.isDefined(q.meta.ID)&&"pet"===q.meta.type){const z=Ee.t.getItem("pet",q.meta.ID);("spine"===Z.get(z,"metadata.assets.default.type",null)||Z.get(z,"metadata.assets.spine",!1))&&(K={x:-.06,y:.05})}et.add(st.q.instance.prodigy.icon.createFromData(q.meta,0,0,K))}st.q.instance.prodigy.create.font(et,85,-2,q.name);const at=q.full<=80?8111468:q.full<95?15194464:14307665;for(let X=0;X<5;X++){const K=et.add(st.q.instance.prodigy.create.sprite(39*X+96,36,it._.General_core_json,"server-icon"));K.visible=q.full>0&&q.full>=20*X,K.tint=at}return et}sendSessionStartMetric(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=this._metrics,z={world:K.offline?"offline":q.world.name,world_availability:K.offline?null:q.world.full,world_position:K.buttonIndex,time:X.Aq$.isDefined(K.openTime)?Math.round((K.clickTime-K.openTime)/1e3):null};X.Aq$.isDefined(q.primaryParentID)&&(z.parentID=q.primaryParentID),this._segment.connection.sendServerConnectedEvent({name:this._metrics.worldName,duration:X.Aq$.isDefined(K.clickTime)?(Date.now()-K.clickTime)/te.A.SECONDS_TO_MILLISECONDS_MULTIPLIER:null})}))}sendServerSelectedEvent(q){var K;this._segment.connection.sendServerSelectedEvent({name:this._metrics.worldName,duration:X.Aq$.isDefined(this._metrics.openTime)?(Date.now()-this._metrics.openTime)/te.A.SECONDS_TO_MILLISECONDS_MULTIPLIER:null,availability:null===(K=this.servers[q])||void 0===K?void 0:K.full,position:q})}connect(q,K){const z=st.q.instance.prodigy.gameContainer.get("088-1d4c");z.startTracing(Tu.u.ServerMenuConnect);const Y={server_name:(null==q?void 0:q.name)||"unknown",server_id:(null==q?void 0:q.id)||"unknown",server_fullness:(null==q?void 0:q.full)||0},Q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);if(!this.isAutoSelect&&q.full>=100)Y.error="world_full_before_connect",this.showError(Q.getText("SERVER_ERROR_WORLD_SELECTED_FULL"),K);else{this.content.removeAll(!0),st.q.instance.prodigy.create.font(this.content,0,320,Q.getText("SERVER_CONNECTING_MESSAGE",X.Aq$.isDefined(q.name)?q.name:"server"),{size:30,width:this.game.width,align:"center"});st.q.instance.prodigy.gameContainer.get("774-4659").joinMultiplayerServer(q,"zone-login",(()=>{const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;K.getPlayerData().connectedWorldServerName=q.name,K.updated=!0,this.connected(!0)}),this.connected.bind(this,!1,K),this.connected.bind(this,!1,K,Q.getText("SERVER_ERROR_WORLD_FULL")))}z.endTracing(Tu.u.ServerMenuConnect,Y)}connected(q,K=Z.noop,z){X.Aq$.isDefined(this)&&X.Aq$.isDefined(this.game)&&(this.content.removeAll(!0),q?this.exitMenu(!0):this.showError(X.Aq$.isDefined(z)?z:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SERVER_ERROR_FALLBACK"),K))}showError(q,K){this.content.removeAll(!0),st.q.instance.prodigy.create.panel(this.content,240,260,16,4),st.q.instance.prodigy.create.font(this.content,270,300,q,{size:30,width:740,align:"center"}),st.q.instance.prodigy.create.textButton(this.content,465,430,{size:To.LG,text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SERVERS_BUTTON_BACK_TO_WORLDS"),icon:"back"},K),this._segment.connection.sendServerConnectionFailedEvent({name:this._metrics.worldName,duration:X.Aq$.isDefined(this._metrics.openTime)?(Date.now()-this._metrics.openTime)/te.A.SECONDS_TO_MILLISECONDS_MULTIPLIER:null,fail_reason:q})}exitMenu(q,K){var z,Y;K||(jt.pF.isNativeApp()&&(window.postMessage(JSON.stringify({type:"ENTER_GAME_WORLD"}),window.location.origin),this._gameNativeAppNotificationProvider.triggerNotification({triggerType:wu.$P.EnterGameWorld})),this.sendSessionStartMetric());const Q=st.q.instance.prodigy.gameContainer.get("088-1d4c"),Z={success:q,cancelled:!!K,offline_mode:!!(null===(z=this._metrics)||void 0===z?void 0:z.offline)};if(this._metrics.worldName&&(Z.selected_world=this._metrics.worldName),Q.endTracing(Tu.u.ServerMenuSelection,Z),null===(Y=this.callback)||void 0===Y||Y.call(this,q,K),K)super.close();else{this.playOfflineButton.destroy(),this.backButton.destroy(),this.content.destroy();const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);st.q.instance.prodigy.create.font(this,0,320,q.getText("ENTERING_WORLD"),{size:30,width:this.game.width,align:"center"}),this.parent.on("removed",(()=>super.close()))}}destroy(){st.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(Tu.u.ServerMenuSelection,{completed:!1}),super.destroy()}}Su.SUGGESTED_NUM=6,(0,Q.Cg)([(0,X.fFd)("20f-5f67"),(0,Q.Sn)("design:type",Qe.Y)],Su.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.fFd)("9dc-186c"),(0,Q.Sn)("design:type",Object)],Su.prototype,"_gameNativeAppNotificationProvider",void 0);var Au=z(54584);class Cu extends Lr.H{constructor(q,K,z,Y){super(q,K,z,Y,"achievementsPanel"),this._categoryScroll=null,this._categoryIndex=0;const Q=Ee.t.getCategoryItems("achievement"),J=st.q.instance.prodigy.gameContainer.get("11f-118a"),tt=Q.filter((q=>{if(q.data.requirements){const K=J.meetsRequirementsDeprecated(q.data.requirements);return K||X.VyI.log(`Achievement ${q.data.title} does not meet requirements.`,X.$bb.Verbose),K}return!0})),et=Z.groupBy(tt,(q=>q.data.group)),it=st.q.instance.prodigy.achievements;this._data=Ee.t.getCategoryItems("achievementGroup").map((q=>Object.assign(Object.assign({},q),{achievements:et[q.ID],unclaimedRewards:it.getUnclaimedRewards(et[q.ID]).length})));const nt=Fn.N.getAllTowerData().filter((q=>X.Aq$.isDefined(q.achievementGroupTag))).map((q=>q.achievementGroupTag));nt.length>0&&(this._data=this._data.filter((q=>!nt.includes(q.data.title)))),st.q.instance.game.broadcaster.addAppListener(gi.f7.ClaimedRewardsUpdated,this.updateUnclaimedRewards,this),this.createAchievementsScrollview().then((()=>{this.createCategoriesScrollview(),this.selectCategory(0)}))}updateUnclaimedRewards(q){var K,z;this._achievementScrollview.init(this._data[this._categoryIndex]);const Y=Z.groupBy(q,(q=>q.data.group));for(const Q of this._data)Q.unclaimedRewards=null!==(z=null===(K=Y[Q.ID])||void 0===K?void 0:K.length)&&void 0!==z?z:0;this.updateBadges(this._categoryScroll.getCurrentIndex())}createCategoriesScrollview(){this._categoryPanels=Z.times(9,(q=>this.createCategory(q))),this._categoryScroll=st.q.instance.prodigy.create.slider(this,310,0,360,!0,!1),this._categoryScroll.reset(this._data.length,9,0,(q=>this.updateCategoryPanels(q)))}createCategory(q){const K=st.q.instance.prodigy.create.panel(this,0,40*q,8,1,"lb");return K.category=st.q.instance.prodigy.create.font(K,8,6,"",{}),K.setClickable((()=>this.selectCategory(q))),K}selectCategory(q){const K=this._categoryScroll.getCurrentIndex();this._categoryIndex=K+q,this.updateCategoryPanels(K),this._achievementScrollview.init(this._data[this._categoryIndex])}updateCategoryPanels(q){this._categoryPanels.forEach(((K,z)=>{K.category.setText(st.q.instance.prodigy.achievements.getCategory(this._data[q+z])),K.changePanel(z===this._categoryIndex-q?"lb-green":"lb")})),this.updateBadges(q)}updateBadges(q){this._categoryPanels.forEach(((K,z)=>{var Y;null===(Y=K.badge)||void 0===Y||Y.destroy();const Q=this._data[q+z].unclaimedRewards;Q>0&&(K.badge=st.q.instance.prodigy.create.notificationBadge(K,Q),K.badge.position.set(274,4))}))}createAchievementsScrollview(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.prodigy.gameContainer.get("983-05a7"),K=q.loadFromGUID(Pi.l.TransformRelayObject),z=K.findComponent(X.y4o).getRootContainer();z.position.set(452,36),this.addChild(z),yield Promise.all([st.q.instance.prodigy.gameContainer.get(X.t5G.AssetLoader).loadAssets([it._.Ui_eg_bountyrun_json]),(()=>(0,Q.sH)(this,void 0,void 0,(function*(){this._achievementScrollview=(yield q.loadWithDependenciesFromGUID(Pi.l.AchievementScrollview,K)).findComponent(Au.x)})))()])}))}destroy(q){st.q.instance.game.broadcaster.removeAppListener(gi.f7.ClaimedRewardsUpdated,this),super.destroy(q)}}class Ou extends Lr.H{constructor(q,K,z,Y){super(q,K,z,Y),this.requestsPerPage=3,this.scroll=null,this.content=null,this.lastIndex=0,this._duelInviteService=null,this._duelInviteService=st.q.instance.prodigy.gameContainer.get("7ff-8385"),this.create()}create(){this.content=st.q.instance.prodigy.create.element(this,320,40),this.scroll=st.q.instance.prodigy.create.slider(this,820,40,380,!0,!0),this.scroll.reset(this._duelInviteService.getInvites().length,1,-1,this.setMail.bind(this)),this._duelInviteService.onInviteRemoved.add(this.process,this),this._duelInviteService.onInviteReceived.add(this.process,this),this._duelInviteService.onInviteCancelled.add(this.process,this)}setMail(q=0){this.lastIndex=q,this.content.removeAll(!0);const K=this._duelInviteService.getInvites();for(let z=0;z{He.e.rejectInvite(z)})),st.q.instance.prodigy.create.button(Y,340,50,it._.General_icons_json,"yes",(()=>{He.e.acceptInvite(Fe.VB.Standard,z)}))}destroy(q={children:!0}){this._duelInviteService.onInviteRemoved.remove(this.process,this),this._duelInviteService.onInviteReceived.remove(this.process,this),this._duelInviteService.onInviteCancelled.remove(this.process,this),super.destroy(q)}}var Iu=z(68231),Du=z(50118);class Ru extends sr.W{constructor(q,K){super(q,K,18,{isModal:!1,backgroundAlpha:0},[it._.Ui_social_feed_json,it._.Ui_education_badges_json]),this.currentCollection=0,this.numberOfCollections=1,this.badgeData=[],this.badgesNames=["Stone","Amber","Garnet","Emerald","Ruby","Topaz","Amethyst","Diamond"],this.topicFillFrames=["gray-large-fill","yellow-large-fill","bronze-large-fill","green-large-fill","pink-large-fill","gold-large-fill","purple-large-fill","blue-large-fill"],this.collectionElements=[],this.game=q,this.name="badgesMenu";try{this.badgeData=st.q.instance.prodigy.education.getAllTopicBadges()}catch(e){this.badgeData=[]}this.numberOfCollections=null!==this.badgeData?this.badgeData.length:0;const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;super.queuePostCreateCallback((()=>{this.collectionElements=[this.badgeProgressSlider,this.badgeProgressText,this.collectionNameText,this.collectionIcon,this.leftButton,this.rightButton]}),(()=>{this.setupArrows()}),(()=>{this.switchCollection(z.grade-1)}),(()=>{this.setupScrollBar()}))}setupScrollBar(){this.topicScrollView.linkScrollBar(this.topicScrollBar)}setupArrows(){this.skillsMasteredText.setText(`Skills Mastered: ${Ru.getAllSkillsMastered(this.badgeData)}`),this.badgesEarnedText.setText(`Badges Completed: ${Ru.getAllBadgesCompleted(this.badgeData)}`),this.leftButton.onClickCallback=()=>{this.switchCollection(-1)},this.rightButton.onClickCallback=()=>{this.switchCollection(1)},st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_BADGES,En.B.BREADCRUMB_CLICKED_BADGES_BUTTON)}switchCollection(q){const K=0===this.badgeData.length;for(let Q=0;Q=this.numberOfCollections?this.currentCollection=0:this.currentCollection<0&&(this.currentCollection=this.numberOfCollections-1),this.collectionIcon.setImageFrameName(`collections-${this.badgeData[this.currentCollection].gameIconAssetId}`),this.collectionNameText.setText(`${this.badgesNames[this.currentCollection]} Badges`),this.checkForBreadcrumbs(this.badgeData[this.currentCollection]);const z=this.badgeData[this.currentCollection].topics;this.fillTopics(z);const Y=Ru.getBadgesCompleted(this.badgeData[this.currentCollection].topics);this.badgeProgressSlider.setActive3SlicedImage(`scroll-tracks/${this.topicFillFrames[this.currentCollection]}`),this.badgeProgressSlider.setPercentComplete(Y/z.length,!0),this.badgeProgressText.setText(`${Y}/${z.length} Badges`)}checkForBreadcrumbs(q){let K=!1;const z=st.q.instance.prodigy.education.getRankUpBadges();let Y=0;if(X.Aq$.isDefined(z)&&z.length>0)for(let Q=0;Q=q.topics[Y].ranks[q.topics[Y].ranks.length-1]);Y=Q}this.collectionIconBreadcrumb.visible=K,K&&z.splice(Y,1)}fillTopics(q){this.topicScrollView.clearScrollView();for(let K=0;K=K.ranks[Q]&&q[`progressStar${z[Q]}`].setImageFrameName("tier-on");Ru.setSkillsProgress(q,K)}static setSkillsProgress(q,K){let z=0;if(K.numSkillsMastered>=K.ranks[K.ranks.length-1])q.topicProgressText.setText("Complete"),z=1;else for(let Y=0;Y=q[z].ranks[q[z].ranks.length-1]&&K++;return K}static getAllSkillsMastered(q){let K=0;for(let z=0;z=q[z].topics[Y].ranks[q[z].topics[Y].ranks.length-1]&&K++;return K}addTransparent(q){super.addTransparent(0),this.background.eventMode="none"}}var Pu,Mu=z(47878);!function(q){q[q.Leaderboard=0]="Leaderboard",q[q.BattleRequests=1]="BattleRequests",q[q.Bounty=2]="Bounty",q[q.Award=3]="Award",q[q.Badge=4]="Badge"}(Pu||(Pu={}));class Nu extends Jh.a{constructor(q,K){super(q,K,0,0,st.q.instance.prodigy.textureMenu),this.content=null,this.hasPendingBattleRequests=!1,this._duelInviteService=null,this._menuHeader=null,this._activeViewButton=null,this._headerPromise=null,this._duelInviteService=st.q.instance.prodigy.gameContainer.get("7ff-8385"),this._noRequestsFilter=new xd.N,this._noRequestsFilter.desaturate(),this._noRequestsFilter.brightness(.45,!0),st.q.instance.prodigy.load.assets([it._.Ui_shipwreck_progress_json],(()=>{this.createMenu()})),this._duelInviteService.onInviteReceived.add(this.updateBattleRequestIndicator,this),this._duelInviteService.onInviteRemoved.add(this.updateBattleRequestIndicator,this),this._duelInviteService.onInviteCancelled.add(this.updateBattleRequestIndicator,this),this.currentInterfaceName=Ah.B.Social}createMenu(){this.addTransparent(),this.hasPendingBattleRequests=this._duelInviteService.getInvites().length>0;const q=st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_BADGES,En.B.BREADCRUMB_CLICKED_BADGES_BUTTON);this.createBaseSetup(30,16,"bases/backgroundwood","awardsBackground",[],!0,null,{closeButton:{key:it._.Ui_shared_json,frameName:"buttons/close",offset:{x:-20,y:-23}},banner:{atlasID:148,frameName:"banner/banner",width:28},buttons:{iconOffset:{x:60,y:0},offset:{x:344,y:0}}},!0);const K=st.q.instance.prodigy.gameContainer.get("983-05a7");this._headerPromise=K.loadWithDependenciesFromGUID(Pi.l.SocialMenuHeader).then((K=>{this._menuHeader=K.findComponent(Mu.p),K.findComponent(Jd.$).rootContainer.setParent(this),this._menuHeader.leaderboardsButton.onEnabledClick.add(this.setMode.bind(this,Pu.Leaderboard)),this._menuHeader.battleRequestsButton.onEnabledClick.add(this.setMode.bind(this,Pu.BattleRequests)),this._menuHeader.awardsButton.onEnabledClick.add(this.setMode.bind(this,Pu.Award)),this._menuHeader.badgesButton.onEnabledClick.add(this.setMode.bind(this,Pu.Badge)),this.updateBadge(st.q.instance.prodigy.achievements.getUnclaimedRewards()),st.q.instance.game.broadcaster.addAppListener(gi.f7.ClaimedRewardsUpdated,this.updateBadge,this),this.hasPendingBattleRequests?this.setIndicatorActive(this._menuHeader.battleRequestsButton,!0):(this._menuHeader.battleRequestsButton.lockState(hc.K.Disabled),this.enableButtonFilter(this._menuHeader.battleRequestsButton,!0));let z=Pu.Leaderboard;if(!st.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirementsDeprecated(58)){this._menuHeader.badgesButton.lockState(hc.K.Disabled),this._menuHeader.leaderboardsButton.lockState(hc.K.Disabled),this.enableButtonFilter(this._menuHeader.badgesButton,!0),this.enableButtonFilter(this._menuHeader.leaderboardsButton,!0),this._menuHeader.badgesButton.GameObject.active=!1,this._menuHeader.leaderboardsButton.GameObject.active=!1,z=Pu.Bounty;const q=[this._menuHeader.battleRequestsButton,this._menuHeader.awardsButton];let K=-260;q.forEach((q=>{K+=120,q.GameObject.transform.setPositionX(q.GameObject.transform.localPosition.x+K)}))}this.create(),z=this.hasPendingBattleRequests?Pu.BattleRequests:z,this.setMode(z),q||this.setIndicatorActive(this._menuHeader.badgesButton,!0),this._headerPromise=null})).catch((q=>{var K;X.RQr.logError(q,"Failed to load social menu header"),null===(K=this._headerPromise)||void 0===K||K.cancel(),this._headerPromise=null}))}setActive(q){this._menuHeader.GameObject.active=q,super.setActive(q)}setIndicatorActive(q,K){q.GameObject.findComponentInChildren(Du.a).GameObject.parent.active=K}updateBadge(q){const K=q.length;this._menuHeader.awardsButton.GameObject.findComponentInChildren(Rl.e).updateNumberedNotificationBadge(K>0,K)}setMode(q){var K,z,Y;super.setMode(q),this.content&&this.content instanceof Ru?this.content.close():null===(K=this.content)||void 0===K||K.destroy();let Q="";switch(null===(z=this._activeViewButton)||void 0===z||z.unlockState(),q){case Pu.BattleRequests:Q="BattleRequests",this._activeViewButton=this._menuHeader.battleRequestsButton,this.content=new Ou(this.game,this,80,200);break;case Pu.Award:Q="Award",this._activeViewButton=this._menuHeader.awardsButton,this.content=new Cu(this.game,this,80,200);break;case Pu.Badge:Q="Badge",this._activeViewButton=this._menuHeader.badgesButton,this.content=new Ru(this.game,this);break;case Pu.Leaderboard:Q="Leaderboard_class_vs_class",this._activeViewButton=this._menuHeader.leaderboardsButton,this.content=new Iu.Z(this.game,this,0,0)}null===(Y=this._activeViewButton)||void 0===Y||Y.lockState(hc.K.Disabled),this.page=q,st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendTabEvent({tabName:Q,interfaceName:Ah.B.Social,interfaceType:Si.Wm.Menu})}updateBattleRequestIndicator(){this.hasPendingBattleRequests=this._duelInviteService.getInvites().length>0,this.enableButtonFilter(this._menuHeader.battleRequestsButton,!this.hasPendingBattleRequests),this.hasPendingBattleRequests?this.page===Pu.BattleRequests?this._menuHeader.battleRequestsButton.lockState(hc.K.Disabled):this._menuHeader.battleRequestsButton.unlockState():this._menuHeader.battleRequestsButton.lockState(hc.K.Disabled),this.setIndicatorActive(this._menuHeader.battleRequestsButton,this.hasPendingBattleRequests)}enableButtonFilter(q,K){q.GameObject.findComponentsInChildren(X.y4o).forEach((q=>{q.getRootContainer().filters=K?[this._noRequestsFilter]:null}))}close(){var q,K,z;X.Aq$.isDefined(this.content)&&this.content instanceof Ru&&this.content.close(),null===(K=null===(q=this._menuHeader)||void 0===q?void 0:q.GameObject)||void 0===K||K.destroy(),st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:Ah.B.Social,interfaceType:Si.Wm.Menu,closeMethod:Si.Lv.X,instanceType:Li.N.Interface}),null===(z=this._headerPromise)||void 0===z||z.cancel(),this._headerPromise=null,super.close()}destroy(q){var K;this._duelInviteService.onInviteReceived.removeAll(this),this._duelInviteService.onInviteRemoved.removeAll(this),this._duelInviteService.onInviteCancelled.removeAll(this),st.q.instance.game.broadcaster.removeAppListener(gi.f7.ClaimedRewardsUpdated,this),null===(K=this.content)||void 0===K||K.destroy(),this.content=null,this._menuHeader=null,this._activeViewButton=null,super.destroy(q)}}class xu{constructor(q,K,z){this.game=q,this.model=K,this.requestID=z}setUserID(q){this.model.userID=q}getUserID(){return this.model.userID}setUsername(q){this.model.username=q}getUsername(){return this.model.username}acceptRequest(){st.q.instance.prodigy.friendsListNetworkHandler.acceptFriendRequest(this.getUserID(),this.requestID)}rejectRequest(){st.q.instance.prodigy.friendsListNetworkHandler.rejectFriendRequest(this.getUserID(),this.requestID)}}class Lu{constructor(){this.userID=-1,this.username=""}}class ku extends Lr.H{constructor(q,K,z,Y,Q){super(q,z,0,0);const Z=st.q.instance.prodigy.create.panel(this,Y+10,Q,14,2,"mail"),J=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);Z.add(st.q.instance.prodigy.create.sprite(3,3,it._.General_icons_json,"mail-heart")),st.q.instance.prodigy.create.font(Z,39,8,J.getText("FRIEND_REQUEST_ADD_FRIEND"),{size:16}),this.mainText=st.q.instance.prodigy.create.font(Z,20,40,"",{fontID:8,size:20});const tt=st.q.instance.prodigy.create.button(Z,490,0,it._.General_icons_json,"close",st.q.instance.prodigy.open.messageBoxPrefab.bind(st.q.instance.prodigy.open,{title:"FRIENDS_LIST_CONFIRM_CANCEL_TITLE",text:"FRIENDS_LIST_CONFIRM_CANCEL_BODY",buttonState:xr.D.YesNoButtons,confirmCallback:K.rejectRequest.bind(K)}));Nn.J.centreObject(tt,null,40,null,tt.height);const et=st.q.instance.prodigy.create.button(Z,tt.x-50-20,0,it._.General_icons_json,"yes",K.acceptRequest.bind(K));Nn.J.centreObject(et,null,40,null,et.height)}renderName(q){this.visible=X.Aq$.isDefined(q),this.visible&&this.mainText.setText(q)}}class Bu extends Jh.a{constructor(q,K,z){super(q,K,0,0,st.q.instance.prodigy.textureMenu),this.friendRequests=[],this.requestControllers=[],this.requestViews=[],this.requestsPerPage=4,this.offset=0,this.onClose=z,this.friendRequests=[],this.requestControllers=[],this.requestViews=[],this.create(),q.broadcaster.addAppListener(gi.sd.GotFriendRequestList,this.setupFriendRequests.bind(this),this,"FriendsList",!1),q.broadcaster.addAppListener(gi.sd.RequestAccepted,this.acceptRequestSuccessful.bind(this),this,"FriendsList",!1),q.broadcaster.addAppListener(gi.sd.RequestRejected,this.rejectRequestSuccessful.bind(this),this,"FriendsList",!1),q.broadcaster.broadcast(gi.sd.ClearFriendRequestsCache,"FriendsList",[]),this.loadPage(this.offset)}create(){this.addTransparent();const q=this.game.width/40-14,K=this.game.height/40-1,z=40*q-22,Y=40*K-22,Q=11,Z=st.q.instance.prodigy.create.element(this,.5*(this.game.width-40*q),20),J=st.q.instance.prodigy.create.element(Z,0,0);let tt,et,nt;st.q.instance.prodigy.create.panel(J,0,0,q,K,"shine"),J.add(new jr.C(this.game,Q,149,z,40,it._.Tiled_sprites_json,"blue-top")),J.add(new jr.C(this.game,Q,189,z,320,it._.Tiled_sprites_json,"blue-mid")),J.add(new jr.C(this.game,Q,509,z,40,it._.Tiled_sprites_json,"blue-top2")),st.q.instance.prodigy.create.panel(J,40,40,q-2,2,"banner"),st.q.instance.prodigy.create.font(J,0,60,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("FRIEND_REQUESTS_TITLE"),{fontID:9,size:36,width:z,align:"center",lineHeight:38}),st.q.instance.prodigy.create.button(Z,z-18,-10,it._.General_icons_json,"close",this.close.bind(this));for(let X=0;Xthis.requestsPerPage?st.q.instance.prodigy.friendsListNetworkHandler.getFriendRequestList(null,1):this.refreshUI()}renderPaginationButtons(){this.offset>0?this.prevPage.setActive():this.prevPage.setInactive(),X.Aq$.isDefined(this.friendRequests[this.offset+this.requestsPerPage])?this.nextPage.setActive():this.nextPage.setInactive()}loadPage(q){if(this.offset+=q,q<0)this.setupFriendRequests(this.friendRequests);else{const q=0===this.offset?2*this.requestsPerPage:this.requestsPerPage;this.offset+q+1>this.friendRequests.length?st.q.instance.prodigy.friendsListNetworkHandler.getFriendRequestList(this.offset>0?this.offset+this.requestsPerPage:this.offset,0===this.offset?2*this.requestsPerPage:this.requestsPerPage):this.setupFriendRequests(this.friendRequests)}}}class Uu extends Jh.a{constructor(q,K,z,Y,Q){super(q,K,0,0,st.q.instance.prodigy.textureMenu),this.rewards=null,this.mailData=null,this.segmentData=null,this.content=null,this.randomizedRewardArray=[{item:{type:"item",ID:76,N:5},weight:9.09},{item:{type:"item",ID:77,N:5},weight:9.09},{item:{type:"item",ID:166,N:5},weight:9.09},{item:{type:"item",ID:165,N:5},weight:9.09},{item:{type:"item",ID:160,N:5},weight:9.09},{item:{type:"item",ID:118,N:3},weight:9.09},{item:{type:"item",ID:119,N:3},weight:9.09},{item:{type:"item",ID:121,N:3},weight:9.09},{item:{type:"item",ID:122,N:3},weight:9.09},{item:{type:"item",ID:120,N:3},weight:9.09},{item:{type:"item",ID:117,N:3},weight:9.09}],this.mailData=z,this.rewards=Y,this.segmentData=Q,q.broadcaster.addAppListener(gi.zr.MarkAsRead,(()=>{this.close()}),this,gi.HG.Mailer),st.q.instance.prodigy.load.assets([ct.Q.Spine_parent_reward_json,ct.Q.Spine_member_reward_json],(()=>{this.create()}))}create(){super.create(),this.addTransparent(.75);const q=st.q.instance.prodigy.create.element(this,.5*(this.game.width-780),100),K=st.q.instance.prodigy.create.element(q,0,0);this.content=st.q.instance.prodigy.create.element(K,0,0),this.openParentReward()}close(){this.game.broadcaster.removeAppListener(gi.zr.MarkAsReadFailure,this,gi.HG.Mailer),this.game.broadcaster.removeAppListener(gi.zr.MarkAsRead,this,gi.HG.Mailer),super.close()}openParentReward(){const q=st.q.instance.prodigy.event.create(),K=st.q.instance.prodigy.create.element(this.content,310,330);K.visible=!0;const z=this.rewards.length<=0?this.game.add.spine(0,0,ct.Q.Spine_parent_reward_json):this.game.add.spine(75,0,ct.Q.Spine_member_reward_json);z.setAnimationByName(0,"animation",!1),K.add(z),q.delay(50),q.set(K,"visible",!1),q.delay(150),q.set(K,"visible",!0),q.delay(2e3),q.function(this.receiveReward.bind(this)),q.start()}receiveReward(){var q;this.rewards.length<=0?(st.q.instance.prodigy.open.gotItem(this.getRewards(),this.close.bind(this),null,"parent-reward",null,!1,this.segmentData),this.game.broadcaster.broadcast(gi.zr.MarkAsRead,gi.HG.MailView,[this.markReadSuccess.bind(this),this.mailData])):(st.q.instance.prodigy.open.gotItem(this.rewards,this.close.bind(this),null,"memberBox-reward",null,null,null!==(q=this.segmentData)&&void 0!==q?q:{source_type:On.C.Container}),this.game.broadcaster.broadcast(gi.zr.MarkAsRead,gi.HG.MailView,[this.markReadSuccess.bind(this),this.mailData]))}markReadSuccess(){X.VyI.log("Mail Read Success",X.$bb.Verbose)}getRewards(){let q=[];const K=Z.get(this.mailData,"membership",0);return 0===K?q=[{item:{type:"item",ID:77,N:1},weight:50},{item:{type:"item",ID:76,N:1},weight:50}]:1===K&&(q=this.randomizedRewardArray),[Mn.o.weightedArrayElement(q).item]}}var Fu,Gu=z(63693),ju=z(52491),$u=z(29853),Hu=z(5679),Vu=z(52211),Wu=z(8763);!function(q){q[q.DefaultState=0]="DefaultState",q[q.AddingFromTeamCard=1]="AddingFromTeamCard",q[q.AddingFromPetDetails=2]="AddingFromPetDetails"}(Fu||(Fu={}));class qu extends Ih.y{constructor(q,K){super(st.q.instance.game,q,Pi.l.PetBookMenu,K,!0),this._teamCards=[],this._currentPetBookState=Fu.DefaultState,this._teamCardSelected=null,this._petAddOperationState={},this.onCardSelected=new X.HN0,this.onTeamSwapped=new X.HN0,this.onTeamChanged=new X.HN0,this._petListIndexToIdMap=new Map,this.isModal=!1,st.q.instance.prodigy.load.assets([ht.c.Sfx_moving_pet_position,ht.c.Sfx_adding_pet_to_team,ht.c.Sfx_open_petinfo_yourpet]),this._kennel=this._loggedInPlayer.player.kennel,this._injectablePropertiesDictionary={[dr.ML.PetBookBackgroundClicked]:this.onBackgroundClicked.bind(this),[dr.ML.UniquePetsTotal]:this.getUniquePetsText()},this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(Sh.Eu.PetMergeYourTeam),this.onPrefabLoaded.addOnce((()=>{this._inventoryCardSpawner=X.wa5.getActiveScene().container.get(dr.xO.PetCardPetSpawner),this._inventoryScrollView=X.wa5.getActiveScene().container.get(dr.xO.PetBookScrollView),this._inventoryScrollView.onMouseScrollWheelUsed.add(this.destroyTooltip.bind(this)),this.setUpMenu()})),st.q.instance.prodigy.game.broadcaster.addAppListener(gi.ig.EvolveEnd,(()=>{this.updateAllCards()}),this)}getUniquePetsText(){const q=this._kennel.getNumUniquePets(),K=this._kennel.getTotalUniquePets();return this._localizer.getText("PET_BOOK_DIFFERENT_PETS_TOTAL",q,K)}setUpMenu(){this.setUpTeamCards(),this.setUpInventoryCards();st.q.instance.prodigy.gameContainer.get("fa1-8ec9").isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&bh.N.cacheCanShowPetMergeTutorial()&&this.setUpFTUEState(),this._kennel.setPetToTopPosition()}setUpFTUEState(){this.enableCloseButton(!1);const q=bh.N.getChosenPetForMergeRankFTUE(),K=Ee.t.getItem("pet",q.ID);st.q.instance.game.broadcaster.addAppListener(gi.ki.FtueCompleted,(()=>{st.q.instance.game.broadcaster.removeAppListener(gi.ki.FtueCompleted,this),this.enableCloseButton(!0)}),this),this.openPetDetailsMenu(K,q)}enableCloseButton(q){cr.d.updateInjectedValues(this.prefabContainer,{[dr.ML.ShowCloseButton]:q})}setUpInventoryCards(){const q=this.buildPetDataList(!1);cr.d.updateInjectedValues(this.prefabContainer,{[dr.ML.PetDataList]:q})}setUpTeamCards(){const q=X.wa5.getActiveScene().container.get(dr.xO.TeamCardsParent).GameObject;this._teamCards=q.findComponentsInChildren(Vu.V),this._teamCards.forEach(((q,K)=>{q.setup(K),q instanceof $u.J&&q.addListenerToSignal(q.onPetInfoClicked,this.onInfoButtonClicked.bind(this)),q.addListenerToSignal(q.onPetCardClicked,this.onTeamCardClicked.bind(this)),q.addListenerToSignal(q.onPetRemoved,this.onPetRemovedFromTeam.bind(this))}))}buildPetDataList(q){let K=[];const z=Ph.P8.sortPetList(this._kennel.getPrimaryPets()),Y=Ph.P8.canPlayerAccessPetMergeFeature(this._loggedInPlayer.player),Q=this.isSelecting(),X=z.map((K=>Object.assign({},Wu.j.GetOwnedPetCardInjectionValues(K,((K,z)=>{this.onInventoryCardClicked(K,z,q)}),Q,q,Y))));if(K.push(...X),this._currentPetBookState===Fu.DefaultState){const q=Ph.P8.getExcludedPetIDs(Ph.tA.NoOwnership),z=Ee.t.getCategoryItems("pet").filter((K=>!this._kennel.hasPet(K.ID)&&!q.includes(K.ID))),Y=(0,Ft.G)(gh.J);let[X,Z]=[[],[]],[J,tt]=[[],[]];const et=q=>q.reduce(((q,K)=>(q[this._loggedInPlayer.player.encounters.hasPetBeenEncountered(K.ID)?0:1].push(K),q)),[[],[]]);Y?([J,tt]=z.reduce(((q,K)=>(q[Ph.P8.isPetEpic(K.ID)?0:1].push(K),q)),[[],[]]),[X,Z]=et(tt)):[X,Z]=et(z);const it=Ph.P8.sortPetItems(X).map((q=>Wu.j.GetSeenPetCardInjectionValues(q.ID,((q,K)=>{this.onInventoryCardClicked(q,K,!1)}),Q)));if(K.push(...it),Y&&J.length>0){Ph.P8.sortPetItems(J);const q=new Map,z=K=>(q.has(K)||q.set(K,this._battlePassQuestManager.isPetBattlePassReward(K)),q.get(K));J.sort(((q,K)=>{const Y=z(q.ID),Q=z(K.ID);return Y&&!Q?-1:!Y&&Q?1:0}));const Y=J.map((q=>Wu.j.GetSeenPetCardInjectionValues(q.ID,((q,K)=>{this.onInventoryCardClicked(q,K,!1)}),this.isSelecting(),z(q.ID))));K.push(...Y)}const st=Ph.P8.sortPetItems(Z).map((q=>Wu.j.GetUnknownPetCardInjectionValues(q.ID,((q,K)=>{this.showTooltip(q,this._localizer.getText("PET_BOOK_KEEP_PLAYING"))}),Q)));K.push(...st);const nt=Qt.R.loadData(Yt.r.PetOwnershipRestrictions_json),at=new Set(nt.noOwnership);K=K.filter((q=>!at.has(q.PET_ID)))}return this._petListIndexToIdMap.clear(),z.forEach(((q,K)=>{this._petListIndexToIdMap.set(q.uniqueID,K)})),K.map((q=>({prefabGuid:Pi.l.PetBook_PetCard,data:q})))}updateSinglePetInventoryCard(q,K){var z;const Y=this._petListIndexToIdMap.get(q.uniqueID),Q=Ph.P8.canPlayerAccessPetMergeFeature(this._loggedInPlayer.player);X.Aq$.isDefined(Y)&&(null===(z=this._inventoryCardSpawner)||void 0===z||z.updateDataAtIndex(Y,{prefabGuid:Pi.l.PetBook_PetCard,data:Wu.j.GetOwnedPetCardInjectionValues(q,((q,z)=>{this.onInventoryCardClicked(q,z,K)}),this.isSelecting(),K,Q)}))}updateAllCards(){this.updateTeamCards(),this.updateInventoryCards(!1)}setPetBookToSelectionState(q,K){this.setPetBookState(q),this.updateTeamCardsState(),this.updateInventoryCards(K)}updateInventoryCards(q){var K;const z=this.buildPetDataList(q);null===(K=this._inventoryCardSpawner)||void 0===K||K.updateData(z)}updateTeamCardsState(){this._teamCards.forEach((q=>{var K,z;q instanceof $u.J&&(this._currentPetBookState===Fu.DefaultState?q.setCardToDefaultState():q.setCardToSelectionState(q===this._teamCardSelected,null!==(z=null===(K=this._teamCardSelected)||void 0===K?void 0:K.hasData())&&void 0!==z&&z,this._currentPetBookState===Fu.AddingFromPetDetails))}))}selectTeamCard(q){this._teamCardSelected!==q&&(this._teamCardSelected=q,this.onCardSelected.dispatch(q))}updateTeamCards(){this._teamCards.forEach((q=>{q.updateCard()}))}addPetFromPetDetails(q){const K=this._kennel.findEmptyTeamIndex();K>=0?(this._kennel.setTeamPosition(q,K),this.onPetSelectionEnded(),this.onTeamChanged.dispatch(),this.updateSinglePetInventoryCard(q,!1),st.q.instance.prodigy.audio.playSFX(ht.c.Sfx_adding_pet_to_team,"add-pet"),st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendTeamUpdatedEvent(Ee.t.getItem("pet",q.ID).data.name,null,{pet_added_level:q.level,pet_added_rank:Ph.P8.getPetDisplayMergeRank(q.ID,q.uniqueID)})):(this.setInitialData(q,K),this.setPetBookToSelectionState(Fu.AddingFromPetDetails,!1),this.onPetSelectionStarted(),this.updateSinglePetInventoryCard(q,!0))}completeAdd(q,K){const z=this._petAddOperationState.petData?this._petAddOperationState.petData:q,Y=X.Aq$.isDefined(this._petAddOperationState.position)&&this._petAddOperationState.position>=0?this._petAddOperationState.position:K;if(!z||!X.Aq$.isDefined(Y))return void this.onPetSelectionEnded();const Q=this._kennel.getTeamPosition(Y)?this._kennel.getTeamPosition(Y).getName():null;st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendTeamUpdatedEvent(Ee.t.getItem("pet",z.ID).data.name,Q,{pet_added_level:z.level,pet_added_rank:Ph.P8.getPetDisplayMergeRank(z.ID,z.uniqueID)}),X.Aq$.isDefined(z.team)&&this._kennel.removeAtTeamPosition(z.team),this._kennel.setTeamPosition(z,Y),this._kennel.setPetToTopPosition(),this.onPetSelectionEnded(),st.q.instance.prodigy.audio.playSFX(61,"add-pet")}onPetRemovedFromTeam(q,K){st.q.instance.prodigy.audio.playSFX(62,"moving-pet"),st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendTeamUpdatedEvent(null,this._kennel.getTeamPosition(K).getName()),this._kennel.removeAtTeamPosition(K),this._kennel.setPetToTopPosition(),this.onPetSelectionEnded(),this.onTeamChanged.dispatch(),this.updateSinglePetInventoryCard(q,!1),this.updateTeamCards()}swapTeam(q,K){var z,Y,Q,X;const Z=q.cardPosition,J=K.cardPosition;st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendTeamPositionChangedEvent({character:(null===(z=this._kennel.getTeamPosition(J))||void 0===z?void 0:z.getName())===this._loggedInPlayer.player.getName()?"player":null===(Y=this._kennel.getTeamPosition(J))||void 0===Y?void 0:Y.getName(),position_new:Object.values(Gu.Io)[Z],position_old:Object.values(Gu.Io)[J],character_2:(null===(Q=this._kennel.getTeamPosition(Z))||void 0===Q?void 0:Q.getName())===this._loggedInPlayer.player.getName()?"player":null===(X=this._kennel.getTeamPosition(Z))||void 0===X?void 0:X.getName()}),this._kennel.swapTeamPositions(Z,J),this._currentPetBookState===Fu.AddingFromTeamCard&&(this._petAddOperationState.position=Z),this.onTeamSwapped.dispatch(q,K),this.onPetSelectionEnded(),st.q.instance.prodigy.audio.playSFX(62,"moving-pet")}onPetSelectionEnded(){this._inventoryScrollView.GameObject.active=!0,this._teamCardSelected=null,this._petAddOperationState={},this.resetTeamAndPetBookToDefaultState(),this.setPetBookToSelectionState(Fu.DefaultState,!1),cr.d.updateInjectedValues(this.prefabContainer,{[dr.ML.IsSelecting]:!1})}onPetSelectionStarted(){cr.d.updateInjectedValues(this.prefabContainer,{[dr.ML.IsSelecting]:!0})}resetTeamAndPetBookToDefaultState(){this.setPetBookState(this._currentPetBookState),this.updateTeamCardsState(),this.updateTeamCards()}setInitialData(q,K){this._petAddOperationState.petData=q,this._petAddOperationState.position=K}setPetBookState(q){this._currentPetBookState!==q&&(this._currentPetBookState=q)}onTeamCardClicked(q){if(q instanceof Hu.t)this.onPetSelectionEnded();else{if(!this._petAddOperationState.petData)return null===this._teamCardSelected?(this.selectTeamCard(q),this.setPetBookToSelectionState(Fu.AddingFromTeamCard,!0),void this.onPetSelectionStarted()):void(this._teamCardSelected!==q?this.swapTeam(this._teamCardSelected,q):this.onPetSelectionEnded());this.completeAdd(this._petAddOperationState.petData,q.cardPosition)}}onInfoButtonClicked(q,K){this.onPetSelectionEnded(),this.openPetDetailsMenu(q,K)}onInventoryCardClicked(q,K,z){if(!this._inventoryScrollView.wasDraggedSinceLastMouseDown)if(this.isSelecting())if(z&&this._teamCardSelected){if(X.Aq$.isDefined(K.team))return void this.showTooltip(K,this._localizer.getText("PET_ALREADY_ON_TEAM"));this.completeAdd(K,this._teamCardSelected.cardPosition)}else this.onPetSelectionEnded();else this.openPetDetailsMenu(q,K)}onBackgroundClicked(){this._inventoryScrollView.wasDraggedSinceLastMouseDown||this._currentPetBookState!==Fu.DefaultState&&this.onPetSelectionEnded()}openPetDetailsMenu(q,K){var z;const Y=null!=K?K:q,Q=null===(z=st.q.instance)||void 0===z?void 0:z.prodigy.open.petDetailsMenu(Y,this.onPetDetailsClosed.bind(this,Y));Q&&(this._segment.featureCommon.sendButtonEvent({buttonName:"pets",destinationName:"pet_details_window",interfaceType:Si.Wm.Window,interfaceName:Ah.B.PetsWindow,saveClickInfo:"pet_details_window"}),st.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu"),this._kennel.hasPet(q.ID)&&this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(Sh.Eu.PetMergeSelectPet),Q.onPrefabLoaded.add((()=>this.prefab.active=!1)),Q.onAddPetToTeam.add(this.addPetFromPetDetails.bind(this)),Q.onRemovePetFromTeam.add(this.onPetRemovedFromTeam.bind(this)),Q.onEvolvePet.add(this.onPetEvolved.bind(this)),Q.onPetMerged.add(this.updateAllCards.bind(this)),Q.onPetLevelUp.add((q=>{this.updateInventoryCards(!1),this.updateTeamCards()})),Q.onPetGearChanged.add((q=>{this.updateInventoryCards(!1),this.updateTeamCards()})))}onPetDetailsClosed(q){this.prefab.active=!0;const K=this.getPetIndex(q);X.Aq$.isDefined(K)&&this._inventoryScrollView.scrollToChild(K,qu.SELECTION_BORDER_OFFSET)}getPetIndex(q){let K;if(X.Aq$.isDefined(q.uniqueID))K=this._petListIndexToIdMap.get(q.uniqueID);else{K=this.buildPetDataList(!1).findIndex((({data:K})=>K.PET_ID&&K.PET_ID===q.ID))}return K}onPetEvolved(){this.updateAllCards(),cr.d.updateInjectedValues(this.prefabContainer,{[dr.ML.UniquePetsTotal]:this.getUniquePetsText()})}isSelecting(){return this._currentPetBookState===Fu.AddingFromTeamCard||this._currentPetBookState===Fu.AddingFromPetDetails}showTooltip(q,K){var z,Y;const Q=this.getPetIndex(q);if(void 0===Q)return;const Z=null===(Y=null===(z=this._inventoryCardSpawner)||void 0===z?void 0:z.getSlotAtIndex(Q))||void 0===Y?void 0:Y.attachedObject;if(!X.Aq$.isDefined(Z))return;const J={bodyText:K},tt=wh.A.displayTooltipTargeted(void 0,this._inventoryScrollView.GameObject,J,Z);X.Aq$.isDefined(tt)&&(this._tooltip=tt.GameObject,this._tooltip.setLayer(ju.A.LEGACY_MENU_LAYER_NAME,!0))}destroyTooltip(){X.Aq$.isDefined(this._tooltip)&&this._tooltip.destroyDeferred()}destroy(){this.onCardSelected.dispose(),this.onTeamSwapped.dispose(),this.onTeamChanged.dispose(),st.q.instance.game.broadcaster.removeAppListener(gi.ki.FtueCompleted,this),st.q.instance.prodigy.game.broadcaster.removeAppListener(gi.ig.EvolveEnd,this),this.destroyTooltip(),this._teamCards.length=0,this._teamCardSelected=null,this._inventoryCardSpawner=null,this._inventoryScrollView=null,super.destroy()}}qu.SELECTION_BORDER_OFFSET=5,(0,Q.Cg)([(0,Ge.b)("ad2-c5b2"),(0,Q.Sn)("design:type",ee.E)],qu.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,Ge.b)("9a2-c1c3"),(0,Q.Sn)("design:type",Ps.R)],qu.prototype,"_battlePassQuestManager",void 0),(0,Q.Cg)([(0,Ge.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],qu.prototype,"_localizer",void 0);var Ku=z(58182),zu=z(17446),Yu=z(65732),Qu=z(46855),Xu=z(16909);class Zu extends Ih.y{constructor(q,K,z){super(st.q.instance.game,q,Pi.l.PetDetailsScreen,K,!0),this.onRemovePetFromTeam=new X.HN0,this.onAddPetToTeam=new X.HN0,this.onEvolvePet=new X.HN0,this.onPetMerged=new X.HN0,this.onPetLevelUp=new X.HN0,this.onPetGearChanged=new X.HN0,this.isModal=!1,this.skipRenderTransparencyLayer=!1,this._activePlayer=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,this._segment.featureCommon.sendInterfaceEvent({interfaceName:Ah.B.PetsWindow,interfaceType:Si.Wm.Window,originType:Si.$N.ButtonClick,originID:"pet_info_pop_up",instanceType:Li.N.UI}),this._petData=z,st.q.instance.prodigy.game.broadcaster.addAppListener(gi.ig.Evolved,this.onEvolvePet.dispatch,this.onEvolvePet),st.q.instance.prodigy.game.broadcaster.addAppListener(gi.ig.EvolveEnd,(()=>{Ph.P8.showUniquePetsFeature()&&!this._activePlayer.kennel.isPrimaryPet(this._petData)&&this.close()}),this),this._injectablePropertiesDictionary=this.getInjectedData(),this.onPrefabLoaded.addOnce((()=>{this.populateMenuComponents(),this._mergeWidget.onPetMergeSuccess.add(((q,K)=>{this.onPetMerged.dispatch(q),this.refreshDisplay(),K&&this.onLevelUp()})),this._gearWidget.onGearMenuLoading.add((()=>{this.setLoadingScreenEnabled(!0)})),this._gearWidget.onGearMenuOpen.add((()=>{this.setLoadingScreenEnabled(!1)})),this._gearWidget.onGearMenuClosed.add((()=>{this.refreshDisplay(),this.onPetGearChanged.dispatch(this._petData)})),this.onEvolvePet.add(this.onPetEvolve,this),this.setupMenuComponents();const q={PET_REMOVE_FROM_TEAM_FUNCTION:this.onRemovedFromTeam.bind(this),PET_ADD_TO_TEAM_FUNCTION:this.onPetAddToTeamClicked.bind(this),BACK_TO_ALL_PETS_FUNCTION:this.close.bind(this),ON_LEVEL_UP:this.onLevelUp.bind(this),PET_COUNT:`x${this._activePlayer.kennel.getAllPetsByID(this._petData.ID).length}`};cr.d.updateInjectedValues(this.prefabContainer,q);st.q.instance.prodigy.gameContainer.get("fa1-8ec9").isBreadcrumbComplete(En.B.FEATURE_PET_MERGE,En.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&bh.N.cacheCanShowPetMergeTutorial()&&this.setUpFTUEState()}))}changeDisplayedPet(q){this._petData=q;const K=this.getInjectedData();cr.d.updateInjectedValues(this.prefabContainer,K),this.setupMenuComponents(),this.onPetGearChanged.dispatch(this._petData)}refreshDisplay(){const q=this.getInjectedData();this._petInfoNavigationTabsController.setup(this._petData),this.injectPetDataIntoGearModule(),cr.d.updateInjectedValues(this.prefabContainer,q),this.onPetGearChanged.dispatch(this._petData)}setupMenuComponents(){if(!!this._activePlayer.kennel.getPetByUniqueID(this._petData.uniqueID)){this._spellsWidgetController.setup(this._petData);Ph.P8.canPetAccessMergeRanks(this._petData.ID)?(this._mergeWidget.setup(this._petData,this.updatePetInfo.bind(this)),this._epicCounterWidget.active=!1):(this._mergeWidget.GameObject.active=!1,this._epicCounterWidget.active=!0)}else this._spellsWidgetController.GameObject.active=!1,this._mergeWidget.GameObject.active=!1,this._levelUpWidget.active=!1,this._gearWidget.GameObject.active=!1;this._petInfoNavigationTabsController.setup(this._petData),this.setLoadingScreenEnabled(!1),this.updateCurrencyDisplay(),this.injectPetDataIntoGearModule()}populateMenuComponents(){this._magicoinDisplay=X.wa5.getActiveScene().container.get(dr.OP.MagicoinDisplay).GameObject,this._goldDisplay=X.wa5.getActiveScene().container.get(dr.OP.GoldDisplay).GameObject,this._petInfoNavigationTabsController=X.wa5.getActiveScene().container.get(dr.OP.PetInfoWidgetController),this._mergeWidget=X.wa5.getActiveScene().container.get(dr.OP.MergeWidgetController),this._spellsWidgetController=X.wa5.getActiveScene().container.get(dr.OP.SpellsWidgetController),this._loadingDisplaySignal=X.wa5.getActiveScene().container.get(dr.OP.PetLoadingDisplay),this._epicCounterWidget=X.wa5.getActiveScene().container.get(dr.OP.EpicCounterWidget).GameObject,this._levelUpWidget=X.wa5.getActiveScene().container.get(dr.OP.LevelUpWidget).GameObject,this._gearWidget=X.wa5.getActiveScene().container.get(dr.OP.PetInfoPetGearWidget)}setUpFTUEState(){this._mergeWidget.onPetMergeClicked()}isPetCurrentlyCaptured(q){return X.Aq$.isDefined(q.catchDate)}isPetSeen(q){return this._activePlayer.encounters.hasPetBeenEncountered(q.ID)}onLevelUp(){const q=this.getInjectedData();!0===q[dr.hi.YourPetPanelEnableEvolveButton]&&(q[dr.hi.SpinePetEvolveBurst]=!0,q[dr.hi.SpinePetEvolveIdle]=!1),cr.d.updateInjectedValues(this.prefabContainer,q),this._petInfoNavigationTabsController.updatePetInfo(),this._spellsWidgetController.updateCards(this._petData),this._mergeWidget.updateMergeProperties(),this.onPetLevelUp.dispatch(this._petData)}onPetEvolve(){if((0,Ft.G)(Ku.N)){const q=new Ta.R(st.q.instance.prodigy.game,this._petData).getAvailableEvolutions(),K=this._activePlayer.kennel.getPrimaryPetById(q[0].evolveID);this.changeDisplayedPet(K)}else{const q=new X.HN0;cr.d.updateInjectedValues(this.prefabContainer,{RESET_XP_BAR:q},!0),q.dispatch();const K=this.getInjectedData();this._petInfoNavigationTabsController.setup(this._petData),this._spellsWidgetController.updateCards(this._petData),cr.d.updateInjectedValues(this.prefabContainer,K);Ph.P8.showUniquePetsFeature()&&this._petData.team&&!this._activePlayer.kennel.isPrimaryPet(this._petData)&&this._activePlayer.kennel.removeAtTeamPosition(this._petData.team)}}updatePetInfo(){this._petInfoNavigationTabsController.updatePetInfo()}getChargedPetInjectionValues(){const q={};if(X.Aq$.isDefined(this._petData.team)){const K=this._activePlayer.getChargedLevel();q[Yu.E.ChargedCreatureEffectTier]=Nh.e.getChargedLevelTierFromLevel(K),q[Yu.E.ChargedCreatureEffectDisplayType]=K>0?xh.X$.IDLE:xh.X$.HIDDEN}return q}getInjectedData(){const q=Ee.t.getItem("pet",this._petData.ID),K=this.getPetDetailsData(q),z=this.getEvoLineInjectionValues(q),Y=this.getChargedPetInjectionValues();return this._activePlayer.kennel.getPetByUniqueID(this._petData.uniqueID)&&st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendPetDetailsViewedEvent(q,"your-pet",{pet_level:this._petData.level,pet_rank:this._petData.mergeRank,gear_list:this._petData.gear,is_on_team:Ph.P8.isPetOnTeam(this._petData)}),Object.assign(Object.assign(Object.assign({},K),z),Y)}getEvoLineInjectionValues(q){var K;const z=Ph.P8.GetEvolutionaryLine(q);for(;z.length>4&&z[0]!==q.ID;)z.shift();const Y={[dr.hi.YourPetPanelEvoLineNumStages]:z.length};if(Lh.k.cachedDisabledEvolutionFeature)return Y[dr.hi.YourPetHideEvolutionLine]=!0,Y[dr.hi.YourPetShowEvolveInfo]=!1,Y[dr.hi.YourPetPanelShowEvolveButton]=!1,Y[dr.hi.YourPetShowEvolveSparkles]=!1,Y;1===z.length&&(Y[dr.hi.YourPetHideEvolutionLine]=!0);const Q=[{id:dr.hi.YourPetPanelEvoLineStage1Id,seen:dr.hi.YourPetPanelEvoLineStage1Seen,rescued:dr.hi.YourPetPanelEvoLineStage1Rescued},{id:dr.hi.YourPetPanelEvoLineStage2Id,seen:dr.hi.YourPetPanelEvoLineStage2Seen,rescued:dr.hi.YourPetPanelEvoLineStage2Rescued},{id:dr.hi.YourPetPanelEvoLineStage3Id,seen:dr.hi.YourPetPanelEvoLineStage3Seen,rescued:dr.hi.YourPetPanelEvoLineStage3Rescued},{id:dr.hi.YourPetPanelEvoLineStage4Id,seen:dr.hi.YourPetPanelEvoLineStage4Seen,rescued:dr.hi.YourPetPanelEvoLineStage4Rescued}],Z=this._activePlayer.encounters;for(let X=0;X0;Y[q]=tt,Y[K]=et||it,Y[J]=it}const J=z.findIndex((K=>q.ID===K))+1;Y[dr.hi.YourPetPanelEvoLineOwnedStage]=J;const tt=new Ta.R(st.q.instance.prodigy.game,this._petData),et=(0,Ft.G)(Ku.N)&&(null!==(K=tt.data.evolutionCount)&&void 0!==K?K:0)>0,it=Ph.P8.canPetEvolve(tt,this._petData.level),nt=tt.getAvailableEvolutions(mi.s.activePlayerLevelCap),at=nt.length>0,rt=!!this._activePlayer.kennel.getPetByUniqueID(this._petData.uniqueID),ot=rt&&at&&!et,ht=(0,Ft.G)(rh.y);Y[dr.hi.YourPetPanelEnableEvolveButton]=it,Y[dr.hi.YourPetPanelShowEvolveButton]=ht?it:ot,Y[dr.hi.YourPetShowEvolveSparkles]=it,Y[dr.hi.YourPetShowEvolveInfo]=!et,Y[dr.hi.YourPetShowEvolveSparkles]=it&&!et;const ct=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),dt=Z.hasPetBeenEncountered(this._petData.ID);let lt;return lt=rt?it?ct.getText("PET_SCREEN_READY_TO_EVOLVE"):z.length>1?at?ct.getText("PET_SCREEN_GET_TO_LEVEL",nt[0].lvl):ct.getText("PET_SCREEN_MAX_EVOLUTION"):ct.getText("PET_SCREEN_HAS_NO_EVOS"):dt?ct.getText("PET_SCREEN_NOT_RESCUED"):ct.getText("PET_SCREEN_NOT_SEEN"),Y[dr.hi.YourPetEvolveInfoText]=lt,Y[dr.hi.YourPetPetEvolveButtonFunction]=this.openEvolutionMenu.bind(this),Y[dr.hi.SpinePetEvolveBurst]=!1,Y[dr.hi.SpinePetEvolveIdle]=ht?it:ot,Y}getPetDetailsData(q){var K,z,Y,Q,X,Z,J;const tt=this.isPetCurrentlyCaptured(this._petData),et=this.isPetSeen(this._petData),it=!tt&&et,nt=!tt&&!et,at=null!==(z=null===(K=q.data)||void 0===K?void 0:K.affinity)&&void 0!==z?z:"",rt=Yc.x.getElementDisplayName(at),ot=Ph.P8.isPetOnTeam(this._petData),ht=null!==(Q=null===(Y=q.data)||void 0===Y?void 0:Y.rarity)&&void 0!==Q?Q:zu.E.Common,ct=Ph.P8.getMaxOwnableLevel(this._petData.ID,this._petData.mergeRank),dt=new Qu.r(this._petData.stars,Do.V.Pet,{baseXp:0,memberXp:0,totalNonMemberXp:0},Math.max(ct,this._petData.level));dt.levels=[null!==(X=this._petData.level)&&void 0!==X?X:0];const lt=new Ta.R(st.q.instance.prodigy.game,this._petData),ut=mi.s.activePlayerLevelCap,ft=lt.getAvailableEvolutions(ut).length>0,bt=this._loggedInPlayer.getLevel(),pt=this._petData.level>=ct,vt=this._petData.level=bt,_t=!ft&&pt&&!mt,Et=Lh.k.cachedDisabledEvolutionFeature;let wt="";if(mt)wt=Et?"INCREASE_MERGE_RANK_TO_LEVEL_UP":"PET_SCREEN_EVOLVE_NOTICE";else if(yt&&(wt="LEVEL_UP_YOUR_WIZARD_TO_LEVEL_UP_PET",Et&&bt>=ut)){let q="";(null===(Z=this._activePlayer.difficultyUnlocks)||void 0===Z?void 0:Z.hard)?(null===(J=this._activePlayer.difficultyUnlocks)||void 0===J?void 0:J.expert)||(q=this._localizer.getText("EXPERT_MODE")):q=this._localizer.getText("HARD_MODE"),q.length>0&&(wt=this._localizer.getText("UNLOCK_NEW_MODE_TO_LEVEL_UP",q))}const Tt=this._loggedInPlayer.player.getGold(),St=this._hardCurrencyDataProvider.getBalance(27),At=this._paymentManager.exchange({currency:27,value:St},1).value;let[Ct,Ot]=pt?[0,this._petData.level]:Xu.M.getLevelPurchaseCost(this._petData.level,gt,Tt);Ct>Tt&&!pt&&([Ct,Ot]=Xu.M.getLevelPurchaseCost(this._petData.level,gt,At));const It=this._paymentManager.exchange({currency:1,value:Ct},27).value;let Dt;return Dt=et?Ph.P8.getPetDisplayName(this._petData,q):this._localizer.getText("UNKNOWN_QUESTION_MARKS"),{PET_NAME:null!=Dt?Dt:"",PET_ID:this._petData.ID,PET_DATA:this._petData,YOUR_PET_PANEL_PET_DATA:this._petData,IS_PET_OWNED:tt,SHOW_GREYSCALE_FILTER:it,SHOW_SHADOW_FILTER:nt,ELEMENTAL_ICON_FRAME:kh.XP[q.data.affinity],ELEMENTAL_BASE_FRAME:kh.bf[q.data.affinity],ELEMENTAL_TEXT:rt,SHOW_ON_YOUR_TEAM_BADGE:ot,ENABLE_REMOVE_FROM_TEAM_BUTTON:ot,ENABLE_ADD_TEAM_BUTTON:!ot,PET_RARITY_TEXT:Nn.J.convertRarityToText(ht),PET_RARITY_RIBBON_FRAME:et?ht:-1,XP_BAR_INFO:dt,LEVEL_UP_BUTTON_LEVEL:Ot,LEVEL_UP_BUTTON_COST_DIFFERENCE:Ct-Tt,LEVEL_UP_MAGICOIN_COST_DIFFERENCE:It-St,ENABLE_LEVEL_UP_BUTTON:vt,ENABLE_LEVEL_UP_NOTICE:wt.length>0,LEVEL_UP_BUTTON_NOTICE_TEXT:wt,LEVEL_UP_MAX_LEVEL_STATE:pt,LEVEL_UP_BUTTON_COST:Ct,LEVEL_UP_MAGICOIN_COST:It,OTP_MISSING_MAGICOIN:It-St,MAX_LEVEL_REACHED:_t,SHOW_MAGICOIN_LEVEL_UP_OPTION:!this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(It)}}setLoadingScreenEnabled(q){this._loadingDisplaySignal.run(q)}injectPetDataIntoGearModule(){const q={[dr.hi.YourPetPanelPetData]:this._petData};cr.d.updateInjectedValues(this.prefabContainer,q)}updateCurrencyDisplay(){if(this._goldDisplay){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getGold(),K={[dr.$u.CurrencyID]:1,[dr.$u.CurrencyAmount]:q};cr.d.updateInjectedValues(this._goldDisplay,K)}if(this._magicoinDisplay){const q=this._hardCurrencyDataProvider.getBalance(27),K={[dr.$u.CurrencyID]:27,[dr.$u.CurrencyAmount]:q};cr.d.updateInjectedValues(this._magicoinDisplay,K)}}onPetAddToTeamClicked(){this.onAddPetToTeam.dispatch(this._petData),this.close()}onRemovedFromTeam(){this.onRemovePetFromTeam.dispatch(this._petData,this._petData.team);const q=Ph.P8.isPetOnTeam(this._petData),K={[dr.hi.YourPetShowOnYourTeamBadge]:q,[dr.hi.YourPetPanelEnableRemoveFromTeamButton]:q,[dr.hi.YourPetEnableAddTeamButton]:!q};cr.d.updateInjectedValues(this.prefabContainer,K)}destroy(){this.onRemovePetFromTeam.dispose(),this.onAddPetToTeam.dispose(),this.onEvolvePet.dispose(),this.onPetMerged.dispose(),this.onPetLevelUp.dispose(),this.onPetGearChanged.dispose(),st.q.instance.prodigy.game.broadcaster.removeAppListener(gi.ig.Evolved,this.onEvolvePet),st.q.instance.prodigy.game.broadcaster.removeAppListener(gi.ig.EvolveEnd,this),super.destroy()}openEvolutionMenu(){qc.K.openEvolutionPromptIfEligible(new Ld.r(st.q.instance.prodigy.game,this._petData),void 0,!1,Si.k.PetBook).catch(X.RQr.createHandler("Failed to open evolution prompt"))}}(0,Q.Cg)([(0,Ge.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],Zu.prototype,"_localizer",void 0),(0,Q.Cg)([(0,Ge.b)("ad2-c5b2"),(0,Q.Sn)("design:type",ee.E)],Zu.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,Ge.b)("bec-c6b4"),(0,Q.Sn)("design:type",Ji.W)],Zu.prototype,"_hardCurrencyDataProvider",void 0),(0,Q.Cg)([(0,Ge.b)("ec3-31a0"),(0,Q.Sn)("design:type",Nl.E)],Zu.prototype,"_paymentManager",void 0);class Ju extends Jh.a{constructor(q,K,z=null,Y=null){super(q,K,0,0,st.q.instance.prodigy.textureMenu),this.onItemRecieved=new X.HN0,this.onItemPurchased=new X.HN0,this.purchaseConfirmationConfig=null,this.defaultMemberAd=null,this.storeData=null,this.storeID=-1,this._segment=st.q.instance.prodigy.gameContainer.get("20f-5f67"),this.purchaseConfirmationConfig=z,this.defaultMemberAd=Y}getStore(){return this.storeData}itemClicked(q){const K=st.q.instance.prodigy.gameContainer,z=K.get("ad2-c5b2").player;if(this._segment.shop.sendShopItemViewedEvent(Cl.V1,this.storeData,q),z.isItemOwned({ID:q.getID(),type:q.getType()}))this.showOwnedMessage(q);else if("pet"===q.getType()&&z.kennel.isFull())st.q.instance.prodigy.open.message(K.get(X.$Bt.LocalizationService).getText("PURCHASING_MESSAGE_TOO_MANY_PETS_BODY"),null,null,K.get(X.$Bt.LocalizationService).getText("MESSAGE_TITLE_UH_OH"));else{const K=Ee.t.getItem(q.getType(),q.getID()).data;"dormbg"===q.getType()?st.q.instance.prodigy.open.houseItemInfo(q,this.onBuyCardClosed.bind(this,q,K),Wr.s.Buy):st.q.instance.prodigy.open.itemInfo(q,this.onBuyCardClosed.bind(this,q,K),Wr.s.Buy)}}showOwnedMessage(q){const K=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);let z="",Y=K.getText("MESSAGE_TITLE_UH_OH");switch(q.getType()){case"dorm":z=K.getText("PURCHASING_MESSAGE_TOO_MANY_ITEMS_BODY");break;case"dormbg":z=K.getText("PURCHASING_MESSAGE_ALREADY_LIVE_BODY"),Y=null;break;case"hair":case"face":case"eyeColor":case"skinColor":case"hairColor":z=K.getText("PURCHASING_MESSAGE_ALREADY_LOOK_BODY");break;case"pet":z=K.getText("PURCHASING_MESSAGE_HAVE_PET_BODY");break;default:z=K.getText("PURCHASING_MESSAGE_HAVE_ITEM_BODY")}st.q.instance.prodigy.open.message(z,null,null,Y)}onBuyCardClosed(q,K,z){if(z){const z=q.getCost()[0];if(this.sendBuyAnalytics(q,K),this.meetsMembershipRequirement(q,K)&&this.meetsCurrencyRequirement(z,K)&&this.meetsLevelRequirements(K)){let Y=null;Y=X.Aq$.isDefined(this.purchaseConfirmationConfig)?st.q.instance.prodigy.open.messageBoxPrefab.bind(st.q.instance.prodigy.open,{text:this.purchaseConfirmationConfig.message,buttonState:xr.D.YesNoButtons,confirmCallback:this.buyItem.bind(this,q,K,z)}):this.buyItem.bind(this,q,K,z),Y()}else this.meetsLevelRequirements(K,!1)?this.meetsMembershipRequirement(q,K,!1)?this._segment.shop.sendShopPurchaseFailedEvent(Cl.V1,this.storeData,q,Pn.WE.NotEnoughCurrency):this._segment.shop.sendShopPurchaseFailedEvent(Cl.V1,this.storeData,q,Pn.WE.MemberLocked):this._segment.shop.sendShopPurchaseFailedEvent(Cl.V1,this.storeData,q,Pn.WE.LevelLocked)}}buyItem(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=Nn.J.getPurchasePrice(K,z);this._segment.shop.sendShopPurchaseCompletedEvent(Cl.V1,this.storeData,q);const Z=z.getType(),J=z.getID();"currency"===Z&&1===J?Y.changeGold(-Q):Y.backpack.consume(Z,J,Q);const tt=`${Cl.V1}${this.storeData.getName()}`;this._segment.item.sendItemRemovedEvent(J,Ee.t.getItem(Z,J).name,Z,z.getAmount(),{sink_id:tt,sink_type:On.C.Shop,instance_type:Li.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(tt)});let et=K;X.Aq$.isDefined(K.data)&&(et=K.data);const it=q.getType(),nt=q.getID();"pet"===it&&(et={ID:nt});const at=this.getStore().getName(),rt={ID:nt,type:it,N:1,data:et},ot="store",ht={source_type:On.C.Shop,instance_id:this._segment.featureCommon.getCurrentInterfaceID(`${Cl.V1}${this.storeData.getName()}`),instance_type:Li.N.Interface};Ju.GOTITEM_EXEMPT_STORES.includes(at)?Nn.J.bagItem(rt,this.game,ot,at,ht):st.q.instance.prodigy.open.gotItem([rt],(()=>{this.onItemRecieved.dispatch()}),null,ot,at,void 0,ht),this.onItemPurchased.dispatch(q)}meetsMembershipRequirement(q,K,z=!0){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!Y.hasMembership()){if("pet"===q.getType()&&Y.kennel.isFull())return z&&st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:xn.o.FunnelCatchMorePets}),!1;if(1===Z.get(K,"member",0))return z&&(st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:Xh.k.BuyMemberItem,interfaceName:`${Cl.V1}${this.storeData.getName()}`,interfaceType:Si.Wm.Menu,saveClickInfo:Xh.k.BuyMemberItem}),st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:xn.o.FunnelBuyMemberItem,conversionFunnelMetadata:`${q.getType()}-${q.getID()}`},Xh.k.BuyMemberItem)),!1}return!0}meetsLevelRequirements(q,K=!0){if(X.Aq$.isDefined(q.lockLevel)){const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(z.getLevel(){z.hasMembership()||st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:xn.o.FunnelEquipLevelLockedItem})}}return!1}}return!0}sendBuyAnalytics(q,K){const z=st.q.instance.prodigy.gameContainer;if(X.Aq$.isDefined(K.member)&&1===K.member){const K=z.get("ad2-c5b2").player;if(!K.hasMembership()){let Y={};const Q=`${q.getType()}-${q.getID()}`;"pet"===q.getType()&&K.kennel.isFull()||(Y={conversionFunnelName:xn.o.FunnelBuyMemberItem,conversionFunnelMetadata:Q});const X=Nn.J.showYouTubeMembershipAd(this.game,!0)?Rn.R.Video:Rn.R.Static;z.get("20f-5f67").purchase.sendFunnelStart({type:"Store-Buy-Member-Item",category:"Store",contentId:Q,adType:X})}}}meetsCurrencyRequirement(q,K){const z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=Nn.J.getPurchasePrice(K,q);if("currency"===q.getType()&&1===q.getID()){if(Y.getGold(){this._segment.featureCommon.sendInterfaceEvent({interfaceName:`${Cl.V1}${this.storeData.getName()}`,interfaceType:Si.Wm.Menu,closeMethod:Si.Lv.CloseButton}),Y()},this.onBuy=Q,this.storeSortOrder=tt,this._originType=st,this.onItemRecieved.add((()=>{this.scrollbar.process()})),this.onItemPurchased.add((q=>{this.updatePlayerCurrency(),X.Aq$.isDefined(this.onBuy)&&this.onBuy(q)})),this._onLoadStart=it,this._onLoadCompleteCallback=et,this.create()}create(){this.addTransparent();const q=this.createBaseSetup(30,16,"shine",null,null,!0,null),K=st.q.instance.prodigy.create.element(q,-40,-40);K.setRenderState(!0),K.add(new jr.C(this.game,51,240,1178,40,it._.Tiled_sprites_json,"blue-top")),K.add(new jr.C(this.game,51,280,1178,300,it._.Tiled_sprites_json,"blue-mid")),K.add(new jr.C(this.game,51,580,1178,40,it._.Tiled_sprites_json,"blue-top2")),this.spinner=this.add(st.q.instance.prodigy.create.sprite(640,360,it._.General_core_json,"loading")),this.spinner.anchor.set(.5,.5),this.game.add.tween(this.spinner,this).to({angle:360},2e3,X.GS3.Linear.None,!0,0,te.s.MAX_SAFE_INTEGER,!1),super.create(),st.q.instance.prodigy.gameContainer.get("884-efd8").getStore(this.storeID).then((([q,K])=>{K?this.onGetStoreSuccess(K):this.onGetStoreFailure(q)}))}createItemCards(q,K){yr.l.removeAll(this.cards,!0);for(let z=K;z=q.length)st.q.instance.prodigy.create.panel(this.cards,Q%4*180,220*Math.floor(.25*Q),4,5,"empty");else{const q=Y.getCost()[0],K=Ee.t.getItem(Y.getType(),Y.getID());st.q.instance.prodigy.create.item(this.cards,Q%4*180,220*Math.floor(.25*Q),{id:Y.getID(),type:Y.getType(),cost:{ID:q.getID(),type:q.getType(),N:Nn.J.getPurchasePrice(K.data,q)}},Wr.s.Store,(()=>{this.itemClicked(Y)}))}}}getItemsForPage(q){const K=this.storeData.getPages()[q].getStoreItems();return X.Aq$.isDefined(this.storeSortOrder[q])?this.storeSortOrder[q](K):K}setMode(q){super.setMode(q);const K=this.getItemsForPage(q);this.scrollbar.reset(K.length-4,4,-1,this.createItemCards.bind(this,K)),this.scrollbar.process(),this.page=q}setupInfoPanel(){this.setupMemberAd()}onGetStoreSuccess(q){var K,z,Y;X.Aq$.isDefined(this.game)&&(this.storeData=q,null===(K=this._onLoadStart)||void 0===K||K.call(this,q),this.spinner.destroy(),this.spinner=null,this.setupTabs(),this.setupStoreMerchant(),this.setupCurrencyDisplay(),this.setupInfoPanel(),this.cards=st.q.instance.prodigy.create.element(this,430,220),this.scrollbar=st.q.instance.prodigy.create.slider(this,this.cards.x+540+180,240,380,!0,!0),this.currentInterfaceName=`${Cl.V1}${null===(z=this.storeData)||void 0===z?void 0:z.getName()}`,this._segment.featureCommon.sendInterfaceEvent({interfaceName:`${Cl.V1}${this.storeData.getName()}`,interfaceType:Si.Wm.Menu,originType:this._originType,originID:null}),this.updatePlayerCurrency(),this.setMode(0),null===(Y=this._onLoadCompleteCallback)||void 0===Y||Y.call(this))}onGetStoreFailure(q){X.VyI.log(`Store with ID: ${this.storeID} could not be loaded - ${q.getErrorMessage()}`,X.$bb.Warning);const K=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);st.q.instance.prodigy.open.message(K.getText("STORE_OPEN_FAILED_MESSAGE"),this.close.bind(this),null,K.getText("STORE_OPEN_FAILED_TITLE"))}setupStoreMerchant(){const q=this.storeData.getMerchantAvatar(),K=this.add(st.q.instance.prodigy.create.sprite(q.getPosition().x,q.getPosition().y,q.getAssetTag(),q.getAssetFrame()));K.scale.x=q.getScale().x,K.scale.y=q.getScale().y}setupTabs(){const q=this.storeData.getPages(),K=st.q.instance.prodigy.create.panel(this,80,80,3*q.length+6,2,"banner");for(let z=0;z{q.get("20f-5f67").purchase.sendFunnelStart({type:"Legacy-Store-Ad",category:"Store",contentId:`store-${this.storeID}`,adType:z}),st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:"Click-Membership-Ad",conversionStage:"Click-Ad"})},Q=st.q.instance.prodigy.create.panel(this,80,380,8,5,"member");Q.setClickable(Y.bind(this,this.game)),st.q.instance.prodigy.create.font(Q,10,10,K.getText("STORE_PROMPT_UNLOCK_ALL"),{align:"center",width:300}),st.q.instance.prodigy.create.font(Q,10,140,K.getText("BUTTON_CLICK_HERE"),{align:"center",width:300,fontID:9,size:36});const Z=Q.add(st.q.instance.prodigy.create.sprite(7,75,it._.General_core_json,"overlay-small"));Z.width=306,Z.height=50,Z.alpha=.2;const J=[];for(;J.length<3;){const q=Mn.o.integerInRange(0,tf.memberAdItems.length);-1===J.indexOf(q)&&(J[J.length]=q)}Q.addChild(new wr.k(this.game,20,60,tf.memberAdItems[J[0]],null)),Q.addChild(new wr.k(this.game,120,60,tf.memberAdItems[J[1]],null)),Q.addChild(new wr.k(this.game,220,60,tf.memberAdItems[J[2]],null))}}}tf.memberAdItems=[zt.E.getIconForType("follow",144),zt.E.getIconForType("follow",146),zt.E.getIconForType("follow",139),zt.E.getIconForType("follow",140),zt.E.getIconForType("follow",131),zt.E.getIconForType("hat",74),zt.E.getIconForType("hat",100),zt.E.getIconForType("hat",119),zt.E.getIconForType("hat",114),zt.E.getIconForType("hat",116),zt.E.getIconForType("hat",79),zt.E.getIconForType("outfit",93),zt.E.getIconForType("outfit",86),zt.E.getIconForType("outfit",91),zt.E.getIconForType("outfit",59),zt.E.getIconForType("dorm",34),zt.E.getIconForType("dorm",22),zt.E.getIconForType("dorm",132),zt.E.getIconForType("dorm",40),zt.E.getIconForType("dorm",39),zt.E.getIconForType("dorm",60),zt.E.getIconForType("dorm",65),zt.E.getIconForType("weapon",116),zt.E.getIconForType("weapon",114),zt.E.getIconForType("weapon",95),zt.E.getIconForType("boots",40),zt.E.getIconForType("boots",36),zt.E.getIconForType("boots",37),zt.E.getIconForType("boots",30)];var ef=z(48982);class sf extends Lr.H{constructor(q,K,z,Y,Q,X){super(q,K,Q,X),this.onIconPressed=null,this.itemIcon=null,this.quantityLabel=null,this.itemID=-1,this.quantityLabel=st.q.instance.prodigy.create.font(this,0,65,"0",{width:80,align:"right"}),this.setItemID(z),this.setQuantity(Y)}setItemID(q){this.itemID=q,X.Aq$.isDefined(this.itemIcon)?this.itemIcon.loadNewTexture(zt.E.getIconForType("dorm",q)):(this.itemIcon=this.add(st.q.instance.prodigy.create.sprite(0,0,zt.E.getIconForType("dorm",q))),this.itemIcon.inputEnabled=!0,this.itemIcon.events.onInputDown.add(this.iconPressed,this))}setQuantity(q){this.quantityLabel.setText(`${q}`)}iconPressed(q,K){X.Aq$.isDefined(this.onIconPressed)&&this.onIconPressed.dispatch(this.itemID,Math.floor(K.x),Math.floor(K.y))}destroy(q={children:!0}){this.onIconPressed.dispose(),super.destroy(q)}}class nf extends Lr.H{constructor(q,K,z,Y){super(q,K,z,Y),this.onIconPressed=new X.HN0,this.houseItems=[],this.pageNumber=0,this.itemIcons=[],this.pageBackground=null,this.prevPageButton=null,this.nextPageButton=null,this.pageBackground=this.add(st.q.instance.prodigy.create.sprite(25,30,it._.General_core_json,"overlay-light")),this.pageBackground.alpha=.2,this.pageBackground.width=670,this.pageBackground.height=50,this.pageBackground.visible=!1,this.prevPageButton=st.q.instance.prodigy.create.button(this,0,30,it._.General_icons_json,"back",this.decreasePageNumber.bind(this)),this.nextPageButton=st.q.instance.prodigy.create.button(this,670,30,it._.General_icons_json,"next",this.increasePageNumber.bind(this)),this.prevPageButton.visible=!1,this.nextPageButton.visible=!1}getItemCount(){return this.houseItems.length}showItems(q){this.houseItems=q.slice(),q.length>0?(this.showItemPages(!0),this.setPage(0),this.updatePrevPageButton(),this.updateNextPageButton()):this.showItemPages(!1)}setPage(q=0){this.pageNumber=X.cj9.clamp(q,0,this.getPageCount());const K=this.houseItems.slice(6*this.pageNumber,6*(this.pageNumber+1));for(let z=0;z-1){this.houseItems[K].N-=1,this.houseItems[K].N<=0&&this.houseItems.splice(K,1);const q=6*this.pageNumber;return K>=q&&K0?(this.pageNumber>this.getPageCount()-1?this.setPage(this.pageNumber-1):this.setPage(this.pageNumber),this.updateNextPageButton()):this.showItemPages(!1)),this.houseItems}return[]}increaseQuantity(q){let K=this.getItemIndex(q);-1===K&&(0===this.houseItems.length&&this.showItemPages(),K=this.houseItems.push({ID:q,N:0})-1),this.houseItems[K].N+=1,this.houseItems.sort(((q,K)=>q.ID-K.ID)),K=this.getItemIndex(q);const z=6*this.pageNumber;return K>=z&&KK.ID===q))}getPageCount(){return Math.ceil(this.houseItems.length/6)}increasePageNumber(){this.setPage(this.pageNumber+1),this.updateNextPageButton(),this.updatePrevPageButton()}decreasePageNumber(){this.setPage(this.pageNumber-1),this.updatePrevPageButton(),this.updateNextPageButton()}updatePrevPageButton(){this.pageNumber<=0?this.prevPageButton.setInactive():this.prevPageButton.isActive()||this.prevPageButton.setActive()}updateNextPageButton(){this.pageNumber>=this.getPageCount()-1?this.nextPageButton.setInactive():this.nextPageButton.isActive()||this.nextPageButton.setActive()}setItemIcon(q,K,z){if(q{this.showCategoryPage("Comfy")},category:"Comfy",title:"HOUSE_ITEM_CATEGORY_COMFY"},{icon:{ID:3,type:"dorm"},callback:()=>{this.showCategoryPage("Surface")},category:"Surface",title:"HOUSE_ITEM_CATEGORY_SURFACE"},{icon:{ID:6,type:"dorm"},callback:()=>{this.showCategoryPage("Plants")},category:"Plants",title:"HOUSE_ITEM_CATEGORY_PLANTS"},{icon:{ID:13,type:"dorm"},callback:()=>{this.showCategoryPage("Storage")},category:"Storage",title:"HOUSE_ITEM_CATEGORY_STORAGE"},{icon:{ID:18,type:"dorm"},callback:()=>{this.showCategoryPage("Wall")},category:"Wall",title:"HOUSE_ITEM_CATEGORY_WALL"},{icon:{ID:41,type:"dorm"},callback:()=>{this.showCategoryPage("Lamps")},category:"Lamps",title:"HOUSE_ITEM_CATEGORY_LAMPS"},{icon:{ID:22,type:"dorm"},callback:()=>{this.showCategoryPage("Items")},category:"Items",title:"HOUSE_ITEM_CATEGORY_ITEMS"}],this.trashIcon=st.q.instance.prodigy.create.button(this,1160,500,it._.General_icons_json,"dorm-trash",st.q.instance.prodigy.open.messageBoxPrefab.bind(st.q.instance.prodigy.open,{text:"HOUSE_EDITOR_CONFIRM_PACK_UP",buttonState:xr.D.YesNoButtons,confirmCallback:()=>{this.removeAllItems()}})),this.updateTrashIcon(),this.rotateButton=st.q.instance.prodigy.create.button(this,0,0,it._.General_icons_json,"dorm-rotate",(()=>{this.rotateCurrentFocusedItem()})),this.rotateButton.visible=!1,this.rotateButton.sprite.anchor.set(.5,.5),this.game.broadcaster.broadcast(gi.Y1.HideHUD,gi.HG.HUD),this.setup(),this.setEditing(),this.game.input.onUp.add(this.inputReleased,this,-999)}menuSetup(){var q,K;super.menuSetup();const z=st.q.instance.prodigy.game.state.getCurrentState();null===(K=null===(q=z.getParentalConsentBanner)||void 0===q?void 0:q.call(z))||void 0===K||K.then((q=>{q&&(q.active=!1)})).catch(X.RQr.createHandler("Failed to get the parental consent banner when opening the house edit menu"));const Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this.showFrame("map",Y.getText("HOUSE_EDITOR_TITLE"),this.categories);const Q=st.q.instance.prodigy.create.textButton(this,0,0,{icon:"close",text:Y.getText("BUTTON_CLOSE")},this.close.bind(this));this.showBtns([],[Q]),this.updateCategoryTabState(),this.itemsScroll=new nf(this.game,this,190,620),this.itemsScroll.onIconPressed.add(this.spawnHouseItem,this),this.btns[0].isActive()?this.btns[0].onDown():this.showCategoryPage(this.categories[0].category),this.editStartTime=Math.floor(Date.now()/1e3)}close(){var q,K;this.game.broadcaster.broadcast(gi.Y1.ShowHUD,gi.HG.HUD),this.game.broadcaster.broadcast(gi.F0.CloseEditor,this.game),this.setEditing(!1),this.game.input.onUp.remove(this.inputReleased,this);const z=st.q.instance.prodigy.game.state.getCurrentState();null===(K=null===(q=z.getParentalConsentBanner)||void 0===q?void 0:q.call(z))||void 0===K||K.then((q=>{q&&(q.active=!0)})).catch(X.RQr.createHandler("Failed to get the parental consent banner when closing the house edit menu")),super.close()}showCategoryPage(q){X.Aq$.isDefined(this.itemsScroll)&&(this.currentCategory=q,this.itemsScroll.showItems(this.getUnplacedItemsInCategory(q)))}updateCategoryTabState(){for(let q=0;q0?this.btns[q].setActive():this.btns[q].setInactive()}getUnplacedItemsInCategory(q){return st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.house.getUnplacedItems().filter((K=>{var z;const Y=null===(z=Ee.t.getItem("dorm",K.ID))||void 0===z?void 0:z.data;return(null==Y?void 0:Y.category.toLowerCase())===q.toLowerCase()?Y:null}))}getIndexOfCategory(q){return this.categories.findIndex((K=>K.category===q))}spawnHouseItem(q,K,z){this.clearFocusedItem();const Y=X.cj9.snapToCeil(K,Br.G.HOUSE_ITEM_GRID_SNAP_INTERVAL),Q=X.cj9.snapToFloor(z,Br.G.HOUSE_ITEM_GRID_SNAP_INTERVAL),Z=st.q.instance.prodigy.create.houseItem(this.houseMap.content,q,Math.floor(Y),Math.floor(Q),0,this.houseMap).findComponent(Br.G);Z.setEditable();this.game.time.events.addTimer(33,(q=>{const K=q.getRenderer().getInputHandler(),z=this.game.input.activePointer;if(z.isDown&&K){q.gameObject.position.set(0,0);const Y=q.getRenderer();Y.setPosition(z.position.x,z.position.y-.5*Y.getHeight()),K._pointerData[z.id].isDown=!0,K.startDrag(z)}else q.gameObject.destroy()}),this,Z),Z.onItemDropped.addOnce(this.itemWasPlacedInHouse,this)}itemWasPlacedInHouse(q,K,z){if(this.itemsScroll.reduceQuantity(q.itemID),this.itemsScroll.getItemCount()<1){const q=this.getIndexOfCategory(this.currentCategory);this.resetButton(q),this.btns[q].setInactive(),this.currentBtn=-1}this.houseMap.addHouseItem(q.gameObject),this.registerHouseItemListeners(q);st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.house.setActive(q.itemID,K,z,0,0,0,0,0),q.gameObject.x=K,q.gameObject.y=z,this.updateTrashIcon()}setEditing(q=!0){if(X.Aq$.isDefined(this.houseMap))for(let K=0;K0;)this.removeHouseItem(this.houseMap.houseItems[0].findComponent(Br.G));this.updateTrashIcon()}updateTrashIcon(){this.houseMap.houseItems.length>0?this.trashIcon.setActive():this.trashIcon.setInactive()}removeHouseItem(q){this.clearFocusedItem(),this.houseMap.removeHouseItem(q.gameObject);const K=Ee.t.getItem("dorm",q.itemID).data.category,z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=z.house.data.active;for(let Q=0;Q0&&this.renderMenus[this.renderMenus.length-1].setActive(!0),this.closeChat()}setActiveMenu(q=null){X.Aq$.isDefined(q)&&(q.isModal?q instanceof Ih.y&&q.obeyMenuStackVisibility?q.onPrefabLoaded.addOnce((()=>{this.pushActiveModal(q)})):this.pushActiveModal(q):this.renderMenus.push(q)),X.Aq$.isDefined(q)&&!q.isModal&&this.closeChat(),this.updateSentryTags()}setMenuInactive(q){let K=this.renderMenus.indexOf(q);-1===K&&(X.VyI.log("Attempted to remove a menu that is not in the renderMenus stack. Removing top menu instead.",X.$bb.Warning),K=this.renderMenus.length-1);const z=K===this.renderMenus.length-1;if(this.renderMenus.splice(K,1),z&&this.renderMenus.length>0)for(let Y=this.renderMenus.length-1;Y>=0&&(this.renderMenus[Y].setActive(!0),X.Aq$.isDefined(this.renderMenus[Y].isModal)&&!this.renderMenus[Y].isModal);Y--);X.Aq$.isDefined(q)&&!q.isModal&&this.closeChat(),this.updateSentryTags()}pushActiveModal(q){for(let K=0;K0&&this.renderMenus[this.renderMenus.length-1]instanceof Jh.a&&this.renderMenus[this.renderMenus.length-1].hideActiveElements(),this.updateSentryTags()}menuOpen(q){this.menuLayer.children.forEach((K=>{K.hide&&K.hide(q),K.onMenuOpen&&K.onMenuOpen(q)})),this.closeChat(),this.updateSentryTags()}close(q){for(let K=this.menus.length-1;K>=0;K--)this.menus[K]===q&&(this.menus.splice(K,1),st.q.instance.game.broadcaster.broadcast(gi.n8.FactoryMenuClosed));this.IsModalMenuOpen()||this.bitmapCacheGameRender(!1),this.updateSentryTags()}menuCloseAll(){if(!this._isClosingMenus){this._isClosingMenus=!0;for(let q=this.menus.length-1;q>=0;q--){const K=this.menus[q];this.isClosable(K)?null==K||K.close():null==K||K.destroy()}this.menus=[],this.bitmapCacheGameRender(!1),this.closeChat(),this._isClosingMenus=!1,this.updateSentryTags()}}menuCloseAllUntil(q=-1){if(!this._isClosingMenus){this._isClosingMenus=!0;for(let K=this.menus.length-1;K>q;K--){const q=this.menus[K];this.isClosable(q)?q.close():q.destroy()}this.IsModalMenuOpen()||this.bitmapCacheGameRender(!1),this._isClosingMenus=!1,this.updateSentryTags()}}menuCloseAllExcept(q){if(!this._isClosingMenus){this._isClosingMenus=!0;for(const K of this.menus)K!==q&&(this.isClosable(K)?K.close():K.destroy());this.IsModalMenuOpen()||this.bitmapCacheGameRender(!1),this._isClosingMenus=!1,this.updateSentryTags()}}menuCloseTopmost(q=1){if(this._isClosingMenus)return;this._isClosingMenus=!0;let K=0;for(let z=this.menus.length-1;z>=0&&K=0;K--){const z=this.menus[K];if(z.visible){if(z instanceof q)return!0;if(z instanceof Ih.y&&z.prefab.findComponentInChildren(q))return!0}}return!1}findMenuByType(q,K=!0){return Z.findLast(this.menus,(z=>z instanceof q&&(!K||z.visible)))}chat(q){if(st.q.instance.prodigy.world.getCurrentZone()===mn.A_.CRYSTALCAVERNS)return X.Aq$.isDefined(q)&&q(),void st.q.instance.prodigy.open.informationDialog(new Sd.Z(this._localizer.getText("BUTTON_OKAY_CAPITAL"),void 0,cd.E.Small,void 0,this._localizer.getText("MESSAGE_TITLE_OOPS"),this._localizer.getText("FEATURE_UNAVAILABLE_HERE")));this.chatMenu=new hu(this.game,this.menuLayer,q),this.chatOpened.dispatch()}closeChat(){var q;null===(q=this.chatMenu)||void 0===q||q.close(),this.chatMenu=null}nameChange(q,K){this.openMenu(new Hl(this.game,this.menuLayer,q,K))}advancedNameChange(q,K){this.openMenu(new Vl(this.game,this.menuLayer,q,K))}firstNameSelector(q,K){this.openMenu(new _c(this.game,this.menuLayer,q,K))}wizardNameSelector(q,K,z){this.openMenu(new hd(this.game,this.menuLayer,q,K,z))}rating(q=null){jt.pF.isNativeApp()?this.openMenu(new mu(this.game,this.menuLayer,q)):X.Aq$.isDefined(q)&&q()}choosePet(q,K){this.openMenu(new cu(this.game,this.menuLayer,q,K))}server(q,K,z){this.openMenu(new Su(this.game,this.menuLayer,q,K,z))}serverSelectMode(q){this.openMenu(new Eu(this.game,this.menuLayer,q))}houseEditorMenu(q,K){const z=new af(this.game,this.menuLayer,q,K);return this.openMenu(z),z}pets(q){var K;const z=st.q.instance.prodigy.breadcrumbManager,Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(fh.I.shouldShowPetGearTutorialCached||bh.N.shouldShowPetMergeTutorial)fh.I.shouldShowPetGearTutorialCached?st.q.instance.game.broadcaster.broadcast(gi.bI.FtueStarted):bh.N.shouldShowPetMergeTutorial&&st.q.instance.game.broadcaster.broadcast(gi.ki.FtueStarted);else{const q=(null===(K=Y.kennel)||void 0===K?void 0:K.getPets().length)>=3,Q=z.isBreadcrumbComplete(En.B.FEATURE_PET_UPGRADE_FTUE,En.B.BREADCRUMB_SEEN_YOUR_TEAM_MENU);q&&!Q&&z.completeBreadcrumb(En.B.FEATURE_PET_UPGRADE_FTUE,En.B.BREADCRUMB_SEEN_YOUR_TEAM_MENU)}if((0,Ft.G)(rh.m)){const K=new qu(this.menuLayer,q);return this.openMenu(K),K}const Q=this.isMenuOpen(zd.o);if(!Q){const K=new zd.o(this.game,this.menuLayer,void 0,q);return this.openMenu(K),K}const X=this.findMenuByType(zd.o);return Q&&X&&q&&(X.closeCallback=q),X}yourTeam(q,K,z){const Y=new Kd.Y(this.game,this.menuLayer,q,K,z);return this.openMenu(Y),Y}yourPet(q,K,z){if(!this.isMenuOpen(qd.O)){const Y=new qd.O(this.game,this.menuLayer,q,K,z);return this.openMenu(Y),Y}return null}petDetailsMenu(q,K){if(this.isMenuOpen(Zu))return null;const z=new Zu(this.menuLayer,K,q);return this.openMenu(z),z}postBattleLossMenu(q,K,z){if(this.isMenuOpen(Gh))return null;const Y=new Gh(this.menuLayer,z,K,q);return this.openMenu(Y),Y}yourPetStandalone(q,K){const z=new zd.o(st.q.instance.prodigy.game,st.q.instance.prodigy.open.menuLayer,(()=>{const Y=st.q.instance.prodigy.open.yourPet(q,z.contentLayer,z.headerPrefab);K&&Y.onLoaded.addOnce((()=>{Y.petDataProvider.updateInjectedValues(K)})),z.headerPrefab.backToYourTeamButton.GameObject.active=!0,z.headerPrefab.backToYourTeamButton.onClick.addOnce((()=>{Y.close(),z.close()}),this)}));return st.q.instance.prodigy.open.menus.push(z),z}yourPetGear(q,K,z,Y){if(!this.isMenuOpen(Wd)){const Q=new Wd(this.game,this.menuLayer,q,K,z,Y);return this.openMenu(Q),Q}return null}petBook(q){const K=new Pd.M(this.game,this.menuLayer,q);return this.openMenu(K),K}petInfo(q,K){if(!this.isMenuOpen(Hd)){const z=new Hd(this.game,this.menuLayer,q,K);return this.openMenu(z),z}return null}parentalLinkSuccessPrompt(q){const K=new Uc(this.game,this.menuLayer,kc.SUCCESS_POPUP_CONFIG,q);return this.openMenu(K),K}parentalLinkAtSchoolPrompt(q,K){this.openMenu(new Uc(this.game,this.menuLayer,kc.AT_SCHOOL_POPUP_CONFIG,q,K))}parentalLoginPopup(){this.openMenu(new Fc(this.game,this.menuLayer))}mailer(q,K,z){const Y=new dd(this.game,this.menuLayer,z);return Y.preprocess(),this.openMenu(Y),Y}networkError(q){const K=this._localizer.getText("NETWORK_ERROR");return this.messageBoxOkay(K,void 0,q)}openMail(q){const K=new Lc(this.game,this.menuLayer);return K.preprocess(q),this.openMenu(K),K}friendRequests(q){this.openMenu(new Bu(this.game,this.menuLayer,q))}itemInfo(q,K,z,Y){const Q=this.prefabMenu(Pi.l.ItemDetailsModal);return Q.onPrefabLoaded.addOnce((Q=>{const X=Q.findComponentInChildren(rf.m);X&&X.setup(q,z,K,Y)})),Q}houseItemInfo(q,K,z){this.openMenu(new bu(this.game,this.menuLayer,q,K,z))}social(){this.openMenu(new Nu(this.game,this.menuLayer))}boostSelect(q,K){this.openMenu(new Xl.i(this.game,this.menuLayer,q,K))}card(q,K,z){{const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=st.q.instance.prodigy.gameContainer.get("20f-5f67"),X=(0,Ft.G)(hh.q).enabled;Q.featureCommon.sendButtonEvent({buttonName:Xh.k.WorldPlayerPortrait,interfaceName:Ah.B.Overworld,interfaceType:Si.Wm.Overworld,destinationName:X?Ah.B.WizardCostumesMenu:Ah.B.PlayerCard,saveClickInfo:Xh.k.WorldPlayerPortrait}),(0,Ft.G)(hh.q).enabled&&q===Y?this.openWizardCostumesMenu(Si.$N.WorldObject,Xh.k.WorldPlayerPortrait):this.openMenu(new su(this.game,this.menuLayer,q,K,z))}}arena(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.openMenu(new lu(this.game,this.menuLayer,q))}membershipSuccess(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("20f-5f67");Y.featureCommon.sendInterfaceEvent({interfaceName:Ah.B.KidsMlpUpgradeComplete,interfaceType:Si.Wm.Popup},z);const Q=this.prefabMenu({prefabID:Pi.l.MembershipSuccess});return Q.onDestroy.addOnce((()=>{Y.featureCommon.sendButtonEvent({buttonName:Xh.k.MembershipUpgradeOkay,interfaceType:Si.Wm.Popup,interfaceName:Ah.B.KidsMlpUpgradeComplete}),null==K||K()})),Q}nicknamer(q,K,z){this.openMenu(new vu(this.game,this.menuLayer,q,K,z))}gotItem(q,K,z,Y,Q,X=!1,Z,J){const tt=new uu.u(this.game,this.menuLayer,q,K,z,Y,Q,X,Z,J);return this.openMenu(tt),tt}reward(q,K){this.openMenu(new Uu(this.game,this.menuLayer,q,K))}gotItemFanfare(q,K,z,Y,Q,Z,J=!1,tt){const et=this.gotItem(q,z,Y,Q,Z,J,tt);return st.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(K).then((q=>{const K=q.findComponent(X.y4o).getRootContainer();K.position.set(et.centerX,et.centerY+50),et.addChildAt(K,et.children.indexOf(et.content)-1)})).catch(X.RQr.createHandler("Unable to load prefab")),et}messageBoxPrefab(q){var K,z,Y,Q;const Z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),J=q.title?Z.getText(q.title,...null!==(K=q.titleArgs)&&void 0!==K?K:[]).toUpperCase():"";return null!==(z=q.buttonState)&&void 0!==z||(q.buttonState=xr.D.OkayButton),st.q.instance.prodigy.open.prefabMenu({prefabID:Pi.l.MessageBox,runUpdate:!0,isModal:null===(Y=q.isModal)||void 0===Y||Y,skipTransparency:!1,injectablePropertiesDictionary:{MESSAGE_BOX_SHOW_BANNER:!!q.title,MESSAGE_BOX_SHOW_CLOSE_BUTTON:null!==(Q=q.showCloseButton)&&void 0!==Q&&Q,MESSAGE_BOX_SHOW_OKAY_BUTTON:q.buttonState===xr.D.OkayButton,MESSAGE_BOX_SHOW_YES_NO_BUTTONS:q.buttonState===xr.D.YesNoButtons,MESSAGE_BOX_BANNER_TEXT_KEY:J,MESSAGE_BOX_CONTENT_TEXT_KEY:q.text,MESSAGE_BOX_CONTENT_TEXT_ARGS:q.textArgs,MESSAGE_BOX_CONFIRM_CALLBACK:q.confirmCallback,MESSAGE_BOX_NO_CALLBACK:q.noCallback,MESSAGE_BOX_CONFIRM_BUTTON_TEXT_KEY:q.confirmButtonTextKey,MESSAGE_BOX_NO_BUTTON_TEXT_KEY:q.noButtonTextKey}})}message(q,K,z,Y,Q,X){const Z=new Nc.p(this.game,this.menuLayer,Q,X);return Z.preprocess(q,z,Y),this.openMenu(Z),Z.queuePostCreateCallback(Z.setOkay.bind(Z,null,K)),Z}classModeMessage(q,K,z,Y,Q,X,Z){if("WORLD_LAMPLIGHT_TOWN"===Z)if(st.q.instance.prodigy.skin.isFestivalActive("Summerfest")){const q=new sc(this.game,this.menuLayer,X),Z=this._localizer.getText("LAMPLIGHT_LOCKED_FESTIVAL");q.preprocess(Z,z,Y,Q),this.openMenu(q),q.queuePostCreateCallback(q.setOkay.bind(q,null,K))}else{this.prefabMenu(Pi.l.LamplightLockedPopup,K,!1).setGameRenderState(!0)}else{const Z=new sc(this.game,this.menuLayer,X);Z.preprocess(q,z,Y,Q),this.openMenu(Z),Z.queuePostCreateCallback(Z.setOkay.bind(Z,null,K))}}classCodeEntryDialogue(){const q=new Yh(this.game,this.menuLayer);return this.openMenu(q),q}lamplightLevelLock(q){st.q.instance.prodigy.open.message(this._localizer.getText("WORLD_MAP_ZONE_LEVEL_LOCKED",iu.X.getLevelRequirement(37)),null,null,this._localizer.getText(q),null,{isModal:!1})}springfestClassModeMessage(q,K,z,Y){const Q=new Wc(this.game,this.menuLayer,Y);Q.preprocess(q,null,z),Q.queuePostCreateCallback(Q.setOkay.bind(Q,null,K)),this.openMenu(Q)}twilightWheelPopup(q){const K=new id(this.game,this.menuLayer,q);return this.openMenu(K),K}messageBox(q,K,z,Y,Q,X,Z){const J=new Nc.p(this.game,this.menuLayer,X,Z);return J.preprocess(q,Y,Q),this.openMenu(J),J.queuePostCreateCallback(J.setConfirm.bind(J,K,z)),J}messageBoxGeneric(q,K,z,Y,Q,X,Z,J){const tt=new Nc.p(this.game,this.menuLayer,Z,J);return tt.preprocess(q,Q,X),this.openMenu(tt),tt.queuePostCreateCallback(tt.setConfirmGeneric.bind(tt,K,z,Y)),tt}messageBoxOkay(q,K,z,Y,Q,Z,J,tt){const et=new Nc.p(this.game,this.menuLayer,Z,J);return et.preprocess(q,Y,Q),this.openMenu(et),et.queuePostCreateCallback(et.setOkay.bind(et,K,null),X.Aq$.isDefined(tt)?()=>{et.okayButton.setInputBlockPriority(tt)}:()=>{}),et.setCloseCallback(z),et}messageBoxError(q,K,z,Y){(z||Y)&&(z?X.RQr.logError(z,null!=Y?Y:""):X.RQr.logError(new Error(Y),"")),this.messageBoxPrefab({text:q,textArgs:K})}titanProgress(q,K="UI_TITAN_SHARDS_INFO"){const z=new Zc(this.game,this.menuLayer,q,K);return z.preprocess(),this.openMenu(z),z}adventureMap(q,K){const z=new fd(this.game,this.menuLayer,q,st.q.instance.prodigy.gameContainer.get("983-05a7"),K);return this.openMenu(z),z}adventureContinueRestart(q){return this.prefabMenu(Pi.l.RestartDungeon,q,!1)}adventureComplete(){return this.prefabMenu(Pi.l.DungeonCompleted,null,!1)}prefabMenu(q,K=of.closeCallback,z=of.runUpdate,Y=of.isModal,Q=of.skipTransparency,X,Z,J=of.sendEvents,tt=of.sendCloseEvent,et,it=of.obeyMenuStackVisibility,st=of.isFullScreenUI){return"string"==typeof q||"number"==typeof q?this.internalPrefabMenu({prefabID:q,closeCallback:K,runUpdate:z,isModal:Y,skipTransparency:Q,injectablePropertiesDictionary:X,interfaceEventProps:Z,sendEvents:J,sendCloseEvent:tt,closeOriginID:et,obeyMenuStackVisibility:it,isFullScreenUI:st}):this.internalPrefabMenu(q)}internalPrefabMenu(q){var K,z,Y,Q;const{prefabID:Z,closeCallback:J,runUpdate:tt,isModal:et,skipTransparency:it,injectablePropertiesDictionary:nt,interfaceEventProps:at,customEventProps:rt,sendEvents:ot,sendCloseEvent:ht,closeOriginID:ct,obeyMenuStackVisibility:dt,isFullScreenUI:lt}=Object.assign(Object.assign({},of),q);this.closeChat();const ut=wn.o.isNumber(Z)?un.T[Z]:Z,ft=new Ih.y(this.game,this.menuLayer,ut,null!=J?J:()=>null,tt,nt,dt);if(ft.isModal=null!=et&&et,ft.isFullScreenUI=null!=lt&<,ft.skipRenderTransparencyLayer=null!=it&&it,ot){const{gameContainer:q}=st.q.instance.prodigy,{featureCommon:Z}=q.get("20f-5f67"),J=null!=at?at:{interfaceName:null!==(K=q.get(X.t5G.PrefabDataProvider).getPrefabItem(ut).name)&&void 0!==K?K:"",interfaceType:Si.Wm.Menu,closeMethod:Si.Lv.CloseButton},tt=Object.assign(Object.assign({prefab_guid:ut},null===(z=null==rt?void 0:rt.all)||void 0===z?void 0:z.opened),null===(Q=null==rt?void 0:rt[null!==(Y=J.originType)&&void 0!==Y?Y:""])||void 0===Q?void 0:Q.opened);if(Z.sendInterfaceEvent(Object.assign(Object.assign({},J),{closeMethod:void 0}),tt),ht){const q=null!=ct?ct:J.originID;ft.onDestroy.addOnce((()=>{var K,z,Y,Q;return Z.sendInterfaceEvent(Object.assign(Object.assign({},J),{originID:q}),Object.assign(Object.assign({prefab_guid:ut},null===(K=null==rt?void 0:rt.all)||void 0===K?void 0:K.closed),null!==(Q=null===(Y=null==rt?void 0:rt[null!==(z=J.originType)&&void 0!==z?z:"any"])||void 0===Y?void 0:Y.closed)&&void 0!==Q?Q:{}))}))}}return this.openMenu(ft),this.onPrefabMenuOpened.dispatch(ut),ft}friendsList(){const q=new Tc(this.game,this.menuLayer);return q.preprocess(),this.openMenu(q),q}membershipParent(q,K,z,Y,Q=!1){var X,Z;let J=Pi.l.MembershipParent,tt=Ah.B.MembershipParentAd;const et={MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_METADATA:null==K?void 0:K.conversionFunnelMetadata,MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_NAME:null==K?void 0:K.conversionFunnelName,MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STAGE:null==K?void 0:K.conversionStage,MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STATIC_OR_VIDEO:null==K?void 0:K.conversionStaticOrVideo,MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FLAVOUR_TEXT:null==q?void 0:q.flavourText,MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FRAME_NAME:null==q?void 0:q.frameName,MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_TRACKING_EVENT:null==q?void 0:q.trackingEvent,MEMBERSHIP_PURCHASE_UPGRADE:z},it=Qt.R.loadData(Yt.r.DynamicParentPromptRuleset_json),st=Zh.H.evaluate(K.conversionFunnelName,it);if(st){const q=st.assets[0],K=Qt.R.loadData(q);J=K.contentTemplateGuid,tt=null!==(Z=null===(X=K.configurableElements.segmentProperties)||void 0===X?void 0:X.interfaceName)&&void 0!==Z?Z:Ah.B.MembershipParentAd,et[dr.Dw.DynamicPromptContentAssetGuid]=q}const nt=this.prefabMenu(J,void 0,void 0,Q,!0,et,{interfaceName:tt,interfaceType:Si.Wm.Modal,originType:Si.$N.ButtonClick,originID:Y,instanceType:Li.N.Interface,closeMethod:Si.Lv.X},!0,!0,Xh.k.X,!0);return nt.createContainer=!1,nt}membershipInfo(q,K={},z,Y=!1,Q={}){const Z=this.unifiedConversionFlow(q,K,z,Q);if(X.Aq$.isDefined(Z))return Z;const J=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return!J.isPlayingAtSchool()||J.hasMembership()&&!Y?(this.battlePassUltimateMemberUpsellModal().then((()=>null==q?void 0:q())).catch(X.RQr.createHandler("Error opening ultra upsell from membershipInfo")),null):this.membershipSchoolAd(q)}rewardCloudMountMenu(q,K=null,z=null,Y=null,Q=null,Z=!1){const J=new Rc.R(this.game,this.menuLayer,q,Q,K,z,!0,Y,Z);return J.preprocess(),X.Aq$.isDefined(Q)&&(J.sourceOverride=Q),this.openMenu(J),J}dynamicPrompt(q,K,z,Y){var Q,X;st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.memberPrompt=!0;const Z=Object.assign({[dr.Dw.DynamicPromptContentAssetGuid]:q},K),J=Qt.R.loadData(q),tt=this.prefabMenu(null==J?void 0:J.contentTemplateGuid,Y,!0,!1,!0,Z,{interfaceName:null===(X=null===(Q=null==J?void 0:J.configurableElements)||void 0===Q?void 0:Q.segmentProperties)||void 0===X?void 0:X.interfaceName,interfaceType:Si.Wm.Modal,originType:z.originType,originID:z.originId,instanceType:Li.N.Interface,closeMethod:Si.Lv.X},!0,!0,Xh.k.X,!0);return tt.createContainer=!1,tt}unifiedConversionFlow(q,K=null,z=null,Y={}){var Q,Z,J,tt,et,it,nt;const at=st.q.instance.prodigy.gameContainer.get("20f-5f67"),rt=Dn.P.evaluateUnifiedConversionFlowRules(K.conversionFunnelName);if(!X.Aq$.isDefined(null==rt?void 0:rt.assets[0]))return null;st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.memberPrompt=!0;const ot=rt.assets[0],ht=Qt.R.loadData(ot),ct=at.purchase.getFunnelID(),dt=Object.assign(Object.assign({[dr.Dw.DynamicPromptContentAssetGuid]:ot,IS_UNIFIED_CONVERSION_PROMPT:!0},null!==(Q=ht.injectableProperties)&&void 0!==Q?Q:{}),Y);let lt,ut;"object"==typeof z?(lt=null==z?void 0:z.id,ut=null==z?void 0:z.type):lt=z;const ft=this.prefabMenu(null==ht?void 0:ht.contentTemplateGuid,q,!0,!1,!0,dt,{interfaceName:null!==(tt=null===(J=null===(Z=null==ht?void 0:ht.configurableElements)||void 0===Z?void 0:Z.segmentProperties)||void 0===J?void 0:J.interfaceName)&&void 0!==tt?tt:Ah.B.MembershipParentAd,interfaceType:Si.Wm.Modal,originID:lt,originType:ut,instanceType:null!==(nt=null===(it=null===(et=null==ht?void 0:ht.configurableElements)||void 0===et?void 0:et.segmentProperties)||void 0===it?void 0:it.instanceType)&&void 0!==nt?nt:Li.N.Interface,closeMethod:Si.Lv.X,custom:{funnel_id:ct}},!0,!0,Xh.k.X,!0);return ft.createContainer=!1,ft}staticMemberAd(q,K,z,Y,Q,X){const Z=this.prefabMenu(q?Pi.l.StaticAdCarousel:Pi.l.StaticAd,X,!0,!0,!0,void 0,{interfaceName:q?Ah.B.MembershipStaticAdCarousel:Ah.B.MembershipStaticAd,interfaceType:Si.Wm.Modal,originType:Si.$N.ButtonClick,originID:z,instanceType:Li.N.Interface,closeMethod:Si.Lv.X},!0,!0,Xh.k.X),J=()=>{Z.prefab.findComponent($h.j).configure(q,K,z,Y,Q)};return Z.prefab?J():Z.onPrefabLoaded.addOnce(J),Z}membershipSchoolAd(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2");if(K.areLoginCredentialsValid()){const z={LoginDetailsUsername:K.loginCredentials.username,LoginDetailsPassword:K.loginCredentials.password};return this.prefabMenu(Pi.l.MembershipSchoolAd,q,!0,!0,!1,z)}const z=new Pc(this.game,this.menuLayer,q);return this.openMenu(z),z}membershipYouTubeAd(q,K,z=null,Y,Q=!1){if(!this.isMenuOpen(Mc.v)){const X=new Mc.v(this.game,this.menuLayer,q,K,z,Y,Q);this.openMenu(X)}}memberAdSuppressionToolTip(q,K=!1,z=!0){z&&st.q.instance.prodigy.load.assets(ht.c.Sfx_pets_button_disabled_state,(()=>{st.q.instance.prodigy.audio.playSFX(67,"button-disabled")}));return q.bodyText=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MEMBERSHIP_SUPPRESSION_BODY"),q.headerText=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MEMBERSHIP_SUPPRESSION_HEADER"),this.overlayToolTip(122,q,K)}overlayToolTip(q,K,z=!1){if(!this.isMenuOpen(Jc)){const Y=new Jc(this.game,this.menuLayer,q,K,z);return this.menus&&this.openMenu(Y),Y}return null}socialFeed(q=null,K){const z=new Vc.g(this.game,this.menuLayer,q,K);return z.preprocess(),this.openMenu(z),z}coOpTeamSelect(q,K){const z=new gd(this.game,this.menuLayer,q,K);return this.openMenu(z),z}PopUpModal(q){const K=new Hc(this.game,this.menuLayer,q);return K.preprocess(),this.openMenu(K),K}coOpModal(q){const K=new vd(this.game,this.menuLayer,q);return this.openMenu(K),K}character(){this.openMenu(new nu(this.game,this.menuLayer))}backpack(){if(this.isMenuOpen(Yl))return null;const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=new Yl(this.game,this.menuLayer,q);return this.openMenu(K),K}pouch(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.openMenu(new gu(this.game,this.menuLayer,Y,q,K,z))}map(q={}){this.closeChat();const K=new Na.i(this.game,this.menuLayer,q);return this.openMenu(K),st.q.instance.game.broadcaster.broadcast(gi.Y1.WorldMapOpened),K}startRegistration(q,K,z=!0,Y=!1){const Q=new Sl(this.game,this.menuLayer,q,z,Y);K&&Q.queuePostCreateCallback(...K),this.openMenu(Q)}registration(q,K,z){const Y=new q(this.game,this.menuLayer,K,z);this.openMenu(Y)}informationDialog(q,K){const z=new Ad(this.game,null!=K?K:this.menuLayer,q);return this.openMenu(z),z}topHeavyInformationDialog(q){const K=new Rd(this.game,this.menuLayer,q);return this.openMenu(K),K}supportPageDialog(q){this.openMenu(new Id(this.game,this.menuLayer,q))}confirmationDialog(q){const K=new wd(this.game,this.menuLayer,q);return this.openMenu(K),K}confirmationDialogWideButtons(q){const K=new Td(this.game,this.menuLayer,q);return this.openMenu(K),K}confirmationDialogNoIconButtons(q){const K=new Cd(this.game,this.menuLayer,q);return this.openMenu(K),K}petsCustomDialog(q){const K=new Od(this.game,this.menuLayer,q);return this.openMenu(K),K}petsLetGoConfirmationDialog(q,K){const z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Y=Ee.t.getItem("pet",q.ID);return this.petsCustomDialog(new Dh.k(z.getText("LET_GO"),K,z.getText("KEEP"),void 0,{atlas:it._.Ui_store_json,name:"icon-large-exclamation"},cd.E.Small,500,z.getText("LET_PET_GO_QUESTION"),z.getText("LET_GO_FOREVER_WARNING",Ph.P8.getPetDisplayName(Y.data,q))))}bannerDialog(q){this.openMenu(new md.L(this.game,this.menuLayer,q))}learnMore(q,K,z,Y=null,Q=null,Z=Ch.E.OverlayLayer){const J=new Sd.Z("BUTTON_OKAY_CAPITAL",Y,cd.E.Medium,600,void 0,z,void 0,void 0,void 0,Pi.l.SubtitleTitleHeader,void 0,Pi.l.LearnMoreBody),tt=st.q.instance.prodigy.open.informationDialog(J,X.wa5.getActiveScene().getLayer(Z));tt.onCreate.addOnce((()=>{null==Q||Q();const z=tt.header.findComponentsInChildren(X.EYj);for(let Y=0;Y{q===ah.Xx.DefeatedPets&&dh.E.recordDefeatedPetsFunnelStep(Qh.l.DynamicStoreLostPetsTab)})),K.onItemSelected.add((q=>{q===ah.Xx.DefeatedPets&&dh.E.recordDefeatedPetsFunnelStep(Qh.l.DynamicStoreLostPetViewed)})),K.onPurchaseFinished.add((q=>{q===ah.Xx.DefeatedPets&&dh.E.recordDefeatedPetsFunnelStep(Qh.l.DynamicStoreLostPetPurchased)}))}))}dynamicStoreModal(q){const K=st.q.instance.prodigy.open.prefabMenu(Pi.l.DynamicStoreModal,void 0,!0,!0,!0,q);this.menus.push(K)}legacyStore(q){const K=new tf(this.game,this.menuLayer,q);this.openMenu(K)}stylistStore(q,K,z,Y){const Q=new tf(this.game,this.menuLayer,20,q,K,z,null,{0:q=>q},null,Y,Si.$N.Door);this.openMenu(Q)}houseStore(q,K,z){const Y=new tf(this.game,this.menuLayer,12,null,q,K,z,{},null);this.openMenu(Y)}resultsMenu(q,K,z,Y,Q=!1,X,Z=!0){const J=xi.c.instance.isPlayerQualified()&&q.filter((q=>q instanceof Ta.R&&xi.c.instance.getEligiblePetIDs().includes(q.data.ID))).length>0?new $c(this.game,this.menuLayer,q,K,z,Y,Q,X,Z):new jc.k(this.game,this.menuLayer,q,K,z,Y,Q,void 0,void 0,X,Z);return this.openMenu(J),J}evolutionSummary(q,K,z){const Y=new qc.K(this.game,this.menuLayer,q,K,z);return this.openMenu(Y),Y}spellSummary(q,K){const z=new Qc(this.game,this.menuLayer,q,K);return this.openMenu(z),z}heartSummary(q,K){const z=new zc(this.game,this.menuLayer,q,K);return this.openMenu(z),z}statSummary(q,K){const z=new Xc.H(this.game,this.menuLayer,q,K);return this.openMenu(z),z}bossRewards(q,K,z=Pi.l.BossRewardUI,Y,Q,X,Z=!1,J=!0,tt={},et){const it=new bd.v(this.game,this.menuLayer,st.q.instance.prodigy.gameContainer.get("983-05a7"),q,z,K,Y,Q,X,Z,J,tt,et);return this.openMenu(it),it}towerEntranceMenu(q,K,z){const Y=new td(this.game,this.menuLayer,q,K,z);return this.openMenu(Y),Y}archiveEntranceMenu(q,K){const z=new ec(this.game,this.menuLayer,q,K);return this.openMenu(z),z}dungeonPrizesMenu(q,K,z){const Y=new oc(this.game,this.menuLayer,q,K,z);return this.openMenu(Y),Y}dungeonExitMenu(q,K,z,Y=!1,Q,X){const Z=new rc(this.game,this.menuLayer,q,K,z,Y,Q,X);return this.openMenu(Z),Z}towerExitMenu(q,K,z,Y){const Q=new ed(this.game,this.menuLayer,q,K,z,Y);return this.openMenu(Q),Q}keystonePedestals(q=null){const K=new Cc(this.game,this.menuLayer,q);return this.openMenu(K),K}learningEfficacySkipPopup(q=null,K=null,z){const Y=new Oc(this.game,this.menuLayer,q,K,z);return this.openMenu(Y),Y}dailyQuestionsMenu(q=null,K=!1,z="click"){const Y=new ac(this.game,this.menuLayer,q,K,z);return this.openMenu(Y),Y}characterDialogue(q,K,z){let Y=this.menuLayer;if(this.game.state.current===Ue.G.CoOp){const q=this.game.state.getCurrentState().battleLayers[Ch.E.MenusLayer];Y="legacyTransform"in q?q.legacyTransform.group:q}const Q=new ic.a(this.game,Y,q,K,z);return this.openMenu(Q),Q}fromFactory(q){this.openMenu(q())}showVideoPopup(q,K){const z=new $l(this.game,this.menuLayer,q,K);return this.openMenu(z),z}optionsMenu(q){const K=this.prefabMenu(Pi.l.OptionsMenu,q,!1,!0,!0,void 0,void 0,!0,!0,Xh.k.X);this.openMenu(K)}locationDialog(q,K,z){const Y=new Dc(this.game,this.menuLayer,q,K,z);return this.openMenu(Y),Y}academyTowerProgress(){return this.prefabMenu(Pi.l.AcademyTowerProgressHUD,null,!1,!1,!0)}parentAttachMenu(q,K,z,Y){let Q;switch(K){case Xh.k.ParentGoalTrackerNotAttached:Q=Pi.l.ParentGoalParentAttachModal;break;default:Q=Pi.l.ParentAttachModal}return this.prefabMenu(Q,q,null,!1,!0,Y,{interfaceName:null!=z?z:Ah.B.ParentAttach,interfaceType:Si.Wm.Modal,originID:K,originType:Si.$N.ButtonClick},!0,!1)}showFullScreenSpinner(){const q=st.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Pi.l.FullScreenSpinner);return st.q.instance.prodigy.gameContainer.get("983-05a7").loadFromJSON(q)}battlePassFtue(){return(0,Q.sH)(this,arguments,void 0,(function*(q=null,K=Si.$N.AutoSurfaced,z){const Y=st.q.instance.prodigy.gameContainer.get("9a2-c1c3"),Q=yield Y.getCurrentBattlePassData(),X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!Q||X.isInBattle)return void(null==q||q());let Z,J;if(z)J=z,Z=z===Ah.B.BattlePassSimpleFtueModal?Pi.l.BattlePassSimpleFtueModalWithoutClose:Pi.l.BattlePassComplexFtueModal;else{Z=st.q.instance.prodigy.gameContainer.get("fa1-8ec9").isBreadcrumbComplete(En.B.FEATURE_BATTLE_PASS,En.B.BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED)?Pi.l.BattlePassSimpleFtueModalWithoutClose:Pi.l.BattlePassComplexFtueModal}st.q.instance.prodigy.open.prefabMenu(Z,void 0,!0,!0,!0,{[dr.XU.CloseCallback]:q},{interfaceName:J,interfaceType:Si.Wm.Modal,originType:K},!0)}))}battlePassMembershipModal(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=st.q.instance.prodigy.gameContainer.get("9a2-c1c3"),z=yield K.getCurrentBattlePassData(),Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;z&&!Y.isInBattle&&st.q.instance.prodigy.open.prefabMenu(Pi.l.BattlePassMembershipModal,void 0,!0,!0,!0,{[dr.XU.ItemTierNumber]:q},{interfaceName:Ah.B.BattlePassMembershipModal,interfaceType:Si.Wm.Modal,originType:Si.$N.ButtonClick,closeMethod:Si.Lv.X},!0)}))}dailyLoginCalendar(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q={interfaceName:"daily_login_calendar_main",interfaceType:Si.Wm.Window,originType:Si.$N.AutoSurfaced,instanceType:Li.N.UI};return st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent(q),new Promise((q=>st.q.instance.prodigy.open.prefabMenu(Pi.l.ScreenDailyLoginCalendar,q)))}))}battlePassUltimateMemberUpsellModal(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=new X.bnh;if(q.isPlayingAtSchool())return this.membershipSchoolAd((()=>K.resolve())),K;const z=q.isInBattle,Y=st.q.instance.prodigy.gameContainer.get("9a2-c1c3"),Q=yield Y.getCurrentBattlePassData();if(q.isInBattle&&!z)return K.resolve(),K;const Z=st.q.instance.prodigy.open.unifiedConversionFlow((()=>K.resolve()),{conversionFunnelName:xn.o.FunnelBattlePassMemberUnlock,conversionStage:xn.o.StageClickLockedItemBattlePass},Si.$N.AutoSurfaced);if(X.Aq$.isDefined(Z))return K;let J;J=Q?jt.pF.eligibleForMembershipPurchaseForMultipleTiers()?Pi.l.BattlePassUltraUpsell:Pi.l.BattlePassMobileUltraUpsell:Pi.l.BattlePassUltraUpsellOffSeason;const tt=st.q.instance.prodigy.open.prefabMenu(J,(()=>K.resolve()),!0,!0,!0,{},{interfaceName:Ah.B.BattlePassUltimateModal,interfaceType:Si.Wm.Modal,originType:Si.$N.ButtonClick,closeMethod:Si.Lv.CloseButton},!0);return tt.isLoaded||(yield tt.onPrefabLoaded.asPromise()),K}))}battlePassMenu(q,K,z,Y,Q,X){st.q.instance.prodigy.notifications.clearNotifications();let Z=Pi.l.BattlePassMenuBar;ch.D.isFeatureEnabled()&&(Z=Pi.l.RewardsFirstBattlePassMenuBar);const J=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return st.q.instance.prodigy.open.prefabMenu(Z,void 0,!0,!0,!0,{[dr.XU.CloseCallback]:()=>{st.q.instance.prodigy.notifications.removeQueuedNotificationOfType([Y||hr._.BATTLEPASSQUESTGOALCOMPLETED]),null==z||z()},[dr.XU.ToasterNotificationId]:Y,[dr.XU.FocusTierOverride]:Q,[dr.XU.FocusTabOverride]:X,[dr.$u.CurrencyID]:27,[dr.$u.CurrencyAmount]:J.getCurrencyAmount(27)},{interfaceName:Ah.B.BattlePassMenu,interfaceType:Si.Wm.Window,originType:K,originID:q,instanceType:Li.N.UI,closeMethod:Si.Lv.X},!0)}lootDashMenu(q){st.q.instance.game.state.start(Ue.G.LootDashMenu,!0,q)}petMergeMenu(q,K,z){if(st.q.instance.prodigy.gameContainer.get("20f-5f67").petMerge.mergeSource=K,this.isMenuOpen(Uh))return this.menus.find((q=>q instanceof Uh));const Y=new Uh(this.menuLayer,z,q);return this.openMenu(Y),Y}petMergeUpsellModal(q,K){return st.q.instance.prodigy.open.prefabMenu(q,void 0,!0,!0,!0,K,{interfaceName:Ah.B.MembershipInfoAd,interfaceType:Si.Wm.Modal,originType:Si.$N.ButtonClick,closeMethod:Si.Lv.CloseButton},!0)}getTopmostConversionPrefabIndex(){let q=-1;for(let K=this.menus.length-1;K>=0;K--)if(this.menus[K]instanceof Ih.y){const z=this.menus[K];if(this._conversionPrefabIds.includes(z.prefabID)){q=K;break}}return q}updateSentryTags(){this.updateSentryTag("menus")}updateSentryTag(q){const K=this[q];if(this[q].length>0){const z=K[K.length-1];let Y=z.constructor.name;"PrefabMenu"===Y&&(Y=`${Y}.${null==z?void 0:z.prefabID}`),sh.setTag(q.substring(0,q.length-1),Y)}else sh.setTag(q.substring(0,q.length-1),void 0)}difficultySelector(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const z=Na.i.DIFFICULTY_MODE,Y=st.q.instance.prodigy.gameContainer.get("11f-118a"),Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,X=(yield Y.meetsRequirements(59))||!0===(null===(K=Q.difficultyUnlocks)||void 0===K?void 0:K.hard),Z={DIFFICULTY_SELECTOR_DATA:[{DIFFICULTY_MODE:vi.i.Regular,SELECTED_STATE:z===vi.i.Regular?jh.Nx.Current:jh.Nx.Select,MAX_LEVEL:mi.s.maxLevelConfig.regular,TITLE_COLOR:z===vi.i.Regular?jh.TQ.RegularSelected:jh.TQ.Unselected},{DIFFICULTY_MODE:vi.i.Hard,SELECTED_STATE:z===vi.i.Hard?jh.Nx.Current:X?jh.Nx.Select:jh.Nx.Unlock,MAX_LEVEL:mi.s.maxLevelConfig.hard,TITLE_COLOR:z===vi.i.Hard?jh.TQ.HardSelected:jh.TQ.Unselected},{DIFFICULTY_MODE:vi.i.Expert,SELECTED_STATE:jh.Nx.ComingSoon,MAX_LEVEL:mi.s.maxLevelConfig.expert,TITLE_COLOR:z===vi.i.Expert?jh.TQ.ExpertSelected:jh.TQ.Unselected}]};st.q.instance.prodigy.open.prefabMenu(Pi.l.DifficultySelectorScreen,q,!0,!1,!1,Z)}))}difficultySelectorConfirmationModal(q,K){let z;const Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);switch(q){case vi.i.Regular:z={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:Y.getText(jh.fs.RegularHeaderText),DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:Y.getText(jh.fs.RegularBodyText)};break;case vi.i.Hard:z={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:Y.getText(jh.fs.HardHeaderText),DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:Y.getText(jh.fs.HardBodyText)};break;case vi.i.Expert:z={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:Y.getText(jh.fs.ExpertHeaderText),DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:Y.getText(jh.fs.ExpertBodyText)}}const Q=st.q.instance.prodigy.gameContainer.get("66f-d9d3");st.q.instance.prodigy.open.prefabMenu(Pi.l.DifficultySelectorConfirmationModal,void 0,!0,!1,!1,Object.assign(Object.assign({},z),{DIFFICULTY_MODE:q,OVERRIDE_CALLBACK:!!K,ON_CONFIRM_CALLBACK:K,UNLOCK_HARD_MODE_CALLBACK:Q.unlockDifficultyMode.bind(Q,vi.i.Hard),UNLOCK_EXPERT_MODE_CALLBACK:Q.unlockDifficultyMode.bind(Q,vi.i.Expert)}))}difficultyUnavailableConfirmationModal(q,K){const z=this._localizer.getText(jh.fs.ZoneUnavailableForDifficultyText,q.getName()),Y={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:jh.fs.RegularHeaderText,DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:z};st.q.instance.prodigy.open.prefabMenu(Pi.l.DifficultySelectorConfirmationModal,void 0,!0,!1,!1,Object.assign(Object.assign({},Y),{DIFFICULTY_UNAVAILABLE:!0,CONFIRM_GO_TO_CALLBACK:K}))}postBattleMembershipVideoMenu(q,K,z,Y,Q){const Z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2");if(Y&&(!Z.loginCredentials.username||!Z.loginCredentials.password)){const q=new Error(`[Post-Battle School Video] Failed to get player login details for username: ${Z.loginCredentials.username}.`);sh.captureException(q),X.RQr.logError(q,"Cannot display login details")}st.q.instance.prodigy.open.prefabMenu(Pi.l.PostBattleMembershipVideoMenu,Q,!0,!1,!1,{[dr.Ut.VideoId]:q,[dr.Ut.VideoAtSchool]:Y,[dr.Ut.SupportedResolutionIds]:null==K?void 0:K.supportedResolutionIds,[dr.Ut.SizeRatio]:null==z?void 0:z.sizeRatio,[dr.Ut.VideoInstanceType]:Y?Li.N.PlayAtHomeVideo:Li.N.MembershipVideo,[dr.V8.LoginDetailsUsername]:Z.loginCredentials.username,[dr.V8.LoginDetailsPassword]:Z.loginCredentials.password})}genericVideoMenu(q){const K=Object.assign(Object.assign({},ef.h.advanceToNextVideoAndGetInjectionData(q)),q.customInjectionMetadata);K?q.videoMenuGuid?st.q.instance.prodigy.open.prefabMenu({prefabID:q.videoMenuGuid,closeCallback:q.onClose,isModal:!1,injectablePropertiesDictionary:K}):X.VyI.log("[MenuFactory][genericVideoMenu] Cannot open generic video menu with no menu GUID provided.",X.$bb.Error):X.VyI.log(`[MenuFactory][genericVideoMenu] Failed to initialize video injection values for video menu with GUID ${q.videoMenuGuid}. Menu will not be opened.`,X.$bb.Error)}openWizardBank(q,K){var z;const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;st.q.instance.prodigy.open.prefabMenu({prefabID:Pi.l.WizardBankMenuModal,closeCallback:K,sendEvents:!0,sendCloseEvent:!1,interfaceEventProps:{interfaceName:Ah.B.WizardBank,interfaceType:Si.Wm.Window,instanceType:Li.N.UI,originType:q.originType,originID:q.originId},customEventProps:{all:{opened:{instance_id:vn.$.generateUID(),instance_version:null!==(z=Hh.E.get(Y.getMemberTier()))&&void 0!==z?z:oh.D.NonMember}}},injectablePropertiesDictionary:{WIZARD_BANK_ORIGIN_TYPE:q.originType}})}openMemberLockedGoldRiftModal(){const q=st.q.instance.prodigy.open.prefabMenu({prefabID:Pi.l.MemberLockedGoldRiftModal,sendEvents:!0,sendCloseEvent:!1,interfaceEventProps:{interfaceName:Ah.B.EnterGoldRiftModal,interfaceType:Si.Wm.Modal,instanceType:Li.N.RiftRun,originType:Si.$N.AutoSurfaced}});this.menus.push(q)}openWizardCostumesMenu(q=Si.$N.ButtonClick,K){if(this.isMenuOpen(Vh.r))return;if(Wh.hD.ftuePopupLoading)return;if(!Wh.hD.isFtueFlowActive()&&Wh.hD.shouldShowFtue())return void this.openWizardCostumesFtuePopup(q,K);const z=st.q.instance.prodigy.open.prefabMenu({prefabID:Pi.l.WizardCostumesMenu,sendEvents:!0,sendCloseEvent:!1,interfaceEventProps:{interfaceName:Ah.B.WizardCostumesMenu,interfaceType:Si.Wm.Menu,instanceType:Li.N.Interface,originType:q,originID:K}});this.menus.push(z)}openWizardCostumesFtuePopup(q=Si.$N.ButtonClick,K){if(Wh.hD.ftuePopupLoading)return;const z=st.q.instance.prodigy.gameContainer.get("230-ffdb").getCostumesToDisplayForFtuePopup();z.length<=1?X.VyI.log("[MenuFactory][openWizardCostumesFtuePopup] Cannot set up wizard costumes FTUE popup with 1 or fewer costumes to display.",X.$bb.Error):(Wh.hD.ftuePopupLoading=!0,Wh.hD.initFtue(),Promise.all(z.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return Ee.t.secureGetItem("costume",q)}))))).then((z=>{var Y;z.forEach((q=>{if(!q)throw new Error("A costume in wizard costumes FTUE popup cannot be null")}));const Q=null!==(Y=z.find((q=>{var K;return null===(K=null==q?void 0:q.data)||void 0===K?void 0:K.member})))&&void 0!==Y?Y:z[0];if(!Q)throw new Error("Main featured costume in wizard costumes FTUE popup cannot be null");const X=z.filter((q=>!!(null==q?void 0:q.ID)&&(null==q?void 0:q.ID)!==(null==Q?void 0:Q.ID))).map((q=>({[dr.AP.ItemCardData]:{item:q,quantity:1},[dr.AP.ItemCardIsNew]:!0}))),Z=st.q.instance.prodigy.open.prefabMenu({prefabID:Pi.l.WizardCostumesFTUEPopup,injectablePropertiesDictionary:{[dr.sv.FtueMainCostumeId]:null==Q?void 0:Q.ID,[dr.sv.FtueMainCostumeName]:Nn.J.getItemName(Q),[dr.sv.FtueAdditionalCostumes]:X,[dr.sv.FtuePopupNextButtonCallback]:()=>this.openWizardCostumesMenu(q,K)}});this.menus.push(Z),Wh.hD.ftuePopupLoading=!1})).catch((q=>{Wh.hD.ftuePopupLoading=!1,X.RQr.logError(q,"MenuFactory.openWizardCostumesMenu: Failed to load costume items for FTUE popup")})))}isClosable(q){return X.Aq$.isDefined(q)&&"function"==typeof q.close}}var cf,df=z(35997),lf=z(2212);!function(q){q.PIPPET_ENCOUNTER="state_pippet_encounter",q.PIPPET_REMATCH="state_pippet_rematch",q.PIPPET_DEFEATED="state_pippet_defeated"}(cf||(cf={}));class uf extends X.s3P{static get arePippetQuestEncountersEnabled(){return this._featureProvider.isOn("pippet-quest-encounters")}}(0,Q.Cg)([(0,Ge.b)("9fe-5b45"),(0,Q.Sn)("design:type",Object)],uf,"_featureProvider",void 0);class ff{constructor(q,K){this.canEvolve=!1,this.updateMainCreatureInformation(q,K)}updateMainCreatureInformation(q,K){var z,Y,Q,X,Z,J,tt;const et=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,it=K.totalNonMemberXp+(et.hasMembership()?K.memberXp:0),nt=q.getLevel(),at=mi.s.activePlayerLevelCap,rt=Gc.e.levelFromStars(q.getStars()+it,q.creatureType,at);this.creature=q,this.originalCreature=q.createDataClone();const ot=q.getBattleAssetSpecifier(),ht=Ee.t.getItem(ot.type,ot.id),dt=Object.assign(Object.assign({},q.data),{stats:null===(z=null==ht?void 0:ht.data)||void 0===z?void 0:z.stats,statGrowth:null===(Y=null==ht?void 0:ht.data)||void 0===Y?void 0:Y.statGrowth});if(q.creatureType===Do.V.Player&&et.getChargedLevel()>0){const q=(null!==(Q=et.data.chargedLevelData.newLevelData.levelsGained[0].level)&&void 0!==Q?Q:0)+nt,K=et.getChargedLevel()+rt;this.statIncreases=Gc.e.getStatIncreasesFromLevelUps(dt,q,K)}else this.statIncreases=Gc.e.getStatIncreasesFromLevelUps(dt,nt,rt);const lt=q.diffAvailableSpellsV2(rt);this.unlockedSpellsDisplayInformation=lt.map((q=>Yc.x.getUnlockedSpellDisplayInformation(q)));let ut=q.currentMaxLevel;if(q instanceof Ta.R){const K=null===(Z=null===(X=null==ht?void 0:ht.metadata)||void 0===X?void 0:X.assets)||void 0===Z?void 0:Z.default;this.spineGuid=(null==K?void 0:K.assetKey)?ct.Q[K.assetKey]:`spine-${null==K?void 0:K.ID}`;const z=q.createDataClone();z.data.level=rt;const Y=rt>=Ph.P8.getMaxOwnableLevel(q.getID(),q.data.mergeRank);if(Ph.P8.canPetEvolve(z,rt)&&Y){const q=Ph.P8.findNextEvolution(ht),K=null===(tt=null===(J=null==q?void 0:q.metadata)||void 0===J?void 0:J.assets)||void 0===tt?void 0:tt.default;this.canEvolve=!0,this.evolvedSpineGuid=(null==K?void 0:K.assetKey)?ct.Q[K.assetKey]:`spine-${null==K?void 0:K.ID}`}ut=Ph.P8.getMaxOwnableLevel(q.getID(),q.data.mergeRank)}this.creatureXpBarInformation=new Qu.r(q.getStars(),q.creatureType,K,Math.max(ut,nt))}}var bf=z(50508),pf=z(98998);class vf{constructor(q){var K,z,Y,Q;const{creatures:X,barFillSpeed:Z,battleRewards:J,nootTipBattleInfo:tt,battleType:et}=q;this.rewards=null!==(K=J.rewards)&&void 0!==K?K:[],this.memberRewards=null!==(z=J.memberRewards)&&void 0!==z?z:[],this.xpGained=J.xpGained,this.creatures=X,this.barFillSpeed=Z,this.battleType=et,this.rescuablePets=null!==(Y=J.rescuablePets)&&void 0!==Y?Y:[],this.nootTipBattleInfo=tt,this.magicoinRewardGranted=null!==(Q=J.magicoinRewardGranted)&&void 0!==Q&&Q,this.magicoinRewardGranted&&(this.rewards=this.rewards.filter((q=>"currency"===q.type&&27===q.ID)),this.memberRewards=this.memberRewards.filter((q=>"currency"===q.type&&27===q.ID))),this.combineCoinRewards(),this._player=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,this._pbfSegment=st.q.instance.prodigy.gameContainer.get("20f-5f67").postBattleFlow,this._starController=new pf.b,this.savePostBattleFlowInformation(this.magicoinRewardGranted)}getBattleId(){var q;return null===(q=this._pbfSegment)||void 0===q?void 0:q.getBattleId()}combineCoinRewards(){var q;const K={N:0,type:"gold"},z=[];for(const Y of this.rewards)if("gold"===(null==Y?void 0:Y.type)){const z=Y;(null==z?void 0:z.N)&&(K.N+=null!==(q=null==z?void 0:z.N)&&void 0!==q?q:0)}else z.push(Y);K.N>0&&(z.push(K),this.rewards=z)}savePostBattleFlowInformation(q){this.awardXp(this.xpGained),q||(this.addNonMemberRewardsToInventory(),this._player.hasMembership()&&this.addMemberRewardsToInventory()),this.saveCharacterData(),this.updateSecureRewards().catch(X.RQr.createHandler("Failed to update client with secure rewards"))}updateSecureRewards(){return(0,Q.sH)(this,void 0,void 0,(function*(){(this._player.hasMembership()?this.rewards.concat(this.memberRewards):this.rewards).filter((q=>q.isSecure)).some((q=>bf.p.includes(q.type)))&&(yield st.q.instance.prodigy.gameContainer.get("9cf-c09f").refreshPetGear()),this._pbfSegment.flushSecureRewards()}))}saveMemberStarsToJar(){this.applyMemberStarsToJar(this.xpGained,this.creatures.length),this.saveCharacterData()}saveCharacterData(){this._player.forceSaveCharacter()}awardXp(q){const K=q.totalNonMemberXp+(this._player.hasMembership()?q.memberXp:0);let z=0;for(const Y of this.creatures){let q=mi.s.activePlayerLevelCap;Y.creature instanceof Ta.R&&(q=Ph.P8.getMaxOwnableLevel(Y.creature.getID(),Y.creature.data.mergeRank),Y.creature.currentMaxLevel=q),Y.originalCreature=Y.creature.createDataClone(),Y.creature.addStars(K);const Q=st.q.instance.prodigy.gameContainer.get("20f-5f67");Q.playerProgression.sendPlayerProgressionPointsEarnedEvent({pointType:"stars",pointCount:Math.min(K,Y.creature.getStarsToMaxLevel()),progressionType:Y.creature.creatureType===Do.V.Player?"Player Stars":"Pet Level",creatureName:Y.creature.creatureType},{instanceID:Q.postBattleFlow.getBattleId(),instanceType:Li.N.EndOfBattle}),Y.creature.getLevel()new ff(q,Q.xpGained)));st.q.instance.prodigy.gameContainer.get("20f-5f67").postBattleFlow.init();const tt=new vf({creatures:J,barFillSpeed:vf.DEFAULT_BAR_FILL_SPEED,battleRewards:Q,nootTipBattleInfo:Z,battleType:Y}),et={},it=tt.creatures[0].creatureXpBarInformation;return et[dr.uo.PostBattleFlowData]=tt,et[dr.uo.PostBattleFlowVictory]=z,et[dr.uo.PostBattleFlowBattleType]=Y,et[dr.uo.PostBattleFlowWizardWillLevelUp]=it.levels.length>1,et[dr.uo.PostBattleFlowWizardEndLevel]=it.levels[it.levels.length-1],et[dr.uo.PostBattleFlowRewardsScalingInfo]=Q.rewardsScalingInfo,lf.J.shouldShowHardModePbfBannerWarning()?et[dr.uo.PostBattleFlowXpWarningLocalizedTextId]="CAMPAIGN_REPLAY_PBF_LEVEL_100_WARNING":mf.R.shouldShowRewardsScalingWarning(Q.rewardsScalingInfo)&&(et[dr.uo.PostBattleFlowXpWarningLocalizedTextId]="POST_BATTLE_FLOW_REWARDS_SCALED"),cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this.prefabLoader,Pi.l.PostBattleFlowBase,et).then((q=>{X.wa5.getActiveScene().addGameObject(q.parent)})).catch(X.RQr.createHandler("Error loading Post Battle Flow Base prefab."))}addPrefabNPC(q,K,z,Y,Z){return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z,Y,Q,Z={}){return cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this.prefabLoader,q,Z).then((q=>{var Z;if(q.transform.setPosition(K,z),Y){const K=q.findComponentInChildren(X.v2j);K&&(K.GameObject.transform.localScale.x*=-1)}if(Q){const K=q.findComponent(Rr.B).getRootContainer();K.alpha=0,null===(Z=this.game.add.tween(K,this))||void 0===Z||Z.to({alpha:1},800,X.GS3.Quadratic.In,!0)}}))}))}addWizard(q,K,z,Y,Z,J){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer;return Q.playerPrefab||(yield new Promise((q=>Q.onFullyLoaded.add(q)))),cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.LegacyMapWizardEncounter,{EncounterMap:q,EncounterSpawnId:Y,EncounterAssetId:Z,EncounterScale:J?[-1,1]:[1,1],EncounterSpawnPosition:new X.I9Y(K,z)}).then((q=>{q.transform.setPosition(K,z),q.findComponent(X.y4o).getRootContainer().position.set(K,z),q.findComponentInChildren(yf.I).MoveTarget=new X.I9Y(K,z)}))}))}addMonster(q,K,z,Y,Z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer;return Q.playerPrefab||(yield new Promise((q=>Q.OnLoad.add(q)))),cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.LegacyMapSpawnPoint,{EncounterMap:q,EncounterSpawnId:Y,EncounterSpawnPosition:new X.I9Y(K,z),EncounterOverrideMods:Z}).then((q=>{var Y;null===(Y=q.findComponentInChildren(_f.d))||void 0===Y||Y.GameObject.setLayer(void 0,!0),q.transform.setPosition(K,z),q.findComponent(X.y4o).getRootContainer().position.set(K,z),q.findComponentInChildren(yf.I).MoveTarget=new X.I9Y(K,z)}))}))}loadPippetQuestEncounterData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.assetLoader.loadAssets([q]);return st.q.instance.game.cache.getJSON(q).pippetQuestEncounter}))}createPippetQuestEncounter(q,K,z,Y,Z){return(0,Q.sH)(this,void 0,void 0,(function*(){var Q,J,tt,et;const it=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,nt=q.getMap(st.q.instance.prodigy.world.getCurrentMapTag()),at=yield this.loadPippetQuestEncounterData(z),rt=X.wa5.getActiveScene().container.get("IS_PREFAB_MAP");return rt||(null===(Q=it.playerContainer)||void 0===Q?void 0:Q.playerPrefab)||(yield null===(J=it.playerContainer)||void 0===J?void 0:J.OnLoad.asPromise()),cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.PippetQuestEncounterCutscene,{EncounterBattleMods:Object.assign({level:it.getLevel(),onEnd:nt.zoneName,screen:nt.battleBG,onFaint:nt.zone.defaultOnFaint},at),FsmId:K,BenchPet1:Ph.P8.getPetSpineId(null===(tt=null==at?void 0:at.pets[0])||void 0===tt?void 0:tt.ID),BenchPet2:Ph.P8.getPetSpineId(null===(et=null==at?void 0:at.pets[1])||void 0===et?void 0:et.ID),ForceLegacyPathfinding:!rt}).then((K=>{var z,Q,J,tt,et;const nt=K.findComponentInChildren(Af.u),at=K.findComponentInChildren(df.k),ot=q.bgmID;q.getState(cf.PIPPET_ENCOUNTER)||(q.bgmID=12),nt.onComplete.addOnce((()=>{q.getState(cf.PIPPET_ENCOUNTER)?q.getState(cf.PIPPET_REMATCH)&&(q.setState(cf.PIPPET_DEFEATED,!0),null==Z||Z()):(q.setState(cf.PIPPET_ENCOUNTER,!0),at.startBattle())})),nt.onStart.addOnce((()=>{q.getState(cf.PIPPET_REMATCH)&&(null==Y||Y())}));const ht=null!==(Q=null===(z=st.q.instance.prodigy.world.getCurrentMapObject())||void 0===z?void 0:z.getDefaultSpawnPosition())&&void 0!==Q?Q:{x:gf.R.BG_HALF_WIDTH,y:gf.R.BG_HALF_HEIGHT};let ct;const dt=rt?null===(tt=null===(J=X.wa5.getActiveScene().container.get("MainPlayerGameObject"))||void 0===J?void 0:J.transform)||void 0===tt?void 0:tt.worldPosition:null===(et=it.playerContainer)||void 0===et?void 0:et.position;at.onBattleStart.addOnce((()=>{ct=null!=dt?dt:ht})),at.onVictory.addOnce((()=>{q.setState(cf.PIPPET_REMATCH,!0),q.bgmID=ot,st.q.instance.prodigy.world.it(st.q.instance.prodigy.world.getCurrentMap(),ct.x,ct.y)})),at.onDefeat.addOnce((()=>{st.q.instance.prodigy.world.teleportToCurrentMap(),q.bgmID=ot})),nt.fsmVariables.zone=q.ID,nt.run()})).catch(X.RQr.createHandler("Could not load Pippet Quest Encounter cutscene"))}))}createItemCard(q,K,z,Y,X,Z){return(0,Q.sH)(this,void 0,void 0,(function*(){return cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.ItemCard,{[dr.Tl.Data]:Object.assign(Object.assign({},Y),{receivedThroughGotItemFlow:X===Wr.s.GotItem})}).then((Y=>{if(q.destroyed)return Y.destroy(),Y;Y.findComponent(Rr.B).getRootContainer().setParent(q);const Q=Y.transform;if(Q){const Y=Q.sizeDelta.getHalfWidth(),X=Q.sizeDelta.getHalfHeight();Q.setAnchoredPivotOffset(q.getGlobalPosition().x+Y+K,q.getGlobalPosition().y+X+z)}if(Z){Y.findComponentInChildren(Kl.n).onClicked.add(Z,this)}return Y}))}))}createIFrame(q,K){return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z=Pi.l.IFrameModal){return(yield cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),z,{[dr.n7.IFrameSource]:q,[dr.n7.IFrameClosePostMessage]:K})).findComponent(Ef.w)}))}createTooltip(q,K,z){var Y,Q,Z;q.IsActiveInHierarchy||X.VyI.log("PrefabFactory: Tooltip will not display because it was attached to an inactive transform.",X.$bb.Warning);const J=Object.assign(Object.assign({},wf.f),z),tt=st.q.instance.prodigy.gameContainer.get("983-05a7").loadFromGUID(Pi.l.SpawnableTooltip_RectTransform,q.GameObject);J.layer&&tt.setLayer(J.layer,!0);const et=tt.findComponentInChildren(Sf);if(et.setArrowAnchor(J.arrowAnchor,J.tooltipAnchor,J.arrowDirection),et.setLocalizationText(K,J.titleKey,J.textArgs,J.titleArgs),et.setupButtons(null===(Y=J.useCloseButton)||void 0===Y||Y,null!==(Q=J.useGoButton)&&void 0!==Q&&Q,J.goButtonCTA),J.offset&&et.setOffset(J.offset),J.iconGUID&&et.setIcon(J.iconGUID,J.useIconText),J.resizeToContainer&&q instanceof X.XVE){const K=q.sizeDelta;et.setSize(K.width,K.height)}return this._tooltips.push(et),et.OnDestroy.add((()=>this._tooltips.splice(this._tooltips.indexOf(et),1)),this),null===(Z=q.GameObject)||void 0===Z||Z.addChild(tt),tt}tooltipsActive(){return this._tooltips.length>0}closeAllTooltips(){this._tooltips.forEach((q=>{q.GameObject.destroyDeferred()}))}}var Of=z(20705);class If{get sentrySpan(){return this._sentrySpan}constructor(q,K){this._sentrySpan=null,this.onFinish=new X.HN0,this._parent=q,this._config=K,this._pageBackgroundTime={totalPageTimeMs:0,activeTrackedPageTimeMs:void 0},this._pageForegroundTime={totalPageTimeMs:0,activeTrackedPageTimeMs:void 0}}init(){return this._config?this._sentrySpan?(X.VyI.log("Unable to initialize SentryGameTrace because we have initialized already",X.$bb.Error),!1):(this._sentrySpan=sh.startSpanManual(this.createSpanOptions(),(q=>q)),this._parent&&this._parent.onFinish.addOnce(this.finish,this),!0):(X.VyI.log("Unable to initialize SentryGameTrace because the config is null",X.$bb.Error),!1)}isActive(){return!!this._sentrySpan&&this._sentrySpan.isRecording()}finish(){var q;this._sentrySpan&&(this.assignTimeTrackerDataToSpan(this._pageBackgroundTime,"out_of_window_page_time"),this.assignTimeTrackerDataToSpan(this._pageForegroundTime,"in_window_page_time"),this._sentrySpan.end()),this._sentrySpan=null,null===(q=this._parent)||void 0===q||q.onFinish.removeAll(this),this._parent=null,this.onFinish.dispatch(),this.onFinish.dispose()}setExtraData(q){var K;null===(K=this._sentrySpan)||void 0===K||K.setAttributes(q)}onGameHidden(){this.startTimeTrack(this._pageBackgroundTime),this.endTimeTrack(this._pageForegroundTime)}onGameVisible(){this.startTimeTrack(this._pageForegroundTime),this.endTimeTrack(this._pageBackgroundTime)}startTimeTrack(q){q.activeTrackedPageTimeMs||(q.activeTrackedPageTimeMs=window.performance.now())}endTimeTrack(q){if(!q.activeTrackedPageTimeMs)return;const K=window.performance.now()-q.activeTrackedPageTimeMs;q.totalPageTimeMs+=K,q.activeTrackedPageTimeMs=void 0}assignTimeTrackerDataToSpan(q,K){this.endTimeTrack(q);let z=q.totalPageTimeMs,Y="ms";q.totalPageTimeMs>36e5?(z=q.totalPageTimeMs/36e5,Y="hrs"):q.totalPageTimeMs>6e4?(z=q.totalPageTimeMs/6e4,Y="mins"):q.totalPageTimeMs>1e3&&(z=q.totalPageTimeMs/1e3,Y="s"),this._sentrySpan.setAttribute(K,`${z.toFixed(3)} ${Y}`),this._sentrySpan.setAttribute(`${K}_in_ms`,q.totalPageTimeMs)}}class Df extends If{createSpanOptions(){var q;return{op:this._config.operationName,name:this._config.description,parentSpan:null===(q=this._parent)||void 0===q?void 0:q.sentrySpan}}}class Rf extends If{createSpanOptions(){return{op:this._config.operationName,name:this._config.description,forceTransaction:!0}}}class Pf extends Df{constructor(){super(...arguments),this._spanList=new Map}startAssetTrace(q){if(this._spanList.get(q))return;const K={op:`${this._config.operationName}.${Tu.u.SingleAssetLoading}`,name:q,parentSpan:this._sentrySpan,attributes:{guid:q}},z=sh.startSpanManual(K,(q=>q));this._spanList.set(q,z)}endAssetTrace(q,K){const z=this._spanList.get(q);z&&(K&&z.setAttributes(K),z.end(),this._spanList.delete(q))}finish(){for(const q of this._spanList.values())q.isRecording()&&q.setAttribute("failure",!0),q.end();this._spanList.clear(),super.finish()}isActive(){if(super.isActive())return!0;for(const q of this._spanList.values())if(q.isRecording())return!0;return!1}}class Mf extends Rf{init(){if(this._config.activeTags){const q=sh.getGlobalScope(),K=q.getScopeData(),z=this._config.activeTags;this._previousTags={};for(const Y in z)this._previousTags[Y]=null==K?void 0:K.tags[Y];q.setTags(z)}return super.init()}finish(){super.finish();const q=sh.getGlobalScope();this._previousTags&&q.setTags(this._previousTags),this._config.endingTags&&q.setTags(this._config.endingTags)}}class Nf{constructor(q){this._database=new Map,this._manager=q,this.init()}createTrace(q){var K;const z=this._database.get(q);if(!z)return X.VyI.log(`Unable to create sentry tracing object because the key ${q} does not have a configuration`,X.$bb.Error),null;const Y=this._manager.retrieveSpan(z.parent);return this.createInternal(null!==(K=z.objectType)&&void 0!==K?K:Df,Y,z)}createInternal(q,K,z){return new q(K,z)}init(){const q=[{objectType:Rf,operationName:Tu.u.Boot,description:"Game Boot Process"},{operationName:Tu.u.BootFeatureFlags,description:"Loading feature flags",parent:Tu.u.Boot},{operationName:Tu.u.BootGameData,description:"Loading game data",parent:Tu.u.Boot},{operationName:Tu.u.BootFeatureRevision,description:"Loading feature revisions",parent:Tu.u.Boot},{operationName:Tu.u.BootAssets,description:"Loading assets",parent:Tu.u.Boot},{operationName:Tu.u.BootLocalization,description:"Loading localization data",parent:Tu.u.Boot},{operationName:Tu.u.BootRebuildGUID,description:"Restructuring the GUID",parent:Tu.u.Boot},{operationName:Tu.u.BootStartNextState,description:"Getting data ready for the next state",parent:Tu.u.Boot},{operationName:Tu.u.Splash,objectType:Rf,description:"Game Splash Screen Process"},{operationName:Tu.u.SplashCreate,description:"On the splash state create",parent:Tu.u.Splash},{operationName:Tu.u.SplashLoadGame,description:"Loading user info and game data",parent:Tu.u.Splash},{operationName:Tu.u.SplashLoadQI,description:"Loading QI",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashLoadQIEducationStatus,description:"Fetching education status",parent:Tu.u.SplashLoadQI},{operationName:Tu.u.SplashLoadQILoadQuestion,description:"Loading the question renderer",parent:Tu.u.SplashLoadQI},{operationName:Tu.u.SplashLoadQILoadQuestionInterface,description:"Loading question interface",parent:Tu.u.SplashLoadQI},{operationName:Tu.u.SplashTitans,description:"Getting the Titans",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashLogin,description:"User Login",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashIapInit,description:"Initializing IAP",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashUpdateFeatureAccess,description:"Updating Feature Access",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashCharacter,description:"Loading Character Data",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashFetchEndGameQuestData,description:"Fetching End Game Quest Data",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashInitFeatureProvider,description:"Initialize Feature Provider",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashSetupFeatureProvider,description:"Setting Up Feature Provider",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashEducation,description:"Loading Education Data",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashParentalConsentService,description:"Initializing parental consent service",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashSegment,description:"Initializing Segment Analytics",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashWorldList,description:"Loading World List",parent:Tu.u.SplashLoadGame},{operationName:Tu.u.SplashRegistrationMenu,description:"Entering registration menu",parent:Tu.u.Splash},{operationName:Tu.u.SplashPlayerEducationInit,description:"Initialize player's education data",parent:Tu.u.Splash},{operationName:Tu.u.SplashPrefabRequest,description:"Requesting Prefabs",parent:Tu.u.Splash},{operationName:Tu.u.PrefabLoaderScene,objectType:Rf,description:"Prefab scene initialization"},{operationName:Tu.u.PrefabLoaderSceneAssetPreload,description:"Preloading Assets for Prefabs",parent:Tu.u.PrefabLoaderScene},{operationName:Tu.u.PrefabLoaderScenePrefabLoading,objectType:Pf,description:"Loading Prefab Objects",parent:Tu.u.PrefabLoaderScene},{operationName:Tu.u.PrefabLoaderSceneConsentBanner,description:"Initializing Consent Banner",parent:Tu.u.PrefabLoaderScene},{operationName:Tu.u.ServerMenuSelection,objectType:Rf,description:"World Selection Process"},{operationName:Tu.u.ServerMenuConnect,description:"Connecting to Server",parent:Tu.u.ServerMenuSelection},{operationName:Tu.u.ServerMenuShowAllServers,description:"Loading All Servers",parent:Tu.u.ServerMenuSelection},{operationName:Tu.u.ServerMenuSuggestedServers,description:"Loading Suggested Servers",parent:Tu.u.ServerMenuSelection},{operationName:Tu.u.World,objectType:Mf,description:"Enter world",activeTags:{state:"loading"},endingTags:{state:"ingame"}},{operationName:Tu.u.WorldRemotePlayerSpawnLimiterInit,description:"Init remote player spawn limiter",parent:Tu.u.World},{operationName:Tu.u.WorldSynapseMultiplayerServiceConnection,description:"Connecting to a multiplayer service",parent:Tu.u.World},{operationName:Tu.u.WorldNetworkHandlerEnterWorld,description:"Connecting to a world server",parent:Tu.u.World},{operationName:Tu.u.WorldInitProgressDataManager,description:"Progress data manager init",parent:Tu.u.World},{operationName:Tu.u.WorldSynchedRiftDataInit,description:"Synched rift data init",parent:Tu.u.World},{operationName:Tu.u.WorldDynamicStoreQuestManagerSetup,description:"Dynamic store quest manager setup",parent:Tu.u.World},{operationName:Tu.u.WorldHudDataInit,description:"Hud data init",parent:Tu.u.World},{operationName:Tu.u.WorldSegmentAnalyticsSetup,description:"Quest manager hub setup",parent:Tu.u.World},{operationName:Tu.u.WorldElementalBoostCache,description:"Elemental boost caching",parent:Tu.u.World},{operationName:Tu.u.WorldPippetEncounterInit,description:"Pippet encounter init",parent:Tu.u.World},{operationName:Tu.u.WorldGetTowerData,description:"Tower data retrieval",parent:Tu.u.World},{operationName:Tu.u.WorldInitTowerData,description:"Tower data init",parent:Tu.u.World},{operationName:Tu.u.WorldJoinActiveQuiz,description:"Join active quiz",parent:Tu.u.World},{operationName:Tu.u.WorldPlayerGoalsInit,description:"Player goals init",parent:Tu.u.World},{operationName:Tu.u.WorldEnterMap,description:"Map enter",parent:Tu.u.World},{operationName:Tu.u.WorldSegmentedOffersDataInit,description:"Segmented offers data init",parent:Tu.u.World},{operationName:Tu.u.WorldFeaturedSpawnDataInit,description:"Featured spawn data init",parent:Tu.u.World},{operationName:Tu.u.WorldWizardCostumeDataInit,description:"Wizard costume data init",parent:Tu.u.World},{operationName:Tu.u.LoadingState,objectType:Rf,description:"Loading state"},{operationName:Tu.u.LoadingStateAssetsLoad,description:"Loading state assets load",parent:Tu.u.LoadingState},{operationName:Tu.u.LoadingStateAdditionalLoadPromise,objectType:Rf,description:"Await additional load task"},{operationName:Tu.u.QuestManagerHubSetup,objectType:Rf,description:"Quest manager hub setup"}];for(const K of q)this._database.set(K.operationName,K);q.length=0}}let xf=class{constructor(){this._spanCache=new Map,this._factory=new Nf(this),this._onChange=()=>{this.visibilityChange()},document.addEventListener("visibilitychange",this._onChange,!1)}visibilityChange(){const q=this.isGameHidden();this._spanCache.forEach((K=>{q?null==K||K.onGameHidden():null==K||K.onGameVisible()}))}isGameHidden(){return"hidden"===document.visibilityState}startTracing(q){if(!q)return X.VyI.log("In order to create an entry tracker, the operation name is required",X.$bb.Error),null;const K=this._spanCache.get(q);if(K)return K;const z=this._factory.createTrace(q);return z&&z.init()?(this._spanCache.set(q,z),this.isGameHidden()?z.onGameHidden():z.onGameVisible(),z):null}endTracing(q,K){if(!q)return;const z=this.retrieveSpan(q);z?(K&&z.setExtraData(K),z.finish(),this.cleanDeadSpans()):this.cleanDeadSpans()}retrieveSpan(q){if(q)return this._spanCache.get(q)}cleanDeadSpans(){this._spanCache.forEach(((q,K)=>{(null==q?void 0:q.isActive())||this._spanCache.delete(K)}))}assignExtraDataToTrace(q,K){if(!K)return;const z=this.retrieveSpan(q);z&&z.setExtraData(K)}};xf=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Sn)("design:paramtypes",[])],xf);var Lf=z(72042),kf=z(48813),Bf=z(1717);let Uf=class{constructor(){this.unhandledRequirement={meetsRequirement:()=>(0,Q.sH)(this,void 0,void 0,(function*(){return!0}))}}meetsRequirements(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z;const Y="object"==typeof q?q:null===(K=this.getFeatureRequirementAsset(q))||void 0===K?void 0:K.data;if(!(null==Y?void 0:Y.requirements))return this.logError("No data was found for Feature Requirement"+("number"==typeof q?` of asset ID ${q}`:"")),!1;if(0===Y.requirements.length)return!0;const X=null!==(z=null==Y?void 0:Y.evaluationStrategy)&&void 0!==z?z:Bf.u.RequireAny,Z=yield Promise.all(Y.requirements.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return(yield Promise.all(Object.entries(q).map((q=>(0,Q.sH)(this,[q],void 0,(function*([q,K]){var z;const Y=null!==(z=this.requirementChecks[q])&&void 0!==z?z:this.unhandledRequirement;return Y===this.unhandledRequirement&&this.logWarning(`No requirement check implemented for key: ${q}`),Y.meetsRequirement(K)})))))).every((q=>!0===q))})))));switch(X){case Bf.u.RequireNone:return Z.every((q=>!1===q));case Bf.u.RequireAll:return Z.every((q=>!0===q));case Bf.u.RequireAny:default:return Z.includes(!0)}}))}};Uf=(0,Q.Cg)([(0,rt.injectable)()],Uf);var Ff=z(57070);class Gf extends Ff.w{getCurrentValue(){var q;const K=null!==(q=this.activePlayer.data.startDate)&&void 0!==q?q:0;return 2.7777777777777776e-7*(Date.now()-K)}meetsRequirement(q){return this.getCurrentValue()>=q}getCurrentProgress(q){return[this.getCurrentValue(),q]}}var jf=z(28344);const $f=[{isEnabled:()=>(0,Ft.G)(jf.y).enabled,getOverrideMap:()=>{var q;const K=(0,Ft.G)(jf.y);return K.enabled&&null!==(q=K.requirementOverrides)&&void 0!==q?q:{}}}];class Hf extends Ff.w{getCurrentValue(){const q=this.activePlayer.data,K=te.s.get("GameConstants.Features.SplitTests.CHARACTER_CREATION_TIME");let z=0;return K>0?z=K:X.Aq$.isDefined(q.startDate)&&(z=q.startDate),z}getCurrentProgress(q){return[this.getCurrentValue(),{after:X.Aq$.isDefined(q.after)?q.after:0,before:X.Aq$.isDefined(q.before)?q.before:te.s.MAX_SAFE_INTEGER}]}meetsRequirement(q){const K=this.getCurrentValue();return X.Aq$.isDefined(q.after)||(q.after=0),X.Aq$.isDefined(q.before)||(q.before=te.s.MAX_SAFE_INTEGER),K>=q.after&&K=q}getCurrentProgress(q){return[this.getCurrentValue(),q]}}class qf extends Ff.w{getCurrentValue(){return this.activePlayer.getPlayerData().zone}meetsRequirement(q){return this.getCurrentValue()===q}getCurrentProgress(q){return[this.getCurrentValue(),q]}}class Kf extends Ff.w{getCurrentValue(q){const K={};return Object.keys(q).forEach((q=>{var z;K[q]=X.o5U[q]?X.o5U[q]():null===(z=jt.pF[q])||void 0===z?void 0:z.call(jt.pF)})),K}meetsRequirement(q){const K=Object.keys(q).find((q=>"function"!=typeof X.o5U[q]&&"function"!=typeof jt.pF[q]));rt.Util.isDefined(K)&&X.VyI.log(`Incorrect DeviceRequirement configuration; Device.${K} is not a valid method.`,X.$bb.Warning);const z=this.getCurrentValue(q);return Object.keys(q).every((K=>z[K]===q[K]))}getCurrentProgress(q){return[this.getCurrentValue(q),q]}}class zf extends Ff.w{getCurrentValue(){return this.activePlayer.highestDifficultyUnlocked}meetsRequirement(q){var K;return!!(null===(K=this.activePlayer.difficultyUnlocks)||void 0===K?void 0:K[q])}getCurrentProgress(q){return[this.getCurrentValue(),q]}}class Yf extends Ff.w{getCurrentValue(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K,z;const Y=Bt.s.STORE_QUEST_ID,Q=yield this._dynamicStoreQuestManager.getRawQuestProgress(Y);if(!(null==Q?void 0:Q.tasks))return 0;const X=Q.tasks.find((K=>K.id===q.id));return X?null!==(z=null===(K=X.data)||void 0===K?void 0:K.timesCompleted)&&void 0!==z?z:X.status===bs.t.COMPLETE?1:0:0}))}meetsRequirement(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return(yield this.getCurrentValue(q))>=q.purchaseCount}))}getCurrentProgress(q){return X.VyI.log("[DynamicStoreItemPurchaseCountRequirement] getCurrentProgress is not implemented for this requirement type.",X.$bb.Error),[0,q.purchaseCount]}}(0,Q.Cg)([(0,Ge.b)("668-8a41"),(0,Q.Sn)("design:type",Bt.s)],Yf.prototype,"_dynamicStoreQuestManager",void 0);class Qf extends Ff.w{getCurrentValue(q){try{return di.U.isStepComplete(q)}catch(e){return!1}}meetsRequirement(q){return this.getCurrentValue(q)}getCurrentProgress(q){return[this.getCurrentValue(q),!0]}}var Xf=z(86824);class Zf extends Ff.w{getCurrentValue(q){return X.Aq$.isDefined(q.override)?q.override:Xf.e.areRequirementsMet(q)}meetsRequirement(q){return this.getCurrentValue(q)}getCurrentProgress(q){return[this.getCurrentValue(q),!0]}}class Jf extends Ff.w{getCurrentValue(q){return st.q.instance.prodigy.gameContainer.get("f71-42eb").getValue(q,!1)}meetsRequirement(q){return this.getCurrentValue(q)}getCurrentProgress(q){return[this.getCurrentValue(q),!0]}}class tb extends Ff.w{getCurrentValue(){return st.q.instance.prodigy.friendsListNetworkHandler.friendsList.length}meetsRequirement(q){return this.getCurrentValue()>=q}getCurrentProgress(q){return[this.getCurrentValue(),q]}}class eb extends Ff.w{constructor(q){super(q),st.q.instance.prodigy.gameContainer.get("577-9956").getData().then((([,q])=>this._data=q)).catch(X.RQr.createHandler("An error occurred while fetching geolocation data."))}getCurrentValue(){return this._data}meetsRequirement(q){var K,z,Y;const Q=this.getCurrentValue();return!!Q&&(null!==(K=q.deny)&&void 0!==K?K:[]).every((q=>!this.isoDoesMatch(q)))&&(null!==(z=q.allow)&&void 0!==z?z:[null===(Y=Q.country)||void 0===Y?void 0:Y.iso_code]).some((q=>this.isoDoesMatch(q)))}getCurrentProgress(q){return[this.getCurrentValue(),q]}isoDoesMatch(q){var K,z,Y,Q;if(!q)return!1;const[X,Z]=q.split("-");return X===(null!==(z=null===(K=this._data.country)||void 0===K?void 0:K.iso_code)&&void 0!==z&&z)&&(!Z||null!==(Q=null===(Y=this._data.subdivisions)||void 0===Y?void 0:Y.some((q=>q.iso_code===Z)))&&void 0!==Q&&Q)}}class ib extends Ff.w{getCurrentValue(){return this.activePlayer.hasValidatedParentEmail()}meetsRequirement(q){return this.getCurrentValue()===q}getCurrentProgress(q){return[this.getCurrentValue(),q]}}class sb extends Ff.w{getCurrentValue(){return this.activePlayer.hasValidatedTeacherEmail()}meetsRequirement(q){return this.getCurrentValue()===q}getCurrentProgress(q){return[this.getCurrentValue(),q]}}class nb extends Ff.w{getCurrentValue(q){const K={};for(let z=0;zJ)return!1}return!0}getCurrentProgress(q){return[this.getCurrentValue(q),q]}}var ab=z(56735);class rb extends Ff.w{getCurrentValue(q){return st.q.instance.prodigy.world.getZone(q.zone).getQuestState()}meetsRequirement(q){var K,z;const Y=st.q.instance.prodigy.world.getZone(q.zone);if(!Y)return X.VyI.log(`Invalid Zone ${Y} in quest requirement. The requirement is assumed to not have been met.`,X.$bb.Warning),!1;if(!X.Aq$.isDefined(q.questId)||"number"!=typeof q.questId)return X.VyI.log(`Invalid questId ${q.questId} in quest requirement. The requirement is assumed to not have been met.`,X.$bb.Warning),!1;const Q=this.getCurrentValue(q),Z=null!==(K=null==Q?void 0:Q.ID)&&void 0!==K?K:0,J=null!==(z=null==Q?void 0:Q.seq)&&void 0!==z?z:0;return X.Aq$.isDefined(q.questSequence)?"started"===q.questStatus?Z>=q.questId&&J>=q.questSequence:Z>=q.questId&&J>q.questSequence:"started"===q.questStatus?Z>=q.questId:Z>q.questId}getCurrentProgress(q){return[this.getCurrentValue(q),q]}}class ob extends Ff.w{getCurrentValue(){return this.activePlayer.getLevel()}meetsRequirement(q){return this.getCurrentValue()>=q}getCurrentProgress(q){return[this.getCurrentValue(),q]}}class hb extends Ff.w{getCurrentValue(){return el.O.localeCode}meetsRequirement(q){var K,z;const Y=this.getCurrentValue();return(null!==(K=q.deny)&&void 0!==K?K:[]).every((q=>q!==Y))&&(null!==(z=q.allow)&&void 0!==z?z:[Y]).some((q=>q===Y))}getCurrentProgress(q){return[this.getCurrentValue(),q]}}class cb extends Ff.w{getCurrentValue(){return this.activePlayer.getLevel()}meetsRequirement(q){return this.getCurrentValue()<=q}getCurrentProgress(q){return[this.getCurrentValue(),q]}}var db=z(5018),lb=z(6030);class ub extends Ff.w{getCurrentValue(q){const K=lb[q].data;return!!K&&!!this.featureRequirements.meetsRequirementsDeprecated(K)}meetsRequirement(q){return this.getCurrentValue(q)}getCurrentProgress(q){return[this.getCurrentValue(q),!0]}}(0,Q.Cg)([(0,Ge.b)("11f-118a"),(0,Q.Sn)("design:type",Object)],ub.prototype,"featureRequirements",void 0);class fb extends Ff.w{getCurrentValue(){return st.q.instance.prodigy.gameContainer.get("8f9-f0fc").getSubject()}meetsRequirement(q){var K,z;const Y=this.getCurrentValue();return(null!==(K=q.deny)&&void 0!==K?K:[]).every((q=>q!==Y))&&(null!==(z=q.allow)&&void 0!==z?z:[Y]).some((q=>q===Y))}getCurrentProgress(q){return[this.getCurrentValue(),q]}}var bb,pb=z(93054);class vb extends Ff.w{getCurrentValue(q){return pb.P.hasPlayerCompletedFinalQuestForZone(q)}meetsRequirement(q){return this.getCurrentValue(q)}getCurrentProgress(q){return[this.getCurrentValue(q),!0]}}let gb=bb=class extends Uf{constructor(q){super(),this.unhandledRequirement={meetsRequirement:()=>(0,Q.sH)(this,void 0,void 0,(function*(){return!1}))},this.requirementChecks={},Object.entries(bb.REQUIREMENT_HANDLERS).forEach((([K,z])=>this.requirementChecks[K]=new z(q)))}logError(q){X.VyI.log(q,X.$bb.Error)}logWarning(q){X.VyI.log(q,X.$bb.Warning)}meetsRequirementsDeprecated(q){var K,z;const Y="object"==typeof q?q:null===(K=this.getFeatureRequirementAsset(q))||void 0===K?void 0:K.data;if(Y){const q=(null!==(z=null==Y?void 0:Y.evaluationStrategy)&&void 0!==z?z:Bf.u.RequireAny)===Bf.u.RequireAll,K=Y.requirements;if(0===K.length)return!0;let Q=!0;for(let z=0;z{const K={};for(const z of Object.keys(q))K[z]=this.requirementChecks[z].getCurrentValue(q[z]);return K}))}}getProgressForRequirements(q){var K,z;const Y="object"==typeof q?q:null===(K=this.getFeatureRequirementAsset(q))||void 0===K?void 0:K.data;if(!Ce.A.isDefined(Y)){const K="string"==typeof q?q:null!==(z=null==q?void 0:q.name)&&void 0!==z?z:"unknown-name";return void X.VyI.log(`No data was found for Feature Requirement of asset ID ${K}`,X.$bb.Warning)}const{name:Q,requirements:Z}=Y;return{name:Q,requirements:Z.map((q=>{var K;const z={};for(const Y of Object.keys(q)){const Q=this.requirementChecks[Y];z[Y]={text:null===(K=null==Q?void 0:Q.getDisplayText)||void 0===K?void 0:K.call(Q,q[Y]),progress:null==Q?void 0:Q.getCurrentProgress(q[Y])}}return z}))}}getFeatureRequirementAsset(q){let K;for(const z of $f)z.isEnabled()&&(K=z.getOverrideMap()[q]);return K?{data:K}:Ee.t.getItem("featureRequirements",q)}};gb.REQUIREMENT_HANDLERS={level:ob,maxLevel:cb,items:nb,device:Kf,friends:tb,classmates:Wf,experiment:Zf,breadcrumb:Vf,geolocation:eb,featureFlag:Jf,legacyQuest:rb,packageFeature:db.G,accountAgeHours:Gf,accountCreationDate:Hf,validatedParentEmail:ib,validatedTeacherEmail:sb,currentMap:qf,subject:fb,endgameCompletion:Qf,kennel:ab.p,zonePrerequisite:vb,difficultyUnlocked:zf,dynamicStoreItemPurchaseCount:Yf,restrictionMet:ub,locale:hb},gb.ASYNC_REQUIREMENTS_KEYS=new Set(["dynamicStoreItemPurchaseCount"]),gb=bb=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)("d73-66e9")),(0,Q.Sn)("design:paramtypes",[pn.n])],gb);let mb=class{getStateMachine(q){return Ee.t.getItem("fsm",q).data}};mb=(0,Q.Cg)([(0,dt.injectable)()],mb);var yb=z(4101),_b=z(65826),Eb=z(78407),wb=z(97200),Tb=z(39473);let Sb=class{constructor(q,K,z,Y){this.httpClient=null,this.authProvider=null,this.currentPlayer=null,this.featureFlags=null,this.httpClient=q,this.authProvider=K,this.currentPlayer=z,this.featureFlags=Y}logStat(q,K){if(this.isLoggingEnabled())if(q.isValid()){const z=new X.u1k;z.setRequestURI(`game-cortex-server/v1/stats/${K}`).setMethod(X.iXQ.Post).addRequestInterceptor(this.authProvider.authenticateRequest,this.authProvider).setUseDefaultResponseHandlers(!1).setBody(new X._A9({data:JSON.stringify(q.serialize()),userID:`${this.currentPlayer.player.userID}`})),this.httpClient.sendRequest(z).then((q=>{q.wasSuccessful()||X.VyI.log(`Stats request has failed - ${q.getErrorMessage()}`,X.$bb.Warning)})).catch(X.RQr.createHandler("Stats request has failed"))}else X.VyI.log("Invalid stats data object provided. Request will not be sent",X.$bb.Warning);else X.VyI.log("GameApiRemoteLogger#logStat was called but remote logging is disabled",X.$bb.Verbose)}isLoggingEnabled(){return!this.featureFlags.getValue("remoteLoggingDisabled",!1)}};Sb=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)("429-aba2")),(0,Q.Qj)(1,(0,dt.inject)("9e9-b33d")),(0,Q.Qj)(2,(0,dt.inject)("ad2-c5b2")),(0,Q.Qj)(3,(0,dt.inject)("f71-42eb")),(0,Q.Sn)("design:paramtypes",[Object,Object,ee.E,Object])],Sb);class Ab{constructor(q){this.game=null,this.game=q}float(q,K,z,Y,Q=!1){const Z=this.game.add.tween(q,this).to({y:`-=${K}`},z,X.GS3.Quadratic.InOut).to({y:`+=${K}`},z,X.GS3.Quadratic.InOut);return Y&&Z.loop(Y),Q&&Z.start(),Z}translate(q,K,z,Y,Q=0,Z=X.GS3.Linear.None,J=!1){const tt=this.game.add.tween(q,this).delay(Q).to({x:K,y:z},Y,Z);return J&&tt.start(),tt}rotate(q,K,z,Y=0,Q=X.GS3.Linear.None,Z=!1){const J=this.game.add.tween(q,this).delay(Y).to({angle:K},z,Q);return Z&&J.start(),J}fade(q,K,z,Y=0,Q=X.GS3.Linear.None,Z=!1){const J=this.game.add.tween(q,this).delay(Y).to({alpha:K},z,Q);return Z&&J.start(),J}hop(q,K,z,Y,Q,Z=!1,J=!1){const tt=this.game.add.tween(q,this).to({x:K},Q,X.GS3.Linear.None);Z&&tt.to({alpha:0},10,X.GS3.Linear.None);const et={tween:tt,tween2:this.game.add.tween(q,this).to({y:z},Q/2,X.GS3.Quadratic.Out).to({y:Y},Q/2,X.GS3.Quadratic.In),start:()=>(et.tween.start(),et.tween2.start(),et),onTweenComplete:{tween:tt,add:q=>{tt.onTweenComplete.add(q.bind(this))}}};return J&&et.start(),et}shake(q,K,z,Y,Q,Z,J=0,tt=X.GS3.Linear.None,et=!1){const it=.25*Z,st=this.game.add.tween(q,this).delay(J).to({x:K,y:z},it,tt).to({x:Y,y:Q},it,tt).to({x:K,y:z},it,tt).to({x:0,y:0},it,tt);return et&&st.start(),st}}let Cb=class{getScreenWidth(){return window.screen.availWidth}getScreenHeight(){return window.screen.availHeight}getPlatformName(){let q="Desktop";return X.o5U.isIpadOS()?q="iPadOS":X.o5U.isIOS()?q="iOS":X.o5U.isFireOS()?q="Amazon":X.o5U.isAndroid()&&(q="Android"),`${q}-${jt.pF.isNativeApp()?"App":"Browser"}`}getConnectionDownlinkSpeed(){const q=this.getConnection();if(X.Aq$.isDefined(q)){const K=q.downlink;if(X.Aq$.isDefined(K))return K}return null}getConnectionRTT(){const q=this.getConnection();if(X.Aq$.isDefined(q)){const K=q.rtt;if(X.Aq$.isDefined(K))return K}return null}getConnectionType(){const q=this.getConnection();if(X.Aq$.isDefined(q)){const K=q.type;if(X.Aq$.isDefined(K))return K}return null}getConnectionEffectiveType(){const q=this.getConnection();if(X.Aq$.isDefined(q)){const K=q.effectiveType;if(X.Aq$.isDefined(K))return K}return null}getConnection(){return X.Aq$.isDefined(navigator.connection)?navigator.connection:null}getDeviceMemory(){return X.Aq$.isDefined(navigator.deviceMemory)?navigator.deviceMemory:null}getHardwareConcurrency(){return X.Aq$.isDefined(navigator.hardwareConcurrency)?navigator.hardwareConcurrency:null}getJSHeapSizeLimit(){return X.Aq$.isDefined(performance.memory)&&X.Aq$.isDefined(performance.memory.jsHeapSizeLimit)?performance.memory.jsHeapSizeLimit:null}getUsedJSHeapSize(){return X.Aq$.isDefined(performance.memory)&&X.Aq$.isDefined(performance.memory.usedJSHeapSize)?performance.memory.usedJSHeapSize:null}isVideoAvailable(){return"Desktop-Browser"===this.getPlatformName()&&(X.o5U.isChrome()||X.o5U.isFirefox())}isWebWorkerAvailable(){return Boolean(window.Worker)}isWebSocketAvailable(){return Boolean(window.WebSocket)}isWebGLAvailable(){let q=!1;const K=document.createElement("canvas");document.body.appendChild(K);const z=K.getContext("webgl")||K.getContext("experimental-webgl");return z&&z instanceof WebGLRenderingContext&&(q=!0),document.body.removeChild(K),q}};Cb=(0,Q.Cg)([(0,dt.injectable)()],Cb);let Ob=class{getCurrentEnvironment(){let q=this.getCurrentEnvironmentByHost();const K=et.qg(this.getWindowQueryString()).env;return X.Aq$.isDefined(K)&&("dev"===K?q=Ze.h.Dev:"staging"===K?q=Ze.h.Staging:"production"===K||"prod"===K?q=Ze.h.Production:K.indexOf("-qa")>-1&&(q=Ze.h.QABox)),q}getCurrentEnvironmentByHost(){const q=this.getWindowHost();return q.indexOf("-qa")>=0?Ze.h.QABox:q.indexOf("dev.prodigygame.org")>=0||q.indexOf("prodigygame.net")>=0?Ze.h.Dev:q.indexOf("prodigygame.org")>=0?Ze.h.Staging:q.indexOf("prodigygame.com")>=0?Ze.h.Production:Ze.h.Local}getEnvironmentString(){switch(this.getCurrentEnvironment()){case Ze.h.Production:return"production";case Ze.h.Staging:return"staging";default:return"dev"}}getWindowHost(){return window.location.host}getWindowQueryString(){return window.location.search}};Ob=(0,Q.Cg)([(0,dt.injectable)()],Ob);var Ib={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},Db=function(q){for(var K=[],z=1;z>parseInt(q,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,qb)}function Kb(q){return 0!==q&&100*Math.random()<=q}function zb(q,K){return+q.toFixed(K)}function Yb(){}function Qb(q,K,z){if("object"!=typeof q||null===q)return JSON.stringify(q);var Y=Xb(Object.prototype),Q=Xb(Array.prototype),X=Xb(Object.getPrototypeOf(q)),Z=Xb(q);try{return JSON.stringify(q,K,z)}catch(Ie){return""}finally{Y(),Q(),X(),Z()}}function Xb(q){var K=q,z=K.toJSON;return z?(delete K.toJSON,function(){K.toJSON=z}):Yb}function Zb(q,K){return-1!==q.indexOf(K)}function Jb(q){if(Array.from)return Array.from(q);var K=[];if(q instanceof Set)q.forEach((function(q){return K.push(q)}));else for(var z=0;z=0&&q<=100}function ip(q){return"number"==typeof q}function sp(q){return Object.keys(q).map((function(K){return q[K]}))}function np(q){return Object.keys(q).map((function(K){return[K,q[K]]}))}function ap(q){return 0===Object.keys(q).length}function rp(q,K){return q.slice(0,K.length)===K}function op(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var q=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof q&&(q="object"==typeof self?self:"object"==typeof window?window:{}),q}function hp(q){if(q.origin)return q.origin;var K=q.host.replace(/(:80|:443)$/,"");return"".concat(q.protocol,"//").concat(K)}function cp(q,K){var z=new RegExp("(?:^|;)\\s*".concat(K,"\\s*=\\s*([^;]+)")).exec(q);return z?z[1]:void 0}function dp(q,K,z){void 0===z&&(z="");var Y=q.charCodeAt(K-1),Q=Y>=55296&&Y<=56319?K+1:K;return q.length<=Q?q:"".concat(q.slice(0,Q)).concat(z)}function lp(q){return null===q?"null":Array.isArray(q)?"array":typeof q}function up(q,K,z){if(void 0===z&&(z=function(){if("undefined"!=typeof WeakSet){var q=new WeakSet;return{hasAlreadyBeenSeen:function(K){var z=q.has(K);return z||q.add(K),z}}}var K=[];return{hasAlreadyBeenSeen:function(q){var z=K.indexOf(q)>=0;return z||K.push(q),z}}}()),void 0===K)return q;if("object"!=typeof K||null===K)return K;if(K instanceof Date)return new Date(K.getTime());if(K instanceof RegExp){var Y=K.flags||[K.global?"g":"",K.ignoreCase?"i":"",K.multiline?"m":"",K.sticky?"y":"",K.unicode?"u":""].join("");return new RegExp(K.source,Y)}if(!z.hasAlreadyBeenSeen(K)){if(Array.isArray(K)){for(var Q=Array.isArray(q)?q:[],X=0;X500&&this.buffer.splice(0,1)},q.prototype.drain=function(){this.buffer.forEach((function(q){return q()})),this.buffer.length=0},q}();function Tp(q){return{relative:q,timeStamp:Sp(q)}}function Sp(q){var K=Cp()-performance.now();return K>xp()?Math.round(Mp(K,q)):function(q){return Math.round(Mp(xp(),q))}(q)}function Ap(q){return ip(q)?zb(1e6*q,0):q}function Cp(){return(new Date).getTime()}function Op(){return Cp()}function Ip(){return performance.now()}function Dp(){return{relative:Ip(),timeStamp:Op()}}function Rp(){return{relative:0,timeStamp:xp()}}function Pp(q,K){return K-q}function Mp(q,K){return q+K}function Np(q){return q-xp()}function xp(){return void 0===Ep&&(Ep=performance.timing.navigationStart),Ep}var Lp;function kp(q,K,z,Y){var Q=new Date;Q.setTime(Q.getTime()+z);var X="expires=".concat(Q.toUTCString()),Z=Y&&Y.crossSite?"none":"strict",J=Y&&Y.domain?";domain=".concat(Y.domain):"",tt=Y&&Y.secure?";secure":"";document.cookie="".concat(q,"=").concat(K,";").concat(X,";path=/;samesite=").concat(Z).concat(J).concat(tt)}function Bp(q){return cp(document.cookie,q)}function Up(q,K){kp(q,"",0,K)}var Fp;function Gp(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||Bp("datadog-synthetics-injects-rum"))}function jp(){var q=op().DatadogEventBridge;if(q)return{getAllowedWebViewHosts:function(){return JSON.parse(q.getAllowedWebViewHosts())},send:function(K,z){q.send(JSON.stringify({eventType:K,event:z}))}}}function $p(q){var K;void 0===q&&(q=null===(K=op().location)||void 0===K?void 0:K.hostname);var z=jp();return!!z&&z.getAllowedWebViewHosts().some((function(K){return q===K||(z=q,Y=".".concat(K),z.slice(-Y.length)===Y);var z,Y}))}function Hp(q){return!!Fp&&Fp.has(q)}function Vp(){return Fp||new Set}var Wp="?";function qp(q){var K=[],z=ev(q,"stack"),Y=String(q);return z&&rp(z,Y)&&(z=z.slice(Y.length)),z&&z.split("\n").forEach((function(q){var z=function(q){var K=Yp.exec(q);if(!K)return;var z=K[2]&&0===K[2].indexOf("native"),Y=K[2]&&0===K[2].indexOf("eval"),Q=Qp.exec(K[2]);Y&&Q&&(K[2]=Q[1],K[3]=Q[2],K[4]=Q[3]);return{args:z?[K[2]]:[],column:K[4]?+K[4]:void 0,func:K[1]||Wp,line:K[3]?+K[3]:void 0,url:z?void 0:K[2]}}(q)||function(q){var K=Xp.exec(q);if(!K)return;return{args:[],column:K[3]?+K[3]:void 0,func:Wp,line:K[2]?+K[2]:void 0,url:K[1]}}(q)||function(q){var K=Zp.exec(q);if(!K)return;return{args:[],column:K[4]?+K[4]:void 0,func:K[1]||Wp,line:+K[3],url:K[2]}}(q)||function(q){var K=Jp.exec(q);if(!K)return;var z=K[3]&&K[3].indexOf(" > eval")>-1,Y=tv.exec(K[3]);z&&Y&&(K[3]=Y[1],K[4]=Y[2],K[5]=void 0);return{args:K[2]?K[2].split(","):[],column:K[5]?+K[5]:void 0,func:K[1]||Wp,line:K[4]?+K[4]:void 0,url:K[3]}}(q);z&&(!z.func&&z.line&&(z.func=Wp),K.push(z))})),{message:ev(q,"message"),name:ev(q,"name"),stack:K}}var Kp="((?:file|https?|blob|chrome-extension|native|eval|webpack||\\w+\\.|\\/).*?)",zp="(?::(\\d+))",Yp=new RegExp("^\\s*at (.*?) ?\\(".concat(Kp).concat(zp,"?").concat(zp,"?\\)?\\s*$"),"i"),Qp=new RegExp("\\((\\S*)".concat(zp).concat(zp,"\\)"));var Xp=new RegExp("^\\s*at ?".concat(Kp).concat(zp,"?").concat(zp,"??\\s*$"),"i");var Zp=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Jp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,tv=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function ev(q,K){if("object"==typeof q&&q&&K in q){var z=q[K];return"string"==typeof z?z:void 0}}var iv,sv="agent",nv="console",av="custom",rv="source",ov="report";function hv(q){var K=q.stackTrace,z=q.originalError,Y=q.handlingStack,Q=q.startClocks,X=q.nonErrorPrefix,Z=q.source,J=q.handling;return K&&(void 0!==K.message||z instanceof Error)?{startClocks:Q,source:Z,handling:J,originalError:z,message:K.message||"Empty message",stack:cv(K),handlingStack:Y,type:K.name,causes:uv(z,Z)}:{startClocks:Q,source:Z,handling:J,originalError:z,message:"".concat(X," ").concat(Qb(z)),stack:"No stack, consider using an instance of Error",handlingStack:Y,type:K&&K.name}}function cv(q){var K=dv(q);return q.stack.forEach((function(q){var z="?"===q.func?"":q.func,Y=q.args&&q.args.length>0?"(".concat(q.args.join(", "),")"):"",Q=q.line?":".concat(q.line):"",X=q.line&&q.column?":".concat(q.column):"";K+="\n at ".concat(z).concat(Y," @ ").concat(q.url).concat(Q).concat(X)})),K}function dv(q){return"".concat(q.name||"Error",": ").concat(q.message)}function lv(){var q,K=new Error;if(!K.stack)try{throw K}catch(e){}return kb((function(){var z=qp(K);z.stack=z.stack.slice(2),q=cv(z)})),q}function uv(q,K){for(var z=q,Y=[];(null==z?void 0:z.cause)instanceof Error&&Y.length<10;){var Q=qp(z.cause);Y.push({message:z.cause.message,source:K,type:null==Q?void 0:Q.name,stack:Q&&cv(Q)}),z=z.cause}return Y.length?Y:void 0}function fv(q){var K=Vb({},q);return["id","name","email"].forEach((function(q){q in K&&(K[q]=String(K[q]))})),K}function bv(q){return vv(q,hp(window.location)).href}function pv(q){return hp(vv(q))}function vv(q,K){if(function(){if(void 0!==iv)return iv;try{var q=new URL("http://test/path");return iv="http://test/path"===q.href}catch(Ie){iv=!1}return iv}())return void 0!==K?new URL(q,K):new URL(q);if(void 0===K&&!/:/.test(q))throw new Error("Invalid URL: '".concat(q,"'"));var z=document,Y=z.createElement("a");if(void 0!==K){var Q=(z=document.implementation.createHTMLDocument("")).createElement("base");Q.href=K,z.head.appendChild(Q),z.body.appendChild(Y)}return Y.href=q,Y}var gv="datadoghq.com",mv="ap1.datadoghq.com",yv={logs:"logs",rum:"rum",sessionReplay:"session-replay"},_v={logs:"logs",rum:"rum",sessionReplay:"replay"};function Ev(q,K,z){var Y=function(q,K){var z="/api/v2/".concat(_v[K]),Y=q.proxy,Q=q.proxyUrl;if(Y){var X=bv(Y);return function(q){return"".concat(X,"?ddforward=").concat(encodeURIComponent("".concat(z,"?").concat(q)))}}var Z=function(q,K){var z=q.site,Y=void 0===z?gv:z,Q=q.internalAnalyticsSubdomain;if(Q&&Y===gv)return"".concat(Q,".").concat(gv);var X=Y.split("."),Z=X.pop(),J=Y!==mv?"".concat(yv[K],"."):"";return"".concat(J,"browser-intake-").concat(X.join("-"),".").concat(Z)}(q,K);if(void 0===Y&&Q){var J=bv(Q);return function(q){return"".concat(J,"?ddforward=").concat(encodeURIComponent("https://".concat(Z).concat(z,"?").concat(q)))}}return function(q){return"https://".concat(Z).concat(z,"?").concat(q)}}(q,K);return{build:function(Q,X,Z){var J=function(q,K,z,Y,Q,X){var Z=q.clientToken,J=q.internalAnalyticsSubdomain,tt=["sdk_version:".concat("4.35.0"),"api:".concat(Y)].concat(z);Q&&Hp("collect_flush_reason")&&tt.push("flush_reason:".concat(Q));X&&tt.push("retry_count:".concat(X.count),"retry_after:".concat(X.lastFailureStatus));var et=["ddsource=browser","ddtags=".concat(encodeURIComponent(tt.join(","))),"dd-api-key=".concat(Z),"dd-evp-origin-version=".concat(encodeURIComponent("4.35.0")),"dd-evp-origin=browser","dd-request-id=".concat(qb())];"rum"===K&&et.push("batch_time=".concat(Op()));J&&et.reverse();return et.join("&")}(q,K,z,Q,X,Z);return Y(J)},urlPrefix:Y(""),endpointType:K}}var wv=/[^a-z0-9_:./-]/;function Tv(q,K){var z=200-q.length-1;(K.length>z||wv.test(K))&&Db.warn("".concat(q," value doesn't meet tag requirements and will be sanitized"));var Y=K.replace(/,/g,"_");return"".concat(q,":").concat(Y)}function Sv(q){var K=function(q){var K=q.env,z=q.service,Y=q.version,Q=q.datacenter,X=[];return K&&X.push(Tv("env",K)),z&&X.push(Tv("service",z)),Y&&X.push(Tv("version",Y)),Q&&X.push(Tv("datacenter",Q)),X}(q),z=function(q,K){return{logsEndpointBuilder:Ev(q,"logs",K),rumEndpointBuilder:Ev(q,"rum",K),sessionReplayEndpointBuilder:Ev(q,"sessionReplay",K)}}(q,K),Y=sp(z).map((function(q){return q.urlPrefix})),Q=function(q,K,z){if(!q.replica)return;var Y=Vb({},q,{site:gv,clientToken:q.replica.clientToken}),Q={logsEndpointBuilder:Ev(Y,"logs",z),rumEndpointBuilder:Ev(Y,"rum",z)};return K.push.apply(K,sp(Q).map((function(q){return q.urlPrefix}))),Vb({applicationId:q.replica.applicationId},Q)}(q,Y,K);return Vb({isIntakeUrl:function(q){return Y.some((function(K){return 0===q.indexOf(K)}))},replica:Q,site:q.site||gv},z)}var Av={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function Cv(q){var K,z,Y;if(q&&q.clientToken){var Q=null!==(K=q.sessionSampleRate)&&void 0!==K?K:q.sampleRate;if(void 0===Q||ep(Q))if(void 0===q.telemetrySampleRate||ep(q.telemetrySampleRate)){var X;if(void 0===q.telemetryConfigurationSampleRate||ep(q.telemetryConfigurationSampleRate))return X=q.enableExperimentalFeatures,Array.isArray(X)&&(Fp||(Fp=new Set(X)),X.filter((function(q){return"string"==typeof q})).forEach((function(q){Zb(q,"-")&&Db.warn("please use snake case for '".concat(q,"'")),Fp.add(q)}))),Vb({beforeSend:q.beforeSend&&Rb(q.beforeSend,"beforeSend threw an error:"),cookieOptions:Ov(q),sessionSampleRate:null!=Q?Q:100,telemetrySampleRate:null!==(z=q.telemetrySampleRate)&&void 0!==z?z:20,telemetryConfigurationSampleRate:null!==(Y=q.telemetryConfigurationSampleRate)&&void 0!==Y?Y:5,service:q.service,silentMultipleInit:!!q.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},Sv(q));Db.error("Telemetry Configuration Sample Rate should be a number between 0 and 100")}else Db.error("Telemetry Sample Rate should be a number between 0 and 100");else Db.error("Session Sample Rate should be a number between 0 and 100")}else Db.error("Client Token is not configured, we will not send any data.")}function Ov(q){var K={};return K.secure=function(q){return!!q.useSecureSessionCookie||!!q.useCrossSiteSessionCookie}(q),K.crossSite=!!q.useCrossSiteSessionCookie,q.trackSessionAcrossSubdomains&&(K.domain=function(){if(void 0===Lp){for(var q="dd_site_test_".concat(qb()),K=window.location.hostname.split("."),z=K.pop();K.length&&!Bp(q);)z="".concat(K.pop(),".").concat(z),kp(q,"test",jb,{domain:z});Up(q,{domain:z}),Lp=z}return Lp}()),K}function Iv(q){0!==q.status||q.isAborted||(q.traceId=void 0,q.spanId=void 0,q.traceSampled=void 0)}function Dv(q,K,z,Y){if(void 0!==Rv()&&z.findTrackedSession()){var Q,X,Z,J,tt,et=tp(q.allowedTracingUrls,(function(q){return vp([q.match],K.url,!0)}));if(et)K.traceId=new Pv,K.spanId=new Pv,K.traceSampled=!ip(q.traceSampleRate)||Kb(q.traceSampleRate),Y((Q=K.traceId,X=K.spanId,Z=K.traceSampled,J=et.propagatorTypes,tt={},J.forEach((function(q){switch(q){case"datadog":Vb(tt,{"x-datadog-origin":"rum","x-datadog-parent-id":X.toDecimalString(),"x-datadog-sampling-priority":Z?"1":"0","x-datadog-trace-id":Q.toDecimalString()});break;case"tracecontext":Vb(tt,{traceparent:"00-0000000000000000".concat(Q.toPaddedHexadecimalString(),"-").concat(X.toPaddedHexadecimalString(),"-0").concat(Z?"1":"0")});break;case"b3":Vb(tt,{b3:"".concat(Q.toPaddedHexadecimalString(),"-").concat(X.toPaddedHexadecimalString(),"-").concat(Z?"1":"0")});break;case"b3multi":Vb(tt,{"X-B3-TraceId":Q.toPaddedHexadecimalString(),"X-B3-SpanId":X.toPaddedHexadecimalString(),"X-B3-Sampled":Z?"1":"0"})}})),tt))}}function Rv(){return window.crypto||window.msCrypto}var Pv=function(){function q(){this.buffer=new Uint8Array(8),Rv().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}return q.prototype.toString=function(q){var K=this.readInt32(0),z=this.readInt32(4),Y="";do{var Q=K%q*4294967296+z;K=Math.floor(K/q),z=Math.floor(Q/q),Y=(Q%q).toString(q)+Y}while(K||z);return Y},q.prototype.toDecimalString=function(){return this.toString(10)},q.prototype.toPaddedHexadecimalString=function(){var q=this.toString(16);return Array(17-q.length).join("0")+q},q.prototype.readInt32=function(q){return 16777216*this.buffer[q]+(this.buffer[q+1]<<16)+(this.buffer[q+2]<<8)+this.buffer[q+3]},q}();function Mv(q){var K,z,Y,Q,X,Z;if(q.applicationId)if(void 0===q.sessionReplaySampleRate||ep(q.sessionReplaySampleRate)){var J=null!==(K=q.premiumSampleRate)&&void 0!==K?K:q.replaySampleRate;if(void 0!==J&&void 0!==q.sessionReplaySampleRate&&(Db.warn("Ignoring Premium Sample Rate because Session Replay Sample Rate is set"),J=void 0),void 0===J||ep(J)){var tt=null!==(z=q.traceSampleRate)&&void 0!==z?z:q.tracingSampleRate;if(void 0===tt||ep(tt))if(void 0===q.excludedActivityUrls||Array.isArray(q.excludedActivityUrls)){var et=function(q){void 0!==q.allowedTracingUrls&&void 0!==q.allowedTracingOrigins&&Db.warn("Both allowedTracingUrls and allowedTracingOrigins (deprecated) have been defined. The parameter allowedTracingUrls will override allowedTracingOrigins.");if(void 0!==q.allowedTracingUrls){if(!Array.isArray(q.allowedTracingUrls))return void Db.error("Allowed Tracing URLs should be an array");if(0!==q.allowedTracingUrls.length&&void 0===q.service)return void Db.error("Service needs to be configured when tracing is enabled");var K=[];return q.allowedTracingUrls.forEach((function(q){var z;pp(q)?K.push({match:q,propagatorTypes:["datadog"]}):"object"===lp(z=q)&&pp(z.match)&&Array.isArray(z.propagatorTypes)?K.push(q):Db.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",q)})),K}if(void 0!==q.allowedTracingOrigins){if(!Array.isArray(q.allowedTracingOrigins))return void Db.error("Allowed Tracing Origins should be an array");if(0!==q.allowedTracingOrigins.length&&void 0===q.service)return void Db.error("Service needs to be configured when tracing is enabled");var z=[];return q.allowedTracingOrigins.forEach((function(q){var K=function(q){var K;"string"==typeof q?K=q:q instanceof RegExp?K=function(K){return q.test(pv(K))}:"function"==typeof q&&(K=function(K){return q(pv(K))});if(void 0===K)return void Db.warn("Allowed Tracing Origins parameters should be a string, RegExp or function. Ignoring parameter",q);return{match:K,propagatorTypes:["datadog"]}}(q);K&&z.push(K)})),z}return[]}(q);if(et){var it=Cv(q);if(it){var st,nt,at=!!(null!==(Y=q.trackUserInteractions)&&void 0!==Y?Y:q.trackInteractions),rt=!!q.trackFrustrations;return Vb({applicationId:q.applicationId,version:q.version,actionNameAttribute:q.actionNameAttribute,sessionReplaySampleRate:null!==(X=null!==(Q=q.sessionReplaySampleRate)&&void 0!==Q?Q:J)&&void 0!==X?X:100,oldPlansBehavior:void 0===q.sessionReplaySampleRate,traceSampleRate:tt,allowedTracingUrls:et,excludedActivityUrls:null!==(Z=q.excludedActivityUrls)&&void 0!==Z?Z:[],trackUserInteractions:at||rt,trackFrustrations:rt,trackViewsManually:!!q.trackViewsManually,trackResources:q.trackResources,trackLongTasks:q.trackLongTasks,defaultPrivacyLevel:(st=Av,nt=q.defaultPrivacyLevel,Object.keys(st).some((function(q){return st[q]===nt}))?q.defaultPrivacyLevel:Av.MASK_USER_INPUT),customerDataTelemetrySampleRate:1},it)}}}else Db.error("Excluded Activity Urls should be an array");else Db.error("Trace Sample Rate should be a number between 0 and 100")}else Db.error("Premium Sample Rate should be a number between 0 and 100")}else Db.error("Session Replay Sample Rate should be a number between 0 and 100");else Db.error("Application ID is not configured, no RUM data will be collected.")}function Nv(q){var K=new Set;return Array.isArray(q.allowedTracingUrls)&&q.allowedTracingUrls.length>0&&q.allowedTracingUrls.forEach((function(q){pp(q)?K.add("datadog"):q.propagatorTypes.forEach((function(q){return K.add(q)}))})),Array.isArray(q.allowedTracingOrigins)&&q.allowedTracingOrigins.length>0&&K.add("datadog"),Jb(K)}function xv(q,K,z){return{context:q.getContext(),user:K.getContext(),hasReplay:!!z.isRecording()||void 0}}function Lv(q,K){var z=window.__ddBrowserSdkExtensionCallback;z&&z({type:q,payload:K})}var kv=function(){function q(q){this.onFirstSubscribe=q,this.observers=[]}return q.prototype.subscribe=function(q){var K=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(q),{unsubscribe:function(){K.observers=K.observers.filter((function(K){return q!==K})),!K.observers.length&&K.onLastUnsubscribe&&K.onLastUnsubscribe()}}},q.prototype.notify=function(q){this.observers.forEach((function(K){return K(q)}))},q}();function Bv(){for(var q=[],K=0;K"],Wv=["ddog-gov.com"],qv={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1};function Kv(q,K){var z,Y=new kv;return qv.telemetryEnabled=!Zb(Wv,K.site)&&Kb(K.telemetrySampleRate),qv.telemetryConfigurationEnabled=qv.telemetryEnabled&&Kb(K.telemetryConfigurationSampleRate),jv=function(K){if(qv.telemetryEnabled){var Q=function(q,K){return bp({type:"telemetry",date:Op(),service:q,version:"4.35.0",source:"browser",_dd:{format_version:2},telemetry:K,experimental_features:Jb(Vp())},void 0!==z?z():{})}(q,K);Y.notify(Q),Lv("telemetry",Q)}},Pb=Yv,Vb(qv,{maxEventsPerPage:K.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(q){z=q},observable:Y,enabled:qv.telemetryEnabled}}function zv(q,K){Bb(Ib.debug,q,K),Qv(Vb({type:$v,message:q,status:"debug"},K))}function Yv(q){Qv(Vb({type:$v,status:"error"},function(q){if(q instanceof Error){var K=qp(q);return{error:{kind:K.name,stack:cv(Xv(K))},message:K.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught ".concat(Qb(q))}}(q)))}function Qv(q){jv&&qv.sentEventCountq[z])return!1;return!0}function ng(q){var K=ag(q);if(K){var z=K.startTime,Y=K.fetchStart,Q=K.redirectStart,X=K.redirectEnd,Z=K.domainLookupStart,J=K.domainLookupEnd,tt=K.connectStart,et=K.secureConnectionStart,it=K.connectEnd,st=K.requestStart,nt=K.responseStart,at={download:og(z,nt,K.responseEnd),first_byte:og(z,st,nt)};return it!==Y&&(at.connect=og(z,tt,it),sg(tt,et,it)&&(at.ssl=og(z,et,it))),J!==Y&&(at.dns=og(z,Z,J)),rg(q)&&(at.redirect=og(z,Q,X)),at}}function ag(q){if(sg(q.startTime,q.fetchStart,q.domainLookupStart,q.domainLookupEnd,q.connectStart,q.connectEnd,q.requestStart,q.responseStart,q.responseEnd)){if(!rg(q))return q;var K=q.redirectStart,z=q.redirectEnd;if(K=0;K-=1){var z,Y=q.body.childNodes[K];if(z=yg(Y))return z;if(!dg(Y))break}}(q);if(!K)return;return mg(cp(K,"trace-id"),cp(K,"trace-time"))}(q);if(K&&!(K.traceTime<=Cp()-12e4))return K.traceId}function mg(q,K){var z=K&&Number(K);if(q&&z)return{traceId:q,traceTime:z}}function yg(q){if(q&&function(q){return q.nodeType===Node.COMMENT_NODE}(q)){var K=/^\s*DATADOG;(.*?)\s*$/.exec(q.data);if(K)return K[1]}}function _g(){return void 0!==window.performance&&"getEntries"in performance}function Eg(q){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(q)}function wg(q,K){var z;if(z=function(z){Sg(q,K,[z])},Jv("interactive",(function(){var q,K={entryType:"resource",initiatorType:tg,traceId:gg(document)};if(Eg("navigation")&&performance.getEntriesByType("navigation").length>0)q=Vb(performance.getEntriesByType("navigation")[0].toJSON(),K);else{var Y=Tg();q=Vb(Y,{decodedBodySize:0,duration:Y.responseEnd,name:window.location.href,startTime:0},K)}z(q)})),_g()){var Y=performance.getEntries();Fb((function(){return Sg(q,K,Y)}))}if(window.PerformanceObserver){var Q=Lb((function(z){return Sg(q,K,z.getEntries())})),X=["resource","navigation","longtask","paint"],Z=["largest-contentful-paint","first-input","layout-shift"];try{Z.forEach((function(q){new PerformanceObserver(Q).observe({type:q,buffered:!0})}))}catch(e){X.push.apply(X,Z)}new PerformanceObserver(Q).observe({entryTypes:X}),_g()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}Eg("navigation")||function(q){function K(){q(Vb(Tg(),{entryType:"navigation"}))}Jv("complete",(function(){Fb(K)}))}((function(z){Sg(q,K,[z])})),Eg("first-input")||function(q){var K=Cp(),z=!1,Y=Fv(window,["click","mousedown","keydown","touchstart","pointerdown"],(function(q){if(q.cancelable){var K={entryType:"first-input",processingStart:Ip(),startTime:q.timeStamp};"pointerdown"===q.type?Q(K):X(K)}}),{passive:!0,capture:!0}).stop;function Q(q){Fv(window,["pointerup","pointercancel"],(function(K){"pointerup"===K.type&&X(q)}),{once:!0})}function X(Q){if(!z){z=!0,Y();var X=Q.processingStart-Q.startTime;X>=0&&X2500)){var q=kg[kg.length-1],K=Ip();void 0!==q&&void 0===q.end||kg.push({start:K})}}function Fg(){if(0!==kg.length){var q=kg[kg.length-1],K=Ip();void 0===q.end&&(q.end=K)}}function Gg(q){for(var K=kg.length-1;K>=0;K--){var z=kg[K];if(void 0!==z.end&&q>z.end)break;if(q>z.start&&(void 0===z.end||q=Q;X--){var Z=kg[X];if(void 0!==Z.end&&q>Z.end)break;if(!(zZ.start?q:Z.start,tt=Pp(q,J),et=Pp(J,void 0===Z.end||z=0&&z.entries.splice(q,1)},close:function(q){Y.endTime=q}};return this.entries.unshift(Y),Y},q.prototype.find=function(q){void 0===q&&(q=qg);for(var K=0,z=this.entries;K0&&this.entries[this.entries.length-1].endTimez.bytesLimit}K(void 0,q,Z)}!function q(){Y.read().then(Lb((function(K){K.done?Z():(z.collectStreamBody&&Q.push(K.value),(X+=K.value.length)>z.bytesLimit?Z():q())})),Lb((function(q){return K(q)})))}()}(z.body,(function(){K(Pp(q.startClocks.timeStamp,Op()))}),{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1}):K(Pp(q.startClocks.timeStamp,Op()))}(Q,(function(K){z.clearTracingIfNeeded(Q),q.notify(6,{duration:K,method:Q.method,requestIndex:Q.requestIndex,responseType:Q.responseType,spanId:Q.spanId,startClocks:Q.startClocks,status:Q.status,traceId:Q.traceId,traceSampled:Q.traceSampled,type:"fetch",url:Q.url,response:Q.response,init:Q.init,input:Q.input})}))}}))}(q,K,Y)}function hm(){var q=rm;return rm+=1,q}function cm(q){var K=q.lifeCycle,z=q.isChildEvent,Y=q.onChange,Q=void 0===Y?Yb:Y,X={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},Z=K.subscribe(11,(function(q){if("view"!==q.type&&z(q))switch(q.type){case"error":X.errorCount+=1,Q();break;case"action":X.actionCount+=1,q.action.frustration&&(X.frustrationCount+=q.action.frustration.type.length),Q();break;case"long_task":X.longTaskCount+=1,Q();break;case"resource":X.resourceCount+=1,Q()}}));return{stop:function(){Z.unsubscribe()},eventCounts:X}}var dm=100;function lm(q,K,z,Y,Q){return function(q,K,z){var Y,Q=!1,X=Fb(Lb((function(){return et({hadActivity:!1})})),100),Z=z&&Fb(Lb((function(){return et({hadActivity:!0,end:Op()})})),z),J=q.subscribe((function(q){var K=q.isBusy;Gb(X),Gb(Y);var z=Op();K||(Y=Fb(Lb((function(){return et({hadActivity:!0,end:z})})),100))})),tt=function(){Q=!0,Gb(X),Gb(Y),Gb(Z),J.unsubscribe()};function et(q){Q||(tt(),K(q))}return{stop:tt}}(function(q,K,z){var Y=new kv((function(){var Q,X=[],Z=0;X.push(K.subscribe(et),q.subscribe(0,(function(q){q.some((function(q){return"resource"===q.entryType&&!um(z,q.name)}))&&et()})),q.subscribe(5,(function(q){um(z,q.url)||(void 0===Q&&(Q=q.requestIndex),Z+=1,et())})),q.subscribe(6,(function(q){um(z,q.url)||void 0===Q||q.requestIndex0})}}));return Y}(q,K,z),Y,Q)}function um(q,K){return vp(q.excludedActivityUrls,K)}var fm=jb;function bm(q,K){var z,Y=[],Q=0;function X(q){q.stopObservable.subscribe(Z),Y.push(q),Gb(z),z=Fb(J,1e3)}function Z(){1===Q&&Y.every((function(q){return q.isStopped()}))&&(Q=2,K(Y))}function J(){Gb(z),0===Q&&(Q=1,Z())}return X(q),{tryAppend:function(q){return 0===Q&&(Y.length>0&&(K=Y[Y.length-1].event,z=q.event,!(K.target===z.target&&(Z=K,tt=z,Math.sqrt(Math.pow(Z.clientX-tt.clientX,2)+Math.pow(Z.clientY-tt.clientY,2))<=100)&&K.timeStamp-z.timeStamp<=fm))?(J(),!1):(X(q),!0));var K,z,Z,tt},stop:function(){J()}}}var pm="data-dd-action-name";function vm(q,K){return gm(q,pm)||K&&gm(q,K)||wm(q,K,_m)||wm(q,K,Em)||""}function gm(q,K){var z;if(function(){void 0===ym&&(ym="closest"in HTMLElement.prototype);return ym}())z=q.closest("[".concat(K,"]"));else for(var Y=q;Y;){if(Y.hasAttribute(K)){z=Y;break}Y=Y.parentElement}if(z)return Sm(Tm(z.getAttribute(K).trim()))}var mm,ym,_m=[function(q,K){if(function(){void 0===mm&&(mm="labels"in HTMLInputElement.prototype);return mm}()){if("labels"in q&&q.labels&&q.labels.length>0)return Am(q.labels[0],K)}else if(q.id){var z=q.ownerDocument&&tp(q.ownerDocument.querySelectorAll("label"),(function(K){return K.htmlFor===q.id}));return z&&Am(z,K)}},function(q){if("INPUT"===q.nodeName){var K=q,z=K.getAttribute("type");if("button"===z||"submit"===z||"reset"===z)return K.value}},function(q,K){if("BUTTON"===q.nodeName||"LABEL"===q.nodeName||"button"===q.getAttribute("role"))return Am(q,K)},function(q){return q.getAttribute("aria-label")},function(q,K){var z=q.getAttribute("aria-labelledby");if(z)return z.split(/\s+/).map((function(K){return function(q,K){return q.ownerDocument?q.ownerDocument.getElementById(K):null}(q,K)})).filter((function(q){return Boolean(q)})).map((function(q){return Am(q,K)})).join(" ")},function(q){return q.getAttribute("alt")},function(q){return q.getAttribute("name")},function(q){return q.getAttribute("title")},function(q){return q.getAttribute("placeholder")},function(q,K){if("options"in q&&q.options.length>0)return Am(q.options[0],K)}],Em=[function(q,K){return Am(q,K)}];function wm(q,K,z){for(var Y=q,Q=0;Q<=10&&Y&&"BODY"!==Y.nodeName&&"HTML"!==Y.nodeName&&"HEAD"!==Y.nodeName;){for(var X=0,Z=z;X100?"".concat(dp(q,100)," [...]"):q}function Am(q,K){if(!q.isContentEditable){if("innerText"in q){var z=q.innerText,Y=function(K){for(var Y=q.querySelectorAll(K),Q=0;Q0&&(z=z.replace(Z,""))}}};return Boolean(document.documentMode)&&Y("script, style"),Y("[".concat(pm,"]")),K&&Y("[".concat(K,"]")),z}return q.textContent}}var Cm,Om=[pm,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],Im=[Mm,function(q){if(q.id&&!Pm(q.id))return"#".concat(gp(q.id))}],Dm=[Mm,function(q){if("BODY"===q.tagName)return;if(q.classList.length>0)for(var K=0;K").concat(K):q}function Um(){var q=window.getSelection();return!q||q.isCollapsed}function Fm(q){return q.target instanceof Element&&!1!==q.isPrimary}function Gm(q,K){if(function(q){if(q.some((function(q){return q.getUserActivity().selection})))return!1;for(var K=0;K0},get hasPageActivity(){return void 0!==X},getUserActivity:z,addFrustration:function(q){st.push(q)},startClocks:J,isStopped:function(){return 1===it||2===it},clone:function(){return Hm(q,K,z,Y,Q)},validate:function(K){if(at(),1===it){var z=et.eventCounts,tt=z.resourceCount,nt=z.errorCount,rt=z.longTaskCount,ot=Vb({type:"click",duration:X&&Pp(J.timeStamp,X),startClocks:J,id:Z,frustrationTypes:st,counts:{resourceCount:tt,errorCount:nt,longTaskCount:rt},events:null!=K?K:[Q],event:Q},Y);q.notify(1,ot),it=2}},discard:function(){at(),it=2}}}function Vm(q,K){var z=Wm(q)?{action:{id:q.id,loading_time:Ap(q.duration),frustration:{type:q.frustrationTypes},error:{count:q.counts.errorCount},long_task:{count:q.counts.longTaskCount},resource:{count:q.counts.resourceCount}},_dd:{action:{target:q.target,position:q.position}}}:void 0,Y=Wm(q)?void 0:q.context,Q=bp({action:{id:qb(),target:{name:q.name},type:q.type},date:q.startClocks.timeStamp,type:"action"},z),X=K.isInForegroundAt(q.startClocks.relative);return void 0!==X&&(Q.view={in_foreground:X}),{customerContext:Y,rawRumEvent:Q,startTime:q.startClocks.relative,domainContext:Wm(q)?{event:q.event,events:q.events}:{}}}function Wm(q){return"custom"!==q.type}var qm=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Km(q){var K=function(q){return Yg(window,"onerror",{before:function(K,z,Y,Q,X){var Z;if(X)Z=qp(X),q(Z,X);else{var J,tt={url:z,column:Q,line:Y},et=K;if("[object String]"==={}.toString.call(K)){var it=qm.exec(et);it&&(J=it[1],et=it[2])}q(Z={name:J,message:"string"==typeof et?et:void 0,stack:[tt]},K)}}})}(q).stop,z=function(q){return Yg(window,"onunhandledrejection",{before:function(K){var z=K.reason||"Empty reason",Y=qp(z);q(Y,z)}})}(q).stop;return{stop:function(){K(),z()}}}var zm={};function Ym(q){var K=q.map((function(q){return zm[q]||(zm[q]=function(q){var K=new kv((function(){var z=console[q];return console[q]=function(){for(var Y=[],Q=0;Q=Y-X&&ay(z)<=Mp(Q,X);var z,Y,Q,X}));return 1===z.length?z[0]:void 0}}}function ay(q){return Mp(q.startTime,q.duration)}function ry(q,K,z,Y){q.subscribe(6,(function(Q){q.notify(10,function(q,K,z,Y){var Q,X="xhr"===q.type?"xhr":"fetch",Z=ny(q),J=Z?Tp(Z.startTime):q.startClocks,tt=Z?hy(Z):void 0,et=function(q,K){if(!(q.traceSampled&&q.traceId&&q.spanId))return;return{_dd:{span_id:q.spanId.toDecimalString(),trace_id:q.traceId.toDecimalString(),rule_psr:cy(K)}}}(q,K),it=dy(z,J),st=Ap(q.duration),nt=function(q,K){if(!Hp("resource_durations"))return;return{_dd:{computed_duration:q,performance_entry_duration:K,override_duration_diff:K?q-K:void 0}}}(st,null==tt?void 0:tt.resource.duration),at=ly(Y,J,null!==(Q=null==Z?void 0:Z.duration)&&void 0!==Q?Q:q.duration),rt=bp({date:J.timeStamp,resource:{id:qb(),type:X,duration:st,method:q.method,status_code:q.status,url:q.url},type:"resource"},et,tt,it,nt,at);return{startTime:J.relative,rawRumEvent:rt,domainContext:{performanceEntry:Z&&Z,xhr:q.xhr,response:q.response,requestInput:q.input,requestInit:q.init,error:q.error}}}(Q,K,z,Y))})),q.subscribe(0,(function(Q){for(var X=0,Z=Q;X=0&&Q.responseStart<=Ip()?Q.responseStart:void 0})}})).unsubscribe}}(q,Y).stop,X=function(q,K){var z=uy();return{stop:q.subscribe(0,(function(q){var Y=tp(q,(function(q){return"paint"===q.entryType&&"first-contentful-paint"===q.name&&q.startTime=0;z-=1){var Y=q[z];if(K(Y,z,q))return Y}}(q,(function(q){return"largest-contentful-paint"===q.entryType&&q.startTime=0?Q:0,firstInputTime:Y.startTime})}})).unsubscribe}}(q,(function(q){Y({firstInputDelay:q.firstInputDelay,firstInputTime:q.firstInputTime})})).stop;return{stop:function(){Q(),X(),Z(),J()}}}function py(q,K,z,Y,Q,X){var Z,J={},tt=function(q,K,z,Y,Q,X){var Z="initial_load"===Y,J=!0,tt=[];function et(){!J&&!Z&&tt.length>0&&X(Math.max.apply(Math,tt))}return{stop:lm(q,K,z,(function(q){J&&(J=!1,q.hadActivity&&tt.push(Pp(Q.timeStamp,q.end)),et())})).stop,setLoadEvent:function(q){Z&&(Z=!1,tt.push(q),et())}}}(q,K,z,Q,X,(function(q){J.loadingTime=q,Y()})),et=tt.stop,it=tt.setLoadEvent;return Eg("layout-shift")?(J.cumulativeLayoutShift=0,Z=function(q,K){var z=0,Y=function(){var q,K,z=0;return{update:function(Y){void 0===q||Y.startTime-K>=jb||Y.startTime-q>=5e3?(q=K=Y.startTime,z=Y.value):(z+=Y.value,K=Y.startTime)},value:function(){return z}}}();return{stop:q.subscribe(0,(function(q){for(var Q=0,X=q;Qz&&(z=Y.value(),K(zb(z,4))))}})).unsubscribe}}(q,(function(q){J.cumulativeLayoutShift=q,Y()})).stop):Z=Yb,{stop:function(){et(),Z()},setLoadEvent:it,viewMetrics:J}}function vy(q,K,z,Y,Q,X,Z){var J,tt=function(Q){var X=gy(K,z,Y,q,"initial_load",Rp(),Q),Z=by(K,(function(q){X.updateTimings(q),X.scheduleUpdate()})).stop;return{initialView:X,stop:Z}}(Z),et=tt.stop,it=tt.initialView,st=function(){K.subscribe(8,(function(){it.end(),it=nt(void 0,{name:it.name,service:it.service,version:it.version})})),K.subscribe(9,(function(q){q.reason!==Gv.UNLOADING&&q.reason!==Gv.PAGEHIDE||(it.end(),it.triggerUpdate())}));var q=window.setInterval(Lb((function(){it.triggerUpdate()})),3e5);return{stop:function(){clearInterval(q)}}}().stop;function nt(Q,X){return gy(K,z,Y,q,"route_change",Q,X)}return X&&(J=function(q){return q.subscribe((function(q){var K,z,Y,Q,X=q.oldLocation,Z=q.newLocation;if(z=Z,(K=X).pathname!==z.pathname||(Y=z.hash,Q=Y.substr(1),!document.getElementById(Q)&&my(z.hash)!==my(K.hash)))return it.end(),it.triggerUpdate(),void(it=nt())}))}(Q)),{addTiming:function(q,K){void 0===K&&(K=Op()),it.addTiming(q,K),it.scheduleUpdate()},startView:function(q,K){it.end(K),it.triggerUpdate(),it=nt(K,q)},stop:function(){null==J||J.unsubscribe(),et(),st(),it.end()}}}function gy(q,K,z,Y,Q,X,Z){void 0===X&&(X=Dp());var J,tt,et,it,st=qb(),nt={},at={},rt=0,ot=Wb(Y);Z&&(tt=Z.name,et=Z.service,it=Z.version),q.notify(2,{id:st,name:tt,startClocks:X,service:et,version:it});var ht=Hb(mt,3e3,{leading:!1}),ct=ht.throttled,dt=ht.cancel,lt=py(q,K,z,ct,Q,X),ut=lt.setLoadEvent,ft=lt.stop,bt=lt.viewMetrics,pt=function(q,K,z){var Y=cm({lifeCycle:q,isChildEvent:function(q){return q.view.id===K},onChange:z}),Q=Y.stop;return{scheduleStop:function(){Fb(Q,3e5)},eventCounts:Y.eventCounts}}(q,st,ct),vt=pt.scheduleStop,gt=pt.eventCounts;function mt(){rt+=1;var K=void 0===J?Op():J.timeStamp;q.notify(3,Vb({customTimings:at,documentVersion:rt,id:st,name:tt,service:et,version:it,loadingType:Q,location:ot,startClocks:X,timings:nt,duration:Pp(X.timeStamp,K),isActive:void 0===J,eventCounts:gt},bt))}return mt(),{name:tt,service:et,version:it,scheduleUpdate:ct,end:function(K){void 0===K&&(K=Dp()),J=K,q.notify(4,{endClocks:J}),ft(),vt()},triggerUpdate:function(){dt(),mt()},updateTimings:function(q){nt=q,void 0!==q.loadEvent&&ut(q.loadEvent)},addTiming:function(q,K){var z=function(q){return q<31536e6}(K)?K:Pp(X.timeStamp,K);at[function(q){var K=q.replace(/[^a-zA-Z0-9-_.@$]/g,"_");K!==q&&Db.warn("Invalid timing name: ".concat(q,", sanitized to: ").concat(K));return K}(q)]=z}}}function my(q){var K=q.indexOf("?");return K<0?q:q.slice(0,K)}function yy(q,K,z,Y,Q,X,Z,J,tt){return q.subscribe(3,(function(K){return q.notify(10,function(q,K,z,Y){var Q=Y.getReplayStats(q.id),X=z.findFeatureFlagEvaluations(q.startClocks.relative),Z={_dd:{document_version:q.documentVersion,replay_stats:Q},date:q.startClocks.timeStamp,type:"view",view:{action:{count:q.eventCounts.actionCount},frustration:{count:q.eventCounts.frustrationCount},cumulative_layout_shift:q.cumulativeLayoutShift,first_byte:Ap(q.timings.firstByte),dom_complete:Ap(q.timings.domComplete),dom_content_loaded:Ap(q.timings.domContentLoaded),dom_interactive:Ap(q.timings.domInteractive),error:{count:q.eventCounts.errorCount},first_contentful_paint:Ap(q.timings.firstContentfulPaint),first_input_delay:Ap(q.timings.firstInputDelay),first_input_time:Ap(q.timings.firstInputTime),is_active:q.isActive,name:q.name,largest_contentful_paint:Ap(q.timings.largestContentfulPaint),load_event:Ap(q.timings.loadEvent),loading_time:_y(Ap(q.loadingTime)),loading_type:q.loadingType,long_task:{count:q.eventCounts.longTaskCount},resource:{count:q.eventCounts.resourceCount},time_spent:Ap(q.duration),in_foreground_periods:K.selectInForegroundPeriodsFor(q.startClocks.relative,q.duration)},feature_flags:X&&!ap(X)?X:void 0,session:{has_replay:!!Q||void 0}};ap(q.customTimings)||(Z.view.custom_timings=function(q,K){for(var z={},Y=0,Q=Object.keys(q);Y=100)Dy();else{var Y,Q=My();if(Oy()){if(Q.lock)return void Iy(q,K);if(Y=qb(),Q.lock=Y,Py(Q,q.options),(Q=My()).lock!==Y)return void Iy(q,K)}var X=q.process(Q);if(Oy()&&(Q=My()).lock!==Y)Iy(q,K);else{if(X&&Ry(X,q.options),Oy()&&(!X||!Ny(X))){if((Q=My()).lock!==Y)return void Iy(q,K);delete Q.lock,Py(Q,q.options),X=Q}null===(z=q.after)||void 0===z||z.call(q,X||Q),Dy()}}else Ay.push(q)}function Oy(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}function Iy(q,K){Fb((function(){Cy(q,K+1)}),10)}function Dy(){Ey=void 0;var q=Ay.shift();q&&Cy(q)}function Ry(q,K){Ny(q)?function(q){kp(Sy,"",0,q)}(K):(q.expire=String(Cp()+Wg),Py(q,K))}function Py(q,K){kp(Sy,function(q){return np(q).map((function(q){var K=q[0],z=q[1];return"".concat(K,"=").concat(z)})).join(Ty)}(q),Wg,K)}function My(){var q=Bp(Sy),K={};return function(q){return void 0!==q&&(-1!==q.indexOf(Ty)||wy.test(q))}(q)&&q.split(Ty).forEach((function(q){var z=wy.exec(q);if(null!==z){var Y=z[1],Q=z[2];K[Y]=Q}})),K}function Ny(q){return ap(q)}function xy(q,K,z){var Y=new kv,Q=new kv,X=setInterval(Lb((function(){Cy({options:q,process:function(q){return et(q)?void 0:{}},after:J})})),1e3),Z=function(){var q=My();if(et(q))return q;return{}}();function J(q){return et(q)||(q={}),tt()&&(!function(q){return Z.id!==q.id||Z[K]!==q[K]}(q)?Z=q:(Z={},Q.notify())),q}function tt(){return void 0!==Z[K]}function et(q){return(void 0===q.created||Cp()-Number(q.created)=this.messageBytesLimit?Db.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(K)&&this.remove(K),this.willReachedBytesLimitWith(Q)&&this.flush("batch_bytes_limit"),this.push(Y,Q,K),this.isFull()&&this.flush("batch_bytes_limit"))},q.prototype.process=function(q){var K=Qb(q);return{processedMessage:K,messageBytesCount:yp(K)}},q.prototype.push=function(q,K,z){this.bufferMessagesCount>0&&(this.bufferBytesCount+=1),void 0!==z?this.upsertBuffer[z]=q:this.pushOnlyBuffer.push(q),this.bufferBytesCount+=K,this.bufferMessagesCount+=1},q.prototype.remove=function(q){var K=this.upsertBuffer[q];delete this.upsertBuffer[q];var z=yp(K);this.bufferBytesCount-=z,this.bufferMessagesCount-=1,this.bufferMessagesCount>0&&(this.bufferBytesCount-=1)},q.prototype.hasMessageFor=function(q){return void 0!==q&&void 0!==this.upsertBuffer[q]},q.prototype.willReachedBytesLimitWith=function(q){return this.bufferBytesCount+q+1>=this.batchBytesLimit},q.prototype.isFull=function(){return this.bufferMessagesCount===this.batchMessagesLimit||this.bufferBytesCount>=this.batchBytesLimit},q.prototype.flushPeriodically=function(){var q=this;Fb((function(){q.flush("batch_duration_limit"),q.flushPeriodically()}),this.flushTimeout)},q}(),Gy=3145728;function jy(q,K,z,Y,Q){0===K.transportStatus&&0===K.queuedPayloads.size()&&K.bandwidthMonitor.canHandle(q)?Hy(q,K,z,{onSuccess:function(){return Vy(0,K,z,Y,Q)},onFailure:function(){K.queuedPayloads.enqueue(q),$y(K,z,Y,Q)}}):K.queuedPayloads.enqueue(q)}function $y(q,K,z,Y){2===q.transportStatus&&Fb((function(){Hy(q.queuedPayloads.first(),q,K,{onSuccess:function(){q.queuedPayloads.dequeue(),q.currentBackoffTime=1e3,Vy(1,q,K,z,Y)},onFailure:function(){q.currentBackoffTime=Math.min(6e4,2*q.currentBackoffTime),$y(q,K,z,Y)}})}),q.currentBackoffTime)}function Hy(q,K,z,Y){var Q=Y.onSuccess,X=Y.onFailure;K.bandwidthMonitor.add(q),z(q,(function(z){K.bandwidthMonitor.remove(q),!function(q){return"opaque"!==q.type&&(0===q.status&&!navigator.onLine||408===q.status||429===q.status||q.status>=500)}(z)?(K.transportStatus=0,Q()):(K.transportStatus=K.bandwidthMonitor.ongoingRequestCount>0?1:2,q.retry={count:q.retry?q.retry.count+1:1,lastFailureStatus:z.status},X())}))}function Vy(q,K,z,Y,Q){0===q&&K.queuedPayloads.isFull()&&!K.queueFullReported&&(Q({message:"Reached max ".concat(Y," events size queued for upload: ").concat(3,"MiB"),source:sv,startClocks:Dp()}),K.queueFullReported=!0);var X=K.queuedPayloads;for(K.queuedPayloads=Wy();X.size()>0;)jy(X.dequeue(),K,z,Y,Q)}function Wy(){var q=[];return{bytesCount:0,enqueue:function(K){this.isFull()||(q.push(K),this.bytesCount+=K.bytesCount)},first:function(){return q[0]},dequeue:function(){var K=q.shift();return K&&(this.bytesCount-=K.bytesCount),K},size:function(){return q.length},isFull:function(){return this.bytesCount>=Gy}}}function qy(q,K,z){var Y={transportStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(q){return 0===this.ongoingRequestCount||this.ongoingByteCount+q.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(q){this.ongoingRequestCount+=1,this.ongoingByteCount+=q.bytesCount},remove:function(q){this.ongoingRequestCount-=1,this.ongoingByteCount-=q.bytesCount}},queuedPayloads:Wy(),queueFullReported:!1},Q=function(z,Y){return function(q,K,z,Y){var Q=z.data,X=z.bytesCount,Z=z.flushReason,J=z.retry;if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(z){return!1}}()&&X0?Array.from(q.media):void 0}}))}function hE(q,K,z){return cE(q,{serializationContext:z,parentNodePrivacyLevel:K.defaultPrivacyLevel,configuration:K})}function cE(q,K){var z=function(q,K){switch(q.nodeType){case q.DOCUMENT_NODE:return function(q,K){return{type:v_,childNodes:dE(q,K),adoptedStyleSheets:oE(q.adoptedStyleSheets)}}(q,K);case q.DOCUMENT_FRAGMENT_NODE:return function(q,K){var z=[];q.childNodes.length&&(z=dE(q,K));var Y=fg(q);Y&&K.serializationContext.shadowRootsController.addShadowRoot(q);return{type:E_,childNodes:z,isShadowRoot:Y,adoptedStyleSheets:Y?oE(q.adoptedStyleSheets):void 0}}(q,K);case q.DOCUMENT_TYPE_NODE:return{type:g_,name:(z=q).name,publicId:z.publicId,systemId:z.systemId};case q.ELEMENT_NODE:return function(q,K){var z,Y=bE(q.tagName),Q=(Z=q,"svg"===Z.tagName||Z instanceof SVGElement||void 0),X=z_(Y_(q),K.parentNodePrivacyLevel);var Z;if(X===$_.HIDDEN){var J=q.getBoundingClientRect(),tt=J.width,et=J.height;return{type:m_,tagName:Y,attributes:(z={rr_width:"".concat(tt,"px"),rr_height:"".concat(et,"px")},z[H_]=V_,z),childNodes:[],isSVG:Q}}if(X===$_.IGNORE)return;var it=function(q,K,z){var Y;if(K===$_.HIDDEN)return{};for(var Q={},X=bE(q.tagName),Z=q.ownerDocument,J=0;J1e5&&"data:"===Q.slice(0,5)?"data:truncated":Q}var uE=1;var fE=/[^a-z1-6-_]/;function bE(q){var K=q.toLowerCase().trim();return fE.test(K)?"div":K}function pE(q){if(!q)return null;var K;try{K=q.rules||q.cssRules}catch(Ie){}return K?rE(Array.from(K,vE).join(""),q.href):null}function vE(q){return function(q){return"styleSheet"in q}(q)?pE(q.styleSheet)||"":q.cssText}function gE(q){return Boolean(q.changedTouches)}function mE(q,K){return{data:Vb({source:q},K),type:d_,timestamp:Op()}}function yE(q){for(var K=[],z=q;z.parentRule;){var Y=Array.from(z.parentRule.cssRules).indexOf(z);K.unshift(Y),z=z.parentRule}if(z.parentStyleSheet){var Q=Array.from(z.parentStyleSheet.cssRules).indexOf(z);return K.unshift(Q),K}}var _E=function(q,K){var z=window.visualViewport,Y={layoutViewportX:q,layoutViewportY:K,visualViewportX:q,visualViewportY:K};return z?(!function(){var q=window.visualViewport;return Math.abs(q.pageTop-q.offsetTop-window.scrollY)>25||Math.abs(q.pageLeft-q.offsetLeft-window.scrollX)>25}()?(Y.visualViewportX=Math.round(q-z.offsetLeft),Y.visualViewportY=Math.round(K-z.offsetTop)):(Y.layoutViewportX=Math.round(q+z.offsetLeft),Y.layoutViewportY=Math.round(K+z.offsetTop)),Y):Y},EE=function(){var q=window.visualViewport;return{scale:q.scale,offsetLeft:q.offsetLeft,offsetTop:q.offsetTop,pageLeft:q.pageLeft,pageTop:q.pageTop,height:q.height,width:q.width}};function wE(){var q,K=window.visualViewport;return q=K?K.pageLeft-K.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(q)}function TE(){var q,K=window.visualViewport;return q=K?K.pageTop-K.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(q)}function SE(q){return!0===q.composed&&ug(q.target)?q.composedPath()[0]:q.target}var AE=new WeakMap,CE=1;function OE(q){return AE.has(q)||AE.set(q,CE++),AE.get(q)}function IE(q){var K=gE(q)?q.changedTouches[0]:q,z=K.clientX,Y=K.clientY;if(window.visualViewport){var Q=_E(z,Y);z=Q.visualViewportX,Y=Q.visualViewportY}if(Number.isFinite(z)&&Number.isFinite(Y))return{x:z,y:Y};q.isTrusted&&zv("mouse/touch event without x/y")}var DE;var RE=((DE={}).pointerup=P_,DE.mousedown=M_,DE.click=N_,DE.contextmenu=x_,DE.dblclick=L_,DE.focus=k_,DE.blur=B_,DE.touchstart=U_,DE.touchend=F_,DE);function PE(q,K,z){var Y=void 0===z?{}:z,Q=Y.domEvents,X=void 0===Q?["input","change"]:Q,Z=Y.target,J=void 0===Z?document:Z,tt=new WeakMap;function et(q){var z=K_(q,K);if(z!==$_.HIDDEN){var Y,Q=q.type;if("radio"===Q||"checkbox"===Q){if(Q_(q,z))return;Y={isChecked:q.checked}}else{var X=iE(q,z);if(void 0===X)return;Y={text:X}}it(q,Y);var Z,J,tt=q.name;"radio"===Q&&tt&&q.checked&&(Z=document.querySelectorAll('input[type="radio"][name="'.concat(tt,'"]')),J=function(K){K!==q&&it(K,{isChecked:!1})},Array.prototype.forEach.call(Z,J))}}function it(K,z){if(tE(K)){var Y=tt.get(K);Y&&Y.text===z.text&&Y.isChecked===z.isChecked||(tt.set(K,z),q(Vb({id:eE(K)},z)))}}var st=Fv(J,X,(function(q){var K=SE(q);(K instanceof HTMLInputElement||K instanceof HTMLTextAreaElement||K instanceof HTMLSelectElement)&&et(K)}),{capture:!0,passive:!0}).stop,nt=[Qg(HTMLInputElement.prototype,"value",et),Qg(HTMLInputElement.prototype,"checked",et),Qg(HTMLSelectElement.prototype,"value",et),Qg(HTMLTextAreaElement.prototype,"value",et),Qg(HTMLSelectElement.prototype,"selectedIndex",et)];return function(){nt.forEach((function(q){return q.stop()})),st()}}function ME(q){var K=Yb,z=[];function Y(){K(),q(z),z=[]}return{addMutations:function(q){0===z.length&&(K=function(q,K){if(window.requestIdleCallback&&window.cancelIdleCallback){var z=window.requestIdleCallback(Lb(q),K);return function(){return window.cancelIdleCallback(z)}}var Y=window.requestAnimationFrame(Lb(q));return function(){return window.cancelAnimationFrame(Y)}}(Y,{timeout:100})),z.push.apply(z,q)},flush:Y,stop:function(){K()}}}function NE(q,K,z,Y){var Q=Zv();if(!Q)return{stop:Yb,flush:Yb};var X=ME((function(Q){!function(q,K,z,Y,Q){q.filter((function(q){return"childList"===q.type})).forEach((function(q){q.removedNodes.forEach((function(q){xE(q,Y.removeShadowRoot)}))}));var X=q.filter((function(q){return Q.contains(q.target)&&function(q){for(var K=q;K;){if(!tE(K)&&!fg(K))return!1;K=bg(K)}return!0}(q.target)&&K_(q.target,z.defaultPrivacyLevel)!==$_.HIDDEN})),Z=function(q,K,z){for(var Y=new Set,Q=new Map,X=function(q){q.addedNodes.forEach((function(q){Y.add(q)})),q.removedNodes.forEach((function(K){Y.has(K)||Q.set(K,q.target),Y.delete(K)}))},Z=0,J=q;Z10&&function(){if(!FE)return;if(FE.keys)FE.delete(FE.keys().next().value);else{var q=!0;FE.forEach((function(K,z){q&&(FE.delete(z),q=!1)}))}}()),K}var VE,WE=0,qE=function(){function q(q,K,z,Y,Q,X){var Z=this;this.worker=q,this.id=WE++;var J=K.view.id;this.metadata=Vb({start:Y.timestamp,end:Y.timestamp,creation_reason:z,records_count:1,has_full_snapshot:Y.type===c_,index_in_view:GE(J),source:"browser"},K),function(q){HE(q).segments_count+=1}(J),jE(J);var tt=Lb((function(K){var z=K.data;"errored"!==z.type&&"initialized"!==z.type&&(z.id===Z.id?(!function(q,K){HE(q).segments_total_raw_size+=K}(J,z.additionalBytesCount),"flushed"===z.type?(X(z.result,z.rawBytesCount),q.removeEventListener("message",tt)):Q(z.compressedBytesCount)):z.id>Z.id&&(q.removeEventListener("message",tt),zv("Segment did not receive a 'flush' response before being replaced.")))}));q.addEventListener("message",tt),Lv("record",{record:Y,segment:this.metadata}),this.worker.postMessage({data:'{"records":['.concat(JSON.stringify(Y)),id:this.id,action:"write"})}return q.prototype.addRecord=function(q){var K;this.metadata.start=Math.min(this.metadata.start,q.timestamp),this.metadata.end=Math.max(this.metadata.end,q.timestamp),this.metadata.records_count+=1,jE(this.metadata.view.id),(K=this.metadata).has_full_snapshot||(K.has_full_snapshot=q.type===c_),Lv("record",{record:q,segment:this.metadata}),this.worker.postMessage({data:",".concat(JSON.stringify(q)),id:this.id,action:"write"})},q.prototype.flush=function(q){this.worker.postMessage({data:"],".concat(JSON.stringify(this.metadata).slice(1),"\n"),id:this.id,action:"flush"}),this.flushReason=q},q}(),KE=6e4;function zE(q,K,z,Y,Q,X){return function(q,K,z,Y){var Q={status:0,nextSegmentCreationReason:"init"},X=q.subscribe(2,(function(){J("view_change")})).unsubscribe,Z=q.subscribe(9,(function(q){J(q.reason)})).unsubscribe;function J(q){1===Q.status&&(Q.segment.flush(q),Gb(Q.expirationTimeoutId)),Q="stop"!==q?{status:0,nextSegmentCreationReason:q}:{status:2}}function tt(q,X){var Z=K();if(Z){var tt=new qE(Y,Z,q,X,(function(q){!tt.flushReason&&q>KE&&J("segment_bytes_limit")}),(function(q,K){var Y,Q=BE(q,tt.metadata,K);Y=tt.flushReason,Zb(sp(Gv),Y)?z.sendOnExit(Q):z.send(Q)}));Q={status:1,segment:tt,expirationTimeoutId:Fb((function(){J("segment_duration_limit")}),3e4)}}}return{addRecord:function(q){switch(Q.status){case 0:tt(Q.nextSegmentCreationReason,q);break;case 1:Q.segment.addRecord(q)}},stop:function(){J("stop"),X(),Z()}}}(q,(function(){return function(q,K,z){var Y=K.findTrackedSession(),Q=z.findView();if(!Y||!Q)return;return{application:{id:q},session:{id:Y.id},view:{id:Q.id}}}(K,z,Y)}),Q,X)}function YE(){return VE||(VE=URL.createObjectURL(new Blob(["(".concat(QE,")(self)")]))),new Worker(VE)}function QE(){function q(q){return function(){try{return q.apply(this,arguments)}catch(e){try{self.postMessage({type:"errored",error:e})}catch(K){self.postMessage({type:"errored",error:"".concat(e)})}}}}q((function(){var K=function(){var q=4,K=0,z=1,Y=2;function Q(q){for(var K=q.length;--K>=0;)q[K]=0}var X=0,Z=1,J=2,tt=3,et=258,it=29,st=256,nt=st+1+it,at=30,rt=19,ot=2*nt+1,ht=15,ct=16,dt=7,lt=256,ut=16,ft=17,bt=18,pt=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]),vt=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]),gt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),mt=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yt=512,_t=new Array(2*(nt+2));Q(_t);var Et=new Array(2*at);Q(Et);var wt=new Array(yt);Q(wt);var Tt=new Array(et-tt+1);Q(Tt);var St=new Array(it);Q(St);var At,Ct,Ot,It=new Array(at);function Dt(q,K,z,Y,Q){this.static_tree=q,this.extra_bits=K,this.extra_base=z,this.elems=Y,this.max_length=Q,this.has_stree=q&&q.length}function Rt(q,K){this.dyn_tree=q,this.max_code=0,this.stat_desc=K}Q(It);var Pt=function(q){return q<256?wt[q]:wt[256+(q>>>7)]},Mt=function(q,K){q.pending_buf[q.pending++]=255&K,q.pending_buf[q.pending++]=K>>>8&255},Nt=function(q,K,z){q.bi_valid>ct-z?(q.bi_buf|=K<>ct-q.bi_valid,q.bi_valid+=z-ct):(q.bi_buf|=K<>>=1,z<<=1}while(--K>0);return z>>>1},kt=function(q){16===q.bi_valid?(Mt(q,q.bi_buf),q.bi_buf=0,q.bi_valid=0):q.bi_valid>=8&&(q.pending_buf[q.pending++]=255&q.bi_buf,q.bi_buf>>=8,q.bi_valid-=8)},Bt=function(q,K){var z,Y,Q,X,Z,J,tt=K.dyn_tree,et=K.max_code,it=K.stat_desc.static_tree,st=K.stat_desc.has_stree,nt=K.stat_desc.extra_bits,at=K.stat_desc.extra_base,rt=K.stat_desc.max_length,ct=0;for(X=0;X<=ht;X++)q.bl_count[X]=0;for(tt[2*q.heap[q.heap_max]+1]=0,z=q.heap_max+1;zrt&&(X=rt,ct++),tt[2*Y+1]=X,Y>et||(q.bl_count[X]++,Z=0,Y>=at&&(Z=nt[Y-at]),J=tt[2*Y],q.opt_len+=J*(X+Z),st&&(q.static_len+=J*(it[2*Y+1]+Z)));if(0!==ct){do{for(X=rt-1;0===q.bl_count[X];)X--;q.bl_count[X]--,q.bl_count[X+1]+=2,q.bl_count[rt]--,ct-=2}while(ct>0);for(X=rt;0!==X;X--)for(Y=q.bl_count[X];0!==Y;)(Q=q.heap[--z])>et||(tt[2*Q+1]!==X&&(q.opt_len+=(X-tt[2*Q+1])*tt[2*Q],tt[2*Q+1]=X),Y--)}},Ut=function(q,K,z){var Y,Q,X=new Array(ht+1),Z=0;for(Y=1;Y<=ht;Y++)X[Y]=Z=Z+z[Y-1]<<1;for(Q=0;Q<=K;Q++){var J=q[2*Q+1];0!==J&&(q[2*Q]=Lt(X[J]++,J))}},Ft=function(){var q,K,z,Y,Q,X=new Array(ht+1);for(z=0,Y=0;Y>=7;Y8?Mt(q,q.bi_buf):q.bi_valid>0&&(q.pending_buf[q.pending++]=q.bi_buf),q.bi_buf=0,q.bi_valid=0},$t=function(q,K,z,Y){jt(q),Y&&(Mt(q,z),Mt(q,~z)),q.pending_buf.set(q.window.subarray(K,K+z),q.pending),q.pending+=z},Ht=function(q,K,z,Y){var Q=2*K,X=2*z;return q[Q]>1;z>=1;z--)Vt(q,X,z);Q=tt;do{z=q.heap[1],q.heap[1]=q.heap[q.heap_len--],Vt(q,X,1),Y=q.heap[1],q.heap[--q.heap_max]=z,q.heap[--q.heap_max]=Y,X[2*Q]=X[2*z]+X[2*Y],q.depth[Q]=(q.depth[z]>=q.depth[Y]?q.depth[z]:q.depth[Y])+1,X[2*z+1]=X[2*Y+1]=Q,q.heap[1]=Q++,Vt(q,X,1)}while(q.heap_len>=2);q.heap[--q.heap_max]=q.heap[1],Bt(q,K),Ut(X,et,q.bl_count)},Kt=function(q,K,z){var Y,Q,X=-1,Z=K[1],J=0,tt=7,et=4;for(0===Z&&(tt=138,et=3),K[2*(z+1)+1]=65535,Y=0;Y<=z;Y++)Q=Z,Z=K[2*(Y+1)+1],++J=3&&0===q.bl_tree[2*mt[K]+1];K--);return q.opt_len+=3*(K+1)+5+5+4,K},Qt=function(q,K,z,Y){var Q;for(Nt(q,K-257,5),Nt(q,z-1,5),Nt(q,Y-4,4),Q=0;Q>>=1)if(1&Q&&0!==q.dyn_ltree[2*Y])return K;if(0!==q.dyn_ltree[18]||0!==q.dyn_ltree[20]||0!==q.dyn_ltree[26])return z;for(Y=32;Y0?(K.strm.data_type===Y&&(K.strm.data_type=Xt(K)),qt(K,K.l_desc),qt(K,K.d_desc),it=Yt(K),tt=K.opt_len+3+7>>>3,(et=K.static_len+3+7>>>3)<=tt&&(tt=et)):tt=et=Q+5,Q+4<=tt&&-1!==z?Jt(K,z,Q,X):K.strategy===q||et===tt?(Nt(K,(Z<<1)+(X?1:0),3),Wt(K,_t,Et)):(Nt(K,(J<<1)+(X?1:0),3),Qt(K,K.l_desc.max_code+1,K.d_desc.max_code+1,it+1),Wt(K,K.dyn_ltree,K.dyn_dtree)),Gt(K),X&&jt(K)},ee={_tr_init:function(q){Zt||(Ft(),Zt=!0),q.l_desc=new Rt(q.dyn_ltree,At),q.d_desc=new Rt(q.dyn_dtree,Ct),q.bl_desc=new Rt(q.bl_tree,Ot),q.bi_buf=0,q.bi_valid=0,Gt(q)},_tr_stored_block:Jt,_tr_flush_block:te,_tr_tally:function(q,K,z){return q.pending_buf[q.d_buf+2*q.last_lit]=K>>>8&255,q.pending_buf[q.d_buf+2*q.last_lit+1]=255&K,q.pending_buf[q.l_buf+q.last_lit]=255&z,q.last_lit++,0===K?q.dyn_ltree[2*z]++:(q.matches++,K--,q.dyn_ltree[2*(Tt[z]+st+1)]++,q.dyn_dtree[2*Pt(K)]++),q.last_lit===q.lit_bufsize-1},_tr_align:function(q){Nt(q,Z<<1,3),xt(q,lt,_t),kt(q)}},ie=function(q,K,z,Y){for(var Q=65535&q|0,X=q>>>16&65535|0,Z=0;0!==z;){z-=Z=z>2e3?2e3:z;do{X=X+(Q=Q+K[Y++]|0)|0}while(--Z);Q%=65521,X%=65521}return Q|X<<16|0},se=new Uint32Array(function(){for(var q,K=[],z=0;z<256;z++){q=z;for(var Y=0;Y<8;Y++)q=1&q?3988292384^q>>>1:q>>>1;K[z]=q}return K}()),ne=function(q,K,z,Y){var Q=se,X=Y+z;q^=-1;for(var Z=Y;Z>>8^Q[255&(q^K[Z])];return-1^q},ae={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"},re={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},oe=ee._tr_init,he=ee._tr_stored_block,ce=ee._tr_flush_block,de=ee._tr_tally,le=ee._tr_align,ue=re.Z_NO_FLUSH,fe=re.Z_PARTIAL_FLUSH,be=re.Z_FULL_FLUSH,pe=re.Z_FINISH,ve=re.Z_BLOCK,ge=re.Z_OK,me=re.Z_STREAM_END,ye=re.Z_STREAM_ERROR,_e=re.Z_DATA_ERROR,Ee=re.Z_BUF_ERROR,we=re.Z_DEFAULT_COMPRESSION,Te=re.Z_FILTERED,Se=re.Z_HUFFMAN_ONLY,Ae=re.Z_RLE,Ce=re.Z_FIXED,Oe=re.Z_DEFAULT_STRATEGY,Ie=re.Z_UNKNOWN,De=re.Z_DEFLATED,Re=9,Pe=15,Me=8,Ne=286,xe=30,Le=19,ke=2*Ne+1,Be=15,Ue=3,Fe=258,Ge=Fe+Ue+1,je=32,$e=42,He=69,Ve=73,We=91,qe=103,Ke=113,ze=666,Ye=1,Qe=2,Xe=3,Ze=4,Je=3,ti=function(q,K){return q.msg=ae[K],K},ei=function(q){return(q<<1)-(q>4?9:0)},ii=function(q){for(var K=q.length;--K>=0;)q[K]=0},si=function(q,K,z){return(K<q.avail_out&&(z=q.avail_out),0!==z&&(q.output.set(K.pending_buf.subarray(K.pending_out,K.pending_out+z),q.next_out),q.next_out+=z,K.pending_out+=z,q.total_out+=z,q.avail_out-=z,K.pending-=z,0===K.pending&&(K.pending_out=0))},ai=function(q,K){ce(q,q.block_start>=0?q.block_start:-1,q.strstart-q.block_start,K),q.block_start=q.strstart,ni(q.strm)},ri=function(q,K){q.pending_buf[q.pending++]=K},oi=function(q,K){q.pending_buf[q.pending++]=K>>>8&255,q.pending_buf[q.pending++]=255&K},hi=function(q,K,z,Y){var Q=q.avail_in;return Q>Y&&(Q=Y),0===Q?0:(q.avail_in-=Q,K.set(q.input.subarray(q.next_in,q.next_in+Q),z),1===q.state.wrap?q.adler=ie(q.adler,K,Q,z):2===q.state.wrap&&(q.adler=ne(q.adler,K,Q,z)),q.next_in+=Q,q.total_in+=Q,Q)},ci=function(q,K){var z,Y,Q=q.max_chain_length,X=q.strstart,Z=q.prev_length,J=q.nice_match,tt=q.strstart>q.w_size-Ge?q.strstart-(q.w_size-Ge):0,et=q.window,it=q.w_mask,st=q.prev,nt=q.strstart+Fe,at=et[X+Z-1],rt=et[X+Z];q.prev_length>=q.good_match&&(Q>>=2),J>q.lookahead&&(J=q.lookahead);do{if(et[(z=K)+Z]===rt&&et[z+Z-1]===at&&et[z]===et[X]&&et[++z]===et[X+1]){X+=2,z++;do{}while(et[++X]===et[++z]&&et[++X]===et[++z]&&et[++X]===et[++z]&&et[++X]===et[++z]&&et[++X]===et[++z]&&et[++X]===et[++z]&&et[++X]===et[++z]&&et[++X]===et[++z]&&XZ){if(q.match_start=K,Z=Y,Y>=J)break;at=et[X+Z-1],rt=et[X+Z]}}}while((K=st[K&it])>tt&&0!=--Q);return Z<=q.lookahead?Z:q.lookahead},di=function(q){var K,z,Y,Q,X,Z=q.w_size;do{if(Q=q.window_size-q.lookahead-q.strstart,q.strstart>=Z+(Z-Ge)){q.window.set(q.window.subarray(Z,Z+Z),0),q.match_start-=Z,q.strstart-=Z,q.block_start-=Z,K=z=q.hash_size;do{Y=q.head[--K],q.head[K]=Y>=Z?Y-Z:0}while(--z);K=z=Z;do{Y=q.prev[--K],q.prev[K]=Y>=Z?Y-Z:0}while(--z);Q+=Z}if(0===q.strm.avail_in)break;if(z=hi(q.strm,q.window,q.strstart+q.lookahead,Q),q.lookahead+=z,q.lookahead+q.insert>=Ue)for(X=q.strstart-q.insert,q.ins_h=q.window[X],q.ins_h=si(q,q.ins_h,q.window[X+1]);q.insert&&(q.ins_h=si(q,q.ins_h,q.window[X+Ue-1]),q.prev[X&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=X,X++,q.insert--,!(q.lookahead+q.insert=Ue&&(q.ins_h=si(q,q.ins_h,q.window[q.strstart+Ue-1]),z=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),0!==z&&q.strstart-z<=q.w_size-Ge&&(q.match_length=ci(q,z)),q.match_length>=Ue)if(Y=de(q,q.strstart-q.match_start,q.match_length-Ue),q.lookahead-=q.match_length,q.match_length<=q.max_lazy_match&&q.lookahead>=Ue){q.match_length--;do{q.strstart++,q.ins_h=si(q,q.ins_h,q.window[q.strstart+Ue-1]),z=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart}while(0!=--q.match_length);q.strstart++}else q.strstart+=q.match_length,q.match_length=0,q.ins_h=q.window[q.strstart],q.ins_h=si(q,q.ins_h,q.window[q.strstart+1]);else Y=de(q,0,q.window[q.strstart]),q.lookahead--,q.strstart++;if(Y&&(ai(q,!1),0===q.strm.avail_out))return Ye}return q.insert=q.strstart=Ue&&(q.ins_h=si(q,q.ins_h,q.window[q.strstart+Ue-1]),z=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),q.prev_length=q.match_length,q.prev_match=q.match_start,q.match_length=Ue-1,0!==z&&q.prev_length4096)&&(q.match_length=Ue-1)),q.prev_length>=Ue&&q.match_length<=q.prev_length){Q=q.strstart+q.lookahead-Ue,Y=de(q,q.strstart-1-q.prev_match,q.prev_length-Ue),q.lookahead-=q.prev_length-1,q.prev_length-=2;do{++q.strstart<=Q&&(q.ins_h=si(q,q.ins_h,q.window[q.strstart+Ue-1]),z=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart)}while(0!=--q.prev_length);if(q.match_available=0,q.match_length=Ue-1,q.strstart++,Y&&(ai(q,!1),0===q.strm.avail_out))return Ye}else if(q.match_available){if((Y=de(q,0,q.window[q.strstart-1]))&&ai(q,!1),q.strstart++,q.lookahead--,0===q.strm.avail_out)return Ye}else q.match_available=1,q.strstart++,q.lookahead--}return q.match_available&&(Y=de(q,0,q.window[q.strstart-1]),q.match_available=0),q.insert=q.strstart=Ue&&q.strstart>0&&(Y=Z[Q=q.strstart-1])===Z[++Q]&&Y===Z[++Q]&&Y===Z[++Q]){X=q.strstart+Fe;do{}while(Y===Z[++Q]&&Y===Z[++Q]&&Y===Z[++Q]&&Y===Z[++Q]&&Y===Z[++Q]&&Y===Z[++Q]&&Y===Z[++Q]&&Y===Z[++Q]&&Qq.lookahead&&(q.match_length=q.lookahead)}if(q.match_length>=Ue?(z=de(q,1,q.match_length-Ue),q.lookahead-=q.match_length,q.strstart+=q.match_length,q.match_length=0):(z=de(q,0,q.window[q.strstart]),q.lookahead--,q.strstart++),z&&(ai(q,!1),0===q.strm.avail_out))return Ye}return q.insert=0,K===pe?(ai(q,!0),0===q.strm.avail_out?Xe:Ze):q.last_lit&&(ai(q,!1),0===q.strm.avail_out)?Ye:Qe},bi=function(q,K){for(var z;;){if(0===q.lookahead&&(di(q),0===q.lookahead)){if(K===ue)return Ye;break}if(q.match_length=0,z=de(q,0,q.window[q.strstart]),q.lookahead--,q.strstart++,z&&(ai(q,!1),0===q.strm.avail_out))return Ye}return q.insert=0,K===pe?(ai(q,!0),0===q.strm.avail_out?Xe:Ze):q.last_lit&&(ai(q,!1),0===q.strm.avail_out)?Ye:Qe};function pi(q,K,z,Y,Q){this.good_length=q,this.max_lazy=K,this.nice_length=z,this.max_chain=Y,this.func=Q}var vi=[new pi(0,0,0,0,(function(q,K){var z=65535;for(z>q.pending_buf_size-5&&(z=q.pending_buf_size-5);;){if(q.lookahead<=1){if(di(q),0===q.lookahead&&K===ue)return Ye;if(0===q.lookahead)break}q.strstart+=q.lookahead,q.lookahead=0;var Y=q.block_start+z;if((0===q.strstart||q.strstart>=Y)&&(q.lookahead=q.strstart-Y,q.strstart=Y,ai(q,!1),0===q.strm.avail_out))return Ye;if(q.strstart-q.block_start>=q.w_size-Ge&&(ai(q,!1),0===q.strm.avail_out))return Ye}return q.insert=0,K===pe?(ai(q,!0),0===q.strm.avail_out?Xe:Ze):(q.strstart>q.block_start&&(ai(q,!1),q.strm.avail_out),Ye)})),new pi(4,4,8,4,li),new pi(4,5,16,8,li),new pi(4,6,32,32,li),new pi(4,4,16,16,ui),new pi(8,16,32,32,ui),new pi(8,16,128,128,ui),new pi(8,32,128,256,ui),new pi(32,128,258,1024,ui),new pi(32,258,258,4096,ui)],gi=function(q){q.window_size=2*q.w_size,ii(q.head),q.max_lazy_match=vi[q.level].max_lazy,q.good_match=vi[q.level].good_length,q.nice_match=vi[q.level].nice_length,q.max_chain_length=vi[q.level].max_chain,q.strstart=0,q.block_start=0,q.lookahead=0,q.insert=0,q.match_length=q.prev_length=Ue-1,q.match_available=0,q.ins_h=0};function mi(){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=De,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(2*ke),this.dyn_dtree=new Uint16Array(2*(2*xe+1)),this.bl_tree=new Uint16Array(2*(2*Le+1)),ii(this.dyn_ltree),ii(this.dyn_dtree),ii(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Be+1),this.heap=new Uint16Array(2*Ne+1),ii(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Ne+1),ii(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var yi=function(q){if(!q||!q.state)return ti(q,ye);q.total_in=q.total_out=0,q.data_type=Ie;var K=q.state;return K.pending=0,K.pending_out=0,K.wrap<0&&(K.wrap=-K.wrap),K.status=K.wrap?$e:Ke,q.adler=2===K.wrap?0:1,K.last_flush=ue,oe(K),ge},_i=function(q){var K=yi(q);return K===ge&&gi(q.state),K},Ei=function(q,K,z,Y,Q,X){if(!q)return ye;var Z=1;if(K===we&&(K=6),Y<0?(Z=0,Y=-Y):Y>15&&(Z=2,Y-=16),Q<1||Q>Re||z!==De||Y<8||Y>15||K<0||K>9||X<0||X>Ce)return ti(q,ye);8===Y&&(Y=9);var J=new mi;return q.state=J,J.strm=q,J.wrap=Z,J.gzhead=null,J.w_bits=Y,J.w_size=1<ve||K<0)return q?ti(q,ye):ye;var Q=q.state;if(!q.output||!q.input&&0!==q.avail_in||Q.status===ze&&K!==pe)return ti(q,0===q.avail_out?Ee:ye);Q.strm=q;var X=Q.last_flush;if(Q.last_flush=K,Q.status===$e)if(2===Q.wrap)q.adler=0,ri(Q,31),ri(Q,139),ri(Q,8),Q.gzhead?(ri(Q,(Q.gzhead.text?1:0)+(Q.gzhead.hcrc?2:0)+(Q.gzhead.extra?4:0)+(Q.gzhead.name?8:0)+(Q.gzhead.comment?16:0)),ri(Q,255&Q.gzhead.time),ri(Q,Q.gzhead.time>>8&255),ri(Q,Q.gzhead.time>>16&255),ri(Q,Q.gzhead.time>>24&255),ri(Q,9===Q.level?2:Q.strategy>=Se||Q.level<2?4:0),ri(Q,255&Q.gzhead.os),Q.gzhead.extra&&Q.gzhead.extra.length&&(ri(Q,255&Q.gzhead.extra.length),ri(Q,Q.gzhead.extra.length>>8&255)),Q.gzhead.hcrc&&(q.adler=ne(q.adler,Q.pending_buf,Q.pending,0)),Q.gzindex=0,Q.status=He):(ri(Q,0),ri(Q,0),ri(Q,0),ri(Q,0),ri(Q,0),ri(Q,9===Q.level?2:Q.strategy>=Se||Q.level<2?4:0),ri(Q,Je),Q.status=Ke);else{var Z=De+(Q.w_bits-8<<4)<<8;Z|=(Q.strategy>=Se||Q.level<2?0:Q.level<6?1:6===Q.level?2:3)<<6,0!==Q.strstart&&(Z|=je),Z+=31-Z%31,Q.status=Ke,oi(Q,Z),0!==Q.strstart&&(oi(Q,q.adler>>>16),oi(Q,65535&q.adler)),q.adler=1}if(Q.status===He)if(Q.gzhead.extra){for(z=Q.pending;Q.gzindex<(65535&Q.gzhead.extra.length)&&(Q.pending!==Q.pending_buf_size||(Q.gzhead.hcrc&&Q.pending>z&&(q.adler=ne(q.adler,Q.pending_buf,Q.pending-z,z)),ni(q),z=Q.pending,Q.pending!==Q.pending_buf_size));)ri(Q,255&Q.gzhead.extra[Q.gzindex]),Q.gzindex++;Q.gzhead.hcrc&&Q.pending>z&&(q.adler=ne(q.adler,Q.pending_buf,Q.pending-z,z)),Q.gzindex===Q.gzhead.extra.length&&(Q.gzindex=0,Q.status=Ve)}else Q.status=Ve;if(Q.status===Ve)if(Q.gzhead.name){z=Q.pending;do{if(Q.pending===Q.pending_buf_size&&(Q.gzhead.hcrc&&Q.pending>z&&(q.adler=ne(q.adler,Q.pending_buf,Q.pending-z,z)),ni(q),z=Q.pending,Q.pending===Q.pending_buf_size)){Y=1;break}Y=Q.gzindexz&&(q.adler=ne(q.adler,Q.pending_buf,Q.pending-z,z)),0===Y&&(Q.gzindex=0,Q.status=We)}else Q.status=We;if(Q.status===We)if(Q.gzhead.comment){z=Q.pending;do{if(Q.pending===Q.pending_buf_size&&(Q.gzhead.hcrc&&Q.pending>z&&(q.adler=ne(q.adler,Q.pending_buf,Q.pending-z,z)),ni(q),z=Q.pending,Q.pending===Q.pending_buf_size)){Y=1;break}Y=Q.gzindexz&&(q.adler=ne(q.adler,Q.pending_buf,Q.pending-z,z)),0===Y&&(Q.status=qe)}else Q.status=qe;if(Q.status===qe&&(Q.gzhead.hcrc?(Q.pending+2>Q.pending_buf_size&&ni(q),Q.pending+2<=Q.pending_buf_size&&(ri(Q,255&q.adler),ri(Q,q.adler>>8&255),q.adler=0,Q.status=Ke)):Q.status=Ke),0!==Q.pending){if(ni(q),0===q.avail_out)return Q.last_flush=-1,ge}else if(0===q.avail_in&&ei(K)<=ei(X)&&K!==pe)return ti(q,Ee);if(Q.status===ze&&0!==q.avail_in)return ti(q,Ee);if(0!==q.avail_in||0!==Q.lookahead||K!==ue&&Q.status!==ze){var J=Q.strategy===Se?bi(Q,K):Q.strategy===Ae?fi(Q,K):vi[Q.level].func(Q,K);if(J!==Xe&&J!==Ze||(Q.status=ze),J===Ye||J===Xe)return 0===q.avail_out&&(Q.last_flush=-1),ge;if(J===Qe&&(K===fe?le(Q):K!==ve&&(he(Q,0,0,!1),K===be&&(ii(Q.head),0===Q.lookahead&&(Q.strstart=0,Q.block_start=0,Q.insert=0))),ni(q),0===q.avail_out))return Q.last_flush=-1,ge}return K!==pe?ge:Q.wrap<=0?me:(2===Q.wrap?(ri(Q,255&q.adler),ri(Q,q.adler>>8&255),ri(Q,q.adler>>16&255),ri(Q,q.adler>>24&255),ri(Q,255&q.total_in),ri(Q,q.total_in>>8&255),ri(Q,q.total_in>>16&255),ri(Q,q.total_in>>24&255)):(oi(Q,q.adler>>>16),oi(Q,65535&q.adler)),ni(q),Q.wrap>0&&(Q.wrap=-Q.wrap),0!==Q.pending?ge:me)},deflateEnd:function(q){if(!q||!q.state)return ye;var K=q.state.status;return K!==$e&&K!==He&&K!==Ve&&K!==We&&K!==qe&&K!==Ke&&K!==ze?ti(q,ye):(q.state=null,K===Ke?ti(q,_e):ge)},deflateSetDictionary:function(q,K){var z=K.length;if(!q||!q.state)return ye;var Y=q.state,Q=Y.wrap;if(2===Q||1===Q&&Y.status!==$e||Y.lookahead)return ye;if(1===Q&&(q.adler=ie(q.adler,K,z,0)),Y.wrap=0,z>=Y.w_size){0===Q&&(ii(Y.head),Y.strstart=0,Y.block_start=0,Y.insert=0);var X=new Uint8Array(Y.w_size);X.set(K.subarray(z-Y.w_size,z),0),K=X,z=Y.w_size}var Z=q.avail_in,J=q.next_in,tt=q.input;for(q.avail_in=z,q.next_in=0,q.input=K,di(Y);Y.lookahead>=Ue;){var et=Y.strstart,it=Y.lookahead-(Ue-1);do{Y.ins_h=si(Y,Y.ins_h,Y.window[et+Ue-1]),Y.prev[et&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=et,et++}while(--it);Y.strstart=et,Y.lookahead=Ue-1,di(Y)}return Y.strstart+=Y.lookahead,Y.block_start=Y.strstart,Y.insert=Y.lookahead,Y.lookahead=0,Y.match_length=Y.prev_length=Ue-1,Y.match_available=0,q.next_in=J,q.input=tt,q.avail_in=Z,Y.wrap=Q,ge},deflateInfo:"pako deflate (from Nodeca project)"};function Ti(q){for(var K=0,z=0,Y=q.length;z=252?6:Ai>=248?5:Ai>=240?4:Ai>=224?3:Ai>=192?2:1;function Ci(){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}Si[254]=Si[254]=1;var Oi=Ci,Ii=Object.prototype.toString,Di=re.Z_NO_FLUSH,Ri=re.Z_SYNC_FLUSH,Pi=re.Z_FULL_FLUSH,Mi=re.Z_FINISH,Ni=re.Z_OK,xi=re.Z_STREAM_END,Li=re.Z_DEFAULT_COMPRESSION,ki=re.Z_DEFAULT_STRATEGY,Bi=re.Z_DEFLATED;function Ui(){this.options={level:Li,method:Bi,chunkSize:16384,windowBits:15,memLevel:8,strategy:ki};var q=this.options;q.raw&&q.windowBits>0?q.windowBits=-q.windowBits:q.gzip&&q.windowBits>0&&q.windowBits<16&&(q.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Oi,this.strm.avail_out=0;var K=wi.deflateInit2(this.strm,q.level,q.method,q.windowBits,q.memLevel,q.strategy);if(K!==Ni)throw new Error(ae[K]);if(q.header&&wi.deflateSetHeader(this.strm,q.header),q.dictionary){var z;if(z="[object ArrayBuffer]"===Ii.call(q.dictionary)?new Uint8Array(q.dictionary):q.dictionary,(K=wi.deflateSetDictionary(this.strm,z))!==Ni)throw new Error(ae[K]);this._dict_set=!0}}function Fi(q){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(q);var K,z,Y,Q,X,Z=q.length,J=0;for(Q=0;Q>>6,K[X++]=128|63&z):z<65536?(K[X++]=224|z>>>12,K[X++]=128|z>>>6&63,K[X++]=128|63&z):(K[X++]=240|z>>>18,K[X++]=128|z>>>12&63,K[X++]=128|z>>>6&63,K[X++]=128|63&z);return K}return Ui.prototype.push=function(q,K){var z,Y,Q=this.strm,X=this.options.chunkSize;if(this.ended)return!1;for(Y=K===~~K?K:!0===K?Mi:Di,"[object ArrayBuffer]"===Ii.call(q)?Q.input=new Uint8Array(q):Q.input=q,Q.next_in=0,Q.avail_in=Q.input.length;;)if(0===Q.avail_out&&(Q.output=new Uint8Array(X),Q.next_out=0,Q.avail_out=X),(Y===Ri||Y===Pi)&&Q.avail_out<=6)this.onData(Q.output.subarray(0,Q.next_out)),Q.avail_out=0;else{if((z=wi.deflate(Q,Y))===xi)return Q.next_out>0&&this.onData(Q.output.subarray(0,Q.next_out)),z=wi.deflateEnd(this.strm),this.onEnd(z),this.ended=!0,z===Ni;if(0!==Q.avail_out){if(Y>0&&Q.next_out>0)this.onData(Q.output.subarray(0,Q.next_out)),Q.avail_out=0;else if(0===Q.avail_in)break}else this.onData(Q.output)}return!0},Ui.prototype.onData=function(q){this.chunks.push(q)},Ui.prototype.onEnd=function(q){q===Ni&&(this.result=Ti(this.chunks)),this.chunks=[],this.err=q,this.msg=this.strm.msg},{Deflate:Ui,constants:re,string2buf:Fi}}(),z=K.Deflate,Y=K.constants,Q=K.string2buf,X=new z,Z=0;function J(q){var K=Q(q);return X.push(K,Y.Z_SYNC_FLUSH),Z+=K.length,K.length}self.addEventListener("message",q((function(q){var K=q.data;switch(K.action){case"init":self.postMessage({type:"initialized"});break;case"write":var Q=J(K.data);self.postMessage({type:"wrote",id:K.id,compressedBytesCount:X.chunks.reduce((function(q,K){return q+K.length}),0),additionalBytesCount:Q});break;case"flush":Q=K.data?J(K.data):0;X.push("",Y.Z_FINISH),self.postMessage({type:"flushed",id:K.id,result:X.result,additionalBytesCount:Q,rawBytesCount:Z}),X=new z,Z=0}})))}))()}var XE={status:0};function ZE(q,K){switch(void 0===K&&(K=YE),XE.status){case 0:XE={status:1,callbacks:[q]},function(q){void 0===q&&(q=YE);try{var K=q();K.addEventListener("error",Lb(JE)),K.addEventListener("message",Lb((function(q){var z,Y=q.data;"errored"===Y.type?JE(Y.error):"initialized"===Y.type&&(z=K,1===XE.status&&(XE.callbacks.forEach((function(q){return q(z)})),XE={status:3,worker:z}))}))),K.postMessage({action:"init"})}catch(z){JE(z)}}(K);break;case 1:XE.callbacks.push(q);break;case 2:q();break;case 3:q(XE.worker)}}function JE(q){var K;1===XE.status?(Db.error("Session Replay recording failed to start: an error occurred while creating the Worker:",q),q instanceof Event||q instanceof Error&&(Zb(K=q.message,"Content Security Policy")||Zb(K,"requires 'TrustedScriptURL'"))?Db.error("Please make sure CSP is correctly configured https://docs.datadoghq.com/real_user_monitoring/faq/content_security_policy"):Yv(q),XE.callbacks.forEach((function(q){return q()})),XE={status:2}):Yv(q)}var tw=function(q,K,z){var Y=(void 0===z?{}:z).ignoreInitIfSyntheticsWillInjectRum,Q=void 0===Y||Y,X=!1,Z=_p(),J=_p(),tt=function(){},et=function(){},it=new wp,st=function(q,K){void 0===K&&(K=Op()),it.add((function(){return st(q,K)}))},nt=function(q,K){void 0===K&&(K=Dp()),it.add((function(){return nt(q,K)}))},at=function(q,z){void 0===z&&(z=xv(Z,J,K)),it.add((function(){return at(q,z)}))},rt=function(q,z){void 0===z&&(z=xv(Z,J,K)),it.add((function(){return rt(q,z)}))},ot=function(q,K){it.add((function(){return ot(q,K)}))};function ht(z,Y,Q){var X=q(z,Y,K,Z,J,Q);nt=X.startView,at=X.addAction,rt=X.addError,st=X.addTiming,ot=X.addFeatureFlagEvaluation,tt=X.getInternalContext,it.drain(),K.onRumStart(X.lifeCycle,Y,X.session,X.viewContexts)}var ct,dt,lt=Lb((function(q){nt("object"==typeof q?q:{name:q})})),ut=(ct={init:Lb((function(q){if(et=function(){return fp(q)},!Q||!Gp()){if($p())q=function(q){return Vb({},q,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100})}(q);else if(!function(q){return function(q){if(void 0===document.cookie||null===document.cookie)return!1;try{var K="dd_cookie_test_".concat(qb()),z="test";kp(K,z,$b,q);var Y=Bp(K)===z;return Up(K,q),Y}catch(Q){return Db.error(Q),!1}}(Ov(q))?"file:"!==window.location.protocol||(Db.error("Execution is not allowed in the current context."),!1):(Db.warn("Cookies are not authorized, we will not send any data."),!1)}(q))return;if(function(q){return!X||(q.silentMultipleInit||Db.error("DD_RUM is already initialized."),!1)}(q)){var K=Mv(q);if(K){if(Hp("feature_flags")&&(ut.addFeatureFlagEvaluation=Lb((function(q,K){ot(q,K)}))),K.trackViewsManually){var z=it;it=new wp,nt=function(z){ht(q,K,z)},z.drain()}else ht(q,K);X=!0}}}})),addRumGlobalContext:Lb(Z.add),setGlobalContextProperty:Lb(Z.setContextProperty),removeRumGlobalContext:Lb(Z.remove),removeGlobalContextProperty:Lb(Z.removeContextProperty),getRumGlobalContext:Lb(Z.get),getGlobalContext:Lb(Z.getContext),setRumGlobalContext:Lb(Z.set),setGlobalContext:Lb(Z.setContext),clearGlobalContext:Lb(Z.clearContext),getInternalContext:Lb((function(q){return tt(q)})),getInitConfiguration:Lb((function(){return et()})),addAction:Lb((function(q,K){at({name:q,context:fp(K),startClocks:Dp(),type:"custom"})})),addError:function(q,K){var z=lv();kb((function(){rt({error:q,handlingStack:z,context:fp(K),startClocks:Dp()})}))},addTiming:Lb((function(q,K){st(q,K)})),setUser:Lb((function(q){(function(q){var K="object"===lp(q);return K||Db.error("Unsupported user:",q),K})(q)&&J.setContext(fv(q))})),getUser:Lb(J.getContext),setUserProperty:Lb((function(q,K){var z,Y=fv((z={},z[q]=K,z))[q];J.setContextProperty(q,Y)})),removeUserProperty:Lb(J.removeContextProperty),removeUser:Lb(J.clearContext),clearUser:Lb(J.clearContext),startView:lt,startSessionReplayRecording:Lb(K.start),stopSessionReplayRecording:Lb(K.stop)},dt=Vb({version:"4.35.0",onReady:function(q){q()}},ct),Object.defineProperty(dt,"_setDebug",{get:function(){return xb},enumerable:!1}),dt);return ut}((function(q,K,z,Y,Q,X){var Z=new Hg;Z.subscribe(11,(function(q){return Lv("rum",q)}));var J=function(q){var K=Kv("browser-rum-sdk",q);if($p()){var z=jp();K.observable.subscribe((function(q){return z.send("internal_telemetry",q)}))}return K}(K);J.setContextProvider((function(){var q,z;return{application:{id:K.applicationId},session:{id:null===(q=at.findTrackedSession())||void 0===q?void 0:q.id},view:{id:null===(z=ct.findView())||void 0===z?void 0:z.id},action:{id:ut.findActionId()}}}));var tt,et=function(q){Z.notify(12,{error:q})},it=function(q,K){if(void 0===K&&(K=yp),!Hp("feature_flags"))return{findFeatureFlagEvaluations:function(){},getFeatureFlagBytesCount:function(){return 0},addFeatureFlagEvaluation:Yb};var z,Y=new Kg(144e5);return q.subscribe(4,(function(q){var K=q.endClocks;Y.closeActive(K.relative)})),q.subscribe(2,(function(q){var K=q.startClocks;Y.add({},K.relative),z=void 0})),{findFeatureFlagEvaluations:function(q){return Y.find(q)},getFeatureFlagBytesCount:function(){var q=Y.find();return q?(void 0===z&&(z=K(Qb(q))),z):0},addFeatureFlagEvaluation:function(q,K){var Q=Y.find();Q&&(Q[q]=fp(K),z=void 0)}}}(Z);if($p())!function(q){var K=jp();q.subscribe(11,(function(q){K.send("rum",q)}))}(Z);else{var st=tt=new kv((function(){var q=Hp("pagehide"),K=Fv(window,["visibilitychange","freeze","pagehide"],(function(K){"pagehide"===K.type&&q?tt.notify({reason:Gv.PAGEHIDE}):"visibilitychange"===K.type&&"hidden"===document.visibilityState?tt.notify({reason:Gv.HIDDEN}):"freeze"===K.type&&tt.notify({reason:Gv.FROZEN})}),{capture:!0}).stop,z=Yb;return q||(z=Uv(window,"beforeunload",(function(){tt.notify({reason:Gv.UNLOADING})})).stop),function(){K(),z()}}));st.subscribe((function(q){Z.notify(9,q)}));var nt=Yy(K,Z,J.observable,et,st);!function(q,K,z,Y,Q,X,Z){K.enabled&&Kb(q.customerDataTelemetrySampleRate)&&(s_(),n_(),z.subscribe(11,(function(q){Jy=!0,e_(Zy.globalContextBytes,ap(Y.get())?0:Y.getBytesCount()),e_(Zy.userContextBytes,ap(Q.get())?0:Q.getBytesCount());var K=X.findFeatureFlagEvaluations(),z=Zb(["view","error"],q.type)&&K&&!ap(K);e_(Zy.featureFlagBytes,z?X.getFeatureFlagBytesCount():0)})),Z.subscribe((function(q){var K=q.bufferBytesCount,z=q.bufferMessagesCount;Jy&&(Xy.batchCount+=1,e_(Xy.batchBytesCount,K),e_(Xy.batchMessagesCount,z),i_(Xy.globalContextBytes,Zy.globalContextBytes),i_(Xy.userContextBytes,Zy.userContextBytes),i_(Xy.featureFlagBytes,Zy.featureFlagBytes),n_())})),setInterval(Lb(t_),1e4))}(K,J,Z,Y,Q,it,nt.flushObservable)}var at=$p()?function(){var q={id:"00000000-aaaa-0000-aaaa-000000000000",plan:1,sessionReplayAllowed:!1,longTaskAllowed:!0,resourceAllowed:!0};return{findTrackedSession:function(){return q}}}():By(K,Z),rt=function(){var q=Zv(),K=new kv((function(){if(q){var z=new q(Lb((function(){return K.notify()})));return z.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return z.disconnect()}}}));return K}(),ot=Qy(location),ht=function(q,K,z,Y,Q,X,Z,J){var tt=function(q){var K=new Kg(144e5);return q.subscribe(2,(function(q){K.add(function(q){return{service:q.service,version:q.version,id:q.id,name:q.name}}(q),q.startClocks.relative)})),q.subscribe(4,(function(q){var z=q.endClocks;K.closeActive(z.relative)})),q.subscribe(8,(function(){K.reset()})),{findView:function(q){return K.find(q)},stop:function(){K.stop()}}}(q),et=function(q,K,z){var Y,Q=new Kg(144e5);q.subscribe(4,(function(q){var K=q.endClocks;Q.closeActive(K.relative)})),q.subscribe(2,(function(q){var K=q.startClocks,X=z.href;Q.add(Z({url:X,referrer:Y||document.referrer}),K.relative),Y=X}));var X=K.subscribe((function(q){var K=q.newLocation,z=Q.find();if(z){var Y=Ip();Q.closeActive(Y),Q.add(Z({url:K.href,referrer:z.referrer}),Y)}}));function Z(q){return{url:q.url,referrer:q.referrer}}return{findUrl:function(q){return Q.find(q)},stop:function(){X.unsubscribe(),Q.stop()}}}(q,Q,z),it=Bg(),st=function(q,K,z,Y){q.subscribe(1,(function(K){return q.notify(10,Vm(K,Y))}));var Q={findActionId:Yb};return z.trackUserInteractions&&(Q=$m(q,K,z).actionContexts),{addAction:function(K,z){q.notify(10,Vb({savedCommonContext:z},Vm(K,Y)))},actionContexts:Q}}(q,X,K,it),nt=st.addAction,at=st.actionContexts;return Lg(K,q,Y,tt,et,at,Z,J),{viewContexts:tt,foregroundContexts:it,urlContexts:et,addAction:nt,actionContexts:at,stop:function(){tt.stop(),it.stop()}}}(Z,K,location,at,ot,rt,(function(){return xv(Y,Q,z)}),et),ct=ht.viewContexts,dt=ht.foregroundContexts,lt=ht.urlContexts,ut=ht.actionContexts,ft=ht.addAction;!function(q){qv.telemetryConfigurationEnabled&&Qv({type:Hv,configuration:q})}(function(q){var K,z,Y=function(q){var K,z,Y=null!==(K=q.proxy)&&void 0!==K?K:q.proxyUrl;return{session_sample_rate:null!==(z=q.sessionSampleRate)&&void 0!==z?z:q.sampleRate,telemetry_sample_rate:q.telemetrySampleRate,telemetry_configuration_sample_rate:q.telemetryConfigurationSampleRate,use_before_send:!!q.beforeSend,use_cross_site_session_cookie:q.useCrossSiteSessionCookie,use_secure_session_cookie:q.useSecureSessionCookie,use_proxy:void 0!==Y?!!Y:void 0,silent_multiple_init:q.silentMultipleInit,track_session_across_subdomains:q.trackSessionAcrossSubdomains,track_resources:q.trackResources,track_long_task:q.trackLongTasks}}(q);return Vb({premium_sample_rate:q.premiumSampleRate,replay_sample_rate:q.replaySampleRate,session_replay_sample_rate:q.sessionReplaySampleRate,trace_sample_rate:null!==(K=q.traceSampleRate)&&void 0!==K?K:q.tracingSampleRate,action_name_attribute:q.actionNameAttribute,use_allowed_tracing_origins:Array.isArray(q.allowedTracingOrigins)&&q.allowedTracingOrigins.length>0,use_allowed_tracing_urls:Array.isArray(q.allowedTracingUrls)&&q.allowedTracingUrls.length>0,selected_tracing_propagators:Nv(q),default_privacy_level:q.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(q.allowedTracingOrigins)&&q.allowedTracingOrigins.length>0,track_frustrations:q.trackFrustrations,track_views_manually:q.trackViewsManually,track_user_interactions:null!==(z=q.trackUserInteractions)&&void 0!==z?z:q.trackInteractions},Y)}(q)),function(q,K){q.subscribe(0,(function(z){for(var Y=0,Q=z;Y=0;Q--){var X=r_[Q].startTime;if(!(X>=Y)&&(z.unshift(r_[Q]),X{this._questManager.getUnclaimedRewardsMail()||z(),K()})).catch(X.RQr.createHandler("Failed to claim battle pass rewards"))}};cw=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)("9a2-c1c3")),(0,Q.Qj)(1,(0,dt.inject)("58f-ce01")),(0,Q.Sn)("design:paramtypes",[Function,Function])],cw);let dw=class{constructor(q){this.mailExtensions={},q.forEach((q=>{this.mailExtensions[q.Name]=q}))}open(q,K,z=null){var Y,Q,Z,J,tt,et;const it=null!==(Q=null===(Y=null==q?void 0:q.extension)||void 0===Y?void 0:Y.name)&&void 0!==Q?Q:null,nt=null!==(Z=this.mailExtensions[it])&&void 0!==Z?Z:null;if(!nt){const Y=st.q.instance.prodigy.open.openMail(q);return Y.setCloseCallback(K),Y.setDeleteMailCallback(z),void X.VyI.log(`No extension found for ${q.subject} or extension '${it}' was empty`,X.$bb.Verbose)}X.VyI.log(`Opening ${q.subject} with extension '${it}'`,X.$bb.Verbose),nt.openMailItem(null!==(tt=null===(J=null==q?void 0:q.extension)||void 0===J?void 0:J.params)&&void 0!==tt?tt:[],(null===(et=null==q?void 0:q.extension)||void 0===et?void 0:et.deleteMailOnClose)&&z?()=>{z(),K()}:K,z)}isValid(q){var K;const z=null===(K=null==q?void 0:q.extension)||void 0===K?void 0:K.name,Y=this.mailExtensions[z];return z&&!Y?(X.VyI.log(`Extension was not valid for mail: ${JSON.stringify(q.extension)}`,X.$bb.Warning),!1):!Y||Y.isValid(q)}applyTemplate(q,K){const z=Z.get(q,"extension.name",null),Y=Z.get(this.mailExtensions,z,null);Y&&Y.applyTemplate(q,K)}};dw=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.multiInject)("ed1-a499")),(0,Q.Sn)("design:paramtypes",[Array])],dw);let lw=class extends rw{constructor(){super(...arguments),this.name=ow.R.Prefab}isValid(q){var K;const z=null===(K=q.extension.params)||void 0===K?void 0:K[0];return q.extension.name===ow.R.Prefab&&Object.values(Pi.l).includes(z)}applyTemplate(q,K){super.applyTemplate(q,K),this._mailData=q}openMailItem(q,K){const z=q[0];st.q.instance.prodigy.open.prefabMenu(z,K),st.q.instance.game.broadcaster.broadcast(gi.zr.MarkAsRead,gi.HG.MailView,[void 0,this._mailData])}};lw=(0,Q.Cg)([(0,dt.injectable)()],lw);let uw=class extends rw{constructor(){super(...arguments),this.name="PopupMailExtension"}isValid(q){var K;const z=(null===(K=q.extension.params)||void 0===K?void 0:K.length)>0?q.extension.params[0]:"";return q.extension.name===ow.R.Popup&&this._externalMethods.doesFunctionExist(z)}openMailItem(q,K,z){const Y=(null==q?void 0:q.length)>0?q[0]:"";""!==Y&&this._externalMethods.doesFunctionExist(Y)?this._externalMethods.runFunction(Y,q,void 0,void 0,[K,z]):X.VyI.log("[PopupMailExtension] Missing function name or function does not exist",X.$bb.Error)}};(0,Q.Cg)([(0,dt.inject)("075-0f78"),(0,Q.Sn)("design:type",Se.g)],uw.prototype,"_externalMethods",void 0),uw=(0,Q.Cg)([(0,dt.injectable)()],uw);let fw=class extends rw{constructor(){super(...arguments),this.name=ow.R.Titan}isValid(q){return!0}openMailItem(q,K){st.q.instance.prodigy.open.openMail(this._mailData).onClose=K}applyTemplate(q,K){K.openButtonGraphic.y+=8,K.unOpenButtonGraphic.y+=9,super.applyTemplate(q,K),this._mailData=q}};fw=(0,Q.Cg)([(0,dt.injectable)()],fw);let bw=class extends ne.D{getBattleStats(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.BattleStats.GetBattleStats,{userId:null==q?void 0:q.toString()},!1)}))}onWeeklyChallengeBattleEnd(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.BattleStats.RecordEnd,{type:q},!1)}))}debugOverrideMatchmakingBattleStreak(q){return(0,Q.sH)(this,void 0,void 0,(function*(){0}))}};bw=(0,Q.Cg)([(0,dt.injectable)()],bw);class pw extends ne.D{getDailyDuelUses(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.DuelsStadium.GetAllDailyDuelsUsed,{},!0)}))}}let vw=class extends ne.D{getCampaignReplayData(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.CampaignReplay.GetCampaignReplayData,{},!1)}))}setProgress(q){this.makeCloudscriptRequest(ie.D.CampaignReplay.SetFeatureProgress,q,!1).catch(X.RQr.createHandler("CampaignReplayNetworkHandler.setProgress: Failed to set progress"))}unlockDifficultyMode(q){this.makeCloudscriptRequest(ie.D.CampaignReplay.UnlockDifficultyMode,{difficulty:q},!1).catch((()=>{st.q.instance.game.broadcaster.broadcast(gi.oL.DifficultyUnlockRequestFailed),X.RQr.createHandler("CampaignReplayNetworkHandler.unlockDifficultyMode: Failed to unlock difficulty mode")}))}setCurrentDifficulty(q){this.makeCloudscriptRequest(ie.D.CampaignReplay.SetCurrentDifficulty,{difficulty:q},!1).catch((()=>{st.q.instance.game.broadcaster.broadcast(gi.oL.DifficultyModeChangeFailed),X.RQr.createHandler("CampaignReplayNetworkHandler.setCurrentDifficulty: Failed to set current difficulty")}))}debugForceUnlockDifficulty(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.CampaignReplay.Debug.ForceUnlockDifficultyMode,{difficulty:q},!1)}))}debugResetData(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.CampaignReplay.Debug.ResetData,{},!1)}))}};vw=(0,Q.Cg)([(0,rt.injectable)()],vw);var gw=z(35571);class mw extends Xs.D{debugSetCooldownTimestamp(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.call(ie.D.Cooldowns.Debug.SetCooldownTimestamp,{cooldownId:q,timestamp:K},!0)}))}debugClearCooldown(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.call(ie.D.Cooldowns.Debug.ClearCooldown,{cooldownId:q},!0)}))}debugClearAllCooldowns(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.call(ie.D.Cooldowns.Debug.ClearAllCooldowns,{},!0)}))}setCooldownFromNow(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.call(ie.D.Cooldowns.SetCooldownFromNow,{cooldownId:q,durationMs:K},!0)}))}setCooldownFromCategory(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.call(ie.D.Cooldowns.SetCooldownFromCategory,{cooldownId:q,category:K},!0)}))}}var yw=z(55328);let _w=class extends ne.D{get elementalBoost(){return this._elementalBoost}getCurrentElementalBoost(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.ElementalBoosts.GetCurrentElementalBoost,{},!1)}))}cacheElementalBoost(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!X.Aq$.isDefined(this._lastUpdatedTime)||Date.now()>this._lastUpdatedTime+864e5){const q=yield this.getCurrentElementalBoost();this._elementalBoost=q.element,this._lastUpdatedTime=q.lastUpdatedUtcTime}return this._elementalBoost}))}doDebugCommand(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){0}))}};_w=(0,Q.Cg)([(0,dt.injectable)()],_w);let Ew=class extends Xs.D{enterWorld(){return(0,Q.sH)(this,arguments,void 0,(function*(q=[]){const K=this._player.hasValidatedParentEmail(),z=Bc.R.getTimezoneOffset();return this.call(ie.D.Events.EnterWorld,{experiments:q,parentLinked:K,timezoneOffset:z},!1)}))}};(0,Q.Cg)([(0,Ge.b)("782-c308"),(0,Q.Sn)("design:type",De.W)],Ew.prototype,"_player",void 0),Ew=(0,Q.Cg)([(0,dt.injectable)()],Ew);var ww=z(7001),Tw=z(89067);let Sw=class{constructor(q){this.game=q}};Sw=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Sn)("design:paramtypes",[pn.n])],Sw);class Aw extends Sw{constructor(q){super(q),this.pendingRequests=null,this.friendsCap=20,this.friendsList=[],this.classList=[],this.friendRequestList=[],this.hasReceivedFriends=!1,this.hasReceivedFriendsAppearance=!1,this.hasReceivedFriendsAppearanceOfActualFriends=!1,this.hasReceivedClass=!1,q.broadcaster.addAppListener(gi.lT.Setup,(()=>{this.setup()}),this,gi.HG.NetworkHandlers,!0),q.broadcaster.addAppListener(gi.AU.PlayerInitialized,(()=>{this.fetchClassmates()}),this,null,!0)}getFriendsCap(){return this.friendsCap}hasPendingRequests(){return this.pendingRequests>0}isFriendsListDownloaded(){return this.hasReceivedFriends}isClassmatesListDownloaded(){return this.hasReceivedClass}getFriend(q){let K=null;for(let z=0;zK.userID===q&&0!==K.status))}isClassmate(q){return this.classList.some((K=>K.userID===q))}getFriendQuestProgress(q){const K=[];for(let z=0;z{this.processClassmates(q)})).catch((q=>{st.q.instance.prodigy.loading(!1),this.showGenericNetworkError()}))}}shouldFetchClassmates(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return q.hasCompletedTutorial()&&q.classIDs.length>0}processClassmates(q){var K,z;st.q.instance.prodigy.loading(!1);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=null!==(z=null===(K=q.data.player.currentClassroom)||void 0===K?void 0:K.students)&&void 0!==z?z:[];for(let X=0;X0){st.q.instance.prodigy.gameContainer.get("774-4659").getCharData(z,["appearance","state"],this.getUserData.bind(this),null).catch(X.RQr.createHandler("Error getting character data"))}}getUserData(q){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;for(const K in q)for(let z=0;z{this.game.broadcaster.broadcast(gi.sd.RequestSent,gi.HG.FriendsList,[q]),this.game.broadcaster.broadcast(gi.sd.RequestSent,gi.HG.Card,[])}}),st.q.instance.prodigy.gameContainer.get("20f-5f67").social.sendFriendRequestSentEvent({friends:this.friendsList.length,classmates:this.classList.length}))}cancelFriendRequest(q){st.q.instance.prodigy.loading(!0);st.q.instance.prodigy.gameContainer.get("774-4659").cancelFriendRequest(q,this.cancelFriendRequestSuccess.bind(this,q),this.networkCallFailure.bind(this)).catch(X.RQr.createHandler("Error cancelling friend request"))}cancelFriendRequestSuccess(q,K){st.q.instance.prodigy.loading(!1),Aw.removeUserFromArray(this.friendsList,q),st.q.instance.prodigy.open.messageBoxPrefab({text:"FRIENDS_LIST_CANCEL_MESSAGE_BODY",title:"FRIENDS_LIST_CANCEL_MESSAGE_TITLE",confirmCallback:this.onCancelFriendRequestClose.bind(this,q)})}onCancelFriendRequestClose(q){this.game.broadcaster.broadcast(gi.sd.RequestCancelled,gi.HG.FriendsList,[q]),this.game.broadcaster.broadcast(gi.sd.RequestCancelled,gi.HG.Card,[q])}acceptFriendRequestSuccess(q,K,z,Y){st.q.instance.prodigy.loading(!1),this.friendsList.push({userID:q,status:1,isMember:0}),this.getUserAppearance(this.friendsList.slice(this.friendsList.length-1,this.friendsList.length)),Aw.removeUserFromArray(this.friendRequestList,q),this.pendingRequests--,this.game.broadcaster.broadcast(gi.sd.RequestAccepted,gi.HG.FriendsList,[q,K]),this.game.broadcaster.broadcast(gi.sd.RequestAccepted,gi.HG.HUD),this.game.broadcaster.broadcast(gi.sd.RequestAccepted,gi.HG.Card,[]),st.q.instance.prodigy.gameContainer.get("20f-5f67").social.sendFriendRequestAcceptedEvent({friends:this.friendsList.length,classmates:this.classList.length,from_request:z,index:K})}getUserAppearance(q,K=!1){this.hasReceivedFriendsAppearance=!1,this.hasReceivedFriendsAppearanceOfActualFriends=!1;let z="",Y="";for(let Q=0;Q0){st.q.instance.prodigy.gameContainer.get("774-4659").getCharData(z,["appearance","isMember","equipment","data","state"],this.onGetUserAppearance.bind(this,K),this.networkCallFailure.bind(this))}}onGetUserAppearance(q,K){const z=q?this.classList:this.friendsList;for(const Y in K)for(let q=0;q{var K,z,Y,Q;const X=null!==(K=q.message)&&void 0!==K?K:null===(z=q.data)||void 0===z?void 0:z.message,Z=null!==(Q=null===(Y=q.data)||void 0===Y?void 0:Y.image)&&void 0!==Q?Q:"",J=q.rewards.map((q=>{const K=(null==q?void 0:q.itemID).split("-");return{ID:K[1],type:K[0],N:q.quantity}}));return Object.assign(Object.assign({id:q.ID,isOpened:!!q.openedOn,isCollected:!!q.collectedOn,userName:q.mailFrom,subject:q.subject,attachments:J},q.data),{message:X,image:Z})}))}))}markAsRead(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.Mail.ReadMail,{mailId:q.id})}))}deleteMail(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.Mail.DeleteMail,{mailId:q.id})}))}collectMailRewards(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.Mail.CollectMailRewards,{mailId:q.id},!1)}))}};(0,Q.Cg)([(0,Ge.b)("ad2-c5b2"),(0,Q.Sn)("design:type",ee.E)],Ow.prototype,"_player",void 0),Ow=(0,Q.Cg)([(0,dt.injectable)()],Ow);class Iw{}Iw.DATA=[{id:97,subject:"'Arc of Light' - Bronze season rewards!",isOpened:!1,image:"letter-season-end-rewards-bronze",message:"The Arena season 'Arc of Light' has ended! You can now claim the Bronze rewards you've unlocked. Look forward to the next season: 'Food Fight'!",attachments:[{type:"item",ID:20}],gameMethod:{name:"singleUseGotItem",buttonText:"CLAIM YOUR REWARDS"},debug:!0},{id:98,subject:"'Arc of Light' - Silver season rewards!",isOpened:!1,image:"letter-season-end-rewards-silver",message:"The Arena season 'Arc of Light' has ended! You can now claim the Silver rewards you've unlocked. Look forward to the next season: 'Food Fight'!",attachments:[{type:"item",ID:20}],gameMethod:{name:"singleUseGotItem",buttonText:"CLAIM YOUR REWARDS"},debug:!0},{id:99,subject:"'Arc of Light' - Gold season rewards!",isOpened:!1,image:"letter-season-end-rewards-gold",message:"The Arena season 'Arc of Light' has ended! You can now claim the Gold rewards you've unlocked. Look forward to the next season: 'Food Fight'!",attachments:[{type:"item",ID:20}],gameMethod:{name:"singleUseGotItem",buttonText:"CLAIM YOUR REWARDS"},debug:!0},{id:0,subject:"Hello World 0",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42. This text is particularly long so we can figure out what happens when it's very long! Arguably there has to be a logical limit to the size of the text but putting in an entire paragraph is probably a pretty good test of the max size.",attachments:[{type:"item",ID:1},{type:"item",ID:2},{type:"item",ID:3}],debug:!0},{id:1,subject:"SPLIT TEST MAIL",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[{type:"item",ID:1},{type:"item",ID:2},{type:"item",ID:3},{type:"item",ID:4}],gameMethod:{name:"openMembershipSignUp"},debug:!0},{id:2,subject:"Hello World 2",isOpened:!1,image:"noImage",message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[{type:"item",ID:1},{type:"item",ID:2}],debug:!0},{id:3,subject:"Hello World 3",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[{type:"currency",ID:11,N:50}],debug:!0},{id:4,subject:"Hello World 4",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:5,subject:"You have a Reward Goal!",isOpened:!1,membership:0,image:null,message:"Your parent has setup a goal for you! Answer 10 correct questions and your parent will sent you a Reward!",attachments:[],gameMethod:{name:"openGiftBox"},debug:!0},{id:5,subject:"You have a Member Box!",isOpened:!1,membership:2,image:null,message:"Your parent has setup a goal for you! Answer 10 correct questions and your parent will sent you a Reward!",attachments:[{type:"item",ID:1},{type:"item",ID:2},{type:"item",ID:3},{type:"item",ID:4},{type:"item",ID:5}],gameMethod:{name:"openGiftBox"},debug:!0},{id:5,subject:"Sign Up for Membership!",isOpened:!1,membership:1,image:null,message:"Your parent has setup a goal for you! Answer 10 correct questions and your parent will sent you a Reward!",attachments:[],gameMethod:{name:"openMembershipSignUp"},debug:!0},{id:10,subject:"Hello World 10",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:20,subject:"Hello World 20",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:30,subject:"Hello World 30",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:40,subject:"Hello World 40",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:50,subject:"Hello World 50",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:60,subject:"Hello World 60",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:70,subject:"Hello World 70",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:80,subject:"Hello World 80",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:90,subject:"Hello World 90",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:100,subject:"Hello World 100",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:1e3,subject:"Hello World 1000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:2e3,subject:"Hello World 2000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:3e3,subject:"Hello World 3000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:4e3,subject:"Hello World 4000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:5e3,subject:"Hello World 5000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:6e3,subject:"Hello World 6000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:7e3,subject:"Hello World 7000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:8e3,subject:"Hello World 8000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:9e3,subject:"Hello World 9000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:1e4,subject:"Hello World 10000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0}],Iw.TOTAL_MAIL={totalUnread:0};class Dw{static getAllMail(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=Iw.DATA.slice(0,300);return new Promise(((K,z)=>{te.s.get("GameConstants.Mailer.TEST_MAIL")?(X.VyI.log("Test get all legacy mail",X.$bb.Verbose),K(q)):K([])}))}))}static markAsRead(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return new Promise(((q,K)=>{if(te.s.get("GameConstants.Mailer.TEST_MAIL")){Iw.TOTAL_MAIL={totalUnread:0};for(let q=0;q{if(te.s.get("GameConstants.Mailer.TEST_MAIL")){for(let K=0;K{this.setup()}),this,gi.HG.NetworkHandlers,!0)}setup(){const q=this.game.broadcaster;q.addAppListener(gi.zr.MarkAsRead,this.markAsRead.bind(this),this,gi.HG.MailView,!0),this._cachedPlayer=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;const K=st.q.instance.prodigy.gameContainer.get("9a2-c1c3").preloadPreviousUnclaimedRewards(),z=this.awaitAllMail();Promise.all([z,K]).then((q=>{var K;if(!q[0])return void this.getAllMailFailure();const z=q[0][0],Y=q[0][1],Q=(null!=Y?Y:[]).concat(null!==(K=null==z?void 0:z.emails)&&void 0!==K?K:[]).sort(this.bySendDate);this.getAllMailSuccess(Q)})).catch((()=>{X.VyI.log("Failed to fetch mail promises.",X.$bb.Error)})),q.removeAppListener(gi.lT.Setup,this,gi.HG.NetworkHandlers)}setRead(q,K){const z=this._mailList[q];z.isOpened!==K&&(z.isOpened=K,this.mailTotals.totalRead+=K?1:-1,this.mailTotals.totalUnread+=K?-1:1,this.broadcastMailCount())}broadcastMailCount(){X.Aq$.isDefined(this.mailTotals)&&(this.game.broadcaster.broadcast(gi.zr.UpdateMailCounters,gi.HG.Mailer),this.game.broadcaster.broadcast(gi.zr.UpdateMailCounters,gi.HG.MailerButton,[this.mailTotals]),this._hudService.updateNotificationBadge(Tw.ts.YourMail,this.mailTotals.totalUnread))}awaitAllMail(){return(0,Q.sH)(this,void 0,void 0,(function*(){return Promise.all([Dw.getAllMail(),this._cloudscriptMailNetworkHandler.getAllMail()]).catch((()=>{this.getAllMailFailure()}))}))}bySendDate(q,K){return new Date(K.sendDate).getTime()-new Date(q.sendDate).getTime()}getAllMail(q){const K=st.q.instance.prodigy.timeManager.getServerTimeMs();(K>=this._lastNetworkCheckTime+this.NETWORK_CHECK_MIN_TIME_MS||q)&&(Promise.all([Dw.getAllMail(),this._cloudscriptMailNetworkHandler.getAllMail()]).then((([q,K])=>this.getAllMailSuccess(K.concat(q).sort(this.bySendDate)))).catch((()=>this.getAllMailFailure())),this._lastNetworkCheckTime=K)}getAllMailSuccess(q){if(te.s.get("GameConstants.Mailer.TEST_MAIL")){this._mailList=null!=q?q:[];const K=this._mailList.length;this.mailTotals={totalRead:0,totalUnread:Iw.TOTAL_MAIL.totalUnread,total:K,splitTestKeys:null},this.game.broadcaster.broadcast(gi.zr.GetAllMailSuccess,gi.HG.Mailer)}else q?this.modifyMail(q):this.getAllMailFailure()}modifyMail(q){const K=st.q.instance.prodigy.gameContainer,z=K.get("9a2-c1c3").getUnclaimedRewardsMail();X.Aq$.isDefined(z)&&q.unshift(z);const Y=K.get("e14-9e08"),{validMail:Q=[],invalidMail:Z=[]}=J().groupBy(q,(q=>Y.isValid(q)?this.isMemberSuppressed(q)?"hiddenMail":"validMail":"invalidMail"));if(this._mailList=Q,Z.length>0){X.VyI.log(`Found ${Z.length} mail item(s) that are invalid and will be deleted`,X.$bb.Verbose);for(const q of Z)this.deleteMail(q),X.VyI.log(`Removing mail ID ${q.id} with subject '${q.subject}' from inbox`,X.$bb.Verbose)}const tt=J().sumBy(Q,(q=>q.isOpened?1:0)),et=Q.length;this.mailTotals={totalRead:tt,totalUnread:et-tt,total:et,splitTestKeys:null},this.broadcastMailCount(),this.game.broadcaster.broadcast(gi.zr.GetAllMailSuccess,gi.HG.Mailer)}isMemberSuppressed({membership:q}){return(2===q||1===q)&&Nn.J.shouldSuppressAd(this._cachedPlayer)}getAllMailFailure(){this.game.input.enabled=!0,this.game.broadcaster.broadcast(gi.zr.GetAllMailFailure,gi.HG.Mailer),X.VyI.log("Could not get all mail.",X.$bb.Error)}markAsRead(q,K){xc.b.isDebugMailData(K)?Dw.markAsRead(K).then(q).catch((()=>this.markAsReadFailure(K))):this._cloudscriptMailNetworkHandler.markAsRead(K).then(q).catch((()=>this.markAsReadFailure(K)))}markAsReadFailure(q){this.game.input.enabled=!0,this.game.broadcaster.broadcast(gi.zr.MarkAsReadFailure,gi.HG.Mailer),X.VyI.log("Could not mark as read.",X.$bb.Error)}deleteMail(q){if(q){if(J().remove(this._mailList,(K=>K===q)),this.mailTotals&&(this.mailTotals.total--,q.isOpened?this.mailTotals.totalRead--:this.mailTotals.totalUnread--,this.broadcastMailCount()),xc.b.isClientInsertedMail(q))return;xc.b.isDebugMailData(q)?Dw.deleteMail(q).catch((()=>this.deleteMailFailure())):this._cloudscriptMailNetworkHandler.deleteMail(q).catch((()=>this.deleteMailFailure()))}else X.VyI.log("Mail model data is not defined.",X.$bb.Error)}deleteMailFailure(){this.game.broadcaster.broadcast(gi.zr.DeleteMailFailure,gi.HG.Mailer),X.VyI.log("Could not delete mail.",X.$bb.Error)}}(0,Q.Cg)([(0,Ge.b)("cc0-46e9"),(0,Q.Sn)("design:type",Ow)],Rw.prototype,"_cloudscriptMailNetworkHandler",void 0),(0,Q.Cg)([(0,Ge.b)("959-82c1"),(0,Q.Sn)("design:type",Ut.W)],Rw.prototype,"_hudService",void 0);var Pw=z(2952);let Mw=class extends ne.D{getWorldList(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.World.GetWorldList,{},!1)}))}updateCachedAppearance(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.Character.UpdateCachedAppearance,{zoneMapChannel:q,userID:K},!1)}))}sendFXMessage(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={action:Pw.P.FX,zoneMapChannel:q,type:K,data:X.Aq$.isDefined(z)?{x:z,y:Y}:void 0};yield this.sendMessage(Q)}))}sendChatMessage(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={action:Pw.P.Chat,zoneMapChannel:q,emoteID:K,danceID:z,chatID:Y,data:null};this.sendMessage(Q)}))}sendCoopHostTeamMessage(q,K,z,Y,X){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={action:Pw.P.HostTeam,zoneMapChannel:q,data:{hostID:K,teamMembers:z,streak:Y,readyMembers:X}};yield this.sendMessage(Q)}))}sendTransformMessage(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={action:Pw.P.Transform,zoneMapChannel:q,showEffect:K,transformID:z,transformType:Y,data:null};yield this.sendMessage(Q)}))}sendCoopTeamDisbandedMessage(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z={action:Pw.P.TeamDisbanded,zoneMapChannel:q,data:{hostID:K}};yield this.sendMessage(z)}))}sendCoopTeamRequestJoinMessage(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y={action:Ke.m.RequestJoinTeam,zoneMapChannel:q,target:z,data:{userID:K}};yield this.sendMessage(Y)}))}sendCoopJoinTeamMessage(q,K,z,Y,X,Z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={action:Ke.m.JoinTeam,zoneMapChannel:q,target:Z,data:{hostID:K,teamMembers:z,streak:Y,readyMembers:X}};yield this.sendMessage(Q)}))}sendCoopTeamUpdatedMessage(q,K,z,Y,X){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={action:Pw.P.TeamUpdated,zoneMapChannel:q,data:{hostID:K,teamMembers:z,streak:Y,readyMembers:X}};yield this.sendMessage(Q)}))}sendCoopPlayerLeftTeamMessage(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y={action:Ke.m.PlayerLeftTeam,zoneMapChannel:q,target:z,data:{userID:K}};yield this.sendMessage(Y)}))}sendCoopStartCoopTitanMatchMessage(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y={action:Ke.m.StartCoOpTitanMatch,zoneMapChannel:q,target:z,data:K};yield this.sendMessage(Y)}))}sendCoopHostHeartbeatMessage(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z={action:Pw.P.HostHeartbeat,zoneMapChannel:q,data:K};yield this.sendMessage(z)}))}sendCoopSyncHealthMessage(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y={action:Pw.P.SyncHealth,zoneMapChannel:q,data:{crystalHP:K,titanHP:z}};yield this.sendMessage(Y)}))}sendCoopQuestionAnsweredMessage(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={action:Ke.m.QuestionAnswered,zoneMapChannel:q,target:K,data:{sourcePlayerID:z,correct:Y}};yield this.sendMessage(Q)}))}sendCoopPlayerAttackedMessage(q,K,z,Y,X,Z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={action:Pw.P.PlayerAttacked,zoneMapChannel:q,data:{sourcePlayerID:K,missed:z,titanHealth:Y,damage:X,spellID:Z}};yield this.sendMessage(Q)}))}sendCoopTitanAttackedMessage(q,K,z,Y,X){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q={action:Pw.P.TitanAttacked,zoneMapChannel:q,data:{crystalHealth:z,missed:K,damage:Y,spellID:X}};yield this.sendMessage(Q)}))}sendCoopTitanDefeatedMessage(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K={action:Pw.P.TitanDefeated,zoneMapChannel:q,data:{}};yield this.sendMessage(K)}))}sendCoopPlayersDefeatedMessage(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K={action:Pw.P.PlayersDefeated,zoneMapChannel:q,data:{}};yield this.sendMessage(K)}))}sendCoopJoinTeamFailedMessage(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y={action:Ke.m.JoinTeamFailed,zoneMapChannel:q,target:K,data:{reason:z}};yield this.sendMessage(Y)}))}sendCoopRejoinJoinTeamMessage(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y={action:Ke.m.PlayerRejoinTeam,zoneMapChannel:q,target:K,data:{userID:z}};yield this.sendMessage(Y)}))}sendCoopCatapultMessage(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z={zoneMapChannel:q,action:Pw.P.Catapult,userID:K,data:{}};yield this.sendMessage(z)}))}sendChangeAppearanceMessage(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K={action:Pw.P.Change,zoneMapChannel:q,data:{}};yield this.sendMessage(K)}))}sendCoopTeamMessage(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z={action:Pw.P.CoopTeam,zoneMapChannel:q,data:K};yield this.sendMessage(z)}))}sendMessage(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this.makeCloudscriptRequest(ie.D.MultiplayerMessage.SendMessage,q,!0)}))}};Mw=(0,Q.Cg)([(0,dt.injectable)()],Mw);var Nw=z(60126),xw=z(65933);class Lw extends Xs.D{bulkUpdatePetMergeRank(q){return(0,Q.sH)(this,void 0,void 0,(function*(){0}))}performMergeAction(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.call(ie.D.PetMerge.PerformMergeAction,{basePetUniqueId:q,mergeIngredients:K},!1)}))}}var kw=z(38560),Bw=z(59219);let Uw=class extends ne.D{setPlayerDebugTime(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.Time.SetPlayerDebugTime,{debugOffset:q,preserveDebugTime:K},!1)}))}getPlayerTimezoneOffsetEntity(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.Time.GetPlayerTimezoneEntity,{},!1)}))}};Uw=(0,Q.Cg)([(0,rt.injectable)()],Uw);class Fw extends Sw{constructor(q){super(q),this.titan=null,this.isCatapultBattle=!1,q.broadcaster.addAppListener(gi.lT.Setup,(()=>{this.setup()}),this,gi.HG.NetworkHandlers,!0)}getTitans(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasCompletedTutorial()){const q=st.q.instance.prodigy.timeManager.getServerTimeMs();if(q>=Fw._lastNetworkCheckTime+Fw.TITAN_NETWORK_CHECK_MIN_TIME_MS){Fw._lastNetworkCheckTime=q;const K=null;K?this.getTitansSuccess(K):(st.q.instance.prodigy.loading(!0),yield st.q.instance.prodigy.gameContainer.get("774-4659").getTitans(this.getTitansSuccess.bind(this),this.networkCallFailure.bind(this)))}else this.getTitansSuccess(this.titan)}}))}getTitan(q,K="Titan"){if(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasCompletedTutorial()){let z=null;if(z)this.getTitanSuccess(K,z);else{st.q.instance.prodigy.loading(!0);st.q.instance.prodigy.gameContainer.get("774-4659").getTitan(q,this.getTitanSuccess.bind(this,K),this.getTitanFailure.bind(this,K)).catch(X.RQr.createHandler("Could not get status of Titan"))}}}getTitanUserData(){if(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasCompletedTutorial()){st.q.instance.prodigy.gameContainer.get("774-4659").getTitanUserData(null,null).catch(X.RQr.createHandler("Could not get user titan data"))}}hitTitan(q){if(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasCompletedTutorial()){st.q.instance.prodigy.loading(!0);const K=st.q.instance.prodigy.gameContainer.get("774-4659");K.hitTitan(q,this.hitTitanSuccess.bind(this),this.networkCallFailure.bind(this)).catch(X.RQr.createHandler("Could not do damage to Titan")),this.isCatapultBattle&&K.hitTitan(q,this.hitTitanSuccess.bind(this),this.networkCallFailure.bind(this)).catch(X.RQr.createHandler("Could not do damage to Titan"))}}isTitanAlive(){var q,K,z;return X.Aq$.isDefined(null===(q=this.titan)||void 0===q?void 0:q.id)&&(null===(K=this.titan)||void 0===K?void 0:K.health)>0&&!(null===(z=this.titan)||void 0===z?void 0:z.processed)}isNewTitan(){var q;const K=null===(q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.playerTitanData)||void 0===q?void 0:q.titanID;return X.Aq$.isDefined(this.titan)&&(!X.Aq$.isDefined(K)||K!==this.titan.id)}setup(){this.game.broadcaster.removeAppListener(gi.lT.Setup,this,gi.HG.NetworkHandlers),this.getTitanUserData()}getTitansSuccess(q){st.q.instance.prodigy.loading(!1),this.titan=q,this.game.broadcaster.broadcast(gi.RZ.GotTitans,"Titan",[q])}getTitanSuccess(q,K){st.q.instance.prodigy.loading(!1),this.titan=K,this.game.broadcaster.broadcast(gi.RZ.GotTitan,q,[K])}getTitanFailure(q){st.q.instance.prodigy.loading(!1),X.VyI.log("Error: Titan network call failure",X.$bb.Error),this.titan=null,this.game.broadcaster.broadcast(gi.RZ.GotTitan,q,[null])}hitTitanSuccess(q){st.q.instance.prodigy.loading(!1),this.titan.hits=q.hits}networkCallFailure(){st.q.instance.prodigy.loading(!1),this.titan=null,X.VyI.log("Error: Titan network call failure",X.$bb.Verbose),this.game.broadcaster.broadcast(gi.RZ.GotTitan,"Titan",[null])}}Fw.TITAN_NETWORK_CHECK_MIN_TIME_MS=3e5,Fw._lastNetworkCheckTime=0;var Gw=z(37962),jw=z(34854),$w=z(81623),Hw=z(29044);let Vw=class{constructor(){this._userID=null}setSessionToken(q,K){this._userID=q,this._token=K;const z=st.q.instance.prodigy.gameContainer.get("b09-138c");z.setToken("token",this._token,!0,!1),z.setToken("auth-key",this._token,!0,!1),z.setToken("userID",`${this._userID}`,!1,!0)}isLoggedIn(){return X.Aq$.isDefined(this._token)&&this._token.length>0}getSessionToken(){return this._token}authenticateRequest(q){if(q.getMethod()===X.iXQ.Get)q.setQueryParameter("token",this._token),q.setQueryParameter("userID",`${this._userID}`);else if(q.getBody()instanceof X._A9){const K=q.getBody().getJson();K.token=this._token,K["auth-key"]=this._token,K.userID=`${this._userID}`}else if(q.getBody()instanceof de.c){const K=q.getBody().getJson();K.token=this._token,K["auth-key"]=this._token,K.userID=`${this._userID}`}else X.VyI.log("Could not append legacy authentication to web request",X.$bb.Warning)}logout(){this._token=null}getUserID(){return this._userID}};Vw=(0,Q.Cg)([(0,dt.injectable)()],Vw);var Ww=z(57797),qw=z(92240),Kw=z(94310),zw=z(32259);class Yw{constructor(q,K,z){this._assets=[],this._locations=[],this._overrideNames={},this._game=q,this._assets=K,this._locations=z}getOverrideName(q){var K;return null===(K=this._overrideNames[q])||void 0===K?void 0:K.map}getOverrideBattleBg(q){var K;return null===(K=this._overrideNames[q])||void 0===K?void 0:K.battleBg}getOverrideBgm(){}active(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;for(let z=0;z0}return!1}getButtons(){return[]}getAssets(q){return X.Aq$.isDefined(this.getOverrideName(q))?this._assets.concat(this.getOverrideName(q)):this._assets}init(q,K){return{}}applySkin(q,K){}cleanup(){}}var Qw=z(92946),Xw=z(31589),Zw=z(30065),Jw=z(47728);class tT extends Yw{constructor(){super(...arguments),this._festivalHub="lamplight-B3",this.dailyDrops=[{type:"currency",ID:this.getFestivalCurrency(),N:22}],this.canDoDaily=new Map,this.afterBattleSpawn=[640,320],this.dailyEventSize=new X.I9Y(40,40),this.dailyHighlighterOffset=new X.I9Y(-40,0),this.currentWheelName="unknown-wheel"}getBattleDrops(q,K=1,z=0){const Y=this.getFestivalCurrency(),Q=q*K+z;return mf.R.addDebugMessage(`Festival currency ID ${Y}: ${Q}`),[{type:"currency",ID:Y,N:Q,R:1}]}init(q){this.playerDaily=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily;const K=st.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig();return(null==K?void 0:K.festivalDailyData)&&(this.festivalDailyData=K.festivalDailyData,this.festivalDailyData.dailyPlacements&&(this.dailyPlacements=this.festivalDailyData.dailyPlacements),this.festivalDailyData.dailyDrops&&(this.dailyDrops=this.festivalDailyData.dailyDrops)),(null==K?void 0:K.bossBattleModalData)&&(this.bossBattleModalData=K.bossBattleModalData),this.checkToRefreshDaily().catch(X.RQr.createHandler("Error checking the daily refresh")),st.q.instance.game.broadcaster.addAppListener(gi.n8.FestivalVideoClosed,this.onFestivalVideoClosed,this),{}}checkToRefreshDaily(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.playerDaily.isExpired(this.festivalName)&&(yield this.refreshDaily()),this.canDoDaily.set(Ww.je.Normal,!this.playerDaily.isDailyBattleComplete(Ww.je.Normal)&&this.checkStateKeyActiveState(Kw.L.DailyBattles)),this.canDoDaily.set(Ww.je.Boss,!this.playerDaily.isDailyBattleComplete(Ww.je.Boss)&&this.checkStateKeyActiveState(Kw.L.DailyBossBattles))}))}checkStateKeyActiveState(q){var K,z;const Y=this.getStateDataFromKey(q);return null===(z=null===(K=null==Y?void 0:Y.active)||void 0===K?void 0:K.isActive)||void 0===z||z}getStateDataFromKey(q){var K,z;const Y=st.q.instance.prodigy.gameContainer.get("f03-2b73"),Q=null===(K=Y.getCachedFestivalQuestData())||void 0===K?void 0:K.getStates(),X=null===(z=Y.getCachedFestivalQuestData())||void 0===z?void 0:z.getTasks().map((q=>q.taskProgress));return qw.h.calculateState(q,null!=Q?Q:[],null!=X?X:[])}applySkin(q,K){this.applyWheel(q)}spawnBossStatue(q,K,z,Y){K.loadWithDependenciesFromGUID(Pi.l.TransformRelayObject,q.contentGameObject).then((X=>(0,Q.sH)(this,void 0,void 0,(function*(){const Q=yield K.loadWithDependenciesFromGUID(z,X);Q.transform.setPosition(Y.x,Y.y),q.data.addCollisionZone(q,1050,100,150,180),Q.findComponentInChildren(Kl.n).onClicked.add((()=>{this.openBossModalPrefabMenu()}))})))).catch(X.RQr.createHandler("Error loading NPC Boss Statue"))}openBossModalPrefabMenu(){const q=st.q.instance.prodigy.open.prefabMenu(Pi.l.BossBattleModal,void 0,!0,!0,!0);q.createContainer=!1,q.onPrefabLoaded.addOnce((q=>{q.findComponentInChildren(Qw.E).startDailyBossBattleCallback=()=>{this.startDailyBossBattle().catch(X.RQr.createHandler("Error starting a daily boss battle from the modal"))}}))}startDailyBossBattle(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!q.daily.getDailyBattleEncounter(Ww.je.Boss)){const K=yield qi.s.sampleRandomEncounter(this.festivalDailyData.bossEncounterEntity);K&&q.daily.setDailyBattleEncounter(Ww.je.Boss,K)}this.startDailyBattle("lamplight-B3",Ww.je.Boss).catch(X.RQr.createHandler("Error starting daily boss battle"))}))}refreshDaily(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const{normalPlacement:z,bossPlacement:Y,normalEncounter:Q,bossEncounter:X}=yield Jw.x.sampleDailyBattleData(this.festivalDailyData,q,K);if(z&&Q||Y&&X)this.dailyPlacements=this.dailyPlacements.filter((q=>q!==z||q!==Y)),this.playerDaily.start(this.festivalName,this.festivalDailyData.battleCount,new Map([[Ww.je.Normal,z],[Ww.je.Boss,Y]]),new Map([[Ww.je.Normal,Q],[Ww.je.Boss,X]]),this.festivalDailyData.refreshIntervalHours);else{const q=st.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig();(null==q?void 0:q.festivalDailyData)&&(this.dailyPlacements=q.festivalDailyData.dailyPlacements)}}))}setIntroState(q,K,z=""){X.VyI.log("SetIntroState is Unimplemented",X.$bb.Warning)}signOnInputDown(q,K,z,Y,Q){var X;const Z=st.q.instance.prodigy.gameContainer.get("119-35f9");st.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:"festival-signpost",destinationName:"festival-progression-window",interfaceName:"festival-progression-window",interfaceType:Si.Wm.Modal}),Object.values(Zw.Q).includes(null===(X=Z.getActiveFestival())||void 0===X?void 0:X.type)?Jw.x.openFestivalProgressMenu(Si.$N.SignpostClick):st.q.instance.prodigy.open.message(q,K,z,Y,null,Q)}placeDaily(q,K,z){var Y,Q,X,Z,J,tt,et,it,nt,at,rt,ot,ht,dt,lt,ut,ft;const bt=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,pt=bt.daily.getDailyBattlePlacement(z);let vt=null;if(null!==(Y=this.canDoDaily.get(z))&&void 0!==Y&&Y&&(null==pt?void 0:pt.location.includes(K))){const Y=pt.position[0],gt=pt.position[1];if(pt.useSpine||z===Ww.je.Boss){let vt=ct.Q.Spine_sparkle_2_json;if(z===Ww.je.Boss){const q=null===(X=null===(Q=bt.daily.getDailyBattleEncounter(z))||void 0===Q?void 0:Q.boss)||void 0===X?void 0:X.ID,K=null===(Z=Ee.t.getItem("boss",q))||void 0===Z?void 0:Z.metadata;(null===(tt=null===(J=null==K?void 0:K.assets)||void 0===J?void 0:J.battle)||void 0===tt?void 0:tt.assetKey)&&(vt=ct.Q[null===(it=null===(et=null==K?void 0:K.assets)||void 0===et?void 0:et.battle)||void 0===it?void 0:it.assetKey])}else{const q=bt.daily.getDailyBattleEncounter(z),K=null===(nt=Ee.t.getItem("pet",null==q?void 0:q.pets[0].ID))||void 0===nt?void 0:nt.metadata;(null===(rt=null===(at=null==K?void 0:K.assets)||void 0===at?void 0:at.default)||void 0===rt?void 0:rt.assetKey)?vt=ct.Q[null===(ht=null===(ot=null==K?void 0:K.assets)||void 0===ot?void 0:ot.default)||void 0===ht?void 0:ht.assetKey]:(null===(lt=null===(dt=null==K?void 0:K.assets)||void 0===dt?void 0:dt.default)||void 0===lt?void 0:lt.ID)&&(vt=null===(ft=null===(ut=null==K?void 0:K.assets)||void 0===ut?void 0:ut.default)||void 0===ft?void 0:ft.ID)}st.q.instance.prodigy.create.spineNPC(q.content,vt,"idle",Y,gt,void 0,void 0,(()=>{this.revealDailyMonster(z,q,K)}),pt.flip).name=`${z}Placement`}else vt=st.q.instance.prodigy.create.element(q.foreground,Y,gt),vt.highlight(!0,this.dailyHighlighterOffset.x,this.dailyHighlighterOffset.y),vt.arrow.frameName="exclamation",q.addClickableEvent(Y,gt,this.dailyEventSize.x,this.dailyEventSize.y,this.revealDailyMonster.bind(this,z,q,K,void 0),void 0,0)}return vt}revealDailyMonster(q,K,z,Y){const Q=null!=Y?Y:[0,0],Z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.getDailyBattlePlacement(q);if(!Z)return void X.VyI.log(`No daily placement found for location: ${z}`,X.$bb.Warning);const J=Z.position,tt=st.q.instance.prodigy.event.create();this.afterBattleSpawn=[J[0]+Q[0],J[1]+Q[1]],tt.validPath(K.user,K.path,this.afterBattleSpawn[0],this.afterBattleSpawn[1]),tt.function(K.user.faceToward.bind(K.user,J[0])),tt.enableInput(!1),tt.bgm(null),tt.sound(19,"monster"),tt.function(K.user.chat.bind(K.user,1)),tt.delay(2e3),tt.enableInput(!0),tt.function((()=>{this.startDailyBattle(z,q).catch(X.RQr.createHandler("Error starting the daily battle"))})),tt.start()}startDailyBattle(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z,Y,Z,J;const tt=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,et=tt.daily.getDailyBattleEncounter(K);if(!et||!K)return void X.VyI.log(`No encounter or daily battle type found for daily battle at location: ${q}`,X.$bb.Error);const it=K===Ww.je.Boss?this.festivalDailyData.bossEncounterEntity:this.festivalDailyData.encounterEntity;tt.daily.isFestivalDailyBattle=!0;const nt=K===Ww.je.Boss?Hi.gu.FestivalDailyBoss:Hi.gu.FestivalDailyBattle,at=et.drops?[...et.drops,...this.dailyDrops]:this.dailyDrops,ot=Object.assign(Object.assign({},et),{screen:this.festivalDailyData.screen,pets:[...et.pets],bench:null==it?void 0:it.bench,drops:at,revampBattleType:nt});let ht=q;if(ot.boss){const q=st.q.instance.prodigy.gameContainer.get("f03-2b73"),K={params:{taskEventType:_h.Z7.Unit,unitType:Hi.uj.Boss,id:ot.boss.ID,name:ot.boss.name,nickname:ot.boss.nickname,team:rt.ETeamId.Away}};if(this.festivalDailyData.mapOverrideTasks){const tt=yield Promise.all(this.festivalDailyData.mapOverrideTasks.map((z=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.willFestivalTaskComplete(z,ps.T.DEFEAT_UNIT,K)})))));(null==tt?void 0:tt.some(Boolean))&&X.Aq$.isDefined(this.festivalDailyData.mapOverrideLocation)&&(ht=null!==(Y=null===(z=this.festivalDailyData.mapOverrideLocation)||void 0===z?void 0:z.mapKey)&&void 0!==Y?Y:ht,this.afterBattleSpawn=null!==(J=null===(Z=this.festivalDailyData.mapOverrideLocation)||void 0===Z?void 0:Z.coordinates)&&void 0!==J?J:this.afterBattleSpawn)}}st.q.instance.prodigy.battle.start(ot,this.escape.bind(this,q),this.dailyBattleComplete.bind(this,ht,K),null,this._festivalHub),this._game.input.enabled=!0}))}escape(q){st.q.instance.prodigy.world.it(q,this.afterBattleSpawn[0],this.afterBattleSpawn[1])}dailyBattleComplete(q,K){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.playedBattle(K),this.refreshDaily(q,K).then((()=>{st.q.instance.prodigy.world.it(q,this.afterBattleSpawn[0],this.afterBattleSpawn[1])})).catch(X.RQr.createHandler("Error refreshing daily battles"))}openStore(q,K=!1){X.Aq$.isDefined(q)&&(K?st.q.instance.prodigy.open.legacyStore(q):st.q.instance.prodigy.open.store(q))}teleportToEvent(q){st.q.instance.prodigy.world.it(X.Aq$.isDefined(q)?q:this._festivalHub)}createHudButton(q,K){return st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("key",tT.WORLD_MAP_ID)>0?{key:q,frameName:K,callback:()=>{this.onClickCallback()}}:null}onClickCallback(){Na.i.isZoneLocked(mn.A_.LAMPLIGHT)?Na.i.openLockMessage(mn.A_.LAMPLIGHT):st.q.instance.prodigy.open.prefabMenu(Pi.l.StayLeaveModalDialog).onPrefabLoaded.addOnce((q=>{q.findComponent(Tf.R).setLocalizationKey("LAMPLIGHT_CONFIRM_TRAVEL");const K=new zw.e;K.create(),K.configure(q),K.onSuccess.addOnce((()=>{st.q.instance.prodigy.open.menuCloseAll();const q=st.q.instance.prodigy.world.getCurrentZone();st.q.instance.prodigy.world.getZone(q).handleLeaving(Un.j.teleport,(()=>{this.teleportToEvent()}))}))}))}getCurrentFestivalWheelId(q=6){const K=st.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig(),z=st.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival();if(!K||!z)return X.VyI.log("No active festival found",X.$bb.Warning),q;const Y=Bc.R.getNow();for(const Q of K.festivalPrizeWheels){const q=new Date(z.startDate);q.setDate(q.getDate()+Q.startDateOffset);const K=new Date(z.startDate);if(K.setDate(K.getDate()+Q.endDateOffset),q<=Y&&K>=Y)return this.playerDaily.currentWheelID=Q.wheelId,this.playerDaily.currentWheelEndDate=K,Q.wheelId}return q}applyWheel(q){var K,z,Y,Z,J,tt;const et=st.q.instance.prodigy.gameContainer.get("119-35f9"),nt=et.getFestivalConfig(),at=null===(K=null==nt?void 0:nt.festivalPrizeWheels)||void 0===K?void 0:K.find((q=>q.wheelId===this.getCurrentFestivalWheelId()));if(!nt||!at)return void X.VyI.log("No festival config or wheel data found",X.$bb.Warning);const rt=null!==(z=at.mapLocation)&&void 0!==z?z:"lamplight-B3",ot=null!==(Y=at.position)&&void 0!==Y?Y:{x:78,y:70},ht=at.wheelFrame?{atlas:at.wheelAtlas,frame:at.wheelFrame}:{atlas:it._.Event_summerfest_json,frame:"wheel-of-sun"};if(q.saveTag===rt){this.currentWheelName=null!==(tt=null===(J=null===(Z=et.getFestivalConfig())||void 0===Z?void 0:Z.festivalPrizeWheels.find((q=>q.wheelId===this.getCurrentFestivalWheelId())))||void 0===J?void 0:J.name)&&void 0!==tt?tt:"wheel-of-sun-map-asset";const K=st.q.instance.prodigy.gameContainer.get("983-05a7");K.loadWithDependenciesFromGUID(Pi.l.TransformRelayObject,q.contentGameObject).then((z=>(0,Q.sH)(this,void 0,void 0,(function*(){var Y,Q;cr.d.loadWithInjectedValuesAndDependenciesFromGUID(K,Pi.l.FestivalPrizeWheel,{customWheelId:this.getCurrentFestivalWheelId(),isWheelNewStateActive:null!==(Y=this.playerDaily.isNewFestivalWheel)&&void 0!==Y&&Y,isWheelNpcActive:null===(Q=at.customWheelNpcUsed)||void 0===Q||Q}).then((K=>{K.parent=z,K.transform.setPosition(ot.x,ot.y),this.festivalPrizeWheelComponent=K.findComponentInChildren(Xw.l),this.festivalPrizeWheelComponent.wheelGraphic.updateAsset(ht.atlas,ht.frame),this.festivalPrizeWheelComponent.wheelGraphic.sizeToSourceImage(),this.festivalPrizeWheelComponent.screen=q,this.updateWheelSparkles(this.festivalPrizeWheelComponent)})).catch(X.RQr.createHandler("Error loading Festival Prize Wheel prefab with injected values"))})))).catch(X.RQr.createHandler("Error loading Festival Prize Wheel prefab"))}}updateWheelSparkles(q){}getDailyElementSizeForSpinePlacements(q,K,z){var Y;const Q=null===(Y=q.findComponent(ea.v))||void 0===Y?void 0:Y.getCurrentDimensions();return Q?(this.dailyEventSize.x=Q.width,this.dailyEventSize.y=Q.height,{dailyX:K-this.dailyEventSize.x/2,dailyY:z-this.dailyEventSize.y}):{dailyX:K,dailyY:z}}onFestivalVideoClosed(){this._questManagerHub.setupValidTasks().catch(X.RQr.createHandler("Error setting up quests after festival video closed"))}talkToShopkeeper(q,K,z,Y,Q){const X=new Ni.rD(this._game),Z=st.q.instance.prodigy.breadcrumbManager,J=[],tt=Z.isBreadcrumbComplete(q,K),et=tt?z:Y;for(const it of et)J.push({dialogueData:X.dataProvider.get(it),blockInput:!0});tt||J.push({callback:()=>{Z.completeBreadcrumb(q,K)}}),X.addEvents(J),X.start(!0,(()=>this.openStore(Q)))}cleanup(){super.cleanup(),st.q.instance.game.broadcaster.removeAppListener(gi.n8.FestivalVideoClosed,this.onFestivalVideoClosed,this)}}tT.WORLD_MAP_ID=13,(0,Q.Cg)([(0,Ge.b)("b37-c775"),(0,Q.Sn)("design:type",Ls.n)],tT.prototype,"_questManagerHub",void 0);var eT=z(20706),iT=z(47101),sT=z(80494);class nT extends tT{constructor(q){super(q,[Gn.t.Tileset_town_october_night_png,Gn.t.Tileset_town_november_night_png,Gn.t.Tileset_town_new_night_png,Gn.t.Tileset_generic_new_night_png,Gn.t.Tileset_arena_gold_night_png,Gn.t.Tileset_forest_new_night_png,Gn.t.Tileset_firefly_new_night_png,it._.Event_pumpkinfest_json,it._.Npc_sprite_julia_ghoulia_json,ct.Q.Spine_npc_julia_json,ot.V.Bgm_pumpkinfest],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B0","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName="Pumpkinfest",this.adID=5,this._overrideNames={"lamplight-A2":{map:iT.N.Map_lamplight_a2_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-A3":{map:iT.N.Map_lamplight_a3_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-A4":{map:iT.N.Map_lamplight_a4_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B0":{map:iT.N.Map_lamplight_b0_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B1":{map:iT.N.Map_lamplight_b1_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B2":{map:iT.N.Map_lamplight_b2_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B3":{map:iT.N.Map_lamplight_b3_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B4":{map:iT.N.Map_lamplight_b4_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B5":{map:iT.N.Map_lamplight_b5_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-C2":{map:iT.N.Map_lamplight_c2_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-C3":{map:iT.N.Map_lamplight_c3_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-C4":{map:iT.N.Map_lamplight_c4_pumpkinfest_json,battleBg:sT.t.BattleLamplightOutsidePumpkinFestNight}},this.dailyPlacements=[{location:"lamplight-A2",position:[440,440],pathOffset:[-30,80],pumpkin:3,type:Ww.k$.Any},{location:"lamplight-A3",position:[980,292],indicatorOffsetX:-20,pathOffset:[90,140],pumpkin:5,type:Ww.k$.Any},{location:"lamplight-A4",position:[1160,320],pathOffset:[-40,40],pumpkin:4,type:Ww.k$.Any},{location:"lamplight-B2",position:[140,220],indicatorOffsetX:-20,pathOffset:[70,80],pumpkin:5,type:Ww.k$.Any},{location:"lamplight-B3",position:[400,600],indicatorOffsetX:5,pathOffset:[0,-50],pumpkin:2,type:Ww.k$.Any},{location:"lamplight-B4",position:[1080,320],pathOffset:[-40,120],pumpkin:1,type:Ww.k$.Any},{location:"lamplight-B5",position:[480,240],pathOffset:[-40,100],pumpkin:3,type:Ww.k$.Any},{location:"lamplight-C2",position:[760,360],indicatorOffsetX:5,pathOffset:[-30,100],pumpkin:2,type:Ww.k$.Any},{location:"lamplight-C3-arena",position:[280,360],pathOffset:[-30,100],pumpkin:1,type:Ww.k$.Any},{location:"lamplight-C4",position:[1e3,440],pathOffset:[-30,100],pumpkin:4,type:Ww.k$.Any}],this.canDoDaily.set(Ww.je.Normal,!1)}getButtons(){return[this.createHudButton(it._.General_icons_hud_json,"pumpkinfest-0")]}getBattleDrops(q){return super.getBattleDrops(q).concat([{type:"item",ID:126,N:1,R:.33},{type:"item",ID:125,N:1,R:.33}])}getFestivalCurrency(){return 2}init(q){return super.init(q),q.addPostFilter(new eT.L(1114163,16772812)),{bgmID:26}}getOverrideBgm(){return ot.V.Bgm_pumpkinfest}applySkin(q){super.applySkin(q);const K=it._.Event_pumpkinfest_json,z=q.saveTag,Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Z=st.q.instance.prodigy.gameContainer.get("983-05a7");if("lamplight-B3"===z){const z=q.background.addChild(st.q.instance.prodigy.create.sprite(640,250,K,"event-sign"));z.anchor.set(.5,1),z.inputEnabled=!0,z.events.onInputDown.add(this.signOnInputDown.bind(this,Y.getText("PUMPKINFEST_SIGN_MESSAGE"),null,null,Y.getText("PUMPKINFEST_SIGN_TITLE"))),q.data.addCollisionZone(q,600,160,100,80),Z.loadWithDependenciesFromGUID(Pi.l.TransformRelayObject,q.foregroundGameObject).then((K=>(0,Q.sH)(this,void 0,void 0,(function*(){(yield Z.loadWithDependenciesFromGUID(Pi.l.Npc_kandi_korn,K)).transform.setPosition(890,530),q.data.addCollisionZone(q,840,420,120,120)})))).catch(X.RQr.createHandler("Error loading Kandi Korn")),Z.loadWithDependenciesFromGUID(Pi.l.TransformRelayObject,q.foregroundGameObject).then((K=>(0,Q.sH)(this,void 0,void 0,(function*(){(yield Z.loadWithDependenciesFromGUID(Pi.l.Npc_kandi_kart,K)).transform.setPosition(930,390),q.data.addCollisionZone(q,940,420,240,240)})))).catch(X.RQr.createHandler("Error loading Kandi's Kart")),Z.loadWithDependenciesFromGUID(Pi.l.TransformRelayObject,q.contentGameObject).then((K=>(0,Q.sH)(this,void 0,void 0,(function*(){(yield Z.loadWithDependenciesFromGUID(Pi.l.NPCGnomeStylist,K)).transform.setPosition(270,570),q.data.addCollisionZone(q,240,500,90,90)})))).catch(X.RQr.createHandler("Error loading NPC Gnome Stylist")),this.spawnBossStatue(q,Z,Pi.l.PumpkinfestBossStatue,new X.I9Y(1105,125))}Z.loadWithDependenciesFromGUID(Pi.l.Particle_fog_pumpkinfest,q.uiLayerGameObject).catch(X.RQr.createHandler("Error loading Fog prefab"));const J=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.get("zone-lamplight");X.Aq$.isDefined(J)&&X.Aq$.isDefined(J.quest)&&J.quest.ID>1&&(this.placeDaily(q,st.q.instance.prodigy.world.getCurrentMap(),Ww.je.Normal),this.placeDaily(q,st.q.instance.prodigy.world.getCurrentMap(),Ww.je.Boss))}updateWheelSparkles(q){q.moveSparkleEffect(5,-25)}talkToShopkeeper(){const q=new Ni.rD(this._game),K=st.q.instance.prodigy.breadcrumbManager,z=En.B.FEATURE_PUMPKINFEST_CUTSCENES,Y=En.B.BREADCRUMB_PUMPKINFEST_INTRO;K.isBreadcrumbComplete(z,Y)?q.addEvents([{dialogueData:q.dataProvider.get(910),blockInput:!0}]):q.addEvents([{dialogueData:q.dataProvider.get(905),blockInput:!0},{dialogueData:q.dataProvider.get(906),blockInput:!0},{dialogueData:q.dataProvider.get(907),blockInput:!0},{dialogueData:q.dataProvider.get(908),blockInput:!0},{dialogueData:q.dataProvider.get(909),blockInput:!0},{callback:()=>{K.completeBreadcrumb(z,Y)}}]),q.start(!0,(()=>{st.q.instance.prodigy.open.store(14)}))}revealDailyMonster(q,K,z){var Y;let Q;const X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.getDailyBattlePlacement(q);X&&(Q=null!==(Y=X.pathOffset)&&void 0!==Y?Y:[0,0],super.revealDailyMonster(q,K,z,Q))}}var aT=z(45224);class rT extends tT{constructor(q){super(q,[Gn.t.Tileset_town_new_png,it._.Event_starlight_festival_json,Gn.t.Tileset_springfest_png,ot.V.Bgm_spring_fest],["lamplight-A1","lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3-arena","lamplight-C3","lamplight-C4","lamplight-D3"]),this.festivalName="Springfest",this.b3FishLayerStates={1:!1,2:!1,3:!1,4:!0},this.adID=100,this._overrideNames={"lamplight-A1":{map:iT.N.Map_lamplight_a1_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest},"lamplight-A2":{map:iT.N.Map_lamplight_a2_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest},"lamplight-A3":{map:iT.N.Map_lamplight_a3_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest},"lamplight-B2":{map:iT.N.Map_lamplight_b2_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest},"lamplight-B3":{map:iT.N.Map_lamplight_b3_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest},"lamplight-B4":{map:iT.N.Map_lamplight_b4_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest},"lamplight-C2":{map:iT.N.Map_lamplight_c2_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest},"lamplight-C3":{map:iT.N.Map_lamplight_c3_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest},"lamplight-C4":{map:iT.N.Map_lamplight_c4_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest},"lamplight-D3":{map:iT.N.Map_lamplight_d3_springfest_json,battleBg:sT.t.BattleLamplightOutsideSpringfest}},this.dailyPlacements=[{location:"lamplight-A2",position:[1080,640],pathOffset:[0,-60],type:Ww.k$.Any},{location:"lamplight-A3",position:[40,440],pathOffset:[70,30],type:Ww.k$.Any},{location:"lamplight-A4",position:[120,600],pathOffset:[40,-40],type:Ww.k$.Any},{location:"lamplight-B2",position:[440,520],pathOffset:[20,-50],type:Ww.k$.Any},{location:"lamplight-B3",position:[80,680],pathOffset:[50,-50],type:Ww.k$.Any},{location:"lamplight-B4",position:[960,600],pathOffset:[0,-20],type:Ww.k$.Any},{location:"lamplight-B5",position:[40,360],pathOffset:[40,-5],type:Ww.k$.Any},{location:"lamplight-C2",position:[40,520],pathOffset:[90,40],type:Ww.k$.Any},{location:"lamplight-C3-arena",position:[280,600],pathOffset:[90,30],type:Ww.k$.Any},{location:"lamplight-C4",position:[360,120],pathOffset:[-90,68],type:Ww.k$.Any}],this.dailyHighlighterOffset.x=-55,this.dailyHighlighterOffset.y=-15}init(q){return super.init(q),{bgmID:ot.V.Bgm_spring_fest}}getFestivalCurrency(){return 17}getOverrideBgm(){return ot.V.Bgm_spring_fest}getButtons(){return[this.createHudButton(it._.General_icons_hud_json,"springfest")]}applySkin(q){super.applySkin(q);const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=it._.Event_starlight_festival_json,Y=q.saveTag,Z=K.state.get("zone-lamplight"),J=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);if(X.Aq$.isDefined(Z)&&X.Aq$.isDefined(Z.quest)&&Z.quest.ID>1){const K=this.placeDaily(q,Y,Ww.je.Normal);X.Aq$.isDefined(K)&&K.add(st.q.instance.prodigy.create.sprite(-14,0,it._.General_icons_json,"eggpile"))}switch(q.saveTag){case aT.f.TOWN_CENTRE:const K=q.content.addChild(st.q.instance.prodigy.create.sprite(640,250,z,"event-sign-1"));K.anchor.set(.5,1),K.inputEnabled=!0,K.events.onInputDown.add(this.signOnInputDown.bind(this,J.getText("SPRINGFEST_SIGN_MESSAGE"),null,null,J.getText("SPRINGFEST_SIGN_TITLE"),{modifyProperty:[{element:"contentText",property:"horizontalAlignment",value:"center"}]})),K.animations.add("sway",["event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-2","event-sign-3","event-sign-1","event-sign-4","event-sign-5","event-sign-6"],12,!0,!1),K.animations.play("sway",void 0,!0);const Y=this._weekendEvents.getActiveFestival(),Z=X.Aq$.isDefined(Y)?new Date(Y.endDate).getTime()-Date.now():0;cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Pi.l.GrottoPortal,{TIME_REMAINING:Z},q.contentGameObject).then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){q.transform.setPosition(1100,110)})))).catch(X.RQr.createHandler("Error loading Grotto Portal"));break;case aT.f.BARGO_ZONE:this.addNpc(Pi.l.BargoNPC,320,280,this.talkToBargo);break;case aT.f.VERNA_ZONE:this.addNpc(Pi.l.VernaNPC,1150,490,this.talkToVerna);break;case aT.f.HARRIET_ZONE:this.addNpc(Pi.l.HarrietNPC,800,460,this.talkToHarriet),this._game.broadcaster.addAppListener(gi.J8.PlayerEditingMenuClosed,this.bunnyEquipmentUpdate.bind(this),this,this._game);break;case aT.f.DON_ZORRO_ZONE:this.addNpc(Pi.l.DonZorroNPC,800,420,this.talkToDonZorro),this._game.broadcaster.addAppListener(gi.J8.PlayerEditingMenuClosed,this.foxEquipmentUpdate.bind(this),this,this._game)}}addNpc(q,K,z,Y){st.q.instance.prodigy.prefabFactory.addPrefabNPC(q,K,z).then((q=>{q.findComponentInChildren(Kl.n).onClicked.add(Y,this)})).catch(X.RQr.createHandler(`Springfest: Unable to load the NPC Prefab: ${q}`))}revealDailyMonster(q,K,z){var Y;let Q;const X=this.dailyPlacements.find((q=>q.location===z));X&&(Q=null!==(Y=X.pathOffset)&&void 0!==Y?Y:[0,0],super.revealDailyMonster(q,K,z,Q))}talkToBargo(){const q=new Ni.rD(this._game),K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.equipment.getHat();Z.indexOf(aT.f.BUNNY_HATS,K)>-1?q.addEvents([{dialogueData:q.dataProvider.get(816),blockInput:!0},{callback:()=>{st.q.instance.prodigy.world.it(aT.f.HARRIET_ZONE,1050,600)}}]):Z.indexOf(aT.f.FOX_HATS,K)>-1?q.addEvents([{dialogueData:q.dataProvider.get(815),blockInput:!0}]):q.addEvents([{dialogueData:q.dataProvider.get(812),blockInput:!0},{dialogueData:q.dataProvider.get(813),blockInput:!0},{dialogueData:q.dataProvider.get(814),blockInput:!0}]),q.start(!0)}talkToVerna(){const q=new Ni.rD(this._game),K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.equipment.getHat();Z.indexOf(aT.f.FOX_HATS,K)>-1?q.addEvents([{dialogueData:q.dataProvider.get(811),blockInput:!0},{callback:()=>{st.q.instance.prodigy.world.it(aT.f.DON_ZORRO_ZONE,100,460)}}]):Z.indexOf(aT.f.BUNNY_HATS,K)>-1?q.addEvents([{dialogueData:q.dataProvider.get(810),blockInput:!0}]):q.addEvents([{dialogueData:q.dataProvider.get(808),blockInput:!0},{dialogueData:q.dataProvider.get(809),blockInput:!0}]),q.start(!0)}talkToHarriet(){const q=new Ni.rD(this._game),K=st.q.instance.prodigy.breadcrumbManager,z=En.B.FEATURE_SPRINGFEST_CUTSCENES,Y=En.B.BREADCRUMB_FIRST_SPRINGFEST_HARRIET_HOOD_CLICK;K.isBreadcrumbComplete(z,Y)?q.addEvents([{dialogueData:q.dataProvider.get(805),blockInput:!0},{dialogueData:q.dataProvider.get(806),blockInput:!0},{dialogueData:q.dataProvider.get(807),blockInput:!0}]):q.addEvents([{dialogueData:q.dataProvider.get(798),blockInput:!0},{dialogueData:q.dataProvider.get(799),blockInput:!0},{dialogueData:q.dataProvider.get(800),blockInput:!0},{dialogueData:q.dataProvider.get(801),blockInput:!0},{dialogueData:q.dataProvider.get(802),blockInput:!0},{dialogueData:q.dataProvider.get(803),blockInput:!0},{dialogueData:q.dataProvider.get(804),blockInput:!0},{callback:()=>{K.completeBreadcrumb(z,Y)}}]);q.start(!0,(()=>{this.openStore(25)}))}talkToDonZorro(){const q=new Ni.rD(this._game),K=st.q.instance.prodigy.breadcrumbManager,z=En.B.FEATURE_SPRINGFEST_CUTSCENES,Y=En.B.BREADCRUMB_FIRST_SPRINGFEST_DON_ZORRO_CLICK;K.isBreadcrumbComplete(z,Y)?q.addEvents([{dialogueData:q.dataProvider.get(792),blockInput:!0},{dialogueData:q.dataProvider.get(793),blockInput:!0},{dialogueData:q.dataProvider.get(794),blockInput:!0}]):q.addEvents([{dialogueData:q.dataProvider.get(785),blockInput:!0},{dialogueData:q.dataProvider.get(786),blockInput:!0},{dialogueData:q.dataProvider.get(787),blockInput:!0},{dialogueData:q.dataProvider.get(788),blockInput:!0},{dialogueData:q.dataProvider.get(789),blockInput:!0},{dialogueData:q.dataProvider.get(790),blockInput:!0},{dialogueData:q.dataProvider.get(791),blockInput:!0},{callback:()=>{K.completeBreadcrumb(z,Y)}}]);q.start(!0,(()=>{this.openStore(24)}))}bunnyEquipmentUpdate(){this.checkEquipmentUpdate(aT.f.BUNNY_HATS,[812,814],aT.f.BARGO_ZONE,300,300)}foxEquipmentUpdate(){this.checkEquipmentUpdate(aT.f.FOX_HATS,[808,809],aT.f.VERNA_ZONE,1050,510)}checkEquipmentUpdate(q,K,z,Y,Q){const X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.equipment.getHat();-1===Z.indexOf(q,X)&&(this._game.broadcaster.removeAppListener(gi.J8.PlayerEditingMenuClosed,this,this._game),this.forceLeaveEvent(K,z,Y,Q))}forceLeaveEvent(q,K,z,Y){const Q=new Ni.rD(this._game);Q.addEvents([{dialogueData:Q.dataProvider.get(q[0]),blockInput:!0},{dialogueData:Q.dataProvider.get(q[1]),blockInput:!0}]),Q.start(!0,(()=>{st.q.instance.prodigy.world.it(K,z,Y)}))}}(0,Q.Cg)([(0,Ge.b)("119-35f9"),(0,Q.Sn)("design:type",ri.n)],rT.prototype,"_weekendEvents",void 0),(0,Q.Cg)([(0,Ge.b)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],rT.prototype,"_prefabLoader",void 0);class oT extends tT{constructor(q){super(q,[Gn.t.Tileset_town_november_png,it._.Event_starlight_festival_json,it._.Npc_sprite_mama_star_json,ot.V.Bgm_starlight_festival],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B0","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName=ri.R.StarlightFestival,this.adID=1,this.defaultNames={"lamplight-A2":"map-lamplight-a2","lamplight-A3":"map-lamplight-a3","lamplight-A4":"map-lamplight-a4","lamplight-B0":"map-lamplight-b0","lamplight-B1":"map-lamplight-b1","lamplight-B2":"map-lamplight-b2","lamplight-B3":"map-lamplight-b3","lamplight-B4":"map-lamplight-b4","lamplight-B5":"map-lamplight-b5","lamplight-C2":"map-lamplight-c2","lamplight-C3-arena":"map-lamplight-c3-arena","lamplight-C4":"map-lamplight-c4"},this._overrideNames={"lamplight-A2":{map:iT.N.Map_lamplight_a2_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-A3":{map:iT.N.Map_lamplight_a3_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-A4":{map:iT.N.Map_lamplight_a4_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-B0":{map:iT.N.Map_lamplight_b0_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-B1":{map:iT.N.Map_lamplight_b1_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-B2":{map:iT.N.Map_lamplight_b2_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-B3":{map:iT.N.Map_lamplight_b3_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-B4":{map:iT.N.Map_lamplight_b4_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-B5":{map:iT.N.Map_lamplight_b5_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-C2":{map:iT.N.Map_lamplight_c2_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-C3":{map:iT.N.Map_lamplight_c3_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight},"lamplight-C4":{map:iT.N.Map_lamplight_c4_starlight_festival_json,battleBg:sT.t.BattleLamplightOutsideStarlight}},this.dailyPlacements=[{location:"lamplight-A2",position:[1080,640],pathOffset:[0,-60],type:Ww.k$.Any},{location:"lamplight-A3",position:[40,440],pathOffset:[70,30],type:Ww.k$.Any},{location:"lamplight-A4",position:[120,600],pathOffset:[40,-40],type:Ww.k$.Any},{location:"lamplight-B2",position:[440,520],pathOffset:[20,-50],type:Ww.k$.Any},{location:"lamplight-B3",position:[80,680],pathOffset:[50,-50],type:Ww.k$.Any},{location:"lamplight-B4",position:[960,600],pathOffset:[0,-20],type:Ww.k$.Any},{location:"lamplight-B5",position:[40,360],pathOffset:[40,-5],type:Ww.k$.Any},{location:"lamplight-C2",position:[40,520],pathOffset:[90,40],type:Ww.k$.Any},{location:"lamplight-C3-arena",position:[280,600],pathOffset:[90,30],type:Ww.k$.Any},{location:"lamplight-C4",position:[360,120],pathOffset:[-90,68],type:Ww.k$.Any}],this.dailyHighlighterOffset.x=-55}getFestivalCurrency(){return 4}getButtons(){return[this.createHudButton(it._.General_icons_hud_json,"starlight-festival")]}init(q){var K,z;super.init(q);const Y=q.saveTag.split("-")[1],Q="B3"!==Y?[1,0]:[2,3],X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Z=(null===(K=this.canDoDaily.get(Ww.je.Normal))||void 0===K||K)&&q.saveTag===(null===(z=X.daily.getDailyBattlePlacement(Ww.je.Normal))||void 0===z?void 0:z.location);return q.zone.getMap(Y).enableLayerID(Q[0],Z),q.zone.getMap(Y).enableLayerID(Q[1],!Z),{bgmID:24}}getOverrideBgm(){return ot.V.Bgm_starlight_festival}applySkin(q){super.applySkin(q),this.setCutsceneSpawn(q),this.placeDaily(q,st.q.instance.prodigy.world.getCurrentMap(),Ww.je.Normal),this.placeDaily(q,st.q.instance.prodigy.world.getCurrentMap(),Ww.je.Boss);const K=st.q.instance.prodigy.gameContainer.get("983-05a7");K.loadWithDependenciesFromGUID(Pi.l.StarfallController,q.uiLayerGameObject).catch(X.RQr.createHandler("Error loading Starfall prefab")),"lamplight-B3"===q.saveTag&&this.setupLamplightB3(q,K)}setupLamplightB3(q,K){const z=it._.Event_starlight_festival_json,Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Z=q.content.addChild(st.q.instance.prodigy.create.sprite(640,250,z,"event-sign-1"));Z.anchor.set(.5,1),Z.inputEnabled=!0,Z.events.onInputDown.add(this.signOnInputDown.bind(this,Y.getText("STARLIGHT_SIGN_MESSAGE"),null,null,Y.getText("STARLIGHT_SIGN_TITLE"),{modifyProperty:[{element:"contentText",property:"horizontalAlignment",value:"center"}]})),Z.animations.add("sway",["event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-2","event-sign-3","event-sign-1","event-sign-4","event-sign-5","event-sign-6"],12,!0,!1),Z.animations.play("sway",void 0,!0),cr.d.loadWithInjectedValuesAndDependenciesFromGUID(K,Pi.l.Npc_imani_star,{},q.contentGameObject).then((K=>(0,Q.sH)(this,void 0,void 0,(function*(){K.transform.setPosition(872,481),q.data.addCollisionZone(q,822,371,90,132)})))).catch(X.RQr.createHandler("Error loading NPC Imani Star")),cr.d.loadWithInjectedValuesAndDependenciesFromGUID(K,Pi.l.Npc_milkyway,{},q.contentGameObject).then((K=>(0,Q.sH)(this,void 0,void 0,(function*(){K.transform.setPosition(1020,581),q.data.addCollisionZone(q,970,461,140,172)})))).catch(X.RQr.createHandler("Error loading NPC Milkyway")),K.loadWithDependenciesFromGUID(Pi.l.TransformRelayObject,q.contentGameObject).then((z=>(0,Q.sH)(this,void 0,void 0,(function*(){(yield K.loadWithDependenciesFromGUID(Pi.l.NPCGnomeStylist,z)).transform.setPosition(270,570),q.data.addCollisionZone(q,240,500,90,90)})))).catch(X.RQr.createHandler("Error loading NPC Gnome Stylist")),this.spawnBossStatue(q,K,Pi.l.NPCBossStatue,new X.I9Y(1100,125))}talkToShopkeeper(){const q=new Ni.rD(this._game),K=st.q.instance.prodigy.breadcrumbManager,z=En.B.FEATURE_STARLIGHT_CUTSCENES,Y=En.B.BREADCRUMB_STARLIGHT_INTRO;K.isBreadcrumbComplete(z,Y)?q.addEvents([{dialogueData:q.dataProvider.get(591),blockInput:!0},{dialogueData:q.dataProvider.get(592),blockInput:!0}]):q.addEvents([{dialogueData:q.dataProvider.get(593),blockInput:!0},{dialogueData:q.dataProvider.get(594),blockInput:!0},{dialogueData:q.dataProvider.get(595),blockInput:!0},{dialogueData:q.dataProvider.get(596),blockInput:!0},{dialogueData:q.dataProvider.get(597),blockInput:!0},{callback:()=>{K.completeBreadcrumb(z,Y)}}]),q.start(!0,(()=>{this.openStore(13)}))}revealDailyMonster(q,K,z){var Y;let Q;const X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.getDailyBattlePlacement(q);X&&(Q=null!==(Y=X.pathOffset)&&void 0!==Y?Y:[0,0],super.revealDailyMonster(q,K,z,Q))}getOverrideName(q){var K,z,Y;const Q=st.q.instance.prodigy.gameContainer.get("f03-2b73"),X=null===(K=Q.getCachedFestivalQuestData())||void 0===K?void 0:K.getStates(),Z=null===(z=Q.getCachedFestivalQuestData())||void 0===z?void 0:z.getTasks().map((q=>q.taskProgress)),J=qw.h.calculateState(Kw.L.MapOverride,null!=X?X:[],null!=Z?Z:[]);return(null===(Y=null==J?void 0:J.active)||void 0===Y?void 0:Y.isActive)?super.getOverrideName(q):this.defaultNames[q]}setCutsceneSpawn(q){const K=this.getStateDataFromKey(Kw.L.InitialCutsceneSpawn);if(this.applyMapCoordinates(K,q))return;const z=this.getStateDataFromKey(Kw.L.FinalCutsceneSpawn);this.applyMapCoordinates(z,q)}applyMapCoordinates(q,K){return!(!(null==q?void 0:q.mapCoordinates)||K.saveTag!==q.mapCoordinates.mapKey)&&(K.user.position.x=q.mapCoordinates.coordinates[0],K.user.position.y=q.mapCoordinates.coordinates[1],K.user.faceToward(q.mapCoordinates.faceTowards),!0)}}var hT=z(75214);class cT extends tT{constructor(q){super(q,[Gn.t.Tileset_town_new_png,it._.Event_starlight_festival_json,it._.Event_summerfest_json,Gn.t.Tileset_town_summerfest_png,ot.V.Bgm_summerfest],["lamplight-A1","lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName="Summerfest",this.adID=3,this._overrideNames={"lamplight-A2":{map:iT.N.Map_lamplight_a2_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-A3":{map:iT.N.Map_lamplight_a3_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-A4":{map:iT.N.Map_lamplight_a4_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-B0":{map:iT.N.Map_lamplight_b0_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-B1":{map:iT.N.Map_lamplight_b1_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-B2":{map:iT.N.Map_lamplight_b2_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-B3":{map:iT.N.Map_lamplight_b3_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-B4":{map:iT.N.Map_lamplight_b4_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-B5":{map:iT.N.Map_lamplight_b5_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-C2":{map:iT.N.Map_lamplight_c2_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-C3":{map:iT.N.Map_lamplight_c3_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest},"lamplight-C4":{map:iT.N.Map_lamplight_c4_summerfest_json,battleBg:sT.t.BattleLamplightOutsideSummerfest}},this.dailyPlacements=[{location:"lamplight-A2",position:[184,350],pathPosition:[180,367],type:Ww.k$.Any},{location:"lamplight-A3",position:[206,614],pathPosition:[275,607],type:Ww.k$.Any},{location:"lamplight-A4",position:[674,352],pathPosition:[747,382],type:Ww.k$.Any},{location:"lamplight-B2",position:[896,264],pathPosition:[822,286],flip:!0,type:Ww.k$.Any},{location:"lamplight-B4",position:[317,378],pathPosition:[296,411],type:Ww.k$.Any},{location:"lamplight-B5",position:[962,265],pathPosition:[911,285],type:Ww.k$.Any},{location:"lamplight-C2",position:[804,450],pathPosition:[730,472],flip:!0,type:Ww.k$.Any},{location:"lamplight-C3-arena",position:[1130,430],pathPosition:[1051,465],flip:!0,type:Ww.k$.Any},{location:"lamplight-C4",position:[1036,475],pathPosition:[958,497],flip:!0,type:Ww.k$.Any}];for(const K of[50,51])for(const q of Ee.t.getItem("itemTable",K).data.items)Ee.t.getItem(q.type,q.ID).data.member=0}init(q){return super.init(q),{bgmID:25}}getOverrideBgm(){return ot.V.Bgm_summerfest}getFestivalCurrency(){return 20}getButtons(){const q=[];return q.push(this.createHudButton(it._.General_icons_hud_json,"summerfest")),q}applySkin(q,K){super.applySkin(q,K);const z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);if(this.placeDaily(q),"lamplight-B3"===q.saveTag){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_SUMMERFEST_CUTSCENES,En.B.BREADCRUMB_SUMMERFEST_INTRO)){if(di.U.progressData.step===hi.B.NotStarted&&Y.hasFoundAllKeystones())return void Xn.E.runAllKeystonesSequenceOnMapSetup((()=>(0,Q.sH)(this,void 0,void 0,(function*(){return K.playScene("summerfestIntro")}))));if(lf.J.meetsNarrativeIntroRequirements)return;return void K.playScene("summerfestIntro")}this.addSign(q,z);const X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily,Z=new hT.p(this._game,"NPC_NAME_ATHENA",166,sa.ac.Merchant,q.content,1096,300,"idle",void 0,void 0,void 0,{instance_id:X.getFestivalInstanceName(),instance_type:37});Z.flip(),Z.onClick.add(this.openShop,this);new hT.p(this._game,"NPC_NAME_KOI",167,sa.ac.WheelGiver,q.content,310,300,"idle",void 0,void 0,void 0,{instance_id:X.getFestivalInstanceName(),instance_type:this.currentWheelName}).onClick.add((()=>{this.openSunWheel()}));new hT.p(this._game,"NPC_NAME_MIST",168,sa.ac.Merchant,q.content,594,550,"idle",void 0,void 0,void 0,{instance_id:X.getFestivalInstanceName(),instance_type:38}).onClick.add(this.openStylist,this);const J=new hT.p(this._game,"NPC_NAME_MIZU",169,sa.ac.WheelGiver,q.content,686,550,"idle",void 0,void 0,void 0,{instance_id:X.getFestivalInstanceName(),instance_type:38});J.flip(),J.onClick.add(this.openNicknamer,this)}}addSign(q,K){st.q.instance.prodigy.create.spineNPC(q.content,165,"animation",639,258,void 0,void 0,(()=>{this.signOnInputDown(K.getText("SUMMERFEST_SIGN_MESSAGE"),null,null,K.getText("SUMMERFEST_SIGN_TITLE"),{modifyProperty:[{element:"contentText",property:"horizontalAlignment",value:"center"}]})}),!1)}openShop(){const q=new Ni.rD(this._game);q.addEvents([{dialogueData:q.dataProvider.get(902),blockInput:!0}]),q.start(!0,(()=>{this.openStore(37)}))}openSunWheel(){var q,K;const z=En.B.FEATURE_SUMMERFEST_CUTSCENES,Y=En.B.BREADCRUMB_FIRST_SUMMERFEST_WHEEL_CLICK;if(st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(z,Y))null===(K=this.festivalPrizeWheelComponent)||void 0===K||K.openWheel();else{const K=new Ni.rD(this._game);K.addEvents([{dialogueData:K.dataProvider.get(867),blockInput:!0},{dialogueData:K.dataProvider.get(868),blockInput:!0},{dialogueData:K.dataProvider.get(869),blockInput:!0}]),K.start(!0,null===(q=this.festivalPrizeWheelComponent)||void 0===q?void 0:q.openWheel.bind(this.festivalPrizeWheelComponent))}}openStylist(){const q=new Ni.rD(this._game),K=En.B.FEATURE_SUMMERFEST_CUTSCENES,z=En.B.BREADCRUMB_FIRST_SUMMERFEST_STYLIST_CLICK;st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(K,z)?q.addEvents([{dialogueData:q.dataProvider.get(882),blockInput:!0}]):q.addEvents([{dialogueData:q.dataProvider.get(878),blockInput:!0},{dialogueData:q.dataProvider.get(879),blockInput:!0},{dialogueData:q.dataProvider.get(880),blockInput:!0},{dialogueData:q.dataProvider.get(881),blockInput:!0},{callback:()=>{st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K,z)}}]),q.start(!0,(()=>{st.q.instance.prodigy.open.legacyStore(38)}))}openNicknamer(){const q=new Ni.rD(this._game),K=En.B.FEATURE_SUMMERFEST_CUTSCENES,z=En.B.BREADCRUMB_FIRST_SUMMERFEST_NICKNAMER_CLICK;st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(K,z)?q.addEvents([{dialogueData:q.dataProvider.get(886),blockInput:!0}]):q.addEvents([{dialogueData:q.dataProvider.get(883),blockInput:!0},{dialogueData:q.dataProvider.get(884),blockInput:!0},{dialogueData:q.dataProvider.get(885),blockInput:!0},{dialogueData:q.dataProvider.get(886),blockInput:!0},{callback:()=>{st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K,z)}}]),q.start(!0,(()=>{const q="summerfest",K=st.q.instance.prodigy.gameContainer.get("3b0-2652"),z=K.isAvailable(q)?K.getNicknameData(q):[],Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer;st.q.instance.prodigy.open.nicknamer(z,Y,q)}))}placeDaily(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.getDailyBattlePlacement(Ww.je.Normal);if(K&&K.location===q.saveTag&&this.canDoDaily.get(Ww.je.Normal)){const z=K.position;this.addApplepot(z[0],z[1],q,K.flip)}}addApplepot(q,K,z,Y=!1){let Q;const Z=st.q.instance.prodigy.create.spineNPC(z.content,156,"idle",q,K,void 0,void 0,(()=>{this.moveToApplepot(z,Z,Q)}));Z.name="Applepot",Z.legacyTransform.group.scale.x=Y?-1:1;const J=Z.findComponentInChildren(ea.v),tt=()=>{Q=Z.legacyTransform.group.addChild(st.q.instance.prodigy.create.sprite(0,-Z.legacyTransform.group.height,it._.General_icons_json,"exclamation")),Q.anchor.set(.5,1),this._game.add.tween(Q,this).to({y:Q.y+10},400,X.GS3.Quadratic.InOut,!0,0,-1,!0)};J.isLoaded?tt():J.OnLoaded.addOnce(tt)}moveToApplepot(q,K,z){var Y;const Q=this.dailyPlacements.find((K=>K.location===q.saveTag));if(!Q)return void X.VyI.log("No daily placement found for this screen",X.$bb.Error);const Z=Q.position,J=null!==(Y=Q.pathPosition)&&void 0!==Y?Y:[0,0];this.afterBattleSpawn=J;const tt=st.q.instance.prodigy.event.create();tt.validPath(q.user,q.path,J[0],J[1]),tt.function(q.user.faceToward.bind(q.user,Z[0])),tt.function((()=>{this.startApplepotBattle(q,K,z)})),tt.start()}startApplepotBattle(q,K,z){st.q.instance.prodigy.audio.pauseBGM(),st.q.instance.prodigy.audio.playSFX(19,"monster"),st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer.evtProc=!0,this._game.input.enabled=!1,z.destroy(),st.q.instance.prodigy.effects.chatBubble(K.legacyTransform.group),this._game.add.tween(K.legacyTransform,this).to({y:K.legacyTransform.group.y-20},300,X.GS3.Quadratic.Out).to({y:K.legacyTransform.group.y},300,X.GS3.Quadratic.In).to({},100,X.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.startDailyBattle(q.saveTag,Ww.je.Normal)}))}}class dT extends tT{constructor(q){super(q,[Gn.t.Tileset_town_december_png,it._.Event_winterfest_json,it._.Npc_sprite_howard_cornelius_json,ot.V.Bgm_winterfest],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3-arena","lamplight-C3","lamplight-C4"]),this.festivalName="Winterfest",this.adID=6,this._overrideNames={"lamplight-A2":{map:iT.N.Map_lamplight_a2_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-A3":{map:iT.N.Map_lamplight_a3_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-A4":{map:iT.N.Map_lamplight_a4_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-B1":{map:iT.N.Map_lamplight_b1_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-B2":{map:iT.N.Map_lamplight_b2_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-B3":{map:iT.N.Map_lamplight_b3_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-B4":{map:iT.N.Map_lamplight_b4_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-B5":{map:iT.N.Map_lamplight_b5_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-C2":{map:iT.N.Map_lamplight_c2_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-C3":{map:iT.N.Map_lamplight_c3_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest},"lamplight-C4":{map:iT.N.Map_lamplight_c4_winterfest_json,battleBg:sT.t.BattleLamplightOutsideWinterfest}},this.dailyPlacements=[{location:"lamplight-A2",position:[920,160],pathOffset:[120,180],type:Ww.k$.Any},{location:"lamplight-A3",position:[200,520],pathOffset:[155,100],type:Ww.k$.Any},{location:"lamplight-A4",position:[880,80],pathOffset:[130,170],type:Ww.k$.Any},{location:"lamplight-B2",position:[160,120],pathOffset:[130,170],type:Ww.k$.Any},{location:"lamplight-B3",position:[480,120],pathOffset:[-10,170],type:Ww.k$.Any},{location:"lamplight-B4",position:[120,200],pathOffset:[-20,180],type:Ww.k$.Any},{location:"lamplight-B5",position:[1120,240],pathOffset:[-50,140],type:Ww.k$.Any},{location:"lamplight-C2",position:[1040,320],pathOffset:[-30,160],type:Ww.k$.Any},{location:"lamplight-C3-arena",position:[560,520],pathOffset:[-30,80],type:Ww.k$.Any},{location:"lamplight-C4",position:[1040,320],pathOffset:[-10,170],type:Ww.k$.Any}],this.dailyEventSize.x=120,this.dailyEventSize.y=160,this.dailyHighlighterOffset.x=-10}getFestivalCurrency(){return 5}getButtons(){return[this.createHudButton(it._.General_icons_hud_json,"winterfest")]}getOverrideBgm(){return ot.V.Bgm_winterfest}init(q){var K,z;super.init(q);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=q.saveTag.split("-")[1],X=(null===(K=this.canDoDaily.get(Ww.je.Normal))||void 0===K||K)&&q.saveTag===(null===(z=Y.daily.getDailyBattlePlacement(Ww.je.Normal))||void 0===z?void 0:z.location);return"B3"!==Q?q.zone.getMap(Q).enableLayerID(1,X):q.zone.getMap(Q).enableLayerID(2,X),{bgmID:13}}applySkin(q){super.applySkin(q),st.q.instance.prodigy.create.snow(q.foregroundGameObject);const K=it._.Event_winterfest_json,z=q.saveTag,Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Z=st.q.instance.prodigy.gameContainer.get("983-05a7");if("lamplight-B3"===z){const z=q.content.addChild(st.q.instance.prodigy.create.sprite(640,250,K,"event-sign-1"));z.anchor.set(.5,1),z.inputEnabled=!0,z.events.onInputDown.add(this.signOnInputDown.bind(this,Y.getText("WINTERFEST_SIGN_MESSAGE"),null,null,Y.getText("WINTERFEST_SIGN_TITLE"))),z.animations.add("sway",["event-sign-1","event-sign-2","event-sign-3","event-sign-4","event-sign-5","event-sign-6","event-sign-7","event-sign-8","event-sign-9","event-sign-10","event-sign-11","event-sign-12","event-sign-13","event-sign-14","event-sign-15","event-sign-16"],10,!0,!1),z.animations.play("sway",void 0,!0),Z.loadWithDependenciesFromGUID(Pi.l.TransformRelayObject,q.foregroundGameObject).then((K=>(0,Q.sH)(this,void 0,void 0,(function*(){(yield cr.d.loadWithInjectedValuesAndDependenciesFromGUID(Z,Pi.l.HowardCorneliusNPC,{})).transform.setPosition(1024,540),q.data.addCollisionZone(q,840,420,120,120)})))).catch(X.RQr.createHandler("Error loading Howard Cornelius NPC")),this.spawnBossStatue(q,Z,Pi.l.WinterfestBossStatue,new X.I9Y(1105,125))}const J=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.get("zone-lamplight");X.Aq$.isDefined(J)&&X.Aq$.isDefined(J.quest)&&J.quest.ID>1&&(this.placeDaily(q,st.q.instance.prodigy.world.getCurrentMap(),Ww.je.Normal),this.placeDaily(q,st.q.instance.prodigy.world.getCurrentMap(),Ww.je.Boss))}revealDailyMonster(q,K,z){var Y;let Q;const X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.getDailyBattlePlacement(q);X&&(Q=null!==(Y=X.pathOffset)&&void 0!==Y?Y:[0,0],super.revealDailyMonster(q,K,z,Q))}}class lT extends tT{getFestivalCurrency(){return 31}constructor(q){super(q,[Gn.t.Tileset_town_moonfest_night_png,Gn.t.Tileset_generic_moonfest_night_png,Gn.t.Tileset_moonlight_extras_night_png,Gn.t.Tileset_firefly_new_png,Gn.t.Tileset_forest_new_night_png,Gn.t.Tileset_collisions_png,it._.Npc_sprite_gnome_json,it._.Event_moonlightfest_json,it._.Zone_lamplight_json,ot.V.Bgm_moonlight_fest,ht.c.Sfx_lamplight],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B0","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName=ri.R.MoonlightFestival,this._overrideNames={"lamplight-A2":{map:iT.N.Map_moonlight_a2_json,battleBg:sT.t.BattleMoonlight},"lamplight-A3":{map:iT.N.Map_moonlight_a3_json,battleBg:sT.t.BattleMoonlight},"lamplight-A4":{map:iT.N.Map_moonlight_a4_json,battleBg:sT.t.BattleMoonlight},"lamplight-B0":{map:iT.N.Map_moonlight_b0_json,battleBg:sT.t.BattleMoonlight},"lamplight-B1":{map:iT.N.Map_moonlight_b1_json,battleBg:sT.t.BattleMoonlight},"lamplight-B2":{map:iT.N.Map_moonlight_b2_json,battleBg:sT.t.BattleMoonlight},"lamplight-B3":{map:iT.N.Map_moonlight_b3_json,battleBg:sT.t.BattleMoonlight},"lamplight-B4":{map:iT.N.Map_moonlight_b4_json,battleBg:sT.t.BattleMoonlight},"lamplight-B5":{map:iT.N.Map_moonlight_b5_json,battleBg:sT.t.BattleMoonlight},"lamplight-C2":{map:iT.N.Map_moonlight_c2_json,battleBg:sT.t.BattleMoonlight},"lamplight-C3":{map:iT.N.Map_moonlight_c3_json,battleBg:sT.t.BattleMoonlight},"lamplight-C4":{map:iT.N.Map_moonlight_c4_json,battleBg:sT.t.BattleMoonlight}},this.dailyPlacements=[]}init(q){return super.init(q),{bgmID:ot.V.Bgm_moonlight_fest}}getOverrideBgm(){return ot.V.Bgm_moonlight_fest}applySkin(q){super.applySkin(q);const K=q.saveTag;if(this.placeDaily(q,st.q.instance.prodigy.world.getCurrentMap(),Ww.je.Normal),this.placeDaily(q,st.q.instance.prodigy.world.getCurrentMap(),Ww.je.Boss),"lamplight-B3"!==K)return;const z=this._weekendEvents.getActiveFestival(),Y=Ce.A.isDefined(z)?new Date(z.endDate).getTime()-Date.now():0;cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Pi.l.MoonPortal,{TIME_REMAINING:Y},q.contentGameObject).then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){q.transform.setPosition(640,130)})))).catch(X.RQr.createHandler("Error loading Moon Portal")),this._prefabLoader.loadWithDependenciesFromGUID(Pi.l.TransformRelayObject,q.contentGameObject).then((K=>(0,Q.sH)(this,void 0,void 0,(function*(){(yield this._prefabLoader.loadWithDependenciesFromGUID(Pi.l.NPCGnomeStylist,K)).transform.setPosition(230,570),q.data.addCollisionZone(q,200,500,90,90)})))).catch(X.RQr.createHandler("Error loading NPC Gnome Stylist")),st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.SelenaNPC,970,560).then((K=>{q.data.addCollisionZone(q,920,420,100,160)})).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.SelenaNPC}`)),this.spawnBossStatue(q,this._prefabLoader,Pi.l.MoonlightBossStatue,new X.I9Y(1105,125))}}(0,Q.Cg)([(0,Ge.b)("119-35f9"),(0,Q.Sn)("design:type",ri.n)],lT.prototype,"_weekendEvents",void 0),(0,Q.Cg)([(0,Ge.b)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],lT.prototype,"_prefabLoader",void 0);class uT extends Yw{constructor(q){super(q,[],["shipwreck_shore-A2","shipwreck_shore-A3","shipwreck_shore-A5","shipwreck_shore-A7","shipwreck_shore-B5","shipwreck_shore-B6","shipwreck_shore-B7","shipwreck_shore-B8","shipwreck_shore-B10","shipwreck_shore-B13","shipwreck_shore-C6","shipwreck_shore-C7","shipwreck_shore-C8","shipwreck_shore-C9"])}init(q){if(!Nn.J.isAvgFrameRateAboveThreshold(te.s.get("GameConstants.Build.SKIN_FOREGROUND_FPS_THRESHOLD_LIMIT")))return{};this.bubbles=[];const K=this._game.width,z=this._game.height;for(let Y=0;Y<5;Y++){const Y=q.foreground.addChild(st.q.instance.prodigy.create.sprite(Mn.o.integerInRange(0,K),Mn.o.integerInRange(0,z),it._.Skin_underwater_json,"tiny-bubble"));this.initBubble(Y,!0,K),this.bubbles.push(Y)}return{}}initBubble(q,K,z){if(!X.Aq$.isDefined(this._game))return;let Y=Mn.o.integerInRange(0,2e3)+5e3;q.x=Mn.o.integerInRange(0,z),K?(q.y=Mn.o.integerInRange(70,770),Y-=Math.floor(Y/770*q.y)):q.y=770,this._game.add.tween(q,this).to({x:"-=10"},1e3,X.GS3.Sinusoidal.InOut).to({x:"+=10"},1e3,X.GS3.Sinusoidal.InOut).loop(!0).start();const Q=this._game.add.tween(q,this).to({y:-50},Y,X.GS3.Linear.None);Q.onTweenComplete.addOnce(this.initBubble.bind(this,q,!1,z)),Q.start()}cleanup(){if(this.bubbles){for(let q=0;q180&&(this.randomizePosition(),this.count=0)}cleanup(){for(let q=0;qst.q.instance.game.broadcaster.broadcast(gi.bv.FestivalInitialized))).catch(X.RQr.createHandler("Error applying festival"))}))}createFestival(q){return new[rT,cT,nT,dT,oT,lT][q](this.game)}getButtons(){let q=[];for(let K=0;K{super.handleLeaving(q,K)}))}else super.handleLeaving(q,K)}teleport(q,K,z,Y,Q){X.Aq$.isDefined(this.mapConfig)?(this.map=new OT.M(this,this.assets,this.mapConfig),this.maps={[q]:this.map},super.teleport(q,K,z,Y,Q),this.loadingData.fadeIn=!0,this.loadingData.fadeOut=!0,this.loadingData.time=200):this.enterDungeon()}enterDungeon(q){this.generatorConfig=st.q.instance.prodigy.gameContainer.get("094-f32c").getDungeon(2),X.Aq$.isDefined(Sn.B.getLastDungeonRun(this.game,this.ID))||(this.generatorConfig=st.q.instance.prodigy.gameContainer.get("094-f32c").getDungeon(3)),this.sendArchivesRunSegmentEvents("Archives Run Started"),super.enterDungeon(q)}exitDungeon(q=null){this.consumeTargetCollectible(q),st.q.instance.prodigy.world.it("academy-GH3",815,480)}consumeTargetCollectible(q=null){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=K.backpack.hasItem("currency",18);K.backpack.consume("currency",18,z),X.Aq$.isDefined(this.generatorConfig)&&this.sendArchivesRunSegmentEvents("Achievement Completed",z)}get goalCollected(){return st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("currency",18)}sendArchivesRunSegmentEvents(q,K=0){const z=st.q.instance.prodigy.gameContainer.get("20f-5f67");switch(q){case"Archives Run Started":z.playerMovementAndDiscovery.sendArchivesRunStartedEvent();break;case"Achievement Completed":z.playerMovementAndDiscovery.sendArchivesRunCompletedEvent(K)}}}IT.RUN_COOLDOWN=36e5;var DT=z(28085);class RT extends Zn.Z{constructor(q,K){super(q,"titan",K.concat([it._.Npc_sprite_noot_json,ht.c.Sfx_titan,it._.Boss_titan_json])),this.titanMap="",this._spineContainer=null,this._noot=null,this._titanSpine=null,this._isStarted=!1,this.loadingData.time=1,this.loadingData.fadeIn=!1,this.loadingData.fadeOut=!1}setup(q,K,z){super.setup(q,K,z),K.user.x=250,K.user.y=400,K.user.hideName(),di.U.isStepComplete(hi.B.PuppetMasterDefeated)||(this._puppetMaster=new hT.p(q,"NPC_NAME_PUPPETMASTER",ct.Q.Spine_npc_puppetmaster_json,sa.ac.Boss,K.content,800,350,"idle",null,!0)),this._spineContainer=st.q.instance.prodigy.create.element(K.content,1100,400),this._spineContainer.scale.x*=-1,this._noot=K.addNPC(180,320,it._.Npc_sprite_noot_json),this._noot.float(!0),this._noot.walkSpeed=2,this._noot.visible=!0,An.K.cacheAsset(this.game,it._.Npc_sprite_noot_json,An.K.zoneAssetsCached),this.game.broadcaster.addAppListener(gi.RZ.GotTitans,this.gotTitanCallback.bind(this),this,"Titan"),X.Aq$.isDefined(st.q.instance.prodigy.titansNetworkHandler.titan)?this.gotTitanCallback(st.q.instance.prodigy.titansNetworkHandler.titan):st.q.instance.prodigy.titansNetworkHandler.getTitans().catch(X.RQr.createHandler("Error fetching data for titans"))}start(q,K){if(this._isStarted)return;this._isStarted=!0,super.start(q,K);const z=st.q.instance.prodigy.event.create(),Y=!di.U.isStepComplete(hi.B.PuppetMasterDefeated);if(z.enableInput(!1),z.function(this.enterScene.bind(this,q,K)),z.delay(2e3),st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.BREADCRUMB_TITAN_INTRO,En.B.BREADCRUMB_TITAN_WATCHED_INTRO)){z.enableInput(!0),Y?z.text(13,"puppetmaster"):z.text(290,"noot"),z.enableInput(!1),z.sound(21,"cloud");const Q=500,X=12;for(let Y=0;Y{this.enterTitan(q)})),z.delay(100),z.enableInput(!0),Y?z.text(14,"puppetmaster"):z.text(291,"noot"),z.enableInput(!1),Y&&z.functionCallback(this.exitMaster.bind(this,q,K,1480,-200)),z.enableInput(!0)}else{Y&&(z.enableInput(!0),z.text(10,"puppetmaster"),z.enableInput(!1),z.validPath(this._noot,K.path,530,370),z.hop(this._noot,200,0,100),z.hop(this._noot,200,0,100),z.enableInput(!0),z.text(178,"noot"),z.enableInput(!1),z.enableInput(!0),z.text(11,"puppetmaster"),z.enableInput(!1)),z.sound(21,"cloud");const Q=500,X=12;for(let Y=0;Y{this.enterTitan(q)})),z.delay(100),z.enableInput(!0),Y?z.text(12,"puppetmaster"):z.text(291,"noot"),z.enableInput(!1),Y&&z.functionCallback(this.exitMaster.bind(this,q,K,1480,-200)),z.validPath(this._noot,K.path,380,320),z.enableInput(!0),z.text(179,"noot"),z.text(180,"noot"),z.text(181,"noot"),z.text(182,"noot"),z.text(183,"noot")}z.function(this.end.bind(this,q)),z.start()}end(q){st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.BREADCRUMB_TITAN_INTRO,En.B.BREADCRUMB_TITAN_WATCHED_INTRO),st.q.instance.prodigy.world.it(this.titanMap)}enterTitan(q){q.add.tween(this._spineContainer,this).to({alpha:1},200,X.GS3.Linear.None,!0,0,0,!1)}exitMaster(q,K,z,Y,Q){this._puppetMaster.flip();q.add.tween(this._puppetMaster,this).to({x:z,y:Y},1e3,X.GS3.Linear.None).start().onTweenComplete.add(Q)}gotTitanCallback(q){const K=Ee.t.getItem("titan",q.assetID).data;this.titanMap=`${K.zone}-Titan`,this.game.broadcaster.removeAppListener(gi.RZ.GotTitans,this,"Titan"),this._titanSpine=this.game.add.spine(0,0,zt.E.getTitanSpine(q.assetID)),this._titanSpine.setAnimationByName(0,"idle",!0),this._spineContainer.add(this._titanSpine),this._spineContainer.alpha=0}cleanup(){(0,Sc.QQ)(st.q.instance.game,!0),this._noot&&(this._noot.destroy(),this._noot=null),this._puppetMaster&&(this._puppetMaster.destroy(),this._puppetMaster=null),this._spineContainer&&(this._spineContainer.destroy(),this._spineContainer=null),this._titanSpine&&(this._titanSpine.destroy(),this._titanSpine=null),super.cleanup()}}var PT,MT=z(34574);class NT extends Lr.H{constructor(q,K,z,Y,Q,Z,J=!1){super(q,K,z,Y),this._nameText=null;const tt=st.q.instance.prodigy.gameContainer,et=tt.get(X.$Bt.LocalizationService);this.segment=tt.get("20f-5f67"),this.clickCallback=Z,this.npcSprite=st.q.instance.prodigy.create.sprite(0,0,Q.atlasGuid,0,void 0,this.onTextureLoaded.bind(this)),this.npcSprite.inputEnabled=!0,this.npcSprite.anchor.set(.5,1),this.npcSprite.events.onInputDown.add(this.onNPCClick.bind(this,et.getText(Q.name)),this),J&&(this.npcSprite.scale.x=-1),this.add(this.npcSprite),this.showIndicator(Q),this.showName(Q.name),this.segment.gameWorld.sendNpcDiscoveredEvent({npc_name:et.getText(null==Q?void 0:Q.name),npc_type:this instanceof xT?sa.ac.Merchant:sa.ac.QuestGiver,x_coord:z,y_coord:Y,npc_animation_id:"idle"})}onNPCClick(q){X.Aq$.isDefined(this.clickCallback)&&(this.segment.gameWorld.sendNpcClickedEvent({npc_name:q,npc_type:this instanceof xT?sa.ac.Merchant:sa.ac.QuestGiver}),this.clickCallback())}onTextureLoaded(q){q&&(q.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),q.animations.play("stand",void 0,!0))}showName(q){this._nameText?this._nameText.setText(q):this._nameText=st.q.instance.prodigy.create.nameFont(this,0,0-this.npcSprite.height-20,q)}showIndicator(q){this.indicator=NT.createIndicator(q),this.indicator&&(this.indicator.y=-(this.npcSprite.height+20),this.add(this.indicator),this.game.add.tween(this.indicator,this).to({y:this.indicator.y-20},1e3,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0))}static createIndicator(q){if(!q)return null;const K=X.Aq$.isDefined(q.indicator);if(!K&&!q.indicatorBacking)return null;let z=null;if(q.indicatorBacking)for(let Y=NT.INDICATOR_BACKING_LAYERS.length;--Y>=0;){const K=st.q.instance.prodigy.create.sprite(0,0,it._.General_icons_json,NT.INDICATOR_BACKING_LAYERS[Y]);K.anchor.set(.5,1),Y===NT.INDICATOR_BACKING_COLORABLE_LAYER&&X.Aq$.isDefined(q.indicatorBackingColor)&&(K.tint=q.indicatorBackingColor),z&&K.addChild(z),z=K}if(K){const K=st.q.instance.prodigy.create.sprite(0,0,it._.General_icons_json,q.indicator);K.anchor.set(.5,1),q.indicatorOffsetY&&(K.y+=q.indicatorOffsetY),z?z.addChild(K):z=K}return z}}NT.INDICATOR_BACKING_LAYERS=["npc-icon-base","npc-icon-square","npc-icon-square-tint"],NT.INDICATOR_BACKING_COLORABLE_LAYER=2;class xT extends NT{constructor(q,K,z,Y,Q,X,Z,J,tt=!1){const et=Object.assign({atlasGuid:it._.Npc_sprite_merchant_json,name:"NPC_NAME_MERCHANT"},xT.DEFAULT_INDICATOR_CONFIG);super(q,K,z,Y,et,null,tt),this.requirementsID=J,this.storeID=Q,this.storeName=X,this.currencyID=Z,this.clickCallback=()=>{this.showDialogue()},this.showName(this.localization.getText("NPC_NAME_MERCHANT")),this.showIndicator(et)}showDialogue(){const q=Ee.t.getItem("currency",this.currencyID);if(this.featureRequirements.meetsRequirementsDeprecated(this.requirementsID))this.showPrompt();else{const K=st.q.instance.prodigy.dialogue.create();K.setText({text:this.localization.getText("STORE_CURRENCY_LOCKED",q.data.name),face:0}),K.startDeprecated("merchant")}}showPrompt(){const q=st.q.instance.prodigy.dialogue.create(),K=`${this.storeName}_${Ah.B.Dialogue}`;this.segment.featureCommon.sendInterfaceEvent({interfaceName:K,interfaceType:Si.Wm.DialogBox,instanceType:Li.N.Interface,originType:Si.$N.NpcClick}),q.setText({text:this.localization.getText("STORE_PROMPT_WELCOME",this.localization.getText(this.storeName)),face:0,yes:()=>{this.sendDialogueSegmentEvents(Xh.k.Shop,K),q.close(),st.q.instance.prodigy.open.store(this.storeID)},no:()=>{this.sendDialogueSegmentEvents(Xh.k.NotNow,K),q.close()},type:Ni.fA.STORE}),q.startDeprecated("merchant")}sendDialogueSegmentEvents(q,K){this.segment.featureCommon.sendButtonEvent({buttonName:q,interfaceName:K,interfaceType:Si.Wm.DialogBox,saveClickInfo:q}),this.segment.featureCommon.sendInterfaceEvent({interfaceName:K,interfaceType:Si.Wm.DialogBox,instanceType:Li.N.Interface,closeMethod:Si.Lv.ButtonClick})}showIndicator(q){this.requirementsID>=0&&this.featureRequirements.meetsRequirementsDeprecated(this.requirementsID)&&super.showIndicator(q)}}xT.DEFAULT_INDICATOR_CONFIG={indicatorBacking:!0,indicatorBackingColor:16764305,indicator:"merchant-icon",indicatorOffsetY:-25},(0,Q.Cg)([(0,X.fFd)("11f-118a"),(0,Q.Sn)("design:type",Object)],xT.prototype,"featureRequirements",void 0),(0,Q.Cg)([(0,X.fFd)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],xT.prototype,"localization",void 0),function(q){q.TitanMapEntered="Titan-Map-Entered",q.TitanCatapultClicked="Titan-Catapult-Clicked",q.TitanClicked="Titan-Clicked",q.TitanSeen="titan_seen",q.CrystalClicked="crystal_clicked",q.TeamInitiated="team_initiated",q.TeamFormed="team_formed",q.TeamJoined="team_joined",q.CoOpBattleStarted="coop_battle_started",q.CoOpBattleHostLeft="coop_battle_host_left"}(PT||(PT={}));var LT=z(65443),kT=z(12676),BT=z(14088);class UT extends BT.h{constructor(q,K,z,Y){super(q,54,K),this.onCloseClick=new X.HN0,this.currentTeamHandler=null,this.currentTeamHandler=Y,this.hostInfo=z,this.onLoadComplete.add(this.setupButtons,this),this.onLoadComplete.add(this.renderHost,this),this.currentTeamHandler.OnTeamLeft.add(this.destroy,this),this.currentTeamHandler.OnHostDisbanded.add(this.destroy,this)}createUIElements(){super.createUIElements(),this.closeButton=this.getUiElement("closeButton"),this.friendCircle=this.getUiElement("friendCircle"),this.bodyText=this.getUiElement("bodyText")}setupButtons(){this.closeButton.onUpCallback=()=>{this.onCloseClick.dispatch()},this.closeButton.setInputBlockPriority(Ua.z.LOBBY)}renderHost(){const q=this.game.add.graphics(0,0);q.beginFill(0),q.drawCircle(75,75,75),q.endFill(),this.friendCircle.add(q),this.friendCircle.mask=q;const K=new Be.a(this.game);K.init(this.hostInfo);const z=st.q.instance.prodigy.create.player(this.friendCircle,K,1,80,130,!1,{isPreview:!0,hideMount:!0});z.forceWeaponVisual=!0,z.reload();const Y=st.q.instance.prodigy.gameContainer.resolve(Wa.C);Y.init(K.appearance.getName()),this.bodyText.setText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COOP_GUEST_BANNER_BODY",Y.getName()))}destroy(){this.onCloseClick.dispose(),this.currentTeamHandler.OnTeamLeft.remove(this.destroy,this),this.currentTeamHandler.OnHostDisbanded.remove(this.destroy,this),super.destroy()}}class FT extends BT.h{constructor(q,K,z,Y){super(q,58,K),this.guestID=null,this.currentTeamHandler=null,this.guestID=z,this.currentTeamHandler=Y,this.currentTeamHandler.OnTeamLeft.add(this.destroy,this),this.currentTeamHandler.CurrentTeam.OnTeamMemberLeft.add(this.onPlayerLeave,this)}onPlayerLeave(q){q===this.guestID&&this.destroy()}destroy(){this.currentTeamHandler.OnTeamLeft.remove(this.destroy,this),this.currentTeamHandler.IsOnTeam&&this.currentTeamHandler.CurrentTeam.OnTeamMemberLeft.remove(this.onPlayerLeave,this),super.destroy()}}class GT extends BT.h{get OnClose(){return this.onClose}constructor(q,K,z){super(q,53,K),this.onStartClick=new X.HN0,this.onCloseClick=new X.HN0,this.teammateIcons=[],this.onClose=new X.HN0,this.currentTeamHandler=null,this.currentTeam=null,this.currentTeamHandler=z,this.currentTeam=z.CurrentTeam,this.onLoadComplete.add(this.setupButtons,this),this.currentTeamHandler.OnTeamLeft.add(this.teamWasDisbanded,this),this.currentTeam.OnTeamMemberJoined.add(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberLeft.add(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberReady.add(this.updateReadyIcons,this)}createUIElements(){super.createUIElements(),this.startButton=this.getUiElement("startButton"),this.closeButton=this.getUiElement("closeButton"),this.teammateIcons=[this.getUiElement("teammate1"),this.getUiElement("teammate2"),this.getUiElement("teammate3")],this.updateReadyIcons()}setupButtons(){this.startButton.onUpCallback=()=>{this.onStartClick.dispatch()},st.q.instance.prodigy.gameContainer.get("2f9-57ba").setBlockType(this.startButton.button.image.input,Ua.z.LOBBY),this.closeButton.onUpCallback=()=>{this.onCloseClick.dispatch()},this.closeButton.setInputBlockPriority(Ua.z.LOBBY)}destroy(){this.onStartClick.dispose(),this.onCloseClick.dispose(),this.onClose.dispose(),this.currentTeamHandler.OnTeamLeft.remove(this.teamWasDisbanded,this),this.currentTeam.OnTeamMemberJoined.remove(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberLeft.remove(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberReady.remove(this.updateReadyIcons,this),super.destroy()}teamWasDisbanded(){this.onClose.dispatch(),this.destroy()}updateReadyIcons(){for(let q=0;q=this.currentTeam.ReadyMembers.length?this.teammateIcons[q].setImageFrameName("Images/icon-teammate-off"):this.teammateIcons[q].setImageFrameName("Images/icon-teammate-on");this.startButton.setVisible(this.currentTeam.ReadyMembers.length>1)}}var jT=z(51931);class $T{get OnTeamHosted(){return this.onTeamHosted}get OnTeamJoined(){return this.onTeamJoined}get OnHostDisbanded(){return this.onHostDisbanded}get OnTeamLeft(){return this.onTeamLeft}get OnTeamJoinFailed(){return this.onTeamJoinFailed}get CurrentTeam(){return this.currentTeam}get IsHosting(){return this.isHosting}get IsOnTeam(){return null!==this.currentTeam}get IsJoining(){return this.isJoining}constructor(q,K,z,Y){this.ct=null,this.remoteLogger=null,this.onTeamHosted=new X.HN0,this.onTeamJoined=new X.HN0,this.onHostDisbanded=new X.HN0,this.onTeamLeft=new X.HN0,this.onTeamJoinFailed=new X.HN0,this.currentTeam=null,this.player=null,this.isHosting=!1,this.isJoining=!1,this.time=null,this.time=q,this.ct=z,this.player=K,this.remoteLogger=Y,this.ct.OnSocketMessage.add(this.handleMessage,this),this.ct.OnPlayerLeftSignal.add(this.handlePlayerLeave,this),this.ct.OnPlayerListSignal.add(this.playerListReceived,this)}hostTeam(){if(null===this.currentTeam){this.currentTeam=new MT.d,this.currentTeam.MaxTeamSize=$T.MAX_CO_OP_TEAM_SIZE,this.currentTeam.HostID=this.player.userID,this.currentTeam.addPlayer(this.player.userID),this.isHosting=!0,this.player.coOpTeam=this.currentTeam,this.onTeamHosted.dispatch(),this.currentTeam.OnTeamMemberJoined.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberLeft.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberReady.add(this.broadcastTeamUpdate,this);const q={action:ja.x.HostTeam,data:{hostID:this.currentTeam.HostID,teamMembers:this.currentTeam.TeamMembers,readyMembers:this.currentTeam.ReadyMembers,streak:this.currentTeam.Streak}};this.ct.emitMessage(q)}else X.VyI.log("Active player is in a team. Cannot host another one.",X.$bb.Warning)}joinTeam(q){const K={action:ja.x.RequestJoinTeam,target:q};this.ct.emitMessage(K),this.isJoining=!0,this.time.events.addTimer(5e3,(()=>{this.isJoining=!1,this.IsOnTeam||this.onTeamJoinFailed.dispatch(MT.T.Timeout)}),this)}rejoinTeam(q,K,z,Y){this.IsOnTeam?X.VyI.log("Cannot rejoin a team while being on a team",X.$bb.Warning):(this.currentTeam=new MT.d,this.currentTeam.HostID=q,this.currentTeam.MaxTeamSize=$T.MAX_CO_OP_TEAM_SIZE,this.currentTeam.TeamMembers=K.slice(),this.currentTeam.ReadyMembers=z.slice(),this.currentTeam.Streak=Y,this.isHosting=q===this.player.userID,this.player.coOpTeam=this.currentTeam,this.player.userID===q?(this.currentTeam.OnTeamMemberJoined.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberLeft.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberReady.add(this.broadcastTeamUpdate,this),this.onTeamHosted.dispatch()):this.onTeamJoined.dispatch())}leaveTeam(){if(this.IsOnTeam){if(this.isHosting){const q={action:ja.x.TeamDisbanded,data:{hostID:this.player.userID}};this.ct.emitMessage(q)}else{const q={action:ja.x.PlayerLeftTeam,target:this.currentTeam.HostID};this.ct.emitMessage(q)}this.currentTeam.destroy(),this.currentTeam=null,this.isHosting=!1,this.player.coOpTeam=null,this.onTeamLeft.dispatch()}else X.VyI.log("Cannot leave because active player is not in a team",X.$bb.Warning)}startMatch(q,K,z){if(this.IsHosting){const Y=this.player.appearance,Q=this.player.equipment,X={userID:this.player.userID,level:this.player.data.level,chargedLevelData:this.player.data.chargedLevelData,appearance:{hair:{style:Y.getHair().style,color:Y.getHair().color},hat:Q.getHat(),outfit:Q.getOutfit(),weapon:Q.getWeapon(),boot:Q.getBoots(),costume:Q.getCostume(),face:Y.getFace(),skin:Y.getSkinColor(),eyeColor:Y.getEyeColor()},firstName:Y.getName().getFirstName(),middleName:Y.getName().getMiddleName(),lastName:Y.getName().getLastName(),nickname:Y.getName().getNickname(),playerTransformation:this.player.getPlayerData().playerTransformation};for(let J=0;J-1?this.CurrentTeam.removePlayer(K):this.currentTeam.HostID===K&&this.teamDisbanded()}}teamDisbanded(){this.currentTeam.destroy(),this.currentTeam=null,this.onHostDisbanded.dispatch(),this.player.coOpTeam=null,this.isHosting=!1}handleMessage(q){switch(q.action){case ja.x.RequestJoinTeam:{const K=q.data.userID;let z=!1;const Y={reason:null};if(this.IsHosting?z=this.currentTeam.addPlayer(K,Y):Y.reason=MT.T.NotHostingTeam,z){const q={action:ja.x.JoinTeam,target:K,data:{hostID:this.currentTeam.HostID,teamMembers:this.currentTeam.TeamMembers,readyMembers:this.currentTeam.ReadyMembers,streak:this.currentTeam.Streak}};this.ct.emitMessage(q)}else this.sendTeamJoinFailure(K,Y.reason);break}case ja.x.JoinTeamFailed:this.onTeamJoinFailed.dispatch(q.data.reason),this.isJoining=!1;break;case ja.x.JoinTeam:this.currentTeam=new MT.d,this.currentTeam.MaxTeamSize=$T.MAX_CO_OP_TEAM_SIZE,this.currentTeam.HostID=q.data.hostID,this.currentTeam.TeamMembers=q.data.teamMembers,this.currentTeam.ReadyMembers=q.data.readyMembers,this.isHosting=!1,this.isJoining=!1,this.onTeamJoined.dispatch();break;case ja.x.PlayerLeftTeam:if(this.IsHosting){const K=q.data.userID;this.currentTeam.removePlayer(K)}break;case ja.x.TeamDisbanded:this.IsOnTeam&&this.currentTeam.HostID===q.data.hostID&&this.teamDisbanded();break;case ja.x.Info:if(this.IsOnTeam){const K=q.data;this.IsHosting?this.currentTeam.TeamMembers.indexOf(K.userID)>-1&&(X.Aq$.isDefined(K.coOpTeam)&&K.coOpTeam.hostID===this.player.userID?-1===this.currentTeam.ReadyMembers.indexOf(K.userID)&&this.currentTeam.readyUpPlayer(K.userID):this.currentTeam.removePlayer(K.userID)):K.userID!==this.currentTeam.HostID||X.Aq$.isDefined(K.coOpTeam)&&-1!==K.coOpTeam.teamMembers.indexOf(this.player.userID)||this.teamDisbanded()}break;case ja.x.TeamUpdated:this.IsOnTeam&&!this.IsHosting&&q.data.hostID===this.currentTeam.HostID&&(this.currentTeam.ReadyMembers=q.data.readyMembers,this.currentTeam.TeamMembers=q.data.teamMembers,this.currentTeam.Streak=q.data.streak)}}playerListReceived(q){if(this.IsOnTeam){const K=Z.map(q,(q=>parseInt(q,10)));if(this.IsHosting)for(let q=0;q-1&&-1===K.indexOf(q)&&this.teamDisbanded()}}}broadcastTeamUpdate(){const q={action:ja.x.TeamUpdated,data:{hostID:this.currentTeam.HostID,teamMembers:this.currentTeam.TeamMembers,readyMembers:this.currentTeam.ReadyMembers,streak:this.currentTeam.Streak}};this.ct.emitMessage(q)}}$T.MAX_CO_OP_TEAM_SIZE=3,(0,Q.Cg)([(0,Zl.sg)(500),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],$T.prototype,"broadcastTeamUpdate",null);class HT{get OnTeamCreated(){return this.onTeamCreated}get OnTeamUpdated(){return this.onTeamUpdated}get OnTeamDisbanded(){return this.onTeamDisbanded}get AvailableTeams(){return this.availableTeams}constructor(q){this.ct=null,this.onTeamCreated=new X.HN0,this.onTeamUpdated=new X.HN0,this.onTeamDisbanded=new X.HN0,this.availableTeams=[],this.ct=q,this.ct.OnSocketMessage.add(this.handleMessage,this),this.ct.OnPlayerLeftSignal.add(this.handlePlayerLeave,this)}destroy(){this.ct.OnSocketMessage.remove(this.handleMessage,this),this.ct.OnPlayerLeftSignal.remove(this.handlePlayerLeave,this),this.onTeamCreated.dispose(),this.onTeamDisbanded.dispose(),this.onTeamUpdated.dispose()}handlePlayerLeave(q){const K=parseInt(q,10);this.handleTeamDisband(K)}handleTeamDisband(q){const K=Z.findIndex(this.availableTeams,(K=>K.hostID===q));K>-1&&this.onTeamDisbanded.dispatch(this.availableTeams.splice(K,1)[0])}handleMessage(q){switch(q.action){case ja.x.HostTeam:this.addOrUpdateTeam({hostID:q.data.hostID,teamMembers:[q.data.hostID],readyMembers:[q.data.hostID],streak:0});break;case ja.x.TeamUpdated:this.addOrUpdateTeam(Object.assign({},q.data));break;case ja.x.TeamDisbanded:this.handleTeamDisband(q.data.hostID);break;case ja.x.Info:{const K=q.data;X.Aq$.isDefined(K.coOpTeam)&&K.userID===K.coOpTeam.hostID&&this.addOrUpdateTeam(Object.assign({},K.coOpTeam))}}}addOrUpdateTeam(q){const K=Z.find(this.availableTeams,(K=>K.hostID===q.hostID));X.Aq$.isDefined(K)?(K.teamMembers=q.teamMembers,K.readyMembers=q.readyMembers,this.onTeamUpdated.dispatch(K)):(this.availableTeams.push(q),this.onTeamCreated.dispatch(q))}}class VT extends zn.T{constructor(q,K,z){super(q,"Titan","MAP_TITAN_GROUNDS",z.entry.x,z.entry.y,[z.map],K.concat(ct.Q.Spine_coop_crystal_json,it._.Npc_face_harvey_json,it._.Boss_titan_json,it._.Ui_titan_json,it._.Ui_coop_json,ct.Q.Npc_harvey_json,ct.Q.Spine_catapult_json,ct.Q.Spine_catapult_impact_json,br.q.Cannon_ball,ht.c.Sfx_titan_catapult_launch,ht.c.Sfx_titan_catapult_hit,Gn.t.Tileset_generic_snow_png,it._.Ui_shared_json,Pi.l.Overlay_difficulty_hard,Pi.l.Overlay_difficulty_expert)),this.catapultBattle=!1,this.catapultQueue=0,this.isCatapultAnimating=!1,this.titanHealthBar=null,this.titanAsset=null,this.titanMapData=null,this.impactContainer=null,this.impactSpine=null,this.catapultContainer=null,this.crystalContainer=null,this.crystalGuideHand=null,this.catapultSpine=null,this.cannonBallStartPos=null,this.cannonBall=null,this.catapultTweenX=null,this.catapultTweenY=null,this.titanSpine=null,this.spineContainer=null,this.coOpAvailableTeamsHandler=null,this.currentCoOpTeamHandler=null,this.partySelectOpen=!1,this.coOpEnabled=!0,this.popupsEnabled=!1,this.sendTeamJoined=null,this.sessionTalk=!1,this.titanMapData=z,this.sendTeamJoined=()=>{this.sendCoopSegmentEvent(PT.TeamJoined)}}setup(q,K,z){if(super.setup(q,K,z),this.titanHealthBar=null,this.catapultQueue=0,this.isCatapultAnimating=!1,this._titansNetworkHandler=st.q.instance.prodigy.titansNetworkHandler,this._titansNetworkHandler.isCatapultBattle=!1,this.game.broadcaster.addAppListener(gi.RZ.GotTitan,this.startTitanBattle.bind(this),this,"Titan"),this.game.broadcaster.addAppListener(gi.RZ.GotTitans,this.gotTitanCallback.bind(this),this,"Titan"),this.coOpEnabled=!st.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("coOpTitanDisabled",!1),this.popupsEnabled=te.s.get("GameConstants.Debug.POPUPS_ENABLED"),this.coOpEnabled){const q=st.q.instance.prodigy.gameContainer.get("774-4659");if(null===this.coOpAvailableTeamsHandler){const q=st.q.instance.prodigy.gameContainer.get("774-4659");this.coOpAvailableTeamsHandler=new HT(q)}if(null===this.currentCoOpTeamHandler){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.currentCoOpTeamHandler=new $T(this.game.time,K,q,st.q.instance.prodigy.gameContainer.get("ce3-6d33")),K.coOpTeamHandler=this.currentCoOpTeamHandler,this.currentCoOpTeamHandler.OnTeamHosted.add(this.activePlayerCreatedTeam,this),this.currentCoOpTeamHandler.OnTeamJoined.add(this.activePlayerJoinedTeam,this),this.currentCoOpTeamHandler.OnHostDisbanded.add(this.showCurrentTeamDisbandMessage,this),this.currentCoOpTeamHandler.OnTeamJoinFailed.add(this.showJoinTeamFailedMessage,this),this.currentCoOpTeamHandler.OnHostDisbanded.add(this.setInputBlocking.bind(this,!1)),this.currentCoOpTeamHandler.OnTeamLeft.add(this.setInputBlocking.bind(this,!1)),q.OnSocketMessage.add(this.messageReceived,this)}this.inputBlocker=new Fa(this.game),this.inputBlocker.InputMask=Ua.z.LOCOMOTION|Ua.z.LOBBY|Ua.z.SYSTEM_INFO|Ua.z.REAR_OVERLAY,this.inputBlocker.OnDownBlocked.add(this.blockInputModal,this),this.game.broadcaster.addAppListener(gi.u0.PlayerAdded,this.playerAddedToScreen,this)}st.q.instance.prodigy.titansNetworkHandler.getTitans()}start(q,K,z){super.start(q,K,z),this.coOpEnabled}cleanup(){var q,K,z,Y,Q,X,Z,J,tt,et,it,nt,at,rt,ot;if(this.game.broadcaster.removeAppListener(gi.RZ.GotTitan,this,"Titan"),this.game.broadcaster.removeAppListener(gi.RZ.GotTitans,this,"Titan"),this.game.broadcaster.removeAppListener(gi.RZ.Catapult,this,"Catapult"),this.game.broadcaster.removeAppListener(gi.u0.PlayerAdded,this),this.coOpEnabled){null===(q=this.coOpAvailableTeamsHandler)||void 0===q||q.destroy(),this.coOpAvailableTeamsHandler=null,null===(K=this.currentCoOpTeamHandler)||void 0===K||K.destroy(),this.currentCoOpTeamHandler=null;st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.coOpTeamHandler=null,null===(z=this.inputBlocker)||void 0===z||z.destroy();st.q.instance.prodigy.gameContainer.get("774-4659").OnSocketMessage.remove(this.messageReceived,this),te.s.setGameConstant("GameConstants.Debug.POPUPS_ENABLED",this.popupsEnabled)}null===(Y=this.titanHealthBar)||void 0===Y||Y.destroy(),this.titanHealthBar=null,null===(Q=this.impactContainer)||void 0===Q||Q.destroy(),this.impactContainer=null,null===(X=this.impactSpine)||void 0===X||X.destroy(),this.impactSpine=null,null===(Z=this.catapultContainer)||void 0===Z||Z.destroy(),this.catapultContainer=null,null===(J=this.crystalContainer)||void 0===J||J.destroy(),this.crystalContainer=null,null===(tt=this.crystalGuideHand)||void 0===tt||tt.destroy(),this.crystalGuideHand=null,null===(et=this.catapultSpine)||void 0===et||et.destroy(),this.catapultSpine=null,null===(it=this.cannonBall)||void 0===it||it.destroy(),this.cannonBall=null,null===(nt=this.titanSpine)||void 0===nt||nt.destroy(),this.titanSpine=null,null===(at=this.spineContainer)||void 0===at||at.destroy(),this.spineContainer=null,this.titanAsset=null,null===(rt=this.catapultTweenX)||void 0===rt||rt.remove(),this.catapultTweenX=null,null===(ot=this.catapultTweenY)||void 0===ot||ot.remove(),this.catapultTweenY=null,super.cleanup()}process(q,K,z){super.process(q,K,z),X.Aq$.isDefined(this.screen.questProgress)&&(this.screen.questProgress.visible=!1),null!==this.currentCoOpTeamHandler&&this.currentCoOpTeamHandler.IsOnTeam&&this.game.broadcaster.broadcast(gi.Y1.HideRightSideHUD,gi.HG.HUD)}gotTitanCallback(){if(this.game.broadcaster.removeAppListener(gi.RZ.GotTitans,this,"Titan"),st.q.instance.prodigy.titansNetworkHandler.isTitanAlive()){const q=st.q.instance.prodigy.titansNetworkHandler.titan.assetID;this.titanAsset=Ee.t.getItem("titan",q).data,st.q.instance.prodigy.world.getCurrentZone()===this.titanAsset.zone&&(st.q.instance.prodigy.load.assets([zt.E.getTitanSpine(q)],this.titanLoadComplete.bind(this)),An.K.cacheAsset(this.game,zt.E.getTitanSpine(q),An.K.zoneAssetsCached),this.renderMapElements())}}titanLoadComplete(q,K){K||X.VyI.log("Titan load did not complete successfully.",X.$bb.Error);const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(di.U.progressData.step===hi.B.NotStarted&&z.hasFoundAllKeystones())Xn.E.runAllKeystonesSequenceOnMapSetup((()=>(0,Q.sH)(this,void 0,void 0,(function*(){return this.titanLoadComplete(q,K)}))));else if(this.renderTitan(),st.q.instance.prodigy.titansNetworkHandler.isNewTitan()){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.playerTitanData={titanID:st.q.instance.prodigy.titansNetworkHandler.titan.id,titanBattleProgress:0,seenTitanBattleProgress:0},this.playCutscene()}else this.renderHealthBar(),this.coOpEnabled&&this.featureRequirements.meetsRequirementsDeprecated(8)&&this.playCrystalTutorial()}playCutscene(){st.q.instance.prodigy.world.playScene(this.titanMapData.cutscene),this._firstTimeOnMap=!0}renderMapElements(){const q=new hT.p(this.game,"NPC_NAME_HARVEY",2,sa.ac.Merchant,this.screen.content,this.titanMapData.harvey.x-5,this.titanMapData.harvey.y,"idle"),K=st.q.instance.prodigy.create.sprite(20,-110,it._.Boss_titan_json,"harvey-cart");q.add(K),q.onClick.add(this.onHarveyClicked,this);const z=q.add(st.q.instance.prodigy.create.emptySprite(-.5*q.width+80,-q.height,q.width,q.height));if(z.inputEnabled=!0,z.events.onInputDown.add(this.onHarveyClicked.bind(this)),this.featureRequirements.meetsRequirementsDeprecated(8)){const K=NT.createIndicator(xT.DEFAULT_INDICATOR_CONFIG);K.position.set(-5,-105),K.inputEnabled=!0,this.game.add.tween(K,this).to({y:K.y-20},1e3,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0),q.add(K)}const Y=st.q.instance.prodigy.create.sprite(this.titanMapData.sign.x,this.titanMapData.sign.y,it._.Boss_titan_json,"harveySign");this.screen.content.addChild(Y),Y.anchor.x=.5,Y.anchor.y=1,Y.inputEnabled=!0,Y.events.onInputDown.add(this.onSignClicked.bind(this)),this.setupCatapult(),this.coOpEnabled&&this.setupCrystal()}setupCatapult(){const q=this.titanMapData.titan.x+this.titanMapData.titan.impactOffset.x,K=this.titanMapData.titan.y+this.titanMapData.titan.impactOffset.y;this.impactContainer=st.q.instance.prodigy.create.element(this.screen.content,q,K),this.impactSpine=this.game.add.spine(0,0,ct.Q.Spine_catapult_impact_json),this.impactContainer.add(this.impactSpine),this.impactContainer.visible=!1,this.catapultContainer=st.q.instance.prodigy.create.element(this.screen.content,this.titanMapData.catapult.x,this.titanMapData.catapult.y),this.catapultSpine=this.game.add.spine(0,0,ct.Q.Spine_catapult_json),this.catapultContainer.add(this.catapultSpine);const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(Nn.J.shouldSuppressAd(z)){this.catapultSpine.setTint(3355443);const q=st.q.instance.prodigy.create.sprite(0,-65,it._.Ui_icons_json,"icon-medium-lockglow");q.anchor=new tt.Point(.5,.5),this.catapultContainer.add(q)}if(this.setupSpineHitbox(this.catapultSpine,this.onCatapultClick.bind(this),-85,-140,130,140),this.cannonBallStartPos={x:this.titanMapData.catapult.x-35,y:this.titanMapData.catapult.y-175},this.cannonBall=st.q.instance.prodigy.create.sprite(this.cannonBallStartPos.x,this.cannonBallStartPos.y,br.q.Cannon_ball),this.cannonBall.visible=!1,this.screen.above.add(this.cannonBall),this.catapultTweenX=this.game.add.tween(this.cannonBall.position,this,!1),this.catapultTweenX.to({x:this.impactContainer.x},600,X.GS3.Linear.None,!1,867),this.catapultTweenX.onStart.add((()=>{this.cannonBall.visible=!0})),this.catapultTweenX.onTweenComplete.add((()=>{this.cannonBall.visible=!1,this.playImpact()})),this.catapultTweenY=this.game.add.tween(this.cannonBall.position,this,!1),this.catapultTweenY.to({y:this.impactContainer.y-this.titanMapData.catapult.arcHeight},300,X.GS3.Quadratic.Out,!1,867),this.catapultTweenY.to({y:this.impactContainer.y},300,X.GS3.Quadratic.In,!1,867),this.game.broadcaster.addAppListener(gi.RZ.Catapult,this.onShootCatapult.bind(this),this,"Catapult"),this.catapultBattle){this.catapultBattle=!1,this.game.broadcaster.broadcast(gi.RZ.Catapult,"Catapult");st.q.instance.prodigy.gameContainer.get("774-4659").emitMessage({action:ja.x.Catapult})}this.sendWorldObjectSegmentEvent("World Object Discovered")}renderTitan(){const q=st.q.instance.prodigy.titansNetworkHandler.titan.assetID;this.spineContainer=st.q.instance.prodigy.create.element(this.screen.content,this.titanMapData.titan.x,this.titanMapData.titan.y-60),this.titanSpine=this.game.add.spine(0,0,zt.E.getTitanSpine(q)),this.titanSpine.scale.x*=-1,this.titanSpine.setAnimationByName(0,"idle",!0),this.spineContainer.add(this.titanSpine),this.spineContainer.scale.x=1.2,this.spineContainer.scale.y=1.2,this.setupSpineHitbox(this.spineContainer,this.onTitanClicked.bind(this),-190,-190)}renderHealthBar(){if(!X.Aq$.isDefined(this.titanHealthBar)){const q=new Nr.c(this.game).createUIElements([{type:"UIElement",name:"healthBarContainer",y:25,x:930,anchorX:.5,anchorY:.5,width:336,height:80,children:[{type:"WebFontText",name:"body",text:this.localization.getText("TITAN_HEARTS"),relativeWidth:1,relativeHeight:1,relativeX:.5,relativeY:.1,style:16,boundsAlignH:"center",boundsAlignV:"middle"},{type:"Slider",name:"healthSlider",relativeX:.5,relativeY:.5,relativeWidth:1,relativeHeight:1,atlasName:it._.Ui_shared_json,activeTrackBaseFrameName:"scroll-tracks/red-large-fill",inactiveTrackBaseFrameName:"scroll-tracks/red-large-track",showHead:!1,isVertical:!1,isInteractive:!1}]}],this.screen.above);for(let K=0;K{this.crystalGuideHand=wn.o.highlightObjectOnLayer(this.game,168,-145,this.crystalContainer,this.screen.above)}}),z.setText(280),z.setText({callback:()=>{st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q,K)}}),z.startDeprecated("noot",!1)}}setupCrystal(){const q=Mr.j.createRenderer(ct.Q.Spine_coop_crystal_json,{type:"spine"});q.setSkinByName("crystal"),q.playAnimation("enter",!0),this.crystalContainer=new Dr._(this.game,this.screen.content,[q],620,455);const K=this.setupSpineHitbox(this.crystalContainer,this.onCrystalClick.bind(this),48,-148,160,165);this.inputBlocker.setBlockType(K.input,Ua.z.LOBBY),this.addCollisionZone(this.screen,700,340,85,135)}setupSpineHitbox(q,K,z,Y,Q,Z){const J=X.Aq$.isDefined(Q)?Q:q.width,tt=X.Aq$.isDefined(Z)?Z:q.height,et=X.Aq$.isDefined(z)?z:-.5*J,it=X.Aq$.isDefined(Y)?Y:-tt,nt=st.q.instance.prodigy.create.emptySprite(et,it,J,tt);return q.addChild(nt),nt.alpha=0,nt.inputEnabled=!0,nt.events.onInputDown.add(K),nt}onCrystalClick(){if(this.featureRequirements.meetsRequirementsDeprecated(8)){if(!this.partySelectOpen)if(this.currentCoOpTeamHandler.IsOnTeam)this.currentCoOpTeamHandler.IsHosting?this.showDeleteTeamMessage():this.showLeaveTeamMessage();else if(this.currentCoOpTeamHandler.IsJoining)this.blockInputModal();else{X.Aq$.isDefined(this.crystalGuideHand)&&this.crystalGuideHand.destroy(),this.partySelectOpen=!0;const q=st.q.instance.prodigy.open.coOpTeamSelect(this.screen.playersInfo,this.coOpAvailableTeamsHandler);q.OnCreateClicked.add((()=>{this.setInputBlocking(!0),this.currentCoOpTeamHandler.hostTeam()})),q.OnJoinClicked.add((q=>{this.setInputBlocking(!0);const K=(q,z)=>{z&&this.setInputBlocking(!1),this.currentCoOpTeamHandler.OnTeamJoined.remove(K),this.currentCoOpTeamHandler.OnTeamJoinFailed.remove(K)};this.currentCoOpTeamHandler.OnTeamJoined.add(K,this,0,!1),this.currentCoOpTeamHandler.OnTeamJoinFailed.add(K,this,0,!0),this.currentCoOpTeamHandler.OnTeamJoined.remove(this.sendTeamJoined,this),this.currentCoOpTeamHandler.OnTeamJoined.addOnce(this.sendTeamJoined,this),this.currentCoOpTeamHandler.joinTeam(q)})),q.onDestroy.add((()=>{this.partySelectOpen=!1}))}}else this.titanDeny()}addGuestTag(q){const K=this.screen.playerList[q];X.Aq$.isDefined(K)&&new FT(this.game,K,q,this.currentCoOpTeamHandler)}startCoOpBattle(){const q=st.q.instance.prodigy.gameContainer.get("f71-42eb"),K=Qt.R.loadData(Yt.r.BattleRevampConstants_json).battleConstants;let z=parseInt(q.getValue("titanCoOpTitanHP",te.s.get("GameConstants.CO_OP_TITAN.TITAN_HP")),10),Y=parseInt(q.getValue("titanCoOpCrystalHP",te.s.get("GameConstants.CO_OP_TITAN.CRYSTAL_HP")),10),Q=K.xp.titan;const X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.userID,J=`co_op_battle-${X}-${Date.now()}`,tt=this.currentCoOpTeamHandler.CurrentTeam,et=Z.filter(tt.ReadyMembers,(q=>q!==X)),it=Z.map(et,(q=>this.extractCoOpPlayerData(q))),nt=st.q.instance.prodigy.titansNetworkHandler.titan.assetID,at=st.q.instance.prodigy.titansNetworkHandler.titan.id,rt=tt.ReadyMembers.length===tt.TeamMembers.length?tt.Streak:0;this.sendCoopSegmentEvent(PT.CoOpBattleStarted);const ot={titanNetworkID:at,titanHP:z,crystalHP:Y,titanXPBounty:Q,titanAssetID:nt};this.currentCoOpTeamHandler.startMatch(J,it,ot),st.q.instance.prodigy.startCoOp({teammates:it,hostID:X,titanAssetID:nt,battleMap:this.titanMapData.battleBG,titanNetworkID:at,isHost:!0,returnToMap:this.zoneName,crystalHP:Y,titanHP:z,titanXPBounty:Q,multiplayerRoom:J,teamStreak:rt})}extractCoOpPlayerData(q){var K,z,Y,Q;const Z=this.screen.playersInfo[q];let J,tt,et,it;return X.Aq$.isDefined(Z.equipment)&&(J=Z.equipment.hat,tt=Z.equipment.outfit,et=Z.equipment.weapon,it=Z.equipment.costume),{userID:q,level:Z.data.level,chargedLevelData:Z.data.chargedLevelData,appearance:{face:Z.appearance.face,hair:{style:Z.appearance.hair.style,color:Z.appearance.hair.color},skin:Z.appearance.skinColor,eyeColor:Z.appearance.eyeColor,hat:J,outfit:tt,weapon:et,costume:it},firstName:null===(K=Z.appearance.name)||void 0===K?void 0:K.first,middleName:null===(z=Z.appearance.name)||void 0===z?void 0:z.middle,lastName:null===(Y=Z.appearance.name)||void 0===Y?void 0:Y.last,nickname:null===(Q=Z.appearance.name)||void 0===Q?void 0:Q.nick,playerTransformation:Z.data.playerTransformation}}onHarveyClicked(){const q=new Ni.rD(this.game);st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.BREADCRUMB_TITAN_INTRO,En.B.BREADCRUMB_TITAN_HARVEY_TALKED)?this.sessionTalk||(this.sessionTalk=!0,q.addEvents([{dialogueData:q.dataProvider.get(714),blockInput:!0},{dialogueData:q.dataProvider.get(715),blockInput:!0},{dialogueData:q.dataProvider.get(716),blockInput:!0}])):(st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.BREADCRUMB_TITAN_INTRO,En.B.BREADCRUMB_TITAN_HARVEY_TALKED),q.addEvents([{dialogueData:q.dataProvider.get(712),blockInput:!0},{dialogueData:q.dataProvider.get(713),blockInput:!0}])),q.addEvents([{callback:()=>{q.close(),st.q.instance.prodigy.open.store(21)}}]),q.start(),this.segment.gameWorld.sendNpcClickedEvent({npc_name:kT.N.Harvey,npc_type:sa.ac.Merchant})}onSignClicked(){st.q.instance.prodigy.open.titanProgress(!1)}onCatapultClick(){const q=!this.featureRequirements.meetsRequirementsDeprecated(8),K=st.q.instance.prodigy.gameContainer;if(K.get("ad2-c5b2").player.hasMembership())q?(this.titanDeny(),this.sendWorldObjectSegmentEvent("World Object Failed",sa.kN.LevelLocked)):this.moveToCatapult();else{const q=Dn.P.shouldUseUnifiedConversionFlow(xn.o.FunnelFireTitanCatapult)?Rn.R.UnifiedConversionFlow:Nn.J.showYouTubeMembershipAd(this.game,!0)?Rn.R.Video:Rn.R.Static;this.segment.purchase.sendFunnelStart({type:"Fire-Titan-Catapult",category:"World",contentId:st.q.instance.prodigy.world.getCurrentZone(),adType:q,adVersion:Dn.P.getAdVersion(xn.o.FunnelFireTitanCatapult)}),this.sendWorldObjectSegmentEvent("World Object Failed",sa.kN.MemberLocked);const z=K.get("ad2-c5b2").player;Nn.J.shouldSuppressAd(z)?st.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this.catapultContainer.x,yPosition:this.catapultContainer.y-140,arrowXRelPos:.3,arrowDirection:Kr.i.DOWN}):st.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:xn.o.FunnelFireTitanCatapult},"titanCatapult")}}onShootCatapult(){this.catapultQueue++,this.isCatapultAnimating||this.shootCatapult()}shootCatapult(){if(this.catapultQueue>0){this.catapultQueue--,this.isCatapultAnimating=!0,this.sendWorldObjectSegmentEvent("World Object Used"),this.catapultSpine.setToSetupPose(),this.catapultSpine.setAnimationByName(0,"shoot",!1),this.cannonBall.x=this.cannonBallStartPos.x,this.cannonBall.y=this.cannonBallStartPos.y,this.catapultTweenX.start(),this.catapultTweenY.start();const q=this.game.add.tween(this,this);q.delay(300),q.onTweenComplete.add((()=>{st.q.instance.prodigy.audio.playSFX(27,"launch")})),q.start()}}playImpact(){this.impactContainer.visible=!0,this.impactSpine.setToSetupPose(),this.impactSpine.setAnimationByName(0,"animation",!1),this.impactSpine.onComplete.addOnce((()=>{this.isCatapultAnimating=!1,this.shootCatapult()})),st.q.instance.prodigy.audio.playSFX(28,"hit"),st.q.instance.prodigy.effects.shake(0,300,10,"v"),this.titanSpine.setAnimationByName(0,"attack",!1),this.titanSpine.onComplete.addOnce((()=>{this.titanSpine.setAnimationByName(0,"idle",!0)}))}onTitanClicked(){!this.featureRequirements.meetsRequirementsDeprecated(8)?this.titanDeny():this.moveToTitan()}moveToTitan(){this.screen.path.findPath(this.screen.user.x,this.screen.user.y,this.titanMapData.titan.x-300,this.titanMapData.titan.y+125,!0).then((q=>{q&&this.screen.user.setPath(q,this.callNetworkToStartBattle.bind(this))})).catch(X.RQr.createHandler("Error finding path to Titan"))}moveToCatapult(){this.screen.path.findPath(this.screen.user.x,this.screen.user.y,this.titanMapData.catapult.x+110,this.titanMapData.catapult.y,!0).then((q=>{q&&this.screen.user.setPath(q,this.startCatapultBattle.bind(this))})).catch(X.RQr.createHandler("Error finding path to Catapult"))}titanDeadKick(){const q=st.q.instance.prodigy.open.message(this.localization.getText("TITAN_DEFEATED_MESSAGE"),this.titanDeadTeleport.bind(this),null,this.localization.getText("TITAN_DEFEATED_TITLE"));q.queuePostCreateCallback((()=>{q.okayButton.setInputBlockPriority(Ua.z.SYSTEM_INFO)}))}titanDeadTeleport(){st.q.instance.prodigy.world.goToZoneHub(st.q.instance.prodigy.world.getCurrentZone())}callNetworkToStartBattle(){st.q.instance.prodigy.titansNetworkHandler.getTitan(st.q.instance.prodigy.titansNetworkHandler.titan.id)}startCatapultBattle(){this.catapultBattle=!0,this._titansNetworkHandler.isCatapultBattle=!0,this.callNetworkToStartBattle()}startTitanBattle(){st.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?(this.inputBlocker.pause(),this.coOpEnabled&&this.currentCoOpTeamHandler.IsHosting&&this.currentCoOpTeamHandler.CurrentTeam.ReadyMembers.length>1?this.startCoOpBattle():this.startSoloBattle()):this.titanDeadKick()}startSoloBattle(){st.q.instance.prodigy.battle.battleStats.type="TitanBattle";const q={revampBattleType:Hi.gu.Titan,intro:this.localization.getText("COMBAT_TITAN_BATTLE"),screen:this.titanMapData.battleBG,boss:{name:this.localization.getText("NPC_NAME_TITAN_BARRIER"),starBonus:0,tag:"titan",catapult:this.catapultBattle,ID:st.q.instance.prodigy.titansNetworkHandler.titan.assetID},difficulty:this.titanAsset.difficulty};st.q.instance.prodigy.battle.start(q,void 0,this.onBattleWon.bind(this),this.onBattleLost.bind(this))}onBattleWon(){this.teleportToTitanMap()}onBattleLost(){this.teleportToTitanMap()}teleportToTitanMap(){var q;(null===(q=this.currentCoOpTeamHandler)||void 0===q?void 0:q.IsOnTeam)&&this.currentCoOpTeamHandler.leaveTeam(),this.catapultBattle?(this.catapultBattle=!1,st.q.instance.prodigy.world.it(this.titanMapData.map,this.titanMapData.catapult.x+110,this.titanMapData.catapult.y)):st.q.instance.prodigy.world.it(this.titanMapData.map,this.titanMapData.entry.x,this.titanMapData.entry.y)}sendCoopSegmentEvent(q){const K=this.currentCoOpTeamHandler.CurrentTeam.HostID;switch(q){case PT.TeamFormed:this.segment.battle.sendCoopTeamCreatedEvent(LT.$.Titan,K);break;case PT.TeamJoined:this.segment.battle.sendCoopTeamJoinedEvent(LT.$.Titan,K);break;case PT.CoOpBattleStarted:this.segment.battle.sendCoopBattleStartedEvent(LT.$.Titan,K)}}sendWorldObjectSegmentEvent(q,K){var z,Y,Q,X;const Z=sa.u_.TitanCatapult;switch(q){case"World Object Discovered":this.segment.gameWorld.sendWorldObjectDiscoveredEvent({object_type:Z,x_coord:null===(Y=null===(z=this.titanMapData)||void 0===z?void 0:z.catapult)||void 0===Y?void 0:Y.x,y_coord:null===(X=null===(Q=this.titanMapData)||void 0===Q?void 0:Q.catapult)||void 0===X?void 0:X.y});break;case"World Object Used":this.segment.gameWorld.sendWorldObjectUsedEvent({object_type:Z});break;case"World Object Failed":this.segment.gameWorld.sendWorldObjectUsedFailedEvent({object_type:Z,fail_reason:K})}}showJoinTeamFailedMessage(q){q!==MT.T.Timeout&&st.q.instance.prodigy.open.coOpModal({body:this.localization.getText(q===MT.T.TeamFull?"PARTY_FULL_ERROR":"PARTY_JOIN_FAILED_ERROR"),greenButton:{text:this.localization.getText("BUTTON_OKAY_CAPITAL")}}),X.VyI.log(`Failed joining team reason: ${q}`,X.$bb.Warning)}activePlayerJoinedTeam(){if(this.currentCoOpTeamHandler.IsOnTeam){const q=new UT(this.game,this.screen.menus,this.screen.playersInfo[this.currentCoOpTeamHandler.CurrentTeam.HostID],this.currentCoOpTeamHandler);pd.Z.sendToBack(q),q.onCloseClick.add(this.showLeaveTeamMessage,this)}}showCurrentTeamDisbandMessage(){st.q.instance.prodigy.open.coOpModal({body:this.localization.getText("PARTY_WAS_CANCELLED"),greenButton:{text:this.localization.getText("BUTTON_OKAY_CAPITAL")}})}showDeleteTeamMessage(){st.q.instance.prodigy.open.coOpModal({title:this.localization.getText("DELETE_TEAM_TITLE"),body:this.localization.getText("DELETE_TEAM_BODY"),greenButton:{text:this.localization.getText("BUTTON_KEEP_TEAM")},redButton:{text:this.localization.getText("BUTTON_DELETE_TEAM"),callback:()=>{this.currentCoOpTeamHandler.leaveTeam()}}})}showLeaveTeamMessage(){const q=st.q.instance.prodigy.open.coOpModal({title:this.localization.getText("LEAVE_TEAM_TITLE"),body:this.localization.getText("LEAVE_TEAM_BODY"),greenButton:{text:this.localization.getText("BUTTON_STAY_TEAM")},redButton:{text:this.localization.getText("BUTTON_LEAVE_TEAM"),callback:()=>{this.currentCoOpTeamHandler.leaveTeam()}}});this.currentCoOpTeamHandler.OnHostDisbanded.addOnce(q.destroy.bind(q))}activePlayerCreatedTeam(){if(this.currentCoOpTeamHandler.IsHosting){const q=new GT(this.game,this.screen.menus,this.currentCoOpTeamHandler);q.onStartClick.add(this.callNetworkToStartBattle,this),q.onCloseClick.add(this.showDeleteTeamMessage,this),this.currentCoOpTeamHandler.CurrentTeam.OnTeamMemberJoined.add(this.addGuestTag,this),this.currentCoOpTeamHandler.CurrentTeam.OnTeamMemberJoined.addOnce((()=>{this.sendCoopSegmentEvent(PT.TeamFormed)}))}}messageReceived(q){if(q.action===ja.x.StartCoOpTitanMatch&&this.currentCoOpTeamHandler.IsOnTeam&&this.currentCoOpTeamHandler.CurrentTeam.HostID===q.data.hostID){const K=this.currentCoOpTeamHandler.CurrentTeam,z=K.ReadyMembers.length===K.TeamMembers.length?K.Streak:0;this.sendCoopSegmentEvent(PT.CoOpBattleStarted),st.q.instance.prodigy.startCoOp(Object.assign({teammates:q.data.teammates,hostID:q.data.hostID,battleMap:this.titanMapData.battleBG,isHost:!1,returnToMap:this.zoneName,multiplayerRoom:q.data.multiplayerRoom,teamStreak:z},q.data.matchData))}}playerAddedToScreen(q){if(this.currentCoOpTeamHandler.IsHosting){const K=q.source.userID;this.currentCoOpTeamHandler.CurrentTeam.TeamMembers.indexOf(K)>-1&&this.addGuestTag(K)}}setInputBlocking(q){q?this.inputBlocker.start():this.inputBlocker.pause(),q?this.game.broadcaster.broadcast(gi.Y1.HideRightSideHUD,gi.HG.HUD):this.game.broadcaster.broadcast(gi.Y1.ShowRightSideHUD,gi.HG.HUD)}blockInputModal(){const q=st.q.instance.prodigy.open.coOpModal({body:this.localization.getText("CO_OP_INPUT_BLOCKED_MODAL"),greenButton:{text:this.localization.getText("BUTTON_OKAY_CAPITAL")}});this.currentCoOpTeamHandler.IsOnTeam&&this.currentCoOpTeamHandler.OnHostDisbanded.addOnce(q.destroy.bind(q))}titanDeny(){const q=st.q.instance.prodigy.event.create();q.enableInput(!1),q.validPath(this.screen.user,this.screen.path,this.titanMapData.titan.x-300,this.titanMapData.titan.y+125),q.function((()=>{this.titanSpine.setAnimationByName(0,"attack",!1),this.titanSpine.onComplete.addOnce((()=>{this.titanSpine.setAnimationByName(0,"idle",!0)}));const q=this.screen.user;this.game.add.tween(q.position,this).to({x:this.titanMapData.entry.x},300,X.GS3.Quadratic.Out,!0,800),st.q.instance.prodigy.effects.shake(600,600,20,"v")})),q.delay(1500),q.enableInput(!0),q.start()}}(0,Q.Cg)([(0,X.fFd)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],VT.prototype,"localization",void 0);var WT=z(95798);class qT extends zn.T{}class KT extends qT{constructor(q,K){super(q,"A1","MAP_BONFIRE_SPIRE_VOLCANO_ENTRANCE",865,482,["bonfire_spire-B1"],K),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:995,y:420,w:120,h:150,rect:!0},"bonfire_spire-B1",160,307.5,null,WT.K.DOWN_RIGHT,!1),K.addClickableMoveEvent(920,322,235,235,1052,506,null,null,0,null),this.addChest(q,K,"chest1",175,275),this.addPippet(q,K,2,650,482)}}class zT extends qT{constructor(q,K){super(q,"A4","MAP_BONFIRE_SPIRE_PITFALL_TERRACE",1020,400,["bonfire_spire-B4"],K.concat(it._.Npc_sprite_slime_worker_json)),this.wasInsideTriggerLastFrame=!1,this.user=null,this.leverNumber=3,this.battleBG="battle-bonfire-outside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.user=K.user,this.addAreaEvent(q,K,{x:1180,y:420,w:200,h:210,rect:!0},"bonfire_spire-B4",140,200,null,WT.K.RIGHT,!1),K.addClickableMoveEvent(1080,315,200,210,1186,492,null,null,0,null),this.addChest(q,K,"chestGuardian",742,236,{type:"item",ID:92}),this.toggleDynamicLayer(q,6,!1,0)}update(q){if(X.Aq$.isDefined(this.user)){const K=X.cj9.distance(this.user.x,this.user.y,100,380)<=80;K!==this.wasInsideTriggerLastFrame&&this.toggleDynamicLayer(q,6,K,500),this.wasInsideTriggerLastFrame=K}super.update(q)}}class YT extends qT{constructor(q,K){super(q,"B1","MAP_BONFIRE_SPIRE_VOLCANO_VILLAGE",160,307,["bonfire_spire-C1","bonfire_spire-B2","bonfire_spire-A1"],K.concat([it._.Npc_sprite_slurpy_json,it._.Npc_sprite_slime_queen_json,it._.Npc_sprite_slime_guard_json,it._.Npc_sprite_merchant_json,ct.Q.Spine_npc_slurpy_json])),this.questNPC=null,this.leverNumber=1,this.battleBG="battle-bonfire-inside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1248,y:370,w:64,h:260,rect:!0},"bonfire_spire-C1",170,417.5,null,WT.K.RIGHT,!1),K.addClickableMoveEvent(1216,240,64,260,1265,385,null,null,0,null),1===this.zone.getState("lever1")&&(this.addAreaEvent(q,K,{x:198.5,y:650,w:145,h:60,rect:!0},"bonfire_spire-B2",180,117.5,null,WT.K.DOWN,!1),K.addClickableMoveEvent(126,660,145,60,200,700,null,null,0,null)),this.addAreaEvent(q,K,{x:48,y:277,w:96,h:230,rect:!0},"bonfire_spire-A1",865,482,null,WT.K.UP_LEFT,!1),K.addClickableMoveEvent(0,162,96,230,28,255,null,null,0,null),this.questNPC=K.addConstructedQuestNPC(750,530,"slurpy",!1,YT.onComplete.bind(this,q)),st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.BonfireMerchantNPC,360,310).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.BonfireMerchantNPC}`)),st.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,K.user,K.content,1e3,525)}static onComplete(q){const K=st.q.instance.prodigy.event.create();K.text(0,"slurpy"),K.start()}}class QT extends qT{constructor(q,K){super(q,"B2","MAP_BONFIRE_SPIRE_VOLCANIC_CAVERN",180,117.5,["bonfire_spire-B1","bonfire_spire-C3","bonfire_spire-B4"],K),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:198.5,y:39,w:145,h:78,rect:!0},"bonfire_spire-B1",180,500,null,WT.K.UP,!1),K.addClickableMoveEvent(126,0,145,78,200,28,null,null,0,null),this.addAreaEvent(q,K,{x:1190,y:280,w:64,h:180,rect:!0},"bonfire_spire-C3",160,417.5,null,WT.K.RIGHT,!1),K.addClickableMoveEvent(1216,190,64,180,1262,282,null,null,0,null),1===this.zone.getState("lever2")&&(this.addAreaEvent(q,K,{x:1120.5,y:640,w:145,h:160,rect:!0},"bonfire_spire-B4",1040,117.5,null,WT.K.DOWN,!1),K.addClickableMoveEvent(1048,560,145,160,1120,700,null,null,0,null))}}class XT extends qT{constructor(q,K){super(q,"B4","MAP_BONFIRE_SPIRE_VOLCANO_JUNCTION",1080,117.5,["bonfire_spire-A4","bonfire_spire-B2","bonfire_spire-C4","bonfire_spire-B5"],K),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1080,y:40,w:160,h:80,rect:!0},"bonfire_spire-B2",1100,509.5,null,WT.K.UP,!1),this.addAreaEvent(q,K,{x:1250,y:450,w:80,h:160,arrowOffsetY:-20,rect:!0},"bonfire_spire-C4",130,360,null,WT.K.RIGHT,!1),1===this.zone.getState("lever3")&&this.addAreaEvent(q,K,{x:200,y:675,w:160,h:90,rect:!0},"bonfire_spire-B5",160,237.5,null,WT.K.DOWN,!1),this.addAreaEvent(q,K,{x:25,y:180,w:50,h:160,rect:!0},"bonfire_spire-A4",1020,400,null,WT.K.LEFT,!1)}}class ZT extends qT{constructor(q,K){super(q,"B5","MAP_BONFIRE_SPIRE_RED_HOT_RIVER",150,210,["bonfire_spire-B4","bonfire_spire-C6"],K),this.battleBG="battle-bonfire-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:160,y:60,w:160,h:120,rect:!0},"bonfire_spire-B4",160,527.5,null,WT.K.UP,!1),K.addClickableMoveEvent(80,0,160,120,160,100,null,null,0,null),this.addAreaEvent(q,K,{x:1230,y:480,w:100,h:180,rect:!0},"bonfire_spire-C6",250,400,null,WT.K.RIGHT,!1),K.addClickableMoveEvent(1180,390,100,180,1200,480,null,null,0,null),this.addChest(q,K,"chest4",740,520)}}class JT extends qT{constructor(q,K){super(q,"C1","MAP_BONFIRE_SPIRE_FIREWATCH_ROAD",180,417.5,["bonfire_spire-D1","bonfire_spire-D2","bonfire_spire-B1"],K),this.leverNumber=1,this.battleBG="battle-bonfire-inside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1272,y:430,w:96,h:150,rect:!1},"bonfire_spire-D1",300,360,null,WT.K.RIGHT,!1),K.addClickableMoveEvent(1170,380,96,150,1235,430,null,null,0,null),this.addAreaEvent(q,K,{x:1254,y:617.5,w:52,h:205,rect:!0},"bonfire_spire-D2",260,382.5,null,WT.K.RIGHT,!1),K.addClickableMoveEvent(1228,515,52,205,1256,602,null,null,0,null),this.addAreaEvent(q,K,{x:31,y:415,w:62,h:200,rect:!1},"bonfire_spire-B1",1120,417.5,null,WT.K.LEFT,!1),K.addClickableMoveEvent(0,315,62,200,22,416,null,null,0,null)}}class tS extends qT{constructor(q,K){super(q,"C2","MAP_BONFIRE_SPIRE_PALM_PATH",1100,597.5,["bonfire_spire-C3"],K),this.leverNumber=2,this.battleBG="battle-bonfire-outside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1080.5,y:680,w:145,h:80,rect:!0},"bonfire_spire-C3",1100,200,null,WT.K.DOWN,!1),K.addClickableMoveEvent(1008,640,145,80,1080,704,null,null,0,null),this.toggleDynamicLayer(q,3,1===this.zone.getState("lever2"),0),this.toggleDynamicLayer(q,4,1!==this.zone.getState("lever2"),0),K.addClickableEvent(200,120,120,100,this.zone.toggleLever.bind(this.zone,K,1,this,{x:260,y:250})),this.zone.sendSegmentEvents("World Object Discovered",{object_type:sa.u_.LeverSwitch,object_id:"1",x_coord:200,y_coord:120})}}class eS extends qT{constructor(q,K){super(q,"C3","MAP_BONFIRE_SPIRE_SLIME_SHANTY",160,417.5,["bonfire_spire-C2","bonfire_spire-D3","bonfire_spire-B2"],K),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),this.enableLayerID(3,!1),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1084,y:60,w:145,h:120,rect:!0},"bonfire_spire-C2",1100,597.5,null,WT.K.UP,!1),K.addClickableMoveEvent(1015,0,145,120,1120,20,null,null,0,null),this.addAreaEvent(q,K,{x:1268,y:519,w:24,h:158,rect:!0},"bonfire_spire-D3",180,377.5,null,WT.K.RIGHT,!1),K.addClickableMoveEvent(1256,440,24,158,1270,520,null,null,0,null),this.addAreaEvent(q,K,{x:32,y:417,w:64,h:210,rect:!0},"bonfire_spire-B2",1060,342.5,null,WT.K.LEFT,!1),K.addClickableMoveEvent(0,312,64,210,22,414,null,null,0,null)}}class iS extends qT{constructor(q,K){super(q,"C4","MAP_BONFIRE_SPIRE_LAVA_PITS",110,397.5,["bonfire_spire-D4","bonfire_spire-B4"],K),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1230,y:480,w:100,h:180,rect:!0},"bonfire_spire-D4",220,467.5,null,WT.K.RIGHT,!1),this.addAreaEvent(q,K,{x:40,y:360,w:80,h:150,arrowOffsetY:-20,rect:!0},"bonfire_spire-B4",1150,450,null,WT.K.LEFT,!1)}canRegularMonsterSpawn(){return!this.zone.isOnQuest(11)}}class sS extends qT{constructor(q,K){super(q,"C6","MAP_BONFIRE_SPIRE_THRONE_ROOM_ENTRANCE",250,400,["bonfire_spire-D5","bonfire_spire-D6","bonfire_spire-B5"],K.concat([it._.Npc_sprite_cebollini_json,it._.Npc_sprite_slime_guard_json])),this.battleBG="battle-bonfire-lava"}init(q,K,z,Y){const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("key",12)>0;return this.enableLayerID(1,!Q),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1250,y:510,w:60,h:300,rect:!0},"bonfire_spire-D6",350,557.5,null,WT.K.RIGHT,!1),this.addAreaEvent(q,K,{x:100,y:401,w:200,h:250,rect:!0},"bonfire_spire-B5",1120,527.5,null,WT.K.LEFT,!1),K.addClickableMoveEvent(0,276,200,250,160,380,null,null,0,null),this.addAreaEvent(q,K,{x:880,y:211,w:190,h:190,rect:!0},"bonfire_spire-D5",220,480,null,WT.K.UP,!1),K.addClickableMoveEvent(785,116,190,190,880,305,null,null,0,null),this.addChest(q,K,"chest5",400,290)}}class nS extends qT{constructor(q,K){super(q,"D1","MAP_BONFIRE_SPIRE_PALM_TERRACE",260,382.5,["bonfire_spire-C1"],K),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:100,y:359.5,w:200,h:235,rect:!0},"bonfire_spire-C1",1200,430,null,WT.K.LEFT,!1),K.addClickableMoveEvent(0,242,200,235,98,420,null,null,0,null),this.toggleDynamicLayer(q,3,1===this.zone.getState("lever1"),0),this.toggleDynamicLayer(q,4,1!==this.zone.getState("lever1"),0),K.addClickableEvent(840,240,120,100,this.zone.toggleLever.bind(this.zone,K,0,this,{x:800,y:300})),this.zone.sendSegmentEvents("World Object Discovered",{object_type:sa.u_.LeverSwitch,object_id:"0",x_coord:840,y_coord:240})}}class aS extends qT{constructor(q,K){super(q,"D2","MAP_BONFIRE_SPIRE_VOLCANIC_SANCTUM",180,292.5,["bonfire_spire-C1"],K),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:60,y:242.5,w:120,h:235,rect:!0},"bonfire_spire-C1",1145,657.5,null,WT.K.LEFT,!1),K.addClickableMoveEvent(0,125,120,235,52,280,null,null,0,null),this.addWizard(q,K,725,500,"wizard1",38,!0),this.addChest(q,K,"chest2",800,500)}}class rS extends qT{constructor(q,K){super(q,"D3","MAP_BONFIRE_SPIRE_MOLTEN_ENCLAVE",180,377.5,["bonfire_spire-C3"],K),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:60,y:322.5,w:120,h:235,rect:!0},"bonfire_spire-C3",1100,515,null,WT.K.LEFT,!1),K.addClickableMoveEvent(0,205,120,235,52,360,null,null,0,null),this.addWizard(q,K,740,400,"wizard2",39,!0),this.addChest(q,K,"chest3",840,415)}}class oS extends qT{constructor(q,K){super(q,"D4","MAP_BONFIRE_SPIRE_OUTER_SLIMEBURBIA",220,467.5,["bonfire_spire-C4"],K.concat([it._.Zone_lamplight_json])),this.leverNumber=3,this.battleBG="battle-bonfire-outside"}init(q,K,z,Y){return this.zone.processLavaLayers(this),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:100,y:421,w:200,h:210,rect:!0},"bonfire_spire-C4",1120,460,null,WT.K.LEFT,!1),K.addClickableMoveEvent(0,316,200,210,102,500,null,null,0,null),this.toggleDynamicLayer(q,3,1===this.zone.getState("lever3"),0),this.toggleDynamicLayer(q,4,1!==this.zone.getState("lever3"),0),K.addClickableEvent(960,260,120,80,this.zone.toggleLever.bind(this.zone,K,2,this,{x:920,y:320})),this.zone.sendSegmentEvents("World Object Discovered",{object_type:sa.u_.LeverSwitch,object_id:"2",x_coord:200,y_coord:120})}}class hS extends qT{constructor(q,K){super(q,"D5","MAP_BONFIRE_SPIRE_THRONE_ROOM",220,480,["bonfire_spire-E6","bonfire_spire-C6"],K.concat([it._.Npc_sprite_slurpy_json,it._.Npc_sprite_cebollini_json,it._.Npc_sprite_slime_worker_json,ct.Q.Spine_npc_slimeguard_json,ct.Q.Spine_npc_slimequeen_json])),this.queen=null,this.gaurd=null,this.battleBG="battle-bonfire-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1180,y:501,w:200,h:210,rect:!0},"bonfire_spire-E6",180,547.5,null,WT.K.RIGHT,!1),K.addClickableMoveEvent(1080,396,200,210,1210,580,null,null,0,null),this.addAreaEvent(q,K,{x:200,y:635,w:200,h:180,rect:!0},"bonfire_spire-C6",900,355,null,WT.K.DOWN,!1),this.gaurd=new hT.p(q,"NPC_NAME_GUARD_SLIME",494,sa.ac.Guard,K.content,570,430,"idle"),this.gaurd.onClick.add(this.talkToGuard,this),this.queen=new hT.p(q,"NPC_NAME_QUEEN_GOO_LIA",492,sa.ac.Boss,K.content,645,282,"idle"),this.queen.onClick.add(this.talkToQueen,this)}talkToGuard(){const q=st.q.instance.prodigy.event.create();q.text(5,"slime_guard"),q.start()}talkToQueen(){const q=st.q.instance.prodigy.event.create();q.text(10,"slime_queen"),q.text(),q.text(5,"slime_guard"),q.start()}}class cS extends qT{constructor(q,K){super(q,"D6","MAP_BONFIRE_SPIRE_GARDEN_GETAWAY",330,510,["bonfire_spire-C6"],K.concat([it._.Zone_lamplight_json,it._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-lava"}init(q,K,z,Y){const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("key",12)>0;return this.enableLayerID(1,!Q),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:70,y:500,w:140,h:250,rect:!0},"bonfire_spire-C6",1080,480,null,WT.K.LEFT,!1)}}class dS extends qT{constructor(q,K){super(q,"E5","MAP_BONFIRE_SPIRE_FIERY_ALCOVE",115,510,["bonfire_spire-E6"],K.concat([it._.Zone_lamplight_json])),this.battleBG="battle-bonfire-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:160,y:655,w:160,h:130,rect:!0},"bonfire_spire-E6",1160,162.5,null,WT.K.DOWN,!1),this.addChest(q,K,"chest6",800,368)}}class lS extends qT{constructor(q,K){super(q,"E6","MAP_BONFIRE_SPIRE_ROYAL_KITCHEN",180,547.5,["bonfire_spire-E5","bonfire_spire-D5"],K.concat([it._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1100,y:65,w:160,h:130,rect:!0},"bonfire_spire-E5",120,512.5,null,WT.K.UP,!1),K.addClickableMoveEvent(1e3,0,160,130,1120,120,null,null,0,null),this.addAreaEvent(q,K,{x:50,y:500,w:100,h:170,guideHandPathToX:100,guideHandPathToY:480,rect:!0},"bonfire_spire-D5",1020,500,null,WT.K.LEFT,!1),K.addClickableMoveEvent(0,415,100,170,100,480,null,null,0,null)}}class uS extends jn.T{constructor(q,K,z){super(q,K,1,"QUESTS_BONFIRE_SPIRE_PULL_LEVER",{type:"seq",N:1},["bonfire_spire-D1"],[511,512,513,514],[],[509],z)}process(q,K,z){super.process(q,K,z),this.zone.isQuestComplete(1)||(this.zone.processLeverRequirements(K,z,[1,null,null]),this.zone.processLeverQuest(K,1))}}class fS extends jn.T{constructor(q,K,z){super(q,K,10,"QUESTS_BONFIRE_SPIRE_OFFER_DISH",{type:"seq",N:1},["bonfire_spire-C6"],[536,537],[],[509],z)}start(q,K,z){if(super.start(q,K,z),"C6"===z.getTag()&&this.zone.isOnSequence(10,0)){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=z.addConstructedNPC(q,K,885,340,it._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI");Q.visible=!1;const X=st.q.instance.prodigy.event.create();X.enableInput(!1),X.set(K.user,"evtProc",!0),X.validPath(K.user,K.path,650,420),X.enableInput(!0),X.text(5,"cebollini"),X.set(Q,"visible",!0),X.text(6,"cebollini"),X.text(7,"cebollini"),X.enableInput(!1),X.validPath(Q,K.path,650,420),X.function(Y.backpack.consume.bind(Y.backpack,"item",91,1)),X.path(Q,[{x:st.q.instance.game.width,y:510}]),X.set(Q,"visible",!1),X.enableInput(!0),X.text(104,"noot"),X.text(105,"noot"),X.text(106,"noot"),X.function(this.zone.completeSequence.bind(z.zone,10,0)),X.function(K.process.bind(K)),X.set(K.user,"evtProc",!1),X.start()}return null}}class bS extends jn.T{constructor(q,K,z){super(q,K.concat(it._.Npc_sprite_noot_json),11,"QUESTS_BONFIRE_SPIRE_FIND_KEY",{type:"item",ID:92,N:1,K:1},["bonfire_spire-C4"],[538,539,540,541,542,543],[],[509,510],z)}setup(q,K,z){super.setup(q,K,z);const Y={randDir:!0,encounter:[{ID:75}],drops:this.hasDefeatedPuck()?[{type:"item",ID:92}]:void 0,difficulty:5,maxTeamSize:1,unique:!0,isQuestEncounter:!0,showGuideHand:!0},Q=z.getTag();if("C4"===Q&&!this.zone.isQuestComplete(11))return st.q.instance.prodigy.prefabFactory.addMonster(z,480,480,1,Y).catch(X.RQr.createHandler("Could not add monster 0 for Bonfire Q11")),st.q.instance.prodigy.prefabFactory.addMonster(z,840,240,2,Y).catch(X.RQr.createHandler("Could not add monster 1 for Bonfire Q11")),{enableMonsters:!1};if("A4"===Q){const Y=z.addChest(q,K,"chestGuardian",742,236,{type:"item",ID:92});return Y.chestSprite.events.onInputDown.removeAll(),Y.chestSprite.events.onInputDown.add((()=>{const q=st.q.instance.prodigy.event.create();q.text(111,"noot"),q.start()})),{enableChests:!1}}}hasDefeatedPuck(){const q=this.zone.getQuestState().state;return Object.keys(q).some((K=>q[K]>0))}}class pS extends jn.T{constructor(q,K,z){super(q,K,12,"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",{type:"key",ID:12,N:1},["bonfire_spire-A4"],[544,545,546],[],[509],z),this.chest=null,this.chestElement=null}setup(q,K,z){super.setup(q,K,z);return"A4"===z.getTag()&&this.zone.isOnQuest(12)?(this.zone.isOnSequence(12,0)?(this.chest=K.content.addChild(st.q.instance.prodigy.create.sprite(800,225,it._.Tileset_core_json,"chest-B-1")),this.chest.inputEnabled=!0,this.chest.events.onInputDown.add((()=>{this.openTheChest(q,K,z)}),this),this.chest.anchor.set(.5,1),this.chestElement=st.q.instance.prodigy.create.element(K.foreground,745,135),X.Aq$.isDefined(this.chestElement)&&(this.chestElement.highlight(!0),this.chestElement.visible=!0)):this.zone.isOnSequence(12,1)&&z.addChest(q,K,"chestGuardian",800,225,{type:"item",ID:92}),{enableChests:!1}):null}openTheChest(q,K,z){const Y=z.addMonster(q,K,0,725,250,!1,{randDir:!1,encounter:[{ID:65}],difficulty:5,maxTeamSize:1},!0);Y.visible=!1,Y.alpha=0;const Q=st.q.instance.prodigy.event.create();Q.validPath(K.user,K.path,800,250),Q.enableInput(!1),Q.set(K.user,"evtProc",!0),Q.set(Y,"alpha",0),Q.function((()=>{Y.visible=!0,q.add.tween(Y,this).to({alpha:1},1e3,X.GS3.Linear.None).start()})),Q.delay(2e3),Q.enableInput(!0),Q.function((()=>{st.q.instance.prodigy.battle.start({intro:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_DEFEAT_GUARDIAN"),screen:"battle-bonfire-outside",pets:[{ID:65,nickname:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_GUARDIAN")}]},null,(()=>{this.zone.completeSequence(12,0),st.q.instance.prodigy.world.it("bonfire_spire-A4",800,270)}),null,this.zone.defaultOnFaint)})),Q.start()}}class vS extends jn.T{constructor(q,K,z){super(q,K,13,"QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",{type:"seq",N:2},["bonfire_spire-D6"],[547,548,549],[],[509],z)}setup(q,K,z){if(super.setup(q,K,z),"D6"===z.getTag()){return z.addConstructedNPC(q,K,850,400,it._.Npc_sprite_cebollini_json,(()=>{const q=st.q.instance.prodigy.event.create();q.text(14,"cebollini"),q.text(15,"cebollini"),q.start()}),"NPC_NAME_CEBOLLINI").flip(),{enableMonsters:!1}}return null}start(q,K,z){return super.start(q,K,z),"D6"===z.getTag()&&this.zone.isOnSequence(13,0)?this.bossBattle(q,K,z):"D6"===z.getTag()&&this.zone.isOnSequence(13,1)&&this.postBattle(q,K),null}bossBattle(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("f71-42eb"),Q=Y.getValue("cebolliniMaxHP",te.s.get("GameConstants.Cebollini.MAX_HP")),Z=null===Q?void 0:parseInt(Q,10),J=st.q.instance.prodigy.event.create();st.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const tt=this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE"),{boss:{ID:13,maxHP:Z,element:"fire",attacks:[55,58],name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_CEBOLLINI"),tag:"bonfire"},difficulty:parseInt(Y.getValue("CebolliniDifficulty",te.s.get("GameConstants.Cebollini.DIFFICULTY")),10),drops:[{type:"weapon",ID:16}],starMod:5,screen:"battle-bonfire-lava",events:[{action:"turn",value:1,callback:(q,K)=>{const z=st.q.instance.prodigy.dialogue.create();z.setText(10),z.startDeprecated("cebollini",!1,K)}}]},(()=>{const q=st.q.instance.prodigy.event.create();q.function(this.zone.completeSequence.bind(this.zone,13,0)),q.function(st.q.instance.prodigy.world.it.bind(st.q.instance.prodigy.world,"bonfire_spire-D6")),q.start()}),(()=>{J.function(st.q.instance.prodigy.world.it.bind(st.q.instance.prodigy.world,"bonfire_spire-C6",1060,500)),J.start()}));J.enableInput(!1),J.validPath(K.user,K.path,399,400),J.validPath(K.user,K.path,400,400),J.enableInput(!0),J.text(8,"cebollini"),J.text(9,"cebollini"),J.function(tt),J.start()}postBattle(q,K){const z=st.q.instance.prodigy.event.create();z.text(13,"cebollini"),z.text(14,"cebollini"),z.text(),z.text(107,"noot"),z.text(),z.text(15,"cebollini"),z.function(this.zone.completeSequence.bind(this.zone,13,1)),z.function(K.process.bind(K)),z.start()}}class gS extends jn.T{constructor(q,K,z){super(q,K.concat(ct.Q.Spine_npc_slurpy_json,ht.c.Sfx_bonfire_spire_q6_and_q14),14,"QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN",{type:"seq",N:1},["bonfire_spire-D5"],[550,551],[],[554,555,510,556],z)}start(q,K,z){if(super.start(q,K,z),"D5"===z.getTag()&&this.zone.isOnSequence(14,0)){const Y=K.foreground.addChild(st.q.instance.prodigy.create.sprite(690,250,it._.Zone_bonfire_json,"food"));Y.visible=!1;const Q=z.addConstructedNPC(q,K,720,490,"npc-sprite-worker-slime-red",null,"NPC_NAME_WORKER_SLIME"),X=new hT.p(q,"NPC_NAME_SLURPY",493,sa.ac.Boss,K.content,530,310,"animation"),Z=z.addConstructedNPC(q,K,835,390,it._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI");Z.flip();const J=st.q.instance.prodigy.event.create();J.text(108,"noot"),J.text(),J.text(5,"slime_queen"),J.text(),J.text(16,"cebollini"),J.text(),J.function((()=>{z.queen.flip()})),J.text(6,"slime_queen"),J.enableInput(!1),J.path(Q,[{x:730,y:350}],1,!0),J.delay(1e3),J.set(Y,"visible",!0),J.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,Y,"-70","-200","+100",2e3,!0,!0)),J.delay(2e3),J.sound(10,"eating"),J.delay(2e3),J.enableInput(!0),J.text(7,"slime_queen"),J.function(Z.chat.bind(Z,1,100)),J.function((()=>{z.queen.flip()})),J.text(8,"slime_queen"),J.text(),J.text(43,"slurpy"),J.text(44,"slurpy"),J.enableInput(!1),J.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"+100","-100","+250",1e3,!1,!0),!0),J.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"-100","-100","+200",1e3,!1,!0),!0),J.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"-150","-100","+100",1e3,!1,!0),!0),J.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"-120","-150","+150",1e3,!1,!0),!0),J.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"-180","-150","+300",1e3,!0,!0),!0),J.enableInput(!0),J.text(),J.function((()=>{z.queen.flip()})),J.text(17,"cebollini"),J.text(18,"cebollini"),J.text(),J.text(9,"slime_queen"),J.text(),J.text(19,"cebollini"),J.function(this.zone.completeSequence.bind(z.zone,14,0)),J.function(K.process.bind(K)),J.start()}return null}}class mS extends jn.T{constructor(q,K,z){super(q,K,2,"QUESTS_BONFIRE_SPIRE_PULL_LEVER",{type:"seq",N:1},["bonfire_spire-C2"],[515,516],[],[509],z)}process(q,K,z){super.process(q,K,z),this.zone.isQuestComplete(2)||(this.zone.processLeverRequirements(K,z,[1,1,null]),this.zone.processLeverQuest(K,2))}}class yS extends jn.T{constructor(q,K,z){super(q,K,3,"QUESTS_BONFIRE_SPIRE_PULL_LEVER",{type:"seq",N:1},["bonfire_spire-D4"],[517,518],[],[509],z)}process(q,K,z){super.process(q,K,z),this.zone.isQuestComplete(3)||(this.zone.processLeverRequirements(K,z,[1,1,1]),this.zone.processLeverQuest(K,3))}}class _S extends jn.T{constructor(q,K,z){super(q,K,4,"",{type:"item",ID:88,N:1,K:!0},["bonfire_spire-C3"],[519,520,521],[],[509],z,null,"QUESTS_BONFIRE_RETRIEVE_INGREDIENT"),this.collectionMaps={C3:[0]}}setup(q,K,z){return super.setup(q,K,z),"C3"===z.getTag()&&K.addCollect(0,950,250,{type:"item",ID:88,showLoading:!1}),null}}class ES extends jn.T{constructor(q,K,z){super(q,K.concat([ht.c.Sfx_bonfire_spire_q5]),5,"QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",{type:"seq",N:1},["bonfire_spire-E6"],[522,523],[],[509,510],z),this.food=null,this.cebollini=null,this.cebollini2=null,this.cookingPot=null,this.caught=!1,this.foodPlaced=!1,this.hover=!1,this.cookingPotHighlight=null,this.visionCone=null,this.button=null,this.buttonIcon=null,this.pot=null}setup(q,K,z){return super.setup(q,K,z),"E6"!==z.getTag()||this.zone.isQuestComplete(5)?null:(this.food=K.foreground.addChild(st.q.instance.prodigy.create.sprite(650,180,zt.E.getIconForType("item",88))),this.food.visible=!1,this.cebollini=z.addConstructedNPC(q,K,580,370,it._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI"),this.cebollini2=z.addConstructedNPC(q,K,this.cebollini.x,this.cebollini.y,it._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI"),this.cebollini2.visible=!1,this.caught=!1,this.foodPlaced=!1,this.hover=!1,this.cookingPot=K.content.addChild(st.q.instance.prodigy.create.sprite(740,234,it._.Zone_bonfire_json,"pot")),this.cookingPot.anchor.set(.5,1),this.cookingPot.inputEnabled=!0,this.cookingPot.events.onInputDown.add((()=>{this.potClick(q,K)})),this.cookingPotHighlight=wn.o.highlightObjectOnLayer(q,810,130,null,K.content),z.toggleDynamicLayer(q,5,!0,0),this.visionCone=K.background.addChild(st.q.instance.prodigy.create.sprite(this.cebollini.x,this.cebollini.y-25,it._.Zone_bonfire_json,"visioncone")),this.visionCone.scale.set(2,2),this.visionCone.anchor.set(.5,.5),this.visionCone.smoothed=!0,this.button=K.content.addChild(st.q.instance.prodigy.create.sprite(K.user.x-40,K.user.y-200,it._.General_icons_json,"icon-base-active")),this.button.inputEnabled=!0,this.button.events.onInputDown.add((()=>{this.hideButtonClick(q,K)}),this),this.buttonIcon=K.content.addChild(st.q.instance.prodigy.create.sprite(K.user.x-40,K.user.y-200,it._.Zone_bonfire_json,"cauldron-icon")),this.button.events.onInputOver.add((()=>{this.hover=!0})),this.button.events.onInputOut.add((()=>{this.hover=!1})),this.pot=K.content.addChild(st.q.instance.prodigy.create.sprite(K.user.x,K.user.y,it._.Zone_bonfire_json,"cauldron")),this.pot.anchor.set(.5,1),this.pot.visible=!1,{enableMonsters:!1})}start(q,K,z){return super.start(q,K,z),"E6"!==z.getTag()||this.zone.isQuestComplete(5)||(this.tutorial(q),this.cebollini.patrol([{x:920,y:260},{x:680,y:400},{x:930,y:450},{x:790,y:300},{x:720,y:490},{x:640,y:300}],.5)),null}update(q,K,z){if("E6"===z.getTag())if(this.zone.isQuestComplete(5))X.Aq$.isDefined(this.visionCone)&&(this.visionCone.visible=!1,delete this.visionCone,X.Aq$.isDefined(this.button)&&this.button.destroy(),X.Aq$.isDefined(this.buttonIcon)&&this.buttonIcon.destroy());else{this.button.x=K.user.x-40,this.button.y=K.user.y-200,this.hover?this.buttonIcon.y=K.user.y-190:this.buttonIcon.y=K.user.y-187,this.buttonIcon.x=K.user.x-27,this.caught?this.visionCone.visible=!1:(this.visionCone.visible=!0,this.visionCone.x=this.cebollini.x,this.visionCone.y=this.cebollini.y-25),this.pot.x===K.user.x&&this.pot.y===K.user.y||(this.pot.visible=!1,this.button.visible=!0,this.buttonIcon.visible=!0,K.user.visible=!0,this.pot.x=K.user.x,this.pot.y=K.user.y);const z=(K.user.x-(this.cebollini.x-5))*(K.user.x-(this.cebollini.x-5))+(K.user.y-(this.cebollini.y-25))*(K.user.y-(this.cebollini.y-25));if(this.caught&&(this.foodPlaced||(this.cebollini.visible=!1,this.cebollini2.visible||(this.cebollini2.scale.x=this.cebollini.scale.x,this.cebollini2.x=this.cebollini.x,this.cebollini2.y=this.cebollini.y,this.cebollini2.visible=!0)),this.visionCone.visible=!1),z<22500&&!this.pot.visible&&!this.caught&&(this.caught=!0,!this.foodPlaced)){const z=new Ni.rD(q);q.input.enabled=!1,K.user.setValidPath(K.path,K.user.x,K.user.y,null),q.input.enabled=!0,z.addEvents([{dialogueData:z.dataProvider.getLegacy("cebollini",0),blockInput:!0},{callback:()=>{st.q.instance.prodigy.world.it("bonfire_spire-E6")}}]),z.start()}}}tutorial(q){if(!X.Aq$.isDefined(this.zone.getState("minigametut"))){this.zone.setState("minigametut",1);const q=st.q.instance.prodigy.event.create();q.text(112,"noot"),q.text(113,"noot"),q.text(114,"noot"),q.text(115,"noot"),q.text(116,"noot"),q.start()}}hideButtonClick(q,K){if(!this.caught){const q=st.q.instance.prodigy.event.create();q.validPath(K.user,K.path,K.user.x,K.user.y),q.delay(50),q.function(st.q.instance.prodigy.audio.playSFX.bind(st.q.instance.prodigy.audio,18,"pop")),q.set(this.pot,"visible",!0),q.set(K.user,"visible",!1),q.set(this.button,"visible",!1),q.set(this.buttonIcon,"visible",!1),q.enableInput(!0),q.start()}}potClick(q,K){if(!this.foodPlaced){const q=st.q.instance.prodigy.event.create(),z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q.validPath(K.user,K.path,700,240),q.enableInput(!1),q.set(this.food,"visible",!0),q.set(this,"foodPlaced",!0),q.set(this.button,"visible",!1),q.set(this.buttonIcon,"visible",!1),q.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,this.food,"+50","-200","+100",2e3,!0,!0)),q.function(this.cookingPotHighlight.destroy.bind(this.cookingPotHighlight)),q.delay(2350),q.sound(9,"plop"),q.sound(9,"cooking"),q.enableInput(!0),q.function(z.backpack.consume.bind(z.backpack,"item",88,1)),q.function(this.zone.completeSequence.bind(this.zone,5,0)),q.function(K.process.bind(K)),q.start()}}}class wS extends jn.T{constructor(q,K,z){super(q,K.concat(ht.c.Sfx_bonfire_spire_q6_and_q14),6,"QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",{type:"seq",N:1},["bonfire_spire-D5"],[524,525],[],[509],z)}start(q,K,z){if(super.start(q,K,z),"D5"===z.getTag()&&this.zone.isOnSequence(6,0)){const Y=K.foreground.addChild(st.q.instance.prodigy.create.sprite(690,250,it._.Zone_bonfire_json,"food"));Y.visible=!1;const Q=z.addConstructedNPC(q,K,720,490,"npc-sprite-worker-slime-red",null,"NPC_NAME_WORKER_SLIME"),X=z.addConstructedNPC(q,K,500,330,it._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI",K.foreground),Z=st.q.instance.prodigy.event.create();Z.text(0,"slime_guard"),Z.function((()=>{z.queen.flip()})),Z.enableInput(!1),Z.path(Q,[{x:730,y:350}],1,!0),Z.delay(1e3),Z.enableInput(!0),Z.text(0,"slime_queen"),Z.enableInput(!1),Z.enableInput(!0),Z.text(1,"cebollini"),Z.enableInput(!1),Z.set(Y,"visible",!0),Z.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,Y,"-80","-200","+100",2e3,!0,!0)),Z.delay(2e3),Z.sound(10,"eating"),Z.delay(2e3),Z.enableInput(!0),Z.text(1,"slime_queen"),Z.function((()=>{z.queen.flip()})),Z.text(2,"slime_queen"),Z.enableInput(!1),Z.set(Y,"alpha",1),Z.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,Y,"-90","-50","+150",600,!0,!0)),Z.delay(1e3),Z.enableInput(!0),Z.text(2,"cebollini"),Z.text(),Z.text(3,"slime_queen"),Z.text(4,"slime_queen"),Z.text(),Z.text(3,"cebollini"),Z.enableInput(!1),Z.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"+200","-100","+220",1e3,!1,!0),!0),Z.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"+100","-100","+150",1e3,!1,!0),!0),Z.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"+150","-100","+100",1e3,!1,!0),!0),Z.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"+200","-200","+230",1e3,!1,!0),!0),Z.enableInput(!0),Z.text(4,"cebollini"),Z.enableInput(!1),Z.animation(st.q.instance.prodigy.animation.hop.bind(st.q.instance.prodigy.animation,X,"+60","-100","+200",1e3,!0,!0),!0),Z.enableInput(!0),Z.text(103,"noot"),Z.function(this.zone.completeSequence.bind(z.zone,6,0)),Z.function(K.process.bind(K)),Z.start()}return null}}class TS extends jn.T{constructor(q,K,z){super(q,K,7,"",{type:"item",ID:89,N:3},["bonfire_spire-D1","bonfire_spire-C2","bonfire_spire-D4"],[526,527,528,529,530],[],[509],z,null,"QUESTS_BONFIRE_COLLECT_COOKING_SUPPLIES"),this.collectionMaps={D1:[0],C2:[1],D4:[2]}}setup(q,K,z){super.setup(q,K,z);const Y=z.getTag();return"D1"===Y?K.addCollect(0,640,480,{type:"item",ID:89,showLoading:!1}):"C2"===Y?K.addCollect(1,670,265,{type:"item",ID:89,showLoading:!1}):"D4"===Y&&K.addCollect(2,640,360,{type:"item",ID:89,showLoading:!1}),null}}var SS=z(25308);class AS extends jn.T{constructor(q,K,z){super(q,K.concat(ot.V.Bgm_puppetmaster),7,"",{type:"item",ID:89,N:3},["bonfire_spire-D1","bonfire_spire-C2","bonfire_spire-D4"],[526,527,528,529,530],[],[509],z,null,"QUESTS_BONFIRE_COLLECT_COOKING_SUPPLIES"),this.collectionMaps={D1:[0],C2:[1],D4:[2]}}setup(q,K,z){super.setup(q,K,z);const Y=z.getTag();if("D1"===Y)K.addCollect(0,640,480,{type:"item",ID:89,showLoading:!1});else if("C2"===Y)K.addCollect(1,670,265,{type:"item",ID:89,showLoading:!1});else if("D4"===Y)return z.zone.getState(cf.PIPPET_DEFEATED)||(q.input.enabled=!1,this.addPippetEncounter(z.zone)),(z.zone.getState(cf.PIPPET_REMATCH)||z.zone.getState(cf.PIPPET_DEFEATED))&&K.addCollect(2,640,360,{type:"item",ID:89,showLoading:!1}),{enableMonsters:!1,enableWizards:!1};return null}addPippetEncounter(q){st.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(q,204,SS.e.Bonfire_spire_quests_encounter).catch(X.RQr.createHandler("Error loading Pippet Miniboss Encounter for Bonfire Q7"))}}class CS extends jn.T{constructor(q,K,z){super(q,K,8,"QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",{type:"seq",N:1},["bonfire_spire-C6"],[531,532,533],[],[509],z)}start(q,K,z){if(super.setup(q,K,z),"C6"===z.getTag()&&this.zone.isOnSequence(8,0)){const z=new Ni.rD(q),Y=K.addNPC(430,380,it._.Npc_sprite_slime_guard_json,sa.ac.Guard,null,"NPC_NAME_HANK"),Q=K.addNPC(650,520,it._.Npc_sprite_slime_guard_json,sa.ac.Guard,null,"NPC_NAME_MIKE");Y.animate(),Q.animate(),z.addEvents([{callback:()=>{Y.hop(100,(()=>{Y.hop(100,null,0,20)}),0,20)}},{dialogueData:z.dataProvider.get(502),blockInput:!0},{callback:()=>{Q.hop(100,(()=>{Q.hop(100,null,0,20)}),0,20)}},{dialogueData:z.dataProvider.get(503),blockInput:!0},{callback:()=>{Y.hop(100,(()=>{Y.hop(100,null,0,20)}),0,20)}},{dialogueData:z.dataProvider.get(504),blockInput:!0},{callback:()=>{Q.hop(100,(()=>{Q.hop(100,null,0,20)}),0,20)}},{dialogueData:z.dataProvider.get(505),blockInput:!0},{callback:()=>{this.zone.completeSequence(8,0),K.process()}}]),z.start()}return null}}class OS extends jn.T{constructor(q,K,z){super(q,K.concat(ct.Q.Spine_npc_slimeworker_json),9,"QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",{type:"item",ID:90,N:2},["bonfire_spire-A4"],[534,535],[],[509],z),this.slimeNPCs=[],this.slimeNPCHighlights=[]}setup(q,K,z){super.setup(q,K,z),this.slimeNPCs=[],this.slimeNPCHighlights=[];const Y={encounter:[{ID:48}],ignorePathfindingForAlert:!0,difficulty:4,maxTeamSize:1};if("A4"===z.getTag()){const Q=70,Z=-120;if(this.zone.getState("turnip1"))this.slimeNPCs[0]=new hT.p(q,"NPC_NAME_WORKER_SLIME",496,sa.ac.Guard,K.content,825,205,"idle-no-turnip");else{this.slimeNPCs.push(new hT.p(q,"NPC_NAME_WORKER_SLIME",496,sa.ac.Guard,K.content,825,205,"idle")),this.slimeNPCs[0].onClick.add((()=>{this.interactSlime(q,K,0)}),this),this.slimeNPCHighlights[0]=wn.o.highlightObjectOnLayer(q,Q,Z,this.slimeNPCs[0],K.foreground);const J=z.addMonster(q,K,3,935,200,!0,Y);X.Aq$.isDefined(J)&&J.flip()}if(this.zone.getState("turnip2"))this.slimeNPCs[1]=new hT.p(q,"NPC_NAME_WORKER_SLIME",496,sa.ac.Guard,K.content,370,440,"idle-no-turnip");else{this.slimeNPCs.push(new hT.p(q,"NPC_NAME_WORKER_SLIME",496,sa.ac.Guard,K.content,370,440,"idle")),this.slimeNPCs[1].onClick.add((()=>{this.interactSlime(q,K,1)}),this),this.slimeNPCHighlights[1]=wn.o.highlightObjectOnLayer(q,Q,Z,this.slimeNPCs[1],K.content);const J=z.addMonster(q,K,4,480,450,!0,Y);X.Aq$.isDefined(J)&&J.flip()}}return null}start(q,K,z){if("A4"===z.getTag()&&this.zone.isOnSequence(9,0)){this.zone.completeSequence(9,0);const q=st.q.instance.prodigy.event.create();q.text(0,"slime_worker"),q.start()}return null}interactSlime(q,K,z){if(!this.zone.getState(0===z?"turnip1":"turnip2")){const Y=st.q.instance.prodigy.event.create(),Q=this.slimeNPCs[z].x,X=this.slimeNPCs[z].y;Y.validPath(K.user,K.path,Q+81,X),Y.validPath(K.user,K.path,Q+80,X),Y.text(1,"slime_worker"),Y.function((()=>{this.slimeNPCHighlights[z].destroy()})),Y.function((()=>{this.slimeNPCs[z].destroy(),this.slimeNPCs[z]=new hT.p(q,"NPC_NAME_WORKER_SLIME",496,sa.ac.Guard,K.content,Q,X,"idle-no-turnip")})),Y.function((()=>{st.q.instance.prodigy.open.gotItem([{type:"item",ID:90,N:1}],K.process.bind(K))})),Y.function(this.zone.setState.bind(this.zone,0===z?"turnip1":"turnip2",1)),Y.start()}}}class IS extends Cn.b{constructor(q){super(q),this.questManagerIdentifier="065-3d66",this._assets=[],this.name="Bonfire Spire",this.ID=mn.A_.BONFIRE,this.guardian="BONFIRE_GUARDIAN",this.battleBG="battle-bonfire-outside",this.defaultOnFaint="bonfire_spire-B1",this.questHub="bonfire_spire-B1",this.bgmID=14,this.currency=12,this.zoneIndex=AT.P.Bonfire,this.states=["chest1","chest2","chest3","chest4","chest5","chest6","chestGuardian","wizard1","wizard2","lever1","lever2","lever3","turnip1","turnip2","minigametut",cf.PIPPET_ENCOUNTER,cf.PIPPET_REMATCH,cf.PIPPET_DEFEATED];const K=[Gn.t.Tileset_bonfire_png,Gn.t.Tileset_cloud_png,Gn.t.Tileset_cloud_new_png,Gn.t.Tileset_volcano_new_png,Gn.t.Tileset_generic_png,it._.Npc_sprite_wizard_json,it._.Zone_bonfire_json,Gn.t.Tileset_collisions_png,ot.V.Bgm_bonfire_spire],z={map:"bonfire_spire-Titan",cutscene:"bonfire_spire-titanIntro",harvey:{x:240,y:200},sign:{x:150,y:210},catapult:{x:140,y:400,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:400,y:450},battleBG:[br.q.Battle_bonfire_inside_bg,br.q.Battle_bonfire_inside_fg]};this.maps={A1:new KT(this,K),A4:new zT(this,K),B1:new YT(this,K),B2:new QT(this,K),B4:new XT(this,K),B5:new ZT(this,K),C1:new JT(this,K),C2:new tS(this,K),C3:new eS(this,K),C4:new iS(this,K),C6:new sS(this,K),D1:new nS(this,K),D2:new aS(this,K),D3:new rS(this,K),D4:new oS(this,K),D5:new hS(this,K),D6:new cS(this,K),E5:new dS(this,K),E6:new lS(this,K),Titan:new VT(this,K,z)},Promise.all([kf.T.ready,Qt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((q=>{st.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_BONFIRE_SPIRE"],q,"Error, unable to load Bonfire Spire Zone Rewards JSON")})),this.scenes={titanIntro:new RT(this,[Gn.t.Tileset_interior_general_png,Gn.t.Tileset_wall_collisions_png,ot.V.Bgm_tutorial])}}setZoneRewards(){const q=[Gn.t.Tileset_bonfire_png,Gn.t.Tileset_cloud_png,Gn.t.Tileset_cloud_new_png,Gn.t.Tileset_volcano_new_png,Gn.t.Tileset_generic_png,it._.Npc_sprite_wizard_json,it._.Zone_bonfire_json,Gn.t.Tileset_collisions_png,ot.V.Bgm_bonfire_spire],K=(0,DT.mg)(Qt.R.loadData(Yt.r.ZoneRewardsBonfireSpire_json));this.quests={1:new uS(this,q,K.quests.BonfireSpireQ1),2:new mS(this,q,K.quests.BonfireSpireQ2),3:new yS(this,q,K.quests.BonfireSpireQ3),4:new _S(this,q,K.quests.BonfireSpireQ4),5:new ES(this,[],K.quests.BonfireSpireQ5),6:new wS(this,[],K.quests.BonfireSpireQ6),7:uf.arePippetQuestEncountersEnabled?new AS(this,q,K.quests.BonfireSpireQ7):new TS(this,q,K.quests.BonfireSpireQ7),8:new CS(this,q,K.quests.BonfireSpireQ8),9:new OS(this,q,K.quests.BonfireSpireQ9),10:new fS(this,q,K.quests.BonfireSpireQ10),11:new bS(this,q,K.quests.BonfireSpireQ11),12:new pS(this,q,K.quests.BonfireSpireQ12),13:new vS(this,q,K.quests.BonfireSpireQ13),14:new gS(this,[],K.quests.BonfireSpireQ14)}}start(q,K,z){super.start(q,K,z),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}processLeverRequirements(q,K,z){this.enableLeverElement(!1);const Y=this.getCurrentQuest();let Q,Z;for(let tt=0;tt<3;tt++){const q=this.getState(`lever${tt+1}`);if(X.Aq$.isDefined(z[tt])&&z[tt]!==q){Q=tt+1,X.VyI.log(`Required Lever: lever${Q}`,X.$bb.Verbose);break}}let J="QUESTS_BONFIRE_SPIRE_PULL_LEVER";switch(Q){case 1:Z=["bonfire_spire-D1"],this.highlightLever(q,K,"D1",960,203);break;case 2:Z=["bonfire_spire-C2"],this.highlightLever(q,K,"C2",320,80);break;case 3:Z=["bonfire_spire-D4"],this.highlightLever(q,K,"D4",1080,190);break;default:J=Y.descCacheKey,Z=Y.areaCache}Y.area!==Z&&(Y.area=Z,Y.descKey=J,X.Aq$.isDefined(this.toggle)&&this.toggle&&(this.toggle=!1,X.VyI.log("Toggled",X.$bb.Verbose),q.process())),X.VyI.log(`Quest Target Area: ${String(Y.area)}`,X.$bb.Verbose)}enableLeverElement(q){X.Aq$.isDefined(this.leverGuideHand)&&(this.leverGuideHand.visible=q)}highlightLever(q,K,z,Y,Q){K.getTag()===z&&(this.leverGuideHand=wn.o.highlightObjectOnLayer(this.game,Y,Q,null,q.content),this.enableLeverElement(!0))}isLeverLocked(q){return!(this.getCurrentQuestID()>14)&&1===this.getState(`lever${q+1}`)}toggleLever(q,K,z,Y){if(this.isLeverLocked(K))this.sendSegmentEvents("World Object Failed",{object_type:sa.u_.LeverSwitch,fail_reason:sa.kN.QuestNotComplete});else{const Q=st.q.instance.prodigy.event.create();Q.validPath(q.user,q.path,Y.x,Y.y,!1),Q.function(this.faceLever.bind(this,q)),Q.enableInput(!1),Q.function(this.bonfireSetStates.bind(this,z,K)),Q.shake(0,3e3,10,"v"),Q.enableInput(!0),Q.function(q.process.bind(q)),Q.start(),this.sendSegmentEvents("World Object Used",{object_type:sa.u_.LeverSwitch})}}faceLever(q){q.user.isFacingLeft()&&q.user.flip()}bonfireSetStates(q,K){const z=1!==this.getState(`lever${K+1}`),Y=z?K+1:K;this.setState("lever1",null),this.setState("lever2",null),this.setState("lever3",null);for(let Q=0;Q0;q.enableLayerID(0,!Y),q.enableLayerID(1,Y&&!Q),q.enableLayerID(2,Y)}}cleanup(){this.leverGuideHand&&(this.leverGuideHand.destroy(),this.leverGuideHand=null),super.cleanup()}sendSegmentEvents(q,K){const z=st.q.instance.prodigy.gameContainer.get("20f-5f67");switch(q){case"World Object Discovered":z.gameWorld.sendWorldObjectDiscoveredEvent(K);break;case"World Object Used":z.gameWorld.sendWorldObjectUsedEvent(K);break;case"World Object Failed":z.gameWorld.sendWorldObjectUsedFailedEvent(K)}}}class DS extends qT{constructor(q,K){super(q,"A1","MAP_BONFIRE_SPIRE_VOLCANO_ENTRANCE",865,482,["bonfire_spire_hard-B1"],K),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}}class RS extends qT{constructor(q,K){super(q,"A4","MAP_BONFIRE_SPIRE_PITFALL_TERRACE",1020,400,["bonfire_spire_hard-B4"],K.concat(it._.Npc_sprite_slime_worker_json)),this.wasInsideTriggerLastFrame=!1,this.leverNumber=3,this.battleBG="battle-bonfire-outside"}}class PS extends qT{constructor(q,K){super(q,"B1","MAP_BONFIRE_SPIRE_VOLCANO_VILLAGE",160,307,["bonfire_spire_hard-C1","bonfire_spire_hard-B2","bonfire_spire_hard-A1"],K.concat([it._.Npc_sprite_slurpy_json,it._.Npc_sprite_slime_queen_json,it._.Npc_sprite_slime_guard_json,it._.Npc_sprite_merchant_json,ct.Q.Spine_npc_slurpy_json])),this.questNPC=null,this.leverNumber=1,this.battleBG="battle-bonfire-inside"}}class MS extends qT{constructor(q,K){super(q,"B2","MAP_BONFIRE_SPIRE_VOLCANIC_CAVERN",180,117.5,["bonfire_spire_hard-B1","bonfire_spire_hard-C3","bonfire_spire_hard-B4"],K),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class NS extends qT{constructor(q,K){super(q,"B4","MAP_BONFIRE_SPIRE_VOLCANO_JUNCTION",1080,117.5,["bonfire_spire_hard-A4","bonfire_spire_hard-B2","bonfire_spire_hard-C4","bonfire_spire_hard-B5"],K),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}}class xS extends qT{constructor(q,K){super(q,"B5","MAP_BONFIRE_SPIRE_RED_HOT_RIVER",150,210,["bonfire_spire_hard-B4","bonfire_spire_hard-C6"],K),this.battleBG="battle-bonfire-inside"}}class LS extends qT{constructor(q,K){super(q,"C1","MAP_BONFIRE_SPIRE_FIREWATCH_ROAD",180,417.5,["bonfire_spire_hard-D1","bonfire_spire_hard-D2","bonfire_spire_hard-B1"],K),this.leverNumber=1,this.battleBG="battle-bonfire-inside"}}class kS extends qT{constructor(q,K){super(q,"C2","MAP_BONFIRE_SPIRE_PALM_PATH",1100,597.5,["bonfire_spire_hard-C3"],K),this.leverNumber=2,this.battleBG="battle-bonfire-outside"}}class BS extends qT{constructor(q,K){super(q,"C3","MAP_BONFIRE_SPIRE_SLIME_SHANTY",160,417.5,["bonfire_spire_hard-C2","bonfire_spire_hard-D3","bonfire_spire_hard-B2"],K),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class US extends qT{constructor(q,K){super(q,"C4","MAP_BONFIRE_SPIRE_LAVA_PITS",110,397.5,["bonfire_spire_hard-D4","bonfire_spire_hard-B4"],K),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}}class FS extends qT{constructor(q,K){super(q,"C6","MAP_BONFIRE_SPIRE_THRONE_ROOM_ENTRANCE",250,400,["bonfire_spire_hard-D5","bonfire_spire_hard-D6","bonfire_spire_hard-B5"],K.concat([it._.Npc_sprite_cebollini_json,it._.Npc_sprite_slime_guard_json])),this.battleBG="battle-bonfire-lava"}}class GS extends qT{constructor(q,K){super(q,"D1","MAP_BONFIRE_SPIRE_PALM_TERRACE",260,382.5,["bonfire_spire_hard-C1"],K),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}}class jS extends qT{constructor(q,K){super(q,"D2","MAP_BONFIRE_SPIRE_VOLCANIC_SANCTUM",180,292.5,["bonfire_spire_hard-C1"],K),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class $S extends qT{constructor(q,K){super(q,"D3","MAP_BONFIRE_SPIRE_MOLTEN_ENCLAVE",180,377.5,["bonfire_spire_hard-C3"],K),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class HS extends qT{constructor(q,K){super(q,"D4","MAP_BONFIRE_SPIRE_OUTER_SLIMEBURBIA",220,467.5,["bonfire_spire_hard-C4"],K.concat([it._.Zone_lamplight_json])),this.leverNumber=3,this.battleBG="battle-bonfire-outside"}}class VS extends qT{constructor(q,K){super(q,"D5","MAP_BONFIRE_SPIRE_THRONE_ROOM",220,480,["bonfire_spire_hard-E6","bonfire_spire_hard-C6"],K.concat([it._.Npc_sprite_slurpy_json,it._.Npc_sprite_cebollini_json,it._.Npc_sprite_slime_worker_json,ct.Q.Spine_npc_slimeguard_json,ct.Q.Spine_npc_slimequeen_json])),this.queen=null,this.gaurd=null,this.battleBG="battle-bonfire-inside"}}class WS extends qT{constructor(q,K){super(q,"D6","MAP_BONFIRE_SPIRE_GARDEN_GETAWAY",330,510,["bonfire_spire_hard-C6"],K.concat([it._.Zone_lamplight_json,it._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-lava"}}class qS extends qT{constructor(q,K){super(q,"E5","MAP_BONFIRE_SPIRE_FIERY_ALCOVE",115,510,["bonfire_spire_hard-E6"],K.concat([it._.Zone_lamplight_json])),this.battleBG="battle-bonfire-inside"}}class KS extends qT{constructor(q,K){super(q,"E6","MAP_BONFIRE_SPIRE_ROYAL_KITCHEN",180,547.5,["bonfire_spire_hard-E5","bonfire_spire_hard-D5"],K.concat([it._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-inside"}}class zS extends IS{constructor(q){super(q),this._assets=[Gn.t.Tileset_bonfire_png,Gn.t.Tileset_cloud_png,Gn.t.Tileset_cloud_new_png,Gn.t.Tileset_volcano_new_png,Gn.t.Tileset_generic_png,it._.Npc_sprite_wizard_json,it._.Zone_bonfire_json,Gn.t.Tileset_collisions_png,ot.V.Bgm_bonfire_spire],this.questManagerIdentifier="e79-858c",this.ID=mn.A_.BONFIREHARD,this.defaultOnFaint="bonfire_spire_hard-B1",this.questHub="bonfire_spire_hard-B1",this.zoneIndex=AT.P.BonfireHard,this.difficultyMode=vi.i.Hard,this.states=["chest1","chest2","chest3","chest4","chest5","chest6","chestGuardian","wizard1","wizard2","lever1","lever2","lever3","turnip1","turnip2","minigametut",cf.PIPPET_ENCOUNTER,cf.PIPPET_REMATCH,cf.PIPPET_DEFEATED],this.monsters=[],this.maps={A1:new DS(this,this._assets),A4:new RS(this,this._assets),B1:new PS(this,this._assets),B2:new MS(this,this._assets),B4:new NS(this,this._assets),B5:new xS(this,this._assets),C1:new LS(this,this._assets),C2:new kS(this,this._assets),C3:new BS(this,this._assets),C4:new US(this,this._assets),C6:new FS(this,this._assets),D1:new GS(this,this._assets),D2:new jS(this,this._assets),D3:new $S(this,this._assets),D4:new HS(this,this._assets),D5:new VS(this,this._assets),D6:new WS(this,this._assets),E5:new qS(this,this._assets),E6:new KS(this,this._assets)},this.scenes={}}}var YS=z(83668);class QS extends zn.T{constructor(q,K){super(q,"DungeonHub","MAP_SHIVERCHILL_DUNGEON_HUB",810,480,[],K.concat([Gn.t.Tileset_icecave_new_png,Gn.t.Tileset_collisions_png,ot.V.Bgm_icedungeon_inside,Gn.t.Tileset_generic_snow_png,it._.General_core_json])),this._menuIsOpen=!1}cleanup(){super.cleanup(),X.wa5.destroyActiveScene()}setup(q,K,z){super.setup(q,K,{});const Y=X.wa5.getActiveScene().container,Q=st.q.instance.prodigy,Z=Q.gameContainer.get("ad2-c5b2").player.state.getDungeonState(YS.o,"crystal_caverns");Y.bind("DungeonState").toConstantValue(Z),Y.bind(X.t5G.AssetLoader).toConstantValue(Q.gameContainer.get(X.t5G.AssetLoader)),Y.bind("ad2-c5b2").toConstantValue(Q.gameContainer.get("ad2-c5b2")),Y.bind("Localization").toConstantValue(Q.gameContainer.get(X.$Bt.LocalizationService)),this._menuIsOpen=!1,st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer.sprites.scale.x=-1,this.screen.addClickableArea(100,50,200,150,(()=>{this.caveClicked()}));const J=this.screen.background.addChild(st.q.instance.prodigy.create.sprite(0,0,it._.General_core_json,"area-pointer"));J.events.onInputDown.add(this.caveClicked,this),J.inputEnabled=!0,J.position.set(180,180),this.game.add.tween(J,this).to({y:J.y+25},400,X.GS3.Quadratic.InOut,!0,0,-1,!0)}caveClicked(){this._menuIsOpen||(this._menuIsOpen=!0,this.isRenderingToCanvas()?this.showDeviceWarning():this.showAdventureMap())}isRenderingToCanvas(){return X.W$e.instance.game.renderer.type===tt.RENDERER_TYPE.CANVAS}showDeviceWarning(){const q=new Sd.Z("BUTTON_OKAY_CAPITAL",this.showAdventureMap.bind(this),cd.E.Medium,500,"WARNING","WARNING_DEVICE_PERFORMANCE_CRYSTAL_CAVERNS",void 0,void 0,void 0,Pi.l.ErrorDialogHeader);st.q.instance.prodigy.open.informationDialog(q)}showAdventureMap(){const q=st.q.instance.prodigy,K=q.gameContainer.get("ad2-c5b2").player.state.getDungeonState(YS.o,"crystal_caverns");this._menuIsOpen=!0,q.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_DUNGEONS,En.B.BREADCRUMB_STARTED_CRYSTAL_CAVERNS);const z=K.isRunStarted();z&&K.isValid()?q.open.adventureContinueRestart((()=>{this._menuIsOpen=!1})):(z&&K.resetRunData(),q.open.adventureMap(!1,(()=>{this._menuIsOpen=!1})))}}class XS extends Cn.b{constructor(q){super(q),this.name="Crystal Caverns",this.ID=mn.A_.CRYSTALCAVERNS,this.battleBG="battle-shiverchill-inside",this.questHub="crystal_caverns-DungeonHub",this.bgmID=32,this.currency=15,this.zoneIndex=AT.P.None,this.maps={1:Pi.l.CrystalCaverns_Phase1,2:Pi.l.CrystalCaverns_Phase2,3:Pi.l.CrystalCaverns_Phase3,DungeonHub:new QS(this,[])}}teleport(q,K,z,Y,Q){st.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableCrystalCaverns",!0)?"DungeonHub"===q?super.teleport(q,K,z,Y,Q):this.teleportPrefabScene(q,K,z,Y):st.q.instance.prodigy.world.it(eP.DEFAULT_ZONE)}sendCrystalCavernsSpawnEvent(){const q=st.q.instance.prodigy.gameContainer,K=q.get("20f-5f67"),z=q.get("ad2-c5b2").player;K.playerMovementAndDiscovery.sendCrystalCavernsEnteredEvent(_n.W5.Spawn),z.kennel.petTeam.forEach((q=>{q&&K.playerMovementAndDiscovery.sendCrystalCavernsParticipantsEvent({name:q.getName()===z.getName()?"Player":q.getName(),type:q.getElement(),health:q.getCurrentHearts()})}))}getOnFaintData(){return{mapKey:st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.getDungeonState(YS.o,"crystal_caverns").getCurrentMap()}}}class ZS{}ZS.FLOOR_MAXIMUM=100;class JS extends zn.T{constructor(q,K){super(q,"A1","MAP_DARK_TOWER_ENTRANCE",200,400,["darktower-A2"],K)}setup(q,K,z={}){super.setup(q,K,z),new NT(q,K.content,900,360,{name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_MIRA_SHADE"),atlasGuid:it._.Npc_sprite_mira_json},(()=>{this.openTower()}));const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(Nn.J.shouldSuppressAd(Y)&&Y.isBlockedByDarkTowerMemberGate()){const q=st.q.instance.prodigy.create.sprite(900,184,it._.Ui_icons_json,"icon-medium-lockglow");q.anchor=new tt.Point(.5,.5),this.screen.background.addChild(q),q.inputEnabled=!0,q.events.onInputDown.add((()=>{this.openTower()}))}this.zone.bgmID=3,Y.heal()}openTower(){const q=st.q.instance.prodigy.gameContainer,K=q.get(X.$Bt.LocalizationService),z=q.get("ad2-c5b2").player;let Y=z.getTowerProgress();if(Y=Y-Y%5+1,Y>ZS.FLOOR_MAXIMUM&&(Y=ZS.FLOOR_MAXIMUM),z.isBlockedByDarkTowerMemberGate()){const K={conversionFunnelName:xn.o.FunnelEnterDarkTower,conversionFunnelMetadata:"towerBase"},z=Nn.J.showYouTubeMembershipAd(this.game,!0)?Rn.R.Video:Rn.R.Static,Y=q.get("ad2-c5b2").player;this.segment.purchase.sendFunnelStart({type:"Enter-Dark-Tower",category:"Zone-Lock",contentId:void 0,adType:z}),Nn.J.shouldSuppressAd(Y)?st.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:900,yPosition:165,arrowXRelPos:.6,arrowDirection:Kr.i.DOWN}):st.q.instance.prodigy.open.membershipInfo(null,K)}else{const q=st.q.instance.prodigy.dialogue.create();if(0===z.getTowerProgress()){for(let z=1;z<6;z++)q.setText(Object.assign(Object.assign({},JS.DIALOGUE[z]),{text:K.getText(JS.DIALOGUE[z].textKey)}));q.setText({text:K.getText("TOWER_PROMPT_START",Y),face:0,yes:this.changeTeam.bind(this,Y,void 0),audio:JS.AUDIO[0],type:Ni.fA.START})}else if(z.getTowerProgress()>99)for(let z=6;z<8;z++)q.setText(Object.assign(Object.assign({},JS.DIALOGUE[z]),{text:K.getText(JS.DIALOGUE[z].textKey)}));else q.setText({text:K.getText("TOWER_PROMPT_START_GOLD",Y),face:0,yes:()=>{this.changeTeam(Y,500)},audio:JS.AUDIO[0],type:Ni.fA.START});q.startDeprecated("mira")}}changeTeam(q,K){let z=!0;const Y=st.q.instance.prodigy.gameContainer,Q=Y.get("ad2-c5b2").player;if(X.Aq$.isDefined(K))if(Q.getGold()>=K)Q.changeGold(-500);else{const q=st.q.instance.prodigy.dialogue.create(),K={conversionFunnelName:xn.o.FunnelEnterDarkTower,conversionFunnelMetadata:"insufficientCurrency"};if(!Q.hasMembership()){const q=Nn.J.showYouTubeMembershipAd(this.game,!0)?Rn.R.Video:Rn.R.Static;this.segment.purchase.sendFunnelStart({type:"Enter-Dark-Tower-Insufficient-Currency",category:"Deprecate",contentId:void 0,adType:q})}const Z=Q.hasMembership()||Nn.J.shouldSuppressAd(Q)?null:st.q.instance.prodigy.open.membershipInfo.bind(st.q.instance.prodigy.open,null,K);q.setText(Object.assign(Object.assign({},JS.DIALOGUE[8]),{text:Y.get(X.$Bt.LocalizationService).getText(JS.DIALOGUE[8].textKey)})),q.startDeprecated("mira",null,Z),z=!1}z&&this.toFloor(q,!0)}toFloor(q,K){if(!K)return;const z=q<100?"A2":"A3";this.zone.maps[z].floor=q,this.zone.maps[z].updateZoneNameFromCurrentFloor(),this.zone.maps[z].cleared=!1,st.q.instance.prodigy.world.it(`darktower-${z}`,260,550),this.zone.maps[z].sendSegmentEvent("Tower Run Started"),this.zone.maps[z].sendSegmentEvent("Tower Floor Started")}}JS.AUDIO=[{tag:ht.c.Voice_2,s:0,d:1}],JS.DIALOGUE=[{textKey:"DIALOGUE_MIRA_0",face:0,anim:4,audio:{tag:ht.c.Voice_2,s:0,d:1}},{textKey:"DIALOGUE_MIRA_1",face:0,anim:4,audio:{tag:ht.c.Voice_2,s:4,d:2}},{textKey:"DIALOGUE_MIRA_2",face:2,audio:{tag:ht.c.Voice_2,s:9,d:1}},{textKey:"DIALOGUE_MIRA_3",face:2},{textKey:"DIALOGUE_MIRA_4",face:1,anim:4,audio:{tag:ht.c.Voice_2,s:0,d:1}},{textKey:"DIALOGUE_MIRA_5",face:2,audio:{tag:ht.c.Voice_2,s:3,d:1}},{textKey:"DIALOGUE_MIRA_6",face:0,anim:4,audio:{tag:ht.c.Voice_2,s:4,d:2}},{textKey:"DIALOGUE_MIRA_7",face:0},{textKey:"DIALOGUE_MIRA_8",face:0,anim:1,audio:{tag:ht.c.Voice_2,s:0,d:1}}];class tA extends Lr.H{constructor(q,K,z,Y,Q){super(q,z),this.callback=null,this.mods=null,this.callback=Q,this.mods=Y,this.game.input.enabled=!1,K.user.setValidPath(K.path,K.user.x,K.user.y),st.q.instance.prodigy.effects.flashText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TOWER_CHANCE_WHEEL"),(()=>{this.createWheel()}))}close(){st.q.instance.prodigy.notifications.startTimer(!0),this.game.input.enabled=!0;this.game.add.tween(this,this).to({alpha:0},1e3,X.GS3.Linear.None).start().onTweenComplete.addOnce(this.callback,this)}createWheel(){st.q.instance.prodigy.notifications.clearNotifications(!0),this.game.broadcaster.broadcast(gi.Y1.HideHUD,gi.HG.HUD,[]);const q=st.q.instance.prodigy.create.sprite(0,0,it._.General_core_json,"overlay-small");q.width=this.game.world.width,q.height=this.game.world.height,q.alpha=.5,this.add(q),q.inputEnabled=!0;const K=this.game.width,z=this.game.height,Y=st.q.instance.prodigy.create.sprite((K-490)/2,z/2-275,it._.Zone_tower_json,"wings");Y.alpha=0,this.add(Y),this.game.add.tween(Y,this).to({alpha:1},300,X.GS3.Quadratic.Out).delay(600).start();const Q=st.q.instance.prodigy.create.sprite(K/2,z/2,it._.Zone_tower_json,"wheel");Q.anchor.set(.5,.5),Q.scale.x=Q.scale.y=0,this.add(Q),this.game.add.tween(Q.scale,this).to({x:1.2,y:1.2},400,X.GS3.Quadratic.Out).to({x:1,y:1},200,X.GS3.Quadratic.In).start();const Z=st.q.instance.prodigy.create.sprite((K-196)/2,z/2-270,it._.Zone_tower_json,"pointer");Z.alpha=0,this.add(Z);this.game.add.tween(Z,this).to({alpha:1},300,X.GS3.Quadratic.Out).delay(600).start().onTweenComplete.addOnce((()=>{this.startWheel(Q)}),this)}startWheel(q){let K=Math.floor(10*Math.random());const z=36*K+18;this.game.add.tween(q,this).to({angle:2880-z},8e3,X.GS3.Cubic.Out).start().onTweenComplete.addOnce(this.showResult.bind(this,K),this),this.playSound(8e3,100),st.q.instance.prodigy.gameContainer.get("20f-5f67").economy.sendPrizeWheelSpunEvent(In.U.PrizeWheel)}showResult(q){this.mods.revampRouletteNumber=q;let K="",z=0;const Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);0===q||6===q?(K=Y.getText("TOWER_CHANCE_LOSE_HEARTS","10%"),z=-.1):1===q||5===q?(K=Y.getText("TOWER_CHANCE_GAIN_HEARTS","10%"),z=.1):2===q?(K=Y.getText("TOWER_CHANCE_LOSE_HEARTS","20%"),z=-.2):7===q?(K=Y.getText("TOWER_CHANCE_GAIN_HEARTS","20%"),z=.2):3===q?(K=Y.getText("TOWER_CHANCE_DAMAGE_INCREASED"),this.mods.dmgMod=.2):8===q?(K=Y.getText("TOWER_CHANCE_DAMAGE_REDUCED"),this.mods.dmgMod=-.2):9===q?(K=Y.getText("TOWER_CHANCE_DOUBLE_STARS"),this.mods.starMod=2):4===q&&(K=Y.getText("TOWER_CHANCE_REDUCED_ORDER"));const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.petTeam;for(let Z=0;Z0&&(Q[Z].changeCurrentHeartsPercent(z),Q[Z].getCurrentHearts()<=0&&Q[Z].changeCurrentHeartsPercent(.1));st.q.instance.prodigy.effects.flashText(K,(()=>{this.close()}))}playSound(q,K){if(q<=0||!X.Aq$.isDefined(this.game))return;st.q.instance.prodigy.audio.playSFX(19,"tick");const z=K+9e-7*Math.pow(K,3);setTimeout(this.playSound.bind(this,q-z,z),K)}}class eA extends zn.T{constructor(q,K,z,Y,Q,X,Z){super(q,K,z,Y,Q,X,Z.concat([Pi.l.Overlay_difficulty_hard,Pi.l.Overlay_difficulty_expert])),this.floor=void 0,this.cleared=!1,this.exitAreaEvent=null,this.ball=null,this.lockSprite=null,this.mods=null,this._floorsComplete=0}init(q,K,z,Y){const Q=this.floor%5==0;return this.enableLayerID(0,Q),this.enableLayerID(1,!Q),this.enableLayerID(2,Q&&!this.cleared),this.enableLayerID(3,!Q&&!this.cleared),this.enableLayerID(4,Q&&this.cleared),this.enableLayerID(5,!Q&&this.cleared),super.init(q,K,z,Y)}cleanup(){this.ball&&(this.ball.destroy(),this.ball=null),this.lockSprite&&(this.lockSprite.destroy(),this.lockSprite=null),this.mods=null,super.cleanup()}setup(q,K,z={}){super.setup(q,K,z),this.zone.bgmID=4;let Y=this.isOnTopFloorAndNotComplete();const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let Z=!1;if(this.cleared){let z=!1;for(let q=0;q{this.onFloorComplete()}),null,"dark-tower")}),q.startDeprecated("mira"),z=!0}}z||this.onFloorComplete(),Nn.J.shouldSuppressAd(Q)&&this.floor===te.s.get("GameConstants.Tower.MAX_FREE_MEMBER_FLOOR")?Z=!0:this.floor{this.toFloor(this.floor+1)}),WT.K.UP)}else if(this.floor{this.blockDoor()})),z.alpha=.8,this.game.add.tween(z,this).to({alpha:.3},1500,X.GS3.Linear.None,!0,0,1e4,!0),K.background.addChild(z),Y.inputEnabled=!0,Y.events.onInputDown.add((()=>{this.blockDoor()})),Y.alpha=.8,this.game.add.tween(Y,this).to({alpha:.3},1500,X.GS3.Linear.None,!0,0,1e4,!0),K.background.addChild(Y)}if(this.floor%5==0){let q={x:810,y:600};if(this.floor{this.onMiraClick(K)})).highlight(Y,-80,-150)}if(Nn.J.shouldSuppressAd(Q)&&this.floor===te.s.get("GameConstants.Tower.MAX_FREE_MEMBER_FLOOR")){this.lockSprite=st.q.instance.prodigy.create.sprite(900,164,it._.Ui_icons_json,"icon-medium-lockglow");const q=st.q.instance.prodigy.create.image(0,0,void 0,0,tt.Texture.WHITE);q.x=850,q.y=65,q.width=100,q.height=175,q.alpha=0,q.inputEnabled=Z,this.screen.background.addChild(q),this.lockSprite.anchor.set(.5,.5),this.screen.background.addChild(this.lockSprite),q.events.onInputDown.add((()=>this.nonMemberTeleportToEntrance()))}}handleLeaving(q){if(this.game){let K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getTowerProgress();K=K-K%5+1;const z=st.q.instance.prodigy.dialogue.create();z.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(K{q()},preserveNextEvent:!0}),z.startDeprecated("mira")}else X.VyI.log("handleLeaving called after DarktowerMap has been destroyed",X.$bb.Warning)}toBase(){let q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getTowerProgress();if(q=q-q%5+1,q{this.onLeavingDarkTower(850,380)},no:()=>{this.moveAbove()}}),K.startDeprecated("mira")}else st.q.instance.prodigy.world.it("darktower-A1",850,380)}updateZoneNameFromCurrentFloor(){this.zoneName=`darktower-${this.floor0&&(this._floorsComplete=0),X.Aq$.isDefined(q)&&X.Aq$.isDefined(K)&&st.q.instance.prodigy.world.it("darktower-A1",q,K),this.sendSegmentEvent("Tower Run Completed")}isOnTopFloorAndNotComplete(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return this.floor===ZS.FLOOR_MAXIMUM&&q.getTowerProgress(){q.isBlockedByDarkTowerMemberGate()&&st.q.instance.prodigy.world.it("darktower-A1",200,400)}),K),this._floorsComplete++,this.floor===ZS.FLOOR_MAXIMUM&&this.sendSegmentEvent("Tower Run Completed")}blockDoor(){const q=st.q.instance.prodigy.dialogue.create();q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TOWER_PROMPT_MUST_DEFEAT"),face:3,anim:1,audio:nA.AUDIO[1]}),q.startDeprecated("mira")}nonMemberTeleportToEntrance(){const q=new Ni.rD(this.game);q.addEvents([{dialogueData:q.dataProvider.get(1028),blockInput:!0},{callback:()=>st.q.instance.prodigy.world.it("darktower-A1",200,400)}]),q.start()}setPlayerAsOpponent(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z={level:Z.get(K.data,"level",100).toString()},Y=Nn.J.copyObject(K.appearance.getData());Y.name=K.getName();const Q={data:z,appearance:Y,equipment:K.equipment.getData()};q.wizards=[Q],q.pets=[];const J=K.kennel.petTeam;for(let Z=0;Z{const K=this.floor{this.onLeavingDarkTower(200,400)}),q.bind(this,this.screen.user.position),this.onLeavingDarkTower.bind(this),"darktower-A1")}toFloor(q){if(q>ZS.FLOOR_MAXIMUM)return void this.toBase();const K=q=ZS.FLOOR_MAXIMUM;switch(q){case"Tower Run Completed":K.sendTowerRunCompletedEvent(z,Y);break;case"Tower Floor Completed":K.sendTowerRunFloorCompletedEvent({tower_type:z,floor_id:this.floor,floor_type:_n.ss.Normal});break;case"Tower Floor Started":K.sendTowerRunFloorStartedEvent({tower_type:z,floor_id:this.floor,floor_type:_n.ss.Normal});break;case"Tower Run Started":K.sendTowerRunStartedEvent(z,Y)}}}class iA extends eA{constructor(q,K){super(q,"A2","MAP_DARK_TOWER_FLOOR",260,550,["darktower-A1","darktower-A3"],K)}setup(q,K,z={}){super.setup(q,K,z),this.exitAreaEvent=this.addAreaEvent(q,K,{x:240,y:640,w:160,h:80,canReTrigger:!0},null,null,null,(()=>{this.toBase()}),WT.K.DOWN)}getName(){return`${super.getName()}${this.floor}`}}class sA extends eA{constructor(q,K){super(q,"A3","MAP_DARK_TOWER_SHOWDOWN",260,550,["darktower-A2"],K)}setup(q,K,z={}){super.setup(q,K,z),this.exitAreaEvent=this.addAreaEvent(q,K,{x:640,y:280,w:160,h:160,rect:!1,canReTrigger:!0},null,null,null,(()=>{this.toBase()}),WT.K.DOWN),K.addClickableMoveEvent(560,200,160,160,640,340)}updateZoneNameFromCurrentFloor(){super.updateZoneNameFromCurrentFloor();const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.zoneName=`${this.zoneName}-${q.userID}`}}class nA extends Cn.b{GetOpponent(q){if(49===q){const K=st.q.instance.prodigy.gameContainer.get("f71-42eb"),z=K.getValue("grandoffMaxHP",te.s.get("GameConstants.Grandoff.MAX_HP"));nA.OPPONENTS[q].boss.maxHP=null===z?void 0:parseInt(z,10),nA.OPPONENTS[q].difficulty=parseInt(K.getValue("grandoffDifficulty",te.s.get("GameConstants.Grandoff.DIFFICULTY")),10)}else if(99===q){const K=st.q.instance.prodigy.gameContainer.get("f71-42eb"),z=K.getValue("miraMaxHP",te.s.get("GameConstants.Mira.MAX_HP"));nA.OPPONENTS[q].boss.maxHP=null===z?void 0:parseInt(z,10),nA.OPPONENTS[q].difficulty=parseInt(K.getValue("miraDifficulty",te.s.get("GameConstants.Mira.DIFFICULTY")),10)}return nA.OPPONENTS[q]}constructor(q){super(q),this.difficultyModeAgnostic=!0,this._currentMap=null,this.name="Dark Tower",this.ID=mn.A_.DARKTOWER,this.battleBG="battle-tower-inside",this.defaultOnFaint="darktower-A1",this.questHub="darktower-A1",this.zoneIndex=AT.P.Darktower,this.states=[];const K=[Gn.t.Tileset_darktower_png,Gn.t.Tileset_forest_new_png,Gn.t.Tileset_generic_new_png,Gn.t.Tileset_collisions_png,Gn.t.Tileset_forest_new_png,it._.Npc_sprite_mira_json,ot.V.Bgm_space];this.maps={A1:new JS(this,K),A2:new iA(this,K),A3:new sA(this,K)}}handleLeaving(q,K){var z;const Y=st.q.instance.prodigy.world.getCurrentMap();q!==Un.j.mapTeleport?"darktower-A1"===Y?super.handleLeaving(q,K):this._currentMap.handleLeaving(K):("darktower-A1"!==Y&&(null===(z=this._currentMap)||void 0===z||z.sendSegmentEvent("Tower Run Completed")),super.handleLeaving(q,K))}teleport(q,K,z,Y,Q={}){this._currentMap=this.maps[q],X.Aq$.isDefined(this.maps[q].floor)?super.teleport(q,260,550,Y,Q):"A1"!==q?super.teleport("A1",200,400,Y,Q):super.teleport("A1",K,z,Y,Q)}getOnFaintData(){return{mapKey:this.defaultOnFaint}}}nA.AUDIO=[{tag:ht.c.Voice_2,s:0,d:1},{tag:ht.c.Voice_2,s:1,d:1},{tag:ht.c.Voice_2,s:2,d:1},{tag:ht.c.Voice_2,s:3,d:1},{tag:ht.c.Voice_2,s:4,d:2},{tag:ht.c.Voice_2,s:6,d:1},{tag:ht.c.Voice_2,s:7,d:2},{tag:ht.c.Voice_2,s:9,d:1}],nA.REWARDS=[{floor:10,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:nA.AUDIO[6]}]},{floor:20,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:nA.AUDIO[6]}]},{floor:30,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:nA.AUDIO[6]}]},{floor:40,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:nA.AUDIO[6]}]},{floor:50,reward:[{type:"gold",N:1e3}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:nA.AUDIO[6]}]},{floor:60,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:nA.AUDIO[6]}]},{floor:70,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:nA.AUDIO[6]}]},{floor:80,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:nA.AUDIO[6]}]},{floor:90,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:nA.AUDIO[6]}]},{floor:100,reward:[{type:"outfit",ID:38},{type:"hat",ID:42},{type:"weapon",ID:68}],text:[{textKey:"DIALOGUE_MIRA_DEFEAT_0",face:3,audio:nA.AUDIO[3]},{textKey:"DIALOGUE_MIRA_DEFEAT_1",face:3},{textKey:"DIALOGUE_MIRA_DEFEAT_2",face:1,audio:nA.AUDIO[6]},{textKey:"DIALOGUE_MIRA_DEFEAT_3",face:2},{textKey:"DIALOGUE_MIRA_DEFEAT_4",face:1,audio:nA.AUDIO[0]}]}],nA.DIALOGUE=[[{textKey:"DIALOGUE_MIRA_9",face:0,audio:nA.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_10",face:2},{textKey:"DIALOGUE_MIRA_11",face:1,audio:nA.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_12",face:0},{textKey:"DIALOGUE_MIRA_13",face:0,audio:nA.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_14",face:2},{textKey:"DIALOGUE_MIRA_15",face:1}],[{textKey:"DIALOGUE_MIRA_16",face:0,audio:nA.AUDIO[6]}],[{textKey:"DIALOGUE_MIRA_17",face:2},{textKey:"DIALOGUE_MIRA_18",face:1,audio:nA.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_19",face:2},{textKey:"DIALOGUE_MIRA_20",face:2,audio:nA.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_21",face:1},{textKey:"DIALOGUE_MIRA_22",face:2,audio:nA.AUDIO[1]}],[{textKey:"DIALOGUE_MIRA_23",face:2},{textKey:"DIALOGUE_MIRA_24",face:0}],[{textKey:"DIALOGUE_MIRA_25",face:2,audio:nA.AUDIO[1]},{textKey:"DIALOGUE_MIRA_26",face:0,audio:nA.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_27",face:3,audio:nA.AUDIO[3]}],[{textKey:"DIALOGUE_MIRA_28",face:2},{textKey:"DIALOGUE_MIRA_29",face:1,audio:nA.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_30",face:2},{textKey:"DIALOGUE_MIRA_31",face:2}],[{textKey:"DIALOGUE_MIRA_32",face:2},{textKey:"DIALOGUE_MIRA_33",face:2}],[{textKey:"DIALOGUE_MIRA_34",face:2},{textKey:"DIALOGUE_MIRA_35",face:1}],[{textKey:"DIALOGUE_MIRA_36",face:1,audio:nA.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_37",face:0,audio:nA.AUDIO[1]}],[{textKey:"DIALOGUE_MIRA_38",face:3},{textKey:"DIALOGUE_MIRA_39",face:3,audio:nA.AUDIO[3]}],[{textKey:"DIALOGUE_MIRA_40",face:3},{textKey:"DIALOGUE_MIRA_41",face:3,audio:nA.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_42",face:3,audio:nA.AUDIO[1]},{textKey:"DIALOGUE_MIRA_43",face:3},{textKey:"DIALOGUE_MIRA_44",face:0,audio:nA.AUDIO[7]},{textKey:"DIALOGUE_MIRA_45",face:1,audio:nA.AUDIO[0]},{textKey:"DIALOGUE_MIRA_46",face:3,audio:nA.AUDIO[2]}]],nA.OPPONENTS=[{pets:[{ID:99,level:5}]},{pets:[{ID:102,level:5}]},{pets:[{ID:100,level:5}]},{pets:[{ID:103,level:5}]},{pets:[{ID:101,level:5},{ID:104,level:5}]},{pets:[{ID:31,level:10}]},{pets:[{ID:55,level:10}]},{pets:[{ID:60,level:10}]},{pets:[{ID:29,level:10}]},{pets:[{ID:92,level:10},{ID:93,level:10}]},{pets:[{ID:27,level:15}]},{pets:[{ID:45,level:15}]},{pets:[{ID:48,level:15}]},{pets:[{ID:96,level:15}]},{pets:[{ID:28,level:15},{ID:49,level:15}]},{pets:[{ID:4,level:20}]},{pets:[{ID:10,level:20}]},{pets:[{ID:5,level:20}]},{pets:[{ID:11,level:20}]},{pets:[{ID:6,level:20},{ID:12,level:20}]},{pets:[{ID:1,level:25}]},{pets:[{ID:52,level:25}]},{pets:[{ID:2,level:25}]},{pets:[{ID:53,level:25}]},{pets:[{ID:3,level:25},{ID:54,level:25}]},{pets:[{ID:78,level:30}]},{pets:[{ID:46,level:30}]},{pets:[{ID:40,level:30}]},{pets:[{ID:79,level:30}]},{pets:[{ID:80,level:30},{ID:47,level:30},{ID:50,level:30}]},{pets:[{ID:94,level:35}]},{pets:[{ID:85,level:35}]},{pets:[{ID:82,level:35}]},{pets:[{ID:76,level:35}]},{pets:[{ID:35,level:35},{ID:36,level:35},{ID:37,level:35}]},{pets:[{ID:87,level:40}]},{pets:[{ID:99,level:40}]},{pets:[{ID:94,level:40}]},{pets:[{ID:102,level:40}]},{pets:[{ID:95,level:40},{ID:80,level:40},{ID:23,level:40}]},{pets:[{ID:16,level:45}]},{pets:[{ID:47,level:45}]},{pets:[{ID:40,level:45}]},{pets:[{ID:80,level:45}]},{pets:[{ID:62,level:45},{ID:26,level:45},{ID:44,level:45}]},{pets:[{ID:63,level:50}]},{pets:[{ID:66,level:50}]},{pets:[{ID:69,level:50}]},{pets:[{ID:72,level:50}]},{boss:{ID:1,level:50,element:"fire",attacks:[56,57,59,60],maxHP:12e3,name:"Grandoff",spriteOffsetY:80,battleOffsetX:80,starBonus:40,difficulty:3}},{pets:[{ID:23,level:55}]},{pets:[{ID:46,level:56}]},{pets:[{ID:23,level:57}]},{pets:[{ID:46,level:58}]},{pets:[{ID:46,level:60},{ID:23,level:60},{ID:47,level:60}]},{pets:[{ID:75,level:65}]},{pets:[{ID:78,level:66}]},{pets:[{ID:81,level:67}]},{pets:[{ID:84,level:68}]},{pets:[{ID:80,level:70},{ID:83,level:70},{ID:86,level:70}]},{pets:[{ID:43,level:75}]},{pets:[{ID:12,level:76}]},{pets:[{ID:54,level:77}]},{pets:[{ID:6,level:78}]},{pets:[{ID:58,level:80},{ID:25,level:80},{ID:61,level:80}]},{pets:[{ID:75,level:85}]},{pets:[{ID:78,level:86}]},{pets:[{ID:81,level:87}]},{pets:[{ID:84,level:88}]},{pets:[{ID:31,level:90},{ID:33,level:90},{ID:31,level:90}]},{pets:[{ID:63,level:50},{ID:64,level:85}]},{pets:[{ID:66,level:55},{ID:67,level:85}]},{pets:[{ID:69,level:60},{ID:70,level:85}]},{pets:[{ID:72,level:65},{ID:73,level:85}]},{pets:[{ID:2,level:95},{ID:5,level:95},{ID:8,level:95},{ID:11,level:95}]},{pets:[{ID:1,level:95}]},{pets:[{ID:4,level:96}]},{pets:[{ID:7,level:97}]},{pets:[{ID:10,level:98}]},{wizards:[{data:{level:50},appearance:{name:"Frozine",hair:{style:11,color:9},skinColor:1,eyeColor:13},equipment:{hat:37,outfit:33,weapon:63}},{data:{level:50},appearance:{name:"Thundane",hair:{style:19,color:16},skinColor:2,eyeColor:9},equipment:{hat:8,outfit:24,weapon:23}},{data:{level:50},appearance:{name:"Sprout",hair:{style:7,color:8},skinColor:3,eyeColor:6},equipment:{hat:33,outfit:29,weapon:24}},{data:{level:50},appearance:{name:"Charcole",hair:{style:18,color:6},skinColor:2,eyeColor:3},equipment:{hat:11,outfit:8,weapon:64}},{data:{level:50},appearance:{name:"Pounce",hair:{style:23,color:5},skinColor:4,eyeColor:14},equipment:{hat:32,outfit:31,weapon:60}}]},{pets:[{ID:38,level:100}]},{pets:[{ID:87,level:100}]},{pets:[{ID:39,level:100}]},{pets:[{ID:72,level:100}]},{pets:[{ID:43,level:100},{ID:26,level:100,evolve:[{ID:25,lvl:53}]},{ID:44,level:100,evolve:[{ID:43,lvl:43}]},{ID:61,level:100}]},{pets:[{ID:57,level:100}]},{pets:[{ID:61,level:100}]},{pets:[{ID:15,level:100}]},{pets:[{ID:98,level:100}]},{},{pets:[{ID:49,level:100}]},{pets:[{ID:50,level:100}]},{pets:[{ID:54,level:100}]},{pets:[{ID:39,level:100,evolve:[{ID:38,lvl:50}]}]},{pets:[{ID:97,level:100},{ID:89,level:100,evolve:[{ID:87,lvl:50},{ID:88,lvl:55}]},{ID:12,level:100,evolve:[{ID:11,lvl:55}]},{ID:42,level:100,evolve:[{ID:40,lvl:58},{ID:41,lvl:60}]}]},{pets:[{ID:63,level:50},{ID:66,level:50},{ID:69,level:50},{ID:72,level:50}]},{pets:[{ID:64,level:75},{ID:67,level:75},{ID:70,level:75},{ID:73,level:75}]},{pets:[{ID:65,level:100},{ID:68,level:100},{ID:71,level:100},{ID:74,level:100}]},{pets:[{ID:63,level:50},{ID:66,level:50},{ID:69,level:50},{ID:72,level:50}]},{boss:{ID:2,level:100,element:"wizard",attacks:[49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86],maxHP:25e3,name:"Mira Shade",spriteOffsetY:100,spriteOffsetX:20,difficulty:3}}];var aA=z(97447),rA=z(42448);class oA extends Zn.Z{constructor(q,K){super(q,"A1",K.concat([ct.Q.Spine_npc_noot_json,Pi.l.RiftRunPortal])),this._noot=null}setup(q,K,z){super.setup(q,K,z),this._noot=new hT.p(q,"NPC_NAME_NOOT",ct.Q.Spine_npc_noot_json,sa.ac.QuestGiver,K.content,0,0,"idle"),this._noot.position.x=K.user.position.x=rA.N3.location.x,this._noot.position.y=K.user.position.y=rA.N3.location.y,this._noot.alpha=0,K.user.alpha=0,aA.j.addPortalToScreen(this.screen,rA.N3.location.x,rA.N3.location.y).catch(X.RQr.createHandler("PostFirstRift: Failed to load the Rifts portal"))}start(q,K){const z=Object.create(null,{start:{get:()=>super.start}});return(0,Q.sH)(this,void 0,void 0,(function*(){z.start.call(this,q,K);try{K.user.faceToward(0),this._noot.faceToward(0);const q=[];q.push((0,Sc.eK)(K.user,{x:aA.j.PLAYER_SPAWN_LOCATION_X,y:aA.j.PLAYER_SPAWN_LOCATION_Y})),yield(0,Sc.Qx)(this,K.user,{alpha:1,duration:500,ease:X.GS3.Quadratic.Out}),q.push((0,Sc.eK)(this._noot,{x:aA.j.PLAYER_SPAWN_LOCATION_X+150,y:aA.j.PLAYER_SPAWN_LOCATION_Y-100})),yield(0,Sc.Qx)(this,this._noot,{alpha:1,duration:500,ease:X.GS3.Quadratic.Out}),yield Promise.all(q),(0,Sc.BY)(K.user,this._noot);const z=[1591,1592];yield(0,Sc.v$)(z),st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_RIFTS,En.B.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN)}catch(e){X.RQr.logError(e,"Error playing post first rift run cutscene")}st.q.instance.prodigy.world.it(aA.j.MAP_KEY,K.user.position.x,K.user.position.y)}))}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),super.cleanup()}}(0,Q.Cg)([(0,Ge.b)("782-c308"),(0,Q.Sn)("design:type",De.W)],oA.prototype,"_player",void 0);const hA=[297,298,299];class cA extends Zn.Z{constructor(q,K){super(q,"A1",K.concat([ct.Q.Spine_npc_noot_json,ct.Q.Spine_npc_puppetmaster_json,ct.Q.Spine_npc_pippet_json,ct.Q.Spine_battle_transport_boss_purple_json,ct.Q.Spine_pet_240_json,...hA.map((q=>ct.Q[`Default_follow_${q}_json`])),Pi.l.RiftRunPortal,Pi.l.SpinePetLegacyTransform])),this._buddies=[]}setup(q,K,z){function Y(q,z,Y,Q=1){const X=st.q.instance.prodigy.create.follow(K.content,q,Q,null,z,Y);if(!(X instanceof Dr._))throw new Error("Only GameObject-based buddies supported");const Z=X.findComponent(Ar);return Z.walkSpeed=1,Z}super.setup(q,K,z);{const q=new X._mx;q.addComponent(X.K16).group.position.set(725,590),q.name="Teleportation Effect",K.content.addChild(q.legacyTransform.group);const z=q.addComponent(ea.v),Y=q.addComponent(Ur.j);z.Active=!1,z.setAsset(ct.Q.Spine_battle_transport_boss_purple_json),this._teleportEffect=Y}this._noot=new hT.p(q,"NPC_NAME_NOOT",ct.Q.Spine_npc_noot_json,sa.ac.QuestGiver,K.content,0,0,"idle"),this._puppetMaster=new hT.p(q,"NPC_NAME_PUPPETMASTER",ct.Q.Spine_npc_puppetmaster_json,sa.ac.QuestGiver,K.content,0,0,"idle"),this._pippet=new hT.p(q,"NPC_NAME_PIPPET",ct.Q.Spine_npc_pippet_json,sa.ac.QuestGiver,K.content,0,0,"idle"),this._drake=st.q.instance.prodigy.create.monster(K.content,new Ta.R(q,{ID:240}),1,660,510),this._buddies.push(Y(hA[2],446,418,.6),Y(hA[1],506,480,.6),Y(hA[2],790,539,.6),Y(hA[0],896,516,.6)),this._drake.startLoad(),this._drake.OnLoad.addOnce((()=>this._drake.stand())),K.user.position.set(110,295),this._noot.position.set(60,300),this._puppetMaster.position.set(695,390),this._pippet.position.set(900,390),aA.j.addPortalToScreen(this.screen,rA.N3.location.x,rA.N3.location.y).catch(X.RQr.createHandler("VisitPrePuppetMasterDefeat: Failed to load the Rifts portal"))}start(q,K){const z=Object.create(null,{start:{get:()=>super.start}});return(0,Q.sH)(this,void 0,void 0,(function*(){z.start.call(this,q,K);try{(0,Sc.BY)(this._puppetMaster,this._pippet);for(const q of[K.user,this._noot,this._drake])q.faceToward(this._puppetMaster.x);yield(0,Sc.v$)([1603,1604,1605,1606,1607]);{const K=J().pick(this._drake,["x","y"]);yield(0,Sc.eK)(this._drake,{x:this._puppetMaster.x+50,y:this._puppetMaster.y+10}),this._drake.faceToward(this._puppetMaster.x),this._drake.attack(),yield(0,Sc.uk)(q,1e3),this._puppetMaster.playAll("hit",!1),yield Promise.all([(0,Sc.v$)([1608]),(0,Sc.uk)(q,800).then((()=>(0,Q.sH)(this,void 0,void 0,(function*(){return(0,Sc.eK)(this._drake,K)}))))]),this._drake.faceToward(this._puppetMaster.x)}{const K=this._buddies[1],z=J().pick(K.gameObject.position,["x","y"]);yield(0,Sc.eK)(K,{x:this._puppetMaster.x-10,y:this._puppetMaster.y+10}),yield(0,Sc.Qx)(this,K.gameObject.transform.scale,{y:.6,duration:1e3,ease:X.GS3.Bounce.Out},{y:1,duration:1e3,ease:X.GS3.Quadratic.Out}),this._puppetMaster.faceToward(K.gameObject.position.x),yield(0,Sc.eK)(K,z),this._puppetMaster.faceToward(this._pippet.x),yield(0,Sc.uk)(q,800),this._puppetMaster.faceToward(K.gameObject.position.x),yield(0,Sc.uk)(q,1e3),this._puppetMaster.faceToward(this._pippet.x),yield(0,Sc.v$)([1609,1610])}{const K=(0,Sc.eK)(this._puppetMaster,{x:this._puppetMaster.x+30,y:this._puppetMaster.y+40});yield(0,Sc.v$)([1611,1612]),yield K;const z=J().sortBy([...this._buddies,this._pippet,this._drake],(q=>q instanceof Ar?q.gameObject.position.x:q.x));z.push(this._puppetMaster),this._puppetMaster.playAll("summon"),yield(0,Sc.uk)(q,1800),this._teleportEffect.spine.Active=!0,this._teleportEffect.playAnimation("exit",!1),yield Promise.all(z.map(((q,K)=>(0,Q.sH)(this,void 0,void 0,(function*(){return(0,Sc.Qx)(this,q instanceof na.R?q:q.gameObject,{alpha:0,duration:400,ease:X.GS3.Quadratic.Out,delay:100*K})})))))}{yield X.Egh.timeout(1e3);const q=Promise.all([(0,Sc.eK)(K.user,{x:aA.j.PLAYER_SPAWN_LOCATION_X,y:aA.j.PLAYER_SPAWN_LOCATION_Y}),(0,Sc.eK)(this._noot,{x:aA.j.PLAYER_SPAWN_LOCATION_X+150,y:aA.j.PLAYER_SPAWN_LOCATION_Y-50})]);yield(0,Sc.v$)([1613]),yield q,(0,Sc.BY)(K.user,this._noot),yield(0,Sc.v$)([1614,1615,1616])}st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_RIFTS,En.B.BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN)}catch(e){X.RQr.logError(e,"Error playing pre-PM-defeat visit cutscene")}st.q.instance.prodigy.world.it(aA.j.MAP_KEY,K.user.position.x,K.user.position.y)}))}cleanup(){var q;for(const K of[this._noot,this._pippet,this._puppetMaster])K.destroy();for(const K of this._buddies)K.gameObject.destroy();this._noot=null,this._pippet=null,this._puppetMaster=null,this._buddies.length=0,null===(q=this._teleportEffect)||void 0===q||q.GameObject.destroyRootDeferred(),this._teleportEffect=null,super.cleanup()}}class dA extends Cn.b{constructor(q){super(q),this.difficultyModeAgnostic=!0,this.name="Dragon Isle",this.ID=mn.A_.DRAGONISLE,this.zoneIndex=AT.P.DragonIsle,this.defaultOnFaint=aA.j.MAP_KEY,this.questHub=aA.j.MAP_KEY;const K=[Gn.t.Tileset_dragonisland_exterior_png,Gn.t.Tileset_dragonisland_waterfall_png,Gn.t.Tileset_collisions_png];this._portalHub=new aA.j(this,K),this.maps={A1:this._portalHub},this.scenes={postFirstRift:new oA(this,K),visitPrePuppetMasterDefeat:new cA(this,K)}}init(q,K,z){super.init(q,K,z),z.disabledLayers.push("b7","b8")}setup(q,K,z){return z!==this._portalHub||st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_RIFTS,En.B.BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN)?super.setup(q,K,z):(this.playScene("visitPrePuppetMasterDefeat"),{quit:!0})}}class lA extends Lr.H{constructor(q,K,z,Y,Q,Z=!1){super(q,K),this.npc=null,this.indicator=null;const J=st.q.instance.prodigy.gameContainer,tt=J.get(X.$Bt.LocalizationService),et=J.get("20f-5f67");this.x=z,this.y=Y,this.name=tt.getText("NPC_NAME_PROFESSOR_SCOOG"),this.npc=st.q.instance.prodigy.create.sprite(0,0,it._.Npc_sprite_scoog_json,0,void 0,this.onTextureLoaded.bind(this)),this.npc.inputEnabled=!0,this.npc.anchor.set(.5,1),this.npc.events.onInputDown.add((()=>{et.gameWorld.sendNpcClickedEvent({npc_name:this.name,npc_type:sa.ac.Merchant,npc_id:"NPC_NAME_SCOOG"}),Q()}),this),Z&&(this.npc.scale.x=-1),this.add(this.npc),st.q.instance.prodigy.create.nameFont(this,-15,-this.npc.height-20,this.name),et.gameWorld.sendNpcDiscoveredEvent({npc_name:this.name,npc_type:sa.ac.Merchant,npc_id:"NPC_NAME_SCOOG",x_coord:z,y_coord:Y,npc_animation_id:"idle"})}onTextureLoaded(q){q&&(q.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),q.animations.play("stand",void 0,!0))}setIndicator(q){X.Aq$.isDefined(this.indicator)||(this.indicator=NT.createIndicator(q),this.indicator.y=-(this.npc.height+20),this.add(this.indicator),this.game.add.tween(this.indicator,this).to({y:this.indicator.y-20},1e3,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0))}}class uA extends zn.T{constructor(q,K){super(q,"A0","MAP_DYNO_DIG_OASIS",280,440,[],K.concat([it._.Npc_sprite_scoog_json,Gn.t.Tileset_collisions_png,Pi.l.Overlay_difficulty_hard,Pi.l.Overlay_difficulty_expert]))}setup(q,K){super.setup(q,K);new lA(q,K.content,800,450,this.onScoogClicked.bind(this),!1).setIndicator(xT.DEFAULT_INDICATOR_CONFIG),K.addClickableEvent(295,200,50,80,this.toMuseum.bind(this,K),null,0,null);const z=st.q.instance.prodigy.create.element(K.content,975,150),Y=z.add(st.q.instance.prodigy.create.sprite(40,40,it._.General_icons_json,"star2"));Y.anchor.set(.5,.5),Y.inputEnabled=!0,Y.angle=-20,Y.events.onInputDown.add(this.toDynoDig,this),z.add(st.q.instance.prodigy.create.sprite(0,10,zt.E.getIconForType("key",1))),st.q.instance.prodigy.create.font(z,-20,0,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_TITLE"),{width:120,size:20,align:"center"}),q.add.tween(Y,this).to({angle:20},1e3,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0)}onScoogClicked(){const q=st.q.instance.prodigy.dialogue.create(),K=`${kT.N.Scoog}_${Ah.B.Dialogue}`;this.segment.featureCommon.sendInterfaceEvent({interfaceName:K,interfaceType:Si.Wm.DialogBox,instanceType:Li.N.Interface,originType:Si.$N.NpcClick}),q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_SHOP_WELCOME"),face:0,yes:()=>{this.sendDialogueSegmentEvents(Xh.k.Shop,K),q.close(),st.q.instance.prodigy.open.store(23)},no:()=>{this.sendDialogueSegmentEvents(Xh.k.NotNow,K)},type:Ni.fA.STORE}),q.startDeprecated("scoog")}sendDialogueSegmentEvents(q,K){this.segment.featureCommon.sendButtonEvent({buttonName:q,interfaceName:K,interfaceType:Si.Wm.DialogBox,saveClickInfo:q}),this.segment.featureCommon.sendInterfaceEvent({interfaceName:K,interfaceType:Si.Wm.DialogBox,instanceType:Li.N.Interface,closeMethod:Si.Lv.ButtonClick})}toMuseum(q){const K=st.q.instance.prodigy.event.create();K.validPath(q.user,q.path,320,300);const z=this.game.state.get(Ue.G.Museum);K.set(z,"startX",634),K.set(z,"startY",560),K.function(st.q.instance.prodigy.start.bind(st.q.instance.prodigy,Ue.G.Museum)),K.start()}toDynoDig(){st.q.instance.prodigy.start(Ue.G.DinoDig,{},{playerPosition:this.screen.user.position})}}class fA extends Cn.b{constructor(q){super(q),this.difficultyModeAgnostic=!0,this.store={},this.store={items:[{ID:41,type:"hat"},{ID:67,type:"weapon"},{ID:37,type:"outfit"},{ID:15,type:"pet"},{ID:35,type:"pet"}]},Object.defineProperty(this.store,"name",{get:()=>st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("STORE_NAME_DYNO")}),this.name="Dyno",this.ID=mn.A_.DYNO,this.bgmID=3,this.battleBG="battle-shipwreck-outside",this.defaultOnFaint="dyno-A0",this.questHub="dyno-A0",this.states=["daily"],this.zoneIndex=AT.P.Dyno;const K=["battle-shipwreck-outside",Gn.t.Tileset_generic_png,Gn.t.Tileset_outsidesnow_png,it._.Npc_sprite_wizard_json,Gn.t.Tileset_town_png,it._.Zone_skywatch_json,Gn.t.Tileset_volcano_png,Gn.t.Tileset_generic_new_png,Gn.t.Tileset_ship_exterior_png,Gn.t.Tileset_water_new_png];this.maps={A0:new uA(this,K)}}}fA.AUDIO=[{tag:ht.c.Voice_9,s:0,d:3},{tag:ht.c.Voice_9,s:3,d:2},{tag:ht.c.Voice_9,s:5,d:2},{tag:ht.c.Voice_9,s:7,d:2},{tag:ht.c.Voice_9,s:9,d:2},{tag:ht.c.Voice_9,s:11,d:3}],fA.DATA={ID:6,tag:"dyno-A0",zoneName:"zone-dino",atlas:it._.Zone_dino_json,icon:zt.E.getIconForType("fossil",1),shopkeeperTag:it._.Npc_face_scoog_json,shopkeeperFrame:"face_0",scaleX:.89,scaleY:.89,battle:{screen:"bg-battle-dino",encounter:[{ID:105},{ID:106},{ID:107},{ID:108},{ID:109},{ID:110},{ID:111},{ID:112}]},quests:[]};var bA=z(92864);class pA extends zn.T{}class vA extends pA{constructor(q,K){super(q,"A3","MAP_FOREST_MOUNTAIN_GATE",1100,580,["forest-A4"],K)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1080,y:630,w:320,h:80},"forest-A4",1080,90,null,null)}}class gA extends pA{constructor(q,K){super(q,"A4","MAP_FOREST_MOUNTAIN_PASS",1080,520,["forest-A3","forest-A5","forest-B5"],K),this.coord=[new X.I9Y(150,430),new X.I9Y(755,400)]}setup(q,K,z){super.setup(q,K,z),st.q.instance.prodigy.prefabFactory.addWizard(this,1046,208,"wizard4",33,!0).catch(X.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`)),this.addAreaEvent(q,K,{x:1080,y:40,w:320,h:80},"forest-A3",1100,580,null,null),this.addAreaEvent(q,K,{x:this.game.width,y:this.game.height,r:200},"forest-B5",200,200,null,null),this.addAreaEvent(q,K,{x:220,y:630,w:280,h:80},"forest-A5",220,90,null,null)}}class mA extends pA{constructor(q,K){super(q,"A5","MAP_FOREST_FIREFLY_CROSSING",220,90,["forest-A4"],K),this.coord=[new X.I9Y(200,600),new X.I9Y(900,510),new X.I9Y(100,420)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:220,y:40,w:280,h:80},"forest-A4",280,580,null,null)}}class yA extends pA{constructor(q,K){super(q,"B5","MAP_FOREST_CROSSROADS",1100,630,["forest-A4","forest-C4","forest-B6"],K),this.coord=[new X.I9Y(1e3,180),new X.I9Y(200,200),new X.I9Y(690,125)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:0,y:0,r:200},"forest-A4",1080,584,null,null),this.addAreaEvent(q,K,{x:1060,y:0,w:300,h:170,rect:!0},"forest-C4",300,520,null,null),this.addAreaEvent(q,K,{x:1100,y:680,w:280,h:80},"forest-B6",1100,90,null,null),this.zone.isOnQuest(8)||st.q.instance.prodigy.prefabFactory.addWizard(this,350,200,"wizard2",34,!1).catch(X.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`))}}class _A extends pA{constructor(q,K){super(q,"B6","MAP_FOREST_GRASSY_CLEARING",200,630,["forest-B5","forest-B7"],K),this.coord=[new X.I9Y(210,390),new X.I9Y(300,130),new X.I9Y(540,260)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1100,y:40,w:280,h:80},"forest-B5",1100,630,null,null),this.addAreaEvent(q,K,{x:200,y:680,w:320,h:80},"forest-B7",200,90,null,null)}}class EA extends pA{constructor(q,K){super(q,"B7","MAP_FOREST_FISHERMANS_POND",1190,240,["forest-B6","forest-C7"],K),this.coord=[new X.I9Y(955,590),new X.I9Y(130,530),new X.I9Y(305,630)]}setup(q,K,z){var Y;super.setup(q,K,z);(null===(Y=this.zone.getQuestState())||void 0===Y?void 0:Y.ID)<4||this.addPippet(q,K,2,200,546),this.addAreaEvent(q,K,{x:200,y:40,w:320,h:80},"forest-B6",200,630,null,null),this.addAreaEvent(q,K,{x:1240,y:410,w:80,h:260},"forest-C7",90,240,null,null)}}class wA extends pA{constructor(q,K){super(q,"B8","MAP_FOREST_FIREFLY_CLEARING",1190,480,["forest-C8"],K.concat(it._.Npc_sprite_merchant_json)),this.questNPC=null,this.coord=[new X.I9Y(490,570),new X.I9Y(785,270),new X.I9Y(440,200)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1240,y:400,w:80,h:500},"forest-C8",90,480,null,null)}start(q,K,z){super.start(q,K,z)}}class TA extends pA{constructor(q,K){super(q,"C4","MAP_FOREST_THE_OLD_ROAD",300,520,["forest-B5","forest-D3"],K.concat([it._.Npc_sprite_merchant_json])),this.questNPC=null,this.coord=[new X.I9Y(400,580),new X.I9Y(820,500),new X.I9Y(800,330)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:200,y:640,w:280,h:200,rect:!0},"forest-B5",1080,200,null,null),this.addAreaEvent(q,K,{x:1080,y:0,w:270,h:160,rect:!0},"forest-D3",200,520,null,null),st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.FireflyQuestMerchantNPC,378,313).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.FireflyQuestMerchantNPC}`)),st.q.instance.prodigy.prefabFactory.addWizard(this,925,450,"wizard3",35,!0).catch(X.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`))}chatWithMerchant(q){const K=st.q.instance.prodigy.event.create();K.text(6,"merchant"),K.start()}}class SA extends pA{constructor(q,K){super(q,"C7","MAP_FOREST_STONEFISH_BEACH",200,630,["forest-B7","forest-C8"],K),this.coord=[new X.I9Y(640,500),new X.I9Y(330,170),new X.I9Y(220,260)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:40,y:220,w:80,h:200},"forest-B7",1180,450,null,null),this.addAreaEvent(q,K,{x:200,y:680,w:240,h:80},"forest-C8",200,90,null,null),K.addCollect(1,980,520,{type:"item",ID:51}),st.q.instance.prodigy.prefabFactory.addWizard(this,550,480,"wizard1",36,!1).catch(X.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`))}}class AA extends pA{constructor(q,K){super(q,"C8","MAP_FOREST_BIG_TREE",1190,520,["forest-C7","forest-B8"],K.concat(it._.Npc_sprite_flora_json,it._.Npc_sprite_merchant_json))}setup(q,K,z){super.setup(q,K,z),st.q.instance.prodigy.world.getZone(mn.A_.LAMPLIGHT).completeQuest(2),this.addAreaEvent(q,K,{x:200,y:40,w:240,h:80},"forest-C7",200,630,null,null),this.addAreaEvent(q,K,{x:40,y:480,w:80,h:200},"forest-B8",1190,480,null,null);let Y=null;this.featureRequirements.meetsRequirementsDeprecated(37)||st.q.instance.prodigy.classModeController.isClassMode()||(Y=()=>{st.q.instance.prodigy.open.lamplightLevelLock("WORLD_LAMPLIGHT_TOWN")}),this.addAreaEvent(q,K,{x:1240,y:520,w:80,h:240,canReTrigger:!0},"lamplight-B1",120,480,Y);st.q.instance.prodigy.gameContainer.get("983-05a7").loadFromGUID(Pi.l.FloraNPC).transform.setPosition(560,425),st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.FireflyMerchantNPC,950,390).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.FireflyMerchantNPC}`)),st.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,K.user,K.content,125,300)}}var CA,OA=z(76642),IA=z(72326);!function(q){q[q.PLAY_FLUTE=0]="PLAY_FLUTE",q[q.BOSS_FIGHT=1]="BOSS_FIGHT",q[q.OPEN_CHEST=2]="OPEN_CHEST",q[q.GET_KEYSTONE=3]="GET_KEYSTONE",q[q.GO_TO_SHIVERCHILL=4]="GO_TO_SHIVERCHILL"}(CA||(CA={}));class DA extends jn.T{constructor(q,K,z){super(q,K,DA.QUEST_INDEX,IA.v.Q12,{type:"seq",N:5},[`${mn.A_.FOREST}-D3`],DA.QUEST_START_DIALOGUE_IDS,[],[],null,!1)}setup(q,K,z){return super.setup(q,K,z),z.getTag()===DA.DIALOGUE_MAP_TAG?(st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.FloraNPC,305,410,!1,!0).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.FloraNPC}`)),this.zone.getQuestState().seq>CA.BOSS_FIGHT&&(st.q.instance.prodigy.notifications.pause(this),st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.FlorianNPCLegacyMaps,430,330,!0,!0).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.FlorianNPCLegacyMaps}`))),{enableMonsters:!1}):null}start(q,K,z){if(super.start(q,K,z),!this.zone.isQuestComplete(12)&&z.getTag()===DA.DIALOGUE_MAP_TAG)switch(this.zone.getQuestState().seq){default:case CA.PLAY_FLUTE:case CA.BOSS_FIGHT:this.startIntroCutscene(q,K,z);break;case CA.OPEN_CHEST:case CA.GET_KEYSTONE:st.q.instance.prodigy.notifications.pause(this),this.startPostbattleCutscene(z);break;case CA.GO_TO_SHIVERCHILL:}return null}update(q,K,z){z.getTag()===DA.DIALOGUE_MAP_TAG&&z.update()}startIntroCutscene(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("983-05a7"),Q=st.q.instance.prodigy.gameContainer.get("f71-42eb"),Z=Q.getValue("geraldMaxHP",te.s.get("GameConstants.Gerald.MAX_HP")),J=null===Z?void 0:parseInt(Z,10),tt=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE");st.q.instance.prodigy.game.broadcaster.broadcast(gi.Y1.HideHUD,gi.HG.HUD),cr.d.loadWithInjectedValuesAndDependenciesFromGUID(Y,Pi.l.FireflyQ12IntroCutscene,{EncounterBattleMods:{boss:{ID:60,element:"earth",attacks:[68,69,71],name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_GERALD"),tag:mn.A_.FOREST,scale:!0,useShadowAssets:!1,maxHP:J},difficulty:parseInt(Q.getValue("geraldDifficulty",te.s.get("GameConstants.Gerald.DIFFICULTY")),10),starMod:5,screen:z.zone.battleBG,drops:[{type:"gold",N:100},{type:"weapon",ID:212,N:1},{type:"follow",ID:221,N:1},{type:"dorm",ID:185,N:1},{type:"spellRelic",ID:15,N:1}],intro:tt,catch:!1,run:!1}}).then((q=>{var K,Y,Q;null===(K=q.findComponentInChildren(df.k))||void 0===K||K.onVictory.addOnce((()=>{this.zone.setState("gerald",null),st.q.instance.prodigy.world.it("forest-D3",572,342)})),null===(Y=q.findComponentInChildren(df.k))||void 0===Y||Y.onDefeat.addOnce((()=>{st.q.instance.prodigy.world.it("forest-C4",1080,200)})),null===(Q=q.findComponentInChildren(OA.S))||void 0===Q||Q.onDispatch.addOnce((()=>z.wakeUp=!0))})).catch(X.RQr.createHandler("Could not load Forest Q12 Gerald Cutscene"))}startPostbattleCutscene(q){this.descKey="Talk to Gerald",q.wakeUp=!0,st.q.instance.prodigy.game.broadcaster.broadcast(gi.Y1.ShowHUD,gi.HG.HUD),st.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(Pi.l.FireflyQ12CutscenePost_battle).then((q=>{var K;null===(K=q.findComponentInChildren(OA.S))||void 0===K||K.onDispatch.addOnce((()=>st.q.instance.prodigy.notifications.resume(this)))})).catch(X.RQr.createHandler("Could not load Forest Q12 Gerald Post-battle Cutscene"))}}DA.DIALOGUE_MAP_TAG="D3",DA.QUEST_INDEX=12,DA.QUEST_START_DIALOGUE_IDS=[325,326];class RA extends pA{constructor(q,K){super(q,"D3","MAP_FOREST_OLD_ROAD_REMAINS",200,520,["forest-C4"],K.concat(it._.Boss_gerald_json,ct.Q.Spine_boss_marionette_json,ct.Q.Spine_music_notes_json)),this.wakeUp=!1,this.tween=[],this.wakeUpTween=[],this.awakeTween=[],this.coord=[new X.I9Y(500,640),new X.I9Y(800,320),new X.I9Y(1100,450)]}setup(q,K,z){super.setup(q,K,z),this.game=q,this.wakeUp=!1,this.addAreaEvent(q,K,{x:180,y:640,w:300,h:200,rect:!0},"forest-C4",1080,200,null,null);const Y=q.cache.getJSON(this.file),Q=q.cache.getJSON("map-pathing").tilesets;let X=null;for(let Z=0;Z8&&!this.zone.allQuestsAreComplete}wakeUpGerald(){if(this.wakeUp){this.tween=this.wakeUpTween;for(let q=0;q{st.q.instance.game.broadcaster.broadcast(gi.Y1.HideHUD,gi.HG.HUD),(null==K?void 0:K.questProgress)&&(K.questProgress.visible=!1),q.findComponentInChildren(MA.V).onComplete.addOnce((()=>{st.q.instance.game.broadcaster.broadcast(gi.Y1.ShowHUD,gi.HG.HUD),(null==K?void 0:K.questProgress)&&(K.questProgress.visible=!0),q.destroy()}))}))}))}}xA.QUEST_INDEX=1;class LA extends jn.T{constructor(q,K,z){super(q,K,10,IA.v.Q10,{type:"seq",N:1},["forest-A5"],[319,320,321],[],[322],z,!1)}setup(q,K,z){return super.setup(q,K,z),"A5"===z.getTag()?{enableMonsters:!1}:null}start(q,K,z){if(super.start(q,K,z),!this.zone.isQuestComplete(10)&&"A5"===z.getTag()){const Y=st.q.instance.prodigy.create.element(K.content,490,340),Q=Y.add(st.q.instance.prodigy.create.sprite(0,0,it._.General_core_json,"overlay-light"));Q.alpha=0,Q.width=110,Q.height=80,Y.highlight(!0,0,-20),Q.inputEnabled=!0,Q.events.onInputDown.add((()=>{this.clickStump(z,q,K,Y)}))}return null}clickStump(q,K,z,Y){q.questParams={};const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Z=z.content.addChild(st.q.instance.prodigy.icon.createIcon(505,270,zt.E.getIconForType("item",69)));K.add.tween(Z,this).to({y:280},1e3,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0),Z.visible=!1;const J=z.content.addChild(st.q.instance.prodigy.icon.createIcon(505,270,zt.E.getIconForType("item",70)));K.add.tween(J,this).to({y:280},1e3,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0),J.visible=!1;const tt=q.addMonster(K,z,99,982,626,!1,{encounter:[{ID:69}],difficulty:5,maxTeamSize:1,showNewIndicator:!1},!0);tt.visible=!1;const et=st.q.instance.prodigy.event.create();et.function(Y.highlight.bind(Y,!1)),et.enableInput(!1),et.path(z.user,[{x:430,y:420}]),et.set(z.user,"evtProc",!0),et.function(Q.backpack.consume.bind(Q.backpack,"item",69,1)),et.delay(100),et.set(Z,"visible",!0),et.delay(500),et.explode(505,325,80,80,3),et.set(Z,"visible",!1),et.set(J,"visible",!0),et.delay(500),et.set(tt,"visible",!0),et.path(tt,[{x:708,y:383}],1),et.hop(tt,500,-140,100),et.set(J,"visible",!1),et.function(z.user.chat.bind(z.user,1,80)),et.sound(18,"dig"),et.hop(tt,500,-160,100),et.path(tt,[{x:218,y:0}],2),et.set(tt,"visible",!1),et.function(tt.destroy.bind(tt)),et.enableInput(!0),et.text(60,"noot"),et.function(Y.destroy.bind(Y)),et.function(this.zone.completeSequence.bind(q.zone,10,0)),et.set(z.user,"evtProc",!1),et.function(z.process.bind(z)),et.start()}}class kA extends jn.T{constructor(q,K,z){super(q,K,11,"",{type:"item",ID:70,N:1},["forest-A3","forest-D3"],[323,324],[],[331],z,!1,IA.v.Q11)}setup(q,K,z){return super.setup(q,K,z),"A3"===z.getTag()?(this.zone.getState("questMonsterDefeated")||this.placeThief(q,K,z),{enableMonsters:!1}):"D3"!==z.getTag()||this.zone.isQuestComplete(11)?null:(this.zone.getState("fakeMonsterDefeated")||this.placeDecoyThief(q,K,z),{enableMonsters:!1})}getRemainingQuestAreas(){const q=["forest-A3"];return X.Aq$.isDefined("fakeMonsterDefeated")&&this.zone.getState("fakeMonsterDefeated")||q.push("forest-D3"),q}placeThief(q,K,z){const Y={drops:[{ID:70,type:"item"}],encounter:[{ID:69,nickname:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_FOREST_THIEF")}],difficulty:5,maxTeamSize:1,onEnc:()=>{this.zone.setState("questMonsterDefeated",!0)},unique:!0,isQuestEncounter:!0,showGuideHand:!0};st.q.instance.prodigy.prefabFactory.addMonster(z,384,463,98,Y).catch(X.RQr.createHandler("Could not add real thief for quest Q11"))}placeDecoyThief(q,K,z){const Y={encounter:[{ID:69}],difficulty:5,maxTeamSize:1,onEnc:()=>{this.zone.setState("fakeMonsterDefeated",!0)},unique:!0,showGuideHand:!0,isQuestEncounter:!0};st.q.instance.prodigy.prefabFactory.addMonster(z,484,463,99,Y).catch(X.RQr.createHandler("Could not add decoy thief for quest Q11"))}}var BA,UA,FA=z(92591),GA=z(54336);class jA extends jn.T{constructor(q,K,z){super(q,K,jA.QUEST_INDEX,"Defeat Monster",{type:"seq",ID:1,N:1},["forest-C7"],[1338,1339,1340],[],[1348,1347,1346],z,!1,IA.v.Q2)}setup(q,K,z){if(super.setup(q,K,z),z.tag===jA.MAP_TAG){if(!this.zone.isQuestComplete(jA.QUEST_INDEX))return this.zone.isOnSequence(jA.QUEST_INDEX,0)&&(K.onStartComplete.addOnce((()=>K.walkEnabled=!1)),st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.FloraNPC,380,640).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.FloraNPC}`))),{enableMonsters:!1,enableWizards:!1};this.startMinibossRunaway(z)}return{enableWizards:!1}}process(q,K,z){z.tag===jA.MAP_TAG&&this.zone.isOnSequence(jA.QUEST_INDEX,0)&&(K.walkEnabled=!1,st.q.instance.prodigy.load.assets(ph.B.Bg_bossbattle_firefly,(()=>{this.startMinibossCutscene(z).catch(X.RQr.createHandler("Could not instantiate Q2 Miniboss prefab"))})))}startMinibossRunaway(q){st.q.instance.prodigy.prefabFactory.addMonster(q,640,360,9,{encounter:[{ID:96}],difficulty:5,maxTeamSize:1,unique:!0,isQuestEncounter:!0}).then((q=>{const K=q.findComponentInChildren(GA.s),z=q.findComponentInChildren(yf.I);q.findComponentInChildren(FA.K).changeState(1),z.MoveTarget=new X.I9Y(400,200),z.onMoveEnd.addOnce((()=>{z.MoveTarget=new X.I9Y(-200,200)})),K&&(K.Active=!1)})).catch(X.RQr.createHandler("Could not load monster running away from Firefly Q2 encounter"))}startMinibossCutscene(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2"),z=K.player.playerContainer;z.playerPrefab||(yield new Promise((q=>z.OnLoad.add(q)))),(new PA.u).get(1341).args=[K.getLevel()+2];const Y=Math.min(K.getLevel()+2,mi.s.activePlayerLevelCap),Q=-100;return cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.FireflyQ2MinibossEncounter,{EncounterMap:q,EncounterScale:[1,1],EncounterZoneTag:q.zoneName,EncounterSpawnPosition:new X.I9Y(Q,200),EncounterBattleMods:{encounter:[{ID:96}],level:Y,run:!1,catch:!1,onEnd:q.zoneName,screen:q.battleBG,onFaint:q.zone.defaultOnFaint,backgroundMusic:ph.B.Bg_bossbattle_firefly,revampBattleType:Hi.gu.FireflyQ2Miniboss},EncounterDifficultyIndicatorTier:2,EncounterDifficultyIndicatorLevel:Y}).then((q=>{st.q.instance.prodigy.battle.battleStats.type="QuestBattle",q.transform.setPosition(Q,200),q.findComponent(X.y4o).getRootContainer().position.set(Q,200)}))}))}}jA.MAP_TAG="C7",jA.QUEST_INDEX=2,function(q){q[q.ENEMY_1=100]="ENEMY_1",q[q.ENEMY_2=102]="ENEMY_2",q[q.MINIBOSS=104]="MINIBOSS"}(BA||(BA={})),function(q){q[q.MONSTER_INFO=0]="MONSTER_INFO",q[q.LEVEL_UP=1]="LEVEL_UP",q[q.READY_MINIBOSS=2]="READY_MINIBOSS",q[q.DEFEAT_MINIBOSS=3]="DEFEAT_MINIBOSS"}(UA||(UA={}));class $A extends jn.T{constructor(q,K,z){super(q,K,$A.QUEST_INDEX,"",{type:"clear",ID:1,N:3},["forest-B7"],[1349],[],[1352,1353],z,!1,IA.v.Q3),this.updateQuestDescription()}setup(q,K,z){return super.setup(q,K,z),"B7"===z.getTag()&&(this.zone.isSequenceComplete($A.QUEST_INDEX,UA.MONSTER_INFO)||this.showMonsterInfoDialogue(),this.areLesserEnemiesDefeated(z.zone.getQuestState())?(this.zone.completeSequence($A.QUEST_INDEX,UA.LEVEL_UP),this.updateQuestDescription()):this.placeLesserEnemies(z),this.areAllMonsterDefeated(z.zone.getQuestState())?this.zone.completeSequence($A.QUEST_INDEX,UA.DEFEAT_MINIBOSS):this.zone.isSequenceComplete($A.QUEST_INDEX,UA.DEFEAT_MINIBOSS)||this.placeMiniBoss(z).catch(X.RQr.createHandler("Could not add monsters for quest Q3"))),{enableMonsters:!1,enableWizards:!1}}placeMiniBoss(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer;K.playerPrefab||(yield new Promise((q=>K.OnLoad.add(q))));const z=this.getBossLevel(q.zone.getQuestState());return cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.FireflyQ3MinibossEncounter,{EncounterSpawnId:BA.MINIBOSS,EncounterMap:q,EncounterScale:[1,1],EncounterZoneTag:q.zoneName,EncounterSpawnPosition:new X.I9Y(330,300),EncounterBattleMods:{level:z,encounter:[{ID:96}],run:!1,catch:!1,onEnd:q.zoneName,screen:q.battleBG,onFaint:q.zone.defaultOnFaint,unique:!0,revampBattleType:Hi.gu.FireflyQ3Miniboss,isQuestEncounter:!0},EncounterDifficultyIndicatorTier:2,EncounterDifficultyIndicatorLevel:z}).then((q=>{q.transform.setPosition(330,300),q.findComponent(X.y4o).getRootContainer().position.set(330,300)})).catch(X.RQr.createHandler("Could not add miniboss for quest Q#-B"))}))}placeLesserEnemies(q){const K={randDir:!0,encounter:[{ID:20}],difficulty:1,maxTeamSize:1,showGuideHand:!0,isQuestEncounter:!0,unique:!0,range:80};st.q.instance.prodigy.prefabFactory.addMonster(q,900,220,BA.ENEMY_1,K).catch(X.RQr.createHandler(`Could not add monster ${BA.ENEMY_1} for quest Q3`)),st.q.instance.prodigy.prefabFactory.addMonster(q,280,620,BA.ENEMY_2,K).catch(X.RQr.createHandler(`Could not add monster ${BA.ENEMY_2} for quest Q3`))}updateQuestDescription(){this.descKey=this.zone.isSequenceComplete($A.QUEST_INDEX,UA.LEVEL_UP)?"Defeat Monster":"Level Up"}showMonsterInfoDialogue(){const q=new Ni.rD(st.q.instance.prodigy.game);q.addEvents([{dialogueData:q.dataProvider.get(1350),blockInput:!0},{dialogueData:q.dataProvider.get(1351),blockInput:!0}]),q.start(!0,(()=>{this.zone.completeSequence($A.QUEST_INDEX,UA.MONSTER_INFO)}))}areLesserEnemiesDefeated(q){return!!X.Aq$.isDefined(q.state)&&(q.seq>UA.LEVEL_UP||1===q.state[BA.ENEMY_1+1]&&1===q.state[BA.ENEMY_2+1])}areAllMonsterDefeated(q){return!!X.Aq$.isDefined(q.state)&&(this.areLesserEnemiesDefeated(q)&&1===q.state[BA.MINIBOSS+1])}getBossLevel(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2");return X.Aq$.isDefined(q)?(X.Aq$.isDefined(q.state[$A.MINIBOSS_LEVEL_STATE_ID])||(q.state[$A.MINIBOSS_LEVEL_STATE_ID]=Math.min(K.getLevel()+2,mi.s.activePlayerLevelCap)),q.state[$A.MINIBOSS_LEVEL_STATE_ID]):Math.min(K.getLevel()+2,mi.s.activePlayerLevelCap)}}$A.QUEST_INDEX=3,$A.MINIBOSS_LEVEL_STATE_ID="forestq3b-miniboss-level";class HA extends jn.T{constructor(q,K,z){super(q,K,HA.QUEST_INDEX,"Find Florian",{type:"seq",ID:1,N:1},["forest-B6"],[1370,1371],[],[1392,1393,1394],z,!1,IA.v.Q4)}setup(q,K,z){return super.setup(q,K,z),"B6"!==z.getTag()||this.zone.isQuestComplete(HA.QUEST_INDEX)?null:(this.placeFlorian(q,K,z).catch(X.RQr.createHandler("Could not load Florian NPC Prefab")),{enableMonsters:!1})}end(){super.end(),Nn.J.bagItem({type:"spellRelic",ID:13},st.q.instance.prodigy.game,"got-item",void 0)}placeFlorian(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer;q.playerPrefab||(yield new Promise((K=>q.OnLoad.add(K))));const K=new X.I9Y(700,320);return st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.FireflyQ4FlorianNPC,K.x,K.y)}))}}HA.QUEST_INDEX=4;var VA,WA=z(76711),qA=z(23891);!function(q){q[q.RETURN_TO_FIREFLY=0]="RETURN_TO_FIREFLY",q[q.FIGHT_PIPPET=1]="FIGHT_PIPPET",q[q.SAVE_FLORIAN=2]="SAVE_FLORIAN",q[q.CHAT_WITH_MERCHANT=3]="CHAT_WITH_MERCHANT",q[q.CHAT_WITH_NOOT=4]="CHAT_WITH_NOOT",q[q.COLLECT_MANDRAKE=5]="COLLECT_MANDRAKE"}(VA||(VA={}));class KA extends jn.T{constructor(q,K,z){super(q,K,6,"Save Florian",{type:"pet",ID:32,N:2},["forest-B5"],[],[],[],z,!1,IA.v.Q6)}setup(q,K,z){if(super.setup(q,K,z),st.q.instance.prodigy.world.getCurrentZone()===mn.A_.SHIVERCHILL)return this.zone.isQuestComplete(KA.QUEST_INDEX)&&st.q.instance.prodigy.world.it("forest-D3"),{enableAreaEvents:!1};const Y=this.zone.getQuestState().seq;return this.zone.isQuestComplete(KA.QUEST_INDEX)?"D3"===z.getTag()?{enableMonsters:!1,enableWizards:!1}:null:("B5"!==z.getTag()||Y!==VA.FIGHT_PIPPET&&Y!==VA.SAVE_FLORIAN?Y===VA.CHAT_WITH_MERCHANT?this.setQuestGoalChatMerchant():Y>=VA.CHAT_WITH_NOOT&&this.setQuestGoalDefeatSprikes():K.onStartComplete.addOnce((()=>K.walkEnabled=!1)),"B5"===this.map.getTag()||"D3"===this.map.getTag()?{enableMonsters:!1,enableWizards:!1}:null)}process(q,K,z){switch(super.process(q,K,z),this.zone.getQuestState().seq){case VA.RETURN_TO_FIREFLY:st.q.instance.prodigy.world.getCurrentZone()===mn.A_.SHIVERCHILL?this.returnToFireflySequence():st.q.instance.prodigy.world.getCurrentZone()===mn.A_.FOREST&&(this.zone.completeSequence(KA.QUEST_INDEX,VA.RETURN_TO_FIREFLY),"B5"===z.getTag()&&this.prebattleCutscene(K));break;case VA.FIGHT_PIPPET:"B5"===z.getTag()&&this.prebattleCutscene(K);break;case VA.SAVE_FLORIAN:"B5"===z.getTag()&&this.postbattleCutscene(q,K,z);break;case VA.CHAT_WITH_MERCHANT:this.setQuestGoalChatMerchant();break;case VA.CHAT_WITH_NOOT:this.setQuestGoalDefeatSprikes(),"D3"===z.getTag()&&this.chatWithNoot(z);case VA.COLLECT_MANDRAKE:"D3"===z.getTag()&&this.placeSprikes(z)}return null}returnToFireflySequence(){const q=new Ni.rD(st.q.instance.game),K=[1372,1373,1375].map((K=>({dialogueData:q.dataProvider.get(K),blockInput:!0})));K.push({dialogueData:q.dataProvider.get(1376),blockInput:!0,yes:()=>{this.zone.completeSequence(KA.QUEST_INDEX,VA.RETURN_TO_FIREFLY),st.q.instance.prodigy.gameContainer.get("135-e5ce").updateQuestProgress().catch(X.RQr.createHandler("Could not update quest progress for Firefly Forest")).finally((()=>{this.zone.handleLeaving(Un.j.teleport,(()=>{st.q.instance.prodigy.world.it("forest-B5")}))}))},yesButtonText:(0,Ka.k)("BUTTON_LETS_GO"),isCancelButtonVisible:!1}),q.addEvents(K),q.start()}prebattleCutscene(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;K.playerContainer.setPath([{x:960,y:360}]),st.q.instance.game.state.get(Ue.G.TileScreen).walkEnabled=!1;const z=this.zone.getMap("B5"),Y=st.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("pippetMaxHP",te.A.get("GameConstants.Pippet.MAX_HP")),Q=null===Y?void 0:parseInt(Y,10);st.q.instance.prodigy.notifications.pause(this),q.menuBar.active=!1,cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.FireflyQ6Cutscene,{EncounterZoneTag:z.zoneName,EncounterBattleMods:{boss:{ID:37,maxHP:Q,element:"shadow",attacks:[73],name:"Pippet",tag:"pippet",pippetBattle:!0},pets:[{ID:117},{ID:71}],level:K.getLevel,run:!1,catch:!1,onEnd:z.zoneName,screen:z.battleBG,onFaint:z.zone.defaultOnFaint,revampBattleType:Hi.gu.QuestPippet}}).then((q=>{null==q||q.findComponentInChildren(df.k).onBattleStart.addOnce((()=>{st.q.instance.prodigy.notifications.resume(this)}))})).catch(X.RQr.createHandler("Could not load Firefly Q6B pre battle cutscene"))}postbattleCutscene(q,K,z){K.menuBar&&(K.menuBar.active=!1);const Y=st.q.instance.prodigy;Y.notifications.pause(this),Y.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(Pi.l.FireflyQ6CutscenePost_battle).then((Q=>{var X;null===(X=Q.findComponentInChildren(qA.f))||void 0===X||X.onComplete.addOnce((()=>{z.zone.completeSequence(KA.QUEST_INDEX,VA.SAVE_FLORIAN),this.setQuestGoalChatMerchant(),q.broadcaster.addAppListener(gi.n8.DialogClosed,(()=>{q.broadcaster.removeAppListener(gi.n8.DialogClosed,this),q.state.get(Ue.G.TileScreen).walkEnabled=!0,Y.notifications.resumeAll(),K.menuBar.active=!0,K.process()}),this)}))})).catch(X.RQr.createHandler("Could not load Firefly Q6 post battle cutscene"))}setQuestGoalChatMerchant(){this.descKey=IA.v.Q5,this.area=["forest-C4"]}setQuestGoalDefeatSprikes(){const q=this.descKey===IA.v.Q5;this.descKey="",this.area=["forest-D3"],q&&this.screen.process()}placeSprikes(q){const K={randDir:!0,encounter:[{ID:32}],drops:this.hasDefeatedSprike()?[{type:"item",ID:24,N:1}]:void 0,difficulty:3,maxTeamSize:1,unique:!0,showGuideHand:!0,isQuestEncounter:!0};st.q.instance.prodigy.prefabFactory.addMonster(q,481,239,0,K).catch(X.RQr.createHandler("Could not add monster 0 for quest Q6")),st.q.instance.prodigy.prefabFactory.addMonster(q,940,533,3,K).catch(X.RQr.createHandler("Could not add monster 3 for quest Q6"))}chatWithNoot(q){const K=new Ni.rD(st.q.instance.prodigy.game);K.addEvents([{dialogueData:K.dataProvider.get(64),blockInput:!0},{dialogueData:K.dataProvider.get(65),blockInput:!0}]),K.start(!0,(()=>{this.zone.completeSequence(KA.QUEST_INDEX,VA.CHAT_WITH_NOOT)}))}hasDefeatedSprike(){const q=this.zone.getQuestState().state;return Object.keys(q).some((K=>q[K]>0))}}KA.QUEST_INDEX=6;class zA extends jn.T{constructor(q,K,z){super(q,K,7,"",{type:"item",ID:24,N:5},["forest-A4","forest-A5"],[310,311,312],[],[331],z,!1,IA.v.Q7),this.collectionMaps={A4:[1,2],A5:[3,4,5]}}setup(q,K,z){if(super.setup(q,K,z),"A4"!==z.getTag()||this.zone.isQuestComplete(7)){if("A5"===z.getTag()&&!this.zone.isQuestComplete(7)){const q={type:"item",ID:24};K.addCollect(3,154,511,q),K.addCollect(4,915,400,q),K.addCollect(5,552,210,q)}}else{const q={type:"item",ID:24};K.addCollect(1,270,460,q),K.addCollect(2,720,350,q)}return null}}var YA=z(61985);class QA extends jn.T{constructor(q,K,z){super(q,K,8,IA.v.Q8,{type:"seq",N:2},["forest-A3"],[313,314,315],[],[331],z,!1),this._shouldStartIntro=!1}setup(q,K,z){return super.setup(q,K,z),"A3"===z.getTag()?(this.zone.isOnSequence(8,0)&&(this.createTriptropTrio(z).catch(X.RQr.createHandler("Could not create Triptrop Trio Encounter")),q.input.enabled=!1),{enableMonsters:!1}):null}start(q,K,z){return"A3"===z.getTag()&&(this.zone.isOnSequence(8,0)&&this.startIntro(),this.zone.isOnSequence(8,1)&&this.chatWithNoot(q,K,z)),null}createTriptropTrio(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer;K.playerPrefab||(yield new Promise((q=>K.OnLoad.add(q)))),K.x=q.x,K.y=q.y;const z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);return cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.TriptropTrioEncounter,{EncounterMap:q,EncounterScale:[-1,1],EncounterZoneTag:q.zoneName,EncounterSpawnPosition:new X.I9Y(640,360),EncounterBattleMods:{drops:[{ID:69,type:"item"}],pets:[{ID:59,nickname:z.getText("NPC_NAME_TRIPTROP_TED")},{ID:59,nickname:z.getText("NPC_NAME_TRIPTROP_TOM")},{ID:59,nickname:z.getText("NPC_NAME_TRIPTROP_TAK")}],run:!1,catch:!1,onEnd:q.zoneName,screen:q.battleBG,onFaint:q.zone.defaultOnFaint}}).then((q=>{st.q.instance.prodigy.battle.battleStats.type="QuestBattle",q.transform.setPosition(640,360),q.findComponent(X.y4o).getRootContainer().position.set(640,360),this._prefab=q,this._shouldStartIntro&&this.startIntro()}))}))}startIntro(){this._shouldStartIntro=!0,this._prefab&&this._prefab.findComponentsInChildren(YA.E).forEach((q=>q.startTimer()))}chatWithNoot(q,K,z){const Y=new Ni.rD(st.q.instance.prodigy.game);Y.addEvents([{dialogueData:Y.dataProvider.get(67),blockInput:!0}]),Y.start(!0,(()=>{this.zone.completeSequence(QA.QUEST_INDEX,1),K.process()}))}}QA.QUEST_INDEX=8;class XA extends jn.T{constructor(q,K,z){super(q,K,9,IA.v.Q9,{type:"seq",N:1},["forest-D3"],XA.QUEST_START_DIALOGUE_IDS,[],[],z,!1)}start(q,K,z){if(super.start(q,K,z),"D3"===z.getTag()&&this.zone.isOnSequence(XA.QUEST_INDEX,0)){const q=new Ni.rD(st.q.instance.game);q.addEvents([1427,1428].map((K=>({dialogueData:q.dataProvider.get(K),blockInput:!0})))),q.addEvents([{callback:()=>{this.zone.completeSequence(XA.QUEST_INDEX,0),this.screen.process()}}]),q.start()}return null}}XA.QUEST_INDEX=9,XA.QUEST_START_DIALOGUE_IDS=[316,317];class ZA extends Cn.b{constructor(q){super(q),this.questManagerIdentifier="135-e5ce",this._assets=[Gn.t.Tileset_firefly_new_png,it._.Npc_sprite_wizard_json,it._.Zone_forest_json,Gn.t.Tileset_collisions_png,ot.V.Bgm_firefly_forest],this.name="Firefly Forest",this.ID=mn.A_.FOREST,this.guardian="FOREST_GUARDIAN",this.battleBG="battle-forest-outside",this.defaultOnFaint="forest-C8",this.questHub="forest-C8",this.bgmID=15,this.currency=13,this.zoneIndex=AT.P.Firefly,this.states=["chest1","chest2","chest3","chest4","wizard1","wizard2","wizard3","wizard4","daily","hasdaily","fakeMonsterDefeated","questMonsterDefeated","chest5","chest6",cf.PIPPET_ENCOUNTER,cf.PIPPET_REMATCH,cf.PIPPET_DEFEATED,"flutePlayed"],this.monsters=[25,29,32,52,55,59,69,81];const K={map:"forest-Titan",cutscene:"forest-titanIntro",harvey:{x:330,y:270},sign:{x:240,y:280},catapult:{x:200,y:430,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:550,y:450},battleBG:[br.q.Battle_forest_outside_bg,br.q.Battle_forest_outside_fg]};this.maps={A3:new vA(this,this._assets),A4:new gA(this,this._assets),A5:new mA(this,this._assets),B5:new yA(this,this._assets),B6:new _A(this,this._assets),B7:new EA(this,this._assets),B8:new wA(this,this._assets),C4:new TA(this,this._assets),C7:new SA(this,this._assets),C8:new AA(this,this._assets),D3:new RA(this,this._assets),Titan:new VT(this,this._assets,K)},Promise.all([kf.T.ready,Qt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((q=>{st.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_FIREFLY_FOREST"],q,"Error, unable to load Firefly Zone Rewards JSON")})),this.scenes={titanIntro:new RT(this,[Gn.t.Tileset_interior_general_png,Gn.t.Tileset_wall_collisions_png,ot.V.Bgm_tutorial])}}setZoneRewards(){const q=(0,DT.mg)(Qt.R.loadData(Yt.r.ZoneRewardsFireflyForest_json));this.quests=Object.keys(this.quests).length>0?this.quests:{1:new xA(this,this._assets,q.quests.ForestQ1),2:new jA(this,this._assets,q.quests.ForestQ2),3:new $A(this,this._assets,q.quests.ForestQ3),4:new HA(this,this._assets,q.quests.ForestQ4),5:new WA.c(this,this._assets,q.quests.ForestQ5),6:new KA(this,this._assets,q.quests.ForestQ6),7:new zA(this,this._assets,q.quests.ForestQ7),8:new QA(this,this._assets,q.quests.ForestQ8),9:new XA(this,this._assets,q.quests.ForestQ9),10:new LA(this,this._assets,q.quests.ForestQ10),11:new kA(this,this._assets,q.quests.ForestQ11),12:new DA(this,this._assets,q.quests.ForestQ12)}}migrateQuestProgress(){const q=this.getCurrentQuestID();switch(q){default:case 1:case 2:this.startQuest(1,!0);break;case 3:case 4:case 5:this.startQuest(4,!0);break;case 6:case 7:this.startQuest(7,!0);break;case 8:this.startQuest(8,!0);break;case 9:this.startQuest(9,!0);break;case 10:this.startQuest(10,!0);break;case 11:this.startQuest(11,!0);break;case 12:this.startQuest(12,!0);break;case 13:}this.awardMissingQuestItems(q)}awardMissingQuestItems(q){const K=[],z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q>5&&!z.kennel.hasPet(WA.c.PET_AWARD_ID)&&K.push({type:"pet",ID:WA.c.PET_AWARD_ID,N:1,data:{level:z.getLevel(),stars:mi.s.xpRequiredForLevel(z.getLevel(),Do.V.Pet)}}),q>6&&K.push({type:"spell",ID:13},{type:"item",ID:67}),q>8&&K.push({type:"spell",ID:14},{type:"item",ID:69});const Y=Nn.J.filterDuplicateItems(this.game,K);if(Y.length>0)for(const Q of Y)Nn.J.bagItem(Q,this.game,"pet"===Q.type?"got-pet":"got-item",void 0,{source_type:On.C.QuestReward});q>10&&z.backpack.consume("item",69,1)}start(q,K,z){super.start(q,K,z),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}placeDaily(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;(1===this.getState("hasdaily")||X.Aq$.isDefined(this.getQuestState())&&this.getQuestState().ID>1&&this.getQuestState().ID>1)&&Y.backpack.hasItem("item",78)<99&&(this.firefly=z.addFireflyEvent(1260*Math.random(),700*Math.random(),150,150,this.fireflyOnClick.bind(this,z,q),null,0))}fireflyOnClick(q,K){const z=st.q.instance.prodigy.event.create();z.validPath(q.user,q.path,this.firefly.x+75,this.firefly.y+115),z.set(q.user,"evtProc",!0),z.function(this.interactFirefly.bind(this,q,K)),z.set(q.user,"evtProc",!1),z.start()}interactFirefly(q,K){if(!this.firefly.moving&&Math.abs(q.user.x-this.firefly.x)<150&&Math.abs(this.firefly.y+100-q.user.y)<150){this.firefly.destroy(),st.q.instance.prodigy.open.gotItem([{type:"item",ID:78}],null,null,"firefly");const q=[];for(const K in this.maps)q.push(K);const z=new bA.t(this.getState("daily").date);for(let Y=0;Y<5;Y++)if(q[Math.floor(z.jumpFromStart(Y)*(q.length-1))]===K.tag){const q=this.getState("daily").flags;q[Y]=0,this.setState("daily",{date:this.getState("daily").date,flags:q,rewards:this.getState("daily").rewards})}}}teleport(q,K,z,Y,Q){lf.J.meetsNarrativeIntroRequirements?st.q.instance.prodigy.world.it("lamplight-B3"):super.teleport(q,K,z,Y,Q)}}class JA extends pA{constructor(q,K){super(q,"A3","MAP_FOREST_MOUNTAIN_GATE",1100,580,["forest_hard-A4"],K)}}class tC extends pA{constructor(q,K){super(q,"A4","MAP_FOREST_MOUNTAIN_PASS",1080,520,["forest_hard-A3","forest_hard-A5","forest_hard-B5"],K)}}class eC extends pA{constructor(q,K){super(q,"A5","MAP_FOREST_FIREFLY_CROSSING",220,90,["forest_hard-A4"],K)}}class iC extends pA{constructor(q,K){super(q,"B5","MAP_FOREST_CROSSROADS",1100,630,["forest_hard-A4","forest_hard-C4","forest_hard-B6"],K)}}class sC extends pA{constructor(q,K){super(q,"B6","MAP_FOREST_GRASSY_CLEARING",200,630,["forest_hard-B5","forest_hard-B7"],K)}}class nC extends pA{constructor(q,K){super(q,"B7","MAP_FOREST_FISHERMANS_POND",1190,240,["forest_hard-B6","forest_hard-C7"],K)}}class aC extends pA{constructor(q,K){super(q,"B8","MAP_FOREST_FIREFLY_CLEARING",1190,480,["forest_hard-C8"],K.concat(it._.Npc_sprite_merchant_json))}}class rC extends pA{constructor(q,K){super(q,"C4","MAP_FOREST_THE_OLD_ROAD",300,520,["forest_hard-B5","forest_hard-D3"],K.concat([it._.Npc_sprite_merchant_json]))}}class oC extends pA{constructor(q,K){super(q,"C7","MAP_FOREST_STONEFISH_BEACH",200,630,["forest_hard-B7","forest_hard-C8"],K)}}class hC extends pA{constructor(q,K){super(q,"C8","MAP_FOREST_BIG_TREE",1190,520,["forest_hard-C7","forest_hard-B8"],K.concat(it._.Npc_sprite_flora_json,it._.Npc_sprite_merchant_json))}}class cC extends pA{constructor(q,K){super(q,"D3","MAP_FOREST_OLD_ROAD_REMAINS",200,520,["forest_hard-C4"],K.concat(it._.Boss_gerald_json,ct.Q.Spine_boss_marionette_json,ct.Q.Spine_music_notes_json))}}class dC extends ZA{constructor(q){super(q),this.questManagerIdentifier="319-dcbe",this._assets=[Gn.t.Tileset_firefly_new_png,it._.Npc_sprite_wizard_json,it._.Zone_forest_json,Gn.t.Tileset_collisions_png,ot.V.Bgm_firefly_forest],this.name="Firefly Forest",this.ID=mn.A_.FORESTHARD,this.guardian="FOREST_GUARDIAN",this.battleBG="battle-forest-outside",this.defaultOnFaint="forest_hard-C8",this.questHub="forest_hard-C8",this.bgmID=15,this.currency=13,this.zoneIndex=AT.P.Firefly,this.difficultyMode=vi.i.Hard,this.states=["chest1","chest2","chest3","chest4","wizard1","wizard2","wizard3","wizard4","daily","hasdaily","fakeMonsterDefeated","questMonsterDefeated","chest5","chest6","chest7",cf.PIPPET_ENCOUNTER,cf.PIPPET_REMATCH,cf.PIPPET_DEFEATED,"flutePlayed"],this.monsters=[],this.maps={A3:new JA(this,this._assets),A4:new tC(this,this._assets),A5:new eC(this,this._assets),B5:new iC(this,this._assets),B6:new sC(this,this._assets),B7:new nC(this,this._assets),B8:new aC(this,this._assets),C4:new rC(this,this._assets),C7:new oC(this,this._assets),C8:new hC(this,this._assets),D3:new cC(this,this._assets)}}}var lC,uC=z(75017),fC=z(93375);class bC extends zn.T{constructor(q,K){super(q,"exterior","MAP_HOUSE_EXTERIOR",685,420,["house-exit","suburbs"],K.concat(Gn.t.Tileset_exterior_general_png,ot.V.Bgm_fun))}setup(q,K,z){super.setup(q,K,z);st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasCompletedTutorial()&&(this.addAreaEvent(q,K,{x:1240,y:480,w:80,h:240,rect:!0},"house-exit",120,580,null,WT.K.RIGHT),this.addAreaEvent(q,K,{x:685,y:300,w:100,h:160,rect:!0},"suburbs",null,null,null,WT.K.UP))}}class pC extends zn.T{constructor(q,K,z,Y,Q){super(q,z,"",K.houses[z].entryPoint.x,K.houses[z].entryPoint.y,Y,Q.concat(K.assets)),this.content=null,this.houseItems=[],this.player=null,this.houseData=null,this.houseTag=null,this.houseData=K.houses[z],this.houseTag=this.houseData.tag}setup(q,K,z){return super.setup(q,K,z),this.content=K.content,this.game=q,{}}setOwner(q){this.player=q,this.zoneName=`house-${this.player.userID}`}cleanup(){this.houseItems=[],this.content=null,super.cleanup()}loadHouseItems(q){for(let K=0;K-1&&this.houseItems.splice(K,1)}canPlaceItem(q){const K=q.getRenderer();if(!this.isValidSpace(K.getWorld(),K.getWidth(),K.getHeight()))return!1;for(let z=0;z0?1:0)),it=Math.floor(Y-.5*Z-(Z>0?1:0));return!(it>64||tt>32||et<0||J<0)&&((1===this.screen.area[J][et]&&1===this.screen.area[J][it]||6===this.screen.area[J][et]&&6===this.screen.area[J][it])&&(1===this.screen.area[tt][et]&&1===this.screen.area[tt][it]||6===this.screen.area[tt][et]&&6===this.screen.area[tt][it]))}checkOverlap(q,K){if(q.getWorld().y>K.getWorld().y)return!1;const z=q.getBounds(),Y=K.getBounds();return z.x+=2,z.y+=2,z.width-=4,z.height-=4,Y.x+=2,Y.y+=2,Y.width-=4,Y.height-=4,X.M_G.intersects(z,Y)}getName(){const q=Ee.t.getCategoryItems("dormbg");for(let K=0;K!q._game)).forEach((q=>{this.removeHouseItem(q)})),this.player.house.snapDormItems(),this.loadHouseItems(this.player.house.getSortedActive()),null}start(q,K,z){return super.start(q,K,z),this.game.broadcaster.addAppListener(gi.F0.OpenEditor,this.openedEditor.bind(this),this),this.game.broadcaster.addAppListener(gi.F0.CloseEditor,this.closedEditor.bind(this),this),null}cleanup(){this.game.broadcaster.removeAppListener(gi.F0.OpenEditor,this),this.game.broadcaster.removeAppListener(gi.F0.CloseEditor,this),super.cleanup()}openedEditor(){st.q.instance.prodigy.open.houseEditorMenu(this,this.screen),this.screen.walkEnabled=!1,this.screen.user.stopTweens(),this.screen.user.stand();for(const q in this.screen.playerList)this.fadeOutPlayerContainer(this.screen.playerList[q]);this.fadeOutPlayerContainer(this.screen.user),this.game.broadcaster.addAppListener(gi.u0.PlayerAdded,this.playerEnteredHouse.bind(this),this)}fadeOutPlayerContainer(q){if(this.setInputEnabled(q,!1),X.Aq$.isDefined(q.follow)&&(this.game.add.tween(q.follow,this).to({alpha:0},300,X.GS3.Cubic.Out).start(),q.follow instanceof Dr._)){const K=q.follow.findComponent(Pr);X.Aq$.isDefined(K)&&K.fade(0,300)}return this.game.add.tween(q,this).to({alpha:0},300,X.GS3.Cubic.Out).start()}closedEditor(){for(const q in this.screen.playerList)this.fadeInPlayerContainer(this.screen.playerList[q]);this.game.broadcaster.addAppListener(gi.pm.StopPlayer,(()=>{this.fadeInPlayerContainerImmediately(this.screen.user),this.screen.walkEnabled=!0,this.game.broadcaster.removeAppListener(gi.pm.StopPlayer,this)}),this),this.fadeInPlayerContainer(this.screen.user).onTweenComplete.addOnce((()=>{this.screen.walkEnabled=!0,this.game.broadcaster.removeAppListener(gi.pm.StopPlayer,this)}),this),this.game.broadcaster.removeAppListener(gi.u0.PlayerAdded,this)}fadeInPlayerContainer(q){if(this.setInputEnabled(q,!0),X.Aq$.isDefined(q.follow)&&(this.game.add.tween(q.follow,this).to({alpha:1},300,X.GS3.Cubic.In).start(),q.follow instanceof Dr._)){const K=q.follow.findComponent(Pr);X.Aq$.isDefined(K)&&K.fade(1,300)}return this.game.add.tween(q,this).to({alpha:1},300,X.GS3.Cubic.In).start()}fadeInPlayerContainerImmediately(q){if(this.setInputEnabled(q,!0),X.Aq$.isDefined(q.follow)&&(q.follow.alpha=1,q.follow instanceof Dr._)){const K=q.follow.findComponent(Pr);X.Aq$.isDefined(K)&&K.setAlpha(1)}q.alpha=1}playerEnteredHouse(q){q.alpha=0,this.setInputEnabled(q,!0)}setInputEnabled(q,K){const z=q.sprites.children;for(let Y=0;Y=this.sprites.children.length&&(this.visible=!0,this.stand())}update(){super.update();const q=Date.now();for(let K=0;K{if(K){let q=null;for(let z=0;z{z.inputEnabled=!0,z.events.onInputDown.add((()=>{K.sendNpcClickedEvent(),this.onMozzaEllaClick(q)}))}))}else X.VyI.log(`Could not find house with ID: ${this.houseID} in store`,X.$bb.Error)}else X.VyI.log(`Could not place Mozza Ella due to error with store - ${q.getErrorMessage()}`,X.$bb.Error)}))}onMozzaEllaClick(q){const K=st.q.instance.prodigy.event.create();K.text(11,"mozza-ella"),K.function(this.showPurchasePopup.bind(this,q)),K.start()}showPurchasePopup(q){const K=Ee.t.getCategoryItems("dormbg");let z=null;for(let X=0;X0?String(Y):Q.getText("ITEM_FREE"),J=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,tt=z.data.member>0&&!J.hasMembership();st.q.instance.prodigy.open.messageBoxGeneric(Q.getText("HOUSE_PREVIEW_PURCHASE_MESSAGE"),(()=>{this.onBuyButtonClick(z,q)}),(()=>{st.q.instance.prodigy.world.it(mn.A_.HOUSE)}),null,null,null,7,{modifyProperty:[{element:"yesText",property:"text",value:Z},{element:"membershipGraphic",property:"visible",value:tt},{element:"houseGraphic",property:"atlasName",value:Ee.t.getIconAtlas({ID:X.Aq$.isDefined(z)?z.ID:0,type:"dormbg",cost:q})},{element:"houseGraphic",property:"frameName",value:Ee.t.getIconFrame({ID:X.Aq$.isDefined(z)?z.ID:0,type:"dormbg",cost:q})}],addChildren:[]})}onBuyButtonClick(q,K){const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=Nn.J.getPurchasePrice(q.data,K);1!==q.data.member||z.hasMembership()?z.getGold()-1?q=[0]:this.houseTag.indexOf("medium")>-1?q=[1,2]:this.houseTag.indexOf("large")>-1?q=[3,4]:"forest"===this.houseTag?q=[5,6]:"coolCave"===this.houseTag?q=[7,8]:"firePit"===this.houseTag&&(q=[9,10]),q[Math.floor(Math.random()*q.length)]}}class yC extends zn.T{constructor(q,K){super(q,"warden","Academy Entrance",160,600,["house-exterior"],[Gn.t.Tileset_generic_new_png,Gn.t.Tileset_town_new_png,Gn.t.Tileset_forest_new_png,Gn.t.Tileset_collisions_png,it._.Npc_sprite_gnome_json,it._.Zone_lamplight_json,ot.V.Bgm_tutorial,ot.V.Bgm_puppetmaster,ot.V.Bgm_lamplight,ht.c.Sfx_lamplight,it._.Npc_sprite_scoog_json],"map-lamplight-B0")}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:160,y:680,w:240,h:80,rect:!0},"house-exterior",160,120,null,WT.K.DOWN);const Y=[];Y.push(K.content.addChild(st.q.instance.prodigy.create.sprite(400,360,it._.Zone_lamplight_json,"pedestal"))),Y.push(K.content.addChild(st.q.instance.prodigy.create.sprite(640,360,it._.Zone_lamplight_json,"pedestal"))),Y.push(K.content.addChild(st.q.instance.prodigy.create.sprite(880,360,it._.Zone_lamplight_json,"pedestal"))),Y.push(K.content.addChild(st.q.instance.prodigy.create.sprite(520,440,it._.Zone_lamplight_json,"pedestal"))),Y.push(K.content.addChild(st.q.instance.prodigy.create.sprite(760,440,it._.Zone_lamplight_json,"pedestal")));for(let Q=0;Q{Na.i.openLockMessage(mn.A_.HOUSE)});let Q=null;return this.featureRequirements.meetsRequirementsDeprecated(37)||(Q=()=>{Na.i.openLockMessage(mn.A_.LAMPLIGHT)}),this.addAreaEvent(q,K,{x:40,y:580,w:80,h:240,rect:!0},"suburbs",null,null,Y,WT.K.LEFT),this.addAreaEvent(q,K,{x:1240,y:380,w:80,h:240,rect:!0},"lamplight-A4",120,500,Q,WT.K.RIGHT),null}}class EC extends Zn.Z{constructor(q){super(q,"exterior",[it._.Npc_sprite_noot_json,"monster-reduced-38",Gn.t.Tileset_collisions_png,Gn.t.Tileset_generic_new_png,Gn.t.Tileset_forest_new_png,ot.V.Bgm_fun]),this.loadingData.time=1}setup(q,K,z){super.setup(q,K,z),K.user.x=600,K.user.y=480,this.exit=this.addAreaEvent(q,K,{x:1240,y:480,w:80,h:240,rect:!0},null,120,500,this.end.bind(this,q),WT.K.RIGHT),this.noot=K.addNPC(770,480,it._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2}start(q,K){super.start(q,K,11);const z=K.foreground.addChild(st.q.instance.prodigy.create.sprite(this.noot.x,this.noot.y-50,it._.General_core_json,"area-pointer"));z.anchor.set(.5,.5),z.visible=!1,z.angle=90,z.scale.x=z.scale.y=0;const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;X.Aq$.isDefined(Y.backpack.data.hat)&&(Y.backpack.data.hat=Y.backpack.data.hat.filter((q=>12!==q.ID)));const Q=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),Z=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);Q.execute(Z.getStateMachine(45),{scene:this,game:q,screen:K,pointer:z,exit:this.exit,noot:this.noot},null)}jumpHand(q,K,z){K.visible=!0,q.add.tween(K.scale,this).to({x:1,y:1},800,X.GS3.Quadratic.Out).start(),q.add.tween(K,this).to({y:K.y-100},1e3,X.GS3.Quadratic.Out).to({y:K.y+50},1e3,X.GS3.Quadratic.In).start();const Y=q.add.tween(K,this).to({x:1180},2e3,X.GS3.Linear.None);X.Aq$.isDefined(z)&&Y.onTweenComplete.add(z),Y.start()}end(q){st.q.instance.prodigy.world.it("house-exit",480,320),this.zone.completeSequence(1,2)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.exit&&(this.exit.destroy(),this.exit=null),super.cleanup()}}class wC extends Zn.Z{constructor(q){super(q,"exterior",[it._.Npc_sprite_noot_json,"monster-reduced-38",Gn.t.Tileset_collisions_png,Gn.t.Tileset_generic_new_png,Gn.t.Tileset_forest_new_png,ot.V.Bgm_fun]),this.loadingData.time=1}setup(q,K,z){super.setup(q,K,z),this.noot=K.addNPC(770,480,it._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2,K.user.x=600,K.user.y=480,K.user.hideName()}start(q,K){super.start(q,K,11);const z=this.addMonster(q,K,1,this.game.width+100,480,!1,{encounter:[{ID:59}]},!0),Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),Q=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);Y.execute(Q.getStateMachine(44),{scene:this,game:q,screen:K,player:K.user,open:st.q.instance.prodigy.open,noot:this.noot,monster:z,path:K.path,pathfinder:K.path},null)}battle(q){const K={revampBattleType:Hi.gu.Tutorial1,intro:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_WIZARD_BATTLE"),screen:"battle-forest-generic",encounter:[{ID:59}],difficulty:2,dropsDisabled:!0,drops:[{type:"gold",N:50}]};this.technicalMetricsManager.sendOnboardingFunnelEvent(Qh.l.FirstTutorialBattleStarted),st.q.instance.prodigy.battle.battleStats.type="FirstTutorialBattle",st.q.instance.prodigy.battle.start(K,this.end.bind(this,q),this.end.bind(this,q),this.end.bind(this,q),"house-exit")}end(q){this.technicalMetricsManager.sendOnboardingFunnelEvent(Qh.l.FirstTutorialBattleWon),st.q.instance.prodigy.world.it("house-exterior",450,400),this.zone.completeSequence(1,1)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}class TC extends Zn.Z{constructor(q,K){super(q,"exterior",[it._.Npc_sprite_noot_json,"monster-reduced-38",Gn.t.Tileset_collisions_png,Gn.t.Tileset_generic_new_png,Gn.t.Tileset_forest_new_png,ot.V.Bgm_fun]),this.noot=null,this.loadingData.time=1}setup(q,K,z){super.setup(q,K,z),this.game=q,K.user.x=1500,K.user.y=480,this.noot=K.addNPC(1500,500,it._.Npc_sprite_noot_json),this.noot.float(!0)}start(q,K){super.start(q,K,9);const z=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);z.execute(Y.getStateMachine(191),{game:q,screen:K,scene:this,player:K.user,noot:this.noot,open:st.q.instance.prodigy.open,path:K.path,pathfinder:K.path},null)}end(q){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasCompletedTutorial()||st.q.instance.prodigy.world.getZone(mn.A_.HOUSE).completeQuest(1),st.q.instance.prodigy.world.it("forest-C8")}cleanup(){this.technicalMetricsManager.sendOnboardingFunnelEvent(Qh.l.TutorialComplete);const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q.data.isPostTutorialBattleTime=!0,q.forceSaveCharacter(),q.saveEnabled=!1,this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}class SC extends Zn.Z{constructor(q,K){super(q,"suburbs",K.concat([it._.Npc_sprite_noot_json,ht.c.Sfx_house_intro,ot.V.Bgm_fun])),this.loadingData.time=1}setup(q,K,z){super.setup(q,K,z),K.user.x=480,K.user.y=280,K.user.hideName(),K.user.setWeaponHidden(!0),st.q.instance.prodigy.create.houseItem(K.background,17,480,160),K.foreground.addChild(st.q.instance.prodigy.create.sprite(420,160,br.q.Sheets_dorm_17)),st.q.instance.prodigy.create.houseItem(K.background,3,400,160),st.q.instance.prodigy.create.houseItem(K.background,18,440,100),st.q.instance.prodigy.create.houseItem(K.background,18,840,100),st.q.instance.prodigy.create.houseItem(K.background,14,880,240),st.q.instance.prodigy.create.houseItem(K.background,1,880,140),st.q.instance.prodigy.create.houseItem(K.background,13,640,80)}start(q,K){super.start(q,K,11),this.technicalMetricsManager.sendOnboardingFunnelEvent(Qh.l.TutorialStart),this.houseIntro(q,K)}houseIntro(q,K){const z=K.addNPC(820,540,it._.Npc_sprite_noot_json);z.float(!0),z.walkSpeed=2,z.visible=!1;const Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),Q=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);Y.execute(Q.getStateMachine(56),{scene:this,game:q,screen:K,zone:this.zone,player:K.user,noot:z,path:K.path,pathfinder:K.path},null)}}class AC extends Zn.Z{constructor(q,K){super(q,"exit",[it._.Npc_sprite_noot_json,ht.c.Sfx_house_intro,ot.V.Bgm_fun,ht.c.Sfx_lamplight,ht.c.Sfx_lamplight_pets]),this.noot=null,this.loadingData.time=1}setup(q,K,z){super.setup(q,K,z),K.user.x=-100,K.user.y=600,this.monsters=[],this.monsters.push(this.makeMonster(136,1,q,K)),this.monsters.push(this.makeMonster(139,2,q,K)),this.monsters.push(this.makeMonster(145,3,q,K)),this.monsters.push(this.makeMonster(142,4,q,K)),this.monsters.push(this.makeMonster(148,5,q,K))}start(q,K){super.start(q,K,11),this.noot=K.addNPC(340,500,it._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.visible=!1;const z=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);z.execute(Y.getStateMachine(46),{game:q,screen:K,scene:this,player:K.user,monsterOne:this.monsters[0],monsterTwo:this.monsters[1],monsterThree:this.monsters[2],monsterFour:this.monsters[3],monsterFive:this.monsters[4],noot:this.noot,path:K.path,pathfinder:K.path,controller:z,service:Y},null)}end(){st.q.instance.prodigy.world.it("academy-GH3",640,700,null,{fadeIn:!0,time:200,fadeOut:!1})}endBattle(){const q=st.q.instance.prodigy.dialogue.create();q.setText({index:199}),q.setText({callback:()=>{this.end()}}),q.startDeprecated("noot",!1),this.zone.completeSequence(1,3)}choosePet(q,K,z){this.technicalMetricsManager.sendOnboardingFunnelEvent(Qh.l.InspectPet),st.q.instance.prodigy.open.choosePet(z,(()=>{this.petsLeave(q,K,z)}))}rescueBattle(q,K){const z={revampBattleType:Hi.gu.Tutorial2,intro:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_WIZARD_BATTLE"),starOverride:20,screen:"battle-forest-generic",dropsDisabled:!0,drops:[{type:"gold",N:50}],encounter:[{ID:K.monsterData.ID}],difficulty:3};st.q.instance.prodigy.battle.battleStats.type="RescueTutorialBattle",st.q.instance.prodigy.battle.start(z,(()=>{this.endBattle()}),(()=>{this.endBattle()}),(()=>{this.endBattle()}),"house-exit")}petsLeave(q,K,z){const Y=Z.remove(this.monsters,(q=>q.getSource().getID()===z))[0],Q=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),J=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);Q.execute(J.getStateMachine(47),{game:q,screen:K,scene:this,noot:this.noot,player:K.user,chosenMonster:Y,monsterOne:this.monsters[0],monsterTwo:this.monsters[1],monsterThree:this.monsters[2],monsterFour:this.monsters[3],path:K.path,pathfinder:K.path,controller:Q,service:J},null)}makeMonster(q,K,z,Y){const Q=this.addMonster(z,Y,K,500,200,!1,{encounter:[{ID:q}]},!0,this.choosePet.bind(this,z,Y,q));return Q.alpha=0,Q.walkSpeed=2,Q}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null);for(let q=0;q-1||q.indexOf("exterior")>-1||q.indexOf("warden")>-1)return void super.teleport(q,K,z,Y,Q);st.q.instance.prodigy.loading(!0);const J=X.Aq$.isDefined(Z)?Z:st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.player=J;const tt=K=>{this.teleportResponseCallback(K,q,J,Y,Q)};st.q.instance.prodigy.gameContainer.get("774-4659").getCharData(J.userID.toString(),["system"],tt,tt)}teleportResponseCallback(q,K,z,Y,Q={}){const Z=X.Aq$.isDefined(q)?q[z.userID]:null;if(st.q.instance.prodigy.loading(!1),X.Aq$.isDefined(Z)&&X.Aq$.isDefined(Z.system)&&Z.system.is_house_locked){const q=st.q.instance.prodigy.classModeController.getInClassDisabledZones();q.includes("WORLD_YOUR_HOUSE")||q.push("WORLD_YOUR_HOUSE"),st.q.instance.prodigy.open.messageBoxPrefab({text:"SYSTEM_LOCKED_HOUSE",confirmButtonTextKey:"BUTTON_OKAY_UPPERCASE"})}else{let q=K;if(Q.assets=X.Aq$.isDefined(Q.assets)?Q.assets:[],Q.autoStart=!0,-1===q.indexOf("preview")){let K=this.getHouseMapFromTag(z.house.getCurrentHouseTag());if(X.Aq$.isDefined(K)||(K=this.getHouseMapFromTag("suburbs")),!X.Aq$.isDefined(this.maps[K]))return void X.VyI.log(`House was not found: ${K}`,X.$bb.Verbose);q=K}this.maps[q].setOwner(z),super.teleport(q,null,null,Y,Q)}}openHouseStore(){st.q.instance.prodigy.open.houseStore((()=>{st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.house.setAllInactive(),this.teleport("")}),{message:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MOVE_HOUSE_CONFIRM")},uC.p.NEW_HOUSE)}getDailyMaps(){return[]}onWorldMapHouseIconClick(){this.game.broadcaster.removeAppListener(gi.F0.ClickedHouseIcon,this,"UI"),st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_HOUSE_MOVING,En.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE)||st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_HOUSE_MOVING,En.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE),st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_HOUSE_VISITING,En.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE)||st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_HOUSE_VISITING,En.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE)}intializeHouseMaps(){this.game.broadcaster.removeAppListener(gi.fP.Loaded,this);const q=[Gn.t.Tileset_collisions_png,Gn.t.Tileset_wall_collisions_png,Gn.t.Tileset_firefly_new_png,Gn.t.Tileset_generic_new_png,Gn.t.Tileset_minecarts_png,ot.V.Bgm_tutorial,Gn.t.Tileset_exterior_general_png,ot.V.Bgm_lamplight];this.maps={exit:new _C(this,q),exterior:new bC(this,q),warden:new yC(this,q)};const K=Ee.t.getCategoryItems("dormbg");for(const z in CC.HOUSES){const Y=CC.HOUSES[z];for(const z in Y.houses){let Q=-1;for(let q=0;q{this.openHarveyStore()}),this);const tt=this.screen.content.addChild(st.q.instance.prodigy.create.sprite(385,380,it._.Boss_titan_json,"harveySign"));tt.anchor.x=.5,tt.anchor.y=1,tt.inputEnabled=!0,tt.events.onInputDown.add((()=>{st.q.instance.prodigy.open.titanProgress(!0)})),K.addDoor({x:560,y:240,w:120,h:160,targetX:620,targetY:400},st.q.instance.prodigy.open.store.bind(st.q.instance.prodigy.open,3,void 0,void 0,{originType:Si.$N.Door})),K.addDoor({x:1e3,y:160,w:120,h:160,targetX:1060,targetY:320},st.q.instance.prodigy.open.stylistStore.bind(st.q.instance.prodigy.open,null,null,null,st.q.instance.prodigy.skin.isFestivalActive("Summerfest")?q=>{Z.times(2,(K=>{const z=0===K?50:51,Y=q.getPages()[K];Y.setStoreItems(Z.differenceWith(Y.getStoreItems(),Ee.t.getItem("itemTable",z).data.items,((q,K)=>q.getType()===K.type&&q.getID()===K.ID)))}))}:null))}openHarveyStore(){const q=new Ni.rD(this.game);q.addEvents([{callback:()=>{q.close(),st.q.instance.prodigy.open.store(21)}}]),q.start()}setIndicator(q){this.indicator=NT.createIndicator(q),this.indicator.position.set(-5,-105),this.indicator.inputEnabled=!0,this.game.add.tween(this.indicator,this).to({y:this.indicator.y-20},1e3,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0)}}const UC={x:40,y:500},FC={x:1120,y:60},GC={x:1240,y:420};class jC extends IC{constructor(q,K){super(q,"A4","MAP_LAMPLIGHT_PET_PARK",1120,180,["house-exit","lamplight-A3","lamplight-B4"],K,[{targetMapTag:"house-exit",position:UC,angle:lC.Left},{targetMapTag:"lamplight-A3",position:FC,angle:lC.Up},{targetMapTag:"lamplight-B4",position:GC,angle:lC.Right}])}setup(q,K,z={}){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1150,y:700,w:340,h:80,rect:!0},"lamplight-B2",320,340,null,WT.K.DOWN),st.q.instance.prodigy.world.getZone(mn.A_.HOUSE).completeQuest(1);const Y=Z.get(z,"distractCallback",null);this.addAreaEvent(q,K,Object.assign(Object.assign({},UC),{w:80,h:160,rect:!0}),"house-exit",1160,380,Z.get(z,"blockDirectionCallbacks.left",null),WT.K.LEFT),this.addAreaEvent(q,K,Object.assign(Object.assign({},FC),{w:160,h:120,rect:!0}),"lamplight-A3",1120,540,Z.get(z,"blockDirectionCallbacks.up",null),WT.K.UP),this.addAreaEvent(q,K,Object.assign(Object.assign({},GC),{w:80,h:200,rect:!0}),"lamplight-B4",120,457.5,Z.get(z,"blockDirectionCallbacks.right",Y),WT.K.RIGHT),K.addDoor({x:280,y:240,w:120,h:160,targetX:340,targetY:400},(()=>{st.q.instance.prodigy.open.store(1)}))}}class $C extends IC{constructor(q,K){super(q,"B0","MAP_LAMPLIGHT_ACADEMY_ENTRANCE",-500,600,["lamplight-B1"],K.concat([it._.Zone_lamplight_json,Gn.t.Tileset_firefly_new_png,ot.V.Bgm_puppetmaster,ht.c.Sfx_academy_portal_open,ht.c.Sfx_academy_portal_close,ot.V.Bgm_academy_greathall]),[])}setup(q,K,z={}){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;di.U.progressData.step===hi.B.NotStarted&&Y.hasFoundAllKeystones()?Xn.E.runAllKeystonesSequenceOnMapSetup((()=>(0,Q.sH)(this,void 0,void 0,(function*(){this.setup(q,K,z)})))):st.q.instance.prodigy.world.zones.academy.playScene("introPt1")}}const HC={x:40,y:480},VC={x:1100,y:680};class WC extends IC{constructor(q,K){super(q,"B1","MAP_LAMPLIGHT_ACADEMY_CROSSROADS",160,600,["forest-C8","lamplight-B2"],K,[{targetMapTag:"forest-C8",position:HC,angle:lC.Left},{targetMapTag:"lamplight-B2",position:VC,angle:lC.Down}])}setup(q,K,z={}){super.setup(q,K);let Y=null;Y=this.featureRequirements.meetsRequirementsDeprecated(32)?Z.get(z,"distractCallback",null):()=>{Na.i.openLockMessage(mn.A_.FOREST)},this.addAreaEvent(q,K,Object.assign(Object.assign({},VC),{w:240,h:80,rect:!0,canReTrigger:!0}),"lamplight-B2",640,260,null,WT.K.DOWN);let Q;switch(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.currentDifficulty){case vi.i.Expert:Q="forest_expert-C8";break;case vi.i.Hard:Q="forest_hard-C8";break;default:Q="forest-C8"}this.addAreaEvent(q,K,Object.assign(Object.assign({},HC),{w:80,h:240,rect:!0}),Q,1160,520,Y,WT.K.LEFT)}}const qC={x:640,y:40},KC={x:1240,y:440},zC={x:40,y:320};class YC extends IC{constructor(q,K){super(q,"B2","MAP_LAMPLIGHT_OUTSKIRTS",640,220,["lamplight-A2","lamplight-B1","lamplight-C2"],K,[{targetMapTag:"lamplight-B1",position:qC,angle:lC.Up},{targetMapTag:"lamplight-C2",position:KC,angle:lC.Right},{targetMapTag:"lamplight-A2",position:zC,angle:lC.Left}])}setup(q,K,z={}){super.setup(q,K),this.addAreaEvent(q,K,Object.assign(Object.assign({},qC),{w:240,h:200,rect:!0}),"lamplight-B1",1100,600,null,WT.K.UP),this.addAreaEvent(q,K,Object.assign(Object.assign({},KC),{w:80,h:160,rect:!0}),"lamplight-C2",120,320,null,WT.K.RIGHT),this.addAreaEvent(q,K,Object.assign(Object.assign({},zC),{w:80,h:160,rect:!0}),"lamplight-A2",1160,360,null,WT.K.LEFT)}}const QC={x:1240,y:380},XC={x:40,y:380},ZC={x:650,y:300};class JC extends IC{constructor(q,K){super(q,"B3","MAP_LAMPLIGHT_TOWN_SQUARE",120,417.5,["lamplight-A3","lamplight-C3"],K.concat(it._.Zone_lamplight_json,it._.Npc_sprite_merchant_json,ct.Q.Spine_npc_slimerella_json),[{targetMapTag:"lamplight-C3",position:QC,angle:lC.Right},{targetMapTag:"lamplight-A3",position:XC,angle:lC.Left},{targetMapTag:"moon-A1",position:ZC,angle:lC.Up}])}init(q,K,z,Y){if(st.q.instance.prodigy.skin.isFestivalActive(ri.R.Springfest)){const q=st.q.instance.prodigy.skin.active.find((q=>q instanceof rT));if(X.Aq$.isDefined(q))for(const[K,z]of Object.entries(q.b3FishLayerStates))this.enableLayerID(Number(K),z)}else Nn.J.isNightTime()?(this.enableLayerID(1,!0),this.enableLayerID(0,!1)):(this.enableLayerID(1,!1),this.enableLayerID(0,!0));return super.init(q,K,z,Y)}setup(q,K,z={}){super.setup(q,K),this.setupAsync(q,K,z).catch(X.RQr.createHandler("Error setting up LamplightB3"))}setupAsync(q,K){return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z={}){if(this.addAreaEvent(q,K,Object.assign(Object.assign({},QC),{w:80,h:240,rect:!0}),"lamplight-C3",120,437.5,null,WT.K.RIGHT),this.addAreaEvent(q,K,Object.assign(Object.assign({},XC),{w:80,h:240,rect:!0}),"lamplight-A3",1160,437.5,null,WT.K.LEFT),lf.J.meetsNarrativeIntroRequirements)return st.q.instance.game.input.enabled=!1,void this.zone.playScene("campaignReplayNarrativeIntro");if(lf.J.meetsNarrativeCatchupRequirements)return st.q.instance.game.input.enabled=!1,void this.zone.playScene("campaignReplayNarrativeCatchup");const Y=st.q.instance.prodigy.gameContainer.get("983-05a7");if(st.q.instance.prodigy.skin.isFestivalActive(ri.R.Summerfest))this.slimerella=new hT.p(this.game,"NPC_NAME_SCIENTIST_SLIME",491,sa.ac.Merchant,K.content,950,570,"idle",K.foreground);else if(st.q.instance.prodigy.skin.isFestivalActive(ri.R.StarlightFestival)||st.q.instance.prodigy.skin.isFestivalActive(ri.R.Pumpkinfest)||st.q.instance.prodigy.skin.isFestivalActive(ri.R.Winterfest)||st.q.instance.prodigy.skin.isFestivalActive(ri.R.MoonlightFestival));else if(st.q.instance.prodigy.skin.isFestivalActive())this.slimerella=new hT.p(this.game,"NPC_NAME_SCIENTIST_SLIME",491,sa.ac.Merchant,K.content,260,575,"idle",K.foreground);else{K.content.addChild(st.q.instance.prodigy.create.image(987,80,it._.Zone_lamplight_json,Nn.J.isNightTime()?"twilight-wheel":"twilight-wheel-off")),K.addDoor({x:1e3,y:80,w:200,h:200,targetX:1100,targetY:280,disableSound:!0},(()=>{this.openTwilightWheel(this.game,K)}));const q={gnomeWheelerNpcOnClick:(...q)=>{this.openTwilightWheel(this.game,K)}},z={gnomeSpinnerNpcOnClick:(...q)=>{this.openDayWheel(this.game,K)}};cr.d.loadWithInjectedValuesAndDependenciesFromGUID(Y,Pi.l.NPCGnomeWheeler,q,K.contentGameObject).then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){q.transform.setPosition(960,300),K.data.addCollisionZone(K,940,230,90,90)})))).catch(X.RQr.createHandler("Error loading NPC Gnome Wheeler")),K.content.addChild(st.q.instance.prodigy.create.image(95,80,it._.Zone_lamplight_json,"wheel-of-wonder")),K.addDoor({x:100,y:80,w:160,h:200,targetX:180,targetY:280,disableSound:!0},(()=>{this.openDayWheel(this.game,K)})),cr.d.loadWithInjectedValuesAndDependenciesFromGUID(Y,Pi.l.NPCGnomeSpinner,z,K.contentGameObject).then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){q.transform.setPosition(310,300),K.data.addCollisionZone(K,280,230,90,90)})))).catch(X.RQr.createHandler("Error loading NPC Gnome Spinner")).then(),this.slimerella=new hT.p(this.game,"NPC_NAME_SCIENTIST_SLIME",491,sa.ac.Merchant,K.content,260,575,"idle",K.foreground)}if(this.slimerella){const q=!0===this.zone.getState("firstPotion");this.slimerella.onClick.add((()=>{const K=new Ni.rD(this.game);q&&K.addEvents([{dialogueData:K.dataProvider.get(645),blockInput:!0},{dialogueData:K.dataProvider.get(646),blockInput:!0},{callback:()=>{this.zone.setState("firstPotion",!1)}}]),K.addEvents([{dialogueData:K.dataProvider.get(651),blockInput:!0},{dialogueData:K.dataProvider.get(652),blockInput:!0}]),K.addEvents([{callback:()=>{K.close(),st.q.instance.prodigy.open.store(4)}}]),K.start()}),this)}}))}openTwilightWheel(q,K){if(Nn.J.isNightTime()){const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;new Ln.Q(q,K.menus,z,K,2)}else this.segment.economy.sendPrizeWheelSpinFailedEvent(In.U.TwilightWheel,Pn.WE.OutsideOfHours),st.q.instance.prodigy.open.messageBoxOkay(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TWILIGHT_WHEEL_COME_BACK_LATER"),st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("BUTTON_OKAY"),null)}openDayWheel(q,K){const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;new Ln.Q(q,K.menus,z,K,1)}}const tO={x:1240,y:420},eO={x:40,y:420},iO={x:160,y:680};class sO extends IC{constructor(q,K){super(q,"B4","MAP_LAMPLIGHT_LOWER_INTERSECTION",160,600,["lamplight-A4","lamplight-C4","lamplight-B5"],K,[{targetMapTag:"lamplight-C4",position:tO,angle:lC.Right},{targetMapTag:"lamplight-A4",position:eO,angle:lC.Left},{targetMapTag:"lamplight-B5",position:iO,angle:lC.Down}])}setup(q,K,z={}){super.setup(q,K,z),this.addAreaEvent(q,K,Object.assign(Object.assign({},tO),{w:80,h:200,rect:!0}),"lamplight-C4",180,457.5,null,WT.K.RIGHT),this.addAreaEvent(q,K,Object.assign(Object.assign({},eO),{w:80,h:200,rect:!0}),"lamplight-A4",1160,457.5,null,WT.K.LEFT),this.addAreaEvent(q,K,Object.assign(Object.assign({},iO),{w:160,h:80,rect:!0}),"lamplight-B5",200,120,null,WT.K.DOWN),K.addDoor({x:600,y:240,w:120,h:160,targetX:660,targetY:400},(()=>{st.q.instance.prodigy.start(Ue.G.DanceDance)}))}}const nO={x:200,y:40};class aO extends IC{constructor(q,K){super(q,"B5","MAP_LAMPLIGHT_SOUTHERN_DOCK",200,120,["lamplight-B4"],K,[{targetMapTag:"lamplight-B4",position:nO,angle:lC.Up}])}setup(q,K,z={}){super.setup(q,K,z),this.addAreaEvent(q,K,Object.assign(Object.assign({},nO),{w:160,h:80,rect:!0}),"lamplight-B4",160,600,null,WT.K.UP)}}const rO={x:40,y:320},oO={x:200,y:680};class hO extends IC{constructor(q,K){super(q,"C2","MAP_LAMPLIGHT_HISTORY_DISTRICT",200,600,["lamplight-B2","lamplight-C3"],K.concat([it._.Npc_sprite_noot_json]),[{targetMapTag:"lamplight-B2",position:rO,angle:lC.Left},{targetMapTag:"lamplight-C3",position:oO,angle:lC.Down}])}setup(q,K,z={}){super.setup(q,K,z),this.addAreaEvent(q,K,Object.assign(Object.assign({},rO),{w:80,h:160,rect:!0}),"lamplight-B2",1160,440,null,WT.K.LEFT),this.addAreaEvent(q,K,Object.assign(Object.assign({},oO),{w:160,h:80,rect:!0}),"lamplight-C3",200,240,null,WT.K.DOWN)}}const cO={x:40,y:400},dO={x:200,y:80},lO={x:160,y:660};class uO extends IC{constructor(q,K){super(q,"C3-arena","MAP_LAMPLIGHT_COLISEUM",160,540,["lamplight-B3","lamplight-C2","lamplight-C4"],K.concat([Gn.t.Tileset_arena_gold_png,it._.Npc_sprite_noot_json]),[{targetMapTag:"lamplight-B3",position:cO,angle:lC.Left},{targetMapTag:"lamplight-C2",position:dO,angle:lC.Up},{targetMapTag:"lamplight-C4",position:lO,angle:lC.Down}])}setup(q,K,z={}){super.setup(q,K,z),this.addAreaEvent(q,K,Object.assign(Object.assign({},cO),{w:80,h:240,rect:!0}),"lamplight-B3",1160,417.5,null,WT.K.LEFT),this.addAreaEvent(q,K,Object.assign(Object.assign({},dO),{w:160,h:160,rect:!0}),"lamplight-C2",200,600,null,WT.K.UP),this.addAreaEvent(q,K,Object.assign(Object.assign({},lO),{w:160,h:120,rect:!0}),"lamplight-C4",200,180,null,WT.K.DOWN);const Y=fr.loadWithInjectedValues(this.prefabLoader,Pi.l.PVPArenaOutsideTrophyCase,{TROPHY_CASE_GUID:st.q.instance.prodigy.skin.isFestivalActive(ri.R.Pumpkinfest)?br.q.Trophy_exterior_00_night:br.q.Trophy_exterior_00});K.contentGameObject.addChild(Y),Y.transform.setPosition(510,36),K.addDoor({x:520,y:200,w:120,h:160,targetX:580,targetY:360},(()=>{this.onArenaEnterGameDiscoveryEvent(),st.q.instance.prodigy.world.it("lamplight-coliseum")}))}onArenaEnterGameDiscoveryEvent(){this.segment.featureCommon.sendInterfaceEvent({interfaceName:Ah.B.HiArenaHub,interfaceType:Si.Wm.Screen,originType:Si.$N.Door})}}(0,Q.Cg)([(0,X.fFd)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],uO.prototype,"prefabLoader",void 0);class fO extends na.R{constructor(q,K,z,Y){const Q=new ia.s(q);Q.init({npc_name:"NPC_NAME_TOY_MERCHANT",npc_type:sa.ac.Merchant,x_coord:z,y_coord:Y,npc_animation_id:"idle"}),super(q,K,Q,null,z,Y),this._tweens=[],this.setup()}setup(){this._standTween=[];const q=it._.Npc_sprite_toy_json,K="machav2-";An.K.cacheAsset(this.game,q,An.K.zoneAssetsCached),this._spriteContainer=st.q.instance.prodigy.create.element(this.sprites,0,0),this._shadow=this._spriteContainer.add(st.q.instance.prodigy.create.sprite(19,19,q,`${K}shadow`)),this._shadow.anchor.set(.5,.5),this._body=this._spriteContainer.add(st.q.instance.prodigy.create.sprite(-4,-43,q,`${K}body1`)),this._spriteContainer.add(st.q.instance.prodigy.create.sprite(-17,-107,q,`${K}head1`,null,this.createStandTween.bind(this,K))),this._spriteContainer.add(st.q.instance.prodigy.create.sprite(50,-150,q,"toy-merchant-cart"));for(let z=0;z{q.close(),st.q.instance.prodigy.open.store(46)}}]),q.start(),this.sendNpcClickedEvent()}}const bO={x:60,y:420},pO={x:200,y:60};class vO extends IC{constructor(q,K){super(q,"C4","MAP_LAMPLIGHT_MARKET",200,180,["lamplight-B4","lamplight-C3"],K.concat([it._.Npc_sprite_noot_json,it._.Npc_sprite_toy_json]),[{targetMapTag:"lamplight-B4",position:bO,angle:lC.Left},{targetMapTag:"lamplight-C3",position:pO,angle:lC.Up}])}setup(q,K,z={}){super.setup(q,K,z),this.addAreaEvent(q,K,Object.assign(Object.assign({},bO),{w:120,h:200,rect:!0}),"lamplight-B4",1160,457.5,Z.get(z,"distractCallback",null),WT.K.LEFT),this.addAreaEvent(q,K,Object.assign(Object.assign({},pO),{w:160,h:120,rect:!0}),"lamplight-C3",160,540,null,WT.K.UP),K.addDoor({x:840,y:280,w:120,h:160,targetX:900,targetY:440},st.q.instance.prodigy.open.store.bind(st.q.instance.prodigy.open,2)),new fO(q,K.content,430,370)}}var gO;!function(q){q[q.ArenaMaster=0]="ArenaMaster",q[q.ArenaGate=1]="ArenaGate",q[q.TrophyCase=2]="TrophyCase",q[q.Signpost=3]="Signpost"}(gO||(gO={}));class mO extends zn.T{constructor(q,K){super(q,"arena-lobby","MAP_LAMPLIGHT_COLISEUM",640,520,[],K.concat([Gn.t.Tileset_darktower_png,Gn.t.Tileset_town_new_png,it._.Npc_sprite_clankboot_json,it._.Npc_sprite_gnome_json,Gn.t.Tileset_water_new_png,br.q.Parallax_tier1_front_small,br.q.Parallax_tier2_front_small,br.q.Parallax_tier3_front_small,br.q.Parallax_tier1_back_small,br.q.Parallax_tier2_back_small,br.q.Parallax_tier3_back_small,br.q.Blur_tier1_tier2_front_small,br.q.Blur_tier2_tier3_front_small,br.q.Blur_tier1_tier2_back_small,br.q.Blur_tier2_tier3_back_small,"references",Gn.t.Tileset_arena_gold_png,Gn.t.Tileset_ancient_ruins_png,Gn.t.Tileset_arena_bronze_png,ot.V.Bgm_arena_lobby,it._.Tileset_core_json,it._.Ui_battle_arena_json,it._.Ui_coop_json,it._.Ui_store_json,it._.Ui_icons_json,it._.General_map_json,it._.Ui_guide_hands_json,ct.Q.Spine_shadowportal_json,ct.Q.Spine_arena_shield_bronze1_json,ct.Q.Spine_arena_shield_bronze2_json,ct.Q.Spine_arena_shield_bronze3_json,ct.Q.Spine_arena_shield_silver1_json,ct.Q.Spine_arena_shield_silver2_json,ct.Q.Spine_arena_shield_silver3_json,ct.Q.Spine_arena_shield_gold1_json,ct.Q.Spine_arena_shield_gold2_json,ct.Q.Spine_arena_shield_gold3_json,ct.Q.Spine_arena_shield_bronze3_small_json,ct.Q.Spine_arena_shield_bronze2_small_json,ct.Q.Spine_arena_shield_bronze1_small_json,ct.Q.Spine_arena_shield_silver3_small_json,ct.Q.Spine_arena_shield_silver2_small_json,ct.Q.Spine_arena_shield_silver1_small_json,ct.Q.Spine_arena_shield_gold3_small_json,ct.Q.Spine_arena_shield_gold2_small_json,ct.Q.Spine_arena_shield_gold1_small_json,ct.Q.Spine_arena_torch_bronze_json,ct.Q.Spine_arena_torch_silver_json,ct.Q.Spine_arena_torch_gold_json,ct.Q.Spine_arena_fountain_parallax_json,ht.c.Sfx_arena_gate_open,ht.c.Sfx_arena_gate_close])),this._isGateOpen=!1,this._targetPrefabConfig=null,this._loadingPrefabs=[],this._coliseumPrefabs=[{prefab:Pi.l.PVPArenaNPCArenaMaster,position:new tt.Point(700,280),actionParameters:{x:620,y:300,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0},{prefab:Pi.l.PVPArenaGate,position:new tt.Point(640,250),actionParameters:{x:620,y:300,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0},{prefab:Pi.l.PVPArenaTrophyCase,position:new tt.Point(303,263),actionParameters:{x:300,y:300,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0},{prefab:Pi.l.PVPArenaSignpost,position:new tt.Point(1e3,268),actionParameters:{x:1e3,y:295,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0}]}setup(q,K,z={}){super.setup(q,K,z),this.addScenePrefabs()}cleanup(){this._loadingPrefabs.forEach((q=>{q.cancel()})),this._loadingPrefabs=[],super.cleanup()}addScenePrefabs(){this.addArenaGate(),this.addTrophyCase(),Promise.all(this._loadingPrefabs.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.promise}))))).then((()=>{this.exitDoor()})).catch((q=>{X.VyI.log(`One or more of the scene prefabs did load correctly; ${q.message}`,X.$bb.Warning),this.exitDoor()}))}addPrefab(q){const K=this._prefabLoader.loadWithDependenciesFromGUID(q.prefab,q.parentGameObject);K.then((K=>{var z;q.gameObject=K,K.transform.setPosition(q.position.x,q.position.y);const Y=K.findComponentInChildren(Kl.n);X.Aq$.isDefined(Y)&&Y.onClicked.add(this.conditionalWalk.bind(this,q)),X.Aq$.isDefined(null===(z=q.actionParameters)||void 0===z?void 0:z.callback)&&(q.areaEvent=this.addAreaEvent(this.game,this.screen,q.actionParameters,null,q.actionParameters.x,q.actionParameters.y,this.runLamplightPrefabCallback.bind(this,q),WT.K.LEFT,!1,!1))})).catch((K=>(X.VyI.log(`WARNING: Could not load prefab ${q.prefab} due to ${K.message}`,X.$bb.Warning),null))),this._loadingPrefabs.push(K)}conditionalWalk(q){X.Aq$.isDefined(q.actionParameters.callback)&&q.inputEnabled&&(this._targetPrefabConfig=q,this.validPathTo(this.game,this.screen,q.actionParameters.x,q.actionParameters.y))}addArenaMaster(){const q=this._coliseumPrefabs[gO.ArenaMaster];q.parentGameObject=this.screen.contentGameObject,this.addPrefab(q)}addArenaGate(){const q=this._coliseumPrefabs[gO.ArenaGate];q.parentGameObject=this.screen.contentGameObject,this.addPrefab(q)}addTrophyCase(){const q=this._coliseumPrefabs[gO.TrophyCase];q.parentGameObject=this.screen.contentGameObject,this.addPrefab(q)}addSignpost(){const q=this._coliseumPrefabs[gO.Signpost];q.parentGameObject=this.screen.contentGameObject,this.addPrefab(q)}runLamplightPrefabCallback(q){X.Aq$.isDefined(q.actionParameters.callback)&&q===this._targetPrefabConfig&&q.inputEnabled&&q.actionParameters.callback()}exitDoor(){const q=st.q.instance.prodigy.classModeController.isClassMode();this.screen.addDoor({x:560,y:540,w:240,h:150,targetX:640,targetY:600},(()=>{q?st.q.instance.prodigy.open.map():this.backToLampLight()}))}backToLampLight(){this.zone.bgmID=9,st.q.instance.prodigy.world.it("lamplight-C3",580,440)}forceInteraction(q){this._coliseumPrefabs.forEach((K=>{K.inputEnabled=q.includes(K.prefab)}))}openInteraction(){this._coliseumPrefabs.forEach((q=>{q.inputEnabled=!0}))}openGateAnimation(q){const K=this._coliseumPrefabs[gO.ArenaGate].gameObject.findComponentInChildren(Ur.j);K.stopAnimation(),K.playAnimation("lift",!1),st.q.instance.prodigy.audio.playSFX(115,"play"),K.spine.getSpine().onComplete.addOnce(q),this._isGateOpen=!0,this.forceInteraction([]),this.screen.walkEnabled=!1,this.game.broadcaster.broadcast(gi.Y1.HideRightSideHUD,gi.HG.HUD)}closeGateAnimation(){if(this._isGateOpen){const q=this._coliseumPrefabs[gO.ArenaGate].gameObject.findComponentInChildren(Ur.j);q.stopAnimation(),q.playAnimation("close",!1),st.q.instance.prodigy.audio.playSFX(116,"play"),this._isGateOpen=!1}this.screen.walkEnabled=!0,this.openInteraction(),st.q.instance.prodigy.audio.playBGM(38,!0),st.q.instance.prodigy.audio.resumeBGM(),st.q.instance.prodigy.notifications.resume(this),this.walkAway(),this.game.broadcaster.broadcast(gi.Y1.ShowRightSideHUD,gi.HG.HUD)}walkAway(q=!1){const K=q?-mO.AFTER_WALK.x:mO.AFTER_WALK.x,z=q?-mO.AFTER_WALK.y:mO.AFTER_WALK.y;this.validPathTo(this.game,this.screen,this.screen.user.position.x+K,this.screen.user.position.y+z)}setLobbyActive(q=!0){this.screen.backgroundGameObject.active=this.screen.contentGameObject.active=this.screen.foregroundGameObject.active=q}}mO.AFTER_WALK=new X.I9Y(-30,30),(0,Q.Cg)([(0,X.fFd)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],mO.prototype,"_prefabLoader",void 0);const yO={x:0,y:460};class _O extends IC{constructor(q,K){super(q,"D3","MAP_LAMPLIGHT_FORT_FOX",100,460,["lamplight-C3"],K,[{targetMapTag:"lamplight-C3",position:yO,angle:lC.Left}])}setup(q,K,z={}){super.setup(q,K),this.addAreaEvent(q,K,Object.assign(Object.assign({},yO),{w:80,h:260,rect:!0}),"lamplight-C3",1050,510,null,WT.K.LEFT)}}class EO extends jn.T{constructor(q,K){super(q,K,1,"",{type:"seq",N:7},["lamplight-A3"],[],[],[10],[],!1)}setup(q,K,z){return super.setup(q,K,z),this.zone.completeQuest(1),null}}var wO,TO,SO=z(90817),AO=z(97651);class CO extends Zn.Z{constructor(q,K){super(q,"B3",K.concat(),"map-lamplight-B3")}setup(q,K,z){super.setup(q,K,z),st.q.instance.prodigy.notifications.pause(this),K.user.position.set(120,415),K.input.enabled=!1}start(q,K){super.start(q,K),this.playCutscene().catch((q=>{X.RQr.logError(q,"Error playing Campaign Replay Narrative Intro cutscene"),this.endCutscene()}))}playCutscene(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=new X._mx;X.wa5.getActiveScene().addGameObject(q),this.cutsceneLoadPromise=cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.CampaignReplayNarrativeCatchupCutscene,{HAS_CHARGED_LEVELS:Nh.e.activePlayerHasChargedLevels,SHOW_CHARGED_LOST:this.chargedLostAnimation.bind(this),END_CUTSCENE:this.endCutscene.bind(this)},q),yield this.cutsceneLoadPromise,SO.gz.instance.sendAnalyticsStepEvent(Qh.l.CampaignReplayFtuePuppetMasterCutSceneStart,1),X.VyI.log("Narrative catchup cutscene prefab loaded",X.$bb.Info)}))}chargedLostAnimation(){var q,K,z,Y;const Q=null!==(Y=null===(z=null===(K=null===(q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2"))||void 0===q?void 0:q.player)||void 0===K?void 0:K.playerContainer)||void 0===z?void 0:z.playerPrefab)&&void 0!==Y?Y:X.wa5.getActiveScene().container.get("MainPlayerGameObject"),Z=null==Q?void 0:Q.findComponentInChildren(AO.e);Z.showChargeLostEffect(),Z.bindLevel(0)}endCutscene(){st.q.instance.prodigy.gameContainer.get("66f-d9d3").setProgress({step:bi.q6.HardModeIntroduced}),st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_CAMPAIGN_REPLAY,En.B.BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN),st.q.instance.prodigy.open.menuCloseAll(),SO.gz.instance.sendAnalyticsStepEvent(Qh.l.CampaignReplayFtueChargedLevelsRemoved,2),st.q.instance.prodigy.gameContainer.get("782-c308").updateChargedLevelsData().then((()=>st.q.instance.prodigy.world.teleportToCurrentMap())).catch(X.RQr.createHandler("CampaignReplayNarrativeCatchup.endCutscene: Failed to updated charged levels data"))}cleanup(){var q;st.q.instance.prodigy.notifications.resume(this),null===(q=this.cutsceneLoadPromise)||void 0===q||q.cancel(),super.cleanup()}}class OO extends Zn.Z{constructor(q,K){super(q,"B3",K.concat(),"map-lamplight-B3")}setup(q,K,z){super.setup(q,K,z),st.q.instance.prodigy.notifications.pause(this),K.user.position.set(120,415),di.U.shouldShowPuppetMasterDefeatCelebration()&&OC.E.addConfetti(this.screen.foregroundGameObject)}start(q,K){super.start(q,K),this.playCutscene().catch((q=>{X.RQr.logError(q,"Error playing Campaign Replay Narrative Intro cutscene"),this.endCutscene()}))}playCutscene(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=new X._mx;X.wa5.getActiveScene().addGameObject(q),this.cutsceneLoadPromise=cr.d.loadWithInjectedValuesAndDependenciesFromGUID(st.q.instance.prodigy.gameContainer.get("983-05a7"),Pi.l.CampaignReplayNarrativeIntroCutscene,{HAS_CHARGED_LEVELS:Nh.e.activePlayerHasChargedLevels,SHOW_CHARGED_LOST:this.chargedLostAnimation.bind(this),END_CUTSCENE:this.endCutscene.bind(this)},q),yield this.cutsceneLoadPromise,SO.gz.instance.sendAnalyticsStepEvent(Qh.l.CampaignReplayFtuePuppetMasterCutSceneStart,1),X.VyI.log("Narrative intro cutscene prefab loaded",X.$bb.Info)}))}chargedLostAnimation(){var q,K,z,Y;const Q=null!==(Y=null===(z=null===(K=null===(q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2"))||void 0===q?void 0:q.player)||void 0===K?void 0:K.playerContainer)||void 0===z?void 0:z.playerPrefab)&&void 0!==Y?Y:X.wa5.getActiveScene().container.get("MainPlayerGameObject"),Z=null==Q?void 0:Q.findComponentInChildren(AO.e);Z.showChargeLostEffect(),Z.bindLevel(0)}endCutscene(){st.q.instance.prodigy.gameContainer.get("66f-d9d3").setProgress({step:bi.q6.HardModeIntroduced}),st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_CAMPAIGN_REPLAY,En.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN),st.q.instance.prodigy.open.menuCloseAll(),SO.gz.instance.sendAnalyticsStepEvent(Qh.l.CampaignReplayFtuePuppetMasterCutSceneEnd,2),st.q.instance.prodigy.open.map({disableClose:!0,onClose:this.onWorldMapClosed,forceUnlock:["WORLD_FIREFLY_FOREST"],disableZoneGoals:!0})}onWorldMapClosed(){lf.J.featureDataHealthCheck(),st.q.instance.prodigy.world.it("lamplight-B3",580,360)}cleanup(){var q;st.q.instance.prodigy.notifications.resume(this),null===(q=this.cutsceneLoadPromise)||void 0===q||q.cancel(),super.cleanup()}}class IO extends Zn.Z{constructor(q,K){super(q,"B3",K.concat([ct.Q.Spine_npc_harriet_json,ct.Q.Spine_npc_don_zorro_json])),this.loadingData.time=1}start(q,K){st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.HarrietNPC,590,415).catch(X.RQr.createHandler(`SpringfestIntro: Unable to load the NPC Prefab: ${Pi.l.HarrietNPC}`)),st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.DonZorroNPC,700,390).catch(X.RQr.createHandler(`SpringfestIntro: Unable to load the NPC Prefab: ${Pi.l.DonZorroNPC}`)),this.enterScene(q,K,(()=>{this.introDialogue(q,K)}))}introDialogue(q,K){const z=new Ni.rD(q);z.addEvents([{dialogueData:z.dataProvider.get(780),blockInput:!0},{dialogueData:z.dataProvider.get(795),blockInput:!0},{dialogueData:z.dataProvider.get(781),blockInput:!0},{dialogueData:z.dataProvider.get(796),blockInput:!0},{dialogueData:z.dataProvider.get(782),blockInput:!0},{dialogueData:z.dataProvider.get(797),blockInput:!0},{callback:()=>{this.addSpringfestHat(126)}},{dialogueData:z.dataProvider.get(783),blockInput:!0},{dialogueData:z.dataProvider.get(784),blockInput:!0},{callback:()=>{this.addSpringfestHat(123,(()=>{this.end(q,K,!0)}))}}]),z.start(!0)}addSpringfestHat(q,K){const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily,Y=126===q?aT.f.HARRIET_NAME_SEGMENT:aT.f.DON_ZORRO_NAME_SEGMENT;st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("hat",q)<=0?st.q.instance.prodigy.open.gotItem([{type:"hat",ID:q,N:1}],K,void 0,void 0,void 0,void 0,{source_type:On.C.Npc,source_id:Y,instance_type:z.festivalType,instance_id:z.getFestivalInstanceName()}):K&&K()}end(q,K,z){st.q.instance.prodigy.notifications.resumeAll(),z&&(st.q.instance.prodigy.world.it(aT.f.TOWN_CENTRE,120,420,void 0,{fadeIn:!0,time:500,fadeOut:!0}),st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_SPRINGFEST_CUTSCENES,En.B.BREADCRUMB_SPRINGFEST_INTRO))}}class DO extends Zn.Z{constructor(q,K){super(q,"B3",K,"map-lamplight-b3-summerfest"),this.loadingData.time=1}start(q,K){K.user.x=590,K.user.y=322,K.content.addChild(st.q.instance.prodigy.create.image(78,75,it._.Event_summerfest_json,"wheel-of-sun-map-asset"));const z=new hT.p(q,"NPC_NAME_ATHENA",166,sa.ac.Merchant,K.content,728,314,"idle");z.flip();const Y=new hT.p(q,"NPC_NAME_MIST",168,sa.ac.Merchant,K.content,568,506,"idle"),Q=new hT.p(q,"NPC_NAME_MIZU",169,sa.ac.Nicknamer,K.content,712,506,"idle");Q.flip();const Z=this.addMonster(q,K,151,-100,360,!0,{encounter:[{ID:151}],range:0}),J=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),tt=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService);J.execute(tt.getStateMachine(109),{scene:this,game:q,screen:K,player:K.user,athena:z,koi:new hT.p(q,"NPC_NAME_KOI",167,sa.ac.WheelGiver,K.content,310,300,"idle"),mist:Y,mizu:Q,applepot:Z},null)}}class RO extends Cn.b{constructor(q){super(q),this.difficultyModeAgnostic=!0,this.monsters={randDir:!0,encounter:[{ID:59},{ID:52},{ID:36}]},this.name="Lamplight",this.ID=mn.A_.LAMPLIGHT,this.game=q,this.bgmID=9,this.currency=1,this.minLevel=1,this.maxLevel=4,this.battleBG="battle-lamplight-outside",this.defaultOnFaint="lamplight-B3",this.questHub="lamplight-B3",this.zoneIndex=AT.P.Lamplight,this.states=["event","1stpresent","bounty","daily","firstPotion"];const K=[Gn.t.Tileset_generic_new_png,Gn.t.Tileset_town_new_png,Gn.t.Tileset_forest_new_png,Gn.t.Tileset_collisions_png,it._.Npc_sprite_gnome_json,it._.Zone_lamplight_json,ot.V.Bgm_lamplight,ht.c.Sfx_lamplight,it._.Npc_sprite_scoog_json];this.maps={A1:new RC(this,K),A2:new NC(this,K),A3:new BC(this,K),A4:new jC(this,K),B0:new $C(this,K),B1:new WC(this,K),B2:new YC(this,K),B3:new JC(this,K),B4:new sO(this,K),B5:new aO(this,K),C2:new hO(this,K),C3:new uO(this,K),C4:new vO(this,K),D3:new _O(this,K),coliseum:new mO(this,K)},this.quests={1:new EO(this,K)},this.scenes={springfestIntro:new IO(this,K),summerfestIntro:new DO(this,K),campaignReplayNarrativeIntro:new OO(this,K),campaignReplayNarrativeCatchup:new CO(this,K)}}init(q,K,z){super.init(q,K,z),X.Aq$.isDefined(this.getCurrentQuest())||this.startQuest(1)}teleport(q,K,z,Y,Q){var X;if(di.U.shouldShowPuppetMasterDefeatCelebration()){const[q]=st.q.instance.prodigy.world.getCurrentMap().split("-");if(q!==this.ID){const q=st.q.instance.prodigy.gameContainer.get("782-c308");q.data.endgameCelebrationViews=(null!==(X=q.data.endgameCelebrationViews)&&void 0!==X?X:0)+1,q.updated=!0}}super.teleport(q,K,z,Y,Q)}}class PO extends zn.T{constructor(q,K){super(q,"A3","MAP_SPRINGFEST_GROTTO",270,430,["springfest-grotto-A3"],K),this.battleBG=sT.t.BattleGrotto}}class MO extends zn.T{constructor(q,K){super(q,"A9","MAP_SPRINGFEST_GROTTO",170,430,["springfest-grotto-A9"],K),this.battleBG=sT.t.BattleGrotto}}class NO extends zn.T{constructor(q,K){super(q,"B2","MAP_SPRINGFEST_GROTTO",170,430,["springfest-grotto-B2"],K),this.battleBG=sT.t.BattleGrotto}}class xO extends zn.T{constructor(q,K){super(q,"B7","MAP_SPRINGFEST_GROTTO",170,430,["springfest-grotto-B7"],K),this.battleBG=sT.t.BattleGrotto}}class LO extends Cn.b{constructor(q){super(q),this.difficultyModeAgnostic=!0,this.mapEnteredFestivalContext=!0,this.bgmID=ot.V.Bgm_spring_fest;const K=[Gn.t.Tileset_collisions_png,Gn.t.Tileset_grotto_springfest_png,ot.V.Bgm_spring_fest];this.maps={A3:new PO(this,K),A9:new MO(this,K),B2:new NO(this,K),B7:new xO(this,K)}}}class kO extends LO{constructor(q){super(q),this.name="springfest_grotto_bunny",this.ID=mn.A_.SPRINGFESTGROTTO_BUNNY,this.defaultOnFaint="springfest_grotto_bunny-A3";const K=this.maps;Object.keys(K).forEach((q=>{K[q].zoneName=`${this.ID}-${q}`}))}}class BO extends LO{constructor(q){super(q),this.name="springfest_grotto_fox",this.ID=mn.A_.SPRINGFESTGROTTO_FOX,this.defaultOnFaint="springfest_grotto_fox-A3";const K=this.maps;Object.keys(K).forEach((q=>{K[q].zoneName=`${this.ID}-${q}`}))}}class UO extends zn.T{constructor(q,K){super(q,"A1","MAP_MOON_ENTRANCE",170,430,["moon-A1"],K),this.battleBG=sT.t.BattleMoon}}class FO extends zn.T{constructor(q,K){super(q,"B1","MAP_MOON_ENTRANCE",170,330,["moon-B1"],K),this.battleBG=sT.t.BattleMoon}}class GO extends zn.T{constructor(q,K){super(q,"C1","MAP_MOON_ENTRANCE",160,380,["moon-C1"],K),this.battleBG=sT.t.BattleMoon}}class jO extends zn.T{constructor(q,K){super(q,"D1","MAP_MOON_ENTRANCE",1080,340,["moon-D1"],K),this.battleBG=sT.t.BattleMoon}}class $O extends Cn.b{constructor(q){super(q),this.difficultyModeAgnostic=!0,this.name="Moon",this.ID=mn.A_.MOON,this.zoneIndex=AT.P.None,this.bgmID=ot.V.Bgm_moonlight_fest,this.defaultOnFaint="moon-A1",this.maps={A1:new UO(this,[]),B1:new FO(this,[]),C1:new GO(this,[]),D1:new jO(this,[])}}}class HO extends Lr.H{constructor(q,K){super(q,K,0,0),this.tween=null,this.add(st.q.instance.prodigy.create.sprite(0,0,it._.General_core_2_json,"bubble-1",void 0,((q,z)=>{q.anchor.set(.5,.5),K?q.y-=.44*K.height-.5*K.parent.nameText.TextHeight:(q.scale.set(8,8),q.y+=250),this.tween=new go.s(q),this.tween.set("frameName",["bubble-1","bubble-2","bubble-3"],150,9999),this.tween.start()}))),this.game.broadcaster.addAppListener(gi.AU.Update,this.update,this)}update(){super.update(),this.tween&&this.tween.update(Date.now())}destroy(){this.game.broadcaster.removeAppListener(gi.AU.Update,this),super.destroy()}}class VO extends Lr.H{constructor(q,K,z,Y,Q){super(q,K,z,Y),this.graphic=null,this.vanishTween=null,this.activeTween=null,this.updateEnabled=!0,this.graphic=this.add(st.q.instance.prodigy.create.sprite(0,0,it._.Zone_shipwreck_json,"ink-idle-1")),this.graphic.anchor.set(.5,1),this.graphic.x+=.5*this.graphic.width,this.graphic.y+=this.graphic.height;const X=new go.s(this.graphic);X.set("frameName",["ink-idle-1","ink-idle-2","ink-idle-3","ink-idle-4"],150,9999),this.vanishTween=new go.s(this.graphic),this.vanishTween.delay(Q),this.vanishTween.set("frameName",["ink-vanish-1","ink-vanish-2","ink-vanish-3","ink-vanish-4","ink-vanish-5"],150,9999),this.vanishTween.end((()=>{this.onEnd()})),this.activeTween=X,this.activeTween.start()}onClicked(){this.activeTween=this.vanishTween,this.activeTween.start()}update(){super.update(),this.updateEnabled&&this.activeTween.update(Date.now())}onEnd(){this.visible=!1,this.updateEnabled=!1,this.game.broadcaster.broadcast(gi.gJ.InkBlasted,this.parent,[])}}class WO extends Lr.H{set callbacks(q){this.onClickCallbacks=q}constructor(q,K,z,Y,Q,J){super(q,K.above,0,0),this.inkGroup=[],this.pathTarget=null,this.onClickCallbacks=null,this.pathTarget=Q,this.onClickCallbacks=J.concat(K.process.bind(K));let tt=null,et=null,it=[0,250,500,750];it=Z.shuffle(it);for(let Z=0;Z0&&K>4)for(z.sound(20,"clear-ink",null),Y=0;Y{this.activeTween=this.vanishTween,this.activeTween.start()})),K.start()}}onEnd(q){q.setState("squeak",4),this.visible=!1,this.updateEnabled=!1}}class KO extends Lr.H{constructor(q,K,z,Y){super(q,K,z,Y),this.tween=null;const Q=this.add(st.q.instance.prodigy.create.sprite(0,0,it._.Zone_shipwreck_json,"tornado-1"));this.tween=new go.s(Q),this.tween.set("frameName",["tornado-1","tornado-2","tornado-3","tornado-4"],100,9999),this.tween.start()}update(){super.update(),this.tween.update(Date.now())}}class zO extends Lr.H{constructor(q,K,z,Y){super(q,K,z,Y),this.tween=null;const Q=this.add(st.q.instance.prodigy.create.sprite(0,0,it._.Zone_shipwreck_json,"whirlpool-1"));this.tween=new go.s(Q),this.tween.set("frameName",["whirlpool-1","whirlpool-2","whirlpool-3","whirlpool-4"],100,9999),this.tween.start()}update(){super.update(),this.tween.update(Date.now())}}class YO extends zn.T{constructor(q,K){super(q,"A1","MAP_SHIPWRECK_SHORE_FAR_BEACH",1160,400,["shipwreck_shore-B2","shipwreck_shore-A2"],K.concat(it._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(q,K,z){super.setup(q,K,z),this.zone.addWhirlpool(K,this,200,600,{target:"shipwreck_shore-A2",x:160,y:200,callback:null,handRotation:WT.K.DOWN}),this.addAreaEvent(q,K,{x:1240,y:400,w:80,h:240,rect:!0},"shipwreck_shore-B2",200,300,null,WT.K.DOWN_RIGHT,!1)}}class QO extends zn.T{constructor(q,K){super(q,"A2","MAP_SHIPWRECK_SHORE_SEAWEED_SKYSCRAPERS",160,200,["shipwreck_shore-A1","shipwreck_shore-A3"],K.concat(it._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.zone.addWhirlpool(K,this,160,120,{target:"shipwreck_shore-A1",x:60,y:560,callback:null,handRotation:WT.K.UP}),this.addAreaEvent(q,K,{x:1020,y:680,w:280,h:80,rect:!0},"shipwreck_shore-A3",1e3,120,null,WT.K.DOWN,!1)}}class XO extends zn.T{constructor(q,K){super(q,"A3","MAP_SHIPWRECK_SHORE_SECRET_SHORE_SPACE",1e3,120,["shipwreck_shore-A2"],K),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1e3,y:40,w:320,h:80,rect:!0},"shipwreck_shore-A2",1e3,600,null,WT.K.UP,!1),this.addChest(q,K,"chestA3",360,370,null,"A")}}class ZO extends zn.T{constructor(q,K){super(q,"A4","MAP_SHIPWRECK_SHORE_SECLUDED_SHORE",1160,320,["shipwreck_shore-B4","shipwreck_shore-A5"],K.concat(it._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(q,K,z){super.setup(q,K,z),this.zone.addWhirlpool(K,this,60,560,{target:"shipwreck_shore-A5",x:180,y:200,callback:null,handRotation:WT.K.DOWN}),this.addAreaEvent(q,K,{x:1280,y:440,w:80,h:240,rect:!0},"shipwreck_shore-B4",120,380,null,WT.K.RIGHT,!1)}}class JO extends zn.T{constructor(q,K){super(q,"A5","MAP_SHIPWRECK_SHORE_UNDERWATER_ALCOVE",180,200,["shipwreck_shore-A4"],K.concat(it._.Npc_sprite_wizard_json,it._.Zone_shipwreck_json,ht.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z);const Y=this.zone;Y.addWhirlpool(K,this,180,120,{target:"shipwreck_shore-A4",x:200,y:600,callback:null,handRotation:WT.K.UP}),Y.addUnderwaterWizard(K,this,575,305,"wizardA5",40);const Q=Y.addInkGroup(K,this,[{x:960,y:280},{x:1040,y:280},{x:940,y:320},{x:1020,y:320},{x:1100,y:320},{x:960,y:360},{x:1040,y:360},{x:1100,y:360},{x:960,y:400},{x:1040,y:400},{x:1100,y:400},{x:1e3,y:440},{x:1080,y:440}],{x:985,y:255},[]),X=this.addChest(this.game,K,"chestA5",1e3,500,null,"A");1!==this.zone.getState(`ink${this.getTag()}`)&&(X.visible=!1,this.game.broadcaster.addAppListener(gi.gJ.InkBlasted,this.revealChest.bind(this,K,Q,X),this,Q))}revealChest(q,K,z){this.game.broadcaster.removeAppListener(gi.gJ.InkBlasted,this,K),z.visible=!0}}class tI extends zn.T{constructor(q,K){super(q,"A7","MAP_SHIPWRECK_SHORE_LOWER_DECK_HALL",1160,520,["shipwreck_shore-B6","shipwreck_shore-B7"],K.concat([it._.Zone_shipwreck_json,ht.c.Sfx_shipwreck_shore])),this.inkGroups=[],this.battleBG="battle-shipwreck-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:440,y:40,w:320,h:80,rect:!0},"shipwreck_shore-B6",280,540,null,WT.K.UP,!1),this.addAreaEvent(q,K,{x:1240,y:440,w:80,h:240,rect:!0},"shipwreck_shore-B7",160,180,null,WT.K.UP_RIGHT,!1);const Y=this.zone.addInkGroup(K,this,[{x:520,y:360},{x:640,y:400},{x:560,y:400},{x:520,y:440},{x:600,y:440},{x:640,y:440},{x:520,y:480},{x:600,y:480},{x:560,y:520},{x:480,y:520}],{x:740,y:500},[]);this.inkGroups.push(Y)}}class eI extends zn.T{constructor(q,K){super(q,"B10","MAP_SHIPWRECK_SHORE_SEAWEED_SANCTUARY",1020,420,["shipwreck_shore-B11"],K.concat(it._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.zone.addWhirlpool(K,this,1020,560,{target:"shipwreck_shore-B11",x:260,y:180,callback:null,handRotation:WT.K.DOWN}),this.addChest(q,K,"chestB10",380,475,null,"A")}}class iI extends zn.T{constructor(q,K){super(q,"B11","MAP_SHIPWRECK_SHORE_SECRET_SHORE",1160,300,["shipwreck_shore-B10","shipwreck_shore-C11"],K.concat(it._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(q,K,z){super.setup(q,K,z),this.zone.addWhirlpool(K,this,260,110,{target:"shipwreck_shore-B10",x:1020,y:420,callback:null,handRotation:WT.K.UP}),this.addAreaEvent(q,K,{x:1240,y:440,w:80,h:240,rect:!0},"shipwreck_shore-C11",120,360,null,WT.K.RIGHT,!1)}}class sI extends zn.T{constructor(q,K){super(q,"B12","MAP_SHIPWRECK_SHORE_SHORELINE",990,435,["shipwreck_shore-B13","shipwreck_shore-C12"],K.concat(it._.Npc_sprite_windsail_json,it._.Zone_shipwreck_json,it._.Npc_sprite_fishthing_json,it._.Npc_sprite_merchant_json)),this.questNPC=null}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1240,y:480,w:80,h:320,rect:!0},"shipwreck_shore-C12",100,420,null,WT.K.RIGHT,!1),this.zone.addWhirlpool(K,this,180,640,{target:"shipwreck_shore-B13",x:220,y:260,callback:null,handRotation:WT.K.DOWN}),this.questNPC=K.addConstructedQuestNPC(800,450,"eve",!1,this.zoneComplete.bind(this,q)),K.user.faceToward(this.questNPC.x);const Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);if(st.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,K.user,K.content,1050,350),K.user.faceToward(this.questNPC.x),st.q.instance.prodigy.skin.isFestivalActive("Summerfest"))st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.ShipwreckMerchantNPC,330,460).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.ShipwreckMerchantNPC}`));else{const q=()=>{const q=new Ni.rD(this.game),K=`${kT.N.Athena}_${Ah.B.Dialogue}`,z=this.featureRequirements.meetsRequirementsDeprecated(36);z&&this.segment.featureCommon.sendInterfaceEvent({interfaceName:K,interfaceType:Si.Wm.DialogBox,instanceType:Li.N.Interface,originType:Si.$N.NpcClick}),q.addEvents([z?{dialogueData:q.dataProvider.get(904),type:Ni.fA.STORE,yes:()=>{this.sendDialogueSegmentEvents(Xh.k.Shop,K),st.q.instance.prodigy.open.store(19)},no:()=>{this.sendDialogueSegmentEvents(Xh.k.NotNow,K)},blockInput:!0}:{dialogueData:q.dataProvider.get(903),blockInput:!0}]),q.start(!0)},z=st.q.instance.prodigy.create.spineNPC(K.content,166,"idle",330,460,{text:Y.getText("NPC_NAME_ATHENA")},{npcType:sa.ac.Merchant,npcXCoord:330,npcYCoord:460},q),Q=z.findComponentInChildren(ea.v),Z=()=>{if(this.featureRequirements.meetsRequirementsDeprecated(36)){const q=NT.createIndicator(xT.DEFAULT_INDICATOR_CONFIG);q.position.set(10+(X.J6z.getCenterX(z.legacyTransform.group)>>1),-z.legacyTransform.group.height-20),z.legacyTransform.group.addChild(q),this.game.add.tween(q,this).to({y:q.y-20},1e3,X.GS3.Quadratic.InOut,!0,0,te.s.MAX_SAFE_INTEGER,!0)}};Q.isLoaded?Z():Q.OnLoaded.addOnce(Z)}}sendDialogueSegmentEvents(q,K){this.segment.featureCommon.sendButtonEvent({buttonName:q,interfaceName:K,interfaceType:Si.Wm.DialogBox,saveClickInfo:q}),this.segment.featureCommon.sendInterfaceEvent({interfaceName:K,interfaceType:Si.Wm.DialogBox,instanceType:Li.N.Interface,closeMethod:Si.Lv.ButtonClick})}zoneComplete(q){const K=st.q.instance.prodigy.event.create();K.text(45,"eve"),K.start()}cleanup(){this.questNPC&&(this.questNPC.destroy(),this.questNPC=null),super.cleanup()}}class nI extends zn.T{constructor(q,K){super(q,"B13","MAP_SHIPWRECK_SHORE_SUNKEN_SECRET",220,260,["shipwreck_shore-B12"],K.concat(it._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.zone.addWhirlpool(K,this,220,200,{target:"shipwreck_shore-B12",x:140,y:540,callback:null,handRotation:WT.K.UP}),this.addChest(q,K,"chestB13",1020,350)}}class aI extends zn.T{constructor(q,K){super(q,"B2","MAP_SHIPWRECK_SHORE_CROWS_NEST",1080,620,["shipwreck_shore-B4","shipwreck_shore-A1"],K),this.battleBG="battle-shipwreck-outside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:120,y:200,r:80},"shipwreck_shore-A1",1160,400,null,WT.K.UP_LEFT,!1),this.addAreaEvent(q,K,{x:1080,y:680,w:160,h:80,rect:!0},"shipwreck_shore-B4",1080,120,null,WT.K.DOWN,!1)}}class rI extends zn.T{constructor(q,K){super(q,"B4","MAP_SHIPWRECK_SHORE_UPPER_DECK",1120,520,["shipwreck_shore-B5","shipwreck_shore-A4","shipwreck_shore-B2"],K),this.battleBG="battle-shipwreck-outside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1080,y:40,w:160,h:80,rect:!0},"shipwreck_shore-B2",1080,620,null,WT.K.UP,!1),this.addAreaEvent(q,K,{x:40,y:380,w:80,h:280,rect:!0},"shipwreck_shore-A4",1160,320,null,WT.K.LEFT,!1),this.addAreaEvent(q,K,{x:1120,y:600,w:160,h:80,rect:!0},"shipwreck_shore-B5",240,100,null,WT.K.DOWN,!1)}}class oI extends zn.T{constructor(q,K){super(q,"B5","MAP_SHIPWRECK_SHORE_CARGO_HOLD",1e3,560,["shipwreck_shore-B6","shipwreck_shore-B4"],K.concat(it._.Zone_shipwreck_json,ht.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:240,y:40,w:160,h:80,rect:!0},"shipwreck_shore-B4",1120,520,null,WT.K.UP,!1),this.addAreaEvent(q,K,{x:1e3,y:640,w:160,h:80,rect:!0},"shipwreck_shore-B6",1040,140,null,WT.K.DOWN,!1),this.zone.addInkGroup(K,this,[{x:400,y:320},{x:400,y:400},{x:360,y:280},{x:360,y:360},{x:360,y:440},{x:320,y:320},{x:320,y:400},{x:280,y:360},{x:280,y:440},{x:240,y:400}],{x:520,y:480},[]),this.addChest(q,K,"chestB5",500,325)}}class hI extends zn.T{constructor(q,K){super(q,"B6","MAP_SHIPWRECK_SHORE_LOWER_DECK",280,540,["shipwreck_shore-A7","shipwreck_shore-C6","shipwreck_shore-B5"],K.concat(it._.Zone_shipwreck_json,ht.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1040,y:80,w:160,h:80,rect:!0},"shipwreck_shore-B5",1e3,560,null,WT.K.UP,!1);const Y=X.Aq$.isDefined(z)&&X.Aq$.isDefined(z.doorIsLockedCallback)?z.doorIsLockedCallback:this.doorIsLocked.bind(this,q),Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.addAreaEvent(q,K,{x:1180,y:360,w:80,h:160,rect:!0},"shipwreck_shore-C6",120,320,0===Q.backpack.hasItem("item",114)?Y:null,WT.K.RIGHT,!1),this.addAreaEvent(q,K,{x:280,y:600,w:160,h:80,rect:!0},"shipwreck_shore-A7",440,120,null,WT.K.DOWN,!1),this.zone.addInkGroup(K,this,[{x:960,y:40},{x:960,y:80},{x:1040,y:40},{x:1e3,y:120},{x:1e3,y:80},{x:1e3,y:200},{x:1040,y:200},{x:1e3,y:160},{x:960,y:240},{x:1040,y:240}],{x:1040,y:400},[])}doorIsLocked(q){const K=st.q.instance.prodigy.event.create();K.text(174,"noot"),K.start()}}class cI extends zn.T{constructor(q,K){super(q,"B7","MAP_SHIPWRECK_SHORE_SECOND_SHIP_RAMP",1160,420,["shipwreck_shore-A7","shipwreck_shore-C7"],K.concat(it._.Zone_shipwreck_json,ht.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:160,y:240,w:160,h:80,rect:!0},"shipwreck_shore-A7",1160,520,null,WT.K.DOWN,!1),this.addAreaEvent(q,K,{x:1240,y:420,w:80,h:320,rect:!0},"shipwreck_shore-C7",120,280,null,WT.K.RIGHT,!1);const Y=this.zone;Y.addShortcut(K,1060,560),this.enableShortcut(q,K),Y.addInkGroup(K,this,[{x:1e3,y:520},{x:1040,y:560},{x:1040,y:520},{x:1e3,y:560}],{x:1060,y:480},[q.broadcaster.addAppListener.bind(q.broadcaster,gi.gJ.InkGroupDestroyed,this.enableShortcut.bind(this,q,K),this)]),Y.addSqueak(K,this,840,440,!0)}enableShortcut(q,K){q.broadcaster.removeAppListener(gi.gJ.InkGroupDestroyed,this);const z=this.zone.enableShortcut(K,this,1060,560,{target:"shipwreck_shore-C9",x:780,y:420,callback:null,handRotation:WT.K.DOWN});X.Aq$.isDefined(z)&&this.locations.push("shipwreck_shore-C9")}}class dI extends zn.T{constructor(q,K){super(q,"B8","MAP_SHIPWRECK_SHORE_BROKEN_SHIP_BED",1160,540,["shipwreck_shore-C8"],K),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1240,y:500,w:80,h:280,rect:!0},"shipwreck_shore-C8",140,460,null,WT.K.RIGHT,!1)}}class lI extends zn.T{constructor(q,K){super(q,"C10","MAP_SHIPWRECK_SHORE_DIVE_DOCK",180,600,["shipwreck_shore-C9","shipwreck_shore-C11"],K.concat(it._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(q,K,z){super.setup(q,K,z),this.zone.addWhirlpool(K,this,1100,200,{target:"shipwreck_shore-C9",x:180,y:380,callback:null,handRotation:WT.K.UP}),this.addAreaEvent(q,K,{x:160,y:680,w:280,h:80,rect:!0},"shipwreck_shore-C11",780,220,null,WT.K.DOWN,!1)}}class uI extends zn.T{constructor(q,K){super(q,"C11","MAP_SHIPWRECK_SHORE_DESOLATE_DECK",1080,620,["shipwreck_shore-C12","shipwreck_shore-B11","shipwreck_shore-C10"],K),this.battleBG="battle-shipwreck-outside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:780,y:120,w:200,h:80,rect:!0},"shipwreck_shore-C10",180,600,null,WT.K.UP,!1),this.addAreaEvent(q,K,{x:40,y:320,w:80,h:320,rect:!0},"shipwreck_shore-B11",1160,300,null,WT.K.LEFT,!1),this.addAreaEvent(q,K,{x:1080,y:680,w:160,h:80,rect:!0},"shipwreck_shore-C12",1080,100,null,WT.K.DOWN,!1)}}class fI extends zn.T{constructor(q,K){super(q,"C12","MAP_SHIPWRECK_SHORE_BROKEN_BOWSPRIT",100,420,["shipwreck_shore-B12","shipwreck_shore-C11"],K),this.battleBG="battle-shipwreck-outside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1080,y:40,w:160,h:80,rect:!0},"shipwreck_shore-C11",1080,620,null,WT.K.UP,!1),this.addAreaEvent(q,K,{x:40,y:440,w:80,h:400,rect:!0},"shipwreck_shore-B12",1160,500,null,WT.K.LEFT,!1),this.addPippet(q,K,2,275,214)}}class bI extends zn.T{constructor(q,K){super(q,"C6","MAP_SHIPWRECK_SHORE_CAPNS_QUARTERS",120,320,["shipwreck_shore-B6"],K),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:40,y:320,w:80,h:240,rect:!0},"shipwreck_shore-B6",1120,360,null,WT.K.LEFT,!1)}}class pI extends zn.T{constructor(q,K){super(q,"C7","MAP_SHIPWRECK_SHORE_SAND_CITY",1040,580,["shipwreck_shore-C8","shipwreck_shore-B7"],K.concat(it._.Zone_shipwreck_json,ht.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:40,y:300,w:80,h:280,rect:!0},"shipwreck_shore-B7",1160,420,null,WT.K.LEFT,!1),this.addAreaEvent(q,K,{x:1160,y:680,r:120},"shipwreck_shore-C8",1120,100,null,WT.K.DOWN,!1),this.zone.addSqueak(K,this,640,480,!1)}}class vI extends zn.T{constructor(q,K){super(q,"C8","MAP_SHIPWRECK_SHORE_DEEP_WATER",260,620,["shipwreck_shore-C9","shipwreck_shore-B8","shipwreck_shore-C7"],K.concat(it._.Npc_sprite_wizard_json,it._.Zone_shipwreck_json,ht.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1120,y:40,w:320,h:80,rect:!0},"shipwreck_shore-C7",1040,580,null,WT.K.UP,!1),this.addAreaEvent(q,K,{x:40,y:440,w:80,h:360,rect:!0},"shipwreck_shore-B8",1160,540,null,WT.K.LEFT,!1),this.addAreaEvent(q,K,{x:260,y:680,w:280,h:80,rect:!0},"shipwreck_shore-C9",950,120,null,WT.K.DOWN,!1),this.zone.addUnderwaterWizard(K,this,400,300,"wizardC8",41),this.zone.addSqueak(K,this,560,480,!1)}}class gI extends zn.T{constructor(q,K){super(q,"C9","MAP_SHIPWRECK_SHORE_SAND_TOWN",180,380,["shipwreck_shore-C8","shipwreck_shore-C10"],K.concat(it._.Npc_sprite_jim_json,it._.Zone_shipwreck_json,ht.c.Sfx_shipwreck_shore)),this.questNPC=null,this.battleBG="battle-shipwreck-underwater"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:950,y:40,w:220,h:80,rect:!0},"shipwreck_shore-C8",260,620,null,WT.K.UP,!1),this.zone.addWhirlpool(K,this,180,520,{target:"shipwreck_shore-C10",x:1120,y:320,callback:null,handRotation:WT.K.DOWN}),this.questNPC=this.addConstructedNPC(q,K,1e3,300,it._.Npc_sprite_jim_json,null,"NPC_NAME_JELLY_JIM"),this.questNPC.setup(this.zone,!1),this.questNPC.addOnClick(this.interactWithJellyJim.bind(this,q)),this.zone.addShortcut(K,780,480),this.enableShortcut(q,K),this.zone.addInkGroup(K,this,[{x:720,y:440},{x:760,y:480},{x:760,y:440},{x:720,y:480}],{x:780,y:400},[q.broadcaster.addAppListener.bind(q.broadcaster,gi.gJ.InkGroupDestroyed,this.enableShortcut.bind(this,q,K),this)]),this.zone.addSqueak(K,this,760,280,!1)}enableShortcut(q,K){q.broadcaster.removeAppListener(gi.gJ.InkGroupDestroyed,this);const z=this.zone.enableShortcut(K,this,780,480,{target:"shipwreck_shore-B7",x:1060,y:500,callback:null,handRotation:WT.K.DOWN});X.Aq$.isDefined(z)&&this.locations.push("shipwreck_shore-B7")}interactWithJellyJim(q){const K=st.q.instance.prodigy.event.create(),z=this.zone.getCurrentQuestID();z>1&&z<6?(K.text(2,"jim"),K.text(3,"jim")):K.text(7,"jim"),K.start()}cleanup(){this.questNPC&&(this.questNPC.destroy(),this.questNPC=null),super.cleanup()}}class mI extends jn.T{constructor(q,K,z){super(q,K.concat([it._.Npc_sprite_windsail_json,ot.V.Bgm_fun]),1,"",{type:"key",ID:14,N:1},["shipwreck_shore-C10"],[659,660,661,662,663,664,665,666,667],[],[658],z,!1,"QUESTS_SHIPWRECK_FIND_BREATHING_BUBBLE","eve","eve",[]),this.mimic1=null,this.mimic2=null}setup(q,K,z){if(super.setup(q,K,z),this.screen=K,this.map=z,"C10"===z.getTag()){z.addChest(q,K,"chestBreathingBubble",210,260);const Y={randDir:!0,encounter:[{ID:98}],difficulty:2,maxTeamSize:1,screen:this.zone.battleBG};1===this.zone.getState("mimic1")||(this.mimic1=K.addMimic("mimic1",360,240,"A",Y,z.zoneName));return 1===this.zone.getState("mimic2")||(this.mimic2=K.addMimic("mimic2",120,400,"A",Y,z.zoneName)),{enableMonsters:!1}}return{}}process(q,K,z){if(super.process(q,K,z),"C10"===z.getTag()){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("key",14)>0?(X.Aq$.isDefined(this.mimic1)&&this.mimic1.highlight(!1),X.Aq$.isDefined(this.mimic2)&&this.mimic2.highlight(!1)):(X.Aq$.isDefined(this.mimic1)&&this.mimic1.highlight(1!==this.zone.getState("mimic1"),-80,-90),X.Aq$.isDefined(this.mimic2)&&this.mimic2.highlight(1!==this.zone.getState("mimic2"),-80,-90))}}end(){this.zone.addWhirlpool(this.screen,this.map,1100,200,{target:"shipwreck_shore-C9",x:180,y:380,callback:null,handRotation:WT.K.UP}),this.map.toggleDynamicLayer(st.q.instance.prodigy.game,0,!1)}}class yI extends jn.T{constructor(q,K,z){super(q,K,10,"",{type:"item",ID:114,N:1,K:1},["shipwreck_shore-B7"],[700],[],[],z,!1,"QUESTS_SHIPWRECK_DEFEAT_MONSTERS","eve","eve",[]),this.bossKey=null}setup(q,K,z){super.setup(q,K,z),this.updateDialogue(q);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return"B7"===z.getTag()&&0===Y.backpack.hasItem("item",114)&&(this.bossKey=K.addClickableEvent(800,100,80,80,this.collectBossKey.bind(this,q,K),null,0),this.bossKey.highlight(!0)),{}}collectBossKey(q,K){if(0===st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("item",114)){const q=st.q.instance.prodigy.event.create();q.validPath(K.user,K.path,this.bossKey.x+.5*this.bossKey.width,this.bossKey.y+this.bossKey.height+10),q.reward([{type:"item",ID:114}]),q.function(this.bossKey.highlight.bind(this.bossKey,!1)),q.function(this.zone.completeQuest.bind(this.zone,10)),q.function(this.zone.startQuest.bind(this.zone,11)),q.function(K.process.bind(K)),q.start()}}updateDialogue(q){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("item",114)>0&&(this.onStart=[43])}}class _I extends jn.T{constructor(q,K,z){super(q,K.concat(ht.c.Sfx_shipwreck_shore,it._.Zone_shipwreck_json,ct.Q.Default_boss_15_json),11,"QUESTS_SHIPWRECK_DEFEAT_BOSS",{type:"seq",N:1},["shipwreck_shore-C6"],[701],[],[658,675,702],z,!1,null,"eve","eve",[]),this.squeak=null}setup(q,K,z){return super.setup(q,K,z),this.screen=K,"C6"===z.getTag()&&this.zone.isOnSequence(11,0)&&this.createSqueak(),{}}start(q,K,z){return super.start(q,K,z),"C6"===z.getTag()&&this.zone.isOnSequence(11,0)&&this.startSequenceA(q,K,z),null}startSequenceA(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("f71-42eb"),Q=Y.getValue("oldOneMaxHP",te.s.get("GameConstants.OldOne.MAX_HP")),Z=null===Q?void 0:parseInt(Q,10);st.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const J=this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE"),{boss:{ID:15,element:"water",attacks:[82,83,85,87],name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_OLD_ONE"),tag:"shipwreck",maxHP:Z},starMod:5,difficulty:parseInt(Y.getValue("oldOneDifficulty",te.s.get("GameConstants.OldOne.DIFFICULTY")),10),screen:"battle-shipwreck-inside"},this.endSequenceA.bind(this,q)),tt=st.q.instance.prodigy.event.create();tt.enableInput(!1),tt.validPath(K.user,K.path,this.squeak.x-500,this.squeak.y),tt.delay(250),tt.shake(0,3e3,12,"h",!0);let et=4;tt.tween(this.squeak,{y:this.squeak.y-40*et},2e3,X.GS3.Linear.None,!0),tt.sound(20,"boss-monster",!1);for(let X=0;X<4;X++){const z=Mn.o.integerInRange(4,8);tt.function(this.sandCloud.bind(this,q,K,this.squeak.x-.5*z*40,this.squeak.y,z,et--)),tt.delay(400)}tt.delay(750),tt.enableInput(!0),tt.function(J),tt.start()}endSequenceA(q){this.squeak[wr.k.DESTROYED]&&this.createSqueak();const K=st.q.instance.prodigy.event.create();K.function(this.zone.setState.bind(this.zone,"squeak",4)),K.function(this.zone.completeSequence.bind(this.zone,11,0)),K.function(st.q.instance.prodigy.world.it.bind(st.q.instance.prodigy.world,"shipwreck_shore-C6",this.squeak.x-500,this.squeak.y)),K.start()}sandCloud(q,K,z,Y,Q,Z){let J=null;for(let tt=0;tt0?X.Aq$.isDefined(this.ink)&&this.ink.highlight(!1):(null!==(Y=this.ink)&&void 0!==Y||(this.ink=st.q.instance.prodigy.create.element(K.above,560,440)),this.ink.highlight(!0),z.inkGroups.forEach((Y=>{Y.callbacks=[this.collectInk.bind(this,q,K,z)]})))}}collectInk(q,K,z){var Y;const Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;0===Q.backpack.hasItem("item",112)&&Q.backpack.add("item",112,!1,1),null===(Y=this.ink)||void 0===Y||Y.highlight(!1),z.zone.completeQuest(3),K.process()}}class TI extends jn.T{constructor(q,K,z){super(q,K,4,"",{type:"key",ID:15,N:1},["shipwreck_shore-B7"],[676,677,678,679,680,681,682,683],[],[658],z,!1,"QUESTS_SHIPWRECK_ACQUIRE_INK_SAMPLE","eve","eve",[]),this.sonicBlaster=null}setup(q,K,z){return super.setup(q,K,z),"B7"===z.getTag()&&(this.sonicBlaster=K.addClickableEvent(320,80,80,80,this.collectSonicBlaster.bind(this,q,K),null,0)),{}}process(q,K,z){if(super.process(q,K,z),"B7"===z.getTag()){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.sonicBlaster.highlight(0===q.backpack.hasItem("key",15))}}collectSonicBlaster(q,K){if(0===st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("key",15)){const q=st.q.instance.prodigy.event.create();q.validPath(K.user,K.path,this.sonicBlaster.x+.5*this.sonicBlaster.width,this.sonicBlaster.y+this.sonicBlaster.height+10),q.reward([{type:"key",ID:15}]),q.function(K.process.bind(K)),q.start()}}}class SI extends jn.T{constructor(q,K,z){super(q,K,5,"QUESTS_SHIPWRECK_CLEAR_INK",{type:"seq",N:1},["shipwreck_shore-A7"],[684,685],[],[658],z),this.inkHighlighter=null}setup(q,K,z){super.setup(q,K,z),this.updateQuestArea();let Y=this.updateQuestArea.bind(this);return"A5"===z.getTag()&&(Y=this.startSequenceA.bind(this,q,K,z)),q.broadcaster.addAppListener(gi.gJ.InkGroupDestroyed,Y,this),{}}process(q,K,z){super.process(q,K,z),this.showInkHighlighter(q,K,z)}updateQuestArea(){this.zone.isOnSequence(5,0)&&(1!==this.zone.getState("inkA7")?this.area=["shipwreck_shore-A7"]:1!==this.zone.getState("inkB6")?this.area=["shipwreck_shore-B6"]:1!==this.zone.getState("inkB5")?this.area=["shipwreck_shore-B5"]:1!==this.zone.getState("inkA5")?this.area=["shipwreck_shore-A5"]:this.zone.completeSequence(5,0))}startSequenceA(q,K,z){const Y=K.addNPC(985,255,it._.Npc_sprite_noot_json);Y.visible=!1,Y.float(!0);const Q=st.q.instance.prodigy.event.create();Q.function((()=>{q.broadcaster.removeAppListener(gi.gJ.InkGroupDestroyed,this)})),Q.validPath(K.user,K.path,985,255),Q.set(Y,"visible",!0),Q.hop(Y,375,-75,70),Q.function(K.user.faceToward.bind(K.user,Y.x-75)),Q.text(172,"noot"),Q.text(173,"noot"),Q.hop(Y,375,75,70),Q.set(Y,"visible",!1),Q.function(this.zone.completeSequence.bind(this.zone,5,0)),Q.function(K.process.bind(K)),Q.start()}showInkHighlighter(q,K,z){const Y=z.getTag();let Q=0,Z=0;if(X.Aq$.isDefined(this.inkHighlighter)&&this.inkHighlighter.highlight(!1),1!==this.zone.getState(`ink${z.getTag()}`)){let q=!1;"A7"===Y?(Q=560,Z=440,q=!0):"B6"===Y?(Q=1020,Z=220,q=!0):"B5"===Y?(Q=320,Z=400,q=!0):"A5"===Y&&(Q=1040,Z=360,q=!0),q&&(this.inkHighlighter=st.q.instance.prodigy.create.element(K.above,Q,Z),this.inkHighlighter.highlight(!0))}}}class AI extends jn.T{constructor(q,K,z){super(q,K.concat(ot.V.Bgm_puppetmaster),5,"QUESTS_SHIPWRECK_CLEAR_INK",{type:"seq",N:1},["shipwreck_shore-A7"],[684,685],[],[658],z),this.inkHighlighter=null}setup(q,K,z){if(super.setup(q,K,z),this.updateQuestArea(),"A5"===z.getTag()){if(q.broadcaster.addAppListener(gi.gJ.InkGroupDestroyed,this.startSequenceA.bind(this,q,K,z),this),!z.zone.getState(cf.PIPPET_DEFEATED))return q.input.enabled=!1,this.addPippetEncounter(q,K,z),{enableMonsters:!1,enableWizards:!1}}else q.broadcaster.addAppListener(gi.gJ.InkGroupDestroyed,this.updateQuestArea.bind(this),this);return{}}process(q,K,z){super.process(q,K,z),("A5"!==z.getTag()||z.zone.getState(cf.PIPPET_DEFEATED))&&this.showInkHighlighter(q,K,z)}updateQuestArea(){this.zone.isOnSequence(5,0)&&(1!==this.zone.getState("inkA7")?this.area=["shipwreck_shore-A7"]:1!==this.zone.getState("inkB6")?this.area=["shipwreck_shore-B6"]:1!==this.zone.getState("inkB5")?this.area=["shipwreck_shore-B5"]:1!==this.zone.getState("inkA5")?this.area=["shipwreck_shore-A5"]:this.zone.completeSequence(5,0))}startSequenceA(q,K,z){const Y=K.addNPC(985,255,it._.Npc_sprite_noot_json);Y.visible=!1,Y.float(!0);const Q=st.q.instance.prodigy.event.create();Q.function((()=>{q.broadcaster.removeAppListener(gi.gJ.InkGroupDestroyed,this)})),Q.validPath(K.user,K.path,985,255),Q.set(Y,"visible",!0),Q.hop(Y,375,-75,70),Q.function(K.user.faceToward.bind(K.user,Y.x-75)),Q.text(172,"noot"),Q.text(173,"noot"),Q.hop(Y,375,75,70),Q.set(Y,"visible",!1),Q.function(this.zone.completeSequence.bind(this.zone,5,0)),Q.function(K.process.bind(K)),Q.start()}showInkHighlighter(q,K,z){const Y=z.getTag();let Q=0,Z=0;if(X.Aq$.isDefined(this.inkHighlighter)&&this.inkHighlighter.highlight(!1),1!==this.zone.getState(`ink${z.getTag()}`)){let q=!1;"A7"===Y?(Q=560,Z=440,q=!0):"B6"===Y?(Q=1020,Z=220,q=!0):"B5"===Y?(Q=320,Z=400,q=!0):"A5"===Y&&(Q=1040,Z=360,q=!0),q&&(this.inkHighlighter=st.q.instance.prodigy.create.element(K.above,Q,Z),this.inkHighlighter.highlight(!0))}}addPippetEncounter(q,K,z){st.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(z.zone,205,SS.e.Shipwreck_quests_encounter).then((q=>{if(z.zone.getState(cf.PIPPET_REMATCH)){q.findComponentInChildren(Af.u).onComplete.addOnce((()=>{this.showInkHighlighter(st.q.instance.game,K,z)}))}})).catch(X.RQr.createHandler("Error loading Pippet Miniboss Encounter for Bonfire Q7"))}}class CI extends jn.T{constructor(q,K,z){super(q,K.concat(it._.Zone_shipwreck_json,ht.c.Sfx_shipwreck_shore),6,"QUESTS_SHIPWRECK_FIND_JIM",{type:"seq",N:2},["shipwreck_shore-C9"],[686,687,688,689],[],[658],z,!1,null,"eve","eve",[]),this.cameraButton=null}setup(q,K,z){return super.setup(q,K,z),this.updateQuestArea(),"C9"===z.getTag()&&this.zone.isOnSequence(6,0)?{enableMonsters:!1}:{}}start(q,K,z){return super.start(q,K,z),"C9"===z.getTag()&&this.zone.isOnSequence(6,0)?this.startSequenceA(q,K,z):"A5"===z.getTag()&&this.zone.isOnSequence(6,1)&&(this.cameraButton=st.q.instance.prodigy.create.button(K.menus,1040,240,it._.Zone_shipwreck_json,"camera-map",this.takePictureOfTunnel.bind(this,q,K)),this.cameraButton.highlight(!0)),null}updateQuestArea(){this.zone.isOnSequence(6,1)&&(this.area=["shipwreck_shore-A5"],this.descKey="QUESTS_SHIPWRECK_TAKE_PHOTO")}startSequenceA(q,K,z){const Y=K.addNPC(z.questNPC.x-100,z.questNPC.y,it._.Npc_sprite_noot_json);Y.visible=!1,Y.float(!0);const Q=st.q.instance.prodigy.event.create();Q.enableInput(!1),Q.validPath(K.user,K.path,z.questNPC.x-100,z.questNPC.y-10),Q.set(Y,"visible",!0),Q.hop(Y,500,-100,70),Q.enableInput(!0),Q.text(5,"jim"),Q.text(6,"jim"),Q.reward([{type:"key",ID:16}]),Q.text(4,"jim"),Q.text(),Q.reward([{type:"gold",N:200}]),Q.function(K.user.faceToward.bind(K.user,Y.x-100)),Q.text(175,"noot"),Q.hop(Y,500,100,70),Q.set(Y,"visible",!1),Q.function(this.zone.completeSequence.bind(this.zone,6,0)),Q.function(this.updateQuestArea.bind(this)),Q.function(K.process.bind(K)),Q.start()}takePictureOfTunnel(q,K){const z=st.q.instance.prodigy.event.create();z.validPath(K.user,K.path,1e3,280),z.enableInput(!1),z.cameraFlash(),z.function(this.cameraButton.destroy.bind(this.cameraButton)),z.function(this.zone.completeSequence.bind(this.zone,6,1)),z.function(K.process.bind(K)),z.enableInput(!0),z.start()}}class OI extends jn.T{constructor(q,K,z){super(q,K.concat(zt.E.getIconForType("item",113)),7,"",{type:"item",ID:113,N:3},["shipwreck_shore-A2"],[690,691,692],[],[658,675],z,!1,"QUESTS_SHIPWRECK_GET_CAMERA","eve","eve",[])}setup(q,K,z){return super.setup(q,K,z),"A2"===z.getTag()?(K.addCollect(1,880,480,{type:"item",ID:113}),K.addCollect(2,960,320,{type:"item",ID:113}),K.addCollect(3,400,520,{type:"item",ID:113}),{enableMonsters:!1}):{}}}class II extends jn.T{constructor(q,K,z){super(q,K,8,"",{type:"pet",ID:119,N:4},["shipwreck_shore-B8"],[693,694,695],[],[696,658],z,!1,"QUESTS_SHIPWRECK_TAKE_PICTURE","eve","eve",[]),this.questParams={}}setup(q,K,z){super.setup(q,K,z),this.updateQuestArea(!1);const Y=z.getTag(),Q={randDir:!0,encounter:[{ID:119}],difficulty:4,maxTeamSize:1,onEnc:this.updateQuestArea.bind(this,!0),isQuestEncounter:!0,showGuideHand:!0,unique:!0};if(-1!==this.area.indexOf(z.zoneName)){if("B8"===Y)return st.q.instance.prodigy.prefabFactory.addMonster(z,775,325,0,Q),st.q.instance.prodigy.prefabFactory.addMonster(z,420,485,1,Q),{enableMonsters:!1};if("B7"===Y)return st.q.instance.prodigy.prefabFactory.addMonster(z,926,305,2,Q),st.q.instance.prodigy.prefabFactory.addMonster(z,650,475,3,Q),{enableMonsters:!1}}if(X.Aq$.isDefined(this.questParams.enableMonsters))return this.questParams={},{enableMonsters:!1}}updateQuestArea(q){this.isMapB7Cleared()?(this.area=["shipwreck_shore-B12"],q&&(this.questParams.enableMonsters=!1)):this.isMapB8Cleared()&&-1===this.area.indexOf("shipwreck_shore-B7")&&(this.area=["shipwreck_shore-B7"])}isMapB8Cleared(){const q=this.zone.getQuestState();return!(!X.Aq$.isDefined(q)||!X.Aq$.isDefined(q.req))&&(1===q.state[1]&&1===q.state[2])}isMapB7Cleared(){const q=this.zone.getQuestState();return!(!X.Aq$.isDefined(q)||!X.Aq$.isDefined(q.req))&&(1===q.state[3]&&1===q.state[4])}}class DI extends jn.T{constructor(q,K,z){super(q,K,9,"QUESTS_SHIPWRECK_OPEN_DOOR",{type:"seq",N:1},["shipwreck_shore-B6"],[697,698,699],[],[],z,!1,null,"eve","eve",[]),this.door=null}setup(q,K,z){return super.setup(q,K,z),"B6"===z.getTag()&&this.zone.isOnSequence(9,0)?(this.door=st.q.instance.prodigy.create.element(K.above,1160,340),this.door.highlight(!0,0,0),{doorIsLockedCallback:this.startSequenceA.bind(this,q,K)}):{}}startSequenceA(q,K){const z=st.q.instance.prodigy.event.create();z.function(this.door.highlight.bind(this.door,!1)),z.text(176,"noot"),z.function(this.zone.completeSequence.bind(this.zone,9,0)),z.function(K.process.bind(K)),z.start()}}class RI extends Cn.b{constructor(q){super(q),this.questManagerIdentifier="f55-c292",this.guardian="Eve",this.name="Shipwreck Shore",this.ID=mn.A_.SHIPWRECK,this.guardian="SHIPWRECK_GUARDIAN",this.battleBG="battle-shipwreck-outside",this.defaultOnFaint="shipwreck_shore-B12",this.questHub="shipwreck_shore-B12",this.bgmID=16,this.currency=14,this.zoneIndex=AT.P.Shipwreck,this.states=["wizardC8","wizardA5","chestA3","chestA5","chestB5","chestB13","chestB10","chestBreathingBubble","mimic1","mimic2","inkA7","inkB6","inkB5","inkA5","inkC9","inkB7","squeak",cf.PIPPET_ENCOUNTER,cf.PIPPET_REMATCH,cf.PIPPET_DEFEATED];const K=[Gn.t.Tileset_water_new_png,Gn.t.Tileset_generic_new_png,Gn.t.Tileset_collisions_png,Gn.t.Tileset_ship_exterior_png,Gn.t.Tileset_ship_interior_png,ot.V.Bgm_shipwreck_shore],z={map:"shipwreck_shore-Titan",cutscene:"shipwreck_shore-titanIntro",harvey:{x:175,y:200},sign:{x:100,y:200},catapult:{x:200,y:430,arcHeight:300},titan:{x:1100,y:400,impactOffset:{x:-130,y:0}},entry:{x:550,y:400},battleBG:[br.q.Battle_shipwreck_outside_bg,br.q.Battle_shipwreck_outside_fg]};this.maps={A1:new YO(this,K),A2:new QO(this,K),A3:new XO(this,K),A4:new ZO(this,K),A5:new JO(this,K),A7:new tI(this,K),B2:new aI(this,K),B4:new rI(this,K),B5:new oI(this,K),B6:new hI(this,K),B7:new cI(this,K),B8:new dI(this,K),B10:new eI(this,K),B11:new iI(this,K),B12:new sI(this,K),B13:new nI(this,K),C6:new bI(this,K),C7:new pI(this,K),C8:new vI(this,K),C9:new gI(this,K),C10:new lI(this,K),C11:new uI(this,K),C12:new fI(this,K),Titan:new VT(this,K,z)},Promise.all([kf.T.ready,Qt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((q=>{st.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_SHIPWRECK_SHORE"],q,"Error, unable to load Shipwreck Shore Zone Rewards JSON")})),this.scenes={titanIntro:new RT(this,[Gn.t.Tileset_interior_general_png,Gn.t.Tileset_wall_collisions_png,ot.V.Bgm_tutorial])}}setZoneRewards(){const q=(0,DT.mg)(Qt.R.loadData(Yt.r.ZoneRewardsShipwreckShore_json));this.quests={1:new mI(this,[],q.quests.ShipwreckShoreQ1),2:new EI(this,[],q.quests.ShipwreckShoreQ2),3:new wI(this,[],q.quests.ShipwreckShoreQ3),4:new TI(this,[],q.quests.ShipwreckShoreQ4),5:uf.arePippetQuestEncountersEnabled?new AI(this,[],q.quests.ShipwreckShoreQ5):new SI(this,[],q.quests.ShipwreckShoreQ5),6:new CI(this,[],q.quests.ShipwreckShoreQ6),7:new OI(this,[],q.quests.ShipwreckShoreQ7),8:new II(this,[],q.quests.ShipwreckShoreQ8),9:new DI(this,[],q.quests.ShipwreckShoreQ9),10:new yI(this,[],q.quests.ShipwreckShoreQ10),11:new _I(this,[],q.quests.ShipwreckShoreQ11)}}start(q,K,z){super.start(q,K,z),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}init(q,K,z){super.init(q,K,z);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=this.isUnderwaterMap(z.getTag()),X=Y.backpack.hasItem("key",14)>0;if(Q&&q.broadcaster.addAppListener(gi.ig.PlayerLoaded,this.addBreathingBubbleToPlayerContainer.bind(this),this,this.game),(this.getCurrentQuestID()>1||X&&"B12"===z.getTag())&&(Q?(this.battleBG="battle-shipwreck-underwater",z.enableLayerID(0,!(X&&Q))):(this.battleBG="battle-shipwreck-outside",z.enableLayerID(0,!(X&&this.hasWhirlpool(z.getTag()))))),"C9"===z.getTag()||"B7"===z.getTag()){const q=this.getState("inkC9"),K=this.getState("inkB7");z.enableLayerID(1,1!==q&&1!==K)}else z.enableLayerID(1,1!==this.getState(`ink${z.getTag()}`))}addBreathingBubbleToPlayerContainer(q){var K;X.Aq$.isDefined(q)&&!q.appearanceConfig.isPreview&&(null===(K=q.getSlotContainer("hip"))||void 0===K||K.addChild(new HO(this.game,null)))}startQuest(q){const K=super.startQuest(q);return X.Aq$.isDefined(K)&&q>2?(this.setState("squeak",Mn.o.integerInRange(0,4)),K):null}cleanup(){this.game.broadcaster.removeAppListener(gi.u0.PlayerAdded,this,this.game),this.game.broadcaster.removeAppListener(gi.ig.PlayerLoaded,this,this.game),super.cleanup()}isUnderwaterMap(q){return"A2"===q||"A3"===q||"A5"===q||"A7"===q||"B5"===q||"B6"===q||"B7"===q||"B8"===q||"B10"===q||"B13"===q||"C6"===q||"C7"===q||"C8"===q||"C9"===q}hasWhirlpool(q){return"A1"===q||"A4"===q||"B11"===q||"B12"===q||"C10"===q}addUnderwaterWizard(q,K,z,Y,Q,Z){const J=K.addWizard(this.game,q,z,Y,Q,Z,!1);if(X.Aq$.isDefined(J)){new HO(this.game,J.sprites).y+=24}}addShortcut(q,K,z){const Y=q.background.addChild(st.q.instance.prodigy.create.sprite(K,z,it._.Zone_shipwreck_json,"sand-shortcut"));Y.y-=.5*Y.height,Y.x-=.5*Y.width}enableShortcut(q,K,z,Y,Q){if(1===this.getState("inkC9")&&1===this.getState("inkB7")){const X=this.createAreaEvent(q,K,z,Y,3,2,Q,!1);return X.process(this,K),X}}addWhirlpool(q,K,z,Y,Q){let X,Z,J,tt=Y;this.isUnderwaterMap(K.getTag())?(X=new KO(this.game,q.background,z,Y),X.y-=.75*X.height,Z=3,J=4,tt-=40):(X=new zO(this.game,q.background,z,Y),X.y-=.5*X.height,Z=3,J=2),X.x-=.5*X.width,this.createAreaEvent(q,K,z,tt,Z,J,Q,this.isUnderwaterMap(K.getTag()))}createAreaEvent(q,K,z,Y,Q,X,Z,J){const tt=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!tt.isZoneQuestEnabled||tt.backpack.hasItem("key",14)>0){const tt=this.getArrowOffsetFromHandRotation(Z.handRotation,J);return K.addAreaEvent(this.game,q,{x:z,y:Y,w:40*Q,h:40*X,rect:!0,arrowOffsetX:tt.x,arrowOffsetY:tt.y},Z.target,Z.x,Z.y,Z.callback,Z.handRotation,!1)}}getArrowOffsetFromHandRotation(q,K){const z={x:0,y:0};switch(q){case WT.K.UP:z.y=40+(K?40:0);break;case WT.K.RIGHT:z.x=-40;break;case WT.K.DOWN:z.y=(K?-40:0)-40;break;case WT.K.LEFT:z.x=40;break;default:z.x=0,z.y=0}return z}addInkGroup(q,K,z,Y,Q){const Z=`ink${K.getTag()}`;let J=Q;if(1!==this.getState(Z)){const Q=this.getCurrentQuestID();return st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("key",15)>0&&Q>0&&(J.push(this.sonicBlastInk.bind(this,q,K,Z)),J.push(this.game.broadcaster.broadcast.bind(this.game.broadcaster,gi.gJ.InkGroupDestroyed,this.game,[]))),X.Aq$.isDefined(K.questParams)&&X.Aq$.isDefined(K.questParams.inkCallbacks)&&(J=J.concat(K.questParams.inkCallbacks)),new WO(this.game,q,Q,z,Y,J)}return null}sonicBlastInk(q,K,z){this.setState(z,1),"inkC9"===z?K.enableLayerID(1,1!==this.getState("inkB7")):"inkB7"===z?K.enableLayerID(1,1!==this.getState("inkC9")):(K.enableLayerID(1,!1),K.skipPrefabInitialization=!0,q.area=K.init(this.game,K.below,K.above,q),q.path.init(q.area,q.tileSize))}getCompletedStatesCount(q){let K=0;for(let z=0;z{const K=st.q.instance.prodigy.event.create();K.text(0,"bok"),K.start()}).bind(this,q),!1,J),st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.ShiverchillMerchantNPC,400,350).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.ShiverchillMerchantNPC}`)),st.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,K.user,K.content,150,300),this.setCrossoverQuestSequenceComplete(),this.isPrerequisiteComplete()||(this.addSnowStorm(),Y.disable(),Z.disable(),Q.disable((()=>this.showSnowstormDialogue())))}isPrerequisiteComplete(){const q=mn.A_.FOREST,K=DA.QUEST_INDEX,z=st.q.instance.prodigy.world.getZone(q),Y=z.getCurrentQuestID();return z.getCurrentQuestID()>K||Y===K&&z.isOnSequence(K,CA.GO_TO_SHIVERCHILL)}setCrossoverQuestSequenceComplete(){const q=mn.A_.FOREST,K=WA.c.QUEST_INDEX,z=WA.p.TALK_TO_FLORIAN,Y=st.q.instance.prodigy.world.getZone(q);Y.isOnSequence(K,z)&&Y.completeSequence(K,z)}showSnowstormDialogue(){const q=new Ni.rD(st.q.instance.prodigy.game);q.addEvents([{dialogueData:q.dataProvider.get(1400),blockInput:!0}]),q.start(!0)}addSnowStorm(){const q=new X._mx,K=q.addComponent(X.dLy),z=q.addComponent(X.okU),Y=new X._mx,Q=q.addComponent(X.dLy),Z=q.addComponent(X.okU),J=new iD;J.atlas=it._.Shiverchill_snow_particle_json,J.frameNames=["snowflake-sml","snowflake-med","snowflake-inverted-sml","snowflake-inverted-med"];const tt=new iD;tt.atlas=it._.Shiverchill_snow_particle_json,tt.frameNames=["cloud-sml","cloud-lrg"];const et=new X.ZxM;et.life.setMinMax(.6,1),et.life.type=X.UvC.Random;const st=new X.ZxM;st.life.setMinMax(4,6),st.life.type=X.UvC.Random;const nt=new X.U8B;nt.angle.setMinMax(.6*X.cj9.RAD_TO_DEG,.6*X.cj9.RAD_TO_DEG),nt.angle.type=X.UvC.PhasePerSample,nt.speed.setMinMax(180,220);const at=new X.U8B;at.angle.setMinMax(0,0),at.angle.type=X.UvC.PhasePerSample,at.speed.setMinMax(10,20);const rt=new X.mYY;rt.point1.setTo(0,0),rt.point2.setTo(260,0);const ot=new X.Lzo;ot.speed.setMinMax(-40,40);const ht=new X.m$y;ht.endAlpha=0,ht.startAtLifePercentage=.5,z.emitPerSecond.setMinMax(15,20),z.initializers=[J,et,nt,rt,ot],z.behaviours=[ht],Z.emitPerSecond.setMinMax(5,10),Z.initializers=[tt,st,at,rt],Z.behaviours=[ht],Q.setPosition(120,-40),K.setPosition(50,-40),this.screen.contentGameObject.addChild(q),this.screen.contentGameObject.addChild(Y)}}class aD extends sD{constructor(q,K){super(q,"A11","MAP_SHIVERCHILL_BORDERLAND",1100,220,["shiverchill-A10"],K.concat([it._.Npc_sprite_wizard_json,Gn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new X.I9Y(640,560),new X.I9Y(785,230),new X.I9Y(350,400)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1100,y:130,w:160,h:100},"shiverchill-A10",125,650,null,WT.K.UP),this.addWizard(q,K,474,414,"wizard1",44,!1),this.addPippet(q,K,1,838,543)}}class rD extends sD{constructor(q,K){super(q,"A2","MAP_SHIVERCHILL_THE_CHASM",1150,360,["shiverchill-A3"],K.concat([Gn.t.Tileset_generic_snow_png,it._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-outside",this.dailyCoordinates=[{x:840,y:320},{x:565,y:450}]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1060,y:280,r:80},"shiverchill-A3",100,230,null,WT.K.UP),this.addChest(q,K,"chest3",530,370,null,"A"),this.addWizard(q,K,460,360,"wizard4",42,!1)}}class oD extends sD{constructor(q,K){super(q,"A3","MAP_SHIVERCHILL_FROZEN_PASS",280,550,["shiverchill-A2","shiverchill-A4","shiverchill-B3"],K.concat([it._.Zone_shiverchill_json,Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(700,380),new X.I9Y(1150,300)],this.dailyCoordinates=[{x:1100,y:210},{x:485,y:240},{x:390,y:540}]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1275,y:595,w:150,h:240},"shiverchill-B3",100,290,null,null),this.addAreaEvent(q,K,{x:222,y:650,w:240,h:75},"shiverchill-A4",220,80,null,null),this.checkFurnaces(q,K)}checkFurnaces(q,K){this.zone.getState("furnace")>=3?(this.zone.smoke(K,13,3),this.addAreaEvent(q,K,{x:120,y:100,w:150,h:150},"shiverchill-A2",1150,360,null,null)):(K.addBlock(135,240,{x:.5,y:1,atlas:it._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(K,60,60,120,100))}}class hD extends sD{constructor(q,K){super(q,"A4","MAP_SHIVERCHILL_WORMS_REST",1160,610,["shiverchill-A3","shiverchill-A5"],K.concat([it._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:220,y:0,w:240,h:75},"shiverchill-A3",280,550,null,null),this.addAreaEvent(q,K,{x:1160,y:510,r:60},"shiverchill-A5",160,200,null,WT.K.UP)}}class cD extends sD{constructor(q,K){super(q,"A5","MAP_SHIVERCHILL_MOUNTAIN_VALLEY",1180,650,["shiverchill-A4","shiverchill-A6"],K.concat([Gn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new X.I9Y(100,540),new X.I9Y(700,350),new X.I9Y(1025,150)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1160,y:530,r:60},"shiverchill-A6",160,330,null,WT.K.UP),this.addAreaEvent(q,K,{x:130,y:100,w:100,h:90},"shiverchill-A4",1160,610,null,WT.K.UP),this.addChest(q,K,"chest4",560,320,null,"C")}}class dD extends sD{constructor(q,K){super(q,"A6","MAP_SHIVERCHILL_RAIL_RUINS",1170,400,["shiverchill-A5","shiverchill-B6"],K.concat([it._.Zone_shiverchill_json,Gn.t.Tileset_minecarts_png,Gn.t.Tileset_iceruins_png,it._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(645,330),new X.I9Y(920,555)],this.dailyCoordinates=[{x:1010,y:480},{x:300,y:480},{x:520,y:220}]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:this.game.width,y:400,w:120,h:280},"shiverchill-B6",110,400,null,null);K.addCollect(1,674,245,{type:"item",ID:71}),this.addWizard(q,K,350,370,"wizard2",43,!1),this.checkFurnaces(q,K)}checkFurnaces(q,K){this.zone.getState("furnace")>=2?(this.zone.smoke(K,12,13),K.addClickableEvent(120,160,120,80,this.zone.doorClick.bind(this,K,160,260),null),this.addAreaEvent(q,K,{x:160,y:170,w:80,h:190,rect:!0},"shiverchill-A5",1180,650,null,WT.K.UP),K.addClickableEvent(960,200,80,80,this.zone.doorClick.bind(this,K,1e3,260),null),this.addAreaEvent(q,K,{x:980,y:240,w:70,h:72,rect:!0},"shiverchill-A9",145,170,null,WT.K.UP)):(K.addBlock(160,300,{x:.5,y:1,atlas:it._.Zone_shiverchill_json,tag:"ice-cubes"}),K.addBlock(983,327,{x:.5,y:1,atlas:it._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(K,80,80,160,200),this.addCollisionZone(K,920,200,100,100))}}class lD extends sD{constructor(q,K){super(q,"A7","MAP_SHIVERCHILL_RUINED_ENTRANCE",189,650,["shiverchill-B7","shiverchill-B8"],K.concat([it._.Npc_sprite_merchant_json,it._.Zone_shiverchill_json,Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(1e3,360),new X.I9Y(720,600)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:160,y:520,r:100},"shiverchill-B8",1100,200,null,WT.K.UP),this.addAreaEvent(q,K,{x:this.game.width,y:450,w:120,h:280},"shiverchill-B7",110,220,null,null),this.setupNPC(q,K);const Y=this.zone.getQuestState();X.Aq$.isDefined(this.zone)&&(!X.Aq$.isDefined(Y)||Y.ID<7&&!this.zone.isQuestComplete(6))&&(this.block=K.addBlock(385,325,{x:.5,y:1,atlas:it._.Zone_shiverchill_json,tag:"ice-small",content:!0}),this.addCollisionZone(K,340,280,100,60))}setupNPC(q,K){this.npc=K.addNPC(378,313,it._.Npc_sprite_merchant_json,sa.ac.Merchant,this.chatWithMerchant.bind(this,q,K),"NPC_NAME_MINER"),this.npc.flip(),this.npc.animate("stand"),this.npc.showName();const z=K.content.addChild(st.q.instance.prodigy.create.sprite(350,100,it._.General_icons_json,"map-quest"));st.q.instance.prodigy.animation.float(z,20,1400,!0,!0)}chatWithMerchant(q,K){const z=new Ni.rD(this.game),Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.zone.isOnQuest(4)||this.zone.isOnQuest(5)?(z.addEvents([{callback:()=>{this.game.input.enabled=!1;for(let q=0;q{this.npc.highlight(!1)}},{dialogueData:z.dataProvider.get(379),blockInput:!0},{dialogueData:z.dataProvider.get(380),blockInput:!0},{callback:()=>{this.zone.completeSequence(4,1),K.process()}}]):z.addEvents([{dialogueData:z.dataProvider.get(380),blockInput:!0}])):this.zone.isOnQuest(6)?z.addEvents([{dialogueData:z.dataProvider.get(384),blockInput:!0}]):this.zone.getQuestState().ID>=6&&(0===Y.backpack.hasItem("item",80)?z.addEvents([{dialogueData:z.dataProvider.get(399),blockInput:!0},{dialogueData:z.dataProvider.get(402),blockInput:!0},{dialogueData:z.dataProvider.get(403),blockInput:!0},{dialogueData:z.dataProvider.get(404),blockInput:!0}]):Y.backpack.hasItem("item",80)<5?(z.addEvents([{dialogueData:z.dataProvider.get(399),blockInput:!0},{dialogueData:z.dataProvider.get(391),blockInput:!0}]),4===Y.backpack.hasItem("item",80)&&z.addEvents([{dialogueData:z.dataProvider.get(397),blockInput:!0}])):Y.backpack.hasItem("item",80)>4&&this.zone.getState("daily").rewards<5?z.addEvents([{dialogueData:z.dataProvider.get(398),blockInput:!0},{callback:()=>{Y.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:5}),st.q.instance.prodigy.open.gotItem([{type:"item",ID:76,N:5}],null,null,null,null,null,{source_type:On.C.Npc})}},{dialogueData:z.dataProvider.get(392),blockInput:!0},{callback:()=>{Y.saveEnabled=!0}}]):Y.backpack.hasItem("item",80)>4&&Y.backpack.hasItem("item",80)<10&&this.zone.getState("daily").rewards>4?(z.addEvents([{dialogueData:z.dataProvider.get(399),blockInput:!0},{dialogueData:z.dataProvider.get(392),blockInput:!0}]),9===Y.backpack.hasItem("item",80)&&z.addEvents([{dialogueData:z.dataProvider.get(397),blockInput:!0}])):Y.backpack.hasItem("item",80)>9&&this.zone.getState("daily").rewards<10?z.addEvents([{dialogueData:z.dataProvider.get(398),blockInput:!0},{callback:()=>{Y.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:10}),st.q.instance.prodigy.open.gotItem([{type:"item",ID:77,N:10}],null,null,null,null,null,{source_type:On.C.Npc})}},{dialogueData:z.dataProvider.get(393),blockInput:!0},{callback:()=>{Y.saveEnabled=!0}}]):Y.backpack.hasItem("item",80)>9&&Y.backpack.hasItem("item",80)<25&&this.zone.getState("daily").rewards>9?(z.addEvents([{dialogueData:z.dataProvider.get(399),blockInput:!0},{dialogueData:z.dataProvider.get(393),blockInput:!0}]),24===Y.backpack.hasItem("item",80)&&z.addEvents([{dialogueData:z.dataProvider.get(397),blockInput:!0}])):Y.backpack.hasItem("item",80)>24&&this.zone.getState("daily").rewards<25?z.addEvents([{dialogueData:z.dataProvider.get(398),blockInput:!0},{callback:()=>{Y.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:25}),st.q.instance.prodigy.open.gotItem([{type:"hat",ID:10}],null,null,null,null,null,{source_type:On.C.Npc})}},{dialogueData:z.dataProvider.get(394),blockInput:!0},{callback:()=>{Y.saveEnabled=!0}}]):Y.backpack.hasItem("item",80)>24&&Y.backpack.hasItem("item",80)<50&&this.zone.getState("daily").rewards>24?(z.addEvents([{dialogueData:z.dataProvider.get(399),blockInput:!0},{dialogueData:z.dataProvider.get(394),blockInput:!0}]),49===Y.backpack.hasItem("item",80)&&z.addEvents([{dialogueData:z.dataProvider.get(397),blockInput:!0}])):Y.backpack.hasItem("item",80)>49&&this.zone.getState("daily").rewards<50?z.addEvents([{dialogueData:z.dataProvider.get(398),blockInput:!0},{callback:()=>{Y.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:50}),st.q.instance.prodigy.open.gotItem([{type:"outfit",ID:6}],null,null,null,null,null,{source_type:On.C.Npc})}},{dialogueData:z.dataProvider.get(395),blockInput:!0},{callback:()=>{Y.saveEnabled=!0}}]):Y.backpack.hasItem("item",80)>49&&Y.backpack.hasItem("item",80)<75&&this.zone.getState("daily").rewards>49?(z.addEvents([{dialogueData:z.dataProvider.get(399),blockInput:!0},{dialogueData:z.dataProvider.get(395),blockInput:!0}]),74===Y.backpack.hasItem("item",80)&&z.addEvents([{dialogueData:z.dataProvider.get(397),blockInput:!0}])):Y.backpack.hasItem("item",80)>74&&this.zone.getState("daily").rewards<75?z.addEvents([{dialogueData:z.dataProvider.get(398),blockInput:!0},{callback:()=>{Y.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:75}),st.q.instance.prodigy.open.gotItem([{type:"weapon",ID:13}],null,null,null,null,null,{source_type:On.C.Npc})}},{dialogueData:z.dataProvider.get(396),blockInput:!0},{callback:()=>{Y.saveEnabled=!0}}]):Y.backpack.hasItem("item",80)>74&&Y.backpack.hasItem("item",80)<99&&this.zone.getState("daily").rewards>74?(z.addEvents([{dialogueData:z.dataProvider.get(399),blockInput:!0},{dialogueData:z.dataProvider.get(396),blockInput:!0}]),98===Y.backpack.hasItem("item",80)&&z.addEvents([{dialogueData:z.dataProvider.get(397),blockInput:!0}])):Y.backpack.hasItem("item",80)>98&&this.zone.getState("daily").rewards<99?z.addEvents([{dialogueData:z.dataProvider.get(398),blockInput:!0},{callback:()=>{Y.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:99}),st.q.instance.prodigy.open.gotItem([{type:"hat",ID:56}],null,null,null,null,null,{source_type:On.C.Npc}),Y.saveEnabled=!0}}]):z.addEvents([{dialogueData:z.dataProvider.get(408),blockInput:!0}])),z.start()}}class uD extends sD{constructor(q,K){super(q,"A9","MAP_SHIVERCHILL_TREASURE_ROOM",200,490,["shiverchill-A10","shiverchill-B8"],K.concat([it._.Zone_shiverchill_json,Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:125,y:510},{x:925,y:260},{x:620,y:340}]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:200,y:this.game.height-60,w:280,h:200},"shiverchill-A10",221,200,null,WT.K.DOWN),this.setupFrozenLoot(q,K),this.checkFurnace(q,K)}setupFrozenLoot(q,K){const z=K.content.addChild(st.q.instance.prodigy.create.image(1050,550,it._.Zone_shiverchill_json,"frozen-loot"));z.anchor.set(.5,1),z.visible=!1,this.zone.getState("furnace")>=4?(this.zone.smoke(K,22,12),this.zone.smoke(K,16,14),this.addChest(q,K,"chest6",1050,550,null,"A")):z.visible=!0}checkFurnace(q,K){this.zone.getState("furnace")>=1&&(this.zone.smoke(K,31,4),this.addAreaEvent(q,K,{x:1090,y:130,w:150,h:80},"shiverchill-B8",100,550,null,WT.K.UP)),K.addClickableEvent(160,40,80,80,this.zone.doorClick.bind(this,K,200,100),null),this.zone.getState("furnace")>=2&&(this.zone.smoke(K,12,7),this.addAreaEvent(q,K,{x:150,y:75,w:100,h:80,rect:!0},"shiverchill-A6",980,335,null,WT.K.UP)),this.zone.getState("furnace")<=1&&(K.addBlock(150,150,{x:.5,y:1,atlas:it._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(K,80,0,120,80)),this.zone.getState("furnace")<1&&(K.addBlock(1070,250,{x:.5,y:1,atlas:it._.Zone_shiverchill_json,tag:"ice-cubes"}),K.addBlock(1155,285,{x:.5,y:1,atlas:it._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(K,1e3,80,180,140))}}class fD extends sD{constructor(q,K){super(q,"B1","MAP_SHIVERCHILL_GATE",200,630,["shiverchill-B3"],K.concat([it._.Npc_sprite_wizard_json,Gn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:130,y:420,r:80},"shiverchill-B3",1160,230,null,WT.K.UP),this.addWizard(q,K,960,500,"wizard3",45,!0)}}class bD extends sD{constructor(q,K){super(q,"B10","MAP_SHIVERCHILL_FURNACE_ROOM",255,545,["shiverchill-A10","shiverchill-B9"],K.concat([Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:200,y:660,w:120,h:90,rect:!0},"shiverchill-A10",1080,230,null,null),this.addAreaEvent(q,K,{x:660,y:200,w:60,h:72,rect:!0},"shiverchill-B9",645,500,null,null);const Y=[[200,120],[440,240],[720,200],[1e3,240]],Q=[];for(let X=0;X0&&this.highlightFurnace(Q),this.processFurnaces(K)}highlightFurnace(q){const K=this.zone.getState("furnace");X.Aq$.isDefined(K)?K{const Y=K.content.addChild(st.q.instance.prodigy.icon.createIcon(K.user.x,K.user.y,z));Y.anchor.set(.5,1),q.add.tween(Y,this).to({x:"+=70"},2e3,X.GS3.Linear.None).to({alpha:0},10,X.GS3.Linear.None).start(),q.add.tween(Y,this).to({y:"-=200"},1e3,X.GS3.Quadratic.Out).to({y:"+=100"},1e3,X.GS3.Quadratic.In).start()};if(Z>=z)if(tt.backpack.hasItem("item",79)>0){const z=[{type:"item",ID:76},{type:"item",ID:2},{type:"item",ID:77}],Y=.5*Math.random()+.5,Q=[],X=Math.floor(1.5*Math.random()+1);for(let q=0;qZ+1?J.popup(Q.getText("SHIVERCHILL_FURNACE_IN_ORDER")):tt.backpack.hasItem("item",71)>0?(J.enableInput(!1),J.enableSave(!1),J.function(tt.backpack.consume.bind(tt.backpack,"item",71,1)),J.function(this.zone.setState.bind(this.zone,"furnace",z)),J.function(Y.highlight.bind(Y,!1)),J.function(et.bind(this,q,K,zt.E.getIconForType("item",71))),J.delay(2e3),J.function(this.processFurnaces.bind(this,K)),J.enableSave(!0),J.enableInput(!0),J.function(K.process.bind(K))):J.popup(Q.getText("SHIVERCHILL_FURNACE_FUEL"));J.start()}processFurnaces(q){const K=this.zone.getState("furnace");if(X.Aq$.isDefined(K)){const z=[[5,4],[11,7],[18,6],[25,7]];for(let Y=0;Y=Y+1&&(q.floor.add(this.getTile(809,40*Q,40*Z,q.path,q.area,null,!0,!0)),q.floor.add(this.getTile(810,40*(Q+1),40*Z,q.path,q.area,null,!0,!0)),q.floor.add(this.getTile(X.DXe.flippedHorizontally+809,40*(Q+2),40*Z,q.path,q.area,null,!0,!0)))}}}}class pD extends sD{constructor(q,K){super(q,"B2","MAP_BONFIRE_SPIRE_THRONE_ROOM",640,500,["shiverchill-B3"],K),this.battleBG="battle-shiverchill-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:675,y:625,w:250,h:200,rect:!0},"shiverchill-B3",560,415,null,WT.K.DOWN)}}class vD extends sD{constructor(q,K){super(q,"B3","MAP_SHIVERCHILL_ROYAL_PASSAGE",110,280,["shiverchill-B1","shiverchill-A3","shiverchill-B2"],K.concat([it._.Zone_shiverchill_json,it._.Npc_sprite_noot_json,Gn.t.Tileset_iceruins_png,Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:980,y:250},{x:970,y:400},{x:255,y:490}]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:0,y:350,w:150,h:275},"shiverchill-A3",1160,530,null,null),this.checkFurnaces(q,K)}checkFurnaces(q,K){this.zone.getState("furnace")>=3?(this.zone.smoke(K,1,16),this.zone.smoke(K,27,16),this.zone.smoke(K,26,12),K.addClickableEvent(520,270,80,120,this.zone.doorClick.bind(this,K,560,370),null),this.addAreaEvent(q,K,{x:520,y:285,w:90,h:80,rect:!0},"shiverchill-B2",640,500,null,WT.K.UP),this.addAreaEvent(q,K,{x:1060,y:90,w:180,h:60},"shiverchill-B1",200,630,null,WT.K.UP)):(K.addBlock(520,368,{x:.5,y:1,atlas:it._.Zone_shiverchill_json,tag:"ice-cubes"}),K.addBlock(1080,175,{x:.5,y:1,atlas:it._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(K,460,60,160,220),this.addCollisionZone(K,1060,40,180,120))}}class gD extends sD{constructor(q,K){super(q,"B6","MAP_SHIVERCHILL_RUINED_STEPS",1100,530,["shiverchill-A6","shiverchill-B7"],K.concat([Gn.t.Tileset_minecarts_png,Gn.t.Tileset_iceruins_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(315,635),new X.I9Y(650,600),new X.I9Y(1100,230)],this.dailyCoordinates=[{x:1100,y:420},{x:1015,y:110},{x:185,y:400}]}init(q,K,z,Y){return this.enableLayerID(0,!1),this.enableLayerID(1,!0),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1e3,y:this.game.height-70,w:280,h:120},"shiverchill-B7",1060,110,null,null),this.addAreaEvent(q,K,{x:0,y:400,w:170,h:280},"shiverchill-A6",1170,400,null,null),this.addChest(q,K,"chest1",545,280,{type:"item",ID:75},"B")}}class mD extends sD{constructor(q,K){super(q,"B7","MAP_SHIVERCHILL_RUINED_PASSAGE",110,220,["shiverchill-A7","shiverchill-B6"],K.concat([Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(320,260),new X.I9Y(380,620)],this.dailyCoordinates=[{x:370,y:540},{x:955,y:400},{x:1190,y:330}]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1050,y:0,w:480,h:120},"shiverchill-B6",1100,530,null,null),this.addAreaEvent(q,K,{x:0,y:250,w:120,h:280},"shiverchill-A7",1170,430,null,null)}}class yD extends sD{constructor(q,K){super(q,"B8","MAP_SHIVERCHILL_MOUNTAIN_PASS",100,550,["shiverchill-A9","shiverchill-A7"],K.concat([it._.Zone_shiverchill_json,Gn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new X.I9Y(1200,530),new X.I9Y(820,400),new X.I9Y(445,280)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:90,y:410,r:80},"shiverchill-A9",1125,225,null,WT.K.UP),this.addAreaEvent(q,K,{x:1090,y:100,w:100,h:70},"shiverchill-A7",189,650,null,WT.K.UP),this.addChest(q,K,"chest2",750,200,null,"C")}canRegularMonsterSpawn(){return!this.zone.isOnQuest(7)}}class _D extends sD{constructor(q,K){super(q,"B9","MAP_SHIVERCHILL_HIDDEN_ROOM",645,500,["shiverchill-B10"],K.concat([it._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:680,y:250},{x:280,y:320},{x:945,y:380}]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:645,y:650,r:140},"shiverchill-B10",670,250,null,WT.K.DOWN),this.addChest(q,K,"chest5",850,275)}}class ED extends jn.T{constructor(q,K,z){super(q,K,1,"",{type:"pet",ID:122,N:3},["shiverchill-B10"],[1464,1465,1466],[],[332],z,!1,"QUESTS_SHIVERCHILL_CLEAR_FURNACE")}setup(q,K,z){if(super.setup(q,K,z),"B10"===z.getTag()){const Y={randDir:!0,encounter:[{ID:122}],difficulty:1,maxTeamSize:1,isQuestEncounter:!0};z.addMonster(q,K,1,128,255,!0,Y),z.addMonster(q,K,2,1150,480,!0,Y),z.addMonster(q,K,3,417,408,!0,Y)}return null}start(q,K,z){if("B10"===z.getTag()&&this.zone.isOnSequence(1,0)){const q=st.q.instance.prodigy.event.create();q.text(67,"noot"),q.function(this.zone.completeSequence.bind(z.zone,1,0)),q.start()}return null}}class wD extends jn.T{constructor(q,K,z){super(q,K,10,"QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",{type:"zgteState",ID:"furnace",N:2},["shiverchill-B10"],[342,343],[],[332,333],z,!1)}}class TD extends jn.T{constructor(q,K,z){super(q,K.concat(ct.Q.Default_boss_16_json),11,"QUESTS_SHIVERCHILL_CHECK_THRONE",{type:"seq",N:1},["shiverchill-B3"],[359,360],[],[361],z,!1)}setup(q,K,z){return super.setup(q,K,z),"B3"===z.getTag()?{enableMonsters:!1}:{}}start(q,K,z){return this.zone.isOnSequence(11,0)&&"B3"===z.getTag()&&this.cutscene(q,K,z),{}}cutscene(q,K,z){z.boss=q.add.spine(930,440,ct.Q.Default_boss_16_json,K.content),z.boss.visible=!1,z.boss.scale.set(.65,.65),z.boss.setAnimationByName(0,"idle",!0);const Y=K.content.addChild(st.q.instance.prodigy.icon.createIcon(770,400,zt.E.getIconForType("item",71))),Q=K.addNPC(250,400,it._.Npc_sprite_noot_json);Q.visible=!1,Q.float(!0);const X=st.q.instance.prodigy.event.create();X.enableInput(!1),X.path(K.user,[{x:250,y:400}]),X.set(Q,"visible",!0),X.hop(Q,300,50,50),X.text(74,"noot"),X.delay(500),X.function(Q.chat.bind(Q,1,100)),X.delay(500),X.path(Q,[{x:550,y:450}]),X.text(75,"noot"),X.path(Q,[{x:750,y:500}]),X.shake(0,3e3,10,"v",!0),X.function(Q.chat.bind(Q,1,100)),X.explode(810,350,200,150,1,!0),X.delay(500),X.hop(Q,110,-140,100,!0),X.delay(700),X.explode(810,200,200,250,2,!0),X.delay(1e3),X.set(z.boss,"visible",!0),X.explode(810,350,150,150,1),X.delay(1e3),X.shake(0,3e3,10,"v",!0),X.explode(810,350,200,150,1,!0),X.delay(700),X.explode(810,200,200,250,2,!0),X.delay(700),X.set(z.boss,"visible",!1),X.set(Y,"visible",!1),X.explode(810,350,150,150,1),X.text(76,"noot"),X.path(Q,[{x:300,y:400}]),X.hop(Q,300,-50,50),X.set(Q,"visible",!1),X.enableInput(!0),X.function(this.zone.completeSequence.bind(z.zone,11,0)),X.function(K.process.bind(K)),X.start()}}class SD extends jn.T{constructor(q,K,z){super(q,K,12,"",{type:"item",ID:74,N:5,K:!0},["shiverchill-A3","shiverchill-B3"],[362,334,363,364,365],[],[332],z,!1,"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS"),this.collectionMaps={A3:[1,2,3],B3:[4,5]}}setup(q,K,z){if(super.setup(q,K,z),"B3"===z.getTag()){const q={type:"item",ID:74};K.addCollect(4,530,550,q),K.addCollect(5,860,525,q)}else if("A3"===z.getTag()){const q={type:"item",ID:74};K.addCollect(1,980,160,q),K.addCollect(2,180,450,q),K.addCollect(3,670,370,q)}return null}}class AD extends jn.T{constructor(q,K,z){super(q,K.concat(ct.Q.Default_boss_16_json),13,"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",{type:"seq",N:1},["shiverchill-A4"],[366,334,367],[],[332],z,!1)}setup(q,K,z){return super.setup(q,K,z),"A4"===z.getTag()?{enableMonsters:!1}:null}start(q,K,z){return this.zone.isOnSequence(13,0)&&"A4"===z.getTag()&&(this.zone.hideFollow(K),this.bossBattle(q,K,z)),null}endBattle(q){this.zone.completeSequence(13,0),st.q.instance.prodigy.world.it("shiverchill-A4",300,460)}bossBattle(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("f71-42eb"),Q=Y.getValue("iceWyrm2MaxHP",te.s.get("GameConstants.IceWyrm2.MAX_HP")),Z=null===Q?void 0:parseInt(Q,10),J=this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE"),{boss:{ID:16,element:"ice",attacks:[62,63,65],name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_ICE_WORM"),tag:mn.A_.SHIVERCHILL,maxHP:Z},difficulty:parseInt(Y.getValue("iceWyrm2Difficulty",te.s.get("GameConstants.IceWyrm2.DIFFICULTY")),10),starMod:5,screen:"battle-shiverchill-inside",drops:[{ID:71,type:"item"}]},this.endBattle.bind(this,q)),tt=(q,K,z)=>{const Y=K.background.addChild(st.q.instance.prodigy.create.sprite(K.user.x,K.user.y,it._.General_icons_json,"crystal"));Y.anchor.set(.5,1),q.add.tween(Y,this).to({x:z},500,X.GS3.Linear.None).start(),q.add.tween(Y,this).to({y:"-=50"},250,X.GS3.Quadratic.Out).to({y:"+=50"},250,X.GS3.Quadratic.In).start()},et=st.q.instance.prodigy.event.create(),nt=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;et.set(K.user,"evtProc",!0),et.enableInput(!1),et.path(K.user,[{x:640,y:530}]),et.function(nt.backpack.consume.bind(nt.backpack,"item",74,5)),et.function(tt.bind(z,q,K,"-=50")),et.delay(500),et.path(K.user,[{x:310,y:600}]),et.function(tt.bind(z,q,K,"-=50")),et.delay(500),et.path(K.user,[{x:200,y:430}]),et.function(tt.bind(z,q,K,"-=50")),et.delay(500),et.path(K.user,[{x:250,y:340}]),et.function(tt.bind(z,q,K,"+=50")),et.delay(500),et.path(K.user,[{x:470,y:380}]),et.function(tt.bind(z,q,K,"+=50")),et.delay(500),et.path(K.user,[{x:300,y:460}]),et.path(K.user,[{x:301,y:460}]),et.delay(500),et.shake(0,3e3,10,"v",!0),et.function(K.user.chat.bind(K.user,1,100)),et.explode(360,410,150,150,1,!0),et.delay(700),et.explode(360,260,150,250,2,!0),et.delay(1e3),et.function((()=>{const z=q.add.spine(500,510,ct.Q.Default_boss_16_json,K.content);z.scale.set(-.65,.65),z.setAnimationByName(0,"idle",!0)})),et.explode(360,410,150,150,1),et.delay(1500),et.enableInput(!0),et.function((()=>{st.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle"})),et.function(J),et.start()}}class CD extends jn.T{constructor(q,K,z){super(q,K,14,"QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",{type:"zgteState",ID:"furnace",N:3},["shiverchill-B10"],[342,343],[],[332,333],z,!1)}}!function(q){q[q.GetShiverchillGemSeq=0]="GetShiverchillGemSeq",q[q.PlaceShiverchillGemSeq=1]="PlaceShiverchillGemSeq",q[q.FinishQuestSeq=2]="FinishQuestSeq",q[q.QuestID=15]="QuestID"}(wO||(wO={}));class OD extends jn.T{constructor(q,K,z){super(q,K,15,"",{type:"seq",N:wO.FinishQuestSeq},[`${mn.A_.SHIVERCHILL}-B2`],[368,369],[],[1252],z,!1,"QUESTS_SHIVERCHILL_GET_GEM"),this.collectionMaps={B2:[1]}}setup(q,K,z){super.setup(q,K,z);const Y=z.getTag(),Q=`zone-${this.zone.ID}-quest`,Z=this.zone.getQuestState(),J=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,tt=st.q.instance.prodigy.world.getZone(mn.A_.ACADEMY).getKeystoneState(mn.A_.SHIVERCHILL)===Fn.s.Placed,et=J.backpack.hasItem("key",4)>0;return X.Aq$.isDefined(Z.state)||tt||et?tt&&"seq"!==J.state.get(`${Q}-req-type`)&&J.state.set(`${Q}-req`,this.req):J.state.set(Q,Object.assign(Object.assign({},Z),{state:{},seq:wO.GetShiverchillGemSeq})),et&&(this.collectionMaps={}),Y===TO.ThroneRoom&&this.zone.isOnSequence(this.ID,wO.GetShiverchillGemSeq)?(q.input.enabled=!1,J.playerContainer.visible=!0,K.user.x=700,K.user.y=850,st.q.instance.prodigy.world.playScene("shiverchill-receiveShiverchillGem")):Y===TO.BoksCave&&(et&&(this.onStart=[1251]),tt&&(this.zone.completeSequence(this.ID,wO.GetShiverchillGemSeq),this.zone.completeSequence(this.ID,wO.PlaceShiverchillGemSeq))),null}process(q,K,z){super.process(q,K,z);st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("key",4)>0&&X.Aq$.isDefined(K.questProgress)&&!di.U.shouldShowEndgameQuestBanner(mn.A_.SHIVERCHILL)&&(K.questProgress.visible=!1)}}class ID extends jn.T{constructor(q,K,z){super(q,K,2,"",{type:"item",N:1,ID:71,K:!0},["shiverchill-A9"],[339,334,340,341],[],[332],z,!1,"QUESTS_SHIVERCHILL_GET_FUEL")}setup(q,K,z){return super.setup(q,K,z),"A9"===z.getTag()?(st.q.instance.prodigy.prefabFactory.addMonster(z,490,510,ID.QUEST_SPAWN_IDS[0],this.getSpawnMods(ID.QUEST_SPAWN_IDS[0])).catch(X.RQr.createHandler("Could not add monster 1 for ShiverchillQ2")),st.q.instance.prodigy.prefabFactory.addMonster(z,720,200,ID.QUEST_SPAWN_IDS[1],this.getSpawnMods(ID.QUEST_SPAWN_IDS[1])).catch(X.RQr.createHandler("Could not add monster 2 for ShiverchillQ2")),st.q.instance.prodigy.prefabFactory.addMonster(z,1150,460,ID.QUEST_SPAWN_IDS[2],this.getSpawnMods(ID.QUEST_SPAWN_IDS[2])).catch(X.RQr.createHandler("Could not add monster 3 for ShiverchillQ2")),st.q.instance.prodigy.prefabFactory.addMonster(z,200,230,ID.QUEST_SPAWN_IDS[3],this.getSpawnMods(ID.QUEST_SPAWN_IDS[3])).catch(X.RQr.createHandler("Could not add monster 4 for ShiverchillQ2")),{enableMonsters:!1}):null}getSpawnMods(q){this.spawnPetIds||(this.spawnPetIds={},ID.QUEST_SPAWN_IDS.forEach((q=>{this.spawnPetIds[q]=Math.random()<.5?78:122})));let K=[];return 1===this.getQuestMonstersRemaining()&&(K=[{type:"item",ID:71,N:1}]),{randDir:!0,showGuideHand:!0,encounter:[{ID:this.spawnPetIds[q]}],drops:K,difficulty:2,maxTeamSize:1,isQuestEncounter:!0,unique:!0}}getQuestMonstersRemaining(){const q=this.zone.getQuestState().state;return ID.QUEST_SPAWN_IDS.filter((K=>!q[K+1])).length}}ID.QUEST_SPAWN_IDS=[1,2,3,4];class DD extends jn.T{constructor(q,K,z){super(q,K,3,"QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",{type:"zgteState",ID:"furnace",N:1},["shiverchill-B10"],[342,343],[],[332,333],z,!1)}}class RD extends jn.T{constructor(q,K,z){super(q,K,4,"QUESTS_SHIVERCHILL_EXPLORE_CAVES",{type:"seq",N:2},["shiverchill-A7"],[344,345],[69],[346,347,334,348],z,!1)}start(q,K,z){if(this.zone.isOnSequence(4,0)&&"B8"===z.getTag()){const q=st.q.instance.prodigy.event.create();q.enableInput(!1),q.path(K.user,[{x:250,y:640}]),q.function(K.user.chat.bind(K.user,1,100)),q.shake(0,3e3,10,"v"),q.enableInput(!0),q.text(68,"noot"),q.function(this.zone.completeSequence.bind(z.zone,4,0)),q.start()}else"A7"===z.getTag()&&(this.zone.isQuestComplete(4)||z.npc.highlight(!0,-60,-100));return null}}class PD extends jn.T{constructor(q,K,z){super(q,K,5,"QUESTS_SHIVERCHILL_FIND_SHOVEL",{type:"item",ID:73,N:1},["shiverchill-B6"],[349],[70],[350,334,351],z,!1)}}class MD extends jn.T{constructor(q,K,z){super(q,K,6,"QUESTS_SHIVERCHILL_HELP_MINER",{type:"seq",N:2},["shiverchill-A7"],[352],[],[332],z,!1)}start(q,K,z){return this.zone.isOnSequence(6,0)&&"A7"===z.getTag()?this.ambush(q,K,z):this.zone.isOnSequence(6,1)&&"A7"===z.getTag()&&this.talkToMerchant(q,K,z),null}endBattle(q){this.zone.completeSequence(6,0),st.q.instance.prodigy.world.it("shiverchill-A7",328,343)}ambush(q,K,z){const Y=z.addMonster(q,K,1,0,0,!1,{encounter:[{ID:87}],difficulty:1,maxTeamSize:1},!0),Q=z.addMonster(q,K,1,0,0,!1,{encounter:[{ID:87}],difficulty:1,maxTeamSize:1},!0),Z=z.addMonster(q,K,1,0,0,!1,{encounter:[{ID:87}],difficulty:1,maxTeamSize:1},!0),J=(q,K,z)=>{z.x=q,z.y=K},tt=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),et=this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_SNOWBALL_FIGHT"),{pets:[{ID:87,nickname:tt.getText("NPC_NAME_CHILLY")},{ID:87,nickname:tt.getText("NPC_NAME_FROSTY")},{ID:87,nickname:tt.getText("NPC_NAME_FREEZY")}]},this.endBattle.bind(this,q)),it=st.q.instance.prodigy.event.create();it.enableInput(!1),it.set(K.user,"evtProc",!0),it.path(K.user,[{x:450,y:550},{x:430,y:600}]),it.delay(500),it.function(J.bind(z,900,600,Y)),it.function(J.bind(z,950,650,Q)),it.function(J.bind(z,950,550,Z)),it.function(K.user.chat.bind(K.user,1,80)),it.path(Y,[{x:600,y:333}],1,!0),it.path(Q,[{x:650,y:333}],1,!0),it.path(Z,[{x:600,y:283}],1,!1),it.hop(Y,575,-140,100,!0),it.hop(Q,575,-140,100,!0),it.hop(Z,575,-140,100,!1),it.enableInput(!0),it.function((()=>{st.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),it.function(et),it.start()}talkToMerchant(q,K,z){X.Aq$.isDefined(z.block)&&(z.block.visible=!1);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=new Ni.rD(q);Q.addEvents([{dialogueData:Q.dataProvider.get(381),blockInput:!0},{dialogueData:Q.dataProvider.get(81),blockInput:!0},{dialogueData:Q.dataProvider.get(382),blockInput:!0},{dialogueData:Q.dataProvider.get(383),blockInput:!0},{dialogueData:Q.dataProvider.get(82),blockInput:!0},{dialogueData:Q.dataProvider.get(384),blockInput:!0},{dialogueData:Q.dataProvider.get(407),blockInput:!0},{dialogueData:Q.dataProvider.get(402),blockInput:!0},{dialogueData:Q.dataProvider.get(403),blockInput:!0},{dialogueData:Q.dataProvider.get(404),blockInput:!0},{callback:()=>{Y.saveEnabled=!1}},{callback:()=>{Y.backpack.consume("item",72,1)}},{callback:()=>{this.zone.completeSequence(6,1)}},{callback:()=>{Y.saveEnabled=!0}},{callback:()=>{K.process()}}]),Q.start()}}class ND extends jn.T{constructor(q,K,z){super(q,K.concat(ct.Q.Default_boss_16_json),7,"QUESTS_SHIVERCHILL_UNKNOWN",{type:"seq",N:1},["shiverchill-B8"],[353,354],[69],[332],z,!1,"QUESTS_SHIVERCHILL_DEFEAT_MINI_BOSS")}setup(q,K,z){return super.setup(q,K,z),this.zone.isOnSequence(7,0)&&"B8"===z.getTag()&&(q.input.enabled=!1,this.screen.user.x=290,this.screen.user.y=640),{}}start(q,K,z){return this.zone.isOnSequence(7,0)&&"B8"===z.getTag()&&this.bossBattle(q,K,z),{}}endBattle(q){this.zone.completeSequence(7,0),st.q.instance.prodigy.world.it("shiverchill-B8",480,320)}bossBattle(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("f71-42eb"),Q=Y.getValue("iceWyrm1MaxHP",te.s.get("GameConstants.IceWyrm1.MAX_HP")),Z=null===Q?void 0:parseInt(Q,10),J=this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_SCARY_WORM"),{boss:{ID:16,element:"ice",attacks:[62,64],name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_UNKNOWN"),difficulty:3,tag:mn.A_.SHIVERCHILL,maxHP:Z},difficulty:parseInt(Y.getValue("iceWyrm1Difficulty",te.s.get("GameConstants.IceWyrm1.DIFFICULTY")),10),starMod:2,screen:"battle-shiverchill-outside"},this.endBattle.bind(this,q)),tt=st.q.instance.prodigy.event.create();tt.enableInput(!1),tt.path(K.user,[{x:425,y:326},{x:420,y:530},{x:290,y:640}]),tt.shake(0,3e3,10,"v",!0),tt.function(K.user.chat.bind(K.user,1,100)),tt.explode(540,250,150,150,1,!0),tt.delay(700),tt.explode(540,100,150,250,2,!0),tt.delay(1e3),tt.function((()=>{const z=q.add.spine(605,315,ct.Q.Default_boss_16_json,K.foreground);z.scale.set(-.65,.65),z.setAnimationByName(0,"idle",!0)})),tt.explode(540,250,150,150,1),tt.delay(1500),tt.enableInput(!0),tt.text(73,"noot"),tt.function((()=>{st.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),tt.function(J),tt.start()}}class xD extends jn.T{constructor(q,K,z){super(q,K,8,"",{type:"pet",ID:90,N:3},["shiverchill-B7","shiverchill-B6"],[355,356,334,357],[],[332],z,!1,"QUESTS_SHIVERCHILL_DEFEAT_SPECTERS")}setup(q,K,z){super.setup(q,K,z);const Y={randDir:!0,encounter:[{ID:90}],difficulty:3,maxTeamSize:1,isQuestEncounter:!0},Q={randDir:!0,encounter:[{ID:90}],difficulty:2,maxTeamSize:1,isQuestEncounter:!0};return"B6"===z.tag?(z.addMonster(q,K,11,700,160,!1,Q,!1),z.addMonster(q,K,10,325,325,!1,Y,!1),{enableMonsters:!1}):"B7"===z.tag?(z.addMonster(q,K,11,800,500,!1,Y,!1),z.addMonster(q,K,10,675,285,!1,Q,!1),{enableMonsters:!1}):null}}class LD extends jn.T{constructor(q,K,z){super(q,K.concat(ot.V.Bgm_puppetmaster),8,"",{type:"pet",ID:90,N:3},["shiverchill-B7","shiverchill-B6"],[355,356,334,357],[],[332],z,!1,"QUESTS_SHIVERCHILL_DEFEAT_SPECTERS")}setup(q,K,z){super.setup(q,K,z);const Y={randDir:!0,encounter:[{ID:90}],difficulty:3,maxTeamSize:1,isQuestEncounter:!0},Q={randDir:!0,encounter:[{ID:90}],difficulty:2,maxTeamSize:1,isQuestEncounter:!0};return"B6"===z.tag?(z.addMonster(q,K,11,700,160,!1,Q,!1),z.addMonster(q,K,10,325,325,!1,Y,!1),{enableMonsters:!1}):"B7"===z.tag?(z.addMonster(q,K,11,800,500,!1,Y,!1),z.addMonster(q,K,10,675,285,!1,Q,!1),{enableMonsters:!1}):"A7"!==z.tag||z.zone.getState(cf.PIPPET_DEFEATED)?null:(st.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(z.zone,202,SS.e.Shiverchill_quests_encounter).catch(X.RQr.createHandler(`Could not load the Pippet Encounter from guid: ${SS.e.Shiverchill_quests_encounter}`)),q.input.enabled=!1,{enableMonsters:!1,enableWizards:!1})}}class kD extends jn.T{constructor(q,K,z){super(q,K,9,"",{type:"item",ID:71,N:1,K:!0},["shiverchill-A6"],[358],[],[332],z,!1,"QUESTS_SHIVERCHILL_GET_FUEL")}}class BD extends Zn.Z{constructor(q,K){super(q,"B2",[...K,...[it._.Npc_sprite_noot_json,ct.Q.Spine_shadowportal_json,ht.c.Sfx_academy_portal_open,ht.c.Sfx_academy_portal_close,ct.Q.Spine_academygh_addkeystone_json,"key-4",ot.V.Bgm_fun,iT.N.Map_shiverchill_b2_json,Gn.t.Tileset_shiverchill_interior_png]])}start(q,K){var z;st.q.instance.game.input.enabled=!1,super.start(q,K,11),K.user.x=700,K.user.y=850;const Y=K.addNPC(630,800,it._.Npc_sprite_noot_json);Y.float(!0),Y.walkSpeed=2,Y.visible=!0;const Q=q.add.spine(845,250,ct.Q.Spine_shadowportal_json);Q.setToSetupPose(),K.content.addChild(Q);const Z=q.add.spine(695,300,ct.Q.Spine_academygh_addkeystone_json);Z.setToSetupPose(),Z.setAnimationByName(0,"keystone-idle-shiverchill"),K.content.addChild(Z);const J=st.q.instance.prodigy.gameContainer.get(X.$Bt.IFSMController),tt=st.q.instance.prodigy.gameContainer.get(X.$Bt.FSMService),et=[1246];(null===(z=st.q.instance.prodigy.world.getCurrentZoneObject())||void 0===z?void 0:z.difficultyMode)===vi.i.Regular&&et.push(1247),J.execute(tt.getStateMachine(186),{game:q,screen:K,scene:this,zone:this.zone,player:K.user,noot:Y,path:K.path,pathfinder:K.path,portal:Q,keystone:Z,map:`${this.zone.ID}-B2`,nootDialogues:et},(()=>st.q.instance.game.input.enabled=!0))}}!function(q){q.BoksCave="A10",q.ThroneRoom="B2"}(TO||(TO={}));class UD extends Cn.b{constructor(q){super(q),this.questManagerIdentifier="474-0137",this._assets=[Gn.t.Tileset_icecave_new_png,Gn.t.Tileset_collisions_png,Gn.t.Tileset_ship_exterior_png,Gn.t.Tileset_water_new_png,ot.V.Bgm_shiverchill_mountain],this.name="Shiverchill Mountains",this.ID=mn.A_.SHIVERCHILL,this.guardian="SHIVERCHILL_GUARDIAN",this.battleBG="battle-shiverchill-inside",this.defaultOnFaint="shiverchill-A10",this.questHub="shiverchill-A10",this.bgmID=17,this.currency=15,this.zoneIndex=AT.P.Shiverchill,this.states=["chest1","chest2","chest3","chest4","chest5","wizard1","wizard2","wizard3","wizard4","furnace","chest6","daily",cf.PIPPET_ENCOUNTER,cf.PIPPET_REMATCH,cf.PIPPET_DEFEATED],this.monsters=[16,50,122,78,87];const K=[Gn.t.Tileset_icecave_new_png,Gn.t.Tileset_collisions_png,Gn.t.Tileset_ship_exterior_png,Gn.t.Tileset_water_new_png,ot.V.Bgm_shiverchill_mountain,Gn.t.Tileset_shiverchill_exterior_png,Gn.t.Tileset_shiverchill_interior_png,Gn.t.Tileset_shiverchill_rails_png],z={map:"shiverchill-Titan",cutscene:"shiverchill-titanIntro",harvey:{x:240,y:200},sign:{x:150,y:210},catapult:{x:140,y:400,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:400,y:450},battleBG:[br.q.Battle_shiverchill_outside_bg,br.q.Battle_shiverchill_outside_fg]};this.maps={A11:new aD(this,K),A10:new nD(this,K),A9:new uD(this,K),A7:new lD(this,K),A6:new dD(this,K),A5:new cD(this,K),B3:new vD(this,K),B6:new gD(this,K),B7:new mD(this,K),B8:new yD(this,K),B9:new _D(this,K),B10:new bD(this,K),A4:new hD(this,K),A2:new rD(this,K),A3:new oD(this,K),B2:new pD(this,K),B1:new fD(this,K),Titan:new VT(this,K,z)},Promise.all([kf.T.ready,Qt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((q=>{st.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_SHIVERCHILL_MOUNTAINS"],q,"Error, unable to load Shiverchill Zone Rewards JSON")})),this.scenes={receiveShiverchillGem:new BD(this,K),titanIntro:new RT(this,[Gn.t.Tileset_interior_general_png,Gn.t.Tileset_wall_collisions_png,ot.V.Bgm_tutorial])}}setZoneRewards(){const q=(0,DT.mg)(Qt.R.loadData(Yt.r.ZoneRewardsShiverchill_json));this.quests={1:new ED(this,[],q.quests.ShiverchillQ1),2:new ID(this,[],q.quests.ShiverchillQ2),3:new DD(this,[],q.quests.ShiverchillQ3),4:new RD(this,[],q.quests.ShiverchillQ4),5:new PD(this,[],q.quests.ShiverchillQ5),6:new MD(this,[],q.quests.ShiverchillQ6),7:new ND(this,[],q.quests.ShiverchillQ7),8:uf.arePippetQuestEncountersEnabled?new LD(this,[],q.quests.ShiverchillQ8):new xD(this,[],q.quests.ShiverchillQ8),9:new kD(this,[],q.quests.ShiverchillQ9),10:new wD(this,[],q.quests.ShiverchillQ10),11:new TD(this,[],q.quests.ShiverchillQ11),12:new SD(this,[],q.quests.ShiverchillQ12),13:new AD(this,[],q.quests.ShiverchillQ13),14:new CD(this,[],q.quests.ShiverchillQ14),15:new OD(this,[],q.quests.ShiverchillQ15)}}start(q,K,z){super.start(q,K,z),this.showTopLeftNavigationButton()}meetsQuestPrerequisite(){const q=st.q.instance.prodigy.world.zones[UD.QUEST_PREREQUISITE.zoneId].getQuestState();return!((null==q?void 0:q.ID)<=UD.QUEST_PREREQUISITE.questId)}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}placeDaily(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(X.Aq$.isDefined(this.getQuestState())&&this.getQuestState().ID>6&&Y.backpack.hasItem("item",80)<99){let K,Y;const Q=this.getDailyMaps(),Z=new bA.t(this.getState("daily").date);for(let z=0;z<5;z++)if(Q[Math.floor(Z.jumpFromStart(z)*(Q.length-1))]===q.tag){const q=this.getState("daily").flags;X.Aq$.isDefined(q[z].x)&&(K=q[z].x,Y=q[z].y)}if(!X.Aq$.isDefined(K)){const z=q.dailyCoordinates[Math.floor(Math.random()*q.dailyCoordinates.length)];K=z.x,Y=z.y;for(let X=0;X<5;X++)if(Q[Math.floor(Z.jumpFromStart(X)*(Q.length-1))]===q.tag){const q=this.getState("daily").flags;q[X]={x:K,y:Y},this.setState("daily",{date:this.getState("daily").date,flags:q,rewards:this.getState("daily").rewards})}}this.ice=z.addClickableEvent(K,Y,60,60,this.frozenSomethingOnClick.bind(this,z,q),null),this.ice.add(st.q.instance.prodigy.create.sprite(-10,-10,it._.Zone_shiverchill_json,"frozen-something"))}}frozenSomethingOnClick(q,K){const z=st.q.instance.prodigy.event.create();z.validPath(q.user,q.path,this.ice.x+20,this.ice.y+40),z.set(q.user,"evtProc",!0),z.function(this.interactFrozenSomething.bind(this,K)),z.set(q.user,"evtProc",!1),z.start()}interactFrozenSomething(q){const K=this.getDailyMaps();this.ice.destroy(),st.q.instance.prodigy.open.gotItem([{type:"item",ID:79}]);const z=new bA.t(this.getState("daily").date);for(let Y=0;Y<5;Y++)if(K[Math.floor(z.jumpFromStart(Y)*(K.length-1))]===q.tag){const q=this.getState("daily").flags;q[Y]=0,this.setState("daily",{date:this.getState("daily").date,flags:q,rewards:this.getState("daily").rewards})}}getDailyMaps(){const q=[];for(const K in this.maps)X.Aq$.isDefined(this.maps[K].dailyCoordinates)&&q.push(K);return q}smoke(q,K,z){for(let Y=0;Y<4;Y++){const Q=st.q.instance.prodigy.create.sprite(40*K+20,40*z+20,it._.General_core_2_json,"smoke");q.foreground.addChild(Q),Q.anchor.set(.5,.5),Q.scale.x=Q.scale.y=.1,Q.alpha=1,this.game.add.tween(Q,this).to({y:Q.y-150,alpha:0},2e3,X.GS3.Linear.None,!1,0,1e3,!1).delay(500*Y).start(),this.game.add.tween(Q.scale,this).to({x:.75,y:.75},2e3,X.GS3.Linear.None,!1,0,1e3,!1).delay(500*Y).start()}}doorClick(q,K,z){q.user.setValidPath(q.path,K,z,null)}cleanup(){this.ice&&(this.ice.destroy(),this.ice=null),super.cleanup()}}UD.QUEST_PREREQUISITE={zoneId:mn.A_.FOREST,questId:12};class FD extends sD{constructor(q,K){super(q,"A10","MAP_SHIVERCHILL_BOKS_CAVE",125,650,["shiverchill_hard-B10","shiverchill_hard-A11","shiverchill_hard-A9"],K.concat([it._.Npc_sprite_merchant_json,it._.Npc_sprite_bok_json,Gn.t.Tileset_shiverchill_png,it._.Shiverchill_snow_particle_json]))}}class GD extends sD{constructor(q,K){super(q,"A11","MAP_SHIVERCHILL_BORDERLAND",1100,220,["shiverchill_hard-A10"],K.concat([it._.Npc_sprite_wizard_json,Gn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new X.I9Y(640,560),new X.I9Y(785,230),new X.I9Y(350,400)]}}class jD extends sD{constructor(q,K){super(q,"A2","MAP_SHIVERCHILL_THE_CHASM",1150,360,["shiverchill_hard-A3"],K.concat([Gn.t.Tileset_generic_snow_png,it._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-outside",this.dailyCoordinates=[{x:840,y:320},{x:565,y:450}]}}class $D extends sD{constructor(q,K){super(q,"A3","MAP_SHIVERCHILL_FROZEN_PASS",280,550,["shiverchill_hard-A2","shiverchill_hard-A4","shiverchill_hard-B3"],K.concat([it._.Zone_shiverchill_json,Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(700,380),new X.I9Y(1150,300)],this.dailyCoordinates=[{x:1100,y:210},{x:485,y:240},{x:390,y:540}]}}class HD extends sD{constructor(q,K){super(q,"A4","MAP_SHIVERCHILL_WORMS_REST",1160,610,["shiverchill_hard-A3","shiverchill_hard-A5"],K.concat([it._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside"}}class VD extends sD{constructor(q,K){super(q,"A5","MAP_SHIVERCHILL_MOUNTAIN_VALLEY",1180,650,["shiverchill_hard-A4","shiverchill_hard-A6"],K.concat([Gn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new X.I9Y(100,540),new X.I9Y(700,350),new X.I9Y(1025,150)]}}class WD extends sD{constructor(q,K){super(q,"A6","MAP_SHIVERCHILL_RAIL_RUINS",1170,400,["shiverchill_hard-A5","shiverchill_hard-B6"],K.concat([it._.Zone_shiverchill_json,Gn.t.Tileset_minecarts_png,Gn.t.Tileset_iceruins_png,it._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(645,330),new X.I9Y(920,555)],this.dailyCoordinates=[{x:1010,y:480},{x:300,y:480},{x:520,y:220}]}}class qD extends sD{constructor(q,K){super(q,"A7","MAP_SHIVERCHILL_RUINED_ENTRANCE",189,650,["shiverchill_hard-B7","shiverchill_hard-B8"],K.concat([it._.Npc_sprite_merchant_json,it._.Zone_shiverchill_json,Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(1e3,360),new X.I9Y(720,600)]}}class KD extends sD{constructor(q,K){super(q,"A9","MAP_SHIVERCHILL_TREASURE_ROOM",200,490,["shiverchill_hard-A10","shiverchill_hard-B8"],K.concat([it._.Zone_shiverchill_json,Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:125,y:510},{x:925,y:260},{x:620,y:340}]}}class zD extends sD{constructor(q,K){super(q,"B10","MAP_SHIVERCHILL_FURNACE_ROOM",255,545,["shiverchill_hard-A10","shiverchill_hard-B9"],K.concat([Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside"}}class YD extends sD{constructor(q,K){super(q,"B1","MAP_SHIVERCHILL_GATE",200,630,["shiverchill_hard-B3"],K.concat([it._.Npc_sprite_wizard_json,Gn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside"}}class QD extends sD{constructor(q,K){super(q,"B2","MAP_BONFIRE_SPIRE_THRONE_ROOM",640,500,["shiverchill_hard-B3"],K),this.battleBG="battle-shiverchill-inside"}}class XD extends sD{constructor(q,K){super(q,"B3","MAP_SHIVERCHILL_ROYAL_PASSAGE",110,280,["shiverchill_hard-B1","shiverchill_hard-A3","shiverchill_hard-B2"],K.concat([it._.Zone_shiverchill_json,it._.Npc_sprite_noot_json,Gn.t.Tileset_iceruins_png,Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:980,y:250},{x:970,y:400},{x:255,y:490}]}}class ZD extends sD{constructor(q,K){super(q,"B6","MAP_SHIVERCHILL_RUINED_STEPS",1100,530,["shiverchill_hard-A6","shiverchill_hard-B7"],K.concat([Gn.t.Tileset_minecarts_png,Gn.t.Tileset_iceruins_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(315,635),new X.I9Y(650,600),new X.I9Y(1100,230)],this.dailyCoordinates=[{x:1100,y:420},{x:1015,y:110},{x:185,y:400}]}}class JD extends sD{constructor(q,K){super(q,"B7","MAP_SHIVERCHILL_RUINED_PASSAGE",110,220,["shiverchill_hard-A7","shiverchill_hard-B6"],K.concat([Gn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new X.I9Y(320,260),new X.I9Y(380,620)],this.dailyCoordinates=[{x:370,y:540},{x:955,y:400},{x:1190,y:330}]}}class tR extends sD{constructor(q,K){super(q,"B8","MAP_SHIVERCHILL_MOUNTAIN_PASS",100,550,["shiverchill_hard-A9","shiverchill_hard-A7"],K.concat([it._.Zone_shiverchill_json,Gn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new X.I9Y(1200,530),new X.I9Y(820,400),new X.I9Y(445,280)]}}class eR extends sD{constructor(q,K){super(q,"B9","MAP_SHIVERCHILL_HIDDEN_ROOM",645,500,["shiverchill_hard-B10"],K.concat([it._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:680,y:250},{x:280,y:320},{x:945,y:380}]}}class iR extends UD{constructor(q){super(q),this._assets=[Gn.t.Tileset_icecave_new_png,Gn.t.Tileset_collisions_png,Gn.t.Tileset_ship_exterior_png,Gn.t.Tileset_water_new_png,ot.V.Bgm_shiverchill_mountain],this.questManagerIdentifier="ad8-0362",this.ID=mn.A_.SHIVERCHILLHARD,this.defaultOnFaint="shiverchill_hard-C8",this.questHub="shiverchill_hard-C8",this.zoneIndex=AT.P.ShiverchillHard,this.difficultyMode=vi.i.Hard,this.monsters=[],this.maps={A2:new jD(this,this._assets),A3:new $D(this,this._assets),A4:new HD(this,this._assets),A5:new VD(this,this._assets),A6:new WD(this,this._assets),A7:new qD(this,this._assets),A9:new KD(this,this._assets),A10:new FD(this,this._assets),A11:new GD(this,this._assets),B1:new YD(this,this._assets),B2:new QD(this,this._assets),B3:new XD(this,this._assets),B6:new ZD(this,this._assets),B7:new JD(this,this._assets),B8:new tR(this,this._assets),B9:new eR(this,this._assets),B10:new zD(this,this._assets)}}}class sR extends zn.T{}class nR extends sR{constructor(q,K){super(q,"A0","MAP_SKYWATCH_LOWER_BEANOVATOR",1100,450,["skywatch-A1","shiverchill-B1"],K),this.battleBG="battle-skywatch-outside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1020,y:410,w:1,h:1,rect:!0},"skywatch-A1",650,360,null,WT.K.UP,!1,!1),this.addChest(q,K,"chest1",720,360,null,"A"),K.addClickableEvent(953,320,134,140,this.zone.elevator.bind(this.zone,K,[{x:1020,y:460},{x:1020,y:440}],{x:960,y:320},{target:"skywatch-A1",x:null,y:null}),null,0),this.addWizard(q,K,240,340,"wizard1",46,!1),this.addPippet(q,K,1,578,413)}}class aR extends sR{constructor(q,K){super(q,"A1","MAP_SKYWATCH_UPPER_BEANOVATOR",620,350,["skywatch-A0","skywatch-B1","skywatch-C1","skywatch-D1"],K.concat([it._.Zone_lamplight_json,it._.Npc_sprite_broccolina_json,it._.Npc_sprite_merchant_json,ct.Q.Spine_npc_benni_json]))}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:50,y:50,r:120},"skywatch-B1",1140,560,null,WT.K.UP_LEFT,!1),this.addAreaEvent(q,K,{x:110,y:510,w:220,h:100,rect:!0},"skywatch-C1",1120,430,null,WT.K.LEFT,!1);const Y=K.addConstructedQuestNPC(760,500,"benni",!1,aR.zoneComplete.bind(this,q)),Q=K.content.addChild(st.q.instance.prodigy.create.sprite(1110,336,it._.Zone_skywatch_json,"cart-horizontal"));this.addAreaEvent(q,K,{x:1100,y:440,w:1,h:1},"skywatch-D1",0,0,null,WT.K.RIGHT,!1,!0),this.addAreaEvent(q,K,{x:653,y:187,w:1,h:1,rect:!0},"skywatch-A0",650,360,null,WT.K.DOWN,!1,!0),st.q.instance.prodigy.prefabFactory.addPrefabNPC(Pi.l.SkywatchMerchantNPC,430,360).catch(X.RQr.createHandler(`Unable to load the NPC Prefab: ${Pi.l.SkywatchMerchantNPC}`)),K.addClickableEvent(1115,400,80,80,this.zone.interactTrolley.bind(this.zone,K,[{x:1140,y:480},{x:1165,y:460}],{trolley:Q,x:"+=200",y:"+=0",duration:3e3,target:"skywatch-D1",targetX:null,targetY:null}),null,0),K.addClickableEvent(593,200,134,140,this.zone.elevator.bind(this.zone,K,[{x:660,y:340},{x:660,y:320}],{x:600,y:200},{target:"skywatch-A0",x:1100,y:450}),null,0);const Z=this.addConstructedNPC(q,K,440,500,it._.Npc_sprite_broccolina_json,Y.process.bind(Y,this.zone,null,!0),"NPC_NAME_BROCCOLINA",null);X.Aq$.isDefined(Z)&&(Z.flip(),Z.nameText.GameObject.legacyTransform.x-=55),X.Aq$.isDefined(this.zone.getState("eugene_A1"))&&this.addConstructedNPC(q,K,685,390,it._.Npc_sprite_eugene_json,Y.process.bind(Y,this.zone,null,!0),"NPC_NAME_EUGENE",null),st.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,K.user,K.content,270,300)}static zoneComplete(q){const K=new Ni.rD(q);K.addEvents([{dialogueData:K.dataProvider.get(415),blockInput:!0},{dialogueData:K.dataProvider.get(414),blockInput:!0},{dialogueData:K.dataProvider.get(459),blockInput:!0}]),K.start()}}class rR extends sR{constructor(q,K){super(q,"B1","MAP_SKYWATCH_GARDENERS_HUT_EXTERIOR",1140,549,["skywatch-A1","skywatch-B2","skywatch-B3"],K),this.battleBG="battle-skywatch-outside",this.coord=[new X.I9Y(460,530),new X.I9Y(200,560)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1150,y:710,r:120},"skywatch-A1",120,190,null,WT.K.DOWN),this.addAreaEvent(q,K,{x:740,y:340,w:80,h:80,rect:!0},"skywatch-B2",640,510,null,WT.K.UP),this.addAreaEvent(q,K,{x:150,y:0,r:120},"skywatch-B3",1030,530,null,WT.K.UP),K.addClickableEvent(700,240,80,120,this.validPathTo.bind(this,q,K,740,370),null),this.addChest(q,K,"chest2",620,420,null,"A")}}class oR extends sR{constructor(q,K){super(q,"B2","MAP_SKYWATCH_GARDENERS_HUT_INNER",640,510,["skywatch-B1"],K.concat([it._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:660,y:550,w:130,h:70,rect:!0},"skywatch-B1",760,390,null,WT.K.DOWN)}}class hR extends sR{constructor(q,K){super(q,"B3","MAP_SKYWATCH_GREAT_GRATERS",1030,530,["skywatch-B1"],K.concat([it._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}init(q,K,z,Y){return X.Aq$.isDefined(this.zone.getState("plug-B3"))?this.plugOut():(this.plugIn(),this.createIceBlocks(q,Y)),this.enableLayerID(2,X.Aq$.isDefined(this.zone.getState("vines-B3"))),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1035,y:650,w:230,h:100,rect:!0},"skywatch-B1",170,150,null,WT.K.DOWN)}plugIn(){this.enableLayerID(0,!1),this.enableLayerID(1,!0)}plugOut(){this.enableLayerID(1,!1),this.enableLayerID(0,!0)}createIceBlocks(q,K){const z=st.q.instance.prodigy.event.create();z.delay(Math.floor(3e3*Math.random())),z.function(this.createIceBlock.bind(this,q,K,0)),z.delay(Math.floor(3e3*Math.random())),z.function(this.createIceBlock.bind(this,q,K,1)),z.delay(Math.floor(3e3*Math.random())),z.function(this.createIceBlock.bind(this,q,K,2)),z.delay(Math.floor(3e3*Math.random())),z.function(this.createIceBlock.bind(this,q,K,3)),z.start()}createIceBlock(q,K,z){const Y=[{x:575,y:430},{x:90,y:430},{x:575,y:550},{x:90,y:550}],Q=[],Z=st.q.instance.prodigy.event.create();Z.delay(Math.floor(5e3*Math.random())+2e3),Z.function(this.createIceBlock.bind(this,q,K,z)),Z.start();const J=[{start:{x:483,y:105},path:[{x:483,y:320},{x:560,y:320}],end:{x:715,y:380},angle:"+=20"},{start:{x:322,y:105},path:[{x:322,y:320},{x:240,y:320}],end:{x:80,y:380},angle:"-=20"},{start:{x:483,y:740},path:[{x:483,y:440},{x:560,y:440}],end:{x:715,y:500},angle:"+=20"},{start:{x:322,y:740},path:[{x:322,y:440},{x:240,y:440}],end:{x:80,y:500},angle:"-=20"}][z],tt=K.foreground.addChild(st.q.instance.prodigy.create.sprite(J.start.x,J.start.y,it._.Zone_skywatch_json,"ice-cube"));tt.anchor.set(.5,1),tt.alpha=0,Q.push(q.add.tween(tt,this).to({x:J.path[0].x,y:J.path[0].y},3e3,X.GS3.Linear.None,!0).to({x:J.path[1].x,y:J.path[1].y},1500,X.GS3.Linear.None,!0).to({x:J.end.x,y:J.end.y},3e3,X.GS3.Linear.None,!0)),Q.push(q.add.tween(tt.scale,this).to({x:.1,y:.1},3e3,X.GS3.Linear.None,!0,4900)),Q.push(q.add.tween(tt,this).to({alpha:1},250,X.GS3.Linear.None,!0)),Q.push(q.add.tween(tt,this).to({angle:J.angle},500,X.GS3.Linear.None,!0,4700)),Q[1].onTweenComplete.add(this.makeSnow.bind(this,q,K,Y[z].x,Y[z].y)),Q[1].onTweenComplete.add((()=>{tt.destroy()}))}makeSnow(q,K,z,Y){const Q=K.background;if(!X.Aq$.isDefined(this.snows)){this.snows=[];for(let q=0;q<20;q++)this.snows[q]=Q.addChild(st.q.instance.prodigy.create.sprite(z,Y,it._.Font_general_json,"42-30"))}for(let X=0;X<20;X++)this.snows[X].x=z,this.snows[X].y=Y,hR.newFlake(q,this.snows[X],!0,z,Y)}static newFlake(q,K,z,Y,Q){if(!X.Aq$.isDefined(q))return;let Z=Math.floor(2e3*Math.random())+2e3;K.frameName=Math.random()<.5?"42-16":"42-30",K.x=Y+Math.floor(140*Math.random()),z?Z-=Math.floor(Z/st.q.instance.game.height*K.y):K.y=Q,st.q.instance.prodigy.animation.translate(K,K.x,st.q.instance.game.height,Z,null,null,!0)}cleanup(){for(let q=0;q<(X.Aq$.isDefined(this.snows)?this.snows.length:0);q++)this.snows[q].destroy();this.snows=null,super.cleanup()}}class cR extends sR{constructor(q,K){super(q,"C1","MAP_SKYWATCH_SCREWBALL_SHACK",1120,430,["skywatch-A1","skywatch-C2","skywatch-C3"],K.concat([it._.Zone_lamplight_json])),this.battleBG="battle-skywatch-outside",this.coord=[new X.I9Y(370,580),new X.I9Y(590,350)]}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1205,y:430,w:150,h:100,rect:!0},"skywatch-A1",240,610,null,WT.K.RIGHT),this.addAreaEvent(q,K,{x:205,y:620,w:100,h:200,rect:!0},"skywatch-C3",1080,210,null,WT.K.DOWN),this.addAreaEvent(q,K,{x:220,y:268,w:90,h:140,rect:!0},"skywatch-C2",625,520,null,WT.K.UP),K.addClickableEvent(180,190,80,120,this.validPathTo.bind(this,q,K,195,320),null)}}class dR extends sR{constructor(q,K){super(q,"C2","MAP_SKYWATCH_INNER_SCREWBALL_SHACK",625,520,["skywatch-C1"],K.concat([it._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}setup(q,K,z){this.addAreaEvent(q,K,{x:620,y:560,w:160,h:70,rect:!0},"skywatch-C1",200,360,null,WT.K.DOWN)}}class lR extends sR{constructor(q,K){super(q,"C3","MAP_SKYWATCH_CLOUDY_PASS",1160,210,["skywatch-C1","skywatch-C4"],K),this.battleBG="battle-skywatch-outside"}init(q,K,z,Y){return this.enableLayerID(0,!1),this.enableLayerID(1,!0),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1080,y:100,w:100,h:200,rect:!0},"skywatch-C1",205,510,null,WT.K.UP),this.addAreaEvent(q,K,{x:120,y:100,w:100,h:200,rect:!0},"skywatch-C4",1160,540,null,WT.K.UP),this.addChest(q,K,"chest3",325,250,null,"A")}}class uR extends sR{constructor(q,K){super(q,"C4","MAP_SKYWATCH_SKY_SHOWER",1160,550,["skywatch-C3"],K.concat([it._.Npc_sprite_noot_json,it._.Npc_sprite_flora_json,it._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}init(q,K,z,Y){return this.plugIn(!X.Aq$.isDefined(this.zone.getState("plug-C4"))),this.enableLayerID(2,X.Aq$.isDefined(this.zone.getState("vines-C4"))),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1150,y:660,w:100,h:200,rect:!0},"skywatch-C3",120,210,null,WT.K.DOWN)}canRegularMonsterSpawn(){return!this.zone.isOnSequence(2,3)&&!this.zone.isOnQuest(9)}plugIn(q){this.enableLayerID(0,!q),this.enableLayerID(1,q)}}class fR extends sR{constructor(q,K){super(q,"D1","MAP_SKYWATCH_FACTORY_ENTRANCE",189,549,["skywatch-A1","skywatch-D2","skywatch-E1"],K.concat(it._.Npc_sprite_noot_json)),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new X.I9Y(400,540),new X.I9Y(780,570)]}init(q,K,z,Y){return this.enableLayerID(2,!X.Aq$.isDefined(this.zone.getState("vines-D1"))),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z);if(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("item",81)>0)this.addAreaEvent(q,K,{x:620,y:280,w:120,h:80,rect:!0},"skywatch-E1",1120,520,null,WT.K.UP),K.addClickableEvent(580,140,80,140,this.validPathTo.bind(this,q,K,680,290),null);else{const z=q=>{const K=st.q.instance.prodigy.event.create();K.popup(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SKYWATCH_REQUIRE_FACTORY_KEY")),K.start()};K.addClickableEvent(580,140,80,140,z.bind(this,q),null,null)}this.addAreaEvent(q,K,{x:190,y:420,w:1,h:1},"skywatch-A1",0,0,null,WT.K.LEFT,!1,!0),this.addAreaEvent(q,K,{x:1075,y:440,w:1,h:1},"skywatch-D2",0,0,null,WT.K.RIGHT,!1,!0);const Y=K.content.addChild(st.q.instance.prodigy.create.sprite(75,296,it._.Zone_skywatch_json,"cart-horizontal"));this.trolley2=K.content.addChild(st.q.instance.prodigy.create.sprite(1075,296,it._.Zone_skywatch_json,"cart-horizontal")),this.trolley2.alpha=0,X.Aq$.isDefined(this.zone.getState("vines-D1"))&&(this.trolley2.alpha=1,K.addClickableEvent(1080,360,80,80,this.zone.interactTrolley.bind(this.zone,K,[{x:1130,y:450},{x:1120,y:420}],{trolley:this.trolley2,x:"+=200",y:"+=0",duration:3e3,target:"skywatch-D2",targetX:140,targetY:290}),null,0)),K.addClickableEvent(80,360,80,80,this.zone.interactTrolley.bind(this.zone,K,[{x:130,y:450},{x:120,y:420}],{trolley:Y,x:"-=200",y:"+=0",duration:3e3,target:"skywatch-A1",targetX:1100,targetY:500}),null,0)}}class bR extends sR{constructor(q,K){super(q,"D2","MAP_SKYWATCH_BREEZY_PASS",140,290,["skywatch-D1","skywatch-D3"],K.concat([it._.Zone_lamplight_json])),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new X.I9Y(280,450),new X.I9Y(780,330)]}init(q,K,z,Y){return this.enableLayerID(2,!X.Aq$.isDefined(this.zone.getState("vines-D2"))),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:210,y:182,w:1,h:1},"skywatch-D1",0,0,null,WT.K.LEFT,!1,!1),this.addAreaEvent(q,K,{x:1e3,y:575,w:1,h:1},"skywatch-D3",0,0,null,WT.K.LEFT,!1,!1);const Y=K.content.addChild(st.q.instance.prodigy.create.sprite(100,96,it._.Zone_skywatch_json,"cart-horizontal"));this.trolley2=K.content.addChild(st.q.instance.prodigy.create.sprite(1e3,515,it._.Zone_skywatch_json,"cart-vertical")),this.trolley2.scale.x=-this.trolley2.scale.x,K.addClickableEvent(105,160,80,80,this.zone.interactTrolley.bind(this.zone,K,[{x:145,y:250},{x:155,y:220}],{trolley:Y,x:"-=300",y:"+=0",duration:3e3,target:"skywatch-D1",targetX:1100,targetY:540}),null),X.Aq$.isDefined(this.zone.getState("vines-D2"))&&K.addClickableEvent(925,555,90,90,this.zone.interactTrolley.bind(this.zone,K,[{x:1040,y:600},{x:965,y:600}],{trolley:this.trolley2,x:"+=0",y:"+=300",duration:3e3,target:"skywatch-D3",targetX:300,targetY:250}),null),this.addChest(q,K,"chest4",640,200,null,"A")}}class pR extends sR{constructor(q,K){super(q,"D3","MAP_SKYWATCH_WIND_TUNNEL",270,250,["skywatch-D2"],K.concat([it._.Zone_lamplight_json,it._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}init(q,K,z,Y){return this.enableLayerID(2,X.Aq$.isDefined(this.zone.getState("vines-D3"))),X.Aq$.isDefined(this.zone.getState("plug-D3"))?this.unplug(q):this.plugIn(q),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:260,y:240,w:1,h:1},"skywatch-D2",0,0,null,WT.K.LEFT,!1,!0);const Y=K.content.addChild(st.q.instance.prodigy.create.sprite(240,175,it._.Zone_skywatch_json,"cart-vertical"));Y.scale.x=-Y.scale.x,K.addClickableEvent(160,210,100,100,this.zone.interactTrolley.bind(this.zone,K,[{x:265,y:280},{x:200,y:270}],{trolley:Y,x:"+=0",y:"-=300",duration:3e3,target:"skywatch-D2",targetX:1020,targetY:580}),null)}displayStationaryFanribbons(q,K){this.enableLayerID(2,!1),this.toggleDynamicLayer(q,2,!1,0)}plugIn(q){this.enableLayerID(0,!1),this.toggleDynamicLayer(q,0,!1,0),this.enableLayerID(1,!0),this.toggleDynamicLayer(q,1,!0,0)}unplug(q){this.enableLayerID(1,!1),this.toggleDynamicLayer(q,1,!1,0),this.enableLayerID(0,!0),this.toggleDynamicLayer(q,0,!0,0)}}class vR extends sR{constructor(q,K){super(q,"E1","MAP_SKYWATCH_FACTORY_MAIN_HALL",1120,520,["skywatch-D1","skywatch-E2","skywatch-E3"],K),this.battleBG="battle-skywatch-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1100,y:this.game.height-60,w:210,h:120,rect:!0},"skywatch-D1",550,290,null,WT.K.DOWN,!1),this.addAreaEvent(q,K,{x:160,y:0,r:120},"skywatch-E3",1060,530,null,WT.K.UP,!1),this.addAreaEvent(q,K,{x:1102,y:320,w:100,h:80,rect:!0},"skywatch-E2",230,530,null,WT.K.UP,!1),K.addClickableEvent(1060,200,80,120,this.validPathTo.bind(this,q,K,1120,350),null)}}class gR extends sR{constructor(q,K){super(q,"E2","MAP_SKYWATCH_OLD_MANS_ROOM",230,530,["skywatch-E1"],K.concat([it._.Npc_sprite_eugene_json])),this.battleBG="battle-skywatch-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:200,y:this.game.height-60,w:210,h:120,rect:!0},"skywatch-E1",1120,370,null,WT.K.DOWN,!1),this.addWizard(q,K,965,530,"wizard2",47,!0)}}class mR extends sR{constructor(q,K){super(q,"E3","MAP_SKYWATCH_BLAST_DOORS",1060,530,["skywatch-E1","skywatch-E4"],K),this.battleBG="battle-skywatch-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1120,y:this.game.height-60,w:240,h:120,rect:!0},"skywatch-E1",160,160,null,WT.K.DOWN,!1);if(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("item",83)>0)this.addAreaEvent(q,K,{x:620,y:360,w:120,h:80,rect:!0},"skywatch-E4",640,380,null,WT.K.UP,!1),K.addClickableEvent(560,240,120,160,this.validPathTo.bind(this,q,K,620,390),null);else{const z=q=>{const K=st.q.instance.prodigy.event.create();K.popup(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("SKYWATCH_REQUIRE_MASTER_KEY")),K.start()};K.addClickableEvent(520,200,160,120,z.bind(this,q),null)}this.addChest(q,K,"chest5",950,325,null,"A")}}class yR extends sR{constructor(q,K){super(q,"E4","MAP_SKYWATCH_END_CHAMBER",640,380,["skywatch-E3","skywatch-E5"],K.concat([it._.Boss_skywatch_json])),this.battleBG="battle-skywatch-inside"}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:640,y:550,w:160,h:100,rect:!0},"skywatch-E3",600,480,null,WT.K.DOWN,!1),this.addAreaEvent(q,K,{x:340,y:340,w:80,h:40,rect:!0},"skywatch-E5",1024,515,null,WT.K.UP,!1),K.addClickableEvent(300,200,80,120,this.validPathTo.bind(this,q,K,360,340),null)}}class _R extends sR{constructor(q,K){super(q,"E5","MAP_SKYWATCH_OUTSKIRTS",1024,515,["skywatch-E4"],K),this.insideTrigger=!1,this.lastFrameInsideTrigger=!1,this.user=null,this.battleBG="battle-skywatch-outside"}init(q,K,z,Y){return this.enableLayerID(3,!1),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:1010,y:this.game.height-60,w:260,h:120,rect:!0},"skywatch-E4",360,380,null,WT.K.DOWN,!1),this.user=K.user}update(q){X.Aq$.isDefined(this.user)&&(this.insideTrigger=X.cj9.distance(this.user.x,this.user.y,430,490)<=100,this.insideTrigger!==this.lastFrameInsideTrigger&&this.toggleDynamicLayer(q,3,this.insideTrigger,500),this.lastFrameInsideTrigger=this.insideTrigger),super.update(q)}}class ER extends jn.T{constructor(q,K,z){super(q,K,1,"",{type:"pet",ID:72,N:3},["skywatch-B2"],[416,417,418,419,420,421],[],[414,422],z,null,"QUESTS_SKYWATCH_TRIM_VINES")}setup(q,K,z){if(super.setup(q,K,z),"B2"===z.tag){const Y={randDir:!0,encounter:[{ID:72}],difficulty:1,maxTeamSize:1,isQuestEncounter:!0};return z.addMonster(q,K,0,400,400,!0,Y,!1),z.addMonster(q,K,1,810,360,!0,Y,!1),z.addMonster(q,K,2,920,415,!0,Y,!1),{enableMonsters:!1}}return null}}class wR extends jn.T{constructor(q,K,z){super(q,K,10,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:1},["skywatch-D3"],[444],[],[415,460],z)}setup(q,K,z){return super.setup(q,K,z),"skywatch-D3"===z.zoneName?{enableMonsters:!1}:null}start(q,K,z){if(super.start(q,K,z),this.zone.isOnSequence(10,0)&&"skywatch-D3"===z.zoneName){const q=st.q.instance.prodigy.create.element(K.foreground,740,140);q.highlight(!0);const Y=()=>{const Y=K.content.addChild(st.q.instance.prodigy.create.sprite(850,-100,it._.Boss_skywatch_json,"ice_cloud",new X.I9Y(.5,1))),Q=K.foreground.addChild(st.q.instance.prodigy.create.sprite(840,-150,it._.Boss_skywatch_json,"med_face_0",new X.I9Y(.5,1))),Z=()=>{const q=K.user.x,Y=K.user.y,Q=()=>{this.zone.completeSequence(10,0),this.zone.setState("plug-D3",null),this.zone.setState("vines-D3",null),st.q.instance.prodigy.world.it("skywatch-D3",q,Y)};st.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const Z=st.q.instance.prodigy.event.create();Z.enableInput(!1),Z.delay(2e3),Z.enableInput(!0);const J=st.q.instance.prodigy.gameContainer.get("f71-42eb"),tt=J.getValue("frostyStormMaxHP",te.s.get("GameConstants.FrostyStorm.MAX_HP")),et=null===tt?void 0:parseInt(tt,10);Z.function(this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:51,element:"ice",attacks:[62],name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_FROSTY_STORM"),tag:mn.A_.SKYWATCH,maxHP:et},difficulty:parseInt(J.getValue("frostyStormDifficulty",te.s.get("GameConstants.FrostyStorm.DIFFICULTY")),10),starMod:2,screen:"battle-skywatch-outside"},(()=>{Q()}))),Z.start()},J=st.q.instance.prodigy.event.create();J.validPath(K.user,K.path,580,270),J.enableInput(!1),J.fire(655,45,290,290,2,!1,!0),J.function(q.highlight.bind(q,!1)),J.function(this.zone.shrinkVines.bind(this.zone,z)),J.delay(3e3),J.sound(17,"wind"),J.function((()=>{const q=st.q.instance.prodigy.animation.translate(Y,850,200,2e3,0,null,!0);st.q.instance.prodigy.animation.translate(Q,840,150,2e3,0,null,!0),q.onTweenComplete.add((()=>{this.zone.changePosition(Y,Q),Z()}))}).bind(this)),J.start()};K.addClickableEvent(630,30,250,250,Y.bind(this),null,0)}return null}}class TR extends jn.T{constructor(q,K,z){super(q,K,11,"QUESTS_SKYWATCH_FIND_EUGENE",{type:"seq",N:2},["skywatch-E2"],[445,446,447],[],[415],z)}setup(q,K,z){super.setup(q,K,z);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return"skywatch-E2"===z.zoneName?(z.addConstructedNPC(q,K,710,415,it._.Npc_sprite_eugene_json,null,"NPC_NAME_EUGENE"),this.zone.isOnSequence(11,0)?(Y.playerContainer.visible=!0,this.monstersAmbushEugene(q,K,z)):this.zone.isOnSequence(11,1)&&this.rescuedEugene(q,K),{enableMonsters:!1}):null}monstersAmbushEugene(q,K,z){const Y=st.q.instance.prodigy.event.create();z.addMonster(q,K,1,380,380,!1,{encounter:[{ID:115}],difficulty:1}),z.addMonster(q,K,3,520,515,!1,{encounter:[{ID:115}],difficulty:1});z.addMonster(q,K,2,900,380,!1,{encounter:[{ID:115}],difficulty:1}).flip(),Y.enableInput(!1),Y.delay(500),Y.enableInput(!0),Y.text(0,"eugene"),Y.text(),Y.text(100,"noot"),Y.enableInput(!1),Y.set(K.user,"evtProc",!0),Y.function(K.user.chat.bind(K.user,1,80)),Y.enableInput(!1),Y.delay(1e3),Y.enableInput(!1),Y.path(K.user,[{x:635,y:560}]),Y.path(K.user,[{x:640,y:420}]),Y.delay(500),Y.enableInput(!0),Y.function((()=>{st.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),Y.function(this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_SAVE_EUGENE"),{pets:[{ID:115},{ID:115},{ID:115},{ID:115}]},(()=>{this.zone.completeSequence(11,0),st.q.instance.prodigy.world.it("skywatch-E2",640,420)}))),Y.start()}rescuedEugene(q,K){const z=st.q.instance.prodigy.event.create();z.text(1,"eugene"),z.text(2,"eugene"),z.text(3,"eugene"),z.text(4,"eugene"),z.text(5,"eugene"),z.text(6,"eugene"),z.function(this.zone.completeSequence.bind(this.zone,11,1)),z.function(K.process.bind(K)),z.start()}}class SR extends jn.T{constructor(q,K,z){super(q,K,12,"",{type:"item",ID:82,N:2},["skywatch-C3","skywatch-D3"],[448,449,450],[],[414],z,null,"QUESTS_SKYWATCH_FIND_KEY"),this.collectionMaps={C3:[1],D3:[2]}}setup(q,K,z){super.setup(q,K,z);const Y=z.getTag();if("C3"===Y)K.addCollect(1,260,450,{type:"item",ID:82});else if("D3"===Y)return K.addCollect(2,640,350,{type:"item",ID:82}),{enableMonsters:!1};return null}}class AR extends jn.T{constructor(q,K,z){super(q,K,13,"QUESTS_SKYWATCH_DEFEAT_BOSS",{type:"seq",N:1},["skywatch-E4"],[451,452],[],[453,454,455],z)}setup(q,K,z){if(super.setup(q,K,z),this.zone.isOnSequence(13,0)&&"skywatch-E4"===z.zoneName){const q=K.content.addChild(st.q.instance.prodigy.create.sprite(1045,-100,it._.Boss_skywatch_json,"main_cloud",new X.I9Y(.5,1))),Y=K.foreground.addChild(st.q.instance.prodigy.create.sprite(1035,-150,it._.Boss_skywatch_json,"main_eyes_1",new X.I9Y(.5,1)));st.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const Q=st.q.instance.prodigy.event.create();Q.enableInput(!1),Q.validPath(K.user,K.path,399,400),Q.validPath(K.user,K.path,400,400),Q.sound(17,"wind"),Q.function((()=>{const K=st.q.instance.prodigy.animation.translate(q,800,400,2e3,0,null,!0);st.q.instance.prodigy.animation.translate(Y,790,350,2e3,0,null,!0),K.onTweenComplete.add((()=>{this.zone.changePosition(q,Y)}))})),Q.delay(5e3),Q.enableInput(!0);const Z=st.q.instance.prodigy.gameContainer.get("f71-42eb"),J=Z.getValue("stormyStormMaxHP",te.s.get("GameConstants.StormyStorm.MAX_HP")),tt=null===J?void 0:parseInt(J,10);Q.function(this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:12,element:"storm",attacks:[76,77,79],name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_STORMY_STORM"),tag:mn.A_.SKYWATCH,maxHP:tt},difficulty:parseInt(Z.getValue("stormyStormDifficulty",te.s.get("GameConstants.StormyStorm.DIFFICULTY")),10),starMod:5,drops:[{type:"weapon",ID:23}]},(()=>{this.zone.completeSequence(13,0),this.zone.setState("eugene_A1",1),st.q.instance.prodigy.world.it("skywatch-E4")}))),Q.start()}return null}}class CR extends jn.T{constructor(q,K,z){super(q,K,2,"QUESTS_SKYWATCH_GET_DEVICE",{type:"item",ID:93,N:1},["skywatch-C2"],[423,424,425,426],[],[415],z),this.thief=null}start(q,K,z){super.start(q,K,z);const Y=z.getTag();if("C2"===Y&&this.zone.isOnSequence(2,0))this.thiefStealsTheWeatherometre(q,K,z);else if("C1"===Y&&this.zone.isOnSequence(2,1))this.thiefFlees(q,K,z,115,560,115,850,"skywatch-C3",1);else if("C3"===Y&&this.zone.isOnSequence(2,2))this.thiefFlees(q,K,z,120,210,120,-20,"skywatch-C4",2);else if("C4"===Y&&this.zone.isOnSequence(2,3))return this.thiefFailsEscape(q,K,z),{enableMonsters:!1};return null}setup(q,K,z){super.setup(q,K,z);return"A1"===z.getTag()&&this.zone.isOnSequence(2,4)?{hiddenNPCs:[it._.Npc_sprite_broccolina_json]}:{}}process(q,K,z){this.zone.isOnSequence(2,0)?this.area=["skywatch-C2"]:this.zone.isOnSequence(2,1)?this.area=["skywatch-C1"]:this.zone.isOnSequence(2,2)?this.area=["skywatch-C3"]:this.zone.isOnSequence(2,3)&&(this.area=["skywatch-C4"])}thiefStealsTheWeatherometre(q,K,z){this.thief=z.addMonster(q,K,0,688,335,!1,{randDir:!1,encounter:[{ID:84}],difficulty:2,maxTeamSize:1},!0),this.thief.visible=!0;const Y=K.content.addChild(st.q.instance.prodigy.icon.createIcon(695,275,zt.E.getIconForType("item",93))),Q=K.addNPC(600,550,it._.Npc_sprite_noot_json);Q.visible=!1,Q.float(!0);const X=st.q.instance.prodigy.event.create();X.enableInput(!1),X.set(Q,"visible",!0),X.hop(Q,300,-55,50),X.enableInput(!0),X.function(this.thief.chat.bind(this.thief,1,100)),X.delay(1500),X.set(Y,"visible",!1),X.enableInput(!1),X.delay(500),X.path(this.thief,[{x:800,y:230}],1),X.function((()=>{this.zone.states.windowBroken=!0})),X.set(this.thief,"visible",!1),X.enableInput(!0),X.function(Q.chat.bind(Q,1,100)),X.text(95,"noot"),X.enableInput(!1),X.hop(Q,300,55,50),X.set(Q,"visible",!1),X.enableInput(!0),X.set(this,"area",["skywatch-C1"]),X.function(this.zone.completeSequence.bind(this.zone,2,0)),X.function(K.process.bind(K)),X.set(this.thief,"visible",!1),X.start()}thiefFlees(q,K,z,Y,Q,X,Z,J,tt){this.thief=z.addMonster(q,K,0,Y,Q,!1,{randDir:!1,encounter:[{ID:84}],difficulty:2,maxTeamSize:1},!0),this.thief.visible=!0;const et=st.q.instance.prodigy.event.create();et.enableInput(!1),et.set(K.user,"evtProc",!0),et.path(this.thief,[{x:X,y:Z}],1,!1),et.set(this.thief,"visible",!1),et.set(K.user,"evtProc",!1),et.enableInput(!0),et.set(this,"area",[J]),et.function(this.zone.completeSequence.bind(this.zone,2,tt)),et.function(K.process.bind(K)),et.start()}thiefFailsEscape(q,K,z){this.thief=z.addMonster(q,K,0,850,500,!1,{randDir:!1,encounter:[{ID:84}],difficulty:2,maxTeamSize:1},!0),this.thief.visible=!1;const Y=K.addNPC(959,500,it._.Npc_sprite_noot_json);Y.flip(),Y.visible=!1,Y.float(!0);const Q=st.q.instance.prodigy.event.create();Q.validPath(K.user,K.path,1159,550),Q.set(K.user,"evtProc",!0),Q.enableInput(!1),Q.set(this.thief,"visible",!0),Q.path(this.thief,[{x:700,y:500}],1,!0),Q.path(K.user,[{x:1e3,y:520}],1.2),Q.set(Y,"visible",!0),Q.hop(Y,300,-55,50),Q.enableInput(!0),Q.text(96,"noot"),Q.enableInput(!1),Q.delay(500),Q.enableInput(!0),Q.function(this.thiefBattle.bind(this,q)),Q.start()}thiefBattle(q){st.q.instance.prodigy.battle.start({intro:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_WEATHER_METER"),screen:"battle-skywatch-outside",pets:[{ID:84,nickname:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_THIEF")}],drops:[{type:"item",ID:87}]},null,(()=>{this.thiefDefeated(q)}),null,this.zone.defaultOnFaint)}thiefDefeated(q){const K={type:"item",ID:87,N:1};this.zone.setState("quest",{ID:2,req:K,seq:4,state:{}}),this.req=K,this.zone.completeSequence(2,3),st.q.instance.prodigy.world.it("skywatch-C4",1160,540)}}class OR extends jn.T{constructor(q,K,z){super(q,K,3,"QUESTS_SKYWATCH_FIND_BROCCOLINA",{type:"seq",N:2},["skywatch-B2"],[427,428,429],[],[415],z)}setup(q,K,z){super.setup(q,K,z);const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=z.getTag();if("B2"===Q&&this.zone.isOnSequence(3,0))this.nootFindsTheNote(q,K,z);else if("A0"===Q&&this.zone.isOnSequence(3,1))Y.playerContainer.visible=!0,this.foundBroccolina(q,K,z);else if("A1"===Q&&!this.zone.isQuestComplete(3))return{hiddenNPCs:[it._.Npc_sprite_broccolina_json]};return{}}process(q,K,z){this.zone.isOnSequence(3,0)?this.area=["skywatch-B2"]:this.zone.isOnSequence(3,1)&&(this.area=["skywatch-A0"])}nootFindsTheNote(q,K,z){const Y=K.addNPC(640,535,it._.Npc_sprite_noot_json);Y.visible=!1,Y.float(!0);const Q=st.q.instance.prodigy.event.create();Q.enableInput(!1),Q.set(Y,"visible",!0),Q.hop(Y,300,-55,50),Q.enableInput(!1),Q.path(Y,[{x:540,y:365}]),Q.enableInput(!0),Q.text(97,"noot"),Q.enableInput(!1),Q.path(Y,[{x:585,y:535}]),Q.hop(Y,300,55,50),Q.set(Y,"visible",!1),Q.set(this.zone.quests[3],"area",["skywatch-A0"]),Q.function(this.zone.completeSequence.bind(this.zone,3,0)),Q.function(K.process.bind(K)),Q.enableInput(!0),Q.start()}foundBroccolina(q,K,z){z.addConstructedNPC(q,K,440,500,it._.Npc_sprite_broccolina_json,null,"NPC_NAME_BROCCOLINA").nameText.GameObject.legacyTransform.x+=60;const Y=st.q.instance.prodigy.event.create();Y.text(0,"broccolina"),Y.function(this.zone.completeSequence.bind(this.zone,3,1)),Y.function(K.process.bind(K)),Y.start()}}class IR extends jn.T{constructor(q,K,z){super(q,K,4,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:3},["skywatch-D1"],[430,431,432],[],[415,460],z),this.eyes=null,this.boss=null,this.element=null}setup(q,K,z){return"skywatch-D3"===z.zoneName&&(q.input.enabled=!1),super.setup(q,K,z)}start(q,K,z){return super.start(q,K,z),this.zone.isOnSequence(4,2)&&"skywatch-D3"===z.zoneName?this.cutsceneD3(q,K,z):this.zone.isOnSequence(4,1)&&"skywatch-D2"===z.zoneName?this.highlightD2(q,K,z):this.zone.isOnSequence(4,0)&&"skywatch-D1"===z.zoneName&&this.highlightD1(q,K,z),{}}process(q,K,z){this.zone.isOnSequence(4,0)?this.area=["skywatch-D1"]:this.zone.isOnSequence(4,1)?this.area=["skywatch-D2"]:this.zone.isOnSequence(4,2)&&(this.area=["skywatch-D3"])}cutsceneD3(q,K,z){this.boss=K.content.addChild(st.q.instance.prodigy.create.sprite(850,-100,it._.Boss_skywatch_json,"ice_cloud",new X.I9Y(.5,1))),this.eyes=K.foreground.addChild(st.q.instance.prodigy.create.sprite(840,-150,it._.Boss_skywatch_json,"med_face_0",new X.I9Y(.5,1)));const Y=st.q.instance.prodigy.event.create();Y.set(this,"descKey","QUESTS_SKYWATCH_INSPECT_MACHINE"),Y.enableInput(!1),Y.sound(17,"wind"),Y.delay(2e3),Y.function(this.bossEnter.bind(this,q)),Y.delay(600),Y.text(98,"noot"),Y.sound(17,"wind"),Y.function(this.zone.setState.bind(this.zone,"vines-D3",1)),Y.function(this.zone.setState.bind(this.zone,"vines-B3",1)),Y.function(this.zone.setState.bind(this.zone,"vines-C4",1)),Y.function(this.zone.setState.bind(this.zone,"plug-D3",1)),Y.function(this.zone.setState.bind(this.zone,"plug-B3",1)),Y.function(this.zone.setState.bind(this.zone,"plug-C4",1)),Y.function(this.bossExit.bind(this,q,K,z)),Y.explode(670,60,200,200,3,!0),Y.delay(2e3),Y.function(this.zone.createVines.bind(this.zone,z)),Y.delay(600),Y.enableInput(!0),Y.text(99,"noot"),Y.function(this.zone.completeSequence.bind(this.zone,4,2)),Y.function(K.process.bind(K)),Y.start()}bossEnter(q){q.add.tween(this.boss,this).to({x:850,y:200},2e3,X.GS3.Linear.None).to({y:"-=20"},1400,X.GS3.Quadratic.InOut).to({y:"+=20"},1400,X.GS3.Quadratic.InOut).start(),q.add.tween(this.eyes,this).to({x:840,y:150},2e3,X.GS3.Linear.None).to({y:"-=20"},1400,X.GS3.Quadratic.InOut).to({y:"+=20"},1400,X.GS3.Quadratic.InOut).start()}bossExit(q,K,z){z.unplug(q),z.displayStationaryFanribbons(q,K);const Y=q.add.tween(this.boss,this).to({x:950,y:-200},1400,X.GS3.Linear.None).start();q.add.tween(this.eyes,this).to({x:940,y:-250},1400,X.GS3.Linear.None).start(),Y.onTweenComplete.add(this.hideBoss.bind(this))}hideBoss(){this.boss.visible=!1,this.eyes.visible=!1}clearVinesD2(q,K,z){if(this.zone.isOnSequence(4,1)){const q=st.q.instance.prodigy.event.create();q.validPath(K.user,K.path,1150,550),q.fire(990,415,200,300,2,!0,!0),q.function(this.zone.shrinkVines.bind(this.zone,z)),q.function(this.element.highlight.bind(this.element,!1)),q.function(this.zone.completeSequence.bind(this.zone,4,1)),q.function(this.zone.setState.bind(this.zone,"vines-D2","off")),q.set(this.zone.quests[4],"area",["skywatch-D3"]),q.enableInput(!0),q.function(K.addClickableEvent.bind(K,925,555,90,90,this.zone.interactTrolley.bind(this.zone,K,[{x:1040,y:600},{x:965,y:600}],{trolley:z.trolley2,x:"+=0",y:"+=300",duration:3e3,target:"skywatch-D3",targetX:300,targetY:250}))),q.function(K.process.bind(K)),q.start()}}highlightD2(q,K,z){X.Aq$.isDefined(this.zone.getState("vines-D2"))||(this.element=st.q.instance.prodigy.create.element(K.foreground,1020,500),this.element.highlight(!0),K.addClickableEvent(1e3,410,100,260,this.clearVinesD2.bind(this,q,K,z),null))}clearVinesD1(q,K,z){if(this.zone.isOnSequence(4,0)){const Y=st.q.instance.prodigy.event.create();Y.validPath(K.user,K.path,915,440),Y.enableInput(!1),Y.fire(960,330,230,185,2,!0,!0),Y.function(this.enableD1Trolley2.bind(this,q,z)),Y.function(this.element.highlight.bind(this.element,!1)),Y.function(this.zone.completeSequence.bind(this.zone,4,0)),Y.function(this.zone.setState.bind(this.zone,"plug-B3","off")),Y.function(this.zone.setState.bind(this.zone,"plug-C4","off")),Y.function(this.zone.setState.bind(this.zone,"vines-D1","off")),Y.set(this.zone.quests[4],"area",["skywatch-D2"]),Y.function(K.addClickableEvent.bind(K,1080,360,80,80,this.zone.interactTrolley.bind(this.zone,K,[{x:1130,y:450},{x:1120,y:420}],{trolley:z.trolley2,x:"+=200",y:"+=0",duration:3e3,target:"skywatch-D2",targetX:140,targetY:290}),null,0)),Y.function(K.process.bind(K)),Y.enableInput(!0),Y.start()}}enableD1Trolley2(q,K){this.zone.shrinkVines(K),q.add.tween(K.trolley2,this).to({alpha:1},3e3,X.GS3.Linear.None).start()}highlightD1(q,K,z){this.element=st.q.instance.prodigy.create.element(K.foreground,1020,390),this.element.highlight(!0),K.addClickableEvent(950,320,260,190,this.clearVinesD1.bind(this,q,K,z),null,0)}}class DR extends jn.T{constructor(q,K,z){super(q,K,5,"",{type:"item",ID:56,N:3},["skywatch-B3","skywatch-C3","skywatch-D2"],[433,434,435,436],[],[415],z,null,"QUESTS_SKYWATCH_FIND_FACTORY_KEY"),this.collectionMaps={B3:[0],C3:[1],D2:[2]}}setup(q,K,z){super.setup(q,K,z);const Y=z.getTag();return"B3"===Y?K.addCollect(0,900,380,{type:"item",ID:56}):"C3"===Y?K.addCollect(1,260,450,{type:"item",ID:56}):"D2"===Y&&K.addCollect(2,1150,530,{type:"item",ID:56}),null}}class RR extends jn.T{constructor(q,K,z){super(q,K,6,"QUESTS_SKYWATCH_GET_KEY",{type:"seq",N:1},["skywatch-D1"],[437,438],[],[415],z),this.ambusher1=null,this.ambusher2=null,this.ambusher3=null}setup(q,K,z){if(super.setup(q,K,z),"D1"===z.getTag()&&this.zone.isOnSequence(6,0)){const Y={randDir:!1,encounter:[{ID:120}],difficulty:1,maxTeamSize:1};this.ambusher1=z.addMonster(q,K,0,560,-50,!1,Y,!0),this.ambusher2=z.addMonster(q,K,4,500,-50,!1,Y,!0),this.ambusher3=z.addMonster(q,K,2,830,-50,!1,Y,!0),this.ambusher1.visible=!1,this.ambusher2.visible=!1,this.ambusher3.visible=!1;st.q.instance.prodigy.create.element(K.content,700,190).highlight(!0),K.addClickableEvent(700,190,80,80,this.ambush.bind(this,q,K,z),null,0)}return null}ambush(q,K,z){const Y=this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_DEFEAT_AMBUSHERS"),{pets:[{ID:120},{ID:120},{ID:120}],screen:"battle-skywatch-outside"},(()=>{this.zone.completeSequence(6,0),st.q.instance.prodigy.world.it("skywatch-D1",640,360)})),Q=st.q.instance.prodigy.event.create();Q.validPath(K.user,K.path,740,350),Q.reward([{type:"item",ID:81}]),Q.enableInput(!1),Q.set(K.user,"evtProc",!0),Q.function(this.zone.hideFollow.bind(this.zone,K)),Q.set(this.ambusher1,"visible",!0),Q.set(this.ambusher2,"visible",!0),Q.set(this.ambusher3,"visible",!0),Q.path(this.ambusher1,[{x:640,y:350}],1,!0),Q.path(this.ambusher2,[{x:690,y:390}],1,!0),Q.path(this.ambusher3,[{x:800,y:390}],1),Q.delay(1e3),Q.enableInput(!0),Q.function((()=>{st.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),Q.function(Y),Q.start()}}class PR extends jn.T{constructor(q,K,z){super(q,K.concat(ot.V.Bgm_puppetmaster),6,"QUESTS_SKYWATCH_GET_KEY",{type:"seq",N:1},["skywatch-D1"],[437,438],[],[415],z),this.ambusher1=null,this.ambusher2=null,this.ambusher3=null}setup(q,K,z){if(super.setup(q,K,z),"D1"===z.getTag()&&this.zone.isOnSequence(6,0)){if(!z.zone.getState(cf.PIPPET_DEFEATED)&&(q.input.enabled=!1,st.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(z.zone,206,SS.e.Skywatch_quests_encounter).catch(X.RQr.createHandler(`Could not load the Pippet Encounter from guid: ${SS.e.Skywatch_quests_encounter}`)),!z.zone.getState(cf.PIPPET_REMATCH)))return{enableMonsters:!1};const Y={randDir:!1,encounter:[{ID:120}],difficulty:1,maxTeamSize:1};this.ambusher1=z.addMonster(q,K,0,560,-50,!1,Y,!0),this.ambusher2=z.addMonster(q,K,4,500,-50,!1,Y,!0),this.ambusher3=z.addMonster(q,K,2,830,-50,!1,Y,!0),this.ambusher1.visible=!1,this.ambusher2.visible=!1,this.ambusher3.visible=!1;st.q.instance.prodigy.create.element(K.content,700,190).highlight(!0),K.addClickableEvent(700,190,80,80,this.ambush.bind(this,q,K,z),null,0)}return null}ambush(q,K,z){const Y=this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_DEFEAT_AMBUSHERS"),{pets:[{ID:120},{ID:120},{ID:120}],screen:"battle-skywatch-outside"},(()=>{this.zone.completeSequence(6,0),st.q.instance.prodigy.world.it("skywatch-D1",640,360)})),Q=st.q.instance.prodigy.event.create();Q.validPath(K.user,K.path,740,350),Q.reward([{type:"item",ID:81}]),Q.enableInput(!1),Q.set(K.user,"evtProc",!0),Q.function(this.zone.hideFollow.bind(this.zone,K)),Q.set(this.ambusher1,"visible",!0),Q.set(this.ambusher2,"visible",!0),Q.set(this.ambusher3,"visible",!0),Q.path(this.ambusher1,[{x:640,y:350}],1,!0),Q.path(this.ambusher2,[{x:690,y:390}],1,!0),Q.path(this.ambusher3,[{x:800,y:390}],1),Q.delay(1e3),Q.enableInput(!0),Q.function((()=>{st.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),Q.function(Y),Q.start()}}class MR extends jn.T{constructor(q,K,z){super(q,K,7,"",{type:"item",ID:49,N:5},["skywatch-E1","skywatch-E3"],[439],[],[415],z,null,"QUESTS_SKYWATCH_UPGRADE_VINECINERATOR")}setup(q,K,z){super.setup(q,K,z),this.updateQuestArea();const Y={randDir:!0,encounter:[{ID:120}],drops:[{type:"item",ID:49,N:1}],difficulty:3,maxTeamSize:1,unique:!0,isQuestEncounter:!0,showGuideHand:!0},Q=z.getTag();return"E1"===Q?(this.zone.isQuestComplete(7)||(st.q.instance.prodigy.prefabFactory.addMonster(z,942,400,0,Y).catch(X.RQr.createHandler("Could not add Aracute 0 for Skywatch Q7")),st.q.instance.prodigy.prefabFactory.addMonster(z,400,400,1,Y).catch(X.RQr.createHandler("Could not add Aracute 1 for Skywatch Q7"))),{enableMonsters:!1}):"E3"===Q?(this.zone.isQuestComplete(7)||(st.q.instance.prodigy.prefabFactory.addMonster(z,725,480,2,Y).catch(X.RQr.createHandler("Could not add Aracute 2 for Skywatch Q7")),st.q.instance.prodigy.prefabFactory.addMonster(z,300,280,3,Y).catch(X.RQr.createHandler("Could not add Aracute 3 for Skywatch Q7")),st.q.instance.prodigy.prefabFactory.addMonster(z,290,520,4,Y).catch(X.RQr.createHandler("Could not add Aracute 4 for Skywatch Q7"))),{enableMonsters:!1}):{}}updateQuestArea(){const q=[],K=this.zone.getQuestState();X.Aq$.isDefined(K.state)&&(K.state[1]&&K.state[2]||q.push("skywatch-E1"),K.state[2]&&K.state[3]&&K.state[4]||q.push("skywatch-E3"),this.area=q)}}class NR extends jn.T{constructor(q,K,z){super(q,K,8,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:1},["skywatch-B3"],[440,441,442],[],[415],z)}setup(q,K,z){if(super.setup(q,K,z),this.zone.isOnSequence(8,0)&&"skywatch-B3"===z.zoneName){const q=st.q.instance.prodigy.create.element(K.foreground,1020,140);q.highlight(!0),K.addClickableEvent(920,20,290,260,(()=>{const Y=K.content.addChild(st.q.instance.prodigy.create.sprite(1045,-100,it._.Boss_skywatch_json,"water_cloud",new X.I9Y(.5,1))),Q=K.foreground.addChild(st.q.instance.prodigy.create.sprite(1035,-150,it._.Boss_skywatch_json,"med_face_1",new X.I9Y(.5,1))),Z=st.q.instance.prodigy.event.create();Z.validPath(K.user,K.path,860,270),Z.validPath(K.user,K.path,861,270),Z.enableInput(!1),Z.fire(935,45,290,290,2,!1,!0),Z.function(q.highlight.bind(q,!1)),Z.function(this.zone.shrinkVines.bind(this.zone,z)),Z.delay(3e3),Z.sound(17,"wind"),Z.function((()=>{const q=st.q.instance.prodigy.animation.translate(Y,1045,200,2e3,null,null,!0);st.q.instance.prodigy.animation.translate(Q,1035,150,2e3,null,null,!0),q.onTweenComplete.add(this.zone.changePosition.bind(this.zone,Y,Q)),q.onTweenComplete.add((()=>{st.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const q=st.q.instance.prodigy.gameContainer.get("f71-42eb"),Y=q.getValue("rainyStormMaxHP",te.s.get("GameConstants.RainyStorm.MAX_HP")),Q=null===Y?void 0:parseInt(Y,10),Z=K.user.x,J=K.user.y,tt=this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:50,element:"water",attacks:[82],name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_RAINY_STORM"),tag:mn.A_.SKYWATCH,maxHP:Q},difficulty:parseInt(q.getValue("rainyStormDifficulty",te.s.get("GameConstants.RainyStorm.DIFFICULTY")),10),starMod:2,screen:"battle-skywatch-outside"},(()=>{this.zone.completeSequence(8,0),this.zone.setState("plug-B3",null),this.zone.setState("vines-B3",null),st.q.instance.prodigy.world.it("skywatch-B3",Z,J)})),et=st.q.instance.prodigy.event.create();et.enableInput(!1),et.delay(2e3),et.enableInput(!0),et.function(tt),et.start()}))})),Z.start()}),null,0)}return null}}class xR extends jn.T{constructor(q,K,z){super(q,K,9,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:1},["skywatch-C4"],[443],[],[414],z)}setup(q,K,z){if(super.setup(q,K,z),this.zone.isOnSequence(9,0)&&"skywatch-C4"===z.zoneName){const Y=st.q.instance.prodigy.create.element(K.foreground,160,220);Y.highlight(!0);const Q=()=>{const Q=K.content.addChild(st.q.instance.prodigy.create.sprite(150,-100,it._.Boss_skywatch_json,"earth_cloud",new X.I9Y(.5,1))),Z=K.foreground.addChild(st.q.instance.prodigy.create.sprite(140,-150,it._.Boss_skywatch_json,"med_face_2",new X.I9Y(.5,1))),J=()=>{const q=K.user.x,Y=K.user.y,Q=()=>{this.zone.completeSequence(9,0),this.zone.setState("plug-C4",null),this.zone.setState("vines-C4",null),st.q.instance.prodigy.world.it("skywatch-C4",q,Y)};st.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const Z=st.q.instance.prodigy.event.create();Z.enableInput(!1),Z.delay(2e3),Z.enableInput(!0);const J=st.q.instance.prodigy.gameContainer.get("f71-42eb"),tt=J.getValue("sandyStormMaxHP",te.s.get("GameConstants.SandyStorm.MAX_HP")),et=null===tt?void 0:parseInt(tt,10);Z.function(this.zone.getBattle(z,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:49,element:"earth",attacks:[68],name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_SANDY_STORM"),difficulty:3,tag:mn.A_.SKYWATCH,maxHP:et},difficulty:parseInt(J.getValue("sandyStormDifficulty",te.s.get("GameConstants.SandyStorm.DIFFICULTY")),10),starMod:2,screen:"battle-skywatch-outside"},(()=>{Q()}))),Z.start()},tt=st.q.instance.prodigy.event.create();tt.validPath(K.user,K.path,220,400),tt.enableInput(!1),tt.fire(115,165,290,290,2,!1,!0),tt.function(Y.highlight.bind(Y,!1)),tt.function(this.zone.shrinkVines.bind(this.zone,z)),tt.delay(3e3),tt.sound(17,"wind"),tt.function((()=>{const K=q.add.tween(Q,this).to({x:150,y:300},2e3,X.GS3.Linear.None).start();q.add.tween(Z,this).to({x:140,y:250},2e3,X.GS3.Linear.None).start(),K.onTweenComplete.add((()=>{this.zone.changePosition(Q,Z),J()}))}).bind(this,q,K)),tt.start()};K.addClickableEvent(90,120,270,280,Q.bind(this,q,K),null)}return null}}class LR extends Cn.b{constructor(q){super(q),this.questManagerIdentifier="70a-ec7b",this.name="Skywatch",this.ID=mn.A_.SKYWATCH,this.guardian="SKYWATCH_GUARDIAN",this.battleBG="battle-skywatch-inside",this.defaultOnFaint="skywatch-A1",this.questHub="skywatch-A1",this.bgmID=18,this.currency=16,this.zoneIndex=AT.P.Skywatch,this.states=["chest1","chest2","chest3","chest4","chest5","wizard1","wizard2","daily","windowBroken","plug-D3","plug-B3","plug-C4","eugene_A1","vines-D1","vines-D2","vines-D3","vines-B3","vines-C4",cf.PIPPET_ENCOUNTER,cf.PIPPET_REMATCH,cf.PIPPET_DEFEATED],this.monsters=[13,15,18,20,35,40,43,56,72,84,113,115,120];const K=[it._.Npc_sprite_wizard_json,Gn.t.Tileset_town_new_png,it._.Zone_skywatch_json,it._.Npc_sprite_benni_json,it._.Npc_sprite_broccolina_json,it._.Npc_sprite_eugene_json,ht.c.Sfx_skywatch,Gn.t.Tileset_skywatch_png,Gn.t.Tileset_skywatch_buildings_png,Gn.t.Tileset_collisions_png,Gn.t.Tileset_skywatch_factory_png,Gn.t.Tileset_generic_snow_png,Gn.t.Tileset_icecave_new_png,Gn.t.Tileset_cloud_new_png,Gn.t.Tileset_cloud_png,Gn.t.Tileset_interior_png,ot.V.Bgm_skywatch],z={map:"skywatch-Titan",cutscene:"skywatch-titanIntro",harvey:{x:240,y:200},sign:{x:150,y:210},catapult:{x:140,y:400,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:400,y:450},battleBG:[br.q.Battle_skywatch_outside_bg,br.q.Battle_skywatch_outside_fg]};this.maps={A0:new nR(this,K),A1:new aR(this,K),B1:new rR(this,K),B2:new oR(this,K),B3:new hR(this,K),C1:new cR(this,K),C2:new dR(this,K),C3:new lR(this,K),C4:new uR(this,K),D1:new fR(this,K),D2:new bR(this,K),D3:new pR(this,K),E1:new vR(this,K),E2:new gR(this,K),E3:new mR(this,K),E4:new yR(this,K),E5:new _R(this,K),Titan:new VT(this,K,z)},Promise.all([kf.T.ready,Qt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((q=>{st.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_SKYWATCH"],q,"Error: unable to load Skywatch Zone Rewards JSON")})),this.scenes={titanIntro:new RT(this,[Gn.t.Tileset_interior_general_png,Gn.t.Tileset_wall_collisions_png,ot.V.Bgm_tutorial])}}setZoneRewards(){const q=[it._.Npc_sprite_wizard_json,Gn.t.Tileset_town_new_png,it._.Zone_skywatch_json,it._.Npc_sprite_benni_json,it._.Npc_sprite_broccolina_json,it._.Npc_sprite_eugene_json,ht.c.Sfx_skywatch,Gn.t.Tileset_skywatch_png,Gn.t.Tileset_skywatch_buildings_png,Gn.t.Tileset_collisions_png,Gn.t.Tileset_skywatch_factory_png,Gn.t.Tileset_generic_snow_png,Gn.t.Tileset_icecave_new_png,Gn.t.Tileset_cloud_new_png,Gn.t.Tileset_cloud_png,Gn.t.Tileset_interior_png,ot.V.Bgm_skywatch],K=(0,DT.mg)(Qt.R.loadData(Yt.r.ZoneRewardsSkywatch_json));this.quests={1:new ER(this,q,K.quests.SkywatchQ1),2:new CR(this,q,K.quests.SkywatchQ2),3:new OR(this,q,K.quests.SkywatchQ3),4:new IR(this,q,K.quests.SkywatchQ4),5:new DR(this,q,K.quests.SkywatchQ5),6:uf.arePippetQuestEncountersEnabled?new PR(this,[],K.quests.SkywatchQ6):new RR(this,[],K.quests.SkywatchQ6),7:new MR(this,q,K.quests.SkywatchQ7),8:new NR(this,q,K.quests.SkywatchQ8),9:new xR(this,q,K.quests.SkywatchQ9),10:new wR(this,q,K.quests.SkywatchQ10),11:new TR(this,q,K.quests.SkywatchQ11),12:new SR(this,q,K.quests.SkywatchQ12),13:new AR(this,q,K.quests.SkywatchQ13)}}start(q,K,z){super.start(q,K,z),this._elevatorEvent=st.q.instance.prodigy.event.create(),this._trolleyAnimationEvent=st.q.instance.prodigy.event.create(),this._trolleyInteractionEvent=st.q.instance.prodigy.event.create(),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}getDailyMaps(){return[]}interactTrolley(q,K,z){const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=this._trolleyInteractionEvent;Q.end(),Q.validPath(q.user,q.path,K[0].x,K[0].y),Q.function(q.removeFollow.bind(q,Y.userID)),Q.path(q.user,[{x:K[1].x,y:K[1].y}]),Q.sound(17,"machines"),Q.function(this.animateTrolley.bind(this,q,z.trolley,z.x,z.y,z.duration,z.target,z.targetX,z.targetY)),Q.start()}animateTrolley(q,K,z,Y,Q,Z,J,tt){this.game.add.tween(K,this).to({x:z,y:Y},Q,X.GS3.Linear.None).start(),this.game.add.tween(q.user,this).to({x:z,y:Y},Q,X.GS3.Linear.None).start();const et=this._trolleyAnimationEvent;et.enableInput(!1),et.delay(3e3),et.enableInput(!0),et.function(st.q.instance.prodigy.world.it.bind(st.q.instance.prodigy.world,Z,J,tt)),et.start()}shrinkVines(q){q.toggleDynamicLayer(this.game,2,!1,3e3)}createVines(q){q.toggleDynamicLayer(this.game,2,!0,0)}changePosition(q,K){st.q.instance.prodigy.animation.float(q,20,1400,!0,!0),st.q.instance.prodigy.animation.float(K,20,1400,!0,!0)}elevator(q,K,z,Y){const Q=this._elevatorEvent;X.Aq$.isDefined(Q)&&(Q.end(),Q.validPath(q.user,q.path,K[0].x,K[0].y),Q.function(this.hideFollow.bind(this,q)),Q.enableInput(!1),Q.delay(200),Q.sound(17,"elevator"),Q.function(this.animateElevatorOpen.bind(this,q.content,z.x,z.y)),Q.delay(1e3),Q.path(q.user,[{x:K[1].x,y:K[1].y}]),Q.delay(1e3),Q.function(this.animateElevatorClose.bind(this,q.foreground,z.x,z.y)),Q.function((()=>{q.user.visible=!1})),Q.delay(1e3),Q.enableInput(!0),Q.function(st.q.instance.prodigy.world.it.bind(st.q.instance.prodigy.world,Y.target,Y.x,Y.y)),Q.start())}animateElevatorOpen(q,K,z){q.addChild(st.q.instance.prodigy.create.sprite(K,z,it._.Zone_skywatch_json,"elevator-0",new X.I9Y(.5,1),(q=>{q.animations.add("stand",["elevator-0","elevator-1","elevator-2","elevator-3","elevator-4"],10,!1,!1),q.animations.play("stand",void 0,!1)}))).anchor.set(0,0)}animateElevatorClose(q,K,z){const Y=q.addChild(st.q.instance.prodigy.create.sprite(K,z,it._.Zone_skywatch_json,"elevator-2",new X.I9Y(.5,1)));Y.anchor.set(0,0),Y.animations.add("stand",["elevator-4","elevator-3","elevator-2","elevator-1","elevator-0"],10,!1,!1),Y.animations.play("stand")}cleanup(){var q,K,z;super.cleanup(),null===(q=this._elevatorEvent)||void 0===q||q.end(),this._elevatorEvent=null,null===(K=this._trolleyAnimationEvent)||void 0===K||K.end(),this._trolleyAnimationEvent=null,null===(z=this._trolleyInteractionEvent)||void 0===z||z.end(),this._trolleyInteractionEvent=null}}class kR extends sR{constructor(q,K){super(q,"A0","MAP_SKYWATCH_LOWER_BEANOVATOR",1100,450,["skywatch-A1","shiverchill-B1"],K),this.battleBG="battle-skywatch-outside"}}class BR extends sR{constructor(q,K){super(q,"A1","MAP_SKYWATCH_UPPER_BEANOVATOR",620,350,["skywatch-A0","skywatch-B1","skywatch-C1","skywatch-D1"],K.concat([it._.Zone_lamplight_json,it._.Npc_sprite_broccolina_json,it._.Npc_sprite_merchant_json,ct.Q.Spine_npc_benni_json]))}}class UR extends sR{constructor(q,K){super(q,"B1","MAP_SKYWATCH_GARDENERS_HUT_EXTERIOR",1140,549,["skywatch-A1","skywatch-B2","skywatch-B3"],K),this.battleBG="battle-skywatch-outside",this.coord=[new X.I9Y(460,530),new X.I9Y(200,560)]}}class FR extends sR{constructor(q,K){super(q,"B2","MAP_SKYWATCH_GARDENERS_HUT_INNER",640,510,["skywatch-B1"],K.concat([it._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}}class GR extends sR{constructor(q,K){super(q,"B3","MAP_SKYWATCH_GREAT_GRATERS",1030,530,["skywatch-B1"],K.concat([it._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}}class jR extends sR{constructor(q,K){super(q,"C1","MAP_SKYWATCH_SCREWBALL_SHACK",1120,430,["skywatch-A1","skywatch-C2","skywatch-C3"],K.concat([it._.Zone_lamplight_json])),this.battleBG="battle-skywatch-outside",this.coord=[new X.I9Y(370,580),new X.I9Y(590,350)]}}class $R extends sR{constructor(q,K){super(q,"C2","MAP_SKYWATCH_INNER_SCREWBALL_SHACK",625,520,["skywatch-C1"],K.concat([it._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}}class HR extends sR{constructor(q,K){super(q,"C3","MAP_SKYWATCH_CLOUDY_PASS",1160,210,["skywatch-C1","skywatch-C4"],K),this.battleBG="battle-skywatch-outside"}}class VR extends sR{constructor(q,K){super(q,"C4","MAP_SKYWATCH_SKY_SHOWER",1160,550,["skywatch-C3"],K.concat([it._.Npc_sprite_noot_json,it._.Npc_sprite_flora_json,it._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}}class WR extends sR{constructor(q,K){super(q,"D1","MAP_SKYWATCH_FACTORY_ENTRANCE",189,549,["skywatch-A1","skywatch-D2","skywatch-E1"],K.concat(it._.Npc_sprite_noot_json)),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new X.I9Y(400,540),new X.I9Y(780,570)]}}class qR extends sR{constructor(q,K){super(q,"D2","MAP_SKYWATCH_BREEZY_PASS",140,290,["skywatch-D1","skywatch-D3"],K.concat([it._.Zone_lamplight_json])),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new X.I9Y(280,450),new X.I9Y(780,330)]}}class KR extends sR{constructor(q,K){super(q,"D3","MAP_SKYWATCH_WIND_TUNNEL",270,250,["skywatch-D2"],K.concat([it._.Zone_lamplight_json,it._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}}class zR extends sR{constructor(q,K){super(q,"E1","MAP_SKYWATCH_FACTORY_MAIN_HALL",1120,520,["skywatch-D1","skywatch-E2","skywatch-E3"],K),this.battleBG="battle-skywatch-inside"}}class YR extends sR{constructor(q,K){super(q,"E2","MAP_SKYWATCH_OLD_MANS_ROOM",230,530,["skywatch-E1"],K.concat([it._.Npc_sprite_eugene_json])),this.battleBG="battle-skywatch-inside"}}class QR extends sR{constructor(q,K){super(q,"E3","MAP_SKYWATCH_BLAST_DOORS",1060,530,["skywatch-E1","skywatch-E4"],K),this.battleBG="battle-skywatch-inside"}}class XR extends sR{constructor(q,K){super(q,"E4","MAP_SKYWATCH_END_CHAMBER",640,380,["skywatch-E3","skywatch-E5"],K.concat([it._.Boss_skywatch_json])),this.battleBG="battle-skywatch-inside"}}class ZR extends sR{constructor(q,K){super(q,"E5","MAP_SKYWATCH_OUTSKIRTS",1024,515,["skywatch-E4"],K),this.user=null,this.battleBG="battle-skywatch-outside"}}class JR extends LR{constructor(q){super(q),this._assets=[it._.Npc_sprite_wizard_json,Gn.t.Tileset_town_new_png,it._.Zone_skywatch_json,it._.Npc_sprite_benni_json,it._.Npc_sprite_broccolina_json,it._.Npc_sprite_eugene_json,ht.c.Sfx_skywatch,Gn.t.Tileset_skywatch_png,Gn.t.Tileset_skywatch_buildings_png,Gn.t.Tileset_collisions_png,Gn.t.Tileset_skywatch_factory_png,Gn.t.Tileset_generic_snow_png,Gn.t.Tileset_icecave_new_png,Gn.t.Tileset_cloud_new_png,Gn.t.Tileset_cloud_png,Gn.t.Tileset_interior_png,ot.V.Bgm_skywatch],this.questManagerIdentifier="997-ac2e",this.ID=mn.A_.SKYWATCHHARD,this.defaultOnFaint="skywatch_hard-C8",this.questHub="skywatch_hard-C8",this.zoneIndex=AT.P.SkywatchHard,this.difficultyMode=vi.i.Hard,this.states=["chest1","chest2","chest3","chest4","chest5","wizard1","wizard2","daily","windowBroken","plug-D3","plug-B3","plug-C4","eugene_A1","vines-D1","vines-D2","vines-D3","vines-B3","vines-C4",cf.PIPPET_ENCOUNTER,cf.PIPPET_REMATCH,cf.PIPPET_DEFEATED],this.monsters=[],this.maps={A0:new kR(this,this._assets),A1:new BR(this,this._assets),B1:new UR(this,this._assets),B2:new FR(this,this._assets),B3:new GR(this,this._assets),C1:new jR(this,this._assets),C2:new $R(this,this._assets),C3:new HR(this,this._assets),C4:new VR(this,this._assets),D1:new WR(this,this._assets),D2:new qR(this,this._assets),D3:new KR(this,this._assets),E1:new zR(this,this._assets),E2:new YR(this,this._assets),E3:new QR(this,this._assets),E4:new XR(this,this._assets),E5:new ZR(this,this._assets)},this.scenes={}}}var tP=z(51979);class eP{constructor(q,K){this._previousMap="",this._currentMap="",this.mapChanged=new X.HN0,this.game=q,this._metricsManager=K,this.zones={[mn.A_.FOREST]:new ZA(q),[mn.A_.SHIVERCHILL]:new UD(q),[mn.A_.SKYWATCH]:new LR(q),[mn.A_.LAMPLIGHT]:new RO(q),[mn.A_.DYNO]:new fA(q),[mn.A_.BONFIRE]:new IS(q),[mn.A_.HOUSE]:new CC(q),[mn.A_.SHIPWRECK]:new RI(q),[mn.A_.DARKTOWER]:new nA(q),[mn.A_.ACADEMY]:new Fn.N(q),[mn.A_.ARCHIVES]:new IT(q),[mn.A_.TOWERTOWN]:new _T.m(q),[mn.A_.CRYSTALCAVERNS]:new XS(q),[mn.A_.DRAGONISLE]:new dA(q),[mn.A_.MOON]:new $O(q),[mn.A_.SPRINGFESTGROTTO_BUNNY]:new kO(q),[mn.A_.SPRINGFESTGROTTO_FOX]:new BO(q),[mn.A_.EARTHTOWER]:new oa(q,1),[mn.A_.ICETOWER]:new oa(q,3),[mn.A_.STORMTOWER]:new oa(q,4),[mn.A_.FIRETOWER]:new oa(q,5),[mn.A_.WATERTOWER]:new oa(q,6),[mn.A_.ASTRALTOWER]:new oa(q,7),[mn.A_.ACADEMYHARD]:new CT(q),[mn.A_.FORESTHARD]:new dC(q),[mn.A_.SHIVERCHILLHARD]:new iR(q),[mn.A_.BONFIREHARD]:new zS(q),[mn.A_.SHIPWRECKHARD]:new eD(q),[mn.A_.SKYWATCHHARD]:new JR(q),[mn.A_.ACADEMYEXPERT]:new CC(q),[mn.A_.FORESTEXPERT]:new CC(q),[mn.A_.SHIVERCHILLEXPERT]:new CC(q),[mn.A_.BONFIREEXPERT]:new CC(q),[mn.A_.SHIPWRECKEXPERT]:new CC(q),[mn.A_.SKYWATCHEXPERT]:new CC(q)},this.pippetEncounterDaily=null,this.pippetEncounterSpawn=null}inRestrictedSocialZone(q){return!!q&&Z.includes(eP.SINGLE_PLAYER_ZONES,q)}enter(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;const K=st.q.instance.prodigy.gameContainer.get("088-1d4c");K.startTracing(Tu.u.World);const z=st.q.instance.prodigy.gameContainer;K.startTracing(Tu.u.WorldRemotePlayerSpawnLimiterInit),z.get("cd7-a413").init(),K.endTracing(Tu.u.WorldRemotePlayerSpawnLimiterInit),K.startTracing(Tu.u.WorldSynapseMultiplayerServiceConnection);z.get("b0c-9016").connect().catch(X.RQr.createHandler("Unable to connect to Synapse"));const Y=z.get("0fd-d255");let Q;K.endTracing(Tu.u.WorldSynapseMultiplayerServiceConnection),K.startTracing(Tu.u.WorldNetworkHandlerEnterWorld);do{try{Q=yield Y.enterWorld([])}catch(e){X.RQr.logError(e,"Error entering world"),yield new Promise((K=>{const z="500"===(e instanceof Error?e.name:"500")?"ENTER_WORLD_ERROR_RETRY":"ENTER_WORLD_ERROR";st.q.instance.prodigy.open.messageBoxPrefab({text:z,confirmCallback:K})})),yield X.Egh.timeout(5e3)}}while(!Q);K.endTracing(Tu.u.WorldNetworkHandlerEnterWorld),K.startTracing(Tu.u.WorldInitProgressDataManager);const{chargedLevelProgress:Z,timezoneOffset:J,riftsSyncedData:tt,resumeBattleData:et,hudData:it,initialInventoryContents:nt,afterSchoolWidgetStatus:at}=Q;z.get("c91-4e66").setup().catch(X.RQr.createHandler("World: Could not set up Universal Team Selection Service"));const rt=z.get("c5a-49f2");Z&&rt.init(Z),K.endTracing(Tu.u.WorldInitProgressDataManager),X.Aq$.isDefined(J)&&(Bc.R.SERVER_PLAYER_TIMEZONE_OFFSET=J),K.startTracing(Tu.u.WorldSynchedRiftDataInit),yield wT.L.setUpIconGuidOverrides(),tt&&(z.get("687-0b09").init(tt),(null==tt?void 0:tt.currentRiftRunProgress)&&st.q.instance.game.state.get(Ue.G.Rifts).setRiftRunProgress(tt.currentRiftRunProgress)),K.endTracing(Tu.u.WorldSynchedRiftDataInit),K.startTracing(Tu.u.WorldFeaturedSpawnDataInit);const ot=z.get("762-6549");yield ot.cacheData(Q.featuredSpawnData),K.endTracing(Tu.u.WorldFeaturedSpawnDataInit),K.startTracing(Tu.u.WorldWizardCostumeDataInit);const ht=z.get("230-ffdb");yield ht.initializeCostumeData(Q.costumeData),K.endTracing(Tu.u.WorldWizardCostumeDataInit),K.startTracing(Tu.u.WorldHudDataInit),it&&z.get("0c3-2fd0").initialize(it),K.startTracing(Tu.u.WorldSegmentedOffersDataInit);const ct=z.get("c21-1a3f");yield ct.loadOffersFromData(),K.endTracing(Tu.u.WorldSegmentedOffersDataInit);const dt=z.get("394-6aa1");if(yield dt.isFeatureAvailable()){const q=z.get("d00-c550"),K=z.get("476-a586");if(X.Aq$.isDefined(q.lastClassCodeFetched)){yield q.initialize(),yield K.sendClassCodeQuestEvent();const z=yield TT.b.getData();X.Aq$.isDefined(z)&&(z.IS_CURRENT_CHALLENGE_STARTED||(yield K.sendPreviousChallengeStartedEvent()))}yield K.setup(),yield dt.setupHudButton()}(0,Ft.G)(vT.K).enabled&&z.get("2c1-7dec").setData(at),(0,Ft.G)(oh.d).enabled&&(0,ST.Ug)().catch(X.RQr.createHandler("World: Error updating wizard bank hud button notifications")),K.endTracing(Tu.u.WorldHudDataInit),K.startTracing(Tu.u.WorldInventoryInit),nt&&z.get("6d6-463e").initialize(nt),st.q.instance.prodigy.gameContainer.get(Js.T).initialize(),K.endTracing(Tu.u.WorldInventoryInit),yield z.get("b37-c775").managerSetupPromise,K.startTracing(Tu.u.WorldSegmentAnalyticsSetup);const lt=z.get("20f-5f67");lt.item.beginSecureInventoryTracking(),lt.session.sendServerSessionStartedEvents(),K.endTracing(Tu.u.WorldSegmentAnalyticsSetup),K.startTracing(Tu.u.WorldElementalBoostCache),z.get("9d1-13ea").cacheElementalBoost().catch(X.RQr.createHandler("Could not cache the daily elemental boost!")),K.endTracing(Tu.u.WorldElementalBoostCache),z.get("a69-7d25").setCooldowns(null!==(q=Q.cooldownsData)&&void 0!==q?q:{});const ut=st.q.instance.game.state.get(Ue.G.Loading);ut?ut.onAdditionalLoadPromisesFinishSignal.addOnce(this.onWorldLoadingFinished.bind(this)):this.game.state.onStateLoaded.add(this.onStateLoaded,this);const ft=z.get("ad2-c5b2").player,bt=st.q.instance.prodigy.classModeController;if(K.startTracing(Tu.u.WorldPippetEncounterInit),this.pippetEncounterDaily=new mT.e(this.game,ft),!this.pippetEncounterDaily.isInitialized()||this.pippetEncounterDaily.hasDateIdChanged()?(this.pippetEncounterDaily.init(),this.pippetEncounterSpawn=this.pippetEncounterDaily.getSpawn()):this.pippetEncounterDaily.isComplete()||(this.pippetEncounterSpawn=this.pippetEncounterDaily.getSpawn()),K.endTracing(Tu.u.WorldPippetEncounterInit),this.isMathTowerEnabledForPlayer(this.game,ft)&&bt.isClassMode()&&ft.hasCompletedTutorial())return void this.it("tower_town-A1");K.startTracing(Tu.u.WorldGetTowerData);const pt=Fn.N.getAllTowerData();K.endTracing(Tu.u.WorldGetTowerData);const vt=this.zones[mn.A_.ACADEMY],gt=this.zones[mn.A_.ACADEMY].maps.CR1;K.startTracing(Tu.u.WorldInitTowerData);for(let st=0;stNumber(q.taskID)<=2)))?K.sendQuestEvent(ps.T.START_QUEST,{id:"zone-quest-ftue"}).then((()=>{this.it(tP.W,eP.TUTORIAL_MAP_STARTING_POSITION.x,eP.TUTORIAL_MAP_STARTING_POSITION.y)})).catch(X.RQr.createHandler("[World] Failed to send the quest event: zone-quest-ftue")):this.enterMap()}))}enterMap(){var q;const K=this.zones[mn.A_.HOUSE].getQuestState(),z=Nn.J.isDefined(K)&&1===Z.get(K,"ID",0)?Z.get(K,"seq",0):void 0,Y=this.zones[mn.A_.ACADEMY].getQuestState(),Q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let J=Z.get(Q.data,"zone","");const tt=st.q.instance.prodigy.gameContainer.get("7f4-4464");if(tt.waitingToTransport||X.Aq$.isDefined(tt.currentQuickQuizId))this.setCurrentMap(J);else if(Ca.p.resumeBattle())this.setCurrentMap(J);else if(lf.J.canShowNarrativeIntro(null===(q=null==Q?void 0:Q.data)||void 0===q?void 0:q.zone)&&this.setCurrentMap("lamplight-B3"),z>4)X.Aq$.isDefined(Q.state.data.zone.academy)&&(Q.state.data.zone.academy.quest=null),this.it("academy-GH3");else if(!Q.hasCompletedTutorial()&&"academy-GH1"===J&&Y&&Y.ID>=2||z<=4&&J.startsWith(mn.A_.TOWERTOWN))this.it("house-exterior");else{if(J.includes(mn.A_.TOWERTOWN)&&!this.isMathTowerEnabledForPlayer(this.game,Q)){const q=Q.hasCompletedTutorial()?eP.DEFAULT_ZONE:mn.A_.HOUSE;Q.data.zone=q,J=q}if(J=st.q.instance.prodigy.skin.checkForExclusiveMap(J),this.setCurrentMap(J),this.inDeprecatedZone())X.VyI.log("Teleporting to default zone because this zone is deprecated.",X.$bb.Info),this.it(eP.DEFAULT_ZONE);else if(Q.hasCompletedTutorial()&&st.q.instance.prodigy.classModeController.isLockedZone(J))X.VyI.log("Teleporting to default zone because student is at school and this zone is locked.",X.$bb.Info),this.it(eP.DEFAULT_ZONE);else if(Nn.J.isDefined(J)&&J.indexOf("-")>0){const[q,K]=J.split("-"),z=this.zones[q];z instanceof Bn?"WR"===K||"CR"===K?this.it(J):z.exitDungeon():(kf.T.sendFestivalTravelEvent(q).catch(X.RQr.createHandler("[World] Unable to send FestivalTravel event")),this.it(J)),z instanceof XS&&"DungeonHub"!==K&&z.sendCrystalCavernsSpawnEvent()}else X.VyI.log("Teleporting to house zone because playerZone was not defined or does not have a dash.",X.$bb.Info),this.it(mn.A_.HOUSE)}}isMathTowerEnabledForPlayer(q,K){try{return st.q.instance.prodigy.gameContainer.get(yT.G.MathTower).isEnabledForPlayer(K)}catch(e){return X.VyI.log(e,X.$bb.Error),!1}}isValidLocation(q){const K=q.split("-");return this.zones[K[0]]instanceof Bn||X.Aq$.isDefined(this.zones[K[0]])&&X.Aq$.isDefined(this.zones[K[0]].maps[K[1]])}it(q,K,z,Y,Q={}){var Z,J,tt,et,it,nt,at;let rt=String(q);rt=rt.replace("tower-0","darktower-A1"),Q.assets=X.Aq$.isDefined(Q.assets)?Q.assets:[],Q.assets=Q.assets.concat(ht.c.Sfx_world);const ot=this.game.state.get(Ue.G.TileScreen);Q.timeWhenPreviousZoneLoaded=null!==(J=null===(Z=null==ot?void 0:ot.zone)||void 0===Z?void 0:Z.timeWhenZoneLoaded)&&void 0!==J?J:null,st.q.instance.prodigy.gameContainer.rebind("RespawnEnabled").toConstantValue(void 0===(null==Y?void 0:Y.battleResult));const ct=lf.J.isZoneMapDifficultyModeAgnostic(rt),dt=rt.split("-"),lt=ct?Na.i.DIFFICULTY_MODE:null!==(et=null===(tt=this.zones[dt[0]])||void 0===tt?void 0:tt.difficultyMode)&&void 0!==et?et:vi.i.Regular,ut=ct||lt===vi.i.Regular||li.R.isFeatureEnabled()&&X.Aq$.isDefined(null===(nt=null===(it=li.R.getVariables())||void 0===it?void 0:it.maps)||void 0===nt?void 0:nt[rt]);if(rt!==mn.A_.HOUSE&&ut)if(X.Aq$.isDefined(this.zones[dt[0]])&&this.isValidLocation(rt))this.getCurrentZone()!==dt[0]&&kf.T.sendFestivalTravelEvent(dt[0]).catch(X.RQr.createHandler("[World] Unable to send FestivalTravel event")),this.zones[dt[0]].teleport(dt[1],K,z,Y,Q);else{let q;switch(X.Aq$.isDefined(K)&&X.Aq$.isDefined(z)&&(q={playerPosition:{x:K,y:z}}),rt){case"dyno-A1":st.q.instance.prodigy.start(Ue.G.Museum,Q,q);break;default:this.zones.house.teleport(mn.A_.HOUSE,K,z,Y,Q)}}else this.zones.house.teleport(mn.A_.HOUSE,K,z,Y,Q);null===(at=this.mapChanged)||void 0===at||at.dispatch()}teleportToCurrentMap(){this.it(this.getCurrentMap())}playScene(q){const K=q.split("-");X.Aq$.isDefined(this.zones[K[0]])&&this.zones[K[0]].playScene(K[1])}getPreviousMap(){return this._previousMap}getCurrentMap(){return this._currentMap}setCurrentMap(q){var K;this._previousMap=null!==(K=this._currentMap)&&void 0!==K?K:"",this._currentMap=q,this._metricsManager.setLastMapLoadStarted(q)}getCurrentMapObject(){var q;const K=this._currentMap.split("-");return null===(q=this.zones[K[0]])||void 0===q?void 0:q.maps[K[1]]}isZoneSinglePlayer(q){return Z.indexOf(eP.SINGLE_PLAYER_ZONES,q)>-1}getCurrentZone(){return this._currentMap.split("-")[0]}getCurrentZoneObject(){return this.zones[this.getCurrentZone()]}getCurrentMapTag(){return this._currentMap.split("-")[1]}getCurrentCurrency(){var q;return null===(q=this.zones[this.getCurrentZone()])||void 0===q?void 0:q.currency}getZone(q){return this.zones[q]}goToZoneHub(q){this.it(this.getZoneHub(q))}getZoneHub(q){switch(q){case this.zones.forest.ID:return this.zones.forest.questHub;case this.zones.shiverchill.ID:return this.zones.shiverchill.questHub;case this.zones.skywatch.ID:return this.zones.skywatch.questHub;case this.zones.lamplight.ID:return this.zones.lamplight.questHub;case this.zones.bonfire_spire.ID:return this.zones.bonfire_spire.questHub;case this.zones.shipwreck_shore.ID:return this.zones.shipwreck_shore.questHub;default:return this.zones.house.questHub}}inZoneHub(){return this.getCurrentMap()===this.getZoneHub(this.getCurrentZone())}inDeprecatedZone(){return[...eP.DEPRECATED_ZONES,...(0,Ft.G)(gT.m).enabled?[mn.A_.DYNO]:[]].includes(this.getCurrentZone())}onStateLoaded(q){q instanceof gf.R||(this.onWorldLoadingFinished(),this.game.state.onStateLoaded.removeAll(this))}onWorldLoadingFinished(){var q;st.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(Tu.u.World,{finished_loading:!0,zone:null!==(q=this._currentMap)&&void 0!==q?q:"none"})}}eP.DEFAULT_ZONE="forest-C8",eP.TUTORIAL_MAP_STARTING_POSITION=new X.I9Y(685,385),eP.DEPRECATED_ZONES=["activity_zone","toyzone","elemental_guardian",mn.A_.EARTHTOWER,mn.A_.ICETOWER,mn.A_.CRYSTALCAVERNS],eP.SINGLE_PLAYER_ZONES=[mn.A_.TOWERTOWN];var iP=z(95925),sP=z(9591),nP=z(18741);let aP=class{get PendingTints(){return this.pendingTints}get OnImageTinted(){return this.onImageTinted}constructor(q){this.assetLoader=null,this.game=null,this.pendingTints=[],this.onImageTinted=new X.HN0,this.assetLoader=q,this.game=st.q.instance.game}tintImage(q,K,z,Y){if(this.assetLoader.assignAssetData(K,{type:"sprite"}),this.assetLoader.isLoaded(K,iP.i.Image))this.OnImageTinted.dispatch(K);else if(z.length===Y.length){if(-1===this.pendingTints.indexOf(K))if(this.pendingTints.push(K),this.assetLoader.isLoaded(q,iP.i.Image)){const Q=this.assetLoader.getAsset(q,iP.i.Image),X=new sP.w(this.game,null,Q.width,Q.height),J=st.q.instance.prodigy.create.image(0,0,q);X.draw(J),X.update(),X.processPixelRGB((q=>{const K=Z.findIndex(z,(K=>q.r===K[0]&&q.g===K[1]&&q.b===K[2]));return K>-1?Object.assign(Object.assign({},q),{r:Y[K][0],g:Y[K][1],b:Y[K][2]}):q})),X.generateTexture(K,(q=>{J.destroy(),X.clear(),nP.f.removeByCanvas(X.canvas),X.destroy(),Z.remove(this.pendingTints,(q=>q===K)),An.K.cacheAsset(this.game,K,An.K.commonAssetsCached),this.OnImageTinted.dispatch(K)}))}else X.VyI.log(`Image with source ${q} was not loaded for tinting`,X.$bb.Warning)}else X.VyI.log("Color array length must match",X.$bb.Warning)}};aP=(0,Q.Cg)([(0,dt.injectable)(),(0,Q.Qj)(0,(0,dt.inject)(X.t5G.AssetLoader)),(0,Q.Sn)("design:paramtypes",[Object])],aP);var rP=z(66572),oP=z(18344);class hP{get gameContainer(){return this.game.rootContainer}constructor(q){this.version=null,this.game=null,this.breadcrumbManager=null,this.updateCount=0,this.assets=null,this.load=null,this.audio=null,this.battle=null,this.achievements=null,this.colorReplaceController=null,this.notifications=null,this.open=null,this.prefabFactory=null,this.effects=null,this.event=null,this.dialogue=null,this.education=null,this.skin=null,this.create=null,this.icon=null,this.animation=null,this.mailNetworkHandler=null,this.friendsListNetworkHandler=null,this.titansNetworkHandler=null,this.world=null,this.dialogues=null,this.hints=null,this.previousNow=0,this.textureBelow=null,this.textureAbove=null,this.textureMenu=null,this.spinner=null,this._inputBlocker=null,this.timeManager=null,this.urlProvider=null,this.game=q,st.q.instance.prodigy=this,this.version=`${te.s.get("GameConstants.Build.VERSION")}`,this.initializeInjectionContainer(),this.postCacheInit(),this.timeManager=this.gameContainer.get("0f2-d6bd"),this.metricsManager=this.gameContainer.get("a92-c640"),this.urlProvider=this.gameContainer.get("ddf-6c82"),this.game.versioned=window.location.href.indexOf("feature")>-1||window.location.href.indexOf("release")>-1,this.game.clientVersion=this.game.versioned?"undefined":Nn.J.validateVersion(te.s.get("GameConstants.Build.VERSION"));const K=new De.W(this.game);this.gameContainer.get("ad2-c5b2").initialize(K),this.breadcrumbManager=this.gameContainer.get("fa1-8ec9"),this.breadcrumbManager.init(K.state,new Lt.C),this.assets=this.gameContainer.get("ae0-c648"),this.load=this.gameContainer.get("58f-ce01"),this.audio=new ca.R(q),this.battle=new Ma(q,this.metricsManager),this.achievements=this.gameContainer.get("8be-c32e"),this.colorReplaceController=new La.m(q),this.notifications=new vr(q),this.classModeController=new xa,this.effects=this.gameContainer.get("b9f-405f"),this.open=new hf(q),this.prefabFactory=new Cf(q),this.event=new jo(q),this.dialogue=new Uo(q),this.education=new Yo(q),this.skin=new pT(q),this.create=new Oo(q),this.icon=new eh(q),this.animation=new Ab(q),this.attacks=new we,this.mailNetworkHandler=new Rw(q),this.friendsListNetworkHandler=new Aw(q),this.titansNetworkHandler=new Fw(q),this.world=new eP(q,this.metricsManager),this.dialogues=new Te(q),this.hints=new Ae.R,this.game.broadcaster.addAppListener(gi.AU.PlayerInitialized,(()=>{this.initializeBreadcrumbs(),this.game.broadcaster.removeAppListener(gi.AU.PlayerInitialized,this)}),this,null,!0);const z=q=>{try{this.game.broadcaster.broadcast(gi.bS.POST_MESSAGE_RECEIVED,this.game,[q.origin,JSON.parse(q.data)])}catch(e){}};if(jt.pF.isNativeApp()){jt.pF.isNativeIOSApp()||jt.pF.isNativeAndroidApp()&&jt.pF.eligibleVersionForMobileMembershipPurchase()?window.addEventListener("message",z):document.addEventListener("message",z);["log","error","info","debug","warn"].forEach((q=>{console[q]=K=>{const z={logType:q,message:K},Y=JSON.stringify({type:"LOG_MESSAGE",payload:z});window.postMessage(Y,window.location.origin)}}))}else window.addEventListener("message",z);const Y=[`%c ♥ Prodigy Game v${this.version} ♥ `,"color: #FFFFFF; background: #1484a3"];console.log.apply(console,Y)}init(){X.VyI.setLogLevel(te.s.get("GameConstants.Build.FRAMEWORK_LOG_LEVEL"));const q=this.game.width,K=this.game.height;this.textureBelow=this.game.add.renderTexture(q,K),this.textureAbove=this.game.add.renderTexture(q,K),this.textureMenu=this.game.add.renderTexture(q,K),this.previousNow=this.game.time.timeMS}update(){this.updateCount++,this.game.broadcaster.broadcast(gi.AU.Update,this.game,null)}cleanup(){this.open.cleanup(),this.game.broadcaster.clear()}bindToAlias(q,K){for(const z of K)this.gameContainer.bind(q).toDynamicValue((q=>q.get(z)))}start(q,K={},z=null){if(K.target=q,K.assets=Z.get(K,"assets",[]),K.assets=K.assets.concat(this.game.state.get(q).assets),this.game.state.get(q).screenData=z,this.game.state.get(this.game.state.current)instanceof Of.f)if(this.game.state.get(this.game.state.current).fadeOut(K.fadeOut,this.game.state.get(Ue.G.Loading).startLoading.bind(this.game.state.get(Ue.G.Loading),K)),q===Ue.G.TileScreen){const q={mapName:K.title};this.metricsManager.createLoadingMetricEvent(xn.o.FunnelTileScreen,xn.o.StageLoadStart,!1,q)}else q===Ue.G.CharSelect&&this.metricsManager.createLoadingMetricEvent(xn.o.FunnelCharSelect,xn.o.StageLoadStart);else this.game.state.get(Ue.G.Loading).startLoading(K)}startCoOp(q){const K=[zt.E.getTitanSpine(q.titanAssetID),it._.Boss_titan_barrier_json,it._.Boss_titan_barrier_break_json,it._.Boss_titan_spark_json,ct.Q.Spine_academy_window_light_horizontal_json,ht.c.Sfx_bar_fill,ht.c.Sfx_results_screen,ht.c.Sfx_battle,ot.V.Bgm_victory,ot.V.Bgm_battle,...q.battleMap,ct.Q.Spine_coop_multi1_json,ct.Q.Spine_coop_single1_json,ct.Q.Spine_coop_crystal_json,zt.E.getIconForType("currency",11),"ui-shared",ct.Q.Spine_xpbar_json,ct.Q.Spine_character_shine_json,it._.General_battle_json,it._.General_core_json,it._.Font_battle_json,it._.Ui_bam_json,ht.c.Sfx_house_intro];An.K.cacheAssets(this.game,K,An.K.zoneAssetsCached),this.game.state.get(Ue.G.Loading).startLoading({assets:K,target:Ue.G.CoOp,autoStart:!1,callback:()=>{this.game.state.start(Ue.G.CoOp,!1,q)}})}startPrefabScene(q,K={}){this.game.state.start(Ue.G.PrefabScene,!0,Object.assign(Object.assign({},K),{prefabIDs:q}))}loading(q,K=!1){q?(X.Aq$.isDefined(this.spinner)&&!this.spinner[wr.k.DESTROYED]||(this.spinner=this.create.sprite(640,360,it._.General_core_json,"loading"),this.game.broadcaster.broadcast(gi.lc.AddChild,this.game,[this.spinner,Ch.E.OverlayLayer])),K&&!X.Aq$.isDefined(this._inputBlocker)&&(this._inputBlocker=this.create.emptySprite(640,360,this.game.width,this.game.height),this.game.broadcaster.broadcast(gi.lc.AddChild,this.game,[this._inputBlocker,Ch.E.OverlayLayer]),this._inputBlocker.anchor.set(.5,.5),this._inputBlocker.alpha=0,this._inputBlocker.inputEnabled=!0),this.spinner.alpha=1,this.spinner.anchor.set(.5,.5),this.game.add.tween(this.spinner,this.spinner).to({angle:360},1500,X.GS3.Linear.None,!0,0,te.s.MAX_SAFE_INTEGER,!1),this.game.add.tween(this.spinner,this.spinner).to({alpha:1},500,X.GS3.Linear.None,!0,300)):(X.Aq$.isDefined(this.spinner)&&(this.game.tweens.removeAllFromOwner(this.spinner),this.spinner.destroy(),this.spinner=null),X.Aq$.isDefined(this._inputBlocker)&&(this._inputBlocker.destroy(),this._inputBlocker=null))}initializeBreadcrumbs(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.breadcrumbManager.init(q.state,new Lt.C)}initializeInjectionContainer(){this.gameContainer.bind("d73-66e9").toConstantValue(this.game),this.gameContainer.bind(X.t5G.FrameWorkManager).toConstantValue(this.game.frameWorkManager),this.gameContainer.bind(X.$Bt.LocalizationService).to(X.Oap).asSingleton(),this.gameContainer.bind("f71-42eb").to(Je).asSingleton(),this.gameContainer.bind("e01-1fba").to(sw).asSingleton(),this.gameContainer.bind("b9f-405f").to(Fo.M).asSingleton(),this.gameContainer.bind("92f-3441").to(Ob).asSingleton(),this.gameContainer.bind("ddf-6c82").to(ve.p).asSingleton(),this.gameContainer.bind("ae0-c648").to(_e.s).asSingleton(),this.gameContainer.bind("58f-ce01").to(rP.a).asSingleton();const q=this.gameContainer.resolve(X.zL);q.init(this.gameContainer.sourceContainer),this.gameContainer.bind(X.$Bt.IFSMController).to(X.rPI).asSingleton(),this.gameContainer.bind(X.$Bt.FSMFactories).toConstantValue(q),this.gameContainer.bind(X.$Bt.FSMService).to(X.CQn).asSingleton(),this.gameContainer.bind(X.$Bt.FSMDataProvider).to(mb).asSingleton(),this.gameContainer.bind(Y.CacheExpirationStrategy).to(xt),this.gameContainer.bind(Y.CacheStorageStrategy).to(Nt),this.gameContainer.bind(Y.StoreDataProvider).to(ae).asSingleton(),this.gameContainer.get(Y.CacheExpirationStrategy).setExpiryTimeInMinutes(5),this.gameContainer.bind("aae-4f6a").to(Tb.S).asSingleton(),this.gameContainer.bind("884-efd8").to(Mt).asSingleton(),this.gameContainer.bind("0f2-d6bd").to(be.V).asSingleton(),this.gameContainer.bind("a92-c640").to(Lf.U).asSingleton(),this.gameContainer.bind("088-1d4c").to(xf).asSingleton(),this.gameContainer.bind("9e9-b33d").to(pe).asSingleton(),this.gameContainer.bind("304-25b9").to(Vw).asSingleton(),this.gameContainer.bind("094-f32c").to(yt).asSingleton(),this.gameContainer.bind(Y.DungeonDataProvider).to(Ri).asSingleton(),this.gameContainer.bind("7a9-ac2f").to(Fi.I).asSingleton(),this.gameContainer.bind("e81-40c8").to(ka.Z).asSingleton(),this.gameContainer.bind("774-4659").to(il.I).asSingleton(),this.gameContainer.bind("271-f034").to(Ko).asSingleton(),this.gameContainer.bind("800-a786").to(aw.K).asSingleton(),this.gameContainer.bind("7c9-f733").to($w.u).asSingleton(),this.gameContainer.get("7c9-f733").init(),this.gameContainer.bind("161-a31c").to(Hw.F).asSingleton(),this.gameContainer.bind("c4c-0948").to(Hs.$).asSingleton(),this.gameContainer.bind("996-2681").to(Fs).asSingleton(),this.gameContainer.bind("be3-4f64").to(js.k).asSingleton(),this.gameContainer.bind("e47-a136").to(xs.n).asSingleton(),this.gameContainer.bind("9a2-c1c3").to(Ps.R).asSingleton(),this.gameContainer.bind("f85-4354").to(fi).asSingleton(),this.gameContainer.bind("6a3-a1df").to(Qi.p).asSingleton(),this.gameContainer.bind("63c-09a2").to(oi.k).asSingleton(),this.gameContainer.bind("f67-1437").to(kt.v).asSingleton(),this.gameContainer.bind("603-49ea").to(Xi.C).asSingleton(),this.gameContainer.bind("14f-4faa").to(bw).asSingleton(),this.gameContainer.bind("0fd-d255").to(Ew).asSingleton(),this.gameContainer.bind("bac-9e8b").to(es.e).asSingleton(),this.gameContainer.bind("c5a-49f2").to(Ei.g).asSingleton(),this.gameContainer.bind("7fa-e13f").to(as.S).asSingleton(),this.gameContainer.bind("0d7-66d7").to(ss.C).asSingleton(),this.gameContainer.bind("b39-e84d").to(xw.Y).asSingleton(),this.gameContainer.bind("5d3-90c1").to(ls.n).asSingleton(),this.gameContainer.bind("f33-d276").to(Ms.k).asSingleton(),this.gameContainer.bind("1c5-a816").to(is.K).asSingleton(),this.gameContainer.bind("668-8a41").to(Bt.s).asSingleton(),this.gameContainer.bind("f03-2b73").to(Ns.q).asSingleton(),this.gameContainer.bind("b37-c775").to(Ls.n).asSingleton(),this.gameContainer.bind("476-a586").to(ks.C).asSingleton(),this.gameContainer.bind("fcb-f00b").to(qs.X).asSingleton(),this.gameContainer.bind("c91-4e66").to(on.O).asSingleton(),this.gameContainer.bind("790-c459").to(hn.V).asSingleton();const K=new X.rrh;K.parent=this.gameContainer,K.bind("c4c-0948").to(Rs).asSingleton(),K.bind("331-a8ba").toDynamicValue((()=>{const q=st.q.instance.prodigy.world.getCurrentZone(),K=$s.n[q];if(K)return this.gameContainer.get(K.injectionKey)})),Object.entries($s.n).forEach((([q,{injectionKey:z,manager:Y}])=>{K.bind(z).to(Y).asSingleton(),this.gameContainer.bind(z).toDynamicValue((()=>K.get(z))).asSingleton()})),this.bindToAlias(os._,["f85-4354","6a3-a1df","f03-2b73"]),this.gameContainer.bind("6eb-cff9").to(Za).asSingleton(),this.gameContainer.bind("3b0-2652").to(qa).asSingleton(),this.gameContainer.bind("c12-59fc").to(Ja).asSingleton(),this.gameContainer.bind("c12-59fc").to(Qa).asSingleton(),this.gameContainer.bind("c12-59fc").to(Ya).asSingleton(),this.gameContainer.bind("c12-59fc").to(tr).asSingleton(),this.gameContainer.bind("c12-59fc").to(er).asSingleton(),this.gameContainer.bind("c12-59fc").to(ir).asSingleton(),this.gameContainer.bind("6b8-7833").to(Cb),this.gameContainer.bind("6c6-6c8c").to(X.xTJ),this.gameContainer.bind("8a8-c77c").to(X.xTJ).asSingleton(),this.gameContainer.bind("9b1-43f3").to(X.xTJ).asSingleton(),this.gameContainer.bind("d7b-2375").to(gn.H).asSingleton(),this.gameContainer.bind("ad2-c5b2").to(ee.E).asSingleton(),this.gameContainer.bind("782-c308").toDynamicValue((()=>this.gameContainer.get("ad2-c5b2").player)),this.gameContainer.bind("8f9-f0fc").to(re.W).asSingleton(),this.gameContainer.bind("8d6-c0dc").toConstantValue(new Kt.C),this.gameContainer.bind("73f-58d1").to(Re.F).asSingleton(),this.gameContainer.bind("20f-5f67").to(Qe.Y).asSingleton(),this.gameContainer.bind("8be-c32e").to(ha).asSingleton(),this.gameContainer.bind("d90-622c").to(Ti).asSingleton(),this.gameContainer.bind("e4e-d193").to(Di),this.gameContainer.bind("4b8-3156").to(Ui),this.gameContainer.bind("075-0f78").to(Se.g).asSingleton(),this.gameContainer.bind("cc0-46e9").to(Ow).asSingleton(),this.gameContainer.bind("e14-9e08").to(dw).asSingleton(),this.gameContainer.bind("ed1-a499").to(fw).asSingleton(),this.gameContainer.bind("ed1-a499").to(cw).asSingleton(),this.gameContainer.bind("ed1-a499").to(uw).asSingleton(),this.gameContainer.bind("ed1-a499").to(lw).asSingleton(),this.gameContainer.bind("af7-d224").to(_t.x).asSingleton(),this.gameContainer.bind("cd7-a413").to(yb.Z).asSingleton(),this.gameContainer.bind("2f9-57ba").to(Fa).asSingleton(),this.gameContainer.bind("247-28af").to(Ha).asSingleton(),this.gameContainer.bind("ce3-6d33").to(Sb),this.gameContainer.bind(X.t5G.PrefabService).to(X.iNH).asSingleton(),this.gameContainer.bind(X.t5G.PrefabDataProvider).to(fn).asSingleton(),this.gameContainer.bind("983-05a7").toConstantValue(new X.wNP(this.gameContainer)),this.gameContainer.bind("c21-4a0a").to(Pe.S).asSingleton(),this.gameContainer.bind("11f-118a").to(gb).asSingleton(),this.gameContainer.bind("fa1-8ec9").to(Vo.F).asSingleton(),this.gameContainer.bind("b9d-2c39").toConstantValue(Ee.t),this.gameContainer.bind("429-aba2").to(X.myN).asSingleton(),this.gameContainer.bind("b0c-9016").to(ze.d).asSingleton(),this.gameContainer.bind("7ff-8385").to(ai).asSingleton(),this.gameContainer.bind("f1e-72f9").to(X.xTJ).asSingleton(),this.gameContainer.bind("e37-be30").to(We).asSingleton(),this.gameContainer.get("429-aba2").setBaseURI(this.gameContainer.get("ddf-6c82").getAPIRootUrl()),this.gameContainer.bind("577-9956").to(nw.O).asSingleton(),this.gameContainer.bind("10c-d37d").to(ii).asSingleton(),this.gameContainer.bind("d24-279f").to(rn.m).asSingleton(),this.gameContainer.bind("60d-57ca").to(Ys.u).asSingleton(),this.gameContainer.bind("bec-9045").to(Le).asSingleton(),this.gameContainer.bind("56a-cc39").to(Qs.T).asSingleton(),this.gameContainer.bind("119-35f9").to(ri.n).asSingleton(),this.gameContainer.bind("f70-f042").to(ye).asSingleton(),this.gameContainer.bind("b09-138c").to(bn.X).asSingleton(),this.gameContainer.bind("a42-fa21").to(Ws).asSingleton(),this.gameContainer.bind("29b-61c6").to(_b.b).asSingleton(),this.gameContainer.bind("e84-d543").to(us.m).asSingleton(),this.gameContainer.bind("dba-d83e").to(Mw).asSingleton(),this.gameContainer.bind(cs.Y).to(cs.F).asSingleton(),this.gameContainer.bind("e9f-b6e7").to(Jt.h).asSingleton(),kf.T.ready.then((()=>{const q=Zi.A.useRevisedDifficulty?Xt:Zt;this.gameContainer.bind("c77-8fb9").to(q).asSingleton()})),this.gameContainer.bind("271-3058").to(Gi.p).asSingleton(),this.gameContainer.bind("667-2108").to(zi.p).asSingleton(),this.gameContainer.bind("0e7-bf07").to(Ki).asSingleton(),this.bindToAlias(Yi.A,["667-2108","0e7-bf07"]),this.gameContainer.bind("920-a467").to(ts.x).asSingleton(),this.gameContainer.bind("d94-655c").to(gw.e).asSingleton(),this.gameContainer.bind("9d1-13ea").to(_w).asSingleton(),this.gameContainer.bind("78c-f116").to(pw).asSingleton(),this.gameContainer.bind("3fa-c959").to(Nw.L).asSingleton(),this.gameContainer.bind("9cf-c09f").to(ds.q).asSingleton(),this.gameContainer.bind("197-2868").to(Lw).asSingleton(),this.gameContainer.bind("9ef-4fbf").to(sn.U).asSingleton(),this.gameContainer.bind("c21-1a3f").to(en.D).asSingleton(),this.gameContainer.bind("04c-7c61").to(kw.B).asSingleton(),this.gameContainer.bind("687-0b09").to(Ks.M).asSingleton(),this.gameContainer.bind("81d-5606").to(zs.Q).asSingleton(),this.gameContainer.bind("ec3-31a0").to(Nl.E).asSingleton(),this.gameContainer.bind("cb2-bdd4").to(Cw.b).asSingleton(),this.gameContainer.bind("bec-c6b4").to(Ji.W).asSingleton(),this.gameContainer.bind("6d6-463e").to(tn.U).asSingleton(),this.gameContainer.bind("9c0-de04").to(Zs).asSingleton(),this.gameContainer.bind(Js.T).to(Js.T).asSingleton(),this.gameContainer.bind("73c-5410").to(yw.v),this.gameContainer.bind("e34-e79a").to(jw.J),this.gameContainer.bind("ed0-b675").to(Wt.o).asSingleton(),this.gameContainer.bind("2f0-c49e").to(hs.x).asSingleton(),this.gameContainer.bind("66f-d9d3").to(vw).asSingleton(),this.gameContainer.bind("ce6-75ca").to(yi).asSingleton(),this.gameContainer.bind("e05-977a").to(Uw).asSingleton(),this.gameContainer.bind("f6c-ff5c").to(qt.j).asSingleton(),this.gameContainer.bind("230-ffdb").to(dn.W).asSingleton(),this.gameContainer.bind("f37-1304").to(ln.z).asSingleton(),this.gameContainer.get("f37-1304").initListeners(),this.bindToAlias(xe.Gq,["6d6-463e","687-0b09","5d3-90c1","bec-9045","ce6-75ca","a69-7d25"]),this.gameContainer.bind("76b-641a").to(xe.zj).asSingleton(),this.gameContainer.bind("7f4-4464").toConstantValue(new Vs.w),this.gameContainer.bind("0c3-2fd0").to(Eb._).asSingleton(),this.gameContainer.bind("ec2-91c9").to(wb.J).asSingleton(),this.gameContainer.bind("959-82c1").to(Ut.W).asSingleton(),this.gameContainer.bind("d00-c550").to(nn.v).asSingleton(),this.gameContainer.bind("60b-c1b4").to(Bw.E).asSingleton(),this.gameContainer.bind("394-6aa1").to(an.z).asSingleton(),this.gameContainer.bind(rt.SpellLevelDataProvider).to(Oe).asSingleton(),this.gameContainer.bind("457-d999").to(rt.SpellLevelBonusConstants).asSingleton(),this.gameContainer.bind("4af-31c9").to(rs.Z).asSingleton(),this.gameContainer.bind("db9-b0d4").to(Ne.Z).asSingleton(),this.gameContainer.bind("f83-f754").to(Vt.Z).asSingleton(),this.gameContainer.bind("2c1-7dec").to(Me.e).asSingleton(),this.gameContainer.bind("e7b-ae21").to(cn.C).asSingleton(),this.gameContainer.bind("7d6-1068").to(Gw.j).asSingleton(),this.gameContainer.bind("5a6-6255").to(mw).asSingleton(),this.gameContainer.bind("a69-7d25").to(wi.m).asSingleton(),this.gameContainer.bind("89c-5f17").to(ww.W).asSingleton(),this.gameContainer.bind("762-6549").to($i.J).asSingleton(),jt.pF.isNativeApp()?this.gameContainer.bind("9dc-186c").to($t).asSingleton():this.gameContainer.bind("9dc-186c").to(Ht).asSingleton();try{(new ns.k).installBindings()}catch(e){X.VyI.log(e,X.$bb.Error)}}postCacheInit(){this.gameContainer.bind("2bd-9629").toConstantValue(this.game.cache),this.gameContainer.bind(X.t5G.AssetLoader).to(oP.A).asSingleton(),this.gameContainer.bind("e2b-ffaf").to(aP).asSingleton(),this.gameContainer.bind("687-8511").to(Bo).asSingleton()}}var cP=z(19850);class dP extends Lr.H{constructor(q,K,z,Y){super(q,K,z,Y),this.robot=null,this.robot=this.add(st.q.instance.prodigy.create.sprite(-100,-200,it._.Game_dancedance_json,"pose1-1",void 0,this.onTextureLoaded.bind(this))),this.setPose(-3)}onTextureLoaded(q){q&&(q.animations.add("-3",["pose2-1"],1,!0,!1),q.animations.add("-2",["poseSuccess"],1,!0,!1),q.animations.add("-1",["poseFail"],1,!0,!1),q.animations.add("0",["pose0-1","pose0-2"],1,!0,!1),q.animations.add("1",["pose1-1","pose1-2"],1,!0,!1),q.animations.add("2",["pose2-1","pose2-2"],1,!0,!1),q.animations.add("3",["pose3-1","pose3-2"],1,!0,!1),q.animations.add("4",["pose4-1","pose4-2"],1,!0,!1),q.animations.add("5",["pose5-1","pose5-2"],1,!0,!1),q.animations.add("6",["pose6-1","pose6-2"],1,!0,!1),q.animations.add("7",["pose7-1","pose7-2"],1,!0,!1),q.animations.add("8",["pose8-1","pose8-2"],1,!0,!1),q.animations.add("9",["pose9-1","pose9-2"],1,!0,!1))}setPose(q){this.robot.animations.play(`${q}`,2.15,!0),-1===q&&this.game.add.tween(this.robot,this).to({x:-105},100,X.GS3.Linear.None).to({x:-95},100,X.GS3.Linear.None).to({x:-105},100,X.GS3.Linear.None).to({x:-95},100,X.GS3.Linear.None).to({x:-105},100,X.GS3.Linear.None).to({x:-95},100,X.GS3.Linear.None).to({x:-100},100,X.GS3.Linear.None).start(),-2===q&&this.game.add.tween(this.robot,this).to({y:-230},250,X.GS3.Linear.None,!0,0,1,!0)}}class lP extends Lr.H{constructor(q,K,z,Y,Q){super(q,K),this.startCallback=null,this.instructionsCallback=null,this.cancelCallback=null,this.menu=null,this.yes=null,this.difficulty=null,this.startCallback=z,this.cancelCallback=Q,this.instructionsCallback=Y;const X=this.add(st.q.instance.prodigy.create.sprite(0,0,it._.General_core_json,"overlay-small"));X.alpha=.5,X.width=this.game.width,X.height=this.game.height;st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("key",2)>0?this.createMenu():this.giveItem()}giveItem(){const q=st.q.instance.prodigy.dialogue.create();q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_0"),face:4,anim:4}),q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_1"),face:2}),q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_2"),face:1,audio:{tag:ht.c.Voice_0,s:8,d:2}}),q.setText({callback:()=>{st.q.instance.prodigy.open.gotItem([{type:"key",ID:2,lvl:1}],(()=>{const q=st.q.instance.prodigy.dialogue.create();q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_3"),face:1}),q.setText({callback:()=>{this.createMenu()}}),q.startDeprecated("boombox")}))}}),q.startDeprecated("boombox")}createMenu(){X.Aq$.isDefined(this.menu)&&this.menu.destroy(),this.menu=st.q.instance.prodigy.create.element(this,465,220),st.q.instance.prodigy.create.panel(this.menu,0,0,7,5),st.q.instance.prodigy.create.textButton(this.menu,25,20,{size:To.MED,icon:{type:"key",ID:2},text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_START")},(()=>{this.createDifficulty()})),st.q.instance.prodigy.create.textButton(this.menu,25,100,{size:To.MED,icon:"star",text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_HOW_TO")},(()=>{this.instructionsCallback()})),st.q.instance.prodigy.create.textButton(this.menu,25,180,{size:To.MED,icon:"back",text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_CANCEL")},(()=>{this.cancelCallback()}))}createDifficulty(){const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;X.Aq$.isDefined(this.menu)&&this.menu.destroy(),this.menu=st.q.instance.prodigy.create.element(this,390,220);let z=K.backpack.getKeyItemData(2,"lvl");X.Aq$.isDefined(z)||(z=1),st.q.instance.prodigy.create.panel(this.menu,0,0,10,6),st.q.instance.prodigy.create.font(this.menu,110,20,q.getText("DANCE_DANCE_CHOOSE_DIFFICULTY"),{size:36,fontID:9}),st.q.instance.prodigy.create.font(this.menu,110,60,q.getText("DANCE_DANCE_HIGHER_LEVEL")),this.menu.add(st.q.instance.prodigy.create.sprite(10,10,zt.E.getIconForType("key",2)));for(let Y=0;Y<5;Y++){const K=90*Y+30;z>=Y+1?st.q.instance.prodigy.create.stackButton(this.menu,K,110,[{tag:"star2"},{text:`${Y+1}`,y:20,size:30}],(()=>{this.chooseDifficulty(Y+1)})):st.q.instance.prodigy.create.stackButton(this.menu,K,110,[{tag:"empty",x:15,y:15},{text:`${Y+1}`,y:20,size:30}],(()=>{st.q.instance.prodigy.open.message(q.getText("DANCE_DANCE_MESSAGE_LEVEL_BODY"),null,null,q.getText("MESSAGE_TITLE_UH_OH"))}))}st.q.instance.prodigy.create.textButton(this.menu,40,230,{size:To.SMALL,icon:"back",text:q.getText("DANCE_DANCE_BUTTON_BACK")},(()=>{this.createMenu()})),st.q.instance.prodigy.create.textButton(this.menu,260,230,{size:To.SMALL,icon:"yes",text:q.getText("DANCE_DANCE_BUTTON_GO")},(()=>{this.tryStart()})),this.yes=this.menu.add(st.q.instance.prodigy.create.sprite(0,170,it._.General_icons_json,"yes")),this.yes.width=this.yes.height=25,this.chooseDifficulty(Math.min(z,5))}chooseDifficulty(q){this.difficulty=q,this.yes.x=90*q-10}tryStart(){X.Aq$.isDefined(this.menu)&&this.menu.destroy();const q=st.q.instance.prodigy.dialogue.create();q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_READY_TO_START"),face:4,yes:this.openBoosts.bind(this,200),no:this.createMenu.bind(this),type:Ni.fA.START}),q.startDeprecated("boombox")}openBoosts(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!X.Aq$.isDefined(q)||K.getGold()>=q){if(X.Aq$.isDefined(q)){K.changeGold(-q);const z=st.q.instance.prodigy.gameContainer.get("20f-5f67");z.economy.sendMinigameEvent("dance-dance",!0);const Y={item_id:"0",item_name:"Gold",item_type:"currency",item_count:q,instance_type:Li.N.Interface,instance_id:""};z.item.sendItemRemovedEvent(0,Y.item_name,Y.item_type,Y.item_count,{sink_id:z.economy.getCurrentMinigameInstanceID(),sink_type:On.C.MiniGame,instance_type:Li.N.Interface,instance_id:""})}const z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Y=[{icon:{type:"item",ID:47},d:z.getText("BOOST_DESCRIPTION_MORE_GEARS")},{icon:{type:"fossil",ID:1},d:z.getText("BOOST_DESCRIPTION_SLOW_TIME")},{icon:"star2",d:z.getText("BOOST_DESCRIPTION_MULTIPLIER")}];st.q.instance.prodigy.open.boostSelect(Y,(q=>{this.startCallback(this.difficulty,q)}))}else{const q=st.q.instance.prodigy.dialogue.create();q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MINI_GAME_NOT_ENOUGH_GOLD"),face:3,anim:1,audio:{tag:ht.c.Voice_0,s:10,d:2}}),q.setText({callback:()=>{this.createMenu()}}),q.startDeprecated("boombox")}}}class uP extends Lr.H{constructor(q,K,z,Y,Q){super(q,K,z,Y),this.currentPose=1,this._isDancePoseShown=!0,this.onSelect=null,this.frame=null,this.sprite=null,this.currentTint=14080234,this.onSelect=Q,this.frame=this.add(st.q.instance.prodigy.create.sprite(0,0,it._.Game_dancedance_json,"pose-card")),this.frame.events.onInputDown.add(this.select.bind(this)),this.sprite=this.add(st.q.instance.prodigy.create.sprite(10,10,it._.Game_dancedance_json,"card0")),this.sprite.width=0,this.sprite.x=50,this.sprite.alpha=.9}randomPose(q,K){const z=q<3?4:3===q?6:4===q?8:10;this.currentTint=14080234;for(let Y=0;Y<100;Y++){this.currentPose=Math.floor(Math.random()*z),this.currentTint=uP.TINTS[Math.floor(Math.random()*uP.TINTS.length)];let q=!1;for(let z=0;z{this.frame.inputEnabled=!0}),this),q.start()}equals(q){return X.Aq$.isDefined(q)&&(q.currentPose===this.currentPose||q.currentTint===this.currentTint&&14080234!==q.currentTint)}select(){X.Aq$.isDefined(this.onSelect)&&(st.q.instance.prodigy.audio.playSFX(18,"pop"),this.onSelect(),this.frame.y=-15,this.sprite.y=-5)}}uP.TINTS=[14254209,9946096,8444311,16755318,15788439,13080560];class fP extends Lr.H{constructor(q,K,z,Y){super(q,K,z,Y),this.pose=null,this.bar1=null,this.bar2=null,this.callback=null,this.startTime=null,this.targetTime=null,this.pose=new uP(this.game,this,0,0),this.pose.flip(),this.bar1=this.add(st.q.instance.prodigy.create.sprite(0,34,it._.General_core_json,"overlay-light")),this.bar1.anchor.set(1,0),this.bar2=this.add(st.q.instance.prodigy.create.sprite(100,34,it._.General_core_json,"overlay-light")),this.bar1.height=this.bar2.height=30,this.bar1.width=this.bar2.width=244,this.bar1.alpha=this.bar2.alpha=.7,this.bar1.tint=this.bar2.tint=8768643}start(q,K,z){this.pose.randomPose(q,[]),this.callback=z;let Y=2.5-.35*(q-1);Y+=K,Y*=1e3,this.bar1.width=this.bar2.width=244;const Q=this.game.add.tween(this.pose,this).to({y:-10},250,X.GS3.Quadratic.Out).to({y:0},250,X.GS3.Quadratic.In);return Q.onTweenComplete.addOnce(this.beginTimer.bind(this,Y),this),Q.start(),this.pose}update(){if(super.update(),X.Aq$.isDefined(this.bar1)&&X.Aq$.isDefined(this.bar2)&&X.Aq$.isDefined(this.targetTime)){const q=(new Date).getTime();if(q>=this.targetTime)this.bar1.width=this.bar2.width=0,this.targetTime=null,this.callback();else{const K=(this.targetTime-q)/(this.targetTime-this.startTime),z=Math.floor(244*K);this.bar1.width=this.bar2.width=z}}}beginTimer(q){this.startTime=(new Date).getTime(),this.targetTime=(new Date).getTime()+q}}class bP extends Of.f{constructor(){super("The Stage",it._.Game_dancedance_json,[it._.Game_dancedance_json,ot.V.Bgm_dance1,ot.V.Bgm_dance2,ht.c.Sfx_dance_dance]),this.startedSpeed=!1,this.danceBots=[],this.menu=null,this.timer=null,this.gearBar=null,this.bonusBar=null,this.scoreText=null,this.highScoreText=null,this.multiplier=null,this.gearBonus=null,this.maxMultiplier=null,this.speedOffset=null,this.currentScore=0,this.startTime=null,this.finishTime=null,this.speedTime=null,this.timeDelay=null,this.poses=[],this.processLightEvent=null,this.difficulty=null,this.poseContainer=null,this.correctPose=null,this.correct=null,this.answerID=null,this.lights=null}create(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;st.q.instance.prodigy.audio.pauseBGM(),q.saveEnabled=!1,super.create([it._.Game_dancedance_json,ot.V.Bgm_dance1,ot.V.Bgm_dance2])}screenSetup(){super.screenSetup(),this.background.addChild(st.q.instance.prodigy.create.sprite(0,0,it._.Game_dancedance_json,"bg")),this.danceBots=[],this.danceBots.push(new dP(this.prodigyGame,this.content,260,285)),this.danceBots.push(new dP(this.prodigyGame,this.content,640,420)),this.danceBots.push(new dP(this.prodigyGame,this.content,1030,285)),this.danceBots[0].scale.x=this.danceBots[0].scale.y=.5,this.danceBots[2].scale.x=this.danceBots[2].scale.y=.5,this.danceBots[0].setPose(1),this.danceBots[2].setPose(1),this.menu=new lP(this.prodigyGame,this.content,((q,K)=>{this.startGame(q,K)}),(()=>{this.showInstructions()}),(()=>{this.returnToLamplight()}))}shutdown(){this.prodigyGame.time.events.remove(this.processLightEvent),this.danceBots=[],this.menu=null,this.timer=null,this.gearBar=null,this.bonusBar=null,this.scoreText=null,this.highScoreText=null,this.poses=[],this.processLightEvent=null,this.lights=null,super.shutdown()}showInstructions(){this.menu.visible=!1;const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),K=st.q.instance.prodigy.dialogue.create();K.setText({text:q.getText("DANCE_DANCE_INSTRUCTIONS_0"),face:0,anim:4}),K.setText({text:q.getText("DANCE_DANCE_INSTRUCTIONS_1"),face:1,anim:0}),K.setText({text:q.getText("DANCE_DANCE_INSTRUCTIONS_2"),face:2,anim:0}),K.setText({callback:()=>{this.menu.visible=!0}}),K.startDeprecated("boombox")}createUI(q){const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.timer=new fP(this.prodigyGame,this.content,590,30),this.gearBar=st.q.instance.prodigy.create.fillBar(this.content,65,415,34,250,1,(q=>{let K=50;for(let z=2;z<=q;z++)K+=Math.max(0,Math.floor(z/9*5*100));return q>=10&&(K=-1),{target:K,text:`${q}`}}),15975263,"star2",.7,!0);const z=K.backpack.getKeyItemData(2,"gears");this.gearBar.setValue(X.Aq$.isDefined(z)?z:0);const Y=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService);this.bonusBar=st.q.instance.prodigy.create.fillBar(this.content,1181,415,34,250,1,(K=>{let z=15975263,Q=Math.max(0,5*K);return K>=q&&(Q=-1),K<=1&&(z=15157320),{target:Q,color:z,text:K<=1?Y.getText("DANCE_DANCE_UH_OH"):"x"+(K-1)}}),15314234,{type:"item",ID:47},.7,!0,(q=>{this.setMultiplier(q)})),this.bonusBar.setValue(5);const Q=st.q.instance.prodigy.create.element(this.content,20,20);Q.addChild(new wr.k(st.q.instance.game,0,0,zt.E.getIconForType("item",47),null)),this.scoreText=st.q.instance.prodigy.create.font(Q,80,0,"0",{size:36,fontID:9});const Z=K.backpack.getKeyItemData(2,"score"),J=st.q.instance.prodigy.create.element(this.content,this.game.width-300-20,20);J.addChild(new wr.k(st.q.instance.game,220,0,zt.E.getIconForType("item",47),null)),this.highScoreText=st.q.instance.prodigy.create.font(J,0,0,`${X.Aq$.isDefined(Z)?Z:0}`,{size:36,fontID:9,align:"center",width:300}),st.q.instance.prodigy.create.font(J,0,40,st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_BEST_SCORE"),{size:16,width:220,align:"right"})}setMultiplier(q){q>1?st.q.instance.prodigy.audio.playSFX(11,"yay"):X.Aq$.isDefined(this.multiplier)&&this.multiplier!==q&&st.q.instance.prodigy.audio.playSFX(11,"aw"),this.multiplier=q}startGame(q,K){this.menu.visible=!1,this.gearBonus=0===K?1:0,this.speedOffset=1===K?.25:0,this.maxMultiplier=2===K?5:4,this.createUI(this.maxMultiplier),this.processLightEvent=this.prodigyGame.time.events.loop(500,this.processLights,this,[]),this.startTime=(new Date).getTime(),this.finishTime=this.startTime+7e4,this.speedTime=this.startTime+4e4,this.timeDelay=1500,this.currentScore=0,this.setDifficulty(q),st.q.instance.prodigy.audio.playBGM(6,!0),st.q.instance.prodigy.audio.playSFX(11,"ready"),st.q.instance.prodigy.effects.flashText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_READY"),(()=>{st.q.instance.prodigy.audio.playSFX(11,"go"),st.q.instance.prodigy.effects.flashText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_START")),this.nextPose()}))}endGame(q){this.timer.visible=!1;for(let K=0;K{this.finalize(q)}))}finalize(q){const K=st.q.instance.prodigy.dialogue.create(),z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(q){const q=z.backpack.getKeyItemData(2,"score");(!X.Aq$.isDefined(q)||q1?K.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_LOWER_DIFFICULTY"),face:3,audio:{tag:ht.c.Voice_0,s:10,d:2}}):K.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_TRY_AGAIN"),face:3,audio:{tag:ht.c.Voice_0,s:10,d:2}}),K.setText({callback:()=>{this.returnToLamplight()}});K.startDeprecated("boombox")}finishFill(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=q.backpack.getKeyItemData(2,"lvl"),z=this.gearBar.getLevel(),Y=st.q.instance.prodigy.dialogue.create();if(q.backpack.setKeyItemData(2,"gears",this.gearBar.getValue()),z>K){const Q=[{type:"gold",N:500*(z-K)}];q.backpack.setKeyItemData(2,"lvl",z),z<5?Y.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_LEVEL_UP_UNDER_5",z),face:4,anim:4,audio:{tag:ht.c.Voice_0,s:5,d:3}}):z<10?Y.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_LEVEL_UP_UNDER_10"),face:4,anim:4,audio:{tag:ht.c.Voice_0,s:5,d:3}}):(Y.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_LEVEL_UP_MAX"),face:4,anim:4,audio:{tag:ht.c.Voice_0,s:8,d:2}}),Q.push({type:"hat",ID:47}),Q.push({type:"outfit",ID:42})),Y.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_REWARD"),face:1}),Y.setText({callback:()=>{st.q.instance.prodigy.open.gotItem(Q,(()=>{this.returnToLamplight()}),null,"dance-dance",null,null,{source_type:On.C.MiniGame})}})}else K<10?Y.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_TRY_NEW_DIFFICULTY"),face:4}):Y.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_MAX_LEVEL"),face:4,anim:4,audio:{tag:ht.c.Voice_0,s:8,d:2}}),Y.setText({callback:()=>{this.returnToLamplight()}});Y.startDeprecated("boombox")}setDifficulty(q){this.difficulty=q,this.poseContainer=st.q.instance.prodigy.create.element(this.content,0,600);const K=q<3?3:q<5?4:5;this.poses=[];for(let z=0;z{this.pose()}));this.correctPose=q.currentPose,this.correct=Math.floor(Math.random()*this.poses.length);const K=[q];for(let z=0;z5)this.bonusBar.setValue(5);else{if(this.bonusBar.addValue(-1)<=0)return void this.endGame(!1)}const K=(new Date).getTime();K>this.finishTime?this.endGame(!0):(K>this.speedTime&&(this.startedSpeed||(this.startedSpeed=!0,this.speedOffset-=.25,st.q.instance.prodigy.effects.flashText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DANCE_DANCE_SPEED_UP")),st.q.instance.prodigy.audio.playBGM(7,!0)),this.timeDelay=Math.max(500,this.timeDelay-150)),this.prodigyGame.time.events.addTimer(this.timeDelay,this.nextPose,this))}processLights(){if(!X.Aq$.isDefined(this.lights)){this.lights=[];for(let q=0;q<3;q++)this.lights.push(this.background.addChild(st.q.instance.prodigy.create.sprite(0,0,it._.General_icons_json,"empty"))),this.lights[q].alpha=.25;this.lights[0].tint=14492708,this.lights[1].tint=15396941,this.lights[2].tint=5107440}const q=[Z.sample(bP.RED_LIGHTS),Z.sample(bP.YELLOW_LIGHTS),Z.sample(bP.BLUE_LIGHTS)];for(let K=0;K<3;K++)this.lights[K].x=q[K].x-25,this.lights[K].y=q[K].y-25}returnToLamplight(){st.q.instance.prodigy.world.it("lamplight-B4",660,400)}}bP.RED_LIGHTS=[{x:192,y:65},{x:403,y:40},{x:613,y:68},{x:791,y:83},{x:908,y:88},{x:408,y:539},{x:887,y:538}],bP.YELLOW_LIGHTS=[{x:118,y:47},{x:318,y:78},{x:376,y:164},{x:744,y:79},{x:1103,y:139},{x:1129,y:49},{x:1232,y:39},{x:305,y:474},{x:746,y:572}],bP.BLUE_LIGHTS=[{x:66,y:37},{x:338,y:119},{x:396,y:183},{x:652,y:72},{x:1039,y:97},{x:1071,y:38},{x:548,y:571},{x:984,y:476}];var pP=z(46);class vP extends Lr.H{constructor(q,K,z,Y,Q){super(q,K,440,150),this.startCallback=z,this.instructionsCallback=Y,st.q.instance.prodigy.create.panel(this,25,25,7,6),st.q.instance.prodigy.create.textButton(this,50,50,{size:To.MED,atlas:zt.E.getIconForType("key",1),singleImage:!0,text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_START")},this.tryStart.bind(this)),st.q.instance.prodigy.create.textButton(this,50,130,{size:To.MED,icon:"star",text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_HOW_TO")},this.instructions.bind(this)),st.q.instance.prodigy.create.textButton(this,50,250,{size:To.MED,icon:"back",text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_CANCEL")},Q)}tryStart(){this.visible=!1;const q=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),K=st.q.instance.prodigy.dialogue.create(),z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;gP.getNewFossils(z.backpack).length<=0?(K.setText({text:q.getText("DYNO_DIG_START_NO_MORE_FOSSILS"),face:3,yes:this.start.bind(this,200),no:()=>{this.visible=!0},type:Ni.fA.START}),K.startDeprecated("scoog")):(K.setText({text:q.getText("DYNO_DIG_READY_TO_START"),face:3,yes:this.start.bind(this,300),no:()=>{this.visible=!0},type:Ni.fA.START}),K.startDeprecated("scoog"))}start(q){this.visible=!0;const K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!X.Aq$.isDefined(q)||K.getGold()>=q){if(X.Aq$.isDefined(q)){K.changeGold(-q);const z=st.q.instance.prodigy.gameContainer.get("20f-5f67");z.economy.sendMinigameEvent("dino-dig",!0);const Y={item_id:"0",item_name:"Gold",item_type:"currency",item_count:q,instance_type:Li.N.Interface,instance_id:""};z.item.sendItemRemovedEvent(0,Y.item_name,Y.item_type,Y.item_count,{sink_id:z.economy.getCurrentMinigameInstanceID(),sink_type:On.C.MiniGame,instance_type:Li.N.Interface,instance_id:""})}this.startCallback()}else{const q=st.q.instance.prodigy.dialogue.create();q.setText({callback:()=>{this.visible=!1}}),q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MINI_GAME_NOT_ENOUGH_GOLD"),face:3}),q.setText({callback:()=>{this.visible=!0}}),q.startDeprecated("scoog")}}instructions(){X.Aq$.isDefined(this.instructionsCallback)&&this.instructionsCallback()}}class gP extends Of.f{constructor(){super("game-dino",it._.Game_dinodig_json,[it._.Game_dinodig_json,ot.V.Bgm_game,it._.Npc_sprite_scoog_json,"reduced-outfit-male-39","reduced-outfit-female-39",ht.c.Sfx_dino_dig]),this.area=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],this.digging=!1,this.walkSpeed=1,this.fossilOff=0,this.power=0,this.targetDigs=0,this.digs=0}create(){super.create();const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;st.q.instance.prodigy.audio.pauseBGM(),q.saveEnabled=!1}screenSetup(){super.screenSetup(),this.path=new pP.C(this.area),this.bg=st.q.instance.prodigy.create.sprite(0,0,it._.Game_dinodig_json,"bg"),this.bg.inputEnabled=!0,this.bg.events.onInputDown.add(this.listener,this),this.background.addChild(this.bg),this.npc=new NT(this.prodigyGame,this.content,130,640,{atlasGuid:it._.Npc_sprite_scoog_json,name:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("NPC_NAME_SCOOG")});const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.playerContainer=st.q.instance.prodigy.create.player(this.content,q,1,600,350,!1,{hideMount:!0}),this.playerContainer.setup(),this.playerContainer.hideName(),this.playerContainer.OnLoad.addOnce((()=>this.playerContainer.forceOutfit({weapon:96})));for(let Y=0;Ythis.onPathFound(q))).catch(X.RQr.createHandler("Unable to find path"))}}shutdown(){this.targetCoords=null,this.menu=null,this.item=null,this.text=null,this.playerContainer=null,this.npc=null,this.digBtn=null,this.timer=null,this.botPanel=null,this.rewards=[],this.bg=null,this.path=null,super.shutdown()}showUI(q){this.npc.visible=this.playerContainer.visible=this.timer.visible=this.botPanel.visible=q,this.menu.visible=!q}onPathFound(q){if(X.Aq$.isDefined(q)){const K=Math.floor(q[0].x/20),z=Math.floor(q[0].y/20);this.digBtn.visible=!1,1===this.area[z][K]&&this.playerContainer.setPath(q,this.askDig.bind(this,!0,K,z),this.walkSpeed)}}showInstructions(){this.showUI(!0);const q=st.q.instance.prodigy.dialogue.create();q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_0"),face:0,anim:4}),q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_1"),face:2}),q.setText({callback:this.dig.bind(this)}),q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_2"),face:0}),q.setText({callback:this.showDigButton.bind(this)}),q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_3"),face:0}),q.setText({callback:this.dig.bind(this)}),q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_4"),face:1}),q.setText({callback:this.timer.blink.bind(this.timer)}),q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_5"),face:1,anim:2}),q.setText({callback:this.showUI.bind(this,!1)}),q.startDeprecated("scoog")}showDigButton(){this.digBtn.visible=!0}showBoosts(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=gP.getNewFossils(q.backpack);this.showUI(!0);const z=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),Y=[{icon:{type:"boots",ID:7},d:z.getText("BOOST_DESCRIPTION_WALK_FASTER")},K.length>0?{icon:{type:"fossil",ID:1},d:z.getText("BOOST_DESCRIPTION_MORE_FOSSILS")}:null,{icon:{type:"key",ID:1},d:z.getText("BOOST_DESCRIPTION_DIG_FASTER")}];st.q.instance.prodigy.open.boostSelect(Y,this.startGame.bind(this))}static getNewFossils(q){const K=[],z=Ee.t.getCategoryItems("fossil"),Y=q.getBackpackItemsByType("fossil");for(let Q=0;Q0)continue;let J=Z.data.count;for(let q=0;q=this.targetDigs){st.q.instance.prodigy.audio.playSFX(18,"heart"),this.rewards.push(this.item),this.timer.setMsg(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_ITEMS_RECOVERED",this.rewards.length));const q=st.q.instance.prodigy.icon.createFromData(this.item,20*this.digX+10,20*this.digY+10,{x:0,y:0});this.uiLayer.addChild(q),q.scale.x=q.scale.y=0;const K=(this.rewards.length-1)%5*60+995,z=50*Math.floor((this.rewards.length-1)/5)+630;this.prodigyGame.add.tween(q.scale,q).to({x:1.2,y:1.2},1e3,X.GS3.Quadratic.Out).to({x:.8,y:.8},1e3,X.GS3.Quadratic.In).start(),this.prodigyGame.add.tween(q,q).to({x:K,y:z},2e3,X.GS3.Quadratic.Out).start(),this.rewards.length%3==0&&this.extendTime(),this.digging=!1,this.setNextDig()}else this.digBtn.x=this.playerContainer.x-40,this.digBtn.y=this.playerContainer.y<160?this.playerContainer.y:this.playerContainer.y-160,this.digBtn.visible=!0;else this.digging=!1}extendTime(){this.timer.addTime(15e3),this.timer.pause();const q=st.q.instance.prodigy.dialogue.create();q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_EXTEND_TIME"),face:1,anim:4,audio:fA.AUDIO[1]}),q.setText({callback:this.resumeTimer.bind(this)}),q.startDeprecated("scoog")}resumeTimer(){this.timer.resume()}endGame(){st.q.instance.prodigy.audio.playSFX(12,"bell"),st.q.instance.prodigy.audio.pauseBGM(),this.digBtn.visible=!1,this.playGame=!1,st.q.instance.prodigy.effects.flashText(st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_TIMES_UP"),this.end.bind(this)),st.q.instance.prodigy.gameContainer.get("20f-5f67").economy.sendMinigameEvent("dino-dig",!1)}end(){const q=st.q.instance.prodigy.dialogue.create();this.rewards.length>0?(q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_TIMES_UP_REWARD"),face:1,anim:2}),q.setText({callback:st.q.instance.prodigy.open.gotItem.bind(st.q.instance.prodigy.open,this.rewards,this.examineResults.bind(this),null,"dino-dig",null,null,{source_type:On.C.MiniGame})})):(q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("DYNO_DIG_TIMES_UP_TRY_AGAIN"),face:2}),q.setText({callback:this.toDino.bind(this)})),q.startDeprecated("scoog")}examineResults(){let q=!1;for(let z=0;z{var q;st.q.instance.prodigy.gameContainer.get("1c5-a816").setState(mP.zM.None),(null===(q=this._lootDashMenuData)||void 0===q?void 0:q.matchType)!==mP.B1.QuickQuiz&&st.q.instance.prodigy.world.teleportToCurrentMap()}}}var EP=z(52551),wP=z(43333);class TP extends Of.f{init(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){X.C1c.markTextureGarbageCollectionFrame();X.wa5.getActiveScene().container.parent=st.q.instance.prodigy.gameContainer,this._backgroundSprite=q,this._playerProgress=K}))}create(){super.create(),this._backgroundSprite?this.background.addChild(this._backgroundSprite):this.background.addChild((new tt.Graphics).beginFill(16755387).drawRect(0,0,this.game.width,this.game.height).endFill());let q=EP.w.getConfig(mP.B1.QuickQuiz).quickQuizConfigs.transportModalDurationMs;const K=st.q.instance.prodigy.open.prefabMenu(Pi.l.LootDashTransportModal,void 0,!0,!0,void 0,{[dr.n7.TimeRemainingMs]:q},{interfaceName:Ah.B.LootDashTransportModal,interfaceType:Si.Wm.Modal,originType:Si.$N.AutoSurfaced,instanceType:Li.N.UI},!0),z=st.q.instance.prodigy.gameContainer.get("1c5-a816");K.onPrefabLoaded.addOnce((q=>{const K=q.findComponentInChildren(wP.U);z.transportModalTimer=K,K.onTimerCompleted.addOnce((()=>{z.transportModalTimer=void 0,q.destroyDeferred(),st.q.instance.prodigy.open.lootDashMenu({immediateStart:!0,matchType:mP.B1.QuickQuiz,playerProgress:this._playerProgress})}))}))}}var SP=z(64794),AP=z(81670),CP=z(39785);class OP{static shouldRollForMagicoinBattleRewards(q,K,z){return!!q&&(!z&&!!OP.ELIGIBLE_BATTLE_TYPES.includes(K))}}OP.ELIGIBLE_BATTLE_TYPES=[Hi.gu.Basic,Hi.gu.MatchmakingDuel,Hi.gu.MatchmakingBotDuel,Hi.gu.NormalRiftRun,Hi.gu.BossRiftRun,Hi.gu.DarkTower];var IP=z(88059),DP=z(75172),RP=z(61468),PP=z(24047),MP=z(38340),NP=z(96711),xP=z(60155);class LP extends xP.V{getBattlePrefab(){return Pi.l.RevampTutorialBattleScene}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q),this._tutorialControllerComponent=this._prefabRoot.findComponentInChildren(NP.K)}))}}var kP,BP=z(63046),UP=z(95807);class FP extends UP.Z{constructor(q){super(),this._dialogue=q}enter(){Ni.rD.runDialogueSequence(this._dialogue,(()=>this.stateMachine.goToState(BP.B)))}}class GP extends UP.Z{constructor(q){super(),this._promise=q}enter(){this._promise.then((()=>this.stateMachine.goToState(BP.B))).catch((q=>{X.RQr.logError(q,"Error waiting for promise"),this.stateMachine.showThrownErrorDialog(q)}))}}!function(q){q.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1",q.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2",q.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3",q.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4"}(kP||(kP={}));const jP={[kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1]:ph.B.Voice_theo_ftue_status_effect_battle_1,[kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2]:ph.B.Voice_theo_ftue_status_effect_battle_2,[kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3]:ph.B.Voice_theo_ftue_status_effect_battle_3,[kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4]:ph.B.Voice_theo_ftue_status_effect_battle_4};var $P,HP,VP;!function(q){q[q.Initialize=0]="Initialize",q[q.HighlightSpellCardWithStatusEffect=1]="HighlightSpellCardWithStatusEffect",q[q.HighlightTarget=2]="HighlightTarget",q[q.TargetClicked=3]="TargetClicked",q[q.InvestigateStatusEffect=4]="InvestigateStatusEffect",q[q.ViewTooltip=5]="ViewTooltip",q[q.EnemyTakesSpellEffectDamage=6]="EnemyTakesSpellEffectDamage",q[q.EnemyPetFiresBack=7]="EnemyPetFiresBack",q[q.FinalDialogue=8]="FinalDialogue",q[q.End=9]="End"}($P||($P={})),function(q){q[q.Step0PositionX=260]="Step0PositionX",q[q.Step0PositionY=520]="Step0PositionY",q[q.Step1PositionX=965]="Step1PositionX",q[q.Step1PositionY=345]="Step1PositionY"}(HP||(HP={})),function(q){q[q.PositionX=720]="PositionX",q[q.PositionY=325]="PositionY",q[q.Width=360]="Width",q[q.Height=200]="Height"}(VP||(VP={}));const WP=44,qP=-48;var KP=z(5885);class zP extends xP.V{initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q),this._bossID=this.rightTeam.units.find((q=>q.type===Hi.uj.Boss||q.type===Hi.uj.Wizard)).data.asset.id}))}onVictory(q,K,z){const Y=Object.create(null,{onVictory:{get:()=>super.onVictory}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.showBossChest(),yield this.showRouletteMenu(),yield Y.onVictory.call(this,q,K,z)}))}showBossChest(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.rightTeam.units.forEach((q=>{q.creature.creatureGameObject.active=!1,q.uiContent.active=!1}));const q=yield st.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(Pi.l.BossChest,this._prefabRoot);q.legacyTransform.x=zP.BOSS_CHEST_POSITION_X,q.legacyTransform.y=zP.BOSS_CHEST_POSITION_Y,yield q.findComponentInChildren(KP.E).onOpenComplete.asPromise(),q.active=!1}))}showRouletteMenu(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=this._gameDataProvider.getItem("boss",this._bossID).data;if(!q)return X.VyI.log("Boss data not found for the roulette menu",X.$bb.Error),Promise.reject();const K=q.adventureRewards,z=new X.bnh;return st.q.instance.prodigy.open.bossRewards(K,Li.N.EndOfBattle,void 0,void 0,void 0,(()=>{z.resolve()})),z}))}}zP.BOSS_CHEST_POSITION_X=900,zP.BOSS_CHEST_POSITION_Y=390;var YP,QP=z(24652),XP=z(8394);!function(q){q.Start="Start",q.Taunt="Taunt",q.Win="Win",q.Lose="Lose"}(YP||(YP={}));var ZP=z(16495),JP=z(74958),tM=z(90614),eM=z(40671),iM=z(8693),sM=z(63761),nM=z(92611),aM=z(52855),rM=z(42430);function oM(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=new X._mx(q).addComponent(rM.o);return z.spellGUID=K,yield z.preloadAssets(),z}))}function hM(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){var Y,X,Z;const J=K.data,tt=null!==(X=null===(Y=K.creature)||void 0===Y?void 0:Y.teleportType)&&void 0!==X?X:sM.H0.Astral,et=K.controllerUnit,it=K.scale;return K.creature instanceof nM.N&&(null===(Z=K.creature.followContainer)||void 0===Z||Z.destroy()),K.setData(Object.assign(Object.assign({teamId:q.id,element:rt.EElementType.Shadow,level:1,stats:{[rt.EStat.Hp]:1,[rt.EStat.Mp]:1,[rt.EStat.Power]:1,[rt.EStat.Defence]:1,[rt.EStat.Speed]:1,[rt.EStat.Accuracy]:1,[rt.EStat.Dodge]:1,[rt.EStat.CritChance]:1,[rt.EStat.Initiative]:5},spells:[],health:{current:1,max:1},mp:{current:1,max:1},catchChance:0,unitId:z},J),{type:Hi.uj.Object,asset:{type:"spine",id:z}}),sM.H0.Shadow,et,.5),yield K.loadPromise,()=>(0,Q.sH)(this,void 0,void 0,(function*(){K.setData(J,tt,et,it),yield K.loadPromise,K.creature instanceof nM.N&&K.creature.followContainer&&(K.creature.followContainer.alpha=0)}))}))}function cM(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){return X.Aq$.isDefined(K.creature.castSpellSfx)?st.q.instance.prodigy.audio.playSFXFromGUID(K.creature.castSpellSfx):st.q.instance.prodigy.audio.playSFX(8,iM.J.Cast),yield q.begin({caster:{unitId:K.battleId,gameObject:K.creature.creatureGameObject,statusEffectContainer:K.statusEffectContainer},targets:[{unitId:z.battleId,gameObject:z.creature.creatureGameObject,statusEffectContainer:z.statusEffectContainer}],manager:q,multiHit:1}),new Promise((q=>{aM.a.createHitInfoText(z,Y,void 0,q)}))}))}var dM,lM=z(24227);!function(q){q.Neutral="Neutral",q.Shocked="Shocked",q.Sad="Sad"}(dM||(dM={}));const uM={[QP.ts.AstralDragon]:0,[QP.ts.FireDragon]:20,[QP.ts.IceDragon]:0,[QP.ts.IceWyrm]:0,[QP.ts.PhysicalDragon]:14,[QP.ts.ShadowDragon]:0};class fM{static make(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=new fM;K._bossType=q;const z=st.q.instance.prodigy.gameContainer.get(X.t5G.AssetLoader);K._barkData=yield z.loadSingleAsset(Yt.r.BossBarks_json,iP.i.JSON);const Y=st.q.instance.prodigy.gameContainer.get("687-0b09").getRiftsEntityPortalEntryData();for(let Q=Object.keys(K._phaseUnlockConditions).length;Q>0;Q--)if(K._phaseUnlockConditions[Q](null==Y?void 0:Y.metaProgress.bossDefeats[q])){K._phase=Q;break}return K}))}constructor(){this._phase=0,this._phaseUnlockConditions={1:q=>!X.Aq$.isDefined(q),2:q=>0===q,3:q=>q>0&&q<15,4:q=>q>=15&&q<50,5:q=>q>=50}}advanceBark(q){var K,z,Y,Q,X,Z;const J=null!==(K=(Z=this._activePlayer.data).rifts)&&void 0!==K?K:Z.rifts={};null!==(z=J.bossBarkProgress)&&void 0!==z||(J.bossBarkProgress={});let tt=J.bossBarkProgress[this._bossType];tt||(this.initializeBarkProgress(this._bossType,this._phase),tt=J.bossBarkProgress[this._bossType]);const et=null===(Q=null===(Y=this._barkData[this._bossType])||void 0===Y?void 0:Y[this._phase])||void 0===Q?void 0:Q[q];if(!(null==et?void 0:et.length))return;tt.index[q]=(tt.index[q]+1)%et.length,this._activePlayer.updated=!0;const st=et[tt.index[q]];let nt=st.filename?ph.B[vn.$.capitalizeFirstLetter(st.filename)]:"";nt||(nt=st.filename?ph.B[st.filename]:"");const at=this._baseLocalizer.getText(st.dialogueLocalizationKey);return at?{dialogueData:{nameKey:`NPC_NAME_DRAGON_${lM.j.getBossElementFromBossType(this._bossType).toUpperCase()}`,text:at,avatar:{atlas:it._[`Npc_face_${this._bossType.toLowerCase()}_json`],frameName:fM.FACE_FRAME[st.portrait],offsetY:null!==(X=uM[this._bossType])&&void 0!==X?X:0},audio:{tag:null!=nt?nt:""}},blockInput:!0}:void 0}initializeBarkProgress(q,K){var z,Y,Q,X,Z,J;const tt=null===(z=this._barkData[q])||void 0===z?void 0:z[K];if(!tt)return;const et=null!==(Y=(Z=this._activePlayer.data).rifts)&&void 0!==Y?Y:Z.rifts={};null!==(Q=et.bossBarkProgress)&&void 0!==Q||(et.bossBarkProgress={}),null!==(X=(J=et.bossBarkProgress)[q])&&void 0!==X||(J[q]={index:Object.entries(tt).reduce(((q,[K,z])=>(q[K]=Mn.o.integerInRange(0,z.length),q)),{})}),this._activePlayer.updated=!0}}fM.FACE_FRAME={[dM.Neutral]:"face_0",[dM.Shocked]:"face_1",[dM.Sad]:"face_2"},(0,Q.Cg)([(0,Ge.b)("782-c308"),(0,Q.Sn)("design:type",De.W)],fM.prototype,"_activePlayer",void 0),(0,Q.Cg)([(0,Ge.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],fM.prototype,"_baseLocalizer",void 0);var bM,pM,vM,gM,mM,yM=z(1551),_M=z(68836),EM=z(13302),wM=z(64019);!function(q){q.MovingBackground="movingBackground",q.MovingMidground1="movingMidground1",q.MovingMidground2="movingMidground2",q.MovingRocksBackground="movingRocksBackground",q.MovingRocksMidground="movingRocksMidground",q.MovingMountainsBackground="movingMountainsBackground",q.MovingMountainsMidground="movingMountainsMidground",q.MovingTallMountainsMidground="movingTallMountainsMidground",q.MovingCloudsForeground="movingCloudsForeground"}(bM||(bM={})),function(q){q[q.NotStarted=0]="NotStarted",q[q.PlayedAttack=1]="PlayedAttack",q[q.AddedAffix=2]="AddedAffix",q[q.Finished=3]="Finished"}(pM||(pM={}));class TM extends xP.V{getAssetList(){return[...this._baseAssets,it._.Rift_run_shadow_dragon_battle_map_1_json,it._.Rift_run_shadow_dragon_battle_map_2_json,it._.Rift_run_shadow_dragon_battle_map_3_json,ph.B.Sfx_dragonisle_dragon_defeat]}constructor(q){var K;super(q),this._firstBossDefeatedCutsceneFinished=new X.bnh,this._fakeWeightDividend=5,this._firstBossRiftCutscene=null,this._bossType=QP.ts.PhysicalDragon,this._hasTauntPlayedThisRound=!0,this._roundShieldAttackAnimationStep=pM.NotStarted,this._useParallaxBackground=!0,this._riftsDataProvider=st.q.instance.prodigy.gameContainer.get("81d-5606");const z=null===(K=this._riftsDataProvider.riftsTierTotalData)||void 0===K?void 0:K[_M.T.riftTier];(null==z?void 0:z.type)===QP.cn.Boss&&(this._bossType=z.bossType),this._localConfig.backgroundID.length>0?this._useParallaxBackground=!1:this._objectPool=new X.iyL(this.createMovingBackgroundObject.bind(this))}getUnitDataForTeam(q,K){const z=super.getUnitDataForTeam(q,K);if(this._useParallaxBackground&&K===rt.ETeamId.Home)for(const Q of z)Q.scale=.5;const Y=z.find((q=>q.unitId===TM.BOSS_BATTLE_ID));return Y&&(Y.unitSlot=5),z}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){var z;const Y=st.q.instance.prodigy,Z=Y.gameContainer.get(X.t5G.AssetLoader),tt=yield Z.loadSingleAsset(Yt.r.ShadowBattleBackgroundConfig_json,iP.i.JSON);this._useParallaxBackground&&(this._movingLandscapesData=tt.movingLandscapes,this._randomMovingBackgroundData=tt.movingObjects,this._playerPlatformAssets=tt.playerPlatforms,this._objectPool.allocate(this._randomMovingBackgroundData.map((q=>q.maxObjects)).reduce(((q,K)=>q+K))));const et=K.initBattlePrefab.call(this,q);yield et,this._boss=this.rightTeam.units.find((q=>q.type===Hi.uj.Boss)),this.leftTeam.units.forEach((q=>{this._useParallaxBackground&&q.GameObject.transform.setPosition(q.GameObject.transform.localPosition.x-100,q.GameObject.transform.localPosition.y-35),q.setupUnitTooltip()})),this.configureBossUnit(this._boss),this._barkManager=yield fM.make(this._bossType),this.setUnitTooltipLock(!0),this._firstBossRiftCutscene=yield function(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){if(z!==QP.ts.PhysicalDragon||Y!==rA.ni.Portal1||st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_RIFTS,En.B.BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN))return()=>(0,Q.sH)(this,void 0,void 0,(function*(){return{shouldLeftTeamTeleportIn:!1}}));const Z=new X._mx(q.mapRoot);let tt,et,it,nt,at;Z.layer="content",Z.addComponent(X.dLy);const ot=[()=>(0,Q.sH)(this,void 0,void 0,(function*(){return Z.destroyDeferred()}))];try{et=q.leftTeam.wizard,tt=J().chain(q.leftTeam.rawUnits).filter((q=>q!==et)).maxBy((q=>q.GameObject.transform.worldPosition.y)).value(),yield Promise.all([q.addUnitPlatform(tt,2),hM(q.leftTeam,et,ct.Q.Spine_npc_puppetmaster_json).then(ot.push.bind(ot)),hM(q.leftTeam,tt,ct.Q.Spine_npc_pippet_json).then(ot.push.bind(ot))]),[at,it,nt]=yield Promise.all([oM(Z,eM.z.Spell_shadow_shadowshock_single_spell),oM(Z,eM.z.Spell_physical_slash_single_spell),oM(Z,eM.z.Spell_physical_pierce_giant_spell)])}catch(ht){X.RQr.logError(ht,"Failed to create First Dragon Rift cutscene"),yield Promise.all(ot.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q()})))))}return()=>(0,Q.sH)(this,void 0,void 0,(function*(){try{yield Promise.all([K.enterBattle(!1,!1),et.enterBattle(!0,!1),tt.enterBattle(!0,!1)]),yield(0,Sc.v$)([1647,1648,1649]),yield Promise.all([(0,ZP.ib)(tt.creature.animator,["attack","idle"],!0),cM(at,tt,K,{damage:.001,damageInformation:rt.EDamageInformation.Ineffective})]),yield(0,Sc.v$)([1650]),yield cM(it,K,tt,{damage:9999,damageInformation:rt.EDamageInformation.CriticalHit}),yield tt.playDefeated(),yield(0,Sc.v$)([1651]),K.creature.animator.playAnimation("taunt",!0),yield(0,Sc.v$)([1652]);const q=et.playDefeated();yield(0,Sc.uk)(st.q.instance.game,500),yield cM(nt,K,et,{damage:0,damageInformation:rt.EDamageInformation.Missed}),yield q}catch(ht){X.RQr.logError(ht,"Failed playing the First Dragon Rift cutscene")}finally{yield Promise.all(ot.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q()})))))}return st.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_RIFTS,En.B.BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN),{shouldLeftTeamTeleportIn:!0}}))}))}(this,this._boss,this._bossType,null!==(z=this._riftsDataProvider.selectedPortalId)&&void 0!==z?z:rA.ni.Portal1),this._skipVictoryBark=this._bossType===QP.ts.PhysicalDragon&&this._riftsDataProvider.selectedPortalId===rA.ni.Portal1&&!Y.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_RIFTS,En.B.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS),this._boss.creature.defeated=()=>(0,Q.sH)(this,void 0,void 0,(function*(){}))}))}processBattleStateUpdates(q){for(const K of q)K.type===rt.EBattleStateUpdate.CustomEvent&&K.name===rA.wJ.RewardDetermined&&(_M.T.reward=K.data.reward);return q}configureBossUnit(q){q.GameObject.transform.setPositionY(-100),this._useParallaxBackground?(this._boss.size=EM.X.Huge,q.targetComponent.GameObject.parent.transform.setPositionY(200),q.uiContent.transform.setPosition(-25,50),q.turnIndicatorOffset={x:0,y:200}):(this._boss.size=EM.X.Medium,q.GameObject.transform.setPositionX(-100)),this._boss.targetComponent.configureTarget()}setupBattleBackgrounds(){const q=Object.create(null,{setupBattleBackgrounds:{get:()=>super.setupBattleBackgrounds}});return(0,Q.sH)(this,void 0,void 0,(function*(){return this._useParallaxBackground?(this._movingLandscapesData.forEach((q=>{const K=q.pixelSpeed?{MOVE_DURATION:this.calculateDuration(0,TM.MOVING_BACKGROUND_IMAGE_WIDTH,q.pixelSpeed),MOVE_X:TM.MOVING_BACKGROUND_IMAGE_WIDTH,ADJACENT_BACKGROUND_IMAGE:[q.atlas,q.frames[0]],ADJACENT_BACKGROUND_POSITION:[-TM.MOVING_BACKGROUND_IMAGE_WIDTH,0]}:{},z=!!q.pixelSpeed;cr.d.loadWithInjectedValuesFromGUID(this._prefabLoader,Pi.l.RepeatingUnidirectionalBackground,Object.assign(Object.assign({},K),{BACKGROUND_IMAGE:[q.atlas,q.frames[0]],BACKGROUND_POSITION:[gf.R.BG_HALF_WIDTH+q.initialPosition[0].x,gf.R.BG_HALF_HEIGHT+q.initialPosition[0].y],BACKGROUND_LAYER:[q.layer,q.depth,z]}),this._prefabRoot)})),Promise.all([...this.leftTeam.units.map(this.addUnitPlatform.bind(this)),...this._randomMovingBackgroundData.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){for(let K=0;KK.layer===q.layer)).length;q.randomizeAsset?yield it.setAsset(q.atlas,q.frames[Mn.o.integerInRange(0,q.frames.length)]):et.hasMoved||q.maxObjects!==q.frames.length||(yield it.setAsset(q.atlas,q.frames[st])),et.onComplete.addOnce((()=>{tt.active=!1,this.configureMovingBackgroundObject(q).catch(X.RQr.createHandler("Failed to configure moving background object"))}));const nt=et.hasMoved?null:null===(K=q.initialPosition)||void 0===K?void 0:K[st],at=1e3*Mn.o.integerInRange(null!==(Y=null===(z=q.delay)||void 0===z?void 0:z.min)&&void 0!==Y?Y:0,null!==(Z=null===(Q=q.delay)||void 0===Q?void 0:Q.max)&&void 0!==Z?Z:0),rt={x:q.scale?-it.getWidth()*q.scale:-it.getWidth(),y:q.yRange?gf.R.BG_HALF_HEIGHT+Mn.o.integerInRange(q.yRange.min,q.yRange.max):tt.transform.localPosition.y};nt&&(rt.x=gf.R.BG_HALF_WIDTH+nt.x,rt.y=gf.R.BG_HALF_HEIGHT+nt.y),cr.d.updateInjectedValues(tt,{MOVING_IMAGE_SET_POSITION:[rt.x,rt.y],MOVING_IMAGE_SET_TARGET:[gf.R.BG_WIDTH,rt.y],MOVING_IMAGE_SET_DURATION:this.calculateDuration(rt.x,gf.R.BG_WIDTH,q.pixelSpeed),MOVING_IMAGE_SET_DELAY:et.hasMoved||!nt?at:0,MOVING_IMAGE_ADD_LAYER:[q.layer,q.depth,!0],MOVING_IMAGE_SET_LAYER:[q.layer,!0],MOVING_IMAGE_SET_SCALE:null!==(J=q.scale)&&void 0!==J?J:1}),et.startTween()}))}addUnitPlatform(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z="BossRiftDynamicallyCreatedBackground";if(q.GameObject.children.some((q=>q.name===z)))return;const Y=new X._mx(q.GameObject);Y.name=z,Y.setLayer("background"),Y.sendToBack();const Q=Y.addComponent(X.XVE),Z=Y.addComponent(Po._);yield Z.setAsset(this._playerPlatformAssets.atlas,this._playerPlatformAssets.assetNames[K]),Z.sizeToSourceImage(),Q.setPositionY(20)}))}calculateDuration(q,K,z){return Math.abs(q-K)/(z/1e3)}onStartBattle(){const q=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,Q.sH)(this,arguments,void 0,(function*(K=!0){var z;const Y=yield null===(z=this._firstBossRiftCutscene)||void 0===z?void 0:z.call(this);Y.shouldLeftTeamTeleportIn&&(this.leftTeam.teleportInBehaviour=wM.pV.NonWizardUnits),yield this.leftTeam.units.find((q=>(null==q?void 0:q.type)===Hi.uj.Wizard)).enterBattle(Y.shouldLeftTeamTeleportIn,!1),yield this.rightTeam.units.find((q=>(null==q?void 0:q.type)===Hi.uj.Boss)).enterBattle(!1,!1);const Q=this._barkManager.advanceBark(YP.Start);Q&&(yield X.Egh.timeout(1e3),yield Sc.v$([Q])),this._modifierGridPrefab=yield yM.Q.addModifierGridPrefab(yM.Q.MODIFIER_GRID_X_IN_BATTLE,yM.Q.MODIFIER_GRID_Y_IN_BATTLE),this.setUnitTooltipLock(!1),yield q.onStartBattle.call(this,K)}))}onEndGame(q){const K=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._modifierGridPrefab.destroy(),this._modifierGridPrefab=null,q){if(!this._skipVictoryBark){const q=this._barkManager.advanceBark(YP.Win);q&&(yield Sc.v$([q]))}yield Promise.all([this._boss.fadeUi(0),(()=>(0,Q.sH)(this,void 0,void 0,(function*(){this._boss.creature.animator.playAnimation("defeat",!1),st.q.instance.prodigy.audio.playSFXFromGUID(ph.B.Sfx_dragonisle_dragon_defeat),yield this._boss.creature.animator.OnAnimationComplete.asPromise()})))()])}else{const q=this._barkManager.advanceBark(YP.Lose);q&&(yield Sc.v$([q]))}yield K.onEndGame.call(this,q)}))}onDefeat(){const q=Object.create(null,{onDefeat:{get:()=>super.onDefeat}});return(0,Q.sH)(this,void 0,void 0,(function*(){return q.onDefeat.call(this,!0)}))}showSpellCards(q,K=!0){if(super.showSpellCards(q,K),this._useParallaxBackground){const q=this.spellCardsController.targetController.battleTargets.find((q=>q.isMultiTarget&&q.teamId===rt.ETeamId.Home));q&&q.groundTarget.transform.setPosition(-50,-35)}}getStateOverride(q){var K;if(this._roundShieldAttackAnimationStep===pM.AddedAffix){if(!q||q.type!==rt.EBattleStateUpdate.AddAffix||q.affix.type!==rt.EAffixType.Shield||q.affix.unitId!==TM.BOSS_BATTLE_ID)return++this._roundShieldAttackAnimationStep,[GP,X.Egh.timeout(1e3)]}switch(null==q?void 0:q.type){case rt.EBattleStateUpdate.NewRound:1!==q.round&&(this._hasTauntPlayedThisRound=!1,this._roundShieldAttackAnimationStep=pM.NotStarted);break;case rt.EBattleStateUpdate.CastSpell:if(!this._hasTauntPlayedThisRound&&(null===(K=this._activeUnit)||void 0===K?void 0:K.creature.isOpponent)){this._hasTauntPlayedThisRound=!0;const q=this._barkManager.advanceBark(YP.Taunt);if(q)return(0,ZP.ib)(this._boss.creature.animator,["taunt","idle"],!0).catch(X.RQr.createHandler("BossRiftBattleController: Failed to play boss taunt animation")),[FP,[q]]}break;case rt.EBattleStateUpdate.EndBattle:const z=st.q.instance.prodigy.gameContainer.get("81d-5606");if(this._boss.isDefeated()&&this._bossType===QP.ts.PhysicalDragon&&z.selectedPortalId===rA.ni.Portal1&&!st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_RIFTS,En.B.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS))return this.playFirstPhysicalDragonDefeatedCutscene().catch(X.RQr.createHandler("BossRiftBattleController: Error showing first boss defeat sequence")),[GP,this._firstBossDefeatedCutsceneFinished];break;case rt.EBattleStateUpdate.AddAffix:switch(this._roundShieldAttackAnimationStep){case pM.NotStarted:const K=q.affix;if(K.type===rt.EAffixType.Shield&&K.unitId===TM.BOSS_BATTLE_ID)return++this._roundShieldAttackAnimationStep,this._boss.creature.attack(),[GP,X.Egh.timeout(1e3)];break;case pM.PlayedAttack:++this._roundShieldAttackAnimationStep}}return super.getStateOverride(q)}showBattleResult(q,K,z,Y){const Z=Object.create(null,{showBattleResult:{get:()=>super.showBattleResult}});return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z,Y,Q=!0){var tt,et,it,nt;if(!Q)return;let at=null!==(et=null===(tt=st.q.instance.prodigy.gameContainer.get("81d-5606").riftsTierTotalData)||void 0===tt?void 0:tt[_M.T.riftTier].rewards)&&void 0!==et?et:[];const rt=st.q.instance.prodigy.gameContainer.get("782-c308");at.forEach((q=>{if(!rA._u.includes(q.type)&&rt.getItemCount(q.type,q.id)>0){const K=at.filter((K=>!rA._u.includes(K.type)&&K!==q));for(const z of K)z.weight+=Math.ceil(q.weight/K.length);at=at.filter((K=>K!==q))}}));const ot=at.reduce(((q,K)=>q+K.weight),0),ht=wT.L.visuallyAdjustDragonRouletteRewards(at),ct=[],dt=_M.T.reward;if(dt){const q=null===(it=Ee.t.getItem(dt.type,dt.id))||void 0===it?void 0:it.data;if(ct.push({type:dt.type,ID:dt.id,N:dt.quantity,data:{name:q?Nn.J.getLocalizationNameKey(dt):"",flavorText:q?Nn.J.getLocalizationFlavorKey(dt):"",rarity:null!==(nt=null==q?void 0:q.rarity)&&void 0!==nt?nt:0}}),"petHat"!==dt.type&&"petRelic"!==dt.type||st.q.instance.prodigy.gameContainer.get("9cf-c09f").refreshPetGear().catch(X.RQr.createHandler("RiftRunBattleController: Failed to refresh pet gear after being awarded it after a rift run")),J().find(ht,(q=>q.id===dt.id&&q.type===dt.type&&q.quantity===dt.quantity))||ht.push({type:dt.type,ID:dt.id,N:dt.quantity,R:ot/this._fakeWeightDividend}),(0,XP.p)(dt.type,dt.id)){st.q.instance.prodigy.gameContainer.get("20f-5f67").postBattleFlow.itemTransaction.setIndividualData(dt.type,dt.id,{instance_type:Li.N.BossRift,source_type:On.C.PrizeWheel})}}yield new Promise((q=>{st.q.instance.prodigy.open.bossRewards([],Li.N.BossRift,Pi.l.BossRewardUIwithnorespin,ct,ht,q,!0,!dt||!(0,XP.p)(dt.type,dt.id))})),yield Z.showBattleResult.call(this,q,K,z,Y,Q)}))}playFirstPhysicalDragonDefeatedCutscene(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield(0,Sc.v$)([1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1645]);const q=st.q.instance.prodigy;q.gameContainer.get("20f-5f67").rifts.sendRiftsFunnelAdvancedEvent(JP.fk.RiftsCompleteBossRift),q.breadcrumbManager.completeBreadcrumb(En.B.FEATURE_RIFTS,En.B.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS),this._firstBossDefeatedCutsceneFinished.resolve()}))}}TM.BOSS_BATTLE_ID="boss",TM.MOVING_BACKGROUND_IMAGE_WIDTH=1440,function(q){q.Visible="up",q.Hidden="down",q.Stunned="stun",q.Taunt="taunt"}(vM||(vM={})),function(q){q.Start="start",q.Element1="element1",q.Element2="element2",q.Element3="element3",q.Stunned="stun"}(gM||(gM={})),function(q){q.Idle="idle",q.Death="death",q.CrystalMound="crystalMound",q.ChangeOut="changeOut",q.ChangeIn="changeIn",q.Reveal="reveal"}(mM||(mM={}));class SM extends zP{constructor(){super(...arguments),this._golemState=gM.Start,this._stateOverrideStep=0}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q),this._golem=this.rightTeam.units.find((q=>q.type===Hi.uj.Boss)),this._golem.creature.teleportType=sM.H0.None,this._golem.creature.shouldFadeOnDefeat=!1,this._golem.onDefeatAnimationFinished.add((()=>{this._golemState!==gM.Stunned&&this._golemAnimator.playAnimation(mM.Death,!1)}));const z=new X._mx(this._golem.GameObject);z.active=!1,z.addComponent(X.dLy).setPosition(SM.FLASH_OFFSET.x,SM.FLASH_OFFSET.y),this._flashSpine=z.addComponent(ea.v),this._flashSpine.setAsset(ct.Q.Spine_flash_json)}))}getStateOverride(q){var K;switch(null!==(K=this._golemAnimator)&&void 0!==K||(this._golemAnimator=this._golem.creature.animator),null==q?void 0:q.type){case rt.EBattleStateUpdate.CustomEvent:switch(this._golemState=q.name,q.name){case gM.Element1:if(0==this._stateOverrideStep++)return[GP,this.switchElement(q.data,!0)];break;case gM.Stunned:if(0==this._stateOverrideStep++)return this._golemAnimator.OnAnimationComplete.removeAll(),this._golemAnimator.spine.addAnimationRemap(mM.Idle,mM.CrystalMound),[GP,(0,ZP.ib)(this._golemAnimator,[mM.Death,mM.CrystalMound],!0)];break;case gM.Start:if(0==this._stateOverrideStep++)return this._golemAnimator.spine.addAnimationRemap(mM.Idle,mM.Idle),[GP,this.switchElement(rt.EElementType.Shadow,!1)]}break;case rt.EBattleStateUpdate.EndBattle:if(0==this._stateOverrideStep++&&this._golemState!==gM.Stunned)return[GP,Promise.race([this._golemAnimator.OnAnimationComplete.asPromise(),X.Egh.timeout(3e3)])]}return this._stateOverrideStep=0,super.getStateOverride(q)}switchElement(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.changeOut(K),yield Promise.all([new Promise((K=>{this._golemAnimator.spine.setAsset(SM.BOSS_ELEMENT_ASSETS[q],K)})),X.Egh.timeout(500)]),this._golem.element=q,yield this.changeIn(K)}))}changeOut(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=[];q&&(this._golemAnimator.playAnimation(mM.ChangeOut,!1),K.push(this._golemAnimator.OnAnimationComplete.asPromise())),this._flashSpine.GameObject.layer=Ch.E.ForegroundLayer,this._flashSpine.setAnimationByName(0,mM.ChangeOut,!1),this._flashSpine.GameObject.active=!0,K.push(this._flashSpine.getSpine().onComplete.asPromise()),yield Promise.all(K)}))}changeIn(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this._flashSpine.setAnimationByName(0,mM.ChangeIn,!1),this._flashSpine.getSpine().onComplete.addOnce((()=>{this._flashSpine.GameObject.active=!1})),yield(0,ZP.ib)(this._golemAnimator,[q?mM.ChangeIn:mM.Reveal,mM.Idle],!0)}))}}SM.FLASH_OFFSET={x:0,y:-150},SM.BOSS_ELEMENT_ASSETS={[rt.EElementType.Shadow]:ct.Q.Default_boss_18_json,[rt.EElementType.Fire]:ct.Q.Fire_boss_18_json,[rt.EElementType.Water]:ct.Q.Water_boss_18_json,[rt.EElementType.Plant]:ct.Q.Plant_boss_18_json,[rt.EElementType.Ice]:ct.Q.Ice_boss_18_json,[rt.EElementType.Storm]:ct.Q.Storm_boss_18_json};var AM,CM,OM=z(34234);class IM extends xP.V{requestBattleStart(q){const K=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,Q.sH)(this,void 0,void 0,(function*(){var z;const Y=yield K.requestBattleStart.call(this,q);if(q.currentFloor===IM.MIRROR_BATTLE_FLOOR){const q=Object.values(Y.state.units).find((q=>q.teamId===rt.ETeamId.Away&&q.type===Hi.uj.Wizard));if(null===(z=null==q?void 0:q.appearance)||void 0===z?void 0:z.name){const K=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),z=q.appearance.name;q.appearance.name=K.getText(IM.MIRROR_WIZARD_KEY,dc.f.getFullNameByID(null,z.middle,z.last))}}return Y}))}}IM.MIRROR_WIZARD_KEY="NPC_NAME_DARK_TOWER_MIRROR_WIZARD",IM.MIRROR_BATTLE_FLOOR=90,IM.ROULETTE_STAR_BONUS_INDEX=9,IM.ROULETTE_STAR_BONUS_MULTIPLIER_VALUE=2,(0,Q.Cg)([(0,OM.d)("RemoteConfig"),(0,Q.Sn)("design:type",Object)],IM.prototype,"_remoteConfig",void 0),function(q){q.InitialBattleState="initialState",q.StateUpdate="update",q.GuestValidated="guestValidated"}(AM||(AM={})),function(q){q.NextUnits="nextUnits",q.Thinking="thinking",q.ShowElementBoost="showElementBoost"}(CM||(CM={}));var DM=z(14335),RM=z(52516),PM=z(27488),MM=z(58203);let NM=class extends MM.m{joinDuel(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z={host:q,guestRoomId:K};yield this.makeCloudscriptRequest(ie.D.Battle.Duel.Join,z)}))}sendWaitPing(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(ie.D.Battle.Duel.WaitPing,{battleId:q},!1)}))}onOpponentDisconnect(q){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(ie.D.Battle.Duel.OpponentDisconnect,{battleId:q},!0)}))}};NM=(0,Q.Cg)([(0,dt.injectable)()],NM);class xM extends UP.Z{enter(){this._waitForUpdatePromise=this.waitForUpdate().catch((q=>{this._waitForUpdatePromise.cancel(),X.RQr.logError(q,"Error waiting for state updates"),this.stateMachine.showThrownErrorDialog(q)}))}exit(){var q;null===(q=this._waitForUpdatePromise)||void 0===q||q.cancel()}waitForUpdate(){const q=new X.kBN(((K,z)=>{(()=>(0,Q.sH)(this,void 0,void 0,(function*(){const K=this.battleController.activeUnit;(null==K?void 0:K.data.mp.current)>0?K.showOpponentWaitingMessage("DUEL_WAIT_CHOOSING_SPELL"):this.hasUpdate(rt.EBattleStateUpdate.ModifyMp)||this.battleController.textLog.showPinnedMessage("DUEL_WAIT_OTHER_PLAYER");const Y=this.performWaitPings();for(Y.catch(z);!xM.UNBLOCKING_UPDATE_TYPES.some((q=>this.hasUpdate(q)));){if(yield this.battleController.onMessageReceived.asPromise(),q.cancelled)return;this.hasUpdate(rt.EBattleStateUpdate.ModifyMp)&&(null==K||K.showOpponentWaitingMessage("DUEL_WAIT_CHOOSING_SPELL"))}Y.cancel(),null==K||K.hideWaitingMessage(),this.battleController.textLog.unpinMessage(),this.stateMachine.goToState(BP.B)})))().then(K).catch(z)}));return q}performWaitPings(){const q=new X.kBN(((K,z)=>{(()=>(0,Q.sH)(this,void 0,void 0,(function*(){for(yield X.Egh.timeout(xM.WAIT_PING_START_DELAY_MS);!q.cancelled;){if((yield this._networkHandler.sendWaitPing(this.battleController.battleId)).wait)yield X.Egh.timeout(xM.WAIT_PING_INTERVAL_MS);else if(yield X.Egh.timeout(xM.WAIT_PING_DESYNC_CONFIRM_DELAY_MS),!q.cancelled)throw new PM.r(409,"Duel desync occurred")}})))().catch(z)}));return q}hasUpdate(q){return this.stateMachine.stateUpdateQueue.some((K=>K.type===q))}}xM.WAIT_PING_START_DELAY_MS=2e4,xM.WAIT_PING_INTERVAL_MS=15e3,xM.WAIT_PING_DESYNC_CONFIRM_DELAY_MS=5e3,xM.UNBLOCKING_UPDATE_TYPES=[rt.EBattleStateUpdate.CastSpell,rt.EBattleStateUpdate.ModifyMp,rt.EBattleStateUpdate.SkipTurn],(0,Q.Cg)([(0,OM.d)("NetworkHandler"),(0,Q.Sn)("design:type",NM)],xM.prototype,"_networkHandler",void 0);var LM=z(6719),kM=z(64007),BM=z(630),UM=z(60668),FM=z(74640);class GM extends UP.Z{enter(){this.run().catch((q=>{X.RQr.logError(q,"Error handling opponent exit"),this.stateMachine.showThrownErrorDialog(q)}))}run(){return(0,Q.sH)(this,void 0,void 0,(function*(){this.battleController.wonByDefault=!0,this.battleController.textLog.clearMessageQueue(),this.battleController.textLog.showMessage("DUEL_OPPONENT_LEFT"),yield Promise.all([this.battleController.setActiveUnit(null),this.battleController.rightTeam.teleportOut(),(()=>(0,Q.sH)(this,void 0,void 0,(function*(){this.battleController.type===Hi.gu.MatchmakingDuel&&(yield this._networkHandler.onOpponentDisconnect(this.battleController.battleId))})))()]),this.stateMachine.goToState(FM.G,{battleResult:Hi.XK.Victory})}))}}(0,Q.Cg)([(0,OM.d)("NetworkHandler"),(0,Q.Sn)("design:type",NM)],GM.prototype,"_networkHandler",void 0);var jM=z(21945);class $M extends xP.V{constructor(){super(...arguments),this.allowVideoLessons=!1,this.onMessageReceived=new X.HN0,this._opponentExited=!1,this.wonByDefault=!1,this._messagePromises=new Set,this._stateOverrideStep=0,this.hideMergeRank=!1,this._modifierGridPrefab=null}destroy(){for(const q of Array.from(this._messagePromises.values()))q.reject("Exited state");this._messagePromises.clear(),this.onMessageReceived.dispose(),super.destroy()}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q);for(const q of this.getUnits())q.creature.teleportType=sM.H0.Astral,cr.d.updateInjectedValues(q.petMergeUi,{[BM.GH.PetMergeBadge]:LM.y.toInjectionParams({atlas:it._.Ui_battle_revamp_json,frame:`${BM.Xc.PET_MERGE_BADGE_PREFIX}-default`})}),q.petMergeUi.active=q.petMergeUi.active&&!this.hideMergeRank}))}bindNetworkHandler(){X.wa5.getActiveScene().container.bind("NetworkHandler").to(NM).asSingleton()}onStartBattle(){const q=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,Q.sH)(this,void 0,void 0,(function*(){this.rightTeam.teleportInBehaviour=wM.pV.NonWizardUnits,this.useTurnTimer();for(const q of this.rightTeam.units)q.mpBar.GameObject.active=!0;return q.onStartBattle.call(this)}))}handleBattleStartError(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return q instanceof Error&&q.message&&(yield new Promise((K=>{st.q.instance.prodigy.open.messageBoxOkay(q.message,void 0,K)}))),!0}))}onPlayerAction(q){const K=Object.create(null,{onPlayerAction:{get:()=>super.onPlayerAction}});return(0,Q.sH)(this,void 0,void 0,(function*(){var z;if(q.type===rt.EBattleAction.PowerUp){const K=(null===(z=this.activeUnit)||void 0===z?void 0:z.data.teamId)===this.leftTeam.id;if(q.correctAnswer)for(const q of this.leftTeam.units.filter((q=>q.isAlive()&&!q.missedTurnX.active)))this._stateMachine.stateUpdateQueue.unshift({type:rt.EBattleStateUpdate.ModifyMp,unitId:q.battleId,mpResult:1});else{const q=K?this.activeUnit:this.leftTeam.units.find((q=>this._nextUnitsInRound.includes(q.battleId)));q?q.missedTurnX.active=!0:X.VyI.log("Could not find first unit to skip",X.$bb.Error)}if(!K)return this._queuedAction=q,[]}return K.onPlayerAction.call(this,q)}))}alertActiveUnitMpEmpty(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield Promise.all(this.leftTeam.units.filter((q=>q.isAlive()&&!q.missedTurnX.active)).map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.alertMpEmpty()})))))}))}getStateOverride(q){switch(null==q?void 0:q.type){case rt.EBattleStateUpdate.CustomEvent:if(q.name===CM.NextUnits)this._nextUnitsInRound=q.data;else if(q.name===CM.ShowElementBoost){const K=q.data,z=kM._.ELEMENT_BOOST_TEXT_CONFIG[K];z&&(cr.d.loadWithInjectedValuesFromGUID(this._prefabLoader,Pi.l.ElementalBoostPopupText,{TEXT:this._localizer.getText(z.localizationKey),TEXT_COLOR:z.textColor,TEXT_STROKE_COLOR:z.textStrokeColor}),this.createModifierGridPrefab(K).then((q=>{this._modifierGridPrefab=q})).catch((q=>{X.VyI.log(`Failed to create modifier grid prefab: ${q}`,X.$bb.Error)})))}break;case rt.EBattleStateUpdate.CastSpell:q.id===this.battleConstants.fumbleSpellId&&(this.activeUnit.missedTurnX.active=!0,this.activeUnit.updateMp(0));break;case rt.EBattleStateUpdate.NewRound:if(0==this._stateOverrideStep++){this._showIndicator=!1,this._inRoundStart=!0,this.getUnits().filter((q=>q.isAlive())).forEach((q=>q.missedTurnX.active=!1));const K=[this.setActiveUnit(null),this.textLog.waitForMessageForMs(1e3,"BATTLE_ROUND_X",q.round)];return[GP,Promise.all(K)]}this._stateOverrideStep=0;break;case rt.EBattleStateUpdate.SetActiveUnit:if(this._inRoundStart)switch(this._stateOverrideStep++){case 0:return[UM.o];case 1:if(this.getUnits().find((K=>K.battleId===q.unitId)).data.teamId!==this.leftTeam.id){if(this._opponentExited){return this._stateMachine.stateUpdateQueue.find((q=>q.type===rt.EBattleStateUpdate.EndBattle))?super.getStateOverride():[GM]}return[xM]}default:this._showIndicator=!0,this._inRoundStart=!1,this._stateOverrideStep=0}break;case void 0:if(this._opponentExited)return[GM];if(this.activeUnit.data.teamId!==this.leftTeam.id)return[xM];if(this._queuedAction){const q=this._queuedAction;return this._queuedAction=null,[jM.N,q]}}return super.getStateOverride(q)}onVictory(){return(0,Q.sH)(this,arguments,void 0,(function*(q=[],K=[]){const z=st.q.instance.prodigy.gameContainer.get("73f-58d1").refreshMembership();yield this.textLog.waitForMessage("COMBAT_WON"),yield z;const Y=st.q.instance.prodigy.gameContainer.get("782-c308");yield Y.updateChargedLevelsData();const Q=st.q.instance.game.state.get(Ue.G.DuelMatchmaking);if(Q.roomConfig){const z=Array.isArray(Q.roomConfig.prize)?Q.roomConfig.prize:[Q.roomConfig.prize];q.push(...z.map((q=>({ID:q.id,quantity:q.amount,type:q.type})))),K&&K.push(...z.map((q=>({ID:q.id,quantity:Math.ceil(q.amount/2),type:q.type}))))}const X=q.length>0&&K.length>0;yield this.showBattleResult(!X,q,K)}))}onDefeat(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.textLog.waitForMessage("COMBAT_LOST");const q=st.q.instance.prodigy.gameContainer.get("782-c308");yield q.updateChargedLevelsData(),yield this.showBattleResult(!0,void 0,void 0,void 0,this.showVictoryBanner)}))}get showVictoryBanner(){return this.getEarnedXP().baseXp>0}completeBattle(q,K,z){const Y="win"===q&&this.wonByDefault?"win (default)":q;super.completeBattle(Y,K,z)}canBattleEndInstantly(){let q=!0;for(const K of this._stateMachine.stateUpdateQueue)if(K.type!==rt.EBattleStateUpdate.SetActiveUnit){q=!1;break}return q&&!this.isAnsweringQuestion}getEarnedXP(){const q=this._playerDataProvider.player,K=this.battleStats.spellsCast*te.s.get("GameConstants.PVP.STARS_PER_QUESTION"),z=q.hasMembership()?K*te.s.get("GameConstants.Battle.MEMBER_STARS_PERCENTAGE"):0,Y=q.hasValidatedParentEmail()?K*te.s.get("GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE"):0;return{baseXp:K,memberXp:Math.ceil(z),totalNonMemberXp:Math.ceil(K+Y),gainInPvp:!0}}createModifierGridPrefab(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=yield cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Pi.l.ModifierBar,{MODIFIERS:[Ve.d.getElementalBoostModifierIconInjectionData(q)]});return K.transform.setPosition(yM.Q.MODIFIER_GRID_X_IN_BATTLE,yM.Q.MODIFIER_GRID_Y_IN_BATTLE),K}))}onEndGame(q){const K=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,Q.sH)(this,void 0,void 0,(function*(){var z;null===(z=this._modifierGridPrefab)||void 0===z||z.destroy(),this._modifierGridPrefab=null,yield K.onEndGame.call(this,q)}))}getUnitsToAward(){return this.leftTeam.units.map((q=>q.battleId))}getScalableBattleDrops(){return[]}getNonScalableBattleDrops(){return[]}getScalableMemberBattleDrops(){return[]}getNonScalableMemberBattleDrops(){return[]}}(0,Q.Cg)([(0,Ge.b)("ad2-c5b2"),(0,Q.Sn)("design:type",ee.E)],$M.prototype,"_playerDataProvider",void 0),(0,Q.Cg)([(0,Ge.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],$M.prototype,"_localizer",void 0),(0,Q.Cg)([(0,Ge.b)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],$M.prototype,"_prefabLoader",void 0);class HM extends $M{get leftTeamId(){return this._isHost?rt.ETeamId.Home:rt.ETeamId.Away}get rightTeamId(){return this._isHost?rt.ETeamId.Away:rt.ETeamId.Home}constructor(q){super(q),this.onOpponentJoined=new X.HN0,this._closeButtonPromise=new Promise((()=>{})),this._inviteRejectionPromise=new X.bnh,this.hideMergeRank=!0,this._localUserId=`${this._playerDataProvider.player.getID()}`,this._isHost=this._remoteConfig.hostUserId===this._localUserId,this._duelInviteService.onInviteCancelled.addOnce(this.handleInviteFailed,this),this._duelInviteService.onInviteFailed.addOnce(this.handleInviteFailed,this),this._duelInviteService.onInviteRejected.addOnce(this.handleInviteFailed,this)}destroy(){this._multiplayer.leaveLocationChannel().catch(X.RQr.createHandler("Error leaving channel")),this._duelInviteService.onInviteCancelled.remove(this.handleInviteFailed,this),this._duelInviteService.onInviteFailed.remove(this.handleInviteFailed,this),this._duelInviteService.onInviteRejected.remove(this.handleInviteFailed,this),this.onOpponentJoined.dispose(),super.destroy()}getLoadingScreen(q){const K=new DM.P(this._playerDataProvider.player,this._localConfig.opponent);return K.data=Object.assign(Object.assign(Object.assign({},K.data),q),{showCancel:this._isHost}),this._closeButtonPromise=new Promise(((q,z)=>{K.onCloseClicked.addOnce((()=>z()))})),this.onOpponentJoined.addOnce((()=>{K.hideCancelButton()})),K}requestBattleStart(q){const K=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,Q.sH)(this,void 0,void 0,(function*(){const z=`${this._localConfig.opponent.getID()}`,Y=this._featureFlagsProvider.getValue("pvpInviteTimeout",te.s.get("GameConstants.PVP.INVITE_TIMEOUT")),Z=parseInt(Y,10),J=X.Egh.timeout(Z).then((()=>{throw new Error("Timed out waiting for "+(this._isHost?"guest":"host"))}));if(this._isHost){const z=`${this._localConfig.opponent.getID()}`,Y=this.waitForMessage((q=>"playerJoined"===q.type&&q.playerInfo.userID===z||"userList"===q.type&&!!q.userList.find((q=>q.userID===z))));yield this._multiplayer.joinLocationChannel(this._localConfig.channelName,this.processMessage.bind(this),this.processSocketError.bind(this));try{yield Promise.race([Y,J,this._closeButtonPromise,this._inviteRejectionPromise]).catch((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return X.VyI.log(`Cancelling invite: ${X.RQr.stringify(q)}`,X.$bb.Verbose),this._duelInviteService.cancelInvite(this._localConfig.opponent.getID()),Promise.reject(new Error(q))})))),this.onOpponentJoined.dispatch();const z=K.requestBattleStart.call(this,q),Z=this.waitForMessage((q=>"broadcastAction"===q.type&&q.actionInfo.type===AM.GuestValidated));return yield Promise.all([z,Promise.race([J,Z])]),yield z}catch(e){throw this._multiplayer.leaveLocationChannel().catch(X.RQr.createHandler("Error leaving channel")),e}}else{const K=this.waitForMessage((q=>"broadcastAction"===q.type&&q.actionInfo.type===AM.InitialBattleState));yield this._multiplayer.joinLocationChannel(this._localConfig.channelName,this.processMessage.bind(this),this.processSocketError.bind(this));try{yield Promise.race([K,J]);const Y=(yield K).actionInfo.data;return yield this._networkHandler.joinDuel(z,q.roomId),Y}catch(e){throw this._multiplayer.leaveLocationChannel().catch(X.RQr.createHandler("Error leaving channel")),e}}}))}waitForMessageType(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.waitForMessage((K=>K.type===q))}))}waitForMessage(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=new X.bnh;this._messagePromises.add(K);const z=Y=>{"broadcastAction"===Y.type&&Y.actionInfo.toUserId&&Y.actionInfo.toUserId!==this._localUserId||q(Y)&&(this._messagePromises.delete(K),this.onMessageReceived.remove(z),K.resolve(Y))};return this.onMessageReceived.add(z),K}))}processMessage(q){var K,z;if("playerLeft"===q.type){for(const q of Array.from(this._messagePromises.values()))q.reject("Opponent left");this._messagePromises.clear(),this._opponentExited=!0,((null===(K=this._stateMachine)||void 0===K?void 0:K.currentState)instanceof RM.W||(null===(z=this._stateMachine)||void 0===z?void 0:z.currentState)instanceof xM)&&this._stateMachine.goToState(BP.B)}else"broadcastAction"!==q.type||q.actionInfo.toUserId&&q.actionInfo.toUserId!==this._localUserId||q.actionInfo.type!==AM.StateUpdate||this._stateMachinePromise.then((()=>{this._stateMachine.stateUpdateQueue.push(...this.processBattleStateUpdates(q.actionInfo.data))})).catch(X.RQr.createHandler("Error adding message to state update queue"));this.onMessageReceived.dispatch(q)}processSocketError(q){var K;X.RQr.logError(q,"Error from multiplayer socket"),null===(K=this._stateMachine)||void 0===K||K.showThrownErrorDialog(q)}handleInviteFailed(){this._inviteRejectionPromise.reject()}}(0,Q.Cg)([(0,Ge.b)("f71-42eb"),(0,Q.Sn)("design:type",Je)],HM.prototype,"_featureFlagsProvider",void 0),(0,Q.Cg)([(0,OM.d)("RemoteConfig"),(0,Q.Sn)("design:type",Object)],HM.prototype,"_remoteConfig",void 0),(0,Q.Cg)([(0,Ge.b)("b0c-9016"),(0,Q.Sn)("design:type",ze.d)],HM.prototype,"_multiplayer",void 0),(0,Q.Cg)([(0,Ge.b)("7ff-8385"),(0,Q.Sn)("design:type",Object)],HM.prototype,"_duelInviteService",void 0);var VM=z(65725);class WM extends UP.Z{constructor(q,K,z){super(),this._targetUnit=q,this._replacementUnit=K,this._cloudRadius=z}enter(){this.transform().then((()=>this.stateMachine.goToState(BP.B))).catch(X.RQr.createHandler("Error transforming unit"))}transform(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.game,K=this._targetUnit.getHitboxCenter(),z=()=>{Fo.M.radialCloud(q,this._targetUnit.creature.rootContainer.parent,K.x,K.y,this._cloudRadius,it._.Boss_aspen_extras_json,"purple-cloud")};for(let Y=6;Y>0;--Y)z(),yield X.Egh.timeout(200);z(),this._targetUnit.creature.creatureGameObject.destroy(),this._targetUnit.setData(this._replacementUnit,this._targetUnit.creature.teleportType,this._targetUnit.controllerUnit),yield this._targetUnit.loadPromise,this._targetUnit.creature.creatureGameObject.active=!0}))}}var qM,KM,zM=z(80313);class YM extends UP.Z{constructor(q){super(),this._waitTimeMs=q}enter(){window.setTimeout((()=>this.stateMachine.goToState(BP.B)),this._waitTimeMs)}}!function(q){q[q.NotStarted=0]="NotStarted",q[q.ClearActiveUnit=1]="ClearActiveUnit",q[q.Wait=2]="Wait",q[q.Smoke=3]="Smoke",q[q.Dialogue=4]="Dialogue"}(qM||(qM={}));class QM extends zP{constructor(){super(...arguments),this._endSequenceStep=qM.NotStarted,this._lastSoundTime=0}getAssetList(){return[...super.getAssetList(),ht.c.Sfx_crystalbreak,ht.c.Sfx_crystalclumpdestroy]}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q),this._yeti=this.rightTeam.units.find((q=>q.type===Hi.uj.Boss)),this._yeti.loadPromise.then((()=>{this._yeti.creature.addBarrier(sM.HW.LegacySprite,null,0,-50)})).catch(X.RQr.createHandler("Error adding yeti barrier"));const z=this.rightTeam.units.filter((q=>q.type===Hi.uj.Object));for(const q of z){const K=q.creature;K.teleportType=sM.H0.None,K.shouldFadeOnDefeat=!1,K.animator.spine.addAnimationRemap("idle","idle-1"),K.animator.playAnimation("idle-1",!0),q.onHpSet.add(((z,Y)=>{if(z{K.animator.playAnimation(`idle-${Z+1}`,!0)}));const q=Date.now(),z=q-this._lastSoundTime,Y=z{st.q.instance.prodigy.audio.playSFXFromGUID(ht.c.Sfx_crystalbreak),Z>=QM.CRYSTAL_BREAK_THRESHOLDS.length-1&&X.Egh.timeout(QM.CRYSTAL_DESTROY_DELAY_MS).then((()=>{st.q.instance.prodigy.audio.playSFXFromGUID(ht.c.Sfx_crystalclumpdestroy)}))}))}}}))}}))}getStateOverride(q){if(this._endSequenceStepq>K))}}QM.CRYSTAL_BREAK_THRESHOLDS=[.95,.5,0,-1],QM.CRYSTAL_DESTROY_DELAY_MS=2700,QM.MULTIPLE_CRYSTAL_SFX_DELAY_MS=100,function(q){q.WaveStart="WaveStart",q.WaveEnd="WaveEnd",q.StageStart="StageStart",q.StageEnd="StageEnd",q.HomeTeamRevived="HomeTeamRevived",q.MathStreakUpdated="MathStreakUpdated"}(KM||(KM={}));var XM=z(12022),ZM=z(86283),JM=z(18332),tN=z(54174),eN=z(61895);class iN extends UP.Z{enter(){this.battleController.attemptEscape().catch((q=>{X.RQr.logError(q,"Error in EscapeBattleState"),this.stateMachine.showThrownErrorDialog(q)}))}}class sN extends UP.Z{enter(){eN.B.openQuickQuizCancelledPopup((()=>{this.stateMachine.goToState(iN)}),!1)}}var nN=z(78355),aN=z(69297),rN=z(28496),oN=z(73032);class hN extends oN.o{constructor(){super(...arguments),this._matchFinishedMenuOpened=new X.bnh,this._noMoreRevivesModalShownOrSkipped=new X.bnh}destroy(){this._matchFinishedMenu=void 0}setStateMachine(q){this._stateMachine=q}mayShowPostBattleMenus(){if(!X.Aq$.isDefined(this._stateMachine))return!1;const q=[rN.u,nN.$,FM.G,aN.L].some((q=>this._stateMachine.currentState instanceof q)),K=this._stateMachine.stateUpdateQueue.some((q=>q.type===rt.EBattleStateUpdate.EndBattle));return q||K}enable(q){const K=Object.create(null,{enable:{get:()=>super.enable}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.enable.call(this,q),this.mayShowPostBattleMenus()&&(yield this._noMoreRevivesModalShownOrSkipped,this.forceCloseNoMoreRevivesModal(),yield this._matchFinishedMenuOpened,this.forceCloseMatchFinishedMenu())}))}onMatchFinishedMenuOpened(q,K){this._resolveMatchFinishedMenu=K,this._matchFinishedMenu=q,this._matchFinishedMenuOpened.resolve()}onNoMoreRevivesModalOpenedOrSkipped(){this._noMoreRevivesModalShownOrSkipped.resolve()}onNoMoreRevivesModalOpened(q){this._noMoreRevivesModal=q,this._noMoreRevivesModalShownOrSkipped.resolve()}forceCloseNoMoreRevivesModal(){X.Aq$.isDefined(this._noMoreRevivesModal)&&(this._noMoreRevivesModal.destroy(),this._noMoreRevivesModal=void 0)}forceCloseMatchFinishedMenu(){var q;X.Aq$.isDefined(this._matchFinishedMenu)&&(null===(q=this._matchFinishedMenu)||void 0===q||q.destroyDeferred(),this._resolveMatchFinishedMenu())}}class cN extends xP.V{get battleUI(){return this._battleUI}constructor(q){super(q),this.type=Hi.gu.LootDash,this._paintedBackgroundZoomConfigs=Object.assign(Object.assign({},xP.Y),{fgStartScale:1,fgEndScale:1.5}),this._hasSeenStageIntro=!1,this.postBattleExpressModeController=new hN,this._lootDashManager=st.q.instance.prodigy.gameContainer.get("1c5-a816"),this._lootDashManager.setup(),this._matchController=this._lootDashManager.matchController,this._baseLocalizer=st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),this._lootDashSegment=st.q.instance.prodigy.gameContainer.get("20f-5f67").lootDash}destroy(){var q;this._battleUIPrefabRoot.destroy(),this._lootDashManager.cleanupMatch(this._matchController),null===(q=this.postBattleExpressModeController)||void 0===q||q.destroy(),super.destroy()}getAssetList(){return[...super.getAssetList(),ph.B.Loot_dash_endgame_placing_screen,ph.B.Loot_dash_endgame_match_completed,ph.B.Loot_dash_stage_intro,ph.B.Loot_dash_revive,ph.B.Loot_dash_matchboard_done,ph.B.Loot_dash_matchboard_move,ph.B.Loot_dash_loot_bag_added,ph.B.Loot_dash_math_streak_complete,ph.B.Loot_dash_math_streak_increased,ph.B.Loot_dash_math_streak_reset]}playIntroSequence(){return(0,Q.sH)(this,void 0,void 0,(function*(){}))}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){var z;const Y=q.state,Q=Y.allStageConfigs;this._matchController.setStageData(Q),this._lootDashSegment.sendRunStartedEvent(),this._matchController.onBattleDataChanged.active=!1,this._matchController.setCurrentStageData(Q[Y.currentStageIndex]),this._matchController.setCurrentWaveIndex(Y.currentWaveIndex),(null===(z=Y.mathStreak)||void 0===z?void 0:z.currentStreak)&&this._matchController.setCurrentMathStreak(Y.mathStreak.currentStreak),Y.lootBags&&this._matchController.setLootBagData(Y.lootBags),this._matchController.revivesRemaining=Y.revivesAvailable,this._matchController.onBattleDataChanged.active=!0,yield K.initBattlePrefab.call(this,q),this.postBattleExpressModeController.setStateMachine(this._stateMachine);for(const q of this.rightTeam.units)q.cleanUpOnDefeat=!0,q.onUnitDefeated.add((()=>{this.onRightTeamUnitDefeated(q)}));this._battleUIPrefabRoot=yield cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Pi.l.LootDashBattleUI,{[dr.eV.ExitButtonCallback]:()=>{this._exitDialogueMenu=st.q.instance.prodigy.open.confirmationDialog(new Dh.k(this._baseLocalizer.getText("DIALOG_LEAVE"),(()=>{this._exitDialogueMenu=void 0,this.beginEndingBattleAndGotoState([iN])}),this._baseLocalizer.getText("DIALOG_STAY"),(()=>st.q.instance.prodigy.open.menuCloseAll()),void 0,cd.E.Small,void 0,this._baseLocalizer.getText("LOOT_DASH_EXIT_PROMPT_TITLE"),this._baseLocalizer.getText("LOOT_DASH_EXIT_PROMPT_BODY")))}},this._prefabRoot),this._battleUI=this._battleUIPrefabRoot.findComponentInChildren(JM.I)}))}getStateOverride(q){if(this.isLootDashBattleStateUpdate(q))switch(q.name){case KM.WaveStart:this._matchController.setCurrentWaveIndex(q.data.waveIndex),this._lootDashSegment.sendWaveStartedEvent();break;case KM.WaveEnd:return this._stateMachine.stateUpdateQueue.shift(),this._matchController.setLootBagData(q.data.lootBagData),this._lootDashSegment.sendWaveCompletedEvent(),ZM.D.clearNewlyRescuableUnitsSeen(),this.sendLootDashQuestEvent(),[GP,this._battleUI.showWaveCompletedLootBagAnimation(this._latestDefeatedRightUnitPosition)];case KM.StageStart:this._stateMachine.stateUpdateQueue.shift(),this._matchController.setCurrentStageData(q.data.stageData);const K=this._battleUI.showStageIntro(q.data.stageData.stageType);K.then((()=>{this._forceEndBattle||(this._matchController.stageIntroComplete(),this._hasSeenStageIntro||(this.highlightRescuableUnits().catch(X.RQr.createHandler("Error highlighting rescuable units")),this._hasSeenStageIntro=!0))})).catch(X.RQr.createHandler("Failed to play stage intro sequence")),this.setupCustomSequence(K),this._lootDashSegment.sendStageStartedEvent();break;case KM.StageEnd:this._lootDashSegment.sendStageCompletedEvent();break;case KM.HomeTeamRevived:return this._stateMachine.stateUpdateQueue.shift(),this.setupCustomSequence(this._battleUI.showReviveSequence(q.data.revivesRemaining)),this._lootDashManager.matchController.revivesRemaining=q.data.revivesRemaining,this._lootDashSegment.sendReviveUsedEvent(),[YM,1500];case KM.MathStreakUpdated:this._matchController.setCurrentMathStreak(q.data.currentStreak,q.data.lootBagData)}return 0===this._stateMachine.stateUpdateQueue.length&&X.Aq$.isDefined(this._customSequencePromise)?[GP,this._customSequencePromise]:super.getStateOverride(q)}handleStateChange(q){super.handleStateChange(q),this._battleUI.setExitButtonEnabled(this.isChoosingSpell)}sendLootDashQuestEvent(){const q=st.q.instance.prodigy.gameContainer.get("b37-c775"),K={params:{taskEventType:_h.Z7.Battle,battleType:Hi.gu.LootDash,allies:this.leftTeam.units.map((q=>q.data)),enemies:this.rightTeam.units.map((q=>q.data))}};q.sendQuestEventViaHub(ps.T.PLAY_ANY_BATTLE,K).catch(X.RQr.createHandler("Failed to send Loot Dash battle quest event for Loot Dash wave"))}onRightTeamUnitDefeated(q){this._latestDefeatedRightUnitPosition=q.GameObject.transform.worldPosition}setupCustomSequence(q){this._customSequencePromise=q,this._customSequencePromise.catch(X.RQr.createHandler("Failed to play custom sequence")).finally((()=>this._customSequencePromise=void 0))}isLootDashBattleStateUpdate(q){return(null==q?void 0:q.type)===rt.EBattleStateUpdate.CustomEvent&&(null==q?void 0:q.name)in KM}onEndGame(q){const K=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.onEndGame.call(this,q,!1),this._matchController.completeMatch(q),q&&(yield this._battleUI.movePlayerPinToEndOfMatchboard()),yield this._battleUI.hideAll(),this._matchController.lootDashMatchData.matchCompletionState===mP.Cr.Win?this.showConfetti():this._matchController.lootDashMatchData.matchCompletionState===mP.Cr.Loss&&(yield this.showNoMoreRevivesModal()),this.postBattleExpressModeController.onNoMoreRevivesModalOpenedOrSkipped(),yield this._battleUI.showMatchFinished(),this._battleUIPrefabRoot.destroy()}))}showConfetti(){this._confetti||(this._confetti=new X._mx,this._confetti.addComponent(X.dLy),this._confetti.layer=Ch.E.Ui,OC.E.addConfetti(this._confetti),X.wa5.getActiveScene().addGameObject(this._confetti))}hideConfetti(){var q;null===(q=this._confetti)||void 0===q||q.destroy()}endLootDashQuickQuiz(){this.beginEndingBattleAndGotoState([sN])}showNoMoreRevivesModal(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.isPlayingAtSchool())return;const q=yield eN.B.getInjectedValuesForNoMoreRevivesModal(this._matchController.config);if(!q)return;const K=yield cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Pi.l.LootDashNoMoreRevivesModal,q);this.postBattleExpressModeController.onNoMoreRevivesModalOpened(K),yield K.onDestroy.asPromise()}))}onVictory(q,K,z){const Y=Object.create(null,{onVictory:{get:()=>super.onVictory}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.loadMatchFinishedMenu(),yield Y.onVictory.call(this,this._matchController.getLootBagRewards(),this._matchController.getMemberLootBagRewards(),z)}))}onDefeat(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.onUnfinishedRun()}))}onEscape(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.onUnfinishedRun()}))}onUnfinishedRun(){const q=Object.create(null,{onDefeat:{get:()=>super.onDefeat}});return(0,Q.sH)(this,void 0,void 0,(function*(){XM.G.hasMetMinimumVictoryRequirement(this._matchController.lootDashMatchData.lootBagData)?yield this.onVictory():(yield this.loadMatchFinishedMenu(),yield q.onDefeat.call(this,!0))}))}onNewRound(){}loadMatchFinishedMenu(){return(0,Q.sH)(this,void 0,void 0,(function*(){for(;!this._matchController.lootDashMatchData.placement;)yield this._matchController.onBattleDataChanged.asPromise();const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").isMember(),K=this.getEarnedXP();this._lootDashSegment.sendRunCompletedEvent(K.totalNonMemberXp+(q?K.memberXp:0),this._matchController.lootDashMatchData.placement);const z=this.getInjectedValuesForMatchFinishedMenu(),Y=st.q.instance.prodigy.world.getZone(st.q.instance.prodigy.world.getCurrentZone()).bgmID;return z[dr.eV.MatchFinishedRewardsEarned]?st.q.instance.prodigy.audio.playSFXFromGUID(ph.B.Loot_dash_endgame_placing_screen,(()=>{st.q.instance.prodigy.audio.playBGM(Y,!0)})):st.q.instance.prodigy.audio.playBGM(Y,!0),new Promise((q=>{cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Pi.l.LootDashMatchFinishedMenu,Object.assign(Object.assign({},z),{[dr.eV.MatchFinishedButtonCallback]:()=>{this.hideConfetti(),q()}})).then((K=>{this.postBattleExpressModeController.onMatchFinishedMenuOpened(K,q)})).catch(X.RQr.createHandler("LootDashBattleController: Failed to load the loot dash match finished menu"))}))}))}getInjectedValuesForMatchFinishedMenu(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2"),K=Xo.E.createMockPlayerDataProvider(),z=this._matchController.lootDashMatchData,Y=z.matchCompletionState===mP.Cr.Win,Q=z.placement>=1&&z.placement<=3,X=XM.G.getLootBagsCount(z.lootBagData),Z=Y?Q?this._baseLocalizer.getText("LOOT_DASH_MATCH_FINISHED_TOP_THREE_INFO_TEXT"):this._baseLocalizer.getText("LOOT_DASH_MATCH_FINISHED_NOT_TOP_THREE_INFO_TEXT"):X>0?this._baseLocalizer.getText("LOOT_DASH_MATCH_UNFINISHED_REWARDS_INFO_TEXT"):this._baseLocalizer.getText("LOOT_DASH_MATCH_UNFINISHED_NO_REWARDS_INFO_TEXT"),J=Y?Q?tN._c.Fireworks:tN._c.FireworksLess:X>0?tN._c.FireworksSingle:tN._c.None,tt=Y?this._baseLocalizer.getText("LOOT_DASH_MATCH_FINISHED_NOT_TOP_THREE_PLACEMENT_TEXT"):this._baseLocalizer.getText("LOOT_DASH_MATCH_UNFINISHED_REWARDS_PLACEMENT_TEXT"),et={"1eb-d7b4":K,[dr.n7.WizardInjectionConfiguredAppearance]:q.getAppearance(),[dr.eV.MatchFinishedLootBagAmountText]:`x${X}`,[dr.eV.MatchFinishedShowNumberedPlacement]:Q,[dr.eV.MatchFinishedInfoText]:Z,[dr.eV.MatchFinishedPlacementReplacementText]:tt,[dr.eV.MatchFinishedRewardsEarned]:X>0,[dr.eV.MatchFinishedMatchCompleted]:Y,[dr.eV.MatchFinishedFireworkAnimationName]:J};if(Y){const q=1===z.placement?"st":2===z.placement?"nd":"rd";et[dr.eV.MatchFinishedPlacement]=z.placement,et[dr.eV.MatchFinishedPlacementSuffix]=q}return et}setLootDashInfoWidgetsVisibility(q){this.battleUI.setInfoWidgetsVisibility(q).catch((q=>X.RQr.logError(q,"Failed to set Wizard Dash info widgets visibility for rescue flow.")))}getScalableBattleDrops(){return[]}getNonScalableBattleDrops(){return[]}getScalableMemberBattleDrops(){return[]}getNonScalableMemberBattleDrops(){return[]}beginEndingBattleAndGotoState(q,K={}){this.forceCloseExitConfirmationMenuIfOpen(),super.beginEndingBattleAndGotoState(q,K)}forceCloseExitConfirmationMenuIfOpen(){X.Aq$.isDefined(this._exitDialogueMenu)&&(this._exitDialogueMenu.close(),this._exitDialogueMenu=void 0)}canBattleEndInstantly(){return super.canBattleEndInstantly()&&!X.Aq$.isDefined(this._exitDialogueMenu)}showSpellCards(q,K){var z,Y;super.showSpellCards(q,K),null===(z=this.spellCardsController)||void 0===z||z.targetController.onRescueCurrencyBalanceHidden.add((()=>this.setLootDashInfoWidgetsVisibility(!0))),null===(Y=this.spellCardsController)||void 0===Y||Y.targetController.onRescueCurrencyBalanceShown.add((()=>this.setLootDashInfoWidgetsVisibility(!1)))}}var dN=z(26460);class lN extends UP.Z{enter(){this.play().catch((q=>{X.RQr.logError(q,"Error running shell game"),this.stateMachine.showThrownErrorDialog(q)}))}play(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.game.add.tween.bind(st.q.instance.game.add),K=this.stateMachine.awayTeam.units,z=K.length>2?350:250,Y=Mn.o.integerInRange(9,12);for(let Q=0;Q{it.setPosition(ot.x+lt.x,ot.y+lt.y),st.setPosition(ht.x-lt.x,ht.y-lt.y),!lt.swapped&<.value>.5&&([tt.layerLevel,et.layerLevel]=[et.layerLevel,tt.layerLevel],[tt.GameObject.layer,et.GameObject.layer]=[et.GameObject.layer,tt.GameObject.layer],[tt.creature.creatureGameObject.layer,et.creature.creatureGameObject.layer]=[et.creature.creatureGameObject.layer,tt.creature.creatureGameObject.layer],lt.swapped=!0)})),yield ut.onTweenComplete.asPromise()}this.stateMachine.goToState(BP.B)}))}}let uN=class extends MM.m{joinDuel(){return(0,Q.sH)(this,void 0,void 0,(function*(){}))}sendWaitPing(){return(0,Q.sH)(this,void 0,void 0,(function*(){return{wait:!0}}))}};uN=(0,Q.Cg)([(0,dt.injectable)()],uN);class fN extends xM{enter(){const q=this.stateMachine.stateUpdateQueue[0];q.type===rt.EBattleStateUpdate.CustomEvent&&q.name===CM.Thinking?(this._thinkingEvent=q,this.stateMachine.stateUpdateQueue.shift(),this._withheldUpdates=this.stateMachine.stateUpdateQueue.splice(0,this.stateMachine.stateUpdateQueue.length),super.enter()):this.stateMachine.goToState(BP.B)}performWaitPings(){const{botConfig:q}=X.wa5.getActiveScene().container.get("LocalConfig");return new X.kBN(((K,z)=>{(()=>(0,Q.sH)(this,void 0,void 0,(function*(){if(this._thinkingEvent.data.roundStartQuestion){const K=Date.now()-X.wa5.getActiveScene().container.get("32f-cb16"),z=X.cj9.clamp(this._thinkingEvent.data.delay-K,0,1e3*q.timings.questionAnswer.maxTimeOverPlayer);yield X.Egh.timeout(z)}else yield X.Egh.timeout(this._thinkingEvent.data.delay);this.stateMachine.stateUpdateQueue.push(...this._withheldUpdates),this.battleController.onMessageReceived.dispatch()})))().catch(z)}))}}var bN;!function(q){q[q.None=0]="None",q[q.MpGain=1]="MpGain",q[q.MpUsage=2]="MpUsage",q[q.SpellCast=3]="SpellCast",q[q.NewRound=4]="NewRound",q[q.SpellCooldown=5]="SpellCooldown"}(bN||(bN={}));class pN extends $M{constructor(){super(...arguments),this.hideMergeRank=!1,this._isNewRound=!1}get leftTeamId(){return rt.ETeamId.Home}get rightTeamId(){return rt.ETeamId.Away}bindNetworkHandler(){X.wa5.getActiveScene().container.bind("NetworkHandler").to(uN).asSingleton()}getLoadingScreen(){return st.q.instance.game.state.get(Ue.G.DuelMatchmaking)}requestBattleStart(q){const K=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,Q.sH)(this,void 0,void 0,(function*(){const z=yield K.requestBattleStart.call(this,q);return this.getLoadingScreen().consumeStadiumRoomEntryCost(),yield new Promise((q=>this._activePlayer.forceSaveCharacter(q))),z}))}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){const z=J().find(q.state.units,(q=>q.teamId===this.rightTeamId&&q.type===Hi.uj.Wizard)),Y=new Be.a(st.q.instance.game);Y.appearance.init(Object.assign(Object.assign({},z.appearance),{name:z.appearance.name})),Y.equipment.init(Object.assign({},z.equipment)),Y.data.level=z.level,X.Aq$.isDefined(z.chargedLevel)&&(Y.data.chargedLevelData={chargedLevel:z.chargedLevel,chargedLevelCap:z.chargedLevel,chargedLevelsEnabled:z.chargedLevel>0}),z.appearance.morph&&Y.setData({playerTransformation:{transformType:z.appearance.morph.type,transformID:z.appearance.morph.ID}}),yield this.getLoadingScreen().showOpponent(Y,q.state.botConfig.streakModifiers.streakOffset),yield K.initBattlePrefab.call(this,q)}))}onStartBattle(){const q=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,Q.sH)(this,void 0,void 0,(function*(){const K=this.rightTeam.wizard;return K&&(K.unitNameForSegment=this._stateMachine.segment.duelsStadium.botPersonality),q.onStartBattle.call(this)}))}destroy(){super.destroy(),this.getLoadingScreen().shutdown()}processBattleStateUpdates(q){var K;const{botConfig:z}=X.wa5.getActiveScene().container.get("LocalConfig");let Y=null===(K=this.activeUnit)||void 0===K?void 0:K.data.teamId,Q=bN.None;for(let X=0;X0?(Z=bN.MpGain,Y=Q!==bN.MpGain):(Z=bN.MpUsage,Y=Q!==bN.MpUsage&&Q!==bN.NewRound):K.type===rt.EBattleStateUpdate.ModifySpellCooldown&&(Z=bN.SpellCooldown),Y){const Y=K.type===rt.EBattleStateUpdate.CastSpell&&K.id===this.battleConstants.fumbleSpellId,Q=Z===bN.MpGain||Y,J=Q?z.timings.questionAnswer.timings:z.timings.spellChoiceTimings,tt=this.getDelayTimeWithVarianceInMilliseconds(J.average,J.variance),et=Q&&this._isNewRound,it={type:rt.EBattleStateUpdate.CustomEvent,name:CM.Thinking,data:{delay:tt,roundStartQuestion:et}};q.splice(X,0,it),this._isNewRound=!1,++X}Z!==bN.SpellCooldown&&(Q=Z)}}return q}getStateOverride(q){if((null==q?void 0:q.type)===rt.EBattleStateUpdate.CustomEvent&&q.name===CM.Thinking)return[fN];const K=super.getStateOverride(q);return(null==K?void 0:K[0])===xM?[fN]:K}getDelayTimeWithVarianceInMilliseconds(q,K){return q*(1+X.cj9.random(-K,K))*1e3}}(0,Q.Cg)([(0,Ge.b)("782-c308"),(0,Q.Sn)("design:type",De.W)],pN.prototype,"_activePlayer",void 0);class vN extends HM{constructor(){super(...arguments),this.hideMergeRank=!1}getLoadingScreen(){return st.q.instance.game.state.get(Ue.G.DuelMatchmaking)}requestBattleStart(q){const K=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,Q.sH)(this,void 0,void 0,(function*(){const z=yield K.requestBattleStart.call(this,q);return this.getLoadingScreen().consumeStadiumRoomEntryCost(),yield new Promise((q=>this._activePlayer.forceSaveCharacter(q))),z}))}destroy(){super.destroy(),this.getLoadingScreen().shutdown()}}(0,Q.Cg)([(0,Ge.b)("782-c308"),(0,Q.Sn)("design:type",De.W)],vN.prototype,"_activePlayer",void 0);class gN extends xP.V{getScalableBattleDrops(){var q;return this._localConfig.scaleGuaranteedDrops&&null!==(q=this._localConfig.guaranteedDrops)&&void 0!==q?q:[]}getNonScalableBattleDrops(){var q;return this._localConfig.scaleGuaranteedDrops?[]:null!==(q=this._localConfig.guaranteedDrops)&&void 0!==q?q:[]}}class mN extends xP.V{initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q),this._pumpkinfestBoss=this.rightTeam.units.find((q=>q.battleId===mN.PUMPKINFEST_BOSS_BATTLE_ID)),this._pumpkinfestBoss.size=EM.X.Medium}))}getUnitDataForTeam(q,K){const z=super.getUnitDataForTeam(q,K),Y=z.find((q=>q.unitId===mN.PUMPKINFEST_BOSS_BATTLE_ID));return Y&&(Y.unitSlot=3),z}}mN.PUMPKINFEST_BOSS_BATTLE_ID="pumpkinfestBoss";var yN=z(90351),_N=z(68607),EN=z(90804),wN=z(94596),TN=z(61404);class SN extends tt.Filter{constructor(q=0,K=0,z=20,Y=.3){super(tt.defaultFilterVertex,TN.Q.getWaveFadeFragment(),{time:q,fade:K,frequency:z,amplitude:Y}),this.timeSeconds=q}apply(q,K,z,Y){this.uniforms.time=this.timeSeconds,this.uniforms.fade=this.fadeAmount,this.uniforms.frequency=this.frequency,this.uniforms.amplitude=this.amplitude,q.applyFilter(this,K,z,Y)}}let AN=class extends wN.b{constructor(){super(...arguments),this.DEFAULT_FADE_DURATION_MS=2e3,this.waveAmplitude=.1,this.waveFrequency=6,this.waveSpeed=2*Math.PI,this._fadeInDurationMs=this.DEFAULT_FADE_DURATION_MS,this._fadeOutDurationMs=this.DEFAULT_FADE_DURATION_MS,this.useAlpha=!0,this._fadeInEase=yN.i.LinearNone,this._fadeOutEase=yN.i.LinearNone}initialize(){super.initialize(),this._transitionFilter=new SN(st.q.instance.game.time.timeMS/1e3*this.waveSpeed,this.fadeValue,this.waveFrequency,this.waveAmplitude),this._filterList.push(this._transitionFilter)}fadeIn(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.fade(0,1,this._fadeInDurationMs,this._fadeInEase)}))}fadeOut(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.fade(1,0,this._fadeOutDurationMs,this._fadeOutEase)}))}fade(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){if(this._tween)return void X.VyI.log("Cannot start fade, a fade is already in progress.",X.$bb.Warning);this.fadeValue=q;const Q={fade:q};this._tween=st.q.instance.game.add.tween(Q,this).to({fade:K},z,yN.K.getEasingFunctionFromEnum(Y),!0),this._tween.onUpdate.add((()=>{this.fadeValue=Q.fade})),yield this._tween.onTweenComplete.asPromise(),this.fadeValue=K,this._tween=null}))}update(){super.update(),this._transitionFilter&&(this._transitionFilter.timeSeconds=st.q.instance.game.time.timeMS/1e3*this.waveSpeed,this._transitionFilter.fadeAmount=this.useAlpha?this.fadeValue:1,this._transitionFilter.amplitude=(1-this.fadeValue)*this.waveAmplitude,this._transitionFilter.frequency=this.waveFrequency*Math.PI*2)}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],AN.prototype,"waveAmplitude",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],AN.prototype,"waveFrequency",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],AN.prototype,"waveSpeed",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],AN.prototype,"_fadeInDurationMs",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],AN.prototype,"_fadeOutDurationMs",void 0),(0,Q.Cg)([(0,X.gfw)(yN.i),(0,Q.Sn)("design:type",String)],AN.prototype,"_fadeInEase",void 0),(0,Q.Cg)([(0,X.gfw)(yN.i),(0,Q.Sn)("design:type",String)],AN.prototype,"_fadeOutEase",void 0),AN=(0,Q.Cg)([(0,X.EVk)("BattleBackgroundTransitionFilter",vc.Y.effect)],AN);var CN,ON=z(45855);!function(q){q[q.OldBackgroundsOut=0]="OldBackgroundsOut",q[q.NewBackgroundsLoaded=1]="NewBackgroundsLoaded"}(CN||(CN={}));class IN{static swapBackgrounds(q,K){return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z=[],Y=[],Z){const J=RP.l.guaranteeArray(K);(0,vs.v)(q.length===J.length);const tt=[];q.forEach(((q,K)=>{const z=q.GameObject.addComponent(AN);z.fadeValue=1,z.applyFilter(),z.useAlpha=K>0,tt.push(z)})),z.forEach((q=>{const K=q.addComponent(AN);K.fadeValue=1,K.applyFilter(),K.useAlpha=!1,tt.push(K)}));const et=yield this.createFilteredImage(br.q.Battle_interstitial_bg,"interstitial",ON.g),it=[];it.push(...tt.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.fadeOut()}))))),it.push(et.fadeIn()),yield Promise.all(it),yield null==Z?void 0:Z(CN.OldBackgroundsOut),tt.forEach((q=>{q.destroy()})),tt.length=0;const nt=q.map((q=>{const K=q.GameObject,z=q.sprite.key;return q.destroy(),An.K.safeUnloadImage(z),K}));for(const Q of z)Q.destroy();const at=new Promise((q=>{st.q.instance.prodigy.load.assets(J,q)})),rt=X.Egh.timeout(IN.MINIMUM_TRANSITION_WAIT_TIME_MS);yield Promise.all([at,rt]),yield Promise.all(nt.map(((q,K)=>(0,Q.sH)(this,void 0,void 0,(function*(){const z=q.addComponent(Po._);yield z.setAsset(J[K]),z.sizeToSourceImage();const Y=z.GameObject.addComponent(AN);Y.fadeValue=0,Y.applyFilter(),Y.useAlpha=K>0,tt.push(Y)}))))),Y.forEach((q=>{q.active=!0;const K=q.addComponent(AN);K.fadeValue=0,K.applyFilter(),K.useAlpha=!1,tt.push(K)})),yield null==Z?void 0:Z(CN.NewBackgroundsLoaded);const ot=[];ot.push(...tt.map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.fadeIn()}))))),ot.push(et.fadeOut()),yield Promise.all(ot),tt.forEach((q=>{q.destroy()})),et.GameObject.destroy()}))}static createFilteredImage(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){const Y=new X._mx;Y.layer=K,X.wa5.getActiveScene().addGameObject(Y);const Q=Y.addComponent(X.XVE);Q.pivot.set(0,0),Q.setAnchoredPivotOffset(0,0),Q.fullWidth=st.q.instance.game.width,Q.fullHeight=st.q.instance.game.height;const Z=Y.addComponent(Po._);yield Z.setAsset(q);const J=Y.addComponent(z);return J.applyFilter(),J}))}}IN.MINIMUM_TRANSITION_WAIT_TIME_MS=2e3;class DN extends xP.V{constructor(){super(...arguments),this._stateOverrideStep=0,this._puppetMasterDefeatSequenceEnd=new X.bnh,this._activeUnitIndicatorStep=0,this._unitMpDrainSpines=new Map}getAssetList(){return[...this._baseAssets,ph.B.Sfx_large_explosion_with_glass,ph.B.Sfx_short_explosion_with_rubble_A,ph.B.Sfx_short_explosion_with_rubble_B,ph.B.Sfx_medium_explosion_with_rubble_A,ph.B.Sfx_medium_explosion_with_rubble_B,ph.B.Sfx_long_explosion_with_rubble_A,ph.B.Sfx_long_explosion_with_rubble_B,ph.B.Sfx_puppet_master_spell_cast,ph.B.Sfx_puppet_master_spell_map_transition,ph.B.Sfx_puppet_master_spell_downpour,ph.B.Sfx_puppet_master_spell_mp_drain,ph.B.Sfx_puppet_master_spell_beam_travel,ph.B.Sfx_puppet_master_spell_beam_impact,ph.B.Sfx_puppet_master_spell_pet_steal_travel,ph.B.Sfx_puppet_master_spell_volcano,ph.B.Sfx_puppet_master_battle_ground_rumble,ph.B.Sfx_puppet_master_battle_heavenly_harmonic,ph.B.Sfx_puppet_master_battle_keystone_flash,ph.B.Sfx_puppet_master_defeat_animation,ph.B.Bgm_puppet_master_ambient_loop,ph.B.Bgm_puppet_master_victory_loop,ct.Q.Spine_battle_mp_drain_json]}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){this._finalBackgrounds=this._localConfig.backgroundID,this._localConfig.backgroundID=[br.q.Battle_academy_gh_pedestal_bg,br.q.Battle_academy_gh_pedestal_fg],yield K.initBattlePrefab.call(this,q);for(const q of this.getUnits())q.uiContent.active=!1;this.setUnitTooltipLock(!0);const z=yield this._prefabLoader.loadWithDependenciesFromGUID(Pi.l.GuardianBattleFog);this._battleFogAnimator=z.findComponentInChildren(Ur.j),this._battleFogAnimator.GameObject.active=!1;const Y=yield this._prefabLoader.loadWithDependenciesFromGUID(Pi.l.PuppetMasterBattleEnvironmentFX);this._prefabRoot.addChild(Y),this._battleBackgroundFX=Y.findComponent(_N.n),this._fxAnimatorObjects=this._battleBackgroundFX.getAnimators().map((q=>q.GameObject));for(const q of this._fxAnimatorObjects)q.active=!1;this._keystoneAnimator=X.wa5.getActiveScene().container.get("KEYSTONE_ANIMATOR"),this._keystoneAnimator.GameObject.active=!1,this._puppetMaster=this.rightTeam.units.find((q=>q.battleId===DN.PUPPET_MASTER_BATTLE_ID)),this._puppetMaster.size=EM.X.Medium,this._puppetMaster.creature.teleportType=sM.H0.None,this._pmSpellCastSfx=this._puppetMaster.creature.castSpellSfx,this._puppetMaster.creature.defeated=()=>(0,Q.sH)(this,void 0,void 0,(function*(){})),this._puppetMaster.onDefeatAnimationFinished.add((()=>{this.runPuppetMasterDefeatSequence().catch((q=>{sh.captureException(q),X.RQr.logError(q,"Error showing puppet master defeat sequence")}))}));for(const q of this.getTeam(EM.h.Home).units){const K=q.mpBar.mpAnimators.map((q=>{const K=new X._mx(q.GameObject);K.active=!1;const z=K.addComponent(ea.v);return z.setAsset(ct.Q.Spine_battle_mp_drain_json),z}));this._unitMpDrainSpines.set(q.data.unitId,K)}}))}getStateOverride(q){switch(null==q?void 0:q.type){case rt.EBattleStateUpdate.NewRound:switch(this._stateOverrideStep++){case 0:const K=DN.ROUND_DIALOGUES[q.round];if(K)return K.shouldTaunt&&(0,ZP.ib)(this._puppetMaster.creature.animator,["taunt","idle"],!0),K.isNPCSpellCast&&(this._activeUnitIndicatorStep=1,this._showIndicator=!1,this._puppetMaster.creature.castSpellSfx=null),[FP,K.dialogues];break;case 1:if(1===q.round)return[GP,this.playBackgroundTransitionSequence()]}break;case rt.EBattleStateUpdate.SetActiveUnit:1===this._activeUnitIndicatorStep?this._activeUnitIndicatorStep++:2===this._activeUnitIndicatorStep&&(this._activeUnitIndicatorStep=0,this._showIndicator=!0,this._puppetMaster.creature.castSpellSfx=this._pmSpellCastSfx);break;case rt.EBattleStateUpdate.CastSpell:for(const K of q.targets)K.hits.some((q=>q.mpDamage>0))&&this.playMpDrain(K.unitId,1300).catch(X.RQr.createHandler("Error playing MP drain animation"));break;case rt.EBattleStateUpdate.EndBattle:if(0==this._stateOverrideStep++&&this._puppetMaster.isDefeated())return[GP,this._puppetMasterDefeatSequenceEnd]}return this._stateOverrideStep=0,super.getStateOverride(q)}getScalableBattleDrops(){return[...super.getScalableBattleDrops(),...EN.p.PUPPET_MASTER_GEAR_DROPS]}getUnitDataForTeam(q,K){const z=super.getUnitDataForTeam(q,K),Y=z.find((q=>q.unitId===DN.PUPPET_MASTER_BATTLE_ID));return Y&&(Y.unitSlot=3),z}playBackgroundTransitionSequence(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=[];st.q.instance.prodigy.audio.playSFXFromGUID(ph.B.Sfx_puppet_master_spell_map_transition),yield X.Egh.timeout(250),q.push((0,ZP.ib)(this._puppetMaster.creature.animator,["summon","throw-down"],!0)),yield X.Egh.timeout(1700),this._battleFogAnimator.GameObject.active=!0;const K=(0,ZP.ib)(this._battleFogAnimator,["fade-in","idle"],!0),z=this._prefabRoot.children.find((q=>"backgroundImage"===q.layer)),Y=this._prefabRoot.children.find((q=>"foregroundImage"===q.layer)),Z=z.findComponentInChildren(Po._),J=Y.findComponentInChildren(Po._);q.push(IN.swapBackgrounds([Z,J],this._finalBackgrounds,void 0,this._fxAnimatorObjects,(q=>(0,Q.sH)(this,void 0,void 0,(function*(){q===CN.NewBackgroundsLoaded&&(this._keystoneAnimator.GameObject.active=!0,yield K,this._battleFogAnimator.playAnimation("fade-out",!1))}))))),yield Promise.all(q),this._battleFogAnimator.GameObject.destroy(),yield(0,ZP.ib)(this._puppetMaster.creature.animator,["taunt","idle"],!0),yield Promise.all(this.getUnits().map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){q.uiContent.active=!0,yield q.fadeUi(1,0)}))))),this.setUnitTooltipLock(!1),yield this.setSpellBookVisible(!0)}))}playMpDrain(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){const z=this._unitMpDrainSpines.get(q),Y=this.getUnits().find((K=>K.battleId===q));if(Y&&z){yield X.Egh.timeout(K);const q=[];for(let K=0;K0&&(yield X.Egh.timeout(300)),Q.GameObject.active=!0,q.push(Sc.qb(Q.getSpine(),"mp-drain",!1).then((()=>Q.GameObject.active=!1)))}yield Promise.all(q)}}))}runPuppetMasterDefeatSequence(){return(0,Q.sH)(this,void 0,void 0,(function*(){st.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(16,Fe.jT.PuppetMasterBattleWon),this.setUnitTooltipLock(!0);const q=X.wa5.getActiveScene().container,K=st.q.instance.prodigy.audio;K.playBGM(ph.B.Bgm_puppet_master_ambient_loop,!0),this._puppetMaster.uiContent.active=!0,yield X.Egh.timeout(1e3),(()=>(0,Q.sH)(this,void 0,void 0,(function*(){yield this.setActiveUnit(null),yield this.setSpellBookVisible(!1)})))().catch(X.RQr.createHandler("Error clearing active unit")),this._ignoreUnitEntranceUIWhenMoving=!0,yield Promise.all(this.getUnits().map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return q.fadeUi(0)}))))),yield Sc.v$([1479]),K.playSFXFromGUID(ph.B.Sfx_puppet_master_battle_ground_rumble);const z=q.get("LETTERBOX");z.start();const Y=K.playSFXFromGUID(ph.B.Sfx_puppet_master_battle_heavenly_harmonic);yield st.q.instance.game.add.tween(X.i7d.main.GameObject.transform.localPosition,this).to({x:"+=34",y:"-=69"},2e3,yN.K.getEasingFunctionFromEnum(yN.i.SinusoidalInOut),!0).onTweenComplete.asPromise();const Z=q.get("SCREEN_SHAKE");Z.durationMS=6e3,Z.buildupDuration=2e3,Z.falloffDuration=3e3,Z.cycles=80,Z.amplitude=3,Z.run(),yield X.Egh.timeout(3e3),K.playSFXFromGUID(ph.B.Sfx_puppet_master_battle_keystone_flash),yield new Promise(((q,K)=>{(0,ZP.ib)(this._keystoneAnimator,["keystone-active-cast-battle","keystone-spent-idle-battle"],!0).then(q).catch(K),this._keystoneAnimator.spine.onEvent.addOnce(q)})),st.q.instance.game.add.tween(Y.instances[0],this).to({volume:0},2500,X.GS3.Linear.None,!0);const J=q.get("KEYSTONE_GLOWS");J.getRootContainer().alpha=0,J.GameObject.active=!0,yield Promise.race([st.q.instance.game.add.tween(J.getRootContainer(),this).to({alpha:1},1e3,yN.K.getEasingFunctionFromEnum(yN.i.SinusoidalInOut),!1).to({alpha:1},2e3,void 0,!1).to({alpha:0},1e3,yN.K.getEasingFunctionFromEnum(yN.i.SinusoidalInOut),!1).start().onTweenComplete.asPromise().then((()=>J.GameObject.active=!1)),X.Egh.timeout(2e3)]),this._puppetMaster.creature.animator.playAnimation("defeat",!1),K.playSFXFromGUID(ph.B.Sfx_puppet_master_defeat_animation),yield this._puppetMaster.creature.animator.OnAnimationComplete.asPromise(),yield X.Egh.timeout(3250);const tt=Ho.B.musicVolume.addSmoothedLensMultiplier(0);yield X.Egh.timeout(750);const et=yield this._prefabLoader.loadWithDependenciesFromGUID(Pi.l.EndgameIllustrationPuppetMasterDefeat);K.playBGM(this._localConfig.victoryMusicID,!0),tt.remove();const it=et.findComponentInChildren(MA.V);this.battleResult.onOpened.addOnce((()=>{null==et||et.destroy()})),yield X.Egh.timeout(1e3),st.q.instance.game.add.tween(X.i7d.main.GameObject.transform.localPosition,this).to({x:"-=34",y:"+=69"},1e3,yN.K.getEasingFunctionFromEnum(yN.i.SinusoidalInOut),!0),z.end(),yield it.onComplete.asPromise(),st.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(17,Fe.jT.PostPuppetMasterVisualsShown),this._puppetMasterDefeatSequenceEnd.resolve()}))}onStartBattle(){const q=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,Q.sH)(this,arguments,void 0,(function*(K=!1){yield q.onStartBattle.call(this,K)}))}}DN.PUPPET_MASTER_BATTLE_ID="puppetmaster",DN.ROUND_DIALOGUES={1:{dialogues:[1441]},2:{dialogues:[1442],shouldTaunt:!0},3:{dialogues:[1443],shouldTaunt:!0},4:{dialogues:[1444],isNPCSpellCast:!0},5:{dialogues:[1446]},6:{dialogues:[1445],shouldTaunt:!0},7:{dialogues:[1447,1448,1449],shouldTaunt:!0},8:{dialogues:[1450],shouldTaunt:!0},9:{dialogues:[1451]}};class RN extends xP.V{constructor(){super(...arguments),this._fakeWeightDividend=5}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q),this._modifierGridPrefab=yield yM.Q.addModifierGridPrefab(yM.Q.MODIFIER_GRID_X_IN_BATTLE,yM.Q.MODIFIER_GRID_Y_IN_BATTLE)}))}processBattleStateUpdates(q){for(const K of q)K.type===rt.EBattleStateUpdate.CustomEvent&&K.name===rA.wJ.RewardDetermined&&(_M.T.reward=K.data.reward);return q}onEndGame(q){const K=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,Q.sH)(this,void 0,void 0,(function*(){this._modifierGridPrefab.destroy(),this._modifierGridPrefab=null,yield K.onEndGame.call(this,q)}))}showBattleResult(q,K,z,Y){const Z=Object.create(null,{showBattleResult:{get:()=>super.showBattleResult}});return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z,Y,Q=!0){var tt,et,it,nt;if(!Q)return;if(!_M.T.isFinalBattle)return void(yield Z.showBattleResult.call(this,q,K,z,Y,Q));const at=st.q.instance.prodigy.gameContainer.get("81d-5606"),rt=st.q.instance.prodigy.gameContainer.get("782-c308"),ot=null===(tt=at.riftsTierTotalData)||void 0===tt?void 0:tt[_M.T.riftTier],ht=null!==(et=null==ot?void 0:ot.rewards)&&void 0!==et?et:[];let ct=ht.map((q=>({type:q.type,ID:q.id,N:q.quantity,R:q.weight})));ct=ct.filter((q=>rA._u.includes(q.type)||rt.getItemCount(q.type,q.ID)<=0));const dt=ht.reduce(((q,K)=>q+K.weight),0);let lt;if(!lt){const q=_M.T.reward;if(q){const K=null===(it=Ee.t.getItem(q.type,q.id))||void 0===it?void 0:it.data;lt={type:q.type,ID:q.id,N:q.quantity,data:{name:K?Nn.J.getLocalizationNameKey(q):"",flavorText:K?Nn.J.getLocalizationFlavorKey(q):"",rarity:null!==(nt=null==K?void 0:K.rarity)&&void 0!==nt?nt:0}}}}if(lt&&(J().find(ct,(q=>q.id===lt.ID&&q.type===lt.type&&q.quantity===lt.N))||ct.push({type:lt.type,ID:lt.ID,N:lt.N,R:Math.round(dt/this._fakeWeightDividend)}),"petHat"!==lt.type&&"petRelic"!==lt.type||st.q.instance.prodigy.gameContainer.get("9cf-c09f").refreshPetGear().catch(X.RQr.createHandler("RiftRunBattleController: Failed to refresh pet gear after being awarded it after a rift run")),(0,XP.p)(lt.type,lt.ID))){st.q.instance.prodigy.gameContainer.get("20f-5f67").postBattleFlow.itemTransaction.setIndividualData(lt.type,lt.ID,{instance_type:Li.N.RiftRun,source_type:On.C.PrizeWheel})}yield new Promise((q=>{st.q.instance.prodigy.open.bossRewards([],Li.N.RiftRun,Pi.l.BossRewardUIwithnorespin,lt?[lt]:void 0,ct,q,!0,!lt||!(0,XP.p)(lt.type,lt.ID))})),yield Z.showBattleResult.call(this,q,K,z,Y,Q)}))}}var PN,MN,NN,xN,LN,kN,BN,UN,FN,GN,jN=z(87539);!function(q){q[q.PreBattleDialogue=0]="PreBattleDialogue",q[q.TeleportSwap=1]="TeleportSwap",q[q.NPCDialogueStart=2]="NPCDialogueStart",q[q.NPCDialoguePlayed=3]="NPCDialoguePlayed"}(PN||(PN={}));class $N extends xP.V{constructor(){super(...arguments),this._activeUnitIndicatorStep=0,this._cachedLastRound=0}getAssetList(){return[...this._baseAssets,ph.B.Sfx_puppet_master_spell_map_transition]}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){this._localConfig.backgroundID=[br.q.Battle_academy_gh_pedestal_bg,br.q.Battle_academy_gh_pedestal_fg],yield K.initBattlePrefab.call(this,q);for(const q of this.getUnits())q.uiContent.active=!1;this._battleData=jN.m.getGuardianData(this.type);const z=yield this._prefabLoader.loadWithDependenciesFromGUID(Pi.l.GuardianBattleFog);this._battleFogAnimator=z.findComponentInChildren(Ur.j),this._battleFogAnimator.GameObject.active=!1,this.setUnitTooltipLock(!0);const Y=this.getUnits().find((q=>"guardian"===q.battleId)),Q=Y.name,X=Object.assign(Object.assign({},Y.data),{asset:{type:Hi.uj.Boss,id:59}});Y.creature.creatureGameObject.destroy(),Y.setData(X,sM.H0.ShadowBig,Y.controllerUnit),Y.name=Q,yield Y.loadPromise,Y.creature.creatureGameObject.active=!0,Y.uiContent.active=!1,this._swapUnit=Y,this._overrideStep=PN.PreBattleDialogue}))}onStartBattle(){const q=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,Q.sH)(this,arguments,void 0,(function*(K=!1){yield q.onStartBattle.call(this,K)}))}getStateOverride(q){switch(null==q?void 0:q.type){case rt.EBattleStateUpdate.NewRound:switch(this._cachedLastRound=q.round,this._overrideStep){case PN.PreBattleDialogue:return this._overrideStep=PN.TeleportSwap,[FP,this._battleData.puppetMasterDialogueSequence];case PN.TeleportSwap:return this._overrideStep=PN.NPCDialogueStart,[GP,this.playTeleportSwapSequence()];case PN.NPCDialogueStart:const q=this._battleData.npcHelperData.find((q=>q.entranceRound===this._cachedLastRound));if(q)return this._activeUnitIndicatorStep=1,this._showIndicator=!1,this._overrideStep=PN.NPCDialoguePlayed,[FP,q.dialogueSequence];break;case PN.NPCDialoguePlayed:this._overrideStep=PN.NPCDialogueStart}break;case rt.EBattleStateUpdate.SetActiveUnit:if(1===this._activeUnitIndicatorStep)this._activeUnitIndicatorStep++;else if(2===this._activeUnitIndicatorStep){this._activeUnitIndicatorStep=0,this._showIndicator=!0;const q=this._battleData.npcHelperData.find((q=>q.entranceRound===this._cachedLastRound));if(null==q?void 0:q.dialogueSequenceReprise)return[FP,q.dialogueSequenceReprise]}break;case rt.EBattleStateUpdate.CustomEvent:this._swapUnit.creature.breakBarrier()}return null}playTeleportSwapSequence(){return(0,Q.sH)(this,void 0,void 0,(function*(){st.q.instance.prodigy.audio.playSFXFromGUID(ph.B.Sfx_puppet_master_spell_map_transition),yield X.Egh.timeout(250),this._swapUnit.creature.animator.playAnimation("summon",!1),yield X.Egh.timeout(1500),yield this._swapUnit.playDefeated();const q=this._prefabRoot.children.find((q=>"backgroundImage"===q.layer)),K=this._prefabRoot.children.find((q=>"foregroundImage"===q.layer)),z=q.findComponentInChildren(Po._),Y=K.findComponentInChildren(Po._),Z=IN.swapBackgrounds([z,Y],[br.q[this._battleData.backgroundImageKey],br.q[this._battleData.foregroundImageKey]]),J=Object.assign(Object.assign({},this._swapUnit.data),{asset:{type:Hi.uj.Boss,id:this._battleData.bossID}});this._swapUnit.creature.creatureGameObject.destroy(),this._swapUnit.setData(J,sM.H0.ShadowBig,this._swapUnit.controllerUnit),this._swapUnit.uiContent.active=!1,this._swapUnit.onDefeatAnimationStarted.add((()=>this._battleFogAnimator.playAnimation("fade-out",!1)),this),this._battleFogAnimator.GameObject.active=!0,this._battleFogAnimator.playAnimation("fade-in",!1),yield this._battleFogAnimator.OnAnimationComplete.asPromise(),this._battleFogAnimator.playAnimation("idle",!0),yield Promise.all([Z,this._swapUnit.loadPromise]),yield this._swapUnit.enterBattle(!0),this._battleData.displayShield&&this._swapUnit.loadPromise.then((()=>{this._swapUnit.creature.addBarrier(sM.HW.Spine,ct.Q.Spine_shadow_boss_shield_json,0,-50)})).catch(X.RQr.createHandler("Error adding guardian barrier")),yield Promise.all(this.getUnits().map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){q.uiContent.active=!0,yield q.fadeUi(1,0)}))))),yield X.Egh.timeout($N.POST_BG_TRANSITION_DELAY_MS),this.setUnitTooltipLock(!1),yield this.setSpellBookVisible(!0)}))}}$N.POST_BG_TRANSITION_DELAY_MS=1e3;class HN extends xP.V{initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q);const z=this.rightTeam.units.find((q=>q.type===Hi.uj.Titan));z&&this.repositionTitanUnit(z)}))}repositionTitanUnit(q){q.GameObject.transform.setPositionY(-200),q.targetComponent.GameObject.parent.transform.setPosition(-50,172),q.uiContent.transform.setPosition(-50,172),q.turnIndicatorOffset={x:0,y:200}}onVictory(q,K,z){const Y=Object.create(null,{onVictory:{get:()=>super.onVictory}});return(0,Q.sH)(this,void 0,void 0,(function*(){const Q=st.q.instance.prodigy.titansNetworkHandler;Q.hitTitan(Q.titan.id),yield this.textLog.waitForMessage("COMBAT_TITAN_HIT"),yield Y.onVictory.call(this,q,K,z)}))}onDefeat(){return(0,Q.sH)(this,void 0,void 0,(function*(){}))}getNonScalableBattleDrops(){const q=super.getNonScalableBattleDrops(),K=st.q.instance.prodigy.titansNetworkHandler,z=Math.floor(K.isCatapultBattle?2:1);return q.push(HN.getTitanShardDrop(z)),q}getNonScalableMemberBattleDrops(){const q=super.getNonScalableMemberBattleDrops();return q.push(HN.getTitanShardDrop(1)),q}static getTitanShardDrop(q){return{ID:11,type:"currency",N:q*st.q.instance.prodigy.gameContainer.get("119-35f9").getTitanShardMultiplier()}}}!function(q){q[q.Initialize=0]="Initialize",q[q.FirstClickOnSpellCard=1]="FirstClickOnSpellCard",q[q.FirstTargetConfirmed=2]="FirstTargetConfirmed",q[q.MagicPointsEmptyAlert=3]="MagicPointsEmptyAlert",q[q.MagicPointsFilled=4]="MagicPointsFilled",q[q.Complete=5]="Complete"}(MN||(MN={})),function(q){q[q.Step0PositionX=260]="Step0PositionX",q[q.Step0PositionY=520]="Step0PositionY",q[q.Step1PositionX=965]="Step1PositionX",q[q.Step1PositionY=275]="Step1PositionY",q[q.Step2PositionX=547]="Step2PositionX",q[q.Step2PositionY=610]="Step2PositionY"}(NN||(NN={})),function(q){q[q.PositionX=720]="PositionX",q[q.PositionY=150]="PositionY",q[q.Width=360]="Width",q[q.Height=360]="Height"}(xN||(xN={}));!function(q){q[q.Initialize=0]="Initialize",q[q.FirstClickOnSpellCard=1]="FirstClickOnSpellCard",q[q.FirstTargetConfirmed=2]="FirstTargetConfirmed",q[q.MagicPointsEmptyAlert=3]="MagicPointsEmptyAlert",q[q.MagicPointsFilled=4]="MagicPointsFilled",q[q.SecondClickOnSpellCard=5]="SecondClickOnSpellCard",q[q.SecondTargetConfirmed=6]="SecondTargetConfirmed",q[q.EndBattleDialogue=7]="EndBattleDialogue",q[q.Complete=8]="Complete"}(LN||(LN={})),function(q){q[q.Step0PositionX=260]="Step0PositionX",q[q.Step0PositionY=520]="Step0PositionY",q[q.Step1PositionX=965]="Step1PositionX",q[q.Step1PositionY=115]="Step1PositionY",q[q.Step2PositionX=547]="Step2PositionX",q[q.Step2PositionY=610]="Step2PositionY"}(kN||(kN={})),function(q){q[q.PositionX=720]="PositionX",q[q.PositionY=150]="PositionY",q[q.Width=360]="Width",q[q.Height=360]="Height"}(BN||(BN={}));!function(q){q[q.Initialize=0]="Initialize",q[q.RescueAvailable=1]="RescueAvailable",q[q.ClickOnRescueButton=2]="ClickOnRescueButton",q[q.RescueTargetConfirmed=3]="RescueTargetConfirmed"}(UN||(UN={})),function(q){q[q.Step0PositionX=1220]="Step0PositionX",q[q.Step0PositionY=525]="Step0PositionY",q[q.Step1PositionX=965]="Step1PositionX",q[q.Step1PositionY=275]="Step1PositionY"}(FN||(FN={})),function(q){q[q.PositionX=720]="PositionX",q[q.PositionY=150]="PositionY",q[q.Width=360]="Width",q[q.Height=360]="Height"}(GN||(GN={}));class VN extends LP{constructor(){super(...arguments),this._currentTutorialStep=UN.Initialize}getAssetList(){return[...this._baseAssets,ph.B.Voice_10_105_rescue_charfoal,ph.B.Voice_10_108_rescue_sproot,ph.B.Voice_10_109_rescue_wott,ph.B.Voice_10_106_rescue_mermina,ph.B.Voice_10_107_rescue_snowfluff]}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this.shouldNotifyWhenRescueAvailable=!1}))}showSpellCards(q,K=!0){super.showSpellCards(q,K),this.spellCardsController.onUiReady.add((()=>{this._currentTutorialStep===UN.Initialize&&this.isRescueAvailable()&&setTimeout((()=>{var q;const K=null===(q=this.spellCardsController)||void 0===q?void 0:q.petRescueCard.findComponentInChildren(X.XVE);K&&this._currentTutorialStep===UN.Initialize&&(this._currentTutorialStep++,this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new tt.Point(0,0),new X.or0(0,0)),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(FN.Step0PositionX,FN.Step0PositionY)),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_5",this.rightTeam.units[0].name),this._tutorialControllerComponent.playNootWidgetIn(!0,this.getStarterPetSoundAsset()),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(K),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(FN.Step0PositionX,FN.Step0PositionY)))}),0)}));const z=this.spellCardsController.targetController;z.onActionChange.add((q=>{this._currentTutorialStep===UN.RescueAvailable&&(this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new tt.Point(GN.PositionX,GN.PositionY),new X.or0(GN.Width,GN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(FN.Step1PositionX,FN.Step1PositionY)))})),z.onTargetConfirmed.add((()=>{this._currentTutorialStep===UN.ClickOnRescueButton&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0))}))}setActiveUnit(q){const K=Object.create(null,{setActiveUnit:{get:()=>super.setActiveUnit}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.setActiveUnit.call(this,q),this._currentTutorialStep===UN.Initialize&&this.isRescueAvailable()&&(this.textLog.GameObject.active=!1)}))}getStarterPetSoundAsset(){var q;switch(null===(q=this.rightTeam.units[0])||void 0===q?void 0:q.data.asset.id){case VN.STARTER_PET_CHARFOAL:return ph.B.Voice_10_105_rescue_charfoal;case VN.STARTER_PET_SPROOT:return ph.B.Voice_10_108_rescue_sproot;case VN.STARTER_PET_WOTT:return ph.B.Voice_10_109_rescue_wott;case VN.STARTER_PET_MERMINA:return ph.B.Voice_10_106_rescue_mermina;case VN.STARTER_PET_SNOWFLUFF:return ph.B.Voice_10_107_rescue_snowfluff;default:return null}}}VN.STARTER_PET_SNOWFLUFF=148,VN.STARTER_PET_MERMINA=145,VN.STARTER_PET_WOTT=142,VN.STARTER_PET_SPROOT=139,VN.STARTER_PET_CHARFOAL=136;var WN,qN=z(21001);!function(q){q[q.Initialize=0]="Initialize",q[q.Dialogue=1]="Dialogue",q[q.RescueAvailable=2]="RescueAvailable",q[q.ClickOnRescueButton=3]="ClickOnRescueButton",q[q.RescueTargetConfirmed=4]="RescueTargetConfirmed"}(WN||(WN={}));const KN=new tt.Point(965,275),zN=new tt.Point(799,360);var YN,QN,XN,ZN;!function(q){q[q.PositionX=720]="PositionX",q[q.PositionY=150]="PositionY",q[q.Width=360]="Width",q[q.Height=360]="Height"}(YN||(YN={}));!function(q){q[q.Initialize=0]="Initialize",q[q.ClickAOESpellCard=1]="ClickAOESpellCard",q[q.ClickTargetConfirmed=2]="ClickTargetConfirmed",q[q.PlayNootDialogue=3]="PlayNootDialogue",q[q.Complete=4]="Complete"}(QN||(QN={})),function(q){q[q.Step0PositionX=260]="Step0PositionX",q[q.Step0PositionY=520]="Step0PositionY",q[q.Step1PositionOffsetX=230]="Step1PositionOffsetX",q[q.Step1PositionOffsetY=27]="Step1PositionOffsetY",q[q.Step1Rotation=-90]="Step1Rotation"}(XN||(XN={})),function(q){q[q.PositionX=0]="PositionX",q[q.PositionY=0]="PositionY",q[q.Width=1280]="Width",q[q.Height=550]="Height"}(ZN||(ZN={}));class JN extends xP.V{initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q);const z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=yield this._ultimatesDataProvider.getCurrentQuestData();this.currentQuestData=Y.find((q=>q.questID===z.ultimateQuestId))}))}}(0,Q.Cg)([(0,Ge.b)("d24-279f"),(0,Q.Sn)("design:type",rn.m)],JN.prototype,"_ultimatesDataProvider",void 0);class tx{static getBattleController(q){const K=this._battleControllerMap[q.battleType];return K?new K(q):(X.VyI.log(`No battle controller found for battle type: ${q.battleType}. Using basic battle controller as a fallback`,X.$bb.Warning),new xP.V(q))}}tx._battleControllerMap={[Hi.gu.Basic]:xP.V,[Hi.gu.Ultimates]:JN,[Hi.gu.Duel]:HM,[Hi.gu.MatchmakingDuel]:vN,[Hi.gu.MatchmakingBotDuel]:pN,[Hi.gu.DarkTower]:IM,[Hi.gu.NormalRiftRun]:RN,[Hi.gu.LootDash]:cN,[Hi.gu.FestivalDailyBattle]:xP.V,[Hi.gu.FeaturedSpawn]:xP.V,[Hi.gu.Tutorial1]:class extends LP{constructor(){super(...arguments),this._currentTutorialStep=MN.Initialize}getAssetList(){return[...this._baseAssets,ph.B.Voice_10_103_magic_refilled]}showSpellCards(q,K=!0){super.showSpellCards(q,K),this.spellCardsController.onUiReady.add(((q,K)=>{if(this._currentTutorialStep===MN.Initialize){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1);const q=this.spellCardsController.getSpellCardAtIndex(0).findComponentInChildren(X.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(q),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(NN.Step0PositionX,NN.Step0PositionY))}else if(this._currentTutorialStep===MN.FirstTargetConfirmed&&q)this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!0,NP.W.StraightIdle,new tt.Point(NN.Step2PositionX,NN.Step2PositionY));else if(this._currentTutorialStep===MN.MagicPointsEmptyAlert&&q)this._tutorialControllerComponent.enableGuideHand(!0,NP.W.StraightIdle,new tt.Point(NN.Step2PositionX,NN.Step2PositionY));else if(this._currentTutorialStep===MN.MagicPointsEmptyAlert&&!q&&K)this._tutorialControllerComponent.enableGuideHand(!1);else if(this._currentTutorialStep===MN.MagicPointsEmptyAlert&&!q&&!K){this._currentTutorialStep++;setTimeout((()=>{this._currentTutorialStep===MN.MagicPointsFilled&&(this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_4"),this._tutorialControllerComponent.playNootWidgetIn(!0,ph.B.Voice_10_103_magic_refilled))}),2400)}}));const z=this.spellCardsController.targetController;z.onActionChange.add((q=>{this._currentTutorialStep===MN.Initialize?(this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new tt.Point(xN.PositionX,xN.PositionY),new X.or0(xN.Width,xN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(NN.Step1PositionX,NN.Step1PositionY))):this._currentTutorialStep===MN.MagicPointsFilled&&q&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0))})),z.onTargetConfirmed.add((()=>{this._currentTutorialStep===MN.FirstClickOnSpellCard&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen())}))}alertActiveUnitMpEmpty(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.activeUnit.alertMpEmpty(!0)}))}},[Hi.gu.Tutorial2]:VN,[Hi.gu.Tutorial3]:class extends LP{constructor(){super(...arguments),this._currentTutorialStep=QN.Initialize}getAssetList(){return[...this._baseAssets,ph.B.Voice_10_104_powerful_hit]}showSpellCards(q,K=!0){super.showSpellCards(q,K),this.spellCardsController.onUiReady.add(((q,K)=>{if(this._currentTutorialStep===QN.Initialize){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1);const q=this.spellCardsController.getSpellCardAtIndex(0).findComponentInChildren(X.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(q),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(XN.Step0PositionX,XN.Step0PositionY))}else this._currentTutorialStep===QN.Complete&&this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0)}));const z=this.spellCardsController.targetController;z.onActionChange.add((()=>{if(this._currentTutorialStep===QN.Initialize){this._currentTutorialStep++;const q=this.rightTeam.units.find((q=>this.battleConstants.getElementalWeakness(q.data.element)===this.activeUnit.data.element));this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new tt.Point(ZN.PositionX,ZN.PositionY),new X.or0(ZN.Width,ZN.Height));const K=q.GameObject.transform.worldPosition.x+XN.Step1PositionOffsetX,z=q.GameObject.transform.worldPosition.y+XN.Step1PositionOffsetY;this._tutorialControllerComponent.enableGuideHand(!0,NP.W.StraightIdle,new tt.Point(K,z),XN.Step1Rotation)}else this._currentTutorialStep===QN.PlayNootDialogue&&(this._currentTutorialStep++,this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this.textLog.GameObject.active=!0)})),z.onTargetConfirmed.add((()=>{this._currentTutorialStep===QN.ClickAOESpellCard&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen())}))}castActionResultsDisplayTriggered(){this._currentTutorialStep===QN.ClickTargetConfirmed&&(this._currentTutorialStep++,this.textLog.GameObject.active=!1,this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_6"),this._tutorialControllerComponent.playNootWidgetIn(!0,ph.B.Voice_10_104_powerful_hit))}},[Hi.gu.Tutorial1Revised]:class extends LP{constructor(){super(...arguments),this._currentTutorialStep=LN.Initialize}getAssetList(){return[...this._baseAssets,ph.B.Voice_10_103_magic_refilled,ph.B.Voice_noot_ftue_choose_spell,ph.B.Voice_noot_ftue_choose_target,ph.B.Voice_noot_ftue_magic_1,ph.B.Voice_noot_ftue_magic_2]}showSpellCards(q,K=!0){super.showSpellCards(q,K),this.spellCardsController.onUiReady.add(((q,K)=>{if(this._currentTutorialStep===LN.Initialize){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1);const q=this.spellCardsController.getSpellCardAtIndex(0).findComponentInChildren(X.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(q),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(kN.Step0PositionX,kN.Step0PositionY)),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_1"),this._tutorialControllerComponent.playNootWidgetIn(!0,ph.B.Voice_noot_ftue_choose_spell)}else if(this._currentTutorialStep===LN.FirstTargetConfirmed&&q){this._currentTutorialStep++;const q=2400;this._tutorialControllerComponent.enableGuideHand(!0,NP.W.StraightIdle,new tt.Point(kN.Step2PositionX,kN.Step2PositionY)),setTimeout((()=>{this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_3"),this._tutorialControllerComponent.playNootWidgetIn(!0,ph.B.Voice_noot_ftue_magic_1),this._tutorialControllerComponent.enableGuideHand(!1)}),q)}else if(this._currentTutorialStep===LN.SecondTargetConfirmed&&q){this._currentTutorialStep++;setTimeout((()=>{this._tutorialControllerComponent.enableGuideHand(!1)}),2400)}else if(this._currentTutorialStep===LN.MagicPointsEmptyAlert&&q){const q=2400;this._tutorialControllerComponent.enableGuideHand(!0,NP.W.StraightIdle,new tt.Point(kN.Step2PositionX,kN.Step2PositionY)),setTimeout((()=>{this._tutorialControllerComponent.enableGuideHand(!1)}),q)}else if(this._currentTutorialStep===LN.MagicPointsEmptyAlert&&!q&&K)this._tutorialControllerComponent.enableGuideHand(!1);else if(this._currentTutorialStep===LN.MagicPointsEmptyAlert&&!q&&!K){this._currentTutorialStep++;const q=2400;this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new tt.Point(0,0),new X.or0(0,0)),this.sendProgress(Qh.l.FirstQuestionAnswered),setTimeout((()=>{this._currentTutorialStep===LN.MagicPointsFilled&&(this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(kN.Step0PositionX,kN.Step0PositionY)),this._tutorialControllerComponent.updateDialogue("BATTLE_REVAMP_TUTORIAL_4",ph.B.Voice_noot_ftue_magic_2))}),q)}}));const z=this.spellCardsController.targetController;z.onActionChange.add((q=>{var K;if(this._currentTutorialStep===LN.Initialize){this._currentTutorialStep++;const q=null===(K=this.spellCardsController.getSpellCardAtIndex(0))||void 0===K?void 0:K.findComponentInChildren(fl.l);X.Aq$.isDefined(q)&&(q.inputEnabled=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new tt.Point(BN.PositionX,BN.PositionY),new X.or0(BN.Width,BN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(kN.Step1PositionX,kN.Step1PositionY)),this._tutorialControllerComponent.updateDialogue("BATTLE_REVAMP_TUTORIAL_2",ph.B.Voice_noot_ftue_choose_target)}else this._currentTutorialStep===LN.SecondClickOnSpellCard&&q&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(kN.Step1PositionX,kN.Step1PositionY)),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue())})),z.onTargetConfirmed.add((()=>{var q;this._currentTutorialStep===LN.FirstClickOnSpellCard?(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.playFadeOutDialogue()):this._currentTutorialStep===LN.SecondTargetConfirmed&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen());const K=null===(q=this.spellCardsController.getSpellCardAtIndex(0))||void 0===q?void 0:q.findComponentInChildren(fl.l);X.Aq$.isDefined(K)&&(K.inputEnabled=!0)}))}alertActiveUnitMpEmpty(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.activeUnit.alertMpEmpty(!0)}))}getStateOverride(q){if(this._currentTutorialStep===LN.EndBattleDialogue&&(null==q?void 0:q.type)===rt.EBattleStateUpdate.EndBattle&&(null==q?void 0:q.victoriousTeamId)===rt.ETeamId.Home)return this._currentTutorialStep++,[FP,[1571]]}onPlayerAction(q){const K=Object.create(null,{onPlayerAction:{get:()=>super.onPlayerAction}});return(0,Q.sH)(this,void 0,void 0,(function*(){const z=yield K.onPlayerAction.call(this,q);if(q.type===rt.EBattleAction.CastSpell&&2===z.filter((q=>q.id===this.battleConstants.fumbleSpellId)).length){const q=z.findIndex((q=>q.type===rt.EBattleStateUpdate.CastSpell)),K=z.find((q=>q.type===rt.EBattleStateUpdate.EndBattle));return[...z.slice(0,q+1),K]}return z}))}sendProgress(q){st.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:q})}},[Hi.gu.Tutorial2Revised]:class extends LP{constructor(){super(...arguments),this._currentTutorialStep=WN.Initialize}getAssetList(){return[...this._baseAssets,ph.B.Voice_noot_ftue_pet_rescue]}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.initBattlePrefab.call(this,q),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this.shouldNotifyWhenRescueAvailable=!1}))}getStateOverride(q){const K=this.getUnits().filter((q=>q.data.teamId===rt.ETeamId.Home)).map((q=>q.data.unitId));return this._currentTutorialStep===WN.Initialize&&q.type===rt.EBattleStateUpdate.SetActiveUnit&&K.includes(q.unitId)?(this._currentTutorialStep++,[FP,[1572,1573]]):null}showSpellCards(q,K=!0){super.showSpellCards(q,K);const z=this.getTeamById(rt.ETeamId.Away).units[0];this.spellCardsController.onUiReady.add((()=>{this._currentTutorialStep===WN.Dialogue&&this.isRescueAvailable()&&setTimeout((()=>{var q;const K=null===(q=this.spellCardsController)||void 0===q?void 0:q.petRescueCard.findComponentInChildren(X.XVE),Y=new tt.Point(1100,600),Q=new X.or0(180,180);K&&this._currentTutorialStep===WN.Dialogue&&(this._currentTutorialStep++,this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new tt.Point(0,0),new X.or0(0,0)),this._tutorialControllerComponent.setGuideHandLayer(Ch.E.Ui),z.unitTooltipIsShowing?(this._currentTutorialStep=WN.ClickOnRescueButton,this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,zN)):this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,KN),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_5",(0,Ka.k)("BATTLE_REVAMP_TUTORIAL_5_PET")),this._tutorialControllerComponent.playNootWidgetIn(!0,ph.B.Voice_noot_ftue_pet_rescue),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(Y,Q),this._activeUnit.spells.forEach((q=>{q.spellId!==this.battleConstants.rescueSpellId&&(q.isLocked=!0)})),this.spellCardsController.getSpellCards().forEach((q=>{var K;null===(K=q.findComponentInChildren(qN.y))||void 0===K||K.initialize();const z=q.findComponentInChildren(fl.l);z&&(z.currentState=hc.K.Up)})))}),0)})),z.onInfoTooltipShown.removeAll(this),z.onInfoTooltipShown.add((()=>{this._currentTutorialStep===WN.RescueAvailable&&(this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,zN),this.grantTutorialCurrency(),this._currentTutorialStep=WN.ClickOnRescueButton)}),this),z.onInfoTooltipHidden.removeAll(this),z.onInfoTooltipHidden.add((()=>{this._currentTutorialStep===WN.ClickOnRescueButton&&(this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,KN),this._currentTutorialStep=WN.RescueAvailable)}),this);this.spellCardsController.targetController.onActionChange.add((q=>{this._currentTutorialStep===WN.RescueAvailable&&(this.grantTutorialCurrency(),this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new tt.Point(YN.PositionX,YN.PositionY),new X.or0(YN.Width,YN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,KN))})),this._stateMachine.onStateChange.add((q=>{q instanceof jM.N&&(this._currentTutorialStep!==WN.RescueAvailable&&this._currentTutorialStep!==WN.ClickOnRescueButton||(this._currentTutorialStep=WN.RescueTargetConfirmed,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0)))}))}grantTutorialCurrency(){st.q.instance.prodigy.gameContainer.get("bec-c6b4").grantCaptureTutorialMagicoin({source_id:"TutorialCaptureCoin"}).catch(X.RQr.createHandler("Error granting the capture tutorial magicoin"))}setActiveUnit(q){const K=Object.create(null,{setActiveUnit:{get:()=>super.setActiveUnit}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield K.setActiveUnit.call(this,q),this._currentTutorialStep===WN.Dialogue&&this.isRescueAvailable()&&(this.textLog.GameObject.active=!1)}))}},[Hi.gu.StatusEffectsTutorial]:class extends LP{constructor(){super(...arguments),this.currentTutorialStep=$P.Initialize}getBattlePrefab(){return Pi.l.StatusEffectsTutorialBattleScene}getAssetList(){return[...this._baseAssets,jP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1,jP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2,jP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3,jP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4]}gotoStep(q){switch(this.currentTutorialStep=q,q){case $P.HighlightSpellCardWithStatusEffect:this.highlightSpellCardWithStatusEffect();break;case $P.HighlightTarget:this.highlightTarget();break;case $P.TargetClicked:this.targetClicked();break;case $P.InvestigateStatusEffect:this.investigateAppliedBurn();break;case $P.ViewTooltip:this.viewTooltip();break;case $P.EnemyTakesSpellEffectDamage:this.enemyTakesSpellEffectDamage();break;case $P.EnemyPetFiresBack:case $P.FinalDialogue:case $P.End:break;default:X.VyI.log(`Unhandled tutorial step in Status Effects Tutorial: ${this.currentTutorialStep}`,X.$bb.Error)}}showSpellCards(q,K=!0){super.showSpellCards(q,K),this.onChoosingSpell.addOnce((()=>{this.currentTutorialStep===$P.Initialize&&this.gotoStep($P.HighlightSpellCardWithStatusEffect)}));const z=this.spellCardsController.targetController;z.onActionChange.add((q=>{this.currentTutorialStep===$P.HighlightSpellCardWithStatusEffect&&q&&this.gotoStep($P.HighlightTarget)})),z.onTargetConfirmed.add((()=>{this.currentTutorialStep===$P.HighlightTarget&&this.gotoStep($P.TargetClicked)}))}getStateOverride(q){return this.currentTutorialStep===$P.TargetClicked&&(null==q?void 0:q.type)===rt.EBattleStateUpdate.TriggerStatusEffect?(this.gotoStep($P.InvestigateStatusEffect),[GP,this.waitForTooltipClosedAndDelay()]):this.currentTutorialStep===$P.EnemyTakesSpellEffectDamage&&(null==q?void 0:q.type)===rt.EBattleStateUpdate.SetActiveUnit?(this.gotoStep($P.EnemyPetFiresBack),[FP,[1825]]):this.currentTutorialStep!==$P.EnemyPetFiresBack||(null==q?void 0:q.type)!==rt.EBattleStateUpdate.SetActiveUnit?this.currentTutorialStep===$P.FinalDialogue&&(null==q?void 0:q.type)===rt.EBattleStateUpdate.EndBattle?(this.gotoStep($P.End),[FP,[1826]]):void 0:void this.gotoStep($P.FinalDialogue)}highlightSpellCardWithStatusEffect(){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1),this._tutorialControllerComponent.focusOverlay.setFocusLayer("overlay-top");const q=this.spellCardsController.getSpellCardAtIndex(0),K=this._tutorialControllerComponent.guideHandAnimator.GameObject;this._tutorialControllerComponent.setDialogueTextKey(kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1),this._tutorialControllerComponent.playNootWidgetIn(!0,jP[kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1]),this.runFocusAnimation(q,K).then((()=>{const K=q.findComponentInChildren(X.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(K),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(HP.Step0PositionX,HP.Step0PositionY))})).catch((q=>{X.VyI.log(`Error showing focus overlay in Status Effects Tutorial: ${q}`,X.$bb.Error)}))}runFocusAnimation(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){this._tutorialControllerComponent.focusOverlay.addFocusableGameObject(q,void 0,!0,{applyGlow:!0,position:{x:q.transform.worldPosition.x+WP,y:q.transform.worldPosition.y+qP}}),this._tutorialControllerComponent.focusOverlay.addFocusableGameObject(K),yield this._tutorialControllerComponent.focusOverlay.showOverlay(),yield this._tutorialControllerComponent.focusOverlay.playGlowAnimations(),yield this._tutorialControllerComponent.focusOverlay.hideOverlay()}))}highlightTarget(){var q;const K=null===(q=this.spellCardsController.getSpellCardAtIndex(0))||void 0===q?void 0:q.findComponentInChildren(fl.l);X.Aq$.isDefined(K)&&(K.inputEnabled=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new tt.Point(VP.PositionX,VP.PositionY),new X.or0(VP.Width,VP.Height)),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(HP.Step1PositionX,HP.Step1PositionY)),this._tutorialControllerComponent.updateDialogue(kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2,jP[kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2])}targetClicked(){this.cleanUpDialogueAndHideGuideHand()}investigateAppliedBurn(){this._tutorialControllerComponent.setDialogueTextKey(kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3),this._tutorialControllerComponent.playNootWidgetIn(!0,jP[kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3]),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(HP.Step1PositionX,HP.Step1PositionY)),this.getEnemyPetUnit().updateIdleStatusEffect(!0),this.getTooltipOpenenedPromise().then((()=>{this.gotoStep($P.ViewTooltip)})).catch((q=>{X.VyI.log(`Error waiting for tooltip open in Status Effects Tutorial: ${q}`,X.$bb.Error)}))}viewTooltip(){this._tutorialControllerComponent.updateDialogue(kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4,jP[kP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4]),this._tutorialControllerComponent.enableGuideHand(!0,NP.W.Click,new tt.Point(HP.Step1PositionX,HP.Step1PositionY)),this._tutorialControllerComponent.setGuideHandLayer(Ch.E.Ui)}enemyTakesSpellEffectDamage(){this.cleanUpDialogueAndHideGuideHand()}cleanUpDialogueAndHideGuideHand(){this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue()}getEnemyPetUnit(){return this.getTeamById(rt.ETeamId.Away).units.find((q=>q.type===Hi.uj.Pet))}getTooltipOpenenedPromise(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.getEnemyPetUnit().onInfoTooltipShown.asPromise()}))}waitForTooltipClosedAndDelay(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.getEnemyPetUnit().onInfoTooltipHidden.asPromise(),this.gotoStep($P.EnemyTakesSpellEffectDamage),yield wn.o.wait(1e3)}))}onClickUnitTooltip(q){this.currentTutorialStep!==$P.InvestigateStatusEffect&&this.currentTutorialStep!==$P.ViewTooltip?super.onClickUnitTooltip(q):this.showUnitTooltip(q)}},[Hi.gu.Titan]:HN,[Hi.gu.CrystalCavernsGrumpyYeti]:QM,[Hi.gu.CrystalCavernsCrystalThief]:zP,[Hi.gu.CrystalCavernsGlacias]:zP,[Hi.gu.CrystalCavernsMakalu]:class extends zP{constructor(){super(...arguments),this._phase=vM.Visible,this._stateOverrideStep=0}initBattlePrefab(q){const K=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,Q.sH)(this,void 0,void 0,(function*(){var z;yield K.initBattlePrefab.call(this,q),this.rightTeam.units.forEach((q=>{q.size=EM.X.Medium})),this._makalu=this.rightTeam.units.find((q=>q.type===Hi.uj.Boss)),this._makalu.creature.teleportType=sM.H0.None,this._makalu.creature.shouldFadeOnDefeat=!1,this._makalu.onApplyDamage.add((q=>{var K;return(K=this._makalu.uiContent).active||(K.active=q.damage>0)})),this._makalu.onDefeatAnimationStarted.add((()=>{this.setActiveUnit(null).catch(X.RQr.createHandler("Error setting active unit"))})),this._makalu.onDefeatAnimationFinished.add((()=>{(()=>(0,Q.sH)(this,void 0,void 0,(function*(){this._makalu.uiContent.active=!0,this.isBossAboveGround()?(this._makalu.creature.animator.playAnimation("hide",!1),yield this._makalu.creature.animator.OnAnimationComplete.asPromise()):yield X.Egh.timeout(1e3),yield this._makalu.fadeOut(!1)})))().catch(X.RQr.createHandler("Error fading Makalu"))})),this._makaluFullHitbox=Object.assign({},this._makalu.hitbox),this._piles=this.rightTeam.units.filter((q=>q.type===Hi.uj.Object));for(const q of this._piles){q.uiContent.active=!1,q.isTargetable=!1;const K=q.creature;K.teleportType=sM.H0.None,this.playUnitIdle(K,"mound-blue"),K.shouldFadeOnDefeat=!1,q.onApplyDamage.add((()=>{this.playUnitIdle(K,"mound-blue"),q.data.health.current=0}))}const Y=null===(z=this.getSpellComponentById("1071"))||void 0===z?void 0:z.steps.find((q=>q instanceof dN.D));Y&&(Y.play=()=>(0,Q.sH)(this,void 0,void 0,(function*(){return Promise.resolve()})))}))}onStartBattle(){const q=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,Q.sH)(this,void 0,void 0,(function*(){yield q.onStartBattle.call(this);for(const q of this._piles)q.creature.recalculateHitbox(),q.targetComponent.configureTarget()}))}setupUnitTooltip(){}showUnitTooltip(q){}getStateOverride(q){var K;if(null!==(K=this._makaluAnimator)&&void 0!==K||(this._makaluAnimator=this._makalu.creature.animator),this._needsShellGame&&(this._needsShellGame=!1,q.type!==rt.EBattleStateUpdate.EndBattle))return this.setHiddenBossTargetMode(!0),[lN];switch(null==q?void 0:q.type){case rt.EBattleStateUpdate.CastSpell:this.activeUnit.data.teamId===rt.ETeamId.Away&&[vM.Hidden,vM.Taunt].includes(this._phase)&&(this._makaluAnimator.spine.addAnimationRemap("attack","hide"),this._makaluAnimator.spine.addAnimationRemap("idle","mound-purple"),this._needsShellGame=!0,this.setActiveUnit(null).catch(X.RQr.createHandler("Error setting active unit")));break;case rt.EBattleStateUpdate.CustomEvent:switch(q.name){case vM.Hidden:for(const q of this._piles)q.data.health.current=1,this.playUnitIdle(q.creature,"mound-purple");this._phase=vM.Hidden;break;case vM.Visible:if(0==this._stateOverrideStep++){this._makaluAnimator.spine.addAnimationRemap("attack","attack");let q=Promise.resolve();return this._phase===vM.Hidden?(this._makaluAnimator.playAnimation("emerge",!1),this._makaluAnimator.OnAnimationComplete.addOnce((()=>this.playUnitIdle(this._makalu.creature,"idle"))),q=this._makaluAnimator.OnAnimationComplete.asPromise()):this.playUnitIdle(this._makalu.creature,"idle"),this._phase=vM.Visible,this.setHiddenBossTargetMode(!1),[GP,q]}break;case vM.Stunned:if(0==this._stateOverrideStep++)return this._makaluAnimator.playAnimation("stun-hit",!1),this._makaluAnimator.OnAnimationComplete.addOnce((()=>this.playUnitIdle(this._makalu.creature,"idle-stun"))),this._phase=vM.Stunned,this.setHiddenBossTargetMode(!1),[GP,this._makaluAnimator.OnAnimationComplete.asPromise()];break;case vM.Taunt:if(0==this._stateOverrideStep++){const q=(()=>(0,Q.sH)(this,void 0,void 0,(function*(){this._makaluAnimator.playAnimation("emerge",!1),yield this._makaluAnimator.OnAnimationComplete.asPromise(),this._makaluAnimator.playAnimation("taunt",!1),yield this._makaluAnimator.OnAnimationComplete.asPromise()})))();return[GP,q]}}break;case rt.EBattleStateUpdate.EndBattle:if(0==this._stateOverrideStep++)return this.setActiveUnit(null).catch(X.RQr.createHandler("Error setting active unit")),this.setHiddenBossTargetMode(!1),[YM,this.isBossAboveGround?2e3:200]}return this._stateOverrideStep=0,super.getStateOverride(q)}playUnitIdle(q,K){const z=q.animator;z instanceof Ur.j&&z.spine.addAnimationRemap("idle",K),z.playAnimation(K,!0)}setHiddenBossTargetMode(q){if(this._inHiddenTargetMode!==q){this._inHiddenTargetMode=q,this._makalu.uiContent.active=!q;for(const K of this._piles)K.isTargetable=q,this.playUnitIdle(K.creature,q?"mound-purple":"mound-blue");q?(this.playUnitIdle(this._makalu.creature,"mound-purple"),J().merge(this._makalu.hitbox,this._piles[0].hitbox)):J().merge(this._makalu.hitbox,this._makaluFullHitbox),this._makalu.targetComponent.configureTarget()}}isBossAboveGround(){return[vM.Stunned,vM.Visible].includes(this._phase)}},[Hi.gu.CrystalCavernsCrystalGolem]:SM,[Hi.gu.EndgamePippet]:xP.V,[Hi.gu.FireflyQ2Miniboss]:xP.V,[Hi.gu.ZoneMiniboss]:gN,[Hi.gu.PumpkinfestBoss]:mN,[Hi.gu.EndGamePuppetMaster]:DN,[Hi.gu.EndGameGuardianBonfire]:$N,[Hi.gu.EndGameGuardianFirefly]:$N,[Hi.gu.EndGameGuardianShipwreck]:$N,[Hi.gu.EndGameGuardianShiverchill]:$N,[Hi.gu.EndGameGuardianSkywatch]:$N,[Hi.gu.QuestPippet]:xP.V,[Hi.gu.QuestPippetDefeatable]:xP.V,[Hi.gu.FireflyQ3Miniboss]:xP.V,[Hi.gu.FireflyQ8TriptropTrio]:xP.V,[Hi.gu.FireflyQ12Gerald]:xP.V,[Hi.gu.SkywatchCloudMiniboss]:xP.V,[Hi.gu.SkywatchCloudBoss]:xP.V,[Hi.gu.SkywatchQ11Bitbots]:xP.V,[Hi.gu.SkywatchQ6Swarm]:xP.V,[Hi.gu.ShiverchillQ6Ghosts]:xP.V,[Hi.gu.ShiverchillQ7IceWyrm]:xP.V,[Hi.gu.ShiverchillQ13IceWyrm]:xP.V,[Hi.gu.BonfireQ12Guardian]:xP.V,[Hi.gu.BonfireQ13Cebollini]:xP.V,[Hi.gu.ShipwreckQ11OldOne]:xP.V,[Hi.gu.BossRiftRun]:TM,[Hi.gu.FestivalDailyBoss]:VM.R};var ex=z(81531);class ix extends Of.f{startBattleRequest(q,K){var z;this._config=K,this._synapse.setUserStatus(Ec.a.unavailable).catch(X.RQr.createHandler("Unable to set social status")),st.q.instance.game.state.start(Ue.G.SecureBattleRevamp,null===(z=K.clearWorld)||void 0===z||z,q)}clearBattle(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this._battleController){const K=null!=q?q:{battleType:Hi.gu.Basic,opponents:{units:{}},difficulty:1};this._battleController=tx.getBattleController(K),this._battleController.bindNetworkHandler()}const K=X.wa5.getActiveScene().container.get("NetworkHandler");yield K.clearBattleState()}))}resumeBattleRequest(q,K){var z;this._config=K,this._synapse.setUserStatus(Ec.a.unavailable).catch(X.RQr.createHandler("Unable to set social status")),st.q.instance.game.state.start(Ue.G.SecureBattleRevamp,null===(z=null==K?void 0:K.clearWorld)||void 0===z||z,{battleType:q.battleType,clientState:q.clientState},!0),this._loggedInPlayerDataProvider.player.battleResumeData=void 0}init(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=!1){var z,Y,Q,Z,J;try{X.C1c.markTextureGarbageCollectionFrame();const tt=X.wa5.getActiveScene(),et=tt.container;et.parent=st.q.instance.prodigy.gameContainer,et.bind("BattleState").toConstantValue(this),et.bind("RemoteConfig").toConstantValue(q),et.bind("LocalConfig").toConstantValue(this._config),et.bind("DifficultyMode").toConstantValue(this._loggedInPlayerDataProvider.player.currentDifficulty),this._battleController=tx.getBattleController(q),et.bind("BattleController").toConstantValue(this._battleController),this._battleController.bindNetworkHandler();const it={target:Ue.G.SecureBattle,title:this._localizer.getText("LOADING_CAPITALIZE"),autoStart:!1,fadeIn:!1,save:!1,useIdleAnimation:!0,shutdownLoadState:!1},nt=this._battleController.getLoadingScreen(it),at="Loading";if(nt){nt.create();tt.addLayer(at,1e6).addChild(nt.element)}const rt=this.preloadLocalAssets(),ot=!!(null===(z=this._loggedInPlayerDataProvider.player.difficultyUnlocks)||void 0===z?void 0:z.hard),ht=mi.s.xpRequiredForLevel(ot?mi.s.maxLevelConfig.expert:mi.s.maxLevelConfig.regular,Do.V.Player);null!==(Y=q.userDetails)&&void 0!==Y||(q.userDetails={starsToMaxLevel:ht-this._loggedInPlayerDataProvider.player.getStars()});const ct=this._loggedInPlayerDataProvider.player;yield new Promise((q=>ct.forceSaveCharacter(q))),Ia.k.useRevisedDifficulty&&(q.experiments=[{experimentKey:"difficulty-scaling",variationKey:""}]),q.cannotDropMagicoin=!!(null===(Q=this._config.guaranteedDrops)||void 0===Q?void 0:Q.filter(X.Aq$.isDefined).length),q.battleType===Hi.gu.NormalRiftRun&&(q.cannotDropMagicoin=!1);const dt=K?yield this._battleController.requestBattleResume():yield this._battleController.requestBattleStart(q);if(this._battleController.battleId=dt.battleId,this._battleController.showQiBadgeAnimations=this._config.showQiBadgeAnimations,this._battleController.hasMpOverrides=Object.keys(null!==(Z=dt.state.config.maxMPPerUnitTypeOverrides)&&void 0!==Z?Z:{}).length>0,et.bind("Modifiers").toConstantValue(null!==(J=dt.modifiers)&&void 0!==J?J:[]),et.bind("GameDataProvider").toConstantValue(this._gameDataProvider=new ex.q(dt.dataOverride)),this.checkPetGearFtueState(dt.state.units),yield Promise.all([rt,this.preloadRemoteAssets(dt)]),st.q.instance.prodigy.effects.setSource(this),yield this._battleController.initBattlePrefab(dt),nt&&(nt.nextStateLoaded(),tt.destroyLayer(at)),K){const q=dt.resumedSegmentData;this._battleController.resumeLastBattleState(q)}else{OP.shouldRollForMagicoinBattleRewards((0,Ft.G)(IP.s).enabled,q.battleType,q.cannotDropMagicoin)&&st.q.instance.prodigy.gameContainer.get("20f-5f67").funnel.sendStep(PP.F.MagicoinBattleRewardsIntro,"feature",DP.T.EligibleBattleStarted,DP.h.EligibleBattleStarted),this._battleController.startStateMachine()}}catch(e){X.RQr.logError(e,"An error occurred while creating a secure battle.");let K=!0;try{K=yield this._battleController.handleBattleStartError(e)}catch(tt){X.RQr.logError(tt,"An error occurred while handling an error in a secure battle.")}K&&this.handleFatalBattleError()}}))}handleFatalBattleError(){this._config.onFatalError?this._config.onFatalError():this._config.onEscape?this._config.onEscape():st.q.instance.prodigy.world.teleportToCurrentMap()}preloadLocalAssets(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._config.backgroundID=yield this.getBackgroundId(this._config.backgroundID);const q=st.q.instance.prodigy.game,K=Z.merge(this._battleController.getAssetList(),RP.l.guaranteeArray(this._config.backgroundID));X.Aq$.isDefined(this._config.backgroundMusicID)&&K.push(`bgm-${this._config.backgroundMusicID}`),An.K.cacheAssets(q,K,An.K.zoneAssetsCached);const z=st.q.instance.prodigy.load.assetsAsPromise(K),Y=[Pi.l.RevampSpellHitInfo,Pi.l.RevampSpellTooltip,Pi.l.RevampActionMenu].map((q=>(0,Q.sH)(this,void 0,void 0,(function*(){return this._prefabLoader.preloadFromGUIDWithDependencies(q).promise}))));Y.push(z),yield Promise.all(Y)}))}preloadRemoteAssets(q){return(0,Q.sH)(this,void 0,void 0,(function*(){X.VyI.log("SecureBattleRevamp.onStartSuccess - SUCCESS",X.$bb.Verbose);let K=this.getUnitAssets(q.state.units);q.preload&&(K=Z.chain(q.preload).keys().flatMap((K=>q.preload[K].map((q=>this.getAsset(K,q))))).compact().union(K).value());const z=st.q.instance.prodigy.game;An.K.cacheAssets(z,K,An.K.zoneAssetsCached),yield st.q.instance.prodigy.load.assetsAsPromise(K)}))}getBackgroundId(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const Y=z(79259);return Y?"string"==typeof q&&null!==(K=Y[q])&&void 0!==K?K:q:(X.VyI.log("Revamp background replacement data not loaded",X.$bb.Error),q)}))}getUnitAssets(q){const K=[];for(const z of Object.values(q))if(!z.appearance&&X.Aq$.isDefined(z.asset.id)){const q=this.getAsset(z.asset.type,z.asset.id);q&&K.push(q)}return K}getAsset(q,K){var z;const Y=this._gameDataProvider.getItem(q,K),Q=null===(z=null==Y?void 0:Y.metadata)||void 0===z?void 0:z.assets;switch(q){case Hi.uj.Pet:return this.getPetAsset(Q,K);case Hi.uj.Boss:case Hi.uj.Titan:return MP.H.getBossSpineId(Q,K);case Hi.uj.Object:case"guid":return`${K}`;case"spellV2":return;default:X.VyI.log(`Unable to get asset of ${q} ${K}`,X.$bb.Warning)}}getPetAsset(q,K){var z,Y,Q;return"spine"===(null===(z=q.default)||void 0===z?void 0:z.type)?q.default.ID?`spine-${q.default.ID}`:ct.Q[q.default.assetKey]:"spritesheet"===(null===(Y=q.default)||void 0===Y?void 0:Y.type)?`default-pet-${K}`:"spritesheet"===(null===(Q=q.reduced)||void 0===Q?void 0:Q.type)?`reduced-pet-${K}`:void X.VyI.log("Unable to get pet asset guid",X.$bb.Warning)}checkPetGearFtueState(q){const K=st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(En.B.FEATURE_PET_GEAR,En.B.BREADCRUMB_PET_GEAR_FTUE_STEP_START),z=Object.values(null!=q?q:{}).some((q=>{var K;return Object.values(null!==(K=q.petGear)&&void 0!==K?K:{}).some((q=>X.Aq$.isDefined(q)))}));if(K&&z){const q=st.q.instance.prodigy.gameContainer.get("20f-5f67");q.playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Qh.l.PetGearGearUsedInBattle},{step_index:6}),q.playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Qh.l.PetGearTutorialComplete},{step_index:7})}}start(){super.start(),X.C1c.garbageCollectTextures()}update(){X.wa5.getActiveScene().update()}shutdown(){this._synapse.setUserStatus(Ec.a.available).catch(X.RQr.createHandler("Unable to set social status")),st.q.instance.prodigy.load.removeAssets(),this._battleController&&this._battleController.destroy(),this._battleController=null,this._config=null,this._gameDataProvider=null,super.shutdown()}}(0,Q.Cg)([(0,Ge.b)("ad2-c5b2"),(0,Q.Sn)("design:type",ee.E)],ix.prototype,"_loggedInPlayerDataProvider",void 0),(0,Q.Cg)([(0,Ge.b)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],ix.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,Ge.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],ix.prototype,"_localizer",void 0),(0,Q.Cg)([(0,Ge.b)("b0c-9016"),(0,Q.Sn)("design:type",ze.d)],ix.prototype,"_synapse",void 0);class sx{constructor(q){this.game=q,X.o5U.isDesktop()&&X.o5U.isFirefox()&&this.game.input.keyboard.addKeyCapture([$o.D.BACKSPACE]),q.input.mouse.addMouseWheelCallback(this.dispatchMouseEvent.bind(this,gi.Bk.OnMouseWheel)),q.input.keyboard.onDownCallback=this.dispatchKeyboardEvent.bind(this,"Prodigy.Events.Input.ON_KEY_DOWN_"),q.input.keyboard.onUpCallback=this.dispatchKeyboardEvent.bind(this,"Prodigy.Events.Input.ON_KEY_UP_"),q.input.keyboard.onPressCallback=this.dispatchKeyPressEvent.bind(this,"Prodigy.Events.Input.ON_KEY_PRESS_")}dispatchMouseEvent(q,K){this.game.broadcaster.broadcast(q,"Input",[K])}dispatchKeyboardEvent(q,K){let z="";X.Aq$.isDefined(K.key)&&(z=K.key.toUpperCase()),this.game.broadcaster.broadcast(q+z,"Input",[K])}dispatchKeyPressEvent(q,K,z){this.game.broadcaster.broadcast(`${q}_${z.keyCode}`,"Input",[z])}}var nx=z(48757);class ax extends nx.c{constructor(){super({zoneName:"zone-museum",atlas:it._.Zone_museum_json},[it._.Zone_museum_json]),this.area=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],[0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0],[0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0],[0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0],[0,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],this.startX=640,this.startY=545}create(q="dyno-A1"){super.create("dyno-A1")}screenSetup(){super.screenSetup(),this.content.addChild(st.q.instance.prodigy.create.sprite(196,522,it._.Zone_museum_json,"rail",new X.I9Y(0,1)));this.content.addChild(st.q.instance.prodigy.create.sprite(this.game.width-196,522,it._.Zone_museum_json,"rail",new X.I9Y(0,1))).scale.x=-1,this.path.addCallback(3,this.toDino.bind(this),!0);const q=st.q.instance.prodigy.dialogue.create(),K=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;gP.getNewFossils(K.backpack).length>0&&q.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MUSEUM_INTRO"),face:0});const z=[{ID:13,x:916,y:506,nx:949,ny:490},{ID:14,x:362,y:511,nx:331,ny:490},{ID:15,x:1192,y:707,nx:1216,ny:690},{ID:16,x:85,y:688,nx:65,ny:690},{ID:17,x:290,y:145},{ID:18,x:390,y:145},{ID:19,x:490,y:145},{ID:20,x:590,y:145},{ID:21,x:690,y:145},{ID:22,x:790,y:145},{ID:23,x:890,y:145},{ID:24,x:990,y:145}];let Y;for(let Q=0;Q0){const K=st.q.instance.prodigy.dialogue.create();K.setText({text:st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("MUSEUM_COLLECTED_ALL_FOSSILS"),face:1,audio:fA.AUDIO[1]}),K.setText({callback:st.q.instance.prodigy.open.gotItem.bind(st.q.instance.prodigy.open,q,null,null,"museum")}),K.startDeprecated("scoog")}}}unlockFossil(q){st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.craft("fossil",q.ID),this.processFossil(q,!0)}processFossil(q,K=!1){let z;const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(Y.backpack.hasItem("fossil",q.ID)>0)return q.type="fossil",q.full.removeAll(!0),q.ID<17?(z=q.full.add(st.q.instance.prodigy.create.sprite(0,0,it._.Zone_museum_json,q.ID)),z.x=-z.width/2,z.y=-z.height):q.full.add(st.q.instance.prodigy.icon.createFromData(q,0,0,new X.I9Y(.5,1))),q.full.visible=!0,q.empty.visible=!1,K&&this.prodigyGame.add.tween(q.full.scale,this).to({x:1.2,y:1.2},500,X.GS3.Quadratic.Out).to({x:1,y:1},500,X.GS3.Quadratic.In).start(),!0;{q.empty.removeAll(!0),z=q.empty.add(st.q.instance.prodigy.create.sprite(0,0,it._.Zone_museum_json,"empty")),z.x=-z.width/2,z.y=-z.height;const K=Ee.t.getItem("fossil",q.ID).data.recipe[0],Q=Y.backpack.hasItem(K.type,K.ID);return st.q.instance.prodigy.create.font(q.empty,z.x-50,z.y+27,`${Q}/${K.N}`,{width:180,align:"center"}),q.empty.visible=!0,q.full.visible=!1,!1}}toDino(){st.q.instance.prodigy.world.it("dyno-A0")}}var rx=z(8083),ox=z(59685);const hx=5;var cx,dx=z(23506),lx=z(39070),ux=z(56520),fx=z(28080);!function(q){q.PlayerCurrentWinStreak="DUELS_WIN_STREAK_NUMBER",q.PlayerBestWinStreak="DUELS_BEST_STREAK_NUMBER",q.PlayerCurrentWinStreakFlourish="DUELS_WIN_STREAK_NUMBER_FLOURISH",q.PlayerBestWinStreakFlourish="DUELS_BEST_STREAK_NUMBER_FLOURISH",q.OpponentCurrentWinStreak="DUELS_WIN_STREAK_NUMBER_OPPONENT",q.OpponentBestWinStreak="DUELS_BEST_STREAK_NUMBER_OPPONENT",q.OpponentCurrentWinStreakFlourish="DUELS_WIN_STREAK_NUMBER_FLOURISH_OPPONENT",q.OpponentBestWinStreakFlourish="DUELS_BEST_STREAK_NUMBER_FLOURISH_OPPONENT"}(cx||(cx={}));class bx extends DM.P{get _prefabGuid(){return Pi.l.DuelsMatchmakingScreen}constructor(){super(null,null),this._preBattleDuelMatchmakingStats=null,this.roomConfig=null,this.matchmakingFailurePopup=null}init(q,K){const z=Object.create(null,{init:{get:()=>super.init}});return(0,Q.sH)(this,void 0,void 0,(function*(){z.init.call(this),this._playerPosition=q,this._matchFound=!1,this._isShowingLoadingScreen=!1,K&&(this.roomConfig=(yield lx.i.getValidatedRoomsConfig()).rooms.find((q=>q.id===K)))}))}create(){var q,K;if(null!==(K=null===(q=this._prefabRoot)||void 0===q?void 0:q.isDestroyed)&&void 0!==K&&!K)return;st.q.instance.game.broadcaster.addAppListener(gi.pm.GetTarget,(()=>this._playerPosition),this,st.q.instance.game,!1),this._segment.duelsStadium.sendInterfaceOpenedEvent();const z=st.q.instance.prodigy.gameContainer.get("782-c308");this.data.playerA=z,super.create(),this._matchmakingService.onMatched.add(this.onMatchFound,this),this._matchmakingService.onWaitTimeExhausted.add(this.onWaitTimeExhausted,this),this._matchmakingService.onMatchmakingFailure.add(this.onMatchmakingFailure,this),st.q.instance.prodigy.audio.playBGM(st.q.instance.prodigy.world.getZone(st.q.instance.prodigy.world.getCurrentZone()).bgmID,!0),st.q.instance.prodigy.audio.resumeBGM(),this.onCloseClicked.add((()=>{var q;this._segment.duelsStadium.sendCloseButtonClickedEvent(),this._matchmakingService.quitMatchmaking(),st.q.instance.prodigy.open.menuLayer=this.element.addChild(new X.mcf),this.data.shutdownLoadState=!0,st.q.instance.prodigy.open.map({onCloseButtonClicked:()=>{var q,K;st.q.instance.prodigy.world.it(z.data.zone,null===(q=this._playerPosition)||void 0===q?void 0:q.x,null===(K=this._playerPosition)||void 0===K?void 0:K.y)}}),null===(q=this._prefabRoot)||void 0===q||q.destroy()}))}loadPrefab(){const q=Object.create(null,{loadPrefab:{get:()=>super.loadPrefab}});return(0,Q.sH)(this,arguments,void 0,(function*(K={}){const z=new X._mx;z.active=!1;const Y=yield this._prefabLoader.loadWithDependenciesFromGUID(Pi.l.DuelMatchmakingOpponent,z);this._opponentSlotMachineAnimation=X.Uoy.getInjectedValue(Y,"SLOT_MACHINE_ANIMATION"),this.data.showCancel=!1;const Z=yield q.loadPrefab.call(this,Object.assign(Object.assign({PLAYER_2_AVATAR:Y,FIND_MATCH_ON_CLICK:()=>(0,Q.sH)(this,void 0,void 0,(function*(){yield this.findMatch()}))},K),yield Ve.d.getElementalBoostInjectionDictionary()));return this._findMatchButton=X.Uoy.getInjectedValue(Z,"FIND_MATCH_BUTTON"),z.destroy(),yield this.injectWinStreakBadgeData(),Z}))}findMatch(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._segment.duelsStadium.sendMatchmakingQueuedEvent(),this._findMatchButton.lockState(hc.K.Disabled),this._opponentSlotMachineAnimation.startSpin(),this._minimumSpinTimePromise=X.Egh.timeout(bx.MINIMUM_SPIN_TIME_MS+ux.L.SPIN_LEAD_IN_TIME_MS);const q=yield this.getPlayerBattleStats();this._preBattleDuelMatchmakingStats=q,q.battleStreak<=bx.LOSE_STREAK_BOT_BATTLE_LIMIT?yield this.startBotBattle():yield this._matchmakingService.startMatchmaking(this.getBucketId())}))}getBucketId(){return(this.roomConfig?this.roomConfig.matchmakingBucket:1)+hx}showOpponent(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z;const Y=X.Aq$.isDefined(K);this._closeButton.lockState(hc.K.Disabled);const Q=fx.D.createWizardObject(q,!1);yield this._minimumSpinTimePromise,this._opponentObject=yield Q,this._opponentSlotMachineAnimation.isSpinning&&(this._opponentSlotMachineAnimation.stopSpin(),yield this._opponentSlotMachineAnimation.onSpinComplete.asPromise());const Z=X.Uoy.getInjectedValue(this._opponentSlotMachineAnimation.GameObject,"OPPONENT_PLAYER_CONTAINER").GameObject;Z.addChild(this._opponentObject),Z.setLayer(Z.parent.layer,!0),this._opponentObject.transform.setScale(-2,2),this._opponentSlotMachineAnimation.GameObject.parent.active=!1,this._isShowingLoadingScreen=!0,[["DUEL_HEADER_TEXT",!1],["DUEL_FOOTER_TEXT",!1],["FIND_MATCH_BUTTON",!1],["CLOSE_BUTTON",!1],["PLAYER_1_BANNER",!0],["PLAYER_2_BANNER",!0]].forEach((([q,K])=>{X.Uoy.getInjectedValue(this._prefabRoot,q).GameObject.active=K}));const J=null===(z=X.Uoy.getInjectedValue(this._prefabRoot,"ELEMENTAL_BOOST_DISPLAY"))||void 0===z?void 0:z.GameObject;null==J||J.destroy();const tt=st.q.instance.prodigy.gameContainer.resolve(Wa.C),et=[this.data.playerA,q],[it,nt]=et.map((q=>(tt.init(q.appearance.getName()),tt.getName())));cr.d.updateInjectedValues(this._prefabRoot,{PLAYER_1_NAME:it,PLAYER_2_NAME:nt}),Y?yield this.injectWinStreakBadgeData(void 0,K):yield this.injectWinStreakBadgeData(q.userID),Y&&(yield X.Egh.timeout(bx.ON_MATCH_FOUND_DELAY_MS))}))}onMatchFound(q){this._matchFound=!0,this._segment.duelsStadium.sendMatchFoundEvent(q.opponent.userID);(q=>(0,Q.sH)(this,void 0,void 0,(function*(){yield this.showOpponent(q.opponent),yield this._matchmakingService.startDuel(q)})))(q).catch((q=>{this.onMatchmakingFailure(q instanceof Error?q:new Error(String(q)))}))}getPlayerBattleStats(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!X.Aq$.isDefined(this._playerBattleStats)){this._playerBattleStats=this._battleStatsHandler.getBattleStats();try{yield this._playerBattleStats}catch(e){throw this._playerBattleStats=null,e}}return(yield this._playerBattleStats).duelMatchmakingStats}))}injectWinStreakBadgeData(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){var z,Y;let Q,Z;if(q){const K=(yield this._battleStatsHandler.getBattleStats(q)).duelMatchmakingStats;Q=K.highestStreak,Z=K.battleStreak}else{const q=yield this.getPlayerBattleStats();Q=q.highestStreak,Z=q.battleStreak,K&&(Q+=K,Z+=K)}const J=!X.Aq$.isDefined(q)&&!X.Aq$.isDefined(K),tt=Object.assign(Object.assign({},this.getWinStreakInjectionDictionary(!1,Q,J,null===(z=this._preBattleDuelMatchmakingStats)||void 0===z?void 0:z.highestStreak)),this.getWinStreakInjectionDictionary(!0,Z,J,null===(Y=this._preBattleDuelMatchmakingStats)||void 0===Y?void 0:Y.battleStreak));J&&(this._preBattleDuelMatchmakingStats=null),cr.d.updateInjectedValues(this._prefabRoot,tt)}))}getWinStreakInjectionDictionary(q,K,z,Y){const Q={};return K>1&&(z&&Y+1===K?(Y>1&&(Q[q?cx.PlayerCurrentWinStreak:cx.PlayerBestWinStreak]=Y),Q[q?cx.PlayerCurrentWinStreakFlourish:cx.PlayerBestWinStreakFlourish]=K):q?Q[z?cx.PlayerCurrentWinStreak:cx.OpponentCurrentWinStreak]=K:Q[z?cx.PlayerBestWinStreak:cx.OpponentBestWinStreak]=K),Q}onWaitTimeExhausted(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this.startBotBattle()}))}startBotBattle(){return(0,Q.sH)(this,void 0,void 0,(function*(){var q;this._matchFound=!0;const K=()=>{this.roomConfig=null,Ve.d.openDuelsStadiumMenu().catch(X.RQr.createHandler("Error opening duels stadium menu"))},z=yield st.q.instance.prodigy.gameContainer.get("b37-c775").getBattleStartQuestData(Hi.gu.MatchmakingBotDuel),Y=(yield this.getPlayerBattleStats()).battleStreak,Q=ox.D.Elementalist,Z=dx.V.getBotPersonalityInstanceConfig(Q,Y),J={battleType:Hi.gu.MatchmakingBotDuel,botConfig:Z,roomId:null===(q=this.roomConfig)||void 0===q?void 0:q.id,activeQuestIDs:z.questIDs,questEventsToSend:z.questEvents};this._segment.duelsStadium.sendMatchFoundEvent(null,Q),this._segment.duelsStadium.setBotDifficultyEvent(Y);const tt={backgroundID:[br.q.Battle_coliseum_outside_bg,br.q.Battle_coliseum_outside_fg],onVictory:K,onEscape:K,onDefeat:K,clearWorld:!1,botConfig:Z,defeatData:{preventDefaultTeleport:!0}};st.q.instance.game.state.states.get(Ue.G.SecureBattleRevamp).startBattleRequest(J,tt)}))}onMatchmakingFailure(q){sh.captureException(q),X.RQr.logError(q,"Matchmaking failure"),this._matchmakingService.quitMatchmaking();const K={TITLE:this._localizationService.getText("DUELS_MATCHMAKING_ERROR_TITLE"),MESSAGE:this._localizationService.getText("DUELS_MATCHMAKING_ERROR_BODY"),VISUAL_OVERLAY_ACTIVE:!0,CTA_BUTTON_ENABLED:!0,CTA_BUTTON_FUNCTION:this.tryAgainButtonClicked.bind(this)};cr.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Pi.l.PaperDialogInjectionConfigured,K).then((q=>(0,Q.sH)(this,void 0,void 0,(function*(){var K;this._opponentSlotMachineAnimation.isSpinning&&(this._opponentSlotMachineAnimation.stopSpin(),yield this._opponentSlotMachineAnimation.onSpinComplete.asPromise()),this.matchmakingFailurePopup=q,this._opponentSlotMachineAnimation.GameObject.parent.active=!0,null===(K=this._opponentObject)||void 0===K||K.destroy(),this._findMatchButton.unlockState(),this._closeButton.unlockState()})))).catch((q=>{X.RQr.logError(q,"Error showing matchmaking failure message")}))}tryAgainButtonClicked(){var q;this._isShowingLoadingScreen&&(this.shutdown(),st.q.instance.game.state.start(Ue.G.DuelMatchmaking,!1,this._playerPosition,null===(q=this.roomConfig)||void 0===q?void 0:q.id))}consumeStadiumRoomEntryCost(){var q;if(null===(q=this.roomConfig)||void 0===q?void 0:q.entryCost){(Array.isArray(this.roomConfig.entryCost)?this.roomConfig.entryCost:[this.roomConfig.entryCost]).forEach((q=>{"gold"===q.type&&st.q.instance.prodigy.gameContainer.get("782-c308").changeGold(-1*q.amount)}))}}start(){this._playerBattleStats=this._battleStatsHandler.getBattleStats(),X.Egh.timeout(500).then((()=>(0,Q.sH)(this,void 0,void 0,(function*(){yield this.findMatch()})))).catch(X.RQr.createHandler("Timeout error, Find Match did not run"))}shutdown(){var q;if(st.q.instance.prodigy.open.cleanup(),this._matchmakingService.quitMatchmaking(),this._matchmakingService.onMatched.removeAll(this),this._matchmakingService.onWaitTimeExhausted.removeAll(this),this._matchmakingService.onMatchmakingFailure.removeAll(this),null===(q=this.matchmakingFailurePopup)||void 0===q||q.destroy(),this._playerBattleStats=null,this._matchFound){this._matchFound=!1,this.data.shutdownLoadState=!1;const q=st.q.instance.game.tweens.getAll();this._managedTweens=Z.clone(q),q.length=0}else st.q.instance.game.broadcaster.removeAppListener(gi.pm.GetTarget,this,st.q.instance.game),this._managedTweens&&(st.q.instance.game.tweens.getAll().push(...this._managedTweens),this._managedTweens=null),super.shutdown()}}bx.MINIMUM_SPIN_TIME_MS=2e3,bx.ON_MATCH_FOUND_DELAY_MS=3e3,bx.LOSE_STREAK_BOT_BATTLE_LIMIT=-2,(0,Q.Cg)([(0,Ge.b)("983-05a7"),(0,Q.Sn)("design:type",X.wNP)],bx.prototype,"_prefabLoader",void 0),(0,Q.Cg)([(0,Ge.b)("e37-be30"),(0,Q.Sn)("design:type",Object)],bx.prototype,"_matchmakingService",void 0),(0,Q.Cg)([(0,Ge.b)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],bx.prototype,"_localizationService",void 0),(0,Q.Cg)([(0,Ge.b)("20f-5f67"),(0,Q.Sn)("design:type",Qe.Y)],bx.prototype,"_segment",void 0),(0,Q.Cg)([(0,Ge.b)("14f-4faa"),(0,Q.Sn)("design:type",bw)],bx.prototype,"_battleStatsHandler",void 0);var px=z(1559),vx=z(49334),gx=z(26022);class mx extends nt.U{constructor(){super(...arguments),this._isAssetsLoaded=!1,this._isDataLoaded=!1,this._isBootLoaded=!1,this._localizedTextLoaded=!1,this._gameData=null,this._featureRevisionsData={},this._waitingOnFeatureRevisionsData=0}get game(){return st.q.instance.game}static init(){mx.createGame(),mx.logAntiTamperingWarning()}static createGame(){const q=tt.ENV.WEBGL2;tt.settings.PREFER_ENV=q,tt.settings.MIPMAP_TEXTURES=0;const K={forceCanvas:!1,clearBeforeRender:!0,backgroundAlpha:1,resolution:1,preserveDrawingBuffer:!0,antialias:!1},z=new pn.n({width:1280,height:720,parent:"game-container",roundPixels:!1,failIfMajorPerformanceCaveat:!1},K);z.init(),new X.W$e(z),new st.q(z),new hP(z);const Y=new oP.A(st.q.instance.prodigy.load,z.cache,st.q.instance.prodigy.assets);X.W$e.instance.loader=Y,X.W$e.instance.prefabLoaderInstance=st.q.instance.prodigy.gameContainer.get("983-05a7"),X.W$e.instance.getWorkerURL=st.q.instance.prodigy.gameContainer.get("ddf-6c82").getWorkerPath.bind(st.q.instance.prodigy.gameContainer.get("ddf-6c82")),z.state.add(Ue.G.Boot,new mx),z.state.add(Ue.G.Loading,new gf.R),z.state.add(Ue.G.TileScreen,new gx.b),z.state.add(Ue.G.SplashScreen,new tl.S),z.state.add(Ue.G.Faint,new px.v),z.state.add(Ue.G.Museum,new ax),z.state.add(Ue.G.DinoDig,new gP),z.state.add(Ue.G.DanceDance,new bP),z.state.add(Ue.G.CoOp,new rx.w),z.state.add(Ue.G.SecureBattleRevamp,new ix),z.state.add(Ue.G.PrefabScene,new vx.Q),z.state.add(Ue.G.DuelMatchmaking,new bx),z.state.add(Ue.G.Rifts,new CP.n),z.state.add(Ue.G.LootDashTransport,new TP),z.state.add(Ue.G.LootDashMenu,new _P),z.state.start(Ue.G.Boot),window.clearInput=()=>{for(let q=0;q{this.featureFlagsLoaded(this.addFeatureFlagDebugData(q))})):this.featureFlagsLoaded(this.addFeatureFlagDebugData(z))}addFeatureFlagDebugData(q){let K=q;et.qg(window.location.search);return K}featureFlagsLoaded(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;const z=st.q.instance.prodigy.gameContainer.get("088-1d4c");z.endTracing(Tu.u.BootFeatureFlags,{flags_count:Object.keys(q).length});const Y=st.q.instance.prodigy.gameContainer,Q={},Z=Y.get("f71-42eb");Z.initializeWithJson(q),st.q.instance.prodigy.load.flagProvider=Z,z.startTracing(Tu.u.BootGameData);const J={},tt=[];tt.push(mx.loadJSONFromXHR(Z.getItemsDataURI(),"game-metadata").then((q=>{this._gameData=q,J.game_metadata_loaded=!0})).catch((q=>{J.game_metadata_error=!0,this.createPromiseError("Failed to load game metadata.")(q)}))),tt.push(mx.loadJSONFromXHR(Z.getDependencyMapURI(),"dependencyMap").then((q=>{Y.get("983-05a7").initDependencyMapper(q),zt.E.dependencyMapper=new X.nvu(q),J.dependency_map_loaded=!0})).catch((q=>{J.dependency_map_error=!0,this.createPromiseError("Failed to load dependency map.")(q)})));const et=st.q.instance.prodigy.gameContainer.get("d7b-2375").getUUID();st.q.instance.prodigy.gameContainer.get("e01-1fba").setUser(et),z.startTracing(Tu.u.BootFeatureRevision);const it={},nt=Z.getFeatureRevisionsURIs();if(this._waitingOnFeatureRevisionsData=null!==(K=null==nt?void 0:nt.length)&&void 0!==K?K:0,it.revision_count=this._waitingOnFeatureRevisionsData,this._waitingOnFeatureRevisionsData>0){const q=Z.getValue("gameDataPath"),K=nt.length;for(let z=0;z{--this._waitingOnFeatureRevisionsData;const K=["audio","atlas","bgm","prefab","sfx","singleImage","streamedMap","tiledMap","tileset"],z={};for(const Y in q)K.includes(Y)?X.VyI.log(`Attempting to load an item of type : ${Y} as a feature revision. This is not supported`,X.$bb.Warning):z[Y]=q[Y];this.mergeWithGameData(this._featureRevisionsData,z)})).catch((()=>{--this._waitingOnFeatureRevisionsData}));tt.push(Y)}}yield Promise.all(tt),z.endTracing(Tu.u.BootGameData,J),this._waitingOnFeatureRevisionsData<=0&&(it.revisions_loaded=!0),z.endTracing(Tu.u.BootFeatureRevision,it);for(let q=0;q{var q,K,z;const Q=Y.get(X.$Bt.LocalizationService),Z=[];for(let Y=1;;++Y){const q=`LOADER_FLAVOUR_${Y}`;if(!Q.hasText(q))break;Z.push(Q.getText(q))}null===(z=null===(K=null===(q=window.SW)||void 0===q?void 0:q.Load)||void 0===K?void 0:K.addFlavourMessages)||void 0===z||z.call(K,Z)}))];{const q=st.q.instance.prodigy.gameContainer.get("f71-42eb").getPrefabsURIs(),K={};for(const[Y,Q]of Object.entries(un.T))K[Q]=Number.parseInt(Y);const z=q=>{if(!q)throw new Error("No data present in loaded prefabs.");q.forEach((q=>{K[q.guid]&&(q.ID=K[q.guid])})),Q.prefab=Q.prefab.concat(q)};for(const Y of q){const q=mx.loadJSONFromXHR(Y,"prefab").then(z);at.push(q)}}yield Promise.all(at),z.endTracing(Tu.u.BootAssets,{assets_loaded:!0});const rt=Z.getValue("gameConstants");for(const q in rt)te.s.setGameConstant(q,rt[q]);this.cacheGeolocationData(),yield this.loadedData(this._gameData,this._featureRevisionsData,Q),this._gameData&&this._waitingOnFeatureRevisionsData<=0&&this.loadedLocalizedData()}))}cacheGeolocationData(){st.q.instance.prodigy.gameContainer.get("577-9956").getData().then((([q,K])=>{X.VyI.log(`Geolocation result: ${JSON.stringify(K)} ${q?q.getErrorMessage():""}`,X.$bb.Verbose)}))}createPromiseError(q){return K=>{X.VyI.log(q,X.$bb.Error),console.error(K)}}loadAndTraceLocalizationData(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Tu.u.BootLocalization);const K={};yield this.fetchLocalizationData().catch((q=>{K.localization_error=!0,this.createPromiseError("Failed to load localization data.")(q)})),this._localizedTextLoaded=!0,K.localization_loaded=!0,q.endTracing(Tu.u.BootLocalization,K)}))}fetchLocalizationData(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield el.O.determineLocale();const q=new cP.K(el.O.localeCode);st.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).setDataSource(q),yield q.dataLoadPromise}))}loadedData(q,K,z){return(0,Q.sH)(this,void 0,void 0,(function*(){let Y;const Q=q.emote;for(Y=0;Yq.ID?q.ID:q.legacyID?q.legacyID:q.guid?q.guid:void 0))}loadNonLocalAssets(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.prodigy.gameContainer.get("f71-42eb").getAssetsDataURI();return mx.loadJSONFromXHR(q,"assets-metadata").then((q=>{var K,z,Y,Q,Z,J,tt,et,it,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt;const pt={},vt=q;for(const st in vt){const q=vt[st];for(const vt in q){const gt=q[vt],mt=gt.hash;let yt,_t;if(X.Aq$.isDefined(null===(Y=null===(z=null===(K=gt.metadata)||void 0===K?void 0:K.assets)||void 0===z?void 0:z.default)||void 0===Y?void 0:Y.v)?yt=gt.metadata.assets.default.v:X.Aq$.isDefined(gt.v)?yt=gt.v:X.Aq$.isDefined(null===(tt=null===(J=null===(Z=null===(Q=gt.data)||void 0===Q?void 0:Q.metadata)||void 0===Z?void 0:Z.assets)||void 0===J?void 0:J.default)||void 0===tt?void 0:tt.v)&&(yt=gt.data.metadata.assets.default.v),"json"===st){const q=gt.data.filename;_t={type:st,base:`${_e.s.ASSET_FOLDER}/${null!==(et=gt.data.originalType)&&void 0!==et?et:st}/`,url:`${null!==(it=gt.data.originalFilename)&&void 0!==it?it:q}/${gt.hash}/${q}.${gt.assetType}`,data:gt.data}}else if("tileset"===st){const q=`${_e.s.ASSET_FOLDER}/tilesets/`;let K;K=(null===(nt=gt.data)||void 0===nt?void 0:nt.filename)?gt.data.filename:gt.nameID;_t={type:"spritesheet",base:q,url:`${K}/${yt||mt}/${K}.png`,w:null!==(rt=null===(at=null==gt?void 0:gt.data)||void 0===at?void 0:at.w)&&void 0!==rt?rt:40,h:null!==(ht=null===(ot=null==gt?void 0:gt.data)||void 0===ot?void 0:ot.h)&&void 0!==ht?ht:40}}else if("tiledMap"===st){let q;q=mx._tiledNameMappings[gt.nameID]?mx._tiledNameMappings[gt.nameID]:gt.nameID?gt.nameID:null===(ct=gt.data)||void 0===ct?void 0:ct.filename;_t={type:"json",base:`${_e.s.ASSET_FOLDER}/tiled-data/`,url:`${q}/${yt||mt}/${q}.json`}}else _t={type:st,fullURL:gt.fullURL,data:gt.data},"spine"===st&&this.setupFloatling(gt);"spine"===st&&(null===(ut=null===(lt=null===(dt=gt.metadata)||void 0===dt?void 0:dt.assets)||void 0===lt?void 0:lt.default)||void 0===ut?void 0:ut.hitbox)&&(_t.data.hitbox=gt.metadata.assets.default.hitbox),(null===(ft=gt.atlasLink)||void 0===ft?void 0:ft.guid)&&X.W$e.instance.game.cache.addAtlasAlias(gt.guid,gt.atlasLink.guid,gt.atlasLink.frame),gt.sliceData&&X.W$e.instance.game.cache.addSliceData(gt.guid,gt.sliceData),yt?("sfx"===st&&18===gt.ID&&(yt=1),_t.v=yt):mt&&(_t.hash=mt),X.Aq$.isDefined(yt)||X.Aq$.isDefined(mt)||_t.fullURL||X.VyI.log(`No full url and no version, this asset will not load: ${st}-${null!==(bt=gt.ID)&&void 0!==bt?bt:gt.legacyID}`,X.$bb.Error),gt.guid&&(pt[gt.guid]=_t),gt.ID&&(pt[`${st}-${gt.ID}`]=_t),gt.nameID&&(pt[gt.nameID]=_t)}}st.q.instance.prodigy.assets.assignAssets(pt);const gt=this.getDuplicateLegacyMappings(pt);st.q.instance.prodigy.assets.assignAssets(gt),this.loadAssets()}))}))}loadAssets(){st.q.instance.prodigy.load.assets([it._.General_core_json,it._.Tiled_sprites_json],this.loadedAssets.bind(this))}setupFloatling(q){var K,z;const Y=null===(K=q.data)||void 0===K?void 0:K.filename;if(Y&&0===Y.indexOf(AP.s.FLOATLING_PREFIX))for(let Q=0;Q-1){const K=null!==(z=q.ID)&&void 0!==z?z:q.data.ID;AP.s.floatlingSpineIDs[Q][Y.charAt(Y.length-1)]=K;break}}}static loadJSONFromXHR(q,K){return(0,Q.sH)(this,void 0,void 0,(function*(){return new Promise(((z,Y)=>{let Q=3;const Z=()=>{const J=new XMLHttpRequest;J.onreadystatechange=()=>{J.readyState===XMLHttpRequest.DONE&&(200===J.status?z(J.response):Q>0?(Q--,Z()):(X.VyI.log(`Failed to load ${K} data.`,X.$bb.Error),Y()))},J.responseType="json",J.open("GET",q,!0),J.send("")};Z()}))}))}loadLocalAssets(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=st.q.instance.prodigy.gameContainer.get("92f-3441").getCurrentEnvironmentByHost()===Ze.h.Local?"":"/game",K=`${window.location.origin}${q}`,z=`${K}/projectConfig/assetPathConfig.json`;return mx.loadJSONFromXHR(z,"assetPathConfig").then((q=>{var z;const Y=q,Q={},Z=Object.keys(Y.assetData);for(let tt=0;tt{st.q.instance.prodigy.gameContainer.get("983-05a7").initDependencyMapper(q),zt.E.dependencyMapper=new X.nvu(q)}));const J={},tt=new Set,et=q=>{if(!q)throw new Error("No data present in loaded prefabs.");const K={};q.forEach((q=>{K[q.guid]={data:{prefab:q.data.prefab},name:q.data.filename,key:q.guid,local:!0}}));const z=Object.keys(K);for(let Y=0;Y{const K=Object.keys(un.T);for(let z=0;z{let z=!1;q.prefab.forEach((q=>{q.guid===K&&(q.data.prefab=J[K],z=!0)})),z||q.prefab.push({guid:K,ID:K,data:{prefab:J[K],name:K},type:"Prefab"})}))}))}))}loadedLocalizedData(){window.updateGameLoaderProgress(75,"loadedLocalizedData - begin");const q=["boots","follow","hat","mount","outfit","weapon","pet"],K=st.q.instance.prodigy.gameContainer.get("aae-4f6a");K.addPhrases(z(60675).H,!0);for(let z=0;zq.data.name)));window.addEventListener("message",(q=>{if(q.origin===window.location.origin){const K=q.data;try{K.cmd&&(K.cmd.indexOf("T2C_")>=0||K.cmd.indexOf("C2T_")>=0)&&(K.prodigy||window.postMessage(JSON.stringify({cmd:"T2C_Result",param:[["Cheating is BAD!","Stop doing it!"]],prodigy:!0}),window.location.origin))}catch(e){}}}),!1),X.o5U.isAndroid()&&st.q.instance.game.device.rotationEvent.add((q=>{q?(this.game.scale.fullScreenScaleMode=at.y.EXACT_FIT,this.game.scale.fullScreenTarget=document.body,this.game.scale.startFullScreen().catch(X.RQr.createHandler("Failed to start fullscreen."))):this.game.scale.stopFullScreen()})),this._metricsManager.checkForCrash()}loadedAssets(q,K){this._isAssetsLoaded=K}create(){super.create(),st.q.instance.prodigy.init(),this.game.scale.scaleMode=te.s.get("GameConstants.Build.SCALE_MODE"),this.game.scale.refresh(),this.input.maxPointers=1,this.game.stage.disableVisibilityChange=!0,X.o5U.isDesktop()?this.game.scale.pageAlignHorizontally=!0:this.game.scale.forceOrientation(!0),this.extendInput()}extendInput(){const q=st.q.instance.game;q.inputDispatcher=new sx(q),q.input.setEnterCallback=K=>{q.input.enterCallback=K},q.input.clearEnterCallback=()=>{delete this.game.input.enterCallback},document.addEventListener("keyup",(K=>{13===K.keyCode&&X.Aq$.isDefined(q.input.enterCallback)&&q.input.enterCallback()}))}update(){if(super.update(),!this._isBootLoaded&&this._isAssetsLoaded&&this._isDataLoaded&&this._localizedTextLoaded){this._isBootLoaded=!0;const q=st.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Tu.u.BootRebuildGUID),An.K.addLocalGuidsToCommonAssetsCached(),st.q.instance.game.broadcaster.broadcast(gi.fP.Loaded,null,[]);st.q.instance.prodigy.gameContainer.get(X.t5G.PrefabDataProvider).rebuildPrefabGuidMap(),q.endTracing(Tu.u.BootRebuildGUID),q.startTracing(Tu.u.BootStartNextState),st.q.instance.game.state.start(Ue.G.SplashScreen),q.endTracing(Tu.u.BootStartNextState),q.endTracing(Tu.u.Boot,{asset_loaded:this._isAssetsLoaded,data_loaded:this._isDataLoaded,localized_text_loaded:this._localizedTextLoaded,boot_loaded:this._isBootLoaded})}}shutdown(){st.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(Tu.u.Boot,{completed:!1,shutdown_before_completion:!0}),super.shutdown()}static logAntiTamperingWarning(){console.log("\n%c WARNING! %c\n\nThis is a browser feature for developers only. If someone told you to copy-paste something here, it is a scam and may provide others with access to your account and/or your computer. This may result in your account being deleted and/or you may be banned from Prodigy.\n","background: #F00; font-family: Arial; color: #FFF; font-size: 12pt; font-weight: 500; padding: 5px; margin-bottom: 5px","background: none; font-family: Arial; font-size: 10pt; line-height: 20px;")}}mx._tiledNameMappings={"map-crystal_caverns-dungeonhub":"crystal-caverns-hub","map-skywatch-a0":"map-cloudzone-a0","map-skywatch-a1":"map-cloudzone-a1","map-skywatch-b1":"map-cloudzone-b1","map-skywatch-b2":"map-cloudzone-b2","map-skywatch-b3":"map-cloudzone-b3","map-skywatch-c1":"map-cloudzone-c1","map-skywatch-c2":"map-cloudzone-c2","map-skywatch-c3":"map-cloudzone-c3","map-skywatch-c4":"map-cloudzone-c4","map-skywatch-c5":"map-cloudzone-c5","map-skywatch-d1":"map-cloudzone-d1","map-skywatch-d2":"map-cloudzone-d2","map-skywatch-d3":"map-cloudzone-d3","map-skywatch-e1":"map-cloudzone-e1","map-skywatch-e2":"map-cloudzone-e2","map-skywatch-e3":"map-cloudzone-e3","map-skywatch-e4":"map-cloudzone-e4","map-skywatch-e5":"map-cloudzone-e5","map-academy-cr1":"map-academy-gh-landing2","map-academy-cr2":"map-academy-gh-landing1","map-earthtower-cr":"map-earthtower-common","map-earthtower-wr":"map-earthtower-warden","map-earth-tower-end":"map-earthtower-entrance-exit","map-icetower-cr":"map-icetower-common","map-icetower-wr":"map-icetower-warden","map-ice-tower-end":"map-icetower-entrance-exit","map-lamplight-c3-arena-pumpkinfest":"map-lamplight-c3-pumpkinfest","map-lamplight-c3-arena-springfest":"map-lamplight-c3-springfest","map-lamplight-c3-arena-starlight_festival":"map-lamplight-c3-starlight_festival","map-lamplight-c3-arena-summerfest":"map-lamplight-c3-summerfest","map-lamplight-c3-arena-winterfest":"map-lamplight-c3-winterfest","towertown-default-1":"towertown-1up","towertown-default-2":"towertown-2up","towertown-tutorial":"towertown-1up-tut-sub","crystal-caverns-phase-1-farback":"crystal-caverns-phase-1-parallax"},window.Boot=mx},8083:(q,K,z)=>{"use strict";z.d(K,{w:()=>Rs});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(92579),tt=z(35120),et=z(29569),it=z(91207),st=z(77938),nt=z(98400),at=z(99625),rt=z(82209),ot=z(129),ht=z(27812),ct=z(63115),dt=z(47389),lt=z(71857),ut=z(53885),ft=z(80060),bt=z(83441);class pt extends Q.uAl{constructor(){super(...arguments),this.currentValue=0,this.onHealthChanged=new Q.HN0}get CurrentValue(){return this.currentValue}set CurrentValue(q){this.currentValue!==q&&(this.currentValue=q,this.onHealthChanged.dispatch(this.currentValue))}get OnHealthChanged(){return this.onHealthChanged}get InitialValue(){return this.initialValue}set InitialValue(q){this.initialValue=q}reset(){this.CurrentValue=this.initialValue}destroy(){this.onHealthChanged.dispose(),super.destroy()}}class vt extends Q.JTX{constructor(){super(...arguments),this.battleTeam=null}get DamageReceiver(){return this.damageReceiver}get DamageSource(){return this.damageSource}get BattleTeam(){return this.battleTeam}set BattleTeam(q){null!==this.battleTeam&&this.battleTeam.removeMember(this),this.battleTeam=q,this.battleTeam.addMember(this)}get Health(){return this.health}get EnterBattleAnimationState(){return this.enterBattleAnimationState}get IdleAnimationState(){return this.idleAnimationState}get AttackAnimationState(){return this.attackAnimationState}get TakeDamageAnimationState(){return this.takeDamageAnimationState}get DefeatAnimationState(){return this.defeatAnimationState}get VictoryAnimationState(){return this.victoryAnimationState}get NameProvider(){return this.name}get Level(){return this.level}get Element(){return this.element}get CastPoint(){return this.castPoint}get ImpactSize(){return this.impactSize}get ImpactOffset(){return this.impactOffset}destroy(){null!==this.battleTeam&&this.battleTeam.removeMember(this),super.destroy()}setAsActiveTeamMember(){this.battleTeam.ActiveMember=this}}(0,Y.Cg)([(0,Q.fFd)("DamageReceiver"),(0,Y.Sn)("design:type",Object)],vt.prototype,"damageReceiver",void 0),(0,Y.Cg)([(0,Q.fFd)("DamageSource"),(0,Y.Sn)("design:type",Object)],vt.prototype,"damageSource",void 0),(0,Y.Cg)([(0,Q.fFd)("Health"),(0,Y.Sn)("design:type",pt)],vt.prototype,"health",void 0),(0,Y.Cg)([(0,Q.fFd)("EnterBattleAnimationState"),(0,Y.Sn)("design:type",Object)],vt.prototype,"enterBattleAnimationState",void 0),(0,Y.Cg)([(0,Q.fFd)("IdleAnimationState"),(0,Y.Sn)("design:type",Object)],vt.prototype,"idleAnimationState",void 0),(0,Y.Cg)([(0,Q.fFd)("AttackAnimationState"),(0,Y.Sn)("design:type",Object)],vt.prototype,"attackAnimationState",void 0),(0,Y.Cg)([(0,Q.fFd)("TakeDamageAnimationState"),(0,Y.Sn)("design:type",Object)],vt.prototype,"takeDamageAnimationState",void 0),(0,Y.Cg)([(0,Q.fFd)("DefeatAnimationState"),(0,Y.Sn)("design:type",Object)],vt.prototype,"defeatAnimationState",void 0),(0,Y.Cg)([(0,Q.fFd)("VictoryAnimationState"),(0,Y.Sn)("design:type",Object)],vt.prototype,"victoryAnimationState",void 0),(0,Y.Cg)([(0,Q.fFd)("Name"),(0,Y.Sn)("design:type",Object)],vt.prototype,"name",void 0),(0,Y.Cg)([(0,Q.fFd)("Level"),(0,Y.Sn)("design:type",Number)],vt.prototype,"level",void 0),(0,Y.Cg)([(0,Q.fFd)("Element"),(0,Y.Sn)("design:type",String)],vt.prototype,"element",void 0),(0,Y.Cg)([(0,Q.fFd)("CastPoint",!1),(0,Y.Sn)("design:type",Object)],vt.prototype,"castPoint",void 0),(0,Y.Cg)([(0,Q.fFd)("ImpactSize",!1),(0,Y.Sn)("design:type",Object)],vt.prototype,"impactSize",void 0),(0,Y.Cg)([(0,Q.fFd)("ImpactOffset",!1),(0,Y.Sn)("design:type",Object)],vt.prototype,"impactOffset",void 0);var gt=z(16495);class mt extends Q.JTX{constructor(){super(...arguments),this.walkTarget=null,this.movement=null,this.animationPlayed=!1,this.onComplete=new Q.HN0}get WalkTarget(){return this.walkTarget}set WalkTarget(q){this.walkTarget=q}get MovementComponent(){return this.movement}set MovementComponent(q){this.movement=q}get OnComplete(){return this.onComplete}play(){(0,gt.sR)(this.animators,lt.$.WALK,!0),this.movement.onMoveEnd.addOnce((()=>{(0,gt.sR)(this.animators,this.idleAnimationName,!0),this.animationPlayed=!0,this.onComplete.dispatch()})),this.movement.MoveTarget=this.walkTarget}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.fFd)("Animators"),(0,Y.Sn)("design:type",Object)],mt.prototype,"animators",void 0),(0,Y.Cg)([(0,Q.fFd)("IdleAnimationName"),(0,Y.Sn)("design:type",String)],mt.prototype,"idleAnimationName",void 0);class yt extends Q.s3P{constructor(){super(...arguments),this.onComplete=new Q.HN0,this.animationName=null,this.loop=!1,this.animationPlayed=!1}get OnComplete(){return this.onComplete}get AnimationName(){return this.animationName}set AnimationName(q){this.animationName=q}get LoopAnimation(){return this.loop}set LoopAnimation(q){this.loop=q}play(){if(Array.isArray(this.animators)){const q=this.animators.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise((K=>{q.OnAnimationComplete.addOnce(K),q.playAnimation(this.animationName,this.loop)}))}))));Promise.all(q).then((()=>{this.animationPlayed=!0,this.onComplete.dispatch()})).catch((()=>{Q.VyI.log("PlayInjectAnimatorsState - Warning: Could not play all animations",Q.$bb.Warning)}))}else this.animators.OnAnimationComplete.addOnce((()=>{this.onComplete.dispatch()})),this.animators.playAnimation(this.animationName,this.loop)}hasFinishedPlaying(){return this.animationPlayed}}(0,Y.Cg)([(0,Q.fFd)("Animators"),(0,Y.Sn)("design:type",Object)],yt.prototype,"animators",void 0);class _t extends Q.PQK{set idleAnimationName(q){this._idleAnimationName=q}installBindings(){const q=new yt(this.Container);q.AnimationName=this._idleAnimationName,q.LoopAnimation=!0,this.Container.bind("IdleAnimationState").toConstantValue(q);const K=new yt(this.Container);K.AnimationName=lt.$.ATTACK,K.LoopAnimation=!1,this.Container.bind("AttackAnimationState").toConstantValue(K),this.Container.bind("IdleAnimationName").toConstantValue(this._idleAnimationName),this.Container.bind("CastPoint").toConstantValue({x:60,y:-40}),this.Container.bind("ImpactSize").toConstantValue({x:0,y:0}),this.Container.bind("ImpactOffset").toConstantValue({x:0,y:0})}}class Et{constructor(q){this.game=null,this.game=q}createPlayer(q,K,z,X){return(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise((Z=>(0,Y.sH)(this,void 0,void 0,(function*(){const Y=K.getAvailableSlot();if(null!==Y){Y.IsOccupied=!0;const K=new ot.a(tt.q.instance.game);let J;z&&(J={type:z.transformType,ID:z.transformID}),K.init({data:{chargedLevelData:X},appearance:{morph:J}});const et=new rt.z;et.initialize(K);const it={"1eb-d7b4":et},st=tt.q.instance.prodigy.gameContainer.get("983-05a7"),nt=yield ft.d.loadWithInjectedValuesAndDependenciesFromGUID(st,at.l.RemotePlayer,it);nt.setLayer(void 0,!0);const pt=nt.findComponentInChildren(dt.b),gt=nt.findComponent(ut.u).getRootContainer();Y.GameObject.parent.addChild(nt),Y.GameObject.parent.legacyTransform.group.addChild(gt),gt.visible=!1,gt.transform.position.set(Y.OffScreenStartPosition.x,Y.OffScreenStartPosition.y);const yt=nt.addComponent(Q.bE_),Et=new _t;Et.idleAnimationName=z?lt.$.STAND:lt.$.STOP_HEAVY,yt.Installers.push(Et),yt.runInstallers();const wt=nt.addComponent(Q.Fid);wt.Identifier="Animators",wt.Components=[nt.findComponentInChildren(bt.O).spineAnimator];const Tt=nt.addComponent(ht.I);Tt.MoveSpeed=220;const St=nt.addComponent(mt);St.MovementComponent=Tt,St.WalkTarget=new Q.I9Y(Y.GameObject.legacyTransform.x,Y.GameObject.legacyTransform.y);const At=nt.addComponent(Q.Fid);At.Identifier="EnterBattleAnimationState",At.Components=[St];const Ct=nt.addComponent(ht.I);Ct.MoveSpeed=450;const Ot=nt.addComponent(mt);Ot.MovementComponent=Ct,Ot.WalkTarget=new Q.I9Y(Y.OffScreenStartPosition.x,Y.OffScreenStartPosition.y);const It=nt.addComponent(Q.Fid);It.Identifier="DefeatAnimationState",It.Components=[Ot];const Dt=nt.addComponent(vt),Rt=nt.addComponent(Q.Fid);Rt.Identifier="BattleTeamMember",Rt.Components=[Dt];const Pt=()=>{const K=nt.findComponentInChildren(ct.T),z=new Promise((q=>{pt.onAppearanceLoaded.addOnce(q)}));pt.setAppearance(q).catch(Q.RQr.createHandler("Failed to set player appearance for battle player"));const Y=K?K.updateMountAppearance().catch(Q.RQr.createHandler("Failed to load battle player mount")):Promise.resolve();Promise.all([z,Y]).then((()=>{gt.visible=!0,Z(nt)})).catch(Q.RQr.createHandler("Failed in onAppearanceReady for player creation"))},Mt=nt.findComponentInChildren(bt.O).spineAnimator.spine;Mt.isLoaded?Pt():Mt.OnLoaded.addOnce(Pt)}else Q.VyI.log("No available slots on screen to create player",Q.$bb.Warning),Z(null)}))))}))}}var wt=z(34829);class Tt extends Q.s3P{constructor(){super(...arguments),this.stars=0}getStars(){return this.stars}addStars(q){let K=q;this.currentPlayer.hasParentLinkedEmail()&&(K+=Math.ceil(K*wt.s.get("GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE"))),this.currentPlayer.isMember()&&(K+=Math.ceil(K*wt.s.get("GameConstants.Battle.MEMBER_STARS_PERCENTAGE"))),this.stars+=K}}(0,Y.Cg)([(0,Q.fFd)("CurrentPlayer"),(0,Y.Sn)("design:type",Object)],Tt.prototype,"currentPlayer",void 0);class St extends Q.PQK{constructor(q){super(),this.game=null,this.game=q}installBindings(){this.Container.bind("PlayerFactory").toConstantValue(new Et(this.game)),this.Container.bind("CombatBounty").toConstantValue(new Tt(this.Container)),this.Container.bind("QuestionInterface").toConstantValue(new nt.w(tt.q.instance.prodigy.education))}}class At extends Q.JTX{constructor(){super(...arguments),this.teamID=0,this.activeMember=null,this.onActiveMemberChanged=new Q.HN0,this.onDefeated=new Q.HN0,this.teamMembers=[],this.onScreenSlots=[]}get ID(){return this.teamID}set ID(q){this.teamID=q}get ActiveMember(){return this.activeMember}set ActiveMember(q){this.activeMember=q,this.onActiveMemberChanged.dispatch()}get OnActiveMemberChanged(){return this.onActiveMemberChanged}get OnDefeated(){return this.onDefeated}get Members(){return this.teamMembers}get OnScreenSlots(){return this.onScreenSlots}set OnScreenSlots(q){this.onScreenSlots=q}getAvailableSlot(){for(let q=0;qK===q));this.teamMembers=this.teamMembers.filter((K=>K!==q)),K.forEach((q=>{q.DamageReceiver.OnDefeated.remove(this.teamMemberDefeated,this)}))}teamMemberDefeated(){let q=!0;for(let K=0;KK.ID===q));null!==this.teamID&&(K.OnScreenSlots=K.OnScreenSlots.filter((q=>q!==this))),this.teamID=q,K.OnScreenSlots.push(this)}}(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],Ct.prototype,"battleTeams",void 0);var Ot=z(34603),It=z(95925),Dt=z(85313);class Rt extends Q.JTX{constructor(){super(...arguments),this.font=null,this.currentText=""}setFontAttributes(q){null!==this.font&&(this.font.destroy(),this.font=null);const K=`atlas-${q.fontID}`;this.assetLoader.isLoaded(K,It.i.Image)?this.font=new Dt.B(tt.q.instance.game,this.GameObject.legacyTransform.group,0,0,this.currentText,q):this.assetLoader.loadAssets([K]).then((()=>{this.setFontAttributes(q)}))}setText(q){this.currentText=q,null!==this.font&&this.font.setText(q)}destroy(){null!==this.font&&this.font.destroy(),super.destroy()}}(0,Y.Cg)([(0,Q.fFd)(Q.t5G.AssetLoader),(0,Y.Sn)("design:type",Object)],Rt.prototype,"assetLoader",void 0);class Pt extends Q.JTX{constructor(){super(...arguments),this.tileSprite=null,this.width=0,this.height=0,this.source=null,this.frame=null}get Width(){return this.width}set Width(q){this.width=q}get Height(){return this.height}set Height(q){this.height=q}destroy(){null!==this.tileSprite&&this.tileSprite.destroy(),super.destroy()}setAsset(q,K){this.source=q,this.frame=K,this.assetLoader.isLoaded(this.source,It.i.Image)?this.regenerateTiledTexture():this.assetLoader.loadAssets([this.source]).then((()=>{this.regenerateTiledTexture()}))}regenerateTiledTexture(){null!==this.tileSprite&&this.tileSprite.destroy(),this.tileSprite=tt.q.instance.game.add.tileSprite(.5*-this.width,.5*-this.height,this.width,this.height,this.source,this.frame,this.GameObject.legacyTransform.group)}}(0,Y.Cg)([(0,Q.fFd)(Q.t5G.AssetLoader),(0,Y.Sn)("design:type",Object)],Pt.prototype,"assetLoader",void 0);class Mt{get OnComplete(){return this.onComplete}constructor(q=[]){this.animationClips=[],this.onComplete=new Q.HN0;for(let K=0;K{this.hasFadedIn=!0})),q.onTweenComplete.addOnce((()=>{this.hasFadedOut=!0,this.onComplete.dispatch()})),K.chain(q)}hasFinishedPlaying(){return this.hasFadedIn&&this.hasFadedOut}destroy(){super.destroy()}}class xt extends Q.uAl{constructor(){super(...arguments),this.onComplete=new Q.HN0,this.moveComplete=!1,this.fadeComplete=!1,this.moveAmount=0,this.fadeDelay=0,this.moveTime=0,this.fadeTime=0}get OnComplete(){return this.onComplete}get MoveAmount(){return this.moveAmount}set MoveAmount(q){this.moveAmount=q}get FadeDelay(){return this.fadeDelay}set FadeDelay(q){this.fadeDelay=q}get MoveTime(){return this.moveTime}set MoveTime(q){this.moveTime=q}get FadeTime(){return this.fadeTime}set FadeTime(q){this.fadeTime=q}play(){const q=this.GameObject.legacyTransform.y+this.moveAmount;tt.q.instance.game.add.tween(this.GameObject.legacyTransform.group,this).to({y:q},this.moveTime,Q.GS3.Quadratic.Out,!0).onTweenComplete.addOnce((()=>{this.moveComplete=!0,this.hasFinishedPlaying()&&this.onComplete.dispatch()})),tt.q.instance.game.add.tween(this.GameObject.legacyTransform.group,this).to({alpha:0},this.fadeTime,Q.GS3.Quadratic.Out,!0,this.fadeDelay).onTweenComplete.addOnce((()=>{this.fadeComplete=!0,this.hasFinishedPlaying()&&this.onComplete.dispatch()}))}hasFinishedPlaying(){return this.moveComplete&&this.fadeComplete}destroy(){this.onComplete.dispose(),super.destroy()}}var Lt=z(50118),kt=z(88022);class Bt extends Q.JTX{showStatusText(q,K){if("missed"===q.toLowerCase()){const q=new Q._mx(this.GameObject);return q.name="MissedText",q.addComponent(Q.K16).group.position.set(K.x,K.y),q.addComponent(Q.bE_),this.createFloatingTextImage(kt._.General_battle_json,"text-miss",q),q}if("too late"===q.toLowerCase()){const q=new Q._mx(this.GameObject);return q.name="TooLateText",q.addComponent(Q.K16).group.position.set(K.x,K.y),q.addComponent(Q.bE_),this.createFloatingTextImage(kt._.General_battle_json,"text-toolate",q),q}if("critical hit"===q.toLowerCase()){const q=new Q._mx(this.GameObject);return q.name="CriticalHitText",q.addComponent(Q.K16).group.position.set(K.x,K.y),q.addComponent(Q.bE_),this.createFloatingTextImage(kt._.General_battle_json,"text-critical-hit",q),q}}showDamageText(q,K){const z=new Q._mx(this.GameObject);return z.name="DamageText",z.addComponent(Q.K16).group.position.set(K.x,K.y),z.addComponent(Q.bE_),this.createFloatingText(`-${q}`,12,1,44,z),z}showAttackInfo(q,K){const z=new Q._mx(this.GameObject);z.name="AttackInfo",z.addComponent(Q.K16).group.position.set(640,360),z.addComponent(Q.bE_);const Y=new Q._mx(z);Y.name="Background",Y.addComponent(Q.K16),Y.legacyTransform.group.alpha=0;const X=Y.addComponent(Pt);X.Width=tt.q.instance.game.width,X.Height=100,X.setAsset(kt._.Tiled_sprites_json,"dialogue");const Z=Y.addComponent(Nt);Z.FadeInAlpha=.5,Z.FadeInTime=125,Z.FadeOutTime=125,Z.FadeOutDelay=1e3;const J=new Q._mx(z);J.name="AttackLabel",J.addComponent(Q.K16).group.position.set(tt.q.instance.game.width/-2,-20),J.legacyTransform.group.alpha=0;const et=J.addComponent(Rt);et.setFontAttributes({fontID:10,align:"center",width:tt.q.instance.game.width,size:40}),et.setText(this.localizer.getText("COMBAT_ATTACK_USED",q,K));const it=J.addComponent(Nt);it.FadeInTime=125,it.FadeOutTime=125,it.FadeOutDelay=1e3;const st=z.addComponent(Q.Fid);st.Identifier="Animations",st.Components=[Z,it];const nt=new Mt([Z,it]);return nt.OnComplete.addOnce((()=>{z.destroy()}),this,-99),nt.playAll(),z}showFloatingBanner(q){const K=tt.q.instance.game.width,z=new Q._mx(this.GameObject);z.name="FloatingTextBanner",z.addComponent(Q.K16).group.position.set(640,380),z.addComponent(Q.bE_);const Y=new Q._mx(z);Y.name="Background",Y.addComponent(Q.K16),Y.legacyTransform.group.alpha=0;const X=Y.addComponent(Pt);X.Width=K,X.Height=200,X.setAsset(kt._.Tiled_sprites_json,"dialogue");const Z=Y.addComponent(Nt);Z.FadeInAlpha=.5,Z.FadeInTime=250,Z.FadeOutTime=250,Z.FadeOutDelay=2700;const J=new Q._mx(z);J.name="BannerLabel",J.addComponent(Q.K16).group.position.set(0,-40);const et=J.addComponent(Rt);et.setFontAttributes({fontID:10,align:"center",width:K,size:80}),et.setText(q);const it=tt.q.instance.game.add.tween(J.legacyTransform.group,this);it.to({x:-615},250,Q.GS3.Linear.None,!1),it.to({x:-660},2700,Q.GS3.Linear.None,!1),it.to({x:-K},250,Q.GS3.Linear.None,!1);const st=this.GameObject.addComponent(Lt.a);st.Tween=it;const nt=z.addComponent(Q.Fid);nt.Identifier="Animations",nt.Components=[Z,st];const at=new Mt([Z,st]);return at.OnComplete.addOnce((()=>{z.destroy()}),this,-99),at.playAll(),z}createFloatingTextImage(q,K,z){const Y=z.addComponent(Ot._);Y.setAsset(q,K),Y.setAnchor(.5,.5),this.addFloatAnimations(z)}createFloatingText(q,K,z,Y,Q){const X=Q.addComponent(Rt);X.setFontAttributes({size:z,fontID:K,mono:Y}),X.setText(q),Q.legacyTransform.x-=.5*X.font.width,this.addFloatAnimations(Q)}addFloatAnimations(q){const K=q.addComponent(xt);K.FadeDelay=1300,K.FadeTime=200,K.MoveAmount=-100,K.MoveTime=1500,K.OnComplete.addOnce((()=>{q.destroy()}),this,-99),K.play();const z=q.addComponent(Q.Fid);z.Identifier="Animations",z.Components=[K]}}(0,Y.Cg)([(0,Q.fFd)("Localization"),(0,Y.Sn)("design:type",Q.dTp)],Bt.prototype,"localizer",void 0);const Ut={startOverride:null,endSizeOverride:null,endOffsetOverride:{x:0,y:0},travelStraight:!0};var Ft=z(52239),Gt=z(74452),jt=z(47315),$t=z(93709);class Ht{constructor(q){this.game=q}animateCharacters(q,K,z,Y){for(let Q=0;Q0){this.game.time.events.addTimer(Y,this.animateCharacters.bind(this,q,K,z,0),this);break}this[q].apply(this,[z[Q],K])}}damage(q,K){const z=this.game.add.tween(q,this),Y=this.game.add.tween(q,this);z.to({x:q.x+5},K,Ht._customWiggle,!0,0),Y.to({y:q.y+5},K,Ht._customWiggle,!0,0);const Q=q.x,X=q.y;z.onTweenComplete.addOnce((()=>{q.x=Q})),Y.onTweenComplete.addOnce((()=>{q.y=X}))}vibrate(q,K){const z=q.x,Y=q.x-5,X=q.x+5,Z=100,J=Math.round((K-200)/Z*.5),tt=this.game.add.tween(q,this),et=this.game;tt.to({x:Y},Z,Q.GS3.Linear.None,!0).onTweenComplete.add((()=>{const K=et.add.tween(q,this);K.to({x:X},Z,Q.GS3.Linear.None,!1,0,J,!0),K.onTweenComplete.add((()=>{et.add.tween(q,this).to({x:z},Z,Q.GS3.Linear.None,!0)}))}))}}Ht._customWiggle={value:q=>{const K=q*Math.PI*6;return Math.sin(K+Math.PI*Math.random())*(1-q)}};var Vt=z(29949);class Wt{get OnCharacterImpactAnimationComplete(){return this.onCharacterImpactAnimationComplete}constructor(q,K){this.numSpineInstances=0,this.onImpact=new Q.HN0,this.onSpellComplete=new Q.HN0,this.onLoaded=new Q.HN0,this.hasLoaded=!1,this.spellCharacterAnimation=null,this._create2AnimationName="create2",this.overrideStartPosition=null,this.overrideEndSize=null,this.overrideEndOffset=null,this.travelStraight=!1,this.targetTeamSource=null,this.onCharacterImpactAnimationComplete=new Q.HN0,this.game=q,this.target=K.target,this.targetTeam=K.targetTeam,this.targetFrom=K.targetFrom,this.targetTeamSource=K.targetTeamSource;const z=st.t.getItem("spell",K.spellID);this.spellDataParser=new Vt.I(K.spellID),this.animationData=z.metadata.animationData,this.targetType=z.data.targetType,this.spellAssetKey=z.metadata.assets[0],this.parent=K.parent,this.spellCharacterAnimation=new Ht(q),this.overrideStartPosition=K.startOverride,this.overrideEndSize=K.endSizeOverride,this.overrideEndOffset=K.endOffsetOverride,this.travelStraight=K.travelStraight,tt.q.instance.prodigy.load.assets([this.spellAssetKey],(()=>{this.onLoaded.dispatch()})),this.onLoaded.addOnce(this.instantiate,this),this.onLoaded.addOnce((()=>{this.hasLoaded=!0}),this)}getName(){return this.spellDataParser.getName()}play(){this.hasLoaded?this.create():this.onLoaded.addOnce(this.create,this)}setAnimation(q,K,z){this.animationExists(q)?(this.spineMain.setAnimationByName(0,q,K),z&&this.spineMain.onComplete.addOnce(z)):z&&z()}tweenToTarget(q){const K=this.getEndPosition(),z=this.game.add.tween(this.spineMain,this);z.to(K,this.spellDataParser.getInt("travelDuration"),this.spellDataParser.getEasing("travelEasing")),z.start(),q&&z.onTweenComplete.add(q)}animationExists(q){var K;return Q.Aq$.isDefined(null===(K=this.spineMain.skeleton)||void 0===K?void 0:K.data.findAnimation(q))}getAnimationLength(q){var K,z;if(!(null===(K=this.spineMain.skeleton)||void 0===K?void 0:K.data))return Q.VyI.log(`Cannot find skeleton data for ${q}`,Q.$bb.Warning),0;const Y=this.spineMain.skeleton.data.findAnimation(q);return null!==(z=null==Y?void 0:Y.duration)&&void 0!==z?z:0}getFacingAngle(){const q=this.getEndPosition(),K=this.getStartPosition();return Math.atan2(q.y-K.y,q.x-K.x)*(180/Math.PI)}destroy(){this.dimScreen(!1),this.onSpellComplete.dispatch(),this.onSpellComplete.dispose(),this.onLoaded.dispose()}spellCreate2Animation(){if(this.animationExists(this._create2AnimationName)){const q=this.getStartPosition(),K=this.makeClone(this._create2AnimationName,q.x,q.y);!0===this.spellDataParser.getValue("createRotates")&&(K.angle=this.getFacingAngle(),this.isTravellingRight()||(K.angle-=180))}}spellImpact2Animation(){if(this.animationExists("impact2")){this.numSpineInstances++;const q=()=>{this.numSpineInstances--;const q=this.getEndPosition();this.makeClone("impact2",q.x,q.y)},K=this.spellDataParser.getInt("impact2Delay");K>0?setTimeout(q,K):q()}}spellCharacterCreateAnimation(){const q=this.spellDataParser.getValue("charFromAnimation");Q.Aq$.isDefined(q)&&q!==Wt._noneAnimation&&this.spellCharacterAnimation.animateCharacters(q,this.getAnimationLength(Wt._CREATEANIMATIONNAME),[this.targetFrom],0)}spellCharacterImpactAnimation(){const q=this.spellDataParser.getValue("charToAnimation"),K=this.spellDataParser.getValue("charToAnimationDelay"),z=this.spellDataParser.getValue("charToAnimationLength");q!==Wt._noneAnimation&&Q.Aq$.isDefined(q)&&Q.Aq$.isDefined(K)&&Q.Aq$.isDefined(z)?(this.game.time.events.addTimer(K+z,(()=>{this.onCharacterImpactAnimationComplete.dispatch()}),this),this.spellCharacterAnimation.animateCharacters(q,z,this.targetType===jt.X.Single?[this.target]:this.targetTeam,K)):this.onCharacterImpactAnimationComplete.dispatch()}makeClone(q,K,z,Y=!1){const Q=this.game.add.spine(K,z,this.spellAssetKey);return Q.setAnimationByName(0,q,Y),Q.scale.x=this.isTravellingRight()?1:-1,this.numSpineInstances++,Q.onDestroy.add(this.onSpineInstanceDestroy.bind(this,Q)),Y||Q.onComplete.add((()=>{Q.pendingDestroy=!0})),Q}onSpineInstanceDestroy(q){q.renderable=!1,q.parent&&q.parent.removeChild(q),this.numSpineInstances--,this.numSpineInstances<=0&&this.destroy()}getStartPosition(){const q=this.isTravellingRight()?1:-1,K={x:this.targetFrom.x,y:this.targetFrom.y};if(null!==this.overrideStartPosition)K.x+=this.overrideStartPosition.x,K.y+=this.overrideStartPosition.y;else{const z=this.targetFrom;K.x+=Math.round(.5*z.getHitboxWidth()*q),K.y-=Math.round(.5*z.getHitboxHeight()),z instanceof $t.H&&(K.x=820,K.y=450)}const z=this.animationData.createLocation;return z&&(K.x+=X.defaultTo(z.createOffsetX,0)*q,K.y+=X.defaultTo(z.createOffsetY,0)),K}getEndPosition(){const q=this.animationData.impactLocation;if(null!==this.overrideEndSize){const K={x:this.target.x+this.overrideEndOffset.x,y:this.target.y+this.overrideEndOffset.y};let z=q.impactx*this.overrideEndSize.x,Y=q.impacty*this.overrideEndSize.y;return Y-=Math.round(.5*this.overrideEndSize.y),this.target.x<=640&&(z*=-1),K.x+=z,K.y+=Y,this.travelStraight&&this.animationData.travelStraight&&(K.y=this.getStartPosition().y),K}{let K=.5,z=.5,Y=0,Q=0;q&&(K=X.defaultTo(q.impactx,K),z=X.defaultTo(q.impacty,z),Y=X.defaultTo(q.offsetx,Y),Q=X.defaultTo(q.offsety,Q));const Z=this.target,J=this.calculateHitboxPoint(Z.x,Z.getHitboxLeft(),Z.getHitboxWidth(),K,Y,!this.isTravellingRight());let tt;return tt=this.travelStraight&&this.animationData.travelStraight?this.getStartPosition().y:this.calculateHitboxPoint(Z.y,Z.getHitboxTop(),Z.getHitboxHeight(),z,Q,!1),{x:J,y:tt}}}calculateHitboxPoint(q,K,z,Y,Q=0,X=!1){let Z=Y,J=Q;return X&&(Z=1-Z,J=-J),q+K+z*Z+J}dimScreen(q){if(q){this.dimOverlay=this.game.add.graphics(0,0),this.game.state.getCurrentState().groupDim.addChild(this.dimOverlay),this.dimOverlay.beginFill(0,1),this.dimOverlay.drawRect(0,0,this.game.width,this.game.height),this.dimOverlay.endFill(),this.dimOverlay.alpha=0;this.game.add.tween(this.dimOverlay,this).to({alpha:.4},300,Q.GS3.Linear.None,!0)}else if(this.dimOverlay){this.game.add.tween(this.dimOverlay,this).to({alpha:0},300,Q.GS3.Linear.None,!0)}}isTravellingRight(){return this.targetFrom.x<=640}instantiate(){this.spineMain=tt.q.instance.prodigy.create.spine(0,0,this.spellAssetKey,this.parent),this.addToProperLayer(this.spineMain),this.spineMain.visible=!1,this.spineMain.onDestroy.add(this.onSpineInstanceDestroy.bind(this,this.spineMain)),this.numSpineInstances++}addToProperLayer(q){const K=this.game.state.getCurrentState();switch(this.targetTeamSource?this.targetTeamSource.getTeamPositionForContainer(this.target):this.targetTeam.indexOf(this.target)){case Gt.I.Front:K.groupFront.addChild(q);break;case Gt.I.Back:K.groupMiddle.addChildAt(q,0);break;case Gt.I.Middle:default:K.groupMiddle.addChild(q)}}create(){!0===this.spellDataParser.getValue("screenDim")&&this.dimScreen(!0);const q=this.getStartPosition();this.spineMain.position.set(q.x,q.y),this.spineMain.visible=!0,this.spellCharacterCreateAnimation()}impact(){this.spellCharacterImpactAnimation();const q=this.spellDataParser.getValue("charToAnimationDelay");Q.Aq$.isDefined(q)&&q>0?this.game.time.events.addTimer(q,this.onImpact.dispatch,this.onImpact):this.onImpact.dispatch()}}Wt._CREATEANIMATIONNAME="create",Wt._noneAnimation="none";class qt extends Wt{getCreateDuration(){const q=Q.E3R.getAnimationEventTime(this.spineMain,Wt._CREATEANIMATIONNAME,"cast");return q<0?this.getAnimationLength(Wt._CREATEANIMATIONNAME):q}create(){super.create(),this.spellCreate2Animation(),this.animationExists(Wt._CREATEANIMATIONNAME)?(this.isTravellingRight()||(this.spineMain.scale.x*=-1),this.spellDataParser.getValue("createRotates")&&(this.spineMain.angle=this.getFacingAngle(),this.isTravellingRight()||(this.spineMain.angle-=180)),this.setAnimation(Wt._CREATEANIMATIONNAME,!1,(()=>{setTimeout(this.travel.bind(this))}))):this.travel()}travel(){this.animationExists("travel")&&this.getAnimationLength("travel")>0?(this.spellDataParser.getValue("travelRotates")&&(this.spineMain.angle=this.getFacingAngle(),this.isTravellingRight()||(this.spineMain.angle-=180)),this.isTravellingRight()||(this.spineMain.scale.x=-1),this.setAnimation("travel",!0),this.tweenToTarget(this.impact.bind(this))):(this.spineMain.x=this.getEndPosition().x,this.spineMain.y=this.getEndPosition().y,this.impact())}impact(){super.impact(),this.animationExists("impact")?(this.spellDataParser.getValue("impactRotates")&&(this.spineMain.angle=this.getFacingAngle(),this.isTravellingRight()||(this.spineMain.angle-=180)),this.doLayeredAnimation("impact"),this.setAnimation("impact",!1,(()=>{this.spineMain.pendingDestroy=!0})),this.spellImpact2Animation()):(this.doLayeredAnimation("impact"),this.spellImpact2Animation(),this.spineMain.pendingDestroy=!0)}doLayeredAnimation(q){const K=this.game.state.getCurrentState();let z,Y=this.targetTeam.indexOf(this.target);if(this.targetTeamSource){const q=this.targetTeamSource.team.find((q=>Q.cj9.fuzzyEqual(q.x,this.target.x)&&Q.cj9.fuzzyEqual(q.y,this.target.y)));q&&(Y=this.targetTeamSource.getTeamPositionForContainer(q))}switch(Y){case Gt.I.Middle:z=[K.groupFront,K.groupMiddle,K.groupBack];break;case Gt.I.Back:z=[K.groupMiddle,K.groupBack,K.groupFarBack];break;case Gt.I.Front:z=[K.groupFarFront,K.groupFront,K.groupMiddle]}const X=this.getEndPosition();for(let Q=0;Q{Y.pendingDestroy=!0}))}else Q.VyI.log(`Unsupported cast animation type: ${K.type}`,Q.$bb.Warning)}}class Yt extends Wt{constructor(){super(...arguments),this.mask=null,this.beamGroup=null,this.startLocation=null,this.endLocation=null,this.distanceBetweenPoints=0,this.spineCap=null,this.spineSummon=null,this.animationWidth=1}getCreateDuration(){const q=Q.E3R.getAnimationEventTime(this.spineMain,"Summon-create","cast");return q<0?this.getAnimationLength("Summon-create"):q}create(){super.create(),this.startLocation=this.getStartPosition(),this.endLocation=this.getEndPosition(),this.makeGroup(),this.setAnimation("beam-travel",!0),this.makeMask(),this.stretchBetweenPoints(),this.summonCreate(),this.capCreate(),this.doTween(),this.beamGroup.updateTransform(),this.beamGroup.angle=this.getFacingAngle()}stretchBetweenPoints(){this.distanceBetweenPoints=Q.cj9.distance(this.startLocation.x,this.startLocation.y,this.endLocation.x,this.endLocation.y),this.beamGroup.scale.x=this.distanceBetweenPoints/this.animationWidth}makeGroup(){this.beamGroup=tt.q.instance.prodigy.create.group(),this.beamGroup.pivot.y=.5,this.beamGroup.x=this.startLocation.x,this.beamGroup.y=this.startLocation.y,this.addToProperLayer(this.beamGroup)}makeMask(){this.beamGroup.addChild(this.spineMain),this.animationWidth=this.beamGroup.width;const q=this.animationWidth;this.mask=this.game.add.graphics(0,0),this.mask.beginFill(16777215),this.mask.drawRect(0,-100,q,200),this.mask.endFill(),this.mask.scale.x=.001,this.beamGroup.addChild(this.mask),this.spineMain.x=0,this.spineMain.y=0,this.spineMain.mask=this.mask}capCreate(){this.spineCap=this.makeClone("cap-impact",0,0,!0),this.spineCap.scale.x=this.spineCap.scale.y=.5,this.beamGroup.addChild(this.spineCap)}capImpact(){this.spineCap.scale.x=this.spineCap.scale.y=1,this.impact(),this.game.time.events.addTimer(this.spellDataParser.getInt("sustainDuration"),this.doEnd,this)}capEnd(){this.spineCap.setAnimationByName(0,"cap-end",!1),this.spineCap.setToSetupPose()}beamEnd(){this.setAnimation("beam-end",!0)}summonCreate(){this.spellCharacterCreateAnimation(),this.spineSummon=this.makeClone("summon-create",0,0),this.beamGroup.addChild(this.spineSummon),this.spineSummon.onComplete.add(this.summonTravel,this)}summonTravel(){this.spineSummon.pendingDestroy=!0,this.spineSummon=this.makeClone("summon-travel",0,0,!0),this.beamGroup.addChild(this.spineSummon)}summonEnd(){this.spineSummon.pendingDestroy=!0,this.spineSummon=this.makeClone("summon-end",0,0),this.beamGroup.addChild(this.spineSummon)}doTween(){const q=this.spellDataParser.getInt("travelDuration"),K=this.spellDataParser.getEasing("travelEasing"),z=this.spellDataParser.getInt("createBeamDelay");this.game.add.tween(this.mask.scale,this).to({x:1},q,K,!0,z,0),this.game.add.tween(this.spineCap,this).to({x:this.animationWidth},q,K,!0,z,0).onTweenComplete.add(this.capImpact.bind(this))}doEnd(){this.summonEnd(),this.capEnd(),this.beamEnd();const q=this.spellDataParser.getInt("endDuration"),K=this.spellDataParser.getEasing("endEasing");let z=this.spellDataParser.getValue("endingMask");Q.Aq$.isDefined(z)||(z=!0),z?this.game.add.tween(this.spineMain,this).to({x:this.animationWidth+10},q,K,!0).onTweenComplete.add(this.doneEverything.bind(this)):this.game.time.events.addTimer(q,this.doneEverything,this)}doneEverything(){this.spineSummon.pendingDestroy=!0,this.spineCap.pendingDestroy=!0,this.spineMain.pendingDestroy=!0}travel(){}destroy(){super.destroy(),this.mask.destroy(),this.beamGroup.destroy(),this.spineSummon.destroy(),this.spineCap.destroy()}}class Qt{static makeSpell(q,K){const z=st.t.getItem("spell",K.spellID).metadata.animationData.animationType;return X.defaults(K,Ut),z===Ft.i.projectile?new qt(q,K):z===Ft.i.aoe?new Kt(q,K):z===Ft.i.beam?new Yt(q,K):z===Ft.i.aoa?new zt(q,K):(Q.VyI.log(`No spell of type ${z} supported!`,Q.$bb.Verbose),null)}}class Xt{get OnStart(){return this.onStart}get OnImpact(){return this.onImpact}get OnEnd(){return this.onEnd}get OnComplete(){return this.onComplete}get Name(){return this.name}constructor(q,K,z,Y,X){this.onStart=new Q.HN0,this.onImpact=new Q.HN0,this.onEnd=new Q.HN0,this.onComplete=new Q.HN0,this.name="",this.game=null,this.parent=null,this.spellID=null,this.from=null,this.to=null,this.game=q,this.parent=K,this.spellID=z,this.from=Y,this.to=X}cast(){if(st.t.getItem("spell",this.spellID).metadata.animationData.animationType===Ft.i.beam){const q={x:this.to.x,y:this.to.y},K=Qt.makeSpell(this.game,{parent:this.parent.legacyTransform.group,spellID:this.spellID,targetFrom:{x:this.from.x,y:this.from.y},target:q,targetTeam:[q],targetTeamSource:null,castingTeam:[],startOverride:{x:0,y:0},endSizeOverride:{x:0,y:0},endOffsetOverride:{x:0,y:0}});this.name=K.getName(),K.play(),K.onLoaded.addOnce((()=>{this.onStart.dispatch()})),K.onImpact.addOnce((()=>{this.onImpact.dispatch()})),K.onSpellComplete.addOnce((()=>{this.destroy()}))}else this.destroy()}destroy(){this.onComplete.dispatch(),this.onEnd.dispatch(),this.onStart.dispose(),this.onImpact.dispose(),this.onEnd.dispose(),this.onComplete.dispose()}}class Zt{get OnStart(){return this.onStart}get OnImpact(){return this.onImpact}get OnEnd(){return this.onEnd}get OnComplete(){return this.onComplete}get Name(){return this.name}constructor(q,K,z,Y,X){this.onStart=new Q.HN0,this.onImpact=new Q.HN0,this.onEnd=new Q.HN0,this.onComplete=new Q.HN0,this.name="",this.game=null,this.parent=null,this.spellID=null,this.originMember=null,this.targetMembers=null,this.spellCompleted=!1,this.impactAnimationCompleted=!1,this.game=q,this.parent=K,this.spellID=z,this.originMember=Y,this.targetMembers=X,this.name=st.t.getItem("spell",this.spellID).data.name}cast(){const q=Qt.makeSpell(this.game,{parent:this.parent.legacyTransform.group,spellID:this.spellID,targetFrom:this.originMember.GameObject.legacyTransform.group,target:this.targetMembers[0].GameObject.legacyTransform.group,targetTeamSource:null,targetTeam:this.targetMembers.map((q=>q.GameObject.legacyTransform.group)),castingTeam:[],startOverride:this.originMember.CastPoint,endSizeOverride:this.targetMembers[0].ImpactSize,endOffsetOverride:this.targetMembers[0].ImpactOffset});q.play(),q.onLoaded.addOnce((()=>{this.onStart.dispatch()})),q.onImpact.addOnce((()=>{this.onImpact.dispatch()})),q.onSpellComplete.addOnce((()=>{this.spellCompleted=!0,this.onComplete.dispatch(),this.checkSpellEnd()})),q.OnCharacterImpactAnimationComplete.addOnce((()=>{this.impactAnimationCompleted=!0,this.checkSpellEnd()}))}checkSpellEnd(){this.spellCompleted&&this.impactAnimationCompleted&&this.onEnd.dispatch()}}class Jt extends Q.uAl{constructor(){super(...arguments),this.game=null,this.battleContent=null}get Game(){return this.game}set Game(q){this.game=q}get BattleContent(){return this.battleContent}set BattleContent(q){this.battleContent=q}createSpell(q,K,z){return new Zt(this.game,this.battleContent,q,K,z)}createBeam(q,K,z){return new Xt(this.game,this.battleContent,q,K,z)}}class te extends Q.JTX{constructor(){super(...arguments),this.activePlayerName=null,this.isAnimating=!1,this.battleHealth=null,this.battleTeam=null}get TeamID(){return null!==this.battleTeam?this.battleTeam.ID:null}set TeamID(q){this.battleTeam=X.find(this.battleTeams,(K=>K.ID===q)),this.battleTeam&&(this.battleTeam.OnActiveMemberChanged.add(this.activeMemberChanged,this),this.battleTeam.ActiveMember&&this.activeMemberChanged())}get NameLabel(){return this.activePlayerName}set NameLabel(q){this.activePlayerName=q,this.updateNameLabel()}get IsAnimating(){return this.isAnimating}set IsAnimating(q){this.isAnimating=q}get SlideInAnimation(){return this.slideInAnimation}get SlideOutAnimation(){return this.slideOutAnimation}create(){super.create(),this.nameProvider.OnChanged.add(this.updateNameLabel,this)}destroy(){this.battleTeam&&this.battleTeam.OnActiveMemberChanged.remove(this.activeMemberChanged,this),this.battleHealth&&this.battleHealth.OnHealthChanged.remove(this.healthChanged,this),this.nameProvider.OnChanged.remove(this.updateNameLabel,this),super.destroy()}updateNameLabel(){this.activePlayerName.setText(this.nameProvider.getName())}healthChanged(){this.isAnimating=!0,this.healthBar.OnHealthChangeComplete.addOnce((()=>{this.isAnimating=!1})),this.healthBar.setCurrentHealth(this.battleHealth.CurrentValue)}activeMemberChanged(){null!==this.slideInAnimation&&null!==this.slideOutAnimation?(this.slideOutAnimation.OnComplete.addOnce((()=>{this.updateActiveMember(),this.slideInAnimation.play()})),this.slideOutAnimation.play()):this.updateActiveMember()}updateActiveMember(){null!==this.battleHealth&&this.battleHealth.OnHealthChanged.remove(this.healthChanged,this),this.battleHealth=this.battleTeam.ActiveMember.Health,this.battleHealth.OnHealthChanged.add(this.healthChanged,this),this.healthBar.setMaxHealth(this.battleHealth.InitialValue),this.healthBar.setCurrentHealth(this.battleHealth.CurrentValue)}}(0,Y.Cg)([(0,Q.fFd)("SlideInHealthBar"),(0,Y.Sn)("design:type",Object)],te.prototype,"slideInAnimation",void 0),(0,Y.Cg)([(0,Q.fFd)("SlideOutHealthBar"),(0,Y.Sn)("design:type",Object)],te.prototype,"slideOutAnimation",void 0),(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],te.prototype,"battleTeams",void 0),(0,Y.Cg)([(0,Q.fFd)("HealthBar"),(0,Y.Sn)("design:type",Object)],te.prototype,"healthBar",void 0),(0,Y.Cg)([(0,Q.fFd)("Name"),(0,Y.Sn)("design:type",Object)],te.prototype,"nameProvider",void 0);var ee=z(87490),ie=z(32389),se=z(76277);class ne extends Q.uAl{constructor(){super(...arguments),this.onChanged=new Q.HN0,this._firstNameID=0,this._middleNameID=0,this._lastNameID=0,this._nicknameID=0}get OnChanged(){return this.onChanged}get firstNameID(){return this._firstNameID}set firstNameID(q){this._firstNameID=q}get middleNameID(){return this._middleNameID}set middleNameID(q){this._middleNameID=q}get lastNameID(){return this._lastNameID}set lastNameID(q){this._lastNameID=q}get nicknameID(){return this._nicknameID}set nicknameID(q){this._nicknameID=q}getName(){return Q.Aq$.isDefined(this._nicknameID)&&0!==this._nicknameID?st.t.getItem("nickname",this._nicknameID).data.value.replace("{first}",st.t.getItem("name",this._firstNameID).data.value).replace("{middle}",st.t.getItem("name",this._middleNameID).data.value).replace("{last}",st.t.getItem("name",this._lastNameID).data.value):this.getFullName()}getFullName(){var q;const K=null===(q=st.t.getItem("name",this._firstNameID))||void 0===q?void 0:q.data.value;if(Q.Aq$.isDefined(K)){if(Q.Aq$.isDefined(this._middleNameID)&&Q.Aq$.isDefined(this._lastNameID)){const q=`${st.t.getItem("name",this._middleNameID).data.value}${st.t.getItem("name",this._lastNameID).data.value}`;return`${K} ${X.capitalize(q)}`}return K}return tt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("FALLBACK_NAME_WIZARD")}destroy(){this.onChanged.dispose(),super.destroy()}}var ae=z(79687);let re=class{constructor(){this.onQueueComplete=new Q.HN0,this.actions=[],this.isActionQueuePlaying=!1}get OnQueueComplete(){return this.onQueueComplete}get Actions(){return this.actions}get IsActionQueuePlaying(){return this.isActionQueuePlaying}playAllActions(){this.isActionQueuePlaying||(this.isActionQueuePlaying=!0,this.runNextAction())}addAction(q){this.actions.push(q)}hasQueuedActions(){return this.actions.length>0}runNextAction(){const q=this.actions[0];q.OnComplete.addOnce((()=>{this.actions.shift(),this.actions.length>0?this.runNextAction():(this.isActionQueuePlaying=!1,this.onQueueComplete.dispatch())})),q.run()}};re=(0,Y.Cg)([(0,ae.injectable)()],re);class oe{constructor(){this.onComplete=new Q.HN0}get OnComplete(){return this.onComplete}}var he=z(8693);class ce extends oe{constructor(q,K,z,Y){super(),this.player=null,this.crystal=null,this.battleUIFactory=null,this.audioPlayer=null,this.player=q,this.crystal=K,this.battleUIFactory=z,this.audioPlayer=Y}run(){this.audioPlayer.playSoundEffectClip(8,he.J.Cast);const q=this.player.AttackAnimationState;null!==q&&(q.OnComplete.addOnce((()=>{const q=this.player.IdleAnimationState;null!==q&&q.play(),this.audioPlayer.playSoundEffectClip(8,he.J.Miss);let K=this.battleUIFactory.showStatusText("too late",{x:this.crystal.GameObject.legacyTransform.x,y:this.crystal.GameObject.legacyTransform.y-80}).findComponent(Q.bE_).getInjectedValue("Animations");Array.isArray(K)||(K=[K]);new Mt(K).OnComplete.addOnce(this.onComplete.dispatch,this.onComplete)})),q.play())}}class de extends oe{get DamageAmount(){return this.damage}constructor(q,K,z,Y,Q,X,Z,J){super(),this.spellFactory=null,this.spellSource=null,this.spellTarget=null,this.spellID=null,this.crystal=null,this.battleUIFactory=null,this.audioPlayer=null,this.damage=null,this.spellFactory=z,this.spellSource=q,this.spellTarget=K,this.spellID=Q,this.crystal=X,this.battleUIFactory=Z,this.audioPlayer=J,this.damage=Y}run(){const q=this.spellFactory.createSpell(this.spellID,this.crystal,[this.spellTarget]);null!==this.spellSource.AttackAnimationState&&(this.spellSource.AttackAnimationState.OnComplete.addOnce((()=>{this.spellSource.IdleAnimationState.play()})),this.audioPlayer.playSoundEffectClip(8,he.J.Cast),this.spellSource.AttackAnimationState.play()),null!==this.spellTarget.TakeDamageAnimationState&&q.OnImpact.addOnce((()=>{this.audioPlayer.playSoundEffectClip(8,he.J.Hit),this.spellTarget.TakeDamageAnimationState.play(),this.spellTarget.DamageReceiver.applyDamage(this.damage),this.damage=0})),q.OnStart.addOnce((()=>{this.battleUIFactory.showAttackInfo(this.spellSource.NameProvider.getName(),q.Name)})),q.OnComplete.addOnce((()=>{this.onComplete.dispatch()})),setTimeout((()=>{const K=this.spellFactory.createBeam(89,{x:this.spellSource.GameObject.transform.localPosition.x+this.spellSource.CastPoint.x,y:this.spellSource.GameObject.transform.localPosition.y+this.spellSource.CastPoint.y},{x:this.crystal.GameObject.legacyTransform.x-20,y:this.crystal.GameObject.legacyTransform.y-40});K.OnImpact.addOnce((()=>{q.cast(),null!==this.crystal.AttackAnimationState&&(this.crystal.AttackAnimationState.OnComplete.addOnce(this.crystal.IdleAnimationState.play,this.crystal.IdleAnimationState),this.crystal.AttackAnimationState.play())})),K.cast()}),de.BEAM_DELAY_MS)}}de.BEAM_DELAY_MS=800;var le=z(63693);class ue extends oe{get Target(){return this.targetTeamMember}get DamageAmount(){return this.damage}constructor(q,K,z,Y,Q,X,Z){super(),this.sourceTeamMember=null,this.targetTeamMember=null,this.spellFactory=null,this.spellID=null,this.battleUIFactory=null,this.audioPlayer=null,this.damage=null,this.targetTeamMember=K,this.sourceTeamMember=q,this.spellFactory=z,this.spellID=Q,this.battleUIFactory=X,this.audioPlayer=Z,this.damage=Y}run(){const q=this.spellFactory.createSpell(this.spellID,this.sourceTeamMember,[this.targetTeamMember]),K=this.sourceTeamMember.AttackAnimationState;null!==K&&q.OnStart.addOnce((()=>{K.play(),this.audioPlayer.playSoundEffectClip(8,he.J.Cast),K.OnComplete.addOnce(this.returnToIdle,this,0,this.sourceTeamMember)})),q.OnImpact.addOnce((()=>{this.applyDamage(),this.audioPlayer.playSoundEffectClip(8,he.J.Hit)})),q.OnEnd.addOnce((()=>{this.onComplete.dispatch()})),q.cast(),this.battleUIFactory.showAttackInfo(this.sourceTeamMember.NameProvider.getName(),q.Name),this.trackSpellEvent(q)}trackSpellEvent(q){const K=st.t.getItem("spell",this.spellID);tt.q.instance.prodigy.gameContainer.get("20f-5f67").battle.sendBattleSpellCastEvent({team:le.B1.Player,spell_name:q.Name,spell_type:K.data.type,spell_level:K.data.level,spell_damage:this.damage,caster_name:this.sourceTeamMember.NameProvider.getName(),caster_level:this.sourceTeamMember.Level,target_name:this.targetTeamMember.NameProvider.getName(),target_type:this.targetTeamMember.Element,target_level:this.targetTeamMember.Level,target_health:this.targetTeamMember.Health.CurrentValue,energy_cost:K.data.energyCost,duration:void 0,success:!0})}applyDamage(){this.targetTeamMember.DamageReceiver.applyDamage(this.damage),this.damage=0;const q=this.targetTeamMember.TakeDamageAnimationState;null!==q?(q.OnComplete.addOnce((()=>{this.returnToIdle(this.targetTeamMember)})),q.play()):this.onComplete.dispatch()}returnToIdle(q){const K=q.IdleAnimationState;null!==K&&K.play()}}var fe=z(89360);class be extends oe{constructor(q,K,z,Y,Q){super(),this.battleTeams=null,this.spellFactory=null,this.timer=null,this.endDelay=0,this.audioPlayer=null,this.battleTeams=q,this.spellFactory=K,this.timer=z,this.endDelay=Y,this.audioPlayer=Q}run(){const q=X.find(this.battleTeams,(q=>0===q.ID)),K=X.find(this.battleTeams,(q=>1===q.ID)),z=this.spellFactory.createSpell(73,K.ActiveMember,[q.ActiveMember]);z.OnImpact.addOnce((()=>{q.ActiveMember.DamageReceiver.applyDamage(q.ActiveMember.Health.CurrentValue),q.ActiveMember.DefeatAnimationState.OnComplete.addOnce(this.timer.addTimer,this.timer,0,this.endDelay,this.onComplete.dispatch,this.onComplete),q.ActiveMember.DefeatAnimationState.play(),this.audioPlayer.playSoundEffectClip(8,he.J.Hit)}));const Y=K.ActiveMember.AttackAnimationState,Z=K.ActiveMember.IdleAnimationState;Y.OnComplete.addOnce((()=>{Z.play()})),Y.play(),z.cast(),this.audioPlayer.playSoundEffectClip(8,he.J.Cast),tt.q.instance.prodigy.gameContainer.get("14f-4faa").onWeeklyChallengeBattleEnd("TitanBattle").then((()=>{fe.h.instance.updateData()})).catch((q=>{Q.VyI.log(`BattleStats update failed at titan co-op battle end: ${Q.RQr.stringify(q)}`,Q.$bb.Warning)}))}}class pe{get OnComplete(){return this.onComplete}constructor(q){this.onComplete=new Q.HN0,this.spell=null,this.hasCompleted=!1,this.spell=q,this.spell.OnComplete.addOnce((()=>{this.hasCompleted=!0,this.onComplete.dispatch()}))}play(){this.spell.cast()}hasFinishedPlaying(){return this.hasCompleted}}class ve extends oe{constructor(q,K,z,Y,Q){super(),this.battleTeams=null,this.spellFactory=null,this.timer=null,this.audioPlayer=null,this.battleUIFactory=null,this.battleTeams=q,this.spellFactory=K,this.timer=z,this.audioPlayer=Y,this.battleUIFactory=Q}run(){const q=X.find(this.battleTeams,(q=>0===q.ID)),K=q.ActiveMember,z=q.Members,Y=new Mt;for(let Q=0;Q{Y.playAll()}),de.BEAM_DELAY_MS),tt.q.instance.prodigy.gameContainer.get("14f-4faa").onWeeklyChallengeBattleEnd("TitanBattle").then((()=>{fe.h.instance.updateData()})).catch((q=>{Q.VyI.log(`BattleStats update failed at titan co-op battle end: ${Q.RQr.stringify(q)}`,Q.$bb.Warning)}))}onPartialBeamsComplete(){const q=X.find(this.battleTeams,(q=>0===q.ID)),K=X.find(this.battleTeams,(q=>1===q.ID)),z=q.ActiveMember,Y=this.spellFactory.createSpell(90,z,[K.ActiveMember]);Y.OnImpact.addOnce((()=>{K.ActiveMember.DamageReceiver.applyDamage(K.ActiveMember.Health.CurrentValue),this.audioPlayer.playSoundEffectClip(8,he.J.CriticalHit),this.showDamage()})),Y.OnComplete.addOnce((()=>{const q=K.ActiveMember.DefeatAnimationState;null!==q&&q.play()}));const Q=q.ActiveMember.getInjectedValue("Animators");Q.OnAnimationComplete.addOnce((()=>{z.IdleAnimationState.play()})),Q.playAnimation("teamattack",!1),this.timer.addTimer(1e3,Y.cast,Y)}returnToIdle(q){null!==q.IdleAnimationState&&q.IdleAnimationState.play()}showDamage(){const q=X.find(this.battleTeams,(q=>1===q.ID)).ActiveMember;let K=this.battleUIFactory.showDamageText(9999,{x:q.GameObject.legacyTransform.x+q.ImpactOffset.x,y:q.GameObject.legacyTransform.y-70}).findComponent(Q.bE_).getInjectedValue("Animations");Array.isArray(K)||(K=[K]);new Mt(K).OnComplete.addOnce(this.showCriticalHit,this)}showCriticalHit(){const q=X.find(this.battleTeams,(q=>1===q.ID)).ActiveMember;let K=this.battleUIFactory.showStatusText("critical hit",{x:q.GameObject.legacyTransform.x+q.ImpactOffset.x,y:q.GameObject.legacyTransform.y-70}).findComponent(Q.bE_).getInjectedValue("Animations");Array.isArray(K)||(K=[K]);new Mt(K).OnComplete.addOnce(this.onComplete.dispatch,this.onComplete)}}class ge extends Q.JTX{getRemainingTitanHP(){if(X.findIndex(this.actionQueue.Actions,(q=>q instanceof ve))>-1)return 0;{const q=X.find(this.teams,(q=>1===q.ID)),K=X.filter(this.actionQueue.Actions,(q=>q instanceof de));let z=0;for(let Y=0;Yq instanceof be))>-1)return 0;{const q=X.find(this.teams,(q=>0===q.ID)),K=X.filter(this.actionQueue.Actions,(q=>q instanceof ue));let z=0;for(let Y=0;Y0===q.ID)).ActiveMember,this.battleUI,this.audioPlayer))}}(0,Y.Cg)([(0,Q.fFd)("QuestionInterface"),(0,Y.Sn)("design:type",Object)],me.prototype,"questionInterface",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamInfo"),(0,Y.Sn)("design:type",ge)],me.prototype,"teamInfo",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleActionQueue"),(0,Y.Sn)("design:type",re)],me.prototype,"actionQueue",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamMember"),(0,Y.Sn)("design:type",vt)],me.prototype,"teamMember",void 0),(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],me.prototype,"teams",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleUIFactory"),(0,Y.Sn)("design:type",Object)],me.prototype,"battleUI",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],me.prototype,"audioPlayer",void 0);var ye=z(48129),_e=z(79422),Ee=z(35564);class we extends oe{constructor(q,K,z,Y,Q,X,Z){super(),this.spellFactory=null,this.spellSource=null,this.spellTarget=null,this.spellID=null,this.crystal=null,this.battleUIFactory=null,this.audioPlayer=null,this.spellFactory=z,this.spellSource=q,this.spellTarget=K,this.spellID=Y,this.crystal=Q,this.battleUIFactory=X,this.audioPlayer=Z}run(){const q=this.spellFactory.createSpell(this.spellID,this.crystal,[this.spellTarget]);null!==this.spellSource.AttackAnimationState&&(this.spellSource.AttackAnimationState.OnComplete.addOnce((()=>{this.spellSource.IdleAnimationState.play()})),this.spellSource.AttackAnimationState.play(),this.audioPlayer.playSoundEffectClip(8,he.J.Cast)),q.OnImpact.addOnce((()=>{let K=this.battleUIFactory.showStatusText("missed",{x:this.spellTarget.GameObject.legacyTransform.x+this.spellTarget.ImpactOffset.x,y:this.spellTarget.GameObject.legacyTransform.y-50}).findComponent(Q.bE_).getInjectedValue("Animations");Array.isArray(K)||(K=[K]),K.push(new pe(q));new Mt(K).OnComplete.addOnce((()=>{this.onComplete.dispatch()})),this.audioPlayer.playSoundEffectClip(8,he.J.Miss)})),q.OnStart.addOnce((()=>{this.battleUIFactory.showAttackInfo(this.spellSource.NameProvider.getName(),q.Name)})),setTimeout((()=>{const K=this.spellFactory.createBeam(89,{x:this.spellSource.GameObject.transform.localPosition.x+this.spellSource.CastPoint.x,y:this.spellSource.GameObject.transform.localPosition.y+this.spellSource.CastPoint.y},{x:this.crystal.GameObject.legacyTransform.x-20,y:this.crystal.GameObject.legacyTransform.y-40});K.OnImpact.addOnce((()=>{q.cast(),null!==this.crystal.AttackAnimationState&&(this.crystal.AttackAnimationState.OnComplete.addOnce(this.crystal.IdleAnimationState.play,this.crystal.IdleAnimationState),this.crystal.AttackAnimationState.play())})),K.cast()}),de.BEAM_DELAY_MS)}}class Te extends ye.${constructor(){super(...arguments),this.listeningUserID=null}get UserID(){return this.listeningUserID}set UserID(q){this.listeningUserID=q}receivedMessage(q){if(q.action!==Ee.x.PlayerAttacked||q.data.sourcePlayerID!==this.listeningUserID)return;const K=X.find(this.battleTeams,(q=>0===q.ID)),z=X.find(this.battleTeams,(q=>1===q.ID));this.coOpSocketLogger.logMessage(`Receiving attack message for player with ID ${this.listeningUserID} and name ${this.battleTeamMember.NameProvider.getName()}\n \nAttack missed? ${q.data.missed?"YES":"NO"}. Host sending titan HP as ${q.data.titanHealth}`),q.data.missed?this.battleActionQueue.addAction(new we(this.battleTeamMember,z.ActiveMember,this.spellFactory,q.data.spellID,K.ActiveMember,this.battleUIFactory,this.audioPlayer)):this.battleActionQueue.addAction(new de(this.battleTeamMember,z.ActiveMember,this.spellFactory,q.data.damage,q.data.spellID,K.ActiveMember,this.battleUIFactory,this.audioPlayer))}}(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],Te.prototype,"battleTeams",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleActionQueue"),(0,Y.Sn)("design:type",re)],Te.prototype,"battleActionQueue",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamMember"),(0,Y.Sn)("design:type",vt)],Te.prototype,"battleTeamMember",void 0),(0,Y.Cg)([(0,Q.fFd)("SpellFactory"),(0,Y.Sn)("design:type",Object)],Te.prototype,"spellFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleUIFactory"),(0,Y.Sn)("design:type",Object)],Te.prototype,"battleUIFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],Te.prototype,"audioPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("CoOpSocketLogging"),(0,Y.Sn)("design:type",_e.h)],Te.prototype,"coOpSocketLogger",void 0);class Se{constructor(q){this.container=null,this.container=q}createCoOpTeam(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z;const Y=[];Y.push(yield this.createPlayer({appearance:q.getAppearance(),chargedLevelData:q.getChargedLevelData(),userID:q.getUserID(),level:q.player.data.level,firstName:q.getFirstName(),middleName:q.getMiddleName(),lastName:q.getLastName(),nickname:q.getNickname(),playerTransformation:q.player.getPlayerData().playerTransformation})),Y[0].addComponent(me);const Q=(0,se.G)(ie.q).enabled;for(let q=0;q0===q.ID)),Z=yield K.createPlayer(q.appearance,Y,q.playerTransformation,q.chargedLevelData);Z.name="Player";const J=Z.findComponent(Q.bE_),tt=Y.GameObject.findComponent(Q.bE_);J.Container.bind("DamageReceiver").toConstantValue(tt.getInjectedValue("DamageReceiver")),J.Container.bind("Health").toConstantValue(tt.getInjectedValue("Health")),Z.findComponent(vt).BattleTeam=Y;Z.addComponent(Te).UserID=q.userID;const et=Z.addComponent(ne);return et.firstNameID=q.firstName,et.middleNameID=q.middleName,et.lastNameID=q.lastName,et.nicknameID=q.nickname,J.Container.bind("Name").toConstantValue(et),J.Container.bind("Level").toConstantValue(q.level),J.Container.bind("Element").toConstantValue(ee.ELegacyElementType.Wizard),Z}))}}(0,Y.Cg)([Q.IJn,(0,Y.Qj)(1,(0,Q.vQZ)("PlayerFactory")),(0,Y.Qj)(2,(0,Q.vQZ)("Teams")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Object,Object,Array]),(0,Y.Sn)("design:returntype",Promise)],Se.prototype,"createPlayer",null);class Ae extends Q.PQK{installBindings(){const q=this.Container.get("FeatureFlags");this.Container.bind("CoOpTeamInitializer").toConstantValue(new Se(this.Container)),this.Container.bind("ClientHeartbeatDisconnectTime").toConstantValue(parseInt(q.getValue("coOpClientHeartbeatTimeout",wt.s.get("GameConstants.CO_OP_TITAN.CLIENT_HEARTBEAT_TIMEOUT")),10))}}class Ce extends oe{constructor(q,K,z,Y,Q,X){super(),this.sourceTeamMember=null,this.targetTeamMember=null,this.spellFactory=null,this.spellID=null,this.battleUIFactory=null,this.audioPlayer=null,this.targetTeamMember=K,this.sourceTeamMember=q,this.spellFactory=z,this.spellID=Y,this.battleUIFactory=Q,this.audioPlayer=X}run(){const q=this.spellFactory.createSpell(this.spellID,this.sourceTeamMember,[this.targetTeamMember]),K=this.sourceTeamMember.AttackAnimationState;null!==K&&q.OnStart.addOnce((()=>{K.play(),this.audioPlayer.playSoundEffectClip(8,he.J.Cast),K.OnComplete.addOnce(this.returnToIdle,this,0,this.sourceTeamMember)})),q.OnImpact.addOnce((()=>{this.showMiss(q),this.audioPlayer.playSoundEffectClip(8,he.J.Miss)})),q.cast(),this.battleUIFactory.showAttackInfo(this.sourceTeamMember.NameProvider.getName(),q.Name),this.trackSpellEvent(q)}trackSpellEvent(q){const K=st.t.getItem("spell",this.spellID);tt.q.instance.prodigy.gameContainer.get("20f-5f67").battle.sendBattleSpellCastEvent({team:le.B1.Player,spell_name:q.Name,spell_type:K.data.type,spell_level:K.data.level,spell_damage:0,caster_name:this.sourceTeamMember.NameProvider.getName(),caster_level:this.sourceTeamMember.Level,target_name:this.targetTeamMember.NameProvider.getName(),target_type:this.targetTeamMember.Element,target_level:this.targetTeamMember.Level,target_health:this.targetTeamMember.Health.CurrentValue,energy_cost:K.data.energyCost,duration:void 0,success:!1})}showMiss(q){let K=this.battleUIFactory.showStatusText("missed",{x:this.targetTeamMember.GameObject.legacyTransform.x,y:this.targetTeamMember.GameObject.legacyTransform.y-40}).findComponent(Q.bE_).getInjectedValue("Animations");Array.isArray(K)||(K=[K]),K.push(new pe(q));new Mt(K).OnComplete.addOnce((()=>{this.onComplete.dispatch()}))}returnToIdle(q){const K=q.IdleAnimationState;null!==K&&K.play()}}class Oe extends ye.${receivedMessage(q){if(q.action===Ee.x.TitanAttacked){this.coOpSocketLogger.logMessage(`Received titan attacking message. Missed? ${q.data.missed?"YES":"NO"}. Host crystal HP: ${q.data.crystalHealth}`);const K=X.find(this.battleTeams,(q=>0===q.ID));q.data.missed?this.actionQueue.addAction(new Ce(this.battleTeamMember,K.ActiveMember,this.spellFactory,q.data.spellID,this.battleUIFactory,this.audioPlayer)):this.actionQueue.addAction(new ue(this.battleTeamMember,K.ActiveMember,this.spellFactory,q.data.damage,q.data.spellID,this.battleUIFactory,this.audioPlayer))}}}(0,Y.Cg)([(0,Q.fFd)("BattleActionQueue"),(0,Y.Sn)("design:type",re)],Oe.prototype,"actionQueue",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamMember"),(0,Y.Sn)("design:type",vt)],Oe.prototype,"battleTeamMember",void 0),(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],Oe.prototype,"battleTeams",void 0),(0,Y.Cg)([(0,Q.fFd)("SpellFactory"),(0,Y.Sn)("design:type",Object)],Oe.prototype,"spellFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleUIFactory"),(0,Y.Sn)("design:type",Object)],Oe.prototype,"battleUIFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],Oe.prototype,"audioPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("CoOpSocketLogging"),(0,Y.Sn)("design:type",_e.h)],Oe.prototype,"coOpSocketLogger",void 0);var Ie=z(69698);class De extends Q.JTX{constructor(){super(...arguments),this.correctAnswers=0,this.incorrectAnswers=0,this.teamSize=null,this.isHost=null}get CorrectAnswers(){return this.correctAnswers}get IncorrectAnswers(){return this.incorrectAnswers}get Won(){return X.find(this.teams,(q=>1===q.ID)).IsDefeated()}get TeamSize(){return this.teamSize}get IsHost(){return this.isHost}getTimeSinceStart(){return this.timeManager.getLocalTimeMs()-this.startTime}create(){super.create(),this.teamSize=this.teamInfo.getTeam().TeamMembers.length,this.isHost=this.teamInfo.isHost(),this.startTime=this.timeManager.getLocalTimeMs(),this.questionInterface.OnQuestionAnswered.add(this.questionWasAnswered,this)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.questionWasAnswered,this),super.destroy()}questionWasAnswered(q){q?++this.correctAnswers:++this.incorrectAnswers}}(0,Y.Cg)([(0,Q.fFd)("QuestionInterface"),(0,Y.Sn)("design:type",Object)],De.prototype,"questionInterface",void 0),(0,Y.Cg)([(0,Q.fFd)("0f2-d6bd"),(0,Y.Sn)("design:type",Ie.V)],De.prototype,"timeManager",void 0),(0,Y.Cg)([(0,Q.fFd)("CurrentCoOpTeam"),(0,Y.Sn)("design:type",Object)],De.prototype,"teamInfo",void 0),(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],De.prototype,"teams",void 0);class Re extends Q.JTX{constructor(){super(...arguments),this.onDefeated=new Q.HN0}get OnDefeated(){return this.onDefeated}applyDamage(q){this.health.CurrentValue-=q,this.isDefeated()&&this.OnDefeated.dispatch()}isDefeated(){return this.health.CurrentValue<=0}destroy(){this.onDefeated.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.fFd)("Health"),(0,Y.Sn)("design:type",pt)],Re.prototype,"health",void 0);class Pe extends Q.uAl{getDamageAmount(){return 1}}var Me=z(28628),Ne=z(5491),xe=z(39984),Le=z(67665),ke=z(85515),Be=z(55122),Ue=z(68788),Fe=z(73032),Ge=z(2221);class je extends Q.JTX{constructor(){super(...arguments),this.onClose=new Q.HN0,this.currentMenu=null,this.starsGained=0,this.xpBarDelay=500,this.battleDuration=null}get OnClose(){return this.onClose}get StarsGained(){return this.starsGained}set StarsGained(q){this.starsGained=q}get XPBarDelay(){return this.xpBarDelay}set XPBarDelay(q){this.xpBarDelay=q}open(){const q=this.prizeTiers.getShardCount();this.openNewPostBattleFlow(q)}openNewPostBattleFlow(q){var K,z,Y,X,Z,J;const et=Q.wa5.getActiveScene().addLayer(ke.E.MenusLayer,500,!0);tt.q.instance.prodigy.game.state.getCurrentState().battleLayers[ke.E.MenusLayer]=et;const it=[];q>0&&it.push({type:"currency",ID:11,N:q});const nt=[];nt.push({type:"currency",ID:11,N:1});const at=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;(null===(X=null===(Y=null===(z=null===(K=at.data)||void 0===K?void 0:K.chargedLevelData)||void 0===z?void 0:z.newLevelData)||void 0===Y?void 0:Y.levelsGained)||void 0===X?void 0:X.length)>0&&(at.data.chargedLevelData.newLevelData.levelsGained=[null===(Z=at.data.chargedLevelData.newLevelData.levelsGained)||void 0===Z?void 0:Z.pop()],at.data.chargedLevelData.newLevelData.startingLevelRelativeXp=at.data.chargedLevelData.chargedLevelXpForCurrentLevel,at.data.chargedLevelData.newLevelData.xpGained=0);const rt=xe.e.starsToLevel(Be.s.activePlayerLevelCap,Ne.V.Player)-at.getStars();this.StarsGained=Math.min(rt,this.StarsGained),this.StarsGained=Math.max(0,this.StarsGained);const ot=st.t.getItem("titan",this.titanInfo.getAssetID());tt.q.instance.prodigy.prefabFactory.openPostBattleFlow({currentTeamCreatures:[at],victory:this.battleStats.Won,battleType:Rs.INSECURE_BATTLE_TYPE,postBattleRewards:{xpGained:{memberXp:0,totalNonMemberXp:this.StarsGained,baseXp:this.StarsGained},rewards:it,memberRewards:nt},nootTipInfo:{enemyElementWeakness:null===(J=null==ot?void 0:ot.data)||void 0===J?void 0:J.element}}).promise.then((q=>{const K=q.findComponentInChildren(Ue.D);K.OnDestroy.addOnce((()=>this.returnToMap())),this._postBattleExpressModeController.setPostBattleFlowManager(K)})).catch(Q.RQr.createHandler("Error with post battle flow menu"))}returnToMap(){var q;const K=this.createBattleEventMetadata();this.sendBattleCompleteEvent(K.success?"win":"loss");const z={battleResult:K.success?Me.XK.Victory:Me.XK.Defeat};tt.q.instance.prodigy.world.it(this.afterBattleMap,void 0,void 0,z),null===(q=this.currentMenu)||void 0===q||q.close()}sendBattleCompleteEvent(q){this.segment.battle.sendBattleCompleteEvent({outcome:q,battle_type:Rs.INSECURE_BATTLE_TYPE,enemy_attacks_made:void 0,enemy_attacks_succeeded:void 0,player_attacks_made:this.battleStats.CorrectAnswers+this.battleStats.IncorrectAnswers,player_attacks_succeeded:this.battleStats.CorrectAnswers,energy:void 0});const K=this.currentPlayer.player.getCurrentHearts();if(this.segment.battle.sendBattleParticipantsOutcomesEvent({health:K,team:le.B1.Player,name:le.B1.Player,type:ee.ELegacyElementType.Wizard,status:K>0?le.rW.Conscious:le.rW.Unconscious}),this.battleStats.IsHost){const q=st.t.getItem("titan",this.titanInfo.getAssetID());q&&this.segment.battle.sendBattleParticipantsOutcomesEvent({health:0,team:le.B1.Opponent,name:q.name,type:q.data.element,status:this.battleStats.Won?le.rW.Unconscious:le.rW.Conscious})}}createBattleEventMetadata(){return{type:"TitanBattle",action:"end",success:this.battleStats.Won,duration:this.battleDuration,coop_role:this.battleStats.IsHost?"leader":"participant",num_players:this.battleStats.TeamSize,custom:{questions_answered_correct:this.battleStats.CorrectAnswers,questions_answered_incorrect:this.battleStats.IncorrectAnswers,shard_payout:this.prizeTiers.getShardCount()}}}destroy(){this.onClose.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.fFd)(Q.t5G.AssetLoader),(0,Y.Sn)("design:type",Object)],je.prototype,"assetLoader",void 0),(0,Y.Cg)([(0,Q.fFd)("20f-5f67"),(0,Y.Sn)("design:type",Le.Y)],je.prototype,"segment",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleStats"),(0,Y.Sn)("design:type",Object)],je.prototype,"battleStats",void 0),(0,Y.Cg)([(0,Q.fFd)("PrizeProvider"),(0,Y.Sn)("design:type",Ge.f)],je.prototype,"prizeTiers",void 0),(0,Y.Cg)([(0,Q.fFd)("SummaryPlayer"),(0,Y.Sn)("design:type",Object)],je.prototype,"currentPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("TitanInfo"),(0,Y.Sn)("design:type",Object)],je.prototype,"titanInfo",void 0),(0,Y.Cg)([(0,Q.fFd)("SummaryPopUps"),(0,Y.Sn)("design:type",Object)],je.prototype,"availablePopups",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],je.prototype,"audioPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("AfterBattleDestination"),(0,Y.Sn)("design:type",String)],je.prototype,"afterBattleMap",void 0),(0,Y.Cg)([(0,Q.fFd)("PostBattleExpressModeController"),(0,Y.Sn)("design:type",Fe.o)],je.prototype,"_postBattleExpressModeController",void 0);class $e{constructor(q,K){this.titanID=null,this.assetID=null,this.titanID=q,this.assetID=K}getTitanID(){return this.titanID}getAssetID(){return this.assetID}}class He extends Q.PQK{constructor(q){super(),this.initializationData=null,this.initializationData=q}installBindings(){this.Container.bind("BattleActionQueue").to(re).asSingleton(),this.Container.bind("CoOpTeammateData").toConstantValue(this.initializationData.teammates),this.Container.bind("AfterBattleDestination").toConstantValue(this.initializationData.returnToMap),this.Container.bind("TitanInfo").toConstantValue(new $e(this.initializationData.titanNetworkID,this.initializationData.titanAssetID));const q=this.Container.get("FeatureFlags");this.Container.bind("ENABLE_CO_OP_TITAN_LOGGING").toConstantValue(q.getValue("verboseCoOpLogging",!1)),this.Container.bind("ENABLE_CO_OP_SOCKET_LOGGING").toConstantValue(q.getValue("verboseCoOpSocketLogging",!1));const K=new _e.h(this.Container);K.setTag("CO_OP_TITAN"),this.Container.bind("CoOpLogging").toConstantValue(K);const z=new _e.h(this.Container);z.setTag("CO_OP_SOCKET"),this.Container.bind("CoOpSocketLogging").toConstantValue(z),this.Container.bind("TitanHP").toConstantValue(this.initializationData.titanHP),this.Container.bind("CrystalHP").toConstantValue(this.initializationData.crystalHP),this.Container.bind("TitanBountyXP").toConstantValue(this.initializationData.titanXPBounty),this.Container.bind("LosingPrizeTiers").toConstantValue([{questionsCorrect:3,shards:1}]),this.Container.bind("WinningPrizeTiers").toConstantValue([{questionsCorrect:5,shards:4},{questionsCorrect:3,shards:2},{questionsCorrect:1,shards:1}])}}let Ve=class extends Q.JTX{create(){super.create(),this.currentPlayer.setSavingEnabled(!1)}destroy(){this.currentPlayer.setSavingEnabled(!0),super.destroy()}};(0,Y.Cg)([(0,Q.fFd)("CurrentPlayer"),(0,Y.Sn)("design:type",Object)],Ve.prototype,"currentPlayer",void 0),Ve=(0,Y.Cg)([(0,Q.EVk)("DisableCurrentPlayerSaving")],Ve);var We=z(50503);class qe extends Q.JTX{constructor(){super(...arguments),this.questionStreak=0}increaseStreak(){++this.questionStreak}resetStreak(){this.questionStreak=0}getCurrentSpell(){return this.spellIDs[Math.min(this.questionStreak,this.spellIDs.length-1)]}}(0,Y.Cg)([(0,Q.fFd)("PlayerSpells"),(0,Y.Sn)("design:type",Array)],qe.prototype,"spellIDs",void 0);class Ke extends Q.JTX{doAttack(q,K){const z=X.find(this.battleTeams,(q=>1===q.ID)),Y=X.find(this.battleTeams,(q=>0===q.ID)),Q=this.teamInfo.getRemainingTitanHP();this.teamInfo.isTitanTeamDefeated()||this.teamInfo.isPlayerTeamDefeated()?this.coOpSocketLogger.logMessage("Received an attack message but a team is defeated. Will not be processed."):K?this.queueMissedAttackAction(q,Q,Y.ActiveMember,z.ActiveMember):Q<=1?this.queueTitanDefeatAction(z.ActiveMember):this.queueAttackAction(q,Q,Y.ActiveMember,z.ActiveMember),K?this.spellSelector.resetStreak():this.spellSelector.increaseStreak()}queueMissedAttackAction(q,K,z,Y){const Q={action:Ee.x.PlayerAttacked,data:{missed:!0,sourcePlayerID:q,titanHealth:K,damage:0,spellID:this.spellSelector.getCurrentSpell()}};this.socketService.broadcastMessage(Q),this.coOpSocketLogger.logMessage(`Broadcasting missed attack message for player with ID ${q} and name ${this.battleTeamMember.NameProvider.getName()}.`),this.battleActionsQueue.addAction(new we(this.battleTeamMember,Y,this.spellFactory,this.spellSelector.getCurrentSpell(),z,this.battleUIFactory,this.audioPlayer))}queueAttackAction(q,K,z,Y){const Q=this.battleTeamMember.DamageSource.getDamageAmount(),X={action:Ee.x.PlayerAttacked,data:{missed:!1,sourcePlayerID:q,damage:Q,titanHealth:K,spellID:this.spellSelector.getCurrentSpell()}};this.socketService.broadcastMessage(X),this.coOpSocketLogger.logMessage(`Broadcasting successful attack message for player with ID ${q} and name ${this.battleTeamMember.NameProvider.getName()}.`),this.battleActionsQueue.addAction(new de(this.battleTeamMember,Y,this.spellFactory,Q,this.spellSelector.getCurrentSpell(),z,this.battleUIFactory,this.audioPlayer))}queueTitanDefeatAction(q){const K={action:Ee.x.TitanDefeated};this.socketService.broadcastMessage(K),this.coOpSocketLogger.logMessage("Broadcasting message that the titan has been defeated"),this.battleActionsQueue.addAction(new ve(this.battleTeams,this.spellFactory,tt.q.instance.game.time.events,this.audioPlayer,this.battleUIFactory))}}(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],Ke.prototype,"battleTeams",void 0),(0,Y.Cg)([(0,Q.fFd)("SpellSelector"),(0,Y.Sn)("design:type",qe)],Ke.prototype,"spellSelector",void 0),(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],Ke.prototype,"socketService",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleActionQueue"),(0,Y.Sn)("design:type",re)],Ke.prototype,"battleActionsQueue",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamMember"),(0,Y.Sn)("design:type",vt)],Ke.prototype,"battleTeamMember",void 0),(0,Y.Cg)([(0,Q.fFd)("SpellFactory"),(0,Y.Sn)("design:type",Object)],Ke.prototype,"spellFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleUIFactory"),(0,Y.Sn)("design:type",Object)],Ke.prototype,"battleUIFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamInfo"),(0,Y.Sn)("design:type",ge)],Ke.prototype,"teamInfo",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],Ke.prototype,"audioPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("CoOpSocketLogging"),(0,Y.Sn)("design:type",_e.h)],Ke.prototype,"coOpSocketLogger",void 0);class ze extends Q.JTX{constructor(){super(...arguments),this.playerAttackHandler=null}get AttackHandler(){return this.playerAttackHandler}set AttackHandler(q){this.playerAttackHandler=q}create(){super.create(),this.questionInterface.OnQuestionAnswered.add(this.questionWasAnswered,this)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.questionWasAnswered,this),super.destroy()}questionWasAnswered(q){this.playerAttackHandler.doAttack(this.currentPlayer.getUserID(),!q)}}(0,Y.Cg)([(0,Q.fFd)("QuestionInterface"),(0,Y.Sn)("design:type",Object)],ze.prototype,"questionInterface",void 0),(0,Y.Cg)([(0,Q.fFd)("CurrentPlayer"),(0,Y.Sn)("design:type",Object)],ze.prototype,"currentPlayer",void 0);class Ye extends ye.${constructor(){super(...arguments),this.userID=null,this.playerAttackHandler=null}get UserID(){return this.userID}set UserID(q){this.userID=q}get AttackHandler(){return this.playerAttackHandler}set AttackHandler(q){this.playerAttackHandler=q}receivedMessage(q){q.action===Ee.x.QuestionAnswered&&q.data.sourcePlayerID===this.userID&&(this.playerAttackHandler.doAttack(this.UserID,!q.data.correct),this.coOpSocketLogger.logMessage(`Received message that user with id ${this.userID} has answered a question ${q.data.correct?"correctly":"incorrectly"}`))}}(0,Y.Cg)([(0,Q.fFd)("CoOpSocketLogging"),(0,Y.Sn)("design:type",_e.h)],Ye.prototype,"coOpSocketLogger",void 0);class Qe extends Q.s3P{createCoOpTeam(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z;const Y=[],Q=yield this.createPlayer({appearance:q.getAppearance(),firstName:q.getFirstName(),middleName:q.getMiddleName(),lastName:q.getLastName(),nickname:q.getNickname(),userID:q.getUserID(),level:q.player.data.level,playerTransformation:q.player.getPlayerData().playerTransformation,chargedLevelData:q.getChargedLevelData()}),Z=Q.addComponent(ze),J=Q.addComponent(Ke);Z.AttackHandler=J,Q.addComponent(me),Y.push(Q);const tt=(0,se.G)(ie.q).enabled;for(let q=0;qq.userID)).join(",")}`),Y}))}createPlayer(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=X.find(z,(q=>0===q.ID)),Z=yield K.createPlayer(q.appearance,Y,q.playerTransformation,q.chargedLevelData);Z.name="Player";const J=Z.findComponent(Q.bE_),tt=Y.GameObject.findComponent(Q.bE_);J.Container.bind("DamageReceiver").toConstantValue(tt.getInjectedValue("DamageReceiver")),J.Container.bind("DamageSource").toConstantValue(tt.getInjectedValue("DamageSource")),J.Container.bind("Health").toConstantValue(tt.getInjectedValue("Health")),J.Container.bind("Level").toConstantValue(q.level),J.Container.bind("Element").toConstantValue(ee.ELegacyElementType.Wizard),Z.findComponent(vt).BattleTeam=Y;const et=Z.addComponent(Q.Fid);et.Identifier="SpellSelector",et.Components=[Z.addComponent(qe)];const it=Z.addComponent(ne);return it.firstNameID=q.firstName,it.middleNameID=q.middleName,it.lastNameID=q.lastName,it.nicknameID=q.nickname,J.Container.bind("Name").toConstantValue(it),Z}))}}(0,Y.Cg)([(0,Q.fFd)("CoOpLogging"),(0,Y.Sn)("design:type",_e.h)],Qe.prototype,"logger",void 0),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(1,(0,Q.vQZ)("PlayerFactory")),(0,Y.Qj)(2,(0,Q.vQZ)("Teams")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Object,Object,Array]),(0,Y.Sn)("design:returntype",Promise)],Qe.prototype,"createPlayer",null);class Xe extends Q.PQK{installBindings(){this.Container.bind("CoOpTeamInitializer").toConstantValue(new Qe(this.Container));const q=this.Container.get("FeatureFlags");this.Container.bind("TitanAttackFrequency").toConstantValue(parseInt(q.getValue("titanCoOpAttackFrequency",wt.s.get("GameConstants.CO_OP_TITAN.ATTACK_FREQUENCY")),10)),this.Container.bind("TitanDifficultyLevel").toConstantValue(parseInt(q.getValue("titanCoOpDifficulty",wt.s.get("GameConstants.CO_OP_TITAN.TITAN_DIFFICULTY")),10)),this.Container.bind("HostHeartbeatTime").toConstantValue(parseInt(q.getValue("coOpHostHeartbeatTime",wt.s.get("GameConstants.CO_OP_TITAN.HOST_HEARTBEAT_TIME")),10)),this.Container.bind("PlayerSpells").toConstantValue(this.getPlayerSpells())}getPlayerSpells(){const q=[],K=st.t.getRawItems("spell");for(let X=0;X0;){const K=Y.pop(),z=[];for(let Y=1;Y<4;++Y){const Q=X.find(q,(q=>q.data.element===K&&q.data.tier===Y&&q.data.targetType===jt.X.Single));Q&&z.push(Q.ID);const Z=X.find(q,(q=>q.data.element===K&&q.data.tier===Y&&q.data.targetType===jt.X.AOE));Z&&z.push(Z.ID)}6===z.length&&(Z[K]=z)}const J=X.keys(Z);if(J.length>0){const q=[];for(let K=0;K=this.attackFrequency)if(this.attacks=0,this.teamInfo.isPlayerTeamDefeated()||this.teamInfo.isTitanTeamDefeated())this.coOpSocketLogger.logMessage("Titan should attack, but a team is defeated. Not processing this message.");else{let q=We.A.rollMissChance(this.titanDifficulty);const K=X.find(this.battleTeams,(q=>0===q.ID)),z=this.teamInfo.getRemainingPlayerHP();this.coOpSocketLogger.logMessage(`Titan is attacking. No miss streak is currently at ${this.noMissStreak}.`),q?this.noMissStreak=0:(++this.noMissStreak,this.noMissStreak>=this.maxNoMissStreak&&(this.noMissStreak=0,q=!0)),q?this.queueMissedAttackAction(z,K.ActiveMember):z<=1?this.queuePlayerDefeatAction(K.ActiveMember):this.queueAttackAction(z,K.ActiveMember)}}queueMissedAttackAction(q,K){const z={action:Ee.x.TitanAttacked,data:{crystalHealth:q,missed:!0,damage:0,spellID:73}};this.socket.broadcastMessage(z),this.coOpSocketLogger.logMessage(`Broadcasting missed attack message for the titan. Crystal is at ${q} HP.`),this.battleQueue.addAction(new Ce(this.battleTeamMember,K,this.spellFactory,73,this.battleUIFactory,this.audioPlayer))}queueAttackAction(q,K){const z=this.battleTeamMember.DamageSource.getDamageAmount(),Y={action:Ee.x.TitanAttacked,data:{crystalHealth:q,missed:!1,damage:z,spellID:73}};this.socket.broadcastMessage(Y),this.coOpSocketLogger.logMessage(`Broadcasting attack message for the titan. Crystal is at ${q} HP.`),this.battleQueue.addAction(new ue(this.battleTeamMember,K,this.spellFactory,z,73,this.battleUIFactory,this.audioPlayer))}queuePlayerDefeatAction(q){const K={action:Ee.x.PlayersDefeated};this.socket.broadcastMessage(K),this.coOpSocketLogger.logMessage("Broadcasting titan defeated message. Battle should resolve in player victory."),this.battleQueue.addAction(new be(this.battleTeams,this.spellFactory,tt.q.instance.game.time.events,this.defeatDelay,this.audioPlayer))}}(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],Ze.prototype,"socket",void 0),(0,Y.Cg)([(0,Q.fFd)("TitanAttackFrequency"),(0,Y.Sn)("design:type",Number)],Ze.prototype,"attackFrequency",void 0),(0,Y.Cg)([(0,Q.fFd)("QuestionInterface"),(0,Y.Sn)("design:type",Object)],Ze.prototype,"questionInterface",void 0),(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],Ze.prototype,"battleTeams",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleActionQueue"),(0,Y.Sn)("design:type",re)],Ze.prototype,"battleQueue",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamMember"),(0,Y.Sn)("design:type",vt)],Ze.prototype,"battleTeamMember",void 0),(0,Y.Cg)([(0,Q.fFd)("TitanDifficultyLevel"),(0,Y.Sn)("design:type",Number)],Ze.prototype,"titanDifficulty",void 0),(0,Y.Cg)([(0,Q.fFd)("SpellFactory"),(0,Y.Sn)("design:type",Object)],Ze.prototype,"spellFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleUIFactory"),(0,Y.Sn)("design:type",Object)],Ze.prototype,"battleUIFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamInfo"),(0,Y.Sn)("design:type",ge)],Ze.prototype,"teamInfo",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],Ze.prototype,"audioPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("CoOpLogging"),(0,Y.Sn)("design:type",_e.h)],Ze.prototype,"logger",void 0),(0,Y.Cg)([(0,Q.fFd)("CoOpSocketLogging"),(0,Y.Sn)("design:type",_e.h)],Ze.prototype,"coOpSocketLogger",void 0);var Je=z(87761),ti=z(28152);let ei=class extends Q.JTX{constructor(){super(...arguments),this._autoJoin=!0}create(){super.create(),this._autoJoin&&this.join()}destroy(){this.leave(),super.destroy()}join(q){this.canJoinRoom().then((K=>{var z;if(!K)return;const Y=null!==(z=null!=q?q:this._roomID)&&void 0!==z?z:this.removeHardOrExpertIdentifierFromZoneMapTag(this.getInjectedValue("ZONE_MAP_TAG"));Y&&(this._multiplayerSocket.isDisconnected||Y!==this._roomID)&&(this._multiplayerSocket.joinRoom(Y),this._roomID=Y)})).catch((q=>{Q.RQr.logError(q,"Failed to check if player can join room")}))}canJoinRoom(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=yield null===(q=this._localZoneQuestManager)||void 0===q?void 0:q.getTasksInProgress();if(!K||0===K.length)return!0;const z=Z().uniq(Z().flatMap(K,(q=>{var K,z;return null!==(z=null===(K=q.taskDefinition.metadata)||void 0===K?void 0:K.locations)&&void 0!==z?z:[]}))),Y=tt.q.instance.prodigy.world.getCurrentMap();return void 0!==Y&&!z.some((q=>("string"==typeof q?q:q.location)===Y))}))}removeHardOrExpertIdentifierFromZoneMapTag(q){return q?q.replace(/_(hard|expert)/,""):null}leave(){this._roomID&&(this._multiplayerSocket.leaveRoom(),this._roomID=void 0)}};(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],ei.prototype,"_multiplayerSocket",void 0),(0,Y.Cg)([(0,Q.Cdj)("331-a8ba"),(0,Y.Sn)("design:type",Je.B)],ei.prototype,"_localZoneQuestManager",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],ei.prototype,"_roomID",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ei.prototype,"_autoJoin",void 0),ei=(0,Y.Cg)([(0,Q.EVk)("JoinMultiplayerRoom",ti.Y.multiplayer)],ei);class ii extends Q.uAl{constructor(){super(...arguments),this.startPosition=null,this.endPosition=null,this.slideDuration=0,this.onComplete=new Q.HN0,this.animationPlayed=!1}get StartPosition(){return this.startPosition}set StartPosition(q){this.startPosition=q}get EndPosition(){return this.endPosition}set EndPosition(q){this.endPosition=q}get SlideDuration(){return this.slideDuration}set SlideDuration(q){this.slideDuration=q}get OnComplete(){return this.onComplete}play(){this.GameObject.legacyTransform.group.position.set(this.startPosition.x,this.startPosition.y);tt.q.instance.game.add.tween(this.GameObject.legacyTransform.group.position,this).to(Object.assign({},this.endPosition),this.slideDuration,Q.GS3.Quadratic.Out,!0).onTweenComplete.addOnce((()=>{this.animationPlayed=!0,this.onComplete.dispatch()}))}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}class si extends Q.JTX{constructor(){super(...arguments),this.isHorizontal=!0,this.requestedSize=0,this.startImage=null,this.endImage=null,this.fillTexture=null,this.fillImage=null,this.sourceAtlas=null,this.fillFrame=null}get IsHorizontal(){return this.isHorizontal}set IsHorizontal(q){this.isHorizontal=q}get Size(){return this.requestedSize}set Size(q){this.requestedSize=q,this.updatePositionAndSize()}create(){super.create(),this.startImage=tt.q.instance.prodigy.create.image(0,0,null,null),this.GameObject.legacyTransform.group.addChild(this.startImage),this.endImage=tt.q.instance.prodigy.create.image(0,0,null,null),this.GameObject.legacyTransform.group.addChild(this.endImage),this.fillTexture=tt.q.instance.game.add.renderTexture(),this.fillImage=tt.q.instance.prodigy.create.image(0,0,null,null,this.fillTexture),this.GameObject.legacyTransform.group.addChild(this.fillImage),this.startImage.anchor.set(.5,.5),this.endImage.anchor.set(.5,.5),this.fillImage.anchor.set(.5,.5)}destroy(){this.fillTexture.destroy(!0),this.startImage.destroy(),this.endImage.destroy(),this.fillImage.destroy(),super.destroy()}setAsset(q,K,z=null,Y=null){this.assetLoader.isLoaded(q,It.i.Image)?(null===z?(this.startImage.loadTexture(q,Y),this.endImage.loadTexture(q,Y),this.endImage.scale.set(1,1),this.isHorizontal?this.startImage.scale.set(-1,1):this.startImage.scale.set(1,-1)):null===Y?(this.startImage.loadTexture(q,z),this.endImage.loadTexture(q,z),this.startImage.scale.set(1,1),this.isHorizontal?this.endImage.scale.set(-1,1):this.endImage.scale.set(1,-1)):(this.startImage.loadTexture(q,z),this.endImage.loadTexture(q,Y),this.startImage.scale.set(1,1),this.endImage.scale.set(1,1)),this.sourceAtlas=q,this.fillFrame=K,this.updatePositionAndSize()):this.assetLoader.loadAssets([q]).then((()=>{this.setAsset(q,z,K,Y)}))}applyMask(q){this.startImage.mask=q.getGraphicSource(),this.fillImage.mask=q.getGraphicSource(),this.endImage.mask=q.getGraphicSource()}removeMask(){this.startImage.mask=null,this.fillImage.mask=null,this.endImage.mask=null}updatePositionAndSize(){if(null!==this.sourceAtlas){const q=this.assetLoader.getAsset(this.sourceAtlas,It.i.Atlas).getFrameByName(this.fillFrame);if(this.isHorizontal){const K=Math.abs(this.startImage.width),z=Math.abs(this.endImage.width),Y=Math.max(0,Math.ceil(this.requestedSize-(K+z))+2),Q=.5*this.requestedSize;this.startImage.position.set(Math.ceil(-Q+Math.round(.5*K)),0),this.fillImage.position.set(.5*(K-z),0),this.endImage.position.set(Math.floor(Q-Math.round(.5*z)),0);const X=tt.q.instance.prodigy.create.image(0,0,this.sourceAtlas,this.fillFrame),Z=Math.ceil(Y/X.width),J=Y>0&&q.sourceSizeH>0;if(this.fillTexture.resize(Y,q.sourceSizeH,J),J){this.fillTexture.clear();for(let q=0;q0&&Y>0;if(this.fillTexture.resize(this.startImage.width,Y,J),J){this.fillTexture.clear();for(let q=0;qthis.segmentCount;)this.segments.pop().GameObject.destroy();for(;this.segments.length0){const q=Math.round((this.totalBarSize-(this.gapSize*this.segmentCount-1))/this.segmentCount);let K=.5*this.gapSize-.5*this.totalBarSize+.5*q;for(let z=0;z3e3){this.lastLogTime=z;let Y=`QuestionAnsweredDecision\nTransition to ${this.NextState}? ${K?"YES":"NO"}\n`;Y+=`\t - Question interface closed? ${K?"YES":"NO"}\n`,null===(q=this.logger)||void 0===q||q.logMessage(Y)}return K}}class li extends oi{get Name(){return ai.AnsweringQuestion}constructor(q,K){super(),this.logger=null,this.Decisions=[new di(q,K)],this.logger=K}enter(){this.logger.logMessage("Entering AnsweringQuestionState - Question interface is open")}exit(){}}class ui extends Q.uAl{constructor(){super(...arguments),this.menu=null,this.onFadeComplete=new Q.HN0}get TargetMenu(){return this.menu}set TargetMenu(q){this.menu=q}get OnFadeComplete(){return this.onFadeComplete}fadeMenu(){if(null!==this.TargetMenu){tt.q.instance.game.add.tween(this.TargetMenu.uiRoot,this).to({alpha:0},200,Q.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.onFadeComplete.dispatch()}))}}destroy(){this.onFadeComplete.dispose(),super.destroy()}}var fi=z(82680),bi=z(5365),pi=z(87776);class vi extends Q.bE_{constructor(){super(...arguments),this.redirectContext=null}get RedirectContext(){return this.redirectContext}set RedirectContext(q){this.redirectContext=q}get Container(){return this.redirectContext.Container}getInjectedValue(q){return this.redirectContext.getInjectedValue(q)}}var gi=z(70215);class mi extends Q.JTX{constructor(){super(...arguments),this.onClose=new Q.HN0,this.heartsGained=0,this.menu=null}get OnClose(){return this.onClose}open(){null===this.menu&&(this.menu=new fi.W(tt.q.instance.game,this.GameObject.legacyTransform.group,21,{isModal:!1}),this.menu.queuePostCreateCallback((()=>{this.updateUI(),this.menu.openTween(),this.audioPlayer.playSoundEffectClip(32,"popUpDisplay")})))}create(){super.create(),this.targetPlayer.onStatChanged.add(this.playerStatChanged,this)}destroy(){this.targetPlayer.onStatChanged.remove(this.playerStatChanged,this),this.onClose.dispose(),super.destroy()}shouldOpen(){return this.heartsGained>0}playerStatChanged(q,K,z){q===gi.$.MaxHearts&&(this.heartsGained+=K-z)}updateUI(){this.menu.findElement(pi.b,"resultsTitle").setText(this.localizer.getText("SUMMARY_POPUP_NEW_HEARTS"));const q=new Q._mx;q.addComponent(Q.K16),this.menu.findUIElement("spriteHolder").add(q.legacyTransform.group),q.addComponent(vi).RedirectContext=this.GameObject.findComponentInParent(Q.bE_);const K=q.addComponent(Ot._);K.OnLoaded.addOnce((()=>{tt.q.instance.game.add.tween(K.sprite.scale,this).from({x:0,y:0},1e3,Q.GS3.Elastic.Out,!0)})),K.setAnchor(.5,.5),K.setAsset(kt._.General_battle_json,"icon-heart"),this.menu.findElement(pi.b,"actionText").setText(this.localizer.getText("SUMMARY_POPUP_HEARTS_EARNED",st.t.getItem("name",this.targetPlayer.getFirstName()).data.value,this.heartsGained));const z=this.menu.findElement(bi.Z,"okayButton");z.onUpCallback=()=>{z.setActive(!1);const q=this.GameObject.findComponent(ui);q.TargetMenu=this.menu,q.OnFadeComplete.addOnce(this.closePopUp,this),q.fadeMenu()}}closePopUp(){this.menu.close(),this.onClose.dispatch()}}(0,Y.Cg)([(0,Q.fFd)("SummaryPlayer"),(0,Y.Sn)("design:type",Object)],mi.prototype,"targetPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("Localization"),(0,Y.Sn)("design:type",Q.dTp)],mi.prototype,"localizer",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],mi.prototype,"audioPlayer",void 0);var yi=z(24536),_i=z(22023),Ei=z(30226);class wi extends Q.JTX{constructor(){super(...arguments),this.onClose=new Q.HN0,this.spellsToShow=[],this.menu=null,this.actionText=null,this.spellImage=null,this.okButton=null,this.backgroundOrb=null}get OnClose(){return this.onClose}create(){super.create(),this.summaryPlayer.onStatChanged.add(this.playerStatChanged,this)}destroy(){this.summaryPlayer.onStatChanged.remove(this.playerStatChanged,this),this.onClose.dispose(),super.destroy()}shouldOpen(){return this.spellsToShow.length>0}open(){null===this.menu&&(this.menu=new fi.W(tt.q.instance.game,this.GameObject.legacyTransform.group,21,{isModal:!1}),this.menu.queuePostCreateCallback((()=>{this.updateUI(),this.showNextSpell(),this.menu.openTween(),this.audioPlayer.playSoundEffectClip(32,"popUpDisplay")})))}playerStatChanged(q,K,z){q===gi.$.Spell&&this.spellsToShow.push({newSpellID:K,oldSpellID:z})}showNextSpell(){this.okButton.setActive(!1);const q=this.spellsToShow.shift(),K=st.t.getItem("spell",q.newSpellID);let z="";if(null===q.oldSpellID)z=this.localization.getText("SUMMARY_POPUP_SPELL_UNLOCKED",st.t.getItem("name",this.summaryPlayer.getFirstName()).data.value,K.data.name);else{const Y=st.t.getItem("spell",q.oldSpellID);z=this.localization.getText("SUMMARY_POPUP_SPELL_EVOLVED",Y.data.name,K.data.name)}this.actionText.setText(z);const Y=Ei.J.convertLegacyElements(K.data.element);this.spellImage.setAsset(kt._.Ui_bam_json,`icons/icon-${Y}-ss`),this.backgroundOrb.image.frameName=_i.P8.getAtlasElementBackerPath(Y)}updateUI(){this.menu.findElement(pi.b,"resultsTitle").setText(this.localization.getText("SUMMARY_POPUP_NEW_SPELL")),this.okButton=this.menu.findElement(bi.Z,"okayButton"),this.okButton.onUpCallback=()=>{if(this.okButton.setActive(!1),this.spellsToShow.length>0)this.showNextSpell();else{const q=this.GameObject.findComponent(ui);q.TargetMenu=this.menu,q.OnFadeComplete.addOnce(this.closePopUp,this),q.fadeMenu()}},this.actionText=this.menu.findElement(pi.b,"actionText"),this.backgroundOrb=this.menu.findElement(yi.v,"ballDisplay");const q=new Q._mx;q.addComponent(Q.K16).group.position.set(0,15),this.menu.findUIElement("spriteHolder").add(q.legacyTransform.group),q.addComponent(vi).RedirectContext=this.GameObject.findComponentInParent(Q.bE_),this.spellImage=q.addComponent(Ot._),this.spellImage.OnLoaded.add((()=>{this.spellImage.setAlpha(1),tt.q.instance.game.add.tween(this.spellImage.sprite.scale,this).from({x:0,y:0},1e3,Q.GS3.Elastic.Out,!0),this.okButton.setActive(!0)})),this.spellImage.setAnchor(.5,.5),this.spellImage.setAlpha(0)}closePopUp(){this.menu.close(),this.OnClose.dispatch()}}(0,Y.Cg)([(0,Q.fFd)("SummaryPlayer"),(0,Y.Sn)("design:type",Object)],wi.prototype,"summaryPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],wi.prototype,"audioPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("Localization"),(0,Y.Sn)("design:type",Q.dTp)],wi.prototype,"localization",void 0);class Ti extends oi{get Name(){return ai.SummaryOpen}constructor(q,K,z,Y,Q,X,Z,J){super(),this.menuTarget=null,this.mainPlayer=null,this.combatBounty=null,this.playerWon=!1,this.titanInfo=null,this.logger=null,this.menuTarget=K,this.mainPlayer=z,this.combatBounty=Y,this.playerWon=Q,this.audioPlayer=X,this.titanInfo=Z,this.logger=J}enter(){const q=new Q._mx(this.menuTarget);q.name="CoOpSummary",q.addComponent(Q.K16);q.addComponent(Q.bE_).Container.bind("SummaryPlayer").toConstantValue(this.mainPlayer);const K=class{constructor(){}static create(q){const K=new Q._mx(q);K.addComponent(Q.K16),K.name="SummaryMenu";const z=K.addComponent(je),Y=new Q._mx(q);Y.addComponent(Q.K16),Y.name="HeartsPopUp",Y.addComponent(ui);const X=new Q._mx(q);X.addComponent(Q.K16),X.name="SpellsPopUp",X.addComponent(ui);const Z=q.addComponent(Q.Fid);return Z.Identifier="SummaryPopUps",Z.Components=[Y.addComponent(mi),X.addComponent(wi)],z}}.create(q);K.StarsGained=this.combatBounty.getStars(),K.open();const z=this.titanInfo.getTitanID();this.playerWon&&(this.audioPlayer.playMusic(1),z>0&&tt.q.instance.prodigy.titansNetworkHandler.hitTitan(z)),this.logger.logMessage(`CoOpTitanSummaryScreenState#enter - Player has ${this.playerWon?"won":"lost"} the battle.\n Titan-api will ${z<=0?"NOT":""} register the hit for titan ${z}`)}exit(){}}class Si extends ci{get NextState(){return ai.InBattle}constructor(q,K){super(),this.healthBarsEntered=0,this.targetHealthBarsEntered=0,this.logger=null,this.lastLogTime=Date.now(),this.targetHealthBarsEntered=q.length,this.logger=K;for(let z=0;z{++this.healthBarsEntered}))}shouldTransition(){const q=this.healthBarsEntered===this.targetHealthBarsEntered,K=Date.now();if(q||K-this.lastLogTime>3e3){this.lastLogTime=K;let z=`EnterBattleAfterHealthBarsDecision\nTransition to ${this.NextState}? ${q?"YES":"NO"}\n`;z+=`\t - All Health bars entered? ${this.healthBarsEntered===this.targetHealthBarsEntered?"YES":"NO"} (${this.healthBarsEntered} / ${this.targetHealthBarsEntered})`,this.logger.logMessage(z)}return q}}class Ai extends oi{get Name(){return ai.EnterHealthBars}constructor(q,K){super(),this.healthBars=[],this.logger=null,this.healthBars=q,this.logger=K,this.Decisions=[new Si(q,K)]}enter(){for(let q=0;q{this.animationsCompleted=!0}))}shouldTransition(){const q=this.breadcrumbService.isComplete(Ci.B.FEATURE_COOP_BATTLE,Ci.B.BREADCRUMB_COOP_BATTLE_START),K=this.animationsCompleted&&q,z=Date.now();if(K||z-this.lastLogTime>3e3){this.lastLogTime=z;let Y=`BattleAfterEnteringDecision\nTransition to ${this.NextState}? ${K?"YES":"NO"}\n`;Y+=`\t - Animations complete? ${this.animationsCompleted?"YES":"NO"}\n`,Y+="\t - BREADCRUMB_COOP_BATTLE_START completed? "+(q?"YES":"NO"),this.logger.logMessage(Y)}return K}}class Ii extends ci{get NextState(){return ai.NootBattleTutorial}constructor(q,K,z){super(),this.breadcrumbService=null,this.playersEntered=!1,this.logger=null,this.lastLogTime=Date.now(),this.breadcrumbService=q,this.logger=z,K.OnComplete.addOnce((()=>{this.playersEntered=!0}))}shouldTransition(){const q=this.breadcrumbService.isComplete(Ci.B.FEATURE_COOP_BATTLE,Ci.B.BREADCRUMB_COOP_BATTLE_START),K=this.playersEntered&&!q,z=Date.now();if(K||z-this.lastLogTime>3e3){this.lastLogTime=z;let Y=`GoToTutorialDecision\nTransition to ${this.NextState}? ${K?"YES":"NO"}\n`;Y+=`\t - Players have entered? ${this.playersEntered?"YES":"NO"}\n`,Y+="\t - BREADCRUMB_COOP_BATTLE_START incomplete? "+(q?"NO":"YES"),this.logger.logMessage(Y)}return K}}class Di extends oi{get Name(){return ai.EnterPlayers}constructor(q,K,z,Y,Q){super(),this.playerTeam=null,this.battleUIFactory=null,this.breadcrumbService=null,this.localization=null,this.logger=null,this.playerTeam=q,this.battleUIFactory=z,this.breadcrumbService=K,this.localization=Y,this.logger=Q}enter(){let q=this.battleUIFactory.showFloatingBanner(this.localization.getText("COMBAT_TITAN_BATTLE")).findComponent(Q.bE_).getInjectedValue("Animations");Array.isArray(q)||(q=[q]);const K=[],z=this.playerTeam.Members;for(let Q=0;Q3e3){this.lastLogTime=q;let K=`OpenQuestionInterfaceDecision\nTransition to ${this.NextState}? ${this.questionOpened?"YES":"NO"}\n`;K+=`\t - Interface is open? ${this.questionOpened?"YES":"NO"}\n`,this.logger.logMessage(K)}return this.questionOpened}markQuestionOpened(){this.questionOpened=!0}handleEasyMode(){0}destroy(){this.questionInterface.OnQuestionOpened.remove(this.markQuestionOpened,this)}}class Pi extends ci{get NextState(){return ai.PlayActionQueue}constructor(q,K){super(),this.battleActionQueue=null,this.logger=null,this.lastLogTime=Date.now(),this.battleActionQueue=q,this.logger=K}shouldTransition(){const q=this.battleActionQueue.hasQueuedActions(),K=Date.now();if(q||K-this.lastLogTime>3e3){this.lastLogTime=K;let z=`PlayActionQueueDecision\nTransition to ${this.NextState}? ${q?"YES":"NO"}\n`;z+=`\t - Actions are queued? ${q?"YES":"NO"}\n`,this.logger.logMessage(z)}return q}}class Mi extends oi{get Name(){return ai.InBattle}constructor(q,K,z,Y){super(),this.logger=null,this.logger=Y,this.Decisions=[new Pi(K,Y),new Ri(q,Y)]}enter(){this.logger.logMessage("InBattleState#enter - Entering the battle state")}exit(){}}class Ni extends ci{get NextState(){return ai.EnterPlayers}constructor(q,K,z,Y,Q){super(),this.playersLoaded=!1,this.logger=null,this.lastLogTime=Date.now(),this.currentPlayer=null,this.hostID=null,this.socket=null,this.logger=K,q.then((q=>(this.playersLoaded=!0,q))),this.hostID=z,this.currentPlayer=Y,this.socket=Q}shouldTransition(){const q=Date.now(),K=this.currentPlayer.getUserID()===this.hostID,z=this.socket.playerList.indexOf(this.hostID)>-1,Y=(K||z)&&this.playersLoaded;if(Y||q-this.lastLogTime>3e3){this.lastLogTime=q;let Q=`PlayersHaveLoadedDecision\nTransition to ${this.NextState}? ${Y?"YES":"NO"}\n`;Q+=`\t - Players have loaded? ${this.playersLoaded?"YES":"NO"}\n`,Q+=`\t - Player is host? ${K?"YES":"NO"}\n`,Q+=`\t - Host in room? ${z?"YES":"NO"}\n`,this.logger.logMessage(Q)}return Y}}class xi extends ci{get NextState(){return ai.WaitForHost}constructor(q,K,z,Y,Q){super(),this.playersLoaded=!1,this.logger=null,this.lastLogTime=Date.now(),this.currentPlayer=null,this.hostID=null,this.socket=null,this.logger=K,q.then((q=>(this.playersLoaded=!0,q))),this.hostID=z,this.currentPlayer=Y,this.socket=Q}shouldTransition(){const q=Date.now(),K=this.currentPlayer.getUserID()!==this.hostID,z=-1===this.socket.playerList.indexOf(this.hostID),Y=K&&z&&this.playersLoaded;if(Y||q-this.lastLogTime>3e3){this.lastLogTime=q;let Q=`PlayersHaveLoadedDecision\nTransition to ${this.NextState}? ${Y?"YES":"NO"}\n`;Q+=`\t - Players have loaded? ${this.playersLoaded?"YES":"NO"}\n`,Q+=`\t - Host is not in the room? ${z?"YES":"NO"}\n`,Q+=`\t - Player is host? ${K?"YES":"NO"}\n`,this.logger.logMessage(Q)}return Y}}class Li extends oi{get Name(){return ai.LoadingPlayers}constructor(q,K,z,Y,Q,X){super(),this.teamInitializer=null,this.currentPlayer=null,this.teammateData=null,this.logger=null,this.hostID=null,this.socket=null,this.teamInitializer=q,this.currentPlayer=K,this.teammateData=z,this.logger=Y,this.hostID=Q,this.socket=X}enter(){const q=this.teamInitializer.createCoOpTeam(this.currentPlayer,this.teammateData);this.Decisions=[new Ni(q,this.logger,this.hostID,this.currentPlayer,this.socket),new xi(q,this.logger,this.hostID,this.currentPlayer,this.socket)],this.logger.logMessage(`LoadingPlayerState#enter - Loading data for ${this.teammateData.length+1} player(s)`)}exit(){}}var ki=z(77078);class Bi extends ci{get NextState(){return ai.WaitForAction}constructor(q,K){super(),this.questionAnswered=!1,this.logger=null,this.lastLogTime=Date.now(),q.OnQuestionAnswered.addOnce((()=>{this.questionAnswered=!0})),this.logger=K}shouldTransition(){const q=Date.now();if(this.questionAnswered||q-this.lastLogTime>3e3){this.lastLogTime=q;let K=`QuestionAnsweredDecision\nTransition to ${this.NextState}? ${this.questionAnswered?"YES":"NO"}\n`;K+=`\t - Question has been answered? ${this.questionAnswered?"YES":"NO"}\n`,this.logger.logMessage(K)}return this.questionAnswered}}class Ui extends oi{get Name(){return ai.NootBattleTutorial}constructor(q,K,z,Y,Q,X,Z,J){super(),this.breadcrumbService=null,this.battleLayer=null,this.game=null,this.tutorialHand=null,this.tutorialHandTween=null,this.dialogueFactory=null,this.logger=null,this.healthBars=[],this.crystalSpine=null,this.breadcrumbService=K,this.battleLayer=z,this.game=q,this.dialogueFactory=Y,this.logger=J,this.healthBars=Q,this.crystalSpine=X,this.Decisions=[new Bi(Z,J)]}enter(){this.tutorialHand=new Q._mx(this.battleLayer),this.tutorialHand.addComponent(Q.K16).group.position.set(550,320),this.tutorialHand.name="TutorialHand";const q=this.tutorialHand.addComponent(Ot._);q.setAsset(kt._.General_icons_json,"help"),q.setAnchor(.5,.5),this.tutorialHandTween=this.game.add.tween(this.tutorialHand.legacyTransform.group,this).to({y:"-=30"},400,Q.GS3.Quadratic.InOut,!0,0,-1,!0),this.dialogueFactory.playDialogue("noot",[275,276,277]).then((()=>{this.nootDialogueCompleted()})),this.logger.logMessage("NootTutorialState#enter - Showing co-op titan tutorial dialogue")}exit(){this.tutorialHandTween.destroy(),this.tutorialHand.destroy(),this.breadcrumbService.completeBreadcrumb(Ci.B.FEATURE_COOP_BATTLE,Ci.B.BREADCRUMB_COOP_BATTLE_START),this.logger.logMessage("NootTutorialState#exit - Completing the BREADCRUMB_COOP_BATTLE_START")}nootDialogueCompleted(){for(let q=0;q{this.allActionsPlayed=!0}))}shouldTransition(){let q=!1;for(let X=0;X3e3){this.lastLogTime=Q;let X=`ActionQueueToBannerDecision\nTransition to ${this.NextState}? ${Y?"YES":"NO"}\n`;X+=`\t - Any team defeated? ${q?"YES":"NO"}\n`,X+="\t - Action queue is playing? "+(z?"YES":"NO"),X+="\t - Action queue finished playing? "+(K?"NO":"YES"),this.logger.logMessage(X)}return Y}}class Gi extends ci{get NextState(){return ai.InBattle}constructor(q,K,z){super(),this.actionQueue=null,this.battleTeams=null,this.logger=null,this.lastLogTime=Date.now(),this.allActionsPlayed=!1,this.actionQueue=q,this.battleTeams=K,this.logger=z,this.actionQueue.OnQueueComplete.addOnce((()=>{this.allActionsPlayed=!0}))}shouldTransition(){let q=!1;for(let X=0;X3e3){this.lastLogTime=Q;let X=`ActionQueueToBannerDecision\nTransition to ${this.NextState}? ${Y?"YES":"NO"}\n`;X+=`\t - Any team defeated? ${q?"YES":"NO"}\n`,X+="\t - Action queue is playing? "+(z?"YES":"NO"),X+="\t - Action queue finished playing? "+(K?"NO":"YES"),this.logger.logMessage(X)}return Y}}class ji extends oi{get Name(){return ai.PlayActionQueue}constructor(q,K,z){super(),this.battleActionQueue=null,this.logger=null,this.Decisions=[new Gi(q,K,z),new Fi(q,K,z)],this.battleActionQueue=q,this.logger=z}enter(){this.battleActionQueue.playAllActions(),this.logger.logMessage(`PlayingActionQueueState#enter - Playing ${this.battleActionQueue.Actions.length} queued actions`)}exit(){}}class $i extends ci{get NextState(){return ai.SummaryOpen}constructor(q,K){super(),this.animationCompleted=!1,this.logger=null,this.lastLogTime=Date.now(),this.logger=K;new Mt(q).OnComplete.addOnce((()=>{this.animationCompleted=!0}))}shouldTransition(){const q=Date.now();if(this.animationCompleted||q-this.lastLogTime>3e3){this.lastLogTime=q;let K=`GoToSummaryScreenDecision\nTransition to ${this.NextState}? ${this.animationCompleted?"YES":"NO"}\n`;K+=`\t - Animations complete? ${this.animationCompleted?"YES":"NO"}\n`,this.logger.logMessage(K)}return this.animationCompleted}}class Hi extends oi{get Name(){return ai.ShowEndGameBanner}constructor(q,K,z,Y,Q){super(),this.battleUIFactory=null,this.playerWon=!1,this.localization=null,this.healthBars=null,this.logger=null,this.playerWon=z,this.battleUIFactory=q,this.localization=K,this.healthBars=Y,this.logger=Q}enter(){let q="";q=this.playerWon?this.localization.getText("COMBAT_TITAN_HIT"):this.localization.getText("COMBAT_LOST");let K=this.battleUIFactory.showFloatingBanner(q).findComponent(Q.bE_).getInjectedValue("Animations");Array.isArray(K)||(K=[K]),K=K.slice();for(let z=0;z-1}}class qi extends oi{get Name(){return ai.WaitForHost}constructor(q,K,z){super(),this.spinner=null,this.battleLayer=null,this.battleLayer=q,this.Decisions=[new Wi(K,z)]}enter(){this.spinner=new Q._mx(this.battleLayer),this.spinner.addComponent(Q.K16).group.position.set(250,420),this.spinner.name="LoadingSpinner";const q=this.spinner.addComponent(Ot._);q.setAnchor(.5,.5),q.setAsset(kt._.General_core_json,"loading"),tt.q.instance.game.add.tween(this.spinner.legacyTransform.group,this.spinner).to({angle:360},2e3,Q.GS3.Linear.None,!0,0,-1)}exit(){this.spinner&&(tt.q.instance.game.tweens.removeAllFromOwner(this.spinner),this.spinner.destroy(),this.spinner=null)}}class Ki extends hi{constructor(){super(...arguments),this.battleLayer=null}get InitialState(){return ai.LoadingPlayers}get BattleLayer(){return this.battleLayer}set BattleLayer(q){this.battleLayer=q}createState(q){switch(q){case ai.LoadingPlayers:return this.createLoadingPlayersState();case ai.WaitForHost:return this.createWaitForHostState();case ai.EnterPlayers:return this.createEnterPlayersState();case ai.NootBattleTutorial:return this.createNootTutorialState();case ai.EnterHealthBars:return this.createEnterHealthBarsState();case ai.InBattle:return this.createInBattleState();case ai.AnsweringQuestion:return this.createAnswerQuestionState();case ai.WaitForAction:return this.createWaitForActionState();case ai.PlayActionQueue:return this.createPlayActionQueueState();case ai.ShowEndGameBanner:return this.createEndGameBannerState();case ai.SummaryOpen:return this.createSummaryOpenState();default:return null}}createLoadingPlayersState(q,K,z,Y,Q,X,Z){return new Li(K,z,Y,Q,Z,X)}createWaitForHostState(q,K){return new qi(this.battleLayer,q,K)}createEnterPlayersState(q,K,z,Y,Q){return new Di(X.find(q,(q=>0===q.ID)),K,Y,z,Q)}createNootTutorialState(q,K,z,Y,Q,Z){const J=X.find(Q,(q=>0===q.ID)).ActiveMember.GameObject.findComponent(ri.j);return new Ui(tt.q.instance.game,q,this.battleLayer,K,Y,J,z,Z)}createInBattleState(q,K,z,Y){return new Mi(q,K,z,Y)}createAnswerQuestionState(q,K){return new li(q,K)}createWaitForActionState(q,K){return new Vi(q,K)}createPlayActionQueueState(q,K,z){return new ji(q,K,z)}createEndGameBannerState(q,K,z,Y,Q){const Z=X.find(K,(q=>1===q.ID));return new Hi(q,z,Z.IsDefeated(),Y,Q)}createSummaryOpenState(q,K,z,Y,Q,Z,J){const et=X.find(Y,(q=>1===q.ID));return new Ti(tt.q.instance.game,q,K,z,et.IsDefeated(),Q,Z,J)}createEnterHealthBarsState(q,K){return new Ai(q,K)}}(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("Teams")),(0,Y.Qj)(1,(0,Q.vQZ)("CoOpTeamInitializer")),(0,Y.Qj)(2,(0,Q.vQZ)("CurrentPlayer")),(0,Y.Qj)(3,(0,Q.vQZ)("CoOpTeammateData")),(0,Y.Qj)(4,(0,Q.vQZ)("CoOpLogging")),(0,Y.Qj)(5,(0,Q.vQZ)("316-5db0")),(0,Y.Qj)(6,(0,Q.vQZ)("HostID")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Array,Object,Object,Array,_e.h,Object,Number]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createLoadingPlayersState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("316-5db0")),(0,Y.Qj)(1,(0,Q.vQZ)("HostID")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Object,Number]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createWaitForHostState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("Teams")),(0,Y.Qj)(1,(0,Q.vQZ)("BreadcrumbService")),(0,Y.Qj)(2,(0,Q.vQZ)("Localization")),(0,Y.Qj)(3,(0,Q.vQZ)("BattleUIFactory")),(0,Y.Qj)(4,(0,Q.vQZ)("CoOpLogging")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Array,Object,Q.dTp,Object,_e.h]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createEnterPlayersState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("BreadcrumbService")),(0,Y.Qj)(1,(0,Q.vQZ)("DialogueFactory")),(0,Y.Qj)(2,(0,Q.vQZ)("QuestionInterface")),(0,Y.Qj)(3,(0,Q.vQZ)("ActiveHealthBars")),(0,Y.Qj)(4,(0,Q.vQZ)("Teams")),(0,Y.Qj)(5,(0,Q.vQZ)("CoOpLogging")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Object,Object,Object,Array,Array,_e.h]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createNootTutorialState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("QuestionInterface")),(0,Y.Qj)(1,(0,Q.vQZ)("BattleActionQueue")),(0,Y.Qj)(2,(0,Q.vQZ)("Teams")),(0,Y.Qj)(3,(0,Q.vQZ)("CoOpLogging")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Object,re,Array,_e.h]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createInBattleState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("QuestionInterface")),(0,Y.Qj)(1,(0,Q.vQZ)("CoOpLogging")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Object,_e.h]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createAnswerQuestionState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("BattleActionQueue")),(0,Y.Qj)(1,(0,Q.vQZ)("CoOpLogging")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[re,_e.h]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createWaitForActionState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("BattleActionQueue")),(0,Y.Qj)(1,(0,Q.vQZ)("Teams")),(0,Y.Qj)(2,(0,Q.vQZ)("CoOpLogging")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[re,Array,_e.h]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createPlayActionQueueState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("BattleUIFactory")),(0,Y.Qj)(1,(0,Q.vQZ)("Teams")),(0,Y.Qj)(2,(0,Q.vQZ)("Localization")),(0,Y.Qj)(3,(0,Q.vQZ)("ActiveHealthBars")),(0,Y.Qj)(4,(0,Q.vQZ)("CoOpLogging")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Object,Array,Q.dTp,Array,_e.h]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createEndGameBannerState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("MenuLayer")),(0,Y.Qj)(1,(0,Q.vQZ)("CurrentPlayer")),(0,Y.Qj)(2,(0,Q.vQZ)("CombatBounty")),(0,Y.Qj)(3,(0,Q.vQZ)("Teams")),(0,Y.Qj)(4,(0,Q.vQZ)("AudioPlayer")),(0,Y.Qj)(5,(0,Q.vQZ)("TitanInfo")),(0,Y.Qj)(6,(0,Q.vQZ)("CoOpLogging")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Q._mx,Object,Object,Array,Object,Object,_e.h]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createSummaryOpenState",null),(0,Y.Cg)([Q.IJn,(0,Y.Qj)(0,(0,Q.vQZ)("ActiveHealthBars")),(0,Y.Qj)(1,(0,Q.vQZ)("CoOpLogging")),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Array,_e.h]),(0,Y.Sn)("design:returntype",oi)],Ki.prototype,"createEnterHealthBarsState",null);var zi=z(34574);class Yi extends Q.JTX{constructor(){super(...arguments),this.coOpTeam=new zi.d,this.hostDisbanded=!1}getTeam(){return this.coOpTeam}getTeamStreak(){return this.teamStreak}hasDisbanded(){return this.hostDisbanded}isHost(){return!1}create(){super.create(),this.socket.onMessage.add(this.messageReceived,this)}destroy(){this.socket.onMessage.remove(this.messageReceived,this),super.destroy()}leaveTeam(){const q={action:Ee.x.PlayerLeftTeam,target:this.hostID};this.socket.broadcastMessage(q)}rejoinTeam(){const q={action:Ee.x.PlayerRejoinTeam,target:this.hostID};this.socket.broadcastMessage(q),null!==this.coOpTeam&&this.coOpTeam.readyUpPlayer(this.currentPlayer.getUserID())}messageReceived(q){q.action===Ee.x.TeamDisbanded?(this.coOpTeam.destroy(),this.coOpTeam=null,this.hostDisbanded=!0):q.action===Ee.x.TeamUpdated&&(this.coOpTeam.TeamMembers=q.data.teamMembers.slice(),this.coOpTeam.ReadyMembers=q.data.readyMembers.slice())}}(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],Yi.prototype,"socket",void 0),(0,Y.Cg)([(0,Q.fFd)("CurrentPlayer"),(0,Y.Sn)("design:type",Object)],Yi.prototype,"currentPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("HostID"),(0,Y.Sn)("design:type",Number)],Yi.prototype,"hostID",void 0),(0,Y.Cg)([(0,Q.fFd)("TeamStreak"),(0,Y.Sn)("design:type",Number)],Yi.prototype,"teamStreak",void 0);class Qi extends ye.${constructor(){super(...arguments),this.endDelay=800}get EndDelay(){return this.endDelay}set EndDelay(q){this.endDelay=q}receivedMessage(q){q.action===Ee.x.TitanDefeated?(this.coOpSocketLogger.logMessage("Received the titan defeat message. Battle should resolve with the players being victorious."),this.actionQueue.addAction(new ve(this.battleTeams,this.spellFactory,tt.q.instance.game.time.events,this.audioPlayer,this.uiFactory))):q.action===Ee.x.PlayersDefeated&&(this.coOpSocketLogger.logMessage("Received the player defeat message. Battle should resolve with the players being defeated."),this.actionQueue.addAction(new be(this.battleTeams,this.spellFactory,tt.q.instance.game.time.events,this.endDelay,this.audioPlayer)))}}(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],Qi.prototype,"battleTeams",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleActionQueue"),(0,Y.Sn)("design:type",re)],Qi.prototype,"actionQueue",void 0),(0,Y.Cg)([(0,Q.fFd)("SpellFactory"),(0,Y.Sn)("design:type",Object)],Qi.prototype,"spellFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],Qi.prototype,"audioPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleUIFactory"),(0,Y.Sn)("design:type",Object)],Qi.prototype,"uiFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("CoOpSocketLogging"),(0,Y.Sn)("design:type",_e.h)],Qi.prototype,"coOpSocketLogger",void 0);class Xi extends Q.JTX{constructor(){super(...arguments),this.titanHP=null,this.titanDamage=0,this.crystalHP=null,this.crystalDamage=0}create(){super.create(),this.socket.onMessage.add(this.handleMessage,this),this.questionInterface.OnQuestionOpened.add(this.questionOpened,this),this.stateMachine.OnStateChange.add(this.stateChanged,this)}destroy(){this.socket.onMessage.remove(this.handleMessage,this),this.questionInterface.OnQuestionOpened.remove(this.questionOpened,this),this.stateMachine.OnStateChange.remove(this.stateChanged,this),super.destroy()}handleMessage(q){switch(q.action){case Ee.x.SyncHealth:{const K=X.find(this.battleTeams,(q=>0===q.ID)),z=X.find(this.battleTeams,(q=>1===q.ID));if(q.data.titanHP!==z.ActiveMember.Health.CurrentValue&&(this.titanHP=q.data.titanHP),q.data.crystalHP!==K.ActiveMember.Health.CurrentValue&&(this.crystalHP=q.data.crystalHP),this.coOpSocketLogger.logMessage(`Received HP sync message.\n \n\tTitan value should be ${q.data.titanHP}. Titan value is ${z.ActiveMember.Health.CurrentValue}. HP will sync? ${null===this.titanHP?"NO":"YES"}\n \n\tCrystal value should be ${q.data.crystalHP}. Crystal value is ${K.ActiveMember.Health.CurrentValue}. HP will sync? ${null===this.crystalHP?"NO":"YES"}\n `),null===this.crystalHP&&null===this.titanHP)return void this.destroy();this.questionInterface.isOpen()&&(this.coOpSocketLogger.logMessage("Received sync message with question open. Will adjust immediately."),this.questionOpened());break}case Ee.x.PlayerAttacked:this.titanDamage+=q.data.damage,this.coOpSocketLogger.logMessage(`Player attacked message received. Pending titan damage is now ${this.titanDamage}`);break;case Ee.x.TitanAttacked:this.crystalDamage+=q.data.damage,this.coOpSocketLogger.logMessage(`Titan attacked message received. Pending crystal damage is now ${this.crystalDamage}`)}}stateChanged(){this.stateMachine.CurrentState===ai.PlayActionQueue&&(null!==this.crystalHP&&(this.crystalHP-=this.crystalDamage,this.coOpSocketLogger.logMessage(`Action queue is being played. Applying ${this.crystalDamage} pending crystal damage to sync HP. New value is ${this.crystalHP}`)),null!==this.titanHP&&(this.titanHP-=this.titanDamage,this.coOpSocketLogger.logMessage(`Action queue is being played. Applying ${this.titanDamage} pending titan damage to sync HP. New value is ${this.titanHP}`)),this.titanDamage=0,this.crystalDamage=0)}questionOpened(){null!==this.titanHP&&(this.coOpSocketLogger.logMessage(`Applying HP sync to titan. Sync HP is ${this.titanHP}. Pending damage is ${this.titanDamage}. Will fix HP to new value ${this.titanHP-this.titanDamage}`),this.updateCurrentHealth(1,this.titanHP-this.titanDamage),this.titanHP=null),null!==this.crystalHP&&(this.coOpSocketLogger.logMessage(`Applying HP sync to crystal. Sync HP is ${this.crystalHP}. Pending damage is ${this.crystalDamage}. Will fix HP to new value ${this.crystalHP-this.crystalDamage}`),this.updateCurrentHealth(0,this.crystalHP-this.crystalDamage),this.crystalHP=null),this.destroy()}updateCurrentHealth(q,K){const z=X.find(this.battleTeams,(K=>K.ID===q)).ActiveMember.Health;z.CurrentValue!==K&&(z.CurrentValue=K)}}(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],Xi.prototype,"socket",void 0),(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],Xi.prototype,"battleTeams",void 0),(0,Y.Cg)([(0,Q.fFd)("QuestionInterface"),(0,Y.Sn)("design:type",Object)],Xi.prototype,"questionInterface",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleStateMachine"),(0,Y.Sn)("design:type",Ki)],Xi.prototype,"stateMachine",void 0),(0,Y.Cg)([(0,Q.fFd)("CoOpSocketLogging"),(0,Y.Sn)("design:type",_e.h)],Xi.prototype,"coOpSocketLogger",void 0);class Zi extends Q.JTX{create(){super.create(),this.questionInterface.OnQuestionAnswered.add(this.questionWasAnswered,this)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.questionWasAnswered,this),super.destroy()}questionWasAnswered(q){const K={action:Ee.x.QuestionAnswered,target:this.hostID,data:{sourcePlayerID:this.currentPlayer.getUserID(),correct:q}};this.socket.sendMessage(K)}}(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],Zi.prototype,"socket",void 0),(0,Y.Cg)([(0,Q.fFd)("CurrentPlayer"),(0,Y.Sn)("design:type",Object)],Zi.prototype,"currentPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("HostID"),(0,Y.Sn)("design:type",Number)],Zi.prototype,"hostID",void 0),(0,Y.Cg)([(0,Q.fFd)("QuestionInterface"),(0,Y.Sn)("design:type",Object)],Zi.prototype,"questionInterface",void 0);var Ji=z(95066),ts=z(36525),es=z(65443);class is extends Q.JTX{constructor(){super(...arguments),this.heartbeatExpiryTime=null,this.hostDisconnected=!1,this.hasReceivedHeartbeat=!1}create(){super.create(),this.socketService.onPlayerDisconnect.add(this.playerDisconnected,this),this.socketService.onMessage.add(this.socketMessageReceived,this),this.heartbeatExpiryTime=Date.now()+this.hostDisconnectTimer}update(){if(super.update(),Date.now()>this.heartbeatExpiryTime&&null!==this.heartbeatExpiryTime&&this.canShowDialogue()){const q=new ts.i;q.setKey("prodigy_game.coOp.hostHeartbeatTimeout"),q.setValue(1),this.dataDogLogger.logStat(q,Ji.d.Increment),this.showHostDisconnectMessage()}}destroy(){this.socketService.onPlayerDisconnect.remove(this.playerDisconnected,this),this.socketService.onMessage.remove(this.socketMessageReceived,this),super.destroy()}playerDisconnected(q){q===this.hostID&&this.hasReceivedHeartbeat&&this.canShowDialogue()&&this.showHostDisconnectMessage()}socketMessageReceived(q){q.action===Ee.x.HostHeartbeat&&null!==this.hostDisconnectTimer&&(this.heartbeatExpiryTime=Date.now()+this.hostDisconnectTimer,this.hasReceivedHeartbeat=!0)}showHostDisconnectMessage(){this.hostDisconnected=!0,this.socketService.leaveRoom();const q=this.menuFactory.showMessage("HOST_DISCONNECTED_MESSAGE","","BUTTON_OKAY_CAPITAL");q.OnClose.addOnce((()=>{tt.q.instance.prodigy.world.it(this.afterBattleMap)})),q.open(),tt.q.instance.prodigy.gameContainer.get("20f-5f67").battle.sendCoopTeamHostLeftEvent(es.$.Titan,this.hostID)}canShowDialogue(){return!this.hostDisconnected&&null!==this.teamInfo&&!(this.teamInfo.isPlayerTeamDefeated()||this.teamInfo.isTitanTeamDefeated())}}(0,Y.Cg)([(0,Q.fFd)("ClientHeartbeatDisconnectTime"),(0,Y.Sn)("design:type",Number)],is.prototype,"hostDisconnectTimer",void 0),(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],is.prototype,"socketService",void 0),(0,Y.Cg)([(0,Q.fFd)("HostID"),(0,Y.Sn)("design:type",Number)],is.prototype,"hostID",void 0),(0,Y.Cg)([(0,Q.fFd)("19d-cfb4"),(0,Y.Sn)("design:type",Object)],is.prototype,"menuFactory",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamInfo"),(0,Y.Sn)("design:type",ge)],is.prototype,"teamInfo",void 0),(0,Y.Cg)([(0,Q.fFd)("AfterBattleDestination"),(0,Y.Sn)("design:type",String)],is.prototype,"afterBattleMap",void 0),(0,Y.Cg)([(0,Q.fFd)("DataDogLogger"),(0,Y.Sn)("design:type",Object)],is.prototype,"dataDogLogger",void 0);class ss extends Q.JTX{constructor(){super(...arguments),this.onComplete=new Q.HN0,this.hasCrystalShattered=!1,this.shatterSkinningDelay=0}get OnComplete(){return this.onComplete}get ShatterSkinningDelay(){return this.shatterSkinningDelay}set ShatterSkinningDelay(q){this.shatterSkinningDelay=q}play(){this.animator.OnAnimationComplete.addOnce((()=>{this.hasCrystalShattered=!0,this.onComplete.dispatch()})),tt.q.instance.game.time.events.addTimer(this.shatterSkinningDelay,(()=>{this.animator.applySkin("finalbreak")}),this),this.animator.playAnimation("final_break",!1)}hasFinishedPlaying(){return this.hasCrystalShattered}destroy(){this.onComplete.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.fFd)("Animators"),(0,Y.Sn)("design:type",ri.j)],ss.prototype,"animator",void 0);class ns extends Q.uAl{constructor(){super(...arguments),this.animationPlayed=!1,this.onComplete=new Q.HN0}get OnComplete(){return this.onComplete}create(){super.create()}play(){this.animationPlayed=!0,this.onComplete.dispatch()}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}class as extends Q.JTX{constructor(){super(...arguments),this.crystalInput=null}create(){super.create(),this.crystalInput=this.GameObject.findComponent(ki.p),this.battleStateMachine.OnStateChange.add(this.battleStateChanged,this),this.crystalInput.onClicked.add(this.crystalClicked,this)}destroy(){this.battleStateMachine.OnStateChange.remove(this.battleStateChanged,this),this.crystalInput.onClicked.remove(this.crystalClicked,this),super.destroy()}battleStateChanged(){this.crystalInput.InputEnabled=this.battleStateMachine.CurrentState===ai.InBattle,this.battleStateMachine.CurrentState!==ai.InBattle&&this.battleStateMachine.CurrentState!==ai.PlayActionQueue&&this.battleStateMachine.CurrentState!==ai.AnsweringQuestion||(0,gt.sR)(this.animators,this.crystalInput.InputEnabled?"idle_sparkle":"idle",!0)}crystalClicked(){this.audioPlayer.playSoundEffectClip(18,"pop"),this.questionInterface.open({revampBattleOverride:!1})}}(0,Y.Cg)([(0,Q.fFd)("BattleStateMachine"),(0,Y.Sn)("design:type",hi)],as.prototype,"battleStateMachine",void 0),(0,Y.Cg)([(0,Q.fFd)("QuestionInterface"),(0,Y.Sn)("design:type",Object)],as.prototype,"questionInterface",void 0),(0,Y.Cg)([(0,Q.fFd)("Animators"),(0,Y.Sn)("design:type",Array)],as.prototype,"animators",void 0),(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],as.prototype,"audioPlayer",void 0);class rs extends Q.uAl{constructor(){super(...arguments),this.onComplete=new Q.HN0,this.glowDuration=0,this.spineAnimator=null,this.glowDurationElapsed=!1}get OnComplete(){return this.onComplete}get GlowDuration(){return this.glowDuration}set GlowDuration(q){this.glowDuration=q}get SpineAnimator(){return this.spineAnimator}set SpineAnimator(q){this.spineAnimator=q}play(){this.spineAnimator.applySkin("glow"),tt.q.instance.game.time.events.addTimer(this.glowDuration,(()=>{this.onComplete.dispatch(),this.glowDurationElapsed=!0}),this)}hasFinishedPlaying(){return this.glowDurationElapsed}destroy(){this.onComplete.dispose(),super.destroy()}}class os extends Q.JTX{constructor(){super(...arguments),this.onComplete=new Q.HN0,this.spineAnimator=null,this.wasPlayed=!1}get OnComplete(){return this.onComplete}get SpineAnimator(){return this.spineAnimator}set SpineAnimator(q){this.spineAnimator=q}play(){this.spineAnimator.applySkin("crystal"),this.spineAnimator.OnAnimationComplete.addOnce((()=>{this.onComplete.dispatch(),this.wasPlayed=!0})),this.spineAnimator.playAnimation("idle",!0)}hasFinishedPlaying(){return this.wasPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}class hs extends Q.JTX{constructor(){super(...arguments),this.localizationKey="",this.onChange=new Q.HN0}get LocalizationKey(){return this.localizationKey}set LocalizationKey(q){this.localizationKey=q,this.onChange.dispatch()}get OnChanged(){return this.onChange}getName(){return this.localizer.getText(this.localizationKey)}destroy(){this.onChange.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.fFd)("Localization"),(0,Y.Sn)("design:type",Q.dTp)],hs.prototype,"localizer",void 0);var cs=z(28402),ds=z(56942);class ls extends Q.uAl{constructor(){super(...arguments),this.segmentedBar=null,this.fillMask=null,this.changeSpeed=0,this.onChangeComplete=new Q.HN0,this.previousHealth=null}get SegmentedBar(){return this.segmentedBar}set SegmentedBar(q){this.segmentedBar=q}get FillMask(){return this.fillMask}set FillMask(q){this.fillMask=q}get HealthChangeSpeed(){return this.changeSpeed}set HealthChangeSpeed(q){this.changeSpeed=q}get OnHealthChangeComplete(){return this.onChangeComplete}setMaxHealth(q){this.segmentedBar.Segments=q}setCurrentHealth(q){if(null===this.previousHealth)this.fillMask.setFillPercent(q/this.segmentedBar.Segments),this.OnHealthChangeComplete.dispatch();else{const K=q/this.segmentedBar.Segments,z={percent:this.previousHealth/this.segmentedBar.Segments};tt.q.instance.game.add.tween(z,this).to({percent:K},this.changeSpeed,Q.GS3.Quadratic.Out,!0).onUpdateCallback((()=>{this.fillMask.setFillPercent(z.percent)})).onTweenComplete.addOnce((()=>{this.fillMask.setFillPercent(K),this.OnHealthChangeComplete.dispatch()}))}this.previousHealth=q}destroy(){this.onChangeComplete.dispose(),super.destroy()}}var us=z(50873),fs=z(18280),bs=z(47332),ps=z(9976);class vs{constructor(){}static create(q,K,z){const Y=new Q._mx(q);Y.addComponent(Q.K16),Y.name="HealthBar",Y.addComponent(Q.bE_);const X=new Q._mx(Y);X.addComponent(Q.K16),X.legacyTransform.y=X.legacyTransform.y+2,X.name="Background";const Z=X.addComponent(si);Z.Size=400,Z.setAsset(kt._.Ui_bam_json,"scroll-tracks/scroll-hpbar-middle",null,"scroll-tracks/scroll-hpbar-right");const J=new Q._mx(Y);J.addComponent(Q.K16),J.name="Health";const tt=J.addComponent(ni);tt.GapSize=1,tt.Atlas=kt._.Ui_bam_json,tt.BarStartCapFrame="scroll-tracks/scroll-hpbar-fill-end-left",tt.BarEndCapFrame="scroll-tracks/scroll-hpbar-fill-right",tt.SegmentStartFrame="scroll-tracks/scroll-hpbar-fill-trim-left",tt.SegmentEndFrame="scroll-tracks/scroll-hpbar-fill-trim-right",tt.FillFrame="scroll-tracks/scroll-hpbar-fill-middle",tt.BarSize=400;const et=new Q._mx(J);et.addComponent(Q.K16),et.name="Mask";const it=et.addComponent(fs.n),nt=et.addComponent(us.k);nt.Width=400,nt.Height=47,tt.applyMask(it);const at=Y.addComponent(ls);at.HealthChangeSpeed=700,at.FillMask=nt,at.SegmentedBar=tt;const rt=Y.addComponent(Q.Fid);rt.Identifier="HealthBar",rt.Components=[at];const ot=Y.addComponent(hs);ot.LocalizationKey=K;const ht=Y.addComponent(Q.Fid);ht.Identifier="Name",ht.Components=[ot];const ct=new Q._mx(Y);ct.addComponent(Q.K16),ct.name="ActiveMemberName",ct.legacyTransform.y=-45,ct.legacyTransform.x=z?-82:-77;const dt=ct.addComponent(ps.E);dt.TextConfig=st.t.getItem("fontStyle",16).data,dt.Alignment=bs.T.MiddleCenter;return Y.addComponent(te).NameLabel=dt,Y}}class gs extends Q.JTX{constructor(){super(...arguments),this.coOpTeam=new zi.d,this.hostDisbanded=!1}getTeam(){return this.coOpTeam}getTeamStreak(){return this.teamStreak}hasDisbanded(){return this.hostDisbanded}isHost(){return!0}create(){super.create(),this.socket.onMessage.add(this.messageReceived,this),this.coOpTeam.OnTeamMemberLeft.add(this.broadcastTeamUpdate,this),this.coOpTeam.OnTeamMemberReady.add(this.broadcastTeamUpdate,this)}destroy(){this.socket.onMessage.remove(this.messageReceived,this),this.coOpTeam.destroy(),super.destroy()}leaveTeam(){const q={action:Ee.x.TeamDisbanded,data:{hostID:this.currentPlayer.getUserID()}};this.socket.broadcastMessage(q)}rejoinTeam(){var q;null===(q=this.coOpTeam)||void 0===q||q.readyUpPlayer(this.currentPlayer.getUserID())}messageReceived(q){switch(q.action){case Ee.x.PlayerLeftTeam:this.coOpTeam.removePlayer(q.data.userID);break;case Ee.x.PlayerRejoinTeam:this.coOpTeam.readyUpPlayer(q.data.userID)}}broadcastTeamUpdate(){const q={action:Ee.x.TeamUpdated,data:{hostID:this.coOpTeam.HostID,teamMembers:this.coOpTeam.TeamMembers,readyMembers:this.coOpTeam.ReadyMembers,streak:this.coOpTeam.Streak}};this.socket.broadcastMessage(q)}}(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],gs.prototype,"socket",void 0),(0,Y.Cg)([(0,Q.fFd)("CurrentPlayer"),(0,Y.Sn)("design:type",Object)],gs.prototype,"currentPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)("TeamStreak"),(0,Y.Sn)("design:type",Number)],gs.prototype,"teamStreak",void 0);class ms extends Q.JTX{constructor(){super(...arguments),this.currentTimer=null}create(){super.create(),this.battleStateMachine.OnStateChange.add(this.battleStateChanged,this),this.currentTimer=window.setInterval((()=>{this.broadcastHeartbeat()}),this.heartbeatTime),this.logger.logMessage(`Host will send heartbeat every ${this.heartbeatTime/1e3} second(s)`)}destroy(){null!==this.currentTimer&&window.clearInterval(this.currentTimer),this.battleStateMachine.OnStateChange.remove(this.battleStateChanged,this),super.destroy()}broadcastHeartbeat(){this.socketService.broadcastMessage({action:Ee.x.HostHeartbeat})}battleStateChanged(){this.battleStateMachine.CurrentState===ai.SummaryOpen&&this.destroy()}}(0,Y.Cg)([(0,Q.fFd)("HostHeartbeatTime"),(0,Y.Sn)("design:type",Number)],ms.prototype,"heartbeatTime",void 0),(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],ms.prototype,"socketService",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleStateMachine"),(0,Y.Sn)("design:type",hi)],ms.prototype,"battleStateMachine",void 0),(0,Y.Cg)([(0,Q.fFd)("CoOpLogging"),(0,Y.Sn)("design:type",_e.h)],ms.prototype,"logger",void 0);class ys extends Q.JTX{create(){super.create(),this.socket.onPlayerJoined.add(this.playerJoined,this)}destroy(){this.socket.onPlayerJoined.remove(this.playerJoined,this),super.destroy()}playerJoined(q){const K=this.battleTeamInfo.getRemainingTitanHP(),z=this.battleTeamInfo.getRemainingPlayerHP();this.coOpSocketLogger.logMessage(`Sending HP sync to player ${q}. Titan: ${K}. Crystal: ${z}`);const Y={action:Ee.x.SyncHealth,target:q,data:{titanHP:K,crystalHP:z}};this.socket.sendMessage(Y)}}(0,Y.Cg)([(0,Q.fFd)("316-5db0"),(0,Y.Sn)("design:type",Object)],ys.prototype,"socket",void 0),(0,Y.Cg)([(0,Q.fFd)("BattleTeamInfo"),(0,Y.Sn)("design:type",ge)],ys.prototype,"battleTeamInfo",void 0),(0,Y.Cg)([(0,Q.fFd)("CoOpSocketLogging"),(0,Y.Sn)("design:type",_e.h)],ys.prototype,"coOpSocketLogger",void 0);class _s extends Q.JTX{constructor(){super(...arguments),this.onComplete=new Q.HN0,this.barrierAnimator=null,this.barrierSpark=null,this.animationPlayed=!1}get OnComplete(){return this.onComplete}get BarrierAnimator(){return this.barrierAnimator}set BarrierAnimator(q){this.barrierAnimator=q}get BarrierSpark(){return this.barrierSpark}set BarrierSpark(q){this.barrierSpark=q}play(){const q=[];q.push(new Promise((q=>{const K=this.barrierAnimator.GameObject.findComponent(Ot._);K.setAlpha(1),this.barrierAnimator.OnAnimationComplete.addOnce((()=>{K.setAlpha(0),q()})),this.barrierAnimator.playAnimation("break",!1)}))),q.push(new Promise((q=>{const K=this.barrierSpark.GameObject.findComponent(Ot._);K.setAlpha(1),this.barrierSpark.OnAnimationComplete.addOnce((()=>{K.setAlpha(0),q()})),this.barrierSpark.playAnimation("spark",!1)}))),Promise.all(q).then((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return(0,gt.ye)(this.animators,"knockout")})))).then((()=>(0,Y.sH)(this,void 0,void 0,(function*(){this.animationPlayed=!0,this.onComplete.dispatch()})))).catch((()=>{Q.VyI.log("TitanDefeatAnimationState - Warning: Could not play all animations",Q.$bb.Warning)}))}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}(0,Y.Cg)([(0,Q.fFd)("Animators"),(0,Y.Sn)("design:type",Object)],_s.prototype,"animators",void 0);class Es extends Q.JTX{constructor(){super(...arguments),this.onComplete=new Q.HN0,this.titanBarrier=null,this.titanSpark=null,this.hasPlayed=!1}get OnComplete(){return this.onComplete}get TitanBarrier(){return this.titanBarrier}set TitanBarrier(q){this.titanBarrier=q}get TitanSpark(){return this.titanSpark}set TitanSpark(q){this.titanSpark=q}play(){const q=[];q.push(new Promise((q=>{const K=this.titanSpark.GameObject.findComponent(Ot._);K.setAlpha(1),this.titanSpark.OnAnimationComplete.addOnce((()=>{K.setAlpha(0),q()})),this.titanSpark.playAnimation("spark",!1)}))),q.push(new Promise((q=>{const K=this.titanBarrier.GameObject.findComponent(Ot._);K.setAlpha(1),this.titanBarrier.OnAnimationComplete.addOnce((()=>{K.setAlpha(0),q()})),this.titanBarrier.playAnimation("deflect",!1)}))),Promise.all(q).then((()=>{this.hasPlayed=!0,this.onComplete.dispatch()})).catch((()=>{Q.VyI.log("TitanTakeDamageAnimationState - Warning: Could not play all animations",Q.$bb.Warning)}))}hasFinishedPlaying(){return this.hasPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}var ws=z(94393);class Ts extends Q.JTX{constructor(){super(...arguments),this.teamID=null}get TeamID(){return this.teamID}set TeamID(q){null!==this.teamID&&X.find(this.battleTeams,(q=>q.ID===this.teamID)).OnDefeated.remove(this.titanTeamDefeated,this),this.teamID=q,X.find(this.battleTeams,(q=>q.ID===this.teamID)).OnDefeated.add(this.titanTeamDefeated,this)}destroy(){X.find(this.battleTeams,(q=>q.ID===this.teamID)).OnDefeated.add(this.titanTeamDefeated,this),super.destroy()}titanTeamDefeated(){const q=tt.q.instance.prodigy.world.getCurrentZone(),K=tt.q.instance.prodigy.gameContainer.get("119-35f9").getMultiplier(q,ws.R.Xp),z=this.titanXP*K;this.combatBounty.addStars(z)}}(0,Y.Cg)([(0,Q.fFd)("CombatBounty"),(0,Y.Sn)("design:type",Object)],Ts.prototype,"combatBounty",void 0),(0,Y.Cg)([(0,Q.fFd)("TitanBountyXP"),(0,Y.Sn)("design:type",Number)],Ts.prototype,"titanXP",void 0),(0,Y.Cg)([(0,Q.fFd)("Teams"),(0,Y.Sn)("design:type",Array)],Ts.prototype,"battleTeams",void 0);class Ss extends Q.PQK{installBindings(){const q=new yt(this.Container);q.AnimationName="idle",q.LoopAnimation=!0,this.Container.bind("IdleAnimationState").toConstantValue(q);const K=new yt(this.Container);K.AnimationName="attack",K.LoopAnimation=!1,this.Container.bind("AttackAnimationState").toConstantValue(K),this.Container.bind("CastPoint").toConstantValue({x:-100,y:100}),this.Container.bind("ImpactSize").toConstantValue({x:157.5,y:430}),this.Container.bind("ImpactOffset").toConstantValue({x:-175,y:0})}}var As=z(38042);let Cs=class extends Q.JTX{constructor(){super(...arguments),this.hideDelay=0}get HideDelay(){return this.hideDelay}set HideDelay(q){this.hideDelay=q}create(){super.create(),this.questionInterface?(this.questionInterface.OnQuestionOpened.add(this.hideGameObject,this),this.questionInterface.OnQuestionAnswered.add(this.showGameObject,this,0,!0)):Q.VyI.log("HideWhenQuestionOpen#questionInterface was nullish",Q.$bb.Warning)}destroy(){this.questionInterface&&(this.questionInterface.OnQuestionOpened.remove(this.hideGameObject,this),this.questionInterface.OnQuestionAnswered.remove(this.showGameObject,this)),super.destroy()}setVisibility(q){this.GameObject.active=q}hideGameObject(){this.hideDelay>0?tt.q.instance.game.time.events.addTimer(this.hideDelay,this.setVisibility,this,!1):this.setVisibility(!1)}showGameObject(){this.setVisibility(!0)}};(0,Y.Cg)([(0,Q.fFd)("82f-7065"),(0,Y.Sn)("design:type",Object)],Cs.prototype,"questionInterface",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Cs.prototype,"hideDelay",void 0),Cs=(0,Y.Cg)([(0,Q.EVk)("HideWhenQuestionOpen",Q.YH6.ui)],Cs);var Os=z(38268),Is=z(86730),Ds=z(97071);class Rs extends et.U{constructor(){super(...arguments),this.battleLayers=null,this.rootContext=null,this._currentScene=null,this.postBattleExpressModeController=new Fe.o}get type(){return Rs.INSECURE_BATTLE_TYPE}get stateMachine(){return this.rootContext.getInjectedValue("BattleStateMachine")}update(){this._currentScene.update(),tt.q.instance.prodigy.update()}init(q){this._currentScene=Q.wa5.getActiveScene(),this.setupLayers(),tt.q.instance.prodigy.gameContainer.get("119-35f9").awaitLoad().catch(Q.RQr.createHandler("Error loading Weekend Event Data for Battle")),this.rootContext=this.battleLayers.root.addComponent(Q.bE_),this.rootContext.Container.bind("MenuLayer").toConstantValue(this.battleLayers.menus),this.rootContext.Container.bind("HostID").toConstantValue(q.hostID),this.rootContext.Container.bind("TeamStreak").toConstantValue(q.teamStreak);const K=this.battleLayers.battleUI.addComponent(Q.Fid);K.Identifier="BattleUIFactory",K.Components=[this.battleLayers.battleUI.addComponent(Bt)],this.rootContext.Installers.push(new Ds.p(this.game)),this.rootContext.Installers.push(new St(this.game)),this.rootContext.Installers.push(new He(q)),q.isHost?(this.rootContext.Installers.push(new Xe),this.rootContext.runInstallers()):(this.rootContext.Installers.push(new Ae),this.rootContext.runInstallers());this.battleLayers.content.addComponent(Cs).HideDelay=500;this.battleLayers.battleUI.addComponent(Cs).HideDelay=500;this.battleLayers.root.addComponent(Is.a).BackgroundMusicID=2,this.battleLayers.root.addComponent(Ve),this.battleLayers.root.addComponent(Os.R);const z=this.battleLayers.content.addComponent(Ki),Z=this.battleLayers.content.addComponent(Q.Fid);z.BattleLayer=this.battleLayers.content,Z.Identifier="BattleStateMachine",Z.Components=[z];const et=new Q._mx(this.battleLayers.root);et.addComponent(Q.K16),et.name="SummaryScreen",et.active=!1;const it=this.battleLayers.root.addComponent(Q.Fid);it.Identifier="SummaryScreen",it.Components=[et.addComponent(je)];const st=this.battleLayers.root.addComponent(Jt);st.Game=this.game,st.BattleContent=this.battleLayers.content;const nt=this.battleLayers.root.addComponent(Q.Fid);nt.Identifier="SpellFactory",nt.Components=[st],q.isHost?class{constructor(){}static create(q){const K=new Q._mx(q);K.addComponent(Q.K16),K.name="CoOpHost",K.addComponent(ms),K.addComponent(ys);const z=K.addComponent(Q.Fid);return z.Identifier="CurrentCoOpTeam",z.Components=[K.addComponent(gs)],K}}.create(this.battleLayers.root):class{constructor(){}static create(q){const K=new Q._mx(q);K.addComponent(Q.K16),K.name="CoOpClient",K.addComponent(Zi),K.addComponent(Qi),K.addComponent(is),K.addComponent(Xi);const z=K.addComponent(Q.Fid);return z.Identifier="CurrentCoOpTeam",z.Components=[K.addComponent(Yi)],K}}.create(this.battleLayers.root);const at=this.rootContext.getInjectedValue("CurrentCoOpTeam");at.getTeam().HostID=q.hostID,at.getTeam().TeamMembers=X.map(q.teammates,(q=>q.userID)),at.getTeam().TeamMembers.push(this.rootContext.getInjectedValue("CurrentPlayer").getUserID());const rt=this.battleLayers.root.addComponent(Q.Fid);rt.Identifier="BattleStats",rt.Components=[this.battleLayers.root.addComponent(De)],this.rootContext.Container.bind("PostBattleExpressModeController").toConstantValue(this.postBattleExpressModeController),tt.q.instance.prodigy.gameContainer.get("b0c-9016").setUserStatus(J.a.unavailable).catch(Q.RQr.createHandler("Unable to set social status")),Promise.all(q.battleMap.map(((q,K)=>(0,Y.sH)(this,void 0,void 0,(function*(){const z=new Q._mx(0===K?this.battleLayers.background:this.battleLayers.foreground),Y=z.addComponent(Ot._);yield Y.setAsset(q);const X=z.addComponent(Q.K16);X.x=this.game.width>>1,X.y=this.game.height>>1,X.width=Y.getWidth(),X.height=Y.getHeight(),X.anchorX=.5,X.anchorY=.5}))))).then((()=>{this.createBattleEntities(q)})).catch(Q.RQr.createHandler("Error loading map"))}shutdown(){var q;tt.q.instance.prodigy.gameContainer.get("b0c-9016").setUserStatus(J.a.available).catch(Q.RQr.createHandler("Unable to set social status")),null===(q=this.postBattleExpressModeController)||void 0===q||q.destroy(),super.shutdown()}setupLayers(){const q=new Q._mx;q.name="Scene",q.addComponent(Q.K16);const K=new Q._mx(q);K.name="Map",K.addComponent(Q.K16);const z=new Q._mx(q);z.name="Menus",z.addComponent(Q.K16);const Y=new Q._mx(K);Y.name="Background",Y.addComponent(Q.K16);const X=new Q._mx(K);X.name="Content",X.addComponent(Q.K16);const Z=new Q._mx(X);Z.name="Dim",Z.addComponent(Q.K16);const J=new Q._mx(X);J.name="FarBack",J.addComponent(Q.K16);const tt=new Q._mx(X);tt.name="Background",tt.addComponent(Q.K16);const et=new Q._mx(X);et.name="Middle",et.addComponent(Q.K16);const it=new Q._mx(X);it.name="Foreground",it.addComponent(Q.K16);const st=new Q._mx(X);st.name="FarFront",st.addComponent(Q.K16);const nt=new Q._mx(K);nt.name="Foreground",nt.addComponent(Q.K16);const at=new Q._mx(K);at.name="BattleUI",at.addComponent(Q.K16),this.battleLayers={root:q,map:K,background:Y,content:X,foreground:nt,menus:z,battleUI:at,battleDim:Z,battleFarBack:J,battleBackground:tt,battleMid:et,battleForeground:it,battleFarFront:st},this.groupFarBack=J.legacyTransform.group,this.groupFront=it.legacyTransform.group,this.groupMiddle=et.legacyTransform.group,this.groupBack=tt.legacyTransform.group,this.groupDim=Z.legacyTransform.group,this.groupFarFront=st.legacyTransform.group}createBattleEntities(q){const K=new Q._mx(this.battleLayers.content);K.name="PlayerTeamContext",K.addComponent(Q.K16),K.addComponent(Q.bE_);const z=K.addComponent(At);z.ID=0;const Y=K.addComponent(pt);Y.InitialValue=this.rootContext.getInjectedValue("CrystalHP"),Y.reset();const X=K.addComponent(Q.Fid);X.Identifier="Health",X.Components=[Y];const Z=K.addComponent(Q.Fid);Z.Identifier="DamageReceiver",Z.Components=[K.addComponent(Re)];const J=K.addComponent(Q.Fid);J.Identifier="DamageSource",J.Components=[K.addComponent(Pe)];const tt=new Q._mx(this.battleLayers.content);tt.name="TitanTeamContext",tt.addComponent(Q.K16),tt.addComponent(Q.bE_);const et=tt.addComponent(At);et.ID=1;const it=tt.addComponent(pt);it.InitialValue=this.rootContext.getInjectedValue("TitanHP"),it.reset();const st=tt.addComponent(Q.Fid);st.Identifier="Health",st.Components=[it];const nt=tt.addComponent(Q.Fid);nt.Identifier="DamageReceiver",nt.Components=[tt.addComponent(Re)];const at=tt.addComponent(Q.Fid);at.Identifier="DamageSource",at.Components=[tt.addComponent(Pe)];const rt=this.battleLayers.content.addComponent(Q.Fid);rt.Identifier="Teams",rt.Components=[z,et],this.createPlayerTeam(),this.createTitanTeam(q),this.setupHealthBars();const ot=this.battleLayers.content.addComponent(Q.Fid);ot.Identifier="BattleTeamInfo",ot.Components=[this.battleLayers.content.addComponent(ge)];this.battleLayers.root.addComponent(ei).join(q.multiplayerRoom),this.sendBattleStartEvent(),this.rootContext.getInjectedValue("BattleStateMachine").run()}setupHealthBars(){const q=vs.create(this.battleLayers.battleUI,"CO_OP_CRYSTAL_HEALTH_NAME",!0);q.name="PlayerHealthBar",q.active=!1;const K=q.findComponent(te);K.TeamID=0,q.legacyTransform.group.position.set(-220,80);const z=q.addComponent(ii);z.StartPosition={x:-220,y:80},z.EndPosition={x:250,y:80},z.SlideDuration=800;const Y=q.addComponent(Q.Fid);Y.Identifier="SlideInHealthBar",Y.Components=[z];const X=q.addComponent(ii);X.StartPosition={x:250,y:80},X.EndPosition={x:250,y:-80},X.SlideDuration=500;const Z=q.addComponent(Q.Fid);Z.Identifier="SlideOutHealthBar",Z.Components=[X];const J=vs.create(this.battleLayers.battleUI,"CO_OP_TITAN_HEALTH_NAME",!1);J.name="TitanHealthBar",J.active=!1,J.findComponentInChildren(ni).GameObject.legacyTransform.group.scale.x=-1;const tt=J.findComponent(te);tt.TeamID=1;const et=J.addComponent(ii);et.StartPosition={x:1490,y:80},et.EndPosition={x:1030,y:80},et.SlideDuration=800;const it=J.addComponent(Q.Fid);it.Identifier="SlideInHealthBar",it.Components=[et];const st=J.addComponent(ii);st.StartPosition={x:1030,y:80},st.EndPosition={x:1030,y:-80},st.SlideDuration=500;const nt=J.addComponent(Q.Fid);nt.Identifier="SlideOutHealthBar",nt.Components=[st];const at=this.battleLayers.root.addComponent(Q.Fid);at.Identifier="ActiveHealthBars",at.Components=[K,tt]}createPlayerTeam(){const q=class{constructor(){}static create(q){const K=new Q._mx(q);K.addComponent(Q.K16),K.legacyTransform.x=520,K.legacyTransform.y=420,K.name="Crystal",K.addComponent(vt);const z=K.addComponent(Q.bE_);z.Container.bind("CastPoint").toConstantValue({x:140,y:-60}),z.Container.bind("ImpactSize").toConstantValue({x:150,y:200}),z.Container.bind("ImpactOffset").toConstantValue({x:205,y:0});const Y=K.addComponent(cs.v),X=K.addComponent(ri.j);Y.OnLoaded.addOnce((()=>{X.applySkin("crystal"),X.playAnimation("idle",!0)})),Y.setAsset(ds.Q.Spine_coop_crystal_json);const Z=new Q._mx(K);Z.addComponent(Q.K16),Z.legacyTransform.x=50,Z.legacyTransform.y=-65,Z.name="Input";const J=Z.addComponent(ki.p);J.Width=200,J.Height=250,J.InputEnabled=!1,Z.addComponent(as);const tt=K.addComponent(Q.Fid);tt.Identifier="Animators",tt.Components=[X];const et=K.addComponent(hs);et.LocalizationKey="CO_OP_CRYSTAL_NAME";const it=K.addComponent(Q.Fid);it.Identifier="Name",it.Components=[et];const st=K.addComponent(os);st.SpineAnimator=X,z.Container.bind("IdleAnimationState").toConstantValue(st);const nt=K.addComponent(Q.Fid);nt.Identifier="TakeDamageAnimationState",nt.Components=[K.addComponent(ns)];const at=K.addComponent(ss);at.ShatterSkinningDelay=500;const rt=K.addComponent(Q.Fid);rt.Identifier="DefeatAnimationState",rt.Components=[at];const ot=K.addComponent(rs);ot.GlowDuration=1500,ot.SpineAnimator=X;const ht=K.addComponent(Q.Fid);return ht.Identifier="AttackAnimationState",ht.Components=[ot],K}}.create(this.battleLayers.battleMid),K=q.findComponent(vt),z=X.find(this.rootContext.getInjectedValue("Teams"),(q=>0===q.ID)),Y=q.findComponent(Q.bE_),Z=z.GameObject.findComponent(Q.bE_);Y.Container.bind("DamageReceiver").toConstantValue(Z.getInjectedValue("DamageReceiver")),Y.Container.bind("DamageSource").toConstantValue(Z.getInjectedValue("DamageSource")),Y.Container.bind("Health").toConstantValue(Z.getInjectedValue("Health")),K.BattleTeam=z,K.setAsActiveTeamMember();const J=new Q._mx(this.battleLayers.battleMid),tt=J.addComponent(Q.K16);tt.x=270,tt.y=420;const et=J.addComponent(Ct);J.name="Middle",et.TeamID=0,et.OffScreenStartPosition={x:-200,y:420};const it=new Q._mx(this.battleLayers.battleBackground),st=it.addComponent(Q.K16);st.x=375,st.y=320;const nt=it.addComponent(Ct);it.name="Top",nt.TeamID=0,nt.OffScreenStartPosition={x:-200,y:320};const at=new Q._mx(this.battleLayers.battleForeground),rt=at.addComponent(Q.K16);rt.x=375,rt.y=520;const ot=at.addComponent(Ct);at.name="Bottom",ot.TeamID=0,ot.OffScreenStartPosition={x:-200,y:520}}createTitanTeam(q){const K=st.t.getItem("titan",q.titanAssetID),z=class{constructor(){}static create(q,K){const z=new Q._mx(q);z.name="Titan",z.addComponent(Q.K16);const Y=z.addComponent(Q.bE_);Y.Installers.push(new Ss),Y.runInstallers();const X=new Q._mx(z);X.name="Spine",X.addComponent(Q.K16).group.scale.set(-1.75,1.75);const Z=X.addComponent(cs.v),J=X.addComponent(ri.j);Z.OnLoaded.addOnce((()=>{J.playAnimation("idle",!0)})),Z.setAsset(K);const tt=z.addComponent(Q.Fid);tt.Identifier="Animators",tt.Components=[J];const et=z.addComponent(vt),it=z.addComponent(Q.Fid);it.Identifier="BattleTeamMember",it.Components=[et];const st=new Q._mx(z);st.addComponent(Q.K16),st.legacyTransform.x=-95,st.legacyTransform.y=15,st.name="Barrier";const nt=st.addComponent(Ot._),at=st.addComponent(As.p);nt.OnLoaded.addOnce((()=>{nt.setAnchor(.5,.5),at.createAnimationSequence("deflect",[],10,!1),nt.setScale(2.33,2.33),nt.sprite.smoothed=!1,nt.setAlpha(0)})),nt.setAsset(kt._.Boss_titan_barrier_json,"1");const rt=new Q._mx(z);rt.addComponent(Q.K16),rt.legacyTransform.x=-115,rt.legacyTransform.y=15,rt.name="Barrier Break";const ot=rt.addComponent(Ot._),ht=rt.addComponent(As.p);ot.OnLoaded.addOnce((()=>{ot.setAnchor(.5,.5),ht.createAnimationSequence("break",[],10,!1),ot.setScale(2.33,2.33),ot.sprite.smoothed=!1,ot.setAlpha(0)})),ot.setAsset(kt._.Boss_titan_barrier_break_json,"1");const ct=new Q._mx(z);ct.addComponent(Q.K16),ct.legacyTransform.x=-500,ct.legacyTransform.y=60,ct.name="Barrier Spark";const dt=ct.addComponent(Ot._),lt=ct.addComponent(As.p);dt.OnLoaded.addOnce((()=>{dt.setAnchor(.5,.5),lt.createAnimationSequence("spark",[],10,!1),dt.setScale(2.33,2.33),dt.sprite.smoothed=!1,dt.setAlpha(0)})),dt.setAsset(kt._.Boss_titan_spark_json,"1");const ut=z.addComponent(Es);ut.TitanBarrier=at,ut.TitanSpark=lt;const ft=z.addComponent(Q.Fid);ft.Identifier="TakeDamageAnimationState",ft.Components=[ut];const bt=z.addComponent(_s);bt.BarrierAnimator=ht,bt.BarrierSpark=lt;const pt=z.addComponent(Q.Fid);pt.Identifier="DefeatAnimationState",pt.Components=[bt],z.addComponent(Ts).TeamID=1;const gt=z.addComponent(hs);gt.LocalizationKey="TITAN_NAME";const mt=z.addComponent(Q.Fid);return mt.Identifier="Name",mt.Components=[gt],z}}.create(this.battleLayers.battleMid,it.E.getTitanSpine(q.titanAssetID)),Y=z.findComponent(vt),Z=X.find(this.rootContext.getInjectedValue("Teams"),(q=>1===q.ID));z.legacyTransform.group.position.set(1110,325);const J=z.findComponent(Q.bE_),tt=Z.GameObject.findComponent(Q.bE_);J.Container.bind("DamageReceiver").toConstantValue(tt.getInjectedValue("DamageReceiver")),J.Container.bind("Health").toConstantValue(tt.getInjectedValue("Health")),J.Container.bind("Level").toConstantValue(void 0),J.Container.bind("Element").toConstantValue(K.data.element),q.isHost&&J.Container.bind("DamageSource").toConstantValue(tt.getInjectedValue("DamageSource")),Y.BattleTeam=Z,Y.setAsActiveTeamMember(),q.isHost?z.addComponent(Ze):z.addComponent(Oe)}sendBattleStartEvent(){tt.q.instance.prodigy.gameContainer.get("20f-5f67").battle.sendBattleStartEvent(Rs.INSECURE_BATTLE_TYPE,{battle_type:Rs.INSECURE_BATTLE_TYPE})}enablePostBattleExpressMode(q){this.rootContext.getInjectedValue("PostBattleExpressModeController").enable(q).catch(Q.RQr.createHandler("Failed to enable express mode on post-battle menus"))}canBattleEndInstantly(){const q=this.stateMachine.CurrentState,K=this.rootContext.getInjectedValue("BattleActionQueue");return q===ai.InBattle&&!K.IsActionQueuePlaying&&0===K.Actions.length}beginEndingBattle(q,K={}){if(K.enablePostBattleFlowExpressMode&&this.enablePostBattleExpressMode(K.forceEndMessageText),this.canBattleEndInstantly())q();else{if(Q.Aq$.isDefined(this.forceEndCallback))return;this.forceEndCallback=q,this.rootContext.getInjectedValue("PostBattleExpressModeController").onPostBattleExpressModeComplete.addOnce((()=>{this.callForceEndCallbackIfExists()}));this.rootContext.getInjectedValue("BattleActionQueue").OnQueueComplete.add((()=>{this.attemptToEndBattle()})),this.stateMachine.OnStateChange.add((q=>{this.attemptToEndBattle()}))}}attemptToEndBattle(){this.canBattleEndInstantly()&&this.callForceEndCallbackIfExists()}callForceEndCallbackIfExists(){Q.Aq$.isDefined(this.forceEndCallback)&&(this.forceEndCallback(),this.forceEndCallback=void 0)}}Rs.INSECURE_BATTLE_TYPE="Titan"},23082:(q,K,z)=>{"use strict";var Y;z.d(K,{G:()=>Y}),function(q){q.Battle="Battle",q.Boot="Boot",q.CharCreate="CharCreate",q.CharSelect="CharSelect",q.CoOp="CoOp",q.DanceDance="DanceDance",q.DinoDig="DinoDig",q.DuelMatchmaking="DuelMatchmaking",q.Faint="Faint",q.Loading="Loading",q.LootDashMenu="LootDashMenu",q.LootDashTransport="LootDashTransport",q.Museum="Museum",q.PrefabScene="PrefabScene",q.Registration="Registration",q.Rifts="Rifts",q.SecureBattle="SecureBattle",q.SecureBattleRevamp="SecureBattleRevamp",q.SplashScreen="SplashScreen",q.TileScreen="TileScreen",q.Tower="Tower"}(Y||(Y={}))},1559:(q,K,z)=>{"use strict";z.d(K,{v:()=>it});var Y=z(62459),Q=z(28628),X=z(35120),Z=z(24190),J=z(88022),tt=z(73678),et=z(20705);class it extends et.f{constructor(){super("zone-faint","",[]),this.targetZone="",this.showMenu=!1,this.targetZone=""}create(){super.create();const q=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=X.q.instance.game;q.saveEnabled=!1,this.element=X.q.instance.prodigy.create.element(this.uiLayer),this.element.add(new Z.C(this.prodigyGame,0,0,K.width,K.height,J._.Tiled_sprites_json,"load"))}start(){this.onDialogueEndOverride?this.onDialogueEndOverride():this.toZone(),super.start()}toZone(){const q={battleResult:Q.XK.Defeat};if(Y.Aq$.isDefined(this.targetZone)&&0!==this.targetZone.length)if(this.targetZone.indexOf("-")>-1)this._targetPos?X.q.instance.prodigy.world.it(this.targetZone,this._targetPos.x,this._targetPos.y,q):X.q.instance.prodigy.world.it(this.targetZone,void 0,void 0,q);else{const K=this.prodigyGame.state.get(this.targetZone);"startX"in K&&delete K.startX,"startY"in K&&delete K.startY,X.q.instance.prodigy.start(this.targetZone,q)}else X.q.instance.prodigy.world.it(tt.A_.HOUSE)}updateTeleportData(q){this.targetZone=q.mapKey,this._targetPos=q.coordinates}shutdown(){var q;this.onDialogueEndOverride=void 0,null===(q=this.element)||void 0===q||q.destroy(),super.shutdown()}}},81617:(q,K,z)=>{"use strict";z.d(K,{R:()=>ct});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(35120),J=z(29569),tt=z(24190),et=z(34829),it=z(36545),st=z(73797),nt=z(91160),at=z(87776),rt=z(91315),ot=z(45716),ht=z(23082);class ct extends J.U{get isLoadingAdditional(){return this._additionalLoadPromises.length>0}constructor(){super(),this.timeLoadStartedMS=null,this.isHintPanelShown=!1,this._hint=null,this._mapName=null,this._hintContent=null,this._errorMessageBox=null,this._additionalLoadPromises=[],this.onAdditionalLoadPromisesFinishSignal=new Q.HN0,this.prodigyGame=Z.q.instance.game,this.initData()}startLoading(q={}){this._additionalLoadPromises.length=0,this.prodigyGame.tweens.removeAll(),this.resetData(),Z.q.instance.game.fps.record=!1;for(const K in q)this.data[K]=q[K];this.prodigyGame.state.start(ht.G.Loading)}initData(q=""){this.data={title:q,time:0,fadeIn:!0,fadeOut:!0,callback:null,assets:[],target:ht.G.SplashScreen,autoStart:!0,save:!0}}resetData(){this.initData(Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("LOADING_CAPITALIZE"))}create(){if(Z.q.instance.prodigy.gameContainer.get("088-1d4c").startTracing(nt.u.LoadingState),super.create(),this.startTime=(new Date).getTime(),this.complete=!1,this.isLoaded=!1,this.isHintPanelShown=!1,this.timeLoadStartedMS=Date.now(),this.element=Z.q.instance.prodigy.create.element(void 0),!this.isTargetingInitialScreen()){const q=new tt.C(this.prodigyGame,0,0,ct.BG_WIDTH,ct.BG_HEIGHT,X._.Tiled_sprites_json,"load");q.inputEnabled=!0,this.element.add(q);const K=this.element.add(Z.q.instance.prodigy.create.sprite(1220,660,X._.General_core_json,"loading"));K.anchor.set(.5,.5),this._spinnerTween=new Q.Kak(K,this.game,this).to({angle:360},2e3,Q.GS3.Linear.None,!0,0,et.s.MAX_SAFE_INTEGER,!1)}this.element.onDestroy.addOnce(this.cleanUpResources,this),Z.q.instance.game.app.ticker.add(this.tick,this),this.start()}start(){Z.q.instance.prodigy.game.input.enabled=!0,this.prodigyGame.broadcaster.removeAppListener(st.bv.WorkerLoadComplete,this,"loading");Z.q.instance.prodigy.gameContainer.get("088-1d4c").startTracing(nt.u.LoadingStateAssetsLoad);const q=Q.Aq$.isDefined(this.data.assets)?this.data.assets:[];if(Z.q.instance.prodigy.load.assets(q,this.loaded.bind(this)),this.data.save){const q=Z.q.instance.prodigy.gameContainer.get("774-4659");if(q.loggedIn&&q.characterProcessed){Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.saveEnabled=!0}}}loaded(q,K){if(!Q.Aq$.isDefined(this.prodigyGame))return;Z.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(nt.u.LoadingStateAssetsLoad,{isLoaded:K,assets:Q.Aq$.isDefined(this.data.assets)?this.data.assets:[]}),K?this.isLoaded=!0:this.showErrorPopup(Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(ot.l.CheckNetworkConnection))}tick(){var q,K;null===(K=null===(q=this.element)||void 0===q?void 0:q.parent)||void 0===K||K.setChildIndex(this.element,this.element.parent.children.length-1),!this.complete&&this.isLoadingComplete()?this.handleLoadingComplete():!this.isTargetingInitialScreen()&&null!==this.timeLoadStartedMS&&!this.isHintPanelShown&&Date.now()-this.timeLoadStartedMS>=ct.MIN_LOAD_TO_SHOW_HINT_PANEL_MS&&this.showHintPanel()}handleLoadingComplete(){var q;this.complete=!0,Q.Aq$.isDefined(this.data.callback)&&this.data.callback(),this.data.target!==ht.G.SplashScreen&&(Z.q.instance.game.fps.record=!0);const K=this.prodigyGame.state;if(K.onStateLoaded.addOnce(this.nextStateLoaded,this),this.data.autoStart&&this.data.target&&!this._errorMessageBox){K.get(this.data.target).fadeInSet=this.data.fadeIn,K.start(this.data.target,!1,...null!==(q=this.data.targetInitArgs)&&void 0!==q?q:[]);Z.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(nt.u.LoadingState)}const z=Z.q.instance.prodigy.gameContainer.get("a92-c640");if(null!==z.timeToPlayMS&&z.timeToPlayMS>0){const q=Date.now()-this.timeLoadStartedMS;z.timeInLoadingMS+=q,z.timeToPlayMS+=q}}waitFor(q,K=!1){this._additionalLoadPromises.push({promise:q,isCritical:K})}nextStateLoaded(){this.awaitAdditionalLoadPromises().then((()=>{try{this.onAdditionalLoadPromisesFinishSignal.dispatch(),this.cleanUpResources()}catch(q){Q.RQr.logError(q,"Error during loading completion cleanup")}})).catch((()=>{this.onAdditionalLoadPromisesFinishSignal.dispatch(),this._additionalLoadPromises.length=0,this.showErrorPopup(Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(ot.l.CheckNetworkConnection))}))}awaitAdditionalLoadPromises(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=Z.q.instance.prodigy.gameContainer.get("088-1d4c");for(const{promise:z,isCritical:Y}of this._additionalLoadPromises){const X={"promiseInfo.isCritical":Y,"promiseInfo.success":!0};try{q.startTracing(nt.u.LoadingStateAdditionalLoadPromise),yield z,q.endTracing(nt.u.LoadingStateAdditionalLoadPromise,X)}catch(K){if(Q.RQr.logError(K,"Error waiting for additional load promise"),X["promiseInfo.success"]=!1,q.endTracing(nt.u.LoadingStateAdditionalLoadPromise,X),Y)throw new Error("An error occurred while loading resources.")}}}))}isLoadingComplete(){return!this.complete&&Date.now()-this.startTime>=this.data.time&&this.isLoaded}showHintPanel(){const q=Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);this.data.time=ct.MIN_SHOW_HINT_PANEL_MS,this.isHintPanelShown=!0,this._hintContent=Z.q.instance.prodigy.create.element(this.element),this._hintContent.visible=!1,this._hintContent.alpha=0,Z.q.instance.prodigy.create.panel(this._hintContent,160,340,24,5,"shine"),this._hintContent.add(new tt.C(this.prodigyGame,171,380,ct.BG_WIDTH-320-22,40,X._.Tiled_sprites_json,"blue-top")),this._hintContent.add(new tt.C(this.prodigyGame,171,420,ct.BG_WIDTH-320-22,40,X._.Tiled_sprites_json,"blue-mid")),this._hintContent.add(new tt.C(this.prodigyGame,171,460,ct.BG_WIDTH-320-22,40,X._.Tiled_sprites_json,"blue-top2")),this._hintContent.add(Z.q.instance.prodigy.create.sprite(590,310,X._.General_core_json,"award-frame"));const K=q.getText(it.R.getRandomHint("none").textKey);this._hint=new at.b(this.prodigyGame,this._hintContent);const z=ct.BG_WIDTH-420;this._hint.width=z,this._hint.populate({text:K,style:9,fontSize:28,boundsAlignH:"center",boundsAlignV:"middle",color:"#ffffff",wordWrap:!0,wordWrapWidth:z,align:"center"},z),this._hint.position.set(206,442),Z.q.instance.prodigy.create.panel(this._hintContent,440,560,10,2,"shine"),this._mapName=new at.b(this.prodigyGame,this._hintContent),this._mapName.populate({text:this.data.title,style:6,fontSize:24,boundsAlignH:"center",boundsAlignV:"middle",color:"#ffffff"}),this._mapName.position.set(ct.BG_HALF_WIDTH,this._mapName.height+564);const Y=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,J=()=>{this._hintContent&&!this._hintContent.destroyed&&(this._hintContent.visible=!0,this.game.add.tween(this._hintContent,this).to({alpha:1},ct.HINT_FADE_IN_MS,Q.GS3.Linear.None,!0))};if(!Z.q.instance.prodigy.gameContainer.get("774-4659").loggedIn)return void J();const et=Z.q.instance.prodigy.create.player(this._hintContent,Y,1,ct.BG_HALF_WIDTH,ct.BG_HALF_HEIGHT);et.reload((this.data.useIdleAnimation?et.stopHeavy:et.walk).bind(et));const st=setTimeout(J,ct.HINT_REVEAL_FALLBACK_MS);et.onFullyLoaded.addOnce((()=>{clearTimeout(st),J()}),this)}showErrorPopup(q){window.prodigyLoaderHidden?(this._errorMessageBox=new rt.p(this.prodigyGame,this.element),this._errorMessageBox.preprocess(q,void 0,void 0),this._errorMessageBox.queuePostCreateCallback(this._errorMessageBox.setOkay.bind(this._errorMessageBox,Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("SETTINGS_LOGOUT"),null)),this._errorMessageBox.setCloseCallback(this.onErrorMessageClose)):window.SW.Load.setErrorScreen("Loading Failed",void 0,q,window.SW.Errors.ERROR_CODE_MENU_ASSETS);Z.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(nt.u.LoadingState,{load_failure:q})}onErrorMessageClose(){Z.q.instance.prodigy.gameContainer.get("774-4659").logout(!0),this._errorMessageBox=null}cleanUpResources(){var q,K;Z.q.instance.game.app.ticker.remove(this.tick,this),this._additionalLoadPromises.length=0,this.onAdditionalLoadPromisesFinishSignal.dispose(),null===(q=this._spinnerTween)||void 0===q||q.destroy(),this._spinnerTween=void 0,this.element&&(this.element.onDestroy.removeAll(this),this.element.destroyed||this.element.destroy(),this.element=null),this._errorMessageBox=null,this._hint=null,this._mapName=null,this._hintContent=null,(null===(K=this.data.shutdownLoadState)||void 0===K||K)&&Z.q.instance.prodigy.notifications.resumeAll()}shutdown(){Z.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(nt.u.LoadingState,{shutdown:!0})}isTargetingInitialScreen(){return this.data.target===ht.G.SplashScreen||this.data.target===ht.G.CharCreate||this.data.target===ht.G.CharSelect}}ct.BG_WIDTH=1280,ct.BG_HEIGHT=720,ct.BG_HALF_WIDTH=.5*ct.BG_WIDTH,ct.BG_HALF_HEIGHT=.5*ct.BG_HEIGHT,ct.MIN_SHOW_HINT_PANEL_MS=3500,ct.MIN_LOAD_TO_SHOW_HINT_PANEL_MS=500,ct.HINT_REVEAL_FALLBACK_MS=5e3,ct.HINT_FADE_IN_MS=100},49334:(q,K,z)=>{"use strict";z.d(K,{Q:()=>at});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(88022),J=z(99625),tt=z(35120),et=z(29569),it=z(24190),st=z(91160),nt=z(23082);class at extends et.U{get prefabGameAssets(){return this._prefabGameAssets}init(q){const K=tt.q.instance.prodigy.gameContainer.get("088-1d4c");K.startTracing(st.u.PrefabLoaderScene);const z={},Y=q.prefabIDs.map((q=>q.toString()));z.prefab_ids=Y.join(",");const X=new it.C(this.game,0,0,this.game.width,this.game.height,Z._.Tiled_sprites_json,"load");this.game.world.addChild(X),this._currentScene=Q.wa5.getActiveScene(),this._prefabGameAssets=q.prefabIDs.filter((q=>Object.values(J.l).includes(q)));const et=this._currentScene.container;for(const Q in q)et.bind(`InitData-${Q}`).toConstantValue(q[Q]);if(q.layers){const K=q.layers.length;for(let z=0;z{X.destroy(),z.error=!1,K.endTracing(st.u.PrefabLoaderScene,z)})).catch((q=>{throw z.error=!0,z.error_message=(null==q?void 0:q.message)||"Unknown error",K.endTracing(st.u.PrefabLoaderScene,z),Q.RQr.logError(q,"Error loading prefab scene"),q})),!0)}loadScene(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=tt.q.instance.prodigy.gameContainer.get("088-1d4c");K.startTracing(st.u.PrefabLoaderSceneAssetPreload);const z={};if(q.preloadAssets){z.asset_count=q.preloadAssets.length,z.assets=q.preloadAssets;try{yield tt.q.instance.prodigy.load.assetsAsPromise(q.preloadAssets),z.assets_loaded=!0}catch(it){throw z.asset_load_error=!0,it}finally{K.endTracing(st.u.PrefabLoaderSceneAssetPreload,z)}}K.endTracing(st.u.PrefabLoaderSceneAssetPreload,z);const Y=K.startTracing(st.u.PrefabLoaderScenePrefabLoading),Q={},Z=[],J=tt.q.instance.prodigy.gameContainer.get("983-05a7");q.prefabIDs.forEach((q=>{const K=q.toString();let z;Y.startAssetTrace(K),z=(0,X.isNumber)(q)?J.loadWithDependencies(q).promise:J.loadWithDependenciesFromGUID(q).promise,Z.push(z.then((q=>(Y.endAssetTrace(K,{loaded:!0}),q))).catch((q=>{throw Y.endAssetTrace(K,{error:!0,error_message:(null==q?void 0:q.message)||"Unknown error"}),q})))}));try{const q=yield Promise.all(Z);for(const K of q)this._currentScene.addGameObject(K);Q.prefabs_loaded_count=q.length,Q.success=!0}catch(it){throw Q.error=!0,it}finally{K.endTracing(st.u.PrefabLoaderScenePrefabLoading,Q)}K.startTracing(st.u.PrefabLoaderSceneConsentBanner);const et={};try{this.initConsentBanner(q.hideParentalConsentBanner),et.hidden=!!q.hideParentalConsentBanner,et.success=!0}catch(it){throw et.error=!0,it}finally{K.endTracing(st.u.PrefabLoaderSceneConsentBanner,et)}}))}initConsentBanner(q=!1){const K=new Q._mx;K.layer="ui",K.addComponent(Q.dLy),this._currentScene.addGameObject(K),q?this.hideParentalConsentBanner():this.showParentalConsentBanner(K)}update(){this._currentScene.update(),tt.q.instance.prodigy.update()}shutdown(){tt.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(st.u.PrefabLoaderScene,{completed:!1}),this.hideParentalConsentBanner(),tt.q.instance.prodigy.cleanup(),this._currentScene=null,this._prefabGameAssets=null,tt.q.instance.prodigy.load.removeAssets(),super.shutdown()}}},20705:(q,K,z)=>{"use strict";z.d(K,{f:()=>ct});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(35120),J=z(29569),tt=z(83133),et=z(24190),it=z(73797),st=z(88022),nt=z(24110),at=z(85515),rt=z(98252),ot=z(81617),ht=z(21134);class ct extends J.U{get background(){return this._background?this._background.legacyTransform.group:null}get backgroundGameObject(){return this._background}get contentGameObject(){return this._content}get content(){return this._content?this._content.legacyTransform.group:null}get foreground(){return this._foreground?this._foreground.legacyTransform.group:null}get foregroundGameObject(){return this._foreground}get difficultyOverlay(){return this._difficultyOverlay?this._difficultyOverlay.legacyTransform.group:null}get uiLayer(){return this._uiLayer?this._uiLayer.legacyTransform.group:null}get uiLayerGameObject(){return this._uiLayer}get menusGameObject(){return this._menus}get menus(){return this._menus?this._menus.legacyTransform.group:null}get dialogue(){return this._dialogue?this._dialogue.legacyTransform.group:null}get overlayGameObject(){return this._overlay}get overlay(){return this._overlay?this._overlay.legacyTransform.group:null}get opaque(){return this._opaque?this._opaque.legacyTransform.group:null}get debugOverlay(){return this._debugOverlay?this._debugOverlay:null}get gameRenderCache(){return this._gameRenderCache?this._gameRenderCache.legacyTransform.group:null}constructor(q="zero",K="",z=[]){super(),this._currentScene=null,this._modalFilters=null,this._modalRenderTexture=null,this.screenData=null,this.isCutscenePlaying=!1,this.showMenu=!1,this.prodigyGame=Z.q.instance.game,this.screenName=K,this.zoneName=q,this.assets=z}initListeners(){this.prodigyGame.broadcaster.addAppListener(it.lc.AddChild,this.onAddChild.bind(this),this,this.prodigyGame),this.prodigyGame.broadcaster.addAppListener(it.lc.GetLayer,this.onGetLayer.bind(this),this,this.prodigyGame),this.prodigyGame.broadcaster.addAppListener(it.lc.EnableBackground,this.onEnableBackground.bind(this),this,this.prodigyGame),this.prodigyGame.broadcaster.addAppListener(it.lc.EnableContent,this.onEnableContent.bind(this),this,this.prodigyGame)}stopListeners(){this.prodigyGame.broadcaster.removeAppListener(it.lc.AddChild,this,this.prodigyGame),this.prodigyGame.broadcaster.removeAppListener(it.lc.GetLayer,this,this.prodigyGame),this.prodigyGame.broadcaster.removeAppListener(it.lc.EnableBackground,this,this.prodigyGame),this.prodigyGame.broadcaster.removeAppListener(it.lc.EnableContent,this,this.prodigyGame)}onEnableBackground(q){this.background.visible=q,this.foreground.visible=q,this.uiLayer.visible=q}onEnableContent(q){this.content.visible=q}onAddChild(q,K,z){this.stage&&this[K]&&(Q.Aq$.isDefined(z)?this[K].addChildAt(q,z):this[K].addChild(q))}onGetLayer(q){return Q.Aq$.isDefined(this.stage)&&Q.Aq$.isDefined(this[q])?this[q]:null}shutdown(){var q;Z.q.instance.prodigy.cleanup(),this.stopListeners();Z.q.instance.prodigy.gameContainer.get("774-4659").stopInactiveTimer(),this._disableConsentBanner||this.hideParentalConsentBanner(),this._camera&&(null===(q=this._camera.GameObject)||void 0===q||q.destroy(),this._camera=null),this._background&&(this._background.destroy(),this._background=null),this._content&&(this._content.destroy(),this._content=null),this._foreground&&(this._foreground.destroy(),this._foreground=null),this._difficultyOverlay&&(this._difficultyOverlay.destroy(),this._difficultyOverlay=null),this._uiLayer&&(this._uiLayer.destroy(),this._uiLayer=null),this._consentUiLayer&&(this._consentUiLayer.destroy(),this._consentUiLayer=null),this._gameRenderCache&&(this._gameRenderCache.destroy(),this._gameRenderCache=null),this._menus&&(this._menus.destroy(),this._menus=null),this._dialogue&&(this._dialogue.destroy(),this._dialogue=null),this._overlay&&(this._overlay.destroy(),this._overlay=null),this._opaque&&(this._opaque.destroy(),this._opaque=null),this.rearOverlay=null,this.msg=null,this.questProgress&&(this.questProgress.destroy(),this.questProgress=null),this._debugOverlay&&(this._debugOverlay.destroy(),this._debugOverlay=null),this.menuBar=null,this._root=null,this._currentScene=null,super.shutdown()}preload(){this._currentScene=Q.wa5.getActiveScene(),this._root=new Q._mx,this._root.name="root",this._root.addComponent(Q.K16),this.prodigyGame.stage.addChild(this._root.legacyTransform.group);const q=new Q._mx(this._root);q.name="camera",q.addComponent(Q.dLy).setPosition(ot.R.BG_HALF_WIDTH,ot.R.BG_HALF_HEIGHT),this._camera=q.addComponent(Q.YPZ),this._camera.setViewportSize(ot.R.BG_WIDTH,ot.R.BG_HEIGHT),this._camera.reset=()=>{},this._background=new Q._mx(this._root),this._background.name=at.E.BackgroundLayer,this._background.addComponent(Q.K16),this._background.addComponent(nt.B),this._content=new Q._mx(this._root),this._content.name=at.E.ContentLayer,this._content.addComponent(Q.K16),this._content.addComponent(nt.B),this._foreground=new Q._mx(this._root),this._foreground.name=at.E.ForegroundLayer,this._foreground.addComponent(Q.K16),this._foreground.addComponent(nt.B),this._difficultyOverlay=new Q._mx(this._root),this._difficultyOverlay.name=at.E.DifficultyModeOverlay,this._difficultyOverlay.addComponent(Q.K16),this._difficultyOverlay.addComponent(nt.B),this._uiLayer=new Q._mx(this._root),this._uiLayer.name=at.E.UiLayer,this._uiLayer.addComponent(Q.K16),this._uiLayer.addComponent(nt.B),this._consentUiLayer=new Q._mx(this._root),this._consentUiLayer.name=at.E.ConsentLayer,this._consentUiLayer.addComponent(Q.K16),this._consentUiLayer.addComponent(nt.B),this._currentScene.getLayer(this._consentUiLayer.layer).attachToCamera=!0,this._gameRenderCache=new Q._mx(this._root),this._gameRenderCache.name=at.E.GameRenderCacheLayer,this._gameRenderCache.addComponent(Q.K16),this._gameRenderCache.addComponent(nt.B),this._menus=new Q._mx(this._root),this._menus.name=at.E.MenusLayer,this._menus.addComponent(Q.K16),this._menus.addComponent(nt.B),this.menus.fixedToCamera=!0,this._dialogue=new Q._mx(this._root),this._dialogue.name=at.E.DialogueLayer,this._dialogue.addComponent(Q.K16),this._dialogue.addComponent(nt.B),this._overlay=new Q._mx(this._root),this._overlay.name=at.E.OverlayLayer,this._overlay.addComponent(Q.K16),this._overlay.addComponent(nt.B),this._opaque=new Q._mx(this._root),this._opaque.name=at.E.OpaqueLayer,this._opaque.addComponent(Q.K16),this._opaque.addComponent(nt.B),this._debugOverlay=new Q._mx(this._root),this._debugOverlay.name=at.E.Debug,this._debugOverlay.addComponent(Q.dLy),this._debugOverlay.addComponent(nt.B),this.clearAndResetCachedContainer(this.gameRenderCache);this.opaque.addChild(new et.C(this.prodigyGame,0,0,this.game.width,this.game.height,st._.Tiled_sprites_json,"load")).inputEnabled=!0,Z.q.instance.prodigy.open.menuLayer=this.menus,Z.q.instance.prodigy.open.menusGameObject=this._menus,Z.q.instance.prodigy.effects.setSource(this),super.preload(),this.initListeners();Z.q.instance.prodigy.gameContainer.get("774-4659").startInactiveTimer();const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;!this._disableConsentBanner&&K.hasCompletedTutorial()&&this.showParentalConsentBanner(this._consentUiLayer)}triggerElementClick(q){if(this.callFunctionOrSignal(q,"onDown"),this.callFunctionOrSignal(q,"onInputDown"),this.callFunctionOrSignal(q,"onUp"),this.callFunctionOrSignal(q,"onInputUp"),this.callFunctionOrSignal(q,"onClick"),q instanceof tt.l){const K=q;this.callFunctionOrSignal(K,"onSelected"),K.setSelected(!K.isSelected())}}callFunctionOrSignal(q,K){Q.Aq$.isDefined(q[K])&&(q[K].dispatch?q[K].dispatch():q[K]instanceof Function&&q[K]())}create(q){super.create(),this.screenSetup(),this.complete=!0}fadeIn(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.fadeInSet){const q=this.prodigyGame.add.tween(this.opaque,this).to({alpha:0},1e3,Q.GS3.Quadratic.Out).start();yield q.onTweenComplete.asPromise().catch((q=>Q.VyI.log("Fading in cancelled before completion",Q.$bb.Warning)))}else this.opaque.visible=!1}))}fadeOut(q,K){if(this.opaque&&(this.opaque.visible=!0),Z.q.instance.prodigy.notifications.notificationPlayed(),q){this.prodigyGame.add.tween(this.opaque,this).to({alpha:1},1e3,Q.GS3.Quadratic.Out).start().onTweenComplete.add(K)}else K()}fadeOutCachedContainer(q){if(!this.gameRenderCache.visible)return;this.prodigyGame.add.tween(this.gameRenderCache,this).to({alpha:0},100,Q.GS3.Quadratic.Out).start().onTweenComplete.add(this.clearAndResetCachedContainer.bind(this,q))}clearAndResetCachedContainer(q){q.filters=null,q.visible=!1,q.removeChildren()}setUpModalTransition(q,K){var z,Y;this.clearAndResetCachedContainer(q);const J=Z.q.instance.game.renderer;if(null===this._modalFilters){const q=new X.filters.BlurFilter;this._modalFilters=[q]}const tt=X.RenderTexture.create({width:Z.q.instance.game.width,height:Z.q.instance.game.height});null===this._modalRenderTexture&&(this._modalRenderTexture=X.RenderTexture.create({width:Z.q.instance.game.width,height:Z.q.instance.game.height}));const et={renderTexture:tt,clear:!0,transform:null,skipUpdateTransform:!1},it=Object.assign(Object.assign({},et),{clear:!1}),st=Object.assign(Object.assign({},et),{renderTexture:this._modalRenderTexture});J.render(this.background,et),J.render(this.content,it),J.render(this.foreground,it),K&&J.render(this.menus,it);const nt=null===(Y=null===(z=this.menuBar)||void 0===z?void 0:z.findComponent(Q.y4o))||void 0===Y?void 0:Y.getRootContainer();nt&&J.render(nt,it);const at=new X.Container;at.addChild(new X.Sprite(tt)),at.filters=this._modalFilters,J.render(at,st),at.destroy(),q.addChild(new X.Sprite(this._modalRenderTexture)),q.alpha=1,q.visible=!0}bitmapCacheContainer(q,K,z){var Y,X;const Z=null!=K?K:this.gameRenderCache;q?this.setUpModalTransition(Z,z):this.fadeOutCachedContainer(Z),this.background.visible=!q,this.content.visible=!q,this.foreground.visible=!q;const J=null===(X=null===(Y=this.menuBar)||void 0===Y?void 0:Y.findComponent(Q.y4o))||void 0===X?void 0:X.getRootContainer();J&&(J.alpha=q?0:1)}start(){this.opaque.visible=!1}update(){super.update(),this.complete&&(this.screenUpdate(),this._currentScene.update())}screenSetup(){this.start()}screenUpdate(){Z.q.instance.prodigy.update()}showMessage(q,K){Q.Aq$.isDefined(this.msg)||(this.msg=new ht.Y(this.prodigyGame,this.overlay,140,10)),this.msg.setMsg(q,K)}enableOverlay(q=.5){Q.Aq$.isDefined(this.rearOverlay)&&(this.rearOverlay.visible=!1),this.rearOverlay=this.uiLayer.addChild(Z.q.instance.prodigy.create.sprite(-10,-10,st._.General_core_json,"overlay-small")),this.rearOverlay.width=1300,this.rearOverlay.height=740,this.rearOverlay.alpha=q,this.rearOverlay.inputEnabled=!0,this.prodigyGame.add.tween(this.rearOverlay,this).from({alpha:0},500,Q.GS3.Linear.None,!0)}disableOverlay(q){if(Q.Aq$.isDefined(this.rearOverlay)){const K=this.prodigyGame.add.tween(this.rearOverlay,this).to({alpha:0},500,Q.GS3.Linear.None);K.onTweenComplete.add((()=>{this.rearOverlay.visible=!1,Q.Aq$.isDefined(q)&&q()}),this),K.start()}}addPostFilter(q){Q.VyI.log("Post filters disabled",Q.$bb.Verbose)}removePostFilter(q){rt.pF.isDeprecatedIOS()||(this.removePostFilterFromLayer(this.foreground,q),this.removePostFilterFromLayer(this.background,q),this.removePostFilterFromLayer(this.content,q))}addPostFilterToLayer(q,K){var z;null!==(z=q.filters)&&void 0!==z||(q.filters=[]),q.filters.push(K)}removePostFilterFromLayer(q,K){if(!q.filters)return;const z=q.filters.indexOf(K);z>=0&&q.filters.splice(z,1)}}},21134:(q,K,z)=>{"use strict";z.d(K,{Y:()=>Z});var Y=z(62459),Q=z(35120),X=z(98623);class Z extends X.H{constructor(q,K,z,Y){super(q,K),this.ID=0,this.text=null,this.x=z,this.y=Y,this.text=Q.q.instance.prodigy.create.font(this,0,5)}setMsg(q,K){this.visible=!0,this.ID++,this.alpha=0,this.game.add.tween(this,this).to({alpha:1},400,Y.GS3.Quadratic.Out).start(),this.text.setText(q);this.game.time.events.addTimer(K,(q=>{q===this.ID&&(this.visible=!1)}).bind(this,this.ID),this)}}},77302:(q,K,z)=>{"use strict";z.d(K,{S:()=>Gt});var Y=z(8674);const Q=window.prodigyExperiments;var X=z(62459),Z=z(99625),J=z(40295),tt=z(35120),et=z(34829),it=z(7351),st=z(73722),nt=z(80974),at=(z(45373),z(88022)),rt=z(51742),ot=z(39324),ht=z(95066),ct=z(36525),dt=z(90633),lt=z(15821);class ut{constructor(q,K){this._inner=q,this._manager=K}isOn(q){return this._inner.isOn(q)&&function(q){if(!lt.A.isDefined(q))return!1;if("object"==typeof q&&"enabled"in q&&"boolean"==typeof q.enabled)return q.enabled;return!!q}(this._manager.evaluate(q))}isInExperiment(q){return this._inner.isInExperiment(q)}getFeatureValue(q,K){const z=this._manager.evaluate(q);return!lt.A.isDefined(z)&<.A.isDefined(K)?K:z}loadFeatures(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._inner.loadFeatures(q)}))}setAttributes(q){return this._inner.setAttributes(q)}setAttribute(q,K){return this._inner.setAttribute(q,K)}getVariation(q){return this._inner.getVariation(q)}evalFeature(q){const K=this._inner.evalFeature(q),{value:z}=K,Q=(0,Y.Tt)(K,["value"]);return Object.assign(Object.assign({},Q),{value:this._manager.evaluate(q)})}forceVariation(q,K){return this._inner.forceVariation(q,K)}getAttributes(){return this._inner.getAttributes()}destroy(){return this._inner.destroy()}}var ft=z(77601);class bt{constructor(q){this._initialExperimentVariations=new Map,this._inner=q}setIsTestAccount(q,K=!1){if(K){const K=this.getAttributes();this.setAttributes(Object.assign(Object.assign({},K),{is_test_account:q}))}this.refreshExperimentVariations()}isOn(q){return this._inner.isOn(q)}isInExperiment(q){return this._inner.isInExperiment(q)}getFeatureValue(q){const K=this._inner.evalFeature(q);return this.initExperimentGroup(q,K),this._inner.evalFeature(q).value}loadFeatures(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._inner.loadFeatures(q)}))}setAttributes(q){this._inner.setAttributes(q)}setAttribute(q,K){this._inner.setAttribute(q,K)}getVariation(q){return this._inner.getVariation(q)}evalFeature(q){const K=this._inner.evalFeature(q);return this.initExperimentGroup(q,K),K}initExperimentGroup(q,K){var z,Y;if("experiment"!==K.source||!K.experiment||!K.experimentResult)return;if(1===(null===(z=K.experiment.weights)||void 0===z?void 0:z.filter((q=>1===q)).length))return;if(this._initialExperimentVariations.has(q)||this._initialExperimentVariations.set(q,K.experimentResult.variationId),!(null===(Y=this.getAttributes())||void 0===Y?void 0:Y.is_test_account))return;0!==K.experimentResult.variationId&&(console.log(`Feature "${q}" in experiment "${K.experiment.key}" was changed from variation ${K.experimentResult.variationId}, to control variation 0`),this.forceVariation(K.experiment.key,0))}forceVariation(q,K){this._inner.forceVariation(q,K)}getAttributes(){return this._inner.getAttributes()}destroy(){this._inner.destroy()}refreshExperimentVariations(){this._initialExperimentVariations.forEach(((q,K)=>{var z,Y;if(null===(z=this.getAttributes())||void 0===z?void 0:z.is_test_account){const q=this.evalFeature(K);console.log(`Set feature "${K}" in experiment "${null===(Y=q.experiment)||void 0===Y?void 0:Y.key}" to control variation`)}else{const z=this._inner.evalFeature(K);z.experiment?(this.forceVariation(z.experiment.key,q),console.log(`Reset feature "${K}" in experiment "${z.experiment.key}" to initial variation ${q}`)):console.log(`Experiment for feature "${K}" not found; cannot reset to initial variation ${q}`)}}))}}var pt=z(13956),vt=z(29738),gt=z(23029);class mt{constructor(q,K){this._overrides={},this._inner=q,this.ot=K}isOn(q){return this._inner.isOn(q)}isInExperiment(q){return this._inner.isInExperiment(q)}getFeatureValue(q,K){return this.applyOverride(q,this._inner.getFeatureValue(q,K))}loadFeatures(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const[K]=yield Promise.all([this.ot.loadOverrides(this.getAttributes()),this._inner.loadFeatures(q)]);this._overrides=K}))}setAttributes(q){this._inner.setAttributes(q)}setAttribute(q,K){this._inner.setAttribute(q,K)}getVariation(q){return this._inner.getVariation(q)}evalFeature(q){const K=this._inner.evalFeature(q);return Object.assign(Object.assign({},K),{value:this.applyOverride(q,K.value)})}forceVariation(q,K){this._inner.forceVariation(q,K)}getAttributes(){return this._inner.getAttributes()}destroy(){this._inner.destroy()}applyOverride(q,K){const z=this._overrides[q];return X.Aq$.isDefined(z)?z:K}}var yt=z(93867),_t=z(73797),Et=z(91160),wt=z(10670),Tt=z(95891);let St=null;class At{constructor(q){Tt.isEmpty(q)&&X.VyI.log(`Expected the education question interface but got ${q} instead!`,X.$bb.Error),this.learningEngineManager=q.LearningEngineManager}static getInstance(q){const K=!Tt.isEmpty(q),z=Tt.isEmpty(window.QI||q),Y=Tt.isEmpty(St),Q=q||window.QI||{};return Tt.isEmpty(Q.LearningEngineManager)?null:z&&Y&&!K?(X.VyI.log("Expected to find the education question interface but did not!",X.$bb.Error),null):((Y||K)&&(St=new At(Q)),St)}init(q){const K=q.identityProviderFunction();Tt.isEmpty(K)&&X.VyI.log(`Expected an identity object but got ${K}`,X.$bb.Error);const z=K.accessToken;this.initEducationNetworkManager(z)||X.VyI.log("The initialization of the Learning Engine Network Manager Failed",X.$bb.Error),this.initEducationGamePlayerManager(q)||X.VyI.log("The initialization of the Learning Engine Player Context Manager Failed",X.$bb.Error)}getEducationStudentContextManagerInstance(){return this.learningEngineManager.getEducationStudentContextManagerInstance()}getGamePlayerContextManagerInstance(){return this.learningEngineManager.getGamePlayerContextManagerInstance()}initEducationNetworkManager(q){return this.learningEngineManager.getNetworkManagerInstance().initWithParams({authAccessToken:q}),!0}initEducationGamePlayerManager(q){const K=Tt.isFunction(q.identityProviderFunction)?q.identityProviderFunction():{},z=Tt.isFunction(q.playerProviderFunction)?q.playerProviderFunction:()=>null,Y=K.uuid?K.uuid:null;return this.learningEngineManager.getGamePlayerContextManagerInstance().setContext((()=>{const q=z(),Q=q.getPlayerData(),X=tt.q.instance.prodigy.gameContainer.get("304-25b9"),Z=q.hasMembership();return{userId:Y,deprecatedUserId:q.userID,playerParents:q.playerParents,playerTeachers:q.playerTeachers,parentEmail:q.parentEmail,registerDate:q.registerDate.toDateString(),owners:q.owners,classIDs:q.classIDs,membership:Z?{start:q.memberStartDate,end:q.memberEndDate}:null,playerClass:q.getPlayerClass()?q.getPlayerClass():null,playerDevicePlatform:q.userDataPlatform,playerPlayLocation:q.locationSelectionType,goalId:q.goalId,playerSessionId:X.getSessionToken(),identityProviderLabel:K.identityProvider,optionalData:{playerMetadata:Tt.cloneDeep(Q)}}})),!0}}var Ct=z(48813),Ot=z(29887),It=z(5018),Dt=z(98252),Rt=z(30226),Pt=z(72937),Mt=z(325),Nt=z(45716),xt=z(48417),Lt=z(76546);class kt extends Lt.D{loadOverrides(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(xt.D.Experiment.LoadOverrides,{growthbookUserAttributes:q},!0)}))}}var Bt=z(23082),Ut=z(20705);class Ft extends Error{constructor(q,K,z,Y,Q,X,Z){super(Y),this.errorID=q,this.codeMap=K,this.debugMessage=z,this.error=Y,this.code=Q,this.innerError=X,this.userFacingMessage=Z,Object.setPrototypeOf(this,Ft.prototype)}static make(q){var K;return new Ft(q.errorID,q.codeMap,q.debugMessage,null!==(K=q.error)&&void 0!==K?K:X.RQr.stringify(q.innerError),q.code,q.innerError,q.userFacingMessage)}}class Gt extends Ut.f{constructor(){super("login","login",[at._.Ui_shared_json,at._.Ui_buttons_json,at._.Ui_store_json,at._.Ui_registration_json]),this._loadingSteps=28,this._loadingStepWeight=[3,6,7,9,12,20,23,26,28],this._loadingStepIndex=0,this._baseLoadingBarPercent=.75,this._timer=null,this._loadingStartTime=null,this._loadingEndTime=null,this._loginStartTimeMS=null,this._loginTimeMS=null,this._servers=[],this._technicalMetricsManager=null,this.UNITED_STATES_ISO="US",this._loadingBarPercent=0,this._technicalMetricsManager=tt.q.instance.prodigy.gameContainer.get("a92-c640"),this.showMenu=!1,this._loadingStartTime=window.loadStartTime,this._disableConsentBanner=!0,this.startLogin()}create(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.Splash),this.prodigyGame.broadcaster.addAppListener(_t.lT.LoginError,this.onError.bind(this),this),q.startTracing(Et.u.SplashCreate),this.prepLogin();try{Dt.pF.isNativeApp()&&Dt.pF.appType()===Dt.uC.IOS_APP&&webkit.messageHandlers.setGameVisible.postMessage(0)}catch(e){}super.create(),q.endTracing(Et.u.SplashCreate)}prepLogin(){const q=new it.W(this.prodigyGame);tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").initialize(q)}screenSetup(){this.setLoadingBarProgress("Setting up screen"),tt.q.instance.prodigy.load.assets([rt.c.Sfx_ui,rt.c.Sfx_registration]),X.VyI.log(`Expo Release Channel: ${window.expoReleaseChannel}`,X.$bb.Verbose),super.screenSetup(),X.Aq$.isDefined(this._loadingEndTime)||(this._loadingEndTime=Date.now(),this._technicalMetricsManager.timeToPlayMS=this._loadingEndTime-this._loadingStartTime),Gt._firstLogin&&tt.q.instance.prodigy.gameContainer.get("577-9956").getData().then((([q,K])=>{q&&X.VyI.log(`Error fetching geolocation information: ${q.getErrorMessage()}`,X.$bb.Error),setTimeout((()=>{const q=this._loadingEndTime-this._loadingStartTime;X.VyI.log(`TTI: ${q}ms`,X.$bb.Verbose),Gt._firstLogin=!1}),100)})).catch(X.RQr.createHandler("Error sending first login information")),this.loadGame().catch(this.onError.bind(this))}loadQuestionRenderer(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise(((K,z)=>{const Y=document.createElement("script");Y.type="text/javascript",Y.src=q,Y.async=!1,Y.onload=()=>{K()},Y.onerror=q=>{q instanceof Error?z(q):z("string"==typeof q?new Error(q):new Error(JSON.stringify(q)))},document.head.appendChild(Y)}))}))}loadQuestionInterface(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise(((K,z)=>{const Y=document.createElement("script");Y.type="text/javascript",Y.src=q,Y.async=!1,Y.onload=()=>{window.ELA_QI&&(window.QI=window.ELA_QI),window.QI?K():z(new Error("Question Interface not found on window"))},Y.onerror=q=>{q instanceof Error?z(q):z("string"==typeof q?new Error(q):new Error(JSON.stringify(q)))},document.head.appendChild(Y)}))}))}loadQI(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.SplashLoadQI);const K=tt.q.instance.prodigy.gameContainer.get("8f9-f0fc").getSubject();X.VyI.log(`Using subject '${K}' for QI session.`,X.$bb.Info);const z=K===Mt.Q.Science?"science":"math";q.startTracing(Et.u.SplashLoadQIEducationStatus);const{questionInterfaceURL:Q,questionRendererURL:Z}=window.SW.Load.getEducationStatus(z);q.endTracing(Et.u.SplashLoadQIEducationStatus),Q||this.throwEducationError(`Splash Screen: Error showing education because questionInterfaceURL (${Q}) not provided.`,window.SW.Errors.ERROR_CODE_QI);const J=Date.now();this._loginTimeMS=null!==this._loginStartTimeMS?J-this._loginStartTimeMS:0,X.VyI.log(`Login load time: ${this._loginTimeMS}ms`,X.$bb.Verbose),this.setLoadingBarProgress("Loading education"),q.startTracing(Et.u.SplashLoadQILoadQuestion);try{Z&&(yield X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return this.loadQuestionRenderer(Z)})))))}catch(it){X.RQr.logError(it,"Splash Screen: Unable to load Question Renderer"),this.throwEducationError("Splash Screen: Unable to load Question Renderer",window.SW.Errors.ERROR_CODE_EDUCATION_QUESTION_RENDERER)}q.endTracing(Et.u.SplashLoadQILoadQuestion),this.setLoadingBarProgress("Loading QI"),q.startTracing(Et.u.SplashLoadQILoadQuestionInterface);try{yield X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return this.loadQuestionInterface(Q)}))))}catch(it){X.RQr.logError(it,"Splash Screen: Unable to load Question Interface");const q=X.RQr.stringify(it);this.throwEducationError(`Splash Screen: Unable to load Question Interface: ${q}`,window.SW.Errors.ERROR_CODE_EDUCATION_QUESTION_INTERFACE)}q.endTracing(Et.u.SplashLoadQILoadQuestionInterface);const et=Date.now()-J;X.VyI.log(`Education load time: ${et}ms`,X.$bb.Verbose),null!==this._technicalMetricsManager.timeToPlayMS&&this._technicalMetricsManager.timeToPlayMS>0&&(this._technicalMetricsManager.timeToPlayMS+=et+this._loginTimeMS),q.endTracing(Et.u.SplashLoadQI)}))}loadGame(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K;const z=tt.q.instance.prodigy.gameContainer.get("088-1d4c");z.startTracing(Et.u.SplashLoadGame);const Y=this.loadBundledData(),Q=yield this._loginDataPromise,Z=this.loadQI();yield this.initIap(),yield this.initializeMembershipPurchases(),yield this.updateFeatureAccess(),yield this.getCharacter(Q),yield Y,this._endgameDataLoad=this.fetchEndgameQuestData(),yield this.initFeatureProvider(),vt.O.tryApplyLocaleOverrideFromFeatureProvider(),yield this.setupEducationData(Q.goalId),this.initParentalConsentService(),yield this.initSegment(),yield this.setUpFeatureProvider(),this._gameNativeAppNotificationProvider.triggerNotification({triggerType:ot.$P.AppStart}),z.startTracing(Et.u.SplashTitans),yield tt.q.instance.prodigy.titansNetworkHandler.getTitans(),z.endTracing(Et.u.SplashTitans),z.startTracing(Et.u.QuestManagerHubSetup);const J=tt.q.instance.prodigy.gameContainer.get("b37-c775"),et={sucess:!0};J.init().catch((q=>{X.RQr.logError(q,"Error setting up quest manager hub"),et.sucess=!1,et.error=X.RQr.stringify(q)})).finally((()=>{et.quest_managers_set_up=Array.from(J.questManagerMap.keys()),z.endTracing(Et.u.QuestManagerHubSetup,et)})),yield tt.q.instance.prodigy.gameContainer.get("9cf-c09f").refreshPetGear(),yield Z,yield this.finishLoad(),tt.q.instance.prodigy.gameContainer.get("bec-c6b4").postProcessPets();const it=tt.q.instance.prodigy.gameContainer.get("20f-5f67");tt.q.instance.prodigy.gameContainer.get("2f0-c49e").queueUncollectedTransactions(...null!==(K=null===(q=Q.uncollectedOTPTransactions)||void 0===q?void 0:q.map((q=>Object.assign(Object.assign({},q),{analyticsTransactionID:it.purchase.getFunnelID()}))))&&void 0!==K?K:[]),tt.q.instance.prodigy.gameContainer.get("20f-5f67").connection.sendGameLoadingEndedEvent(this._loadingStartTime,!0,this._loadingBarPercent),tt.q.instance.prodigy.gameContainer.get("20f-5f67").session.sendSessionStartedEvent(),z.endTracing(Et.u.SplashLoadGame)}))}loadBundledData(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K;try{yield X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){yield gt.R.initialize()}))))}catch(z){throw Ft.make({errorID:null===(K=null===(q=window.SW)||void 0===q?void 0:q.Errors)||void 0===K?void 0:K.ERROR_CODE_DATA_BUNDLE,codeMap:Gt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: data bundle load failed",innerError:z})}}))}startLogin(){this._loginDataPromise=this.login()}login(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.SplashLogin);try{let K;for(;!K;)yield X.Egh.timeout(0),K=window.SW.Load.userInfo?JSON.parse(window.SW.Load.userInfo()):null;const z=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let Q;switch(z.username=K.name,K.identity_provider){case"clever":Q="clever";break;default:Q="prodigy"}if(z.userDataPlatform=Q,!K)throw Ft.make({errorID:window.SW.Errors.ERROR_CODE_NO_USER,codeMap:Gt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: login failed because no identity user found"});const Z=tt.q.instance.prodigy.gameContainer.get("774-4659");return yield X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise(((Y,Q)=>{Z.login(K.uuid,K.accessToken,K.name,K.email,z,(K=>{q.endTracing(Et.u.SplashLogin,{login_success:!0}),Y(K)}),((K,z)=>{q.endTracing(Et.u.SplashLogin,{login_error:!0,error_code:z});const Y=z===Gt.READ_ONLY_STATUS_CODE;Q(Ft.make({errorID:Y?window.SW.Errors.ERROR_CODE_READ_ONLY_CHARACTER:window.SW.Errors.ERROR_CODE_LOGIN_GAME_AUTH_API,codeMap:Gt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: login failed",error:K,code:z,userFacingMessage:Y?window.SW.Load.ERROR_DESCRIPTION_READ_ONLY_CHARACTER:void 0}))}))}))}))))}catch(e){throw this.isLoadError(e)?e:Ft.make({errorID:window.SW.Errors.ERROR_CODE_NO_USER,codeMap:Gt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: login failed",innerError:e})}}))}initIap(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.SplashIapInit),new st.V,q.endTracing(Et.u.SplashIapInit)}))}initializeMembershipPurchases(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z;if((Dt.pF.isNativeAndroidApp()||Dt.pF.isNativeIOSApp())&&Dt.pF.eligibleVersionForMobileMembershipPurchase()){const Y=tt.q.instance.prodigy.gameContainer.get("304-25b9");yield null===(z=null===(K=null===(q=window.SW)||void 0===q?void 0:q.MOBILE_MEMBERSHIP_PURCHASES)||void 0===K?void 0:K.initMobileMembershipPurchase)||void 0===z?void 0:z.call(K,Y.getUserID(),Y.getSessionToken()).then((()=>{X.VyI.log("Mobile membership purchase initialized",X.$bb.Info)})).catch(X.RQr.createHandler("Mobile membership purchase initialization failed"))}}))}updateFeatureAccess(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.SplashUpdateFeatureAccess);try{this.setLoadingBarProgress("Updating Character Feature Data");const q=tt.q.instance.prodigy.gameContainer.get("73f-58d1");yield X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return q.updateFeatureAccess()})))).then((()=>{}))}catch(e){throw q.endTracing(Et.u.SplashUpdateFeatureAccess),Ft.make({errorID:window.SW.Errors.ERROR_CODE_CHARACTER,codeMap:Gt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: initializeCharacter failed",innerError:e})}q.endTracing(Et.u.SplashUpdateFeatureAccess)}))}getCharacter(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=tt.q.instance.prodigy.gameContainer.get("088-1d4c");K.startTracing(Et.u.SplashCharacter),this.setLoadingBarProgress("Getting character");const z=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=tt.q.instance.prodigy.gameContainer.get("774-4659");return new Promise(((Q,X)=>{Y.getCharacter(q,z,(()=>{K.endTracing(Et.u.SplashCharacter,{character_loaded:!0}),Q()}),((q,z)=>{K.endTracing(Et.u.SplashCharacter,{character_error:!0,error_code:z}),X(Ft.make({errorID:window.SW.Errors.ERROR_CODE_CHARACTER,codeMap:Gt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: Get character failed",error:q,code:z}))})).catch((q=>{K.endTracing(Et.u.SplashCharacter,{character_error:!0}),X(Ft.make({errorID:window.SW.Errors.ERROR_CODE_CHARACTER,codeMap:Gt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: Get character failed",innerError:q}))}))}))}))}fetchEndgameQuestData(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.SplashFetchEndGameQuestData);try{yield yt.U.fetchProgress();const q=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;yt.U.progressData.step===J.B.NotStarted&&q.hasFoundAllKeystones()&&tt.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(1,wt.jT.AllGemsPreviouslyCollected,dt.B.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE)}catch(e){throw q.endTracing(Et.u.SplashFetchEndGameQuestData),Ft.make({errorID:window.SW.Errors.ERROR_CODE_SECURE_CHARACTER,codeMap:Gt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: fetchEndgameQuestData failed",innerError:e})}q.endTracing(Et.u.SplashFetchEndGameQuestData)}))}initFeatureProvider(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.SplashInitFeatureProvider);try{const q=tt.q.instance.prodigy.gameContainer,K=q.get("782-c308"),z=q.get("20f-5f67");let Z=window.gameEnvironmentVariables.experimentsClientKey;0;const J=Q.FeatureFactory.createFeatureProvider(Q.EFeatureProvider.growthBook,{apiHost:window.gameEnvironmentVariables.experimentsAPIHost,clientKey:Z,backgroundSync:!1,attributes:{id:K.userID.toString()}}),et=new mt(J,q.resolve(kt)),it=new bt(et),st=new ft.mq({contextBase:{get onMobileApp(){return Dt.pF.isNativeApp()},get isMember(){return q.get("782-c308").hasMembership()},get isSchoolHours(){return q.get("782-c308").isPlayingAtSchool()}},get:q=>it.evalFeature(q),activate(q){z.create.experimentVariationAssigned(q.experimentResult.featureId,q.experiment.key,q.experimentResult.key,et.getAttributes()).send()}}),nt=new ut(it,st);q.bind("9fe-5b45").toConstantValue(nt),q.bind("928-fc0f").toConstantValue(it),q.bind("927-20b7").toConstantValue(st),q.bind("785-5cf4").toConstantValue(new Ot.p(nt,z)),yield X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return nt.loadFeatures()}))))}catch(e){throw q.endTracing(Et.u.SplashInitFeatureProvider),Ft.make({errorID:window.SW.Errors.ERROR_CODE_EXPERIMENT_PROVIDER,codeMap:{0:"NETWORK_ERROR"},debugMessage:"Error initializing experiment provider",code:0,innerError:e})}q.endTracing(Et.u.SplashInitFeatureProvider)}))}setupEducationData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=tt.q.instance.prodigy.gameContainer.get("088-1d4c");K.startTracing(Et.u.SplashEducation);try{this.setLoadingBarProgress("Getting curriculum and grade");const z=tt.q.instance.prodigy.gameContainer,Q=z.get("ad2-c5b2").player,Z=z.get("774-4659"),J=yield X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return Z.getCurriculumAndGrade(Q)})))),et={login_source:"prodigy",user_agent:navigator.userAgent};X.Aq$.isDefined(this._loadingStartTime)&&X.Aq$.isDefined(this._loadingEndTime)&&(et.load_time=this._loadingEndTime-this._loadingStartTime);const it=window.eventData.trackingCookie;it&&(et.identity_track_id=it);const st=Object.assign(Object.assign({},J),{goalId:q});X.Aq$.isDefined(Q.primaryParentID)&&(et.parentID=Q.primaryParentID),Q.onEducationLoaded(st),K.endTracing(Et.u.SplashEducation,{education_loaded:!0})}catch(e){throw K.endTracing(Et.u.SplashEducation,{education_error:!0}),Ft.make({errorID:window.SW.Errors.ERROR_CODE_EDUCATION_API,codeMap:Gt.SKILLS_ERROR_KEYS,debugMessage:"Splash Screen: Load skills failed",innerError:e})}}))}static makeLoadSkillsError(q,K="Splash Screen: Load skills failed"){return Ft.make({errorID:window.SW.Errors.ERROR_CODE_EDUCATION_API,codeMap:Gt.SKILLS_ERROR_KEYS,debugMessage:K,innerError:q})}initParentalConsentService(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.SplashParentalConsentService),tt.q.instance.prodigy.gameContainer.get("29b-61c6"),q.endTracing(Et.u.SplashParentalConsentService)}initSegment(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.SplashSegment);const K=tt.q.instance.prodigy.gameContainer,z=K.get("ad2-c5b2").player,Y=K.get("20f-5f67");yield Y.identify(),Y.connection.sendGameLoadingStartedEvent(),z.hasMembership()&&Y.purchase.hasSavedFunnelData()&&Y.purchase.sendFunnelComplete(),this.prodigyGame.broadcaster.broadcast(_t.bv.AnalyticsInitialized),q.endTracing(Et.u.SplashSegment,{segment_initialized:!0})}))}setUpFeatureProvider(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z,Q,Z,J;const it=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!(null==it?void 0:it.registerDate))throw Ft.make({errorID:window.SW.Errors.ERROR_CODE_MISSING_PLAYER_DATA,codeMap:{0:"NETWORK_ERROR"},debugMessage:"Missing player data from GraphQL",code:0});const st=tt.q.instance.prodigy.gameContainer.get("088-1d4c");try{st.startTracing(Et.u.SplashSetupFeatureProvider);const nt=tt.q.instance.prodigy.gameContainer,at=nt.get("9fe-5b45"),rt=tt.q.instance.prodigy.gameContainer.get("73f-58d1"),ot={id:it.userID.toString(),browser:X.o5U.getBrowserType(),device:X.o5U.getDeviceModel(),environment:Rt.J.getEnvironment(),is_native_app:Dt.pF.isNativeApp(),locale:vt.O.localeCode,registered_date:null!==(q=it.registerDate.getTime())&&void 0!==q?q:(new Date).getTime(),has_started:X.Aq$.isDefined(null===(K=it.data)||void 0===K?void 0:K.startDate),client_version:et.s.get("GameConstants.Build.VERSION"),is_member:it.hasMembership(),can_upgrade_membership:(yield it.getMembershipUpsellData()).upgradeOptions.length>0,member_features:rt.data.features,is_test_account:null===(z=it.data)||void 0===z?void 0:z.isTestAccount,experiment_eligibility:it.data.experimentEligibilityList};nt.get("928-fc0f").setIsTestAccount(!0===ot.is_test_account);const[,ht]=yield nt.get("577-9956").getData();it.geolocationData=ht,(null===(Q=ht.country)||void 0===Q?void 0:Q.name)&&(ot.country=ht.country.name),(null===(Z=ht.country)||void 0===Z?void 0:Z.iso_code)===this.UNITED_STATES_ISO&&(null===(J=ht.subdivisions[0])||void 0===J?void 0:J.iso_code)?ot.usState=ht.subdivisions[0].iso_code:ot.usState="",at.setAttributes(ot),yield X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return at.loadFeatures()})))),Ct.T.sendDecisionEvents(),Ct.T.forceExperimentVariation(),yield X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return Ct.T.mergeUserExperimentAssetData(it.userID.toString())})))),this._packageFeatureRequirementLoad=It.G.loadFeatures(),st.endTracing(Et.u.SplashSetupFeatureProvider,{feature_provider_setup:!0})}catch(e){throw st.endTracing(Et.u.SplashSetupFeatureProvider,{feature_provider_error:!0}),Ft.make({errorID:window.SW.Errors.ERROR_CODE_EXPERIMENT_PROVIDER,codeMap:{0:"NETWORK_ERROR"},debugMessage:"Error initializing experiment provider",code:0,innerError:e})}}))}finishLoad(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this.loadWorldList();yield Promise.all([q,tt.q.instance.prodigy.skin.applyFestival().then((()=>this.prodigyGame.broadcaster.broadcast(_t.bv.FestivalInitialized))),this._packageFeatureRequirementLoad,this._endgameDataLoad]),(yield q)()}))}loadWorldList(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=tt.q.instance.prodigy.gameContainer.get("088-1d4c");q.startTracing(Et.u.SplashWorldList),this.setLoadingBarProgress("Getting worlds");const K=tt.q.instance.prodigy.gameContainer;const z=K.get("774-4659"),Y=new X.bnh;z.getWorldList(Y.resolve,(()=>Y.resolve(null))).catch((q=>{X.RQr.createHandler("Error getting world list")(q),Y.resolve(null)})),this._servers=yield Y,q.endTracing(Et.u.SplashWorldList,{worlds_loaded:!0});const Q=K.get("ad2-c5b2").player,Z=Q.data,J=!X.Aq$.isDefined(Q.curriculumTreeID)||!X.Aq$.isDefined(Q.educationData.curriculumTreeID),et=!X.Aq$.isDefined(Z.school)||""===Z.school,it=!Q.hasGrade||J;return q.assignExtraDataToTrace(Et.u.Splash,{requires_user_setup:it||et}),window.QI&&window.SW.Load.userInfo&&this.initializeEducationLearningEngine(window.QI,JSON.parse(window.SW.Load.userInfo())),delete window.SW.Load.userInfo,()=>{it?(Q.classIDs=[],this.setLoadingBarProgress("Starting registration"),q.startTracing(Et.u.SplashRegistrationMenu),tt.q.instance.prodigy.open.startRegistration((()=>{q.endTracing(Et.u.SplashRegistrationMenu),et?(this.setLoadingBarProgress("Starting character creation"),this.loadCharacterCreateScreen()):(this.setLoadingBarProgress("Starting character selection"),this.loadCharacterSelectScreen())}),void 0,!0,!et)):this.initializeEducation(et).catch((q=>{var K;null===(K=tt.q.instance.prodigy.game.state.getCurrentState())||void 0===K||K.onError(q)}))}}))}initializeEducation(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=tt.q.instance.prodigy.gameContainer.get("088-1d4c");K.startTracing(Et.u.SplashPlayerEducationInit),this.setLoadingBarProgress("Loading skills"),X.Egh.autoRetry((()=>(0,Y.sH)(this,void 0,void 0,(function*(){return tt.q.instance.prodigy.education.loadAndInitEducationData()})))).then((()=>{K.endTracing(Et.u.SplashPlayerEducationInit,{success:!0}),q?(this.setLoadingBarProgress("Starting character creation"),this.loadCharacterCreateScreen()):(this.setLoadingBarProgress("Starting character selection"),this.loadCharacterSelectScreen())})).catch((q=>{throw K.endTracing(Et.u.SplashPlayerEducationInit,{success:!1}),Gt.makeLoadSkillsError(q)}))}))}loadCharacterCreateScreen(){this.loadInitialScreenPrefabScene([Z.l.CharacterCreateScreen])}loadCharacterSelectScreen(){this.loadInitialScreenPrefabScene([Z.l.CharSelectScreen])}loadInitialScreenPrefabScene(q){const K=tt.q.instance.prodigy.gameContainer.get("088-1d4c");K.startTracing(Et.u.SplashPrefabRequest);const z={requested_prefabs:q.join(",")},Y=q.includes(Z.l.CharacterCreateScreen),Q=q.includes(Z.l.CharSelectScreen);Y?z.screen_type="character_creation":Q&&(z.screen_type="character_selection");const X=tt.q.instance.game.state.states.get(Bt.G.Loading);X&&(X.data.target=Bt.G.PrefabScene),tt.q.instance.prodigy.load.assets([at._.General_core_2_json,at._.General_icons_json,at._.Ui_common_neutral_json,at._.Font_button_json,at._.Font_general_json],(()=>{z.assets_loaded=!0,tt.q.instance.prodigy.startPrefabScene(q,{servers:this._servers,hideParentalConsentBanner:!0}),z.prefab_scene_started=!0,K.endTracing(Et.u.SplashPrefabRequest,z)}))}autoLoginSelectWorld(){tt.q.instance.prodigy.open.serverSelectMode(new nt.H(this._servers,(()=>{window.hideGameLoader(),tt.q.instance.prodigy.loading(!1),tt.q.instance.prodigy.world.enter().catch(X.RQr.createHandler("Error entering world"))}),null,null))}initializeEducationLearningEngine(q,K){const z=At.getInstance(q);if(!z)return;const Y={identityProviderFunction:()=>K,playerProviderFunction:()=>tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player};z.init(Y)}onError(q){if(this.isLoadError(q)){const{debugMessage:K,codeMap:z,errorID:Y,error:Q,code:Z,innerError:J,userFacingMessage:et}=q,it=`Login: onError: ${Q}, error code[${Z}], debugMessage: ${K}`;X.VyI.log(it,X.$bb.Error),this._loginStartTimeMS=null;const st=tt.q.instance.prodigy.gameContainer.get("774-4659").getErrorMessage(Z,z)||"Unknown error";tt.q.instance.prodigy.gameContainer.get("20f-5f67").connection.sendGameLoadingEndedEvent(this._loadingStartTime,!1,this._loadingBarPercent);const nt=new ct.i;nt.setKey(`prodigy_game.game_loading_error_${Y}`),nt.setValue(1),tt.q.instance.prodigy.gameContainer.get("ce3-6d33").logStat(nt,ht.d.Increment),Pt.u.showLoaderIfHidden();const at=(null!=et?et:st).trim();window.SW.Load.setErrorScreen(K,void 0,at,Y)}else this.isError(q)?(X.VyI.log(`SplashScreen.onError: Error: ${q.message}`,X.$bb.Error),window.SW.Load.setErrorScreen(q.stack,q.name,q.message,void 0)):(X.VyI.log(`SplashScreen.onError: Unknown error type: ${JSON.stringify(null!=q?q:{})}`,X.$bb.Error),window.SW.Load.setErrorScreen(void 0,void 0,void 0,void 0))}isLoadError(q){return q instanceof Ft}isError(q){return q instanceof Error}shutdown(){this.clear(),this.prodigyGame.broadcaster.removeAppListener(_t.lT.LoginError,this);tt.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(Et.u.Splash,{completed:!1}),super.shutdown()}clear(){null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null)}throwEducationError(q,K){throw this._loginStartTimeMS=null,Ft.make({errorID:K,codeMap:{500:"EDUCATION_NOT_LOADED"},debugMessage:q,error:"ERROR",code:500})}setLoadingBarProgress(q){this._loadingStepWeight.length<=this._loadingStepIndex&&(X.VyI.log("SplashScreen.setLoadingBarProgress; more steps than defined.",X.$bb.Warning),this._loadingStepIndex=this._loadingStepWeight.length-1),this._loadingBarPercent=100*(this._loadingStepWeight[this._loadingStepIndex++]/this._loadingSteps*(1-this._baseLoadingBarPercent)+this._baseLoadingBarPercent),window.updateGameLoaderProgress(this._loadingBarPercent,q)}}Gt._firstLogin=!0,Gt.LOGIN_ERROR_KEYS={200:Nt.l.AllGood,400:Nt.l.WrongUsernameOrPassword,401:Nt.l.WrongUsernameOrPassword,403:Nt.l.WrongUsernameOrPassword,408:Nt.l.CheckNetworkConnection,409:Nt.l.CheckNetworkConnection,502:Nt.l.NetworkOffline,503:Nt.l.NetworkOffline,500:Nt.l.NetworkOffline,0:Nt.l.NetworkOffline},Gt.SKILLS_ERROR_KEYS={0:"NETWORK_ERROR_SKILLS"},Gt.READ_ONLY_STATUS_CODE=13,(0,Y.Cg)([(0,pt.b)("9dc-186c"),(0,Y.Sn)("design:type",Object)],Gt.prototype,"_gameNativeAppNotificationProvider",void 0)},26022:(q,K,z)=>{"use strict";z.d(K,{b:()=>ve});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(99625),J=z(90633),tt=z(35120),et=z(98013),it=z(34829),st=z(48975),nt=z(10592),at=z(93867),rt=z(33359),ot=z(37155),ht=z(52322),ct=z(13367),dt=z(78703),lt=z(95798),ut=z(98623);class ft extends ut.H{constructor(q,K,z,Y,Q,X){super(q,K,z,Y),this.iceBlockSprite=null,this.iceBlockSprite=this.add(tt.q.instance.prodigy.create.sprite(0,0,X.atlas,X.tag)),this.iceBlockSprite.anchor.set(X.x,X.y);const Z=Math.floor(this.iceBlockSprite.width/Q.size),J=Math.floor((z-this.iceBlockSprite.width*X.x)/Q.size),et=Math.floor(this.iceBlockSprite.height/Q.size),it=Math.floor((Y-this.iceBlockSprite.height*X.y)/Q.size);for(let tt=J;tt=500&&(this.chestType="C")}}const ot=z.getState(this.chestID);Q.Aq$.isDefined(ot)&&0!==ot?(this.chestSprite=this.add(tt.q.instance.prodigy.create.sprite(0,0,X._.Tileset_core_json,`chest-${this.chestType}-2`)),this.chestSprite.inputEnabled=!1):(this.chestSprite=this.add(tt.q.instance.prodigy.create.sprite(0,0,X._.Tileset_core_json,`chest-${this.chestType}-1`)),this.chestSprite.inputEnabled=!0),this.chestSprite.events.onInputDown.add((()=>{this.clicked()}),this),this.chestSprite.x-=Math.floor(.5*this.chestSprite.width),this.chestSprite.y=-this.chestSprite.height;const ht=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(wt.J.shouldSuppressAd(ht)&&"C"===this.chestType){this.chestSprite.tint=3355443;const q=tt.q.instance.prodigy.create.sprite(0,.5*-this.chestSprite.height,X._.Ui_icons_json,"icon-medium-lockglow");q.anchor=new bt.Point(.5,.5),this.add(q)}this.path=et,this._segment.container.sendContainerDiscoveredEvent("A"===this.chestType?yt.ZF.WorldChest:yt.ZF.WorldMemberChest,this.chestID,this.chestSprite.x,this.chestSprite.y)}process(q){this.highlight(!1);const K=q.getState(this.chestID);Q.Aq$.isDefined(K)&&0!==K&&(this.chestSprite.inputEnabled=!1,this.chestSprite.frameName=`chest-${this.chestType}-2`);const z=q.getQuestState();if(!Q.Aq$.isDefined(z)||!Q.Aq$.isDefined(z.req))return;const Y=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;for(let Q=0;QY.backpack.hasItem(z.req.type,z.req.ID)&&this.highlight(!0,-80,-90)}}clicked(){this.path.findPath(this.user.x,this.user.y,this.x-20,this.y+20,!0).then((q=>{q&&this.user.setPath(q,this.collect.bind(this))})).catch(Q.RQr.createHandler("Unable to find path to chest"))}collect(){if(!this.user.evtProc&&Q.cj9.distance(this.user.x,this.user.y,this.x,this.y)>50)return;const q=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if("C"===this.chestType&&!q.hasMembership()){const K={conversionFunnelName:Tt.o.FunnelOpenMemberChestWorld,conversionFunnelMetadata:tt.q.instance.prodigy.world.getCurrentMap()},z=wt.J.showYouTubeMembershipAd(this.game,!0)?_t.R.Video:_t.R.Static;if(this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-World",category:"World",contentId:tt.q.instance.prodigy.world.getCurrentMap(),adType:z}),this._segment.container.sendContainerOpenedFailedEvent(yt.ZF.WorldMemberChest,this.chestID,Et.WE.MemberLocked,mt.N.OpenWorld),wt.J.shouldSuppressAd(q)){let q,K,z;q=this.x>640?.75:.25,this.y>360?(K=this.y+10,z=gt.i.UP):(K=this.y-this.chestSprite.height-10,z=gt.i.DOWN),tt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this.x,yPosition:K,arrowXRelPos:q,arrowDirection:z})}else tt.q.instance.prodigy.open.membershipInfo(null,K);return}if(Q.Aq$.isDefined(this._chestKey)&&0===q.backpack.hasItem(this._chestKey.type,this._chestKey.ID))return void tt.q.instance.prodigy.open.messageBoxPrefab({text:"CHEST_LOCKED_MESSAGE",textArgs:[this._chestKey.type,this._chestKey.ID]});"A"!==this.chestType&&"C"!==this.chestType||this._segment.container.sendContainerOpenedEvent("A"===this.chestType?yt.ZF.WorldChest:yt.ZF.WorldMemberChest,this.chestID,mt.N.OpenWorld),q.saveEnabled=!1,this.game.input.enabled=!1,this.chestSprite.inputEnabled=!1,this.user.evtProc=!0,tt.q.instance.prodigy.audio.playSFX(18,"whoosh");this.game.add.tween(this.chestSprite,this).to({x:"-=5"},50,Q.GS3.Linear.None).to({x:"+=10"},150,Q.GS3.Linear.None).to({x:"-=10"},150,Q.GS3.Linear.None).to({x:"+=5"},50,Q.GS3.Linear.None).to({y:"-=50"},200,Q.GS3.Quadratic.Out).to({y:"+=50"},200,Q.GS3.Quadratic.In).to({y:"-=20"},100,Q.GS3.Quadratic.Out).to({y:"+=20"},100,Q.GS3.Quadratic.In).start().onTweenComplete.add(this.openChest,this,1)}openChest(){tt.q.instance.prodigy.audio.playSFX(18,"dig"),tt.q.instance.prodigy.audio.playSFX(19,"item"),this.chestSprite.frameName=`chest-${this.chestType}-2`,this.game.input.enabled=!0,tt.q.instance.prodigy.open.gotItem(this.reward,(()=>{this.setOpenedState()}),null,"open-chest",void 0,void 0,{source_type:"B"!==this.chestType?"A"===this.chestType?pt.C.WorldChest:pt.C.WorldMemberChest:null})}setOpenedState(){const q=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.zone.setState(this.chestID,1),Q.Aq$.isDefined(this.key)&&q.backpack.consume(this._chestKey.type,this._chestKey.ID,1),this.user.evtProc=!1,q.saveEnabled=!0,this.callback()}}class At extends ut.H{constructor(q,K,z,Y,Q,Z,J,et,it=0){super(q,K,z,Y),this._overlayImg=null,this._overlayImg=this.add(tt.q.instance.prodigy.create.image(0,0,X._.General_core_json,"overlay-light")),this._overlayImg.width=Q,this._overlayImg.height=Z,this._overlayImg.inputEnabled=!0,this._overlayImg.alpha=it,this.onProcess=et,this.onClick=J,this._overlayImg.events.onInputDown.add(this.clicked.bind(this))}clicked(q,K){Q.Aq$.isDefined(this.onClick)&&this.onClick(this)}process(q,K){Q.Aq$.isDefined(this.onProcess)&&this.onProcess(q,K)}cleanup(){this._overlayImg&&(this._overlayImg.destroy(),this._overlayImg=null),this.onClick=null,this.onProcess=null}}var Ct=z(95891),Ot=z(73797);class It extends At{constructor(q,K,z,Y,Q,X,Z,J,tt,et){super(q,K,z,Y,Q,X,J,tt,et),this.moveToX=null,this.moveToY=null,this.moveToX=Ct.get(Z,"moveToX",z),this.moveToY=Ct.get(Z,"moveToY",Y),this.addPathingIconFunction=Ct.get(Z,"addPathingIconFunction",null)}clicked(q,K){super.clicked(q,K),this.game.broadcaster.broadcast(Ot.pm.MovePlayer,null,[this.moveToX,this.moveToY])&&(Q.Aq$.isDefined(this.addPathingIconFunction)?this.addPathingIconFunction(K.x,K.y):Q.VyI.log("ClickableMoveEvent.clicked - pathing was successful, but parent does not have addPathingIcon function. No pathing star shown.",Q.$bb.Error))}}class Dt extends ut.H{constructor(q,K,z,Y,X,Z,J,et,it){super(q,K,z,Y),this.user=null,this.path=null,this.ID=null,this.callback=null,this.collected=!1,this.allowCollect=!1,this.data=null,this.questState=null,this.user=X,this.path=Z,this.ID=J,this.callback=it,this.data=Q.Aq$.isDefined(et)?et:{range:30},Q.Aq$.isDefined(et.range)||(this.data.range=30),this.allowCollect=!1,this.visible=!1,this.highlight(!1);const st=this.add(tt.q.instance.prodigy.icon.createFromData(et,0,0,null,null,null,null,Ct.get(et,"showLoading",!0)));st.inputEnabled=!0,st.events.onInputDown.add(this.clicked.bind(this),this),st.x-=Math.floor(.5*st.width),st.y=-st.height}process(q){this.allowCollect=!1,this.visible=!1,this.highlight(!1);const K=q.getQuestState();if(Q.Aq$.isDefined(K)&&Q.Aq$.isDefined(K.req)&&(this.questState=K.state,1!==K.state[this.ID]&&("item"===K.req.type||"key"===K.req.type)&&K.req.ID===this.data.ID&&!this.collected)){this.visible=!0;const q=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;K.req.N>q.backpack.hasItem(K.req.type,K.req.ID)&&(this.allowCollect=!0,this.highlight(!0,-80,-90))}}clicked(){this.path.findPath(this.user.x,this.user.y,this.x,this.y,!0).then((q=>this.clickedCallback(q))).catch(Q.RQr.createHandler("Unable to find a path to the collectable"))}clickedCallback(q){q&&this.user.setPath(q,(()=>{this.collect()}))}collect(){if(!this.allowCollect||Q.cj9.distance(this.user.x,this.user.y,this.x,this.y)>this.data.range)return;const q=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.collected=!0,this.questState[this.ID]=1,q.state.updated=!0,tt.q.instance.prodigy.audio.playSFX(18,"dig"),q.backpack.add(this.data.type,this.data.ID),this.callback()}}const Rt=z(56942).Q.Spine_npc_firefly_json;class Pt extends At{constructor(q,K,z,Y,Q,X,Z,J,et=0){super(q,K,z,Y,Q,X,Z,J,et),this.moving=!1,this._dir=1,tt.q.instance.prodigy.load.assets([Rt],(()=>{this._spine=this.add(tt.q.instance.prodigy.create.spine(.5*Q,.5*X+40,Rt)),this.delay()}))}move(){if(this.game){this.moving=!0;const q=1080*Math.random()+100,K=520*Math.random()+100;qthis.x&&-1===this._dir&&(this._spine.scale.x*=-1,this._dir=1),this._spine.setAnimationByName(0,"walk",!0).mixDuration=.2,this._tween=this.game.add.tween(this,this,!0).to({x:q,y:K},2500,Q.GS3.Quadratic.InOut),this._tween.start(),this._tween.onTweenComplete.add(this.delay,this)}}delay(){if(this._spine.setAnimationByName(0,"idle",!0).mixDuration=.2,this.game){this.moving=!1;const q=tt.q.instance.prodigy.event.create();q.delay(3e3*Math.random()+2e3),q.function(this.move.bind(this)),q.start()}}cleanup(){this._spine&&(this._spine.destroy(),this._spine=null),this._tween&&(tt.q.instance.game.tweens.remove(this._tween),this._tween=null),super.cleanup()}}var Mt=z(79421);class Nt extends ut.H{constructor(q,K,z,Y,Q,Z,J,et,it,st){super(q,K,z,Y),this.ID=null,this.user=null,this.chestType=null,this.mods=null,this.zoneName="",this.path=null,this.sprite=null,this.zone=null,this.ID=J,this.user=Q,this.chestType=et,this.mods=it,this.zoneName=st,this.sprite=this.add(tt.q.instance.prodigy.create.animatedSprite(0,0,X._.Tileset_core_json,[`chest-${this.chestType}-1`,`chest-${this.chestType}-2`])),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add((()=>{this.clicked()}),this),this.sprite.x-=Math.floor(.5*this.sprite.width),this.sprite.y=-this.sprite.height,this.path=Z}process(q){this.zone=q,this.highlight(!1);const K=q.getState(this.ID);Q.Aq$.isDefined(K)&&0!==K&&(this.sprite.inputEnabled=!1,this.sprite.frameName=`chest-${this.chestType}-2`)}clicked(){this.path.findPath(this.user.x,this.user.y,this.x-20,this.y+20,!0).then((q=>{q&&this.user.setPath(q,(()=>{this.collect()}))})).catch(Q.RQr.createHandler("Unable to find path to mimic"))}collect(){if(!this.user.evtProc&&Q.cj9.distance(this.user.x,this.user.y,this.x,this.y)>50)return;tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.saveEnabled=!1,this.sprite.inputEnabled=!1,this.user.evtProc=!0,this.openChest()}openChest(){const q=tt.q.instance.prodigy.event.create();q.sound(18,"dig"),q.function(this.user.chat.bind(this.user,1)),q.delay(1e3),q.enableInput(!0),q.function(this.startMimicBattle.bind(this)),q.start()}startMimicBattle(){tt.q.instance.prodigy.battle.start(this.mods,this.afterBattle.bind(this,this.game,this.zoneName,this.x,this.y),this.afterBattle.bind(this,this.game,this.zoneName,this.x,this.y),null,this.zone.defaultOnFaint)}afterBattle(q,K,z,Y){tt.q.instance.prodigy.world.it(K,z-20,Y+20,null,{callback:this.zone.setState.bind(this.zone,this.ID,1)})}}var xt=z(59968);class Lt extends xt.R{constructor(q,K,z,Y,Z,J,et){super(q,K,et,null,z,Y),this._tag=Z,this.sprite=this.sprites.addChild(tt.q.instance.prodigy.create.sprite(0,0,Z,0,void 0,this.onTextureLoaded.bind(this))),this.sprite.anchor.set(.5,1),Q.Aq$.isDefined(J)&&(this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add((()=>{J(),this.sendNpcClickedEvent()}))),this.showName(),Z!==X._.Npc_sprite_slurpy_json&&Z!==X._.Npc_sprite_slime_guard_json||(this.nameText.GameObject.legacyTransform.y+=40)}animate(q="stand"){this.sprite.animations.play(q,void 0,!0)}onTextureLoaded(q){q&&(this._tag.indexOf("monster")>-1?(q.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0,!1),q.animations.add("stand",[8,9,10,11,12,13,14,15],10,!0,!1)):q.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0))}stand(){1!==this.mode&&(this.mode=1,this.animate("stand"))}walk(){0!==this.mode&&(this.mode=0,this.animate("walk"))}}class kt extends xt.R{constructor(q,K,z,Y,Z,J,et,it=!1){super(q,K,et,null,z,Y),this._fadeIn=it,this.alpha=it?0:this.alpha,this._body=this.add(tt.q.instance.prodigy.create.sprite(0,-60,X._.Npc_sprite_broccolina_json,"body_0",void 0,this.onBodyLoaded.bind(this))),this._head=this.add(tt.q.instance.prodigy.create.sprite(9,-108,X._.Npc_sprite_broccolina_json,"head_0",void 0,this.onHeadLoaded.bind(this))),this.sprites.addChild(this._body),this.sprites.addChild(this._head),q.add.tween(this._head,this).to({y:"-=1"},100,Q.GS3.Linear.None).to({y:"+=2"},400,Q.GS3.Linear.None).to({y:this._head.y},300,Q.GS3.Linear.None).loop(!0).start(),Q.Aq$.isDefined(J)&&this.addOnClick(J.bind(this)),this.nameText.GameObject.legacyTransform.y+=20,this.showName()}onBodyLoaded(q){var K;q.animations.add("stand",["body_0","body_1","body_2"],4,!0,!1),q.animations.play("stand",void 0,!0),this._fadeIn&&(null===(K=this.game.add.tween(this,this))||void 0===K||K.to({alpha:1},800,Q.GS3.Quadratic.In,!0))}onHeadLoaded(q){q.animations.add("stand",["head_0","head_1","head_2"],5,!0,!1),q.animations.play("stand",void 0,!0)}}var Bt=z(96535);class Ut extends xt.R{constructor(q,K,z,Y,Z,J,et){super(q,K,et,null,z,Y),this.nameText.GameObject.legacyTransform.group.position.set(26,-140);const it=this.add(tt.q.instance.prodigy.create.sprite(-20,-75,X._.Npc_sprite_eugene_json,"right_arm"));this._body=this.add(tt.q.instance.prodigy.create.sprite(0,-80,X._.Npc_sprite_eugene_json,"body_0",void 0,this.onTextureLoaded.bind(this)));const st=this.add(tt.q.instance.prodigy.create.sprite(40,-75,X._.Npc_sprite_eugene_json,"left_arm_0")),nt=this.add(tt.q.instance.prodigy.create.sprite(0,-110,X._.Npc_sprite_eugene_json,"head"));this.sprites.addChild(it),this.sprites.addChild(this._body),this.sprites.addChild(nt),this.sprites.addChild(st),q.add.tween(nt,this).to({y:"-=1"},200,Q.GS3.Linear.None).to({y:"+=2"},500,Q.GS3.Linear.None).to({y:nt.y},400,Q.GS3.Linear.None).loop(!0).start(),q.add.tween(st,this).to({y:"+=2"},800,Q.GS3.Linear.None).delay(600).to({y:st.y},800,Q.GS3.Linear.None).loop(!0).start(),q.add.tween(it,this).to({y:"+=2",x:"-=1"},800,Q.GS3.Linear.None).delay(600).to({y:it.y,x:it.x},800,Q.GS3.Linear.None).loop(!0).start(),Q.Aq$.isDefined(J)&&this.addOnClick(J.bind(this)),this.showName()}onTextureLoaded(q){q&&(q.animations.add("stand",["body_0","body_1","body_2","body_2","body_2","body_2","body_1"],5,!0,!1),q.animations.play("stand",void 0,!1))}}var Ft=z(26657);class Gt extends xt.R{constructor(q,K,z,Y,Q,X){super(q,K,X,null,z,Y),this.tween=null,this.nameText.GameObject.legacyTransform.group.position.set(-10,-150)}setup(q,K){const z=X._.Npc_sprite_jim_json,Y="jelly-idle-",Q=this.add(tt.q.instance.prodigy.create.sprite(0,0,z,`${Y}1`));Q.anchor.set(.5,1),this.sprites.addChild(Q),K&&(this.sprites.scale.x=-1),this.tween=new Ft.s(Q),this.tween.set("frameName",[`${Y}1`,`${Y}2`,`${Y}3`,`${Y}4`,`${Y}5`,`${Y}6`,`${Y}7`,`${Y}8`],150,9999),this.stand()}update(){Q.Aq$.isDefined(this.tween)&&this.tween.update(Date.now())}walk(){this.stand()}stand(){this.tween.start()}flipJim(q){this.sprites.scale.x=q?-1:1}}class jt extends xt.R{constructor(q,K,z,Y,Z,J,et,it,st){if(super(q,K,et,null,z,Y),this.radish=null,this.nameText.GameObject.legacyTransform.group.position.set(it,st),Z===X._.Npc_sprite_slime_worker_json)this.body=this.add(tt.q.instance.prodigy.create.sprite(0,-60,X._.Npc_sprite_slime_worker_json,"body_0")),this.face=this.add(tt.q.instance.prodigy.create.sprite(12,-45,X._.Npc_sprite_slime_worker_json,"face",void 0,this.onBodyALoaded.bind(this))),this.radish=this.add(tt.q.instance.prodigy.create.sprite(20,-80,X._.Npc_sprite_slime_worker_json,"radish_0",void 0,this.onRadishLoaded.bind(this))),this.faceTween=q.add.tween(this.face,this).to({y:"-=1"},300,Q.GS3.Linear.None).to({y:this.face.y},300,Q.GS3.Linear.None).delay(100).loop(!0).start(),this.sprites.addChild(this.radish),this.sprites.addChild(this.body),this.sprites.addChild(this.face),Q.Aq$.isDefined(J)&&(this.body.inputEnabled=!0,this.body.events.onInputDown.add(J)),this.nameText.GameObject.legacyTransform.y-=100;else{this.body=this.add(tt.q.instance.prodigy.create.sprite(-30,-63,X._.Npc_sprite_slime_worker_json,"red_0",void 0,this.onBodyBLoaded.bind(this)));const K=this.add(tt.q.instance.prodigy.create.sprite(-55,-110,X._.Zone_bonfire_json,"pot"));this.face=this.add(tt.q.instance.prodigy.create.sprite(-18,-45,X._.Npc_sprite_slime_worker_json,"face_red")),q.add.tween(this.face,this).to({y:"-=1"},300,Q.GS3.Linear.None).to({y:this.face.y},300,Q.GS3.Linear.None).delay(100).loop(!0).start(),this.sprites.addChild(K),this.sprites.addChild(this.body),this.sprites.addChild(this.face),this.nameText.GameObject.legacyTransform.y-=100}this.showName()}idle(){this.body.animations.play("idle",void 0,!1),this.face.frameName="stand_face",this.face.x-=7,this.body.y-=15,tt.q.instance.game.tweens.remove(this.faceTween),this.face.y=-60,this.faceTween=this.game.add.tween(this.face,this).to({y:"-=1"},300,Q.GS3.Linear.None).to({y:this.face.y},300,Q.GS3.Linear.None).delay(100).loop(!0).start()}onBodyALoaded(q){q===this.body&&(this.body.animations.add("stand",["body_0","body_1","body_2"],8,!0,!1),this.body.animations.add("idle",["stand_0","stand_1","stand_2"],8,!0,!1),this.body.animations.play("stand",void 0,!1))}onBodyBLoaded(q){q===this.body&&(this.body.animations.add("stand",["red_0","red_0","red_1","red_1","red_2","red_2"],10,!0,!1),this.body.animations.play("stand",void 0,!1))}onRadishLoaded(q){q===this.radish&&this.radish.animations.add("stand",["radish_0","radish_1","radish_2"],10,!0,!1)}}var $t=z(43531),Ht=z(87337),Vt=z(12676);class Wt extends ut.H{constructor(q,K,z,Y,Q,X,Z,J,tt=!1){super(q,K,z,Y),this.SPRITE_ALIAS={slurpy:88,bok:62},this.dialogueController=null,this.npcTag=Q,this.onComplete=J,this.updateCallback=Z,this.fadeIn=tt,tt&&(this.alpha=0)}setup(q,K,z,Y){const Q=Y||["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"];this.npc=this.add(tt.q.instance.prodigy.create.sprite(0,0,`atlas-${this.SPRITE_ALIAS[K]}`,0)),this.npc.animations.addIfFound("stand",Q,10,!0),this.npc.animations.play("stand",10,!0),this.npc.inputEnabled=!0,this.npc.anchor.set(.5,1),this.npc.events.onInputDown.add(this.process.bind(this,q,null,!0),this),z&&(this.npc.scale.x=-1),tt.q.instance.prodigy.create.nameFont(this,0,0-this.npc.height-20,K.charAt(0).toUpperCase()+K.slice(1))}process(q,K,z){this.dialogueController&&this.dialogueController.close();if(!tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.isZoneQuestEnabled)return;if(this.dialogueController=new $t.rD(this.game),!Q.Aq$.isDefined(q.getQuestState())){if(q.startQuest(1),!Q.Aq$.isDefined(q.getQuest(1)))return;return this.queueEventText(q,"onStart",1,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{this.updateCallback()}}]),this.dialogueController.start(),null}const Y=q.getQuestState().ID,X=q.getQuest(Y);if(q.isQuestComplete(Y)&&!X.chain){const K=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.queueEventText(q,"onComplete",Y,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{K.saveEnabled=!1,X.end(),Q.Aq$.isDefined(X.reward)&&X.reward.length>0?(q.completeQuest(Y),tt.q.instance.prodigy.open.gotItem(X.reward,(()=>{K.saveEnabled=!0,this.updateCallback()}),null,"advanced-quest-event-reward",null,null,{source_type:pt.C.QuestReward})):(q.completeQuest(Y),K.saveEnabled=!0,this.updateCallback())}}]),this.dialogueController.start()}else!q.isQuestStarted(Y)&&Q.Aq$.isDefined(X)?(this.queueEventText(q,"onStart",Y,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{q.startQuest(Y),this.updateCallback()}}]),this.dialogueController.start()):z&&Q.Aq$.isDefined(X)?(this.queueEventText(q,"onStart",Y,this.dialogueController),this.dialogueController.start()):z&&this.onComplete()}queueEventText(q,K,z,Y){const X=q.getQuest(z);if(Q.Aq$.isDefined(null==X?void 0:X[K]))for(let Q=0;QX.x),this.fadeIn&&this.fade(),this.dialogueController&&this.dialogueController.close();if(!tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.isZoneQuestEnabled)return;if(this.dialogueController=new $t.rD(this.game),z&&this._segment.gameWorld.sendNpcClickedEvent({npc_name:Vt.N.Eve,npc_type:Ht.ac.QuestGiver,npc_id:"NPC_NAME_EVE"}),!Q.Aq$.isDefined(q.getQuestState()))return void((null===(Y=q.getQuest(1))||void 0===Y?void 0:Y.questGiver)===this.npcTag&&(q.startQuest(1),this.queueEventText(q,"onStart",1,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{this.updateCallback()}}]),this.dialogueController.start()));const Z=q.getQuestState().ID,J=q.getQuest(Z),et=Q.Aq$.isDefined(J)&&Q.Aq$.isDefined(J.questGiver)?J.questGiver:this.npcTag,it=Q.Aq$.isDefined(J)&&Q.Aq$.isDefined(J.questReceiver)?J.questReceiver:this.npcTag;if(q.isQuestComplete(Z)&&!J.chain)if(it===this.npcTag){const K=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.queueEventText(q,"onComplete",Z,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{K.saveEnabled=!1,J.end(),Q.Aq$.isDefined(J.reward)&&J.reward.length>0?(q.completeQuest(Z),tt.q.instance.prodigy.open.gotItem(J.reward,(()=>{K.saveEnabled=!0,this.updateCallback()}),null,"advanced-quest-event-reward",null,null,{source_type:pt.C.QuestReward})):(q.completeQuest(Z),K.saveEnabled=!0,this.updateCallback())}}]),this.dialogueController.start()}else et===this.npcTag&&(this.queueEventText(q,"onStart",Z,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{this.updateCallback()}}]),this.dialogueController.start());else!q.isQuestStarted(Z)&&Q.Aq$.isDefined(J)&&et===this.npcTag?(this.queueEventText(q,"onStart",Z,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{q.startQuest(Z),this.updateCallback()}}]),this.dialogueController.start()):z&&Q.Aq$.isDefined(J)?(this.queueEventText(q,et===this.npcTag?"onStart":"alternateOnStart",Z,this.dialogueController),this.dialogueController.start()):z&&this.onComplete()}update(){super.update();const q=Date.now();for(let K=0;K100*Math.random()+10&&(this.tweens=this.standTween2,this.stand(),this.idleCounter=0)}resetToDefaultIdle(){this.tweens=this.standTween1,this.stand()}}var Kt=z(52437),zt=z(85604),Yt=z(23082),Qt=z(73678);class Xt extends ut.H{constructor(q,K,z){super(q,K,440,5),this.user=null,this.banner=null,this.icon=null,this.state=null,this.text=null,this.user=z,this.banner=tt.q.instance.prodigy.create.panel(this,0,0,10,2,"banner"),this.banner.visible=!1,this.icon=this.add(tt.q.instance.prodigy.create.sprite(50,5,X._.General_icons_json,"quest")),this.state=this.add(tt.q.instance.prodigy.create.sprite(50,5,X._.General_icons_json,"quest")),this.icon.visible=!1,this.state.visible=!1,this.arrow=this.add(tt.q.instance.prodigy.create.sprite(175,0,X._.General_icons_json,"up")),this.arrow.visible=!1}process(q,K){const z=tt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);this.visible=!1;let Y=null;if(Q.Aq$.isDefined(this.text)&&(Y=this.text.text,this.text.destroy()),this.state.frameName="quest",this.icon.loadNewTexture(X._.General_icons_json,"quest"),this.state.visible=this.icon.visible=!0,Q.Aq$.isDefined(q.getState("dailyQuest"))){if(q.hasDailyQuestExpired()||q.isDailyQuestComplete()&&q.getState("handedOverQuest"))return;const K=q.getDailyQuestDescription(0);if(q.isDailyQuestComplete())this.icon.destroy(),this.icon=this.add(tt.q.instance.prodigy.create.sprite(50,5,X._.General_icons_json,"quest-complete")),this.icon.x=350-this.icon.width,this.state.frameName="quest-complete",this.text=tt.q.instance.prodigy.create.font(this,98,24,z.getText("QUEST_JOB_COMPLETE"),{align:"center",width:204,size:20});else if("pet"===K.type){this.icon.destroy();const q=q=>{q.x=350-q.width,q.onTextureLoaded=null};this.icon=this.add(tt.q.instance.prodigy.icon.createFromData(K,300,5,null,q.bind(this))),this.state.visible=!1,this.text=tt.q.instance.prodigy.create.font(this,50,24,z.getText("QUEST_PROGRESS_DEFEAT_MORE",K.N),{size:20})}this.banner.visible=!0,this.visible=!0}else if(at.U.shouldShowEndgameQuestBanner(q.ID))return this.x-=20,this.icon.x=390-this.icon.width,this.text=tt.q.instance.prodigy.create.font(this,98,24,z.getText("ENDGAME_QUEST_BANNER_GO_TO_ACADEMY"),{align:"center",width:244,size:20}),this.banner.destroy(),this.banner=tt.q.instance.prodigy.create.panel(this,0,0,11,2,"banner"),this.banner.parent.setChildIndex(this.banner,0),void(this.visible=!0);const Z=q.getQuestState();if(!Q.Aq$.isDefined(Z)||!Q.Aq$.isDefined(Z.req))return;const J=q.getQuest(Z.ID);if(!Q.Aq$.isDefined(J))return;const et=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(q.isQuestComplete(Z.ID)){if(this.icon.destroy(),this.icon=this.add(tt.q.instance.prodigy.create.sprite(50,5,X._.General_icons_json,"quest-complete")),this.state.frameName="quest-complete",this.text=tt.q.instance.prodigy.create.font(this,98,24,z.getText("QUEST_JOB_COMPLETE"),{align:"center",width:204,size:20}),!J.chain&&!K.isQuestHub&&!q.isQuestProcessed(Z.ID)){Z.ID===q.finalQuestId?this.processLegacyQuestFlow(q,J,Z):this.processSimpleQuestFlow(q)}}else if(Q.Aq$.isDefined(J.area)&&!wt.J.inArray(J.area,et.data.zone))this.text=tt.q.instance.prodigy.create.font(this,98,24,z.getText("QUEST_FOLLOW_PATH"),{align:"center",width:204,size:20});else{const q=Z.req;Q.Aq$.isDefined(J.descKey)&&Ct.size(J.descKey)>0?this.text=tt.q.instance.prodigy.create.font(this,98,24,z.getText(J.descKey),{align:"center",width:204,size:20}):wt.J.inArray(["item","weapon","hat","outfit","boots","key"],q.type)?(this.remove(this.icon),this.icon=this.add(tt.q.instance.prodigy.icon.createFromData(q,50,5,null,(q=>{this.icon.x=350-q.width}))),this.state.visible=!1,this.text=tt.q.instance.prodigy.create.font(this,50,24,z.getText("QUEST_PROGRESS_COLLECT_MORE",Math.max(0,q.N-et.backpack.hasItem(q.type,q.ID))),{size:20}),112===q.ID&&"item"===q.type&&(this.icon.y-=10)):"pet"===q.type?(this.remove(this.icon),this.icon=this.add(tt.q.instance.prodigy.icon.createFromData(q,50,5,null,(q=>{this.icon.x=350-q.width}))),this.state.visible=!1,this.text=tt.q.instance.prodigy.create.font(this,50,24,z.getText("QUEST_PROGRESS_DEFEAT_MORE",q.N),{size:20})):"clear"===q.type&&(this.state.visible=!1,this.text=tt.q.instance.prodigy.create.font(this,50,24,z.getText("QUEST_CLEAR",q.T),{size:20}))}if(this.banner.visible=!0,this.icon.x=350-this.icon.width,Q.Aq$.isDefined(this.text)&&Y!==this.text.text&&Q.Aq$.isDefined(Y)){this.arrow.visible=!0,this.arrow.y=50,this.arrow.alpha=1;this.game.add.tween(this.arrow,this).to({y:30,alpha:0},1e3,Q.GS3.Linear.None).start().onTweenComplete.add((()=>{this.arrow.visible=!1}),this)}this.visible=!0}destroy(q={children:!0}){this.banner&&(this.banner.destroy(),this.banner=null),this.user=null,this.icon=null,this.state=null,this.text=null,super.destroy(q)}processSimpleQuestFlow(q){var K;const z=Xt.ZONE_NPC_CONFIG_MAP[q.ID],Y=this.game.state.get(Yt.G.TileScreen),X=175,Z=this.user.position.x+X>this.game.width,J=Z?this.user.position.x-X:this.user.position.x+X,et=!Z&&!z.isRightFacing||Z&&z.isRightFacing;if(Object.values(zt.y).find((q=>q===z.asset))){const K=tt.q.instance.prodigy.event.create();K.text(39,z.asset);const Q=()=>{K.start()};Y.addConstructedQuestNPC(J,this.user.position.y,z.asset,et,Q.bind(this),!0).process(q,null,!0)}else tt.q.instance.prodigy.prefabFactory.addPrefabNPC(z.asset,J,this.user.position.y,et,!0).then((q=>{q.findComponent(Kt.$).process()})).catch(Q.RQr.createHandler(`Unable process the quest for NPC: ${z.asset} in ${q.ID}`));null===(K=z.secondaryAssets)||void 0===K||K.forEach(((K,z)=>{const J=20*(z+1),it=Z?this.user.position.x-X-J:this.user.position.x+X+J;Object.values(zt.y).find((q=>q===K))?Y.addConstructedQuestNPC(it,this.user.position.y,K,et,(()=>null),!0):tt.q.instance.prodigy.prefabFactory.addPrefabNPC(K,it,this.user.position.y,et,!0).catch(Q.RQr.createHandler(`Error loading additional NPC asset: ${K} in ${q.ID}`))}))}processLegacyQuestFlow(q,K,z){const Y=tt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),X=tt.q.instance.prodigy.event.create();if(X.set(this.user,"evtProc",!0),Q.Aq$.isDefined(K.onProc)&&K.onProc.length>0)for(let Q=0;Q=0&&X.text(K.onProc[Q],"noot");else X.text(41,"noot");X.function((()=>{const K=tt.q.instance.prodigy.dialogue.create(),Q={text:Y.getText("DIALOGUE_NOOT_282",Y.getText(q.Guardian)),yes:()=>{q.processQuest(z.ID),tt.q.instance.prodigy.world.it(q.questHub)},no:()=>{q.processQuest(z.ID)},face:1,anim:2};K.setText(Q),K.startDeprecated("noot")})),X.set(this.user,"evtProc",!1),X.start()}}Xt.ZONE_NPC_CONFIG_MAP={[Qt.A_.SKYWATCH]:{asset:zt.y.Benni,isRightFacing:!0,secondaryAssets:[zt.y.Broccolina]},[Qt.A_.SHIVERCHILL]:{asset:zt.y.Bok,isRightFacing:!0},[Qt.A_.SHIPWRECK]:{asset:zt.y.Eve},[Qt.A_.FOREST]:{asset:Z.l.FloraNPC},[Qt.A_.BONFIRE]:{asset:zt.y.Slurpy}};var Zt=z(28628),Jt=z(129),te=z(47223),ee=z(76945);class ie extends xt.R{constructor(q,K,z,Y,Z,J,et,it,st){const nt=new te.s(q);nt.init(it.opponent[0]),super(q,K,nt,null,z,Y),this.ID=et,this.user=Z,this.path=J,Q.Aq$.isDefined(it.range)||(it.range=ie.DEFAULT_MOD_DISTANCE),this.mods=it;const at=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,rt=new Jt.a(this.game);let ot=at.getLevel();ot=ee.o.integerInRange(Math.max(1,ot-2),Math.min(ot+2,100)),Q.Aq$.isDefined(this.mods.opponent[0].data)&&Q.Aq$.isDefined(this.mods.opponent[0].data.level)&&(ot=this.mods.opponent[0].data.level),this.mods.opponent=this.mods.opponent||[{data:{level:ot},appearance:rt.appearance.getData(),equipment:rt.equipment.getData()}];const ht=[],ct=Math.min(4,at.kennel.petTeam.length-2+3*Math.random());for(let Q=0;Q{this.onStartComplete.dispatch()})).catch(Q.RQr.createHandler("Error starting TileScreen"))}startAsync(){const q=Object.create(null,{start:{get:()=>super.start}});return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._loadCompleteSent){this._loadCompleteSent=!0;const q={mapName:this.data.name};this.metricsManager.createLoadingMetricEvent(Tt.o.FunnelTileScreen,Tt.o.StageLoadEnd,!1,q);tt.q.instance.prodigy.gameContainer.get("088-1d4c").endTracing(se.u.World,{successfully_loaded:!0,zone:this.zoneName})}const K=this.fadeIn();this.walkEnabled=!1;const z=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(le.F.shouldShowLinearCampaignZoneLockTransition())return le.F.activateLinearCampaignTransitionCutscene(),void q.start.call(this);const Y=tt.q.instance.prodigy.gameContainer.get("b37-c775");this.isCutscenePlaying=yield Y.isCutsceneTaskInProgress().catch((()=>(Q.RQr.createHandler("[TileScreen] Error checking for cutscene tasks"),!1))),(this.isCutscenePlaying||this.data.isMultiplayerDisabled)&&tt.q.instance.prodigy.gameContainer.get("774-4659").leaveZone();const X=this.zone.getQuestState(),Z=ue.x.arePopupsEnabled&&!this.data.arePopupsDisabled,et=this.isCutscenePlaying||!Z||this.zone.isQuestComplete(null==X?void 0:X.ID)&&X.ID!==this.zone.finalQuestId,it=tt.q.instance.prodigy.gameContainer.get("c5a-49f2");if(this.isMapScreen&&!et||it.shouldShowRetention){q.start.call(this);const K=q=>{this._initiallySeenPopupIDs.push(q)};tt.q.instance.prodigy.open.onPrefabMenuOpened.add(K),yield new Promise((q=>{this.processPopups(q)})).then((()=>{tt.q.instance.game.broadcaster.broadcast(Ot.Y1.CheckForHUDAttention),this.popupsProcessed=!0})).catch(Q.RQr.createHandler("TileScreen start error on processPopups")),tt.q.instance.prodigy.open.onPrefabMenuOpened.remove(K)}if(this._questTasksSetup||(yield this.setupQuestTasks().catch(Q.RQr.createHandler("[TileScreen]: Error setting up zone quests"))),et||(yield this.acknowledgeOtp().catch(Q.RQr.createHandler("[TileScreen]: Error setting up OTP"))),z.justLeveled){const q=tt.q.instance.prodigy.gameContainer.get("20f-5f67"),K=[J.B.BREADCRUMB_REACHED_LEVEL_2,J.B.BREADCRUMB_REACHED_LEVEL_3,J.B.BREADCRUMB_REACHED_LEVEL_4,J.B.BREADCRUMB_REACHED_LEVEL_5],Y=[re.l.ReachedLevel2,re.l.ReachedLevel3,re.l.ReachedLevel4,re.l.ReachedLevel5],Q=z.getLevel(),X=2,Z=5;for(let z=X;z<=Z;z++)if(Q>=z){const Q=K[z-X];this.breadcrumbManager.isBreadcrumbComplete(J.B.FEATURE_PROGRESSION_EVENTS,Q)||(this.breadcrumbManager.completeBreadcrumb(J.B.FEATURE_PROGRESSION_EVENTS,Q),q.playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:Y[z-X]}))}}this.user.evtProc=!1,this.zone.start(this.prodigyGame,this,this.data),this.data.start(this.prodigyGame,this),this.process(),tt.q.instance.prodigy.skin.applySkin(this,this.zone),q.start.call(this),yield K,this.walkEnabled=!0}))}setupQuestTasks(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this._questTasksSetup)return;this._questTasksSetup=!0;const q=tt.q.instance.prodigy.gameContainer.get("be3-4f64");yield q.setupValidTasks().catch(Q.RQr.createHandler("[TileScreen] Unable to load zone quests"));const K=tt.q.instance.prodigy.gameContainer.get("b37-c775");yield K.setupValidTasks().catch(Q.RQr.createHandler("[TileScreen] Unable to setup tasks via QuestManagerHub"))}))}acknowledgeOtp(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this._otpAcknowledgeAttempted)return;const q=tt.q.instance.prodigy.gameContainer.get("2f0-c49e");q.hasUncollectedTransactions&&(this._otpAcknowledgeAttempted=!0,yield q.acknowledgeUncollectedTransactions())}))}createBackground(){this._bgSprite&&this._bgSprite.destroy(),this.below&&this.below.destroy(),this.above&&this.above.destroy(),this.floor&&this.floor.destroy(),this._bgSprite=this.background.addChild(tt.q.instance.prodigy.create.sprite(0,0,null)),this._bgSprite.width=this.game.width,this._bgSprite.height=this.game.height,this._bgSprite.alpha=0,this._bgSprite.inputEnabled=!0,this._bgSprite.events.onInputDown.add(this.listener.bind(this),this),tt.q.instance.prodigy.gameContainer.get("2f9-57ba").setBlockType(this._bgSprite.input,de.z.LOCOMOTION),this.below=tt.q.instance.prodigy.create.element(this.background,0,0),this.above=tt.q.instance.prodigy.create.element(this.foreground,0,0),this.floor=tt.q.instance.prodigy.create.element(this.background,0,0)}screenUpdate(){if(super.screenUpdate(),this.data){const q=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.zone&&q&&this.zone.update(this.prodigyGame,this,this.data),this.data.update(this.prodigyGame)}}addAreaEvent(q,K,z,Y,Q){const X=new lt.o(this.prodigyGame,this.floor,q,this.user,this.path,K,z,Y,Q);this.events.push(X);return Y&&this.above.add(X.getOverlay()),X}addQuestNPC(q,K,z,Y,Q,X){const Z=new Wt(this.prodigyGame,this.content,q,K,z,Y,this.process.bind(this),Q);return Z.setup(this.zone,z,Y,X),this.events.push(Z),Z}addConstructedQuestNPC(q,K,z,Y,Q,Z,J){let tt,et;switch(z){case zt.y.Benni:et=new ne.p(this.prodigyGame,"NPC_NAME_BENNI",488,Ht.ac.QuestGiver,this.content,q,K,"idle",void 0,Y,Z),tt=new Wt(this.prodigyGame,this.content,q,K,z,Y,this.process.bind(this),Q),et.onClick.add((()=>{tt.process(this.zone,null,!0)}),this);break;case zt.y.Broccolina:et=this.addConstructedNPC(q,K,X._.Npc_sprite_broccolina_json,Q,"NPC_NAME_BROCCOLINA",this.content,Z),et.nameText.GameObject.legacyTransform.x+=50,et.scale.x=Y?-et.scale.x:et.scale.x,et.nameText.GameObject.legacyTransform.scaleX=Y?-1:1;break;case zt.y.Flora:et=new ne.p(this.prodigyGame,"NPC_NAME_FLORA",489,Ht.ac.QuestGiver,this.content,q,K,"idle",void 0,Y,Z),tt=new Wt(this.prodigyGame,this.content,q,K,z,Y,this.process.bind(this),Q),et.onClick.add((()=>{tt.process(this.zone,null,!0)}),this);break;case zt.y.Eve:tt=new qt(this.prodigyGame,this.content,q,K,z,Y,this.process.bind(this),Q,Z),tt.setup(this.zone,z,Y);break;case zt.y.Bok:et=new ne.p(this.prodigyGame,"SHIVERCHILL_GUARDIAN",490,Ht.ac.QuestGiver,this.content,q,K,"idle",void 0,Y,Z),tt=new Wt(this.prodigyGame,this.content,q,K,z,Y,this.process.bind(this),Q),et.onClick.add((()=>{J?J():tt.process(this.zone,null,!0)}),this);break;case zt.y.Slurpy:et=new ne.p(this.prodigyGame,"NPC_NAME_SLURPY",493,Ht.ac.QuestGiver,this.content,q,K,"animation",void 0,Y,Z),tt=new Wt(this.prodigyGame,this.content,q,K,z,Y,this.process.bind(this),Q),et.onClick.add((()=>{tt.process(this.zone,null,!0)}),this)}return this.events.push(tt),tt}addClickableEvent(q,K,z,Y,Q,X,Z,J){const tt=new At(this.prodigyGame,J||this.content,q,K,z,Y,Q,X,Z);return this.events.push(tt),tt}addClickableMoveEvent(q,K,z,Y,Q,X,Z,J,tt,et){const it={moveToX:Q,moveToY:X,addPathingIconFunction:(q,K)=>{this.addPathingIcon(q,K)}},st=new It(this.prodigyGame,et||this.content,q,K,z,Y,it,Z,J,tt);return this.events.push(st),st}addClickableArea(q,K,z,Y,Q){const X={x:q,y:K,w:z,h:Y,callback:Q};this.clickAreas.push(X)}addFireflyEvent(q,K,z,Y,Q,X,Z){const J=new Pt(this.prodigyGame,this.foreground,q,K,z,Y,Q,X,Z);return this.events.push(J),J}addChest(q,K,z,Y,Q,X){const Z=new St(this.prodigyGame,this.content,this.zone,K,z,this.user,this.path,q,Y,Q,this.process.bind(this),X);return this.events.push(Z),Z}addMimic(q,K,z,Y,Q,X){const Z=new Nt(this.prodigyGame,this.content,K,z,this.user,this.path,q,Y,Q,X);return this.events.push(Z),Z}addCollect(q,K,z,Y){const Q=new Dt(this.prodigyGame,this.content,K,z,this.user,this.path,q,Y,this.processAddCollect.bind(this,q));return this.events.push(Q),Q}processAddCollect(q){this.preprocess();for(let K=0;Kthis.user.x&&z.flip(),z.onClick.addOnce((()=>{this.path.findPath(this.user.x,this.user.y,q+(q>this.user.x?-50:50),K+(K>this.user.y?-50:50),!0).then((q=>{q&&this.user.setPath(q,(()=>{z.alert()}))})).catch(Q.RQr.createHandler("Error finding path to Pippet"))})),tt.q.instance.prodigy.world.pippetEncounterDaily.isComplete()&&z.alert(),this.events.push(z),z}addWizard(q,K,z,Y){const X=this.zone.getState(z);if(!(Q.Aq$.isDefined(X)&&0!==X||!1)){const Q=new ie(this.prodigyGame,this.content,q,K,this.user,this.path,z,Y,this);return Q.reload(),this.events.push(Q),Q}return null}addNPC(q,K,z,Y=Ht.ac.CareGiver,Q,X,Z){const J=new st.s(this.prodigyGame);J.init({npc_name:X,npc_type:Y,x_coord:q,y_coord:K,npc_animation_id:"idle"});const tt=new Lt(this.prodigyGame,Z||this.content,q,K,z,Q,J);return this.events.push(tt),tt}addGnome(q,K,z,Y,Q,X,Z){const J=new st.s(this.prodigyGame);J.init({npc_name:z,npc_type:Y,x_coord:q,y_coord:K,npc_animation_id:"idle"});const tt=new Mt.N(this.prodigyGame,this.content,this.user,this.path,q,K,J,Q,X,Z);return this.events.push(tt),tt}addConstructedNPC(q,K,z,Y,Z,J,tt=!1){const et=new st.s(this.prodigyGame);let it;switch(et.init({npc_name:Z,npc_type:Ht.ac.QuestGiver,x_coord:q,y_coord:K,npc_animation_id:"idle"}),z){case X._.Npc_sprite_jim_json:it=new Gt(this.prodigyGame,this.content,q,K,z,et);break;case X._.Npc_sprite_broccolina_json:it=new kt(this.prodigyGame,this.content,q,K,z,Y,et,tt);break;case X._.Npc_sprite_eugene_json:it=new Ut(this.prodigyGame,this.content,q,K,z,Y,et);break;case X._.Npc_sprite_cebollini_json:it=new Bt.U(this.prodigyGame,J||this.content,q,K,z,Y,et);break;case X._.Npc_sprite_slime_worker_json:case"npc-sprite-worker-slime-red":it=new jt(this.prodigyGame,this.content,q,K,z,Y,et);break;default:Q.VyI.log("Add Constructed NPC failed: Tag not found",Q.$bb.Error)}return this.events.push(it),it}addBlock(q,K,z){const Y=new ft(this.prodigyGame,z.content?this.content:this.background,q,K,this.path,z);return this.events.push(Y),Y}addUltimate(q,K,z){this.addPrefabToScreen(Z.l.UltimatePet,K,z).then((K=>{const z=this.game.time.events.loop(it.s.TARGET_FPS_40_MS,(()=>K.update()),this);K.onDestroy.addOnce((()=>this.game.time.events.remove(z)));K.findComponent(ot.i).init(q)})).catch(Q.RQr.createHandler("[TileScreen][addUltimate] Error loading the Ultimate prefab from GUID."))}addPrefabToScreen(q,K,z,X){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=tt.q.instance.prodigy.gameContainer.get("983-05a7"),Z=yield fe.d.loadWithInjectedValuesAndDependenciesFromGUID(Y,q,null!=X?X:{});Z.transform.setPosition(K,z);const J=Z.findComponent(Q.y4o).getRootContainer();return this.content.addChild(J),J.x=Z.transform.worldPosition.x,J.y=Z.transform.worldPosition.y,Z}))}preprocess(){var q;const K=this.zone.getQuestState(),z=Q.Aq$.isDefined(K)?this.zone.getQuest(K.ID):null,Y=Q.Aq$.isDefined(z)&&this.zone.isQuestComplete(K.ID),X=Q.Aq$.isDefined(z)&&this.zone.isQuestStarted(K.ID),Z=[];let J=[];X&&(J=Y&&!z.chain&&Q.Aq$.isDefined(this.zone.questHub)?[this.zone.questHub]:this.zone.getRemainingQuestAreas(K.ID));for(let Q=0;Q0)for(let q=0;qq.distance-K.distance));let tt=9999999;for(let et=0;ettt);et++)tt=Z[et].distance,Q.Aq$.isDefined(Z[et].event)&&Q.Aq$.isDefined(Z[et].event.setClosest)&&Z[et].distance>1&&Z[et].event.setClosest()}process(q=!1){var K;q||this.preprocess(),this.openHUD();const z=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.isMapScreen&&z.isZoneQuestEnabled&&(null===(K=this.questProgress)||void 0===K||K.process(this.zone,this.data)),this.zone.process(this.prodigyGame,this,this.data),this.data.process(this.prodigyGame,this,this.zone)}showCollisions(q){if(Q.Aq$.isDefined(this.menus)&&(et.l.removeAll(this.menus,!0),q)){const q=tt.q.instance.game.add.container(),K=this.game.width,z=this.game.height;for(let Y=0;Y{const z=ht.v.getUltimatesPetLocation(K).split("-"),Y=`${z[0]}-${z[1]}`,X=new Q.I9Y(parseInt(z[2]),parseInt(z[3]));this.generateTamingUI(K,Y),this.generateUltimateTrail(Y,q),this.data.zoneName===Y&&this.addUltimate(K,X.x,X.y)})).catch(Q.RQr.createHandler("[TileScreen][processUltimatesIndicators] Could not get current petID for ultimate UI generation"))}}findTargetEvent(q){if(this.data.locations.includes(q)){return this.events.find((K=>K instanceof lt.o&&K.getTarget()===q))}return null}generateUltimateTrail(q,K){const z=this.findTargetEvent(q);z?(0,be.Ks)().loadWithDependenciesFromGUID(Z.l.UltimateTrail,this.contentGameObject).then((q=>{this._ultimatesElements.push(q);q.findComponent(dt.o).fireTrail(z),K.onSessionStatusChange.add(this.handleSessionStatusChange,this)})).catch(Q.RQr.createHandler("[TileScreen][generateUltimateTrail] Error generating the Ultimate Trail. Reason:")):Q.VyI.log(`[TileScreen][generateUltimateTrail] Could not find location ${q} in targetEvent list - probably the user does not have access to it`,Q.$bb.Warning)}generateNPCTrail(q){const K=ct.m.getSeededLocation().split("-"),z=`${K[0]}-${K[1]}`,Y=this.findTargetEvent(z);Y?(0,be.Ks)().loadWithDependenciesFromGUID(Z.l.WanderingNPCTrail,this.contentGameObject).then((K=>{this._ultimatesElements.push(K);K.findComponent(dt.o).fireTrail(Y),q.onSessionStatusChange.add(this.handleSessionStatusChange,this)})).catch((q=>{Q.VyI.log(`[TileScreen][generateNPCTrail] Error generating the NPC Trail. Reason: ${q}`,Q.$bb.Warning)})):Q.VyI.log(`[TileScreen][generateNPCTrail] Could not find location ${z} in targetEvent list - probably the user does not have access to it`,Q.$bb.Warning)}handleSessionStatusChange(q,K){if(q===nt.n.None||q===nt.n.Transition){for(const q of this._ultimatesElements)q.destroy();this._ultimatesElements.length=0,tt.q.instance.prodigy.world.inZoneHub()||tt.q.instance.prodigy.world.goToZoneHub(tt.q.instance.prodigy.world.getCurrentZone())}}generateTrackingUI(){const q=ct.m.getSeededLocation(),K=q.split("-")[0],z=q.split("-")[1];if(tt.q.instance.prodigy.world.getZone(K).getMap(z).locations.find((q=>q===this.data.zoneName))){const q=new Q._mx;q.addComponent(oe.B).getRootContainer().setParent(this.uiLayer),(0,be.Ks)().loadWithDependenciesFromGUID(Z.l.UltimateTaskUI,q).then((q=>{this._ultimatesElements.push(q);const K=tt.q.instance.prodigy.gameContainer.get("29b-61c6");he.b.statusRequiresConsent(K.consentStatus)&&q.transform.setPositionY(q.transform.localPosition.y+ce.R.HUD_RESERVE_HEIGHT)})).catch((q=>{Q.VyI.log(`[TileScreen] Error generating the UltimateTaskUI. Reason: ${q}`,Q.$bb.Error)}))}}generateTamingUI(q,K){const z=K.split("-")[0];if(this.zone.ID===z&&this.zoneName!==K){const K=new Q._mx;K.addComponent(oe.B).getRootContainer().setParent(this.uiLayer),(0,be.Ks)().loadWithDependenciesFromGUID(Z.l.UltimateTaskUI,K).then((K=>{this._ultimatesElements.push(K);K.findComponent(rt.P).setupTamingUI(q);const z=tt.q.instance.prodigy.gameContainer.get("29b-61c6");he.b.statusRequiresConsent(z.consentStatus)&&K.transform.setPositionY(K.transform.localPosition.y+ce.R.HUD_RESERVE_HEIGHT)})).catch(Q.RQr.createHandler("[TileScreen] Error generating the UltimateTaskUI."))}}onDoorClick(q,K){K||tt.q.instance.prodigy.audio.playSFX(15,"door"),Q.Aq$.isDefined(q)&&q()}endFX(){this.user.evtProc=!1,this.prodigyGame.input.enabled=!0,this.hideChat(!1)}startFX(){this.hideChat(!0)}hideChat(q){this.questProgress.visible=!q,this.isMapScreen&&this.questProgress.visible&&this.questProgress.process(this.zone,this.data);const K=tt.q.instance.prodigy.open.chatMenu;(null==K?void 0:K.textField)&&K.textField.setVisible(!q)}}ve.DEBUG_DRAW_AREA_EVENTS=!1},48757:(q,K,z)=>{"use strict";z.d(K,{c:()=>de});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(88022),J=z(85855),tt=z(24521),et=z(99625),it=z(28628),st=z(97495),nt=z(2090),at=z(32389),rt=z(40295),ot=z(94310),ht=z(58776),ct=z(43516),dt=z(66582),lt=z(92579),ut=z(73678),ft=z(81137),bt=z(47728),pt=z(35120),vt=z(34829),gt=z(23029),mt=z(77938),yt=z(129),_t=z(2212),Et=z(43518),wt=z(76016),Tt=z(93867),St=z(75781),At=z(64868),Ct=z(70399),Ot=z(36811),It=z(55080),Dt=z(43503),Rt=z(96797),Pt=z(19145),Mt=z(19506),Nt=z(41012),xt=z(73797),Lt=z(35084),kt=z(85056),Bt=z(24981),Ut=z(31029),Ft=z(96810),Gt=z(41674),jt=z(96494),$t=z(76277),Ht=z(13956),Vt=z(24110),Wt=z(46);var qt=z(65088),Kt=z(64353),zt=z(85515),Yt=z(28962),Qt=z(95057),Xt=z(40392),Zt=z(93375),Jt=z(5075),te=z(98252),ee=z(24695),ie=z(84642),se=z(80060),ne=z(30226),ae=z(47255),re=z(35564),oe=z(38454),he=z(15804),ce=z(20705);class de extends ce.f{constructor(q,K=[]){super(q.zoneName,q.atlas,K.concat([J.V.Bgm_intro])),this.showMenu=!0,this.tileSize=20,this.hideHex=!1,this.playersInfo={},this.playerList={},this.clickAreas=[],this.walkEnabled=!0,this.saveTag="",this.startX=500,this.startY=300,this.pendingPlayers=null,this.pendingCoordinates=new Map,this.frameUntilAddNextPlayer=-de.FRAMES_BETWEEN_ADDING_PLAYERS,this.hasBroadcastedInfo=!1,this._hasSeenSegmentedOffer=!1,this._hasCheckedForPetOffersPopup=!1,this._initiallySeenPopupIDs=[],this.canStartAddingPlayers=!1,this._world=pt.q.instance.prodigy.world}shutdown(){var q,K;this._battlePassDataPromise&&(this._battlePassDataPromise.cancel(),this._battlePassDataPromise=null),Q.Aq$.isDefined(this._friendListLoadTimeoutID)&&(window.clearTimeout(this._friendListLoadTimeoutID),this._friendListLoadTimeoutID=null),this.prodigyGame.broadcaster.removeAppListener(xt.sd.GotFriendsListAppearance,this,"FriendsListOfActualFriends"),this.prodigyGame.broadcaster.removeAppListener(xt.Y1.ShowHUD,this,xt.HG.HUD),this.prodigyGame.broadcaster.removeAppListener(xt.Y1.HideHUD,this,xt.HG.HUD),this.prodigyGame.broadcaster.removeAppListener(xt.pm.MovePlayer,this),this.difficultyOverlayPromise&&(this.difficultyOverlayPromise.cancel(),this.difficultyOverlayPromise=null);for(const z in this.playerList)this.playerList.hasOwnProperty(z)&&this.playerList[z].destroy();this.user&&(this.user.clickCallback=null,this.user.destroy(),this.user=null,pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer=null);for(let z=0;z>1),this.user.enableLocomotion(this,this.user),this.user.reload(),this.user.onFullyLoaded.add((()=>{this.canStartAddingPlayers=!0,this.user.showName()})),pt.q.instance.prodigy.world.inRestrictedSocialZone(pt.q.instance.prodigy.world.getCurrentZone())||(this.user.clickCallback=pt.q.instance.prodigy.open.card.bind(pt.q.instance.prodigy.open,Y,!0,lt.a.available)),pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer=this.user,this.addFollow(Y.userID,Y.equipment.getFollow()),this.prodigyGame.broadcaster.addAppListener(xt.pm.MovePlayer,this.updateOnFaintData.bind(this),this),this.showMenu&&(this.menuBar=new Q._mx,this.menuBar.addComponent(Vt.B).getRootContainer().setParent(this.menus),null===(K=this.menuBarCreationPromise)||void 0===K||K.cancel(),this.menuBarCreationPromise=null,pt.q.instance.game.broadcaster.addAppListener(xt.Y1.ShowHUD,(()=>{this.menuBar.active=!0}),this,xt.HG.HUD),pt.q.instance.game.broadcaster.addAppListener(xt.Y1.HideHUD,(()=>{this.menuBar.active=!1}),this,xt.HG.HUD),-1===this.zoneName.indexOf("scene-")&&this.prodigyGame.broadcaster.broadcast(xt.lT.Setup,xt.HG.NetworkHandlers,[])),this.setupDifficultyOverlay(),super.create()}createBackground(){this.bg=pt.q.instance.prodigy.create.sprite(0,0,this.screenName,"bg"),this.bg.inputEnabled=!0,this.bg.events.onInputDown.add(this.listener.bind(this),this),this.background.addChild(this.bg),pt.q.instance.prodigy.gameContainer.get("2f9-57ba").setBlockType(this.bg.input,Yt.z.LOCOMOTION)}screenSetup(){var q,K;if(Q.Aq$.isDefined(this.bgmID)&&pt.q.instance.prodigy.audio.autoplay&&(pt.q.instance.prodigy.audio.playBGM(this.bgmID,!0),pt.q.instance.prodigy.audio.resumeBGM()),!(null===(q=this.screenData)||void 0===q?void 0:q.doNotJoinNetworkZone)){pt.q.instance.prodigy.gameContainer.get("774-4659").joinZone(this)}if(null===(K=this.screenData)||void 0===K?void 0:K.runFSMOnLoad){const q=new Q._mx,K=q.addComponent(Ut.u);K.assetId=this.screenData.runFSMOnLoad.ID,K.fsmVariables=this.screenData.runFSMOnLoad.variables,K.onComplete.addOnce((()=>{q.destroy()})),K.run()}super.screenSetup()}setupDifficultyOverlay(){var q;const K=pt.q.instance.prodigy.world.getCurrentZoneObject(),z=(0,$t.G)(nt.u).enabled&&_t.J.isZoneMapDifficultyModeAgnostic(this.zoneName),Y=null!==(q=pt.q.instance.prodigy.gameContainer.get("782-c308").currentDifficulty)&&void 0!==q?q:st.i.Regular,Q=(null==K?void 0:K.ID)===ut.A_.LAMPLIGHT&&pt.q.instance.prodigy.skin.isFestivalActive();z&&!Q&&Y!==st.i.Regular&&(this.difficultyOverlayPromise=se.d.loadWithInjectedValuesAndDependenciesFromGUID(pt.q.instance.prodigy.gameContainer.get("983-05a7"),Y===st.i.Hard?et.l.Overlay_difficulty_hard:et.l.Overlay_difficulty_expert,{}))}start(){this.user.evtProc=!1,super.start()}shouldSkipPopups(){if(!ie.x.arePopupsEnabled)return!0;const q=pt.q.instance.prodigy.gameContainer.get("7f4-4464");return!!(null==q?void 0:q.waitingToTransport)}processPopups(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,X,Z,J,nt,at,lt,ut,ft;if(this.shouldSkipPopups())return void(null==q||q());const mt=pt.q.instance.prodigy.gameContainer,yt=mt.get("ad2-c5b2").player;if(_t.J.canShowNarrativeIntro(null===(K=null==yt?void 0:yt.data)||void 0===K?void 0:K.zone))return void pt.q.instance.prodigy.world.it("lamplight-B3");if(_t.J.shouldShowWorldMapHardModeFtue()&&(yield new Promise((q=>{pt.q.instance.prodigy.open.map({disableClose:!0,onClose:q})}))),(yield Et.M.canAutoSurfaceDailyLoginCalendar())&&(yield pt.q.instance.prodigy.open.dailyLoginCalendar().catch(Q.RQr.createHandler("Failed to open Daily Login Calendar on startup"))),yt.hasCompletedTutorial())try{yield Ot.V.openPlayerGoalsIfPrizeReady(Gt.$N.AutoSurfaced)}catch(Ht){Q.VyI.log(`Error opening player goals: ${Ht}`,Q.$bb.Error)}if(!this._hasCheckedForPetOffersPopup&&At._.isFeatureEnabled()){this._hasCheckedForPetOffersPopup=!0;const K=null!==(Y=null===(z=this.screenData)||void 0===z?void 0:z.battleResult)&&void 0!==Y&&Y,Q=null!==(Z=null===(X=this.screenData)||void 0===X?void 0:X.didRiftBattle)&&void 0!==Z&&Z;if(K||Q){const K=mt.get("14f-4faa"),{sessionBattles:z}=yield K.getBattleStats(),Y=yt.isPlayingAtSchool(),Q=null!==(at=null===(nt=null===(J=At._.getVariables())||void 0===J?void 0:J.defeatedPetStore)||void 0===nt?void 0:nt.battlesToPrompt)&&void 0!==at?at:3,X=z.length%Q==0,Z=0!==z.length&&z[z.length-1].battleType===it.gu.NormalRiftRun,tt=mt.get("668-8a41"),{resetTime:st,defeatedPetOffers:rt}=yield tt.updateDefeatedPetOffers();if(Y||X||Z){const K=[...rt].filter((q=>q.progress.status===ht.t.IN_PROGRESS));if(K.length>0)return void pt.q.instance.prodigy.open.prefabMenu(et.l.LostPetModal,q,!0,!0,!1,{LOST_PETS_OFFER_DATA:K,LOST_PETS_RESET_TIME:st})}}}const wt=pt.q.instance.prodigy.achievements.updateAchievementsCompletion(),It=mt.get("c21-1a3f");if(this.dynamicStoreQuestManager.canTriggerOffer())return void this.dynamicStoreQuestManager.triggerCurrentOffer().catch(Q.RQr.createHandler("Error triggering offer"));const Pt=mt.get("c5a-49f2");if(Pt.shouldShowRetention)return void Pt.showChargedLevelsRetentionModal(q);if(Pt.shouldShowDecayImmunityModal)return void Pt.showChargedLevelsDecayImmunityModal(q);if(Pt.shouldShowConversionModal)return void Pt.showChargedLevelsConversionModal(q);if(he.h.shouldShowEntryIllustration(this.zoneName))return this.setupContentInputBlocker(),void this.openZoneEntryIllustration((()=>{null==q||q()}));if(Tt.U.progressData.step===rt.B.NotStarted&&yt.hasFoundAllKeystones())return void St.E.runAllKeystonesSequenceOnMapSetup(this.processPopups.bind(this,q));if(_t.J.shouldShowHardModeUnlockedPopup())return void _t.J.showDifficultyUnlockedPopup(st.i.Hard,q);if(_t.J.shouldShowExpertModeUnlockedPopup())return void _t.J.showDifficultyUnlockedPopup(st.i.Expert,q);if(Mt.J.canShowUniquePetsIntro())return void Mt.J.runUniquePetsIntroSequence(q);if(yt.justLeveled&&Jt.H.canShowEntryPopup())return void pt.q.instance.prodigy.open.prefabMenu(et.l.ZoneUnlockedPopup,(()=>{Jt.H.completeEntryBreadcrumb(),null==q||q()}),void 0,void 0,void 0,{ZONE_STATUS_MODAL_TYPE:Jt.A.UNLOCKED,ZONE_STATUS_POPUP_TARGET_ID:Xt.i.getHighestAvailableZoneData().zone});const Lt=It.currentOfferStatus!==ct.v.NO_ACTIVE_OFFER,Ut=It.shouldAutoSurfaceSegmentedOffers()&&It.userCanReceiveSegmentedOffers();if(!this._hasSeenSegmentedOffer&&Lt&&Ut){const K=mt.get("20f-5f67");if(It.userHasLastChance())return K.playerProgression.sendFunnelAdvancedEvent({funnelName:It.activeOffer.id,funnelType:"segmented_offers",stepName:Ft.l.SegmentedOffersGotExpired},{step_index:5}),this._hasSeenSegmentedOffer=!0,void Rt.P.openConfiguredModal(q);if(It.activeOffer&&Q.Aq$.isDefined(null===(lt=this.screenData)||void 0===lt?void 0:lt.battleResult)&&!It.userHasSeenFirstOffer())return K.playerProgression.sendFunnelAdvancedEvent({funnelName:It.activeOffer.id,funnelType:"segmented_offers",stepName:Ft.l.SegmentedOffersViewed},{step_index:2}),void Rt.P.openConfiguredModal((()=>{this._hasSeenSegmentedOffer=!0,It.setBreadcrumbHasSeenFirstOffer(),null==q||q()}));if(It.activeOffer&&(null===(ut=this.screenData)||void 0===ut?void 0:ut.battleResult)===it.XK.Defeat&&!It.userHasSeenFirstBattleLost())return void Rt.P.openConfiguredModal((()=>{this._hasSeenSegmentedOffer=!0,It.setBreadcrumbHasSeenFirstBattleLost(),null==q||q()}));if(It.activeOffer&&yt.justLeveled&&It.userHasChangedSegment())return It.resetSurfacingBreadcrumbs(),void Rt.P.openConfiguredModal((()=>{this._hasSeenSegmentedOffer=!0,It.setBreadcrumbHasSeenFirstOffer(),null==q||q()}))}if(yield Dt.L.shouldShowRiftsCycleModal(this._world.getCurrentZone()))return void Dt.L.openRiftsCycleModal(q);if(yt.hasCompletedTutorial()&&bt.x.shouldShowCurrencyDrainPopup(ot.L.CurrencyDrainPopup))return void bt.x.openCurrencyDrainModal(Gt.$N.AutoSurfaced,q);if(yt.hasCompletedTutorial()&&!Bt.S.openedThisSession){let K=!1;const z=mt.get(Ct.G.MathTower);if(z.isEnabledForPlayer(yt))z.redirectTowerTownPopup();else if(yt.tutorialCompletedThisSession)null==q||q();else{const z=(new Date).getTime();(Q.Aq$.isDefined(yt.data.wwCooldownTime)?z-yt.data.wwCooldownTime:vt.s.DAY_IN_MS)>=2*vt.s.HOURS_IN_MS&&(yt.data.wwCooldownTime=z,K=!0),(yield Nt.e.hasWizardWatchAccess())||(K=!1);const Y=()=>{const z=mt.get("9a2-c1c3");this._battlePassDataPromise=new Q.kBN(((q,K)=>{z.getCurrentBattlePassData().then(q).catch(K)})),this._battlePassDataPromise.promise.then((z=>{if(K){const K=()=>{mt.get("983-05a7").loadWithDependenciesFromGUID(et.l.PushNotificationPermission).catch((q=>{Q.VyI.log("Error loading push notification permission prefab",Q.$bb.Error)})),null==q||q()};this.openFeed(K)}else null==q||q()})).catch(Q.RQr.createHandler("Walkable Screen: Error retrieving battle pass data"))},X=q=>{q||window.clearTimeout(this._friendListLoadTimeoutID),this._friendListLoadTimeoutID=null,this.prodigyGame.broadcaster.removeAppListener(xt.sd.GotFriendsListAppearance,this,"FriendsListOfActualFriends"),Y()};pt.q.instance.prodigy.friendsListNetworkHandler.hasReceivedFriendsAppearanceOfActualFriends?Y():(pt.q.instance.game.broadcaster.addAppListener(xt.sd.GotFriendsListAppearance,X.bind(this,!1),this,"FriendsListOfActualFriends",!1),this._friendListLoadTimeoutID=window.setTimeout(X.bind(this,!0),2e3))}return void(K||this.showSpellStatusEffectTutorialIfNeeded())}if(yt.hasUnclaimedMembershipRewards())return void(yield yt.rewardMembershipPrizes(q));if(yt.hasCompletedTutorial()&&!(yt.memberPrompt||!yt.hasMembership()&&ne.J.isSchoolHours()||yt.hasMembership()&&yt.backpack.hasItem("mount",1)>0)&&(!yt.isPlayingAtSchool()||yt.hasUnclaimedMembershipRewards())&&(yt.getMemberTier()===dt._$.NonMember&&te.pF.isNativeApp()||!te.pF.isNativeApp())){if(yt.seenMapTransitionPromptThisSession=!0,Kt.P.shouldUseUnifiedConversionFlow(ae.o.FunnelTransitMap))return void pt.q.instance.prodigy.open.unifiedConversionFlow(q,{conversionFunnelName:ae.o.FunnelTransitMap,conversionStage:ae.o.StageTransitMap},Gt.$N.AutoSurfaced);const K=mt.get("20f-5f67").purchase,z=gt.R.loadData(tt.r.LevelBasedPromptsRuleset_json),Y=qt.H.evaluate(ae.o.FunnelTransitMap,z);if(Y){const z=class{static selectLevelBasedAdAtRandomButNotTwiceInARow(q){const K=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=K.data.lastSeenLevelBasedMemberPrompt,Y=z?q.filter((q=>q!==z)):q,Q=Math.floor(Math.random()*Y.length);return K.data.lastSeenLevelBasedMemberPrompt=Y[Q],K.updated=!0,Y[Q]}}.selectLevelBasedAdAtRandomButNotTwiceInARow(Y.assets);pt.q.instance.prodigy.open.dynamicPrompt(z,{MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_NAME:ae.o.FunnelTransitMap},{originType:Gt.$N.AutoSurfaced},q);const Q=Kt.P.shouldUseUnifiedConversionFlow(ae.o.FunnelTransitMap)?Qt.R.UnifiedConversionFlow:Qt.R.DynamicMemberPrompt,X=null===(ft=gt.R.loadData(z))||void 0===ft?void 0:ft.name;K.sendFunnelStart({adType:Q,category:"Map-Transition",contentId:X,type:"Map-Transition",adVersion:Kt.P.getAdVersion(ae.o.FunnelTransitMap)})}return}if(yield ee.N.shouldShowFeaturedPetPopup())return void ee.N.openFeaturedPetPopup((()=>null==q?void 0:q()));if(wt.length>0){for(let q=0;qK!==q.userID))}this.hasBroadcastedInfo=!1,Q.VyI.log(`Pending players are of size: ${this.pendingPlayers.length}`,Q.$bb.Verbose)}}onPlayerJoined(q){if(!Q.Aq$.isDefined(this.content)||this._world.isZoneSinglePlayer(this._world.getCurrentZone()))return;q!==pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.userID&&(Q.Aq$.isDefined(this.playersInfo[q])&&(null===this.pendingPlayers||0===this.pendingPlayers.length?(this.addPlayer(this.playersInfo[q]),Q.Aq$.isDefined(this.pendingCoordinates[q])&&this.movePlayer(this.pendingCoordinates[q])):(this.pendingPlayers.push(q),this.hasBroadcastedInfo=!1)),Q.Aq$.isDefined(this.user)&&this.user.broadcastPlayerFullInfo(q))}onPlayerLeft(q){this.removePlayer(q)}removePlayer(q){Q.Aq$.isDefined(this.playerList[q])&&Q.Aq$.isDefined(this.content)&&(this.removeFollow(q),this.content.removeChild(this.playerList[q]),this.playerList[q].destroy(),delete this.playerList[q])}canAddUsersToScreen(){const q=X.size(this.playerList);return ne.J.isAvgFrameRateAboveThreshold(vt.s.get("GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_LIMIT"))?ne.J.isAvgFrameRateAboveThreshold(vt.s.get("GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_RENABLE"))&&vt.s.resetMaxPlayerLimit():vt.s.setMaxPlayerLimit(Math.max(q,vt.s.get("GameConstants.Build.MAX_ON_SCREEN_FPS_LIMITED"))),q0){const K=this.playerList[q.userID].position,z=mt.t.getItem("fx",q.type).data;let Y=z.projectileCount;do{window.setTimeout((()=>{pt.q.instance.prodigy.effects.playFX(q.type,K.x,K.y,q.x,q.y)}),z.delay*Y),Y--}while(Y>0)}}movePlayer(q){Q.Aq$.isDefined(this.playerList)&&Q.Aq$.isDefined(this.playerList[q.userID])&&Q.Aq$.isDefined(q.target)&&this.playerList[q.userID].setNewTarget(q.target.x,q.target.y)}handlePlayerChatMessage(q){if(Q.Aq$.isDefined(this.playerList)&&Q.Aq$.isDefined(this.playerList[q.userID])){const K=this.playerList[q.userID];Q.Aq$.isDefined(q.emoteID)?K.emote(q.emoteID):Q.Aq$.isDefined(q.chatID)?K.startChat(q.chatID):Q.Aq$.isDefined(q.danceID)&&K.dance(q.danceID)}}transformPlayer(q){Q.Aq$.isDefined(this.playerList)&&Q.Aq$.isDefined(this.playerList[q.userID])&&(q.transformID?this.playerList[q.userID].transformToItem(q.transformType,q.transformID,Q.Aq$.isDefined(q.showEffect)&&q.showEffect,null):this.playerList[q.userID].resetItemTransformation(Q.Aq$.isDefined(q.showEffect)&&q.showEffect))}removeFollow(q){const K=q===pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.userID?this.user:this.playerList[q];Q.Aq$.isDefined(K)&&Q.Aq$.isDefined(K.follow)&&(this.content.removeChild(K.follow),K.follow.destroy(),delete K.follow)}addFollow(q,K){if(!Q.Aq$.isDefined(this.content))return;const z=q===pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.userID?this.user:this.playerList[q];if(Q.Aq$.isDefined(z)&&(this.removeFollow(q),Q.Aq$.isDefined(K))){const q=pt.q.instance.prodigy.create.follow(this.content,K,1,z);Q.Aq$.isDefined(q)&&Q.Aq$.isDefined(q.reload)&&q.reload(),z.follow=q}}screenUpdate(){if(super.screenUpdate(),null!==this.pendingPlayers&&this.pendingPlayers.length>0&&this.canStartAddingPlayers)if(this.frameUntilAddNextPlayer>de.FRAMES_BETWEEN_ADDING_PLAYERS){this.frameUntilAddNextPlayer=0;const q=this.pendingPlayers.pop();q!==pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.userID&&Q.Aq$.isDefined(this.playersInfo[q])&&(this.addPlayer(this.playersInfo[q]),Q.Aq$.isDefined(this.pendingCoordinates[q])&&this.movePlayer(this.pendingCoordinates[q])),Q.Aq$.isDefined(this.user)&&!this.hasBroadcastedInfo&&(this.user.broadcastPlayerFullInfo(),this.hasBroadcastedInfo=!0)}else this.frameUntilAddNextPlayer++;0===pt.q.instance.prodigy.open.menus.length&&0===pt.q.instance.prodigy.open.renderMenus.length&&null===pt.q.instance.prodigy.open.chatMenu&&null===pt.q.instance.prodigy.notifications.notificationTimer&&pt.q.instance.prodigy.notifications.startTimer(),Q.Nj.insertion(this.content.children,Q.I6z.Y_SORT);const q=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(null==q?void 0:q.appearanceChanged){q.appearanceChanged=!1,this.user.reload(),this.user.showName(),this.addFollow(q.userID,this.hideHex?null:q.equipment.getFollow());pt.q.instance.prodigy.gameContainer.get("774-4659").emitMessage({action:re.x.Change})}}listener(q,K){if(!this.walkEnabled)return;const z=Q.Aq$.isDefined(K)?K.x:Math.round(this.prodigyGame.input.x),Y=Q.Aq$.isDefined(K)?K.y:Math.round(this.prodigyGame.input.y);for(let Q=0;Q=q.x&&z<=q.x+q.w&&Y>=q.y&&Y<=q.y+q.h)return void q.callback()}this.prodigyGame.broadcaster.broadcast(xt.pm.MovePlayer,null,[z,Y])&&this.addPathingIcon(z,Y)}addPathingIcon(q,K){const z=pt.q.instance.prodigy.create.sprite(q,K,Z._.General_icons_json,"star-small");z.scale.set(0,0),z.anchor.set(.5,.5),this.content.addChild(z),this.prodigyGame.add.tween(z,this).to({alpha:0},600,Q.GS3.Cubic.In,!0);this.prodigyGame.add.tween(z.scale,this).to({x:1,y:1},600,Q.GS3.Linear.None,!0).onTweenComplete.add((()=>{z.destroy()}))}getInjectedValue(q){return pt.q.instance.prodigy.gameContainer.get(q)}hideOtherPlayer(q){const K=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return q.userID===K.userID||!q||!this.content||this._world.isZoneSinglePlayer(this._world.getCurrentZone())}openHUD(){if(Q.Aq$.isDefined(this.menuBarCreationPromise))return;const q=pt.q.instance.prodigy.gameContainer.get("983-05a7");this.menuBarCreationPromise=q.loadWithDependenciesFromGUID(ft.x.isFeatureEnabled()?et.l.HUDMenuBar2025:this.hudMenuStyle),this.menuBarCreationPromise.then((q=>this.hudLoaded(q)))}hudLoaded(q){q.parent=this.menuBar;const K=pt.q.instance.prodigy.game.time.events.loop(vt.s.TARGET_FPS_40_MS,q.update,q);q.onDestroy.addOnce((()=>pt.q.instance.prodigy.game.time.events.remove(K))),se.d.updateInjectedValues(q,{[wt.P.WantsAttention]:this._hasSeenSegmentedOffer,[wt.P.JustSeenSegmentedOfferPopup]:[et.l.LostPetModal,et.l.SegmentedOffersModal].some((q=>this._initiallySeenPopupIDs.includes(q)))})}updateOnFaintData(){var q;const K=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;(null===(q=K.onFaintData)||void 0===q?void 0:q.mapKey)!==this._world.getCurrentMap()&&(K.onFaintData={mapKey:this._world.getCurrentMap(),coordinates:{x:this.user.position.x,y:this.user.position.y}})}openZoneEntryIllustration(q){he.h.openZoneEntryIllustrationPrefabForZone(this.zoneName.split("-")[0]).then((K=>{pt.q.instance.game.broadcaster.broadcast(xt.Y1.HideHUD,xt.HG.HUD),this.destroyContentInputBlocker(),K.findComponentInChildren(oe.V).onComplete.addOnce((()=>{pt.q.instance.game.broadcaster.broadcast(xt.Y1.ShowHUD,xt.HG.HUD),null==q||q(),K.destroy()}))})).catch(Q.RQr.createHandler("Could not load the zone entry illustration prefab"))}setupContentInputBlocker(){if(Q.Aq$.isDefined(this._contentInputBlocker))return;this._contentInputBlocker=new Q._mx,this._contentInputBlocker.addComponent(Q.dLy);this._contentInputBlocker.addComponent(Lt.n).setSize(this.game.width,this.game.height),this.contentGameObject.addChild(this._contentInputBlocker),this._contentInputBlocker.setLayer(zt.E.ForegroundLayer)}destroyContentInputBlocker(){var q;null===(q=this._contentInputBlocker)||void 0===q||q.destroy(),this._contentInputBlocker=null}}de.FRAMES_BETWEEN_ADDING_PLAYERS=5,(0,Y.Cg)([(0,Q.fFd)("11f-118a"),(0,Y.Sn)("design:type",Object)],de.prototype,"featureRequirements",void 0),(0,Y.Cg)([(0,Q.fFd)("fa1-8ec9"),(0,Y.Sn)("design:type",jt.F)],de.prototype,"breadcrumbManager",void 0),(0,Y.Cg)([(0,Ht.b)("668-8a41"),(0,Y.Sn)("design:type",It.s)],de.prototype,"dynamicStoreQuestManager",void 0)},14335:(q,K,z)=>{"use strict";z.d(K,{P:()=>ot});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(76974),J=z(99625),tt=z(129),et=z(21492),it=z(24110),st=z(80060),nt=z(45716),at=z(28080),rt=z(81617);class ot extends rt.R{get _prefabGuid(){return J.l.DuelsLoadingScreen}constructor(q,K){super(),this.onCloseClicked=new Q.HN0,this.data.playerA=q,Q.Aq$.isDefined(K)&&(this.data.playerB=tt.a.fromCharacter(X.q.instance.game,K))}create(){this._playerA=this.data.playerA,this._playerB=this.data.playerB;X.q.instance.prodigy.gameContainer.get("774-4659").leaveZone(),this.startTime=Date.now(),this.complete=!1,this.isLoaded=!1,this.element=X.q.instance.prodigy.create.element(void 0),this.loadPrefab().then((()=>{this.start()})).catch((q=>{Q.RQr.logError(q,"Failed to load duel loading screen"),this.showErrorPopup(X.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(nt.l.CheckNetworkConnection))}))}loadPrefab(){return(0,Y.sH)(this,arguments,void 0,(function*(q={}){var K,z;const Z=X.q.instance.prodigy.gameContainer.resolve(et.C),J=[this._playerA,this._playerB].filter((q=>q)),[tt,nt]=J.map((q=>(Z.init(q.appearance.getName()),Z.getName()))),rt=yield Promise.all(J.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){const K=new Q._mx;K.active=!1,K.addComponent(Q.dLy);const z=yield at.D.createWizardObject(q,!1);return K.addChild(z),z.setLayer(void 0,!0),K})))));rt[1]&&(rt[1].transform.localScale.x=-1);const ot=this._prefabRoot=new Q._mx;ot.addComponent(Q.dLy),X.q.instance.game.add.graphics(0,0,this.element).beginFill(16703937).drawRect(0,0,X.q.instance.game.width,X.q.instance.game.height),this.element.addChild(ot.addComponent(it.B).getRootContainer()),yield st.d.loadWithInjectedValuesAndDependenciesFromGUID(X.q.instance.prodigy.gameContainer.get("983-05a7"),this._prefabGuid,Object.assign({PLAYER_1_NAME:tt,PLAYER_2_NAME:nt,PLAYER_1_LEVEL:this._playerA.getLevel(),PLAYER_2_LEVEL:null===(K=this._playerB)||void 0===K?void 0:K.getLevel(),PLAYER_1_AVATAR:rt[0],PLAYER_2_AVATAR:rt[1],CLOSE_ON_CLICK:()=>this.onCloseClicked.dispatch()},q),ot),this._closeButton=Q.Uoy.getInjectedValue(ot,"CLOSE_BUTTON"),this._closeButton.GameObject.active=null===(z=this.data.showCancel)||void 0===z||z;for(const Y of rt)Y.active=!0;return ot}))}hideCancelButton(){var q;null===(q=this._closeButton)||void 0===q||q.lockState(Z.K.Disabled)}update(){var q;super.update(),null===(q=this._prefabRoot)||void 0===q||q.update()}shutdown(){var q;this.onCloseClicked.dispose(),null===(q=this._prefabRoot)||void 0===q||q.destroy(),super.shutdown()}}},76277:(q,K,z)=>{"use strict";z.d(K,{G:()=>X,_:()=>Z});var Y=z(77601);(0,Y.gb)({key:"regional-bundle-triggers",default:!1,activateAssociatedExperiments:0}),(0,Y.gb)({key:"use-membership-for-magicoin-out-of-magicoin-prompt",default:!1,activateAssociatedExperiments:0}),(0,Y.gb)({key:"vanity-gear-sale",default:!1,activateAssociatedExperiments:0}),(0,Y.gb)({key:"reward-scaling",default:{enabled:!1},activateAssociatedExperiments:0}),(0,Y.gb)({key:"respawn-timers",default:{enabled:!1}});var Q=z(35120);(0,Y.gb)({key:"shorten-placement-test-game",activateAssociatedExperiments:0,default:{enabled:!1}});function X(q){return Q.q.instance.prodigy.gameContainer.get("9fe-5b45").getFeatureValue(q.key)}function Z(q){return Q.q.instance.prodigy.gameContainer.get("9fe-5b45").isOn(q.key)}},65443:(q,K,z)=>{"use strict";var Y;z.d(K,{$:()=>Y}),function(q){q.Titan="titan",q.TitanMemberBonus="Titan-Member-Bonus"}(Y||(Y={}))},72042:(q,K,z)=>{"use strict";z.d(K,{U:()=>ot});var Y,Q,X=z(8674),Z=z(62459),J=z(79687),tt=z(95891),et=z(68910),it=z(35120),st=z(51477),nt=z(34829),at=z(30405),rt=z(47255);!function(q){q.Image="image",q.Pixel="pixel",q.Sound="sound",q.Text="text",q.Json="json"}(Q||(Q={}));let ot=Y=class{constructor(q,K){this.loadingMetricProperties={},this.objectCountProperties={},this.deviceInfoProvider=null,this.crashedLastLogin=!1,this._totalAssetDownloadSize=0,this._totalAssetDownloadTime=0,this._totalAssetsDownloaded=0,this._averageDownloadSpeed=0,this._networkRequestCount=0,this._supportsWasm=!1,this.timeToPlayMS=0,this.timeInLoadingMS=0,this.pingMetricsIndex=0,this.game=q,this.deviceInfoProvider=K,this._supportsWasm="object"==typeof window.WebAssembly&&"function"==typeof window.WebAssembly.instantiate}createPingMetricEvent(q,K,z,Q){const X=it.q.instance.prodigy.gameContainer,Z=X.get("ad2-c5b2").player;if(nt.s.get("GameConstants.Build.ENABLE_FRAMERATE_METRICS")&&at.o.inTestGroups(Z,Y.TEST_GROUPS)){X.get("20f-5f67").technical.sendPingEvent(++this.pingMetricsIndex,q,K,z,Q)}}createLoadingMetricEvent(q,K,z=!1,Q={}){const X=it.q.instance.prodigy.gameContainer,J=X.get("ad2-c5b2").player;let et=!1;if(nt.s.get("GameConstants.Build.ENABLE_LOADING_METRICS")&&(at.o.inTestGroups(J,Y.TEST_GROUPS)||q===rt.o.FunnelCharSelect)){const z=it.q.instance.prodigy.timeManager.getServerTimeMs(),Y=tt.merge(Q,this.getCustomMetrics()),J=this.loadingMetricProperties[q];let st=z,nt=0,at=!0;if(J&&(nt=J.loadingMetricsIndex,K===rt.o.StageLoadEnd&&(st=J.loadingTimeStartMS)),K===rt.o.StageLoadStart)nt++,this.loadingMetricProperties[q]={loadingMetricsIndex:nt,loadingTimeStartMS:st};else if(K===rt.o.StageLoadEnd){J||Z.VyI.log("Stage load end found without stage load start.",Z.$bb.Warning);const q=z-st;Y.loadTime=q}else Z.VyI.log(`Unsupported loading metric type ${K}`,Z.$bb.Warning),at=!1;if(at){const z=this.getLoadingEventData(Y),Q=K===rt.o.StageLoadStart?"Technical Loading Started":"Technical Loading Completed";X.get("20f-5f67").technical.sendLoadingEvent(Q,q,nt,z),et=!0}}return et}getLoadingEventData(q){if(!nt.s.get("GameConstants.Build.ENABLE_ADVANCED_METRICS"))return{};const K={};Z.Aq$.isDefined(this.objectCountProperties.Element)&&(K.elements_created=this.objectCountProperties.Element.createdCount,K.elements_destroyed=this.objectCountProperties.Element.destroyedCount),Z.Aq$.isDefined(this.objectCountProperties.GameObject)&&(K.objects_created=this.objectCountProperties.GameObject.createdCount,K.objects_destroyed=this.objectCountProperties.GameObject.destroyedCount),Z.Aq$.isDefined(this.objectCountProperties.UIElement)&&(K.ui_elements_created=this.objectCountProperties.UIElement.createdCount,K.ui_elements_destroyed=this.objectCountProperties.UIElement.destroyedCount),K.connection_downlink_speed=this.deviceInfoProvider.getConnectionDownlinkSpeed(),K.connection_rtt=this.deviceInfoProvider.getConnectionRTT(),K.connection_type=this.deviceInfoProvider.getConnectionType(),K.effective_connection_type=this.deviceInfoProvider.getConnectionEffectiveType(),K.device_memory=this.deviceInfoProvider.getDeviceMemory(),K.hardware_concurrency=this.deviceInfoProvider.getHardwareConcurrency(),K.js_heap_size_limit=this.deviceInfoProvider.getJSHeapSizeLimit(),K.js_heap_size_used=this.deviceInfoProvider.getUsedJSHeapSize(),K.crashed_last_login=this.crashedLastLogin,K.crashed_time=this.crashedLastTime,K.api_request_count=this._networkRequestCount,K.total_asset_bytes_downloaded=this._totalAssetDownloadSize,K.total_asset_time_downloading=this._totalAssetDownloadTime,K.average_download_speed=this.getAverageDownloadSpeedMBps();const z=this.getRenderInfo();K.render_type=z.renderType,K.webgl_version=z.webGLVersion,K.web_worker_support=this.deviceInfoProvider.isWebWorkerAvailable(),K.web_assembly=this._supportsWasm,K.web_socket=this.deviceInfoProvider.isWebSocketAvailable();const Y=this.getAssetCounts();return K.image_count=Y[Q.Image],K.pixel_count=Y[Q.Pixel],K.sound_count=Y[Q.Sound],K.text_count=Y[Q.Text],K.json_count=Y[Q.Json],K}getAverageDownloadSpeedMBps(){return this._averageDownloadSpeed/1e6*8}getRenderInfo(){switch(it.q.instance.game.renderer.type){case et.RENDERER_TYPE.WEBGL:return{renderType:"webGL",webGLVersion:String(this.game.renderer.context.webGLVersion)};case et.RENDERER_TYPE.CANVAS:return{renderType:"canvas",webGLVersion:"NA"};default:return{renderType:"unknown",webGLVersion:"NA"}}}getAssetCounts(){const q=this.game.cache,K={[Q.Image]:0,[Q.Pixel]:0,[Q.Sound]:0,[Q.Text]:0,[Q.Json]:0};for(const z in Z.r05)if(isNaN(Number(z))){const Y=Z.r05[z],X=q.getKeys(Y),J=X.length;let tt=null;switch(Y){case Z.r05.IMAGE:tt=Q.Image;let z=0;for(let K=0;K{localStorage.setItem("prodigy_browser_status","unloaded")}));const q=localStorage.getItem("prodigy_browser_status");this.crashedLastLogin=Z.Aq$.isDefined(q)&&"unloaded"!==q,this.crashedLastLogin&&(this.crashedLastTime=localStorage.getItem("prodigy_browser_time"),Z.Aq$.isDefined(this.crashedLastTime)||(this.crashedLastTime=null)),localStorage.setItem("prodigy_browser_status","loaded"),this.setLastMapLoadStarted("none"),setInterval((()=>{localStorage.setItem("prodigy_browser_time",(new Date).toISOString())}),1e3)}}catch(e){Z.VyI.log("checkForCrash failed",Z.$bb.Error)}}setLastMapLoadStarted(q){Z.o5U.hasLocalStorageSupport()&&localStorage&&localStorage.setItem("prodigy_browser_map_load",q)}setInBattle(q){Z.VyI.log(`setInBattle(${q})`,Z.$bb.Verbose),Z.o5U.hasLocalStorageSupport()&&localStorage&&(Z.Aq$.isDefined(q)?localStorage.setItem("prodigy_browser_in_battle",q):localStorage.removeItem("prodigy_browser_in_battle"))}objectCreated(q){const K=this.objectCountProperties[q];Z.Aq$.isDefined(K)?K.createdCount=K.createdCount+1:this.objectCountProperties[q]={createdCount:1,destroyedCount:0}}objectDestroyed(q){const K=this.objectCountProperties[q];Z.Aq$.isDefined(K)?K.destroyedCount=K.destroyedCount+1:(Z.VyI.log("object destroyed before created",Z.$bb.Warning),this.objectCountProperties[q]={createdCount:0,destroyedCount:1})}setLastGameSessionStartTime(q){this.lastGameSessionStartTime=q}getLastGameSessionStartTime(){return this.lastGameSessionStartTime}assetDownloaded(q,K){this._totalAssetDownloadSize+=q,this._totalAssetDownloadTime+=K,++this._totalAssetsDownloaded;const z=q/K;this._averageDownloadSpeed+=(z-this._averageDownloadSpeed)/this._totalAssetsDownloaded}increaseNetworkRequestCount(){++this._networkRequestCount}sendOnboardingFunnelEvent(q){it.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:q})}};ot.TEST_GROUPS=[5],ot.loadEventsSent={},ot=Y=(0,X.Cg)([(0,J.injectable)(),(0,X.Qj)(0,(0,J.inject)("d73-66e9")),(0,X.Qj)(1,(0,J.inject)("6b8-7833")),(0,X.Sn)("design:paramtypes",[st.n,Object])],ot)},98193:(q,K,z)=>{"use strict";z.d(K,{z:()=>ct});var Y,Q=z(62459),X=z(28628),Z=z(90633);!function(q){q[q.None=0]="None",q[q.CriticalHit=1]="CriticalHit",q[q.Effective=2]="Effective",q[q.Ineffective=4]="Ineffective",q[q.Missed=8]="Missed",q[q.Heal=16]="Heal",q[q.Fumble=32]="Fumble",q[q.Absorb=64]="Absorb",q[q.Reflected=128]="Reflected",q[q.Dodge=256]="Dodge"}(Y||(Y={}));var J=z(35120),tt=z(34829),et=z(22023),it=z(10670),st=z(24047),nt=z(65050),at=z(25089),rt=z(67665);const ot={critical:Y.CriticalHit,effective:Y.Effective,ineffective:Y.Ineffective,heal:Y.Heal,absorbed:Y.Absorb,reflected:Y.Reflected,dodged:Y.Dodge},ht=new Set([X.gu.StatusEffectsTutorial]);class ct extends at.v{get battleId(){var q;return null===(q=this._baseData)||void 0===q?void 0:q.battle_id}setupBattleData(q){var K,z,Y,Q;const X=q.resumedData;this._baseData={battle_id:q.battle_id,battle_type:q.battle_type,battle_variant:q.battle_variant},this._questionData={questions_answered_correctly:null!==(K=null==X?void 0:X.questionsAnsweredCorrectly)&&void 0!==K?K:0,questions_asked:null!==(z=null==X?void 0:X.questionsAnswered)&&void 0!==z?z:0},this._numberOfRounds=null!==(Y=null==X?void 0:X.numberOfRounds)&&void 0!==Y?Y:0,this._turn=null!==(Q=null==X?void 0:X.turn)&&void 0!==Q?Q:0,this._battleStartTimeMs=Date.now(),this._numberOfClicks=0,this._battleInstanceAndId={instance_id:q.instance_id,instance_type:q.instance_type}}sendBattleStartEvent(q,K=null){if(this.setupBattleData(q),this.shouldSuppressBattleEvents())return;const z=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{boss:q.battle_variant.includes(it.VB.Boss)||!1,pvp:q.battle_type===X.gu.Duel&&q.battle_variant!==it.VB.DuelsStadiumBot,coop:!1}),q),K),this.getCommonEventDataProperties());rt.Y.track("Battle Started",z)}sendBattleResumedEvent(q,K=null){if(this.setupBattleData(q),this.shouldSuppressBattleEvents())return;const z=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{boss:q.battle_variant.includes(it.VB.Boss)||!1,pvp:q.battle_type===X.gu.Duel&&q.battle_variant!==it.VB.DuelsStadiumBot,coop:!1}),q),K),this.getCommonEventDataProperties());rt.Y.track("Battle Resumed",z)}sendBattleCompleteEvent(q,K=null){var z;if(!(null===(z=this._baseData)||void 0===z?void 0:z.battle_id))return void Q.VyI.log("Error: Battle Complete event cannot be sent before Battle Start or Resume event",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const Y=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),this._questionData),this._battleInstanceAndId),{rounds:this._numberOfRounds,turn:this._turn,duration:(Date.now()-this._battleStartTimeMs)/tt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER}),q),K),this.getCommonEventDataProperties());rt.Y.track("Battle Completed",Y)}sendBattleParticipantEnteredEvent(q,K=null){var z;if(!(null===(z=this._baseData)||void 0===z?void 0:z.battle_id))return void Q.VyI.log("Error: Battle Participant Entered event cannot be sent before Battle Start or Resume event",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const Y=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{entry_round:this._numberOfRounds,turn:this._turn}),q),K),this.getCommonEventDataProperties());rt.Y.track("Battle Participant Entered",Y)}sendBattleParticipantOutcomesEvent(q,K=null){var z;if(!(null===(z=this._baseData)||void 0===z?void 0:z.battle_id))return void Q.VyI.log("Error: Battle Participant Outcomes event cannot be sent before Battle Start or Resume event",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const Y=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),q),K),this.getCommonEventDataProperties());rt.Y.track("Battle Participant Outcomes",Y)}sendBattlePetCapturedEvent(q,K=null){var z;if(!(null===(z=this._baseData)||void 0===z?void 0:z.battle_id))return void Q.VyI.log("Error: Pet Captured Event cannot be sent before Battle Start or Resume event.",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const Y=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{pet_name:q.petName,pet_element:q.petElement,pet_type:q.petType,pet_level:q.petLevel,pet_rarity:q.petRarity,pet_rank:q.petRank,prev_pet_copies:q.previousPetCopies,capture_source:q.captureSource}),K),this.getCommonEventDataProperties());rt.Y.track("Pet Captured",Y)}sendBattlePetRescueAvailableEvent(q,K=null){var z;if(!(null===(z=this._baseData)||void 0===z?void 0:z.battle_id))return void Q.VyI.log("Error: Pet Rescue Available Event cannot be sent before Battle Start or Resume event.",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const Y=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),q),K),this.getCommonEventDataProperties());rt.Y.track("Pet Rescue Available",Y)}sendBattlePetCaptureFailedEvent(q,K=null){var z;if(!(null===(z=this._baseData)||void 0===z?void 0:z.battle_id))return void Q.VyI.log("Error: Pet Capture Failed Event cannot be sent before Battle Start or Resume event.",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const Y=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{pet_name:q.petName,pet_element:q.petElement,pet_type:q.petType,pet_level:q.petLevel,pet_rarity:q.petRarity,fail_reason:q.failReason,prev_pet_copies:q.previousPetCopies,funnel_id:"Member Locked"===q.failReason?this._segment.purchase.getFunnelID():null,capture_source:q.captureSource}),K),this.getCommonEventDataProperties());rt.Y.track("Pet Capture Failed",Y)}sendBattleActionPerformedEvent(q){var K;if(!(null===(K=this._baseData)||void 0===K?void 0:K.battle_id))return void Q.VyI.log("Error: Battle Action Performed event cannot be sent before Battle Start or Resume event",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const z=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{round:this._numberOfRounds,turn:this._turn}),q),this.getCommonEventDataProperties());rt.Y.track("Battle Action Performed",z)}sendBattleMpRecoveryAttemptedEvent(q){var K;if(!(null===(K=this._baseData)||void 0===K?void 0:K.battle_id))return void Q.VyI.log("Error: Battle MP Recovery Attempted event cannot be sent before Battle Start or Resume event",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const z=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{round:this._numberOfRounds,turn:this._turn,question_uuid:this._recentQuestionUuid}),q),this.getCommonEventDataProperties());rt.Y.track("Battle MP Recovery Attempted",z)}sendBattleInterfaceClickedEvent(q,K=null){var z;if(!(null===(z=this._baseData)||void 0===z?void 0:z.battle_id))return void Q.VyI.log("Error: Battle Interface Clicked event cannot be sent before Battle Start or Resume event",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const Y=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{round:this._numberOfRounds,turn:this._turn,clicks:++this._numberOfClicks}),q),K),this.getCommonEventDataProperties());rt.Y.track("Battle Interface Clicked",Y)}sendBattleFunnelAdvancedEvent(q,K=null){if(this.shouldSuppressBattleEvents())return;const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());rt.Y.track("Funnel Advanced",z)}sendEndGameFunnelAdvancedEvent(q,K,z){if(this.shouldSuppressBattleEvents())return;const Y=J.q.instance.prodigy.breadcrumbManager;z&&Y.isBreadcrumbComplete(Z.B.FEATURE_ENDGAME_QUEST,z)||(z&&Y.completeBreadcrumb(Z.B.FEATURE_ENDGAME_QUEST,z),this.sendBattleFunnelAdvancedEvent({funnel_name:st.F.EndGame,funnel_type:st.M.Chapter,step_index:q,step_name:K}))}sendSpellStatusEffectAppliedEvent(q){var K;if(!(null===(K=this._baseData)||void 0===K?void 0:K.battle_id))return void Q.VyI.log("Error: Spell Status Effect Applied event cannot be sent before Battle Start or Resume event",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const z=Object.assign(Object.assign(Object.assign({},q),this._baseData),this.getCommonEventDataProperties());rt.Y.track("Spell Status Effect Applied",z)}sendSpellStatusEffectTriggeredEvent(q){var K;if(!(null===(K=this._baseData)||void 0===K?void 0:K.battle_id))return void Q.VyI.log("Error: Spell Status Effect Triggered event cannot be sent before Battle Start or Resume event",Q.$bb.Error);if(this.shouldSuppressBattleEvents())return;const z=Object.assign(Object.assign(Object.assign({},q),this._baseData),this.getCommonEventDataProperties());rt.Y.track("Spell Status Effect Triggered",z)}getSegmentBattleType(q){switch(q){case X.gu.Tutorial1:case X.gu.Tutorial2:case X.gu.Tutorial3:case X.gu.Titan:return it.ju.Titan;case X.gu.EndgamePippet:case X.gu.EndGameGuardianFirefly:case X.gu.EndGameGuardianShiverchill:case X.gu.EndGameGuardianBonfire:case X.gu.EndGameGuardianShipwreck:case X.gu.EndGameGuardianSkywatch:return it.ju.EndGame;case X.gu.EndGamePuppetMaster:return it.ju.PuppetMaster;case X.gu.MatchmakingDuel:case X.gu.MatchmakingBotDuel:return X.gu.Duel}return q}getBattleVariant(q,K){var z,Y;let Q=it.VB.Standard;switch(q){case X.gu.Basic:case X.gu.FestivalDailyBoss:null===(z=K.units)||void 0===z||z.forEach((q=>{37===q.creature.id?Q=it.VB.Pippet:q.type===X.uj.Wizard?Q=it.VB.CloakedWizard:q.type===X.uj.Boss&&(Q=it.VB.Boss)}));break;case X.gu.Ultimates:Q=this.getUltimatesBattleVariant(K.questData);break;case X.gu.Tutorial1:Q=it.VB.Tutorial1;break;case X.gu.Tutorial2:Q=it.VB.Tutorial2;break;case X.gu.Tutorial3:Q=it.VB.Tutorial3;break;case X.gu.Titan:Q=it.VB.Titan;break;case X.gu.MatchmakingDuel:Q=it.VB.DuelsStadium;break;case X.gu.MatchmakingBotDuel:Q=it.VB.DuelsStadiumBot;break;case X.gu.EndgamePippet:case X.gu.EndGameGuardianFirefly:case X.gu.EndGameGuardianShiverchill:case X.gu.EndGameGuardianBonfire:case X.gu.EndGameGuardianShipwreck:case X.gu.EndGameGuardianSkywatch:case X.gu.EndGamePuppetMaster:case X.gu.PumpkinfestBoss:Q=it.VB.Boss;break;case X.gu.NormalRiftRun:Q=it.VB.RiftRun;break;case X.gu.BossRiftRun:Q=it.VB.DragonRift}switch(K.instanceType){case nt.N.CrystalCaverns:(null===(Y=K.units)||void 0===Y?void 0:Y.some((q=>q.type===X.uj.Wizard)))&&(Q=it.VB.Boss)}return Q}getUltimatesBattleVariant(q){switch(J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.ultimateTaskId>0?q.getTamingLevel()+1:1){case 1:return it.VB.Stage1;case 2:return it.VB.Stage2;case 3:return it.VB.Stage3}}getBattleCharacterType(q,K,z){let Y;return Y=q?it.Xn.Wizard:this._baseData.battle_type===X.gu.Ultimates?it.Xn.Mythic:z?et.P8.getPetEvolutionType(K):it.Xn.Uncapturable,Y}updateQuestionData(q,K){this._recentQuestionUuid=K,this._questionData.questions_asked++,q&&this._questionData.questions_answered_correctly++}setRoundNumber(q){this._numberOfRounds=q}setTurn(q){this._turn=q}getCurrentBattleID(){var q;return null===(q=this._baseData)||void 0===q?void 0:q.battle_id}getUnitRarity(q,K){let z=q?-1:null!=K?K:-1;return this._baseData.battle_variant===it.VB.DuelsStadiumBot&&(z=this._segment.duelsStadium.botDifficulty),z}getUnitName(q,K){return q?ct.PLAYER_SEGMENT_ID:Q.Aq$.isDefined(K.unitNameForSegment)?K.unitNameForSegment:K.name}getUnitPosition(q,K){return q?q.creature.isOpponent?K.rightTeam.rawUnits.findIndex((K=>K.battleId===q.battleId)):K.leftTeam.rawUnits.findIndex((K=>K.battleId===q.battleId)):-1}getHitInformation(q){return q.map((q=>{const K={damage:q.damage};return Object.keys(ot).forEach((z=>{const Y=ot[z];q.damageInformation&Y&&(K[z]=!0)})),K}))}shouldSuppressBattleEvents(){var q;return ht.has(null===(q=this._baseData)||void 0===q?void 0:q.battle_type)}}ct.PLAYER_SEGMENT_ID="Player"},10670:(q,K,z)=>{"use strict";var Y,Q,X,Z,J,tt,et,it,st;z.d(K,{B1:()=>J,VB:()=>Q,Xn:()=>X,jT:()=>st,ju:()=>Y,rW:()=>Z,z2:()=>it,zA:()=>et}),function(q){q.Tutorial="tutorial",q.Titan="titan",q.EndGame="EndGameBossBattle",q.PuppetMaster="EndGamePuppetMasterBattle"}(Y||(Y={})),function(q){q.Standard="Standard",q.CloakedWizard="Cloaked Wizard",q.Pippet="Pippet",q.Boss="Boss",q.Stage1="Stage1",q.Stage2="Stage2",q.Stage3="Stage3",q.Tutorial1="Tutorial1",q.Tutorial2="Tutorial2",q.Tutorial3="Tutorial3",q.Titan="Titan",q.DarkTower="Dark Tower",q.DuelsStadium="Duels Stadium",q.DuelsStadiumBot="Duels Stadium (Bot)",q.RiftRun="Rift Run",q.DragonRift="Dragon Rift"}(Q||(Q={})),function(q){q.Wizard="wizard",q.Mythic="mythic",q.Uncapturable="uncapturable"}(X||(X={})),function(q){q.Unconscious="Unconscious",q.Conscious="Conscious",q.Fled="Fled"}(Z||(Z={})),function(q){q.Player="Player",q.Opponent="Opponent"}(J||(J={})),function(q){q.Field="Field",q.Reserve="Reserve"}(tt||(tt={})),function(q){q.Action="action",q.Spell="spell",q.Self="self",q.Ally="ally",q.Enemy="enemy"}(et||(et={})),function(q){q.InBattle="in-battle",q.PostBattle="post-battle",q.PostBattleAuto="post-battle-auto-rescued"}(it||(it={})),function(q){q.AllGemsCollected="All Gems Collected",q.AllGemsPreviouslyCollected="All Gems Previously Collected",q.AllGemsFirstAcademyVisit="All Gems First Academy Visit",q.PippetFirstTimeBattleStart="Pippet 1st Time Battle Start",q.PippetBattleWon="Pippet Battle Won",q.IllusionBoss1FirstTimeBattleStart="Illusion Boss 1 1st Time Battle Start",q.IllusionBoss1BattleWon="Illusion Boss 1 Battle Won",q.IllusionBoss2FirstTimeBattleStart="Illusion Boss 2 1st Time Battle Start",q.IllusionBoss2BattleWon="Illusion Boss 2 Battle Won",q.IllusionBoss3FirstTimeBattleStart="Illusion Boss 3 1st Time Battle Start",q.IllusionBoss3BattleWon="Illusion Boss 3 Battle Won",q.IllusionBoss4FirstTimeBattleStart="Illusion Boss 4 1st Time Battle Start",q.IllusionBoss4BattleWon="Illusion Boss 4 Battle Won",q.IllusionBoss5FirstTimeBattleStart="Illusion Boss 5 1st Time Battle Start",q.IllusionBoss5BattleWon="Illusion Boss 5 Battle Won",q.PuppetMasterFirstTimeBattleStart="Puppet Master 1st Time Battle Start",q.PuppetMasterBattleWon="Puppet Master Battle Won",q.PostPuppetMasterVisualsShown="Post Puppet Master Visuals Shown",q.PostPuppetMasterPedestalClicked="Post Puppet Master Pedestal Clicked"}(st||(st={}))},63693:(q,K,z)=>{"use strict";var Y,Q,X,Z;z.d(K,{B1:()=>X,Io:()=>Y,Zj:()=>Z,rW:()=>Q}),function(q){q.Front="front",q.Top="top",q.bottom="bottom"}(Y||(Y={})),function(q){q.Unconscious="unconscious",q.Conscious="conscious",q.Fled="fled"}(Q||(Q={})),function(q){q.Player="Player",q.Opponent="Opponent"}(X||(X={})),function(q){q.Base="base pet",q.Evolution1="evolution1",q.Evolution2="evolution2",q.Evolution3="evolution3",q.Mythic="Mythic"}(Z||(Z={}))},16887:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{f:()=>Q,g:()=>Y}),function(q){q[q.StepOne=1]="StepOne",q[q.StepTwo=2]="StepTwo",q[q.StepThree=3]="StepThree"}(Y||(Y={})),function(q){q.PermissionNeeded="Permission Needed",q.WaitingOnPermission="Waiting on Permission",q.PermissionGranted="Permission Granted"}(Q||(Q={}))},35569:(q,K,z)=>{"use strict";var Y;z.d(K,{D:()=>Y}),function(q){q.ElementGem="{0}_gem",q.AcademyTeleport="academy_teleport",q.PedestalRoom="pedestal_room",q.AcademyTowerLobby="academy_tower_lobby",q.TowerCommonRoom="tower_common_room",q.TowerComplete="tower_complete",q.FirstKeystonePlaced="{0}_first_gem"}(Y||(Y={}))},13093:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{T:()=>Q,l:()=>Y}),function(q){q.FirstEligible="arcadia_first_eligible",q.WorldMapSeen="arcadia_world_map_seen",q.FirstTap="arcadia_first_tap",q.FirstExit="arcadia_first_exit"}(Y||(Y={})),function(q){q[q.FirstEligible=0]="FirstEligible",q[q.WorldMapSeen=1]="WorldMapSeen",q[q.FirstTap=2]="FirstTap",q[q.FirstExit=3]="FirstExit"}(Q||(Q={}))},96073:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{j:()=>Y,t:()=>Q}),function(q){q.FirstLogin="costumes_first_login",q.MenuOpen="costumes_menu_open",q.TutorialVideoStarted="costumes_tutorial_video_started",q.TutorialVideoFinished="costumes_tutorial_video_finished",q.CostumePreview="costume_preview",q.CostumeEquipped="costume_equipped"}(Y||(Y={})),function(q){q[q.FirstLogin=0]="FirstLogin",q[q.MenuOpen=1]="MenuOpen",q[q.TutorialVideoStarted=2]="TutorialVideoStarted",q[q.TutorialVideoFinished=3]="TutorialVideoFinished",q[q.CostumePreview=4]="CostumePreview",q[q.CostumeEquipped=5]="CostumeEquipped"}(Q||(Q={}))},65050:(q,K,z)=>{"use strict";var Y;z.d(K,{N:()=>Y}),function(q){q.Academy="academy",q.Archives="archives",q.BattlePass="treasure_track",q.BattleRestriction="battle_restriction",q.CrystalCaverns="crystal-caverns",q.DuelsStadium="Duels Stadium",q.BossRift="boss-rift",q.EndOfBattle="end-of-battle",q.FestivalDaily="festival-daily",q.FestivalDailyBossRouletteSpin="festival-daily-boss-roulette-spin",q.FestivalChestRouletteSpin="festival-chest-roulette-spin",q.FestivalProgressionWindow="festival-progression-window",q.Interface="interface",q.KidsMlpUpgrade="kids_mlp_upgrade",q.KidsMlpUpgradeComplete="kids_mlp_upgrade_complete",q.KidsMlpUpgradeFail="kids_mlp_upgrade_fail",q.LootDash="wizard_dash",q.LootDashQuickQuiz="wizard_dash_assignment",q.MembershipVideo="membership_video",q.OpenWorld="open-world",q.PlayAtHomeVideo="play_at_home_video",q.RiftRun="rift-run",q.ShopVisit="shop-visit",q.StateChallenge="state_challenge",q.TowerRun="tower-run",q.UI="ui",q.UniversalTeamSelection="universal_team_selection",q.WizardDash="WizardDash",q.WhiteGloveOffer="white_glove_offer",q.ElderWhiteGloveOffer="elder_player_white_glove_offer"}(Y||(Y={}))},96810:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{h:()=>Q,l:()=>Y}),function(q){q.SignIn="Sign In",q.EnterClassCode="Enter Class Code",q.EnterCountry="Enter Country",q.EnterSubCountry="Enter Sub-Country",q.EnterGrade="Enter Grade",q.FirstLogin="First Login",q.LoadGame="Load Game",q.CreateCharacter="Create Character",q.CustomizeCharacter="Customize Character",q.SelectLocation="Select Location",q.CompleteSignup="Complete Signup",q.TutorialStart="Tutorial Start",q.FrontYardDialogue1="Front Yard Dialogue 1",q.AcademyDialogue1="Academy Dialogue 1",q.FirstTutorialBattleStarted="First Tutorial Battle Started",q.FirstQuestionAnswered="First Question Answered",q.FirstTutorialBattleWon="First Tutorial Battle Won",q.ReachedLevel2="Reached Level 2",q.PalletPassDialogue1="Pallet Pass Dialogue 1",q.InspectPet="Inspect Pet",q.PalletPassDialogue2="Pallet Pass Dialogue 2",q.PetCaptured1="Pet Captured 1",q.AcademyDialogue2="Academy Dialogue 2",q.MinionBattleStarted="Minion Battle Started",q.PetCaptured2="Pet Captured 2",q.MinionBattleWon="Minion Battle Won",q.ReachedLevel3="Reached Level 3",q.EscapedDialogue1="Escaped Dialogue 1",q.SelectName="Select Name",q.SelectNickname="Select Nickname",q.TutorialComplete="Tutorial Complete",q.FirstPostTutorialBattleStarted="First Post-Tutorial Battle Started",q.ReachedLevel4="Reached Level 4",q.FirstPostTutorialBattleWon="First Post-Tutorial Battle Won",q.ReachedLevel5="Reached Level 5",q.PostBattleFlowChestDisplay="post_battle_chest",q.PostBattleFlowRewardsDisplay="post_battle_rewards",q.PostBattleFlowStarJar="post_battle_star_jar",q.PlayerGoalsFirstBattleWon="first_battle_won",q.PlayerGoalsFirstRewardReceived="received_first_reward",q.PlayerGoalsSecondBattleWon="second_battle_won",q.PlayerGoalsSecondRewardReceived="received_second_reward",q.PlayerGoalsHomeSession="home_session",q.PlayerGoalsHomeSessionRewardReceived="received_home_reward",q.PlayerGoalsParentAttachStarted="parent_attach_started",q.PlayerGoalsParentAttachCompleted="parent_attach_completed",q.PlayerGoalsParentAttachRewardReceived="received_parent_reward",q.PlayerGoalsTeacherAttachStarted="teacher_attach_started",q.PlayerGoalsTeacherAttachComplete="teacher_attach_completed",q.PlayerGoalsTeacherAttachRewardReceived="received_teacher_attach_reward",q.PlayerGoalsProfileQuizComplete="profile_quiz_completed",q.PlayerGoalsProfileQuizRewardReceived="received_profile_quiz_reward",q.DynamicStoreDefeatedPet="dynamic_store_defeated_pet",q.DynamicStoreLostPetsMain="dynamic_store_lost_pets_main",q.DynamicStoreLostPetPurchased="dynamic_store_lost_pet_purchased",q.DynamicStoreLostPetsTab="dynamic_store_lost_pets_tab",q.DynamicStoreLostPetViewed="dynamic_store_lost_pet_viewed",q.PetGearStart="Pet Gear Tutorial Started",q.PetGearTeamMenu="Your Team screen of the PetBook is opened",q.PetGearPetMenu="Your Pet screen of the PetBook is opened",q.PetGearGearMenu="Pet Gear Equip Menu Opened",q.PetGearGearEquipped="Pet Gear Item Equipped",q.PetGearGearUsedInBattle="Pet Gear Item used in battle",q.PetGearTutorialComplete="Pet Gear Tutorial Complete",q.PetHardCurrencyImpression="Pet Hard Currency Impression",q.PetHardCurrencyIntention="Pet Hard Currency Intention",q.PetHardCurrencyTransactionComplete="Pet Hard Currency Transaction Complete",q.DailyLoginCalendarAssigned="daily_login_calendar_assigned",q.DailyLoginCalendarViewed="daily_login_calendar_viewed",q.DailyLoginCalendarFirstReward="daily_login_calendar_first_reward_received",q.DailyLoginCalendarNthReward="daily_login_calendar_N_reward_received",q.DailyLoginCalendarLoopingReward="daily_login_calendar_looping_reward_received",q.DailyLoginCalendarComplete="daily_login_calendar_calendar_complete",q.SegmentedOffersAssigned="segmented_offer_assigned",q.SegmentedOffersViewed="segmented_offer_viewed",q.SegmentedOffersClicked="segmented_offer_clicked",q.SegmentedOffersGotMembership="segmented_offer_got_membership",q.SegmentedOffersGotExpired="segmented_offer_expired",q.CampaignReplayFtueChargedLevelsRemoved="charged levels full removal",q.CampaignReplayFtuePuppetMasterCutSceneStart="Puppet Master cut scene start",q.CampaignReplayFtuePuppetMasterCutSceneEnd="Puppet Master cut scene end",q.CampaignReplayFtueMapScreenOpened="Map screen opened",q.CampaignReplayFtueModal="Campaign replay modal",q.CampaignReplayFtueRestrictions="Campaign replay restrictions",q.CampaignReplayFtueQualifyForHardMode="Qualify for Hard Mode",q.CampaignReplayFtueEnterHardMode="Entered Hard Mode"}(Y||(Y={})),function(q){q.AfterSchoolWidgetHUDButtonHighlighted="HUD button highlighted",q.AfterSchoolWidgetHUDButtonClicked="HUD button clicked",q.AfterSchoolWidgetNootExplainsDailyGift='Noot explains "daily gift" feature',q.AfterSchoolWidgetPlayerAdvancesToRewardScreen="Player advances to reward screen",q.AfterSchoolWidgetPlayerCollectsSchoolReward="Player collects School Reward",q.AfterSchoolWidgetNootExplainsHowToGetMagicoin="Noot explains how to get Magicoin",q.AfterSchoolWidgetPlayerReturnsToRewardScreen="Player returns to reward screen",q.AfterSchoolWidgetPlayerClicksCollectAtHomeButton='Player clicks the "Collect at Home" button',q.AfterSchoolWidgetNootOopsDialog='Noot "Oops" dialog',q.AfterSchoolWidgetCollectMagicoinTooltipShown="Collect Magicoin tool-tip shown",q.AfterSchoolWidgetNootRemindsPlayersToReturnAfterSchool="Noot reminds players to come back after school",q.AfterSchoolWidgetPlayerCollectsHomeReward="Player collects Home Reward",q.AfterSchoolWidgetNootRemindsPlayersToReturnDaily="Noot reminds players to come back every day",q.AfterSchoolWidgetCollectMagicoinTooltipShownAtHome="Collect Magicoin tool-tip shown",q.AfterSchoolWidgetTutorialComplete="Tutorial Complete"}(Q||(Q={}))},17642:(q,K,z)=>{"use strict";var Y;z.d(K,{V:()=>Y}),function(q){q.Start="ftue_start",q.OpenMythicDetailView="open_mythic_detail_view"}(Y||(Y={}))},23283:(q,K,z)=>{"use strict";var Y;z.d(K,{U:()=>Y}),function(q){q.WheelOfWonder="Wheel of Wonder",q.TwilightWheel="Twilight Wheel",q.LuckyLoot="Lucky Loot",q.PrizeWheel="Prize Wheel"}(Y||(Y={}))},41674:(q,K,z)=>{"use strict";var Y,Q,X,Z,J,tt,et,it,st,nt;z.d(K,{$N:()=>Q,Lv:()=>X,No:()=>et,Wm:()=>Y,ZF:()=>Z,jR:()=>st,k:()=>nt,oi:()=>it,ss:()=>J,yO:()=>tt}),function(q){q.ClickableSprite="clickable_image",q.Menu="menu",q.Popup="pop_up",q.DialogBox="dialog_box",q.PetBook="pet_book",q.PetDetailsView="pet_details_view",q.InfoPanel="info_panel",q.HUD="hud",q.Screen="screen",q.ScreenBanner="screen_banner",q.Modal="modal",q.Settings="settings",q.Shop="shop",q.Window="window",q.BattlePass="treasure_track_main",q.VideoPlayer="video_player",q.Overworld="overworld"}(Y||(Y={})),function(q){q.None="none",q.Mail="mail",q.HudClick="hud_click",q.AutoSurfaced="auto_surfaced",q.Npc="npc",q.NpcClick="npc_click",q.Door="door",q.ButtonClick="button_click",q.ButtonClickBadged="button_click_badged",q.TabClick="tab_click",q.QuestComplete="quest_complete",q.MouseHover="mouse_hover",q.SignpostClick="signpost_click",q.WorldObject="world_object_click",q.Battle="battle",q.BattleCompleted="battle_completed",q.Toaster="toast_notification",q.MembershipUpgrade="membership_upgrade",q.MembershipPurchase="membership_purchase",q.PrizeWheel="prize_wheel",q.RestrictedBattle="restricted_battle",q.ElderPlayerTopUp="elder_player_top_up",q.BattleRestrictionsMet="battle_restrictions_met",q.FestivalBossBattleRematch="festival_boss_battle_rematch",q.WizardWatch="wizard_watch",q.PostBattle="post-battle",q.Cutscene="cutscene",q.WizardBank="wizard_bank",q.WizardCostumes="wizard_costumes",q.HudWidget="hud_widget"}(Q||(Q={})),function(q){q.None="",q.CloseButton="close_button",q.CloseClicked="close-clicked",q.ButtonClick="button_click",q.CloseDialog="close_dialog",q.Done="done",q.KeystonePlaced="keystone_placed",q.TeleportButton="x_teleport",q.X="x_button",q.EvolveNow="evolve_now",q.EvolveLater="evolve_later",q.TeacherAttach="player_goals_teacher_attach",q.LoginCredentials="player_goals_hide_credentials",q.Toggle="toggle"}(X||(X={})),function(q){q.Interactable="interactable",q.Snowpile="crystal-caverns-snowpile",q.Crate="crystal-caverns-crate",q.WorldChest="world-chest",q.WorldMemberChest="world-member-chest",q.BattleChest="battle-chest",q.BattleMemberChest="battle-member-chest",q.MonthlyMemberBox="monthly-member-box"}(Z||(Z={})),function(q){q.FtueGoals="ftue_goals",q.BattlePass="Treasure Track",q.Festivals="Festivals",q.FestivalsHidden="hidden-festival-data"}(J||(J={})),function(q){q.Ftue="ftue"}(tt||(tt={})),function(q){q.Purchased="add_pet_slots_header",q.MemberGiftAwarded="membership",q.AwardedFreeWithPet="awarded_pet",q.TreasureTrack="treasure_track",q.PetRoster="pet_roster"}(et||(et={})),function(q){q.Partial="partial",q.Full="full"}(it||(it={})),function(q){q.Manual="manual",q.Automatic="automatic"}(st||(st={})),function(q){q.PetBook="pet_book",q.PostBattleWin="post_battle_win",q.PostBattleLose="post_battle_lose",q.Other="other"}(nt||(nt={}))},25089:(q,K,z)=>{"use strict";z.d(K,{v:()=>Z});var Y=z(35120),Q=z(29738),X=z(30226);class Z{constructor(q,K,z){this._segment=q,this._activePlayer=z,this._uuidProvider=K,this._subjectProvider=Y.q.instance.prodigy.gameContainer.get("8f9-f0fc"),this.setup()}setup(){}getCommonEventDataProperties(){var q;const K=Y.q.instance.prodigy.world,z=K.getCurrentZone();return{session_uuid:this._uuidProvider.getUUID(),level:this._activePlayer.getLevel(),zone:z,map:K.getCurrentMapTag(),charged_level:this._activePlayer.getChargedLevel(),subject:this._subjectProvider.getSubject().toUpperCase(),difficulty_tier:null===(q=K.getZone(z))||void 0===q?void 0:q.difficultyMode,is_school_hours:X.J.isDateWithinSchoolDayAndHours(),game_locale:Q.O.localeCode}}}},99134:(q,K,z)=>{"use strict";z.d(K,{e:()=>rt,v:()=>Y});var Y,Q=z(24522),X=z(35120),Z=z(38156),J=z(53037),tt=z(21097),et=z(44094),it=z(41674),st=z(25089),nt=z(67665);!function(q){q.FestivalStage1="festival_complete_first_stage",q.FestivalStage2="festival_complete_second_stage",q.FestivalStage3="festival_complete_third_stage",q.FestivalStage4="festival_complete_fourth_stage",q.FestivalStage5="festival_complete_fifth_stage",q.FestivalStage6="festival_complete_sixth_stage",q.FestivalStage7="festival_complete_seventh_stage"}(Y||(Y={}));const at="unknown";class rt extends st.v{constructor(){super(...arguments),this._currentFestivalTransactionID=new Map}getCurrentFestivalTransactionID(q){var K;return null!==(K=this._currentFestivalTransactionID.get(q))&&void 0!==K?K:et.$.generateUID()}getCurrentFestivalSpinID(){var q;return null!==(q=this._currentFestivalSpinID)&&void 0!==q?q:et.$.generateUID()}getFestivalInstanceName(){return X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.getFestivalInstanceName()}sendQuestGoalCompleteEvent(q){var K,z,Y,Q,X,Z,tt,st,ot,ht,ct,dt,lt,ut,ft;const bt=et.$.generateUID();this._currentFestivalTransactionID.set(`${q.questID}-${q.taskID}-${J.q.FESTIVAL_CLAIM_STRING}`,bt);const pt=0!==q.getTimeUntilUnlock()||0!==q.getTimeUntilExpiry();let vt=null!==(z=null===(K=q.taskDefinition.metadata)||void 0===K?void 0:K.goalSystemOverride)&&void 0!==z?z:it.ss.Festivals,gt=`${q.questID}-${null!==(Q=null===(Y=q.taskDefinition.metadata)||void 0===Y?void 0:Y.questGoalType)&&void 0!==Q?Q:at}-${q.taskID}${null!==(X=rt.getQuestDatePrecondition(q.taskDefinition))&&void 0!==X?X:""}`,mt=rt.getQuestDescriptionFromDefinition(q.taskDefinition);(null===(Z=q.taskDefinition.metadata)||void 0===Z?void 0:Z.isHiddenQuest)&&(vt=null!==(st=null===(tt=q.taskDefinition.metadata)||void 0===tt?void 0:tt.goalSystemOverride)&&void 0!==st?st:it.ss.FestivalsHidden,gt=q.taskID,mt=null!==(ht=null===(ot=q.taskDefinition.metadata)||void 0===ot?void 0:ot.questName)&&void 0!==ht?ht:"unknown");const yt=Object.assign({goal_system:vt,goal_season:q.questID,goal_name:mt,goal_id:gt,is_repeatable:null!==(ct=q.taskDefinition.repeatable)&&void 0!==ct&&ct,difficulty_level:null!==(lt=null===(dt=q.taskDefinition.metadata)||void 0===dt?void 0:dt.difficultyLevel)&&void 0!==lt?lt:"unknown",is_member_locked:null!==(ft=null===(ut=q.taskDefinition.metadata)||void 0===ut?void 0:ut.isMemberLocked)&&void 0!==ft&&ft,is_time_locked:pt,is_goal_locked:!!q.getPrerequisites(),transaction_id:bt},this.getCommonEventDataProperties());nt.Y.track("Goal Achieved",yt)}sendQuestGoalUpdatedEvent(q,K,z){var Y,Q,X,Z,J,tt;const et=Object.assign({goal_system:null!==(Q=null===(Y=q.taskDefinition.metadata)||void 0===Y?void 0:Y.goalSystemOverride)&&void 0!==Q?Q:it.ss.Festivals,goal_season:q.questID,goal_name:rt.getQuestDescriptionFromDefinition(q.taskDefinition),goal_id:`${q.questID}-${null!==(Z=null===(X=q.taskDefinition.metadata)||void 0===X?void 0:X.questGoalType)&&void 0!==Z?Z:at}-${q.taskID}${null!==(J=rt.getQuestDatePrecondition(q.taskDefinition))&&void 0!==J?J:""}`,deadline:z,target_type:q.type,goal_progress:K,goal_current_progress:null===(tt=q.taskProgress.data)||void 0===tt?void 0:tt.progress,goal_target:q.taskDefinition.completionRequirements.data.target},this.getCommonEventDataProperties());nt.Y.track("Goal Progress Updated",et)}sendFestivalPrizeWheelSpunEvent(q,K,z,Y,Q){const X=et.$.generateUID(),Z=et.$.generateUID();this._currentFestivalSpinID=Z,this._currentFestivalTransactionID.set(`${Y}-${K}`,X),this._currentFestivalTransactionID.set(Z,X);const J=Object.assign({wheel_type:q,wheel_id:K,instance_id:z,instance_type:Y,is_respin:Q,spin_id:Z,transaction_id:X},this.getCommonEventDataProperties());nt.Y.track("Festival Prize Wheel Spun",J)}sendFestivalPrizeWheelSpinFailedEvent(q,K,z,Y,Q){const X=Object.assign({wheel_type:q,wheel_id:K,fail_reason:z,funnel_id:z===tt.WE.MemberLocked?this._segment.purchase.getFunnelID():null,instance_id:Y,instance_type:Q,spin_id:et.$.generateUID(),transaction_id:et.$.generateUID()},this.getCommonEventDataProperties());nt.Y.track("Festival Prize Wheel Spin Failed",X)}static getQuestDescriptionFromDefinition(q){var K;return Z.n.getQuestDescription(q.completionRequirements.type,null!==(K=q.completionRequirements.data.target)&&void 0!==K?K:0,q.localizationKey)}static getQuestDatePrecondition(q){var K;if(!q.preconditions)return;let z;return null===(K=q.preconditions)||void 0===K||K.forEach((q=>{q.type!==Q.n.DATE_AFTER&&q.type!==Q.n.DATE_BEFORE||(z=`-[${q.data.date.split("T")[0]}]`)})),z}sendFestivalFunnelAdvancedEvent(q,K){const z=Object.values(Y).indexOf(q)+1,Q=Object.assign(Object.assign({funnel_name:"Festival Progress",funnel_type:"festival",funnel_id:X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.getFestivalInstanceName(),step_name:q,step_index:z},K),this.getCommonEventDataProperties());nt.Y.track("Funnel Advanced",Q)}}},24047:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{F:()=>Y,M:()=>Q}),function(q){q.EndGame="end_game",q.ArcadiaLink="arcadia_link",q.Costumes="costumes",q.MagicoinBattleRewardsIntro="battle_magicoin_intro"}(Y||(Y={})),function(q){q.Chapter="chapter"}(Q||(Q={}))},87337:(q,K,z)=>{"use strict";var Y,Q,X,Z,J,tt;z.d(K,{J$:()=>Q,NM:()=>Y,ac:()=>Z,iQ:()=>X,kN:()=>tt,u_:()=>J}),function(q){q.Interactable="interactable-cooldown",q.SpawnPoint="spawn-point-cooldown"}(Y||(Y={})),function(q){q.Battle="battle"}(Q||(Q={})),function(q){q.Walk="Walk",q.FastTravel="Fast-Travel",q.Teleported="Teleported",q.FeaturedSpawnFastTravel="featured-spawn-Fast-Travel"}(X||(X={})),function(q){q.Merchant="Merchant",q.QuestGiver="Quest-Giver",q.Warden="Warden",q.Boss="Boss",q.Pet="pet",q.CareGiver="Care-Giver",q.WheelGiver="Wheel-Giver",q.Nicknamer="Nicknamer",q.Guard="Guard",q.Bouncer="Bouncer"}(Z||(Z={})),function(q){q.TitanCatapult="Titan Catapult",q.MinecartBridge="Minecart Bridge",q.Teleporter="Teleporter",q.Nicknamer="Nicknamer",q.HealStone="HealStone",q.LeverSwitch="LeverSwitch"}(J||(J={})),function(q){q.MemberLocked="MEMBER_LOCKED",q.LevelLocked="LEVEL_LOCKED",q.QuestNotComplete="QUEST_NOT_COMPLETE",q.AnswerWrong="ANSWER_WRONG"}(tt||(tt={}))},215:(q,K,z)=>{"use strict";z.d(K,{Eu:()=>Y,S4:()=>Q,nu:()=>rt});var Y,Q,X=z(62459),Z=z(90633),J=z(35120),tt=z(77938),et=z(22023),it=z(44094),st=z(41674),nt=z(25089),at=z(67665);!function(q){q.PetMergeYourTeam="pet_merge_your_team",q.PetMergeSelectPet="pet_merge_select_pet",q.PetMergeSelectMerge="pet_merge_select_merge_option",q.PetMergeFinalizeMerge="pet_merge_select_finalize_merge",q.PetMergeConfirm="pet_merge_confirmation_popup",q.PetMergeCompleted="pet_merge_completed",q.PetMergeMagicoin="pet_merge_with_magicoin"}(Y||(Y={})),function(q){q.TutorialUnlocked="unlock_pet_merge",q.TutorialViewed="pet_merge_tutorial_viewed",q.TutorialTriggered="pet_merge_tutorial_triggered",q.HudSelect="pet_merge_tutorial_pet_palm",q.SelectPet="pet_merge_tutorial_pick_a_pet",q.YourPetMergeButton="pet_merge_tutorial_select_merge_option",q.SelectMergeNow="pet_merge_tutorial_select_merge_now",q.TutorialComplete="pet_merge_tutorial_complete"}(Q||(Q={}));class rt extends nt.v{constructor(){super(...arguments),this._tutorialStepIndexCache=[],this.mergeSource=st.k.Other}get petMergeId(){return this._petMergeId}get petMergeTransactionId(){return this._petMergeTransactionId}sendPetMergedEvent(q,K){var z;const Y=null===(z=tt.t.getItem("pet",q.ID))||void 0===z?void 0:z.data,Q=et.P8.getPetDisplayMergeRank(q.ID,q.uniqueID);Y?at.Y.track("Pet Merged",Object.assign({ingredient_name:Y.name,ingredient_id:q.ID,ingredient_type:Y.type,ingredient_element:Y.affinity,ingredient_level:q.level,previous_pet_rank:null!=K?K:Q,merged_pet_rank:X.Aq$.isDefined(K)?Q:void 0,is_target_pet:X.Aq$.isDefined(K),ingredient_bypass:0,merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())):X.VyI.log(`Pet item data not found for pet ID ${q.ID}`,X.$bb.Warning)}sendPetsMergedEvents(q){if(q.ingredients){this._petMergeId=it.$.generateUID(),this._petMergeTransactionId=it.$.generateUID(),this.sendPetMergedEvent(q.basePetData,q.previousRank);for(const K of q.ingredients)this.sendPetMergedEvent(K);this.mergeSource=st.k.Other}}sendPetMergedUpsellEvents(q){var K;this._petMergeId=it.$.generateUID(),this._petMergeTransactionId=it.$.generateUID();const z=null===(K=tt.t.getItem("pet",q.basePetData.ID))||void 0===K?void 0:K.data;z?(this.sendPetMergedEvent(q.basePetData,q.previousRank),at.Y.track("Pet Merged",Object.assign({ingredient_name:z.name,ingredient_type:z.type,ingredient_element:z.affinity,ingredient_level:q.basePetData.level,previous_pet_rank:q.previousRank,is_target_pet:!1,ingredient_bypass:q.ingredientBypass,merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())),this.mergeSource=st.k.Other):X.VyI.log(`Pet item data not found for pet ID ${q.basePetData.ID}`,X.$bb.Warning)}sendPetMergedMagicoinEvents(q){var K;this._petMergeId=it.$.generateUID(),this._petMergeTransactionId=it.$.generateUID();const z=null===(K=tt.t.getItem("pet",q.basePetData.ID))||void 0===K?void 0:K.data;if(z){if(this.sendPetMergedEvent(q.basePetData,q.previousRank),at.Y.track("Pet Merged",Object.assign({ingredient_name:z.name,ingredient_id:q.basePetData.ID,ingredient_type:z.type,ingredient_element:z.affinity,ingredient_level:q.basePetData.level,previous_pet_rank:q.previousRank,is_target_pet:!1,ingredient_bypass:q.ingredientBypass,merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())),q.ingredients&&q.ingredients.length>0)for(const K of q.ingredients)this.sendPetMergedEvent(K);this.mergeSource=st.k.Other}else X.VyI.log(`Pet item data not found for pet ID ${q.basePetData.ID}`,X.$bb.Warning)}sendPetMergeFunnelAdvancedEvent(q,K){const z=!J.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Z.B.FEATURE_PET_MERGE,Z.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&J.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Z.B.FEATURE_PET_MERGE,Z.B.BREADCRUMB_PET_MERGE_FTUE_STARTED);if(!et.P8.canPlayerAccessPetMergeFeature()||z)return;const Q=null!=K?K:Object.values(Y).indexOf(q)+1;Q<1||at.Y.track("Funnel Advanced",Object.assign({funnel_name:"pet_merge",funnel_type:"feature",step_name:q,step_index:Q},this.getCommonEventDataProperties()))}sendPetMergeTutorialFunnelAdvancedEvent(q){const K=Object.values(Q).indexOf(q)+1,z=this._tutorialStepIndexCache.includes(K);K<1||z||(this._tutorialStepIndexCache.push(K),at.Y.track("Funnel Advanced",Object.assign({funnel_name:"pet_merge_tutorial",funnel_type:"tutorial",step_name:q,step_index:K},this.getCommonEventDataProperties())))}sendPetMergeCancelledEvent(q,K,z){var Y;const Q=null===(Y=tt.t.getItem("pet",q.ID))||void 0===Y?void 0:Y.data,Z=et.P8.getPetDisplayMergeRank(q.ID,q.uniqueID);Q?(at.Y.track("Pet Merged Cancelled",Object.assign({ingredient_name:Q.name,ingredient_id:q.ID,ingredient_type:Q.type,ingredient_level:q.level,pet_rank:Z,ingredient_required:K,game_phase:z?"tutorial":"game",merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())),this.mergeSource=st.k.Other):X.VyI.log(`Pet item data not found for pet ID ${q.ID}`,X.$bb.Warning)}}},44356:(q,K,z)=>{"use strict";var Y;z.d(K,{H:()=>Y}),function(q){q.Dance="Dance",q.Emote="Emote"}(Y||(Y={}))},19464:(q,K,z)=>{"use strict";var Y,Q,X,Z,J,tt;z.d(K,{W5:()=>X,Yj:()=>Y,lT:()=>Z,s2:()=>J,ss:()=>tt}),function(q){q.Exit="exit",q.Restart="Restart",q.Success="Success",q.Fail="Fail",q.Abandon="Abandon"}(Y||(Y={})),function(q){q.Easy="Easy",q.Hard="Hard",q.None="None"}(Q||(Q={})),function(q){q.New="New",q.Continue="Continue",q.Restart="Restart",q.Spawn="Spawn"}(X||(X={})),function(q){q.Healstone="Healstone",q.Bridge="Bridge",q.Boss="Boss",q.Complete="Complete"}(Z||(Z={})),function(q){q.DarkTower="Dark Tower",q.EarthTower="Earth Tower",q.IceTower="Ice Tower"}(J||(J={})),function(q){q.Normal="Normal",q.Random="Random"}(tt||(tt={}))},47632:(q,K,z)=>{"use strict";z.d(K,{s:()=>Z,w:()=>Y});var Y,Q=z(25089),X=z(67665);!function(q){q.Adults="adults"}(Y||(Y={}));class Z extends Q.v{sendQrCodeViewedEvent(q,K,z=null,Y=null){const Q=Object.assign(Object.assign(Object.assign({name:q,type:K,parameters:z},this._segment.gameWorld.getCurrentInstanceTypeAndID()),Y),this.getCommonEventDataProperties());X.Y.track("QR Code Viewed",Q)}}},74958:(q,K,z)=>{"use strict";z.d(K,{Aj:()=>bt,fk:()=>Y,zE:()=>ft});var Y,Q=z(8674),X=z(62459),Z=z(24652),J=z(42448),tt=z(90633),et=z(35120),it=z(68836),st=z(14117),nt=z(22023),at=z(44094),rt=z(13956),ot=z(23283),ht=z(46784),ct=z(65050),dt=z(41674),lt=z(25089),ut=z(67665);!function(q){q.RiftsReceiveFirstRiftKey="rifts_receive_first_rift_key",q.RiftsOpenRiftSelectionMenu="rifts_open_rift_selection_menu",q.RiftsStartFirstRiftRun="rifts_start_first_rift_run",q.RiftsCompleteFirstRiftRunRound="rifts_complete_first_rift_run_round",q.RiftsCompleteRiftRunWinOrLose="rifts_complete_rift_run_win_or_lose",q.RiftsCompleteRiftRunWin="rifts_complete_rift_run_win",q.RiftsStartBossRift="rifts_start_boss_rift",q.RiftsCompleteBossRift="rifts_complete_boss_rift"}(Y||(Y={}));const ft={[J.ni.Portal1]:ht.B.RiftsPortal1Menu,[J.ni.Portal2]:ht.B.RiftsPortal2Menu,[J.ni.Portal3]:ht.B.RiftsPortal3Menu};class bt extends lt.v{constructor(q,K,z){super(q,K,z),this._riftsInstanceToRewardSpinUuidMap={},this._riftsInstanceToRewardSpinTransactionUuidMap={},this._riftsDataProvider=et.q.instance.prodigy.gameContainer.get("81d-5606")}get riftInstanceUuid(){return X.Aq$.isDefined(this._riftInstanceUuid)||(this._riftInstanceUuid=at.$.generateUID()),this._riftInstanceUuid}set riftInstanceUuid(q){this._riftInstanceUuid=q}get riftRunUuid(){var q;return null!==(q=this._riftRunUuid)&&void 0!==q?q:"Failed to retrieve the rift run UUID for the ongoing run"}set riftRunUuid(q){this._riftRunUuid=q}get riftRunRoundUuid(){var q;return null!==(q=this._riftRunRoundUuid)&&void 0!==q?q:"Failed to retrieve the rift run round UUID for the ongoing run"}set riftRunRoundUuid(q){this._riftRunRoundUuid=q}getRiftsRewardSpinUuid(){if(!this._riftInstanceUuid)return;let q=this._riftsInstanceToRewardSpinUuidMap[this._riftInstanceUuid];return q||(q=at.$.generateUID(),this._riftsInstanceToRewardSpinUuidMap[this._riftInstanceUuid]=q),q}getRiftsRewardSpinTransactionUuid(){if(!this._riftInstanceUuid)return;let q=this._riftsInstanceToRewardSpinTransactionUuidMap[this._riftInstanceUuid];return q||(q=at.$.generateUID(),this._riftsInstanceToRewardSpinTransactionUuidMap[this._riftInstanceUuid]=q),q}sendRiftsSelectionMenuOpenedEvent(){var q;const K=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData();ut.Y.track("Rift Selection Menu Opened",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(q=this._riftsDataProvider.getRiftsPortalConfig())||void 0===q?void 0:q.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE,max_rift_tier_unlocked:K.metaProgress.maxRiftTier,max_tier_completions:K.metaProgress.riftTierUnlockData.maxTierCompletions,boss_defeats:K.metaProgress.bossDefeats},this.getCommonEventDataProperties()))}generateRiftRunUuids(){this._riftRunUuid=at.$.generateUID(),this.riftRunRoundUuid=at.$.generateUID()}sendRiftRunStartedEvent(q,K,z,Y){var Q;ut.Y.track("Rift Run Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(Q=this._riftsDataProvider.getRiftsPortalConfig())||void 0===Q?void 0:Q.tierDataGlobalEntityId,rift_run_id:this._riftRunUuid,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE,rift_tier:q,number_of_rounds:J.vP,cost:K,is_magicoin_boosted:z,transaction_id:Y},this.getCommonEventDataProperties()))}sendRiftRunOpponentSelectionMenuOpenedEvent(){var q;const K=this._riftsSyncedDataStore.cache.currentRiftRunProgress;K&&K.type===Z.cn.Normal?ut.Y.track("Rift Run Opponent Selection Menu Opened",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(q=this._riftsDataProvider.getRiftsPortalConfig())||void 0===q?void 0:q.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE,rift_tier:null==K?void 0:K.currentRiftTier,round_id:this.riftRunRoundUuid,round_number:null==K?void 0:K.round,number_of_rounds:J.vP,pets_used_in_previous_rounds:null==K?void 0:K.usedPetUids.map((q=>bt.getPetDataFromUniqueId(q))),buff_modifier:null==K?void 0:K.buffModifier,previous_rounds_nerf_modifiers:null==K?void 0:K.chosenNerfModifiers,next_opponent_team_options:null==K?void 0:K.nextOpponentTeamOptions},this.getCommonEventDataProperties())):X.VyI.log(`RiftsSegment: Not firing sendRiftRunOpponentSelectionMenuOpenedEvent due to missing rift run progress or the rift type not being ${Z.cn.Normal}`,X.$bb.Warning)}sendRiftRunRoundStartedEvent(){var q,K;this.cachedCurrentNormalRiftProgress?ut.Y.track("Rift Run Round Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(q=this._riftsDataProvider.getRiftsPortalConfig())||void 0===q?void 0:q.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE,rift_tier:this.cachedCurrentNormalRiftProgress.currentRiftTier,round_id:this.riftRunRoundUuid,round_number:this.cachedCurrentNormalRiftProgress.round,number_of_rounds:J.vP,pets_used_in_previous_rounds:this.cachedCurrentNormalRiftProgress.usedPetUids.filter((q=>{var K;return!(null===(K=it.T.chosenHomeTeamPetUids)||void 0===K?void 0:K.includes(q))})).map((q=>bt.getPetDataFromUniqueId(q))),buff_modifier:this.cachedCurrentNormalRiftProgress.buffModifier,nerf_modifiers:this.cachedCurrentNormalRiftProgress.chosenNerfModifiers,chosen_opponent_team_option:null===(K=this.cachedCurrentNormalRiftProgress.nextOpponentTeamOptions)||void 0===K?void 0:K[it.T.chosenOpponentTeamIndex]},this.getCommonEventDataProperties())):X.VyI.log("RiftsSegment: Not firing sendRiftRunRoundStartedEvent due to missing cached current rift run progress",X.$bb.Warning)}sendRiftRunRoundCompletedEvent(q){var K,z;this.cachedCurrentNormalRiftProgress?ut.Y.track("Rift Run Round Completed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(K=this._riftsDataProvider.getRiftsPortalConfig())||void 0===K?void 0:K.tierDataGlobalEntityId,rift_run_id:this._riftRunUuid,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE,rift_tier:this.cachedCurrentNormalRiftProgress.currentRiftTier,round_id:this.riftRunRoundUuid,round_number:this.cachedCurrentNormalRiftProgress.round,number_of_rounds:J.vP,pets_used:this.cachedCurrentNormalRiftProgress.usedPetUids.map((q=>bt.getPetDataFromUniqueId(q))),buff_modifier:this.cachedCurrentNormalRiftProgress.buffModifier,nerf_modifiers:this.cachedCurrentNormalRiftProgress.chosenNerfModifiers,chosen_opponent_team_option:null===(z=this.cachedCurrentNormalRiftProgress.nextOpponentTeamOptions)||void 0===z?void 0:z[it.T.chosenOpponentTeamIndex],outcome:q},this.getCommonEventDataProperties())):X.VyI.log("RiftsSegment: Not firing sendRiftRunRoundCompletedEvent due to missing cached current rift run progress",X.$bb.Warning)}sendRiftRunCompletedEvent(){var q;this.cachedCurrentNormalRiftProgress?ut.Y.track("Rift Run Completed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(q=this._riftsDataProvider.getRiftsPortalConfig())||void 0===q?void 0:q.tierDataGlobalEntityId,rift_run_id:this._riftRunUuid,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE,rift_tier:this.cachedCurrentNormalRiftProgress.currentRiftTier,number_of_rounds:J.vP,pets_used:this.cachedCurrentNormalRiftProgress.usedPetUids.map((q=>bt.getPetDataFromUniqueId(q))),buff_modifier:this.cachedCurrentNormalRiftProgress.buffModifier,nerf_modifiers:this.cachedCurrentNormalRiftProgress.chosenNerfModifiers},this.getCommonEventDataProperties())):X.VyI.log("RiftsSegment: Not firing sendRiftRunCompletedEvent due to missing cached current rift run progress",X.$bb.Warning)}sendBossRiftStartedEvent(){var q;const K=this._riftsSyncedDataStore.cache.currentRiftRunProgress;K&&K.type===Z.cn.Boss?ut.Y.track("Boss Rift Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(q=this._riftsDataProvider.getRiftsPortalConfig())||void 0===q?void 0:q.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE,boss_type:K.bossType,rift_tier:K.currentRiftTier},this.getCommonEventDataProperties())):X.VyI.log(`RiftsSegment: Not firing sendBossRiftStartedEvent due to missing rift run progress or the rift type not being ${Z.cn.Boss}`,X.$bb.Warning)}sendBossRiftCompletedEvent(q){var K,z;this.cachedCurrentBossRiftProgress?ut.Y.track("Boss Rift Completed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(K=this._riftsDataProvider.getRiftsPortalConfig())||void 0===K?void 0:K.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE,boss_type:this.cachedCurrentBossRiftProgress.bossType,rift_tier:this.cachedCurrentBossRiftProgress.currentRiftTier,pets_used:null===(z=it.T.chosenHomeTeamPetUids)||void 0===z?void 0:z.map((q=>bt.getPetDataFromUniqueId(q))),nerf_modifiers:this.cachedCurrentBossRiftProgress.bossRiftModifiers,outcome:q},this.getCommonEventDataProperties())):X.VyI.log("RiftsSegment: Not firing sendBossRiftCompletedEvent due to missing cached current boss rift progress",X.$bb.Warning)}sendRiftsFunnelAdvancedEvent(q){const K=Object.values(Y).indexOf(q)+1;ut.Y.track("Funnel Advanced",Object.assign({funnel_id:this._riftsDataProvider.getCurrentRiftsId(),funnel_name:"rifts",funnel_type:"feature",step_name:q,step_index:K},this.getCommonEventDataProperties()))}sendRiftsPrizeWheelSpunEvent(q,K=!1){var z;ut.Y.track("Prize Wheel Spun",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(z=this._riftsDataProvider.getRiftsPortalConfig())||void 0===z?void 0:z.tierDataGlobalEntityId,wheel_type:ot.U.LuckyLoot,instance_type:q,instance_id:this.riftInstanceUuid,spin_id:this.getRiftsRewardSpinUuid(),transaction_id:this.getRiftsRewardSpinTransactionUuid(),is_respin:K},this.getCommonEventDataProperties()))}sendRiftsPrizeWheelSpinFailedEvent(q,K){var z;ut.Y.track("Prize Wheel Spin Failed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(z=this._riftsDataProvider.getRiftsPortalConfig())||void 0===z?void 0:z.tierDataGlobalEntityId,wheel_type:ot.U.LuckyLoot,instance_type:q,instance_id:this.riftInstanceUuid,fail_reason:K},this.getCommonEventDataProperties()))}getRiftTransactionData(){return Object.assign({transaction_id:at.$.generateUID(),sink_type:bt.RIFT_INSTANCE_TYPE,sink_id:ct.N.RiftRun},this._segment.gameWorld.getCurrentInstanceTypeAndID(ct.N.Interface))}static sendFunnelAdvancedEventIfBreadcrumbNotComplete(q,K){et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_RIFTS,K)||(et.q.instance.prodigy.gameContainer.get("20f-5f67").rifts.sendRiftsFunnelAdvancedEvent(q),et.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(tt.B.FEATURE_RIFTS,K))}static getPetDataFromUniqueId(q){var K,z;return{assetId:null!==(K=nt.P8.getAssetIdFromUniqueId(q))&&void 0!==K?K:`Failed to retrieve pet asset ID from unique ID: ${q}`,uniqueId:q,level:null!==(z=nt.P8.getLevelFromUniqueId(q))&&void 0!==z?z:`Failed to retrieve pet level from unique ID: ${q}`}}sendOpenPetReuseInterface(){ut.Y.track("Interface Opened",Object.assign({interface_name:"rift_pet_cooldown_bypass",interface_type:"menu",origin_type:dt.$N.ButtonClick,instance_type:bt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendPetCooldownStarted(q,K,z){var Y;ut.Y.track("Cooldown Timer Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(Y=this._riftsDataProvider.getRiftsPortalConfig())||void 0===Y?void 0:Y.tierDataGlobalEntityId,cooldown_type:"rifts-pet-cooldown",cooldown_id:K,cooldown_target_type:"pets",cooldown_target_id:q,cooldown_length:z,cooldown_trigger_type:"rift-run",cooldown_trigger_id:this.riftRunUuid,instance_type:bt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendPetCooldownStartedEvents(q){var K,z,Y;const Q=null===(z=null===(K=et.q.instance.prodigy.gameContainer.get("81d-5606").getRiftsPortalConfig())||void 0===K?void 0:K.options)||void 0===z?void 0:z.petReuseData,X=Object.keys(q).sort(((K,z)=>q[z].timestamp-q[K].timestamp)),Z=null!==(Y=null==Q?void 0:Q.petCooldownMs)&&void 0!==Y?Y:0;X.slice(0,2).forEach((K=>{var z;this._segment.rifts.sendPetCooldownStarted(K,null!==(z=q[K].cooldownID)&&void 0!==z?z:"",Z/1e3)}))}sendCooldownTimeSkipped(q,K,z,Y,Q,X){var Z;ut.Y.track("Cooldown Timer Bypassed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(Z=this._riftsDataProvider.getRiftsPortalConfig())||void 0===Z?void 0:Z.tierDataGlobalEntityId,cooldown_type:"rifts-pet-cooldown",cooldown_id:q,cooldown_target_type:"pets",cooldown_target_id:K,cooldown_length:z,time_remaining:Y,currency:"magicoin",price:Q,transaction_id:X,cooldown_trigger_type:"rift-run",sink_type:bt.RIFT_INSTANCE_TYPE,sink_id:this.riftRunUuid,instance_type:bt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendCooldownTimerEnded(q,K,z){var Y;ut.Y.track("Cooldown Timer Ended",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(Y=this._riftsDataProvider.getRiftsPortalConfig())||void 0===Y?void 0:Y.tierDataGlobalEntityId,cooldown_type:"rifts-pet-cooldown",cooldown_id:q,cooldown_target_type:"pets",cooldown_target_id:K,cooldown_length:z,cooldown_trigger_type:"rift-run",cooldown_trigger_id:this.riftRunUuid,instance_type:bt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendRiftRunBonusOffered(q){var K;this._modifierofferId=at.$.generateUID(),ut.Y.track("Rift Run Bonus Offered",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(K=this._riftsDataProvider.getRiftsPortalConfig())||void 0===K?void 0:K.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE,offer_id:this._modifierofferId,modifier:{name:q.caption,description:q.description}},this.getCommonEventDataProperties()))}sendRiftRunBonusRerolled(q,K,z,Y,Q){var X;const Z=this._modifierofferId;this._modifierofferId=Q,ut.Y.track("Rift Run Bonus Rerolled",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(X=this._riftsDataProvider.getRiftsPortalConfig())||void 0===X?void 0:X.tierDataGlobalEntityId,modifier:{name:q.caption,description:q.description},offer_id:this._modifierofferId,previous_modifier:{name:K.caption,description:K.description},previous_offer_id:Z,currency:"magicoin",price:z,transaction_id:Y,instance_type:bt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}createRiftRunEncounterEventParams(q,K){return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z={}){var Y,Q;const X=Object.assign(Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(Y=this._riftsDataProvider.getRiftsPortalConfig())||void 0===Y?void 0:Y.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:bt.RIFT_INSTANCE_TYPE},this.getCommonEventDataProperties()),z);let Z=100;const J=et.q.instance.prodigy.gameContainer.get("81d-5606"),tt=null===(Q=null==J?void 0:J.riftsTierTotalData)||void 0===Q?void 0:Q[K],it=null==tt?void 0:tt.opponentLevelCap;if(it){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getLevel();Z=q?Math.min(q,it):it}return X.encounters=q.map(((q,K)=>({position:K+1,enemies:q.petIds.map((q=>({petId:q,level:Z}))),modifier:{name:q.nerfModifier.caption,description:q.nerfModifier.description,bonus:q.nerfModifier.goldReward},member_locked:2===K}))),X}))}sendRiftRunEncounterOffered(q,K){this._encounterOfferId=at.$.generateUID(),this.createRiftRunEncounterEventParams(q,K,{offer_id:this._encounterOfferId}).then((q=>ut.Y.track("Rift Run Encounters Offered",q))).catch(X.RQr.createHandler("RiftsSegment: Failed to create rift run encounter event params"))}sendRiftRunEncounterRerolled(q,K,z,Y,Q){const Z=this._encounterOfferId;this._encounterOfferId=Q,this.createRiftRunEncounterEventParams(q,K,{offer_id:this._encounterOfferId,previous_offer_id:Z,price:z,currency:"magicoin",transaction_id:Y}).then((q=>ut.Y.track("Rift Run Encounters Rerolled",q))).catch(X.RQr.createHandler("RiftsSegment: Failed to create rift run encounter event params"))}}bt.RIFT_INSTANCE_TYPE="rifts",bt.RIFT_BONUS_REROLL_TYPE="bonus-reroll",bt.RIFT_ENCOUNTER_REROLL_TYPE="encounter-reroll",(0,Q.Cg)([(0,rt.b)("687-0b09"),(0,Q.Sn)("design:type",st.M)],bt.prototype,"_riftsSyncedDataStore",void 0)},67665:(q,K,z)=>{"use strict";z.d(K,{r:()=>qe,Y:()=>Ke});var Y=z(8674),Q=z(62459),X=z(88225),Z=z(79687),J=z(95891),tt=z.n(J),et=z(44751),it=z(88059),st=z(75172),nt=z(32389),at=z(35120),rt=z(34829),ot=z(1195),ht=z(65240),ct=z(46784),dt=z(65050),lt=z(41674),ut=z(25089),ft=z(95057),bt=z(44094);class pt extends ut.v{get chestTransactionId(){return this._chestTransactionId}get memberChestTransactionId(){return this._memberChestTransactionId}get currentPbfId(){return this._currentPbfId}get itemTransaction(){return this._itemTransaction}init(){var q;this._currentPbfId=bt.$.generateUID(),null!==(q=this._itemTransaction)&&void 0!==q||(this._itemTransaction=this._segment.item.beginSecureItemTransaction()),this._chestTransactionId=bt.$.generateUID(),this._memberChestTransactionId=bt.$.generateUID(),Q.VyI.log(`PBF InstanceId: ${this._currentPbfId}\nBattle Id: ${this.getBattleId()}\nChest Transaction Id: ${this._chestTransactionId}\nMember Chest Transaction Id: ${this._memberChestTransactionId}`,Q.$bb.Verbose)}getBattleId(){const q=this._segment.battleRevamp.getCurrentBattleID();return q||this._segment.battle.currentBattleID}getItemReceivedMetadata(){const q=at.q.instance.prodigy.gameContainer.get("1c5-a816");let K=this._chestTransactionId,z=ht.C.BattleChest,Y=this.getBattleId(),Q=dt.N.UI,X=this._currentPbfId;if(this._activePlayer.isMember()&&(K=this._memberChestTransactionId,Y=`${this.getBattleId()}-M`),q.matchController){const q=this._segment.lootDash.getInstanceData();z=ht.C.WizardDashLootBag,Q=q.instanceType,X=q.instanceId}return{transaction_id:K,source_type:z,source_id:Y,instance_id:X,instance_type:Q}}flushSecureRewards(){this._itemTransaction.flush(this.getItemReceivedMetadata()),this._itemTransaction=null}sendPostBattleFlowOpensEvent(){this._timeSincePBFStart=Date.now();const q={event:"Interface Opened",interface_name:ct.B.PostBattleFlow,interface_type:lt.Wm.Screen,origin_type:lt.$N.Battle,origin_id:this.getBattleId(),instance_id:this._currentPbfId,instance_type:dt.N.UI};window.analytics.track("Interface Opened",q)}sendButtonEvent(q,K){this._segment.featureCommon.sendButtonEvent({buttonName:K,interfaceName:q,interfaceType:lt.Wm.ScreenBanner},{interface_name:q,instance_type:dt.N.UI,instance_id:this._currentPbfId})}sendPBFClosedEvent(){const q=Date.now()-this._timeSincePBFStart,K={event:"Interface Closed",interface_name:"post_battle",interface_type:"screen",instance_id:this._currentPbfId,instance_type:"ui",duration:q,close_method:"button_click"};window.analytics.track("Interface Closed",K)}sendChestOpenEvent(q){const K=Object.assign({container_type:q?lt.ZF.BattleMemberChest:lt.ZF.BattleChest,container_id:q?`${this.getBattleId()}-M`:this.getBattleId(),instance_id:this._currentPbfId,instance_type:dt.N.UI,transaction_id:q?this._memberChestTransactionId:this._chestTransactionId},this.getCommonEventDataProperties());window.analytics.track("Container Opened",K)}sendChestFailedToOpenEvent(q,K){q&&this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-Battle",category:"Reward",contentId:this.getBattleId(),adType:ft.R.PostBattleBanner});const z=Object.assign({container_type:q?lt.ZF.BattleMemberChest:lt.ZF.BattleChest,container_id:q?`${this.getBattleId()}-M`:this.getBattleId(),instance_id:this._currentPbfId,instance_type:dt.N.UI,fail_reason:K,funnel_id:this._segment.purchase.getFunnelID()},this.getCommonEventDataProperties());window.analytics.track("Container Opened Failed",z)}}var vt=z(20952),gt=z(76277),mt=z(90633),yt=z(25531),_t=z(73797),Et=z(68152),wt=z(85126),Tt=z(35569);class St extends ut.v{constructor(q,K,z){super(q,K,z),this._funnelNamesAndStepIDs=[],at.q.instance.game.broadcaster.addAppListener(_t.bv.AnalyticsInitialized,this.onAnalyticsInitialized,this),this._activePlayer.player.backpack.onKeyAddedToBackpack.add((q=>{var K;const z=null===(K=wt.N.getAllTowerData().find((K=>K.keystone.itemID===q)))||void 0===K?void 0:K.element;Q.Aq$.isDefined(z)&&(at.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(mt.B.FEATURE_ACADEMY_TOWERS,mt.B.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE),at.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(mt.B.FEATURE_ACADEMY_TOWERS,mt.B.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE),at.q.instance.prodigy.gameContainer.get("20f-5f67").academyTowers.sendFunnelEvent({funnelName:yt.w.format("{0}_tower",z),funnelType:"feature",step:Tt.D.ElementGem},z))}))}onAnalyticsInitialized(){this.loadAcademyTowersFunnelData()}sendFunnelEvent(q,...K){var z,Y;if(window.analytics){const X=Object.values(Tt.D).indexOf(q.step),Z=null===(z=this._funnelNamesAndStepIDs.find((K=>K.funnelName===q.funnelName)))||void 0===z?void 0:z.stepOrdinalValue;if(!Q.Aq$.isDefined(Z)||X>Z){let z=null===(Y=this._funnelNamesAndStepIDs.find((K=>K.funnelName===q.funnelName)))||void 0===Y?void 0:Y.stepIndex;Q.Aq$.isDefined(z)?z++:z=1;let Z=q.step;K.length>0&&(Z=yt.w.format(Z,...K));const J=Object.assign({funnel_name:q.funnelName,funnel_type:q.funnelType,step_index:z,step_name:Z},this.getCommonEventDataProperties());Ke.track("Funnel Advanced",J),this.saveAcademyTowersFunnelData(q.funnelName,z,X)}}}saveAcademyTowersFunnelData(q,K,z){var Y,Q;(0,Et.v)(!!this._funnelNamesAndStepIDs,"Segment academy towers funnel is undefined");const X=this._activePlayer.player,Z=this._funnelNamesAndStepIDs.findIndex((K=>K.funnelName===q));if(null!==(Y=(Q=X.data).academyTowersFunnelsData)&&void 0!==Y||(Q.academyTowersFunnelsData=[]),Z<0){const Y={funnelName:q,stepIndex:K,stepOrdinalValue:z};this._funnelNamesAndStepIDs.push(Y),X.data.academyTowersFunnelsData.push(Y)}else this._funnelNamesAndStepIDs[Z].stepIndex=K,X.data.academyTowersFunnelsData[Z].stepIndex=K,this._funnelNamesAndStepIDs[Z].stepOrdinalValue=z,X.data.academyTowersFunnelsData[Z].stepOrdinalValue=z;X.forceSaveCharacter(),X.saveEnabled=!1}loadAcademyTowersFunnelData(){const q=this._activePlayer.player.data.academyTowersFunnelsData;q&&q.length>0?q.forEach((q=>{this._funnelNamesAndStepIDs.push(q)})):this._activePlayer.player.data.academyTowersFunnelsData=[]}}var At=z(38156);class Ct extends ut.v{get rewardClaimedTransactionId(){return this._rewardClaimedTransactionId}get goalCompleteTransactionId(){return this._goalCompleteTransactionId}generateRewardClaimedTransactionId(){this._rewardClaimedTransactionId=bt.$.generateUID()}sendQuestGoalCompleteEvent(q){var K;this._goalCompleteTransactionId=bt.$.generateUID(),Ke.track("Goal Achieved",{goal_system:lt.ss.BattlePass,goal_name:At.n.getQuestDescriptionFromDefinition(q.taskDefinition),goal_id:this.segmentGoalIdFor(q),is_repeatable:null!==(K=q.taskDefinition.repeatable)&&void 0!==K&&K,transaction_id:this._goalCompleteTransactionId})}sendQuestGoalUpdatedEvent(q,K,z){var Y;Ke.track("Goal Progress Updated",{goal_system:lt.ss.BattlePass,goal_name:At.n.getQuestDescriptionFromDefinition(q.taskDefinition),goal_id:this.segmentGoalIdFor(q),deadline:z,target_type:q.type,goal_progress:K,goal_current_progress:null===(Y=q.taskProgress.data)||void 0===Y?void 0:Y.progress,goal_target:q.taskDefinition.completionRequirements.data.target})}segmentGoalIdFor(q){return`${q.questID}-${q.taskID}`}}var Ot=z(98193);class It extends ut.v{get currentBattleID(){return this._currentBattleID}sendBattleStartEvent(q,K,z=null){this._currentBattleID=bt.$.generateUID(),this._battleStartTimeMS=Date.now();const Y=Object.assign(Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID,energy:this._activePlayer.player.getEnergy(),pvp:!1,boss:!0,coop:!0},this._segment.gameWorld.getCurrentInstanceTypeAndID()),K),z),this.getCommonEventDataProperties());Ke.track("Battle Started",Y)}sendBattleCompleteEvent(q,K=null){if(!this._currentBattleID)return void Q.VyI.log("An error occurred while sending battle complete segment event: Complete Event cannot be sent before Start Event.",Q.$bb.Error);const z=Object.assign(Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID,energy:this._activePlayer.player.getEnergy(),duration:(Date.now()-this._battleStartTimeMS)/rt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},this._segment.gameWorld.getCurrentInstanceTypeAndID()),q),K),this.getCommonEventDataProperties());Ke.track("Battle Completed",z)}sendBattleParticipantsEvent(q,K=null){if(!this._currentBattleID)return void Q.VyI.log("An error occurred while sending battle participants segment event: Participants Event cannot be sent before Start Event.",Q.$bb.Error);const z=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},q),K),this.getCommonEventDataProperties());Ke.track("Battle Participants",z)}sendBattleParticipantsOutcomesEvent(q,K=null){if(!this._currentBattleID)return void Q.VyI.log("An error occurred while sending battle participant outcomes segment event: Participant Outcomes Event cannot be sent before Start Event.",Q.$bb.Error);const z=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},q),K),this.getCommonEventDataProperties());Ke.track("Battle Participant Outcomes",z)}sendBattlePositionChangedEvent(q,K=null){if(!this._currentBattleID)return void Q.VyI.log("An error occurred while sending position changed segment event: Postion Changed Event cannot be sent before Start Event.",Q.$bb.Error);const z=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},q),K),this.getCommonEventDataProperties());Ke.track("Battle Position Changed",z)}sendBattleItemUsedEvent(q,K=null){if(!this._currentBattleID)return void Q.VyI.log("An error occurred while sending item used segment event: Item Used Event cannot be sent before Start Event.",Q.$bb.Error);const z=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},q),K),this.getCommonEventDataProperties());Ke.track("Battle Item Used",z)}sendBattlePetCapturedEvent(q,K=null){if(!this._currentBattleID)return void Q.VyI.log("An error occurred while sending pet captured segment event: Pet Captured Event cannot be sent before Start Event.",Q.$bb.Error);const z=Object.assign(Object.assign({battle_id:this._currentBattleID,pet_name:q.petName,pet_element:q.petElement,pet_type:q.petType,pet_level:q.petLevel,pet_rarity:q.petRarity},K),this.getCommonEventDataProperties());Ke.track("Pet Captured",z)}sendBattlePetCaptureFailedEvent(q,K=null){if(!this._currentBattleID)return void Q.VyI.log("An error occurred while sending pet capture failed segment event: Pet Capture Failed Event cannot be sent before Start Event.",Q.$bb.Error);const z=Object.assign(Object.assign({battle_id:this._currentBattleID,pet_name:q.petName,pet_element:q.petElement,pet_type:q.petType,pet_level:q.petLevel,pet_rarity:q.petRarity,fail_reason:q.failReason,funnel_id:"Member Locked"===q.failReason?this._segment.purchase.getFunnelID():null},K),this.getCommonEventDataProperties());Ke.track("Pet Capture Failed",z)}sendBattleSpellCastEvent(q,K=null){if(!this._currentBattleID)return void Q.VyI.log("An error occurred while sending spell cast segment event: Spell Cast Event cannot be sent before Start Event.",Q.$bb.Error);const z=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},q),K),this.getCommonEventDataProperties());Ke.track("Battle Spell Cast",z)}sendCoopTeamCreatedEvent(q,K,z=null){const Y=Object.assign(Object.assign({team_type:q,team_id:K},z),this.getCommonEventDataProperties());Ke.track("Coop Team Created",Y)}sendCoopTeamJoinedEvent(q,K,z=null){const Y=Object.assign(Object.assign({team_type:q,team_id:K},z),this.getCommonEventDataProperties());Ke.track("Coop Team Joined",Y)}sendCoopTeamHostLeftEvent(q,K,z=null){const Y=Object.assign(Object.assign({team_type:q,team_id:K},z),this.getCommonEventDataProperties());Ke.track("Coop Team Host Left",Y)}sendCoopBattleStartedEvent(q,K,z=null){this._currentBattleID=bt.$.generateUID();const Y=Object.assign(Object.assign({team_type:q,team_id:K,battle_id:this._currentBattleID},z),this.getCommonEventDataProperties());Ke.track("Coop Battle Started",Y)}}var Dt=z(20404);class Rt extends ut.v{constructor(){super(...arguments),this._currentGameLoadingInstanceID="",this._currentServerInstanceID=""}get CurrentGameLoadingInstanceID(){return this._currentGameLoadingInstanceID}get CurrentServerInstanceID(){return this._currentServerInstanceID}sendGameLoadingStartedEvent(q=null){this._currentGameLoadingInstanceID=bt.$.generateUID();const K="Notification"in window?Notification.permission:null,z=Dt.b.isQueryParameterSetForSession(4);let Y=null;if(z){const q=Dt.b.getQueryParameterKeyFromID(4);Y=Dt.b.getQueryParameterByName(q)}const Q=Object.assign(Object.assign({instance_id:this.CurrentGameLoadingInstanceID,notification_consent:K,launched_from_notification:z,notification_id:Y},q),{session_uuid:this._uuidProvider.getUUID()});Ke.track("Game Loading Started",Q)}sendGameLoadingEndedEvent(q,K,z,Y=null){const Q=Object.assign(Object.assign({instance_id:this.CurrentGameLoadingInstanceID,success:K,completion_percent:z,duration:(Date.now()-q)/rt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},Y),{session_uuid:this._uuidProvider.getUUID()});Ke.track("Game Loading Ended",Q)}sendServerSelectedEvent(q,K=null){this._currentServerInstanceID=bt.$.generateUID();const z=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},q),K),{session_uuid:this._uuidProvider.getUUID()});Ke.track("Server Selected",z)}sendServerConnectedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},q),K),this.getCommonEventDataProperties());Ke.track("Server Connected",z)}sendServerReconnectedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},q),K),this.getCommonEventDataProperties());Ke.track("Server Reconnected",z)}sendServerConnectionFailedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},q),K),this.getCommonEventDataProperties());Ke.track("Server Connection Failed",z)}}class Pt extends ut.v{sendFunnelAdvancedSegmentEvent(q,K,z=null){const Y=Object.assign(Object.assign({funnel_name:"Permission",funnel_type:"Permission",step_index:q,step_name:K},z),this.getCommonEventDataProperties());Ke.track("Funnel Advanced",Y)}}var Mt=z(21097);class Nt extends ut.v{getCurrentContainerInstanceID(){return this._currentContainerData?this._currentContainerData.instanceID:""}getCurrentContainerTransactionID(){return this._currentContainerData?this._currentContainerData.transactionID:""}constructor(q,K,z){super(q,K,z),this._currentContainerData=null,this._discoveredContainers=[],this._currentContainerData={instanceID:"",transactionID:""}}sendContainerDiscoveredEvent(q,K,z,Y,Q){if(!window.analytics||this._discoveredContainers.includes(null!=Q?Q:q))return;this._discoveredContainers.push(null!=Q?Q:q);const X=Object.assign(Object.assign({container_type:q,container_id:K,x_coord:z.toString(),y_coord:Y.toString()},this._segment.gameWorld.getCurrentInstanceTypeAndID()),this.getCommonEventDataProperties());Ke.track("Container Discovered",X)}sendContainerOpenedEvent(q,K,z=dt.N.OpenWorld,Y){this._currentContainerData={instanceID:`${q}-${K}`,transactionID:bt.$.generateUID()};const Q=Object.assign(Object.assign(Object.assign({container_type:q,container_id:K},this._segment.gameWorld.getCurrentInstanceTypeAndID(z,Y)),{transaction_id:this.getCurrentContainerTransactionID()}),this.getCommonEventDataProperties());Ke.track("Container Opened",Q)}sendContainerOpenedFailedEvent(q,K,z,Y=dt.N.OpenWorld,Q){const X=Object.assign(Object.assign(Object.assign({container_type:q,container_id:K},this._segment.gameWorld.getCurrentInstanceTypeAndID(Y,Q)),{fail_reason:z,funnel_id:z===Mt.WE.MemberLocked?this._segment.purchase.getFunnelID():null}),this.getCommonEventDataProperties());Ke.track("Container Opened Failed",X)}}var xt=z(77938),Lt=z(34616);class kt extends ut.v{sendConversionJarUpdated(q){var K,z;const Y=Object.assign({battle_id:q.battleId,jar_id:q.jarId,update_type:q.updateType,current_count:q.currentCount,capacity:q.capacity,transaction_id:q.transactionId,time_until_reset:q.timeUntilReset,contents:q.contents.map(Bt),contents_added:(null!==(K=q.added)&&void 0!==K?K:[]).map(Bt),contents_removed:(null!==(z=q.removed)&&void 0!==z?z:[]).map(Bt)},this.getCommonEventDataProperties());Ke.track("Conversion Jar Updated",Y)}memberJarUpdate(q){return{jarId:"Member Jar",currentCount:q.savedBattleCount,capacity:Lt.N.maximumSavedBattleCount,timeUntilReset:null,contents:q.savedRewards.map((q=>({type:q.itemType,ID:q.itemId,N:q.quantity})))}}starJarUpdate(q){var K,z;return{jarId:"Star Jar",currentCount:null!==(K=q.storedMemberStars)&&void 0!==K?K:0,capacity:1/0,timeUntilReset:((null!==(z=q.memberStarsExpirationDate)&&void 0!==z?z:0)-Date.now())/rt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER,contents:[]}}}function Bt(q){var K,z,Y,Q,X;return{item_type:q.type,item_id:null===(K=q.ID)||void 0===K?void 0:K.toString(),item_name:null!==(Y=null===(z=xt.t.getItem(q.type,q.ID))||void 0===z?void 0:z.name)&&void 0!==Y?Y:"unknown",count:null!==(X=null===(Q=q.N)||void 0===Q?void 0:Q.toString())&&void 0!==X?X:"1"}}var Ut=z(23506);class Ft extends ut.v{get botDifficulty(){return this._botDifficulty}get botPersonality(){return this._botPersonality}sendInterfaceOpenedEvent(){this._segment.featureCommon.sendInterfaceEvent({interfaceName:ct.B.DuelsStadium,interfaceType:lt.Wm.Screen,instanceType:dt.N.Interface,originType:lt.$N.ButtonClick})}sendMatchmakingQueuedEvent(){this._matchmakingQueuedTime=Date.now();const q=Object.assign(Object.assign({},this._segment.gameWorld.getCurrentInstanceTypeAndID(dt.N.Interface,ct.B.DuelsStadium)),this.getCommonEventDataProperties());Ke.track("Duels Stadium Matchmaking Queued",q)}sendMatchFoundEvent(q,K){Q.Aq$.isDefined(K)&&(this._botPersonality=K);const z=Object.assign(Object.assign(Object.assign({},this._segment.gameWorld.getCurrentInstanceTypeAndID(dt.N.Interface,ct.B.DuelsStadium)),{time_in_queue:Date.now()-this._matchmakingQueuedTime,player_id:this._activePlayer.getUserID(),opponent_id:null!=K?K:q}),this.getCommonEventDataProperties());Ke.track("Duels Stadium Start",z)}sendCloseButtonClickedEvent(){this._segment.featureCommon.sendButtonEvent({interfaceName:ct.B.DuelsStadium,interfaceType:lt.Wm.Screen,buttonName:"close-duels-stadium",destinationName:ct.B.WorldMap})}setBotDifficultyEvent(q){const K=Ut.V.globalDuelBotPersonalityConfig.streakConfig.sort(((q,K)=>q.playerStreak-K.playerStreak)).map((q=>q.playerStreak)),z=Q.cj9.clamp(q,K[0],K[K.length-1]);return this._botDifficulty=K.indexOf(z)+1,this._botDifficulty}sendRoomSelectedEvent(q){const K=Array.isArray(q.entryCost)?q.entryCost[0]:q.entryCost,z=Array.isArray(q.prize)?q.prize[0]:q.prize,Y=Object.assign(Object.assign({instance_id:bt.$.generateUID()},this.getCommonEventDataProperties()),{room_name:q.name,entry_fee_amount:K?K.amount:0,entry_fee_currency:K?K.type:"Free",reward_amount:z.amount,reward_currency:z.type});Ke.track("Room Selected",Y)}}class Gt extends ut.v{getCurrentMinigameInstanceID(){return this._currentMinigameData?this._currentMinigameData.instanceID:""}getCurrentMinigameTransactionID(){return this._currentMinigameData?this._currentMinigameData.transactionID:""}getCurrentPrizeWheelInstanceID(){return this._currentPrizeWheelData?this._currentPrizeWheelData.instanceID:""}getCurrentPrizeWheelTransactionID(){return this._currentPrizeWheelData?this._currentPrizeWheelData.transactionID:""}getCurrentPrizeWheelSpinID(){return this._currentPrizeWheelData.spinID?this._currentPrizeWheelData.spinID:""}getCurrentGoalRewardInstanceID(){return this._currentGoalRewardTransactionData?this._currentGoalRewardTransactionData.instanceID:""}getCurrentGoalRewardTransactionID(){return this._currentGoalRewardTransactionData?this._currentGoalRewardTransactionData.transactionID:""}constructor(q,K,z){super(q,K,z),this._currentMinigameData=null,this._currentPrizeWheelData=null,this._currentGoalRewardTransactionData=null,this._currentMinigameData={instanceID:"",transactionID:""},this._currentPrizeWheelData={instanceID:"",transactionID:""},this._currentGoalRewardTransactionData={instanceID:"",transactionID:""}}sendMinigameEvent(q,K,z=null){K&&(this._currentMinigameData={instanceID:bt.$.generateUID(),transactionID:bt.$.generateUID()});let Y=Object.assign(Object.assign({minigame:q,instance_id:this._currentMinigameData.instanceID},z),this.getCommonEventDataProperties());K?Ke.track("Minigame Started",Y):(Y=Object.assign(Object.assign({},Y),{transaction_id:this._currentMinigameData.transactionID}),Ke.track("Minigame Completed",Y))}sendPrizeWheelSpunEvent(q,K=dt.N.OpenWorld,z={}){var Y;this._currentPrizeWheelData={instanceID:bt.$.generateUID(),transactionID:bt.$.generateUID(),spinID:null!==(Y=z.spin_id)&&void 0!==Y?Y:bt.$.generateUID()};const Q=Object.assign(Object.assign(Object.assign(Object.assign({wheel_type:q},this._segment.gameWorld.getCurrentInstanceTypeAndID(K)),{transaction_id:this.getCurrentPrizeWheelTransactionID()}),z),this.getCommonEventDataProperties());Ke.track("Prize Wheel Spun",Q)}sendPrizeWheelSpinFailedEvent(q,K,z=dt.N.OpenWorld,Y=null){const Q=Object.assign(Object.assign(Object.assign({wheel_type:q,fail_reason:K,funnel_id:K===Mt.WE.MemberLocked?this._segment.purchase.getFunnelID():null},this._segment.gameWorld.getCurrentInstanceTypeAndID(z)),Y),this.getCommonEventDataProperties());Ke.track("Prize Wheel Spin Failed",Q)}sendGoalAchievedEvent(q,K,z,Y,Q=!1,X=null){this._currentPrizeWheelData={instanceID:bt.$.generateUID(),transactionID:bt.$.generateUID()};const Z=Object.assign(Object.assign({goal_name:q,goal_id:K,goal_type:z,goal_system:Y,is_repeatable:Q,transaction_id:this.getCurrentGoalRewardTransactionID()},X),this.getCommonEventDataProperties());Ke.track("Goal Achieved",Z)}}var jt=z(30405);class $t extends ut.v{constructor(q,K,z){super(q,K,z)}handleNewClassAssignment(q){if(q.skills.some((q=>q.correct+q.incorrect>0)))return;const K=q.skills.reduce(((q,K)=>q+K.questions.length),0);Ke.track("Class Assignment Received",Object.assign({event_text:"Class Assignment Received",class_id:this.getClassId(),assignment_id:q.homeworkID,questions:K},this.getCommonEventDataProperties()))}handleClassAssignmentCompleted(q){const K=q.skills.reduce(((q,K)=>q+K.correct+K.incorrect),0);Ke.track("Class Assignment Completed",Object.assign({event_text:"Class Assignment Completed",class_id:this.getClassId(),assignment_id:q.homeworkID,questions_completed:K},this.getCommonEventDataProperties()))}handleRemovedClassAssignment(q){if(q.skills.every((q=>0===q.questions.length)))return;const K=q.skills.reduce(((q,K)=>q+K.correct+K.incorrect),0);Ke.track("Class Assignment Ended",Object.assign({event_text:"Class Assignment Ended",class_id:this.getClassId(),assignment_id:q.homeworkID,questions_completed:K},this.getCommonEventDataProperties()))}getClassId(){return jt.o.getLatestClassID(this._activePlayer.player.owners,this._activePlayer.player.playerTeachers,this._activePlayer.player.playerParents)}}var Ht=z(13093),Vt=z(96073),Wt=z(22023);class qt extends ut.v{constructor(){super(...arguments),this._currentInterfaceIDAndDuration=new Map,this._postOpenTime=0,this._currentButtonID=new Map}get currentInterfaceName(){return this._currentInterfaceName}getCurrentInterfaceID(q){var K;return null===(K=this._currentInterfaceIDAndDuration.get(q))||void 0===K?void 0:K.ID}getCurrentButtonID(q){var K;return null===(K=this._currentButtonID.get(q))||void 0===K?void 0:K.ID}sendInterfaceEvent(q,K=null){if(!window.analytics)return;const z=!!q.closeMethod;this._currentInterfaceName=q.interfaceName;let Y=q.originID;q.originType===lt.$N.ButtonClick||q.originType===lt.$N.TabClick?Y=this.getCurrentButtonID(q.originID):q.originType===lt.$N.NpcClick&&(Y=this._segment.gameWorld.getCurrentNpcTransactionID());let Q=Object.assign(Object.assign(Object.assign({interface_name:q.interfaceName,interface_type:q.interfaceType,origin_type:q.originType,origin_id:Y,instance_type:q.instanceType},q.custom),K),this.getCommonEventDataProperties());z?z&&this._currentInterfaceIDAndDuration.has(q.interfaceName)&&(Q=Object.assign(Object.assign({},Q),{instance_id:this._currentInterfaceIDAndDuration.get(q.interfaceName).ID,close_method:q.closeMethod,duration:((new Date).getTime()-this._currentInterfaceIDAndDuration.get(q.interfaceName).duration)/rt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER}),this._currentInterfaceIDAndDuration.delete(q.interfaceName),Ke.track("Interface Closed",Q)):(this._currentInterfaceIDAndDuration.set(q.interfaceName,{ID:bt.$.generateUID(),duration:(new Date).getTime()}),Q=Object.assign(Object.assign({},Q),{instance_id:this._currentInterfaceIDAndDuration.get(q.interfaceName).ID}),Ke.track("Interface Opened",Q))}getInstanceId(q){var K;if(window.analytics)return null===(K=this._currentInterfaceIDAndDuration.get(q))||void 0===K?void 0:K.ID}sendScreenTransitionEvent(q){if(window.analytics){const K=Object.assign({duration:q.duration,previous_screen_id:q.previousScreenID,screen_id:q.screenID,transition_type:q.transitionType},this.getCommonEventDataProperties());Ke.track("Screen Transitioned",K)}}sendButtonEvent(q,K=null){var z,Y;const Q=bt.$.generateUID(),X=null!==(z=q.interfaceName)&&void 0!==z?z:this._currentInterfaceName;let Z=Object.assign(Object.assign({button_name:q.buttonName,destination_name:q.destinationName,click_id:Q,interface_name:X,interface_type:q.interfaceType,element_type:q.elementType,element_id:q.elementID,transation_id:q.transactionId,instance_type:q.instanceType},K),this.getCommonEventDataProperties());X&&""!==X?Z=Object.assign({instance_id:null===(Y=this._currentInterfaceIDAndDuration.get(X))||void 0===Y?void 0:Y.ID},Z):q.instanceId&&(Z=Object.assign({instance_id:q.instanceId},Z)),q.saveClickInfo&&""!==q.saveClickInfo&&this._currentButtonID.set(q.saveClickInfo,{ID:Q}),Ke.track("Button Clicked",Z)}sendTabEvent(q,K=null){var z,Y;const Q=bt.$.generateUID(),X=null!==(z=q.interfaceName)&&void 0!==z?z:this._currentInterfaceName;let Z=Object.assign(Object.assign({tab_name:q.tabName,click_id:Q,interface_name:X,interface_type:q.interfaceType,instance_type:q.instanceType},K),this.getCommonEventDataProperties());q.interfaceName&&""!==q.interfaceName&&(Z=Object.assign({instance_id:null===(Y=this._currentInterfaceIDAndDuration.get(q.interfaceName))||void 0===Y?void 0:Y.ID,instance_type:q.instanceType},Z)),q.saveClickInfo&&""!==q.saveClickInfo&&this._currentButtonID.set(q.saveClickInfo,{ID:Q}),Ke.track("Tab Clicked",Z)}sendPostOpenedEvent(q,K=null){var z;this._postOpenTime=Date.now();let Y=Object.assign(Object.assign({interface_name:this._currentInterfaceName,post_id:q},K),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(Y=Object.assign({instance_id:null===(z=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===z?void 0:z.ID},Y)),Ke.track("Post Opened",Y)}sendPostViewedEvent(q,K=null){var z;let Y=Object.assign(Object.assign({interface_name:q.interfaceName,interface_type:q.interfaceType,post_title:q.postTitle,post_id:q.postID,post_rank:q.postRank},K),this.getCommonEventDataProperties());q.interfaceName&&""!==q.interfaceName&&(Y=Object.assign({instance_id:null===(z=this._currentInterfaceIDAndDuration.get(q.interfaceName))||void 0===z?void 0:z.ID},Y)),Ke.track("Post Viewed",Y)}sendPostClosedEvent(q,K,z=null){var Y;let Q=Object.assign(Object.assign({post_id:q,video_loaded:K,interface_name:this._currentInterfaceName,duration:(Date.now()-this._postOpenTime)/rt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},z),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(Q=Object.assign({instance_id:null===(Y=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===Y?void 0:Y.ID},Q)),Ke.track("Post Closed",Q)}sendPetBookViewedEvent(q){var K;let z=Object.assign({book_name:q.bookName,book_page:q.bookPage},this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(z=Object.assign({instance_id:null===(K=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===K?void 0:K.ID},z)),Ke.track("Page Viewed",z)}sendPetDetailsViewedEvent(q,K,z=null){var Y;let Q=Object.assign(Object.assign({pet_name:q.data.name,pet_id:q.ID,pet_type:q.data.type,pet_element:q.data.affinity,pet_rarity:q.data.rarity,origin_name:K},z),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(Q=Object.assign({instance_id:null===(Y=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===Y?void 0:Y.ID},Q)),Ke.track("Pet Details Viewed",Q)}sendPetReleasedEvent(q,K,z=null){var Y;let Q=Object.assign(Object.assign({pet_name:q,pet_level:K},z),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(Q=Object.assign({instance_id:null===(Y=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===Y?void 0:Y.ID},Q)),Ke.track("Pet Released",Q)}sendPetUpgradedEvent(q,K,z,Y,Q,X=null){var Z;let J=Object.assign(Object.assign({progression_type:"Pet Level",progression_value:z,previous_value:K,name:q,point_type:Q,point_amount:Y,transaction_id:bt.$.generateUID()},X),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(J=Object.assign({instance_id:null===(Z=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===Z?void 0:Z.ID},J)),Ke.track("Player Progression Advanced",J)}sendPetSlotUnlockedEvent(q,K,z,Y=bt.$.generateUID(),Q=null){const X=Object.assign(Object.assign({source_type:q,slots_unlocked:K-z,slots_available:K,slots_filled:this._activePlayer.player.kennel.getNumPets(),transaction_id:Y},Q),this.getCommonEventDataProperties());Ke.track("Pet Slot Unlocked",X)}sendTeamUpdatedEvent(q,K,z=null){var Y;let Q=Object.assign(Object.assign({pet_added:q,pet_removed:K},z),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(Q=Object.assign({instance_id:null===(Y=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===Y?void 0:Y.ID},Q)),Ke.track("Team Updated",Q)}sendTeamPositionChangedEvent(q,K=null){var z;let Y=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(Y=Object.assign({instance_id:null===(z=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===z?void 0:z.ID},Y)),Ke.track("Team Position Changed",Y)}sendFetchPetRosterEvent(q,K){const z=q.map((q=>{var K;const z=null===(K=xt.t.getItem("pet",q.ID))||void 0===K?void 0:K.data,Y=Wt.P8.getPetDisplayMergeRank(q.ID,q.uniqueID);return{pet_name:null==z?void 0:z.name,pet_id:q.ID,pet_level:q.level,pet_rank:Y,pet_gear:q.gear}}));Ke.track("Fetch Pet Roster",Object.assign(Object.assign({pet_roster:z},K),this.getCommonEventDataProperties()))}sendBadgeUpdatedEvent(q){const K=Object.assign({button_name:q.button_name,badge_value:q.badge_value,previous_badge_value:q.previous_badge_value},this.getCommonEventDataProperties());Ke.track("Badge Updated",K)}sendCrossPlatformEvent(q){const K=Object.assign(Object.assign({},q),this.getCommonEventDataProperties());Ke.track("Cross Product Navigation Initiated",K)}}var Kt=z(99134);class zt extends ut.v{constructor(q,K,z){super(q,K,z),this._loginSteps=[],at.q.instance.game.broadcaster.addAppListener(_t.bv.AnalyticsInitialized,this.onAnalyticsInitialized,this)}registerLoginStep(q){this._loginSteps.push(q)}sendStep(q,K,z,Y){var Q,X;if(!window.analytics)return;const Z=null!==(Q=this._activePlayer.player.data.featureFunnelProgress)&&void 0!==Q?Q:{};Y<=(null!==(X=Z[q])&&void 0!==X?X:-1)||(Ke.track("Funnel Advanced",Object.assign({funnel_name:q,funnel_type:K,step_name:z,step_index:Y},this.getCommonEventDataProperties())),this._activePlayer.player.data.featureFunnelProgress=Object.assign(Object.assign({},Z),{[q]:Y}),this._activePlayer.player.forceSaveCharacter())}onAnalyticsInitialized(){for(const q of this._loginSteps)q.condition()&&this.sendStep(q.funnelName,q.funnelType,q.stepName,q.stepIndex)}reset(q){var K;const z=null!==(K=this._activePlayer.player.data.featureFunnelProgress)&&void 0!==K?K:{};return void 0!==z[q]&&(delete z[q],this._activePlayer.player.data.featureFunnelProgress=z,this._activePlayer.player.forceSaveCharacter(),!0)}}var Yt=z(24047),Qt=z(73678),Xt=z(30065),Zt=z(47728),Jt=z(87337);class te extends ut.v{constructor(){super(...arguments),this._currentMapStartTime=0,this._discoveredNpcList=[],this._discoveredWorldObjectList=[],this._currentNpcData=null,this.currentOpenWorldInstanceId=""}getCurrentNpcInstanceID(){return this._currentNpcData?this._currentNpcData.instanceID:""}getCurrentNpcOriginID(){return this._currentNpcData?this._currentNpcData.npc_id:""}getCurrentNpcTransactionID(){return this._currentNpcData?this._currentNpcData.transactionID:""}sendMapEnteredEvent(q,K,z,Y=null,Q=!1){var X;this.currentOpenWorldInstanceId=bt.$.generateUID();const Z=Object.assign(Object.assign(Object.assign({previous_map:q,previous_zone:K,transition_type:z,duration:(Date.now()-this._currentMapStartTime)/rt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},this.getCurrentInstanceTypeAndID(dt.N.OpenWorld,null,{previousZone:K,previousMap:q})),Y),this.getCommonEventDataProperties());if("A1"===Z.map||"D3"===Z.map){if((null===(X=at.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival())||void 0===X?void 0:X.type)===Xt.Q.Springfest){const q=Zt.x.getFestivalSegmentContext();Z.instance_type=q.instance_type,Z.instance_id=q.instance_id}}if(Q){const q=Zt.x.getFestivalSegmentContext();Z.instance_type=q.instance_type,Z.instance_id=q.instance_id}this._currentMapStartTime=Date.now(),Ke.track("Map Entered",Z)}sendWorldObjectDiscoveredEvent(q,K=null){if(!window.analytics||this._discoveredWorldObjectList.includes(q.object_type))return;this._discoveredWorldObjectList.push(q.object_type);const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),this.getCurrentInstanceTypeAndID()),K),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Ke.track("World Object Discovered",z)}sendWorldObjectUsedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),this.getCurrentInstanceTypeAndID()),K),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Ke.track("World Object Used",z)}sendWorldObjectUsedFailedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},q),{funnel_id:q.fail_reason===Jt.kN.MemberLocked?this._segment.purchase.getFunnelID():null}),this.getCurrentInstanceTypeAndID()),K),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Ke.track("World Object Failed",z)}sendNpcClickedEvent(q,K=null){this._currentNpcData=Object.assign(Object.assign({},q),{instanceID:`${q.npc_name}-${q.npc_type}`,transactionID:bt.$.generateUID()});const z=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},q),{click_id:this.getCurrentNpcTransactionID()}),this.getCurrentInstanceTypeAndID()),K),this.getCommonEventDataProperties());Ke.track("Npc Clicked",z)}sendNpcDiscoveredEvent(q,K=null){if(!window.analytics||this._discoveredNpcList.includes(q.npc_name))return;this._discoveredNpcList.push(q.npc_name);const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),this.getCurrentInstanceTypeAndID()),K),this.getCommonEventDataProperties());Ke.track("Npc Discovered",z)}sendEnemyDiscoveredEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),this.getCurrentInstanceTypeAndID()),K),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Ke.track("Enemy Discovered",z)}sendCooldownTimerStartedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),this.getCurrentInstanceTypeAndID()),K),this.getCommonEventDataProperties());Ke.track("Cooldown Timer Started",z)}getCurrentInstanceTypeAndID(q=dt.N.OpenWorld,K,z){var Y;const[Q,X]=z?[z.previousZone,z.previousMap]:at.q.instance.prodigy.world.getCurrentMap().split("-");let Z,J=q;if(!["WR","CR","A1","DungeonHub","hub"].includes(X))switch(Q){case Qt.A_.ICETOWER:case Qt.A_.EARTHTOWER:case Qt.A_.DARKTOWER:J=dt.N.TowerRun;break;case Qt.A_.CRYSTALCAVERNS:J=dt.N.CrystalCaverns;break;case Qt.A_.ARCHIVES:J=dt.N.Archives;break;case Qt.A_.ACADEMY:J=dt.N.Academy}return q===dt.N.EndOfBattle?(J=dt.N.EndOfBattle,Z=null===(Y=this._segment.battle)||void 0===Y?void 0:Y.currentBattleID):q===dt.N.Interface?Z=this._segment.featureCommon.getCurrentInterfaceID(K):q===dt.N.RiftRun||q===dt.N.BossRift?Z=this._segment.rifts.riftInstanceUuid:(Z=this._segment.playerMovementAndDiscovery.getCurrentRunInstanceID(J),Z||q!==dt.N.OpenWorld||(Z=this.currentOpenWorldInstanceId)),{instance_type:J,instance_id:Z}}}var ee=z(62886),ie=z(60157);class se extends ut.v{constructor(){super(...arguments),this._ongoingTransactions=[]}sendItemRemovedEvent(q,K,z,Y,Q){const X=Object.assign(Object.assign(Object.assign({item_id:q,item_name:K,item_type:z,item_count:Y,item_balance:this._activePlayer.player.getItemCount(z,q),transaction_id:this.getCustomItemRemovedTransactionID(z,Q)},this._segment.gameWorld.getCurrentInstanceTypeAndID()),Q),this.getCommonEventDataProperties());this.sendItemQuestEvent(ee.T.REMOVE_ITEM,ee.T.REMOVE_MULTIPLE_ITEM,X,z,q),Ke.track("Item Removed",X)}sendItemReceivedEvent(q,K,z,Y,Q={}){var X,Z;const J=xt.t.getItem(z,q),tt=this._activePlayer.player.getItemCount(z,q),et=Object.assign(Object.assign(Object.assign(Object.assign({item_id:q,item_name:K,item_type:z,item_count:Y,item_balance:tt,player_equipment:this._activePlayer.player.equipment.getData(),item_unlock_level:null!==(Z=null===(X=null==J?void 0:J.data)||void 0===X?void 0:X.lockLevel)&&void 0!==Z?Z:1},this._segment.gameWorld.getCurrentInstanceTypeAndID(null==Q?void 0:Q.instance_type,null==Q?void 0:Q.interface_name)),Q),this.getSourceTransactionData(null==Q?void 0:Q.source_type,null==Q?void 0:Q.source_id)),this.getCommonEventDataProperties());this.sendItemQuestEvent(ee.T.RECEIVE_ITEM,ee.T.RECEIVE_MULTIPLE_ITEM,et,z,q),at.q.instance.game.broadcaster.broadcast(_t.ib.ItemReceived,void 0,[{ID:q,type:z,N:Y,balance:tt}]),Ke.track("Item Received",et)}sendItemUsedEvent(q,K={}){this._currentItemUsedTransactionID=bt.$.generateUID();const z=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._segment.gameWorld.getCurrentInstanceTypeAndID()),q),{transaction_id:this._currentItemUsedTransactionID}),K),this.getCommonEventDataProperties());this.sendItemQuestEvent(ee.T.USE_ITEM,void 0,z,q.item_type,q.item_id),Ke.track("Item Used",z)}sendItemEquippedEvent(q,K=null,z={}){const Y=Object.assign(Object.assign(Object.assign(Object.assign({},q),{interaction_id:K}),z),this._segment.featureCommon.getCommonEventDataProperties());this.sendItemQuestEvent(ee.T.EQUIP_ITEM,void 0,Y,q.item_type,q.item_id),Ke.track("Item Equipped",Y)}sendItemEquipFailedEvent(q,K={}){const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),{funnel_id:"Member Locked"===q.fail_reason?this._segment.purchase.getFunnelID():null}),K),this._segment.featureCommon.getCommonEventDataProperties());Ke.track("Item Equip Failed",z)}sendItemUnequippedEvent(q,K=null,z={}){const Y=Object.assign(Object.assign(Object.assign(Object.assign({},q),{interaction_id:K}),z),this._segment.featureCommon.getCommonEventDataProperties());Ke.track("Item Unequipped",Y)}getSourceTransactionData(q,K){var z,Y;let X,Z=null,J=q;if(!J)return null;switch(J){case ht.C.Container:case ht.C.Interactable:case ht.C.WorldChest:case ht.C.WorldMemberChest:Z=this._segment.container.getCurrentContainerInstanceID(),X=this._segment.container.getCurrentContainerTransactionID();break;case ht.C.MiniGame:Z=this._segment.economy.getCurrentMinigameInstanceID(),X=this._segment.economy.getCurrentMinigameTransactionID();break;case ht.C.PrizeWheel:this._segment.rifts.riftInstanceUuid?(Z=null!==(z=this._segment.rifts.getRiftsRewardSpinUuid())&&void 0!==z?z:"",X=null!==(Y=this._segment.rifts.getRiftsRewardSpinTransactionUuid())&&void 0!==Y?Y:""):(Z=this._segment.economy.getCurrentPrizeWheelInstanceID(),X=this._segment.economy.getCurrentPrizeWheelTransactionID());break;case ht.C.Shop:Z=this._segment.shop.getCurrentShopInstanceID(),X=this._segment.shop.getCurrentShopTransactionID();break;case ht.C.QuestReward:Z=this._segment.playerProgression.getCurrentQuestInstanceID(),X=this._segment.playerProgression.getCurrentQuestTransactionID();break;case ht.C.Npc:Z=this._segment.gameWorld.getCurrentNpcInstanceID(),X=this._segment.gameWorld.getCurrentNpcTransactionID();break;case ht.C.Battle:Z=this._segment.battle.currentBattleID,X=bt.$.generateUID();break;case ht.C.BattlePass:X=this._segment.battlePass.rewardClaimedTransactionId;break;case ht.C.Festival:case ht.C.FestivalPrizeWheel:X=this._segment.festival.getCurrentFestivalTransactionID(null!=K?K:"");break;case ht.C.FestivalCurrencyConversion:X=bt.$.generateUID();break;case ht.C.FestivalBossLootWheel:Z=this._segment.economy.getCurrentPrizeWheelSpinID(),X=this._segment.economy.getCurrentPrizeWheelTransactionID();break;case ht.C.DailyLoginCalendar:const q="daily-login-calendar-collect-button";Z="Daily-login-Calendar-Reward",X=this._segment.featureCommon.getCurrentButtonID(q);break;case ht.C.DynamicStore:const Q=at.q.instance.prodigy.gameContainer.get("668-8a41").getLastTransactionStore();Z=this._segment.shop.getDynamicStoreSourceId(Q),X=this._segment.shop.getCurrentShopTransactionID(),J=ht.C.Shop;break;default:return null}const tt={source_type:J};return Q.Aq$.isDefined(Z)&&(tt.source_id=Z),Q.Aq$.isDefined(K)&&""===Z&&(tt.source_id=K),Q.Aq$.isDefined(X)&&(tt.transaction_id=X),tt}beginSecureInventoryTracking(){const q=at.q.instance.prodigy.gameContainer.get("6d6-463e");q.onChange.removeAll(this),q.onChange.add(((q,K)=>{const z=this._ongoingTransactions[this._ongoingTransactions.length-1];z?z.add({current:q,previous:K,customData:{}}):Q.VyI.log("Received secure inventory changes with no associated segment transaction",Q.$bb.Error)}),this)}beginSecureItemTransaction(){let q=[];const K={add:K=>{q?q.push(K):Q.VyI.log("Attempted to add item to flushed segment transaction",Q.$bb.Error)},take:()=>{const K=null!=q?q:[];return q=void 0,K},setIndividualData:(K,z,Y)=>{for(const Q of null!=q?q:[])Q.current.type===K&&Q.current.id===z&&(Q.customData=Y)},flush:z=>{if(!q)return;const Y=this._ongoingTransactions.indexOf(K),X=this._ongoingTransactions.splice(Y,1/0);for(const q of X)for(const{previous:K,current:Y,customData:X}of q.take())xt.t.secureGetItem(Y.type,Y.id).then((q=>{var Q,Z,J;const tt=null!==(Q=null==K?void 0:K.quantity)&&void 0!==Q?Q:0,et=Y.quantity,it=null!==(J=null===(Z=null==q?void 0:q.data)||void 0===Z?void 0:Z.name)&&void 0!==J?J:"undefined",st=Object.assign(Object.assign({},z),X);et>tt&&this._segment.item.sendItemReceivedEvent(Y.id,it,Y.type,et-tt,st),et",currency_balance:this._activePlayer.player.getCurrencyAmount(J,Z),item_cost:tt}),K),{sink_id:null===(X=K.sink_id)||void 0===X?void 0:X.toString()}))}sendCostumePreviewedEvent(q,K,z,Y){Ke.track("Costume Previewed",Object.assign({costume_id:q,costume_name:K,is_member_locked:z,rarity:Y},this.getCommonEventDataProperties()))}}var ne=z(70156),ae=z(78746),re=z(4764);class oe extends ut.v{get currentLootDashMatchId(){return this._currentLootDashMatchId}constructor(q,K,z){super(q,K,z),this._lootDashManager=at.q.instance.prodigy.gameContainer.get("1c5-a816")}sendMatchmakingStartedEvent(){if(!this.lootDashMatchController)return;const{instanceType:q,instanceId:K}=this.getInstanceData(!0);Ke.track("Wizard Dash Matchmaking Started",Object.assign({event_text:"Wizard Dash Matchmaking Started",instance_type:q,instance_id:K,match_type:this.lootDashMatchController.matchType,matchmaking_type:this.lootDashMatchController.matchmakingType},this.getCommonEventDataProperties()))}sendBotDataRetrievedEvent(q){if(!q)return;const{instanceType:K,instanceId:z}=this.getInstanceData();Ke.track("Wizard Dash Bot Data Retrieved",Object.assign({event_text:"Wizard Dash Bot Data Retrieved",instance_type:K,instance_id:z,bot_type:q.difficulty,bots:q},this.getCommonEventDataProperties()))}sendRunStartedEvent(){if(!this.lootDashMatchController)return;this._currentLootDashMatchId=bt.$.generateUID();const{instanceType:q,instanceId:K}=this.getInstanceData(!0);Ke.track("Wizard Dash Run Started",Object.assign({event_text:"Wizard Dash Run Started",instance_type:q,instance_id:K,match_type:this.lootDashMatchController.matchType,matchmaking_type:this.lootDashMatchController.matchmakingType,number_of_opponents:this.lootDashMatchController.numBotOpponents+this.lootDashMatchController.numLiveOpponents,number_of_bots:this.lootDashMatchController.numBotOpponents,number_of_live_players:this.lootDashMatchController.numLiveOpponents,featured_content_available:0,featured_content_filled:0,total_stages:this.lootDashMatchController.totalStages,revives_remaining:this.filterRevivesRemaining(this._lootDashManager.getNumberOfStartingRevives())},this.getCommonEventDataProperties()))}sendRunCompletedEvent(q,K){var z;if(!this.lootDashMatchController)return;const Y=this._activePlayer.player.educationData,{instanceType:Q,instanceId:X}=this.getInstanceData();Ke.track("Wizard Dash Run Completed",Object.assign({event_text:"Wizard Dash Run Completed",instance_type:Q,instance_id:X,outcome:this.lootDashMatchController.lootDashMatchData.matchCompletionState,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData,stars_earned:q,place_finished:K,winning_streak:this.lootDashMatchController.lootDashMatchData.currentStreak,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining),questions_answered:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.totalQuestionsAnswered,questions_correct:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.totalQuestionsAnsweredCorrectly,grade:null!==(z=Y.grade)&&void 0!==z?z:Y.chosenGrade},this.getCommonEventDataProperties()))}sendStageStartedEvent(){if(!this.lootDashMatchController)return;const q=this.lootDashMatchController.lootDashMatchData.stageData[this.lootDashMatchController.currentStageIndex+1];this._currentLootDashStageId=bt.$.generateUID();const{instanceType:K,instanceId:z}=this.getInstanceData();Ke.track("Wizard Dash Stage Started",Object.assign({event_text:"Wizard Dash Stage Started",instance_type:K,instance_id:z,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,stage_type:this.lootDashMatchController.lootDashMatchData.currentStage.stageType,next_stage:q?q.stageIndex+1:"last_stage",total_stages:this.lootDashMatchController.totalStages,total_waves:this.lootDashMatchController.numWavesInCurrentStage,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining)},this.getCommonEventDataProperties()))}sendStageCompletedEvent(){if(!this.lootDashMatchController)return;const{instanceType:q,instanceId:K}=this.getInstanceData();Ke.track("Wizard Dash Stage Completed",Object.assign({event_text:"Wizard Dash Stage Completed",instance_type:q,instance_id:K,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,stage_type:this.lootDashMatchController.lootDashMatchData.currentStage.stageType,total_stages:this.lootDashMatchController.totalStages,total_waves:this.lootDashMatchController.numWavesInCurrentStage,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining),questions_answered:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredThisStage,questions_correct:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisStage},this.getCommonEventDataProperties()))}sendWaveStartedEvent(){if(!this.lootDashMatchController)return;this._currentLootDashWaveId=bt.$.generateUID();const{instanceType:q,instanceId:K}=this.getInstanceData();Ke.track("Wizard Dash Wave Started",Object.assign({event_text:"Wizard Dash Wave Started",instance_type:q,instance_id:K,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_id:this._currentLootDashWaveId,wave_number:this.lootDashMatchController.currentWaveIndex+1,total_waves:this.lootDashMatchController.numWavesInCurrentStage,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining)},this.getCommonEventDataProperties()))}sendWaveCompletedEvent(){if(!this.lootDashMatchController)return;const{instanceType:q,instanceId:K}=this.getInstanceData();Ke.track("Wizard Dash Wave Completed",Object.assign({event_text:"Wizard Dash Wave Completed",instance_type:q,instance_id:K,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_id:this._currentLootDashWaveId,wave_number:this.lootDashMatchController.currentWaveIndex+1,total_waves:this.lootDashMatchController.numWavesInCurrentStage,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining),questions_answered:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave,questions_correct:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave},this.getCommonEventDataProperties()))}sendMathStreakContinuedEvent(q){if(!this.lootDashMatchController)return;const{instanceType:K,instanceId:z}=this.getInstanceData();Ke.track("Wizard Dash Math Streak Continued",Object.assign({event_text:"Wizard Dash Math Streak Continued",instance_type:K,instance_id:z,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1,current_streak:q,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData},this.getCommonEventDataProperties()))}sendMathStreakResetEvent(q){if(!this.lootDashMatchController)return;const{instanceType:K,instanceId:z}=this.getInstanceData();Ke.track("Wizard Dash Math Streak Reset",Object.assign({event_text:"Wizard Dash Math Streak Reset",instance_type:K,instance_id:z,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1,previous_streak:q,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData},this.getCommonEventDataProperties()))}sendReviveUsedEvent(){if(!this.lootDashMatchController)return;const{instanceType:q,instanceId:K}=this.getInstanceData();Ke.track("Wizard Dash Revive Used",Object.assign({event_text:"Wizard Dash Revive Used",instance_type:q,instance_id:K,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining)},this.getCommonEventDataProperties()))}sendNoMoreRevivesEvent(){if(!this.lootDashMatchController)return;const{instanceType:q,instanceId:K}=this.getInstanceData();Ke.track("Wizard Dash No More Revives",Object.assign({event_text:"Wizard Dash No More Revives",instance_type:q,instance_id:K,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1},this.getCommonEventDataProperties()))}getInstanceData(q=!1){var K;const z=this.lootDashMatchController.matchType;let Y=dt.N.LootDash,Q=this._currentLootDashMatchId;return q&&(Q=this._segment.featureCommon.getInstanceId(ct.B.LootDashMenu)),z===ae.B1.QuickQuiz&&(Y=dt.N.LootDashQuickQuiz,Q=null===(K=re.w.instance().currentAssignmentId)||void 0===K?void 0:K.toString()),{instanceType:Y,instanceId:Q}}filterRevivesRemaining(q){return q===ne.eA?void 0:q}}var he=z(215);class ce extends ut.v{get currentTransactionID(){return this._currentTransactionID}constructor(q,K,z){super(q,K,z)}sendPlayerNameUpdatedEvent(q,K,z=null){const Y=Object.assign(Object.assign({player_name:q,selected_from:K},z),this.getCommonEventDataProperties());Ke.track("Player Name Updated",Y)}sendPlayerAvatarUpdatedEvent(q,K,z=null){this._currentTransactionID=bt.$.generateUID();const Y=Object.assign(Object.assign({feature:q,selection:K,transaction_id:this.currentTransactionID},z),this.getCommonEventDataProperties());Ke.track("Player Avatar Updated",Y)}sendEmoteUsedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("Emote Used",z)}sendEmoteFailedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),{funnel_id:"Member Locked"===q.fail_reason?this._segment.purchase.getFunnelID():null}),K),this.getCommonEventDataProperties());Ke.track("Emote Failed",z)}}var de=z(83668),le=z(19464);class ue extends ut.v{getCurrentRunInstanceID(q){var K;return null!==(K=this._currentRunInstanceID.get(q))&&void 0!==K?K:""}constructor(q,K,z){super(q,K,z),this._currentRunInstanceID=new Map,this._currentTowerRunData=null,this._currentTowerRunData={towerRunStartTime:0,towerRunFloorStartTime:0,numberOfCompletedFloors:0}}sendCrystalCavernsEnteredEvent(q,K=null){this._currentRunInstanceID.set(dt.N.CrystalCaverns,bt.$.generateUID());const z=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(dt.N.CrystalCaverns),instance_origin:q},K),this.getCommonEventDataProperties());Ke.track("Crystal Caverns Entered",z)}sendCrystalCavernsParticipantsEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(dt.N.CrystalCaverns)},q),K),this.getCommonEventDataProperties());Ke.track("Crystal Caverns Participants",z)}sendCrystalCavernsMilestoneReachedEvent(q,K=null){const z=this._activePlayer.player.state.getDungeonState(de.o,"crystal_caverns"),Y=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(dt.N.CrystalCaverns),milestone_type:q,milestone:q===le.lT.Complete?q:null==z?void 0:z.getCurrentMap()},K),this.getCommonEventDataProperties());Ke.track("Crystal Caverns Milestone Reached",Y)}sendCrystalCavernsCompletedEvent(q,K=null){const z=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(dt.N.CrystalCaverns),outcome:q},K),this.getCommonEventDataProperties());Ke.track("Crystal Caverns Completed",z)}sendArchivesRunStartedEvent(q=null){this._currentRunInstanceID.set(dt.N.Archives,bt.$.generateUID());const K=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(dt.N.Archives)},q),this.getCommonEventDataProperties());Ke.track("Archives Run Started",K)}sendArchivesRunCompletedEvent(q,K=null){const z=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(dt.N.Archives),golden_pages:q},K),this.getCommonEventDataProperties());Ke.track("Archives Run Completed",z)}sendTowerRunStartedEvent(q,K,z=null){this._currentRunInstanceID.set(dt.N.TowerRun,bt.$.generateUID()),this._currentTowerRunData={towerRunStartTime:Date.now(),towerRunFloorStartTime:0,numberOfCompletedFloors:0};const Y=Object.assign(Object.assign({tower_type:q,is_complete:K,instance_id:this._currentRunInstanceID.get(dt.N.TowerRun)},z),this.getCommonEventDataProperties());Ke.track("Tower Run Started",Y)}sendTowerRunFloorStartedEvent(q,K=null){if(void 0===this._currentRunInstanceID.get(dt.N.TowerRun))return;this._currentTowerRunData.towerRunFloorStartTime=Date.now();const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),{instance_id:this._currentRunInstanceID.get(dt.N.TowerRun)}),K),this.getCommonEventDataProperties());Ke.track("Tower Floor Started",z)}sendTowerRunFloorCompletedEvent(q,K=null){if(void 0===this._currentRunInstanceID.get(dt.N.TowerRun))return;this._currentTowerRunData.numberOfCompletedFloors++;const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),{instance_id:this._currentRunInstanceID.get(dt.N.TowerRun),duration:(Date.now()-this._currentTowerRunData.towerRunFloorStartTime)/rt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER}),K),this.getCommonEventDataProperties());Ke.track("Tower Floor Completed",z)}sendTowerRunCompletedEvent(q,K,z=null){if(void 0===this._currentRunInstanceID.get(dt.N.TowerRun))return;const Y=Object.assign(Object.assign({tower_type:q,is_complete:K,floors_completed:this._currentTowerRunData.numberOfCompletedFloors,duration:(Date.now()-this._currentTowerRunData.towerRunStartTime)/rt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER,instance_id:this._currentRunInstanceID.get(dt.N.TowerRun)},z),this.getCommonEventDataProperties());Ke.track("Tower Run Completed",Y)}}var fe=z(96810);class be extends ut.v{constructor(q,K,z){super(q,K,z)}sendFloatlingTowerCreatedEvent(q,K=null){const z=Object.assign(Object.assign({tower_id:q},K),this.getCommonEventDataProperties());Ke.track("Floatling Tower Created",z)}sendFloatlingTowerCompletedEvent(q,K,z=null){const Y=Object.assign(Object.assign({tower_id:q,floors:K},z),this.getCommonEventDataProperties());Ke.track("Floatling Tower Completed",Y)}sendFloatlingFloorCreatedEvent(q,K=null){const z=Object.assign(Object.assign({tower_id:q.towerID,floor_id:q.floorID,infinity_floor:q.isInfinityFloor,algorithm:q.isInfinityFloor?q.algorithmType:"NULL"},K),this.getCommonEventDataProperties());Ke.track("Floatling Floor Created",z)}sendFloatlingRoomBuiltEvent(q,K=null){const z=Object.assign(Object.assign({tower_id:q.towerID,floor_id:q.floorID,room_id:q.roomID,room_type:q.roomType,room_border:q.roomBorder,decoration1:q.decorations[0],decoration2:q.decorations[1],decoration3:q.decorations[2],decoration4:q.decorations[3],decoration5:q.decorations[4]},K),this.getCommonEventDataProperties());Ke.track("Floatling Room Built",z)}sendFloatlingCreatedEvent(q,K,z=null){const Y=Object.assign(Object.assign({floatling_type:q,count:K},z),this.getCommonEventDataProperties());Ke.track("Floatling Created",Y)}}class pe extends ut.v{getCurrentQuestInstanceID(){return this._currentQuestData?this._currentQuestData.instanceID:""}getCurrentQuestTransactionID(){return this._currentQuestData?this._currentQuestData.transactionID:""}constructor(q,K,z){super(q,K,z),this._funnelNamesAndStepIDs=[],this._currentQuestData=null,this.towerTownEvents=new be(this._segment,this._uuidProvider,this._activePlayer),this._currentQuestData={instanceID:"",transactionID:""}}clearPlayerProgressionDataForFunnelName(q){this._funnelNamesAndStepIDs=this._funnelNamesAndStepIDs.filter((K=>K.funnelName!==q))}sendFunnelAdvancedEvent(q,K=null,z=!1){var Y;const X=Object.values(fe.l).indexOf(q.stepName),Z=null===(Y=this._funnelNamesAndStepIDs.find((K=>K.funnelName===q.funnelName)))||void 0===Y?void 0:Y.stepIndex.includes(X);if(!Q.Aq$.isDefined(Z)||!Z||z){const z=Object.assign(Object.assign({funnel_name:q.funnelName,funnel_type:q.funnelType,funnel_id:q.funnelId,step_name:q.stepName,step_index:X},K),this.getCommonEventDataProperties());Ke.track("Funnel Advanced",z),this.savePlayerProgressionFunnelData(q.funnelName,X)}}sendAfterSchoolWidgetFunnelAdvancedEvent(q){const K=Object.assign({funnel_name:q.funnelName,funnel_type:q.funnelType,funnel_id:q.funnelId,step_name:q.stepName,step_index:q.stepIndex},this.getCommonEventDataProperties());Ke.track("Funnel Advanced",K),this.savePlayerProgressionFunnelData(q.funnelName,q.stepIndex)}sendPetHardCurrencyFunnelAdvancedEventIfApplicable(q,K,z){Q.Aq$.isDefined(z)&&!at.q.instance.prodigy.gameContainer.get("bec-c6b4").petAcquisitionCost(z,q)||this.sendFunnelAdvancedEvent({funnelType:"feature",funnelName:"pet_hard_currency",stepName:K,funnelId:q})}savePlayerProgressionFunnelData(q,K){(0,Et.v)(!!this._funnelNamesAndStepIDs,"Segment player progression funnel is undefined");const z=this._funnelNamesAndStepIDs.findIndex((K=>K.funnelName===q));if(z<0){const z={funnelName:q,stepIndex:[K]};this._funnelNamesAndStepIDs.push(z)}else this._funnelNamesAndStepIDs[z].stepIndex.push(K)}sendPlayerProgressionPointsEarnedEvent(q,K,z=null){const Y=Object.assign(Object.assign({point_type:q.pointType,point_count:q.pointCount,progression_type:q.progressionType,name:q.creatureName,instance_type:K.instanceType,instance_id:K.instanceID},z),this.getCommonEventDataProperties());Ke.track("Player Progression Points Earned",Y)}sendPlayerProgressionAdvancedEvent(q,K,z=null){const Y=Object.assign(Object.assign({progression_type:q.progressionType,progression_subtype:q.progressionSubType,progression_value:q.progressionNewValue,previous_value:q.progressionPreviousValue,name:q.creatureName,transaction_id:q.transactionId,point_type:null==K?void 0:K.pointType,point_amount:null==K?void 0:K.pointCount},z),this.getCommonEventDataProperties());Ke.track("Player Progression Advanced",Y)}sendPlayerProgressionRestrictedEvent(q,K,z=null){const Y=Object.assign(Object.assign({progression_type:q.progressionType,progression_action:q.progressionAction,progression_value:q.progressionValue,name:q.creatureName,point_type:null==K?void 0:K.pointType,point_amount:null==K?void 0:K.pointCount,currency:q.currencyType,price:q.currencyAmount},z),this.getCommonEventDataProperties());Ke.track("Player Progression Restricted",Y)}sendQuestProgressionAdvancedEvent(q,K=null){this._currentQuestData={instanceID:`${q.quest_type}-${q.quest_id}`,transactionID:bt.$.generateUID()};const z=Object.assign(Object.assign(Object.assign(Object.assign({},q),{transaction_id:this.getCurrentQuestTransactionID()}),K),this.getCommonEventDataProperties());Ke.track("Quest Progression Advanced",z)}sendPetEvolvedEvent(q,K=null){const z=Object.assign(Object.assign({name:q.petName,old_name:q.petOldName,pet_level:q.petLevel,pet_type:q.petType,pet_rank:q.petRank,evolution_source:q.evolutionSource},K),this.getCommonEventDataProperties());Ke.track("Pet Evolved",z)}sendPetEvolutionCancelledEvent(q,K=null){const z=Object.assign(Object.assign({name:q.petName,type:q.petElement,pet_level:q.petLevel,pet_rank:q.petRank,evolution_source:q.evolutionSource},K),this.getCommonEventDataProperties());Ke.track("Pet Evolution Cancelled",z)}sendGoalProgressUpdatedEvent(q,K=null){const z=Object.assign(Object.assign({goal_name:q.goalName,goal_id:q.goalId,deadline:q.deadline,target_type:q.targetType,goal_progress:q.goalProgress,goal_target:q.goalTarget},K),this.getCommonEventDataProperties());Ke.track("Goal Progress Updated",z)}sendFeatureUnlockedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("Feature Unlocked",z)}}var ve,ge=z(47632);!function(q){q.Q1="QUESTS_BONFIRE_SPIRE_PULL_LEVER",q.Q2="QUESTS_BONFIRE_SPIRE_PULL_LEVER",q.Q3="QUESTS_BONFIRE_SPIRE_PULL_LEVER",q.Q4="QUESTS_BONFIRE_RETRIEVE_INGREDIENT",q.Q5="QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",q.Q6="QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",q.Q7="QUESTS_BONFIRE_COLLECT_COOKING_SUPPLIES",q.Q8="QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",q.Q9="QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",q.Q10="QUESTS_BONFIRE_SPIRE_OFFER_DISH",q.Q11="QUESTS_BONFIRE_SPIRE_FIND_KEY",q.Q12="QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",q.Q13="QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",q.Q14="QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN"}(ve||(ve={}));var me,ye,_e,Ee=z(72326);!function(q){q.Q1="QUESTS_SHIPWRECK_FIND_BREATHING_BUBBLE",q.Q2="QUESTS_SHIPWRECK_FIND_JIM",q.Q3="QUESTS_SHIPWRECK_FIND_MONSTER",q.Q4="QUESTS_SHIPWRECK_ACQUIRE_INK_SAMPLE",q.Q5="QUESTS_SHIPWRECK_CLEAR_INK",q.Q6="QUESTS_SHIPWRECK_FIND_JIM",q.Q7="QUESTS_SHIPWRECK_GET_CAMERA",q.Q8="QUESTS_SHIPWRECK_TAKE_PICTURE",q.Q9="QUESTS_SHIPWRECK_OPEN_DOOR",q.Q10="QUESTS_SHIPWRECK_DEFEAT_MONSTERS",q.Q11="QUESTS_SHIPWRECK_DEFEAT_BOSS"}(me||(me={})),function(q){q.Q1="QUESTS_SHIVERCHILL_CLEAR_FURNACE",q.Q2="QUESTS_SHIVERCHILL_GET_FUEL",q.Q3="QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",q.Q4="QUESTS_SHIVERCHILL_EXPLORE_CAVES",q.Q5="QUESTS_SHIVERCHILL_FIND_SHOVEL",q.Q6="QUESTS_SHIVERCHILL_HELP_MINER",q.Q7="QUESTS_SHIVERCHILL_UNKNOWN",q.Q8="QUESTS_SHIVERCHILL_DEFEAT_MINI_BOSS",q.Q9="QUESTS_SHIVERCHILL_DEFEAT_SPECTERS",q.Q10="QUESTS_SHIVERCHILL_GET_FUEL",q.Q11="QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",q.Q12="QUESTS_SHIVERCHILL_CHECK_THRONE",q.Q13="QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",q.Q14="QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",q.Q15="QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",q.Q16="QUESTS_SHIVERCHILL_GET_GEM"}(ye||(ye={})),function(q){q.Q1="QUESTS_SKYWATCH_TRIM_VINES",q.Q2="QUESTS_SKYWATCH_GET_DEVICE",q.Q3="QUESTS_SKYWATCH_FIND_BROCCOLINI",q.Q4="QUESTS_SKYWATCH_TRIM_VINES",q.Q5="QUESTS_SKYWATCH_FIND_FACTORY_KEY",q.Q6="QUESTS_SKYWATCH_GET_KEY",q.Q7="QUESTS_SKYWATCH_UPGRADE_VINECERATOR",q.Q8="QUESTS_SKYWATCH_TRIM_VINES",q.Q9="QUESTS_SKYWATCH_TRIM_VINES",q.Q10="QUESTS_SKYWATCH_TRIM_VINES",q.Q11="QUESTS_SKYWATCH_FIND_EUGENE",q.Q12="QUESTS_SKYWATCH_FIND_KEY",q.Q13="QUESTS_SKYWATCH_DEFEAT_BOSS"}(_e||(_e={}));class we extends ut.v{setup(){super.setup()}get questEventTransaction(){var q;return null!==(q=this._questEventTransaction)&&void 0!==q?q:{flush(){Q.VyI.log("Attempted to flush non-existing quest event transaction",Q.$bb.Error)},setIndividualData(){}}}beginQuestEventTransaction(){return this._questEventTransaction=this._segment.item.beginSecureItemTransaction(),this._questEventTransaction}sendZoneQuestStartedEvent(q,K){var z,Y;const X=this.getQuestStep(q,K);X?null===(Y=null===(z=this._segment)||void 0===z?void 0:z.playerProgression)||void 0===Y||Y.sendQuestProgressionAdvancedEvent({quest_id:String(K),quest_type:"zone_mission",quest_step:X,zone_complete:!1}):Q.VyI.log(`No quest analytics key found for zone quest ${q}`,Q.$bb.Warning)}sendZoneQuestlineCompleteEvent(q){var K,z,Y;const Q=null===(K=at.q.instance.prodigy.world.getZone(q))||void 0===K?void 0:K.finalQuestId;null===(Y=null===(z=this._segment)||void 0===z?void 0:z.playerProgression)||void 0===Y||Y.sendQuestProgressionAdvancedEvent({quest_id:String(Q),quest_type:"zone_mission",quest_step:"Quest Complete",zone_complete:!0})}getQuestStep(q,K){switch(q){case Qt.A_.FOREST:case Qt.A_.FORESTHARD:case Qt.A_.FORESTEXPERT:return Ee.v[`Q${K}`];case Qt.A_.SHIVERCHILL:case Qt.A_.SHIVERCHILLHARD:case Qt.A_.SHIVERCHILLEXPERT:return ye[`Q${K}`];case Qt.A_.BONFIRE:case Qt.A_.BONFIREHARD:case Qt.A_.BONFIREEXPERT:return ve[`Q${K}`];case Qt.A_.SHIPWRECK:case Qt.A_.SHIPWRECKHARD:case Qt.A_.SHIPWRECKEXPERT:return me[`Q${K}`];case Qt.A_.SKYWATCH:case Qt.A_.SKYWATCHHARD:case Qt.A_.SKYWATCHEXPERT:return _e[`Q${K}`];default:return Q.VyI.log(`No quest step found for zone ${q} and task ${K}`,Q.$bb.Warning),null}}}var Te=z(74958);class Se extends ut.v{sendSegmentedOfferAssignedEvent(q,K){var z;Ke.track("Segmented Offer Received",Object.assign({event_text:"Segmented Offer Received",event_type:"segmented_offer_received",offer_name:null!==(z=q.campaignId)&&void 0!==z?z:q.id,offer_type:this._activePlayer.isMember()?"upsell":"non_member",offer_segment:JSON.stringify(q.segments[K].featureRequirements),offers_received:this._activePlayer.player.encounters.getResolvedOffers().length},this.getCommonEventDataProperties()))}}class Ae{constructor(q,K){this._data={},this._name=q,this._data=K}setData(q){return this._data=Object.assign(Object.assign({},this._data),q),this}send(){(0,Et.v)(!tt().some(this._data,tt().isNil),`Metric '${this._name}' has null/undefined values for required properties "${tt()(this._data).pickBy(tt().isNil).keys().value().join('", "')}".`),Ke.track(this._name,this._data)}}class Ce{constructor(q){this._segment=q}achievementComplete(q){return this.event("Achievement Completed",q)}experimentVariationAssigned(q,K,z,Y){const Q=Object.assign(Object.assign({experiment_id:q,feature_key:q,experiment_key:K,variation_id:z,user_id:at.q.instance.prodigy.gameContainer.get("ad2-c5b2").getUserID().toString()},Y),this._segment.featureCommon.getCommonEventDataProperties());return this.event("Experiment Variation Assigned",J.omitBy(Q,J.isNil))}event(q,K){return new Ae(q,K)}}class Oe extends ut.v{constructor(q,K,z){super(q,K,z)}sendStart(){const q=bt.$.generateUID();this._currentPostBattleEvent={id:q,startTime:(0,J.now)()};const K=Object.assign(Object.assign({},this._currentPostBattleEvent),this.getCommonEventDataProperties());Ke.track("Post-Battle-Flow-Started",K)}sendEnd(){this._currentPostBattleEvent.endTime=(0,J.now)(),this._currentPostBattleEvent.durationInSeconds=(this._currentPostBattleEvent.endTime-this._currentPostBattleEvent.startTime)/1e3;const q=Object.assign(Object.assign({},this._currentPostBattleEvent),this.getCommonEventDataProperties());Ke.track("Post-Battle-Flow-Ended",q)}}var Ie=z(223);class De extends ut.v{constructor(q,K,z){super(q,K,z),this._funnelQuitPaused=!1;const Y=this._activePlayer.player.data.segmentPurchaseFunnel;this._currentPurchaseFunnel="string"==typeof Y?{id:Y,trigger:void 0,steps:[]}:Y}sendFunnelTriggerImpression(q){if(this.shouldSuppressFunnelEvents(q.type,q.category))return;const K=this.generateNewFunnel(q);return Ke.track("Game Purchase Funnel Trigger Impression",this.getCommonFunnelEventProperties(K)),K}sendFunnelStart(q,K){this.shouldSuppressFunnelEvents(q.type,q.category)||(Ke.track("Game Purchase Funnel Entered",this.getCommonFunnelEventProperties(null!=K?K:this.generateNewFunnel(q))),this.saveFunnelData())}sendFunnelStep(q){this.isFunnelInvalid()||Ke.track("Game Purchase Funnel Step Advanced",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{funnel_step:q,funnel_index:this.setFunnelCurrentStep(q)}))}sendFunnelError(q,K,z){if(this.isFunnelInvalid())return;let Y="";switch(typeof z){case"string":Y=z;break;case"object":"string"==typeof(null==z?void 0:z.message)&&(Y=z.message)}Ke.track("Game Purchase Funnel Step Error",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{funnel_step:q,funnel_index:this.setFunnelCurrentStep(q),error_code:K,error_reason:Y}))}sendFunnelQuit(q,K){this.isFunnelInvalid()||this._funnelQuitPaused||(Ke.track("Game Purchase Funnel Quit",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{funnel_step:q,funnel_index:this.setFunnelCurrentStep(q),exit_cause:K})),this.clearFunnelData())}sendFunnelHandoff(q,K){var z,Y,Q,X;this.isFunnelInvalid()||((0,Et.v)(this._currentPurchaseFunnel,"Funnel should exist if it is valid"),null!==(z=(X=this._currentPurchaseFunnel).purchase)&&void 0!==z||(X.purchase=K),Ke.track("Game Purchase Funnel Hand Off",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{trigger_tier:null===(Y=this._currentPurchaseFunnel.purchase)||void 0===Y?void 0:Y.triggerTier,purchase_order:null===(Q=this._currentPurchaseFunnel.purchase)||void 0===Q?void 0:Q.purchaseOrder,target:q})))}sendFunnelComplete(q){var K,z,Y,Q,X,Z;if(this.detectFunnelCallError(!1))return;const J=this.getCommonEventDataProperties();Ke.track("Game Purchase Funnel Complete",{difficulty_tier:J.difficulty_tier,funnel_id:null===(K=this._currentPurchaseFunnel)||void 0===K?void 0:K.id,session_uuid:this._segment.getSessionUUID(),trigger_tier:null!==(z=null==q?void 0:q.triggerTier)&&void 0!==z?z:null===(Q=null===(Y=this._currentPurchaseFunnel)||void 0===Y?void 0:Y.purchase)||void 0===Q?void 0:Q.triggerTier,purchase_order:(null==q?void 0:q.purchaseOrder)&&q.purchaseOrder.length>1?q.purchaseOrder:null===(Z=null===(X=this._currentPurchaseFunnel)||void 0===X?void 0:X.purchase)||void 0===Z?void 0:Z.purchaseOrder}),this.clearFunnelData()}clearFunnelData(){this._activePlayer.player.data.segmentPurchaseFunnel=void 0,this._currentPurchaseFunnel=void 0,this._funnelQuitPaused=!1}hasSavedFunnelData(){return!!this._currentPurchaseFunnel}generateNewFunnel(q){var K;return this._currentPurchaseFunnel={id:bt.$.generateUID(),trigger:q,steps:[],impressionId:null!==(K=null==q?void 0:q.impressionId)&&void 0!==K?K:bt.$.generateUID()}}setFunnelCurrentStep(q){(0,Et.v)(this._currentPurchaseFunnel,"Segment purchase funnel is undefined");const K=this._currentPurchaseFunnel.steps,z=K.indexOf(q);return z>=0?K.length=z+1:K.push(q)}getFunnelID(){var q;return null===(q=this._currentPurchaseFunnel)||void 0===q?void 0:q.id}pauseFunnelQuit(q){this._funnelQuitPaused=q}getCommonFunnelEventProperties(q){var K,z,Y,Q,X,Z;return Object.assign(Object.assign({},this.getCommonEventDataProperties()),{funnel_id:null==q?void 0:q.id,trigger:null===(K=null==q?void 0:q.trigger)||void 0===K?void 0:K.type,trigger_category:null===(z=null==q?void 0:q.trigger)||void 0===z?void 0:z.category,trigger_content_type:null===(Y=null==q?void 0:q.trigger)||void 0===Y?void 0:Y.contentType,trigger_content_id:null===(Q=null==q?void 0:q.trigger)||void 0===Q?void 0:Q.contentId,ad_type:null===(X=null==q?void 0:q.trigger)||void 0===X?void 0:X.adType,ad_version:null===(Z=null==q?void 0:q.trigger)||void 0===Z?void 0:Z.adVersion,impression_id:null==q?void 0:q.impressionId})}detectFunnelCallError(q=!0){return!(this._currentPurchaseFunnel&&(!q||this._currentPurchaseFunnel.trigger))&&(Q.VyI.log("Segment purchase funnel tracking call sent outside of a purchase funnel",Q.$bb.Error),!0)}saveFunnelData(){(0,Et.v)(this._currentPurchaseFunnel,"Segment purchase funnel is undefined");const q=this._activePlayer.player;q.data.segmentPurchaseFunnel=this._currentPurchaseFunnel,q.forceSaveCharacter()}shouldSuppressFunnelEvents(q,K){const z=this._activePlayer.player;if(z.isPlayingAtSchool())return!0;switch(q){case"magicoin_currency_button":return!(0,gt.G)(Ie.l).enabled;case"visited_mythics_pet_book_upgrade":return!1;default:return z.hasMembership()}}isFunnelInvalid(){var q,K,z,Y;return this.shouldSuppressFunnelEvents(null===(K=null===(q=this._currentPurchaseFunnel)||void 0===q?void 0:q.trigger)||void 0===K?void 0:K.type,null===(Y=null===(z=this._currentPurchaseFunnel)||void 0===z?void 0:z.trigger)||void 0===Y?void 0:Y.category)||this.detectFunnelCallError()}}var Re=z(71586),Pe=z(13956),Me=z(80105);class Ne extends ut.v{sendServerSessionStartedEvents(){this.sendPetRosterEvent(),this.sendCurrencyEvent()}sendSessionStartedEvent(q=null){var K,z,Y;const X=this._playerProvider.player,Z=at.q.instance.prodigy.gameContainer.get("7c9-f733"),J=at.q.instance.prodigy.gameContainer.get("20f-5f67"),tt={clientVersion:at.q.instance.prodigy.version,device_hardware_type:Q.o5U.getDeviceHardwareType(),device_height:J.getDeviceInfoProvider().getScreenHeight(),device_width:J.getDeviceInfoProvider().getScreenWidth(),device_platform:J.getDeviceInfoProvider().getPlatformName(),device_os_version:Q.o5U.getOsName(),timezone_offset:Re.R.SERVER_PLAYER_TIMEZONE_OFFSET,geo_country:null===(K=X.geolocationData.country)||void 0===K?void 0:K.name,geo_state:null===(Y=null===(z=X.geolocationData.subdivisions)||void 0===z?void 0:z[0])||void 0===Y?void 0:Y.name,equipped_gear:X.equipment.getData(),pet_slots_used:X.kennel.getNumPets(),is_pwa:Z.isPWAInstalled(),is_mobile_app:Q.o5U.isMobile(),currency:this.formatCurrencyValues(X),pet_team:this.formatPetTeam(X),device_pixel_ratio:window.devicePixelRatio},et=Object.assign(Object.assign(Object.assign({},tt),q),this.getCommonEventDataProperties());Ke.track("Session Started",et)}sendPetRosterEvent(){const q=this._playerProvider.player.kennel.getPets(),K=new Set,z=new Set;let Y=0;q.forEach((q=>{var X;if(Q.Aq$.isDefined(q.ID)){K.add(q.ID);const Q=null!==(X=q.mergeRank)&&void 0!==X?X:0;Y+=Q,Q>=1&&z.add(q.ID)}}));const X=Object.assign({roster_size:q.length,roster_size_unique:K.size,roster_merge_rank:Y,roster_merge_unique:z.size},this.getCommonEventDataProperties());Ke.track("Session Start Pet Roster",X)}sendCurrencyEvent(){var q,K;const z=this._playerProvider.player,Y={};z.backpack.getBackpackItemsByType("currency").forEach((q=>{Y[q.ID]=z.getCurrencyAmount(q.ID)})),this._secureInventory.getAllOfType("currency").forEach((q=>{Y[q.id]=q.quantity})),Y[1]=z.getCurrencyAmount(1,"gold");const Q=Object.assign({magicoin_balance:null!==(q=Y[27])&&void 0!==q?q:0,gold_balance:Y[1],titan_shard_balance:null!==(K=Y[11])&&void 0!==K?K:0,summary_balance:Y},this.getCommonEventDataProperties());Ke.track("Session Start Currency",Q)}formatCurrencyValues(q){const K=q.backpack.getBackpackItemsByType("currency"),z=[];return K.forEach((q=>{const K=xt.t.itemMap[`currency-${q.ID}`].name;z.push({currencyName:K,currencyID:q.ID,currencyValue:q.N})})),z}formatPetTeam(q){let K=q.kennel.petTeam;K=K.filter((q=>null!==q));const z=[];return K.forEach((q=>{"player"!==q.creatureType&&z.push({petID:q.data.ID,creatureType:q.creatureType,level:q.getLevel(),maxHearts:q.getMaxHearts()})})),z}}(0,Y.Cg)([(0,Pe.b)("ad2-c5b2"),(0,Y.Sn)("design:type",ot.E)],Ne.prototype,"_playerProvider",void 0),(0,Y.Cg)([(0,Pe.b)("6d6-463e"),(0,Y.Sn)("design:type",Me.U)],Ne.prototype,"_secureInventory",void 0);class xe extends ut.v{getCurrentShopInstanceID(){return this._currentShopData?this._currentShopData.instanceID:""}getCurrentShopTransactionID(){return this._currentShopData?this._currentShopData.transactionID:""}getDynamicStoreSourceId(q){return`shop_v3_${q}`}constructor(q,K,z){super(q,K,z),this._currentShopData=null,this._currentShopData={instanceID:"",transactionID:""}}sendShopPurchaseCompletedEvent(q,K,z,Y=!1,Q={}){var X,Z,J,tt,et,it,st;const nt=`${q}${K.getName()}`,at=xt.t.getItem(z.getType(),z.getID()),rt=z.getCost()[0];this._currentShopData={instanceID:nt,transactionID:bt.$.generateUID()};const ot=xt.t.getItem(null!==(X=rt.getType())&&void 0!==X?X:"currency",rt.getID()),ht=Object.assign(Object.assign({shop_name:K.getName(),shop_id:nt,item_id:z.getID(),item_name:null!==(Z=null==at?void 0:at.name)&&void 0!==Z?Z:"",item_type:z.getType(),item_unlock_level:null!==(tt=null===(J=null==at?void 0:at.data)||void 0===J?void 0:J.lockLevel)&&void 0!==tt?tt:1,currency:null!==(it=null===(et=null==ot?void 0:ot.data)||void 0===et?void 0:et.name)&&void 0!==it?it:rt.getType(),price:rt.getAmount(),is_member_lock:!!(null===(st=null==at?void 0:at.data)||void 0===st?void 0:st.member),is_magicoin_boosted:Y,instance_type:dt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(nt),transaction_id:this.getCurrentShopTransactionID()},Q),this.getCommonEventDataProperties());this.sendShopQuestEvent(ee.T.PURCHASE_ITEM,ht),Ke.track("Shop Purchase Completed",ht)}startDynamicStoreTransaction(q){return this._currentShopData={instanceID:q,transactionID:bt.$.generateUID()},this._currentShopData.transactionID}sendDynamicStorePurchaseCompletedEvent(q){var K;const z=xt.t.getItem(q.itemType,q.itemId),Y=Object.assign(Object.assign(Object.assign({},this.extractCommonStoreData(q)),{is_member_locked:!!(null===(K=null==z?void 0:z.data)||void 0===K?void 0:K.member),transaction_id:this.getCurrentShopTransactionID()}),this.getCommonEventDataProperties());this.sendShopQuestEvent(ee.T.PURCHASE_ITEM,q),Ke.track("Shop Purchase Completed",Y)}sendShopItemViewedEvent(q,K,z,Y={}){var Q,X,Z,J,tt;const et=`${q}${K.getName()}`,it=xt.t.getItem(z.getType(),z.getID()),st=z.getCost()[0],nt=xt.t.getItem(null!==(Q=st.getType())&&void 0!==Q?Q:"currency",st.getID()),at=Object.assign(Object.assign({shop_name:K.getName(),shop_id:et,item_id:z.getID(),item_name:null==it?void 0:it.name,item_type:z.getType(),instance_type:dt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(et),item_unlock_level:null===(X=null==it?void 0:it.data)||void 0===X?void 0:X.lockLevel,is_owned:this._activePlayer.player.backpack.hasItem(z.getType(),z.getID()),currency:null!==(J=null===(Z=null==nt?void 0:nt.data)||void 0===Z?void 0:Z.name)&&void 0!==J?J:st.getType(),price:st.getAmount(),is_member_lock:!!(null===(tt=null==it?void 0:it.data)||void 0===tt?void 0:tt.member)},Y),this.getCommonEventDataProperties());Ke.track("Shop Item Viewed",at)}sendDynamicStoreItemViewedEvent(q){const K=Object.assign(Object.assign(Object.assign({},this.extractCommonStoreData(q)),{is_owned:q.isOwned}),this.getCommonEventDataProperties());Ke.track("Shop Item Viewed",K)}sendShopPurchaseFailedEvent(q,K,z,Y,Q={}){var X,Z,J,tt,et,it;const st=`${q}${K.getName()}`,nt=xt.t.getItem(z.getType(),z.getID()),at=z.getCost()[0],rt=xt.t.getItem(null!==(X=at.getType())&&void 0!==X?X:"currency",at.getID()),ot=Object.assign(Object.assign({shop_name:K.getName(),shop_id:st,fail_reason:Y,item_id:z.getID(),item_name:null!==(Z=null==nt?void 0:nt.name)&&void 0!==Z?Z:"",item_type:z.getType(),item_unlock_level:null===(J=null==nt?void 0:nt.data)||void 0===J?void 0:J.lockLevel,is_member_lock:!!(null===(tt=null==nt?void 0:nt.data)||void 0===tt?void 0:tt.member),currency:null!==(it=null===(et=null==rt?void 0:rt.data)||void 0===et?void 0:et.name)&&void 0!==it?it:at.getType(),price:at.getAmount(),funnel_id:this._segment.purchase.getFunnelID(),instance_type:dt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(st)},Q),this.getCommonEventDataProperties());Ke.track("Shop Purchase Failed",ot)}sendDynamicStorePurchaseFailedEvent(q){q.failReason===Mt.WE.NotEnoughCurrency&&this._segment.item.sendInsufficientCurrencyEvent(q.cost,{sink_type:q.itemType,sink_id:q.itemId,transaction_id:this._segment.shop.getCurrentShopTransactionID()});const K=Object.assign(Object.assign(Object.assign({},this.extractCommonStoreData(q)),{fail_reason:q.failReason,funnel_id:q.funnelId}),this.getCommonEventDataProperties());Ke.track("Shop Purchase Failed",K)}sendShopQuestEvent(q,K){var z,Y,X;const Z={params:{taskEventType:ie.Z7.Shop,shopID:null!==(z=K.shop_id)&&void 0!==z?z:K.storeKey,shopName:null!==(Y=K.shop_name)&&void 0!==Y?Y:K.storeKey,shopCategory:null!==(X=K.categoryId)&&void 0!==X?X:K.category}};at.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(q,Z).catch(Q.RQr.createHandler(`Error sending ${q} event`))}extractCommonStoreData(q){var K,z,Y,Q,X,Z,J,tt,et,it;const st=xt.t.getItem(q.itemType,q.itemId),nt=xt.t.getItem(null!==(K=q.cost.type)&&void 0!==K?K:"currency",q.cost.currency);return{shop_name:q.storeKey,shop_id:this.getDynamicStoreSourceId(q.storeKey),category:q.category,is_member_locked:(null!==(Y=null===(z=null==st?void 0:st.data)||void 0===z?void 0:z.member)&&void 0!==Y?Y:0)>0,item_name:null!==(X=null===(Q=q.bundleData)||void 0===Q?void 0:Q.bundleName)&&void 0!==X?X:null!==(Z=null==st?void 0:st.name)&&void 0!==Z?Z:"",item_type:q.itemType,item_id:q.itemId,item_unlock_level:null!==(tt=null===(J=null==st?void 0:st.data)||void 0===J?void 0:J.lockLevel)&&void 0!==tt?tt:1,item_cost:q.cost.value,currency:null!==(it=null===(et=null==nt?void 0:nt.data)||void 0===et?void 0:et.name)&&void 0!==it?it:"",currency_id:q.cost.currency,currency_balance:this._activePlayer.player.getCurrencyAmount(q.cost.currency,q.cost.type),price:q.cost.value,instance_type:dt.N.ShopVisit,instance_id:q.instanceId}}}class Le extends ut.v{sendFriendRequestAcceptedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("Friend Request Accepted",z)}sendFriendRequestRejectedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("Friend Request Rejected",z)}sendFriendRequestSentEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("Friend Request Sent",z)}sendToastNotificationGeneratedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("Toast Notification Generated",z)}sendHouseVisitedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("House Visited",z)}sendDuelRequestSentEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("Duel Request Sent",z)}sendDuelRequestReceivedEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("Duel Request Received",z)}sendDuelRequestAnsweredEvent(q,K=null){const z=Object.assign(Object.assign(Object.assign({},q),K),this.getCommonEventDataProperties());Ke.track("Duel Request Answered",z)}}var ke=z(77578);class Be extends ut.v{sendLoadingEvent(q,K,z,Y){const Q=Object.assign(Object.assign({screen_type:K,views:z},Y),this.getCommonEventDataProperties());Ke.track(q,Q)}sendPingEvent(q,K,z,Y,Q){const X=Object.assign({n_pings:q,frames:K,standardDeviation:z,minimumFPS:Y,currentGameState:Q},this.getCommonEventDataProperties());Ke.track("Technical Ping",X)}}var Ue=z(17642);class Fe extends ut.v{constructor(q,K,z){super(q,K,z),this._funnelNamesAndStepIDs=[]}sendFunnelEvent(q,...K){var z,Y;if(this.loadUltimatesFTUEFunnelData(),window.analytics){const X=Object.values(Ue.V).indexOf(q.step),Z=null===(z=this._funnelNamesAndStepIDs.find((K=>K.funnelName===q.funnelName)))||void 0===z?void 0:z.stepOrdinalValue;if(!Q.Aq$.isDefined(Z)||X>Z){let z=null===(Y=this._funnelNamesAndStepIDs.find((K=>K.funnelName===q.funnelName)))||void 0===Y?void 0:Y.stepIndex;Q.Aq$.isDefined(z)?z++:z=1;let Z=q.step;K.length>0&&(Z=yt.w.format(Z,...K));const J=Object.assign({funnel_name:q.funnelName,funnel_type:q.funnelType,step_index:z,step_name:Z},this.getCommonEventDataProperties());Ke.track("Funnel Advanced",J),this.saveUltimatesFTUEFunnelData(q.funnelName,z,X)}}}saveUltimatesFTUEFunnelData(q,K,z){(0,Et.v)(!!this._funnelNamesAndStepIDs,"Segment ultimates FTUE funnel is undefined");const Y=this._activePlayer.player,Q=this._funnelNamesAndStepIDs.findIndex((K=>K.funnelName===q));if(Q<0){const Q={funnelName:q,stepIndex:K,stepOrdinalValue:z};this._funnelNamesAndStepIDs.push(Q),Y.data.ultimatesFTUEFunnelData.push(Q)}else this._funnelNamesAndStepIDs[Q].stepIndex=K,Y.data.ultimatesFTUEFunnelData[Q].stepIndex=K,this._funnelNamesAndStepIDs[Q].stepOrdinalValue=z,Y.data.ultimatesFTUEFunnelData[Q].stepOrdinalValue=z;Y.forceSaveCharacter(),Y.saveEnabled=!1}loadUltimatesFTUEFunnelData(){if(this._funnelNamesAndStepIDs.length>0)return;const q=this._activePlayer.player.data.ultimatesFTUEFunnelData;q&&q.length>0?q.forEach((q=>{this._funnelNamesAndStepIDs.push(q)})):this._activePlayer.player.data.ultimatesFTUEFunnelData=[]}}var Ge=z(76253);class je extends ut.v{constructor(){super(...arguments),this._instanceType=dt.N.MembershipVideo,this._instanceId=bt.$.generateUID()}getGenericVideoSegmentData(){return Object.assign({instance_type:this._instanceType,instance_id:this._instanceId,video_id:this._selectedVideoId,video_type:this._videoType,loading_id:this._videoLoadingId},this.getCommonEventDataProperties())}setNetworkTestStartedTimestamp(){this._videoLoadingStartTimeMS=Date.now()}sendVideoLoadingStartedEvent(q,K,z){this._videoLoadingId=bt.$.generateUID(),this._selectedVideoId=q,this._videoType=K,this._instanceType=z,Ke.track("Video Loading Started",this.getGenericVideoSegmentData())}sendVideoLoadingCompletedEvent(q){if(this._videoSizeBytes=q,!this._videoLoadingId||!this._selectedVideoId)return void Q.VyI.log("VideoSegment: An error occurred while sending video loading completed segment event: Video Loading Completed Event cannot be sent before Video Loading Started Event.",Q.$bb.Error);const K=(Date.now()-this._videoLoadingStartTimeMS)/1e3;Ke.track("Video Loading Completed",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{loading_time:K,video_size:this._videoSizeBytes}))}sendVideoPlayedEvent(q){this._videoLoadingId&&this._selectedVideoId?Ke.track("Video Played",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{video_length:q,video_timestamp:0})):Q.VyI.log("VideoSegment: An error occurred while sending video played segment event: Video Played Event cannot be sent before Video Loading Started Event.",Q.$bb.Error)}sendVideoStoppedEvent(q){this._videoLoadingId&&this._selectedVideoId&&this._videoSizeBytes?Ke.track("Video Stopped",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{video_size:this._videoSizeBytes,video_timestamp:q})):Q.VyI.log("VideoSegment: An error occurred while sending video stopped segment event: Video Stopped Event cannot be sent before Video Loading Completed Event.",Q.$bb.Error)}sendVideoErrorEvent(q,K,z){this._videoLoadingId&&this._selectedVideoId||(this._videoLoadingId=bt.$.generateUID(),this._selectedVideoId=q),Ke.track("Video Error",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{error_type:K,video_timestamp:null!=z?z:0}))}sendFunnelTriggerImpressionEvent(q){let K;switch(q){case Ge.B.PostBattleFlow:K={type:"post-battle-video",category:"battles",contentId:this._segment.postBattleFlow.getBattleId(),adType:ft.R.Video};break;case Ge.B.FestivalPortal:K={type:"Festival-Portal-Video",category:"festival",contentId:this._segment.festival.getFestivalInstanceName(),adType:ft.R.Video,impressionId:this._instanceId}}K?this._purchaseFunnel=this._segment.purchase.sendFunnelTriggerImpression(K):q!==Ge.B.WizardBank&&Q.VyI.log(`VideoSegment: Unsupported video event type ${q} for sendFunnelTriggerImpressionEvent.`,Q.$bb.Warning)}sendFunnelStartEvent(q){var K;const z=Object.assign(Object.assign({},q),{adType:null!==(K=q.adType)&&void 0!==K?K:ft.R.Video});this._segment.purchase.sendFunnelStart(z,this._purchaseFunnel)}sendInterfaceOpenEvent(q,K,z=""){var Y;const X=lt.Wm.VideoPlayer;let Z,J={};switch(q){case Ge.B.PostBattleFlow:Z={interfaceType:X,instanceType:K,interfaceName:ct.B.PostBattleVideo,originType:lt.$N.PostBattle,originID:this._segment.postBattleFlow.getBattleId()},J={instance_id:this._instanceId};break;case Ge.B.FestivalPortal:Z={interfaceType:X,instanceType:dt.N.UI,interfaceName:ct.B.FestivalPortalVideo,originType:lt.$N.ButtonClick,originID:z};break;case Ge.B.WizardBank:Z={interfaceType:X,instanceType:K,interfaceName:ct.B.WizardBank,originType:lt.$N.WizardBank};break;case Ge.B.WizardCostumes:Z={interfaceType:X,instanceType:K,interfaceName:ct.B.WizardCostumesMenu,originType:lt.$N.WizardCostumes};break;case Ge.B.MemberLockedRifts:Z={interfaceType:X,instanceType:K,interfaceName:ct.B.RiftsPortalVideo,originType:lt.$N.AutoSurfaced};break;case Ge.B.MemberLockedRiftsPlay:Z={interfaceType:X,instanceType:K,interfaceName:ct.B.RiftsPortalVideoWelcome,originType:lt.$N.AutoSurfaced}}Z?this._segment.featureCommon.sendInterfaceEvent(Z,J):Q.VyI.log(`VideoSegment: Unsupported video event type ${q} for sendInterfaceOpenEvent.`,Q.$bb.Warning),q===Ge.B.FestivalPortal&&(this._instanceId=null!==(Y=this._segment.featureCommon.getInstanceId(ct.B.FestivalPortalVideo))&&void 0!==Y?Y:this._instanceId)}}const $e=["Restrictions screen opened","White Glove Service screen opened","Noot explains free section","Noot explains paid section","Player uses White Glove Service","Restricted battle unlocked","Restricted battle started"];class He extends ut.v{beginTransaction(){return this._segment.item.beginSecureItemTransaction()}setCurrentRestrictionData(q){this._currentRestrictionData=q}sendHelperScreenOpenEvent(q,K,z=!1){const Y={interfaceName:`${ct.B.WhiteGloveScreen}_${q}`,interfaceType:lt.Wm.Modal,originType:lt.$N.RestrictedBattle,instanceType:z?dt.N.ElderWhiteGloveOffer:dt.N.WhiteGloveOffer},Q=this._segment.gameWorld.getCurrentInstanceTypeAndID(dt.N.OpenWorld),X={item_list:Object.assign({restrictions:this._currentRestrictionData},K),map_entered_instance_type:Q.instance_type,map_entered_instance_id:Q.instance_id};this._segment.featureCommon.sendInterfaceEvent(Y,X),this._helperScreenInstanceId=this._segment.featureCommon.getCurrentInterfaceID(Y.interfaceName)}sendBundlePurchaseEvent(q,K,z,Y,Q){var X,Z;const J=bt.$.generateUID(),tt={pets:z.map((q=>{var K,z,Y,Q;const X=xt.t.getItem("pet",q);return{id:q,name:null!==(z=null===(K=null==X?void 0:X.data)||void 0===K?void 0:K.name)&&void 0!==z?z:"unknown",element:null!==(Q=null===(Y=null==X?void 0:X.data)||void 0===Y?void 0:Y.element)&&void 0!==Q?Q:"unknown"}}))},et=xt.t.getItem("currency",Y);return Ke.track("White Glove Bundle Purchased",Object.assign({offer_type:0===Q?lt.$N.ElderPlayerTopUp:lt.$N.RestrictedBattle,offer_id:this._helperScreenInstanceId,trigger_id:q,bundle_name:K,bundle_contents:tt,transaction_id:J,currency_name:null!==(Z=null===(X=null==et?void 0:et.data)||void 0===X?void 0:X.name)&&void 0!==Z?Z:"unknown",currency_id:Y,cost:Q},this.getCommonEventDataProperties())),{offerId:this._helperScreenInstanceId,transactionId:J}}sendRestrictionFTUEEvent(q){if(!this._ftueFunnelId)return;const K=Object.assign({funnel_name:"restrictions_ftue",funnel_type:"tutorial",step_index:$e.indexOf(q)+1,step_name:q,funnel_id:this._ftueFunnelId},this.getCommonEventDataProperties());Ke.track("Funnel Advanced",K)}initFTUEFunnelId(){return this._ftueFunnelId=bt.$.generateUID(),this._ftueFunnelId}clearFTUEFunnelId(){this._ftueFunnelId=void 0}}class Ve extends ut.v{sendOpenMailEvent(q,K,z){Ke.track("Mail Opened",Object.assign({mail_id:q,is_unread:K,attachments:z},this.getCommonEventDataProperties()))}sendOpenEpicSelectorEvent(q){this._segment.featureCommon.sendInterfaceEvent({interfaceName:ct.B.EpicSelection,interfaceType:lt.Wm.DialogBox,originType:lt.$N.Mail,originID:q.toString(),instanceType:dt.N.Interface})}sendClosedEpicSelectorEvent(q,K){let z;const Y=[];q.forEach((q=>{const Q=xt.t.getItem("pet",q);z=Q.ID===K?Q.name:z,Y.push(Q.name)})),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ct.B.EpicSelection,interfaceType:lt.Wm.DialogBox,instanceType:dt.N.Interface,closeMethod:lt.Lv.Done},{selection_options:Y,selection:z})}}var We,qe;!function(q){q.MembershipBundleModalInstanceId="MEMBERSHIP_BUNDLE_MODAL_INSTANCE_ID"}(qe||(qe={}));let Ke=We=class{static track(q,K,z,Y){var Z,J,tt,et;try{const et="analyticsEventBlockList",it=null!==(J=null===(Z=at.q.instance.prodigy.gameContainer.get("f71-42eb"))||void 0===Z?void 0:Z.getValue(et,[]))&&void 0!==J?J:[];if(it.includes(q)||it.some((z=>"object"==typeof z&&Object.keys(z).every((Y=>"event"===Y&&z[Y]===q||(null==K?void 0:K[Y])===z[Y])))))return Q.VyI.log(`[Analytics] Event '${q}' was blocked to prevent overages. Remove this event from the "analyticsEventBlockList" feature flag if you need to track it.`,Q.$bb.Verbose),void(null==Y||Y());null===(tt=window.analytics)||void 0===tt||tt.track(q,K,z,Y),X.addBreadcrumb({category:"Segment",data:Object.assign({event:q},K)})}catch(e){Q.RQr.logError(e,`An error occurred while tracking an event, ${q}`),null===(et=window.analytics)||void 0===et||et.track(q,K,z,Y)}}constructor(q,K,z,Y){this.segmentDataCache={},this._uuidProvider=q,this._activePlayer=K,this._deviceInfoProvider=z,this._geolocationService=Y,this.featureCommon=new qt(this,this._uuidProvider,this._activePlayer),this.academyTowers=new St(this,this._uuidProvider,this._activePlayer),this.battle=new It(this,this._uuidProvider,this._activePlayer),this.battleRevamp=new Ot.z(this,this._uuidProvider,this._activePlayer),this.duelsStadium=new Ft(this,this._uuidProvider,this._activePlayer),this.yourMail=new Ve(this,this._uuidProvider,this._activePlayer),this.shop=new xe(this,this._uuidProvider,this._activePlayer),this.container=new Nt(this,this._uuidProvider,this._activePlayer),this.quests=new we(this,this._uuidProvider,this._activePlayer),this.ultimatesFTUE=new Fe(this,this._uuidProvider,this._activePlayer),this.funnel=new zt(this,this._uuidProvider,this._activePlayer),this.registerFunnelLoginSteps(),this.item=new se(this,this._uuidProvider,this._activePlayer),this.qrCode=new ge.s(this,this._uuidProvider,this._activePlayer),this.consent=new Pt(this,this._uuidProvider,this._activePlayer),this.create=new Ce(this),this.playerProgression=new pe(this,this._uuidProvider,this._activePlayer),this.economy=new Gt(this,this._uuidProvider,this._activePlayer),this.playerMovementAndDiscovery=new ue(this,this._uuidProvider,this._activePlayer),this.playerIdentityAvatar=new ce(this,this._uuidProvider,this._activePlayer),this.gameWorld=new te(this,this._uuidProvider,this._activePlayer),this.social=new Le(this,this._uuidProvider,this._activePlayer),this.connection=new Rt(this,this._uuidProvider,this._activePlayer),this.technical=new Be(this,this._uuidProvider,this._activePlayer),this.purchase=new De(this,this._uuidProvider,this._activePlayer),this.legacyPostBattleFlow=new Oe(this,this._uuidProvider,this._activePlayer),this.postBattleFlow=new pt(this,this._uuidProvider,this._activePlayer),this.battlePass=new Ct(this,this._uuidProvider,this._activePlayer),this.festival=new Kt.e(this,this._uuidProvider,this._activePlayer),this.conversionJar=new kt(this,this._uuidProvider,this._activePlayer),this.rifts=new Te.Aj(this,this._uuidProvider,this._activePlayer),this.segmentedOffers=new Se(this,this._uuidProvider,this._activePlayer),this.session=new Ne(this,this._uuidProvider,this._activePlayer),this.statusEffects=new ke.e(this,this._uuidProvider,this._activePlayer),this.lootDash=new oe(this,this._uuidProvider,this._activePlayer),this.educationData=new $t(this,this._uuidProvider,this._activePlayer),this.petMerge=new he.nu(this,this._uuidProvider,this._activePlayer),this.whiteGlove=new He(this,this._uuidProvider,this._activePlayer),this.videos=new je(this,this._uuidProvider,this._activePlayer)}getSessionUUID(){return this._uuidProvider.getUUID()}identify(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;if(!window.analytics)return void Q.VyI.log("window.analytics is undefined",Q.$bb.Warning);const[,X]=yield this._geolocationService.getData(),Z={device_platform:this._deviceInfoProvider.getPlatformName(),device_width:this._deviceInfoProvider.getScreenWidth(),device_height:this._deviceInfoProvider.getScreenHeight(),device_model:Q.o5U.getDeviceModel(),device_hardware_type:Q.o5U.getDeviceHardwareType(),grade:this._activePlayer.player.educationData.chosenGrade,level:this._activePlayer.getLevel(),curriculum_id:this._activePlayer.player.curriculumTreeID,client_version:rt.s.get("GameConstants.Build.VERSION"),is_member:this._activePlayer.player.hasMembership(),parent_ids:null===(q=this._activePlayer.player.playerParents)||void 0===q?void 0:q.map((q=>q.id)),teacher_ids:null===(K=this._activePlayer.player.playerTeachers)||void 0===K?void 0:K.map((q=>q.id)),register_date:Math.floor((null===(z=this._activePlayer.player.registerDate)||void 0===z?void 0:z.getTime())/1e3),country:null===(Y=null==X?void 0:X.country)||void 0===Y?void 0:Y.name,state:J.get(X,"subdivisions[0].name")};window.analytics.identify(this._activePlayer.getUserID().toString(),Z)}))}sendCustomEvent(q,K={}){We.track(q,Object.assign(Object.assign({},this.featureCommon.getCommonEventDataProperties()),K))}getDeviceInfoProvider(){return this._deviceInfoProvider}registerFunnelLoginSteps(){this.funnel.registerLoginStep({condition:()=>(0,gt.G)(et.m).enabled,funnelName:Yt.F.ArcadiaLink,funnelType:"feature",stepName:Ht.l.FirstEligible,stepIndex:Ht.T.FirstEligible}),this.funnel.registerLoginStep({condition:()=>(0,gt.G)(nt.q).enabled,funnelName:Yt.F.Costumes,funnelType:"feature",stepName:Vt.j.FirstLogin,stepIndex:Vt.t.FirstLogin}),this.funnel.registerLoginStep({condition:()=>(0,gt.G)(it.s).enabled,funnelName:Yt.F.MagicoinBattleRewardsIntro,funnelType:"feature",stepName:st.T.FeatureUnlocked,stepIndex:st.h.FeatureUnlocked})}};Ke=We=(0,Y.Cg)([(0,Z.injectable)(),(0,Y.Qj)(0,(0,Z.inject)("d7b-2375")),(0,Y.Qj)(1,(0,Z.inject)("ad2-c5b2")),(0,Y.Qj)(2,(0,Z.inject)("6b8-7833")),(0,Y.Qj)(3,(0,Z.inject)("577-9956")),(0,Y.Sn)("design:paramtypes",[vt.H,ot.E,Object,Object])],Ke)},84786:(q,K,z)=>{"use strict";z.d(K,{S:()=>Y,k:()=>J});var Y,Q=z(8674),X=z(62459),Z=z(99246);!function(q){q.None="",q.Zone="zone",q.Map="map",q.Battle="battle"}(Y||(Y={}));let J=class extends X.uAl{constructor(){super(...arguments),this._defaultTriggerData=Y.None,this._propertiesProviders=[],this._customPropertiesProviders=[]}getPropertiesObject(){let q={};if(this._propertiesProviders.length>0)for(const K of this._propertiesProviders)q=Object.assign(Object.assign({},q),K.getPropertiesObject());return q}getCustomPropertiesObject(){let q={};if(this._customPropertiesProviders.length>0)for(const K of this._customPropertiesProviders)q=Object.assign(Object.assign({},q),K.getPropertiesObject());return q}};(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Function)],J.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.gfw)(Y),(0,Q.Sn)("design:type",String)],J.prototype,"_defaultTriggerData",void 0),(0,Q.Cg)([(0,X.MnK)(Z.I),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],J.prototype,"_propertiesProviders",void 0),(0,Q.Cg)([(0,X.MnK)(Z.I),(0,X.SZi)(),(0,Q.Sn)("design:type",Array)],J.prototype,"_customPropertiesProviders",void 0),J=(0,Q.Cg)([(0,X.EVk)("SegmentAnalyticsBase (abstract)")],J)},70548:(q,K,z)=>{"use strict";z.d(K,{S:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(84786);let J=class extends Z.k{sendInterfaceEvent(){this._segment.featureCommon.sendInterfaceEvent(this.getPropertiesObject())}};J=(0,Y.Cg)([(0,Q.EVk)("SegmentAnalyticsUiInterface",X.Y.analytics)],J)},7910:(q,K,z)=>{"use strict";z.d(K,{a:()=>st});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(21097),tt=z(23283),et=z(65050),it=z(84786);let st=class extends it.k{constructor(){super(...arguments),this.wheelType=tt.U.LuckyLoot,this.failedReason=J.WE.MemberLocked,this.instanceType=et.N.EndOfBattle}sendPrizeWheelSpinFailedEvent(){const q=X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let K;this.instanceId&&(K={instance_id:this.instanceId}),q.hasMembership()||this._segment.economy.sendPrizeWheelSpinFailedEvent(this.wheelType,this.failedReason,this.instanceType,K)}sendPrizeWheelSpunEvent(){let q;this.instanceId&&(q={instance_id:this.instanceId}),this._segment.economy.sendPrizeWheelSpunEvent(this.wheelType,this.instanceType,q)}};(0,Y.Cg)([(0,Q.gfw)(tt.U),(0,Y.Sn)("design:type",String)],st.prototype,"wheelType",void 0),(0,Y.Cg)([(0,Q.gfw)(J.WE),(0,Y.Sn)("design:type",String)],st.prototype,"failedReason",void 0),(0,Y.Cg)([(0,Q.gfw)(et.N),(0,Y.Sn)("design:type",String)],st.prototype,"instanceType",void 0),st=(0,Y.Cg)([(0,Q.EVk)("SegmentAnalyticsWheel",Z.Y.analytics)],st)},99246:(q,K,z)=>{"use strict";z.d(K,{I:()=>X});var Y=z(8674),Q=z(62459);let X=class extends Q.uAl{getPropertiesObject(){return{}}};X=(0,Y.Cg)([(0,Q.EVk)("SegmentPropertiesObjectProvider (abstract)")],X)},18206:(q,K,z)=>{"use strict";z.d(K,{y:()=>tt});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(41674),J=z(99246);let tt=class extends J.I{getPropertiesObject(){const q={interfaceName:this.interfaceName,interfaceType:this._interfaceType,originType:this.originType===Z.$N.None?void 0:this.originType,originID:this.originID,instanceType:this._instanceType};return Q.Aq$.isDefined(this._closeMethod)&&this._closeMethod!==Z.Lv.None&&(q.closeMethod=this._closeMethod),q}setOriginID(q){this.originID=q}setInterfaceName(q){this.interfaceName=q}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],tt.prototype,"interfaceName",void 0),(0,Y.Cg)([(0,Q.gfw)(Z.Wm),(0,Y.Sn)("design:type",String)],tt.prototype,"_interfaceType",void 0),(0,Y.Cg)([(0,Q.gfw)(Z.Lv),(0,Y.Sn)("design:type",String)],tt.prototype,"_closeMethod",void 0),(0,Y.Cg)([(0,Q.gfw)(Z.$N),(0,Y.Sn)("design:type",String)],tt.prototype,"originType",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],tt.prototype,"originID",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],tt.prototype,"_instanceType",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("SegmentUiInterfacePropertiesProvider",X.Y.analytics)],tt)},77578:(q,K,z)=>{"use strict";z.d(K,{K:()=>Y,e:()=>it});var Y,Q=z(90633),X=z(35120),Z=z(63693),J=z(25089),tt=z(67665);!function(q){q.StatusEffectFTUEDialogueStarted="Theo's dialogue started",q.StatusEffectFTUEBattleStarted="Spell effects tutorial battle started",q.StatusEffectFTUEBattleCompleted="Spell effects tutorial battle completed",q.StatusEffectFTUECompleted="Spell effects tutorial finished",q.StatusEffectFirstCast="User cast a spell with effect in battle"}(Y||(Y={}));const et=[Y.StatusEffectFTUEDialogueStarted,Y.StatusEffectFTUEBattleStarted,Y.StatusEffectFTUEBattleCompleted,Y.StatusEffectFTUECompleted,Y.StatusEffectFirstCast];class it extends J.v{sendStatusEffectFtueEvent(q){const K=Object.assign({funnel_name:"status_effects",funnel_type:"feature",step_index:et.indexOf(q)+1,step_name:q},this.getCommonEventDataProperties());tt.Y.track("Funnel Advanced",K)}handleSpellCastWithStatusEffect(q){if(q!==Z.B1.Player)return;const K=X.q.instance.prodigy.breadcrumbManager,z=K.isBreadcrumbComplete(Q.B.FEATURE_STATUS_EFFECTS,Q.B.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED),J=K.isBreadcrumbComplete(Q.B.FEATURE_STATUS_EFFECTS,Q.B.BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE);z&&!J&&(K.completeBreadcrumb(Q.B.FEATURE_STATUS_EFFECTS,Q.B.BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE),this.sendStatusEffectFtueEvent(Y.StatusEffectFirstCast))}}},15485:(q,K,z)=>{"use strict";var Y;z.d(K,{k:()=>Y}),function(q){q.AccountDeletionLink="accountDeletionLink-button",q.AddToTeam="addToTeam-button",q.AttachParentWw="attachAParentWw-button",q.Back="back-button",q.Backpack="backpack-button",q.BackpackCostumesSlot="backpackCostumesSlot-button",q.BecomeAMember="becomeAMember-button",q.Battle="battle-button",q.BattlePassClaimInfiniteTierButton="treasureTrackClaimInfiniteTierReward-button",q.BattlePassClaimQuestButton="treasureTrackClaimQuest-button",q.BattlePassClaimRewardButton="treasureTrackClaimReward-button",q.BattlePassHudButton="treasureTrackHud-button",q.BattlePassQuestGoButton="treasureTrackQuestGo-button",q.BattlePassToasterButton="treasureTrackToaster-button",q.BattlePassWizardWatchButton="treasureTrackWwLaunch",q.BonusStars="bonusStars-button",q.BuyMemberItem="buyMemberItem-button",q.BuyItem="buyItem-button",q.CostumesHowItWorks="costumesHowItWorks-button",q.CostumesHudButton="costumesHud-button",q.CostumesItemCardButton="costumesItemCard-button",q.Continue="continue-button",q.ChangePasswordLink="chnagePasswordLink-button",q.Chat="chat-button",q.CheckItOut="checkItOut-button",q.Close="close-button",q.CrystalCaverns="crystalCaverns-button",q.Delete="delete-button",q.Download="download-button",q.DynamicStoreModalButton="dynamicStoreModal-button",q.EquipItem="equipItem-button",q.EquipMemberItem="equipMemberItem-button",q.EvolveNow="evolveNow-button",q.Feed="feed-button",q.Festival="festival-button",q.Friend="friend-button",q.GoBattle="goBattle-button",q.Item="item-button",q.Later="later-button",q.Leaderboard="leaderboard-button",q.Leave="leave-button",q.LeftArrow="leftArrow-button",q.Like="like-button",q.LinkParent="linkParentSettings-button",q.LootDashHudButton="wizardDashHud-button",q.LootDashGetMoreRevivesButton="lootDashGetMoreRevives-button",q.LootDashWizardWatchButton="wizardDashWizardWatch-button",q.LostPetsButton="lost_pets_button",q.Mail="mail-button",q.Map="map-button",q.MemberHudButton="member-button",q.MembershipUpgradeOkay="membership-upgrade-okay",q.Next="next-button",q.No="no-button",q.NotNow="notNow-button",q.Okay="okay-button",q.Options="options-button",q.ParentGoalTracker="parent-goal-tracker-button",q.ParentGoalTrackerCollectReward="parent-goal-hud-collect-reward",q.ParentGoalTrackerInProgress="parent-goal-hud-goal-status",q.ParentGoalTrackerNeedReward="parent-goal-hud-need-reward",q.ParentGoalTrackerNoGoal="parent-goal-hud-need-goal",q.ParentGoalTrackerNotAttached="parent-goal-hud-attach-parent",q.UnifiedStoreToDynamicStore="dynamic_store_unified_store",q.PetLevelUp="pets-level-up-button",q.PetRescuePayMagicoin="pet_rescue_pay_magicoin",q.Pets="pets-button",q.Play="play-button",q.PostBattleFlowMagicoinCollectAllRewards="postBattleFlowMagicoinCollectAllRewards-button",q.PostBattleFlowMagicoinGetFreeRewards="postBattleFlowMagicoinGetFreeRewards-button",q.PostBattleFlowMagicoinGetMemberRewards="postBattleFlowMagicoinGetMemberRewards-button",q.Rescue="rescue-button",q.RemoveFromTeam="removeFromTeam-button",q.RestrictionsPurchase="restrictionsPurchase-button",q.RevealCredentials="revealCredentialsParentAttach-button",q.RiftsMenuStoreButton="riftsMenuStore-button",q.RightArrow="rightArrow-button",q.SaveName="saveName-button",q.SeasonRewards="seasonRewards-button",q.Share="share-button",q.Shop="shop-button",q.Shuffle="shuffle-button",q.SignUpForMembership="signUpForMembership-button",q.Social="social-button",q.StateChallengesTab="state-challenges-tab",q.StateChallengesViewMilestonesButton="view_milestone_rewards-button",q.StateChallengesCollectMilestonesButton="collect_milestone_rewards-button",q.Stay="stay-button",q.Stop="stop-button",q.Titan="titan-button",q.TryABattle="tryABattle-button",q.UnifiedStore="unifiedStore-button",q.UnifiedStoreCardButton="unifiedStoreCard-button",q.Use="use-button",q.ViewMoreStores="viewMoreStores-button",q.WorldPlayerPortrait="worldPlayerPortrait-button",q.WizardBackpackButton="wizard-backpack-button",q.WizardWatchButton="wizard-watch-button",q.X="x-button",q.Yes="yes-button",q.ZoneGoalsCta="zoneGoalsCta-button"}(Y||(Y={}))},46784:(q,K,z)=>{"use strict";var Y;z.d(K,{B:()=>Y}),function(q){q.AfterSchoolWidget="after_school_widget",q.ArcadiaConfirmationModal="arcadia_confirmation_modal",q.Backpack="backpack",q.BattlePassComplexFtueModal="treasure_track_complex_ftue_modal",q.BattlePassFtue="treasure_track_ftue",q.BattlePassMenu="treasure_track_main",q.BattlePassMembershipModal="treasure_track_membership_modal",q.BattlePassUltimateModal="treasure_track_ultimate_prompt",q.BattlePassHomeScreen="treasure_track_home_screen",q.BattlePassQuestsScreen="treasure_track_quests_tab",q.BattlePassRewardsScreen="treasure_track_rewards_tab",q.BattlePassSimpleFtueModal="treasure_track_simple_ftue_modal",q.BattlePetInfoWidget="battle_pet_info_widget",q.BattlePotionSelect="battle_potion_select",q.Chat="chat",q.Dialogue="dialogue",q.DuelsStadium="duels_stadium",q.DynamicPromptMembershipInfoAd="dynamic_prompt_membership_info_ad",q.DynamicStoreBundle="dynamic_store_bundle",q.DynamicStoreModal="dynamic_store_modal",q.EnterGoldRiftModal="enter_gold_rift_modal",q.EpicSelection="epic_selection",q.FeaturedPetModal="featured_spawn_modal",q.FestivalProgressionWindow="festival_progression_window",q.FestivalAboutWindow="festival_about_window",q.FestivalCurrencyDrainPopup="festival_currency_drain_popup",q.FestivalLaunchPopup="festival_zone_entry_popup_lamplight",q.FestivalHudLaunchPopup="festival_hud_launch_popup_lamplight",q.FestivalPortalVideo="festival_portal_video",q.FriendsList="friends_list",q.HiArenaHub="hi_arena_hub",q.HUD="HUD",q.HUDMenuBar="hud_menu_bar",q.ItemInfo="item_info",q.KeystonePopup="keystone_popup",q.KidsMlpModalNonMember="kids_mlp_modal",q.KidsMlpModalLevelUpMember="kids_mlp_upgrade_ultimate_modal",q.KidsMlpModalUltimateMathMember="kids_mlp_upgrade_ultimate_bundle_modal",q.KidsMlpUpgradeComplete="kids_mlp_upgrade_congratulations",q.KidsMlpUpgradeFail="kids_mlp_upgrade_fail",q.LeaveGameDialog="leave_game_dialog",q.LootDashMenu="wizard_dash_lobby",q.LootDashTransportModal="wizard_dash_assignment_transport_modal",q.LostPetsMain="lost_pets_main",q.MemberAd="member_ad",q.MembershipInfoAd="membership_info_ad",q.MembershipParentAd="membership_parent_ad",q.MembershipStaticAd="membership_static_ad",q.MembershipStaticAdCarousel="membership_static_ad_carousel",q.MembershipYouTubeAd="membership_youTube_ad",q.NicknamerMenu="nicknamer_menu",q.NewOtherEvolutions="NEW_other_evolutions",q.OptionsMenu="options_menu",q.OtpAd="otp_modal",q.Overworld="overworld",q.ParentAttach="parent_attachment_qr",q.ParentGoalAttachModal="parent_goal_attach_modal",q.ParentGoalsTracker="parent_goals_tracker",q.PedestalsClicked="pedestals_clicked",q.PetMergePowerUpModal="pet_power_up_window",q.PetMergePowerUpWarning="pet_power_up_warning",q.PetStackDrawer="pet_stack_drawer",q.PetsWindow="pets_window",q.PetRescueAttempt="pet_rescue_attempt",q.PetRescueWindow="pet_rescue_window",q.PlayerCard="player_card",q.PlayerGoals="player_goals",q.PostBattleFlow="post_battle",q.PostBattleFlowMagicoinIntro="battle_magicoin_intro",q.PostBattleFlowMagicoinRewardDisplay="post_battle_magicoin_reward_display",q.PostBattleFlowMemberJarRewardDisplay="post_battle_member_jar_reward_display",q.PostBattleFlowStandardRewardDisplay="post_battle_standard_reward_display",q.PostBattleVideo="post_battle_video",q.PreBattleScreen="pre_battle_screen",q.ProdigyChallenge="prodigy_challenge",q.ProdigyChallengeClassCode="prodigy_challenge_class_code",q.ProdigyChallengeMilestoneRewards="prodigy_challenge_milestone_rewards",q.ProdigyChallengeResult="prodigy_challenge_result",q.PumpkinfestAboutWindow="pumpkinfest_about_window",q.RestrictedBattleCallbackScreen="restricted_battle_call_back_screen",q.ResultsMenu="results_menu",q.RiftsCycleModal="rifts_cycle_modal",q.RiftsPortal1Menu="rifts_portal_1_menu",q.RiftsPortal2Menu="rifts_portal_2_menu",q.RiftsPortal3Menu="rifts_portal_3_menu",q.RiftsPortalVideo="member_locked_rift_video_gate",q.RiftsPortalVideoWelcome="member_locked_rift_welcome_video",q.Shiverchill="shiverchill",q.SirVey="sir_vey",q.Social="social",q.SpringfestAboutWindow="springfest_about_window",q.SpringfestGrottoSelectModal="springfest_grotto_select_modal",q.StadiumRoomsMenu="stadium_rooms_menu",q.StoreBundlesPopup="store_bundles_popup",q.StarlightAboutWindow="starlight_about_window",q.SummerfestAboutWindow="summerfest_about_window",q.TitanProgressionWindow="titan_progression_window",q.UnifiedStore="unified_store_main",q.UnifiedStoreBase="unified_store",q.UniversalTeamSelection="universal_team_screen",q.WhiteGloveScreen="white_glove",q.WinterfestAboutWindow="winterfest_about_window",q.WizardBank="wb_modal",q.WizardCostumesMenu="costumes_menu",q.WizardWatch="wizard_watch",q.WorldMap="world_map",q.YourMail="your_mail",q.YourTeam="your_team",q.ZoneGoals="zone_goals"}(Y||(Y={}))},12676:(q,K,z)=>{"use strict";var Y;z.d(K,{N:()=>Y}),function(q){q.Athena="Athena",q.Boardy="Boardy",q.Eve="Eve",q.Harvey="Harvey",q.Merchant="Merchant",q.Noot="Noot",q.Scoog="Scoog",q.UltimatesPlinth="ultimates_plinth",q.Ulla="Ulla"}(Y||(Y={}))},70703:(q,K,z)=>{"use strict";z.d(K,{x:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(90351);let tt=class extends Q.uAl{constructor(){super(...arguments),this._fadeDurationMS=500,this._useComponentAlpha=!1,this._startDelay=0,this._repeatCount=0,this._yoyoAlpha=!1,this._autoStart=!1,this.onComplete=new Q.HN0,this._easingType=J.i.LinearNone}create(){super.create(),this._autoStart&&this.startTween()}destroy(){this._activeTween&&(X.q.instance.game.tweens.remove(this._activeTween),this._activeTween=null),this.onComplete.dispose(),super.destroy()}startTween(q=this._targetAlpha,K=(this._useComponentAlpha?this.targetComponent.getRootContainer().alpha:this._initialAlpha),z=this._startDelay,Y=this._fadeDurationMS){{const Q={value:K},Z=this.targetComponent.getRootContainer();Z?(Z.alpha=K,this._activeTween=X.q.instance.game.add.tween(Q,this).to({value:q},Y,J.K.getEasingFunctionFromEnum(this._easingType),!0,z,this._repeatCount,this._yoyoAlpha).onUpdateCallback((()=>{Z.alpha=Q.value})),this._activeTween.onTweenComplete.addOnce((()=>{X.q.instance.game.tweens.remove(this._activeTween),this._activeTween=null,Z.alpha=q,this.onComplete.dispatch()}))):this.targetComponent.onRootContainerSet.addOnce(this.startTween,this)}}stopTween(){this._activeTween&&!this._activeTween.isDestroyed&&this._activeTween.stop(!0)}};(0,Y.Cg)([(0,Q.MnK)(Q.y4o),(0,Y.Sn)("design:type",Q.y4o)],tt.prototype,"targetComponent",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_fadeDurationMS",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_useComponentAlpha",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_initialAlpha",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_targetAlpha",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_startDelay",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_repeatCount",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_yoyoAlpha",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_autoStart",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onComplete",void 0),(0,Y.Cg)([(0,Q.gfw)(J.i),(0,Y.Sn)("design:type",String)],tt.prototype,"_easingType",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("AlphaFadeTween",Z.Y.animation)],tt)},66998:(q,K,z)=>{"use strict";z.d(K,{s:()=>tt});var Y,Q,X=z(8674),Z=z(62459),J=z(28152);!function(q){q.RunningInTween="RunningInTween",q.RunningOutTween="RunningOutTween",q.IdleAtEndOfInTween="IdleAtEndOfInTween",q.IdleAtEndOfOutTween="IdleAtEndOfOutTween"}(Y||(Y={})),function(q){q.DoNothing="DoNothing",q.PlayInTween="PlayInTween",q.PlayOutTween="PlayOutTween",q.GoToEndOfInTween="GoToEndOfInTween",q.GoToEndOfOutTween="GoToEndOfOutTween"}(Q||(Q={}));let tt=class extends Z.uAl{constructor(){super(...arguments),this._onCreate=Q.DoNothing}create(){super.create(),this._inTween.onTweenComplete.add((()=>this._currentState=Y.IdleAtEndOfInTween)),this._outTween.onTweenComplete.add((()=>this._currentState=Y.IdleAtEndOfOutTween)),this.runAction(this._onCreate)}runAction(q){if(q!==Q.DoNothing)switch(q){case Q.GoToEndOfInTween:this.runInTween(!0);break;case Q.GoToEndOfOutTween:this.runOutTween(!0);break;case Q.PlayInTween:this._outTween.onTweenComplete.addOnce((()=>this.runInTween())),this.runOutTween(!0);break;case Q.PlayOutTween:this._inTween.onTweenComplete.addOnce((()=>this.runOutTween())),this.runInTween(!0)}}runInTween(q=!1){this._currentState!==Y.IdleAtEndOfInTween&&this._currentState!==Y.RunningInTween&&(this._currentState===Y.RunningOutTween&&this._outTween.pauseAnimation(),q?this._inTween.completeAnimation():(this._currentState=Y.RunningInTween,this._inTween.playAnimation()))}runOutTween(q=!1){this._currentState!==Y.IdleAtEndOfOutTween&&this._currentState!==Y.RunningOutTween&&(this._currentState===Y.RunningInTween&&this._inTween.pauseAnimation(),q?this._outTween.completeAnimation():(this._currentState=Y.RunningOutTween,this._outTween.playAnimation()))}};(0,X.Cg)([(0,Z.MnK)(Z.bTj),(0,X.Sn)("design:type",Z.bTj)],tt.prototype,"_inTween",void 0),(0,X.Cg)([(0,Z.MnK)(Z.bTj),(0,X.Sn)("design:type",Z.bTj)],tt.prototype,"_outTween",void 0),(0,X.Cg)([(0,Z.gfw)(Q),(0,X.Sn)("design:type",String)],tt.prototype,"_onCreate",void 0),tt=(0,X.Cg)([(0,Z.EVk)("InOutEasyTweenController",J.Y.animation,'Given an "In" and "Out" tween, handles transitioning between them so they never run at the same time.')],tt)},79009:(q,K,z)=>{"use strict";z.d(K,{F:()=>X});var Y=z(62459),Q=z(95891);class X{constructor(q){this.animations={},this.animationNames=[],Q.transform(q,((q,K,z)=>{this.animationNames.push(z);const Q=Object.keys(K);for(let X=0;X-1}getAnimationDataForProperty(q,K){return Q.get(this.animations,`${K}.${q}`,null)}}},80110:(q,K,z)=>{"use strict";z.d(K,{g:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(84938);let tt=class extends Q.JTX{constructor(){super(...arguments),this.durationMS=1e3,this.amplitude=20,this.cycles=10,this.buildupDuration=0,this.falloffDuration=500,this.onComplete=new Q.HN0,this._shakeTime=null}run(){this._mainPlayer&&(this._loadAreaCameraFollowController=this._mainPlayer.findComponentInChildren(Q.mZY),this._loadAreaCameraFollowController&&(this._loadAreaCameraFollowController.Active=!1)),this._cameraTransform=Q.i7d.main.GameObject.transform,this._shakeTime=0,this._cameraInitialX=this._cameraTransform.localPosition.x,this._cameraInitialY=this._cameraTransform.localPosition.y}destroy(){this.onComplete.dispose(),super.destroy()}isRunning(){return null!==this._shakeTime}forceCompletion(){this.isRunning()&&(this._shakeTime=this.durationMS,this.update())}update(){if(super.update(),this.isRunning())if(this._shakeTime+=X.q.instance.game.time.deltaMS,this._shakeTime0?Math.min(1,q*(this.durationMS/this.buildupDuration)):1,z=this.falloffDuration>0?Math.min(1,(1-q)*(this.durationMS/this.falloffDuration)):1,Y=this.amplitude*K*z*J.B.screenShake.value;this._cameraTransform.setPosition(this._cameraInitialX,Math.floor(this._cameraInitialY+Math.sin(q*Math.PI*2*this.cycles)*Y))}else this._cameraTransform.setPosition(this._cameraInitialX,this._cameraInitialY),this._loadAreaCameraFollowController&&(this._loadAreaCameraFollowController.Active=!0),this._shakeTime=null,this.onComplete.dispatch()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"durationMS",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"amplitude",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"cycles",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"buildupDuration",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"falloffDuration",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onComplete",void 0),(0,Y.Cg)([(0,Q.Cdj)("MainPlayerGameObject"),(0,Y.Sn)("design:type",Q._mx)],tt.prototype,"_mainPlayer",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("ScreenShake",Z.Y.motion)],tt)},74846:(q,K,z)=>{"use strict";z.d(K,{Q:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(29834);let J=class extends Q.uAl{constructor(){super(...arguments),this.animator=null,this.animationName=null,this.loop=!1,this._finished=!0,this._onComplete=new Q.HN0}get OnComplete(){return this._onComplete}destroy(){this._onComplete.dispose(),super.destroy()}play(q=!1){this._finished=!1,this.animator.OnAnimationComplete.addOnce((()=>{this._finished=!0,this._onComplete.dispatch()})),this.animator.playAnimation(this.animationName,this.loop,q)}hasFinishedPlaying(){return this._finished}};(0,Y.Cg)([(0,Q.MnK)(Z.j),(0,Y.Sn)("design:type",Z.j)],J.prototype,"animator",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"animationName",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"loop",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"_onComplete",void 0),J=(0,Y.Cg)([(0,Q.EVk)("SpineAnimationClip",X.Y.animation)],J)},50118:(q,K,z)=>{"use strict";z.d(K,{a:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._autoStart=!1,this.tween=null,this.tweenPlayed=!1,this._onComplete=new Q.HN0}get OnComplete(){return this._onComplete}get Tween(){return this.tween}set Tween(q){this.tween=q}create(){var q,K;if(super.create(),this._target&&!((null!==(K=null===(q=this._tweenData)||void 0===q?void 0:q.length)&&void 0!==K?K:0)<=0)){this.tween=X.q.instance.game.add.tween(this._target,this);for(const q of this._tweenData)this.tween.to(q.properties,1e3*q.duration,{value:q.ease.value},this._autoStart,q.delay,q.repeat,q.yoyo)}}play(){this.tween&&!this.tween.isDestroyed?(this.tween.onTweenComplete.addOnce((()=>{this.tweenPlayed=!0,this._onComplete.dispatch()})),this.tween.start()):Q.VyI.log("Tween could not play because it has been destroyed.",Q.$bb.Warning)}stop(){this.tween&&!this.tween.isDestroyed?this.tween.stop():Q.VyI.log("Tween could not be stopped because it has been destroyed.",Q.$bb.Warning)}hasFinishedPlaying(){return this.tweenPlayed}destroy(){this.stop(),X.q.instance.game.tweens.removeAllFromOwner(this),this._onComplete.dispose(),this.tween=null,super.destroy()}};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.vCS)(),(0,Y.Sn)("design:type",Array)],J.prototype,"_tweenData",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.uAl),(0,Y.Sn)("design:type",Q.uAl)],J.prototype,"_target",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_autoStart",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"_onComplete",void 0),J=(0,Y.Cg)([(0,Q.EVk)("TweenAnimationClip",Z.Y.animation)],J)},92591:(q,K,z)=>{"use strict";z.d(K,{K:()=>J});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._onStateChanged=new Q.HN0,this._currentState=null,this._animationStates={}}get onStateChanged(){return this._onStateChanged}get currentState(){return this._currentState}destroy(){this._currentState=null;const q=[];for(const K in this._animationStates){const z=this._animationStates[K];q.indexOf(z)<0&&(q.push(z),z.destroy())}q.length=0,this._animationStates=null,this._onStateChanged.dispose(),this._onStateChanged=null,super.destroy()}update(){var q;super.update(),null===(q=this._currentState)||void 0===q||q.update()}changeState(q){const K=this._animationStates[q];this.setCurrentAnimation(K)}setCurrentAnimation(q){var K;this._currentState!==q&&(null===(K=this._currentState)||void 0===K||K.exit(),null==q||q.enter(),this._currentState=q,this._onStateChanged.dispatch())}setAnimationState(q,K){const z=this._animationStates[q];1===X.sumBy(Object.values(this._animationStates),(q=>q===z?1:0))&&z.destroy(),this._animationStates[q]=K}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"_onStateChanged",void 0),J=(0,Y.Cg)([(0,Q.EVk)("AnimationController",Z.Y.animation)],J)},22637:(q,K,z)=>{"use strict";z.d(K,{k:()=>et});var Y=z(8674),Q=z(62459),X=z(51742),Z=z(35120),J=z(28152),tt=z(34603);let et=class extends Q.uAl{constructor(){super(...arguments),this.preloadSFX=X.c.Sfx_ui,this.onFxComplete=new Q.HN0,this._tweens=[]}playEffect(q,K,z){this.gameObject.transform.setPosition(q-20,K+100),z&&this.onFxComplete.add(z);const Y=Math.random()+1;this._confettiImage.sprite.animations.add("confetti",["confetti1","confetti2","confetti3","confetti4"],10,!0,!1),this._confettiImage.sprite.animations.play("confetti",void 0,!0),this._confettiImage.sprite.anchor.set(.5,.5),this._confettiImage.sprite.scale.x=.1,this._confettiImage.sprite.scale.y=.1;const X=Z.q.instance.game.add.tween(this.gameObject.transform.localPosition,this).to({y:"-=25"},500,Q.GS3.Linear.None,!0,0);this._tweens.push(X),this._tweens.push(Z.q.instance.game.add.tween(this._confettiImage.sprite.scale,this).to({x:Y,y:Y},500,Q.GS3.Quadratic.In,!0,0));const J=Z.q.instance.game.add.tween(this.gameObject.transform.localPosition,this).to({y:"+=100"},2e3,Q.GS3.Sinusoidal.Out,!1,250);this._tweens.push(J);const tt=Z.q.instance.game.add.tween(this._confettiImage.sprite,this).to({alpha:0},1e3,Q.GS3.Linear.None,!0,2500);this._tweens.push(tt),Z.q.instance.prodigy.audio.playSFX(18,"dig"),X.chain(J),tt.onTweenComplete.addOnce((()=>{this.onFxComplete.dispatch(),this.gameObject.destroy()}))}destroy(){this._tweens.forEach((q=>{Z.q.instance.game.tweens.remove(q)})),this.onFxComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.Bak)(),(0,Y.Sn)("design:type",String)],et.prototype,"preloadSFX",void 0),(0,Y.Cg)([(0,Q.MnK)(tt._),(0,Q.Lr6)(0),(0,Q.nKb)("confetti"),(0,Y.Sn)("design:type",tt._)],et.prototype,"_confettiImage",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],et.prototype,"onFxComplete",void 0),et=(0,Y.Cg)([(0,Q.EVk)("Confetti",J.Y.effect)],et)},99898:(q,K,z)=>{"use strict";z.d(K,{F:()=>tt});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(29834),J=z(71554);let tt=class extends Q.uAl{constructor(){super(...arguments),this.onFxCompleted=new Q.HN0,this.onImpact=new Q.HN0}playEffect(q,K,z,Y,Q,X){const Z=K-50;this.gameObject.transform.setPosition(q,Z),this.gameObject.setLayer(Q,!0),this._parabolicTween.startTween(q,Z,z,Y),X&&this.onFxCompleted.add(X)}impact(){this.onImpact.dispatch(),this._spineAnimator.OnAnimationComplete.addOnce((()=>{this.completeFx()}))}completeFx(){this.onFxCompleted.dispatch(),setTimeout((()=>{this.gameObject.destroy()}),1)}destroy(){this.onFxCompleted.dispose(),this.onImpact.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onFxCompleted",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onImpact",void 0),(0,Y.Cg)([(0,Q.MnK)(J.L),(0,Y.Sn)("design:type",J.L)],tt.prototype,"_parabolicTween",void 0),(0,Y.Cg)([(0,Q.MnK)(Z.j),(0,Y.Sn)("design:type",Z.j)],tt.prototype,"_spineAnimator",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("FXProjectile",X.Y.effect)],tt)},44977:(q,K,z)=>{"use strict";z.d(K,{e:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this.onFxCompleted=new Q.HN0}playEffect(q,K,z,Y){this.gameObject.transform.setPosition(q,K+200),this.gameObject.setLayer(z,!0),Y&&this.onFxCompleted.add(Y)}completeFx(){this.onFxCompleted.dispatch(),setTimeout((()=>{this.gameObject.destroy()}),1)}destroy(){this.onFxCompleted.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onFxCompleted",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("FXStatic",X.Y.effect)],Z)},37854:(q,K,z)=>{"use strict";z.d(K,{v:()=>et});var Y=z(8674),Q=z(62459),X=z(51742),Z=z(35120),J=z(28152),tt=z(34603);let et=class extends Q.uAl{constructor(){super(...arguments),this.preloadSFX=X.c.Sfx_ui,this.onFxComplete=new Q.HN0,this._tweens=[]}playEffect(q,K,z,Y=0){this.gameObject.transform.setPosition(q-20,K+100),z&&this.onFxComplete.add(z);const X=75*Math.random()+25,J=Math.random(),tt=100*J-50,et=Math.random()+1;this._rocketImage.sprite.anchor.set(.5,.5),this._explosionImage.sprite.anchor.set(.5,.5),this._explosionImage.sprite.angle=360*Math.random(),this._explosionImage.GameObject.transform.setPosition(tt,-X-100);const it=Z.q.instance.game.add.tween(this._rocketImage.GameObject.transform.localPosition,this).to({y:-X-100},500,Q.GS3.Quadratic.Out,!0,Y);this._tweens.push(it),this._tweens.push(Z.q.instance.game.add.tween(this._rocketImage.GameObject.transform.localPosition,this).to({x:tt},500,Q.GS3.Quadratic.Out,!0,Y)),this._tweens.push(Z.q.instance.game.add.tween(this._rocketImage.sprite,this).to({angle:35*(2*J-1)},500,Q.GS3.Linear.None,!0)),this._tweens.push(Z.q.instance.game.add.tween(this._explosionImage.GameObject.transform.localScale,this).to({x:et,y:et},500,Q.GS3.Back.Out,!0,Y+500));const st=Z.q.instance.game.add.tween(this._explosionImage.sprite,this).to({alpha:0},1e3,Q.GS3.Linear.None,!0,Y+1e3);this._tweens.push(st),it.onTweenComplete.addOnce((()=>{Z.q.instance.prodigy.audio.playSFX(18,"dig")}),this),it.onTweenComplete.addOnce((()=>{this._rocketImage.GameObject.active=!1})),st.onTweenComplete.addOnce((()=>{this.onFxComplete.dispatch(),this.GameObject.destroy()}))}destroy(){this._tweens.forEach((q=>{Z.q.instance.game.tweens.remove(q)})),this.onFxComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.Bak)(),(0,Y.Sn)("design:type",String)],et.prototype,"preloadSFX",void 0),(0,Y.Cg)([(0,Q.MnK)(tt._),(0,Q.Lr6)(0),(0,Q.nKb)("rocket"),(0,Y.Sn)("design:type",tt._)],et.prototype,"_rocketImage",void 0),(0,Y.Cg)([(0,Q.MnK)(tt._),(0,Q.Lr6)(0),(0,Q.nKb)("explosion"),(0,Y.Sn)("design:type",tt._)],et.prototype,"_explosionImage",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],et.prototype,"onFxComplete",void 0),et=(0,Y.Cg)([(0,Q.EVk)("Firework",J.Y.effect)],et)},16184:(q,K,z)=>{"use strict";z.d(K,{J:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(1823);let J=class extends Z.k{create(){super.create(),this._color=this._possibleColors[Math.floor(Math.random()*this._possibleColors.length)],this._splashAnimator.playAnimation(`idle-${this._color}`,!1),this._ballonImage.GameObject.active=!1,this._animationOffsetMS=0}playSplash(){this._splashAnimator.playAnimation(`impact-${this._color}`,!1),this._splashAnimator.OnAnimationComplete.addOnce(this.completeFX,this)}};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.W_S)(),(0,Y.Sn)("design:type",Array)],J.prototype,"_possibleColors",void 0),J=(0,Y.Cg)([(0,Q.EVk)("PaintBalloon",X.Y.effect)],J)},54001:(q,K,z)=>{"use strict";z.d(K,{y:()=>Z});var Y=z(8674),Q=z(62459),X=z(35120);let Z=class extends Q.uAl{constructor(){super(...arguments),this.startPosition=new Q.I9Y(0,0),this.endPosition=new Q.I9Y(0,0),this.time=1e3,this.height=200,this.onTweenComplete=new Q.HN0}startTween(q=this.startPosition.x,K=this.startPosition.y,z=this.endPosition.x,Y=this.endPosition.y,Z=this.time,J){var tt,et;if(!this.targetTransform)throw new Error("ParabolicTween2dComponent: targetTransform is not set.");const it=null!==(tt=this.startPosition)&&void 0!==tt?tt:new Q.I9Y(this.targetTransform.localPosition.x,this.targetTransform.localPosition.y),st=null!==(et=this.endPosition)&&void 0!==et?et:new Q.I9Y(this.targetTransform.localPosition.x,this.targetTransform.localPosition.y);void 0!==q&&(it.x=q),void 0!==K&&(it.y=K),void 0!==z&&(st.x=z),void 0!==Y&&(st.y=Y),this.targetTransform.setPosition(it.x,it.y),J&&this.onTweenComplete.add(J),this._horizontalTween=X.q.instance.game.add.tween(this.targetTransform.localPosition,this).to({x:st.x},Z,Q.GS3.Linear.None,!0),this._verticalTween=X.q.instance.game.add.tween(this.targetTransform.localPosition,this).to({y:Math.min(it.y,st.y)-this.height},Z/2,Q.GS3.Quadratic.Out).to({y:st.y},Z/2,Q.GS3.Quadratic.In,!0),this._verticalTween.onTweenComplete.add((()=>{this.targetTransform.setPosition(st.x,st.y),this.onTweenComplete.dispatch()}))}stopTween(){var q,K;null===(q=this._horizontalTween)||void 0===q||q.stop(),null===(K=this._verticalTween)||void 0===K||K.stop()}destroy(){this.stopTween(),X.q.instance.game.tweens.remove(this._horizontalTween),X.q.instance.game.tweens.remove(this._verticalTween),this.onTweenComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(Q.dLy),(0,Y.Sn)("design:type",Q.dLy)],Z.prototype,"targetTransform",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],Z.prototype,"startPosition",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],Z.prototype,"endPosition",void 0),(0,Y.Cg)([(0,Q.g11)({toolTip:"Time in milliseconds for the tween to go between the start and end positions"}),(0,Y.Sn)("design:type",Number)],Z.prototype,"time",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Z.prototype,"height",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onTweenComplete",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("ParabolicTween2d")],Z)},71554:(q,K,z)=>{"use strict";z.d(K,{L:()=>Z});var Y=z(8674),Q=z(62459),X=z(35120);let Z=class extends Q.uAl{constructor(){super(...arguments),this.onTweenComplete=new Q.HN0}startTween(q,K,z,Y,Z=600,J=.5*Q.cj9.distance(q,K,z,Y),tt){const et=J+Z,it={x:q,z:K,y:0};tt&&this.onTweenComplete.add(tt),this._parabolicTween=X.q.instance.game.add.tween(it,this).to({y:-Z/5},et/2,Q.GS3.Quadratic.Out).to({y:0},et/2,Q.GS3.Quadratic.In,!0),this._linearTween=X.q.instance.game.add.tween(it,this).to({x:z,z:Y},et,Q.GS3.Linear.None,!0),this._linearTween.onUpdateCallback((()=>{this.targetTransform.setPositionX(it.x),this.targetTransform.setPositionY(it.z+it.y)})),this._linearTween.onTweenComplete.addOnce((()=>{this.targetTransform.setPositionX(z),this.targetTransform.setPositionY(Y),this.onTweenComplete.dispatch()}))}stopTween(){var q,K;null===(q=this._linearTween)||void 0===q||q.stop(),null===(K=this._parabolicTween)||void 0===K||K.stop()}destroy(){this.stopTween(),X.q.instance.game.tweens.remove(this._linearTween),X.q.instance.game.tweens.remove(this._parabolicTween),this.onTweenComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(Q.dLy),(0,Y.Sn)("design:type",Q.dLy)],Z.prototype,"targetTransform",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onTweenComplete",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("ParabolicTween3d")],Z)},1823:(q,K,z)=>{"use strict";z.d(K,{k:()=>nt});var Y=z(8674),Q=z(62459),X=z(51742),Z=z(35120),J=z(28152),tt=z(34603),et=z(29834),it=z(12408),st=z(54001);let nt=class extends Q.uAl{constructor(){super(...arguments),this.preloadSFX=X.c.Sfx_water_balloon,this.onFxComplete=new Q.HN0,this._travelTimeMS=2e3,this._animationOffsetMS=400}playEffect(q,K,z,Y,Q,X=0){this.gameObject.transform.setPosition(q-20,K+100);const J=K-50;Q&&this.onFxComplete.add(Q),this._parabolicTween.startTween(q,J,z,Y,2e3,(()=>{this._ballonImage.setAlpha(0),this._rotateTween.destroyTween(),Z.q.instance.prodigy.audio.playSFX(45,"splash")})),this._rotateTween.startTween(),Z.q.instance.game.time.events.addTimer(this._travelTimeMS-this._animationOffsetMS,(()=>{this.playSplash()}),[],this)}playSplash(){this._splashAnimator.playAnimation("impact",!1),this._splashAnimator.OnAnimationComplete.addOnce(this.completeFX,this)}completeFX(){setTimeout((()=>{this.gameObject.destroy()}),1),this.onFxComplete.dispatch()}destroy(){this._parabolicTween.stopTween(),this.onFxComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.Bak)(),(0,Y.Sn)("design:type",String)],nt.prototype,"preloadSFX",void 0),(0,Y.Cg)([(0,Q.MnK)(tt._),(0,Y.Sn)("design:type",tt._)],nt.prototype,"_ballonImage",void 0),(0,Y.Cg)([(0,Q.MnK)(et.j),(0,Y.Sn)("design:type",et.j)],nt.prototype,"_splashAnimator",void 0),(0,Y.Cg)([(0,Q.MnK)(st.y),(0,Y.Sn)("design:type",st.y)],nt.prototype,"_parabolicTween",void 0),(0,Y.Cg)([(0,Q.MnK)(it.Z),(0,Y.Sn)("design:type",it.Z)],nt.prototype,"_rotateTween",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],nt.prototype,"onFxComplete",void 0),nt=(0,Y.Cg)([(0,Q.EVk)("WaterBalloon",J.Y.effect)],nt)},79825:(q,K,z)=>{"use strict";var Y;z.d(K,{h:()=>Y}),function(q){q[q.VoiceClip=0]="VoiceClip",q[q.Sfx=1]="Sfx",q[q.Bgm=2]="Bgm",q[q.BgmSfx=3]="BgmSfx"}(Y||(Y={}))},27842:(q,K,z)=>{"use strict";z.d(K,{J:()=>it,c:()=>Y});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(28152),tt=z(79825);class et extends X.$KW{generate(q,K){return X.XRp.createVertical([X.Gme.filePickerGroup({id:"audioGUID",labelValue:"Audio",path:q.audioGUID,allowedExtensions:["wav","ogg"],onChange:q=>{const K=this._editorAPI.readFileSync(`${q}.meta`).toString(),z=JSON.parse(K);this._editorAPI.modifyComponent(this._componentGuid,{audioGUID:z.guid})}}),X.Gme.enumGroup({id:"audioPreload",labelValue:"Audio Preload",selectValue:q.audioPreload},Y),X.Gme.enumGroup({id:"audioType",labelValue:"Audio Type",selectValue:q.audioType},tt.h),X.Gme.numberGroup({id:"start",labelValue:"Start",inputValue:q.start}),X.Gme.numberGroup({id:"duration",labelValue:"Duration",inputValue:q.duration}),X.Gme.numberGroup({id:"fadeInDuration",labelValue:"Fade In Duration",inputValue:q.fadeInDuration}),X.NyS.create({id:"onPlaybackComplete",label:"On Playback Complete",signalValue:q.onPlaybackComplete,componentGUID:this._componentGuid}),X.Gme.checkboxGroup({id:"playOnCreate",labelValue:"Play On Create",inputValue:q.playOnCreate}),X.Gme.checkboxGroup({id:"stopOnDestroy",labelValue:"Stop On Destroy",inputValue:q.stopOnDestroy}),X.Gme.checkboxGroup({id:"loop",labelValue:"Loop",inputValue:q.loop}),X.Gme.checkboxGroup({id:"onlyPlayIfActive",labelValue:"Only Play If Active",inputValue:q.onlyPlayIfActive}),X.X9M.create({id:"testPlay",buttonText:"Play",buttonIcon:X.a2l.Smiley,onClick:()=>{this._editorAPI.getComponent(this._componentGuid).play()}}),X.X9M.create({id:"testStop",buttonText:"Stop",buttonIcon:X.a2l.Cut,onClick:()=>{this._editorAPI.getComponent(this._componentGuid).stop()}})])}}!function(q){q[q.None=0]="None",q[q.OnCreate=1]="OnCreate",q[q.Dependency=2]="Dependency"}(Y||(Y={}));let it=class extends X.uAl{constructor(){super(...arguments),this._start=0,this._duration=-1,this._fadeInDuration=0,this.onPlaybackComplete=new X.HN0}postDeserialize(){super.postDeserialize(),this._audioPreload===Y.Dependency&&(this._preloadTag=this._audioGUID)}postCreate(){super.postCreate(),this._playOnCreate&&this._audioPreload===Y.Dependency?this.play():this._audioPreload===Y.OnCreate&&this._assetLoader.loadAssets([this._audioGUID]).then((()=>{this._playOnCreate&&this.play()})).catch(X.RQr.createHandler("Error preloading audio"))}destroy(){var q;this._stopOnDestroy&&(null===(q=this._sound)||void 0===q||q.stop()),this.onPlaybackComplete.dispose(),super.destroy()}play(){if(this._onlyPlayIfActive&&!this.GameObject.activeInHierarchy)return;const q=Z.q.instance.prodigy.audio.getVolumeForType(this._audioType);let K=!0;switch(this._audioType){case tt.h.VoiceClip:this._sound=Z.q.instance.prodigy.audio.playVoice(this._audioGUID,(()=>this.onPlaybackComplete.dispatch()),this._start,this._duration);break;case tt.h.Sfx:this._sound=Z.q.instance.prodigy.audio.playSFXFromGUID(this._audioGUID,(()=>this.onPlaybackComplete.dispatch()),this._start,this._duration,this._loop);break;case tt.h.Bgm:Z.q.instance.prodigy.audio.playBGM(this._audioGUID,this._loop);break;case tt.h.BgmSfx:this._sound=Z.q.instance.prodigy.audio.playSound(this._audioGUID,this._loop,q);break;default:K=!1,X.VyI.log("Invalid AudioType. Cannot play sound",X.$bb.Error)}K&&this.applyFadeIn(q)}stop(){var q;null===(q=this._sound)||void 0===q||q.stop()}isPlaying(){return!!this._sound&&this._sound.isPlaying}setGUID(q){this._audioGUID=q,this._assetLoader.loadAssets([this._audioGUID]).catch(X.RQr.createHandler("Error preloading audio"))}preload(){return(0,Q.sH)(this,void 0,void 0,(function*(){yield this._assetLoader.loadAssets([this._audioGUID])}))}applyFadeIn(q){this._fadeInDuration>0&&(this._sound.volume=0,Z.q.instance.game.add.tween(this._sound,this).to({volume:q},1e3*this._fadeInDuration,X.GS3.Linear.None,!0))}};(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],it.prototype,"_audioGUID",void 0),(0,Q.Cg)([(0,X.Bak)(),(0,Q.Sn)("design:type",String)],it.prototype,"_preloadTag",void 0),(0,Q.Cg)([(0,X.gfw)(Y),(0,Q.Sn)("design:type",Number)],it.prototype,"_audioPreload",void 0),(0,Q.Cg)([(0,X.gfw)(tt.h),(0,Q.Sn)("design:type",Number)],it.prototype,"_audioType",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],it.prototype,"_start",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],it.prototype,"_duration",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],it.prototype,"_fadeInDuration",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],it.prototype,"onPlaybackComplete",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"_playOnCreate",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"_stopOnDestroy",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"_loop",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"_onlyPlayIfActive",void 0),(0,Q.Cg)([(0,X.Cdj)(X.t5G.AssetLoader),(0,Q.Sn)("design:type",Object)],it.prototype,"_assetLoader",void 0),it=(0,Q.Cg)([(0,X.EVk)("PlayAudioGUID",J.Y.audio),(0,X.WR4)(et)],it)},2224:(q,K,z)=>{"use strict";z.d(K,{Y:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(17425);let tt=class extends Q.uAl{constructor(){super(...arguments),this._playOnCreate=!1,this._pauseOnDestroy=!1,this._overrideMapBGM=!1}create(){super.create(),X.q.instance.prodigy.audio.autoplay=!this._overrideMapBGM,this._playOnCreate&&this.startBgm()}startBgm(){this.playBgmID(this._bgmGUID?this._bgmGUID:this._bgmID)}playBgmID(q){var K;if(Q.Aq$.isDefined(q)){this._bgmID=q;const z=X.q.instance.prodigy,Y=J.K.getAssetID("bgm",q),Q=null===(K=z.audio.currentBgm)||void 0===K?void 0:K.key;Q!==Y?(J.K.cacheAsset(X.q.instance.game,Y,J.K.zoneAssetsCached),z.load.assets(Y,(()=>{z.audio.playBGM(this._bgmID,!0)}))):z.audio.isBGMPlaying(Q)||z.audio.resumeBGM()}}pauseBgm(){X.q.instance.prodigy.audio.pauseBGM()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Object)],tt.prototype,"_bgmID",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],tt.prototype,"_bgmGUID",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_playOnCreate",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_pauseOnDestroy",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],tt.prototype,"_overrideMapBGM",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("PlayBGM",Z.Y.audio)],tt)},86730:(q,K,z)=>{"use strict";z.d(K,{a:()=>X});var Y=z(8674),Q=z(62459);class X extends Q.JTX{constructor(){super(...arguments),this.backgroundMusicID=null}get BackgroundMusicID(){return this.backgroundMusicID}set BackgroundMusicID(q){this.backgroundMusicID=q,this.audioPlayer.playMusic(this.BackgroundMusicID)}destroy(){this.audioPlayer.stopMusic(),super.destroy()}}(0,Y.Cg)([(0,Q.fFd)("AudioPlayer"),(0,Y.Sn)("design:type",Object)],X.prototype,"audioPlayer",void 0)},37807:(q,K,z)=>{"use strict";z.d(K,{N:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this.onBreadcrumbComplete=new Q.HN0}destroy(){this.onBreadcrumbComplete.dispose(),super.destroy()}markCompleted(){X.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(this._featureName,this._breadcrumbName),this.onBreadcrumbComplete.dispatch()}resetBreadcrumb(){X.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(this._featureName,this._breadcrumbName)}resetBreadcrumbs(){X.q.instance.prodigy.breadcrumbManager.resetBreadcrumbs(this._featureName)}isCompleted(){return X.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(this._featureName,this._breadcrumbName)}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onBreadcrumbComplete",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"_featureName",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"_breadcrumbName",void 0),J=(0,Y.Cg)([(0,Q.EVk)("BreadcrumbFeature",Z.Y.utility)],J)},96494:(q,K,z)=>{"use strict";z.d(K,{F:()=>et});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(90661),J=z(15821),tt=z(7408);let et=class{constructor(){this.breadcrumbConfig=null,this._onBreadcrumbCompleted=new Q.HN0,this.dataSource=null}get onBreadcrumbCompleted(){return this._onBreadcrumbCompleted}init(q,K){this.dataSource=q,this.breadcrumbConfig=K}completeBreadcrumb(q,K){const z=`breadcrumbs-${q}`;if(this.isBreadcrumbComplete(q,K))return;const Y=this.breadcrumbConfig.features[q];if(Q.Aq$.isDefined(Y)){const X=Y.breadcrumbs[K];if(Q.Aq$.isDefined(X)){let K=this.dataSource.get(z);if(Q.Aq$.isDefined(K)||this.dataSource.set(z,0),K=this.dataSource.get(z),this.dataSource.set(z,Z.O.setBit(K,X.index)),Q.Aq$.isDefined(X.completes)&&X.completes.length>0)for(const z of X.completes)this.completeBreadcrumb(q,z)}else Q.VyI.log(`BreadcrumbManager.completeBreadcrumb - Couldn't find breadcrumb named: ${K} for feature: ${q}. No action taken.`,Q.$bb.Error)}else Q.VyI.log(`BreadcrumbManager.completeBreadcrumb - Couldn't find feature named: ${q}. No action taken.`,Q.$bb.Error);this._onBreadcrumbCompleted.dispatch()}resetBreadcrumb(q,K,z=!1){const Y=`breadcrumbs-${q}`;if(!this.isBreadcrumbComplete(q,K))return;const X=this.breadcrumbConfig.features[q];if(Q.Aq$.isDefined(X)){const J=X.breadcrumbs[K];if(Q.Aq$.isDefined(J)){let K=this.dataSource.get(Y);if(Q.Aq$.isDefined(K)||this.dataSource.set(Y,0),K=this.dataSource.get(Y),this.dataSource.set(Y,Z.O.clearBit(K,J.index)),z&&Q.Aq$.isDefined(J.completes)&&J.completes.length>0)for(const Y of J.completes)this.resetBreadcrumb(q,Y,z)}else Q.VyI.log(`BreadcrumbManager.resetBreadcrumb - Couldn't find breadcrumb named: ${K} for feature: ${q}. No action taken.`,Q.$bb.Error)}else Q.VyI.log(`BreadcrumbManager.resetBreadcrumb - Couldn't find feature named: ${q}. No action taken.`,Q.$bb.Error)}isBreadcrumbDefined(q,K){const z=this.breadcrumbConfig.features[q];if(Q.Aq$.isDefined(z)){const q=z.breadcrumbs[K];return Q.Aq$.isDefined(q)}return!1}isBreadcrumbComplete(q,K){const z=this.dataSource.get(`breadcrumbs-${q}`),Y=this.breadcrumbConfig.features[q];return class{static getBreadcrumbFeature(q,K){return(null!=K?K:new tt.C).features[q]}static isBreadcrumbComplete(q,K,z){if(J.A.isDefined(K)){const Y=K.breadcrumbs[z];if(J.A.isDefined(Y)){const K=Math.pow(2,Y.index);return Z.O.areBitsSet(q,K)}}return!1}}.isBreadcrumbComplete(z,Y,K)}resetBreadcrumbs(q){const K=`breadcrumbs-${q}`,z=this.breadcrumbConfig.features[q];if(Q.Aq$.isDefined(z)){const q=this.dataSource.get(K);Q.Aq$.isDefined(q)&&this.dataSource.set(K,0)}}};et=(0,Y.Cg)([(0,X.injectable)()],et)},90744:(q,K,z)=>{"use strict";z.d(K,{E:()=>at});var Y=z(8674),Q=z(79687),X=z(99625),Z=z(10471),J=z(13381),tt=z(35120),et=z(1195),it=z(77938),st=z(43754),nt=z(13956);let at=class{exchange(q,K){const z=J.V.from(q.currency).to(K);return{currency:K,value:J.V.applyExchangeRate(q.value,z)}}canAfford(q){return this.isHardCurrencyValue(q)?this._hardCurrencyDataProvider.canAfford(q):this._playerDataProvider.player.getCurrencyAmount(q.currency,q.type)>=q.value}spend(q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K="default",z={}){var Y;if(q.value=Math.abs(q.value),!this.canAfford(q))throw new Error(`Insufficient funds. Attempting to spend ${q.value} currency-${q.currency}`);if(this.isHardCurrencyValue(q)){const K=tt.q.instance.prodigy.open.prefabMenu(X.l.LoadingOverlay,void 0,void 0,!1);try{yield this._hardCurrencyDataProvider.spend(q,z)}finally{K.close()}}else this.isGoldCurrencyValue(q)?this._playerDataProvider.player.changeGold(-q.value):this._playerDataProvider.player.backpack.consume(null!==(Y=q.type)&&void 0!==Y?Y:"currency",q.currency,q.value);this.sendAnalyticsEvents(q,K,z)}))}sendAnalyticsEvents(q,K,z){var Y,Q,X;const Z=q.currency,J=null!==(Y=q.type)&&void 0!==Y?Y:"currency",tt=null===(X=null===(Q=it.t.getItem(J,Z))||void 0===Q?void 0:Q.data)||void 0===X?void 0:X.name;this.isHardCurrencyValue(q)||this._analytics.item.sendItemRemovedEvent(Z,tt,J,q.value,z)}isStandardCurrencyValue(q){var K;return"currency"===(null!==(K=q.type)&&void 0!==K?K:"currency")}isHardCurrencyValue(q){return this.isStandardCurrencyValue(q)&&Z.B.includes(q.currency)}isGoldCurrencyValue(q){return"gold"===q.type||this.isStandardCurrencyValue(q)&&1===q.currency}};(0,Y.Cg)([(0,nt.b)("bec-c6b4"),(0,Y.Sn)("design:type",st.W)],at.prototype,"_hardCurrencyDataProvider",void 0),(0,Y.Cg)([(0,nt.b)("ad2-c5b2"),(0,Y.Sn)("design:type",et.E)],at.prototype,"_playerDataProvider",void 0),(0,Y.Cg)([(0,nt.b)("20f-5f67"),(0,Y.Sn)("design:type",Function)],at.prototype,"_analytics",void 0),at=(0,Y.Cg)([(0,Q.injectable)()],at)},2519:(q,K,z)=>{"use strict";z.d(K,{E:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(90744);let J=class extends Q.uAl{constructor(){super(...arguments),this.onStartedSpend=new Q.HN0,this.onFinishedSpend=new Q.HN0,this.onSuccess=new Q.HN0,this.onFailure=new Q.HN0,this.customData={},this.isProcessingSpend=!1}spend(){this.isProcessingSpend||(this.isProcessingSpend=!0,this.onStartedSpend.dispatch(),this._paymentManager.spend({currency:this.currencyId,value:this.amount},"default",Object.assign({is_magicoin_boosted:27===this.currencyId},this.customData)).then((()=>{this.onSuccess.dispatch(this.currencyId,this.amount)})).catch((q=>{Q.RQr.logError(q,"[MakePaymentComponent] Failed to make payment"),this.onFailure.dispatch()})).finally((()=>{this.isProcessingSpend=!1,this.onFinishedSpend.dispatch()})))}destroy(){this.onSuccess.dispose(),this.onFailure.dispose(),this.onStartedSpend.dispose(),this.onFinishedSpend.dispose()}};(0,Y.Cg)([(0,Q.Cdj)("ec3-31a0"),(0,Y.Sn)("design:type",Z.E)],J.prototype,"_paymentManager",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"currencyId",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"amount",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onStartedSpend",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onFinishedSpend",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onSuccess",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onFailure",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Q.YLv)("Optional custom data for analytics purposes"),(0,Y.Sn)("design:type",Object)],J.prototype,"customData",void 0),J=(0,Y.Cg)([(0,Q.EVk)("MakePayment",X.Y.economy)],J)},98400:(q,K,z)=>{"use strict";z.d(K,{w:()=>Q});var Y=z(62459);z(34829);class Q{constructor(q){this.questionInterface=null,this.isOverlayOpen=!1,this.onQuestionOpened=new Y.HN0,this.onQuestionAnswered=new Y.HN0,this.questionInterface=q}get OnQuestionOpened(){return this.onQuestionOpened}get OnQuestionAnswered(){return this.onQuestionAnswered}open(q){this.isOverlayOpen||(this.isOverlayOpen=!0,this.onQuestionOpened.dispatch(),this.questionInterface.question(((q,K,z,Y,Q,X,Z)=>{this.isOverlayOpen=!1,this.onQuestionAnswered.dispatch(q,K,z,Y,Q,X,Z)}),Object.assign({forceAnswerBonus:this.isNFactorEnabled()},q)))}isOpen(){return this.isOverlayOpen}isNFactorEnabled(){return!1}}},76599:(q,K,z)=>{"use strict";var Y,Q;z.d(K,{w:()=>Y}),function(q){q.DEFAULT="default",q.DEFAULT_STRAND_CLUSTERS="default-strand-clusters",q.HOMEWORK="assignment",q.PLACEMENT="placement-test",q.PLACEMENT_BY_STRAND="placement-by-strand-test",q.PLAN="plan",q.GAME_CHALLENGE="game-challenge",q.BACKEND_DEFAULT="default-backend",q.BACKEND_DEFAULT_STRAND_CLUSTERS="default-strand-clusters-backend",q.BACKEND_HOMEWORK="assignment-backend",q.BACKEND_PLACEMENT_BY_STRAND="placement-by-strand-test-backend",q.BACKEND_PLAN="plan-backend"}(Y||(Y={})),function(q){q.mc="mc",q.tb="tb",q.dd="dd",q["cp-1"]="cp-1",q["cp-2"]="cp-2",q["cp-3"]="cp-3",q["bbc-1"]="bbc-1",q["bbc-2"]="bbc-2",q["bbt-1"]="bbt-1",q["bbt-2"]="bbt-2",q.fc="fc",q["nl-1"]="nl-1",q.clock="clock",q.hc="hc",q["fs-1"]="fs-1",q["fs-2"]="fs-2",q["tf-1"]="tf-1",q["tf-2"]="tf-2",q.bg="bg",q.lp="lp",q.sp="sp",q.grid="grid"}(Q||(Q={}))},86824:(q,K,z)=>{"use strict";z.d(K,{e:()=>Z});var Y=z(62459),Q=z(15821),X=z(35120);class Z{static areRequirementsMet(q){const K=X.q.instance.prodigy.gameContainer.get("9fe-5b45");let z=!0;if(Q.A.isDefined(q.requireExperiment)&&(Q.A.isDefined(q.requireExperimentGroup)?K.getVariation(q.requireExperiment)!==parseInt(q.requireExperimentGroup,10)&&(z=!1):K.isInExperiment(q.requireExperiment)||(z=!1)),Q.A.isDefined(q.requireFeature)&&(K.isOn(q.requireFeature)||(z=!1),Q.A.isDefined(q.requireFeatureVariables)))for(const[Y,X]of Object.entries(q.requireFeatureVariables)){const Z=K.getFeatureValue(q.requireFeature),J=Q.A.traverseIfObject(Z,Y);Q.A.isDefined(J)&&J===X||(z=!1)}return q.invert&&(z=!z),z}static processExperimentVariables(q){const K=X.q.instance.prodigy.gameContainer.get("9fe-5b45");if(K){for(const[z,Y]of Object.entries(q))if(this.isCompatible(Y)){const X=K.getFeatureValue(Y.featureName),Z=Q.A.traverseIfObject(X,Y.variableName);q[z]=null!=Z?Z:Y.defaultValue}}else Y.VyI.log("Could not find experiment provider",Y.$bb.Warning)}static isCompatible(q){return!("object"!=typeof q||!q)&&("string"==typeof q.featureName&&"string"==typeof q.variableName&&"defaultValue"in q)}}},48813:(q,K,z)=>{"use strict";z.d(K,{T:()=>bt});var Y=z(8674),Q=z(62459);var X=z(77601);const Z=(0,X.gb)({key:"active-entity-overrides",activateAssociatedExperiments:1,default:[]});var J=z(15821),tt=z(35120),et=z(84399),it=z(13381),st=z(29887),nt=z(13956),at=z(44367);class rt extends at.z{static sendActivationEvent(){var q;this._segmentExperimentTracker.track("pet-levelup-magicoin-cost"),(null===(q=rt.getVariables())||void 0===q?void 0:q.exchangeRates)&&it.V.setOverrideRates(rt.getVariables().exchangeRates)}static getVariables(){return super.getFeatureVariables()}static isFeatureEnabled(){var q;return super.isFeatureEnabled()&&(null===(q=this.getFeatureVariables())||void 0===q?void 0:q.enabled)}}rt._featureName="pet-levelup-magicoin-cost",(0,Y.Cg)([(0,nt.b)("785-5cf4"),(0,Y.Sn)("design:type",st.p)],rt,"_segmentExperimentTracker",void 0);var ot=z(36233),ht=z(76277),ct=z(73678),dt=z(79600),lt=z(37251),ut=z(77938);class ft{constructor(q){this._userID=q}getExperimentVariations(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this._sdkWrapper.gameAssetsExperiments.getAllExperimentsWithCustomData(this._userID);if(!q.isOK())throw new dt.CatalystSdkError(dt.EErrorCode.Unknown,"Error retrieving asset experiment data",`${q.status}: ${JSON.stringify(q.data)}`);const K=new Map;return q.data.result.experiments.forEach((q=>{var z,Y,X;for(const Z of q.linkedFeatures){let J;if(Q.Aq$.isDefined(q.variation))J={experimentKey:q.variation.experimentKey,featureKey:q.variation.featureKey,variationKey:q.variation.variationKey,variationIndex:q.variation.variationIndex};else{const K=this._featureProvider.evalFeature(Z);J={experimentKey:q.experimentKey,featureKey:null===(z=K.experimentResult)||void 0===z?void 0:z.featureId,variationKey:null===(Y=K.experimentResult)||void 0===Y?void 0:Y.key,variationIndex:null===(X=K.experimentResult)||void 0===X?void 0:X.variationId}}if(Q.Aq$.isDefined(J.variationKey)&&Q.Aq$.isDefined(J.featureKey)&&Q.Aq$.isDefined(J.variationIndex)){const{experimentKey:q,featureKey:z,variationKey:Y}=J,Q=`${q}-${z}-${Y}`;K.set(Q,J)}}})),Array.from(K.values())}))}mergeExperimentAssetData(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.getExperimentVariations();if(q.length>0){const K=yield this._sdkWrapper.gameAssetsExperiments.getAssetsForExperimentsVariations(dt.SourceType.CMS,this._userID,q);if(!K.isOK())throw new dt.CatalystSdkError(dt.EErrorCode.Unknown,"Error retrieving asset experiments",`${K.status}: ${JSON.stringify(K.data)}`);for(const q of K.data.result.assets){const K=ut.t.getItem(q.assetType,q.id);K&&q.data.data&&(K.data=q.data.data,Q.Aq$.isDefined(q.data.metadata)&&(K.metadata=q.data.metadata))}}}))}}(0,Y.Cg)([(0,nt.b)("b09-138c"),(0,Y.Sn)("design:type",lt.X)],ft.prototype,"_sdkWrapper",void 0),(0,Y.Cg)([(0,nt.b)("9fe-5b45"),(0,Y.Sn)("design:type",Object)],ft.prototype,"_featureProvider",void 0);class bt{static sendFestivalTravelEvent(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(q===ct.A_.LAMPLIGHT&&tt.q.instance.prodigy.skin.getActiveFestivals().length>0){tt.q.instance.prodigy.gameContainer.get("785-5cf4").track("game-visit-festival")}}))}static sendDecisionEvents(){const q=tt.q.instance.prodigy.gameContainer.get("785-5cf4"),K=tt.q.instance.prodigy.gameContainer.get("927-20b7"),z=["pippet-quest-encounters","difficulty-progression","difficulty-scaling","zone-entry-illustrations-v2","web-push-notification","member-jar","game-overlay-checkout","treasure-track-ux","store-revamp","contextual-offers","pet-capture-and-evo-costs","rifts-v2","prefab-scenes","regional-currency-changes","hud-revamp-2025"];et.R.sendActivationEvent(),ot.p.sendActivationEvent(),rt.sendActivationEvent();for(const Q of z)q.track(Q);const Y=(0,ht.G)(Z);for(const Q of Y)(0,X.gb)({key:Q,default:{},activateAssociatedExperiments:0});K.setup(),bt._onGrowthbookResolved()}static forceExperimentVariation(){const q=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;Array.isArray(q.data.forceExperiment)?q.data.forceExperiment.forEach((q=>{bt._featureProvider.forceVariation(q.experimentKey,parseInt(q.variationKey,10))})):J.A.isDefined(q.data.forceExperiment)&&Q.VyI.log("Experiment data was the incorrect type",Q.$bb.Error)}static mergeUserExperimentAssetData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=new ft(q);yield K.mergeExperimentAssetData()}))}}bt.ready=new Promise((q=>{bt._onGrowthbookResolved=q})),(0,Y.Cg)([(0,nt.b)("9fe-5b45"),(0,Y.Sn)("design:type",Object)],bt,"_featureProvider",void 0)},29887:(q,K,z)=>{"use strict";z.d(K,{p:()=>Q});var Y=z(62459);class Q{constructor(q,K){this._featureProvider=q,this._segment=K}track(q){const{experimentResult:K,experiment:z}=this._featureProvider.evalFeature(q);(null==K?void 0:K.inExperiment)&&z&&Y.Aq$.isDefined(K.variationId)&&this._segment.create.experimentVariationAssigned(q,z.key,K.key,this._featureProvider.getAttributes()).send()}}},57070:(q,K,z)=>{"use strict";z.d(K,{w:()=>J});var Y=z(8674),Q=z(62459);var X=z(35120),Z=z(1195);class J extends class{meetsRequirement(q){return!0}}{get activePlayer(){return this._loggedInPlayer.player}constructor(q){super(),this.game=null,this.game=q}getInjectedValue(q){return X.q.instance.prodigy.gameContainer.get(q)}}(0,Y.Cg)([(0,Q.fFd)("ad2-c5b2"),(0,Y.Sn)("design:type",Z.E)],J.prototype,"_loggedInPlayer",void 0),(0,Y.Cg)([(0,Q.fFd)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],J.prototype,"_localizer",void 0)},56735:(q,K,z)=>{"use strict";z.d(K,{p:()=>st});var Y=z(62459),Q=z(37016),X=z(15821),Z=z(77938),J=z(22023),tt=z(57070),et=z(30226),it=z(9579);class st extends tt.w{getDisplayText(q){const{petCount:K,mergeRank:z,evolutionTier:Y,level:Q,rarity:Z}=q,J=it.a.getRuleDescriptionKey(q);return X.A.isDefined(z)?this._localizer.getText(J,K,z):X.A.isDefined(Y)?this._localizer.getText(J,K,Y):X.A.isDefined(Q)?this._localizer.getText(J,K,Q):X.A.isDefined(Z)?this._localizer.getText(J,K,et.J.convertRarityToText(null!=Z?Z:0)):this._localizer.getText(J,K)}getCurrentValue(q){return st.getPetsSchema(q,this.activePlayer).length}getCurrentProgress(q){return[this.getCurrentValue(q),q.petCount]}meetsRequirement(q){return this.getCurrentValue(q)>=q.petCount}static checkIfMeetsRequirement(q,K){if(!X.A.isDefined(null==q?void 0:q.petCount))return Y.VyI.log('Required parameter: "petCount" is not found.',Y.$bb.Error),!1;return this.getPetsSchema(q,K).length>=q.petCount}static getPetsSchema(q,K){let z=K.kennel.getPets();return X.A.isDefined(null==q?void 0:q.mergeRank)&&(z=z.filter((K=>{var z,Y,X,Z;return(null!==(X=J.P8.getPetDisplayMergeRank(null!==(z=K.ID)&&void 0!==z?z:0,null!==(Y=K.uniqueID)&&void 0!==Y?Y:""))&&void 0!==X?X:Q.qd.MIN)>=(null!==(Z=null==q?void 0:q.mergeRank)&&void 0!==Z?Z:-1)}))),(null==q?void 0:q.affinity)&&(z=z.filter((K=>{var z,Y;return(null===(Y=null===(z=Z.t.getItem("pet",K.ID))||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.affinity)===q.affinity}))),(null==q?void 0:q.evolutionTier)&&(z=z.filter((K=>{var z,Y,Q,X,J;return(null!==(X=null===(Q=null===(Y=null===(z=Z.t.getItem("pet",K.ID))||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.evolution)||void 0===Q?void 0:Q.tier)&&void 0!==X?X:0)>=(null!==(J=null==q?void 0:q.evolutionTier)&&void 0!==J?J:0)}))),(null==q?void 0:q.unique)&&(z=z.filter(((q,K,z)=>z.findIndex((K=>K.ID===q.ID))===K))),(null==q?void 0:q.level)&&(z=z.filter((K=>{var z,Y;return(null!==(z=K.level)&&void 0!==z?z:0)>=(null!==(Y=null==q?void 0:q.level)&&void 0!==Y?Y:0)}))),(null==q?void 0:q.rarity)&&(z=z.filter((K=>{var z,Y;return(null===(Y=null===(z=Z.t.getItem("pet",K.ID))||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.rarity)===q.rarity}))),z}}},5018:(q,K,z)=>{"use strict";z.d(K,{G:()=>tt});var Y=z(8674),Q=z(79600),X=z(62459),Z=z(35120),J=(z(34829),z(57070));class tt extends J.w{getCurrentValue(){return tt._features}meetsRequirement(q){return this.getCurrentValue().includes(q)}getCurrentProgress(q){return[this.getCurrentValue(),q]}static loadFeatures(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=Z.q.instance.prodigy.gameContainer.get("b09-138c");try{const K=yield q.featureAccess.getFeatures();this._features=K.data.features}catch(K){const q=K;q.code===Q.EErrorCode.RequestError?X.VyI.log(`getFeatureAccess Request Error: ${q.name} - ${q.message}`,X.$bb.Error):X.VyI.log(`getFeatureAccess Unexpected Error: ${X.RQr.stringify(K)}`,X.$bb.Error)}}))}}tt._features=[]},20706:(q,K,z)=>{"use strict";z.d(K,{L:()=>Q});var Y=z(68910);class Q extends Y.Filter{get color1(){return Y.Color.shared.setValue(this.uniforms.color1).toNumber()}set color1(q){this.uniforms.color1=Y.Color.shared.setValue(q).toRgbArray()}get color2(){return Y.Color.shared.setValue(this.uniforms.color2).toNumber()}set color2(q){this.uniforms.color2=Y.Color.shared.setValue(q).toRgbArray()}constructor(q,K){super(null,Q.FRAGMENT_SHADER,{color1:Y.Color.shared.setValue(q).toRgbArray(),color2:Y.Color.shared.setValue(K).toRgbArray()})}}Q.FRAGMENT_SHADER="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform vec4 color1;\n uniform vec4 color2;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n gl_FragColor.rgb = mix(color1.rgb, color2.rgb, c.rgb/c.a);\n gl_FragColor.a = c.a;\n gl_FragColor.rgb *= c.a;\n }"},44357:(q,K,z)=>{"use strict";z.d(K,{BY:()=>Tt,EK:()=>ht,GP:()=>at,MQ:()=>rt,QQ:()=>Et,Qx:()=>_t,Ry:()=>lt,Vy:()=>bt,Wf:()=>ft,XL:()=>yt,ce:()=>st,dD:()=>it,dU:()=>ot,eK:()=>vt,lz:()=>ct,pf:()=>ut,qb:()=>nt,qe:()=>gt,uk:()=>wt,v$:()=>dt,x:()=>pt,yH:()=>mt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(65240),tt=z(35120),et=z(43531);Q.Egh.timeout;const it=q=>{tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.saveEnabled=q},st=(q,K,z=!1)=>{q.setAnimationByName(0,K,z)},nt=(q,K,...z)=>(0,Y.sH)(void 0,[q,K,...z],void 0,(function*(q,K,z=!1){return new Promise((Y=>{st(q,K,z),q.onComplete.addOnce(Y)}))})),at=(q,K=null,z=J.C.Interactable,Y=null,Q=null)=>{tt.q.instance.prodigy.open.gotItem(q,null,!0,K,void 0,void 0,{source_type:z,source_id:Y,transaction_id:Q})},rt=(q,...K)=>(0,Y.sH)(void 0,[q,...K],void 0,(function*(q,K=null,z=J.C.Interactable,Y=null,Q=null,X){return new Promise((Z=>{q.length>0?tt.q.instance.prodigy.open.gotItem(q,Z,!0,K,void 0,!0===X,{source_type:z,source_id:Y,transaction_id:Q}):Z()}))})),ot=(q,K)=>{const z=tt.q.instance.prodigy.notifications;z.pause(K),z.clearNotifications(),q&&(q.Active=!1)},ht=(q,K)=>{tt.q.instance.prodigy.notifications.resume(K),q&&(q.Active=!0)},ct=(q,K,...z)=>(0,Y.sH)(void 0,[q,K,...z],void 0,(function*(q,K,z=1e3,Y=!1,X){return new Promise((Z=>{const J=new Q.I9Y;J.copyFrom(q.localPosition);const et=new Q.I9Y;et.copyFrom(K.worldPosition),et.subtract(q.worldPosition);const it={percent:0};X&&(X.shouldFollow=!1),tt.q.instance.game.add.tween(it,this).to({percent:1},z,Q.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{q.setPosition(J.x+et.x*it.percent,J.y+et.y*it.percent)})).onTweenComplete.addOnce((()=>{q.setPosition(J.x+et.x,J.y+et.y),Y&&X&&(X.shouldFollow=!0),Z()}))}))})),dt=q=>(0,Y.sH)(void 0,void 0,void 0,(function*(){return new Promise((K=>{et.rD.runDialogueSequence(q,K)}))})),lt=(q,K)=>{q.active=K},ut=(q,K)=>{q.Active=K},ft=(q,K)=>{q.setPosition(K.x,K.y)},bt=(q,K,z,Q)=>(0,Y.sH)(void 0,void 0,void 0,(function*(){return new Promise((Y=>{const X=K.GameObject.transform,Z=q.findPath(X.worldPosition,z),J=()=>{Q&&X.setScale(X.worldPosition.x{Q.Aq$.isDefined(q)||K.setPath([{x:z,y:X}],Y),q.findPath(K.x,K.y,z,X,!0).then((q=>{q?Y(q):Z()})).catch((()=>Z()))}));yield vt(K,...Y)}))}function vt(q,...K){return(0,Y.sH)(this,void 0,void 0,(function*(){yield new Promise((z=>{K.reverse(),q.setPath(K,z)}))}))}const gt=(q,K,z,Q,X)=>(0,Y.sH)(void 0,void 0,void 0,(function*(){return new Promise((Y=>{let Z;Z=Q?{x:Q.x,y:Q.y}:{x:q.worldPosition.x,y:q.worldPosition.y};const J=tt.q.instance.game.add.tween(Z,this),et=()=>{tt.q.instance.game.tweens.remove(J)};J.to({x:K.x,y:K.y},z,X,!0).onUpdateCallback((()=>{q.setPosition(Z.x,Z.y)})),J.onTweenComplete.addOnce((()=>{q.OnDestroy.remove(et,this),q.setPosition(K.x,K.y),Y()})),q.OnDestroy.addOnce(et,this)}))})),mt=(q,K,z,X)=>(0,Y.sH)(void 0,void 0,void 0,(function*(){return new Promise((Y=>{let Z;Z=X?{x:X.x,y:X.y}:{x:q.worldScale.x,y:q.worldScale.y};const J=tt.q.instance.game.add.tween(Z,this),et=()=>{tt.q.instance.game.tweens.remove(J)};J.to({x:K.x,y:K.y},z,Q.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{q.setScale(Z.x,Z.y)})),J.onTweenComplete.addOnce((()=>{q.OnDestroy.remove(et,this),q.setScale(K.x,K.y),Y()})),q.OnDestroy.addOnce(et,this)}))})),yt=(q,K,z,X,Z)=>(0,Y.sH)(void 0,void 0,void 0,(function*(){let Y=null!=Z?Z:K.anchoredPivotOffset;if(Y={x:Y.x,y:Y.y},!(new Q.I9Y(z.x,z.y).getDistanceSq(new Q.I9Y(Y.x,Y.y))<=0))return new Promise((Z=>{const J=q.add.tween(Y,this),et=()=>{tt.q.instance.game.tweens.remove(J)};J.to({x:z.x,y:z.y},X,Q.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{K.setAnchoredPivotOffset(Y.x,Y.y)})),J.onTweenComplete.addOnce((()=>{K.OnDestroy.remove(et,this),K.setAnchoredPivotOffset(z.x,z.y),Z()})),K.OnDestroy.addOnce(et,this)}))}));function _t(q,K,...z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=tt.q.instance.game.add.tween(K,q,!0);for(const q of z)Y.to(Z().omit(q,"duration","ease","delay"),q.duration,q.ease,!0,q.delay);yield Y.onTweenComplete.asPromise()}))}const Et=(q,K)=>{if(q.input.enabled=K,!K){q.input.reset();for(let K=0;K(0,Y.sH)(void 0,void 0,void 0,(function*(){return new Promise((z=>{q.time.events.addTimer(K,z,this)}))}));function Tt(q,K){q.faceToward(K.x),K.faceToward(q.x)}},13956:(q,K,z)=>{"use strict";z.d(K,{b:()=>Q});var Y=z(35120);function Q(q,K=!0){return(z,Q)=>{Object.defineProperty(z,Q,{get(){const z=Y.q.instance.prodigy.gameContainer.get(q);return K&&null!==z&&Object.defineProperty(this,Q,{get:()=>z}),z},configurable:!0})}}},34234:(q,K,z)=>{"use strict";z.d(K,{d:()=>Q});var Y=z(62459);const Q=(q,K=!0)=>(z,Q)=>{Object.defineProperty(z,Q,{get(){const z=Y.wa5.getActiveScene().container.get(q);return K&&null!==z&&Object.defineProperty(this,Q,{get:()=>z}),z},configurable:!0})}},26932:(q,K,z)=>{"use strict";z.d(K,{z:()=>Z});var Y=z(8674),Q=z(62459),X=z(26004);class Z extends Q.uAl{bindContext(){}unbindContext(){}updateValue(q,K,z){const Y=null!=z?z:this._context,Q=Y.Container;Y.getInjectedValue(q)!==K&&(Q.rebind(q).toConstantValue(K),this.consumeInjection(Y,q))}consumeInjection(q,K){var z;try{q.GameObject.findComponentsInChildren(X.B).filter((q=>q.id===K)).forEach((q=>q.consume()))}catch(Y){let X=`Error updating value for identifier: ${K}`;X+=`\n in context: ${null===(z=null==q?void 0:q.GameObject)||void 0===z?void 0:z.name}`,Q.VyI.log(`${X}\n${String(Y)}`,Q.$bb.Error)}}}(0,Y.Cg)([(0,Q.Pqz)(Q.bE_),(0,Y.Sn)("design:type",Q.bE_)],Z.prototype,"_context",void 0)},26004:(q,K,z)=>{"use strict";z.d(K,{B:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this.onCreated=new Q.HN0,this.onInject=new Q.HN0,this.onInjectNoParams=new Q.HN0,this._isSpreadArray=!1,this._consumeOnCreate=!0,this.consumeOnUpdatedInjectedValue=!0}get id(){return this._id}create(){super.create(),this._consumeOnCreate&&this.consume(),this.onCreated.dispatch()}consume(){const q=this.getInjectedValue(this.id);Q.Aq$.isDefined(q)&&(this._targetProperty&&(Array.isArray(this._targetComponent[this._targetProperty])?this._isSpreadArray?this._targetComponent[this._targetProperty].push(...q):this._targetComponent[this._targetProperty].push(q):this._isSpreadArray?Q.VyI.log("Value has not been set!",Q.$bb.Error):this._targetComponent[this._targetProperty]=q),this._isSpreadArray&&Array.isArray(q)?this.onInject.dispatch(...q):this.onInject.dispatch(q),this.onInjectNoParams.dispatch())}destroy(){this.onCreated.dispose(),this.onInject.dispose(),this.onInjectNoParams.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.W_S)(),(0,Q.YLv)("A unique ID to use for injection"),(0,Y.Sn)("design:type",String)],Z.prototype,"_id",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.uAl),(0,Q.YLv)("The component to which the injected value should be assigned"),(0,Y.Sn)("design:type",Q.uAl)],Z.prototype,"_targetComponent",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.YLv)("The name of the property that should receive the injected value"),(0,Y.Sn)("design:type",String)],Z.prototype,"_targetProperty",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Q.YLv)("Fired after `consume()` being run on creation"),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onCreated",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onInject",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onInjectNoParams",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_isSpreadArray",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_consumeOnCreate",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"consumeOnUpdatedInjectedValue",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("InjectionConsume",X.Y.injection,"Consumes the injected value and assigns the value to the referenced property")],Z)},97071:(q,K,z)=>{"use strict";z.d(K,{p:()=>ct});var Y=z(62459),Q=z(35120),X=z(2221),Z=z(8674),J=z(67255);class tt{constructor(q){this.game=null,this.game=q}playDialogue(q,K){return(0,Z.sH)(this,void 0,void 0,(function*(){return new Promise((z=>{const Y=new J.Z(this.game);for(let q=0;q{z()}))}))}))}}class et extends Y.JTX{constructor(){super(...arguments),this.onClose=new Y.HN0,this.titleKey="",this.messageKey="",this.confirmButtonKey=""}get OnClose(){return this.onClose}get TitleKey(){return this.titleKey}set TitleKey(q){this.titleKey=q}get MessageKey(){return this.messageKey}set MessageKey(q){this.messageKey=q}get ConfirmButtonKey(){return this.confirmButtonKey}set ConfirmButtonKey(q){this.confirmButtonKey=q}open(){const q=Q.q.instance.prodigy.open.coOpModal({title:""===this.titleKey?null:this.localization.getText(this.titleKey),body:this.localization.getText(this.messageKey),greenButton:{text:this.localization.getText(this.confirmButtonKey),callback:()=>{this.onClose.dispatch()}}});this.GameObject.legacyTransform.group.addChild(q)}destroy(){this.onClose.dispose(),super.destroy()}}(0,Z.Cg)([(0,Y.fFd)("Localization"),(0,Z.Sn)("design:type",Y.dTp)],et.prototype,"localization",void 0);class it extends Y.s3P{constructor(q){super(q)}showMessage(q,K,z){const Q=new Y._mx(this.menuLayer);Q.addComponent(Y.K16);const X=Q.addComponent(et);return X.TitleKey=K,X.MessageKey=q,X.ConfirmButtonKey=z,X}}(0,Z.Cg)([(0,Y.fFd)("MenuLayer"),(0,Z.Sn)("design:type",Y._mx)],it.prototype,"menuLayer",void 0);var st=z(5668),nt=z(79009),at=z(95925),rt=z(17425);class ot extends Y.s3P{constructor(q,K){super(q),this.audioPlayer=null,this.audioPlayer=K}playSoundEffectClip(q,K){const z=rt.K.getAssetID("sfx",q);return this.assetLoader.isLoaded(z,at.i.Sound)?this.audioPlayer.playSFX(q,K):(this.assetLoader.loadAssets([z]).then((()=>{this.playSoundEffectClip(q,K)})),null)}playSoundEffect(q,K){const z=rt.K.getAssetID("sfx",q);return this.assetLoader.isLoaded(z,at.i.Sound)?this.audioPlayer.playSound(q,K):(this.assetLoader.loadAssets([z]).then((()=>{this.playSoundEffect(q,K)})),null)}playMusic(q){const K=`bgm-${q}`;this.assetLoader.isLoaded(K,at.i.Music)?this.audioPlayer.playBGM(q,!0):this.assetLoader.loadAssets([K]).then((()=>{this.playMusic(q)}))}stopMusic(){this.audioPlayer.pauseBGM()}}(0,Z.Cg)([(0,Y.fFd)(Y.t5G.AssetLoader),(0,Z.Sn)("design:type",Object)],ot.prototype,"assetLoader",void 0);class ht{constructor(q){this.breadcrumbManager=null,this.breadcrumbManager=q}isComplete(q,K){return this.breadcrumbManager.isBreadcrumbComplete(q,K)}completeBreadcrumb(q,K){this.breadcrumbManager.completeBreadcrumb(q,K)}}class ct extends Y.PQK{constructor(q){super(),this.game=q}installBindings(){const q=Q.q.instance.prodigy.gameContainer,K=q.get(Y.t5G.AssetLoader),Z=q.get("e2b-ffaf");this.Container.bind(Y.t5G.AssetLoader).toConstantValue(K),this.Container.bind("ImageTinter").toConstantValue(Z),this.Container.bind("AnimationData").toConstantValue(new nt.F(z(34500))),this.Container.bind("BreadcrumbService").toConstantValue(new ht(Q.q.instance.prodigy.breadcrumbManager)),this.Container.bind("DialogueFactory").toConstantValue(new tt(this.game)),this.Container.bind("Localization").toConstantValue(q.get(Y.$Bt.LocalizationService)),this.Container.bind("316-5db0").toConstantValue(new st.D(this.Container,Q.q.instance.prodigy.gameContainer.get("774-4659"))),this.Container.bind("CurrentPlayer").toConstantValue(q.get("ad2-c5b2")),this.Container.bind("AudioPlayer").toConstantValue(new ot(this.Container,Q.q.instance.prodigy.audio)),this.Container.bind("FeatureFlags").toConstantValue(q.get("f71-42eb")),this.Container.bind("19d-cfb4").toConstantValue(new it(this.Container)),this.Container.bind("PrizeProvider").toConstantValue(new X.f(this.Container)),this.Container.bind("DataDogLogger").toConstantValue(q.get("ce3-6d33"))}}},46:(q,K,z)=>{"use strict";z.d(K,{C:()=>Z});var Y=z(8674),Q=z(62459);const X=window.EasyStar;z(34829);class Z{constructor(q,K=20){this.callbacks=[],this.lowPriorityPathfinderInUse=!1,this.init(q,K)}addCallback(q,K,z){this.callbacks.push({ID:q,callback:K,mainPlayerRequired:z})}init(q,K=20){this.area=q,this.size=K}getCallback(q,K,z){for(const Y of this.callbacks)if(Y.ID===this.getNodeValue(q,K)&&(!Q.Aq$.isDefined(Y.mainPlayerRequired)||!Y.mainPlayerRequired||z))return Y.callback;return null}xyToTile(q,K){return new Q.I9Y(Math.floor(q/this.size),Math.floor(K/this.size))}tileToXY(q,K){return new Q.I9Y(Math.floor((q+.5)*this.size),Math.floor((K+.5)*this.size))}findPath(q,K,z,Q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z,Y,Q=!0){return new Promise((X=>{this.findPathInternal(q,K,z,Y,X,Q,!1)}))}))}findPathSync(q,K,z,Y){let Q=null;return this.findPathInternal(q,K,z,Y,(q=>{Q=q}),!0,!0),Q}findPathInternal(q,K,z,Y,Z,J,tt){if(this.lowPriorityPathfinderInUse&&!J)return void Q.VyI.log("findPath failed. Already finding a path.",Q.$bb.Warning);J||(this.lowPriorityPathfinderInUse=!0);let et=Math.floor(q/this.size),it=Math.floor(K/this.size),st=Math.floor(z/this.size),nt=Math.floor(Y/this.size);et=et>63?63:et<0?0:et,st=st>63?63:st<0?0:st,it=it>35?35:it<0?0:it,nt=nt>35?35:nt<0?0:nt;const at=new X.js;at.setGrid(this.area),at.setAcceptableTiles([1,2,3,4,5]),at.findPath(et,it,st,nt,this.processPath.bind(this,z,Y,Z,J)),tt?at.enableSync():at.disableSync(),at.calculate()}processPath(q,K,z,Y,X){let Z=null;if(Q.Aq$.isDefined(X)){const z=[];z.push(X[0]);for(let q=X.length-1;q>0&&z[z.length-1]!==X[q];q--){this.findNodeBetween(z[z.length-1],X[q])||(z.push(X[q]),q=X.length)}Z=[];for(let q=z.length-1;q>0;q--)z[q].x*=this.size,z[q].y*=this.size,Z.push(z[q]);Z[0]=new Q.I9Y(q,K)}Q.Aq$.isDefined(z)&&z(Z),Y||(this.lowPriorityPathfinderInUse=!1)}findNodeBetween(q,K){let z=K.x-q.x,Y=K.y-q.y;const X=Math.abs(z)>=Math.abs(Y)?Math.abs(z):Math.abs(Y);if(0===X)return q;z/=X,Y/=X;let Z=q.x,J=q.y,tt=q;for(;Z!==K.x||J!==K.y;){if(Z+=z,J+=Y,(z>0&&Z>K.x||z<0&&Z0&&J>K.y||Y<0&&J0&&6!==z}getNodeValue(q,K){return K=0&&q=0?this.area[K][q]:-1}isPathBlocked(q,K,z,Y){const X=this.findNodeBetween(new Q.I9Y(Math.floor(q/this.size),Math.floor(K/this.size)),new Q.I9Y(Math.floor(z/this.size),Math.floor(Y/this.size)));return Q.Aq$.isDefined(X)}reset(){this.lowPriorityPathfinderInUse=!1}}},24110:(q,K,z)=>{"use strict";z.d(K,{B:()=>J});var Y=z(8674),Q=z(62459),X=z(72055),Z=z(28152);let J=class extends X.Q{};J=(0,Y.Cg)([(0,Q.EVk)("SortingAnchor",Z.Y.map,"Deprecated use BaseRenderComponent instead")],J)},53885:(q,K,z)=>{"use strict";z.d(K,{u:()=>tt});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(72055),J=z(28152);let tt=class extends Z.Q{create(){super.create(),this._updateTicker=X.Ticker.shared.add(this.gameObject.update,this.gameObject),this._groupContainer.onDestroy.addOnce((()=>{var q;null===(q=this.gameObject)||void 0===q||q.destroy()}),this)}destroy(){this._updateTicker&&this.gameObject&&this._updateTicker.remove(this.gameObject.update,this.gameObject),this._updateTicker=null,this._groupContainer.onDestroy.removeAll(this),super.destroy()}overridePIXIUpdateFunction(){}resetPIXIUpdateFunction(){}};tt=(0,Y.Cg)([(0,Q.EVk)("GroupRelay",J.Y.root)],tt)},68370:(q,K,z)=>{"use strict";z.d(K,{b:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(34829),tt=z(28152);let et=Y=class extends X.y4o{constructor(){super(...arguments),this._parentGroup=null}static make(q,K){const z=q.addComponent(Y,!1);return z._legacyTransformTarget=K,z.create(),z}create(){super.create(),this._parentGroup=Z.q.instance.game.add.group(null,`${this.GameObject.name} - LegacyTransformRelay`),this.setRootContainer(this._parentGroup),this._legacyTransformTarget&&(this.reParentLegacyTransform(),this._legacyTransformTarget.GameObject.onHierarchyChanged.add(this.reParentLegacyTransform,this,-J.s.MAX_SAFE_INTEGER))}destroy(){var q;this._legacyTransformTarget&&(this._parentGroup.removeChild(this._legacyTransformTarget.group),null===(q=this._legacyTransformTarget.GameObject)||void 0===q||q.onHierarchyChanged.remove(this.reParentLegacyTransform,this)),this._parentGroup.destroy(),super.destroy()}getDimensions(){return new X.or0(this._legacyTransformTarget.width,this._legacyTransformTarget.height)}reParentLegacyTransform(){this._parentGroup.addChild(this._legacyTransformTarget.group)}};(0,Q.Cg)([(0,X.MnK)(X.K16),(0,Q.Sn)("design:type",X.K16)],et.prototype,"_legacyTransformTarget",void 0),et=Y=(0,Q.Cg)([(0,X.EVk)("LegacyTransformRelay",tt.Y.root)],et)},73402:(q,K,z)=>{"use strict";z.d(K,{N:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(68910),J=z(28152),tt=z(53885);let et=Y=class extends X.dLy{constructor(){super(...arguments),this._displayObject=null,this._initialValues={}}get localPosition(){return this.worldPosition}set localPosition(q){this._initialValues?this._initialValues.position=q:this._displayObject.position.set(q.x,q.y)}get localScale(){return this.worldScale}set localScale(q){this._initialValues?this._initialValues.scale=q:this._displayObject.scale.set(q.x,q.y)}get localRotation(){var q,K;return null!==(K=null===(q=this._displayObject)||void 0===q?void 0:q.rotation)&&void 0!==K?K:0}set localRotation(q){this._initialValues?this._initialValues.rotation=q:this._displayObject.rotation=q}get localMatrix(){return this.worldMatrix}get worldMatrix(){var q,K;return null!==(K=null===(q=this._displayObject)||void 0===q?void 0:q.worldTransform)&&void 0!==K?K:new Z.Matrix}getReadonlyWorldMatrix(){var q,K;const z=null!==(K=null===(q=this._displayObject)||void 0===q?void 0:q.worldTransform)&&void 0!==K?K:new Z.Matrix;return new X.E1D(z.a,z.c,z.b,z.d,z.tx,z.ty)}get worldPosition(){var q,K;const z=null!==(K=null===(q=this._displayObject)||void 0===q?void 0:q.worldTransform)&&void 0!==K?K:new Z.Matrix;return new X.I9Y(z.tx,z.ty)}get worldScale(){var q,K;const z=null!==(K=null===(q=this._displayObject)||void 0===q?void 0:q.worldTransform)&&void 0!==K?K:new Z.Matrix;return new X.I9Y(z.a,z.d)}static make(q,K){const z=q.addComponent(Y,!1);return z._groupRelayComponent=K,z.create(),z}create(){super.create();const q=this._groupRelayComponent.getRootContainer();q?(this._displayObject=q,this.applyInitialValues()):this._groupRelayComponent.onRootContainerSet.addOnce((()=>{this._displayObject=this._groupRelayComponent.getRootContainer(),this.applyInitialValues()}))}applyInitialValues(){this._initialValues&&(this._initialValues.position&&this._displayObject.position.set(this._initialValues.position.x,this._initialValues.position.y),this._initialValues.scale&&this._displayObject.scale.set(this._initialValues.scale.x,this._initialValues.scale.y),void 0!==this._initialValues.rotation&&(this._displayObject.rotation=this._initialValues.rotation),this._initialValues=void 0)}recalculateWorldTransform(){const q=this._displayObject.transform._worldID;q!==this._pixiTransform._worldID&&(this._pixiTransform.worldTransform.copyFrom(this._displayObject.worldTransform),this._pixiTransform._worldID=q)}recalculateTransform(){const q=this._displayObject.transform._localID;q!==this._pixiTransform._localID&&(this._pixiTransform.localTransform.copyFrom(this._displayObject.localTransform),this._pixiTransform._localID=q)}};(0,Q.Cg)([(0,X.Pqz)(tt.u),(0,Q.Sn)("design:type",tt.u)],et.prototype,"_groupRelayComponent",void 0),et=Y=(0,Q.Cg)([(0,X.EVk)("TransformRelay",J.Y.root)],et)},65165:(q,K,z)=>{"use strict";z.d(K,{k:()=>st});var Y=z(8674),Q=z(62459),X=z(10044),Z=z(35120),J=z(77801),tt=z(28152),et=z(88060),it=z(23082);let st=class extends Q.JTX{constructor(){super(...arguments),this._tooCloseThresholdPixels=20,this.onComplete=new Q.HN0,this._alwaysCompletes=!1,this._forceLegacyPathfinding=!1}run(){var q;const K=this.GameObject.transform.worldPosition;if(!this._playerPathfinder||this._forceLegacyPathfinding)return this._tileScreen=Z.q.instance.game.state.get(it.G.TileScreen),void((null===(q=this._tileScreen)||void 0===q?void 0:q.user)&&this._tileScreen.user.setValidPath(this._tileScreen.path,K.x,K.y,(()=>this.pathCompleted())));const z=this._playerPathfinder.pathTo(K.x,K.y);if(z||this._beelineOnFailure)z||this._playerLocomotion.setPath([this._playerLocomotion.GameObject.transform.worldPosition,K]),this._playerLocomotion.onPathStart.add(this.clearPathListeners,this),this._alwaysCompletes?this._playerLocomotion.onPathEnd.add(this.ensureCompletion,this):this._playerLocomotion.onPathComplete.add(this.pathCompleted,this);else if(!z){const q=this._playerLocomotion.GameObject.transform.worldPosition,z=K;Q.cj9.distance(q.x,q.y,z.x,z.y){"use strict";z.d(K,{Z:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(95891),tt=z(35120);let et=Y=class{constructor(){var q,K,z;this._nextLimitLower=Number.MAX_SAFE_INTEGER,this._nextLimitRaise=0,this._recentFramerates=[],this._lastFramerateMeasure=0,this._fpsTimer=tt.q.instance.game.fps;const Q=tt.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("remotePlayerDisplayLimit");this._playerLimitMin=null!==(q=null==Q?void 0:Q.min)&&void 0!==q?q:Y.PLAYER_LIMIT_MIN,this._playerLimitMax=null!==(K=null==Q?void 0:Q.max)&&void 0!==K?K:Y.PLAYER_LIMIT_MAX,this._evaluateIntervalMs=null!==(z=null==Q?void 0:Q.interval)&&void 0!==z?z:Y.EVALUATE_INTERVAL_MS}init(){const q=Math.min(this._playerLimitMax,Y.INITIAL_PLAYER_LIMIT_MAX);this._currentPlayerLimit=X.cj9.clamp(Math.floor(X.cj9.mapLinear(this._fpsTimer.getAverageFramerate(),Y.INITIAL_FPS_INDICATION_MIN,Y.INITIAL_FPS_INDICATION_MAX,this._playerLimitMin,q)),this._playerLimitMin,q)}enteredZone(){this._nextLimitLower=Date.now()+Y.FPS_STABILIZATION_TIME_MS,this.resetFpsAverage()}evaluateLimit(q,K){const z=this.getFramerate(),Q=Date.now(),Z=this._currentPlayerLimit;return z=this._nextLimitLower&&(this._currentPlayerLimit=Math.max(this._playerLimitMin,Math.floor(q*z/Y.FPS_ADJUST_LOWER_THRESHOLD)),this._nextLimitLower=Q+this._evaluateIntervalMs,this._nextLimitRaise=Q+Y.PLAYER_LIMIT_LOWER_BACKOFF_MS,this.resetFpsAverage()):this._nextLimitLower=Q+this._evaluateIntervalMs,q>=this._currentPlayerLimit&&z>Y.FPS_ADJUST_UPPER_THRESHOLD&&K>q*Y.FPS_ADJUST_VISIBLE_PLAYER_RATIO&&Q>=this._nextLimitRaise&&(this._currentPlayerLimit=Math.min(this._playerLimitMax,Math.ceil(q*z/Y.FPS_ADJUST_UPPER_THRESHOLD)),this._nextLimitRaise=Q+this._evaluateIntervalMs,this.resetFpsAverage()),this._currentPlayerLimit!==Z&&X.VyI.log(`Changing player limit from ${Z} to ${this._currentPlayerLimit}. Average FPS: ${z}. Visible Players: ${K}`,X.$bb.Verbose),this._currentPlayerLimit}getFramerate(){const q=Date.now();return q>=this._lastFramerateMeasure+1e3&&(this._recentFramerates.length>=Y.FPS_AVERAGE_TIME_S&&this._recentFramerates.shift(),this._recentFramerates.push(this._fpsTimer.getFramerate()),this._averageFramerate=J.sum(this._recentFramerates)/this._recentFramerates.length,this._lastFramerateMeasure=q),this._averageFramerate}resetFpsAverage(){this._lastFramerateMeasure=Date.now(),this._recentFramerates.length=0}};et.FPS_ADJUST_LOWER_THRESHOLD=25,et.FPS_ADJUST_UPPER_THRESHOLD=40,et.FPS_ADJUST_VISIBLE_PLAYER_RATIO=.8,et.FPS_STABILIZATION_TIME_MS=2e3,et.EVALUATE_INTERVAL_MS=5e3,et.FPS_AVERAGE_TIME_S=10,et.PLAYER_LIMIT_MIN=5,et.PLAYER_LIMIT_MAX=30,et.INITIAL_FPS_INDICATION_MIN=20,et.INITIAL_FPS_INDICATION_MAX=60,et.INITIAL_PLAYER_LIMIT_MAX=30,et.PLAYER_LIMIT_LOWER_BACKOFF_MS=3e4,et=Y=(0,Q.Cg)([(0,Z.injectable)(),(0,Q.Sn)("design:paramtypes",[])],et)},65116:(q,K,z)=>{"use strict";z.d(K,{$:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(40392);let J=class extends Q.uAl{constructor(){super(...arguments),this._onAllowed=new Q.HN0}check(){const q=this.mapTag.split("-")[0];Z.i.isZoneLocked(q)?Z.i.openLockMessage(q):this._onAllowed.dispatch()}destroy(){this._onAllowed.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"mapTag",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"_onAllowed",void 0),J=(0,Y.Cg)([(0,Q.EVk)("CanTeleport",X.Y.MapTeleport)],J)},49037:(q,K,z)=>{"use strict";z.d(K,{q:()=>it});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(40392),tt=z(4631),et=z(73678);let it=class extends Q.uAl{constructor(){super(...arguments),this.mapTag="",this.goToDefaultMap=!1}teleport(){const q=X.q.instance.prodigy.world.getCurrentZone(),K=X.q.instance.prodigy.world.getZone(q||et.A_.HOUSE),z=this.mapTag.split("-")[0],Y=J.i.getZoneData(z),Q=this.goToDefaultMap?J.i.getDefaultMapForZone(Y):this.mapTag;K.handleLeaving(tt.j.teleport,(()=>X.q.instance.prodigy.world.it(Q)))}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],it.prototype,"mapTag",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],it.prototype,"goToDefaultMap",void 0),it=(0,Y.Cg)([(0,Q.EVk)("TeleportToZone",Z.Y.MapTeleport)],it)},54336:(q,K,z)=>{"use strict";z.d(K,{s:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(30488);let J=class extends Z.E{constructor(){super(...arguments),this.radius=160}containsTarget(){const q=this.GameObject.transform.worldPosition,K=this.target.transform.worldPosition,z=Q.C1c.getDistanceSq(q,K);return 0!==z&&z<=this.radius*this.radius}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"radius",void 0),J=(0,Y.Cg)([(0,Q.EVk)("CircleTrigger",X.Y.trigger)],J)},30488:(q,K,z)=>{"use strict";z.d(K,{E:()=>X});var Y=z(8674),Q=z(62459);class X extends Q.y4o{constructor(){super(...arguments),this.onEnter=new Q.HN0,this.onExit=new Q.HN0,this._isTargetInBounds=!1,this._allowTriggerOnCreate=!0}create(){var q;super.create(),!this._allowTriggerOnCreate&&(null===(q=this.target)||void 0===q?void 0:q.active)&&this.containsTarget()&&(this._isTargetInBounds=!0)}update(){var q;if(super.update(),null===(q=this.target)||void 0===q?void 0:q.active){const q=this.containsTarget();this._isTargetInBounds?q||this.onExit.dispatch(this.target.transform.worldPosition):q&&this.onEnter.dispatch(this.target.transform.worldPosition),this._isTargetInBounds=q}}destroy(){this.onEnter.dispose(),this.onExit.dispose(),super.destroy()}getDimensions(){return Q.or0.ZERO}}(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"onEnter",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],X.prototype,"onExit",void 0),(0,Y.Cg)([(0,Q.Cdj)("TriggerTarget"),(0,Y.Sn)("design:type",Q._mx)],X.prototype,"target",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],X.prototype,"_allowTriggerOnCreate",void 0)},65826:(q,K,z)=>{"use strict";z.d(K,{P:()=>Q,b:()=>rt});var Y,Q,X=z(8674),Z=z(62459),J=z(79687),tt=z(35120),et=z(73722),it=z(73797),st=z(64582),nt=z(80403),at=z(16887);!function(q){q.NotRequired="NOT_REQUIRED",q.NotRequested="NOT_REQUESTED",q.Requested="REQUESTED",q.Approved="GRANTED",q.Denied="DENIED",q.Revoked="REVOKED"}(Q||(Q={}));let rt=Y=class{get consentStatus(){return this._consentStatus}get gracePeriodDaysLeft(){if(!this._gracePeriodEndDate)return 0;const q=new Date(tt.q.instance.prodigy.timeManager.getServerTimeMs()),K=Date.UTC(q.getUTCFullYear(),q.getUTCMonth(),q.getUTCDate()),z=new Date(this._gracePeriodEndDate),Y=Date.UTC(z.getUTCFullYear(),z.getUTCMonth(),z.getUTCDate());return Math.max(0,1.1574074074074074e-8*Math.round(Y-K))}get gracePeriodMsLeft(){var q;return Math.max(0,(null!==(q=this._gracePeriodEndDate)&&void 0!==q?q:0)-Date.now())}constructor(q,K,z,Y,Q){this.onConsentStatusChange=new Z.HN0,this.onGracePeriodDaysLeftSet=new Z.HN0,this.onGracePeriodMsLeftSet=new Z.HN0,this._graphQl=q,this._localizer=K,this._segment=z,this._featureRequirements=Q,tt.q.instance.prodigy.game.broadcaster.addAppListener(it.H3.MembershipResponseReceived,this.handleMembershipChange,this),Y.getData().then((()=>this.scheduleNextFetch(0))).catch((q=>{Z.VyI.log(`Could not get geolocation while checking consent status, ${q.message}`,Z.$bb.Error),this.scheduleNextFetch(0)}))}sendConsentRequest(q){return(0,X.sH)(this,void 0,void 0,(function*(){let K;try{const z=yield this._graphQl.sendRequest(Y.SEND_CONSENT_REQUEST_MUTATION,{parentEmail:q});if(!nt.K.responseIsGraphQLError(z))return void this.setConsentStatus(Q.Requested);const X=`GRAPHQL_ERROR_${nt.K.getGraphQLErrorCode(z)}`,Z=this._localizer.getText(X);Z!==X&&(K=Z)}catch(e){Z.VyI.log(`Error sending consent request: ${Z.RQr.stringify(e)}`,Z.$bb.Error)}return Promise.reject(new Error(null!=K?K:this._localizer.getText("GRAPHQL_ERROR_DEFAULT")))}))}static getConsentStatusMessage(q){return tt.q.instance.prodigy.gameContainer.get(Z.$Bt.LocalizationService).getText(Y.CONSENT_STATUS_ACTION_MESSAGES[q])}static statusRequiresConsent(q){return[Q.NotRequested,Q.Requested].includes(q)}handleMembershipChange(q){"success"===q&&(this.setConsentStatus(Q.NotRequired),tt.q.instance.prodigy.game.broadcaster.removeAppListener(it.H3.MembershipResponseReceived,this.handleMembershipChange))}scheduleNextFetch(q=Y.STATUS_UPDATE_CHECK_INTERVAL_MS){this._fetchTimeout||("school"!==et.V.instance.selectedLocation&&this._featureRequirements.meetsRequirementsDeprecated(28)?this._fetchTimeout=window.setTimeout((()=>{this.fetchStatus().catch((q=>{Z.VyI.log(`Error fetching consent status: ${Z.RQr.stringify(q)}. Retrying.`,Z.$bb.Error),this.scheduleNextFetch()}))}),q):this.setConsentStatus(Q.NotRequired))}cancelNextFetch(){this._fetchTimeout&&(window.clearTimeout(this._fetchTimeout),this._fetchTimeout=null)}fetchStatus(){return(0,X.sH)(this,void 0,void 0,(function*(){var q,K,z,Q,X,J,tt;this._fetchTimeout=null;const et=yield this._graphQl.sendRequest(Y.CONSENT_STATUS_QUERY),it=null===(z=null===(K=null===(q=null==et?void 0:et.data)||void 0===q?void 0:q.viewer)||void 0===K?void 0:K.parentalConsent)||void 0===z?void 0:z.inGameDialogStatus,st=new Date(null===(tt=null===(J=null===(X=null===(Q=null==et?void 0:et.data)||void 0===Q?void 0:Q.viewer)||void 0===X?void 0:X.parentalConsent)||void 0===J?void 0:J.gracePeriod)||void 0===tt?void 0:tt.expiresAt).getTime();return it&&this.setConsentStatus(it),Z.Aq$.isDefined(st)&&this.setGracePeriodEndDate(st),it}))}setConsentStatus(q){switch(this._consentStatus!==q&&(this._consentStatus=q,this.onConsentStatusChange.dispatch(q)),this._consentStatus){case Q.Approved:this._segment.consent.sendFunnelAdvancedSegmentEvent(at.g.StepThree,at.f.PermissionGranted);case Q.NotRequired:case Q.NotRequested:this.cancelNextFetch();break;case Q.Requested:default:this.scheduleNextFetch()}}setGracePeriodEndDate(q){this._gracePeriodEndDate=q,this.onGracePeriodDaysLeftSet.dispatch(this.gracePeriodDaysLeft),this.onGracePeriodMsLeftSet.dispatch(this.gracePeriodMsLeft)}};rt.STATUS_UPDATE_CHECK_INTERVAL_MS=6e5,rt.CONSENT_STATUS_ACTION_MESSAGES={[Q.NotRequired]:"PARENTAL_CONSENT_NOT_REQUIRED",[Q.NotRequested]:"PARENTAL_CONSENT_NOT_REQUESTED",[Q.Requested]:"PARENTAL_CONSENT_REQUESTED",[Q.Approved]:"PARENTAL_CONSENT_APPROVED",[Q.Denied]:"",[Q.Revoked]:""},rt.CONSENT_STATUS_QUERY="\n query getParentalConsent {\n viewer {\n parentalConsent {\n inGameDialogStatus,\n gracePeriod {\n expiresAt\n }\n }\n }\n }\n ",rt.SEND_CONSENT_REQUEST_MUTATION="\n mutation createParentalConsentRequest($parentEmail: EmailAddress!) {\n createParentalConsentRequest(input: { parentEmail: $parentEmail }) {\n parentalConsentRequest {\n id\n }\n }\n }\n ",rt=Y=(0,X.Cg)([(0,J.injectable)(),(0,X.Qj)(0,(0,J.inject)("800-a786")),(0,X.Qj)(1,(0,J.inject)(Z.$Bt.LocalizationService)),(0,X.Qj)(2,(0,J.inject)("20f-5f67")),(0,X.Qj)(3,(0,J.inject)("577-9956")),(0,X.Qj)(4,(0,J.inject)("11f-118a")),(0,X.Sn)("design:paramtypes",[nt.K,Z.dTp,Function,st.O,Object])],rt)},15016:(q,K,z)=>{"use strict";z.d(K,{R:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(99625),J=z(73722),tt=z(65826);class et{showBanner(q){const K=new Q.kBN(((z,Y)=>{this.loadBanner().then((z=>{K.cancelled||!z||z.isDestroyed||q.addChild(z)})).catch((q=>{Y(q)}))}));return K}hideBanner(){this._gameObject&&(this._gameObject.destroy(),this._gameObject=null),Q.Aq$.isDefined(this._gameObjectLoadPromise)&&(this._gameObjectLoadPromise.cancel(),this._gameObjectLoadPromise=null)}getBannerGameObject(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;return null===(q=this._gameObjectLoadPromise)||void 0===q?void 0:q.promise}))}loadBanner(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(Q.Aq$.isDefined(this._gameObjectLoadPromise))return this._gameObjectLoadPromise;if("school"===J.V.instance.selectedLocation)return Promise.resolve(this._gameObject);switch(this._parentalConsentService||(this._parentalConsentService=X.q.instance.prodigy.gameContainer.get("29b-61c6")),this._parentalConsentService.consentStatus){case tt.P.NotRequired:case tt.P.Approved:return Promise.resolve(this._gameObject)}return this._gameObjectLoadPromise=X.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(Z.l.ParentalConsentBanner).then((q=>this._gameObject=q)).catch(Q.RQr.createHandler("Unable to load consent banner")),this._gameObjectLoadPromise}))}}et.HUD_RESERVE_HEIGHT=70},20597:(q,K,z)=>{"use strict";z.d(K,{B:()=>tt});var Y=z(8674),Q=z(62459),X=z(51941),Z=z(131);class J extends Z.w{constructor(){super(...arguments),this.fileExtension="petgear"}}let tt=class extends X.c{};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.tW2)("petgear"),(0,Y.Sn)("design:type",Array)],tt.prototype,"gear",void 0),tt=(0,Y.Cg)([(0,Q.WR4)(J),(0,Q.EVk)("PetGearManager",Q.YH6.animation)],tt)},32500:(q,K,z)=>{"use strict";z.d(K,{h:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this.emotes=[],this.emoteAssets=[]}postCreate(){super.postCreate(),this._playerData&&(X.q.instance.prodigy.load.assets(this.emotes,this.loadEmotes.bind(this)),this.emoteAssets&&this._playerData.isActivePlayer()&&(X.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.emotes=this.emoteAssets))}loadEmotes(){for(const q of this.emotes)if(Q.Aq$.isDefined(q)&&0!==q.length){const K=X.q.instance.game.cache.getJSON(q);K&&this.emoteAssets.push(K)}}};(0,Y.Cg)([(0,Q.Cdj)("1eb-d7b4"),(0,Y.Sn)("design:type",Object)],J.prototype,"_playerData",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.tW2)("emote"),(0,Y.Sn)("design:type",Array)],J.prototype,"emotes",void 0),J=(0,Y.Cg)([(0,Q.EVk)("EmoteManager",Z.Y.animation)],J)},62889:(q,K,z)=>{"use strict";z.d(K,{M:()=>tt});var Y=z(8674),Q=z(57975),X=z.n(Q),Z=z(62459),J=z(35120);class tt{static loadGearElementFromGuid(q){return(0,Y.sH)(this,void 0,void 0,(function*(){J.q.instance.game.cache.checkJSONKey(q)||(yield J.q.instance.prodigy.load.assetsAsPromise([q]));const K=J.q.instance.game.cache.getJSON(q);return K?Z.KDe.fromGearFile(K):(Z.RQr.createHandler(`[GearFileUtil] No content for ${q}`),null)}))}static makeGear(q,K,z){const Y=new Z.KDe;let Q=K;if(z.isDir(q)){z.readdirSync(q,!0).filter((q=>q.endsWith(".meta"))).forEach((K=>{const Q=JSON.parse(z.readFileSync(X().join(q,K)).toString());let Z=X().basename(K);Z=Z.substring(0,Z.indexOf(".")),Y.attachments.push({imageGuid:Q.guid,name:Z})}))}else{Q=`${X().join(X().dirname(K),X().basename(K).split(".")[0])}.gear`;const Z=`${q}.meta`,J=JSON.parse(z.readFileSync(Z).toString());Y.attachments.push({imageGuid:J.guid,name:"weapon"})}z.writeToPath(Q,Z.KDe.toGearFile(Y))}static generateGearHelperNode(q,K){const z=[Z._Lw.halfBlankLine()],Y=X().join(q.getAssetsPath(),K),Q=q.getChildFolders(Y,!1);let J=0,tt=0,et=0;Q.forEach((Q=>{const it=X().join(Y,Q,K),st=X().join(Y,Q,"images"),nt=q.readdirSync(it).map((q=>X().basename(q,`.${K}`))),at=q.readdirSync(st);J+=nt.length;const rt=this.findGearMissingImageFolder(nt,at,X().join(Y,Q),q,K),ot=this.findImageFolderMissingGear(nt,at,it,st,q,K);0===rt.length&&0===ot.length?z.push(Z.ly.create({id:`found-${K}-${Q}`,labelValue:`✅ Found ${nt.length} ${Q} .${K} files.`})):(0!==ot.length&&(tt+=ot.length,z.push(Z.ly.create({id:`missing-${K}-${Q}`,labelValue:`⚠️ Found ${ot.length} missing ${Q} .${K} files.`})),z.push(Z.XRp.createVertical(ot,{isCollapsible:!0,startCollapsed:!0,title:`Missing ${Q} ${K} info`}))),0!==rt.length&&(et+=rt.length,z.push(Z.ly.create({id:`missing-image-${Q}`,labelValue:`⚠️ Found ${rt.length} missing ${Q} image refs in .${K} files.`})),z.push(Z.XRp.createVertical(rt,{isCollapsible:!0,startCollapsed:!0,title:`Missing ${Q} image info`}))))}));let it="";return tt>0&&(it=` ${tt} .${K} files missing!`),et>0&&(it+=` ${et} images missing!`),it.length||(it=` ${J} .${K} files in project.`),Z.XRp.createVerticalContainer(z,{isCollapsible:!0,startCollapsed:!0,title:`Global Gears -${it}`})}static findGearMissingImageFolder(q,K,z,Y,Q){const J=[];return q.forEach((q=>{if(-1===K.indexOf(q)&&-1===K.indexOf(`${q}.png`)&&-1===K.indexOf(`${q}.svg`))J.push(Z.XRp.createHorizontal([Z.ly.create({labelValue:`Cant find image/folder for ${q}.`,id:`missing-${q}`}),Z.X9M.create({buttonText:"Open Gear Folder",id:`open-gear-${q}`,buttonIcon:Z.a2l.Gear,onClick:()=>{Y.externalOpenFolder(X().join(z,Q))}}),Z.X9M.create({buttonText:"Open Image Folder",id:`open-image-${q}`,buttonIcon:Z.a2l.Image,onClick:()=>{Y.externalOpenFolder(X().join(z,"images"))}})]));else{const K=X().join(z,Q,`${q}.${Q}`),tt=Z.KDe.fromGearFile(JSON.parse(Y.readFileSync(K).toString()));tt?tt.attachments.forEach(((Q,et)=>{!!Y.getFilePath(Q.imageGuid)||J.push(Z.XRp.createVertical([Z.ly.create({id:`missing-${q}-image-guid-${Q.name}`,labelValue:`⚠️ ${q} can't find ${Q.name} guid ${Q.imageGuid} in project`}),Z.X9M.create({buttonText:"Open Image Folder",id:`open-image-${q}`,buttonIcon:Z.a2l.Image,onClick:()=>{Y.externalOpenFolder(X().join(z,"images",q))}}),Z.X9M.create({buttonText:"Remove Gear Attachment",id:`remove-attachment-${q}`,buttonIcon:Z.a2l.Eraser,onClick:()=>{tt.attachments.splice(et,1),Y.writeToPath(K,Z.KDe.toGearFile(tt))}})]))})):J.push(Z.ly.create({id:`failed-to-load-gear-${q}`,labelValue:`⚠️ Failed to parse ${q}`}))}})),J}static findImageFolderMissingGear(q,K,z,Y,Q,J){const et=[];for(let it=0;it{Q.externalOpenFolder(q)}})])):et.push(Z.XRp.createHorizontal([Z.ly.create({id:"missing-gear-label",labelValue:`${K[it]} imageSets missing .${J}.`}),Z.X9M.create({id:"missing-gear-fix",buttonText:"Create Gear",buttonIcon:Z.a2l.Gear,onClick:()=>{const q=X().join(z,`${K[it]}.${J}`);tt.makeGear(X().join(Y,K[it]),q,Q),Q.setEditorBrowserPath(q)}})]))}return et}}},51941:(q,K,z)=>{"use strict";z.d(K,{c:()=>st});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(88818),J=z(35120),tt=z(17425),et=z(131),it=z(8900);let st=class extends Q.a5k{create(){super.create(),this.attachmentToSlotMap=new Map(Z.e9),this.slotToAttachmentMap=new Map(Z.$6),this.initialAtlasFrames=Z.yG}refresh(){const q=Object.create(null,{refresh:{get:()=>super.refresh}});return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,X;if((null===(K=this.spine)||void 0===K?void 0:K.pendingDestroy)||(null===(z=this.spine)||void 0===z?void 0:z.destroyed)){const q=null!==(X=null===(Y=this.gameObject.findComponent(Q.v2j))||void 0===Y?void 0:Y.getSpine())&&void 0!==X?X:null;if(!q)return void Q.VyI.log(`[GearManagerComponent] Spine was destroyed, and could not be found on gameobject ${this.gameObject.name}`,Q.$bb.Warning);this.spine=q}this.gear.length&&(yield this.applyGearFiles()),yield q.refresh.call(this),this.cacheCurrentAssets()}))}applyGearFiles(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.loadGearFiles(this.gear);const q=[];this.gear.forEach((K=>{if(null==K?void 0:K.length){const z=Q.W$e.instance.game.cache.getJSON(K);if(z){const Y=Q.KDe.fromGearFile(z);Y?q.push(this.addGear(Y,!1)):Q.VyI.log(`[GearManagerComponent] could not find gear element json ${K}`,Q.$bb.Warning)}}})),yield Promise.all(q)}))}cacheCurrentAssets(){tt.K.cacheAssets(J.q.instance.game,this.gear,tt.K.zoneAssetsCached),tt.K.cacheAssets(J.q.instance.game,this._allCurrentImageGuids,tt.K.zoneAssetsCached)}getSizeForAttachment(q,K){var z,Y;const Q=q.name;if(it.M.instance.faceAttachments.includes(Q))return new X.Rectangle(4*K.x,4*K.y,4*K.width,4*K.height);if(it.M.instance.eyeAttachments.includes(Q))return new X.Rectangle(4*K.x,4*K.y,4*K.width*(null!==(z=q.scaleX)&&void 0!==z?z:1),4*K.height*(null!==(Y=q.scaleY)&&void 0!==Y?Y:1));if(0===q.type){const K=q;return new X.Rectangle(K.x,K.y,K.width,K.height)}return super.getSizeForAttachment(q,K)}loadGearFiles(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=q.filter((q=>null==q?void 0:q.length));return K.every((q=>J.q.instance.game.cache.checkJSONKey(q)))?Promise.resolve():this.loadAssets(K)}))}loadImages(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return q.filter((q=>null==q?void 0:q.length)).every((q=>(null==q?void 0:q.length)&&J.q.instance.game.cache.checkImageKey(q)))?Promise.resolve():this.loadAssets(q)}))}loadAssets(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=new Q.bnh;return J.q.instance.prodigy.load.assets(q,((q,z)=>{z?K.resolve():K.reject()})),K}))}};st=(0,Y.Cg)([(0,Q.WR4)(et.w),(0,Q.EVk)("GearManager",Q.YH6.animation)],st)},131:(q,K,z)=>{"use strict";z.d(K,{w:()=>X});var Y=z(62459),Q=z(62889);class X extends Y.$KW{constructor(){super(...arguments),this.fileExtension="gear"}generate(q,K){const z=[];return z.push(Q.M.generateGearHelperNode(this._editorAPI,this.fileExtension)),z.push(Y._Lw.line()),z.push(Y.X9M.create({id:"from-current",buttonText:"Set stored gear to seen gear",buttonIcon:Y.a2l.FloppyDisk,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{gear:this._editorAPI.getComponent(this._componentGuid).gear})}})),z.push(Y.Gme.checkboxGroup({id:"autoRefresh",labelValue:"Auto Refresh",inputValue:q.autoRefresh})),z.push(Y.IqD.create({id:"gear",label:"Gear",arrayType:Y.bJb.JSONFile,value:q.gear,isReorderable:!0})),z.push(Y.NyS.create({id:"onLoadComplete",label:"On Load Complete",signalValue:q.onLoadComplete,componentGUID:this._componentGuid})),Y.XRp.createVertical(z)}}},36164:(q,K,z)=>{"use strict";z.d(K,{R:()=>Y});class Y{}Y.bootMap=[null,"9b23f418-b0f1-4caf-8d48-7747f536d843","be0532e2-6ec0-41da-bc07-a4f56e1f0a14","3b505d42-998e-404a-bda8-987150c9e5c0","f290cdd8-ce7f-4591-9891-8a1b62480ceb","88b0ee52-e5b8-481d-bc05-bcfc50138ccc","e76d1209-5de2-49e0-90bb-77631418b7f4","8291490a-2fcc-493d-90d9-1d45506c3452","01974512-4dd8-4dc5-a608-dcf1f35ad9e9","06e67157-a93f-41da-a737-4237b1f1fc40","18f3cfe9-72a5-4734-ab0e-980770cfbd07","80105eb9-8c26-4084-93e9-40436181b7d2","fdca1530-e5c4-489a-bc73-c4b725ac6c07","46cdfbd4-d8bc-460a-a104-06dbdcfa636d","fd430113-2fae-437d-9bde-df7340f9d50f","4cc687fa-7ab7-4a96-9ea0-adbee3598a1d","ac867e17-4a3b-4a15-89f0-1332375b3fcf","195c3d1e-f252-49fd-961c-a83e4ed0dced","4950fb58-7988-47a1-8375-b712f3cd60d6","f10f518e-e978-425e-b130-741f5899ed44","0aef9759-acc3-40e0-aaab-01d29347edf4","3f4ac484-e21c-4cc5-99db-c59759da61dd","6b6ad85f-05d7-4cef-886e-39fe9e4725db","fba6e2a0-2240-417f-82ba-be08a5c61ece","cc4aee55-ad28-4b6c-b7ca-8774db40aad4","703ab37e-3f42-40ce-951b-d898c8e2e9af","d5169702-eab6-4df5-a2f3-f789d63310d1","8f5e4dd3-6115-4292-b35e-986e3c96b8f3","6773c695-3b26-47b6-adbb-d93514883674","3dc1629e-1817-4bdc-a60a-0ec264f57b1e","91fe9a67-ed25-49be-a804-b1b6e5e28ec7","e2e9689c-67a8-4081-9eba-c7181549e887","24123a91-4a85-4a18-8c51-e78924d7388e","2745aefc-6a39-4143-9070-e9044f7f8f21","c4258995-bfcd-45ca-893a-fec26c3cda64","ce1b746e-ad96-47b1-86b9-6a5164702346","cbc2a038-826b-4f4a-8bf7-9f02ce158507","65a73de4-10e4-4b66-b62d-288af996a877","d5b1c815-52db-4cd4-b924-7c91296f1150",null,"185e46b4-cd22-4619-9a25-5ba13e425496","449cfff2-ded0-4f44-b030-a6e6a02f7ea8","3c679598-4717-46f5-b619-7afc6e97d4e4","584276b1-6457-4e52-8647-74b8781409e5","24e2aff7-c838-4ec4-a719-a64bef6a472b","a059c886-2117-4e52-8ef0-74f0f9b87ead","13955743-cade-4475-9c20-5dcc3c9aff9d","225f4e07-48ef-4bad-bb62-57335e94c137","a00655fc-3a2e-4774-9995-150926446ff4","d7d387d8-c986-4317-bd1d-41edc7d55b2e","05b7b955-b9c2-4243-a3be-b3c18b7212ed","7925c800-7659-4b70-9a1c-92c5f9373bb2","d71da1c3-9eb3-4d12-946c-c4a98ae9fc1d","45fcb32d-567e-4a5a-97ae-2e85d9c909f7","a9ff1de5-727c-4e34-a91e-cd1e9d200881","f89da926-e3ff-4180-bea7-272804ba85e7",null,"1ca59a0e-7bbe-4827-973f-5d7ca20ce6eb","15952221-c14d-47ea-869e-69431bbe17bb","0aeb50cf-6f43-4b99-9c51-f4ca83c4e475",null,"7dfcc871-c063-4578-b105-9128a2402725",null,null,null,null,null,null,null,"6ee2fe88-32f9-44b6-8ee0-db774ed09211",null,null,null,null,null,null,null,null,null,"3619c3ee-ae04-42ed-a420-e4925462de24","89f1ccf7-4ae6-40be-aeb2-c113d309cdda","10bbd0ab-136a-49b3-be11-f0a7adf03404","b5931c7d-f864-4333-b202-d9e135be0031","4a4892d5-7bb6-4c9f-855f-987112ad9f50","80d80b66-ead8-4a5e-93be-00398349d636","8a57f5a6-c841-495c-8784-a6f8d8ed3d7f","457d6ace-a891-4eb0-aa7a-999ea0d53d32","4898ef23-23be-4d0b-bdc7-19a82918103b","a740279d-997c-4881-a942-ed551062aa3b","cfe754e9-7450-4b46-9335-23d5cded5c98","ada44228-7f1c-4ac6-9f4d-d1debb96d3a8","f487e290-61d1-4094-9b6a-b7c12eb4fc68","f71122a0-16e5-4e59-8245-505d0cb06a8e","8e2c3891-c330-4a21-b27f-43a4329de362","4049d341-ee70-40f0-9cb0-77096a00d53c",null,null,null,null,null,null,null,"5a032a4d-b87a-46ba-9468-aea45995ca8a",null,null,"f9733b3d-c797-4506-ab02-55bc047cf743",null,"4451af13-f78a-48f0-a89d-c0766ffb24a6","22901e67-6507-49f7-ba3f-c3a3b89f0a39","489f2045-bcad-435f-9f67-5acaf75f281b",null,"0a73cdfb-aa6b-4f15-80b3-4cc25cc0c753","f9e61c40-48fc-4f3c-87d3-a6873519b94e","1c7825ef-1d0d-410a-b58c-d5d7b36febf2",null,"fab552ba-caa5-4846-b0e8-b7fa9481effc","d4c31a01-52cb-41b1-be2b-cdce89a99f0c","f76ff7a8-da83-444a-8cfb-e6bbff11428b","d937671c-78bf-4a7b-837a-12d518d0a084","d1187e0c-abf3-47e6-9c03-7fc9c744024e","af819033-d9e1-4639-961b-bd138131e021","4d8fe963-55a8-418e-b883-d544f20ba00a","22c4ea64-7d4d-4dcd-ab09-0e37b128ce42","fbbf8435-1d6d-4b4e-977c-54036903d3ed","7d7d6ac1-d363-4743-90c7-f98692991ae1","6d9a275f-0597-4c52-a431-022b2f2fde79",null,null,null,null,"ccf1752b-e743-46bd-a704-6a55c42a5187","10128200-2750-4532-aa09-95b146fbec4b","f4d514b8-344f-4742-9ae3-c7f47f560a16","18ba2923-7cf6-4bea-a333-a8a7d6a7f475","9596050d-27ba-45d9-bac9-1caafaa821a4",null,"41bf81f1-f627-4d15-bb88-0ca8ffe8f11c",null,null,"f650873d-1fcd-405b-9fa5-3d7a70ebbde6","a7280f42-f1d5-423f-8410-3ba5439fd9d6","9c803051-841f-4a17-8fef-ba11c17399e5","8deb5fe0-cffb-40b9-b08b-06160407e413","f8cb917f-1b8c-4a55-90a0-865648ff1ac3","2e69b782-0ce5-42d6-aeed-0acea3e19953","0f7cc291-2252-49e5-8640-f518ee80e286","f9ae24c1-a56a-4366-ad6a-0fc206cfefd5","55474e0d-24ee-4970-8b04-13bd7f53e335","86866bb1-9b75-4aa1-a103-ea99271ac935","9008f09c-c52e-4322-8699-c0f9678cfd20","3c27276d-5c0e-4b88-b09c-2efe11852cb7","662969bf-1777-4969-9f10-bd0e96246cfb","1593aac8-9e91-4ca0-8b09-6b32fd8cbcb6","a294cd42-bc9e-4096-806f-89f105a839e1","bebdfa20-6884-4d3d-85e3-1e8692bfb87c","8fef84f3-3261-4931-a650-5647e7bc5235","5db6f2b0-d2cd-4b27-90a3-e3c30ceed27d","be302dac-53d6-4d07-a896-d5d89b3358ac","ecbc977b-5f50-4f38-9ef3-4a2e7b4b23e3","63e0ad07-8e05-4d1e-a318-498120e68754","39e0deb3-06de-422d-840e-797466a69b14","93683764-f1d8-4b97-9e27-6bc5100969ee","f27333fe-3108-4bf5-bb36-7e5f5c0b66a4","490bc74d-4f68-4a7d-a8f7-b5f2473f04bd","6f217862-e537-4847-acd0-a3c1d1174b1f","d418593c-21de-4c1f-8d6e-2d594872a9e1","addbaed5-62af-42f4-85ff-02d0867708af","211fdc93-cf34-4857-a5af-d66f537788c8","dfcde975-952a-43fa-b31b-8f141eb1fbd0","6bdc9ff1-b357-49ee-ab6b-18908f83ce99","acc5f2fc-ea80-4e10-93d1-face68b598b3","d7c691c9-7b1f-400b-867b-629bc132acc1","34157ee5-0fbc-494c-bbf6-afe731cd8608","2b0b2208-9906-47b2-a722-f7dfeaf4388f","d647832a-bea1-4555-a266-ef32694ccf6e","0c1c54b6-65fc-4a5c-ab1c-37d83dd144bc","aa43b3ad-f7cb-4697-b251-e0f505c8c3e7","7626acfc-b8ea-4685-aa06-ddd675ed8870","ac713c01-4fa9-4654-87a7-35d98577d98c","4b04c6de-f501-4b74-8dbf-a7c49dfa105d"],Y.bootUpscaledMap=[null,"df75c613-c0af-4257-9866-07b31b617349"],Y.costumeMap=[null,"1b859ced-9819-479f-b00c-456e1009f5fc","e1fb79a2-41f1-4013-af4a-9623cf6534e9","2db0c39c-8fcc-47c1-8a60-b9b72c4d352f","967f95ef-88d3-453f-85a6-23c348c02bfa","44230432-098e-4cf4-b4d3-9efc07f1984b","058e018f-ef9c-4161-aa5b-822d9c63cfda","2daf28f9-9a6b-4db1-862e-470d6973df26"],Y.faceMap=[null,"c9061655-2a68-4dcc-8f51-549b52ee450c","6548d5d4-1a1d-46b1-80c0-8ddd094cfbea","b596337b-c25e-4966-9646-af9144c75ef0","ec08daeb-2d82-4455-ad7c-6526075c3ebf","0780a14b-b8a3-4f67-84aa-bbc248c4ea89","b648467a-2ca5-4bb3-a256-65c06cae76a5","a7fd169b-7f00-4398-b239-cab46f7258c1","ec3223d7-d4fa-469f-9b34-c20c4087715e","adb927ec-a8fc-4089-b14f-b6cf5529af42","e4e0506d-8f24-4a5f-be22-7e8366a0e211","5c046140-a88d-49ca-8fd0-56acf50d917a","a5c1fa0a-72ee-4c96-9874-188837dfae71","b2e6bbc5-16d6-46dd-9586-9ee4f801263e","1d1d53e7-1b4e-4132-9b06-714105bad06c","72c00425-a3b1-448e-a4e9-ef71512d65d3","ca919e57-7c52-4fb9-ae58-faed3d5aed16","2af0a5d4-5e39-4b34-94bf-5b9cc32a53d6","63f0d439-2017-4266-ba6e-bf80e8cfd1ad","5b45bf9f-fa1d-4964-ad7f-f43d38c81255","e174a819-fa9f-4741-8141-1b9881d6588d"],Y.faceUpscaledMap=[null,"ff6e114a-1785-4a49-826f-4befec76e513"],Y.hairMap=[null,"8dfe2b54-d037-493f-902c-057a04e26a5b","ad92f9aa-c7af-47d8-89db-a8e22761fddc","5a1df131-1f90-48ed-b44b-861bdbcf6590","e2df1d1b-cf80-4060-81d0-a69af0f08c2b","005227a0-92f9-4b97-81a2-829986b7169f","ecf27096-e440-4b17-b37e-1fa41fe5dd90","cbd74c3d-c13a-4ac9-984c-c82707f57480","afdd9023-64bb-449a-bf1e-d2ec974852d1","f1607715-b2f3-465f-a427-b39f893397b2","7955c22d-2fdc-4de6-8a19-248cfb8fbe46","f90ce3ff-bb7c-4bb2-9e13-c473415c3f8b","6e7e94f4-5d11-4dd1-9a17-7982b82967f6","2f383d1d-c118-4234-af55-2ddc883c6832","97fdaf21-1a33-44bb-8e21-371c1fcc6e64","47ef11fb-0c8c-4961-9a0c-84ce109739d3","b4ba41e3-d5aa-4b22-8d30-af393a8fa623","a01c6408-48dd-4329-8c25-9d840e05f5ee","7b5a9b30-6ceb-41ab-90a4-a5d8de4bc9c2","948b6c85-9c39-4420-8a0b-9ea63251782d","29b3828f-4ca5-4db5-8bc9-8030f563b58c","b786edff-75db-4d99-b570-2de9bfad0eec","4408cfa9-3ec7-4269-a4ea-76ef701cf012","4717c262-b4ca-406a-a440-07f67dd161a6","c6a5b2e7-b3da-44b5-9dc6-4d4ff51e9d64","e162844c-0583-45fc-ae8f-627ca85e4939","90e0d8bd-2998-4cf7-8bd9-2559a55a9d69","eb8c47a7-acea-4bbd-8bf8-211ae79f1d23","af033f6a-b785-4976-9608-7e3ba6c6e1a5","221c6e68-1184-42f8-ac35-7bef09a7f819","483e08b8-a67d-45b7-9e29-d8e350b07077","c4307640-d3ac-4ec3-8d56-c1f0ac0715a7","89fe5f36-ba13-4fbf-b266-60ddd66a3887","da1c939d-a8bf-4f79-8d94-3eadfe4ece0b","448d057b-3b71-48cb-8716-540f56050bd2","1f8293f7-e5f9-442a-8cbd-5ac9edf46317","b7a66004-d694-4dc7-be27-09c6f92cc68f","4d846387-35fd-42c2-8878-ca4e8d434b78","deb9e7b0-dc73-407e-b0a4-f91a38553760","be6e4f00-91ad-4806-86f4-bd0665c78e5a","55d76f5a-3dfd-435a-be95-6e0f860e8a71","acf32a2c-cd89-42a3-aaca-a2e075742e10","9b10f66f-bb15-4225-a495-c286df7d7f5d","2dfcbc0b-1bcf-440b-b362-1f41b0625c2b","1cbe0731-708d-4763-b98f-20e512ce6bb6","ac15c812-fc57-4701-b30b-c17789b9257a","824d20ab-7338-4e63-ba64-779470be32af","2f48a7e9-1453-4bd2-ab00-1545671ef01b","9d300b6b-9823-455a-9007-f8265178cee3","5c58c5e6-2a77-4525-9e20-76bd25d32760","c9b54217-7744-4e99-b232-e582c98ac0b3","435790eb-46d3-4603-aeea-7b171959f23e","02b3e0d3-154a-4776-961a-24f6398957b6",null,"2a044c4b-d722-48af-8add-de6cbaaa922b","7d390558-af96-46b4-8e3b-8d113331a0b8","ceb34e8c-1ed0-4c9f-b8b4-cce0d1ab37ce","916d987d-784d-459c-83bf-2abdd12832cc","94ccb602-e683-4e74-aaa3-8705b620907f","5dfba483-2538-4aab-a3ca-1bb52b0794e8"],Y.hairUpscaledMap=[null,null,null,null,null,"dc697ab7-8c53-443b-ad8f-85a30d20b89b",null,null,null,null,"e344980e-4bb5-4c14-9cbe-d401d3a3c3ce",null,null,null,null,null,null,null,null,null,"cbf3c878-db67-421a-8364-f5c44f901462",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5e303603-fefd-4b91-81c6-7655c952374f",null,null,null,"f6940105-9e08-4ac8-a05f-2bebed5ad262"],Y.hatMap=[null,"db18ca1d-53e6-4a8a-8545-d3bea48926c2","7389327d-111a-42cd-964a-5c2a569e968f","2cbf703b-46aa-4890-ac64-62cb8f6c51c1","5d62ca11-a192-4d85-b759-942b77e18774","f0a232fd-3cb2-40ff-a878-c832b5377a65","e79f6aa5-b852-490f-b834-1ca2a4e47100","274ea8c3-6505-41ad-8ccb-334f0485ffe4","d6c741bd-6101-4306-a18e-b2ea8e3d8356","553ae1fb-05e7-4f7b-80d6-f123684fb0b8","e6c0c48d-9fca-46b2-b6cb-22cddba85acb","56c93c2d-32b0-4203-9ac0-4a7493d9f97e","5b6e69df-90f0-419f-b8cc-11216d4526ae","4995fd6e-b799-4042-a721-6d69a6a8a183","d5c33d74-aa16-46d9-ac98-7dae4591d7f2","70c7725d-69df-4a1a-8842-6712c469be80","8f2b6b09-f2bc-47f3-92cd-5dd9b4c165a5","6709c737-473a-4a10-b393-38d9038e5bd4","b44de21a-3a63-471b-abfc-c5f998f97177","836eb80a-8763-4d53-813c-04823260dbe7","8943b5b5-f75e-4c8f-bd87-a113768e2c96","488ce48b-f9d2-4107-82cc-ee369bc8e52f","a4062ddf-a1cb-4b50-bc7d-93017fef885a","a633b8ce-4e0b-4da0-af22-bd79c339157c","edc129d1-aab5-46cb-9853-f87e72aee046","5c9a1881-68f0-4686-89bc-e09a8fbebc10","e9a1efb6-2f80-45a1-905c-e68c19597a57","cdcabe12-14af-474d-a8ea-7b1b0651a47c","8d0316ca-8ddb-464f-901a-3c5c081ac499","8e1e82f0-07bb-46ad-bbd5-d5469d9f8590","90a7764f-1ac5-41ac-9e8a-3ed5bf980561","3c8d2422-a591-482d-acc4-aa9f1a8292aa","f97e80f2-f911-4f16-ba82-c7e1991b74af","d959d262-f91e-4020-88f5-ec9a0e219e6d","4d174773-98e4-432c-8e53-ceba62e64911","e2ba2827-5bf1-4eb6-9d01-dc476be16f4f","4b259e15-a8dc-40a1-b269-da8f0ab9685c","9995f06f-921e-475b-9946-23b734f13fb4","2bbc6eb4-8813-4d87-859e-9d75ab9d335e","af3e7791-7bcc-4236-9ab0-0c727d2c1899","6e9c82a3-aa8b-4bff-9654-86d770f23d83","ca8507dc-df36-459c-b385-b90b967b88ee","26a71cc0-b51f-4f72-a734-bd9cc810a6ea","87c8f836-9227-401f-a208-84078b71c021","b674368f-c7ec-4c85-808b-d727a045bf3a","d15fb78f-d3f8-401e-93b3-b029344ee45f","ae9b39bc-6f8e-49ee-bea6-cdd8295fd5bc","c97cccf4-42ae-4f94-ad02-c6d9895ed58e","8a9ad6bb-d8ed-4ba8-a159-f614cd865ed3","f48cbcdf-c5ad-4c98-b6a5-6aaa2f07e91a","61decef9-d38c-4712-81c9-391679b2b553","baa6266f-d6d5-446f-b75b-e8487cf31a63","47ecec61-13f5-4e2e-a9d2-06c9958174ef","ac384de9-776d-4eb8-8f1d-8084f1a44171","fe0fa775-a9c1-41cd-873d-aa2b86b9d7ca","d638e043-1282-45e5-9e6c-4170520c62c7","e88803b0-1c89-4f8a-a3bb-936e321ec0ce","16ac5120-9d38-4688-b83c-de8d148fee49","c10e33d9-c772-4917-89bb-19a4b2df4627","f5fdaf46-fbfd-41b0-b1d9-1934962d93ce","ac09155a-685e-4b23-914f-aa2f58df51ef","6a110c0e-97b0-4819-b7c4-6f2ffb2ffe17","54165677-2bca-44ac-9dfe-42db98b3c446","7cd87b12-88c4-477e-81a8-bdb3ce708b94","1b5ec853-d63f-4371-979e-ab2595258c8c","f030353f-ebaa-44bd-90ad-cee6de61d60e","96ccb2c5-cb8d-4fce-af20-e1834fea7c09","0be6c419-5c35-48ba-8012-43cbf274f2d8","ba8197e7-91a7-4f8e-9382-cb7b929516b7","1e674199-ba8a-44ca-89ac-10862c60735a","74b76909-1a34-431c-a37e-fd206b41f6bc","aaed306d-8613-484b-9756-d60bba895782","149d2c18-f327-40e3-88d7-a1937cd85535","8d545242-598e-4a04-9e2f-6dc43c18a11e","ba713937-f5fc-4ef2-acd6-cba4ad1460e6","33b93ca1-246c-40bb-be34-99eecce5a66d","b98e4724-9312-4347-8d58-7d086e1f5447","5be7d445-a501-4ba2-8b90-5b9622872a44","36073ba5-c38e-4b68-a5d6-f45190220079","c7975916-8104-4dae-9b7c-772f8ddecd37","dddefdba-4fe3-486e-abef-12c4e3399f08","86f24c92-9565-4f07-b480-e0727e21c8f8","1970bc93-30c8-4440-b62e-7f279780609f","ce569108-dee3-464d-ac1b-251e785f1f12","5e052b7e-4d03-4fb5-966a-251a07bbf5c0","434d6799-8745-427d-9c6d-d8e18c5480b4","c2563391-4174-4bca-a43e-7e90a1a7a636","2abcc418-9d6b-4fc3-b1b1-9cc55e10c21b","e13f4f0c-2e3f-46fd-a4e8-691930fda189","040cfc7e-1ed7-48ad-90e7-68bd5078549f","53509002-1476-48d4-9bd3-077ea25fb334",null,"352241e1-c7c1-4933-b40e-b773f24694d3","1c620fa9-e932-49e0-af95-e87a53206850","f3a513be-25af-46a3-bd23-2ef1a85bf1d1","d5cc8ca3-59fa-4302-bc93-249e0ab71eef","7fcfa3b3-d007-4be1-9c6a-2251453d39b9","e888dcfe-cfef-4a46-a55b-0128944656d3","b5f4fed4-457d-4056-bd20-759a94430bac","961dc65c-e7b2-4d0e-ad97-9f17eb3fe54f","6c993978-29fa-4d64-a01f-3ee0b10d9697","83b0961a-fbf3-4488-8cbf-d8b5ad5ae5ce","4a73a58e-28a8-4993-9633-833847087365","a0b32393-62c3-4714-90d7-7c98ad8258e7","e873a633-66dc-4955-a744-6ccce63b5f38","01da1228-fb6b-41df-8333-53abf77d2c16","fb099962-6b51-4b19-b1a9-41aca1823e73","c28c7c97-b9d2-49eb-b3e7-11345dc1cd77","582a395d-7e25-4916-86d0-2768a3dc7bad","3734c3b3-3991-4837-ba8a-66abfbd1cc34","e05220f7-8c8c-412c-99f3-0275113f8286","085ac0a5-7c07-4311-a181-f8910812bd10","34dbb94b-384e-4eaf-bb33-87bde2b66a9e","bbcaeac7-449c-4efa-8267-28a7097b4284","06b35e5d-13b4-4781-86d5-27d737735cb7","2783e01e-9819-4626-87e7-3d61fb3b712f","c2e91dc6-6099-4757-bd58-2f1ec492126d","e0ed3992-4b81-48bf-ba9f-6ed36a0dd3eb","b75dd2a1-e4a9-48a8-81eb-e1a49ba4f0ae","909d5b14-feb3-4696-8544-d86fd5e70128","73a992ad-d68b-4686-a12f-b09a37261626","d48d6d62-bbf3-4f1e-aa5b-84e09ac7913a","2d1eb47b-9c29-4c79-ae85-7ab56a7fc4fc","baac1bb4-cde0-4467-b71e-af725852309d","07e8d944-e5d9-4f0d-b0d6-385d8783175f","719835ce-5602-40d4-b5d2-fe6ba7c3d5ce","41c6b986-c80b-4977-83ef-8e89b9dfcb8c","365c2e7a-a710-4b75-a543-034fad76414f","105e6b8a-4ab2-4ea0-9421-cbc9a93d98db","557ad5ef-2b25-4e90-9e94-ffe01b33e0a4","e4daf0d8-7045-4c9c-ae07-2d31a884113f","f7a68408-101b-4095-9c01-9564fd3e687b","ae4bd80c-45f0-4cab-bdbf-ff39ef7a6d6b","58e3ebda-8e5e-43d5-92a8-e590da8e8415","d33ce612-2630-408f-b44c-74c0faf9f118","bb9e4294-ad13-4abc-af4f-dacf49fed9bd","07bff02f-cb9f-4acc-808c-32ff4fd4ea71","5c338ab0-f163-4315-bcdc-fd35d8059532","47a0fc8c-9a54-4b29-bbd8-275b27b026e1","b7ea522e-a5b2-4419-acd2-c83d03fc4761","8889582d-3ef1-4024-bd56-eb043d18e9ff","4eb906fe-33d9-4a56-9f09-bfa141bad1f1","debd58c4-1f8f-46be-9c9f-173114f8c9fa","811e5f51-6d5b-4104-b6e1-3ac4e97f485f","e03e9f72-e4d6-40a2-8c05-5de72ea70b70","6798ed67-ac2e-48d5-916b-467d4616e7cd","bfb5d764-e0b6-46c8-ac5e-058b0dc8295c","8d8c0e92-1697-4aff-869b-33c3a44b6fa4","1ab04d26-abff-4483-9ef3-45c9f7719d77","cb6bc2a1-d540-44b1-82d9-6d0ec59ed5f3","93b50095-4b55-4d31-a562-b969b8c099cd",null,"b69c63bc-ad58-4809-9308-a8897b07edb1","05460579-d75a-4adc-b178-53076466077e","046fb18b-fbcc-4dd4-b2b6-f176a13a2581","f0b0ad7f-7a8c-46b5-8782-2cc5dcb7110f","fa8f0633-6609-4a8a-900d-438bdf6df746","04a0f4ef-794c-4b0a-ba08-130e4fbace47","293e3ab4-1265-4519-82e1-e51db758dcf2",null,null,"69d681ad-a8eb-4a3e-b9a0-a7bb578ea52a","cfae53e8-ddd2-4677-ab95-289669adeb2f","7762d8b4-5299-43f8-982c-ffce8f3395ee","9103a474-2aa7-4469-b4e5-502eb1c9979a","9a1f2f8e-a101-4648-9455-18c35fe3bfc1","111d1631-4578-4971-90c5-a198df832a3e","f001779c-42c8-43e3-8cf1-f6f33deb2571",null,null,null,"19a7f114-b128-484c-be67-78baf5c87106","2490f3ed-105a-49ce-a630-11ee6912ad67","438508ec-4811-4b9e-8d92-ab18ff776057","d16b3091-a6fd-4b00-8e41-02ffef728d85","16525015-c413-465e-86be-ddfbcbe5aafa","587a9c09-e48a-4c79-ba38-3c16f1b14525","40dc3406-4921-4f9e-ab27-db6e5113ef1d","3732bfda-d9f6-4e23-bf57-faf381ce7ebb",null,"d6c9e03d-88aa-44f1-8f7e-16e29d705769","fadec8f3-03a0-456e-819d-363111004604",null,null,"26acfb4f-6ee1-40cc-8697-50660e8dd7c2","d5d8f2f4-e1fe-4068-9a76-60d508d436dc","e380813a-b1c7-431c-bc0f-408a38853cf9","93e160c7-43a9-42c7-99a0-13c16efeb5f9","ffd9d964-94cf-4773-acc1-cfdb2c160957","568ea19c-6bfd-44c2-949d-459b1ce05df9","9c073a11-bfb1-46b6-98c2-64e9ff15cfa5","e9d4cace-4382-482c-9c61-8ae18d1faa73","a4fca37c-c275-4571-a4e7-e91ddf8c7d97","d7f3aa1c-3a4b-4ea5-83a9-aafecad2dd98","643bf355-1bf2-45b7-a1dd-b45c6e8b9d03","c1e44c39-b32c-42aa-9703-7e0727e6e61f","44da787d-da3d-4c30-9e29-e8f75c73ab99","f6ba2fd0-5c4a-4653-96f9-138374246627","0b997443-48b3-4d55-bce0-2ebb35ad5c59","7e62e5e7-671e-4bbc-af8f-b906c856a4fa","3e1fe707-42e9-4a72-9085-62fb1725b7da","49eb9679-c7ed-4c2d-b677-4f0f17f84f83","127c2fca-9e6f-404e-8f80-59fc7338d686","a5320ea3-5d5b-40c4-9fc5-4a063d65c849","63d5ebb9-8549-42a2-bd91-0e708c565732","e49a8607-d251-4774-83f8-a6f44bb58741","53fed226-8b66-4e12-9a2f-d295c9a04b42","0ce0a471-6eb3-4043-8591-79c59bcefd2d","883c760a-5c0d-4a7c-bbc8-bc90c19d8bab","0744229c-02c8-4d0e-8af5-3a459f9ccc91","0c2c2c13-d502-45f9-9d95-a061be67d8ad","e257d9a6-3d21-45cf-8f5b-f8ae5493a5a8","c9dfe5de-a3e6-4810-b736-e67bdc5a1384","0c72006a-14ed-4b9e-9e11-253f60642ff0","359d792c-2c42-4e62-822d-73b952adb182","b7ba9461-7613-40fa-bb2c-6e1b7a8d1df5","8a34694a-ac36-4d82-8dad-4ccb5b983186","cf32cccb-2858-4a1c-ac2f-18569a9e4306","1f0330fa-2405-4852-8177-87934bbf3d8b","f0ad7f21-c598-4bc2-b219-9aa70f950909","b4e3cf67-15c5-4042-805c-89ab90e8f2d3","d7fa9700-8146-4336-a320-eca13ea59695","5425e2ad-8f30-429d-83e2-cecce4c5c95b","d73c17cb-bc65-4376-ab61-1a1485eeac49","2f8f136c-93a2-46a3-bf37-c2e4a92d2c0a",null,"3252876b-b451-4429-9ae7-1df419d4526a","1d0a0f67-9760-42cf-b11a-fff7f163030b","ca5a2e59-2967-45f6-854a-8aef4ef41fdd","360db781-a14d-4373-88a0-4292f51a75f3","4157f181-25a5-4dec-986f-d179606403c2","5af849b4-b957-49d7-8774-31b66d85c55f","924e9719-aa02-478e-aa1d-fb54fed5ef36","f7568327-245c-4582-b9f5-c582843ad913","ccf2b938-0e80-46e9-82cd-6ec4648d18b0","0bbcdd4f-fafd-4de9-aaf7-1dc39e2c09d1","cb6a471f-0a5a-4987-b3dd-8b7f5e926d1a","ab229c23-8823-401d-a931-962349d4558c","7a4855f6-3a44-4e2c-b46f-0317370a6dca","8cd6fd61-702c-43f6-8f93-30b2fc125c51","7b4e5b09-9f30-42db-9225-72e00fb67b78",null,"211ae5b2-96f2-49db-8c55-3a66cdfdc452","2cb4706c-43c6-48f2-b10d-5938f4216404","071dc712-e5a7-45fa-8796-341a80458bdf","1970cf63-c86d-4325-8f46-d63adc63f4b9","4cd4d7b8-7a5d-4e9c-89f4-e895025e0079","fd6f1194-3311-41da-9319-6cbcef174558","44374320-2a8a-4814-965f-aba11ec0ae61","dad45f9d-3ed7-40ec-9494-cf5c7930f77b","e2344933-24bf-4ddd-b807-5185d6b89758","dd493f01-a5a3-4482-b95e-0e91f2e1d4d1","311805eb-33f1-4979-9fd2-ad7172fa9676","6eff9aff-7346-4d07-80f7-b1eca5f1d5a3","3c46ef52-1f62-432e-bed7-038be1e9348a",null,"c1be3e04-891b-4da9-9619-cb40edfd27cc","10c7dc75-0f91-40a5-8ac4-a773f7af6dcb","212e27aa-debc-428d-865e-82ecad51315c","5a909a6f-1827-4945-82ea-b7b08cd7b43f","15d7adff-1ec2-44ac-9ae9-279c9c327e35","a2b61f5d-997c-4205-a58e-2e6b43544fa5","772818ff-8adb-4065-88e6-b8a6e4455501","2120c898-697c-42bc-a60d-d5c5d098b9b3","e0354f34-4ab3-40e0-b8e0-0d8100c38211","67688885-c5f7-4035-bab9-b575ebe09f3f","0899df99-ef8d-4a16-9681-99ebaaacb655","3692b02a-33e0-4a30-8a56-96fb642d9044","9225a03b-1bd2-4fb5-961b-8bd437370a74","4e672ea2-101c-4796-bbd2-54ef20275272","1265fb74-8450-4138-82e0-7c9f64ac19a2","22451af7-8059-47cb-92d0-bfde76bdf5f6","32c020db-8d57-4d8f-82b3-e8acf9913602","0e8b6ce2-223c-4623-9cc9-2faef9e2fcac","1149be1b-15f3-45cf-80e3-40c7b8d6ceae","e7e205fe-63c7-4d8e-bea6-f7bcb3c9df1a",null,"b0f62f7e-f6e0-4ee6-93b2-97243d1ddf88","2e7f0886-c916-42dd-b8e3-a05be0a50d9b","2d9d6419-76ec-466d-88ab-a018cb17a8d6","b72760ce-507e-4040-8839-33cd342b6560","80c9d8b5-bf88-48c5-86c7-f595ce70a542","8e191019-600f-418a-bc79-a2858b06e1da","79db3189-317d-439b-b622-aa626f9a7999","7e313a10-bed2-45e3-9325-88feb9020b84","dfc5eccf-e77c-4967-b690-2757e4fcd1ee"],Y.hatUpscaledMap=[null,"3a2e9ab6-5a35-4f96-b404-38553c933b86",null,null,null,null,null,null,null,null,null,null,"7bec0f43-4ec3-48ba-9d1f-113189021896"],Y.outfitMap=[null,"edd10623-53df-40fd-ad77-2f43d8e8481f","a64512d6-efc2-4111-b8fc-b343e6e91d54","098d0ae8-673d-4650-96bd-5e67976480a9","ca45da21-9914-46f7-ba4f-7dd646c4f47c","80a34e92-7fe7-4861-9967-0daf7cc9a181","88a284ff-a51f-4b85-80b5-08f6acb5b11b","f35ef825-5197-48b8-b4cf-1222a39d1263","9ce0daff-43ee-4ca3-b3e2-eea271ce998b","9e3ae004-cb14-466a-a2d3-eaeed5897822","88c9f6c2-e0aa-437a-97a8-0119ac878d2c","3afc0327-f1e8-461f-bb0a-d5d3eb227e79","8aa00362-959f-47b0-a482-efa991e87e39","034afba6-c852-456f-9c8a-4af1d8dffb18","959f5456-f022-42c6-b23f-24a2b19c9733","5b3b6fc4-4d58-41ec-8e3b-f8b236365a27","331f4f97-9623-4680-80c7-ce6c26cca185","67d638fc-b82f-4509-a75c-7251ac55f2ec","f258b6f0-9db3-4eb3-97ac-e6c7cfb0b902","37fdab08-2e11-4bfd-ae6a-aadf88791d30","5bf0249d-d700-45cd-8591-2cb8c4b8d885","20999087-d202-48e8-9944-f15ca294cd47","c9c85cbc-6c4a-41d2-83d4-fd312d7f9819","0a534c5e-d2d2-4a8b-bb19-e4e02febb1b3","34d287b6-29e6-4c47-80c7-170f174a8c07","c70524ab-bd03-4da9-8166-6fcd0b21735c","54d2f338-ab52-4360-a590-1bdc38445d1b","45e873c0-b9f4-4cdf-a017-c69dd4040229","9bbf3785-85dc-465d-974e-a3a91ee54582","5c35e250-ab4b-4f97-990a-71c541d79e2a","be14e0dd-8ea7-4d06-9c97-349f8098fff8","487fc777-435f-4b7a-98e6-620bcf22b6e4","6fedbc84-6025-4a3f-86b8-814249542c3a","c688c70d-a83b-4361-89a5-7f519cc8a090","3d5f2771-a0b3-4c96-a8f9-2a3a0cf9c1b8","90eea86d-d1be-4a95-8662-f75a9eea9e7d","c7ead47c-6c94-437c-b1f6-408e68a8a010","be4582e4-72fd-4dcd-877a-a552174aa65b","eb48891b-6688-43a4-816e-9af886723f52","0479f791-fd55-4796-ad12-24980ad054bd","1cf13d81-8032-4e5b-b9df-932d68af4552","3720b757-1f39-4ce5-b380-1ba0ffedbfb0","8e22738d-2f75-44a4-a9a3-362b7d43fb3f","326c15ab-64d1-4d90-86ef-51a027e00b4f","a4584d7d-26aa-47ae-bc74-c6087f6e10c0","b5115dbd-2ebd-4791-98ab-1d27c12d5b61","ec7e67dc-940e-48bf-ae94-41f4a4a22599","9ca421b8-7051-47c2-bfe7-f9ae51ebf206","48db52c4-cc71-4397-9103-7dca73c23742","f80d77b4-9296-49e6-b8b9-75c44e6ad25b","b0aabf10-f476-4203-a1c4-fb9acc0ce796","ac78daf8-22b3-43d0-b96c-8acbc579d52f","68fb51e0-d96a-46e0-bedd-87d7a0bb342a","3aa5af5b-5f6e-4a0a-b996-9cd4252cfbfd","2189afd5-57e9-432f-b682-3a9994cf2961","5e5b6236-78d9-4746-bcf7-f030b6b38cde","aea7833c-ec4b-4dc0-b32d-3dc0f8a52892","cc2003b5-f1ef-49f5-a573-c9179d03aa9b","24036ed0-89c0-4391-9123-5e9f8da88632","c07c87a9-562b-41e8-843d-52c401925d53","995d7c84-365f-4d2b-801c-7e9233cc0ee9","355596ad-7eb6-4246-8aac-20eece07eab7","3471fe3b-9c0f-4d91-b2ee-61de014f1657","4aa7b98c-8d6b-48de-909d-e73060d020d7","7c9972cf-9613-4ff4-b857-a79291b10e22","922567e4-5642-464f-9e7d-d8f145cc1352","3cb5fcba-1fff-4b05-ad3a-02d66059d119","2f2ca3d3-3418-4c21-b818-908b2a272b10","cb50c28c-90ee-43b7-8899-2cf9381292ed",null,null,null,"7a9275a3-9a6c-4a0c-833c-e5db4feee992","1774d42f-ed93-47dc-b489-6a768c6acd8a","9a1e04d8-3791-45c3-8dff-3f37e3000d48","3230bba4-3bf8-4d46-9370-e918ac4d04c9","a11d2ddf-d43f-4bb8-96da-38cb8aa1de65",null,"3fd3cec7-49f9-4417-b5f0-07ab3fe02e5b","af1ac1e7-fcd3-4f52-9f4a-68415622b514","3180fa94-710b-455e-abcd-0380d25186aa","f8fdd0d1-9a43-4dc0-b0e1-f5e424bbd2d7","de2e62a3-3804-4750-8ee3-527e4454b651","d560ffe9-3ee5-46c5-8f9f-41604cc596ad","baa36927-1ce6-4c84-88de-bf888d4d720a","fa8386d0-7b28-4765-a20d-07e1e75909a6","ab9fd7b4-54c8-413b-87d1-ab96e2108c83","9ca15b96-9079-4804-9c23-d2caeef42e5e","5951bc4e-3ef6-446d-b6fb-d920a8bddac8","964ed978-1567-43b0-aa5f-a8f51244eb6c","fa3d7607-30bc-4dcc-8824-ddc8603523a5","7b04738c-8881-481c-b95d-7cfb09b72dfc","e6f88b68-8939-420d-ab31-f0c2db0bf5b1","ad0cb732-d166-4a4a-9957-9ec0791e91af","580ab5e7-de69-42ee-aa70-a25581ae0629","d6e41a25-0ec5-4d9d-8b70-1d8c19c8af2f","269d67cc-fa28-4a8a-a71c-9278666ddc36","a6e98a32-e3a6-40d2-8a59-e91a9739ef98","e8830e01-92c7-4b45-83cc-1e7f310b453f","9f811740-a6ec-4acf-a294-e352f2445f06",null,"7909c471-040a-4e1e-a856-6128aba020a1","47ae845a-0e29-4b83-936f-544fc678f937","f22e0aa7-ca49-4350-a96b-40390999dfb6","fef9be16-d26b-4082-b952-cae8672713e0","3d23e05c-6262-4199-bcd0-249f704050dc","f398272a-4a99-4e78-ab5a-97d503b9ed90","62e479bc-d643-465e-b822-5bc92dcef8a4","cc5e532f-dc3b-4d64-b5ab-e9fb66876fa5","2bb0f757-950d-43ea-afd0-5cff16cbb73a","688a8899-0efc-4fa9-985c-ba2ecb9fbd4d","5999ab47-c666-4158-8a75-ae15ec312e75","2bf5d6b0-fd7a-4c13-8707-3b455326a9d8","777fdcad-abad-4d90-abba-76ea209b427c","a0c469de-c0c4-4db6-9962-16b4ecb27ff8","d963d0aa-3ebc-40a5-9cd0-73d17923f394","58b98e92-c091-41db-9917-198fe03913ed","f4989e1d-8a4c-46e5-94b0-2e184f0c4ebd",null,null,null,null,"bd659cfd-b96e-4d28-bde4-f4e20225d80e","24d49340-553c-451e-a0a5-d92bf29e5aba","f4a46535-92cb-490a-86a5-52e459792ac4","4d89f45a-cfd3-4837-a117-d2754b785f13","e958a21d-134b-4208-8a84-d903ef8dfa59",null,"67a8386c-4dd9-489c-80ca-23ee20add54c","edc207f2-6fb0-49c7-a5bf-45d0761188bf","53dec287-351d-4412-87b3-e3dbea73a1e5","bbca3517-04cb-4d1a-a01a-a3516f990620","e90b12b4-6bff-4006-a3de-a8bcd6941886",null,null,null,"55e273ce-d8f4-42d5-a542-aba094b9b91e","d16b3719-af8b-4123-b707-ffffc81dea41","f8ee42ec-911b-4395-b0ad-dd3ba4f9e2ce","3e5f47e3-4ced-4773-a00c-9ac6ce718daf","6c12d23a-02c2-40bb-82f1-88da0ba26586","ab1f6d33-b494-43ff-9a69-4151b932d518","32009ac1-e055-48ed-8ed4-dd0967aa4e8d","24022d2c-4353-43e1-a8e5-869a0f127071","83dbbd6f-970b-48f7-8403-ad01b0d7c32c","9da8cf5b-0c34-4517-b286-47ccefaf1781","34e9fe75-ab9a-43f1-8944-dc595803e7c8","de220f46-652b-4b1b-95c0-db82152912cf","1301ce98-e99d-450d-b717-51b96fc9c79b","afc994cc-0903-4f92-b138-e6c47056c41e","c058bf9b-d94a-4f0c-944b-8454c343b4f6","a0a999ac-9f78-4433-8bd4-d73062a44c1a","2791ca02-1502-496d-8af8-abc0891393ac","fa921c03-a953-4cd3-9b30-be07d8fbf734","bf281071-65c2-4c94-af4c-cf0b709e3cb9","d7650f98-48f0-4513-91c8-efc9265e265c","3a24b217-b0bb-4f24-8c81-c6b5e1aca834","875d0393-d21d-40cb-8054-5b2e5a450b96","f0ebedfc-7765-47f5-bc14-b15fe987b736","578a45e6-1bbd-48fd-9561-900faa3537fe","0f7f65d4-bf53-4f78-963c-f338cfe6b8ca","84fdc403-f0ac-4e7d-81a9-e2d887c1ac37","54029518-1634-4d54-9f90-76de697e196b","ab257659-3c39-445b-9221-0b38d35247fd","ac1c17c2-9c1e-45a8-9f55-50d3d54ac83d","b9a95efc-845f-4cc5-9610-ef7bdb9b5cc8","8201b178-aa26-401f-84e5-f1589814f7fc","78f25e89-7615-49e1-b2b4-7b44aea8683d","13ecd25c-8da4-41ef-8b57-2ceac6b9e8bb","74af95ac-2175-4a24-b78b-ca14edbfd517","d107ac84-013a-4c2a-b6bc-693d6c824dbc","ba2e0fd3-a8d5-4aec-8ed8-c7454f64d2a2","7837b8d0-f2c0-4777-b19c-4e5a478243d2","f3f9b5e2-a951-4b94-8f46-9277591f9875","ec0ad977-f8f1-4228-8d1c-c0185b3af278","165b81ac-a0d7-4325-be81-60c59b012879","d399c720-1e0d-4aee-9903-f1ee4d319aef","c6e4a6f1-d5a4-4fdd-8353-ab86e688358c","cedab087-38f5-433d-b0bf-74bebab4f1ee","383d3e35-5f78-4531-9be4-843baed472ef","d04ce7f3-c9e6-40ee-bab1-93c6365ee162",null,"77e1b710-ac30-40b4-aa36-3c9bbfe57590","5ac73c62-eabb-4ec5-80dc-4f1f964c2f73","fc853655-7fff-412d-89a6-ff8092a5267e","c20852b3-59b8-4338-9084-208bf79e102d","036e72e2-1138-459f-8a98-77eb42eb383d","5ef7e4d2-223c-4ca8-abce-775f7b8c5eb0","5cda9a33-1085-41ea-9bd7-ccef7af83f62","6f6caa11-ad3c-4f66-befd-9a1a09ceab46","57f695a0-ee64-455b-ae26-01cde6907c62","3328bdc0-8091-443c-aa38-303121eeba0f","b8715c07-43a3-46c3-a65c-e7e23ba5d189","5db0d9bf-85e7-411b-83df-0fe6285ec8cf","879e5476-1691-4272-aa14-5e275af924a4",null,"a6eb434b-f2c0-4b73-8883-7d600e0ad4bb","6a08af56-02ba-41eb-9629-5d3f09675caf","13a9ca5c-78d1-49bd-85de-17b1cb646470",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3643c343-da18-4075-9e83-b21ed7703779","dcc94e6b-c8fb-4013-ad0d-40638fb7482f","63df99c6-9836-4d63-aedb-425687d44f71","16f9203d-1b03-4459-8060-98d1173a7ccf","864adf8b-dcaa-4e63-b431-37fccb0ecbb4","da72a99a-afc3-4a6e-a81d-75b9bc994089","ac33e829-2af5-4695-998c-8a25b83223df","3f76c7b5-f204-4a13-8816-43ea38e744b7","b53585e4-1383-431a-bee9-c2e8c724f523","61b96a3b-7cc9-4ca0-83ad-f53385e1ae1c","f88298fd-f572-4d23-ad17-8b67e8d29c3e","f2ae57ed-0502-4568-94c2-0303d3ea8d99","a431f88b-6500-4d77-b66f-97d451fed345","ffcd9e53-617c-4af6-8e17-a6e71f561131","de7e22fc-0604-453f-b1dd-29e6a5feaf7a","f59f5f0f-d730-4d71-96b4-cd3e71280f80","40b251a8-b289-4f5c-a4ed-a649ecb986d0","17ed2b86-3782-4290-9b3b-353964a07a2c","f59a68d1-74cb-42ee-a23d-3cb0aae637fb","0b700fd0-7714-4c29-9cfd-5ec202aa8fbc","443c5cd7-cd19-4c5e-a45b-74b4bf1dac5b","bb097a76-4d53-4293-84f9-5bc13979ca9d","69037be9-698e-477d-9b49-bb0cb07a4050","314cd99c-55d0-4506-9d41-3afc98ebbc01","8f06a4e3-a7f4-46b5-9aa5-37a243d541a4","9696cde2-bf4a-4fbf-a999-3e47a1dfd209","0d3d6329-18dc-4299-88e1-1a97b228187f","ac61b46f-ed19-435e-ae09-574c6f467c75","54f45e0f-399e-43e6-b0bf-684b7ea1c38c","34852ebc-0fd9-40a0-8816-96d4de885c7b","55ce92a6-faca-4212-ad2e-931ae85b8eaf","9a2f8617-ed56-4093-b60b-c882d15549d7","8907027e-edc2-4084-8660-ad66b3ebf69e","9460c4e0-3e19-4022-af69-fd1947aa882f","2d7b9632-f144-4662-bb71-347a1b1812d1","7a0f25ce-8b6b-4cad-8ebc-6745be931582"],Y.outfitUpscaledMap=[null,"3f05fb83-d48e-4b42-bd76-494872e92a2b"],Y.weaponMap=[null,"11878a2e-0c68-4cb5-a548-8e7cef3e679c","7dad9b15-4d35-4f3e-98f8-5cdc6bd88b95","595043fa-50f9-4b1b-b38d-ed87cfebeece","af5e6ff2-830d-4e8d-bb20-9a100a740860","53e0a07b-f911-4701-b006-3445483f6d7a","ab5c3b87-a0aa-4e4c-8a1b-700068cb7ec0","812046bb-02cf-4e18-8315-e98f2a97b8fa","e95b3e46-b73a-43a7-816f-0d6cfe1d39ed","1b44276e-a25f-48f1-b59a-a872643da288","533a42de-6948-422e-9327-84a28a962105","ce880839-d88a-4c15-8ef9-936ba6a1c0f2","87508d36-fdde-4493-8b9a-20069fffe302","71c93c49-9591-465d-841d-4c5897edc11b","eb66feb0-cbbe-426a-8bf4-21711b9dee1e","179729af-0e7b-4e09-b342-8d6bea1891f3","62f6f1f7-ebc0-4486-9ec7-52096c770106","900412e2-b85f-435c-85e1-aeab7a05aadb","f90a4c4d-6b49-41eb-a1d6-bf0184671cdc","c408634f-f116-45f8-8050-c6ae7631b333","90cd1579-529d-4533-abb7-bb48b60895be","6fba4fe4-5d9a-43d3-b7c8-d0a9680f9164","2a078d77-bb0f-4feb-b0ff-62d23108f6df","cb16fc74-7ac8-4792-9f56-2f9c00d3f42f","b0978c92-479c-47d2-9ee8-fbb6439a7b44","14ce706d-2296-42fb-ac96-1dbee2da12b8","42af54fd-81ac-48c0-b2af-08adf032b30d","4770f842-a01a-465e-95cd-c3de8256c6cc","1272cbbc-df16-4dbc-b054-484ee6965c94","47bbc901-5fbc-4105-a84d-3ed4f32ce647","a475f844-a67d-4d75-9f26-48628ddccc82","0dcd2f4b-eca1-4371-9c3c-e21820d980b2","728e51d5-178f-45fa-b00b-5dc90dc3395d","d4cdc841-6cf2-439b-be68-e8154add9619","2053dbdc-b9af-4170-b18a-2db791378813","16026e9b-7de1-4851-8b7c-c505937285bc","0e340e59-57d0-498a-b695-ae7626b8fba5","0ce2b425-b2af-4d4b-8b48-d57b0a3eee8f","653810ae-e7fa-4609-b728-799f26e14df5","90cec00f-4b7c-4436-a39b-1a51b69ea02f","bcbffdcd-97e7-41fc-9ad9-33cc1e93c4ec","d68a66b9-8ec5-424d-831f-541271f0121e","71ce696a-7db8-4774-bea5-13b6986ce12a","4c604b18-6db1-4329-ab60-f23d28139b49","a086442d-0570-4f62-a338-3e79f9ae81b0","7f761da7-1094-40e8-a1ae-d352bbc1bf39","c492dcea-1f39-4872-aa0e-f70ae11af14a","b8eb95d7-68c6-4192-9c87-a8148278f3c0","897533de-e2c1-4ac1-8ada-1efd1b0d7354","4ceb1c65-643a-4517-88fd-ed93f0f2402e","e76e24fe-cd41-4b7e-861e-6bb6adb31d40","b3293c7e-1668-41d4-97b4-272f3bcdc5a6","f39378e8-adb3-45b8-8d9c-10cc83096818","6bec7e66-f724-452b-95c5-6b4358bb65b7","c9cfd49c-10be-46b4-965f-6a98dbfc0106","f40220dc-2783-4b16-b94a-3b7485c8d510","47ab1796-e337-4bda-ad70-266e6c1a8026","7a79766e-0ddf-418d-80d8-b78443fd6c20","a226fb36-408b-4904-92f2-5b9b146c0879","81c8c4b1-fdea-43e0-b12c-437df05087ef","196b257d-2ad6-4d13-aa18-c7da92eb4d8f","1f255cc0-ffcc-4e6d-83b4-be54c9d2e039","cd30d9ea-1b42-4d78-a6e4-6d8d15c5757e","23ec66bb-bac5-4884-aa35-65eb3d40450d","400eb6ff-72ca-4825-a576-5f014549c8ad","25148d72-ba48-458e-a4e0-01450161ee28","c9f237a1-e8cc-492c-8737-3605bcc02258","bcb391fe-1a92-452c-9b0f-e360fdbd45ff","4d6d28e1-dddd-4bad-bb52-436dda18fffb","d08769d6-ab31-4541-8c7a-b2fd3a71beec","f940d04f-f293-4bf1-9fdc-3936011d2435","3ac421e2-bff3-4164-895d-39873a9a186d","0c5dddfe-0eb0-4ba0-a2b7-bf1bf11a0264","cd814a09-8808-42cf-92f5-b266a979058e","353652d4-1c7d-45ca-a785-1ef252d597bc","f78ecfe2-2152-44f1-b242-ed71d10d86a3","0941c73c-ebb2-46cf-92b0-20c1da439dd8","e7e73593-49b2-4184-ac58-0d62c1ab1cf6","c298f21c-e8bf-4754-b61e-645537f5b156","51115c6b-9093-4cf4-a67f-84cbd6b00362","bc7da8c5-00dd-41f1-a48f-6b87eb3aed3b","3ed99de2-db84-473c-9549-509cbf7e02f7","bd6945c1-1bc5-46b1-9148-46f3cad35734","9ac0240d-d57c-411a-a970-01a5a009fec9","1bb66c9c-998a-45a1-9595-90c9919cbb28","e2443c0a-ee06-4e91-af53-ec2531c82c5a","af417a05-7308-452a-9897-ee459a1eaebf","437d5d0c-9c59-4815-b4c0-07e84bbda1e2","3a4295de-5a93-48ce-b465-a7b680635d90","3cd2b9c5-e2f8-45a8-8613-dff6dfed75b5","10c2ee66-aeb1-44e6-b678-8cff79cfeadd","f872b493-61aa-4fe7-9027-32093be30340","17984954-a491-4eb6-89e1-2a2943435ea9","b70e8bfb-e85a-4f08-8b99-322bc1f95c46","5d762252-e5bd-41b6-b696-6949ea90af47","1395d0d5-8b14-45d9-bf5f-1e64dbf04674","a0bbe93a-31e7-4101-bd9c-7c84c9684644","dcfc5c6a-04f9-4bb8-870a-cbb20995bf4c","71298639-a8d2-4c21-b170-ae75f568b3a4","7b1b16d3-d15d-47a3-b3c1-257296bba928","3771eb30-ee63-43e8-80b9-205679365c19","a8b265f5-ae54-4ff0-955f-3f20e6882cd0","bb08e1cb-6477-4d28-b6ec-2dc60dc41fff","d22d961c-d268-435f-b051-8bcd7bec19c7","db679490-7136-42b0-8301-5d80f992082f","755dabbd-438c-4778-a428-97e79df476e3","19f9f491-d908-4537-87c7-4735b3706273","3d6b35ba-4ab7-4d05-9423-cb4676a8ff95","787b2888-54dc-4699-ac54-4191df8f8021","e566bc86-6632-49f0-86b9-0f788372d62a",null,"7aa30389-b8b0-4082-a741-0a72c633a9ae","0f40116b-727c-4bcb-8cf5-75f28d2ca09d","1c975f85-aabc-4d37-898b-44045bef5d2a","9fb4c1fb-3e9a-4507-8a87-59475cc5fde2","90513516-6e98-4b13-a449-6f77ed6a3705","f70b5ed1-d43f-4674-ae08-984b45b39773",null,"92e3b847-9520-4518-aa0c-fc5782443f6a","bb676bf3-cc5c-4949-80d7-e564cf5d2dc7","2dfd6021-4890-4d75-8167-5f3b24889b58","77726824-010e-4843-b3e2-ed8f0e37d46b","08529b60-42dc-4d2b-aa6f-118df5e75bee","37586eb4-49d9-4641-806d-e66e6801c61f","7b579fb0-1787-4cef-9a0e-c182ebf81580","657f7ec7-f16b-4d5f-967b-0a81cdf6be65","2fff2342-9383-4f2b-b7ce-1362b772ee9c","4a7afcac-2ba7-4e27-8a70-a08b8956d60f","076d5950-797d-4793-84ed-8895d69cb007","7c548c3f-2540-40c1-9af3-059516120ecd","1a5e0b77-2e51-4f22-9eaa-cce7c0510198","bbb018a5-6e25-4f9e-bebd-868215f83a32","14e24d9c-bbd4-4513-9ae4-51d024bdffe4","d9664b11-9334-46b1-a55c-c6eb1ef94f22","4ba252b9-8fb0-43b3-9e02-6dcca88eb466","8f3b88a8-76b2-407f-906a-fb977ee7b489","bd098f14-e6cb-4dce-bda5-c09ebaf8762a",null,"82d6ae51-4a5d-4ad5-bda4-0c184bb70ce7","0e11d794-54db-4ad5-a09b-01115c932d3f","d74fb899-e782-4a20-a163-965dcfdf5afb","cf1e7405-fc42-4493-b1d1-2a5c56fd40dd","9ed5875a-0464-42a5-94a2-8c7a41b27d5a","46a6167a-7f44-4f4e-ac1e-e8033b635379","4a2c5620-70bb-45aa-98c1-43a9710b0505",null,null,null,"41583903-baff-4c6c-b1d3-e1f17f840e08",null,"7c473e64-ecc2-415c-b7e6-bfcedbbb77ee","51e04c54-2a6e-4b26-b547-8e00a26e2b6e","401e7f85-fbf4-4d34-b3d7-462ca9a3cf36","c34c82a9-7684-45d1-acbe-84a1804f8dd4","0b42243e-1a91-4ca5-9347-33e79e00d7fa","04991883-24ee-4256-ae49-d287dc85f08c","ccf46aac-14af-4531-b759-7a0558841d26","cbb27a25-fd32-4620-949c-7c615bf19424","c90aec2d-ca08-4c9f-862f-c794c1860dbf","7d00cd3a-113a-4ca6-97f2-51920cf1eaea","870802b0-19da-4d0c-ac6c-f25e65396578","83513bda-4420-4b84-b285-6817ddc45d3f","cdd3d998-6ca1-4d9a-9957-2bc7a1e6013a","b1edb6cc-9790-4d1a-ac32-5b5ce35256c7","3f299941-81f6-4f64-be3c-1c09ce2034b7","a8e88a70-3325-4564-a363-7237f9b6b2e3",null,null,null,"7335a481-3685-413d-8560-8486af27093f","d8389d32-a340-4889-a7e9-23945b895863","84ca9e88-453d-49ef-8aef-c93f7074b275","30a0c416-9a2f-49b6-a9a8-9f05200374d4","98c92b6f-9c21-4bd4-b638-b4dd43d1623f","8d7ff62b-997e-4eb5-a672-2ff25ca85db6","63e89734-0b75-445f-88cb-c4eff6d25085","c359f486-624d-4189-86de-aee56dd72605","b556baf3-6e6a-4f43-a376-d66bb72c90fd","d4a82868-fdec-4681-9245-9997b8bedaaa","31e59a50-8acc-4698-9912-a7ffc5115236","625ef6d9-5529-412c-a9e6-fddeba5565df","0d01a341-a33e-4e9c-a9ca-e0d6b090f1bf","2b7cf6d7-4d9a-46fe-9e24-b87e4f93387a","9438f652-82bf-4760-bca8-020cc03b0bf8","50623f55-aaf4-41da-9d16-22f2a744013f","9ad277c2-3c1a-4bf1-9d7c-9434152adf7b",null,"a8644f8d-3f47-44dd-a3e3-e78f73178e05","4c44b9dd-9f05-4ba3-8f3c-379ef7135aa8","f74f0f41-47bd-44de-9c64-c263eca4ecd7","60472b75-a0cf-4709-bc13-b9c06194fea4","59ac9ba8-93ee-4e7c-b619-c02d702651fe","0bf90012-ec05-4e72-b3da-4342ea007d5c","2bcc9aa8-9ea3-494a-ac1d-e77d5d60ef8d","0dc754d5-a62b-4311-a325-27f56b3503c0","6393fd93-9674-4f80-a9dc-aa415bf9c5e7","0ea0335f-bfcf-49d3-8952-54a664110bd6","7ed75172-205d-4257-8f57-b1421e7bf468","868ba3df-b19b-4551-b2b7-348091217601","a46e050d-20c2-4e52-b6ca-fdd81e18d344","d1048577-a23a-4222-86ed-91f2f02c636b","79fca6c4-9f46-4dad-8800-aaa78fe4d7ff","79a516d3-e929-4fd8-82e8-627507dae3b8","568850a1-8e46-4846-9d57-31ac4ffaa26f","371d86dc-a596-42f3-9df4-6f0e0fd95b3b","47821a75-78a8-4c09-8888-c3e69a09db3f","6591e9fc-f201-4f81-929d-b481a7e5b9d3","aaaa2dec-6e1d-41f5-90ca-a9a8daf04155","19e88149-d163-44e7-bff6-1d1a884b0cdd","2001b1e9-fc74-4d45-9ca4-31973068cd55","c2684516-d123-4e44-a27d-d7d239ddb2e6","52c3ff75-7135-4270-ae7a-0a6ab48bd9c8","828971d7-3632-4406-a3aa-ae66667b745a","2c75ebd5-f2ca-49a8-b39f-68a804faed8a","588f1289-8e6e-4901-92f3-1eb327189f5c","aba98ead-de81-47c8-ab86-ca50ecd5fa4a","26615f01-169a-4ff2-934a-8b560929f8eb","f4103474-c1ef-46af-a5a5-386d78ce4b1d","27649a61-6bf4-4c96-be10-b76009350621","83d57fd2-c154-44da-a072-737976d0806a",null,"a9c9279b-6d37-4aa1-af95-1b2beb443b13","70072d78-31f0-4962-9568-d7770e5c3286","68f42243-d374-4c52-a8cb-93ae06f0357c","e9d39910-1e8e-453e-99da-911f6aa23257",null,"e8088038-ba5f-469f-a981-a30cfff03aea","ff0729c5-bca9-4230-8989-15965caf6c12","bcedc636-2745-496f-ada7-ad407e323f53","71edfb59-2e64-45dd-b7e3-993831579a4a","b4fe65ca-ed5d-41a2-b5fc-03fe60fa8781","6f04a6e5-3b48-43ee-9e92-e828561750ff",null,"c3386047-6ad9-4a07-999d-20c15a148003","5023c61e-52b7-47e7-8408-dbb66b67b4a6","6d306a60-baaa-4318-8d5f-a8fb11c57804","e9e5deb8-7322-4313-ad6c-bc81ddb555fa","432e064d-2c87-4282-bc83-88ea238eae90","347326c3-ded1-4e2f-8849-ad00298fbd4c","e97bb403-00b5-402a-b743-ad15c01edc0b","9892ae33-cb22-43b2-aae9-9b20efc535cf","3b2ecfc8-7582-4ef9-983c-dc8f53bd8088","76cbf819-7488-4316-adb5-4ef0320187f9","d0c5445e-fb56-40be-ac15-f7390327a944","59c2c773-81a9-465f-9a62-e4bb453b2e7a","57dce699-46cf-4046-954e-d2f88d17d832","7a9671e3-e195-4c18-8d0a-c79001df8733","1041dc9b-0aac-4ada-b7cf-dc6c5a3517eb","a44fbe1e-0b28-4427-ac92-5d138d3bc8a4",null,"3b9a027f-c744-4db5-8cb0-bdbdb65d415a","1adade9a-b1a9-4c73-a190-f5fafbf0cbc1",null,"6a808f1e-749f-4dca-8b0f-c985ddc88b72","f4b775cd-3463-497c-800e-858394d14ea8","1d94cabd-395b-4ee8-b0a7-1db8933fd16d","1c2cca00-583b-42e7-b534-9481634f8a54","36fc5f65-eb0b-40c8-b7d3-ac80de2d0e6e","46d1dadc-4982-4cb9-9c6f-b36c7cc16b12","c66d6f4e-8366-4c00-abb2-cacd4972be8b","1a315b73-e9e4-40c4-b9f8-f42b12e1a95f","672693eb-0d9b-4b42-b686-434e5a88747b","b3304b37-5ef3-47c4-873d-4a961885a0b5","c4b4ec9a-e759-40b5-8ead-6d7f844325cb","1856ffca-4793-47f6-96f2-74855cd299aa","0a8affd5-06d5-4a9a-9855-ea23416eb154","ac4859a7-ff0f-4d4c-8651-a58f5bb7082b","a9717a24-ba25-4138-922a-ecc50b71e4aa","cd03b4f9-43da-4c34-ae22-07046f68adb7","b9bfa27a-5c10-4c98-a330-15509e6e2405","a072cd77-0d65-4548-b518-b8747acf3fcf","e0813013-2628-4fb8-88f7-4341e0999adb","9df38cc3-6a39-45a8-9c1c-137eb5030cf1","9730671e-84f1-4768-b416-4a3cc1f39403","08ff3834-24a4-4dc6-a758-4917fa5882fa","8e054a97-c226-4ea2-a161-295a7443d8ab","93bc38ad-5a5f-413c-a329-003f659d4c62","f330d928-bb2a-4ac1-ab63-cc1c34cc4837","3df12f64-5f9a-4218-91e4-3380f8dd8ee9","67f382c0-577b-4ded-ba3d-89a5c07b6b2a","76bf1f96-ee33-4fe1-902b-7e5397a187f0",null,"44ebf44a-34c3-4acf-8f2a-135cfb0a363f","025c3c5c-90c1-40f6-b8d2-c7a3670d7084","66b4fa93-f2c6-4622-89b4-22efdaf1603a","b18bf303-1c58-409c-8d37-0d31404466a4","c5437ee7-6a37-450d-806f-439580edf2a1","f3cba0fe-d9af-4aed-bdee-c380b1eef586","587cf90b-02db-4f6e-919b-307dce05c9b2","d6d6a9b9-4320-4735-bd44-b7d38ab4d4b0","3cebe611-65bd-4435-9dda-42d1b9748e70","c779f4ed-29f8-4a10-8687-51d058d74c5d","4d18ec5e-a9b7-4348-9976-bc6134fbf3c2","81526c8c-7e2e-4503-ba3f-b55bda51d85a","28ed63d8-db9f-4bd2-a67d-8d73128dc704","747a4a01-35e6-44c9-94b5-efa3c92e1af7","8aca553e-4415-4f9a-8d2d-67e27d1f3b26","dda4f1e7-c5b8-4aef-887b-048c9253f03e","24899ce6-938f-42e7-a782-c02b625287df","73c8b71d-5af9-4e08-878a-9ae94dbea86e","2aea1c3a-add2-42b8-963c-834278952e7a","c2996c0b-6ae1-48e8-9450-49c7d8dd4265","e622b759-a64b-424b-90b6-a96602057dbf","463927bc-d7cc-4a94-8782-aa2412670925","f202895f-d3de-42ba-8fc2-26415e43c485","101e089e-98a4-498c-87ba-7f0f9c739e39","5fa218ad-9972-4d81-975c-8b8fee3a22cd","e0a05c21-a30c-494f-8519-f8be17bbb8cb","28d1f548-3458-4b34-b84c-db1fc433df3a","5b4fc6ff-70c2-41ef-b6f1-88085f3a2165","70b06004-1599-4116-9884-76abf9e599e2",null,null,null,"949eeb0b-5d58-4e72-a960-b84424694ca3","b4f3f074-a7ae-412f-ae6e-dc5b10eb8f36","e8d599f7-7023-4568-886d-7fb56748a874","fe63e1ab-d5d1-4852-a9fa-d6e8c6b990bb","c471548e-2fac-46ca-aea8-e500ae4e503d","2fb3b149-9d99-4153-9f53-98a13c1247a7","62691a9a-a6dd-4d83-82f7-716d70230f53","2a3d2c03-94ff-47f5-8916-7ea6bc439c4f","64b4233c-1034-4ac1-88da-2c14767ee80b","d64b8f02-1580-4ea0-bfd8-bae7c410b696"],Y.weaponUpscaledMap=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"237a530b-307b-498f-bb21-cb49621ae5e8"]},8900:(q,K,z)=>{"use strict";z.d(K,{M:()=>Q});var Y=z(88818);class Q{constructor(){this.eyeAttachments=[Y.VE.EyeLIris,Y.VE.EyeLWhite,Y.VE.EyeRIris,Y.VE.EyeRWhite],this.hairAttachments=[Y.VE.HairLPigtails,Y.VE.HairRPigtails,Y.VE.HairInfront,Y.VE.HairShort,Y.VE.HairBun,Y.VE.HairBackLong,Y.VE.HairBack,Y.VE.HairBehind],this.faceAttachments=[Y.VE.EyeLOutline,Y.VE.EyeLBlink,Y.VE.EyeROutline,Y.VE.EyeRBlink,Y.VE.EyebrowL,Y.VE.EyebrowR,Y.VE.FaceLower,Y.VE.FaceUpper,Y.VE.Nose,Y.VE.Neck,Y.VE.MouthSmile,Y.VE.MouthClose,Y.VE.MouthA,Y.VE.MouthYeah,Y.VE.EyebrowR,Y.VE.EyebrowL],this.skinAttachments=[Y.VE.BootRSkin,Y.VE.BootLSkin,Y.VE.LegRSkin,Y.VE.LegLSkin,Y.VE.SleeveRSkin,Y.VE.SleeveLSkin,Y.VE.GloveRSkin,Y.VE.GloveLFingersSkin,Y.VE.GloveLHandSkin]}static get instance(){return Q._instance||(Q._instance=new Q),Q._instance}}},57993:(q,K,z)=>{"use strict";z.d(K,{A:()=>Q});var Y=z(68910);class Q extends Y.Filter{get y(){return this.uniforms.ySample}set y(q){this.uniforms.ySample=q}get LUT(){return this.uniforms.uLUT}set LUT(q){this.uniforms.uLUT=q}constructor(q,K=.5){super(null,Q.fragmentShader,{ySample:K,uLUT:null!=q?q:Y.Texture.WHITE})}}Q.fragmentShader="\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform sampler2D uLUT;\n uniform float ySample;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n vec4 l = texture2D( uLUT, vec2(c.r/c.a, ySample) );\n c.rgb = l.rgb;\n c.rgb *= c.a;\n gl_FragColor = c;\n }"},1492:(q,K,z)=>{"use strict";z.d(K,{N:()=>dt});var Y,Q,X=z(8674),Z=z(62459),J=z(68910),tt=z(88818),et=z(35120),it=z(38443),st=z(73797),nt=z(55741),at=z(29834),rt=z(28402),ot=z(6287),ht=z(63068);!function(q){q[q.Foreground=0]="Foreground",q[q.Background=1]="Background"}(Q||(Q={}));const ct={[Q.Foreground]:"front",[Q.Background]:"back"};let dt=Y=class extends Z.uAl{constructor(){super(...arguments),this._foregroundSpineAnimator=null,this._backgroundSpineAnimator=null,this.mountReady=new Z.HN0,this._isMountReady=!1,this._cachedVisibilityTuple=null,this._hiddenSlots=[]}get isMountReady(){return this._isMountReady}create(){super.create(),Y.mountGear||(Y.mountGear=new Z.KDe,Y.mountGear.hiddenSlots=[tt.Cj.Shadow]),this._foregroundSpineAnimator=this._foregroundObject.findComponent(at.j),this._backgroundSpineAnimator=this._backgroundObject.findComponent(at.j),this._foregroundSpineAnimator?this._backgroundSpineAnimator?et.q.instance.game.broadcaster.addAppListener(st.B.SlotVisibilityChanged,this.onSlotVisibilityChanged.bind(this),this,"SlotVisibility"):Z.VyI.log("No background spine animation found for background",Z.$bb.Error):Z.VyI.log("No foreground spine animation found for foreground",Z.$bb.Error)}postCreate(){const q=Object.create(null,{postCreate:{get:()=>super.postCreate}});return(0,X.sH)(this,void 0,void 0,(function*(){if(q.postCreate.call(this),this.mount)try{yield this.setMount(this.mount)}catch(K){Z.RQr.logError(K,"Could not set mount.")}else Z.VyI.log("No mount specified for mount component",Z.$bb.Verbose)}))}update(){var q;super.update(),(null===(q=this._particleRoot)||void 0===q?void 0:q.transform)&&this._particleRoot.transform.setScale(this.GameObject.transform.worldScale.x<0?-1:1,1)}onSlotVisibilityChanged(q,K,z){var Y,Q,X;if(!(null===(Q=null===(Y=null==q?void 0:q.parent)||void 0===Y?void 0:Y.name)||void 0===Q?void 0:Q.includes("ChargedLevelEffect")))return;const Z=this._backgroundObject.findComponent(rt.v);(null===(X=null==Z?void 0:Z.getSpine())||void 0===X?void 0:X.pixiSpine)?z?this.unhideMountSlot(K):this.hideMountSlot(K):this._cachedVisibilityTuple=[K,z]}setMount(q){return(0,X.sH)(this,void 0,void 0,(function*(){if((!q||this.mount&&this.mount!==q)&&(yield this.clearMount(),!q))return;const K=Z.W$e.instance.game.cache.getJSON(q);let z,Y,X;if(K){const q=ot.u.fromMountFile(K);z=Promise.resolve(q)}else z=new Promise((K=>{et.q.instance.prodigy.load.assets([q],(()=>{const z=ot.u.fromMountFile(Z.W$e.instance.game.cache.getJSON(q));K(z)}))}));if(this._mountElem=yield z,Y=Z.W$e.instance.game.cache.checkSpineKey(this._mountElem.spineGuid)?Promise.resolve():new Promise((q=>{et.q.instance.prodigy.load.assets([this._mountElem.spineGuid],(()=>{q()}))})),this._mountElem.particlesGuid){X=et.q.instance.prodigy.gameContainer.get("983-05a7").preloadFromGUIDWithDependencies(this._mountElem.particlesGuid).promise}else X=Promise.resolve();yield Promise.all([Y,X]),yield Promise.all([this.setupAnimationObject(Q.Background,this._mountElem.spineGuid),this.setupAnimationObject(Q.Foreground,this._mountElem.spineGuid)]),this.playAnimation("idle"),this.setupPlayerFollow(),this._isMountReady=!0,this.mount=q,this.mountReady.dispatch(),this._cachedVisibilityTuple&&(this._cachedVisibilityTuple[1]?this.unhideMountSlot(this._cachedVisibilityTuple[0]):this.hideMountSlot(this._cachedVisibilityTuple[0]),this._cachedVisibilityTuple=null)}))}hideMountSlot(q){var K,z;if(!this._hiddenSlots.includes(q)){this._hiddenSlots.push(q);const Y=this._backgroundObject.findComponent(rt.v);null===(z=null===(K=null==Y?void 0:Y.getSpine())||void 0===K?void 0:K.pixiSpine)||void 0===z||z.hackTextureBySlotName(q,J.Texture.EMPTY)}}unhideMountSlot(q){var K,z;if(this._hiddenSlots.includes(q)){const Y=this._backgroundObject.findComponent(rt.v);null===(z=null===(K=null==Y?void 0:Y.getSpine())||void 0===K?void 0:K.pixiSpine)||void 0===z||z.hackTextureBySlotName(q,null),this._hiddenSlots.splice(this._hiddenSlots.indexOf(q),1)}}addParticleEffectByID(q,K=-20,z=-35){var Y;this.removeParticleEffect(),this._particle=it.d.createParticleEmitter(this.gameObject,q,new Z.I9Y(K,z)),this._particle.worldSpaceScaling=!1,null===(Y=this._particle.GameObject)||void 0===Y||Y.sendToBack(),this._particleRoot=this._particle.GameObject}addInternalParticleEffect(){return(0,X.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;if(!this.hasInternalParticleEffect())throw new Error("No internal particle effect defined for mount, cannot add");const Q=null!==(K=null===(q=this._mountElem.particleOffset)||void 0===q?void 0:q.x)&&void 0!==K?K:0,X=null!==(Y=null===(z=this._mountElem.particleOffset)||void 0===z?void 0:z.y)&&void 0!==Y?Y:0;return this.addParticleEffectByGUID(this._mountElem.particlesGuid,Q,X)}))}addParticleEffectByGUID(q,K,z){return(0,X.sH)(this,void 0,void 0,(function*(){var Y;this.removeParticleEffect();try{const Y=et.q.instance.prodigy.gameContainer.get("983-05a7");return this._particleRoot=yield Y.loadWithDependenciesFromGUID(q,this.gameObject,!1),this._particleRoot.transform.setPosition(K,z),this._particle=this._particleRoot.findComponentInChildren(Z.okU),this._particle.worldSpaceScaling=!1,this._particleRoot.sendToBack(),this._particle}catch(Q){throw Z.RQr.logError(Q,`Could not load particle effect ${q} in mount ${null!==(Y=this.mount)&&void 0!==Y?Y:"unknown"}`),this._particleRoot=null,this._particle=null,Q}}))}removeParticleEffect(){this._particleRoot&&(this._particleRoot.destroy(),this._particle=null,this._particleRoot=null)}pauseParticles(){this._particle&&(this._particle.pauseEmission=!0)}resumeParticles(){this._particle&&(this._particle.pauseEmission=!1)}hasInternalParticleEffect(){return!!this._mountElem.particlesGuid}clearMount(){return(0,X.sH)(this,void 0,void 0,(function*(){this.stopAnimation(),this.clearPlayerFollow(),this.removeParticleEffect(),yield Promise.all([this.setupAnimationObject(Q.Background,null),this.setupAnimationObject(Q.Foreground,null)]),this.mount=null,this.mountReady.dispatch()}))}setupPlayerFollow(){var q,K,z,Q,X;null===(q=this.playerObject.findComponentInChildren(ht.n,!0))||void 0===q||q.addExtraGear(Y.mountGear);let J=this.playerObject.findComponent(nt.l);J||(J=this.playerObject.addComponent(nt.l));const tt=this._backgroundObject.findComponent(rt.v);tt?(J.setup({spineComponent:tt,boneName:"character",slotName:"character",followAxis:3,followRotation:!1,followScale:4,boneFollowerTransform:this.playerObject.transform}),J.localOffset=new Z.I9Y(null!==(z=null===(K=this._mountElem)||void 0===K?void 0:K.offset.x)&&void 0!==z?z:0,null!==(X=null===(Q=this._mountElem)||void 0===Q?void 0:Q.offset.y)&&void 0!==X?X:0)):Z.VyI.log("No spine component found on the background object",Z.$bb.Error)}clearPlayerFollow(){var q;const K=this.playerObject.findComponent(nt.l);K&&(this.playerObject.transform.setPosition(0,0),K.destroy()),null===(q=this.playerObject.findComponentInChildren(ht.n,!0))||void 0===q||q.removeExtraGear(Y.mountGear)}stopAnimation(){this._foregroundSpineAnimator&&this._backgroundSpineAnimator?(this._foregroundSpineAnimator.stopAnimation(),this._backgroundSpineAnimator.stopAnimation()):Z.VyI.log("No spine animator found for mount",Z.$bb.Error)}playAnimation(q,K=0){this._foregroundSpineAnimator&&this._backgroundSpineAnimator?(this._foregroundSpineAnimator.playAnimation(`${q}-${ct[Q.Foreground]}`,!0,!1,!1,K),this._backgroundSpineAnimator.playAnimation(`${q}-${ct[Q.Background]}`,!0,!1,!1,K)):Z.VyI.log("No spine animator found for mount",Z.$bb.Error)}setupAnimationObject(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){const z=ct[q],Y=q===Q.Foreground?this._foregroundObject:this._backgroundObject;if(!Y)return void Z.VyI.log(`No layer object found for layer ${z}`,Z.$bb.Error);const X=Y.findComponent(rt.v);if(!X)return void Z.VyI.log(`No spine component found on the mount object for layer ${z}`,Z.$bb.Warning);const J=new Promise((q=>{X.setAsset(null!=K?K:"",(()=>{q()}))}));yield J}))}destroy(){this.clearPlayerFollow(),this.removeParticleEffect(),this.mount=null,this._foregroundSpineAnimator=null,this._backgroundSpineAnimator=null,this.mountReady.dispose(),et.q.instance.game.broadcaster.removeAppListener(st.B.SlotVisibilityChanged,this,"SlotVisibility"),super.destroy()}};(0,X.Cg)([(0,Z.ERr)(),(0,X.Sn)("design:type",Z._mx)],dt.prototype,"_foregroundObject",void 0),(0,X.Cg)([(0,Z.ERr)(),(0,X.Sn)("design:type",Z._mx)],dt.prototype,"_backgroundObject",void 0),(0,X.Cg)([(0,Z.ERr)(),(0,X.Sn)("design:type",Z._mx)],dt.prototype,"playerObject",void 0),(0,X.Cg)([(0,Z.tW2)("mount"),(0,X.Sn)("design:type",String)],dt.prototype,"mount",void 0),dt=Y=(0,X.Cg)([(0,Z.EVk)("Mount",Z.YH6.animation)],dt)},6287:(q,K,z)=>{"use strict";z.d(K,{u:()=>Q});var Y=z(62459);class Q{static fromMountFile(q){const K=new Q;return K.offset=new Y.I9Y(q.playerOffset.x,q.playerOffset.y),K.spineGuid=q.mountSpine,q.mountParticlesGuid&&(K.particlesGuid=q.mountParticlesGuid),q.particleOffset&&(K.particleOffset=new Y.I9Y(q.particleOffset.x,q.particleOffset.y)),K}static toMountFile(q){const K={playerOffset:{x:q.offset.x,y:q.offset.y},mountSpine:q.spineGuid};return q.particlesGuid&&(K.mountParticlesGuid=q.particlesGuid),q.particleOffset&&(K.particleOffset={x:q.particleOffset.x,y:q.particleOffset.y}),`${JSON.stringify(K,null,4)}\n`}}},97651:(q,K,z)=>{"use strict";z.d(K,{e:()=>at});var Y=z(8674),Q=z(62459),X=z(82209),Z=z(72379),J=z(37773),tt=z(97317),et=z(65732),it=z(28152),st=z(26932),nt=z(26004);let at=class extends st.z{constructor(){super(...arguments),this.bindOnCreate=!0,this.ignoreLosingLevels=!1}create(){super.create(),Q.Aq$.isDefined(this._playerDataProvider)||Q.VyI.log("[PlayerChargedLevelDataProviderComponent] No PlayerDataProvider found in context",Q.$bb.Verbose),this.bindOnCreate&&this.bindContext()}bindContext(){var q,K,z,Y;if(!this._playerDataProvider)return;if(this._playerDataProvider.getLevel()0)return this._context.Container.rebind(et.E.ChargeRevealEffectEnabled).toConstantValue(!1),void this.bindLevel(this._playerDataProvider.getLevel()+Y)}const Q=(null===(Y=this._playerDataProvider)||void 0===Y?void 0:Y.getChargedLevel())>0?this._playerDataProvider.getLevel()+this._playerDataProvider.getChargedLevel():this._playerDataProvider.getLevel();this.bindLevel(Q)}showChargeKeptEffect(){this._context.Container.rebind(et.E.ChargedCreatureEffectDisplayType).toConstantValue(tt.X$.CHARGE_KEPT),this.gameObject.findComponentsInChildren(nt.B).forEach((q=>q.consume()))}showChargeLostEffect(){this._context.Container.rebind(et.E.ChargedCreatureEffectDisplayType).toConstantValue(tt.X$.CHARGE_LOST),this.gameObject.findComponentsInChildren(nt.B).forEach((q=>q.consume()))}bindChargedLevelTier(q){this._context.Container.rebind(et.E.ChargedCreatureEffectTier).toConstantValue(J.e.getChargedLevelTierFromLevel(q))}bindLevel(q){var K;if(q>this._playerDataProvider.player.currentMaxLevel){const z=q-this._playerDataProvider.player.currentMaxLevel;this._context.Container.rebind(et.E.PlayerChargedLevel).toConstantValue(this._playerDataProvider.getChargedLevel()),this._context.Container.rebind(et.E.ChargedCreatureEffectTier).toConstantValue(J.e.getChargedLevelTierFromLevel(z)),this._context.Container.rebind(et.E.PlayerChargedLevelCap).toConstantValue(this._playerDataProvider.getChargedLevelCap());const Y=null!==(K=this._context.getInjectedValue(et.E.ChargeRevealEffectEnabled))&&void 0!==K&&K?tt.X$.REVEAL_TO_IDLE:tt.X$.IDLE;this._context.Container.rebind(et.E.ChargedCreatureEffectDisplayType).toConstantValue(Y)}else this._context.Container.rebind(et.E.PlayerChargedLevel).toConstantValue(0),this._context.Container.rebind(et.E.PlayerChargedLevelCap).toConstantValue(0),this._context.Container.rebind(et.E.ChargedCreatureEffectTier).toConstantValue(tt.Bv.NO_CHARGE),this._context.Container.rebind(et.E.ChargedCreatureEffectDisplayType).toConstantValue(tt.X$.HIDDEN);this.gameObject.findComponentsInChildren(nt.B).forEach((q=>q.consume()))}};(0,Y.Cg)([(0,Q.Cdj)("1eb-d7b4"),(0,Y.Sn)("design:type",X.z)],at.prototype,"_playerDataProvider",void 0),(0,Y.Cg)([(0,Q.Cdj)("c5a-49f2"),(0,Y.Sn)("design:type",Z.g)],at.prototype,"_chargedLevelsProgressManager",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"bindOnCreate",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"ignoreLosingLevels",void 0),at=(0,Y.Cg)([(0,Q.EVk)("PlayerChargedLevelDataProvider",it.Y.player)],at)},55950:(q,K,z)=>{"use strict";z.d(K,{y:()=>bt});var Y,Q,X,Z,J=z(8674),tt=z(62459),et=z(95891),it=z(68910),st=z(88818);!function(q){q.Attack="attack",q.Attack2="attack2",q.DanceDab="dance-dab",q.DanceMoonwalk="dance-moonwalk",q.DanceRunningman="dance-runningman",q.Dig="dig",q.Idle="idle",q.IdleHeavy="idle-heavy",q.IdlePose="idle-pose",q.IdleToPetInteract="idle-to-pet-interact",q.PetInteract="pet-interact",q.Static="static",q.Walk="walk"}(Y||(Y={})),function(q){q.Cast="cast"}(Q||(Q={})),function(q){q.Shadow="shadow",q.HairLPigtails="hair-L-pigtails",q.HatBack="hat-back",q.HairBun="hair-bun",q.HairBackLong="hair-back-long",q.HairBack="hair-back",q.Cape="cape",q.SleeveLSkin="sleeve-L-skin",q.SleeveL="sleeve-L",q.GloveLHandSkin="glove-L-hand-skin",q.GloveLHand="glove-L-hand",q.HairBehind="hair-behind",q.Weapon="weapon",q.Tail="tail",q.Back="back",q.GloveLFingersSkin="glove-L-fingers-skin",q.GloveLFingers="glove-L-fingers",q.LegLSkin="leg-L-skin",q.LegL="leg-L",q.BootLSkin="boot-L-skin",q.BootL="boot-L",q.Hip="hip",q.LegRSkin="leg-R-skin",q.LegR="leg-R",q.BootRSkin="boot-R-skin",q.BootR="boot-R",q.PauldronL="pauldron-L",q.HatMiddle="hat-middle",q.Neck="neck",q.Torso="torso",q.Belt="belt",q.Chest="chest",q.SleeveRSkin="sleeve-R-skin",q.SleeveR="sleeve-R",q.Collar="collar",q.GloveRSkin="glove-R-skin",q.GloveRWrist="glove-R-wrist",q.GloveRHand="glove-R-hand",q.Necklace="necklace",q.FaceLower="face-lower",q.FaceUpper="face-upper",q.EyeLWhite="eye-L-white",q.EyeLIris="eye-L-iris",q.EyeLOutline="eye-L-outline",q.EyeLBlink="eye-L-blink",q.EyeRWhite="eye-R-white",q.EyeRIris="eye-R-iris",q.EyeROutline="eye-R-outline",q.EyeRBlink="eye-R-blink",q.Mouth="mouth",q.Nose="nose",q.EyebrowR="eyebrow-R",q.EyebrowL="eyebrow-L",q.ExpressionFace="expression-face",q.HairInfront="hair-infront",q.HairShort="hair-short",q.HatFace="hat-face",q.HairRPigtails="hair-R-pigtails",q.PauldronR="pauldron-R",q.HatFront="hat-front",q.ExpressionUpper="expression-upper"}(X||(X={})),function(q){q.Back="back",q.Belt="belt",q.BootL="boot-L",q.BootLSkin="boot-L-skin",q.BootR="boot-R",q.BootRSkin="boot-R-skin",q.Cape="cape",q.Chest="chest",q.Collar="collar",q.ExpressionFace="expression-face",q.ExpressionUpper="expression-upper",q.EyeLBlink="eye-L-blink",q.EyeLIris="eye-L-iris",q.EyeLOutline="eye-L-outline",q.EyeLWhite="eye-L-white",q.EyeRBlink="eye-R-blink",q.EyeRIris="eye-R-iris",q.EyeROutline="eye-R-outline",q.EyeRWhite="eye-R-white",q.EyebrowL="eyebrow-L",q.EyebrowR="eyebrow-R",q.FaceLower="face-lower",q.FaceUpper="face-upper",q.GloveLFingers="glove-L-fingers",q.GloveLFingersSkin="glove-L-fingers-skin",q.GloveLHand="glove-L-hand",q.GloveLHandSkin="glove-L-hand-skin",q.GloveRHand="glove-R-hand",q.GloveRSkin="glove-R-skin",q.GloveRWrist="glove-R-wrist",q.HairBack="hair-back",q.HairBackLong="hair-back-long",q.HairBehind="hair-behind",q.HairBun="hair-bun",q.HairInfront="hair-infront",q.HairLPigtails="hair-L-pigtails",q.HairRPigtails="hair-R-pigtails",q.HairShort="hair-short",q.HatBack="hat-back",q.HatFace="hat-face",q.HatFront="hat-front",q.HatMiddle="hat-middle",q.Hip="hip",q.LegL="leg-L",q.LegLSkin="leg-L-skin",q.LegR="leg-R",q.LegRSkin="leg-R-skin",q.MouthA="mouth-A",q.MouthClose="mouth-Close",q.MouthSmile="mouth-smile",q.MouthYeah="mouth-yeah",q.Neck="neck",q.Necklace="necklace",q.Nose="nose",q.PauldronL="pauldron-L",q.PauldronR="pauldron-R",q.Shadow="shadow",q.SleeveL="sleeve-L",q.SleeveLSkin="sleeve-L-skin",q.SleeveR="sleeve-R",q.SleeveRSkin="sleeve-R-skin",q.Tail="tail",q.Torso="torso",q.Weapon="weapon"}(Z||(Z={}));const nt=new Map([["back",[963,782,353,313]],["belt",[484,25,234,65]],["boot-L",[1883,72,112,113]],["boot-L-skin",[1883,298,113,113]],["boot-R",[1568,18,112,113]],["boot-R-skin",[1888,419,113,113]],["cape",[1587,820,243,275]],["chest",[1766,699,123,120]],["collar",[1038,213,274,105]],["expression-face",[878,1096,398,450]],["expression-upper",[1277,1096,398,450]],["eye-L-blink",[123,31,56,27]],["eye-L-iris",[1676,1100,60,60]],["eye-L-outline",[878,845,69,90]],["eye-L-white",[926,3,57,87]],["eye-R-blink",[520,1392,67,29]],["eye-R-iris",[1737,1100,60,60]],["eye-R-outline",[719,0,104,90]],["eye-R-white",[824,3,101,87]],["eyebrow-L",[520,1422,80,75]],["eyebrow-R",[1156,7,99,70]],["face-lower",[1568,132,314,254]],["face-upper",[1313,42,254,188]],["glove-L-fingers",[1205,319,105,99]],["glove-L-fingers-skin",[1205,419,105,99]],["glove-L-hand",[1831,1041,120,119]],["glove-L-hand-skin",[277,1388,113,109]],["glove-R-hand",[1587,699,121,120]],["glove-R-skin",[1766,412,121,120]],["glove-R-wrist",[1883,186,113,111]],["hair-L-pigtails",[0,1387,276,659]],["hair-R-pigtails",[601,838,276,659]],["hair-back",[1317,675,269,420]],["hair-back-long",[878,1547,431,499]],["hair-behind",[0,375,526,462]],["hair-bun",[1316,231,215,443]],["hair-infront",[0,59,358,315]],["hair-short",[963,519,352,262]],["hat-back",[0,838,600,548]],["hat-face",[1310,1596,398,450]],["hat-front",[277,1498,600,548]],["hat-middle",[527,289,435,548]],["hip",[1156,78,137,134]],["leg-L",[1890,713,115,163]],["leg-L-skin",[1831,877,115,163]],["leg-R",[1881,533,114,165]],["leg-R-skin",[1766,533,114,165]],["mouth-A",[59,21,63,37]],["mouth-Close",[180,35,53,23]],["mouth-smile",[234,37,44,21]],["mouth-yeah",[0,9,58,49]],["neck",[878,1011,79,84]],["necklace",[391,1389,128,108]],["nose",[878,936,75,74]],["pauldron-L",[359,206,147,168]],["pauldron-R",[1709,1632,188,177]],["shadow",[507,91,530,197]],["sleeve-L",[359,5,124,200]],["sleeve-L-skin",[963,319,123,199]],["sleeve-R",[1038,21,117,191]],["sleeve-R-skin",[1087,327,117,191]],["tail",[1709,1810,288,236]],["torso",[1532,387,233,287]],["weapon",[1676,1161,216,434]]]);var at,rt,ot=z(35120),ht=z(34829),ct=z(30705),dt=z(51941),lt=z(8900),ut=z(57993),ft=z(97252);!function(q){q.Skin="skin",q.Face="face",q.Hair="hair",q.Eyes="eyes"}(rt||(rt={}));let bt=at=class extends tt.uAl{constructor(){super(...arguments),this.autoRefresh=!1,this.lutGuid="e918c892-6a34-4bc0-8f2d-2d91b3a4e91b",this.skinIndex=0,this.hairIndex=0,this.eyeIndex=0,this.attachmentTextureIdMap=new Map,this.onColorRefreshed=new tt.HN0}get initialAtlasFrames(){return this._scaling===ft.M.UPSCALED_4x?nt:st.yG}postCreate(){super.postCreate(),this.postCreate=super.postCreate.bind(this),at.lutTexture||(at.lutTexture=ot.q.instance.game.cache.getTexture(this.lutGuid)),this._gear||(this._gear=this.gameObject.findComponent(dt.c)),ht.A.get("GameConstants.Debug.SHOW_PLAYER_COLOR_DEBUG_MENU")&&ct.b.debugGUI("player",this,[{parameter:"skinIndex",min:1,max:at.SKIN_TONES-1,step:1},{parameter:"hairIndex",min:1,max:at.HAIR_TONES-1,step:1},{parameter:"eyeIndex",min:1,max:at.EYE_TONES-1,step:1}],void this.refresh.bind(this)),this.autoRefresh&&(this._spineComponent.isLoaded?this.refresh().catch(tt.RQr.createHandler("Could not refresh PlayerColorComponent with preloaded spine")):this._spineComponent.OnLoaded.addOnce((()=>{this.refresh().catch(tt.RQr.createHandler("Could not refresh PlayerColorComponent with post-loaded spine"))})))}destroy(){ht.A.get("GameConstants.Debug.SHOW_PLAYER_COLOR_DEBUG_MENU")&&ct.b.removeDebugGUI("player"),this.onColorRefreshed.dispose(),super.destroy()}validateFilters(){at.lutTexture?(this.validateLUTFilter(at.HAIR_FILTERS,this.hairIndex,at.SKIN_TONES),this.validateLUTFilter(at.SKIN_FILTERS,this.skinIndex,0),this.validateLUTFilter(at.EYE_FILTERS,this.eyeIndex,at.SKIN_TONES+at.HAIR_TONES)):tt.VyI.log("no global lut set for PlayerColorComponent",tt.$bb.Warning)}validateLUTFilter(q,K,z){q.has(K)||q.set(K,new ut.A(at.lutTexture,(K+.5+z)/at.lutTexture.height))}refresh(){return(0,J.sH)(this,void 0,void 0,(function*(){var q;this.postCreate(),this._spine||(this._spine=this._spineComponent.getSpine()),yield this._gear.refresh().catch((q=>{tt.RQr.createHandler(`Could not refresh gear from player color\n${q}`)})),this.skinIndex=Math.max(this.skinIndex,0),this.eyeIndex=Math.max(this.eyeIndex,0),this.hairIndex=Math.max(this.hairIndex,0),this.attachmentTextureIdMap=this._gear.attachmentTextureIdMap,at.lutTexture&&(null===(q=this._spine)||void 0===q?void 0:q.pixiSpine)&&(this.validateFilters(),this.applyFiltersToSlots(at.SKIN_FILTERS.get(this.skinIndex),lt.M.instance.skinAttachments,rt.Skin,this.skinIndex),this.applyFiltersToSlots(at.SKIN_FILTERS.get(this.skinIndex),lt.M.instance.faceAttachments,rt.Face,this.skinIndex),this.applyFiltersToSlots(at.HAIR_FILTERS.get(this.hairIndex),lt.M.instance.hairAttachments,rt.Hair,this.hairIndex),this.applyFiltersToSlots(at.EYE_FILTERS.get(this.eyeIndex),lt.M.instance.eyeAttachments,rt.Eyes,this.eyeIndex),this._gear.updateSkin(),this.onColorRefreshed.dispatch())}))}applyFiltersToSlots(q,K,z,Y){var Q;const X=null===(Q=this._spine)||void 0===Q?void 0:Q.skeleton;if(!X)return void tt.VyI.log("Could not apply filter; spine skeleton not found",tt.$bb.Error);const Z=[];let J=K.filter((q=>{for(let K=0;K{this._gear.getSlotNames(K).forEach((Q=>{var Z,J;if(this._gear.isHiddenSlot(Q))return;const st=X.findSlot(Q),nt=X.getAttachment(st.data.index,K);if(!nt)return;if(!this._gear.shouldRecolorSlot(nt.name))return;const rt=this.attachmentTextureIdMap.get(K),ht=tt.Aq$.isDefined(this._scaling)?this._scaling===ft.M.DEFAULT_1X?"defaultScale":"upscaled":"default",ct=`${rt}-${z}-${Y}-${K}-${ht}`;let dt;if(rt&&ot.q.instance.game.cache.checkImageKey(rt))at._sprite.texture=ot.q.instance.game.cache.getTexture(rt),dt=this.getCachedFilterTexture(q,at._sprite,ct);else{at._sprite.texture=new it.Texture(tt.a5k.defaultTextures.get(this._spine.name).baseTexture,new it.Rectangle(...this.initialAtlasFrames.get(K)));const Y=`${z}-base-${K}-${ht}`,Q=this.getBaseTexture(at._sprite,Y);at._sprite.texture=Q,dt=this.getCachedFilterTexture(q,at._sprite,ct)}if(0===nt.type||2===nt.type){const q=nt.copy(),z=(0,et.clone)(q.region);z.names=q.region.names,z.values=q.region.values,z.texture=dt,q.region=z,null===(Z=this._gear.skin)||void 0===Z||Z.removeAttachment(st.data.index,K),null===(J=this._gear.skin)||void 0===J||J.setAttachment(st.data.index,K,q)}}))}))}getBaseTexture(q,K){const z=ot.q.instance.game.cache.getRenderTexture(K);if(z)return z;const Y=ot.q.instance.game.renderer.generateTexture(q);return tt.qFr.setSmoothed(Y,!0),ot.q.instance.game.cache.addRenderTexture(K,Y),Y}getCachedFilterTexture(q,K,z){const Y=ot.q.instance.game.cache.getRenderTexture(z);if(Y)return Y;K.filters=Array.isArray(q)?q:[q];const Q=ot.q.instance.game.renderer.generateTexture(K);return tt.qFr.setSmoothed(Q,!0),ot.q.instance.game.cache.addRenderTexture(z,Q),K.filters=null,Q}};bt._sprite=new it.Sprite,bt.SKIN_TONES=6,bt.HAIR_TONES=44,bt.EYE_TONES=15,bt.SKIN_FILTERS=new Map,bt.HAIR_FILTERS=new Map,bt.EYE_FILTERS=new Map,(0,J.Cg)([(0,tt.vkK)(),(0,J.Sn)("design:type",Boolean)],bt.prototype,"autoRefresh",void 0),(0,J.Cg)([(0,tt.Bak)(),(0,tt.W_S)(),(0,tt.i0J)(tt.Z$z.Image),(0,J.Sn)("design:type",String)],bt.prototype,"lutGuid",void 0),(0,J.Cg)([(0,tt.Pqz)(tt.v2j),(0,J.Sn)("design:type",tt.v2j)],bt.prototype,"_spineComponent",void 0),(0,J.Cg)([(0,tt.g11)(),(0,J.Sn)("design:type",Number)],bt.prototype,"skinIndex",void 0),(0,J.Cg)([(0,tt.g11)(),(0,J.Sn)("design:type",Number)],bt.prototype,"hairIndex",void 0),(0,J.Cg)([(0,tt.g11)(),(0,J.Sn)("design:type",Number)],bt.prototype,"eyeIndex",void 0),(0,J.Cg)([(0,tt.Cdj)("PLAYER_APPEARANCE_SCALING"),(0,J.Sn)("design:type",Number)],bt.prototype,"_scaling",void 0),(0,J.Cg)([(0,tt.bbQ)(),(0,J.Sn)("design:type",tt.HN0)],bt.prototype,"onColorRefreshed",void 0),(0,J.Cg)([(0,tt.GO0)(),(0,J.Sn)("design:type",Function),(0,J.Sn)("design:paramtypes",[]),(0,J.Sn)("design:returntype",Promise)],bt.prototype,"refresh",null),bt=at=(0,J.Cg)([(0,tt.EVk)("PlayerColor",tt.YH6.animation)],bt)},63068:(q,K,z)=>{"use strict";z.d(K,{n:()=>at});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(34829),J=z(30705),tt=z(51941),et=z(36164),it=z(55950),st=z(97252);const nt=Object.values(st.EQ).filter((q=>"number"==typeof q)).length;let at=class extends Q.uAl{constructor(){super(...arguments),this._extraGear=[],this.onAppearanceLoaded=new Q.HN0,this.onFirstAppearanceLoaded=new Q.HN0}create(){if(super.create(),Z.s.get("GameConstants.Debug.SHOW_PLAYER_OUTFIT_DEBUG_MENU")){const q={face:1,outfit:1,boot:1,weapon:1,haircut:1,hat:1,skin:1,hair:1,eye:1,scale:1};J.b.debugGUI("outfit",q,[{parameter:"face",step:1,min:1,max:et.R.faceMap.length},{parameter:"outfit",step:1,min:1,max:et.R.outfitMap.length},{parameter:"boot",step:1,min:1,max:et.R.bootMap.length},{parameter:"weapon",step:1,min:1,max:et.R.weaponMap.length},{parameter:"haircut",step:1,min:0,max:et.R.hairMap.length},{parameter:"hat",step:1,min:0,max:et.R.hatMap.length},{parameter:"skin",step:1,min:1,max:it.y.SKIN_TONES},{parameter:"hair",step:1,min:1,max:it.y.HAIR_TONES},{parameter:"eye",step:1,min:1,max:it.y.EYE_TONES},{parameter:"scale",min:1,max:2}],(()=>{this.fromPlayerAppearanceData({weapon:q.weapon,outfit:q.outfit,boot:q.boot,skin:q.skin,hair:{color:q.hair,style:q.haircut},face:q.face,hat:q.hat,eyeColor:q.eye}).catch((q=>{Q.RQr.createHandler("Failed to set player outfit from debug gui.")})),this.gameObject.transform.setScale(.125*q.scale,.125*q.scale)}))}this.onAppearanceLoaded.addOnce((()=>{this.onFirstAppearanceLoaded.dispatch()}))}fromPlayerAppearanceData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){this._spineComponent.isLoaded||(yield this._spineComponent.OnLoaded.asPromise());try{q.costume?yield Promise.all([this._gearManager.setGearAt(st.EQ.FACE,null,!1),this._gearManager.setGearAt(st.EQ.BOOTS,null,!1),this._gearManager.setGearAt(st.EQ.OUTFIT,null,!1),this._gearManager.setGearAt(st.EQ.HAIR,null,!1),this._gearManager.setGearAt(st.EQ.HAT,null,!1),this.setGearOfType(st.EQ.COSTUME,q.costume,"costume"),this.setGearOfType(st.EQ.WEAPON,q.weapon,"weapon")]):yield Promise.all([this._gearManager.setGearAt(st.EQ.COSTUME,null,!1),this.setGearOfType(st.EQ.FACE,q.face,"face"),this.setGearOfType(st.EQ.BOOTS,q.boot,"boot"),this.setGearOfType(st.EQ.OUTFIT,q.outfit,"outfit"),this.setGearOfType(st.EQ.WEAPON,q.weapon,"weapon"),this.setGearOfType(st.EQ.HAIR,q.hair.style,"hair"),this.setGearOfType(st.EQ.HAT,q.hat,"hat")]);for(let q=0;q{let tt=Y[K];if(tt||q!==st.EQ.OUTFIT||(tt=Y[1],Q.VyI.log(`Asset ${K} of type ${z} could not be found, falling back to default outfit.`,Q.$bb.Warning)),!tt){if(this._gearManager.setGearAt(q,null,!1).catch(Q.RQr.createHandler("setGearAt failed with no guid in PlayerDataAppearanceComponent")),Q.Aq$.isDefined(K)){q===st.EQ.HAIR&&53===K||Q.VyI.log(`Asset ${K} of type ${z} could not be found`,Q.$bb.Warning)}return void Z()}const et=()=>{const K=X.q.instance.game.cache.getJSON(tt);if(!K)return void J(new Error(`No content for ${tt} of type ${z}`));const Y=Q.KDe.fromGearFile(K);Y?(this._gearManager.setGearAt(q,Y,!1).catch(Q.RQr.createHandler("setGearAt failed with gearElement in PlayerDataAppearanceComponent")),Z()):J(new Error(`Failed to parse GearElement from file for ${tt} of type ${z}`))};X.q.instance.game.cache.checkJSONKey(tt)?et():X.q.instance.prodigy.load.assets([tt],et)}))}))}getGearMapByCategory(q){const K=this._scaling===st.M.UPSCALED_4x;switch(q){case st.EQ.FACE:return K?et.R.faceUpscaledMap:et.R.faceMap;case st.EQ.BOOTS:return K?et.R.bootUpscaledMap:et.R.bootMap;case st.EQ.OUTFIT:return K?et.R.outfitUpscaledMap:et.R.outfitMap;case st.EQ.WEAPON:return K?et.R.weaponUpscaledMap:et.R.weaponMap;case st.EQ.HAIR:return K?et.R.hairUpscaledMap:et.R.hairMap;case st.EQ.HAT:return K?et.R.hatUpscaledMap:et.R.hatMap;case st.EQ.COSTUME:return et.R.costumeMap}}addExtraGear(q,K=!0){if(this._extraGear.includes(q))return;const z=this._extraGear.push(q)-1;this._gearManager.setGearAt(nt+z,this._extraGear[z],!1).catch(Q.RQr.createHandler("PlayerDataAppearanceComponent: Error setting extra gear in addExtraGear")),K&&this._color.refresh().catch(Q.RQr.createHandler("PlayerDataAppearanceComponent: Error refreshing color when adding extra gear in addExtraGear"))}removeExtraGear(q,K=!0){const z=this._extraGear.indexOf(q);-1!==z&&(this._gearManager.removeGear(this._extraGear[z],!1),this._extraGear.splice(z,1),K&&this._color.refresh().catch(Q.RQr.createHandler("PlayerDataAppearanceComponent: Error refreshing color when removing extra gear in removeExtraGear")))}destroy(){this.onAppearanceLoaded.dispose(),this.onFirstAppearanceLoaded.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.Pqz)(Q.v2j),(0,Y.Sn)("design:type",Q.v2j)],at.prototype,"_spineComponent",void 0),(0,Y.Cg)([(0,Q.Pqz)(tt.c),(0,Y.Sn)("design:type",tt.c)],at.prototype,"_gearManager",void 0),(0,Y.Cg)([(0,Q.Pqz)(it.y),(0,Y.Sn)("design:type",it.y)],at.prototype,"_color",void 0),(0,Y.Cg)([(0,Q.Cdj)("PLAYER_APPEARANCE_SCALING"),(0,Y.Sn)("design:type",Number)],at.prototype,"_scaling",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onAppearanceLoaded",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onFirstAppearanceLoaded",void 0),at=(0,Y.Cg)([(0,Q.EVk)("PlayerDataAppearance",Q.YH6.animation)],at)},47734:(q,K,z)=>{"use strict";z.d(K,{z:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(63068);let J=class extends Q.uAl{constructor(){super(...arguments),this.WEAPON_SPINE_SLOT="weapon",this.HAT_SPINE_SLOT="hat-face",this.OUTFIT_SPINE_SLOT="torso",this._loadActivePlayer=!1}postCreate(){super.postCreate(),this.removeSlots(),this._loadActivePlayer&&this.loadPlayerAppearance()}loadPlayerAppearance(){var q,K,z;const Y=null!==(z=null===(K=null===(q=this.gameObject.parent.findComponentInChildren(Q.bE_))||void 0===q?void 0:q.Container.get("1eb-d7b4"))||void 0===K?void 0:K.getAppearance())&&void 0!==z?z:X.q.instance.prodigy.gameContainer.get("ad2-c5b2").getAppearance();this.updatePlayerAppearance(Y)}removeSlots(){const q={hiddenSlots:this._disabledSlots,attachments:[],slotsToNotRecolor:[]};this._playerDataAppearance.addExtraGear(q)}updatePlayerAppearance(q){q&&(q.outfit||(q.outfit=1),this.filterEnabledAppearanceAssets(q),this._playerDataAppearance.fromPlayerAppearanceData(Object.assign({},q)).catch(Q.RQr.createHandler("fromPlayerAppearanceData failed in PlayerSpineAppearanceSelectorComponent")))}filterEnabledAppearanceAssets(q){this._disabledSlots.includes(this.WEAPON_SPINE_SLOT)&&(q.weapon=null),this._disabledSlots.includes(this.OUTFIT_SPINE_SLOT)&&(q.outfit=null),this._disabledSlots.includes(this.HAT_SPINE_SLOT)&&(q.hat=null)}};(0,Y.Cg)([(0,Q.MnK)(Z.n),(0,Y.Sn)("design:type",Z.n)],J.prototype,"_playerDataAppearance",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.v2j),(0,Y.Sn)("design:type",Q.v2j)],J.prototype,"_spine",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_loadActivePlayer",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.W_S)(),(0,Y.Sn)("design:type",Array)],J.prototype,"_disabledSlots",void 0),J=(0,Y.Cg)([(0,Q.EVk)("PlayerSpineAppearanceSelector",Q.YH6.animation)],J)},97252:(q,K,z)=>{"use strict";var Y,Q,X;z.d(K,{At:()=>Q,EQ:()=>Y,M:()=>X}),function(q){q[q.BOOTS=0]="BOOTS",q[q.OUTFIT=1]="OUTFIT",q[q.WEAPON=2]="WEAPON",q[q.HAIR=3]="HAIR",q[q.HAT=4]="HAT",q[q.FACE=5]="FACE",q[q.COSTUME=6]="COSTUME"}(Y||(Y={})),function(q){q.Boots="boots",q.Outfit="outfit",q.Weapon="weapon",q.SpellRelic="spellRelic",q.Mount="mount",q.Costume="costume"}(Q||(Q={})),function(q){q[q.DEFAULT_1X=0]="DEFAULT_1X",q[q.UPSCALED_4x=1]="UPSCALED_4x"}(X||(X={}))},39571:(q,K,z)=>{"use strict";var Y;z.d(K,{a:()=>Y}),function(q){q.ActiveSideBack="unit-activeSide-back-",q.ActiveSideCast="unit-activeSide-cast-",q.ActiveSideFront="unit-activeSide-front-",q.InactiveSide="unit-inactiveSide-"}(Y||(Y={}))},77409:(q,K,z)=>{"use strict";z.d(K,{q:()=>Q});var Y=z(62459);class Q extends Y.uAl{create(){super.create(),this._filters=[],this.renderComponent||(this.renderComponent=this.gameObject.findComponentInChildren(Y.y4o,!0))}addFilter(q){this._filters.push(q),this.refreshFilters()}removeFilter(q){const K=this._filters.indexOf(q);K>-1&&this._filters.splice(K,1),this.refreshFilters()}refreshFilters(){var q;const K=null===(q=this.renderComponent)||void 0===q?void 0:q.getRootContainer();K&&(K.filters=this._filters)}}},76724:(q,K,z)=>{"use strict";z.d(K,{t:()=>J});var Y,Q=z(8674),X=z(62459),Z=z(91016);let J=Y=class extends Z.lL{constructor(){super(...arguments),this.id="multihit"}play(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=q.manager.steps.indexOf(this);let z=-1;for(let Y=K;Y{"use strict";z.d(K,{o:()=>xt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(35120),tt=z(91016);let et=class extends tt.lL{constructor(){super(...arguments),this.target=tt.Wo.Caster,this.delayPerTarget=0,this.isHidden=!1}play(q){return(0,Y.sH)(this,void 0,void 0,(function*(){this._timeouts=[],this.getTargets(q,this.target,((K,z)=>{this._timeouts.push(window.setTimeout((()=>{q.manager.onApplyDamage.dispatch(K,this.isHidden)}),1e3*this.delayPerTarget*z))}))}))}destroy(){if(this._timeouts)for(const q of this._timeouts)clearTimeout(q)}};et=(0,Y.Cg)([(0,Q.s0Z)("ApplyDamageStep")],et);var it=z(90351);class st extends tt.lL{constructor(){super(...arguments),this.blockSpell=!1}play(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.blockSpell)return new Promise(((q,K)=>{this._resolve||(this._resolve=[]),this._resolve.push(q),this._reject=q}))}))}}let nt=class extends st{constructor(){super(...arguments),this.target=tt.Wo.Caster,this.delayPerTarget=0,this.movePositionX=0,this.movePositionY=0,this.scaleAmountX=1,this.scaleAmountY=1,this.rotationAmount=0,this.moveTime=.5,this.returnTime=.5,this.positionChangeEase=it.i.ExponentialInOut,this.positionReturnEase=it.i.ExponentialInOut,this.scaleChangeEase=it.i.ExponentialInOut,this.scaleReturnEase=it.i.ExponentialInOut,this.rotationChangeEase=it.i.ExponentialInOut,this.rotationReturnEase=it.i.ExponentialInOut}play(q){const K=Object.create(null,{play:{get:()=>super.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y;const Q=K.play.call(this,q),X=[];this.getTargets(q,this.target,((q,K)=>{X.push(this.animate(q,this.delayPerTarget*K*1e3))}));const Z=(null===(z=this._resolve)||void 0===z?void 0:z.length)>0?this._resolve.shift():void 0;return Promise.all(X).then(null==Z?void 0:Z.bind(this),null===(Y=this._reject)||void 0===Y?void 0:Y.bind(this)),Q}))}animate(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=Math.sign(q.transform.localScale.x),Y=Math.sign(q.transform.localScale.y),X={x:q.transform.localScale.x,y:q.transform.localScale.y},Z={x:q.transform.localPosition.x,y:q.transform.localPosition.y},tt=q.transform.localRotation;return yield Q.Egh.timeout(K),yield new Promise((K=>{J.q.instance.game.add.tween(q.transform.localPosition,this,!0).to({x:Z.x-this.movePositionX*z,y:Z.y-this.movePositionY*Y},1e3*this.moveTime,it.K.getEasingFunctionFromEnum(this.positionChangeEase)).start();const Q={x:q.transform.localScale.x,y:q.transform.localScale.y},X=J.q.instance.game.add.tween(Q,this,!0);X.to({x:this.scaleAmountX*z,y:this.scaleAmountY*Y},1e3*this.moveTime,it.K.getEasingFunctionFromEnum(this.scaleChangeEase)),X.onUpdate.add((()=>{q.transform.setScale(Q.x,Q.y)})),X.start();const tt=J.q.instance.game.add.tween(q.transform,this,!0);tt.to({localRotation:this.rotationAmount},1e3*this.moveTime,it.K.getEasingFunctionFromEnum(this.rotationChangeEase)),tt.onTweenComplete.addOnce(K),tt.start()})),yield new Promise((K=>{J.q.instance.game.add.tween(q.transform.localPosition,this,!0).to({x:Z.x,y:Z.y},1e3*this.returnTime,it.K.getEasingFunctionFromEnum(this.positionReturnEase)).start();const z={x:q.transform.localScale.x,y:q.transform.localScale.y},Y=J.q.instance.game.add.tween(z,this,!0);Y.to({x:X.x,y:X.y},1e3*this.returnTime,it.K.getEasingFunctionFromEnum(this.scaleReturnEase)),Y.onUpdate.add((()=>{q.transform.setScale(z.x,z.y)})),Y.start();const Q=J.q.instance.game.add.tween(q.transform,this,!0);Q.to({localRotation:tt},1e3*this.returnTime,it.K.getEasingFunctionFromEnum(this.rotationReturnEase)),Q.onTweenComplete.addOnce(K),Q.start()})),Promise.resolve()}))}};var at;nt=(0,Y.Cg)([(0,Q.s0Z)("GenericMotionStep")],nt);let rt=at=class extends st{constructor(){super(...arguments),this.target=tt.Wo.Targets,this.delayPerTarget=0,this.knockbackDistance=35,this.knockbackAngle=0,this.knockbackTime=.1,this.returnTime=.9,this.knockbackEase=it.i.CircularOut,this.returnEase=it.i.ExponentialOut}play(q){const K=Object.create(null,{play:{get:()=>super.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y;const Q=K.play.call(this,q),X=[];this.getTargets(q,this.target,((K,z)=>{X.push(this.animate(q,K,this.delayPerTarget*z*1e3))}));const Z=(null===(z=this._resolve)||void 0===z?void 0:z.length)>0?this._resolve.shift():void 0;return Promise.all(X).then(null==Z?void 0:Z.bind(this),null===(Y=this._reject)||void 0===Y?void 0:Y.bind(this)),Q}))}animate(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,Y;const X=J.q.instance.game.tweens.getAll();for(const z of X)if((null===(q=z.owner)||void 0===q?void 0:q.step)instanceof at&&(null===(Y=z.owner)||void 0===Y?void 0:Y.target)===K){z.stop(!0);break}const Z=Math.sign(K.transform.localScale.x),tt={x:K.transform.localPosition.x,y:K.transform.localPosition.y},et=this.knockbackAngle*Q.cj9.DEG_TO_RAD+Math.PI,st={x:tt.x+Math.cos(et)*this.knockbackDistance*Z,y:tt.y+Math.sin(et)*this.knockbackDistance};return yield Q.Egh.timeout(z),yield new Promise((q=>{const z=J.q.instance.game.add.tween(K.transform.localPosition,{step:this,target:K},!0);z.to(st,1e3*this.knockbackTime,it.K.getEasingFunctionFromEnum(this.knockbackEase)).to(tt,1e3*this.returnTime,it.K.getEasingFunctionFromEnum(this.returnEase)),z.onTweenComplete.addOnce(q),z.start()})),Promise.resolve()}))}};rt=at=(0,Y.Cg)([(0,Q.s0Z)("KnockbackStep")],rt);let ot=class extends tt.lL{constructor(){super(...arguments),this.id="multihit"}};ot=(0,Y.Cg)([(0,Q.s0Z)("MultiHitEndStep")],ot);var ht=z(76724),ct=z(83441),dt=z(29834);let lt=class extends st{constructor(){super(...arguments),this.target=tt.Wo.Caster,this.animation="attack",this.returnToLoop="idle"}play(q){const K=Object.create(null,{play:{get:()=>super.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y;let X;switch(this._animators=[],this.target){case tt.Wo.Caster:if(!q.caster)return;X=[q.caster.gameObject];break;case tt.Wo.Centre:X=[q.manager.GameObject];break;default:X=q.targets.map((q=>q.gameObject))}for(let q=0;q{var q;K.playAnimation(this.returnToLoop,!0),(null===(q=this._resolve)||void 0===q?void 0:q.length)>0&&this._resolve.shift()()}))}else this._reject&&this._reject("target animator not found, skipping spell")}yield K.play.call(this,q)}))}};lt=(0,Y.Cg)([(0,Q.s0Z)("PlayAnimationStep")],lt);var ut,ft=z(68910),bt=z(56942),pt=z(28402);!function(q){q.SpellSlotBack="spell-slot-back-",q.SpellSlotFront="spell-slot-front-"}(ut||(ut={}));let vt=class extends st{constructor(){super(...arguments),this.target=tt.Wo.Caster,this.isBelow=!1,this.layerOverride=tt.Cr.None,this.spineID=bt.Q.Default_follow_172_json,this.animation="idle",this.scale=1,this.offset={x:0,y:0},this.delayPerTarget=0,this.rotateTowards=!1,this.rotateOffset={x:0,y:0},this.allowMultipleSpineInstances=!1,this._spineCount=[],this._activeSpines=[]}play(q){const K=Object.create(null,{play:{get:()=>super.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y,X,Z;this._activeSpines=[],this._timeouts=[];const J=Math.sign(null!==(Y=null===(z=q.caster)||void 0===z?void 0:z.gameObject.transform.localScale.x)&&void 0!==Y?Y:1),et=this.target===tt.Wo.Caster&&q.spellOriginOffset?q.spellOriginOffset:{x:0,y:0},it=[tt.Wo.Caster,tt.Wo.Targets,tt.Wo.TargetsAverage].includes(this.target)&&null!==(Z=null===(X=q.caster)||void 0===X?void 0:X.gameObject.transform.worldScale.y)&&void 0!==Z?Z:1;let st=0;this.getTargets(q,this.target,((K,z)=>{let Y=this.getOppositeTargets(q,this.target);!this.allowMultipleSpineInstances&&(null==Y?void 0:Y.length)>1&&(Y=[Y[0]]);const X=Math.max(Y.length,1);for(let q=0;q{var z,X,Z;const st=this.target===tt.Wo.Caster?it:this.target===tt.Wo.Targets?K.transform.worldScale.y:1,nt=new Q._mx;nt.name=`PlaySpineStep_${q}`;const at=this.isBelow&&null!==(X=null===(z=K.parent)||void 0===z?void 0:z.children.length)&&void 0!==X?X:0;null===(Z=K.parent)||void 0===Z||Z.addChildAt(nt,at);const rt=new ft.Point(K.transform.worldPosition.x+(this.offset.x+et.x)*st*J,K.transform.worldPosition.y+(this.offset.y+et.y)*st);nt.addComponent(Q.dLy).worldPosition=rt;const ot=it/nt.transform.worldScale.y;if(nt.transform.localScale=new ft.Point(this.scale*ot*J,this.scale*ot),this.layerOverride!==tt.Cr.None)nt.layer=this.layerOverride;else if(this.target===tt.Wo.Caster||this.target===tt.Wo.Targets){const q=this.isBelow?ut.SpellSlotBack:ut.SpellSlotFront,z=K.layer.charAt(K.layer.length-1);nt.layer=`${q}${z}`}else nt.layer=this.isBelow?"background":"foreground";const ht=nt.addComponent(pt.v),ct=nt.addComponent(dt.j);if(ht.setAsset(this.spineID,this.onSpineLoaded.bind(this,ct)),ht.isLoaded&&this.onSpineLoaded(ct),this.rotateTowards){const K=null==Y?void 0:Y[q].transform;if(K){let q=Math.atan2(K.worldPosition.y+this.rotateOffset.y-rt.y,K.worldPosition.x+this.rotateOffset.x*Math.sign(K.localScale.x)-rt.x);J<0&&(q+=Math.PI),ct.GameObject.transform.setRotation(q/Math.PI*180)}}}),1e3*this.delayPerTarget*(z+q))),st++})),st<=0||(this._spineCount||(this._spineCount=[]),this._spineCount.push(st),yield K.play.call(this,q))}))}onSpineLoaded(q){this._activeSpines.includes(q)||(this._activeSpines.push(q),q.playAnimation(this.animation,!1),q.spine.getSpine().onComplete.add((()=>{this.cleanupSpine(q)}),this),q.spine.getSpine().updateMethod=Q.ba$.Spine)}cleanupSpine(q){var K;this._activeSpines&&(q.spine.getSpine().onComplete.removeAll(this),q.GameObject.destroyDeferred(),this._activeSpines.splice(this._activeSpines.indexOf(q),1),this._spineCount.length>0&&(this._spineCount[0]--,0===this._spineCount[0]&&(this._spineCount.shift(),(null===(K=this._resolve)||void 0===K?void 0:K.length)>0&&this._resolve.shift()())))}finish(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield Promise.all(this._activeSpines.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return q.spine.getSpine().onComplete.asPromise()})))))}))}destroy(){if(this._timeouts)for(let q=0;qsuper.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){yield K.play.call(this,q),this._activePrefabs=[],this._promises=[],this.getTargets(q,this.target,((q,K)=>(0,Y.sH)(this,void 0,void 0,(function*(){const z=Q.Egh.cancelableTimeout(this.delayPerTarget*K*1e3);this._promises.push(z),yield z.promise,this.destroyPrefabsOnDestroy&&z.cancelled||this.loadPrefab(q)}))))}))}loadPrefab(q){const K=J.q.instance.prodigy.gameContainer.get("983-05a7"),z=mt.d.loadWithInjectedValuesAndDependenciesFromGUID(K,this.prefabID,{},q).then((q=>{this.destroyPrefabsOnDestroy&&z.cancelled?q.destroyDeferred():(this._activePrefabs.push(q),q.transform.localPosition=this.offset)}));this._promises.push(z)}destroy(){for(let q=0;qsuper.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){this.destroyPrefabsOnDestroy=!1,yield K.play.call(this,q)}))}loadPrefab(q){var K,z,Y,Q;const X=this._spellData.targets.find((K=>K.gameObject===q)),Z=null===(K=this._spellData.manager.battleController)||void 0===K?void 0:K.getUnitById(null!==(z=null==X?void 0:X.unitId)&&void 0!==z?z:"");this._spellData.manager.statusEffectAnimationController.queueAnimationAction(this.prefabID,null!==(Y=null==X?void 0:X.statusEffectContainer)&&void 0!==Y?Y:q,this.statusEffectAnimation,this.blockStatusEffectAnimationQueue,null!==(Q=null==Z?void 0:Z.size)&&void 0!==Q?Q:gt.X.Normal)}destroy(){this._statusEffectAnimations.length=0,super.destroy()}getOverrideInspectorNode(q,K,z){return"statusEffectAnimation"===q?Q.Gme.enumGroup({id:K,labelValue:q,selectValue:this[q],onChange:q=>{z("",q)}},_t.l):"destroyPrefabsOnDestroy"!==q}};Et=(0,Y.Cg)([(0,Q.s0Z)("PlayStatusEffectStep")],Et);let wt=class extends st{constructor(){super(...arguments),this.spineID=bt.Q.Default_follow_172_json,this.animation="idle",this.scale=1,this.startOffset={x:0,y:0},this.endOffset={x:0,y:0},this.delayPerTarget=0,this.travelTime=1,this.syncAnimation=!0,this.rotateTowards=!0,this.isBelow=!1,this._spineCount=[]}play(q){const K=Object.create(null,{play:{get:()=>super.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y,X;if(!q.caster)return void Q.VyI.log("Spells with PlayTravelingSpineStep require a caster",Q.$bb.Error);this._activeSpines=[],this._activeTweens=[],this._timeouts=[],this._positionScale=Math.sign(q.caster.gameObject.transform.localScale.x);const Z=null!==(z=q.spellOriginOffset)&&void 0!==z?z:{x:0,y:0},J=(this.startOffset.x+Z.x)*this._positionScale,tt=this.startOffset.y+Z.y,et=this.endOffset.x*this._positionScale,it=this.endOffset.y,st=null!==(X=null===(Y=q.caster)||void 0===Y?void 0:Y.gameObject.transform.worldScale.y)&&void 0!==X?X:1;let nt=0;for(let K=0;K{const z=q.targets[K].gameObject,Y=new Q._mx(q.caster.gameObject.parent),X=this.isBelow?ut.SpellSlotBack:ut.SpellSlotFront,Z=z.layer.charAt(z.layer.length-1);Y.layer=`${X}${Z}`,Y.addComponent(Q.dLy);const nt=st/Y.transform.worldScale.y;Y.transform.localScale=new ft.Point(this.scale*nt*this._positionScale,this.scale*nt);const at=Y.addComponent(pt.v),rt=Y.addComponent(dt.j);at.setAsset(this.spineID,this.onSpineLoaded.bind(this,rt)),at.isLoaded&&this.onSpineLoaded(rt);const ot={x:q.caster.gameObject.transform.worldPosition.x+J*st,y:q.caster.gameObject.transform.worldPosition.y+tt*st},ht={x:z.transform.worldPosition.x+et*z.transform.worldScale.y,y:z.transform.worldPosition.y+it*z.transform.worldScale.y};this.doTween(ot,ht,rt)}),1e3*this.delayPerTarget*K)),nt++;this._spineCount||(this._spineCount=[]),this._spineCount.push(nt),yield K.play.call(this,q)}))}doTween(q,K,z){if(z.GameObject.transform.worldPosition=q,this.rotateTowards){let Y=Math.atan2(K.y-q.y,K.x-q.x);this._positionScale<0&&(Y+=Math.PI),z.GameObject.transform.setRotation(Y/Math.PI*180)}z.GameObject.update();const Y=J.q.instance.game.add.tween(q,this,!0).to(K,1e3*this.travelTime,Q.GS3.Linear.None,!1);Y.onUpdate.add((()=>{z.GameObject.transform.worldPosition=q}),this),Y.onTweenComplete.addOnce((()=>{this.cleanupSpine(z)})),Y.start(),this._activeTweens.push(Y)}onSpineLoaded(q){if(-1!==this._activeSpines.indexOf(q))return;this._activeSpines.push(q);const K=q.spine.getSpine().setAnimationByName(0,this.animation,!this.syncAnimation).animationEnd;this.syncAnimation&&(q.spine.getSpine().state.timeScale=K/this.travelTime),q.spine.getSpine().updateMethod=Q.ba$.Spine}cleanupSpine(q){var K;q.spine.getSpine().onComplete.removeAll(this),q.GameObject.destroyDeferred(),this._activeSpines.splice(this._activeSpines.indexOf(q),1),this._spineCount.length>0&&(this._spineCount[0]--,0===this._spineCount[0]&&(this._spineCount.shift(),(null===(K=this._resolve)||void 0===K?void 0:K.length)>0&&this._resolve.shift()()))}finish(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield Promise.race([Promise.all(this._activeTweens.filter((q=>!q.isDestroyed)).map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return q.onTweenComplete.asPromise()}))))),Q.Egh.timeout(5e3)])}))}destroy(){for(let q=0;q{J.q.instance.game.tweens.remove(q)})),this._activeSpines.length=0,this._activeTweens.length=0,this._timeouts.length=0}getLoadDependencies(){return[this.spineID]}};wt=(0,Y.Cg)([(0,Q.s0Z)("PlayTravelingSpineStep")],wt);var Tt,St=z(84938);let At=Tt=class extends st{constructor(){super(...arguments),this.target=tt.Wo.Camera,this.delayPerTarget=0,this.xShakeDistance=15,this.yShakeDistance=15,this.attackTime=.1,this.holdTime=0,this.returnTime=.5,this.attackEase=it.i.CircularOut,this.returnEase=it.i.ExponentialOut}play(q){const K=Object.create(null,{play:{get:()=>super.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y;const Q=K.play.call(this,q),X=[];this.getTargets(q,this.target,((K,z)=>{X.push(this.animate(q,K,this.delayPerTarget*z*1e3))}));const Z=(null===(z=this._resolve)||void 0===z?void 0:z.length)>0?this._resolve.shift():void 0;return Promise.all(X).then(null==Z?void 0:Z.bind(this),null===(Y=this._reject)||void 0===Y?void 0:Y.bind(this)),Q}))}animate(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){var q,Y;const X=J.q.instance.game.tweens.getAll();for(const z of X)if((null===(q=z.owner)||void 0===q?void 0:q.step)instanceof Tt&&(null===(Y=z.owner)||void 0===Y?void 0:Y.target)===K){z.stop(!0);break}yield Q.Egh.timeout(z);const Z={x:K.transform.localPosition.x,y:K.transform.localPosition.y},tt={strength:0};return yield new Promise((q=>{const z=J.q.instance.game.add.tween(tt,{step:this,target:K},!0);z.to({strength:1},1e3*this.attackTime,it.K.getEasingFunctionFromEnum(this.attackEase)).to({strength:1},1e3*this.holdTime).to({strength:0},1e3*this.returnTime,it.K.getEasingFunctionFromEnum(this.returnEase)),z.onUpdate.add((()=>{K.transform.setPosition(Z.x+(2*Math.random()-1)*tt.strength*this.xShakeDistance*St.B.screenShake.value,Z.y+(2*Math.random()-1)*tt.strength*this.yShakeDistance*St.B.screenShake.value)})),z.onTweenComplete.addOnce((()=>{K.transform.setPosition(Z.x,Z.y),q()})),z.start()})),Promise.resolve()}))}};At=Tt=(0,Y.Cg)([(0,Q.s0Z)("ShakeStep")],At);var Ct=z(51742);let Ot=class extends st{constructor(){super(...arguments),this.target=tt.Wo.Caster,this.delayPerTarget=0,this.volume=1,this.startTime=0,this.duration=-1,this.soundGUID=Ct.c.Sfx_ancient_teleport}play(q){const K=Object.create(null,{play:{get:()=>super.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y;const Q=K.play.call(this,q),X=[];this.getTargets(q,this.target,((q,K)=>{X.push(this.playSound(q,this.delayPerTarget*K*1e3))}));const Z=(null===(z=this._resolve)||void 0===z?void 0:z.length)>0?this._resolve.shift():void 0;return Promise.all(X).then(null==Z?void 0:Z.bind(this),null===(Y=this._reject)||void 0===Y?void 0:Y.bind(this)),Q}))}playSound(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){yield Q.Egh.timeout(K);const q=St.B.effectVolume.value,z=J.q.instance.game.sound.add(this.soundGUID);return z.addMarker("play",this.startTime,this.duration>0?this.duration:z.duration,this.volume*q),yield new Promise((q=>{z.play("play",q)})),Promise.resolve()}))}getLoadDependencies(){return[this.soundGUID]}};Ot=(0,Y.Cg)([(0,Q.s0Z)("SoundStep")],Ot);z(3583);var It,Dt=z(77409);let Rt=It=class extends st{constructor(){super(...arguments),this.target=tt.Wo.Caster,this.color="FF0000",this.intensity=1,this.attack=.3,this.sustain=.3,this.release=.3,this.blend=Q.PzZ.Multiply,this.delayPerTarget=0}play(q){const K=Object.create(null,{play:{get:()=>super.play}});return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y;const Q=K.play.call(this,q),X=[];this.getTargets(q,this.target,((q,K)=>{X.push(this.animateTint(q,this.delayPerTarget*K*1e3))}));const Z=(null===(z=this._resolve)||void 0===z?void 0:z.length)>0?this._resolve.shift():void 0;return Promise.all(X).then(null==Z?void 0:Z.bind(this),null===(Y=this._reject)||void 0===Y?void 0:Y.bind(this)),Q}))}animateTint(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y;const X=J.q.instance.game.tweens.getAll();for(const K of X)if((null===(z=K.owner)||void 0===z?void 0:z.step)instanceof It&&(null===(Y=K.owner)||void 0===Y?void 0:Y.target)===q){K.stop(!0);break}let Z=q.findComponent(Dt.q);Z||(Z=q.addComponent(Dt.q));const tt=new Q.oWr({color:Number.parseInt(this.color,16),tintIntensity:0,blend:this.blend});return yield Q.Egh.timeout(K),Z.addFilter(tt),yield new Promise((K=>{const z=J.q.instance.game.add.tween(tt,{step:this,target:q},!0);z.to({tintIntensity:this.intensity},1e3*this.attack).to({tintIntensity:this.intensity},1e3*this.sustain).to({tintIntensity:0},1e3*this.release),z.onTweenComplete.addOnce(K),z.start()})),Z.removeFilter(tt),Promise.resolve()}))}};Rt=It=(0,Y.Cg)([(0,Q.s0Z)("TintSpineStep")],Rt);var Pt=z(26460);let Mt=class extends tt.lL{constructor(){super(...arguments),this.delay=1}play(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return Q.Egh.timeout(1e3*this.delay)}))}};var Nt;Mt=(0,Y.Cg)([(0,Q.s0Z)("WaitStep")],Mt);let xt=Nt=class extends Q.uAl{constructor(){super(...arguments),this.steps=[],this.index=0,this.subThreads=[],this._loadPromise=new Q.bnh,this.assetIDs=[]}static createSpell(q){const K=new q;return K.__type=K.constructor.name,K}get loadPromise(){return this._loadPromise}create(){var q;super.create(),this.onApplyDamage=new Q.HN0,this.battleController=Q.wa5.getActiveScene().container.get("BattleController"),this.statusEffectAnimationController=null===(q=this.battleController)||void 0===q?void 0:q.statusEffectAnimationController}begin(q){return(0,Y.sH)(this,void 0,void 0,(function*(){for(q.multiHit>1&&this.ensureMultihits(q),this.index=0;this.index{throw Q.RQr.logError(q,""),q}))}this.subThreads.length>0&&(yield Promise.all(this.subThreads)),yield Promise.all(this.steps.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return q.finish()})))));for(let q=0;q=K?Q.VyI.log("Invalid index range.",Q.$bb.Error):"MultiHitStartStep"===(null===(Z=this.steps[q])||void 0===Z?void 0:Z.__type)?"MultiHitEndStep"===(null===(J=this.steps[K])||void 0===J?void 0:J.__type)?this.subThreads.push((()=>(0,Y.sH)(this,void 0,void 0,(function*(){yield Q.Egh.timeout(z);const Y=[];for(let z=q+1;z{throw Q.RQr.logError(q,""),q})):Q.VyI.log("Nested multihit ranges are not supported.",Q.$bb.Error)}for(let q=0;q"MultiHitStartStep"===q.__type)),z=this.steps.find((q=>"MultiHitEndStep"===q.__type));if(!K){const q=Nt.createSpell(ht.t);q.__type="MultiHitStartStep",this.steps.unshift(q),this._rawSpellStepData.unshift({__type:"MultiHitStartStep"}),Q.VyI.log("MultiHitStartStep was added for compatibility. Please include this step for multihit functionality.",Q.$bb.Warning)}if(!z){const q=Nt.createSpell(ot);q.__type="MultiHitEndStep",this.steps.push(q),this._rawSpellStepData.push({__type:"MultiHitEndStep"}),Q.VyI.log("MultiHitEndStep was added for compatibility. Please include this step for multihit functionality.",Q.$bb.Warning)}}deserializeSpell(){const q=J.q.instance.game.cache.getJSON(this.spellGUID);if(q){this._rawSpellStepData=q.steps;for(let q=0;q{q[z]=Z().cloneDeep(K[z])})),q}}preloadAssets(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(this.spellGUID){J.q.instance.game.cache.checkJSONKey(this.spellGUID)?this.deserializeSpell():yield new Promise(((q,K)=>{J.q.instance.prodigy.load.assets([this.spellGUID],((z,Y)=>{Y?(this.deserializeSpell(),q(void 0)):K(new Error(`App.instance.prodigy.load failed for assets ${this.spellGUID}`))}))}));for(const q of this.steps)this.assetIDs.push.apply(this.assetIDs,q.getLoadDependencies());return new Promise(((q,K)=>{J.q.instance.prodigy.load.assets(this.assetIDs,((z,Y)=>{Y?(this._loadPromise.resolve(),q()):K(new Error(`App.instance.prodigy.load failed for assets ${this.assetIDs.join(", ")}`))}))}))}Q.VyI.log("Please set spellGUID before calling SpellComponent. Exiting the function, nothing was loaded.",Q.$bb.Error)}))}destroy(){super.destroy(),this.onApplyDamage.dispose()}};xt.spellConstructors=new Map([[tt.dZ.ApplyDamage,Nt.createSpell.bind(Nt,et)],[tt.dZ.Knockback,Nt.createSpell.bind(Nt,rt)],[tt.dZ.MultiHitStart,Nt.createSpell.bind(Nt,ht.t)],[tt.dZ.MultiHitEnd,Nt.createSpell.bind(Nt,ot)],[tt.dZ.PlayAnimation,Nt.createSpell.bind(Nt,lt)],[tt.dZ.PlaySpine,Nt.createSpell.bind(Nt,vt)],[tt.dZ.PlayStatusEffect,Nt.createSpell.bind(Nt,Et)],[tt.dZ.PlayTravelingSpine,Nt.createSpell.bind(Nt,wt)],[tt.dZ.Shake,Nt.createSpell.bind(Nt,At)],[tt.dZ.Sound,Nt.createSpell.bind(Nt,Ot)],[tt.dZ.SpawnPrefab,Nt.createSpell.bind(Nt,yt)],[tt.dZ.TintSpineStep,Nt.createSpell.bind(Nt,Rt)],[tt.dZ.Wait,Nt.createSpell.bind(Nt,Mt)],[tt.dZ.WaitForAnimationEvent,Nt.createSpell.bind(Nt,Pt.D)],[tt.dZ.GenericMotion,Nt.createSpell.bind(Nt,nt)]]),(0,Y.Cg)([(0,Q.tW2)("spell"),(0,Y.Sn)("design:type",String)],xt.prototype,"spellGUID",void 0),xt=Nt=(0,Y.Cg)([(0,Q.EVk)("Spell",Q.YH6.animation)],xt)},91016:(q,K,z)=>{"use strict";z.d(K,{Cr:()=>X,Wo:()=>Y,dZ:()=>Q,lL:()=>tt});var Y,Q,X,Z=z(8674),J=z(62459);!function(q){q[q.Caster=0]="Caster",q[q.Targets=1]="Targets",q[q.Centre=2]="Centre",q[q.TargetsAverage=3]="TargetsAverage",q[q.Camera=4]="Camera"}(Y||(Y={})),function(q){q.ApplyDamage="ApplyDamage",q.ApplyStatus="ApplyStatus",q.GenericMotion="GenericMotion",q.Knockback="Knockback",q.MultiHitStart="MultiHitStart",q.MultiHitEnd="MultiHitEnd",q.PlayAnimation="PlayAnimation",q.PlaySpine="PlaySpine",q.PlayStatusEffect="PlayStatusEffect",q.PlayTravelingSpine="PlayTravelingSpine",q.Shake="Shake",q.Sound="Sound",q.SpawnPrefab="SpawnPrefab",q.TintSpineStep="TintSpine",q.WaitForAnimationEvent="WaitForAnimationEvent",q.Wait="Wait"}(Q||(Q={})),function(q){q.None="none",q.Content="content",q.Background="background",q.Foreground="foreground",q.AboveForeground="above-foreground"}(X||(X={}));class tt{play(q){return(0,Z.sH)(this,void 0,void 0,(function*(){this._spellData=q,this._spellComponent=q.manager}))}getTargets(q,K,z){let Q;const X=q.targets.map((q=>q.gameObject));switch(K){case Y.Caster:Q=q.caster?[q.caster.gameObject]:[];break;case Y.Centre:Q=[q.manager.GameObject];break;case Y.TargetsAverage:this._targetsAverage=new J._mx,this._targetsAverage.addComponent(J.dLy);const K=new J.I9Y;for(let q=0;qq.gameObject))}return[]}finish(){return(0,Z.sH)(this,void 0,void 0,(function*(){}))}destroy(){this._targetsAverage&&(this._targetsAverage.destroy(),this._targetsAverage=null)}getLoadDependencies(){return[]}getOverrideInspectorNode(q,K,z){return!0}}},90076:(q,K,z)=>{"use strict";z.d(K,{l:()=>Y,r:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(28152),tt=z(29834);!function(q){q.Apply="apply",q.Trigger="trigger",q.Idle1TurnRemaining="idle4",q.Idle2TurnsRemaining="idle3",q.Idle3TurnsRemaining="idle2",q.Idle4TurnsRemaining="idle1",q.Exit="exit",q.Hide="hide"}(Y||(Y={}));let et=class extends X.uAl{constructor(){super(...arguments),this._showApplyAnimation=new X.HN0,this._showTriggerAnimation=new X.HN0,this._showDefaultOr1TurnRemainingIdle=new X.HN0,this._show2TurnRemainingIdle=new X.HN0,this._show3TurnRemainingIdle=new X.HN0,this._show4TurnRemainingIdle=new X.HN0,this._showExitAnimation=new X.HN0,this._ignoreSameAnimation=!1,this.onAnimationComplete=new X.HN0,this.onStatusEffectHidden=new X.HN0}testApplyAnimation(){this.playAnimation(Y.Apply)}testTriggerAnimation(){this.playAnimation(Y.Trigger)}testIdle1Animation(){this.playAnimation(Y.Idle1TurnRemaining)}testIdle2Animation(){this.playAnimation(Y.Idle2TurnsRemaining)}testIdle3Animation(){this.playAnimation(Y.Idle3TurnsRemaining)}testIdle4Animation(){this.playAnimation(Y.Idle4TurnsRemaining)}testExitAnimation(){this.playAnimation(Y.Exit)}create(){super.create(),this._rootRenderComponent=this.gameObject.findComponent(X.y4o),this._rootRenderComponent||(this._rootRenderComponent=this.gameObject.addComponent(X.jsv));const q={alpha:1};this._fadeOutTween=Z.q.instance.game.add.tween(q,this,!1),this._fadeOutTween.to({alpha:0},500),this._fadeOutTween.onUpdate.add((()=>{this._rootRenderComponent.getRootContainer().alpha=q.alpha})),this._fadeOutTween.onTweenComplete.add((()=>{this.disableAllRenderComponents(),q.alpha=1,this._rootRenderComponent.getRootContainer().alpha=1,this.onStatusEffectHidden.dispatch(),this.onAnimationComplete.dispatch()}))}playAnimation(q){var K,z;if(this._ignoreSameAnimation&&this.shouldIgnore(q))return!1;let Q;switch(this._currentAnimation=q,q){case Y.Apply:Q=this._showApplyAnimation;break;case Y.Trigger:Q=this._showTriggerAnimation;break;case Y.Idle1TurnRemaining:Q=this.getIdleSignal(1);break;case Y.Idle2TurnsRemaining:Q=this.getIdleSignal(2);break;case Y.Idle3TurnsRemaining:Q=this.getIdleSignal(3);break;case Y.Idle4TurnsRemaining:Q=this.getIdleSignal(4);break;case Y.Exit:Q=this._showExitAnimation;break;case Y.Hide:return void((null===(K=this._fadeOutTween)||void 0===K?void 0:K.isRunning)||null===(z=this._fadeOutTween)||void 0===z||z.start());default:throw new Error(`StatusEffectComponent: Trying to set invalid animation state: ${q}`)}this.disableAllRenderComponents();const Z=[];return Q._bindings.forEach((q=>{var K;if(void 0===(null===(K=q.context)||void 0===K?void 0:K.GameObject))return;q.context.GameObject.active=!0;const z=q.context.GameObject.findComponentInChildren(tt.j);z&&Z.push(z.OnAnimationComplete.asPromise());const Y=q.context.GameObject.findComponentInChildren(X.okU);Y&&Z.push(Y.onAllParticlesDead.asPromise())})),Promise.race([X.Egh.timeout(2e3),Promise.all(Z)]).then((()=>this.onAnimationComplete.dispatch())).catch(X.RQr.createHandler("StatusEffectAnimationComponent.playAnimation Error waiting for animation to complete")),Q.dispatch(),!0}disableAllRenderComponents(){this.gameObject.findComponentsInChildren(tt.j).forEach((q=>{q.GameObject.active=!1})),this.gameObject.findComponentsInChildren(X.okU).forEach((q=>{q.GameObject.active=!1}))}getIdleSignal(q){return q>=4&&this._show4TurnRemainingIdle.getBindingsCount()>0?this._show4TurnRemainingIdle:q>=3&&this._show3TurnRemainingIdle.getBindingsCount()>0?this._show3TurnRemainingIdle:q>=2&&this._show2TurnRemainingIdle.getBindingsCount()>0?this._show2TurnRemainingIdle:this._showDefaultOr1TurnRemainingIdle}destroy(){this._showApplyAnimation.dispose(),this._showTriggerAnimation.dispose(),this._showDefaultOr1TurnRemainingIdle.dispose(),this._show2TurnRemainingIdle.dispose(),this._show3TurnRemainingIdle.dispose(),this._show4TurnRemainingIdle.dispose(),this._showExitAnimation.dispose(),this.onAnimationComplete.dispose(),this.onStatusEffectHidden.dispose(),this._fadeOutTween&&Z.q.instance.game.tweens.remove(this._fadeOutTween),super.destroy()}shouldIgnore(q){return(q===Y.Idle1TurnRemaining||q===Y.Idle2TurnsRemaining||q===Y.Idle3TurnsRemaining||q===Y.Idle4TurnsRemaining)&&this._currentAnimation===q}};(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Signal to fire when the status effect is first applied to the unit"),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"_showApplyAnimation",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Signal to fire when the status effect is triggered (e.g. for a DOT effect)"),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"_showTriggerAnimation",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Signal to show the 1 turn remaining idle animation, which also serves as the default idle animation"),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"_showDefaultOr1TurnRemainingIdle",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Signal to show the 2 turn remaining idle animation"),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"_show2TurnRemainingIdle",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Signal to show the 3 turn remaining idle animation"),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"_show3TurnRemainingIdle",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Signal to show the 4 turn remaining idle animation"),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"_show4TurnRemainingIdle",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,X.YLv)("Signal to fire when the status effect is removed from the unit"),(0,Q.Sn)("design:type",X.HN0)],et.prototype,"_showExitAnimation",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,X.YLv)("Whether to ignore playAnimation when the animation specified is already playing"),(0,Q.Sn)("design:type",Boolean)],et.prototype,"_ignoreSameAnimation",void 0),(0,Q.Cg)([(0,X.GO0)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],et.prototype,"testApplyAnimation",null),(0,Q.Cg)([(0,X.GO0)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],et.prototype,"testTriggerAnimation",null),(0,Q.Cg)([(0,X.GO0)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],et.prototype,"testIdle1Animation",null),(0,Q.Cg)([(0,X.GO0)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],et.prototype,"testIdle2Animation",null),(0,Q.Cg)([(0,X.GO0)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],et.prototype,"testIdle3Animation",null),(0,Q.Cg)([(0,X.GO0)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],et.prototype,"testIdle4Animation",null),(0,Q.Cg)([(0,X.GO0)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],et.prototype,"testExitAnimation",null),et=(0,Q.Cg)([(0,X.EVk)("StatusEffectAnimation",J.Y.animation)],et)},3583:(q,K,z)=>{"use strict";z.d(K,{c:()=>ht});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(99625),J=z(35120),tt=z(77938),et=z(13302),it=z(68152),st=z(80060),nt=z(30226),at=z(90076);const rt={[et.X.Small]:1,[et.X.Medium]:1,[et.X.Normal]:1,[et.X.Large]:2,[et.X.Huge]:2},ot={[Q.EStatusEffectType.Bomb]:1};class ht{constructor(){this._statusEffectPool=[],this._queuedUnitActions=new Map,this._prefabGuidToTypeMap={},tt.t.data.statusEffect.map((q=>q.data)).forEach((q=>{var K;if(null===(K=q.animationData)||void 0===K?void 0:K.statusEffectPrefab){const K=Z.l[q.animationData.statusEffectPrefab];if(!X.Aq$.isDefined(K))return void X.VyI.log(`"${q.animationData.statusEffectPrefab}" is not a valid prefab name (ID "${q.id}")`,X.$bb.Error);this._prefabGuidToTypeMap[K]=q.type}else X.VyI.log(`StatusEffectAnimationController: Required status effect animation data missing for ID ${q.id}`,X.$bb.Warning)}))}getStatusEffectAnimation(q,K){let z;(0,it.v)(nt.J.isGuid(q),"prefabGuid must be a valid GUID");for(const Y of this._statusEffectPool)if(Y.prefabGuid===q){if(Y.gameObject.parent===K){z=Y;break}Y.gameObject.parent||(z=Y)}return z?(K.addChild(z.gameObject),new X.kBN((q=>q(z.gameObject)))):this.createNewStatusEffect(q,K)}createNewStatusEffect(q,K){(0,it.v)(nt.J.isGuid(q),"prefabGuid must be a valid GUID");const z=J.q.instance.prodigy.gameContainer.get("983-05a7"),Y=st.d.loadWithInjectedValuesAndDependenciesFromGUID(z,q,{}).then((z=>{const Q=z.findComponentInChildren(at.r,!0);if(!Q)throw new Error(`StatusEffectAnimationComponent not found on prefab ${q}`);Q.onStatusEffectHidden.add((()=>z.parent=void 0)),this._statusEffectPool.push({prefabGuid:q,gameObject:z}),Y.cancelled||K.addChild(z)}));return Y}hideAnimationOfType(q,K,z){z&&(0,it.v)(nt.J.isGuid(z),"prefabGuidToIgnore must be a valid GUID");const Y=this._queuedUnitActions.get(K);if(!Y)return;const Q=Y.filter((K=>q===this._prefabGuidToTypeMap[K.prefabGuid])),X=Q.length>0&&Q[Q.length-1].animation!==at.l.Hide?Q[Q.length-1]:void 0;X&&X.prefabGuid!==z&&Y.push({prefabGuid:X.prefabGuid,parent:K,animation:at.l.Hide,state:"queued",blocking:!1})}queueAnimationAction(q,K,z,Y,Q){(0,it.v)(nt.J.isGuid(q),"prefabGuid must be a valid GUID");let X=this._queuedUnitActions.get(K);X||(X=[],this._queuedUnitActions.set(K,X)),this.hideAnimationOfType(this._prefabGuidToTypeMap[q],K,q),X.push({prefabGuid:q,parent:K,animation:z,state:"queued",blocking:Y,targetSize:Q}),this._queuedUnitActions.set(K,X.filter(((q,K)=>{const z=X[K+1];return"queued"!==q.state||q.animation!==at.l.Hide||(null==z?void 0:z.animation)===at.l.Hide||q.prefabGuid!==(null==z?void 0:z.prefabGuid)})))}update(){this._queuedUnitActions.forEach((q=>{this.playNextQueuedAnimation(q).catch(X.RQr.createHandler("Error playing queued status effect animations"))}))}playNextQueuedAnimation(q){return(0,Y.sH)(this,void 0,void 0,(function*(){let K;for(const Q of q){if("active"===Q.state)break;if("queued"===Q.state){K=Q;break}}if(!K)return;K.state=K.blocking?"active":"complete";const z=yield this.getStatusEffectAnimation(K.prefabGuid,K.parent);this._prefabGuidToTypeMap[K.prefabGuid]===Q.EStatusEffectType.Bomb?z.bringToFront():z.sendToBack(),this.setStatusEffectScale(z,K.targetSize,this._prefabGuidToTypeMap[K.prefabGuid]);const Y=z.findComponent(at.r);Y&&(Y.onAnimationComplete.addOnce((()=>K.state="complete")),Y.playAnimation(K.animation)||(K.state="complete"))}))}setStatusEffectScale(q,K,z){let Y=K?rt[K]:q.transform.localScale.x;const Q=ot[z];void 0!==Q&&(Y=Q),q.transform.worldScale={x:Y,y:Y};const X=Math.sign(q.transform.localScale.x),Z=Math.sign(q.transform.localScale.y);q.transform.localScale.x*=X,q.transform.localScale.y*=Z}destroy(){J.q.instance.game.app.ticker.remove(this.update,this),this._statusEffectPool.forEach((q=>{q.gameObject&&!q.gameObject.isDestroyed&&q.gameObject.destroy()})),this._statusEffectPool.length=0}static getIdleAnimation(q){switch(q){case 4:return at.l.Idle4TurnsRemaining;case 3:return at.l.Idle3TurnsRemaining;case 2:return at.l.Idle2TurnsRemaining;default:return at.l.Idle1TurnRemaining}}}},26460:(q,K,z)=>{"use strict";z.d(K,{D:()=>tt});var Y,Q=z(8674),X=z(62459),Z=z(76724),J=z(91016);let tt=Y=class extends J.lL{constructor(){super(...arguments),this.eventName="cast"}play(q){return(0,Q.sH)(this,void 0,void 0,(function*(){var K;let z;for(let Y=q.manager.steps.indexOf(this)-1;Y>=0;Y--)if("PlayAnimationStep"===q.manager.steps[Y].__type){z=q.manager.steps[Y];break}(null===(K=null==z?void 0:z._animators)||void 0===K?void 0:K.length)&&(yield Promise.race([z._animators[0].spine.waitForEvent(this.eventName),X.Egh.timeout(Y.MAX_WAIT_TIME_MS)]))}))}};tt.MAX_WAIT_TIME_MS=5*Z.t.delay*1e3,tt=Y=(0,Q.Cg)([(0,X.s0Z)("WaitForAnimationEventStep")],tt)},37394:(q,K,z)=>{"use strict";z.d(K,{D:()=>et});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(35120),J=z(59231),tt=z(30442);class et extends Q.uAl{constructor(){super(...arguments),this.allowScrollWheel=!0,this.alwaysScrollWheel=!1,this.onMouseScrollWheelUsed=new Q.HN0,this.contentDraggingEnabled=!0,this._contentClicked=!1,this._contentDragged=!1,this._dragThreshold=10,this._maximumMouseWheelSpeed=100,this._wasDraggedSinceLastMouseDown=!1}get wasDraggedSinceLastMouseDown(){return this._wasDraggedSinceLastMouseDown}create(){super.create(),this.rectTransform=this.GameObject.findComponent(Q.XVE),this.beginDragDetection=this.beginDragDetection.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.scrollWheelBounds||(this.scrollWheelBounds=this.rectTransform),this.onMouseWheel=this.onMouseWheel.bind(this),Z.q.instance.game.input.mouse.addMouseWheelCallback(this.onMouseWheel),Z.q.instance.game.input.onDown.add(this.beginDragDetection),Z.q.instance.game.input.onUp.add(this.onDragEnd)}postCreate(){super.postCreate(),this._dragInputSprite=new tt.k(Z.q.instance.game),this._dragInputSprite.visible=!1,this._dragInputHandler=new J.l(this._dragInputSprite),this._dragInputSprite.inputEnabled=!1}destroy(){super.destroy(),this._dragInputHandler.destroy(),this._dragInputSprite.destroy(),Z.q.instance.game.input.mouse.removeMouseWheelCallback(this.onMouseWheel),Z.q.instance.game.input.onDown.remove(this.beginDragDetection),Z.q.instance.game.input.onUp.remove(this.onDragEnd),this.onMouseScrollWheelUsed.dispose()}onMouseWheel(q){this.allowScrollWheel&&this.IsActiveInHierarchy&&(this.alwaysScrollWheel||this.containsPoint(this.scrollWheelBounds,Z.q.instance.game.input.activePointer.x,Z.q.instance.game.input.activePointer.y))&&(q.stopPropagation(),this.onMouseScrollWheelUsed.dispatch(q))}beginDragDetection(q){if(!this.contentDraggingEnabled)return;const K=Z.q.instance.game.input.position;this.containsPoint(this.dragTransform,K.x,K.y)&&(this._dragInputPointer=q,this._contentClicked=!0,this._lastDragMousePosition=new Q.I9Y(Z.q.instance.game.input.activePointer.x,Z.q.instance.game.input.activePointer.y),this._wasDraggedSinceLastMouseDown=!1)}onDragEnd(){var q;this._contentDragged&&(null===(q=this._dragInputPointer)||void 0===q||q.swapTarget(null)),this._dragInputPointer=null,this._contentClicked=!1,this._contentDragged=!1}checkDragStartHorizontal(){const q=Z.q.instance.game.input.activePointer.x-this._lastDragMousePosition.x;Math.abs(q)>this._dragThreshold&&(this.startDrag(),this.dragContentHorizontal())}checkDragStartVertical(){const q=Z.q.instance.game.input.activePointer.y-this._lastDragMousePosition.y;Math.abs(q)>this._dragThreshold&&(this.startDrag(),this.dragContentVertical())}startDrag(){this._contentDragged=!0,this._wasDraggedSinceLastMouseDown=!0,this._dragInputPointer.swapTarget(this._dragInputHandler)}dragContentHorizontal(){this._lastDragMousePosition.x=Z.q.instance.game.input.activePointer.x}dragContentVertical(){this._lastDragMousePosition.y=Z.q.instance.game.input.activePointer.y}containsPoint(q,K,z){const Y=q.getBounds();let Q=new X.Point(K,z);return Q=q.worldMatrix.applyInverse(Q),Q.x+=q.fullWidth*q.pivot.x,Q.y-=q.fullHeight*(1-q.pivot.y),Q.x+=Y.left,Q.y+=Y.bottom,Q.xY.left&&Q.yY.top}getVisibleLocalRange(){return new Q.I9Y(-this.contentArea.posY,-this.contentArea.posY+this.contentArea.fullHeight)}}(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],et.prototype,"allowScrollWheel",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],et.prototype,"alwaysScrollWheel",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],et.prototype,"scrollWheelBounds",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],et.prototype,"contentArea",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],et.prototype,"dragTransform",void 0)},47287:(q,K,z)=>{"use strict";z.d(K,{g:()=>at});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(35120),J=z(49237),tt=z(76974),et=z(56163),it=z(82366),st=z(5269),nt=z(28152);let at=class extends et.t{constructor(){super(...arguments),this._moveDirection=st.H.Horizontal,this.allowMouseInput=!1,this.slide=!0,this.slideTime=500,this.lockInput=!1,this._centerAdjust=new Q.I9Y(.5,.5),this.easeType=Q.GS3.Linear.None,this.contentView=null,this.useMask=!0,this.maskOverride=null,this.indexMoveOverride=1,this._limitScrollToOverride=!1,this._hideOffscreenObjects=!1,this.onMouseScroll=new Q.HN0,this.onScrollingToCompletion=new Q.HN0,this.onStartedScrolling=new Q.HN0,this.onFinishedScrolling=new Q.HN0,this.onTargetSet=new Q.HN0,this.onScrollingLocked=new Q.HN0,this.onScrollingUnlocked=new Q.HN0,this._atTargetLocation=!0,this._targetIndex=0,this._currentIndex=0,this._carouselObjects=[],this._moveToPoint=new Q.I9Y,this._renderComponentDimensions=new Q.or0,this._reverseNavigation=!1}get moveDirection(){return this._moveDirection}set horizontal(q){this._moveDirection=q?this._moveDirection|st.H.Horizontal:this._moveDirection&~st.H.Horizontal}get canMoveHorizontal(){return(this._moveDirection&st.H.Horizontal)===st.H.Horizontal}set vertical(q){this._moveDirection=q?this._moveDirection|st.H.Vertical:this._moveDirection&~st.H.Vertical}get canMoveVertical(){return(this._moveDirection&st.H.Vertical)===st.H.Vertical}set targetIndex(q){if(this._targetIndex!==q){const K=this.canScrollPositive,z=this.canScrollNegative;this._targetIndex=q,this.scrollingLockUpdated(K,z)}}get canScrollPositive(){if(this._reverseNavigation)return 0!==this._targetIndex;return this._targetIndex+this.indexMoveOverride<=this._carouselObjects.length-1}get canScrollNegative(){return this._reverseNavigation?this._targetIndex!==this._carouselObjects.length-this.indexMoveOverride:0!==this._targetIndex}get carouselObjects(){return this._carouselObjects}get progress(){return this._progress}get isScrolling(){return!this._atTargetLocation}postCreate(){super.postCreate(),this.allowMouseInput&&Z.q.instance.game.input.addMoveCallback(this.mouseDragScroll,this),this.createMask(),this.gameObject.transform instanceof Q.XVE&&this.gameObject.transform.onRecalculatedBounds.add(this.createMask,this),this.easeType={value:this._easeString},this._centerPoint=this.getCenterPoint(),this._mouseStart=new Q.I9Y,this._mouseVelocity=new Q.I9Y,this._moveToPoint=new Q.I9Y,this._moveTween=Z.q.instance.game.add.tween(this.getLocalPositionObject(this.contentView),this),this._carouselObjects.length>0&&this.setToIndex(0)}destroy(){var q;this.gameObject.transform instanceof Q.XVE&&(null===(q=this.gameObject.transform.onRecalculatedBounds)||void 0===q||q.remove(this.createMask,this)),Z.q.instance.game.input.deleteMoveCallback(this.mouseDragScroll,this),Z.q.instance.game.tweens.remove(this._moveTween),this.onFinishedScrolling.dispose(),this.onStartedScrolling.dispose(),this.onScrollingToCompletion.dispose(),this.onMouseScroll.dispose(),this.onTargetSet.dispose(),this.onScrollingLocked.dispose(),this.onScrollingUnlocked.dispose(),this._pressedDown=!1;for(let K=0;KQ):this.canMoveVertical&&(J.active=!(q.yZ))}}mouseDragScroll(q,K,z){if(this._pressedDown){const q=Z.q.instance.game.time.deltaMS;let Y;this.canMoveHorizontal&&(Y=K-this._mouseStart.x,this._mouseStart.x=K,this._mouseVelocity.x=Y/(q+1),this.getLocalPositionObject(this.contentView).x+=Y),this.canMoveVertical&&(Y=z-this._mouseStart.y,this._mouseStart.y=z,this._mouseVelocity.y=Y/(q+1),this.getLocalPositionObject(this.contentView).y+=Y),this.onMouseScroll.getBindingsCount()>0&&(this.findNearestIndex(),this.onMouseScroll.dispatch(this._targetIndex))}}setToIndex(q){this.findScrollDistance(q),this.finishedScroll()}scrollToNextLocation(q){const K=this._reverseNavigation?-q:q;this.scrollToTargetLocation(this._targetIndex+K*(this.indexMoveOverride>=1?this.indexMoveOverride:1))}scrollToTargetLocation(q){this.slide?(this.findScrollDistance(q),this.startScroll()):this.setToIndex(q)}scrollToNearestLocation(){this.findNearestIndex(),this.findScrollDistance(this._targetIndex),this.startScroll()}findNearestIndex(){const q=this.getLocalPositionObject(this.contentView),K={x:q.x,y:q.y};K.x+=this._mouseVelocity.x*this.slideTime*2/3,K.y+=this._mouseVelocity.y*this.slideTime*2/3;let z=this._currentIndex;const Y=this.getLocalPositionObject(this._carouselObjects[z]),X=new Q.I9Y(Y.x+K.x,Y.y+K.y);let Z=this.findPointDistance(this._centerPoint,X);for(let J=0;J{q.transform.setPosition(z.x,z.y)}),this,K.x,K.y);return z}return K}getSize(q){var K,z;return null!==(z=null===(K=q.legacyTransform)||void 0===K?void 0:K.group)&&void 0!==z?z:q.transform.rectTransformDimensions}updateScrollButtons(){this.scrollNegativeButton&&(this.canScrollNegative?this.scrollNegativeButton.unlockState():this.scrollNegativeButton.lockState(tt.K.Disabled)),this.scrollPositiveButton&&(this.canScrollPositive?this.scrollPositiveButton.unlockState():this.scrollPositiveButton.lockState(tt.K.Disabled))}scrollingLockUpdated(q,K){this.canScrollPositive!==q&&(this.canScrollPositive?this.onScrollingUnlocked.dispatch(1):this.onScrollingLocked.dispatch(1)),this.canScrollNegative!==K&&(this.canScrollNegative?this.onScrollingUnlocked.dispatch(-1):this.onScrollingLocked.dispatch(-1))}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"allowMouseInput",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"slide",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],at.prototype,"slideTime",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"lockInput",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Q.Lr6)(0),(0,Q.nKb)("horizontalScrolling"),(0,Y.Sn)("design:type",Boolean),(0,Y.Sn)("design:paramtypes",[Boolean])],at.prototype,"horizontal",null),(0,Y.Cg)([(0,Q.vkK)(),(0,Q.Lr6)(0),(0,Q.nKb)("verticalScrolling"),(0,Y.Sn)("design:type",Boolean),(0,Y.Sn)("design:paramtypes",[Boolean])],at.prototype,"vertical",null),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],at.prototype,"_centerAdjust",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.Lr6)(0),(0,Q.nKb)("easeType"),(0,Y.Sn)("design:type",String)],at.prototype,"_easeString",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],at.prototype,"contentView",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"useMask",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.Lom),(0,Y.Sn)("design:type",Q.Lom)],at.prototype,"maskOverride",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],at.prototype,"indexMoveOverride",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_limitScrollToOverride",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_hideOffscreenObjects",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onTargetSet",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onScrollingLocked",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"onScrollingUnlocked",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],at.prototype,"_carouselObjects",void 0),(0,Y.Cg)([(0,Q.MnK)(J.$),(0,Y.Sn)("design:type",J.$)],at.prototype,"scrollNegativeButton",void 0),(0,Y.Cg)([(0,Q.MnK)(J.$),(0,Y.Sn)("design:type",J.$)],at.prototype,"scrollPositiveButton",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"_reverseNavigation",void 0),at=(0,Y.Cg)([(0,Q.EVk)("Carousel",nt.Y.ui)],at)},16043:(q,K,z)=>{"use strict";z.d(K,{a:()=>tt});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(76974),J=z(28152);let tt=class extends Q.uAl{constructor(){super(...arguments),this._pageChangeDelta=1,this._maxPage=1,this._onPageChanged=new Q.HN0,this._onMaxPageChanged=new Q.HN0}get onPageChanged(){return this._onPageChanged}get onMaxPageChanged(){return this._onMaxPageChanged}get currentPage(){return this._currentPage}get maximumPage(){return this._maxPage}create(){super.create(),this._increasePageButton.onClick.add(this.applyPageChangeDelta,this,0,this._pageChangeDelta),this._decreasePageButton.onClick.add(this.applyPageChangeDelta,this,0,-this._pageChangeDelta),this.setCurrentPage(1)}postCreate(){super.postCreate(),this.setCurrentPage(this._currentPage,!0)}destroy(){this._increasePageButton.onClick.remove(this.applyPageChangeDelta,this),this._decreasePageButton.onClick.remove(this.applyPageChangeDelta,this),this._onPageChanged.dispose(),this._onMaxPageChanged.dispose(),super.destroy()}applyPageChangeDelta(q){this.setCurrentPage(this._currentPage+q)}setCurrentPage(q,K=!1){{const z=Math.max(1,Math.min(q,this._maxPage));(this._currentPage!==z||K)&&(1===z?this._decreasePageButton.isStateLocked()||this._decreasePageButton.lockState(Z.K.Disabled):this._decreasePageButton.isStateLocked()&&this._decreasePageButton.unlockState(),z===this._maxPage?this._increasePageButton.isStateLocked()||this._increasePageButton.lockState(Z.K.Disabled):this._increasePageButton.isStateLocked()&&this._increasePageButton.unlockState(),this._currentPage=z,this._onPageChanged.dispatch())}}setMaximumPage(q){this._maxPage!==q&&(this._maxPage=q,this._onMaxPageChanged.dispatch(),this._currentPage>q&&this.setCurrentPage(this._maxPage))}};(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_increasePageButton",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],tt.prototype,"_decreasePageButton",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_pageChangeDelta",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_maxPage",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"_onPageChanged",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"_onMaxPageChanged",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("ChangePageButtons",J.Y.uiPagination)],tt)},71041:(q,K,z)=>{"use strict";z.d(K,{Eo:()=>dt,RA:()=>ot,n3:()=>ht});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(88022),J=z(91207),tt=z(28152),et=z(90744),it=z(38920),st=z(31125),nt=z(19633),at=z(15284);class rt extends at.T{constructor(){super(...arguments),this.validators=[{validate:q=>{if(/[^0-9,.]/g.test(q.text))return"Text should be some numeric value; eg. 9,999. Change it now?"},fix:q=>{q.text="9,999"}}]}getStandardButtonSettings(q,K){const z=[Q.Gme.enumGroup({id:"type",labelValue:"Type",selectValue:q.type},st.vX),Q.Gme.enumGroup({id:"size",labelValue:"Size",selectValue:q.size},st.YT)];return q.actionTextPosition===ot.NONE?z.push(Q.Gme.enumGroup({id:"iconPosition",labelValue:"Icon Position",selectValue:q.iconPosition},nt.d)):z.push(Q.Gme.enumGroup({id:"iconPosition",labelValue:"Icon Position",selectValue:q.iconPosition},ht)),q.iconPosition!==nt.d.ICON_ONLY?z.push(Q.Gme.enumGroup({id:"actionTextPosition",labelValue:"Action Text Position",selectValue:q.actionTextPosition},ot)):q.actionTextPosition=ot.NONE,q.iconPosition!==nt.d.NONE&&z.push(Q.Gme.numberGroup({id:"currency",labelValue:"Currency ID",inputValue:q.currency})),z.push(Q.Gme.colorPickerGroup({id:"insufficientFundsColor",labelValue:"Insufficient Funds Color",inputValue:q.insufficientFundsColor}),Q.Gme.numberGroup({id:"debounceTimeMs",labelValue:"Debounce Time (ms)",inputValue:q.debounceTimeMs}),Q.Gme.numberGroup({id:"amount",labelValue:"Currency Amount",inputValue:q.amount})),q.actionTextPosition!==ot.NONE?z.push(Q.Gme.textGroup({id:"actionTextLocKey",labelValue:"Action Text Loc Key",inputValue:q.actionTextLocKey})):q.actionTextLocKey="",z.push(Q.Gme.checkboxGroup({id:"fitToContents",labelValue:"Fit to Contents",inputValue:q.fitToContents})),z.push(Q.Gme.checkboxGroup({id:"suppressSound",labelValue:"Suppress SFX",inputValue:q.suppressSound})),Q.XRp.createVertical(z,{isCollapsible:!0,startCollapsed:!1,title:"Button Style"})}}var ot,ht,ct=z(97518);!function(q){q[q.NONE=0]="NONE",q[q.LEFT=1]="LEFT",q[q.RIGHT=2]="RIGHT"}(ot||(ot={})),function(q){q[q.NONE=0]="NONE",q[q.CENTER=1]="CENTER",q[q.ICON_ONLY=3]="ICON_ONLY"}(ht||(ht={}));let dt=class extends nt.S{constructor(){super(...arguments),this._customIcons={1:{atlas:Z._.General_icons_json,frame:"mail-gold"},27:{atlas:Z._.Ui_hard_currency_json,frame:"icon-currency-27-small"}},this.currency=1,this._amount=9999,this.insufficientFundsColor=16711680,this.actionTextPosition=ot.NONE,this.actionTextLocKey="",this._actionText=""}get amount(){return this._amount}set amount(q){this._amount=q,this.regenerateButton()}get buttonSizeSpecs(){return Object.assign({},st.Eo[this.size])}get buttonTypeSpecs(){let q=st.jN[this.type].textColor;return this._paymentManager.canAfford({currency:this.currency,value:this.amount})||(q=this.insufficientFundsColor),Object.assign(Object.assign({},st.jN[this.type]),{textColor:q})}updateIcon(q){var K;const z=null!==(K=this._customIcons[this.currency])&&void 0!==K?K:{atlas:J.E.getIconForType("currency",this.currency)};if(!Q.Aq$.isDefined(z)||!Q.Aq$.isDefined(this._iconComponent))return;this._iconComponent.updateAsset(z.atlas,z.frame),this._iconComponent.tint=16777215;const Y=q&&"object"==typeof q?q.iconSize:this.buttonSizeSpecs.iconSize;this._iconTransform.setSizeDelta(Y,Y)}regenerateButton(){Q.Aq$.isDefined(this.amount)&&Q.Aq$.isDefined(this._textComponent)&&(this.text=(0,it.Hk)(this.amount,0,","),super.regenerateButton())}populateTextComponents(){var q,K,z,Y;this._textComponent=null===(q=this.gameObject.findChildByName("Text"))||void 0===q?void 0:q.findComponentInChildren(Q.EYj),this._textTransform=null===(K=this._textComponent)||void 0===K?void 0:K.GameObject.transform,this._actionTextComponent=null===(z=this.gameObject.findChildByName("ActionText"))||void 0===z?void 0:z.findComponentInChildren(ct.R),this._actionTextTransform=null===(Y=this._actionTextComponent)||void 0===Y?void 0:Y.GameObject.transform}updateComponentsFromSpecs(q,K){Q.Aq$.isDefined(this._actionTextComponent)&&(this._actionTextComponent.localizedText.TextObject.style.fontFamily=q.fontFamily,this._actionTextComponent.localizedText.TextObject.style.fontSize=q.fontSize,this._actionTextComponent.localizedText.fontSize=q.fontSize,this._actionTextComponent.localizedText.TextObject.style.fill=st.jN[this.type].textColor),super.updateComponentsFromSpecs(q,K)}regenerateIconOnlyButton(q){Q.Aq$.isDefined(this._actionTextComponent)&&(this._actionTextComponent.GameObject.active=!1),super.regenerateIconOnlyButton(q)}regenerateButtonText(q){if(Q.Aq$.isDefined(this._actionTextComponent))if(this.actionTextPosition===ot.NONE)this._actionTextComponent.GameObject.active=!1,super.regenerateButtonText(q);else{this._actionTextComponent.GameObject.active=!0,this._textComponent.GameObject.active=!0,this._actionTextComponent.setLocalizationKey(this.actionTextLocKey),this._actionText=this._actionTextComponent.localizedText.text;const K=Math.ceil(X.TextMetrics.measureText(this.text,this._textComponent.TextObject.style).width),z=Math.ceil(X.TextMetrics.measureText(this._actionText,this._actionTextComponent.localizedText.TextObject.style).width);this._textTransform.widthDelta=K,this._actionTextTransform.widthDelta=z,this._buttonWidth=K+z+2*q.margin;const Y=this.actionTextPosition===ot.LEFT?q.actionTextPadding:q.padding;let Q=this.actionTextPosition===ot.RIGHT?q.actionTextPadding:q.padding,Z=0;this.iconPosition===nt.d.NONE?(this._iconComponent.GameObject.active=!1,Q=0):(this._iconComponent.GameObject.active=!0,this.updateIcon(this.buttonSizeSpecs),Z=this._iconTransform.fullWidth,this._buttonWidth+=Z+Y+Q);const J=Math.ceil(this._buttonWidth/2),tt=this.actionTextPosition===ot.LEFT?this._actionTextTransform:this._textTransform,et=this.actionTextPosition===ot.RIGHT?this._actionTextTransform:this._textTransform,it=Math.ceil(tt.widthDelta/2),st=Math.ceil(et.widthDelta/2),at=Math.ceil(Z/2);tt.posX=-J+q.margin+it,this._iconTransform.posX=tt.posX+it+Y+at,et.posX=this._iconTransform.posX+at+Q+st,this._buttonWidth=Math.max(q.minWidth,this._buttonWidth),this._textTransform.top=0,this._textTransform.bottom=0,this._textTransform.posY=-Math.abs(q.yOffset),this._actionTextTransform.top=0,this._actionTextTransform.bottom=0,this._actionTextTransform.posY=-Math.abs(q.yOffset)}else super.regenerateButtonText(q)}};(0,Y.Cg)([(0,Q.Cdj)("ec3-31a0"),(0,Y.Sn)("design:type",et.E)],dt.prototype,"_paymentManager",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],dt.prototype,"currency",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],dt.prototype,"_amount",void 0),(0,Y.Cg)([(0,Q.iEU)(),(0,Y.Sn)("design:type",Number)],dt.prototype,"insufficientFundsColor",void 0),(0,Y.Cg)([(0,Q.gfw)(ot),(0,Y.Sn)("design:type",Number)],dt.prototype,"actionTextPosition",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],dt.prototype,"actionTextLocKey",void 0),dt=(0,Y.Cg)([(0,Q.EVk)("CurrencyButton",tt.Y.ui),(0,Q.WR4)(rt)],dt)},85515:(q,K,z)=>{"use strict";var Y;z.d(K,{E:()=>Y}),function(q){q.Default="default",q.BackgroundLayer="background",q.ContentLayer="content",q.ForegroundLayer="foreground",q.DifficultyModeOverlay="difficultyModeOverlay",q.UiLayer="uiLayer",q.ConsentLayer="consentLayer",q.GameRenderCacheLayer="gameRenderCache",q.MenusLayer="menus",q.DialogueLayer="dialogueLayer",q.OverlayLayer="overlay",q.OpaqueLayer="opaque",q.Result="result",q.Ui="ui",q.Debug="debug"}(Y||(Y={}))},28829:(q,K,z)=>{"use strict";z.d(K,{q:()=>J});var Y=z(8674),Q=z(62459),X=z(29834),Z=z(99625);let J=class extends Q.uAl{constructor(){super(...arguments),this.glowSpinePrefabGuid=Z.l.GlowHighlightAnimation,this.numberOfGlowToPreload=1,this._focusGameObjects=new Map}create(){super.create(),this.GameObject.active=!1,this._glowPool=new Q.iyL((()=>this._prefabLoader.loadFromGUID(this.glowSpinePrefabGuid,this.GameObject))),this.numberOfGlowToPreload>0&&this._glowPool.allocate(this.numberOfGlowToPreload)}showOverlay(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.GameObject.active=!0,this.moveAllToFocusLayer(),yield this._fadeInOverlay()}))}hideOverlay(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this._fadeOutOverlay(),this.restoreAllToOriginalLayers(),this.GameObject.active=!1}))}playGlowAnimations(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=[];this._glowPool.aliveList.forEach((K=>{const z=K.findComponent(X.j);z.playAnimation("idle",!1,!0),q.push(z.OnAnimationComplete.asPromise())})),yield Promise.all(q)}))}setFocusLayer(q){this._focusLayer=q}addFocusableGameObject(q,K,z=!1,Y){var Q,X,Z;if(null==Y?void 0:Y.applyGlow){const z=this._glowPool.getObject(),Z=null!==(Q=null==Y?void 0:Y.position)&&void 0!==Q?Q:{x:q.transform.worldPosition.x,y:q.transform.worldPosition.y};z.transform.setPosition(Z.x,Z.y),this._focusGameObjects.set(z,{originalLayer:z.layer,focusLayer:null!==(X=null!=K?K:this._focusLayer)&&void 0!==X?X:this.GameObject.layer,applyToChildren:!1})}this._focusGameObjects.set(q,{originalLayer:q.layer,focusLayer:null!==(Z=null!=K?K:this._focusLayer)&&void 0!==Z?Z:this.GameObject.layer,applyToChildren:z})}moveAllToFocusLayer(){this._focusGameObjects.forEach(((q,K)=>{K.setLayer(q.focusLayer,q.applyToChildren)}))}restoreAllToOriginalLayers(){this._focusGameObjects.forEach(((q,K)=>{K.setLayer(q.originalLayer,q.applyToChildren)})),this._focusGameObjects.clear(),this._glowPool.aliveList.forEach((q=>{this._glowPool.recycleObject(q)}))}_fadeInOverlay(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._inAnimation.playAnimation(),yield this._inAnimation.onTweenComplete.asPromise()}))}_fadeOutOverlay(){return(0,Y.sH)(this,void 0,void 0,(function*(){this._outAnimation.playAnimation(),yield this._outAnimation.onTweenComplete.asPromise()}))}};(0,Y.Cg)([(0,Q.MnK)(Q.bTj),(0,Y.Sn)("design:type",Q.bTj)],J.prototype,"_inAnimation",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.bTj),(0,Y.Sn)("design:type",Q.bTj)],J.prototype,"_outAnimation",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"_focusLayer",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"glowSpinePrefabGuid",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"numberOfGlowToPreload",void 0),(0,Y.Cg)([(0,Q.Cdj)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],J.prototype,"_prefabLoader",void 0),J=(0,Y.Cg)([(0,Q.EVk)("FocusOverlay",Q.YH6.ui)],J)},69811:(q,K,z)=>{"use strict";z.d(K,{y:()=>tt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(28152);let tt=class extends Q.uAl{constructor(){super(...arguments),this._graphicsChildren=[],this._selectedGraphicIndex=0}set selectedGraphicIndex(q){this.selectGraphicAtIndex(q)}get selectedGraphicIndex(){return this._selectedGraphicIndex}postCreate(){super.postCreate(),this._graphicsChildren=this.gameObject.findComponentsInChildren(Q.vYh),this.selectGraphicAtIndex(this._selectedGraphicIndex)}selectGraphicAtIndex(q){this._selectedGraphicIndex=Z().clamp(q,0,this._graphicsChildren.length-1);for(let K=0;K{"use strict";z.d(K,{P:()=>tt});var Y,Q=z(8674),X=z(62459),Z=z(99625),J=(z(70005),z(19690));let tt=Y=class extends X.uAl{spawnGuideHand(){return(0,Q.sH)(this,arguments,void 0,(function*(q=this.gameObject.transform.worldPosition,K){var z;if(!this._spawnedGuideHand){if(!X.Aq$.isDefined(q.x)||!X.Aq$.isDefined(q.y))return X.VyI.log("GuideHandSpawnerComponent: Invalid position provided for guide hand spawn - guide hand was not created",X.$bb.Warning),null;const Y={x:q.x,y:q.y},Q=yield(0,J.Ks)().loadWithDependenciesFromGUID(Z.l.NavigationGuideHand);X.Aq$.isDefined(K)&&(Q.layer=K),Q.parent=this.gameObject,Q.transform.worldPosition=Y,Q.transform.setRotation(null!==(z=this.angle)&&void 0!==z?z:this.getGuideHandDefaultAngle(Y)),this._spawnedGuideHand=Q}return this._spawnedGuideHand}))}despawnGuideHand(){var q;null===(q=this._spawnedGuideHand)||void 0===q||q.destroy(),this._spawnedGuideHand=void 0}getGuideHandDefaultAngle(q){const{width:K,height:z}=X.W$e.instance.game,Q=q.xK-Y.SCREEN_EDGE_PADDING,J=q.yz-Y.SCREEN_EDGE_PADDING;return Q?J?225:tt?135:180:Z?J?315:tt?45:0:J?270:90}toggleGuideHand(){return(0,Q.sH)(this,void 0,void 0,(function*(){}))}};tt.SCREEN_EDGE_PADDING=40,(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],tt.prototype,"angle",void 0),(0,Q.Cg)([(0,X.GO0)(),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",Promise)],tt.prototype,"toggleGuideHand",null),tt=Y=(0,Q.Cg)([(0,X.EVk)("GuideHandSpawner")],tt)},96304:(q,K,z)=>{"use strict";z.d(K,{j:()=>Z});var Y=z(8674),Q=z(62459),X=z(93171);let Z=class extends Q.uAl{constructor(){super(...arguments),this.DefaultPunchStrength=.1,this.StrongPunchStrength=.25,this.SuperStrongPunchStrength=.6,this.LowHealthPercent=.2,this.MediumHealthPercent=.8,this.MagicEffectPointsBackgroundArray=[],this.BGFillerGraphicsArray=[],this.BGFillerTransformsArray=[],this.MagicEffectPointsEnabledArray=[],this.MagicEffectPointsEffectArray=[],this.HealthBarTimeline=null,this.LowHealthTimeline=null,this._viewAllUI=!0,this.GameObjectsToShowOnPreview=[],this.AnimatedObjects={}}DebugSetProgress100(){this.restartTimeline(1)}DebugSetProgress10(){this.restartTimeline(.1)}DebugSetProgress20(){this.restartTimeline(.2)}DebugSetProgress50(){this.restartTimeline(.5)}SetVisibleAllUIElements(q){this._viewAllUI}create(){super.create(),this.GameObject&&(this.SetVisibleAllUIElements(!0),this.HealthBarTimeline=new Q.Kfn,this.AnimatedObjects.DynamicProgressBar=this.HealthBarTimeline.addGameObject(this.DynamicProgressBar),this.AnimatedObjects.StarGraphic=this.HealthBarTimeline.addGameObject(this.StarGraphic),this.AnimatedObjects.LevelUI=this.HealthBarTimeline.addGameObject(this.LevelUI),this.AnimatedObjects.MergeRankUI=this.HealthBarTimeline.addGameObject(this.MergeRankUI),this.AnimatedObjects.BuffsBackground=this.HealthBarTimeline.addGameObject(this.BuffsBackground),this.AnimatedObjects.TopUI=this.HealthBarTimeline.addGameObject(this.TopUI),this.AnimatedObjects.SpriteGraphic=this.HealthBarTimeline.addGameObject(this.SpriteGraphic),this.AnimatedObjects.MagicEffectPointsBackgroundArray=this.HealthBarTimeline.addGameObjects(this.MagicEffectPointsBackgroundArray),this.AnimatedObjects.MagicEffectPointsEnabledArray=this.HealthBarTimeline.addGameObjects(this.MagicEffectPointsEnabledArray),this.AnimatedObjects.MagicEffectPointsEffectArray=this.HealthBarTimeline.addGameObjects(this.MagicEffectPointsEffectArray),this.LowHealthTimeline=new Q.Kfn,this.AnimatedObjects.BGFillerGraphicsArray=this.LowHealthTimeline.addGameObjects(this.BGFillerGraphicsArray),this.AnimatedObjects.BGFillerTransformsArray=this.LowHealthTimeline.addGameObjects(this.BGFillerTransformsArray),this.IsActiveInHierarchy||this.SetVisibleAllUIElements(!1))}destroy(){var q,K;null===(q=this.HealthBarTimeline)||void 0===q||q.destroyTimeline(),null===(K=this.LowHealthTimeline)||void 0===K||K.destroyTimeline(),this.SetVisiblePulseElements(!1),this.SetVisibleAllUIElements(!1),super.destroy()}restartTimeline(q){this._progressBar&&(this._progressBar.setValue(q),this.triggerShake(q))}SetVisiblePulseElements(q){this.BGFillerGraphicsArray&&this.BGFillerGraphicsArray.forEach((K=>{K&&(K.active=q)}))}attachLevelSequence(q){this.AnimatedObjects.StarGraphic&&this.AnimatedObjects.LevelUI&&this.HealthBarTimeline.to(this.AnimatedObjects.LevelUI,.1,{y:11},Q.GS3.Quintic.Out,q).to(this.AnimatedObjects.LevelUI,.83,{y:0},Q.GS3.generateCustomElasticEase(1.4,.8,!1,!0),q+.1).from(this.AnimatedObjects.StarGraphic,1.73,{rotation:-135,y:0},Q.GS3.Quintic.Out,q)}attachMergeRankSequence(q){this.AnimatedObjects.MergeRankUI&&this.HealthBarTimeline.to(this.AnimatedObjects.MergeRankUI,.1,{y:14},Q.GS3.Quintic.Out,q).to(this.AnimatedObjects.MergeRankUI,.83,{y:3},Q.GS3.generateCustomElasticEase(1.4,.8,!1,!0),q+.1)}attachShieldSequence(q){this.AnimatedObjects.spriteGraphic&&this.HealthBarTimeline.from(this.AnimatedObjects.spriteGraphic,1.1,{x:-11,rotation:-5,scaleX:.94,scaleY:.94},Q.GS3.Quintic.Out,q+.1)}attachMagicEffectsSequence(q){if(this.AnimatedObjects.MagicEffectPointsBackgroundArray&&this.AnimatedObjects.MagicEffectPointsEnabledArray&&this.AnimatedObjects.MagicEffectPointsEffectArray){const K={y:14,scaleX:.01,scaleY:.01,stagger:-.065},z={rotation:20,stagger:-.065},Y=Q.GS3.generateCustomElasticEase(.7,.6,!1,!0);this.HealthBarTimeline.from(this.AnimatedObjects.MagicEffectPointsBackgroundArray,.7,z,Y,q).from(this.AnimatedObjects.MagicEffectPointsBackgroundArray,.7,K,Y,q).from(this.AnimatedObjects.MagicEffectPointsEnabledArray,.7,z,Y,q).from(this.AnimatedObjects.MagicEffectPointsEnabledArray,.7,K,Y,q).from(this.AnimatedObjects.MagicEffectPointsEffectArray,.7,z,Y,q).from(this.AnimatedObjects.MagicEffectPointsEffectArray,.7,K,Y,q)}}CreateLowHealthPulseSequence(q){if(this.SetVisiblePulseElements(!0),this.AnimatedObjects.BGFillerGraphicsArray&&this.AnimatedObjects.BGFillerTransformsArray){this.LowHealthTimeline.new({startDelay:2,loopCount:-1,loopDelay:.4});const K=.5;this.LowHealthTimeline.to(this.AnimatedObjects.BGFillerTransformsArray,.01,{scaleX:1,scaleY:1},Q.GS3.Sinusoidal.In,q).to(this.AnimatedObjects.BGFillerTransformsArray,1.4,{scaleX:1+.196*K,scaleY:1+1.232*K,stagger:.3},Q.GS3.Exponential.Out,q+.3).fromTo(this.AnimatedObjects.BGFillerGraphicsArray,.3,{alpha:0},{alpha:1,stagger:.3},Q.GS3.Sinusoidal.In,q).to(this.AnimatedObjects.BGFillerGraphicsArray,1.6,{alpha:0,stagger:.3},Q.GS3.Cubic.Out,q+.3),this.LowHealthTimeline.play()}}attachTopNavigationSequence(q){this.AnimatedObjects.TopUI&&this.HealthBarTimeline.to(this.AnimatedObjects.TopUI,.1,{y:-14},Q.GS3.Quartic.Out,q).to(this.AnimatedObjects.TopUI,1.13,{y:5},Q.GS3.generateCustomElasticEase(.6,.345,!1,!0),q+.1)}attachTopRightNavigationSequence(q){this.AnimatedObjects.BuffsBackground&&this.HealthBarTimeline.to(this.AnimatedObjects.BuffsBackground,.1,{y:-15},Q.GS3.Quartic.Out,q).to(this.AnimatedObjects.BuffsBackground,2.3,{y:0},Q.GS3.generateCustomElasticEase(1.13,.3,!1,!0),q+.1)}triggerShake(q){this.setupPulse(q),this.setupSequence(q)}setupPulse(q){q{"use strict";z.d(K,{W:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.y4o{constructor(){super(...arguments),this._collisionBox=null,this._root=null,this._onInputDown=new Q.HN0,this._onInputUp=new Q.HN0,this._onInputOver=new Q.HN0,this._onInputOut=new Q.HN0}get inputEnabled(){var q;return!!(null===(q=this._collisionBox)||void 0===q?void 0:q.inputEnabled)}set inputEnabled(q){const K=this.getCollisionBox();K.inputEnabled=q,this.applyUseHandCursorSetting(K,this.useHandCursor)}get useHandCursor(){var q,K,z;return null!==(z=null===(K=null===(q=this._collisionBox)||void 0===q?void 0:q.input)||void 0===K?void 0:K.useHandCursor)&&void 0!==z&&z}set useHandCursor(q){this.applyUseHandCursorSetting(this.getCollisionBox(),q)}get onInputDown(){return this._onInputDown}get onInputUp(){return this._onInputUp}get onInputOver(){return this._onInputOver}get onInputOut(){return this._onInputOut}create(){super.create();const q=this.getCollisionBox().events;q.onInputDown.add(this.onDown,this),q.onInputUp.add(this.onUp,this),q.onInputOver.add(this.onOver,this),q.onInputOut.add(this.onOut,this),this.updateCollisionBox()}setInputPriority(q){const K=this.getCollisionBox();K&&(K.input.priorityID=q)}destroy(){var q;const K=this.getCollisionBox().events;K.onInputDown.remove(this.onDown,this),K.onInputUp.remove(this.onUp,this),K.onInputOver.remove(this.onOver,this),K.onInputOut.remove(this.onOut,this),this._onInputDown.dispose(),this._onInputUp.dispose(),this._onInputOut.dispose(),this._onInputOver.dispose(),null===(q=this._root)||void 0===q||q.destroy(),super.destroy()}getDimensions(){return new Q.or0(this._collisionBox?this._collisionBox.width:0,this._collisionBox?this._collisionBox.height:0)}getCollisionBox(q=!0){return q&&!this._collisionBox&&this.createInternalCollisionBox(),this._collisionBox}onDown(q,K){this._onInputDown.dispatch()}onUp(q,K){this._onInputUp.dispatch()}onOver(q,K){this._onInputOver.dispatch()}onOut(q,K){this._onInputOut.dispatch()}applyUseHandCursorSetting(q,K){(null==q?void 0:q.input)&&(q.input.useHandCursor=K)}createInternalCollisionBox(){this._root=X.q.instance.game.add.group(),this.setRootContainer(this._root),this._collisionBox=X.q.instance.game.add.sprite(0,0,"","",this._root),this._collisionBox.width=10,this._collisionBox.height=10,this._collisionBox.alpha=0,this._collisionBox.inputEnabled=!0}updateCollisionBox(){const q=this.getCollisionBox(),K=this.GameObject.findComponent(Q.XVE);K&&(q.width=K.widthDelta,q.height=K.heightDelta),q.inputEnabled=this.inputEnabled,this.applyUseHandCursorSetting(q,this.useHandCursor)}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean),(0,Y.Sn)("design:paramtypes",[Boolean])],J.prototype,"inputEnabled",null),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean),(0,Y.Sn)("design:paramtypes",[Boolean])],J.prototype,"useHandCursor",null),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0),(0,Y.Sn)("design:paramtypes",[])],J.prototype,"onInputDown",null),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0),(0,Y.Sn)("design:paramtypes",[])],J.prototype,"onInputUp",null),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0),(0,Y.Sn)("design:paramtypes",[])],J.prototype,"onInputOver",null),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0),(0,Y.Sn)("design:paramtypes",[])],J.prototype,"onInputOut",null),J=(0,Y.Cg)([(0,Q.EVk)("InteractableRectTransform",Z.Y.input)],J)},79424:(q,K,z)=>{"use strict";z.d(K,{D:()=>Z});var Y=z(8674),Q=z(62459),X=z(83133);let Z=class extends Q.uAl{constructor(){super(...arguments),this.isTab=!1}register(q){const K=this.getInjectedValue(this.stateId);this.isTab?K.registerTab(q,this.gameObject.findComponent(X.l)):K.registerContent(q,this.gameObject)}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],Z.prototype,"stateId",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"isTab",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("LinkedScrollItem",void 0,"Use with LinkedScrollState!")],Z)},89192:(q,K,z)=>{"use strict";z.d(K,{V:()=>tt});var Y=z(8674),Q=z(62459),X=z(94566),Z=z(11647),J=z(94325);let tt=class extends((0,Z.o)(Q.uAl)){constructor(){super(...arguments),this._inset=0,this.onGroupChanged=this.createTidySignal(),this._tabs={},this._contents={},this._toCleanup=new WeakMap,this._selectionDirty=!1,this._skipTargetGroup=!1}get contextId(){return this._contextId}create(){super.create(),this._context.Container.rebind(this._contextId).toConstantValue(this)}update(){if(super.update(),!this._selectionDirty)return;let q,K;const{x:z,y:Y}=this._scroll.getVisibleLocalRange();for(const[X,Z]of Object.entries(this._contents))for(const J of Z){const Z=J.top+this._inset;Z<=z||Z>=Y||(!Q.Aq$.isDefined(q)||Zthis.scrollToGroup(q))),this._toCleanup.set(K.GameObject,[K.GameObject.onDestroy.add((()=>{this._tabs[q]===K&&delete this._tabs[q],this.cleanupObject(K.GameObject)}),this)])}registerContent(q,K){var z,Y;if(!(K.transform instanceof Q.XVE))throw new Error("LinkedScrollState only works with RectTransforms");const X=K.transform,Z=null!==(z=(Y=this._contents)[q])&&void 0!==z?z:Y[q]=[];Z.push(X),this._selectionDirty=!0,this._toCleanup.set(K,[K.onDestroy.add((()=>{const z=Z.indexOf(X);z>=0&&Z.splice(z,1),0===Z.length&&delete this._contents[q],this.cleanupObject(K)}),this),X.onWorldMatrixChanged.add((()=>this._selectionDirty=!0),this)])}scrollToGroup(q){const K=this._contents[q];if(!K)return void Q.VyI.log("Attempted to scroll to unknown group",Q.$bb.Warning,q);let z=1/0;for(const Y of K)z=Math.min(Y.top,z);isFinite(z)&&(this._skipTargetGroup=!0,this._scroll.setScrollPosition(-z))}scrollToTop(){this._scroll.setScrollPosition(0)}cleanupObject(q){var K;if(!q)return;const z=null!==(K=this._toCleanup.get(q))&&void 0!==K?K:[];for(const Y of z)Y.destroy();this._toCleanup.delete(q)}};(0,Y.Cg)([(0,Q.MnK)(J.C),(0,Y.Sn)("design:type",J.C)],tt.prototype,"_scroll",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.bE_),(0,Y.Sn)("design:type",Q.bE_)],tt.prototype,"_context",void 0),(0,Y.Cg)([(0,Q.MnK)(X.O),(0,Y.Sn)("design:type",X.O)],tt.prototype,"_toggles",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],tt.prototype,"_contextId",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_inset",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onGroupChanged",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("LinkedScrollState",void 0)],tt)},56617:(q,K,z)=>{"use strict";z.d(K,{i:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this.onLoadingUIHidden=new Q.HN0,this.onLoadingUIShown=new Q.HN0,this._loadingShowGameObjects=[],this._loadingHideGameObjects=[],this._delayToShowLoadGameObjectsMS=0,this._isShowingLoadingUI=!1,this._startLoadingTimestamp=0,this._loadingUIVisible=!1}get minimumLoadingDurationMS(){return this._minimumLoadDurationMS}get delayToShowLoadGameObjectsMS(){return this._delayToShowLoadGameObjectsMS}showLoadingUI(){this._isShowingLoadingUI||(this._delayToShowLoadGameObjectsMS<=0&&this.setVisibleState(!0),this._isShowingLoadingUI=!0,this._startLoadingTimestamp=Date.now())}hideLoadingUI(){this._isShowingLoadingUI&&(this._isShowingLoadingUI=!1,(!Q.Aq$.isDefined(this._minimumLoadDurationMS)||Date.now()-this._startLoadingTimestamp>=this._minimumLoadDurationMS)&&this.setVisibleState(!1))}forceHideLoadingUI(){this._isShowingLoadingUI&&(this._isShowingLoadingUI=!1,this.setVisibleState(!1))}update(){super.update(),this._isShowingLoadingUI?!this._loadingUIVisible&&Date.now()-this._startLoadingTimestamp>this._delayToShowLoadGameObjectsMS&&this.setVisibleState(!0):this._loadingUIVisible&&Date.now()-this._startLoadingTimestamp>=this._minimumLoadDurationMS&&this.setVisibleState(!1)}setVisibleState(q){q!==this._loadingUIVisible&&(this._loadingHideGameObjects.forEach((K=>{K.active=!q})),this._loadingShowGameObjects.forEach((K=>{K.active=q})),this._loadingUIVisible=q,this._loadingUIVisible?this.onLoadingUIShown.dispatch():this.onLoadingUIHidden.dispatch())}destroy(){this.onLoadingUIHidden.dispose(),this.onLoadingUIShown.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onLoadingUIHidden",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onLoadingUIShown",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Q.SZi)(),(0,Y.Sn)("design:type",Array)],Z.prototype,"_loadingShowGameObjects",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Q.SZi)(),(0,Y.Sn)("design:type",Array)],Z.prototype,"_loadingHideGameObjects",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Z.prototype,"_minimumLoadDurationMS",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Z.prototype,"_delayToShowLoadGameObjectsMS",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("LoadingUI",X.Y.ui)],Z)},97518:(q,K,z)=>{"use strict";z.d(K,{R:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._args=[],this._acceptUnlocalized=!1,this._dontRunOnCreate=!1}get localizedText(){return this._localizedText}set localizationKey(q){this.setLocalizationKey(q)}get localizationKey(){return this._localizationKey}create(){super.create(),this._localizationKey&&!this._dontRunOnCreate&&this.setLocalizationKey(this._localizationKey)}setLocalizationKey(q){this._localizationKey=q,this.getLocalizedText()}setTextArguments(...q){this._args=q,this.getLocalizedText()}getLocalizedText(){{const q=X.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);this._localizedText.text=this._acceptUnlocalized&&!q.hasText(this._localizationKey)?this._localizationKey:q.getText(this._localizationKey,...this._args)}}};(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_localizedText",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"_localizationKey",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.W_S)(),(0,Y.Sn)("design:type",Array)],J.prototype,"_args",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_acceptUnlocalized",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_dontRunOnCreate",void 0),J=(0,Y.Cg)([(0,Q.EVk)("LocalizationKeyText",Z.Y.ui)],J)},31125:(q,K,z)=>{"use strict";z.d(K,{Eo:()=>it,Se:()=>et,XN:()=>Y,YT:()=>X,jN:()=>st,vX:()=>Q});var Y,Q,X,Z=z(62459),J=z(88022),tt=z(19631);!function(q){q.Left="left",q.Right="right",q.Up="up",q.Down="down",q.Check="check",q.Close="close",q.Info="info",q.Spin="spin",q.Shop="shop",q.Build="build",q.Gift="gift",q.Lock="lock",q.Music="music",q.Play="play",q.Plus="plus",q.Sparkle="sparkle",q.Delete="delete",q.Unspecified="unspecified",q.Custom="custom"}(Y||(Y={})),function(q){q.Sapphire="sapphire",q.Emerald="emerald",q.Marble="marble",q.Ruby="ruby"}(Q||(Q={})),function(q){q.Small="small",q.Medium="medium",q.Large="large"}(X||(X={}));const et={[X.Small]:{height:48,minWidth:44,fontFamily:Z.dBt.PaytoneOne,fontSize:18,margin:12,padding:4,iconSize:20,iconOnlySize:20,iconOnlyWidth:44,atlasGuid:J._.Ui_library_json,yOffset:2},[X.Medium]:{height:60,minWidth:100,fontFamily:Z.dBt.PaytoneOne,fontSize:18,margin:16,padding:4,iconSize:20,iconOnlySize:32,iconOnlyWidth:56,atlasGuid:J._.Ui_library_json,yOffset:3},[X.Large]:{height:68,minWidth:100,fontFamily:Z.dBt.PaytoneOne,fontSize:24,margin:16,padding:4,iconSize:20,iconOnlySize:32,iconOnlyWidth:64,atlasGuid:J._.Ui_library_json,yOffset:-4}},it={[X.Small]:Object.assign(Object.assign({},et[X.Small]),{iconSize:32,actionTextPadding:16,padding:8,margin:16}),[X.Medium]:Object.assign(Object.assign({},et[X.Medium]),{iconSize:32,actionTextPadding:16,padding:8}),[X.Large]:Object.assign(Object.assign({},et[X.Large]),{iconSize:32,actionTextPadding:16,padding:8,margin:24})},st={[Q.Sapphire]:{textColor:16777215,defaultGuid:tt.B.Sapphire_medium_default,activeGuid:tt.B.Sapphire_medium_active,hoverGuid:tt.B.Sapphire_medium_hover,disabledGuid:tt.B.Stone_medium_disabled},[Q.Emerald]:{textColor:16777215,defaultGuid:tt.B.Emerald_medium_default,activeGuid:tt.B.Emerald_medium_active,hoverGuid:tt.B.Emerald_medium_hover,disabledGuid:tt.B.Stone_medium_disabled},[Q.Marble]:{textColor:3552822,defaultGuid:tt.B.Marble_medium_default,activeGuid:tt.B.Marble_medium_active,hoverGuid:tt.B.Marble_medium_hover,disabledGuid:tt.B.Stone_medium_disabled},[Q.Ruby]:{textColor:16777215,defaultGuid:tt.B.Ruby_medium_default,activeGuid:tt.B.Ruby_medium_active,hoverGuid:tt.B.Ruby_medium_hover,disabledGuid:tt.B.Stone_medium_disabled}}},90614:(q,K,z)=>{"use strict";z.d(K,{P:()=>it});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(68152),tt=z(90351),et=z(95865);let it=class extends et.A{constructor(){super(...arguments),this._useOffset=!0,this._moveDurationMS=1e3,this._movementX=0,this._movementY=0,this._repeatCount=0,this._hasMoved=!1,this._disabled=!1}get hasMoved(){return this._hasMoved}set disabled(q){this._disabled=q}startTween(){if(super.startTween(),!this._tween&&!this._disabled){const q=this._targetGameObject.transform;(0,J.v)(!!q,"Cannot be attached to a GameObject without a transform");const K=this._useOffset?this._movementX+q.localPosition.x:this._movementX,z=this._useOffset?this._movementY+q.localPosition.y:this._movementY,Y={x:q.localPosition.x,y:q.localPosition.y};this._tween=X.q.instance.game.add.tween(Y,this).to({x:K,y:z},this._moveDurationMS,tt.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{q.setPosition(Y.x,Y.y)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this._hasMoved=!0,this.onComplete.dispatch()}))}}setTransformTarget(q,K){this._movementX=q,this._movementY=K}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],it.prototype,"_useOffset",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_moveDurationMS",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_movementX",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_movementY",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_repeatCount",void 0),it=(0,Y.Cg)([(0,Q.EVk)("MoveTransform",Z.Y.motion)],it)},43714:(q,K,z)=>{"use strict";z.d(K,{x:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(90351),tt=z(95865);let et=class extends tt.A{constructor(){super(...arguments),this._movementX=0,this._movementY=0,this._repeatCount=0,this._moveDurationMS=1e3}setMovement(q,K){this._movementX=q,this._movementY=K}startTween(){super.startTween();const q=this.GameObject.transform,K=q.worldPosition;this._tween=X.q.instance.game.add.tween(K,this).to({x:this._movementX,y:this._movementY},this._moveDurationMS,J.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{q.worldPosition={x:K.x,y:K.y}})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this.onComplete.dispatch()}))}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_movementX",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_movementY",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_repeatCount",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_moveDurationMS",void 0),et=(0,Y.Cg)([(0,Q.EVk)("MoveTransformToWorldPosition",Z.Y.motion)],et)},45385:(q,K,z)=>{"use strict";z.d(K,{e:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(88022),J=z(43846),tt=z(31125);!function(q){q.Icon="icon",q.Numeric="number",q.Text="text",q.Empty="empty"}(Y||(Y={}));let et=class extends X.uAl{constructor(){super(...arguments),this.SIZE_OFFSET=4,this._mode=Y.Icon,this._icon=tt.XN.Info,this._badgeText="!",this._numberedMaxValue=99,this.minWidth=25}get mode(){return this._mode}set mode(q){this._mode!==q&&(this._mode=q,this.refresh())}get icon(){return this._icon}set icon(q){var K;this._icon!==q&&(this._icon=q,null===(K=this._iconComponent)||void 0===K||K.updateAsset(Z._.Ui_library_json,q))}postCreate(){this.refresh()}refresh(){var q;switch(this.mode){case Y.Numeric:this.updateNumberedNotificationBadge(this.GameObject.active,parseInt(this._badgeText));break;case Y.Text:this.updateNonNumberedNotificationBadge(this.GameObject.active);break;case Y.Icon:null===(q=this._iconComponent)||void 0===q||q.updateAsset(Z._.Ui_library_json,this._icon)}this.updateEnabled()}setActive(q){this.GameObject.active=q}updateNumberedNotificationBadge(q,K){this.GameObject.active=q,this._mode=Y.Numeric,this.updateEnabled(),K>this._numberedMaxValue?this._badgeText=`${this._numberedMaxValue}+`:this._badgeText=`${K}`,this._textToUpdate.text=this._badgeText,this.updateBackgroundWidthToText()}updateBackgroundWidthToText(){var q;const K=null===(q=this._textToUpdate)||void 0===q?void 0:q.GameObject.transform;K instanceof X.XVE&&(this._backgroundTransform.widthDelta=Math.max(K.widthDelta-this.SIZE_OFFSET,this.minWidth))}updateBackgroundWidthToIcon(){X.Aq$.isDefined(this._backgroundTransform)&&(this._backgroundTransform.widthDelta=this.minWidth)}updateNonNumberedNotificationBadge(q){this.GameObject.active=q,this._mode=Y.Text,this._textToUpdate.text=(0,J.k)(this._badgeText),this.updateEnabled()}updateEmptyNotificationBadge(q){this.GameObject.active=q,this._mode=Y.Empty,this._textToUpdate.text="",this.updateEnabled()}updateEnabled(){if(X.Aq$.isDefined(this._iconComponent)&&X.Aq$.isDefined(this._textToUpdate))switch(this._mode){case Y.Icon:this.updateBackgroundWidthToIcon(),this._iconComponent.GameObject.active=!0,this._textToUpdate.GameObject.active=!1;break;case Y.Numeric:case Y.Text:this.updateBackgroundWidthToText(),this._iconComponent.GameObject.active=!1,this._textToUpdate.GameObject.active=!0;break;case Y.Empty:this.updateBackgroundWidthToText(),this._iconComponent.GameObject.active=!1,this._textToUpdate.GameObject.active=!1}}};(0,Q.Cg)([(0,X.gfw)(Y),(0,X.YLv)("The mode the badge should be in."),(0,Q.Sn)("design:type",String),(0,Q.Sn)("design:paramtypes",[String])],et.prototype,"mode",null),(0,Q.Cg)([(0,X.gfw)(tt.XN),(0,X.YLv)("The icon to display on the badge."),(0,X.okD)((q=>q.mode===Y.Icon)),(0,Q.Sn)("design:type",String),(0,Q.Sn)("design:paramtypes",[String])],et.prototype,"icon",null),(0,Q.Cg)([(0,X.W_S)(),(0,X.okD)((q=>q.mode!==Y.Icon)),(0,Q.Sn)("design:type",String)],et.prototype,"_badgeText",void 0),(0,Q.Cg)([(0,X.g11)(),(0,X.okD)((q=>q.mode===Y.Numeric)),(0,Q.Sn)("design:type",Number)],et.prototype,"_numberedMaxValue",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],et.prototype,"minWidth",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,X.Lr6)(10),(0,Q.Sn)("design:type",X.vYh)],et.prototype,"_iconComponent",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,X.Lr6)(10),(0,Q.Sn)("design:type",X.EYj)],et.prototype,"_textToUpdate",void 0),(0,Q.Cg)([(0,X.MnK)(X.XVE),(0,X.Lr6)(10),(0,Q.Sn)("design:type",X.XVE)],et.prototype,"_backgroundTransform",void 0),et=(0,Q.Cg)([(0,X.EVk)("NotificationBadge")],et)},33744:(q,K,z)=>{"use strict";z.d(K,{N:()=>J});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this._inputOverlays=[],this._inputEnabledWorldPositionX=0,this._inputEnabledWorldPositionY=0,this._inputEnabledWidth=0,this._inputEnabledHeight=0}create(){super.create(),this._inputEnabledAreaTransform?this.updateEnabledAreaByTransform():this._inputEnabledWidth>0&&this._inputEnabledHeight>0&&this.updateEnabledAreaByValue()}setEnabledAreaByTransform(q){this._inputEnabledAreaTransform=q,this.updateEnabledAreaByTransform()}updateEnabledAreaByTransform(){const q=this._inputEnabledAreaTransform.rectTransformDimensions.width,K=this._inputEnabledAreaTransform.rectTransformDimensions.height,z=this._inputEnabledAreaTransform.worldPosition.x-this._inputEnabledAreaTransform.pivot.x*q,Y=this._inputEnabledAreaTransform.worldPosition.y-this._inputEnabledAreaTransform.pivot.y*K;this.setEnabledAreaByValue(new X.Point(z,Y),new Q.or0(q,K))}setEnabledAreaByValue(q,K){this._inputEnabledWorldPositionX=q.x,this._inputEnabledWorldPositionY=q.y,this._inputEnabledWidth=K.width,this._inputEnabledHeight=K.height,this.updateEnabledAreaByValue()}enableFullScreen(){this.setEnabledAreaByValue(new X.Point(0,0),new Q.or0(1280,720))}updateEnabledAreaByValue(){const q=this._inputEnabledWorldPositionX+this._inputEnabledWidth,K=this._inputEnabledWorldPositionY+this._inputEnabledHeight;this._inputOverlays[0].setSizeDelta(Q.Zt2.DEFAULT_WIDTH,this._inputEnabledWorldPositionY),this._inputOverlays[1].setSizeDelta(this._inputEnabledWorldPositionX,Q.Zt2.DEFAULT_HEIGHT),this._inputOverlays[2].setSizeDelta(Q.Zt2.DEFAULT_WIDTH-q,Q.Zt2.DEFAULT_HEIGHT),this._inputOverlays[3].setSizeDelta(Q.Zt2.DEFAULT_WIDTH,Q.Zt2.DEFAULT_HEIGHT-K),this._inputOverlays[0].localMatrix,this._inputOverlays[1].localMatrix,this._inputOverlays[2].localMatrix,this._inputOverlays[3].localMatrix,this._inputOverlays[0].worldPosition=new X.Point(0,0),this._inputOverlays[1].worldPosition=new X.Point(0,0),this._inputOverlays[2].worldPosition=new X.Point(q,0),this._inputOverlays[3].worldPosition=new X.Point(0,K)}};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Array)],J.prototype,"_inputOverlays",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],J.prototype,"_inputEnabledAreaTransform",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_inputEnabledWorldPositionX",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_inputEnabledWorldPositionY",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_inputEnabledWidth",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_inputEnabledHeight",void 0),J=(0,Y.Cg)([(0,Q.EVk)("OverlayInputBlocking",Z.Y.ui)],J)},87821:(q,K,z)=>{"use strict";z.d(K,{o:()=>lt});var Y,Q=z(8674),X=z(62459),Z=z(17446),J=z(35120),tt=z(77938),et=z(95946),it=z(87239),st=z(37773),nt=z(34578),at=z(97317),rt=z(72772),ot=z(28152),ht=z(26932),ct=z(26004),dt=z(22023);let lt=Y=class extends ht.z{constructor(){super(...arguments),this._elementMap={[et.a.Fire]:"PET_RESCUE_ELEMENT_FIRE",[et.a.Plant]:"PET_RESCUE_ELEMENT_PLANT",[et.a.Water]:"PET_RESCUE_ELEMENT_WATER",[et.a.Ice]:"PET_RESCUE_ELEMENT_ICE",[et.a.Storm]:"PET_RESCUE_ELEMENT_STORM",[et.a.Astral]:"PET_RESCUE_ELEMENT_ASTRAL",[et.a.Shadow]:"PET_RESCUE_ELEMENT_SHADOW",[et.a.Physical]:"PET_RESCUE_ELEMENT_PHYSICAL"},this._rarityMap={[Z.E.Common]:"PET_RESCUE_RARITY_COMMON",[Z.E.Uncommon]:"PET_RESCUE_RARITY_UNCOMMON",[Z.E.Rare]:"PET_RESCUE_RARITY_RARE",[Z.E.Heroic]:"PET_RESCUE_RARITY_HEROIC",[Z.E.Legendary]:"PET_RESCUE_RARITY_LEGENDARY"}}get petLevel(){return this._petSchema.level}get petName(){var q;return null!==(q=this._petSchema.nickname)&&void 0!==q?q:this._petSchema.name}bindContext(){var q,K;const z=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Q=this.getPetDataAsset(),Z=dt.P8.isPetOnTeam(this._petSchema),tt=Z&&z.getChargedLevel()>0?st.e.getActivePlayerChargedLevelTier():at.Bv.NO_CHARGE,et=z.getGrowthBattleStats(this._petSchema),rt=null!==(K=null===(q=Q.data)||void 0===q?void 0:q.affinity)&&void 0!==K?K:"",ot=Q.data.rarity;let ht=this._elementMap[rt],lt=this._rarityMap[ot];ht||(ht="PET_RESCUE_ELEMENT_PHYSICAL",X.VyI.log(`[${this.getProviderName()}] Element type from pet data is not valid - defaulting to Physical element`,X.$bb.Error)),this._context.Container.rebind(ht).toConstantValue(!0),lt||(lt="PET_RESCUE_RARITY_HEROIC",X.VyI.log(`[${this.getProviderName()}] Rarity type from pet data is not valid - defaulting to Heroic rarity`,X.$bb.Error)),this._context.Container.rebind(lt).toConstantValue(!0),this._context.Container.rebind("PET_CARD_ELEMENT_NAME").toConstantValue(it.x.getElementDisplayName(rt)),this._context.Container.rebind("PET_RESCUE_NAME").toConstantValue(this.petName),this._context.Container.rebind("PET_RESCUE_LEVEL").toConstantValue(this.petLevel.toString()),this._context.Container.rebind("PET_RESCUE_HEALTH").toConstantValue(et.hp.toString()),this._context.Container.rebind("PET_RESCUE_POWER").toConstantValue(et.power.toString()),this._context.Container.rebind("PET_RESCUE_DEFENCE").toConstantValue(et.defence.toString()),this._context.Container.rebind("PET_RESCUE_SPEED").toConstantValue(et.speed.toString()),this._context.Container.rebind("PET_RESCUE_INITIATIVE").toConstantValue(et.initiative.toString()),this._context.Container.rebind("PET_CARD_LABEL_COLOR").toConstantValue(Y.TEXT_COLOR_MAP[ot]),this._context.Container.rebind(nt.m.ChargedLevelAnimationTier).toConstantValue(tt),this._context.Container.rebind("PET_CARD_STAT_TEXT_COLOR").toConstantValue(Z&&z.getChargedLevel()>0?Y.CHARGED_STAT_COLOR_MAP[ot]:Y.TEXT_COLOR_MAP[ot]),this.resolvePetGear().finally((()=>{var q;null===(q=this.gameObject)||void 0===q||q.findComponentsInChildren(ct.B).forEach((q=>q.consume()))}))}resolvePetGear(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=yield rt.I.getStatsOfEquippedGearForPet(this._petSchema.gear);this._context.Container.rebind("PET_RESCUE_GEAR_HEALTH").toConstantValue(q.hp>0?`+${q.hp}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_POWER").toConstantValue(q.power>0?`+${q.power}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_DEFENCE").toConstantValue(q.defence>0?`+${q.defence}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_SPEED").toConstantValue(q.speed>0?`+${q.speed}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_INITIATIVE").toConstantValue(q.initiative>0?`+${q.initiative}`:"")}))}rebindContext(){this.bindContext()}unbindContext(){}getPetDataAsset(){return tt.t.getItem("pet",this._petSchema.ID)}getProviderName(){return"PetCardDataProvider"}};lt.TEXT_COLOR_MAP={[Z.E.Common]:"#363636",[Z.E.Uncommon]:"#363636",[Z.E.Rare]:"#FFFFFF",[Z.E.Heroic]:"#FFFFFF",[Z.E.Legendary]:"#363636"},lt.CHARGED_STAT_COLOR_MAP={[Z.E.Common]:"#6BE04C",[Z.E.Uncommon]:"#6BE04C",[Z.E.Rare]:"#6BE04C",[Z.E.Heroic]:"#6BE04C",[Z.E.Legendary]:"#6BE04C"},(0,Q.Cg)([(0,X.Cdj)("PET_RESCUE_CREATURE_DATA",!1),(0,Q.Sn)("design:type",Object)],lt.prototype,"_petSchema",void 0),lt=Y=(0,Q.Cg)([(0,X.EVk)("PetCardDataProvider",ot.Y.uiPet)],lt)},93171:(q,K,z)=>{"use strict";z.d(K,{a:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.uAl{constructor(){super(...arguments),this.fillSpeedMS=500,this.reverse=!1,this.onStart=new Q.HN0,this.onComplete=new Q.HN0,this.onProgress=new Q.HN0,this.onToggleAnchors=new Q.HN0}get fillValue(){return this._fillValue}set fillValue(q){this._fillValue=Math.min(Math.max(q,0),1)}get fillTransform(){return this._fillTransform}create(){var q,K;super.create();const z=null===(K=null===(q=this._fillGraphic)||void 0===q?void 0:q.GameObject)||void 0===K?void 0:K.transform;z&&z instanceof Q.XVE&&(this._fillTransform=z),this.setValue(this._fillValue)}setValue(q){if(!this.GameObject)return;const K=this._fillValue;this._fillValue=Math.min(Math.max(q,0),1),this._fillTransform&&(this.reverse?(this._fillTransform.setAnchorMin(1-this._fillValue,this._fillTransform.anchorMin.y),this._fillTransform.setAnchorMax(1,this._fillTransform.anchorMax.y)):(this._fillTransform.setAnchorMin(0,this._fillTransform.anchorMin.y),this._fillTransform.setAnchorMax(this._fillValue,this._fillTransform.anchorMax.y))),this.onProgress.dispatch(this,K,this._fillValue),1===this._fillValue&&this.toggleAnchorContainers(!1)}tweenValue(q,K=0){var z;null===(z=this._tween)||void 0===z||z.stop().remove();const Y=Math.min(Math.max(q,0),1),Z=this._fillValue,J={percentage:this._fillValue};this._tween=X.q.instance.game.add.tween(J,J),this._tween.to({percentage:q},this.fillSpeedMS,Q.GS3.Linear.None,!1).delay(K).onUpdateCallback((()=>{this.setValue(J.percentage)})),this._tween.onTweenComplete.addOnce((()=>{this.setValue(Y),this._tween.stop().remove(),this._tween=null,this.onComplete.dispatch(this,Z,Y)})),this._tween.onStart.addOnce((()=>{this.onStart.dispatch(this,Z,Y)})),this._tween.start(),Y!==J.percentage&&this.toggleAnchorContainers(!0)}toggleAnchorContainers(q){this.onToggleAnchors.dispatch(q)}setFillColor(q){this._fillGraphic&&(this._fillGraphic.tint="number"==typeof q?q:Q.Q1f.hexToColor(q).color)}setInnerColor(q){this._innerGraphic&&(this._innerGraphic.tint="number"==typeof q?q:Q.Q1f.hexToColor(q).color)}setOuterColor(q){this._outerGraphic&&(this._outerGraphic.tint="number"==typeof q?q:Q.Q1f.hexToColor(q).color)}destroy(){this.onToggleAnchors.dispose(),this.onProgress.dispose(),this.onComplete.dispose(),this.onStart.dispose(),X.q.instance.game.tweens.remove(this._tween),super.destroy()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"_fillValue",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],J.prototype,"fillSpeedMS",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"reverse",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],J.prototype,"_fillGraphic",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],J.prototype,"_outerGraphic",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],J.prototype,"_innerGraphic",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onStart",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onComplete",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onProgress",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onToggleAnchors",void 0),J=(0,Y.Cg)([(0,Q.EVk)("ProgressBarComponent",Z.Y.ui)],J)},34958:(q,K,z)=>{"use strict";z.d(K,{P:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(93171);let J=class extends Z.a{tweenValue(q){this._tweenFrom=this.fillValue,this._tweenTo=Math.min(Math.max(q,0),1),this._tweenStartTime=Date.now(),this.onStart.dispatch(this,this._tweenFrom,this._tweenTo),this._tweenFrom!==this._tweenTo&&this.toggleAnchorContainers(!0)}update(){if(this._tweenStartTime){const q=Math.min(1,(Date.now()-this._tweenStartTime)/this.fillSpeedMS),K=this._tweenFrom+(this._tweenTo-this._tweenFrom)*q;this.setValue(K),q>=1&&(this._tweenStartTime=null,this.onComplete.dispatch(this,K,K))}super.update()}};J=(0,Y.Cg)([(0,Q.EVk)("RealTimeProgressBar",X.Y.ui)],J)},12408:(q,K,z)=>{"use strict";z.d(K,{Z:()=>it});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(68152),tt=z(90351),et=z(95865);let it=class extends et.A{constructor(){super(...arguments),this._rotationDurationMS=1,this._rotationCount=-1,this._rotationDegrees=360}startTween(){if(super.startTween(),!this._tween){const q=this._targetGameObject.transform;(0,J.v)(!!q,"Cannot be attached to a GameObject without a transform");const K={value:q.localRotation};this._tween=X.q.instance.game.add.tween(K,this).to({value:this._rotationDegrees},this._rotationDurationMS,tt.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._rotationCount,this._yoyo),this._tween.onUpdate.add((()=>{q.setRotation(K.value)})),this._tween.onTweenComplete.addOnce((()=>{q.setRotation(0),this.destroyTween(),this.onComplete.dispatch()}))}}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_rotationDurationMS",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_rotationCount",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_rotationDegrees",void 0),it=(0,Y.Cg)([(0,Q.EVk)("RotateTransform",Z.Y.motion)],it)},46459:(q,K,z)=>{"use strict";z.d(K,{_:()=>et});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(68152),J=z(90351),tt=z(95865);let et=class extends tt.A{constructor(){super(...arguments),this._durationMS=1,this._repeatCount=-1,this._xScaleFinal=1,this._yScaleFinal=1}startTween(){if(super.startTween(),!this._tween){const q=this._targetGameObject.transform;(0,Z.v)(!!q,"Cannot be attached to a GameObject without a transform");const K={x:q.localScale.x,y:q.localScale.y};this._tween=Q.W$e.instance.game.add.tween(K,this).to({x:this._xScaleFinal,y:this._yScaleFinal},this._durationMS,J.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{q.setScale(K.x,K.y)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this.onComplete.dispatch()}))}}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_durationMS",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_repeatCount",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_xScaleFinal",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_yScaleFinal",void 0),et=(0,Y.Cg)([(0,Q.EVk)("ScaleTransform",X.Y.motion)],et)},41365:(q,K,z)=>{"use strict";z.d(K,{Q:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(5269),J=z(68239);let tt=class extends J.W{constructor(){super(...arguments),this._start=0,this._pressed=!1,this.direction=Z.H.Vertical,this.nib=null,this._scrollView=null,this._rectTransform=null}get start(){return this._start}get pressed(){return this._pressed}set horizontal(q){this.direction=q?Z.H.Horizontal:Z.H.Vertical}set scrollView(q){this._scrollView=q}get RectTransform(){return this._rectTransform}create(){super.create(),X.q.instance.game.input.addMoveCallback(this.moveNib,this),this._rectTransform=this.GameObject.findComponent(Q.XVE)}onDown(q,K){this._pressed=!0,this._start=this.direction===Z.H.Vertical?K.y:K.x}onUp(q,K){this._pressed=!1}moveNib(q,K,z){var Y,Q;if(this._pressed){const q=this.direction===Z.H.Vertical?z-this._start:K-this._start;if(this._start=this.direction===Z.H.Vertical?z:K,this.direction===Z.H.Vertical){this.nib.posY+=q;const K=this.minNibY(),z=this.maxNibY();null===(Y=this._scrollView)||void 0===Y||Y.scrollBarListener.dispatch(1-(this.nib.posY-K)/(z-K),this.direction)}else{this.nib.posX+=q;const K=this.minNibX(),z=this.maxNibX();null===(Q=this._scrollView)||void 0===Q||Q.scrollBarListener.dispatch(1-(this.nib.posX-K)/(z-K),this.direction)}this.limitMovement()}}limitMovement(){if(this.direction===Z.H.Vertical){const q=this.maxNibY(),K=this.minNibY();this.nib.posYq&&(this.nib.posY=q)}else{const q=this.maxNibX(),K=this.minNibX();this.nib.posXq&&(this.nib.posX=q)}}scrollToPercent(q){this.direction===Z.H.Vertical?this.nib.posY=Q.cj9.linear(this.maxNibY(),this.minNibY(),q):this.nib.posX=Q.cj9.linear(this.minNibX(),this.maxNibX(),q),this.limitMovement()}maxNibY(){return this._rectTransform.fullHeight/2-this.nib.pivot.y*this.nib.fullHeight}maxNibX(){return this._rectTransform.fullWidth/2+this.nib.pivot.x*this.nib.fullWidth}minNibY(){return-this._rectTransform.fullHeight/2+this.nib.pivot.y*this.nib.fullHeight}minNibX(){return-this._rectTransform.fullWidth/2+this.nib.pivot.x*this.nib.fullWidth}destroy(){X.q.instance.game.input.deleteMoveCallback(this.moveNib,this),super.destroy()}};(0,Y.Cg)([(0,Q.vkK)(),(0,Q.Lr6)(0),(0,Q.nKb)("isHorizontal"),(0,Y.Sn)("design:type",Boolean),(0,Y.Sn)("design:paramtypes",[Boolean])],tt.prototype,"horizontal",null),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],tt.prototype,"nib",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("ScrollBarRectTransform")],tt)},2385:(q,K,z)=>{"use strict";z.d(K,{I:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(5269),tt=z(28152),et=z(68239),it=z(41365);let st=Y=class extends et.W{constructor(){super(...arguments),this._direction=0,this._isKinematic=!0,this._verticalScrollBar=null,this._horizontalScrollBar=null,this._contentView=null,this._wheelStep=40,this._wheelOnOver=!1,this._allowMouseWheel=!0,this._allowTouch=!0,this._scrollBarListener=new X.HN0,this._pressedDown=!1,this._timestamp=0,this._startX=0,this._startY=0,this._velocityX=0,this._velocityY=0,this._velocityWheel=0,this._rectTransform=null}get direction(){return this._direction}set vertical(q){this._direction=q?this._direction|J.H.Vertical:this._direction&J.H.Vertical}set horizontal(q){this._direction=q?this._direction|J.H.Horizontal:this._direction&J.H.Horizontal}get scrollBarListener(){return this._scrollBarListener}create(){super.create(),this._scrollBarListener.add(this.scrollToPercent.bind(this),this),this._allowTouch&&Z.q.instance.game.input.addMoveCallback(this.moveCanvas,this),this._allowMouseWheel&&(this._mouseWheelCallback=this.mouseWheel.bind(this),Z.q.instance.game.input.mouse.addMouseWheelCallback(this._mouseWheelCallback)),this._rectTransform=this.GameObject.findComponent(X.XVE),this._verticalScrollBar&&(this._verticalScrollBar.scrollView=this)}update(){super.update(),this._isKinematic&&(this._direction&J.H.Vertical)===J.H.Vertical&&Math.abs(this._velocityWheel)>Y.VELOCITY_THRESHOLD&&(this._contentView.posY+=this._velocityWheel,this.limitMovement(),this._velocityWheel*=Y.DECELERATION)}onDown(q,K){this._startX=K.x,this._startY=K.y,this._pressedDown=!0,this._timestamp=Date.now(),this._velocityY=this._velocityX=0}onUp(q,K){this._pressedDown=!1}moveCanvas(q,K,z){if(this._pressedDown){const q=Date.now(),Q=q-this._timestamp;this._timestamp=q;let X=0;(this._direction&J.H.Horizontal)===J.H.Horizontal&&(X=K-this._startX,this._startX=K,this._velocityX=X*Y.DISPLACEMENT/(Q+1)*Y.INITIAL_ACCELERATION+this._velocityX*Y.FINAL_ACCELERATION,this._contentView.posX+=X,this.limitMovement()),(this._direction&J.H.Vertical)===J.H.Vertical&&(X=z-this._startY,this._startY=z,this._velocityY=X*Y.DISPLACEMENT/(Q+1)*Y.INITIAL_ACCELERATION+this._velocityY*Y.FINAL_ACCELERATION,this._contentView.posY+=X,this.limitMovement())}}mouseWheel(q){q.preventDefault();const K=this.getCollisionBox();if(!this._wheelOnOver||null!==K.transform&&X.M_G.containsRaw(K.getGlobalPosition().x,K.getGlobalPosition().y,K.width,K.height,Z.q.instance.game.input.activePointer.x,Z.q.instance.game.input.activePointer.y)){const q=120*Z.q.instance.game.input.mouse.wheelDelta/this._wheelStep;this._isKinematic?this._velocityWheel+=q:(this._contentView.posY+=q,this.limitMovement())}}getTopLimit(){if(.5===this._contentView.anchorMin.y&&.5===this._contentView.anchorMax.y){const q=-this._rectTransform.fullHeight/2+this._contentView.pivot.y*this._contentView.fullHeight;return this._contentView.fullHeight>this._rectTransform.fullHeight?q-(this._contentView.fullHeight-this._rectTransform.fullHeight):q}return 0===this._contentView.anchorMin.y&&0===this._contentView.anchorMax.y?Math.min(this._rectTransform.fullHeight-this._contentView.fullHeight,0):(X.VyI.log(`Unexpected value for content anchor y values (min ${this._contentView.anchorMin.y} and max ${this._contentView.anchorMax.y}) they should both be 0 or 0.5`,X.$bb.Error),0)}getBottomLimit(){if(.5===this._contentView.anchorMin.y&&.5===this._contentView.anchorMax.y){const q=this._rectTransform.fullHeight/2-(1-this._contentView.pivot.y)*this._contentView.fullHeight;return this._contentView.fullHeight>this._rectTransform.fullHeight?q+(this._contentView.fullHeight-this._rectTransform.fullHeight):q}return 0===this._contentView.anchorMin.y&&0===this._contentView.anchorMax.y||X.VyI.log(`Unexpected value for content anchor y values (min ${this._contentView.anchorMin.y} and max ${this._contentView.anchorMax.y}) they should both be 0 or 0.5`,X.$bb.Error),0}getRightLimit(){if(.5===this._contentView.anchorMin.x&&.5===this._contentView.anchorMax.x){const q=this._rectTransform.fullWidth/2-this._contentView.pivot.x*this._contentView.fullWidth;return this._contentView.fullWidth>this._rectTransform.fullWidth?q+(this._contentView.fullWidth-this._rectTransform.fullWidth):q}return 0===this._contentView.anchorMin.x&&0===this._contentView.anchorMax.x||X.VyI.log(`Unexpected value for content anchor x values (min ${this._contentView.anchorMin.x} and max ${this._contentView.anchorMax.x}) they should both be 0 or 0.5`,X.$bb.Error),0}getLeftLimit(){if(.5===this._contentView.anchorMin.x&&.5===this._contentView.anchorMax.x){const q=-this._rectTransform.fullWidth/2+this._contentView.pivot.x*this._contentView.fullWidth;return this._contentView.fullWidth>this._rectTransform.fullWidth?q-(this._contentView.fullWidth-this._rectTransform.fullWidth):q}return 0===this._contentView.anchorMin.x&&0===this._contentView.anchorMax.x?this._rectTransform.fullWidth-this._contentView.fullWidth:(X.VyI.log(`Unexpected value for content anchor x values (min ${this._contentView.anchorMin.x} and max ${this._contentView.anchorMax.x}) they should both be 0 or 0.5`,X.$bb.Error),0)}limitMovement(){if((this._direction&J.H.Vertical)===J.H.Vertical){const q=this.getTopLimit(),K=this.getBottomLimit();if(this._contentView.posY>K&&(this._contentView.posY=K),this._contentView.posYq?(this._contentView.posY-q)/(K-q):100,this._verticalScrollBar.scrollToPercent(z)}}if((this._direction&J.H.Horizontal)===J.H.Horizontal){const q=this.getRightLimit(),K=this.getLeftLimit();if(this._contentView.posX>q&&(this._contentView.posX=q),this._contentView.posX{"use strict";z.d(K,{S:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(97518);let J=class extends Q.uAl{run(q){q.findComponent(Z.R).setLocalizationKey(this.key)}};(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"key",void 0),J=(0,Y.Cg)([(0,Q.EVk)("SetLocalizedText",X.Y.uiDialog)],J)},19633:(q,K,z)=>{"use strict";z.d(K,{d:()=>nt,S:()=>at});var Y=z(8674),Q=z(62459),X=z(68910),Z=z(35120),J=z(93690),tt=z(28152),et=z(31125),it=z(15284);let st=class extends Q.zFe{constructor(){super(...arguments),this.length=.5,this.overrideTransform=void 0,this.updatePosition=!1,this.transitions={[Q.ZIW.Default]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"d97071f6-18c9-4ca7-8c21-c9af9751af39"},[Q.ZIW.Down]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"d10ec19a-5675-4176-b604-2682fd5a46c4"},[Q.ZIW.Over]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"39aeccae-f28c-4520-9135-27c855b39566"},[Q.ZIW.Disabled]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"6d5b86f3-7e04-43e3-ba99-9ec8e19178b9"},[Q.ZIW.Focus]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"d97071f6-18c9-4ca7-8c21-c9af9751af39"}},this._defaultRenderComponent=null,this._tween=null,this._defaultPosition=new Q.I9Y(0,0)}create(){var q,K,z,Y,X,Z,J,tt,et,it;this._targetTransform=null!==(K=null===(q=this.overrideTransform)||void 0===q?void 0:q.transform)&&void 0!==K?K:this.gameObject.transform,this._defaultPosition=new Q.I9Y(this._targetTransform.localPosition.x,this._targetTransform.localPosition.y),super.create(),this.onTweenUpdate=this.onTweenUpdate.bind(this),this._targetState=this.transitions[Q.ZIW.Default],this._currentState={alpha:this._targetState.alpha,tint:`#${this._targetState.tint.toString(16)}`,scaleX:null!==(Y=null===(z=this._targetState.scale)||void 0===z?void 0:z.x)&&void 0!==Y?Y:1,scaleY:null!==(Z=null===(X=this._targetState.scale)||void 0===X?void 0:X.y)&&void 0!==Z?Z:1,positionX:null!==(tt=null===(J=this._targetState.position)||void 0===J?void 0:J.x)&&void 0!==tt?tt:0,positionY:null!==(it=null===(et=this._targetState.position)||void 0===et?void 0:et.y)&&void 0!==it?it:0,imageID:this._targetState.imageID},this._defaultRenderComponent instanceof Q.vYh?(this._updateImageFunction=this.updateGraphicImage,this._updateValuesFunction=this.updateGraphicValues):this._defaultRenderComponent instanceof Q.CxD?(this._updateImageFunction=this.updateSlicePlaneGraphicImage,this._updateValuesFunction=this.updateSlicePlaneGraphicValues):this._defaultRenderComponent instanceof Q.EYj?this._updateValuesFunction=this.updateTextValues:this._defaultRenderComponent instanceof Q.pH6?this._updateValuesFunction=this.updateRoundedRectanglePrimitiveComponentValues:this._updateValuesFunction=this.updateRenderValues}destroy(){this._tween&&!this._tween.isDestroyed&&(this._tween.stop(),Q.W$e.instance.game.tweens.remove(this._tween)),this._tween=null,super.destroy()}setState(q){var K,z,Y,X,Z,J,tt,et,it,st,nt;const at=this.transitions[q];if(!at)return void Q.VyI.log(`No transition found for state: ${q}`,Q.$bb.Warning);if(at===this._targetState)return;this._targetTransform=null!==(z=null===(K=this.overrideTransform)||void 0===K?void 0:K.transform)&&void 0!==z?z:this.gameObject.transform;const rt=null!==(Y=at.imageID)&&void 0!==Y?Y:this.transitions[Q.ZIW.Default].imageID;this.updateImageID(rt),this._targetState=at;const ot={};ot.alpha=at.alpha,ot.tint=`#${at.tint.toString(16)}`,ot.scaleX=null!==(Z=null===(X=at.scale)||void 0===X?void 0:X.x)&&void 0!==Z?Z:1,ot.scaleY=null!==(tt=null===(J=at.scale)||void 0===J?void 0:J.y)&&void 0!==tt?tt:1,ot.positionX=null!==(it=null===(et=at.position)||void 0===et?void 0:et.x)&&void 0!==it?it:0,ot.positionY=null!==(nt=null===(st=at.position)||void 0===st?void 0:st.y)&&void 0!==nt?nt:0,this._tween&&!this._tween.isDestroyed&&(this._tween.stop(),Q.W$e.instance.game.tweens.remove(this._tween)),this._tween=Q.W$e.instance.game.tweens.create(this._currentState,this,!0),this._tween.onUpdate.add(this.onTweenUpdate,this),this._tween.to(ot,1e3*this.length,Q.GS3.Sinusoidal.Out),this._tween.start()}onTweenUpdate(){if(!this._currentState)return;let q=16777215;if(this._currentState.tint.startsWith("rgba")){const K=this._currentState.tint.match(/\d+/g);q=(parseInt(K[0])<<16)+(parseInt(K[1])<<8)+parseInt(K[2])}else q=parseInt(this._currentState.tint.replace("#","0x"));this.applyTransitionValues(this._currentState,Math.round(q))}updateImageID(q){var K;null===(K=this._updateImageFunction)||void 0===K||K.call(this,q)}applyTransitionValues(q,K){var z;this._targetTransform.setScale(q.scaleX,q.scaleY),this.updatePosition&&this._targetTransform.setPosition(this._defaultPosition.x+q.positionX,this._defaultPosition.y+q.positionY),null===(z=this._updateValuesFunction)||void 0===z||z.call(this,K,q.alpha)}updateGraphicValues(q,K){const z=this._defaultRenderComponent;(null==z?void 0:z.isValid())&&(z.tint=q,z.setAlpha(K))}updateSlicePlaneGraphicValues(q,K){const z=this._defaultRenderComponent;z.slicedImage.tint=q,z.slicedImage.alpha=K}updateTextValues(q,K){const z=this._defaultRenderComponent;z.tint=q,z.alpha=K}updateRoundedRectanglePrimitiveComponentValues(q,K){const z=this._defaultRenderComponent;z.setColor(Q.TZp.decimalToHex(q)),z.alpha=K}updateRenderValues(q,K){const z=this._defaultRenderComponent.getRootContainer();z&&(z.alpha=K)}updateGraphicImage(q){if((null==q?void 0:q.length)>0){const K=this._defaultRenderComponent,z=Q.W$e.instance.game.cache.getTexture(q);z&&(null==K?void 0:K.isValid())&&(K.image.texture=z)}}updateSlicePlaneGraphicImage(q){var K;if((null==q?void 0:q.length)>0){const z=this._defaultRenderComponent;if(!(null===(K=null==z?void 0:z.slicedImage)||void 0===K?void 0:K.shader))return;z.setSlicedImage(q)}}};var nt;(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],st.prototype,"length",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],st.prototype,"overrideTransform",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],st.prototype,"updatePosition",void 0),(0,Y.Cg)([(0,Q.npj)(),(0,Y.Sn)("design:type",Object)],st.prototype,"transitions",void 0),(0,Y.Cg)([(0,Q.Pqz)(Q.y4o),(0,Y.Sn)("design:type",Q.y4o)],st.prototype,"_defaultRenderComponent",void 0),st=(0,Y.Cg)([(0,Q.EVk)("TweenedTransitions",tt.Y.transition)],st),function(q){q[q.NONE=0]="NONE",q[q.LEFT=1]="LEFT",q[q.RIGHT=2]="RIGHT",q[q.ICON_ONLY=3]="ICON_ONLY"}(nt||(nt={}));let at=class extends Q.Eci{constructor(){super(),this.text="BUTTON_OKAY_CAPITAL",this.type=et.vX.Sapphire,this.size=et.YT.Medium,this.useMaxWidth=!1,this.maxWidth=0,this.iconPosition=nt.NONE,this.icon=et.XN.Left,this.customIconGuid="",this.customIconSize=new Q.I9Y(et.Se[et.YT.Medium].iconSize),this.customIconTinting=!0,this.suppressSound=!1,this._buttonWidth=0,this.fitToContents=!0,this.disableWhileAwaitingListeners=!0}create(){super.create(),this.localizeButtonText()}postCreate(){var q;super.postCreate(),this.populateTextComponents(),this.populateIconComponents(),this.renderComponent=null!==(q=this.gameObject.findComponentInChildren(Q.y4o))&&void 0!==q?q:this.gameObject.addComponent(Q.jsv),this._backgroundComponent=this.gameObject.findChildByName("Button").findComponent(Q.vYh),this._tweenedTransition=this.gameObject.findComponentInChildren(st),this.regenerateButton(),this.setButtonEnabled(this._inputEnabled),this.useHandCursor=this._inputEnabled,this.onInputEnabledChanged.add((()=>{this.setButtonEnabled(this._inputEnabled),this.useHandCursor=this._inputEnabled}));const K=this.renderComponent.getRootContainer();if(K){J.p.patchPhaserInteraction(K,!0);for(const q of K.children)J.p.patchPhaserInteraction(q,!0)}this.onClick.add((()=>{this.suppressSound||(this._inputEnabled?Z.q.instance.prodigy.audio.playSFX(18,"pop"):Z.q.instance.prodigy.audio.playSFX(67,"button-disabled"))}),this,10)}destroy(){super.destroy()}updateIcon(q){if(this.icon===et.XN.Custom)return this._iconComponent.updateAsset(this.customIconGuid),void this._iconTransform.setSizeDelta(this.customIconSize.x,this.customIconSize.y);const K=this.icon.toString();K&&this.icon!==et.XN.Unspecified&&(this._iconComponent.updateAsset(q.atlasGuid,K),this._iconTransform.setSizeDelta(q.iconSize,q.iconSize))}getIconSize(q){return this.icon===et.XN.Custom?this.customIconSize:this.iconPosition===nt.NONE?new Q.I9Y(0,0):new Q.I9Y(q.iconSize,q.iconSize)}updateButton(){const q=et.jN[this.type];Q.W$e.instance.game.cache.getTexture(q.defaultGuid)?this.setBackgroundImages(q):this._assetLoader.loadAssets([q.defaultGuid,q.activeGuid,q.hoverGuid,q.disabledGuid]).then((()=>{this.setBackgroundImages(q)})).catch((q=>{Q.VyI.log(`[StandardButton] Failed to load button textures for ${this.type} - ${this.size}`,Q.$bb.Error)}))}setBackgroundImages(q){var K;this._tweenedTransition&&(this._tweenedTransition.transitions[Q.ZIW.Default].imageID=q.defaultGuid,this._tweenedTransition.transitions[Q.ZIW.Over].imageID=q.hoverGuid,this._tweenedTransition.transitions[Q.ZIW.Down].imageID=q.activeGuid,this._tweenedTransition.transitions[Q.ZIW.Disabled].imageID=q.disabledGuid);const z=this.inputEnabled?q.defaultGuid:q.disabledGuid;null===(K=this._backgroundComponent)||void 0===K||K.updateAsset(z)}get buttonSizeSpecs(){return et.Se[this.size]}get buttonTypeSpecs(){return et.jN[this.type]}regenerateButton(){if(!this._textComponent||!this._iconComponent)return;this._textComponent.text=this.text;const q=this.buttonSizeSpecs,K=this.buttonTypeSpecs;this.updateComponentsFromSpecs(q,K),this.iconPosition===nt.ICON_ONLY?this.regenerateIconOnlyButton(q):this.regenerateButtonText(q),this.updateButton(),this.fitToContents&&(this._rectTransform.fullWidth=this._buttonWidth),this._rectTransform.fullHeight=q.height}populateTextComponents(){this._textComponent=this.gameObject.findComponentInChildren(Q.EYj),this._textTransform=this._textComponent.GameObject.transform}populateIconComponents(){this._iconComponent=this.gameObject.findChildByName("Icon").findComponentInChildren(Q.vYh),this._iconTransform=this._iconComponent.GameObject.transform}updateComponentsFromSpecs(q,K){this._textComponent.TextObject.style.fontFamily=q.fontFamily,this._textComponent.TextObject.style.fontSize=q.fontSize,this._textComponent.fontSize=q.fontSize,this._textComponent.TextObject.style.fill=K.textColor,this.icon!==et.XN.Custom||!0===this.customIconTinting?this._iconComponent.tint=K.textColor:this._iconComponent.tint=16777215}regenerateIconOnlyButton(q){this._buttonWidth=q.iconOnlyWidth,this._textComponent.GameObject.active=!1,this._iconComponent.GameObject.active=!0,this._iconTransform.posX=0,this._iconTransform.setSizeDelta(q.iconOnlySize,q.iconOnlySize),this.updateIcon(q)}regenerateButtonText(q){this._textComponent.GameObject.active=!0;const K=X.TextMetrics.measureText(this.text,this._textComponent.TextObject.style),z=Math.ceil(K.width),Y=this.getIconSize(q),Z=this.iconPosition!==nt.NONE,J=(Z?Y.x+q.padding:0)+2*q.margin,tt=z+J;if(this.useMaxWidth&&this.maxWidth>0&&tt>this.maxWidth){const K=this.maxWidth-J,Y=K/z;this._textTransform.widthDelta=K,this._textComponent.fontSize=q.fontSize*Y,this._buttonWidth=this.maxWidth}else this._textTransform.widthDelta=z,this._buttonWidth=z+2*q.margin,Z&&(this._buttonWidth+=Y.x+q.padding);if(this.iconPosition===nt.NONE)this._textTransform.posX=0,this._iconComponent.GameObject.active=!1;else{this._iconComponent.GameObject.active=!0,this.updateIcon(q);const K=this._iconTransform.fullWidth;this.iconPosition===nt.LEFT?(this._textTransform.posX=.5*(K+q.padding),this._iconTransform.posX=.5*-this._buttonWidth+(K/2+q.margin)):this.iconPosition===nt.RIGHT&&(this._textTransform.posX=.5*-(K+q.padding),this._iconTransform.posX=.5*this._buttonWidth-(K/2+q.margin))}this.useMaxWidth?this._buttonWidth=Q.cj9.clamp(this._buttonWidth,q.minWidth,this.maxWidth):this._buttonWidth=Math.max(q.minWidth,this._buttonWidth),this._textTransform.top=0,this._textTransform.bottom=0,this._textTransform.posY=-Math.abs(q.yOffset)}localizeButtonText(){var q;if(this.text)try{const q=this.getInjectedValue(Q.$Bt.LocalizationService);if(!q)throw new Error("No localization service available");const K=q.getText(this.text);K&&K!==this.text&&(this.text=K)}catch(K){Q.RQr.logError(K,`StandardButton Component on GameObject '${null===(q=this.GameObject)||void 0===q?void 0:q.name}' failed to localize text '${this.text}'`)}}setButtonText(q,K=!0){this.text=q,K&&this.localizeButtonText(),this.regenerateButton()}};(0,Y.Cg)([(0,Q.Cdj)(Q.t5G.AssetLoader),(0,Y.Sn)("design:type",Object)],at.prototype,"_assetLoader",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],at.prototype,"text",void 0),(0,Y.Cg)([(0,Q.gfw)(et.vX),(0,Y.Sn)("design:type",String)],at.prototype,"type",void 0),(0,Y.Cg)([(0,Q.gfw)(et.YT),(0,Y.Sn)("design:type",String)],at.prototype,"size",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"useMaxWidth",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],at.prototype,"maxWidth",void 0),(0,Y.Cg)([(0,Q.gfw)(nt),(0,Y.Sn)("design:type",Number)],at.prototype,"iconPosition",void 0),(0,Y.Cg)([(0,Q.gfw)(et.XN),(0,Y.Sn)("design:type",String)],at.prototype,"icon",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],at.prototype,"customIconGuid",void 0),(0,Y.Cg)([(0,Q._Hz)(),(0,Y.Sn)("design:type",Q.I9Y)],at.prototype,"customIconSize",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"customIconTinting",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"suppressSound",void 0),(0,Y.Cg)([(0,Q.Pqz)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],at.prototype,"_rectTransform",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],at.prototype,"fitToContents",void 0),at=(0,Y.Cg)([(0,Q.EVk)("StandardButton",tt.Y.ui),(0,Q.WR4)(it.T),(0,Y.Sn)("design:paramtypes",[])],at)},15284:(q,K,z)=>{"use strict";z.d(K,{T:()=>Z});var Y=z(62459),Q=z(31125),X=z(19633);class Z extends Y.$KW{constructor(){super(...arguments),this.validButtonText=["Not now","Leave","Later","Remove","Okay","Go","Start","Next","See","Done","Choose","Collect now"],this.bannedWords=["Cancel","Delete","Confirm","View","Finished","Select"],this.validators=[{validate:q=>{if(0===q.text.length&&q.iconPosition!==X.d.ICON_ONLY)return"Text must not be empty. Convert to icon only?"},fix:q=>{q.iconPosition=X.d.ICON_ONLY}},{validate:q=>{if(q.text.charAt(0)!==q.text.charAt(0).toUpperCase())return"Text should start with a capital letter. Convert to capital?"},fix:q=>{q.text=q.text.charAt(0).toUpperCase()+q.text.slice(1)}},{validate:q=>{if(!q.text.length||q.text===q.text.toUpperCase())return"Text should not be all caps. Convert to title case?"},fix:q=>{q.text=q.text.toLowerCase().replace(/\b\w/g,(q=>q.toUpperCase()))}},{validate:q=>{if(!this.validButtonText.includes(q.text))return"Text is not one of our standard texts. Click fix to see the confluence page for more info"},fix:q=>{window.open("https://prodigygame.atlassian.net/wiki/spaces/GD/pages/548634641/Buttons#Buttons-ButtonLanguage","_blank")}},{validate:q=>{if(this.bannedWords.includes(q.text))return`${q.text} is explicitly banned. Click fix to see the confluence page for more info`},fix:q=>{window.open("https://prodigygame.atlassian.net/wiki/spaces/GD/pages/548634641/Buttons#Buttons-ButtonLanguage","_blank")}}]}generate(q,K){const z=[this.getStandardButtonSettings(q,K)],Q=this.getWarnings(q,K);Q&&z.push(Q);const X=this.getInputSettings(q,K),Z=this.getInputButtonNodes(q,K);return X.elements.push(...Z),z.push(X,this.getSignalTerminals(q,K)),Y.XRp.createVertical(z)}getWarnings(q,K){const z=[];for(let Q=0;Q{K.fix(q),this._editorAPI.modifyComponent(this._componentGuid,q)},buttonText:"Fix"})),Z.push(Y._Lw.line()),z.push(Y.XRp.createVertical(Z))}if(0!==z.length)return Y.XRp.createVertical(z,{title:"Warnings"})}getStandardButtonSettings(q,K){const z=[Y.Gme.textGroup({id:"text",labelValue:"Text",inputValue:q.text}),Y.Gme.enumGroup({id:"type",labelValue:"Type",selectValue:q.type},Q.vX),Y.Gme.enumGroup({id:"size",labelValue:"Size",selectValue:q.size},Q.YT),Y.Gme.enumGroup({id:"iconPosition",labelValue:"Icon Position",selectValue:q.iconPosition},X.d)];if(q.iconPosition!==X.d.NONE&&(z.push(Y.Gme.enumGroup({id:"icon",labelValue:"Icon",selectValue:q.icon},Q.XN)),q.icon===Q.XN.Custom)){const K=[Y.Gme.imagePickerGroup({id:"customIconGuid",labelValue:"Icon Image",guid:q.customIconGuid}),Y.Gme.vectorGroup({id:"customIconSize",labelValue:"Custom Icon Size",vectorValue:q.customIconSize}),Y.Gme.checkboxGroup({id:"customIconTinting",labelValue:"Match Custom Icon To Text Color",inputValue:q.customIconTinting})],Q=Y.XRp.createVertical(K,{isCollapsible:!0,startCollapsed:!1,title:"Custom Icon Settings"});z.push(Q)}return z.push(Y.Gme.checkboxGroup({id:"fitToContents",labelValue:"Fit to Contents",inputValue:q.fitToContents})),z.push(Y.Gme.checkboxGroup({id:"useMaxWidth",labelValue:"Use Max Width",inputValue:q.useMaxWidth})),q.useMaxWidth&&z.push(Y.Gme.numberGroup({id:"maxWidth",labelValue:"Max Width",inputValue:q.maxWidth})),z.push(Y.Gme.checkboxGroup({id:"suppressSound",labelValue:"Suppress SFX",inputValue:q.suppressSound})),Y.XRp.createVertical(z,{isCollapsible:!0,startCollapsed:!1,title:"Button Style"})}getInputButtonNodes(q,K){return[Y.Gme.checkboxGroup({id:"allowDisabledInput",labelValue:"Allow Disabled Input",inputValue:q.allowDisabledInput}),Y.Gme.checkboxGroup({id:"alwaysTransition",labelValue:"Always Transition",inputValue:q.alwaysTransition}),Y.Gme.numberGroup({id:"debounceTimeMs",labelValue:"Debounce Time (ms)",inputValue:q.debounceTimeMs})]}getInputSettings(q,K){return Y.XRp.createVertical([Y.Gme.checkboxGroup({id:"inputEnabled",labelValue:"Input Enabled",inputValue:q.inputEnabled}),Y.Gme.checkboxGroup({id:"attachToCamera",labelValue:"Attach To Camera",inputValue:q.attachToCamera,onChange:(q,K)=>{this._editorAPI.modifyComponent(this._componentGuid,{attachToCamera:K})}}),Y.Gme.checkboxGroup({id:"awaitListeners",labelValue:"Await Listeners",inputValue:q.disableWhileAwaitingListeners,onChange:(q,K)=>{this._editorAPI.modifyComponent(this._componentGuid,{disableWhileAwaitingListeners:K})}})],{isCollapsible:!0,startCollapsed:!1,title:"Settings"})}getSignalTerminals(q,K){return Y.XRp.createVertical([Y.NyS.create({id:"onClick",label:"On Input Click",signalValue:q.onClick,componentGUID:this._componentGuid}),Y.NyS.create({id:"onDown",label:"On Input Down",signalValue:q.onDown,componentGUID:this._componentGuid}),Y.NyS.create({id:"onRelease",label:"On Input Release",signalValue:q.onRelease,componentGUID:this._componentGuid}),Y.NyS.create({id:"onReleaseOutside",label:"On Input Release Outside",signalValue:q.onReleaseOutside,componentGUID:this._componentGuid}),Y.NyS.create({id:"onHoverEnter",label:"On Input Hover Enter",signalValue:q.onHoverEnter,componentGUID:this._componentGuid}),Y.NyS.create({id:"onHoverExit",label:"On Input Hover Exit",signalValue:q.onHoverExit,componentGUID:this._componentGuid}),Y.NyS.create({id:"onHoverMove",label:"On Input Hover Move",signalValue:q.onHoverMove,componentGUID:this._componentGuid}),Y.NyS.create({id:"onHold",label:"On Input Hold",signalValue:q.onHold,componentGUID:this._componentGuid}),Y.NyS.create({id:"onInputEnabledChanged",label:"On Input Enabled Changed",signalValue:q.onInputEnabledChanged,componentGUID:this._componentGuid})],{isCollapsible:!0,startCollapsed:!0,title:"Event Signals"})}}},94325:(q,K,z)=>{"use strict";z.d(K,{C:()=>ot});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(15821),tt=z(35120),et=z(5269),it=z(11647),st=z(37394),nt=z(19633),at=z(44564),rt=z(88217);let ot=class extends((0,it.o)(st.D)){constructor(){super(...arguments),this.showButtonArrows=!0,this.hideSliderWhenContentFits=!1,this.autoUpdateOnContentResize=!0,this.lockScrollWheel=!1}create(){super.create(),this._sliderTransform=this.slider.GameObject.findComponent(Q.XVE),this.onContentSizeChanged=this.onContentSizeChanged.bind(this),this.updateSliderTransform=this.updateSliderTransform.bind(this),this.upButton.onClick.add(this.slider.stepUp.bind(this.slider),this),this.downButton.onClick.add(this.slider.stepDown.bind(this.slider),this),this.scrollWheelBounds||(this.scrollWheelBounds=this.rectTransform),this.addListenerToSignal(this.contentTransform.onWorldMatrixChanged,(()=>this.offsetStickyItems()))}postCreate(){super.postCreate(),this.contentTransform||Q.VyI.log("No content transform found for Scroll View, consider adding a RectTransform to the content transform field in the inspector.",Q.$bb.Warning),this.updateContent(this.contentTransform),this.updateSliderTransform(),this.rectTransform.onDimensionsChanged.add(this.updateSliderTransform,this)}destroy(){var q,K;super.destroy(),null===(q=this.contentTransform)||void 0===q||q.onDimensionsChanged.remove(this.onContentSizeChanged),null===(K=this.rectTransform)||void 0===K||K.onDimensionsChanged.remove(this.updateSliderTransform,this),this.upButton.onClick.removeAll(this),this.downButton.onClick.removeAll(this)}update(){if(super.update(),this.contentDraggingEnabled)if(this._contentClicked&&!this._contentDragged){if(at.H.dragTarget)return void this.onDragEnd();this.checkDragStart()}else this._contentDragged&&this.dragContent()}onMouseWheel(q){this.lockScrollWheel||this.contentFitsScrollView()&&this.hideSliderWhenContentFits||(super.onMouseWheel(q),this.slider.value-=Z().clamp(q.deltaY,-this._maximumMouseWheelSpeed,this._maximumMouseWheelSpeed))}beginDragDetection(q){at.H.dragTarget||super.beginDragDetection(q)}checkDragStart(){switch(this.slider.direction){case et.H.Horizontal:this.checkDragStartHorizontal();break;default:case et.H.Vertical:this.checkDragStartVertical()}}dragContent(){switch(this.slider.direction){case et.H.Horizontal:this.dragContentHorizontal();break;default:case et.H.Vertical:this.dragContentVertical()}}dragContentHorizontal(){const q=tt.q.instance.game.input.activePointer.x-this._lastDragMousePosition.x;this.slider.value+=q,super.dragContentHorizontal()}dragContentVertical(){const q=tt.q.instance.game.input.activePointer.y-this._lastDragMousePosition.y;this.slider.value+=q,super.dragContentVertical()}hideSlider(){this.GameObject&&!this.GameObject.isDestroyed&&(this.upButton.GameObject.active=!1,this.downButton.GameObject.active=!1,this.slider.GameObject.active=!1,this.allowScrollWheel=!1,this.contentDraggingEnabled=!1)}showSlider(){this.GameObject&&!this.GameObject.isDestroyed&&(this.slider.GameObject.active=!0,this.upButton.GameObject.active=this.showButtonArrows,this.downButton.GameObject.active=this.showButtonArrows,this.allowScrollWheel=!0,this.contentDraggingEnabled=!0)}updateSliderTransform(){switch(this.slider.direction){case et.H.Horizontal:this.fitSliderHorizontal();break;default:case et.H.Vertical:this.fitSliderVertical()}}fitSliderVertical(){this.showButtonArrows?this._sliderTransform.fullWidth=this.rectTransform.fullHeight-this.upButton.GameObject.transform.fullHeight-this.downButton.GameObject.transform.fullHeight:this._sliderTransform.fullWidth=this.rectTransform.fullHeight}fitSliderHorizontal(){this.showButtonArrows?this._sliderTransform.fullWidth=this.rectTransform.fullWidth-this.upButton.GameObject.transform.fullHeight-this.downButton.GameObject.transform.fullHeight:this._sliderTransform.fullWidth=this.rectTransform.fullWidth}updateContent(q,K=!1){if(this.contentTransform&&(this.contentTransform.onDimensionsChanged.remove(this.onContentSizeChanged),K?this.contentTransform.GameObject.destroy():this.contentTransform.GameObject.parent=null),this.contentTransform=q,this.updateSliderRange(),!this.contentTransform)return;this.contentArea.GameObject.addChild(this.contentTransform.GameObject);const z=this.contentTransform.GameObject.parent,Y=z?z.findComponent(Q.XVE):null,X=Y?Y.rectTransformDimensions:Q.or0.ZERO,Z=new Q.I9Y(this.contentTransform.anchorMin.x*X.width,this.contentTransform.anchorMin.y*X.height),J=new Q.I9Y(this.contentTransform.anchorMax.x*X.width,this.contentTransform.anchorMax.y*X.height),tt=new Q.or0(J.x-Z.x,J.y-Z.y);switch(this.slider.direction){case et.H.Horizontal:this.contentTransform.setPivot(0,.5),this.contentTransform.setAnchoredPivotOffset(0,.5*(this.contentArea.fullHeight-tt.height));break;default:case et.H.Vertical:this.contentTransform.setPivot(.5,0),this.contentTransform.setAnchoredPivotOffset(.5*(this.contentArea.fullWidth-tt.width),0)}this.contentTransform.onDimensionsChanged.add(this.onContentSizeChanged)}onContentSizeChanged(){if(this.autoUpdateOnContentResize){const q=this.slider.value;this.updateSliderRange(),this.setScrollPosition(Math.max(this.slider.maxValue,q))}}updateSliderRange(){if(J.A.isDefined(this.rectTransform)){if(J.A.isDefined(this.contentTransform))switch(this.slider.direction){case et.H.Horizontal:this.slider.maxValue=Math.min(.01,this.rectTransform.fullWidth-this.contentTransform.fullWidth);break;default:case et.H.Vertical:this.slider.maxValue=Math.min(.01,this.rectTransform.fullHeight-this.contentTransform.fullHeight)}else this.slider.maxValue=.01;!this.hideSliderWhenContentFits||J.A.isDefined(this.contentTransform)&&!this.contentFitsScrollView()?this.showSlider():this.hideSlider()}}contentFitsScrollView(){switch(this.slider.direction){case et.H.Vertical:return this.contentTransform.fullHeight<=this.rectTransform.fullHeight;case et.H.Horizontal:return this.contentTransform.fullWidth<=this.rectTransform.fullWidth;default:return!1}}scrollToPercent(q=0){this.slider.normalizedValue=Q.cj9.clamp(q,0,1)}setScrollPosition(q){this.slider.value=q}scrollToChild(q,K=0){const z=this.contentTransform.GameObject.children.length;if(q<0||q>=z)return;const Y=this.contentTransform.GameObject.children[q];if(Y)switch(this.slider.direction){case et.H.Horizontal:const q=Y.transform.localPosition.x;this.setScrollPosition(-q+K);break;case et.H.Vertical:default:const z=Y.transform.localPosition.y;this.setScrollPosition(-z+K)}}offsetStickyItems(){const q=this.contentArea.localPosition.y,K=[];for(const z of this.contentTransform.GameObject.children){const q=z.findComponent(rt.B);J.A.isDefined(q)&&K.push(q)}for(const[z,Y]of K.entries()){if(!J.A.isDefined(Y))continue;if(q+Y.transform.posY<=0){const Q=-q-Y.transform.posY;let X=0;const Z=K[z+1];if(J.A.isDefined(Z)){const K=q+Z.transform.posY-Y.transform.fullHeight;X=Math.min(0,K)}Y.setContentsOffset(Q+X)}else Y.setContentsOffset(0)}}};(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],ot.prototype,"contentTransform",void 0),(0,Y.Cg)([(0,Q.MnK)(at.H),(0,Y.Sn)("design:type",at.H)],ot.prototype,"slider",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ot.prototype,"showButtonArrows",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ot.prototype,"hideSliderWhenContentFits",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ot.prototype,"autoUpdateOnContentResize",void 0),(0,Y.Cg)([(0,Q.MnK)(nt.S),(0,Y.Sn)("design:type",nt.S)],ot.prototype,"upButton",void 0),(0,Y.Cg)([(0,Q.MnK)(nt.S),(0,Y.Sn)("design:type",nt.S)],ot.prototype,"downButton",void 0),ot=(0,Y.Cg)([(0,Q.EVk)("StandardScrollView",Q.YH6.ui)],ot)},44564:(q,K,z)=>{"use strict";z.d(K,{H:()=>st,c:()=>Q});var Y,Q,X=z(8674),Z=z(62459),J=z(5269),tt=z(35120),et=z(93690),it=z(57103);!function(q){q.DEFAULT="default"}(Q||(Q={}));let st=Y=class extends Z.uAl{constructor(){super(...arguments),this.attachToCamera=!0,this.onValueChanged=new Z.HN0,this.onSteppedValueChanged=new Z.HN0,this.onNormalizedValueChanged=new Z.HN0,this.onFinalValue=new Z.HN0,this.stepValue=10,this.snapDrag=!1,this.snapRelease=!0,this.minValue=0,this.maxValue=100,this._value=0,this.direction=J.H.Horizontal,this.type=Q.DEFAULT,this.lastMousePosition={x:0,y:0},this.smoothing=.8,this.movementMultiplier=1,this.handlePadding=2}get value(){return this._value}set value(q){if(q===this._value)return void this.updateHandle();const K=this._value;this._value=Z.cj9.clampArbitrary(q,this.minValue,this.maxValue),this.updateHandle(),this.onValueChanged.dispatch(this._value),this.onNormalizedValueChanged.dispatch(this.normalizedValue);const z=this.valueToSnapped(this._value);z!==this.valueToSnapped(K)&&this.onSteppedValueChanged.dispatch(z)}get normalizedValue(){return Z.cj9.inverseLerp(this.minValue,this.maxValue,this.value)}set normalizedValue(q){this.value=Z.cj9.clampedLerp(this.minValue,this.maxValue,q)}postCreate(){super.postCreate(),this.handleTransform=this.handle.GameObject.findComponent(Z.XVE),this.trackTransform=this.track.GameObject.findComponent(Z.XVE),this.onHandleUp=this.onHandleUp.bind(this),this.onHandleDown=this.onHandleDown.bind(this),this.onTrackDown=this.onTrackDown.bind(this),this.handle.onRelease.add(this.onHandleUp,this),this.handle.onReleaseOutside.add(this.onHandleUp,this),this.handle.onDown.add(this.onHandleDown,this),this.track.onDown.add(this.onTrackDown,this),this.track.onRelease.add(this.onHandleUp,this),this.track.onReleaseOutside.add(this.onHandleUp,this);const q=this.handle.renderComponent.getRootContainer();q&&et.p.patchPhaserInteraction(q,!0);const K=this.track.renderComponent.getRootContainer();K&&et.p.patchPhaserInteraction(K,!0),this.handle.attachToCamera=this.attachToCamera,this.track.attachToCamera=this.attachToCamera,this.gameObject.transform.localRotation=this.direction===J.H.Horizontal?0:90,this.updateHandle()}destroy(){var q,K,z;super.destroy(),null===(q=this.onValueChanged)||void 0===q||q.dispose(),null===(K=this.onNormalizedValueChanged)||void 0===K||K.dispose(),null===(z=this.onFinalValue)||void 0===z||z.dispose(),tt.q.instance.game.input.deleteMoveCallback(this.onMouseDrag,this),this.handle.onRelease.removeAll(this),this.handle.onReleaseOutside.removeAll(this),this.handle.onDown.removeAll(this),this.track.onDown.removeAll(this),this.track.onRelease.removeAll(this),this.track.onReleaseOutside.removeAll(this),this.onValueChanged.dispose(),this.onFinalValue.dispose(),this.onNormalizedValueChanged.dispose(),this.onSteppedValueChanged.dispose()}onTrackDown(){const q=this.getSlideableBounds();let K={x:tt.q.instance.game.input.activePointer.x,y:tt.q.instance.game.input.activePointer.y};this.attachToCamera||(K=Z.i7d.main.viewMatrix.applyInverse(K)),K.x-=this.gameObject.transform.worldPosition.x,K.y-=this.gameObject.transform.worldPosition.y,this.direction===J.H.Vertical?this.value=this.positionToValue(K.y,q):this.value=this.positionToValue(K.x,q),this.onHandleDown()}onHandleDown(){this._dragging=!0,Y.dragTarget=this,this.lastMousePosition.x=tt.q.instance.game.input.activePointer.x,this.lastMousePosition.y=tt.q.instance.game.input.activePointer.y,this._handleDragTarget=this.handleTransform.posX,tt.q.instance.game.input.addMoveCallback(this.onMouseDrag,this)}onHandleUp(){this._dragging=!1,Y.dragTarget=void 0,tt.q.instance.game.input.deleteMoveCallback(this.onMouseDrag,this),this.snapRelease&&(this.value=this.valueToSnapped(this.value)),this.onFinalValue.dispatch(this.value)}updateHandle(){this.handleTransform&&(this.handleTransform.posX=this.getHandlePosition())}onMouseDrag(){if(this._dragging){const q=this.getSlideableBounds(),K={x:tt.q.instance.game.input.activePointer.x-this.lastMousePosition.x,y:tt.q.instance.game.input.activePointer.y-this.lastMousePosition.y};this.lastMousePosition.x=tt.q.instance.game.input.activePointer.x,this.lastMousePosition.y=tt.q.instance.game.input.activePointer.y,this.direction===J.H.Horizontal?this._handleDragTarget+=K.x*this.movementMultiplier:this._handleDragTarget+=K.y*this.movementMultiplier,this.snapDrag?this.handleTransform.posX=this.snapPosition(this._handleDragTarget,q):this.handleTransform.posX=this._handleDragTarget,this.normalizedValue=Z.cj9.inverseLerp(q.left,q.right,this.handleTransform.posX)}}snapPosition(q,K){let z=this.positionToValue(q,K);return z=this.valueToSnapped(z),this.valueToPosition(z,K)}positionToValue(q,K){return Z.cj9.clampedLerp(this.minValue,this.maxValue,Z.cj9.inverseLerp(K.left,K.right,q))}valueToPosition(q,K){return Z.cj9.clampedLerp(K.left,K.right,Z.cj9.inverseLerp(this.minValue,this.maxValue,q))}valueToSnapped(q){return Math.round(q/this.stepValue)*this.stepValue}getHandlePosition(){const q=this.getSlideableBounds();return Z.cj9.clampedLerp(q.left,q.right,this.normalizedValue)}getSlideableBounds(){const q=this.trackTransform.getBounds();return q.left+=this.handleTransform.fullWidth/2+this.handlePadding,q.right-=this.handleTransform.fullWidth/2+this.handlePadding,q}stepUp(){this.value+=this.stepValue}stepDown(){this.value-=this.stepValue}};st.dragTarget=void 0,(0,X.Cg)([(0,Z.vkK)(),(0,X.Sn)("design:type",Boolean)],st.prototype,"attachToCamera",void 0),(0,X.Cg)([(0,Z.bbQ)(),(0,X.Sn)("design:type",Z.HN0)],st.prototype,"onValueChanged",void 0),(0,X.Cg)([(0,Z.bbQ)(),(0,X.Sn)("design:type",Z.HN0)],st.prototype,"onSteppedValueChanged",void 0),(0,X.Cg)([(0,Z.bbQ)(),(0,X.Sn)("design:type",Z.HN0)],st.prototype,"onNormalizedValueChanged",void 0),(0,X.Cg)([(0,Z.bbQ)(),(0,X.Sn)("design:type",Z.HN0)],st.prototype,"onFinalValue",void 0),(0,X.Cg)([(0,Z.g11)(),(0,X.Sn)("design:type",Number)],st.prototype,"stepValue",void 0),(0,X.Cg)([(0,Z.vkK)(),(0,X.Sn)("design:type",Boolean)],st.prototype,"snapDrag",void 0),(0,X.Cg)([(0,Z.vkK)(),(0,X.Sn)("design:type",Boolean)],st.prototype,"snapRelease",void 0),(0,X.Cg)([(0,Z.g11)(),(0,X.Sn)("design:type",Number)],st.prototype,"minValue",void 0),(0,X.Cg)([(0,Z.g11)(),(0,X.Sn)("design:type",Number)],st.prototype,"maxValue",void 0),(0,X.Cg)([(0,Z.g11)(),(0,X.Sn)("design:type",Number)],st.prototype,"_value",void 0),(0,X.Cg)([(0,Z.gfw)(J.H),(0,X.Sn)("design:type",Number)],st.prototype,"direction",void 0),(0,X.Cg)([(0,Z.MnK)(Z.Eci),(0,X.Sn)("design:type",Z.Eci)],st.prototype,"handle",void 0),(0,X.Cg)([(0,Z.MnK)(Z.Eci),(0,X.Sn)("design:type",Z.Eci)],st.prototype,"track",void 0),(0,X.Cg)([(0,Z.MnK)(Z.XVE),(0,X.Sn)("design:type",Z.XVE)],st.prototype,"fill",void 0),(0,X.Cg)([(0,Z.gfw)(Q),(0,X.Sn)("design:type",String)],st.prototype,"type",void 0),(0,X.Cg)([(0,Z.g11)(),(0,X.Sn)("design:type",Number)],st.prototype,"smoothing",void 0),(0,X.Cg)([(0,Z.g11)(),(0,X.Sn)("design:type",Number)],st.prototype,"movementMultiplier",void 0),(0,X.Cg)([(0,Z.g11)(),(0,X.Sn)("design:type",Number)],st.prototype,"handlePadding",void 0),st=Y=(0,X.Cg)([(0,Z.EVk)("StandardSlider"),(0,Z.WR4)(it.s)],st)},57103:(q,K,z)=>{"use strict";z.d(K,{s:()=>Z});var Y=z(62459),Q=z(5269),X=z(44564);class Z extends Y.$KW{generate(q,K){const z=[this.getStandardSliderSettings(q,K)],Q=this.getInputSettings(q,K),X=this.getInputSliderNodes(q,K);return Q.elements.push(...X),z.push(Q,this.getSignalTerminals(q,K)),Y.XRp.createVertical(z)}getStandardSliderSettings(q,K){const z=[Y.Gme.numberGroup({id:"minValue",labelValue:"Min Value",inputValue:q.minValue}),Y.Gme.numberGroup({id:"maxValue",labelValue:"Max Value",inputValue:q.maxValue}),Y.Gme.numberGroup({id:"value",labelValue:"Init Value",inputValue:q.value}),Y.Gme.numberGroup({id:"stepValue",labelValue:"Step Value",inputValue:q.stepValue}),Y.Gme.checkboxGroup({id:"snapDrag",labelValue:"Snap on Drag",inputValue:q.snapDrag}),Y.Gme.checkboxGroup({id:"snapRelease",labelValue:"Snap on Release",inputValue:q.snapRelease}),Y.Gme.numberGroup({id:"handlePadding",labelValue:"Padding",inputValue:q.handlePadding}),Y.Gme.enumGroup({id:"direction",labelValue:"Direction",selectValue:q.direction,onChange:q=>{var K,z;const X=null===(z=null===(K=this._editorAPI.getComponent(this._componentGuid))||void 0===K?void 0:K.GameObject)||void 0===z?void 0:z.findComponent(Y.dLy);X?q===Q.H.Horizontal?X.localRotation=0:X.localRotation=90:console.error("Transform not found on Slider component.")}},Q.H),Y.Gme.enumGroup({id:"type",labelValue:"Type",selectValue:q.type},X.c),Y.Gme.componentPickerGroup({id:"handle",labelValue:"Handle",componentType:Y.Eci,componentGuid:q.handle}),Y.Gme.componentPickerGroup({id:"track",labelValue:"Track",componentType:Y.Eci,componentGuid:q.track}),Y.NyS.create({id:"onValueChanged",label:"On Value Changed",signalValue:q.onValueChanged,componentGUID:this._componentGuid}),Y.NyS.create({id:"onSteppedValueChanged",label:"On Stepped Value Changed",signalValue:q.onSteppedValueChanged,componentGUID:this._componentGuid}),Y.NyS.create({id:"onNormalizedValueChanged",label:"On Normalized Value Changed",signalValue:q.onNormalizedValueChanged,componentGUID:this._componentGuid}),Y.NyS.create({id:"onFinalValue",label:"On Value Finalized",signalValue:q.onFinalValue,componentGUID:this._componentGuid})];return Y.XRp.createVertical(z,{isCollapsible:!0,startCollapsed:!1,title:"Slider Style"})}getInputSliderNodes(q,K){return[Y.Gme.checkboxGroup({id:"_useHandCursor",labelValue:"Use Hand Cursor",inputValue:q._useHandCursor}),Y.Gme.checkboxGroup({id:"allowDisabledInput",labelValue:"Allow Disabled Input",inputValue:q.allowDisabledInput}),Y.Gme.checkboxGroup({id:"alwaysTransition",labelValue:"Always Transition",inputValue:q.alwaysTransition})]}getInputSettings(q,K){const z=Y.XRp.createVertical([Y.Gme.checkboxGroup({id:"_inputEnabled",labelValue:"Input Enabled",inputValue:q._inputEnabled}),Y.Gme.checkboxGroup({id:"attachToCamera",labelValue:"Attach to Camera",inputValue:q.attachToCamera}),Y.Gme.checkboxGroup({id:"allowContinuousHold",labelValue:"Allow Continuous Hold",inputValue:q.allowContinuousHold})],{isCollapsible:!0,startCollapsed:!1,title:"Settings"});return q.allowContinuousHold&&z.elements.push(Y.Gme.numberGroup({id:"_holdDelay",labelValue:"Hold Delay",inputValue:q._holdDelay})),z}getSignalTerminals(q,K){return Y.XRp.createVertical([Y.NyS.create({id:"onClick",label:"On Input Click",signalValue:q.onClick,componentGUID:this._componentGuid}),Y.NyS.create({id:"onDown",label:"On Input Down",signalValue:q.onDown,componentGUID:this._componentGuid}),Y.NyS.create({id:"onRelease",label:"On Input Release",signalValue:q.onRelease,componentGUID:this._componentGuid}),Y.NyS.create({id:"onReleaseOutside",label:"On Input Release Outside",signalValue:q.onReleaseOutside,componentGUID:this._componentGuid}),Y.NyS.create({id:"onHoverEnter",label:"On Input Hover Enter",signalValue:q.onHoverEnter,componentGUID:this._componentGuid}),Y.NyS.create({id:"onHoverExit",label:"On Input Hover Exit",signalValue:q.onHoverExit,componentGUID:this._componentGuid}),Y.NyS.create({id:"onHoverMove",label:"On Input Hover Move",signalValue:q.onHoverMove,componentGUID:this._componentGuid}),Y.NyS.create({id:"onHold",label:"On Input Hold",signalValue:q.onHold,componentGUID:this._componentGuid}),Y.NyS.create({id:"onInputEnabledChanged",label:"On Input Enabled Changed",signalValue:q.onInputEnabledChanged,componentGUID:this._componentGuid})],{isCollapsible:!0,startCollapsed:!0,title:"Event Signals"})}}},31818:(q,K,z)=>{"use strict";z.d(K,{tX:()=>ot});var Y,Q=z(8674),X=z(62459),Z=z(19631),J=z(35084),tt=z(51972),et=z(19633),it=z(59503);!function(q){q.None="none",q.Warning="warning",q.Check="check"}(Y||(Y={}));const st={[Y.None]:"",[Y.Warning]:Z.B.Circle_warning,[Y.Check]:Z.B.Circle_checkmark};var nt;!function(q){q.Default="default",q.Paper="paper"}(nt||(nt={}));const at={[nt.Default]:{background:Z.B.Tooltip_background,arrow:Z.B.Tooltip_arrow,arrowDistance:-4,arrowBoundSlice:!0},[nt.Paper]:{background:Z.B.Paper_small,arrow:Z.B.Paper_small_arrow,arrowDistance:-10,arrowBoundSlice:!0}};var rt;!function(q){q.Body="BODY",q.Title="TITLE",q.Icon="ICON",q.ShowTitle="SHOW_TITLE",q.ShowIcon="SHOW_ICON",q.BodyWrapWidth="BODY_WRAP_WIDTH",q.OnClose="ON_CLOSE",q.UseCloseUnderlay="USE_CLOSE_UNDERLAY"}(rt||(rt={}));let ot=class extends X.uAl{constructor(){super(...arguments),this._style=nt.Default,this._body="BODY",this._title="TITLE",this._icon=Y.None,this.destroyOnClose=!0,this.onClose=new X.HN0,this._useInputOverlay=!0,this._arrowDistance=-5}get body(){return this._body}set body(q){this._body=q,this._textComponent.text=q,this._rectTransform.fullWidth=this.width}get width(){return this._textComponent.getDimensions().width+(this.icon===Y.None?131:195)}get title(){return this._title}set title(q){this._title=q,this._titleComponent.text=q,this._title.length>0?(this._titleComponent.GameObject.active=!0,this._textTransform.top=50):(this._titleComponent.GameObject.active=!1,this._textTransform.top=20)}get icon(){return this._icon}set icon(q){this._icon=q}create(){this._rectTransform=this.gameObject.findComponent(X.XVE),this._textTransform=this._textComponent.GameObject.findComponent(X.XVE),this._titleTransform=this._titleComponent.GameObject.findComponent(X.XVE),this.body=this._body,this.title=this._title,this._fitToTarget=this.gameObject.findComponent(it.f),this.getInjectedValue(rt.Body)?this.applyInjection():this.title=this._title,this.icon===Y.None?(this._iconGraphic.GameObject.active=!1,this._textTransform.left=20,this._titleTransform.left=20):(this._iconGraphic.GameObject.active=!0,this._textTransform.left=100,this._titleTransform.left=100),this._arrowTransform&&(this._fitToTarget?this._fitToTarget.onPostFit.add(this.updateTagPosition.bind(this)):this._arrowTransform.GameObject.active=!1),this.close=this.close.bind(this),this._closeButton.onClick.add(this.close),this._inputOverlay.onClicked.add(this.close),this._inputOverlay.GameObject.active=this._useInputOverlay}postCreate(){this.updateStyle(this._style)}destroy(){this.onClose.dispose()}updateStyle(q){const K=at[q],z=()=>{var q,z;this._backgroundGraphic.updateAsset(K.background),this._arrowGraphic.updateAsset(K.arrow),this._arrowGraphic.sizeToSourceImage(),this._arrowDistance=null!==(q=K.arrowDistance)&&void 0!==q?q:this._arrowDistance,K.arrowBoundSlice&&(this._sliceData=this._backgroundGraphic.sliceData),null===(z=this._fitToTarget)||void 0===z||z.fit(),this.icon!==Y.None&&this._iconGraphic.updateAsset(st[this.icon])};X.W$e.instance.game.cache.getTexture(K.background)?z():this._assetLoader.loadAssets([K.background,K.arrow,st[this.icon]]).then(z).catch((q=>{X.VyI.log(`[StandardTooltip] Failed to load textures for ${this._style}`,X.$bb.Error)}))}close(){this&&this.gameObject&&(this.onClose.dispatch(),this.destroyOnClose?this.gameObject.destroy():this.gameObject.active=!1)}applyInjection(){var q,K;this.body=null!==(q=this.getInjectedValue(rt.Body))&&void 0!==q?q:this._body,this.title=null!==(K=this.getInjectedValue(rt.Title))&&void 0!==K?K:this._title;const z=this.getInjectedValue(rt.ShowTitle);void 0!==z&&(this.title=z?this._title:"");const Q=this.getInjectedValue(rt.ShowIcon);void 0!==Q&&(this.icon=Q?this._icon:Y.None),this._iconGraphic.updateAsset(this.getInjectedValue(rt.Icon)),this._textComponent.wordWrapWidth=this.getInjectedValue(rt.BodyWrapWidth);const X=this.getInjectedValue(rt.OnClose);this._closeButton&&X&&(this._closeButton.onClick.add(X),this._inputOverlay.onClicked.add(X));const Z=this.getInjectedValue(rt.UseCloseUnderlay);void 0!==Z&&(this._inputOverlay.GameObject.active=Z)}updateTagPosition(q,K=.5){var z;if(!(null===(z=this._arrowTransform)||void 0===z?void 0:z.GameObject))return;let Y=K;if(this._sliceData&&this._rectTransform){const K=this._rectTransform.fullWidth,z=this._rectTransform.fullHeight,Q=.5*this._arrowTransform.fullWidth;if(q===it.H.Left||q===it.H.Right){const q=this._sliceData.top+Q,K=this._sliceData.bottom+Q;Y=q+K>=z?.5:Math.max(q/z,Math.min(Y,1-K/z))}else{const q=this._sliceData.left+Q,z=this._sliceData.right+Q;Y=q+z>=K?.5:Math.max(q/K,Math.min(Y,1-z/K))}}switch(this._arrowTransform.GameObject.active=!0,q){case it.H.Top:this._arrowTransform.localRotation=0,this._arrowTransform.anchorMin.set(Y,1),this._arrowTransform.anchorMax.set(Y,1),this._arrowTransform.setPosition(0,this._arrowDistance);break;case it.H.Bottom:this._arrowTransform.localRotation=180,this._arrowTransform.anchorMin.set(Y,0),this._arrowTransform.anchorMax.set(Y,0),this._arrowTransform.setPosition(0,-this._arrowDistance);break;case it.H.Left:this._arrowTransform.localRotation=270,this._arrowTransform.anchorMin.set(1,Y),this._arrowTransform.anchorMax.set(1,Y),this._arrowTransform.setPosition(this._arrowDistance,0);break;case it.H.Right:this._arrowTransform.localRotation=90,this._arrowTransform.anchorMin.set(0,Y),this._arrowTransform.anchorMax.set(0,Y),this._arrowTransform.setPosition(-this._arrowDistance,0);break;default:this._arrowTransform.GameObject.active=!1}}setTarget(q,K){this.gameObject.active=!0,this._fitToTarget?(!K||K.transform instanceof X.XVE?this._fitToTarget.setBounds(null==K?void 0:K.transform,!1):X.VyI.log("Bounds must be a RectTransform",X.$bb.Warning),this._fitToTarget.setTarget(q)):(this._rectTransform.setPosition(q.legacyTransform.group.position.x,q.legacyTransform.group.position.y),this._arrowTransform.GameObject.active=!1)}setFromSchema(q){var K,z;this.gameObject.active=!0,this.title=null!==(K=q.headerText)&&void 0!==K?K:"",this.body=q.bodyText,"number"==typeof q.xPosition&&(this._rectTransform.posX=q.xPosition),"number"==typeof q.yPosition&&(this._rectTransform.posY=q.yPosition);const Y=null!==(z=q.arrowDirection)&&void 0!==z?z:tt.i.UP;let Q;Y===tt.i.DOWN?Q=it.H.Top:Y===tt.i.UP?Q=it.H.Bottom:Y===tt.i.RIGHT?Q=it.H.Left:Y===tt.i.LEFT&&(Q=it.H.Right);let X=.5;"number"==typeof q.arrowXRelPos?X=q.arrowXRelPos:"number"==typeof q.arrowYRelPos&&(X=q.arrowYRelPos),this.updateTagPosition(Q,X)}};(0,Q.Cg)([(0,X.Cdj)(X.t5G.AssetLoader),(0,Q.Sn)("design:type",Object)],ot.prototype,"_assetLoader",void 0),(0,Q.Cg)([(0,X.gfw)(nt),(0,Q.Sn)("design:type",String)],ot.prototype,"_style",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ot.prototype,"_body",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],ot.prototype,"_title",void 0),(0,Q.Cg)([(0,X.gfw)(Y),(0,Q.Sn)("design:type",String)],ot.prototype,"_icon",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],ot.prototype,"_textComponent",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],ot.prototype,"_titleComponent",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],ot.prototype,"_iconGraphic",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],ot.prototype,"_backgroundGraphic",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],ot.prototype,"_arrowGraphic",void 0),(0,Q.Cg)([(0,X.MnK)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],ot.prototype,"_arrowTransform",void 0),(0,Q.Cg)([(0,X.MnK)(et.S),(0,Q.Sn)("design:type",et.S)],ot.prototype,"_closeButton",void 0),(0,Q.Cg)([(0,X.MnK)(J.n),(0,Q.Sn)("design:type",J.n)],ot.prototype,"_inputOverlay",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ot.prototype,"destroyOnClose",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],ot.prototype,"onClose",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],ot.prototype,"_useInputOverlay",void 0),ot=(0,Q.Cg)([(0,X.EVk)("StandardTooltip",X.YH6.ui)],ot)},43333:(q,K,z)=>{"use strict";z.d(K,{U:()=>J});var Y,Q=z(8674),X=z(62459),Z=z(28152);let J=Y=class extends X.uAl{constructor(){super(...arguments),this._offsetAmount=0,this._onTimerUpdated=new X.HN0,this._onTimerCompleted=new X.HN0,this._nextUpdateTimestamp=null,this._lastUpdateTime=null,this._isTimerRunning=!1,this._timerValues=new Map([["w",0],["d",0],["h",0],["m",0],["s",0]])}get weekRemaining(){return this.offset(this._timerValues.get("w"))}get daysRemaining(){return this.offset(this._timerValues.get("d"))}get hoursRemaining(){return this.offset(this._timerValues.get("h"))}get minutesRemaining(){return this.offset(this._timerValues.get("m"))}get secondsRemaining(){return this.offset(this._timerValues.get("s"))}get timeRemainingMS(){return this._timeRemainingMS}get onTimerUpdated(){return this._onTimerUpdated}get onTimerCompleted(){return this._onTimerCompleted}get countdownText(){return this._countdownText}offset(q){return q>0?q+this._offsetAmount:0}get smallestTimeGroup(){return this._groupSecondsRemaining?"s":this._groupMinutesRemaining?"m":this._groupHoursRemaining?"h":this._groupDaysRemaining?"d":this._groupWeeksRemaining?"w":void 0}create(){super.create(),X.Aq$.isDefined(this._countdownFromTimeMS)&&this._countdownFromTimeMS>0&&this.setCountdownTimeMS(this._countdownFromTimeMS)}destroy(){this._onTimerUpdated.dispose(),this._onTimerCompleted.dispose(),super.destroy()}update(){if(super.update(),this._isTimerRunning){const q=Date.now();this._timeRemainingMS=Math.max(this._timeRemainingMS-(q-this._lastUpdateTime),0),this._lastUpdateTime=q,q>this._nextUpdateTimestamp&&(this._timeRemainingMS>0?this.updateTimer():(this._timerValues.forEach(((q,K)=>{this._timerValues[K]=0})),this._isTimerRunning=!1,this._onTimerCompleted.dispatch()))}}setCountdownTimeMS(q){this._countdownFromTimeMS=q,this._timeRemainingMS=q,this._isTimerRunning=q>0,this._isTimerRunning&&(this._lastUpdateTime=Date.now(),this._nextUpdateTimestamp=null,this.updateTimer())}stopTimer(){this._isTimerRunning=!1}setTemplateString(q){this._countdownTemplateString=q,this._countdownText.text=this.getTemplatedTimeString()}updateTimer(){let q=0;q=this._groupSecondsRemaining?1e3:this._groupMinutesRemaining?6e4:this._groupHoursRemaining?36e5:this._groupDaysRemaining?864e5:6048e5;let K=this._timeRemainingMS+(this.allowZeroTime?0:q);this._groupWeeksRemaining&&(K=this.updateTimeValue(K,6048e5,"w")),this._groupDaysRemaining&&(K=this.updateTimeValue(K,864e5,"d")),this._groupHoursRemaining&&(K=this.updateTimeValue(K,36e5,"h")),this._groupMinutesRemaining&&(K=this.updateTimeValue(K,6e4,"m")),this._groupSecondsRemaining&&(K=this.updateTimeValue(K,1e3,"s")),this._nextUpdateTimestamp=Date.now()+Math.min(K,q),this._countdownText.text=this.getTemplatedTimeString(),this._onTimerUpdated.dispatch()}updateTimeValue(q,K,z){const Y=Math.floor(q/K);return this._timerValues.set(z,Y),q-Y*K}getTemplatedTimeString(){return this._countdownTemplateString.replace(RegExp(`{(${Y.TIME_SEGMENTS_REGEX})(?:,([0-9])?)?}`,"g"),((q,K,z="1")=>{var Y;const Q=parseInt(z,10),X=`${null!==(Y=this.offset(this._timerValues.get(K)))&&void 0!==Y?Y:0}`;return`${"0".repeat(Math.max(Q-X.length,0))}${X}`}))}};J.TIME_SEGMENTS_REGEX=`[${["w","d","h","m","s"].join("|")}]`,(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],J.prototype,"_countdownText",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],J.prototype,"_countdownTemplateString",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],J.prototype,"_countdownFromTimeMS",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],J.prototype,"_offsetAmount",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],J.prototype,"_onTimerUpdated",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],J.prototype,"_onTimerCompleted",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],J.prototype,"_groupWeeksRemaining",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],J.prototype,"_groupDaysRemaining",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],J.prototype,"_groupHoursRemaining",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],J.prototype,"_groupMinutesRemaining",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],J.prototype,"_groupSecondsRemaining",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],J.prototype,"allowZeroTime",void 0),J=Y=(0,Q.Cg)([(0,X.EVk)("TimerText",Z.Y.ui)],J)},23365:(q,K,z)=>{"use strict";z.d(K,{s:()=>Z});var Y=z(8674),Q=z(62459),X=z(90351);let Z=class extends Q.uAl{constructor(){super(...arguments),this._autoStart=!1,this._yoyo=!1,this._tweenDelay=0,this._easing=X.i.LinearNone,this.onStart=new Q.HN0,this.onComplete=new Q.HN0}create(){super.create(),this._autoStart&&(this.startTween(),this.IsActiveInHierarchy||this._tween.pause())}startTween(){this.onStart.dispatch()}destroyTween(){this._tween&&(this._tween.stop(),this._tween.remove(),this._tween=null)}destroy(){this.destroyTween(),this.onStart.dispose(),this.onComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_autoStart",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_yoyo",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],Z.prototype,"_tweenDelay",void 0),(0,Y.Cg)([(0,Q.gfw)(X.i),(0,Y.Sn)("design:type",String)],Z.prototype,"_easing",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onStart",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onComplete",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("TweenBase (abstract)")],Z)},95865:(q,K,z)=>{"use strict";z.d(K,{A:()=>Z});var Y=z(8674),Q=z(62459),X=z(23365);let Z=class extends X.s{create(){var q;this._targetGameObject=null!==(q=this._targetGameObject)&&void 0!==q?q:this.GameObject,this._targetGameObject.onActiveInHierarchyChanged.add(this.onActiveStateChanged,this),super.create()}onActiveStateChanged(){var q,K;this.IsActiveInHierarchy?null===(q=this._tween)||void 0===q||q.resume():null===(K=this._tween)||void 0===K||K.pause()}destroy(){var q,K;super.destroy(),null===(K=null===(q=this._targetGameObject)||void 0===q?void 0:q.onActiveInHierarchyChanged)||void 0===K||K.remove(this.onActiveStateChanged,this)}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Z.prototype,"_targetGameObject",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("TweenTransformBase (abstract)")],Z)},45902:(q,K,z)=>{"use strict";z.d(K,{_:()=>St});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(97495),J=z(40295),tt=z(42448),et=z(35120),it=z(49237),st=z(43846),nt=z(1195),at=z(93867),rt=z(73797),ot=z(28152),ht=z(11624),ct=z(59599),dt=z(15485),lt=z(46784),ut=z(41674),ft=z(70548),bt=z(23748),pt=z(22023),vt=z(73678),gt=z(40392),mt=z(97518),yt=z(77938);class _t{constructor(){this._currentTitanAsset=null,this.letsGoLocalization="BUTTON_LETS_GO",this._player=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,this.updateTitanAsset(et.q.instance.prodigy.titansNetworkHandler.titan,!1),et.q.instance.game.broadcaster.addAppListener(rt.RZ.GotTitans,this.updateTitanAsset.bind(this),this,"Titan"),et.q.instance.prodigy.titansNetworkHandler.getTitans().catch(Q.RQr.createHandler("WorldMap: Could not get active Titan data"))}updateTitanAsset(q,K=!0){var z;q?(K&&et.q.instance.game.broadcaster.removeAppListener(rt.RZ.GotTitans,this,"Titan"),this._currentTitanAsset=null===(z=yt.t.getItem("titan",q.assetID))||void 0===z?void 0:z.data):Q.VyI.log("ZoneGoalsDataProvider.updateTitanAsset: Received no Titan data",Q.$bb.Warning)}static isInteractionStarted(){return _t._sessionInteractionStart}static setInteractionStart(){_t._sessionInteractionStart=!0}getZoneName(q){return gt.i.getZoneData(q).getName()}getTitanAsset(){return this._currentTitanAsset}getZoneProgress(q){return this._player.state.getCompletedQuests(q)/Object.keys(et.q.instance.prodigy.world.getZone(q).quests).length}getMapTag(q){return gt.i.getZoneData(q).target}hasFirstQuestStarted(q){return et.q.instance.prodigy.world.getZone(q).isQuestStarted(1)}isQuestCompleted(q,K){return this._player.state.getCompletedQuests(q)>=K}getQuestGiver(q){const K=et.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);switch(q){case vt.A_.BONFIRE:case vt.A_.BONFIREHARD:case vt.A_.BONFIREEXPERT:return K.getText("NPC_NAME_SLURPY");case vt.A_.FOREST:case vt.A_.FORESTHARD:case vt.A_.FORESTEXPERT:return K.getText("NPC_NAME_FLORA");case vt.A_.SHIPWRECK:case vt.A_.SHIPWRECKHARD:case vt.A_.SHIPWRECKEXPERT:return K.getText("NPC_NAME_EVE");case vt.A_.SHIVERCHILL:case vt.A_.SHIVERCHILLHARD:case vt.A_.SHIVERCHILLEXPERT:return K.getText("SHIVERCHILL_GUARDIAN");case vt.A_.SKYWATCH:case vt.A_.SKYWATCHHARD:case vt.A_.SKYWATCHEXPERT:return`${K.getText("NPC_NAME_BENNI")} and ${K.getText("NPC_NAME_BROCCOLINA")}`;default:return null}}getQuestGiverCount(q){switch(q){case vt.A_.SKYWATCH:case vt.A_.SKYWATCHHARD:case vt.A_.SKYWATCHEXPERT:return 2;default:return 1}}getLastVisitedZone(){const q=et.q.instance.prodigy.world.getCurrentZone();return-1!==_t.ZONE_PRIORITY_ORDER.indexOf(q)?q:null}}_t._sessionInteractionStart=!1,_t.ZONE_PRIORITY_ORDER=[vt.A_.FOREST,vt.A_.SHIVERCHILL,vt.A_.SKYWATCH,vt.A_.BONFIRE,vt.A_.SHIPWRECK,vt.A_.FORESTHARD,vt.A_.SHIVERCHILLHARD,vt.A_.SKYWATCHHARD,vt.A_.BONFIREHARD,vt.A_.SHIPWRECKHARD,vt.A_.FORESTEXPERT,vt.A_.SHIVERCHILLEXPERT,vt.A_.SKYWATCHEXPERT,vt.A_.BONFIREEXPERT,vt.A_.SHIPWRECKEXPERT];var Et,wt,Tt=z(72849);!function(q){q[q.HoverMode=0]="HoverMode",q[q.DisplayMode=1]="DisplayMode"}(wt||(wt={}));let St=Et=class extends Q.uAl{constructor(){super(...arguments),this.petCollectionCompletionRecord={},this._zonePanels=[],this._booleanStates=[],this._zoneIDFromPanels=[],this._hardModeZoneIDFromPanels=[],this._expertModeZoneIDFromPanels=[],this.onZonePanelActivated=new Q.HN0,this._currentMode=wt.HoverMode,this.onApplyCustomDisplay=new Q.HN0,this.onClearCustomDisplay=new Q.HN0}initialize(){this._dataProvider=new _t,this._zonePanels.forEach(((q,K)=>this.initializePanel(q,K))),et.q.instance.game.broadcaster.addAppListener(rt.n8.WorldMapDifficultyModeChanged,(()=>{this._zonePanels.forEach(((q,K)=>this.initializePanel(q,K)))}),this)}initializePanel(q,K){const z=this.getZoneIdForPanelIndex(K);this.updatePanel(q,z);const Y=q.GameObject.findComponentsInChildren(it.$);for(const Q of Y)Q.onInputOver.removeAll(),Q.onInputOver.add((()=>{this._booleanStates[K].setValue(!0),this.toggleBubbleVisibility(!0)}),this),Q.onInputOut.removeAll(),Q.onInputOut.add((()=>{this._currentMode===wt.HoverMode&&(this._booleanStates[K].setValue(!1),this.toggleBubbleVisibility(!1))}),this),Q.onClick.removeAll(),Q.onClick.add((()=>{this.onZonePanelActivated.dispatch(K),et.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:dt.k.ZoneGoalsCta,interfaceType:ut.Wm.DialogBox,interfaceName:lt.B.ZoneGoals,destinationName:this._dataProvider.getMapTag(z),elementType:"zone_goals_tooltip",elementID:"destination_zone"})}))}setPanelActive(q,K,z,Y=!1){if(z&&this._currentMode===wt.DisplayMode)return;Et.PERMANENT_NOOT_WIDGET_ZONE_INDEXES.includes(q)&&z&&this._currentMode===wt.HoverMode&&(this.toggleBubbleVisibility(K),K&&this.updateWidgetHUD(gt.i.BUTTONS_CONFIG.find((K=>K.prefabIndex===q)).zone)),at.U.isEndgameQuestActive()&&q===Et.ACADEMY_LOCATION_INDEX&&(this.toggleBubbleVisibility(K),K&&this.updateWidgetHUD(vt.A_.ACADEMY));const Q=gt.i.DIFFICULTY_MODE===Z.i.Regular&&at.U.isStepComplete(J.B.PippetDefeated);q>=0&&qK.prefabIndex===q)).zone))}updatePanel(q,K){q.isGemFound=this._playerDataProvider.player.hasFoundKeystone(K),q.updateHeader(this._dataProvider.getZoneName(K),`${Et.ICON_PREFIX}${K.replace(/_hard|_expert/,"")}`),q.setProgressBarIcon(K);const z=q.isGemFound?1:bt.z.roundToNearestMultiplier(this._dataProvider.getZoneProgress(K),.05);q.setProgressBarValue(z,!1),this._dataProvider.hasFirstQuestStarted(K)||this._dataProvider.isQuestCompleted(K,1)||(q.isFirstQuestStarted=!1),q.updateProgressBarText()}showGemAwardSequence(q,K){const z=this.getZoneIdForPanelsByDifficulty().indexOf(q),Y=this._zonePanels[z];Y.cacheAsBitmap=!1,this.hideWidget(),this._currentMode===wt.HoverMode&&this.toggleDisplayMode(),this.toggleBubbleVisibility(!1),this.setPanelActive(z,!0,!1,!0),Y.isGemFound=!1,Y.hideBarText(),Y.setProgressBarValue(0,!1),Y.setProgressBarValue(1,!0),Y.onTweenValueComplete.addOnce((()=>{Y.isGemFound=!0,Y.showBarText(),Y.updateProgressBarText(),Y.bounceBarIcon(),Y.onBarIconBounceComplete.addOnce((()=>{Y.cacheAsBitmap=!0,this.setPanelActive(z,!1,!1),this.dismiss(),null==K||K()}))}))}setWidget(q){q!==this._currentWidgetState&&(this._nootIcon.updateAsset(X._.Ui_widget_icon_json,`noot_face_${q}`),this._currentWidgetState=q)}showWidget(){this._nootIcon.GameObject.parent.active=!0}hideWidget(){this._nootIcon.GameObject.parent.active=!1}setSpeechBubbleText(q,...K){q!==this._currentSpeechBubbleText&&(this._speechBubbleText.setLocalizationKey(q),this._currentSpeechBubbleText=q),this._speechBubbleText.setTextArguments(...K)}updateWidgetHUD(q){if(!Q.Aq$.isDefined(q))return this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_OVERVIEW"),void this.setWidget(0);if(q===vt.A_.DRAGONISLE)return void this.updateWidgetHudForDragonIsle();if(at.U.isStepComplete(J.B.PuppetMasterDefeated))return void this.updateWidgetHUDForPostEndgame(q);if(q===vt.A_.ACADEMY)return this.setSpeechBubbleText("WORLD_MAP_SPEECH_BUBBLE_ENDGAME"),void this.setWidget(0);const K=this._dataProvider.getZoneName(q),z=this._dataProvider.getQuestGiver(q),Y=this._dataProvider.getZoneProgress(q);if(Y>=1)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_7",K),this.setWidget(3);else if(Y>=.9&&Y<1)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_5",K),this.setWidget(2);else if(Y>=.75&&Y<.9)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_4",K),this.setWidget(3);else if(Y>=.5&&Y<.75)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_3",K),this.setWidget(0);else if(Y>=.26&&Y<.5)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_2",K),this.setWidget(4);else if(this._dataProvider.isQuestCompleted(q,2))this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_1",z,K),this.setWidget(4);else if(this._dataProvider.isQuestCompleted(q,1))this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_0",K,z),this.setWidget(2);else if(Y<=0){const K=(0,st.k)("GENERAL_PLURAL","",this._dataProvider.getQuestGiverCount(q)>1?"":"s");this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_6",z,K),this.setWidget(4)}}getZoneIdForPanelsByDifficulty(){switch(gt.i.DIFFICULTY_MODE){case Z.i.Expert:return this._expertModeZoneIDFromPanels;case Z.i.Hard:return this._hardModeZoneIDFromPanels;default:case Z.i.Regular:return this._zoneIDFromPanels}}getZoneIdForPanelIndex(q){return this.getZoneIdForPanelsByDifficulty()[q]}updateWidgetHUDForPostEndgame(q){if(Et.PET_COLLECTION_ZONE_IDS.includes(q))this.ownsAllPetsFromZone(q).then((K=>{var z;const Y=(null===(z=this._dataProvider.getTitanAsset())||void 0===z?void 0:z.zone)===q;this.setSpeechBubbleText(Y?"ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_TITAN":K?"ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_FOUND_ALL_PETS":"ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_PET_COLLECTION"),this.setWidget(Y?4:K?2:0)})).catch(Q.RQr.createHandler("ZoneGoalsController: Could not determine if the player owns all pets in a regular zone"));else{if(q===vt.A_.ACADEMY)return this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_GALE_ARCHIVES"),void this.setWidget(3);if(q===vt.A_.LAMPLIGHT)return this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_LAMPLIGHT_DUEL"),void this.setWidget(0)}}updateWidgetHudForDragonIsle(){et.q.instance.prodigy.gameContainer.get("81d-5606").getActiveRiftsPortalIds().then((q=>{q.filter((q=>q!==tt.ni.Portal1)).length>0?(this.setSpeechBubbleText("WORLD_MAP_SPEECH_BUBBLE_NEW_RIFTS_PORTAL"),this.setWidget(4)):(this.setSpeechBubbleText("WORLD_MAP_SPEECH_BUBBLE_NO_NEW_RIFTS_PORTAL"),this.setWidget(0))})).catch(Q.RQr.createHandler("ZoneGoalsControllerComponent: Failed to fetch the player's active rifts portal IDs"))}ownsAllPetsFromZone(q){return(0,Y.sH)(this,void 0,void 0,(function*(){if(Q.Aq$.isDefined(this.petCollectionCompletionRecord[q]))return this.petCollectionCompletionRecord[q];{const K=yield pt.P8.ownsAllPetsFromZone(q);return this.petCollectionCompletionRecord[q]=K,K}}))}toggleBubbleVisibility(q=!this._speechBubbleBooleanState.getValue()){this._speechBubbleBooleanState.getValue()!==q&&this._speechBubbleBooleanState.setValue(q)}tryAutoTrigger(){_t.isInteractionStarted()||(_t.setInteractionStart(),this.toggleDisplayMode(),this.setDismissalButtonActive(),this.sendPanelInterfaceOpenedEvent(),this.sendWidgetInterfaceOpenedEvent(!0))}toggleDisplayMode(){this.updateWidgetHUD(),this._currentMode===wt.HoverMode?(this._currentMode=wt.DisplayMode,this.applyCustomDisplay(),this.toggleBubbleVisibility(!0),this.sendWidgetInterfaceOpenedEvent(!1)):this._currentMode===wt.DisplayMode&&(this._currentMode=wt.HoverMode,this.toggleBubbleVisibility(!1),this.onClearCustomDisplay.dispatch())}setDismissalButtonActive(q=!0){this._overlayObject.active=q}dismiss(){this._currentMode===wt.DisplayMode&&(this.toggleDisplayMode(),this.setDismissalButtonActive(!1))}applyCustomDisplay(){let q=null;if(q=at.U.isEndgameQuestActive()?vt.A_.ACADEMY:this._dataProvider.getLastVisitedZone(),Q.Aq$.isDefined(q))this.updateWidgetHUD(q),this.onApplyCustomDisplay.dispatch([this.mapZoneIDToLocationID(q)]);else{const q=[],K=et.q.instance.prodigy.gameContainer.get("11f-118a");(gt.i.DIFFICULTY_MODE===Z.i.Expert?this._expertModeZoneIDFromPanels:gt.i.DIFFICULTY_MODE===Z.i.Hard?this._hardModeZoneIDFromPanels:this._zoneIDFromPanels).forEach((z=>{var Y;const Q=null===(Y=gt.i.BUTTONS_CONFIG.find((q=>z===q.zone)))||void 0===Y?void 0:Y.requirementsID;K.meetsRequirementsDeprecated(Q)&&q.push(this.mapZoneIDToLocationID(z))})),this.onApplyCustomDisplay.dispatch(q)}}mapZoneIDToLocationID(q){switch(q){case vt.A_.FOREST:return ht.P.Firefly;case vt.A_.SHIVERCHILL:return ht.P.Shiverchill;case vt.A_.SKYWATCH:return ht.P.Skywatch;case vt.A_.BONFIRE:return ht.P.Bonfire;case vt.A_.SHIPWRECK:return ht.P.Shipwreck;case vt.A_.ACADEMY:return ht.P.Academy;case vt.A_.FORESTHARD:return ht.P.FireflyHard;case vt.A_.SHIVERCHILLHARD:return ht.P.ShiverchillHard;case vt.A_.SKYWATCHHARD:return ht.P.SkywatchHard;case vt.A_.BONFIREHARD:return ht.P.BonfireHard;case vt.A_.SHIPWRECKHARD:return ht.P.ShipwreckHard;case vt.A_.ACADEMYHARD:return ht.P.AcademyHard;default:return null}}sendPanelInterfaceOpenedEvent(){var q,K;this._currentMode===wt.HoverMode?null===(q=this._panelInterfaceOpenHover)||void 0===q||q.sendInterfaceEvent():null===(K=this._panelInterfaceOpenAuto)||void 0===K||K.sendInterfaceEvent()}sendWidgetInterfaceOpenedEvent(q){var K,z;q?null===(K=this._widgetInterfaceOpenAuto)||void 0===K||K.sendInterfaceEvent():null===(z=this._widgetInterfaceOpenClicked)||void 0===z||z.sendInterfaceEvent()}getCurrentActivePanels(){const q=[];return this._booleanStates.forEach(((K,z)=>{K.getValue()&&q.push(this.getZoneIdForPanelIndex(z))})),q}destroy(){et.q.instance.game.broadcaster.removeAppListener(rt.n8.WorldMapDifficultyModeChanged,this),this.onZonePanelActivated.dispose(),this.onApplyCustomDisplay.dispose(),this.onClearCustomDisplay.dispose(),super.destroy()}};St.ICON_PREFIX="icon-small-",St.ACADEMY_LOCATION_INDEX=5,St.POSTENDGAME_NOOT_WIDGET_ZONE_INDEXES=[ht.P.Bonfire,ht.P.Firefly,ht.P.Shipwreck,ht.P.Shiverchill,ht.P.Skywatch,ht.P.Academy,ht.P.Lamplight],St.PERMANENT_NOOT_WIDGET_ZONE_INDEXES=[ht.P.DragonIsle],St.PET_COLLECTION_ZONE_IDS=[vt.A_.BONFIRE,vt.A_.SHIVERCHILL,vt.A_.FOREST,vt.A_.SKYWATCH,vt.A_.SHIPWRECK,vt.A_.BONFIREHARD,vt.A_.SHIVERCHILLHARD,vt.A_.FORESTHARD,vt.A_.SKYWATCHHARD,vt.A_.SHIPWRECKHARD,vt.A_.BONFIREEXPERT,vt.A_.SHIVERCHILLEXPERT,vt.A_.FORESTEXPERT,vt.A_.SKYWATCHEXPERT,vt.A_.SHIPWRECKEXPERT],(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",nt.E)],St.prototype,"_playerDataProvider",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],St.prototype,"_nootIcon",void 0),(0,Y.Cg)([(0,Q.MnK)(mt.R),(0,Y.Sn)("design:type",mt.R)],St.prototype,"_speechBubbleText",void 0),(0,Y.Cg)([(0,Q.MnK)(ct.f),(0,Y.Sn)("design:type",ct.f)],St.prototype,"_speechBubbleBooleanState",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],St.prototype,"_overlayObject",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(Tt.M),(0,Y.Sn)("design:type",Array)],St.prototype,"_zonePanels",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(ct.f),(0,Y.Sn)("design:type",Array)],St.prototype,"_booleanStates",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.W_S)(),(0,Y.Sn)("design:type",Array)],St.prototype,"_zoneIDFromPanels",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.W_S)(),(0,Y.Sn)("design:type",Array)],St.prototype,"_hardModeZoneIDFromPanels",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.W_S)(),(0,Y.Sn)("design:type",Array)],St.prototype,"_expertModeZoneIDFromPanels",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],St.prototype,"onZonePanelActivated",void 0),(0,Y.Cg)([(0,Q.MnK)(ft.S),(0,Y.Sn)("design:type",ft.S)],St.prototype,"_panelInterfaceOpenHover",void 0),(0,Y.Cg)([(0,Q.MnK)(ft.S),(0,Y.Sn)("design:type",ft.S)],St.prototype,"_panelInterfaceOpenAuto",void 0),(0,Y.Cg)([(0,Q.MnK)(ft.S),(0,Y.Sn)("design:type",ft.S)],St.prototype,"_widgetInterfaceOpenAuto",void 0),(0,Y.Cg)([(0,Q.MnK)(ft.S),(0,Y.Sn)("design:type",ft.S)],St.prototype,"_widgetInterfaceOpenClicked",void 0),St=Et=(0,Y.Cg)([(0,Q.EVk)("ZoneGoalsController",ot.Y.ui)],St)},72849:(q,K,z)=>{"use strict";z.d(K,{M:()=>st});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(49237),tt=z(37468),et=z(24110),it=z(88022);let st=Y=class extends X.uAl{constructor(){super(...arguments),this.onTweenValueComplete=new X.HN0,this.onBarIconBounceComplete=new X.HN0,this.isGemFound=!1,this._isFirstQuestStarted=!0}set isFirstQuestStarted(q){this._isFirstQuestStarted=q}set cacheAsBitmap(q){const K=this.gameObject.transform;q?(K.setPosition(this.originalTransformPosition.x/2,this.originalTransformPosition.y/2),K.setPivot(.25,.25)):(K.setPosition(this.originalTransformPosition.x,this.originalTransformPosition.y),K.setPivot(.5,.5));this.gameObject.findComponent(et.B).getRootContainer().cacheAsBitmap=q}postCreate(){super.postCreate();const q=this.gameObject.transform;this._button.GameObject.parent=this.GameObject.parent;this._button.GameObject.transform.setPosition(q.anchoredPivotOffset.x,q.anchoredPivotOffset.y),this.originalTransformPosition=new X.I9Y(q.posX,q.posY),this.cacheAsBitmap=!0}destroy(){this.onTweenValueComplete.dispose(),this.onBarIconBounceComplete.dispose(),super.destroy()}updateHeader(q,K){this._headerText.text=q,this._headerIcon.updateAsset(this._headerIcon.atlasKey,K);const z=this._headerIcon.GameObject.findComponent(X.XVE),Y=this._headerText.GameObject.findComponent(X.XVE);z.setPositionX(Y.localPosition.x+Y.fullWidth/2)}setProgressBarIcon(q){this._barIcon.updateAsset(it._.Ui_widget_modal_json,`gem-${q.replace(/_hard|_expert/,"")}`)}bounceBarIcon(){this._barIconBounceTween.playAnimation(),this._barIconBounceTween.onTweenComplete.addOnce((()=>this.onBarIconBounceComplete.dispatch()))}setProgressBarValue(q,K){X.Aq$.isDefined(this._progressBar)&&(K?(this._progressBar.setValue(q,!0),this._progressBar.onTweenValueComplete.addOnce((()=>this.onTweenValueComplete.dispatch()))):this._progressBar.setValue(q,!1))}hideBarText(){this._progressBar.hideBarText()}showBarText(){this._progressBar.showBarText()}updateProgressBarText(){this._isFirstQuestStarted?this.isGemFound&&this._progressBar.setBarText(Z.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(Y.GEM_FOUND_KEY)):this._progressBar.setBarText(Z.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText(Y.NOT_STARTED_KEY))}};st.NOT_STARTED_KEY="ZONE_GOALS_NOT_STARTED",st.GEM_FOUND_KEY="GEM_FOUND",(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],st.prototype,"_headerText",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],st.prototype,"_headerIcon",void 0),(0,Q.Cg)([(0,X.MnK)(tt.z),(0,Q.Sn)("design:type",tt.z)],st.prototype,"_progressBar",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],st.prototype,"_barIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.bTj),(0,Q.Sn)("design:type",X.bTj)],st.prototype,"_barIconBounceTween",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],st.prototype,"onTweenValueComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],st.prototype,"onBarIconBounceComplete",void 0),(0,Q.Cg)([(0,X.MnK)(J.$),(0,Q.Sn)("design:type",J.$)],st.prototype,"_button",void 0),st=Y=(0,Q.Cg)([(0,X.EVk)("ZoneGoalsPanelController",X.YH6.ui)],st)},25983:(q,K,z)=>{"use strict";z.d(K,{s:()=>Z});var Y=z(8674),Q=z(62459),X=z(49237);let Z=class extends Q.uAl{constructor(){super(...arguments),this.onClose=new Q.HN0,this.onConfirm=new Q.HN0}create(){super.create(),this.gameObject.active=!1,this._closeButton.onClick.add(this.close,this),this._okButton.onClick.add(this.close,this),this._noButton.onClick.add(this.close,this),this._yesButton.onClick.add((()=>{this.onConfirm.dispatch()}),this)}destroy(){this._closeButton.onClick.removeAll(this),this._noButton.onClick.removeAll(this),this._okButton.onClick.removeAll(this),this._yesButton.onClick.removeAll(this),this.onClose.dispose(),this.onConfirm.dispose(),super.destroy()}showOneButton(q,K,z,Y,X=!1){this.configure(q,K,z,X,!0);for(const Z of this._okButton.GameObject.findComponentsInChildren(Q.EYj))Z.text=Y;this.gameObject.active=!0}showTwoButton(q,K,z,Y,X,Z=!1){this.configure(q,K,z,Z,!1);for(const J of this._noButton.GameObject.findComponentsInChildren(Q.EYj))J.text=Y;for(const J of this._yesButton.GameObject.findComponentsInChildren(Q.EYj))J.text=X;this.gameObject.active=!0}close(){this.gameObject.active=!1,this.onClose.dispatch()}configure(q,K,z,Y,Q){this._splashGraphic.updateAsset(q.atlas,q.frame),this._titleText.text=K,this._descriptionText.text=z,this._lockIcon.active=Y,this._okButton.GameObject.active=Q,this._yesButton.GameObject.active=!Q,this._noButton.GameObject.active=!Q}};(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],Z.prototype,"_splashGraphic",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],Z.prototype,"_titleText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],Z.prototype,"_descriptionText",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],Z.prototype,"_closeButton",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],Z.prototype,"_okButton",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],Z.prototype,"_noButton",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],Z.prototype,"_yesButton",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Z.prototype,"_lockIcon",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onClose",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onConfirm",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("LocationDialogPrefab")],Z)},55237:(q,K,z)=>{"use strict";z.d(K,{X:()=>rt});var Y=z(8674),Q=z(62459),X=z(17446),Z=z(28152),J=z(6190),tt=z(63746),et=z(29834),it=z(65050),st=z(67665),nt=z(30226),at=z(34374);let rt=class extends Q.uAl{constructor(){super(...arguments),this._maximumRewardCount=2,this._currentRewardCount=0,this.skipAward=!1,this._menuChangesDelayMs=1300}run(){var q;const K=this._rouletteComponent.getMiddlemostChild().findComponentInChildren(tt.Z);K.GameObject.parent.addChild(K.GameObject);const z=K.itemCardData,Y=K.itemData;this._cardComponent.initializeItemCard({id:z.id,type:z.type,N:z.N,data:z.data,receivedThroughGotItemFlow:!1});const Z=nt.J.getItemName(z),J=Q.Aq$.isDefined(z.N)&&z.N>1?`${z.N} ${Z}`:Z;this._titleText.text=J,this._bodyText.text=this._localizer.getText(nt.J.getLocalizationFlavorKey(z));const et=nt.J.convertRarityToText(null!==(q=Y.rarity)&&void 0!==q?q:X.E.Common).toLowerCase(),st=this._localizer.getText(Y.rarity===X.E.Uncommon?"YOU_GOT_AN_REWARD":"YOU_GOT_A_REWARD",et);this.skipAward||(this._itemAward.items=[{ID:z.id,type:z.type,N:z.N}],this._itemAward.instanceType=this._rouletteComponent.instanceTypeForSegmentEvent,this._rouletteComponent.sourceTypeForSegmentEvent&&(this._itemAward.awardSourceType=this._rouletteComponent.sourceTypeForSegmentEvent),this._rouletteComponent.instanceTypeForSegmentEvent===it.N.RiftRun||this._rouletteComponent.instanceTypeForSegmentEvent===it.N.BossRift?this._itemAward.instanceId=this._segment.rifts.riftInstanceUuid:this._rouletteComponent.instanceTypeForSegmentEvent!==it.N.FestivalDaily&&this._rouletteComponent.instanceTypeForSegmentEvent!==it.N.FestivalChestRouletteSpin&&this._rouletteComponent.instanceTypeForSegmentEvent!==it.N.FestivalDailyBossRouletteSpin||(this._itemAward.instanceId=this._segment.festival.getFestivalInstanceName(),this._itemAward.instanceType=this._rouletteComponent.instanceTypeForSegmentEvent),this._itemAward.run()),this._cardTransform.setAnchoredPivotOffset(0,this._cardTransform.anchoredPivotOffset.y),this._displayFinalRewardTween.onTweenComplete.addOnce((()=>{this._currentRewardCount++,this._currentRewardCount{this._rouletteComponent.headerText.text=st,this._rouletteObject.active=!1,this._cardComponent.GameObject.active=!0}),this._menuChangesDelayMs)}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],rt.prototype,"_rouletteObject",void 0),(0,Y.Cg)([(0,Q.MnK)(at.i),(0,Y.Sn)("design:type",at.i)],rt.prototype,"_rouletteComponent",void 0),(0,Y.Cg)([(0,Q.MnK)(J.q),(0,Y.Sn)("design:type",J.q)],rt.prototype,"_itemAward",void 0),(0,Y.Cg)([(0,Q.MnK)(et.j),(0,Y.Sn)("design:type",et.j)],rt.prototype,"_shineAnimator",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],rt.prototype,"_titleText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],rt.prototype,"_bodyText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],rt.prototype,"_cardTransform",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.Z),(0,Y.Sn)("design:type",tt.Z)],rt.prototype,"_cardComponent",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],rt.prototype,"_nextButtonContainer",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],rt.prototype,"_okayButtonContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.bTj),(0,Y.Sn)("design:type",Q.bTj)],rt.prototype,"_displayFinalRewardTween",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],rt.prototype,"_maximumRewardCount",void 0),(0,Y.Cg)([(0,Q.Cdj)(Q.$Zn.Localization),(0,Y.Sn)("design:type",Q.dTp)],rt.prototype,"_localizer",void 0),(0,Y.Cg)([(0,Q.Cdj)("20f-5f67"),(0,Y.Sn)("design:type",st.Y)],rt.prototype,"_segment",void 0),rt=(0,Y.Cg)([(0,Q.EVk)("BossRewardDetermined",Z.Y.adventureUi)],rt)},96268:(q,K,z)=>{"use strict";z.d(K,{a:()=>X});var Y=z(8674),Q=z(62459);let X=class extends Q.uAl{get width(){return this._width}get height(){return this._height}create(){var q,K;super.create(),this._width=(null!==(q=this._width)&&void 0!==q?q:this.gameObject.transform.sizeDelta.width)*this.gameObject.transform.localScale.x,this._height=null!==(K=this._height)&&void 0!==K?K:this.gameObject.transform.sizeDelta.height*this.gameObject.transform.localScale.y}};(0,Y.Cg)([(0,Q.g11)(),(0,Q.Lr6)(0),(0,Q.nKb)("overrideWidth"),(0,Y.Sn)("design:type",Number)],X.prototype,"_width",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Q.Lr6)(0),(0,Q.nKb)("overrideHeight"),(0,Y.Sn)("design:type",Number)],X.prototype,"_height",void 0),X=(0,Y.Cg)([(0,Q.EVk)("RouletteChild")],X)},34374:(q,K,z)=>{"use strict";z.d(K,{i:()=>rt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(35120),J=z(28152),tt=z(63746),et=z(23283),it=z(65050),st=z(53661),nt=z(44094),at=z(96268);let rt=class extends Q.uAl{constructor(){super(...arguments),this.padding=20,this.maxVelocity=-2e3,this.initialVelocity=-60,this.spinTime=4,this.decelerationTime=3,this.spinningHeaderTextKey="SPINNING_FOR_YOUR_REWARD",this.onStart=new Q.HN0,this.onComplete=new Q.HN0,this.onTick=new Q.HN0,this._velocity=this.initialVelocity,this._children=new Set,this.isRespin=!1}get width(){return this._width}get height(){return this._height}create(){var q;super.create(),this._width=this.gameObject.transform.sizeDelta.width,this._height=this.gameObject.transform.sizeDelta.height,this.reset(),this.instanceTypeForSegmentEvent=null!==(q=this.getInjectedValue(st.Co.InstanceType))&&void 0!==q?q:it.N.OpenWorld,this._cardSpacing=this._tail.width+this.padding}reset(){for(const q of this.gameObject.children)q.active=!1;for(this._tail=this.getCard(),this._tailTransform=this._tail.GameObject.transform,this._tailTransform.setAnchoredPivotOffset(-this._width/2,this._tailTransform.anchoredPivotOffset.y);this._tailTransform.anchoredPivotOffset.x0&&Math.abs(Y+this._winningCardOffset)<.25*K.width){const q=this.forcedRewards.shift();K.GameObject.findComponentInChildren(tt.Z,!0).initializeItemCard({id:q.ID,type:q.type,N:q.N,data:q.data})}}getCard(){const q=this.pool.getObject().findComponentInChildren(at.a);return this._children.add(q),this.gameObject.addChild(q.GameObject),q}update(){super.update(),0!==this._velocity&&this.offsetChildren(this._velocity*(Z.q.instance.game.time.deltaMS/1e3))}offsetChildren(q){for(const K of Array.from(this._children)){const z=K.GameObject.transform;z.posX+=q,z.anchoredPivotOffset.x+.5*K.width<-.5*this._width&&(K.GameObject.active=!1,this._children.delete(K))}if(this._tailTransform)for(;this._tailTransform.anchoredPivotOffset.x+.5*this._tail.width+this.padding{this._winningCardOffset=z-X.x,this.offsetChildren(X.x-Y),Y=X.x})).onTweenComplete.add((()=>{this._winningCardOffset=0,this.offsetChildren(z-Y),this.onComplete.dispatch()}))}getMiddlemostChild(){return X.minBy(this.gameObject.children,(q=>Math.abs(q.transform.anchoredPivotOffset.x)))}destroy(){this.onStart.dispose(),this.onComplete.dispose(),this.onTick.dispose(),this.pool.destroy(),super.destroy()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],rt.prototype,"padding",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],rt.prototype,"maxVelocity",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],rt.prototype,"initialVelocity",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],rt.prototype,"spinTime",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],rt.prototype,"decelerationTime",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.uAl),(0,Y.Sn)("design:type",Object)],rt.prototype,"pool",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],rt.prototype,"headerText",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],rt.prototype,"spinningHeaderTextKey",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],rt.prototype,"onComplete",void 0),(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],rt.prototype,"_baseLocalizer",void 0),rt=(0,Y.Cg)([(0,Q.EVk)("Roulette",J.Y.adventureUi)],rt)},65088:(q,K,z)=>{"use strict";z.d(K,{H:()=>vt});var Y,Q,X,Z=z(62459),J=z(24521),tt=z(23029),et=z(35120),it=z(98252),st=z(76277),nt=z(223),at=z(92661),rt=z(77981);!function(q){q.Equals="equals",q.DoesNotEqual="doesNotEqual",q.GreaterThan="greaterThan",q.GreaterThanOrEqualTo="greaterThanOrEqualTo",q.LessThan="lessThan",q.LessThanOrEqualTo="lessThanOrEqualTo",q.IncludedIn="includedIn",q.NotIncludedIn="notIncludedIn"}(Y||(Y={})),function(q){q.FeatureVariable="featureVariable",q.isFeatureEnabled="isFeatureEnabled",q.PlayerLevel="playerLevel",q.WasTriggeredBy="wasTriggeredBy",q.IsMember="isMember",q.IsPlayingAtSchool="isPlayingAtSchool",q.IsPlayingOnMobileApp="isPlayingOnMobileApp",q.MembershipTier="membershipTier",q.IsBattlePassActive="isBattlePassActive",q.isOTPEnabled="isOTPEnabled",q.HasMembershipCategory="hasMembershipCategory",q.membershipThreeTierEligible="membershipThreeTierEligible",q.Locale="locale"}(Q||(Q={})),function(q){q.Any="any",q.All="all"}(X||(X={}));const ot=at.RZV((()=>at.KCZ([at.YjP(),at.aig(),at.zMY(),at.YOg(ot)]))),ht=at.Ikc({featureName:at.YjP().optional(),featureVariableName:at.YjP().optional(),membershipCategory:at.k5n(rt.r).optional()}),ct=at.Ikc({condition:at.k5n(Q),operator:at.k5n(Y),value:ot,params:ht.optional()}),dt=at.RZV((()=>at.Ikc({matchesAny:at.YOg(dt).optional(),matchesAll:at.YOg(dt).optional(),conditions:at.YOg(ct).optional()}))),lt=at.Ikc({assets:at.YOg(at.k5n(J.r))}),ut=at.Ikc({id:at.KCZ([at.Whr().min(0),at.YjP()]),description:at.YjP().optional(),toEvaluate:dt,success:lt});at.Ikc({name:at.YjP(),sets:at.YOg(ut)});var ft=z(89305),bt=z(29738);class pt{static checkConditions(q,K,z){return K===X.Any?q.some((q=>this.operatorEvaluate(this.getLeftComparand(q,z),q.value,q.operator))):q.every((q=>this.operatorEvaluate(this.getLeftComparand(q,z),q.value,q.operator)))}static getLeftComparand(q,K){var z,Y;let X;const J=et.q.instance.prodigy.gameContainer.get("9fe-5b45"),tt=et.q.instance.prodigy.gameContainer.get("ad2-c5b2");switch(q.condition){case Q.FeatureVariable:X=null===(z=J.getFeatureValue(q.params.featureName))||void 0===z?void 0:z[q.params.featureVariableName];break;case Q.isFeatureEnabled:X=J.isOn(q.params.featureName);break;case Q.PlayerLevel:X=tt.player.getLevel();break;case Q.WasTriggeredBy:X=K;break;case Q.IsMember:X=tt.player.hasMembership();break;case Q.IsPlayingAtSchool:X=tt.player.isPlayingAtSchool();break;case Q.IsPlayingOnMobileApp:X=it.pF.isNativeApp();break;case Q.MembershipTier:X=tt.getMembershipUpsell().tier;break;case Q.IsBattlePassActive:const at=et.q.instance.prodigy.gameContainer.get("9a2-c1c3").getCachedBattlePassData();X=Z.Aq$.isDefined(at);break;case Q.isOTPEnabled:X=(0,st.G)(nt.l).enabled;break;case Q.HasMembershipCategory:const rt=null===(Y=q.params)||void 0===Y?void 0:Y.membershipCategory;X=!!Z.Aq$.isDefined(rt)&&(0,ft.nO)(rt);break;case Q.membershipThreeTierEligible:X=it.pF.eligibleForMembershipPurchaseForMultipleTiers();break;case Q.Locale:X=bt.O.localeCode;break;default:Z.VyI.log(`The specified dynamic prompt condition: '${q.condition}' is not a valid condition.`,Z.$bb.Error)}return X}static operatorEvaluate(q,K,z){return pt.getOperatorFunction(z)(q,K)}static getOperatorFunction(q){let K;switch(q){case Y.Equals:K=(q,K)=>q===K;break;case Y.DoesNotEqual:K=(q,K)=>q!==K;break;case Y.GreaterThan:K=(q,K)=>q>K;break;case Y.GreaterThanOrEqualTo:K=(q,K)=>q>=K;break;case Y.LessThan:K=(q,K)=>qq<=K;break;case Y.IncludedIn:K=(q,K)=>(Array.isArray(K)?K:[K]).includes(q);break;case Y.NotIncludedIn:K=(q,K)=>!(Array.isArray(K)?K:[K]).includes(q);break;default:Z.VyI.log(`Invalid operator string: '${q}'.`,Z.$bb.Error)}return K}}class vt{static evaluate(q,K){const z=null!=K?K:tt.R.loadData(J.r.DynamicPromptRuleset_json);let Y;if(Z.Aq$.isDefined(z))for(const Q of z.sets)if(Q.toEvaluate.matchesAny?Q.toEvaluate.matchesAny.some((K=>this.match(K,X.Any,q)))&&(Y=Q.success):Q.toEvaluate.matchesAll&&Q.toEvaluate.matchesAll.every((K=>this.match(K,X.All,q)))&&(Y=Q.success),Y)return Y;return this.failureMessage()}static match(q,K,z){return K===X.Any?this.matchAny(q,K,z)||this.matchAll(q,K,z)||this.matchConditions(q,K,z):this.matchAny(q,K,z)&&this.matchAll(q,K,z)&&this.matchConditions(q,K,z)}static matchAny(q,K,z){return q.matchesAny?q.matchesAny.some((q=>this.match(q,X.Any,z))):K!==X.Any}static matchAll(q,K,z){return q.matchesAll?q.matchesAll.every((q=>this.match(q,X.All,z))):K!==X.Any}static matchConditions(q,K,z){return q.conditions?pt.checkConditions(q.conditions,K,z):K!==X.Any}static failureMessage(){Z.VyI.log("The rules engine failed to determine a success output.",Z.$bb.Error)}}},58707:(q,K,z)=>{"use strict";z.d(K,{b:()=>ot});var Y=z(8674),Q=z(62459),X=z(10471),Z=z(223),J=z(66582),tt=z(35120),et=z(28559),it=z(67665),st=z(76277),nt=z(13956),at=z(95057),rt=z(64353);let ot=class extends Q.uAl{constructor(){super(...arguments),this._tooltipConfig=et.f}destroy(){this.tryDismissTooltip(),super.destroy()}setTooltipConfig(q){this._tooltipConfig=q}setMemberAdConfig(q){this._memberAdConfig=q}handleNotEnoughCurrency(q,K,z){const Y=this._loggedInPlayer.player.getMemberTier(),Q=this._loggedInPlayer.player.getCurrencyAmount(q.currency,q.type),et=q.value-Q;if(this._segment.item.sendInsufficientCurrencyEvent(q,{sink_type:K,sink_id:z}),!X.h.includes(q.currency)||this._loggedInPlayer.player.isPlayingAtSchool()||!(0,st.G)(Z.l).enabled&&J.kG.includes(Y)){const K=this._tooltipContainer.transform,z=Object.assign(Object.assign({},this._tooltipConfig),{textArgs:[et]}),Y=27===q.currency?"YOU_NEED_MORE_MAGICOIN":"YOU_NEED_MORE_CURRENCY";this._tooltipObject=tt.q.instance.prodigy.prefabFactory.createTooltip(K,Y,z)}else this._segment.purchase.sendFunnelStart({type:this._memberAdConfig.funnelTriggerType,category:this._memberAdConfig.funnelCategory,contentId:z,adType:at.R.UnifiedConversionFlow,adVersion:rt.P.getAdVersion(this._memberAdConfig.funnelName)}),tt.q.instance.prodigy.open.membershipInfo(void 0,{conversionFunnelName:this._memberAdConfig.funnelName,conversionStage:this._memberAdConfig.conversionStage,conversionStaticOrVideo:at.R.Static})}tryDismissTooltip(){var q;(null===(q=this._tooltipObject)||void 0===q?void 0:q.activeInHierarchy)&&(this._tooltipObject.destroyDeferred(),this._tooltipObject=void 0)}};(0,Y.Cg)([(0,nt.b)("20f-5f67"),(0,Y.Sn)("design:type",it.Y)],ot.prototype,"_segment",void 0),(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",Object)],ot.prototype,"_loggedInPlayer",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ot.prototype,"_tooltipContainer",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],ot.prototype,"_tooltipConfig",void 0),(0,Y.Cg)([(0,Q.vCS)(),(0,Y.Sn)("design:type",Object)],ot.prototype,"_memberAdConfig",void 0),ot=(0,Y.Cg)([(0,Q.EVk)("NotEnoughCurrencyResponseComponent",Q.YH6.ui)],ot)},64353:(q,K,z)=>{"use strict";z.d(K,{P:()=>et});var Y,Q=z(62459),X=z(24521),Z=z(35120),J=z(23029),tt=z(65088);!function(q){q.SchoolCTAGate="School CTA Gate",q.UnifiedConversionFlowTTUpsell="Unified Conversion Flow TT Upsell"}(Y||(Y={}));class et{static get unifiedConversionFlowRuleset(){return J.R.loadData(X.r.UnifiedConversionFlowRuleset_json)}static getAdVersion(q){const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(this.shouldUseUnifiedConversionFlow(q))return K.isPlayingAtSchool()?Y.SchoolCTAGate:Y.UnifiedConversionFlowTTUpsell}static getAdVersionFromTriggerCategory(q){const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(this.shouldUseUnifiedConversionFlowForTriggerCategory(q))return K.isPlayingAtSchool()?Y.SchoolCTAGate:Y.UnifiedConversionFlowTTUpsell}static shouldUseUnifiedConversionFlow(q){return Q.Aq$.isDefined(this.evaluateUnifiedConversionFlowRules(q))}static shouldUseUnifiedConversionFlowForTriggerCategory(q){switch(q){case"daily-login-calendar":case"Item-Equip":case"Bounty":case"Daily":case"Duels":case"HUD":case"Loot-Dash":case"Mailbox":case"Map-Transition":case"Member-Jar":case"Minigame-Boost":case"mythics":case"Pet-Gear":case"Pet-Merge":case"Reward":case"Rifts":case"segmented-offers":case"Social":case"Star-Jar":case"Store":case"World":case"Zone-Lock":case"Treasure-Track":return!0;case"Deprecate":case"Pet-Slots":case"Pet":default:return!1}}static evaluateUnifiedConversionFlowRules(q){return tt.H.evaluate(q,this.unifiedConversionFlowRuleset)}}},7259:(q,K,z)=>{"use strict";z.d(K,{y:()=>et});var Y=z(8674),Q=z(78465),X=z.n(Q),Z=z(35120),J=z(34829),tt=z(23034);class et{static showPrompt(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=et.addCustomCSS(),{value:Y}=yield X().fire({titleText:q,input:"text",inputValue:K,showCancelButton:!0,position:"bottom",buttonsStyling:!1,reverseButtons:!0,customClass:{popup:"externalPromptPopup",confirmButton:"externalPromptConfirm",cancelButton:"externalPromptCancel",actions:"externalPromptActions",title:"externalPromptTitle",input:"externalPromptInput"}});return et.removeCustomCSS(z),Y}))}static showTextareaPrompt(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=et.addCustomCSS(),{value:Q}=yield X().fire({titleText:q,allowOutsideClick:!1,input:"textarea",inputAttributes:{maxlength:`${z}`,resize:"none"},inputValue:K,showCancelButton:!0,position:"bottom",buttonsStyling:!1,reverseButtons:!0,customClass:{popup:"externalPromptPopup",confirmButton:"externalPromptConfirm",cancelButton:"externalPromptCancel",actions:"externalPromptActions",title:"externalPromptTitle",input:"externalPromptInput"}});return et.removeCustomCSS(Y),Q}))}static getSingleImageURL(q){const K=Z.q.instance.prodigy.assets.getAsset(`singleImage-${q}`),z=K.filename;return`${J.s.get("GameConstants.Build.ASSETS_LOCATION")}${tt.s.ASSET_FOLDER}/single-images/${z}/${K.v}/${z}.png`}static addCustomCSS(){const q=document.createElement("style");return q.innerHTML=`\n .externalPromptPopup {\n border-image: url('${this.getSingleImageURL(337)}');\n border-image-slice: 50 fill;\n border-image-width: 50px;\n background-color: transparent;\n height: 279px;\n width: 466px;\n }\n\n .externalPromptTitle {\n font: 400 24px 'ABeeZee';\n color: #363636;\n margin: 0;\n }\n\n .externalPromptInput {\n height: 56px;\n border-radius: 8px !important;\n border: 1px solid #363636 !important;\n font: 400 18px 'ABeeZee' !important;\n color: #363636 !important;\n }\n\n .externalPromptActions {\n margin-top: 5px;\n }\n\n .externalPromptConfirm {\n border-image: url('${this.getSingleImageURL(332)}');\n border-image-slice: ${this.BUTTON_HEIGHT/2} fill;\n border-image-width: ${this.BUTTON_HEIGHT/2}px;\n width: ${this.BUTTON_WIDTH}px;\n height: ${this.BUTTON_HEIGHT}px;\n font: 400 18px 'Paytone One';\n color: #FFFFFF;\n margin: 0px 8px 0px 8px;\n padding-bottom: 9px;\n }\n\n .externalPromptCancel {\n border-image: url('${this.getSingleImageURL(335)}');\n border-image-slice: ${this.BUTTON_HEIGHT/2} fill;\n border-image-width: ${this.BUTTON_HEIGHT/2}px;\n width: ${this.BUTTON_WIDTH}px;\n height: ${this.BUTTON_HEIGHT}px;\n font: 400 18px 'Paytone One';\n color: #363636;\n margin: 0px 8px 0px 8px;\n padding-bottom: 9px;\n }\n `,document.getElementsByTagName("head")[0].appendChild(q),q}static removeCustomCSS(q){document.getElementsByTagName("head")[0].removeChild(q)}}et.BUTTON_WIDTH=96,et.BUTTON_HEIGHT=60},78407:(q,K,z)=>{"use strict";z.d(K,{_:()=>J});var Y=z(8674),Q=z(79687),X=z(13956),Z=z(97200);let J=class{constructor(){this._hudData=void 0}getHudData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this._hudData||(this._hudData=yield this._networkHandler.getHudData()),this._hudData}))}initialize(q){this._hudData=q}};(0,Y.Cg)([(0,X.b)("ec2-91c9"),(0,Y.Sn)("design:type",Z.J)],J.prototype,"_networkHandler",void 0),J=(0,Y.Cg)([(0,Q.injectable)()],J)},97200:(q,K,z)=>{"use strict";z.d(K,{J:()=>Z});var Y=z(8674),Q=z(48417),X=z(76546);class Z extends X.D{getHudData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(Q.D.Hud.GetHudData,{})).buttonData}))}}},40579:(q,K,z)=>{"use strict";z.d(K,{W:()=>et});var Y=z(8674),Q=z(79687),X=z(89067),Z=z(35120),J=z(73797),tt=z(60228);let et=class{constructor(){this._cachedButtonBreadcrumbs={},this._cachedButtonLabels={},this._demandingExclusiveAttention=new Set,this._cachedButtonAlternateLabels={},this._broadcaster=Z.q.instance.game.broadcaster,this.updateCachedLabelData(X.ts.NonMember,{labelValue:(0,tt.Bz)(X.ts.NonMember)}),this.updateCachedLabelData(X.ts.CoreMember,{labelValue:(0,tt.Bz)(X.ts.CoreMember)}),this.updateCachedLabelData(X.ts.PlusMember,{labelValue:(0,tt.Bz)(X.ts.PlusMember)}),this.updateCachedLabelData(X.ts.UltraMember,{labelValue:(0,tt.Bz)(X.ts.UltraMember)})}postConstruct(){this._broadcaster.addAppListener(J.Y1.HighlightMapButton,(()=>{this.updateDemandsExclusiveAttention(X.ts.Map,!0)}),this,J.HG.HUD,!0),this._broadcaster.addAppListener(J.Y1.HUDRevampDemandAttention,(q=>{this.updateDemandsExclusiveAttention(q,!0)}),this,void 0,!0),this._broadcaster.addAppListener(J.Y1.HUDRevampEndOperation,(()=>{const q=[...this._demandingExclusiveAttention];this._demandingExclusiveAttention.clear();for(const K of q)this._broadcaster.broadcast(J.Y1.HUDRevampButtonDataUpdated,void 0,[K]);this._broadcaster.broadcast(J.Y1.HUDRevampExclusiveAttentionChanged,void 0,[!1])}),this,void 0,!0)}getCachedButtonData(q){return{demandsExclusiveAttention:this._demandingExclusiveAttention.has(q),notificationData:this._cachedButtonBreadcrumbs[q],alternateLabel:this._cachedButtonAlternateLabels[q],labelData:this.formatLabelDataAsConfig(this._cachedButtonLabels[q])}}formatLabelDataAsConfig(q){return"object"==typeof q?{labelValue:q.labelValue,pillColour:q.pillColour}:{labelValue:q}}updateNotificationBadge(q,K){this._cachedButtonBreadcrumbs[q]=K,this._broadcaster.broadcast(J.Y1.HUDRevampButtonDataUpdated,void 0,[q])}updateCachedLabelData(q,K){this._cachedButtonLabels[q]=K,this._broadcaster.broadcast(J.Y1.HUDRevampButtonDataUpdated,void 0,[q])}updateDemandsExclusiveAttention(q,K){const z=this._demandingExclusiveAttention.size>0;K?this._demandingExclusiveAttention.add(q):this._demandingExclusiveAttention.delete(q);const Y=this._demandingExclusiveAttention.size>0;this._broadcaster.broadcast(J.Y1.HUDRevampButtonDataUpdated,void 0,[q]),z!==Y&&this._broadcaster.broadcast(J.Y1.HUDRevampExclusiveAttentionChanged,void 0,[Y])}updateSecondaryLabel(q,K){this._cachedButtonAlternateLabels[q]=K,Z.q.instance.game.broadcaster.broadcast(J.Y1.HUDRevampButtonDataUpdated,void 0,[q])}};(0,Y.Cg)([(0,Q.postConstruct)(),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],et.prototype,"postConstruct",null),et=(0,Y.Cg)([(0,Q.injectable)(),(0,Y.Sn)("design:paramtypes",[])],et)},67818:(q,K,z)=>{"use strict";z.d(K,{i:()=>it});var Y=z(8674),Q=z(62459),X=z(91207),Z=z(77938),J=z(28152),tt=z(34603),et=z(29834);let it=class extends Q.uAl{constructor(){super(...arguments),this.onIconLoaded=new Q.HN0,this._updateHasBeenCalled=!1}get itemID(){return this._itemID}get isLoaded(){return this._iconTarget.isLoaded}create(){super.create(),this._updateHasBeenCalled||this.updateIconImage()}setItem(q,K,z=!1){this._itemAssetType!==q||this._itemID!==K?(this._itemAssetType=q,this._itemID=K,this.updateIconImage()):z&&this.onIconLoaded.dispatch()}setItemAssetType(q){this._itemAssetType!==q&&(this._itemAssetType=q,this.updateIconImage())}setItemID(q){this._itemID!==q&&(this._itemID=q,this.updateIconImage())}setIconTarget(q){this._iconTarget=q,this.updateIconImage()}updateIconImage(){if(this._updateHasBeenCalled=!0,Q.Aq$.isDefined(this._itemAssetType)&&("gold"===this._itemAssetType||Q.Aq$.isDefined(this._itemID)))switch(this._morphMarbleSpine&&(this._morphMarbleSpine.GameObject.active=!1),this._iconTarget.OnLoaded.addOnce(this.onIconLoaded.dispatch,this.onIconLoaded),this._itemAssetType){case"gold":this._iconTarget.setAsset(X.E.getIconForType("currency",1)).catch(Q.RQr.createHandler("Could not set gold asset"));break;case"item":const q=Z.t.getItem(this._itemAssetType,this._itemID).data;q.effect&&Q.Aq$.isDefined(q.effect.transform)?(this._iconTarget.setAsset(X.E.getIconForType(q.effect.transform,q.effect.ID)).catch(Q.RQr.createHandler("Could not set item asset")),this._morphMarbleSpine&&(this._morphMarbleSpine.GameObject.active=!0,this._morphMarbleSpine.playAnimation("idle",!0))):this._iconTarget.setAsset(X.E.getIconForType(this._itemAssetType,this._itemID)).catch(Q.RQr.createHandler("Could not set item asset"));break;default:this._iconTarget.setAsset(X.E.getIconForType(this._itemAssetType,this._itemID)).catch(Q.RQr.createHandler("Could not set item asset"))}}destroy(){this.onIconLoaded.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(tt._),(0,Y.Sn)("design:type",tt._)],it.prototype,"_iconTarget",void 0),(0,Y.Cg)([(0,Q.MnK)(et.j),(0,Y.Sn)("design:type",et.j)],it.prototype,"_morphMarbleSpine",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],it.prototype,"_itemAssetType",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],it.prototype,"_itemID",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],it.prototype,"onIconLoaded",void 0),it=(0,Y.Cg)([(0,Q.EVk)("ItemAssetIcon",J.Y.ui)],it)},98762:(q,K,z)=>{"use strict";z.d(K,{U:()=>tt});var Y=z(8674),Q=z(62459),X=z(77938),Z=z(28152),J=z(67818);let tt=class extends Q.uAl{get itemID(){return this._itemID}get itemType(){return this._itemType}create(){super.create(),this._itemID&&this._itemType&&this.updateItemInfo()}init(q,K){this._itemType=q,this._itemID=K,this.updateItemInfo()}updateItemInfo(){var q;const K=null===(q=X.t.getItem(this._itemType,this._itemID))||void 0===q?void 0:q.data;K?(this._name.text=K.name,this._icon.setItem(this._itemType,this._itemID)):Q.VyI.log(`Invalid or missing item data found for itemType ${this._itemType}, itemID ${this._itemID}`,Q.$bb.Warning)}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_itemID",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],tt.prototype,"_itemType",void 0),(0,Y.Cg)([(0,Q.MnK)(J.i),(0,Y.Sn)("design:type",J.i)],tt.prototype,"_icon",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],tt.prototype,"_name",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("ItemIconAndName",Z.Y.ui)],tt)},57324:(q,K,z)=>{"use strict";z.d(K,{m:()=>tt});var Y=z(8674),Q=z(62459),X=z(83133),Z=z(28152),J=z(98762);let tt=class extends Q.uAl{constructor(){super(...arguments),this._itemCards=[],this.itemSelected=new Q.HN0}create(){super.create(),this._itemCards.forEach((q=>{const K=q.findComponent(J.U);q.findComponent(X.l).onSelected.add((()=>{this.itemSelected.dispatch(K.itemType,K.itemID)}))}))}setItems(q){this._itemCards.length===q.length?this._itemCards.forEach(((K,z)=>{K.findComponent(J.U).init(q[z].type,q[z].ID)})):Q.VyI.log(`Attempted to set ${q.length} items for ${this._itemCards.length} cards`,Q.$bb.Error)}destroy(){this.itemSelected.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],tt.prototype,"_itemCards",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"itemSelected",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("ItemSelector",Z.Y.ui)],tt)},59503:(q,K,z)=>{"use strict";z.d(K,{H:()=>Q,f:()=>J});var Y,Q,X=z(8674),Z=z(62459);!function(q){q.Top="top",q.Bottom="bottom",q.Left="left",q.Right="right"}(Q||(Q={}));let J=Y=class extends Z.uAl{constructor(){super(...arguments),this._direction=Q.Top,this._offset=0,this._fitOnCreate=!0,this._considerTargetBounds=!1,this.onPostFit=new Z.HN0}postCreate(){var q;super.postCreate(),this._rectTransform=this.gameObject.findComponent(Z.XVE),this._rectTransform?(this._fitOnCreate&&this._target&&this.fit(),null===(q=this._target)||void 0===q||q.transform.onWorldMatrixChanged.add(this.fit,this)):Z.VyI.log(`FitToTargetComponent: No RectTransform found on ${this.gameObject.name}`,Z.$bb.Error)}destroy(){var q;this.onPostFit.dispose(),super.destroy(),null===(q=this._target)||void 0===q||q.transform.onWorldMatrixChanged.remove(this.fit,this)}fit(){var q,K,z;if(!this._target)return void Z.VyI.log(`FitToTargetComponent: No target set on ${this.gameObject.name}`,Z.$bb.Warning);if(!this._rectTransform)return void Z.VyI.log(`FitToTargetComponent: No RectTransform found on ${this.gameObject.name}`,Z.$bb.Error);if((null===(q=this.gameObject.parent)||void 0===q?void 0:q.transform)instanceof Z.XVE){const q=this.gameObject.parent.transform;this._rectTransform.setAnchorMin(q.pivot.x,q.pivot.y),this._rectTransform.setAnchorMax(q.pivot.x,q.pivot.y)}const X=this._target.transform.worldPosition,J=this._offset,tt=null!==(z=null===(K=this._bounds)||void 0===K?void 0:K.getBounds())&&void 0!==z?z:Y.defaultBounds,et=new Z.or0(this._rectTransform.fullWidth,this._rectTransform.fullHeight);let it;if(this._considerTargetBounds){const q=this._target.findComponent(Z.XVE);if(q){it=q.getBounds();const K=q.localMatrix.applyInverse({x:it.right,y:it.bottom});K.x+=X.x,K.y+=X.y,it.bottom=K.y,it.right=K.x;const z=q.localMatrix.applyInverse({x:it.left,y:it.top});z.x+=X.x,z.y+=X.y,it.top=z.y,it.left=z.x}}const{x:st,y:nt,pivot:at,finalDirection:rt}=this.findBestFitPosition(X,this._direction,J,tt,et,it);this._rectTransform.pivot.set(at.x,at.y);const ot=this.gameObject.parent.transform.worldMatrix.applyInverse({x:st,y:nt});this._rectTransform.setPosition(ot.x,ot.y);const ht=rt===Q.Top||rt===Q.Bottom?at.x:at.y;this.onPostFit.dispatch(rt,ht)}findBestFitPosition(q,K,z,Y,Q,X){let Z=0,J=0,tt={x:.5,y:.5};const et=this.getPositionForDirection(q,K,z,tt,X);if(Z=et.x,J=et.y,tt=et.pivot,this.fitsInBounds(Z,J,Q,tt,Y))return{x:Z,y:J,pivot:tt,finalDirection:K};const it=this.tryPerpendicularAdjustment(q,K,z,Y,Q,X);if(it.fits)return Object.assign(Object.assign({},it),{finalDirection:K});const st=this.getAlternateDirections(K);for(const nt of st){const K=this.getPositionForDirection(q,nt,z,tt,X);if(this.fitsInBounds(K.x,K.y,Q,K.pivot,Y))return Object.assign(Object.assign({},K),{finalDirection:nt});const Z=this.tryPerpendicularAdjustment(q,nt,z,Y,Q,X);if(Z.fits)return Object.assign(Object.assign({},Z),{finalDirection:nt})}return{x:Z,y:J,pivot:tt,finalDirection:K}}getPositionForDirection(q,K,z,Y,X){let J;return K===Q.Top?J=X?{x:.5*(X.left+X.right),y:(null==X?void 0:X.top)-z,pivot:{x:.5,y:1}}:{x:q.x,y:q.y-z,pivot:{x:.5,y:1}}:K===Q.Left?J=X?{x:(null==X?void 0:X.left)-z,y:.5*(X.top+X.bottom),pivot:{x:1,y:.5}}:{x:q.x-z,y:q.y,pivot:{x:1,y:.5}}:K===Q.Right?J=X?{x:(null==X?void 0:X.right)+z,y:.5*(X.top+X.bottom),pivot:{x:0,y:.5}}:{x:q.x+z,y:q.y,pivot:{x:0,y:.5}}:K===Q.Bottom&&(J=X?{x:.5*(X.left+X.right),y:(null==X?void 0:X.bottom)+z,pivot:{x:.5,y:0}}:{x:q.x,y:q.y+z,pivot:{x:.5,y:0}}),J||(Z.VyI.log(`FitToTargetComponent: Unknown direction ${K} on ${this.gameObject.name}`,Z.$bb.Error),{x:q.x,y:q.y,pivot:Object.assign({},Y)})}fitsInBounds(q,K,z,Y,Q){const X=q-z.width*Y.x,Z=q+z.width*(1-Y.x),J=K-z.height*Y.y,tt=K+z.height*(1-Y.y);return X>=Q.left&&Z<=Q.right&&J>=Q.top&&tt<=Q.bottom}tryPerpendicularAdjustment(q,K,z,Y,X,Z){const J=this.getPositionForDirection(q,K,z,{x:.5,y:.5},Z),tt=J.x,et=J.y,it=Object.assign({},J.pivot);if(K===Q.Top||K===Q.Bottom){const q=tt-X.width*it.x,K=tt+X.width*(1-it.x);if(qY.right){const q=K-Y.right;it.x=Math.max(0,Math.min(1,it.x+q/X.width))}}else{const q=et-X.height*it.y,K=et+X.height*(1-it.y);if(qY.bottom){const q=K-Y.bottom;it.y=Math.max(0,Math.min(1,it.y+q/X.height))}}return{x:tt,y:et,pivot:it,fits:this.fitsInBounds(tt,et,X,it,Y)}}getAlternateDirections(q){return Y._DIRECTION_ALTERNATES[q]||[Q.Top,Q.Bottom,Q.Left,Q.Right]}setTarget(q,K=!0){this._target=q,K&&this.fit()}setBounds(q,K=!0){this._bounds=q,K&&this.fit()}};J.defaultBounds={left:0,right:Z.Zt2.DEFAULT_WIDTH,top:0,bottom:Z.Zt2.DEFAULT_HEIGHT},J._DIRECTION_ALTERNATES={[Q.Top]:[Q.Bottom,Q.Left,Q.Right],[Q.Bottom]:[Q.Top,Q.Left,Q.Right],[Q.Left]:[Q.Right,Q.Top,Q.Bottom],[Q.Right]:[Q.Left,Q.Top,Q.Bottom]},(0,X.Cg)([(0,Z.ERr)(),(0,X.Sn)("design:type",Z._mx)],J.prototype,"_target",void 0),(0,X.Cg)([(0,Z.MnK)(Z.XVE),(0,X.Sn)("design:type",Z.XVE)],J.prototype,"_bounds",void 0),(0,X.Cg)([(0,Z.gfw)(Q),(0,X.Sn)("design:type",String)],J.prototype,"_direction",void 0),(0,X.Cg)([(0,Z.g11)(),(0,X.Sn)("design:type",Number)],J.prototype,"_offset",void 0),(0,X.Cg)([(0,Z.vkK)(),(0,X.Sn)("design:type",Boolean)],J.prototype,"_fitOnCreate",void 0),(0,X.Cg)([(0,Z.vkK)(),(0,X.Sn)("design:type",Boolean)],J.prototype,"_considerTargetBounds",void 0),(0,X.Cg)([(0,Z.bbQ)(),(0,X.Sn)("design:type",Z.HN0)],J.prototype,"onPostFit",void 0),(0,X.Cg)([(0,Z.GO0)(),(0,X.Sn)("design:type",Function),(0,X.Sn)("design:paramtypes",[]),(0,X.Sn)("design:returntype",void 0)],J.prototype,"fit",null),J=Y=(0,X.Cg)([(0,Z.EVk)("FitToTarget")],J)},86050:(q,K,z)=>{"use strict";z.d(K,{$:()=>J});var Y=z(62459),Q=z(35120),X=z(5365),Z=z(95130);class J extends Z.D{get state(){return this._state}constructor(q,K){super(q,K),this.onClickCallback=null,this.onUpCallback=null,this.onOverCallback=null,this.onOutCallback=null,this.onClickDisabled=new Y.HN0,this.defaultY=0,this.hoverLiftDistance=3,this.internalHoverHitArea=new Y.M_G(0,0,80,80),this.broadcasts=[],this.collisionBlock=null,this.disableInput=!1,this._state=X.w.up,this.isActive=!0,this.onDestroy.add((()=>{this.handleDestroy()}))}populate(q){super.populate(q),this.onClickCallback=null,this.onUpCallback=null,this.onOverCallback=null,this.onOutCallback=null,this.defaultY=this.y,this.hoverLiftDistance=Y.Aq$.isDefined(q.hoverLiftDistance)?q.hoverLiftDistance:3,this.internalHoverHitArea.height=J.internalHitArea.height+this.hoverLiftDistance,this.broadcasts=q.broadcasts,this.setupCollisionBlock(q)}setActive(q){super.setActive(q),this.y=this.defaultY,this.collisionBlock.hitArea=J.internalHitArea}setDisableInput(q){this.disableInput=q}onDown(){this.disableInput||this.visible&&(this.isActive?(this.y=this.defaultY,Q.q.instance.prodigy.audio.playSFX(18,"pop"),Y.Aq$.isDefined(this.onClickCallback)&&this.onClickCallback(),this.broadcastAll(),this._state=X.w.down):this.onClickDisabled.dispatch())}setInputBlockPriority(q){Q.q.instance.prodigy.gameContainer.get("2f9-57ba").setBlockType(this.collisionBlock.input,q)}setupCollisionBlock(q){this.collisionBlock=this.add(Q.q.instance.prodigy.create.emptySprite(0,0,q.width,q.height)),this.collisionBlock.alpha=0,this.collisionBlock.hitArea=J.internalHitArea,this.collisionBlock.inputEnabled=!0,this.collisionBlock.events.onInputDown.add((()=>{this.onDown()})),this.collisionBlock.events.onInputUp.add((()=>{this.onUp()})),this.collisionBlock.events.onInputOver.add((()=>{this.onOver()})),this.collisionBlock.events.onInputOut.add((()=>{this.onOut()}))}broadcastAll(){Y.Aq$.isDefined(this.broadcasts)&&this.broadcasts.forEach((q=>{this.game.broadcaster.broadcast(q.type,Q.q.instance.prodigy.open.menus[Q.q.instance.prodigy.open.menus.length-1],q.params)}))}onUp(){this.disableInput||this.visible&&this.isActive&&(this.y=this.defaultY-this.hoverLiftDistance,Y.Aq$.isDefined(this.onUpCallback)&&this.onUpCallback(),this._state=X.w.up)}onOver(){this.disableInput||this.visible&&this.isActive&&(this.y=this.defaultY-this.hoverLiftDistance,this.collisionBlock.hitArea=this.internalHoverHitArea,Y.Aq$.isDefined(this.onOverCallback)&&this.onOverCallback(),this._state=X.w.over)}onOut(){this.visible&&this.isActive&&(this.y=this.defaultY,this.collisionBlock.hitArea=J.internalHitArea,Y.Aq$.isDefined(this.onOutCallback)&&this.onOutCallback())}handleDestroy(){this.onClickDisabled.dispose()}}J.internalHitArea=new Y.M_G(0,0,80,80)},28962:(q,K,z)=>{"use strict";var Y;z.d(K,{z:()=>Y}),function(q){q[q.DEFAULT=1]="DEFAULT",q[q.LOCOMOTION=2]="LOCOMOTION",q[q.LOBBY=4]="LOBBY",q[q.SYSTEM_INFO=8]="SYSTEM_INFO",q[q.REAR_OVERLAY=16]="REAR_OVERLAY",q[q.AIMING_OVERLAY=32]="AIMING_OVERLAY"}(Y||(Y={}))},57128:(q,K,z)=>{"use strict";var Y;z.d(K,{h:()=>Y}),function(q){q.Top="-top",q.Bottom="-bottom",q.Left="-left",q.Right="-right",q.Middle="-middle",q.TopLeft="-topLeft",q.TopRight="-topRight",q.BottomLeft="-bottomLeft",q.BottomRight="-bottomRight"}(Y||(Y={}))},31091:(q,K,z)=>{"use strict";z.d(K,{g:()=>tt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(25456),J=z(28152);let tt=class extends Z.l{updateContentView(q){this._data=q,this._base.GameObject.findComponentsInChildren(Q.EYj).forEach((K=>K.text=q.title)),q.alreadySelected&&(this.setSelected(!0),q.onClick(this)),this.onClick.add((()=>{q.onClick(this),X.q.instance.prodigy.audio.playSFX(18,"pop")}))}getName(){return this._data.title}};tt=(0,Y.Cg)([(0,Q.EVk)("FirstNameCellPrefab",J.Y.ui)],tt)},24536:(q,K,z)=>{"use strict";z.d(K,{v:()=>J});var Y=z(62459),Q=z(35120),X=z(88022),Z=z(42413);class J extends Z.g{constructor(q,K){super(q,K),this.image=null}populate(q){const K=Y.Aq$.isDefined(q.frameName)?q.frameName:"";let z=q.atlasName;Y.Aq$.isDefined(q.singleImageID)?z=`singleImage-${q.singleImageID}`:Y.Aq$.isDefined(q.atlasName)||(z=Y.Aq$.isDefined(q.atlasID)?`atlas-${q.atlasID}`:X._.Ui_shared_json),this.createImage(z,K),super.populate(q),Y.Aq$.isDefined(q.tint)&&(this.image.tint=q.tint),Y.Aq$.isDefined(q.horizontalFlip)&&q.horizontalFlip&&this.flipHorizontally()}createImage(q,K){this.image=this.add(Q.q.instance.prodigy.create.image(0,0,q,K)),Y.Aq$.isDefined(this.image.animations.frameData)||Y.VyI.log(`Image atlas ${q}, frame ${K} could not be loaded properly!`,Y.$bb.Warning)}setImageFrameName(q){this.image.animations.frameData.getFrameByName(q)?this.image.frameName=q:Y.VyI.log(`Could not set frame ${q}. The old frame ${this.image.frameName} will be kept.`,Y.$bb.Warning)}flipHorizontally(){this.image.pivot.set(this.image.width,0),this.image.scale.x*=-1}setActive(q){this.image.tint=q?16777215:5789784,super.setActive(q)}}},42413:(q,K,z)=>{"use strict";z.d(K,{g:()=>Q});var Y=z(95130);class Q extends Y.D{constructor(q,K){super(q,K)}createImage(q,K){}}},3788:(q,K,z)=>{"use strict";z.d(K,{B:()=>Q});var Y=z(62459);const Q={"8-20":{fontFamily:Y.dBt.ABeeZee,fontSize:20,fontWeight:"bold",fill:"#000000"},"9-48":{fontFamily:Y.dBt.PaytoneOne,fontSize:36,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,padding:4,forceCaps:!0,paddingTop:3},"9-36":{fontFamily:Y.dBt.PaytoneOne,fontSize:24,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,padding:4,forceCaps:!0,paddingTop:3},"10-16":{fontFamily:Y.dBt.ABeeZee,fontSize:16,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,letterSpacing:1,padding:4},"10-20":{fontFamily:Y.dBt.ABeeZee,fontSize:20,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:3,padding:3,letterSpacing:1},"10-30":{fontFamily:Y.dBt.ABeeZee,fontSize:30,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,padding:4},"10-40":{fontFamily:Y.dBt.ABeeZee,fontSize:40,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:5,padding:5},"10-80":{fontFamily:Y.dBt.ABeeZee,fontSize:80,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:6,padding:6},"157-0":{fontFamily:Y.dBt.PaytoneOne,fontSize:32,fill:"#ffffff",stroke:"#555555",lineJoin:"round",strokeThickness:3,dropShadow:!0,dropShadowColor:"#555555",dropShadowDistance:3,dropShadowAngle:Math.PI/4,dropShadowBlur:0,padding:3,paddingTop:-4},"157-1":{fontFamily:Y.dBt.PaytoneOne,fontSize:64,fill:"#ffffff",stroke:"#800000",lineJoin:"round",strokeThickness:3,dropShadow:!0,dropShadowColor:"#800000",dropShadowDistance:6,dropShadowAngle:Math.PI/4,dropShadowBlur:0,padding:3},"157-20":{fontFamily:Y.dBt.PaytoneOne,fontSize:20,fill:"#ffffff",stroke:"#555555",lineJoin:"round",strokeThickness:3,dropShadow:!0,dropShadowColor:"#555555",dropShadowDistance:3,dropShadowAngle:Math.PI/4,dropShadowBlur:0,padding:3,paddingTop:-4}}},14088:(q,K,z)=>{"use strict";z.d(K,{h:()=>tt});var Y=z(62459),Q=z(35120),X=z(77938),Z=z(95130),J=z(48951);class tt extends Z.D{constructor(q,K,z,X=[]){super(q,z),this.uiJsonId=K,this.onLoadComplete=new Y.HN0,null!==K&&Q.q.instance.prodigy.load.assets(X,this.renderMenu.bind(this))}getUiElement(q){let K=null;for(let z=0;z{"use strict";z.d(K,{w:()=>J,Z:()=>it});var Y=z(62459),Q=z(35120),X=z(30442);class Z{get image(){return this._image}constructor(q,K=0,z=0,Q,Z,J,tt,et,it,st){this.type=1,this.physicsType=0,this.onOverSound=null,this.onOutSound=null,this.onDownSound=null,this.onUpSound=null,this.onOverSoundMarker="",this.onOutSoundMarker="",this.onDownSoundMarker="",this.onUpSoundMarker="",this.onInputOver=new Y.HN0,this.onInputOut=new Y.HN0,this.onInputDown=new Y.HN0,this.onInputUp=new Y.HN0,this.onOverMouseOnly=!0,this.justReleasedPreventsOver=2,this.freezeFrames=!1,this.forceOut=!1;const nt=null!=J?J:this;this.forceOut=!1,this._image=new X.k(q,K,z,Q,et),this._image.inputEnabled=!0,this._image.input.start(0,!0),this._image.input.useHandCursor=!0,this.setFrames(tt,et,it,st),Z&&this.onInputUp.add(Z,nt),this._image.events.onInputOver.add(this.onInputOverHandler,this),this._image.events.onInputOut.add(this.onInputOutHandler,this),this._image.events.onInputDown.add(this.onInputDownHandler,this),this._image.events.onInputUp.add(this.onInputUpHandler,this)}getBounds(){var q;return null===(q=this._image)||void 0===q?void 0:q.getBounds()}clearFrames(){this.setFrames(null,null,null,null)}setStateFrame(q,K,z){const Y=`on${q}Frame`;null!==K?(this[Y]=K,z&&this.changeStateFrame(q)):this[Y]=null}changeStateFrame(q){if(this.freezeFrames)return!1;const K=this[`on${q}Frame`];return!!Y.Aq$.isDefined(K)&&(this._image.setTexture(null,K),!0)}setFrames(q,K,z,Y){this.setStateFrame(Z.STATE_OVER,q,this._image.input.pointerOver()),this.setStateFrame(Z.STATE_OUT,K,!this._image.input.pointerOver()),this.setStateFrame(Z.STATE_DOWN,z,this._image.input.pointerDown()),this.setStateFrame(Z.STATE_UP,Y,this._image.input.pointerUp())}setStateSound(q,K,z=""){const Y=`on${q}Sound`,Q=`on${q}SoundMarker`;K?(this[Y]=K,this[Q]="string"==typeof z?z:""):(this[Y]=null,this[Q]="")}playStateSound(q){const K=this[`on${q}Sound`];if(K){const z=this[`on${q}SoundMarker`];return K.play(z),!0}return!1}setSounds(q,K,z,Y,Q,X,J,tt){this.setStateSound(Z.STATE_OVER,q,K),this.setStateSound(Z.STATE_OUT,Q,X),this.setStateSound(Z.STATE_DOWN,z,Y),this.setStateSound(Z.STATE_UP,J,tt)}setOverSound(q,K){this.setStateSound(Z.STATE_OVER,q,K)}setOutSound(q,K){this.setStateSound(Z.STATE_OUT,q,K)}setDownSound(q,K){this.setStateSound(Z.STATE_DOWN,q,K)}setUpSound(q,K){this.setStateSound(Z.STATE_UP,q,K)}onInputOverHandler(q,K){K.justReleased()&&(this.justReleasedPreventsOver&K.pointerMode)===K.pointerMode||(this.changeStateFrame(Z.STATE_OVER),this.onOverMouseOnly&&!K.isMouse||(this.playStateSound(Z.STATE_OVER),this.onInputOver&&this.onInputOver.dispatch(this,K)))}onInputOutHandler(q,K){this.changeStateFrame(Z.STATE_OUT),this.playStateSound(Z.STATE_OUT),this.onInputOut&&this.onInputOut.dispatch(this,K)}onInputDownHandler(q,K){this.changeStateFrame(Z.STATE_DOWN),this.playStateSound(Z.STATE_DOWN),this.onInputDown&&this.onInputDown.dispatch(this,K)}onInputUpHandler(q,K,z){if(this.playStateSound(Z.STATE_UP),this.onInputUp&&this.onInputUp.dispatch(this,K,z),!this.freezeFrames)if(!0===this.forceOut||(1&K.pointerMode)===K.pointerMode)this.changeStateFrame(Z.STATE_OUT);else{this.changeStateFrame(Z.STATE_UP)||(z?this.changeStateFrame(Z.STATE_OVER):this.changeStateFrame(Z.STATE_OUT))}}cleanUp(){this.onInputOver.dispose(),this.onInputOut.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose()}}Z.STATE_OVER="Over",Z.STATE_OUT="Out",Z.STATE_DOWN="Down",Z.STATE_UP="Up";var J,tt=z(24536),et=z(95130);!function(q){q.up="up",q.down="down",q.over="over"}(J||(J={}));class it extends et.D{constructor(){super(...arguments),this.button=null,this.onUpCallback=null,this.onDownCallback=null,this.onOverCallback=null,this.onOutCallback=null,this.upStateGraphic=null,this.overStateGraphic=null,this.downStateGraphic=null,this.buttonTextGraphic=null,this.isActive=!0,this._state=J.up,this.defaultY=0,this.downStateName=null,this.overStateName=null,this.upStateName=null,this.buttonTextName=null,this.hoverLiftDistance=0,this.textOffset=3,this.isToggle=!1}get state(){return this._state}populate(q){super.populate(q),this.defaultY=this.y,this.downStateName=q.downStateName,this.overStateName=q.overStateName,this.upStateName=q.upStateName,this.buttonTextName=q.buttonTextName,this.hoverLiftDistance=q.hoverLiftDistance,Y.Aq$.isDefined(q.textOffset)&&(this.textOffset=q.textOffset),this.isToggle=q.toggle,this.renderMenu(q)}getStateGraphics(){for(const q of this.children){const K=q.name;Y.Aq$.isDefined(K)&&(K===this.upStateName&&(this.upStateGraphic=q,this.upDefaultY=this.upStateGraphic.y),K===this.downStateName&&(this.downStateGraphic=q,this.downDefaultY=this.downStateGraphic.y),K===this.overStateName&&(this.overStateGraphic=q,this.overDefaultY=this.overStateGraphic.y),K===this.buttonTextName&&(this.buttonTextGraphic=q,this.textDefaultY=this.buttonTextGraphic.y))}}postPopulate(){this.getStateGraphics(),this.setButtonState(J.up)}renderMenu(q){this.button=new Z(this.game,0,0,q.ImageKey,null,this,q.overFrame,q.outFrame,q.downFrame,q.upFrame),this.button.image.width=q.width,this.button.image.height=q.height,this.button.onInputDown.add(this.onDown.bind(this)),this.button.onInputUp.add(this.onUp.bind(this)),this.button.onInputOver.add(this.onOver.bind(this)),this.button.onInputOut.add(this.onOut.bind(this)),this.button.setSounds(q.overSound,"",q.downSound,"",q.outSound,"",q.upSound,""),this.add(this.button.image)}setButtonState(q){this._state=q;let K=q;if(this.downStateGraphic||q!==J.down||(K=J.up),this.overStateGraphic||q!==J.over||(K=J.up),this.upStateGraphic&&this.upStateGraphic.exists)switch(this.upStateGraphic.visible=K===J.up,this.downStateGraphic&&(this.downStateGraphic.visible=K===J.down),this.overStateGraphic&&(this.overStateGraphic.visible=K===J.over),this.upStateGraphic.y=this.upDefaultY,this.downStateGraphic&&(this.downStateGraphic.y=this.downDefaultY),this.overStateGraphic&&(this.overStateGraphic.y=this.overDefaultY),this.buttonTextGraphic.y=this.textDefaultY,q){case J.down:this.downStateGraphic&&(this.downStateGraphic.y-=this.hoverLiftDistance,this.buttonTextGraphic.y+=this.textOffset);break;case J.over:this.buttonTextGraphic.y-=this.hoverLiftDistance,this.upStateGraphic.y-=this.hoverLiftDistance,this.overStateGraphic&&(this.overStateGraphic.y-=this.hoverLiftDistance)}}toggleActive(){this.isActive=!this.isActive,this.exists&&(this.y=this.defaultY)}onDown(){this.visible&&this.isActive&&(Q.q.instance.prodigy.audio.playSFX(18,"pop"),Y.Aq$.isDefined(this.onDownCallback)&&(this.onDownCallback(),this.isToggle&&this.toggleActive()),this.setButtonState(J.down))}onDownDisabled(){this.visible&&this.isActive&&this.setButtonState(J.down)}onUp(){this.visible&&this.isActive&&(Y.Aq$.isDefined(this.onUpCallback)&&this._state===J.down&&(this.onUpCallback(),this.isToggle&&this.toggleActive()),this.setButtonState(J.up))}onOver(){this.visible&&this.isActive&&(Y.Aq$.isDefined(this.onOverCallback)&&this.onOverCallback(),this.setButtonState(J.over))}onOut(){this.visible&&this.isActive&&(Y.Aq$.isDefined(this.onOutCallback)&&this.onOutCallback(),this.setButtonState(J.up))}setActive(q,K=null){if(this.button.image.inputEnabled=q,Y.Aq$.isDefined(K)){if(this.upStateGraphic instanceof tt.v)this.upStateGraphic.image.tint=K;else{const q=this.upStateGraphic.images;for(let z=0;z{"use strict";z.d(K,{A:()=>tt});var Y=z(62459),Q=z(35120),X=z(50664),Z=z(57128),J=z(95130);class tt extends J.D{set enableMask(q){this._enableMask=q,this.activeTrackMask.visible=q,this.activeTrack.mask=q?this.activeTrackMask:null}get enableMask(){return this._enableMask}constructor(q,K){super(q,K),this.maxThumbPositionOffset=0,this._enableMask=!0,this.activeTrackMask=null,this.onScrollChangeCallback=null}populate(q){const K=!Y.Aq$.isDefined(q.isInteractive)||q.isInteractive;this.thumbFrameName=Y.Aq$.isDefined(q.thumbFrameName)?q.thumbFrameName:"",this.activeTrackBaseFrameName=Y.Aq$.isDefined(q.activeTrackBaseFrameName)?q.activeTrackBaseFrameName:"",this.inactiveTrackBaseFrameName=Y.Aq$.isDefined(q.inactiveTrackBaseFrameName)?q.inactiveTrackBaseFrameName:"",this.endCapAtlasID=Y.Aq$.isDefined(q.endCapAtlasID)?q.endCapAtlasID:"",this.endCapFrameName=Y.Aq$.isDefined(q.endCapFrameName)?q.endCapFrameName:"",this.arrowFrameName=Y.Aq$.isDefined(q.arrowFrameName)?q.arrowFrameName:"",this.isVertical=!!Y.Aq$.isDefined(q.isVertical)&&q.isVertical,this.atlasID=Y.Aq$.isDefined(q.atlasID)?q.atlasID:144,this.clickPercentageMovement=Y.Aq$.isDefined(q.clickPercentageMovement)?q.clickPercentageMovement:.05,this.eventMode=K?"static":"none",this.hideInactive=!!Y.Aq$.isDefined(q.hideInactive)&&q.hideInactive,this.showHead=!!Y.Aq$.isDefined(q.showHead)&&q.showHead,this.thumbAnchor=Y.Aq$.isDefined(q.thumbAnchor)?q.thumbAnchor:{x:0,y:0};const z=Y.Aq$.isDefined(q.trackPadding)?q.trackPadding:0;super.populate(q);const Q={width:0,height:0};let X=1;const J=this.game.cache.getFrameData(`atlas-${this.atlasID}`);if(Y.Aq$.isDefined(J)){if(this.arrowFrameName){const q=J.getFrameByName(this.arrowFrameName);Y.Aq$.isDefined(q)&&(Q.width=q.width,Q.height=q.height)}if(this.activeTrackBaseFrameName){const q=J.getFrameByName(`${this.activeTrackBaseFrameName}${Z.h.Middle}`);Y.Aq$.isDefined(q)&&(X=q.height)}}Y.Aq$.isDefined(q.children)||(q.children=[],Q.width>0&&Q.height>0&&q.children.push({type:"Button",name:"lessButton",anchorX:this.isVertical?.5:0,anchorY:this.isVertical?1:.5,relativeX:this.isVertical?.5:0,relativeY:this.isVertical?1:.5,width:Q.width,height:Q.height,children:[{type:"Graphic",name:"lessButtonGraphic",atlasID:this.atlasID,frameName:this.arrowFrameName}]},{type:"Button",name:"moreButton",anchorX:this.isVertical?.5:1,anchorY:this.isVertical?0:.5,relativeX:this.isVertical?.5:1,relativeY:this.isVertical?0:.5,width:Q.width,height:Q.height,children:[{type:"Graphic",name:"moreButtonGraphic",atlasID:this.atlasID,frameName:this.arrowFrameName}]}),q.children.push({type:"SlicedGraphic",name:"inactiveTrack",anchorX:this.isVertical?.5:0,anchorY:this.isVertical?0:.5,x:this.isVertical?0:Q.width+z,y:this.isVertical?Q.height+z:null,relativeX:this.isVertical?.5:null,relativeY:this.isVertical?null:.5,sliceType:"threeScale",isVertical:this.isVertical,atlasID:this.atlasID,baseFrameName:this.inactiveTrackBaseFrameName,width:this.isVertical?X:this.width-2*(Q.width+z),height:this.isVertical?this.height-2*(Q.height+z):X},{type:"SlicedGraphic",name:"activeTrack",anchorX:this.isVertical?.5:0,anchorY:this.isVertical?0:.5,x:this.isVertical?0:Q.width+z,y:this.isVertical?Q.height+z:0,relativeX:this.isVertical?.5:null,relativeY:this.isVertical?null:.5,sliceType:"threeScale",isVertical:this.isVertical,atlasID:this.atlasID,baseFrameName:this.activeTrackBaseFrameName,width:this.isVertical?X:this.width-2*(Q.width+z),height:this.isVertical?this.height-2*(Q.height+z):X}))}postPopulate(){if(this.children.forEach((q=>{"activeTrack"===q.name?this.activeTrack=q:"inactiveTrack"===q.name&&(this.inactiveTrack=q)})),this.isInteractive){this.setupButtons();const q=this.add(Q.q.instance.prodigy.create.emptySprite(0,0,this.activeTrack.width,this.activeTrack.height));q.alpha=0,q.x=this.activeTrack.x,q.y=this.activeTrack.y,q.inputEnabled=!0,q.events.onInputDown.add(this.onTrackClick.bind(this))}if(this.hideInactive&&(this.inactiveTrack.visible=!1),""===this.thumbFrameName?this.thumbSprite=Q.q.instance.prodigy.create.emptySprite(0,0):this.thumbSprite=Q.q.instance.prodigy.create.sprite(0,0,`atlas-${this.atlasID}`,this.thumbFrameName,this.thumbAnchor),this.thumbSprite.name="thumbSprite",this.thumbSprite.y=Y.Aq$.getCenteredXY(0,this.thumbSprite.height,0,this.activeTrack.y,0,this.activeTrack.height).y,""!==this.endCapAtlasID){const q=this.getMaxThumbPosition();this.add(Q.q.instance.prodigy.create.sprite(q.x,q.y,`atlas-${this.endCapAtlasID}`,this.endCapFrameName))}if(this.add(this.thumbSprite),this.showHead){const q=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.playerHead=Q.q.instance.prodigy.create.player(this.thumbSprite,q,1,25,105,!1,{isPreview:!0,headOnly:!0,hideMount:!0}),this.playerHead.startLoad()}this.clampThumbWithinTrack();const q=this.getMinThumbPosition(),K=this.getMaxThumbPosition(),z=new Y.M_G(this.isVertical?K.x:q.x,this.isVertical?K.y:q.y,this.isVertical?this.thumbSprite.width:this.activeTrack.width+this.thumbSprite.width,this.isVertical?this.activeTrack.height+this.thumbSprite.height:this.thumbSprite.height),Z=X.F.createBox(this.game,0,0,this.activeTrack.width,this.activeTrack.height,0,1);this.thumbSprite.addChild(Z),Z.x=this.isVertical?this.activeTrack.x-this.thumbSprite.x:-this.activeTrack.width,Z.y=this.isVertical?0:this.activeTrack.y-this.thumbSprite.y,Z.x+=this.isVertical?0:.5*this.thumbSprite.width,Z.y+=this.isVertical?.5*this.thumbSprite.height:0,this.activeTrack.mask=Z,this.activeTrackMask=Z,this.isInteractive&&(this.thumbSprite.inputEnabled=!0,this.thumbSprite.input.enableDrag(),this.thumbSprite.input.boundsRect=z,this.thumbSprite.events.onDragStop.add(this.onDragStop,this))}getActiveTrack(){return this.activeTrack}setupButtons(){let q,K;if(this.children.forEach((z=>{"lessButton"===z.name?q=z:"moreButton"===z.name&&(K=z)})),Y.Aq$.isDefined(q)){q.children.find((q=>"lessButtonGraphic"===q.name)).flipHorizontally(),q.onClickCallback=()=>{this.onLessButtonClick()}}Y.Aq$.isDefined(K)&&(K.onClickCallback=()=>{this.onMoreButtonClick()})}setPercentComplete(q,K=!1){this.setPercentCompleteOffset(q,0,K)}setPercentCompleteOffset(q,K,z=!1){this.maxThumbPositionOffset=K;const Q=this.isVertical?this.getMinThumbPosition().y:this.getMinThumbPosition().x,X=this.isVertical?this.getMaxThumbPosition().y:this.getMaxThumbPosition().x,Z=Y.cj9.linear(Q,X,q);if(this.thumbSprite.x=this.isVertical?this.thumbSprite.x:Z,this.thumbSprite.y=this.isVertical?Z:this.thumbSprite.y,!this.enableMask)if(this.isVertical){const K=Y.cj9.linear(0,this.inactiveTrack.height,q);this.activeTrack.height=K}else{const K=Y.cj9.linear(0,this.inactiveTrack.width,q);this.activeTrack.width=K}this.clampThumbWithinTrack(),this.thumbSprite.alpha=q>0||this.showHead?1:0,z||this.onScrollChange()}getPositionAtPercent(q){const K=this.isVertical?this.getMinThumbPosition().y:this.getMinThumbPosition().x,z=this.isVertical?this.getMaxThumbPosition().y:this.getMaxThumbPosition().x;return Y.cj9.linear(K,z,q)}adjustThumbPosition(q,K){this.thumbSprite.x+=q,this.thumbSprite.y+=K,this.clampThumbWithinTrack()}clampThumbWithinTrack(){const q=this.getMaxThumbPosition(!0),K=this.getMinThumbPosition();this.thumbSprite.x=Y.cj9.clamp(this.thumbSprite.x,K.x,q.x),this.thumbSprite.y=Y.cj9.clamp(this.thumbSprite.y,q.y,K.y)}onDragStop(){this.onScrollChange()}onTrackClick(q,K){const z=this.isVertical?K.y:K.x,Y=this.isVertical?q.world.y:q.world.x,Q=this.isVertical?q.y:q.x,X=this.isVertical?q.height:q.width,Z=this.isVertical?this.thumbSprite.height:this.thumbSprite.width,J=(z-Y)/X,tt=Math.floor(Q+X*J-.5*Z);this.isVertical?this.thumbSprite.y=tt:this.thumbSprite.x=tt,this.clampThumbWithinTrack(),this.onScrollChange()}onMoreButtonClick(){this.adjustThumbPosition(this.isVertical?0:this.activeTrack.width*this.clickPercentageMovement,this.isVertical?-this.activeTrack.height*this.clickPercentageMovement:0),this.onScrollChange()}onLessButtonClick(){this.adjustThumbPosition(this.isVertical?0:-this.activeTrack.width*this.clickPercentageMovement,this.isVertical?this.activeTrack.height*this.clickPercentageMovement:0),this.onScrollChange()}onScrollChange(){Y.Aq$.isDefined(this.onScrollChangeCallback)&&this.onScrollChangeCallback(this.getPercentageComplete())}getPercentageComplete(){const q=this.isVertical?this.thumbSprite.y:this.thumbSprite.x,K=this.isVertical?this.getMinThumbPosition().y:this.getMinThumbPosition().x,z=(this.isVertical?this.getMaxThumbPosition().y:this.getMaxThumbPosition().x)-K;let Y=1;return 0!==z&&(Y=(q-K)/z),Y}getMaxThumbPosition(q=!1){let K,z;return this.isVertical?(K=Y.Aq$.getCenteredXY(this.thumbSprite.width,0,this.activeTrack.x,0,this.activeTrack.width,0).x,z=this.activeTrack.y-.5*this.thumbSprite.height):(K=this.activeTrack.x+(this.enableMask?this.activeTrack.width:this.inactiveTrack.width)-.5*this.thumbSprite.width,z=Y.Aq$.getCenteredXY(0,this.thumbSprite.height,0,this.activeTrack.y,0,this.activeTrack.height).y),q||(K+=this.maxThumbPositionOffset,z+=this.maxThumbPositionOffset),{x:K,y:z}}getMinThumbPosition(){let q=0,K=0;return this.isVertical?(q=Y.Aq$.getCenteredXY(this.thumbSprite.width,0,this.activeTrack.x,0,this.activeTrack.width,0).x,K=this.activeTrack.y+(this.enableMask?this.activeTrack.height:this.inactiveTrack.height)-.5*this.thumbSprite.height):(q=this.activeTrack.x-.5*this.thumbSprite.width,K=Y.Aq$.getCenteredXY(0,this.thumbSprite.height,0,this.activeTrack.y,0,this.activeTrack.height).y),{x:q,y:K}}setActive3SlicedImage(q){this.activeTrack.images[0].frameName=`${q}${Z.h.Left}`,this.activeTrack.images[1].frameName=`${q}${Z.h.Right}`,this.activeTrack.images[2].frameName=`${q}${Z.h.Middle}`}destroy(q){Y.W$e.instance.game.tweens.removeAllFromOwner(this),super.destroy(q)}}},27625:(q,K,z)=>{"use strict";z.d(K,{I:()=>J});var Y=z(62459),Q=z(19273),X=z(70123),Z=z(95130);class J extends Z.D{populate(q){if(super.populate(q),this.spineRenderer=X.j.createRenderer(q.spineKey,{type:"spine"}),Y.Aq$.isDefined(q.animation)&&""!==q.animation){const K=!!Y.Aq$.isDefined(q.loop)&&q.loop;this.playAnimation(q.animation,K,null)}new Q._(this.game,this,[this.spineRenderer],0,0)}playAnimation(q,K=!1,z=null,Q=null){this.spineRenderer.playAnimation(q,K),Y.Aq$.isDefined(z)&&(Y.Aq$.isDefined(this.spineRenderer.spine)?this.spineRenderer.spine.onComplete.addOnce(z,Q):this.spineRenderer.onLoaded.addOnce((()=>{this.spineRenderer.spine.onComplete.addOnce(z,Q)})))}}},95130:(q,K,z)=>{"use strict";z.d(K,{D:()=>it});var Y=z(62459),Q=z(68910),X=z(35120),Z=z(34829),J=z(73797),tt=z(88022),et=z(26480);class it extends et.g{constructor(q,K){super(q,K),this.name="",this.layoutElement=null,this.dimensionPlaceholderImage=null,this.game=q,this.metricsManager=X.q.instance.prodigy.gameContainer.get("a92-c640"),this.metricsManager.objectCreated("UIElement"),this.onDestroy.add(this.handleUIDestroy.bind(this))}handleUIDestroy(){this.metricsManager.objectDestroyed("UIElement")}processRelativeFields(q,K){Y.Aq$.isDefined(q.relativeWidth)&&(q.width=Math.floor(K.width*q.relativeWidth)),Y.Aq$.isDefined(q.relativeHeight)&&(q.height=Math.floor(K.height*q.relativeHeight)),Y.Aq$.isDefined(q.relativeX)?q.x=Math.floor(K.width*q.relativeX):Y.Aq$.isDefined(q.x)||(q.x=0),Y.Aq$.isDefined(q.relativeY)?q.y=Math.floor(K.height*q.relativeY):Y.Aq$.isDefined(q.y)||(q.y=0),Y.Aq$.isDefined(q.scaleX)&&(this.scale.x=q.scaleX),Y.Aq$.isDefined(q.scaleY)&&(this.scale.y=q.scaleY),Y.Aq$.isDefined(q.visible)&&(this.visible=q.visible)}populate(q){let K=0,z=0;Y.Aq$.isDefined(q.name)&&(this.name=q.name),(Y.Aq$.isDefined(q.width)&&q.width>this.width||Y.Aq$.isDefined(q.height)&&q.height>this.height)&&(Y.Aq$.isDefined(this.dimensionPlaceholderImage)&&this.dimensionPlaceholderImage.destroy(),this.dimensionPlaceholderImage=X.q.instance.prodigy.create.image(0,0,void 0,void 0,Q.Texture.EMPTY),this.dimensionPlaceholderImage.width=this.dimensionPlaceholderImage.height=80,this.dimensionPlaceholderImage.alpha=0,this.add(this.dimensionPlaceholderImage),Y.Aq$.isDefined(q.width)&&(this.dimensionPlaceholderImage.width=q.width),Y.Aq$.isDefined(q.height)&&(this.dimensionPlaceholderImage.height=q.height)),Y.Aq$.isDefined(q.anchorX)&&(K=-Math.floor(q.anchorX*this.width)),Y.Aq$.isDefined(q.anchorY)&&(z=-Math.floor(q.anchorY*this.height)),Y.Aq$.isDefined(q.x)&&(this.x=q.x),Y.Aq$.isDefined(q.y)&&(this.y=q.y),this.x+=K,this.y+=z}postPopulate(){}setActive(q){this.isActive=q;for(let K=0;K{"use strict";z.d(K,{c:()=>Mt});var Y=z(62459),Q=z(86824),X=z(86050);class Z extends X.${constructor(){super(...arguments),this.currentToggleState=0,this.stateGraphics=[],this.buttonToggleGraphic=null}populate(q){super.populate(q);const K={anchorX:0,anchorY:0,relativeX:0,relativeY:0,type:"Graphic",name:"buttonToggleGraphic",atlasID:q.atlasID,frameName:0===q.defaultToggleState?q.frameNameOff:q.frameNameOn};Y.Aq$.isDefined(q.children)?q.children.unshift(K):q.children=[K],this.currentToggleState=q.defaultToggleState,this.stateGraphics=[{frameName:q.frameNameOff},{frameName:q.frameNameOn}]}postPopulate(){super.postPopulate(),this.updateToggleImage()}setOnClickCallback(q){this.onClickCallback=()=>{this.toggleState(),this.updateToggleImage(),Y.Aq$.isDefined(q)&&q(this.currentToggleState)}}toggleState(){this.currentToggleState=1-this.currentToggleState}toggleAndUpdateImage(){this.toggleState(),this.updateToggleImage()}updateToggleImage(){this.setGraphicFrameName(this.stateGraphics[this.currentToggleState])}setGraphicFrameName(q){Y.Aq$.isDefined(this.buttonToggleGraphic)||(this.buttonToggleGraphic=this.children.find((q=>"buttonToggleGraphic"===q.name))),this.buttonToggleGraphic.setImageFrameName(q.frameName)}}var J=z(24536),tt=z(35120),et=z(63119),it=z(95130);class st extends it.D{constructor(q,K){super(q,K),this.autoComplete=!1,this.onLostFocus=new Y.HN0,this.onTextChanged=new Y.HN0,this.isActive=!0,this.onDestroy.add(this.handleDestroy.bind(this))}populate(q){super.populate(q);const K=tt.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService);Y.Aq$.isDefined(q.textKey)&&(q.label=K.getText(q.textKey));const z=Y.Aq$.isDefined(q.isPassword)&&q.isPassword?"password":void 0;this.input=et.F.createInputField(this.game,this.parent,q.name,q.placeholderText,q.x,q.y,q.width,q.height,z),this.input.setLabel(this.parent,q.label),this.autoComplete||this.input.setAutoComplete(!1),this.input.enablePerKeyEvents(!0),this.input.onFocusChanged=q=>{q||this.onLostFocus.dispatch()},this.input.onTextChanged=()=>{this.onTextChanged.dispatch()},Y.Aq$.isDefined(q.forceUpperCase)&&q.forceUpperCase&&this.input.setAttribute("autocapitalize","on"),Y.Aq$.isDefined(q.fieldColour)&&this.input.setStyle("background-color",q.fieldColour)}handleDestroy(){this.onLostFocus.dispose(),this.onTextChanged.dispose()}setValue(q){this.input.setValue(q)}setVisible(q){this.input.setVisible(q),super.setVisible(q)}getValue(){return this.input.getValue()}}var nt=z(73797);class at extends Y.mcf{constructor(q,K,z){super(),this.dirty=!0,this.layoutType=null,this.alignment="top",this.spacing=0,this.startOffset=0,this.ignoreInvisible=!1,this.game=q,K&&K.addChild(this),this.layoutType=z.type,Y.Aq$.isDefined(z.alignment)&&(this.alignment=z.alignment),Y.Aq$.isDefined(z.spacing)&&(this.spacing=z.spacing),Y.Aq$.isDefined(z.offset)&&(this.startOffset=z.offset),Y.Aq$.isDefined(z.ignoreInvisible)&&(this.ignoreInvisible=z.ignoreInvisible),tt.q.instance.game.broadcaster.addAppListener(nt.n8.ChildAdded,this.parentModified.bind(this),this,this.parent,!1),tt.q.instance.game.broadcaster.addAppListener(nt.n8.ChildRemoved,this.parentModified.bind(this),this,this.parent,!1),this.calculateChildren()}calculateChildren(){this.dirty=!1,"vertical"===this.layoutType?this.alignVertical():"horizontal"===this.layoutType&&this.alignHorizontal()}alignVertical(){let q=this.startOffset;"center"===this.alignment?q+=Math.round((this.parent.height-this.getContentHeight())/2):"bottom"===this.alignment&&(q+=Math.round(this.parent.height-this.getContentHeight()));for(let K=0;K!0===q.visible));if(K){const z=K.gameObjects;if(z&&z.length>0)for(let K=0;K0&&Y.y<=Q.fullHeight&&(q.push(z[K]),this.objectsViewed.add(z[K]))}}}this.objectsInViewport=q}setElementVisibility(q,K){q.visible=K;const z=q.gameObjects;if(z)for(const Y of z)Y.active=K}stopDrag(q){lt.l.prototype.stopDrag.call(this.inputHandler.input,q),this.scrollStartPos=null,this.maxDistanceThisScroll<=this.clickDragThreshold&&(this.simulateMouseAction(q,1),this.simulateMouseAction(q,2)),this.maxDistanceThisScroll=0}checkOverlap(q,K){return Y.M_G.intersects(q,K)}setupMask(){this.rectMask=this.game.add.graphics(this.x,this.y),this.add(this.rectMask),this.rectMask.beginFill(0),this.rectMask.drawRect(0,0,this.viewWidth,this.viewHeight),this.rectMask.endFill(),this.inputHandler=this.game.add.graphics(this.x,this.y),this.add(this.inputHandler),this.inputHandler.beginFill(0,.001),this.inputHandler.drawRect(0,0,this.viewWidth,this.viewHeight),this.inputHandler.endFill(),this.contents.mask=this.rectMask,this.inputHandler.inputEnabled=!0;const q=this.inputHandler.input;q.enableDrag(!1),q.allowVerticalDrag=!0,q.updateDrag=this.dragView.bind(this),q.stopDrag=this.stopDrag.bind(this)}dragView(q){if(this.maxScrollDist<=0)return;Y.Aq$.isDefined(this.scrollStartPos)||(this.scrollStartPos=this.contents.y);const K=q.y-q.positionDown.y;let z=this.scrollStartPos+K;this.maxDistanceThisScroll=Math.max(this.maxDistanceThisScroll,Math.abs(K)),z<-1*this.maxScrollDist?z=-1*this.maxScrollDist:z>0&&(z=0),this.contents.y=Math.round(z),Y.Aq$.isDefined(this.scrollBar)&&this.scrollBar.setPercent(Math.abs(this.contents.y)/this.maxScrollDist),this.dirty=!0}simulateMouseAction(q,K){var z,Y;if(this.worldVisible){if(this.simulateElementsClick(q,K,this.contentsArray),this.overButton){const K=null===(z=this.overButton.getRootContainer())||void 0===z?void 0:z.children.find((q=>q.inputEnabled));K&&!this.elementContains(K,q.position)&&(this.overButton=null,K.events.onInputOut.dispatch(K,q))}for(const z of this.frameworkButtonsArray){const Q=null===(Y=z.getRootContainer())||void 0===Y?void 0:Y.children.find((q=>q.inputEnabled));if(Q&&this.elementContains(Q,q.position)){const Y=z.currentState;2===K&&2===this.lastPointerAction&&Y!==ut.K.Over?(this.overButton=z,Q.events.onInputOver.dispatch(Q,q)):1===K&&2===this.lastPointerAction?Q.events.onInputDown.dispatch(Q,q):2===K&&1===this.lastPointerAction&&Q.events.onInputUp.dispatch(Q,q),this.lastPointerAction=K}}}}simulateElementsClick(q,K,z){for(const Y of z){const z=Y instanceof X.$||Y instanceof ot.Z?Y:null;if(null==z?void 0:z.visible){const Q=this.elementContains(Y,q.position),X=z.state;if(!Q){z.onOut();continue}2===K&&2===this.lastPointerAction&&X!==ot.w.over?z.onOver():1===K&&2===this.lastPointerAction&&X!==ot.w.down?z.onDown():2===K&&1===this.lastPointerAction&&X!==ot.w.up&&z.onUp(),this.lastPointerAction=K}else Y.alpha>0&&Y.children&&this.simulateElementsClick(q,K,Y.children)}}elementContains(q,K){const z=q.getBounds();return Y.M_G.contains(z,K)}destroy(q={children:!0}){this.objectsInViewport.length=0,this.objectsViewed.clear(),this.clearScrollView(),super.destroy(q)}}var bt,pt,vt=z(24285),gt=z(42413),mt=z(88022),yt=z(91207),_t=z(3788),Et=z(57750);!function(q){q.Top="top",q.Center="center",q.Bottom="bottom"}(bt||(bt={}));class wt extends it.D{constructor(){super(...arguments),this.sprites=[],this.fontSize=20,this.textAlignment=Y.If$.Center,this.fontID=10,this.fontName="",this.lineHeight=null,this.monoSpace=10,this.iconOffsetY=0,this.forceUpperCase=!1,this.numberOfLines=1,this.verticalAlign=bt.Top,this.tint=16777215,this.icon=null}populate(q){super.populate(q),this.sprites=[],this.boundsWidth=Y.Aq$.isDefined(q.width)?q.width:this.game.width,this.fontSize=Y.Aq$.isDefined(q.fontSize)?q.fontSize:20,this.textAlignment=Y.Aq$.isDefined(q.horizontalAlignment)?q.horizontalAlignment:Y.If$.Center,this.fontID=Y.Aq$.isDefined(q.fontID)?q.fontID:10,this.fontName=`atlas-${this.fontID}`,this.lineHeight=q.lineHeight,this.monoSpace=q.monoSpace,this.iconOffsetY=Y.Aq$.isDefined(q.iconOffsetY)?q.iconOffsetY:0,this.forceUpperCase=!!Y.Aq$.isDefined(q.forceUpperCase)&&q.forceUpperCase,this.numberOfLines=1,this.verticalAlign=Y.Aq$.isDefined(q.verticalAlignment)?q.verticalAlignment:bt.Top,this.tint=Y.Aq$.isDefined(q.tint)?parseInt(q.tint):16777215,Y.Aq$.isDefined(q.text)?this.setText(q.text):Y.Aq$.isDefined(q.textKey)&&this.setText(tt.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText(q.textKey))}setText(q){if(!Y.Aq$.isDefined(this.game))return;let K=q;this.forceUpperCase&&(K=K.toUpperCase());let z=0,Q=null,X=0,Z=0,J=0;const et=[];let it=0;for(;itq===q.toLowerCase()))&&(q.fontSize=q.lowerSize),K=K.toUpperCase()),this._pixiText?(this._pixiText.style=q,this._pixiText.text=K):(this._pixiText=new dt.Text(K,q),this._pixiText.roundPixels=!0,this.addChild(this._pixiText)),this._pixiText.style.wordWrap=!0,this._pixiText.style.wordWrapWidth=this.boundsWidth,this.textAlignment){case Y.If$.Center:this._pixiText.anchor.set(.5,0),this._pixiText.x=this.boundsWidth/2;break;case Y.If$.Right:this._pixiText.anchor.set(1,0),this._pixiText.x=this.boundsWidth;break;default:this._pixiText.anchor.set(0,0),this._pixiText.x=0}switch(this.verticalAlign){case bt.Center:this._pixiText.anchor.set(this._pixiText.anchor.x,.5),this._pixiText.y=this.height/2;break;case bt.Bottom:this._pixiText.anchor.set(this._pixiText.anchor.x,1),this._pixiText.y=this.height;break;default:this._pixiText.anchor.set(this._pixiText.anchor.x,0),this._pixiText.y=0}return this._pixiText.y-=q.fontSize>>2,void(q.paddingTop&&(this._pixiText.y+=q.paddingTop))}Y.VyI.log(`[Legacy Font][Text] No legacy text style found for font key ${st}, falling back to sprite-based bitmap font to render "${K}".`,Y.$bb.Warning),this.numberOfLines=1;for(let nt=0;nt=this.sprites.length?(rt=tt.q.instance.prodigy.create.sprite(X,Z,this.fontName),this.add(rt),this.sprites.push(rt)):(rt=this.sprites[st],rt.visible=!0),rt.tint=this.tint,rt.x=X,rt.y=Z,Y.Aq$.isDefined(it)){if(-1!==it.indexOf("icon-")){rt.destroy();const q=it.split("-"),K=yt.E.getIconForType(q[1],parseInt(q[2]));this.icon=tt.q.instance.prodigy.icon.createIcon(X,Z,K,null,null,40,40),rt=this.icon,this.add(this.icon),this.sprites[st]=this.icon,dt.Ticker.shared.addOnce((()=>this.icon.smoothed=!0))}else rt.key!==mt._.General_icons_json&&rt.loadTexture(mt._.General_icons_json),rt.frameName=it;rt.y+=this.iconOffsetY}else if(rt.key!==this.fontName&&rt.loadTexture(this.fontName),10!==q){let z=`${q}-${this.fontSize}`;const Q=tt.q.instance.game.cache.getFrameData(this.fontName);(null==Q?void 0:Q.checkFrameName(z))||(Y.VyI.log(`Text: Frame name '${z}', character '${K[nt]}' does not exist in font '${this.fontName}'`,Y.$bb.Error),z=`63-${this.fontSize}`),rt.frameName=z}if(32===q||nt===K.length-1||10===q){const K=0===this.fontSize?26:this.fontSize,z=Y.Aq$.isDefined(this.lineHeight)?this.lineHeight:K+5;if(X>=this.boundsWidth&&10!==q){const q=X;X=0,Z+=z;for(let z=J;z<=st;z++){const q=this.sprites[z];q.x=X,q.y=Z,q.key===mt._.General_icons_json&&(q.y+=(q.height-K)/2),X+=Y.Aq$.isDefined(this.monoSpace)?this.monoSpace:q.width}et.push(q-X),this.numberOfLines++,this.textAlignment===Y.If$.Center&&(X-=at)}else 10===q&&(rt.visible=!1,Z+=z,X=0,this.numberOfLines++);J=st+1,32===q&&(X+=at)}10!==q&&(X+=Y.Aq$.isDefined(this.monoSpace)?this.monoSpace:rt.width),nt===K.length-1&&et.push(X)}if(this.textAlignment!==Y.If$.Left){let q=-1,K=0,z=-1;for(let Q=0;Q{this.game.broadcaster.removeAppListener(nt.n8.TabSelected,this,K)}))}onTabSelected(q,K){this.setActive(!(this.groupID===q&&this.tabID===K))}}var Pt=z(87776);class Mt{constructor(q){this.game=null,this.game=q}static parseJSON(q){try{return JSON.parse(q)}catch(e){Y.VyI.log("Error parsing config file",Y.$bb.Error)}}createUIElements(q,K){let z=null,X=null,Z=null,J=[];const tt=K.width,et=K.height;for(let it=0;it{"use strict";z.d(K,{b:()=>tt});var Y=z(62459),Q=z(68910),X=z(35120),Z=z(77938),J=z(95130);class tt extends J.D{constructor(q,K){super(q,K),this.boundsAlignH="left",this.boundsAlignV="top",this.textBounds=new Q.Rectangle,this._padding=new Y.I9Y,this.isActive=!0}populate(q,K){var z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt;super.populate(q);const ut=X.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService);Y.Aq$.isDefined(q.textKey)&&(q.text=ut.getText(q.textKey)),Y.Aq$.isDefined(q.forceUpperCase)&&q.forceUpperCase&&(q.text=q.text.toUpperCase()),this.textBounds=new Q.Rectangle(0,0,null!=K?K:this.width,this.height);const ft=new Q.TextStyle,bt=Y.Aq$.isDefined(q.style)?Z.t.getItem("fontStyle",q.style):Z.t.getItem("fontStyle",1);if(Y.Aq$.isDefined(bt)){const q=bt.data;ft.fontFamily=q.font,ft.fontSize=q.fontSize,ft.fill=q.fill,ft.fontStyle=null!==(z=q.fontStyle)&&void 0!==z?z:ft.fontStyle,ft.fontWeight=null!==(J=q.fontWeight)&&void 0!==J?J:"normal",q.stroke&&(ft.stroke=q.stroke),ft.strokeThickness=null!==(tt=q.strokeThickness)&&void 0!==tt?tt:ft.strokeThickness,q.shadowColor&&(ft.dropShadow=!0,ft.dropShadowColor=null!==(et=q.shadowColor)&&void 0!==et?et:ft.dropShadowColor,ft.dropShadowDistance=null!==(it=q.shadowDistance)&&void 0!==it?it:ft.dropShadowDistance),this._padding=null!==(st=q.padding)&&void 0!==st?st:this._padding}ft.wordWrap=null!==(nt=q.wordWrap)&&void 0!==nt&&nt,ft.wordWrapWidth=null!==(at=q.wordWrapWidth)&&void 0!==at?at:this.width,ft.align=null!==(rt=q.align)&&void 0!==rt?rt:"center",ft.fontSize=null!==(ot=q.fontSize)&&void 0!==ot?ot:ft.fontSize,ft.fill=null!==(ht=q.color)&&void 0!==ht?ht:ft.fill,ft.lineHeight=null!==(ct=q.lineSpacing)&&void 0!==ct?ct:ft.lineHeight,ft.padding=3,this.textObject=new Q.Text(q.text,ft),this.textObject.roundPixels=!0,this.boundsAlignH=null!==(dt=q.boundsAlignH)&&void 0!==dt?dt:"left",this.boundsAlignV=null!==(lt=q.boundsAlignV)&&void 0!==lt?lt:"top",this.calculateAlignment(),this.add(this.textObject)}calculateAlignment(){const q=new Y.I9Y(0,0),K=new Q.Rectangle;this.textObject.getLocalBounds(K),"right"===this.boundsAlignH?q.x+=this.textBounds.width-K.width/this.textObject.resolution-this._padding.x:"center"===this.boundsAlignH&&(q.x+=.5*(this.textBounds.width-K.width/this.textObject.resolution-this._padding.x)),"bottom"===this.boundsAlignV?q.y+=this.textBounds.height-3-K.height/this.textObject.resolution-this._padding.y:"middle"===this.boundsAlignV&&(q.y+=.5*(this.textBounds.height-6-K.height/this.textObject.resolution-this._padding.y)),this.textObject.pivot.x=-q.x,this.textObject.pivot.y=-q.y}setText(q){this.textObject.text!==q&&(this.textObject.text=q,this.textObject.updateText(!0),this.calculateAlignment())}applyTint(q){this.textObject.tint=q}}},85313:(q,K,z)=>{"use strict";z.d(K,{B:()=>nt});var Y=z(62459),Q=z(68910),X=z(88022),Z=z(66582),J=z(35120),tt=z(98013),et=z(37193),it=z(3788),st=z(26480);class nt extends st.g{constructor(q,K,z,X,Z,tt={}){var et,st;super(q,K),this.lines=0,this.text="",this.sprites=[],this.scaleToFit=!1,this.fontSize=20,this._defaultFontSize=26,this.horizontalAlignment=null,this.fontID=10,this.fontName=null,this.lineHeight=0,this.monoSpace=0,this.iconOffsetY=0,this.numberOfLines=1,this.boundsWidth=J.q.instance.game.width,this.x=z,this.y=X,this.letters=J.q.instance.prodigy.create.element(this,0,0),Y.Aq$.isDefined(tt.width)&&(this.boundsWidth=tt.width,tt.scaleToFit&&(this.scaleToFit=!0)),Y.Aq$.isDefined(tt.size)&&(this.fontSize=tt.size),this.horizontalAlignment=tt.align,Y.Aq$.isDefined(tt.fontID)&&(this.fontID=tt.fontID),this.fontName=`atlas-${this.fontID}`,this.lineHeight=tt.lineHeight,this.monoSpace=tt.mono,Y.Aq$.isDefined(tt.iconOffsetY)&&(this.iconOffsetY=tt.iconOffsetY);const nt=`${null!==(et=tt.fontID)&&void 0!==et?et:10}-${null!==(st=tt.size)&&void 0!==st?st:20}`;if(it.B[nt]){switch(this._pixiTextStyle=Object.assign({},it.B[nt]),this._pixiText=new Q.Text("",this._pixiTextStyle),this.addChild(this._pixiText),this._pixiText.roundPixels=!0,Y.Aq$.isDefined(this.boundsWidth)&&!this.scaleToFit&&(this._pixiTextStyle.wordWrap=!0,this._pixiTextStyle.wordWrapWidth=this.boundsWidth),this.horizontalAlignment){case Y.If$.Center:this._pixiText.anchor.set(.5,0),this._pixiText.x=this.boundsWidth>>1;break;case Y.If$.Right:this._pixiText.anchor.set(1,0),this._pixiText.x=this.boundsWidth;break;default:this._pixiText.anchor.set(0,0),this._pixiText.x=0}this._pixiTextStyle.paddingTop&&(this._pixiText.y+=this._pixiTextStyle.paddingTop),this.setPixiText(Z)}else Y.Aq$.isDefined(Z)&&(Y.VyI.log(`[Legacy Font][BitmapFont] No legacy text style found for font key ${nt}, falling back to sprite-based bitmap font to render "${Z}".`,Y.$bb.Warning),this.setText(Z))}setText(q){if(!Y.Aq$.isDefined(this._game)||this.text===q)return;if(this._pixiText)return this.setPixiText(q),void(this.text=q);tt.l.toggleDisplayObjSettings(this.letters,!0),this.letters.removeAll(!1),this.text=q;let K=0,z=0,Q=0;const Z=[];let et=0,it=null,st=!1;for(let Y=0;Y=this.sprites.length?(ht=J.q.instance.prodigy.create.sprite(K,z,this.fontName),this.sprites.push(ht)):(ht=this.sprites[rt],ht.visible=!0),this.letters.add(ht),ht.x=K,ht.y=z,Y.Aq$.isDefined(at)){const q=at.split(":");if(q.length>=2&&"single-image"===q[0]){const Q=q[1],X=q[2],Z=q[3],tt=q[4],et=q[5];if(ht.key!==Q){let q,it,st;this.remove(ht),ht.visible=!1,J.q.instance.prodigy.load.assets([Q],(()=>{ht.visible=!0})),Y.Aq$.isDefined(X)&&Y.Aq$.isDefined(Z)&&(q={x:parseFloat(X),y:parseFloat(Z)}),Y.Aq$.isDefined(tt)&&(it=parseInt(tt)),Y.Aq$.isDefined(et)&&(st=parseInt(et)),ht=J.q.instance.prodigy.icon.createIcon(K,z,Q,q,void 0,it,st,!1),this.letters.add(ht),this.sprites.splice(rt,1,ht)}}else ht.key!==X._.General_icons_json&&ht.loadTexture(X._.General_icons_json),ht.frameName=at;ht.y+=this.iconOffsetY}else ht.key!==this.fontName&&ht.loadTexture(this.fontName),10!==nt&&(ht.frameName=`${nt}-${this.fontSize}`);if(32===nt||tt===q.length-1||10===nt){const q=0===this.fontSize?this._defaultFontSize:this.fontSize,J=Y.Aq$.isDefined(this.lineHeight)?this.lineHeight:q+5;if(K>=this.boundsWidth){const tt=K;K=0,z+=J;for(let Z=Q;Z<=rt;Z++)this.sprites[Z].x=K,this.sprites[Z].y=z,this.sprites[Z].key===X._.General_icons_json&&(this.sprites[Z].y+=(this.sprites[Z].height-q)/2),K+=Y.Aq$.isDefined(this.monoSpace)?this.monoSpace:this.sprites[Z].width;Z.push(tt-K),this.numberOfLines++}else 10===nt&&(ht.visible=!1,z+=J,K=0,this.numberOfLines++);Q=rt+1,32===nt&&(K+=ot)}10!==nt&&(Y.Aq$.isDefined(this.monoSpace)?K+=this.monoSpace:K+=ht.width),tt===q.length-1&&Z.push(K)}if(this.lines=Z.length,Y.Aq$.isDefined(this.horizontalAlignment)&&this.horizontalAlignment!==Y.If$.Left){let q=-1,K=0,z=-1;for(let Q=0;Q>1),Y.atlas,Y.frame)),q=" "),Q=Q.replace("[membership]",q)}for(const Y of["mail-gold","mail-heart","mail-star","mail-tower"])Q.includes(`[${Y}]`)&&(this.addChild(J.q.instance.prodigy.create.sprite(0,(null!==(z=this._pixiTextStyle.paddingTop)&&void 0!==z?z:0)+(this._pixiTextStyle.fontSize-24>>1),X._.General_icons_json,Y)),Q=Q.replace(`[${Y}]`," "));switch(this._pixiTextStyle.forceCaps&&(this._pixiTextStyle.lowerSize&&[...Q].some((q=>q===q.toLowerCase()))&&(this._pixiTextStyle.fontSize=this._pixiTextStyle.lowerSize),Q=Q.toUpperCase()),this.horizontalAlignment){case Y.If$.Center:this._pixiText.anchor.set(.5,0),this._pixiText.x=this.boundsWidth>>1;break;case Y.If$.Right:this._pixiText.anchor.set(1,0),this._pixiText.x=this.boundsWidth;break;default:this._pixiText.anchor.set(0,0),this._pixiText.x=0}if(this._pixiTextStyle.paddingTop&&(this._pixiText.y+=this._pixiTextStyle.paddingTop),this._pixiText.text=Q,this._pixiText.style=this._pixiTextStyle,this.scaleToFit&&this._pixiText.width>this.boundsWidth){const q=this.boundsWidth/this._pixiText.width;this._pixiText.scale.set(q,q),Y.Aq$.toggleDisplayObjSmooth(this._pixiText,!0)}}addClickCallback(q,K,z){const Y=this.add(J.q.instance.prodigy.create.sprite(0,0,X._.General_core_json,"overlay-light"));Y.width=K,Y.height=z,Y.alpha=0,Y.inputEnabled=!0,Y.events.onInputDown.add(q)}destroy(q={children:!0}){Y.W$e.instance.game.tweens.removeAllFromOwner(this),super.destroy(q)}}},98623:(q,K,z)=>{"use strict";z.d(K,{H:()=>tt});var Y=z(62459),Q=z(88022),X=z(35120),Z=z(34829),J=z(26480);class tt extends J.g{get isModalWithTransparency(){return this._isModalWithTransparency}constructor(q,K,z,Y,Q){super(q,K,null,null,null,null,z,Y,Q),this._isModalWithTransparency=!1,this.game=q,this.metricsManager=X.q.instance.prodigy.gameContainer.get("a92-c640"),this.metricsManager.objectCreated("Element")}setRenderState(q,K){this.renderOnly=q,this.tintElement=K}showTooltip(q,K){if(this.hasTooltip()&&(this.tooltip.destroy(),this.tooltip=null),Y.Aq$.isDefined(q)){this.tooltip=X.q.instance.prodigy.create.element(this,K);let z=this.tooltip.add(X.q.instance.prodigy.create.sprite(30,0,Q._.General_core_json,"tooltip"));z.scale.x=-1,z.alpha=.9,z.width=300,z.height=50,X.q.instance.prodigy.create.font(this.tooltip,90,11,q,{width:230,align:"center"}),z=this.tooltip.add(X.q.instance.prodigy.create.sprite(0,0,Q._.General_icons_json,"type")),this.game.add.tween(z,this).to({x:10},1e3,Y.GS3.Quadratic.InOut,!0,0,Z.s.MAX_SAFE_INTEGER,!0)}}hasTooltip(){return Y.Aq$.isDefined(this.tooltip)}highlight(q,K=0,z=0,J=400){this.isHighlighted()&&(this.arrow.destroy(),this.arrow=null),q&&(this.arrow=this.add(X.q.instance.prodigy.create.sprite(0,0,Q._.General_icons_json,"help")),this.arrow.x=K+Math.floor(this.width/2),this.arrow.y=z-this.arrow.height+10,this.game.add.tween(this.arrow,this).to({y:this.arrow.y+25},J,Y.GS3.Quadratic.InOut,!0,0,Z.s.MAX_SAFE_INTEGER,!0))}isHighlighted(){return Y.Aq$.isDefined(this.arrow)}setElementAsModal(q){this._isModalWithTransparency=q,X.q.instance.prodigy.open.bitmapCacheGameRender(q,this)}destroy(q={children:!0}){this.cacheAsBitmap=!1,this.metricsManager&&(this.metricsManager.objectDestroyed("Element"),this.metricsManager=null),this.tooltip=null,this.arrow=null,super.destroy(q),this.game=null}getInjectedValue(q){return X.q.instance.prodigy.gameContainer.get(q)}}},63119:(q,K,z)=>{"use strict";z.d(K,{F:()=>J});var Y=z(62459),Q=z(35120),X=z(60881),Z=z(98623);class J extends Z.H{static createInputField(q,K,z,Q,X,Z,tt=this.WIDTH_MEDIUM,et=this.HEIGHT_MEDIUM,it="textProdigy123"){const st=document.getElementById(z);Y.Aq$.isDefined(st)&&st.remove();const nt=new J(q,K,z,Q,X,Z,tt-15,et);return nt.setAttribute("type",it),nt}constructor(q,K,z,Q,X,Z,J,tt,et=null,it="on"){super(q,K),this.onFocusChanged=null,this.onTextChanged=null,this.input=null,this.style={},this.canvas=null,this.allowEvents=!1,this.inputWidth=0,this.inputHeight=0,this.label=null,this._fadeTween=null,this.input=document.createElement("input"),this.input.setAttribute("value",""),this.input.setAttribute("id",z),this.input.setAttribute("class","game-input"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("autocomplete",it),this.input.setAttribute("placeholder",Y.Aq$.isDefined(Q)?Q:""),this.style=et;document.getElementById("external-ui").appendChild(this.input),this.canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0],this.x=X,this.y=Z,this.inputWidth=J,this.inputHeight=tt,this.allowEvents=!0,this.textChanged=this.textChanged.bind(this),this.input.addEventListener("focus",(q=>{this.handleFocusChanged(!0)})),this.input.addEventListener("blur",(q=>{this.handleFocusChanged(!1)}))}setStyle(q,K){this.input.style.setProperty(q,K)}setAttribute(q,K){this.input.setAttribute(q,K)}setAutoComplete(q){this.setAttribute("autocomplete",q?"on":"off")}setFocus(q){q?this.input.focus():this.input.blur()}clearEvents(q){this.allowEvents=q}getValue(){return this.input.value}setValue(q){this.input.value=q}setVisible(q){this.setStyle("display",q?"":"none")}hide(q){this.visible=!1,this.fade(0,q),Y.Aq$.isDefined(this.label)&&(this.label.alpha=0),this.setFocus(!1)}show(q,K=0){this.visible=!0,this.fade(1,q,K),Y.Aq$.isDefined(this.label)&&(this.label.alpha=1)}setEnabled(q){this.input.disabled=!q}enablePerKeyEvents(q){q?this.input.addEventListener("keyup",this.textChanged):this.input.removeEventListener("keyup",this.textChanged)}setLabel(q,K=null,z=!1,X=null){Y.Aq$.isDefined(this.label)?this.label.setText(K):this.label=Q.q.instance.prodigy.create.font(q,Y.Aq$.isDefined(X)?X:this.x+10,this.y-30,K,{size:20})}update(){super.update();const q=this.canvas.clientHeight/this.game.world.height;Y.Aq$.setOuterHeight(this.input,q*this.inputHeight);const K=this.canvas.clientWidth/this.game.world.width;Y.Aq$.setOuterWidth(this.input,K*this.inputWidth);const z=q*this.y+(this.input.style.marginTop?parseInt(this.input.style.marginTop):0),Q=K*this.x+(this.canvas.style.marginLeft?parseInt(this.canvas.style.marginLeft):0)+(this.input.style.marginLeft?parseInt(this.input.style.marginLeft):0),X=q*this.inputHeight*.5;if(this.setStyle("top",`${z}px`),this.setStyle("left",`${Q}px`),this.setStyle("font-size",`${X}px`),Y.Aq$.isDefined(this.style))for(const Y in this.style)this.style.hasOwnProperty(Y)&&this.setStyle(Y,this.style[Y])}destroy(){this.setFocus(!1),this.input.remove(),Q.q.instance.game.tweens.remove(this._fadeTween),super.destroy()}handleFocusChanged(q){this.allowEvents&&(q?this.game.input.keyboard.clearCaptures():this.game.input.keyboard.addKeyCapture([X.D.BACKSPACE]),Y.Aq$.isDefined(this.onFocusChanged)&&this.onFocusChanged(q))}fade(q,K,z=0){if(this._fadeTween&&this._fadeTween.stop(),q>0&&this.setVisible(!0),0===K)this.input.style.opacity=`${q}`,this.onFadeTweenComplete(q);else{const Y={opacity:parseInt(this.input.style.opacity)};isNaN(Y.opacity)&&(Y.opacity=1),this._fadeTween=this.game.add.tween(Y,this).to({opacity:q},K,null,null,z).onUpdateCallback((()=>{this.input.style.opacity=`${Y.opacity}`})),this._fadeTween.onTweenComplete.add((()=>{this.onFadeTweenComplete(q)})),this._fadeTween.start()}}onFadeTweenComplete(q){this.input.style.opacity=`${q}`,0===q&&this.setVisible(!1)}textChanged(){Y.Aq$.isDefined(this.onTextChanged)&&this.onTextChanged()}}J.HEIGHT_MEDIUM=47,J.WIDTH_MEDIUM=320},17291:(q,K,z)=>{"use strict";z.d(K,{b:()=>it});var Y=z(62459),Q=z(88022),X=z(35120),Z=z(24190),J=z(77938),tt=z(73797),et=z(98623);class it extends et.H{constructor(q,K,z,Z={hideMenu:!0,hideContent:!0,tile:"bg-tile-brown"}){super(q,K),this.menuTutorial=null,this.style=null,this.btns=[],this.currentBtn=null,this.setupComplete=!1,this.overlay=null,this.isHidden=!1,this.spinner=null,this.bg=null,this.fg=null,this.title=null,this.bar=null,this.barSpeedX=0,this.barSpeedY=0,this.menuTutorial=z,this.style=Z,X.q.instance.prodigy.open.menuOpen(!this.style.hideMenu),Y.Aq$.isDefined(X.q.instance.prodigy.notifications)&&X.q.instance.prodigy.notifications.clearNotifications(),this.style.hideOverlay||(this.overlay=X.q.instance.prodigy.create.sprite(0,0,Q._.General_core_json,"overlay-small"),this.overlay.width=this.game.world.width,this.overlay.height=this.game.world.height,this.overlay.alpha=0,this.overlay.inputEnabled=!0,this.add(this.overlay))}hide(q=!1){q?(this.isHidden=!0,this.visible=!1):this.isHidden&&(this.isHidden=!1,this.visible=!0)}onMenuOpen(q){}setup(){this.loadComplete()}update(){super.update(),this.setupComplete&&this.menuUpdate()}loadComplete(){this.game&&(Y.Aq$.isDefined(this.spinner)&&this.spinner.destroy(),this.menuSetup())}menuSetup(){Y.Aq$.isDefined(this.style.open)&&this.style.open(),this.bg=X.q.instance.prodigy.create.element(this,0,0),Y.Aq$.isDefined(this.style.tile)&&this.setBackgroundTile(Q._.Tiled_sprites_json,this.style.tile,.25,.25,this.style.full),this.fg=X.q.instance.prodigy.create.element(this,0,0),this.style.hideContent&&(this.game.broadcaster.broadcast(tt.lc.EnableBackground,this,[!1]),this.game.broadcaster.broadcast(tt.lc.EnableContent,this,[!1]))}close(){if(Y.Aq$.isDefined(this.game)){if(this.style.hideContent&&(this.game.broadcaster.broadcast(tt.lc.EnableBackground,this,[!0]),this.game.broadcaster.broadcast(tt.lc.EnableContent,this,[!0])),X.q.instance.prodigy.open.menuOpen(!0),Y.Aq$.isDefined(this.style.close)&&this.style.close(),this.btns)for(let q=0;q=0;z--)K[z].y=650,q+=K[z].width,K[z].x=1230-q,q+=30}if(Y.Aq$.isDefined(q)){let K=0;for(let z=0;z{"use strict";z.d(K,{g:()=>X});var Y=z(95891),Q=z(57308);class X extends Q.Y{constructor(q,K,z,Q,X,Z,J,tt,et){super(q,K,z),Y.isNil(et)||(this.name=et),Y.isNil(J)||(this.x=J),Y.isNil(tt)||(this.y=tt)}destroy(q={children:!0}){super.destroy(q)}}},35452:(q,K,z)=>{"use strict";z.d(K,{a:()=>it});var Y=z(62459),Q=z(88022),X=z(35120),Z=z(73797),J=z(41674),tt=z(15485),et=z(98623);class it extends et.H{constructor(q,K,z,Q,Z){super(q,K,z,Q),this.buttons=[],this.renderTexture=null,this.background=null,this.renderImage=null,this.page=0,this.disableModeSet=!1,this._shouldClose=!1,this._currentInterfaceName="",Y.Aq$.isDefined(X.q.instance.prodigy.notifications)&&X.q.instance.prodigy.notifications.clearNotifications(),this.renderTexture=Z,this.background=X.q.instance.prodigy.create.element(this),this.renderTexture.clear(),this.renderImage=this.add(X.q.instance.prodigy.create.image(0,0,void 0,void 0,this.renderTexture)),this.renderImage.inputEnabled=!0}set currentInterfaceName(q){this._currentInterfaceName=q}get currentInterfaceName(){return this._currentInterfaceName}create(){X.q.instance.prodigy.open.setActiveRenderMenu(this),this.process(),this.game.broadcaster.broadcast(Z.pm.StopPlayer)}setMode(q){if(Y.Aq$.isDefined(this.buttons))for(let K=0;K0&&(ft=3*et.length+6),Y.Aq$.isDefined(nt)&&Y.Aq$.isDefined(nt.banner)&&(lt=nt.banner.frameName,ut={atlasID:nt.banner.atlasID},ft=nt.banner.width),Y.Aq$.isDefined(et)&&et.length>0)X.q.instance.prodigy.create.panel(ht,40,40,ft,2,lt,ut);else if(Y.Aq$.isDefined(st)){const q=X.q.instance.prodigy.create.panel(ht,40,40,18,2,lt);X.q.instance.prodigy.create.font(q,200,15,st,{size:36,fontID:9})}let bt={x:-40,y:-10};if(Y.Aq$.isDefined(nt)&&Y.Aq$.isDefined(nt.closeButton)?(ct=nt.closeButton.key,dt=nt.closeButton.frameName,bt=nt.closeButton.offset):(ct=Q._.General_icons_json,dt="close"),X.q.instance.prodigy.create.button(this,ht.x+40*q+bt.x,ht.y+bt.y,ct,dt,(()=>{X.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:tt.k.X,interfaceName:this.currentInterfaceName,interfaceType:J.Wm.Menu}),this.close()})),this.buttons=[],Y.Aq$.isDefined(et)&&et.length>0){let q={x:0,y:0},K={x:0,y:0},z=120;Y.Aq$.isDefined(nt)&&Y.Aq$.isDefined(nt.buttons)&&(q=nt.buttons.offset,K=nt.buttons.iconOffset,z=null!==(ot=nt.buttons.spacing)&&void 0!==ot?ot:z),Y.Aq$.isDefined(Z)&&!rt&&(ht.add(X.q.instance.prodigy.create.sprite(K.x+80,-10,Q._.General_icons_json,"menu-crest")),""===Z||at||X.q.instance.prodigy.create.font(ht,K.x+80,70,Z,{width:140,align:"center"}));for(let Y=0;Y{"use strict";z.d(K,{k:()=>tt});var Y=z(62459),Q=z(88022),X=z(35120),Z=z(92150),J=z(34829);class tt extends Z._{get isLoaded(){return!this._loadingAsset}constructor(q,K,z,Z,tt,et=null,it,st,nt,at){let rt=Q._.General_core_json,ot="empty";const ht=X.q.instance.prodigy.load.isFileLoaded(Z);ht?(rt=Z,ot=tt):at&&(ot="icon-loading"),super(q,K,z,rt,ot),this.forcedWidth=st,this.forcedHeight=nt,this.onTextureLoaded=it,this.loadingTween=null;let ct=!1;ht?(this.checkSpriteDimension(),ct=!0,Y.Aq$.isDefined(et)&&this.anchor.set(et.x,et.y)):(Y.Aq$.isDefined(at)&&at&&(this.anchor.set(.5,.5),this.x+=40,this.y+=40,this.loadingTween=this.game.add.tween(this,this).to({angle:360},2e3,Y.GS3.Linear.None,!0,0,J.s.MAX_SAFE_INTEGER,!1)),this.checkSpriteDimension(),this._loadingAsset={source:Z,frame:tt},X.q.instance.prodigy.load.assets(Z,this.onSourceAssetLoaded.bind(this,K,z,Z,tt,et))),ct&&this.checkCallback()}setActive(q){this.tint=q?16777215:5789784}loadNewTexture(q,K,z=null,Z=!1){Y.Aq$.isDefined(this.loadingTween)&&(X.q.instance.game.tweens.remove(this.loadingTween),this.loadingTween=null,this.anchor.set(0,0),this.x-=40,this.y-=40,this.angle=0),this._loadingAsset={source:q,frame:K},this._updateFrame=null,X.q.instance.prodigy.load.isFileLoaded(q)?this.onSourceAssetLoaded(this.x,this.y,q,K,z):(Z?(this.loadTexture(Q._.General_core_json,"icon-loading"),this.anchor.set(.5,.5),this.x+=40,this.y+=40,this.loadingTween=this.game.add.tween(this,this).to({angle:360},2e3,Y.GS3.Linear.None,!0,0,J.s.MAX_SAFE_INTEGER,!1)):this.loadTexture(Q._.General_core_json,"empty"),X.q.instance.prodigy.load.assets(q,this.onSourceAssetLoaded.bind(this,this.x,this.y,q,K,z)))}checkSpriteDimension(){Y.Aq$.isDefined(this.forcedWidth)&&(this.width=this.forcedWidth),Y.Aq$.isDefined(this.forcedHeight)&&(this.height=this.forcedHeight)}rotateMiddleBased(q){this.middleRotatedAngle=q,this.anchor.set(.5,.5),this.angle=this.middleRotatedAngle}onSourceAssetLoaded(q,K,z,Q,Z=null){var J;if(this.game&&this.exists&&this._loadingAsset&&this._loadingAsset.source===z&&this._loadingAsset.frame===Q){if(Y.Aq$.isDefined(this.loadingTween)&&(X.q.instance.game.tweens.remove(this.loadingTween),this.loadingTween=null,this.anchor.set(0,0),this.x-=40,this.y-=40,this.angle=0),this.key=z,null!==this.key){let q=null!==(J=this._updateFrame)&&void 0!==J?J:Q;0===z.indexOf("icon-")&&(q=void 0),this.loadTexture(z,q)}this._loadingAsset=null,this._updateFrame=null,this.cameraOffset=new Y.I9Y(q,K),Y.Aq$.isDefined(this.middleRotatedAngle)?this.rotateMiddleBased(this.middleRotatedAngle):Y.Aq$.isDefined(Z)&&this.anchor.set(Z.x,Z.y),this.checkSpriteDimension(),this.checkCallback()}}updateFrame(q){this.isLoaded?super.updateFrame(q):this._updateFrame=q}checkCallback(){var q;null===(q=this.onTextureLoaded)||void 0===q||q.call(this,this)}destroy(){this.onTextureLoaded=null,X.q.instance.game.tweens.remove(this.loadingTween),this.loadingTween=null,super.destroy()}}tt.DESTROYED="_destroyed"},8096:(q,K,z)=>{"use strict";z.d(K,{a:()=>ct});var Y,Q=z(62459),X=z(88022),Z=z(35120),J=z(60881),tt=z(98013),et=z(17425),it=z(8674),st=z(49237),nt=z(43531),at=z(16847);!function(q){q.Default="default",q.NoPortrait="noPortrait",q.NoCancel="noCancel"}(Y||(Y={}));let rt=class extends Q.uAl{constructor(){super(...arguments),this.rootObject=null,this.faceContainer=null,this.nameBackground=null,this.textName=null,this.textBody=null,this.noPortraitTextBody=null,this._cancelButton=null,this.nextButton=null,this.followButton=null,this.wearButton=null,this.startButton=null,this.shopButton=null,this.spinButton=null,this.yesButton=null,this.stayButton=null,this.leaveButton=null,this.keepButton=null,this.changeButton=null,this.currencyButton=null,this.goNowButton=null,this.notNowButton=null,this.iconImageContainer=null,this.currencyDisplay=null,this.infoTextContainer=null,this.confirmButton=null,this.noCancelTextBody=null,this.textBoxMode=Y.Default}get cancelButton(){return this._cancelButton}initializeComponents(q){switch(this.followButton.GameObject.active=!1,this.wearButton.GameObject.active=!1,this.startButton.GameObject.active=!1,this.shopButton.GameObject.active=!1,this.spinButton.GameObject.active=!1,this.yesButton.GameObject.active=!1,this.leaveButton.GameObject.active=!1,this.stayButton.GameObject.active=!1,this.changeButton.GameObject.active=!1,this.keepButton.GameObject.active=!1,this.currencyButton.GameObject.active=!1,this._cancelButton.GameObject.active=!1,this.iconImageContainer.GameObject.active=!1,this.infoTextContainer.active=!1,this.textBoxMode=Y.Default,this.currencyDisplay&&(this.currencyDisplay.GameObject.active=!1),q){case nt.fA.EQUIP:this.confirmButton=this.wearButton;break;case nt.fA.START:this.confirmButton=this.startButton;break;case nt.fA.STORE:this.confirmButton=this.shopButton;break;case nt.fA.WHEEL:this.confirmButton=this.spinButton;break;case nt.fA.FOLLOW:this.confirmButton=this.followButton;break;case nt.fA.LEAVE:this.confirmButton=this.leaveButton,this._cancelButton=this.stayButton;break;case nt.fA.CHANGE:this.confirmButton=this.changeButton,this._cancelButton=this.keepButton;break;case nt.fA.CURRENCY:this.confirmButton=this.currencyButton,this._cancelButton=this.stayButton;break;default:this.confirmButton=this.yesButton}}setWindowPosition(q){Q.Aq$.isDefined(q)&&(q===nt.DG.Bottom?this.rootObject.transform.setPositionY(Z.q.instance.game.height):q===nt.DG.Middle?this.rootObject.transform.setPositionY(555):this.rootObject.transform.setPositionY(236))}setNameWithKey(q){this.textName.text=q,this.textName.TextObject.visible=!0,this.nameBackground.active=!0}setTextBoxMode(q,K=!1){K&&this.textBoxMode!==Y.Default||(this.textBoxMode=q,this.textBody.GameObject.active=q===Y.Default,this.noPortraitTextBody.GameObject.active=q===Y.NoPortrait,this.noCancelTextBody.GameObject.active=q===Y.NoCancel,q===Y.NoPortrait?this.noPortraitTextBody.text=this.textBody.text:q===Y.NoCancel&&(this.noCancelTextBody.text=this.textBody.text))}setItemIcon(q,K){this.iconImageContainer.updateAsset(q,K),this.iconImageContainer.GameObject.active=!0}setCurrency(q){Q.Aq$.isDefined(this.currencyDisplay)&&(this.currencyDisplay.GameObject.active=Q.Aq$.isDefined(q),this.currencyDisplay.GameObject.active&&this.currencyDisplay.updateCurrencyID(q))}setInfoTextContainer(q){this.infoTextContainer.active=q}};(0,it.Cg)([(0,Q.ERr)(),(0,it.Sn)("design:type",Q._mx)],rt.prototype,"rootObject",void 0),(0,it.Cg)([(0,Q.MnK)(Q.y4o),(0,it.Sn)("design:type",Q.y4o)],rt.prototype,"faceContainer",void 0),(0,it.Cg)([(0,Q.ERr)(),(0,it.Sn)("design:type",Q._mx)],rt.prototype,"nameBackground",void 0),(0,it.Cg)([(0,Q.MnK)(Q.EYj),(0,it.Sn)("design:type",Q.EYj)],rt.prototype,"textName",void 0),(0,it.Cg)([(0,Q.MnK)(Q.EYj),(0,it.Sn)("design:type",Q.EYj)],rt.prototype,"textBody",void 0),(0,it.Cg)([(0,Q.MnK)(Q.EYj),(0,it.Sn)("design:type",Q.EYj)],rt.prototype,"noPortraitTextBody",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"_cancelButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"nextButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"followButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"wearButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"startButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"shopButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"spinButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"yesButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"stayButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"leaveButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"keepButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"changeButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"currencyButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"goNowButton",void 0),(0,it.Cg)([(0,Q.MnK)(st.$),(0,it.Sn)("design:type",st.$)],rt.prototype,"notNowButton",void 0),(0,it.Cg)([(0,Q.MnK)(Q.vYh),(0,it.Sn)("design:type",Q.vYh)],rt.prototype,"iconImageContainer",void 0),(0,it.Cg)([(0,Q.MnK)(at.n),(0,it.Sn)("design:type",at.n)],rt.prototype,"currencyDisplay",void 0),(0,it.Cg)([(0,Q.ERr)(),(0,it.Sn)("design:type",Q._mx)],rt.prototype,"infoTextContainer",void 0),(0,it.Cg)([(0,Q.MnK)(Q.EYj),(0,it.Sn)("design:type",Q.EYj)],rt.prototype,"noCancelTextBody",void 0),rt=(0,it.Cg)([(0,Q.EVk)("CharacterDialoguePrefab")],rt);var ot,ht=z(82680);!function(q){q[q.None=1]="None",q[q.Yes=2]="Yes",q[q.No=4]="No",q[q.Next=8]="Next"}(ot||(ot={}));class ct extends ht.W{constructor(q,K,z,Y,Q){super(q,K,70,{},Q.concat([X._.Ui_dialogues_json,X._.Ui_buttons_json])),this.dialogueConfig={},this.nextEvent=null,this.currentSound=null,this.dialogueContainer=null,this.confirmCallback=null,this.cancelCallback=null,this.prefabObj=null,this.prefabComponent=null,this.game=q,this.dialogueConfig=z,this.nextEvent=Y,this.isModal=!1}create(){super.create();const q=Z.q.instance.prodigy.gameContainer.get("983-05a7");this.prefabObj=q.load(1,void 0,this.getInjectionData(this.dialogueConfig.dialogueData)),this.dialogueContainer.addChild(this.prefabObj.findComponent(Q.y4o).getRootContainer()),this.prefabComponent=this.prefabObj.findComponentInChildren(rt),this.prefabComponent.initializeComponents(this.dialogueConfig.type),this.prefabComponent.nextButton.onClick.add(this.dialogueCallback.bind(this)),setTimeout((()=>{this.game.input.enabled=!0,this.game.input.reset();for(let q=0;q"INFO_TEXT"===q.injectionName)))||void 0===K?void 0:K.data)&&this.prefabComponent.setInfoTextContainer(!0),X.avatar.dimmed&&(it.tint=4605510),X.avatar.silhouetted&&(it.tint=0),this.prefabComponent.setCurrency(null===(z=X.currencyButton)||void 0===z?void 0:z.currencyId),""!==X.avatar.atlas||Q.Aq$.isDefined(X.nameKey)?this.prefabComponent.setTextBoxMode(Y.Default):this.prefabComponent.setTextBoxMode(Y.NoPortrait)}if(Q.Aq$.isDefined(this.dialogueConfig.text)&&(this.prefabComponent.textBody.text=this.dialogueConfig.text),Q.Aq$.isDefined(this.dialogueConfig.blockInput)&&this.dialogueConfig.blockInput?this.setButtonVisibility(ot.Next):(this.background.visible=!1,this.setButtonVisibility(ot.None)),(Q.Aq$.isDefined(this.dialogueConfig.yes)||Q.Aq$.isDefined(this.dialogueConfig.no))&&this.setButtonVisibility(ot.Yes|ot.No),this.dialogueConfig.hideNext&&(this.prefabComponent.nextButton.GameObject.active=!1),!1===this.dialogueConfig.isCancelButtonVisible&&(this.prefabComponent.cancelButton.GameObject.active=!1),Q.Aq$.isDefined(this.dialogueConfig.nextButtonText)){this.prefabComponent.nextButton.GameObject.findComponentsInChildren(Q.EYj).forEach((q=>{q.text=this.dialogueConfig.nextButtonText}))}if(Q.Aq$.isDefined(this.dialogueConfig.yesButtonText)){this.prefabComponent.confirmButton.GameObject.findComponentsInChildren(Q.EYj).forEach((q=>{q.text=this.dialogueConfig.yesButtonText}))}if(Q.Aq$.isDefined(this.dialogueConfig.noButtonText)){this.prefabComponent.cancelButton.GameObject.findComponentsInChildren(Q.EYj).forEach((q=>{q.text=this.dialogueConfig.noButtonText}))}this.prefabComponent.cancelButton.GameObject.active||this.prefabComponent.setTextBoxMode(Y.NoCancel,!0);const et=this.game.input.keyboard.addKey(J.D.ENTER);this.prefabComponent.nextButton.GameObject.active?et.onDown.add(this.onEnterKey,this):et.onDown.remove(this.onEnterKey,this)}setButtonVisibility(q){this.prefabComponent.confirmButton.GameObject.active=(q&ot.Yes)===ot.Yes,this.prefabComponent.cancelButton.GameObject.active=(q&ot.No)===ot.No,this.prefabComponent.nextButton.GameObject.active=(q&ot.Next)===ot.Next}updateSchema(q,K){if(Q.Aq$.isDefined(this.game))if(this.dialogueConfig=q,this.prefabComponent.confirmButton.onClick.removeAll(),this.prefabComponent.cancelButton.onClick.removeAll(),this.prefabComponent.nextButton.onClick.removeAll(),this.prefabComponent.initializeComponents(this.dialogueConfig.type),this.prefabComponent.nextButton.onClick.add(this.dialogueCallback.bind(this)),K.length>0){for(let q=0;q-1&&et.K.cacheAsset(this.game,z,et.K.zoneAssetsCached)}Z.q.instance.prodigy.load.assets(K,this.renderDialogue.bind(this))}else this.renderDialogue()}onEnterKey(){this.dialogueCallback(null)}dialogueCallback(q){Z.q.instance.prodigy.audio.playSFX(18,"pop");let K=null;Q.Aq$.isDefined(q)&&(this.nextEvent&&this.dialogueConfig.preserveNextEvent&&(K=this.nextEvent),q()),this.nextEvent?this.nextEvent():K?K():Q.VyI.log("Dialogue callback nextEvent not found.",Q.$bb.Warning)}stopSound(){Q.Aq$.isDefined(this.currentSound)&&(this.currentSound.stop(),this.currentSound.destroy())}close(){if(this.stopSound(),this.currentSound=null,this.prefabComponent&&(this.prefabComponent.nextButton.onClick.dispose(),this.prefabComponent.confirmButton.onClick.dispose(),this.prefabComponent.cancelButton.onClick.dispose(),this.prefabComponent=null,this.prefabObj.destroy()),this.nextEvent=null,this.dialogueContainer=null,this.confirmCallback=null,this.cancelCallback=null,this.prefabObj=null,this.game){this.game.input.keyboard.addKey(J.D.ENTER).onDown.remove(this.onEnterKey,this)}super.close()}}ct.FACE_X=0,ct.FACE_Y=198},95057:(q,K,z)=>{"use strict";var Y;z.d(K,{R:()=>Y}),function(q){q.Alternative="alternative",q.BattlePass="treasure-track",q.BattlePassUpsell="TT-Upsell",q.Contextual="contextual-ad",q.DynamicMemberPrompt="dynamicMemberPrompt",q.Modal="modal",q.Mythics21Q4="mythics21Q4",q.None="",q.Pet="pet",q.PostBattleBanner="post-battle-banner",q.Static="static",q.UnifiedConversionFlow="unified-upsell",q.Video="video"}(Y||(Y={}))},11117:(q,K,z)=>{"use strict";z.d(K,{R:()=>pt});var Y=z(62459),Q=z(95891),X=z(88022),Z=z(35120),J=z(29738),tt=z(35757),et=z(77938),it=z(75017),st=z(65050),nt=z(41674),at=z(15485),rt=z(46784),ot=z(76945),ht=z(30226),ct=z(21418),dt=z(48951),lt=z(95057),ut=z(86050),ft=z(82680);class bt extends ft.W{constructor(q,K,z,Y,Q,X,J=0){super(q,K,z,Q,X),this.currentPageNum=-1,this.pageSets=[],this.pages=[],this.buttonCallbacks={},this.firstPage=0,this.firstPage=J,this.pageSets=Y,this.segment=Z.q.instance.prodigy.gameContainer.get("20f-5f67")}preprocess(){this.queuePostCreateCallback(this.setCallbacks.bind(this),this.setup.bind(this))}setup(){this.pages=[];for(let q=0;q=0&&K.push(Y)}return K.length<1&&Y.VyI.log(`Could not find any templates with prefix ${q}`,Y.$bb.Verbose),K}setCallbacks(){Y.Aq$.isDefined(this.leftArrowButton)&&(this.leftArrowButton.onClickCallback=this.prevPage.bind(this)),Y.Aq$.isDefined(this.rightArrowButton)&&(this.rightArrowButton.onClickCallback=this.nextPage.bind(this))}nextPage(){this.setPage(this.currentPageNum+1)}prevPage(){this.setPage(this.currentPageNum-1)}setPage(q){var K;const z=Y.cj9.clamp(q,0,this.pages.length-1);z!==this.currentPageNum&&(Y.Aq$.isDefined(this.page)&&(this.page[this.pageName].destroy(),this.page=null),this.currentPageNum=z,Y.Aq$.isDefined(this.leftArrowButton)&&(this.leftArrowButton.visible=this.currentPageNum>0),Y.Aq$.isDefined(this.rightArrowButton)&&(this.rightArrowButton.visible=this.currentPageNum{Z.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelQuit("Click-Membership","Close-Clicked"),this.fireButtonEvent({buttonName:at.k.X,interfaceType:nt.Wm.InfoPanel}),this.fireInterfaceEvent({interfaceType:nt.Wm.InfoPanel,originType:nt.$N.ButtonClick,originID:at.k.X,closeMethod:nt.Lv.X}),this.close()},ht.J.shouldSuppressAd(q)?this.buttonCallbacks.signUpButton=this.buttonCallbacks.closeButton:this.buttonCallbacks.signUpButton=this.onMembershipButtonClick.bind(this,Y.Aq$.isDefined(this.sourceOverride)?this.sourceOverride:"MemberButton"),super.setCallbacks()}shouldShowSignupButton(q=!1){const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=Z.q.instance.prodigy.gameContainer.get("11f-118a"),Y=z.meetsRequirementsDeprecated(17)&&!z.meetsRequirementsDeprecated(15);return!K.hasMembership()||q&&Y}loadAds(){if(this.availableIndices=this.getFilteredIconArray().map(((q,K)=>K)),Y.Aq$.isDefined(this.promotedAd))for(let q=0;q{Z.q.instance.prodigy.audio.playVoice(z.tag,null,z.s,z.d)}))}}onMembershipButtonClick(q){const K=Z.q.instance.prodigy.gameContainer;this.shouldShowSignupButton(!0)&&(Y.Aq$.isDefined(this.analyticEvents)&&(this.fireButtonEvent({buttonName:at.k.BecomeAMember,interfaceType:nt.Wm.InfoPanel}),this.fireInterfaceEvent({interfaceName:rt.B.MembershipParentAd,interfaceType:nt.Wm.InfoPanel,originType:nt.$N.ButtonClick,originID:at.k.BecomeAMember})),K.get("20f-5f67").purchase.sendFunnelStep("Click-Membership"),Z.q.instance.prodigy.audio.stopVoice(),Z.q.instance.prodigy.open.membershipParent(this.promotedAd,this.analyticEvents,this.isUpgradePath))}onPageLoaded(){if(super.onPageLoaded(),this.hideSignup&&Y.Aq$.isDefined(this.page.signUpButton)&&(this.page.signUpButton.visible=!1),"playAtHome"===this.pageName||"playMemberAtHome"===this.pageName?Y.Aq$.isDefined(this.promotedAd)&&this.page[this.pageName].children[5].setText(this.getFlavourText()):"amazingThings0"===this.pageName?this.renderFeatureIcons(0,this.page[this.pageName].children[4]):"amazingThings1"===this.pageName?(this.renderFeatureIcons(3,this.page[this.pageName].children[4]),this.renderFeatureIcons(6,this.page[this.pageName].children[5])):"amazingThings2"===this.pageName&&(this.renderFeatureIcons(9,this.page[this.pageName].children[4]),this.renderFeatureIcons(12,this.page[this.pageName].children[5])),"amazingThings0"===this.pageName){const q=this.page[this.pageName].children[3];this.generateGearIcons(6,q)}if("memberLockedPets"===this.pageName&&Y.Aq$.isDefined(this.spineMonsterConfig)){new dt.c(this.game).createUIElements([this.spineMonsterConfig],this.page.spineBG)}Z.q.instance.prodigy.audio.stopVoice()}generateGearIcons(q,K){let z=null;const Y=[{category:"boots",count:0},{category:"hat",count:0},{category:"outfit",count:0},{category:"weapon",count:0}],X=[];for(let Z=0;Z{"use strict";z.d(K,{v:()=>ht});var Y=z(62459),Q=z(88022),X=z(51742),Z=z(35120),J=z(60881),tt=z(11682),et=z(65050),it=z(41674),st=z(15485),nt=z(46784),at=z(95057),rt=z(29281),ot=z(82680);class ht extends ot.W{get prefabGameObject(){return this._prefabGameObject}constructor(q,K,z,Z,J,tt,et=!1){super(q,K,200,{},[Q._.Ui_buttons_json,Q._.Ui_shared_json,X.c.Sfx_store_equip,X.c.Sfx_store_purchase,Q._.Ui_member_jar_json]),this.prefabRoot=null,this._prefabComponent=null,this._youtubeVideoComponent=null,this._isVideoLoaded=!1,this._isPlayerError=!1,this._minThresholdReached=-1,this._showUpgrade=!1,this._youtubeID=tt,this._analyticSource=z,this._analyticEvents=Y.Aq$.isDefined(J)?J:{conversionFunnelName:"",conversionFunnelMetadata:""},this._analyticEvents.conversionStaticOrVideo=void 0===this._analyticEvents.conversionStaticOrVideo||""===this._analyticEvents.conversionStaticOrVideo?at.R.Video:this._analyticEvents.conversionStaticOrVideo,this._showUpgrade=et,this.currentInterfaceName=nt.B.MembershipYouTubeAd,this.setCloseCallback(Z)}create(){var q;super.create();const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=Z.q.instance.prodigy.gameContainer.get("983-05a7");this._prefabGameObject=z.load(ht.MEMBERSHIP_YOUTUBE_AD_PREFAB),this.prefabRoot.addChild(this._prefabGameObject.legacyTransform.group),this._prefabComponent=this._prefabGameObject.findComponentInChildren(rt.X),this._prefabComponent.closeButton.onClick.add(this.closeClicked,this),this._prefabComponent.memberButton.onClick.add(this.memberClicked,this),K.hasMembership()&&(this._prefabComponent.memberButton.GameObject.active=this._showUpgrade),this._youtubeVideoComponent=this._prefabComponent.ytVideo,this._youtubeVideoComponent.onPlayerReady.add(this.playerReadyHandler,this),this._youtubeVideoComponent.onPlayerError.add(this.playerErrorHandler,this),this._youtubeVideoComponent.onPlayerStateChange.add(this.playerStateChangeHandler,this),(null===(q=this._youtubeID)||void 0===q?void 0:q.length)>0&&this._youtubeVideoComponent.applyVideoURL(this._youtubeID),K.updateMembershipVideoAdData(this._youtubeID),this.fireInterfaceEvent({interfaceType:it.Wm.InfoPanel,originID:this._analyticSource,originType:it.$N.ButtonClick,instanceType:et.N.Interface})}playerReadyHandler(){this._isVideoLoaded=!0,this._minThresholdReached=0;this.game.input.keyboard.addKey(J.D.SPACEBAR).onDown.add(this.onKeyDown,this),this.visible||this.setYTVideoActive(!1)}onKeyDown(){if(this._youtubeVideoComponent&&this._youtubeVideoComponent.getPlayerState()===tt.w.Playing){this._youtubeVideoComponent.stopVideo(!1);this.game.input.keyboard.addKey(J.D.SPACEBAR).onDown.remove(this.onKeyDown,this)}}playerErrorHandler(){this._isPlayerError=!0}playerStateChangeHandler(){this._youtubeVideoComponent&&this._youtubeVideoComponent.getPlayerState()===tt.w.Playing&&!this.visible&&this._youtubeVideoComponent.stopVideo(!0)}closeClicked(){this._segment.purchase.sendFunnelQuit("Click-Membership","Close-Clicked"),this.fireButtonEvent({buttonName:st.k.X,interfaceType:it.Wm.InfoPanel}),this.fireInterfaceEvent({interfaceType:it.Wm.InfoPanel,originType:it.$N.ButtonClick,originID:st.k.X,closeMethod:it.Lv.X},{duration:this._minThresholdReached.toString()}),this.close()}memberClicked(){const q=Z.q.instance.prodigy.gameContainer,K=q.get("ad2-c5b2").player;K.hasMembership()&&!K.hasLegacyMembership()||(q.get("20f-5f67").purchase.sendFunnelStep("Click-Membership"),this.fireButtonEvent({buttonName:st.k.BecomeAMember,interfaceType:it.Wm.InfoPanel}),Z.q.instance.prodigy.audio.stopVoice(),Z.q.instance.prodigy.open.membershipParent(void 0,this._analyticEvents,this._showUpgrade,void 0,!0))}setActive(q){super.setActive(q),this.setYTVideoActive(q),this._prefabComponent.memberJar.active=q}setYTVideoActive(q){this._youtubeVideoComponent&&(this._youtubeVideoComponent.setVisible(q),q?this._youtubeVideoComponent.playVideo():this._youtubeVideoComponent.stopVideo(!0))}update(){if(super.update(),this._youtubeVideoComponent&&this._minThresholdReached<100)if(this._youtubeVideoComponent.getPlayerState()===tt.w.Playing){const q=this._youtubeVideoComponent.getPercentPlayed();q>this._minThresholdReached&&(this._minThresholdReached=q)}else this._youtubeVideoComponent.getPlayerState()===tt.w.Ended&&(this._minThresholdReached=100)}destroy(){this.game.input.keyboard.addKey(J.D.SPACEBAR).onDown.remove(this.onKeyDown,this),this._prefabComponent&&(this._prefabComponent.closeButton.onClick.dispose(),this._prefabComponent.memberButton.onClick.dispose()),this._prefabGameObject&&this._prefabGameObject.destroy(),this._youtubeVideoComponent&&(this._youtubeVideoComponent.onPlayerReady.dispose(),this._youtubeVideoComponent.onPlayerError.dispose(),this._youtubeVideoComponent.onPlayerStateChange.dispose(),this._youtubeVideoComponent.destroy()),this._prefabGameObject=null,this._prefabComponent=null,this._youtubeVideoComponent=null,super.destroy()}}ht.MEMBERSHIP_YOUTUBE_AD_PREFAB=134},29281:(q,K,z)=>{"use strict";z.d(K,{X:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(11682);let J=class extends Q.uAl{constructor(){super(...arguments),this.closeButton=null,this.memberButton=null,this.memberButtonDownText=null,this.memberButtonOverText=null,this.memberButtonUpText=null,this.titleText=null,this.ytVideo=null,this.memberJar=null}};(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],J.prototype,"closeButton",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],J.prototype,"memberButton",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"memberButtonDownText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"memberButtonOverText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"memberButtonUpText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"titleText",void 0),(0,Y.Cg)([(0,Q.MnK)(Z.H),(0,Y.Sn)("design:type",Z.H)],J.prototype,"ytVideo",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"memberJar",void 0),J=(0,Y.Cg)([(0,Q.EVk)("MembershipYouTubeAdPrefab")],J)},82680:(q,K,z)=>{"use strict";z.d(K,{W:()=>ct});var Y=z(62459),Q=z(95891),X=z.n(Q),Z=z(88022),J=z(35120),tt=z(77938),et=z(52491),it=z(73797),st=z(65050),nt=z(41674),at=z(85515),rt=z(28962),ot=z(95130),ht=z(48951);class ct extends ot.D{get isModalWithTransparency(){return this._isModalWithTransparency}get onCreate(){return this._onCreate}set pendingClose(q){this._pendingClose=q}set currentInterfaceName(q){this._currentInterfaceName=q}constructor(q,K,z=null,Q,X=[]){super(q,K),this.isModal=!0,this.isFullScreenUI=!1,this.isLoaded=!1,this.assetID=null,this.isNotificationCell=!1,this.skipStopPlayer=!1,this.skipSetActiveMenuOnClose=!1,this.skipRenderTransparencyLayer=!1,this.background=null,this.uiElementTemplates=[],this._isModalWithTransparency=!1,this.onClose=null,this.uiElements=[],this.uiRoot=null,this.configModifiers=null,this.onLoadCallbacks=[],this.configObj=null,this._onCreate=new Y.HN0,this._pendingClose=!1,this._currentInterfaceName="",this._pendingInputReenable=!1,this._segment=J.q.instance.prodigy.gameContainer.get("20f-5f67"),Y.Aq$.isDefined(J.q.instance.prodigy.notifications)&&J.q.instance.prodigy.notifications.clearNotifications(),this.background=J.q.instance.prodigy.create.element(this),this.configModifiers=Y.Aq$.isDefined(Q)?Q:{},Y.Aq$.isDefined(this.configModifiers.isModal)&&(this.isModal=this.configModifiers.isModal),Y.Aq$.isDefined(z)&&(this.assetID=z),Y.Aq$.isDefined(this.assetID)?(J.q.instance.game.input.enabled=!1,this._pendingInputReenable=!0,this.startLoad(X.concat(Z._.Font_ui_json),this.startLoadComplete.bind(this))):Y.VyI.log("Config file for this UI has not been specified",Y.$bb.Error),this.onLoadCallbacks=[]}init(q){q.addChild(this),this.process()}close(){J.q.instance.game&&J.q.instance.prodigy&&!this.skipSetActiveMenuOnClose&&J.q.instance.prodigy.open.setMenuInactive(this);try{Y.Aq$.isDefined(this.onClose)&&this.onClose.apply(this)}catch(e){Y.VyI.log(`Error in Menu Callback: ${e}`,Y.$bb.Error)}Y.Aq$.isDefined(J.q.instance.game)&&(this._pendingInputReenable&&(this._pendingInputReenable=!1,J.q.instance.game.input.enabled=!0),J.q.instance.prodigy.open.close(this)),this.isFullScreenUI&&this.setGameRenderState(!0),this.destroy()}processConfigObj(){if(Y.Aq$.isDefined(this.assetID)&&(this.configObj=X().cloneDeep(tt.t.getItem("ui",this.assetID).data)),Y.Aq$.isDefined(this.configModifiers)&&Y.Aq$.isDefined(this.configObj.elements)){if(Y.Aq$.isDefined(this.configModifiers.modifyProperty))for(let q=0;q{"function"==typeof q&&q()})),this.onLoadCallbacks=[]}startLoadComplete(){this.isLoaded=!0}startLoad(q,K){J.q.instance.prodigy.load.assets(q,K)}createUIElements(q,K){const z=new ht.c(J.q.instance.game);Y.Aq$.isDefined(q.elements)&&(this.uiRoot=new ot.D(J.q.instance.game,K),this.uiRoot.populate({type:"UIElement",width:K.width,height:K.height}),this.uiElements=z.createUIElements(q.elements,this.uiRoot)),Y.Aq$.isDefined(q.templates)&&(this.uiElementTemplates=q.templates)}getInjectedValue(q){return J.q.instance.prodigy.gameContainer.get(q)}setElementAsModal(q){this._isModalWithTransparency=q,J.q.instance.prodigy.open.bitmapCacheGameRender(q,this)}destroy(q){this._onCreate.dispose(),this.uiElements.length=0,super.destroy(q)}addInterfaceEventCommonProperties(q){var K,z;return null!==(K=q.interfaceName)&&void 0!==K||(q.interfaceName=this._currentInterfaceName),null!==(z=q.interfaceType)&&void 0!==z||(q.interfaceType=nt.Wm.Menu),q}fireInterfaceEvent(q,K){const z=Object.assign({instanceType:st.N.Interface},this.addInterfaceEventCommonProperties(q));this._segment.featureCommon.sendInterfaceEvent(z,K)}fireButtonEvent(q,K){const z=Object.assign(Object.assign({},this.addInterfaceEventCommonProperties(q)),{saveClickInfo:q.buttonName});this._segment.featureCommon.sendButtonEvent(z,K)}fireTabEvent(q,K){this._segment.featureCommon.sendTabEvent(this.addInterfaceEventCommonProperties(q),K)}}},91315:(q,K,z)=>{"use strict";z.d(K,{p:()=>J});var Y=z(62459),Q=z(88022),X=z(35120),Z=z(82680);class J extends Z.W{constructor(q,K,z,X){super(q,K,Y.Aq$.isDefined(z)?z:3,X,[Q._.Ui_shared_json,Q._.Font_general_json]),this.timer=null,this.contentText=null,this.currentText=null,this.okayButton=null,this.okayText=null,this.yesButton=null,this.noButton=null,this.closeButton=null}preprocess(q,K=null,z=null){let Q=K;(!Y.Aq$.isDefined(K)||"pumpkin"!==K&&"star-shard-small"!==K&&"snowflake-small"!==K)&&(Q=null),this.currentText=q;const X=Y.Aq$.isDefined(Q)?`[${K}] ${z}`:z;this.updateConfigModifierProperty("titleBanner","text",X),this.updateConfigModifierProperty("titleBanner","visible",Y.Aq$.isDefined(z)),this.updateConfigModifierProperty("contentText","text",q),this.queuePostCreateCallback(this.setTimerText.bind(this,q),this.openTween.bind(this))}close(q){Y.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),super.close(),Y.Aq$.isDefined(q)&&q()}setOkay(q=null,K){this.okayButton.visible=!0,this.okayText.setText(Y.Aq$.isDefined(q)?q:X.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("BUTTON_OKAY_UPPERCASE")),this.okayButton.onClickCallback=()=>{this.close(K)}}setConfirm(q,K){this.yesButton.visible=!0,this.yesButton.onClickCallback=()=>{this.close(q)},this.noButton.visible=!0,this.noButton.onClickCallback=()=>{this.close(K)}}setConfirmGeneric(q,K,z){this.yesButton.visible=!0,this.yesButton.onClickCallback=()=>{this.close(q)},this.noButton.visible=!0,this.noButton.onClickCallback=()=>{this.close(K)},this.closeButton.visible=!0,this.closeButton.onClickCallback=()=>{this.close(z)}}setTimerText(q){Y.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),Y.Aq$.isDefined(q)&&this.setText(q,(new Date).getTime())}setText(q,K){if(Y.Aq$.isDefined(this.game))if(Y.Aq$.isDefined(this.contentText))if(q.indexOf("XTIMERX")>=0){const z=(new Date).getTime(),Y=this.processTime(z-K);this.currentText=q,this.contentText.setText(q.replace("XTIMERX",Y)),this.timer=window.setTimeout(this.setText.bind(this,q,K),500)}else this.currentText!==q&&(this.currentText=q,this.contentText.setText(q));else Y.VyI.log("ERROR: Attempting to set text before finished loading message.",Y.$bb.Error)}setCloseButton(q,K=null){this.closeButton.visible=q,this.closeButton.onClickCallback=()=>{this.close(K)}}processTime(q){if(q<=0)return"00:00";const K=Math.floor(q/36e5),z=Math.floor((q-36e5*K)/6e4),Y=Math.floor((q-36e5*K-6e4*z)/1e3);let Q="",X="",Z="";return Q=0===K?"00":K<10?`0${K}`:`${K}`,X=0===z?"00":z<10?`0${z}`:`${z}`,Z=0===Y?"00":Y<10?`0${Y}`:`${Y}`,"00"===Q?`${X}:${Z}`:K<24?`${Q}:${X}:${Z}`:`${Math.floor(K/24)} days`}}},21738:(q,K,z)=>{"use strict";z.d(K,{y:()=>tt});var Y=z(62459),Q=z(35120),X=z(71134),Z=z(24110),J=z(82680);class tt extends J.W{get prefab(){return this._prefab}get prefabContainer(){var q;return null!==(q=this._prefabContainer)&&void 0!==q?q:this._prefab}constructor(q,K,z,Q,X=!0,Z,J=!1){super(q,K,200,void 0,[]),this.onPrefabLoaded=new Y.HN0,this.onClosed=new Y.HN0,this._closeCallback=null,this.createContainer=!0,this._closeCallback=Q,this.prefabID=z,this._updateGameObject=X,this._injectablePropertiesDictionary=Z,this.obeyMenuStackVisibility=J}create(){super.create();const q=[];if(this.createContainer||this._injectablePropertiesDictionary){if(this._prefabContainer=new Y._mx,this._prefabContainer.addComponent(Y.dLy),this.createContainer){this._prefabContainer.addComponent(Z.B).getRootContainer().setParent(this)}if(this._injectablePropertiesDictionary){const K=this._prefabContainer.addComponent(Y.bE_);for(const z in this._injectablePropertiesDictionary)K.Container.bind(z).toConstantValue(this._injectablePropertiesDictionary[z]),q.push({injectionName:z,data:this._injectablePropertiesDictionary[z]})}}Q.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(this.prefabID,this._prefabContainer,void 0,q).then((q=>{var K;this._prefab=q,q.legacyTransform?this.addChild(q.legacyTransform.group):null===(K=this._rearOverlay)||void 0===K||K.destroy(),q.onDestroy.add(this.close,this);const z=q.findComponentInChildren(X.l,!0);z&&z.onClose.add(this.close.bind(this)),this.onPrefabLoaded.dispatch(q)})).catch((q=>{Y.VyI.log(`Failed to load prefab menu: ${Y.RQr.stringify(q)}`,Y.$bb.Error)}))}update(){super.update(),this._updateGameObject&&this.prefabContainer&&!this.prefabContainer.parent&&this.prefabContainer.update()}setActive(q){this.prefabContainer.active!==q&&this.obeyMenuStackVisibility&&(this.prefabContainer.active=q,super.setActive(q))}close(){var q,K,z,Y;this._prefab&&(this._prefab.active=!1),null===(q=this._prefab)||void 0===q||q.onDestroy.remove(this.close,this),this._prefabContainer?null===(K=this._prefabContainer)||void 0===K||K.destroyDeferred():null===(z=this._prefab)||void 0===z||z.destroyDeferred(),null===(Y=this._closeCallback)||void 0===Y||Y.call(this),this._closeCallback=null,this.onClosed.dispatch(),this._prefabContainer=null,this._prefab=null,this.onClosed.dispose(),this.onPrefabLoaded.dispose(),super.close()}}},99183:(q,K,z)=>{"use strict";z.d(K,{k:()=>Wt});var Y=z(62459),Q=z(95891),X=z(88022),Z=z(99625),J=z(51742),tt=z(65240),et=z(35120),it=z(15521),st=z(91207),nt=(z(34829),z(77938)),at=z(39984),rt=z(55734),ot=z(129),ht=z(47223),ct=z(95946),dt=z(55122),lt=z(73797),ut=z(51790),ft=z(79512),bt=z(59599),pt=z(65050),vt=z(41674),gt=z(98623),mt=z(95057),yt=z(21097),_t=z(30226),Et=z(47255);class wt extends gt.H{constructor(q,K,z,Y,Q,X){super(q,K),this.levelUp=!1,this.openCallback=null,this.chests=[],this.locked=!1,this.chestOpened=null,this.rewards=null;const Z=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(this.openCallback=X,Math.random()>.6&&Z.getLevel()>=-5&&z){const q=0===Math.floor(2*Math.random()),K=110;this.chests.push(this.createChest(q?K:-K,Y)),this.chests.push(this.createChest(q?-K:K,Y.concat(Q),!0))}else this.chests.push(this.createChest(0,Y));this.rewards=et.q.instance.prodigy.create.element(this,0,0),this.initListeners()}createChest(q,K,z=!1){let Y=null,Q=null,Z=null;Y=et.q.instance.prodigy.create.element(this,q,0),Q=et.q.instance.prodigy.create.sprite(0,95,X._.General_battle_json,z?"member-chest-bottom":"chest-bottom"),Z=et.q.instance.prodigy.create.sprite(0,z?-25:0,X._.General_battle_json,z?"member-chest-closed":"chest-closed"),Q.inputEnabled=!0,Y.add(Q),Z.inputEnabled=!0,Y.add(Z);const J={element:Y,reward:K,specialChest:z,chestId:z?2:1,box:Q,lid:Z},tt=()=>{this.onDown(J)};return Z.events.onInputDown.add(tt,this),Q.events.onInputDown.add(tt,this),J}initListeners(){this.game.broadcaster.addAppListener(lt.cN.ShowMemberStars,(()=>{this.game.broadcaster.broadcast(lt.hw.MemberStarsDone,this.game,[this.levelUp])}),this),this.onDestroy.add(this.stopListeners,this)}stopListeners(){Y.Aq$.isDefined(this.chestOpened)&&Y.Aq$.isDefined(this.chestOpened.box)&&this.chestOpened.box.destroy(),this.game.broadcaster.removeAppListener(lt.cN.ShowMemberStars,this)}onDown(q){var K,z;if(this.locked)return;const Q=et.q.instance.prodigy.gameContainer,X=Q.get("ad2-c5b2").player;if(this.chestOpened=q,q.specialChest&&!X.hasMembership()){const z={conversionFunnelName:Et.o.FunnelOpenMemberChestBattle},Y=_t.J.showYouTubeMembershipAd(this.game,!0)?mt.R.Video:mt.R.Static;return Q.get("20f-5f67").purchase.sendFunnelStart({type:"Open-Member-Chest-Battle",category:"Reward",contentId:et.q.instance.prodigy.world.getCurrentZone(),adType:Y}),Q.get("20f-5f67").container.sendContainerOpenedFailedEvent(vt.ZF.BattleMemberChest,null===(K=q.chestId)||void 0===K?void 0:K.toString(),yt.WE.MemberLocked,pt.N.EndOfBattle),void et.q.instance.prodigy.open.membershipInfo(void 0,z)}q.lid.y=-30,q.lid.frameName=q.specialChest?"member-chest-open":"chest-open",this.locked=!0,Q.get("20f-5f67").container.sendContainerOpenedEvent(q.specialChest?vt.ZF.BattleMemberChest:vt.ZF.BattleChest,null===(z=q.chestId)||void 0===z?void 0:z.toString(),pt.N.EndOfBattle),this.animateIconPopcorn(q),Y.Aq$.isDefined(this.openCallback)&&(et.q.instance.prodigy.audio.playSFX(32,q.specialChest?"chestOpenMember":"chestOpen",null,.6),setTimeout((()=>{this.openCallback(q.specialChest)}),2500))}animateIconPopcorn(q){const K=[];for(let z=0;z{this.visible=!0};X.onStart.add(Z,K[z]),X.to({y:400},600,Y.GS3.Quadratic.In),X.start(),this.game.add.tween(K[z],this).to({x:Y.cj9.between(-500,500),angle:Math.floor(360*Math.random())},1200,Y.GS3.Linear.None).delay(Q).to({alpha:0},100,Y.GS3.Linear.None).start()}}}var Tt=z(43531),St=z(98998),At=z(94236);class Ct{constructor(q,K,z,Y,Q){this.currentCreature=q,this.originalCreatureCopy=K,this.menuFactory=z,this.onFinalSummaryClosed=Q,this.onPopupCreated=Y}launchSummaryPopups(){At.K.openEvolutionPromptIfEligible(this.currentCreature,this.originalCreatureCopy).then((()=>{const q=this.menuFactory.statSummary(this.currentCreature,this.originalCreatureCopy);q.setOnCreateCallback(this.onPopupCreated),q.setCloseCallback((()=>{const q=this.menuFactory.spellSummary(this.currentCreature,this.originalCreatureCopy);q.setOnCreateCallback(this.onPopupCreated),q.setCloseCallback(this.onFinalSummaryClosed)}))}),Y.RQr.createHandler("Failed to show summary screen"))}}var Ot,It=z(15485),Dt=z(46784),Rt=z(90633),Pt=z(17425),Mt=z(23748),Nt=z(22023),xt=z(57750),Lt=z(68910),kt=z(56942),Bt=z(19273),Ut=z(70123);class Ft{constructor(q,K,z,Y,Q=1){this._explodeDelayTimer=null,this._glitterDelayTimer=null,this.starComponent=Ut.j.createRenderer(kt.Q.Spine_member_star_explode_json,{type:"spine"}),this.starComponent.onLoaded.add((()=>{const q=245*(0===Q?1:Q);this._explodeDelayTimer=window.setTimeout(et.q.instance.prodigy.audio.playSound.bind(et.q.instance.prodigy.audio,23),q);const K=1633*(0===Q?1:Q);this._glitterDelayTimer=window.setTimeout(et.q.instance.prodigy.audio.playSound.bind(et.q.instance.prodigy.audio,24),K)})),new Bt._(q,K,[this.starComponent],z,Y),0===Q||1===Q?this.starComponent.playAnimation(Ft.ANIMATION_NAME):this.starComponent.playAnimationWithTimeScale(Ft.ANIMATION_NAME,1/Q)}stopAnimation(){var q;null===(q=this.starComponent)||void 0===q||q.setVisibility(!1),window.clearTimeout(this._explodeDelayTimer),window.clearTimeout(this._glitterDelayTimer),this._explodeDelayTimer=null,this._glitterDelayTimer=null}}Ft.ANIMATION_NAME="animation";class Gt extends Y.mcf{constructor(q,K){super(),K&&(K.addChild(this),this.zIndex=K.children.length),this.game=q,this.jarBack=et.q.instance.prodigy.create.group(this),this.jarMiddle=et.q.instance.prodigy.create.group(this),this.jarFront=et.q.instance.prodigy.create.group(this),this.spriteParentLoadWrap(0,0,X._.Popup_star_jar_json,"jar-back",this.jarBack),this.spriteParentLoadWrap(0,0,X._.Popup_star_jar_json,"jar-front",this.jarFront),this.cork=this.spriteParentLoadWrap(40,0,X._.Popup_star_jar_json,"cork",this.jarMiddle)}spriteParentLoadWrap(q,K,z,Y,Q){return et.q.instance.prodigy.create.sprite(q,K,z,Y,null,(q=>{Q.addChild(q)}))}fillJar(q){if(q>=1){this.jarFillLevel=q;const K=this.getSpriteFillFrame(q);et.q.instance.prodigy.create.sprite(0,0,X._.Popup_star_jar_json,K,null,(q=>{this.jarMiddle.addChildAt(q,0),this.filledStars=q}))}else q<0&&et.q.instance.prodigy.create.sprite(0,0,X._.Popup_star_jar_json,"dust",null,(q=>{this.jarMiddle.addChildAt(q,0)}))}fillJarAnimate(q,K,z=0){if(q>=1&&q!==this.jarFillLevel){this.jarFillLevel=q;const Q=this.getSpriteFillFrame(q);et.q.instance.prodigy.create.sprite(0,0,X._.Popup_star_jar_json,Q,null,(q=>{this.jarMiddle.addChildAt(q,0);const Q=this.game.add.tween(q,this).from({alpha:0},K,Y.GS3.Linear.None,!1,z);Q.onStart.add((()=>{et.q.instance.prodigy.audio.playSound(22)})),Q.onTweenComplete.add((()=>{Y.Aq$.isDefined(this.filledStars)&&this.filledStars.destroy(),this.filledStars=q})),Q.start()}))}}openJar(){et.q.instance.prodigy.audio.playSound(26);this.game.add.tween(this.cork,this).to({y:this.cork.y-100,alpha:0},1e3,Y.GS3.Cubic.Out,!0),this.doStarFlyOutAnimation(),this.doStarFadeAnimation()}doStarFadeAnimation(){let q=0;const K=[this.filledStars];for(q=this.jarFillLevel-1;q>0;q--){const z=et.q.instance.prodigy.create.sprite(0,0,X._.Popup_star_jar_json,`stars-fill-${q}`,null,(q=>{this.jarMiddle.addChildAt(q,0)}));K.push(z)}const z=2500/K.length;let Q=0;for(Q=0;Q=this.DAY?(z=Math.floor(q/this.DAY),K=Ot.Day):q>=this.HOUR?(z=Math.floor(q/this.HOUR),K=Ot.Hour):q>=this.MINUTE?(z=Math.floor(q/this.MINUTE),K=Ot.Minute):(z=Math.floor(q/this.SECOND),K=Ot.Second),this.tickCallback(z,K)}}class $t{constructor(q,K,z=null){this.showingMembership=!1,this._fillMemberJarComplete=!1,this._fadeDisplayComplete=!1,this.game=q,this.parentMenu=K,this.starController=new St.b,this.openCallback=z,K.onDestroy.add(this.destroy.bind(this))}beginAnimation(q){this.parentMenu.memberSectionContents.alpha=0;let K=2700;const z=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.starController.hasExpired()&&!z.hasMembership()&&this.starController.getNumberOfStoredStars()>0?K=700:setTimeout(this.showMemberStar.bind(this),700),this._fillMemberJarDelayHandler=()=>{this.fillMemberJar(q)},this._fadeDisplayDelayHandler=()=>{this.fadeDisplay(!0)},setTimeout(this._fillMemberJarDelayHandler,K),setTimeout(this._fadeDisplayDelayHandler,K)}forceMemberStarComplete(){var q,K;return!(!this._memberStarAnimation||this._fillMemberJarComplete||this._fadeDisplayComplete)&&(null===(q=this._fillMemberJarDelayHandler)||void 0===q||q.call(this),null===(K=this._fadeDisplayDelayHandler)||void 0===K||K.call(this),this._memberStarAnimation.stopAnimation(),!0)}createMemberStarsGain(){this.parentMenu.memberStarsGot.visible=!0,this.parentMenu.memberStarsGot.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText(this.parentMenu.getTeamSize()>1?"GAINED_MEMBER_STARS_EACH":"GAINED_MEMBER_STARS",this.parentMenu.xpGained.memberXp)),this.parentMenu.starJarTimer.visible=!1,this.parentMenu.wizardLevels.visible=!1,this.parentMenu.wizardLevelsWorth.visible=!1,this.parentMenu.starsInJarLabel.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,setTimeout(this.openCallback.bind(this.parentMenu,this.parentMenu.xpGained.memberXp,!1),1e3)}createExpiredJar(){this.starJar.fillJar(-1),this.parentMenu.starJarTimer.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,this.parentMenu.wizardLevels.visible=!1,this.parentMenu.bottomMemberTitleText.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("JAR_EXPIRED")),this.parentMenu.starsInJarLabel.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("JAR_BECOME_MEMBER")),this.parentMenu.wizardLevelsWorth.visible=!1,this.parentMenu.starsInJarLabel.x+=70,this.starJar.x+=125,this.starJar.y+=10,this.starController.doLoseStars(),setTimeout(this.parentMenu.showCloseButton.bind(this.parentMenu,!0),1500)}createRegularJar(q,K){const z=700,Q=1e3;this.starJar.fillJar(this.starController.calculateStarJarTier(this.starController.getNumberOfStoredStars()-K)),this.starJar.fillJarAnimate(this.starController.getStarJarTier(),Q,z),this.parentMenu.wizardLevelsValue.setText(q),this.parentMenu.starsInJarValue.setText(this.starController.getNumberOfStoredStars()-K),q<=0?(this.parentMenu.wizardLevels.visible=!1,this.parentMenu.wizardLevelsWorth.visible=!1,this.parentMenu.wizardLevelsValue.visible=!1):1===q&&this.parentMenu.wizardLevels.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("WIZARD_LEVEL"));const X={number:this.starController.getNumberOfStoredStars()-K},Z=this.game.add.tween(X,this).to({number:this.starController.getNumberOfStoredStars()},Q,Y.GS3.Quadratic.Out,!0,z),J=this.parentMenu.starsInJarValue;Z.onUpdate.add((()=>{J[xt.k.DESTROYED]||J.setText(Math.round(X.number))})),Z.onTweenComplete.add((()=>{J[xt.k.DESTROYED]||J.setText(X.number)})),this.createCountdownTimer(),this.setupJarClickables();const tt=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(this.starController.getNumberOfStoredStars()>0&&tt.hasMembership()){const q=800;this.parentMenu.bottomDisplayBlueStar.image.inputEnabled=!1,this.parentMenu.starJarTimer.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,setTimeout(this.openJar.bind(this),1700+q),this.parentMenu.bonusStarsButton.visible=!1}else setTimeout(this.parentMenu.showCloseButton.bind(this.parentMenu,!0),1700);for(let et=0;et{switch(this.parentMenu.jarTimeValue.setText(q.toString()),K){case Ot.Day:this.parentMenu.jarTimeLeft.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText(1===q?"COUNTDOWN_DAY_LEFT":"COUNTDOWN_DAYS_LEFT"));break;case Ot.Hour:this.parentMenu.jarTimeLeft.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText(1===q?"COUNTDOWN_HOUR_LEFT":"COUNTDOWN_HOURS_LEFT"));break;case Ot.Minute:this.parentMenu.jarTimeLeft.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText(1===q?"COUNTDOWN_MINUTE_LEFT":"COUNTDOWN_MINUTES_LEFT"));break;case Ot.Second:q>0&&this.parentMenu.jarTimeValue.setText("1"),this.parentMenu.jarTimeLeft.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText(0===q?"COUNTDOWN_MINUTES_LEFT":"COUNTDOWN_MINUTE_LEFT"))}}))}setupJarClickables(){this.parentMenu.bottomDisplayBlueStar.image.inputEnabled=!0,this.parentMenu.bottomDisplayBlueStar.image.events.onInputUp.add(this.onStarJarMembershipClick.bind(this)),this.parentMenu.bonusStarsButton.onUpCallback=this.onStarJarMembershipClick.bind(this)}onStarJarMembershipClick(){if(this.showingMembership)return;this.showingMembership=!0;const q=et.q.instance.prodigy.gameContainer,K={conversionFunnelName:Et.o.FunnelStarJar,conversionStage:"Member-Converted",conversionFunnelMetadata:null},z=_t.J.showYouTubeMembershipAd(this.game,!0)?mt.R.Video:mt.R.Static;q.get("20f-5f67").purchase.sendFunnelStart({type:"NonMember-Star-Jar",category:"Reward",contentId:void 0,adType:z}),this.parentMenu.fireButtonEvent({buttonName:It.k.BonusStars}),et.q.instance.prodigy.open.membershipInfo((()=>{this.showingMembership=!1;q.get("ad2-c5b2").player.hasMembership()&&(this.parentMenu.showCloseButton(!1),this.openJar())}),K)}openJar(){this.parentMenu.bottomDisplayBlueStar.image.inputEnabled=!1,this.parentMenu.starJarTimer.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,this.starJar.openJar(),this.parentMenu.starsInJarLabel.setText("Gained Stars:");const q=this.starController.claimStarJar()/this.parentMenu.getTeamSize(),K=et.q.instance.prodigy.gameContainer.get("20f-5f67");K.playerProgression.sendPlayerProgressionPointsEarnedEvent({pointType:"stars",pointCount:q},{instanceID:K.battle.currentBattleID,instanceType:pt.N.EndOfBattle}),setTimeout(this.openCallback.bind(this.parentMenu,q,!0),1e3)}}var Ht=z(73678),Vt=z(82680);class Wt extends Vt.W{constructor(q,K,z,Q,tt,it,st,nt,at=[],rt,ot=!0){var ht;super(q,K,Y.Aq$.isDefined(nt)?nt:19,rt?Object.assign({modifyProperty:[{element:"resultsTitle",property:"textKey",value:rt},{element:"titleBanner",property:"relativeWidth",value:.6}]},Wt.configModifiers):Wt.configModifiers,[X._.Ui_pvp_seasons_json,X._.Popup_star_jar_json,X._.Ui_education_badges_json,X._.Npc_face_noot_json,J.c.Sfx_results_screen,J.c.Sfx_jar_fill_ancient_game_gift_bundle_positive_open,J.c.Sfx_star_explode_ancient_game_magic_achievement_1,J.c.Sfx_star_appear_ancient_game_star_glitter,J.c.Sfx_jar_open_ancient_game_magic_bubble_open,J.c.Sfx_bar_fill,X._.Ui_battle_revamp_legacy_json].concat(at)),this.originalCreatures=[],this.summaryPopupControllers=[],this.drops=[],this.memberDrops=[],this.creatureDisplays=[],this.eventQueue=[],this.choseMemberChest=!1,this._timer=null,this._tweenInProgress=null,this.game=q,this.currentCreatures=z,this.xpGained=Q,this.drops=tt,this.memberDrops=it,this._skipChests=st,this._afterBattle=ot,this.currentInterfaceName=Dt.B.ResultsMenu,this.currentCreatures&&(this.starController=new St.b,this.starXP=this.calculateStarXP(null===(ht=this.xpGained)||void 0===ht?void 0:ht.memberXp,null==z?void 0:z.length),this.setupListeners(),this.cloneCreatures(),Y.Aq$.isDefined(nt)||this.queuePostCreateCallback(this.createCreatureDisplays.bind(this),this.setupUIElements.bind(this),this.buildEventsQueue.bind(this),this.buildCommonEventsQueue.bind(this),this.animateDropIn.bind(this)));et.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Z.l.ResultsSkipInteractable);this.fireInterfaceEvent({originType:vt.$N.AutoSurfaced}),this._segment.legacyPostBattleFlow.sendStart()}calculateStarXP(q,K){return Math.ceil(q*K)}getTeamSize(){return this.currentCreatures.length}showCloseButton(q){this.closeButton.visible=q}bottomSectionFadeOutAnimation(q,K=null){if(q&&!q[xt.k.DESTROYED]){const z=q.x,Q=()=>{q.x=z,this._tweenInProgress=null,Y.Aq$.isDefined(K)&&K()};this._tweenInProgress=this.game.add.tween(q,this),this._tweenInProgress.to({x:q.x-50,alpha:0},500,Y.GS3.Cubic.Out,!0).onTweenComplete.add(Q,this)}else Y.VyI.log("bottomSectionFadeOutAnimation no target specified.",Y.$bb.Error),Y.Aq$.isDefined(K)&&K()}bottomSectionFadeInAnimation(q,K=null){q.visible=!0,q.alpha=1,it.Z.bringToTop(q),this.game.add.tween(q,this).from({x:q.x+50,alpha:0},500,Y.GS3.Cubic.Out,!0).onTweenComplete.add((()=>{Y.Aq$.isDefined(K)&&K()}),this)}buildCommonEventsQueue(){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=q.hasCompletedTutorial();q.hasMembership()?(this.eventQueue.push(this.createJar.bind(this),this.bottomSectionFadeInAnimation.bind(this,this.bottomDisplayContainerMember)),this._skipChests?this.eventQueue.push(this.showCloseButton.bind(this,!0)):this.eventQueue.push(this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainerMember,this.runNextEvent.bind(this)),...this.buildChestsEvent(!0,this.drops,this.memberDrops))):!K||_t.J.shouldSuppressAd(q,void 0)?(this._skipChests?_t.J.shouldSuppressAd(q,void 0)&&this.eventQueue.pop():K?this.eventQueue.push(...this.buildChestsEvent(!_t.J.shouldSuppressAd(q,void 0),this.drops,this.memberDrops)):this.eventQueue.push(...this.buildChestsEvent(!1,this.drops,[])),_t.J.shouldSuppressAd(q,void 0)&&this.starController.hasExpired()&&this.eventQueue.push((()=>{this.starController.doLoseStars(),this.runNextEvent()})),this.eventQueue.push(this.showCloseButton.bind(this,!0))):(this._skipChests||this.eventQueue.push(...this.buildChestsEvent(!_t.J.shouldSuppressAd(q,void 0),this.drops,this.memberDrops)),this.eventQueue.push(this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainer,this.runNextEvent.bind(this)),this.createJar.bind(this),this.bottomSectionFadeInAnimation.bind(this,this.bottomDisplayContainerMember,this.runNextEvent.bind(this,4e3))))}buildEventsQueue(){this.eventQueue.push(this.runNextEvent.bind(this,300),this.showStarsEarned.bind(this),this.applyXPGainToTeam.bind(this,this.currentCreatures,this.xpGained.totalNonMemberXp),this.ftueNootEvolvePetsDialogue.bind(this),this.unlockAcademyDialogue.bind(this),this.unlockNootTowerDialogue.bind(this),...this.buildPopupEvents(),this.runNextEvent.bind(this,1500),this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainer,this.runNextEvent.bind(this)))}runNextEvent(q=0){q>0?this._timer=window.setTimeout(this.runNextEvent.bind(this,0),q):this.eventQueue.length>0&&this.eventQueue.shift()()}buildPopupEvents(){const q=[];return Q.times(this.currentCreatures.length,(K=>{q.push(this.playShineAnimation.bind(this,K),this.launchSummaries.bind(this,K))})),q}buildChestsEvent(q=!0,K=[],z=[]){return[this.createChests.bind(this,q,K,z),this.awardDrops.bind(this)]}cloneCreatures(){this.originalCreatures=[];for(let q=0;qthis.originalCreatures[q].getLevel()){if(this.currentCreatures[q].getAvailableEvolutions().length>0)return!0;if(this.originalCreatures[q].diffAttackSlots(this.currentCreatures[q].getLevel()).length>0)return!0;if(this.currentCreatures[q].getBaseMaxHearts()-this.originalCreatures[q].getBaseMaxHearts()>0)return!0}return!1}createCreatureDisplays(){let q=!0,K=0;const z=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").isMember();for(const Y of this.currentCreatures)this.creatureDisplays.push(this.createCreatureDisplay(Y)),q&&at.e.levelFromStars(Y.getStars()+this.xpGained.totalNonMemberXp,Y.creatureType,dt.s.activePlayerLevelCap)=100&&Y.xpBar.setPercentCompleteOffset(1,-20),q instanceof ot.a){Y.creatureName.setText(q.getFirstName());const K=q.getPlayerData().playerTransformation;if(K)Y.spriteHolder.add(et.q.instance.prodigy.create.sprite(0,0,st.E.getIconForType(K.transformType,K.transformID),null,{x:.5,y:.5}));else{const q=et.q.instance.prodigy.create.player(Y.spriteHolder,Q,1,0,50,!1,{isPreview:!0,hideMount:!0});q.reload((()=>{q.standStill()}))}}else if(q instanceof ht.s){Y.creatureName.setText(q.getFirstName());const K=et.q.instance.prodigy.create.character(Y.spriteHolder,q,1,0,50,!1,{isPreview:!0,hideMount:!0});K.reload((()=>{K.standStill()}))}else Y.creatureName.setText(q.source.name),this.loadPetIcon(Y,q.data.ID);const Z=Y.creatureDisplay.image;let J;return q instanceof rt.R&&(J=null===(z=null===(K=nt.t.getItem("pet",q.getID()))||void 0===K?void 0:K.data)||void 0===z?void 0:z.affinity),Z.loadTexture(X._.Ui_battle_revamp_legacy_json,`pet-icon-backers-${null!=J?J:ct.a.Astral}`),Y}close(){this.removeListeners(),window.clearTimeout(this._timer),this.fireInterfaceEvent({closeMethod:vt.Lv.CloseButton}),this._segment.legacyPostBattleFlow.sendEnd(),super.close()}setupListeners(){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;for(const K of this.currentCreatures)if(K.data===q.data){this.game.broadcaster.addAppListener(lt.ig.LevelUp,this.onMainPlayerLevelUp.bind(this),this,K);break}}removeListeners(){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;for(const K of this.currentCreatures)if(K.data===q.data){this.game.broadcaster.removeAppListener(lt.ig.LevelUp,this,K);break}}onMainPlayerLevelUp(){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getLevel();q<=Wt.MAX_LEVEL_TO_SEND_TUTORIAL_SEGMENT_EVENTS&&this.metricsManager.sendOnboardingFunnelEvent(`Reached Level ${q}`)}createChests(q=!0,K=[],z=[]){0===K.length&&0===z.length?this.runNextEvent():(this.chestGoldBackground.visible=!0,this.battleStarsEarned.visible=!1,this.bottomTitleText.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("OPEN_CHEST")),new wt(this.game,this.chestContainer,q,K,z,(q=>{this.choseMemberChest=q,this.runNextEvent()})),this.bottomSectionFadeInAnimation(this.bottomDisplayContainer))}createJar(){if(this.starJar){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.starController.hasExpired()&&this.starController.getNumberOfStoredStars()>0&&!q.hasMembership()&&this.bottomMemberTitleText.setText(et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("JAR_EXPIRED")),this.starJar.beginAnimation(this.starXP),this.runNextEvent()}}loadPetIcon(q,K){for(let Y=0;Y{this.runNextEvent(200)}))):this.runNextEvent()}launchSummaries(q){this.summaryPopupControllers.push(new Ct(this.currentCreatures[q],this.originalCreatures[q],et.q.instance.prodigy.open,(()=>{this.enableOverlay(!0)}),this.processSummaryPopupController.bind(this))),this.processSummaryPopupController()}showStarsEarned(){this.battleStarsEarned.visible=!0,this._tweenInProgress=this.game.add.tween(this.battleStarsEarned.scale,this),this._tweenInProgress.from({x:0,y:0},1e3,Y.GS3.Back.Out,!0).onTweenComplete.add((()=>{this._tweenInProgress=null,this.runNextEvent()}),this)}animateDropIn(){this._tweenInProgress=this.game.add.tween(this.woodBackground,this),this._tweenInProgress.from({y:this.woodBackground.y-1e3},1e3,Y.GS3.Cubic.Out,!0).onTweenComplete.add((()=>{this._tweenInProgress=null,this.runNextEvent()}),this)}processSummaryPopupController(){if(this.handleEvolutions(),this.summaryPopupControllers.length>0){this.summaryPopupControllers.shift().launchSummaryPopups()}else this.enableOverlay(!1),this.runNextEvent()}handleEvolutions(){for(let q=0;q0){let q=this.drops;this.choseMemberChest&&(q=q.concat(this.memberDrops)),et.q.instance.prodigy.open.gotItem(q,this.runNextEvent.bind(this),null,"battle-victory-drops",null,null,{source_type:tt.C.Container,instance_type:pt.N.EndOfBattle}),this.drops=[],this.memberDrops=[]}else this.runNextEvent()}setupUIElements(){this.closeButton.onClickCallback=()=>{this.fireButtonEvent({buttonName:It.k.X})};et.q.instance.prodigy.gameContainer.get("ad2-c5b2").isMember()?this.starJar=new $t(this.game,this,this.memberXPGained.bind(this)):this.showCloseButton(!0)}memberXPGained(q,K=!1){if(this.showCloseButton(!1),this.cloneCreatures(),K)this.eventQueue.push(...this.buildPopupEvents(),this.unlockAcademyDialogue.bind(this),this.unlockNootTowerDialogue.bind(this),this.showCloseButton.bind(this,!0));else{for(let q=this.currentCreatures.length-1;q>=0;q--)this.eventQueue.unshift(this.playShineAnimation.bind(this,q),this.launchSummaries.bind(this,q));Y.Aq$.isDefined(this.xpGained.gainInPvp)&&(this.eventQueue.length=0,this.eventQueue.unshift(this.showCloseButton.bind(this,!0)))}this.applyXPGainToTeam(this.currentCreatures,q,!0)}applyXPGainToTeam(q,K,z=!1){let Y=0;const Q=et.q.instance.prodigy.audio.playSound(33,!0),X=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Z=()=>{++Y>=q.length&&(Q.stop(),this.runNextEvent())};for(let J=0;JQ&&(X.hasCompletedTutorial()||X.kennel.isCreatureCurrentPlayer(Y)||(this._leveledUpCreature=Y),Y.changeCurrentHearts(q[J].getMaxHearts()))}}doStarsGainAnimation(q,K,z){const Q=this.currentCreatures.indexOf(q),X=this.creatureDisplays[Q],Z=q.getLevel(),J=at.e.levelFromStars(q.getStars()+K,q.creatureType,q.currentMaxLevel);let tt=at.e.getLevelPercent(q.getStars()+K,q.creatureType,q.currentMaxLevel);tt=Mt.z.clampedLerp(.085,1,tt);const it={percent:Mt.z.clampedLerp(.085,1,at.e.getLevelPercent(q.getStars(),q.creatureType,dt.s.activePlayerLevelCap)),level:Z};let st=it.percent;if(Z>=100||J{X.xpBar.setPercentCompleteOffset(it.percent,-20),st>it.percent&&(X.xpBarExplode.playAnimation("levelup"),it.level++,Y.Aq$.isDefined(this.levelUpSound)&&this.levelUpSound.stop(),this.levelUpSound=et.q.instance.prodigy.audio.playSFX(32,"levelUp"),setTimeout((()=>{X.levelNumberText.setText(it.level.toString())}),400)),st=it.percent}));const rt=1e3;for(let et=Z;et<=J&&et<=100;et++)if(100===et)nt.to({percent:1},rt,Y.GS3.Quadratic.Out);else if(et===J){const q=rt;nt.to({percent:tt},q,Y.GS3.Quadratic.Out)}else nt.to({percent:1},rt,Y.GS3.Quadratic.Out),nt.to({percent:0},1,Y.GS3.Linear.None);nt.onTweenComplete.add(z),nt.onTweenComplete.add((()=>{X.xpBarGlow.playAnimation("idle",!1)})),nt.start()}unlockAcademyDialogue(){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(q.hasCompletedTutorial()&&!et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Rt.B.BREADCRUMB_UNLOCK_ACADEMY,Rt.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE)&&et.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirementsDeprecated(12)&&q.backpack.hasItem("key",22)<=0){const q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),K=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);q.execute(K.getStateMachine(57),{game:this.game,menu:this},null)}else this.runNextEvent()}unlockNootTowerDialogue(){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(!et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Rt.B.FEATURE_TOWERS_PROMPT,Rt.B.NOOT_TOWER_PROMPT)&&Y.Aq$.isDefined(q.state.get("zone-academy"))&&et.q.instance.prodigy.world.getCurrentZone()!==Ht.A_.EARTHTOWER&&q.getLevel()>=25){const q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),K=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);q.execute(K.getStateMachine(190),{game:et.q.instance.game,menu:this,open:et.q.instance.prodigy.open,text:et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("DIALOGUE_GALE_17")},null),et.q.instance.prodigy.breadcrumbManager.resetBreadcrumbs(Rt.B.FEATURE_ACADEMY_TOWERS)}else this.runNextEvent()}ftueNootEvolvePetsDialogue(){const q=et.q.instance.prodigy.gameContainer,K=q.get("ad2-c5b2").player;if(!K.hasMembership()&&!K.hasCompletedTutorial()&&void 0!==this._leveledUpCreature){const K=nt.t.getItem("pet",this._leveledUpCreature.data.ID),z=Nt.P8.findNextEvolution(K);if(!z)return void this.runNextEvent();const Q=q.get("PrefabService").getPrefabFromGuid(Z.l.PetEvolutionPanel);et.q.instance.prodigy.gameContainer.get("983-05a7").loadFromJSONWithDependencies(Q,void 0,void 0,void 0,Z.l.PetEvolutionPanel).then((q=>{q.layer="legacyMenuLayer",this.configureEvolutionPrefab(q,K,z)})).catch((q=>{Y.VyI.log(`Error loading evolution FTUE prefab; ${q.message}`,Y.$bb.Error),this.runNextEvent()}))}else this.runNextEvent()}configureEvolutionPrefab(q,K,z){const Q="one_time_evolution_ftue_dialogue",X=new Tt.rD(this.game),Z=q.findComponentInChildren(bt.f),J=Z.GameObject.findComponentInChildren(Y.EYj),tt=q.findComponentInChildren(ut.s),[et,it]=q.findComponentsInChildren(ft.o),st=Nt.P8.getPetEvolutionGiftThreshold();q.transform.setPositionX(this.game.width/2),q.transform.setPositionY(this.game.height/3),tt.setElementalBanner(this._leveledUpCreature.getElement()),et.init(K),it.init(z),Z.setValue(!0),J.text+=st.toString(),this.fireInterfaceEvent({interfaceName:Q,interfaceType:vt.Wm.DialogBox,originType:vt.$N.AutoSurfaced}),X.addEvents([{dialogueData:X.dataProvider.get(1296),type:Tt.fA.DEFAULT,blockInput:!0}]),X.start(!0,(()=>{this.fireInterfaceEvent({interfaceName:Q,interfaceType:vt.Wm.DialogBox,closeMethod:vt.Lv.CloseDialog}),q.destroy(),this.runNextEvent()}))}}Wt.MAX_LEVEL_TO_SEND_TUTORIAL_SEGMENT_EVENTS=5,Wt.configModifiers={}},25286:(q,K,z)=>{"use strict";z.d(K,{g:()=>wt});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(99625),J=z(56942),tt=z(35120),et=z(49237),it=z(32259),st=z(17737),nt=z(65116),at=z(49037),rt=z(97518),ot=z(59347),ht=z(28152),ct=z(34603),dt=z(71072);let lt=class extends Q.uAl{init(q){var K,z,Y;const X=q.adConfig;let Z="";Q.Aq$.isDefined(X.thumbnailURL)?Z=`singleImage-${X.thumbnailURL}`:Q.Aq$.isDefined(X.thumbnailGUID)&&(Z=X.thumbnailGUID),null===(K=this._thumbnail)||void 0===K||K.setAsset(Z),null===(z=this._thumbnail2)||void 0===z||z.setAsset(Z),this._titleKey.setLocalizationKey(X.title),this._bodyKey.setLocalizationKey(X.body),this._canTeleportComponent&&(this._canTeleportComponent.mapTag=X.travelZone),this._teleportComponent&&(this._teleportComponent.mapTag=X.travelZone),X.travelZone&&(this._teleportMessage.key=this._localizer.getText("TRAVEL_CONFIRM_MESSAGE",tt.q.instance.prodigy.world.getZone(X.travelZone.split("-")[0]).name)),null===(Y=this._openVideo)||void 0===Y||Y.loadVideoConfig(q.videoConfig),this.Id=q.videoConfig.adID}};(0,Y.Cg)([(0,Q.MnK)(ct._),(0,Y.Sn)("design:type",ct._)],lt.prototype,"_thumbnail",void 0),(0,Y.Cg)([(0,Q.MnK)(ct._),(0,Y.Sn)("design:type",ct._)],lt.prototype,"_thumbnail2",void 0),(0,Y.Cg)([(0,Q.MnK)(rt.R),(0,Y.Sn)("design:type",rt.R)],lt.prototype,"_titleKey",void 0),(0,Y.Cg)([(0,Q.MnK)(rt.R),(0,Y.Sn)("design:type",rt.R)],lt.prototype,"_bodyKey",void 0),(0,Y.Cg)([(0,Q.MnK)(nt.$),(0,Y.Sn)("design:type",nt.$)],lt.prototype,"_canTeleportComponent",void 0),(0,Y.Cg)([(0,Q.MnK)(at.q),(0,Y.Sn)("design:type",at.q)],lt.prototype,"_teleportComponent",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.S),(0,Y.Sn)("design:type",ot.S)],lt.prototype,"_teleportMessage",void 0),(0,Y.Cg)([(0,Q.MnK)(dt.V),(0,Y.Sn)("design:type",dt.V)],lt.prototype,"_openVideo",void 0),(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],lt.prototype,"_localizer",void 0),lt=(0,Y.Cg)([(0,Q.EVk)("TemplateAd",ht.Y.uiAd)],lt);var ut=z(83142),ft=z(15485),bt=z(46784),pt=z(41674),vt=z(90633),gt=z(56903),mt=z(69698),yt=z(95130),_t=z(80060),Et=z(82680);class wt extends Et.W{constructor(q,K,z,Y){super(q,K,22,wt.configModifiers,[X._.Ui_shared_json,X._.Ui_social_feed_json,X._.Ui_towertown_misc_json,X._.Ui_towertown_samples_json]),this._adCellList=[],this._sharingTimeoutTimer=null,this._deletingTimeoutTimer=null,this._activePlayer=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,super.setCloseCallback(z),this._openedWith=Y,this._openedAtTime=this._timeManager.getServerTimeMs(),this.currentInterfaceName=bt.B.WizardWatch}preprocess(){if(!tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(vt.B.FEATURE_SOCIAL_FEED,vt.B.BREADCRUMB_SOCIAL_FEED_OPENED)){tt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(vt.B.FEATURE_SOCIAL_FEED,vt.B.BREADCRUMB_SOCIAL_FEED_OPENED);const q="voice-10-85";tt.q.instance.prodigy.load.assets([q],tt.q.instance.prodigy.audio.playVoice.bind(tt.q.instance.prodigy.audio,q,null,18,4))}const q=gt.A.getWizardWatchData().catch(Q.RQr.createHandler("Error loading data for Wizard Watch ads")).then((q=>(0,Y.sH)(this,void 0,void 0,(function*(){return new Promise((q=>{this._adData=gt.A.getActiveEntityAds();const K=[J.Q.Spine_socialfeed_poof_json];for(const z of this._adData)Q.Aq$.isDefined(z.thumbnailURL)?K.push(`singleImage-${z.thumbnailURL}`):Q.Aq$.isDefined(z.thumbnailGUID)&&K.push(`singleImage-${z.thumbnailGUID}`);tt.q.instance.prodigy.load.assets(K,q)}))})))),K=tt.q.instance.prodigy.titansNetworkHandler.getTitans(),z=new Promise((q=>{this.queuePostCreateCallback(q)})),X=tt.q.instance.prodigy.gameContainer.get("119-35f9").awaitLoad().catch(Q.RQr.createHandler("Error loading Weekend Event Data for WW ad"));Promise.all([q,K,z,X]).then((()=>{this.fillView(),this.setButtons();const q=this._adData.map(((q,K)=>({post_id:q.ID,post_name:q.title,post_rank:K+1})));this.fireInterfaceEvent({interfaceType:pt.Wm.DialogBox,originType:"from-menu"===this._openedWith?pt.$N.ButtonClick:pt.$N.AutoSurfaced,originID:ft.k.Feed},{item_list:q})}))}setButtons(){this.closeButton.onClickCallback=(q,K=!1)=>{this.sendButtonClickedEvent(ft.k.X),this.close(q,K)}}setupScrollBar(){Q.Aq$.isDefined(this.feedScrollView)&&(this.feedScrollView.linkScrollBar(this.feedScrollBar),this.feedScrollView.setToScrollPercent(0))}fillView(){this.destroyed||(this.setupAds(),this.noFeedAll.visible=this._adCellList.length<=0,this.feedContents.layoutElement.calculateChildren(),this.feedScrollView.setupVisibleIndices(),this.feedScrollView.calculateMaxScrollDist(),this.setupScrollBar(),this.feedScrollBar.visible=this._adCellList.length>0,gt.A.getUnseenActiveAdCount()>0&&this._adCellList.length>0&&!this._activePlayer.encounters.hasSeenAd(this._adData[0].ID)&&this._adCellList[0].findComponentInChildren(st.n).run(),gt.A.markActiveAdsSeen())}fillAdGroup(q,K){const z=tt.q.instance.prodigy.gameContainer.get("983-05a7");let Y=0;for(let X=0;Xthis.close(null,!0)));const Y=q.findComponentInChildren(lt);if(Y)Y.init(this.createFullAdConfig(J));else for(const z of q.findComponentsInChildren(ut.D))z.loadVideoConfig({adID:J.ID})}catch(e){Q.VyI.log(String(e),Q.$bb.Error),tt=null}tt&&(K.addChild(st),K.gameObjects.push(tt),this.feedScrollView.frameworkButtonsArray.push(...nt),this._adCellList.push(tt),st.y=Y*wt.AD_HEIGHT,Y++)}}createFullAdConfig(q){return{adConfig:{thumbnailGUID:q.thumbnailGUID,thumbnailURL:q.thumbnailURL,title:q.title,body:q.body,travelZone:q.travelZone},videoConfig:{adID:q.ID,videoID:q.videoConfig.videoID,header:q.videoConfig.videoCaption?q.videoConfig.videoTitle:void 0,message:q.videoConfig.videoCaption?q.videoConfig.videoBody:void 0}}}clearScrollView(){Q.Aq$.isDefined(this.feedScrollBar)&&(this.feedScrollBar.visible=!1),Q.Aq$.isDefined(this.feedScrollView)&&this.feedScrollView.clearScrollView();for(let q=0;q0){const q=new yt.D(this.game,this.feedContents);q.gameObjects=[],q.rect=new Q.M_G(0,0,wt.AD_WIDTH,this._adData.length*wt.AD_HEIGHT),this.fillAdGroup(this._adData,q)}}sendCloseEvent(q=!1){const K=(this._timeManager.getServerTimeMs()-this._openedAtTime)/1e3;this.fireInterfaceEvent({interfaceName:bt.B.WizardWatch,interfaceType:pt.Wm.DialogBox,closeMethod:q?pt.Lv.TeleportButton:pt.Lv.CloseButton},{duration:K})}sendPostViewedEvents(){var q;Q.Aq$.isDefined(null===(q=this.feedScrollView)||void 0===q?void 0:q.objectsViewed)?this.feedScrollView.objectsViewed.forEach((q=>{const K=q.findComponentInChildren(lt);if(K){const q=this._adData.find((q=>q.ID===K.Id)),z=this._adData.findIndex((q=>q.ID===K.Id));q&&z>=0&&tt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendPostViewedEvent({interfaceName:bt.B.WizardWatch,interfaceType:pt.Wm.DialogBox,postTitle:q.title,postID:q.ID.toString(),postRank:z+1})}})):Q.VyI.log("SocialFeed.sendPostViewedEvents: Scroll view objectsViewed is not defined",Q.$bb.Warning)}sendButtonClickedEvent(q,K){this.fireButtonEvent({interfaceType:pt.Wm.DialogBox,buttonName:q},{notification_id:K})}destroy(q){this.clearScrollView(),Q.Aq$.isDefined(this.allButton)&&(this.allButton.onUpCallback=null,this.allButton=null),Q.Aq$.isDefined(this.closeButton)&&(this.closeButton.onClickCallback=null,this.closeButton=null),this._adData=[],this.allTab=null,this.allBadge=null,this.allBadgeNumber=null,this.inactiveAllBadge=null,this.inactiveAllBadgeNumber=null,this.feedScrollView=null,this.feedScrollBar=null,this.noFeedAll=null,this.feedContents=null,super.destroy(q)}}wt.AD_HEIGHT=335,wt.AD_WIDTH=875,wt.configModifiers={modifyProperty:[{element:"allButton",property:"visible",value:!1},{element:"allTab",property:"visible",value:!1},{element:"allBadge",property:"visible",value:!1},{element:"allBadgeNumber",property:"visible",value:!1},{element:"inactiveAllBadge",property:"visible",value:!1},{element:"inactiveAllBadgeNumber",property:"visible",value:!1},{element:"meButton",property:"visible",value:!1},{element:"meTab",property:"visible",value:!1},{element:"friendButton",property:"visible",value:!1},{element:"friendTab",property:"visible",value:!1},{element:"noFeedMe",property:"visible",value:!1},{element:"noFeedFriend",property:"visible",value:!1}]},(0,Y.Cg)([(0,Q.fFd)("0f2-d6bd"),(0,Y.Sn)("design:type",mt.V)],wt.prototype,"_timeManager",void 0)},94236:(q,K,z)=>{"use strict";z.d(K,{K:()=>wt});var Y=z(8674),Q=z(62459),X=z(62248),Z=z(99625),J=z(62886),tt=z(60157),et=z(90633),it=z(65240),st=z(73797),nt=z(80060),at=z(35120),rt=z(91207),ot=z(77938),ht=z(55734),ct=z(88038),dt=z(80711),lt=z(51972),ut=z(41674),ft=z(15485),bt=z(46784),pt=z(22023),vt=z(30226),gt=z(47255),mt=z(95057),yt=z(37941),_t=z(76277),Et=z(58347);class wt extends yt.l{constructor(q,K,z,Y,Q){super(q,K,z,Y,20),this.evolutionTime=5e3,this.modalContainerNames=["stopButtonContainer","okayButtonContainer","evolveButtonContainer"],this.queuePostCreateCallback(this.sparkle.bind(this),this.fillElements.bind(this),this.setupButtons.bind(this),this.sendSubsequentEvolutionInterfaceEvent.bind(this)),this._evolutionSource=Q,this.startEvolutionLevel=Y.getLevel(),this.availableEvolutions=z.getAvailableEvolutions()}isRequired(){return this.currentCreature.getLevel()>this.startEvolutionLevel&&this.availableEvolutions.length>0}getBannerLocKey(){return"SUMMARY_POPUP_EVOLUTION"}showButtonSet(q){for(let K=0;K{this.sendAnalyticsFunnelStage1(),this.fireButtonEvent({buttonName:ft.k.EvolveNow}),at.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:525,yPosition:500,arrowXRelPos:.5,arrowDirection:lt.i.DOWN})}):this.evolveButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:ft.k.EvolveNow}),this.performEvolution()},this.stopButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:ft.k.Stop}),this.stopEvolution()},this.okayButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:ft.k.Okay}),this.onOkayButtonPress()},this.closeButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:ft.k.Later}),this.closeTween()}}fillElements(){at.q.instance.prodigy.audio.playSFX(32,"popUpDisplay");const q=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q.hasMembership()?this.setActionText(at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("CREATURE_IS_EVOLVING",this.originalCreatureCopy.getFirstName())):this.setActionText(at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("CREATURE_TRYING_TO_EVOLVE",this.originalCreatureCopy.getFirstName())),this.currentCreature.getLevel()>=100&&this.evolveLaterText.setText(at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("DO_NOT_EVOLVE")),q.hasMembership()?(this.showButtonSet("stopButtonContainer"),this.startEvolutionTimer()):this.showButtonSet("evolveButtonContainer"),this.loadMonsterSprite(this.originalCreatureCopy.getID());let K=this.originalCreatureCopy.getElement();K=vt.J.convertLegacyElements(K),this.ballDisplay.image.frameName=pt.P8.getAtlasElementBackerPath(K)}performEvolution(){const q=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(q.hasMembership())this.evolveSuccess();else{let K=at.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("enableMembershipVideoAd",!1);const z=q.isPlayingAtSchool();(Q.o5U.isIOS()||Q.o5U.isAndroid()||Q.o5U.isSafari()||Q.o5U.isEdge()||Q.o5U.isOpera()||z)&&(K=!1),K=!1,at.q.instance.prodigy.open.membershipInfo(this.memberConverted.bind(this),{conversionFunnelName:gt.o.FunnelEvolutionMemberLock,conversionStage:gt.o.StageEvolutionConverted},"evolveNow-button"),this.sendAnalyticsFunnelStage1()}}sendAnalyticsFunnelStage1(){const q=vt.J.showYouTubeMembershipAd(this.game,!0)?mt.R.Video:mt.R.Static;this._segment.purchase.sendFunnelStart({type:"Pet-Evolution-Member-Lock",category:"Pet",contentId:`pet-${this.currentCreature.getID()}`,adType:q})}sendSubsequentEvolutionInterfaceEvent(){at.q.instance.prodigy.gameContainer.get("fa1-8ec9").isBreadcrumbComplete(et.B.FEATURE_PET_EVOLUTION,et.B.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION)&&this._segment.featureCommon.sendInterfaceEvent({interfaceName:bt.B.NewOtherEvolutions,interfaceType:ut.Wm.DialogBox,originType:ut.$N.AutoSurfaced,eventName:"interface_opened"})}memberConverted(){at.q.instance.prodigy.audio.resumeBGM();at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasMembership()&&setTimeout(this.evolveSuccess.bind(this),100)}stopEvolution(){this.setActionText(at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("CREATURE_STOPPED_EVOLVING",this.originalCreatureCopy.getFirstName())),clearTimeout(this.evolutionTimerID),this.okayButton.onUpCallback=this.closeTween.bind(this),this.evolutionEffect.alpha=0,this.showButtonSet("okayButtonContainer"),this._segment.playerProgression.sendPetEvolutionCancelledEvent({petName:this.currentCreature.getName(),petLevel:this.currentCreature.getLevel(),petElement:this.currentCreature.getElement(),petRank:pt.P8.getPetDisplayMergeRank(this.currentCreature.data.ID,this.currentCreature.data.uniqueID),evolutionSource:this._evolutionSource})}startEvolutionTimer(){this.evolutionTimerID=window.setTimeout(this.performEvolution.bind(this),this.evolutionTime)}evolveSuccess(){if(at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasMembership()){const q=this.availableEvolutions[0],K=Q.Aq$.isDefined(q.evolveID)?q.evolveID:q.e,z=this.currentCreature.getName();this.currentCreature.evolve(K).then((()=>{this._segment.playerProgression.sendPetEvolvedEvent({petName:this.currentCreature.getName(),petLevel:this.currentCreature.getLevel(),petRank:pt.P8.getPetDisplayMergeRank(this.currentCreature.data.ID,this.currentCreature.data.uniqueID),petOldName:z,petType:pt.P8.getPetEvolutionType(this.currentCreature.getID()),evolutionSource:this._evolutionSource}),this.sendQuestEvolveEvent(),this.doEvolveAnimation()})).catch(Q.RQr.createHandler(`Error evolving creature with ID ${this.currentCreature.getID()}`))}}doEvolveAnimation(){const q=at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("CREATURE_IS_EVOLVING",this.originalCreatureCopy.getFirstName());this.actionText.textObject.text!==q&&this.setActionText(q),this.showButtonSet(""),setTimeout(this.loadMonsterSprite.bind(this,this.currentCreature.getID()),2e3),this.evolutionEffect.playAnimation("sparkle mask",!1,this.doneEvolveAnimation.bind(this))}doneEvolveAnimation(){at.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.setActionText(`${this.currentCreature.getFirstName()}!`),this.showButtonSet("okayButtonContainer")}loadMonsterSprite(q){Q.Aq$.isDefined(this.monsterIcon)&&(this.monsterIcon.destroy(),this.monsterIcon=null),this.monsterIcon=at.q.instance.prodigy.create.sprite(0,0,rt.E.getIconForType("pet",q),null,new Q.I9Y(.5,.5),(q=>{Q.Aq$.isDefined(this.spriteHolder)&&this.spriteHolder.add(q)}))}onOkayButtonPress(){this.availableEvolutions=this.currentCreature.getAvailableEvolutions(),this.availableEvolutions.length>0?(this.originalCreatureCopy=this.currentCreature.createDataClone(),this.fillElements()):this.closeTween()}static openEvolutionPromptIfEligible(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){let Y;const X=at.q.instance.prodigy.gameContainer.get("ad2-c5b2"),Z=pt.P8.getEvolutionGiftState(X.isMember());return Y=q instanceof ht.R&&pt.P8.canPetEvolve(q,q.getLevel())&&Z!==pt.O2.GIFT_UNAVAILABLE&&!z?yield this.openEvolutionScreen(q,X,null!=Q?Q:ut.k.Other):at.q.instance.prodigy.open.evolutionSummary(q,null!=K?K:q,null!=Q?Q:ut.k.Other),void 0!==Y&&(yield Y.onDestroy.asPromise(),this._menu=void 0,!0)}))}static openEvolutionScreen(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=at.q.instance.prodigy;if(K.open.isMenuOpen(dt.l)||wt.isOpening)return;wt.isOpening=!0;const Y=Z.l.EvolutionScreen,J={},tt=K.gameContainer.get("bec-c6b4"),et=tt.getBalance(27),it=tt.petAcquisitionCost(q.getID(),X.l6.Evolution),st=ot.t.getItem("pet",q.getID()),rt=pt.P8.findNextEvolution(st),ht=K.gameContainer.get(Q.$Bt.LocalizationService);J.PET_EVOLUTION_REACHED_MAX_LEVEL=ht.getText("EVOLUTION_SCREEN_REACHED_MAX_LEVEL",st.data.name),J.PET_EVOLUTION_EVOLVE_TO_GET_STRONGER=ht.getText("EVOLUTION_SCREEN_EVOLVE_TO_GET_STRONGER",rt.data.name),J.PRE_EVOLUTION_CARD_PET_ID=st.ID,J.POST_EVOLUTION_CARD_PET_ID=rt.ID,this.setMembershipInjectableProperties(J,it,et);const lt=K.open.prefabMenu(Y,null,!0,!1,!0,J,void 0,void 0,void 0,void 0,!0);return lt.onPrefabLoaded.addOnce((K=>{this._menu=K.findComponentInChildren(dt.l,!0),this._menu.init(q,z),wt.isOpening=!1,nt.d.updateInjectedValues(K,{PET_EVOLUTION_CARD_ANIMATE_BALANCE:et}),ct._.anyEvolutionPromptShown()})),lt}))}static setMembershipInjectableProperties(q,K,z){var Y;const Q=at.q.instance.prodigy.gameContainer.get("ad2-c5b2"),X=Q.isMember(),Z=(0,_t.G)(Et.F),J=Q.player.canPurchaseMembershipInGame(),tt=K.value<=z,et=at.q.instance.prodigy.gameContainer.get("bec-c6b4"),it=!tt&&(!J||Z),nt=!Z&&!tt&&J||et.isHardCurrencyMemberLocked(K.value);q.SHOW_NOT_ENOUGH_MAGICOIN_BUTTON=it,q.SHOW_MEMBERSHIP_BUTTON=nt,q.CURRENCY_COST=null!==(Y=null==K?void 0:K.value)&&void 0!==Y?Y:0,q.MAGICOIN_PRICE=K.value,q.UPDATE_MAGICOIN_BUDGET=z,q.SHOW_BUTTON_SPARKLES=tt||J,q.IS_MEMBER=X,q.MEMBERSHIP_BUTTON_ENABLED=!0,nt&&(at.q.instance.prodigy.game.broadcaster.addAppListener(st.H3.MembershipResponseReceived,this.handleMembershipChange,this),at.q.instance.prodigy.game.broadcaster.addAppListener(st.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this))}static handleMembershipChange(q){"success"!==q?nt.d.updateInjectedValues(this._menu.GameObject,{MEMBERSHIP_BUTTON_ENABLED:!0}):at.q.instance.prodigy.game.broadcaster.removeAppListener(st.H3.MembershipResponseReceived,this)}static handleMembershipRewardsFlowComplete(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;at.q.instance.prodigy.game.broadcaster.removeAppListener(st.H3.MembershipRewardsFlowComplete,this),null===(q=this._menu)||void 0===q||q.startEvolutionFromMembershipPurchase().catch(Q.RQr.createHandler("Error starting evolution after membership purchase"))}))}static attemptToForceSkip(){var q,K;Q.Aq$.isDefined(this._menu)&&(null===(q=this._menu.skipButton)||void 0===q||q.onClick.dispatch(),null===(K=this._menu.skipButton)||void 0===K||K.onEnabledClick.dispatch())}sendQuestEvolveEvent(){const q=ot.t.getItem("pet",this.currentCreature.data.ID).data,K={params:{taskEventType:tt.Z7.Pet,rarity:q.rarity,itemType:"pet",source:it.C.PetEvolution,id:q.ID,element:q.affinity,level:q.level}};at.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(J.T.EVOLVE_PET,K).catch(Q.RQr.createHandler("Error sending a quest event for evolving a pet"))}destroy(){super.destroy(),at.q.instance.prodigy.game.broadcaster.removeAppListener(st.H3.MembershipResponseReceived,this),at.q.instance.prodigy.game.broadcaster.removeAppListener(st.H3.MembershipRewardsFlowComplete,this),wt.isOpening=!1}}wt.isOpening=!1},47717:(q,K,z)=>{"use strict";z.d(K,{H:()=>st});var Y=z(62459),Q=z(95359),X=z(88022),Z=z(35120),J=z(77938),tt=z(39984),et=z(15485),it=z(37941);class st extends it.l{constructor(q,K,z,Y){super(q,K,z,Y,21),this._statIncreases=[];const Q=z.getBattleAssetSpecifier(),X=J.t.getItem(Q.type,Q.id).data,Z=tt.e.getStatIncreasesFromLevelUps(X,Y.getLevel(),z.getLevel());this._statIncreases=Object.entries(Z),this.queuePostCreateCallback(this.showNextStatIncrease.bind(this),this.setupButton.bind(this))}isRequired(){var q;return(null===(q=this._statIncreases)||void 0===q?void 0:q.length)>0}getBannerLocKey(){return null}showNextStatIncrease(){this._statIncreases.length<=0?this.close():(Z.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.setUpUi(...this._statIncreases.shift()))}setBannerTitle(q){this.setBannerTitleLocKey(st.BANNER_LOC_KEY[q])}setUpUi(q,K){var z;this.setBannerTitle(q),this.okayButton.visible=!1,null===(z=this._statIcon)||void 0===z||z.destroy(),this._statIcon=Z.q.instance.prodigy.create.sprite(0,0,X._.Ui_battle_revamp_json,st.ICON_FRAMES[q],new Y.I9Y(.5,.5),(q=>{Y.Aq$.isDefined(this.spriteHolder)&&(this.spriteHolder.add(q),this.game.add.tween(q.scale,this).from({x:0,y:0},1e3,Y.GS3.Elastic.Out,!0),Z.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.okayButton.visible=!0)}));const Q=st.STAT_EARNED_KEY[q],J=1===K&&Q.length>1?Q[1]:Q[0];this.setActionText(Z.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText(J,this.currentCreature.getFirstName(),K))}setupButton(){this.okayButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:et.k.Okay}),this.showNextStatIncrease()}}}st.ICON_FRAMES={[Q.IE.Power]:"icon-levelup-power",[Q.IE.Defence]:"icon-levelup-defense",[Q.IE.Speed]:"icon-levelup-dodge",[Q.IE.Hp]:"icon-levelup-heart"},st.BANNER_LOC_KEY={[Q.IE.Power]:"SUMMARY_POPUP_INCREASED_POWER",[Q.IE.Defence]:"SUMMARY_POPUP_INCREASED_DEFENSE",[Q.IE.Speed]:"SUMMARY_POPUP_INCREASED_SPEED",[Q.IE.Hp]:"SUMMARY_POPUP_INCREASED_HP"},st.STAT_EARNED_KEY={[Q.IE.Power]:["SUMMARY_POPUP_EARNED_POWER"],[Q.IE.Defence]:["SUMMARY_POPUP_EARNED_DEFENSE"],[Q.IE.Speed]:["SUMMARY_POPUP_EARNED_SPEED"],[Q.IE.Hp]:["SUMMARY_POPUP_EARNED_HP_MULTIPLE","SUMMARY_POPUP_EARNED_HP"]}},37941:(q,K,z)=>{"use strict";z.d(K,{l:()=>et});var Y=z(62459),Q=z(35120),X=z(15485),Z=z(41674),J=z(82680),tt=z(51742);class et extends J.W{constructor(q,K,z,Y,Q){super(q,K,Q,{isModal:!1},[tt.c.Sfx_results_screen]),this.currentCreature=z,this.originalCreatureCopy=Y,this.currentInterfaceName=this.getBannerLocKey(),this.queuePostCreateCallback(this.openTween.bind(this),(()=>{this.okayButton.onUpCallback=()=>{this.closeTween(),this.fireButtonEvent({buttonName:X.k.Okay})},this.setBannerTitleLocKey(this.getBannerLocKey())}))}create(){this.isRequired()?(super.create(),this.background.visible=!1,Y.Aq$.isDefined(this.onCreateCallback)&&this.onCreateCallback(),this.fireInterfaceEvent({originType:Z.$N.AutoSurfaced})):this.close()}setOnCreateCallback(q){this.onCreateCallback=q}openTween(){if(Y.Aq$.isDefined(this.uiRoot)){const q=this.uiRoot;q.pivot.x=q.width/2,q.pivot.y=q.height/2,q.x+=q.pivot.x,q.y+=q.pivot.y,q.scale.x=.1,q.scale.y=.1,q.alpha=0,this.game.add.tween(q.scale,this).to({x:1,y:1},200,Y.GS3.Back.Out,!0),this.game.add.tween(q,this).to({alpha:1},120,Y.GS3.Linear.None,!0)}}closeTween(){if(Y.Aq$.isDefined(this.uiRoot)){this.okayButton.setActive(!1);this.game.add.tween(this.uiRoot,this).to({alpha:0},200,Y.GS3.Linear.None,!0).onTweenComplete.add(this.close.bind(this))}}setActionText(q){this.actionText.setText(q),this.game.add.tween(this.actionText,this).from({x:this.actionText.x+20,alpha:0},300,Y.GS3.Quadratic.Out,!0)}setBannerTitleLocKey(q){this.resultsTitle.setText(Q.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText(q))}close(){this.fireInterfaceEvent({closeMethod:Z.Lv.ButtonClick}),super.close()}}},67510:(q,K,z)=>{"use strict";z.d(K,{v:()=>ot});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(35120),J=z(88552),tt=z(6190),et=z(65050),it=z(7910),st=z(80060),nt=z(55237),at=z(34374),rt=z(82680);class ot extends rt.W{constructor(q,K,z,Y,Q,X,Z,J,tt,et=!1,it=!0,st,nt){super(q,K,200),this._weightedRewards=Y,this._prefabLoader=z,this._prefabGuid=Q,Z&&(this._forceRewards=[...Z]),this._instanceType=X,tt&&(this._closeCallback=tt),J&&(this._fallbackRewards=J),this._immediatelyAwardForcedReward=et,this._awardItems=it,st&&(this._injectableProperties=st),(null==nt?void 0:nt.instanceId)&&(this._instanceId=nt.instanceId),(null==nt?void 0:nt.sourceType)&&(this._sourceType=nt.sourceType)}create(){const q=Object.create(null,{create:{get:()=>super.create}});return(0,Y.sH)(this,void 0,void 0,(function*(){q.create.call(this),yield Promise.all([st.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGuid,Object.assign({WEIGHTED_REWARDS:this._weightedRewards,FALLBACK_REWARDS:this._fallbackRewards,INSTANCE_TYPE:this._instanceType},this._injectableProperties)).promise.then((q=>{this._ui=q})),new Promise((q=>{Z.q.instance.prodigy.load.assets(X._.Ui_raster_pets_menu_json,q)}))]),this.update=()=>{this._ui.update()};const K=this._ui.findComponentInChildren(Q.jsv);this.addChild(K.getRootContainer()),this._ui.findComponentInChildren(J.Z).menu=this,this._roulette=this._ui.findComponentInChildren(at.i),this._roulette.reset(),this._roulette.forcedRewards=this._forceRewards,this._roulette.instanceTypeForSegmentEvent=this._instanceType,this._roulette.sourceTypeForSegmentEvent=this._sourceType,this._ui.findComponentInChildren(it.a)&&(this._ui.findComponentInChildren(it.a).instanceType=this._instanceType,this._ui.findComponentInChildren(it.a).instanceId=this._instanceId);const z=this._ui.findComponentInChildren(tt.q);if(this._immediatelyAwardForcedReward&&this._awardItems){this._ui.findComponentInChildren(nt.X).skipAward=!0,z.items=this._forceRewards,z.instanceType=this._instanceType,this._sourceType&&(z.awardSourceType=this._sourceType),this._instanceId&&(z.instanceId=this._instanceId),this._roulette.instanceTypeForSegmentEvent!==et.N.RiftRun&&this._roulette.instanceTypeForSegmentEvent!==et.N.BossRift||(z.instanceId=this._segment.rifts.riftInstanceUuid),z.run();Z.q.instance.prodigy.gameContainer.get("782-c308").forceSaveCharacter()}else this._awardItems||(z.awardItems=!1)}))}close(){var q;null===(q=this._closeCallback)||void 0===q||q.call(this),super.close()}destroy(){this._ui.destroy(),super.destroy()}}},50348:(q,K,z)=>{"use strict";z.d(K,{L:()=>it});var Y=z(62459),Q=z(35120),X=z(49237),Z=z(8674);let J=class extends Y.uAl{constructor(){super(...arguments),this._footerText=null,this._hyperlinkText=null,this._hyperlinkButton=null}get footerText(){return this._footerText}get hyperlinkText(){return this._hyperlinkText}get hyperlinkButton(){return this._hyperlinkButton}};(0,Z.Cg)([(0,Y.x4W)("FooterText"),(0,Z.Sn)("design:type",Y.EYj)],J.prototype,"_footerText",void 0),(0,Z.Cg)([(0,Y.x4W)("HyperlinkText"),(0,Z.Sn)("design:type",Y.EYj)],J.prototype,"_hyperlinkText",void 0),(0,Z.Cg)([(0,Y.x4W)("HyperlinkButton"),(0,Z.Sn)("design:type",X.$)],J.prototype,"_hyperlinkButton",void 0),J=(0,Z.Cg)([(0,Y.EVk)("BannerDialogHyperlink")],J);var tt=z(21457),et=z(38134);class it extends et.u{constructor(q,K,z=new tt.Z){super(q,K,z),this._bannerDialogConfig=null,this._headerPrefabID=101,this._bodyPrefabID=98,this._footerPrefabID=99,this._bannerDialogConfig=z,this.isModal=!1,this._bannerDialogConfig.hasHyperlink&&(this._footerPrefabID=100)}createHeader(){if(Y.Aq$.isDefined(this._bannerDialogConfig.bannerSource)){const q=Q.q.instance.prodigy.create.sprite(0,0,this._bannerDialogConfig.bannerSource,Y.Aq$.isDefined(this._bannerDialogConfig.bannerFrame)?this._bannerDialogConfig.bannerFrame:null);this._prefabComponent.header.legacyTransform.group.addChild(q)}if(this._bannerDialogConfig.closeButton){const q=this._prefabLoader.load(94,this._prefabComponent.header);this._bannerDialogConfig.closeButtonCallback&&q.findComponentInChildren(X.$).onClick.add(this._bannerDialogConfig.closeButtonCallback),q.findComponentInChildren(X.$).onClick.add(this.close.bind(this))}this._bannerDialogConfig.hasHyperlink&&this._prefabLoader.load(this._headerPrefabID,this._prefabComponent.header)}createBody(){const q=this._prefabLoader.load(this._bodyPrefabID,this._prefabComponent.body).findComponentsInChildren(Y.EYj);q[0].text=this._bannerDialogConfig.headerTitle,q[1].text=this._bannerDialogConfig.bodyMessage}createFooter(){const q=this._prefabLoader.load(this._footerPrefabID,this._prefabComponent.footer),K=q.findComponentInChildren(J);if(Y.Aq$.isDefined(K))Y.Aq$.isDefined(this._bannerDialogConfig.buttonCallback)&&K.hyperlinkButton.onClick.add(this._bannerDialogConfig.buttonCallback),K.hyperlinkText.text=this._bannerDialogConfig.buttonText,K.hyperlinkText.drawUnderline(0,this._bannerDialogConfig.buttonText.length),K.footerText.text=this._bannerDialogConfig.footerMessage;else{Y.Aq$.isDefined(this._bannerDialogConfig.buttonCallback)&&q.findComponentInChildren(X.$).onClick.add(this._bannerDialogConfig.buttonCallback),q.findComponentInChildren(X.$).onClick.add(this.close.bind(this));const K=q.findComponentsInChildren(Y.EYj);for(let q=0;q{"use strict";z.d(K,{Z:()=>Z});var Y=z(35120),Q=z(49967),X=z(2272);class Z extends Q.P{get buttonText(){return this._buttonText}get buttonCallback(){return this._buttonCallback}get bannerSource(){return this._bannerSource}get bannerFrame(){return this._bannerFrame}get closeButton(){return this._closeButton}get closeButtonCallback(){return this._closeButtonCallback}get hasHyperlink(){return this._hasHyperlink}get footerMessage(){return this._footerMessage}constructor(q="DEFAULT",K,z,Q,Z,J,tt,et,it,st,nt,at){super(X.E.Banner,z,Q,Z,J),this._buttonText=q,this._buttonCallback=()=>{Y.q.instance.prodigy.audio.playSFX(18,"pop"),null==K||K()},this._bannerSource=tt,this._bannerFrame=et,this._closeButton=it,this._closeButtonCallback=()=>{Y.q.instance.prodigy.audio.playSFX(18,"pop"),null==st||st()},this._hasHyperlink=nt,this._footerMessage=at}}},642:(q,K,z)=>{"use strict";z.d(K,{k:()=>Z});var Y=z(35120),Q=z(43846),X=z(49967);class Z extends X.P{get confirmButtonText(){return this._confirmButtonText}get confirmButtonCallback(){return this._confirmButtonCallback}get dismissButtonText(){return this._dismissButtonText}get dismissButtonCallback(){return this._dismissButtonCallback}get headerIcon(){return this._headerIcon}constructor(q=(0,Q.k)("BUTTON_QUIT_CAPITAL"),K=null,z=(0,Q.k)("DIALOG_STAY"),X=null,Z=null,J,tt,et,it,st){super(J,tt,et,it,st),this._confirmButtonText=q,this._confirmButtonCallback=()=>{Y.q.instance.prodigy.audio.playSFX(18,"pop"),null==K||K()},this._dismissButtonText=z,this._dismissButtonCallback=()=>{Y.q.instance.prodigy.audio.playSFX(18,"pop"),null==X||X()},this._headerIcon=Z}}},38134:(q,K,z)=>{"use strict";z.d(K,{u:()=>it});var Y=z(35120),Q=z(82680),X=z(88022),Z=z(8674),J=z(62459);let tt=class extends J.uAl{constructor(){super(...arguments),this._rootObject=null,this._header=null,this._body=null,this._footer=null}get rootObject(){return this._rootObject}get header(){return this._header}get body(){return this._body}get footer(){return this._footer}};(0,Z.Cg)([(0,J.x4W)("rootObject"),(0,Z.Sn)("design:type",J._mx)],tt.prototype,"_rootObject",void 0),(0,Z.Cg)([(0,J.x4W)("header"),(0,Z.Sn)("design:type",J._mx)],tt.prototype,"_header",void 0),(0,Z.Cg)([(0,J.x4W)("body"),(0,Z.Sn)("design:type",J._mx)],tt.prototype,"_body",void 0),(0,Z.Cg)([(0,J.x4W)("footer"),(0,Z.Sn)("design:type",J._mx)],tt.prototype,"_footer",void 0),tt=(0,Z.Cg)([(0,J.EVk)("DialogBasePrefab")],tt);var et=z(49967);class it extends Q.W{get prefabComponent(){return this._prefabComponent}constructor(q,K,z=new et.P){super(q,K,200,{},[X._.Ui_buttons_json,X._.Ui_dialogues_json,X._.Ui_store_json]),this._dialogConfig=null,this.prefabRoot=null,this._prefabComponent=null,this._prefabLoader=null,this._dialogConfig=z,this.isModal=!0,this._prefabLoader=Y.q.instance.prodigy.gameContainer.get("983-05a7")}create(){super.create();const q=this._prefabLoader.loadFromGUID(this._dialogConfig.size);this._prefabComponent=q.findComponentInChildren(tt),this.prefabRoot.addChild(q.legacyTransform.group),this.background.visible=this._dialogConfig.bgTransparency,this._prefabComponent.rootObject.legacyTransform.group.width=this._dialogConfig.width,this.createHeader(),this.createBody(),this.createFooter()}}},49967:(q,K,z)=>{"use strict";z.d(K,{P:()=>Z});var Y=z(62459),Q=z(2272);const X={[Q.E.Small]:550,[Q.E.Medium]:600,[Q.E.Large]:700,[Q.E.Banner]:700};class Z{get size(){return this._size}get width(){return this._width}set width(q){switch(this._size){case Q.E.Small:this._width=Y.cj9.clamp(q,500,600);break;case Q.E.Medium:this._width=Y.cj9.clamp(q,600,700);break;case Q.E.Large:case Q.E.Banner:this._width=Y.cj9.clamp(q,700,800);break;default:Y.VyI.log("Invalid dialog width, setting to default: 500px",Y.$bb.Error),this._width=500}}get headerTitle(){return this._headerTitle}get bodyMessage(){return this._bodyMessage}get bgTransparency(){return this._bgTransparency}constructor(q=Q.E.Small,K,z="Default Title Please Fix",Y="Default Message Please Fix",Z=!0){this._size=q,this.width=null!=K?K:X[q],this._headerTitle=z,this._bodyMessage=Y,this._bgTransparency=Z}}},2272:(q,K,z)=>{"use strict";var Y;z.d(K,{E:()=>Y}),function(q){q.Small="223de309-a870-4aed-adaa-5cbe162c5659",q.Medium="69bad6cf-14b6-412e-a50c-292cc979727a",q.Large="e19ecfda-8a24-4a40-92bd-035c7c7e79f2",q.Banner="d17a542f-7dd9-43cb-ba9d-9fa34eb31e22"}(Y||(Y={}))},75329:(q,K,z)=>{"use strict";z.d(K,{Z:()=>Z});var Y=z(99625),Q=z(35120),X=z(49967);class Z extends X.P{get buttonText(){return this._buttonText}get buttonCallback(){return this._buttonCallback}get graphicSource(){return this._graphicSource}get graphicFrame(){return this._graphicFrame}get headerPrefabID(){return void 0!==this._headerPrefabID?this._headerPrefabID:Y.l.DefaultHeader}get footerPrefabID(){return void 0!==this._footerPrefabID?this._footerPrefabID:Y.l.DefaultFooter}get bodyPrefabID(){return void 0!==this._bodyPrefabID?this._bodyPrefabID:Y.l.DefaultBody}constructor(q="DEFAULT",K,z,Y,X,Z,J,tt,et,it,st,nt){super(z,Y,X,Z,J),this._buttonText=q,this._buttonCallback=()=>{Q.q.instance.prodigy.audio.playSFX(18,"pop"),null==K||K()},this._graphicSource=tt,this._graphicFrame=et,this._headerPrefabID=it,this._footerPrefabID=st,this._bodyPrefabID=nt}}},99429:(q,K,z)=>{"use strict";z.d(K,{K:()=>lt});var Y,Q=z(8674),X=z(62459),Z=z(20748),J=z(88022),tt=z(35120),et=z(38181),it=z(15485),st=z(46784),nt=z(65050),at=z(41674),rt=z(67665),ot=z(10312),ht=z(642),ct=z(2272),dt=z(49237);let lt=Y=class extends X.uAl{constructor(){super(...arguments),this._signOutScrollViewButton=null,this._changePasswordScrollViewButton=null,this._deleteAccountScrollViewButton=null,this._userIDInput=null,this._localization=null}get signOutScrollViewButton(){return this._signOutScrollViewButton}get changePasswordScrollViewButton(){return this._changePasswordScrollViewButton}get deleteAccountScrollViewButton(){return this._deleteAccountScrollViewButton}get userIDInput(){return this._userIDInput}create(){super.create(),this._localization=tt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),this.setUpButtons()}postCreate(){super.postCreate(),this._activePlayer=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,this.userIDInput.text=this._activePlayer.userID.toString(),this.userIDInput.setDisabled(!0)}destroy(){this.userIDInput.destroy(),super.destroy()}setInputVisibility(q){document.getElementById("external-ui").style.display=q?"unset":"none"}setUpButtons(){var q,K,z;null===(q=this.signOutScrollViewButton)||void 0===q||q.onClick.add(this.onSignOutClicked,this),null===(K=this.changePasswordScrollViewButton)||void 0===K||K.onClick.add(this.onChangePasswordClicked,this),null===(z=this.deleteAccountScrollViewButton)||void 0===z||z.onClick.add(this.onDeleteAccountClicked,this)}onSignOutClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);tt.q.instance.prodigy.open.confirmationDialogWideButtons(new ht.k(this._localization.getText("SIGN_OUT_BUTTON"),(()=>{tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0),tt.q.instance.prodigy.gameContainer.get("774-4659").logout()}),this._localization.getText("KEEP_PLAYING_BUTTON"),(()=>{tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0)}),{atlas:J._.Ui_store_json,name:"icon-large-exclamation"},ct.E.Small,Y.CONFIRM_WIDTH,this._localization.getText("SIGN_OUT_TITLE"),this._localization.getText("SIGN_OUT_MESSAGE")))}onChangePasswordClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);const q=`${tt.q.instance.prodigy.gameContainer.get("ddf-6c82").getIdentityUrl()}/update_password`;this.leaveGame(q,"update_password",!0,!1),this.sendOpenDialogueSegmentEvents(it.k.ChangePasswordLink)}onDeleteAccountClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop");this.leaveGame("prodigygame.zendesk.com/hc/en-us/articles/206242636-How-Do-I-Delete-My-Account-","cs_support_page"),this.sendOpenDialogueSegmentEvents(it.k.AccountDeletionLink)}leaveGame(q,K,z=!0,Q=!0){this.setInputVisibility(!1);tt.q.instance.prodigy.open.confirmationDialog(new ht.k(this._localization.getText("BUTTON_LEAVE_TEAM"),(()=>{tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0),this.sendCloseDialogueSegmentEvents(it.k.Leave,st.B.LeaveGameDialog,K),ot.I.openWebsite(q,z,Q)}),this._localization.getText("BUTTON_STAY_TEAM"),(()=>{tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0),this.sendCloseDialogueSegmentEvents(it.k.Stay,st.B.LeaveGameDialog,st.B.OptionsMenu)}),{atlas:J._.Ui_store_json,name:"icon-large-exclamation"},ct.E.Small,Y.CONFIRM_WIDTH,this._localization.getText("LOGIN_LEAVE_GAME"),this._localization.getText("LOGIN_LEAVE_BODY")))}sendOpenDialogueSegmentEvents(q){this._segment.featureCommon.sendButtonEvent({buttonName:q,interfaceType:at.Wm.Settings,interfaceName:st.B.OptionsMenu,destinationName:st.B.LeaveGameDialog,elementType:"text_link",saveClickInfo:q}),this._segment.featureCommon.sendInterfaceEvent({interfaceName:st.B.LeaveGameDialog,interfaceType:at.Wm.DialogBox,instanceType:nt.N.Interface,originType:at.$N.ButtonClick,originID:q})}sendCloseDialogueSegmentEvents(q,K,z){this._segment.featureCommon.sendButtonEvent({buttonName:q,interfaceName:K,interfaceType:at.Wm.DialogBox,destinationName:z,saveClickInfo:q}),this._segment.featureCommon.sendInterfaceEvent({interfaceName:K,interfaceType:at.Wm.DialogBox,instanceType:nt.N.Interface,closeMethod:at.Lv.ButtonClick})}};lt.CONFIRM_WIDTH=550,lt.DEBOUNCE_MS=500,(0,Q.Cg)([(0,X.MnK)(X.Sjx),(0,Q.Sn)("design:type",X.Sjx)],lt.prototype,"_signOutScrollViewButton",void 0),(0,Q.Cg)([(0,X.MnK)(dt.$),(0,Q.Sn)("design:type",dt.$)],lt.prototype,"_changePasswordScrollViewButton",void 0),(0,Q.Cg)([(0,X.MnK)(dt.$),(0,Q.Sn)("design:type",dt.$)],lt.prototype,"_deleteAccountScrollViewButton",void 0),(0,Q.Cg)([(0,X.MnK)(et.S),(0,Q.Sn)("design:type",et.S)],lt.prototype,"_userIDInput",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",rt.Y)],lt.prototype,"_segment",void 0),(0,Q.Cg)([(0,Z.sg)(lt.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],lt.prototype,"onSignOutClicked",null),(0,Q.Cg)([(0,Z.sg)(lt.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],lt.prototype,"onChangePasswordClicked",null),(0,Q.Cg)([(0,Z.sg)(lt.DEBOUNCE_MS),(0,Q.Sn)("design:type",Function),(0,Q.Sn)("design:paramtypes",[]),(0,Q.Sn)("design:returntype",void 0)],lt.prototype,"onDeleteAccountClicked",null),lt=Y=(0,Q.Cg)([(0,X.EVk)("InfoSection")],lt)},12696:(q,K,z)=>{"use strict";z.d(K,{L:()=>Z});var Y=z(8674),Q=z(62459),X=z(35120);let Z=class extends Q.uAl{constructor(){super(),this._coinCountText=null,this.coinCountNumber=0,this._activePlayer=X.q.instance.prodigy.gameContainer.get("ad2-c5b2")}create(){super.create(),this.updateCoinValue(),this.updateCoinCountText()}animateNewCoinCount(){var q,K,z;this._coinValueTween=X.q.instance.prodigy.game.add.tween(this,this).to({coinCountNumber:null===(z=null===(K=null===(q=this._activePlayer)||void 0===q?void 0:q.player)||void 0===K?void 0:K.data)||void 0===z?void 0:z.gold},1500,Q.GS3.Quadratic.Out),this._coinValueTween.onUpdate.add(this.updateCoinCountText,this),this._coinValueTween.start()}updateCoinValue(){var q,K,z;const Y=null===(z=null===(K=null===(q=this._activePlayer)||void 0===q?void 0:q.player)||void 0===K?void 0:K.data)||void 0===z?void 0:z.gold;Y&&(this.coinCountNumber=Y)}updateCoinCountText(){this._coinCountText.text=Math.round(this.coinCountNumber).toLocaleString()}destroy(){X.q.instance.game.tweens.remove(this._coinValueTween),super.destroy()}};(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],Z.prototype,"_coinCountText",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("CoinDisplayComponent",Q.YH6.ui),(0,Y.Sn)("design:paramtypes",[])],Z)},91033:(q,K,z)=>{"use strict";z.d(K,{M:()=>mt});var Y=z(99625),Q=z(35120),X=z(73797),Z=z(62459),J=z(95891),tt=z(60881),et=z(76974),it=z(54422),st=z(77938),nt=z(8674),at=z(58268),rt=z(49237),ot=z(98013),ht=z(22023),ct=z(28152),dt=z(12861),lt=z(65231);let ut=class extends lt.s{constructor(){super(...arguments),this._rescuedContainer=null,this._amountRescued=null,this._petBookOrdinal=null,this._iconEffect=null}get cardClicked(){return this._cardClicked}get isCardValid(){return!!this._item}get ordinal(){return!this.itemIsImageItemDrop(this._item)&&ht.P8.hasValidOrdinal(this._item)?this._item.data.ordinal:-1}create(){super.create(),this._cardClicked=new Z.HN0,this._interactable.onClick.add((()=>{this.onCardClick()}))}setData(q,K,z,Y){super.setItemData(q),this._seenPet=K,this._ownedPet=z||Y>0,this._numberOwned=Y}updateCard(){this.setTimesRescued(this._numberOwned>0,this._numberOwned),this.setPetBookOrdinal(this.ordinal.toString()),this.setIcon(this._seenPet,this._ownedPet)}resetCard(){super.resetCard(),this.clearCardEffect()}setTimesRescued(q,K){this._rescuedContainer.active=q,q&&(this._amountRescued.text=K.toString())}setPetBookOrdinal(q){this._petBookOrdinal.text=`#${q}`}setIcon(q,K){q?(this._iconContainer.active=!0,this._unseenContainer.active=!1,K?this.updateIcon():this.updateIcon((q=>{this.applyCardEffect(q)}))):(this._iconContainer.active=!1,this._unseenContainer.active=!0)}applyCardEffect(q){J.delay((()=>{if(this.GameObject&&!this.GameObject.isDestroyed){if(this._petBookOrdinal.text="",this.clearCardEffect(),q){const K=new at.N;K.desaturate(),q.filters=[K]}this.setPetBookOrdinal(this.ordinal.toString())}}),0)}clearCardEffect(){ot.l.removeAll(this._iconEffect.GameObject.legacyTransform.group)}onCardClick(){this._cardClicked.dispatch(this._item.ID)}destroy(){this._interactable.onClick.dispose(),this._cardClicked.dispose(),super.destroy()}};(0,nt.Cg)([(0,Z.ERr)(),(0,Z.Lr6)(0),(0,Z.nKb)("iconContainer"),(0,nt.Sn)("design:type",Z._mx)],ut.prototype,"_iconContainer",void 0),(0,nt.Cg)([(0,Z.ERr)(),(0,Z.Lr6)(0),(0,Z.nKb)("unseenContainer"),(0,nt.Sn)("design:type",Z._mx)],ut.prototype,"_unseenContainer",void 0),(0,nt.Cg)([(0,Z.ERr)(),(0,Z.Lr6)(0),(0,Z.nKb)("rescuedContainer"),(0,nt.Sn)("design:type",Z._mx)],ut.prototype,"_rescuedContainer",void 0),(0,nt.Cg)([(0,Z.MnK)(Z.EYj),(0,Z.Lr6)(0),(0,Z.nKb)("amountRescued"),(0,nt.Sn)("design:type",Z.EYj)],ut.prototype,"_amountRescued",void 0),(0,nt.Cg)([(0,Z.MnK)(Z.EYj),(0,Z.Lr6)(0),(0,Z.nKb)("petBookOrdinal"),(0,nt.Sn)("design:type",Z.EYj)],ut.prototype,"_petBookOrdinal",void 0),(0,nt.Cg)([(0,Z.MnK)(dt.A),(0,Z.Lr6)(0),(0,Z.nKb)("iconEffect"),(0,nt.Sn)("design:type",dt.A)],ut.prototype,"_iconEffect",void 0),(0,nt.Cg)([(0,Z.MnK)(rt.$),(0,Z.Lr6)(0),(0,Z.nKb)("interactable"),(0,nt.Sn)("design:type",rt.$)],ut.prototype,"_interactable",void 0),ut=(0,nt.Cg)([(0,Z.EVk)("PetBookCard",ct.Y.uiPet)],ut);var ft=z(41674);class bt{get infoSignal(){return this._infoSignal}get currentPage(){return this._currentPage}get currentDisplayPage(){return this._currentPage+1}get hasPreviousPage(){return this._currentPage>0}get hasNextPage(){return this._currentPage{this.tryToChangePage(this.hasNextPage,this._totalPageNumber-this.pagesPerScreen)})),this._petBookPrefab.firstPageButton.onClick.add((()=>{this.tryToChangePage(this.hasPreviousPage,0)}));const X=()=>{this.tryToChangePage(this.hasPreviousPage,this._currentPage-this.pagesPerScreen)},J=()=>{this.tryToChangePage(this.hasNextPage,this._currentPage+this.pagesPerScreen)};this._petBookPrefab.previousPageButton.onClick.add(X),this._petBookPrefab.nextPageButton.onClick.add(J),this._petBookPrefab.previousPageButton.GameObject.addComponent(it.E).initialize(tt.D.LEFT,X),this._petBookPrefab.nextPageButton.GameObject.addComponent(it.E).initialize(tt.D.RIGHT,J),this.paginatePets(),this.setupRecuseProgressBar(),this.updateCurrentPageDisplay()}paginatePets(){const q=st.t.getCategoryItems("pet");this._petBookPets=q.filter((q=>ht.P8.isValidForPetBook(q))).sort(((q,K)=>q.data.ordinal-K.data.ordinal)),this._petPagination=[];const K=Math.ceil(this._petBookPets.length/this.gridSize);for(let z=1;z<=K;z++){const q=this._petBookPets.slice((z-1)*this.gridSize,z*this.gridSize);this._petPagination.push(q)}this._totalPageNumber=K+K%2}setupRecuseProgressBar(){const q=this._encounters.getAllTotalPetsRescued();this.setProgressBar(q/this._petBookPets.length),this.setProgressText(Z.cj9.clamp(q,0,this._petBookPets.length),this._petBookPets.length)}updateCurrentPageDisplay(){this.changePage(this._currentPage)}tryToChangePage(q,K){q?(this.changePage(K),Q.q.instance.prodigy.audio.playSFX(65,"book-pagination"),this.sendPageChangeAnalytics()):this._audio.playSFX(67,"button-disabled")}changePage(q){this._currentPage=q,this.setPageText(this._currentPage,this._currentPage+1,this._totalPageNumber),this.updateButtonStates(),this.populateGrids(this._petPagination[this._currentPage],this._petPagination[this._currentPage+1])}sendPageChangeAnalytics(){Q.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendPetBookViewedEvent({bookName:"Pet Book",bookPage:this.currentDisplayPage,interfaceType:ft.Wm.PetBook})}openPetInfoMenu(q){this._infoSignal.dispatch(q)}updateButtonStates(){this.hasPreviousPage?(this._petBookPrefab.previousPageButton.unlockState(),this._petBookPrefab.firstPageButton.unlockState()):(this._petBookPrefab.previousPageButton.lockState(et.K.Disabled),this._petBookPrefab.firstPageButton.lockState(et.K.Disabled)),this.hasNextPage?(this._petBookPrefab.nextPageButton.unlockState(),this._petBookPrefab.lastPageButton.unlockState()):(this._petBookPrefab.nextPageButton.lockState(et.K.Disabled),this._petBookPrefab.lastPageButton.lockState(et.K.Disabled))}populateGrids(q,K){this.populateGrid(this._petBookPrefab.leftGridview,q),this.populateGrid(this._petBookPrefab.rightGridview,K)}populateGrid(q,K){for(;!q.isEmpty();)this.removePetBookCard(q);null==K||K.forEach((K=>{K.data.name,K.data.ordinal;const z=this._petBookCardPool.getObject().findComponentInChildren(ut);this.updatePetBookCard(z,K),q.GameObject.addChild(z.GameObject)}))}removePetBookCard(q){const K=J.last(q.GameObject.children);K&&(K.parent=null,this._petBookCardPool.recycleObject(K))}setProgressBar(q){this._petBookPrefab.progressBar.fillPercent=q}setProgressText(q,K){this._petBookPrefab.rescuedText.text=`${q} of ${K} rescued`}setPageText(q,K,z){this._petBookPrefab.leftPageText.text=`Page ${q+1} of ${z}`,this._petBookPrefab.rightPageText.text=`Page ${K+1} of ${z}`}createPetBookCard(){const q=this._prefabLoader.loadFromGUID(Y.l.Pets_PetBookCard);return q.findComponentInChildren(ut).cardClicked.add(this.openPetInfoMenu,this),q}updatePetBookCard(q,K){q.setData(K,this._encounters.hasPetBeenEncountered(K.ID),this._encounters.getPetTimesRescued(K.ID)>0,this._kennel.amountOfPet(K.ID)),q.updateDisplay()}recyclePetBookCard(q){q.findComponentInChildren(ut,!0).clearCard(),q.legacyTransform.x=0,q.legacyTransform.y=0,this._unusedPetBookCardContainer.addChild(q)}enableController(q){const K=this._petBookPrefab.GameObject.findComponentsInChildren(it.E,!0);for(let z=0;z{"use strict";z.d(K,{A:()=>X});var Y=z(62459),Q=z(82680);class X extends Q.W{constructor(){super(...arguments),this.onSubMenuLaunched=new Y.HN0,this.onSubMenuLeft=new Y.HN0,this._isPaused=!1}resumeMenu(){this._isPaused=!1}pauseMenu(){this._isPaused=!0}launchSubMenu(q){this.onSubMenuLaunched.dispatch(q)}leaveSubMenu(){this.onSubMenuLeft.dispatch()}destroy(){this.onSubMenuLaunched.dispose(),this.onSubMenuLeft.dispose(),super.destroy()}}},25930:(q,K,z)=>{"use strict";z.d(K,{J:()=>J});var Y=z(8674),Q=z(62459),X=z(83133),Z=z(42838);let J=class extends Q.uAl{constructor(){super(...arguments),this._aboutToggle=null,this._statsToggle=null,this._spellsToggle=null,this._aboutPanel=null,this._statsPanel=null,this._spellsPanel=null,this._learnMorePanel=null,this._tabsGridLayout=null,this._elementIconAtlas=null,this._elementIconFrameWater=null,this._elementIconFrameFire=null,this._elementIconFrameStorm=null,this._elementIconFrameEarth=null,this._elementIconFrameIce=null,this._lockedIconAtlas=null,this._lockedIconFrame=null,this._fillBarAttackAndHearts=null,this._fillBarHearts=null,this._textAttack=null,this._textHearts=null,this._textElement=null,this._iconContainerElement=null,this._textEvolveLevel=null,this._rowObjectEvolveLevel=null,this._textSpellsTitles=[],this._textSpellsLevel=[],this._textSpellsRange=[],this._gridSpellsLevel=[],this._gridSpellsRange=[],this._gridSpellsLevelOff=[],this._gridSpellsRangeOff=[],this._iconContainerSpells=[],this._textAbout=null}get elementIconAtlas(){return this._elementIconAtlas}get elementIconFrameWater(){return this._elementIconFrameWater}get elementIconFrameFire(){return this._elementIconFrameFire}get elementIconFrameStorm(){return this._elementIconFrameStorm}get elementIconFrameEarth(){return this._elementIconFrameEarth}get elementIconFrameIce(){return this._elementIconFrameIce}get lockedIconAtlas(){return this._lockedIconAtlas}get lockedIconFrame(){return this._lockedIconFrame}get fillBarAttackAndHearts(){return this._fillBarAttackAndHearts}get fillBarHearts(){return this._fillBarHearts}get textAttack(){return this._textAttack}get textHearts(){return this._textHearts}get textElement(){return this._textElement}get iconContainerElement(){return this._iconContainerElement}get textEvolveLevel(){return this._textEvolveLevel}get rowObjectEvolveLevel(){return this._rowObjectEvolveLevel}get textSpellsTitles(){return this._textSpellsTitles}get textSpellsLevel(){return this._textSpellsLevel}get textSpellsRange(){return this._textSpellsRange}get gridSpellsLevel(){return this._gridSpellsLevel}get gridSpellsRange(){return this._gridSpellsRange}get gridSpellsLevelOff(){return this._gridSpellsLevelOff}get gridSpellsRangeOff(){return this._gridSpellsRangeOff}get iconContainerSpells(){return this._iconContainerSpells}get textAbout(){return this._textAbout}get aboutToggle(){return this._aboutToggle}get statsToggle(){return this._statsToggle}get spellsToggle(){return this._spellsToggle}get aboutPanel(){return this._aboutPanel}get statsPanel(){return this._statsPanel}get spellsPanel(){return this._spellsPanel}get learnMorePanel(){return this._learnMorePanel}get tabsGridLayout(){return this._tabsGridLayout}create(){super.create(),this._aboutToggle&&(this._aboutToggle.GameObject.active=!1),this._statsToggle&&(this._statsToggle.GameObject.active=!1),this._spellsToggle&&(this._spellsToggle.GameObject.active=!1),this._aboutPanel&&(this._aboutPanel.active=!1),this._statsPanel&&(this._statsPanel.active=!1),this._spellsPanel&&(this._spellsPanel.active=!1),this._learnMorePanel&&(this._learnMorePanel.active=!1)}};(0,Y.Cg)([(0,Q.x4W)("aboutToggle"),(0,Y.Sn)("design:type",X.l)],J.prototype,"_aboutToggle",void 0),(0,Y.Cg)([(0,Q.x4W)("statsToggle"),(0,Y.Sn)("design:type",X.l)],J.prototype,"_statsToggle",void 0),(0,Y.Cg)([(0,Q.x4W)("spellsToggle"),(0,Y.Sn)("design:type",X.l)],J.prototype,"_spellsToggle",void 0),(0,Y.Cg)([(0,Q.x4W)("aboutPanel"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_aboutPanel",void 0),(0,Y.Cg)([(0,Q.x4W)("statsPanel"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_statsPanel",void 0),(0,Y.Cg)([(0,Q.x4W)("spellsPanel"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_spellsPanel",void 0),(0,Y.Cg)([(0,Q.x4W)("learnMorePanel"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_learnMorePanel",void 0),(0,Y.Cg)([(0,Q.x4W)("tabsGridLayout"),(0,Y.Sn)("design:type",Q.JTA)],J.prototype,"_tabsGridLayout",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.nKb)("elementIconAtlas"),(0,Y.Sn)("design:type",String)],J.prototype,"_elementIconAtlas",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.nKb)("elementIconFrameWater"),(0,Y.Sn)("design:type",String)],J.prototype,"_elementIconFrameWater",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.nKb)("elementIconFrameFire"),(0,Y.Sn)("design:type",String)],J.prototype,"_elementIconFrameFire",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.nKb)("elementIconFrameStorm"),(0,Y.Sn)("design:type",String)],J.prototype,"_elementIconFrameStorm",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.nKb)("elementIconFrameEarth"),(0,Y.Sn)("design:type",String)],J.prototype,"_elementIconFrameEarth",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.nKb)("elementIconFrameIce"),(0,Y.Sn)("design:type",String)],J.prototype,"_elementIconFrameIce",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.nKb)("lockedIconAtlas"),(0,Y.Sn)("design:type",String)],J.prototype,"_lockedIconAtlas",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Q.nKb)("lockedIconFrame"),(0,Y.Sn)("design:type",String)],J.prototype,"_lockedIconFrame",void 0),(0,Y.Cg)([(0,Q.x4W)("fillBarAttackAndHearts"),(0,Y.Sn)("design:type",Z.s)],J.prototype,"_fillBarAttackAndHearts",void 0),(0,Y.Cg)([(0,Q.x4W)("fillBarHearts"),(0,Y.Sn)("design:type",Z.s)],J.prototype,"_fillBarHearts",void 0),(0,Y.Cg)([(0,Q.x4W)("textAttack"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_textAttack",void 0),(0,Y.Cg)([(0,Q.x4W)("textHearts"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_textHearts",void 0),(0,Y.Cg)([(0,Q.x4W)("textElement"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_textElement",void 0),(0,Y.Cg)([(0,Q.x4W)("iconContainerElement"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_iconContainerElement",void 0),(0,Y.Cg)([(0,Q.x4W)("textEvolveLevel"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_textEvolveLevel",void 0),(0,Y.Cg)([(0,Q.x4W)("rowObjectEvolveLevel"),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"_rowObjectEvolveLevel",void 0),(0,Y.Cg)([(0,Q.x4W)("textSpellsTitles"),(0,Y.Sn)("design:type",Array)],J.prototype,"_textSpellsTitles",void 0),(0,Y.Cg)([(0,Q.x4W)("textSpellsLevel"),(0,Y.Sn)("design:type",Array)],J.prototype,"_textSpellsLevel",void 0),(0,Y.Cg)([(0,Q.x4W)("textSpellsRange"),(0,Y.Sn)("design:type",Array)],J.prototype,"_textSpellsRange",void 0),(0,Y.Cg)([(0,Q.x4W)("gridSpellsLevel"),(0,Y.Sn)("design:type",Array)],J.prototype,"_gridSpellsLevel",void 0),(0,Y.Cg)([(0,Q.x4W)("gridSpellsRange"),(0,Y.Sn)("design:type",Array)],J.prototype,"_gridSpellsRange",void 0),(0,Y.Cg)([(0,Q.x4W)("gridSpellsLevelOff"),(0,Y.Sn)("design:type",Array)],J.prototype,"_gridSpellsLevelOff",void 0),(0,Y.Cg)([(0,Q.x4W)("gridSpellsRangeOff"),(0,Y.Sn)("design:type",Array)],J.prototype,"_gridSpellsRangeOff",void 0),(0,Y.Cg)([(0,Q.x4W)("iconContainerSpells"),(0,Y.Sn)("design:type",Array)],J.prototype,"_iconContainerSpells",void 0),(0,Y.Cg)([(0,Q.x4W)("textAbout"),(0,Y.Sn)("design:type",Q.EYj)],J.prototype,"_textAbout",void 0),J=(0,Y.Cg)([(0,Q.EVk)("PetStatsPanelPrefab")],J)},38097:(q,K,z)=>{"use strict";z.d(K,{O:()=>St});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(35120),J=z(60881),tt=z(49237),et=z(54422),it=z(43754),st=z(19592),nt=z(72772),at=z(91020),rt=z(11848),ot=z(52894),ht=z(77065),ct=z(65050),dt=z(96810),lt=z(41674),ut=z(215),ft=z(46784),bt=z(13956),pt=z(80060),vt=z(87821),gt=z(53661),mt=z(16847),yt=z(12696),_t=z(56461),Et=z(74951),wt=z(56345);const Tt="Merge";class St extends _t.A{get petDataProvider(){return this._petDataProvider}constructor(q,K,z,Y,X){super(q,K,200,{},[]),this.prefabRoot=null,this._headerComponent=null,this._gameObject=null,this._headerGameObject=null,this._petDataProvider=null,this._petsMenuSetupCancelablePromises=[],this._levelPurchase=null,this._currentDataSchema=null,this.onLoaded=new Q.HN0,this.isModal=!1,this.background.visible=!1,X&&(this._headerComponent=X),this._contentLayer=Y,this._currentDataSchema=z}create(){super.create(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ft.B.PetsWindow,interfaceType:lt.Wm.Window,originType:lt.$N.ButtonClick,originID:"pet_info_pop_up",instanceType:ct.N.UI}),this._prefabLoader=Z.q.instance.prodigy.gameContainer.get("983-05a7");const q=pt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,X.l.Pets_YourPetMenu,{PET_RESCUE_CREATURE_DATA:this._currentDataSchema,[gt.hi.YourPetPanelPetData]:this._currentDataSchema,[gt.oD.PetGearFtueOverlayEnabled]:nt.I.shouldShowPetGearTutorialCached,[gt.hi.YourPetPanelMergeOnClick]:()=>this.showPetMergeSubMenu()});this._petsMenuSetupCancelablePromises.push(q),q.then((K=>{q.cancelled||this.setUpMenuPrefab(K)})).catch(Q.RQr.createHandler("Unable to load Pets - Your Pet Menu prefab"));const K=pt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,X.l.Pets_YourPetMenuHeader,{});this._petsMenuSetupCancelablePromises.push(K),K.then((q=>{K.cancelled||this.setUpMenuHeaderPrefab(q)})).catch(Q.RQr.createHandler("Unable to load Pets - Your Pet Menu Header prefab"))}setUpMenuPrefab(q){var K,z,Y,X;q&&!this.destroyed&&(this._gameObject=q,this._contentLayer.addChild(this._gameObject.findComponentInChildren(Q.y4o).getRootContainer()),this._petDataProvider=this._gameObject.findComponentInChildren(Et.z),null===(K=this._petDataProvider)||void 0===K||K.onLetPetGo.add(this.letPetGoConfirm,this),null===(z=this._petDataProvider)||void 0===z||z.onAddToTeam.add(this.addPetToTeamContinue,this),null===(Y=this._petDataProvider)||void 0===Y||Y.onEvolvePet.add(this.onPetEvolved,this),this._levelPurchase=this._gameObject.findComponentInChildren(wt.R),null===(X=this._levelPurchase)||void 0===X||X.onLevelUpPurchased.add(this.onPetLevelledUp,this),this.setUpGearSubMenu(),Z.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu"),this.bindCoinDisplayToLevelPurchase(),rt.N.shouldShowPetMergeTutorial&&this.displayPetMergeFTUE(),this.onLoaded.dispatch())}setUpMenuHeaderPrefab(q){var K;if(!q||this.destroyed)return;this._headerGameObject=q,this._headerComponent&&(this._headerComponent.backToYourTeamButton.onClick.add(this.close,this),this._headerComponent.backToYourTeamButton.GameObject.addComponent(et.E).initialize(J.D.ESC,(()=>{var q;nt.I.shouldShowPetGearTutorialCached||(null===(q=this._headerComponent)||void 0===q||q.onSubMenuEsc.dispatch(this),this.close())})));const z=this._headerGameObject.findComponentInChildren(Q.y4o);null===(K=this.prefabRoot)||void 0===K||K.addChild(z.getRootContainer()),this.bindCoinDisplayToLevelPurchase()}bindCoinDisplayToLevelPurchase(){var q;if(!this._headerGameObject||!this._gameObject)return;const K=this._headerGameObject.findComponentInChildren(yt.L),z=this._gameObject.findComponentInChildren(wt.R);null==z||z.onLevelUpPurchased.add(K.animateNewCoinCount,K);const Y=this._hardCurrencyDataProvider.getBalance(27),Q=this._headerGameObject.findComponentInChildren(mt.n),X=this._headerGameObject.findComponentInChildren(ht.B);null==Q||Q.updateAmount(Y),X&&(X.initialNumber=Y,null===(q=this._hardCurrencyDataProvider)||void 0===q||q.onBalanceChanged.add((()=>{X.targetNumber=this._hardCurrencyDataProvider.getBalance(27),X.startCounter()}),this));const Z=this._gameObject.findComponentInChildren(ot.u);null==Z||Z.onMenuClose.add((()=>{const q=this._hardCurrencyDataProvider.getBalance(27);null==Q||Q.updateAmount(q),X.initialNumber=q}))}setUpGearSubMenu(){var q,K;if(!this._gameObject)return void Q.VyI.log("[YourPetMenu]: Unable to set up gear sub menu, game object is null",Q.$bb.Error);const z=this._gameObject.findComponentInChildren(Q.bE_),Y=z.Container.get("PetHatSlotContainer"),X=z.Container.get("PetRelicSlotContainer");null===(q=null==Y?void 0:Y.GameObject.findComponentInChildren(tt.$))||void 0===q||q.onEnabledClick.add((()=>this.launchSubMenu("petHat"))),null===(K=null==X?void 0:X.GameObject.findComponentInChildren(tt.$))||void 0===K||K.onEnabledClick.add((()=>this.launchSubMenu("petRelic"))),nt.I.shouldShowPetGearTutorialCached&&this.displayPetGearFtue().catch(Q.RQr.createHandler("[YourPetMenu] Error displaying pet gear ftue"))}displayPetGearFtue(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(!this._gameObject)return void Q.VyI.log("[YourPetMenu]: Unable to display pet gear ftue, game object is null",Q.$bb.Error);Z.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:dt.l.PetGearPetMenu},{step_index:3});const q=(yield nt.I.getEquippablePetGears()).sort(((q,K)=>st.R[q.data.asset.type]-st.R[K.data.asset.type])),K=this._gameObject.findComponentInChildren(Q.bE_),z=K.Container.get(gt.oD.PetGearFtueEnabledInputTransform),Y=K.Container.get(at.t.GEAR_TYPE_TO_SLOT_IDENTIFIER_MAP[q[0].data.asset.type]).GameObject.findComponent(Q.XVE);z.GameObject.parent.setLayer("newHandLayer",!0),z.setPosition(Y.worldPosition.x-Y.widthDelta*Y.pivot.x,Y.worldPosition.y-Y.heightDelta*Y.pivot.y),z.fullWidth=Y.fullWidth,z.fullHeight=Y.fullHeight}))}displayPetMergeFTUE(){this.showPetMergeSubMenu()}letPetGoConfirm(){var q;null===(q=this._headerComponent)||void 0===q||q.onPetRelease.dispatch(this._currentDataSchema),this._headerComponent&&(this._headerComponent.startAutoTooltip(Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("PET_WAS_LET_GO")),this._headerComponent.onLetPetGo.dispatch()),this.close()}addPetToTeamContinue(){this._headerComponent&&this._headerComponent.onAddPetToTeam.dispatch(this._currentDataSchema),this.close()}onPetEvolved(){this._headerComponent&&this._headerComponent.onPetUpgraded.dispatch()}onPetLevelledUp(){this._headerComponent&&this._headerComponent.onPetUpgraded.dispatch()}showPetMergeSubMenu(){this.launchSubMenu(Tt)}onPetMergeSubMenuClosed(){this.closeSubMenu()}launchSubMenu(q){var K;this._gameObject?this._headerComponent?(super.launchSubMenu(q),this.pauseMenu(),this._headerComponent.closeButton.GameObject.active=!1,this._headerComponent.yourTeamToggle.GameObject.parent.active=!1,q===Tt?(Z.q.instance.prodigy.open.petMergeMenu(this._currentDataSchema,lt.k.PetBook,(()=>{this.onPetMergeSubMenuClosed()})),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(ut.Eu.PetMergeSelectMerge)):(this._gameObject.active=!1,this._headerGameObject.active=!1,this._headerComponent.backToYourTeamButton.GameObject.active=!1,this._headerComponent.backToYourPetButton.GameObject.active=!0,Z.q.instance.prodigy.open.yourPetGear(this._currentDataSchema,q,this._contentLayer,this._headerComponent)),null===(K=this._headerComponent.backToYourTeamButton.GameObject.findComponent(et.E))||void 0===K||K.destroy(),this._headerComponent.backToYourPetButton.onClick.add(this.closeSubMenu,this),this._headerComponent.onSubMenuClose.add(this.closeSubMenu,this),this._headerComponent.onSubMenuEsc.add(this.closeSubMenu,this)):Q.VyI.log("[YourPetMenu]: Unable to launch sub menu, header component is not set up",Q.$bb.Error):Q.VyI.log("[YourPetMenu]: Unable to launch sub menu, game object is null",Q.$bb.Error)}closeSubMenu(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.resumeMenu(),this.leaveSubMenu(),yield nt.I.updateCachedPetGearTutorialFlag(),this._headerComponent&&(this._headerComponent.backToYourTeamButton.GameObject.active=!0,this._headerComponent.backToYourPetButton.GameObject.active=!1,this._headerComponent.backToYourPetButton.onClick.remove(this.closeSubMenu,this),this._headerComponent.onSubMenuClose.remove(this.closeSubMenu,this),this._headerComponent.onSubMenuEsc.remove(this.closeSubMenu,this),this._headerComponent.backToYourTeamButton.GameObject.addComponent(et.E).initialize(J.D.ESC,(()=>{var q;nt.I.shouldShowPetGearTutorialCached||(null===(q=this._headerComponent)||void 0===q||q.onSubMenuClose.dispatch(this),this.close())}))),this._headerGameObject&&(this._headerGameObject.active=!0),this._gameObject&&(this._gameObject.active=!0,pt.d.updateInjectedValues(this._gameObject,{PET_RESCUE_CREATURE_DATA:this._currentDataSchema,[gt.oD.PetGearFtueOverlayEnabled]:nt.I.shouldShowPetGearTutorialCached}),this._gameObject.findComponentInChildren(Et.z).bindContext(),this._gameObject.findComponentInChildren(vt.o).bindContext())}))}cancelPetMenuLoading(){this._petsMenuSetupCancelablePromises.forEach((q=>q.cancel())),this.close()}destroy(){var q,K,z,Y,Q;this.onLoaded.dispose(),null===(q=this._hardCurrencyDataProvider)||void 0===q||q.onBalanceChanged.removeAll(this),this._petsMenuSetupCancelablePromises.forEach((q=>q.cancel())),this._petsMenuSetupCancelablePromises.length=0,this._headerComponent&&(this._headerComponent.backToYourPetButton.onClick.dispose(),this._headerComponent.onSubMenuClose.dispose(),this._headerComponent.onSubMenuEsc.dispose(),this._headerComponent.backToYourTeamButton.onClick.dispose(),null===(z=null===(K=this._headerComponent.backToYourTeamButton.GameObject)||void 0===K?void 0:K.findComponent(et.E))||void 0===z||z.destroy()),null===(Y=this._gameObject)||void 0===Y||Y.destroy(),null===(Q=this._headerGameObject)||void 0===Q||Q.destroy(),this._currentDataSchema=null,super.destroy()}}(0,Y.Cg)([(0,bt.b)("bec-c6b4"),(0,Y.Sn)("design:type",it.W)],St.prototype,"_hardCurrencyDataProvider",void 0)},52142:(q,K,z)=>{"use strict";z.d(K,{Y:()=>Zt});var Y,Q=z(8674),X=z(62459),Z=z(88022),J=z(99625),tt=z(35120),et=z(49237),it=z(72772),st=z(16383),nt=z(11848),at=z(73797),rt=z(96810),ot=z(215),ht=z(80060),ct=z(53661),dt=z(60881),lt=z(54422),ut=z(12420),ft=z(11472),bt=z(5269),pt=z(77938),vt=z(28152),gt=z(65231),mt=z(29834);let yt=Y=class extends gt.s{hideContainer(){this._mainContainer?this._mainContainer.active=!1:X.VyI.log("EmptyPetCardComponent: Main container not set.",X.$bb.Warning)}resetToDefaultState(){this._mainContainer?this._animator?(this._mainContainer.active=!0,this._animator.GameObject.active=!1):X.VyI.log("EmptyPetCardComponent: Animator not set.",X.$bb.Warning):X.VyI.log("EmptyPetCardComponent: Main container not set.",X.$bb.Warning)}playUnlockAnimationAfterDelay(q){return(0,Q.sH)(this,void 0,void 0,(function*(){this._animator?(yield X.Egh.timeout(q),this._animator.GameObject.active=!0,this._animator.playAnimation(Y.UNLOCK_ANIMATION_STRING,!1,!0)):X.VyI.log("EmptyPetCardComponent: Animator not set.",X.$bb.Warning)}))}};yt.UNLOCK_ANIMATION_STRING="unlock-text",(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],yt.prototype,"_mainContainer",void 0),(0,Q.Cg)([(0,X.MnK)(mt.j),(0,Q.Sn)("design:type",mt.j)],yt.prototype,"_animator",void 0),yt=Y=(0,Q.Cg)([(0,X.EVk)("EmptyPetCard",vt.Y.uiPet)],yt);var _t=z(16815),Et=z(90633),wt=z(22023),Tt=z(89400);class St extends Tt.B{constructor(){super(...arguments),this._data=null}get data(){return this._data}updateContentView(q){this._data=q,this.onClick.add(q.callback)}resetData(){this.onClick.removeAll(),this._data=null}destroy(){this.onClick.dispose(),this._data=null,super.destroy()}}var At=z(35189),Ct=z(51972),Ot=z(48199),It=z(41674),Dt=z(46784),Rt=z(68370);class Pt{constructor(q,K,z){this._isHighlightOn=!1,this._alphaEnabledOnDefaultCard=!1,this._alphaEnabledOnCurrentTeamPet=!1,this.onYourPetAdd=new X.HN0,this.onYourPetInfo=new X.HN0,this.onYourPetRelease=new X.HN0,this.onYourPetClicked=new X.HN0,this.onYourPetHighlightClicked=new X.HN0,this.onCellStateChanged=new X.HN0,this.clearState=new X.HN0,this.clearPetSelection=new X.HN0,this.onStackDrawerOpened=new X.HN0,this._tweenDrawerInSignal=new X.HN0,this._tweenDrawerOutSignal=new X.HN0,this._resetScrollSignal=new X.HN0,this._parentContainer=q,this._tooltip=K,this._scrollView=z,this._tooltipStartX=z.GameObject.legacyTransform.x,this._tooltipStartY=z.GameObject.legacyTransform.y;const Y=tt.q.instance.prodigy;this._segment=Y.gameContainer.get("20f-5f67"),this._tooltip.displayTooltip({bodyText:"",arrowDirection:Ct.i.RIGHT,arrowYRelPos:.5},null,!1,[()=>{this.onYourPetInfo.dispatch(this._tooltip.currentCreatureData),this.hideTooltip()},()=>{this._tooltip.toolTipComponent.GameObject.findComponentInChildren(X.JTA,!0).GameObject.children[0].findComponent(et.$).isStateLocked()?(Y.open.overlayToolTip(Ot.A.TOOLTIP_MANUAL,{bodyText:Y.gameContainer.get(X.$Bt.LocalizationService).getText("PET_ALREADY_ON_TEAM"),xPosition:this._tooltip.toolTipComponent.GameObject.legacyTransform.x-74,yPosition:this._tooltip.toolTipComponent.GameObject.legacyTransform.y-79}),Y.audio.playSFX(67,"button-disabled"),this.highlightAll(!1)):this.onYourPetAdd.dispatch(this._tooltip.currentCreatureData),this.hideTooltip()}]),this._tooltipParent=new X._mx,this._tooltipParent.layer="tooltip",this._tooltipParent.addComponent(X.dLy),this._tooltip.toolTipComponent.GameObject.parent=this._tooltipParent,Rt.b.make(this._tooltipParent,this._tooltip.toolTipComponent.GameObject.legacyTransform)}initPetCardCell(q,K){const z=q.findComponentInChildren(_t.Z,!0),Y=K?pt.t.getItem("pet",K[0].ID):null;z.setPetData(K,Y),z.updateDisplay(),q.findComponentInChildren(At.e).SecondState=this._isHighlightOn,this.updatePetCardDisabledState(q);const Q=q.findComponentInChildren(St);Q.onOver.add((q=>z.onInputOver.dispatch(null,q))),Q.onOut.add((q=>z.onInputOut.dispatch(null,q)));const X={creatureData:K,callback:()=>{const Y=q.findComponentInChildren(At.e);if(z.getDisabledState())if(Y.SecondState){const q=this._tooltipStartX+Q.GameObject.legacyTransform.x+Q.GameObject.legacyTransform.width-74,K=this._tooltipStartY+Q.GameObject.legacyTransform.y+5+this._scrollView.contentView.legacyTransform.y;this.showAlreadyOnTeamTooltip(q,K)}else this.clearState.dispatch();else if(Y.SecondState&&this._tooltip.isActive())this.highlightAll(!1);else if(Y.SecondState&&!this._tooltip.isActive())this.onYourPetHighlightClicked.dispatch(K[0]);else{const q=this._tooltipStartX+Q.GameObject.legacyTransform.x+20,Y=this._tooltipStartY+Q.GameObject.legacyTransform.y+Q.GameObject.legacyTransform.height/2+this._scrollView.contentView.legacyTransform.y;this.showCreatureContextTooltip(q,Y,K[0]),z.setSelectable(!0)}}};Q.updateContentView(X)}resetPetCardCell(q){const K=q.findComponentInChildren(St);K&&K.resetData()}highlightAll(q,K=!0){this._isHighlightOn=q,this.onCellStateChanged.dispatch((q=>{q.findComponentInChildren(At.e,!0).SecondState=this._isHighlightOn})),K&&this.hideTooltip()}setAlphaState(q,K){this._alphaEnabledOnDefaultCard=q,this._alphaEnabledOnCurrentTeamPet=K,this.onCellStateChanged.dispatch((q=>{this.updatePetCardDisabledState(q)}))}updatePetCardDisabledState(q){const K=q.findComponentInChildren(_t.Z,!0);(this._alphaEnabledOnDefaultCard&&!q.findComponentInChildren(At.e,!0).SecondState||this._alphaEnabledOnCurrentTeamPet&&K.isOnTeam())&&1===K.creatureData.length?K.setDisabledState(!0):K.setDisabledState(!1)}showCreatureContextTooltip(q,K,z){this._segment.featureCommon.sendButtonEvent({buttonName:"pet",destinationName:"pet_info_pop_up",interfaceType:It.Wm.Popup,interfaceName:Dt.B.PetsWindow,saveClickInfo:"pet_info_pop_up"}),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(ot.Eu.PetMergeSelectPet),this.onYourPetClicked.dispatch(),this.onYourPetInfo.dispatch(z),this.highlightAll(!1,!1)}showAlreadyOnTeamTooltip(q,K){const z=tt.q.instance.prodigy;z.audio.playSFX(67,"button-disabled");const Y=z.open.overlayToolTip(Ot.A.TOOLTIP_MANUAL,{bodyText:z.gameContainer.get(X.$Bt.LocalizationService).getText("PET_ALREADY_ON_TEAM"),xPosition:Math.floor(q),yPosition:Math.floor(K)});Y.onCreate.addOnce((()=>{Y.ui.parent=this._tooltipParent}))}hideTooltip(){this._tooltip.hideTooltip()}cleanup(){this.onYourPetAdd.dispose(),this.onYourPetInfo.dispose(),this.onYourPetRelease.dispose(),this.onYourPetClicked.dispose(),this.onCellStateChanged.dispose(),this.clearState.dispose(),this.clearPetSelection.dispose(),this.onStackDrawerOpened.dispose(),this.onYourPetHighlightClicked.dispose(),this._tweenDrawerInSignal.dispose(),this._tweenDrawerOutSignal.dispose(),this._resetScrollSignal.dispose(),this._tooltip=null,this._tooltipParent.destroy()}}class Mt{get toolTipComponent(){return this._toolTipComponent}get currentCreatureData(){return this._currentCreatureData}set dismissCallback(q){this._tooltipCancelAction=q}constructor(q,K){this._tooltipCancelAction=null,this._currentCreatureData=null,this.onTooltipDisplayed=new X.HN0,this._parentGameObject=q,this._prefabID=K}initCloseArea(q,K){this._tooltipButtonContainer=q,this._tooltipButtonContainer.findComponent(et.$).onClick.add(this.closeAreaClicked,this),this._tooltipButtonContainer.active=!1,K&&(this._tooltipCancelAction=K),this._tooltipButtonContainer.findComponent(et.$).inputEnabled=!1}displayTooltip(q,K,z=!0,Y){this._currentCreatureData=K,this._toolTipComponent=Ot.A.displayToolTipButtonGrid(this._toolTipComponent,this._parentGameObject,q,this._prefabID,z,Y),this._tooltipButtonContainer.active=z,z&&this.onTooltipDisplayed.dispatch()}hideTooltip(){this._tooltipButtonContainer.active=!1,this._toolTipComponent.close(),this._currentCreatureData=null}closeAreaClicked(){this.hideTooltip(),this._tooltipCancelAction&&this._tooltipCancelAction()}isActive(){return!!this._toolTipComponent&&this._toolTipComponent.GameObject.active}cleanup(){this._tooltipButtonContainer&&(this._tooltipButtonContainer.findComponent(et.$).onClick.dispose(),this._tooltipButtonContainer=null),this._tooltipCancelAction=null,this._currentCreatureData=null,this.onTooltipDisplayed.dispose()}}class Nt{get panelGameObject(){return this._panelGameObject}get cardStateManager(){return this._cardStateManager}constructor(q,K,z){this._allocatedPetCardPoolSize=12,this._allocatedEmptySlotPoolSize=12,this._maxActiveSize=0,this._petScrollList=[],this._panelGameObject=null,this._scrollView=null,this._scrollBar=null,this._gridLayout=null,this._scrollUpdater=new X._mx,this._trashContainerGO=null,this._noPetsMessageGameObject=null,this._upInputObject=new X._mx,this._downInputObject=new X._mx,this._startIndexOfCurrentRange=0,this._cachedContentViewLastY=0,this._nextContentViewY=0,this._prevContentViewY=0,this._minContentViewY=180,this._maxRowIndex=0,this._isLoading=!0,this.tooltipContainer=null,this._numEmptySlotsToAnimateOnNextUpdate=0,this._inputScrollLocked=!1,this._player=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;const Y=tt.q.instance.prodigy.gameContainer.get("983-05a7");this._panelGameObject=Y.loadFromGUID(J.l.Pets_OwnedPetsScrollviewPanel),q.addChild(this._panelGameObject.legacyTransform.group),this._gridLayout=this._panelGameObject.findComponentInChildren(X.JTA),this._scrollView=this._panelGameObject.findComponentInChildren(ft.B),this._scrollBar=this._panelGameObject.findComponentInChildren(ut.$),this._trashContainerGO=new X._mx,this._trashContainerGO.addComponent(X.K16),this._panelGameObject.addChild(this._trashContainerGO),this._trashContainerGO.legacyTransform.x=0,this._trashContainerGO.legacyTransform.y=730,this._petCardPool=new X.iyL(this.createPetCard.bind(this),null,this.recyclePetCard.bind(this)),this._petCardPool.allocate(this._allocatedPetCardPoolSize),this._emptySlotPool=new X.iyL(this.createEmptySlotCard.bind(this),null,this.recycleEmptySlotCard.bind(this)),this._emptySlotPool.allocate(this._allocatedEmptySlotPoolSize),this._maxActiveSize=this._allocatedPetCardPoolSize,this._startIndexOfCurrentRange=0,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),this._noPetsMessageGameObject=this._panelGameObject.findComponentInChildren(X.EYj).GameObject.parent,this._noPetsMessageGameObject.active=!1,this.tooltipParent=new X._mx,this.tooltipParent.addComponent(X.K16);const Q=J.l.Pets_ButtonTooltipOwnedPanel;this.tooltipContainer=new Mt(this.tooltipParent,Q),this.tooltipContainer.initCloseArea(this._panelGameObject.findComponentInChildren(et.$).GameObject),this._cardStateManager=new Pt(q,this.tooltipContainer,this._scrollView),this._cardStateManager.onCellStateChanged.add(this.cellStateChangedHandler,this),this.tooltipContainer.dismissCallback=()=>{this._cardStateManager.highlightAll(!1)},this._scrollUpdater.update=()=>{this.update()},this._panelGameObject.addChild(this._scrollUpdater),this.setPetList(z),this.cardStateManager.onYourPetHighlightClicked.add(K.sendData,K),this.cardStateManager.clearState.add(K.clearStates,K),this.cardStateManager.clearPetSelection.add(K.clearPetSelection,K),this.cardStateManager.onYourPetAdd.add(K.dispatchAddSignal,K),this.cardStateManager.onYourPetClicked.add(K.reportClick,K),this._scrollBar.onInputUp.add(this.scrollBarClickedHandler,this),this._panelGameObject.addChild(this._upInputObject),this._panelGameObject.addChild(this._downInputObject),this._upInputObject.addComponent(lt.E).initialize(dt.D.UP,this.onKeyboardUp.bind(this),!0),this._downInputObject.addComponent(lt.E).initialize(dt.D.DOWN,this.onKeyboardDown.bind(this),!0)}onKeyboardUp(){!this._inputScrollLocked&&this._panelGameObject.active&&this._scrollView.scrollByPixels(15,bt.H.Vertical)}onKeyboardDown(){!this._inputScrollLocked&&this._panelGameObject.active&&this._scrollView.scrollByPixels(-15,bt.H.Vertical)}setInputScrollEnabled(q=!0){this._inputScrollLocked=q,this._scrollView.allowMouseWheel=q,this._scrollView.allowTouch=q}createPetCard(){const q=tt.q.instance.prodigy.gameContainer.get("983-05a7").loadFromGUID(J.l.Pets_OwnedPetCardwithmergerank);return q.addComponent(St),q}createEmptySlotCard(){return tt.q.instance.prodigy.gameContainer.get("983-05a7").loadFromGUID(J.l.Pets_EmptySlotCard)}recyclePetCard(q){q.findComponentInChildren(_t.Z,!0).clearCard(),q.legacyTransform.x=0,q.legacyTransform.y=0,this._trashContainerGO.addChild(q)}recycleEmptySlotCard(q){q.legacyTransform.x=0,q.legacyTransform.y=0,this._trashContainerGO.addChild(q)}setPetList(q,K=0){for(this._isLoading=!0,this.scrollToPercent(0),this._startIndexOfCurrentRange=0,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),this._numEmptySlotsToAnimateOnNextUpdate=K;!this._gridLayout.isEmpty();)this.removeCard();if(q){const K=wt.P8.sortPetList(q).map((q=>[q]));this._petScrollList=K.map((q=>({petData:q,addCardMethod:this.addPetCard.bind(this,q),removeCardMethod:this.onPetCardRemoved.bind(this),gridLayoutIndex:-1})))}this._maxRowIndex=Math.ceil((this._petScrollList.length-this._maxActiveSize)/this._gridLayout.fixedColumnCount);const z=Math.ceil(this._petScrollList.length/this._gridLayout.fixedColumnCount);this._scrollView.contentView.legacyTransform.dimensionPlaceholder.height=this._gridLayout.yPositionOffset+z*this._gridLayout.rowSpacing,this._noPetsMessageGameObject.active=this._petScrollList.length<=0,this.addActivePetCardRange()}addCardFromScrollList(q,K=!1){this._petScrollList[q].addCardMethod(K),K&&this._petScrollList.forEach((q=>{q.gridLayoutIndex>=0&&(q.gridLayoutIndex+=1)})),this._petScrollList[q].gridLayoutIndex=K?0:this._gridLayout.GameObject.children.length-1}addActivePetCardRange(){for(let q=0;q=this._maxActiveSize);q++)this.addCardFromScrollList(q);this._gridLayout.indexOffset=this._startIndexOfCurrentRange,this._gridLayout.updateAll(!1),this._isLoading=!1}hideFtueGuideHands(){var q;(null===(q=this._ftuePetCard)||void 0===q?void 0:q.ftueGuideHand)&&(this._ftuePetCard.ftueGuideHand.active=!1)}addPetCard(q,K=!1){const z=this._petCardPool.getObject().findComponentInChildren(_t.Z,!0);this._cardStateManager.initPetCardCell(z.GameObject,q),K?this._gridLayout.GameObject.addChildAt(z.GameObject,0):this._gridLayout.GameObject.addChild(z.GameObject),!it.I.shouldShowPetGearTutorialCached&&this.petEligibleForUpgradeTutorial(q)&&(this._ftuePetCard=z,this._ftuePetCard.ftueGuideHand.active=!0)}petEligibleForUpgradeTutorial(q){return!tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Et.B.FEATURE_PET_UPGRADE_FTUE,Et.B.BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME)&&!this._ftuePetCard&&q.some((q=>q.levelq.gridLayoutIndex===z));Q&&(Q.gridLayoutIndex=-1,Q.removeCardMethod(Y),q&&this._petScrollList.forEach((q=>{q.gridLayoutIndex>=1&&(q.gridLayoutIndex-=1)})))}onPetCardRemoved(q){this._cardStateManager.resetPetCardCell(q),this._petCardPool.recycleObject(q)}onEmptySlotRemoved(q){this._emptySlotPool.recycleObject(q)}updateAllActiveCards(){this._petCardPool.aliveList.forEach((q=>{q.findComponentInChildren(_t.Z,!0).updateDisplay()}))}cellStateChangedHandler(q){this._petCardPool.aliveList.forEach(q)}scrollToPercent(q){this._scrollView.scrollToPercent(q,bt.H.Vertical),this.tooltipContainer.isActive()&&this._cardStateManager.highlightAll(!1)}scrollToPet(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=!0){const z=this._petScrollList.indexOf(q);if(z<0)return void X.VyI.log("[OwnedPetsPanel.scrollToPet] Pet scroll card not found",X.$bb.Warning,q);const Y=Math.floor(z/this._gridLayout.fixedColumnCount)/Math.ceil(this._petScrollList.length/this._gridLayout.fixedColumnCount);this._scrollView.update(),K&&(yield this._scrollView.scrollToPercentTween(Y,bt.H.Vertical,300)),this._scrollView.scrollToPercent(Y,bt.H.Vertical)}))}getFirstGearEnabledPet(){return this._petScrollList.find((q=>{var K;return(null===(K=pt.t.getItem("pet",q.petData[0].ID).data.gearEquipSlots)||void 0===K?void 0:K.length)>0}))}findCardForPet(q){return this._petScrollList.find((K=>K.petData[0].ID===q.ID))}scrollBarClickedHandler(){this.tooltipContainer.isActive()&&this._cardStateManager.highlightAll(!1)}update(){if(this._scrollView.contentView.legacyTransform.y!==this._cachedContentViewLastY&&!this._isLoading){this._cachedContentViewLastY=this._scrollView.contentView.legacyTransform.y;const q=Math.abs(this._cachedContentViewLastY);if(q>this._nextContentViewY)if(this._isLoading=!0,this._startIndexOfCurrentRange+this._maxActiveSize>=this._petScrollList.length)this._nextContentViewY=this._scrollView.contentView.legacyTransform.height,this._prevContentViewY=this.calcPrevYThreshold(),this._isLoading=!1;else{let K=q-this._minContentViewY;K<0&&(K=0);let z=Math.ceil(K/this._gridLayout.rowSpacing);z>this._maxRowIndex&&(z=this._maxRowIndex);const Y=z*this._gridLayout.fixedColumnCount;let Q=Y-this._startIndexOfCurrentRange;if(this._startIndexOfCurrentRange=Y,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),Q>0){Q>this._maxActiveSize&&(Q=this._maxActiveSize);for(let K=0;Kthis._maxRowIndex&&(z=this._maxRowIndex);const Y=z*this._gridLayout.fixedColumnCount;let Q=this._gridLayout.GameObject.children.length%this._gridLayout.fixedColumnCount;0===Q&&(Q=this._gridLayout.fixedColumnCount);let X=this._startIndexOfCurrentRange-Y-this._gridLayout.fixedColumnCount;X>this._maxActiveSize-this._gridLayout.fixedColumnCount&&(X=this._maxActiveSize-this._gridLayout.fixedColumnCount);const Z=X+Q;for(let q=0;qthis._maxActiveSize&&(J=this._maxActiveSize),this._startIndexOfCurrentRange=Y;for(let q=J-1;q>=0;q--)this._startIndexOfCurrentRange+q0&&this.playNewEmptySlotAnimations()}calcNextYThreshold(){return this._minContentViewY+Math.floor(this._startIndexOfCurrentRange/this._gridLayout.fixedColumnCount)*this._gridLayout.rowSpacing}calcPrevYThreshold(){if(0===this._startIndexOfCurrentRange)return 0;return this._minContentViewY+Math.floor((this._startIndexOfCurrentRange-1)/this._gridLayout.fixedColumnCount)*this._gridLayout.rowSpacing}pause(){this._cardStateManager.highlightAll(!1),this._cardStateManager.setAlphaState(!1,!1),this._panelGameObject.active=!1}resume(){var q;this._panelGameObject.active=!0,null===(q=this._scrollView)||void 0===q||q.updateScrollEnabled(bt.H.Vertical)}destroyPanel(){const q=q=>{q.findComponentInChildren(_t.Z,!0).cleanupCacheAsBitmap()};this._petCardPool.aliveList.forEach(q),this._petCardPool.deadList.forEach(q),this._petCardPool.destroy(!0),this._emptySlotPool.destroy(!0),this._upInputObject.destroy(),this._downInputObject.destroy(),this._cardStateManager.cleanup(),this._cardStateManager.onCellStateChanged.remove(this.cellStateChangedHandler,this),this.tooltipContainer.cleanup(),this._scrollBar.onInputUp.remove(this.scrollBarClickedHandler,this),this._scrollBar.destroy(),this._scrollView.destroy(),this._cardStateManager=null}playNewEmptySlotAnimations(){const q=this._gridLayout.GameObject.children;if(q.length>this._numEmptySlotsToAnimateOnNextUpdate){q.slice(-this._numEmptySlotsToAnimateOnNextUpdate).forEach(((q,K)=>{const z=q.findComponentInChildren(yt,!0);z&&(z.hideContainer(),z.playUnlockAnimationAfterDelay((K+1)*Nt.EMPTY_PET_SLOTS_ANIMATION_STAGGER_TIME))}))}this._numEmptySlotsToAnimateOnNextUpdate=0}}Nt.EMPTY_PET_SLOTS_ANIMATION_STAGGER_TIME=100;var xt,Lt=z(56461),kt=z(129),Bt=z(63693);class Ut{}Ut.LEADER_TOOLTIP_SHOWN=!1,function(q){q[q.NoState=1]="NoState",q[q.AddFromTeamCard=2]="AddFromTeamCard",q[q.AddFromPetCard=4]="AddFromPetCard",q[q.EditingTeamCard=8]="EditingTeamCard",q[q.EditingPlayerCard=16]="EditingPlayerCard",q[q.AddingToTeamCard=10]="AddingToTeamCard",q[q.CanAdd=14]="CanAdd",q[q.EditMode=24]="EditMode"}(xt||(xt={}));class Ft{get petTeam(){return this._kennel.petTeam}get sendCardUpdateSignal(){return this._sendCardUpdateSignal}get sendStateSignal(){return this._sendStateSignal}get addPetToTeamComplete(){return this._addPetToTeamComplete}get mustHaveLeaderSignal(){return this._mustHaveLeaderSignal}constructor(q){this._kennel=q,this._sendStateSignal=new X.HN0,this._sendCardUpdateSignal=new X.HN0,this._addPetToTeamComplete=new X.HN0,this._mustHaveLeaderSignal=new X.HN0,this._kennel.setPlayerToFrontPosition(),this._kennel.setPetToTopPosition()}addStateReceiver(q){this.sendStateSignal.add(q.receivePanelStates,q)}sendStateUpdate(q){this.sendStateSignal.dispatch(q)}addCardUpdateReceiver(q){this.sendCardUpdateSignal.add(q.receiveCardUpdates,q)}sendCardUpdates(){this.sendCardUpdateSignal.dispatch()}receivePetData(q,K){0!=(this._currentActionState&xt.CanAdd)&&this.completeAdd(q,K)}onCardClicked(){this.clearActionState(),this.addCancelAction()}add(q,K=null){const z=this._kennel.findEmptyTeamIndex();!X.Aq$.isDefined(K)&&z>=0?(this._kennel.setTeamPosition(q,z),this.completeAction(),this.addPetToTeamComplete.dispatch(),tt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendTeamUpdatedEvent(pt.t.getItem("pet",q.ID).data.name,null,{pet_added_level:q.level,pet_added_rank:wt.P8.getPetDisplayMergeRank(q.ID,q.uniqueID)})):(this.setInitialData(q,K),this._currentActionState=X.Aq$.isDefined(K)?xt.AddFromTeamCard:xt.AddFromPetCard,this.sendStateUpdate(this._currentActionState))}completeAdd(q,K){const z=0!=(this._currentActionState&xt.AddingToTeamCard),Y=z?q:this._initialPetAddData;let Q=z?this._initialPosition:K;const Z=this._kennel.getTeamPosition(Q)?this._kennel.getTeamPosition(Q).getName():null;Y&&X.Aq$.isDefined(Q)?(X.Aq$.isDefined(Y.team)&&this._kennel.removeAtTeamPosition(Y.team),this._kennel.setTeamPosition(Y,Q),this._kennel.setPetToTopPosition(),Q=1,tt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendTeamUpdatedEvent(pt.t.getItem("pet",Y.ID).data.name,Z,{pet_added_level:Y.level,pet_added_rank:wt.P8.getPetDisplayMergeRank(Y.ID,Y.uniqueID)}),this._currentActionState===xt.EditingTeamCard?(this.setInitialData(Y,Q),this.updateDisplays()):this.completeAction(),this.addPetToTeamComplete.dispatch()):this.clearActionState()}editStart(q,K){this.petTeam[K]instanceof kt.a?this._currentActionState=xt.EditingPlayerCard:(this.setInitialData(q,K),this._currentActionState=xt.EditingTeamCard),this.sendStateUpdate(this._currentActionState)}editFinish(){this.completeAction()}swap(q,K){var z,Y,Q,X;const Z=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;tt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendTeamPositionChangedEvent({character:(null===(z=this._kennel.getTeamPosition(K))||void 0===z?void 0:z.getName())===Z.getName()?"player":null===(Y=this._kennel.getTeamPosition(K))||void 0===Y?void 0:Y.getName(),position_new:Object.values(Bt.Io)[q],position_old:Object.values(Bt.Io)[K],character_2:(null===(Q=this._kennel.getTeamPosition(q))||void 0===Q?void 0:Q.getName())===Z.getName()?"player":null===(X=this._kennel.getTeamPosition(q))||void 0===X?void 0:X.getName()}),this._kennel.swapTeamPositions(q,K),this._currentActionState===xt.EditingTeamCard&&(this._initialPosition=q),this.updateDisplays(),tt.q.instance.prodigy.audio.playSFX(62,"moving-pet")}remove(q){tt.q.instance.prodigy.audio.playSFX(62,"moving-pet"),tt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendTeamUpdatedEvent(null,this._kennel.getTeamPosition(q).getName()),this._kennel.removeAtTeamPosition(q),0===q&&(this._kennel.swapTeamPositions(q,this._kennel.findFirstFilledIndex()),Ut.LEADER_TOOLTIP_SHOWN||(Ut.LEADER_TOOLTIP_SHOWN=!0,this.mustHaveLeaderSignal.dispatch())),this._kennel.setPetToTopPosition(),this.completeAction()}release(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=q.team,z=wt.P8.getPetDisplayMergeRank(q.ID,q.uniqueID);yield this._kennel.removePet(q),0===K&&(this._kennel.swapTeamPositions(K,this._kennel.findFirstFilledIndex()),Ut.LEADER_TOOLTIP_SHOWN||(Ut.LEADER_TOOLTIP_SHOWN=!0,this.mustHaveLeaderSignal.dispatch()));const Y=pt.t.getItem("pet",q.ID);tt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendPetReleasedEvent(Y.name,q.level,{pet_rank:z}),this.completeAction()}))}updateDisplays(){this.sendCardUpdates(),this.sendStateUpdate(this._currentActionState)}completeAction(){this.clearStoredData(),this.updateDisplays()}setInitialData(q,K){this._initialPetAddData=q,this._initialPosition=K}clearActionState(){this.clearStoredData(),this.sendStateUpdate(this._currentActionState)}clearPetSelection(){this._currentActionState===xt.NoState&&this.clearActionState()}addCancelAction(){this.cancelButton.onClick.addOnce(this.clearActionState,this)}removeCancelAction(){this.cancelButton.onClick.removeAll(this)}clearStoredData(){this._initialPetAddData=null,this._initialPosition=null,this.removeCancelAction(),this._currentActionState=xt.NoState}clearSignals(){this._sendCardUpdateSignal.dispose(),this._sendStateSignal.dispose(),this._addPetToTeamComplete.dispose(),this._mustHaveLeaderSignal.dispose()}}var Gt,jt=z(46168),$t=z(6413),Ht=z(57349),Vt=z(41851),Wt=z(19690);class qt{static createEmptyTeamCard(q,K){const z=(0,Wt.Ks)().loadFromGUID(J.l.Pets_EmptyTeamCard),Y=z.findComponentInChildren(Ht.$);return Y.addSignal.add(q.dispatchAddSignal,q),Y.addClickListener(q),Y.addDataReceiver(q),Y.teamPosition=K,z.active=!1,Y}static createFilledTeamCard(q,K){const z=(0,Wt.Ks)().loadFromGUID(J.l.Pets_FilledTeamCard),Y=z.findComponentInChildren(jt.Q);return Y.editSignal.add(q.openToolTip,q),Y.addClickListener(q),Y.addDataReceiver(q),Y.teamPosition=K,z.active=!1,Y}static createTeamSwapPanel(q,K,z){const Y=(0,Wt.Ks)().loadFromGUID(J.l.Pets_TeamSwapUI);q.addChild(Y.legacyTransform.group);const Q=Y.findComponentInChildren(Vt.v);return Q.finishEditingSignal.add(K.dispatchEditFinishSignal,K),Q.swapSignal.add(K.dispatchSwapSignal,K,1),Q.swapSignal.add(z.moveTeamSwapPanel,z,0),Q.failedSwapSignal.add(K.openTeamMustHaveALeaderTooltip,K),Q.setActive(!1),Q}static createPetMenuToolTip(q,K){const z=new Mt(K,q);return z.initCloseArea(K.findComponentInChildren(et.$).GameObject),z}static createTeamCardToolTip(q,K){const z=qt.createPetMenuToolTip(J.l.Pets_RevampButtonTooltipTeamPanel,q);return z.displayTooltip({bodyText:"",arrowDirection:Ct.i.LEFT,arrowYRelPos:.5},null,!1,[()=>K.startEditing(z.currentCreatureData,z.currentCreatureData.team),()=>K.launchReleaseConfirmation(z.currentCreatureData),()=>K.dispatchRemoveSignal(z.currentCreatureData.team)]),z}static openTeamMustHaveALeaderTooltip(q){tt.q.instance.prodigy.open.overlayToolTip(Ot.A.TOOLTIP_MANUAL,{bodyText:tt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("TEAM_MUST_HAVE_A_LEADER"),xPosition:q.legacyTransform.x+42,yPosition:q.legacyTransform.y+200})}}!function(q){q[q.WIZARD_FRONT=0]="WIZARD_FRONT",q[q.WIZARD_BACK=1]="WIZARD_BACK"}(Gt||(Gt={}));class Kt{get onYourPetMove(){return this._onYourPetMove}get onYourPetRemove(){return this._onYourPetRemove}get anchorCard(){return this.filledTeamCards[1].GameObject}constructor(q,K){this._panelGameObject=null,this._layout=null,this._tooltipContainer=null,this._teamSwapPanel=null,this._onYourPetMove=new X.HN0,this._onYourPetRemove=new X.HN0;const z=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Y=tt.q.instance.prodigy.gameContainer.get("983-05a7");this._panelGameObject=Y.loadFromGUID(J.l.Pets_TeamPanel),q.addChild(this._panelGameObject.legacyTransform.group);const Q=this._panelGameObject.findComponentsInChildren(X.BKH);this._layout=Q[Gt.WIZARD_BACK],this.createTeamCards(K),this.updateTeamCards(z.kennel.petTeam),this._teamSwapPanel=qt.createTeamSwapPanel(q,K,this),this._tooltipContainer=qt.createTeamCardToolTip(this._panelGameObject,K),this._tooltipParent=new X._mx,this._tooltipParent.layer="tooltip",this._tooltipParent.addComponent(X.dLy),this._tooltipContainer.toolTipComponent.GameObject.parent=this._tooltipParent,Rt.b.make(this._tooltipParent,this._tooltipContainer.toolTipComponent.GameObject.legacyTransform),this.setInputEnableAll(!0,!1),this.localizeTeamPanel()}updateTeamCards(q){for(const K of[...this._layout.GameObject.children])K.parent=null;for(let K=0;K!q.isSelected))),K.forEach((q=>{q.containsPlayer?q.setPlayerState():q.setDefaultState()}))}setAddModeAll(q){let K=this.activeTeamCards;q&&(K=this.activeTeamCards.filter((q=>!q.containsPlayer))),K.forEach((q=>{q instanceof jt.Q&&q.setAddMode()}))}setAlphaAll(q,K){this.activeTeamCards.forEach((z=>{z.containsPlayer?z.enableTransparency(K):z.enableTransparency(q)}))}setInputEnableAll(q,K){this.activeTeamCards.forEach((z=>{z.containsPlayer?z.enableCardInput(K):z.enableCardInput(q)}))}setTeamSwapPanelActive(q){this._teamSwapPanel.setActive(q)}hideToolTip(){this._tooltipContainer.hideTooltip()}noState(){this.setTeamSwapPanelActive(!1),this.hideToolTip(),this.setAllToDefaultState()}addFromPetCard(){this.setTeamSwapPanelActive(!1),this.hideToolTip(),this.setAddModeAll(!0),this.setAlphaAll(!1,!0),this.setInputEnableAll(!0,!1)}pause(){this.noState(),this._panelGameObject.active=!1}resume(){this._panelGameObject.active=!0}destroyPanel(){this.activeTeamCards.forEach((q=>{var K;null===(K=q.GameObject)||void 0===K||K.destroy()})),this.emptyTeamCards.forEach((q=>{var K;null===(K=q.GameObject)||void 0===K||K.destroy()})),this.filledTeamCards.forEach((q=>{var K;null===(K=q.GameObject)||void 0===K||K.destroy()})),this._tooltipContainer.cleanup(),this._tooltipParent.destroy(),this._onYourPetMove.dispose(),this._onYourPetRemove.dispose()}}var zt=z(38097);class Yt{get sendDataSignal(){return this._sendDataSignal}get sendClickSignal(){return this._sendClickSignal}get addSignal(){return this._addSignal}get clearSignal(){return this._clearSignal}get clearPetSelectionSignal(){return this._clearPetSelectionSignal}get onYourPetInfo(){return this._onYourPetInfo}constructor(q){this._sendDataSignal=new X.HN0,this._addSignal=new X.HN0,this._clearSignal=new X.HN0,this._clearPetSelectionSignal=new X.HN0,this._onYourPetInfo=new X.HN0,this.createSignals(),this.addDataReceiver(q),this.addClickListener(q),this.addKennelListener(q),q.addCardUpdateReceiver(this),q.addStateReceiver(this),this.clearSignal.add(q.clearActionState,q),this.clearPetSelectionSignal.add(q.clearPetSelection,q)}createSignals(){this._sendDataSignal=new X.HN0,this._addSignal=new X.HN0,this._sendClickSignal=new X.HN0,this._clearSignal=new X.HN0,this._clearPetSelectionSignal=new X.HN0}addDataReceiver(q){this.sendDataSignal.add(q.receivePetData,q)}addKennelListener(q){this.addSignal.add(q.add,q)}addClickListener(q){this.sendClickSignal.add(q.onCardClicked,q)}reportClick(){this.sendClickSignal.dispatch()}clearStates(){this.clearSignal.dispatch()}clearPetSelection(){this.clearPetSelectionSignal.dispatch()}sendData(q,K){this.sendDataSignal.dispatch(q,K)}dispatchAddSignal(q,K){this.addSignal.dispatch(q,K)}receiveCardUpdates(){this.updateCards()}receivePanelStates(q){this.updatePanelState(q)}updateCards(){throw new Error("Method not implemented.")}updatePanelState(q){throw new Error("Method not implemented.")}disposeController(){this._sendClickSignal.dispose(),this._onYourPetInfo.dispose(),this._sendDataSignal.dispose(),this._addSignal.dispose(),this._clearSignal.dispose(),this._clearPetSelectionSignal.dispose()}}class Qt extends Yt{set ownedPetsPanel(q){this._ownedPetsPanel=q}get ownedPetsPanel(){return this._ownedPetsPanel}constructor(q){super(q),this._teamController=q}updateCards(){this._ownedPetsPanel.updateAllActiveCards()}updatePanelState(q){switch(q){case xt.NoState:this.noState();break;case xt.AddFromTeamCard:case xt.EditingTeamCard:this.addFromTeamCard();break;case xt.AddFromPetCard:this.addFromPetCard()}}noState(){this.ownedPetsPanel.cardStateManager.highlightAll(!1),this.ownedPetsPanel.cardStateManager.setAlphaState(!1,!1)}addFromTeamCard(){this.ownedPetsPanel.cardStateManager.highlightAll(!0),this.ownedPetsPanel.cardStateManager.setAlphaState(!0,!0)}addFromPetCard(){this.ownedPetsPanel.cardStateManager.setAlphaState(!0,!0)}}class Xt extends Yt{get swapSignal(){return this._swapSignal}get removeSignal(){return this._removeSignal}get editStartSignal(){return this._editStartSignal}get editFinishSignal(){return this._editFinishSignal}set teamPanel(q){this._teamPanel=q}get teamPanel(){return this._teamPanel}constructor(q){super(q),this.releaseSignal=new X.HN0,this.infoSignal=new X.HN0,this._teamController=q,this._teamController.mustHaveLeaderSignal.add(this.openTeamMustHaveALeaderTooltip,this)}createSignals(){super.createSignals(),this._swapSignal=new X.HN0,this._removeSignal=new X.HN0,this._editStartSignal=new X.HN0,this._editFinishSignal=new X.HN0}addKennelListener(q){super.addKennelListener(q),this.swapSignal.add(q.swap,q),this.removeSignal.add(q.remove,q),this.editStartSignal.add(q.editStart,q),this.editFinishSignal.add(q.editFinish,q)}updateCards(){this.teamPanel.updateTeamCards(this._teamController.petTeam)}updatePanelState(q){switch(q){case xt.NoState:this.teamPanel.noState();break;case xt.AddFromPetCard:this.teamPanel.addFromPetCard();break;case xt.EditingPlayerCard:case xt.EditingTeamCard:this.teamPanel.hideToolTip(),this.teamPanel.setAlphaAll(!1,!1),this.teamPanel.setInputEnableAll(!1,!1)}}startEditing(q,K){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.teamPanel.setTeamSwapPanelActive(!0),this.teamPanel.moveTeamSwapPanel(K),this.dispatchEditStartSignal(q,K)}openToolTip(q,K,z){q.containsPlayer?this.startEditing(K,z):(tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.teamPanel.positionToolTip(q,K,z))}openTeamMustHaveALeaderTooltip(){var q;(null===(q=this.teamPanel)||void 0===q?void 0:q.anchorCard)&&qt.openTeamMustHaveALeaderTooltip(this.teamPanel.anchorCard)}receivePetData(q,K){this.sendData(q,K)}onCardClicked(){this.reportClick()}dispatchSwapSignal(q,K){this.swapSignal.dispatch(q,K)}dispatchRemoveSignal(q){this.removeSignal.dispatch(q)}dispatchInfoSignal(q){this.infoSignal.dispatch(q)}launchReleaseConfirmation(q){tt.q.instance.prodigy.open.petsLetGoConfirmationDialog(q,(()=>{this._teamController.release(q).then((()=>{this.releaseSignal.dispatch(q)})).catch(X.RQr.createHandler("Error releasing a pet"))}))}dispatchEditStartSignal(q,K){this.editStartSignal.dispatch(q,K)}dispatchEditFinishSignal(){this.editFinishSignal.dispatch()}disposeController(){super.disposeController(),this._teamController.mustHaveLeaderSignal.remove(this.openTeamMustHaveALeaderTooltip,this),this._editFinishSignal.dispose(),this._editStartSignal.dispose(),this._swapSignal.dispose(),this._removeSignal.dispose(),this.releaseSignal.dispose(),this.infoSignal.dispose()}}class Zt extends Lt.A{constructor(q,K,z,Y,Q){super(q,K,200,{},[Z._.Ui_petslots_json,Z._.Ui_library_json,Z._.Ui_pet_gear_json,Z._.Ui_hard_currency_json]),this.prefabRoot=null,this._headerComponent=null,this._teamPanel=null,this._ownedPetsPanel=null,this.onPetListUpdated=new X.HN0,this.isModal=!1,this.background.visible=!1,Q&&(this._headerComponent=Q),this._contentLayer=z;const J=tt.q.instance.prodigy.gameContainer.get("ad2-c5b2");this._teamController=new Ft(J.player.kennel),this._teamPanelController=new Xt(this._teamController),this._ownedPetsPanelController=new Qt(this._teamController),this._petFilterList=Y,this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(ot.Eu.PetMergeYourTeam),this.cullable=!0}create(){super.create();const q=tt.q.instance.prodigy.gameContainer.get("983-05a7");if(this._yourTeamGameObject=q.loadFromGUID(J.l.Pets_YourTeamMenu),ht.d.updateInjectedValues(this._yourTeamGameObject,{ON_ADD_PET_SLOTS_CLICKED:()=>{this._teamController.clearActionState()}}),this._backgroundButton=this._yourTeamGameObject.findComponentInChildren(et.$),this._teamController.cancelButton=this._backgroundButton,this._ownedPetsPanel=new Nt(this,this._ownedPetsPanelController,this._petFilterList),this._teamPanel=new Kt(this,this._teamPanelController),this.prefabRoot.addChild(this._yourTeamGameObject.legacyTransform.group),this.addChild(this._ownedPetsPanel.tooltipParent.legacyTransform.group),this._teamPanelController.teamPanel=this._teamPanel,this._ownedPetsPanelController.ownedPetsPanel=this._ownedPetsPanel,this._isPaused&&this.pauseMenu(),this._ownedPetsPanel.cardStateManager.onYourPetInfo.add(this.launchSubMenu,this),this._ownedPetsPanel.cardStateManager.onYourPetRelease.add(this.launchPetLetGoConfirmation,this),this._teamPanelController.infoSignal.add(this.launchSubMenu,this),this._teamPanelController.releaseSignal.add(this.updateAfterLetPetGo,this),this._headerComponent){tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.onPetRemoved.add(this.updateAfterLetPetGo,this),this._headerComponent.onPetRelease.add(this.releasePet,this),this._headerComponent.onAddPetToTeam.add(this.startAddPetToTeam,this),this._teamController.addPetToTeamComplete.add(this.addPetToTeamCompleted,this),this._headerComponent.onPetUpgraded.add(this.onPetUpgradeComplete,this)}this._petInventoryController=this._yourTeamGameObject.findComponentInChildren(st.l,!0),it.I.shouldShowPetGearTutorialCached&&(tt.q.instance.game.input.enabled=!1,this.displayPetGearFtue().catch(X.RQr.createHandler("Failed to display pet gear tutorial"))),nt.N.shouldShowPetMergeTutorial&&this.displayPetMergeFtue().catch(X.RQr.createHandler("Failed to display pet merge tutorial")),tt.q.instance.game.broadcaster.addAppListener(at.ig.EvolveEnd,(()=>{this.updatePetList()}),this)}focusPet(q){const K=()=>{const K=this._ownedPetsPanel.findCardForPet(q);this._ownedPetsPanel.scrollToPet(K,!1).catch(X.RQr.createHandler("Could not scroll to selected pet"))};this._ownedPetsPanel?K():this.onCreate.addOnce(K)}launchSubMenu(q){super.launchSubMenu(q),this.pauseMenu(),this._headerComponent.closeButton.GameObject.active=!1,this._headerComponent.yourTeamToggle.GameObject.parent.active=!1,this._yourPetMenu=tt.q.instance.prodigy.open.yourPet(q,this._contentLayer,this._headerComponent),this._headerComponent.backToYourTeamButton.GameObject.active=!0,this._headerComponent.backToYourTeamButton.onClick.add(this.closeClicked,this),this._headerComponent.onSubMenuClose.add(this.closeClicked,this),this._headerComponent.onSubMenuEsc.add(this.onEscPressed,this)}launchPetLetGoConfirmation(q){this.leaveSubMenu(),tt.q.instance.prodigy.open.petsLetGoConfirmationDialog(q,(()=>{this.releasePet(q),this.updateAfterLetPetGo(q)}))}onEscPressed(q){q instanceof zt.O&&this.closeClicked()}closeClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.leaveSubMenu()}leaveSubMenu(){super.leaveSubMenu(),this._yourPetMenu&&(this._yourPetMenu.cancelPetMenuLoading(),this._yourPetMenu=void 0),this._headerComponent.closeButton.GameObject.active=!0,this._headerComponent.yourTeamToggle.GameObject.parent.active=!0,this._headerComponent.backToYourTeamButton.onClick.remove(this.closeClicked,this),this._headerComponent.onSubMenuClose.remove(this.closeClicked,this),this._headerComponent.onSubMenuEsc.remove(this.onEscPressed,this),this._headerComponent.backToYourTeamButton.GameObject.active=!1,this._headerComponent.closeButton.GameObject.active=!0,this._teamController.updateDisplays(),this.resumeMenu()}updatePetList(q,K=0){this.leaveSubMenu(),this._ownedPetsPanel.setPetList(null!=q?q:this._petFilterList,K),this._teamPanelController.receiveCardUpdates(),this.onPetListUpdated.dispatch()}updateAfterLetPetGo(q){tt.q.instance.prodigy.open.isMenuOpen(zt.O)||this.leaveSubMenu(),this._ownedPetsPanel.setPetList(this._petFilterList.filter((K=>K!==q))),this._teamPanelController.receiveCardUpdates()}startAddPetToTeam(q){this.leaveSubMenu(),this._ownedPetsPanelController.dispatchAddSignal(q,q.team)}releasePet(q){this._headerComponent.backToYourTeamButton.GameObject.active=!1,tt.q.instance.prodigy.loading(!0),this._teamController.release(q).then((()=>{var q;tt.q.instance.prodigy.loading(!1),this.leaveSubMenu(),null===(q=this._petInventoryController)||void 0===q||q.updateDisplay()})).catch(X.RQr.createHandler("Error releasing a pet"))}addPetToTeamCompleted(){this._headerComponent.startAutoTooltip(tt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService).getText("PET_ADDED_TO_TEAM")),tt.q.instance.prodigy.audio.playSFX(61,"add-pet")}onPetUpgradeComplete(){this._ownedPetsPanel.hideFtueGuideHands(),this._ownedPetsPanel.setPetList(this._petFilterList),this._teamPanelController.receiveCardUpdates()}displayPetGearFtue(){return(0,Q.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:rt.l.PetGearTeamMenu},{step_index:2}),this._ownedPetsPanel.setInputScrollEnabled(!1),tt.q.instance.game.broadcaster.addAppListener(at.bI.FtueCompleted,this.onPetGearFtueCompleted.bind(this),this),ht.d.updateInjectedValues(this._yourTeamGameObject,{[ct.oD.PetGearFtueOverlayEnabled]:!0},!1);const q=this._yourTeamGameObject.findComponentInChildren(X.bE_);yield X.Egh.timeout(1e3);const K=this._ownedPetsPanel.getFirstGearEnabledPet();yield this._ownedPetsPanel.scrollToPet(K);const z=q.Container.get(ct.oD.PetGearFtueEnabledInputTransform),Y=this._ownedPetsPanel.panelGameObject.findComponentInChildren(X.JTA).GameObject.children[K.gridLayoutIndex].findComponent(X.K16);z.setPosition(Y.group.worldTransform.tx,Y.group.worldTransform.ty),z.fullWidth=Y.group.width,z.fullHeight=Y.group.height,X.wa5.getActiveScene().addLayer("newHandLayer",1e3),z.GameObject.parent.setLayer("newHandLayer",!0),tt.q.instance.game.input.enabled=!0,this._ownedPetsPanel.cardStateManager.onStackDrawerOpened.addOnce((()=>(0,Q.sH)(this,void 0,void 0,(function*(){z.setPosition(-500,-500),yield X.Egh.timeout(1e3);const q=X.wa5.getActiveScene().container.get(ct.oX.PetCardPetSpawner).placeholders[0].transform;z.setPosition(q.worldPosition.x,q.worldPosition.y),z.fullWidth=q.fullWidth,z.fullHeight=q.fullHeight})))),this._ownedPetsPanel.tooltipContainer.onTooltipDisplayed.addOnce((()=>{const K=q.Container.get(ct.oD.OwnedPanelTooltipPetInfoButtonTransform),Y=K.group.worldTransform.tx,Q=K.group.worldTransform.ty;z.setPosition(Y,Q),z.fullWidth=K.group.width,z.fullHeight=K.group.height}))}))}onPetGearFtueCompleted(){tt.q.instance.prodigy.gameContainer.get("20f-5f67").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:rt.l.PetGearGearEquipped},{step_index:5}),this._ownedPetsPanel.setInputScrollEnabled(!0),tt.q.instance.game.broadcaster.removeAppListener(at.bI.FtueCompleted,this)}displayPetMergeFtue(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=nt.N.getChosenPetForMergeRankFTUE();this.launchSubMenu(q),tt.q.instance.game.broadcaster.broadcast(at.ki.FtuePetMenuOpened)}))}resumeMenu(){super.resumeMenu(),this._ownedPetsPanel&&this._ownedPetsPanel.resume(),this._teamPanel&&this._teamPanel.resume(),this._yourTeamGameObject&&(this._yourTeamGameObject.active=!0)}pauseMenu(){super.pauseMenu(),this._ownedPetsPanel&&this._ownedPetsPanel.pause(),this._teamPanel&&this._teamPanel.pause(),this._yourTeamGameObject&&(this._yourTeamGameObject.active=!1)}close(){var q;null===(q=this._yourTeamGameObject)||void 0===q||q.destroy(),this.onPetListUpdated.dispose(),super.close()}destroy(){var q,K,z,Y,Q,X,Z,J,et,it;tt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.onPetRemoved.remove(this.updateAfterLetPetGo,this),this._headerComponent&&(this._headerComponent.onLetPetGo.remove(this.updateAfterLetPetGo,this),this._headerComponent.onPetRelease.remove(this.releasePet,this),this._headerComponent.onAddPetToTeam.remove(this.startAddPetToTeam,this),this._headerComponent.onPetUpgraded.remove(this.onPetUpgradeComplete,this)),null===(q=this._ownedPetsPanel)||void 0===q||q.cardStateManager.onYourPetInfo.remove(this.launchSubMenu,this),null===(K=this._teamPanelController)||void 0===K||K.infoSignal.remove(this.launchSubMenu,this),null===(z=this._teamPanelController)||void 0===z||z.releaseSignal.remove(this.updateAfterLetPetGo,this),null===(Y=this._teamController)||void 0===Y||Y.addPetToTeamComplete.remove(this.addPetToTeamCompleted,this),null===(Q=this._teamController)||void 0===Q||Q.clearSignals(),null===(X=this._teamPanelController)||void 0===X||X.disposeController(),null===(Z=this._ownedPetsPanelController)||void 0===Z||Z.disposeController(),null===(J=this._ownedPetsPanel)||void 0===J||J.destroyPanel(),null===(et=this._teamPanel)||void 0===et||et.destroyPanel(),null===(it=this._backgroundButton)||void 0===it||it.onClick.dispose(),tt.q.instance.game.broadcaster.removeAppListener(at.ig.EvolveEnd,this),super.destroy()}}},74951:(q,K,z)=>{"use strict";z.d(K,{z:()=>_t});var Y=z(8674),Q=z(62459),X=z(37016),Z=z(5491),J=z(35120),tt=z(1195),et=z(77938),it=z(55734),st=z(37773),nt=z(97317),at=z(65732),rt=z(43754),ot=z(55122),ht=z(10674),ct=z(46855),dt=z(99979),lt=z(73797),ut=z(28152),ft=z(90744),bt=z(26932),pt=z(26004),vt=z(22023),gt=z(80060),mt=z(53661),yt=z(16909);let _t=class extends bt.z{constructor(){super(...arguments),this.onLetPetGo=new Q.HN0,this.onAddToTeam=new Q.HN0,this.onEvolvePet=new Q.HN0,this._processJustLeveledUpOnNextRebind=!1}bindContext(){var q,K,z;const Y=et.t.getItem("pet",this._petData.ID),tt=new it.R(J.q.instance.prodigy.game,this._petData),rt=vt.P8.getMaxOwnableLevel(this._petData.ID),ht=new ct.r(this._petData.stars,Z.V.Pet,{baseXp:0,memberXp:0,totalNonMemberXp:0},Math.max(rt,this._petData.level));ht.levels=[this._petData.level],this._context.Container.rebind(mt.hi.PetCreatureData).toConstantValue(this._petData),this._context.Container.rebind(mt.hi.YourPetPanelPetId).toConstantValue(this._petData.ID);const ut=!!this._petData.nickname;this._context.Container.rebind(mt.hi.YourPetPanelPetName).toConstantValue(ut?this._petData.nickname:null!==(q=Y.data.name)&&void 0!==q?q:Y.name),this._context.Container.rebind(mt.hi.YourPetPanelPetHasNickname).toConstantValue(ut),ut&&this._context.Container.rebind(mt.hi.YourPetPanelPetSpecies).toConstantValue(null!==(K=Y.data.name)&&void 0!==K?K:Y.name),this._context.Container.rebind(mt.hi.YourPetElementalBaseFrame).toConstantValue(dt.bf[Y.data.affinity]),this._context.Container.rebind(mt.hi.YourPetPanelXpBarInfo).toConstantValue(ht),this._context.Container.rebind(mt.hi.YourPetPanelEnableReleaseButton).toConstantValue(!vt.P8.isPetEpic(this._petData.ID)),this._context.Container.rebind(mt.hi.YourPetPanelEnableAddTeamButton).toConstantValue(!vt.P8.isPetOnTeam(this._petData)),this._context.Container.rebind(mt.hi.YourPetPanelReleasePetFunction).toConstantValue(J.q.instance.prodigy.open.petsLetGoConfirmationDialog.bind(J.q.instance.prodigy.open,this._petData,(()=>this.onLetPetGo.dispatch(this._petData)))),this._context.Container.rebind(mt.hi.YourPetPanelAddToTeamFunction).toConstantValue(this.onAddToTeam.dispatch.bind(this.onAddToTeam,this._petData));if(vt.P8.canPlayerAccessPetMergeFeature(this._loggedInPlayer.player)){const q=vt.P8.canPetAccessMergeRanks(this._petData.ID),K=null!==(z=vt.P8.getPetDisplayMergeRank(this._petData.ID,this._petData.uniqueID))&&void 0!==z?z:X.qd.MIN,Y=K>=X.qd.MAX,Q=q&&!Y;this._context.Container.rebind(mt.hi.YourPetPanelDisplayMergeButton).toConstantValue(Q),this._context.Container.rebind(mt.hi.YourPetPanelDisplayMergeRankBadge).toConstantValue(q),q&&this._context.Container.rebind(mt.hi.YourPetPanelPetMergeRank).toConstantValue(K)}const ft=vt.P8.GetEvolutionaryLine(Y);for(;ft.length>4&&ft[0]!==Y.ID;)ft.shift();const bt=[{id:mt.hi.YourPetPanelEvoLineStage1Id,seen:mt.hi.YourPetPanelEvoLineStage1Seen,rescued:mt.hi.YourPetPanelEvoLineStage1Rescued},{id:mt.hi.YourPetPanelEvoLineStage2Id,seen:mt.hi.YourPetPanelEvoLineStage2Seen,rescued:mt.hi.YourPetPanelEvoLineStage2Rescued},{id:mt.hi.YourPetPanelEvoLineStage3Id,seen:mt.hi.YourPetPanelEvoLineStage3Seen,rescued:mt.hi.YourPetPanelEvoLineStage3Rescued},{id:mt.hi.YourPetPanelEvoLineStage4Id,seen:mt.hi.YourPetPanelEvoLineStage4Seen,rescued:mt.hi.YourPetPanelEvoLineStage4Rescued}],gt=this._loggedInPlayer.player.encounters;this._context.Container.rebind(mt.hi.YourPetPanelEvoLineNumStages).toConstantValue(ft.length);for(let Q=0;Q0,tt=X===Y.ID;this._context.Container.rebind(q).toConstantValue(ft[Q]),this._context.Container.rebind(K).toConstantValue(Z||J||tt),this._context.Container.rebind(z).toConstantValue(J||tt)}const _t=ft.findIndex((q=>Y.ID===q))+1;this._context.Container.rebind(mt.hi.YourPetPanelEvoLineOwnedStage).toConstantValue(_t);const Et=vt.P8.canPetEvolve(tt,this._petData.level),wt=tt.getAvailableEvolutions(ot.s.activePlayerLevelCap).length>0;this._context.Container.rebind(mt.hi.YourPetPanelShowEvolveButton).toConstantValue(wt),this._context.Container.rebind(mt.hi.YourPetPanelEnableEvolveButton).toConstantValue(Et),J.q.instance.prodigy.game.broadcaster.addAppListener(lt.ig.Evolved,this.onEvolvePet.dispatch,this.onEvolvePet),this._context.Container.rebind(mt.hi.YourPetPanelEvolveButtonWithHC).toConstantValue(Et),this._context.Container.rebind(mt.hi.YourPetPanelShowLevelUp).toConstantValue(!Et),this._context.Container.rebind(mt.hi.YourPetPanelShowEvolveButton).toConstantValue(Et);const Tt=this._loggedInPlayer.getLevel(),St=this._petData.level>=rt,At=this._petData.levelOt&&!St&&([Rt,Pt]=yt.M.getLevelPurchaseCost(this._petData.level,Ct,Dt));const Mt=Rt<=Ot,Nt=Mt?"PET_MAX_LEVEL_UP_TO_SAME_LEVEL_ONLY":"PET_LEVEL_UP_NOT_ENOUGH_GOLD",xt=this._paymentManager.exchange({currency:1,value:Rt},27).value;if(this._context.Container.rebind(mt.hi.YourPetPanelShouldShowCurrencyConversion).toConstantValue(!0),this._context.Container.rebind(mt.hi.YourPetPanelLevelUpButtonDisabledMessage).toConstantValue(Nt),this._context.Container.rebind(mt.hi.YourPetPanelLevelUpMaxLevelState).toConstantValue(St),this._context.Container.rebind(mt.hi.YourPetPanelEnableLevelUpButton).toConstantValue(At&&Mt),this._context.Container.rebind(mt.hi.YourPetPanelLevelUpButtonLevel).toConstantValue(Pt),this._context.Container.rebind(mt.hi.YourPetPanelLevelUpButtonCost).toConstantValue(Rt),this._context.Container.rebind(mt.hi.YourPetPanelLevelUpButtonCostDifference).toConstantValue(Rt-Ot),this._context.Container.rebind(mt.hi.YourPetPanelLevelUpButtonCostText).toConstantValue(Rt.toLocaleString()),this._context.Container.rebind(mt.hi.YourPetPanelLevelUpMagicoinCost).toConstantValue(xt),this._context.Container.rebind(mt.hi.YourPetPanelLevelUpMagicoinCostDifference).toConstantValue(xt-It),this._context.Container.rebind(mt.FK.OtpMissingMagicoin).toConstantValue(xt-It),this._context.Container.rebind(mt.hi.YourPetPanelLevelUpConversionButtonEnabled).toConstantValue(At),Q.Aq$.isDefined(this._petData.team)){const q=this._loggedInPlayer.getChargedLevel();this._context.Container.rebind(at.E.ChargedCreatureEffectTier).toConstantValue(st.e.getChargedLevelTierFromLevel(q)),this._context.Container.rebind(at.E.ChargedCreatureEffectDisplayType).toConstantValue(q>0?nt.X$.IDLE:nt.X$.HIDDEN)}const Lt=vt.P8.getPetDisplayMergeRank(this._petData.ID,this._petData.uniqueID);J.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendPetDetailsViewedEvent(Y,"your-pet",{pet_level:this._petData.level,pet_rank:Lt,gear_list:this._petData.gear,is_on_team:vt.P8.isPetOnTeam(this._petData)}),this._context.Container.rebind(mt.hi.SpinePetEvolveBurst).toConstantValue(this._processJustLeveledUpOnNextRebind&&Et),this._context.Container.rebind(mt.hi.SpinePetEvolveIdle).toConstantValue(!this._processJustLeveledUpOnNextRebind&&Et),this._processJustLeveledUpOnNextRebind=!1,this.resolvePetGear(Y).finally((()=>{var q;null===(q=this.gameObject)||void 0===q||q.findComponentsInChildren(pt.B,!1).forEach((q=>q.consume()))}))}onPetLeveledUp(){this._processJustLeveledUpOnNextRebind=!0}resolvePetGear(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y,Q,X;const Z=!((null===(K=q.data.gearEquipSlots)||void 0===K?void 0:K.length)>0);if(this._context.Container.rebind(mt.hi.YourPetPanelPetGearShowGearPanel).toConstantValue(!0),this._context.Container.rebind(mt.hi.YourPetPanelPetGearSlotsDisabled).toConstantValue(Z),Z)return;const J=yield this._gearManager.getPetGearByUniqueId(null===(z=this._petData.gear)||void 0===z?void 0:z.petHat),tt=yield this._gearManager.getPetGearByUniqueId(null===(Y=this._petData.gear)||void 0===Y?void 0:Y.petRelic);null===(Q=this._context.Container.get("PetHatSlotContainer"))||void 0===Q||Q.Container.rebind("PetGearSlotData").toConstantValue(null!=J?J:{}),null===(X=this._context.Container.get("PetRelicSlotContainer"))||void 0===X||X.Container.rebind("PetGearSlotData").toConstantValue(null!=tt?tt:{})}))}updateInjectedValues(q){gt.d.updateInjectedValues(this.gameObject,q)}destroy(){this.onLetPetGo.dispose(),this.onAddToTeam.dispose(),this.onEvolvePet.dispose(),J.q.instance.prodigy.game.broadcaster.removeAppListener(lt.ig.Evolved,this.onEvolvePet),super.destroy()}};(0,Y.Cg)([(0,Q.Cdj)("9cf-c09f"),(0,Y.Sn)("design:type",ht.q)],_t.prototype,"_gearManager",void 0),(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",tt.E)],_t.prototype,"_loggedInPlayer",void 0),(0,Y.Cg)([(0,Q.Cdj)("bec-c6b4"),(0,Y.Sn)("design:type",rt.W)],_t.prototype,"_hardCurrencyProvider",void 0),(0,Y.Cg)([(0,Q.Cdj)("ec3-31a0"),(0,Y.Sn)("design:type",ft.E)],_t.prototype,"_paymentManager",void 0),(0,Y.Cg)([(0,Q.Cdj)(mt.hi.YourPetPanelPetData),(0,Y.Sn)("design:type",Object)],_t.prototype,"_petData",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],_t.prototype,"onLetPetGo",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],_t.prototype,"onAddToTeam",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],_t.prototype,"onEvolvePet",void 0),_t=(0,Y.Cg)([(0,Q.EVk)("YourPetDataProvider",ut.Y.uiPet)],_t)},3119:(q,K,z)=>{"use strict";z.d(K,{o:()=>_t});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(99625),J=z(51742),tt=z(36648),et=z(90633),it=z(35120),st=z(60881),nt=z(54422),at=z(94566),rt=z(72772),ot=z(73797),ht=z(41674),ct=z(15485),dt=z(46784),lt=z(82680),ut=z(91033),ft=z(56461),bt=z(49237),pt=z(83133),vt=z(48199),gt=z(97518);let mt=class extends Q.uAl{constructor(){super(...arguments),this._closeButton=null,this._yourTeamToggle=null,this._petBookToggle=null,this._backToYourTeam=null,this._backToYourPet=null,this._backToPetBook=null,this._autoTooltipContainer=null,this._titleText=null,this._autoToolTip=null,this._onLetPetGo=new Q.HN0,this._onAddPetToTeam=new Q.HN0,this._onPetRelease=new Q.HN0,this.onPetUpgraded=new Q.HN0,this._onSubMenuClose=new Q.HN0,this._onSubMenuEsc=new Q.HN0}set autoToolTip(q){this._autoToolTip=q}get autoToolTip(){return this._autoToolTip}get closeButton(){return this._closeButton}get yourTeamToggle(){return this._yourTeamToggle}get petBookToggle(){return this._petBookToggle}get backToYourTeamButton(){return this._backToYourTeam}get backToYourPetButton(){return this._backToYourPet}get backToPetBookButton(){return this._backToPetBook}get autoTooltipContainer(){return this._autoTooltipContainer}get onLetPetGo(){return this._onLetPetGo}get onAddPetToTeam(){return this._onAddPetToTeam}get onPetRelease(){return this._onPetRelease}get onSubMenuClose(){return this._onSubMenuClose}get onSubMenuEsc(){return this._onSubMenuEsc}create(){super.create(),this._closeButton&&(this._closeButton.GameObject.active=!1),this._yourTeamToggle&&(this._yourTeamToggle.GameObject.active=!1),this._petBookToggle&&(this._petBookToggle.GameObject.active=!1),this._backToYourTeam&&(this._backToYourTeam.GameObject.active=!1),this._backToYourPet&&(this._backToYourPet.GameObject.active=!1),this._backToPetBook&&(this._backToPetBook.GameObject.active=!1)}startAutoTooltip(q){this._autoToolTip=vt.A.displayToolTipAuto(this._autoToolTip,this._autoTooltipContainer,{bodyText:q,xPosition:640,yPosition:100}),this._autoTooltipContainer.legacyTransform.group.setParent(it.q.instance.game.stage)}setTitleText(q){this._titleText.setLocalizationKey(q)}destroy(){this._onLetPetGo.dispose(),this._onAddPetToTeam.dispose(),this._onPetRelease.dispose(),this._onSubMenuClose.dispose(),this._onSubMenuEsc.dispose(),this.onPetUpgraded.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.x4W)("closeButton"),(0,Y.Sn)("design:type",bt.$)],mt.prototype,"_closeButton",void 0),(0,Y.Cg)([(0,Q.x4W)("yourTeamToggle"),(0,Y.Sn)("design:type",pt.l)],mt.prototype,"_yourTeamToggle",void 0),(0,Y.Cg)([(0,Q.x4W)("petBookToggle"),(0,Y.Sn)("design:type",pt.l)],mt.prototype,"_petBookToggle",void 0),(0,Y.Cg)([(0,Q.x4W)("backToYourTeam"),(0,Y.Sn)("design:type",bt.$)],mt.prototype,"_backToYourTeam",void 0),(0,Y.Cg)([(0,Q.x4W)("backToYourPet"),(0,Y.Sn)("design:type",bt.$)],mt.prototype,"_backToYourPet",void 0),(0,Y.Cg)([(0,Q.x4W)("backToPetBook"),(0,Y.Sn)("design:type",bt.$)],mt.prototype,"_backToPetBook",void 0),(0,Y.Cg)([(0,Q.x4W)("autoTooltipContainer"),(0,Y.Sn)("design:type",Q._mx)],mt.prototype,"_autoTooltipContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(gt.R),(0,Y.Sn)("design:type",gt.R)],mt.prototype,"_titleText",void 0),mt=(0,Y.Cg)([(0,Q.EVk)("PetsMenuHeaderPrefab")],mt);var yt=z(52142);class _t extends lt.W{get headerPrefab(){return this._headerPrefab}get contentLayer(){return this._contentLayer}constructor(q,K,z,Y){super(q,K,200,{},[X._.Ui_raster_bars_json,X._.Ui_raster_icons_json,X._.Ui_raster_panels_json,X._.Ui_raster_pets_menu_json,X._.Ui_buttons_json,X._.Ui_store_json,X._.Ui_registration_json,X._.Ui_icons_json,X._.Ui_raster_pet_card_json,X._.Ui_postbattle_json,X._.Ui_battle_revamp_json,J.c.Sfx_ui,J.c.Sfx_adding_pet_to_team,J.c.Sfx_moving_pet_position,J.c.Sfx_book_close,J.c.Sfx_book_open,J.c.Sfx_petbook_pagination,J.c.Sfx_open_petinfo_yourpet,J.c.Sfx_pets_button_disabled_state,J.c.Sfx_paper_tab,tt.q.Merge_rank_badge_small]),this.prefabRoot=null,this._headerPrefab=null,this._backgroundContainer=null,this._yourTeamMidGroundGO=null,this._petBookMidGroundGO=null,this._currentMenu=[],this._onInitialize=z,this.closeCallback=Y,this.currentInterfaceName=dt.B.PetsWindow}create(){super.create(),this.name="PetsMenuController";const q=it.q.instance.prodigy.gameContainer.get("983-05a7");this._backgroundContainer=q.loadFromGUID(Z.l.Pets_Background),this.prefabRoot.addChild(this._backgroundContainer.legacyTransform.group),this._contentLayer=new Q.mcf,this._contentLayer.name="ContentLayer",this.prefabRoot.addChild(this._contentLayer);const K=q.loadFromGUID(Z.l.Pets_MenuHeader);this._headerPrefab=K.findComponentInChildren(mt),this.prefabRoot.addChild(K.legacyTransform.group),this._yourTeamSelectHandler=()=>{this.showYourTeam(),it.q.instance.prodigy.audio.playSFX(63,"book-close")},this._headerPrefab.yourTeamToggle.onSelected.add(this._yourTeamSelectHandler),this._petBookSelectHandler=()=>{this.showPetBook(q),it.q.instance.prodigy.audio.playSFX(64,"book-open")},this._headerPrefab.petBookToggle.onSelected.add(this._petBookSelectHandler),this._petsMenuCloseHandler=()=>{it.q.instance.prodigy.audio.playSFX(18,"pop"),this.clearCurrentMenu(),this.fireButtonEvent({buttonName:ct.k.Close}),this.fireInterfaceEvent({interfaceType:ht.Wm.DialogBox,closeMethod:ht.Lv.CloseDialog}),this.close()},this._headerPrefab.closeButton.onClick.add(this._petsMenuCloseHandler),this._onInitialize&&this._onInitialize(),this.setDefaultMenu()}setDefaultMenu(){const q=this._headerPrefab.GameObject.findComponentInChildren(at.O);q.setItemSelected(this._headerPrefab.yourTeamToggle,!1),q.setItemSelected(this._headerPrefab.petBookToggle,!1),q.setItemSelected(this._headerPrefab.yourTeamToggle,!0),this.showYourTeam(),this._headerPrefab.closeButton.GameObject.active=!0,this._headerPrefab.yourTeamToggle.GameObject.active=!0,this._headerPrefab.petBookToggle.GameObject.active=!0,this._headerPrefab.closeButton.GameObject.addComponent(nt.E).initialize(st.D.ESC,this.onEscPressed.bind(this)),this._headerPrefab.yourTeamToggle.GameObject.addComponent(nt.E).initialize(st.D.TAB,this.onTabPressed.bind(this))}onEscPressed(){rt.I.shouldShowPetGearTutorialCached||this.isTopMenu()&&this._petsMenuCloseHandler()}onTabPressed(){if(rt.I.shouldShowPetGearTutorialCached)return;if(!this.isTopMenu())return;const q=this._headerPrefab.GameObject.findComponentInChildren(at.O);this._headerPrefab.yourTeamToggle.isSelected()?(q.setItemSelected(this._headerPrefab.yourTeamToggle,!1),q.setItemSelected(this._headerPrefab.petBookToggle,!0),this._petBookSelectHandler()):this._headerPrefab.petBookToggle.isSelected()?(q.setItemSelected(this._headerPrefab.petBookToggle,!1),q.setItemSelected(this._headerPrefab.yourTeamToggle,!0),this._yourTeamSelectHandler()):(q.setItemSelected(this._headerPrefab.yourTeamToggle,!0),this._yourTeamSelectHandler())}toggleKeyController(q){const K=this._headerPrefab.GameObject.findComponentsInChildren(nt.E,!0);for(let z=0;zq instanceof yt.Y));Y?(Y.updatePetList(z),Y.resumeMenu()):(Y=it.q.instance.prodigy.open.yourTeam(this._contentLayer,z,this._headerPrefab),this._currentMenu.push(Y)),this._currentMenu.forEach(this.pauseMenuIfInactive.bind(this,Y)),this.loadYourTeamMidground(K),Y.onSubMenuLaunched.add((()=>{this._yourTeamMidGroundGO.active=!1})),Y.onSubMenuLeft.add((()=>{this._yourTeamMidGroundGO.active=!0})),this._petBookMidGroundGO&&(this._petBookMidGroundGO.active=!1),q&&Y.focusPet(q);this._headerPrefab.yourTeamToggle.GameObject.findComponentInParent(at.O).setSelected(this._headerPrefab.yourTeamToggle),this._headerPrefab.yourTeamToggle.setSelected(!0)}showPetBook(q){let K=this._currentMenu.find((q=>q instanceof ut.M));K?K.resumeMenu():(K=it.q.instance.prodigy.open.petBook(this._headerPrefab),this._currentMenu.push(K)),this._currentMenu.forEach(this.pauseMenuIfInactive.bind(this,K)),this.loadPetBookMidground(q),this._yourTeamMidGroundGO&&(this._yourTeamMidGroundGO.active=!1)}checkPetGearFtue(){return(0,Y.sH)(this,void 0,void 0,(function*(){return!it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(et.B.FEATURE_PET_GEAR,et.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE)&&rt.I.updateCachedPetGearTutorialFlag()}))}pauseMenuIfInactive(q,K){q.onSubMenuLeft.removeAll(),q.onSubMenuLaunched.removeAll(),q.onSubMenuLeft.add((()=>this.toggleKeyController(!0))),q.onSubMenuLaunched.add((()=>this.toggleKeyController(!1))),K!==q&&(K.onSubMenuLeft.removeAll(),K.onSubMenuLaunched.removeAll(),K.pauseMenu())}loadYourTeamMidground(q){Q.Aq$.isDefined(this._yourTeamMidGroundGO)||(this._yourTeamMidGroundGO=q.loadFromGUID(Z.l.Pets_BackgroundYourTeam),this._backgroundContainer.addChild(this._yourTeamMidGroundGO)),this._yourTeamMidGroundGO.active=!0}loadPetBookMidground(q){Q.Aq$.isDefined(this._petBookMidGroundGO)||(this._petBookMidGroundGO=q.loadFromGUID(Z.l.Pets_BackgroundPetBook),this._petBookMidGroundGO.findComponentInChildren(Q.V09).elementsGroup.scale.x=-1,this._backgroundContainer.addChild(this._petBookMidGroundGO)),this._petBookMidGroundGO.active=!0}forceClose(){this.clearCurrentMenu(),this.close()}clearCurrentMenu(){if(this._currentMenu.length>0){for(let q=0;q{"use strict";z.d(K,{R:()=>vt});var Y,Q=z(8674),X=z(62459),Z=z(5491),J=z(65050);!function(q){q.PetTeamLevelUp="my-team-pet-level-up"}(Y||(Y={}));var tt=z(35120),et=z(1195),it=z(39984),st=z(87239),nt=z(55122),at=z(28152),rt=z(25809),ot=z(95913),ht=z(62886),ct=z(60157),dt=z(65240),lt=z(77938),ut=z(63834),ft=z(2519),bt=z(44094),pt=z(53661);let vt=class extends X.uAl{constructor(){super(...arguments),this.onLevelUpPurchased=new X.HN0}get purchaseCost(){return this._purchaseCost}get purchaseLevel(){return this._purchaseLevel}purchaseLevels(){if(!X.Aq$.isDefined(this._purchaseLevel)||!X.Aq$.isDefined(this._purchaseCost))return void X.VyI.log("Cannot purchase levels without a purchase level and cost set.",X.$bb.Error);const q=new ut.r(tt.q.instance.prodigy.game,this._petData);this._petData.stats=q.source.stats,this._petData.statGrowth=q.source.statGrowth;const K=q.getStars(),z=Math.max(0,K-nt.s.xpRequiredForLevel(this._purchaseLevel,Z.V.Pet)),Y=nt.s.xpRequiredForLevel(this._purchaseLevel,Z.V.Pet)-K+z,Q=q.diffAvailableSpellsV2(this._purchaseLevel),J=it.e.getStatIncreasesFromLevelUps(this._petData,this._petData.level,this._purchaseLevel);q.addStars(Y);tt.q.instance.prodigy.gameContainer.get("9a2-c1c3").sendGainPetXpEvent(Y).catch(X.RQr.createHandler("Error sending a battle pass quest event for gaining pet XP")),this._loggedInPlayer.player.kennel.updated=!0,this._loggedInPlayer.player.forceSaveCharacter(),this.sendLevelPurchasedSegmentEvents(q),this.sendPurchasePetLevelQuestEvent(q.data),this.showLevelUpPopups(J,Q),tt.q.instance.prodigy.audio.playSound(33,!1),this.onLevelUpPurchased.dispatch(q.data)}setPurchaseLevel(q){this._purchaseLevel=q}setPurchaseCost(q){this._purchaseCost=q}sendPurchasePetLevelQuestEvent(q){const K=lt.t.getItem("pet",q.ID).data,z={params:{taskEventType:ct.Z7.Pet,rarity:K.rarity,itemType:"pet",source:dt.C.LevelUp,id:K.ID,element:K.affinity,level:K.level}};tt.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(ht.T.PURCHASE_PET_LEVEL,z).catch(X.RQr.createHandler("Error sending a quest event for purchasing a pet level up"))}sendLevelPurchasedSegmentEvents(q){this._segment.featureCommon.sendPetUpgradedEvent(q.getName(),q.getLevel(),this._purchaseLevel,this._purchaseCost,this._currentCurrencyId.toString(),{transaction_id:this._segmentTransactionId})}updateItemRemovedCustomData(q){this._segmentTransactionId=bt.$.generateUID(),this._currentCurrencyId=q;const K={transaction_id:this._segmentTransactionId,sink_type:dt.C.LevelUp,sink_id:Y.PetTeamLevelUp,instance_type:J.N.Interface,instance_id:this._segment.featureCommon.getInstanceId(this._segment.featureCommon.currentInterfaceName)};27===q&&this._magicoinPaymentComponent?this._magicoinPaymentComponent.customData=K:1===q&&this._goldPaymentComponent&&(this._goldPaymentComponent.customData=K)}showLevelUpPopups(q,K){var z;const Y=[];Y.push(ot.v4.levelUp()),Y.push(...ot.v4.battleStats(q)),K.forEach((q=>{const K=ot.v4.spell(st.x.getUnlockedSpellDisplayInformation(q));Y.push(K)})),null===(z=this._popupMessageManager)||void 0===z||z.playPopupMessageAnimations(Y).catch(X.RQr.createHandler("Failed to play popup message animations."))}destroy(){this.onLevelUpPurchased.dispose(),super.destroy()}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",et.E)],vt.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.Cdj)("20f-5f67"),(0,Q.Sn)("design:type",Function)],vt.prototype,"_segment",void 0),(0,Q.Cg)([(0,X.Cdj)(pt.hi.YourPetPanelPopupMessageManager),(0,Q.Sn)("design:type",rt.g)],vt.prototype,"_popupMessageManager",void 0),(0,Q.Cg)([(0,X.Cdj)(pt.hi.YourPetPanelPetData),(0,Q.Sn)("design:type",Object)],vt.prototype,"_petData",void 0),(0,Q.Cg)([(0,X.MnK)(ft.E),(0,Q.Sn)("design:type",ft.E)],vt.prototype,"_magicoinPaymentComponent",void 0),(0,Q.Cg)([(0,X.MnK)(ft.E),(0,Q.Sn)("design:type",ft.E)],vt.prototype,"_goldPaymentComponent",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vt.prototype,"onLevelUpPurchased",void 0),vt=(0,Q.Cg)([(0,X.EVk)("LevelPurchase",at.Y.uiPet)],vt)},16909:(q,K,z)=>{"use strict";z.d(K,{M:()=>Z});var Y=z(5491),Q=z(39984),X=z(23748);class Z{static getLevelPurchaseCost(q,K,z){let Z=q,J=0;do{const q=30+(Q.e.starsToLevel(Z+1,Y.V.Pet)-Q.e.starsToLevel(Z,Y.V.Pet))/1.568+Z+1,K=X.z.ceilToNearestMultiplier(J+q,5);if(J>0&&K>z)break;J=K,Z++}while(Z{"use strict";z.d(K,{h:()=>Y,n:()=>vt});var Y,Q=z(8674),X=z(62459),Z=z(10471),J=z(223),tt=z(13956),et=z(59701),it=z(35120),st=z(49237),nt=z(1195),at=z(77938),rt=z(43754),ot=z(73797),ht=z(28152),ct=z(77065),dt=z(76277),lt=z(38920),ut=z(11647),ft=z(30226),bt=z(97518),pt=z(90614);!function(q){q[q.ByItem=0]="ByItem",q[q.ByType=1]="ByType",q[q.ByTypeForStore=2]="ByTypeForStore"}(Y||(Y={}));let vt=class extends((0,ut.o)(X.uAl)){constructor(){super(...arguments),this._iconMode=Y.ByItem,this._maxAbbreviatedDigits=1/0,this._forceDisableClickables=!1,this.onBudgetInvalid=new X.HN0,this.onBudgetValid=new X.HN0,this._onItemIdStringChanged=new X.HN0,this.onCurrencyUpdateComplete=new X.HN0,this.onAddClicked=new X.HN0,this._automaticallyUpdate=!0,this._abbreviate=!0}get currencyID(){return this._currencyID}set currencyID(q){this._currencyID=q}create(){super.create(),this._addIcon&&(this._addIcon.active=!1),this._button&&(this.addListenerToSignal(this._button.onEnabledClick,(()=>{this._addIcon.active&&this.onAddClicked.dispatch()})),this.addListenerToSignal(this._button.onInputOver,(()=>{this._abbreviate=!1,this.updateAmount(this._currentAmount,this._currentBudget)})),this.addListenerToSignal(this._button.onInputOut,(()=>{this._abbreviate=!0,this.updateAmount(this._currentAmount,this._currentBudget)}))),X.Aq$.isDefined(this._currencyID)&&(this.updateIcon(),this.updateMagicoinElements()),this._automaticallyUpdate&&this._currencyID&&this.updateAmount(this._currentPlayer.player.getCurrencyAmount(this._currencyID)),this.addAutoUpdateListeners(),Z.h.includes(this._currencyID)&&this._hardCurrency.isHardCurrencyMemberLocked()&&(this.gameObject.active=!1)}destroy(){this.onBudgetInvalid.dispose(),this.onBudgetValid.dispose(),this.onCurrencyUpdateComplete.dispose(),this.onAddClicked.dispose(),this._hardCurrency.onBalanceChanged.remove(this.handleHardCurrencyBalanceChanged,this),it.q.instance.game.broadcaster.removeAppListener(ot.ib.ItemReceived,this),it.q.instance.game.broadcaster.removeAppListener(ot.ib.ItemConsumed,this),this._onItemIdStringChanged.dispose(),super.destroy()}updateAmount(q,K){this._currencyText.text=(0,lt.cC)(q,this._abbreviate?this._maxAbbreviatedDigits:1/0),this._currentAmount=q,(X.Aq$.isDefined(K)||X.Aq$.isDefined(this._currentBudget))&&(this._currentBudget=null!=K?K:this._currentBudget,this.updateBudgetDifference(q-this._currentBudget))}updateBudget(q){this._currentBudget=q,X.Aq$.isDefined(this._currentAmount)&&this.updateBudgetDifference(this._currentAmount-q)}updateBudgetFromNewAmount(q){X.Aq$.isDefined(this._currentBudget)&&(this.updateBudgetDifference(this._currentBudget-q),this._currentBudget=q)}updateBudgetDifference(q){var K,z;const Y=X.Aq$.isDefined(q)&&q>0;X.Aq$.isDefined(this._insufficientFundsColor)&&(this._currencyText.fill=Y?X.Q1f.numberToHexString(this._insufficientFundsColor):X.Q1f.numberToHexString(this._sufficientFundsColor)),this._currencyText.updateText();const Q=at.t.getItem("currency",this._currencyID);null===(K=this._missingAmountPrompt)||void 0===K||K.setTextArguments(null!==(z=Y?q:void 0)&&void 0!==z?z:0,ft.J.getItemName(Q));(Y?this.onBudgetInvalid:this.onBudgetValid).dispatch()}updateCurrencyID(q){-1===q||Z.h.includes(q)&&this._hardCurrency.isHardCurrencyMemberLocked()?this.gameObject.active=!1:(this.gameObject.active=!0,q!==this._currencyID&&(this._currencyID=q,this._onItemIdStringChanged.dispatch(`currency-${q}`),this.updateIcon(),this._automaticallyUpdate&&this.updateAmount(this._currentPlayer.player.getCurrencyAmount(q)),this.updateMagicoinElements()))}setIconVisible(q){this._currencyIcon&&(this._currencyIcon.Active=q)}playEarnEffect(q){this._currentAmount>=q?X.VyI.log("Attempted to play earn effect with an invalid initial amount",X.$bb.Warning):(this.animateCurrencyChangeIndicator(q-this._currentAmount,"+",this._currencyGainMove),this.startCurrencyCounter(q))}playSpendEffect(q){this._currentAmount<=q?X.VyI.log("Attempted to play spend effect with an invalid initial amount",X.$bb.Warning):(this.animateCurrencyChangeIndicator(this._currentAmount-q,"-",this._currencySpendMove),this.startCurrencyCounter(q))}animateCurrencyChangeIndicator(q,K,z){this._currencyChangeText&&(this._currencyChangeText.text=`${K}${(0,lt.cC)(q)}`),null==z||z.startTween()}startCurrencyCounter(q){const K=this._counterTextObject.findComponent(ct.B);K.initialNumber=this._currentAmount,K.targetNumber=q;const z=q-this._currentAmount;K.onComplete.addOnce((()=>this.onCurrencyUpdateComplete.dispatch(z<0)),this),this._currentAmount=q,K.startCounter()}enableAutomaticUpdates(q,K){if(this._automaticallyUpdate=q,!q)return;if(!X.Aq$.isDefined(this.currencyID))return;const z=this._currentPlayer.player.getCurrencyAmount(this._currencyID,1===this._currencyID?"gold":"currency");K?this.handleHardCurrencyBalanceChanged({value:z,currency:this._currencyID}):this.updateAmount(z)}updateIcon(){if(!this._currencyIcon)return;const q=this._currencyID,{atlas:K,frame:z}=et.W.getCurrencyIcon(this._iconMode,q);it.q.instance.prodigy.load.assetsAsPromise(K).then((()=>{var Q,X,J,tt;if(null!==(X=null===(Q=this.gameObject)||void 0===Q?void 0:Q.isDestroyed)&&void 0!==X&&!X&&q===this._currencyID){(null===(J=this._currencyIcon)||void 0===J?void 0:J.GameObject)&&(Z.h.includes(this._currencyID)&&!this._hardCurrency.isHardCurrencyMemberLocked()&&(this._currencyIcon.GameObject.active=!0),this._currencyIcon.updateAsset(K,z));const Q=et.W.getCurrencyIcon(Y.ByTypeForStore,q);null===(tt=this._currencyChangeIcon)||void 0===tt||tt.updateAsset(Q.atlas,Q.frame)}}),X.RQr.createHandler("Failed to load currency icon"))}handleHardCurrencyBalanceChanged(q){!this._automaticallyUpdate||!Z.B.includes(this._currencyID)||q.currency!==this._currencyID||Z.h.includes(this._currencyID)&&this._hardCurrency.isHardCurrencyMemberLocked()||(q.valuethis._currentAmount&&this.playEarnEffect(q.value))}handleItemReceived(q){var K;if(!this._automaticallyUpdate||this._currencyID!==q.ID||"currency"!==q.type&&"gold"!==q.type)return;const z=null!==(K=q.balance)&&void 0!==K?K:this._currentAmount+q.N;this.playEarnEffect(z)}handleItemConsumed(q){var K;if(!this._automaticallyUpdate||this._currencyID!==q.ID||"currency"!==q.type&&"gold"!==q.type)return;const z=null!==(K=q.balance)&&void 0!==K?K:this._currentAmount-Math.abs(q.N);this.playSpendEffect(z)}updateMagicoinElements(){this._addIcon&&this._button&&!this._forceDisableClickables&&(this._addIcon.active=(0,dt.G)(J.l).enabled&&27===this._currencyID&&!this._currentPlayer.player.isPlayingAtSchool())}addAutoUpdateListeners(){this._hardCurrency.onBalanceChanged.add(this.handleHardCurrencyBalanceChanged,this),it.q.instance.game.broadcaster.addAppListener(ot.ib.ItemReceived,this.handleItemReceived,this),it.q.instance.game.broadcaster.addAppListener(ot.ib.ItemConsumed,this.handleItemConsumed,this)}};(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",nt.E)],vt.prototype,"_currentPlayer",void 0),(0,Q.Cg)([(0,tt.b)("bec-c6b4"),(0,Q.Sn)("design:type",rt.W)],vt.prototype,"_hardCurrency",void 0),(0,Q.Cg)([(0,X.Cdj)(X.$Bt.LocalizationService),(0,Q.Sn)("design:type",X.dTp)],vt.prototype,"_baseLocalizer",void 0),(0,Q.Cg)([(0,X.gfw)(Y),(0,Q.Sn)("design:type",Number)],vt.prototype,"_iconMode",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number),(0,Q.Sn)("design:paramtypes",[Number])],vt.prototype,"currencyID",null),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],vt.prototype,"_currencyIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],vt.prototype,"_currencyChangeIcon",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],vt.prototype,"_currencyText",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],vt.prototype,"_maxAbbreviatedDigits",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",Number)],vt.prototype,"_insufficientFundsColor",void 0),(0,Q.Cg)([(0,X.iEU)(),(0,Q.Sn)("design:type",Number)],vt.prototype,"_sufficientFundsColor",void 0),(0,Q.Cg)([(0,X.MnK)(bt.R),(0,Q.Sn)("design:type",bt.R)],vt.prototype,"_missingAmountPrompt",void 0),(0,Q.Cg)([(0,X.MnK)(pt.P),(0,Q.Sn)("design:type",pt.P)],vt.prototype,"_currencyGainMove",void 0),(0,Q.Cg)([(0,X.MnK)(pt.P),(0,Q.Sn)("design:type",pt.P)],vt.prototype,"_currencySpendMove",void 0),(0,Q.Cg)([(0,X.MnK)(X.EYj),(0,Q.Sn)("design:type",X.EYj)],vt.prototype,"_currencyChangeText",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],vt.prototype,"_counterTextObject",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],vt.prototype,"_addIcon",void 0),(0,Q.Cg)([(0,X.MnK)(st.$),(0,Q.Sn)("design:type",st.$)],vt.prototype,"_button",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],vt.prototype,"_forceDisableClickables",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vt.prototype,"onBudgetInvalid",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vt.prototype,"onBudgetValid",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vt.prototype,"_onItemIdStringChanged",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vt.prototype,"onCurrencyUpdateComplete",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],vt.prototype,"onAddClicked",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],vt.prototype,"_automaticallyUpdate",void 0),vt=(0,Q.Cg)([(0,X.EVk)("CurrencyDisplay",ht.Y.ui)],vt)},63811:(q,K,z)=>{"use strict";z.d(K,{H:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this._openingUnifiedStore=!1}close(){this.store.close(this._openingUnifiedStore)}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"_openingUnifiedStore",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("StoreClose",X.Y.ui)],Z)},25317:(q,K,z)=>{"use strict";z.d(K,{D:()=>ot});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(95359),J=z(88022),tt=z(35120),et=z(43846),it=z(34603),st=z(47717);const nt={[Z.IE.Defence]:"ITEM_BONUS_DEFENCE",[Z.IE.Hp]:"ITEM_BONUS_HP",[Z.IE.Power]:"ITEM_BONUS_POWER",[Z.IE.Speed]:"ITEM_BONUS_SPEED"},at={[Q.EElementType.Astral]:"icon-32x32-astral",[Q.EElementType.Fire]:"icon-32x32-fire",[Q.EElementType.Ice]:"icon-32x32-ice",[Q.EElementType.Physical]:"icon-32x32-physical",[Q.EElementType.Plant]:"icon-32x32-earth",[Q.EElementType.Shadow]:"icon-32x32-shadow",[Q.EElementType.Storm]:"icon-32x32-storm",[Q.EElementType.Water]:"icon-32x32-water",[Q.EElementType.Neutral]:"icon-32x32-neutral"},rt={[Q.EElementType.Astral]:"ELEMENT_ASTRAL",[Q.EElementType.Fire]:"ELEMENT_FIRE",[Q.EElementType.Ice]:"ELEMENT_ICE",[Q.EElementType.Physical]:"ELEMENT_PHYSICAL",[Q.EElementType.Plant]:"ELEMENT_PLANT",[Q.EElementType.Shadow]:"ELEMENT_SHADOW",[Q.EElementType.Storm]:"ELEMENT_STORM",[Q.EElementType.Water]:"ELEMENT_WATER",[Q.EElementType.Neutral]:"ELEMENT_NEUTRAL"};let ot=class extends X.uAl{constructor(){super(...arguments),this._positiveDiffColor=4717145,this._negativeDiffColor=15953264,this._neutralDiffColor=16777215}create(){super.create(),this.hideAll()}setGearStatData(q,K,z){this.hideAll(),this.setLabel((0,et.k)(nt[q])),this.setStatDiff(z),this.setStatValue(K),this.setIconAsset(J._.Ui_battle_revamp_json,st.H.ICON_FRAMES[q]),this._statValue.GameObject.transform.setPositionX(-(this._statDiff.getDimensions().width+5))}setSpellStatData(q){this.hideAll(),this.setLabel(q.name),this.setIconAsset(q.iconGuid),this.setElementAsset(J._.Ui_raster_icons_json,at[q.element])}setPetElementData(q){this.hideAll(),this.setIconAsset(J._.Ui_raster_icons_json,at[q]),this.setLabel((0,et.k)(rt[q]))}setLabel(q){this._label.text=q,this._label.GameObject.active=!0,this.gameObject.active=!0}setStatValue(q){this._statValue.text=`${q}`,this._statValue.GameObject.active=!0,this.gameObject.active=!0}setStatDiff(q){if(!X.Aq$.isDefined(q))return void(this._statDiff.GameObject.active=!1);const K=q<0?"":"+";let z=this._neutralDiffColor;q<0?z=this._negativeDiffColor:q>0&&(z=this._positiveDiffColor),this._statDiff.text=`(${K}${q})`,this._statDiff.fill=X.Q1f.numberToHexString(z),this._statDiff.GameObject.active=!0,this.gameObject.active=!0}setIconAsset(q,K){this._icon.setAsset(q,K).then((()=>{this._icon.GameObject.active=!0,this.gameObject.active=!0})).catch(X.RQr.createHandler("Error loading gear stat icon"))}setElementAsset(q,K){this._spellElement.setAsset(q,K).then((()=>{this._spellElement.GameObject.active=tt.q.instance.game.cache.getFrameData(q).checkFrameName(K),this.gameObject.active=!0})).catch(X.RQr.createHandler("Error loading spell element icon"))}hideAll(){this._icon.GameObject.active=!1,this._label.GameObject.active=!1,this._statValue.GameObject.active=!1,this._statDiff.GameObject.active=!1,this._spellElement.GameObject.active=!1,this.gameObject.active=!1}};(0,Y.Cg)([(0,X.MnK)(it._),(0,Y.Sn)("design:type",it._)],ot.prototype,"_icon",void 0),(0,Y.Cg)([(0,X.MnK)(X.EYj),(0,Y.Sn)("design:type",X.EYj)],ot.prototype,"_label",void 0),(0,Y.Cg)([(0,X.MnK)(X.EYj),(0,Y.Sn)("design:type",X.EYj)],ot.prototype,"_statValue",void 0),(0,Y.Cg)([(0,X.MnK)(X.EYj),(0,Y.Sn)("design:type",X.EYj)],ot.prototype,"_statDiff",void 0),(0,Y.Cg)([(0,X.MnK)(it._),(0,Y.Sn)("design:type",it._)],ot.prototype,"_spellElement",void 0),(0,Y.Cg)([(0,X.iEU)(),(0,Y.Sn)("design:type",Number)],ot.prototype,"_positiveDiffColor",void 0),(0,Y.Cg)([(0,X.iEU)(),(0,Y.Sn)("design:type",Number)],ot.prototype,"_negativeDiffColor",void 0),(0,Y.Cg)([(0,X.iEU)(),(0,Y.Sn)("design:type",Number)],ot.prototype,"_neutralDiffColor",void 0),ot=(0,Y.Cg)([(0,X.EVk)("StoreGearStats")],ot)},21097:(q,K,z)=>{"use strict";z.d(K,{Dq:()=>Ut,NL:()=>Ft,WE:()=>Bt});var Y=z(8674),Q=z(62459),X=z(95359),Z=z(88022),J=z(51742),tt=z(36648),et=z(10471),it=z(223),st=z(17446),nt=z(64868),at=z(59701),rt=z(35120),ot=z(49237),ht=z(76974),ct=z(91207),dt=z(77938),lt=z(55734),ut=z(73797),ft=z(31427),bt=z(99617),pt=z(13693),vt=z(85540),gt=z(51972),mt=z(48199),yt=z(76277),_t=z(41674),Et=z(15485),wt=z(46784),Tt=z(24110),St=z(30405),At=z(44094),Ct=z(30226),Ot=z(47255),It=z(64353),Dt=z(21418),Rt=z(53661),Pt=z(95057),Mt=z(16847),Nt=z(25317);const xt=1.55,Lt={pet:1,dorm:1.25,mathTownFrame:.75,mathTownInterior:.75,mathTownDecor:.75,follow:xt,item:xt,spellRelic:xt,weapon:xt,hat:xt,outfit:xt,boots:xt,hair:xt,hairColor:xt,costume:xt},kt=[37,15,14,13,25,24,38,62,64,63,66,68,71,70,69];var Bt;!function(q){q.MemberLocked="MEMBER_LOCKED",q.LevelLocked="LEVEL_LOCKED",q.NotEnoughCurrency="NOT_ENOUGH_CURRENCY",q.NotEnoughUnsecureCurrency="NOT_ENOUGH_UNSECURE_CURRENCY",q.ServerPurchaseFailed="SERVER_PURCHASE_FAILED",q.OutsideOfHours="Outside of Hours",q.NetworkFailure="Network Failure",q.OfferExpired="Offer is expired",q.NoData="Item card does not have dynamicStoreData",q.AllPurchased="All offers of this card group have been purchased"}(Bt||(Bt={}));const Ut=["costume","weapon","mount","follow"];let Ft=class extends Q.uAl{constructor(){super(...arguments),this._rarityBanners=[],this.onEquipItem=new Q.HN0,this.onPurchaseSuccess=new Q.HN0,this.onPurchaseFailure=new Q.HN0,this._oneLineItemNameRarityBanners=[],this._twoLineItemNameRarityBanners=[],this._autoTooltipPosition={x:640,y:100,arrowDirection:gt.i.DOWN},this._secureCurrencyTooltipPosition={x:1065,y:72,arrowDirection:gt.i.UP},this._buttonLevelLockTooltipPosition={x:1040,y:635,arrowDirection:gt.i.DOWN},this.overrideCurrencyTooltipPosition={x:0,y:0,arrowDirection:gt.i.UP,isOverriding:!1},this._renderOnly=!1,this._renderSelectedItemCount=0}create(){super.create(),rt.q.instance.prodigy.load.assets([J.c.Sfx_button_disabled_state,J.c.Sfx_store_equip,J.c.Sfx_store_purchase,J.c.Sfx_tab_click]),rt.q.instance.game.broadcaster.addAppListener(ut.iZ.ToolTipClosed,(()=>{var q;null===(q=this._manualToolTip)||void 0===q||q.close()}),this),this._activePlayer.player.onEquipmentChange.add(this.onEquipmentChanged,this),this.setToDefaultState()}onEquipmentChanged(){var q;(null===(q=this._currentItemData)||void 0===q?void 0:q.data)&&this.renderItemPreview(this._currentItemData.data)}renderSelectedItem(q,K,z=!1){this._purchaseCallback=z?void 0:K,this._renderOnly=z,"currencyID"in q?(this._storeItemCardData=q,this._currentItemData={id:q.item.ID,type:q.item.type,cost:{type:"currency",ID:q.currencyID,N:q.currencyAmount},data:dt.t.getItem(q.item.type,q.item.ID)}):this._currentItemData=Object.assign(Object.assign({},q),{data:dt.t.getItem(q.type,q.id)});const Y=++this._renderSelectedItemCount;dt.t.secureGetItem(this._currentItemData.type,this._currentItemData.id).then((q=>{var K,z;if(this.GameObject.isDestroyed||Y!==this._renderSelectedItemCount)return;const X=null===(K=q.data)||void 0===K?void 0:K.rarity,Z=Ct.J.getItemName(q);this.renderItemPreview(q),this.renderBottomPanel(),this._rarityBanners.forEach((q=>q.active=!1)),Q.Aq$.isDefined(X)&&(this._rarityBanners[X].active=!0),this.renderItemNameRarityBanner(Z,null!=X?X:st.E.Common),this.renderButtons(),this.renderItemOwnedCount(),null===(z=this._manualToolTip)||void 0===z||z.close()})).catch(Q.RQr.createHandler("StoreItemDetailPreviewComponent: Error fetching item data when attempting to render selected item"))}renderItemOwnedCount(){const q=this._currentItemData.data;if(this._quantityParent.active=!1,!Q.Aq$.isDefined(null==q?void 0:q.type)||!Q.Aq$.isDefined(null==q?void 0:q.ID))return;const K=this._activePlayer.player.getItemCount(q.type,q.ID);this._quantityParent.active=!0,this._quantityText.text=K.toString()}renderItemNameRarityBanner(q,K){var z;this._itemName.text=q,this._oneLineItemNameRarityBanners.forEach((q=>q.active=!1)),this._twoLineItemNameRarityBanners.forEach((q=>q.active=!1)),this._itemName.wordWrap=!1,(null===(z=this._itemName.GameObject)||void 0===z?void 0:z.transform).sizeDelta.width<=300?this._oneLineItemNameRarityBanners[null!=K?K:0].active=!0:(this._twoLineItemNameRarityBanners[null!=K?K:0].active=!0,this._itemName.wordWrap=!0,this._itemName.updateText()),K===st.E.Rare||K===st.E.Heroic?this._itemName.fill="#ffffff":this._itemName.fill="#363636"}renderBottomPanel(){var q,K;this._bottomSectionLines.active=!1,this._defaultDescription.active=!1,this._spellStats.GameObject.active=!1,this._gearStats.GameObject.active=!1;const z=this._currentItemData.type,Y=null===(K=null===(q=this._currentItemData)||void 0===q?void 0:q.data)||void 0===K?void 0:K.data;switch(z){case"pet":this._gearStats.GameObject.active=!0,this._gearStats.setPetElementData(null==Y?void 0:Y.affinity);break;case"weapon":this.setSpellData(),this.setGearStatData(!0);break;case"hat":case"outfit":case"boots":case"mount":case"follow":this.setGearStatData(!0);break;case"petHat":case"petRelic":this.setGearStatData(!1);break;case"spellRelic":this.setSpellData()}}setSpellData(){var q,K,z,Y,X,Z,J,et,it;const st=null===(K=null===(q=this._currentItemData)||void 0===q?void 0:q.data)||void 0===K?void 0:K.data;if(!Q.Aq$.isDefined(st))return;const nt=dt.t.getItem("spellV2",st.spellID);if(!Q.Aq$.isDefined(nt))return;this._spellStats.GameObject.active=!0;const at=tt.q[At.$.capitalizeFirstLetter(null!==(Z=null===(X=null===(Y=null===(z=nt.metadata)||void 0===z?void 0:z.assets)||void 0===Y?void 0:Y.icon)||void 0===X?void 0:X.assetKey)&&void 0!==Z?Z:"")];this._spellStats.setSpellStatData({name:null!==(et=null===(J=nt.data)||void 0===J?void 0:J.name)&&void 0!==et?et:"",iconGuid:at,element:null===(it=nt.data)||void 0===it?void 0:it.element})}setGearStatData(q){var K,z,Y;const Z=this._currentItemData.type,J=null===(z=null===(K=this._currentItemData)||void 0===K?void 0:K.data)||void 0===z?void 0:z.data;if(!Q.Aq$.isDefined(null==J?void 0:J.stats))return void Q.VyI.log("Could not update gear stat data because itemData is undefined.",Q.$bb.Warning);let tt=X.IE.Defence,et=0;for(const Q of Object.values(X.IE)){const q=J.stats[Q];q>et&&(tt=Q,et=q)}if(et>0)if(this._gearStats.GameObject.active=!0,q){const q=null!==(Y=this._activePlayer.player.getGearBattleStats()[Z][tt])&&void 0!==Y?Y:0;this._gearStats.setGearStatData(tt,et,et-q)}else this._gearStats.setGearStatData(tt,et)}setToDefaultState(){var q;this._bottomSectionLines.active=!0,this._defaultDescription.active=!0,this._characterPreview.GameObject.active=!0,this._spellStats.GameObject.active=!1,this._gearStats.GameObject.active=!1,this._itemName.text="",this._quantityParent.active=!1,this._rarityBanners.forEach((q=>q.active=!1)),this._oneLineItemNameRarityBanners.forEach((q=>q.active=!1)),this._twoLineItemNameRarityBanners.forEach((q=>q.active=!1)),this.renderDefaultButtons(),this.cleanUpPreview(),this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setInputEnabled(!1),this._previewContainer.transform.setScale(xt,xt),null===(q=this._manualToolTip)||void 0===q||q.close()}renderItemPreview(q){var K;this.cleanUpPreview();const z=Lt[q.type]||1;switch(this._previewContainer.transform.setScale(z,z),q.type){case"pet":this.createPetPreview(q.ID);break;case"follow":this.createFollowPreview(q.ID);break;case"dorm":this.createDormItemPreview(q.ID);break;case"mathTownFrame":this.createTowerTownFrame(q);break;case"mathTownInterior":this.createTowerTownInterior(q);break;case"mathTownDecor":this.createTowerTownDecoration(q);break;case"weapon":case"hat":case"outfit":case"boots":case"costume":case"mount":this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setInputEnabled(!1),this._characterPreview.setEquipment(q.type,q.ID);break;case"item":if(null===(K=q.data.effect)||void 0===K?void 0:K.transform){this._previewContainer.transform.setScale(1,1),this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setInputEnabled(!1),this._characterPreview.transformEffect(q.data.effect);break}case"hair":case"hairColor":this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setAppearance(q.type,q.ID),this._characterPreview.setInputEnabled(!1),this._characterPreview.setEquipment("hat",null);break;default:this.createIconPreview(q)}Ut.includes(q.type)||this._characterPreview.setEquipment("costume",null)}createPetPreview(q){const K=rt.q.instance.prodigy.create.monster(this.createPreviewContainer(),new lt.R(rt.q.instance.game,{ID:q}),1,0,0);K.loadedCallback=()=>K.walk(),K.startLoad(),this._activePlayer.player.encounters.onPetEncountered(q)}createFollowPreview(q){var K;const z=rt.q.instance.prodigy.create.follow(this.createPreviewContainer(),q,1,null,null);null===(K=z.reload)||void 0===K||K.call(z,(()=>{var q;return null===(q=z.walk)||void 0===q?void 0:q.call(z)}))}createDormItemPreview(q){rt.q.instance.prodigy.create.houseItem(this.createPreviewContainer(),q,0,0).findComponent(ft.A).setAnchor(.5,1)}createIconPreview(q){const K=rt.q.instance.prodigy.create.item(this.createPreviewContainer(),null,null,{id:q.ID,type:q.type},Dt.s.IconNoBackground);K.onContainerLoaded.addOnce((()=>{K.centerX=0,K.bottom=-40}))}createTowerTownFrame(q){const K=ct.E.getTowerTownImage(q.data.tag);rt.q.instance.prodigy.load.assets([K],(()=>{this.createPreviewContainer().addChild(rt.q.instance.prodigy.create.sprite(0,0,K,void 0,{x:1,y:1}),rt.q.instance.prodigy.create.sprite(0,0,K,void 0,{x:1,y:1})).scale.x=-1}))}createTowerTownInterior(q){const K=ct.E.getTowerTownImage(q.data.tag),z=Z._.Ui_towertown_misc_json;rt.q.instance.prodigy.load.assets([z,K],(()=>{this.createPreviewContainer().addChild(rt.q.instance.prodigy.create.sprite(0,0,K,void 0,{x:.5,y:1}),rt.q.instance.prodigy.create.sprite(0,0,z,"interior-ui-mask",{x:.5,y:1}))}))}createTowerTownDecoration(q){const K=ct.E.getTowerTownImage(q.data.tag),z=Z._.Ui_towertown_misc_json;rt.q.instance.prodigy.load.assets([z,K],(()=>{this.createPreviewContainer().addChild(rt.q.instance.prodigy.create.sprite(0,0,z,"pre-floor-placer",{x:.5,y:1}),rt.q.instance.prodigy.create.sprite(0,0,z,"interior-ui-mask",{x:.5,y:1}),rt.q.instance.prodigy.create.sprite(0,-110,K,void 0,{x:.5,y:1}))}))}createPreviewContainer(){return new Q._mx(this._itemPreviewContainer).addComponent(Tt.B).getRootContainer()}cleanUpPreview(){this._characterPreview.removeCharacter();for(const q of this._itemPreviewContainer.children)q!==this._characterPreview.GameObject&&q.destroy()}destroy(){var q,K;rt.q.instance.game.broadcaster.removeAppListener(ut.iZ.ToolTipClosed,this),this._activePlayer.player.onEquipmentChange.removeAll(this),this.cleanUpPreview(),this.onEquipItem.dispose(),this.onPurchaseFailure.dispose(),this.onPurchaseSuccess.dispose(),null===(q=this._autoToolTip)||void 0===q||q.close(),null===(K=this._manualToolTip)||void 0===K||K.close(),super.destroy()}onBuyButtonClicked(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=rt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),K=this._currentItemData.data;if(rt.q.instance.prodigy.audio.playSFX(43,"purchase"),this._purchaseCallback)try{const z=yield this._purchaseCallback(this._storeItemCardData);if(!z.isSuccess())return void this.onPurchaseFailure.dispatch(this._currentItemData,z.error);if(!z.get())return;this.onPurchaseSuccess.dispatch(this._currentItemData),this._autoToolTip=mt.A.displayToolTipAuto(this._autoToolTip,this._tooltipContainer,{bodyText:q.getText("STORE_TOOLTIP_MESSAGE_0",K.data.name),xPosition:this._autoTooltipPosition.x,yPosition:this._autoTooltipPosition.y}),this.renderButtons(),this.renderItemOwnedCount()}catch(z){Q.RQr.logError(z,"Error confirming store purchase"),rt.q.instance.prodigy.open.message(q.getText("NETWORK_ERROR"))}}))}showOtpMlp(){const q=this._currentItemData.cost;if(null!=q&&null!=this._unifiedConversionOpener){const K=Ot.o.FunnelNotEnoughCurrency,z=It.P.shouldUseUnifiedConversionFlow(K)?Pt.R.UnifiedConversionFlow:Ct.J.showYouTubeMembershipAd(rt.q.instance.game,!0)?Pt.R.Video:Pt.R.Static,Y=rt.q.instance.prodigy.gameContainer.get("20f-5f67");Y.featureCommon.sendButtonEvent({buttonName:Et.k.BuyItem,interfaceName:this.shopInterfaceName,interfaceType:_t.Wm.DialogBox,destinationName:(0,yt.G)(it.l).enabled?wt.B.OtpAd:wt.B.MemberAd,saveClickInfo:Et.k.BuyItem});const X=kt.includes(this.shopId);Y.purchase.sendFunnelStart({type:X?"Festival-Store-Hard-Currency-Insufficient-Resources":"Dynamic-Store-Hard-Currency-Insufficient-Resources",category:X?"Festival-Store":"Store",contentId:`${this._currentItemData.type}-${this._currentItemData.id}`,adType:z,adVersion:It.P.getAdVersion(K)}),this._unifiedConversionOpener.open({[Rt.FK.OtpMissingMagicoin]:this.getCurrencyDiff(q)}).catch((q=>{Q.VyI.log("There was an error attempting to load the unified conversion flow. Using default behaviour.",Q.$bb.Error)}))}}onLockedButtonClicked(){const q=rt.q.instance.prodigy,K=this._activePlayer.player,z="pet"===this._currentItemData.type&&K.kennel.isFull();q.audio.playSFX(49,"pop"),this.getIsOwned()?this.showTooltip("STORE_TOOLTIP_MESSAGE_5",this._buyLockButton.GameObject):K.hasMembership()&&z?this.showTooltip("PURCHASING_MESSAGE_TOO_MANY_PETS_BODY",this._buyLockButton.GameObject):!K.hasMembership()&&z?q.open.battlePassUltimateMemberUpsellModal().catch(Q.RQr.createHandler("Could not open MLP.")):this.handleInsufficientCurrency(),this.renderButtons()}handleInsufficientCurrency(){const q=this._currentItemData.cost;if(this.meetsCurrencyRequirement(q))return;if(!("currency"===q.type&&et.h.includes(q.ID)))return void this.showInsufficientCurrencyTooltip();const K=this._activePlayer.player;(0,yt.G)(it.l).enabled?this.showOtpMlp():!K.hasMembership()||K.hasMembershipUpgradeOptions()?this.onMemberBuyButtonClicked(Ot.o.FunnelNotEnoughCurrency,"Dynamic-Store-Hard-Currency-Insufficient-Resources","Dynamic-Store-Hard-Currency-Insufficient-Resources-Store",Bt.NotEnoughCurrency):this.showInsufficientCurrencyTooltip()}showInsufficientCurrencyTooltip(){const q=this._currentItemData.cost,K=dt.t.getItem(q.type,q.ID),z=this.getCurrencyDiff(q),Y=this.overrideCurrencyTooltipPosition.isOverriding,Q=et.h.includes(q.ID)?this._secureCurrencyTooltipPosition:void 0;this.onPurchaseFailure.dispatch(this._currentItemData,Bt.NotEnoughCurrency),this.showTooltip("STORE_TOOLTIP_MESSAGE_3",this._buyLockButton.GameObject,[z,(null==K?void 0:K.data)?Ct.J.getItemName(K,z>1):""],Y?this.overrideCurrencyTooltipPosition:Q)}onDynamicStoreMemberBuyButtonClicked(){let q,K,z,Y;const Q=this._currentItemData.cost;!this.meetsCurrencyRequirement(Q)&&(q=Ot.o.FunnelNotEnoughCurrency,K="Dynamic-Store-Hard-Currency-Insufficient-Resources",z="Dynamic-Store-Hard-Currency-Insufficient-Resources-Store",Y=Bt.NotEnoughCurrency),this.onMemberBuyButtonClicked(q,K,z,Y)}onMemberBuyButtonClicked(q=Ot.o.FunnelBuyMemberItem,K="Store-Buy-Member-Item",z="Store",Y=Bt.MemberLocked){var Q;const X=this._currentItemData.data,Z=rt.q.instance.prodigy.gameContainer;rt.q.instance.prodigy.audio.playSFX(18,"pop");const J=It.P.shouldUseUnifiedConversionFlow(q)?Pt.R.UnifiedConversionFlow:Ct.J.showYouTubeMembershipAd(rt.q.instance.game,!0)?Pt.R.Video:Pt.R.Static;Z.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:Et.k.BuyMemberItem,interfaceName:this.shopInterfaceName,interfaceType:_t.Wm.DialogBox,saveClickInfo:Et.k.BuyMemberItem}),Z.get("20f-5f67").purchase.sendFunnelStart({type:K,category:z,contentId:`${X.type}-${X.ID}`,adType:J,adVersion:It.P.getAdVersion(q)}),null===(Q=this._manualToolTip)||void 0===Q||Q.close(),rt.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:q,conversionFunnelMetadata:`${X.type}-${X.ID}`},Et.k.BuyMemberItem),this.onPurchaseFailure.dispatch(this._currentItemData,Y),this.renderButtons()}onEquipButtonPressed(){const q=this._currentItemData.data,K=rt.q.instance.prodigy.gameContainer;rt.q.instance.prodigy.audio.playSFX(42,"equip"),this._activePlayer.player.equip(q.ID,q.type).then((z=>{z&&(this._activePlayer.player.appearanceChanged=!0,this.onEquipItem.dispatch(q),rt.q.instance.game.broadcaster.broadcast(ut.J8.PlayerAppearanceUpdated),this._autoToolTip=mt.A.displayToolTipAuto(this._autoToolTip,this._tooltipContainer,{bodyText:K.get(Q.$Bt.LocalizationService).getText("STORE_TOOLTIP_MESSAGE_1",q.data.name),xPosition:this._autoTooltipPosition.x,yPosition:this._autoTooltipPosition.y}))})).catch(Q.RQr.createHandler(`StoreItemDetailPreviewComponent:onEquipButtonPressed Error equipping item ${q.type}-${q.ID}`)).finally((()=>this.renderButtons()))}onUnequipButtonPressed(){const q=this._currentItemData.data;rt.q.instance.prodigy.audio.playSFX(42,"equip"),this._activePlayer.player.unEquip(q.ID,q.type).then((q=>{q&&(this._activePlayer.player.appearanceChanged=!0,rt.q.instance.game.broadcaster.broadcast(ut.J8.PlayerAppearanceUpdated)),this.renderButtons()})).catch(Q.RQr.createHandler(`StoreItemDetailPreviewComponent:onUnequipButtonPressed Error unequipping item ${q.type}-${q.ID}`))}onLevelLockedButtonPressed(){const q=this._currentItemData.data;if(!Q.Aq$.isDefined(q))return;const K=St.o.isEquipableType(q.type),z=this._activePlayer.player.isItemOwned({type:q.type,ID:q.ID});this.showTooltip(z&&K?"STORE_TOOLTIP_MESSAGE_6":"STORE_TOOLTIP_MESSAGE_7",this._levelLockButton.GameObject,[q.data.lockLevel,this._activePlayer.player.data.level],this._buttonLevelLockTooltipPosition),this.onPurchaseFailure.dispatch(this._currentItemData,Bt.LevelLocked),this.renderButtons()}showTooltip(q,K,z,Y){var X;const Z=rt.q.instance.prodigy.gameContainer;rt.q.instance.prodigy.audio.playSFX(49,"pop"),this._manualToolTip=mt.A.displayTooltipTargeted(this._manualToolTip,this._tooltipContainer,{bodyText:Z.get(Q.$Bt.LocalizationService).getText(q,...null!=z?z:[]),arrowDirection:null!==(X=null==Y?void 0:Y.arrowDirection)&&void 0!==X?X:gt.i.DOWN},K)}renderDefaultButtons(){this._unequipButton.GameObject.active=!1,this._memberBuyButton.GameObject.active=!1,this._buyButton.GameObject.active=!1,this._wearButton.GameObject.active=!1,this._memberWearButton.GameObject.active=!1,this._levelLockButton.GameObject.active=!1,this._buyLockButton.GameObject.active=!1}getIsOwned(){if(this._storeItemCardData&&nt._.isFeatureEnabled())return(0,vt.w)(this._storeItemCardData);const q=this._currentItemData.data;return this._activePlayer.player.isItemOwned({type:q.type,ID:q.ID})}renderButtons(){var q,K;const z=this._currentItemData.data;if(!Q.Aq$.isDefined(z)||this._renderOnly)return;const Y=St.o.isEquipableType(z.type),X=rt.q.instance.prodigy.gameContainer.get("bec-c6b4"),Z=this._activePlayer.player.hasMembership(),J=!Z||this._activePlayer.player.hasMembershipUpgradeOptions(),tt="pet"===z.type&&this._activePlayer.player.kennel.isFull(),it=St.o.isLevelLocked(this._activePlayer.player,null!==(K=null===(q=null==z?void 0:z.data)||void 0===q?void 0:q.lockLevel)&&void 0!==K?K:0),st=this._activePlayer.player.equipment.getEquipment(z.type)===z.ID,nt=this.meetsCurrencyRequirement(this._currentItemData.cost),at="dorm"===z.type&&this._activePlayer.player.house.getOwned(z.ID)>=9,ot=this.getIsOwned();let ht=!Z&&this.isCurrentItemMemberLocked();"currency"===this._currentItemData.cost.type&&et.h.includes(this._currentItemData.cost.ID)&&!this.isCurrentItemMemberLocked()&&(ht=X.isHardCurrencyMemberLocked(this._currentItemData.cost.N)||J&&!nt),this.renderDefaultButtons(),ot&&!it?Y?(ht?this._memberWearButton.GameObject.active=!st:this._wearButton.GameObject.active=!st,this._unequipButton.GameObject.active=st):this._buyLockButton.GameObject.active=!0:tt?this._buyLockButton.GameObject.active=!0:it?(this._levelLockButton.GameObject.findComponentsInChildren(Q.EYj).forEach((q=>q.text=`Level ${z.data.lockLevel}`)),this._levelLockButton.GameObject.active=!0):ht?this._memberBuyButton.GameObject.active=!0:!nt||at?this._buyLockButton.GameObject.active=!0:this._buyButton.GameObject.active=!0,this.updateBuyButtonAppearance(this._buyButton.GameObject),this.updateBuyButtonAppearance(this._buyLockButton.GameObject)}lockBuyButton(){this._buyButton.lockState(ht.K.Disabled)}unlockBuyButton(){this._buyButton.unlockState()}updateBuyButtonAppearance(q){const K=this._currentItemData.cost;if(!Q.Aq$.isDefined(K.N)||!Q.Aq$.isDefined(K.ID))return Q.VyI.log("Cost is not correctly defined for this item.",Q.$bb.Warning),void(q.active=!1);q.findComponentsInChildren(Q.EYj).forEach((q=>{q.text=K.N.toString()}));const z=at.W.getCurrencyIcon(Mt.h.ByTypeForStore,K.ID);rt.q.instance.prodigy.load.assetsAsPromise(z.atlas).then((()=>{q.findComponentsInChildren(Q.vYh).forEach((q=>{q.updateAsset(z.atlas,z.frame),q.GameObject.active=!0}))}),Q.RQr.createHandler("Failed to load currency icon"))}isCurrentItemMemberLocked(){var q,K,z,Y,Q;return 1===(null!==(z=null!==(q=this._currentItemData.member)&&void 0!==q?q:null===(K=this._currentItemData.data)||void 0===K?void 0:K.member)&&void 0!==z?z:null===(Q=null===(Y=this._currentItemData.data)||void 0===Y?void 0:Y.data)||void 0===Q?void 0:Q.member)}meetsCurrencyRequirement(q){if(1===q.ID)return this._activePlayer.player.getGold()>=q.N;if("currency"===q.type&&et.B.includes(q.ID)){return rt.q.instance.prodigy.gameContainer.get("bec-c6b4").getBalance(q.ID)>=q.N}return this._activePlayer.player.backpack.hasItem(q.type,q.ID)>=q.N}getCurrencyDiff(q){if("currency"===q.type&&1===q.ID)return q.N-this._activePlayer.player.getGold();if("currency"===q.type&&et.B.includes(q.ID)){const K=rt.q.instance.prodigy.gameContainer.get("bec-c6b4");return q.N-K.getBalance(q.ID)}return q.N-this._activePlayer.player.backpack.hasItem(q.type,q.ID)}};(0,Y.Cg)([(0,Q.MnK)(bt.I),(0,Y.Sn)("design:type",bt.I)],Ft.prototype,"_unifiedConversionOpener",void 0),(0,Y.Cg)([(0,Q.Cdj)("ad2-c5b2"),(0,Y.Sn)("design:type",Object)],Ft.prototype,"_activePlayer",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ft.prototype,"_bottomSectionLines",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ft.prototype,"_defaultDescription",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ft.prototype,"_previewContainer",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ft.prototype,"_itemPreviewContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(pt.Y),(0,Y.Sn)("design:type",pt.Y)],Ft.prototype,"_characterPreview",void 0),(0,Y.Cg)([(0,Q.MnK)(Nt.D),(0,Y.Sn)("design:type",Nt.D)],Ft.prototype,"_gearStats",void 0),(0,Y.Cg)([(0,Q.MnK)(Nt.D),(0,Y.Sn)("design:type",Nt.D)],Ft.prototype,"_spellStats",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],Ft.prototype,"_rarityBanners",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ft.prototype,"_tooltipContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.$),(0,Y.Sn)("design:type",ot.$)],Ft.prototype,"_buyButton",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.$),(0,Y.Sn)("design:type",ot.$)],Ft.prototype,"_buyLockButton",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Ft.prototype,"onEquipItem",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Ft.prototype,"onPurchaseSuccess",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Ft.prototype,"onPurchaseFailure",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.$),(0,Y.Sn)("design:type",ot.$)],Ft.prototype,"_wearButton",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.$),(0,Y.Sn)("design:type",ot.$)],Ft.prototype,"_unequipButton",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.$),(0,Y.Sn)("design:type",ot.$)],Ft.prototype,"_memberBuyButton",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.$),(0,Y.Sn)("design:type",ot.$)],Ft.prototype,"_memberWearButton",void 0),(0,Y.Cg)([(0,Q.MnK)(ot.$),(0,Y.Sn)("design:type",ot.$)],Ft.prototype,"_levelLockButton",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],Ft.prototype,"_oneLineItemNameRarityBanners",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],Ft.prototype,"_twoLineItemNameRarityBanners",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],Ft.prototype,"_itemName",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Ft.prototype,"_quantityParent",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],Ft.prototype,"_quantityText",void 0),Ft=(0,Y.Cg)([(0,Q.EVk)("StoreItemDetailPreview")],Ft)},40392:(q,K,z)=>{"use strict";z.d(K,{i:()=>be});var Y=z(8674),Q=z(58268),X=z(62459),Z=z(95891),J=z.n(Z),tt=z(113),et=z(88022),it=z(99625),st=z(51742),nt=z(36648),at=z(56942),rt=z(47708),ot=z(97495),ht=z(40295);class ct{}ct.DEFAULT_ICON_SCALE=.8,ct.DEFAULT_ICON_OFFET={x:3,y:-12},ct.SUB_ICON_SCALE=.8,ct.SUB_ICON_OFFSET={x:30,y:20},ct.ICON_BASE_FRAME="Map-Pin-FeaturedPet",ct.SUB_ICON_FRAME="FeaturedPet-Paw-Icon";var dt=z(28344),lt=z(42448),ut=z(90633),ft=z(73678),bt=z(61468),pt=z(35120),vt=z(49237),gt=z(91207),mt=z(34829),yt=z(77938),_t=z(86051),Et=z(10592),wt=z(90817),Tt=z(2212),St=z(93867),At=z(84399),Ct=z(35488),Ot=z(17740),It=z(52322),Dt=z(13367),Rt=z(73797),Pt=z(11624),Mt=z(46548),Nt=z(17509),xt=z(42749),Lt=z(43531),kt=z(15485),Bt=z(46784),Ut=z(65050),Ft=z(41674),Gt=z(96494),jt=z(76277),$t=z(44357),Ht=z(68152),Vt=z(29546),Wt=z(24285),qt=z(80060),Kt=z(64271),zt=z(47728),Yt=z(85126),Qt=z(4631),Xt=z(76711),Zt=z(25983),Jt=z(85515),te=z(48842),ee=z(5075),ie=z(41968),se=z(26691),ne=z(45902),ae=z(82680),re=z(74208),oe=z(32456),he=z(13751),ce=z(3785),de=z(15989);const le=(0,z(77601).gb)({key:"arcadia-branding-in-math-rpg",activateAssociatedExperiments:0,default:!1});var ue=z(93054);class fe{constructor(q){var K;this.isForceLocked=!1,Object.assign(this,q),q.difficultyModeAgnostic||null!==(K=this.difficultyMode)&&void 0!==K||(this.difficultyMode=ot.i.Regular)}getLocalizer(){var q;return null!==(q=this._localizer)&&void 0!==q?q:this._localizer=pt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService)}meetsRequirements(){const q=this.getRequirementsID();return!this.isUnreleased&&(!X.Aq$.isDefined(q)||pt.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirementsDeprecated(q))}getRequiredLevel(){var q;return null!==(q=this._requiredLevel)&&void 0!==q?q:this._requiredLevel=Vt.X.getLevelRequirement(this.getRequirementsID())}getDeniedSubjects(){return Vt.X.getDeniedSubjectRequirement(this.getRequirementsID())}isCurrentSubjectDenied(){const q=this.getDeniedSubjects();if(q){const K=pt.q.instance.prodigy.gameContainer.get("8f9-f0fc").getSubject();if(q.includes(K))return!0}return!1}isCurrentProgressDenied(){const q=this.getZonePrerequisites();if(!q||0===q.length)return!1;return q.some((q=>!ue.P.hasPlayerCompletedFinalQuestForZone(q)))}isHidden(){return!!this.hideEvaluationFunc&&this.hideEvaluationFunc()}getRequirementsID(){return this.requirementsID}getGenericLockMessage(){return this.getLocalizer().getText("ZONE_LEVEL_REQUIREMENT",this.getRequiredLevel(),this.getName())}getLockMessage(){var q;const K=pt.q.instance.prodigy.gameContainer.get("11f-118a").getFeatureRequirementAsset(this.getRequirementsID()),z=null===(q=null==K?void 0:K.metadata)||void 0===q?void 0:q.textKey,Y=(null==z?void 0:z.length)>0;if(Y&&(this.lockKey=z),Y){const q=be.getHighestAvailableZoneData().getName();return q?this.getLocalizer().getText(this.lockKey,q,this.getName()):this.getGenericLockMessage()}return this.getLocalizer().getText(this.lockKey,this.getRequiredLevel())}getName(){return"arcadia"!==this.zone||(0,jt.G)(le)?this.nameKey?this.getLocalizer().getText(this.nameKey):null:this.getLocalizer().getText("GAME_ISLAND_MAP")}getLockName(){return this.lockNameKey?this.getLocalizer().getText(this.lockNameKey):null}getSummary(){return this.summaryKeyOverrideFunc?this.getLocalizer().getText(this.summaryKeyOverrideFunc()):this.summaryKey?this.getLocalizer().getText(this.summaryKey):null}getGoButtonText(){return this.goButtonKey?this.getLocalizer().getText(this.goButtonKey):null}isVisited(){return!this.shouldTrackVisits||X.Aq$.isDefined(pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.get(`zone-${this.zone}`))}getZonePrerequisites(){return Vt.X.getZonePrerequisiteRequirement(this.getRequirementsID())}}class be extends ae.W{get prefab(){return this._prefabComponent}get forceLockedZoneIds(){var q;return null!==(q=this._forceLock)&&void 0!==q?q:[]}static setNextVisitParameters(q){Object.assign(this._nextVisitOverrides,q)}constructor(q,K,z={}){var Y;const{disableClose:Q=!1,forceLock:Z=[],assets:et=[],forceUnlock:it=[],disableZoneGoals:st=!1,injectedValues:nt={},disableDifficultyModeSelect:at=!1,difficultyMode:rt,autoOpenDialogueForZoneID:ht,onClose:ct=J().noop,onCloseButton:dt=J().noop,onInitialized:lt}=Object.assign(Object.assign({},z),be._nextVisitOverrides);if(super(q,K,70,{},be.BASE_ASSETS.concat(et).concat(be.getNonDependencyAssetsForPreload())),this.dialogueContainer=null,this._prefabComponent=null,this._prefabObj=null,this._strokeObjects=[],this._puppetMasterIndicator=null,this._gameObjectCreationPromises=[],this._isZoneGoalsActive=!0,this._isZoneLockCutsceneActive=!1,this.onWorldMapInitialized=new X.HN0,this._destroyZoneGoalsLayerOnClose=!1,this._isFestivalActive=!!pt.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival(),this._festivalTravelModalEnabled=(0,jt.G)(Ot.t),this._notificationBlockedZones=[],this.game=q,this._disableClose=Q,this._disableDifficultyModeSelect=at,this._autoOpenDialogueForZoneID=ht,this._disableZoneGoals=st,this._forceUnlock=it,this._forceLock=[...Z,...pt.q.instance.prodigy.classModeController.getInClassDisabledZones()],this._injectedValues=nt,this._injectedValues[ce.z.WorldMapMenuInstanceLockedZones]=[...this._forceLock],this.onClose=ct,this.isFullScreenUI=!0,this._closeButtonCallback=dt,be.DIFFICULTY_MODE=null!==(Y=null!=rt?rt:this.playerData.player.currentDifficulty)&&void 0!==Y?Y:ot.i.Regular,pt.q.instance.prodigy.gameContainer.get("fa1-8ec9").isBreadcrumbComplete(ut.B.FEATURE_FIREFLY_QUEST_REVISIONS,ut.B.BREADCRUMB_SHIVERCHILL_UNLOCKED)){const q=be.BUTTONS_CONFIG.find((q=>q.tag===tt.O.Shiverchill));q&&(q.requirementsID=32)}be._nextVisitOverrides={},lt&&this.onWorldMapInitialized.addOnce(lt)}create(){super.create();const q=pt.q.instance.prodigy.gameContainer.get("983-05a7");if(this._prefabObj=qt.d.loadWithInjectedValuesFromGUID(q,it.l.WorldMap,this._injectedValues),this._prefabComponent=this._prefabObj.findComponentInChildren(he.n),this._difficultyModeComponent=this._prefabObj.findComponentInChildren(re.k),this._difficultyModeComponent.setDifficultyMode(be.DIFFICULTY_MODE),this.dialogueContainer.addChild(this._prefabObj.legacyTransform.group),pt.q.instance.game.broadcaster.addAppListener(Rt.n8.WorldMapDifficultyModeChanged,(()=>{this.onDifficultyModeChanged()}),this),this._isZoneLockCutsceneActive||this._showZoneLockCutsceneLinearCampaignTransition)return void this.loadZoneLockingExperience().catch((()=>X.VyI.log("Failed to load zone locking experience",X.$bb.Error)));let K=!this._disableZoneGoals&&this.isZoneGoalsEnabled();this.initializePrefab(K).suppressInteractions&&(K=!1),K?this.loadZoneGoalsUI().catch((()=>X.VyI.log("Failed to load zone goals UI",X.$bb.Error))):this.sendInterfaceOpenEvent(),this._prefabComponent.difficultySelectorButtonText&&this.setDifficultyButtonText(),this._prefabComponent.difficultySelectorButtonNotificationBadge&&(this._prefabComponent.difficultySelectorButtonNotificationBadge.active=!this.breadcrumbManager.isBreadcrumbComplete(ut.B.FEATURE_CAMPAIGN_REPLAY,ut.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE)),this._prefabComponent.onEnableZoneGoals.add((q=>{this.enableZoneGoals(q)}),this)}onDifficultyModeChanged(){var q;if(!Tt.J.shouldShowWorldMapHardModeFirstEntryDialogue()||wt.gz.initialized){for(const q of this._prefabObj.findComponentsInChildren(ie.P))q.run();this._notificationBlockedZones=[],this.setupAllLocations(),this.setDifficultyButtonText(),this._forceLock.indexOf("DISABLE_TITAN")<0&&this.fetchTitanData(),null===(q=this._zoneGoalsController)||void 0===q||q.dismiss(),this._prefabComponent.closeButton.GameObject.active=!1}else this.startHigherDifficultyFTUE(ot.i.Hard)}startHigherDifficultyFTUE(q){pt.q.instance.game.broadcaster.addAppListener(Rt.sn.HardModeFtueStepAdvanced,this.hardModeFtueStepEventHandler.bind(this),this),wt.gz.instance.beginHardModeFirstEntryExperience();const K=q===ot.i.Hard?ft.A_.FORESTHARD:ft.A_.FORESTEXPERT;for(const z of this._prefabObj.findComponentsInChildren(ie.P))z._zoneId!==K&&z.showGuideHand(!1)}setActive(q){super.setActive(q),wt.gz.initialized&&(X.wa5.getActiveScene().getLayer(Jt.E.OverlayLayer).visible=!0)}static getNonDependencyAssetsForPreload(){return[...zt.x.getAllFestivalMapButtonImages(),oe.u.getDailyElementalBoostSpineGUID()]}addOrMakeZoneGoalsLayerVisible(){X.wa5.getActiveScene().hasLayer(be.ZONE_GOALS_LAYER_NAME)?X.wa5.getActiveScene().getLayer(be.ZONE_GOALS_LAYER_NAME).visible=!0:(this._destroyZoneGoalsLayerOnClose=!0,X.wa5.getActiveScene().addLayer(be.ZONE_GOALS_LAYER_NAME,be.ZONE_GOALS_LAYER_DEPTH,!0))}showGemAwardedSequence(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;yield this.loadZoneGoalsUI();const Y=Kt.N.getCoreZonesInOrder(be.DIFFICULTY_MODE),Q=Y[Y.findIndex((K=>K.zone===q))+1],Z=X.Aq$.isDefined(Q)&&!be.isZoneLockedParams(Q,this.featureRequirements,this._forceLock,this._forceUnlock);if(this._prefabObj&&!this._prefabObj.isDestroyed){(null!==(K=this.prefab.GameObject.findComponentsInChildren(ie.P,!0))&&void 0!==K?K:[]).forEach((q=>{q.showGuideHand(!1),q._zoneId!==(null==Q?void 0:Q.zone)&&q.onShowGuideHand.removeAll()})),this._indicatorContainer.visible=!1,this.addOrMakeZoneGoalsLayerVisible(),null===(z=this._zoneGoalsController)||void 0===z||z.showGemAwardSequence(q,(()=>{var q;this._indicatorContainer.visible=!1,Z&&(null===(q=this._prefabObj.findComponentsInChildren(ie.P).find((q=>q._zoneId===(null==Q?void 0:Q.zone))))||void 0===q||q.onShowGuideHand.dispatch(!0)),this.enableZoneGoals(!1)}))}}))}loadZoneLockingExperience(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.initializePrefab(!1),this._prefabComponent.GameObject.findComponentsInChildren(vt.$).forEach((q=>{q.inputEnabled=!1})),this.game.broadcaster.addAppListener(Rt._D.PuppetmasterWorldMapSpell,(()=>this.onPuppetMasterZoneLockSpell()),this),this.game.broadcaster.addAppListener(Rt._D.PuppetmasterCutsceneComplete,(()=>this.onZoneLockCutsceneComplete()),this),this.game.broadcaster.addAppListener(Rt.n8.WorldMapZoneSelected,(()=>this.completeZoneLockExperienceSeenBreadcrumb()),this);const q=pt.q.instance.prodigy.gameContainer.get("983-05a7"),K=yield q.loadWithDependenciesFromGUID(it.l.ZoneLockedSequence);this._prefabObj&&!this._prefabObj.isDestroyed&&(X.wa5.getActiveScene().addGameObject(K),this.addOrMakeZoneGoalsLayerVisible(),K.setLayer(be.ZONE_GOALS_LAYER_NAME,!0),this.sendInterfaceOpenEvent())}))}onPuppetMasterZoneLockSpell(){var q;for(let K=0;K{q.inputEnabled=!0}));const K=null===(q=be.getHighestAvailableZoneData())||void 0===q?void 0:q.prefabIndex;if(X.Aq$.isDefined(K)){const q=this._prefabComponent.getIconContainer(K),z=pt.q.instance.prodigy.gameContainer.get("983-05a7").loadWithDependenciesFromGUID(it.l.GuideHandSortingAnchor).then((K=>{var z,Y;this.dialogueContainer.addChild(K.findComponent(X.jsv).getRootContainer()),null===(z=K.findComponent(X.XVE))||void 0===z||z.setPositionX(q.legacyTransform.x-50),null===(Y=K.findComponent(X.XVE))||void 0===Y||Y.setPositionY(q.legacyTransform.y-100)})).catch((()=>X.VyI.log("Failed to load Guide Hand prefab",X.$bb.Error)));this._gameObjectCreationPromises.push(z)}}completeZoneLockExperienceSeenBreadcrumb(){pt.q.instance.prodigy.gameContainer.get("fa1-8ec9").completeBreadcrumb(ut.B.FEATURE_ZONE_LOCK_CUTSCENE,ut.B.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE),this.game.broadcaster.removeAppListener(Rt.n8.WorldMapZoneSelected,this)}activateLinearCampaignTransition(){this._showZoneLockCutsceneLinearCampaignTransition=!0}isZoneGoalsEnabled(){const q=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return q.ultimateSessionStatus===Et.n.None&&q.hasCompletedTutorial()}loadZoneGoalsUI(){return(0,Y.sH)(this,void 0,void 0,(function*(){if(X.Aq$.isDefined(this._zoneGoalsPromise))return this._zoneGoalsPromise;const q=pt.q.instance.prodigy.gameContainer.get("983-05a7");return this._zoneGoalsPromise=q.loadWithDependenciesFromGUID(it.l.ZoneGoalsMain).then((q=>{this._prefabObj&&!this._prefabObj.isDestroyed&&(this._zoneGoalsObject=q,X.wa5.getActiveScene().addGameObject(this._zoneGoalsObject),this.addOrMakeZoneGoalsLayerVisible(),this._zoneGoalsObject.setLayer(be.ZONE_GOALS_LAYER_NAME,!0),this._zoneGoalsController=this._zoneGoalsObject.findComponentInChildren(ne._),this._zoneGoalsController.onApplyCustomDisplay.add(this.applyCustomHighlight,this),this._zoneGoalsController.onClearCustomDisplay.add(this.clearCustomHighlight,this),this._zoneGoalsController.onZonePanelActivated.add((q=>{const K=this.buttonConfigByQuestIndexAndDifficulty(q,be.DIFFICULTY_MODE),z=be.isZoneLockedParams(K,this.featureRequirements,this._forceLock);this.openLocation(K,z)})),this._isZoneGoalsActive?St.U.shouldShowEndgameNootWorldMapDialogue()||St.U.isStepComplete(ht.B.PuppetMasterDefeated)||this._zoneGoalsController.tryAutoTrigger():this.enableZoneGoals(!1),this.sendInterfaceOpenEvent(this._zoneGoalsController.getCurrentActivePanels()))})).catch((()=>{X.VyI.log("Failed to load zone goals UI",X.$bb.Error)})),this._zoneGoalsPromise}))}initializePrefab(q){var K;const z={suppressInteractions:!1};if(this._prefabComponent.GameObject.legacyTransform.group.updateTransform(),this._indicatorContainer=pt.q.instance.game.add.container(),this._prefabObj.legacyTransform.group.addChild(this._indicatorContainer),this._prefabComponent.menuTitle.text=this.localizer.getText("WORLD_MAP_TITLE"),this._disableClose?this._prefabComponent.closeButton.GameObject.active=!1:this.setupCloseButton(),At.R.isFeatureEnabled()&&St.U.isStepComplete(ht.B.PuppetMasterDefeated)&&(this._prefabComponent.difficultySelectorButton.GameObject.active=!this._disableDifficultyModeSelect),this._isZoneLockCutsceneActive||this._showZoneLockCutsceneLinearCampaignTransition){for(const q of be.BUTTONS_CONFIG)this.setupLocation(q,null===(K=q.shouldLockForPuppetMasterZoneLockSpell)||void 0===K?void 0:K.call(q),!1,!1);return this._indicatorContainer.visible=!1,this.setupStrokeObjects(!1),this.onWorldMapInitialized.dispatch(this),z}if(z.suppressInteractions||(z.suppressInteractions=this.startDialogue()),this.setupAllLocations(z.suppressInteractions),this.setupStrokeObjects(q),!z.suppressInteractions)for(const X of this._prefabObj.findComponentsInChildren(ie.P))X.run()&&(z.suppressInteractions=!0,z.activeZoneUnlockComponent=X);const Y=this._prefabObj.findComponentInChildren(oe.u);z.suppressInteractions?Y.blockReveal=!0:Y.attemptReveal();const Q=this.playerData.player;if(Q.tutorial.getMenuValue(_t.K.WORLD_MAP.INTRO)<1){Q.tutorial.setMenuValue(_t.K.WORLD_MAP.INTRO,1);const q=new Lt.rD(this.game);q.addEvents([{dialogueData:q.dataProvider.get(28),blockInput:!0}]),q.start()}if(Q.ultimateSessionStatus===Et.n.TrackingNPC&&this._forceLock.indexOf("DISABLE_ULTIMATES_QUEST")<0&&this.setupNPCLocation(),Q.ultimateSessionStatus===Et.n.TamingUltimate&&this._forceLock.indexOf("DISABLE_ULTIMATES_QUEST")<0&&this.setupUltimateLocation(),this._forceLock.indexOf("DISABLE_TITAN")<0&&this.fetchTitanData(),this._forceLock.indexOf("DISABLE_DUNGEON")<0&&this.featureRequirements.meetsRequirementsDeprecated(43)&&!be.isZoneLockedParams(be.BUTTONS_CONFIG[Pt.P.Shiverchill],this.featureRequirements)&&be.isInDifficultyMode(ot.i.Regular)&&this.setupDungeonIcons(),St.U.isEndgameQuestActive()&&this.setupPuppetMasterIndicator(),this._indicatorTween=this.game.add.tween(this._indicatorContainer,this._indicatorContainer).to({y:10},400,X.GS3.Quadratic.InOut,!0,0,mt.s.MAX_SAFE_INTEGER,!0),this.game.broadcaster.broadcast(Rt.sd.GetTotalFriendRequests,"FriendsList",[!1]),X.Aq$.isDefined(this._autoOpenDialogueForZoneID)){const q=be.BUTTONS_CONFIG.find((q=>q.zone===this._autoOpenDialogueForZoneID));if(q){const K=be.isZoneLockedParams(q,this.featureRequirements,this._forceLock);z.activeZoneUnlockComponent?z.activeZoneUnlockComponent.onShowGuideHand.addOnce((()=>this.openLocation(q,K)),this):this.openLocation(q,K)}else X.VyI.log("WorldMapMenu: Auto-open dialogue zone not found",X.$bb.Warning)}return this.onWorldMapInitialized.dispatch(this),z}setupStrokeObjects(q){if(this._strokeObjects=this._prefabComponent.menuContainer.findComponentsInChildren(Mt.t),X.o5U.isDesktop())for(let K=0;K{var q;const z=be.ZONE_GOALS_STROKE_OBJECT_MAPPING[K];-1!==z&&(null===(q=this._zoneGoalsController)||void 0===q||q.setPanelActive(z,this._strokeObjects[K].GameObject.active,!0))}))}setupCloseButton(){this._prefabComponent.closeButton.onClick.getBindingsCount()>0&&X.VyI.log("WorldMapMenu: Close button already has a click binding",X.$bb.Warning),this._prefabComponent.closeButton.onClick.add((()=>{var q;null===(q=this._closeButtonCallback)||void 0===q||q.call(this),be.sendButtonClickedEvent(kt.k.X,pt.q.instance.prodigy.world.getCurrentZone(),Bt.B.WorldMap),pt.q.instance.prodigy.audio.playSFX(18,"pop"),pt.q.instance.prodigy.world.getZone(pt.q.instance.prodigy.world.getCurrentZone()).createTopLeftNavigationButton(),wt.gz.initialized&&wt.gz.instance.completeFtue(!1),this.close()}))}setupAllLocations(q=!1){this._indicatorContainer.removeChildren();for(const K of be.BUTTONS_CONFIG){const z=pt.q.instance.prodigy.breadcrumbManager,Y=q&&z.isBreadcrumbDefined(...this.getZoneUnlockAnimationBreadcrumb(K))&&!z.isBreadcrumbComplete(...this.getZoneUnlockAnimationBreadcrumb(K)),Q=!this._isZoneLockCutsceneActive&&be.isZoneLockedParams(K,this.featureRequirements,this._forceLock,this._forceUnlock)||Y;this.setupLocation(K,Q)}}setupLocation(q,K,z=!0,Q=!0){var Z,J,tt;if(q.isHidden())return this.prefab.getDisabledLocation(q.prefabIndex).active=!1,this.prefab.getLockTransition(q.prefabIndex).active=!1,this.prefab.getLockObject(q.prefabIndex).active=!1,this.prefab.getMapLocation(q.prefabIndex).active=!1,void(this.prefab.getIconContainer(q.prefabIndex).active=!1);const it=q.useLocationDialogPrefab?()=>this.openLocationDialogPrefab(q,K):()=>this.openLocation(q,K),st=this._prefabComponent.getMapLocation(q.prefabIndex),nt=st.findComponentsInChildren(vt.$);for(let Y=0;Y{it(),q.analyticsClickOverride?q.analyticsClickOverride():(be.sendButtonClickedEvent(`${q.target.split("-")[0]}-button`,q.target,Bt.B.WorldMap,{elementType:"map_screen"}),this.sendZoneProgressInterfaceEvent(q))})));const at=this.getZonePinOffsets(q,K);if(!K&&at.hasFeaturedPet&&this.setupFeaturedSpawnNotification(q,at.pinOffsetValues[0]),at.festivalButton&&(this.game.cache.checkImageKey(at.festivalButton)?st.findComponentsInChildren(X.vYh).forEach((q=>{q.updateAsset(at.festivalButton)})):X.VyI.log(`WorldMap: Festival button image not loaded: ${at.festivalButton}`,X.$bb.Error)),at.hasFestivalNotification){const K=zt.x.getFestivalMapIconImage();K?this.createNotificationIcon(q,K,void 0,1,{x:at.pinOffsetValues[1],y:0}):this.createNotificationIcon(q,et._.General_icons_json,"exclamation",1,{x:at.pinOffsetValues[1],y:0})}const rt=this._prefabComponent.getDisabledLocation(q.prefabIndex);rt.active=K,this._prefabComponent.getLockTransition(q.prefabIndex).active=K;const ot=this._prefabComponent.getLockObject(q.prefabIndex);ot.active=K;const ht=ot.findComponent(vt.$);if(ht.inputEnabled=K,K)if(ht.onClick.removeAll(),ht.onClick.add((()=>{it(),be.sendButtonClickedEvent(`${q.target.split("-")[0]}-button`,"Locked",Bt.B.WorldMap,{elementType:"map_screen"}),this.fireInterfaceEvent({interfaceName:q.target.split("-")[0],originType:Ft.$N.ButtonClick,originID:`${q.target.split("-")[0]}-button`})})),q.hideZoneOnLocked)st.active=!1;else if(xt.m.useFilter(this.game))this.tintLockedZoneGameObject(st);else{const K=rt.findComponentInChildren(Nt.e),z=be.BUTTONS_CONFIG.indexOf(q);K.Active=!0,K.initialize(`world-map-disable-tint-${z}`)}if(!K&&be.isInDifficultyMode(null==q?void 0:q.difficultyMode)&&(z&&(null===(Z=null==q?void 0:q.showNotificationIcon)||void 0===Z?void 0:Z.call(q))?this.createNotificationIcon(q):z&&q.zone===ft.A_.DRAGONISLE&&this.breadcrumbManager.isBreadcrumbComplete(ut.B.FEATURE_ZONE_UNLOCKED_POPUP,ut.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE)&&(()=>(0,Y.sH)(this,void 0,void 0,(function*(){var K,z,Y;const Q=pt.q.instance.prodigy.gameContainer.get("81d-5606"),[X,Z]=yield Promise.all([Q.getActiveRiftsPortalIds(),Q.fetchRiftsConfig()]),J=null==X?void 0:X.filter((q=>q!==lt.ni.Portal1));if(!Z||!X||!J||0===(null==J?void 0:J.length))return;const tt=(null!==(K=(Y=this.playerData.player.data).rifts)&&void 0!==K?K:Y.rifts={}).dragonIsleNotificationLastSeenTimestampMs;if(tt)for(const et of J){const K=null===(z=Z[et])||void 0===z?void 0:z.dragonIsleNotificationCooldownMs;if(!K||Date.now()-tt>K)return void this.createNotificationIcon(q)}else this.createNotificationIcon(q)})))().catch(X.RQr.createHandler("WorldMapMenu: Failed to set up notifications based on active rift portals")),Q&&!1===(null===(J=null==q?void 0:q.isVisited)||void 0===J?void 0:J.call(q))&&this.createSparkles(q.tag,ot),xt.m.useFilter(this.game)?this.untintLockedZoneGameObject(st):rt.findComponentInChildren(Nt.e).Active=!1),!(K||q.zone!==ft.A_.LAMPLIGHT||this._isZoneLockCutsceneActive||Tt.J.shouldShowWorldMapHardModeFtue()||this._showZoneLockCutsceneLinearCampaignTransition))for(const Y of this._prefabObj.findComponentsInChildren(ie.P))Y._zoneId===ft.A_.LAMPLIGHT&&this._isFestivalActive&&this._festivalTravelModalEnabled&&Y.showGuideHand(!0);null===(tt=q.onSetupLocation)||void 0===tt||tt.call(q)}setupFeaturedSpawnNotification(q,K=0){var z,Y,Q,X,Z,J;const tt=this._featuredSpawnService.getCachedData();if(this._featuredSpawnService.shouldShowMapPin(q.zone)&&tt){const it=gt.E.getIconForType("pet",tt.petId),st=null!==(Y=null===(z=tt.iconData)||void 0===z?void 0:z.offset)&&void 0!==Y?Y:ct.DEFAULT_ICON_OFFET;this.createNotificationIcon(q,et._.Ui_featured_pet_json,ct.ICON_BASE_FRAME,1,{x:K,y:0}),this.createNotificationIcon(q,it,void 0,null!==(X=null===(Q=tt.iconData)||void 0===Q?void 0:Q.scale)&&void 0!==X?X:ct.DEFAULT_ICON_SCALE,{x:(null!==(Z=st.x)&&void 0!==Z?Z:0)+K,y:st.y}),this.createNotificationIcon(q,et._.Ui_featured_pet_json,ct.SUB_ICON_FRAME,ct.SUB_ICON_SCALE,{x:(null!==(J=ct.SUB_ICON_OFFSET.x)&&void 0!==J?J:0)+K,y:ct.SUB_ICON_OFFSET.y})}}getZonePinOffsets(q,K){const z=[],Y=zt.x.getFestivalMapButtonImage(q.zone),Q=this._featuredSpawnService.getCachedData(),Z=X.Aq$.isDefined(Q),J=this._isFestivalActive&&q.zone===ft.A_.LAMPLIGHT&&!be.isZoneLocked(q.zone);J&&z.push("festival"),!K&&Z&&this._featuredSpawnService.shouldShowMapPin(q.zone)&&z.push("featuredPet");const tt=q=>{const K=z.indexOf(q);return-1===K?0:(K-(z.length-1)/2)*be.NOTIFICATION_PIN_SPACING};return{pinOffsetValues:[tt("featuredPet"),tt("festival")],festivalButton:Y,hasFeaturedPet:Z,hasFestivalNotification:J}}applyCustomHighlight(q){var K,z;for(let Y=0;Y{q.visible=!1})),this._puppetMasterIndicator.visible=!0):this._indicatorContainer.visible=!1}clearCustomHighlight(){var q;for(let K=0;K{q.visible=!0}))}tintLockedZoneGameObject(q){const K=new Q.N;K.tint(10388653,!0),q.legacyTransform.group.filters=[K],Wt.s.cacheAsBitmap(q.legacyTransform.group)}untintLockedZoneGameObject(q){q.legacyTransform.group.filters=[],q.legacyTransform.group.cacheAsBitmap=!1}sendInterfaceOpenEvent(q){this.fireInterfaceEvent({interfaceName:Bt.B.WorldMap,interfaceType:Ft.Wm.Screen,instanceType:Ut.N.Interface,originType:Ft.$N.ButtonClick,originID:kt.k.Map},{item_list:null!=q?q:[]})}static sendButtonClickedEvent(q,K,z,Y){pt.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent(Object.assign({buttonName:q,destinationName:K,interfaceName:z,interfaceType:Ft.Wm.Menu,saveClickInfo:q},Y))}sendZoneProgressInterfaceEvent(q,K){this._festivalTravelModalEnabled&&this._isFestivalActive&&q.zone===ft.A_.LAMPLIGHT||this.fireInterfaceEvent({interfaceName:`zone_entry_popup_${q.zone}`,interfaceType:Ft.Wm.Modal,originType:Ft.$N.ButtonClick,originID:K?kt.k.X:`${q.zone}-button`,closeMethod:K?Ft.Lv.ButtonClick:void 0})}setupDungeonIcons(){const q=be.BUTTONS_CONFIG.length,K=pt.q.instance.prodigy.gameContainer.get("f71-42eb"),z=this.playerData.player;for(let Y=0;YK.zone===q)),pt.q.instance.prodigy.gameContainer.get("11f-118a"),pt.q.instance.prodigy.gameContainer.get(X.$Bt.LocalizationService),!1,K)}static getZoneName(q){var K;const z=be.BUTTONS_CONFIG.find((K=>K.zone===q));return null!==(K=null==z?void 0:z.getName())&&void 0!==K?K:""}static getZoneTagForZoneId(q){var K;const z=be.BUTTONS_CONFIG.find((K=>K.zone===q));return null!==(K=null==z?void 0:z.tag)&&void 0!==K?K:""}static openLockMessageParams(q,K,z,Y,Q=null){var Z,J,et;if(q.isForceLocked)pt.q.instance.prodigy.open.message(z.getText("WORLD_MAP_ZONE_LOCKED"),Q,q.icon,null!==(Z=q.getLockName())&&void 0!==Z?Z:q.getName(),null,{isModal:!1});else if(X.Aq$.isDefined(q.requirementsID)&&!K.meetsRequirementsDeprecated(q.requirementsID)&&26===q.requirementsID)pt.q.instance.prodigy.open.message(z.getText("WORLD_MAP_ZONE_LOCKED"),Q,q.icon,q.getName(),null,{isModal:!1});else if(this.checkFeatureRequirementsForLock(K,q)){let K;K=q.isCurrentSubjectDenied()?ee.A.LOCKEDSUBJECT:q.isCurrentProgressDenied()||"arcadia"===q.zone?ee.A.LOCKEDPREREQUISITE:ee.A.LOCKEDLEVEL,pt.q.instance.prodigy.open.prefabMenu(it.l.ZoneLockedPopup,Q,void 0,!1,void 0,{ZONE_STATUS_MODAL_TYPE:K,ZONE_STATUS_POPUP_TARGET_ID:q.zone})}else be.getZoneData(q.zone).isUnreleased&&this.getZoneTagForZoneId(q.zone)!==tt.O.Shiverchill?pt.q.instance.prodigy.open.prefabMenu(it.l.ZoneComingSoonPopup,Q,void 0,!1,void 0,{ZONE_STATUS_MODAL_TYPE:ee.A.COMINGSOON,ZONE_STATUS_POPUP_TARGET_ID:q.zone}):!Y&&X.Aq$.isDefined(null==q?void 0:q.classCodeKey)&&pt.q.instance.prodigy.classModeController.isClassMode()?pt.q.instance.prodigy.open.classModeMessage(z.getText(q.classCodeKey),Q,null,q.getName(),q.classModeFrame,{isModal:!0},q.nameKey):pt.q.instance.prodigy.open.message(z.getText(null!==(J=q.lockKey)&&void 0!==J?J:"WORLD_MAP_ZONE_LOCKED"),Q,q.icon,null!==(et=q.getLockName())&&void 0!==et?et:q.getName(),null,{isModal:!1})}openLocation(q,K){var z;if(pt.q.instance.prodigy.audio.playSFX(18,"pop"),this.enableZoneGoals(!1),K)be.openLockMessageParams(q,this.featureRequirements,this.localizer,this._disableClose,(()=>{this.enableZoneGoals(!0),be.sendButtonClickedEvent(kt.k.Okay,null,q.target.split("-")[0]),this.fireInterfaceEvent({interfaceName:q.target.split("-")[0],closeMethod:Ft.Lv.ButtonClick})}));else if(this._festivalTravelModalEnabled&&q.zone===ft.A_.LAMPLIGHT&&this._isFestivalActive)zt.x.openTravelModal(Ft.$N.ButtonClick,void 0,(()=>{this.close()}));else if(At.R.isFeatureEnabled()&&be.DIFFICULTY_MODE!==ot.i.Regular&&q.difficultyMode===ot.i.Regular){const K=()=>{X.Aq$.isDefined(q.onClickOverride)?q.onClickOverride(this):be.goTo(q.target,null==q?void 0:q.clickEventName)};pt.q.instance.prodigy.open.difficultyUnavailableConfirmationModal(q,K)}else if(q.onClickOverride)q.onClickOverride(this);else if(!X.Aq$.isDefined(q.tag)||q.tag&&!q.msgKeys){const K=[ft.A_.BONFIRE,ft.A_.FOREST,ft.A_.SHIPWRECK,ft.A_.SHIVERCHILL,ft.A_.SKYWATCH],Y=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2"),Q=pt.q.instance.prodigy.world.zones[q.zone],X=(null==Q?void 0:Q.allQuestsAreComplete)||(null==Q?void 0:Q.isKeystonePlaced)||!K.includes(null==Q?void 0:Q.ID)?q.target:null!==(z=Y.player.getLastVisitedMapForZone(q.zone))&&void 0!==z?z:q.target;pt.q.instance.prodigy.open.messageBoxPrefab({text:"WORLD_MAP_CONFIRM_TRAVEL",textArgs:[q.getSummary()],buttonState:se.D.YesNoButtons,confirmCallback:()=>{be.goTo(X,q.clickEventName,null,kt.k.Yes),this.fireInterfaceEvent({interfaceName:q.target.split("-")[0],closeMethod:Ft.Lv.ButtonClick})},noCallback:()=>{this.enableZoneGoals(!0),be.sendButtonClickedEvent(kt.k.No,q.target,q.target.split("-")[0]),this.fireInterfaceEvent({interfaceName:q.target.split("-")[0],closeMethod:Ft.Lv.ButtonClick})},title:q.getName(),isModal:!1})}else{if((0,jt.G)(dt.y).enabled&&!this.featureRequirements.meetsRequirementsDeprecated(8))return void be.goTo(be.getDefaultMapForZone(q),q.clickEventName,!0,kt.k.Play,`zone_entry_popup_${q.zone}`);be.openZoneProgressDialog(this._titanAsset,q,this.playerData.player,this._ultimateQuestTarget,!this.featureRequirements.meetsRequirementsDeprecated(43)||this._forceLock.includes("DISABLE_DUNGEON"),(()=>{this.enableZoneGoals(!0),this.sendZoneProgressInterfaceEvent(q,!0)}))}}static getDefaultMapForZone(q){var K;const z=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2"),Y=pt.q.instance.prodigy.world.zones[q.zone];return(null==Y?void 0:Y.allQuestsAreComplete)||(null==Y?void 0:Y.isKeystonePlaced)?q.target:null!==(K=z.player.getLastVisitedMapForZone(q.zone))&&void 0!==K?K:q.target}static openZoneProgressDialog(q,K,z,Y,Q=!1,Z){let J="";X.Aq$.isDefined(q)&&(J=`${q.zone}-Titan`);const tt=be.generateZoneData(K);let et=te.SB.WorldMap,st=!0,nt=be.getDefaultMapForZone(K);z.ultimateSessionStatus===Et.n.TrackingNPC&&(null==Y?void 0:Y.startsWith(K.zone))&&(et=te.SB.TrackingNPC,tt.npcAtlasID=229,tt.npcFrameName="icon-npc-loc-assembled",tt.zoneActionText="UI_ZONE_TRADE",nt=this.getQuestLocation(Y),st=!1),z.ultimateSessionStatus===Et.n.TamingUltimate&&(null==Y?void 0:Y.startsWith(K.zone))&&(et=te.SB.TrackingMythic,tt.npcAtlasID=229,tt.npcFrameName="icon-epics-loc-assembled",tt.zoneActionText="UI_ZONE_TAME",nt=pt.q.instance.prodigy.world.getZone(Y.split("-")[0]).questHub,st=!1),Q&&(tt.dungeonAvailable=!1);const at=pt.q.instance.prodigy.gameContainer.get("e84-d543"),rt=`zone_entry_popup_${K.zone}`,ht=be.goTo.bind(this,nt,K.clickEventName,st,kt.k.Play,rt),ct=this.isInDifficultyMode(ot.i.Regular)?be.goTo.bind(this,J,K.clickEventName,null,kt.k.Titan,rt):()=>pt.q.instance.prodigy.open.difficultySelectorConfirmationModal(ot.i.Regular,be.goTo.bind(this,J,K.clickEventName,null,kt.k.Titan,rt)),dt=be.enterDungeon.bind(this,K.dungeon,K.clickEventName,rt);Promise.all([at.getPetsInZone(tt.zone),at.getMinMaxEnemyLevelsForZone(tt.zone)]).then((([z,Y])=>{pt.q.instance.prodigy.open.prefabMenu(it.l.Pets_ZoneUI,(()=>null),void 0,void 0,void 0,{PET_ZONE_ID:K.prefabIndex,PET_ZONE_MENU_STATE:et,PET_ZONE_PLAY_BUTTON:ht,PET_ZONE_TITAN_BUTTON:q&&q.zone===K.zone.replace(/(_hard|_expert)/g,"")?ct:null,PET_ZONE_DUNGEON_BUTTON:K.dungeon&&!Q?dt:null,GRID_VIEW_DATA:z.map((q=>q.ID)),PET_ZONE_ENEMY_MIN_MAX_LEVEL:Y}).onDestroy.add(Z)})).catch(X.RQr.createHandler("Could not fetch pets for current zone"))}static generateZoneData(q){const K=pt.q.instance.prodigy.gameContainer.get("f71-42eb");return{zone:q.zone,msgKeys:q.msgKeys,summary:q.getSummary(),tag:q.tag,dungeonAvailable:X.Aq$.isDefined(q.dungeon)&&K.getValue(q.dungeon.featureFlagName,!0)}}static getQuestLocation(q){const K=q.split("-")[0],z=q.split("-")[1],Y=pt.q.instance.prodigy.world.getZone(K).getMap(z);return bt.l.getRandomItem(Y.locations)}openLocationDialogPrefab(q,K){if(pt.q.instance.prodigy.audio.playSFX(18,"pop"),(0,Ht.v)(!!q.splashImage,`No splash image defined for ${q.getName()}`),this.enableZoneGoals(!1),be.isZoneFeatureFlagLocked(q))pt.q.instance.prodigy.open.messageBoxPrefab({title:"FEATURE_DISABLED",confirmCallback:()=>{this.enableZoneGoals(!0)}});else{const z=pt.q.instance.prodigy.gameContainer.get("983-05a7").loadFromGUID(it.l.MapLocationDialog);this.dialogueContainer.addChild(z.legacyTransform.group);const Y=z.findComponent(Zt.s);K?Y.showOneButton(q.splashImage,q.getLockName(),q.getLockMessage(),this.localizer.getText("BUTTON_OKAY_CAPITAL"),K):Y.showTwoButton(q.splashImage,q.getName(),q.getSummary(),this.localizer.getText("NOT_NOW"),q.getGoButtonText(),K);const Q=z.findComponentsInChildren(vt.$);for(let K=0;K{this.fireInterfaceEvent({interfaceName:q.zone,closeMethod:Ft.Lv.ButtonClick}),z.destroy()}));Y.onClose.addOnce((()=>{this.enableZoneGoals(!0)})),Y.onConfirm.addOnce((()=>{be.goTo(q.target,q.clickEventName)}))}}static enterDungeon(q,K,z){be.goTo(q.dungeonHub,K,null,kt.k.CrystalCaverns,null!=z?z:Bt.B.Shiverchill)}static goTo(q,K,z=!0,Y,Q){X.Aq$.isDefined(K)&&pt.q.instance.game.broadcaster.broadcast(K,"UI"),wt.gz.initialized&&wt.gz.instance.completeFtue(!0);const Z=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,J=q.split("-")[0];Y&&be.sendButtonClickedEvent(Y,J,null!=Q?Q:J),pt.q.instance.prodigy.open.menuCloseAll();const tt=pt.q.instance.prodigy.world.getCurrentZone(),et=pt.q.instance.prodigy.world.getZone(tt);z&&Z.isTrackingQuestEnabled&&tt!==J&&Z.setUltimateSessionStatus(Et.n.None,"",0),X.Aq$.isDefined(et)?et.handleLeaving(Qt.j.mapTeleport,(()=>{be.startZone(q)})):be.startZone(q)}static startZone(q){pt.q.instance.game.broadcaster.broadcast(Rt.n8.WorldMapZoneSelected);const K=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;"Dorm"===q?(pt.q.instance.game.state[q].player=K,pt.q.instance.prodigy.start(q)):q.indexOf("-")>0?pt.q.instance.prodigy.world.it(q):pt.q.instance.prodigy.start(q)}setupNPCLocation(){this._ultimateQuestTarget=Dt.m.getSeededLocation();const q=be.getZoneData(this._ultimateQuestTarget.split("-")[0]);this.createUltimateQuestIndicator(q,pt.q.instance.prodigy.create.npcIndicator.bind(this,q.ultimatesQuestIconOffset.x,q.ultimatesQuestIconOffset.y))}setupUltimateLocation(){const q=pt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;pt.q.instance.prodigy.gameContainer.get("996-2681").getQuestMetaData(q.ultimateQuestId).then((q=>{const K=q.petID;this._ultimateQuestTarget=It.v.getUltimatesPetLocation(K);const z=be.getZoneData(this._ultimateQuestTarget.split("-")[0]);this.createUltimateQuestIndicator(z,pt.q.instance.prodigy.create.ultimatesIndicator.bind(this,z.ultimatesQuestIconOffset.x,z.ultimatesQuestIconOffset.y))})).catch((q=>{X.VyI.log(`Error getting quest data ${q.message}`,X.$bb.Error)}))}createUltimateQuestIndicator(q,K){if(q){const z=K(q.ultimatesQuestIconOffset.x,q.ultimatesQuestIconOffset.y),Y=this._prefabComponent.getIconContainer(q.prefabIndex).legacyTransform.group;z.anchor.set(.5,.5),this._indicatorContainer.addChild(z),z.position.x+=Y.getGlobalPosition().x,z.position.y+=Y.getGlobalPosition().y}else X.VyI.log("Unable to retrieve Zone Data from target string. Indicator creation aborted.",X.$bb.Error)}fetchTitanData(){this.game.broadcaster.addAppListener(Rt.RZ.GotTitans,this.setupTitan.bind(this),this,"Titan"),pt.q.instance.prodigy.titansNetworkHandler.getTitans().catch(X.RQr.createHandler("WorldMap: Could not get active Titan data"))}setupTitan(q){if(this.game.broadcaster.removeAppListener(Rt.RZ.GotTitans,this,"Titan"),q&&X.Aq$.isDefined(q.assetID)&&pt.q.instance.prodigy.titansNetworkHandler.isTitanAlive()){const K=yt.t.getItem("titan",q.assetID);if(X.Aq$.isDefined(K)){let q,z=!1;for(let Q=0;Q{var q;pt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ut.B.FEATURE_ENDGAME_QUEST,ut.B.BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE),this._isZoneGoalsActive&&(null===(q=this._zoneGoalsController)||void 0===q||q.tryAutoTrigger())})).catch(X.RQr.createHandler("Error showing pippet dialogue")),!1}hardModeFtueStepEventHandler(q){var K;switch(q){case wt.cM.STEP_1_NOOT_DIALOGUE_INTRO:for(let z=0;z{wt.gz.instance.advanceFtueStep()})).catch(X.RQr.createHandler("Error showing Campaign Replay Intro dialogue"));break;case wt.cM.STEP_5A_CLOSE_DIFFICULTY_SELECTOR:this.setupCloseButton(),this._prefabComponent.closeButton.GameObject.active=!0;break;case wt.cM.STEP_6A_RESUME_WORLD_MAP_NORMAL:wt.gz.initialized&&wt.gz.instance.completeFtue(!1);break;case wt.cM.STEP_7B_NOOT_HARD_MODE_INTRO:const q=be.BUTTONS_CONFIG.find((q=>q.zone===ft.A_.FORESTHARD));if(!q){X.VyI.log("Error finding forest hard mode zone info during Hard Mode FTUE",X.$bb.Error);break}this._prefabComponent.GameObject.findComponentsInChildren(vt.$).forEach((q=>{q.inputEnabled=!1})),this._prefabComponent.getMapLocation(q.prefabIndex).findComponentsInChildren(vt.$).forEach((q=>q.inputEnabled=!0)),this._indicatorContainer.removeChildren(),$t.v$([1687,1688]).then((()=>{wt.gz.instance.advanceFtueStep()})).catch(X.RQr.createHandler("Error showing Campaign Replay Intro dialogue"))}}startTitanUnlockedDialogue(){this.enableZoneGoals(!1);const q=new Lt.rD(this.game);q.addEvents([{dialogueData:q.dataProvider.get(862),blockInput:!0},{dialogueData:q.dataProvider.get(863),blockInput:!0},{dialogueData:q.dataProvider.get(864),blockInput:!0},{dialogueData:q.dataProvider.get(865),blockInput:!0},{callback:()=>{this.breadcrumbManager.completeBreadcrumb(ut.B.FEATURE_TITAN_UNLOCKED,ut.B.BREADCRUMB_TITAN_UNLOCKED_DIALOGUE),this.enableZoneGoals(!0)}}]),q.start()}enableZoneGoals(q){this._isZoneGoalsActive=q,this._zoneGoalsObject&&(this._zoneGoalsObject.active=q,X.wa5.getActiveScene().getLayer(be.ZONE_GOALS_LAYER_NAME).visible=q)}activateZoneLockCutscene(){this._isZoneLockCutsceneActive=!0}static get highestZoneLevelRequirement(){return be.BUTTONS_CONFIG.map((q=>Vt.X.getLevelRequirement(q.requirementsID))).reduce(((q,K)=>q>K?q:K))}destroy(){var q,K,z;if(this._titanAsset=null,pt.q.instance.game.broadcaster.removeAppListener(Rt.n8.WorldMapDifficultyModeChanged,this),pt.q.instance.game.broadcaster.removeAppListener(Rt.sn.HardModeFtueStepAdvanced,this),this._indicatorTween&&pt.q.instance.game.tweens.remove(this._indicatorTween),this._indicatorTween=null,this._strokeObjects&&this._strokeObjects.length>0)for(let Y=0;Yq.cancel())),this._zoneGoalsObject&&(X.wa5.getActiveScene().removeGameObject(this._zoneGoalsObject),this._destroyZoneGoalsLayerOnClose&&X.wa5.getActiveScene().destroyLayer(be.ZONE_GOALS_LAYER_NAME),this._zoneGoalsObject.destroy(),this._zoneGoalsObject=null),this._prefabObj&&this._prefabObj.destroy(),this._prefabObj=null,this._prefabComponent=null,this._difficultyModeComponent=null,this.fireInterfaceEvent({interfaceName:Bt.B.WorldMap,interfaceType:Ft.Wm.Screen,instanceType:Ut.N.Interface,closeMethod:Ft.Lv.CloseButton}),wt.gz.initialized&&wt.gz.instance.cancelSession(),this.completeZoneLockExperienceSeenBreadcrumb(),this.onWorldMapInitialized.dispose(),super.destroy()}static getTeleportMapTag(q){return q===ft.A_.CRYSTALCAVERNS?pt.q.instance.prodigy.world.getZone(q).questHub:pt.q.instance.prodigy.world.getZone(q).defaultOnFaint}static getZoneData(q){return be.BUTTONS_CONFIG.find((K=>K.zone===q))}static getHighestAvailableZoneData(q){var K,z;const Y=pt.q.instance.prodigy.gameContainer.get("782-c308").highestDifficultyUnlocked,Q=Kt.N.getCoreZonesInOrder(null!==(K=null!=q?q:Y)&&void 0!==K?K:this.DIFFICULTY_MODE),X=J().findLast(Q,(q=>q.meetsRequirements()));if(!X||X.zone===ft.A_.SHIVERCHILLEXPERT)return Q[0];if(X.tag===tt.O.Shiverchill){const q=pt.q.instance.prodigy.world.getZone(Q[0].zone);return(null===(z=q.getQuestState())||void 0===z?void 0:z.ID)>q.finalQuestId?X:Q[0]}return X}static getZoneDataFromDungeon(q){return be.BUTTONS_CONFIG.find((K=>{var z;return(null===(z=K.dungeon)||void 0===z?void 0:z.zone)===q}))}static isZoneLocked(q){const K=be.BUTTONS_CONFIG.find((K=>{var z;return K.zone===q||(null===(z=K.dungeon)||void 0===z?void 0:z.zone)===q}));let z=!1;return z=K?pt.q.instance.prodigy.classModeController.isLockedZone(q)||this.isZoneLockedParams(K,pt.q.instance.prodigy.gameContainer.get("11f-118a")):!Yt.N.getAllTowerData().find((K=>K.towerID===q)),z}static isZoneLockedParams(q,K,z,Y){var Q,Z;const J=null!==(Q=null==Y?void 0:Y.includes(q.nameKey))&&void 0!==Q&&Q,tt=null!==(Z=null==z?void 0:z.includes(q.nameKey))&&void 0!==Z&&Z,et=X.Aq$.isDefined(q.isLocked)&&q.isLocked(),it=be.isZoneFeatureFlagLocked(q),st=!!q.isUnreleased,nt=be.DIFFICULTY_MODE!==q.difficultyMode&&et,at=tt||et||st||nt||this.checkFeatureRequirementsForLock(K,q)||it;return q.isForceLocked=tt,!J&&at}static checkFeatureRequirementsForLock(q,K){return X.Aq$.isDefined(K.requirementsID)&&!q.meetsRequirementsDeprecated(K.requirementsID)}static isZoneFeatureFlagLocked(q){return X.Aq$.isDefined(q.featureFlagLock)&&!pt.q.instance.prodigy.gameContainer.get("f71-42eb").getValue(q.featureFlagLock,!0)}static applyZoneLocking(q,K,z,Y){let Q=this.getZoneData(q);if(X.Aq$.isDefined(Q)||(Q=this.getZoneDataFromDungeon(q)),X.Aq$.isDefined(Q)){if(be.isZoneLockedParams(Q,z)){const q=Q.getLockMessage(),z=Y.getText(Q.nameKey);K.action=()=>pt.q.instance.prodigy.open.message(q,null,Q.icon,z,null,{isModal:!1}),K.configModifiers={modifyProperty:[{element:"actionButton",property:"toggle",value:!1}]}}}else X.VyI.log(`Error getting zone map config for zone ${q}. Zone locking check not applied.`,X.$bb.Warning)}createNotificationIcon(q,K=et._.General_icons_json,z="exclamation",Y=1,Q){var X,Z;if(this._notificationBlockedZones.includes(q.zone))return;const J=q.iconOffset?q.iconOffset:{x:0,y:10},tt=this._indicatorContainer.addChild(pt.q.instance.prodigy.create.sprite(J.x,J.y,K,z));tt.anchor.set(.5,.5);const it=this._prefabComponent.getIconContainer(q.prefabIndex).legacyTransform.group;tt.position.x=tt.position.x+it.getGlobalPosition().x+(null!==(X=null==Q?void 0:Q.x)&&void 0!==X?X:0),tt.position.y=tt.position.y+it.getGlobalPosition().y+(null!==(Z=null==Q?void 0:Q.y)&&void 0!==Z?Z:0),tt.scale.x=Y,tt.scale.y=Y}createSparkles(q,K){const z=K.legacyTransform.group,Y=this.game.add.spine(z.getGlobalPosition().x,z.getGlobalPosition().y,at.Q.Spine_sparkle_worldmap_json);Y.setAnimationByName(0,q,!0),this.dialogueContainer.addChild(Y)}getZoneUnlockAnimationBreadcrumb(q){var K;return[ut.B.FEATURE_ZONE_UNLOCKED_POPUP,`BREADCRUMB_ZONE_UNLOCKED_ANIM_${(null!==(K=q.tag)&&void 0!==K?K:q.zone).toUpperCase()}`]}static setDifficultyMode(q){be.DIFFICULTY_MODE!==q&&(be.DIFFICULTY_MODE=q,pt.q.instance.game.broadcaster.broadcast(Rt.n8.WorldMapDifficultyModeChanged))}static getDifficultyMode(){return be.DIFFICULTY_MODE}static isInDifficultyMode(q){return X.Aq$.isDefined(q)&&q===be.getDifficultyMode()}setDifficultyButtonText(){const q=be.DIFFICULTY_MODE===ot.i.Expert?rt.K_.Expert:be.DIFFICULTY_MODE===ot.i.Hard?rt.K_.Hard:rt.K_.Regular;this._prefabComponent.difficultySelectorButtonText.text=this.localizer.getText(q)}buttonConfigByQuestIndexAndDifficulty(q,K){switch(K){case ot.i.Expert:return be.BUTTONS_CONFIG_BY_QUEST_INDEX_EXPERT_MODE[q];case ot.i.Hard:return be.BUTTONS_CONFIG_BY_QUEST_INDEX_HARD_MODE[q];case ot.i.Regular:return be.BUTTONS_CONFIG_BY_QUEST_INDEX[q];default:X.RQr.logError(null,`Invalid difficulty mode: ${K}`)}}}be.BASE_ASSETS=[at.Q.Spine_sparkle_worldmap_json,et._.General_icons_json,et._.General_map_json,et._.Ui_buttons_json,et._.Ui_cc_adventure_map_json,et._.Ui_icons_json,et._.Ui_store_json,et._.Ui_titan_json,et._.Ui_shipwreck_progress_json,et._.Ui_shiverchill_progress_json,et._.Ui_dialogues_json,et._.Ui_raster_epicsv2_json,et._.Ui_library_json,et._.Ui_guide_hands_json,st.c.Sfx_store_equip,st.c.Sfx_store_purchase,nt.q.Lock_glow_purple,nt.q.Lock_glow_blue,nt.q.Lock_glow_magenta,at.Q.Spine_duels_matchmaking_unlock_json,at.Q.Spine_dragon_isle_unlock_json,at.Q.Spine_dragon_isle_whirlpool_json,nt.q.Vignette_general_map_hard,nt.q.Vignette_general_map_expert,et._.Ui_replay_campaign_json,at.Q.Spine_game_island_json],be.ZONE_GOALS_LAYER_NAME="zonegoals",be.ZONE_GOALS_LAYER_DEPTH=110,be.ZONE_GOALS_STROKE_OBJECT_MAPPING=[Pt.P.Dyno,Pt.P.DragonIsle,Pt.P.Firefly,Pt.P.Shiverchill,Pt.P.Skywatch,Pt.P.Bonfire,Pt.P.Shipwreck,Pt.P.Academy,Pt.P.Firefly,Pt.P.Shiverchill,Pt.P.Skywatch,Pt.P.Bonfire,Pt.P.Shipwreck,Pt.P.Academy,Pt.P.House,Pt.P.Lamplight,Pt.P.Darktower,Pt.P.TowerTown],be.BRIGHTNESS_VALUE_LOCATION=.2,be.BRIGHTNESS_VALUE_BACKGROUND=.5,be.NOTIFICATION_PIN_SPACING=75,be.DIFFICULTY_MODE=ot.i.Regular,be._nextVisitOverrides={},be.BUTTONS_CONFIG=[new fe(de.Ne),new fe(de.kO),new fe(de.Hg),new fe(de.di),new fe(de.Rk),new fe(de.II),new fe(de.y6),new fe(de.fO),new fe(de.F9),new fe(de.DD),new fe(de.Ih),new fe(de.ZS),new fe(de.bk),new fe(de.uO),new fe(de.bI),new fe(de.Sl),new fe(de.OE),new fe(de.BT),new fe(de.IM),new fe(de.kw)],be.BUTTONS_CONFIG_BY_QUEST_INDEX=[be.BUTTONS_CONFIG[0],be.BUTTONS_CONFIG[1],be.BUTTONS_CONFIG[2],be.BUTTONS_CONFIG[4],be.BUTTONS_CONFIG[5]],be.BUTTONS_CONFIG_BY_QUEST_INDEX_HARD_MODE=[be.BUTTONS_CONFIG[13],be.BUTTONS_CONFIG[14],be.BUTTONS_CONFIG[15],be.BUTTONS_CONFIG[16],be.BUTTONS_CONFIG[17]],be.BUTTONS_CONFIG_BY_QUEST_INDEX_EXPERT_MODE=[],(0,Y.Cg)([(0,X.fFd)("11f-118a"),(0,Y.Sn)("design:type",Object)],be.prototype,"featureRequirements",void 0),(0,Y.Cg)([(0,X.fFd)("fa1-8ec9"),(0,Y.Sn)("design:type",Gt.F)],be.prototype,"breadcrumbManager",void 0),(0,Y.Cg)([(0,X.fFd)(X.$Bt.LocalizationService),(0,Y.Sn)("design:type",X.dTp)],be.prototype,"localizer",void 0),(0,Y.Cg)([(0,X.fFd)("ad2-c5b2"),(0,Y.Sn)("design:type",Object)],be.prototype,"playerData",void 0),(0,Y.Cg)([(0,X.fFd)("762-6549"),(0,Y.Sn)("design:type",Ct.J)],be.prototype,"_featuredSpawnService",void 0)},74208:(q,K,z)=>{"use strict";z.d(K,{k:()=>at});var Y=z(8674),Q=z(62459),X=z(97495),Z=z(35120),J=z(73797),tt=z(28152),et=z(96494),it=z(90633),st=z(40392),nt=z(13751);let at=class extends Q.uAl{constructor(){super(...arguments),this._onRegularMode=new Q.HN0,this._onHardMode=new Q.HN0,this._onExpertMode=new Q.HN0}create(){super.create(),Z.q.instance.game.broadcaster.addAppListener(J.n8.WorldMapDifficultyModeChanged,this.onWorldMapDifficultyModeChanged,this)}destroy(){this._onHardMode.dispose(),this._onExpertMode.dispose(),this._onRegularMode.dispose(),Z.q.instance.game.broadcaster.removeAppListener(J.n8.WorldMapDifficultyModeChanged,this),super.destroy()}onWorldMapDifficultyModeChanged(){this.setDifficultyMode(st.i.getDifficultyMode())}setDifficultyMode(q){switch(q){case X.i.Expert:this._breadcrumbManager.isBreadcrumbComplete(it.B.FEATURE_CAMPAIGN_REPLAY,it.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE)||this._breadcrumbManager.completeBreadcrumb(it.B.FEATURE_CAMPAIGN_REPLAY,it.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE),this._onExpertMode.dispatch();break;case X.i.Hard:this._breadcrumbManager.isBreadcrumbComplete(it.B.FEATURE_CAMPAIGN_REPLAY,it.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE)||this._breadcrumbManager.completeBreadcrumb(it.B.FEATURE_CAMPAIGN_REPLAY,it.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE),this._onHardMode.dispatch();break;default:case X.i.Regular:this._onRegularMode.dispatch()}}};(0,Y.Cg)([(0,Q.Pqz)(nt.n),(0,Y.Sn)("design:type",nt.n)],at.prototype,"_worldMapComponent",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"_onRegularMode",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"_onHardMode",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],at.prototype,"_onExpertMode",void 0),(0,Y.Cg)([(0,Q.Cdj)("fa1-8ec9"),(0,Y.Sn)("design:type",et.F)],at.prototype,"_breadcrumbManager",void 0),at=(0,Y.Cg)([(0,Q.EVk)("WorldMapDifficultyMode",tt.Y.ui)],at)},32456:(q,K,z)=>{"use strict";z.d(K,{u:()=>ht});var Y,Q=z(8674),X=z(87490),Z=z(62459),J=z(56942),tt=z(90633),et=z(35120),it=z(28152),st=z(29834),nt=z(30226),at=z(40392),rt=z(3785),ot=z(15989);let ht=Y=class extends Z.uAl{constructor(){super(...arguments),this.onPrepReveal=new Z.HN0,this.onStartReveal=new Z.HN0,this._hasBattledInDuelsStadium=null,this._blockReveal=!1}set blockReveal(q){this._blockReveal=q}create(){super.create(),et.q.instance.prodigy.gameContainer.get("14f-4faa").getBattleStats().then((q=>{this._hasBattledInDuelsStadium=(null==q?void 0:q.duelMatchmakingStats)&&(q.duelMatchmakingStats.losses>0||q.duelMatchmakingStats.wins>0),this.attemptReveal()})).catch((()=>{this._hasBattledInDuelsStadium=!1})),this.applyElementalBoostSpine()}attemptReveal(){var q;if(null===(q=this._worldMapMenuInstanceLockedZoneKeys)||void 0===q?void 0:q.includes(ot.ZS.nameKey))return;if(!at.i.getZoneData("duels_stadium").meetsRequirements()||at.i.isZoneLocked("duels_stadium")||this._blockReveal)return;if(null===this._hasBattledInDuelsStadium)return;const K=et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_ZONE_UNLOCKED_POPUP,tt.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM),z=et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_ZONE_UNLOCKED_POPUP,tt.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER);K||!this._hasBattledInDuelsStadium?(K||this.onPrepReveal.dispatch(),!K&&z&&(this._timeoutId=window.setTimeout((()=>{this.onStartReveal.dispatch()}),500))):this.markRevealComplete()}markRevealComplete(){et.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(tt.B.FEATURE_ZONE_UNLOCKED_POPUP,tt.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM)}applyElementalBoostSpine(){const q=et.q.instance.prodigy.gameContainer.get("9d1-13ea"),K=q.elementalBoost;q.cacheElementalBoost().then((q=>{q!==K&&this.applyElementalBoostSpine()})).catch(Z.RQr.createHandler("Error caching elemental boost"));const z=this._spineGameObject.findComponent(Z.v2j),Q=this._spineGameObject.findComponent(st.j);z&&Q&&(z.setAsset(Y.getDailyElementalBoostSpineGUID()),Q.playAnimation("idle",!0))}static getDailyElementalBoostSpineGUID(){const q=et.q.instance.prodigy.gameContainer.get("9d1-13ea").elementalBoost;return Y.ELEMENTAL_BOOST_WORLD_MAP_SPINE_GUIDS[null!=q?q:X.EElementType.Fire]}destroy(){this.onPrepReveal.dispose(),this.onStartReveal.dispose(),nt.J.isDefined(this._timeoutId)&&window.clearTimeout(this._timeoutId),super.destroy()}};ht.ELEMENTAL_BOOST_WORLD_MAP_SPINE_GUIDS={[X.EElementType.Plant]:J.Q.Spine_duels_matchmaking_plant_boost_json,[X.EElementType.Fire]:J.Q.Spine_duels_matchmaking_fire_boost_json,[X.EElementType.Water]:J.Q.Spine_duels_matchmaking_water_boost_json,[X.EElementType.Storm]:J.Q.Spine_duels_matchmaking_storm_boost_json,[X.EElementType.Ice]:J.Q.Spine_duels_matchmaking_ice_boost_json,[X.EElementType.Physical]:J.Q.Spine_duels_matchmaking_physical_boost_json},(0,Q.Cg)([(0,Z.bbQ)(),(0,Q.Sn)("design:type",Z.HN0)],ht.prototype,"onPrepReveal",void 0),(0,Q.Cg)([(0,Z.bbQ)(),(0,Q.Sn)("design:type",Z.HN0)],ht.prototype,"onStartReveal",void 0),(0,Q.Cg)([(0,Z.ERr)(),(0,Q.Sn)("design:type",Z._mx)],ht.prototype,"_spineGameObject",void 0),(0,Q.Cg)([(0,Z.Cdj)(rt.z.WorldMapMenuInstanceLockedZones),(0,Q.Sn)("design:type",Array)],ht.prototype,"_worldMapMenuInstanceLockedZoneKeys",void 0),ht=Y=(0,Q.Cg)([(0,Z.EVk)("WorldMapDuelsStadium",it.Y.worldMapDuelsStadium)],ht)},13751:(q,K,z)=>{"use strict";z.d(K,{n:()=>Z});var Y=z(8674),Q=z(62459),X=z(49237);let Z=class extends Q.uAl{constructor(){super(...arguments),this._menuContainer=null,this._backgroundContainer=null,this._menuTitle=null,this._closeButton=null,this._mapLocations=[],this._disabledLocations=[],this._lockObjects=[],this._lockTransition=[],this._iconContainer=[],this.onEnableZoneGoals=new Q.HN0}get menuContainer(){return this._menuContainer}get backgroundContainer(){return this._backgroundContainer}get menuTitle(){return this._menuTitle}get closeButton(){return this._closeButton}get difficultySelectorButtonText(){return this._difficultySelectorButtonText}get difficultySelectorButtonNotificationBadge(){return this._difficultySelectorButtonNotificationBadge}getMapLocation(q){return this._mapLocations[q]}getDisabledLocation(q){return this._disabledLocations[q]}getLockObject(q){return this._lockObjects[q]}getLockTransition(q){return this._lockTransition[q]}getIconContainer(q){return this._iconContainer[q]}enableZoneGoals(q){this.onEnableZoneGoals.dispatch(q)}destroy(){this.onEnableZoneGoals.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Z.prototype,"_menuContainer",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Z.prototype,"_backgroundContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],Z.prototype,"_menuTitle",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],Z.prototype,"_closeButton",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],Z.prototype,"difficultySelectorButton",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],Z.prototype,"_difficultySelectorButtonText",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],Z.prototype,"_difficultySelectorButtonNotificationBadge",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],Z.prototype,"_mapLocations",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],Z.prototype,"_disabledLocations",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],Z.prototype,"_lockObjects",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],Z.prototype,"_lockTransition",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],Z.prototype,"_iconContainer",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onEnableZoneGoals",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("WorldMapPrefab")],Z)},3785:(q,K,z)=>{"use strict";var Y;z.d(K,{z:()=>Y}),function(q){q.WorldMapMenuInstanceLockedZones="WorldMapMenuInstanceLockedZones"}(Y||(Y={}))},15989:(q,K,z)=>{"use strict";z.d(K,{F9:()=>$t,IM:()=>Ht,kw:()=>Xt,Rk:()=>Ut,OE:()=>Ft,y6:()=>Wt,bk:()=>Qt,ZS:()=>Yt,di:()=>Vt,Ne:()=>Mt,uO:()=>Nt,DD:()=>Kt,fO:()=>qt,II:()=>Gt,BT:()=>jt,kO:()=>xt,bI:()=>Lt,Hg:()=>kt,Sl:()=>Bt,Ih:()=>zt,NJ:()=>Dt});var Y=z(87490),Q=z(62459),X=z(113),Z=z(44751),J=z(97495),tt=z(2090),et=z(40295),it=z(90633),st=z(73678),nt=z(35120),at=z(29738),rt=z(93867),ot=z(75408),ht=z(73797),ct=z(11624),dt=z(24047),lt=z(46784),ut=z(13093),ft=z(76277),bt=z(31478),pt=z(40392),vt=z(8674),gt=z(95891),mt=z.n(gt),yt=z(99625),_t=z(4903),Et=z(3374),wt=z(41674),Tt=z(84415),St=z(73722),At=z(37251),Ct=z(98252),Ot=z(10312);class It{static launch(){return(0,vt.sH)(this,void 0,void 0,(function*(){const q=yield It.executeHandoff();return nt.q.instance.prodigy.game.broadcaster.broadcast(q?ht.lT.ArcadiaHandoffSuccess:ht.lT.ArcadiaHandoffFailure),q}))}static executeHandoff(){return(0,vt.sH)(this,void 0,void 0,(function*(){var q;const K=nt.q.instance.prodigy.gameContainer,z=K.get("774-4659"),Y=K.get("304-25b9"),X=K.get("ddf-6c82"),Z=K.get("b09-138c"),J=K.get("429-aba2"),tt=Y.getSessionToken();if(!Q.Aq$.isDefined(tt)||0===tt.length)return this.onHandoffResult.dispatch(!1,""),!1;let et;try{et=yield J.sendRequest((new Q.u1k).setBaseURI(X.getCortexRootURL()).setRequestURI("game-cortex-server/v1/coreGame.setSession").setMethod(Q.iXQ.Post).setBody(new Q._A9({clientId:At.X.CLIENT_ID,identityUri:X.getIdentityUrl(),identity_token:null===(q=Z.authHandler)||void 0===q?void 0:q.getIdentityToken(),refresh_token:z.api.getRefreshToken(),profile:{premises:St.V.instance.selectedLocation}})).addResponseInterceptor(Q.XKG.convertToJson))}catch(rt){return this.onHandoffResult.dispatch(!1,""),!1}if(!et.wasSuccessful())return this.onHandoffResult.dispatch(!1,""),!1;const it=et.getData();if(!(null==it?void 0:it.code))return this.onHandoffResult.dispatch(!1,""),!1;yield new Promise((q=>{nt.q.instance.prodigy.gameContainer.get("782-c308").forceSaveCharacter(q)}));const st=`${X.getArcadiaLauncherUrl()}/?launcher=true&code=${it.code}`;this.onHandoffResult.dispatch(!0,st);const at=Ct.pF.isNativeApp();return Ot.I.openWebsite(st,at,!1),!0}))}}It.onHandoffResult=new Q.HN0;var Dt,Rt=z(53661);function Pt(){return(0,vt.sH)(this,void 0,void 0,(function*(){var q,K,z,Y;const Q=nt.q.instance.prodigy.gameContainer.get("782-c308"),X=nt.q.instance.prodigy.gameContainer.get("20f-5f67"),Z=Et.C.getVideosDataProvider(),J=yield Z.getVideosDataByType(_t.s.ArcadiaLink),tt=mt().sample(Object.keys(null!==(K=null===(q=null==J?void 0:J.data)||void 0===q?void 0:q.videos)&&void 0!==K?K:{})),et=null===(z=null==J?void 0:J.data)||void 0===z?void 0:z.videos[null!=tt?tt:""],it=!Tt.a.doesFeatureTimestampExist(Q,_t.s.ArcadiaLink)&&void 0!==tt;nt.q.instance.prodigy.open.prefabMenu({prefabID:yt.l.GoingToArcadiaModal,isModal:!1,injectablePropertiesDictionary:{GO_TO_ARCADIA_MODAL_CALLBACK:()=>(0,vt.sH)(this,void 0,void 0,(function*(){return function(q){return(0,vt.sH)(this,void 0,void 0,(function*(){It.onHandoffResult.addOnce(((K,z)=>{K&&(q.funnel.sendStep(dt.F.ArcadiaLink,"feature",ut.l.FirstExit,ut.T.FirstExit),q.featureCommon.sendCrossPlatformEvent({source_product:"math_game",destination_product:"arcadia",navigation_type:"modal_confirm",entry_surface:"world_map_arcadia_icon",interaction_id:q.featureCommon.getCurrentButtonID("arcadia-zone-button"),instance_type:"navigation",target_url:z,instance_id:q.featureCommon.getCurrentInterfaceID("arcadia_confirmation_modal")}))})),yield It.launch()}))}(X)})),PLAY_ARCADIA_FEATURE_VIDEO:it,[Rt.Ut.VideoId]:tt,[Rt.Ut.SupportedResolutionIds]:null==et?void 0:et.supportedResolutionIds,[Rt.Ut.SizeRatio]:null===(Y=null==J?void 0:J.metadata)||void 0===Y?void 0:Y.sizeRatio},sendEvents:!0,interfaceEventProps:{interfaceName:lt.B.ArcadiaConfirmationModal,interfaceType:wt.Wm.Modal,originType:wt.$N.ButtonClick,originID:X.featureCommon.getCurrentButtonID("arcadia-zone-button")}}),it&&Tt.a.saveTimestampData(_t.s.ArcadiaLink)}))}!function(q){q.FireflyForest="WORLD_FIREFLY_FOREST",q.ShiverchillMountains="WORLD_SHIVERCHILL_MOUNTAINS",q.Skywatch="WORLD_SKYWATCH",q.BonfireSpire="WORLD_BONFIRE_SPIRE",q.ShipwreckShore="WORLD_SHIPWRECK_SHORE",q.TheAcademy="WORLD_THE_ACADEMY",q.DynoDigOasis="WORLD_DYNO_DIG_OASIS",q.DarkTower="WORLD_DARK_TOWER",q.LamplightTown="WORLD_LAMPLIGHT_TOWN",q.YourHouse="WORLD_YOUR_HOUSE",q.TowerTown="TOWER_TOWN_MAP",q.DuelsStadium="DUELS_MATCHMAKING_MAP",q.DragonIsle="DRAGON_ISLE_MAP",q.Arcadia="ARCADIA_MAP"}(Dt||(Dt={}));const Mt={prefabIndex:ct.P.Firefly,nameKey:Dt.FireflyForest,zone:st.A_.FOREST,tag:X.O.Firefly,target:"forest-C8",summaryKey:"WORLD_FIREFLY_FOREST_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:32,titanIconOffset:{x:-70,y:10},ultimatesQuestIconOffset:{x:0,y:10},msgKeys:{1:"WORLD_MAP_FOREST_QUEST_0",2:"WORLD_MAP_FOREST_QUEST_1",3:"WORLD_MAP_FOREST_QUEST_2",4:"WORLD_MAP_FOREST_QUEST_3",5:"WORLD_MAP_FOREST_QUEST_4",6:"WORLD_MAP_FOREST_QUEST_5",7:"WORLD_MAP_FOREST_QUEST_6",8:"WORLD_MAP_FOREST_QUEST_7",9:"WORLD_MAP_FOREST_QUEST_8",10:"WORLD_MAP_FOREST_QUEST_9",11:"WORLD_MAP_FOREST_QUEST_10",12:"WORLD_MAP_FOREST_QUEST_11"},shouldTrackVisits:!0},Nt=Object.assign(Object.assign({},Mt),{prefabIndex:ct.P.FireflyHard,zone:st.A_.FORESTHARD,target:"forest_hard-C8",difficultyMode:J.i.Hard,requirementsID:32}),xt={prefabIndex:ct.P.Shiverchill,nameKey:Dt.ShiverchillMountains,zone:st.A_.SHIVERCHILL,tag:X.O.Shiverchill,target:"shiverchill-A10",summaryKey:"WORLD_SHIVERCHILL_MOUNTAINS_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:33,titanIconOffset:{x:-60,y:-20},ultimatesQuestIconOffset:{x:-70,y:10},msgKeys:{1:"WORLD_MAP_SHIVERCHILL_QUEST_0",2:"WORLD_MAP_SHIVERCHILL_QUEST_1",3:"WORLD_MAP_SHIVERCHILL_QUEST_2",4:"WORLD_MAP_SHIVERCHILL_QUEST_3",5:"WORLD_MAP_SHIVERCHILL_QUEST_4",6:"WORLD_MAP_SHIVERCHILL_QUEST_5",7:"WORLD_MAP_SHIVERCHILL_QUEST_6",8:"WORLD_MAP_SHIVERCHILL_QUEST_7",9:"WORLD_MAP_SHIVERCHILL_QUEST_8",10:"WORLD_MAP_SHIVERCHILL_QUEST_9",11:"WORLD_MAP_SHIVERCHILL_QUEST_10",12:"WORLD_MAP_SHIVERCHILL_QUEST_11",13:"WORLD_MAP_SHIVERCHILL_QUEST_12",14:"WORLD_MAP_SHIVERCHILL_QUEST_13",15:"WORLD_MAP_SHIVERCHILL_QUEST_14"},shouldTrackVisits:!0},Lt=Object.assign(Object.assign({},xt),{isUnreleased:!1,prefabIndex:ct.P.ShiverchillHard,zone:st.A_.SHIVERCHILLHARD,target:"shiverchill_hard-A10",difficultyMode:J.i.Hard,dungeon:void 0,requirementsID:61}),kt={prefabIndex:ct.P.Skywatch,nameKey:Dt.Skywatch,zone:st.A_.SKYWATCH,tag:X.O.Skywatch,target:"skywatch-A1",summaryKey:"WORLD_SKYWATCH_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:34,titanIconOffset:{x:0,y:-65},ultimatesQuestIconOffset:{x:-20,y:20},msgKeys:{1:"WORLD_MAP_SKYWATCH_QUEST_0",2:"WORLD_MAP_SKYWATCH_QUEST_1",3:"WORLD_MAP_SKYWATCH_QUEST_2",4:"WORLD_MAP_SKYWATCH_QUEST_3",5:"WORLD_MAP_SKYWATCH_QUEST_4",6:"WORLD_MAP_SKYWATCH_QUEST_5",7:"WORLD_MAP_SKYWATCH_QUEST_6",8:"WORLD_MAP_SKYWATCH_QUEST_7",9:"WORLD_MAP_SKYWATCH_QUEST_8",10:"WORLD_MAP_SKYWATCH_QUEST_9",11:"WORLD_MAP_SKYWATCH_QUEST_10",12:"WORLD_MAP_SKYWATCH_QUEST_11",13:"WORLD_MAP_SKYWATCH_QUEST_12"},shouldTrackVisits:!0},Bt=Object.assign(Object.assign({},kt),{isUnreleased:!1,prefabIndex:ct.P.SkywatchHard,zone:st.A_.SKYWATCHHARD,target:"skywatch_hard-A1",difficultyMode:J.i.Hard,requirementsID:62}),Ut={prefabIndex:ct.P.Bonfire,nameKey:Dt.BonfireSpire,zone:st.A_.BONFIRE,tag:X.O.Bonfire,target:"bonfire_spire-B1",summaryKey:"WORLD_BONFIRE_SPIRE_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:35,titanIconOffset:{x:-45,y:-20},ultimatesQuestIconOffset:{x:25,y:-20},msgKeys:{1:"WORLD_MAP_BONFIRE_QUEST_0",2:"WORLD_MAP_BONFIRE_QUEST_1",3:"WORLD_MAP_BONFIRE_QUEST_2",4:"WORLD_MAP_BONFIRE_QUEST_3",5:"WORLD_MAP_BONFIRE_QUEST_4",6:"WORLD_MAP_BONFIRE_QUEST_5",7:"WORLD_MAP_BONFIRE_QUEST_6",8:"WORLD_MAP_BONFIRE_QUEST_7",9:"WORLD_MAP_BONFIRE_QUEST_8",10:"WORLD_MAP_BONFIRE_QUEST_9",11:"WORLD_MAP_BONFIRE_QUEST_10",12:"WORLD_MAP_BONFIRE_QUEST_11",13:"WORLD_MAP_BONFIRE_QUEST_12",14:"WORLD_MAP_BONFIRE_QUEST_13"},shouldTrackVisits:!0},Ft=Object.assign(Object.assign({},Ut),{isUnreleased:!1,prefabIndex:ct.P.BonfireHard,zone:st.A_.BONFIREHARD,target:"bonfire_spire_hard-B1",difficultyMode:J.i.Hard,requirementsID:63}),Gt={prefabIndex:ct.P.Shipwreck,nameKey:Dt.ShipwreckShore,zone:st.A_.SHIPWRECK,tag:X.O.Shipwreck,icon:"zone-water",target:"shipwreck_shore-B12",summaryKey:"WORLD_SHIPWRECK_SHORE_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:36,titanIconOffset:{x:-50,y:40},ultimatesQuestIconOffset:{x:20,y:40},msgKeys:{1:"WORLD_MAP_SHIPWRECK_QUEST_0",2:"WORLD_MAP_SHIPWRECK_QUEST_1",3:"WORLD_MAP_SHIPWRECK_QUEST_2",4:"WORLD_MAP_SHIPWRECK_QUEST_3",5:"WORLD_MAP_SHIPWRECK_QUEST_4",6:"WORLD_MAP_SHIPWRECK_QUEST_5",7:"WORLD_MAP_SHIPWRECK_QUEST_6",8:"WORLD_MAP_SHIPWRECK_QUEST_7",9:"WORLD_MAP_SHIPWRECK_QUEST_8",10:"WORLD_MAP_SHIPWRECK_QUEST_9",11:"WORLD_MAP_SHIPWRECK_QUEST_10"},shouldTrackVisits:!0},jt=Object.assign(Object.assign({},Gt),{isUnreleased:!1,prefabIndex:ct.P.ShipwreckHard,zone:st.A_.SHIPWRECKHARD,target:"shipwreck_shore_hard-B12",difficultyMode:J.i.Hard,requirementsID:64}),$t={prefabIndex:ct.P.Academy,nameKey:Dt.TheAcademy,zone:st.A_.ACADEMY,target:"academy-GH3",summaryKey:"WORLD_THE_ACADEMY_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:12,puppetMasterIconOffset:{x:-3,y:-190},showNotificationIcon:()=>nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("key",22)<=0||!nt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(it.B.FEATURE_ACADEMY_TOWERS,it.B.BREADCRUMB_ACADEMY_VISITED)},Ht=Object.assign(Object.assign({},$t),{isUnreleased:!0,prefabIndex:ct.P.AcademyHard,zone:st.A_.ACADEMYHARD,target:"academy_hard-GH3",difficultyMode:J.i.Hard,requirementsID:65}),Vt={prefabIndex:ct.P.Dyno,nameKey:Dt.DynoDigOasis,zone:st.A_.DYNO,target:"dyno-A0",summaryKey:"WORLD_DYNO_DIG_OASIS_DESC",lockKey:"WORLD_MAP_ZONE_LEVEL_LOCKED",classCodeKey:"WORLD_DYNO_DIG_OASIS_CLASS_MODE",classModeFrame:"popup-travel-dinodig",requirementsID:44,hideEvaluationFunc:()=>(0,ft.G)(Z.m).enabled},Wt={prefabIndex:ct.P.Darktower,nameKey:Dt.DarkTower,zone:st.A_.DARKTOWER,target:"darktower-A1",summaryKey:"WORLD_DARK_TOWER_DESC",lockKey:"WORLD_MAP_DARK_TOWER_LEVEL_LOCKED",requirementsID:40},qt={prefabIndex:ct.P.Lamplight,nameKey:Dt.LamplightTown,zone:st.A_.LAMPLIGHT,target:"lamplight-B3",summaryKey:"WORLD_LAMPLIGHT_TOWN_DESC",classCodeKey:"WORLD_LAMPLIGHT_TOWN_CLASS_MODE",classModeFrame:"popup-travel-lamplight",lockKey:"WORLD_MAP_ZONE_LEVEL_LOCKED",requirementsID:37,iconOffset:{x:10,y:-90},ultimatesQuestIconOffset:{x:-70,y:10}},Kt={prefabIndex:ct.P.House,nameKey:Dt.YourHouse,zone:st.A_.HOUSE,target:"house-suburbs",summaryKey:"WORLD_YOUR_HOUSE_DESC",lockKey:"WORLD_MAP_ZONE_LEVEL_LOCKED",classCodeKey:"WORLD_YOUR_HOUSE_CLASS_MODE",classModeFrame:"popup-travel-home",clickEventName:ht.F0.ClickedHouseIcon,requirementsID:38},zt={prefabIndex:ct.P.TowerTown,nameKey:Dt.TowerTown,zone:st.A_.TOWERTOWN,tag:X.O.TowerTown,target:"tower_town-A1",summaryKey:"TOWER_TOWN_MAP_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:41,isLocked:()=>{if(!at.O.isEnglishLocale())return!0;return nt.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("lockTowerTown",!1)},shouldTrackVisits:!0,summaryKeyOverrideFunc:()=>rt.U.isStepComplete(et.B.PuppetMasterDefeated)?"TOWER_TOWN_MAP_DESC_POST_ENDGAME":"TOWER_TOWN_MAP_DESC"},Yt={prefabIndex:ct.P.DuelsStadium,nameKey:Dt.DuelsStadium,zone:"duels_stadium",target:"duels_stadium",requirementsID:54,onClickOverride:()=>{var q;const K=pt.i.BUTTONS_CONFIG.find((q=>"duels_stadium"===q.zone));Y.Util.isDefined(K)?((0,ft.G)(tt.u).enabled||pt.i.DIFFICULTY_MODE===K.difficultyMode||(nt.q.instance.prodigy.gameContainer.get("66f-d9d3").setCurrentDifficulty(J.i.Regular),pt.i.setDifficultyMode(null!==(q=K.difficultyMode)&&void 0!==q?q:J.i.Regular)),ot.d.openDuelsStadiumMenu().catch(Q.RQr.createHandler("Error opening duels stadium menu"))):Q.VyI.log("DuelsStadiumConfig.onClickOverride: Duels Stadium info not found",Q.$bb.Error)}},Qt={prefabIndex:ct.P.DragonIsle,nameKey:Dt.DragonIsle,lockNameKey:"UNKNOWN_QUESTION_MARKS",zone:st.A_.DRAGONISLE,target:"dragon_isle-A1",summaryKey:"WORLD_DRAGON_ISLE_DESC",lockKey:"DRAGON_ISLE_WORLD_MAP_LOCKED",shouldLockForPuppetMasterZoneLockSpell:()=>0===(0,bt.k)(),isLocked:()=>0===(0,bt.k)(),tintLockOnZoneGoals:!0,hideZoneOnLocked:!0},Xt={prefabIndex:ct.P.Arcadia,nameKey:Dt.Arcadia,zone:"arcadia",target:"arcadia",requirementsID:74,difficultyModeAgnostic:!0,onSetupLocation(){(0,ft.G)(Z.m).enabled&&nt.q.instance.prodigy.gameContainer.get("20f-5f67").funnel.sendStep(dt.F.ArcadiaLink,"feature",ut.l.WorldMapSeen,ut.T.WorldMapSeen)},onClickOverride:()=>{Pt().catch(Q.RQr.createHandler("Error handling Arcadia zone button click"))},analyticsClickOverride(){pt.i.sendButtonClickedEvent("arcadia-zone-button","arcadia_confirmation_modal",lt.B.WorldMap,{elementType:"map_screen",interfaceType:"overworld"}),nt.q.instance.prodigy.gameContainer.get("20f-5f67").funnel.sendStep(dt.F.ArcadiaLink,"feature",ut.l.FirstTap,ut.T.FirstTap)},hideEvaluationFunc:()=>!(0,ft.G)(Z.m).enabled}},60654:(q,K,z)=>{"use strict";z.d(K,{i:()=>ot});var Y=z(62459),Q=z(88022),X=z(35120),Z=z(77938),J=z(86051),tt=z(52491),et=z(23082),it=z(30226),st=z(47255),nt=z(64353),at=z(17291),rt=z(95057);class ot extends at.b{constructor(q,K,z,Y){super(q,K,J.K.BOOST_SELECT,{hideMenu:!0,hideContent:!1,hideClose:!0}),this.boosts=z,this.callback=Y,this.setup()}menuSetup(){super.menuSetup();const q=X.q.instance.prodigy.create.panel(this,340,160,13,6);q.add(X.q.instance.prodigy.create.sprite(-15,-15,Q._.General_icons_json,"member")),X.q.instance.prodigy.create.font(q,-310,15,X.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("BOOST_MENU_TITLE"),{align:"center",size:30});for(let K=0;K{"use strict";var Y;z.d(K,{s:()=>Y}),function(q){q[q.Key=0]="Key",q[q.View=1]="View",q[q.Icon=2]="Icon",q[q.IconNoBackground=3]="IconNoBackground",q[q.Store=4]="Store",q[q.Inventory=5]="Inventory",q[q.Card=6]="Card",q[q.Info=7]="Info",q[q.StylistCard=8]="StylistCard",q[q.Buy=9]="Buy",q[q.Equip=10]="Equip",q[q.Item=11]="Item",q[q.GotItem=12]="GotItem",q[q.WizardCostumesMenu=13]="WizardCostumesMenu"}(Y||(Y={}))},25480:(q,K,z)=>{"use strict";z.d(K,{u:()=>ft});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(88022),J=z(35120),tt=z(77938),et=z(13729),it=z(73797),st=z(35084),nt=z(63746),at=z(43531),rt=z(70703),ot=z(30226),ht=z(47255),ct=z(64353),dt=z(35452),lt=z(95057),ut=z(21418);class ft extends dt.a{get content(){return this._content}constructor(q,K,z,Y,X,Z,tt,et=!1,st={},nt){super(q,K,0,0,J.q.instance.prodigy.textureMenu),this.storeName=null,this._itemCards=[],this.enableItemInput=!0,this._equippingItemInProgress=!1,this._deferredPromiseResolve=null,this.game=q,this.items=ft.mergeItems(z),this.onClose=()=>{J.q.instance.game.broadcaster.broadcast(it.n8.GotItemClosed),null==Y||Y()},this.shouldStartDialogueOnCreate=!Q.Aq$.isDefined(X)||X,this.eventType=Z,this.storeName=tt,this.fakeAward=et,this._segmentItemMetadata=st,this._additionalDialogueIds=nt,this.create(),Q.VyI.log("GotItem------------------------------------",Q.$bb.Verbose)}create(){var q;for(super.create();ft._menuIsOpen&&!J.q.instance.prodigy.open.isClosingMenus;)J.q.instance.prodigy.open.menuCloseTopmost(1),0===J.q.instance.prodigy.open.menus.length&&(ft._menuIsOpen=!1);if(ft._menuIsOpen=!0,this.dialogue=J.q.instance.prodigy.dialogue.create(),this._content=J.q.instance.prodigy.create.element(this,0,0),this.overlay=J.q.instance.prodigy.create.element(this,0,0),null===(q=this._additionalDialogueIds)||void 0===q?void 0:q.precedingDialogue)return this.addDialogueToQueue(this._additionalDialogueIds.precedingDialogue),void this.dialogue.start(!0,this.startGotItemSequence.bind(this),!0,!1);this.startGotItemSequence()}startGotItemSequence(){this.addTransparent(),this.shouldStartDialogueOnCreate?(this.getDialogue(),this.dialogue.startDeprecated("noot")):this.getItems(this.items.length,0,!0,void 0)}addDialogueToQueue(q){q.forEach((q=>{this.dialogue.addEvents([{dialogueData:this.dialogue.dataProvider.get(q),blockInput:!0,hideNext:!1}])}))}startDialogue(){Q.Aq$.isDefined(this.dialogue)?this.dialogue.startDeprecated("noot"):Q.VyI.log("GotItem.startDialogue - dialogue was null. Cannot start",Q.$bb.Error)}getItems(q,K,z,Y){var X;const Z=[],J=[];for(let tt=0;tt{var z;ot.J.awardXpToActiveTeam(q.N,null===(z=this._segmentItemMetadata)||void 0===z?void 0:z.source_type,K)}}}for(;J.length>0;){const q=J.splice(0,5);this.dialogue.addEvents([{callback:this.showBatchOfItems.bind(this,q)}]),Y&&this.dialogue.setText(Y)}for(const Q of Z)ot.J.bagItem(Q,this.game,this.eventType,this.storeName,this._segmentItemMetadata)}showBatchOfItems(q){this.clearItems();const K=(this.game.width-200*q.length-10*(q.length-1))/2;q.forEach(((q,z)=>{const Y=K+210*z;this.revealItem(Y,q,400*z)}))}static mergeItems(q){const K=[];let z,Y=0;const Z=[];for(let Q=0;Q"currency"===K.type&&K.ID===q[Q].ID));let Y=0;X.forEach(z,(q=>Y+="N"in q?q.N:1)),q[Q].N=Y,K.push(q[Q]),Z.push(q[Q].ID)}}else K.push(q[Q]);return 0!==Y&&K.unshift({type:"gold",N:Y}),Q.Aq$.isDefined(z)&&K.unshift(z),Q.VyI.log(JSON.stringify(K),Q.$bb.Verbose),K}getDialogue(){if(1===this.items.length)this.getSingleDialogue(this.items[0],0,!0),this.dialogue.setText({callback:this.processClose.bind(this)});else if("memberBox-reward"===this.eventType){const q=this.game.rnd.integerInRange(191,197),K=J.q.instance.prodigy.dialogues.get("noot",q);this.getItems(this.items.length,0,!0,K),this.dialogue.setText({callback:this.processClose.bind(this)})}else{const q=J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);let K=q.getText("GOT_ITEM_YOU_GOT_SOMETHING");Q.Aq$.isDefined(this.eventType)&&("combat-drop"===this.eventType?K=q.getText("GOT_ITEM_AWESOME_STUFF"):"mystery-bag"===this.eventType&&(K=q.getText("GOT_ITEM_YOU_GOT_MYSTERY_BAG"))),this.getItems(this.items.length,0,!0,{text:K,face:2,anim:1}),(()=>{(0,Y.sH)(this,void 0,void 0,(function*(){yield new Promise((q=>{this.dialogue.setText({callback:q})}));for(let q=0;q{this._deferredPromiseResolve=q,this.dialogue.setText({callback:()=>{this._equippingItemInProgress||(q(),this._deferredPromiseResolve=null)}}),this.dialogue.startDeprecated("noot")})))}this._equippingItemInProgress||this.processClose()}))})()}}getSingleDialogue(q,K,z=!0){this.clearItems();const Y=J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,X=J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);if("pet"===q.type)this.getItems(1,K,z,{text:X.getText("GOT_ITEM_YOU_GOT_PET"),face:2,anim:1});else if("dorm"===q.type)this.getItems(1,K,z,{text:X.getText("GOT_ITEM_YOU_GOT_FURNITURE"),face:2,anim:1});else if("dormbg"===q.type)this.getItems(1,K,z,{text:X.getText("GOT_ITEM_MOVED_HOUSE"),face:2,anim:1});else if("gold"===q.type)this.getItems(1,K,z,{text:X.getText("GOT_ITEM_GOLD"),face:2,anim:1});else if("spell"===q.type)this.getItems(1,K,z,{text:X.getText("GOT_ITEM_SPELL"),face:2,anim:1});else if("hat"===q.type||"outfit"===q.type||"weapon"===q.type||"boots"===q.type||"follow"===q.type){let Z=!1;const J=tt.t.getItem(q.type,q.ID).data;!Y.hasMembership()&&(1===J.member&&!Q.Aq$.isDefined(q.isGift)||Q.Aq$.isDefined(J.lockLevel)&&Y.getLevel(){const K=q.findComponent(nt.Z);K.revealOverlay.active=!0;K.revealOverlay.findComponent(rt.x).startTween(void 0,void 0,z+500),this.setItemInput(q),this._itemCards.push(q)})).catch(Q.RQr.createHandler("Error creating an item card")),this.shootStars(z+500,q+100)}setInputEnabled(q){this.enableItemInput=q,this._itemCards.forEach((q=>{this.setItemInput(q)}))}setItemInput(q){q.findComponentInChildren(st.n).InputEnabled=this.enableItemInput}clearItems(){Q.Aq$.isDefined(this._content)&&(this._content.destroy(),this._content=J.q.instance.prodigy.create.element(this,0,0)),Q.Aq$.isDefined(this.overlay)&&(this.overlay.destroy(),this.overlay=J.q.instance.prodigy.create.element(this,0,0))}skip(){Q.Aq$.isDefined(this.overlay)&&this.overlay.destroy(),this.overlay=J.q.instance.prodigy.create.element(this,0,0)}wearItem(q){var K,z;this._equippingItemInProgress=!0;const Y=J.q.instance.prodigy.gameContainer,X=Y.get("ad2-c5b2").player,Z=tt.t.getItem(q.type,q.ID).data;if(X.hasMembership()||1!==Z.member||Q.Aq$.isDefined(q.isGift))if(Q.Aq$.isDefined(Z.lockLevel)&&X.getLevel(){q&&(X.appearanceChanged=!0,J.q.instance.game.broadcaster.broadcast(it.J8.PlayerAppearanceUpdated)),this.handleEquipFlowCompletion()})).catch(Q.RQr.createHandler(`GotItem:wearItem Error equipping item ${q.type}-${q.ID}`));else{const Q={conversionFunnelName:ht.o.FunnelEquipNewLockedItem,conversionFunnelMetadata:`${q.type}-${q.ID}`},X=ct.P.shouldUseUnifiedConversionFlow(ht.o.FunnelUseMemberLockedItem)?lt.R.UnifiedConversionFlow:ot.J.showYouTubeMembershipAd(this.game,!0)?lt.R.Video:lt.R.Static;Y.get("20f-5f67").purchase.sendFunnelStart({type:"Equip-Member-Locked-Item-Reward",category:"Item-Equip",contentId:`${q.type}-${q.ID}`,adType:X,adVersion:ct.P.getAdVersion(ht.o.FunnelUseMemberLockedItem)}),Y.get("20f-5f67").item.sendItemEquipFailedEvent({item_name:null===(z=null===(K=tt.t.getItem(q.type,q.ID))||void 0===K?void 0:K.data)||void 0===z?void 0:z.name,item_type:q.type,item_id:q.ID,fail_reason:"Member Locked"}),J.q.instance.prodigy.open.membershipInfo(this.handleEquipFlowCompletion.bind(this),Q)}}showLevelLockMembershipAd(q){var K,z;if(!J.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasMembership()){const Y=J.q.instance.prodigy.gameContainer.get("20f-5f67"),Q=q.split("-"),X=ct.P.shouldUseUnifiedConversionFlow(ht.o.FunnelEquipLevelLockedItem)?lt.R.UnifiedConversionFlow:ot.J.showYouTubeMembershipAd(this.game,!0)?lt.R.Video:lt.R.Static;Y.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Reward",category:"Item-Equip",contentId:q,adType:X,adVersion:ct.P.getAdVersion(ht.o.FunnelEquipLevelLockedItem)}),Y.item.sendItemEquipFailedEvent({item_name:null===(z=null===(K=tt.t.getItem(Q[0],parseInt(Q[1])))||void 0===K?void 0:K.data)||void 0===z?void 0:z.name,item_type:Q[0],item_id:parseInt(Q[1]),fail_reason:"Member Locked"}),J.q.instance.prodigy.open.membershipInfo(this.handleEquipFlowCompletion.bind(this),{conversionFunnelName:ht.o.FunnelEquipLevelLockedItem})}}handleEquipFlowCompletion(){this._equippingItemInProgress=!1,this._deferredPromiseResolve?(this._deferredPromiseResolve(),this._deferredPromiseResolve=null):this.processClose()}shootStars(q,K){const z=J.q.instance.prodigy.create.element(this.overlay);for(let Y=0;Y<5;Y++){const X=K-100+50*Y;let tt=(this.game.height>>1)-100-150;0===Y||4===Y?tt+=120:1!==Y&&3!==Y||(tt+=50);const et=J.q.instance.prodigy.create.sprite(K,(this.game.height>>1)-100,Z._.General_icons_json,"star");z.add(et),et.anchor.set(.5,.5),et.alpha=0;const it=this.game.add.tween(et,this).to({alpha:.5},1,Q.GS3.Linear.None).delay(q),st=this.game.add.tween(et,this).to({x:X,y:tt,alpha:0},1e3,Q.GS3.Quadratic.Out);it.onTweenComplete.add((()=>{st.start()})),it.start()}}processClose(){var q;if(null===(q=this._additionalDialogueIds)||void 0===q?void 0:q.succeedingDialogue)return this.addDialogueToQueue(this._additionalDialogueIds.succeedingDialogue),this.clearItems(),this.background.destroy(),void this.dialogue.start(!0,this.close.bind(this),!0,!1);ft._menuIsOpen=!1,this.close()}destroy(){ft._menuIsOpen=!1,Q.Aq$.isDefined(this._content)&&this._content.destroy(),Q.Aq$.isDefined(this.overlay)&&this.overlay.destroy(),this._itemCards.forEach((q=>q.destroy())),super.destroy()}}},93375:(q,K,z)=>{"use strict";var Y;z.d(K,{f:()=>Y}),function(q){q.Standard="bfea05f6-bb3d-472d-ad13-2601f2f565e1",q.House="3e8bba0f-fc57-4411-8180-ac8948aa48ed"}(Y||(Y={}))},53661:(q,K,z)=>{"use strict";function Y(q){return q}var Q,X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt,St,At,Ct,Ot,It,Dt,Rt,Pt,Mt,Nt;z.d(K,{$u:()=>At,$z:()=>vt,AP:()=>Rt,Co:()=>St,Dw:()=>Z,Eh:()=>J,F:()=>Y,FK:()=>tt,FO:()=>st,Fm:()=>ot,G9:()=>Ot,ML:()=>dt,OA:()=>lt,OP:()=>ut,R$:()=>rt,Tl:()=>X,Ut:()=>Pt,V8:()=>Tt,Wg:()=>ct,Wr:()=>Mt,XU:()=>gt,YM:()=>Dt,ZE:()=>It,_R:()=>bt,bL:()=>Ct,eV:()=>_t,fM:()=>mt,hi:()=>at,ht:()=>Et,iu:()=>wt,jP:()=>yt,n7:()=>Q,oD:()=>pt,oX:()=>ht,sD:()=>it,sv:()=>Nt,uo:()=>et,xO:()=>ft,zw:()=>nt}),function(q){q.BattleProgressPointsAwarded="BATTLE_PROGRESS_POINTS_AWARDED",q.IFrameClosePostMessage="I_FRAME_CLOSE_POST_MESSAGE",q.IFrameSource="I_FRAME_SOURCE",q.InsufficientResource="INSUFFICIENT_RESOURCE",q.StoreName="STORE_NAME",q.ShowTimeRemaining="SHOW_TIME_REMAINING",q.TimeRemainingMs="TIME_REMAINING_MS",q.TimeRemainingText="TIME_REMAINING_TEXT",q.TitleText="TITLE_TEXT",q.WizardInjectionConfiguredAppearance="APPEARANCE",q.WizardInjectionConfiguredInputEnabled="INPUT_ENABLED"}(Q||(Q={})),function(q){q.Data="ITEM_CARD_DATA",q.OnClick="ITEM_CARD_ON_CLICK"}(X||(X={})),function(q){q.DynamicPromptContentAssetGuid="DYNAMIC_PROMPT_CONTENT_ASSET_GUID"}(Z||(Z={})),function(q){q.MembershipPurchaseConversionFunnelMetadata="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_METADATA",q.MembershipPurchaseConversionFunnelName="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_NAME",q.MembershipPurchaseConversionFunnelStage="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STAGE",q.MembershipPurchaseConversionFunnelStaticOrVideo="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STATIC_OR_VIDEO",q.MembershipPurchaseMemberPanelAdFlavourText="MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FLAVOUR_TEXT",q.MembershipPurchaseMemberPanelAdFrameName="MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FRAME_NAME",q.MembershipPurchaseMemberPanelAdTrackingEvent="MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_TRACKING_EVENT",q.MembershipPurchaseUpgrade="MEMBERSHIP_PURCHASE_UPGRADE"}(J||(J={})),function(q){q.OtpMissingMagicoin="OTP_MISSING_MAGICOIN"}(tt||(tt={})),function(q){q.PostBattleFlowData="POST_BATTLE_FLOW_DATA",q.PostBattleFlowBattleType="POST_BATTLE_FLOW_BATTLE_TYPE",q.PostBattleFlowRewardCardAmountText="POST_BATTLE_FLOW_REWARD_CARD_AMOUNT_TEXT",q.PostBattleFlowRewardCardAssetId="POST_BATTLE_FLOW_REWARD_CARD_ASSET_ID",q.PostBattleFlowRewardCardAssetType="POST_BATTLE_FLOW_REWARD_CARD_ASSET_TYPE",q.PostBattleFlowRewardCardFrame="POST_BATTLE_FLOW_REWARD_CARD_FRAME",q.PostBattleFlowRewardCardIsLocked="POST_BATTLE_FLOW_REWARD_CARD_LOCKED",q.PostBattleFlowRewardCardMemberItem="POST_BATTLE_FLOW_REWARD_CARD_MEMBER_ITEM",q.PostBattleFlowRewardCardMoreThanOneItem="POST_BATTLE_FLOW_REWARD_CARD_MORE_THAN_ONE_ITEM",q.PostBattleFlowRewardsScalingInfo="POST_BATTLE_FLOW_REWARDS_SCALING_INFO",q.PostBattleFlowNumberOfRegularRewardCards="POST_BATTLE_FLOW_NUMBER_OF_REGULAR_REWARD_CARDS",q.PostBattleFlowNumberOfMemberRewardCards="POST_BATTLE_FLOW_NUMBER_OF_MEMBER_REWARD_CARDS",q.PostBattleFlowVictory="POST_BATTLE_FLOW_VICTORY",q.PostBattleFlowWizardWillLevelUp="POST_BATTLE_FLOW_WIZARD_WILL_LEVEL_UP",q.PostBattleFlowWizardEndLevel="POST_BATTLE_FLOW_WIZARD_LEVEL",q.PostBattleFlowContinueCallback="POST_BATTLE_FLOW_CONTINUE_CALLBACK",q.PostBattleFlowMemberChestActive="POST_BATTLE_FLOW_MEMBER_CHEST_ACTIVE",q.PostBattleFlowXpWarningLocalizedTextId="POST_BATTLE_FLOW_XP_WARNING_LOCALIZED_TEXT_ID",q.EnableRescueButtonInput="ENABLE_RESCUE_BUTTON_INPUT",q.PetRescued="PET_RESCUED",q.PostBattleFlowRescueContinueButtonText="RESCUE_CONTINUE_BUTTON_TEXT",q.PostBattleFlowRescueTitle="POST_BATTLE_FLOW_RESCUE_TITLE",q.PostBattleFlowShowClouds="POST_BATTLE_FLOW_SHOW_CLOUDS",q.ShowFreeRescueButton="SHOW_FREE_RESCUE_BUTTON",q.ShowMagicoinButton="SHOW_MAGICOIN_RESCUE_BUTTON",q.ShowMembershipButton="SHOW_MEMBERSHIP_RESCUE_BUTTON"}(et||(et={})),function(q){q.RescuablePetsContainer="RESCUABLE_PETS_CONTAINER"}(it||(it={})),function(q){q.PopupMessageAtlasFrameName="POPUP_MESSAGE_ATLAS_FRAME_NAME",q.PopupMessageAtlasGuid="POPUP_MESSAGE_ATLAS_GUID",q.PopupMessageText="POPUP_MESSAGE_TEXT",q.PopupMessageTextFill="POPUP_MESSAGE_TEXT_FILL",q.PopupMessageTextStroke="POPUP_MESSAGE_TEXT_STROKE",q.PopupMessageTextStrokeThickness="POPUP_MESSAGE_TEXT_STROKE_THICKNESS"}(st||(st={})),function(q){q.UnifiedStoreButton="UNIFIED_STORE_BUTTON",q.UnifiedStoreButtonIconFrame="UNIFIED_STORE_BUTTON_ICON_FRAME",q.UnifiedStoreButtonImageFrame="UNIFIED_STORE_BUTTON_IMAGE_FRAME",q.UnifiedStoreButtonName="UNIFIED_STORE_BUTTON_NAME",q.UnifiedStoreSegmentButtonName="UNIFIED_STORE_SEGMENT_BUTTON_NAME",q.UnifiedStoreSegmentDestinationName="UNIFIED_STORE_SEGMENT_DESTINATION_NAME"}(nt||(nt={})),function(q){q.CanPurchaseSlots="CAN_PURCHASE_SLOTS",q.PetCreatureData="PET_DATA",q.PetSlotMemberBonus="PET_SLOT_MEMBER_BONUS",q.PetSlotMemberMaximumLimit="PET_SLOT_MEMBER_MAXIMUM_LIMIT",q.PurchasePetSlotTransactionId="PURCHASE_PET_SLOT_TRANSACTION_ID",q.PurchasePetSlotCompleteCallback="PURCHASE_PET_SLOT_COMPLETE_CALLBACK",q.SpinePetEvolveBurst="SPINE_PET_EVOLVE_BURST",q.SpinePetEvolveIdle="SPINE_PET_EVOLVE_IDLE",q.YourPetPanelPetId="YOUR_PET_PANEL_PET_ID",q.YourPetPanelPetData="YOUR_PET_PANEL_PET_DATA",q.YourPetPanelPetName="YOUR_PET_PANEL_PET_NAME",q.YourPetPanelPetHasNickname="YOUR_PET_PANEL_PET_HAS_NICKNAME",q.YourPetPanelPetSpecies="YOUR_PET_PANEL_PET_SPECIES",q.YourPetPanelXpBarInfo="YOUR_PET_PANEL_XP_BAR_INFO",q.YourPetElementalBaseFrame="YOUR_PET_ELEMENTAL_BASE_FRAME",q.YourPetPanelEvoLineNumStages="PET_EVO_LINE_NUM_STAGES",q.YourPetPanelEvoLineOwnedStage="PET_EVO_LINE_OWNED_STAGE",q.YourPetPanelEvoLineStage1Id="PET_EVO_LINE_STAGE_1_ID",q.YourPetPanelEvoLineStage1Seen="PET_EVO_LINE_STAGE_1_SEEN",q.YourPetPanelEvoLineStage1Rescued="PET_EVO_LINE_STAGE_1_RESCUED",q.YourPetPanelEvoLineStage2Id="PET_EVO_LINE_STAGE_2_ID",q.YourPetPanelEvoLineStage2Seen="PET_EVO_LINE_STAGE_2_SEEN",q.YourPetPanelEvoLineStage2Rescued="PET_EVO_LINE_STAGE_2_RESCUED",q.YourPetPanelEvoLineStage3Id="PET_EVO_LINE_STAGE_3_ID",q.YourPetPanelEvoLineStage3Seen="PET_EVO_LINE_STAGE_3_SEEN",q.YourPetPanelEvoLineStage3Rescued="PET_EVO_LINE_STAGE_3_RESCUED",q.YourPetPanelEvoLineStage4Id="PET_EVO_LINE_STAGE_4_ID",q.YourPetPanelEvoLineStage4Seen="PET_EVO_LINE_STAGE_4_SEEN",q.YourPetPanelEvoLineStage4Rescued="PET_EVO_LINE_STAGE_4_RESCUED",q.YourPetPanelEvolveButtonWithHC="YOUR_PET_ENABLE_EVOLVE_BUTTON_WITH_HC",q.YourPetPanelShowEvolveButton="YOUR_PET_PANEL_SHOW_EVOLVE_BUTTON",q.YourPetPanelEnableEvolveButton="YOUR_PET_PANEL_ENABLE_EVOLVE_BUTTON",q.YourPetPanelEnableReleaseButton="YOUR_PET_PANEL_ENABLE_RELEASE_BUTTON",q.YourPetPanelEnableAddTeamButton="YOUR_PET_PANEL_ENABLE_ADD_TEAM_BUTTON",q.YourPetPanelAddToTeamFunction="YOUR_PET_PANEL_ADD_TO_TEAM_FUNCTION",q.YourPetPanelReleasePetFunction="YOUR_PET_PANEL_RELEASE_PET_FUNCTION",q.YourPetPanelLevelUpButtonDisabledMessage="YOUR_PET_PANEL_LEVEL_UP_BUTTON_DISABLED_MESSAGE",q.YourPetPanelLevelUpMaxLevelState="YOUR_PET_PANEL_LEVEL_UP_MAX_LEVEL_STATE",q.YourPetPanelEnableLevelUpButton="YOUR_PET_PANEL_ENABLE_LEVEL_UP_BUTTON",q.YourPetPanelLevelUpButtonLevel="YOUR_PET_PANEL_LEVEL_UP_BUTTON_LEVEL",q.YourPetPanelLevelUpButtonCost="YOUR_PET_PANEL_LEVEL_UP_BUTTON_COST",q.YourPetPanelLevelUpButtonCostDifference="YOUR_PET_PANEL_LEVEL_UP_BUTTON_COST_DIFFERENCE",q.YourPetPanelLevelUpButtonCostText="YOUR_PET_PANEL_LEVEL_UP_BUTTON_COST_TEXT",q.YourPetPanelLevelUpMagicoinCost="YOUR_PET_PANEL_LEVEL_UP_MAGICOIN_COST",q.YourPetPanelLevelUpMagicoinCostDifference="YOUR_PET_PANEL_LEVEL_UP_MAGICOIN_COST_DIFFERENCE",q.YourPetPanelLevelUpConversionButtonEnabled="YOUR_PET_PANEL_LEVEL_UP_CONVERSION_BUTTON_ENABLED",q.YourPetPanelShouldShowCurrencyConversion="SHOULD_SHOW_CURRENCY_CONVERSION",q.YourPetPanelPopupMessageManager="YOUR_PET_PANEL_POPUP_MESSAGE_MANAGER",q.YourPetPanelShowLevelUp="YOUR_PET_PANEL_SHOW_LEVEL_UP",q.YourPetPanelShowRightSideButtons="YOUR_PET_PANEL_SHOW_RIGHT_SIDE_BUTTONS",q.YourPetPanelPetGearShowGearPanel="PET_GEAR_SHOW_GEAR_PANEL",q.YourPetPanelPetGearSlotsDisabled="PET_GEAR_SLOTS_DISABLED",q.YourPetPanelDisplayMergeButton="YOUR_PET_PANEL_DISPLAY_MERGE_BUTTON",q.YourPetPanelDisplayMergeRankBadge="YOUR_PET_PANEL_DISPLAY_MERGE_RANK_BADGE",q.YourPetPanelPetMergeRank="YOUR_PET_PANEL_PET_MERGE_RANK",q.YourPetPanelMergeOnClick="YOUR_PET_PANEL_MERGE_ON_CLICK",q.YourPetPanelEnableRemoveFromTeamButton="ENABLE_REMOVE_FROM_TEAM_BUTTON",q.YourPetShowOnYourTeamBadge="SHOW_ON_YOUR_TEAM_BADGE",q.YourPetEnableAddTeamButton="ENABLE_ADD_TEAM_BUTTON",q.YourPetInfoLoreText="PET_INFO_LORE_TEXT",q.YourPetShowEvolveSparkles="SHOW_EVOLVE_SPARKLES",q.YourPetShowEvolveInfo="SHOW_EVOLVE_INFO",q.YourPetEvolveInfoText="EVOLVE_INFO_TEXT",q.YourPetPetEvolveButtonFunction="PET_EVOLVE_BUTTON_FUNCTION",q.YourPetHideEvolutionLine="HIDE_EVOLUTION_LINE"}(at||(at={})),function(q){q.TeamCardData="TEAM_CARD_DATA",q.TeamCardId="TEAM_CARD_ID",q.TeamCardPetGear="TEAM_CARD_PET_GEAR",q.PetRarityText="PET_RARITY_TEXT",q.PetRarity="PET_RARITY"}(rt||(rt={})),function(q){q.ShowRestrictionBadge="SHOW_RESTRICTION_BADGE",q.RestrictionBadgeTest="RESTRICTION_BADGE_TEXT"}(ot||(ot={})),function(q){q.PetCardPetSpawner="PET_SPAWNER"}(ht||(ht={})),function(q){q.RarityGraphic="RARITY_GRAPHIC",q.RarityTint="RARITY_TINT",q.RarityStroke="RARITY_STROKE",q.IconEnabled="RARITY_ICON_ENABLED",q.BackgroundEnabled="RARITY_BACKGROUND_ENABLED"}(ct||(ct={})),function(q){q.Disabled="DISABLED",q.InputEnabled="INPUT_ENABLED",q.Selected="SELECTED",q.PetID="PET_ID",q.PetIconID="PET_ICON_ID",q.PetElementID="PET_ELEMENT_ID",q.PetData="PET_DATA",q.Pet="PET",q.Name="NAME",q.NameAlignH="NAME_ALIGN_H",q.Level="LEVEL",q.MergeRank="MERGE_RANK",q.ReadyToMerge="READY_TO_MERGE",q.IconTint="ICON_TINT",q.ShowUpgrade="SHOW_UPGRADE",q.ShowEvolve="SHOW_EVOLVE",q.ShowStaticEvolve="SHOW_STATIC_EVOLVE",q.ShowOnTeam="SHOW_ON_TEAM",q.ShowGuideHand="SHOW_GUIDE_HAND",q.OverlayText="OVERLAY_TEXT",q.ShowElementIcon="SHOW_ELEMENT_ICON",q.ShowMemberLock="SHOW_MEMBERLOCK_ICON",q.ShowStatIcon="SHOW_STAT_ICON",q.ShowLevelIcon="SHOW_LEVEL_ICON",q.ShowPetGear="SHOW_PET_GEAR",q.ShowMergeRankBadge="SHOW_MERGE_RANK_BADGE",q.ShowTimeRemaining="SHOW_TIME_REMAINING",q.TimeRemainingMs="TIME_REMAINING_MS",q.DisabledIcon="DISABLED_ICON",q.ShowMergeBar="SHOW_MERGE_BAR",q.PetRarity="PET_RARITY",q.PetRarityBackground="PET_BACKROUND_RARITY",q.ApplyGreyScale="APPLY_GREYSCALE",q.ShowUnknownBackground="SHOW_UNKNOWN_BACKGROUND",q.ShowRarityBackground="SHOW_RARITY_BACKGROUND",q.ShowTreasureTrackBadge="SHOW_TREASURE_TRACK_BADGE",q.ShowNotificationBadge="SHOW_NOTIFICATION_BADGE",q.ShowNotificationText="SHOW_NOTIFICATION_TEXT",q.NotificationText="NOTIFICATION_TEXT",q.OnClick="ON_CLICK",q.PetDataList="PET_DATA_LIST",q.WhiteOverlay="WHITE_OVERLAY",q.AlphaMode="ALPHA_MODE",q.ShowSelectionAvailableOutline="SHOW_SELECTION_AVAILABLE_OUTLINE",q.PetBookBackgroundClicked="PET_BOOK_BACKGROUND_CLICKED",q.PetRarityText="PET_RARITY_TEXT",q.ShowPetRarity="SHOW_PET_RARITY",q.ShowCloseButton="SHOW_CLOSE_BUTTON",q.ApplyColorFilter="APPLY_COLOR_FILTER",q.UniquePetsTotal="UNIQUE_PETS_TOTAL",q.IsSelecting="IS_SELECTING"}(dt||(dt={})),function(q){q.IngredientCardSpawner="INGREDIENT_CARD_SPAWNER",q.PetSpineComponent="PET_SPINE",q.MergeRankBadge="MERGE_RANK_BADGE",q.MergeFanfare="MERGE_FANFARE",q.MiddlePanelBacking="MIDDLE_PANEL_BACKING",q.IngredientWidget="INGREDIENT_WIDGET",q.MergeBar="MERGE_BAR"}(lt||(lt={})),function(q){q.MagicoinDisplay="MAGICOIN_DISPLAY",q.GoldDisplay="GOLD_DISPLAY",q.PetInfoPetGearWidget="PET_INFO_PET_GEAR_WIDGET",q.PetLoadingDisplay="PET_INFO_LOADING_DISPLAY",q.LevelUpWidget="LEVEL_UP_WIDGET",q.PetInfoNavigationTabsController="PET_INFO_NAVIGATION_TABS_CONTROLLER",q.PetInfoWidgetController="PET_INFO_WIDGET_CONTROLLER",q.MergeWidgetController="MERGE_WIDGET_CONTROLLER",q.SpellsWidgetController="SPELLS_WIDGET_CONTROLLER",q.EpicCounterWidget="EPIC_COUNTER_WIDGET"}(ut||(ut={})),function(q){q.TeamCardsParent="TEAM_CARDS_PARENT",q.PetCardPetSpawner="PET_CARD_SPAWNER",q.PetBookScrollView="PET_BOOK_SCROLL_VIEW",q.PetBookFlexContainer="PET_BOOK_FLEX_CONTAINER"}(ft||(ft={})),function(q){q.PetGearBonusStatAmountText="PET_GEAR_BONUS_STAT_AMOUNT_TEXT",q.PetGearBonusStatAppliedAmount="PET_GEAR_BONUS_STAT_APPLIED_AMOUNT",q.PetGearBonusStatEnabled="PET_GEAR_BONUS_STAT_ENABLED",q.PetGearBonusStatIcon="PET_GEAR_BONUS_STAT_ICON",q.PetGearBonusStatTextKey="PET_GEAR_BONUS_STAT_TEXT_KEY",q.PetGearCategoryLabel="PET_GEAR_CATEGORY_LABEL",q.PetGearFlavourText="PET_GEAR_FLAVOUR_TEXT",q.PetGearInitialGearDisplay="PET_GEAR_INITIAL_GEAR_DISPLAY",q.PetGearItemData="PET_GEAR_ITEM_DATA",q.PetGearItemEquipped="PET_GEAR_ITEM_EQUIPPED",q.PetGearItemIcon="PET_GEAR_ITEM_ICON",q.PetGearItemInfoDataProvider="PET_GEAR_ITEM_INFO_DATA_PROVIDER",q.PetGearItemMember="PET_GEAR_ITEM_MEMBER",q.PetGearItemName="PET_GEAR_ITEM_NAME",q.PetGearItemNew="PET_GEAR_ITEM_NEW",q.PetGearItemSelected="PET_GEAR_ITEM_SELECTED",q.PetGearItemRarity="PET_GEAR_ITEM_RARITY",q.PetGearItemRarityLabel="PET_GEAR_ITEM_RARITY_LABEL",q.PetGearMenuHatGridManager="PET_GEAR_MENU_HAT_GRID_MANAGER",q.PetGearMenuRelicGridManager="PET_GEAR_MENU_RELIC_GRID_MANAGER",q.PetGearPetIcon="PET_GEAR_PET_ICON",q.PetGearPetPreviewDataProvider="PET_GEAR_PET_PREVIEW_DATA_PROVIDER",q.PetGearPreviewLoadout="PET_GEAR_PREVIEW_LOADOUT",q.PetGearShowPetIcon="PET_GEAR_SHOW_PET_ICON",q.PetGearType="PET_GEAR_TYPE",q.PetGearHeaderEnable="PET_GEAR_HEADER_ENABLE",q.PetGearHeaderClose="PET_GEAR_HEADER_CLOSE"}(bt||(bt={})),function(q){q.OwnedPanelTooltipPetInfoButtonTransform="OWNED_PANEL_TOOLTIP_PET_INFO_BUTTON_TRANSFORM",q.PetGearFtueEnabledInputTransform="PET_GEAR_FTUE_INPUT_TRANSFORM",q.PetGearFtueOverlayGameObject="PET_GEAR_FTUE_OVERLAY_GAMEOBJECT",q.PetGearFtueOverlayEnabled="PET_GEAR_FTUE_OVERLAY_ENABLED"}(pt||(pt={})),function(q){q.PetMergeFtueOverlayEnabled="PET_MERGE_FTUE_OVERLAY_ENABLED",q.PetMergeModalFTUECloseButtonEnabled="PET_MERGE_MODAL_FTUE_CLOSE_BUTTON_ENABLED",q.PetMergeModalFTUEEnabled="PET_MERGE_MODAL_FTUE_ENABLED",q.PetMergeModalCloseButton="PET_MERGE_MODAL_CLOSE_BUTTON"}(vt||(vt={})),function(q){q.CloseCallback="BATTLE_PASS_CLOSE_CALLBACK",q.DestroyBattlePassMenuCallback="BATTLE_PASS_DESTROY_BATTLE_PASS_MENU",q.FocusTabOverride="BATTLE_PASS_FOCUS_TAB_OVERRIDE",q.FocusTierOverride="BATTLE_PASS_FOCUS_TIER_OVERRIDE",q.GoalCompleteToasterDescription="BATTLE_PASS_GOAL_COMPLETE_TOASTER_DESCRIPTION",q.GoalCompleteToasterTitle="BATTLE_PASS_GOAL_COMPLETE_TOASTER_TITLE",q.ItemCardClaimableBorderAtlasGuid="BATTLE_PASS_ITEM_CARD_CLAIMABLE_BORDER_ATLAS_GUID",q.ItemCardClaimableBorderFrameName="BATTLE_PASS_ITEM_CARD_CLAIMABLE_BORDER_FRAME_NAME",q.ItemCardOffSeasonStateAtlasGuid="BATTLE_PASS_ITEM_CARD_OFF_SEASON_STATE_ATLAS_GUID",q.ItemCardOffSeasonStateFrameName="BATTLE_PASS_ITEM_CARD_OFF_SEASON_STATE_FRAME_NAME",q.ItemCardOffSeasonStateIsEnabled="BATTLE_PASS_ITEM_CARD_OFF_SEASON_STATE_IS_ENABLED",q.ItemCardClaimableBorderFrameSizeDelta="BATTLE_PASS_ITEM_CARD_CLAIMABLE_BORDER_FRAME_SIZE_DELTA",q.ItemCardCollectedTextBackingColour="BATTLE_PASS_ITEM_CARD_COLLECTED_TEXT_BACKING_COLOUR",q.ItemCardCollectedTextBackingStrokeColour="BATTLE_PASS_ITEM_CARD_COLLECTED_TEXT_BACKING_STROKE_COLOUR",q.ItemCardCollectedTextColour="BATTLE_PASS_ITEM_CARD_COLLECTED_TEXT_COLOUR",q.ItemCardRarityBackgroundAtlasGuid="BATTLE_PASS_ITEM_CARD_RARITY_BACKGROUND_ATLAS_GUID",q.ItemCardRarityBackgroundFrameName="BATTLE_PASS_ITEM_CARD_RARITY_BACKGROUND_FRAME_NAME",q.ItemRewardId="BATTLE_PASS_ITEM_REWARD_ID",q.ItemTierNumber="BATTLE_PASS_ITEM_TIER_NUMBER",q.ItemRewardType="BATTLE_PASS_ITEM_REWARD_TYPE",q.IsMysteryReward="BATTLE_PASS_IS_MYSTERY_REWARD",q.IsLevelupMemberReward="BATTLE_PASS_IS_LEVELUP_MEMBER_REWARD",q.IsUltimateMemberReward="BATTLE_PASS_IS_ULTIMATE_MEMBER_REWARD",q.MenuBarQuestsTabOpenCallback="BATTLE_PASS_MENU_BAR_QUESTS_TAB_OPEN",q.MenuBarRewardTabOpenCallback="BATTLE_PASS_MENU_BAR_REWARD_TAB_OPEN",q.MythicGuid="BATTLE_PASS_MYTHIC_GUID",q.LevelupMythicGuid="BATTLE_PASS_LEVELUP_MYTHIC_GUID",q.UltimateMemberPetGuid="BATTLE_PASS_ULTIMATE_MEMBER_PET_GUID",q.PremiumTrackIconAtlasGuid="BATTLE_PASS_PREMIUM_TRACK_ICON_ATLAS_GUID",q.PremiumTrackIconFrameName="BATTLE_PASS_PREMIUM_TRACK_ICON_FRAME_NAME",q.PremiumTrackName="BATTLE_PASS_PREMIUM_TRACK_NAME",q.QuestDescription="BATTLE_PASS_QUEST_DESCRIPTION",q.QuestType="BATTLE_PASS_QUEST_TYPE",q.Reward="BATTLE_PASS_REWARD",q.RewardAmount="BATTLE_PASS_REWARD_AMOUNT",q.RewardClaimable="BATTLE_PASS_REWARD_CLAIMABLE",q.RewardClaimed="BATTLE_PASS_REWARD_CLAIMED",q.RewardClaimedAnimationGuid="BATTLE_PASS_REWARD_CLAIMED_ANIMATION_GUID",q.RewardClaimedAnimationName="BATTLE_PASS_REWARD_CLAIMED_ANIMATION_NAME",q.RewardMovementAnimationName="BATTLE_PASS_REWARD_MOVEMENT_ANIMATION_NAME",q.ShouldHighlightCard="BATTLE_PASS_SHOULD_HIGHLIGHT_CARD",q.ShowRewardAmount="BATTLE_PASS_SHOW_REWARD_AMOUNT",q.ShowRewardClaimableAnimation="BATTLE_PASS_SHOW_REWARD_CLAIMABLE_ANIMATION",q.RewardClaimableAnimationName="BATTLE_PASS_REWARD_CLAIMABLE_ANIMATION_NAME",q.TierComplete="BATTLE_PASS_TIER_COMPLETE",q.ToasterNotificationId="BATTLE_PASS_TOASTER_NOTIFICATION_ID",q.MagicoinAmount="MAGICOIN_AMOUNT"}(gt||(gt={})),function(q){q.ChaseItemCorePrefix="CHASE_ITEM_CORE_",q.ChaseItemCoreQuantityPrefix="CHASE_ITEM_CORE_QUANTITY_",q.ChaseItemCoreTextPrefix="CHASE_ITEM_CORE_TEXT_",q.ChaseItemPlusPrefix="CHASE_ITEM_PLUS_",q.ChaseItemPlusQuantityPrefix="CHASE_ITEM_PLUS_QUANTITY_",q.ChaseItemPlusTextPrefix="CHASE_ITEM_PLUS_TEXT_",q.ChaseItemUltraPrefix="CHASE_ITEM_ULTRA_",q.ChaseItemUltraQuantityPrefix="CHASE_ITEM_ULTRA_QUANTITY_",q.ChaseItemUltraTextPrefix="CHASE_ITEM_ULTRA_TEXT_",q.IsPlayerCoreMember="BATTLE_PASS_UPSELL_IS_CORE",q.IsPlayerPlusMember="BATTLE_PASS_UPSELL_IS_PLUS",q.IsPlayerUltraMember="BATTLE_PASS_UPSELL_IS_ULTRA",q.ShowCoreCta="BATTLE_PASS_UPSELL_SHOW_CORE_CTA",q.ShowCorePanel="BATTLE_PASS_UPSELL_SHOW_CORE_PANEL",q.ShowPlusCta="BATTLE_PASS_UPSELL_SHOW_PLUS_CTA",q.ShowPlusPanel="BATTLE_PASS_UPSELL_SHOW_PLUS_PANEL",q.ShowUltraCta="BATTLE_PASS_UPSELL_SHOW_ULTRA_CTA"}(mt||(mt={})),function(q){q.ShouldShowMemberJar="DLC_SHOULD_SHOW_MEMBER_JAR",q.ThresholdPrizePackageFeatureKey="DLC_THRESHOLD_PRIZE_PACKAGE_FEATURE_KEY",q.ThresholdPrizeMembershipTier="DLC_THRESHOLD_PRIZE_MEMBERSHIP_TIER",q.UltimateTrackProgressBarFillData="DLC_ULTIMATE_TRACK_PROGRESS_BAR_FILL_DATA",q.UltimateTrackRewardAvailable="DLC_ULTIMATE_TRACK_REWARD_AVAILABLE",q.UltimateTrackRewardClaimed="DLC_ULTIMATE_TRACK_REWARD_CLAIMED",q.UltimateTrackRewardDisplayConfig="DLC_ULTIMATE_TRACK_REWARD_DISPLAY_CONFIG",q.UltimateTrackTimeRemaining="DLC_ULTIMATE_TRACK_TIME_REMAINING"}(yt||(yt={})),function(q){q.ExitButtonCallback="LOOT_DASH_EXIT_BUTTON_CALLBACK",q.FeatureItemCardAssetId="LOOT_DASH_FEATURED_ITEM_CARD_ASSET_ID",q.FeaturedItemCardAssetType="LOOT_DASH_FEATURED_ITEM_CARD_ASSET_TYPE",q.FeaturedItemCardItemName="LOOT_DASH_FEATURED_ITEM_CARD_ITEM_NAME",q.FeaturedItemCardLocked="LOOT_DASH_FEATURED_ITEM_CARD_LOCKED",q.FeaturedItemConfirmationModalHeaderText="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_HEADER_TEXT",q.FeaturedItemConfirmationModalBodyText="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_BODY_TEXT",q.FeaturedItemConfirmationModalYesButtonCallback="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_YES_BUTTON_CALLBACK",q.FeaturedItemConfirmationModalNoButtonCallback="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_NO_BUTTON_CALLBACK",q.MatchBoardPieceHeadTexture="LOOT_DASH_MATCH_BOARD_PIECE_HEAD_TEXTURE",q.MatchBoardPieceName="LOOT_DASH_MATCH_PIECE_NAME",q.MatchFinishedButtonCallback="LOOT_DASH_MATCH_FINISHED_BUTTON_CALLBACK",q.MatchFinishedFireworkAnimationName="LOOT_DASH_MATCH_FINISHED_FIREWORK_ANIMATION_NAME",q.MatchFinishedInfoText="LOOT_DASH_MATCH_FINISHED_INFO_TEXT",q.MatchFinishedLootBagAmountText="LOOT_DASH_MATCH_FINISHED_LOOT_BAG_AMOUNT_TEXT",q.MatchFinishedMatchCompleted="LOOT_DASH_MATCH_FINISHED_MATCH_COMPLETED",q.MatchFinishedPlacement="LOOT_DASH_MATCH_FINISHED_PLACEMENT",q.MatchFinishedPlacementSuffix="LOOT_DASH_MATCH_FINISHED_PLACEMENT_SUFFIX",q.MatchFinishedPlacementReplacementText="LOOT_DASH_MATCH_FINISHED_PLACEMENT_REPLACEMENT_TEXT",q.MatchFinishedRewardsEarned="LOOT_DASH_MATCH_FINISHED_REWARDS_EARNED",q.MatchFinishedShowNumberedPlacement="LOOT_DASH_MATCH_FINISHED_SHOW_NUMBERED_PLACEMENT",q.NoMoreRevivesBannerTextCore="LOOT_DASH_NO_MORE_REVIVES_BANNER_TEXT_CORE",q.NoMoreRevivesBannerTextPlus="LOOT_DASH_NO_MORE_REVIVES_BANNER_TEXT_PLUS",q.NoMoreRevivesBannerTextUltra="LOOT_DASH_NO_MORE_REVIVES_BANNER_TEXT_ULTRA",q.NoMoreRevivesReviveAmountTextCore="LOOT_DASH_NO_MORE_REVIVES_REVIVE_AMOUNT_TEXT_CORE",q.NoMoreRevivesReviveAmountTextPlusAndUltra="LOOT_DASH_NO_MORE_REVIVES_REVIVE_AMOUNT_TEXT_PLUS_AND_ULTRA",q.NoMoreRevivesShowCoreAndPlus="LOOT_DASH_NO_MORE_REVIVES_SHOW_CORE_AND_PLUS",q.NoMoreRevivesShowCoreAndUltra="LOOT_DASH_NO_MORE_REVIVES_SHOW_CORE_AND_ULTRA",q.NoMoreRevivesShowPlusOnly="LOOT_DASH_NO_MORE_REVIVES_SHOW_PLUS_ONLY",q.NoMoreRevivesShowUltraOnly="LOOT_DASH_NO_MORE_REVIVES_SHOW_ULTRA_ONLY",q.NoMoreRevivesLineOneText="LOOT_DASH_NO_MORE_REVIVES_LINE_ONE_TEXT",q.NoMoreRevivesLineTwoText="LOOT_DASH_NO_MORE_REVIVES_LINE_TWO_TEXT",q.StageCompleted="LOOT_DASH_STAGE_COMPLETED",q.StageCurrent="LOOT_DASH_STAGE_CURRENT",q.StageFuture="LOOT_DASH_STAGE_FUTURE",q.StageInfoWidgetActionProgress="LOOT_DASH_STAGE_INFO_WIDGET_ACTION_PROGRESS",q.StageInfoWidgetActionTitle="LOOT_DASH_STAGE_INFO_WIDGET_ACTION_TITLE",q.StageInfoWidgetCurrentStageIcon="LOOT_DASH_STAGE_INFO_WIDGET_CURRENT_STAGE_ICON",q.StageInfoWidgetNextStageIcon="LOOT_DASH_STAGE_INFO_WIDGET_NEXT_STAGE_ICON",q.StageInfoWidgetShowFinishLine="LOOT_DASH_STAGE_INFO_WIDGET_SHOW_FINISH_LINE",q.ShowStageIcon="LOOT_DASH_SHOW_STAGE_ICON",q.StageType="LOOT_DASH_STAGE_TYPE",q.StageHasMultiplePlayers="LOOT_DASH_STAGE_HAS_MULTIPLE_PLAYERS"}(_t||(_t={})),function(q){q.SegmentedOfferCurrentOfferStatus="SEGMENTED_OFFERS_CURRENT_OFFER_STATUS",q.SegmentedOffersEnding="SEGMENTED_OFFERS_ENDING",q.SegmentedOffersItemIcon="OFFER_ITEM_ICON_",q.SegmentedOffersItemId="OFFER_ITEM_ID_",q.SegmentedOffersItemName="OFFER_ITEM_NAME_",q.SegmentedOffersItemQuantity="OFFER_ITEM_QUANTITY_",q.SegmentedOffersRejected="SEGMENTED_OFFERS_REJECTED",q.SegmentedOffersTimeRemainingMS="SEGMENTED_OFFERS_TIME_REMAINING",q.SegmentedOffersFunnelAdvancedCTA="SEGMENTED_OFFERS_FUNNEL_ADVANCED_CTA",q.SegmentedOffersFunnelAdvancedGotMembership="SEGMENTED_OFFERS_FUNNEL_ADVANCED_GOT_MEMBERSHIP",q.SegmentedOffersModalInjectableProperties="SEGMENTED_OFFERS_MODAL_INJECTABLE_PROPERTIES"}(Et||(Et={})),function(q){q.ClassCodeSubmitSuccess="CLASS_CODE_SUBMIT_SUCCESS"}(wt||(wt={})),function(q){q.LoginDetailsUsername="LoginDetailsUsername",q.LoginDetailsPassword="LoginDetailsPassword"}(Tt||(Tt={})),function(q){q.CurrencyId="CURRENCY_ID",q.FallbackRewards="FALLBACK_REWARDS",q.InstanceType="INSTANCE_TYPE",q.WeightedRewards="WEIGHTED_REWARDS",q.RespinCost="RESPIN_COST"}(St||(St={})),function(q){q.CurrencyID="CURRENCY_DISPLAY_ID",q.CurrencyAmount="CURRENCY_DISPLAY_AMOUNT"}(At||(At={})),function(q){q.CanRerollOpponents="CAN_REROLL_OPPONENTS",q.HeaderTitle="HEADER_TITLE",q.MenuInterfaceName="MENU_INTERFACE_NAME",q.OnBack="ON_BACK",q.OnClose="ON_CLOSE",q.OpponentsRerollCost="OPPONENTS_REROLL_COST",q.RiftCurrencyId="RIFT_CURRENCY_ID",q.RiftKeyAmount="RIFT_KEY_AMOUNT",q.RiftKeyIcon="RIFT_KEY_ICON",q.ShowHeaderText="SHOW_HEADER_TEXT",q.ShowMagicoin="SHOW_MAGICOIN_COUNT",q.ShowMagicoinText="SHOW_MAGICOIN_TEXT",q.ShowRerollMagicoinCost="SHOW_REROLL_MC_COST",q.ShowRerollMemberIcon="SHOW_REROLL_MEMBER_ICON",q.ShowRiftKeys="SHOW_RIFT_KEYS",q.ShowTooltip="SHOW_TOOLTIP",q.StoreEnabled="STORE_ENABLED",q.StoreKey="STORE_KEY",q.BackgroundHex="BACKGROUND_HEX",q.DiamondsHex="DIAMONDS_HEX",q.DiamondsAlpha="DIAMONDS_ALPHA",q.GradientHex="GRADIENT_HEX"}(Ct||(Ct={})),function(q){q.OpenRiftsPortalCallback="OPEN_RIFTS_PORTAL_CALLBACK",q.SelectedRiftId="SELECTED_RIFT_ID"}(Ot||(Ot={})),function(q){q.Title="TITLE",q.Message="MESSAGE",q.CTAButtonEnabled="CTA_BUTTON_ENABLED",q.CTAButtonFunction="CTA_BUTTON_FUNCTION"}(It||(It={})),function(q){q.BodyText="DYNAMIC_STORE_BODY_TEXT",q.HeaderText="DYNAMIC_STORE_HEADER_TEXT",q.OfferData="DYNAMIC_STORE_OFFER_DATA",q.OfferReadById="DYNAMIC_STORE_OFFER_READ_BY_ID",q.ShowTimer="DYNAMIC_STORE_SHOW_TIMER",q.StoreKey="DYNAMIC_STORE_STORE_KEY"}(Dt||(Dt={})),function(q){q.ItemCardData="STORE_ITEM_CARD_DATA",q.ItemCardIsNew="STORE_ITEM_CARD_IS_NEW"}(Rt||(Rt={})),function(q){q.FunnelStartTrigger="VIDEO_FUNNEL_START_TRIGGER",q.SizeRatio="VIDEO_SIZE_RATIO",q.SupportedResolutionIds="VIDEO_SUPPORTED_RESOLUTION_IDS",q.VideoAtSchool="VIDEO_AT_SCHOOL",q.VideoCountdownEnabled="VIDEO_COUNTDOWN_ENABLED",q.VideoEventType="VIDEO_EVENT_TYPE",q.VideoId="VIDEO_ID",q.VideoInstanceType="VIDEO_INSTANCE_TYPE",q.VideoMember="VIDEO_MEMBER"}(Pt||(Pt={})),function(q){q.FollowupPrefabCloseSignal="FOLLOWUP_PREFAB_CLOSE_SIGNAL",q.HomeImageGuid="HOME_IMAGE_GUID",q.MemberFollowupPrefabGuid="MEMBER_FOLLOWUP_PREFAB_GUID",q.MemberImageGuid="MEMBER_IMAGE_GUID",q.OriginId="ORIGIN_ID",q.SchoolImageGuid="SCHOOL_IMAGE_GUID",q.TargetMapTag="TARGET_MAP_TAG",q.TargetPosition="TARGET_POSITION"}(Mt||(Mt={})),function(q){q.FtueMainCostumeId="MAIN_COSTUME_ID",q.FtueMainCostumeName="MAIN_COSTUME_NAME",q.FtueAdditionalCostumes="ADDITIONAL_COSTUMES",q.FtuePopupNextButtonCallback="FTUE_POPUP_NEXT_BUTTON_CALLBACK"}(Nt||(Nt={}))},88217:(q,K,z)=>{"use strict";z.d(K,{B:()=>tt});var Y=z(8674),Q=z(62459),X=z(15821),Z=z(11647),J=z(61917);let tt=class extends((0,Z.o)(J.d)){constructor(){super(...arguments),this._depth=100}get transform(){var q;return X.A.isDefined(this._transform)||(this._transform=null!==(q=this.gameObject.findComponent(Q.XVE))&&void 0!==q?q:this.gameObject.addComponent(Q.XVE)),this._transform}setContentsOffset(q){this.gameObject.children.forEach((K=>{K.transform.setPositionY(q)}))}destroy(){this.gameObject.children.forEach((q=>{q.transform.setPositionY(0)})),super.destroy()}};(0,Y.Cg)([(0,Q.Pqz)(Q.XVE),(0,Y.Sn)("design:type",Q.XVE)],tt.prototype,"_transform",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("StickyScrollItem")],tt)},47878:(q,K,z)=>{"use strict";z.d(K,{p:()=>J});var Y=z(8674),Q=z(62459),X=z(49237),Z=z(28152);let J=class extends Q.uAl{};(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],J.prototype,"leaderboardsButton",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],J.prototype,"battleRequestsButton",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],J.prototype,"awardsButton",void 0),(0,Y.Cg)([(0,Q.MnK)(X.$),(0,Y.Sn)("design:type",X.$)],J.prototype,"badgesButton",void 0),J=(0,Y.Cg)([(0,Q.EVk)("SocialMenuHeader",Z.Y.ui)],J)},28832:(q,K,z)=>{"use strict";z.d(K,{O5:()=>nt});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(91207),tt=z(77938),et=z(10674),it=z(28152);!function(q){q.Weapon="weapon",q.Hat="hat",q.Outfit="outfit",q.Relic="spellRelic",q.Boots="boots",q.Mount="mount",q.Buddy="follow",q.PetHat="petHat",q.PetRelic="petRelic"}(Y||(Y={}));const st={[Y.Weapon]:"948ea863-fc01-4492-bba4-6c4c918bf334",[Y.Hat]:"138d6852-a1e1-42c5-9457-bdef12678314",[Y.Outfit]:"adfa2804-c0df-4158-8ea8-bf69d1715b6d",[Y.Relic]:"c6a5ccbb-7c55-49ba-bf5c-eeec195008d9",[Y.Boots]:"0b178835-e2fc-432a-9728-b6fbfea6091e",[Y.Mount]:"09344c5c-9c34-421b-842c-ad3d02861879",[Y.Buddy]:"82322c96-1611-479f-abb5-9bf8e7d3b65e",[Y.PetHat]:"8adc1ca8-607e-43fe-98a3-e2d0a6137e3c",[Y.PetRelic]:"b8caf254-84cc-4c09-8e19-6064377ca580"};let nt=class extends X.uAl{constructor(){super(...arguments),this._rarityBackgrounds=[]}postCreate(){super.postCreate(),this._activeRarityBackground=this._unequippedBackground}setupPlayerGear(q){this._activeRarityBackground.active=!1;const K=q.getEquipment(this._equipmentType);K?tt.t.secureGetItem(this._equipmentType,K).then((q=>{var K;this._activeRarityBackground=this._rarityBackgrounds[null!==(K=q.data.rarity)&&void 0!==K?K:0],this._activeRarityBackground.active=!0;const z=J.E.getIconForType(q.type,q.ID);this.loadGearIcon(z)})).catch(X.RQr.createHandler(`Error fetching item for equipment type ${this._equipmentType} with ID ${K}:`)):this.setupUnequippedItem()}setupPetGear(q){var K,z;this._activeRarityBackground.active=!1;const Q=this._equipmentType===Y.PetHat?null!==(K=null==q?void 0:q.petHat)&&void 0!==K?K:null:null!==(z=null==q?void 0:q.petRelic)&&void 0!==z?z:null;Q?this._gearManager.getPetGearByUniqueId(Q).then((q=>{tt.t.secureGetItem(q.data.asset.type,q.data.asset.id).then((q=>{var K;this._rarityBackgrounds[null!==(K=q.data.rarity)&&void 0!==K?K:0].active=!0;const z=J.E.getIconForType(q.type,q.ID);this.loadGearIcon(z)})).catch(X.RQr.createHandler(`Error fetching item for equipment type ${this._equipmentType} with ID ${q.data.asset.id}:`))})).catch(X.RQr.createHandler(`Error fetching pet gear item for type ${this._equipmentType} with ID ${Q}:`)):this.setupUnequippedItem()}setupUnequippedItem(){return(0,Q.sH)(this,void 0,void 0,(function*(){this._rarityBackgrounds.forEach((q=>{q.active=!1})),this._activeRarityBackground=this._unequippedBackground,this._activeRarityBackground.active=!0,yield this.loadGearIcon(st[this._equipmentType])}))}loadGearIcon(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return Z.q.instance.prodigy.gameContainer.get(X.t5G.AssetLoader).loadAssets([q]).then((()=>{this._gearIcon.updateAsset(q)}))}))}};(0,Q.Cg)([(0,X.gfw)(Y),(0,Q.Sn)("design:type",String)],nt.prototype,"_equipmentType",void 0),(0,Q.Cg)([(0,X.SZi)(),(0,X.ERr)(),(0,Q.Sn)("design:type",Array)],nt.prototype,"_rarityBackgrounds",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],nt.prototype,"_unequippedBackground",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],nt.prototype,"_gearIcon",void 0),(0,Q.Cg)([(0,X.Cdj)("9cf-c09f"),(0,Q.Sn)("design:type",et.q)],nt.prototype,"_gearManager",void 0),nt=(0,Q.Cg)([(0,X.EVk)("GearSlot",it.Y.uiPetMenu)],nt)},29853:(q,K,z)=>{"use strict";z.d(K,{J:()=>ct});var Y=z(8674),Q=z(62459),X=z(21574),Z=z(17446),J=z(77938),tt=z(28152),et=z(22023),it=z(80060),st=z(30226),nt=z(53661),at=z(53671),rt=z(11647),ot=z(28832),ht=z(52211);let ct=class extends((0,rt.o)(ht.V)){constructor(){super(...arguments),this._gearSlots=[],this.onPetInfoClicked=this.createTidySignal()}setupCard(){var q,K,z;const Y=et.P8.canPlayerAccessPetMergeFeature(this._activePlayer),Q=et.P8.canPetAccessMergeRanks(this.petData.ID);if(this._mergeBar.GameObject.active=Y&&Q,this._mergeUnlockText.GameObject.active=!Y&&Q,Q)if(Y)this._mergeBar.setup(this.petData,!0);else{const K=null!==(q=X.g.config.minimumPlayerLevel)&&void 0!==q?q:0;this._mergeUnlockText.text=this._localizer.getText("PET_BOOK_UNLOCK_MERGE",K)}const tt=J.t.getItem("pet",this.petData.ID),at=null!==(z=null===(K=tt.data)||void 0===K?void 0:K.rarity)&&void 0!==z?z:Z.E.Common;this.updateGearSlots(tt),it.d.updateInjectedValues(this.gameObject,{[nt.R$.PetRarityText]:st.J.convertRarityToText(at),[nt.R$.PetRarity]:at})}updateCard(){this.petData&&this._mergeBar.setup(this.petData,!0),this.updateCardCreature()}updateCardCreature(){var q,K;if(super.updateCardCreature(),this.setCardToDefaultState(),this.petData){const z=J.t.getItem("pet",this.petData.ID),Y=null!==(K=null===(q=z.data)||void 0===q?void 0:q.rarity)&&void 0!==K?K:Z.E.Common;it.d.updateInjectedValues(this.gameObject,{[nt.R$.PetRarityText]:st.J.convertRarityToText(Y),[nt.R$.PetRarity]:Y}),this.updateGearSlots(z)}}updateGearSlots(q){var K;const z=(null===(K=q.data.gearEquipSlots)||void 0===K?void 0:K.length)>0;this._gearContainer.active=z,z&&this._gearSlots.forEach((q=>{q.setupPetGear(this.petData.gear)}))}onCardClicked(){this.onPetCardClicked.dispatch(this)}setCardToDefaultState(){this._petSelectionContainer.active=!1,this._emptyCardContainer.active=!this.hasData(),this._cardContainer.active=this.hasData(),this._inputButton.inputEnabled=!0,this._infoButton.active=this.hasData()}setCardToSelectionState(q,K,z=!1){if(this._inputButton.inputEnabled=!0,z)this._selectionText.text=this._localizer.getText("PET_BOOK_CLICK_TO_ADD"),this._petSelectionContainer.active=!0,this._removeButton.active=!1;else if(q)this._removeButton.active=this.hasData(),this._petSelectionContainer.active=!0,this._selectionText.text=this._localizer.getText("PET_BOOK_CHOOSE_PET"),this._infoButton.active=this.hasData();else{if(!K||!this.hasData())return void(this._inputButton.inputEnabled=!1);this._selectionText.text=this._localizer.getText("PET_BOOK_SWAP"),this._petSelectionContainer.active=!0,this._removeButton.active=!1}}onInfoButtonClicked(){const q=J.t.getItem("pet",this.petData.ID);this.onPetInfoClicked.dispatch(q,this.petData)}setName(){const q=J.t.getItem("pet",this.petData.ID);this._nameText.text=et.P8.getPetDisplayName(q,this.petData,15)}setLevel(){const q=et.P8.getPetLevel(this.petData);this._levelText.text=q.toString()}};(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_emptyCardContainer",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_cardContainer",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_petSelectionContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ct.prototype,"_selectionText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ct.prototype,"_mergeUnlockText",void 0),(0,Y.Cg)([(0,Q.MnK)(at.J),(0,Y.Sn)("design:type",at.J)],ct.prototype,"_mergeBar",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.MnK)(ot.O5),(0,Y.Sn)("design:type",Array)],ct.prototype,"_gearSlots",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ct.prototype,"_removeButton",void 0),(0,Y.Cg)([(0,Q.Cdj)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],ct.prototype,"_localizer",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.Eci),(0,Y.Sn)("design:type",Q.Eci)],ct.prototype,"_inputButton",void 0),ct=(0,Y.Cg)([(0,Q.EVk)("PetTeamCard",tt.Y.uiPetMenu)],ct)},5679:(q,K,z)=>{"use strict";z.d(K,{t:()=>ht});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(15485),tt=z(41674),et=z(67665),it=z(13956),st=z(47734),nt=z(94325),at=z(11647),rt=z(28832),ot=z(52211);let ht=class extends((0,at.o)(ot.V)){setupCard(){this._gearContainer.findComponentsInChildren(rt.O5).forEach((q=>{q.setupPlayerGear(this._activePlayer.equipment)})),this._activePlayer.onEquipmentChange.add(this.updateCard,this)}updateCard(){this._gearContainer.findComponentsInChildren(rt.O5).forEach((q=>{q.setupPlayerGear(this._activePlayer.equipment)})),this._playerSpineAppearanceSelector.loadPlayerAppearance()}onCardClicked(){super.onCardClicked();const q=X.q.instance.prodigy.open.backpack();q&&this._inventoryScrollView&&(this._inventoryScrollView.lockScrollWheel=!0,this._inventoryScrollView.contentDraggingEnabled=!1,q.onDestroy.add((()=>{this._inventoryScrollView.lockScrollWheel=!1,this._inventoryScrollView.contentDraggingEnabled=!0}),this)),this._segment.featureCommon.sendButtonEvent({buttonName:J.k.WizardBackpackButton,interfaceName:"wizard_backpack_window",interfaceType:tt.Wm.Menu,destinationName:"wizard_backpack_window"})}destroy(){this._activePlayer.onEquipmentChange.remove(this.updateCard,this)}setName(){var q;this._nameText.text=null===(q=this._activePlayer)||void 0===q?void 0:q.getName()}setLevel(){const q=this._activePlayer.getLevel()+this._activePlayer.getChargedLevel();this._levelText.text=q.toString()}};(0,Y.Cg)([(0,Q.MnK)(st.z),(0,Y.Sn)("design:type",st.z)],ht.prototype,"_playerSpineAppearanceSelector",void 0),(0,Y.Cg)([(0,Q.MnK)(nt.C),(0,Y.Sn)("design:type",nt.C)],ht.prototype,"_inventoryScrollView",void 0),(0,Y.Cg)([(0,it.b)("20f-5f67"),(0,Y.Sn)("design:type",et.Y)],ht.prototype,"_segment",void 0),ht=(0,Y.Cg)([(0,Q.EVk)("PlayerTeamCard",Z.Y.uiPetMenu)],ht)},52211:(q,K,z)=>{"use strict";z.d(K,{V:()=>at});var Y=z(8674),Q=z(62459),X=z(37773),Z=z(65732),J=z(97317),tt=z(13956),et=z(7351),it=z(80060),st=z(11647),nt=z(53661);class at extends((0,st.o)(Q.uAl)){constructor(){super(...arguments),this.onPetCardClicked=this.createTidySignal(),this.onPetRemoved=this.createTidySignal(),this._petData=null,this._cardPosition=-1}get petData(){return this._petData}get cardPosition(){return this._cardPosition}setup(q){this._kennel=this._activePlayer.kennel,this._cardPosition=q,this.updateCardCreature()}updateCardCreature(){const q=this._kennel.getTeamPosition(this._cardPosition);if(!!!q){this._petData=null;const q={[nt.hi.PetCreatureData]:this.petData,[nt.R$.TeamCardId]:null,[nt.R$.TeamCardPetGear]:null};return void it.d.updateInjectedValues(this.gameObject,q)}const K={},z=this.getInjectedValue(nt.R$.TeamCardId),Y=Q.Aq$.isDefined(this._petData)&&this._petData.uniqueID===q.data.uniqueID&&z!==q.getID();if(this.petData&&this._petData.uniqueID===q.data.uniqueID&&!Y||(this._petData=q.data,this.setupCard(),K[nt.R$.TeamCardId]=this.petData.ID),this.setName(),this.setLevel(),K[nt.hi.PetCreatureData]=this.petData,K[nt.R$.TeamCardPetGear]=this.petData.gear,Q.Aq$.isDefined(this.petData.team)){const q=this._activePlayer.getChargedLevel();K[Z.E.ChargedCreatureEffectTier]=X.e.getChargedLevelTierFromLevel(q),K[Z.E.ChargedCreatureEffectDisplayType]=q>0?J.X$.IDLE:J.X$.HIDDEN}it.d.updateInjectedValues(this.gameObject,K)}hasData(){return!!this.petData}onRemoveButtonClicked(){this.onPetRemoved.dispatch(this.petData,this.cardPosition)}destroy(){this.onPetRemoved.dispose(),this.onPetCardClicked.dispose()}onCardClicked(){this.onPetCardClicked.dispatch(this)}}(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],at.prototype,"_gearContainer",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],at.prototype,"_nameText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],at.prototype,"_levelText",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],at.prototype,"_infoButton",void 0),(0,Y.Cg)([(0,tt.b)("782-c308"),(0,Y.Sn)("design:type",et.W)],at.prototype,"_activePlayer",void 0)},53671:(q,K,z)=>{"use strict";z.d(K,{J:()=>st});var Y=z(8674),Q=z(62459),X=z(79998),Z=z(37016),J=z(15821),tt=z(12472),et=z(37468),it=z(29834);let st=class extends Q.uAl{constructor(){super(...arguments),this._showBadge=!0,this._animateFill=!1,this._animationDelay=0,this._requiredIngredientsCount=0,this._validPetIngredientCount=0}get isFull(){return this._validPetIngredientCount>=this._requiredIngredientsCount}create(){super.create(),this.mergeRankBadgeGraphic.Active=this._showBadge}setup(q,K,z=!1){var Y;const Q=null!==(Y=q.mergeRank)&&void 0!==Y?Y:Z.qd.MIN;this.mergeRankBadgeText.text=K?Q.toString():"0",this.progressBar.GameObject.active=K,this._barGlow.GameObject.active=K,K?(this.progressBar.showBarText(),this.setProgressBarProperties(Q,q,z)):this.progressBar.hideBarText()}setProgressBarProperties(q,K,z=!1){const Y=q>=Z.qd.MAX;if(Y)return this._barFill.updateAsset(X.u.Merge_bar_max),this.progressBar.setFromValues(1,1,this._animateFill,this._animationDelay),this.progressBar.progressBar.GameObject.active=!0,void(this._barGlow.GameObject.active=!1);let Q={requiredIngredientsCount:0,validPetIngredientCount:0,mergeRecipe:void 0};Y||(Q=tt.r.getMergeIngredientInfo(K),J.A.isDefined(Q))?(this._requiredIngredientsCount=Q.requiredIngredientsCount,this._validPetIngredientCount=z?this._requiredIngredientsCount:Q.validPetIngredientCount,this.progressBar.progressBar.GameObject.active=!this.isFull,this._barGlow.GameObject.active=this.isFull,this._barFill.updateAsset(this.isFull?X.u.Merge_bar_full:X.u.Merge_bar_progress),this.progressBar.setFromValues(this._validPetIngredientCount,this._requiredIngredientsCount,!this.isFull&&this._animateFill,this.isFull?0:this._animationDelay),this.progressBar.setBarText(`${this._validPetIngredientCount} / ${this._requiredIngredientsCount}`)):this.progressBar.GameObject.active=!1}};(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],st.prototype,"mergeRankBadgeText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],st.prototype,"mergeRankBadgeGraphic",void 0),(0,Y.Cg)([(0,Q.MnK)(et.z),(0,Y.Sn)("design:type",et.z)],st.prototype,"progressBar",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],st.prototype,"_barFill",void 0),(0,Y.Cg)([(0,Q.MnK)(it.j),(0,Y.Sn)("design:type",it.j)],st.prototype,"_barGlow",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],st.prototype,"_showBadge",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],st.prototype,"_animateFill",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],st.prototype,"_animationDelay",void 0),st=(0,Y.Cg)([(0,Q.EVk)("MergeBar")],st)},63086:(q,K,z)=>{"use strict";z.d(K,{Zb:()=>Q});var Y,Q,X=z(8674),Z=z(62459),J=z(28152),tt=z(80060);!function(q){q.AlphaContainerEnable="ALPHA_CONTAINER_ENABLE",q.AlphaFilterEnable="ALPHA_FILTER_ENABLE"}(Y||(Y={})),function(q){q.Container="Container",q.Filter="Filter"}(Q||(Q={}));let et=class extends Z.uAl{constructor(){super(...arguments),this.alphaMode=Q.Container,this.alphaEnabledValue=.35}create(){super.create(),Z.Aq$.isDefined(this._injectionTarget)||(this._injectionTarget=this.gameObject),Object.values(Q).forEach((q=>{var K;this.setUpAlphaFunctions(q),null===(K=this._enableAlphaFunction)||void 0===K||K.call(this,!1)})),this.setUpAlphaFunctions(this.alphaMode)}setAlphaMode(q){var K;this.alphaMode=q,null===(K=this._enableAlphaFunction)||void 0===K||K.call(this,!1),this.setUpAlphaFunctions(this.alphaMode),this.enableAlpha(this.alphaEnabled)}enableAlpha(q){var K;this.alphaEnabled=q,null===(K=this._enableAlphaFunction)||void 0===K||K.call(this,this.alphaEnabled)}setUpAlphaFunctions(q){switch(q){case Q.Container:this._enableAlphaFunction=this.enableContainerAlpha;break;case Q.Filter:this._enableAlphaFunction=this.enableFilterAlpha;break;default:Z.VyI.log("Invalid Alpha Mode Selected",Z.$bb.Error)}}enableContainerAlpha(q){tt.d.updateInjectedValues(this._injectionTarget,{[Y.AlphaContainerEnable]:q?this.alphaEnabledValue:1})}enableFilterAlpha(q){tt.d.updateInjectedValues(this._injectionTarget,{[Y.AlphaFilterEnable]:q?this.alphaEnabledValue:1})}};(0,X.Cg)([(0,Z.ERr)(),(0,X.Sn)("design:type",Z._mx)],et.prototype,"_injectionTarget",void 0),(0,X.Cg)([(0,Z.gfw)(Q),(0,X.Sn)("design:type",String)],et.prototype,"alphaMode",void 0),(0,X.Cg)([(0,Z.vkK)(),(0,X.Sn)("design:type",Boolean)],et.prototype,"alphaEnabled",void 0),(0,X.Cg)([(0,Z.g11)(),(0,X.Sn)("design:type",Number)],et.prototype,"alphaEnabledValue",void 0),et=(0,X.Cg)([(0,Z.EVk)("PetCardAlphaMode",J.Y.uiPetMenu)],et)},8763:(q,K,z)=>{"use strict";z.d(K,{j:()=>nt});var Y=z(58182),Q=z(17446),X=z(15821),Z=z(30226),J=z(77938),tt=z(76277),et=z(22023),it=z(53661),st=z(63086);class nt{static GetOwnedPetCardInjectionValues(q,K,z,nt,at){var rt,ot,ht,ct;const dt=J.t.getItem("pet",q.ID),lt=null!==(ot=null===(rt=dt.data)||void 0===rt?void 0:rt.rarity)&&void 0!==ot?ot:Q.E.Common,ut=et.P8.getUpgradeSuggestion(q),ft=(null===(ht=dt.data.gearEquipSlots)||void 0===ht?void 0:ht.length)>0,bt=X.A.isDefined(q.team),pt=z&&nt&&!bt,vt=!z||z&&nt&&!bt,gt=(0,tt.G)(Y.N)&&(null!==(ct=q.evolutionCount)&&void 0!==ct?ct:0)>0;return{[it.ML.PetData]:[q,!0],[it.ML.PetID]:dt.ID,[it.ML.ShowLevelIcon]:!0,[it.ML.Level]:q.level,[it.ML.ShowOnTeam]:bt,[it.ML.ShowEvolve]:ut===et.Tc.ShowEvolve&&!gt,[it.ML.ShowUpgrade]:ut===et.Tc.ShowUpgrade,[it.ML.ShowStaticEvolve]:ut===et.Tc.ShowStaticEvolve&&!gt,[it.ML.Name]:et.P8.getPetDisplayName(dt,q),[it.ML.ShowElementIcon]:!0,[it.ML.ShowMergeBar]:et.P8.canPetAccessMergeRanks(q.ID)&&at,[it.ML.PetRarity]:lt,[it.ML.PetRarityBackground]:lt,[it.ML.ShowPetGear]:ft,[it.ML.ShowRarityBackground]:!0,[it.ML.ShowUnknownBackground]:!1,[it.ML.IconTint]:16777215,[it.ML.InputEnabled]:vt,[it.ML.ShowNotificationBadge]:!1,[it.ML.ShowNotificationText]:!1,[it.ML.ShowTreasureTrackBadge]:!1,[it.ML.WhiteOverlay]:!1,[it.ML.AlphaMode]:st.Zb.Filter,[it.ML.OnClick]:()=>K(dt,q),[it.ML.ShowSelectionAvailableOutline]:pt,[it.ML.PetRarityText]:Z.J.convertRarityToText(lt),[it.ML.ShowPetRarity]:!0,[it.ML.ApplyColorFilter]:!!z&&bt,[it.ML.ApplyGreyScale]:!1}}static GetSeenPetCardInjectionValues(q,K,z,Y=!1){var X,tt,et;const st=J.t.getItem("pet",q),nt=null!==(tt=null===(X=st.data)||void 0===X?void 0:X.rarity)&&void 0!==tt?tt:Q.E.Common,at=!z;return{[it.ML.PetID]:[st.ID,!0],[it.ML.ShowPetGear]:!1,[it.ML.ShowMergeBar]:!1,[it.ML.ShowLevelIcon]:!1,[it.ML.ShowOnTeam]:!1,[it.ML.ShowEvolve]:!1,[it.ML.ShowUpgrade]:!1,[it.ML.ShowStaticEvolve]:!1,[it.ML.Name]:null===(et=st.data)||void 0===et?void 0:et.name,[it.ML.PetRarity]:-1,[it.ML.PetRarityBackground]:nt,[it.ML.ApplyGreyScale]:!0,[it.ML.ShowRarityBackground]:!0,[it.ML.ShowElementIcon]:!0,[it.ML.ShowUnknownBackground]:!1,[it.ML.IconTint]:14540253,[it.ML.InputEnabled]:at,[it.ML.ShowNotificationBadge]:!1,[it.ML.ShowNotificationText]:!1,[it.ML.ShowTreasureTrackBadge]:Y,[it.ML.WhiteOverlay]:!0,[it.ML.OnClick]:()=>K(st,void 0),[it.ML.ShowSelectionAvailableOutline]:!1,[it.ML.PetRarityText]:Z.J.convertRarityToText(nt),[it.ML.ShowPetRarity]:!0}}static GetUnknownPetCardInjectionValues(q,K,z){var Y,X;const Z=J.t.getItem("pet",q),tt=null!==(X=null===(Y=Z.data)||void 0===Y?void 0:Y.rarity)&&void 0!==X?X:Q.E.Common;return{[it.ML.PetID]:Z.ID,[it.ML.ShowPetGear]:!1,[it.ML.ShowMergeBar]:!1,[it.ML.ShowLevelIcon]:!1,[it.ML.ShowOnTeam]:!1,[it.ML.ShowEvolve]:!1,[it.ML.ShowUpgrade]:!1,[it.ML.ShowStaticEvolve]:!1,[it.ML.Name]:"???",[it.ML.PetRarity]:tt,[it.ML.ShowElementIcon]:!1,[it.ML.ApplyGreyScale]:!1,[it.ML.ShowRarityBackground]:!1,[it.ML.ShowUnknownBackground]:!0,[it.ML.IconTint]:0,[it.ML.InputEnabled]:!1,[it.ML.ShowNotificationBadge]:!1,[it.ML.ShowNotificationText]:!1,[it.ML.ShowTreasureTrackBadge]:!1,[it.ML.WhiteOverlay]:!1,[it.ML.AlphaMode]:st.Zb.Container,[it.ML.ShowSelectionAvailableOutline]:!1,[it.ML.ShowPetRarity]:!1,[it.ML.OnClick]:()=>K(Z,void 0)}}}},63546:(q,K,z)=>{"use strict";z.d(K,{$:()=>J});var Y=z(8674),Q=z(62459),X=z(67665),Z=z(13956);class J{constructor(q){this._stateMachine=q}enter(q){return(0,Y.sH)(this,void 0,void 0,(function*(){}))}exit(){return(0,Y.sH)(this,void 0,void 0,(function*(){}))}}(0,Y.Cg)([(0,Z.b)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],J.prototype,"_prefabLoader",void 0),(0,Y.Cg)([(0,Z.b)(Q.$Bt.LocalizationService),(0,Y.Sn)("design:type",Q.dTp)],J.prototype,"_localizer",void 0),(0,Y.Cg)([(0,Z.b)("20f-5f67"),(0,Y.Sn)("design:type",X.Y)],J.prototype,"_segment",void 0)},54865:(q,K,z)=>{"use strict";z.d(K,{w:()=>Q});var Y=z(8674);class Q{constructor(q){this.currentState=new q(this)}start(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.currentState.enter()}))}stop(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.currentState.exit()}))}goToState(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z;yield null===(z=this.currentState)||void 0===z?void 0:z.exit(),this.currentState=new q(this),yield this.currentState.enter(K)}))}}},48842:(q,K,z)=>{"use strict";z.d(K,{J8:()=>pt,SB:()=>Q});var Y,Q,X,Z=z(8674),J=z(87490),tt=z(62459),et=z(113),it=z(88022),st=z(35120),nt=z(49237),at=z(95946),rt=z(28152),ot=z(11624),ht=z(34603),ct=z(93991),dt=z(15485),lt=z(41674),ut=z(26932),ft=z(16043),bt=z(97518);!function(q){q[q.InZone=0]="InZone",q[q.WorldMap=1]="WorldMap",q[q.TrackingNPC=2]="TrackingNPC",q[q.TrackingMythic=3]="TrackingMythic"}(Q||(Q={})),function(q){q.FireFly="0x00914a",q.Shiverchill="0x0086eb",q.Skywatch="0x976cd1",q.Bonfire="0xd93525",q.Shipwreck="0x009fa2"}(X||(X={}));let pt=Y=class extends ut.z{postCreate(){super.postCreate(),this._config=Y.ZONE_TYPE_CONFIGURATION_MAPPING[this._zoneId],this.updateValue("PET_ZONE_TAG",this._config.zoneTag),this.configureBanner(),this.configureButtons(),this.setPetRescuedCount(),this.setMinMaxEnemyLevels()}configureBanner(){this.setContainerText(this._bannerContainer,this._config.zoneName),this.setTintColor(this._bannerContainer,this._config.hexCode)}configureButtons(){this._inZoneFooter.active=this._zoneMenuState===Q.InZone,this._inWorldMapFooter.active=!this._inZoneFooter.active,this._leftButton.active=this._zoneMenuState===Q.WorldMap&&!!this._onTitanClick,this._rightButton.active=this._zoneMenuState===Q.WorldMap&&!!this._onDungeonClick,this._middleButton.active=this._zoneMenuState===Q.WorldMap,this._trackingButton.active=this._zoneMenuState===Q.TrackingMythic||this._zoneMenuState===Q.TrackingNPC,this.setContainerSignal(this._leftButton,this._onTitanClick),this.setContainerSignal(this._rightButton,this._onDungeonClick),this.setContainerSignal(this._middleButton,this._onPlayClick),this.setContainerSignal(this._trackingButton,this._onPlayClick);const[q,K]=this._zoneMenuState===Q.TrackingNPC?["UI_ZONE_GO_TRADE","icon-npc-loc-assembled"]:["UI_ZONE_TRACK_MYTHIC","icon-epics-loc-assembled"];this.setContainerText(this._trackingButton,q),this.setContainerIcons(this._trackingButton,it._.Ui_raster_epicsv2_json,K),this.setContainerIcons(this._middleButton,it._.Ui_raster_pet_zone_menu_json,`button-npc-${this._config.zoneTag}`)}setContainerIcons(q,K,z){q.findComponentsInChildren(ht._).forEach((q=>{q.setAsset(K,z).then((()=>{q.sizeToSourceImage()})).catch(tt.RQr.createHandler(`[ZoneMenuConfigurationComponent] Error loading the image: ${z}`))}))}setContainerText(q,K){q.findComponentsInChildren(bt.R).forEach((q=>{q.setLocalizationKey(K)}))}setContainerSignal(q,K){K&&q.findComponentInChildren(nt.$).onEnabledClick.add(K)}setTintColor(q,K){const z=q.findComponentInChildren(ct.w);z.hexTintColor=K,z.enableTint()}setPetRescuedCount(){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=this._petIdsInZone.filter((K=>q.encounters.getPetTimesRescued(K)>0)).length;this._rescuedText.setTextArguments(K,this._petIdsInZone.length)}setMinMaxEnemyLevels(){this._minMaxText.setTextArguments(this._enemyMinMaxLevel.minLevel,this._enemyMinMaxLevel.maxLevel)}clearNewlyRescuedPets(){if(this._zoneMenuState===Q.InZone){const q=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q.newPetRescueData.clearNewestRescuesByAmount(Y.PET_CARDS_PER_PAGE,st.q.instance.prodigy.world.getCurrentZone()),q.forceSaveCharacter()}}sendPageViewedEvent(){this._config&&this._segment.featureCommon.sendPetBookViewedEvent({bookName:this._zoneMenuState===Q.InZone?`zone_pet_menu_${this._config.zoneTag}`:`zone_entry_popup_${this._config.zoneTag}`,bookPage:this.gameObject.findComponentInChildren(ft.a).currentPage,interfaceType:lt.Wm.Modal})}sendCloseEvent(){this._config&&this._segment.featureCommon.sendButtonEvent({buttonName:dt.k.X,interfaceName:this._zoneMenuState===Q.InZone?`zone_pet_menu_${this._config.zoneTag}`:`zone_entry_popup_${this._config.zoneTag}`,interfaceType:lt.Wm.Modal})}};pt.PET_CARDS_PER_PAGE=15,pt.ZONE_TYPE_CONFIGURATION_MAPPING={[ot.P.Firefly]:{zoneName:"UI_ZONE_FIREFLY_FOREST_CAPITAL",zoneTag:et.O.Firefly,elementAsset:J.ELegacyElementType.Earth,hexCode:X.FireFly},[ot.P.Shiverchill]:{zoneName:"UI_ZONE_SHIVERCHILL_MOUNTAINS_CAPITAL",zoneTag:et.O.Shiverchill,elementAsset:at.a.Ice,hexCode:X.Shiverchill},[ot.P.Skywatch]:{zoneName:"UI_ZONE_SKYWATCH_CAPITAL",zoneTag:et.O.Skywatch,elementAsset:at.a.Storm,hexCode:X.Skywatch},[ot.P.Bonfire]:{zoneName:"UI_ZONE_BONFIRE_SPIRE_CAPITAL",zoneTag:et.O.Bonfire,elementAsset:at.a.Fire,hexCode:X.Bonfire},[ot.P.Shipwreck]:{zoneName:"UI_ZONE_SHIPWRECK_SHORE_CAPITAL",zoneTag:et.O.Shipwreck,elementAsset:at.a.Water,hexCode:X.Shipwreck},[ot.P.FireflyHard]:{zoneName:"UI_ZONE_FIREFLY_FOREST_CAPITAL",zoneTag:et.O.Firefly,elementAsset:J.ELegacyElementType.Earth,hexCode:X.FireFly},[ot.P.ShiverchillHard]:{zoneName:"UI_ZONE_SHIVERCHILL_MOUNTAINS_CAPITAL",zoneTag:et.O.Shiverchill,elementAsset:at.a.Ice,hexCode:X.Shiverchill},[ot.P.SkywatchHard]:{zoneName:"UI_ZONE_SKYWATCH_CAPITAL",zoneTag:et.O.Skywatch,elementAsset:at.a.Storm,hexCode:X.Skywatch},[ot.P.BonfireHard]:{zoneName:"UI_ZONE_BONFIRE_SPIRE_CAPITAL",zoneTag:et.O.Bonfire,elementAsset:at.a.Fire,hexCode:X.Bonfire},[ot.P.ShipwreckHard]:{zoneName:"UI_ZONE_SHIPWRECK_SHORE_CAPITAL",zoneTag:et.O.Shipwreck,elementAsset:at.a.Water,hexCode:X.Shipwreck}},(0,Z.Cg)([(0,tt.Cdj)("PET_ZONE_ID"),(0,Z.Sn)("design:type",Number)],pt.prototype,"_zoneId",void 0),(0,Z.Cg)([(0,tt.Cdj)("PET_ZONE_MENU_STATE"),(0,Z.Sn)("design:type",Number)],pt.prototype,"_zoneMenuState",void 0),(0,Z.Cg)([(0,tt.Cdj)("PET_ZONE_PLAY_BUTTON"),(0,Z.Sn)("design:type",Function)],pt.prototype,"_onPlayClick",void 0),(0,Z.Cg)([(0,tt.Cdj)("PET_ZONE_TITAN_BUTTON"),(0,Z.Sn)("design:type",Function)],pt.prototype,"_onTitanClick",void 0),(0,Z.Cg)([(0,tt.Cdj)("PET_ZONE_DUNGEON_BUTTON"),(0,Z.Sn)("design:type",Function)],pt.prototype,"_onDungeonClick",void 0),(0,Z.Cg)([(0,tt.Cdj)("GRID_VIEW_DATA"),(0,Z.Sn)("design:type",Array)],pt.prototype,"_petIdsInZone",void 0),(0,Z.Cg)([(0,tt.Cdj)("PET_ZONE_ENEMY_MIN_MAX_LEVEL"),(0,Z.Sn)("design:type",Object)],pt.prototype,"_enemyMinMaxLevel",void 0),(0,Z.Cg)([(0,tt.Cdj)("20f-5f67"),(0,Z.Sn)("design:type",Function)],pt.prototype,"_segment",void 0),(0,Z.Cg)([(0,tt.ERr)(),(0,Z.Sn)("design:type",tt._mx)],pt.prototype,"_bannerContainer",void 0),(0,Z.Cg)([(0,tt.ERr)(),(0,Z.Sn)("design:type",tt._mx)],pt.prototype,"_inZoneFooter",void 0),(0,Z.Cg)([(0,tt.ERr)(),(0,Z.Sn)("design:type",tt._mx)],pt.prototype,"_inWorldMapFooter",void 0),(0,Z.Cg)([(0,tt.ERr)(),(0,Z.Sn)("design:type",tt._mx)],pt.prototype,"_leftButton",void 0),(0,Z.Cg)([(0,tt.ERr)(),(0,Z.Sn)("design:type",tt._mx)],pt.prototype,"_middleButton",void 0),(0,Z.Cg)([(0,tt.ERr)(),(0,Z.Sn)("design:type",tt._mx)],pt.prototype,"_rightButton",void 0),(0,Z.Cg)([(0,tt.ERr)(),(0,Z.Sn)("design:type",tt._mx)],pt.prototype,"_trackingButton",void 0),(0,Z.Cg)([(0,tt.MnK)(bt.R),(0,Z.Sn)("design:type",bt.R)],pt.prototype,"_rescuedText",void 0),(0,Z.Cg)([(0,tt.MnK)(bt.R),(0,Z.Sn)("design:type",bt.R)],pt.prototype,"_minMaxText",void 0),pt=Y=(0,Z.Cg)([(0,tt.EVk)("ZoneMenuConfiguration",rt.Y.uiPetsInZones)],pt)},5075:(q,K,z)=>{"use strict";z.d(K,{A:()=>at,H:()=>ct});var Y=z(8674),Q=z(62459),X=z(113),Z=z(97495),J=z(35120),tt=z(28152),et=z(90633),it=z(26932),st=z(325);var nt,at,rt=z(30226),ot=z(73678),ht=z(40392);!function(q){q.LOCKEDLEVEL="locked-level",q.LOCKEDSUBJECT="locked-subject",q.LOCKEDPREREQUISITE="locked-prerequisite",q.UNLOCKED="unlocked",q.COMINGSOON="comingsoon"}(at||(at={}));let ct=nt=class extends it.z{create(){super.create(),this.bindContext()}bindContext(){this.modalType===at.COMINGSOON?this.bindZoneComingSoonPopup():this.modalType===at.UNLOCKED?this.bindZoneUnlockedPopup():this.bindZoneLockedPopup()}bindZoneLockedPopup(){const q=ht.i.getZoneName(this._targetZoneId),K=ht.i.getZoneTagForZoneId(this._targetZoneId),z=ht.i.getHighestAvailableZoneData().zone,Y=ht.i.getZoneName(z),X=ht.i.getZoneTagForZoneId(z),Z=nt.lockTextConfig[this.modalType];if(this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_KEY").toConstantValue(Z.title),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_KEY").toConstantValue(Z.description),this.modalType===at.LOCKEDLEVEL){const q=ht.i.getZoneData(this._targetZoneId).getRequiredLevel().toString();this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_ARGS").toConstantValue([q]),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_ARGS").toConstantValue([Y])}else if(this.modalType===at.LOCKEDSUBJECT){const K=class{static getSubjectDisplay(){const q=J.q.instance.prodigy.gameContainer.get("8f9-f0fc").getSubject();switch(q){default:return q;case st.Q.ELA:return J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("SUBJECT_NAME_ENGLISH");case st.Q.Math:return J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("SUBJECT_NAME_MATH");case st.Q.Science:return J.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText("SUBJECT_NAME_SCIENCE")}}}.getSubjectDisplay();this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_ARGS").toConstantValue([q]),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_ARGS").toConstantValue([q,K])}else this.modalType===at.LOCKEDPREREQUISITE&&(this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_ARGS").toConstantValue([q]),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_ARGS").toConstantValue([Y]));this._context.Container.rebind("ZONE_STATUS_POPUP_CURRENT_ZONE_ICON").toConstantValue(`icon-zone-${X}`),this._context.Container.rebind("ZONE_STATUS_POPUP_TELEPORT_MAP_TAG").toConstantValue(z),this._context.Container.rebind("ZONE_STATUS_POPUP_SEGMENT_BUTTON_INTERFACE_NAME").toConstantValue(`zone_locked_popup_${X}`),this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_NAME").toConstantValue(q),this._context.Container.rebind("ZONE_STATUS_POPUP_BANNER").toConstantValue(rt.J.isCoreZone(this._targetZoneId)?`hdr-${K}`:"hdr-generic")}bindZoneUnlockedPopup(){const q=ht.i.getZoneData(this._targetZoneId),K=ht.i.getZoneTagForZoneId(this._targetZoneId),{puppetmasterText:z,description:Y}=nt.unlockedTextConfig[K];this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_NAME").toConstantValue(q.getName()),this._context.Container.rebind("ZONE_STATUS_POPUP_BANNER").toConstantValue(`hdr-${K}-unlocked`),this._context.Container.rebind("ZONE_STATUS_POPUP_PUPPETMASTER_TEXT").toConstantValue(z),this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_ZONE_ICON").toConstantValue(`icon-zone-${K}`),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_KEY").toConstantValue(Y),this._context.Container.rebind("ZONE_STATUS_POPUP_SEGMENT_BUTTON_INTERFACE_NAME").toConstantValue(`zone_unlocked_popup_${K}`),this._context.Container.rebind("ZONE_STATUS_POPUP_DIFFICULTY").toConstantValue(q.difficultyMode)}bindZoneComingSoonPopup(){var q;const K=null===(q=nt.zoneRequirementsMap[this._targetZoneId])||void 0===q?void 0:q.showZoneInjectionId,z=ht.i.getZoneName(this._targetZoneId),Y=ht.i.getZoneTagForZoneId(this._targetZoneId);K&&this._context.Container.rebind(K).toConstantValue(!0),this._context.Container.rebind("ZONE_STATUS_POPUP_BANNER").toConstantValue(rt.J.isCoreZone(this._targetZoneId)?`gamemode-lock-${Y}`:"gamemode-lock-generic"),this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_NAME").toConstantValue(z)}openDifficultyConfirmationPopup(){J.q.instance.prodigy.open.difficultySelectorConfirmationModal(Z.i.Regular)}static canShowEntryPopup(q){var K,z;const Y=J.q.instance.prodigy.gameContainer.get("782-c308").highestDifficultyUnlocked,Q=nt.zoneUnlockedBreadcrumbFeature[Y],X=null!=q?q:ht.i.getHighestAvailableZoneData(Y).zone,Z=nt.zoneRequirementsMap[X].entryBreadcrumb,tt=X===ot.A_.SHIVERCHILL,et=(null===(z=null===(K=J.q.instance.prodigy.world.getZone(X))||void 0===K?void 0:K.getQuestState())||void 0===z?void 0:z.ID)>1,it=J.q.instance.prodigy.world.getCurrentZone()===X,st=J.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Q,Z);return Z&&!tt&&!et&&!it&&!st}static completeEntryBreadcrumb(q){const K=J.q.instance.prodigy.gameContainer.get("782-c308").highestDifficultyUnlocked,z=nt.zoneUnlockedBreadcrumbFeature[K],Y=null!=q?q:ht.i.getHighestAvailableZoneData(K).zone,Q=nt.zoneRequirementsMap[Y].entryBreadcrumb;J.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(z,Q)}};ct.lockTextConfig={[at.LOCKEDLEVEL]:{title:"UNLOCK_ZONE_AT",description:"CONTINUE_EXPLORING_X"},[at.LOCKEDSUBJECT]:{title:"ZONE_LOCKED",description:"CHANGE_SUBJECTS_TO_UNLOCK"},[at.LOCKEDPREREQUISITE]:{title:"ZONE_LOCKED",description:"CONTINUE_EXPLORING_X"}},ct.unlockedTextConfig={[X.O.Shiverchill]:{description:"ZONE_UNLOCKED_EXPLORE_SHIVERCHILL",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_SHIVERCHILL"},[X.O.Bonfire]:{description:"ZONE_UNLOCKED_EXPLORE_BONFIRE",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_BONFIRE"},[X.O.Shipwreck]:{description:"ZONE_UNLOCKED_EXPLORE_SHIPWRECK",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_SHIPWRECK"},[X.O.Skywatch]:{description:"ZONE_UNLOCKED_EXPLORE_SKYWATCH",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_SKYWATCH"}},ct.zoneRequirementsMap={[ot.A_.FOREST]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_FIREFLY"},[ot.A_.SHIVERCHILL]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIVERCHILL",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL},[ot.A_.BONFIRE]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_BONFIRE",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE},[ot.A_.SHIPWRECK]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIPWRECK",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK},[ot.A_.SKYWATCH]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SKYWATCH",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH},[ot.A_.ACADEMY]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_ACADEMY"},[ot.A_.FORESTHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_FIREFLY"},[ot.A_.SHIVERCHILLHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIVERCHILL",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_HARD},[ot.A_.BONFIREHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_BONFIRE",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_HARD},[ot.A_.SHIPWRECKHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIPWRECK",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_HARD},[ot.A_.SKYWATCHHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SKYWATCH",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_HARD},[ot.A_.ACADEMYHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_ACADEMY"},[ot.A_.FORESTEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_FIREFLY"},[ot.A_.SHIVERCHILLEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIVERCHILL",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_EXPERT},[ot.A_.BONFIREEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_BONFIRE",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_EXPERT},[ot.A_.SHIPWRECKEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIPWRECK",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_EXPERT},[ot.A_.SKYWATCHEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SKYWATCH",entryBreadcrumb:et.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_EXPERT},[ot.A_.ACADEMYEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_ACADEMY"}},ct.zoneUnlockedBreadcrumbFeature={[Z.i.Regular]:et.B.FEATURE_ZONE_UNLOCKED_POPUP,[Z.i.Hard]:et.B.FEATURE_ZONE_UNLOCKED_POPUP_HARD,[Z.i.Expert]:et.B.FEATURE_ZONE_UNLOCKED_POPUP_EXPERT},(0,Y.Cg)([(0,Q.Cdj)("ZONE_STATUS_MODAL_TYPE"),(0,Y.Sn)("design:type",String)],ct.prototype,"modalType",void 0),(0,Y.Cg)([(0,Q.Cdj)("ZONE_STATUS_POPUP_TARGET_ID"),(0,Y.Sn)("design:type",String)],ct.prototype,"_targetZoneId",void 0),ct=nt=(0,Y.Cg)([(0,Q.EVk)("ZoneStatusPopupDataProvider",tt.Y.uiDialog)],ct)},41968:(q,K,z)=>{"use strict";z.d(K,{P:()=>ct});var Y=z(8674),Q=z(62459),X=z(97495),Z=z(35120),J=z(28152),tt=z(37807),et=z(31478),it=z(73678),st=z(3785),nt=z(15989),at=z(40392),rt=z(76277),ot=z(17740),ht=z(47728);let ct=class extends Q.uAl{constructor(){super(...arguments),this._zoneId=it.A_.FOREST,this.runOnCreate=!1,this._isNonZoneLocation=!1,this.onUnlockPopupEnabled=new Q.HN0,this.onUnlockPopupDisabled=new Q.HN0,this.onShowGuideHand=new Q.HN0}create(){super.create(),this.runOnCreate&&this.run()}destroy(){this.onUnlockPopupEnabled.dispose(),this.onUnlockPopupDisabled.dispose(),this.onShowGuideHand.dispose(),super.destroy()}run(){var q;if(this._isNonZoneLocation)return!1;const K=Z.q.instance.prodigy.world.getZone(this._zoneId),z=at.i.getZoneData(this._zoneId),Y=!z.isHidden()&&z.meetsRequirements()&&!this._breadcrumb.isCompleted()&&!at.i.isZoneLocked(this._zoneId)&&!1===(null===(q=this._worldMapMenuInstanceLockedZoneKeys)||void 0===q?void 0:q.includes(z.nameKey))&&((null==K?void 0:K.difficultyModeAgnostic)||at.i.isInDifficultyMode(z.difficultyMode));return(Y?this.onUnlockPopupEnabled:this.onUnlockPopupDisabled).dispatch(),Y}showGuideHand(q=!0){var K;if(this._isNonZoneLocation)return;if(!q)return void this.onShowGuideHand.dispatch(q);const z=at.i.BUTTONS_CONFIG.find((q=>q.zone===this._zoneId));if(at.i.isInDifficultyMode(null==z?void 0:z.difficultyMode))if((null===(K=this._worldMapMenuInstanceLockedZoneKeys)||void 0===K?void 0:K.includes(nt.NJ.DragonIsle))||1!==(0,et.k)()||(null==z?void 0:z.difficultyMode)!==X.i.Regular){if(at.i.getHighestAvailableZoneData().zone!==this._zoneId&&this._zoneId!==it.A_.ACADEMY||this.onShowGuideHand.dispatch(!0),this._zoneId===it.A_.LAMPLIGHT){const q=(0,rt.G)(ot.t),K=ht.x.hasFestivalBeenSeen();this.onShowGuideHand.dispatch(q&&!K)}}else this._zoneId===it.A_.DRAGONISLE&&this.onShowGuideHand.dispatch(!0)}};(0,Y.Cg)([(0,Q.MnK)(tt.N),(0,Y.Sn)("design:type",tt.N)],ct.prototype,"_breadcrumb",void 0),(0,Y.Cg)([(0,Q.gfw)(it.A_),(0,Y.Sn)("design:type",String)],ct.prototype,"_zoneId",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ct.prototype,"runOnCreate",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],ct.prototype,"_isNonZoneLocation",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ct.prototype,"onUnlockPopupEnabled",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ct.prototype,"onUnlockPopupDisabled",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],ct.prototype,"onShowGuideHand",void 0),(0,Y.Cg)([(0,Q.Cdj)(st.z.WorldMapMenuInstanceLockedZones),(0,Y.Sn)("design:type",Array)],ct.prototype,"_worldMapMenuInstanceLockedZoneKeys",void 0),ct=(0,Y.Cg)([(0,Q.EVk)("ZoneUnlockPopupGuard",J.Y.utility)],ct)},26691:(q,K,z)=>{"use strict";var Y;z.d(K,{D:()=>Y}),function(q){q[q.OkayButton=0]="OkayButton",q[q.YesNoButtons=1]="YesNoButtons"}(Y||(Y={}))},21644:(q,K,z)=>{"use strict";z.d(K,{Bi:()=>it,Uh:()=>Y,ju:()=>st,p1:()=>nt});var Y,Q=z(113),X=z(64270),Z=z(35120),J=z(15485),tt=z(46784),et=z(41674);function it(q){if(q)return"storeId"in q?q.storeId:void 0}!function(q){q.OpenFireflyOutfitters="Open Firefly Outfitters",q.OpenHotHotThreads="Open Hot Hot Threads",q.OpenOceanOutfitters="Open Ocean Outfitters",q.OpenSnowdaySales="Open Snowday Sales",q.OpenSkyHighValues="Open Sky High Values",q.OpenPetStore="Open Pet Store",q.OpenWandStore="Open Wand Store",q.OpenPotionShop="Open Potion Shop",q.OpenDynamicStore="Open Dynamic Store"}(Y||(Y={}));const st=[Y.OpenFireflyOutfitters,Y.OpenSnowdaySales,Y.OpenHotHotThreads,Y.OpenOceanOutfitters,Y.OpenSkyHighValues],nt={[Y.OpenDynamicStore]:{name:"Pet Center",imageFrame:"unified-store-pet-store",iconFrame:"icon-currency-unified",customCallback:()=>{Z.q.instance.prodigy.open.dynamicStore({storeKey:X.GA.PetShop,origin:{originType:et.$N.ButtonClick,originId:J.k.UnifiedStoreToDynamicStore}})},segmentData:{UNIFIED_STORE_SEGMENT_BUTTON_NAME:J.k.UnifiedStoreToDynamicStore,UNIFIED_STORE_SEGMENT_DESTINATION_NAME:tt.B.UnifiedStore}},[Y.OpenFireflyOutfitters]:{name:"Firefly Outfitters",imageFrame:"unified-store-firefly-outfitters",iconFrame:"mail-floran",storeId:7,zone:Q.O.Firefly},[Y.OpenHotHotThreads]:{name:"Hot Hot Threads",imageFrame:"unified-store-hot-hot-threads",iconFrame:"mail-hot-hot",storeId:6,zone:Q.O.Bonfire},[Y.OpenOceanOutfitters]:{name:"Ocean Outfitters",imageFrame:"unified-store-ocean-outfitters",iconFrame:"mail-yar",storeId:19,zone:Q.O.Shipwreck},[Y.OpenSnowdaySales]:{name:"Snowday Sales",imageFrame:"unified-store-snowday-sales",iconFrame:"mail-shiver",storeId:8,zone:Q.O.Shiverchill},[Y.OpenSkyHighValues]:{name:"Sky-High Values",imageFrame:"unified-store-sky-high-values",iconFrame:"mail-aero",storeId:5,zone:Q.O.Skywatch},[Y.OpenPetStore]:{name:"Pet Store",imageFrame:"unified-store-pet-store",iconFrame:"small-icon-gold",storeId:1},[Y.OpenWandStore]:{name:"Wand Store",imageFrame:"unified-store-wand-store",iconFrame:"small-icon-gold",storeId:2},[Y.OpenPotionShop]:{name:"Potion Shop",imageFrame:"unified-store-potion-store",iconFrame:"small-icon-gold",storeId:4}}},56903:(q,K,z)=>{"use strict";z.d(K,{A:()=>st});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(35120),J=z(73797),tt=z(13956),et=z(34854),it=z(30226);class st{static setWizardWatchData(q){this._wizardWatchData=q}static clearWizardWatchData(){this._wizardWatchData=null}static getWizardWatchData(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=new Q.bnh;return Q.Aq$.isDefined(this._wizardWatchData)?(q.resolve({items:this._wizardWatchData}),q):(yield st._networkHandler.getWizardWatchData().catch((()=>{q.reject("Failed to fetch wizard watch data")})).then((K=>{var z;this.setWizardWatchData(K.items),q.resolve({items:null!==(z=this._wizardWatchData)&&void 0!==z?z:[]})})),q)}))}static getActiveEntityAds(){return Q.Aq$.isDefined(this._wizardWatchData)?(this._activeAds=st.getActiveEntityAdsFromList(this._wizardWatchData),this._activeAds):(Q.VyI.log("[WizardWatch] Error: Wizard watch ads have not been fetched",Q.$bb.Error),[])}static getActiveEntityAdsFromList(q){const K=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=Z.q.instance.prodigy.gameContainer.get("9fe-5b45"),Y=Date.now(),X=Z.q.instance.prodigy.gameContainer.get("11f-118a");return q.filter((q=>{const Z=q.conditions.requirementsID;if(Q.Aq$.isDefined(Z)&&!X.meetsRequirementsDeprecated(Z))return!1;const J=q.conditions.growthbook;if(J.feature){const q=z.getFeatureValue(J.feature),K=q?q.enabled:null;if(!z.isOn(J.feature)||!1===K)return!1}if(q.conditions.memberSuppression&&(K.hasMembership()||it.J.shouldSuppressAd(K)))return!1;if(q.conditions.nonMemberSuppression&&!K.hasMembership())return!1;const tt=new Date(Date.now());if(q.conditions.hideDuringSchoolHours&&it.J.isDateWithinSchoolDayAndHours(tt)||q.conditions.hideDuringHomeHours&&!it.J.isDateWithinSchoolDayAndHours(tt))return!1;q.body=st.fixEscapeCharacters(q.body);const et=q.sendDate?new Date(q.sendDate):null,nt=q.removeDate?new Date(q.removeDate):null;if(et&&isNaN(et.getTime()))return Q.VyI.log(`[WizardWatch] Bad send date ${q.sendDate}.`,Q.$bb.Warning),!1;if(nt&&isNaN(nt.getTime()))return Q.VyI.log(`[WizardWatch] Bad expiry date ${q.removeDate}.`,Q.$bb.Warning),!1;const at=null===et||Y>et.getTime(),rt=q.noExpiry||null===nt||Yq.ID))}static getUnseenActiveAdCount(){const q=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return X.difference(this.getActiveAdIDs(),q.encounters.getSeenAds()).length}static markActiveAdsSeen(){Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.encounters.setSeenAds(st.getActiveAdIDs()),Z.q.instance.prodigy.game.broadcaster.broadcast(J.Y1.RefreshWizardWatchAdCount,J.HG.HUD)}static fixEscapeCharacters(q){return q.replace(/\\n/g,"\n").replace(/\\t/g,"\t")}}(0,Y.Cg)([(0,tt.b)("e34-e79a"),(0,Y.Sn)("design:type",et.J)],st,"_networkHandler",void 0)},68152:(q,K,z)=>{"use strict";z.d(K,{v:()=>Y});const Y=(q,K)=>{0}},39473:(q,K,z)=>{"use strict";z.d(K,{S:()=>J});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(30226);let J=class{constructor(q){this._localizer=null,this.ut=[],this._localizer=q}addPhrases(q,K=!1){for(let z=0;zq?this.ut[q]:null}getPhraseIndex(q){for(let K=0;K{"use strict";z.d(K,{b:()=>Y});class Y{static isValidClassCode(q){const K=`^[A-F0-9]{${this.CLASS_CODE_LENGTH}}$`;return RegExp(K).test(q)}static reformatClassCode(q){return q.toUpperCase().replace(/[^A-F0-9]/gi,"").substring(0,this.CLASS_CODE_LENGTH)}}Y.CLASS_CODE_LENGTH=7,Y.CLASSCODE_COOLDOWN_MONTH=7,Y.CLASSCODE_COOLDOWN_DATE=15},8770:(q,K,z)=>{"use strict";z.d(K,{Hh:()=>Z,TZ:()=>tt,wB:()=>J});var Y=z(62459),Q=z(17446),X=z(23748);const Z={[Q.E.Legendary]:16745216,[Q.E.Heroic]:12984810,[Q.E.Rare]:2664440,[Q.E.Uncommon]:1890938,[Q.E.Common]:8296667},J={[Q.E.Legendary]:"#C32300",[Q.E.Heroic]:"#690BC9",[Q.E.Rare]:"#0B43B1",[Q.E.Uncommon]:"#0B6C57",[Q.E.Common]:"#363636"};class tt{static convertPixelToGreyscale(q,K,z){return.3*q+.59*K+.11*z}static lerpRgb(q,K,z){return X.z.clampedLerp(q>>16&255,K>>16&&255,z)<<16|X.z.clampedLerp(q>>8&255,K>>8&&255,z)<<8|255&X.z.clampedLerp(255&q,K&&255,z)}static generateRgbColorReplacementPairs(q,K){const z=[];q.length!==K.length&&Y.VyI.log("WARNING Color replacement arrays not of same length. Not all colors will be replaced correctly.",Y.$bb.Warning);for(let Y=0;Y{"use strict";z.d(K,{o:()=>Z});var Y=z(8674),Q=z(62459),X=z(68152);class Z{constructor(){this._counter=0,this._callback=null,this._counterPromise=null,this._resolveFunction=null}get counter(){return this._counter}init(q,K){(0,X.v)(K>0,"Semaphore counter must be greater than 0"),this._callback=q,this._counter=K,this.resolvePendingPromise(!1),this._counterPromise=new Promise((q=>{this._resolveFunction=q}))}wait(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(0,X.v)(null!==this._counterPromise,"Cannot await a semaphore before it is initialized"),this._counterPromise}))}decrement(){--this._counter,0===this._counter&&(this._callback?this._callback():Q.VyI.log("Semaphore callback was null.",Q.$bb.Warning),this.resolvePendingPromise(!0),this._callback=null)}increment(){++this._counter}destroy(){this._resolveFunction&&this.resolvePendingPromise(!1),this._callback=null}resolvePendingPromise(q){this._resolveFunction&&(this._resolveFunction(q),this._resolveFunction=null,this._counterPromise=null)}}},88253:(q,K,z)=>{"use strict";z.d(K,{M:()=>Q});var Y=z(35120);class Q{static getCutsceneDeterminers(){return{isNotificationsPaused:Y.q.instance.prodigy.notifications.isPaused(),isInputEnabled:Y.q.instance.prodigy.game.input.enabled}}static isCutscenePlaying(){const{isNotificationsPaused:q,isInputEnabled:K}=Q.getCutsceneDeterminers();return q||!K}}},98252:(q,K,z)=>{"use strict";z.d(K,{pF:()=>st,uC:()=>Y});var Y,Q,X=z(62459),Z=z(99625),J=(z(34829),z(2272)),tt=z(75329);!function(q){q[q.NONE=0]="NONE",q[q.IOS_APP=1]="IOS_APP",q[q.NATIVE_APP=2]="NATIVE_APP"}(Y||(Y={})),function(q){q.WEB="WEB",q.APPLE="APPLE",q.GOOGLE="GOOGLE"}(Q||(Q={}));const et=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],it=["cancelFullScreen","exitFullscreen","webkitCancelFullScreen","webkitExitFullscreen","msCancelFullScreen","msExitFullscreen","mozCancelFullScreen","mozExitFullscreen"];class st{static getMetricsPlatformName(){let q="web";return X.o5U.isIOS()?q="ios":X.o5U.isMobile()&&(q="android"),q}static appType(){if("1"===X.Aq$.getUrlVariable("iosApp"))return Y.IOS_APP;const q=X.Aq$.getUrlVariable("nativeApp");return parseInt(q,10)>=1?Y.NATIVE_APP:Y.NONE}static isNativeApp(){return this.appType()!==Y.NONE}static isNewMobileLogin(){const q=X.Aq$.getUrlVariable("nativeApp");return parseInt(q,10)>=2}static getNativeAppVersion(){return this.isNativeApp()?X.Aq$.getUrlVariable("nativeVersion"):null}static eligibleVersionForMobileOtpPurchase(){const q=this.getNativeAppVersion();if(!q)return!1;const K=q.split(".").map(Number),z=st.isNativeIOSApp()?[4,9,3]:[4,9,0];return this.compareVersion(K,z)}static eligibleVersionForMobileMembershipPurchase(){const q=this.getNativeAppVersion();if(!q)return!1;const K=q.split(".").map(Number);return this.compareVersion(K,this.isNativeIOSApp()?this._minimumSupportedVersionForIosRevenueCatMembershipPurchase:this._minimumSupportedVersionForMobileMembershipPurchase)}static eligibleVersionForMobileMembershipPurchaseForMultipleTiers(q){const K=this.getNativeAppVersion();if(!K)return!1;const z=K.split(".").map(Number),Y=q?q.split(".").map(Number):void 0;return(this.isNativeAndroidApp()||this.isNativeIOSApp())&&this.compareVersion(z,null!=Y?Y:this._minimumSupportedVersionForMobileMembershipPurchaseMultipleTiers)}static eligibleForMembershipPurchaseForMultipleTiers(){return!this.isNativeApp()||this.eligibleVersionForMobileMembershipPurchaseForMultipleTiers()}static compareVersion(q,K){for(let z=0;zK[z])return!0}return!0}static isNativeIOSApp(){return this.isNativeApp()&&(X.o5U.isIOS()||X.o5U.isIpadOS()||"OS X"===X.o5U.getOsName())}static isNativeAndroidApp(){return this.isNativeApp()&&X.o5U.isAndroid()&&!this.isNativeAmazonApp()}static getDeviceSource(){return this.isNativeApp()?this.isNativeIOSApp()?Q.APPLE:Q.GOOGLE:Q.WEB}static isNativeAmazonApp(){const q=window.expoReleaseChannel;return X.Aq$.isDefined(q)&&q.indexOf("amazon")>-1}static isDeprecatedIOS(){let q=!1;const K=screen.availWidth,z=screen.availHeight;return X.o5U.isIOS()&&((K<=768&&z<=1024||K<=1024&&z<=768)&&window.devicePixelRatio<2&&(q=!0),(K<=320&&z<=480||K<=480&&z<=320)&&(q=!0)),q}static getWheelEventName(){let q=null;return"onwheel"in window?q="wheel":"onmousewheel"in window?q="mousewheel":X.o5U.isFirefox()&&"MouseScrollEvent"in window&&(q="DOMMouseScroll"),q}static hasMSPointerSupport(){return navigator.msPointerEnabled||navigator.pointerEnabled||!1}static hasPointerLockSupport(){return"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document}static hasTouchSupport(){return"ontouchstart"in window}static isFullscreenSupported(){return null!==this.getFullscreenRequestMethod()}static isFullscreenKeyboardSupported(){var q;return(null===(q=window.Element)||void 0===q?void 0:q.ALLOW_KEYBOARD_INPUT)||!1}static getFullscreenRequestMethod(){if(void 0!==this._requestFullscreenMethod)return this._requestFullscreenMethod;this._requestFullscreenMethod=null;const q=document.createElement("div");for(const K of et)if(q[K]){this._requestFullscreenMethod=K;break}return this._requestFullscreenMethod}static getFullscreenCancelMethod(){if(void 0!==this._cancelFullscreenMethod)return this._cancelFullscreenMethod;this._cancelFullscreenMethod=null;for(const q of it)if(document[q]){this._cancelFullscreenMethod=q;break}return this._cancelFullscreenMethod}}st._minimumSupportedVersionForMobileMembershipPurchase=[4,9,1],st._minimumSupportedVersionForIosRevenueCatMembershipPurchase=[4,9,4],st._minimumSupportedVersionForMobileMembershipPurchaseMultipleTiers=[4,9,6],st.PERFORMANCE_WARNING_CONFIG=new tt.Z("BUTTON_OKAY_CAPITAL",null,J.E.Medium,500,"WARNING","WARNING_DEVICE_PERFORMANCE",void 0,void 0,void 0,Z.l.ErrorDialogHeader)},50664:(q,K,z)=>{"use strict";z.d(K,{F:()=>X});var Y=z(68910),Q=z(82366);class X{static createBox(q,K,z,Y,Q,X,Z,J){const tt=q.add.graphics(0,0,J);return tt.beginFill(X,Z),tt.lineTo(Y,0),tt.lineTo(Y,Q),tt.lineTo(0,Q),tt.lineTo(0,0),tt.x=K,tt.y=z,tt.endFill(),tt}static drawBounds(q,K,z=K.getLocalBounds(),X=16711680){const Z=new Q.A(q,0,0);Z.name="debugBounds",Z.lineStyle(2,X,.5);return Z.drawPolygon([new Y.Point(-8,-8),new Y.Point(8,8),new Y.Point(0,0),new Y.Point(8,-8),new Y.Point(-8,8)]),Z.drawRect(z.x,z.y,z.width,z.height),K.addChild(Z),Z}}},3862:(q,K,z)=>{"use strict";z.d(K,{B:()=>Z});var Y=z(95891),Q=z(35120),X=z(5898);class Z{static setLastDungeonRun(q,K,z){const X=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let Z=X.data.dungeonRunsTimeStamps;if(Z){const q=Y.find(Z,["dungeonName",K]);q?q.lastRunTimeStamp=z:Z.push({dungeonName:K,lastRunTimeStamp:z})}else Z=[{dungeonName:K,lastRunTimeStamp:z}];X.data.dungeonRunsTimeStamps=Z}static getLastDungeonRun(q,K){const z=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(z.data.dungeonRunsTimeStamps){const q=Y.find(z.data.dungeonRunsTimeStamps,["dungeonName",K]);if(q)return q}return null}static setDungeonRunCompleteTime(q,K,z){const Z=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let J=Z.data.dungeonRunsCompleteTimeStamps;if(J){const q=Y.find(J,["dungeonName",K]);q?q.lastRunTimeStamp=z:J.push({dungeonName:K,lastRunTimeStamp:z})}else J=[{dungeonName:K,lastRunTimeStamp:z}];Z.data.dungeonRunsCompleteTimeStamps=J,Z.achievements.increment(X.f.ArchivesRuns,1)}static getDungeonRunComplete(q){return Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.dungeonRunsCompleteTimeStamps}}},10711:(q,K,z)=>{"use strict";z.d(K,{$U:()=>ht,H9:()=>ot,K8:()=>it,KQ:()=>at,Nx:()=>nt,_m:()=>rt,ty:()=>ct,uA:()=>et});var Y=z(62459),Q=z(34656),X=z(35120),Z=z(77938);const J={hat:0,outfit:1,boots:2,weapon:3,spellRelic:4,pet:5,petHat:6,petRelic:7,follow:8,mount:9,dorm:10,item:11,currency:12},tt={27:0,1:1,12:2,13:3,14:4,15:5,16:6,19:7,11:8};function et(q,K){var z;return null!==(z=q.finalPrice)&&void 0!==z?z:Q.j.calculateFinalCost(q.task,K)}function it(q,K){const z=q.reduce(((q,K)=>{var z;const X=Q.j.getItemRewards(K.task);if(!Y.Aq$.isDefined(X[0].ID))return q;const Z=`${X[0].type}-${X[0].ID}`;return null!==(z=q[Z])&&void 0!==z||(q[Z]=[]),q[Z].push(K),q}),{});return Object.keys(z).map((q=>{const X=z[q][0],J=!!K&&!0!==K[X.task.id],tt=et(X,((q,K)=>{var z;return null===(z=Z.t.getItem(q,K))||void 0===z?void 0:z.data})),it=Q.j.getItemRewards(X.task),st=it[0],nt=new Map;it.slice(1).forEach((q=>{const K=nt.get(q.ID);Y.Aq$.isDefined(K)?K.N+=q.N:nt.set(q.ID,q)}));const at=z[q].reduce((q=>q+ +(X.task.repeatable||1)),0);return{item:Z.t.getItem(st.type,st.ID),additionalItems:Array.from(nt.values()),currencyID:tt.currency,currencyAmount:tt.value,dynamicStoreData:{itemQuantity:at,offers:z[q],isNew:J,title:X.task.metadata.displayName,subtitle:X.task.metadata.displaySubtitle}}})).sort(st)}function st(q,K){var z,X,et,it,st,nt,at,rt,ot,ht,ct,dt;if(!Y.Aq$.isDefined(q.dynamicStoreData)||!Y.Aq$.isDefined(K.dynamicStoreData))return Y.VyI.log("DynamicStoreUtils: Trying to sort something undefined.",Y.$bb.Warning),0;const lt=Q.j.getItemRewards(q.dynamicStoreData.offers[0].task)[0],ut=Q.j.getItemRewards(K.dynamicStoreData.offers[0].task)[0],ft=Z.t.getItem(lt.type,lt.ID),bt=Z.t.getItem(ut.type,ut.ID);if(!Y.Aq$.isDefined(ft)||!Y.Aq$.isDefined(bt))return Y.VyI.log("DynamicStoreUtils: Trying to sort a null item.",Y.$bb.Warning),0;const pt=(null!==(z=J[ft.type])&&void 0!==z?z:Number.MAX_SAFE_INTEGER)-(null!==(X=J[bt.type])&&void 0!==X?X:Number.MAX_SAFE_INTEGER);if(0!==pt)return pt;if("currency"===ft.type){const q=(null!==(et=tt[ft.ID])&&void 0!==et?et:Number.MAX_SAFE_INTEGER)-(null!==(it=tt[bt.ID])&&void 0!==it?it:Number.MAX_SAFE_INTEGER);if(0!==q)return q}const vt=null!==(nt=null===(st=null==ft?void 0:ft.data)||void 0===st?void 0:st.rarity)&&void 0!==nt?nt:Number.MAX_SAFE_INTEGER,gt=(null!==(rt=null===(at=null==bt?void 0:bt.data)||void 0===at?void 0:at.rarity)&&void 0!==rt?rt:Number.MAX_SAFE_INTEGER)-vt;if(0!==gt)return gt;const mt=(null!==(ot=tt[q.currencyID])&&void 0!==ot?ot:Number.MAX_SAFE_INTEGER)-(null!==(ht=tt[K.currencyID])&&void 0!==ht?ht:Number.MAX_SAFE_INTEGER);if(0!==mt)return mt;const yt=K.currencyAmount-q.currencyAmount;return 0!==yt?yt:(null!==(ct=ft.ID)&&void 0!==ct?ct:Number.MAX_SAFE_INTEGER)-(null!==(dt=bt.ID)&&void 0!==dt?dt:Number.MAX_SAFE_INTEGER)}function nt(q){const K=q.task.repeatable;return"boolean"==typeof K&&K?Number.MAX_SAFE_INTEGER:"number"==typeof K?K:1}function at(q){const K=X.q.instance.prodigy.gameContainer.get("782-c308");return K.data.dynamicStoreModalLastSeenDateMap||(K.data.dynamicStoreModalLastSeenDateMap={}),K.data.dynamicStoreModalLastSeenDateMap[q]}function rt(q){const K=X.q.instance.prodigy.gameContainer.get("782-c308");K.data.dynamicStoreModalLastSeenDateMap||(K.data.dynamicStoreModalLastSeenDateMap={}),K.data.dynamicStoreModalLastSeenDateMap[q]=Date.now()}function ot(q){return q.some((q=>{var K,z;const Q=Z.t.getItem(q.type,q.ID);return Y.Aq$.isDefined(Q)&&(null!==(z=null===(K=Q.data)||void 0===K?void 0:K.member)&&void 0!==z?z:0)>0}))}function ht(q,K){return q.some((q=>{var z,Q;const X=Z.t.getItem(q.type,q.ID);return Y.Aq$.isDefined(X)&&(null!==(Q=null===(z=X.data)||void 0===z?void 0:z.lockLevel)&&void 0!==Q?Q:0)>K}))}function ct(q){return(!Y.Aq$.isDefined(q.emptySectionInfo)||0===q.emptySectionInfo.title.length||0===q.emptySectionInfo.subtitle.length)&&0===q.offers.length}},14726:(q,K,z)=>{"use strict";var Y;z.d(K,{T:()=>Y}),function(q){q[q.Day=864e5]="Day",q[q.Week=6048e5]="Week",q[q.Month=2592e6]="Month",q[q.Year=31556952e3]="Year"}(Y||(Y={}))},52498:(q,K,z)=>{"use strict";var Y;z.d(K,{h:()=>Y}),function(q){q[q.Local=0]="Local",q[q.QABox=1]="QABox",q[q.Dev=2]="Dev",q[q.Staging=3]="Staging",q[q.Production=4]="Production"}(Y||(Y={}))},90351:(q,K,z)=>{"use strict";z.d(K,{K:()=>X,i:()=>Y});var Y,Q=z(62459);!function(q){q.LinearNone="linearNone",q.BackIn="backIn",q.BackOut="backOut",q.BackInOut="backInOut",q.BounceIn="bounceIn",q.BounceOut="bounceOut",q.BounceInOut="bounceInOut",q.CircularIn="circularIn",q.CircularOut="circularOut",q.CircularInOut="circularInOut",q.CubicIn="cubicIn",q.CubicOut="cubicOut",q.CubicInOut="cubicInOut",q.ElasticIn="elasticIn",q.ElasticOut="elasticOut",q.ElasticInOut="elasticInOut",q.ExponentialIn="exponentialIn",q.ExponentialOut="exponentialOut",q.ExponentialInOut="exponentialInOut",q.QuadraticIn="quadraticIn",q.QuadraticOut="quadraticOut",q.QuadraticInOut="quadraticInOut",q.QuinticIn="quinticIn",q.QuinticOut="quinticOut",q.QuinticInOut="quinticInOut",q.QuarticIn="quarticIn",q.QuarticOut="quarticOut",q.QuarticInOut="quarticInOut",q.SinusoidalIn="sinusoidalIn",q.SinusoidalOut="sinusoidalOut",q.SinusoidalInOut="sinusoidalInOut"}(Y||(Y={}));class X{static getEasingFunctionFromEnum(q){switch(q){case Y.BackIn:return Q.GS3.Back.In;case Y.BackOut:return Q.GS3.Back.Out;case Y.BackInOut:return Q.GS3.Back.InOut;case Y.BounceIn:return Q.GS3.Bounce.In;case Y.BounceOut:return Q.GS3.Bounce.Out;case Y.BounceInOut:return Q.GS3.Bounce.InOut;case Y.CircularIn:return Q.GS3.Circular.In;case Y.CircularOut:return Q.GS3.Circular.Out;case Y.CircularInOut:return Q.GS3.Circular.InOut;case Y.CubicIn:return Q.GS3.Cubic.In;case Y.CubicOut:return Q.GS3.Cubic.Out;case Y.CubicInOut:return Q.GS3.Cubic.InOut;case Y.ElasticIn:return Q.GS3.Elastic.In;case Y.ElasticOut:return Q.GS3.Elastic.Out;case Y.ElasticInOut:return Q.GS3.Elastic.InOut;case Y.ExponentialIn:return Q.GS3.Exponential.In;case Y.ExponentialOut:return Q.GS3.Exponential.Out;case Y.ExponentialInOut:return Q.GS3.Exponential.InOut;case Y.QuadraticIn:return Q.GS3.Quadratic.In;case Y.QuadraticOut:return Q.GS3.Quadratic.Out;case Y.QuadraticInOut:return Q.GS3.Quadratic.InOut;case Y.QuinticIn:return Q.GS3.Quintic.In;case Y.QuinticOut:return Q.GS3.Quintic.Out;case Y.QuinticInOut:return Q.GS3.Quintic.InOut;case Y.QuarticIn:return Q.GS3.Quartic.In;case Y.QuarticOut:return Q.GS3.Quartic.Out;case Y.QuarticInOut:return Q.GS3.Quartic.InOut;case Y.SinusoidalIn:return Q.GS3.Sinusoidal.In;case Y.SinusoidalOut:return Q.GS3.Sinusoidal.Out;case Y.SinusoidalInOut:return Q.GS3.Sinusoidal.InOut;case Y.LinearNone:default:return Q.GS3.Linear.None}}}},29546:(q,K,z)=>{"use strict";z.d(K,{X:()=>Z});var Y=z(62459),Q=z(35120),X=z(77938);class Z{static isMathSubjectRequirementMet(){return Q.q.instance.prodigy.gameContainer.get("11f-118a").meetsRequirementsDeprecated(58)}static getFeatureRequirementData(q){var K;return null===(K=X.t.getItem("featureRequirements",q))||void 0===K?void 0:K.data}static getLevelRequirement(q){const K=this.getFeatureRequirementData(q);if(K)for(let z=0;z{"use strict";z.d(K,{N:()=>Gn});var Y=z(8674);class Q extends Error{}class X extends Q{constructor(q){super(`Invalid DateTime: ${q.toMessage()}`)}}class Z extends Q{constructor(q){super(`Invalid Interval: ${q.toMessage()}`)}}class J extends Q{constructor(q){super(`Invalid Duration: ${q.toMessage()}`)}}class tt extends Q{}class et extends Q{constructor(q){super(`Invalid unit ${q}`)}}class it extends Q{}class st extends Q{constructor(){super("Zone is an abstract class")}}const nt="numeric",at="short",rt="long",ot={year:nt,month:nt,day:nt},ht={year:nt,month:at,day:nt},ct={year:nt,month:at,day:nt,weekday:at},dt={year:nt,month:rt,day:nt},lt={year:nt,month:rt,day:nt,weekday:rt},ut={hour:nt,minute:nt},ft={hour:nt,minute:nt,second:nt},bt={hour:nt,minute:nt,second:nt,timeZoneName:at},pt={hour:nt,minute:nt,second:nt,timeZoneName:rt},vt={hour:nt,minute:nt,hourCycle:"h23"},gt={hour:nt,minute:nt,second:nt,hourCycle:"h23"},mt={hour:nt,minute:nt,second:nt,hourCycle:"h23",timeZoneName:at},yt={hour:nt,minute:nt,second:nt,hourCycle:"h23",timeZoneName:rt},_t={year:nt,month:nt,day:nt,hour:nt,minute:nt},Et={year:nt,month:nt,day:nt,hour:nt,minute:nt,second:nt},wt={year:nt,month:at,day:nt,hour:nt,minute:nt},Tt={year:nt,month:at,day:nt,hour:nt,minute:nt,second:nt},St={year:nt,month:at,day:nt,weekday:at,hour:nt,minute:nt},At={year:nt,month:rt,day:nt,hour:nt,minute:nt,timeZoneName:at},Ct={year:nt,month:rt,day:nt,hour:nt,minute:nt,second:nt,timeZoneName:at},Ot={year:nt,month:rt,day:nt,weekday:rt,hour:nt,minute:nt,timeZoneName:rt},It={year:nt,month:rt,day:nt,weekday:rt,hour:nt,minute:nt,second:nt,timeZoneName:rt};class Dt{get type(){throw new st}get name(){throw new st}get ianaName(){return this.name}get isUniversal(){throw new st}offsetName(q,K){throw new st}formatOffset(q,K){throw new st}offset(q){throw new st}equals(q){throw new st}get isValid(){throw new st}}let Rt=null;class Pt extends Dt{static get instance(){return null===Rt&&(Rt=new Pt),Rt}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(q,{format:K,locale:z}){return Xe(q,K,z)}formatOffset(q,K){return ei(this.offset(q),K)}offset(q){return-new Date(q).getTimezoneOffset()}equals(q){return"system"===q.type}get isValid(){return!0}}const Mt=new Map;const Nt={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const xt=new Map;class Lt extends Dt{static create(q){let K=xt.get(q);return void 0===K&&xt.set(q,K=new Lt(q)),K}static resetCache(){xt.clear(),Mt.clear()}static isValidSpecifier(q){return this.isValidZone(q)}static isValidZone(q){if(!q)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:q}).format(),!0}catch(e){return!1}}constructor(q){super(),this.zoneName=q,this.valid=Lt.isValidZone(q)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(q,{format:K,locale:z}){return Xe(q,K,z,this.name)}formatOffset(q,K){return ei(this.offset(q),K)}offset(q){if(!this.valid)return NaN;const K=new Date(q);if(isNaN(K))return NaN;const z=function(q){let K=Mt.get(q);return void 0===K&&(K=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:q,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Mt.set(q,K)),K}(this.name);let[Y,Q,X,Z,J,tt,et]=z.formatToParts?function(q,K){const z=q.formatToParts(K),Y=[];for(let Q=0;Q=0?st:1e3+st,(Ke({year:Y,month:Q,day:X,hour:24===J?0:J,minute:tt,second:et,millisecond:0})-it)/6e4}equals(q){return"iana"===q.type&&q.name===this.name}get isValid(){return this.valid}}let kt={};const Bt=new Map;function Ut(q,K={}){const z=JSON.stringify([q,K]);let Y=Bt.get(z);return void 0===Y&&(Y=new Intl.DateTimeFormat(q,K),Bt.set(z,Y)),Y}const Ft=new Map;const Gt=new Map;let jt=null;const $t=new Map;function Ht(q){let K=$t.get(q);return void 0===K&&(K=new Intl.DateTimeFormat(q).resolvedOptions(),$t.set(q,K)),K}const Vt=new Map;function Wt(q,K,z,Y){const Q=q.listingMode();return"error"===Q?null:"en"===Q?z(K):Y(K)}class qt{constructor(q,K,z){this.padTo=z.padTo||0,this.floor=z.floor||!1;const{padTo:Y,floor:Q,...X}=z;if(!K||Object.keys(X).length>0){const K={useGrouping:!1,...z};z.padTo>0&&(K.minimumIntegerDigits=z.padTo),this.inf=function(q,K={}){const z=JSON.stringify([q,K]);let Y=Ft.get(z);return void 0===Y&&(Y=new Intl.NumberFormat(q,K),Ft.set(z,Y)),Y}(q,K)}}format(q){if(this.inf){const K=this.floor?Math.floor(q):q;return this.inf.format(K)}return Fe(this.floor?Math.floor(q):He(q,3),this.padTo)}}class Kt{constructor(q,K,z){let Y;if(this.opts=z,this.originalZone=void 0,this.opts.timeZone)this.dt=q;else if("fixed"===q.zone.type){const K=q.offset/60*-1,z=K>=0?`Etc/GMT+${K}`:`Etc/GMT${K}`;0!==q.offset&&Lt.create(z).valid?(Y=z,this.dt=q):(Y="UTC",this.dt=0===q.offset?q:q.setZone("UTC").plus({minutes:q.offset}),this.originalZone=q.zone)}else"system"===q.zone.type?this.dt=q:"iana"===q.zone.type?(this.dt=q,Y=q.zone.name):(Y="UTC",this.dt=q.setZone("UTC").plus({minutes:q.offset}),this.originalZone=q.zone);const Q={...this.opts};Q.timeZone=Q.timeZone||Y,this.dtf=Ut(K,Q)}format(){return this.originalZone?this.formatToParts().map((({value:q})=>q)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const q=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?q.map((q=>{if("timeZoneName"===q.type){const K=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...q,value:K}}return q})):q}resolvedOptions(){return this.dtf.resolvedOptions()}}class zt{constructor(q,K,z){this.opts={style:"long",...z},!K&&Ne()&&(this.rtf=function(q,K={}){const{base:z,...Y}=K,Q=JSON.stringify([q,Y]);let X=Gt.get(Q);return void 0===X&&(X=new Intl.RelativeTimeFormat(q,K),Gt.set(Q,X)),X}(q,z))}format(q,K){return this.rtf?this.rtf.format(q,K):function(q,K,z="always",Y=!1){const Q={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},X=-1===["hours","minutes","seconds"].indexOf(q);if("auto"===z&&X){const z="days"===q;switch(K){case 1:return z?"tomorrow":`next ${Q[q][0]}`;case-1:return z?"yesterday":`last ${Q[q][0]}`;case 0:return z?"today":`this ${Q[q][0]}`}}const Z=Object.is(K,-0)||K<0,J=Math.abs(K),tt=1===J,et=Q[q],it=Y?tt?et[1]:et[2]||et[1]:tt?Q[q][0]:q;return Z?`${J} ${it} ago`:`in ${J} ${it}`}(K,q,this.opts.numeric,"long"!==this.opts.style)}formatToParts(q,K){return this.rtf?this.rtf.formatToParts(q,K):[]}}const Yt={firstDay:1,minimalDays:4,weekend:[6,7]};class Qt{static fromOpts(q){return Qt.create(q.locale,q.numberingSystem,q.outputCalendar,q.weekSettings,q.defaultToEN)}static create(q,K,z,Y,Q=!1){const X=q||be.defaultLocale,Z=X||(Q?"en-US":jt||(jt=(new Intl.DateTimeFormat).resolvedOptions().locale,jt)),J=K||be.defaultNumberingSystem,tt=z||be.defaultOutputCalendar,et=Be(Y)||be.defaultWeekSettings;return new Qt(Z,J,tt,et,X)}static resetCache(){jt=null,Bt.clear(),Ft.clear(),Gt.clear(),$t.clear(),Vt.clear()}static fromObject({locale:q,numberingSystem:K,outputCalendar:z,weekSettings:Y}={}){return Qt.create(q,K,z,Y)}constructor(q,K,z,Y,Q){const[X,Z,J]=function(q){const K=q.indexOf("-x-");-1!==K&&(q=q.substring(0,K));const z=q.indexOf("-u-");if(-1===z)return[q];{let K,Y;try{K=Ut(q).resolvedOptions(),Y=q}catch(e){const X=q.substring(0,z);K=Ut(X).resolvedOptions(),Y=X}const{numberingSystem:Q,calendar:X}=K;return[Y,Q,X]}}(q);this.locale=X,this.numberingSystem=K||Z||null,this.outputCalendar=z||J||null,this.weekSettings=Y,this.intl=function(q,K,z){return z||K?(q.includes("-u-")||(q+="-u"),z&&(q+=`-ca-${z}`),K&&(q+=`-nu-${K}`),q):q}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=Q,this.fastNumbersCached=null}get fastNumbers(){var q;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(q=this).numberingSystem||"latn"===q.numberingSystem)&&("latn"===q.numberingSystem||!q.locale||q.locale.startsWith("en")||"latn"===Ht(q.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const q=this.isEnglish(),K=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return q&&K?"en":"intl"}clone(q){return q&&0!==Object.getOwnPropertyNames(q).length?Qt.create(q.locale||this.specifiedLocale,q.numberingSystem||this.numberingSystem,q.outputCalendar||this.outputCalendar,Be(q.weekSettings)||this.weekSettings,q.defaultToEN||!1):this}redefaultToEN(q={}){return this.clone({...q,defaultToEN:!0})}redefaultToSystem(q={}){return this.clone({...q,defaultToEN:!1})}months(q,K=!1){return Wt(this,q,ri,(()=>{const z="ja"===this.intl||this.intl.startsWith("ja-"),Y=(K&=!z)?{month:q,day:"numeric"}:{month:q},Q=K?"format":"standalone";if(!this.monthsCache[Q][q]){const K=z?q=>this.dtFormatter(q,Y).format():q=>this.extract(q,Y,"month");this.monthsCache[Q][q]=function(q){const K=[];for(let z=1;z<=12;z++){const Y=un.utc(2009,z,1);K.push(q(Y))}return K}(K)}return this.monthsCache[Q][q]}))}weekdays(q,K=!1){return Wt(this,q,di,(()=>{const z=K?{weekday:q,year:"numeric",month:"long",day:"numeric"}:{weekday:q},Y=K?"format":"standalone";return this.weekdaysCache[Y][q]||(this.weekdaysCache[Y][q]=function(q){const K=[];for(let z=1;z<=7;z++){const Y=un.utc(2016,11,13+z);K.push(q(Y))}return K}((q=>this.extract(q,z,"weekday")))),this.weekdaysCache[Y][q]}))}meridiems(){return Wt(this,void 0,(()=>li),(()=>{if(!this.meridiemCache){const q={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[un.utc(2016,11,13,9),un.utc(2016,11,13,19)].map((K=>this.extract(K,q,"dayperiod")))}return this.meridiemCache}))}eras(q){return Wt(this,q,pi,(()=>{const K={era:q};return this.eraCache[q]||(this.eraCache[q]=[un.utc(-40,1,1),un.utc(2017,1,1)].map((q=>this.extract(q,K,"era")))),this.eraCache[q]}))}extract(q,K,z){const Y=this.dtFormatter(q,K).formatToParts().find((q=>q.type.toLowerCase()===z));return Y?Y.value:null}numberFormatter(q={}){return new qt(this.intl,q.forceSimple||this.fastNumbers,q)}dtFormatter(q,K={}){return new Kt(q,this.intl,K)}relFormatter(q={}){return new zt(this.intl,this.isEnglish(),q)}listFormatter(q={}){return function(q,K={}){const z=JSON.stringify([q,K]);let Y=kt[z];return Y||(Y=new Intl.ListFormat(q,K),kt[z]=Y),Y}(this.intl,q)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Ht(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:xe()?function(q){let K=Vt.get(q);if(!K){const z=new Intl.Locale(q);K="getWeekInfo"in z?z.getWeekInfo():z.weekInfo,"minimalDays"in K||(K={...Yt,...K}),Vt.set(q,K)}return K}(this.locale):Yt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(q){return this.locale===q.locale&&this.numberingSystem===q.numberingSystem&&this.outputCalendar===q.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Xt=null;class Zt extends Dt{static get utcInstance(){return null===Xt&&(Xt=new Zt(0)),Xt}static instance(q){return 0===q?Zt.utcInstance:new Zt(q)}static parseSpecifier(q){if(q){const K=q.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(K)return new Zt(Ze(K[1],K[2]))}return null}constructor(q){super(),this.fixed=q}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${ei(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${ei(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(q,K){return ei(this.fixed,K)}get isUniversal(){return!0}offset(){return this.fixed}equals(q){return"fixed"===q.type&&q.fixed===this.fixed}get isValid(){return!0}}class Jt extends Dt{constructor(q){super(),this.zoneName=q}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function te(q,K){if(Re(q)||null===q)return K;if(q instanceof Dt)return q;if("string"==typeof q){const z=q.toLowerCase();return"default"===z?K:"local"===z||"system"===z?Pt.instance:"utc"===z||"gmt"===z?Zt.utcInstance:Zt.parseSpecifier(z)||Lt.create(q)}return Pe(q)?Zt.instance(q):"object"==typeof q&&"offset"in q&&"function"==typeof q.offset?q:new Jt(q)}const ee={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ie={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},se=ee.hanidec.replace(/[\[|\]]/g,"").split("");const ne=new Map;function ae({numberingSystem:q},K=""){const z=q||"latn";let Y=ne.get(z);void 0===Y&&(Y=new Map,ne.set(z,Y));let Q=Y.get(K);return void 0===Q&&(Q=new RegExp(`${ee[z]}${K}`),Y.set(K,Q)),Q}let re,oe=()=>Date.now(),he="system",ce=null,de=null,le=null,ue=60,fe=null;class be{static get now(){return oe}static set now(q){oe=q}static set defaultZone(q){he=q}static get defaultZone(){return te(he,Pt.instance)}static get defaultLocale(){return ce}static set defaultLocale(q){ce=q}static get defaultNumberingSystem(){return de}static set defaultNumberingSystem(q){de=q}static get defaultOutputCalendar(){return le}static set defaultOutputCalendar(q){le=q}static get defaultWeekSettings(){return fe}static set defaultWeekSettings(q){fe=Be(q)}static get twoDigitCutoffYear(){return ue}static set twoDigitCutoffYear(q){ue=q%100}static get throwOnInvalid(){return re}static set throwOnInvalid(q){re=q}static resetCaches(){Qt.resetCache(),Lt.resetCache(),un.resetCache(),ne.clear()}}class pe{constructor(q,K){this.reason=q,this.explanation=K}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ve=[0,31,59,90,120,151,181,212,243,273,304,334],ge=[0,31,60,91,121,152,182,213,244,274,305,335];function me(q,K){return new pe("unit out of range",`you specified ${K} (of type ${typeof K}) as a ${q}, which is invalid`)}function ye(q,K,z){const Y=new Date(Date.UTC(q,K-1,z));q<100&&q>=0&&Y.setUTCFullYear(Y.getUTCFullYear()-1900);const Q=Y.getUTCDay();return 0===Q?7:Q}function _e(q,K,z){return z+(Ve(q)?ge:ve)[K-1]}function Ee(q,K){const z=Ve(q)?ge:ve,Y=z.findIndex((q=>qYe(Y,K,z)?(tt=Y+1,et=1):tt=Y,{weekYear:tt,weekNumber:et,weekday:J,...ii(q)}}function Se(q,K=4,z=1){const{weekYear:Y,weekNumber:Q,weekday:X}=q,Z=we(ye(Y,1,K),z),J=We(Y);let tt,et=7*Q+X-Z-7+K;et<1?(tt=Y-1,et+=We(tt)):et>J?(tt=Y+1,et-=We(Y)):tt=Y;const{month:it,day:st}=Ee(tt,et);return{year:tt,month:it,day:st,...ii(q)}}function Ae(q){const{year:K,month:z,day:Y}=q;return{year:K,ordinal:_e(K,z,Y),...ii(q)}}function Ce(q){const{year:K,ordinal:z}=q,{month:Y,day:Q}=Ee(K,z);return{year:K,month:Y,day:Q,...ii(q)}}function Oe(q,K){if(!Re(q.localWeekday)||!Re(q.localWeekNumber)||!Re(q.localWeekYear)){if(!Re(q.weekday)||!Re(q.weekNumber)||!Re(q.weekYear))throw new tt("Cannot mix locale-based week fields with ISO-based week fields");return Re(q.localWeekday)||(q.weekday=q.localWeekday),Re(q.localWeekNumber)||(q.weekNumber=q.localWeekNumber),Re(q.localWeekYear)||(q.weekYear=q.localWeekYear),delete q.localWeekday,delete q.localWeekNumber,delete q.localWeekYear,{minDaysInFirstWeek:K.getMinDaysInFirstWeek(),startOfWeek:K.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Ie(q){const K=Me(q.year),z=Ue(q.month,1,12),Y=Ue(q.day,1,qe(q.year,q.month));return K?z?!Y&&me("day",q.day):me("month",q.month):me("year",q.year)}function De(q){const{hour:K,minute:z,second:Y,millisecond:Q}=q,X=Ue(K,0,23)||24===K&&0===z&&0===Y&&0===Q,Z=Ue(z,0,59),J=Ue(Y,0,59),tt=Ue(Q,0,999);return X?Z?J?!tt&&me("millisecond",Q):me("second",Y):me("minute",z):me("hour",K)}function Re(q){return void 0===q}function Pe(q){return"number"==typeof q}function Me(q){return"number"==typeof q&&q%1==0}function Ne(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function xe(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Le(q,K,z){if(0!==q.length)return q.reduce(((q,Y)=>{const Q=[K(Y),Y];return q&&z(q[0],Q[0])===q[0]?q:Q}),null)[1]}function ke(q,K){return Object.prototype.hasOwnProperty.call(q,K)}function Be(q){if(null==q)return null;if("object"!=typeof q)throw new it("Week settings must be an object");if(!Ue(q.firstDay,1,7)||!Ue(q.minimalDays,1,7)||!Array.isArray(q.weekend)||q.weekend.some((q=>!Ue(q,1,7))))throw new it("Invalid week settings");return{firstDay:q.firstDay,minimalDays:q.minimalDays,weekend:Array.from(q.weekend)}}function Ue(q,K,z){return Me(q)&&q>=K&&q<=z}function Fe(q,K=2){let z;return z=q<0?"-"+(""+-q).padStart(K,"0"):(""+q).padStart(K,"0"),z}function Ge(q){return Re(q)||null===q||""===q?void 0:parseInt(q,10)}function je(q){return Re(q)||null===q||""===q?void 0:parseFloat(q)}function $e(q){if(!Re(q)&&null!==q&&""!==q){const K=1e3*parseFloat("0."+q);return Math.floor(K)}}function He(q,K,z="round"){const Y=10**K;switch(z){case"expand":return q>0?Math.ceil(q*Y)/Y:Math.floor(q*Y)/Y;case"trunc":return Math.trunc(q*Y)/Y;case"round":return Math.round(q*Y)/Y;case"floor":return Math.floor(q*Y)/Y;case"ceil":return Math.ceil(q*Y)/Y;default:throw new RangeError(`Value rounding ${z} is out of range`)}}function Ve(q){return q%4==0&&(q%100!=0||q%400==0)}function We(q){return Ve(q)?366:365}function qe(q,K){const z=function(q,K){return q-K*Math.floor(q/K)}(K-1,12)+1;return 2===z?Ve(q+(K-z)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][z-1]}function Ke(q){let K=Date.UTC(q.year,q.month-1,q.day,q.hour,q.minute,q.second,q.millisecond);return q.year<100&&q.year>=0&&(K=new Date(K),K.setUTCFullYear(q.year,q.month-1,q.day)),+K}function ze(q,K,z){return-we(ye(q,1,K),z)+K-1}function Ye(q,K=4,z=1){const Y=ze(q,K,z),Q=ze(q+1,K,z);return(We(q)-Y+Q)/7}function Qe(q){return q>99?q:q>be.twoDigitCutoffYear?1900+q:2e3+q}function Xe(q,K,z,Y=null){const Q=new Date(q),X={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};Y&&(X.timeZone=Y);const Z={timeZoneName:K,...X},J=new Intl.DateTimeFormat(z,Z).formatToParts(Q).find((q=>"timezonename"===q.type.toLowerCase()));return J?J.value:null}function Ze(q,K){let z=parseInt(q,10);Number.isNaN(z)&&(z=0);const Y=parseInt(K,10)||0;return 60*z+(z<0||Object.is(z,-0)?-Y:Y)}function Je(q){const K=Number(q);if("boolean"==typeof q||""===q||!Number.isFinite(K))throw new it(`Invalid unit value ${q}`);return K}function ti(q,K){const z={};for(const Y in q)if(ke(q,Y)){const Q=q[Y];if(null==Q)continue;z[K(Y)]=Je(Q)}return z}function ei(q,K){const z=Math.trunc(Math.abs(q/60)),Y=Math.trunc(Math.abs(q%60)),Q=q>=0?"+":"-";switch(K){case"short":return`${Q}${Fe(z,2)}:${Fe(Y,2)}`;case"narrow":return`${Q}${z}${Y>0?`:${Y}`:""}`;case"techie":return`${Q}${Fe(z,2)}${Fe(Y,2)}`;default:throw new RangeError(`Value format ${K} is out of range for property format`)}}function ii(q){return function(q,K){return K.reduce(((K,z)=>(K[z]=q[z],K)),{})}(q,["hour","minute","second","millisecond"])}const si=["January","February","March","April","May","June","July","August","September","October","November","December"],ni=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ai=["J","F","M","A","M","J","J","A","S","O","N","D"];function ri(q){switch(q){case"narrow":return[...ai];case"short":return[...ni];case"long":return[...si];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const oi=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],hi=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ci=["M","T","W","T","F","S","S"];function di(q){switch(q){case"narrow":return[...ci];case"short":return[...hi];case"long":return[...oi];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const li=["AM","PM"],ui=["Before Christ","Anno Domini"],fi=["BC","AD"],bi=["B","A"];function pi(q){switch(q){case"narrow":return[...bi];case"short":return[...fi];case"long":return[...ui];default:return null}}function vi(q,K){let z="";for(const Y of q)Y.literal?z+=Y.val:z+=K(Y.val);return z}const gi={D:ot,DD:ht,DDD:dt,DDDD:lt,t:ut,tt:ft,ttt:bt,tttt:pt,T:vt,TT:gt,TTT:mt,TTTT:yt,f:_t,ff:wt,fff:At,ffff:Ot,F:Et,FF:Tt,FFF:Ct,FFFF:It};class mi{static create(q,K={}){return new mi(q,K)}static parseFormat(q){let K=null,z="",Y=!1;const Q=[];for(let X=0;X0||Y)&&Q.push({literal:Y||/^\s+$/.test(z),val:""===z?"'":z}),K=null,z="",Y=!Y):Y||Z===K?z+=Z:(z.length>0&&Q.push({literal:/^\s+$/.test(z),val:z}),z=Z,K=Z)}return z.length>0&&Q.push({literal:Y||/^\s+$/.test(z),val:z}),Q}static macroTokenToFormatOpts(q){return gi[q]}constructor(q,K){this.opts=K,this.loc=q,this.systemLoc=null}formatWithSystemDefault(q,K){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(q,{...this.opts,...K}).format()}dtFormatter(q,K={}){return this.loc.dtFormatter(q,{...this.opts,...K})}formatDateTime(q,K){return this.dtFormatter(q,K).format()}formatDateTimeParts(q,K){return this.dtFormatter(q,K).formatToParts()}formatInterval(q,K){return this.dtFormatter(q.start,K).dtf.formatRange(q.start.toJSDate(),q.end.toJSDate())}resolvedOptions(q,K){return this.dtFormatter(q,K).resolvedOptions()}num(q,K=0,z){if(this.opts.forceSimple)return Fe(q,K);const Y={...this.opts};return K>0&&(Y.padTo=K),z&&(Y.signDisplay=z),this.loc.numberFormatter(Y).format(q)}formatDateTimeFromString(q,K){const z="en"===this.loc.listingMode(),Y=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,Q=(K,z)=>this.loc.extract(q,K,z),X=K=>q.isOffsetFixed&&0===q.offset&&K.allowZ?"Z":q.isValid?q.zone.formatOffset(q.ts,K.format):"",Z=()=>z?function(q){return li[q.hour<12?0:1]}(q):Q({hour:"numeric",hourCycle:"h12"},"dayperiod"),J=(K,Y)=>z?function(q,K){return ri(K)[q.month-1]}(q,K):Q(Y?{month:K}:{month:K,day:"numeric"},"month"),tt=(K,Y)=>z?function(q,K){return di(K)[q.weekday-1]}(q,K):Q(Y?{weekday:K}:{weekday:K,month:"long",day:"numeric"},"weekday"),et=K=>{const z=mi.macroTokenToFormatOpts(K);return z?this.formatWithSystemDefault(q,z):K},it=K=>z?function(q,K){return pi(K)[q.year<0?0:1]}(q,K):Q({era:K},"era");return vi(mi.parseFormat(K),(K=>{switch(K){case"S":return this.num(q.millisecond);case"u":case"SSS":return this.num(q.millisecond,3);case"s":return this.num(q.second);case"ss":return this.num(q.second,2);case"uu":return this.num(Math.floor(q.millisecond/10),2);case"uuu":return this.num(Math.floor(q.millisecond/100));case"m":return this.num(q.minute);case"mm":return this.num(q.minute,2);case"h":return this.num(q.hour%12==0?12:q.hour%12);case"hh":return this.num(q.hour%12==0?12:q.hour%12,2);case"H":return this.num(q.hour);case"HH":return this.num(q.hour,2);case"Z":return X({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return X({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return X({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return q.zone.offsetName(q.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return q.zone.offsetName(q.ts,{format:"long",locale:this.loc.locale});case"z":return q.zoneName;case"a":return Z();case"d":return Y?Q({day:"numeric"},"day"):this.num(q.day);case"dd":return Y?Q({day:"2-digit"},"day"):this.num(q.day,2);case"c":return this.num(q.weekday);case"ccc":return tt("short",!0);case"cccc":return tt("long",!0);case"ccccc":return tt("narrow",!0);case"E":return this.num(q.weekday);case"EEE":return tt("short",!1);case"EEEE":return tt("long",!1);case"EEEEE":return tt("narrow",!1);case"L":return Y?Q({month:"numeric",day:"numeric"},"month"):this.num(q.month);case"LL":return Y?Q({month:"2-digit",day:"numeric"},"month"):this.num(q.month,2);case"LLL":return J("short",!0);case"LLLL":return J("long",!0);case"LLLLL":return J("narrow",!0);case"M":return Y?Q({month:"numeric"},"month"):this.num(q.month);case"MM":return Y?Q({month:"2-digit"},"month"):this.num(q.month,2);case"MMM":return J("short",!1);case"MMMM":return J("long",!1);case"MMMMM":return J("narrow",!1);case"y":return Y?Q({year:"numeric"},"year"):this.num(q.year);case"yy":return Y?Q({year:"2-digit"},"year"):this.num(q.year.toString().slice(-2),2);case"yyyy":return Y?Q({year:"numeric"},"year"):this.num(q.year,4);case"yyyyyy":return Y?Q({year:"numeric"},"year"):this.num(q.year,6);case"G":return it("short");case"GG":return it("long");case"GGGGG":return it("narrow");case"kk":return this.num(q.weekYear.toString().slice(-2),2);case"kkkk":return this.num(q.weekYear,4);case"W":return this.num(q.weekNumber);case"WW":return this.num(q.weekNumber,2);case"n":return this.num(q.localWeekNumber);case"nn":return this.num(q.localWeekNumber,2);case"ii":return this.num(q.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(q.localWeekYear,4);case"o":return this.num(q.ordinal);case"ooo":return this.num(q.ordinal,3);case"q":return this.num(q.quarter);case"qq":return this.num(q.quarter,2);case"X":return this.num(Math.floor(q.ts/1e3));case"x":return this.num(q.ts);default:return et(K)}}))}formatDurationFromString(q,K){const z="negativeLargestOnly"===this.opts.signMode?-1:1,Y=q=>{switch(q[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},Q=mi.parseFormat(K),X=Q.reduce(((q,{literal:K,val:z})=>K?q:q.concat(z)),[]),Z=q.shiftTo(...X.map(Y).filter((q=>q)));return vi(Q,((q,K)=>Q=>{const X=Y(Q);if(X){const Y=K.isNegativeDuration&&X!==K.largestUnit?z:1;let Z;return Z="negativeLargestOnly"===this.opts.signMode&&X!==K.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(q.get(X)*Y,Q.length,Z)}return Q})(Z,{isNegativeDuration:Z<0,largestUnit:Object.keys(Z.values)[0]}))}}const yi=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function _i(...q){const K=q.reduce(((q,K)=>q+K.source),"");return RegExp(`^${K}$`)}function Ei(...q){return K=>q.reduce((([q,z,Y],Q)=>{const[X,Z,J]=Q(K,Y);return[{...q,...X},Z||z,J]}),[{},null,1]).slice(0,2)}function wi(q,...K){if(null==q)return[null,null];for(const[z,Y]of K){const K=z.exec(q);if(K)return Y(K)}return[null,null]}function Ti(...q){return(K,z)=>{const Y={};let Q;for(Q=0;Qvoid 0!==q&&(K||q&&it)?-q:q;return[{years:nt(je(z)),months:nt(je(Y)),weeks:nt(je(Q)),days:nt(je(X)),hours:nt(je(Z)),minutes:nt(je(J)),seconds:nt(je(tt),"-0"===tt),milliseconds:nt($e(et),st)}]}const Fi={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Gi(q,K,z,Y,Q,X,Z){const J={year:2===K.length?Qe(Ge(K)):Ge(K),month:ni.indexOf(z)+1,day:Ge(Y),hour:Ge(Q),minute:Ge(X)};return Z&&(J.second=Ge(Z)),q&&(J.weekday=q.length>3?oi.indexOf(q)+1:hi.indexOf(q)+1),J}const ji=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function $i(q){const[,K,z,Y,Q,X,Z,J,tt,et,it,st]=q,nt=Gi(K,Q,Y,z,X,Z,J);let at;return at=tt?Fi[tt]:et?0:Ze(it,st),[nt,new Zt(at)]}const Hi=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Vi=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Wi=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qi(q){const[,K,z,Y,Q,X,Z,J]=q;return[Gi(K,Q,Y,z,X,Z,J),Zt.utcInstance]}function Ki(q){const[,K,z,Y,Q,X,Z,J]=q;return[Gi(K,J,z,Y,Q,X,Z),Zt.utcInstance]}const zi=_i(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Oi),Yi=_i(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Oi),Qi=_i(/(\d{4})-?(\d{3})/,Oi),Xi=_i(Ci),Zi=Ei((function(q,K){return[{year:Mi(q,K),month:Mi(q,K+1,1),day:Mi(q,K+2,1)},null,K+3]}),Ni,xi,Li),Ji=Ei(Ii,Ni,xi,Li),ts=Ei(Di,Ni,xi,Li),es=Ei(Ni,xi,Li);const is=Ei(Ni);const ss=_i(/(\d{4})-(\d\d)-(\d\d)/,Pi),ns=_i(Ri),as=Ei(Ni,xi,Li);const rs="Invalid Duration",os={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},hs={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...os},cs=365.2425,ds=30.436875,ls={years:{quarters:4,months:12,weeks:52.1775,days:cs,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:ds,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...os},us=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],fs=us.slice(0).reverse();function bs(q,K,z=!1){const Y={values:z?K.values:{...q.values,...K.values||{}},loc:q.loc.clone(K.loc),conversionAccuracy:K.conversionAccuracy||q.conversionAccuracy,matrix:K.matrix||q.matrix};return new ms(Y)}function ps(q,K){let z=K.milliseconds??0;for(const Y of fs.slice(1))K[Y]&&(z+=K[Y]*q[Y].milliseconds);return z}function vs(q,K){const z=ps(q,K)<0?-1:1;us.reduceRight(((Y,Q)=>{if(Re(K[Q]))return Y;if(Y){const X=K[Y]*z,Z=q[Q][Y],J=Math.floor(X/Z);K[Q]+=J*z,K[Y]-=J*Z*z}return Q}),null),us.reduce(((z,Y)=>{if(Re(K[Y]))return z;if(z){const Q=K[z]%1;K[z]-=Q,K[Y]+=Q*q[z][Y]}return Y}),null)}function gs(q){const K={};for(const[z,Y]of Object.entries(q))0!==Y&&(K[z]=Y);return K}class ms{constructor(q){const K="longterm"===q.conversionAccuracy||!1;let z=K?ls:hs;q.matrix&&(z=q.matrix),this.values=q.values,this.loc=q.loc||Qt.create(),this.conversionAccuracy=K?"longterm":"casual",this.invalid=q.invalid||null,this.matrix=z,this.isLuxonDuration=!0}static fromMillis(q,K){return ms.fromObject({milliseconds:q},K)}static fromObject(q,K={}){if(null==q||"object"!=typeof q)throw new it("Duration.fromObject: argument expected to be an object, got "+(null===q?"null":typeof q));return new ms({values:ti(q,ms.normalizeUnit),loc:Qt.fromObject(K),conversionAccuracy:K.conversionAccuracy,matrix:K.matrix})}static fromDurationLike(q){if(Pe(q))return ms.fromMillis(q);if(ms.isDuration(q))return q;if("object"==typeof q)return ms.fromObject(q);throw new it(`Unknown duration argument ${q} of type ${typeof q}`)}static fromISO(q,K){const[z]=function(q){return wi(q,[Bi,Ui])}(q);return z?ms.fromObject(z,K):ms.invalid("unparsable",`the input "${q}" can't be parsed as ISO 8601`)}static fromISOTime(q,K){const[z]=function(q){return wi(q,[ki,is])}(q);return z?ms.fromObject(z,K):ms.invalid("unparsable",`the input "${q}" can't be parsed as ISO 8601`)}static invalid(q,K=null){if(!q)throw new it("need to specify a reason the Duration is invalid");const z=q instanceof pe?q:new pe(q,K);if(be.throwOnInvalid)throw new J(z);return new ms({invalid:z})}static normalizeUnit(q){const K={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[q?q.toLowerCase():q];if(!K)throw new et(q);return K}static isDuration(q){return q&&q.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(q,K={}){const z={...K,floor:!1!==K.round&&!1!==K.floor};return this.isValid?mi.create(this.loc,z).formatDurationFromString(this,q):rs}toHuman(q={}){if(!this.isValid)return rs;const K=!1!==q.showZeros,z=us.map((z=>{const Y=this.values[z];return Re(Y)||0===Y&&!K?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...q,unit:z.slice(0,-1)}).format(Y)})).filter((q=>q));return this.loc.listFormatter({type:"conjunction",style:q.listStyle||"narrow",...q}).format(z)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let q="P";return 0!==this.years&&(q+=this.years+"Y"),0===this.months&&0===this.quarters||(q+=this.months+3*this.quarters+"M"),0!==this.weeks&&(q+=this.weeks+"W"),0!==this.days&&(q+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(q+="T"),0!==this.hours&&(q+=this.hours+"H"),0!==this.minutes&&(q+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(q+=He(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===q&&(q+="T0S"),q}toISOTime(q={}){if(!this.isValid)return null;const K=this.toMillis();if(K<0||K>=864e5)return null;q={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...q,includeOffset:!1};return un.fromMillis(K,{zone:"UTC"}).toISOTime(q)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ps(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(q){if(!this.isValid)return this;const K=ms.fromDurationLike(q),z={};for(const Y of us)(ke(K.values,Y)||ke(this.values,Y))&&(z[Y]=K.get(Y)+this.get(Y));return bs(this,{values:z},!0)}minus(q){if(!this.isValid)return this;const K=ms.fromDurationLike(q);return this.plus(K.negate())}mapUnits(q){if(!this.isValid)return this;const K={};for(const z of Object.keys(this.values))K[z]=Je(q(this.values[z],z));return bs(this,{values:K},!0)}get(q){return this[ms.normalizeUnit(q)]}set(q){if(!this.isValid)return this;return bs(this,{values:{...this.values,...ti(q,ms.normalizeUnit)}})}reconfigure({locale:q,numberingSystem:K,conversionAccuracy:z,matrix:Y}={}){return bs(this,{loc:this.loc.clone({locale:q,numberingSystem:K}),matrix:Y,conversionAccuracy:z})}as(q){return this.isValid?this.shiftTo(q).get(q):NaN}normalize(){if(!this.isValid)return this;const q=this.toObject();return vs(this.matrix,q),bs(this,{values:q},!0)}rescale(){if(!this.isValid)return this;return bs(this,{values:gs(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...q){if(!this.isValid)return this;if(0===q.length)return this;q=q.map((q=>ms.normalizeUnit(q)));const K={},z={},Y=this.toObject();let Q;for(const X of us)if(q.indexOf(X)>=0){Q=X;let q=0;for(const K in z)q+=this.matrix[K][X]*z[K],z[K]=0;Pe(Y[X])&&(q+=Y[X]);const Z=Math.trunc(q);K[X]=Z,z[X]=(1e3*q-1e3*Z)/1e3}else Pe(Y[X])&&(z[X]=Y[X]);for(const X in z)0!==z[X]&&(K[Q]+=X===Q?z[X]:z[X]/this.matrix[Q][X]);return vs(this.matrix,K),bs(this,{values:K},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const q={};for(const K of Object.keys(this.values))q[K]=0===this.values[K]?0:-this.values[K];return bs(this,{values:q},!0)}removeZeros(){if(!this.isValid)return this;return bs(this,{values:gs(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(q){if(!this.isValid||!q.isValid)return!1;if(!this.loc.equals(q.loc))return!1;for(const Y of us)if(K=this.values[Y],z=q.values[Y],!(void 0===K||0===K?void 0===z||0===z:K===z))return!1;var K,z;return!0}}const ys="Invalid Interval";class _s{constructor(q){this.s=q.start,this.e=q.end,this.invalid=q.invalid||null,this.isLuxonInterval=!0}static invalid(q,K=null){if(!q)throw new it("need to specify a reason the Interval is invalid");const z=q instanceof pe?q:new pe(q,K);if(be.throwOnInvalid)throw new Z(z);return new _s({invalid:z})}static fromDateTimes(q,K){const z=fn(q),Y=fn(K),Q=function(q,K){return q&&q.isValid?K&&K.isValid?Kq}isBefore(q){return!!this.isValid&&this.e<=q}contains(q){return!!this.isValid&&(this.s<=q&&this.e>q)}set({start:q,end:K}={}){return this.isValid?_s.fromDateTimes(q||this.s,K||this.e):this}splitAt(...q){if(!this.isValid)return[];const K=q.map(fn).filter((q=>this.contains(q))).sort(((q,K)=>q.toMillis()-K.toMillis())),z=[];let{s:Y}=this,Q=0;for(;Y+this.e?this.e:q;z.push(_s.fromDateTimes(Y,X)),Y=X,Q+=1}return z}splitBy(q){const K=ms.fromDurationLike(q);if(!this.isValid||!K.isValid||0===K.as("milliseconds"))return[];let z,{s:Y}=this,Q=1;const X=[];for(;Yq*Q)));z=+q>+this.e?this.e:q,X.push(_s.fromDateTimes(Y,z)),Y=z,Q+=1}return X}divideEqually(q){return this.isValid?this.splitBy(this.length()/q).slice(0,q):[]}overlaps(q){return this.e>q.s&&this.s=q.e)}equals(q){return!(!this.isValid||!q.isValid)&&(this.s.equals(q.s)&&this.e.equals(q.e))}intersection(q){if(!this.isValid)return this;const K=this.s>q.s?this.s:q.s,z=this.e=z?null:_s.fromDateTimes(K,z)}union(q){if(!this.isValid)return this;const K=this.sq.e?this.e:q.e;return _s.fromDateTimes(K,z)}static merge(q){const[K,z]=q.sort(((q,K)=>q.s-K.s)).reduce((([q,K],z)=>K?K.overlaps(z)||K.abutsStart(z)?[q,K.union(z)]:[q.concat([K]),z]:[q,z]),[[],null]);return z&&K.push(z),K}static xor(q){let K=null,z=0;const Y=[],Q=q.map((q=>[{time:q.s,type:"s"},{time:q.e,type:"e"}])),X=Array.prototype.concat(...Q).sort(((q,K)=>q.time-K.time));for(const Z of X)z+="s"===Z.type?1:-1,1===z?K=Z.time:(K&&+K!=+Z.time&&Y.push(_s.fromDateTimes(K,Z.time)),K=null);return _s.merge(Y)}difference(...q){return _s.xor([this].concat(q)).map((q=>this.intersection(q))).filter((q=>q&&!q.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:ys}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(q=ot,K={}){return this.isValid?mi.create(this.s.loc.clone(K),q).formatInterval(this):ys}toISO(q){return this.isValid?`${this.s.toISO(q)}/${this.e.toISO(q)}`:ys}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ys}toISOTime(q){return this.isValid?`${this.s.toISOTime(q)}/${this.e.toISOTime(q)}`:ys}toFormat(q,{separator:K=" – "}={}){return this.isValid?`${this.s.toFormat(q)}${K}${this.e.toFormat(q)}`:ys}toDuration(q,K){return this.isValid?this.e.diff(this.s,q,K):ms.invalid(this.invalidReason)}mapEndpoints(q){return _s.fromDateTimes(q(this.s),q(this.e))}}class Es{static hasDST(q=be.defaultZone){const K=un.now().setZone(q).set({month:12});return!q.isUniversal&&K.offset!==K.set({month:6}).offset}static isValidIANAZone(q){return Lt.isValidZone(q)}static normalizeZone(q){return te(q,be.defaultZone)}static getStartOfWeek({locale:q=null,locObj:K=null}={}){return(K||Qt.create(q)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:q=null,locObj:K=null}={}){return(K||Qt.create(q)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:q=null,locObj:K=null}={}){return(K||Qt.create(q)).getWeekendDays().slice()}static months(q="long",{locale:K=null,numberingSystem:z=null,locObj:Y=null,outputCalendar:Q="gregory"}={}){return(Y||Qt.create(K,z,Q)).months(q)}static monthsFormat(q="long",{locale:K=null,numberingSystem:z=null,locObj:Y=null,outputCalendar:Q="gregory"}={}){return(Y||Qt.create(K,z,Q)).months(q,!0)}static weekdays(q="long",{locale:K=null,numberingSystem:z=null,locObj:Y=null}={}){return(Y||Qt.create(K,z,null)).weekdays(q)}static weekdaysFormat(q="long",{locale:K=null,numberingSystem:z=null,locObj:Y=null}={}){return(Y||Qt.create(K,z,null)).weekdays(q,!0)}static meridiems({locale:q=null}={}){return Qt.create(q).meridiems()}static eras(q="short",{locale:K=null}={}){return Qt.create(K,null,"gregory").eras(q)}static features(){return{relative:Ne(),localeWeek:xe()}}}function ws(q,K){const z=q=>q.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),Y=z(K)-z(q);return Math.floor(ms.fromMillis(Y).as("days"))}function Ts(q,K,z,Y){let[Q,X,Z,J]=function(q,K,z){const Y=[["years",(q,K)=>K.year-q.year],["quarters",(q,K)=>K.quarter-q.quarter+4*(K.year-q.year)],["months",(q,K)=>K.month-q.month+12*(K.year-q.year)],["weeks",(q,K)=>{const z=ws(q,K);return(z-z%7)/7}],["days",ws]],Q={},X=q;let Z,J;for(const[tt,et]of Y)z.indexOf(tt)>=0&&(Z=tt,Q[tt]=et(q,K),J=X.plus(Q),J>K?(Q[tt]--,(q=X.plus(Q))>K&&(J=q,Q[tt]--,q=X.plus(Q))):q=J);return[q,Q,J,Z]}(q,K,z);const tt=K-Q,et=z.filter((q=>["hours","minutes","seconds","milliseconds"].indexOf(q)>=0));0===et.length&&(Z0?ms.fromMillis(tt,Y).shiftTo(...et).plus(it):it}function Ss(q,K=(q=>q)){return{regex:q,deser:([q])=>K(function(q){let K=parseInt(q,10);if(isNaN(K)){K="";for(let z=0;z=z&&Y<=Q&&(K+=Y-z)}}return parseInt(K,10)}return K}(q))}}const As=`[ ${String.fromCharCode(160)}]`,Cs=new RegExp(As,"g");function Os(q){return q.replace(/\./g,"\\.?").replace(Cs,As)}function Is(q){return q.replace(/\./g,"").replace(Cs," ").toLowerCase()}function Ds(q,K){return null===q?null:{regex:RegExp(q.map(Os).join("|")),deser:([z])=>q.findIndex((q=>Is(z)===Is(q)))+K}}function Rs(q,K){return{regex:q,deser:([,q,K])=>Ze(q,K),groups:K}}function Ps(q){return{regex:q,deser:([q])=>q}}const Ms={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Ns=null;function xs(q,K){return Array.prototype.concat(...q.map((q=>function(q,K){if(q.literal)return q;const z=Bs(mi.macroTokenToFormatOpts(q.val),K);return null==z||z.includes(void 0)?q:z}(q,K))))}class Ls{constructor(q,K){if(this.locale=q,this.format=K,this.tokens=xs(mi.parseFormat(K),q),this.units=this.tokens.map((K=>function(q,K){const z=ae(K),Y=ae(K,"{2}"),Q=ae(K,"{3}"),X=ae(K,"{4}"),Z=ae(K,"{6}"),J=ae(K,"{1,2}"),tt=ae(K,"{1,3}"),et=ae(K,"{1,6}"),it=ae(K,"{1,9}"),st=ae(K,"{2,4}"),nt=ae(K,"{4,6}"),at=q=>{return{regex:RegExp((K=q.val,K.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([q])=>q,literal:!0};var K},rt=(rt=>{if(q.literal)return at(rt);switch(rt.val){case"G":return Ds(K.eras("short"),0);case"GG":return Ds(K.eras("long"),0);case"y":return Ss(et);case"yy":return Ss(st,Qe);case"yyyy":return Ss(X);case"yyyyy":return Ss(nt);case"yyyyyy":return Ss(Z);case"M":return Ss(J);case"MM":return Ss(Y);case"MMM":return Ds(K.months("short",!0),1);case"MMMM":return Ds(K.months("long",!0),1);case"L":return Ss(J);case"LL":return Ss(Y);case"LLL":return Ds(K.months("short",!1),1);case"LLLL":return Ds(K.months("long",!1),1);case"d":return Ss(J);case"dd":return Ss(Y);case"o":return Ss(tt);case"ooo":return Ss(Q);case"HH":return Ss(Y);case"H":return Ss(J);case"hh":return Ss(Y);case"h":return Ss(J);case"mm":return Ss(Y);case"m":case"q":return Ss(J);case"qq":return Ss(Y);case"s":return Ss(J);case"ss":return Ss(Y);case"S":return Ss(tt);case"SSS":return Ss(Q);case"u":return Ps(it);case"uu":return Ps(J);case"uuu":return Ss(z);case"a":return Ds(K.meridiems(),0);case"kkkk":return Ss(X);case"kk":return Ss(st,Qe);case"W":return Ss(J);case"WW":return Ss(Y);case"E":case"c":return Ss(z);case"EEE":return Ds(K.weekdays("short",!1),1);case"EEEE":return Ds(K.weekdays("long",!1),1);case"ccc":return Ds(K.weekdays("short",!0),1);case"cccc":return Ds(K.weekdays("long",!0),1);case"Z":case"ZZ":return Rs(new RegExp(`([+-]${J.source})(?::(${Y.source}))?`),2);case"ZZZ":return Rs(new RegExp(`([+-]${J.source})(${Y.source})?`),2);case"z":return Ps(/[a-z_+-/]{1,256}?/i);case" ":return Ps(/[^\S\n\r]/);default:return at(rt)}})(q)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return rt.token=q,rt}(K,q))),this.disqualifyingUnit=this.units.find((q=>q.invalidReason)),!this.disqualifyingUnit){const[q,K]=[`^${(z=this.units).map((q=>q.regex)).reduce(((q,K)=>`${q}(${K.source})`),"")}$`,z];this.regex=RegExp(q,"i"),this.handlers=K}var z}explainFromTokens(q){if(this.isValid){const[K,z]=function(q,K,z){const Y=q.match(K);if(Y){const q={};let K=1;for(const Q in z)if(ke(z,Q)){const X=z[Q],Z=X.groups?X.groups+1:1;!X.literal&&X.token&&(q[X.token.val[0]]=X.deser(Y.slice(K,K+Z))),K+=Z}return[Y,q]}return[Y,{}]}(q,this.regex,this.handlers),[Y,Q,X]=z?function(q){let K,z=null;return Re(q.z)||(z=Lt.create(q.z)),Re(q.Z)||(z||(z=new Zt(q.Z)),K=q.Z),Re(q.q)||(q.M=3*(q.q-1)+1),Re(q.h)||(q.h<12&&1===q.a?q.h+=12:12===q.h&&0===q.a&&(q.h=0)),0===q.G&&q.y&&(q.y=-q.y),Re(q.u)||(q.S=$e(q.u)),[Object.keys(q).reduce(((K,z)=>{const Y=(q=>{switch(q){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(z);return Y&&(K[Y]=q[z]),K}),{}),z,K]}(z):[null,null,void 0];if(ke(z,"a")&&ke(z,"H"))throw new tt("Can't include meridiem when specifying 24-hour format");return{input:q,tokens:this.tokens,regex:this.regex,rawMatches:K,matches:z,result:Y,zone:Q,specificOffset:X}}return{input:q,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ks(q,K,z){return new Ls(q,z).explainFromTokens(K)}function Bs(q,K){if(!q)return null;const z=mi.create(K,q).dtFormatter((Ns||(Ns=un.fromMillis(1555555555555)),Ns)),Y=z.formatToParts(),Q=z.resolvedOptions();return Y.map((K=>function(q,K,z){const{type:Y,value:Q}=q;if("literal"===Y){const q=/^\s+$/.test(Q);return{literal:!q,val:q?" ":Q}}const X=K[Y];let Z=Y;"hour"===Y&&(Z=null!=K.hour12?K.hour12?"hour12":"hour24":null!=K.hourCycle?"h11"===K.hourCycle||"h12"===K.hourCycle?"hour12":"hour24":z.hour12?"hour12":"hour24");let J=Ms[Z];if("object"==typeof J&&(J=J[X]),J)return{literal:!1,val:J}}(K,q,Q)))}const Us="Invalid DateTime",Fs=864e13;function Gs(q){return new pe("unsupported zone",`the zone "${q.name}" is not supported`)}function js(q){return null===q.weekData&&(q.weekData=Te(q.c)),q.weekData}function $s(q){return null===q.localWeekData&&(q.localWeekData=Te(q.c,q.loc.getMinDaysInFirstWeek(),q.loc.getStartOfWeek())),q.localWeekData}function Hs(q,K){const z={ts:q.ts,zone:q.zone,c:q.c,o:q.o,loc:q.loc,invalid:q.invalid};return new un({...z,...K,old:z})}function Vs(q,K,z){let Y=q-60*K*1e3;const Q=z.offset(Y);if(K===Q)return[Y,K];Y-=60*(Q-K)*1e3;const X=z.offset(Y);return Q===X?[Y,Q]:[q-60*Math.min(Q,X)*1e3,Math.max(Q,X)]}function Ws(q,K){const z=new Date(q+=60*K*1e3);return{year:z.getUTCFullYear(),month:z.getUTCMonth()+1,day:z.getUTCDate(),hour:z.getUTCHours(),minute:z.getUTCMinutes(),second:z.getUTCSeconds(),millisecond:z.getUTCMilliseconds()}}function qs(q,K,z){return Vs(Ke(q),K,z)}function Ks(q,K){const z=q.o,Y=q.c.year+Math.trunc(K.years),Q=q.c.month+Math.trunc(K.months)+3*Math.trunc(K.quarters),X={...q.c,year:Y,month:Q,day:Math.min(q.c.day,qe(Y,Q))+Math.trunc(K.days)+7*Math.trunc(K.weeks)},Z=ms.fromObject({years:K.years-Math.trunc(K.years),quarters:K.quarters-Math.trunc(K.quarters),months:K.months-Math.trunc(K.months),weeks:K.weeks-Math.trunc(K.weeks),days:K.days-Math.trunc(K.days),hours:K.hours,minutes:K.minutes,seconds:K.seconds,milliseconds:K.milliseconds}).as("milliseconds"),J=Ke(X);let[tt,et]=Vs(J,z,q.zone);return 0!==Z&&(tt+=Z,et=q.zone.offset(tt)),{ts:tt,o:et}}function zs(q,K,z,Y,Q,X){const{setZone:Z,zone:J}=z;if(q&&0!==Object.keys(q).length||K){const Y=K||J,Q=un.fromObject(q,{...z,zone:Y,specificOffset:X});return Z?Q:Q.setZone(J)}return un.invalid(new pe("unparsable",`the input "${Q}" can't be parsed as ${Y}`))}function Ys(q,K,z=!0){return q.isValid?mi.create(Qt.create("en-US"),{allowZ:z,forceSimple:!0}).formatDateTimeFromString(q,K):null}function Qs(q,K,z){const Y=q.c.year>9999||q.c.year<0;let Q="";if(Y&&q.c.year>=0&&(Q+="+"),Q+=Fe(q.c.year,Y?6:4),"year"===z)return Q;if(K){if(Q+="-",Q+=Fe(q.c.month),"month"===z)return Q;Q+="-"}else if(Q+=Fe(q.c.month),"month"===z)return Q;return Q+=Fe(q.c.day),Q}function Xs(q,K,z,Y,Q,X,Z){let J=!z||0!==q.c.millisecond||0!==q.c.second,tt="";switch(Z){case"day":case"month":case"year":break;default:if(tt+=Fe(q.c.hour),"hour"===Z)break;if(K){if(tt+=":",tt+=Fe(q.c.minute),"minute"===Z)break;J&&(tt+=":",tt+=Fe(q.c.second))}else{if(tt+=Fe(q.c.minute),"minute"===Z)break;J&&(tt+=Fe(q.c.second))}if("second"===Z)break;!J||Y&&0===q.c.millisecond||(tt+=".",tt+=Fe(q.c.millisecond,3))}return Q&&(q.isOffsetFixed&&0===q.offset&&!X?tt+="Z":q.o<0?(tt+="-",tt+=Fe(Math.trunc(-q.o/60)),tt+=":",tt+=Fe(Math.trunc(-q.o%60))):(tt+="+",tt+=Fe(Math.trunc(q.o/60)),tt+=":",tt+=Fe(Math.trunc(q.o%60)))),X&&(tt+="["+q.zone.ianaName+"]"),tt}const Zs={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Js={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},tn={ordinal:1,hour:0,minute:0,second:0,millisecond:0},en=["year","month","day","hour","minute","second","millisecond"],sn=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],nn=["year","ordinal","hour","minute","second","millisecond"];function an(q){const K={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[q.toLowerCase()];if(!K)throw new et(q);return K}function rn(q){switch(q.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return an(q)}}function on(q,K){const z=te(K.zone,be.defaultZone);if(!z.isValid)return un.invalid(Gs(z));const Y=Qt.fromObject(K);let Q,X;if(Re(q.year))Q=be.now();else{for(const z of en)Re(q[z])&&(q[z]=Zs[z]);const K=Ie(q)||De(q);if(K)return un.invalid(K);const Y=function(q){if(void 0===dn&&(dn=be.now()),"iana"!==q.type)return q.offset(dn);const K=q.name;let z=ln.get(K);return void 0===z&&(z=q.offset(dn),ln.set(K,z)),z}(z);[Q,X]=qs(q,Y,z)}return new un({ts:Q,zone:z,loc:Y,o:X})}function hn(q,K,z){const Y=!!Re(z.round)||z.round,Q=Re(z.rounding)?"trunc":z.rounding,X=(q,X)=>{q=He(q,Y||z.calendary?0:2,z.calendary?"round":Q);return K.loc.clone(z).relFormatter(z).format(q,X)},Z=Y=>z.calendary?K.hasSame(q,Y)?0:K.startOf(Y).diff(q.startOf(Y),Y).get(Y):K.diff(q,Y).get(Y);if(z.unit)return X(Z(z.unit),z.unit);for(const J of z.units){const q=Z(J);if(Math.abs(q)>=1)return X(q,J)}return X(q>K?-0:0,z.units[z.units.length-1])}function cn(q){let K,z={};return q.length>0&&"object"==typeof q[q.length-1]?(z=q[q.length-1],K=Array.from(q).slice(0,q.length-1)):K=Array.from(q),[z,K]}let dn;const ln=new Map;class un{constructor(q){const K=q.zone||be.defaultZone;let z=q.invalid||(Number.isNaN(q.ts)?new pe("invalid input"):null)||(K.isValid?null:Gs(K));this.ts=Re(q.ts)?be.now():q.ts;let Y=null,Q=null;if(!z){if(q.old&&q.old.ts===this.ts&&q.old.zone.equals(K))[Y,Q]=[q.old.c,q.old.o];else{const X=Pe(q.o)&&!q.old?q.o:K.offset(this.ts);Y=Ws(this.ts,X),z=Number.isNaN(Y.year)?new pe("invalid input"):null,Y=z?null:Y,Q=z?null:X}}this._zone=K,this.loc=q.loc||Qt.create(),this.invalid=z,this.weekData=null,this.localWeekData=null,this.c=Y,this.o=Q,this.isLuxonDateTime=!0}static now(){return new un({})}static local(){const[q,K]=cn(arguments),[z,Y,Q,X,Z,J,tt]=K;return on({year:z,month:Y,day:Q,hour:X,minute:Z,second:J,millisecond:tt},q)}static utc(){const[q,K]=cn(arguments),[z,Y,Q,X,Z,J,tt]=K;return q.zone=Zt.utcInstance,on({year:z,month:Y,day:Q,hour:X,minute:Z,second:J,millisecond:tt},q)}static fromJSDate(q,K={}){const z=(Y=q,"[object Date]"===Object.prototype.toString.call(Y)?q.valueOf():NaN);var Y;if(Number.isNaN(z))return un.invalid("invalid input");const Q=te(K.zone,be.defaultZone);return Q.isValid?new un({ts:z,zone:Q,loc:Qt.fromObject(K)}):un.invalid(Gs(Q))}static fromMillis(q,K={}){if(Pe(q))return q<-Fs||q>Fs?un.invalid("Timestamp out of range"):new un({ts:q,zone:te(K.zone,be.defaultZone),loc:Qt.fromObject(K)});throw new it(`fromMillis requires a numerical input, but received a ${typeof q} with value ${q}`)}static fromSeconds(q,K={}){if(Pe(q))return new un({ts:1e3*q,zone:te(K.zone,be.defaultZone),loc:Qt.fromObject(K)});throw new it("fromSeconds requires a numerical input")}static fromObject(q,K={}){q=q||{};const z=te(K.zone,be.defaultZone);if(!z.isValid)return un.invalid(Gs(z));const Y=Qt.fromObject(K),Q=ti(q,rn),{minDaysInFirstWeek:X,startOfWeek:Z}=Oe(Q,Y),J=be.now(),et=Re(K.specificOffset)?z.offset(J):K.specificOffset,it=!Re(Q.ordinal),st=!Re(Q.year),nt=!Re(Q.month)||!Re(Q.day),at=st||nt,rt=Q.weekYear||Q.weekNumber;if((at||it)&&rt)throw new tt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(nt&&it)throw new tt("Can't mix ordinal dates with month/day");const ot=rt||Q.weekday&&!at;let ht,ct,dt=Ws(J,et);ot?(ht=sn,ct=Js,dt=Te(dt,X,Z)):it?(ht=nn,ct=tn,dt=Ae(dt)):(ht=en,ct=Zs);let lt=!1;for(const tt of ht){Re(Q[tt])?Q[tt]=lt?ct[tt]:dt[tt]:lt=!0}const ut=(ot?function(q,K=4,z=1){const Y=Me(q.weekYear),Q=Ue(q.weekNumber,1,Ye(q.weekYear,K,z)),X=Ue(q.weekday,1,7);return Y?Q?!X&&me("weekday",q.weekday):me("week",q.weekNumber):me("weekYear",q.weekYear)}(Q,X,Z):it?function(q){const K=Me(q.year),z=Ue(q.ordinal,1,We(q.year));return K?!z&&me("ordinal",q.ordinal):me("year",q.year)}(Q):Ie(Q))||De(Q);if(ut)return un.invalid(ut);const ft=ot?Se(Q,X,Z):it?Ce(Q):Q,[bt,pt]=qs(ft,et,z),vt=new un({ts:bt,zone:z,o:pt,loc:Y});return Q.weekday&&at&&q.weekday!==vt.weekday?un.invalid("mismatched weekday",`you can't specify both a weekday of ${Q.weekday} and a date of ${vt.toISO()}`):vt.isValid?vt:un.invalid(vt.invalid)}static fromISO(q,K={}){const[z,Y]=function(q){return wi(q,[zi,Zi],[Yi,Ji],[Qi,ts],[Xi,es])}(q);return zs(z,Y,K,"ISO 8601",q)}static fromRFC2822(q,K={}){const[z,Y]=function(q){return wi(function(q){return q.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(q),[ji,$i])}(q);return zs(z,Y,K,"RFC 2822",q)}static fromHTTP(q,K={}){const[z,Y]=function(q){return wi(q,[Hi,qi],[Vi,qi],[Wi,Ki])}(q);return zs(z,Y,K,"HTTP",K)}static fromFormat(q,K,z={}){if(Re(q)||Re(K))throw new it("fromFormat requires an input string and a format");const{locale:Y=null,numberingSystem:Q=null}=z,X=Qt.fromOpts({locale:Y,numberingSystem:Q,defaultToEN:!0}),[Z,J,tt,et]=function(q,K,z){const{result:Y,zone:Q,specificOffset:X,invalidReason:Z}=ks(q,K,z);return[Y,Q,X,Z]}(X,q,K);return et?un.invalid(et):zs(Z,J,z,`format ${K}`,q,tt)}static fromString(q,K,z={}){return un.fromFormat(q,K,z)}static fromSQL(q,K={}){const[z,Y]=function(q){return wi(q,[ss,Zi],[ns,as])}(q);return zs(z,Y,K,"SQL",q)}static invalid(q,K=null){if(!q)throw new it("need to specify a reason the DateTime is invalid");const z=q instanceof pe?q:new pe(q,K);if(be.throwOnInvalid)throw new X(z);return new un({invalid:z})}static isDateTime(q){return q&&q.isLuxonDateTime||!1}static parseFormatForOpts(q,K={}){const z=Bs(q,Qt.fromObject(K));return z?z.map((q=>q?q.val:null)).join(""):null}static expandFormat(q,K={}){return xs(mi.parseFormat(q),Qt.fromObject(K)).map((q=>q.val)).join("")}static resetCache(){dn=void 0,ln.clear()}get(q){return this[q]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?js(this).weekYear:NaN}get weekNumber(){return this.isValid?js(this).weekNumber:NaN}get weekday(){return this.isValid?js(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?$s(this).weekday:NaN}get localWeekNumber(){return this.isValid?$s(this).weekNumber:NaN}get localWeekYear(){return this.isValid?$s(this).weekYear:NaN}get ordinal(){return this.isValid?Ae(this.c).ordinal:NaN}get monthShort(){return this.isValid?Es.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Es.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Es.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Es.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const q=864e5,K=6e4,z=Ke(this.c),Y=this.zone.offset(z-q),Q=this.zone.offset(z+q),X=this.zone.offset(z-Y*K),Z=this.zone.offset(z-Q*K);if(X===Z)return[this];const J=z-X*K,tt=z-Z*K,et=Ws(J,X),it=Ws(tt,Z);return et.hour===it.hour&&et.minute===it.minute&&et.second===it.second&&et.millisecond===it.millisecond?[Hs(this,{ts:J}),Hs(this,{ts:tt})]:[this]}get isInLeapYear(){return Ve(this.year)}get daysInMonth(){return qe(this.year,this.month)}get daysInYear(){return this.isValid?We(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ye(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ye(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(q={}){const{locale:K,numberingSystem:z,calendar:Y}=mi.create(this.loc.clone(q),q).resolvedOptions(this);return{locale:K,numberingSystem:z,outputCalendar:Y}}toUTC(q=0,K={}){return this.setZone(Zt.instance(q),K)}toLocal(){return this.setZone(be.defaultZone)}setZone(q,{keepLocalTime:K=!1,keepCalendarTime:z=!1}={}){if((q=te(q,be.defaultZone)).equals(this.zone))return this;if(q.isValid){let Y=this.ts;if(K||z){const K=q.offset(this.ts),z=this.toObject();[Y]=qs(z,K,q)}return Hs(this,{ts:Y,zone:q})}return un.invalid(Gs(q))}reconfigure({locale:q,numberingSystem:K,outputCalendar:z}={}){return Hs(this,{loc:this.loc.clone({locale:q,numberingSystem:K,outputCalendar:z})})}setLocale(q){return this.reconfigure({locale:q})}set(q){if(!this.isValid)return this;const K=ti(q,rn),{minDaysInFirstWeek:z,startOfWeek:Y}=Oe(K,this.loc),Q=!Re(K.weekYear)||!Re(K.weekNumber)||!Re(K.weekday),X=!Re(K.ordinal),Z=!Re(K.year),J=!Re(K.month)||!Re(K.day),et=Z||J,it=K.weekYear||K.weekNumber;if((et||X)&&it)throw new tt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(J&&X)throw new tt("Can't mix ordinal dates with month/day");let st;Q?st=Se({...Te(this.c,z,Y),...K},z,Y):Re(K.ordinal)?(st={...this.toObject(),...K},Re(K.day)&&(st.day=Math.min(qe(st.year,st.month),st.day))):st=Ce({...Ae(this.c),...K});const[nt,at]=qs(st,this.o,this.zone);return Hs(this,{ts:nt,o:at})}plus(q){if(!this.isValid)return this;return Hs(this,Ks(this,ms.fromDurationLike(q)))}minus(q){if(!this.isValid)return this;return Hs(this,Ks(this,ms.fromDurationLike(q).negate()))}startOf(q,{useLocaleWeeks:K=!1}={}){if(!this.isValid)return this;const z={},Y=ms.normalizeUnit(q);switch(Y){case"years":z.month=1;case"quarters":case"months":z.day=1;case"weeks":case"days":z.hour=0;case"hours":z.minute=0;case"minutes":z.second=0;case"seconds":z.millisecond=0}if("weeks"===Y)if(K){const q=this.loc.getStartOfWeek(),{weekday:K}=this;K=3&&(J+="T"),J+=Xs(this,Z,K,z,Y,Q,X),J}toISODate({format:q="extended",precision:K="day"}={}){return this.isValid?Qs(this,"extended"===q,an(K)):null}toISOWeekDate(){return Ys(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:q=!1,suppressSeconds:K=!1,includeOffset:z=!0,includePrefix:Y=!1,extendedZone:Q=!1,format:X="extended",precision:Z="milliseconds"}={}){if(!this.isValid)return null;return Z=an(Z),(Y&&en.indexOf(Z)>=3?"T":"")+Xs(this,"extended"===X,K,q,z,Q,Z)}toRFC2822(){return Ys(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ys(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Qs(this,!0):null}toSQLTime({includeOffset:q=!0,includeZone:K=!1,includeOffsetSpace:z=!0}={}){let Y="HH:mm:ss.SSS";return(K||q)&&(z&&(Y+=" "),K?Y+="z":q&&(Y+="ZZ")),Ys(this,Y,!0)}toSQL(q={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(q)}`:null}toString(){return this.isValid?this.toISO():Us}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(q={}){if(!this.isValid)return{};const K={...this.c};return q.includeConfig&&(K.outputCalendar=this.outputCalendar,K.numberingSystem=this.loc.numberingSystem,K.locale=this.loc.locale),K}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(q,K="milliseconds",z={}){if(!this.isValid||!q.isValid)return ms.invalid("created by diffing an invalid DateTime");const Y={locale:this.locale,numberingSystem:this.numberingSystem,...z},Q=(J=K,Array.isArray(J)?J:[J]).map(ms.normalizeUnit),X=q.valueOf()>this.valueOf(),Z=Ts(X?this:q,X?q:this,Q,Y);var J;return X?Z.negate():Z}diffNow(q="milliseconds",K={}){return this.diff(un.now(),q,K)}until(q){return this.isValid?_s.fromDateTimes(this,q):this}hasSame(q,K,z){if(!this.isValid)return!1;const Y=q.valueOf(),Q=this.setZone(q.zone,{keepLocalTime:!0});return Q.startOf(K,z)<=Y&&Y<=Q.endOf(K,z)}equals(q){return this.isValid&&q.isValid&&this.valueOf()===q.valueOf()&&this.zone.equals(q.zone)&&this.loc.equals(q.loc)}toRelative(q={}){if(!this.isValid)return null;const K=q.base||un.fromObject({},{zone:this.zone}),z=q.padding?thisq.valueOf()),Math.min)}static max(...q){if(!q.every(un.isDateTime))throw new it("max requires all arguments be DateTimes");return Le(q,(q=>q.valueOf()),Math.max)}static fromFormatExplain(q,K,z={}){const{locale:Y=null,numberingSystem:Q=null}=z;return ks(Qt.fromOpts({locale:Y,numberingSystem:Q,defaultToEN:!0}),q,K)}static fromStringExplain(q,K,z={}){return un.fromFormatExplain(q,K,z)}static buildFormatParser(q,K={}){const{locale:z=null,numberingSystem:Y=null}=K,Q=Qt.fromOpts({locale:z,numberingSystem:Y,defaultToEN:!0});return new Ls(Q,q)}static fromFormatParser(q,K,z={}){if(Re(q)||Re(K))throw new it("fromFormatParser requires an input string and a format parser");const{locale:Y=null,numberingSystem:Q=null}=z,X=Qt.fromOpts({locale:Y,numberingSystem:Q,defaultToEN:!0});if(!X.equals(K.locale))throw new it(`fromFormatParser called with a locale of ${X}, but the format parser was created for ${K.locale}`);const{result:Z,zone:J,specificOffset:tt,invalidReason:et}=K.explainFromTokens(q);return et?un.invalid(et):zs(Z,J,z,`format ${K.format}`,q,tt)}static get DATE_SHORT(){return ot}static get DATE_MED(){return ht}static get DATE_MED_WITH_WEEKDAY(){return ct}static get DATE_FULL(){return dt}static get DATE_HUGE(){return lt}static get TIME_SIMPLE(){return ut}static get TIME_WITH_SECONDS(){return ft}static get TIME_WITH_SHORT_OFFSET(){return bt}static get TIME_WITH_LONG_OFFSET(){return pt}static get TIME_24_SIMPLE(){return vt}static get TIME_24_WITH_SECONDS(){return gt}static get TIME_24_WITH_SHORT_OFFSET(){return mt}static get TIME_24_WITH_LONG_OFFSET(){return yt}static get DATETIME_SHORT(){return _t}static get DATETIME_SHORT_WITH_SECONDS(){return Et}static get DATETIME_MED(){return wt}static get DATETIME_MED_WITH_SECONDS(){return Tt}static get DATETIME_MED_WITH_WEEKDAY(){return St}static get DATETIME_FULL(){return At}static get DATETIME_FULL_WITH_SECONDS(){return Ct}static get DATETIME_HUGE(){return Ot}static get DATETIME_HUGE_WITH_SECONDS(){return It}}function fn(q){if(un.isDateTime(q))return q;if(q&&q.valueOf&&Pe(q.valueOf()))return un.fromJSDate(q);if(q&&"object"==typeof q)return un.fromObject(q);throw new it(`Unknown datetime argument: ${q}, of type ${typeof q}`)}var bn,pn,vn=z(62459),gn=z(35120),mn=z(35488),yn=z(99625),_n=z(77938),En=z(28085),wn=z(88131),Tn=z(15821);function Sn(q){return(0,En.Um)(q,bn)}function An(q){const K=parseInt(q);return!isNaN(K)&&K>=1&&K<=31}function Cn(q){const K=parseInt(q);return!isNaN(K)&&K>0}function On(q){switch(q){case bn.Monday:return 1;case bn.Tuesday:return 2;case bn.Wednesday:return 3;case bn.Thursday:return 4;case bn.Friday:return 5;case bn.Saturday:return 6;case bn.Sunday:return 7;default:return 1}}function In(q,K,z){var Y,Q;if(!function(q){if(!q||"string"!=typeof q)return!1;const K=q.toLocaleLowerCase().split(".");if(0===K.length||K.length>4)return!1;const[z,Y,Q,X]=K,Z=(0,En.Um)(z,pn),J=(0,En.Um)(z,bn);if(!Z&&!J)return!1;if(1===K.length)return!0;if("every"!==Y)return!1;if(3===K.length)return"other"===Q||z===pn.Daily&&Cn(Q)||z===pn.Monthly&&An(Q)||z===pn.Weekly&&(Sn(Q)||Cn(Q));if(z===pn.Daily)return!1;const tt="other"===Q||Cn(Q),et=J&&!Tn.A.isDefined(X)||z===pn.Weekly&&Sn(X)||z===pn.Monthly&&An(X);return tt&&et}(q))return wn.Q.error("invalid-pattern");const[X,Z,J,tt]=q.split("."),et=parseInt(null!=J?J:""),it=parseInt(null!=tt?tt:""),{hour:st,minute:nt}=K,at=z>=K?z:K,rt=at.hour1){const q=12*(at.year-K.year)+(at.month-K.month),z=q%ct;if(0===z&&at.day===dt&&rt){ot=Object.assign(Object.assign({},at.toObject()),{hour:st,minute:nt});break}const Y=ct-z;ot=Object.assign(Object.assign({},K.plus({months:q+Y}).toObject()),{day:dt,hour:st,minute:nt})}else{if(at.day===dt&&rt){ot=Object.assign(Object.assign({},at.toObject()),{hour:st,minute:nt});break}if(at.day=z.year&&Tn.A.isDefined(ct)&&ct>0&&ct<=12&&Tn.A.isDefined(dt)&&(ot=Object.assign(Object.assign({},ot),{day:Math.min(null!==(Q=un.local(ht,ct).daysInMonth)&&void 0!==Q?Q:-1,dt)}));const lt=un.fromObject(ot);return lt.isValid?wn.Q.success(lt):wn.Q.error("invalid-pattern")}!function(q){q.Monday="monday",q.Tuesday="tuesday",q.Wednesday="wednesday",q.Thursday="thursday",q.Friday="friday",q.Saturday="saturday",q.Sunday="sunday"}(bn||(bn={})),function(q){q.Daily="daily",q.Weekly="weekly",q.Monthly="monthly"}(pn||(pn={}));var Dn=z(40392),Rn=z(73678),Pn=z(13956),Mn=z(46784),Nn=z(41674),xn=z(65050),Ln=z(36648),kn=z(12596),Bn=z(80060),Un=z(84415),Fn=z(87490);class Gn{static shouldShowFeaturedPetPopup(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;const K=gn.q.instance.prodigy.gameContainer.get("11f-118a");if(!(yield K.meetsRequirements(72)))return!1;const z=Dn.i.getZoneData(Rn.A_.LAMPLIGHT);if(Dn.i.isZoneLockedParams(z,K,gn.q.instance.prodigy.classModeController.getInClassDisabledZones()))return!1;const Y=this._featuredSpawnService.getCachedData();if(Gn.getMapName(Y)===this._loggedInPlayer.player.data.zone)return!1;const Q=Un.a.getTimestampData(this.MODAL_NAME),X=vn.Aq$.isDefined(null==Q?void 0:Q.timestamp),Z=!this._featuredSpawnService.isOnCooldown()&&this._featuredSpawnService.isActive();if(!X||vn.Aq$.isDefined(null==Q?void 0:Q.id)&&Q.id!==(null==Y?void 0:Y.petId))return Z;if(!vn.Aq$.isDefined(null==Q?void 0:Q.id)&&Un.a.isFeatureReadyForNextInteraction(this.MODAL_NAME,0))return Z;const J=kn.R.parseDateToTimestamp(null==Y?void 0:Y.startDate);if((null==Y?void 0:Y.popupRecurrence)&&J){const K=null!==(q=null==Q?void 0:Q.timestamp)&&void 0!==q?q:0,z=In(Y.popupRecurrence,un.fromMillis(K),un.now());if(z.isSuccess()&&un.now()>=z.expect())return Z}return!1}))}static openFeaturedPetPopup(q){var K,z;const Y=this._featuredSpawnService.getCachedData();if(Y){const Q=gn.q.instance.prodigy.gameContainer.get(vn.$Bt.LocalizationService),X=_n.t.getItem("pet",Y.petId),Z=Gn.getMapName(Y);let J=new vn.I9Y(0,0);const[tt,et]=Z.split("-"),it=gn.q.instance.prodigy.world.getZone(tt).getMap(et).getDefaultSpawnPosition();it&&(J=new vn.I9Y(it.x,it.y));const st={TIME_LEFT_TEXT:this._featuredSpawnService.getTimeUntilExpiry(),RESCUE_TEXT:Q.getText("FEATURED_PET_MODAL_DESCRIPTION",null!==(z=null===(K=null==X?void 0:X.data)||void 0===K?void 0:K.name)&&void 0!==z?z:""),PET_SPINE_GUID:Y.petId.toString(),MAP_NAME:Z,MAP_LOCATION:J},nt=gn.q.instance.prodigy.gameContainer.get("983-05a7");Bn.d.loadWithInjectedValuesAndDependenciesFromGUID(nt,yn.l.FeaturedPetModal,st).then((K=>{Un.a.saveTimestampData(this.MODAL_NAME,{id:Y.petId});gn.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:Mn.B.FeaturedPetModal,interfaceType:Nn.Wm.Modal,instanceType:xn.N.Interface,originType:Nn.$N.AutoSurfaced}),vn.Aq$.isDefined(q)&&K.onDestroy.addOnce(q)})).catch((q=>{vn.VyI.log("Error loading push notification permission prefab",vn.$bb.Error)}))}}static getMapName(q){var K,z;return null!==(z=null===(K=null==q?void 0:q.maps)||void 0===K?void 0:K[0])&&void 0!==z?z:this.SPAWN_MAP}}Gn.ELEMENT_TO_WIDGET_BG_MAP={[Fn.EElementType.Astral]:Ln.q.FeaturedPet_HUD_BG_Astral,[Fn.EElementType.Fire]:Ln.q.FeaturedPet_HUD_BG_Fire,[Fn.EElementType.Ice]:Ln.q.FeaturedPet_HUD_BG_Ice,[Fn.EElementType.Neutral]:Ln.q.FeaturedPet_HUD_BG_Physical,[Fn.EElementType.Physical]:Ln.q.FeaturedPet_HUD_BG_Physical,[Fn.EElementType.Plant]:Ln.q.FeaturedPet_HUD_BG_Plant,[Fn.EElementType.Shadow]:Ln.q.FeaturedPet_HUD_BG_Shadow,[Fn.EElementType.Storm]:Ln.q.FeaturedPet_HUD_BG_Storm,[Fn.EElementType.Water]:Ln.q.FeaturedPet_HUD_BG_Water},Gn.MODAL_NAME="FeaturedPetModal",Gn.SPAWN_MAP="lamplight-C3",(0,Y.Cg)([(0,Pn.b)("762-6549"),(0,Y.Sn)("design:type",mn.J)],Gn,"_featuredSpawnService",void 0),(0,Y.Cg)([(0,Pn.b)("ad2-c5b2"),(0,Y.Sn)("design:type",Object)],Gn,"_loggedInPlayer",void 0)},56625:(q,K,z)=>{"use strict";z.d(K,{s:()=>Z});var Y=z(35120),Q=z(5075),X=z(73678);class Z{static canShowFtue(){const q=Y.q.instance.prodigy.gameContainer.get("782-c308"),K=!Y.q.instance.prodigy.notifications.isPaused(),z=q.hasCompletedTutorial(),X=q.justLeveled&&Q.H.canShowEntryPopup();return K&&z&&!X&&!Z.isOnBlockedQuest()}static isOnBlockedQuest(){const q=Y.q.instance.prodigy.world.getCurrentZone(),K=Y.q.instance.prodigy.world.getCurrentMapTag();return[{zoneId:X.A_.FOREST,questId:3,sequenceId:3,mapId:"B7"},{zoneId:X.A_.FOREST,questId:3,sequenceId:4,mapId:"B7"},{zoneId:X.A_.FOREST,questId:4,sequenceId:0,mapId:"B7"},{zoneId:X.A_.FOREST,questId:4,sequenceId:1,mapId:"B7"},{zoneId:X.A_.FOREST,questId:5,sequenceId:1,mapId:"B6"},{zoneId:X.A_.FOREST,questId:6,sequenceId:5,mapId:"D3"},{zoneId:X.A_.FOREST,questId:12,sequenceId:4,mapId:"D3"}].some((z=>{const Q=Y.q.instance.prodigy.world.getZone(z.zoneId);return q===z.zoneId&&K===z.mapId&&Q.isOnSequence(z.questId,z.sequenceId)}))}}},6719:(q,K,z)=>{"use strict";z.d(K,{y:()=>X});var Y=z(8674);var Q=z(35120);class X extends class{static getAsset(q){return"string"==typeof q?q:q.atlas}static isImageSpecifierCompatible(q){return"string"==typeof q||"object"==typeof q&&null!==q&&"atlas"in q&&"frame"in q}}{static toInjectionParams(q){return"string"==typeof q?[q]:[q.atlas,q.frame]}static loadAssets(...q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield Q.q.instance.prodigy.load.assetsAsPromise(q.map((q=>this.getAsset(q))))}))}}},87331:(q,K,z)=>{"use strict";z.d(K,{G:()=>Y});class Y{static shouldShowMemberLockIcon(q,K){if(("follow"===q.type||"mount"===q.type)&&1===q.data.member){return 1===K.backpack.getItem(q.type,q.ID).L}return!1}}},34612:(q,K,z)=>{"use strict";z.d(K,{F:()=>Z});var Y=z(90633),Q=z(35120),X=z(3032);class Z{static validateZoneProgressionType(){var q;const K=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=Q.q.instance.prodigy.gameContainer.get("fa1-8ec9"),J=Q.q.instance.prodigy.gameContainer.get("11f-118a");if(K.getQuestSystem("zoneUnlockType")!==X.p.ZoneUnlockedLinearCampaign){if(K.getLevel(){"use strict";z.d(K,{K:()=>st});var Y=z(88022),Q=z(85855),X=z(99625),Z=z(51742),J=z(36648),tt=z(56942),et=z(35120),it=z(91207);class st{static cacheAssets(q,K,z){for(let Y=0;Y{"use strict";z.d(K,{b:()=>Y});class Y{static mailHasGameMethod(q,K){var z;return(null===(z=q.gameMethod)||void 0===z?void 0:z.name)===K}static isSingleUse(q){return Y.SINGLE_USE_MAIL_METHODS.some((K=>Y.mailHasGameMethod(q,K)))}static isDebugMailData(q){return!0===(null==q?void 0:q.debug)}static isClientInsertedMail(q){return!q.id||null===q.id}static mergeSecureUnsecure(q,K){var z,Y;const Q=null!==(z=null==q?void 0:q.map((q=>({ID:q.id,type:q.type,N:q.quantity,isSecure:!0}))))&&void 0!==z?z:[],X=null!==(Y=null==K?void 0:K.map((q=>({ID:q.id,type:q.type,N:q.quantity}))))&&void 0!==Y?Y:[];return Q.concat(X)}}Y.SINGLE_USE_MAIL_METHODS=["openGiftBox","openPromoPetEgg","singleUseGotItem"]},23748:(q,K,z)=>{"use strict";z.d(K,{z:()=>Q});var Y=z(62459);class Q{static validateInt(q,K=0){if("number"!=typeof q){const z=parseInt(q,10);return Number.isNaN(z)?K:z}return Number.isNaN(q)?K:q}static getWorldPosition(q){let K=0,z=0;if(Y.Aq$.isDefined(q)){K=q.position.x,z=q.position.y;let Q=q.parent;for(;Y.Aq$.isDefined(Q);)K+=Q.position.x,z+=Q.position.y,Q=Q.parent}return{x:K,y:z}}static convertWorldToScreenPosition(q){let K=q.x,z=q.y;return Y.i7d.main&&(K=K-Y.i7d.main.GameObject.transform.worldPosition.x+Y.i7d.main.viewportSize.getHalfWidth(),z=z-Y.i7d.main.GameObject.transform.worldPosition.y+Y.i7d.main.viewportSize.getHalfHeight()),{x:K,y:z}}static convertScreenToWorldPosition(q){let K=q.x,z=q.y;return Y.i7d.main&&(K=K+Y.i7d.main.GameObject.transform.worldPosition.x-Y.i7d.main.viewportSize.getHalfWidth(),z=z+Y.i7d.main.GameObject.transform.worldPosition.y-Y.i7d.main.viewportSize.getHalfHeight()),{x:K,y:z}}static normalizeRange(q,K,z){return K>q?(z-q)/(K-q):K1?1:Y,q+(K-q)*Y}static roundToNearestMultiplier(q,K){return Math.round(q/K)*K}static ceilToNearestMultiplier(q,K){return 0===K?q:Math.ceil(q/K)*K}static selectRandomWeightedSelection(q){const K=q.reduce(((q,K)=>q+K),0);let z=Math.random()*K;for(let Y=0;Y{"use strict";z.d(K,{o:()=>rt});var Y,Q=z(8674),X=z(62459),Z=z(95891),J=z(88022),tt=z(50654),et=z(35120),it=z(34829),st=z(77938),nt=z(24110),at=z(23748);!function(q){q[q.UserID=0]="UserID",q[q.ClassID=1]="ClassID",q[q.Grade=2]="Grade"}(Y||(Y={}));class rt{static isEmptyObject(q){if(!X.Aq$.isDefined(q))return!0;for(const K in q)if(q.hasOwnProperty(K))return!1;return!0}static inTestGroups(q,K,z=rt.LANE_SIZE,Q=rt.TOTAL_LANES,X=Y.UserID){for(let Y=0;YQ-1||K<0)return X.VyI.log(`Lane ${K} is invalid for totalLanes ${Q}`,X.$bb.Error),!1;switch(Z){case Y.UserID:J=q.userID;break;case Y.ClassID:J=rt.getLatestClassID(q.owners,q.playerTeachers,q.playerParents);break;case Y.Grade:J=q.grade;break;default:return X.VyI.log(`Invalid type ${Z}`,X.$bb.Error),!1}return X.Aq$.isDefined(J)?Math.floor(J/z)%Q===K:(X.VyI.log(`Invalid ID being used. type = ${Z} player = ${JSON.stringify(q)}`,X.$bb.Error),!1)}static getTestLane(q,K=rt.LANE_SIZE,z=rt.TOTAL_LANES,Q=Y.UserID){let Z=null;const J=it.s.get("GameConstants.Features.SplitTests.DEBUG_LANE");if(X.Aq$.isDefined(J))return J;switch(Q){case Y.UserID:Z=q.userID;break;case Y.ClassID:Z=rt.getLatestClassID(q.owners,q.playerTeachers,q.playerParents);break;case Y.Grade:Z=q.grade;break;default:return X.VyI.log(`Invalid type ${Q}`,X.$bb.Error),-1}return X.Aq$.isDefined(Z)?Math.floor(Z/K)%z:(X.VyI.log(`Invalid ID being used. type = ${Q} player = ${JSON.stringify(q)}`,X.$bb.Error),-1)}static getLatestClassID(q,K,z){let Y=[],Q=null,Z=null,J=null;X.Aq$.isDefined(z)&&z.length>0&&(Y=z),X.Aq$.isDefined(K)&&K.length>0&&(Y=K);for(let X=0;XJ.startDate)&&(J=Q)}return X.Aq$.isDefined(J)?J.id:0}static highlightObjectOnLayer(q,K=0,z=0,Y,Q){const Z=X.Aq$.isDefined(Q)?Q:Y,tt=Z.addChild(et.q.instance.prodigy.create.sprite(K,z,J._.General_icons_json,"help"));return tt.anchor.set(.5,1),X.Aq$.isDefined(Y)&&(tt.x+=at.z.getWorldPosition(Y).x-at.z.getWorldPosition(Z).x,tt.y+=at.z.getWorldPosition(Y).y-at.z.getWorldPosition(Z).y),q.add.tween(tt,this).to({y:tt.y+25},400,X.GS3.Quadratic.InOut,!0,0,it.s.MAX_SAFE_INTEGER,!0),tt}static isLevelLocked(q,K){return q.getLevel()0&&(X.cost=z?K.price:Z[0].getAmount(),X.currency=null===(Q=null===(Y=st.t.getItem(Z[0].getType(),Z[0].getID()))||void 0===Y?void 0:Y.data)||void 0===Q?void 0:Q.name)}return X}static isNumber(q){return!isNaN(parseFloat(q))&&isFinite(q)}static wrapPrefabForPixiObject(q,K){const z=new X._mx;z.layer="default",z.addComponent(X.dLy);return z.addComponent(nt.B).getRootContainer().setParent(K),q.parent=z,z}static recursiveItemDrops(q){if(q.length>7){const K=q.slice(0,7);et.q.instance.prodigy.open.gotItem(K,this.recursiveItemDrops.bind(this,q.slice(7)))}else{if(!(q.length>0))return;et.q.instance.prodigy.open.gotItem(q)}}static wait(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return new Promise((K=>window.setTimeout(K,q)))}))}}rt.LANE_SIZE=1e3,rt.TOTAL_LANES=10},87392:(q,K,z)=>{"use strict";z.d(K,{f:()=>X});var Y=z(95891),Q=z(77938);class X{static getFilteredFirstNames(){return Y.orderBy(Q.t.getItemsWithFilter("name",(q=>0===q.data.type&&!q.data.deprecated)),["data.value"])}static getFullNameByID(q,K,z){var Y,X,Z,J,tt,et,it,st,nt,at;const rt=null!==(Z=null===(X=null===(Y=Q.t.getItem("name",q))||void 0===Y?void 0:Y.data)||void 0===X?void 0:X.value)&&void 0!==Z?Z:"",ot=null!==(et=null===(tt=null===(J=Q.t.getItem("name",K))||void 0===J?void 0:J.data)||void 0===tt?void 0:tt.value)&&void 0!==et?et:"",ht=null!==(nt=null===(st=null===(it=Q.t.getItem("name",z))||void 0===it?void 0:it.data)||void 0===st?void 0:st.value)&&void 0!==nt?nt:" ";return`${rt} ${ot}${null===(at=ht[0])||void 0===at?void 0:at.toLowerCase()}${ht.slice(1)}`.replace(/\s\s+/g," ").trim()}static getFilteredMiddleNames(){return Q.t.getItemsWithFilter("name",(q=>1===q.data.type&&!q.data.deprecated))}static getFilteredLastNames(){return Q.t.getItemsWithFilter("name",(q=>2===q.data.type&&!q.data.deprecated))}}},38920:(q,K,z)=>{"use strict";z.d(K,{Hk:()=>X,RL:()=>Z,cC:()=>J});var Y=z(62459);const Q=[[1e6,"M"],[1e3,"k"]],X=(q,K=0,z=" ")=>null==q?void 0:q.toFixed(K).replace(/\B(?=(\d{3})+(?!\d))/g,z),Z=(q,K)=>`${X(q)} / ${X(K)}`;function J(q,K=0){if(!Y.Aq$.isDefined(q))return"?";let z=q,X="";const Z=Math.log10(q);if(Z>K)for(const[Y,et]of Q)if(q>=Y){z=q/Y,X=et;break}let J=2;z%1<1/Math.pow(10,J)&&(J=1);const tt=Math.log10(z)+J+X.length;return Math.floor(tt)>Math.floor(Z)?q.toFixed(0):`${z.toFixed(J-1)}${X}`}},39938:(q,K,z)=>{"use strict";z.d(K,{n:()=>Z});var Y=z(62459),Q=z(41170),X=z(40743);function Z(q,K){(0,Y.EVk)(`${K}StateManager`)(class extends X.r{set state(q){0}constructor(){super(),(0,Y.gfw)(q)(this,"_state")}}),(0,Y.EVk)(`${K}State`)(class extends Q.A{constructor(){super(),(0,Y.gfw)(q)(this,"state"),(0,Y.gfw)(q)(this,"blendStates"),(0,Y.SZi)()(this,"blendStates")}})}},24285:(q,K,z)=>{"use strict";z.d(K,{s:()=>Q});var Y=z(62459);class Q{static resetCacheAsBitmap(q){q.cacheAsBitmap&&(q.cacheAsBitmap=!1,q.cacheAsBitmap=!0)}static cacheAsBitmap(q,K=!0){q&&(q.cacheAsBitmap=!1,q.cacheAsBitmap=K)}static setLayerCacheAsBitmap(q,K=!0){if(!Y.wa5.getActiveScene().hasLayer(q))return void Y.VyI.log(`Tried to set cacheAsBitmap on layer ${q} but it doesn't exist`,Y.$bb.Warning);const z=Y.wa5.getActiveScene().getLayer(q);z.cacheAsBitmap!==K&&(z.cacheAsBitmap=!1,z.cacheAsBitmap=K)}}},22023:(q,K,z)=>{"use strict";z.d(K,{O2:()=>ut,tA:()=>bt,Tc:()=>ft,P8:()=>Nt});var Y=z(8674),Q=z(87490),X=z(62459),Z=z(95891),J=z.n(Z),tt=z(62248),et=z(24521),it=z(56942),st=z(58182),nt=z(77601);const at=(0,nt.gb)({key:"fab_remove_evolution_level_cap",activateAssociatedExperiments:0,default:!1});var rt=z(21574),ot=z(50788),ht=z(37016),ct=z(96989),dt=z(90156);const lt=(0,nt.gb)({key:"show-unique-pets",activateAssociatedExperiments:1,default:!1});var ut,ft,bt,pt=z(90633),vt=z(35120),gt=z(34829),mt=z(23029),yt=z(77938),_t=z(39984),Et=z(50503),wt=z(15218),Tt=z(17148),St=z(55122),At=z(12472),Ct=z(76277),Ot=z(63693),It=z(6413),Dt=z(43846),Rt=z(68152),Pt=z(14726),Mt=z(30226);!function(q){q[q.GIFT_UNAVAILABLE=0]="GIFT_UNAVAILABLE",q[q.GIFT_AVAILABLE=1]="GIFT_AVAILABLE",q[q.GIFT_REDEEMED=2]="GIFT_REDEEMED"}(ut||(ut={})),function(q){q[q.None=0]="None",q[q.ShowEvolve=1]="ShowEvolve",q[q.ShowStaticEvolve=2]="ShowStaticEvolve",q[q.ShowUpgrade=3]="ShowUpgrade"}(ft||(ft={})),function(q){q[q.None=0]="None",q[q.NoOwnership=1]="NoOwnership",q[q.NoMerge=2]="NoMerge",q[q.NoPurchase=4]="NoPurchase",q[q.NoCapture=8]="NoCapture",q[q.NoEvolution=16]="NoEvolution",q[q.All=31]="All"}(bt||(bt={}));class Nt{static getPetEvolutionGiftThreshold(){const q=parseInt(vt.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("petEvolutionGiftThreshold"));return isNaN(q)?Nt.DEFAULT_PET_EVOLUTION_GIFT_THRESHOLD:q}static getEvolutionLVL(q){var K,z;if(Tt.k.cachedDisabledEvolutionFeature)return;const Y=null===(z=null===(K=null==q?void 0:q.data)||void 0===K?void 0:K.curve)||void 0===z?void 0:z.find((q=>q.evolveID));return null==Y?void 0:Y.lvl}static getEvolutionID(q){var K,z;if(Tt.k.cachedDisabledEvolutionFeature)return;const Y=null===(z=null===(K=null==q?void 0:q.data)||void 0===K?void 0:K.curve)||void 0===z?void 0:z.find((q=>q.evolveID));return null==Y?void 0:Y.evolveID}static hasEvolutionID(q,K){if(Tt.k.cachedDisabledEvolutionFeature)return!1;return!!(null==K?void 0:K.data.curve.find((K=>K.evolveID===q)))}static findPreviousEvolution(q,K){return K.find((K=>this.hasEvolutionID(null==q?void 0:q.ID,K)))}static findNextEvolution(q){const K=this.getEvolutionID(q);return X.Aq$.isDefined(K)?yt.t.getItem("pet",K):null}static GetEvolutionaryLine(q){const K=yt.t.getCategoryItems("pet"),z=[q.ID];let Y=this.findNextEvolution(q);for(;Y;)z.push(Y.ID),Y=this.findNextEvolution(Y);for(Y=this.findPreviousEvolution(q,K);Y;)z.unshift(Y.ID),Y=this.findPreviousEvolution(Y,K);return z}static hasValidOrdinal(q){var K;return X.Aq$.isDefined(null===(K=q.data)||void 0===K?void 0:K.ordinal)&&q.data.ordinal>0}static isValidForPetBook(q){return this.hasValidOrdinal(q)&&this.isValidForUltimatesExperiment(q)}static isValidForUltimatesExperiment(q){const K=vt.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("ultimates"),z=this.isUltimate(q.ID);return!z||z&&K}static isUltimatesFollow(q){const K=yt.t.getItem("follow",q).metadata.petID;return this.isUltimate(K)}static isPetOnTeam(q){return X.Aq$.isDefined(q.team)}static getElementType(q){return q.data.affinity}static getPetDisplayName(q,K,z){var Y;let Q=null!==(Y=null==K?void 0:K.nickname)&&void 0!==Y?Y:Mt.J.getLocalizationNameKey({ID:q.ID,type:"pet"});return Q=(0,Dt.k)(Q),X.Aq$.isDefined(z)&&Q.length>z&&(Q=`${Q.substr(0,z)}...`),Q}static canPlayerAccessPetMergeFeature(q){var K;if((0,Ct.G)(ot.J))return!0;return(null!=q?q:vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player).getLevel()>=(null!==(K=rt.g.config.minimumPlayerLevel)&&void 0!==K?K:0)}static getPetDisplayMergeRank(q,K){var z,Y;if(Nt.canPlayerAccessPetMergeFeature()&&this.canPetAccessMergeRanks(q))return null!==(Y=null===(z=vt.q.instance.prodigy.gameContainer.get("782-c308").kennel.getPetByUniqueID(K))||void 0===z?void 0:z.mergeRank)&&void 0!==Y?Y:ht.qd.MIN}static canPetAccessMergeRanks(q){const K=mt.R.loadData(et.r.PetOwnershipRestrictions_json),z=Array.from(new Set([...K.noOwnership,...K.noMerge]));return!(!(0,Ct.G)(ot.J)&&this.isPetEpic(+q)||z.includes(+q))}static getExcludedPetIDs(q){const K=mt.R.loadData(et.r.PetOwnershipRestrictions_json),z=[];q&bt.NoCapture&&z.push(...K.noCapture),q&bt.NoEvolution&&z.push(...K.noEvolution),q&bt.NoMerge&&z.push(...K.noMerge),q&bt.NoOwnership&&z.push(...K.noOwnership),q&bt.NoPurchase&&z.push(...K.noPurchase);return Array.from(new Set([...z]))}static getRequiredPetMergeIngredient(q,K){var z;if(!X.Aq$.isDefined(null===(z=null==q?void 0:q.data)||void 0===z?void 0:z.evolution))return;let Y=q;if(ct.Y.isMerge1Recipe(K)){if(q.data.evolution.tier===K.evolutionTier)return Y;if(q.data.evolution.tier>K.evolutionTier){const K=yt.t.getCategoryItems("pet");Y=Nt.findPreviousEvolution(q,K)}else q.data.evolution.tier=125&&q<=133||K&&this.isUltimate(q))}static isUltimate(q){return mt.R.loadData(et.r.UltimatesPetLocationConfig_json).ultimatesData.some((K=>K.id===+q))}static isPetStater(q){return It.h.STARTER_PETS.includes(q)}static isPetEvolvedStarter(q){return It.h.STARTER_PETS.map((q=>yt.t.getItem("pet",q))).map((q=>Nt.GetEvolutionaryLine(q))).reduce(((q,K)=>q.concat(K))).includes(q)}static isPetACrystalMonster(q){return It.h.CRYSTAL_MONSTERS.includes(q)}static getPetLevel(q){return X.Aq$.isDefined(q.level)?X.cj9.clamp(q.level,1,St.s.activePlayerLevelCap):1}static getPetChargedLevelCumulative(q){if(!Nt.isPetOnTeam(q))return Nt.getPetLevel(q);const K=vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return Nt.getPetLevel(q)+K.getChargedLevel()}static getPetsEffectiveLevel(q){var K;const z=mt.R.loadData(et.r.BattleRevampConstants_json).battleConstants,Y=this.getPetChargedLevelCumulative(q)*(1+(null!==(K=q.mergeRank)&&void 0!==K?K:ht.qd.MIN)/z.divisors[Q.EDivisor.MergeRank]);return Math.trunc(Y)}static getTeamsEffectiveLevels(){return vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPetTeam(!1).map((q=>this.getPetsEffectiveLevel(q.data)))}static getPetMaxHealth(q,K){const z=yt.t.getItem("pet",q.ID);return Et.A.getHPFromParams(null!=K?K:Nt.getPetLevel(q),z.data.statHealth)}static getPetCurrentHealth(q){return X.Aq$.isDefined(null==q?void 0:q.hp)?q.hp:this.getPetMaxHealth(q)}static getAtlasElementBackerPath(q){return`pet-icon-backers/pet-icon-backers-${"plant"===q?"earth":q}`}static getAllOwnedPetsFromList(q){return vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPets().filter((K=>q.find((q=>K.ID===q.ID))))}static getAllOwnedPetsFromExcludeList(q){return vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPets().filter((K=>!q.some((q=>K.ID===q.ID))))}static ownsAllPetsFromList(q){const K=vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPets();return q.every((q=>K.some((K=>K.ID===q.ID))))}static ownsAllPetsFromZone(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=vt.q.instance.prodigy.gameContainer.get("e84-d543"),z=yield K.getPetsInZone(q);return Nt.ownsAllPetsFromList(z)}))}static getAllOwnedEpicPetIDs(q=!0){const K=gt.A.get("GameConstants.Debug.OVERRIDE_OWNED_EPIC_IDS"),z=vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return null!=K?K:z.kennel.getPets().map((q=>q.ID)).filter(((K,z,Y)=>Nt.isPetEpic(K,q)&&Y.indexOf(K)===z))}static getAllOwnedUltimatePetIDs(){return vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPets().map((q=>q.ID)).filter(((q,K,z)=>Nt.isUltimate(q)&&z.indexOf(q)===K))}static getAllUltimatesPetData(){const q=mt.R.loadData(et.r.UltimatesPetLocationConfig_json),K=[];return q.ultimatesData.forEach((q=>{K.push({ID:q.id})})),K}static isUltimateLeavingSoon(q,K=Pt.T.Week){return vt.q.instance.prodigy.gameContainer.get("0f2-d6bd").getServerTimeMs()+K>=q.valueOf()}static getPetEvolutionType(q){let K=Ot.Zj.Base;const z=yt.t.getItem("pet",q);if(!z)return X.VyI.log(`Pet ID ${q} could not be found`,X.$bb.Error),null;const Y=this.GetEvolutionaryLine(z);return 1===Y.length||Y.forEach(((z,Y)=>{z===q&&(K=`evolution${Y+1}`)})),K}static getPetBench(q){var K,z,Y,Q;const X=mt.R.loadData(et.r.PetBenchVariationConfig_json).benchData,Z=yt.t.getItem("pet",q);return X&&wt.A.useRevisedDifficulty?null!==(Y=null!==(z=null===(K=X.find((K=>K.petID===q)))||void 0===K?void 0:K.bench)&&void 0!==z?z:Z.data.bench)&&void 0!==Y?Y:[]:null!==(Q=Z.data.bench)&&void 0!==Q?Q:[]}static canPetEvolve(q,K){var z;if(Tt.k.cachedDisabledEvolutionFeature)return!1;if((0,Ct.G)(st.N)&&(null!==(z=q.data.evolutionCount)&&void 0!==z?z:0)>0)return!1;const Y=q.getAvailableEvolutions(),Q=K>=Nt.getPetEvolutionGiftThreshold(),X=Y.length>0;return Q&&X}static getEvolutionGiftState(q){const K=!vt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(pt.B.FEATURE_PET_EVOLUTION,pt.B.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION);return q||K?ut.GIFT_AVAILABLE:ut.GIFT_REDEEMED}static getBattleStats(q,K,z,Y=0){var Q,Z,tt;const et=vt.q.instance.prodigy.gameContainer.get("782-c308");(0,Rt.v)(q.data,`Pet ${q.ID} does not have data`);const it=_t.e.getBattleStats(q.data,K),st=J().mergeWith({},q.data.stats,it);if(!z)return st;const nt=et.kennel.getPetByUniqueID(z);if(!nt)return st;let at=null!==(Q=nt.mergeRank)&&void 0!==Q?Q:ht.qd.MIN;at=X.cj9.clamp(at+Y,ht.qd.MIN,ht.qd.MAX);const ot=null!==(tt=null===(Z=rt.g.config.statScalers)||void 0===Z?void 0:Z[at])&&void 0!==tt?tt:{};if(ot)for(const[X,J]of Object.entries(ot))st[X]=Math.round(st[X]*J);return st}static getPetSpineId(q){var K,z,Y;const Q=yt.t.getItem("pet",q).metadata.assets;return X.Aq$.isDefined(Q.default)&&"spine"===Q.default.type?(null===(K=Q.default)||void 0===K?void 0:K.assetKey)?it.Q[null===(z=Q.default)||void 0===z?void 0:z.assetKey]:`spine-${null===(Y=Q.default)||void 0===Y?void 0:Y.ID}`:(X.VyI.log(`Could not retrieve spine asset data from pet Id: ${q}`,X.$bb.Error),null)}static getMaxOwnableLevel(q,K=ht.qd.MIN){var z,Y;const Q=yt.t.getItem("pet",q);if(Tt.k.cachedDisabledEvolutionFeature){if(K===ht.qd.MAX)return St.s.activePlayerLevelCap;const q=ct.Y.getMerge2RecipeForPet(Q.ID,Q.data.rarity,K);return null!==(z=null==q?void 0:q.levelCap)&&void 0!==z?z:St.s.activePlayerLevelCap}return(0,Ct.G)(at)?St.s.activePlayerLevelCap:null!==(Y=this.getEvolutionLVL(Q))&&void 0!==Y?Y:St.s.activePlayerLevelCap}static getAssetIdFromUniqueId(q){var K;return null===(K=vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPets().find((K=>K.uniqueID===q)))||void 0===K?void 0:K.ID}static getLevelFromUniqueId(q){var K;return null===(K=vt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.kennel.getPets().find((K=>K.uniqueID===q)))||void 0===K?void 0:K.level}static getUpgradeSuggestion(q){const K=vt.q.instance.prodigy.gameContainer,z=K.get("bec-c6b4"),Y=Nt.getPetLevel(q),Q=Y=Z,et=z.canAfford(z.petAcquisitionCost(q.ID,tt.l6.Evolution));return J?et?ft.ShowEvolve:ft.ShowStaticEvolve:Q?ft.ShowUpgrade:ft.None}static createItemDataFromPet(q,K){const z=yt.t.getItem("pet",q);return{ID:q,hp:this.getPetMaxHealth(z,K)}}static isPetReadyToMerge(q){const K=Nt.getPetRecipeData(q);if(!X.Aq$.isDefined(K))return!1;return At.r.getOwnedIngredientsForRecipe(q,(q=>yt.t.getItem("pet",q)),K).length>=K.ingredientCount}static getPetRecipeData(q,K){const z=yt.t.getItem("pet",q.ID),Y=null!=K?K:q.mergeRank;return(0,Ct.G)(ot.J)?ct.Y.getMerge2RecipeForPet(z.ID,z.data.rarity,Y):ct.Y.getRecipeForPet(z.data.evolution.totalEvos,Y)}static sortPetList(q){const K=[q=>Nt.getPetLevel(q),q=>{var K;return null!==(K=q.mergeRank)&&void 0!==K?K:0},q=>yt.t.getItem("pet",q.ID).data.rarity,q=>yt.t.getItem("pet",q.ID).data.ordinal],z=["desc","desc","desc","asc"];return Nt.showUniquePetsFeature()&&(K.unshift((q=>!Nt.isPetEpic(q.ID,!0)&&Nt.isPetReadyToMerge(q))),z.unshift("desc")),J().orderBy(q,K,z)}static sortPetItems(q){return J().orderBy(q,[q=>q.data.ordinal],["asc"])}static getPrimaryPet(q,K){const z=K.filter((K=>K.ID===q));if(!(z.length<1))return 1===z.length?z[0]:J().orderBy(z,[q=>{var K;return null!==(K=q.mergeRank)&&void 0!==K?K:0},q=>q.level,q=>q.catchDate],["desc","desc","asc"])[0]}static filterPrimaryPets(q){if(!Nt.showUniquePetsFeature())return q;const K=J().uniq(q.map((q=>q.ID))),z=[];for(const Y of K){const K=this.getPrimaryPet(Y,q);K&&z.push(K)}return z}static showUniquePetsFeature(){return(0,Ct.G)(lt)&&(0,Ct.G)(dt.m)}static canPetMerge(q){if(q.mergeRank>=ht.qd.MAX)return!1;const K=yt.t.getItem("pet",q.ID),z=(0,Ct.G)(ot.J),Y=z?ct.Y.getMerge2RecipeForPet(K.ID,K.data.rarity,q.mergeRank):ct.Y.getRecipeForPet(K.data.evolution.totalEvos,q.mergeRank);if(!X.Aq$.isDefined(Y))return!1;const Q=At.r.getOwnedIngredientsForRecipe(q,(q=>yt.t.getItem("pet",q)),Y);return!(z&&q.level{"use strict";z.d(K,{E:()=>et});var Y=z(95891),Q=z.n(Y),X=z(35120),Z=z(82209),J=z(77938),tt=z(129);class et{static renderFriendAndClassmateFace(q,K,z){const Y=X.q.instance.prodigy.friendsListNetworkHandler.classList;let Q=X.q.instance.prodigy.friendsListNetworkHandler.friendsList;Q=Q.concat(Y);for(let Z=0;Z{"use strict";z.d(K,{x:()=>J});var Y=z(62459),Q=z(35120),X=z(34829),Z=z(91315);class J{static showErrorMessage(q){const K=Q.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService),z=new Z.p(Q.q.instance.game,Q.q.instance.prodigy.game.state.getCurrentState().stage);return z.preprocess(q,void 0,void 0),z.queuePostCreateCallback(z.setOkay.bind(z,K.getText("SETTINGS_LOGOUT"),null)),z.setCloseCallback((()=>{Q.q.instance.prodigy.gameContainer.get("774-4659").logout(!0)})),z}static showErrorMessageThenReturnToCurrentMap(){Q.q.instance.prodigy.open.messageBoxPrefab({text:"STUCK_POPUP_TEXT",confirmCallback:()=>{Q.q.instance.prodigy.world.teleportToCurrentMap()}})}static get arePopupsEnabled(){return X.A.get("GameConstants.Debug.POPUPS_ENABLED")&&!Q.q.instance.prodigy.notifications.isPaused()&&!Q.q.instance.prodigy.world.inRestrictedSocialZone(Q.q.instance.prodigy.world.getCurrentZone())}}},80060:(q,K,z)=>{"use strict";z.d(K,{d:()=>Z});var Y=z(8674),Q=z(62459),X=z(26004);class Z{static loadWithInjectedValuesAndDependenciesFromGUID(q,K,z,Y,X=!1){const Z=new Q._mx(Y);Z.addComponent(Q.dLy);const J=Z.addComponent(Q.bE_);for(const Q in z)J.Container.bind(Q).toConstantValue(z[Q]);const tt=Object.keys(null!=z?z:{}).map((q=>({injectionName:q,data:z[q]})));return q.loadWithDependenciesFromGUID(K,Z,X,tt)}static preloadWithInjectedValuesAndDependenciesFromGUID(q,K,z,Y=!1){const X=new Q._mx;X.addComponent(Q.dLy);const Z=X.addComponent(Q.bE_);for(const Q in z)Z.Container.bind(Q).toConstantValue(z[Q]);return q.preloadFromGUIDWithDependencies(K,Y,this.getDataForInjection(z))}static getDataForInjection(q){return Object.keys(null!=q?q:{}).map((K=>({injectionName:K,data:q[K]})))}static loadWithInjectedValuesFromGUID(q,K,z,Y){const X=new Q._mx(Y);X.addComponent(Q.dLy);const Z=X.addComponent(Q.bE_);for(const Q in z)Z.Container.bind(Q).toConstantValue(z[Q]);const J=Object.keys(null!=z?z:{}).map((q=>({injectionName:q,data:z[q]})));return q.loadFromGUID(K,X,J)}static updateInjectedValues(q,K,z=!0){let Y=q.findComponent(Q.bE_);const Z=!Y;Z&&(Y=q.addComponent(Q.bE_));for(const Q in K)Y.Container.rebind(Q).toConstantValue(K[Q]);let J=q.findComponentsInChildren(X.B,z);const tt=Object.keys(K);J=J.filter((q=>tt.includes(q.id)));for(const Q of J)Q.consumeOnUpdatedInjectedValue&&Q.consume();Z&&Y.destroy()}static updateInjectedValuesWithDelay(q,K){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z=!0,Y=0){yield Q.Egh.timeout(Y).then((()=>Z.updateInjectedValues(q,K,z)))}))}}},19690:(q,K,z)=>{"use strict";z.d(K,{Ks:()=>X,mD:()=>Q,vt:()=>Z});var Y=z(35120);const Q=()=>Y.q.instance.prodigy.icon,X=()=>Y.q.instance.prodigy.gameContainer.get("983-05a7"),Z=()=>Y.q.instance.prodigy.create},20404:(q,K,z)=>{"use strict";z.d(K,{b:()=>X});var Y=z(62459),Q=z(77938);class X{static getQueryParameterByName(q,K=window.location.href){const z=new RegExp(`[?&]${q}(=([^&#]*)|&|#|$)`).exec(K);return z?z[2]?decodeURIComponent(z[2].replace(/\+/g," ")):"":null}static getQueryParameterAssetID(q,K){if(Y.Aq$.isDefined(K)&&0!==K.length){const z=Q.t.getCategoryItems("queryParameter").filter((z=>z.data.key===q&&new RegExp(z.data.value).test(K)));if(z.length>0)return z.length>1&&Y.VyI.log("Multiple assetIDs found. Multiple assets for the same query parameter is not supported.",Y.$bb.Warning),z[0].ID}}static isQueryParameterSetForSession(q){const K=Q.t.getItem("queryParameter",q),z=K.data.key;return new RegExp(K.data.value).test(X.getQueryParameterByName(z))}static getQueryParameterKeyFromID(q){return Q.t.getItem("queryParameter",q).data.key}}},76945:(q,K,z)=>{"use strict";z.d(K,{o:()=>J});var Y=z(62459),Q=z(95891),X=z(43924),Z=z.n(X);class J{static integerInRange(q,K){return Math.floor(J.realInRange(q,K))}static realInRange(q,K,z){if(Y.Aq$.isDefined(z)){return new Y.bsf([z]).realInRange(q,K)}return Math.random()*(K-q)+q}static seededRandom(q){return Z()(q.toString())()}static seededRange(q,K,z){return Math.floor(this.seededRandom(z)*(K-q+1)+q)}static normalDistribution(q,K){let z=0;for(let Y=0;Y<6;Y++)z+=Math.random();return z/=6,q+z*(K-q+1)}static weightedArrayElement(q,K){let z=0;const X=[];if(!Y.Aq$.isDefined(Q.find(q,(q=>q.weight<=0)))&&q.length>0){const Z=Math.round(1/(Q.minBy(q,"weight").weight/100));for(let K=0;K{"use strict";z.d(K,{R:()=>Z});var Y=z(87490),Q=z(62459),X=z(34829);class Z{static applyRewardsScalar(q,K=1){return Math.ceil(q*K)}static addDebugMessage(q){this._debugBuffer.add(q)}static outputDebugMessages(){this._debugBuffer.flush()}static bucketRewards(q){let K=[];const z=new Map;return q.forEach((q=>{if("gold"===q.type||"currency"===q.type){let K=q.ID;"currency"===q.type&&1===q.ID?q.type="gold":"gold"===q.type&&(K=1),z.has(K)?z.get(K).push(q):z.set(K,[q])}else K.push(q)})),K=[...K,...Array.from(z.values()).map((q=>{var K;const z=q.reduce(((q,K)=>q+K.N),0);return Z.addDebugMessage(`${q[0].type} ${null!==(K=q[0].ID)&&void 0!==K?K:""} with values [${q.map((q=>q.N)).join(", ")}] has been bucketed to ${z}`),Object.assign(Object.assign({},q[0]),{N:z})}))],K}static scaleRewards(q,K){return q.map((q=>{var z;if("gold"===q.type||"currency"===q.type){const Y=Z.applyRewardsScalar(q.N,K);return Z.addDebugMessage(`Scaling ${q.type} ${null!==(z=q.ID)&&void 0!==z?z:""} from ${q.N} x ${K} = ${Y}`),Object.assign(Object.assign({},q),{N:Y})}return q}))}static bucketAndScaleRewards(q,K){const z=Z.bucketRewards(q);return Z.scaleRewards(z,K)}static shouldShowRewardsScalingWarning(q){return!!(Q.Aq$.isDefined(q)&&Q.Aq$.isDefined(q.rewardsScalar)&&Q.Aq$.isDefined(q.levelDelta))&&(q.rewardsScalar<1&&q.levelDelta>=5)}}Z._debugBuffer=new class{constructor(q,K=25,z=Q.$bb.Info){this._buffer=[],this._typeListConstant="GameConstants.Debug.DISPLAY_CLIENT_DEBUG_MESSAGES",this._type=q,this._maxLength=K,this._logLevel=z}add(q){this.isSubscribed()&&(this._buffer.length>=this._maxLength&&this.flush(),this._buffer.push(q))}getBuffer(){return this._buffer.join("\n")}flush(){this.getBuffer();this.clear()}clear(){this._buffer=[]}isSubscribed(){const q=X.s.get(this._typeListConstant);return!!Q.Aq$.isDefined(q)&&q.includes(this._type)}}(Y.EDebugMessageType.RewardScaling)},92864:(q,K,z)=>{"use strict";z.d(K,{t:()=>Q});var Y=z(62459);class Q{constructor(q){this.seed=q,this.currentSeed=q}next(){return this.currentSeed=this.currentSeed+Q.CONSTANT,this.generate(this.currentSeed)}jumpFromStart(q){let K=0;for(let z=0;z<=q;z++)K=this.generate(this.seed+z*Q.CONSTANT);return K}jump(q){let K=this.generate();for(let z=0;z{"use strict";z.d(K,{o:()=>Q});var Y=z(62459);function Q(q){return class extends q{addListenerToSignal(q,K){q.add(K);this.OnDestroy.addOnce((()=>{q.remove(K)}))}addOneTimeListenerToSignal(q,K){q.addOnce(K);this.OnDestroy.addOnce((()=>{q.remove(K)}))}addListenerToObservable(q,K,z){q.addListener(K,z);this.OnDestroy.addOnce((()=>{q.removeListener(K,z)}))}addListenerToPromise(q,K,z){const Q=this.createTidySignal();this.addOneTimeListenerToSignal(Q,K),q.then((q=>{null==Q||Q.dispatch(q)})).catch(null!=z?z:Y.RQr.createHandler)}createTidySignal(){const q=new Y.HN0;return this.OnDestroy.addOnce((()=>{q.dispose()})),q}}}},67462:(q,K,z)=>{"use strict";z.d(K,{U:()=>Y,x:()=>J});var Y,Q=z(62459),X=z(95891),Z=z(77938);!function(q){q.Native="native",q.Foreign="foreign",q.Weapon="weapon",q.SpellRelic="spellRelic"}(Y||(Y={}));class J{static getSpellTierAtLevel(q,K){const z=X.sortBy(K);return X.sortedLastIndex(z,q)}static getNextTierSpell(q,K){let z=Z.t.getItem("spell",q);for(let Y=0;Y{"use strict";z.d(K,{f:()=>Z});var Y=z(62459),Q=z(68910),X=z(35120);class Z{static resizeSpriteMaintainingAspectRatio(q,K,z){q.width>q.height?q.scale.x=q.scale.y=K/q.width:q.scale.x=q.scale.y=z/q.height}static trimTransparentPixels(q,K,z=0){if(!(null==q?void 0:q.texture))return q;const Y=q.texture,X=Y.frame,Z=K.extract.pixels(q),J=Math.floor(q.width),tt=Math.floor(q.height);if(!Z||J<=1||tt<=1)return q;let et=J,it=tt,st=0,nt=0;for(let Q=0;Qz&&(et=Math.min(et,q),st=Math.max(st,q),it=Math.min(it,Q),nt=Math.max(nt,Q))}if(et>st||it>nt)return q;const at=st-et+1,rt=nt-it+1;if(0===et&&0===it&&at===J&&rt===tt)return q;const ot=new Q.Sprite(new Q.Texture(Y.baseTexture,new Q.Rectangle(X.x+et,X.y+it,at,rt)));return ot.anchor.copyFrom(q.anchor),ot.position.copyFrom(q.position),ot.scale.copyFrom(q.scale),ot.rotation=q.rotation,ot.alpha=q.alpha,ot.tint=q.tint,ot}static getScaledTextureFromSpriteWithAspectRatio(q,K,z){let Z=K,J=z;(!Y.Aq$.isDefined(K)||!Y.Aq$.isDefined(z)||K<=0||z<=0)&&(Y.VyI.log("SpriteUtils: Invalid maxWidth or maxHeight provided for SpriteUtils#getScaledTextureFromSpriteWithAspectRatio(). Falling back to the sprite's original dimensions",Y.$bb.Error),Z=q.width,J=q.height);const tt=q.texture.width,et=q.texture.height,it=tt>et?Z/tt:J/et,st=(Z-tt*it)/2,nt=(J-et*it)/2,at=(new Q.Matrix).scale(it,it).translate(st,nt),rt=Q.RenderTexture.create({width:Z,height:J});return X.q.instance.game.renderer.render(q,{renderTexture:rt,transform:at}),Y.qFr.setSmoothed(rt,!0),rt}}},59701:(q,K,z)=>{"use strict";z.d(K,{W:()=>st});var Y=z(95891),Q=z.n(Y),X=z(88022),Z=z(91207),J=z(77938),tt=z(16847),et=z(64794),it=z(30405);class st{static getItemOwnedQuantity(q,K){return"item"===K.type?q.backpack.hasItem(K.type,K.ID):"dorm"===K.type?q.house.getOwned(K.ID):st.isMathTowerConsumableItem(K.type)?q.backpack.hasItem(K.type,K.ID):-1}static isItemLevelLocked(q,K){return it.o.isLevelLocked(q,K.data.lockLevel)}static isItemOwned(q,K){return q.isItemOwned({type:K.type,ID:K.ID})}static isItemMemberLocked(q){return 1===q.data.member}static isMathTowerConsumableItem(q){return q===et.D.ASSET_TYPE_FRAME||q===et.D.ASSET_TYPE_DECORATION||q===et.D.ASSET_TYPE_STREET_FURNITURE}static isPrimaryMajorZoneStore(q){return[5,6,7,8,19].includes(q)}}st.getCurrencyIcon=Q().memoize(((q,K)=>{var z,Y;let Q,et;switch(q){case tt.h.ByItem:const q=Z.P[`Icon_currency_${K}`];if(q){Q=q;break}27!==K?(Q=X._.General_icons_json,et=null===(Y=null===(z=J.t.getItem("currency",K))||void 0===z?void 0:z.data)||void 0===Y?void 0:Y.icon):(Q=X._.Ui_hard_currency_json,et="icon-currency-27-small");break;case tt.h.ByType:Q=Z.E.getIconForType("currency",K);break;case tt.h.ByTypeForStore:Q=Z.E.getIconForType("currency",K,"_store"),Q===Z.E.MISSING_ASSET_GUID&&(Q=Z.E.getIconForType("currency",K))}return{atlas:Q,frame:et}}),((...q)=>q.join()))},44094:(q,K,z)=>{"use strict";z.d(K,{$:()=>X});var Y=z(62459),Q=z(29738);class X{static toKebabCase(q){return q?String(q).match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map((q=>q.toLowerCase())).join("-"):""}static toTitleCase(q){return q.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ").map((q=>q.charAt(0).toUpperCase()+q.slice(1))).join(" ").trim()}static replaceAll(q,K,z){return q?String(q).split(K).join(z):""}static stringsToPath(q){return q.filter((q=>q)).map((q=>this.toKebabCase(q))).join(".")}static capitalizeFirstLetter(q){return q.charAt(0).toUpperCase()+q.slice(1).toLowerCase()}static intToNth(q){if(Q.O.isEnglishLocale()){if(!(q<1||q>99))return q<5?this.onesExceptions[q-1]:q<10?`${this.prefix[q-2]}h`:q<13?this.tensExceptions[q-10]:14===q?"fourteenth":q<19?`${this.prefix[q-12]}eenth`:19===q?"nineteenth":q%10==0?`${this.prefix[Math.floor(q/10)-2]}ieth`:`${this.prefix[Math.floor(q/10)-2]}y-${this.intToNth(q%10)}`;Y.VyI.log("Unsupported integer range",Y.$bb.Error)}return q.toString()}static isString(q){return"string"==typeof q||q instanceof String}static isTruthy(q){return this.isString(q)?!["","0","false","null","undefined","nan"].includes(q.toLowerCase()):!!q}static generateUID(q="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"){let K=(new Date).getTime();"undefined"!=typeof performance&&"function"==typeof performance.now&&(K+=performance.now());return q.replace(/[xy]/g,(q=>{const z=(K+16*Math.random())%16|0;return K=Math.floor(K/16),("x"===q?z:3&z|8).toString(16)}))}static addOrdinalSuffix(q){if(!Y.Aq$.isDefined(q)||q<=0)return Y.VyI.log("Unsupported integer",Y.$bb.Warning),null;if(Q.O.isEnglishLocale()){const K=q%10,z=q%100;return 1===K&&11!==z?`${q}st`:2===K&&12!==z?`${q}nd`:3===K&&13!==z?`${q}rd`:`${q}th`}return q.toString()}static truncate(q,K,z){if(q.length<=K)return q;let Y=q.slice(0,K);return z&&(Y=Y.slice(0,Y.length-2).concat("...")),Y}static containsURL(q){return/(https?:\/\/[^\s]+)/g.test(q)}static normalizeStringAndToLowercase(q){return q.toLowerCase().replace(/[^a-z0-9]+/g,"")}static isValidHex(q){let K=!1;if("string"==typeof q){const z=parseInt(q.replace("#",""),16);K=!isNaN(z)}else K="number"==typeof q&&q>=0;return K||Y.VyI.log(`isValidHex: ${q} is not a valid hex string or number`,Y.$bb.Warning),K}}X.onesExceptions=["first","second","third","fourth"],X.tensExceptions=["tenth","eleventh","twelfth"],X.prefix=["twent","thirt","fort","fift","sixt","sevent","eight","nint"]},79422:(q,K,z)=>{"use strict";z.d(K,{h:()=>Q});var Y=z(62459);class Q extends Y.s3P{constructor(){super(...arguments),this.loggingTag=null}setTag(q){this.loggingTag=q}logMessage(q){if(null!==this.loggingTag){this.getInjectedValue(`ENABLE_${this.loggingTag}_LOGGING`)&&Y.VyI.log(`(${this.loggingTag}) - ${q}`,Y.$bb.Verbose)}}}},71586:(q,K,z)=>{"use strict";z.d(K,{R:()=>Q});var Y=z(35120);class Q{static getNow(){return new Date(Date.now())}static isNowInRange(q,K){const z=Y.q.instance.prodigy.timeManager.getServerTimeMs(),Q=!q||new Date(q).getTime()z;return Q&&X}static getISOWeekNumber(q){const K=new Date(q);K.setHours(0,0,0,0),K.setDate(K.getDate()+3-(K.getDay()+6)%7);const z=new Date(K.getFullYear(),0,4);return 1+Math.round(((K.getTime()-z.getTime())/864e5-3+(z.getDay()+6)%7)/7)}static getCurrentMonthName(){return(new Date).toLocaleString("en-US",{month:"long"})}static getISOYearNumber(q){const K=new Date(q);return K.setDate(K.getDate()+3-(K.getDay()+6)%7),K.getFullYear()}static getTimezoneOffset(){return-(new Date).getTimezoneOffset()}static getNowWithServerTimezoneOffset(){return new Date(Date.now()-6e4*Q.getTimezoneOffset()+6e4*Q.SERVER_PLAYER_TIMEZONE_OFFSET)}static getDaysUntilNextMonth(){const q=new Date,K=new Date(q.getFullYear(),q.getMonth()+1,1).getTime()-q.getTime();return Math.ceil(K/864e5)}static findPreviousMonthWithYear(q){const K=q.getUTCMonth(),z=q.getUTCFullYear();return{month:0===K?11:K-1,year:0===K?z-1:z}}static getDateTime(){const q=new Date(Date.now());return new Date(q.getUTCFullYear(),q.getUTCMonth(),q.getUTCDate()).getTime()}static getDateTimeLocal(){const q=Q.getNowWithServerTimezoneOffset();return new Date(q.getFullYear(),q.getMonth(),q.getDate()).getTime()}static getDateTimeTomorrowLocal(){const q=Q.getNowWithServerTimezoneOffset();return new Date(q.getFullYear(),q.getMonth(),q.getDate()+1).getTime()}}Q.SERVER_PLAYER_TIMEZONE_OFFSET=Q.getTimezoneOffset()},84415:(q,K,z)=>{"use strict";z.d(K,{a:()=>X});var Y=z(35120),Q=z(15821);class X{static isFeatureReadyForNextInteraction(q,K){var z,Q;if(K<0)return!1;const X=1e3*K,Z=null===(Q=null===(z=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.featureInteractionTimestamps)||void 0===z?void 0:z[q])||void 0===Q?void 0:Q.timestamp;return Date.now()-X>=(null!=Z?Z:0)}static saveTimestampData(q,K){const z=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;z.data.featureInteractionTimestamps=Object.assign(Object.assign({},z.data.featureInteractionTimestamps),{[q]:Object.assign({timestamp:Date.now()},K)}),z.updated=!0}static getTimestampData(q){var K;return null===(K=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.featureInteractionTimestamps)||void 0===K?void 0:K[q]}static doesFeatureTimestampExist(q,K){var z,Y;const X=null===(Y=null===(z=q.data.featureInteractionTimestamps)||void 0===z?void 0:z[K])||void 0===Y?void 0:Y.timestamp;return Q.A.isDefined(X)}static doesAnyFeatureTimestampExist(q,K){var z,Y;for(const X of K){const K=null===(Y=null===(z=q.data.featureInteractionTimestamps)||void 0===z?void 0:z[X])||void 0===Y?void 0:Y.timestamp;if(Q.A.isDefined(K))return!0}return!1}static getMostRecentFeatureTimestamp(q,K){var z,Y;let X=0;for(const Z of K){const K=null===(Y=null===(z=q.data.featureInteractionTimestamps)||void 0===z?void 0:z[Z])||void 0===Y?void 0:Y.timestamp;Q.A.isDefined(K)&&K>X&&(X=K)}return X}static clearFeatureTimestamp(q,K=!1){const z=Y.q.instance.prodigy.gameContainer.get("782-c308");z.data.featureInteractionTimestamps&&(delete z.data.featureInteractionTimestamps[q],K?z.forceSaveCharacter():z.updated=!0)}}},13021:(q,K,z)=>{"use strict";z.d(K,{w:()=>Q});var Y=z(35120);class Q{static isTitanMap(q){return q.toLowerCase().endsWith("-titan")}static isInTitanParty(){var q,K;return null!==(K=null===(q=Y.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.coOpTeamHandler)||void 0===q?void 0:q.IsOnTeam)&&void 0!==K&&K}}},67238:(q,K,z)=>{"use strict";z.d(K,{D:()=>X});var Y=z(8674),Q=z(76546);class X extends Q.D{makeCloudscriptRequest(q,K){const z=Object.create(null,{makeCloudscriptRequest:{get:()=>super.makeCloudscriptRequest}});return(0,Y.sH)(this,arguments,void 0,(function*(q,K,Y=!0){return z.makeCloudscriptRequest.call(this,q,K,Y)}))}call(q,K,z){const Q=Object.create(null,{makeCloudscriptRequest:{get:()=>super.makeCloudscriptRequest}});return(0,Y.sH)(this,void 0,void 0,(function*(){return Q.makeCloudscriptRequest.call(this,q,K,z)}))}}},20952:(q,K,z)=>{"use strict";z.d(K,{H:()=>J});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(44094);let J=class{constructor(){this._uuid="",this._identitySID="";const q=window.eventData;(null==q?void 0:q.uuid)?this._uuid=q.uuid:this._uuid=Z.$.generateUID("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx");{const q=window.SW.Load.userInfo?JSON.parse(window.SW.Load.userInfo()):window.userInfo;(null==q?void 0:q.sid)?this._identitySID=q.sid:Q.VyI.log("Identity UUID not set",Q.$bb.Warning)}}getUUID(){return this._uuid}getIdentitySID(){return this._identitySID}};J=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Sn)("design:paramtypes",[])],J)},30226:(q,K,z)=>{"use strict";z.d(K,{J:()=>bt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(95066),J=z(36525),tt=z(17446),et=z(65240),it=z(73678),st=z(35120),nt=(z(34829),z(77938)),at=z(50503),rt=z(73797),ot=z(52156),ht=z(62430),ct=z(23082),dt=z(41674),lt=z(98252),ut=z(44094),ft=z(71586);class bt{static capitalize(q){return Q.Aq$.isDefined(q)?q.charAt(0).toUpperCase()+q.slice(1):""}static getDate(){const q=new Date,K=q.getDate(),z=q.getMonth()+1;let Y=`${K}`,Q=`${z}`;return K<10&&(Y=`0${K}`),z<10&&(Q=`0${z}`),`${Q}${Y}${q.getFullYear()}`}static getDateId(){return Math.floor((new Date).getTime()/864e5)}static getDayName(q,K){return st.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(`WEEKDAY_NAME_${K}`)}static addDays(q,K){const z=new Date(q);return z.setDate(z.getDate()+K),z}static convertItemToIcon(q){return"gold"===q.type?"item/26":"spell"===q.type?(q.data=Q.Aq$.isDefined(q.data)?q.data:nt.t.getItem(q.type,q.ID).data,q.data.element):"boss"===q.type?"boss":"player"===q.type?"player":"dorm"===q.type?`${q.ID}`:Q.Aq$.isDefined(q.metadata)&&Q.Aq$.isDefined(q.metadata.icon)?String(q.metadata.icon):Q.Aq$.isDefined(q.type)&&Q.Aq$.isDefined(q.ID)?`${q.type}/${q.ID}`:Q.Aq$.isDefined(q.tag)?q.tag:"string"==typeof q?q:"empty"}static numberToString(q){const K=`${q}`;let z="",Y=1;for(let Q=K.length-1;Q>=0;Q--)z=`${K.charAt(Q)}${z}`,Y%3==0&&Y>0&&Q>0&&(z=`,${z}`),Y++;return z}static isSchoolHours(){const q=ft.R.getNow().getHours(),K=bt.getSchoolStartHour(),z=bt.getSchoolEndHour();return q>=K&&q<=z-1}static isDateWithinSchoolHours(q){const K=q.getHours(),z=bt.getSchoolStartHour(),Y=bt.getSchoolEndHour();return K>=z&&K=16&&q<=23}static isNightTimeLocal(){const q=ft.R.getNowWithServerTimezoneOffset().getHours();return q>=16&&q<=23}static isDefined(q){return!(null==q||"null"===q)}static has(q,K){if(Q.Aq$.isDefined(q)){const z=K.split(".");let Y=q;for(let q=0;qthis.removeFromArray(q,Y,z))),Y}static equalArrayContents(q,K){if(q===K)return!0;if(null===q||null===K)return!1;if(q.length!==K.length)return!1;const z=[...q];for(const Y of K)if(!this.removeFromArray(Y,z))return!1;return!(z.length>0)}static removeFromArray(q,K,z=((q,K)=>q===K)){for(let Y=0;YZ.width&&(Z.width=z.width),Z.height+=z.height}Z.height/=q.length}let J=z?0:K.x,tt=z?0:K.y;Q.Aq$.isDefined(Y)&&(J+=Q.Aq$.isDefined(Y.x)?Y.x:0,tt+=Q.Aq$.isDefined(Y.y)?Y.y:0);const et=bt.calculateItemSpacing(q.length,Z.width,K.width),it=bt.calculateItemSpacing(1,Z.height,K.height),st=tt+bt.calculateItemCoordinate(0,Z.height,it);q.forEach(((q,K)=>{q.x=J+bt.calculateItemCoordinate(K,Z.width,et),q.y=st}))}static frameDataToFrameJson(q){const K={};for(let z=0;z0||"item"===q.type&&Y.backpack.hasItem("item",q.ID)>0||"spell"===q.type&&Q.Aq$.isDefined(Y.data.spells)&&-1!==Y.data.spells.indexOf(q.ID)||z.push(q)}return z}static validateVersion(q){return/^[0-9-]+$/.test(q)?q:"undefined"}static joinByProperty(q,K,z=","){let Y="";const Q=q.length;for(let X=0;X=0||q.indexOf("dev.prodigygame.org")>=0?z="test":q.indexOf("prodigygame.net")>=0||K.indexOf("env=dev")>=0?z="dev":q.indexOf("prodigygame.org")>=0||K.indexOf("env=staging")>=0?z="staging":(q.indexOf("prodigygame.com")>=0||K.indexOf("env=production")>=0||K.indexOf("env=prod")>=0)&&(z="production"),z}static getEnvironmentByHost(){const q=window.location.host;let K="local";return q.indexOf("-qa")>=0||q.indexOf("dev.prodigygame.org")>=0?K="test":q.indexOf("prodigygame.net")>=0?K="dev":q.indexOf("prodigygame.org")>=0?K="staging":q.indexOf("prodigygame.com")>=0&&(K="production"),K}static getOptionalParameter(q,K){return void 0===q?K:q}static getRealWorldPosition(q,K,z){return z?{x:q+z.viewMatrix.tx,y:K+z.viewMatrix.ty}:{x:q,y:K}}static safeDeleteObjectProperty(q,K){Q.Aq$.isDefined(q[K])&&delete q[K]}static deleteFieldsWithNullsOrEmptyStrings(q,K=!1){for(const z in q)q.hasOwnProperty(z)&&(""===q[z]?(K&&Q.VyI.log(`Util.deleteFieldsWithNullsOrEmptyStrings - deleted key with empty string value named: ${z}`,Q.$bb.Verbose),delete q[z]):null===q[z]?(K&&Q.VyI.log(`Util.deleteFieldsWithNullsOrEmptyStrings - deleted key with null value named: ${z}`,Q.$bb.Verbose),delete q[z]):"object"==typeof q[z]&&bt.deleteFieldsWithNullsOrEmptyStrings(q[z]))}static validateString(q,K=""){for(let z=0;zq));st.q.instance.prodigy.open.resultsMenu(Z,Q,[],[],void 0,Y,!1).onClose=()=>{X.forceSaveCharacter(),null==z||z()}}static setOuterWidth(q,K){q.style.width=K-(q.style.borderLeftWidth?parseInt(q.style.borderLeftWidth):0)-(q.style.borderRightWidth?parseInt(q.style.borderRightWidth):0)+"px"}static setOuterHeight(q,K){q.style.height=K-(q.style.borderTopWidth?parseInt(q.style.borderTopWidth):0)-(q.style.borderBottomWidth?parseInt(q.style.borderBottomWidth):0)+"px"}static shouldSuppressAd(q,K=!0){return q.isPlayingAtSchool()&&(!K||!q.hasMembership())}static showYouTubeMembershipAd(q,K=!0,z){const Y=st.q.instance.prodigy.gameContainer.get("f71-42eb"),X=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,Z=X.data.membershipVideoTimeStamp;return Y.getValue("enableMembershipVideoAd",!1)&&!X.isPlayingAtSchool()&&!(()=>{const q=Y.getValue("disableMembershipVideoAdDuringSchoolHours",!0),K=Y.getValue("useServerTimeForVideoLockout",!0)?new Date(st.q.instance.prodigy.timeManager.getServerTimeMs()):new Date;return q&&bt.isSchoolDay(K)&&bt.isDateWithinSchoolHours(K)})()&&!lt.pF.isNativeApp()&&!(K&&Q.Aq$.isDefined(Z)&&bt.isDateWithinSameDay(new Date(Z),new Date(st.q.instance.prodigy.timeManager.getServerTimeMs())))}static isDateWithinSameDay(q,K){return q.getDate()===K.getDate()&&q.getMonth()===K.getMonth()&&q.getFullYear()===K.getFullYear()}static wrapArrayIndex(q,K){if(K<=0)return null;let z=q;for(;z<0;)z+=K;for(;z>=K;)z-=K;return z}static logUpdateUserFailed(q=1){const K=new J.i;K.setKey("prodigy_game.education.updateUserFailed"),K.setValue(q);st.q.instance.prodigy.gameContainer.get("ce3-6d33").logStat(K,Z.d.Increment),Q.VyI.log("Education update user failed.",Q.$bb.Error)}static logSetInitialGradesFailed(q=1){const K=new J.i;K.setKey("prodigy_game.education.setInitialGradesFailed"),K.setValue(q);st.q.instance.prodigy.gameContainer.get("ce3-6d33").logStat(K,Z.d.Increment),Q.VyI.log("Education set initial grades failed.",Q.$bb.Error)}static logSetCurriculumFailed(q=1){const K=new J.i;K.setKey("prodigy_game.education.setCurriculumFailed"),K.setValue(q);st.q.instance.prodigy.gameContainer.get("ce3-6d33").logStat(K,Z.d.Increment),Q.VyI.log("Education set curriculum failed.",Q.$bb.Error)}static createTransformEffectAssetKey(q){const K=q.effect.transform,z=q.effect.ID,Y=nt.t.getItem(K,z);return"spine"===Y.metadata.assets.default.type?ht.N.createSpineAssetSourceName(Y,K,z):ot.X.createImageAssetSourceName(K,z)}static isTransformEffectLoaded(q){const K=q.effect.transform,z=q.effect.ID,Y=nt.t.getItem(K,z),Q=this.createTransformEffectAssetKey(q);return"spine"===Y.metadata.assets.default.type?st.q.instance.game.cache.checkSpineKey(Q):st.q.instance.game.cache.checkImageKey(Q)}static getEnvironmentURL(){let q="";switch(bt.getEnvironment()){case"test":case"local":q=window.location.hostname;break;case"dev":q="www.prodigygame.net";break;case"staging":q="www.prodigygame.org";break;case"production":q="www.prodigygame.com"}return q}static convertItemDefinitionToItemDrop(q){return q.map((q=>({ID:q.ID,type:q.type,N:q.quantity})))}static getPurchasePrice(q,K){var z;return null!==(z=q.price)&&void 0!==z?z:K.getAmount()}static isCoreZone(q){return it.s0.includes(q)}static isAvgFrameRateAboveThreshold(q){return st.q.instance.game.fps.getAverageFramerate()>=q}static cacheAsBitmap(q,K){q.cacheAsBitmap=!1,K&&(q.cacheAsBitmap=K)}static asyncFilter(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=yield Promise.all(q.map(K));return q.filter(((q,K)=>z[K]))}))}static isGuid(q){if(!q)return!1;return/^[A-F\d]{8}-[A-F\d]{4}-4[A-F\d]{3}-[89AB][A-F\d]{3}-[A-F\d]{12}$/i.test(q)}static applyBlurToScreen(q=!0){st.q.instance.prodigy.game.input.enabled=!q;const K=st.q.instance.game.state.getCurrentState().key;if(K===ct.G.TileScreen){const z=st.q.instance.game.state.get(K);(null==z?void 0:z.isMapScreen)&&(null==z?void 0:z.complete)&&(z.opaque.visible=q,z.bitmapCacheContainer(q,z.opaque,!0))}}static callAfterFrameDelay(q,K=1){let z=0;const Y=()=>{z++,z>=K&&(q(),st.q.instance.game.app.ticker.remove(Y))};st.q.instance.game.app.ticker.add(Y)}static waitForFrames(){return(0,Y.sH)(this,arguments,void 0,(function*(q=1){yield new Promise((K=>bt.callAfterFrameDelay((()=>K()),q)))}))}static isObjectOnScreen(q){if(!q.active)return!1;const{width:K,height:z}=Q.W$e.instance.game,Y=q.findComponent(Q.XVE);if(Q.Aq$.isDefined(Y)){const q=Y.worldPosition.x,Q=Y.worldPosition.y,X=q+Y.widthDelta,Z=Q+Y.heightDelta;return q<=K&&X>=0&&Q<=z&&Z>=0}const X=q.transform;return X.worldPosition.x=0&&X.worldPosition.y=0}static getItemName(q,K=!1){const z=st.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),Y=this.getLocalizationNameKey(q);if(K){const q=`${Y}S`;if(z.hasText(q))return z.getText(q)}return z.getText(Y)}static getLocalizationNameKey(q,K){return bt.resolveLocalizationKey(q,K,"NAME")}static getLocalizationFlavorKey(q,K){return bt.resolveLocalizationKey(q,K,"FLAVORTEXT")}static getLocalizationActiveNameKey(q,K){return bt.resolveLocalizationKey(q,K,"ACTIVENAME")}static getLocalizationActiveFlavorKey(q,K){return bt.resolveLocalizationKey(q,K,"ACTIVEFLAVORTEXT")}static resolveLocalizationKey(q,K,z){var Y;if(!q||"string"==typeof q&&!Q.Aq$.isDefined(K))return"";return`${"string"==typeof q?q:String(q.type)}_${"string"==typeof q?K:null!==(Y=q.ID)&&void 0!==Y?Y:q.id}_${z}`.toUpperCase()}}bt.DEBUG_DAY_LENGTH=864e5},48982:(q,K,z)=>{"use strict";z.d(K,{h:()=>tt});var Y=z(76253),Q=z(35120),X=z(65050),Z=z(53661),J=z(84415);class tt{static selectNextVideoInFeature(q,K){var z,Y;const X=null===(Y=null===(z=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.featureInteractionTimestamps)||void 0===z?void 0:z[q])||void 0===Y?void 0:Y.videoId;let Z=0;if(X){const q=K.indexOf(X)+1;Z=q{"use strict";z.d(K,{u:()=>X});var Y=z(62459),Q=z(35120);class X{static getGameApiStatusData(){try{return Object.assign(Object.assign({},window.gameApiStatusData),window.gameApiStatusData.prodigyGameFlags)}catch(e){return Y.VyI.log("Could not load game api status",Y.$bb.Error),[]}}static fetchGameApiStatusData(q){let K=3;const z=new XMLHttpRequest;z.onreadystatechange=()=>{z.readyState===XMLHttpRequest.DONE&&(200===z.status?(window.gameApiStatusData=z.response.data,q(X.getGameApiStatusData())):K>0?(K--,X.fetchGameApiStatusData(q)):window.statusErrored=!0)};const Y=`${Q.q.instance.prodigy.urlProvider.getAPIRootUrl()}/game-api/status`;z.responseType="json",z.open("GET",Y,!0),z.send("")}static showLoaderIfHidden(){window.prodigyLoaderHidden&&(window.SW.Load.setLoadingVisible(!0),window.prodigyLoaderHidden=!1)}}},64271:(q,K,z)=>{"use strict";z.d(K,{N:()=>et});var Y,Q=z(62459),X=z(40392),Z=z(73678),J=z(15989),tt=z(30226);!function(q){q.LevelPrerequisite="LevelPrerequisite",q.ZonePrerequisite="ZonePrerequisite",q.MultipleZonePrerequisite="MultipleZonePrerequisite",q.None="None"}(Y||(Y={}));class et{static sortZonesByLevel(q){return q.filter((q=>tt.J.isCoreZone(q.zone))).sort(((q,K)=>{var z,Y;return(null!==(z=null==q?void 0:q.getRequiredLevel())&&void 0!==z?z:0)-(null!==(Y=null==K?void 0:K.getRequiredLevel())&&void 0!==Y?Y:0)}))}static sortZonesBySinglePrerequisite(q){const K=[...q],z=K.find((q=>q.zone===Z.A_.SHIVERCHILL));if(z&&(z.requirementsID=33),K.some((q=>{var K;return(null!==(K=q.getZonePrerequisites().length)&&void 0!==K?K:0)>=1})))return Q.VyI.log("Zones have multiple or no prerequisites. Cannot sort by single prerequisites. Returning unsorted zones!",Q.$bb.Warning),q;const Y=new Map(q.map((q=>[q.getZonePrerequisites()[0],q]))),X=[];let J=q.find((q=>!q.getZonePrerequisites()[0]));for(;J;)X.push(J),J=Y.get(J.zone);return X}static sortZonesByNumPrerequisite(q){return[...q].sort(((q,K)=>{var z,Y;return(null!==(z=q.getZonePrerequisites().length)&&void 0!==z?z:0)-(null!==(Y=K.getZonePrerequisites().length)&&void 0!==Y?Y:0)}))}static getCoreZonesInOrder(q=X.i.getDifficultyMode()){const K=X.i.BUTTONS_CONFIG.filter((K=>K.difficultyMode===q&&tt.J.isCoreZone(K.zone)));switch(et.getCoreZoneRequirementType(K)){case Y.LevelPrerequisite:return this.sortZonesByLevel(K);case Y.ZonePrerequisite:return this.sortZonesBySinglePrerequisite(K);case Y.MultipleZonePrerequisite:return this.sortZonesByNumPrerequisite(K);case Y.None:default:return Q.VyI.log("Zones have mixed or no prerequisites. Returning unsorted zones!",Q.$bb.Warning),K}}static getCoreZoneRequirementType(q){const K=q.filter((q=>q.nameKey!==J.NJ.FireflyForest&&q.nameKey!==J.NJ.ShiverchillMountains));if(K.every((q=>void 0!==q.getRequiredLevel())))return Y.LevelPrerequisite;if(K.every((q=>0!==(null==q?void 0:q.getZonePrerequisites().length)))){return K.some((q=>{var K;return(null!==(K=q.getZonePrerequisites().length)&&void 0!==K?K:0)>1}))?Y.MultipleZonePrerequisite:Y.ZonePrerequisite}return Y.None}}},80882:(q,K,z)=>{"use strict";z.d(K,{y:()=>Z});var Y=z(8674),Q=z(62459),X=z(28152);let Z=class extends Q.uAl{constructor(){super(...arguments),this.constant=!1,this.isTrue=new Q.HN0,this.isFalse=new Q.HN0}fireBooleanSignal(q){(q?this.isTrue:this.isFalse).dispatch()}fireBooleanSignalAgainstConstant(){(this.constant?this.isTrue:this.isFalse).dispatch()}destroy(){this.isTrue.dispose(),this.isFalse.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],Z.prototype,"constant",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"isTrue",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"isFalse",void 0),Z=(0,Y.Cg)([(0,Q.EVk)("BooleanSignal",X.Y.utility)],Z)},77713:(q,K,z)=>{"use strict";z.d(K,{h:()=>J});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(80060);let J=class extends Q.uAl{constructor(){super(...arguments),this.defaultPrefabGuid="",this.loadWithDependencies=!0,this.contentLoadedSignalName="",this._waitForAllLoadedToActivate=!0,this._clearOnSpawn=!1,this.onPrefabSpawned=new Q.HN0,this.onAllPrefabsSpawned=new Q.HN0,this.onSpawnStart=new Q.HN0,this.onAllImagesLoaded=new Q.HN0,this.spawnedPrefabs=[],this._spawnPrefabsPromise=null}spawnDefaultPrefabsFromDataArray(q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K=this.container){this.defaultPrefabGuid?yield this.spawnPrefabsFromDataArray(this.defaultPrefabGuid,q,K):Q.VyI.log("DataArrayPrefabSpawnerComponent: No default prefab GUID set, cannot spawn prefabs",Q.$bb.Error)}))}spawnPrefabsFromDataArray(q,K){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z=this.container,Y=!1){yield this._spawnPrefabsPromise,this._spawnPrefabsPromise=new Q.bnh,this.onSpawnStart.dispatch();const X=null!=z?z:this.gameObject,J=[],tt=[];this._clearOnSpawn&&this.destroySpawnedPrefabs();for(const et of K){const K=new Q._mx;K.active=!1,K.addComponent(Q.dLy);K.addComponent(Q.bE_).Container.parent=Q.Uoy.getParentContainer(X);const z=this.loadWithDependencies?yield Z.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,q,et,K).promise:Z.d.loadWithInjectedValuesFromGUID(this._prefabLoader,q,et,K);if(this.contentLoadedSignalName)for(const q of z.findComponentsInChildren(Q.uAl,!0)){const K=q[this.contentLoadedSignalName];if(K instanceof Q.HN0&&0===K.dispatchCount){tt.push(new Promise((q=>{K.addOnce(q)})));break}}if(this._waitForAllLoadedToActivate&&(z.active=!1,J.push(z)),!X||X.isDestroyed)return z.destroy(),void K.destroy();if(Y){z.addComponent(Q.bE_).bindInjectedValues(et)}z.parent=X,K.destroy(),this.spawnedPrefabs.push(z),this.onPrefabSpawned.dispatch(z)}if(this._waitForAllLoadedToActivate)for(const Q of J)Q.active=!0;this.onAllPrefabsSpawned.dispatch(),this._spawnPrefabsPromise.resolve(),Promise.all(tt).then((()=>{this.gameObject.isDestroyed||this.onAllImagesLoaded.dispatch()})).catch(Q.RQr.createHandler("DataArrayPrefabSpawnerComponent: Failed to resolve image load promises for spawned prefabs"))}))}spawnPrefabsFromDataArrayWithContext(q,K){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z=this.container){yield this.spawnPrefabsFromDataArray(q,K,z,!0)}))}destroySpawnedPrefabs(){for(const q of this.spawnedPrefabs)null==q||q.destroy();this.spawnedPrefabs.length=0}destroy(){this.onSpawnStart.dispose(),this.onPrefabSpawned.dispose(),this.onAllPrefabsSpawned.dispose(),this.onAllImagesLoaded.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.Cdj)("983-05a7"),(0,Y.Sn)("design:type",Q.wNP)],J.prototype,"_prefabLoader",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"defaultPrefabGuid",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"loadWithDependencies",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],J.prototype,"container",void 0),(0,Y.Cg)([(0,Q.W_S)(),(0,Y.Sn)("design:type",String)],J.prototype,"contentLoadedSignalName",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_waitForAllLoadedToActivate",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],J.prototype,"_clearOnSpawn",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onPrefabSpawned",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onAllPrefabsSpawned",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onSpawnStart",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onAllImagesLoaded",void 0),J=(0,Y.Cg)([(0,Q.EVk)("DataArrayPrefabSpawner",X.Y.utility,"Spawns a prefab for each item in a data array, injecting the data into the prefab")],J)},10704:(q,K,z)=>{"use strict";z.d(K,{f:()=>st});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(11647),J=z(15821),tt=z(80060),et=z(30226);let it=class extends((0,Z.o)(Q.uAl)){constructor(){super(...arguments),this.keepAlive=!1}get config(){return this._config}get attachedObject(){var q;return null===(q=this.gameObject)||void 0===q?void 0:q.children[0]}get isOnScreen(){return et.J.isObjectOnScreen(this.gameObject)}postCreate(){super.postCreate(),this.addListenerToSignal(this.gameObject.onChildAdded,(()=>{J.A.isDefined(this.config)&&this.setConfig(this.config)}))}setConfig(q){J.A.isDefined(this.attachedObject)&&(tt.d.updateInjectedValues(this.attachedObject,q.data),this.matchTransform(this.attachedObject.findComponent(Q.XVE))),this._config=q}matchTransform(q){var K;if(!J.A.isDefined(q))return void Q.VyI.log("DynamicObjectPoolSlotContainerComponent can only match RectTransforms; transform passed was undefined",Q.$bb.Warning);const{sizeDelta:z,anchorMax:Y,anchorMin:X,pivot:Z}=q,tt=null!==(K=this.gameObject.findComponent(Q.XVE))&&void 0!==K?K:this.gameObject.addComponent(Q.XVE);tt.setSizeDelta(z.width,z.height),tt.setAnchorMax(Y.x,Y.y),tt.setAnchorMin(X.x,X.y),tt.setPivot(Z.x,Z.y)}};(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],it.prototype,"keepAlive",void 0),it=(0,Y.Cg)([(0,Q.EVk)("DynamicObjectPoolSlotComponent")],it);let st=class extends((0,Z.o)(Q.uAl)){constructor(){super(...arguments),this.onObjectAddedToPool=this.createTidySignal(),this.onObjectAddedToSlot=this.createTidySignal(),this.debugSlotRect=!1,this.minimumPooledObjects=0,this.prefabGuids=[],this._objectPools=new Map,this._slots=[],this._changedSlots=new Set,this._didInitialPreload=!1,this._preloadedAssets=[]}destroy(){this.flushPool(),super.destroy()}update(){super.update(),Q.Aq$.isDefined(this._preloadPromise)&&!this._didInitialPreload||(this._didInitialPreload?this.processChangedSlots():this._preloadPromise=this.preloadPrefabs(new Set(this.prefabGuids)).catch(Q.RQr.createHandler("Error preloading DynamicObjectPoolManager prefabs")).finally((()=>{this._didInitialPreload=!0})))}spawnPrefabsWithData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){var K,z;if(!Q.Aq$.isDefined(this.container))return Q.VyI.log("DynamicObjectPoolManager requires a container object to spawn objects into!",Q.$bb.Error),[];this._didInitialPreload||(yield this._preloadPromise);const Y=new Set(q.map((({prefabGuid:q})=>q)));yield this.preloadPrefabs(Y);const X=[];for(const[Q,Z]of q.entries()){const q=null!==(K=this._slots[Q])&&void 0!==K?K:this.createObjectSlot(Q);Z.prefabGuid!==(null===(z=q.config)||void 0===z?void 0:z.prefabGuid)&&(this.returnSlotObjectToPool(q),this.updateSlotTransform(q,Z.prefabGuid)),q.setConfig(Z),X.push(q),this._changedSlots.add(q)}return this._slots.length>X.length&&this.destroyObjectSlots(((q,K)=>K>=X.length)),this._slots=X,this.processChangedSlots(),this._slots}))}processChangedSlots(){0!==this._changedSlots.size&&this._didInitialPreload&&(this._changedSlots.forEach((q=>{const{attachedObject:K,keepAlive:z,isOnScreen:Y}=q;if(Y||z){if(Y){if(Q.Aq$.isDefined(K))return;this.attachPooledObjectToSlot(q)}}else this.returnSlotObjectToPool(q)})),this._changedSlots.clear())}destroyObjectSlots(q){var K;const z=[];for(const[Y,Q]of this._slots.entries())q(Q,Y)?(this.returnSlotObjectToPool(Q),this._changedSlots.delete(Q),null===(K=Q.GameObject)||void 0===K||K.destroy()):z.push(Q);this._slots=z}updateData(q){for(const[K,z]of this._slots.entries()){const Y=q[K],X=Q.Aq$.isDefined(Y);z.GameObject.active!==X&&(z.GameObject.active=X,this._changedSlots.add(z)),X&&z.setConfig(Y)}}updateDataAtIndex(q,K){var z;null===(z=this._slots[q])||void 0===z||z.setConfig(K)}getSlotAtIndex(q){return this._slots[q]}flushPool(q=!1){if(this.destroyObjectSlots((()=>!0)),this._objectPools.forEach((q=>{for(const K of q)K.destroy()})),this._objectPools.clear(),q)for(const K of this.prefabGuids)this.prespawnObjectsWithGuid(K)}createObjectSlot(q){const K=new Q._mx,z=K.addComponent(Q.XVE),Y=K.addComponent(it);return this.debugSlotRect&&K.addComponent(Q.Lom).setColor("00ff00"),K.name="dynamic-pool-placeholder",this.container.addChildAt(K,q),this.addListenerToSignal(z.onWorldMatrixChanged,(()=>{this._changedSlots.add(Y)})),Y}preloadPrefabs(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield Promise.all(Array.from(q).map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){if(this._preloadedAssets.includes(q))return;const K=this._preloadedAssets.push(q);try{yield this._prefabLoader.preloadFromGUIDWithDependencies(q),this._objectPools.set(q,this.prespawnObjectsWithGuid(q))}catch(e){throw this._preloadedAssets.splice(K-1,1),e}})))))}))}prespawnObjectsWithGuid(q){if(this.minimumPooledObjects<=0)return[];const K=[];for(let z=0;z{"use strict";z.d(K,{A:()=>Z});var Y=z(8674),Q=z(62459),X=z(11647);class Z extends((0,X.o)(Q.uAl)){constructor(){super(...arguments),this.showInState=[],this.onStateEnter=this.createTidySignal(),this.onStateExit=this.createTidySignal()}}(0,Y.Cg)([(0,Q.SZi)(),(0,Q.ERr)(),(0,Y.Sn)("design:type",Array)],Z.prototype,"showInState",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onStateEnter",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],Z.prototype,"onStateExit",void 0)},40743:(q,K,z)=>{"use strict";z.d(K,{r:()=>it});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(15821),tt=z(11647),et=z(41170);class it extends((0,tt.o)(Q.uAl)){constructor(){super(...arguments),this._stateComponents=[],this.onStateUpdated=this.createTidySignal(),this.debugDeactivate=!1,this.matchForState=q=>q.state===this._state}postCreate(){super.postCreate(),this._stateComponents=this.gameObject.findComponents(et.A),this.setState(this._state)}get currentState(){return this._state}setState(q){var K;const z=this._stateComponents.find(this.matchForState);if(this._state=q,this.debugDeactivate||!J.A.isDefined(this._state))return;const Y=this._stateComponents.find(this.matchForState),Q=[];null==Y||Y.blendStates.forEach((q=>{var K;const z=this._stateComponents.find((K=>K.state===q));Q.push(...null!==(K=null==z?void 0:z.showInState)&&void 0!==K?K:[])}));const X=[...null!==(K=null==Y?void 0:Y.showInState)&&void 0!==K?K:[],...Q],tt=Z().flatten(this._stateComponents.map((q=>q.showInState.filter((q=>!X.includes(q))))));X.forEach((q=>{q.active=!0})),tt.forEach((q=>{q.active=!1})),this.onStateUpdated.dispatch(this._state),null==z||z.onStateExit.dispatch(),null==Y||Y.onStateEnter.dispatch()}}(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],it.prototype,"onStateUpdated",void 0),(0,Y.Cg)([(0,Q.vkK)(),(0,Y.Sn)("design:type",Boolean)],it.prototype,"debugDeactivate",void 0)},11191:(q,K,z)=>{"use strict";z.d(K,{N:()=>it});var Y,Q=z(8674),X=z(62459),Z=z(68910),J=z(15821),tt=z(11647),et=z(61917);let it=Y=class extends((0,tt.o)(X.y4o)){constructor(){super(...arguments),this.allowDepthSorting=!1,this._depthLayerContainers=new Map,this._depthValues=[],this._depthComponents=[]}getDimensions(){var q,K;return null!==(K=null===(q=this.gameObject.findComponent(X.XVE))||void 0===q?void 0:q.sizeDelta)&&void 0!==K?K:X.or0.ZERO}get _transform(){var q;return null!==(q=this._rectTransform)&&void 0!==q?q:this.gameObject.findComponent(X.XVE)}create(){if(super.create(),!J.A.isDefined(this._transform))return void X.VyI.log(`RenderContainerComponent on ${this.gameObject.name} needs to have a RectTransform`,X.$bb.Warning);const q=new Z.Container;q.name=`render-container-root-${this.gameObject.name}`,this.setUpDisplayObject(q),this.sizeContainer(),this.addListenerToSignal(this._transform.onDimensionsChanged,(()=>this.sizeContainer())),this.allowDepthSorting&&(this.addListenerToSignal(this.gameObject.onChildAdded,(q=>this.sortChildToLayer(q))),this.createDepthLayerContainer(0))}postCreate(){super.postCreate(),this.triggerSort()}triggerSort(){if(this.allowDepthSorting)for(const q of this.GameObject.children)this.sortChildToLayer(q)}sortChildToLayer(q){var K;const z=q.findComponent(et.d);if(!J.A.isDefined(z)){return void(null!==(K=q.findComponent(X.y4o))&&void 0!==K?K:q.addComponent(Y)).getRootContainer().setParent(this._depthLayerContainers.get(0))}this._depthComponents.some((q=>q===z))||(this.addListenerToSignal(z.OnDestroy,(()=>{this._depthComponents=this._depthComponents.filter((q=>q!==z)),this.cleanDepthLayer(z.depth)})),this.addListenerToSignal(z.onDepthChanged,(({old:q,val:K})=>{const Y=this.getDepthLayer(K);z.renderComponent.getRootContainer().setParent(Y),this.cleanDepthLayer(q)})),this._depthComponents.push(z));const{depth:Q,renderComponent:Z}=z;this.getDepthLayer(Q).addChild(Z.getRootContainer())}cleanDepthLayer(q){const K=this._depthLayerContainers.get(q);J.A.isDefined(K)&&0===K.children.length&&(K.destroy(),this._depthValues=this._depthValues.filter((K=>K!==q)),this._depthLayerContainers.delete(q))}getDepthLayer(q){return this._depthLayerContainers.has(q)?this._depthLayerContainers.get(q):this.createDepthLayerContainer(q)}createDepthLayerContainer(q){let K=-1;for(const[Y,Q]of this._depthValues.entries())Q>q&&(K=Y);K>=0?this._depthValues.splice(K,0,q):(K=this._depthValues.length,this._depthValues.push(q));const z=new Z.Container;return z.name=`depth-layer-${q}`,this._depthLayerContainers.set(q,z),this.getRootContainer().addChildAt(z,K),z}sizeContainer(){if(!J.A.isDefined(this._transform))return;const{fullHeight:q,fullWidth:K}=this._transform,z=this.getRootContainer();z.width=K,z.height=q}};(0,Q.Cg)([(0,X.Pqz)(X.XVE),(0,Q.Sn)("design:type",X.XVE)],it.prototype,"_rectTransform",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],it.prototype,"allowDepthSorting",void 0),it=Y=(0,Q.Cg)([(0,X.EVk)("RenderContainer",void 0,"Adds an empty Pixi Container to the GameObject that matches the size of any attached RectTransform.")],it)},61917:(q,K,z)=>{"use strict";z.d(K,{d:()=>J});var Y=z(8674),Q=z(62459),X=z(11647),Z=z(11191);let J=class extends((0,X.o)(Q.uAl)){constructor(){super(...arguments),this.onDepthChanged=this.createTidySignal(),this._depth=0}set depth(q){if(q===this._depth)return;const K=this._depth;this._depth=q,this.onDepthChanged.dispatch({old:K,val:q})}get depth(){return this._depth}get renderComponent(){const q=this.gameObject.findComponent(Q.y4o);return Q.Aq$.isDefined(q)?q:this.gameObject.addComponent(Z.N)}postCreate(){var q;super.postCreate(),null===(q=this.gameObject.parent.findComponent(Z.N))||void 0===q||q.triggerSort()}};(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],J.prototype,"onDepthChanged",void 0),(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number),(0,Y.Sn)("design:paramtypes",[Number])],J.prototype,"depth",null),J=(0,Y.Cg)([(0,Q.EVk)("RenderDepth",void 0,"Applies a depth to a game object to provide granular control of the draw order. NOTE: You likely want to use layers instead, be aware of caveats before use.")],J)},1312:(q,K,z)=>{"use strict";z.d(K,{s:()=>Z});var Y=z(62459),Q=z(88225),X=z(35120);class Z{static startRecording(q,K){var z;const Y=function(){var q,K,z;const Y=null===(z=null===(K=null===(q=null===X.q||void 0===X.q?void 0:X.q.instance)||void 0===q?void 0:q.prodigy)||void 0===K?void 0:K.gameContainer)||void 0===z?void 0:z.get("f71-42eb");if(!Y)return 0;const Q=Y.getValue("sentryReplaySampleRate",0);return"number"==typeof Q?Q:0}();Math.random(){Y.VyI.log(`Failed to stop Sentry replay recording ${String(q)}`,Y.$bb.Error)}))}}},27488:(q,K,z)=>{"use strict";z.d(K,{r:()=>Y});class Y extends Error{constructor(q,K){super(K),this.code=q,Object.setPrototypeOf(this,Y.prototype)}}},76546:(q,K,z)=>{"use strict";z.d(K,{D:()=>at});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(95891),tt=z.n(J),et=(z(34829),z(37251)),it=z(13956),st=z(27488),nt=z(35537);let at=Y=class{get networkRequestBehaviour(){return{}}makeCloudscriptRequest(q,K){return(0,Q.sH)(this,arguments,void 0,(function*(q,K,z=!0){if(this._featureFlags.getValue("disableCloudscriptRequestQueue",!1))return this.doRequest(q,K,z,Promise.resolve());const Q=this.doRequest(q,K,z,Y._lastRequest);return Y._lastRequest=Q,Q}))}doRequest(q,K,z,Z){return(0,Q.sH)(this,void 0,void 0,(function*(){yield Z.catch((()=>{}));const Q=tt().merge(tt().clone(Y.DEFAULT_NETWORK_REQUEST_BEHAVIOUR),this.networkRequestBehaviour);for(const q in K)Array.isArray(K[q])&&0===K[q].length&&(K[q]=void 0);try{let X=Q.retryCount;0;const Z=yield this._catalyst.cloudScript.setServiceUrlVersion("v2").useIdempotency(z).timeoutMS(Q.timeoutMs).setRetryOption({retryCount:X,retryIntervalMS:Q.retryIntervalMs,retryIncreamentMS:Q.retryIncrementMs,retryMaxDelayMS:Q.retryMaxDelayMs}).execute(q,K);if(!Z.isOK())throw new st.r(Z.status,JSON.stringify(Z.data));const J=yield this._sideEffect.processEnvelope(Z.data);return Y.assertResponseDataIdempotency(J,z)?J.response:J}catch(J){throw X.RQr.logError(J,`Error calling CloudScript ${q}`),J}}))}static assertResponseDataIdempotency(q,K){return K}};at.DEFAULT_NETWORK_REQUEST_BEHAVIOUR={timeoutMs:1e4,retryCount:3,retryIntervalMs:1e3,retryIncrementMs:1e3,retryMaxDelayMs:1e4},at._lastRequest=Promise.resolve(),(0,Q.Cg)([(0,it.b)("b09-138c"),(0,Q.Sn)("design:type",et.X)],at.prototype,"_catalyst",void 0),(0,Q.Cg)([(0,it.b)("f71-42eb"),(0,Q.Sn)("design:type",Object)],at.prototype,"_featureFlags",void 0),(0,Q.Cg)([(0,it.b)("76b-641a"),(0,Q.Sn)("design:type",nt.zj)],at.prototype,"_sideEffect",void 0),at=Y=(0,Q.Cg)([(0,Z.injectable)()],at)},47255:(q,K,z)=>{"use strict";var Y;z.d(K,{o:()=>Y}),function(q){q.FunnelBossStatueModalPurchaseRematch="Boss-Statue-Modal-Purchase-Rematch",q.FunnelBuyMemberItem="Buy-Member-Item",q.FunnelSecondWheelSpin="Second-Wheel-Spin",q.FunnelEnterDarkTower="Enter-Dark-Tower",q.FunnelCatchMorePets="Catch-More-Pets",q.FunnelOpenMemberChestBattle="Open-Member-Chest-Battle",q.FunnelOpenMemberChestWorld="Open-Member-Chest-World",q.FunnelEquipNewLockedItem="Equip-New-Locked-Item",q.FunnelEquipBackpackLockedItem="Equip-Backpack-Locked-Item",q.FunnelEquipMemberLockedCostume="Equip-Member-Locked-Costume",q.FunnelEquipCardLockedItem="Equip-Card-Locked-Item",q.FunnelCatchPetAgain="Catch-Pet-Again",q.FunnelUseBoost="Use-Boost",q.FunnelClickHUDButton="Click-HUD-Button",q.FunnelEvolutionMemberLock="Evolution-Member-Lock",q.FunnelEvolutionInsufficientResource="Evolution-Insufficient-Resource",q.FunnelTileScreen="Tile-Screen-Load",q.FunnelCharSelect="Char-Select-Load",q.FunnelPVEBattleScreen="PVE-Battle-Screen-Load",q.FunnelPVPBattleScreen="PVP-Battle-Screen-Load",q.FunnelVideoPlayer="Video-Player",q.FunnelTransitMap="Transit-First-Map",q.FunnelClickMemberDance="Click-Member-Dance",q.FunnelFireTitanCatapult="Fire-Titan-Catapult",q.FunnelSelectMemberNickname="Select-Member-Nickname",q.FunnelClickMemberBounty="Click-Member-Bounty",q.FunnelClickMemberBoxMail="Click-Member-Box-Mail",q.FunnelEquipLevelLockedItem="Equip-Level-Locked-Item",q.FunnelCatchUpToClass="Catch-up-to-Your-Class",q.FunnelClickWizardWatch="Click-Wizard-Watch-CTA",q.FunnelCatchMemberLockedPet="Catch-Member-Locked-Pet",q.FunnelCatchEvolvedPet="Catch-Evolved-Pet",q.FunnelLoginScreen="login_screen_funnel",q.FunnelUltimatesTab="Ultimates-Tab",q.FunnelMythics21Q4="mythics",q.FunnelStarJar="NonMember-Star-Jar",q.FunnelUseMemberLockedItem="Use-Member-Locked-Item",q.FunnelNotEnoughCurrency="Not-Enough-Currency",q.FunnelNotEnoughCurrencyRifts="Not-Enough-Currency-Rifts",q.FunnelBattlePassMemberUnlock="Battle-Pass-Member-Unlock",q.FunnelMemberJar="Member-Jar",q.FunnelPostBattleMagicoinGetMemberRewards="Post-Battle-Magicoin-Get-Member-Rewards",q.FunnelLockedStadiumRoom="Locked-Stadium-Room",q.FunnelRiftRunMemberLockedOpponentOption="Rift-Run-Member-Locked-Opponent-Option",q.FunnelPetSlots="Pet-Slots",q.FunnelPetGear="Equip-Member-Locked-Pet-Gear",q.FunnelLootDash="Loot-Dash",q.FunnelSegmentedOffers="Segmented-Offers",q.FunnelChargedLevels="Charged-Levels",q.FunnelCurrencyConversion="Currency-Conversion",q.FunnelPrizeWheelPurchaseSpin="Prize-Wheel-Purchase-Spin",q.FunnelFestivalMemberQuest="Festival-Member-Quest",q.FunnelPetMergeNotEnoughCurrency="Pet-Merge-Not-Enough-Currency",q.FunnelMembersGetSevenLevels="Members-Get-Seven-Levels",q.FunnelWizardBank="wizard_bank",q.FunnelMemberLockedGoldRifts="Member-Locked-Gold-Rifts",q.StageClickItem="Click-Item",q.StageClickBuy="Click-Buy",q.StageClickMembership="Click-Membership",q.StageClickParentConfirmation="Click-Parent-Confirmation",q.StageClickSpinAgain="Click-Spin-Again",q.StageEnterTower="Enter-Tower",q.StageCatchPet="Catch-Pet",q.StageOpenChest="Open-Chest",q.StageEquipItem="Equip-Item",q.StageCatchPetFail="Catch-Pet-Fail",q.StageTryAgain="Try-Again",q.StageClickBoost="Click-Boost",q.StageClickStars="Click-Stars",q.StageClickButton="Click-Button",q.StageEvolutionSeeButton="Evolution-See-Button",q.StageEvolutionClickButton="Evolution-Click-Button",q.StageEvolutionEvolvePet="Evolve-Pet",q.StageEvolutionConverted="Evolution-Converted",q.StageTransitMap="Transit-Map",q.StageDanceStart="Dance",q.StageFireCatapult="Fire-Catapult",q.StageSelectNickname="Select-Nickname",q.StageClickBounty="Click-Bounty",q.StageEquipFromBackpack="Equip-From-Backpack",q.StageEquipFromPouch="Equip-From-Pouch",q.StageLoadStart="Load-Start",q.StageLoadEnd="Load-End",q.StageSaved="Character-Saved",q.StageVideoStart="Video-Start",q.StageVideoEnd="Video-Complete",q.StageCloseVideo="Close-Video",q.StageInsufficientCurrency="Insufficient-Currency",q.StageClickCTA="Click-CTA",q.StageSessionLoadGame="load_game",q.StageSessionLoadEnd="load_end",q.StageSessionLoadLogin="load_login",q.StageSessionLoadStart="load_start",q.StageClickMembershipBenefits="Click-Membership-Benefits",q.StageClickLockedItemBattlePass="Click-Item-Treasure-Track",q.StageClickGetMoreRevivesLootDash="Click-Get-More-Revives-Loot-Dash",q.StageClickRerollRiftBuff="Click-Reroll-Rift-Buff",q.StageClickRerollRiftOpponents="Click-Reroll-Rift-Opponents",q.StageClickRouletteSpinAgain="Click-Roulette-Spin-Again",q.StagePostBattleMagicoinClickGetMemberRewards="Post-Battle-Magicoin-Click-Get-Member-Rewards"}(Y||(Y={}))},325:(q,K,z)=>{"use strict";var Y;z.d(K,{Q:()=>Y}),function(q){q.Math="math",q.Science="science",q.ELA="ela"}(Y||(Y={}))},37629:(q,K,z)=>{"use strict";z.d(K,{c:()=>Q});var Y=z(62459);class Q{constructor(q=null){this._jsonObject=null,this._jsonObject=q}setJson(q){this._jsonObject=q}getJson(){return this._jsonObject}getData(){const q=[];return this.encodeAsUrl(this._jsonObject,null,q),q.join("&")}getContentType(){return"application/x-www-form-urlencoded; charset=UTF-8"}encodeAsUrl(q,K,z){if(q instanceof Array)q.forEach(((q,Y)=>{const Q=`${K}[${Y}]`;null!==q&&"object"==typeof q?this.encodeAsUrl(q,Q,z):this.appendKeyValuePair(z,Q,q)}));else if(null!==q&&"object"==typeof q)for(const Q in q)q.hasOwnProperty(Q)&&this.encodeAsUrl(q[Q],Y.Aq$.isDefined(K)?`${K}[${Q}]`:Q,z);else this.appendKeyValuePair(z,K,q)}appendKeyValuePair(q,K,z){null===z?q.push(`${K}=`):void 0!==z&&q.push(`${K}=${encodeURIComponent(z)}`)}}},80403:(q,K,z)=>{"use strict";z.d(K,{K:()=>J});var Y,Q=z(8674),X=z(62459),Z=z(79687);let J=Y=class{constructor(q,K,z){this._identityAuthProvider=q,this._httpClient=K,this._technicalMetricsManager=z}sendRequest(q,K,z,Y){return(0,Q.sH)(this,void 0,void 0,(function*(){const Q=this.createRequest(q,K,null!=z?z:this.determineOperationName(q),Y),X=yield this._httpClient.sendRequest(Q);return this._technicalMetricsManager.increaseNetworkRequestCount(),X.wasSuccessful()?X.getData():Promise.reject(new Error(X.getErrorMessage()))}))}static responseIsGraphQLError(q){var K;return(null===(K=null==q?void 0:q.errors)||void 0===K?void 0:K.length)>0}static getGraphQLErrorCode(q){var K,z;if(Y.responseIsGraphQLError(q))for(const Y of q.errors){const q=Y.extensions,Q=null===(z=null===(K=null==q?void 0:q.response)||void 0===K?void 0:K.body)||void 0===z?void 0:z.errors;if((null==Q?void 0:Q.length)>0)for(const K of Q)if(X.Aq$.isDefined(K.code))return K.code;if(X.Aq$.isDefined(q.code))return q.code}}createRequest(q,K,z,Q){const Z=Object.assign(Object.assign({},Y.DEFAULT_NETWORK_REQUEST_BEHAVIOUR),Q),J=new X.u1k;return J.setTimeout(Z.timeoutMs).setRetryCount(Z.retryCount).setHeader("apollographql-client-name","prodigy-game").setHeader("apollographql-client-version","1.0").setMethod(X.iXQ.Post).setRequestURI("graphql/").addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).addResponseInterceptor(X.XKG.convertToJson).setBody(new X._A9({query:q,variables:K,operationName:z})),J}determineOperationName(q){const K=/^\s*(query|mutation|subscription)\s+(\w+)/i.exec(q);return null==K?void 0:K[2]}};J.DEFAULT_NETWORK_REQUEST_BEHAVIOUR={timeoutMs:1e4,retryCount:0,retryIntervalMs:1e3,retryIncrementMs:1e3,retryMaxDelayMs:1e4},J=Y=(0,Q.Cg)([(0,Z.injectable)(),(0,Q.Qj)(0,(0,Z.inject)("271-f034")),(0,Q.Qj)(1,(0,Z.inject)("429-aba2")),(0,Q.Qj)(2,(0,Z.inject)("a92-c640")),(0,Q.Sn)("design:paramtypes",[Object,Object,Object])],J)},45716:(q,K,z)=>{"use strict";var Y;z.d(K,{l:()=>Y}),function(q){q.AllGood="NETWORK_ALL_GOOD",q.WrongUsernameOrPassword="WRONG_USERNAME_PASSWORD",q.CheckNetworkConnection="NETWORK_CHECK_CONNECTION",q.NetworkOffline="NETWORK_OFFLINE"}(Y||(Y={}))},10312:(q,K,z)=>{"use strict";z.d(K,{I:()=>Rt});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z(99625),tt=z(95066),et=z(36525),it=z(2952),st=z(17516),nt=z(59287),at=z(35120),rt=z(51477),ot=z(34829),ht=z(73797),ct=z(2272),dt=z(75329),lt=z(98252),ut=z(30405),ft=z(51979),bt=z(78686),pt=z(51151),vt=z(48417),gt=z(30628),mt=z(72042),yt=z(22023),_t=z(37629);var Et;!function(q){q.Math="MATH",q.English="ELA",q.Science="SCIENCE"}(Et||(Et={}));class wt{constructor(q,K,z,Y,Q,X,Z,J,tt){if(this.userID=null,this.genericAjaxError=()=>{},this.defaultSettings=null,this.defaultHandlers={},this.wasSocketConnected=!1,this.socketConnectUrl="",this.socketConnectParams={},this.worldID=0,this.gameContainer=null,this.zone=null,this.clientVersion=null,this.httpClient=null,this._jwtAuthProvider=null,this._tokenAuthProvider=null,this._identityAuthProvider=null,this.urlProvider=null,this.socketInterface=null,this.disconnectCountInSession=0,this.reconnectAttemptsCount=0,this._remoteLogger=null,this._worldName="",this.gameContainer=z,this.clientVersion=q.clientVersion,this.urlProvider=Z,this.defaultSettings=wt.getDefaultSettings(this.urlProvider),this.httpClient=Y,this._jwtAuthProvider=Q,this._tokenAuthProvider=X,this._remoteLogger=J,this._identityAuthProvider=tt,this.socketInterface=z.get("8a8-c77c"),this.game=z.get("d73-66e9"),null!==q)for(const et in q)void 0!==q[et]&&(this.defaultSettings[et]=q[et]);if(null!==K){const q=Object.keys(K),z=q.length;for(let Y=0;Y{Q.VyI.log("client connected",Q.$bb.Verbose),this.wasSocketConnected=!0},ct=q=>{Q.Aq$.isDefined(q)&&Q.VyI.log(q,Q.$bb.Error);const K=q,z=wt.getStatusKey(st,K.code.toString());Q.Aq$.isDefined(K.code)&&Q.Aq$.isDefined(z)?st[K.code](K.code,"joinMultiplayerServer"):it?it("joinMultiplayerServer",K.code):this.genericAjaxError("joinMultiplayerServer",K.code)},dt=()=>{this.socketInterface.removeListener(Q.KZk.Connect,ht),this.socketInterface.removeListener(Q.KZk.Connect,et),this.socketInterface.removeListener(Q.KZk.Error,ct);const q=wt.getStatusKey(st,"503","503");Q.Aq$.isDefined(q)&&this.socketInterface.removeListener(Q.KZk.ConnectError,st[q])};this.socketInterface.addListener(Q.KZk.Connect,ht),this.socketInterface.addListener(Q.KZk.Connect,et),this.socketInterface.addListener(Q.KZk.Connect,dt),this.socketInterface.addListener(Q.KZk.ConnectError,(q=>{Q.VyI.log("connect_error",Q.$bb.Verbose),Q.VyI.log(q,Q.$bb.Error),this.wasSocketConnected||(this.socketInterface.disconnect(),this.trackConnection(Q.KZk.Disconnect))})),this.socketInterface.addListener(Q.KZk.Error,ct),this.socketInterface.addListener(Q.KZk.Error,dt);const lt=wt.getStatusKey(st,"503","503");return Q.Aq$.isDefined(lt)&&this.socketInterface.addListener(Q.KZk.ConnectError,st[lt]),this.socketInterface.addListener(Q.KZk.ConnectError,dt),this.socketInterface.addListener(Q.KZk.ReconnectAttempt,(()=>{Q.Aq$.isDefined(this.zone)?ot.zone=this.zone:Q.Aq$.isDefined(ot.zone)||delete ot.zone,ot.jwt=this._jwtAuthProvider.getToken(),this.socketInterface.setQuery(ot)})),this.socketInterface.addListener(Q.KZk.Message,(q=>{z(q)})),this.socketInterface.addListener(Q.KZk.PlayerJoined,(q=>{Q.VyI.log(`player Joined - playerId: ${q}`,Q.$bb.Verbose),J(q)})),this.socketInterface.addListener(Q.KZk.PlayerLeft,(q=>{Q.VyI.log(`player Left - playerId: ${q}`,Q.$bb.Verbose),tt(q)})),this.socketInterface.addListener(Q.KZk.PlayerList,(q=>{Q.VyI.log("player list received",Q.$bb.Verbose),Y(q)})),this.socketInterface.addListener(Q.KZk.Disconnect,(q=>{Q.VyI.log("Disconnected from multiplayer server",Q.$bb.Verbose),X(q),this.trackConnection(Q.KZk.Disconnect)})),this.socketInterface.addListener(Q.KZk.Reconnect,(()=>{Q.VyI.log("Reconnected to the multiplayer server",Q.$bb.Verbose),this.trackConnection(Q.KZk.Reconnect),Z()})),this.socketInterface.addListener(Q.KZk.Reconnecting,(()=>{this.trackConnection(Q.KZk.Reconnecting)})),!0}trackConnection(q){const K=new Date;if(q===Q.KZk.Disconnect)this.disconnectTime=K,this.disconnectCountInSession++;else if(q===Q.KZk.Reconnecting)this.reconnectAttemptsCount++;else if(q===Q.KZk.Reconnect){if(this.disconnectTime){const q=at.q.instance.prodigy.gameContainer,z=K.getTime()-this.disconnectTime.getTime();q.get("577-9956").getData().then((([,K])=>{const Y={disconnectTime:this.disconnectTime,disconnectPeriod:Math.round(z/1e3),disconnectCountInSession:this.disconnectCountInSession,reconnectAttemptsCount:this.reconnectAttemptsCount},X=q.get("ad2-c5b2").player;Q.Aq$.isDefined(X.primaryParentID)&&(Y.parentID=X.primaryParentID)})),q.get("20f-5f67").connection.sendServerReconnectedEvent({name:this._worldName,duration:z/ot.A.SECONDS_TO_MILLISECONDS_MULTIPLIER,disconnect_time:this.disconnectTime.getTime()/ot.A.SECONDS_TO_MILLISECONDS_MULTIPLIER,disconnect_count:this.disconnectCountInSession,reconnection_attempt_count:this.reconnectAttemptsCount.toString()})}else Q.VyI.log("Could not log reconnect event as disconnect event never occurred.",Q.$bb.Warning);this.reconnectAttemptsCount=0}Q.VyI.log(`Multiplayer Socket ${q} at ${K.toLocaleString()}`,Q.$bb.Verbose)}emitMessage(q,K){return null!==this.assignHandlers(K,["200"],"emit message")&&null!==this.socketInterface&&(this.socketInterface.emitEvent(Q.KZk.Message,q),!0)}getWorldList(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.multiplayer}worlds`,{},"getWorldList",q,K,z)}))}getCharacter(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=this.gameContainer.get("b09-138c"),Y=vt.D.Character.GetFieldsOnInitialLogin,Q={fields:[]};try{const X=yield z.cloudScript.useIdempotency(!1).execute(Y,Q);if(X.isOK()){const K=Object.keys(X.data)[0];q(X.data[K],X.status)}else K("getCharacter",X.status)}catch(X){const q=X;(null==q?void 0:q.errorInfo)?K("getCharacter",q.errorInfo.status):K("getUser",500)}}))}static isSuccess(q){return 200===q}static isError(q){return q/100>=4}static httpStatusCodeToString(q){let K;const z={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",408:"Timeout Error",409:"Conflict",426:"Upgrade required",500:"Internal Server Error",503:"Service Not Available"};return K=q in z?z[q]:"No defined Handler detected for ErrorCode",K+=` [${q}]`,K}processRequestResponse(q,K,z,Y,X){if(K.wasSuccessful()&&wt.isSuccess(q))X&&q in X?X[q](q,void 0,K.getData()):z&&z(K.getData(),q);else{K.wasSuccessful()&&!wt.isSuccess(q)?Q.VyI.log(`http response code is not 200 [${q}] - treat as failed`,Q.$bb.Warning):wt.isError(q)?Q.VyI.log(wt.httpStatusCodeToString(q),Q.$bb.Error):Q.VyI.log(`No defined Handler detected [${q}]`,Q.$bb.Warning);let z=wt.getStatusKey(X,q.toString());Q.Aq$.isDefined(z)?X[z](q,K.getErrorMessage()):(z=wt.getStatusKey(this.defaultHandlers,q.toString()),Q.Aq$.isDefined(z)?this.defaultHandlers[z](q,K.getErrorMessage()):Y?Y(K.getErrorMessage(),q):this.genericAjaxError(K.getErrorMessage(),q))}}loginSDK(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this.gameContainer.get("b09-138c"),K=this.gameContainer.get("271-f034"),z=at.q.instance.prodigy.gameContainer.get("0f2-d6bd"),Y={sessionID:this.gameContainer.get("d7b-2375").getUUID()};return q.authHandler.login(Y).then((Y=>{this.userID=Y.data.userID,this._tokenAuthProvider.setSessionToken(this.userID,Y.data.authToken);const Q=bt.read(Y.data.token);return z.setServerTime(1e3*Q.claim.iat),q.setToken("Authorization",`Bearer ${Y.data.token}`,!0,!1),q.authHandler.setCallback("onSetIdentityJWT",K.setAuthorizationToken.bind(K)),window.SW.Load.userInfo=()=>JSON.stringify({accessToken:Y.data.identityToken,premises:Y.data.premises,name:Y.data.name}),{data:Y.data,status:Y.status}}))}))}login(q,K,z){if(this._tokenAuthProvider.isLoggedIn())return!1;const Y=this.gameContainer.get("b09-138c");return(null==Y?void 0:Y.authHandler)&&this.loginSDK().then((K=>{q(K.data,K.status)})).catch((q=>{K(q.message,q.code)})),!0}attachStudentUsingClassCode(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=yield this.sendGraphQLRequest("\n mutation JoinClassroom($code: ClassCode!) {\n joinClassroom(input: { code: $code }) {\n classroomJoined\n classroom {\n id\n }\n player {\n grade {\n id\n number\n }\n chosenGrade {\n id\n number\n }\n classrooms {\n id\n code\n }\n }\n }\n }\n",{code:q});this.processRequestResponse(Y.getHttpStatusCode(),Y,K,z,Q)}))}setCurriculum(q,K,z,Q,X){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=yield this.sendGraphQLRequest("\n mutation setCurriculum($subject: Subject!, $curriculumId: ID!) {\n setCurriculum(input: {curriculumId: $curriculumId}) {\n viewer {\n curriculum(subject: $subject) {\n node {\n id\n }\n }\n chosenGrade(subject: $subject) {\n number\n }\n }\n }\n }\n",{subject:K,curriculumId:q});this.processRequestResponse(Y.getHttpStatusCode(),Y,z,Q,X)}))}setInitialGrades(q,K,z,Q,X){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=yield this.sendGraphQLRequest("\n mutation setInitialGrades($subject: Subject!, $grade: GradeNumber!) {\n setInitialGrades(input: {grade: $grade }) {\n viewer {\n curriculum(subject: $subject) {\n node {\n id\n }\n }\n chosenGrade(subject: $subject) {\n number\n }\n }\n }\n }\n",{subject:K,grade:q});this.processRequestResponse(Y.getHttpStatusCode(),Y,z,Q,X)}))}updatePlayerGrade(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.sendGraphQLRequest("\n mutation UpdateGradeFromAlgorithm($grade: GradeNumber!) {\n _updateDataForAlgorithm(input: { grade: $grade }) {\n player {\n id\n grade {\n id\n number\n }\n }\n }\n }\n",q)}))}logout(){this.userID=null,this.socketInterface&&this.socketInterface.disconnect();const q=window.gameLoaderLogout;q&&q(),lt.pF.isNewMobileLogin()||window.SW.Load.redirectToLauncher(window.launcherUrl)}updateCharacter(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=Date.now();if(K&&z&&this._jwtAuthProvider.isLoggedIn()){const X=this.gameContainer.get("b09-138c"),Z=vt.D.Character.Update,J={data:q,userID:this.userID};try{const q=yield X.cloudScript.useIdempotency(!1).execute(Z,J),Q=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;if(ot.A.get("GameConstants.Build.ENABLE_LOADING_METRICS")&&ut.o.inTestGroups(Q,mt.U.TEST_GROUPS)){const q=Date.now()-Y,K=new et.i;K.setKey("prodigy_game.gameAPI.RTT"),K.setValue(q),this._remoteLogger.logStat(K,tt.d.Timing)}q.isOK()?K(q.data,q.body):z(q)}catch(Q){const q=Q;(null==q?void 0:q.errorInfo)?z({status:q.errorInfo.status,data:q.errorInfo.result}):z({status:500,data:"Internal Server Error"})}return!0}return!1}))}leaveZone(){null!==this.socketInterface&&(this.zone=null,this.socketInterface.emitEvent("leaveZone"))}joinZone(q){null!==this.socketInterface&&(this.zone=q,this.socketInterface.emitEvent("joinZone",q))}refreshMultiplayer(){null!==this.socketInterface&&this.socketInterface.emitEvent("refresh",{})}getClassCodes(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.sendGraphQLRequest("\n query fetchAllClassCodes {\n player {\n id\n classrooms {\n id\n code\n }\n }\n }\n");return q.wasSuccessful()?q.getData():Promise.reject(new Error("Failed to get class code data from server"))}))}getCurrentClassCode(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=yield this.sendGraphQLRequest("\n query fetchCurrentClassCode {\n player {\n id\n currentClassroom {\n id\n code\n }\n }\n }\n");return q.wasSuccessful()?q.getData():Promise.reject(new Error("Failed to get current class code data from server"))}))}getCurriculumAndGrade(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){var z,Y,X;let Z;switch(K){default:case Et.Math:Z="\n query mathCurriculumAndGrades {\n viewer {\n curriculum(subject: MATH) {\n node {\n id\n }\n }\n chosenGrade(subject: MATH) {\n value: number\n }\n }\n }\n"}const J=yield this.sendGraphQLRequest(Z);if(!J.wasSuccessful())return Promise.reject(new Error("Failed to get curriculum and grade from the server"));const tt=J.getData(),et={userID:q.userID,goalId:q.goalId};return Q.Aq$.isDefined(null===(Y=null===(z=tt.data.viewer.curriculum)||void 0===z?void 0:z.node)||void 0===Y?void 0:Y.id)&&(et.curriculumTreeID=tt.data.viewer.curriculum.node.id),Q.Aq$.isDefined(null===(X=tt.data.viewer.chosenGrade)||void 0===X?void 0:X.value)&&(et.grade=tt.data.viewer.chosenGrade.value,et.chosenGrade=tt.data.viewer.chosenGrade.value),et}))}updateStrandBasedPlacementTest(q,K,z,X,Z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=`${this.defaultSettings.url.education}v4/placement-tests/instance/${q}/${this.userID}`,J=(new Q.u1k).setBaseURI(Y).setBody(new _t.c(K)).addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).setMethod(Q.iXQ.Post);return this.httpClient.sendRequest(J).then((q=>{this.processRequestResponse(q.getHttpStatusCode(),q,z,X,Z)}))}))}getVideoLessonSignedUrls(q,K,z,X,Z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=`${this.defaultSettings.url.education}v4/users/${this.userID}/signed-urls/video-lessons`,J=(new Q.u1k).setBaseURI(Y).addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).addResponseInterceptor(Q.XKG.convertToJson).setQueryParameter("videoURL",q).setQueryParameter("captionsURL",K);return this.httpClient.sendRequest(J).then((q=>{this.processRequestResponse(q.getHttpStatusCode(),q,z,X,Z)}))}))}updatePlanStudent(q,K,z){const Y={planId:q};z||(Y.currentSkillId=K);this.defaultSettings.loader;this.sendGraphQLRequest(z?"\n mutation failFromPlanMutation($planId: ID!) {\n failFromPlan(input: { planId: $planId }) {\n failedAt\n }\n }\n":"\n mutation updateCurrentSkillForPlanMutation($planId: ID!, $currentSkillId: ID!) {\n updateCurrentSkillForPlan(input: { planId: $planId, currentSkillId: $currentSkillId }) {\n currentSkillId\n }\n }\n",Y)}updatePlacementTest(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.sendGraphQLRequest("\n mutation completePlacementTestMutation(\n $curriculumId: ID\n $finalGradeNumCompletePercentage: Float\n $grade: GradeNumber!\n $placementTestInstanceId: ID\n $subject: Subject\n $studentDataGrade: PositiveInt\n $studentDataCurriculumId: ID\n $studentDataChosenGrade: PositiveInt\n ) {\n completePlacementTest(\n input: {\n curriculumId: $curriculumId\n finalGradeNumCompletePercentage: $finalGradeNumCompletePercentage\n grade: $grade\n placementTestInstanceId: $placementTestInstanceId\n subject: $subject\n studentDataGrade: $studentDataGrade\n studentDataCurriculumId: $studentDataCurriculumId\n studentDataChosenGrade: $studentDataChosenGrade\n }\n ) {\n player {\n id\n }\n }\n }\n",q)}))}saveAnswer(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.answer}users/${this.userID}/answers`,q,"saveAnswer",K,z,Q)}))}getUser(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=this.gameContainer.get("b09-138c"),X=vt.D.Character.GetMultiple,Z={userIDs:q.split(","),fields:K};try{const q=yield Y.cloudScript.useIdempotency(!1).execute(X,Z);q.isOK()?z(q.data,q.status):Q("getUser",q.status)}catch(J){const q=J;(null==q?void 0:q.errorInfo)?Q("getUser",q.errorInfo.status):Q("getUser",500)}}))}getTitans(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.titan}v1/titans`,{userID:this.userID},"getTitans",q,K,z)}))}getTitan(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.titan}v1/titan/${q}`,{userID:this.userID},"getTitan",K,z,Q)}))}hitTitan(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.titan}v1/titan/${q}/hit`,{userID:this.userID,hits:1},"hitTitan",K,z,Q)}))}getTitanUserData(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.titan}v1/titan/user/${this.userID}`,{},"getTitanUserData",q,K,z)}))}startMatchmaking(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=K.appearance,Y=K.getPlayerData().playerTransformation,X=this.gameContainer.get("9b1-43f3"),Z=pt.DuelInviteProto.create({userID:K.userID,team:K.data.team,member:K.hasMembership()?1:0,level:K.getChargedLevelCumulative(),appearance:{faceID:z.getFace(),hair:{styleID:z.getHair().style,colorID:z.getHair().color},skinColorID:z.getSkinColor(),eyeColorID:z.getEyeColor(),morph:Y?{type:Y.transformType,ID:Y.transformID}:null},equipment:{hatID:K.equipment.getHat(),bootsID:K.equipment.getBoots(),weaponID:K.equipment.getWeapon(),outfitID:K.equipment.getOutfit()},name:{first:z.getName().getFirstName(),middle:z.getName().getMiddleName(),last:z.getName().getLastName(),nick:z.getName().getNickname()}}),J={"force new connection":!0,reconnection:!1,transports:["websocket"],reconnectionDelay:1e4,reconnectionDelayMax:15e3,reconnectionAttempts:10,pingInterval:6e3,pingTimeout:6e3,query:{userId:this.userID,jwt:this.jwtAuthProvider.getToken(),level:K.getChargedLevelCumulative(),playerData:JSON.stringify({data:gt.B.toArray(pt.DuelInviteProto,Z)}),bucketId:q,maxRange:this.getMatchmakingMaxRange(),maxWait:this.getMatchmakingMaxWait(),effectivePetLevels:yt.P8.getTeamsEffectiveLevels()},secure:this.defaultSettings.url.matchmaking.startsWith("https://"),path:this.defaultSettings.path.matchmaking},tt=new Q.bnh;X.connect(this.defaultSettings.url.matchmaking,null,J);const et=()=>{Q.VyI.log("client connected to matchmaking",Q.$bb.Verbose),tt.resolve(!0)},it=q=>{Q.Aq$.isDefined(q)&&Q.RQr.logError(q,"Error connecting to the matchmaking service");const K=q;Q.Aq$.isDefined(K.code)&&this.genericAjaxError("joinMatchmakingService",K.code),tt.resolve(!1)};X.addListener(Q.KZk.ConnectError,(q=>{Q.VyI.log("connect_error",Q.$bb.Verbose),Q.VyI.log(q,Q.$bb.Error),tt.resolve(!1)}));const st=()=>{X.removeListener(Q.KZk.Connect,et),X.removeListener(Q.KZk.Connect,st),X.removeListener(Q.KZk.Error,it),X.removeListener(Q.KZk.Error,st)};return X.addListener(Q.KZk.Connect,et),X.addListener(Q.KZk.Connect,st),X.addListener(Q.KZk.Error,it),X.addListener(Q.KZk.Error,st),tt}))}getMatchmakingMaxRange(){return 3}getMatchmakingMaxWait(){return 10}quitMatchmaking(){this.gameContainer.get("9b1-43f3").disconnect()}getFriendList(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.friend}v1/friend/${this.userID}`,{offset:0,limit:0},"getFriendList",q,K,z)}))}getTotalFriendRequests(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/countFriendRequest`,{},"getTotalFriendRequests",q,K,z)}))}getFriendRequestList(q,K,z,Q,X){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/request`,{offset:q,limit:K},"getFriendRequestList",z,Q,X)}))}sendFriendRequest(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/add/${q}`,{},"sendFriendRequest",K,z,Q)}))}cancelFriendRequest(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("delete",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/cancel/${q}`,{},"cancelFriendRequest",K,z,Q)}))}acceptFriendRequest(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/accept/${q}`,{},"acceptFriendRequest",K,z,Q)}))}rejectFriendRequest(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("delete",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/reject/${q}`,{},"rejectFriendRequest",K,z,Q)}))}removeFriend(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("delete",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/remove/${q}`,{},"removeFriend",K,z,Q)}))}getGiftBoxes(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.root}v1/users/${this.userID}/giftboxes`,{},"getGiftBoxes",q,K,z)}))}updateGiftBox(q,K,z,Q,X){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.root}v1/users/${this.userID}/giftbox/${q}`,{giftBoxData:JSON.stringify(K)},"updateGiftBox",z,Q,X)}))}addGiftBox(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.root}v1/users/${this.userID}/giftboxes`,{giftBoxID:q},"addGiftBox",K,z,Q)}))}completeAssignment(q,K){return null!==this.assignHandlers(K,["200"],"completeStudentAssignment")&&(this.sendGraphQLRequest("\n mutation completeAssignment($assignmentId: ID!) {\n completeAssignment(input: { id: $assignmentId }) {\n assignment {\n id\n }\n }\n }\n",{assignmentId:q}),!0)}getStudentData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=q,z=yield this.sendGraphQLRequest("\n query fetchStudentData ($subject: Subject!) {\n player {\n id\n curriculum (subject: $subject) {\n id\n subject\n }\n chosenGrade (subject: $subject) {\n chosenGradeNumber: number\n }\n grade (subject: $subject) {\n gradeNumber: number\n }\n goal (subject: $subject) {\n id\n }\n }\n }\n",{subject:K});if(!z.wasSuccessful())return Promise.reject(new Error("Failed to get student data from server"));return z.getData().data}))}static getDefaultSettings(q){const K=`${q.getAPIRootUrl()}/`,z=`${q.getMatcherApiRootUrl()}/`,Y=`${q.getLoaderUrl()}/`;return{version:"v1",root:`${Y}game-api/`,loader:Y,url:{matchmaking:z,multiplayer:`${K}multiplayer-api/`,friend:`${K}friend-api/`,mailer:`${K}game-mailer-api/`,education:`${Y}education-api/`,titan:`${K}titan-api/`,gameAPI:`${K}game-api/`,answer:`${q.getAnswerURL()}/`,websocket:z},path:{matchmaking:"/game-matcher-api/socket.io/"}}}sendGraphQLRequest(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.httpClient.sendRequest((new Q.u1k).addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).setHeader("userID",`${this.userID}`).setHeader("usertype","student").setHeader("apollographql-client-name","prodigy-game").setHeader("apollographql-client-version","1.0").setMethod(Q.iXQ.Post).setRequestURI("graphql/").setBody(new Q._A9({query:q,variables:K})).addResponseInterceptor(Q.XKG.convertToJson))}))}}var Tt,St,At=z(325),Ct=z(35564),Ot=z(69698),It=z(21314),Dt=z(70330);!function(q){q.Info="info",q.PlayerLeft="playerLeft",q.PlayerJoined="playerJoined"}(St||(St={}));let Rt=Tt=class{get OnSocketMessage(){return this.onSocketMessage}get OnPlayerJoinedSignal(){return this.onPlayerJoinedSignal}get OnPlayerLeftSignal(){return this.onPlayerLeftSignal}get OnPlayerListSignal(){return this.onPlayerListSignal}get characterProcessed(){return this._characterProcessed}set characterProcessed(q){this._characterProcessed=q}constructor(q,K,z,Y){this.loggedIn=!1,this._characterProcessed=!1,this.offlineTimer=-1,this.socketConnected=!0,this.onPlayerSaved=new Q.HN0,this.saving=!1,this.processPlayer=!1,this.processFriendsList=!1,this.hasFailedUpdate=!1,this.isActivityDialogOpen=!1,this._isTokenExpiredMessageOpen=!1,this.expiredToken=!1,this.onSocketMessage=new Q.HN0,this.onPlayerJoinedSignal=new Q.HN0,this.onPlayerLeftSignal=new Q.HN0,this.onPlayerListSignal=new Q.HN0,this.onSocketReconnect=new Q.HN0,this._multiplayerWorldSuccessHandler=null,this._multiplayerWorldErrorHandler=null,this._multiplayerWorldFullErrorHandler=null;const X=at.q.instance.prodigy.gameContainer;this.game=q,this.timeManager=K,this.metricsManager=Y,this._sessionTokenAuthProvider=X.get("304-25b9"),this.jwtAuthProvider=X.get("9e9-b33d"),this._identityAuthProvider=X.get("271-f034"),this._playerDataProvider=X.get("ad2-c5b2"),this._subjectProvider=X.get("8f9-f0fc"),this._multiplayerMessageService=X.get("dba-d83e"),this.api=new wt({clientVersion:this.game.clientVersion},{},X,X.get("429-aba2"),X.get("9e9-b33d"),this._sessionTokenAuthProvider,z,X.get("ce3-6d33"),this._identityAuthProvider),this.api.setErrorHandler(this.onError.bind(this));const Z=X.get("429-aba2");Z.setDefaultResponseHandler(418,this.showInvalidCharacterPopup,this),Z.setDefaultResponseHandler(403,this.showTokenExpiredPopup,this),Z.setDefaultResponseHandler(412,this.onReadOnlyCharacter,this),setInterval(this.updateCharacter.bind(this),3e3)}onReadOnlyCharacter(){var q,K;Q.VyI.log("HTTP 412: Read-only character cannot login",Q.$bb.Warning);try{null===(K=null===(q=window.localStorage)||void 0===q?void 0:q.removeItem)||void 0===K||K.call(q,"autoLogin")}catch(Y){}const z=at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);at.q.instance.prodigy.open.informationDialog(new dt.Z(z.getText("SETTINGS_LOGOUT"),(()=>this.logout(!0)),ct.E.Small,500,z.getText("ERROR"),z.getText("READ_ONLY_CHARACTER_LOGIN"),void 0,void 0,void 0,J.l.ErrorDialogHeader,J.l.ErrorDialogFooter))}updatePlayerPositionOnMap(){this.lastPlayerPosition&&this.emitMessage({action:Ct.x.Move,data:{target:this.lastPlayerPosition}}),this.lastPlayerPositionTimer&&clearTimeout(this.lastPlayerPositionTimer),this.lastPlayerPositionTimer=null}static openWebsite(q,K=!0,z=!0){try{const Y=z?`https://${q}`:q,X=Q.o5U.isSafari()&&Q.o5U.isIOS();lt.pF.isNativeApp()&<.pF.appType()===lt.uC.NATIVE_APP?window.postMessage(JSON.stringify({type:"OPEN_URL_IN_BROWSER",payload:Y}),window.location.origin):K&&!X?window.open(Y):window.location.href=Y}catch(e){}}getErrorMessage(q,K,z=!0){const Y=at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);let X="NETWORK_ERROR";return Q.Aq$.isDefined(q)&&Q.Aq$.isDefined(K)?X=K[q]:Q.Aq$.isDefined(K)&&(X=K[0]),z?Y.getText(X):X}sendZoneEvent(q){const K=at.q.instance.prodigy.world.getCurrentMap();if(Q.Aq$.isDefined(K)){2!==K.split("-").length&&Q.VyI.log(`Zone event failed to send for current map ${K}`,Q.$bb.Warning)}}onError(q,K){Q.VyI.log(`FAIL : ${q}, ${K}`,Q.$bb.Verbose),null===this.updateFailedTime&&this.loggedIn&&Q.Aq$.isDefined(q)&&-1!==q.indexOf("update")&&(this.updateFailedTime=this.timeManager.getLocalTimeMs(),Q.VyI.log("logout countdown",Q.$bb.Verbose))}generalErrorHandler(q,K,z,Y,X){if(426===z)return Q.VyI.log(`NetworkManager.generalErrorHandler[${q}] - httpResponseCode ${z} - version error`,Q.$bb.Warning),void this.versionError();K?K(`NetworkManager.generalErrorHandler[${q}] - ${Y}`,z):Q.VyI.log(`NetworkManager.generalErrorHandler[${q}] - httpResponseCode ${z}`,Q.$bb.Verbose)}getCharData(q,K){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z=(()=>{}),Y=(()=>{})){return this.api.getUser(q,K,z,((q,K)=>{this.generalErrorHandler("getCharData",Y,K,q)}))}))}initGoingOffline(){-1===this.offlineTimer&&this.loggedIn&&(this.offlineTimer=this.timeManager.getLocalTimeMs()+7e4,this.offlineMessage="NETWORK_GOING_OFFLINE")}getWorldList(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){try{const K=yield this._multiplayerMessageService.getWorldList();q(K.data,200)}catch(z){K("",z.errorInfo.status)}return{}}))}startMatchmaking(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.api.startMatchmaking(q)}))}quitMatchmaking(){this.api.quitMatchmaking()}joinMultiplayerServer(q,K,z,Y,X){this.world=q;at.q.instance.prodigy.gameContainer.get("b0c-9016").joinWorldChannel(q.name,this.processWorldMessage.bind(this),this.processAllWorldSubscriptionError.bind(this)).catch(Q.RQr.createHandler("Error joining world channel")),this._multiplayerWorldSuccessHandler=z,this._multiplayerWorldErrorHandler=Y,this._multiplayerWorldFullErrorHandler=X}isMultiplayerZone(q){const K=at.q.instance.prodigy.world;return!(q.isCutscenePlaying||0===q.zoneName.indexOf("scene-")||q.zoneName===ft.W||K.isZoneSinglePlayer(q.zoneName))}joinZone(q){var K;if(this.zone=q,!this.loggedIn||!this.characterProcessed)return;const z=at.q.instance.prodigy.gameContainer.get("b0c-9016");z.isSubscribedToWorld()&&(this.isMultiplayerZone(this.zone)?(z.joinLocationChannel(nt.K.getZoneMapChannelName(this.world.name,this.zone.zoneName),this.processZoneLocationMessage.bind(this),this.processZoneMapSubscriptionError.bind(this),this.processZoneMapDisconnection.bind(this),this.processZoneMapReconnection.bind(this),null===(K=q.onSubscribed)||void 0===K?void 0:K.bind(q)).catch(Q.RQr.createHandler("Error joining map channel")),z.onNotificationReceived.has(this.handleNotificationMessages,this)||z.onNotificationReceived.add(this.handleNotificationMessages,this)):z.leaveLocationChannel().catch(Q.RQr.createHandler("Error leaving map channel")))}leaveZone(){if(this.zone=null,!this.loggedIn||!this.characterProcessed)return;const q=at.q.instance.prodigy.gameContainer.get("b0c-9016");q.onNotificationReceived.has(this.handleNotificationMessages,this)&&(q.leaveLocationChannel().catch(Q.RQr.createHandler("Error leaving map channel")),q.onNotificationReceived.remove(this.handleNotificationMessages,this)),this.lastPlayerPosition=null}refreshMultiplayer(){this.api.refreshMultiplayer()}setZone(q){this.zone=q}attachClassCode(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.api.attachStudentUsingClassCode(q,((q,Y)=>{var X,Z,J;const tt=null===(X=null==q?void 0:q.data)||void 0===X?void 0:X.joinClassroom;if(null==tt?void 0:tt.classroomJoined){const z=null===(J=null===(Z=tt.player)||void 0===Z?void 0:Z.classrooms)||void 0===J?void 0:J.map((q=>parseInt(q.id))).filter((q=>!Number.isNaN(q)));if(z)return this._playerDataProvider.player.classIDs=z,void K(q,Y)}Q.VyI.log("JoinClassroom request did not return the expected response",Q.$bb.Error),z()}),((q,K)=>{this.generalErrorHandler("attachClassCode",z,K,q)}))}))}emitMessage(q){if(!this.canUseMultiplayer()||!this.zone)return!1;Tt.emitMessageCount++,Q.Aq$.isDefined(q.action)&&Q.VyI.log(`[${Tt.emitMessageCount}] emitMessage called action: ${q.action}`,Q.$bb.Verbose);if(!at.q.instance.prodigy.gameContainer.get("b0c-9016").isSubscribedToWorld()||Q.Aq$.isDefined(this.zone.zoneName)&&!this.isMultiplayerZone(this.zone))return!1;const K=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=nt.K.getZoneMapChannelName(this.world.name,this.zone.zoneName);switch(q.action){case Ct.x.FX:return this._multiplayerMessageService.sendFXMessage(nt.K.getZoneMapChannelName(this.world.name,this.zone.zoneName),q.data.type,q.data.x,q.data.y).catch(Q.RQr.createHandler("Could not send fx message")),!0;case Ct.x.Move:return at.q.instance.prodigy.gameContainer.get("b0c-9016").moveOnArea(q.data.target).catch(Q.RQr.createHandler("Could not send move message")),this.lastPlayerPosition=q.data.target,!0;case Ct.x.Chat:return this._multiplayerMessageService.sendChatMessage(z,q.data.emoteID,q.data.danceID,q.data.chatID).catch(Q.RQr.createHandler("Could not send chat message")),!0;case Ct.x.Transform:return K.forceSaveCharacter((()=>{const z=nt.K.getZoneMapChannelName(this.world.name,this.zone.zoneName);this._multiplayerMessageService.sendTransformMessage(z,q.data.showEffect,q.data.transformID,q.data.transformType).catch(Q.RQr.createHandler("Could not send transform message")),this._multiplayerMessageService.updateCachedAppearance(z,K.getID()).catch(Q.RQr.createHandler("Could not send update cached appearance"))})),K.saveEnabled=!1,!0;case Ct.x.HostTeam:return this._multiplayerMessageService.sendCoopHostTeamMessage(z,q.data.hostID,q.data.teamMembers,q.data.streak,q.data.readyMembers).catch(Q.RQr.createHandler("Could not send Coop Host Team message")),!0;case Ct.x.TeamDisbanded:return this._multiplayerMessageService.sendCoopTeamDisbandedMessage(z,q.data.hostID).catch(Q.RQr.createHandler("Could not send Coop Team disbanded message")),!0;case Ct.x.JoinTeam:return this._multiplayerMessageService.sendCoopJoinTeamMessage(z,q.data.hostID,q.data.teamMembers,q.data.streak,q.data.readyMembers,q.target).catch(Q.RQr.createHandler("Could not send Coop Join Team message")),!0;case Ct.x.TeamUpdated:return this._multiplayerMessageService.sendCoopTeamUpdatedMessage(z,q.data.hostID,q.data.teamMembers,q.data.streak,q.data.readyMembers).catch(Q.RQr.createHandler("Could not send Coop Team Updated message")),!0;case Ct.x.RequestJoinTeam:return this._multiplayerMessageService.sendCoopTeamRequestJoinMessage(z,K.getID(),q.target).catch(Q.RQr.createHandler("Could not send Coop Request Join Team message")),!0;case Ct.x.PlayerLeftTeam:return this._multiplayerMessageService.sendCoopPlayerLeftTeamMessage(z,K.getID(),q.target).catch(Q.RQr.createHandler("Could not send Coop Player Left Team message")),!0;case Ct.x.StartCoOpTitanMatch:return this._multiplayerMessageService.sendCoopStartCoopTitanMatchMessage(z,q.data,q.target).catch(Q.RQr.createHandler("Could not send Coop Stat Match message")),!0;case Ct.x.HostHeartbeat:return this._multiplayerMessageService.sendCoopHostHeartbeatMessage(z,{}).catch(Q.RQr.createHandler("Could not send Coop Host Heartbeat message")),!0;case Ct.x.SyncHealth:return this._multiplayerMessageService.sendCoopSyncHealthMessage(z,q.data.crystalHP,q.data.titanHP).catch(Q.RQr.createHandler("Could not send Sync health message")),!0;case Ct.x.QuestionAnswered:return this._multiplayerMessageService.sendCoopQuestionAnsweredMessage(z,q.target,q.data.sourcePlayerID,q.data.correct).catch(Q.RQr.createHandler("Could not send question answered message")),!0;case Ct.x.PlayerAttacked:return this._multiplayerMessageService.sendCoopPlayerAttackedMessage(z,q.data.sourcePlayerID,q.data.missed,q.data.titanHealth,q.data.damage,q.data.spellID).catch(Q.RQr.createHandler("Could not send player attacked message")),!0;case Ct.x.TitanAttacked:return this._multiplayerMessageService.sendCoopTitanAttackedMessage(z,q.data.missed,q.data.crystalHealth,q.data.damage,q.data.spellID).catch(Q.RQr.createHandler("Could not send titan attacked message")),!0;case Ct.x.TitanDefeated:return this._multiplayerMessageService.sendCoopTitanDefeatedMessage(z).catch(Q.RQr.createHandler("Could not send titan defeated message")),!0;case Ct.x.PlayersDefeated:return this._multiplayerMessageService.sendCoopPlayersDefeatedMessage(z).catch(Q.RQr.createHandler("Could not send players defeated message")),!0;case Ct.x.JoinTeamFailed:return this._multiplayerMessageService.sendCoopJoinTeamFailedMessage(z,q.target,q.data.reason).catch(Q.RQr.createHandler("Could not send join team failed message")),!0;case Ct.x.PlayerRejoinTeam:return this._multiplayerMessageService.sendCoopRejoinJoinTeamMessage(z,q.target,K.getID()).catch(Q.RQr.createHandler("Could not send rejoin team message")),!0;case Ct.x.Catapult:return this._multiplayerMessageService.sendCoopCatapultMessage(z,K.getID()).catch(Q.RQr.createHandler("Could not send catapult team message")),!0;case Ct.x.Change:return K.forceSaveCharacter((()=>{const q=nt.K.getZoneMapChannelName(this.world.name,this.zone.zoneName);this._multiplayerMessageService.sendChangeAppearanceMessage(q).catch(Q.RQr.createHandler("Could not send change appearance message")),this._multiplayerMessageService.updateCachedAppearance(q,K.getID()).catch(Q.RQr.createHandler("Could not send update cached appearance"))})),K.saveEnabled=!1,!0;case Ct.x.Info:return q.data.coOpTeam&&this._multiplayerMessageService.sendCoopTeamMessage(z,Z.pick(q.data,Tt.MESSAGE_SCHEMAS.info)).catch(Q.RQr.createHandler("Could not send change appearance message")),!0}return!1}onMessage(q,K=!0){if(this.canUseMultiplayer()&&this.zone){const z=Tt.MESSAGE_SCHEMAS[q.action];K&&Q.Aq$.isDefined(z)&&Tt.decompressMessage(q,z),this.onSocketMessage.dispatch(q),Q.Aq$.isDefined(this.zone.onMessage)&&this.zone.onMessage(q)}}getFriendsList(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return ot.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(Q.VyI.log("Test get friend list",Q.$bb.Verbose),this.game.time.events.addTimer(1e3,q.bind(this,{data:[{userID:5339281,status:0},{userID:5339282,status:1},{userID:5339279,status:1}],meta:{}}),this),Promise.resolve(null)):this.api.getFriendList(q,((q,z)=>{this.generalErrorHandler("getFriendsList",K,z,q)}))}))}getTotalFriendRequests(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return ot.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(Q.VyI.log("Test get total friend requests",Q.$bb.Verbose),this.game.time.events.addTimer(2,q.bind(this,{data:{pendingRequests:1},meta:{friendsCap:20}}),this),Promise.resolve(null)):this.api.getTotalFriendRequests(q,((q,z)=>{this.generalErrorHandler("getTotalFriendRequests",K,z,q)}))}))}getFriendRequestList(q,K,z,X){return(0,Y.sH)(this,void 0,void 0,(function*(){return ot.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(Q.VyI.log("Test get friend request list",Q.$bb.Verbose),this.game.time.events.addTimer(2,z.bind(this,{data:[{userID:15263772}],meta:{}}),this),Promise.resolve(null)):this.api.getFriendRequestList(q,K,z,((q,K)=>{this.generalErrorHandler("getFriendRequestList",X,K,q)}))}))}sendFriendRequest(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return ot.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(Q.VyI.log("Test send friend request",Q.$bb.Verbose),this.game.time.events.addTimer(2,K.bind(this,q),this),Promise.resolve(null)):this.api.sendFriendRequest(q,K,((q,K)=>{this.generalErrorHandler("sendFriendRequest",z,K,q)}))}))}cancelFriendRequest(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return ot.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(Q.VyI.log("Test cancel friend request",Q.$bb.Verbose),this.game.time.events.addTimer(2,K.bind(this,q),this),Promise.resolve(null)):this.api.cancelFriendRequest(q,K,((q,K)=>{this.generalErrorHandler("cancelFriendRequest",z,K,q)}))}))}acceptFriendRequest(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return ot.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(Q.VyI.log("Test accept friend request",Q.$bb.Verbose),this.game.time.events.addTimer(2,K.bind(this,q),this),Promise.resolve(null)):this.api.acceptFriendRequest(q,K,((q,K)=>{this.generalErrorHandler("acceptFriendRequest",z,K,q)}))}))}rejectFriendRequest(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return ot.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(Q.VyI.log("Test reject friend request",Q.$bb.Verbose),this.game.time.events.addTimer(2,K.bind(this,q),this),Promise.resolve(null)):this.api.rejectFriendRequest(q,K,((q,K)=>{this.generalErrorHandler("rejectFriendRequest",z,K,q)}))}))}removeFriend(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return ot.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(Q.VyI.log("Test remove friend",Q.$bb.Verbose),this.game.time.events.addTimer(2,K.bind(this,q),this),Promise.resolve(null)):this.api.removeFriend(q,K,((q,K)=>{this.generalErrorHandler("removeFriend",z,K,q)}))}))}getTitans(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.api.getTitans(q,((q,z)=>{this.generalErrorHandler("getTitans",K,z,q)}))}))}getTitan(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.api.getTitan(q,K,((q,K)=>{this.generalErrorHandler("getTitan",z,K,q)}))}))}hitTitan(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.api.hitTitan(q,K,((q,K)=>{this.generalErrorHandler("hitTitan",z,K,q)}))}))}getTitanUserData(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.api.getTitanUserData(q,((q,z)=>{this.generalErrorHandler("getTitanUserData",K,z,q)}))}))}completeAssignment(q){this.api.completeAssignment(q,{200:()=>{}})}answerQuestion(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=Object.assign(Object.assign({},q),{isMember:K.hasMembership(),playLocation:this._playerDataProvider.player.locationSelectionType,sessionID:this._sessionTokenAuthProvider.getSessionToken()});return this.api.saveAnswer(z,(()=>{}))}))}updatePlanStudent(q){this.api.updatePlanStudent(q.id,q.currentSkillId,q.hasFailed)}updateStrandBasedPlacementTest(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=q.placementTestInstanceId;return this.api.updateStrandBasedPlacementTest(K,q)}))}finishPlacement(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.api.updatePlacementTest(q)}))}setCurriculum(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){var Y;return this.api.setCurriculum(q.curriculumTreeID,null!==(Y=q.subject)&&void 0!==Y?Y:Et.Math,K,z)}))}setInitialGrades(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){var Y;return this.api.setInitialGrades(q.grade,null!==(Y=q.subject)&&void 0!==Y?Y:Et.Math,K,z)}))}updatePlayerGrade(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.api.updatePlayerGrade(q)}))}loadEducation(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.loggedIn&&this.characterProcessed?at.q.instance.prodigy.education.getStudentData(q):Promise.resolve(null)}))}getClassCodes(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.loggedIn?this.api.getClassCodes():Promise.resolve(null)}))}getCurrentClassCode(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.loggedIn?this.api.getCurrentClassCode():Promise.resolve(null)}))}getCurriculumAndGrade(q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K=Et.Math){return this.loggedIn?this.api.getCurriculumAndGrade(q,K):Promise.resolve(null)}))}getVideoLessonSignedUrls(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.loggedIn?this.api.getVideoLessonSignedUrls(q,K,z,Q):Promise.resolve(null)}))}login(q,K,z,Y,X,Z,J,tt=0){this._playerDataProvider.initialize(X),null!==this._retryTimer&&(window.clearInterval(this._retryTimer),this._retryTimer=null);const et=tt+1;if(et>3)return Q.VyI.log("NetworkManager.login; retried 3 times. Go to failure",Q.$bb.Error),void J();const it=this.login.bind(this,q,K,z,Y,X,Z,J,et);this.api.login(((q,K)=>{this.processLoginSuccess(Z,q,q.identityToken,K)}),((q,K)=>{this.processLoginFailure("login",J,it,K,q)}))}getCharacter(q,K,z,Q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z,Y,Q=0){this._playerDataProvider.initialize(K);const X=this.getCharacter.bind(this,q,K,z,Y,Q+1);return null!==this._retryTimer&&(window.clearInterval(this._retryTimer),this._retryTimer=null),this.api.getCharacter(((K,Y)=>{this.processCharacterSuccess(z,q,K,Y)}),((q,K)=>{this.processCharacterFailure("getCharacter",Y,X,Q,K,q)}))}))}logout(q=!1){Q.VyI.log("Logging out",Q.$bb.Info),this._playerDataProvider.logout(),this.loggedIn=!1,this.characterProcessed=!1,this.jwtAuthProvider.logout(),this._sessionTokenAuthProvider.logout(),this.api.logout(),lt.pF.isNativeApp()&&window.postMessage(JSON.stringify({type:"NATIVE_LOGOUT",payload:q,token:this.api.getRefreshToken()}))}updateCharacter(){var q;if(!this.saving)if(!this.expiredToken&&!this._isTokenExpiredMessageOpen&&this.loggedIn&&this.characterProcessed&&this._playerDataProvider.player&&this._sessionTokenAuthProvider.getSessionToken()){if(Q.Aq$.isDefined(this.updateFailedTime)&&null===this.offlineTimer&&(this.timeManager.getLocalTimeMs()-this.updateFailedTime)/1e3>ot.s.get("GameConstants.Inactivity.CANNOT_CONNECT_TIMER_SECONDS")&&(this.offlineTimer=this.timeManager.getLocalTimeMs()+ot.s.get("GameConstants.Inactivity.NETWORK_BOOT_TIMER_SECONDS"),this.offlineMessage="NETWORK_CANNOT_CONNECT"),null!==this.offlineTimer){const K=this.offlineTimer-this.timeManager.getLocalTimeMs();K<0?this.logout(!0):(null===(q=this.zone)||void 0===q?void 0:q.showMessage)&&this.zone.showMessage(at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(this.offlineMessage,Math.floor(K/1e3)),5e3)}if(this._playerDataProvider.player.saveEnabled){const q=this._playerDataProvider.player.getUpdatedData(this.processPlayer);if(this.processFriendsList&&at.q.instance.prodigy.friendsListNetworkHandler.getTotalFriendRequests(),this.processPlayer=!1,this.processFriendsList=!1,this.saving=!ut.o.isEmptyObject(q),this.saving||Q.Aq$.isDefined(this.lastUpdate)&&!(this.timeManager.getLocalTimeMs()-this.lastUpdate>3e4)||(this.saving=!0),this.saving)if(this.jwtAuthProvider.isLoggedIn()){if(Q.VyI.log("Token is still valid so let's save",Q.$bb.Verbose),q.data&&!Q.Aq$.isDefined(q.data.level)){Q.VyI.log("APIClient: Player data has been corrupted",Q.$bb.Error);const q=new et.i;q.setKey("prodigy_game.APIClient.updateCharacterNoLevel"),q.setValue(1);return at.q.instance.prodigy.gameContainer.get("ce3-6d33").logStat(q,tt.d.Increment),void this.logout(!0)}this.api.updateCharacter(q,this.onUpdateCharacterSuccess.bind(this),this.onUpdateCharacterFailure.bind(this));const K=Date.now()-this.metricsManager.getLastGameSessionStartTime();isNaN(K)&&Q.VyI.log("Updated session without time being defined",Q.$bb.Warning)}else this.showTokenExpiredPopup();else this.onPlayerSaved.dispatch()}else this.onPlayerSaved.dispatch()}else this.onPlayerSaved.dispatch()}showTokenExpiredPopup(){this.expiredToken=!0,this._isTokenExpiredMessageOpen||(this._isTokenExpiredMessageOpen=!0,at.q.instance.prodigy.open.messageBoxPrefab({text:"TOKEN_EXPIRE_MESSAGE",title:"MESSAGE_TITLE_UH_OH",confirmCallback:()=>{this.logout(!0)}}))}showInvalidCharacterPopup(){const q=at.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);this.jwtAuthProvider.logout(),this._sessionTokenAuthProvider.logout(),at.q.instance.prodigy.open.informationDialog(new dt.Z(q.getText("SETTINGS_LOGOUT"),(()=>{this.logout()}),ct.E.Small,500,q.getText("ERROR_RCI_POPUP_A"),q.getText("ERROR_RCI_POPUP_B"),void 0,void 0,void 0,J.l.ErrorDialogHeader,J.l.DefaultFooter))}onUpdateCharacterSuccess(q,K){this.processUpdate(!0,!1),Q.VyI.log("Character saved successfully to GameAPI",Q.$bb.Verbose)}onUpdateCharacterFailure(q){const K=Z.includes([409,503],q.status);this.processUpdate(!1,K)}startInactiveTimer(){this.stopInactiveTimer(),this.loggedIn&&this.characterProcessed&&!lt.pF.isNativeApp()&&(this.game.input.onDown.add(this.stopInactiveTimer,this),this.game.input.onUp.add(this.startInactiveTimer,this),this.inactiveTimer=window.setTimeout(this.showInactiveDialog.bind(this),1e3*ot.s.get("GameConstants.Inactivity.DIALOG_TIMER_SECONDS")))}stopInactiveTimer(){null!==this.inactiveTimer&&(this.game.input.onDown.removeAll(this),clearTimeout(this.inactiveTimer),this.inactiveTimer=null)}showInactiveDialog(){this.isActivityDialogOpen||this.expiredToken||this._isTokenExpiredMessageOpen||(this.isActivityDialogOpen=!0,at.q.instance.prodigy.open.messageBoxPrefab({text:"INACTIVITY_MESSAGE",confirmButtonTextKey:"INACTIVITY_BUTTON",confirmCallback:()=>{this.onInactivityPopupButtonPress()}}));const q=at.q.instance.prodigy.gameContainer.get("f71-42eb").getValue("inactivityLogoutTimerSeconds",ot.s.get("GameConstants.Inactivity.LOG_OUT_TIMER_SECONDS"));this.inactiveTimer=window.setTimeout(this.logout.bind(this,!0),1e3*q)}onInactivityPopupButtonPress(){this.isActivityDialogOpen=!1,this.startInactiveTimer()}onPlayerList(q){var K;Q.VyI.log(`playerList ${JSON.stringify(q)}`,Q.$bb.Verbose),this.canUseMultiplayer()&&Q.Aq$.isDefined(null===(K=this.zone)||void 0===K?void 0:K.onPlayerList)&&(this.onPlayerListSignal.dispatch(q),this.zone.onPlayerList(q))}onDisconnect(q,K){Q.VyI.log(`disconnect ${String(K)}`,Q.$bb.Verbose),this.socketConnected=!1,Q.Aq$.isDefined(q)&&q()}onReconnect(){this.socketConnected=!0}onPlayerJoined(q){Q.VyI.log(`join ${q}`,Q.$bb.Verbose),this.canUseMultiplayer()&&this.zone&&(this.onPlayerJoinedSignal.dispatch(q),Q.Aq$.isDefined(this.zone.onPlayerJoined)&&this.zone.onPlayerJoined(q))}onPlayerLeft(q){Q.VyI.log(`left ${q}`,Q.$bb.Verbose),this.canUseMultiplayer()&&this.zone&&(this.onPlayerLeftSignal.dispatch(q),Q.Aq$.isDefined(this.zone.onPlayerLeft)&&this.zone.onPlayerLeft(q))}canUseMultiplayer(){return this.loggedIn&&this.characterProcessed&&this.socketConnected}joinSuccess(q,K){at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.world=q,this.socketConnected=!0,K()}static compressMessage(q,K){const z=[];for(let Y=0;Y(null!==(J=ot.s.get("GameConstants.Debug.GET_CHARACTER_RETRIES"))&&void 0!==J?J:5))return Q.VyI.log("NetworkManager.getCharacter; retried 5 times. Go to failure",Q.$bb.Error),void K();if(Q.Aq$.isDefined(z)&&(0===X||500===X||340===X))return void(this._retryTimer=window.setInterval(z,1e3));const it=new et.i;it.setKey("prodigy_game.APIClient.processCharacterFailed"),it.setValue(1);at.q.instance.prodigy.gameContainer.get("ce3-6d33").logStat(it,tt.d.Increment),Q.VyI.log("Process Character failed.",Q.$bb.Error),this.generalErrorHandler(q,K,X,Z)}versionError(){at.q.instance.prodigy.open.informationDialog(new dt.Z("BUTTON_OKAY_CAPITAL",(()=>{this.logout(!0)}),ct.E.Small,500,"ERROR","NETWORK_OUT_OF_DATE",void 0,void 0,void 0,J.l.ErrorDialogHeader,J.l.ErrorDialogFooter))}processUpdate(q,K){if(this.saving=!1,q||(!Q.Aq$.isDefined(this.updateFailedTime)&&this.loggedIn&&this.characterProcessed&&(this.updateFailedTime=this.timeManager.getLocalTimeMs()),K&&null===this.offlineTimer&&this.loggedIn&&this.characterProcessed&&(this.offlineMessage="NETWORK_LOGGED_IN_ELSEWHERE",this.offlineTimer=this.timeManager.getLocalTimeMs()+5e3),Q.VyI.log("network update fail",Q.$bb.Verbose),this.hasFailedUpdate=!0),q){this.onPlayerSaved.dispatch(),this.updateFailedTime=null,this.lastUpdate=this.timeManager.getLocalTimeMs(),this.processFriendsList=this.hasFailedUpdate,this.hasFailedUpdate=!1;at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player}this.processPlayer=!q}processWorldMessage(q){if("subscribed"===q.type){const q=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this._multiplayerMessageService.updateCachedAppearance(nt.K.getWorldChannelName(this.world.name),q.getID()).catch(Q.RQr.createHandler("Could not send update cached appearance on world join")),this.joinSuccess(this.world,this._multiplayerWorldSuccessHandler)}}processAllWorldSubscriptionError(q){if(q.message===Dt.p.DoesNotExist){at.q.instance.prodigy.gameContainer.get("b0c-9016").createAndJoinWorldChannel(this.world.name,this.processWorldMessage.bind(this),this.processWorldSubscriptionError.bind(this)).catch(Q.RQr.createHandler("Error initializing world"))}else this.processWorldSubscriptionError(q)}processWorldSubscriptionError(q){q.message===Dt.p.Full?this._multiplayerWorldFullErrorHandler():this.onDisconnect(this._multiplayerWorldErrorHandler,"Error Subscribing to world")}processZoneLocationMessage(q){var K;if("broadcastAction"===q.type){let K;switch(q.actionInfo.action){case it.P.FX:K=this.createFXAction(q);break;case it.P.Chat:K=this.createChatAction(q);break;case it.P.HostTeam:K=this.createHostTeamAction(q);break;case it.P.TeamDisbanded:K=this.createTeamDisbandedAction(q);break;case it.P.TeamUpdated:K=this.createTeamUpdateAction(q);break;case it.P.HostHeartbeat:K=this.createCoopHostHeartbeatAction(q);break;case it.P.SyncHealth:K=this.createCoopSyncHealthAction(q);break;case it.P.PlayerAttacked:K=this.createCoopPlayerAttackedAction(q);break;case it.P.TitanAttacked:K=this.createCoopTitanAttackedAction(q);break;case it.P.TitanDefeated:K=this.createCoopTitanDefeatedAction(q);break;case it.P.PlayersDefeated:K=this.createCoopPlayersDefeatedAction(q);break;case it.P.Transform:K=this.createTransformAction(q);break;case it.P.Catapult:K=this.createCatapultAction(q);break;case it.P.Change:K=this.createChangeAction(q);break;case it.P.CoopTeam:K=this.createInfoFromCoopTeamAction(q)}Q.Aq$.isDefined(K)&&this.onMessage(K,!1)}else if("playerMoved"===q.type)this.onMessage(this.createMoveAction(q),!1);else if("userList"===q.type){this.onPlayerList(this.createPlayerList(q));const K=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getID();q.userList.forEach((q=>{if(K.toString()!==q.userID){const K=this.createPlayerJoinedAction({action:it.P.Info,data:q.appearance});this.onMessage(K,!1)}}))}else if("playerJoined"===q.type){this.onPlayerJoined(q.playerInfo.userID);if(at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getID().toString()!==q.playerInfo.userID){const z=this.createPlayerJoinedAction({action:it.P.Info,data:q.playerInfo.appearance});this.onMessage(z,!1),!this.zone||null!==(K=this.zone.autoBroadcastPosition)&&void 0!==K&&!K||this.lastPlayerPositionTimer||(this.lastPlayerPositionTimer=window.setTimeout((()=>this.updatePlayerPositionOnMap()),5e3))}}else"playerLeft"===q.type&&this.onPlayerLeft(q.playerInfo.userID)}createPlayerList(q){return q.userList.map((q=>q.userID))}createMoveAction(q){return{action:Ct.x.Move,data:{userID:parseInt(q.userID,10),target:q.movementInfo}}}createFXAction(q){var K,z;return{action:Ct.x.FX,data:{type:q.actionInfo.type,userID:parseInt(q.userID,10),x:null===(K=q.actionInfo.data)||void 0===K?void 0:K.x,y:null===(z=q.actionInfo.data)||void 0===z?void 0:z.y}}}createHostTeamAction(q){let K,z,Y,X;return Q.Aq$.isDefined(q.actionInfo.data)&&(X=q.actionInfo.data.streak,K=q.actionInfo.data.hostID,z=q.actionInfo.data.teamMembers,Y=q.actionInfo.data.readyMembers),{action:Ct.x.HostTeam,data:{hostID:K,streak:X,readyMembers:Y,teamMembers:z}}}createTeamDisbandedAction(q){let K;return Q.Aq$.isDefined(q.actionInfo.data)&&(K=q.actionInfo.data.hostID),{action:Ct.x.TeamDisbanded,data:{hostID:K}}}createRequestJoinTeamAction(q){let K;return Q.Aq$.isDefined(q.data)&&(K=q.data.userID),{action:Ct.x.RequestJoinTeam,data:{userID:K}}}createTransformAction(q){return{action:Ct.x.Transform,data:{userID:parseInt(q.userID,10),showEffect:q.actionInfo.showEffect,transformID:q.actionInfo.transformID,transformType:q.actionInfo.transformType}}}createJoinTeamAction(q){let K,z,Y,X;return Q.Aq$.isDefined(q.data)&&(Y=q.data.streak,K=q.data.teamMembers,z=q.data.readyMembers,X=q.data.hostID),{action:Ct.x.JoinTeam,data:{hostID:X,streak:Y,teamMembers:K,readyMembers:z}}}createTeamUpdateAction(q){let K,z,Y,X;return Q.Aq$.isDefined(q.actionInfo.data)&&(X=q.actionInfo.data.streak,K=q.actionInfo.data.hostID,z=q.actionInfo.data.teamMembers,Y=q.actionInfo.data.readyMembers),{action:Ct.x.TeamUpdated,data:{hostID:K,streak:X,teamMembers:z,readyMembers:Y}}}createPlayerLeftTeamAction(q){let K;return Q.Aq$.isDefined(q.data)&&(K=q.target),{action:Ct.x.PlayerLeftTeam,data:{userID:q.data.userID}}}createStartCoopTitanMatchAction(q){return{action:Ct.x.StartCoOpTitanMatch,data:q.data}}createCoopHostHeartbeatAction(q){return{action:Ct.x.HostHeartbeat}}createCoopSyncHealthAction(q){return{action:Ct.x.SyncHealth,data:q.actionInfo.data}}createCoopQuestionAnsweredAction(q){let K,z;return Q.Aq$.isDefined(q.data)&&(K=q.data.sourcePlayerID,z=q.data.correct),{action:Ct.x.QuestionAnswered,data:{sourcePlayerID:K,correct:z}}}createCoopPlayerAttackedAction(q){let K,z,Y,X,Z;return Q.Aq$.isDefined(q.actionInfo.data)&&(K=q.actionInfo.data.sourcePlayerID,z=q.actionInfo.data.damage,Y=q.actionInfo.data.titanHealth,X=q.actionInfo.data.spellID,Z=q.actionInfo.data.missed),{action:Ct.x.PlayerAttacked,data:{sourcePlayerID:K,spellID:X,damage:z,titanHealth:Y,missed:Z}}}createCoopTitanAttackedAction(q){let K,z,Y,X;return Q.Aq$.isDefined(q.actionInfo.data)&&(K=q.actionInfo.data.crystalHealth,z=q.actionInfo.data.damage,Y=q.actionInfo.data.spellID,X=q.actionInfo.data.missed),{action:Ct.x.TitanAttacked,data:{crystalHealth:K,spellID:Y,damage:z,missed:X}}}createCoopTitanDefeatedAction(q){return{action:Ct.x.TitanDefeated}}createCoopPlayersDefeatedAction(q){return{action:Ct.x.PlayersDefeated}}createCoopJoinTeamFailedAction(q){let K;return Q.Aq$.isDefined(q.data)&&(K=q.data.reason),{action:Ct.x.JoinTeamFailed,data:{reason:K}}}createCoopRejoinTeamAction(q){let K;return Q.Aq$.isDefined(q.data)&&(K=q.data.userID),{action:Ct.x.PlayerRejoinTeam,data:{userID:K}}}createPlayerJoinedAction(q){return{action:Ct.x.Info,data:q.data}}createCatapultAction(q){return{action:Ct.x.Catapult}}createChangeAction(q){return{action:Ct.x.Change,data:{appearance:q.actionInfo.data.appearance.appearance,equipment:q.actionInfo.data.appearance.equipment,userID:q.actionInfo.data.appearance.userID}}}createInfoFromCoopTeamAction(q){return{action:Ct.x.Info,data:q.actionInfo.data.appearance}}handleNotificationMessages(q){let K;switch(q.action){case st.m.RequestJoinTeam:K=this.createRequestJoinTeamAction(q);break;case st.m.JoinTeam:K=this.createJoinTeamAction(q);break;case st.m.PlayerLeftTeam:K=this.createPlayerLeftTeamAction(q);break;case st.m.StartCoOpTitanMatch:K=this.createStartCoopTitanMatchAction(q);break;case st.m.QuestionAnswered:K=this.createCoopQuestionAnsweredAction(q);break;case st.m.JoinTeamFailed:K=this.createCoopJoinTeamFailedAction(q);break;case st.m.PlayerRejoinTeam:K=this.createCoopRejoinTeamAction(q);break;case st.m.PlayerJoined:}Q.Aq$.isDefined(K)&&this.onMessage(K,!1)}processZoneMapSubscriptionError(q){if(q.message===Dt.p.DoesNotExist){at.q.instance.prodigy.gameContainer.get("b0c-9016").createAndJoinZoneMapChannel(this.world.name,this.zone.zoneName,this.processZoneLocationMessage.bind(this)).catch(Q.RQr.createHandler("Error initializing zone channel"))}else Q.RQr.createHandler("Error Joining Zone")}processZoneMapDisconnection(q){this.socketConnected=!1}processZoneMapReconnection(){this.socketConnected=!0,this.onSocketReconnect.dispatch()}createChatAction(q){return{action:Ct.x.Chat,data:{userID:parseInt(q.userID,10),emoteID:q.actionInfo.emoteID,danceID:q.actionInfo.danceID,chatID:q.actionInfo.chatID}}}fetchStudentData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){let K;switch(q){case At.Q.ELA:K=Et.English;break;case At.Q.Science:K=Et.Science;break;default:case At.Q.Math:K=Et.Math}return this.api.getStudentData(K)}))}get isCurrentlySaving(){return this.saving}};Rt.VERBOSE_ANALYTICS=!1,Rt.emitMessageCount=0,Rt.MESSAGE_SCHEMAS={info:["userID","target.x","target.y","appearance.name","appearance.name.first","appearance.name.middle","appearance.name.last","appearance.name.nick","appearance.gender","appearance.hair.style","appearance.hair.color","appearance.skinColor","appearance.eyeColor","appearance.face","isMember","equipment.boots","equipment.follow","equipment.hat","equipment.outfit","equipment.weapon","data.level","data.win","data.loss","data.gold","data.tower","data.stars","data.hp","data.team","data.allowsHouseVisitors","data.versionID","data.playerTransformation.transformType","data.playerTransformation.transformID","equipment.mount","coOpTeam.hostID","coOpTeam.teamMembers"],catapult:[]},Rt=Tt=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("d73-66e9")),(0,Y.Qj)(1,(0,X.inject)("0f2-d6bd")),(0,Y.Qj)(2,(0,X.inject)("ddf-6c82")),(0,Y.Qj)(3,(0,X.inject)("a92-c640")),(0,Y.Sn)("design:paramtypes",[rt.n,Ot.V,It.p,Object])],Rt)},35564:(q,K,z)=>{"use strict";var Y;z.d(K,{x:()=>Y}),function(q){q.FX="fx",q.Move="move",q.Chat="chat",q.Transform="transform",q.HostTeam="create_co_op_team",q.TeamDisbanded="co_op_team_disbanded",q.TeamUpdated="co_op_team_updated",q.HostHeartbeat="co_op_host_heartbeat",q.SyncHealth="co_op_health_sync",q.PlayerAttacked="player_attacked",q.TitanAttacked="titan_attacked",q.TitanDefeated="titan_defeated",q.PlayersDefeated="players_defeated",q.Catapult="catapult",q.Change="change",q.Info="info",q.CoopTeam="coopTeam",q.RequestJoinTeam="request_co_op_team_join",q.JoinTeam="join_co_op_team",q.PlayerLeftTeam="co_op_player_left_team",q.StartCoOpTitanMatch="start_co_op_titan",q.QuestionAnswered="question_answered",q.JoinTeamFailed="join_co_op_team_failed",q.PlayerRejoinTeam="co_op_player_rejoin_team"}(Y||(Y={}))},81623:(q,K,z)=>{"use strict";z.d(K,{u:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(35120),tt=z(98252);let et=Y=class{constructor(){this._isServiceWorkerRegistered=!1,this._initComplete=!1}init(){if(this._initComplete)X.VyI.log("Error at ProgressiveWebAppInstallerService#init. Initialization should only run once.",X.$bb.Error);else{if(!this.isPlatformSupported())return void(this._initComplete=!0);"ServiceWorkerRegistration"in window?navigator.serviceWorker.getRegistration().then((q=>{q&&(this._isServiceWorkerRegistered=!0),this._initComplete=!0})).catch((()=>{X.VyI.log("CLIENT: Error at service worker getRegistration.",X.$bb.Error)})):this._initComplete=!0}}registerServiceWorker(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this.isPlatformSupported())return!1;if("ServiceWorkerRegistration"in window){X.VyI.log("CLIENT: service worker registration started.",X.$bb.Verbose);const q=J.q.instance.prodigy.gameContainer.get("ddf-6c82").getServiceWorkerPath(Y.SERVICE_WORKER_FILE_NAME);let K;return yield navigator.serviceWorker.register(q).then((()=>{X.VyI.log("CLIENT: service worker registration COMPLETE.",X.$bb.Verbose),this._isServiceWorkerRegistered=!0,K=!0}),(()=>{X.VyI.log("CLIENT: service worker registration FAILED.",X.$bb.Verbose),K=!1})).catch((()=>{X.VyI.log("CLIENT: service worker registration ERROR.",X.$bb.Verbose)})),K}return X.VyI.log("CLIENT: service worker is NOT supported.",X.$bb.Verbose),!1}))}promptInstall(){return(0,Q.sH)(this,void 0,void 0,(function*(){let q="error";return Y.PWA_BEFORE_INSTALL_DEFERRED_EVENT&&this.isPlatformSupported()&&(yield Y.PWA_BEFORE_INSTALL_DEFERRED_EVENT.prompt(),yield Y.PWA_BEFORE_INSTALL_DEFERRED_EVENT.userChoice.then((K=>{"accepted"===K.outcome?q="accepted":"dismissed"===K.outcome&&(q="dismissed"),Y.PWA_BEFORE_INSTALL_DEFERRED_EVENT=null})).catch((()=>{q="error"}))),q}))}isServiceWorkerRegistered(){return this._initComplete?this._isServiceWorkerRegistered:(X.VyI.log("Error at ProgressiveWebAppInstallerService#isServiceWorkerRegistered. Initialization not complete.",X.$bb.Error),!1)}isPWAInstalled(){if(this._initComplete){if(this._isServiceWorkerRegistered&&null===Y.PWA_BEFORE_INSTALL_DEFERRED_EVENT)return!0}else X.VyI.log("Error at ProgressiveWebAppInstallerService#isPWAInstalled. Initialization not complete.",X.$bb.Error);return!1}isPlatformSupported(){return!tt.pF.isNativeApp()&&!X.o5U.isMobile()&&X.o5U.isChrome()}};et.PWA_BEFORE_INSTALL_DEFERRED_EVENT=null,et.PWA_INSTALLED_DURING_CURRENT_SESSION=!1,et.SERVICE_WORKER_FILE_NAME="service-worker",et=Y=(0,Q.Cg)([(0,Z.injectable)()],et),window.addEventListener("beforeinstallprompt",(q=>{et.PWA_BEFORE_INSTALL_DEFERRED_EVENT=q})),window.addEventListener("appinstalled",(()=>{et.PWA_INSTALLED_DURING_CURRENT_SESSION=!0}))},29044:(q,K,z)=>{"use strict";z.d(K,{F:()=>tt});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(35120);let tt=Y=class{constructor(){this._currentPermissionState=null}registerServiceWorkerForFirebase(){return(0,Q.sH)(this,void 0,void 0,(function*(){if("ServiceWorkerRegistration"in window){const q=J.q.instance.prodigy.gameContainer.get("ddf-6c82").getServiceWorkerPath(Y._SERVICE_WORKER_FILE_NAME);let K;return yield navigator.serviceWorker.register(q).then((()=>{X.VyI.log("CLIENT: Firebase service worker registration COMPLETE.",X.$bb.Verbose),K=!0}),(()=>{X.VyI.log("CLIENT: Firebase service worker registration FAILED.",X.$bb.Verbose),K=!1})).catch((()=>{X.VyI.log("CLIENT: Firebase service worker registration ERROR.",X.$bb.Verbose)})),K}return X.VyI.log("CLIENT: Firebase service worker is NOT supported.",X.$bb.Verbose),!1}))}notificationPermissionRequest(){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!("Notification"in window))return void X.VyI.log("Notification API not supported",X.$bb.Verbose);let q;return this._currentPermissionState=Notification.permission,yield Notification.requestPermission().then((K=>{X.VyI.log(`Notification requestPermission option selected: ${K}`,X.$bb.Verbose),this._currentPermissionState!==K?(this._currentPermissionState=K,q={hasChanged:!0,status:this._currentPermissionState}):q={hasChanged:!1,status:this._currentPermissionState}})).catch((q=>{X.VyI.log(`Notification requestPermission error: ${q}`,X.$bb.Verbose)})),q}))}};tt._SERVICE_WORKER_FILE_NAME="firebase-messaging-sw",tt=Y=(0,Q.Cg)([(0,Z.injectable)()],tt)},35537:(q,K,z)=>{"use strict";z.d(K,{Gq:()=>tt,JN:()=>it,sE:()=>et,zj:()=>st});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(95891),J=z.n(Z);const tt=Symbol("NETWORK_SIDE_EFFECT_HANDLER"),et=Symbol("INetworkSideEffectHandler.key"),it=Symbol("INetworkSideEffectHandler.consume");let st=class{broadcast(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=J().groupBy(this._handlers,et);yield Promise.all(Object.entries(q).map((q=>(0,Y.sH)(this,[q],void 0,(function*([q,z]){try{const Y=K[q][0];yield Y[it](z)}catch(Y){Q.RQr.logError(Y,`Error running ${q} side effect handler`)}})))))}))}processEnvelope(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return"object"==typeof q&&"$sideEffects"in q&&"$data"in q?(yield this.broadcast(q.$sideEffects),q.$data):q}))}};(0,Y.Cg)([(0,X.multiInject)(tt),(0,Y.Sn)("design:type",Array)],st.prototype,"_handlers",void 0),st=(0,Y.Cg)([(0,X.injectable)()],st)},69698:(q,K,z)=>{"use strict";z.d(K,{V:()=>Z});var Y=z(8674),Q=z(62459),X=z(79687);let Z=class{constructor(){this.isServerDeltaSet=!1,this.serverTimeDeltaMs=0,this._timezoneOffset=null}getIsServerDeltaSet(){return this.isServerDeltaSet}setServerTime(q){const K=this.getLocalTimeMs();this.serverTimeDeltaMs=q-K,this.isServerDeltaSet=!0}getServerTimeMs(){return this.isServerDeltaSet||Q.VyI.log("Server time has not been set yet.",Q.$bb.Warning),this.getLocalTimeMs()+this.serverTimeDeltaMs}getLocalTimeMs(){return Date.now()}getServerTimeDeltaMs(){return this.serverTimeDeltaMs}getUTCOffset(){return Q.Aq$.isDefined(this._timezoneOffset)||(this._timezoneOffset=(new Date).getTimezoneOffset()),this._timezoneOffset}};Z=(0,Y.Cg)([(0,X.injectable)()],Z)},21314:(q,K,z)=>{"use strict";z.d(K,{p:()=>et});var Y=z(8674),Q=z(62459),X=z(79687),Z=z(86663),J=z(34829),tt=z(52498);let et=class{constructor(q){this.environmentProvider=null,this.environmentProvider=q}getRootUrl(){var q,K;switch(this.environmentProvider.getCurrentEnvironment()){case tt.h.Production:return"https://www.prodigygame.com";case tt.h.Staging:case tt.h.QABox:return null!==(K=null===(q=window.gameEnvironmentVariables)||void 0===q?void 0:q.webRootUrl)&&void 0!==K?K:"https://www.prodigygame.org";case tt.h.Dev:default:return"https://www.prodigygame.net"}}getAPIRootUrl(){switch(this.environmentProvider.getCurrentEnvironment()){case tt.h.Production:return"https://api.prodigygame.com";case tt.h.Staging:return"https://api.prodigygame.org";case tt.h.Dev:return"https://api.prodigygame.net";case tt.h.QABox:case tt.h.Local:const q=Z.qg(window.location.search);return Q.Aq$.isDefined(q.env)&&q.env.indexOf("-qa")>-1?`https://api.${q.env}.prodigygame.${Q.Aq$.isDefined(q.boxEnv)?q.boxEnv:"org"}`:`https://${window.location.host}`;default:return""}}getMatcherApiRootUrl(){var q,K;return null!==(K=null===(q=window.gameEnvironmentVariables)||void 0===q?void 0:q.matcherApiRootUrl)&&void 0!==K?K:this.getMultiplayerRootURL()}getCDNRootUrl(){return"https://cdn.prodigygame.com"}getLoaderUrl(){return this.getAPIRootUrl()}getCortexRootURL(){var q,K,z;return null!==(z=null!==(K=null===(q=window.gameEnvironmentVariables)||void 0===q?void 0:q.cortexRootUrl)&&void 0!==K?K:J.A.get("GameConstants.Network.CORTEX_ROOT"))&&void 0!==z?z:this.getLoaderUrl()}getMultiplayerRootURL(){var q,K;return null!==(K=null===(q=window.gameEnvironmentVariables)||void 0===q?void 0:q.multiplayerRootUrl)&&void 0!==K?K:this.getCortexRootURL()}getIdentityUrl(){switch(this.environmentProvider.getCurrentEnvironment()){case tt.h.Production:return"https://sso.prodigygame.com";case tt.h.Staging:case tt.h.QABox:return"https://sso.prodigygame.org";case tt.h.Dev:default:return"https://sso.prodigygame.net"}}getWorkerPath(q){const K=this.environmentProvider.getCurrentEnvironmentByHost(),z=window.gameCodeFile?window.gameCodeFile.replace("code.prodigygame.",`${window.location.hostname.split(".")[0]}.prodigygame.`):"../bin/",Y=Math.max(z.lastIndexOf("/"),z.lastIndexOf("\\"));return`${`${Y>=0?z.substr(0,Y+1):z}workers/`}${q}.${K===tt.h.Local||window.location.origin.indexOf("localhost")>-1?"js":"min.js"}${K===tt.h.Production?"":`?v=${Date.now()}`}`}getServiceWorkerPath(q){const K=this.environmentProvider.getCurrentEnvironmentByHost();return K===tt.h.Local?`/${q}.js`:K===tt.h.QABox?`${this.getLoaderUrl()}/Play/${q}.js`:`/${q}.js`}getAnswerURL(){let q=this.environmentProvider.getCurrentEnvironment();if(q===tt.h.QABox){const K=window.location.host;q=K.indexOf(".com")>-1?tt.h.Production:K.indexOf(".org")>-1||K.indexOf(".run")>-1?tt.h.Staging:tt.h.Dev}switch(q){case tt.h.Production:return"https://answers-v1.prodigygame.com";case tt.h.Staging:return"https://answers-v1.prodigygame.org";case tt.h.Dev:return"https://answers-v1.prodigygame.net";default:return""}}getParentAttachURL(){return`${this.getRootUrl()}/parent/onboarding/`}getMembershipUpgradeUrl(q){return`${this.getRootUrl()}/membership-management/upgrade/${q}/plan-selection/`}getOtpUrl(q){const K=encodeURIComponent(JSON.stringify({priceOptions:q}));return`${this.getRootUrl()}/Memberships/purchase/otp/selection/?options=${K}`}getUuidUrl(){return`${this.getRootUrl()}/Memberships/api/game-uuid/`}getArcadiaLauncherUrl(){switch(this.environmentProvider.getCurrentEnvironment()){case tt.h.Production:return"https://games.prodigygame.com";case tt.h.Staging:case tt.h.QABox:return"https://games.prodigygame.org";case tt.h.Dev:default:return"https://games.prodigygame.net"}}};et=(0,Y.Cg)([(0,X.injectable)(),(0,Y.Qj)(0,(0,X.inject)("92f-3441")),(0,Y.Sn)("design:paramtypes",[Object])],et)},20352:(q,K,z)=>{"use strict";z.d(K,{j:()=>it});var Y=z(8674),Q=z(79687),X=z(99625),Z=z(35120),J=z(21397),tt=z(53661),et=z(80060);let it=class{constructor(){this._iframeOpenOrLoading=!1}canOpenIframe(){return!this._iframeOpenOrLoading}flagIframeClosed(){this._iframeOpenOrLoading=!1}createIFrame(q,K){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z=X.l.IFrameModal){if(!this.canOpenIframe())return null;this._iframeOpenOrLoading=!0;const Y=(yield et.d.loadWithInjectedValuesAndDependenciesFromGUID(Z.q.instance.prodigy.gameContainer.get("983-05a7"),z,{[tt.n7.IFrameSource]:q,[tt.n7.IFrameClosePostMessage]:K})).findComponent(J.w);return Y.onIFrameClosed.addOnce((()=>this.flagIframeClosed())),Y.GameObject.onDestroy.addOnce((()=>this.flagIframeClosed())),Y}))}};it=(0,Y.Cg)([(0,Q.injectable)()],it)},64582:(q,K,z)=>{"use strict";z.d(K,{O:()=>et});var Y,Q=z(8674),X=z(62459),Z=z(79687),J=z(76572),tt=z(21314);let et=Y=class{constructor(q,K,z){this.httpClient=q,this.featureFlags=K,this._urlProvider=z}getData(){return(0,Q.sH)(this,void 0,void 0,(function*(){return this.getDataAndCache()}))}spoofIp(q){return(0,Q.sH)(this,void 0,void 0,(function*(){return X.Aq$.isDefined(this.fetchPromise)&&(yield this.fetchPromise,this.fetchPromise=null),this.cachedGeolocationData&&(this.cachedGeolocationData=null),this.getDataAndCache(q)}))}getDataAndCache(q){return(0,Q.sH)(this,void 0,void 0,(function*(){if(!this.featureFlags.getValue("enableGeolocationService",!0))return[new J._("Geolocation Service is disabled"),null];if(!this.cachedGeolocationData){X.Aq$.isDefined(this.fetchPromise)||(this.fetchPromise=this.fetchGeolocationData(q));const[K,z]=yield this.fetchPromise;if(this.fetchPromise=null,K)return[K,null];this.cachedGeolocationData=z}return[null,this.cachedGeolocationData]}))}fetchGeolocationData(q){return(0,Q.sH)(this,void 0,void 0,(function*(){const K=this._urlProvider.getLoaderUrl();let z=Y.BASE_URL;X.Aq$.isDefined(q)&&(z+=`?ip=${q}`);const Q=new X.u1k;Q.setMethod(X.iXQ.Get).setBaseURI(K).setRequestURI(z).addResponseInterceptor(X.XKG.convertToJson);const Z=yield this.httpClient.sendRequest(Q);return Z.wasSuccessful()?[null,Z.getData()]:[new J._(Z.getErrorMessage()),null]}))}static GeolocationDataToIGeolocationMetadata(q){if(!q)return null;const K={country:q.country?q.country.name:null,city:null,time_zone:q.time_zone,subdivisions:q.subdivisions?q.subdivisions.map(((q,K,z)=>q.name)):null};return X.Aq$.isDefined(K.country)&&(X.Aq$.isDefined(K.city)||X.Aq$.isDefined(K.time_zone)||X.Aq$.isDefined(K.subdivisions)&&!(K.subdivisions.length<=0))?K:null}};et.BASE_URL="geolocation-api/v1",et=Y=(0,Q.Cg)([(0,Z.injectable)(),(0,Q.Qj)(0,(0,Z.inject)("429-aba2")),(0,Q.Qj)(1,(0,Z.inject)("f71-42eb")),(0,Q.Qj)(2,(0,Z.inject)("ddf-6c82")),(0,Q.Sn)("design:paramtypes",[Object,Object,tt.p])],et)},46014:(q,K,z)=>{"use strict";var Y;z.d(K,{R:()=>Y}),function(q){q.BattlePass="BattlePassMailExtension",q.Titan="TitanMailExtension",q.Popup="PopupMailExtension",q.Prefab="OpenPrefabMailExtension"}(Y||(Y={}))},83634:(q,K,z)=>{"use strict";z.d(K,{Z:()=>Z});var Y=z(8674),Q=z(48417),X=z(67238);class Z extends X.D{getRewardStatus(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.call(Q.D.AfterSchoolWidget.GetRewardsStatus,{},!0)}))}claimReward(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.call(Q.D.AfterSchoolWidget.ClaimReward,{rewardType:q},!0)}))}resetState(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.call(Q.D.AfterSchoolWidget.ResetState,{rewardType:q},!0)}))}}},35571:(q,K,z)=>{"use strict";z.d(K,{e:()=>et});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(1195),J=z(13956),tt=z(76546);let et=class extends tt.D{GetChargedLevelProgressData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.ChargedLevels.GetChargedLevelProgressData,{},!1)}))}sendTutorialReminderMailer(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.ChargedLevels.SendTutorialReminderMailer,{})}))}awardMemberOnlyChargedLevelXp(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=this._player.getUserID().toString();return this.makeCloudscriptRequest(X.D.ChargedLevels.AwardMemberOnlyChargedLevelXp,{userId:K,xpAmount:Math.round(q)})}))}abandonChargedLevelLosses(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.ChargedLevels.AbandonChargedLevelLosses,{},!1)}))}recuperateChargedLevelLosses(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.ChargedLevels.RecuperateChargedLevelLosses,{},!1)}))}updateDecayImmunity(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.ChargedLevels.UpdateDecayImmunity,{},!1)}))}debugSetChargedLevel(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.ChargedLevels.Debug.SetChargedLevel,{level:q},!1)}))}clearChargedLevelData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.ChargedLevels.ClearChargedLevelData,{},!1)}))}};(0,Y.Cg)([(0,J.b)("ad2-c5b2"),(0,Y.Sn)("design:type",Z.E)],et.prototype,"_player",void 0),et=(0,Y.Cg)([(0,Q.injectable)()],et)},55328:(q,K,z)=>{"use strict";z.d(K,{v:()=>et});var Y=z(8674),Q=z(62459),X=z(88225),Z=z(48417),J=z(88131),tt=z(76546);class et extends tt.D{debugAddDefeatedPets(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(Z.D.DynamicStore.Debug.AddDefeatedPet,{idsToAdd:q})).updated}))}debugRemoveDefeatedPets(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(Z.D.DynamicStore.Debug.RemoveDefeatedPet,{handlesToRemove:q})).updated}))}debugListDefeatedPets(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(Z.D.DynamicStore.Debug.ListDefeatedPets,{})).updated}))}debugClearDefeatedPets(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(Z.D.DynamicStore.Debug.ClearDefeatedPets,{})}))}debugResetStoreProgress(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(Z.D.DynamicStore.Debug.ResetStoreProgress,{})}))}purchaseItem(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(Z.D.DynamicStore.PurchaseItem,{taskId:q,analyticsTransactionId:K})).questProgress}))}getStoreOffers(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=yield this.makeCloudscriptRequest(Z.D.DynamicStore.GetStore,{store:q});return J.Q.fromJSON(K)}))}getStoreConfigurationEntity(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Z.D.DynamicStore.GetStoreConfiguration,{})}))}getNextSectionExpiry(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(Z.D.DynamicStore.GetNextSectionExpiry,{})).expiryTime}))}getRestrictionOffer(q){return(0,Y.sH)(this,void 0,void 0,(function*(){try{const K=yield this.makeCloudscriptRequest(Z.D.Restrictions.GetRestrictionOffers,{restrictionIds:[q]});if(K.offers.length>0)return K.offers[0]}catch(K){X.captureException(K),Q.RQr.logError(K,"Error fetching restriction offer")}}))}markFreeRestrictionOfferClaimed(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Z.D.Restrictions.MarkFreeRestrictionOfferClaimed,{})}))}getHudWidgetItems(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(Z.D.DynamicStore.GetHudWidgetItems,{})}))}}},7001:(q,K,z)=>{"use strict";z.d(K,{W:()=>Z});var Y=z(8674),Q=z(48417),X=z(67238);class Z extends X.D{getFeaturedSpawnData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.call(Q.D.FeaturedSpawn.GetConfig,{},!0)}))}}},47968:(q,K,z)=>{"use strict";z.d(K,{b:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(67238);let J=class extends Z.D{spend(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.call(X.D.HardCurrency.Spend,{value:q,analyticsTransactionId:K},!0)}))}grantCaptureTutorialMagicoin(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.call(X.D.HardCurrency.GrantCaptureTutorialMagicoin,{analyticsTransactionId:q},!0)}))}claimAllowances(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.call(X.D.HardCurrency.ClaimAllowances,{keys:q,analyticsTransactionId:K},!0)}))}getAllowanceClaimData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.call(X.D.HardCurrency.GetAllowanceClaimData,{findAll:!0},!0)}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},88061:(q,K,z)=>{"use strict";z.d(K,{o:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546);let J=class extends Z.D{fetchOptions(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.OTP.FetchOptions,{storeName:q})}))}collectPurchasedItems(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(X.D.OTP.CollectPurchasedItems,{transactions:q})).result}))}updatePurchaseHistory(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(X.D.OTP.UpdatePurchaseHistory,{amount:q})}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},60126:(q,K,z)=>{"use strict";z.d(K,{L:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546);let J=class extends Z.D{getOwnedPetGear(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.PetGearInventory.ListItem,null!=q?q:{},!1)}))}markGearAsSeen(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=Array.isArray(q)?q:[q];return this.makeCloudscriptRequest(X.D.PetGearInventory.SeenItem,{items:K},!1)}))}removeGearFromInventory(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.PetGearInventory.DeleteItems,q,!1)}))}addGearToInventory(q){return(0,Y.sH)(this,void 0,void 0,(function*(){0}))}clearAllPetGear(){return(0,Y.sH)(this,void 0,void 0,(function*(){0}))}getPetGearAdGifts(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.PetGearInventory.ReceiveAdGift,{},!1)}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},65933:(q,K,z)=>{"use strict";z.d(K,{Y:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546);let J=class extends Z.D{getPetInventoryData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.PetInventory.GetPetInventoryData,{},!1)}))}updateSlots(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(X.D.PetInventory.UpdateSlots,{reason:q},!1)}))}setSlots(q){return(0,Y.sH)(this,void 0,void 0,(function*(){0}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},38560:(q,K,z)=>{"use strict";z.d(K,{B:()=>nt});var Y=z(8674),Q=z(79687),X=z(24652),Z=z(90633),J=z(48417),tt=z(74958),et=z(67665),it=z(13956),st=z(76546);let nt=class extends st.D{getInventory(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(J.D.Rifts.GetInventory,{riftKeyId:q},!1)}))}startRiftRun(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){this._segment.rifts.generateRiftRunUuids();const Y=this._segment.item.beginSecureItemTransaction();yield this.makeCloudscriptRequest(J.D.Rifts.StartRiftRun,{riftTier:q,riftRunSegmentUuid:this._segment.rifts.riftRunUuid,roundOneSegmentUuid:this._segment.rifts.riftRunRoundUuid},!1),tt.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(tt.fk.RiftsStartFirstRiftRun,Z.B.BREADCRUMB_RIFTS_STARTED_FIRST_RIFT_RUN);const Q=this._segment.rifts.getRiftTransactionData();this._segment.rifts.sendRiftRunStartedEvent(q,K,z,Q.transaction_id),Y.flush(Q)}))}startRiftRunDebug(q){return(0,Y.sH)(this,arguments,void 0,(function*(q,K="enemy-hp-buff",z=1,Y=X.cn.Normal){this._segment.rifts.generateRiftRunUuids(),yield this.makeCloudscriptRequest(J.D.Rifts.Debug.SetRiftRunDebug,{riftStartingNerf:q,riftStartingBuff:K,currentRiftTier:z,riftType:Y,riftRunSegmentUuid:this._segment.rifts.riftRunUuid,roundOneSegmentUuid:this._segment.rifts.riftRunRoundUuid},!1)}))}rerollRiftBuffModifier(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(J.D.Rifts.RerollRiftBuffModifier,{riftTier:q},!1)}))}rerollRiftOpponents(){return(0,Y.sH)(this,void 0,void 0,(function*(){const q=this._segment.item.beginSecureItemTransaction();yield this.makeCloudscriptRequest(J.D.Rifts.RerollRiftOpponents,{},!1);const K=this._segment.rifts.getRiftTransactionData();q.flush(K)}))}startBossRift(q,K){return(0,Y.sH)(this,void 0,void 0,(function*(){const z=yield this.makeCloudscriptRequest(J.D.Rifts.StartBossRift,{riftTier:q,bossType:K},!1);return tt.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(tt.fk.RiftsStartBossRift,Z.B.BREADCRUMB_RIFTS_STARTED_FIRST_BOSS_RIFT),this._segment.rifts.sendBossRiftStartedEvent(),z}))}resetRiftRun(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(J.D.Rifts.ResetRiftRun,{},!0)}))}updateTierUnlockProgress(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(J.D.Rifts.UpdateTierUnlockProgress,{},!0)}))}getRiftsTierData(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(J.D.Rifts.GetTierData,{selectedPortalId:q},!1)}))}getRiftsConfig(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(J.D.Rifts.GetConfig,{},!1)}))}getSelectedPortalId(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(J.D.Rifts.GetSelectedPortal,{},!1)).currentPortalId}))}updateSelectedPortal(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(J.D.Rifts.UpdateSelectedPortal,{selectedPortalId:q},!0)}))}attemptSecureUnlockNextRiftTier(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(J.D.Rifts.AttemptSecureUnlockNextRiftTier,{selectedPortalId:q},!0)}))}reuseRiftPet(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(J.D.Rifts.ReuseRiftPet,{petId:q},!0)}))}expireRiftPetCooldown(q){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(J.D.Rifts.ExpireRiftPetCooldown,{petId:q},!0)}))}getFirstTimeRewardsData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(J.D.Rifts.GetFirstTimeRewardsData,{},!1)).firstTimeRewardsData}))}updateRiftsConfigVersion(){return(0,Y.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(J.D.Rifts.UpdateRiftsConfigVersion,{},!1)}))}};(0,Y.Cg)([(0,it.b)("20f-5f67"),(0,Y.Sn)("design:type",et.Y)],nt.prototype,"_segment",void 0),nt=(0,Y.Cg)([(0,Q.injectable)()],nt)},59219:(q,K,z)=>{"use strict";z.d(K,{E:()=>st});var Y,Q,X=z(8674),Z=z(79687),J=z(76546),tt=z(80403),et=z(48417),it=z(15821);!function(q){q.NEAR_RANKINGS="NEAR_RANKINGS",q.TOP_RANKINGS="TOP_RANKINGS"}(Q||(Q={}));let st=Y=class extends J.D{isEligibleForMenu(){return(0,X.sH)(this,void 0,void 0,(function*(){var q,K,z,Q,X,Z,J,tt,et,st;const nt=yield this._graphQL.sendRequest(Y.STATE_CHALLENGES_CLASS_OPTED_OUT);return null!==(st=!(null===(Q=null===(z=null===(K=null===(q=nt.data)||void 0===q?void 0:q.viewer)||void 0===K?void 0:K.currentClassroom)||void 0===z?void 0:z.node)||void 0===Q?void 0:Q.isOptedOutOfStateChallenge)&&it.A.isDefined(null===(et=null===(tt=null===(J=null===(Z=null===(X=nt.data)||void 0===X?void 0:X.viewer)||void 0===Z?void 0:Z.currentClassroom)||void 0===J?void 0:J.node)||void 0===tt?void 0:tt.currentProdigyCup)||void 0===et?void 0:et.tier))&&void 0!==st&&st}))}fetchStateChallengesData(){return(0,X.sH)(this,void 0,void 0,(function*(){return this._graphQL.sendRequest(Y.STATE_CHALLENGES_QUERY)}))}getStateChallengeGoalsData(q){return(0,X.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(et.D.StateChallenge.GetStateChallengeGoalsData,{params:q},!1)).goalsData}))}claimStateChallengeGoalsRewards(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(et.D.StateChallenge.ClaimStateChallengeGoalsRewards,{id:q,params:K},!1)}))}claimPreviousStateChallengeGoalsRewards(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(et.D.StateChallenge.ClaimPreviousStateChallengeGoalsRewards,Object.assign({params:q},void 0!==K&&{id:K}),!1)}))}hasUnclaimedPreviousStateChallengeGoalsRewards(q){return(0,X.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(et.D.StateChallenge.HasUnclaimedPreviousStateChallengeGoalsRewards,{params:q},!1)}))}getEndOfChallengeRewards(q,K){return(0,X.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(et.D.StateChallenge.GetEndOfChallengeRewards,{rank:q,correctAnswers:K},!1)}))}getRewardsGrantingPeriodEndDate(q){return(0,X.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(et.D.StateChallenge.GetRewardsGrantingPeriodEndDate,{competition:q},!1)}))}getProdigyCupConfigData(){return(0,X.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(et.D.StateChallenge.GetProdigyCupConfigData,{},!1)}))}};st.STATE_CHALLENGES_QUERY="\n query stateChallengesQuery {\n viewer {\n id\n username\n currentClassroom {\n node {\n id\n classroomMonthlyLeaderboard {\n currentLeaderboard {\n node {\n leaderboard {\n nodes {\n correctAnswers\n displayName\n rank\n }\n }\n currentClassroom {\n node {\n correctAnswers\n displayName\n rank\n rankDeltaValue\n }\n }\n }\n }\n }\n currentProdigyCup {\n tier\n finalsPhase {\n competition\n startDate\n endDate\n lastUpdated\n currentFinalsSchoolEntry {\n correctAnswers\n displayName\n rank\n schoolId\n }\n leaderboard {\n correctAnswers\n displayName\n rank\n schoolId\n }\n }\n stateChallengesPhase {\n startDate\n endDate\n lastUpdated\n nationalCupQualificationDate\n stateChallengeWinnerDate\n currentStateChallenge {\n node {\n topRankings: leaderboard(leaderboardType: TOP_RANKINGS) {\n nodes {\n correctAnswers\n displayName\n rank\n schoolId\n }\n }\n nearRankings: leaderboard(leaderboardType: NEAR_RANKINGS) {\n nodes {\n correctAnswers\n displayName\n rank\n schoolId\n }\n }\n currentSchool {\n node {\n correctAnswers\n displayName\n schoolId\n rank\n }\n }\n }\n }\n stateChallenges {\n\t\t\t\t\t\t\t\t\tnodes {\n month\n\t\t\t\t\t\t\t\t\t\tcurrentSchool {\n\t\t\t\t\t\t\t\t\t\t\tnode {\n rank\n\t\t\t\t\t\t\t\t\t\t\t\tcorrectAnswers\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n }\n }\n }\n ",st.STATE_CHALLENGES_SCHOOL_RANK_ONLY_QUERY="\n query stateChallengesSchoolRankQuery {\n viewer {\n id\n username\n currentClassroom {\n node {\n id\n currentProdigyCup {\n stateChallengesPhase {\n currentStateChallenge {\n node {\n currentSchool {\n node {\n rank\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ",st.STATE_CHALLENGES_CLASS_OPTED_OUT="\n query stateChallengesClassOptedOut {\n viewer {\n id\n username\n currentClassroom {\n node {\n isOptedOutOfStateChallenge\n currentProdigyCup {\n tier\n }\n }\n }\n }\n }\n ",(0,X.Cg)([(0,Z.inject)("800-a786"),(0,X.Sn)("design:type",tt.K)],st.prototype,"_graphQL",void 0),st=Y=(0,X.Cg)([(0,Z.injectable)()],st)},70330:(q,K,z)=>{"use strict";z.d(K,{d:()=>ht,p:()=>Q});var Y,Q,X=z(8674),Z=z(79600),J=z(3332),tt=z(62459),et=z(79687),it=z(95891),st=z(48417),nt=z(59287),at=z(35120),rt=z(34829),ot=z(37251);!function(q){q.DoesNotExist="Channel does not exist",q.Full="Channel is full"}(Q||(Q={}));let ht=Y=class{constructor(){this.onError=new tt.HN0,this.onNotificationReceived=new tt.HN0,this._onSubscribeLocationError=new tt.HN0,this._onSubscribeWorldError=new tt.HN0,this._onSubscribeFeatureError=new tt.HN0,this._onDisconnection=new tt.HN0,this._onReconnection=new tt.HN0,this._worldChannel=null,this._featureChannels={}}connect(){return(0,X.sH)(this,void 0,void 0,(function*(){if(this._multiplayer)return;const q=at.q.instance.prodigy.gameContainer.get("ddf-6c82"),K=new J.Multiplayer(`${ot.X.CLIENT_ID}`,q.getMultiplayerRootURL());this._multiplayer=K,K.connect(),K.enableMoveOnAreaPerChannel(),yield K.authenticate(this._catalyst.authHandler.getJWT()),K.generalError((q=>this.onError.dispatch(q))).catch(tt.RQr.createHandler("Error in the multiplayer error callback")),K.subscribeFailError(this.onSubscribeFailError.bind(this)).catch(tt.RQr.createHandler("Error in subscribeFailError")),K.onReconnect((()=>this._onReconnection.dispatch())).catch(tt.RQr.createHandler("Error in onReconnect")),K.disconnectError((()=>this._onDisconnection.dispatch())).catch(tt.RQr.createHandler("Error in onDisconnection")),K.addNotificationListener((q=>{"notification"===q.type?this.onNotificationReceived.dispatch(q.notificationInfo):"playerJoined"===q.type?this.onNotificationReceived.dispatch({notificationInfo:q.playerInfo.appearance,action:"player_joined",target:q.playerInfo.userID}):tt.VyI.log(`Notification received with invalid message type ${q.type}`,tt.$bb.Error)})).catch(tt.RQr.createHandler("Error in notification listener"))}))}joinLocationChannel(q,K,z,Y,Q,Z){return(0,X.sH)(this,void 0,void 0,(function*(){yield this.connect();const X=this.createVerboseMessageProcessor(q,K);yield this.leaveLocationChannel().catch(tt.RQr.createHandler("Error leaving channel")),this._multiplayer.userListReceiver((K=>{K.channel!==q&&K.channel!==this.getChannelName(q)||X(Object.assign(Object.assign({},K),{type:"userList"}))})).catch(tt.RQr.createHandler("Error in user list receiver")),z&&(this.onError.add(z,this.joinLocationChannel),this._onSubscribeLocationError.add(z,this.joinLocationChannel)),Y&&this._onDisconnection.add(Y,this.joinLocationChannel),Q&&this._onReconnection.add(Q,this.joinLocationChannel),this._channelSubscriptionCallback=[`${ot.X.CLIENT_ID}-${q}`,Z],this._multiplayer.subscribe(q,X).catch(tt.RQr.createHandler("Error in channel subscription")),this._locationChannel=q}))}leaveLocationChannel(){return(0,X.sH)(this,void 0,void 0,(function*(){if(tt.Aq$.isDefined(this._locationChannel)){const q=this._locationChannel;this._locationChannel=null,yield this._multiplayer.unsubscribe(q),this.onError.removeAll(this.joinLocationChannel),this._onSubscribeLocationError.removeAll(this.joinLocationChannel),this._onDisconnection.removeAll(this.joinLocationChannel),this._onReconnection.removeAll(this.joinLocationChannel)}}))}joinWorldChannel(q,K,z){return(0,X.sH)(this,arguments,void 0,(function*(q,K,z,Y=!1){const Q=nt.K.getWorldChannelName(q);if(Q===this._worldChannel&&!Y)return;const X=this.createVerboseMessageProcessor(q,K);yield this.connect(),yield this.leaveWorldChannel().catch(tt.RQr.createHandler("Error world leaving channel")),this._multiplayer.subscribedReceiver((q=>{var K;q.channel!==Q&&q.channel!==this.getChannelName(Q)||X(Object.assign(Object.assign({},q),{type:"subscribed"})),(null===(K=this._channelSubscriptionCallback)||void 0===K?void 0:K[1])&&this._channelSubscriptionCallback[0]===q.channel&&(this._channelSubscriptionCallback[1](q),this._channelSubscriptionCallback=void 0)})).catch(tt.RQr.createHandler("Error in subscribed receiver")),this._onSubscribeWorldError.add(z,this.joinWorldChannel);try{this._multiplayer.subscribe(Q,X).catch(tt.RQr.createHandler("Error subscribing to world channel"))}catch(Z){return}this._worldChannel=Q}))}createAndJoinWorldChannel(q,K,z){return(0,X.sH)(this,void 0,void 0,(function*(){const Y=nt.K.sanitizeName(q),Q=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(st.D.World.CreateChannel,{worldName:Y});if(!Q.isOK())throw new Z.CatalystSdkError(Z.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${Q.status}`);yield this.joinWorldChannel(Y,K,(q=>{this.leaveLocationChannel(),tt.VyI.log("Could not connect to World",tt.$bb.Error),z(q)}),!0)}))}createAndJoinZoneMapChannel(q,K,z,Y,Q){return(0,X.sH)(this,void 0,void 0,(function*(){const X=nt.K.sanitizeName(q),J=nt.K.sanitizeName(K),tt=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(st.D.ZoneMap.CreateChannel,{worldName:X,zoneMapName:J});if(!tt.isOK())throw new Z.CatalystSdkError(Z.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${tt.status}`);yield this.joinLocationChannel(nt.K.getZoneMapChannelName(X,J),z,this.createAndJoinZoneMapSocketError,Y,Q)}))}createAndJoinZoneMapSocketError(q){this.leaveLocationChannel(),tt.VyI.log("Could not connect to map channel",tt.$bb.Error)}leaveWorldChannel(){return(0,X.sH)(this,void 0,void 0,(function*(){if(tt.Aq$.isDefined(this._worldChannel)){const q=this._worldChannel;this._worldChannel=null,yield this._multiplayer.unsubscribe(q),this.onError.removeAll(this.joinWorldChannel),this._onSubscribeWorldError.removeAll(this.joinWorldChannel)}}))}joinFeatureChannel(q,K,z,Y,Q){return(0,X.sH)(this,void 0,void 0,(function*(){yield this.connect();const X=this.createVerboseMessageProcessor(q,K);this._multiplayer.userListReceiver((K=>{K.channel!==q&&K.channel!==this.getChannelName(q)||X(Object.assign(Object.assign({},K),{type:"userList"}))})).catch(tt.RQr.createHandler("Error in user list receiver"));const Z={name:q};z&&(this.onError.add(z,Z),this._onSubscribeFeatureError.add(z,Z)),Y&&this._onDisconnection.add(Y,Z),Q&&this._onReconnection.add(Q,Z),this._multiplayer.subscribe(q,X).catch(tt.RQr.createHandler("Error in channel subscription")),this._featureChannels[q]=Z}))}leaveFeatureChannel(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=this._featureChannels[q];tt.Aq$.isDefined(K)&&(delete this._featureChannels[q],yield this._multiplayer.unsubscribe(q),this.onError.removeAll(K),this._onSubscribeFeatureError.removeAll(K))}))}leaveAllFeatureChannels(){return(0,X.sH)(this,void 0,void 0,(function*(){for(const q of Object.values(this._featureChannels))delete this._featureChannels[q.name],yield this.leaveFeatureChannel(q.name),this.onError.removeAll(q),this._onSubscribeFeatureError.removeAll(q)}))}moveOnArea(q){return(0,X.sH)(this,void 0,void 0,(function*(){this.isSubscribedToWorld()&&tt.Aq$.isDefined(this._locationChannel)&&(yield this._multiplayer.moveOnArea(this.getChannelName(this._locationChannel),q))}))}setUserStatus(q){return(0,X.sH)(this,void 0,void 0,(function*(){const K=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(st.D.Social.SetStatus,{status:q});if(!K.isOK())throw new Z.CatalystSdkError(Z.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${K.status}`)}))}getFriendsStatuses(q){return(0,X.sH)(this,void 0,void 0,(function*(){return this._throttledGetFriendStatuses||(this._throttledGetFriendStatuses=it.throttle(this.getFriendStatusesImpl,Y.FRIEND_STATUS_UPDATE_INTERVAL,{trailing:!1})),this._throttledGetFriendStatuses(q)}))}getFriendStatusesImpl(q){return(0,X.sH)(this,void 0,void 0,(function*(){q.length>Y.GET_FRIENDS_STATUSES_ID_LIMIT&&(tt.VyI.log(`Truncating friend status request to ${Y.GET_FRIENDS_STATUSES_ID_LIMIT} IDs (${q.length} given)`,tt.$bb.Warning),q.length=Y.GET_FRIENDS_STATUSES_ID_LIMIT);const K=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(st.D.Social.GetFriendsStatuses,{friendIds:q});if(!K.isOK())throw new Z.CatalystSdkError(Z.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${K.status}, Data: ${JSON.stringify(K.data)}`);return K.data}))}onSubscribeFailError(q,K){K===this.getChannelName(this._locationChannel)?this._onSubscribeLocationError.dispatch(q):K===this.getChannelName(this._worldChannel)&&this._onSubscribeWorldError.dispatch(q)}getChannelName(q){return`${ot.X.CLIENT_ID}-${q}`}isSubscribedToWorld(){return null!==this._worldChannel}destroy(){this.onError.dispose(),this._onSubscribeLocationError.dispose(),this._onSubscribeWorldError.dispose(),this._onSubscribeFeatureError.dispose(),this.onNotificationReceived.dispose(),this._onDisconnection.dispose(),this._onReconnection.dispose()}createVerboseMessageProcessor(q,K){return rt.s.get("GameConstants.Debug.VERBOSE_SYNAPSE_MESSAGES")?z=>{tt.VyI.log(`Message received on channel ${q}: ${JSON.stringify(z)}`,tt.$bb.Verbose),K(z)}:K}};ht.FRIEND_STATUS_UPDATE_INTERVAL=1e4,ht.GET_FRIENDS_STATUSES_ID_LIMIT=100,(0,X.Cg)([(0,et.inject)("b09-138c"),(0,X.Sn)("design:type",ot.X)],ht.prototype,"_catalyst",void 0),ht=Y=(0,X.Cg)([(0,et.injectable)()],ht)},37962:(q,K,z)=>{"use strict";z.d(K,{j:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546);let J=class extends Z.D{getVideosConfig(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.Videos.GetConfig,{},!1)}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},34854:(q,K,z)=>{"use strict";z.d(K,{J:()=>J});var Y=z(8674),Q=z(79687),X=z(48417),Z=z(76546);let J=class extends Z.D{getWizardWatchData(){return(0,Y.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(X.D.WizardWatch.GetWizardWatchData,{},!1)}))}};J=(0,Y.Cg)([(0,Q.injectable)()],J)},5668:(q,K,z)=>{"use strict";z.d(K,{D:()=>J});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(79422);class J extends Q.s3P{get multiplayerRoomID(){return this._multiplayerRoomID}get playerList(){return this._playerList}get isDisconnected(){return!!this.joinPromise}constructor(q,K){var z,Y;super(q),this.onConnect=new Q.HN0,this.onMessage=new Q.HN0,this.onPlayerJoined=new Q.HN0,this.onPlayerDisconnect=new Q.HN0,this._multiplayerRoomID="None",this._playerList=[],this._activePlayerId=null!==(Y=null===(z=this.getInjectedValue("782-c308"))||void 0===z?void 0:z.getID())&&void 0!==Y?Y:Q.wa5.getActiveScene().container.get("782-c308").getID(),this.ft=K,this.joinPromise=new Q.bnh}broadcastMessage(q){var K,z;null===(K=this.logger)||void 0===K||K.logMessage("Broadcasting message"),null===(z=this.logger)||void 0===z||z.logMessage(JSON.stringify(q)),this.ft.emitMessage(q)}sendMessage(q){var K,z;null===(K=this.logger)||void 0===K||K.logMessage("Sending message"),null===(z=this.logger)||void 0===z||z.logMessage(JSON.stringify(q)),this.ft.emitMessage(q)}joinRoom(q){var K;null===(K=this.joinPromise)||void 0===K||K.resolve(),this.joinPromise=null,this.ft.joinZone({zoneName:q,autoBroadcastPosition:!1,onSubscribed:q=>{this._multiplayerRoomID=q.channel,this.onConnect.dispatch()},onMessage:q=>{var K,z;this.onMessage.dispatch(q),null===(K=this.logger)||void 0===K||K.logMessage("Received Message"),null===(z=this.logger)||void 0===z||z.logMessage(JSON.stringify(q))},onPlayerList:q=>{this._playerList=X.map(q,(q=>parseInt(q,10))).filter((q=>q!==this._activePlayerId))},onPlayerJoined:q=>{const K=parseInt(q,10);K!==this._activePlayerId&&(this._playerList.push(K),this.onPlayerJoined.dispatch(K))},onPlayerLeft:q=>{const K=parseInt(q,10);X.remove(this._playerList,K),this.onPlayerDisconnect.dispatch(K)}})}leaveRoom(){this.joinPromise=new Q.bnh,this._multiplayerRoomID="None",this.ft.leaveZone()}awaitRoomJoined(){return(0,Y.sH)(this,void 0,void 0,(function*(){this.joinPromise&&(yield this.joinPromise)}))}}(0,Y.Cg)([(0,Q.fFd)("CoOpLogging"),(0,Y.Sn)("design:type",Z.h)],J.prototype,"logger",void 0)},6413:(q,K,z)=>{"use strict";z.d(K,{h:()=>Y});class Y{}Y.MAX_TEAM_SIZE=3,Y.MAX_NONMEMBER_KENNEL_SIZE=150,Y.MAX_KENNEL_SIZE_MULTIPLIER=2,Y.STARTER_PET_SNOWFLUFF=148,Y.STARTER_PET_MERMINA=145,Y.STARTER_PET_WOTT=142,Y.STARTER_PET_SPROOT=139,Y.STARTER_PET_CHARFOAL=136,Y.STARTER_PETS=[Y.STARTER_PET_SNOWFLUFF,Y.STARTER_PET_MERMINA,Y.STARTER_PET_WOTT,Y.STARTER_PET_SPROOT,Y.STARTER_PET_CHARFOAL],Y.CRYSTAL_MONSTER_1=152,Y.CRYSTAL_MONSTER_2=153,Y.CRYSTAL_MONSTER_3=154,Y.CRYSTAL_MONSTERS=[Y.CRYSTAL_MONSTER_1,Y.CRYSTAL_MONSTER_2,Y.CRYSTAL_MONSTER_3],Y.DRAGONS=[130,131,132,133]},49282:(q,K,z)=>{"use strict";z.d(K,{D:()=>et});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(77938),J=z(28152),tt=z(34603);let et=class extends Q.uAl{constructor(){super(...arguments),this.onIconLoaded=new Q.HN0}create(){super.create(),Q.Aq$.isDefined(this._petID)&&this.setPetID(this._petID)}setPetID(q,K=!1){var z;this._petID=q;{const q=Z.t.getItem("pet",this._petID);if(this._petIcon.OnLoaded.addOnce(this.onIconLoaded.dispatch,this.onIconLoaded),q){const Y=K?"-cooldown":"";this._petIcon.setAsset(X._.Ui_battle_revamp_json,`icon-mini-element-${null===(z=q.data)||void 0===z?void 0:z.affinity}${Y}`).catch(Q.RQr.createHandler("Could not set element asset"))}else this._petIcon.setAsset("").catch(Q.RQr.createHandler("Could not set asset"))}}destroy(){this.onIconLoaded.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],et.prototype,"_petID",void 0),(0,Y.Cg)([(0,Q.MnK)(tt._),(0,Y.Sn)("design:type",tt._)],et.prototype,"_petIcon",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],et.prototype,"onIconLoaded",void 0),et=(0,Y.Cg)([(0,Q.EVk)("PetElementDisplay",J.Y.uiPet)],et)},30065:(q,K,z)=>{"use strict";var Y;z.d(K,{Q:()=>Y}),function(q){q[q.Springfest=0]="Springfest",q[q.Summerfest=1]="Summerfest",q[q.Pumpkinfest=2]="Pumpkinfest",q[q.Winterfest=3]="Winterfest",q[q.StarlightFestival=4]="StarlightFestival",q[q.MoonlightFestival=5]="MoonlightFestival",q[q.GenericFestival=6]="GenericFestival"}(Y||(Y={}))},47728:(q,K,z)=>{"use strict";z.d(K,{x:()=>ft});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(99625),tt=z(36648),et=z(57797),it=z(99842),st=z(56567),nt=z(92240),at=z(94310),rt=z(35120),ot=z(34829),ht=z(77938),ct=z(53880),dt=z(65050),lt=z(41674),ut=z(46784);class ft{static sampleDailyBattleData(q,K,z){return(0,Y.sH)(this,void 0,void 0,(function*(){const Y=q.dailyPlacements.filter((q=>q.type!==et.k$.Boss&&(z!==et.je.Normal||K!==q.location))),Q=Z().sample(Y),X=q.dailyPlacements.filter((q=>q.type!==et.k$.Normal&&q.location!==(null==Q?void 0:Q.location)&&(z!==et.je.Boss||K!==q.location))),J=Z().sample(X),tt=new st.f,[nt,at]=yield Promise.all([it.s.sampleRandomEncounter(q.encounterEntity,tt),q.bossEncounterEntity?it.s.sampleRandomEncounter(q.bossEncounterEntity,tt):Promise.resolve(void 0)]);return{normalPlacement:Q,bossPlacement:J,normalEncounter:nt,bossEncounter:at}}))}static openFestivalAboutMenu(q,K){var z,Y,X,Z,et,it;const st=J.l.FestivalAboutMenu,nt=ut.B.FestivalAboutWindow,at=rt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),ot=rt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig(),ht=at.getText("ABOUT_X",(null===(z=null==ot?void 0:ot.tintableBanner)||void 0===z?void 0:z.titleText)?at.getText(null===(Y=null==ot?void 0:ot.tintableBanner)||void 0===Y?void 0:Y.titleText):at.getText("FESTIVAL")),ft=rt.q.instance.prodigy.open.prefabMenu(st,void 0,void 0,void 0,!0,{[ct.J.BackgroundImageGuid]:null!==(X=null==ot?void 0:ot.backgroundImageGuid)&&void 0!==X?X:tt.q.Background_starlight,[ct.J.TitleText]:ht,[ct.J.LeftColumnText]:at.getText(null!==(Z=null==ot?void 0:ot.aboutScreenData.leftColumnText)&&void 0!==Z?Z:""),[ct.J.MiddleColumnText]:at.getText(null!==(et=null==ot?void 0:ot.aboutScreenData.middleColumnText)&&void 0!==et?et:""),[ct.J.RightColumnText]:at.getText(null!==(it=null==ot?void 0:ot.aboutScreenData.rightColumnText)&&void 0!==it?it:""),[ct.J.FestivalAtlasGuid]:null==ot?void 0:ot.festivalUiAtlasGuid,[ct.J.LeftColumnFrame]:null==ot?void 0:ot.aboutScreenData.leftAtlasFrame,[ct.J.MiddleColumnFrame]:null==ot?void 0:ot.aboutScreenData.middleAtlasFrame,[ct.J.RightColumnFrame]:null==ot?void 0:ot.aboutScreenData.rightAtlasFrame},{interfaceName:nt,interfaceType:lt.Wm.Modal,originType:q,originID:K,instanceType:dt.N.Interface},!0,!1,void 0,!1,!0);return ft.createContainer=!1,ft}static openFestivalProgressMenu(q,K,z,Y){let Q;return Q=this.shouldShowCurrencyDrainPopup(at.L.CurrencyDrainHudOverride)?ft.openCurrencyDrainModal(lt.$N.HudClick,Y):rt.q.instance.prodigy.gameContainer.get("119-35f9").handleFestivalProgressPopup(Y,{originType:q,originID:K}),z&&(null==Q||Q.onPrefabLoaded.addOnce(z)),Q}static openCurrencyDrainModal(q,K){const z=rt.q.instance.prodigy.gameContainer.get("f03-2b73").getCachedFestivalQuestData();if(!z)return void(null==K||K());const Y=rt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),X=z.getEndDate()-Date.now(),Z=z.getMetadata();return rt.q.instance.prodigy.open.prefabMenu(J.l.CurrencyDrainWarningModal,K,!0,!0,!0,{CurrencyModalHeader:Z.currencyDrainModalTitle?Y.getText(Z.currencyDrainModalTitle):"",CurrencyModalText:Z.currencyDrainModalText?Y.getText(Z.currencyDrainModalText):"",CurrencyModalStoreId:z.getMetadata().festivalStoreId,CURRENCY_DISPLAY_ID:z.getMetadata().festivalCurrencyId,CURRENCY_DISPLAY_PROMO:z.getMetadata().currencyDrainPromoGuid,TIMER_TEXT:Y.getText(ft.DAYS_LEFT_TEXT_KEY,Math.ceil(X/ot.s.DAY_IN_MS)),CLOSE_BUTTON_ACTIVE:q!==lt.$N.HudClick},{interfaceName:ut.B.FestivalCurrencyDrainPopup,interfaceType:lt.Wm.Modal,originType:q,originID:"festival",instanceType:dt.N.Interface},!0,!1,void 0,!1,!1)}static openTravelModal(q,K,z){var Y;const X=rt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig(),Z=rt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),et={travelModalTitle:Z.getText("X_IS_ON",(null==X?void 0:X.tintableBanner.titleText)?Z.getText(null==X?void 0:X.tintableBanner.titleText):Z.getText("FESTIVAL")),travelModalImageGuid:null!==(Y=null==X?void 0:X.modalImageGuid)&&void 0!==Y?Y:tt.q.Pumpkinfest_modal,actionButtonName:ft.TRAVEL_MODAL_ACTION_BUTTON_NAME_MAP,actionButtonDestination:ft.TRAVEL_MODAL_DESTINATION,actionButtonInterfaceName:ft.TRAVEL_MODAL_INTERFACE_NAME_MAP,closeButtonDestination:ft.TRAVEL_MODAL_CLOSE_BUTTON_DESTINATION,closeButtonInterfaceName:ft.TRAVEL_MODAL_INTERFACE_NAME_MAP};q===lt.$N.HudClick&&(et.actionButtonName=ft.TRAVEL_MODAL_ACTION_BUTTON_NAME_HUD,et.actionButtonDestination=ft.TRAVEL_MODAL_DESTINATION,et.actionButtonInterfaceName=ft.TRAVEL_MODAL_INTERFACE_NAME_HUD,et.closeButtonInterfaceName=ft.TRAVEL_MODAL_INTERFACE_NAME_HUD);const it=q===lt.$N.HudClick?ut.B.FestivalHudLaunchPopup:ut.B.FestivalLaunchPopup;return rt.q.instance.prodigy.open.prefabMenu(J.l.FestivalTravelModal,K,!0,!1,!0,Object.assign(Object.assign({},et),{[ft.TRAVEL_MODAL_TRAVEL_SUCCESS_CALLBACK]:z}),{interfaceName:it,interfaceType:lt.Wm.Modal,originType:q,originID:"festival",instanceType:dt.N.Interface},!0,!1,void 0,!1,!1)}static getFestivalMapButtonImage(q){var K,z;const Y=rt.q.instance.prodigy.gameContainer.get("119-35f9");if(!Y.getActiveFestival())return;return(null!==(z=null===(K=Y.getFestivalConfig())||void 0===K?void 0:K.worldMapButtonGuids)&&void 0!==z?z:{})[q]}static getFestivalMapIconImage(){var q;return null===(q=rt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig())||void 0===q?void 0:q.worldMapIconGuid}static getAllFestivalMapButtonImages(){var q;const K=[],z=rt.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig(),Y=null!==(q=null==z?void 0:z.worldMapButtonGuids)&&void 0!==q?q:{};return K.push(...Object.values(Y)),(null==z?void 0:z.worldMapIconGuid)&&K.push(z.worldMapIconGuid),K}static isMorphMarbleAsset(q){var K,z;const Y=null===(K=ht.t.getItem("item",q))||void 0===K?void 0:K.data;return Y?!!((null===(z=Y.effect)||void 0===z?void 0:z.transform)&&Y.effect.time&&Y.effect.ID):(Q.VyI.log(`FestivalUtil.isMorphMarbleAsset: Item with ID ${q} not found.`,Q.$bb.Warning),!1)}static shouldShowCurrencyDrainPopup(q){var K,z,Y,Q,X;const Z=rt.q.instance.prodigy.gameContainer.get("f03-2b73"),J=Z.getCachedFestivalQuestData();if(!(null===(K=null==J?void 0:J.getMetadata())||void 0===K?void 0:K.festivalCurrencyId))return!1;if(!(null===(z=rt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.getItem("currency",null==J?void 0:J.getMetadata().festivalCurrencyId))||void 0===z?void 0:z.N))return!1;const tt=null==J?void 0:J.getStates(),et=null===(Y=Z.getCachedFestivalQuestData())||void 0===Y?void 0:Y.getTasks().map((q=>q.taskProgress)),it=nt.h.calculateState(q,null!=tt?tt:[],null!=et?et:[]);return null!==(X=null===(Q=null==it?void 0:it.active)||void 0===Q?void 0:Q.isActive)&&void 0!==X&&X}static getFestivalSegmentContext(){var q;const K=rt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=rt.q.instance.prodigy.gameContainer.get("f03-2b73");return{instance_type:K.daily.festivalType,instance_id:null!==(q=z.getCurrentQuestID())&&void 0!==q?q:""}}static hasFestivalBeenSeen(){var q;const K=rt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=rt.q.instance.prodigy.gameContainer.get("119-35f9").getActiveFestival();if(!z)return!1;const Y=null===(q=K.data.hudAttentionSeenFlags)||void 0===q?void 0:q.Festival;return!!Y&&Number.parseInt(Y.identifier.toString())===z.type}}ft.MULTIPLE_PREREQUISITES_TEXT_KEY="FESTIVAL_COMPLETE_OTHER_QUESTS",ft.LONG_PREREQUISITE_TEXT_KEY="FESTIVAL_TIER_COMPLETE_X",ft.SHORT_PREREQUISITE_TEXT_KEY="FESTIVAL_TIER_COMPLETE_X_TO_UNLOCK",ft.DAYS_LEFT_TEXT_KEY="FESTIVAL_TIER_X_DAYS_LEFT",ft.STARTS_IN_TEXT_KEY="FESTIVAL_TIER_STARTS_IN_X_DAYS",ft.STORY_COMPLETE_TEXT_KEY="FESTIVAL_STORY_TIER_COMPLETE",ft.LONG_QUEST_NAME_CHAR_LENGTH=14,ft.PROGRESS_STORY_KEY="FESTIVAL_PROGRESS_STORY",ft.PROGRESS_COMPLETE_KEY="FESTIVAL_PROGRESS_COMPLETED",ft.QUEST_LAMPLIGHT_PROMPT_KEY="FESTIVAL_QUEST_LAMPLIGHT_PROMPT",ft.FESTIVAL_TIER_RETURN_TODAY_KEY="FESTIVAL_TIER_RETURN_TODAY",ft.FESTIVAL_TIER_RETURN_TOMORROW_KEY="FESTIVAL_TIER_RETURN_TOMORROW",ft.FESTIVAL_QUEST_COMING_SOON_KEY="FESTIVAL_QUEST_COMING_SOON",ft.TRAVEL_MODAL_ACTION_BUTTON_NAME_HUD="festival-launch-play",ft.TRAVEL_MODAL_ACTION_BUTTON_NAME_MAP="festival-play-button",ft.TRAVEL_MODAL_DESTINATION="lamplight-B3",ft.TRAVEL_MODAL_INTERFACE_NAME_HUD="hud-button",ft.TRAVEL_MODAL_INTERFACE_NAME_MAP="world-map",ft.TRAVEL_MODAL_CLOSE_BUTTON_DESTINATION="map-screen",ft.TRAVEL_MODAL_TRAVEL_SUCCESS_CALLBACK="travel-success-callback"},92946:(q,K,z)=>{"use strict";z.d(K,{E:()=>ut});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(35120),J=z(57797),tt=z(13956),et=z(90744),it=z(47255),st=z(41674),nt=z(65240),at=z(95057),rt=z(64353),ot=z(88022),ht=z(19633),ct=z(43333),dt=z(31125),lt=z(80060);let ut=class extends Q.uAl{constructor(){super(...arguments),this._playerDaily=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily,this._assetID="festival-boss-statue-modal",this._bossGraphicsAtlas=ot._.Ui_shared_revamp_json,this._bossGraphicOnAssetFrame="boss-statue-on",this._bossGraphicOffAssetFrame="boss-statue-off",this._localizer=Z.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService)}create(){var q,K,z,Y;super.create();const X=null===(q=Z.q.instance.prodigy.gameContainer.get("119-35f9").getFestivalConfig())||void 0===q?void 0:q.bossBattleModalData;if(X)if(this._bossBattleModalData=X,this._bossGraphicsAtlas=null!==(K=X.bossGraphicsAtlas)&&void 0!==K?K:this._bossGraphicsAtlas,this._bossGraphicOnAssetFrame=null!==(z=X.bossGraphicOnAssetFrame)&&void 0!==z?z:this._bossGraphicOnAssetFrame,this._bossGraphicOffAssetFrame=null!==(Y=X.bossGraphicOffAssetFrame)&&void 0!==Y?Y:this._bossGraphicOffAssetFrame,this._bossGraphic.updateAsset(this._bossGraphicsAtlas,this._bossGraphicOnAssetFrame),this._playerDaily.isDailyBattleComplete(J.je.Boss))if(this._playerDaily.dailyBossBattleRematchCount>=this._bossBattleModalData.purchaseRematchLimit)this._titleText.text=this._localizer.getText("BOSS_STATUE_TITLE_INACTIVE"),this._bodyText.text=this._localizer.getText("BOSS_STATUE_BODY_INACTIVE"),this._bossGraphic.updateAsset(this._bossGraphicsAtlas,this._bossGraphicOffAssetFrame),this._actionButton.text=this._localizer.getText("CLOSE_BUTTON_SENTENCE_CASE"),this._countdownTimer.active=!1,this._noButton.GameObject.active=!1,this._rematchCounterGameObject.active=!1,this._actionButton.icon=dt.XN.Close,this._actionButton.onClick.add((()=>{this.GameObject.destroy()}));else{const q=Z.q.instance.prodigy.gameContainer.get("bec-c6b4");this._titleText.text=this._localizer.getText("BOSS_STATUE_TITLE_REMATCH"),this._bodyText.text=this._localizer.getText("BOSS_STATUE_BODY_REMATCH"),this._actionButton.text=q.isHardCurrencyMemberLocked(this._bossBattleModalData.respinCostMagicoin)?"Battle Now":this._bossBattleModalData.respinCostMagicoin.toString(),lt.d.updateInjectedValues(this.gameObject,{SHOW_MEMBER_ICON:q.isHardCurrencyMemberLocked(this._bossBattleModalData.respinCostMagicoin)}),this._countdownTimer.active=!0;const K=Math.abs(this._playerDaily.lastStarted.getTime()+this._playerDaily.dailyBattleRefreshInterval-Date.now());this._countdownTimerText.setTemplateString("Rematch time"),this._countdownTimerText.setCountdownTimeMS(K),this._rematchCounterText.text=this._localizer.getText("REMATCHES_LEFT_X",this._bossBattleModalData.purchaseRematchLimit-this._playerDaily.dailyBossBattleRematchCount),this._actionButton.onClick.add((()=>{this.spendMagicoinForRematch()}))}else this._titleText.text=this._localizer.getText("BOSS_STATUE_TITLE_ACTIVE"),this._bodyText.text=this._localizer.getText("BOSS_STATUE_BODY_ACTIVE"),this._actionButton.text=this._localizer.getText("BATTLE_NOW"),this._actionButton.icon=dt.XN.Right,this._countdownTimer.active=!1,this._rematchCounterGameObject.active=!1,this._actionButton.onClick.add((()=>{this.startDailyBossBattleCallback()}));else Q.RQr.createHandler("BossBattleModalData is undefined")}spendMagicoinForRematch(){const q=Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily,K=Z.q.instance.prodigy.gameContainer.get("119-35f9"),z=Z.q.instance.prodigy.gameContainer.get("20f-5f67");let Y;if(K.getActiveFestival()){const K=`${q.festivalType}-${this._assetID}`,Q=q.getFestivalInstanceName();Y={instance_id:K,instance_type:Q,sink_type:nt.C.FestivalDailyRespawnBossBattle,sink_id:z.festival.getCurrentFestivalSpinID()}}else Y={sink_type:nt.C.FestivalDailyRespawnBossBattle,sink_id:it.o.FunnelBossStatueModalPurchaseRematch};const X={currency:27,value:this._bossBattleModalData.respinCostMagicoin};this._bossBattleModalData.respinCostMagicoin&&this._paymentManager.canAfford(X)?this._paymentManager.spend(X,"festivalBossBattleRematch",Y).then((()=>{this._playerDaily.dailyBossBattleRematchCount++,this.startDailyBossBattleCallback(),this.destroy()})).catch((()=>{Q.RQr.createHandler("Error purchasing a boss daily battle rematch"),this.showConversionUpsellPopup(X,z,Y),this.GameObject.destroy()})):(this.showConversionUpsellPopup(X,z,Y),this.GameObject.destroy())}showConversionUpsellPopup(q,K,z){K.item.sendInsufficientCurrencyEvent(q,z),K.purchase.sendFunnelStart({type:"Festival-Boss-Battle-Hard-Currency-Insufficient-Resources",category:"festival-daily-boss-battle",contentId:`${this._playerDaily.festivalType}-${this._assetID}`,adType:at.R.UnifiedConversionFlow,adVersion:rt.P.getAdVersion(it.o.FunnelNotEnoughCurrency)});const Y={conversionFunnelName:it.o.FunnelNotEnoughCurrency};Z.q.instance.prodigy.open.unifiedConversionFlow((()=>this.destroy()),Y,{type:st.$N.FestivalBossBattleRematch,id:this._assetID})}};(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ut.prototype,"_titleText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ut.prototype,"_bodyText",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.vYh),(0,Y.Sn)("design:type",Q.vYh)],ut.prototype,"_bossGraphic",void 0),(0,Y.Cg)([(0,Q.MnK)(ht.S),(0,Y.Sn)("design:type",ht.S)],ut.prototype,"_noButton",void 0),(0,Y.Cg)([(0,Q.MnK)(ht.S),(0,Y.Sn)("design:type",ht.S)],ut.prototype,"_actionButton",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ut.prototype,"_countdownTimer",void 0),(0,Y.Cg)([(0,Q.MnK)(ct.U),(0,Y.Sn)("design:type",ct.U)],ut.prototype,"_countdownTimerText",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],ut.prototype,"_rematchCounterGameObject",void 0),(0,Y.Cg)([(0,Q.MnK)(Q.EYj),(0,Y.Sn)("design:type",Q.EYj)],ut.prototype,"_rematchCounterText",void 0),(0,Y.Cg)([(0,tt.b)("ec3-31a0"),(0,Y.Sn)("design:type",et.E)],ut.prototype,"_paymentManager",void 0),ut=(0,Y.Cg)([(0,Q.EVk)("BossStatueModalComponent",X.Y.festival)],ut)},31589:(q,K,z)=>{"use strict";z.d(K,{l:()=>gt});var Y,Q=z(8674),X=z(62459),Z=z(35120),J=z(28402),tt=z(95891),et=z(99625),it=z(65240),st=z(41674),nt=z(90744),at=z(13956),rt=z(64353),ot=z(80060),ht=z(47255),ct=z(43846),dt=z(43531),lt=z(95057),ut=z(21097),ft=z(30226),bt=z(46318);class pt extends bt.Q{constructor(){super(...arguments),this._segment=Z.q.instance.prodigy.gameContainer.get("20f-5f67"),this._weekendEvents=Z.q.instance.prodigy.gameContainer.get("119-35f9")}start(){let q=this.data.spinDialogueID;const K=this.data.firstSpinBreadcrumb;X.Aq$.isDefined(this.data.firstSpinDialogueID)&&!Z.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(K.featureName,K.breadcrumbName)&&(q=this.data.firstSpinDialogueID,Z.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K.featureName,K.breadcrumbName)),this.showInitialDialogue(q)}tryAgain(){const q=new dt.rD(this.game);q.addEvents([{dialogueData:q.dataProvider.get(this.data.prizeReceivedDialogueID),blockInput:!0},{callback:this.showInitialDialogue.bind(this,this.data.spinAgainDialogueID)}]),q.start()}showInitialDialogue(q){const K=Z.q.instance.prodigy.gameContainer.get("bec-c6b4");if(this.player.canSpin(this.assetID)||!this.player.canPurchaseSpin(this.assetID,this.data)||K.isHardCurrencyMemberLocked(this.data.respinCost.amount)){const K=(this.player.hasMembership()?2:1)-this.player.getNumSpins(this.assetID),z={INFO_TEXT:K>0?(0,ct.k)("WHEEL_FREE_SPINS",K):void 0},Y=Z.q.instance.prodigy.gameContainer.get("983-05a7");ot.d.preloadWithInjectedValuesAndDependenciesFromGUID(Y,et.l.CharacterDialogue,z).then((()=>{const K=new dt.rD(this.game);K.addEvents([{type:dt.fA.WHEEL,dialogueData:Object.assign(Object.assign({},K.dataProvider.get(q)),{injectedValues:ot.d.getDataForInjection(z)}),yes:this.trySpin.bind(this),no:this.showGoodbyeDialogue.bind(this)}]),K.start()})).catch(X.RQr.createHandler("Error preloading dialogue prefab"))}else this.showPurchaseSpinDialogue()}showSpinningDialogue(){this._spinDialogue=new dt.rD(this.game),this._spinDialogue.addEvents([{dialogueData:this._spinDialogue.dataProvider.get(this.data.spinningDialogueID)}]),this._spinDialogue.start(!0)}closeSpinDialogue(){this._spinDialogue.close()}showOutOfSpinsDialogue(q){var K,z;const Y=new dt.rD(this.game),Q=[];if(this._weekendEvents.getActiveFestival()){const q=this.player.daily,Y=q.getFestivalInstanceName(),Q=q.festivalType,X=null===(z=null===(K=this._weekendEvents.getFestivalConfig())||void 0===K?void 0:K.festivalPrizeWheels.find((q=>q.wheelId===this.assetID)))||void 0===z?void 0:z.name;this._segment.festival.sendFestivalPrizeWheelSpinFailedEvent(null!=X?X:this.assetID.toString(),this.assetID,ut.WE.OutsideOfHours,Y,Q)}if(Q.push({dialogueData:Y.dataProvider.get(this.data.outOfSpinsDialogueID),blockInput:!0}),!this.player.hasMembership()&&!ft.J.shouldSuppressAd(this.player)&&this.player.getNumSpins(this.assetID)<2){Q.push({callback:Z.q.instance.prodigy.open.membershipInfo.bind(Z.q.instance.prodigy.open,void 0,q)});const K=ft.J.showYouTubeMembershipAd(this.game,!0)?lt.R.Video:lt.R.Static;this._segment.purchase.sendFunnelStart(Object.assign(Object.assign({},this.getSegmentPurchaseFunnelTriggerTypeAndCategory()),{contentId:`prizeWheel-${this.assetID}`,adType:K}))}Q.push({callback:this.close.bind(this)}),Y.addEvents(Q),Y.start()}openPrizesDialogue(q,K){let z={source_type:it.C.PrizeWheel};if(this._weekendEvents.getActiveFestival()){const q=this.player.daily,K=q.getFestivalInstanceName(),Y=`${q.festivalType}-${this.assetID}`;z={source_type:it.C.FestivalPrizeWheel,source_id:this._segment.festival.getCurrentFestivalSpinID(),instance_id:K,instance_type:Y}}const Y=Z.q.instance.prodigy.open.gotItem(q,(()=>{Y.onClose=null,this.tryAgain()}),void 0,K,void 0,void 0,z)}showGoodbyeDialogue(){const q=new dt.rD(this.game);q.addEvents([{dialogueData:q.dataProvider.get(this.data.declineSpinDialogueID),blockInput:!0},{callback:this.close.bind(this)}]),q.start()}showPurchaseSpinDialogue(){var q,K,z;const Y=new dt.rD(this.game),Q=[],J=(null!==(q=this.data.purchaseSpinCount)&&void 0!==q?q:this.player.getNumSpins(this.assetID))-this.player.getNumSpins(this.assetID)+(this.player.hasMembership()?2:1),it={CURRENCY_AMOUNT:null!==(z=null===(K=this.data.respinCost)||void 0===K?void 0:K.amount.toString())&&void 0!==z?z:"",STAY_BUTTON_TEXT:(0,ct.k)("NOT_NOW_CAPITAL"),INFO_TEXT:(0,ct.k)("WHEEL_REMAINING",(0,tt.clamp)(J,0,99))},st=Z.q.instance.prodigy.gameContainer.get("983-05a7");ot.d.preloadWithInjectedValuesAndDependenciesFromGUID(st,et.l.CharacterDialogue,it).then((()=>{Q.push({type:dt.fA.CURRENCY,dialogueData:Object.assign(Object.assign({},Y.dataProvider.get(this.data.purchaseSpinDialogueID)),{currencyButton:this.data.respinCost?{currencyId:this.data.respinCost.currencyId,amount:this.data.respinCost.amount}:void 0,injectedValues:ot.d.getDataForInjection(it)}),yes:this.spendMagicoinToSpin.bind(this),no:this.showGoodbyeDialogue.bind(this)}),Y.addEvents(Q),Y.start()})).catch(X.RQr.createHandler("Error preloading dialogue prefab"))}spendMagicoinToSpin(){let q;if(this._weekendEvents.getActiveFestival()){const K=this.player.daily,z=K.getFestivalInstanceName(),Y=`${K.festivalType}-${this.assetID}`;q={instance_id:z,instance_type:Y,sink_type:it.C.FestivalPrizeWheel,sink_id:this._segment.festival.getCurrentFestivalSpinID()}}else q={sink_type:it.C.PrizeWheel,sink_id:ht.o.FunnelPrizeWheelPurchaseSpin};const K={currency:this.data.respinCost.currencyId,value:this.data.respinCost.amount};this.data.respinCost&&this._paymentManager.canAfford(K)?this._paymentManager.spend(K,"prizeWheelSpin",q).then((()=>{this.showSpinningDialogue(),this.startSpin()})).catch((()=>{X.RQr.createHandler("Error purchasing a prize wheel spin"),this.showNotEnoughMagicoinDialogue(K,q)})):this.showNotEnoughMagicoinDialogue(K,q)}showNotEnoughMagicoinDialogue(q,K){var z,Y,Q;Z.q.instance.prodigy.gameContainer.get("20f-5f67").item.sendInsufficientCurrencyEvent(q,K);const X=new dt.rD(this.game),J={CURRENCY_AMOUNT:null!==(Y=null===(z=this.data.respinCost)||void 0===z?void 0:z.amount.toString())&&void 0!==Y?Y:"",STAY_BUTTON_TEXT:"Okay"};X.addEvents([{type:dt.fA.CURRENCY,dialogueData:Object.assign(Object.assign({},X.dataProvider.get(null!==(Q=this.data.purchaseSpinFailedDialogueID)&&void 0!==Q?Q:this.data.declineSpinDialogueID)),{injectedValues:ot.d.getDataForInjection(J)}),yes:this.showConversionUpsellPopup.bind(this),no:this.close.bind(this)},{callback:this.close.bind(this)}]),X.start()}showConversionUpsellPopup(){Z.q.instance.prodigy.gameContainer.get("20f-5f67").purchase.sendFunnelStart({type:"Prize-Wheel-Hard-Currency-Insufficient-Resources-Respin",category:"festival-prize-wheel",contentId:`${this.player.daily.festivalType}-${this.assetID}`,adType:lt.R.UnifiedConversionFlow,adVersion:rt.P.getAdVersion(ht.o.FunnelNotEnoughCurrency)});const q={conversionFunnelName:ht.o.FunnelNotEnoughCurrency};Z.q.instance.prodigy.open.unifiedConversionFlow((()=>this.close()),q,{type:st.$N.PrizeWheel,id:this.assetID.toString()})}}(0,Q.Cg)([(0,at.b)("ec3-31a0"),(0,Q.Sn)("design:type",nt.E)],pt.prototype,"_paymentManager",void 0);class vt extends pt{constructor(q,K,z,Y,Q,X){super(q,K,z,Y,Q),this.festivalPrizeWheelComponent=X}trySpin(){this.festivalPrizeWheelComponent&&this.festivalPrizeWheelComponent.toggleWheelNewContainerActive(!1),super.trySpin()}}let gt=Y=class extends X.jsv{constructor(){super(...arguments),this.wheelID=Y.WHEEL_OF_WONDER_ID,this.wheelNpcContainerActive=!0,this.wheelNewStateContainerActive=!0,this.onWheelClose=new X.HN0}create(){super.create(),this.wheelNpcContainer.active=this.wheelNpcContainerActive,this.toggleWheelNewContainerActive()}destroy(){this.onWheelClose.dispose(),super.destroy()}toggleWheelNewContainerActive(q){if(void 0!==q)this.wheelNewStateContainerActive=q;else{const q=this._loggedInPlayer.player;this.wheelNewStateContainerActive=void 0===q.getNumSpins(this.wheelID)}this.wheelNewStateContainer.active=this.wheelNewStateContainerActive}openWheel(q){Z.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily.isNewFestivalWheel=!1;const K=q&&"number"==typeof q?q:this.wheelID;new vt(Z.q.instance.prodigy.game,this.screen.uiLayer,this._loggedInPlayer.player,this.screen,K,this)}moveSparkleEffect(q=0,K=0){const z=this.wheelSparklesGO.findComponent(X.XVE);z.setPosition(z.localPosition.x+q,z.localPosition.y+K)}};gt.WHEEL_OF_WONDER_ID=1,(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],gt.prototype,"wheelID",void 0),(0,Q.Cg)([(0,X.MnK)(X.vYh),(0,Q.Sn)("design:type",X.vYh)],gt.prototype,"wheelGraphic",void 0),(0,Q.Cg)([(0,X.MnK)(J.v),(0,Q.Sn)("design:type",J.v)],gt.prototype,"wheelNpcSpine",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],gt.prototype,"wheelNpcContainer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],gt.prototype,"wheelNpcContainerActive",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],gt.prototype,"wheelSparklesGO",void 0),(0,Q.Cg)([(0,X.ERr)(),(0,Q.Sn)("design:type",X._mx)],gt.prototype,"wheelNewStateContainer",void 0),(0,Q.Cg)([(0,X.vkK)(),(0,Q.Sn)("design:type",Boolean)],gt.prototype,"wheelNewStateContainerActive",void 0),(0,Q.Cg)([(0,X.Cdj)("ad2-c5b2"),(0,Q.Sn)("design:type",Object)],gt.prototype,"_loggedInPlayer",void 0),(0,Q.Cg)([(0,X.bbQ)(),(0,Q.Sn)("design:type",X.HN0)],gt.prototype,"onWheelClose",void 0),gt=Y=(0,Q.Cg)([(0,X.EVk)("FestivalPrizeWheel",X.YH6.ui)],gt)},28080:(q,K,z)=>{"use strict";z.d(K,{D:()=>rt});var Y,Q=z(8674),X=z(62459),Z=z(99625),J=(z(5491),z(35120)),tt=z(82209),et=z(129),it=z(28152),st=z(6476),nt=z(51941),at=z(80060);let rt=Y=class extends X.uAl{constructor(){super(...arguments),this.skinColor=1,this.eyeColor=1,this.face=1,this.hairColor=1,this.hairStyle=1,this.morphId=1}create(){super.create(),this.spawn().catch(X.RQr.createHandler("Error spawning wizard"))}spawn(){return(0,Q.sH)(this,void 0,void 0,(function*(){const q=new et.a(J.q.instance.game);q.appearance.setFace(this.face),q.appearance.setHair(this.hairStyle,this.hairColor),q.appearance.setSkinColor(this.skinColor),q.appearance.setEyeColor(this.eyeColor),q.equipment.setHat(this.hat),q.equipment.setOutfit(this.outfit),q.equipment.setWeapon(this.weapon),q.equipment.setBoots(this.boots),q.equipment.setMount(this.mount),this.morphType&&this.morphId&&q.setData({playerTransformation:{transformType:this.morphType,transformID:this.morphId}});const K=yield Y.createWizardObject(q);this.gameObject.addChild(K)}))}static createWizardObject(q){return(0,Q.sH)(this,arguments,void 0,(function*(q,K=!0){var z;const Y=new tt.z;Y.initialize(q);const Q=new X._mx;Q.active=!1,Q.addComponent(X.dLy);const et=yield at.d.loadWithInjectedValuesAndDependenciesFromGUID(J.q.instance.prodigy.gameContainer.get("983-05a7"),Z.l.WizardInjectionConfigured,{"1eb-d7b4":Y,APPEARANCE:{face:q.appearance.getFace(),hair:q.appearance.getHair(),skin:q.appearance.getSkinColor(),eyeColor:q.appearance.getEyeColor(),hat:q.equipment.getHat(),outfit:q.equipment.getOutfit(),weapon:q.equipment.getWeapon(),boot:q.equipment.getBoots(),costume:q.equipment.getCostume()}},Q);if(!K){et.findComponentInChildren(st.T).GameObject.active=!1}return yield null===(z=et.findComponentInChildren(nt.c))||void 0===z?void 0:z.onLoadComplete.asPromise(),et}))}};(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"skinColor",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"eyeColor",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"face",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"hairColor",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"hairStyle",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"hat",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"outfit",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"weapon",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"boots",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"mount",void 0),(0,Q.Cg)([(0,X.W_S)(),(0,Q.Sn)("design:type",String)],rt.prototype,"morphType",void 0),(0,Q.Cg)([(0,X.g11)(),(0,Q.Sn)("design:type",Number)],rt.prototype,"morphId",void 0),rt=Y=(0,Q.Cg)([(0,X.EVk)("WizardSpawner",it.Y.player)],rt)},71802:(q,K,z)=>{"use strict";z.d(K,{D:()=>dt});var Y=z(62459),Q=z(95891),X=z(68910),Z=z(88022),J=z(56942),tt=z(73678),et=z(35120),it=z(34829),st=z(77938),nt=z(10730),at=z(28930),rt=z(73797),ot=z(48951),ht=z(21922),ct=z(83726);class dt extends ct.T{constructor(q,K,z,Y,Q,X,J,tt){const et=`${tt}-${J.tilemap}`;super(q,K,z,Y,Q,[],X.concat([et,Z._.Ui_social_feed_json,Z._.Ui_coop_json])),this.mapConfig=J,this.file=et,this.dungeonZone=q,this.key=`${this.mapConfig.x}-${this.mapConfig.y}`}setup(q,K,z){super.setup(q,K,z);const Q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;let X=this.dungeonZone.collectedItems[this.key];Y.Aq$.isDefined(X)||(X=this.dungeonZone.collectedItems[this.key]=[]),K.zoneName=`${this.dungeonZone.ID}-${Q.userID}`;for(let Y=0;Y<4;Y++)this.toggleDynamicLayer(this.game,Y+1,!1,0);for(let Y=0;Y{this.dungeonZone.skipProgressBarAnimation=!0,this.dungeonZone.teleportInDungeon(z.map,X.exit.x,X.exit.y)})).name=at.O[Q];const J=et.q.instance.prodigy.create.sprite(X.area.x,X.area.y,Z._.General_core_json,"empty",{x:.5,y:.5},null,200,200);J.events.onInputUp.add((()=>{this.walkToDoorway(X.walkTarget.x,X.walkTarget.y,null)})),J.alpha=0,J.inputEnabled=!0,this.screen.content.addChild(J),this.toggleDynamicLayer(this.game,Q+1,!0,0),this.addDoorGlow(Q,X)}for(let Y=0;Y{q&&this.screen.user.setPath(q,z)})).catch(Y.RQr.createHandler("Unable to find path to doorway"))}addCollected(q){this.dungeonZone.addCollected(this.key,q)}addDoorGlow(q,K){const z=this.game.add.spine(K.glowPos.x,K.glowPos.y,J.Q.Spine_archive_door_glow_json);z.setToSetupPose(),z.setAnimationByName(0,K.glowAnimation,!0),z.scale.x=K.isGlowFlipped?-1:1,Y.Aq$.toggleDisplayObjSmooth(z,!1),this.screen.above.add(z)}createHUDCounter(){if(this.isInAcademyElementalTower())et.q.instance.prodigy.open.academyTowerProgress().onPrefabLoaded.add((q=>{q.findComponent(ht.u).initialize(this.dungeonZone.skipProgressBarAnimation)}));else if(Y.Aq$.isDefined(this.counterUI)){const q=st.t.getItem("ui",this.counterUI).data;this.hudCounterContainer=new X.Container;const K=new ot.c(this.game).createUIElements(q.elements,this.hudCounterContainer);this.hudCounterText=K.find((q=>"counterText"===q.name));const z=this.dungeonZone.goalTotal,Y=this.dungeonZone.goalCollected;this.hudCounterText.setText(`${Y} / ${z}`),this.game.broadcaster.addAppListener(rt.$i.TargetCollected,(()=>{this.updateHUDCounter()}),this)}}isInAcademyElementalTower(){return dt.ELEMENTAL_TOWER_ZONE_IDS.includes(this.zone.ID)}updateHUDCounter(){Y.Aq$.isDefined(this.hudCounterText)&&this.hudCounterText.setText(`${this.dungeonZone.goalCollected} / ${this.dungeonZone.goalTotal}`)}guideToExit(q){if(!dt.hasExit(this.mapConfig,q)){const K=this.getDirectionToExit(q);if(Y.Aq$.isDefined(K)){const q=at.O[K],z=this.screen.floor.getByName(q);if(Y.Aq$.isDefined(z)){const q=this.screen.above.add(et.q.instance.prodigy.create.sprite(z.x,z.y,Z._.General_core_json,"area-pointer"));q.anchor.set(.5,0);let Q=0,X=0;switch(K){case at.O.North:X=20,q.x-=5;break;case at.O.East:Q=-20,q.x-=20,q.y-=10,q.angle=90;break;case at.O.South:X=-20,q.y-=80,q.x-=5,q.angle=190;break;case at.O.West:Q=20,q.x+=20,q.y-=10,q.angle=270}this.game.add.tween(q,this).to({x:q.x+Q,y:q.y+X},400,Y.GS3.Quadratic.InOut,!0,0,it.A.MAX_SAFE_INTEGER,!0)}}}}getDirectionToExit(q){for(let K=0;Kq instanceof nt.v&&q.id===K))>=0}cleanup(){this.game.broadcaster.removeAppListener(rt.$i.TargetCollected,this),this.hudCounterText&&(this.hudCounterText.destroy(),this.hudCounterText=null),super.cleanup()}}dt.ELEMENTAL_TOWER_ZONE_IDS=[tt.A_.EARTHTOWER,tt.A_.ICETOWER,tt.A_.STORMTOWER,tt.A_.FIRETOWER,tt.A_.WATERTOWER,tt.A_.ASTRALTOWER]},4631:(q,K,z)=>{"use strict";var Y;z.d(K,{j:()=>Y}),function(q){q[q.openMap=0]="openMap",q[q.mapTeleport=1]="mapTeleport",q[q.teleport=2]="teleport",q[q.logout=3]="logout"}(Y||(Y={}))},83726:(q,K,z)=>{"use strict";z.d(K,{T:()=>lt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z.n(X),J=z(88022),tt=z(51742),et=z(62886),it=z(35120),st=z(15521),nt=z(34829),at=z(77938),rt=z(10592),ot=z(13367),ht=z(73797),ct=z(30226),dt=z(1041);class lt extends dt.Z{constructor(q,K,z,Y,X,Z,et,st,nt){super(it.q.instance.prodigy.gameContainer),this.tag="",this.isScene=!1,this.isMultiplayerDisabled=!1,this.arePopupsDisabled=!1,this.nameKey="",this.x=0,this.y=0,this.battleBG="",this.locations=[],this.questParams={},this.mapMonsters=[],this.guideHandData=[],this.tag=K,this.nameKey=z,this.zoneName=`${q.ID}-${K}`,this.x=Y,this.y=X,this.file=`map-${this.zoneName.toLowerCase()}`,this.onFaint=q.defaultOnFaint,this.zone=q,this.battleBG=q.battleBG,this.technicalMetricsManager=it.q.instance.prodigy.gameContainer.get("a92-c640"),Q.Aq$.isDefined(st)?this.file=st.toLowerCase():this.file=`map-${this.zoneName.toLowerCase()}`,this.assets.clear();const at=[this.file,J._.Particles_json,J._.Ui_social_feed_json,tt.c.Sfx_toaster_open].concat(et);Q.Mnj.addAll(this.assets,at),this.locations=Z,this.guideHandData=null!=nt?nt:[]}get isQuestHub(){return this.zone.questHub.indexOf(this.tag)>=0}get name(){return this.getName()}getName(){return it.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(this.nameKey)}getLocation(){return this.zoneName}setup(q,K,z={}){this.questParams=Q.Aq$.isDefined(z)?z:{},it.q.instance.prodigy.gameContainer.get("b37-c775").sendQuestEventViaHub(et.T.ENTER_MAP,{id:`${this.zone.ID}-${this.tag}`}).catch(Q.RQr.createHandler(`Error sending EnterMap event for ${this.zone.ID}-${this.tag}`));const Y=this.technicalMetricsManager.timeToPlayMS;null!==Y&&(Q.VyI.log(`TTP: ${Y}`,Q.$bb.Verbose),this.technicalMetricsManager.timeToPlayMS=null),this.zone.hasDaily(this)&&Q.Aq$.isDefined(this.zone.monsters)&&this.zone.placeDaily(this,q,K);const X=it.q.instance.prodigy.gameContainer.get("bac-9e8b");if(this.canRegularMonsterSpawn()){const z=it.q.instance.prodigy.world;z.getPreviousMap()!==z.getCurrentMap()&&this.clearRespawns(),Promise.all([X.getSpawnDataForMap(this.zoneName),X.getMaximumSpawnsForMap(this.zoneName)]).then((([z,Y])=>{z.map(((q,K)=>Object.assign({spawnId:K},q))).sort((()=>Math.random()-.5)).sort((q=>this.mapMonsters[q.spawnId+1]?-1:1)).slice(0,Y).forEach((q=>{this.screen.user.playerPrefab?this.addPrefabEncounter(q.spawnId,q.x,q.y):this.screen.user.OnLoad.addOnce((()=>this.addPrefabEncounter(q.spawnId,q.x,q.y)))})),this.onMonsterSpawns(q,K)})).catch(Q.RQr.createHandler(`Error loading spawn data for map ${this.zoneName}`))}else this.onMonsterSpawns(q,K);this.game=q,this.screen=K,this.game.broadcaster.addAppListener(ht.ph.EnableDynamicLayer,this.toggleDynamicLayer.bind(this),this,null,!0)}getEncounterDataFromLocalAsset(q){return(0,Y.sH)(this,void 0,void 0,(function*(){return it.q.instance.prodigy.gameContainer.get("bac-9e8b").loadDataSchemaFromJson(q)}))}start(q,K,z){const Y=Q.Aq$.isDefined(z)?z:this.zone.bgmID;it.q.instance.prodigy.audio.autoplay&&(it.q.instance.prodigy.audio.playBGM(Y,!0),it.q.instance.prodigy.audio.resumeBGM())}process(q,K,z){}update(q){}getTag(){return this.tag}cleanup(){this.game?(this.game.broadcaster.removeAppListener(ht.ph.EnableDynamicLayer,this),super.cleanup()):Q.VyI.log("Map cleanup called after map destroyed.",Q.$bb.Warning)}processDynamicLayers(q,K){for(const z of this.dynamicSprites)Q.Aq$.isDefined(z.collisionTile)&&z.collisionTile?z.destroy():z.isAbove?(st.Z.bringToTop(this.dynamicLayerContainers[`element-${z.dynamicToggle}`].above),this.dynamicLayerContainers[`element-${z.dynamicToggle}`].above.add(z)):(st.Z.bringToTop(this.dynamicLayerContainers[`element-${z.dynamicToggle}`].below),this.dynamicLayerContainers[`element-${z.dynamicToggle}`].below.add(z))}addAreaEvent(q,K,z,Y,X,Z,J,tt,et=!1,st=!1){var nt,at;const rt=null!==(at=null===(nt=this.questParams)||void 0===nt?void 0:nt.enableAreaEvents)&&void 0!==at?at:!st,ot=rt&&et;return z.target=Y,!Q.Aq$.isDefined(J)&&it.q.instance.prodigy.classModeController.isLockedZone(Y)?(z.canReTrigger=!0,K.addAreaEvent(z,it.q.instance.prodigy.classModeController.onClassMode.bind(it.q.instance.prodigy.classModeController,Y),tt,ot,!rt)):Q.Aq$.isDefined(J)?K.addAreaEvent(z,J,tt,ot,!rt):K.addAreaEvent(z,it.q.instance.prodigy.world.it.bind(it.q.instance.prodigy.world,Y,X,Z),tt,ot,!rt)}addChest(q,K,Y,X,Z,J,tt){if(Q.Aq$.isDefined(this.questParams.enableChests)&&!this.questParams.enableChests)return null;const et=z(93096)[`${this.zoneName}-${Y}`];return et||Q.VyI.log(`No chest rewards found for chest with ID ${Y} in ${this.zoneName}`,Q.$bb.Error),K.addChest(Y,X,Z,et,J,tt)}clearRespawns(){var q;for(let K=0;Kq===this.zoneName)))return!1;J.setUltimateSessionStatus(rt.n.None,null,0)}if(Q.Aq$.isDefined(this.questParams.enableMonsters)&&!this.questParams.enableMonsters||Q.Aq$.isDefined(this.questParams.overrideMonsterIDWithPippet)&&q===this.questParams.overrideMonsterIDWithPippet)return!1;if(ct.J.isCoreZone(this.zone.ID)&&!K){const K=this.zone.getQuestState();if((null==K?void 0:K.req)&&(null===(Y=null===(z=K.monsterState)||void 0===z?void 0:z[this.tag])||void 0===Y?void 0:Y[q])>0)return!1;if(1===(null===(X=K.state)||void 0===X?void 0:X[q]))return!1}return!(!K&&(null===(Z=this.mapMonsters[q])||void 0===Z?void 0:Z.respawn))}addMonster(q,K,z,Y,X,Z,J,tt=!1,et=null,st=!1){if(Q.Aq$.isDefined(this.mapMonsters[z])||(this.mapMonsters[z]={}),!this.canSpawnMonsterWithId(z,tt))return null;const nt=ct.J.copyObject(J);nt.onEnd=Q.Aq$.isDefined(nt.onEnd)?nt.onEnd:this.zoneName,nt.onFaint=Q.Aq$.isDefined(nt.onFaint)?nt.onFaint:this.onFaint,nt.screen=Q.Aq$.isDefined(nt.screen)?nt.screen:this.battleBG,Q.Aq$.isDefined(this.mapMonsters[z].data)&&!st&&(nt.encounter=[this.mapMonsters[z].data]);const at=it.q.instance.prodigy.gameContainer.get("e9f-b6e7"),rt=K.addMonster(z,Y,X,Z,nt,lt.resetMonsterRespawn.bind(this,this.mapMonsters[z],nt,at.spawnCooldownDurationSeconds),Q.Aq$.isDefined(this.mapMonsters[z].respawn),et);return this.mapMonsters[z].data=rt.monsterData,this.mapMonsters[z].event=rt,delete this.mapMonsters[z].respawn,rt}addPrefabEncounter(q,K,z){this.canSpawnMonsterWithId(q+1)&&it.q.instance.prodigy.prefabFactory.addMonster(this,K,z,q).catch(Q.RQr.createHandler("Could not load spawn encounter prefab"))}static resetMonsterRespawn(q,K,z){q.monsterData=null,q.respawn=(new Date).getTime()+1e3*z,Q.Aq$.isDefined(K)&&(q.data=null,Q.Aq$.isDefined(K.onEnc)&&K.onEnc())}addPippet(q,K,z,Y,X){const Z=this.questParams.enableMonsters||!1;this.featureRequirements.meetsRequirementsDeprecated(1)&&Q.Aq$.isDefined(it.q.instance.prodigy.world.pippetEncounterSpawn)&&this.zoneName===it.q.instance.prodigy.world.pippetEncounterSpawn.location&&!Z&&(this.questParams.overrideMonsterIDWithPippet=Q.Aq$.isDefined(z)?z:1,K.addPippet(Y,X))}addWizard(q,K,z,Y,X,Z,J){const tt=this.generateRogueWizardMod(Z);tt.onEnd=Q.Aq$.isDefined(tt.onEnd)?tt.onEnd:this.zoneName,tt.onFaint=Q.Aq$.isDefined(tt.onFaint)?tt.onFaint:this.onFaint,tt.screen=Q.Aq$.isDefined(tt.screen)?tt.screen:this.battleBG;const et=K.addWizard(z,Y,X,tt);return null!==et&&(J&&et.flip(),Q.Aq$.isDefined(this.questParams.enableWizards)&&!this.questParams.enableWizards&&(et.visible=!1)),et}addConstructedNPC(q,K,z,Y,X,Z,J,tt){return Q.Aq$.isDefined(this.questParams.hiddenNPCs)&&this.questParams.hiddenNPCs.indexOf(X)>-1?null:K.addConstructedNPC(z,Y,X,Z,J,tt)}addCollisionZone(q,K,z,Y,Q){const X=q.path.size,Z=Math.floor(Y/X),J=Math.floor(Q/X),tt=Math.floor(K/X),et=Math.floor(z/X);for(let it=tt;it0?(q.add.tween([Z.above],this).to({alpha:X},Q.Aq$.isDefined(Y)?Y:1,Q.GS3.Linear.None).start(),q.add.tween([Z.below],this).to({alpha:X},Q.Aq$.isDefined(Y)?Y:1,Q.GS3.Linear.None).start()):(Z.above.alpha=X,Z.below.alpha=X)),Q.Aq$.isDefined(J)&&(J.forEach((q=>{this.screen.area[q.y][q.x]=z?q.value:1})),this.screen.path.init(this.screen.area,this.screen.tileSize))}}canRegularMonsterSpawn(){return!0}onMonsterSpawns(q,K){}getDefaultSpawnPosition(){return{x:this.x,y:this.y}}}(0,Y.Cg)([(0,Q.fFd)("11f-118a"),(0,Y.Sn)("design:type",Object)],lt.prototype,"featureRequirements",void 0),(0,Y.Cg)([(0,Q.fFd)("20f-5f67"),(0,Y.Sn)("design:type",Function)],lt.prototype,"segment",void 0)},85182:(q,K,z)=>{"use strict";z.d(K,{T:()=>Z});var Y=z(5491),Q=z(35120),X=z(39984);class Z{constructor(q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt=null,at=null,rt=null){this.collectionMaps=null,this.zone=q,this.assets=K,this.ID=z,this.descKey=Y,this.descCacheKey=Y,this.req=Q,this.area=X,this.areaCache=X,this.onStart=Z,this.onProc=J,this.onComplete=tt,this.reward=et,this.chain=it||!1,this.questGiver=nt,this.questReceiver=at,this.alternateOnStart=rt,this.questStep=st}setup(q,K,z){return this.screen=K,this.map=z,{}}start(q,K,z){return{}}end(){}process(q,K,z){}update(q,K,z){}static getXpRewardedForCompletingQuest(){const q=Q.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.getLevel(),K=Math.pow(.5,q/25);return Math.round(Math.max(this.MIN_QUEST_XP_REWARD,(X.e.starsToLevel(q+1,Y.V.Player)-X.e.starsToLevel(q,Y.V.Player))*K))}onQuestEventDialogue(q){}}Z.MIN_QUEST_XP_REWARD=20},79340:(q,K,z)=>{"use strict";z.d(K,{Z:()=>nt});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(24190),J=z(88022),tt=z(80060),et=z(99625),it=z(76642),st=z(83726);class nt extends st.T{constructor(q,K,z,Y,Q=0,X=0){super(q,K,"",Q,X,[],z,Y),this.isScene=!0,this.hasStarted=!1,this.isScene=!0,this.loadingData={fadeIn:!0,time:1,fadeOut:!0,save:!1}}setup(q,K,z){this.zone.hideFollow(K),K.walkEnabled=!1,K.user.clickEnabled=!1,K.menuBar.active=!1,X.q.instance.prodigy.notifications.clearNotifications(),super.setup(q,K,z)}start(q,K,z){super.start(q,K,z),this.hasStarted=!0}playCutscene(){return(0,Y.sH)(this,void 0,void 0,(function*(){var q;this.cutsceneHUDControllerPromise=tt.d.loadWithInjectedValuesAndDependenciesFromGUID(X.q.instance.prodigy.gameContainer.get("983-05a7"),et.l.CutsceneHUDController,{}),this.cutsceneHUDController=yield this.cutsceneHUDControllerPromise;const K=null===(q=this.cutsceneHUDController)||void 0===q?void 0:q.findChildByName("Disable HUD / Notifs / Input / AreaEvents"),z=null==K?void 0:K.findComponent(it.S);null==z||z.run()}))}endCutscene(){var q,K;null===(q=this.cutsceneHUDControllerPromise)||void 0===q||q.cancel(),null===(K=this.cutsceneHUDController)||void 0===K||K.destroy()}end(q,K){}enterScene(q,K,z){var Y;const X=q.state.getCurrentState();null===(Y=X.hideParentalConsentBanner)||void 0===Y||Y.call(X);const tt=q.width,et=q.height;this.sceneTop=K.menus.addChild(new Z.C(q,0,-50,tt,50,J._.Tiled_sprites_json,"overlay-small")),this.sceneBot=K.menus.addChild(new Z.C(q,0,et,tt,50,J._.Tiled_sprites_json,"overlay-small"));const it=q.add.tween(this.sceneTop,this).to({y:0},1e3,Q.GS3.Quadratic.Out).start();Q.Aq$.isDefined(z)&&it.onTweenComplete.add(z),q.add.tween(this.sceneBot,this).to({y:et-50},1e3,Q.GS3.Quadratic.Out).start(),K.user.unmount()}cleanup(){this.sceneTop&&(this.sceneTop.destroy(),this.sceneTop=null),this.sceneBot&&(this.sceneBot.destroy(),this.sceneBot=null),super.cleanup()}}},1041:(q,K,z)=>{"use strict";z.d(K,{Z:()=>dt});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(88022),J=z(99625),tt=z(35120),et=z(34829),it=z(77078),st=z(28402),nt=z(85515),at=z(92150);class rt extends at._{constructor(q,K,z,Y,Q){super(q,K,z,Y,`${Q}`)}}var ot=z(57750);class ht extends ot.k{constructor(q,K,z,Y,Q=0,X=null,Z,J,tt,et){super(q,K,z,Y,`${Q}`,X,Z,J,tt,et)}}var ct=z(19690);class dt extends Q.s3P{constructor(){super(...arguments),this.animatedSprites=[],this.dynamicSprites=[],this.disabledLayers=[""],this.disabledLayerIDs=[],this.dynamicLayerContainers={},this.contentLayerContainers={},this.tempCollisionData=null,this.onLoad=null,this.assets=new Set,this.skipPrefabInitialization=!1}init(q,K,z,Y,X,J){var et,it;this.cleanupMap(),this.game=q,this.onLoad=J,this.screen=Y,this.above=z,this.below=K,this.dynamicSprites=[],this.dynamicLayerContainers={},Q.Aq$.isDefined(X)&&(this.file=X.mapName),null!==(et=this.assets)&&void 0!==et||(this.assets=new Set),Q.Mnj.addEntry(this.assets,Z._.Tileset_core_json);for(let Z=0;Z0?(K.x+=z.width/2,K.y+=z.height):(K.scale.x=-1,K.y+=z.height/2):"objectgroup"===q.type&&(K.y+=z.height/2,K.scale.x=Y.scale.x,K.scale.y=Y.scale.y),K.add(z)}}this.contentLayerContainers[K].content.destroy()}else ct&&this.initLayer(dt?this.above:this.below,q,st.tilesets,at,dt?null:rt)}}return Q.Aq$.isDefined(this.onLoad)&&this.onLoad(),Q.Aq$.toggleDisplayObjSmooth(this.screen.background,!1),rt}getTiledObjectTypeProperty(q,K){var z;return(null===(z=q.tiledversion)||void 0===z?void 0:z.startsWith("1.9"))?K.class:K.type}enableLayerID(q,K){const z=this.disabledLayerIDs.indexOf(q);K?-1!==z&&this.disabledLayerIDs.splice(z,1):-1===z&&(this.disabledLayerIDs.push(q),this.disabledLayerIDs.sort(((q,K)=>q-K)))}initLayer(q,K,z,Y,X){return Q.Aq$.isDefined(K)?Q.Aq$.isDefined(K.objects)?this.initObjectLayer(q,K,z,Y,X):this.initTiledLayer(q,K,z,Y,X):null}initObjectLayer(q,K,z,Y,X){const Z=Q.Aq$.isDefined(K.properties)&&K.properties.useAnimDuration;for(let J=0;J0?(et.anchor.set(0,1),et.angle=tt.rotation,et.x=tt.x,et.y=parseInt(tt.y)+40):(et.anchor.set(.5,.5),et.x=parseInt(tt.x)+(et.width>>1),et.y=parseInt(tt.y)-(et.height>>1)),this.addSpriteToLayer(et,q,K))}return q}initTiledLayer(q,K,z,Y,X){const Z=Q.Aq$.isDefined(K.properties)&&K.properties.useAnimDuration;for(let J=0;J<32;J++)for(let tt=0;tt<18;tt++){const et=32*tt+J,it=this.getTile(K.data[et],40*J,40*tt,Y,X,z,null,Z);if(Q.Aq$.isDefined(it)){const z=K.opacity;Q.Aq$.isDefined(z)&&(it.alpha=z),this.addSpriteToLayer(it,q,K)}}return q}initImage(q,K){const z=q.properties,Y=K?`singleImage-${z.id}`:`atlas-${z.id}`,X=K?void 0:q.name;tt.q.instance.prodigy.create.sprite(q.x+q.width/2,q.y-q.height/2,Y,X,new Q.I9Y(.5,.5),((q,K)=>{this.screen[z.layer].addChild(q)}))}initSpineObject(q){const K=new Q._mx;K.name=q.name;const z=q.properties;if(K.addComponent(Q.dLy),K.transform.setPosition(q.x+q.width/2,q.y-q.height/2),X.get(z,"flip",!1)){const q=K.transform.localScale;q.x*=-1,K.transform.setScale(q.x,q.y)}const Y=new Q._mx(K);Y.addComponent(Q.dLy);const Z=Y.addComponent(st.v);Z.setAsset(`spine-${z.id}`,(()=>{const q=Q.Aq$.isDefined(z.offsetX)?z.offsetX:0,K=Q.Aq$.isDefined(z.offsetY)?z.offsetY:0;Y.transform.setPosition(q,K),Z.getSpine().setAnimationByName(0,z.animation,z.loop)}));const J=new Q._mx(K);J.addComponent(Q.dLy);const tt=J.addComponent(it.p);tt.InputEnabled=!1,tt.Width=q.width,tt.Height=q.height,this.addObjectToScreen(K,q.properties.layer)}loadPrefab(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=(0,ct.Ks)();return Q.Aq$.isDefined(q.properties.assetKey)?K.loadWithDependenciesFromGUID(J.l[q.properties.assetKey]):K.loadWithDependencies(q.properties.id)}))}initPrefab(q){this.loadPrefab(q).then((K=>{K.name=q.name,K.transform.setPosition(q.x,q.y),q.properties.layer===nt.E.ContentLayer?this.legacyAddObjectToScreen(K,q.properties.layer):this.addObjectToScreen(K,q.properties.layer)})).catch((K=>{Q.VyI.log(`Error loading prefab ${q.properties.id} from TMX Map: ${K}`,Q.$bb.Error)}))}addObjectToScreen(q,K){this.screen?this.screen[`${K}GameObject`]?this.screen[`${K}GameObject`].addChild(q):Q.VyI.log(`TiledMap no ${K} game object to parent object to`,Q.$bb.Error):Q.VyI.log("TiledMap no screen to parent object to",Q.$bb.Error)}legacyAddObjectToScreen(q,K){if(this.screen)if(this.screen[K]){const z=q.findComponent(Q.y4o).getRootContainer();this.screen[K].addChild(z),z.x=q.transform.worldPosition.x,z.y=q.transform.worldPosition.y;const Y=this.game.time.events.loop(et.s.TARGET_FPS_40_MS,(()=>q.update()),this);q.onDestroy.addOnce((()=>this.game.time.events.remove(Y)))}else Q.VyI.log(`TiledMap no ${K} game object to parent object to`,Q.$bb.Error);else Q.VyI.log("TiledMap no screen to parent object to",Q.$bb.Error)}getTile(q,K,z,Y,X,Z,J,tt=!1){const et=Q.Aq$.isDefined(Z)?Z:this.game.cache.getJSON(this.file).tilesets;let it=q;const st=0!=(it&Q.DXe.flippedHorizontally),nt=0!=(it&Q.DXe.flippedVertically),at=0!=(it&Q.DXe.flippedDiagonally);it&=~Q.DXe.all;const ot=this.getTileset(et,it);if(!Q.Aq$.isDefined(ot)||!Q.Aq$.isDefined(it))return null;it-=ot.firstgid;const ct=this.getTileProperties(ot,it,Y);let dt,lt,ut;if(Q.Aq$.isDefined(ct)&&(dt=ct.x),lt=Q.Aq$.isDefined(ot.tiles)&&Q.Aq$.isDefined(ot.tiles[it])?new ht(this.game,K,z,ot.name,it):new rt(this.game,K,z,ot.name,it),(at||nt||st)&&(lt.anchor.set(.5,.5),lt.x+=20,lt.y+=20),at?(lt.angle=-90,Q.Aq$.isDefined(ct)&&(ut=ct.x[1],ut+=ct.x[3],ut+=ct.x[0],ut+=ct.x[2],ct.x=ut),lt.scale.x=-1,Q.Aq$.isDefined(ct)&&(ut=ct.x[1],ut+=ct.x[0],ut+=ct.x[3],ut+=ct.x[2],ct.x=ut),st&&(lt.scale.y=-lt.scale.y,Q.Aq$.isDefined(ct)&&(ut=ct.x[2],ut+=ct.x[3],ut+=ct.x[0],ut+=ct.x[1],ct.x=ut)),nt&&(lt.scale.x=-lt.scale.x,Q.Aq$.isDefined(ct)&&(ut=ct.x[1],ut+=ct.x[0],ut+=ct.x[3],ut+=ct.x[2],ct.x=ut))):(st&&(lt.scale.x=-lt.scale.x,Q.Aq$.isDefined(ct)&&(ut=ct.x[1],ut+=ct.x[0],ut+=ct.x[3],ut+=ct.x[2],ct.x=ut)),nt&&(lt.scale.y=-lt.scale.y,Q.Aq$.isDefined(ct)&&(ut=ct.x[2],ut+=ct.x[3],ut+=ct.x[0],ut+=ct.x[1],ct.x=ut))),Q.Aq$.isDefined(X)&&Q.Aq$.isDefined(ct)&&Q.Aq$.isDefined(ct.x)){const q=ct.x,Y=Math.floor(K/40),Z=Math.floor(z/40);1===parseInt(q[0],10)&&(X[2*Z][2*Y]=0,Q.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*Y,y:2*Z,value:0}),lt.visible=!1,lt.collisionTile=!0)),1===parseInt(q[1],10)&&(X[2*Z][2*Y+1]=0,Q.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*Y+1,y:2*Z,value:0}),lt.visible=!1,lt.collisionTile=!0)),1===parseInt(q[2],10)&&(X[2*Z+1][2*Y]=0,Q.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*Y,y:2*Z+1,value:0}),lt.visible=!1,lt.collisionTile=!0)),1===parseInt(q[3],10)&&(X[2*Z+1][2*Y+1]=0,Q.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*Y+1,y:2*Z+1,value:0}),lt.visible=!1,lt.collisionTile=!0)),6===parseInt(q[0],10)&&(X[2*Z][2*Y]=6,Q.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*Y,y:2*Z,value:6}),lt.visible=!1,lt.collisionTile=!0)),6===parseInt(q[1],10)&&(X[2*Z][2*Y+1]=6,Q.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*Y+1,y:2*Z,value:6}),lt.visible=!1,lt.collisionTile=!0)),6===parseInt(q[2],10)&&(X[2*Z+1][2*Y]=6,Q.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*Y,y:2*Z+1,value:6}),lt.visible=!1,lt.collisionTile=!0)),6===parseInt(q[3],10)&&(X[2*Z+1][2*Y+1]=6,Q.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*Y+1,y:2*Z+1,value:6}),lt.visible=!1,lt.collisionTile=!0))}if(Q.Aq$.isDefined(ct)&&Q.Aq$.isDefined(dt)&&(ct.x=dt),Q.Aq$.isDefined(X)&&J)for(let Q=0;Q<2;Q++)for(let q=0;q<2;q++)X[z/40*2+Q][K/40*2+q]=1;return this.processTileAnimations(lt,ot,it,tt),lt}addSpriteToLayer(q,K,z){var Y,X,Z,J;Q.Aq$.isDefined(z.properties)&&Q.Aq$.isDefined(z.properties.dynamicToggle)?(this.dynamicSprites.push(q),q.isAbove=null!==(X=null===(Y=z.properties)||void 0===Y?void 0:Y.isAbove)&&void 0!==X&&X,q.dynamicToggle=z.properties.dynamicToggle):q.isAnimatedSprite?(this.animatedSprites.push(q),q.isAbove=null!==(J=null===(Z=z.properties)||void 0===Z?void 0:Z.isAbove)&&void 0!==J&&J):K.addChild(q)}processAnimations(q,K){for(let z=0;z=Y.firstgid&&K{"use strict";z.d(K,{W:()=>Y});const Y="house-exterior"},87820:(q,K,z)=>{"use strict";z.d(K,{b:()=>Ct});var Y=z(62459),Q=z(95891),X=z(99625),Z=z(97495),J=z(40295),tt=z(90633),et=z(81137),it=z(35120),st=z(49237),nt=z(76974),at=z(34829),rt=z(93867),ot=z(75781),ht=z(84399),ct=z(46725),dt=z(44677),lt=z(80434),ut=z(52191),ft=z(73797),bt=z(23082),pt=z(15485),vt=z(65050),gt=z(41674),mt=z(87337),yt=z(70703),_t=z(48842),Et=z(45385),wt=z(17425),Tt=z(92864),St=z(30226),At=z(73678);class Ct{get Guardian(){return this.guardian}get timeWhenZoneLoaded(){return this._timeWhenZoneLoaded}get allQuestsAreComplete(){return this.getCurrentQuestID()>0&&!this.quests[this.getCurrentQuestID()]}get isKeystonePlaced(){return 1===it.q.instance.prodigy.world.getZone(At.A_.ACADEMY).getKeystoneState(this.ID)}get finalQuestId(){var q,K,z;return null===(z=null===(K=null===(q=Object.values(this.quests))||void 0===q?void 0:q.slice(-1))||void 0===K?void 0:K.pop())||void 0===z?void 0:z.ID}isTeleportingIntoNewPlayerFTUEZone(q,K){return!K.hasCompletedTutorial()&&this._newPlayerFTUEZones.includes(q)}constructor(q){this.states=[],this.maps={},this.quests={},this.scenes={},this.monsters={},this.bgmID=3,this.debugBounties=!1,this.battleBG="",this.difficultyMode=Z.i.Regular,this.difficultyModeAgnostic=!1,this.mapEnteredFestivalContext=!1,this.questManagerIdentifier="331-a8ba",this._petsInZoneButtonObject=null,this._hidePetsInZoneButtonOnCreate=!1,this._newPlayerFTUEZones=["house-exterior","academy-GH1","academy-GH2"],this.game=q}getMap(q){return this.maps[q]}getScene(q){return this.scenes[q]}getDailyQuestDescription(q){return{}}teleport(q,K,z,Q,X){var Z,J,tt,et;const st=this.getMap(q);if(!Y.Aq$.isDefined(st))return;this._teleportData={mapKey:q,map:st,x:K,y:z,data:Q,ld:X};const nt=`${this.ID}-${this._teleportData.mapKey}`,rt=it.q.instance.prodigy.gameContainer,ot=rt.get("20f-5f67"),dt=rt.get("ad2-c5b2").player,[lt,ut]=it.q.instance.prodigy.world.getCurrentMap().split("-");dt.data.previousZone=dt.data.zone,X.callback||nt!==`${At.A_.ACADEMY}-GH2`&&nt!==`${At.A_.ACADEMY}-${at.s.TOWER_COMMON_ROOM_SHORTFORM}1`&&!nt.includes(`tower-${at.s.TOWER_COMMON_ROOM_SHORTFORM}`)||ot.featureCommon.sendScreenTransitionEvent({screenID:nt,previousScreenID:dt.data.previousZone,transitionType:this.ID!==lt?"spawned":"walk",duration:Y.Aq$.isDefined(X.timeWhenPreviousZoneLoaded)?((new Date).getTime()-X.timeWhenPreviousZoneLoaded)/at.s.SECONDS_TO_MILLISECONDS_MULTIPLIER:null}),dt.setZone(this.ID,nt),dt.forceSaveCharacter(),it.q.instance.prodigy.world.setCurrentMap(nt),this.game.state.states.get(bt.G.TileScreen).initMap(this._teleportData.map,this,this._teleportData.x,this._teleportData.y),this.createLoadingData();const ft=ct.D.getAvailablePrefabMap(nt)||ht.R.isFeatureEnabled()&&(null===(J=null===(Z=ht.R.getVariables())||void 0===Z?void 0:Z.maps)||void 0===J?void 0:J[nt]);if(ft&&!this.isTeleportingIntoNewPlayerFTUEZone(nt,dt)){const Q={BGM_ID:null!==(tt=it.q.instance.prodigy.skin.getSkinOverrideBgm(nt))&&void 0!==tt?tt:this.bgmID,ZONE_MAP_TAG:nt,Zone:this,ZoneId:this.ID,MapTag:q,"331-a8ba":rt.get(this.questManagerIdentifier)};Y.Aq$.isDefined(K)&&Y.Aq$.isDefined(z)&&(Q.ACTIVE_PLAYER_POSITION={x:K,y:z}),this.loadingData.targetInitArgs=[{prefabIDs:[ft],injectedValues:Q}],it.q.instance.prodigy.start(bt.G.PrefabScene,this.loadingData,this._teleportData.data),this.updatePrefabMapFaintData(st.zoneName,K,z)}else it.q.instance.prodigy.start(bt.G.TileScreen,this.loadingData,this._teleportData.data);Y.Aq$.isDefined(ut)&&ut!==q&&(ot.gameWorld.sendMapEnteredEvent(ut,lt,null!==(et=null==X?void 0:X.mapEnteredTransitionType)&&void 0!==et?et:Ct._screenTransactionType,null,this.mapEnteredFestivalContext),Ct._screenTransactionType=mt.iQ.Walk)}updatePrefabMapFaintData(q,K,z){const Q=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;q&&Q&&(Q.onFaintData={mapKey:q,coordinates:Y.Aq$.isDefined(K)&&Y.Aq$.isDefined(z)?{x:K,y:z}:null})}isTutorialZone(){return this.ID===At.A_.ACADEMY||this.ID===At.A_.HOUSE}createLoadingData(){var q,K;this.loadingData=this._teleportData.ld||{},this.loadingData.assets=this.loadingData.assets||[],this.loadingData.assets=this.loadingData.assets.concat(["map-pathing"]).concat(Array.from(this._teleportData.map.assets)),this.loadingData.assets=this.loadingData.assets.concat(it.q.instance.prodigy.skin.getAssets(this._teleportData.map.zoneName));const z=this.getCurrentQuest();Y.Aq$.isDefined(z)&&(this.loadingData.assets=this.loadingData.assets.concat(z.assets)),this.loadingData.assets=[...new Set(this.loadingData.assets)],this.cacheZoneAssets(this.loadingData.assets),this.loadingData.title=Y.Aq$.isDefined(this.loadingData.title)?this.loadingData.title:null===(K=(q=this._teleportData.map).getName)||void 0===K?void 0:K.call(q),this.loadingData.x=this._teleportData.x,this.loadingData.y=this._teleportData.y}teleportLoad(){const q=this.game.state.getCurrentState(),K=this.game.state.get(bt.G.Loading);q.fadeOut?q.fadeOut(!0,(()=>{K.startLoading(this.loadingData)})):K.startLoading(this.loadingData)}teleportPrefabScene(q,K,z,Q){var Z,J,tt;const et=it.q.instance.prodigy,st=et.gameContainer.get("ad2-c5b2").player,nt=`${this.ID}-${q}`,[at,rt]=et.world.getCurrentMap().split("-");et.world.setCurrentMap(nt),st.setZone(this.ID,nt);const ot=it.q.instance.game.state.states.get(bt.G.Loading);ot&&(ot.data.target=bt.G.PrefabScene);const ht=[this.maps[q]];if(dt.p.isQuestComplete||ht.push(X.l.FtuePlayerGoalsHudIcon),et.startPrefabScene(ht,{layers:[],spawnPosition:Y.Aq$.isDefined(K)&&Y.Aq$.isDefined(z)?new Y.I9Y(K,z):null,spawnFacingDirection:null!==(Z=null==Q?void 0:Q.playerDirection)&&void 0!==Z?Z:1,playFSM:null!==(J=null==Q?void 0:Q.runFSMOnLoad)&&void 0!==J?J:null,spawnLocationName:null!==(tt=null==Q?void 0:Q.spawnLocationName)&&void 0!==tt?tt:null}),Y.Aq$.isDefined(rt)&&rt!==q){const q=mt.iQ.Walk;it.q.instance.prodigy.gameContainer.get("20f-5f67").gameWorld.sendMapEnteredEvent(rt,at,this.ID===at?q:mt.iQ.FastTravel)}}playScene(q){const K=this.getScene(q);Y.Aq$.isDefined(K)?this.initScene(K):Y.VyI.log(`Scene: ${q} was not found in Zone: ${this.ID}`,Y.$bb.Warning)}initScene(q,K={}){var z;this.game.state.get(bt.G.TileScreen).initScene(q,this);let Y=q.loadingData;Y.assets=[],Y.assets=Y.assets.concat(["map-pathing"]).concat(Array.from(q.assets)),Y.title=q.name,Y=Q.merge(Y,K),this.cacheZoneAssets(Y.assets),null===(z=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer)||void 0===z||z.unmount(),it.q.instance.prodigy.start(bt.G.TileScreen,Y)}init(q,K,z){}handleLeaving(q,K){var z,Y;null===(z=this._playerGoalsButtonLoadPromise)||void 0===z||z.cancel(),null===(Y=this._playerGoalsButton)||void 0===Y||Y.destroy(),Ct._screenTransactionType=mt.iQ.FastTravel,K()}setup(q,K,z){const Q=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;this.isTutorialZone()||Q.hasCompletedTutorial()||new ut.G("",0).markTutorialComplete(),this.game.broadcaster.broadcast(ft.sd.GetFriendList,ft.HG.FriendsList),z.questParams={};const X=this.getValidatedCurrentQuest();return Y.Aq$.isDefined(X)&&!z.isScene?X.setup(q,K,z):null}start(q,K,z){const Q=this.getCurrentQuest();Y.Aq$.isDefined(Q)&&Q.start(q,K,z),this._timeWhenZoneLoaded=(new Date).getTime()}update(q,K,z){const Q=this.getCurrentQuest();Y.Aq$.isDefined(Q)&&Q.update(q,K,z)}cleanup(){var q,K,z;null===(q=this._playerGoalsButtonLoadPromise)||void 0===q||q.cancel(),it.q.instance.prodigy.load.removeAssets(),this.game.time.events.removeAll(),null===(K=this._petsInZoneButtonObject)||void 0===K||K.destroy(),this._petsInZoneButtonObject=null,null===(z=this._playerGoalsButton)||void 0===z||z.destroy(),this._playerGoalsButton=null,this.loadingData=null}process(q,K,z){Y.Aq$.isDefined(this.monsters)&&(Y.Aq$.isDefined(this.getState("daily"))?St.J.getDate()!==this.getState("daily").date&&this.setState("daily",{date:St.J.getDate(),flags:[1,1,1,1,1],rewards:this.getState("daily").rewards}):this.setState("daily",{date:St.J.getDate(),flags:[1,1,1,1,1],rewards:0}));const Q=this.getCurrentQuest();Y.Aq$.isDefined(Q)&&Q.process(q,K,z)}meetsQuestPrerequisite(){return!0}getQuest(q){return it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.isZoneQuestEnabled?this.quests[q]:void 0}getCurrentQuest(){const q=this.getQuestState();return Y.Aq$.isDefined(q)?this.getQuest(q.ID):null}getValidatedCurrentQuest(){const q=this.getCurrentQuest(),K=this.getQuestState();return this.validateQuestProgress(K,q),q}getState(q){let K=-1;const z=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return K="string"!=typeof q||!q.startsWith("quest")&&!q.startsWith("uniqueEncounters")?this.states.findIndex((K=>K===q)):q,-1===K?null:z.state.get(`zone-${this.ID}-${K}`)}setState(q,K){let z=-1;if("string"==typeof q&&q.startsWith("quest"))z=q;else for(let Y=0;Y!Y.Aq$.isDefined(K.state[q])||1!==K.state[q])).length>0&&q.push(`${this.ID}-${Q}`)}return q}return z.area}}startQuest(q,K=!1){let z=this.getQuestState();if(Y.Aq$.isDefined(z)&&!K||(z={ID:K?q:1}),z.ID!==q)return null;const Q=this.getQuest(z.ID);if(!Q)return null;z.req=St.J.copyObject(Q.req),z.state=St.J.copyObject(Q.state)||{},z.seq=0;return it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.set(`zone-${this.ID}-quest`,z),Q}isQuestStarted(q){const K=this.getQuestState();return!(!Y.Aq$.isDefined(K)||!Y.Aq$.isDefined(K.req)||K.ID!==q)}isQuestComplete(q){if(!this.isQuestStarted(q))return!1;const K=this.getQuestState(),z=this.getQuest(q),Y=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;return this.getQuestState().ID===q&&(!("pet"===K.req.type&&K.req.N>0)&&(!("clear"===K.req.type&&K.req.N>0)&&(!(St.J.inArray(["item","weapon","hat","outfit","boots","key"],K.req.type)&&Y.backpack.hasItem(K.req.type,K.req.ID)"key"===q.type&&q.ID===Ct.ZONE_KEYSTONES[this.ID]))),st=null!==(z=null==tt?void 0:tt.questStep)&&void 0!==z?z:null==tt?void 0:tt.descKey;if(!et&&St.J.isCoreZone(this.ID)?Z.state.set(`zone-${this.ID}-quest`,{ID:Q.ID+1,monsterState:Q.monsterState}):Z.state.set(`zone-${this.ID}-quest`,{ID:Q.ID+1}),st&&""!==st&&X.get("20f-5f67").playerProgression.sendQuestProgressionAdvancedEvent({quest_id:`${q}`,quest_type:"zone_mission",quest_step:et?"Quest Complete":1===q?"Quest Start":st,zone_complete:et}),et){const q=it.q.instance.game.broadcaster;q.addAppListener(ft.n8.GotItemClosed,(()=>{q.removeAppListener(ft.n8.GotItemClosed,this),rt.U.progressData.step===J.B.NotStarted&&Z.hasFoundAllKeystones()&&ot.E.runCollectedLastKeystoneSequence()}),this)}return!0}isQuestProcessed(q){return this.isQuestStarted(q)&&this.isQuestComplete(q)&&this.getQuestState().proc}processQuest(q){if(this.isQuestStarted(q)&&this.isQuestComplete(q)){it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.set(`zone-${this.ID}-quest-proc`,1)}}isOnQuest(q){const K=this.getQuestState();return Y.Aq$.isDefined(K)&&K.ID===q}getCurrentQuestID(){const q=this.getQuestState();return Y.Aq$.isDefined(null==q?void 0:q.ID)?q.ID:0}validateQuestProgress(q,K){var z;const Y=(null==K?void 0:K.req)&&!(null==q?void 0:q.req)&&!this.allQuestsAreComplete,Q=(null==K?void 0:K.req)&&(null==q?void 0:q.req)&&(q.req.ID!==K.req.ID||q.req.type!==K.req.type);(Y||Q)&&K.zone.startQuest(K.ID),(null==K?void 0:K.req)&&(null==q?void 0:q.req)&&"pet"===K.req.type&&Object.keys(null!==(z=null==q?void 0:q.state)&&void 0!==z?z:{}).length>=K.req.N&&q.req.N>0&&(q.state={},it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.set(`zone-${K.zone.ID}-quest`,q))}defeatMonster(q,K,z,Q,X=!1){const Z=this.getQuestState(),J=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;z&&(X?Z.state[K]=1:J.state.set(`zone-${this.ID}-uniqueEncounters-${it.q.instance.prodigy.world.getCurrentMapTag()}-${K}`,1),J.state.updated=!0),Y.Aq$.isDefined(Z)&&Y.Aq$.isDefined(Z.req)&&("pet"===Z.req.type&&Z.req.ID===q&&X||"clear"===Z.req.type&&X?(Z.req.N--,J.state.updated=!0):St.J.isCoreZone(this.ID)&&!z&&J.state.set(`zone-${this.ID}-quest-monsterState-${it.q.instance.prodigy.world.getCurrentMapTag()}-${K}`,1))}isUniqueEncounterDefeated(q){return 1===it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.get(`zone-${this.ID}-uniqueEncounters-${it.q.instance.prodigy.world.getCurrentMapTag()}-${q+1}`)}isNamedUniqueEncounterDefeated(q,K=it.q.instance.prodigy.world.getCurrentMapTag()){return it.q.instance.prodigy.gameContainer.get("782-c308").state.get(`zone-${this.ID}-uniqueEncounters-${K}-${q}`)}isOnSequence(q,K){const z=this.getQuestState();return!(!Y.Aq$.isDefined(z)||z.ID!==q||!Y.Aq$.isDefined(z.req)||z.seq!==K)}isSequenceComplete(q,K){const z=this.getQuestState();return Y.Aq$.isDefined(z)&&z.ID===q&&z.seq>K}completeSequence(q,K){const z=this.getQuestState();if(Y.Aq$.isDefined(z)&&z.ID===q&&Y.Aq$.isDefined(z.req)&&z.seq===K){z.seq++;it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.updated=!0}}getDailyMaps(){const q=[];for(const K in this.maps)q.push(K);return q}hasDaily(q){if(Y.Aq$.isDefined(this.getState("daily"))){const K=new Tt.t(this.getState("daily").date),z=this.getDailyMaps();if(Y.Aq$.isDefined(z))for(let Y=0;Y<5;Y++)if(z[Math.floor(K.jumpFromStart(Y)*(z.length-1))]===q.tag&&0!==this.getState("daily").flags[Y])return!0}return!1}testQuest(q,K,z){it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.state.data.zone[this.ID]={};for(let Y=1;Y{const K=this.game.state.getCurrentState();K.uiLayerGameObject?K.uiLayerGameObject.addChild(q):q.setLayer("ui"),this.setUpPetsInZoneButton(q)})).catch(Y.RQr.createHandler("Unable to load the Pets In Zones Button")))}setUpPetsInZoneButton(q){this._petsInZoneButtonObject=q;const K=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,z=this.ID,Q=q.findComponentInChildren(st.$),Z=q.findComponentInChildren(Et.e),J=K.newPetRescueData.getNumberOfNewRescues(z);if(Z.updateNumberedNotificationBadge(J>0,J),!it.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_PETS_IN_ZONES,tt.B.BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE)){it.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(tt.B.FEATURE_PETS_IN_ZONES,tt.B.BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE);q.findComponentsInChildren(yt.x).forEach((q=>{q.GameObject.active=!0,q.startTween()}))}const et=it.q.instance.prodigy.gameContainer.get("e84-d543");Q.onEnabledClick.add((()=>{Promise.all([et.getPetsInZone(z),et.getMinMaxEnemyLevelsForZone(z)]).then((([q,Y])=>{this.sendPetsInZonesButtonEvent(z),this.sendPetsInZonesInterfaceEvent(z);const J=it.q.instance.prodigy.open.prefabMenu(X.l.Pets_ZoneUI,(()=>Q.unlockState()),void 0,void 0,void 0,{PET_ZONE_ID:this.zoneIndex,PET_ZONE_MENU_STATE:_t.SB.InZone,GRID_VIEW_DATA:q.map((q=>q.ID)),PET_ZONE_ENEMY_MIN_MAX_LEVEL:Y});J.onPrefabLoaded.add((()=>{K.newPetRescueData.clearNewestRescuesByAmount(_t.J8.PET_CARDS_PER_PAGE,z),K.forceSaveCharacter()})),J.onDestroy.add((()=>{this.sendPetsInZonesInterfaceEvent.bind(this,z,!0),K.newPetRescueData.clearNewRescues(),K.forceSaveCharacter(),Z.updateNumberedNotificationBadge(!1,0)}))})).catch(Y.RQr.createHandler("Could not fetch pets for current zone")),Q.lockState(nt.K.Disabled)})),this._hidePetsInZoneButtonOnCreate&&(this._petsInZoneButtonObject.active=!1,this._hidePetsInZoneButtonOnCreate=!1)}togglePetsInZoneButtonVisibility(q){this._petsInZoneButtonObject?this._petsInZoneButtonObject.active=q:this._hidePetsInZoneButtonOnCreate=!q}destroyPetsInZoneButton(){var q;null===(q=this._petsInZoneButtonObject)||void 0===q||q.destroy(),this._petsInZoneButtonObject=null}showTopLeftNavigationButton(){et.x.isFeatureEnabled()||this.spawnPetsInZoneButton()}createTopLeftNavigationButton(){}sendPetsInZonesButtonEvent(q){const K=`pet_menu_${q}`;it.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendButtonEvent({buttonName:K,interfaceName:K,interfaceType:gt.Wm.Modal,saveClickInfo:K})}sendPetsInZonesInterfaceEvent(q,K){const z=`zone_pet_menu_${q}`,Y=gt.Wm.Modal,Q=gt.Lv.ButtonClick,X=`pet_menu_${q}`;it.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:z,interfaceType:Y,instanceType:vt.N.Interface,originType:gt.$N.ButtonClick,originID:K?pt.k.X:X,closeMethod:K?Q:void 0})}getOnFaintData(){const q=it.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.onFaintData;return null!=q?q:{mapKey:this.defaultOnFaint}}}Ct.ZONE_KEYSTONES={[At.A_.FOREST]:3,[At.A_.SHIVERCHILL]:4,[At.A_.BONFIRE]:11,[At.A_.SHIPWRECK]:17,[At.A_.SKYWATCH]:10,[At.A_.FORESTHARD]:3,[At.A_.SHIVERCHILLHARD]:4,[At.A_.BONFIREHARD]:11,[At.A_.SHIPWRECKHARD]:17,[At.A_.SKYWATCHHARD]:10,[At.A_.FORESTEXPERT]:3,[At.A_.SHIVERCHILLEXPERT]:4,[At.A_.BONFIREEXPERT]:11,[At.A_.SHIPWRECKEXPERT]:17,[At.A_.SKYWATCHEXPERT]:10},Ct.ZONE_TOWERS={[At.A_.FOREST]:1,[At.A_.SHIVERCHILL]:3,[At.A_.BONFIRE]:5,[At.A_.SHIPWRECK]:6,[At.A_.SKYWATCH]:4},Ct._screenTransactionType=mt.iQ.Walk},38454:(q,K,z)=>{"use strict";z.d(K,{V:()=>tt});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(26932),J=z(26004);let tt=class extends Z.z{constructor(){super(...arguments),this._counter=0,this.onComplete=new Q.HN0}postCreate(){super.postCreate(),this.bindContext()}advance(){this._counterq.consume()))}unbindContext(){this._context.Container.unbind("ZONE_ENTRY_ILLUSTRATION_DIALOGUE_IDS"),this._context.Container.unbind("ZONE_ENTRY_ILLUSTRATION_CURRENT_DIALOGUE_INDEX"),this._context.Container.unbind("ZONE_ENTRY_ILLUSTRATION_CURRENT_DIALOGUE_ID"),this.gameObject.findComponentsInChildren(J.B).forEach((q=>q.consume()))}destroy(){this.onComplete.dispose(),super.destroy()}};(0,Y.Cg)([(0,Q.g11)(),(0,Y.Sn)("design:type",Number)],tt.prototype,"_illustrationCount",void 0),(0,Y.Cg)([(0,Q.SZi)(),(0,Q.g11)(),(0,Y.Sn)("design:type",Array)],tt.prototype,"_dialogueIds",void 0),(0,Y.Cg)([(0,Q.bbQ)(),(0,Y.Sn)("design:type",Q.HN0)],tt.prototype,"onComplete",void 0),tt=(0,Y.Cg)([(0,Q.EVk)("ZoneEntryIllustrationDataProvider",X.Y.map)],tt)},15804:(q,K,z)=>{"use strict";z.d(K,{h:()=>at});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(35120),J=z(96494),tt=z(90633),et=z(13956),it=z(13021),st=z(80060),nt=z(73678);class at extends Q.s3P{static shouldShowEntryIllustration(q){var K;const z=q.split("-")[0],Y=Z.q.instance.prodigy.world.getZone(z);return at.ZONE_WHITELIST.includes(z)&&(null==Y?void 0:Y.meetsQuestPrerequisite())&&(null==Y?void 0:Y.getCurrentQuestID())<=1&&!it.w.isTitanMap(q)&&!this._breadcrumbManager.isBreadcrumbComplete(tt.B.FEATURE_ZONE_ENTRY_ILLUSTRATION,null!==(K=at.getZoneBreadcrumbName(z))&&void 0!==K?K:"")}static openZoneEntryIllustrationPrefabForZone(q){let K;switch(q){case nt.A_.FOREST:case nt.A_.FORESTHARD:case nt.A_.FORESTEXPERT:K=X.l.ZoneEntryIllustrationFirefly;break;case nt.A_.SHIVERCHILL:case nt.A_.SHIVERCHILLHARD:case nt.A_.SHIVERCHILLEXPERT:K=X.l.ZoneEntryIllustrationShiverchill;break;case nt.A_.SHIPWRECK:case nt.A_.SHIPWRECKHARD:case nt.A_.SHIPWRECKEXPERT:K=X.l.ZoneEntryIllustrationShipwreck;break;case nt.A_.BONFIRE:case nt.A_.BONFIREHARD:case nt.A_.BONFIREEXPERT:K=X.l.ZoneEntryIllustrationBonfire;break;case nt.A_.SKYWATCH:case nt.A_.SKYWATCHHARD:case nt.A_.SKYWATCHEXPERT:K=X.l.ZoneEntryIllustrationSkywatch;break;default:return Q.RQr.createHandler(`No zone entry prefab for zone id ${q}`),new Q.kBN(((K,z)=>z(`No zone entry prefab for zone id ${q}`)))}return st.d.loadWithInjectedValuesAndDependenciesFromGUID(Z.q.instance.prodigy.gameContainer.get("983-05a7"),K,{ZONE_ID:this.getZoneBreadcrumbName(q)})}static getZoneBreadcrumbName(q){switch(q){case nt.A_.LAMPLIGHT:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_LAMPLIGHT;case nt.A_.FOREST:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST;case nt.A_.SHIVERCHILL:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILL;case nt.A_.SKYWATCH:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCH;case nt.A_.BONFIRE:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIRE;case nt.A_.SHIPWRECK:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECK;case nt.A_.FORESTHARD:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTHARD;case nt.A_.SHIVERCHILLHARD:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLHARD;case nt.A_.SKYWATCHHARD:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHHARD;case nt.A_.BONFIREHARD:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREHARD;case nt.A_.SHIPWRECKHARD:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKHARD;case nt.A_.FORESTEXPERT:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTEXPERT;case nt.A_.SHIVERCHILLEXPERT:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLEXPERT;case nt.A_.SKYWATCHEXPERT:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHEXPERT;case nt.A_.BONFIREEXPERT:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREEXPERT;case nt.A_.SHIPWRECKEXPERT:return tt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKEXPERT;default:return null}}}at.ZONE_WHITELIST=[nt.A_.FOREST,nt.A_.SHIVERCHILL,nt.A_.BONFIRE,nt.A_.SHIPWRECK,nt.A_.SKYWATCH,nt.A_.FORESTHARD,nt.A_.SHIVERCHILLHARD,nt.A_.BONFIREHARD,nt.A_.SHIPWRECKHARD,nt.A_.SKYWATCHHARD,nt.A_.FORESTEXPERT,nt.A_.SHIVERCHILLEXPERT,nt.A_.BONFIREEXPERT,nt.A_.SHIPWRECKEXPERT,nt.A_.SKYWATCHEXPERT],(0,Y.Cg)([(0,et.b)("fa1-8ec9"),(0,Y.Sn)("design:type",J.F)],at,"_breadcrumbManager",void 0)},93054:(q,K,z)=>{"use strict";z.d(K,{P:()=>at});var Y,Q,X=z(62459),Z=z(95891);!function(q){q.Equal="=",q.NotEqual="!="}(Y||(Y={})),function(q){q.GreaterThanOrEqualTo=">=",q.LessThanOrEqualTo="<=",q.GreaterThan=">",q.LessThan="<"}(Q||(Q={}));var J,tt=z(35120),et=z(30065),it=z(73678);!function(q){q.ZoneState="zoneState",q.Festival="festival"}(J||(J={}));const st={[it.A_.FOREST]:{A3:[{zone:it.A_.FOREST,tag:"A4"}],A4:[{zone:it.A_.FOREST,tag:"A3"},{zone:it.A_.FOREST,tag:"A5"},{zone:it.A_.FOREST,tag:"B5"}],A5:[{zone:it.A_.FOREST,tag:"A4"}],B5:[{zone:it.A_.FOREST,tag:"A4"},{zone:it.A_.FOREST,tag:"C4"},{zone:it.A_.FOREST,tag:"B6"}],B6:[{zone:it.A_.FOREST,tag:"B5"},{zone:it.A_.FOREST,tag:"B7"}],B7:[{zone:it.A_.FOREST,tag:"B6"},{zone:it.A_.FOREST,tag:"C7"}],B8:[{zone:it.A_.FOREST,tag:"C8"}],C4:[{zone:it.A_.FOREST,tag:"B5"},{zone:it.A_.FOREST,tag:"D3"}],C7:[{zone:it.A_.FOREST,tag:"B7"},{zone:it.A_.FOREST,tag:"C8"}],C8:[{zone:it.A_.FOREST,tag:"C7"},{zone:it.A_.FOREST,tag:"B8"},{zone:it.A_.LAMPLIGHT,tag:"B1"}],D3:[{zone:it.A_.FOREST,tag:"C4"}]},[it.A_.SHIVERCHILL]:{A2:[{zone:it.A_.SHIVERCHILL,tag:"A3"}],A3:[{zone:it.A_.SHIVERCHILL,tag:"A2",prereq:{type:J.ZoneState,dataKey:"furnace",target:3,operator:Q.GreaterThanOrEqualTo}},{zone:it.A_.SHIVERCHILL,tag:"A4"},{zone:it.A_.SHIVERCHILL,tag:"B3"}],A4:[{zone:it.A_.SHIVERCHILL,tag:"A3"},{zone:it.A_.SHIVERCHILL,tag:"A5"}],A5:[{zone:it.A_.SHIVERCHILL,tag:"A4"},{zone:it.A_.SHIVERCHILL,tag:"A6"}],A6:[{zone:it.A_.SHIVERCHILL,tag:"A5"},{zone:it.A_.SHIVERCHILL,tag:"A9",prereq:{type:J.ZoneState,dataKey:"furnace",target:2,operator:Q.GreaterThanOrEqualTo}},{zone:it.A_.SHIVERCHILL,tag:"B6"}],A7:[{zone:it.A_.SHIVERCHILL,tag:"B7"},{zone:it.A_.SHIVERCHILL,tag:"B8"}],A9:[{zone:it.A_.SHIVERCHILL,tag:"A6",prereq:{type:J.ZoneState,dataKey:"furnace",target:2,operator:Q.GreaterThanOrEqualTo}},{zone:it.A_.SHIVERCHILL,tag:"A10"},{zone:it.A_.SHIVERCHILL,tag:"B8",prereq:{type:J.ZoneState,dataKey:"furnace",target:1,operator:Q.GreaterThanOrEqualTo}}],A10:[{zone:it.A_.SHIVERCHILL,tag:"A9"},{zone:it.A_.SHIVERCHILL,tag:"A11"},{zone:it.A_.SHIVERCHILL,tag:"B10"}],A11:[{zone:it.A_.SHIVERCHILL,tag:"A10"}],B1:[{zone:it.A_.SHIVERCHILL,tag:"B3"}],B2:[{zone:it.A_.SHIVERCHILL,tag:"B3"}],B3:[{zone:it.A_.SHIVERCHILL,tag:"A3"},{zone:it.A_.SHIVERCHILL,tag:"B1"},{zone:it.A_.SHIVERCHILL,tag:"B2",prereq:{type:J.ZoneState,dataKey:"furnace",target:3,operator:Q.GreaterThanOrEqualTo}}],B6:[{zone:it.A_.SHIVERCHILL,tag:"A6"},{zone:it.A_.SHIVERCHILL,tag:"B7"}],B7:[{zone:it.A_.SHIVERCHILL,tag:"A7"},{zone:it.A_.SHIVERCHILL,tag:"B6"}],B8:[{zone:it.A_.SHIVERCHILL,tag:"A7"},{zone:it.A_.SHIVERCHILL,tag:"A9"}],B9:[{zone:it.A_.SHIVERCHILL,tag:"B10"}],B10:[{zone:it.A_.SHIVERCHILL,tag:"A10"},{zone:it.A_.SHIVERCHILL,tag:"B9"}]},[it.A_.SKYWATCH]:{A0:[{zone:it.A_.SKYWATCH,tag:"A1"},{zone:it.A_.SHIVERCHILL,tag:"B1"}],A1:[{zone:it.A_.SKYWATCH,tag:"A0"},{zone:it.A_.SKYWATCH,tag:"B1"},{zone:it.A_.SKYWATCH,tag:"C1"},{zone:it.A_.SKYWATCH,tag:"D1"}],B1:[{zone:it.A_.SKYWATCH,tag:"A1"},{zone:it.A_.SKYWATCH,tag:"B2"},{zone:it.A_.SKYWATCH,tag:"B3"}],B2:[{zone:it.A_.SKYWATCH,tag:"B1"}],B3:[{zone:it.A_.SKYWATCH,tag:"B1"}],C1:[{zone:it.A_.SKYWATCH,tag:"A1"},{zone:it.A_.SKYWATCH,tag:"C2"},{zone:it.A_.SKYWATCH,tag:"C3"}],C2:[{zone:it.A_.SKYWATCH,tag:"C1"}],C3:[{zone:it.A_.SKYWATCH,tag:"C1"},{zone:it.A_.SKYWATCH,tag:"C4"}],C4:[{zone:it.A_.SKYWATCH,tag:"C3"}],D1:[{zone:it.A_.SKYWATCH,tag:"A1"},{zone:it.A_.SKYWATCH,tag:"D2"},{zone:it.A_.SKYWATCH,tag:"E1"}],D2:[{zone:it.A_.SKYWATCH,tag:"D1"},{zone:it.A_.SKYWATCH,tag:"D3"}],D3:[{zone:it.A_.SKYWATCH,tag:"D2"}],E1:[{zone:it.A_.SKYWATCH,tag:"D1"},{zone:it.A_.SKYWATCH,tag:"E2"},{zone:it.A_.SKYWATCH,tag:"E3"}],E2:[{zone:it.A_.SKYWATCH,tag:"E1"}],E3:[{zone:it.A_.SKYWATCH,tag:"E1"},{zone:it.A_.SKYWATCH,tag:"E4"}],E4:[{zone:it.A_.SKYWATCH,tag:"E3"},{zone:it.A_.SKYWATCH,tag:"E5"}],E5:[{zone:it.A_.SKYWATCH,tag:"E4"}]},[it.A_.BONFIRE]:{A1:[{zone:it.A_.BONFIRE,tag:"B1"}],A4:[{zone:it.A_.BONFIRE,tag:"B4"}],B1:[{zone:it.A_.BONFIRE,tag:"C1"},{zone:it.A_.BONFIRE,tag:"B2"},{zone:it.A_.BONFIRE,tag:"A1"}],B2:[{zone:it.A_.BONFIRE,tag:"B1"},{zone:it.A_.BONFIRE,tag:"C3"},{zone:it.A_.BONFIRE,tag:"B4"}],B4:[{zone:it.A_.BONFIRE,tag:"A4"},{zone:it.A_.BONFIRE,tag:"B2"},{zone:it.A_.BONFIRE,tag:"C4"},{zone:it.A_.BONFIRE,tag:"B5"}],B5:[{zone:it.A_.BONFIRE,tag:"B4"},{zone:it.A_.BONFIRE,tag:"C6"}],C1:[{zone:it.A_.BONFIRE,tag:"D1"},{zone:it.A_.BONFIRE,tag:"D2"},{zone:it.A_.BONFIRE,tag:"B1"}],C2:[{zone:it.A_.BONFIRE,tag:"C3"}],C3:[{zone:it.A_.BONFIRE,tag:"C2"},{zone:it.A_.BONFIRE,tag:"D3"},{zone:it.A_.BONFIRE,tag:"B2"}],C4:[{zone:it.A_.BONFIRE,tag:"D4"},{zone:it.A_.BONFIRE,tag:"B4"}],C6:[{zone:it.A_.BONFIRE,tag:"D5"},{zone:it.A_.BONFIRE,tag:"D6"},{zone:it.A_.BONFIRE,tag:"B5"}],D1:[{zone:it.A_.BONFIRE,tag:"C1"}],D2:[{zone:it.A_.BONFIRE,tag:"C1"}],D3:[{zone:it.A_.BONFIRE,tag:"C3"}],D4:[{zone:it.A_.BONFIRE,tag:"C4"}],D5:[{zone:it.A_.BONFIRE,tag:"E6"},{zone:it.A_.BONFIRE,tag:"C6"}],D6:[{zone:it.A_.BONFIRE,tag:"C6"}],E5:[{zone:it.A_.BONFIRE,tag:"E6"}],E6:[{zone:it.A_.BONFIRE,tag:"E5"},{zone:it.A_.BONFIRE,tag:"D5"}]},[it.A_.SHIPWRECK]:{A1:[{zone:it.A_.SHIPWRECK,tag:"A2"},{zone:it.A_.SHIPWRECK,tag:"B2"}],A2:[{zone:it.A_.SHIPWRECK,tag:"A1"},{zone:it.A_.SHIPWRECK,tag:"A3"}],A3:[{zone:it.A_.SHIPWRECK,tag:"A2"}],A4:[{zone:it.A_.SHIPWRECK,tag:"A5"},{zone:it.A_.SHIPWRECK,tag:"B4"}],A5:[{zone:it.A_.SHIPWRECK,tag:"A4"}],A7:[{zone:it.A_.SHIPWRECK,tag:"B6"},{zone:it.A_.SHIPWRECK,tag:"B7"}],B2:[{zone:it.A_.SHIPWRECK,tag:"A1"},{zone:it.A_.SHIPWRECK,tag:"B4"}],B4:[{zone:it.A_.SHIPWRECK,tag:"A4"},{zone:it.A_.SHIPWRECK,tag:"B2"},{zone:it.A_.SHIPWRECK,tag:"B5"}],B5:[{zone:it.A_.SHIPWRECK,tag:"B4"},{zone:it.A_.SHIPWRECK,tag:"B6"}],B6:[{zone:it.A_.SHIPWRECK,tag:"A7"},{zone:it.A_.SHIPWRECK,tag:"B5"},{zone:it.A_.SHIPWRECK,tag:"C6"}],B7:[{zone:it.A_.SHIPWRECK,tag:"A7"},{zone:it.A_.SHIPWRECK,tag:"C7"},{zone:it.A_.SHIPWRECK,tag:"C9",prereq:{type:J.ZoneState,dataKey:"inkC9",target:1,operator:Q.GreaterThanOrEqualTo}}],B8:[{zone:it.A_.SHIPWRECK,tag:"C8"}],B10:[{zone:it.A_.SHIPWRECK,tag:"B11"}],B11:[{zone:it.A_.SHIPWRECK,tag:"B10"},{zone:it.A_.SHIPWRECK,tag:"C11"}],B12:[{zone:it.A_.SHIPWRECK,tag:"B13"},{zone:it.A_.SHIPWRECK,tag:"C12"}],B13:[{zone:it.A_.SHIPWRECK,tag:"B12"}],C6:[{zone:it.A_.SHIPWRECK,tag:"B6"}],C7:[{zone:it.A_.SHIPWRECK,tag:"B7"},{zone:it.A_.SHIPWRECK,tag:"C8"}],C8:[{zone:it.A_.SHIPWRECK,tag:"B8"},{zone:it.A_.SHIPWRECK,tag:"C7"},{zone:it.A_.SHIPWRECK,tag:"C9"}],C9:[{zone:it.A_.SHIPWRECK,tag:"B7",prereq:{type:J.ZoneState,dataKey:"inkB7",target:1,operator:Q.GreaterThanOrEqualTo}},{zone:it.A_.SHIPWRECK,tag:"C8"},{zone:it.A_.SHIPWRECK,tag:"C10"}],C10:[{zone:it.A_.SHIPWRECK,tag:"C9"},{zone:it.A_.SHIPWRECK,tag:"C11"}],C11:[{zone:it.A_.SHIPWRECK,tag:"B11"},{zone:it.A_.SHIPWRECK,tag:"C10"},{zone:it.A_.SHIPWRECK,tag:"C12"}],C12:[{zone:it.A_.SHIPWRECK,tag:"B12"},{zone:it.A_.SHIPWRECK,tag:"C11"}]},[it.A_.LAMPLIGHT]:{A1:[{zone:it.A_.LAMPLIGHT,tag:"B2"}],A2:[{zone:it.A_.LAMPLIGHT,tag:"B2"},{zone:it.A_.LAMPLIGHT,tag:"A3"}],A3:[{zone:it.A_.LAMPLIGHT,tag:"A2"},{zone:it.A_.LAMPLIGHT,tag:"B3"},{zone:it.A_.LAMPLIGHT,tag:"A4"}],A4:[{zone:it.A_.LAMPLIGHT,tag:"A3"},{zone:it.A_.LAMPLIGHT,tag:"B4"},{zone:it.A_.LAMPLIGHT,tag:"B2"},{zone:it.A_.LAMPLIGHT,tag:"house-exit"}],B0:[{zone:it.A_.LAMPLIGHT,tag:"B1"}],B1:[{zone:it.A_.FOREST,tag:"C8"},{zone:it.A_.LAMPLIGHT,tag:"B2"}],B2:[{zone:it.A_.LAMPLIGHT,tag:"B1"},{zone:it.A_.LAMPLIGHT,tag:"C2"},{zone:it.A_.LAMPLIGHT,tag:"A2"}],B3:[{zone:it.A_.LAMPLIGHT,tag:"A3"},{zone:it.A_.LAMPLIGHT,tag:"C3"},{zone:it.A_.MOON,tag:"A1",prereq:{type:J.Festival,activeFestival:et.Q.MoonlightFestival}}],B4:[{zone:it.A_.LAMPLIGHT,tag:"A4"},{zone:it.A_.LAMPLIGHT,tag:"C4"},{zone:it.A_.LAMPLIGHT,tag:"B5"}],B5:[{zone:it.A_.LAMPLIGHT,tag:"B4"}],C2:[{zone:it.A_.LAMPLIGHT,tag:"B2"},{zone:it.A_.LAMPLIGHT,tag:"C3"}],C3:[{zone:it.A_.LAMPLIGHT,tag:"B3"},{zone:it.A_.LAMPLIGHT,tag:"C2"},{zone:it.A_.LAMPLIGHT,tag:"C4"},{zone:it.A_.LAMPLIGHT,tag:"D3"}],C4:[{zone:it.A_.LAMPLIGHT,tag:"B4"},{zone:it.A_.LAMPLIGHT,tag:"C3"}],D3:[{zone:it.A_.LAMPLIGHT,tag:"C3"}]},[it.A_.FORESTHARD]:{A3:[{zone:it.A_.FORESTHARD,tag:"A4"}],A4:[{zone:it.A_.FORESTHARD,tag:"A3"},{zone:it.A_.FORESTHARD,tag:"A5"},{zone:it.A_.FORESTHARD,tag:"B5"}],A5:[{zone:it.A_.FORESTHARD,tag:"A4"}],B5:[{zone:it.A_.FORESTHARD,tag:"A4"},{zone:it.A_.FORESTHARD,tag:"C4"},{zone:it.A_.FORESTHARD,tag:"B6"}],B6:[{zone:it.A_.FORESTHARD,tag:"B5"},{zone:it.A_.FORESTHARD,tag:"B7"}],B7:[{zone:it.A_.FORESTHARD,tag:"B6"},{zone:it.A_.FORESTHARD,tag:"C7"}],B8:[{zone:it.A_.FORESTHARD,tag:"C8"}],C4:[{zone:it.A_.FORESTHARD,tag:"B5"},{zone:it.A_.FORESTHARD,tag:"D3"}],C7:[{zone:it.A_.FORESTHARD,tag:"B7"},{zone:it.A_.FORESTHARD,tag:"C8"}],C8:[{zone:it.A_.FORESTHARD,tag:"C7"},{zone:it.A_.FORESTHARD,tag:"B8"},{zone:it.A_.LAMPLIGHT,tag:"B1"}],D3:[{zone:it.A_.FORESTHARD,tag:"C4"}]},[it.A_.SHIVERCHILLHARD]:{A2:[{zone:it.A_.SHIVERCHILLHARD,tag:"A3"}],A3:[{zone:it.A_.SHIVERCHILLHARD,tag:"A2",prereq:{type:J.ZoneState,dataKey:"furnace",target:3,operator:Q.GreaterThanOrEqualTo}},{zone:it.A_.SHIVERCHILLHARD,tag:"A4"},{zone:it.A_.SHIVERCHILLHARD,tag:"B3"}],A4:[{zone:it.A_.SHIVERCHILLHARD,tag:"A3"},{zone:it.A_.SHIVERCHILLHARD,tag:"A5"}],A5:[{zone:it.A_.SHIVERCHILLHARD,tag:"A4"},{zone:it.A_.SHIVERCHILLHARD,tag:"A6"}],A6:[{zone:it.A_.SHIVERCHILLHARD,tag:"A5"},{zone:it.A_.SHIVERCHILLHARD,tag:"A9",prereq:{type:J.ZoneState,dataKey:"furnace",target:2,operator:Q.GreaterThanOrEqualTo}},{zone:it.A_.SHIVERCHILLHARD,tag:"B6"}],A7:[{zone:it.A_.SHIVERCHILLHARD,tag:"B7"},{zone:it.A_.SHIVERCHILLHARD,tag:"B8"}],A9:[{zone:it.A_.SHIVERCHILLHARD,tag:"A6",prereq:{type:J.ZoneState,dataKey:"furnace",target:2,operator:Q.GreaterThanOrEqualTo}},{zone:it.A_.SHIVERCHILLHARD,tag:"A10"},{zone:it.A_.SHIVERCHILLHARD,tag:"B8",prereq:{type:J.ZoneState,dataKey:"furnace",target:1,operator:Q.GreaterThanOrEqualTo}}],A10:[{zone:it.A_.SHIVERCHILLHARD,tag:"A9"},{zone:it.A_.SHIVERCHILLHARD,tag:"A11"},{zone:it.A_.SHIVERCHILLHARD,tag:"B10"}],A11:[{zone:it.A_.SHIVERCHILLHARD,tag:"A10"}],B1:[{zone:it.A_.SHIVERCHILLHARD,tag:"B3"}],B2:[{zone:it.A_.SHIVERCHILLHARD,tag:"B3"}],B3:[{zone:it.A_.SHIVERCHILLHARD,tag:"A3"},{zone:it.A_.SHIVERCHILLHARD,tag:"B1"},{zone:it.A_.SHIVERCHILLHARD,tag:"B2",prereq:{type:J.ZoneState,dataKey:"furnace",target:3,operator:Q.GreaterThanOrEqualTo}}],B6:[{zone:it.A_.SHIVERCHILLHARD,tag:"A6"},{zone:it.A_.SHIVERCHILLHARD,tag:"B7"}],B7:[{zone:it.A_.SHIVERCHILLHARD,tag:"A7"},{zone:it.A_.SHIVERCHILLHARD,tag:"B6"}],B8:[{zone:it.A_.SHIVERCHILLHARD,tag:"A7"},{zone:it.A_.SHIVERCHILLHARD,tag:"A9"}],B9:[{zone:it.A_.SHIVERCHILLHARD,tag:"B10"}],B10:[{zone:it.A_.SHIVERCHILLHARD,tag:"A10"},{zone:it.A_.SHIVERCHILLHARD,tag:"B9"}]},[it.A_.SKYWATCHHARD]:{A0:[{zone:it.A_.SKYWATCHHARD,tag:"A1"},{zone:it.A_.SHIVERCHILLHARD,tag:"B1"}],A1:[{zone:it.A_.SKYWATCHHARD,tag:"A0"},{zone:it.A_.SKYWATCHHARD,tag:"B1"},{zone:it.A_.SKYWATCHHARD,tag:"C1"},{zone:it.A_.SKYWATCHHARD,tag:"D1"}],B1:[{zone:it.A_.SKYWATCHHARD,tag:"A1"},{zone:it.A_.SKYWATCHHARD,tag:"B2"},{zone:it.A_.SKYWATCHHARD,tag:"B3"}],B2:[{zone:it.A_.SKYWATCHHARD,tag:"B1"}],B3:[{zone:it.A_.SKYWATCHHARD,tag:"B1"}],C1:[{zone:it.A_.SKYWATCHHARD,tag:"A1"},{zone:it.A_.SKYWATCHHARD,tag:"C2"},{zone:it.A_.SKYWATCHHARD,tag:"C3"}],C2:[{zone:it.A_.SKYWATCHHARD,tag:"C1"}],C3:[{zone:it.A_.SKYWATCHHARD,tag:"C1"},{zone:it.A_.SKYWATCHHARD,tag:"C4"}],C4:[{zone:it.A_.SKYWATCHHARD,tag:"C3"}],D1:[{zone:it.A_.SKYWATCHHARD,tag:"A1"},{zone:it.A_.SKYWATCHHARD,tag:"D2"},{zone:it.A_.SKYWATCHHARD,tag:"E1"}],D2:[{zone:it.A_.SKYWATCHHARD,tag:"D1"},{zone:it.A_.SKYWATCHHARD,tag:"D3"}],D3:[{zone:it.A_.SKYWATCHHARD,tag:"D2"}],E1:[{zone:it.A_.SKYWATCHHARD,tag:"D1"},{zone:it.A_.SKYWATCHHARD,tag:"E2"},{zone:it.A_.SKYWATCHHARD,tag:"E3"}],E2:[{zone:it.A_.SKYWATCHHARD,tag:"E1"}],E3:[{zone:it.A_.SKYWATCHHARD,tag:"E1"},{zone:it.A_.SKYWATCHHARD,tag:"E4"}],E4:[{zone:it.A_.SKYWATCHHARD,tag:"E3"},{zone:it.A_.SKYWATCHHARD,tag:"E5"}],E5:[{zone:it.A_.SKYWATCHHARD,tag:"E4"}]},[it.A_.BONFIREHARD]:{A1:[{zone:it.A_.BONFIREHARD,tag:"B1"}],A4:[{zone:it.A_.BONFIREHARD,tag:"B4"}],B1:[{zone:it.A_.BONFIREHARD,tag:"C1"},{zone:it.A_.BONFIREHARD,tag:"B2"},{zone:it.A_.BONFIREHARD,tag:"A1"}],B2:[{zone:it.A_.BONFIREHARD,tag:"B1"},{zone:it.A_.BONFIREHARD,tag:"C3"},{zone:it.A_.BONFIREHARD,tag:"B4"}],B4:[{zone:it.A_.BONFIREHARD,tag:"A4"},{zone:it.A_.BONFIREHARD,tag:"B2"},{zone:it.A_.BONFIREHARD,tag:"C4"},{zone:it.A_.BONFIREHARD,tag:"B5"}],B5:[{zone:it.A_.BONFIREHARD,tag:"B4"},{zone:it.A_.BONFIREHARD,tag:"C6"}],C1:[{zone:it.A_.BONFIREHARD,tag:"D1"},{zone:it.A_.BONFIREHARD,tag:"D2"},{zone:it.A_.BONFIREHARD,tag:"B1"}],C2:[{zone:it.A_.BONFIREHARD,tag:"C3"}],C3:[{zone:it.A_.BONFIREHARD,tag:"C2"},{zone:it.A_.BONFIREHARD,tag:"D3"},{zone:it.A_.BONFIREHARD,tag:"B2"}],C4:[{zone:it.A_.BONFIREHARD,tag:"D4"},{zone:it.A_.BONFIREHARD,tag:"B4"}],C6:[{zone:it.A_.BONFIREHARD,tag:"D5"},{zone:it.A_.BONFIREHARD,tag:"D6"},{zone:it.A_.BONFIREHARD,tag:"B5"}],D1:[{zone:it.A_.BONFIREHARD,tag:"C1"}],D2:[{zone:it.A_.BONFIREHARD,tag:"C1"}],D3:[{zone:it.A_.BONFIREHARD,tag:"C3"}],D4:[{zone:it.A_.BONFIREHARD,tag:"C4"}],D5:[{zone:it.A_.BONFIREHARD,tag:"E6"},{zone:it.A_.BONFIREHARD,tag:"C6"}],D6:[{zone:it.A_.BONFIREHARD,tag:"C6"}],E5:[{zone:it.A_.BONFIREHARD,tag:"E6"}],E6:[{zone:it.A_.BONFIREHARD,tag:"E5"},{zone:it.A_.BONFIREHARD,tag:"D5"}]},[it.A_.SHIPWRECKHARD]:{A1:[{zone:it.A_.SHIPWRECKHARD,tag:"A2"},{zone:it.A_.SHIPWRECKHARD,tag:"B2"}],A2:[{zone:it.A_.SHIPWRECKHARD,tag:"A1"},{zone:it.A_.SHIPWRECKHARD,tag:"A3"}],A3:[{zone:it.A_.SHIPWRECKHARD,tag:"A2"}],A4:[{zone:it.A_.SHIPWRECKHARD,tag:"A5"},{zone:it.A_.SHIPWRECKHARD,tag:"B4"}],A5:[{zone:it.A_.SHIPWRECKHARD,tag:"A4"}],A7:[{zone:it.A_.SHIPWRECKHARD,tag:"B6"},{zone:it.A_.SHIPWRECKHARD,tag:"B7"}],B2:[{zone:it.A_.SHIPWRECKHARD,tag:"A1"},{zone:it.A_.SHIPWRECKHARD,tag:"B4"}],B4:[{zone:it.A_.SHIPWRECKHARD,tag:"A4"},{zone:it.A_.SHIPWRECKHARD,tag:"B2"},{zone:it.A_.SHIPWRECKHARD,tag:"B5"}],B5:[{zone:it.A_.SHIPWRECKHARD,tag:"B4"},{zone:it.A_.SHIPWRECKHARD,tag:"B6"}],B6:[{zone:it.A_.SHIPWRECKHARD,tag:"A7"},{zone:it.A_.SHIPWRECKHARD,tag:"B5"},{zone:it.A_.SHIPWRECKHARD,tag:"C6"}],B7:[{zone:it.A_.SHIPWRECKHARD,tag:"A7"},{zone:it.A_.SHIPWRECKHARD,tag:"C7"},{zone:it.A_.SHIPWRECKHARD,tag:"C9",prereq:{type:J.ZoneState,dataKey:"inkC9",target:1,operator:Q.GreaterThanOrEqualTo}}],B8:[{zone:it.A_.SHIPWRECKHARD,tag:"C8"}],B10:[{zone:it.A_.SHIPWRECKHARD,tag:"B11"}],B11:[{zone:it.A_.SHIPWRECKHARD,tag:"B10"},{zone:it.A_.SHIPWRECKHARD,tag:"C11"}],B12:[{zone:it.A_.SHIPWRECKHARD,tag:"B13"},{zone:it.A_.SHIPWRECKHARD,tag:"C12"}],B13:[{zone:it.A_.SHIPWRECKHARD,tag:"B12"}],C6:[{zone:it.A_.SHIPWRECKHARD,tag:"B6"}],C7:[{zone:it.A_.SHIPWRECKHARD,tag:"B7"},{zone:it.A_.SHIPWRECKHARD,tag:"C8"}],C8:[{zone:it.A_.SHIPWRECKHARD,tag:"B8"},{zone:it.A_.SHIPWRECKHARD,tag:"C7"},{zone:it.A_.SHIPWRECKHARD,tag:"C9"}],C9:[{zone:it.A_.SHIPWRECKHARD,tag:"B7",prereq:{type:J.ZoneState,dataKey:"inkB7",target:1,operator:Q.GreaterThanOrEqualTo}},{zone:it.A_.SHIPWRECKHARD,tag:"C8"},{zone:it.A_.SHIPWRECKHARD,tag:"C10"}],C10:[{zone:it.A_.SHIPWRECKHARD,tag:"C9"},{zone:it.A_.SHIPWRECKHARD,tag:"C11"}],C11:[{zone:it.A_.SHIPWRECKHARD,tag:"B11"},{zone:it.A_.SHIPWRECKHARD,tag:"C10"},{zone:it.A_.SHIPWRECKHARD,tag:"C12"}],C12:[{zone:it.A_.SHIPWRECKHARD,tag:"B12"},{zone:it.A_.SHIPWRECKHARD,tag:"C11"}]},[it.A_.MOON]:{A1:[{zone:it.A_.MOON,tag:"B1"}],B1:[{zone:it.A_.MOON,tag:"A1"},{zone:it.A_.MOON,tag:"C1"}],C1:[{zone:it.A_.MOON,tag:"B1"},{zone:it.A_.MOON,tag:"D1"}],D1:[{zone:it.A_.MOON,tag:"C1"}]},[it.A_.SPRINGFESTGROTTO_BUNNY]:{A3:[{zone:it.A_.SPRINGFESTGROTTO_BUNNY,tag:"B7"}],A9:[{zone:it.A_.SPRINGFESTGROTTO_BUNNY,tag:"B2"},{zone:it.A_.SPRINGFESTGROTTO_BUNNY,tag:"B7"}],B2:[{zone:it.A_.SPRINGFESTGROTTO_BUNNY,tag:"A9"}],B7:[{zone:it.A_.SPRINGFESTGROTTO_BUNNY,tag:"A3"},{zone:it.A_.SPRINGFESTGROTTO_BUNNY,tag:"A9"}]},[it.A_.SPRINGFESTGROTTO_FOX]:{A3:[{zone:it.A_.SPRINGFESTGROTTO_FOX,tag:"B7"}],A9:[{zone:it.A_.SPRINGFESTGROTTO_FOX,tag:"B2"},{zone:it.A_.SPRINGFESTGROTTO_FOX,tag:"B7"}],B2:[{zone:it.A_.SPRINGFESTGROTTO_FOX,tag:"A9"}],B7:[{zone:it.A_.SPRINGFESTGROTTO_FOX,tag:"A3"},{zone:it.A_.SPRINGFESTGROTTO_FOX,tag:"A9"}]}};var nt=z(39144);class at{static findShortestPaths(q,K){return this.findShortestPathsInternal(q,K)}static findShortestPathsInternal(q,K,z=[]){const Y=[...z,q];if(q===K)return[Y];const Q=q.split("-");if(Q.length<2)return void X.VyI.log(`Invalid map format: ${q}`,X.$bb.Error);const Z=Q[0],J=Q[1],tt=st[Z];if(!(null==tt?void 0:tt[J]))return;const et=tt[J];let it,nt=1/0;for(const X of et){if(!this.isConnectionAvailable(X))continue;const q=`${X.zone}-${X.tag}`;if(Y.includes(q))continue;const z=this.findShortestPathsInternal(q,K,Y);if(z&&z.length>0){const q=z[0].length;qthis.findShortestPaths(q,K))).filter((q=>q));if(0===z.length)return;const Y=Math.min(...z.map((q=>q[0].length)));return Z.flatten(z.filter((q=>q[0].length===Y)))}static findShortestPathsToAllOf(q,K){const z=K.map((K=>this.findShortestPaths(q,K))).filter((q=>q));return 0===z.length?[]:Z.flatten(z)}static isHouse(q){return X.Aq$.isDefined(q)&&q.indexOf(it.A_.HOUSE)>-1&&-1===q.indexOf("exit")}static isConnectionAvailable(q){var K;if(!q.prereq)return!0;let z,Z,et,it;switch(q.prereq.type){case J.ZoneState:return z=tt.q.instance.prodigy.world.getCurrentZoneObject(),Z=z.getState(q.prereq.dataKey),"object"==typeof Z&&null!==Z?(X.VyI.log("Unable to compare zone state objects in a map connection prerequisite comparison",X.$bb.Error),!1):(et=q.prereq.target,class{static compare(q,K,z){if(z in Q&&(!this.isNumeric(q)||!this.isNumeric(K)))return console.log(`Unable to compare non-numeric values: ${q} and ${K} with operator ${z}`),!1;switch(z){case Y.Equal:return q===K;case Y.NotEqual:return q!==K;case Q.GreaterThan:return q>K;case Q.GreaterThanOrEqualTo:return q>=K;case Q.LessThan:return qz.finalQuestId}static getTargetMapsFromLocations(q,K){const z=null!=K?K:tt.q.instance.prodigy.world.getCurrentZoneObject(),Y=[];for(const Q of q)if("string"!=typeof Q){if(Q.uniqueEncounters){if(Object.entries(Q.uniqueEncounters).every((([q,K])=>K.every((K=>z.isNamedUniqueEncounterDefeated(K,q))))))continue}if(Q.requiredStates){if(!Object.entries(Q.requiredStates).every((([q,K])=>{var Y;return(null!==(Y=z.getState(q))&&void 0!==Y?Y:void 0)===K})))continue}if(Q.disallowedStates){if(Object.entries(Q.disallowedStates).every((([q,K])=>{var Y;return(null!==(Y=z.getState(q))&&void 0!==Y?Y:void 0)===K})))continue}Y.push(Q.location)}else Y.push(Q);return Y}static manageTeleportTriggerGuideHands(q,K){let z;const Y=null!=K?K:this.findSceneTeleportTriggers();return Y.length?(Y.forEach((K=>{const Y=K.GameObject.findComponentInChildren(nt.P,!0);Y&&(K.targetMapTag===q?(Y.spawnGuideHand().catch(X.RQr.createHandler("Failed to spawn guide hand")),z=Y):Y.despawnGuideHand())})),z):z}static despawnTeleportTriggerGuideHands(q){(null!=q?q:this.findSceneTeleportTriggers()).forEach((q=>{const K=q.GameObject.findComponentInChildren(nt.P,!0);K&&K.despawnGuideHand()}))}static findSceneTeleportTriggers(){let q=[];return X.wa5.getActiveScene().container.sourceContainer.isBound("TELEPORT_TRIGGER")&&(q=X.wa5.getActiveScene().container.sourceContainer.getAll("TELEPORT_TRIGGER")),Z.uniq(q)}}},85126:(q,K,z)=>{"use strict";z.d(K,{N:()=>oe,s:()=>se});var Y=z(62459),Q=z(51742),X=z(84317),Z=z(90633),J=z(73678),tt=z(25531),et=z(35120),it=z(34829),st=z(77938),nt=z(11624),at=z(35569),rt=z(87820),ot=z(56942),ht=z(93867),ct=z(77078),dt=z(10213);class lt extends dt.z{constructor(q,K){super(q,"CR1","MAP_ACADEMY_SECOND_FLOOR",640,520,["academy-CR1"],K.concat([ot.Q.Spine_academy_landingdoors_json,ot.Q.Spine_pmlocks_basic_json])),this.localizer=null}setup(q,K,z){super.setup(q,K,z),this.localizer=et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService);const Q=this.game.width,X=this.game.height;this.addAreaEvent(q,K,{x:162,y:X,w:500,h:80,rect:!0},"academy-CR2",162,100),this.addAreaEvent(q,K,{x:Q-162,y:X,w:500,h:80,rect:!0},"academy-CR2",1114,100);const Z=oe.getAllTowerData(),tt=et.q.instance.prodigy.gameContainer.get("782-c308");for(let Y=0;Y{const q=this.localizer.getText("BUTTON_OKAY_UPPERCASE"),K=this.localizer.getText("ACADEMY_TOWER_NOT_RELEASED");et.q.instance.prodigy.open.messageBoxOkay(K,q,null)}))}}start(q,K,z){ht.U.isEndgameQuestActive()&&(this.addGuideHand(q,K,150,660,0,20,180),this.addGuideHand(q,K,1130,660,0,20,180)),super.start(q,K,z)}}class ut extends dt.z{constructor(q,K){super(q,"CR2","MAP_ACADEMY_SECOND_FLOOR",640,530,["academy-CR2"],K.concat([]))}setup(q,K,z){super.setup(q,K,z),this.localizer=et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService),this.addAreaEvent(q,K,{x:162,y:40,w:500,h:80,rect:!0},"academy-CR1",200,660),this.addAreaEvent(q,K,{x:1114,y:40,w:500,h:80,rect:!0},"academy-CR1",1090,660),this.addAreaEvent(q,K,{x:640,y:655,w:this.game.width,h:130,rect:!0},"academy-GH1",640,100);const Q=K.contentGameObject.findChildByName("astral_tower_lock");if(Y.Aq$.isDefined(Q)){const q=Q.findComponentInChildren(ct.p);q.InputEnabled=!0,q.onClicked.add((()=>{const q=this.localizer.getText("BUTTON_OKAY_UPPERCASE"),K=this.localizer.getText("ACADEMY_TOWER_NOT_RELEASED");et.q.instance.prodigy.open.messageBoxOkay(K,q,null)}))}}start(q,K,z){ht.U.isEndgameQuestActive()&&this.addGuideHand(q,K,640,570,0,20,180),super.start(q,K,z)}}class ft extends dt.z{constructor(q,K){const z=[ot.Q.Spine_academystairlight_json,ot.Q.Spine_academylanternglow_json,ot.Q.Spine_academy_window_glow_horizontal_json,ot.Q.Spine_academy_window_light_horizontal_json,ot.Q.Spine_stair_lock_json,Q.c.Sfx_academy_rumble];super(q,"GH1","MAP_ACADEMY_GREATHALL",640,500,["academy-GH2"],K.concat(z))}init(q,K,z,Y){return this.enableLayerID(1,!1),super.init(q,K,z,Y)}setup(q,K,z){super.setup(q,K,z);q.rootContainer.get("ad2-c5b2").player.hasCompletedTutorial()&&(this.addAreaEvent(q,K,{x:640,y:655,w:1110,h:150,rect:!0},"academy-GH2",640,100),this.addAreaEvent(q,K,{x:640,y:40,w:1110,h:80,rect:!0},"academy-CR2",640,560)),ft.addEffects(q,K)}start(q,K,z){ht.U.isEndgameQuestActive()&&this.addGuideHand(q,K,640,570,0,20,180),super.start(q,K,z)}static addEffects(q,K){const z=265,Y=420,Q=1015,X=420,Z=q.add.spine(419,212,ot.Q.Spine_academystairlight_json);Z.setToSetupPose(),Z.setAnimationByName(0,"animation",!0);const J=q.add.spine(861,212,ot.Q.Spine_academystairlight_json);J.setToSetupPose(),J.setAnimationByName(0,"animation",!0),K.foreground.addChild(Z),K.foreground.addChild(J);const tt=q.add.spine(z,Y,ot.Q.Spine_academy_window_glow_horizontal_json);tt.setToSetupPose(),tt.setAnimationByName(0,"animation",!0),tt.scale.x=-1;const et=q.add.spine(Q,X,ot.Q.Spine_academy_window_glow_horizontal_json);et.setToSetupPose(),et.setAnimationByName(0,"animation",!0),K.foreground.addChild(tt),K.foreground.addChild(et);const it=q.add.spine(z,Y,ot.Q.Spine_academy_window_light_horizontal_json);it.setToSetupPose(),it.setAnimationByName(0,"animation",!0),it.scale.x=-1;const st=q.add.spine(Q,X,ot.Q.Spine_academy_window_light_horizontal_json);st.setToSetupPose(),st.setAnimationByName(0,"animation",!0),K.background.addChild(it),K.background.addChild(st)}}var bt=z(4324),pt=z(88022),vt=z(75214),gt=z(87337),mt=z(3862);class yt extends dt.z{constructor(q,K){super(q,"GH3","MAP_ACADEMY_GREATHALL",640,500,["academy-GH2"],K.concat([ot.Q.Spine_academylanternglow_json,ot.Q.Spine_trap_door_glow_json,ot.Q.Spine_npc_gale_json,ot.Q.Spine_npc_floatlingmerchant_json]))}setup(q,K,z){super.setup(q,K,z),this.addAreaEvent(q,K,{x:640,y:40,w:1110,h:80,rect:!0},"academy-GH2",640,570),this.addAreaEvent(q,K,{x:640,y:600,w:500,h:180,canReTrigger:!0},null,null,null,(()=>{et.q.instance.prodigy.open.map({disableClose:!1})})),this._archiveEntranceAreaEvent=this.addAreaEvent(q,K,{x:900,y:465,w:150,h:120,rect:!0,canReTrigger:!0},null,null,null,(()=>{et.q.instance.prodigy.open.archiveEntranceMenu(J.A_.ARCHIVES,(()=>{this.moveOffArchiveEntrance()}))}));const Q=et.q.instance.prodigy.create.sprite(900,465,pt._.General_core_json,"empty",{x:.5,y:.5},null,150,120);Q.events.onInputUp.add((()=>{this.screen.path.findPath(this.screen.user.x,this.screen.user.y,Q.x-40,Q.y+20,!0).then((q=>{q&&this.screen.user.setPath(q)})).catch(Y.RQr.createHandler("Unable to find path to trapdoor"))})),Q.alpha=0,Q.inputEnabled=!0,this.screen.content.addChild(Q);new vt.p(q,"NPC_NAME_GALE",83,gt.ac.CareGiver,K.content,915,180,"idle").onClick.add((()=>{const q=et.q.instance.prodigy.event.create();q.text(14,"gale"),q.start()}),this);new vt.p(q,"NPC_NAME_ACADEMY_MERCHANT",84,gt.ac.Merchant,K.content,345,180,"idle").onClick.add((()=>et.q.instance.prodigy.open.store(35)));const X=q.add.spine(949,450,ot.Q.Spine_trap_door_glow_json);X.setAnimationByName(0,"animation",!0),X.scale.x=-1,K.content.addChild(X)}start(q,K,z){if(ht.U.isEndgameQuestActive())this.addGuideHand(q,K,640,30,0,20);else if(Y.Aq$.isDefined(mt.B.getLastDungeonRun(this.game,J.A_.ARCHIVES))&&0!==mt.B.getLastDungeonRun(this.game,J.A_.ARCHIVES).lastRunTimeStamp)et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES)||et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_NO_KEYSTONES)||this.addGuideHand(q,K,640,30,0,20);else{et.q.instance.prodigy.create.element(K.foreground,880,410).highlight(!0)}super.start(q,K,z)}moveOffArchiveEntrance(){if(!this._archiveEntranceAreaEvent)return;const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.playerContainer;q.setValidPath(this.screen.path,this._archiveEntranceAreaEvent.x-q.width,q.y)}}var _t=z(18155),Et=z(79340),wt=z(85855);class Tt extends Et.Z{constructor(q,K){super(q,"B0",K.concat([X.t.Tileset_generic_new_png,X.t.Tileset_town_new_png,X.t.Tileset_firefly_new_png,wt.V.Bgm_puppetmaster,ot.Q.Spine_shadowportal_json,wt.V.Bgm_lamplight,Q.c.Sfx_academy_portal_open,Q.c.Sfx_academy_portal_close]),"map-lamplight-B0"),this.noot=null,this.pippet=null,this.portal=null}setup(q,K,z){super.setup(q,K,z),K.user.position.x=120,K.user.position.y=880,this.portal=q.add.spine(870,425,ot.Q.Spine_shadowportal_json),this.portal.setToSetupPose(),K.content.addChild(this.portal)}start(q,K){super.start(q,K),this.noot=K.addNPC(150,850,pt._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2,this.pippet=new _t.N(q,"NPC_NAME_PIPPET",K.content,120,880,"idle",K.user);const z=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),Q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);z.execute(Q.getStateMachine(67),{game:q,screen:K,scene:this,player:K.user,noot:this.noot,pippet:this.pippet,path:K.path,pathfinder:K.path,portal:this.portal},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.pippet&&(this.pippet.destroy(),this.pippet=null),this.portal&&(this.portal.destroy(),this.portal=null),super.cleanup()}resizeContainer(q,K){et.q.instance.prodigy.effects.resizeContainer(q,K)}removePippet(){this.pippet.destroy()}playNextScene(){et.q.instance.prodigy.world.playScene("academy-introPt2")}}class St extends Et.Z{constructor(q,K){super(q,"GH3",K.concat([pt._.Npc_sprite_noot_json,pt._.Zone_lamplight_json,wt.V.Bgm_puppetmaster,ot.Q.Spine_shadowportal_json,ot.Q.Spine_trap_door_glow_json,ot.Q.Spine_npc_gale_json,ot.Q.Spine_npc_floatlingmerchant_json,Q.c.Sfx_academy_portal_open,Q.c.Sfx_academy_portal_close,wt.V.Bgm_fun]),"map-academy-GH3"),this.noot=null,this.gale=null,this.academyMerchan=null,this.portal=null,this.trapDoor=null}setup(q,K,z){super.setup(q,K,z),K.user.scale.set(0,0),K.user.position.x=370,K.user.position.y=350,this.gale=new vt.p(q,"NPC_NAME_GALE",83,gt.ac.CareGiver,K.content,915,235,"animation"),this.gale.walkSpeed=2,this.academyMerchan=new vt.p(q,"NPC_NAME_ACADEMY_MERCHANT",84,gt.ac.Merchant,K.content,350,180,"animation"),this.portal=q.add.spine(370,300,ot.Q.Spine_shadowportal_json),this.portal.setToSetupPose(),K.content.addChild(this.portal),this.trapDoor=q.add.spine(949,450,ot.Q.Spine_trap_door_glow_json),this.trapDoor.setAnimationByName(0,"animation",!0),this.trapDoor.scale.x=-1,K.content.addChild(this.trapDoor)}start(q,K){super.start(q,K),this.noot=K.addNPC(370,350,pt._.Npc_sprite_noot_json),this.noot.scale.set(0,0),this.noot.float(!0),this.noot.walkSpeed=2;const z=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),Q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);z.execute(Q.getStateMachine(76),{game:q,screen:K,scene:this,player:K.user,noot:this.noot,gale:this.gale,path:K.path,pathfinder:K.path,portal:this.portal,nootDialogueEndgame:ht.U.isEndgameQuestActive()?292:230},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.gale&&(this.gale.destroy(),this.gale=null),this.portal&&(this.portal.destroy(),this.portal=null),this.trapDoor&&(this.trapDoor.destroy(),this.trapDoor=null),super.cleanup()}resizeContainer(q,K){et.q.instance.prodigy.effects.resizeContainer(q,K)}}class At extends Et.Z{constructor(q,K){super(q,"CR2",K.concat([]),"map-academy-CR2"),this.noot=null}setup(q,K,z){super.setup(q,K,z),this.screen.user.position.x=640,this.screen.user.position.y=900,this.noot=this.screen.addNPC(700,900,pt._.Npc_sprite_noot_json),this.noot.float(!0)}start(q,K){super.start(q,K);const z=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),Q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);z.execute(Q.getStateMachine(81),{game:q,screen:K,scene:this,player:K.user,noot:this.noot,pathfinder:K.path},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}class Ct extends Et.Z{constructor(q,K){super(q,"GH1",K.concat([pt._.Npc_sprite_noot_json,pt._.Zone_lamplight_json,ot.Q.Spine_academy_window_light_horizontal_json,wt.V.Bgm_fun,wt.V.Bgm_puppetmaster,ot.Q.Spine_academystairlight_json,ot.Q.Spine_academylanternglow_json,ot.Q.Spine_academy_window_glow_horizontal_json,ot.Q.Spine_stair_lock_json,ot.Q.Spine_academy_window_glow_vertical_json,ot.Q.Spine_academy_window_light_vertical_json,ot.Q.Spine_screendebris_json,Q.c.Sfx_puppetmaster_blast,Q.c.Sfx_keystone_disappear]),"map-academy-GH1"),this.noot=null}setup(q,K,z){super.setup(q,K,z),this.screen.user.position.x=640,this.screen.user.position.y=900,this.noot=this.screen.addNPC(700,900,pt._.Npc_sprite_noot_json),this.noot.float(!0),ft.addEffects(q,K)}start(q,K){super.start(q,K);const z=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),Q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);z.execute(Q.getStateMachine(80),{game:q,screen:K,scene:this,player:K.user,noot:this.noot,pathfinder:K.path},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}var Ot=z(8674),It=z(99625),Dt=z(80060);class Rt extends Et.Z{constructor(q,K){super(q,"GH1",K.concat([wt.V.Bgm_academy_greathall]),"map-academy-GH1"),this.onSceneComplete=new Y.HN0,this.cutscenePrefab=It.l.AcademyStatusEffects1Cutscene,this.isMultiplayerDisabled=!0,this.arePopupsDisabled=!0}setup(q,K,z){super.setup(q,K,z),K.user.position.set(550,445)}start(q,K){super.start(q,K,20),this.playCutscene().catch((q=>{Y.VyI.log(`Error during Academy Status Effect FTUE cutscene: ${q}`,Y.$bb.Error),this.endCutscene()}))}playCutscene(){return(0,Ot.sH)(this,void 0,void 0,(function*(){const q=new Y._mx;Y.wa5.getActiveScene().addGameObject(q),this.cutsceneLoadPromise=Dt.d.loadWithInjectedValuesAndDependenciesFromGUID(et.q.instance.prodigy.gameContainer.get("983-05a7"),this.cutscenePrefab,{END_CUTSCENE:this.endCutscene.bind(this)},q),yield this.cutsceneLoadPromise}))}endCutscene(){et.q.instance.prodigy.open.menuCloseAll(),this.onSceneComplete.dispatch(),super.endCutscene()}cleanup(){var q;null===(q=this.cutsceneLoadPromise)||void 0===q||q.cancel(),this.onSceneComplete.dispose(),super.cleanup()}}class Pt extends Rt{constructor(){super(...arguments),this.cutscenePrefab=It.l.AcademyStatusEffects2Cutscene}}var Mt=z(7351),Nt=z(44357),xt=z(13956);class Lt extends Et.Z{constructor(q,K){super(q,"GH2",K.concat(Lt.PRELOAD_ASSETS),"map-academy-GH2")}setup(q,K,z){super.setup(q,K,z),bt.k.initKeystones(this.game,this.screen),bt.k.addEffects(q,K),K.user.position.set(350,400),this._pippet=new vt.p(et.q.instance.game,"NPC_NAME_PIPPET",ot.Q.Spine_npc_pippet_json,gt.ac.Boss,this.screen.content,930,400,"idle"),this._pippet.flip()}start(q,K){super.start(q,K),this.playCutscene().catch((q=>{Y.RQr.logError(q,"Error playing Pippet post-battle cutscene"),this.endCutscene()}))}playCutscene(){const q=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,Ot.sH)(this,void 0,void 0,(function*(){yield q.playCutscene.call(this),this._player.saveEnabled=!1,yield Nt.v$([1425]),yield Nt.x(this.screen.path,this._pippet,900,0),this._pippet.visible=!1;for(const q of Object.keys(rt.b.ZONE_TOWERS)){const K=st.t.getItem("academyTower",rt.b.ZONE_TOWERS[q]).data,z=K.keystone.zone;this._player.state.get(`keystones-${z}`)>0||(yield Y.Egh.timeout(800),bt.k.placeKeystone(this.game,this.screen,K.keystone,K.element).catch(Y.RQr.createHandler(`Error placing ${q} keystone`)))}yield Y.Egh.timeout(3500),this.endCutscene()}))}endCutscene(){super.endCutscene(),this._player.saveEnabled=!0,et.q.instance.prodigy.world.it("academy-GH2",290,490)}}Lt.PRELOAD_ASSETS=[ot.Q.Spine_academygh_centre_json,ot.Q.Spine_academygh_addkeystone_json,ot.Q.Spine_academy_window_glow_vertical_json,ot.Q.Spine_academy_window_light_vertical_json],(0,Ot.Cg)([(0,xt.b)("782-c308"),(0,Ot.Sn)("design:type",Mt.W)],Lt.prototype,"_player",void 0);var kt=z(95891),Bt=z.n(kt),Ut=z(84399),Ft=z(85604);class Gt extends Et.Z{constructor(q,K){super(q,"GH2",K.concat(Gt.PRELOAD_ASSETS),"map-academy-GH2"),this._noot=null,this._hasBeenSetup=!1}setup(q,K,z){super.setup(q,K,z),bt.k.initKeystones(this.game,this.screen),bt.k.addEffects(q,K),K.user.position.set(370,400);for(const{type:Y,x:Q,y:X,flip:Z}of Gt.NPC_DATA)K.addConstructedQuestNPC(Q,X,Y,Z,kt.noop);this._noot=new vt.p(q,"NPC_NAME_NOOT",ot.Q.Spine_npc_noot_json,void 0,K.content,910,400,"idle"),this._noot.flip(),this._hasBeenSetup=!0}start(q,K){this._hasBeenSetup&&(super.start(q,K),this.playCutscene().catch(Y.RQr.createHandler("Error playing Pippet post-battle cutscene")).finally((()=>this.endCutscene())))}playCutscene(){const q=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,Ot.sH)(this,void 0,void 0,(function*(){yield q.playCutscene.call(this),yield Nt.v$([1483,1484,1485,1486,1487,1488,1489,1490,1595,1492])}))}endCutscene(){super.endCutscene();const q=et.q.instance.prodigy.gameContainer.get("782-c308");q.data.puppetMasterDefeatDate=Date.now(),q.updated=!0,Ut.R.sendActivationEvent(),et.q.instance.prodigy.world.it(q.isPlayingAtSchool()&&!Ut.R.isFeatureEnabled()?"academy-GH3":"lamplight-B3")}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),super.cleanup()}}Gt.PRELOAD_ASSETS=[ot.Q.Spine_npc_flora_json,ot.Q.Spine_npc_benni_json,ot.Q.Spine_npc_bok_json,ot.Q.Spine_npc_slurpy_json,pt._.Npc_sprite_windsail_json,ot.Q.Spine_npc_noot_json,ot.Q.Spine_academygh_centre_json,ot.Q.Spine_academygh_addkeystone_json,ot.Q.Spine_academy_window_glow_vertical_json,ot.Q.Spine_academy_window_light_vertical_json],Gt.NPC_DATA=[{type:Ft.y.Flora,x:445,y:258,flip:!1},{type:Ft.y.Eve,x:553,y:211,flip:!1},{type:Ft.y.Benni,x:642,y:143,flip:!1},{type:Ft.y.Slurpy,x:720,y:213,flip:!1},{type:Ft.y.Bok,x:857,y:258,flip:!1}];var jt=z(82351),$t=z(36648),Ht=z(28628),Vt=z(40295),Wt=z(48975),qt=z(59968);class Kt extends qt.R{constructor(q,K,z,Q,X,Z,J=-260){const tt=new Wt.s(et.q.instance.game);tt.init({npc_name:Q,npc_type:X,x_coord:K,y_coord:z,npc_animation_id:"idle"}),super(et.q.instance.game,q,tt,1,K,z),this.nameText.GameObject.legacyTransform.group.position.set(0,J),this.setup(Z).catch(Y.RQr.createHandler("Error loading NPC spine"))}setup(q){return(0,Ot.sH)(this,void 0,void 0,(function*(){if(this._initialState=this.stand,!Y.E3R.isLoaded(q)){const K=et.q.instance.prodigy.gameContainer.get(Y.t5G.AssetLoader);yield K.loadAssets([q])}this._spine=et.q.instance.prodigy.create.spine(0,0,q,this.sprites),this._initialState.apply(this)}))}walk(){this._spine?this._spine.setAnimationByName(0,"walk",!0):this._initialState=this.walk}stand(){this._spine?this._spine.setAnimationByName(0,"idle",!0):this._initialState=this.stand}}var zt=z(10670),Yt=z(76945);class Qt extends Et.Z{get cutsceneErrorMessage(){return"Error playing endgame pre-battle cutscene"}get cutsceneDialogueSequence(){return[1477]}get battleType(){return Ht.gu.EndGamePuppetMaster}get battleBackground(){return[$t.q.Battle_puppet_master_bg,""]}get firstTimeBreadcrumbKey(){return Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER}constructor(q,K){super(q,"GH2",K.concat(Qt.PRELOAD_ASSETS),"map-academy-GH2")}setup(q,K,z){super.setup(q,K,z),bt.k.initKeystones(this.game,this.screen),bt.k.addEffects(q,K),this.screen.user.position.set(350,400),this._puppetMaster=new Kt(K.content,930,0,"NPC_NAME_PUPPETMASTER",gt.ac.Boss,ot.Q.Spine_npc_puppetmaster_json),this._puppetMaster.flip()}start(q,K){super.start(q,K),this.playCutscene().catch((q=>{Y.RQr.logError(q,this.cutsceneErrorMessage),this.endCutscene()}))}playCutscene(){const q=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,Ot.sH)(this,void 0,void 0,(function*(){yield q.playCutscene.call(this),yield Nt.x(this.screen.path,this._puppetMaster,900,400);const K=et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Z.B.FEATURE_ENDGAME_QUEST,this.firstTimeBreadcrumbKey)?Qt.getRetryDialogue():this.cutsceneDialogueSequence;yield Nt.v$(K),this.endCutscene()}))}static getRetryDialogue(){const q=Yt.o.integerInRange(0,this._currentRetryDialogues.length),K=this._currentRetryDialogues.splice(q,1)[0];return 0===this._currentRetryDialogues.length&&(this._currentRetryDialogues.push(...this.RETRY_DIALOGUES),this._currentRetryDialogues.splice(this._currentRetryDialogues.indexOf(K),1)),K}endCutscene(){super.endCutscene();const q={revampBattleType:this.battleType,screen:this.battleBackground};ht.U.progressData.step===Vt.B.Guardian5Defeated&&(q.backgroundMusic=jt.B.Bgm_battle_puppet_master,q.victoryMusic=jt.B.Bgm_puppet_master_victory_loop);let K=null,z=null,Y=null;switch(this.battleType){case Ht.gu.EndGameGuardianFirefly:K=5,z=zt.jT.IllusionBoss1FirstTimeBattleStart,Y=Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY;break;case Ht.gu.EndGameGuardianShiverchill:K=7,z=zt.jT.IllusionBoss2FirstTimeBattleStart,Y=Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL;break;case Ht.gu.EndGameGuardianBonfire:K=9,z=zt.jT.IllusionBoss3FirstTimeBattleStart,Y=Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE;break;case Ht.gu.EndGameGuardianShipwreck:K=11,z=zt.jT.IllusionBoss4FirstTimeBattleStart,Y=Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK;break;case Ht.gu.EndGameGuardianSkywatch:K=13,z=zt.jT.IllusionBoss5FirstTimeBattleStart,Y=Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH;break;case Ht.gu.EndGamePuppetMaster:K=15,z=zt.jT.PuppetMasterFirstTimeBattleStart,Y=Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER}z&&et.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(K,z,Y),et.q.instance.prodigy.battle.start(q,void 0,this.onBattleWon,this.onBattleEnd)}onBattleWon(){ht.U.locallyAdvanceQuest(),et.q.instance.prodigy.world.it("academy-GH2",290,490)}onBattleEnd(){et.q.instance.prodigy.world.it("academy-GH2",290,490)}}Qt.PRELOAD_ASSETS=[ot.Q.Spine_npc_puppetmaster_json,ot.Q.Spine_academygh_centre_json,ot.Q.Spine_academygh_addkeystone_json,ot.Q.Spine_academy_window_glow_vertical_json,ot.Q.Spine_academy_window_light_vertical_json],Qt.RETRY_DIALOGUES=[[1517],[1518],[1519],[1520],[1521],[1522],[1523]],Qt._currentRetryDialogues=Bt().clone(Qt.RETRY_DIALOGUES);var Xt=z(87539);class Zt extends Qt{get cutsceneErrorMessage(){return"Error playing guardian pre-battle cutscene"}get cutsceneDialogueSequence(){return this._guardianData.puppetMasterPreBattleDialogue}get battleType(){return this._battleType}get firstTimeBreadcrumbKey(){switch(this._battleType){case Ht.gu.EndGameGuardianFirefly:return Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY;case Ht.gu.EndGameGuardianShiverchill:return Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL;case Ht.gu.EndGameGuardianBonfire:return Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE;case Ht.gu.EndGameGuardianShipwreck:return Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK;case Ht.gu.EndGameGuardianSkywatch:return Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH}}get battleBackground(){return[$t.q[this._guardianData.backgroundImageKey],$t.q[this._guardianData.foregroundImageKey]]}setup(q,K,z){super.setup(q,K,z),this._battleIndex=ht.U.getCurrentGuardianIndex(),this._battleType=Zt.GUARDIAN_BATTLE_TYPE[this._battleIndex],this._guardianData=Xt.m.getGuardianData(this._battleType)}onBattleWon(){ht.U.locallyAdvanceQuest(),et.q.instance.prodigy.world.it("academy-GH2",290,490,{guardianJustDefeated:!0})}}Zt.GUARDIAN_BATTLE_TYPE=[Ht.gu.EndGameGuardianFirefly,Ht.gu.EndGameGuardianShiverchill,Ht.gu.EndGameGuardianBonfire,Ht.gu.EndGameGuardianShipwreck,Ht.gu.EndGameGuardianSkywatch];var Jt=z(29834);class te extends Et.Z{constructor(q,K){super(q,"GH2",K.concat(te.PRELOAD_ASSETS),"map-academy-GH2")}setup(q,K,z){super.setup(q,K,z),bt.k.initKeystones(this.game,this.screen),bt.k.addEffects(q,K),this.screen.user.position.set(350,400),this._pippet=new vt.p(et.q.instance.game,"NPC_NAME_PIPPET",ot.Q.Spine_npc_pippet_json,gt.ac.Boss,this.screen.content,930,0,"idle"),this._pippet.flip()}start(q,K){super.start(q,K),this.playCutscene().catch((q=>{Y.RQr.logError(q,"Error playing pippet pre-battle cutscene"),this.endCutscene()}))}playCutscene(){const q=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,Ot.sH)(this,void 0,void 0,(function*(){var K;yield q.playCutscene.call(this),yield Nt.x(this.screen.path,this._pippet,900,400),null===(K=this._pippet.spineNPC.findComponent(Jt.j))||void 0===K||K.playAnimation("idle",!0),yield Nt.v$([1454]),this.endCutscene()}))}endCutscene(){super.endCutscene(),te.startEndgamePippetBattle()}static startEndgamePippetBattle(){const q={revampBattleType:Ht.gu.EndgamePippet,screen:[$t.q.Battle_academy_gh_stairs_bg,$t.q.Battle_academy_gh_stairs_fg]};et.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(3,zt.jT.PippetFirstTimeBattleStart,Z.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PIPPET),et.q.instance.prodigy.battle.start(q,void 0,(()=>{ht.U.locallyAdvanceQuest(),et.q.instance.prodigy.world.it("academy-GH2",290,490)}),(()=>{et.q.instance.prodigy.world.it("academy-GH2",290,490)}))}}te.PRELOAD_ASSETS=[ot.Q.Spine_academygh_centre_json,ot.Q.Spine_academygh_addkeystone_json,ot.Q.Spine_academy_window_glow_vertical_json,ot.Q.Spine_academy_window_light_vertical_json];class ee extends Et.Z{constructor(q,K){super(q,"GH3",K.concat([pt._.Npc_sprite_noot_json,pt._.Zone_lamplight_json,wt.V.Bgm_fun,wt.V.Bgm_puppetmaster,ot.Q.Spine_academylanternglow_json,Q.c.Sfx_academy_rumble,ot.Q.Spine_academy_window_glow_vertical_json,ot.Q.Spine_screendebris_json]),"map-academy-GH3"),this.noot=null}setup(q,K,z){super.setup(q,K,z),K.user.position.x=640,K.user.position.y=850,this.debris=this.game.add.spine(640,480,ot.Q.Spine_screendebris_json),this.debris.setToSetupPose(),this.screen.foreground.addChild(this.debris)}start(q,K){super.start(q,K,20),this.noot=K.addNPC(640,760,pt._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2;const z=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),Q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);z.execute(Q.getStateMachine(53),{game:q,screen:K,scene:this,player:K.user,noot:this.noot,path:K.path,pathfinder:K.path,debris:this.debris},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.debris&&(this.debris.destroy(),this.debris=null),super.cleanup()}}class ie extends Et.Z{constructor(q,K){super(q,"GH2",K.concat([pt._.Npc_sprite_noot_json,pt._.Zone_lamplight_json,wt.V.Bgm_puppetmaster,ot.Q.Spine_academylanternglow_json,wt.V.Bgm_fun,ot.Q.Spine_academy_window_light_horizontal_json,ot.Q.Spine_screendebris_json,ot.Q.Spine_screendebris_json,ot.Q.Spine_academy_window_glow_vertical_json,ot.Q.Spine_academy_window_light_vertical_json,ot.Q.Spine_academygh_centre_json,Q.c.Sfx_puppetmaster_blast,Q.c.Sfx_keystone_disappear]),"map-academy-GH2"),this.noot=null}setup(q,K,z){super.setup(q,K,z),K.user.position.x=640,K.user.position.y=850,this.keystonesSpine=this.game.add.spine(640,403,ot.Q.Spine_academygh_centre_json),this.keystonesSpine.setToSetupPose(),this.screen.content.addChild(this.keystonesSpine),this.debris=this.game.add.spine(640,480,ot.Q.Spine_screendebris_json),this.debris.setToSetupPose(),this.screen.foreground.addChild(this.debris),bt.k.addEffects(q,K)}start(q,K){super.start(q,K,12),this.noot=K.addNPC(640,800,pt._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2;const z=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),Q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);z.execute(Q.getStateMachine(54),{game:q,screen:K,scene:this,player:K.user,noot:this.noot,keystones:this.keystonesSpine,debris:this.debris},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.keystonesSpine&&(this.keystonesSpine.destroy(),this.keystonesSpine=null),this.debris&&(this.debris.destroy(),this.debris=null),super.cleanup()}}var se,ne=z(96810);class ae extends Et.Z{constructor(q,K){super(q,"GH1",K.concat([pt._.Npc_sprite_noot_json,pt._.Zone_lamplight_json,wt.V.Bgm_puppetmaster,ot.Q.Spine_academylanternglow_json,wt.V.Bgm_fun,ot.Q.Spine_academystairlight_json,ot.Q.Spine_academy_window_glow_horizontal_json,ot.Q.Spine_academy_window_light_horizontal_json]),"map-academy-GH1"),this._noot=null}setup(q,K,z){super.setup(q,K,z),K.user.position.x=640,K.user.position.y=850,this._puppetMaster=new vt.p(q,"NPC_NAME_PUPPETMASTER",ot.Q.Spine_npc_puppetmaster_json,gt.ac.Boss,K.content,640,-50,"idle"),this._pippet=new _t.N(q,"NPC_NAME_PIPPET",K.content,640,-50,"idle",K.user),this._puppetMaster.alpha=this._pippet.alpha=1,ft.addEffects(q,K)}start(q,K){super.start(q,K,12),this._noot=K.addNPC(640,800,pt._.Npc_sprite_noot_json),this._noot.float(!0),this._noot.walkSpeed=2;const z=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),Q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);z.execute(Q.getStateMachine(55),{game:q,screen:K,scene:this,player:K.user,noot:this._noot,path:K.path,puppetmaster:this._puppetMaster,pippet:this._pippet,pathfinder:K.path},null)}battle(q){const K={revampBattleType:Ht.gu.Tutorial3,intro:et.q.instance.prodigy.gameContainer.get(Y.$Bt.LocalizationService).getText("COMBAT_MINION_BATTLE"),screen:"battle-academy-gh-stairs",encounter:[{ID:69}],drops:[{type:"gold",N:50}],dropsDisabled:!0,difficulty:3,minTeamSize:2,maxTeamSize:2,bench:[{petID:122,weight:1}]};et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.setEnergy(1),this.technicalMetricsManager.sendOnboardingFunnelEvent(ne.l.MinionBattleStarted),et.q.instance.prodigy.battle.battleStats.type="AcademyTutorialBattle",et.q.instance.prodigy.battle.start(K,(()=>{this.endBattle()}),(()=>{this.endBattle()}),(()=>{this.endBattle()}),"academy-GH1")}endBattle(){this.technicalMetricsManager.sendOnboardingFunnelEvent(ne.l.MinionBattleWon),et.q.instance.prodigy.world.it("academy-GH1"),this.zone.completeSequence(1,0)}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),this._puppetMaster&&(this._puppetMaster.destroy(),this._puppetMaster=null),this._pippet&&(this._pippet.destroy(),this._pippet=null),super.cleanup()}}class re extends Et.Z{constructor(q,K){super(q,"GH1",K.concat([pt._.Npc_sprite_noot_json,pt._.Zone_lamplight_json,wt.V.Bgm_puppetmaster,ot.Q.Spine_academylanternglow_json,wt.V.Bgm_fun,ot.Q.Spine_academystairlight_json,ot.Q.Spine_academy_window_glow_horizontal_json,ot.Q.Spine_academy_window_light_horizontal_json]),"map-academy-GH1"),this._noot=null}setup(q,K,z){super.setup(q,K,z),K.user.position.x=320,K.user.position.y=520,this._noot=K.addNPC(430,520,pt._.Npc_sprite_noot_json),this._noot.float(!0),this._noot.walkSpeed=2,this._puppetMaster=new vt.p(q,"NPC_NAME_PUPPETMASTER",ot.Q.Spine_npc_puppetmaster_json,gt.ac.Boss,K.content,640,480,"idle",null,!0),this._pippet=new _t.N(q,"NPC_NAME_PIPPET",K.content,815,490,"idle",K.user),this._puppetMaster.alpha=this._pippet.alpha=1,ft.addEffects(q,K)}start(q,K){super.start(q,K,12);const z=et.q.instance.prodigy.gameContainer.get(Y.$Bt.IFSMController),Q=et.q.instance.prodigy.gameContainer.get(Y.$Bt.FSMService);z.execute(Q.getStateMachine(77),{game:this.game,screen:this.screen,scene:this,player:K.user,noot:this._noot,path:this.screen.path,puppetmaster:this._puppetMaster,pippet:this._pippet,pathfinder:this.screen.path},null)}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),this._puppetMaster&&(this._puppetMaster.destroy(),this._puppetMaster=null),this._pippet&&(this._pippet.destroy(),this._pippet=null),super.cleanup()}}!function(q){q[q.None=0]="None",q[q.Placed=1]="Placed"}(se||(se={}));class oe extends rt.b{constructor(q){super(q),this.assets=[X.t.Tileset_academy_png,X.t.Tileset_academy_sup_png,X.t.Tileset_collisions_png,`bgm-${this.bgmID}`,Q.c.Sfx_lamplight],this.name="The Academy",this.ID=J.A_.ACADEMY,this.battleBG="battle-academy-gh-stairs",this.defaultOnFaint="academy-GH3",this.questHub="academy-GH3",this.bgmID=20,this.currency=13,this.zoneIndex=nt.P.Academy,this.states=["daily"],this.monsters=[],this.maps={GH1:new ft(this,this.assets),GH2:new bt.k(this,this.assets),GH3:new yt(this,this.assets),CR1:new lt(this,this.assets),CR2:new ut(this,this.assets)},this.scenes={greatHallPt1:new ee(this,this.assets),greatHallPt2:new ie(this,this.assets),greatHallPt3:new ae(this,this.assets),greatHallPt4:new re(this,this.assets),introPt1:new Tt(this,this.assets),introPt2:new St(this,this.assets),stairsUnlocked:new Ct(this,this.assets),secondFloor:new At(this,this.assets),endgamePrePippet:new te(this,this.assets),endgamePostPippet:new Lt(this,this.assets),endgamePreGuardian:new Zt(this,this.assets),endgamePrePuppetMaster:new Qt(this,this.assets),endgamePostPuppetMaster:new Gt(this,this.assets),statusEffectFTUE1:new Rt(this,this.assets),statusEffectFTUE2:new Pt(this,this.assets)}}placeDaily(q,K,z){}init(q,K,z){super.init(q,K,z),this.quests={},this.bgmID=20}setup(q,K,z){return et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.hasCompletedTutorial()||(K.menuBar.active=!1),super.setup(q,K,z)}teleport(q,K,z,Y,Q){const X=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;X.backpack.hasItem("key",22,this.difficultyMode);X.hasCompletedTutorial()&&X.backpack.hasItem("key",22,this.difficultyMode)<=0?et.q.instance.prodigy.world.it("lamplight-B0"):(et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_VISITED)||et.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_VISITED),super.teleport(q,K,z,Y,Q),this.sendSegmentTrackingEvents())}sendSegmentTrackingEvents(){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=q.data.zone,z=q.data.previousZone;if(!et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE)){const K=oe.getAllTowerData().filter((K=>q.backpack.hasItem("key",K.keystone.itemID)));K&&(K.forEach((q=>{et.q.instance.prodigy.gameContainer.get("20f-5f67").academyTowers.sendFunnelEvent({funnelName:tt.w.format("{0}_tower",q.element),funnelType:"feature",step:at.D.AcademyTeleport})})),et.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE))}if(K===`${J.A_.ACADEMY}-${it.s.TOWER_COMMON_ROOM_SHORTFORM}1`&&z===`${J.A_.ACADEMY}-${it.s.TOWER_COMMON_ROOM_SHORTFORM}2`&&!et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE)){const q=oe.getAllTowerData().filter((q=>this.getKeystoneState(q.keystone.zone)===se.Placed));q&&(q.forEach((q=>{et.q.instance.prodigy.gameContainer.get("20f-5f67").academyTowers.sendFunnelEvent({funnelName:tt.w.format("{0}_tower",q.element),funnelType:"feature",step:at.D.AcademyTowerLobby})})),et.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE))}if(K===`${J.A_.ACADEMY}-GH2`&&z===`${J.A_.ACADEMY}-GH3`&&!et.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE)){const K=oe.getAllTowerData().filter((K=>q.backpack.hasItem("key",K.keystone.itemID)));K&&(K.forEach((q=>{et.q.instance.prodigy.gameContainer.get("20f-5f67").academyTowers.sendFunnelEvent({funnelName:tt.w.format("{0}_tower",q.element),funnelType:"feature",step:at.D.PedestalRoom})})),et.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Z.B.FEATURE_ACADEMY_TOWERS,Z.B.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE))}}static getAllTowerData(){return st.t.getCategoryItems("academyTower").sort(((q,K)=>q.ID-K.ID)).map((q=>q.data))}static getTowerData(q){const K=oe.getAllTowerData();for(let z=0;z0}static getKeystonesToPlace(){const q=et.q.instance.prodigy.gameContainer.get("ad2-c5b2").player,K=oe.getAllTowerData();let z=[];for(let Y=0;Y0&&q.state.get(`keystones-${Q.keystone.zone}`)!==se.Placed&&z.push(Q.keystone.zone)}return z}}},4324:(q,K,z)=>{"use strict";z.d(K,{k:()=>bt});var Y=z(8674),Q=z(62459),X=z(88022),Z=z(82351),J=z(99625),tt=z(51742),et=z(56942),it=z(40295),st=z(90633),nt=z(73678),at=z(35120),rt=z(93867),ot=z(10670),ht=z(41674),ct=z(46784),dt=z(44357),lt=z(38454),ut=z(85126),ft=z(10213);class bt extends ft.z{constructor(q,K){const z=[et.Q.Spine_academygh_centre_json,et.Q.Spine_academylanternglow_json,et.Q.Spine_academy_window_glow_vertical_json,et.Q.Spine_academy_window_light_horizontal_json,et.Q.Spine_academy_window_light_vertical_json,et.Q.Spine_shadowportal_json,et.Q.Spine_academygh_addkeystone_json,tt.c.Sfx_academy_portal_open,tt.c.Sfx_academy_portal_close,tt.c.Sfx_keystone_appear,tt.c.Sfx_bubble_pop,et.Q.Spine_circle_bloom_1_json,Z.B.Sfx_academy_keystone_activation_sheen];super(q,"GH2","MAP_ACADEMY_GREATHALL",640,570,["academy-GH3","academy-GH1"],K.concat(z))}setup(q,K,z){var Y;super.setup(q,K,z);const Z=at.q.instance.prodigy.gameContainer.get("782-c308");this.addAreaEvent(q,K,{x:640,y:45,w:1110,h:75,rect:!0},"academy-GH1",640,560),this.addAreaEvent(q,K,{x:640,y:655,w:1110,h:130,rect:!0},"academy-GH3",640,100),rt.U.progressData.step===it.B.LastKeystoneCutsceneViewed&&at.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(2,ot.jT.AllGemsFirstAcademyVisit,st.B.BREADCRUMB_ENDGAME_QUEST_FIRST_ACADEMY_VISIT_WITH_ALL_GEMS);const tt=this.screen.content.addChild(at.q.instance.prodigy.create.sprite(640,383,X._.General_core_json,"empty",{x:.5,y:.5},null,260,220));if(tt.events.onInputUp.add((()=>{at.q.instance.prodigy.gameContainer.get("20f-5f67").featureCommon.sendInterfaceEvent({interfaceName:ct.B.PedestalsClicked,interfaceType:ht.Wm.ClickableSprite}),bt.setGuideHandActive(!1),rt.U.progressData.step===it.B.LastKeystoneCutsceneViewed?this.zone.playScene("endgamePrePippet"):rt.U.getCurrentGuardianIndex()>=0?this.zone.playScene("endgamePreGuardian"):rt.U.progressData.step===it.B.Guardian5Defeated?this.zone.playScene("endgamePrePuppetMaster"):rt.U.isStepComplete(it.B.PuppetMasterDefeated)?(at.q.instance.prodigy.gameContainer.get("20f-5f67").battleRevamp.sendEndGameFunnelAdvancedEvent(18,ot.jT.PostPuppetMasterPedestalClicked,st.B.BREADCRUMB_ENDGAME_QUEST_FIRST_CLICK_POST_PUPPET_MASTER_PEDESTAL),dt.v$([1493,1494]).catch(Q.RQr.createHandler("Error running dialog"))):at.q.instance.prodigy.open.keystonePedestals((()=>{ut.N.anyKeystonesToPlace()||at.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(st.B.FEATURE_ACADEMY_TOWERS,st.B.BREADCRUMB_ACADEMY_NO_KEYSTONES)||(at.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(st.B.FEATURE_ACADEMY_TOWERS,st.B.BREADCRUMB_ACADEMY_NO_KEYSTONES),bt.setGuideHandActive(!1))}))})),tt.alpha=0,tt.inputEnabled=!0,bt.addEffects(q,K),rt.U.progressData.step===it.B.PippetDefeated&&ut.N.anyKeystonesToPlace())return void this.zone.playScene("endgamePostPippet");if(rt.U.progressData.step===it.B.PuppetMasterDefeated&&!Q.Aq$.isDefined(Z.data.puppetMasterDefeatDate))return void(Z.backpack.hasItem("hat",240)?this.zone.playScene("endgamePostPuppetMaster"):this.playMissedPuppetMasterGearSequence().catch(Q.RQr.createHandler("Error playing missed Puppet Master gear sequence")));const et=at.q.instance.prodigy.gameContainer.get("983-05a7");bt._guideHand=new Q._mx(K.foregroundGameObject),bt._guideHand.addComponent(Q.dLy).setPosition(640,360),bt.setGuideHandActive(!1),et.loadWithDependenciesFromGUID(J.l.ClickHereGuideHand,bt._guideHand).catch(Q.RQr.createHandler("Error loading guide hand")),(null===(Y=Z.data.previousZone)||void 0===Y?void 0:Y.includes(nt.A_.SHIVERCHILL))&&this.portalInSetup(q,K,1035,480)}start(q,K,z){var Y;(null===(Y=at.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data.previousZone)||void 0===Y?void 0:Y.includes(nt.A_.SHIVERCHILL))&&this.portalInStart(q,this.screen),super.start(q,K,z),rt.U.progressData.step===it.B.LastKeystoneCutsceneViewed?at.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(st.B.FEATURE_ENDGAME_QUEST,st.B.BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE)?bt.setGuideHandActive(!0):(at.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(st.B.FEATURE_ENDGAME_QUEST,st.B.BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE),dt.v$([1473]).then((()=>{bt.setGuideHandActive(!0)})).catch(Q.RQr.createHandler("Error showing pippet dialogue"))):bt.setGuideHandActive(ut.N.anyKeystonesToPlace()||rt.U.isEndgameQuestActive())}cleanup(){var q;null===(q=bt._guideHand)||void 0===q||q.destroy(),bt._guideHand=null,super.cleanup()}static setGuideHandActive(q){bt._guideHand&&(bt._guideHand.active=q)}portalInSetup(q,K,z,Y){K.user.scale.set(0,0),K.user.x=z,K.user.y=Y,Q.Aq$.isDefined(K.user.follow)&&(K.user.follow.visible=!1,K.user.follow.x=z,K.user.follow.y=Y)}portalInStart(q,K){const z=q.add.spine(K.user.x,K.user.y,et.Q.Spine_shadowportal_json);z.setToSetupPose(),K.content.addChild(z);const Y=-150,X=50,Z=at.q.instance.prodigy.gameContainer.get(Q.$Bt.IFSMController),J=at.q.instance.prodigy.gameContainer.get(Q.$Bt.FSMService);Z.execute(J.getStateMachine(185),{game:q,map:this,player:K.user,playerScale:K.user.scale,path:K.path,portal:z,startX:K.user.x+Y,startY:K.user.y+X},(()=>{Q.Aq$.isDefined(K.user.follow)&&(K.user.follow.visible=!0)}))}static addEffects(q,K){const z=q.add.spine(160,600,et.Q.Spine_academy_window_glow_vertical_json);z.setToSetupPose(),z.setAnimationByName(0,"animation",!0);const Y=q.add.spine(1120,600,et.Q.Spine_academy_window_glow_vertical_json);Y.setToSetupPose(),Y.setAnimationByName(0,"animation",!0),K.foreground.addChild(z),K.foreground.addChild(Y);const Q=q.add.spine(160,600,et.Q.Spine_academy_window_light_vertical_json);Q.setToSetupPose(),Q.setAnimationByName(0,"animation",!0);const X=q.add.spine(1120,600,et.Q.Spine_academy_window_light_vertical_json);X.setToSetupPose(),X.setAnimationByName(0,"animation",!0),K.background.addChild(Q),K.background.addChild(X)}static placeKeystone(q,K,z,Q){return(0,Y.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.audio.playSFX(39,"appear"),q.time.events.addTimer(2333,(()=>{at.q.instance.prodigy.audio.playSFX(40,"pop")}),this),at.q.instance.prodigy.world.getZone(nt.A_.ACADEMY).setKeystoneState(z,ut.s.Placed),at.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(st.B.FEATURE_TOWERS_PROMPT,st.B.NOOT_TOWER_PROMPT),at.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(st.B.FEATURE_ACADEMY_TOWERS,st.B.BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES),at.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(st.B.FEATURE_ACADEMY_TOWERS,st.B.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE);const Y=q.add.spine(z.x,z.y,et.Q.Spine_academygh_addkeystone_json);Y.setToSetupPose(),K.above.add(Y),Y.setAnimationByName(0,`keystone-add-${z.zone}`),yield Y.onComplete.asPromise(),Y.setAnimationByName(0,`keystone-idle-${z.zone}`,!0),bt.setGuideHandActive(ut.N.anyKeystonesToPlace()||rt.U.isEndgameQuestActive())}))}static initKeystones(q,K){var z;const Y=q.add.spine(640,403,et.Q.Spine_academygh_centre_json);Y.setToSetupPose(),Y.updateMethod=Q.ba$.Pixi;const X=Y.setAnimationByName(0,"tutorial");X.time=X.animationEnd,Y.updateMethod=Q.ba$.Spine,K.content.addChild(Y);const J=ut.N.getAllTowerData(),tt=rt.U.progressData.step===it.B.Guardian5Defeated?5:rt.U.getCurrentGuardianIndex();for(let Q=0;Q<5;Q++){const Y=J[bt.TOWER_DATA_INDEX_BY_GUARDIAN_INDEX[Q]];if(at.q.instance.prodigy.world.getZone(nt.A_.ACADEMY).getKeystoneState(Y.keystone.zone)===ut.s.Placed){const X=q.add.spine(Y.keystone.x,Y.keystone.y,et.Q.Spine_academygh_addkeystone_json),J=(null===(z=K.screenData)||void 0===z?void 0:z.guardianJustDefeated)&&tt===Q+1,it=`keystone-${tt>Q?"active-":""}idle-${Y.keystone.zone}`;if(X.setToSetupPose(),J){const z=q.add.spine(Y.keystone.x,Y.keystone.y,et.Q.Spine_circle_bloom_1_json);z.alpha=0,z.setAnimationByName(0,"animation",!0),K.above.add(z);const Q=at.q.instance.game.add.tween(z,this).to({alpha:1},450,null,!1).to({alpha:1},750,null,!1).to({alpha:0},900,null,!1),J=()=>{at.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_academy_keystone_activation_sheen)};Q.onStart.addOnce(J),X.onStart.addOnce((()=>{Q.start()})),X.setAnimationByName(0,`keystone-activate-${Y.keystone.zone}`,!1),X.addAnimationByName(0,it,!0)}else X.setAnimationByName(0,it,!0);K.above.add(X)}}Y.setToSetupPose()}playMissedPuppetMasterGearSequence(){return(0,Y.sH)(this,void 0,void 0,(function*(){try{const q=at.q.instance.prodigy.gameContainer.get("983-05a7"),K=(yield q.loadWithDependenciesFromGUID(J.l.EndgameIllustrationPuppetMasterDefeat)).findComponentInChildren(lt.V);yield K.onComplete.asPromise()}catch(e){Q.RQr.logError(e,"Error showing story panels")}const q={};yield new Promise((K=>{rt.U.awardMissedPuppetMasterGear(),at.q.instance.game.broadcaster.addAppListener("Prodigy.Events.Endgame.MISSED_PUPPET_MASTER_GEAR_AWARDED",(()=>K()),q)})),at.q.instance.game.broadcaster.removeAppListener("Prodigy.Events.Endgame.MISSED_PUPPET_MASTER_GEAR_AWARDED",q),this.zone.playScene("endgamePostPuppetMaster")}))}}bt.TOWER_DATA_INDEX_BY_GUARDIAN_INDEX=[0,1,3,4,2]},10213:(q,K,z)=>{"use strict";z.d(K,{z:()=>Z});var Y=z(28029),Q=z(93867),X=z(83726);class Z extends X.T{setup(q,K,z={}){super.setup(q,K,z),Q.U.shouldShowPuppetMasterDefeatCelebration()&&Y.E.addConfetti(K.foregroundGameObject)}}},64544:(q,K,z)=>{"use strict";z.d(K,{w:()=>J});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152);let J=class extends Q.uAl{create(){super.create();{const q=X.q.instance.prodigy.world.getCurrentZone();this._towerZone=X.q.instance.prodigy.world.getZone(q);const K=X.q.instance.prodigy.world.getCurrentMap().split("-")[1];this._currentMap=this._towerZone.getMap(K)}}getCurrentFloor(){return this._towerZone.CurrentFloor}getNextFloor(){return this._towerZone.CurrentFloor+1}getElement(){return this._towerZone.Element}getBattlesWon(){return this._towerZone.monstersDefeated}getTotalBattles(){return this._towerZone.goalTotal}getCurrentTowerMap(){return this._currentMap}getCurrentTowerZone(){return this._towerZone}getCurrentTowerMaxFloor(){return this._towerZone.TotalFloors}getWardenSaved(){return this._towerZone.isWardenSaved}destroy(){this._towerZone=null,this._currentMap=null,super.destroy()}};J=(0,Y.Cg)([(0,Q.EVk)("AcademyTowerDataProvider",Z.Y.academy)],J)},90029:(q,K,z)=>{"use strict";z.d(K,{l:()=>et});var Y=z(8674),Q=z(62459),X=z(35120),Z=z(28152),J=z(17331),tt=z(64544);let et=class extends Q.uAl{create(){super.create(),this._towerZone=this._academyTowerDataProvider.getCurrentTowerZone(),this._currentMap=this._academyTowerDataProvider.getCurrentTowerMap()}destroy(){this._currentMap=null,this._towerZone=null,super.destroy()}setCallbacks(q,K,z){this._gotoNextFloor=K,this._gotoCommonRoom=q,this._exitElevator=z}goToNextFloor(){this._gotoNextFloor?this._gotoNextFloor(this._currentMap):(this.onFloorExit(),this._currentMap.dungeonZone.enterDungeon()),this._rootGameObject.destroy()}goToCommonRoom(){this._gotoCommonRoom?this._gotoCommonRoom(this._currentMap):(this.onFloorExit(),X.q.instance.prodigy.world.it(this._towerZone.commonRoom)),this._rootGameObject.destroy()}exitElevator(){var q;this._exitElevator?this._exitElevator():null===(q=this._elevator)||void 0===q||q.exit(),this._rootGameObject.destroy()}onFloorExit(){this._towerZone.monstersDefeated===this._towerZone.goalTotal&&(this._towerZone.setFloor(this._towerZone.CurrentFloor,!0),this._towerZone.sendSegmentEvent("Tower Floor Completed"))}};(0,Y.Cg)([(0,Q.MnK)(J.H),(0,Y.Sn)("design:type",J.H)],et.prototype,"_elevator",void 0),(0,Y.Cg)([(0,Q.MnK)(tt.w),(0,Y.Sn)("design:type",tt.w)],et.prototype,"_academyTowerDataProvider",void 0),(0,Y.Cg)([(0,Q.ERr)(),(0,Y.Sn)("design:type",Q._mx)],et.prototype,"_rootGameObject",void 0),(0,Y.Cg)([(0,Q.DTs)(),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[Function,Function,Function]),(0,Y.Sn)("design:returntype",void 0)],et.prototype,"setCallbacks",null),(0,Y.Cg)([(0,Q.DTs)(),(0,Y.Sn)("design:type",Function),(0,Y.Sn)("design:paramtypes",[]),(0,Y.Sn)("design:returntype",void 0)],et.prototype,"onFloorExit",null),et=(0,Y.Cg)([(0,Q.EVk)("ExitTowerFloor",Z.Y.academy)],et)},21922:(q,K,z)=>{"use strict";z.d(K,{u:()=>et});var Y=z(8674),Q=z(62459),X=z(28152),Z=z(74846),J=z(44094),tt=z(64544);let et=class extends Q.uAl{constructor(){super(...arguments),this._uiSpineAnimatonClip=[],this._enemyDefeatedFillVisual=[]}postCreate(){super.postCreate(),this.resetVisuals()}resetVisuals(){for(let q=0;q=K)this._completionFill.active=!0,this.updateFloorCompleteText();else for(let z=0;z=this._academyTowerDataProvider.getTotalBattles())this._uiSpineAnimatonClip[1].play();else for(let K=0;K{"use strict";z.d(K,{M:()=>tt});var Y=z(88022),Q=z(51742),X=z(56942),Z=z(28930),J=z(71802);class tt extends J.D{constructor(q,K,z){super(q,"map","MAP_ACADEMY_ARCHIVES",640,280,K.concat([Q.c.Sfx_academy_portal_open,X.Q.Spine_archive_door_glow_json,Y._.Popup_ui_roulette_json]),z,"map-archives"),this.doorways=[{area:{x:640,y:160},exit:{x:640,y:560},walkTarget:{x:640,y:220},glowPos:{x:640,y:155},glowAnimation:"front-glow"},{area:{x:1180,y:400},exit:{x:180,y:420},walkTarget:{x:1135,y:430},glowPos:{x:1160,y:395},glowAnimation:"side-2-glow",isGlowFlipped:!0},{area:{x:640,y:640},exit:{x:640,y:280},walkTarget:{x:640,y:595},glowPos:{x:640,y:595},glowAnimation:"bottom-glow"},{area:{x:100,y:400},exit:{x:1100,y:420},walkTarget:{x:140,y:430},glowPos:{x:120,y:395},glowAnimation:"side-2-glow"}],this.counterUI=50}setup(q,K,z){super.setup(q,K,z),this.dungeonZone.goalCollected===this.dungeonZone.goalTotal&&this.guideToExit(1)}updateHUDCounter(){super.updateHUDCounter(),this.dungeonZone.goalCollected===this.dungeonZone.goalTotal&&this.guideToExit(1)}addDoorGlow(q,K){if(super.addDoorGlow(q,K),q===Z.O.North){const q=this.game.add.spine(K.glowPos.x,K.glowPos.y,X.Q.Spine_archive_door_glow_json);q.setToSetupPose(),q.setAnimationByName(0,"front-light",!0),this.screen.content.addChild(q)}}}},31478:(q,K,z)=>{"use strict";z.d(K,{k:()=>Z});var Y=z(42448),Q=z(90633),X=z(35120);function Z(){var q,K,z,Z,J,tt;const et=X.q.instance.prodigy.gameContainer.get("6d6-463e"),[it,st,nt]=[null!==(K=null===(q=et.get({type:"riftRunKey",id:Y.BN.PortalOneKey}))||void 0===q?void 0:q.quantity)&&void 0!==K?K:0,null!==(Z=null===(z=et.get({type:"riftRunKey",id:Y.BN.PortalTwoKey}))||void 0===z?void 0:z.quantity)&&void 0!==Z?Z:0,null!==(tt=null===(J=et.get({type:"riftRunKey",id:Y.BN.PortalThreeKey}))||void 0===J?void 0:J.quantity)&&void 0!==tt?tt:0],at=Math.max(it,st,nt)>0,rt=X.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Q.B.FEATURE_ZONE_UNLOCKED_POPUP,Q.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE);return at||rt?rt?2:1:0}},97447:(q,K,z)=>{"use strict";z.d(K,{j:()=>wt});var Y=z(8674),Q=z(62459),X=z(99625),Z=z(56942),J=z(42448),tt=z(4903),et=z(90633),it=z(38170),st=z(35120),nt=z(34829);const at={PORTAL_SPINE:Z.Q.Spine_rift_portal_basic_json,SHOW_TIMER:!1};var rt=z(72955),ot=z(3374),ht=z(35084),ct=z(29834),dt=z(23082),lt=z(46784),ut=z(65050),ft=z(70703),bt=z(65165),pt=z(95057),vt=z(53661),gt=z(80882),mt=z(84415),yt=z(30226),_t=z(4631),Et=z(83726);class wt extends Et.T{constructor(q,K){super(q,"A1","DRAGON_ISLE_MAP",wt.PLAYER_SPAWN_LOCATION_X,wt.PLAYER_SPAWN_LOCATION_Y,[],K.concat([X.l.RiftRunPortal,X.l.Overlay_difficulty_hard,X.l.Overlay_difficulty_expert])),this.portalTimeouts=[]}cleanup(){this.portalTimeouts.forEach((q=>window.clearTimeout(q))),this.portalTimeouts.length=0,super.cleanup()}setup(){var q;let K=!1;(null===(q=this.screen.screenData)||void 0===q?void 0:q[wt.SHOW_PORTAL_GUIDE_HAND])&&(K=!0),st.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(et.B.FEATURE_RIFTS,et.B.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN)||(K=!0),(()=>(0,Y.sH)(this,void 0,void 0,(function*(){var q,z;const X=st.q.instance.prodigy.gameContainer.get("81d-5606"),Z=yield X.fetchRiftsConfig();if(!Z){const q=st.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService);return void st.q.instance.prodigy.open.messageBoxOkay(q.getText(wt.FAILED_DATA_LOAD_LOCALIZED_TEXT_KEY))}(null!==(q=(z=st.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.data).rifts)&&void 0!==q?q:z.rifts={}).dragonIsleNotificationLastSeenTimestampMs=Date.now();const J=yield this.getActivePortals(Z),tt=K?[J[0]]:J,et=st.q.instance.prodigy.prefabFactory,it=tt.map((q=>(0,Y.sH)(this,void 0,void 0,(function*(){var z;const Y=[];Y.push(this.addPortal(q)),(null===(z=Z[q.id])||void 0===z?void 0:z.storeEnabled)&&!K&&Y.push(et.addPrefabNPC(q.shopNpcPrefab,q.shopNpcLocation.x,q.shopNpcLocation.y));const Q=(yield Promise.all(Y))[0];K&&this.addGuideHand(this.game,this.screen,Q.transform.worldPosition.x,Q.transform.worldPosition.y-80,0,20,180)}))));yield Promise.all(it)})))().catch(Q.RQr.createHandler("DragonIsleA1: Failed to set up dragon isle"))}addPortal(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=st.q.instance.prodigy.gameContainer.get("81d-5606");let z;const Y=q.spine&&Object.values(Z.Q).includes(q.spine)?q.spine:Z.Q.Spine_rift_portal_basic_json;z=q.timeRemainingMs?{PORTAL_SPINE:Y,SHOW_TIMER:!0,TIME_REMAINING_MS:q.timeRemainingMs}:{PORTAL_SPINE:Y,SHOW_TIMER:!1};const Q=yield wt.addPortalToScreen(this.screen,q.location.x,q.location.y,!0,z);Q.name=q.id,wt.portalGameObjects[q.id]=Q;const X=Q.findComponentInChildren(ht.n),J=Q.findComponentInChildren(bt.k);return Q.findComponentInChildren(ft.x).onComplete.add((()=>{J.onComplete.add(this.interactWithPortal.bind(this,K,q)),X.useHandCursor=!0,X.onClicked.add((()=>{J.run()}))})),Q}))}interactWithPortal(q,K){var z;q.selectedPortalId=K.id;const Y=st.q.instance.prodigy.gameContainer.get("ad2-c5b2"),X=Y.player.hasMembership(),Z=Y.player.isPlayingAtSchool()||yt.J.isDateWithinSchoolDayAndHours(new Date(Date.now())),J=this.getVideoType(X,Z);this.shouldShowMemberLockedRiftsVideo(J,X,q,Y.player)?this.showVideoMenu(J,X,Z,null!==(z=q.getCurrentRiftsId())&&void 0!==z?z:"",(()=>{this.zone.handleLeaving(_t.j.teleport,(()=>st.q.instance.game.state.start(dt.G.Rifts,void 0,rt.I,K.id)))})).catch(Q.RQr.createHandler("Error setting up rift selection menu after showing video")):this.zone.handleLeaving(_t.j.teleport,(()=>st.q.instance.game.state.start(dt.G.Rifts,void 0,rt.I,K.id)))}static addPortalToScreen(q,K,z){return(0,Y.sH)(this,arguments,void 0,(function*(q,K,z,Y=!1,Q=at){const Z=yield q.addPrefabToScreen(X.l.RiftRunPortal,K,z,Q),J=Z.findComponentInChildren(ft.x),tt=Z.findComponentInChildren(ct.j);if(Y){const q=2e3;J.startTween(1,0,void 0,q),tt.OnAnimationComplete.addOnce((()=>{Z.transform.setScale(1,1),tt.playAnimation("idle",!0);const q=Z.findComponentInChildren(gt.y);q&&q.fireBooleanSignalAgainstConstant()}))}else tt.playAnimation("idle",!0);return Z}))}setupTimeoutForPortalOpening(q,K,z){const Y=it.r.millisecondsBetween(new Date,new Date(K));Y>2*nt.s.HOURS_IN_MS||this.portalTimeouts.push(window.setTimeout((()=>{z&&this.setupTimeoutForPortalClosing(q,z),this.addPortal(q).catch(Q.RQr.createHandler("DragonIsleA1: Failed to open a portal after the start date has passed"))}),Y))}setupTimeoutForPortalClosing(q,K){q.timeRemainingMs=K-it.r.toDateUtcMs(Date.now());it.r.millisecondsBetween(new Date,new Date(K))>2*nt.s.HOURS_IN_MS||this.portalTimeouts.push(window.setTimeout((()=>{const K=wt.portalGameObjects[q.id];if(!K)return;const z=K.findComponentInChildren(Q.bTj);z&&z.playAnimation()}),it.r.millisecondsBetween(new Date,new Date(K))))}getActivePortals(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=st.q.instance.prodigy.gameContainer.get("81d-5606"),z=yield K.getActiveRiftsPortalIds();if(!Q.Aq$.isDefined(z)||0===z.length)return[];const Y=z.map((q=>J.R7[q]));for(const Q of Y){const K=q[Q.id];K&&(K.spine&&(Q.spine=K.spine),K.startDate||!K.endDate?K.endDate||!K.startDate?K.startDate&&K.endDate&&(it.r.isDateWithinRange(Date.now(),K.startDate,K.endDate)?this.setupTimeoutForPortalClosing(Q,it.r.toDateUtcMs(K.endDate)):it.r.toDateUtcMs(Date.now()){"use strict";var Y;z.d(K,{v:()=>Y}),function(q){q.Q1="QUESTS_FOREST_LEVEL_UP",q.Q2="QUESTS_FOREST_FIRST_MINIBOSS_FIGHT",q.Q3="QUESTS_FOREST_SECOND_MINIBOSS_FIGHT",q.Q4="QUESTS_FOREST_FIND_FLORIAN",q.Q5="QUESTS_FOREST_TALK_TO_MERCHANT",q.Q6="QUESTS_FOREST_SAVE_FLORIAN",q.Q7="QUESTS_FOREST_COLLECT_MANDRAKE",q.Q8="QUESTS_FOREST_DEFEAT_THE_TRIO",q.Q9="QUESTS_FOREST_FIND_GERALD",q.Q10="QUESTS_FOREST_FIX_FLUTE",q.Q11="QUESTS_FOREST_COLLECT_WAND",q.Q12="QUESTS_FOREST_WAKE_GERALD"}(Y||(Y={}))},76711:(q,K,z)=>{"use strict";z.d(K,{c:()=>ut,p:()=>Y});var Y,Q=z(62459),X=z(99625),Z=z(90633),J=z(5491),tt=z(65240),et=z(35120),it=z(77938),st=z(55122),nt=z(73797),at=z(43531),rt=z(54336),ot=z(40392),ht=z(22023),ct=z(30226),dt=z(85182),lt=z(73678);!function(q){q[q.TALK_TO_FLORIAN=0]="TALK_TO_FLORIAN",q[q.TRAVEL_TO_SHIVERCHILL=1]="TRAVEL_TO_SHIVERCHILL",q[q.TALK_TO_BOK=2]="TALK_TO_BOK"}(Y||(Y={}));class ut extends dt.T{constructor(q,K,z){super(q,K,ut.QUEST_INDEX,"Go to Shiverchill",{type:"seq",ID:1,N:3},["forest-B6","shiverchill-A10"],[],[],[],z,!1,"QUESTS_FOREST_GO_TO_SHIVERCHIL"),this._isDialogueShowing=!1}setup(q,K,z){return super.setup(q,K,z),et.q.instance.prodigy.world.getCurrentZone()===lt.A_.SHIVERCHILL?(this.unlockShiverchill(),this.showBokDialogue(),{enableAreaEvents:!1}):(this.zone.isSequenceComplete(ut.QUEST_INDEX,Y.TALK_TO_FLORIAN)&&this.unlockShiverchill(),z.getTag()===ut.DIALOGUE_MAP_TAG?(et.q.instance.prodigy.prefabFactory.addPrefabNPC(X.l.FloraNPC,800,330,!0).catch(Q.RQr.createHandler(`Unable to load the NPC Prefab: ${X.l.FloraNPC}`)),et.q.instance.prodigy.prefabFactory.addPrefabNPC(X.l.FlorianNPCLegacyMaps,700,320).catch(Q.RQr.createHandler(`Unable to load the NPC Prefab: ${X.l.FlorianNPCLegacyMaps}`)),{enableMonsters:!1,enableAreaEvents:!1}):{enableMonsters:!1})}process(q,K,z){this.screen=K,this._playerData=et.q.instance.prodigy.gameContainer.get("ad2-c5b2"),z.tag===ut.DIALOGUE_MAP_TAG&&(this.zone.isOnSequence(ut.QUEST_INDEX,Y.TALK_TO_FLORIAN)?this.showFlorianDialogue():this.zone.isOnSequence(ut.QUEST_INDEX,Y.TRAVEL_TO_SHIVERCHILL)&&K.menuBarCreationPromise.then((()=>this.highlightWorldMap())).catch(Q.RQr.createHandler("The menu bar could not be loaded"))),et.q.instance.prodigy.world.getCurrentZone()===lt.A_.SHIVERCHILL&&this._playerData.player.playerContainer.setPath([{x:326,y:650}],(()=>this._playerData.player.playerContainer.setPath([{x:426,y:500}])))}unlockShiverchill(){ot.i.BUTTONS_CONFIG.map((q=>q.nameKey)).filter((q=>!ut.ENABLED_ZONE_IDS.includes(q)));et.q.instance.prodigy.gameContainer.get("fa1-8ec9").completeBreadcrumb(Z.B.FEATURE_FIREFLY_QUEST_REVISIONS,Z.B.BREADCRUMB_SHIVERCHILL_UNLOCKED)}showFlorianDialogue(){if(this._isDialogueShowing)return;const q=et.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),K=new at.rD(et.q.instance.prodigy.game),z=[1395,1396].map((q=>({dialogueData:K.dataProvider.get(q),blockInput:!0})));z[z.length-1].nextButtonText=q.getText("BUTTON_LETS_GO"),K.addEvents(z),K.start(!0,(()=>{this.zone.completeSequence(ut.QUEST_INDEX,Y.TALK_TO_FLORIAN),this.unlockShiverchill(),this.highlightWorldMap()})),this._isDialogueShowing=!0}highlightWorldMap(){et.q.instance.game.broadcaster.broadcast(nt.Y1.HighlightMapButton,nt.HG.HUD),ot.i.setNextVisitParameters({disableClose:!0,disableZoneGoals:!0,disableDifficultyModeSelect:!0})}showBokDialogue(){let q;et.q.instance.prodigy.prefabFactory.addMonster(this.map,520,410,0,{encounter:[{ID:ut.PET_AWARD_ID}],showNewIndicator:!1}).then((K=>{q=K,K.findComponentInChildren(rt.s).Active=!1})).catch(Q.RQr.createHandler("Could not catch monster"));const K=et.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService),z=new at.rD(et.q.instance.prodigy.game),Y=[1397,1398,1399].map((q=>({dialogueData:z.dataProvider.get(q),blockInput:!0})));Y[Y.length-1].nextButtonText=K.getText("BUTTON_GET_GIFT"),z.addEvents(Y),z.start(!0,(()=>{q&&(q.active=!1),this.awardPet()}))}awardPet(){const q=ut.PET_AWARD_ID,K=this._playerData.getLevel(),z=it.t.getItem("pet",q),Y={type:"pet",ID:q,N:1,data:{level:K,stars:st.s.xpRequiredForLevel(K,J.V.Pet)}},Q={ID:q,name:z.name,level:K};et.q.instance.prodigy.open.prefabMenu(X.l.PetRescueCardSequence,(()=>{ct.J.bagItem(Y,et.q.instance.game,"got-pet",void 0,{source_type:tt.C.QuestReward}),this.autoEquipPet(q),this.zone.completeQuest(ut.QUEST_INDEX),this.screen.process()}),void 0,void 0,void 0,{PET_RESCUE_CREATURE_DATA:Q,PET_RESCUE_BUTTON_TEXT_KEY:"EPIC_VIEWER_ADD_TO_TEAM",PET_RESCUE_STAMP_ENABLED:!1})}autoEquipPet(q){const K=this._playerData.player.kennel.getPetTeamIDs();if(!K.includes(q)){const z=ht.P8.isPetEvolvedStarter(K[1])?1:2,Y=this._playerData.player.kennel.getPetByID(q);this._playerData.player.kennel.removeAtTeamPosition(z),this._playerData.player.kennel.setTeamPosition(Y,z)}}}ut.DIALOGUE_MAP_TAG="B6",ut.QUEST_INDEX=5,ut.PET_AWARD_ID=79,ut.ENABLED_ZONE_IDS=["WORLD_FIREFLY_FOREST","WORLD_SHIVERCHILL_MOUNTAINS"]},46318:(q,K,z)=>{"use strict";z.d(K,{Q:()=>_t});var Y=z(8674),Q=z(62459),X=z(95891),Z=z(68910),J=z(88022),tt=z(62886),et=z(60157),it=z(17446),st=z(65240),nt=z(35120),at=z(34829),rt=z(43846),ot=z(77938),ht=z(73797),ct=z(43531),dt=z(23283),lt=z(64353),ut=z(95057),ft=z(21097),bt=z(95130),pt=z(17425),vt=z(76945),gt=z(30226),mt=z(47255),yt=z(71586);class _t extends bt.D{constructor(q,K,z,Y,X,Z=-55,tt,et=!1){if(super(q,K),this.soundTimeoutInterval=null,this.onClose=null,this.numSpins=0,this.player=z,this.screen=Y,this.assetID=X,this.data=ot.t.getItem("prizeWheel",X).data,this.onClose=tt,Q.Aq$.isDefined(this.screen)&&(this.wasVisible=Q.Aq$.isDefined(this.screen.questProgress)&&this.screen.questProgress.visible,this.wasVisible&&(this.screen.questProgress.visible=!1)),this.wheelItems=_t.getWheelItems(this.game,this.assetID),!et){const q=nt.q.instance.prodigy.create.sprite(0,0,J._.General_core_json,"overlay-small");q.width=this.game.world.width,q.height=this.game.world.height,q.alpha=.5,this.add(q),q.inputEnabled=!0}this.drawWheel(Z).catch(Q.RQr.createHandler("Wheel: Failed to draw the wheel"))}drawWheel(q){return(0,Y.sH)(this,void 0,void 0,(function*(){const K=.5*this.game.world.width,z=.5*this.game.world.height+q;let Y=null;Y="singleImage"===this.data.atlas?this.add(nt.q.instance.prodigy.create.sprite(K+this.data.wheelTopOffset.x,z+this.data.wheelTopOffset.y,`singleImage-${this.data.wheelTop}`)):this.add(nt.q.instance.prodigy.create.sprite(K+this.data.wheelTopOffset.x,z+this.data.wheelTopOffset.y,this.data.atlas,this.data.wheelTop)),Y.anchor.set(.5,.5);const X=360/this.wheelItems.length;this.wheel=nt.q.instance.prodigy.create.element(this,K,z),this.wheel.angle=X/2;const J=this.wheel.angle;let tt=null;"singleImage"===this.data.atlas?(tt=this.wheel.add(nt.q.instance.prodigy.create.sprite(0,0,`singleImage-${this.data.wheelSprite}`)),pt.K.cacheAsset(this.game,`singleImage-${this.data.wheelSprite}`,pt.K.zoneAssetsCached)):(tt=this.wheel.add(nt.q.instance.prodigy.create.sprite(0,0,this.data.atlas,this.data.wheelSprite)),tt.scale.set(1,1)),tt.anchor.set(.5,.5);for(let q=0;q0&&(q={conversionFunnelName:mt.o.FunnelSecondWheelSpin}),this.player.canSpin(this.assetID)?(this.showSpinningDialogue(),this.startSpin()):this.checkTickets(this.assetID)?this.consumeTicket(this.assetID):this.showOutOfSpinsDialogue(q)}close(){this.wasVisible&&(this.screen.questProgress.visible=!0),nt.q.instance.game.broadcaster.broadcast(ht.Y1.ShowHUD,ht.HG.HUD),Q.Aq$.isDefined(this.onClose)&&this.onClose(),this.destroy()}startSpin(){var q,K,z;let Y=at.s.get("GameConstants.Features.Wheel.SPIN_TIME");const X=Q.Aq$.isDefined(this.selectedIndex)?this.selectedIndex:0;this.selectedIndex=this.wheelItems.indexOf(vt.o.weightedArrayElement(this.wheelItems));const Z=this.wheelItems[this.selectedIndex].item,J=nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player;Q.Aq$.isDefined(this.data.maxedItemPrizeSubstitute)&&J.hasMaxQuantityOfItem(Z.type,Z.ID)&&(this.selectedIndex=this.data.maxedItemPrizeSubstitute),this.playSound(Y,100);const tt=360/this.wheelItems.length,et=this.wheel.angle+2880+(this.selectedIndex-X)*-tt;this.game.add.tween(this.wheel,this).to({angle:et},Y,Q.GS3.Cubic.Out).start().onTweenComplete.addOnce(this.endSpin,this),this.player.spinWheel(this.assetID),this.sendSpinWheelQuestEvent();const it=nt.q.instance.prodigy.gameContainer.get("20f-5f67"),st=nt.q.instance.prodigy.gameContainer.get("119-35f9");if(st.getActiveFestival()){const Y=nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily,Q=Y.getFestivalInstanceName(),X=Y.festivalType;this.wheelName=null===(K=null===(q=st.getFestivalConfig())||void 0===q?void 0:q.festivalPrizeWheels.find((q=>q.wheelId===this.assetID)))||void 0===K?void 0:K.name,it.festival.sendFestivalPrizeWheelSpunEvent(null!==(z=this.wheelName)&&void 0!==z?z:this.assetID.toString(),this.assetID,Q,X,this.numSpins>0)}else it.economy.sendPrizeWheelSpunEvent(this.assetID===_t.DAYTIME_WHEEL?dt.U.WheelOfWonder:dt.U.TwilightWheel)}playSound(q,K){if(q<=0)return;nt.q.instance.prodigy.audio.playSFX(19,"tick");const z=K+9e-7*Math.pow(K,3);this.soundTimeoutInterval=window.setTimeout(this.playSound.bind(this,q-z,z),K)}endSpin(){this.numSpins++,this.closeSpinDialogue(),this.openPrizesDialogue([this.wheelItems[this.selectedIndex].item],this.data.eventType)}tryAgain(){const q={yes:this.trySpin.bind(this),no:this.close.bind(this),text:nt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(this.checkTickets(this.assetID)&&!this.player.canSpin(this.assetID)?this.data.ticketDialogue:this.data.spinAgainDialogue),anim:4};this.showDialogue([q])}destroy(q={children:!0}){this.player=null,super.destroy(q),null!==this.soundTimeoutInterval&&(clearTimeout(this.soundTimeoutInterval),this.soundTimeoutInterval=null)}showSpinningDialogue(){const q={text:nt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(this.data.spinningDialogue),anim:4,hideNext:!0};this.showDialogue([q])}closeSpinDialogue(){this.dialogueController.close()}showOutOfSpinsDialogue(q){const K=nt.q.instance.prodigy.gameContainer,z=K.get("20f-5f67"),Y=[];Y.push({text:K.get(Q.$Bt.LocalizationService).getText(this.data.outOfSpinsDialogue),anim:1});const X=K.get("ad2-c5b2").player;if(!this.player.hasMembership()&&!gt.J.shouldSuppressAd(X)){Y.push({callback:nt.q.instance.prodigy.open.membershipInfo.bind(nt.q.instance.prodigy.open,null,q)});const z=lt.P.shouldUseUnifiedConversionFlow(mt.o.FunnelSecondWheelSpin)?ut.R.UnifiedConversionFlow:gt.J.showYouTubeMembershipAd(this.game,!0)?ut.R.Video:ut.R.Static;K.get("20f-5f67").purchase.sendFunnelStart(Object.assign(Object.assign({},this.getSegmentPurchaseFunnelTriggerTypeAndCategory()),{contentId:`prizeWheel-${this.assetID}`,adType:z,adVersion:lt.P.getAdVersion(mt.o.FunnelSecondWheelSpin)}))}Y.push({callback:this.close.bind(this)}),z.economy.sendPrizeWheelSpinFailedEvent(this.assetID===_t.DAYTIME_WHEEL?dt.U.WheelOfWonder:dt.U.TwilightWheel,this.player.hasMembership()?ft.WE.OutsideOfHours:ft.WE.MemberLocked),this.showDialogue(Y)}getSegmentPurchaseFunnelTriggerTypeAndCategory(){return{type:"Second-Daily-Wheel-Spin",category:"Daily"}}openPrizesDialogue(q,K){const z=nt.q.instance.prodigy.open.gotItem(q,this.tryAgain.bind(this),null,K,null,null,{source_type:st.C.PrizeWheel});z.setParent(this),z.dialogue.setParent(z)}checkTickets(q){if(1===q){return nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.backpack.hasItem("item",130)>0}return!1}consumeTicket(q){1===q&&this.player.backpack.consume("item",130,1);const K={text:nt.q.instance.prodigy.gameContainer.get(Q.$Bt.LocalizationService).getText(this.data.spinningDialogue),anim:4,hideNext:!0};this.showDialogue([K]),this.startSpin()}sendSpinWheelQuestEvent(){const q=nt.q.instance.prodigy.gameContainer.get("b37-c775"),K={params:{taskEventType:et.Z7.Item,rarity:it.E.Common,itemType:"prizeWheel",source:st.C.PrizeWheel,id:this.assetID}};q.sendQuestEventViaHub(tt.T.SPIN_WHEEL,K).catch(Q.RQr.createHandler("Error sending a quest event for spinning a wheel"))}generateFestivalWheelCountdownText(q){const K=nt.q.instance.prodigy.gameContainer.get("ad2-c5b2").player.daily,z=q.getFestivalConfig(),Y=q.getActiveFestival();let X=0;if(z&&Y&&K.currentWheelEndDate){const q=nt.q.instance.prodigy.gameContainer.get("0f2-d6bd");let z=new Date(K.currentWheelEndDate);const Q=new Date(Y.endDate);z>Q&&(z=Q),X=Math.floor((z.getTime()-q.getServerTimeMs())/864e5),0===X&&(X=1)}const J=new Z.TextStyle({fontFamily:Q.dBt.PaytoneOne,fontSize:32,fill:16777215,fontWeight:"bold",stroke:3552822,strokeThickness:4,align:"center"});return new Z.Text((0,rt.k)("WHEEL_TIME_REMAINING",X,1===X?"":"s"),J)}}_t.DEBUG_SPIN_TIME_MS=-1,_t.DAYTIME_WHEEL=1},8674:(q,K,z)=>{"use strict";z.d(K,{Cg:()=>Q,Qj:()=>X,Sn:()=>Z,Tt:()=>Y,sH:()=>J});function Y(q,K){var z={};for(var Y in q)Object.prototype.hasOwnProperty.call(q,Y)&&K.indexOf(Y)<0&&(z[Y]=q[Y]);if(null!=q&&"function"==typeof Object.getOwnPropertySymbols){var Q=0;for(Y=Object.getOwnPropertySymbols(q);Q=0;J--)(Q=q[J])&&(Z=(X<3?Q(Z):X>3?Q(K,z,Z):Q(K,z))||Z);return X>3&&Z&&Object.defineProperty(K,z,Z),Z}function X(q,K){return function(z,Y){K(z,Y,q)}}function Z(q,K){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(q,K)}function J(q,K,z,Y){return new(z||(z=Promise))((function(Q,X){function Z(q){try{tt(Y.next(q))}catch(e){X(e)}}function J(q){try{tt(Y.throw(q))}catch(e){X(e)}}function tt(q){var K;q.done?Q(q.value):(K=q.value,K instanceof z?K:new z((function(q){q(K)}))).then(Z,J)}tt((Y=Y.apply(q,K||[])).next())}))}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError},20748:(q,K)=>{"use strict";function z(q,K,z,Y){var Q={timer:void 0,lastArgs:[]},X=function(){for(var Y=this,X=[],Z=0;Z1&&"object"==typeof q[1]&&void 0!==q[1].leading&&(Q=q[1]),Q&&(Y=Q.leading),function(){for(var q=[],K=0;K{"use strict"},88835:(q,K,z)=>{"use strict";var Y=z(9655);function Q(){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 X=/^([a-z0-9.+-]+:)/i,Z=/:[0-9]*$/,J=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,tt=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),et=["'"].concat(tt),it=["%","/","?",";","#"].concat(et),st=["/","?","#"],nt=/^[+a-z0-9A-Z_-]{0,63}$/,at=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,rt={javascript:!0,"javascript:":!0},ot={javascript:!0,"javascript:":!0},ht={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},ct=z(55373);function dt(q,K,z){if(q&&"object"==typeof q&&q instanceof Q)return q;var Y=new Q;return Y.parse(q,K,z),Y}Q.prototype.parse=function(q,K,z){if("string"!=typeof q)throw new TypeError("Parameter 'url' must be a string, not "+typeof q);var Q=q.indexOf("?"),Z=-1!==Q&&Q127?St+="x":St+=Tt[At];if(!St.match(nt)){var Ot=Et.slice(0,mt),It=Et.slice(mt+1),Dt=Tt.match(at);Dt&&(Ot.push(Dt[1]),It.unshift(Dt[2])),It.length&&(dt="/"+It.join(".")+dt),this.hostname=Ot.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),_t||(this.hostname=Y.toASCII(this.hostname));var Rt=this.port?":"+this.port:"",Pt=this.hostname||"";this.host=Pt+Rt,this.href+=this.host,_t&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==dt[0]&&(dt="/"+dt))}if(!rt[ft])for(mt=0,wt=et.length;mt0)&&z.host.split("@"))&&(z.auth=_t.shift(),z.hostname=_t.shift(),z.host=z.hostname);return z.search=q.search,z.query=q.query,null===z.pathname&&null===z.search||(z.path=(z.pathname?z.pathname:"")+(z.search?z.search:"")),z.href=z.format(),z}if(!bt.length)return z.pathname=null,z.search?z.path="/"+z.search:z.path=null,z.href=z.format(),z;for(var vt=bt.slice(-1)[0],gt=(z.host||q.host||bt.length>1)&&("."===vt||".."===vt)||""===vt,mt=0,yt=bt.length;yt>=0;yt--)"."===(vt=bt[yt])?bt.splice(yt,1):".."===vt?(bt.splice(yt,1),mt++):mt&&(bt.splice(yt,1),mt--);if(!ut&&!ft)for(;mt--;mt)bt.unshift("..");!ut||""===bt[0]||bt[0]&&"/"===bt[0].charAt(0)||bt.unshift(""),gt&&"/"!==bt.join("/").substr(-1)&&bt.push("");var _t,Et=""===bt[0]||bt[0]&&"/"===bt[0].charAt(0);pt&&(z.hostname=Et?"":bt.length?bt.shift():"",z.host=z.hostname,(_t=!!(z.host&&z.host.indexOf("@")>0)&&z.host.split("@"))&&(z.auth=_t.shift(),z.hostname=_t.shift(),z.host=z.hostname));return(ut=ut||z.host&&bt.length)&&!Et&&bt.unshift(""),bt.length>0?z.pathname=bt.join("/"):(z.pathname=null,z.path=null),null===z.pathname&&null===z.search||(z.path=(z.pathname?z.pathname:"")+(z.search?z.search:"")),z.auth=q.auth||z.auth,z.slashes=z.slashes||q.slashes,z.href=z.format(),z},Q.prototype.parseHost=function(){var q=this.host,K=Z.exec(q);K&&(":"!==(K=K[0])&&(this.port=K.substr(1)),q=q.substr(0,q.length-K.length)),q&&(this.hostname=q)},K.qg=dt,K.hd=function(q,K){return dt(q,!1,!0).resolve(K)},K.GP=function(q){return"string"==typeof q&&(q=dt(q)),q instanceof Q?q.format():Q.prototype.format.call(q)}},81135:q=>{q.exports=function(q){return q&&"object"==typeof q&&"function"==typeof q.copy&&"function"==typeof q.fill&&"function"==typeof q.readUInt8}},49032:(q,K,z)=>{"use strict";var Y=z(47244),Q=z(48184),X=z(25767),Z=z(35680);function J(q){return q.call.bind(q)}var tt="undefined"!=typeof BigInt,et="undefined"!=typeof Symbol,it=J(Object.prototype.toString),st=J(Number.prototype.valueOf),nt=J(String.prototype.valueOf),at=J(Boolean.prototype.valueOf);if(tt)var rt=J(BigInt.prototype.valueOf);if(et)var ot=J(Symbol.prototype.valueOf);function ht(q,K){if("object"!=typeof q)return!1;try{return K(q),!0}catch(e){return!1}}function ct(q){return"[object Map]"===it(q)}function dt(q){return"[object Set]"===it(q)}function lt(q){return"[object WeakMap]"===it(q)}function ut(q){return"[object WeakSet]"===it(q)}function ft(q){return"[object ArrayBuffer]"===it(q)}function bt(q){return"undefined"!=typeof ArrayBuffer&&(ft.working?ft(q):q instanceof ArrayBuffer)}function pt(q){return"[object DataView]"===it(q)}function vt(q){return"undefined"!=typeof DataView&&(pt.working?pt(q):q instanceof DataView)}K.isArgumentsObject=Y,K.isGeneratorFunction=Q,K.isTypedArray=Z,K.isPromise=function(q){return"undefined"!=typeof Promise&&q instanceof Promise||null!==q&&"object"==typeof q&&"function"==typeof q.then&&"function"==typeof q.catch},K.isArrayBufferView=function(q){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(q):Z(q)||vt(q)},K.isUint8Array=function(q){return"Uint8Array"===X(q)},K.isUint8ClampedArray=function(q){return"Uint8ClampedArray"===X(q)},K.isUint16Array=function(q){return"Uint16Array"===X(q)},K.isUint32Array=function(q){return"Uint32Array"===X(q)},K.isInt8Array=function(q){return"Int8Array"===X(q)},K.isInt16Array=function(q){return"Int16Array"===X(q)},K.isInt32Array=function(q){return"Int32Array"===X(q)},K.isFloat32Array=function(q){return"Float32Array"===X(q)},K.isFloat64Array=function(q){return"Float64Array"===X(q)},K.isBigInt64Array=function(q){return"BigInt64Array"===X(q)},K.isBigUint64Array=function(q){return"BigUint64Array"===X(q)},ct.working="undefined"!=typeof Map&&ct(new Map),K.isMap=function(q){return"undefined"!=typeof Map&&(ct.working?ct(q):q instanceof Map)},dt.working="undefined"!=typeof Set&&dt(new Set),K.isSet=function(q){return"undefined"!=typeof Set&&(dt.working?dt(q):q instanceof Set)},lt.working="undefined"!=typeof WeakMap&<(new WeakMap),K.isWeakMap=function(q){return"undefined"!=typeof WeakMap&&(lt.working?lt(q):q instanceof WeakMap)},ut.working="undefined"!=typeof WeakSet&&ut(new WeakSet),K.isWeakSet=function(q){return ut(q)},ft.working="undefined"!=typeof ArrayBuffer&&ft(new ArrayBuffer),K.isArrayBuffer=bt,pt.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&pt(new DataView(new ArrayBuffer(1),0,1)),K.isDataView=vt;var gt="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function mt(q){return"[object SharedArrayBuffer]"===it(q)}function yt(q){return void 0!==gt&&(void 0===mt.working&&(mt.working=mt(new gt)),mt.working?mt(q):q instanceof gt)}function _t(q){return ht(q,st)}function Et(q){return ht(q,nt)}function wt(q){return ht(q,at)}function Tt(q){return tt&&ht(q,rt)}function St(q){return et&&ht(q,ot)}K.isSharedArrayBuffer=yt,K.isAsyncFunction=function(q){return"[object AsyncFunction]"===it(q)},K.isMapIterator=function(q){return"[object Map Iterator]"===it(q)},K.isSetIterator=function(q){return"[object Set Iterator]"===it(q)},K.isGeneratorObject=function(q){return"[object Generator]"===it(q)},K.isWebAssemblyCompiledModule=function(q){return"[object WebAssembly.Module]"===it(q)},K.isNumberObject=_t,K.isStringObject=Et,K.isBooleanObject=wt,K.isBigIntObject=Tt,K.isSymbolObject=St,K.isBoxedPrimitive=function(q){return _t(q)||Et(q)||wt(q)||Tt(q)||St(q)},K.isAnyArrayBuffer=function(q){return"undefined"!=typeof Uint8Array&&(bt(q)||yt(q))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(q){Object.defineProperty(K,q,{enumerable:!1,value:function(){throw new Error(q+" is not supported in userland")}})}))},40537:(q,K,z)=>{var Y=Object.getOwnPropertyDescriptors||function(q){for(var K=Object.keys(q),z={},Y=0;Y=X)return q;switch(q){case"%s":return String(Y[z++]);case"%d":return Number(Y[z++]);case"%j":try{return JSON.stringify(Y[z++])}catch(K){return"[Circular]"}default:return q}})),J=Y[z];z=3&&(Y.depth=arguments[2]),arguments.length>=4&&(Y.colors=arguments[3]),ot(z)?Y.showHidden=z:z&&K._extend(Y,z),lt(Y.showHidden)&&(Y.showHidden=!1),lt(Y.depth)&&(Y.depth=2),lt(Y.colors)&&(Y.colors=!1),lt(Y.customInspect)&&(Y.customInspect=!0),Y.colors&&(Y.stylize=et),st(Y,q,Y.depth)}function et(q,K){var z=tt.styles[K];return z?"["+tt.colors[z][0]+"m"+q+"["+tt.colors[z][1]+"m":q}function it(q,K){return q}function st(q,z,Y){if(q.customInspect&&z&&vt(z.inspect)&&z.inspect!==K.inspect&&(!z.constructor||z.constructor.prototype!==z)){var Q=z.inspect(Y,q);return dt(Q)||(Q=st(q,Q,Y)),Q}var X=function(q,K){if(lt(K))return q.stylize("undefined","undefined");if(dt(K)){var z="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(z,"string")}if(ct(K))return q.stylize(""+K,"number");if(ot(K))return q.stylize(""+K,"boolean");if(ht(K))return q.stylize("null","null")}(q,z);if(X)return X;var Z=Object.keys(z),J=function(q){var K={};return q.forEach((function(q,z){K[q]=!0})),K}(Z);if(q.showHidden&&(Z=Object.getOwnPropertyNames(z)),pt(z)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return nt(z);if(0===Z.length){if(vt(z)){var tt=z.name?": "+z.name:"";return q.stylize("[Function"+tt+"]","special")}if(ut(z))return q.stylize(RegExp.prototype.toString.call(z),"regexp");if(bt(z))return q.stylize(Date.prototype.toString.call(z),"date");if(pt(z))return nt(z)}var et,it="",ft=!1,gt=["{","}"];(rt(z)&&(ft=!0,gt=["[","]"]),vt(z))&&(it=" [Function"+(z.name?": "+z.name:"")+"]");return ut(z)&&(it=" "+RegExp.prototype.toString.call(z)),bt(z)&&(it=" "+Date.prototype.toUTCString.call(z)),pt(z)&&(it=" "+nt(z)),0!==Z.length||ft&&0!=z.length?Y<0?ut(z)?q.stylize(RegExp.prototype.toString.call(z),"regexp"):q.stylize("[Object]","special"):(q.seen.push(z),et=ft?function(q,K,z,Y,Q){for(var X=[],Z=0,J=K.length;Z=0&&0,q+K.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return z[0]+(""===K?"":K+"\n ")+" "+q.join(",\n ")+" "+z[1];return z[0]+K+" "+q.join(", ")+" "+z[1]}(et,it,gt)):gt[0]+it+gt[1]}function nt(q){return"["+Error.prototype.toString.call(q)+"]"}function at(q,K,z,Y,Q,X){var Z,J,tt;if((tt=Object.getOwnPropertyDescriptor(K,Q)||{value:K[Q]}).get?J=tt.set?q.stylize("[Getter/Setter]","special"):q.stylize("[Getter]","special"):tt.set&&(J=q.stylize("[Setter]","special")),Et(Y,Q)||(Z="["+Q+"]"),J||(q.seen.indexOf(tt.value)<0?(J=ht(z)?st(q,tt.value,null):st(q,tt.value,z-1)).indexOf("\n")>-1&&(J=X?J.split("\n").map((function(q){return" "+q})).join("\n").slice(2):"\n"+J.split("\n").map((function(q){return" "+q})).join("\n")):J=q.stylize("[Circular]","special")),lt(Z)){if(X&&Q.match(/^\d+$/))return J;(Z=JSON.stringify(""+Q)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Z=Z.slice(1,-1),Z=q.stylize(Z,"name")):(Z=Z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Z=q.stylize(Z,"string"))}return Z+": "+J}function rt(q){return Array.isArray(q)}function ot(q){return"boolean"==typeof q}function ht(q){return null===q}function ct(q){return"number"==typeof q}function dt(q){return"string"==typeof q}function lt(q){return void 0===q}function ut(q){return ft(q)&&"[object RegExp]"===gt(q)}function ft(q){return"object"==typeof q&&null!==q}function bt(q){return ft(q)&&"[object Date]"===gt(q)}function pt(q){return ft(q)&&("[object Error]"===gt(q)||q instanceof Error)}function vt(q){return"function"==typeof q}function gt(q){return Object.prototype.toString.call(q)}function mt(q){return q<10?"0"+q.toString(10):q.toString(10)}K.debuglog=function(q){if(q=q.toUpperCase(),!X[q])if(Z.test(q)){var z=process.pid;X[q]=function(){var Y=K.format.apply(K,arguments);console.error("%s %d: %s",q,z,Y)}}else X[q]=function(){};return X[q]},K.inspect=tt,tt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},tt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},K.types=z(49032),K.isArray=rt,K.isBoolean=ot,K.isNull=ht,K.isNullOrUndefined=function(q){return null==q},K.isNumber=ct,K.isString=dt,K.isSymbol=function(q){return"symbol"==typeof q},K.isUndefined=lt,K.isRegExp=ut,K.types.isRegExp=ut,K.isObject=ft,K.isDate=bt,K.types.isDate=bt,K.isError=pt,K.types.isNativeError=pt,K.isFunction=vt,K.isPrimitive=function(q){return null===q||"boolean"==typeof q||"number"==typeof q||"string"==typeof q||"symbol"==typeof q||void 0===q},K.isBuffer=z(81135);var yt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _t(){var q=new Date,K=[mt(q.getHours()),mt(q.getMinutes()),mt(q.getSeconds())].join(":");return[q.getDate(),yt[q.getMonth()],K].join(" ")}function Et(q,K){return Object.prototype.hasOwnProperty.call(q,K)}K.log=function(){console.log("%s - %s",_t(),K.format.apply(K,arguments))},K.inherits=z(56698),K._extend=function(q,K){if(!K||!ft(K))return q;for(var z=Object.keys(K),Y=z.length;Y--;)q[z[Y]]=K[z[Y]];return q};var wt="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function Tt(q,K){if(!q){var z=new Error("Promise was rejected with a falsy value");z.reason=q,q=z}return K(q)}K.promisify=function(q){if("function"!=typeof q)throw new TypeError('The "original" argument must be of type Function');if(wt&&q[wt]){var K;if("function"!=typeof(K=q[wt]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(K,wt,{value:K,enumerable:!1,writable:!1,configurable:!0}),K}function K(){for(var K,z,Y=new Promise((function(q,Y){K=q,z=Y})),Q=[],X=0;X{"use strict";var Y=z(82682),Q=z(39209),X=z(10487),Z=z(36556),J=z(75795),tt=z(93628),et=Z("Object.prototype.toString"),it=z(49092)(),st="undefined"==typeof globalThis?z.g:globalThis,nt=Q(),at=Z("String.prototype.slice"),rt=Z("Array.prototype.indexOf",!0)||function(q,K){for(var z=0;z-1?K:"Object"===K&&function(q){var K=!1;return Y(ot,(function(z,Y){if(!K)try{z(q),K=at(Y,1)}catch(e){}})),K}(q)}return J?function(q){var K=!1;return Y(ot,(function(z,Y){if(!K)try{"$"+z(q)===Y&&(K=at(Y,1))}catch(e){}})),K}(q):null}},55904:q=>{class K{constructor(q,K,z,Y){this.id=K,this._backpressure=0,this.currentNode=z,this.timeout=Y,this.isAlive=!0,this.stream=q,this.stream.setConsumer(this.id,this)}getStats(){let q={id:this.id,backpressure:this._backpressure};return null!=this.timeout&&(q.timeout=this.timeout),q}_resetBackpressure(){this._backpressure=0}applyBackpressure(q){this._backpressure++}releaseBackpressure(q){this._backpressure--}getBackpressure(){return this._backpressure}clearActiveTimeout(){clearTimeout(this._timeoutId),delete this._timeoutId}write(q){void 0!==this._timeoutId&&this.clearActiveTimeout(q),this.applyBackpressure(q),this._resolve&&(this._resolve(),delete this._resolve)}kill(q){this._killPacket={value:q,done:!0},void 0!==this._timeoutId&&this.clearActiveTimeout(this._killPacket),this._destroy(),this._resolve&&(this._resolve(),delete this._resolve)}_destroy(){this.isAlive=!1,this._resetBackpressure(),this.stream.removeConsumer(this.id)}async _waitForNextItem(q){return new Promise(((K,z)=>{let Y;if(this._resolve=K,void 0!==q){let K=new Error("Stream consumer iteration timed out");(async()=>{let Q=function(q){let K,z=new Promise((z=>{K=setTimeout(z,q)}));return{timeoutId:K,promise:z}}(q);Y=Q.timeoutId,await Q.promise,K.name="TimeoutError",delete this._resolve,z(K)})()}this._timeoutId=Y}))}async next(){for(this.stream.setConsumer(this.id,this);;){if(!this.currentNode.next)try{await this._waitForNextItem(this.timeout)}catch(q){throw this._destroy(),q}if(this._killPacket){this._destroy();let q=this._killPacket;return delete this._killPacket,q}if(this.currentNode=this.currentNode.next,this.releaseBackpressure(this.currentNode.data),!this.currentNode.consumerId||this.currentNode.consumerId===this.id)return this.currentNode.data.done&&this._destroy(),this.currentNode.data}}return(){return delete this.currentNode,this._destroy(),{}}[Symbol.asyncIterator](){return this}}q.exports=K},44658:(q,K,z)=>{const Y=z(52960),Q=z(55904);q.exports=class extends Y{constructor(q){super(),q=q||{},this._nextConsumerId=1,this.generateConsumerId=q.generateConsumerId,this.generateConsumerId||(this.generateConsumerId=()=>this._nextConsumerId++),this.removeConsumerCallback=q.removeConsumerCallback,this._consumers=new Map,this.tailNode={next:null,data:{value:void 0,done:!1}}}_write(q,K,z){let Y={data:{value:q,done:K},next:null};z&&(Y.consumerId=z),this.tailNode.next=Y,this.tailNode=Y;for(let Q of this._consumers.values())Q.write(Y.data)}write(q){this._write(q,!1)}close(q){this._write(q,!0)}writeToConsumer(q,K){this._write(K,!1,q)}closeConsumer(q,K){this._write(K,!0,q)}kill(q){for(let K of this._consumers.keys())this.killConsumer(K,q)}killConsumer(q,K){let z=this._consumers.get(q);z&&z.kill(K)}getBackpressure(){let q=0;for(let K of this._consumers.values()){let z=K.getBackpressure();z>q&&(q=z)}return q}getConsumerBackpressure(q){let K=this._consumers.get(q);return K?K.getBackpressure():0}hasConsumer(q){return this._consumers.has(q)}setConsumer(q,K){this._consumers.set(q,K),K.currentNode||(K.currentNode=this.tailNode)}removeConsumer(q){let K=this._consumers.delete(q);return this.removeConsumerCallback&&this.removeConsumerCallback(q),K}getConsumerStats(q){let K=this._consumers.get(q);if(K)return K.getStats()}getConsumerStatsList(){let q=[];for(let K of this._consumers.values())q.push(K.getStats());return q}createConsumer(q){return new Q(this,this.generateConsumerId(),this.tailNode,q)}getConsumerList(){return[...this._consumers.values()]}getConsumerCount(){return this._consumers.size}}},52960:q=>{class K{async next(q){let K=this.createConsumer(q),z=await K.next();return K.return(),z}async once(q){let K=await this.next(q);if(K.done){if(null!=q){let q=new Error("Stream consumer operation timed out early because stream ended");throw q.name="TimeoutError",q}await new Promise((()=>{}))}return K.value}createConsumer(){throw new TypeError("Method must be overriden by subclass")}[Symbol.asyncIterator](){return this.createConsumer()}}q.exports=K},87490:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);z(33482),Y.__exportStar(z(79687),K),Y.__exportStar(z(47547),K)},2771:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BattleAction=void 0;var z=function(){};K.BattleAction=z},61582:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.CastSpellAction=void 0;var Y=z(17498),Q=z(95891),X=z(15907),Z=z(51648),J=z(36700),tt=z(44503),et=z(82825),it=z(49042),st=z(12634),nt=z(88250),at=z(66020),rt=z(58690),ot=z(89647),ht=z(1191),ct=function(q){function K(K,z,Y){var Q=q.call(this)||this;return Q.countsAsPlayedTurn=!0,Q._container=K,Q._stateUpdateManager=K.get(Z.StateUpdateManager),Q._spellCastUtil=K.get(st.SpellCastUtil),Q._affixStateDataProvider=K.get(J.AffixStateDataProvider),Q._statusEffectStateDataProvider=K.get(et.StatusEffectStateDataProvider),Q._spell=z,Q._targets=Y,Q}return Y.__extends(K,q),K.prototype.run=function(){var q,K,z,Z,J,et,st,ct,dt,lt=this,ut={type:rt.EBattleStateUpdate.CastSpell,id:this._spell.id,targets:[]};if(this._spell instanceof ot.UnitSpell){if(this._spell.isLocked)throw new X.BattleError("Cannot cast a locked spell. Spell ID - ".concat(this._spell.id));if(0!==this._spell.currentCooldown)throw new X.BattleError("Cannot cast a spell on cooldown. Spell ID: ".concat(this._spell.id));var ft=this._spell.energyCost;if(dt=this._spell.unit,ft>0){if(dt.mp0?++this._spell.currentCooldown:-1===this._spell.currentCooldown&&this._stateUpdateManager.addToBack({type:rt.EBattleStateUpdate.ModifySpellCooldown,unitId:dt.id,spellId:this._spell.id,cooldown:this._spell.currentCooldown})}var bt={caster:dt,targets:this._targets,spell:this._spell};this._container.dispatchEvent(it.EBattleEvent.CastingSpell,bt),this._targets=bt.targets,this._spell=bt.spell;var pt=[],vt={},gt=[],mt=this._spellCastUtil.generateSpellEffects(this._container,this._spell,this._targets),yt={};if(this._spell.statusEffects.length>0&&dt)try{for(var _t=Y.__values(this._spell.statusEffects),Et=_t.next();!Et.done;Et=_t.next()){var wt=Et.value,Tt=[];try{for(var St=(z=void 0,Y.__values(this._targets)),At=St.next();!At.done;At=St.next()){var Ct=At.value;Tt.push.apply(Tt,Y.__spreadArray([],Y.__read(this._spellCastUtil.getStatusEffectTargets(this._container,wt.targetType,dt,Ct)),!1))}}catch(kt){z={error:kt}}finally{try{At&&!At.done&&(Z=St.return)&&Z.call(St)}finally{if(z)throw z.error}}yt[wt.statusEffectId]=Tt.map((function(q){return q.id}))}}catch(Bt){q={error:Bt}}finally{try{Et&&!Et.done&&(K=_t.return)&&K.call(_t)}finally{if(q)throw q.error}}null===(ct=this.spellEffectProcessor)||void 0===ct||ct.call(this,mt);var Ot=Q.groupBy(mt,(function(q){return q.target.id})),It=function(q,K){var z=!1;ut.targets.push({unitId:q,hits:K.map((function(K){var X,Z,J,tt,et,it;lt._spellCastUtil.applySpellEffectsToTarget(K);var st=K.affixes.filter((function(q){return q.isDisplayed})),at=K.removedAffixes.filter((function(q){return q.isDisplayed})),ot={damage:K.damage,damageInformation:K.damageInformation,hpResult:K.target.health,affixes:st.length>0?st:void 0,removedAffixes:at.length>0?at.map((function(q){return q.id})):void 0};try{for(var ht=(X=void 0,Y.__values(K.flags)),ct=ht.next();!ct.done;ct=ht.next()){var dt=ct.value;switch(dt.flag){case nt.ESpellFlag.Rescue:z=!0;break;case nt.ESpellFlag.ChangeMp:dt.flagValue&&(ot.mpDamage=-dt.flagValue,ot.mpResult=K.target.mp);break;case nt.ESpellFlag.ChangeCooldown:if(dt.flagValue)try{for(var ut=(J=void 0,Y.__values(K.target.spells)),ft=ut.next();!ft.done;ft=ut.next()){var bt=ft.value,pt=Q.clamp(bt.currentCooldown+dt.flagValue,0,bt.cooldown);bt.currentCooldown!==pt&&bt.currentCooldown>=0&&(bt.currentCooldown=pt,lt._stateUpdateManager.addToBack({type:rt.EBattleStateUpdate.ModifySpellCooldown,unitId:q,spellId:bt.id,cooldown:bt.currentCooldown}))}}catch(wt){J={error:wt}}finally{try{ft&&!ft.done&&(tt=ut.return)&&tt.call(ut)}finally{if(J)throw J.error}}}}}catch(Tt){X={error:Tt}}finally{try{ct&&!ct.done&&(Z=ht.return)&&Z.call(ht)}finally{if(X)throw X.error}}try{for(var gt=(et=void 0,Y.__values(K.statusEffectsAdded)),mt=gt.next();!mt.done;mt=gt.next()){var _t=mt.value,Et=lt._statusEffectStateDataProvider.addStatusEffect(_t,!1);Et.intendedTargets=yt[_t.statusEffectId],vt[_t.statusEffectId]?vt[_t.statusEffectId].statusEffects.push(Et.statusEffects[0]):vt[_t.statusEffectId]=Et}}catch(St){et={error:St}}finally{try{mt&&!mt.done&&(it=gt.return)&&it.call(gt)}finally{if(et)throw et.error}}return ot}))});var X=K[0].target;pt.push.apply(pt,Y.__spreadArray([],Y.__read(ht.AffixUtils.handleAfterDamageAffixesForTarget(Dt._affixStateDataProvider,X)),!1)),(X.isDefeated()||z)&&(X.battleStatus=z?tt.EUnitBattleStatus.Rescued:tt.EUnitBattleStatus.Defeated,gt.push({type:rt.EBattleStateUpdate.DefeatUnit,unitId:X.id,isRescued:z}))},Dt=this;try{for(var Rt=Y.__values(Object.entries(Ot)),Pt=Rt.next();!Pt.done;Pt=Rt.next()){var Mt=Y.__read(Pt.value,2);It(Mt[0],Mt[1])}}catch(Ut){J={error:Ut}}finally{try{Pt&&!Pt.done&&(et=Rt.return)&&et.call(Rt)}finally{if(J)throw J.error}}var Nt={};for(var xt in vt){var Lt=vt[xt];Nt[xt]=Lt.statusEffects.map((function(q){return q.id}))}return Object.keys(Nt).length>0&&(ut.statusEffectsApplied=Nt),this._container.dispatchEvent(it.EBattleEvent.AddingCastSpellStateUpdate,bt,ut),(st=this._stateUpdateManager).addToBack.apply(st,Y.__spreadArray(Y.__spreadArray(Y.__spreadArray([ut],Y.__read(Object.values(vt)),!1),Y.__read(pt),!1),Y.__read(gt),!1)),!0},K}(z(2771).BattleAction);K.CastSpellAction=ct},43396:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.EmptyAction=void 0;var Y=z(17498),Q=function(q){function K(){var K=q.apply(this,Y.__spreadArray([],Y.__read(arguments),!1))||this;return K.countsAsPlayedTurn=!1,K}return Y.__extends(K,q),K.prototype.run=function(){return!0},K}(z(2771).BattleAction);K.EmptyAction=Q},27996:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.FumbleAction=void 0;var Y=z(17498),Q=z(51448),X=z(51648),Z=z(58690),J=z(54705),tt=function(q){function K(K,z){var Y=q.call(this)||this;return Y.countsAsPlayedTurn=!0,Y._stateUpdateManager=K.get(X.StateUpdateManager),Y._battleConstants=K.get(Q.BattleConstants),Y._target=z,Y}return Y.__extends(K,q),K.prototype.run=function(){var q={type:Z.EBattleStateUpdate.CastSpell,id:this._battleConstants.fumbleSpellId,targets:[{unitId:this._target.id,hits:[{damage:0,damageInformation:J.EDamageInformation.Fumble,hpResult:this._target.health}]}]};return this._stateUpdateManager.addToBack(q),!0},K}(z(2771).BattleAction);K.FumbleAction=tt},9189:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.PowerUpAction=void 0;var Y=z(17498),Q=z(51448),X=z(16104),Z=z(51648),J=z(58690),tt=z(54705),et=function(q){function K(K,z,Y){var J=q.call(this)||this;return J._stateUpdateManager=K.get(Z.StateUpdateManager),J._battleCalculations=K.get(X.BattleCalculations),J._battleConstants=K.get(Q.BattleConstants),J.correctAnswer=z,J.target=Y,J}return Y.__extends(K,q),K.prototype.run=function(){return this.correctAnswer?(this.countsAsPlayedTurn=!1,this.awardMp(this.target)):(this.countsAsPlayedTurn=!0,this.makeUnitFumble(this.target)),!this.correctAnswer},K.prototype.awardMp=function(q){var K=this._battleCalculations.getUnitMPIncrement(q);q.mp+=K;var z={type:J.EBattleStateUpdate.ModifyMp,unitId:q.id,mpResult:q.mp};this._stateUpdateManager.addToBack(z)},K.prototype.makeUnitFumble=function(q){var K={type:J.EBattleStateUpdate.CastSpell,id:this._battleConstants.fumbleSpellId,targets:[{unitId:q.id,hits:[{damage:0,damageInformation:tt.EDamageInformation.Fumble,hpResult:q.health}]}]};this._stateUpdateManager.addToBack(K)},K}(z(2771).BattleAction);K.PowerUpAction=et},24573:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.SkipTurnAction=void 0;var Y=z(17498),Q=z(51648),X=z(58690),Z=function(q){function K(K,z){var Y=q.call(this)||this;return Y.countsAsPlayedTurn=!1,Y._stateUpdateManager=K.get(Q.StateUpdateManager),Y._target=z,Y}return Y.__extends(K,q),K.prototype.run=function(){return this._stateUpdateManager.addToBack({type:X.EBattleStateUpdate.SkipTurn,unitId:this._target.id}),!0},K}(z(2771).BattleAction);K.SkipTurnAction=Z},40783:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(2771),K),Y.__exportStar(z(61582),K),Y.__exportStar(z(43396),K),Y.__exportStar(z(27996),K),Y.__exportStar(z(9189),K),Y.__exportStar(z(24573),K)},54284:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.Affix=void 0;var z=function(q){this._data=q};K.Affix=z},81327:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EAffixType=void 0,function(q){q.Stat="stat",q.DodgeChance="dodgeChance",q.ApplyDamage="applyDamage",q.ApplyHealing="applyHealing",q.BonusElement="bonusElement",q.IncomingDamageMultiplier="incomingDamage",q.OutgoingDamageMultiplier="outgoingDamage",q.IncomingHealingMultiplier="incomingHealing",q.OutgoingHealingMultiplier="outgoingHealing",q.IncomingCritChanceBonus="incomingCritChance",q.PreventDefeat="preventDefeat",q.Survivor="survivor",q.OneHitKill="oneHitKill",q.AlwaysDodge="alwaysDodge",q.NeverDodge="neverDodge",q.Shield="shield",q.AdditiveDamageMultiplier="additiveDamageMultiplier",q.Revive="revive"}(z||(K.EAffixType=z={}))},1191:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.AffixUtils=void 0;var Y=z(17498),Q=z(95891),X=z(81327),Z=z(54705),J=z(9546),tt=z(58690),et=function(){function q(){}return q.hasWhenToTrigger=function(q){return J.Util.isDefined(null==q?void 0:q.whenToTrigger)},q.handleAffixesForTarget=function(q,K,z,J){var tt,et,it,st,nt,at;if(q.getAffixesForUnit(z.id).find((function(q){return q.type===X.EAffixType.PreventDefeat}))){var rt=J.filter((function(q){return q.target===z})),ot=z.health;try{for(var ht=Y.__values(rt),ct=ht.next();!ct.done;ct=ht.next()){(bt=ct.value).damage>=ot&&(bt.damage=ot-1),ot-=bt.damage}}catch(Et){tt={error:Et}}finally{try{ct&&!ct.done&&(et=ht.return)&&et.call(ht)}finally{if(tt)throw tt.error}}}if(z.health>1&&q.getAffixesForUnit(z.id).find((function(q){return q.type===X.EAffixType.Survivor}))){rt=J.filter((function(q){return q.target===z}));try{for(var dt=Y.__values(rt),lt=dt.next();!lt.done;lt=dt.next()){if((bt=lt.value).damage>z.health){bt.damage=z.health-1;break}}}catch(wt){it={error:wt}}finally{try{lt&&!lt.done&&(st=dt.return)&&st.call(dt)}finally{if(it)throw it.error}}}var ut=q.getAffixesForUnit(z.id).filter((function(q){return q.type===X.EAffixType.Shield}));if(ut.length>0){rt=J.filter((function(q){return q.target===z}));for(var ft=0;ft0;++ft)for(var bt=rt[ft],pt=0;pt0;++pt){var vt=ut[pt];bt.damage=vt.damageRange?Math.min(bt.damage,Q.random(vt.damageRange.min,vt.damageRange.max)):0,bt.damageInformation=Z.EDamageInformation.None,vt.removeAfterHit&&(bt.removedAffixes.push(vt),q.removeAffix(vt,!1),ut.shift())}}var gt=K?q.getAffixesForUnit(K.id).find((function(q){return q.type===X.EAffixType.OutgoingHealingMultiplier})):void 0,mt=q.getAffixesForUnit(z.id).find((function(q){return q.type===X.EAffixType.IncomingHealingMultiplier}));if(mt||gt){rt=J.filter((function(q){return q.target===z}));try{for(var yt=Y.__values(rt),_t=yt.next();!_t.done;_t=yt.next()){(bt=_t.value).isDamageInformationFlagSet(Z.EDamageInformation.Heal)&&(mt&&(bt.damage=Math.round(bt.damage*mt.multiplier)),gt&&(bt.damage=Math.round(bt.damage*gt.multiplier)))}}catch(Tt){nt={error:Tt}}finally{try{_t&&!_t.done&&(at=yt.return)&&at.call(yt)}finally{if(nt)throw nt.error}}}},q.handleAfterDamageAffixesForTarget=function(q,K){var z=[];if(K.isDefeated()){var Y=q.getAffixesForUnit(K.id).find((function(q){return q.type===X.EAffixType.Revive}));Y&&(K.health=Math.max(1,Math.round(K.maxHealth*Y.percentHealth)),q.removeAffix(Y,!1),z.push({type:tt.EBattleStateUpdate.RemoveAffix,affixId:Y.id}),z.push({type:tt.EBattleStateUpdate.ReviveUnit,unitId:K.id,hpResult:K.health}))}return z},q}();K.AffixUtils=et},26342:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EWhenToReduce=void 0,function(q){q.StartOfTurn="startOfTurn",q.EndOfTurn="endOfTurn"}(z||(K.EWhenToReduce=z={}))},18902:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EWhenToTrigger=void 0,function(q){q.StartOfTurn="startOfTurn",q.EndOfTurn="endOfTurn",q.WhenDurationExpires="whenDurationExpires"}(z||(K.EWhenToTrigger=z={}))},38126:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(54284),K),Y.__exportStar(z(81327),K),Y.__exportStar(z(1191),K),Y.__exportStar(z(18902),K),Y.__exportStar(z(26342),K)},24599:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BattleController=void 0;var Y=z(17498),Q=z(79687),X=z(41334),Z=z(87584),J=z(21073),tt=function(){function q(){}return q.prototype.getVictoriousTeam=function(){var q=this.getTeams().filter((function(q){return!q.isDefeated()}));return 1===q.length?q[0]:null},q.prototype.getTeams=function(){var q=this;return this._battleStateDataProvider.getTeamIds().map((function(K){return q._battleContainer.getNamed(Z.Team,K)}))},q.prototype.getUnits=function(){var q=this;return this._battleStateDataProvider.getUnitIds().map((function(K){return q._battleContainer.getNamed(J.Unit,K)}))},q.prototype.removeUnit=function(q){this._battleContainer.get(X.BattleStateDataProvider).deleteUnitData(q)},Y.__decorate([(0,Q.inject)(Q.Container),Y.__metadata("design:type",Function)],q.prototype,"_battleContainer",void 0),Y.__decorate([(0,Q.inject)(X.BattleStateDataProvider),Y.__metadata("design:type",X.BattleStateDataProvider)],q.prototype,"_battleStateDataProvider",void 0),q=Y.__decorate([(0,Q.injectable)()],q)}();K.BattleController=tt},16636:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.TeamController=void 0;var Y=z(87584),Q=z(24599),X=function(){function q(q,K){this._battleContainer=K,this._battleController=K.get(Q.BattleController),this._team=K.getNamed(Y.Team,q)}return Object.defineProperty(q.prototype,"team",{get:function(){return this._team},enumerable:!1,configurable:!0}),q.prototype.start=function(){},q}();K.TeamController=X},12030:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BasicBattleCalculations=void 0;var Y=z(17498),Q=z(79687),X=function(){function q(){}return q.prototype.getUnitMPIncrement=function(q){return q.maxMp-q.mp},q=Y.__decorate([(0,Q.injectable)()],q)}();K.BasicBattleCalculations=X},19124:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.createDefaultBasicBattleConfiguration=void 0;K.createDefaultBasicBattleConfiguration=function(){return{difficulty:5}}},1616:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BasicBattleController=void 0;var Y=z(17498),Q=z(79687),X=z(2771),Z=z(10141),J=z(51648),tt=z(36700),et=z(44503),it=z(13435),st=z(73566),nt=z(49042),at=z(12634),rt=z(41866),ot=z(58690),ht=z(387),ct=z(21073),dt=z(9546),lt=z(24599),ut=z(16636),ft=z(84951),bt=z(19124),pt=function(q){function K(){return null!==q&&q.apply(this,arguments)||this}return Y.__extends(K,q),Object.defineProperty(K.prototype,"config",{get:function(){return this._battleControllerDataStore.getObjectOrDefault("config",bt.createDefaultBasicBattleConfiguration)},set:function(q){this._battleControllerDataStore.setObject("config",q)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"_turnOrder",{get:function(){var q=this._battleControllerDataStore.getObject("turnOrder");return dt.Util.assertDefined(q,"turnOrder is undefined"),q},set:function(q){this._battleControllerDataStore.setObject("turnOrder",q)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"_turnIndex",{get:function(){var q=this._battleControllerDataStore.getObject("turnIndex");return dt.Util.assertDefined(q,"turnIndex is undefined"),q},set:function(q){this._battleControllerDataStore.setObject("turnIndex",q)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"currentTurnOrder",{get:function(){return{turnOrder:this._turnOrder,turnIndex:this._turnIndex}},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"_round",{get:function(){var q;return null!==(q=this._battleControllerDataStore.getObject("round"))&&void 0!==q?q:0},set:function(q){this._battleControllerDataStore.setObject("round",q)},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"turn",{get:function(){var q;return null!==(q=this._battleControllerDataStore.getObject("turn"))&&void 0!==q?q:1},set:function(q){this._battleControllerDataStore.setObject("turn",q)},enumerable:!1,configurable:!0}),K.prototype.start=function(){var q,K;this._turnOrder=this._battleStateDataProvider.getUnitIds(),this._turnIndex=-1,this.changeTurn();try{for(var z=Y.__values(this.getTeamControllers()),Q=z.next();!Q.done;Q=z.next()){Q.value.start()}}catch(X){q={error:X}}finally{try{Q&&!Q.done&&(K=z.return)&&K.call(z)}finally{if(q)throw q.error}}this.doCurrentUnitTurn()},K.prototype.resume=function(){this.doCurrentUnitTurn()},K.prototype.getTeamControllers=function(){var q=this;return this._battleStateDataProvider.getTeamIds().map((function(K){return q._battleContainer.getNamed(ut.TeamController,K)}))},K.prototype.runAction=function(q){var K=q.run();this.checkForVictory(),K&&this.changeTurn(q.countsAsPlayedTurn),this.doCurrentUnitTurn()},K.prototype.checkForVictory=function(){var q=this.getVictoriousTeam();if(q)throw this._stateUpdateManager.addToBack({type:ot.EBattleStateUpdate.EndBattle,victoriousTeamId:q.id}),new Z.BattleEndError},K.prototype.getActiveUnit=function(){var q=this._battleControllerDataStore.getObjectOrDefault("turnOrder",(function(){return[]}));if(!(q.length<1||this._turnIndex<0))return this._battleContainer.getNamed(ct.Unit,q[this._turnIndex])},K.prototype.recalculateTurnOrder=function(){var q=this,K=this._turnOrder.map((function(K){return q._battleContainer.getNamed(ct.Unit,K)})),z=this._unitSorter.sort({units:K,currentUnitIndex:this._turnIndex});this._turnOrder=z.units.map((function(q){return q.id})),this._turnIndex=z.currentUnitIndex},K.prototype.changeTurn=function(q){this.removeDefeatedUnits();var K=this.getActiveUnit();do{this.recalculateTurnOrder(),null==K||K.endTurn(),this._affixStateDataProvider.endTurn(),this._turnIndex=(this._turnIndex+1)%this._turnOrder.length,0===this._turnIndex&&this.changeRound(),this.checkForVictory(),K=this.getActiveUnit(),dt.Util.assertDefined(K,"No active unit"),K.startTurn(),this.removeDefeatedUnits()}while(K.passive||K.isDefeated());q&&this.turn++,this.addActiveUnitStateUpdate(K.id),dt.Util.isDebugEnabled()&&this._stateUpdateManager.addDebugMessage(ht.EDebugMessageType.TurnOrder,this.getTurnOrderDebugMessage())},K.prototype.addActiveUnitStateUpdate=function(q){var K;if(null!==q){var z=this._battleContainer.getNamed(ct.Unit,q);if(this.shouldSendCalculatedSpellData(z)){var Y=this._battleContainer.get(at.SpellCastUtil);K=z.spells.map((function(q){return{spellId:q.id,spellPower:Y.calculateSpellPower(q),spellAccuracy:Y.calculateSpellAccuracy(q)}}))}}this._stateUpdateManager.addToBack({type:ot.EBattleStateUpdate.SetActiveUnit,unitId:q,spellData:K,turn:this.turn})},K.prototype.shouldSendCalculatedSpellData=function(q){return q.teamId===rt.ETeamId.Home},K.prototype.changeRound=function(){this._stateUpdateManager.addToBack({type:ot.EBattleStateUpdate.NewRound,round:++this._round}),this._battleContainer.dispatchEvent(nt.EBattleEvent.NewRoundStarted,this._round)},K.prototype.doCurrentUnitTurn=function(){var q=this.getActiveUnit();dt.Util.assertDefined(q,"No active unit");var K=this.getTeamControllers().find((function(K){return K.team.getMembers().includes(q)}));dt.Util.assertDefined(K,"Active unit not found on any team"),K.readyActionForUnit(q)},K.prototype.removeDefeatedUnits=function(){var q,K;try{for(var z=Y.__values(this._battleStateDataProvider.getUnitIds()),Q=z.next();!Q.done;Q=z.next()){var X=Q.value,Z=this._battleContainer.getNamed(ct.Unit,X);Z.isDefeated()&&this.removeUnit(Z.id)}}catch(J){q={error:J}}finally{try{Q&&!Q.done&&(K=z.return)&&K.call(z)}finally{if(q)throw q.error}}},K.prototype.removeUnit=function(K){var z=this._turnOrder.indexOf(K);-1!==z&&(this._turnOrder.splice(z,1),z===this._turnIndex?0!==this._turnIndex?--this._turnIndex:this._turnIndex=this._turnOrder.length-1:z>":""," \t ").concat(Y+1,". ").concat(K.id," (").concat(Q.slot,") (").concat(K.getStat(et.EStat.Initiative),", ").concat(K.rarity,", ").concat(K.level,")\n")})),z},Y.__decorate([(0,Q.inject)(it.BattleStateDataStore),Y.__metadata("design:type",Object)],K.prototype,"_battleControllerDataStore",void 0),Y.__decorate([(0,Q.inject)(J.StateUpdateManager),Y.__metadata("design:type",J.StateUpdateManager)],K.prototype,"_stateUpdateManager",void 0),Y.__decorate([(0,Q.inject)(tt.AffixStateDataProvider),Y.__metadata("design:type",tt.AffixStateDataProvider)],K.prototype,"_affixStateDataProvider",void 0),Y.__decorate([(0,Q.inject)(ft.BattleUnitSorter),Y.__metadata("design:type",ft.BattleUnitSorter)],K.prototype,"_unitSorter",void 0),Y.__decorate([Z.handleBattleEnd,Y.__metadata("design:type",Function),Y.__metadata("design:paramtypes",[]),Y.__metadata("design:returntype",void 0)],K.prototype,"start",null),Y.__decorate([Z.handleBattleEnd,Y.__metadata("design:type",Function),Y.__metadata("design:paramtypes",[X.BattleAction]),Y.__metadata("design:returntype",void 0)],K.prototype,"runAction",null),K=Y.__decorate([(0,Q.injectable)()],K)}(lt.BattleController);K.BasicBattleController=pt},48531:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BasicBattleFormulas=void 0;var z=function(){function q(){}return q.getEnemyUnitStartMP=function(q,K){switch(q){case 1:return 0;case 2:return Math.floor(.5*K);case 3:return Math.ceil(.5*K);default:return K}},q.getEnemyQIPercentage=function(q){switch(q){case 1:return.6;case 2:case 3:return.75;default:return.9}},q}();K.BasicBattleFormulas=z},45960:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(12030),K),Y.__exportStar(z(19124),K),Y.__exportStar(z(1616),K),Y.__exportStar(z(48531),K)},21889:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(24599),K),Y.__exportStar(z(16636),K),Y.__exportStar(z(45960),K),Y.__exportStar(z(15450),K)},84951:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BattleUnitSorter=void 0;var Y=z(17498),Q=z(79687),X=function(){function q(){}return q=Y.__decorate([(0,Q.injectable)()],q)}();K.BattleUnitSorter=X},764:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.InitiativeRarityLevelBattleUnitSorter=void 0;var Y=z(17498),Q=z(44503),X=function(q){function K(){return null!==q&&q.apply(this,arguments)||this}return Y.__extends(K,q),K.prototype.sort=function(q){var K=q.units,z=q.currentUnitIndex,Y=K.map((function(q){var K;return{unit:q,initiative:q.getStat(Q.EStat.Initiative),rarity:null!==(K=q.rarity)&&void 0!==K?K:-1,level:q.level}}));return Y.sort((function(q,K){return Y.indexOf(q)<=z||Y.indexOf(K)<=z?0:q.initiative!==K.initiative?K.initiative-q.initiative:q.rarity!==K.rarity?K.rarity-q.rarity:q.level!==K.level?K.level-q.level:.5-Math.random()})),{units:Y.map((function(q){return q.unit})),currentUnitIndex:z}},K}(z(84951).BattleUnitSorter);K.InitiativeRarityLevelBattleUnitSorter=X},62359:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.MultipleTurnPingPongInitiativeRarityLevelBattleUnitSorter=void 0;var Y=z(17498),Q=z(95891),X=function(q){function K(){return null!==q&&q.apply(this,arguments)||this}return Y.__extends(K,q),K.prototype.getNextUnitIndex=function(K){var z=q.prototype.getNextUnitIndex.call(this,K);if(z>=0)return z;var Y=K.units,X=K.currentUnitIndex,Z=Y[X].teamId;return Q.findLastIndex(Y,(function(q){return q.teamId!==Z&&!q.passive}),X-1)},K}(z(88266).PingPongInitiativeRarityLevelBattleUnitSorter);K.MultipleTurnPingPongInitiativeRarityLevelBattleUnitSorter=X},88266:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.PingPongInitiativeRarityLevelBattleUnitSorter=void 0;var Y=z(17498),Q=z(95891),X=z(9546),Z=function(q){function K(){return null!==q&&q.apply(this,arguments)||this}return Y.__extends(K,q),K.prototype.sort=function(K){var z=q.prototype.sort.call(this,K),Y=z.units,Q=z.currentUnitIndex;if(Q<0||Q>=Y.length)return{units:Y,currentUnitIndex:Q};var X=this.getNextNaturalUnit({units:Y,currentUnitIndex:Q});if(X.unit.teamId!==Y[Q].teamId)return X.newRoundOrderData?X.newRoundOrderData:{units:Y,currentUnitIndex:Q};var Z=this.getNextUnitIndex({units:Y,currentUnitIndex:Q});if(Z>=0){var J=Y.splice(Z,1)[0],tt=Z=K.length-1)return-1;var Y=K[z].teamId;return Q.findIndex(K,(function(q){return q.teamId!==Y&&!q.passive}),z+1)},K}(z(764).InitiativeRarityLevelBattleUnitSorter);K.PingPongInitiativeRarityLevelBattleUnitSorter=Z},15450:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(84951),K),Y.__exportStar(z(764),K),Y.__exportStar(z(62359),K),Y.__exportStar(z(88266),K)},51448:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BattleConstants=void 0;var Y=z(17498),Q=z(79687),X=z(44503),Z=z(26036),J=z(50532),tt=z(87452),et=function(){function q(){}return Object.defineProperty(q.prototype,"baseLevelMinimum",{get:function(){return this._constantsDataProvider.constants.baseLevelMinimum},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"baseLevelMaximum",{get:function(){return this._constantsDataProvider.constants.baseLevelMaximum},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"baseLevelMaximumConfig",{get:function(){return this._constantsDataProvider.constants.baseLevelMaximumConfig},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"minPlayerHeartsOnEndBattle",{get:function(){return this._constantsDataProvider.constants.minPlayerHeartsOnEndBattle},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"elementalAffinityBonus",{get:function(){return this._constantsDataProvider.constants.multipliers.stabElement},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"criticalHitBonus",{get:function(){return this._constantsDataProvider.constants.multipliers.criticalHit},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"criticalHitChanceBonus",{get:function(){var q;return null!==(q=this._constantsDataProvider.constants.multipliers.critChance)&&void 0!==q?q:1},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"physicalMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.physical},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"finalDamageMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.finalDamage},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"enemyNerfMinMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.enemyNerf.min},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"minimumHitChance",{get:function(){return this._constantsDataProvider.constants.minimumHitChance},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"maximumHitChance",{get:function(){return this._constantsDataProvider.constants.maximumHitChance},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"enemyNerfBonusMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.enemyNerf.bonus},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"chanceHitOffset",{get:function(){return this._constantsDataProvider.constants.multipliers.hitChanceScaling.chanceHitOffset},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"chanceHitCoefSquared",{get:function(){return this._constantsDataProvider.constants.multipliers.hitChanceScaling.chanceHitCoefSquared},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"chanceHitCoefPrime",{get:function(){return this._constantsDataProvider.constants.multipliers.hitChanceScaling.chanceHitCoefPrime},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"equipmentBaseHpModifier",{get:function(){return this._constantsDataProvider.constants.equipmentModifierBaseValues.health},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"equipmentBasePowerModifier",{get:function(){return this._constantsDataProvider.constants.equipmentModifierBaseValues.power},enumerable:!1,configurable:!0}),q.prototype.getMultiplierByName=function(q){return this._constantsDataProvider.constants.multipliers[q]},Object.defineProperty(q.prototype,"aoaSpellId",{get:function(){return this._constantsDataProvider.constants.aoaSpellId},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"rescueSpellId",{get:function(){return this._constantsDataProvider.constants.rescueSpellId},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"fumbleSpellId",{get:function(){return this._constantsDataProvider.constants.fumbleSpellId},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"rescueDamageThreshold",{get:function(){return this._constantsDataProvider.constants.rescue.damageThreshold},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"difficultyStreak",{get:function(){return this._constantsDataProvider.constants.difficultyStreak},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"difficultyStreakBench",{get:function(){return this._constantsDataProvider.constants.difficultyStreakBench},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"difficultyStreakLoseStep",{get:function(){return this._constantsDataProvider.constants.difficultyStreakLoseStep},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"difficultyStreakWinStep",{get:function(){return this._constantsDataProvider.constants.difficultyStreakWinStep},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"xpRewards",{get:function(){return this._constantsDataProvider.constants.xp},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"unitStatDefaults",{get:function(){return this._constantsDataProvider.constants.unitStatDefaults},enumerable:!1,configurable:!0}),q.prototype.getDivisor=function(q){return this._constantsDataProvider.constants.divisors[q]},q.prototype.getSpellElementalMultiplier=function(q,K){var z=this._constantsDataProvider.constants.elementalMultiplier.find((function(K){return K.name===q}));return(null==z?void 0:z.data[K])?z.data[K]:1},q.prototype.getBestElementalAdvantageType=function(q,K,z){var Y=this,Q=this.getSpellElementalMultiplier(z,K),X=z;return q.forEach((function(q){var z=Y.getSpellElementalMultiplier(q,K);z>Q&&(Q=z,X=q)})),X},q.prototype.getElementalAdvantage=function(q,K){return q===this.getElementalWeakness(K)?J.EElementalAdvantage.Strong:q===this.getElementalResistance(K)?J.EElementalAdvantage.Weak:J.EElementalAdvantage.Neutral},q.prototype.getDamageLimit=function(q){return q?new tt.ValueRange(this._constantsDataProvider.constants.damageRange.aoa.min,this._constantsDataProvider.constants.damageRange.aoa.max):new tt.ValueRange(this._constantsDataProvider.constants.damageRange.spell.min,this._constantsDataProvider.constants.damageRange.spell.max)},q.prototype.getElementalWeakness=function(q){var K=this._constantsDataProvider.constants.elementalMultiplier.find((function(K){return K.name===q}));return null==K?void 0:K.weakness},q.prototype.getElementalResistance=function(q){var K=this._constantsDataProvider.constants.elementalMultiplier.find((function(K){return K.name===q}));return null==K?void 0:K.resistance},q.prototype.getEnemyDamageMultiplier=function(q){var K=this.getDivisor(X.EDivisor.EnemyNerf);return this.enemyNerfBonusMultiplier-this.enemyNerfBonusMultiplier/((q+K-1)/K)+this.enemyNerfMinMultiplier},Y.__decorate([(0,Q.inject)(Z.ConstantsDataProvider),Y.__metadata("design:type",Object)],q.prototype,"_constantsDataProvider",void 0),q=Y.__decorate([(0,Q.injectable)()],q)}();K.BattleConstants=et},10424:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},10141:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.handleBattleEnd=K.BattleEndError=void 0;var Y=z(17498),Q=function(q){function K(){var z=q.call(this)||this;return z.name="BattleEndError",Object.setPrototypeOf(z,K.prototype),z}return Y.__extends(K,q),K}(Error);K.BattleEndError=Q,K.handleBattleEnd=function(q,K,z){var Y=z.value;z.value=function(){for(var q=[],K=0;K{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BattleError=void 0;var Y=z(17498),Q=function(q){function K(z){var Y=q.call(this,z)||this;return Object.setPrototypeOf(Y,K.prototype),Y}return Y.__extends(K,q),K}(Error);K.BattleError=Q},79152:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.COMBAT_LEVEL_FIELD=void 0,K.COMBAT_LEVEL_FIELD="level"},8571:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.CombatFormulaScalingConstants=void 0;var Y=z(17498),Q=z(79687),X=z(99928),Z=z(9546),J=z(79152),tt=function(){function q(){}return q.prototype.getChanceToHitCoef1=function(q){var K;return null===(K=Z.Util.findFirstElementBelowThreshold(J.COMBAT_LEVEL_FIELD,q,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===K?void 0:K.chanceToHitFormulaCoef1},q.prototype.getChanceToHitCoef2=function(q){var K;return null===(K=Z.Util.findFirstElementBelowThreshold(J.COMBAT_LEVEL_FIELD,q,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===K?void 0:K.chanceToHitFormulaCoef2},q.prototype.getDefenceFormulaCoef=function(q){var K;return null===(K=Z.Util.findFirstElementBelowThreshold(J.COMBAT_LEVEL_FIELD,q,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===K?void 0:K.defenceFormulaCoef},q.prototype.getDefenceFormulaExponent=function(q){var K;return null===(K=Z.Util.findFirstElementBelowThreshold(J.COMBAT_LEVEL_FIELD,q,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===K?void 0:K.defenceExponent},q.prototype.getDamageLevelAverage=function(q){var K;return null===(K=Z.Util.findFirstElementBelowThreshold(J.COMBAT_LEVEL_FIELD,q,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===K?void 0:K.damageAverage},q.prototype.getDefenceLevelAverage=function(q){var K;return null===(K=Z.Util.findFirstElementBelowThreshold(J.COMBAT_LEVEL_FIELD,q,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===K?void 0:K.defenceAverage},Object.defineProperty(q.prototype,"getDamageAveragePower",{get:function(){return this._combatFormulaScalingProvider.constants.damageAveragePower},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"getDefenceAveragePower",{get:function(){return this._combatFormulaScalingProvider.constants.defenceAveragePower},enumerable:!1,configurable:!0}),Y.__decorate([(0,Q.inject)(X.CombatFormulaScalingDataProvider),Y.__metadata("design:type",Object)],q.prototype,"_combatFormulaScalingProvider",void 0),q=Y.__decorate([(0,Q.injectable)()],q)}();K.CombatFormulaScalingConstants=tt},16104:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BattleCalculations=void 0,K.BattleCalculations=Symbol("IBattleCalculations")},94167:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.SimStateUpdateManager=void 0;var Y=z(17498),Q=z(79687),X=z(58690),Z=function(q){function K(){return null!==q&&q.apply(this,arguments)||this}return Y.__extends(K,q),K.prototype.addToBack=function(){for(var q,K=[],z=0;z{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.SPELL_LEVEL_SPEED_PREFIX=K.SPELL_LEVEL_POWER_PREFIX=K.SPELL_LEVEL_FIELD=void 0,K.SPELL_LEVEL_FIELD="level",K.SPELL_LEVEL_POWER_PREFIX="pwr",K.SPELL_LEVEL_SPEED_PREFIX="spd"},52431:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.SpellLevelBonusConstants=void 0;var Y=z(17498),Q=z(79687),X=z(13135),Z=z(9546),J=z(57276),tt=function(){function q(){}return q.prototype.getSpeedLevelBonus=function(q,K){var z=this._spellLevelDataProvider.constants.casterLevelBonusConfigs,Y=this.getSpeedField(K);if(!Z.Util.isDefined(Y))return 0;for(var Q=1;Q0?z[z.length-1].speed[Y]:0},q.prototype.getPowerLevelBonus=function(q,K){var z=this._spellLevelDataProvider.constants.casterLevelBonusConfigs,Y=this.getPowerField(K);if(!Z.Util.isDefined(Y))return 1;for(var Q=1;Q0?z[z.length-1].power[Y]:1},q.prototype.getPowerField=function(q){return void 0!==q?"".concat(J.SPELL_LEVEL_POWER_PREFIX).concat(q):void 0},q.prototype.getSpeedField=function(q){return void 0!==q?"".concat(J.SPELL_LEVEL_SPEED_PREFIX).concat(q):void 0},q.prototype.getSpellSpeed=function(q){var K,z,Y=null!==(K=this.getSpeedField(q.upgradeType))&&void 0!==K?K:"",Q=Z.Util.findFirstElementBelowThreshold(J.SPELL_LEVEL_FIELD,q.level,this._spellLevelDataProvider.constants.casterLevelBonusConfigs);return q.casterValue+q.spellBaseValue+(null!==(z=null==Q?void 0:Q.speed[Y])&&void 0!==z?z:0)},q.prototype.getSpellPower=function(q){var K,z,Y=null!==(K=this.getPowerField(q.upgradeType))&&void 0!==K?K:"",Q=Z.Util.findFirstElementBelowThreshold(J.SPELL_LEVEL_FIELD,q.level,this._spellLevelDataProvider.constants.casterLevelBonusConfigs);return q.casterValue*q.spellBaseValue*(null!==(z=null==Q?void 0:Q.power[Y])&&void 0!==z?z:1)},q.prototype.getDisplaySpellPower=function(q,K){var z,Y,Q,X,J,tt=null!==(z=this._spellLevelDataProvider.constants.powerDisplayRoundToDecimals)&&void 0!==z?z:0;if(K){var et=null!==(Y=this._spellLevelDataProvider.constants.powerDisplayHealRoundSignificance)&&void 0!==Y?Y:0;J="".concat(Z.Util.toFixedTrimmed(Z.Util.round(100*q,et),tt),"%")}else J=Z.Util.toFixedTrimmed(Z.Util.ceiling(q/(null!==(Q=this._spellLevelDataProvider.constants.powerDisplayDivider)&&void 0!==Q?Q:1),null!==(X=this._spellLevelDataProvider.constants.powerDisplayCeiling)&&void 0!==X?X:1),tt);return J},q.prototype.getDisplaySpellAccuracy=function(q){var K,z;return Z.Util.ceiling(q/(null!==(K=this._spellLevelDataProvider.constants.speedDisplayDivider)&&void 0!==K?K:1),null!==(z=this._spellLevelDataProvider.constants.speedDisplayCeiling)&&void 0!==z?z:1).toString()},Y.__decorate([(0,Q.inject)(X.SpellLevelDataProvider),Y.__metadata("design:type",Object)],q.prototype,"_spellLevelDataProvider",void 0),q=Y.__decorate([(0,Q.injectable)()],q)}();K.SpellLevelBonusConstants=tt},51648:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.StateUpdateManager=void 0;var Y=z(17498),Q=z(79687),X=z(49042),Z=z(58690),J=function(){function q(){this.stateUpdates=[]}return q.prototype.consume=function(q){var K=Y.__spreadArray([],Y.__read(this.stateUpdates),!1);return this.clearList(),null==q||q.dispatchEvent(X.EBattleEvent.StateUpdatesConsumed,K),K},q.prototype.addToBack=function(){for(var q,K=[],z=0;z0&&Q[X].type===Z.EBattleStateUpdate.EndBattle?Q.splice(X-1,0,Y):this.addToBack(Y))},q=Y.__decorate([(0,Q.injectable)()],q)}();K.StateUpdateManager=J},16779:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(51448),K),Y.__exportStar(z(10424),K),Y.__exportStar(z(15907),K),Y.__exportStar(z(79152),K),Y.__exportStar(z(8571),K),Y.__exportStar(z(16104),K),Y.__exportStar(z(16825),K),Y.__exportStar(z(94167),K),Y.__exportStar(z(57276),K),Y.__exportStar(z(52431),K),Y.__exportStar(z(51648),K)},94820:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BattleContainer=void 0;var Y=z(17498),Q=z(79687),X=z(36700),Z=z(41334),J=z(26036),tt=z(13135),et=z(99928),it=z(13435),st=z(68688),nt=z(95142),at=z(82825),rt=z(35223),ot=z(11282),ht=z(73566),ct=z(12634),dt=z(87584),lt=z(21073),ut=z(89647),ft=z(9546),bt=z(51448),pt=z(51648),vt=z(52431),gt=z(8571),mt=function(q){function K(z){var ft=q.call(this)||this;return ft.bind(Q.Container).toConstantValue(ft),ft.bind(K).toConstantValue(ft),ft.bind(pt.StateUpdateManager).toSelf().inSingletonScope(),ft.bind(J.ConstantsDataProvider).to(J.HardCodedConstantsDataProvider).inSingletonScope(),ft.bind(tt.SpellLevelDataProvider).to(tt.HardCodedSpellLevelDataProvider).inSingletonScope(),ft.bind(et.CombatFormulaScalingDataProvider).to(et.HardCodedCombatFormulaScalingDataProvider).inSingletonScope(),ft.bind(bt.BattleConstants).toSelf().inSingletonScope(),ft.bind(vt.SpellLevelBonusConstants).toSelf().inSingletonScope(),ft.bind(gt.CombatFormulaScalingConstants).toSelf().inSingletonScope(),ft.bind(ct.SpellCastUtil).toSelf().inSingletonScope(),ft.bind(it.BattleStateDataStore).to(nt.InMemoryBattleStateDataStore).inSingletonScope(),ft.bind(Z.BattleStateDataProvider).toSelf().inSingletonScope(),ft.bind(X.AffixStateDataProvider).toSelf().inSingletonScope(),ft.bind(at.StatusEffectStateDataProvider).toSelf().inSingletonScope(),ft.bind(st.SpellDataProvider).toDynamicValue(ft.createCachedDynamicBinding(z)),ft.bind(ht.UnitStateDataProvider).toDynamicValue(ft.createCachedDynamicBinding((function(q){return new ht.UnitStateDataProvider(q,ft.get(Z.BattleStateDataProvider))}))),ft.bind(rt.TeamStateDataProvider).toDynamicValue(ft.createCachedDynamicBinding((function(q){return new rt.TeamStateDataProvider(q,ft.get(Z.BattleStateDataProvider))}))),ft.bind(ot.UnitSpellStateDataProvider).toDynamicValue(ft.createCachedDynamicBinding((function(q){var K=Y.__read(ft.getDynamicBindingIdsFromName(q),2),z=K[0],Q=K[1],X=ft.getNamed(ht.UnitStateDataProvider,z);return new ot.UnitSpellStateDataProvider(Q,X)}))),ft.bind(lt.Unit).toDynamicValue(ft.createCachedDynamicBinding((function(q){return new lt.Unit(q,ft)}))),ft.bind(dt.Team).toDynamicValue(ft.createCachedDynamicBinding((function(q){return new dt.Team(q,ft)}))),ft.bind(ut.UnitSpell).toDynamicValue(ft.createCachedDynamicBinding((function(q){var K=Y.__read(ft.getDynamicBindingIdsFromName(q),2),z=K[0],Q=K[1];return new ut.UnitSpell(z,Q,ft)}))),ft}return Y.__extends(K,q),K.prototype.getByIds=function(q){for(var K=[],z=1;z{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.injectOnDemand=void 0;var Y=z(79687),Q=z(9546),X="__container__";K.injectOnDemand=function(q){return function(K,z,Z){(0,Y.inject)(Y.Container)(K,X,Z),Object.defineProperty(K,z,{get:function(){return Q.Util.assertDefined(this.__container__,"injectOnDemand: Container not bound"),this.__container__.get(q)},configurable:!0})}}},16825:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(94820),K),Y.__exportStar(z(49586),K)},36700:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.AffixStateDataProvider=void 0;var Y=z(17498),Q=z(79687),X=z(95891),Z=z(81327),J=z(1191),tt=z(18902),et=z(51448),it=z(51648),st=z(98239),nt=z(58690),at=z(54705),rt=z(387),ot=z(9546),ht=z(50532),ct=z(44503),dt=z(41334),lt=z(82825),ut=function(){function q(){this._affixesAddedThisTurn=[]}return q.prototype.endTurn=function(){this._affixesAddedThisTurn.length=0},q.prototype.getAffixesForUnit=function(q){return this._battleStateDataProvider.getAffixInstances().filter((function(K){return K.unitId===q}))},q.prototype.addAffix=function(q,K){void 0===K&&(K=!1),q.id||(q.id=ot.Util.generateInstanceId()),this._battleStateDataProvider.getAffixInstances().push(q),this._affixesAddedThisTurn.push(q),K&&this._stateUpdateManager.addToBack({type:nt.EBattleStateUpdate.AddAffix,affix:q})},q.prototype.removeAffixes=function(q,K){var z,Q;void 0===K&&(K=!1);var Z=X.remove(this._battleStateDataProvider.getAffixInstances(),q);if(K)try{for(var J=Y.__values(Z),tt=J.next();!tt.done;tt=J.next()){var et=tt.value;this._stateUpdateManager.addToBack({type:nt.EBattleStateUpdate.RemoveAffix,affixId:et.id}),this._statusEffectStateDataProvider.handleRemovedAffix(et.id)}}catch(it){z={error:it}}finally{try{tt&&!tt.done&&(Q=J.return)&&Q.call(J)}finally{if(z)throw z.error}}},q.prototype.removeAffix=function(q,K){void 0===K&&(K=!1),this.removeAffixes((function(K){return K.id===q.id}),K)},q.prototype.reduceAffixDuration=function(q,K,z){if(void 0===z&&(z=1),K.duration&&(!1!==K.duration.canReduceOnTurnAdded||!this._affixesAddedThisTurn.includes(K))){if(K.duration.remainingDuration-=z,K.duration.remainingDuration<=0){var Y=this._statusEffectStateDataProvider.getStatusEffectForAffix(K.id);return this._statusEffectStateDataProvider.handleModifiedAffix(K.id,!1),J.AffixUtils.hasWhenToTrigger(K)&&K.whenToTrigger===tt.EWhenToTrigger.WhenDurationExpires&&this.triggerAffix(q,K,Y,!0),void this.removeAffix(K,!0)}this._stateUpdateManager.addToBack({type:nt.EBattleStateUpdate.ModifyAffixDuration,affixId:K.id,remainingDuration:K.duration.remainingDuration}),this._statusEffectStateDataProvider.handleModifiedAffix(K.id,!0)}},q.prototype.triggerAffix=function(q,K,z,Q){var X,tt;if(void 0===Q&&(Q=!1),!q.isDefeated()){var et,it;if(ot.Util.isDebugEnabled()){var st=-1,at=-1;K.debug="",z&&(st=z.timesTriggered+1,at=null!==(tt=z.remainingDuration)&&void 0!==tt?tt:-1,K.debug+="Status Id: ".concat(z.statusEffectId,", ")),K.debug+="Trigger type: ".concat(K.type,"\n")+"target: ".concat(q.id,", duration left: ").concat(at,", times triggered: ").concat(st,"\n")}switch(K.type){case Z.EAffixType.ApplyDamage:et=this.applyDamage(q,K),it=K.element;break;case Z.EAffixType.ApplyHealing:et=this.applyHealing(q,K);break;default:return}var ht=J.AffixUtils.handleAfterDamageAffixesForTarget(this,q),dt=[];q.isDefeated()&&(q.battleStatus=ct.EUnitBattleStatus.Defeated,dt.push({type:nt.EBattleStateUpdate.DefeatUnit,unitId:q.id,isRescued:!1})),z&&(z.timesTriggered+=1,(X=this._stateUpdateManager).addToBack.apply(X,Y.__spreadArray(Y.__spreadArray([{type:nt.EBattleStateUpdate.TriggerStatusEffect,statusEffects:[z],hitData:et,element:it,isBeingRemoved:Q}],Y.__read(ht),!1),Y.__read(dt),!1))),ot.Util.isDebugEnabled()&&ot.Util.isDefined(K.debug)&&(this._stateUpdateManager.addDebugMessage(rt.EDebugMessageType.StatusTrigger,K.debug),delete K.debug)}},q.prototype.applyDamage=function(q,K){var z=this._battleStateDataProvider.getUnitData(K.unitId);ot.Util.assertDefined(z,"Unit data not found for affix with ID ".concat(K.id," and unit ID ").concat(K.unitId));var Y=Math.random()*(K.damagePercentRange.max-K.damagePercentRange.min)+K.damagePercentRange.min,Q=Y*z.health.max,X=new st.SpellEffectInstance(null,q);if(K.element){var Z=this._battleConstants.getSpellElementalMultiplier(K.element,q.element),tt=this._battleConstants.getElementalAdvantage(K.element,q.element);tt===ht.EElementalAdvantage.Strong?X.setDamageInformationFlag(at.EDamageInformation.Effective):tt===ht.EElementalAdvantage.Weak&&X.setDamageInformationFlag(at.EDamageInformation.Ineffective),Q*=Z}return X.damage=Q,J.AffixUtils.handleAffixesForTarget(this,null,q,[X]),X.damage=Math.ceil(X.damage),this._debugMode||(z.health.current-=X.damage),ot.Util.isDebugEnabled()&&(K.debug+="Percent Roll: ".concat(Y,", Range: ").concat(K.damagePercentRange.min,"-").concat(K.damagePercentRange.max,"\n")+"Trigger: ".concat(K.whenToTrigger,"\n")+"Element: ".concat(K.element,", Bonus Applied: ").concat(1,"\n")+"PreAffix Damage: ".concat(Q,", Final: ").concat(X.damage,", Final Percent: ").concat(X.damage/q.maxHealth,"\n")),{damage:X.damage,damageInformation:X.damageInformation,hpResult:z.health.current}},q.prototype.applyHealing=function(q,K){var z=this._battleStateDataProvider.getUnitData(K.unitId);ot.Util.assertDefined(z,"Unit data not found for affix with ID ".concat(K.id," and unit ID ").concat(K.unitId));var Y=Math.random()*(K.healingPercentRange.max-K.healingPercentRange.min)+K.healingPercentRange.min,Q=-1*Y*z.health.max,X=new st.SpellEffectInstance(null,q);return X.damage=Q,X.damageInformation=at.EDamageInformation.Heal,J.AffixUtils.handleAffixesForTarget(this,null,q,[X]),X.damage=Math.ceil(X.damage),this._debugMode||(z.health.current=Math.min(z.health.max,z.health.current-X.damage)),ot.Util.isDebugEnabled()&&(K.debug+="Percent Roll: ".concat(Y,", Range: ").concat(K.healingPercentRange.min,"-").concat(K.healingPercentRange.max)+"Trigger: ".concat(K.whenToTrigger,"\n")+"PreAffix Heal: ".concat(Q,", Final: ").concat(X.damage,"\n")),{damage:X.damage,damageInformation:X.damageInformation,hpResult:z.health.current}},q.prototype.setDebugMode=function(q){this._debugMode=q},Y.__decorate([(0,Q.inject)(dt.BattleStateDataProvider),Y.__metadata("design:type",dt.BattleStateDataProvider)],q.prototype,"_battleStateDataProvider",void 0),Y.__decorate([(0,Q.inject)(it.StateUpdateManager),Y.__metadata("design:type",it.StateUpdateManager)],q.prototype,"_stateUpdateManager",void 0),Y.__decorate([(0,Q.inject)(lt.StatusEffectStateDataProvider),Y.__metadata("design:type",lt.StatusEffectStateDataProvider)],q.prototype,"_statusEffectStateDataProvider",void 0),Y.__decorate([(0,Q.inject)(et.BattleConstants),Y.__metadata("design:type",et.BattleConstants)],q.prototype,"_battleConstants",void 0),q=Y.__decorate([(0,Q.injectable)()],q)}();K.AffixStateDataProvider=ut},44503:(q,K)=>{"use strict";var z,Y,Q;Object.defineProperty(K,"__esModule",{value:!0}),K.EUnitBattleStatus=K.EDivisor=K.EStat=void 0,function(q){q.Hp="hp",q.Mp="mp",q.Power="power",q.Defence="defence",q.Speed="speed",q.Initiative="initiative",q.Accuracy="accuracy",q.Dodge="dodge",q.DodgeDamage="dodgeDamage",q.CritChance="critChance",q.CritDamage="critDamage"}(z||(K.EStat=z={})),function(q){q.Level="level",q.Aoa="aoa",q.Physical="physical",q.Magical="magical",q.Critical="speedCrit",q.EnemyNerf="enemyNerf",q.MergeRank="mergeRank"}(Y||(K.EDivisor=Y={})),function(q){q.Active="active",q.Defeated="defeated",q.Rescued="rescued"}(Q||(K.EUnitBattleStatus=Q={}))},41334:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BattleStateDataProvider=void 0;var Y=z(17498),Q=z(79687),X=z(9546),Z=z(13435),J=function(){function q(){}return q.prototype.setUnitData=function(q,K){this._battleStateDataStore.getObjectOrDefault("units",(function(){return{}}))[q]=K},q.prototype.getUnitData=function(q){var K;return null===(K=this._battleStateDataStore.getObject("units"))||void 0===K?void 0:K[q]},q.prototype.deleteUnitData=function(q){var K;null===(K=this._battleStateDataStore.getObject("units"))||void 0===K||delete K[q]},q.prototype.getUnitsOnTeam=function(q){var K=this._battleStateDataStore.getObject("units");return X.Util.assertDefined(K,"No units exist"),Object.keys(K).filter((function(z){return K[z].teamId===q}))},q.prototype.getUnitDataForTeam=function(q){var K=this._battleStateDataStore.getObject("units");return X.Util.assertDefined(K,"No units exist"),Object.values(K).filter((function(K){return K.teamId===q}))},q.prototype.getUnitIds=function(){var q=this._battleStateDataStore.getObject("units");return X.Util.assertDefined(q,"No units exist"),Object.keys(q)},q.prototype.setTeamData=function(q,K){this._battleStateDataStore.getObjectOrDefault("teams",(function(){return{}}))[q]=K},q.prototype.getTeamData=function(q){var K;return null===(K=this._battleStateDataStore.getObject("teams"))||void 0===K?void 0:K[q]},q.prototype.getTeamIds=function(){var q=this._battleStateDataStore.getObject("teams");return X.Util.assertDefined(q,"No teams exist"),Object.keys(q)},q.prototype.getAffixInstances=function(){return this._battleStateDataStore.getObjectOrDefault("affixes",(function(){return[]}))},q.prototype.getStatusEffectInstances=function(){return this._battleStateDataStore.getObjectOrDefault("statusEffects",(function(){return[]}))},Y.__decorate([(0,Q.inject)(Z.BattleStateDataStore),Y.__metadata("design:type",Object)],q.prototype,"_battleStateDataStore",void 0),q=Y.__decorate([(0,Q.injectable)()],q)}();K.BattleStateDataProvider=J},99928:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.HardCodedCombatFormulaScalingDataProvider=K.CombatFormulaScalingDataProvider=void 0;var Y=z(17498),Q=z(79687);K.CombatFormulaScalingDataProvider=Symbol("ICombatFormulaScalingDataProvider");var X=function(){function q(){}var K;return K=q,Object.defineProperty(q.prototype,"constants",{get:function(){return K.DEFAULT_CONSTANTS},enumerable:!1,configurable:!0}),q.DEFAULT_CONSTANTS={damageAveragePower:1,defenceAveragePower:1,casterLevelBonusConfigs:[{level:0,chanceToHitFormulaCoef1:1,chanceToHitFormulaCoef2:1,defenceFormulaCoef:2,defenceExponent:-.649512743064356,damageAverage:120,defenceAverage:.1057777778},{level:20,chanceToHitFormulaCoef1:6.905378704,chanceToHitFormulaCoef2:2.520833333,defenceFormulaCoef:2,defenceExponent:-.671129653966679,damageAverage:333,defenceAverage:.06574960128}]},q=K=Y.__decorate([(0,Q.injectable)()],q)}();K.HardCodedCombatFormulaScalingDataProvider=X},26036:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.HardCodedConstantsDataProvider=K.ConstantsDataProvider=void 0;var Y=z(17498),Q=z(79687),X=z(56132);K.ConstantsDataProvider=Symbol("IConstantsDataProvider");var Z=function(){function q(){}var K;return K=q,Object.defineProperty(q.prototype,"constants",{get:function(){return K.DEFAULT_CONSTANTS},enumerable:!1,configurable:!0}),q.DEFAULT_CONSTANTS={baseLevelMinimum:1,baseLevelMaximum:100,baseLevelMaximumConfig:{regular:100,hard:150,expert:200},aoaSpellId:"1100",rescueSpellId:"1101",fumbleSpellId:"1103",multipliers:{physical:1.2,stabElement:.2,criticalHit:.5,critChance:1,finalDamage:1,enemyNerf:{min:.65,bonus:.35},hitChanceScaling:{chanceHitOffset:.78,chanceHitCoefSquared:-32e-8,chanceHitCoefPrime:.0015}},minimumHitChance:.25,maximumHitChance:1,primaryStatModifier:{tier1:.25,tier2:.4},secondaryStatModifier:{tier1:.15,tier2:.25},equipmentModifierBaseValues:{health:500,power:500},divisors:{level:25,physical:5,magical:75,aoa:33,speedCrit:50,enemyNerf:20,mergeRank:10},damageRange:{aoa:{min:100,max:1e3},spell:{min:1,max:999}},elementalMultiplier:[{name:X.EElementType.Physical,weakness:X.EElementType.Shadow,resistance:X.EElementType.Physical,data:{physical:.75,fire:1,ice:1,plant:1,storm:1,water:1,shadow:1,astral:1.25,neutral:1}},{name:X.EElementType.Fire,weakness:X.EElementType.Water,resistance:X.EElementType.Ice,data:{physical:1,fire:.75,ice:2,plant:1,storm:1,water:.5,shadow:.75,astral:1,neutral:1}},{name:X.EElementType.Ice,weakness:X.EElementType.Fire,resistance:X.EElementType.Plant,data:{physical:1,fire:.5,ice:.75,plant:2,storm:1,water:1,shadow:.75,astral:1,neutral:1}},{name:X.EElementType.Plant,weakness:X.EElementType.Ice,resistance:X.EElementType.Storm,data:{physical:1,fire:1,ice:.5,plant:.75,storm:2,water:1,shadow:.75,astral:1,neutral:1}},{name:X.EElementType.Storm,weakness:X.EElementType.Plant,resistance:X.EElementType.Water,data:{physical:1,fire:1,ice:1,plant:.5,storm:.75,water:2,shadow:.75,astral:1,neutral:1}},{name:X.EElementType.Water,weakness:X.EElementType.Storm,resistance:X.EElementType.Fire,data:{physical:1,fire:2,ice:1,plant:1,storm:.5,water:.75,shadow:.75,astral:1,neutral:1}},{name:X.EElementType.Shadow,weakness:X.EElementType.Astral,resistance:X.EElementType.Physical,data:{physical:1.5,fire:1.25,ice:1.25,plant:1.25,storm:1.25,water:1.25,shadow:1,astral:.75,neutral:1}},{name:X.EElementType.Astral,weakness:X.EElementType.Physical,resistance:X.EElementType.Shadow,data:{physical:1,fire:.75,ice:.75,plant:.75,storm:.75,water:.75,shadow:2,astral:1,neutral:1}},{name:X.EElementType.Neutral,data:{physical:1,fire:1,ice:1,plant:1,storm:1,water:1,shadow:1,astral:1,neutral:1}}],rescue:{damageThreshold:.5},minPlayerHeartsOnEndBattle:20,ai:{accuracyPenalty:{max:.3,levelCap:33},fumbleChanceIncrease:.05},difficultyStreak:{min:-3,max:10},difficultyStreakBench:{min:-1,max:7},difficultyStreakLoseStep:.1,difficultyStreakWinStep:.025,xp:{base:10,miniBoss:30,singularBoss:200,repeatableBoss:100,illusionBoss:333,finalBoss:1e3,cloakedWizard:80,pippet:30,mythic:30,titan:30},unitStatDefaults:{initiative:5}},q=K=Y.__decorate([(0,Q.injectable)()],q)}();K.HardCodedConstantsDataProvider=Z},13435:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.BattleStateDataStore=void 0,K.BattleStateDataStore=Symbol("IBattleStateDataStore")},68688:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.SpellDataProvider=void 0,K.SpellDataProvider=Symbol("ISpellDataProvider")},95142:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.InMemoryBattleStateDataStore=void 0;var Y=z(17498),Q=z(79687),X=function(){function q(){this._data={}}return q.prototype.getObject=function(q){return this._data[q]},q.prototype.setObject=function(q,K){return this._data[q]=K},q.prototype.getObjectOrDefault=function(q,K){var z,Y;return null!==(z=(Y=this._data)[q])&&void 0!==z?z:Y[q]=K()},q=Y.__decorate([(0,Q.injectable)()],q)}();K.InMemoryBattleStateDataStore=X},91549:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.SimulateDebugUtil=void 0;var Y=z(17498),Q=z(1191),X=z(51648),Z=z(24599),J=z(9546),tt=z(51448),et=z(81327),it=z(82825),st=z(36700),nt=function(){function q(){}return q.debugTriggerAllAffixes=function(q,K){var z,nt,at,rt,ot=q.get(st.AffixStateDataProvider),ht=q.get(X.StateUpdateManager),ct=q.get(Z.BattleController),dt=q.get(it.StatusEffectStateDataProvider),lt="Status Sim running for ".concat(K.numberOfTimesToTrigger,"\n");ot.setDebugMode(!0);try{for(var ut=Y.__values(ct.getUnits()),ft=ut.next();!ft.done;ft=ut.next()){var bt=ft.value;try{for(var pt=(at=void 0,Y.__values(ot.getAffixesForUnit(bt.id))),vt=pt.next();!vt.done;vt=pt.next()){var gt=vt.value;if(Q.AffixUtils.hasWhenToTrigger(gt)&&(!J.Util.isDefined(K.whenToTriggerFilter)||gt.whenToTrigger===K.whenToTriggerFilter)){lt+="\nStatus ".concat(gt.type," on Unit ").concat(bt.id,"\n");for(var mt=0,yt=Number.MAX_VALUE,_t=0,Et=0;Et0;){var wt=ht.shiftState();wt.hitData&&(Math.abs(wt.hitData.damage)_t&&(_t=wt.hitData.damage),mt+=wt.hitData.damage)}if(gt.type===et.EAffixType.ApplyDamage&>.element){var Tt=q.get(tt.BattleConstants).getSpellElementalMultiplier(gt.element,bt.element);lt+="Status Element: ".concat(gt.element,", Multiplier: ").concat(Tt,"\n")}lt+="Min Damage Rolled: ".concat(yt,", Min Percent: ").concat((yt/bt.maxHealth).toFixed(2),",\n")+"Max Damage Rolled: ".concat(_t,", Max Percent: ").concat((_t/bt.maxHealth).toFixed(2),",\n")+"Average Damage: ".concat(mt/K.numberOfTimesToTrigger,", ")+"Average Percent: ".concat((mt/K.numberOfTimesToTrigger/bt.maxHealth).toFixed(2),"\n")}}}catch(St){at={error:St}}finally{try{vt&&!vt.done&&(rt=pt.return)&&rt.call(pt)}finally{if(at)throw at.error}}}}catch(At){z={error:At}}finally{try{ft&&!ft.done&&(nt=ut.return)&&nt.call(ut)}finally{if(z)throw z.error}}return ot.setDebugMode(!1),lt},q}();K.SimulateDebugUtil=nt},13135:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.HardCodedSpellLevelDataProvider=K.SpellLevelDataProvider=void 0;var Y=z(17498),Q=z(79687);K.SpellLevelDataProvider=Symbol("ISpellLevelDataProvider");var X=function(){function q(){}var K;return K=q,Object.defineProperty(q.prototype,"constants",{get:function(){return K.DEFAULT_CONSTANTS},enumerable:!1,configurable:!0}),q.DEFAULT_CONSTANTS={casterLevelBonusConfigs:[{level:0,speed:{spdSingleHits1:1,spdAOEHits1:1,spdSingleHits2:1,spdAOEHits2:1,spdSingleHits3:1,spdAOEHits3:1,spdSingleHits4:1,spdAOEHits4:1,spdSingleHits5:1,spdAOEHits5:1,spdNoDmgSingle:1,spdNoDmgAOE:1},power:{pwrSingleHits1:1,pwrAOEHits1:1,pwrSingleHits2:1,pwrAOEHits2:1,pwrSingleHits3:1,pwrAOEHits3:1,pwrSingleHits4:1,pwrAOEHits4:1,pwrSingleHits5:1,pwrAOEHits5:1,pwrNoDmgSingle:1,pwrNoDmgAOE:1}},{level:5,speed:{spdSingleHits1:1.2,spdAOEHits1:1.2,spdSingleHits2:1.2,spdAOEHits2:1.2,spdSingleHits3:1.2,spdAOEHits3:1.2,spdSingleHits4:1.2,spdAOEHits4:1.2,spdSingleHits5:1.2,spdAOEHits5:1.2,spdNoDmgSingle:1,spdNoDmgAOE:1},power:{pwrSingleHits1:1,pwrAOEHits1:1,pwrSingleHits2:1,pwrAOEHits2:1,pwrSingleHits3:1,pwrAOEHits3:1,pwrSingleHits4:1,pwrAOEHits4:1,pwrSingleHits5:1,pwrAOEHits5:1,pwrNoDmgSingle:1,pwrNoDmgAOE:1}}]},q=K=Y.__decorate([(0,Q.injectable)()],q)}();K.HardCodedSpellLevelDataProvider=X},82825:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.StatusEffectStateDataProvider=void 0;var Y=z(17498),Q=z(79687),X=z(95891),Z=z(51648),J=z(58690),tt=z(9546),et=z(41334),it=function(){function q(){}return q.prototype.getAllStatusEffects=function(){return this._battleStateDataProvider.getStatusEffectInstances()},q.prototype.getStatusEffectsForUnit=function(q){return this.getAllStatusEffects().filter((function(K){return K.unitId===q}))},q.prototype.getStatusEffectForAffix=function(q){return this.getAllStatusEffects().find((function(K){return K.affixIds.includes(q)}))},q.prototype.addStatusEffect=function(q,K){void 0===K&&(K=!1),q.id||(q.id=tt.Util.generateInstanceId()),this.getAllStatusEffects().push(q);var z={type:J.EBattleStateUpdate.AddStatusEffect,statusEffects:[X.clone(q)],intendedTargets:[]};return K&&this._stateUpdateManager.addToBack(z),z},q.prototype.removeStatusEffects=function(q,K){var z;void 0===K&&(K=!1);var Q=X.remove(this.getAllStatusEffects(),q).map((function(q){return{type:J.EBattleStateUpdate.RemoveStatusEffect,statusEffects:[q]}}));return K&&(z=this._stateUpdateManager).addToBack.apply(z,Y.__spreadArray([],Y.__read(Q),!1)),Q},q.prototype.removeStatusEffect=function(q,K){void 0===K&&(K=!1);var z=this.removeStatusEffects((function(K){return K.id===q.id}),K);return z.length>0?z[0]:null},q.prototype.handleRemovedAffix=function(q){var K=this;this.getAllStatusEffects().forEach((function(z){var Y=z.affixIds.indexOf(q);-1!==Y&&z.affixIds.splice(Y,1),0===z.affixIds.length&&K.removeStatusEffect(z,!0)}))},q.prototype.handleModifiedAffix=function(q,K){var z=this;this.getAllStatusEffects().forEach((function(Y){if(Y.affixIds.includes(q)){var Q=0;z._battleStateDataProvider.getAffixInstances().forEach((function(q){var K,z,X=null!==(z=null===(K=q.duration)||void 0===K?void 0:K.remainingDuration)&&void 0!==z?z:0;Y.affixIds.includes(q.id)&&X>Q&&(Q=X)}));var X=Q!==Y.remainingDuration;Y.remainingDuration=Q,K&&X&&z._stateUpdateManager.addToBack({type:J.EBattleStateUpdate.ModifyStatusEffect,statusEffects:[Y]})}}))},Y.__decorate([(0,Q.inject)(et.BattleStateDataProvider),Y.__metadata("design:type",et.BattleStateDataProvider)],q.prototype,"_battleStateDataProvider",void 0),Y.__decorate([(0,Q.inject)(Z.StateUpdateManager),Y.__metadata("design:type",Z.StateUpdateManager)],q.prototype,"_stateUpdateManager",void 0),q=Y.__decorate([(0,Q.injectable)()],q)}();K.StatusEffectStateDataProvider=it},35223:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.TeamStateDataProvider=void 0;var Y=z(9546),Q=function(q,K){var z=K.getTeamData(q);Y.Util.assertDefined(z,"No data for team ".concat(q)),this.teamStateData=z};K.TeamStateDataProvider=Q},11282:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.UnitSpellStateDataProvider=void 0;var Y=z(9546),Q=function(q,K){var z=K.unitStateData.spells.find((function(K){return K.spellId===q}));Y.Util.assertDefined(z,"Unit does not have access to spell ".concat(q)),this.unitSpellStateData=z};K.UnitSpellStateDataProvider=Q},73566:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.UnitStateDataProvider=void 0;var Y=z(9546),Q=function(q,K){var z=K.getUnitData(q);Y.Util.assertDefined(z,"No data for unit ".concat(q)),this.unitStateData=z};K.UnitStateDataProvider=Q},95448:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(36700),K),Y.__exportStar(z(91549),K),Y.__exportStar(z(44503),K),Y.__exportStar(z(41334),K),Y.__exportStar(z(99928),K),Y.__exportStar(z(26036),K),Y.__exportStar(z(13435),K),Y.__exportStar(z(68688),K),Y.__exportStar(z(95142),K),Y.__exportStar(z(82825),K),Y.__exportStar(z(13135),K),Y.__exportStar(z(35223),K),Y.__exportStar(z(11282),K),Y.__exportStar(z(73566),K)},49042:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.EBattleEvent=void 0;var z=function(){function q(){}return q.NewRoundStarted=Symbol("NewRoundStarted"),q.CastingSpell=Symbol("CastingSpell"),q.AddingCastSpellStateUpdate=Symbol("AddingCastSpellStateUpdate"),q.StateUpdatesConsumed=Symbol("StateUpdatesConsumed"),q}();K.EBattleEvent=z},12073:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),z(17498).__exportStar(z(49042),K)},47547:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(40783),K),Y.__exportStar(z(38126),K),Y.__exportStar(z(21889),K),Y.__exportStar(z(16779),K),Y.__exportStar(z(95448),K),Y.__exportStar(z(12073),K),Y.__exportStar(z(24439),K),Y.__exportStar(z(4497),K),Y.__exportStar(z(38041),K),Y.__exportStar(z(18035),K),Y.__exportStar(z(77536),K)},38641:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.Spell=void 0;var z=function(){function q(q){this._schema=q}return Object.defineProperty(q.prototype,"id",{get:function(){return this._schema.id},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"name",{get:function(){return this._schema.name},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"element",{get:function(){return this._schema.element},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"energyCost",{get:function(){return this._schema.cost},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"target",{get:function(){return this._schema.target},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"delivery",{get:function(){return this._schema.delivery},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"baseDamage",{get:function(){return this._schema.damage},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"accuracy",{get:function(){return this._schema.accuracy},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"accuracySpeedBonus",{get:function(){var q;return null!==(q=this._schema.accuracySpeedBonus)&&void 0!==q?q:0},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"critical",{get:function(){return this._schema.critical},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"hitCount",{get:function(){var q;return null!==(q=this._schema.hits)&&void 0!==q?q:1},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"warmup",{get:function(){var q;return null!==(q=this._schema.warmup)&&void 0!==q?q:0},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"upgradeType",{get:function(){var q;return null!==(q=this._schema.upgradeType)&&void 0!==q?q:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"cooldown",{get:function(){var q;return null!==(q=this._schema.cooldown)&&void 0!==q?q:0},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"statusEffects",{get:function(){var q;return null!==(q=this._schema.statusEffects)&&void 0!==q?q:[]},enumerable:!1,configurable:!0}),q.prototype.getFlags=function(){var q,K;return null!==(K=null===(q=this._schema.flags)||void 0===q?void 0:q.filter((function(q){return q.flag})))&&void 0!==K?K:[]},q.prototype.findFlag=function(q){var K;return null===(K=this._schema.flags)||void 0===K?void 0:K.find((function(K){return K.flag===q}))},q.prototype.hasFlag=function(q){var K=Array.isArray(q)?q:[q];return this.getFlags().some((function(q){return K.includes(q.flag)}))},Object.defineProperty(q.prototype,"affixes",{get:function(){return Array.isArray(this._schema.affixes)?this._schema.affixes:[]},enumerable:!1,configurable:!0}),q}();K.Spell=z},12634:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.SpellCastUtil=void 0;var Y=z(17498),Q=z(79687),X=z(95891),Z=z(81327),J=z(1191),tt=z(24599),et=z(51448),it=z(15907),st=z(8571),nt=z(52431),at=z(51648),rt=z(36700),ot=z(44503),ht=z(68688),ct=z(87584),dt=z(41866),lt=z(54705),ut=z(387),ft=z(56132),bt=z(50532),pt=z(47747),vt=z(89647),gt=z(9546),mt=z(98239),yt=z(88250),_t=z(66020),Et=function(){function q(){this.bossStatGrowths=[pt.EStatGrowthTrackName.Boss,pt.EStatGrowthTrackName.Miniboss,pt.EStatGrowthTrackName.IllusionBoss,pt.EStatGrowthTrackName.DragonBoss,pt.EStatGrowthTrackName.PuppetMaster,pt.EStatGrowthTrackName.Pippet]}return q.prototype.generateSpellEffects=function(q,K,z){var Y,Q=this,X=K instanceof vt.UnitSpell?K:void 0,Z=null!==(Y=null==X?void 0:X.unit)&&void 0!==Y?Y:null,J=[],tt=[];return z.forEach((function(z){for(var Y=!1,et=0;et0&&(it.damage=Q.commonBaseDamage(Z,z,X),Q.calculateMultipliers(Z,z,X,it),it.isDamageInformationFlagSet(lt.EDamageInformation.Heal)||(it.damage=Q.limitDamage(X,it.damage,z))),it.damage=Math.round(it.damage),Q.generateAffixApplication(K,it),J.push(it),it.isDamageInformationFlagSet(lt.EDamageInformation.Dodge)||(tt.push(it),Y||(Y=!0,Q.applyStatusEffect(q,K,it)))}})),this.handleAffixes(Z,J),J},q.prototype.calculateHitChance=function(q,K,z){var Y,Q,Z=this.calculateSpellAccuracy(z),J=K.getStat(ot.EStat.Speed),tt=this._battleConstants.chanceHitCoefSquared,et=null!==(Y=this._combatFormulaScalingConstants.getChanceToHitCoef1(q.level))&&void 0!==Y?Y:1,it=null!==(Q=this._combatFormulaScalingConstants.getChanceToHitCoef2(q.level))&&void 0!==Q?Q:1,st=Z-J,nt=this._battleConstants.chanceHitCoefPrime,at=this._battleConstants.chanceHitOffset,rt=tt/et*Math.pow(st,2)+nt/it*st+at;return rt+=q.getStat(ot.EStat.Accuracy)-K.getStat(ot.EStat.Dodge),X.clamp(rt,this._battleConstants.minimumHitChance,this._battleConstants.maximumHitChance)},q.prototype.calculateSpellAccuracy=function(q){var K=q.unit.getStat(ot.EStat.Speed);return this._spellLevelBonusConstants.getSpellSpeed({casterValue:K,spellBaseValue:q.accuracySpeedBonus,upgradeType:q.upgradeType,level:q.unit.level})},q.prototype.applySpellEffectsToTarget=function(q){var K,z,Q,Z,J,tt,et,it;if(!q.isDamageInformationFlagSet(lt.EDamageInformation.Missed)){var st=q.target;if(!st.isDefeated()){try{for(var nt=Y.__values(q.flags),at=nt.next();!at.done;at=nt.next()){switch((ht=at.value).flag){case yt.ESpellFlag.ChangeMp:ht.flagValue&&(st.mp=X.clamp(st.mp+ht.flagValue,0,st.maxMp))}}}catch(pt){K={error:pt}}finally{try{at&&!at.done&&(z=nt.return)&&z.call(nt)}finally{if(K)throw K.error}}if(st.health-=q.damage,!st.isDefeated())try{for(var rt=Y.__values(q.flags),ot=rt.next();!ot.done;ot=rt.next()){var ht;switch((ht=ot.value).flag){case yt.ESpellFlag.Rescue:this._battleController.removeUnit(st.id);break;case yt.ESpellFlag.StealUnit:q.caster&&(st.teamId=q.caster.teamId)}}}catch(vt){Q={error:vt}}finally{try{ot&&!ot.done&&(Z=rt.return)&&Z.call(rt)}finally{if(Q)throw Q.error}}try{for(var ct=Y.__values(q.affixes),dt=ct.next();!dt.done;dt=ct.next()){var ut=dt.value;st.isDefeated()&&st.id===ut.unitId||this._affixStateDataProvider.addAffix(ut)}}catch(gt){J={error:gt}}finally{try{dt&&!dt.done&&(tt=ct.return)&&tt.call(ct)}finally{if(J)throw J.error}}try{for(var ft=Y.__values(q.removedAffixes),bt=ft.next();!bt.done;bt=ft.next()){ut=bt.value;st.isDefeated()&&st.id===ut.unitId||this._affixStateDataProvider.removeAffix(ut)}}catch(mt){et={error:mt}}finally{try{bt&&!bt.done&&(it=ft.return)&&it.call(ft)}finally{if(et)throw et.error}}}}},q.prototype.getValidSpellTargets=function(q,K){try{var z=this.getUnitsFromTeamType(q,K.target.team,K.unit.teamId);return this.filterUnitsFromUnitType(K.target.unit,z,K.unit.id)}catch(Y){throw new it.BattleError("Error getting valid spell targets for spell ".concat(K.id,": ").concat(Y))}},q.prototype.getUnitsFromTeamType=function(q,K,z){var Q=[];switch(K){case _t.ESpellTeamTarget.Enemy:Q.push.apply(Q,Y.__spreadArray([],Y.__read(q.get(tt.BattleController).getTeams().filter((function(q){return q.id!==z}))),!1));break;case _t.ESpellTeamTarget.Own:Q.push(q.getNamed(ct.Team,z));break;case _t.ESpellTeamTarget.Any:case _t.ESpellTeamTarget.All:Q.push.apply(Q,Y.__spreadArray([],Y.__read(q.get(tt.BattleController).getTeams()),!1));break;default:throw new it.BattleError("Invalid team target type ".concat(K))}return X.flatMap(Q,(function(q){return q.getMembers()})).filter((function(q){return!q.isDefeated()}))},q.prototype.filterUnitsFromUnitType=function(q,K,z){return K.filter((function(K){switch(q){case _t.ESpellUnitTarget.Self:return K.id===z;case _t.ESpellUnitTarget.Ally:case _t.ESpellUnitTarget.Allies:return K.id!==z;case _t.ESpellUnitTarget.Single:case _t.ESpellUnitTarget.Team:case _t.ESpellUnitTarget.Row:case _t.ESpellUnitTarget.Random:break;default:throw new it.BattleError("Invalid unit target type ".concat(q))}return!0}))},q.prototype.hasValidSpellOption=function(q,K){var z,Y=this;return null===(z=K.currentLoadout)||void 0===z?void 0:z.map((function(q){return K.spells.find((function(K){return K.id===q}))})).some((function(z){if(0!==z.currentCooldown||z.isLocked)return!1;var Q=Y._battleController.getTeams().find((function(q){return q.getMembers().includes(K)}));return gt.Util.assertDefined(Q,'Unit "'.concat(K.id,'" is not in an active team.')),Y.getValidSpellTargets(q,z).some((function(q){return!q.isDefeated()}))}))},q.prototype.handleAffixes=function(q,K){var z,Q,tt,et;if(q&&this._affixStateDataProvider.getAffixesForUnit(q.id).find((function(q){return q.type===Z.EAffixType.OneHitKill})))try{for(var it=Y.__values(K),st=it.next();!st.done;st=it.next()){var nt=st.value;this._affixStateDataProvider.getAffixesForUnit(nt.target.id).some((function(q){return q.type===Z.EAffixType.AlwaysDodge}))||(nt.isDamageInformationFlagSet(lt.EDamageInformation.Heal)||(nt.damage=90001,nt.clearDamageInformationFlag(lt.EDamageInformation.Missed)))}}catch(ct){z={error:ct}}finally{try{st&&!st.done&&(Q=it.return)&&Q.call(it)}finally{if(z)throw z.error}}var at=X.uniq(X.map(K,"target"));try{for(var rt=Y.__values(at),ot=rt.next();!ot.done;ot=rt.next()){var ht=ot.value;J.AffixUtils.handleAffixesForTarget(this._affixStateDataProvider,q,ht,K)}}catch(dt){tt={error:dt}}finally{try{ot&&!ot.done&&(et=rt.return)&&et.call(rt)}finally{if(tt)throw tt.error}}},q.prototype.generateAffixApplication=function(q,K){var z,Q,Z;try{for(var J=Y.__values(q.affixes),tt=J.next();!tt.done;tt=J.next()){var et=tt.value;(null!==(Z=et.requireHit)&&void 0!==Z&&!Z||!K.isDamageInformationFlagSet(lt.EDamageInformation.Missed)&&!K.isDamageInformationFlagSet(lt.EDamageInformation.Dodge))&&(gt.Util.isDefined(et.chance)&&Math.random()>et.chance||K.affixes.push(Y.__assign(Y.__assign({},X.cloneDeep(et.affix)),{unitId:K.target.id})))}}catch(it){z={error:it}}finally{try{tt&&!tt.done&&(Q=J.return)&&Q.call(J)}finally{if(z)throw z.error}}},q.prototype.applyStatusEffect=function(q,K,z){var Q,Z;if(0!==K.statusEffects.length&&z.caster){var J=q.getNamed(ht.SpellDataProvider,K.id),tt=function(Q){var Z,tt,st=J.statusEffectData[Q.statusEffectId];if(!st)throw new it.BattleError("Data for status effect ".concat(Q.statusEffectId," not found for spell ").concat(K.id));var nt=et.getStatusEffectTargets(q,Q.targetType,z.caster,z.target),at=function(q){var Z,J=st.affixes;st.bossAffixes&&st.bossAffixes.length>0&&q.statGrowthTrack&&et.getIsStatGrowthBoss(q.statGrowthTrack)&&(J=st.bossAffixes);var tt=J.map((function(K){return Y.__assign(Y.__assign({},X.cloneDeep(K)),{id:gt.Util.generateInstanceId(),unitId:q.id,duration:X.clone(Q.duration)})}));(Z=z.affixes).push.apply(Z,Y.__spreadArray([],Y.__read(tt),!1));var it=tt.map((function(q){return q.id}));z.statusEffectsAdded.push({id:gt.Util.generateInstanceId(),unitId:q.id,statusEffectId:st.id,affixIds:it,timesTriggered:0,remainingDuration:Q.duration.remainingDuration,spellId:K.id})};try{for(var rt=(Z=void 0,Y.__values(nt)),ot=rt.next();!ot.done;ot=rt.next()){at(ot.value)}}catch(ht){Z={error:ht}}finally{try{ot&&!ot.done&&(tt=rt.return)&&tt.call(rt)}finally{if(Z)throw Z.error}}},et=this;try{for(var st=Y.__values(K.statusEffects),nt=st.next();!nt.done;nt=st.next()){tt(nt.value)}}catch(at){Q={error:at}}finally{try{nt&&!nt.done&&(Z=st.return)&&Z.call(st)}finally{if(Q)throw Q.error}}}},q.prototype.getStatusEffectTargets=function(q,K,z,Y){var Q=this.getUnitsFromTeamType(q,K.team,z.teamId),Z=Q.filter((function(q){return q!==z&&q!==Y}));switch(K.unit){case _t.ESpellUnitTarget.Team:return Q;case _t.ESpellUnitTarget.Allies:return Z;case _t.ESpellUnitTarget.Self:return Q.includes(z)?[z]:[];case _t.ESpellUnitTarget.Single:return Q.includes(Y)?[Y]:[];case _t.ESpellUnitTarget.Random:return[X.sample(Q)];case _t.ESpellUnitTarget.Ally:var J=X.sample(Z);return J?[J]:[];default:throw new it.BattleError("Status effect target unit type:".concat(K.unit," is unsupported"))}},q.prototype.processSpellFlags=function(q,K,z){z.flags=K.getFlags();var Y=K.findFlag(yt.ESpellFlag.ChangeHp);Y&&(z.damage=Y.flagValue?-1*Y.flagValue*q.maxHealth:0,z.setDamageInformationFlag(lt.EDamageInformation.Heal))},q.prototype.limitDamage=function(q,K,z){return this._battleConstants.getDamageLimit(q.id===this._battleConstants.aoaSpellId).clamp(K)},q.prototype.calculateMultipliers=function(q,K,z,Y){var Q,J,tt=this.getUnitElements(q);tt.push(z.element);var et=this._battleConstants.getBestElementalAdvantageType(tt,K.element,z.element),it=this._battleConstants.getSpellElementalMultiplier(et,K.element),st=this._battleConstants.getElementalAdvantage(et,K.element);st===bt.EElementalAdvantage.Strong?Y.setDamageInformationFlag(lt.EDamageInformation.Effective):st===bt.EElementalAdvantage.Weak&&Y.setDamageInformationFlag(lt.EDamageInformation.Ineffective);var nt=q.getStat(ot.EStat.Speed)>K.getStat(ot.EStat.Speed)?q.getStat(ot.EStat.Speed)-K.getStat(ot.EStat.Speed):0,at=0,rt=0,ht=z.findFlag(yt.ESpellFlag.NoDodge)?1:this.calculateHitChance(q,K,z);if(gt.Util.isDebugEnabled()){var ct=null===(Q=this._affixStateDataProvider.getAffixesForUnit(K.id).find((function(q){return q.type===Z.EAffixType.AlwaysDodge||q.type===Z.EAffixType.NeverDodge})))||void 0===Q?void 0:Q.type;ct===Z.EAffixType.AlwaysDodge?ht=0:ct===Z.EAffixType.NeverDodge&&(ht=1)}var ft=nt/this._battleConstants.getDivisor(ot.EDivisor.Critical),pt=this._battleConstants.criticalHitChanceBonus,vt=(q.getStat(ot.EStat.CritChance)+ft+this.getIncomingCritChanceBonus(K))*pt;Math.random()<=ht?Math.random()0&&(X=(X+Z*z.baseDamage*J)/(J+1));var tt=this.calculateTargetDefenceRate(K);return z.element===ft.EElementType.Physical&&(X*=this._battleConstants.physicalMultiplier),X*tt},q.prototype.calculateSpellPower=function(q){var K=q.unit.getStat(ot.EStat.Power);return this._spellLevelBonusConstants.getSpellPower({casterValue:K,spellBaseValue:q.baseDamage,upgradeType:q.upgradeType,level:q.unit.level})},q.prototype.calculateTargetDefenceRate=function(q){var K,z,Y,Q,X=q.getStat(ot.EStat.Defence),Z=null!==(K=this._combatFormulaScalingConstants.getDefenceFormulaCoef(q.level))&&void 0!==K?K:1,J=null!==(z=this._combatFormulaScalingConstants.getDefenceFormulaExponent(q.level))&&void 0!==z?z:1,tt=Z*Math.pow(X,J),et=null!==(Y=this._combatFormulaScalingConstants.getDefenceLevelAverage(q.level))&&void 0!==Y?Y:0,it=null!==(Q=this._combatFormulaScalingConstants.getDefenceAveragePower)&&void 0!==Q?Q:0;return et>0&&(tt=(tt+et*it)/(it+1)),tt},q.prototype.getAdditiveDamageMultiplier=function(q,K){var z,Q,X=this._affixStateDataProvider.getAffixesForUnit(q.id).filter((function(q){return q.type===Z.EAffixType.AdditiveDamageMultiplier}));if(!X.length)return 0;var J=0;try{for(var tt=Y.__values(X),et=tt.next();!et.done;et=tt.next()){var it=et.value;it.element&&!gt.Util.singleOrArrayIncludes(K,it.element)||(J+=it.additiveMultiplier)}}catch(st){z={error:st}}finally{try{et&&!et.done&&(Q=tt.return)&&Q.call(tt)}finally{if(z)throw z.error}}return+J.toFixed(2)},q.prototype.getIncomingCritChanceBonus=function(q){var K,z,Q=this._affixStateDataProvider.getAffixesForUnit(q.id).filter((function(q){return q.type===Z.EAffixType.IncomingCritChanceBonus}));if(!Q.length)return 0;var J=0;try{for(var tt=Y.__values(Q),et=tt.next();!et.done;et=tt.next()){var it=et.value;J+=X.random(it.multiplier.min,it.multiplier.max)}}catch(st){K={error:st}}finally{try{et&&!et.done&&(z=tt.return)&&z.call(tt)}finally{if(K)throw K.error}}return+J.toFixed(2)},q.prototype.getUnitElements=function(q){var K=this._affixStateDataProvider.getAffixesForUnit(q.id).filter((function(q){return q.type===Z.EAffixType.BonusElement})),z=[];return K.forEach((function(q){z.push(q.element)})),z},q.prototype.getIsStatGrowthBoss=function(q){return this.bossStatGrowths.includes(q)},Y.__decorate([(0,Q.inject)(et.BattleConstants),Y.__metadata("design:type",et.BattleConstants)],q.prototype,"_battleConstants",void 0),Y.__decorate([(0,Q.inject)(nt.SpellLevelBonusConstants),Y.__metadata("design:type",nt.SpellLevelBonusConstants)],q.prototype,"_spellLevelBonusConstants",void 0),Y.__decorate([(0,Q.inject)(st.CombatFormulaScalingConstants),Y.__metadata("design:type",st.CombatFormulaScalingConstants)],q.prototype,"_combatFormulaScalingConstants",void 0),Y.__decorate([(0,Q.inject)(rt.AffixStateDataProvider),Y.__metadata("design:type",rt.AffixStateDataProvider)],q.prototype,"_affixStateDataProvider",void 0),Y.__decorate([(0,Q.inject)(tt.BattleController),Y.__metadata("design:type",tt.BattleController)],q.prototype,"_battleController",void 0),Y.__decorate([(0,Q.inject)(at.StateUpdateManager),Y.__metadata("design:type",at.StateUpdateManager)],q.prototype,"_stateUpdateManager",void 0),q=Y.__decorate([(0,Q.injectable)()],q)}();K.SpellCastUtil=Et},98239:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.SpellEffectInstance=void 0;var Y=z(54705),Q=function(){function q(q,K){this.damage=0,this.damageInformation=Y.EDamageInformation.None,this.flags=[],this.affixes=[],this.removedAffixes=[],this.statusEffectsAdded=[],this.caster=q,this.target=K}return q.prototype.isDamageInformationFlagSet=function(q){return(this.damageInformation&q)===q},q.prototype.setDamageInformationFlag=function(q){this.damageInformation|=q},q.prototype.clearDamageInformationFlag=function(q){this.damageInformation&=~q},q}();K.SpellEffectInstance=Q},88250:(q,K)=>{"use strict";var z,Y,Q;Object.defineProperty(K,"__esModule",{value:!0}),K.ESpellDelivery=K.EAffixStatusEffect=K.ESpellFlag=void 0,function(q){q.ChangeHp="Change-HP",q.ChangeMp="Change-MP",q.Rescue="Rescue",q.StealUnit="Switch-Sides",q.ChangeCooldown="Change-Timers",q.NoDamage="No-Damage",q.NoDodge="No-Dodge"}(z||(K.ESpellFlag=z={})),function(q){q.Burning="burning",q.Confused="confused",q.Frozen="frozen",q.Regen="regen",q.Shocked="shocked"}(Y||(K.EAffixStatusEffect=Y={})),function(q){q.Melee="melee",q.Projectile="projectile",q.Above="above",q.Below="below",q.Direct="direct"}(Q||(K.ESpellDelivery=Q={}))},66020:(q,K)=>{"use strict";var z,Y;Object.defineProperty(K,"__esModule",{value:!0}),K.ESpellTeamTarget=K.ESpellUnitTarget=void 0,function(q){q.Self="self",q.Ally="ally",q.Allies="allies",q.Single="single",q.Team="team",q.Row="row",q.Random="random"}(z||(K.ESpellUnitTarget=z={})),function(q){q.Enemy="enemy",q.Own="own",q.Any="any",q.All="all"}(Y||(K.ESpellTeamTarget=Y={}))},9664:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EStatusEffectType=void 0,function(q){q.DOT="DOT",q.HOT="HOT",q.Bomb="bomb",q.Gift="gift",q.Buff="buff",q.Debuff="debuff"}(z||(K.EStatusEffectType=z={}))},24439:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(38641),K),Y.__exportStar(z(12634),K),Y.__exportStar(z(98239),K),Y.__exportStar(z(88250),K),Y.__exportStar(z(66020),K),Y.__exportStar(z(9664),K)},87584:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.Team=void 0;var Y=z(41334),Q=z(21073),X=function(){function q(q,K){this.id=q,this._container=K}return q.prototype.getMembers=function(){var q=this;return this._container.get(Y.BattleStateDataProvider).getUnitsOnTeam(this.id).map((function(K){return q._container.getNamed(Q.Unit,K)}))},q.prototype.isDefeated=function(){return this.getMembers().every((function(q){return q.isDefeated()}))},q}();K.Team=X},4497:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),z(17498).__exportStar(z(87584),K)},15855:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},71211:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},41866:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.ETeamId=void 0,function(q){q.Home="home",q.Away="away"}(z||(K.ETeamId=z={}))},11454:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EBattleAction=void 0,function(q){q.CastSpell="castSpell",q.UseConsumable="useConsumable",q.RescuePet="rescuePet",q.PowerUp="powerUp",q.EscapeBattle="escapeBattle",q.Fumble="fumble"}(z||(K.EBattleAction=z={}))},58690:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EBattleStateUpdate=void 0,function(q){q.SetActiveUnit="setActiveUnit",q.CastSpell="castSpell",q.Escape="escape",q.DefeatUnit="defeatUnit",q.ModifyMp="modifyMp",q.ModifyLevel="modifyLevel",q.ModifySpellCooldown="modifySpellCooldown",q.ModifyUnitTeam="modifyUnitTeam",q.AddUnit="addUnit",q.ReviveUnit="reviveUnit",q.AddAffix="addAffix",q.RemoveAffix="removeAffix",q.ModifyAffixDuration="modifyAffixDuration",q.AddStatusEffect="addStatusEffect",q.TriggerStatusEffect="triggerStatusEffect",q.RemoveStatusEffect="removeStatusEffect",q.ModifyStatusEffect="modifyStatusEffect",q.SkipTurn="skipTurn",q.EndBattle="endBattle",q.NewRound="newRound",q.CustomEvent="event",q.DebugMessage="debugMessage"}(z||(K.EBattleStateUpdate=z={}))},54705:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EDamageInformation=void 0,function(q){q[q.None=0]="None",q[q.CriticalHit=1]="CriticalHit",q[q.Effective=2]="Effective",q[q.Ineffective=4]="Ineffective",q[q.Missed=8]="Missed",q[q.Heal=16]="Heal",q[q.Fumble=32]="Fumble",q[q.Absorb=64]="Absorb",q[q.Reflected=128]="Reflected",q[q.Dodge=256]="Dodge"}(z||(K.EDamageInformation=z={}))},387:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EDebugMessageType=void 0,function(q){q.TurnOrder="turn-order",q.CombatStats="combat-stats",q.RewardScaling="reward-scaling",q.StatusTrigger="status-trigger"}(z||(K.EDebugMessageType=z={}))},56132:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.invertElementType=K.ELegacyElementType=K.EElementType=void 0;var Y,Q,X=z(9546);!function(q){q.Astral="astral",q.Fire="fire",q.Ice="ice",q.Physical="physical",q.Plant="plant",q.Shadow="shadow",q.Storm="storm",q.Water="water",q.Neutral="neutral"}(Y||(K.EElementType=Y={})),function(q){q.Astral="astral",q.Fire="fire",q.Ice="ice",q.Physical="physical",q.Plant="plant",q.Shadow="shadow",q.Storm="storm",q.Water="water",q.Neutral="neutral",q.Earth="earth",q.Wizard="wizard",q.Mech="mech"}(Q||(K.ELegacyElementType=Q={})),K.invertElementType=function(q){var K=X.Util.guaranteeArray(q);return Object.values(Y).filter((function(q){return!K.includes(q)}))}},50532:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EElementalAdvantage=void 0,function(q){q[q.Strong=0]="Strong",q[q.Weak=1]="Weak",q[q.Neutral=2]="Neutral"}(z||(K.EElementalAdvantage=z={}))},47747:(q,K)=>{"use strict";var z;Object.defineProperty(K,"__esModule",{value:!0}),K.EStatGrowthTrackName=void 0,function(q){q.StatsCommon="statsCom",q.StatsUncommon="statsUnc",q.StatsRare="statsRar",q.StatsHeroic="statsHer",q.StatsLegendary="statsLeg",q.Default="default",q.Wizard="wizard",q.PuppetMaster="puppetMaster",q.Boss="boss",q.Miniboss="miniboss",q.IllusionBoss="illusionBoss",q.DragonBoss="dragonBoss",q.HoodedWizard="hoodedWizard",q.Pippet="pippet"}(z||(K.EStatGrowthTrackName=z={}))},7178:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0})},38041:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(15855),K),Y.__exportStar(z(71211),K),Y.__exportStar(z(41866),K),Y.__exportStar(z(11454),K),Y.__exportStar(z(58690),K),Y.__exportStar(z(54705),K),Y.__exportStar(z(387),K),Y.__exportStar(z(56132),K),Y.__exportStar(z(50532),K),Y.__exportStar(z(47747),K),Y.__exportStar(z(7178),K)},21073:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.Unit=void 0;var Y=z(17498),Q=z(95891),X=z(81327),Z=z(1191),J=z(26342),tt=z(18902),et=z(51448),it=z(15907),st=z(51648),nt=z(36700),at=z(44503),rt=z(82825),ot=z(73566),ht=z(58690),ct=z(9546),dt=z(89647),lt=function(){function q(q,K){this.id=q,this._container=K,this._unitStateData=K.getNamed(ot.UnitStateDataProvider,q).unitStateData,this._affixStateDataProvider=K.get(nt.AffixStateDataProvider),this._statusEffectStateDataProvider=K.get(rt.StatusEffectStateDataProvider)}return Object.defineProperty(q.prototype,"type",{get:function(){return this._unitStateData.type},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"passive",{get:function(){var q;return null!==(q=this._unitStateData.passive)&&void 0!==q&&q},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"rarity",{get:function(){return this._unitStateData.rarity},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"health",{get:function(){return this._unitStateData.health.current},set:function(q){this._unitStateData.health.current=Q.clamp(q,0,this.maxHealth)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"maxHealth",{get:function(){return this._unitStateData.health.max},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"mp",{get:function(){return this._unitStateData.mp.current},set:function(q){this._unitStateData.mp.current=Q.clamp(q,0,this.maxMp)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"maxMp",{get:function(){return this._unitStateData.mp.max},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"level",{get:function(){var q;return this._unitStateData.level+(null!==(q=this._unitStateData.chargedLevel)&&void 0!==q?q:0)},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"mergeRank",{get:function(){var q;return null!==(q=this._unitStateData.mergeRank)&&void 0!==q?q:0},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"statGrowthTrack",{get:function(){return this._unitStateData.statGrowthTrackName},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"teamId",{get:function(){return this._unitStateData.teamId},set:function(q){this._unitStateData.teamId=q},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"spells",{get:function(){var q,K=this;return null!==(q=this._spells)&&void 0!==q?q:this._spells=this._unitStateData.spells.map((function(q){return K._container.getByIds(dt.UnitSpell,K.id,q.spellId)})).filter((function(q){return q}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"loadout",{get:function(){return this._unitStateData.loadout},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"currentLoadout",{get:function(){return this._unitStateData.currentLoadout},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"battleStatus",{get:function(){return this._unitStateData.battleStatus},set:function(q){this._unitStateData.battleStatus=q},enumerable:!1,configurable:!0}),q.prototype.removeFromCurrentLoadout=function(q){var K=this._unitStateData.currentLoadout;ct.Util.assertDefined(K,"Current loadout does not exist");var z=K.indexOf(q);if(z<0)throw new it.BattleError('Spell id "'.concat(q,'" not found in current loadout'));K.splice(z,1)},q.prototype.resetCurrentLoadout=function(){this._unitStateData.currentLoadout=Q.cloneDeep(this._unitStateData.loadout)},Object.defineProperty(q.prototype,"element",{get:function(){return this._unitStateData.element},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"catchChance",{get:function(){return this._unitStateData.catchChance},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"catchHealth",{get:function(){var q;return null!==(q=this._unitStateData.catchHealth)&&void 0!==q?q:Math.round(this.maxHealth*this._container.get(et.BattleConstants).rescueDamageThreshold)},enumerable:!1,configurable:!0}),q.prototype.startTurn=function(){var q,K;try{for(var z=Y.__values(this.getAffixes()),Q=z.next();!Q.done;Q=z.next()){var X=Q.value;Z.AffixUtils.hasWhenToTrigger(X)&&X.whenToTrigger===tt.EWhenToTrigger.StartOfTurn&&this._affixStateDataProvider.triggerAffix(this,X,this._statusEffectStateDataProvider.getStatusEffectForAffix(X.id)),!X.duration||X.duration.whenToReduce!==J.EWhenToReduce.StartOfTurn&&X.duration.whenToReduce||this._affixStateDataProvider.reduceAffixDuration(this,X,1)}}catch(et){q={error:et}}finally{try{Q&&!Q.done&&(K=z.return)&&K.call(z)}finally{if(q)throw q.error}}},q.prototype.endTurn=function(){var q,K,z,Q,X;try{for(var et=Y.__values(this.getAffixes()),it=et.next();!it.done;it=et.next()){var nt=it.value;Z.AffixUtils.hasWhenToTrigger(nt)&&nt.whenToTrigger===tt.EWhenToTrigger.EndOfTurn&&this._affixStateDataProvider.triggerAffix(this,nt,this._statusEffectStateDataProvider.getStatusEffectForAffix(nt.id)),(null===(X=nt.duration)||void 0===X?void 0:X.whenToReduce)===J.EWhenToReduce.EndOfTurn&&this._affixStateDataProvider.reduceAffixDuration(this,nt,1)}}catch(ct){q={error:ct}}finally{try{it&&!it.done&&(K=et.return)&&K.call(et)}finally{if(q)throw q.error}}try{for(var at=Y.__values(this.spells),rt=at.next();!rt.done;rt=at.next()){var ot=rt.value;ot.currentCooldown>0&&(--ot.currentCooldown,this._container.get(st.StateUpdateManager).addToBack({type:ht.EBattleStateUpdate.ModifySpellCooldown,unitId:this.id,spellId:ot.id,cooldown:ot.currentCooldown}))}}catch(dt){z={error:dt}}finally{try{rt&&!rt.done&&(Q=at.return)&&Q.call(at)}finally{if(z)throw z.error}}},q.prototype.isDefeated=function(){return this.health<=0},q.prototype.getBaseStat=function(q){return this._unitStateData.stats[q]},q.prototype.getStat=function(K){var z=this._unitStateData.stats[K],Y=this.getAffixes().filter((function(q){return q.type===X.EAffixType.Stat&&q.stat===K})).reduce((function(q,K){var z,Y;return q*(null!==(z=K.multiplier)&&void 0!==z?z:1)+(null!==(Y=K.amount)&&void 0!==Y?Y:0)}),z);return q.PERCENTAGE_STATS.includes(K)?Y:Math.round(Y)},q.prototype.getAffixes=function(){return this._affixStateDataProvider.getAffixesForUnit(this.id)},q.prototype.getStatAffixesDebug=function(q){var K="";return this.getAffixes().filter((function(K){return K.type===X.EAffixType.Stat&&K.stat===q})).forEach((function(q,z){K+="".concat(z+1,". amount: ").concat(q.amount,", multiplier: ").concat(q.multiplier,"\n")})),K},q.PERCENTAGE_STATS=[at.EStat.CritChance,at.EStat.CritDamage,at.EStat.Accuracy,at.EStat.Dodge,at.EStat.DodgeDamage],q}();K.Unit=lt},89647:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.UnitSpell=void 0;var Y=z(17498),Q=z(68688),X=z(11282),Z=z(38641),J=z(9546),tt=z(21073),et=function(q){function K(K,z,Y){var Z,tt=this,et=Y.getNamed(Q.SpellDataProvider,z);(tt=q.call(this,et.spellData)||this)._container=Y,tt._unitId=K;var it=null===(Z=Y.getByIds(X.UnitSpellStateDataProvider,K,z))||void 0===Z?void 0:Z.unitSpellStateData;return J.Util.assertDefined(it,"Spell ".concat(z," not available for unit ").concat(K)),tt._unitSpellStateData=it,tt}return Y.__extends(K,q),Object.defineProperty(K.prototype,"isLocked",{get:function(){return this._unitSpellStateData.isLocked},set:function(q){this._unitSpellStateData.isLocked=q},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"currentCooldown",{get:function(){return this._unitSpellStateData.currentCooldown},set:function(q){this._unitSpellStateData.currentCooldown=q},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"unit",{get:function(){var q;return null!==(q=this._unit)&&void 0!==q?q:this._unit=this._container.getNamed(tt.Unit,this._unitId)},enumerable:!1,configurable:!0}),K}(Z.Spell);K.UnitSpell=et},18035:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(21073),K),Y.__exportStar(z(89647),K)},9546:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.Util=void 0;var Y=z(15907),Q=function(){function q(){}return q.isDefined=function(q){return!(null==q)},q.assertDefined=function(q,K){if(void 0===K&&(K="value is not defined"),!this.isDefined(q))throw new Y.BattleError("string"==typeof K?K:K())},q.guaranteeArray=function(K){return q.isDefined(K)?Array.isArray(K)?K:[K]:[]},q.singleOrArrayIncludes=function(K,z){return q.guaranteeArray(K).includes(z)},q.generateInstanceId=function(){return Math.random().toString(36).substr(2,9)},q.isDebugEnabled=function(q,K){return void 0===K&&(K=!0),K&&!!process.env.DEBUG&&"false"!==process.env.DEBUG||!!q&&!!process.env[q]&&"false"!==process.env[q]},q.findFirstElementBelowThreshold=function(K,z,Y){if(0!==Y.length){for(var Q,X=0,Z=Y.length-1;X<=Z;){var J=Math.floor((X+Z)/2),tt=Y[J];q.isDefined(tt[K])?tt[K]>z?Z=J-1:(Q=tt,X=J+1):X=J+1}return Q=null!=Q?Q:Y[0],q.isDefined(Q[K])?Q:void 0}},q.ceiling=function(q,K){return 0===K?q:Math.ceil(Math.abs(q)/Math.abs(K))*Math.abs(K)*Math.sign(q*K)},q.round=function(q,K){return 0===K?q:Math.round(Math.abs(q)/Math.abs(K))*Math.abs(K)*Math.sign(q*K)},q.toFixedTrimmed=function(q,K){return parseFloat(q.toFixed(K)).toString()},q}();K.Util=Q},87452:(q,K)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0}),K.ValueRange=void 0;var z=function(){function q(q,K){this._minValue=0,this._maxValue=0,this._minValue=q,this._maxValue=K}return Object.defineProperty(q.prototype,"min",{get:function(){return this._minValue},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"max",{get:function(){return this._maxValue},enumerable:!1,configurable:!0}),q.prototype.isInRange=function(q){return!(qthis._maxValue)},q.prototype.clamp=function(q){return Math.max(Math.min(q,this._maxValue),this._minValue)},q.prototype.getRange=function(){return this._maxValue-this._minValue},q}();K.ValueRange=z},77536:(q,K,z)=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});var Y=z(17498);Y.__exportStar(z(87452),K),Y.__exportStar(z(9546),K)},33482:(q,K,z)=>{var Y;!function(q){!function(K){var Y="object"==typeof z.g?z.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),Q=X(q);function X(q,K){return function(z,Y){"function"!=typeof q[z]&&Object.defineProperty(q,z,{configurable:!0,writable:!0,value:Y}),K&&K(z,Y)}}void 0===Y.Reflect?Y.Reflect=q:Q=X(Y.Reflect,Q),function(q){var K=Object.prototype.hasOwnProperty,z="function"==typeof Symbol,Y=z&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",Q=z&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",X="function"==typeof Object.create,Z={__proto__:[]}instanceof Array,J=!X&&!Z,tt={create:X?function(){return Yt(Object.create(null))}:Z?function(){return Yt({__proto__:null})}:function(){return Yt({})},has:J?function(q,z){return K.call(q,z)}:function(q,K){return K in q},get:J?function(q,z){return K.call(q,z)?q[z]:void 0}:function(q,K){return q[K]}},et=Object.getPrototypeOf(Function),it="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,st=it||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?qt():Map,nt=it||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?Kt():Set,at=new(it||"function"!=typeof WeakMap?zt():WeakMap);function rt(q,K,z,Y){if(Ot(z)){if(!kt(q))throw new TypeError;if(!Ut(K))throw new TypeError;return vt(q,K)}if(!kt(q))throw new TypeError;if(!Rt(K))throw new TypeError;if(!Rt(Y)&&!Ot(Y)&&!It(Y))throw new TypeError;return It(Y)&&(Y=void 0),gt(q,K,z=Lt(z),Y)}function ot(q,K){function z(z,Y){if(!Rt(z))throw new TypeError;if(!Ot(Y)&&!Ft(Y))throw new TypeError;Tt(q,K,z,Y)}return z}function ht(q,K,z,Y){if(!Rt(z))throw new TypeError;return Ot(Y)||(Y=Lt(Y)),Tt(q,K,z,Y)}function ct(q,K,z){if(!Rt(K))throw new TypeError;return Ot(z)||(z=Lt(z)),yt(q,K,z)}function dt(q,K,z){if(!Rt(K))throw new TypeError;return Ot(z)||(z=Lt(z)),_t(q,K,z)}function lt(q,K,z){if(!Rt(K))throw new TypeError;return Ot(z)||(z=Lt(z)),Et(q,K,z)}function ut(q,K,z){if(!Rt(K))throw new TypeError;return Ot(z)||(z=Lt(z)),wt(q,K,z)}function ft(q,K){if(!Rt(q))throw new TypeError;return Ot(K)||(K=Lt(K)),St(q,K)}function bt(q,K){if(!Rt(q))throw new TypeError;return Ot(K)||(K=Lt(K)),At(q,K)}function pt(q,K,z){if(!Rt(K))throw new TypeError;Ot(z)||(z=Lt(z));var Y=mt(K,z,!1);if(Ot(Y))return!1;if(!Y.delete(q))return!1;if(Y.size>0)return!0;var Q=at.get(K);return Q.delete(z),Q.size>0||at.delete(K),!0}function vt(q,K){for(var z=q.length-1;z>=0;--z){var Y=(0,q[z])(K);if(!Ot(Y)&&!It(Y)){if(!Ut(Y))throw new TypeError;K=Y}}return K}function gt(q,K,z,Y){for(var Q=q.length-1;Q>=0;--Q){var X=(0,q[Q])(K,z,Y);if(!Ot(X)&&!It(X)){if(!Rt(X))throw new TypeError;Y=X}}return Y}function mt(q,K,z){var Y=at.get(q);if(Ot(Y)){if(!z)return;Y=new st,at.set(q,Y)}var Q=Y.get(K);if(Ot(Q)){if(!z)return;Q=new st,Y.set(K,Q)}return Q}function yt(q,K,z){if(_t(q,K,z))return!0;var Y=Wt(K);return!It(Y)&&yt(q,Y,z)}function _t(q,K,z){var Y=mt(K,z,!1);return!Ot(Y)&&Nt(Y.has(q))}function Et(q,K,z){if(_t(q,K,z))return wt(q,K,z);var Y=Wt(K);return It(Y)?void 0:Et(q,Y,z)}function wt(q,K,z){var Y=mt(K,z,!1);if(!Ot(Y))return Y.get(q)}function Tt(q,K,z,Y){mt(z,Y,!0).set(q,K)}function St(q,K){var z=At(q,K),Y=Wt(q);if(null===Y)return z;var Q=St(Y,K);if(Q.length<=0)return z;if(z.length<=0)return Q;for(var X=new nt,Z=[],J=0,tt=z;J=0&&q=this._keys.length?(this._index=-1,this._keys=K,this._values=K):this._index++,{value:z,done:!1}}return{value:void 0,done:!0}},q.prototype.throw=function(q){throw this._index>=0&&(this._index=-1,this._keys=K,this._values=K),q},q.prototype.return=function(q){return this._index>=0&&(this._index=-1,this._keys=K,this._values=K),{value:q,done:!0}},q}();return function(){function K(){this._keys=[],this._values=[],this._cacheKey=q,this._cacheIndex=-2}return Object.defineProperty(K.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),K.prototype.has=function(q){return this._find(q,!1)>=0},K.prototype.get=function(q){var K=this._find(q,!1);return K>=0?this._values[K]:void 0},K.prototype.set=function(q,K){var z=this._find(q,!0);return this._values[z]=K,this},K.prototype.delete=function(K){var z=this._find(K,!1);if(z>=0){for(var Y=this._keys.length,Q=z+1;Q{"use strict";z.r(K),z.d(K,{__assign:()=>X,__asyncDelegator:()=>ft,__asyncGenerator:()=>ut,__asyncValues:()=>bt,__await:()=>lt,__awaiter:()=>it,__classPrivateFieldGet:()=>yt,__classPrivateFieldIn:()=>Et,__classPrivateFieldSet:()=>_t,__createBinding:()=>nt,__decorate:()=>J,__exportStar:()=>at,__extends:()=>Q,__generator:()=>st,__importDefault:()=>mt,__importStar:()=>gt,__makeTemplateObject:()=>pt,__metadata:()=>et,__param:()=>tt,__read:()=>ot,__rest:()=>Z,__spread:()=>ht,__spreadArray:()=>dt,__spreadArrays:()=>ct,__values:()=>rt});var Y=function(q,K){return(Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(q,K){q.__proto__=K}||function(q,K){for(var z in K)Object.prototype.hasOwnProperty.call(K,z)&&(q[z]=K[z])})(q,K)};function Q(q,K){if("function"!=typeof K&&null!==K)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function z(){this.constructor=q}Y(q,K),q.prototype=null===K?Object.create(K):(z.prototype=K.prototype,new z)}var X=function(){return(X=Object.assign||function(q){for(var K,z=1,Y=arguments.length;z=0;J--)(Q=q[J])&&(Z=(X<3?Q(Z):X>3?Q(K,z,Z):Q(K,z))||Z);return X>3&&Z&&Object.defineProperty(K,z,Z),Z}function tt(q,K){return function(z,Y){K(z,Y,q)}}function et(q,K){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(q,K)}function it(q,K,z,Y){return new(z||(z=Promise))((function(Q,X){function Z(q){try{tt(Y.next(q))}catch(e){X(e)}}function J(q){try{tt(Y.throw(q))}catch(e){X(e)}}function tt(q){var K;q.done?Q(q.value):(K=q.value,K instanceof z?K:new z((function(q){q(K)}))).then(Z,J)}tt((Y=Y.apply(q,K||[])).next())}))}function st(q,K){var z,Y,Q,X,Z={label:0,sent:function(){if(1&Q[0])throw Q[1];return Q[1]},trys:[],ops:[]};return X={next:J(0),throw:J(1),return:J(2)},"function"==typeof Symbol&&(X[Symbol.iterator]=function(){return this}),X;function J(X){return function(J){return function(X){if(z)throw new TypeError("Generator is already executing.");for(;Z;)try{if(z=1,Y&&(Q=2&X[0]?Y.return:X[0]?Y.throw||((Q=Y.return)&&Q.call(Y),0):Y.next)&&!(Q=Q.call(Y,X[1])).done)return Q;switch(Y=0,Q&&(X=[2&X[0],Q.value]),X[0]){case 0:case 1:Q=X;break;case 4:return Z.label++,{value:X[1],done:!1};case 5:Z.label++,Y=X[1],X=[0];continue;case 7:X=Z.ops.pop(),Z.trys.pop();continue;default:if(!(Q=Z.trys,(Q=Q.length>0&&Q[Q.length-1])||6!==X[0]&&2!==X[0])){Z=0;continue}if(3===X[0]&&(!Q||X[1]>Q[0]&&X[1]=q.length&&(q=void 0),{value:q&&q[Y++],done:!q}}};throw new TypeError(K?"Object is not iterable.":"Symbol.iterator is not defined.")}function ot(q,K){var z="function"==typeof Symbol&&q[Symbol.iterator];if(!z)return q;var Y,Q,X=z.call(q),Z=[];try{for(;(void 0===K||K-- >0)&&!(Y=X.next()).done;)Z.push(Y.value)}catch(J){Q={error:J}}finally{try{Y&&!Y.done&&(z=X.return)&&z.call(X)}finally{if(Q)throw Q.error}}return Z}function ht(){for(var q=[],K=0;K1||J(q,K)}))})}function J(q,K){try{(z=Q[q](K)).value instanceof lt?Promise.resolve(z.value.v).then(tt,et):it(X[0][2],z)}catch(e){it(X[0][3],e)}var z}function tt(q){J("next",q)}function et(q){J("throw",q)}function it(q,K){q(K),X.shift(),X.length&&J(X[0][0],X[0][1])}}function ft(q){var K,z;return K={},Y("next"),Y("throw",(function(q){throw q})),Y("return"),K[Symbol.iterator]=function(){return this},K;function Y(Y,Q){K[Y]=q[Y]?function(K){return(z=!z)?{value:lt(q[Y](K)),done:"return"===Y}:Q?Q(K):K}:Q}}function bt(q){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var K,z=q[Symbol.asyncIterator];return z?z.call(q):(q=rt(q),K={},Y("next"),Y("throw"),Y("return"),K[Symbol.asyncIterator]=function(){return this},K);function Y(z){K[z]=q[z]&&function(K){return new Promise((function(Y,Q){(function(q,K,z,Y){Promise.resolve(Y).then((function(K){q({value:K,done:z})}),K)})(Y,Q,(K=q[z](K)).done,K.value)}))}}}function pt(q,K){return Object.defineProperty?Object.defineProperty(q,"raw",{value:K}):q.raw=K,q}var vt=Object.create?function(q,K){Object.defineProperty(q,"default",{enumerable:!0,value:K})}:function(q,K){q.default=K};function gt(q){if(q&&q.__esModule)return q;var K={};if(null!=q)for(var z in q)"default"!==z&&Object.prototype.hasOwnProperty.call(q,z)&&nt(K,q,z);return vt(K,q),K}function mt(q){return q&&q.__esModule?q:{default:q}}function yt(q,K,z,Y){if("a"===z&&!Y)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof K?q!==K||!Y:!K.has(q))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===z?Y:"a"===z?Y.call(q):Y?Y.value:K.get(q)}function _t(q,K,z,Y,Q){if("m"===Y)throw new TypeError("Private method is not writable");if("a"===Y&&!Q)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof K?q!==K||!Q:!K.has(q))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===Y?Q.call(q,z):Q?Q.value=z:K.set(q,z),z}function Et(q,K){if(null===K||"object"!=typeof K&&"function"!=typeof K)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof q?K===q:q.has(K)}},68910:q=>{"use strict";q.exports=window.PIXI},88225:q=>{"use strict";q.exports=window.Sentry},95891:q=>{"use strict";q.exports=window._},79687:q=>{"use strict";q.exports=window.inversify},42634:()=>{},39209:(q,K,z)=>{"use strict";var Y=z(76578),Q="undefined"==typeof globalThis?z.g:globalThis;q.exports=function(){for(var q=[],K=0;K{"use strict";z.d(K,{t:()=>ot});var Y=[],Q=[],X={},Z={},J={};function tt(q){return"string"==typeof q?new RegExp("^"+q+"$","i"):q}function et(q,K){return q===K?K:q===q.toLowerCase()?K.toLowerCase():q===q.toUpperCase()?K.toUpperCase():q[0]===q[0].toUpperCase()?K.charAt(0).toUpperCase()+K.substr(1).toLowerCase():K.toLowerCase()}function it(q,K){return q.replace(/\$(\d{1,2})/g,(function(q,z){return K[z]||""}))}function st(q,K){return q.replace(K[0],(function(z,Y){var Q=it(K[1],arguments);return et(""===z?q[Y-1]:z,Q)}))}function nt(q,K,z){if(!q.length||X.hasOwnProperty(q))return K;for(var Y=z.length;Y--;){var Q=z[Y];if(Q[0].test(K))return st(K,Q)}return K}function at(q,K,z){return function(Y){var Q=Y.toLowerCase();return K.hasOwnProperty(Q)?et(Y,Q):q.hasOwnProperty(Q)?et(Y,q[Q]):nt(Q,Y,z)}}function rt(q,K,z){return function(Y){var Q=Y.toLowerCase();return!!K.hasOwnProperty(Q)||!q.hasOwnProperty(Q)&&nt(Q,Q,z)===Q}}function ot(q,K,z){return(z?K+" ":"")+(1===K?ot.singular(q):ot.plural(q))}ot.plural=at(J,Z,Y),ot.isPlural=rt(J,Z,Y),ot.singular=at(Z,J,Q),ot.isSingular=rt(Z,J,Q),ot.addPluralRule=function(q,K){Y.push([tt(q),K])},ot.addSingularRule=function(q,K){Q.push([tt(q),K])},ot.addUncountableRule=function(q){"string"!=typeof q?(ot.addPluralRule(q,"$0"),ot.addSingularRule(q,"$0")):X[q.toLowerCase()]=!0},ot.addIrregularRule=function(q,K){K=K.toLowerCase(),q=q.toLowerCase(),J[q]=K,Z[K]=q},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["my","our"],["its","their"],["his","their"],["her","their"],["mosquito","mosquitoes"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(q){return ot.addIrregularRule(q[0],q[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(q){return ot.addPluralRule(q[0],q[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i,"$1ie"],[/\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(q){return ot.addSingularRule(q[0],q[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hertz","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(ot.addUncountableRule)},44329:(q,K,z)=>{"use strict";z.d(K,{Ak:()=>Y});let Y=(q=21)=>crypto.getRandomValues(new Uint8Array(q)).reduce(((q,K)=>q+=(K&=63)<36?K.toString(36):K<62?(K-26).toString(36).toUpperCase():K>62?"-":"_"),"")},92661:(q,K,z)=>{"use strict";z.d(K,{YOg:()=>cn,zMY:()=>sn,k5n:()=>mn,Whr:()=>tn,RZV:()=>Nn,aig:()=>Zs,Ikc:()=>ln,g1P:()=>vn,YjP:()=>Rs,KCZ:()=>fn,L5J:()=>an});Object.freeze({status:"aborted"});function Y(q,K,z){function Y(z,Y){var Q;Object.defineProperty(z,"_zod",{value:z._zod??{},enumerable:!1}),(Q=z._zod).traits??(Q.traits=new Set),z._zod.traits.add(q),K(z,Y);for(const q in Z.prototype)q in z||Object.defineProperty(z,q,{value:Z.prototype[q].bind(z)});z._zod.constr=Z,z._zod.def=Y}const Q=z?.Parent??Object;class X extends Q{}function Z(q){var K;const Q=z?.Parent?new X:this;Y(Q,q),(K=Q._zod).deferred??(K.deferred=[]);for(const z of Q._zod.deferred)z();return Q}return Object.defineProperty(X,"name",{value:q}),Object.defineProperty(Z,"init",{value:Y}),Object.defineProperty(Z,Symbol.hasInstance,{value:K=>!!(z?.Parent&&K instanceof z.Parent)||K?._zod?.traits?.has(q)}),Object.defineProperty(Z,"name",{value:q}),Z}Symbol("zod_brand");class Q extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class X extends Error{constructor(q){super(`Encountered unidirectional transform during encode: ${q}`),this.name="ZodEncodeError"}}const Z={};function J(q){return q&&Object.assign(Z,q),Z}function tt(q,K="|"){return q.map((q=>yt(q))).join(K)}function et(q,K){return"bigint"==typeof K?K.toString():K}function it(q){return{get value(){{const K=q();return Object.defineProperty(this,"value",{value:K}),K}}}}function st(q){return null==q}function nt(q){const K=q.startsWith("^")?1:0,z=q.endsWith("$")?q.length-1:q.length;return q.slice(K,z)}const at=Symbol("evaluating");function rt(q,K,z){let Y;Object.defineProperty(q,K,{get(){if(Y!==at)return void 0===Y&&(Y=at,Y=z()),Y},set(z){Object.defineProperty(q,K,{value:z})},configurable:!0})}function ot(q,K,z){Object.defineProperty(q,K,{value:z,writable:!0,enumerable:!0,configurable:!0})}function ht(...q){const K={};for(const z of q){const q=Object.getOwnPropertyDescriptors(z);Object.assign(K,q)}return Object.defineProperties({},K)}function ct(q){return JSON.stringify(q)}const dt="captureStackTrace"in Error?Error.captureStackTrace:(...q)=>{};function lt(q){return"object"==typeof q&&null!==q&&!Array.isArray(q)}const ut=it((()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(q){return!1}}));function ft(q){if(!1===lt(q))return!1;const K=q.constructor;if(void 0===K)return!0;const z=K.prototype;return!1!==lt(z)&&!1!==Object.prototype.hasOwnProperty.call(z,"isPrototypeOf")}function bt(q){return ft(q)?{...q}:Array.isArray(q)?[...q]:q}const pt=new Set(["string","number","symbol"]);new Set(["string","number","bigint","boolean","symbol","undefined"]);function vt(q){return q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gt(q,K,z){const Y=new q._zod.constr(K??q._zod.def);return K&&!z?.parent||(Y._zod.parent=q),Y}function mt(q){const K=q;if(!K)return{};if("string"==typeof K)return{error:()=>K};if(void 0!==K?.message){if(void 0!==K?.error)throw new Error("Cannot specify both `message` and `error` params");K.error=K.message}return delete K.message,"string"==typeof K.error?{...K,error:()=>K.error}:K}function yt(q){return"bigint"==typeof q?q.toString()+"n":"string"==typeof q?`"${q}"`:`${q}`}const _t={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Et(q,K=0){if(!0===q.aborted)return!0;for(let z=K;z{var z;return(z=K).path??(z.path=[]),K.path.unshift(q),K}))}function Tt(q){return"string"==typeof q?q:q?.message}function St(q,K,z){const Y={...q,path:q.path??[]};if(!q.message){const Q=Tt(q.inst?._zod.def?.error?.(q))??Tt(K?.error?.(q))??Tt(z.customError?.(q))??Tt(z.localeError?.(q))??"Invalid input";Y.message=Q}return delete Y.inst,delete Y.continue,K?.reportInput||delete Y.input,Y}function At(q){return Array.isArray(q)?"array":"string"==typeof q?"string":"unknown"}function Ct(...q){const[K,z,Y]=q;return"string"==typeof K?{message:K,code:"custom",input:z,inst:Y}:{...K}}const Ot=(q,K)=>{q.name="$ZodError",Object.defineProperty(q,"_zod",{value:q._zod,enumerable:!1}),Object.defineProperty(q,"issues",{value:K,enumerable:!1}),q.message=JSON.stringify(K,et,2),Object.defineProperty(q,"toString",{value:()=>q.message,enumerable:!1})},It=Y("$ZodError",Ot),Dt=Y("$ZodError",Ot,{Parent:Error});const Rt=q=>(K,z,Y,X)=>{const Z=Y?Object.assign(Y,{async:!1}):{async:!1},tt=K._zod.run({value:z,issues:[]},Z);if(tt instanceof Promise)throw new Q;if(tt.issues.length){const K=new(X?.Err??q)(tt.issues.map((q=>St(q,Z,J()))));throw dt(K,X?.callee),K}return tt.value},Pt=q=>async(K,z,Y,Q)=>{const X=Y?Object.assign(Y,{async:!0}):{async:!0};let Z=K._zod.run({value:z,issues:[]},X);if(Z instanceof Promise&&(Z=await Z),Z.issues.length){const K=new(Q?.Err??q)(Z.issues.map((q=>St(q,X,J()))));throw dt(K,Q?.callee),K}return Z.value},Mt=q=>(K,z,Y)=>{const X=Y?{...Y,async:!1}:{async:!1},Z=K._zod.run({value:z,issues:[]},X);if(Z instanceof Promise)throw new Q;return Z.issues.length?{success:!1,error:new(q??It)(Z.issues.map((q=>St(q,X,J()))))}:{success:!0,data:Z.value}},Nt=Mt(Dt),xt=q=>async(K,z,Y)=>{const Q=Y?Object.assign(Y,{async:!0}):{async:!0};let X=K._zod.run({value:z,issues:[]},Q);return X instanceof Promise&&(X=await X),X.issues.length?{success:!1,error:new q(X.issues.map((q=>St(q,Q,J()))))}:{success:!0,data:X.value}},Lt=xt(Dt),kt=q=>(K,z,Y)=>{const Q=Y?Object.assign(Y,{direction:"backward"}):{direction:"backward"};return Rt(q)(K,z,Q)},Bt=q=>(K,z,Y)=>Rt(q)(K,z,Y),Ut=q=>async(K,z,Y)=>{const Q=Y?Object.assign(Y,{direction:"backward"}):{direction:"backward"};return Pt(q)(K,z,Q)},Ft=q=>async(K,z,Y)=>Pt(q)(K,z,Y),Gt=q=>(K,z,Y)=>{const Q=Y?Object.assign(Y,{direction:"backward"}):{direction:"backward"};return Mt(q)(K,z,Q)},jt=q=>(K,z,Y)=>Mt(q)(K,z,Y),$t=q=>async(K,z,Y)=>{const Q=Y?Object.assign(Y,{direction:"backward"}):{direction:"backward"};return xt(q)(K,z,Q)},Ht=q=>async(K,z,Y)=>xt(q)(K,z,Y),Vt=/^[cC][^\s-]{8,}$/,Wt=/^[0-9a-z]+$/,qt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Kt=/^[0-9a-vA-V]{20}$/,zt=/^[A-Za-z0-9]{27}$/,Yt=/^[a-zA-Z0-9_-]{21}$/,Qt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Zt=q=>q?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${q}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Jt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const te=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ee=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ie=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,se=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ne=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ae=/^[A-Za-z0-9_-]*$/,re=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,oe=/^\+(?:[0-9]){6,14}[0-9]$/,he="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ce=new RegExp(`^${he}$`);function de(q){const K="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof q.precision?-1===q.precision?`${K}`:0===q.precision?`${K}:[0-5]\\d`:`${K}:[0-5]\\d\\.\\d{${q.precision}}`:`${K}(?::[0-5]\\d(?:\\.\\d+)?)?`}const le=/^-?\d+$/,ue=/^-?\d+(?:\.\d+)?/,fe=/^(?:true|false)$/i,be=/^[^A-Z]*$/,pe=/^[^a-z]*$/;const ve=Y("$ZodCheck",((q,K)=>{var z;q._zod??(q._zod={}),q._zod.def=K,(z=q._zod).onattach??(z.onattach=[])})),ge={number:"number",bigint:"bigint",object:"date"},me=Y("$ZodCheckLessThan",((q,K)=>{ve.init(q,K);const z=ge[typeof K.value];q._zod.onattach.push((q=>{const z=q._zod.bag,Y=(K.inclusive?z.maximum:z.exclusiveMaximum)??Number.POSITIVE_INFINITY;K.value{(K.inclusive?Y.value<=K.value:Y.value{ve.init(q,K);const z=ge[typeof K.value];q._zod.onattach.push((q=>{const z=q._zod.bag,Y=(K.inclusive?z.minimum:z.exclusiveMinimum)??Number.NEGATIVE_INFINITY;K.value>Y&&(K.inclusive?z.minimum=K.value:z.exclusiveMinimum=K.value)})),q._zod.check=Y=>{(K.inclusive?Y.value>=K.value:Y.value>K.value)||Y.issues.push({origin:z,code:"too_small",minimum:K.value,input:Y.value,inclusive:K.inclusive,inst:q,continue:!K.abort})}})),_e=Y("$ZodCheckMultipleOf",((q,K)=>{ve.init(q,K),q._zod.onattach.push((q=>{var z;(z=q._zod.bag).multipleOf??(z.multipleOf=K.value)})),q._zod.check=z=>{if(typeof z.value!=typeof K.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof z.value?z.value%K.value===BigInt(0):0===function(q,K){const z=(q.toString().split(".")[1]||"").length,Y=K.toString();let Q=(Y.split(".")[1]||"").length;if(0===Q&&/\d?e-\d?/.test(Y)){const q=Y.match(/\d?e-(\d?)/);q?.[1]&&(Q=Number.parseInt(q[1]))}const X=z>Q?z:Q;return Number.parseInt(q.toFixed(X).replace(".",""))%Number.parseInt(K.toFixed(X).replace(".",""))/10**X}(z.value,K.value))||z.issues.push({origin:typeof z.value,code:"not_multiple_of",divisor:K.value,input:z.value,inst:q,continue:!K.abort})}})),Ee=Y("$ZodCheckNumberFormat",((q,K)=>{ve.init(q,K),K.format=K.format||"float64";const z=K.format?.includes("int"),Y=z?"int":"number",[Q,X]=_t[K.format];q._zod.onattach.push((q=>{const Y=q._zod.bag;Y.format=K.format,Y.minimum=Q,Y.maximum=X,z&&(Y.pattern=le)})),q._zod.check=Z=>{const J=Z.value;if(z){if(!Number.isInteger(J))return void Z.issues.push({expected:Y,format:K.format,code:"invalid_type",continue:!1,input:J,inst:q});if(!Number.isSafeInteger(J))return void(J>0?Z.issues.push({input:J,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:q,origin:Y,continue:!K.abort}):Z.issues.push({input:J,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:q,origin:Y,continue:!K.abort}))}JX&&Z.issues.push({origin:"number",input:J,code:"too_big",maximum:X,inst:q})}})),we=Y("$ZodCheckMaxLength",((q,K)=>{var z;ve.init(q,K),(z=q._zod.def).when??(z.when=q=>{const K=q.value;return!st(K)&&void 0!==K.length}),q._zod.onattach.push((q=>{const z=q._zod.bag.maximum??Number.POSITIVE_INFINITY;K.maximum{const Y=z.value;if(Y.length<=K.maximum)return;const Q=At(Y);z.issues.push({origin:Q,code:"too_big",maximum:K.maximum,inclusive:!0,input:Y,inst:q,continue:!K.abort})}})),Te=Y("$ZodCheckMinLength",((q,K)=>{var z;ve.init(q,K),(z=q._zod.def).when??(z.when=q=>{const K=q.value;return!st(K)&&void 0!==K.length}),q._zod.onattach.push((q=>{const z=q._zod.bag.minimum??Number.NEGATIVE_INFINITY;K.minimum>z&&(q._zod.bag.minimum=K.minimum)})),q._zod.check=z=>{const Y=z.value;if(Y.length>=K.minimum)return;const Q=At(Y);z.issues.push({origin:Q,code:"too_small",minimum:K.minimum,inclusive:!0,input:Y,inst:q,continue:!K.abort})}})),Se=Y("$ZodCheckLengthEquals",((q,K)=>{var z;ve.init(q,K),(z=q._zod.def).when??(z.when=q=>{const K=q.value;return!st(K)&&void 0!==K.length}),q._zod.onattach.push((q=>{const z=q._zod.bag;z.minimum=K.length,z.maximum=K.length,z.length=K.length})),q._zod.check=z=>{const Y=z.value,Q=Y.length;if(Q===K.length)return;const X=At(Y),Z=Q>K.length;z.issues.push({origin:X,...Z?{code:"too_big",maximum:K.length}:{code:"too_small",minimum:K.length},inclusive:!0,exact:!0,input:z.value,inst:q,continue:!K.abort})}})),Ae=Y("$ZodCheckStringFormat",((q,K)=>{var z,Y;ve.init(q,K),q._zod.onattach.push((q=>{const z=q._zod.bag;z.format=K.format,K.pattern&&(z.patterns??(z.patterns=new Set),z.patterns.add(K.pattern))})),K.pattern?(z=q._zod).check??(z.check=z=>{K.pattern.lastIndex=0,K.pattern.test(z.value)||z.issues.push({origin:"string",code:"invalid_format",format:K.format,input:z.value,...K.pattern?{pattern:K.pattern.toString()}:{},inst:q,continue:!K.abort})}):(Y=q._zod).check??(Y.check=()=>{})})),Ce=Y("$ZodCheckRegex",((q,K)=>{Ae.init(q,K),q._zod.check=z=>{K.pattern.lastIndex=0,K.pattern.test(z.value)||z.issues.push({origin:"string",code:"invalid_format",format:"regex",input:z.value,pattern:K.pattern.toString(),inst:q,continue:!K.abort})}})),Oe=Y("$ZodCheckLowerCase",((q,K)=>{K.pattern??(K.pattern=be),Ae.init(q,K)})),Ie=Y("$ZodCheckUpperCase",((q,K)=>{K.pattern??(K.pattern=pe),Ae.init(q,K)})),De=Y("$ZodCheckIncludes",((q,K)=>{ve.init(q,K);const z=vt(K.includes),Y=new RegExp("number"==typeof K.position?`^.{${K.position}}${z}`:z);K.pattern=Y,q._zod.onattach.push((q=>{const K=q._zod.bag;K.patterns??(K.patterns=new Set),K.patterns.add(Y)})),q._zod.check=z=>{z.value.includes(K.includes,K.position)||z.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:K.includes,input:z.value,inst:q,continue:!K.abort})}})),Re=Y("$ZodCheckStartsWith",((q,K)=>{ve.init(q,K);const z=new RegExp(`^${vt(K.prefix)}.*`);K.pattern??(K.pattern=z),q._zod.onattach.push((q=>{const K=q._zod.bag;K.patterns??(K.patterns=new Set),K.patterns.add(z)})),q._zod.check=z=>{z.value.startsWith(K.prefix)||z.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:K.prefix,input:z.value,inst:q,continue:!K.abort})}})),Pe=Y("$ZodCheckEndsWith",((q,K)=>{ve.init(q,K);const z=new RegExp(`.*${vt(K.suffix)}$`);K.pattern??(K.pattern=z),q._zod.onattach.push((q=>{const K=q._zod.bag;K.patterns??(K.patterns=new Set),K.patterns.add(z)})),q._zod.check=z=>{z.value.endsWith(K.suffix)||z.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:K.suffix,input:z.value,inst:q,continue:!K.abort})}}));const Me=Y("$ZodCheckOverwrite",((q,K)=>{ve.init(q,K),q._zod.check=q=>{q.value=K.tx(q.value)}}));class Ne{constructor(q=[]){this.content=[],this.indent=0,this&&(this.args=q)}indented(q){this.indent+=1,q(this),this.indent-=1}write(q){if("function"==typeof q)return q(this,{execution:"sync"}),void q(this,{execution:"async"});const K=q.split("\n").filter((q=>q)),z=Math.min(...K.map((q=>q.length-q.trimStart().length))),Y=K.map((q=>q.slice(z))).map((q=>" ".repeat(2*this.indent)+q));for(const Q of Y)this.content.push(Q)}compile(){return new Function(...this?.args,[...(this?.content??[""]).map((q=>` ${q}`))].join("\n"))}}const xe={major:4,minor:1,patch:12},Le=Y("$ZodType",((q,K)=>{var z;q??(q={}),q._zod.def=K,q._zod.bag=q._zod.bag||{},q._zod.version=xe;const Y=[...q._zod.def.checks??[]];q._zod.traits.has("$ZodCheck")&&Y.unshift(q);for(const Q of Y)for(const K of Q._zod.onattach)K(q);if(0===Y.length)(z=q._zod).deferred??(z.deferred=[]),q._zod.deferred?.push((()=>{q._zod.run=q._zod.parse}));else{const K=(q,K,z)=>{let Y,X=Et(q);for(const Z of K){if(Z._zod.def.when){if(!Z._zod.def.when(q))continue}else if(X)continue;const K=q.issues.length,J=Z._zod.check(q);if(J instanceof Promise&&!1===z?.async)throw new Q;if(Y||J instanceof Promise)Y=(Y??Promise.resolve()).then((async()=>{await J;q.issues.length!==K&&(X||(X=Et(q,K)))}));else{if(q.issues.length===K)continue;X||(X=Et(q,K))}}return Y?Y.then((()=>q)):q},z=(z,X,Z)=>{if(Et(z))return z.aborted=!0,z;const J=K(X,Y,Z);if(J instanceof Promise){if(!1===Z.async)throw new Q;return J.then((K=>q._zod.parse(K,Z)))}return q._zod.parse(J,Z)};q._zod.run=(X,Z)=>{if(Z.skipChecks)return q._zod.parse(X,Z);if("backward"===Z.direction){const K=q._zod.parse({value:X.value,issues:[]},{...Z,skipChecks:!0});return K instanceof Promise?K.then((q=>z(q,X,Z))):z(K,X,Z)}const J=q._zod.parse(X,Z);if(J instanceof Promise){if(!1===Z.async)throw new Q;return J.then((q=>K(q,Y,Z)))}return K(J,Y,Z)}}q["~standard"]={validate:K=>{try{const z=Nt(q,K);return z.success?{value:z.data}:{issues:z.error?.issues}}catch(z){return Lt(q,K).then((q=>q.success?{value:q.data}:{issues:q.error?.issues}))}},vendor:"zod",version:1}})),ke=Y("$ZodString",((q,K)=>{var z;Le.init(q,K),q._zod.pattern=[...q?._zod.bag?.patterns??[]].pop()??(z=q._zod.bag,new RegExp(`^${z?`[\\s\\S]{${z?.minimum??0},${z?.maximum??""}}`:"[\\s\\S]*"}$`)),q._zod.parse=(z,Y)=>{if(K.coerce)try{z.value=String(z.value)}catch(Y){}return"string"==typeof z.value||z.issues.push({expected:"string",code:"invalid_type",input:z.value,inst:q}),z}})),Be=Y("$ZodStringFormat",((q,K)=>{Ae.init(q,K),ke.init(q,K)})),Ue=Y("$ZodGUID",((q,K)=>{K.pattern??(K.pattern=Xt),Be.init(q,K)})),Fe=Y("$ZodUUID",((q,K)=>{if(K.version){const q={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[K.version];if(void 0===q)throw new Error(`Invalid UUID version: "${K.version}"`);K.pattern??(K.pattern=Zt(q))}else K.pattern??(K.pattern=Zt());Be.init(q,K)})),Ge=Y("$ZodEmail",((q,K)=>{K.pattern??(K.pattern=Jt),Be.init(q,K)})),je=Y("$ZodURL",((q,K)=>{Be.init(q,K),q._zod.check=z=>{try{const Y=z.value.trim(),Q=new URL(Y);return K.hostname&&(K.hostname.lastIndex=0,K.hostname.test(Q.hostname)||z.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:re.source,input:z.value,inst:q,continue:!K.abort})),K.protocol&&(K.protocol.lastIndex=0,K.protocol.test(Q.protocol.endsWith(":")?Q.protocol.slice(0,-1):Q.protocol)||z.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:K.protocol.source,input:z.value,inst:q,continue:!K.abort})),void(K.normalize?z.value=Q.href:z.value=Y)}catch(Y){z.issues.push({code:"invalid_format",format:"url",input:z.value,inst:q,continue:!K.abort})}}})),$e=Y("$ZodEmoji",((q,K)=>{K.pattern??(K.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Be.init(q,K)})),He=Y("$ZodNanoID",((q,K)=>{K.pattern??(K.pattern=Yt),Be.init(q,K)})),Ve=Y("$ZodCUID",((q,K)=>{K.pattern??(K.pattern=Vt),Be.init(q,K)})),We=Y("$ZodCUID2",((q,K)=>{K.pattern??(K.pattern=Wt),Be.init(q,K)})),qe=Y("$ZodULID",((q,K)=>{K.pattern??(K.pattern=qt),Be.init(q,K)})),Ke=Y("$ZodXID",((q,K)=>{K.pattern??(K.pattern=Kt),Be.init(q,K)})),ze=Y("$ZodKSUID",((q,K)=>{K.pattern??(K.pattern=zt),Be.init(q,K)})),Ye=Y("$ZodISODateTime",((q,K)=>{K.pattern??(K.pattern=function(q){const K=de({precision:q.precision}),z=["Z"];q.local&&z.push(""),q.offset&&z.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const Y=`${K}(?:${z.join("|")})`;return new RegExp(`^${he}T(?:${Y})$`)}(K)),Be.init(q,K)})),Qe=Y("$ZodISODate",((q,K)=>{K.pattern??(K.pattern=ce),Be.init(q,K)})),Xe=Y("$ZodISOTime",((q,K)=>{K.pattern??(K.pattern=new RegExp(`^${de(K)}$`)),Be.init(q,K)})),Ze=Y("$ZodISODuration",((q,K)=>{K.pattern??(K.pattern=Qt),Be.init(q,K)})),Je=Y("$ZodIPv4",((q,K)=>{K.pattern??(K.pattern=te),Be.init(q,K),q._zod.onattach.push((q=>{q._zod.bag.format="ipv4"}))})),ti=Y("$ZodIPv6",((q,K)=>{K.pattern??(K.pattern=ee),Be.init(q,K),q._zod.onattach.push((q=>{q._zod.bag.format="ipv6"})),q._zod.check=z=>{try{new URL(`http://[${z.value}]`)}catch{z.issues.push({code:"invalid_format",format:"ipv6",input:z.value,inst:q,continue:!K.abort})}}})),ei=Y("$ZodCIDRv4",((q,K)=>{K.pattern??(K.pattern=ie),Be.init(q,K)})),ii=Y("$ZodCIDRv6",((q,K)=>{K.pattern??(K.pattern=se),Be.init(q,K),q._zod.check=z=>{const Y=z.value.split("/");try{if(2!==Y.length)throw new Error;const[q,K]=Y;if(!K)throw new Error;const z=Number(K);if(`${z}`!==K)throw new Error;if(z<0||z>128)throw new Error;new URL(`http://[${q}]`)}catch{z.issues.push({code:"invalid_format",format:"cidrv6",input:z.value,inst:q,continue:!K.abort})}}}));function si(q){if(""===q)return!0;if(q.length%4!=0)return!1;try{return atob(q),!0}catch{return!1}}const ni=Y("$ZodBase64",((q,K)=>{K.pattern??(K.pattern=ne),Be.init(q,K),q._zod.onattach.push((q=>{q._zod.bag.contentEncoding="base64"})),q._zod.check=z=>{si(z.value)||z.issues.push({code:"invalid_format",format:"base64",input:z.value,inst:q,continue:!K.abort})}}));const ai=Y("$ZodBase64URL",((q,K)=>{K.pattern??(K.pattern=ae),Be.init(q,K),q._zod.onattach.push((q=>{q._zod.bag.contentEncoding="base64url"})),q._zod.check=z=>{(function(q){if(!ae.test(q))return!1;const K=q.replace(/[-_]/g,(q=>"-"===q?"+":"/"));return si(K.padEnd(4*Math.ceil(K.length/4),"="))})(z.value)||z.issues.push({code:"invalid_format",format:"base64url",input:z.value,inst:q,continue:!K.abort})}})),ri=Y("$ZodE164",((q,K)=>{K.pattern??(K.pattern=oe),Be.init(q,K)}));const oi=Y("$ZodJWT",((q,K)=>{Be.init(q,K),q._zod.check=z=>{(function(q,K=null){try{const z=q.split(".");if(3!==z.length)return!1;const[Y]=z;if(!Y)return!1;const Q=JSON.parse(atob(Y));return!("typ"in Q&&"JWT"!==Q?.typ||!Q.alg||K&&(!("alg"in Q)||Q.alg!==K))}catch{return!1}})(z.value,K.alg)||z.issues.push({code:"invalid_format",format:"jwt",input:z.value,inst:q,continue:!K.abort})}})),hi=Y("$ZodNumber",((q,K)=>{Le.init(q,K),q._zod.pattern=q._zod.bag.pattern??ue,q._zod.parse=(z,Y)=>{if(K.coerce)try{z.value=Number(z.value)}catch(Z){}const Q=z.value;if("number"==typeof Q&&!Number.isNaN(Q)&&Number.isFinite(Q))return z;const X="number"==typeof Q?Number.isNaN(Q)?"NaN":Number.isFinite(Q)?void 0:"Infinity":void 0;return z.issues.push({expected:"number",code:"invalid_type",input:Q,inst:q,...X?{received:X}:{}}),z}})),ci=Y("$ZodNumber",((q,K)=>{Ee.init(q,K),hi.init(q,K)})),di=Y("$ZodBoolean",((q,K)=>{Le.init(q,K),q._zod.pattern=fe,q._zod.parse=(z,Y)=>{if(K.coerce)try{z.value=Boolean(z.value)}catch(X){}const Q=z.value;return"boolean"==typeof Q||z.issues.push({expected:"boolean",code:"invalid_type",input:Q,inst:q}),z}})),li=Y("$ZodUnknown",((q,K)=>{Le.init(q,K),q._zod.parse=q=>q})),ui=Y("$ZodNever",((q,K)=>{Le.init(q,K),q._zod.parse=(K,z)=>(K.issues.push({expected:"never",code:"invalid_type",input:K.value,inst:q}),K)}));function fi(q,K,z){q.issues.length&&K.issues.push(...wt(z,q.issues)),K.value[z]=q.value}const bi=Y("$ZodArray",((q,K)=>{Le.init(q,K),q._zod.parse=(z,Y)=>{const Q=z.value;if(!Array.isArray(Q))return z.issues.push({expected:"array",code:"invalid_type",input:Q,inst:q}),z;z.value=Array(Q.length);const X=[];for(let q=0;qfi(K,z,q)))):fi(J,z,q)}return X.length?Promise.all(X).then((()=>z)):z}}));function pi(q,K,z,Y){q.issues.length&&K.issues.push(...wt(z,q.issues)),void 0===q.value?z in Y&&(K.value[z]=void 0):K.value[z]=q.value}function vi(q){const K=Object.keys(q.shape);for(const Q of K)if(!q.shape?.[Q]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${Q}": expected a Zod schema`);const z=(Y=q.shape,Object.keys(Y).filter((q=>"optional"===Y[q]._zod.optin&&"optional"===Y[q]._zod.optout)));var Y;return{...q,keys:K,keySet:new Set(K),numKeys:K.length,optionalKeys:new Set(z)}}function gi(q,K,z,Y,Q,X){const Z=[],J=Q.keySet,tt=Q.catchall._zod,et=tt.def.type;for(const it of Object.keys(K)){if(J.has(it))continue;if("never"===et){Z.push(it);continue}const Q=tt.run({value:K[it],issues:[]},Y);Q instanceof Promise?q.push(Q.then((q=>pi(q,z,it,K)))):pi(Q,z,it,K)}return Z.length&&z.issues.push({code:"unrecognized_keys",keys:Z,input:K,inst:X}),q.length?Promise.all(q).then((()=>z)):z}const mi=Y("$ZodObject",((q,K)=>{Le.init(q,K);if(!Object.getOwnPropertyDescriptor(K,"shape")?.get){const q=K.shape;Object.defineProperty(K,"shape",{get:()=>{const z={...q};return Object.defineProperty(K,"shape",{value:z}),z}})}const z=it((()=>vi(K)));rt(q._zod,"propValues",(()=>{const q=K.shape,z={};for(const K in q){const Y=q[K]._zod;if(Y.values){z[K]??(z[K]=new Set);for(const q of Y.values)z[K].add(q)}}return z}));const Y=lt,Q=K.catchall;let X;q._zod.parse=(K,Z)=>{X??(X=z.value);const J=K.value;if(!Y(J))return K.issues.push({expected:"object",code:"invalid_type",input:J,inst:q}),K;K.value={};const tt=[],et=X.shape;for(const q of X.keys){const z=et[q]._zod.run({value:J[q],issues:[]},Z);z instanceof Promise?tt.push(z.then((z=>pi(z,K,q,J)))):pi(z,K,q,J)}return Q?gi(tt,J,K,Z,z.value,q):tt.length?Promise.all(tt).then((()=>K)):K}})),yi=Y("$ZodObjectJIT",((q,K)=>{mi.init(q,K);const z=q._zod.parse,Y=it((()=>vi(K)));let Q;const X=lt,J=!Z.jitless,tt=J&&ut.value,et=K.catchall;let st;q._zod.parse=(Z,it)=>{st??(st=Y.value);const nt=Z.value;return X(nt)?J&&tt&&!1===it?.async&&!0!==it.jitless?(Q||(Q=(q=>{const K=new Ne(["shape","payload","ctx"]),z=Y.value,Q=q=>{const K=ct(q);return`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`};K.write("const input = payload.value;");const X=Object.create(null);let Z=0;for(const Y of z.keys)X[Y]="key_"+Z++;K.write("const newResult = {};");for(const Y of z.keys){const q=X[Y],z=ct(Y);K.write(`const ${q} = ${Q(Y)};`),K.write(`\n if (${q}.issues.length) {\n payload.issues = payload.issues.concat(${q}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${z}, ...iss.path] : [${z}]\n })));\n }\n \n \n if (${q}.value === undefined) {\n if (${z} in input) {\n newResult[${z}] = undefined;\n }\n } else {\n newResult[${z}] = ${q}.value;\n }\n \n `)}K.write("payload.value = newResult;"),K.write("return payload;");const J=K.compile();return(K,z)=>J(q,K,z)})(K.shape)),Z=Q(Z,it),et?gi([],nt,Z,it,st,q):Z):z(Z,it):(Z.issues.push({expected:"object",code:"invalid_type",input:nt,inst:q}),Z)}}));function _i(q,K,z,Y){for(const X of q)if(0===X.issues.length)return K.value=X.value,K;const Q=q.filter((q=>!Et(q)));return 1===Q.length?(K.value=Q[0].value,Q[0]):(K.issues.push({code:"invalid_union",input:K.value,inst:z,errors:q.map((q=>q.issues.map((q=>St(q,Y,J())))))}),K)}const Ei=Y("$ZodUnion",((q,K)=>{Le.init(q,K),rt(q._zod,"optin",(()=>K.options.some((q=>"optional"===q._zod.optin))?"optional":void 0)),rt(q._zod,"optout",(()=>K.options.some((q=>"optional"===q._zod.optout))?"optional":void 0)),rt(q._zod,"values",(()=>{if(K.options.every((q=>q._zod.values)))return new Set(K.options.flatMap((q=>Array.from(q._zod.values))))})),rt(q._zod,"pattern",(()=>{if(K.options.every((q=>q._zod.pattern))){const q=K.options.map((q=>q._zod.pattern));return new RegExp(`^(${q.map((q=>nt(q.source))).join("|")})$`)}}));const z=1===K.options.length,Y=K.options[0]._zod.run;q._zod.parse=(Q,X)=>{if(z)return Y(Q,X);let Z=!1;const J=[];for(const q of K.options){const K=q._zod.run({value:Q.value,issues:[]},X);if(K instanceof Promise)J.push(K),Z=!0;else{if(0===K.issues.length)return K;J.push(K)}}return Z?Promise.all(J).then((K=>_i(K,Q,q,X))):_i(J,Q,q,X)}})),wi=Y("$ZodIntersection",((q,K)=>{Le.init(q,K),q._zod.parse=(q,z)=>{const Y=q.value,Q=K.left._zod.run({value:Y,issues:[]},z),X=K.right._zod.run({value:Y,issues:[]},z);return Q instanceof Promise||X instanceof Promise?Promise.all([Q,X]).then((([K,z])=>Si(q,K,z))):Si(q,Q,X)}}));function Ti(q,K){if(q===K)return{valid:!0,data:q};if(q instanceof Date&&K instanceof Date&&+q==+K)return{valid:!0,data:q};if(ft(q)&&ft(K)){const z=Object.keys(K),Y=Object.keys(q).filter((q=>-1!==z.indexOf(q))),Q={...q,...K};for(const X of Y){const z=Ti(q[X],K[X]);if(!z.valid)return{valid:!1,mergeErrorPath:[X,...z.mergeErrorPath]};Q[X]=z.data}return{valid:!0,data:Q}}if(Array.isArray(q)&&Array.isArray(K)){if(q.length!==K.length)return{valid:!1,mergeErrorPath:[]};const z=[];for(let Y=0;Y{Le.init(q,K),q._zod.parse=(z,Y)=>{const Q=z.value;if(!ft(Q))return z.issues.push({expected:"record",code:"invalid_type",input:Q,inst:q}),z;const X=[];if(K.keyType._zod.values){const Z=K.keyType._zod.values;z.value={};for(const q of Z)if("string"==typeof q||"number"==typeof q||"symbol"==typeof q){const Z=K.valueType._zod.run({value:Q[q],issues:[]},Y);Z instanceof Promise?X.push(Z.then((K=>{K.issues.length&&z.issues.push(...wt(q,K.issues)),z.value[q]=K.value}))):(Z.issues.length&&z.issues.push(...wt(q,Z.issues)),z.value[q]=Z.value)}let J;for(const q in Q)Z.has(q)||(J=J??[],J.push(q));J&&J.length>0&&z.issues.push({code:"unrecognized_keys",input:Q,inst:q,keys:J})}else{z.value={};for(const Z of Reflect.ownKeys(Q)){if("__proto__"===Z)continue;const tt=K.keyType._zod.run({value:Z,issues:[]},Y);if(tt instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(tt.issues.length){z.issues.push({code:"invalid_key",origin:"record",issues:tt.issues.map((q=>St(q,Y,J()))),input:Z,path:[Z],inst:q}),z.value[tt.value]=tt.value;continue}const et=K.valueType._zod.run({value:Q[Z],issues:[]},Y);et instanceof Promise?X.push(et.then((q=>{q.issues.length&&z.issues.push(...wt(Z,q.issues)),z.value[tt.value]=q.value}))):(et.issues.length&&z.issues.push(...wt(Z,et.issues)),z.value[tt.value]=et.value)}}return X.length?Promise.all(X).then((()=>z)):z}}));const Ci=Y("$ZodEnum",((q,K)=>{Le.init(q,K);const z=function(q){const K=Object.values(q).filter((q=>"number"==typeof q));return Object.entries(q).filter((([q,z])=>-1===K.indexOf(+q))).map((([q,K])=>K))}(K.entries),Y=new Set(z);q._zod.values=Y,q._zod.pattern=new RegExp(`^(${z.filter((q=>pt.has(typeof q))).map((q=>"string"==typeof q?vt(q):q.toString())).join("|")})$`),q._zod.parse=(K,Q)=>{const X=K.value;return Y.has(X)||K.issues.push({code:"invalid_value",values:z,input:X,inst:q}),K}})),Oi=Y("$ZodTransform",((q,K)=>{Le.init(q,K),q._zod.parse=(z,Y)=>{if("backward"===Y.direction)throw new X(q.constructor.name);const Z=K.transform(z.value,z);if(Y.async){return(Z instanceof Promise?Z:Promise.resolve(Z)).then((q=>(z.value=q,z)))}if(Z instanceof Promise)throw new Q;return z.value=Z,z}}));function Ii(q,K){return q.issues.length&&void 0===K?{issues:[],value:void 0}:q}const Di=Y("$ZodOptional",((q,K)=>{Le.init(q,K),q._zod.optin="optional",q._zod.optout="optional",rt(q._zod,"values",(()=>K.innerType._zod.values?new Set([...K.innerType._zod.values,void 0]):void 0)),rt(q._zod,"pattern",(()=>{const q=K.innerType._zod.pattern;return q?new RegExp(`^(${nt(q.source)})?$`):void 0})),q._zod.parse=(q,z)=>{if("optional"===K.innerType._zod.optin){const Y=K.innerType._zod.run(q,z);return Y instanceof Promise?Y.then((K=>Ii(K,q.value))):Ii(Y,q.value)}return void 0===q.value?q:K.innerType._zod.run(q,z)}})),Ri=Y("$ZodNullable",((q,K)=>{Le.init(q,K),rt(q._zod,"optin",(()=>K.innerType._zod.optin)),rt(q._zod,"optout",(()=>K.innerType._zod.optout)),rt(q._zod,"pattern",(()=>{const q=K.innerType._zod.pattern;return q?new RegExp(`^(${nt(q.source)}|null)$`):void 0})),rt(q._zod,"values",(()=>K.innerType._zod.values?new Set([...K.innerType._zod.values,null]):void 0)),q._zod.parse=(q,z)=>null===q.value?q:K.innerType._zod.run(q,z)})),Pi=Y("$ZodDefault",((q,K)=>{Le.init(q,K),q._zod.optin="optional",rt(q._zod,"values",(()=>K.innerType._zod.values)),q._zod.parse=(q,z)=>{if("backward"===z.direction)return K.innerType._zod.run(q,z);if(void 0===q.value)return q.value=K.defaultValue,q;const Y=K.innerType._zod.run(q,z);return Y instanceof Promise?Y.then((q=>Mi(q,K))):Mi(Y,K)}}));function Mi(q,K){return void 0===q.value&&(q.value=K.defaultValue),q}const Ni=Y("$ZodPrefault",((q,K)=>{Le.init(q,K),q._zod.optin="optional",rt(q._zod,"values",(()=>K.innerType._zod.values)),q._zod.parse=(q,z)=>("backward"===z.direction||void 0===q.value&&(q.value=K.defaultValue),K.innerType._zod.run(q,z))})),xi=Y("$ZodNonOptional",((q,K)=>{Le.init(q,K),rt(q._zod,"values",(()=>{const q=K.innerType._zod.values;return q?new Set([...q].filter((q=>void 0!==q))):void 0})),q._zod.parse=(z,Y)=>{const Q=K.innerType._zod.run(z,Y);return Q instanceof Promise?Q.then((K=>Li(K,q))):Li(Q,q)}}));function Li(q,K){return q.issues.length||void 0!==q.value||q.issues.push({code:"invalid_type",expected:"nonoptional",input:q.value,inst:K}),q}const ki=Y("$ZodCatch",((q,K)=>{Le.init(q,K),rt(q._zod,"optin",(()=>K.innerType._zod.optin)),rt(q._zod,"optout",(()=>K.innerType._zod.optout)),rt(q._zod,"values",(()=>K.innerType._zod.values)),q._zod.parse=(q,z)=>{if("backward"===z.direction)return K.innerType._zod.run(q,z);const Y=K.innerType._zod.run(q,z);return Y instanceof Promise?Y.then((Y=>(q.value=Y.value,Y.issues.length&&(q.value=K.catchValue({...q,error:{issues:Y.issues.map((q=>St(q,z,J())))},input:q.value}),q.issues=[]),q))):(q.value=Y.value,Y.issues.length&&(q.value=K.catchValue({...q,error:{issues:Y.issues.map((q=>St(q,z,J())))},input:q.value}),q.issues=[]),q)}})),Bi=Y("$ZodPipe",((q,K)=>{Le.init(q,K),rt(q._zod,"values",(()=>K.in._zod.values)),rt(q._zod,"optin",(()=>K.in._zod.optin)),rt(q._zod,"optout",(()=>K.out._zod.optout)),rt(q._zod,"propValues",(()=>K.in._zod.propValues)),q._zod.parse=(q,z)=>{if("backward"===z.direction){const Y=K.out._zod.run(q,z);return Y instanceof Promise?Y.then((q=>Ui(q,K.in,z))):Ui(Y,K.in,z)}const Y=K.in._zod.run(q,z);return Y instanceof Promise?Y.then((q=>Ui(q,K.out,z))):Ui(Y,K.out,z)}}));function Ui(q,K,z){return q.issues.length?(q.aborted=!0,q):K._zod.run({value:q.value,issues:q.issues},z)}const Fi=Y("$ZodReadonly",((q,K)=>{Le.init(q,K),rt(q._zod,"propValues",(()=>K.innerType._zod.propValues)),rt(q._zod,"values",(()=>K.innerType._zod.values)),rt(q._zod,"optin",(()=>K.innerType._zod.optin)),rt(q._zod,"optout",(()=>K.innerType._zod.optout)),q._zod.parse=(q,z)=>{if("backward"===z.direction)return K.innerType._zod.run(q,z);const Y=K.innerType._zod.run(q,z);return Y instanceof Promise?Y.then(Gi):Gi(Y)}}));function Gi(q){return q.value=Object.freeze(q.value),q}const ji=Y("$ZodLazy",((q,K)=>{Le.init(q,K),rt(q._zod,"innerType",(()=>K.getter())),rt(q._zod,"pattern",(()=>q._zod.innerType._zod.pattern)),rt(q._zod,"propValues",(()=>q._zod.innerType._zod.propValues)),rt(q._zod,"optin",(()=>q._zod.innerType._zod.optin??void 0)),rt(q._zod,"optout",(()=>q._zod.innerType._zod.optout??void 0)),q._zod.parse=(K,z)=>q._zod.innerType._zod.run(K,z)})),$i=Y("$ZodCustom",((q,K)=>{ve.init(q,K),Le.init(q,K),q._zod.parse=(q,K)=>q,q._zod.check=z=>{const Y=z.value,Q=K.fn(Y);if(Q instanceof Promise)return Q.then((K=>Hi(K,z,Y,q)));Hi(Q,z,Y,q)}}));function Hi(q,K,z,Y){if(!q){const q={code:"custom",input:z,inst:Y,path:[...Y._zod.def.path??[]],continue:!Y._zod.def.abort};Y._zod.def.params&&(q.params=Y._zod.def.params),K.issues.push(Ct(q))}}const Vi=()=>{const q={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function K(K){return q[K]??null}const z={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return q=>{switch(q.code){case"invalid_type":return`Invalid input: expected ${q.expected}, received ${(q=>{const K=typeof q;switch(K){case"number":return Number.isNaN(q)?"NaN":"number";case"object":if(Array.isArray(q))return"array";if(null===q)return"null";if(Object.getPrototypeOf(q)!==Object.prototype&&q.constructor)return q.constructor.name}return K})(q.input)}`;case"invalid_value":return 1===q.values.length?`Invalid input: expected ${yt(q.values[0])}`:`Invalid option: expected one of ${tt(q.values,"|")}`;case"too_big":{const z=q.inclusive?"<=":"<",Y=K(q.origin);return Y?`Too big: expected ${q.origin??"value"} to have ${z}${q.maximum.toString()} ${Y.unit??"elements"}`:`Too big: expected ${q.origin??"value"} to be ${z}${q.maximum.toString()}`}case"too_small":{const z=q.inclusive?">=":">",Y=K(q.origin);return Y?`Too small: expected ${q.origin} to have ${z}${q.minimum.toString()} ${Y.unit}`:`Too small: expected ${q.origin} to be ${z}${q.minimum.toString()}`}case"invalid_format":{const K=q;return"starts_with"===K.format?`Invalid string: must start with "${K.prefix}"`:"ends_with"===K.format?`Invalid string: must end with "${K.suffix}"`:"includes"===K.format?`Invalid string: must include "${K.includes}"`:"regex"===K.format?`Invalid string: must match pattern ${K.pattern}`:`Invalid ${z[K.format]??q.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${q.divisor}`;case"unrecognized_keys":return`Unrecognized key${q.keys.length>1?"s":""}: ${tt(q.keys,", ")}`;case"invalid_key":return`Invalid key in ${q.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${q.origin}`;default:return"Invalid input"}}};Symbol("ZodOutput"),Symbol("ZodInput");class Wi{constructor(){this._map=new WeakMap,this._idmap=new Map}add(q,...K){const z=K[0];if(this._map.set(q,z),z&&"object"==typeof z&&"id"in z){if(this._idmap.has(z.id))throw new Error(`ID ${z.id} already exists in the registry`);this._idmap.set(z.id,q)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(q){const K=this._map.get(q);return K&&"object"==typeof K&&"id"in K&&this._idmap.delete(K.id),this._map.delete(q),this}get(q){const K=q._zod.parent;if(K){const z={...this.get(K)??{}};delete z.id;const Y={...z,...this._map.get(q)};return Object.keys(Y).length?Y:void 0}return this._map.get(q)}has(q){return this._map.has(q)}}function qi(){return new Wi}const Ki=qi();function zi(q,K){return new q({type:"string",format:"guid",check:"string_format",abort:!1,...mt(K)})}function Yi(q,K){return new me({check:"less_than",...mt(K),value:q,inclusive:!1})}function Qi(q,K){return new me({check:"less_than",...mt(K),value:q,inclusive:!0})}function Xi(q,K){return new ye({check:"greater_than",...mt(K),value:q,inclusive:!1})}function Zi(q,K){return new ye({check:"greater_than",...mt(K),value:q,inclusive:!0})}function Ji(q,K){return new _e({check:"multiple_of",...mt(K),value:q})}function ts(q,K){return new we({check:"max_length",...mt(K),maximum:q})}function es(q,K){return new Te({check:"min_length",...mt(K),minimum:q})}function is(q,K){return new Se({check:"length_equals",...mt(K),length:q})}function ss(q){return new Me({check:"overwrite",tx:q})}function ns(q){const K=function(q,K){const z=new ve({check:"custom",...mt(K)});return z._zod.check=q,z}((z=>(z.addIssue=q=>{if("string"==typeof q)z.issues.push(Ct(q,z.value,K._zod.def));else{const Y=q;Y.fatal&&(Y.continue=!1),Y.code??(Y.code="custom"),Y.input??(Y.input=z.value),Y.inst??(Y.inst=K),Y.continue??(Y.continue=!K._zod.def.abort),z.issues.push(Ct(Y))}},q(z.value,z))));return K}const as=Y("ZodISODateTime",((q,K)=>{Ye.init(q,K),Ps.init(q,K)}));function rs(q){return function(q,K){return new q({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...mt(K)})}(as,q)}const os=Y("ZodISODate",((q,K)=>{Qe.init(q,K),Ps.init(q,K)}));function hs(q){return function(q,K){return new q({type:"string",format:"date",check:"string_format",...mt(K)})}(os,q)}const cs=Y("ZodISOTime",((q,K)=>{Xe.init(q,K),Ps.init(q,K)}));function ds(q){return function(q,K){return new q({type:"string",format:"time",check:"string_format",precision:null,...mt(K)})}(cs,q)}const ls=Y("ZodISODuration",((q,K)=>{Ze.init(q,K),Ps.init(q,K)}));function us(q){return function(q,K){return new q({type:"string",format:"duration",check:"string_format",...mt(K)})}(ls,q)}const fs=(q,K)=>{It.init(q,K),q.name="ZodError",Object.defineProperties(q,{format:{value:K=>function(q,K=(q=>q.message)){const z={_errors:[]},Y=q=>{for(const Q of q.issues)if("invalid_union"===Q.code&&Q.errors.length)Q.errors.map((q=>Y({issues:q})));else if("invalid_key"===Q.code)Y({issues:Q.issues});else if("invalid_element"===Q.code)Y({issues:Q.issues});else if(0===Q.path.length)z._errors.push(K(Q));else{let q=z,Y=0;for(;Yfunction(q,K=(q=>q.message)){const z={},Y=[];for(const Q of q.issues)Q.path.length>0?(z[Q.path[0]]=z[Q.path[0]]||[],z[Q.path[0]].push(K(Q))):Y.push(K(Q));return{formErrors:Y,fieldErrors:z}}(q,K)},addIssue:{value:K=>{q.issues.push(K),q.message=JSON.stringify(q.issues,et,2)}},addIssues:{value:K=>{q.issues.push(...K),q.message=JSON.stringify(q.issues,et,2)}},isEmpty:{get:()=>0===q.issues.length}})},bs=(Y("ZodError",fs),Y("ZodError",fs,{Parent:Error})),ps=Rt(bs),vs=Pt(bs),gs=Mt(bs),ms=xt(bs),ys=kt(bs),_s=Bt(bs),Es=Ut(bs),ws=Ft(bs),Ts=Gt(bs),Ss=jt(bs),As=$t(bs),Cs=Ht(bs),Os=Y("ZodType",((q,K)=>(Le.init(q,K),q.def=K,q.type=K.type,Object.defineProperty(q,"_def",{value:K}),q.check=(...z)=>q.clone(ht(K,{checks:[...K.checks??[],...z.map((q=>"function"==typeof q?{_zod:{check:q,def:{check:"custom"},onattach:[]}}:q))]})),q.clone=(K,z)=>gt(q,K,z),q.brand=()=>q,q.register=(K,z)=>(K.add(q,z),q),q.parse=(K,z)=>ps(q,K,z,{callee:q.parse}),q.safeParse=(K,z)=>gs(q,K,z),q.parseAsync=async(K,z)=>vs(q,K,z,{callee:q.parseAsync}),q.safeParseAsync=async(K,z)=>ms(q,K,z),q.spa=q.safeParseAsync,q.encode=(K,z)=>ys(q,K,z),q.decode=(K,z)=>_s(q,K,z),q.encodeAsync=async(K,z)=>Es(q,K,z),q.decodeAsync=async(K,z)=>ws(q,K,z),q.safeEncode=(K,z)=>Ts(q,K,z),q.safeDecode=(K,z)=>Ss(q,K,z),q.safeEncodeAsync=async(K,z)=>As(q,K,z),q.safeDecodeAsync=async(K,z)=>Cs(q,K,z),q.refine=(K,z)=>q.check(function(q,K={}){return function(q,K,z){return new q({type:"custom",check:"custom",fn:K,...mt(z)})}(xn,q,K)}(K,z)),q.superRefine=K=>q.check(ns(K)),q.overwrite=K=>q.check(ss(K)),q.optional=()=>wn(q),q.nullable=()=>Sn(q),q.nullish=()=>wn(Sn(q)),q.nonoptional=K=>function(q,K){return new On({type:"nonoptional",innerType:q,...mt(K)})}(q,K),q.array=()=>cn(q),q.or=K=>fn([q,K]),q.and=K=>new bn({type:"intersection",left:q,right:K}),q.transform=K=>Rn(q,_n(K)),q.default=K=>{return z=K,new An({type:"default",innerType:q,get defaultValue(){return"function"==typeof z?z():bt(z)}});var z},q.prefault=K=>{return z=K,new Cn({type:"prefault",innerType:q,get defaultValue(){return"function"==typeof z?z():bt(z)}});var z},q.catch=K=>{return new In({type:"catch",innerType:q,catchValue:"function"==typeof(z=K)?z:()=>z});var z},q.pipe=K=>Rn(q,K),q.readonly=()=>new Pn({type:"readonly",innerType:q}),q.describe=K=>{const z=q.clone();return Ki.add(z,{description:K}),z},Object.defineProperty(q,"description",{get:()=>Ki.get(q)?.description,configurable:!0}),q.meta=(...K)=>{if(0===K.length)return Ki.get(q);const z=q.clone();return Ki.add(z,K[0]),z},q.isOptional=()=>q.safeParse(void 0).success,q.isNullable=()=>q.safeParse(null).success,q))),Is=Y("_ZodString",((q,K)=>{ke.init(q,K),Os.init(q,K);const z=q._zod.bag;q.format=z.format??null,q.minLength=z.minimum??null,q.maxLength=z.maximum??null,q.regex=(...K)=>q.check(function(q,K){return new Ce({check:"string_format",format:"regex",...mt(K),pattern:q})}(...K)),q.includes=(...K)=>q.check(function(q,K){return new De({check:"string_format",format:"includes",...mt(K),includes:q})}(...K)),q.startsWith=(...K)=>q.check(function(q,K){return new Re({check:"string_format",format:"starts_with",...mt(K),prefix:q})}(...K)),q.endsWith=(...K)=>q.check(function(q,K){return new Pe({check:"string_format",format:"ends_with",...mt(K),suffix:q})}(...K)),q.min=(...K)=>q.check(es(...K)),q.max=(...K)=>q.check(ts(...K)),q.length=(...K)=>q.check(is(...K)),q.nonempty=(...K)=>q.check(es(1,...K)),q.lowercase=K=>q.check(function(q){return new Oe({check:"string_format",format:"lowercase",...mt(q)})}(K)),q.uppercase=K=>q.check(function(q){return new Ie({check:"string_format",format:"uppercase",...mt(q)})}(K)),q.trim=()=>q.check(ss((q=>q.trim()))),q.normalize=(...K)=>q.check(function(q){return ss((K=>K.normalize(q)))}(...K)),q.toLowerCase=()=>q.check(ss((q=>q.toLowerCase()))),q.toUpperCase=()=>q.check(ss((q=>q.toUpperCase())))})),Ds=Y("ZodString",((q,K)=>{ke.init(q,K),Is.init(q,K),q.email=K=>q.check(function(q,K){return new q({type:"string",format:"email",check:"string_format",abort:!1,...mt(K)})}(Ms,K)),q.url=K=>q.check(function(q,K){return new q({type:"string",format:"url",check:"string_format",abort:!1,...mt(K)})}(Ls,K)),q.jwt=K=>q.check(function(q,K){return new q({type:"string",format:"jwt",check:"string_format",abort:!1,...mt(K)})}(Qs,K)),q.emoji=K=>q.check(function(q,K){return new q({type:"string",format:"emoji",check:"string_format",abort:!1,...mt(K)})}(ks,K)),q.guid=K=>q.check(zi(Ns,K)),q.uuid=K=>q.check(function(q,K){return new q({type:"string",format:"uuid",check:"string_format",abort:!1,...mt(K)})}(xs,K)),q.uuidv4=K=>q.check(function(q,K){return new q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...mt(K)})}(xs,K)),q.uuidv6=K=>q.check(function(q,K){return new q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...mt(K)})}(xs,K)),q.uuidv7=K=>q.check(function(q,K){return new q({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...mt(K)})}(xs,K)),q.nanoid=K=>q.check(function(q,K){return new q({type:"string",format:"nanoid",check:"string_format",abort:!1,...mt(K)})}(Bs,K)),q.guid=K=>q.check(zi(Ns,K)),q.cuid=K=>q.check(function(q,K){return new q({type:"string",format:"cuid",check:"string_format",abort:!1,...mt(K)})}(Us,K)),q.cuid2=K=>q.check(function(q,K){return new q({type:"string",format:"cuid2",check:"string_format",abort:!1,...mt(K)})}(Fs,K)),q.ulid=K=>q.check(function(q,K){return new q({type:"string",format:"ulid",check:"string_format",abort:!1,...mt(K)})}(Gs,K)),q.base64=K=>q.check(function(q,K){return new q({type:"string",format:"base64",check:"string_format",abort:!1,...mt(K)})}(Ks,K)),q.base64url=K=>q.check(function(q,K){return new q({type:"string",format:"base64url",check:"string_format",abort:!1,...mt(K)})}(zs,K)),q.xid=K=>q.check(function(q,K){return new q({type:"string",format:"xid",check:"string_format",abort:!1,...mt(K)})}(js,K)),q.ksuid=K=>q.check(function(q,K){return new q({type:"string",format:"ksuid",check:"string_format",abort:!1,...mt(K)})}($s,K)),q.ipv4=K=>q.check(function(q,K){return new q({type:"string",format:"ipv4",check:"string_format",abort:!1,...mt(K)})}(Hs,K)),q.ipv6=K=>q.check(function(q,K){return new q({type:"string",format:"ipv6",check:"string_format",abort:!1,...mt(K)})}(Vs,K)),q.cidrv4=K=>q.check(function(q,K){return new q({type:"string",format:"cidrv4",check:"string_format",abort:!1,...mt(K)})}(Ws,K)),q.cidrv6=K=>q.check(function(q,K){return new q({type:"string",format:"cidrv6",check:"string_format",abort:!1,...mt(K)})}(qs,K)),q.e164=K=>q.check(function(q,K){return new q({type:"string",format:"e164",check:"string_format",abort:!1,...mt(K)})}(Ys,K)),q.datetime=K=>q.check(rs(K)),q.date=K=>q.check(hs(K)),q.time=K=>q.check(ds(K)),q.duration=K=>q.check(us(K))}));function Rs(q){return function(q,K){return new q({type:"string",...mt(K)})}(Ds,q)}const Ps=Y("ZodStringFormat",((q,K)=>{Be.init(q,K),Is.init(q,K)})),Ms=Y("ZodEmail",((q,K)=>{Ge.init(q,K),Ps.init(q,K)}));const Ns=Y("ZodGUID",((q,K)=>{Ue.init(q,K),Ps.init(q,K)}));const xs=Y("ZodUUID",((q,K)=>{Fe.init(q,K),Ps.init(q,K)}));const Ls=Y("ZodURL",((q,K)=>{je.init(q,K),Ps.init(q,K)}));const ks=Y("ZodEmoji",((q,K)=>{$e.init(q,K),Ps.init(q,K)}));const Bs=Y("ZodNanoID",((q,K)=>{He.init(q,K),Ps.init(q,K)}));const Us=Y("ZodCUID",((q,K)=>{Ve.init(q,K),Ps.init(q,K)}));const Fs=Y("ZodCUID2",((q,K)=>{We.init(q,K),Ps.init(q,K)}));const Gs=Y("ZodULID",((q,K)=>{qe.init(q,K),Ps.init(q,K)}));const js=Y("ZodXID",((q,K)=>{Ke.init(q,K),Ps.init(q,K)}));const $s=Y("ZodKSUID",((q,K)=>{ze.init(q,K),Ps.init(q,K)}));const Hs=Y("ZodIPv4",((q,K)=>{Je.init(q,K),Ps.init(q,K)}));const Vs=Y("ZodIPv6",((q,K)=>{ti.init(q,K),Ps.init(q,K)}));const Ws=Y("ZodCIDRv4",((q,K)=>{ei.init(q,K),Ps.init(q,K)}));const qs=Y("ZodCIDRv6",((q,K)=>{ii.init(q,K),Ps.init(q,K)}));const Ks=Y("ZodBase64",((q,K)=>{ni.init(q,K),Ps.init(q,K)}));const zs=Y("ZodBase64URL",((q,K)=>{ai.init(q,K),Ps.init(q,K)}));const Ys=Y("ZodE164",((q,K)=>{ri.init(q,K),Ps.init(q,K)}));const Qs=Y("ZodJWT",((q,K)=>{oi.init(q,K),Ps.init(q,K)}));const Xs=Y("ZodNumber",((q,K)=>{hi.init(q,K),Os.init(q,K),q.gt=(K,z)=>q.check(Xi(K,z)),q.gte=(K,z)=>q.check(Zi(K,z)),q.min=(K,z)=>q.check(Zi(K,z)),q.lt=(K,z)=>q.check(Yi(K,z)),q.lte=(K,z)=>q.check(Qi(K,z)),q.max=(K,z)=>q.check(Qi(K,z)),q.int=K=>q.check(tn(K)),q.safe=K=>q.check(tn(K)),q.positive=K=>q.check(Xi(0,K)),q.nonnegative=K=>q.check(Zi(0,K)),q.negative=K=>q.check(Yi(0,K)),q.nonpositive=K=>q.check(Qi(0,K)),q.multipleOf=(K,z)=>q.check(Ji(K,z)),q.step=(K,z)=>q.check(Ji(K,z)),q.finite=()=>q;const z=q._zod.bag;q.minValue=Math.max(z.minimum??Number.NEGATIVE_INFINITY,z.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,q.maxValue=Math.min(z.maximum??Number.POSITIVE_INFINITY,z.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,q.isInt=(z.format??"").includes("int")||Number.isSafeInteger(z.multipleOf??.5),q.isFinite=!0,q.format=z.format??null}));function Zs(q){return function(q,K){return new q({type:"number",checks:[],...mt(K)})}(Xs,q)}const Js=Y("ZodNumberFormat",((q,K)=>{ci.init(q,K),Xs.init(q,K)}));function tn(q){return function(q,K){return new q({type:"number",check:"number_format",abort:!1,format:"safeint",...mt(K)})}(Js,q)}const en=Y("ZodBoolean",((q,K)=>{di.init(q,K),Os.init(q,K)}));function sn(q){return function(q,K){return new q({type:"boolean",...mt(K)})}(en,q)}const nn=Y("ZodUnknown",((q,K)=>{li.init(q,K),Os.init(q,K)}));function an(){return function(q){return new q({type:"unknown"})}(nn)}const rn=Y("ZodNever",((q,K)=>{ui.init(q,K),Os.init(q,K)}));function on(q){return function(q,K){return new q({type:"never",...mt(K)})}(rn,q)}const hn=Y("ZodArray",((q,K)=>{bi.init(q,K),Os.init(q,K),q.element=K.element,q.min=(K,z)=>q.check(es(K,z)),q.nonempty=K=>q.check(es(1,K)),q.max=(K,z)=>q.check(ts(K,z)),q.length=(K,z)=>q.check(is(K,z)),q.unwrap=()=>q.element}));function cn(q,K){return function(q,K,z){return new q({type:"array",element:K,...mt(z)})}(hn,q,K)}const dn=Y("ZodObject",((q,K)=>{yi.init(q,K),Os.init(q,K),rt(q,"shape",(()=>K.shape)),q.keyof=()=>mn(Object.keys(q._zod.def.shape)),q.catchall=K=>q.clone({...q._zod.def,catchall:K}),q.passthrough=()=>q.clone({...q._zod.def,catchall:an()}),q.loose=()=>q.clone({...q._zod.def,catchall:an()}),q.strict=()=>q.clone({...q._zod.def,catchall:on()}),q.strip=()=>q.clone({...q._zod.def,catchall:void 0}),q.extend=K=>function(q,K){if(!ft(K))throw new Error("Invalid input to extend: expected a plain object");const z=q._zod.def.checks;if(z&&z.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const Y=ht(q._zod.def,{get shape(){const z={...q._zod.def.shape,...K};return ot(this,"shape",z),z},checks:[]});return gt(q,Y)}(q,K),q.safeExtend=K=>function(q,K){if(!ft(K))throw new Error("Invalid input to safeExtend: expected a plain object");const z={...q._zod.def,get shape(){const z={...q._zod.def.shape,...K};return ot(this,"shape",z),z},checks:q._zod.def.checks};return gt(q,z)}(q,K),q.merge=K=>function(q,K){const z=ht(q._zod.def,{get shape(){const z={...q._zod.def.shape,...K._zod.def.shape};return ot(this,"shape",z),z},get catchall(){return K._zod.def.catchall},checks:[]});return gt(q,z)}(q,K),q.pick=K=>function(q,K){const z=q._zod.def;return gt(q,ht(q._zod.def,{get shape(){const q={};for(const Y in K){if(!(Y in z.shape))throw new Error(`Unrecognized key: "${Y}"`);K[Y]&&(q[Y]=z.shape[Y])}return ot(this,"shape",q),q},checks:[]}))}(q,K),q.omit=K=>function(q,K){const z=q._zod.def,Y=ht(q._zod.def,{get shape(){const Y={...q._zod.def.shape};for(const q in K){if(!(q in z.shape))throw new Error(`Unrecognized key: "${q}"`);K[q]&&delete Y[q]}return ot(this,"shape",Y),Y},checks:[]});return gt(q,Y)}(q,K),q.partial=(...K)=>function(q,K,z){const Y=ht(K._zod.def,{get shape(){const Y=K._zod.def.shape,Q={...Y};if(z)for(const K in z){if(!(K in Y))throw new Error(`Unrecognized key: "${K}"`);z[K]&&(Q[K]=q?new q({type:"optional",innerType:Y[K]}):Y[K])}else for(const K in Y)Q[K]=q?new q({type:"optional",innerType:Y[K]}):Y[K];return ot(this,"shape",Q),Q},checks:[]});return gt(K,Y)}(En,q,K[0]),q.required=(...K)=>function(q,K,z){const Y=ht(K._zod.def,{get shape(){const Y=K._zod.def.shape,Q={...Y};if(z)for(const K in z){if(!(K in Q))throw new Error(`Unrecognized key: "${K}"`);z[K]&&(Q[K]=new q({type:"nonoptional",innerType:Y[K]}))}else for(const K in Y)Q[K]=new q({type:"nonoptional",innerType:Y[K]});return ot(this,"shape",Q),Q},checks:[]});return gt(K,Y)}(On,q,K[0])}));function ln(q,K){const z={type:"object",shape:q??{},...mt(K)};return new dn(z)}const un=Y("ZodUnion",((q,K)=>{Ei.init(q,K),Os.init(q,K),q.options=K.options}));function fn(q,K){return new un({type:"union",options:q,...mt(K)})}const bn=Y("ZodIntersection",((q,K)=>{wi.init(q,K),Os.init(q,K)}));const pn=Y("ZodRecord",((q,K)=>{Ai.init(q,K),Os.init(q,K),q.keyType=K.keyType,q.valueType=K.valueType}));function vn(q,K,z){return new pn({type:"record",keyType:q,valueType:K,...mt(z)})}const gn=Y("ZodEnum",((q,K)=>{Ci.init(q,K),Os.init(q,K),q.enum=K.entries,q.options=Object.values(K.entries);const z=new Set(Object.keys(K.entries));q.extract=(q,Y)=>{const Q={};for(const X of q){if(!z.has(X))throw new Error(`Key ${X} not found in enum`);Q[X]=K.entries[X]}return new gn({...K,checks:[],...mt(Y),entries:Q})},q.exclude=(q,Y)=>{const Q={...K.entries};for(const K of q){if(!z.has(K))throw new Error(`Key ${K} not found in enum`);delete Q[K]}return new gn({...K,checks:[],...mt(Y),entries:Q})}}));function mn(q,K){const z=Array.isArray(q)?Object.fromEntries(q.map((q=>[q,q]))):q;return new gn({type:"enum",entries:z,...mt(K)})}const yn=Y("ZodTransform",((q,K)=>{Oi.init(q,K),Os.init(q,K),q._zod.parse=(z,Y)=>{if("backward"===Y.direction)throw new X(q.constructor.name);z.addIssue=Y=>{if("string"==typeof Y)z.issues.push(Ct(Y,z.value,K));else{const K=Y;K.fatal&&(K.continue=!1),K.code??(K.code="custom"),K.input??(K.input=z.value),K.inst??(K.inst=q),z.issues.push(Ct(K))}};const Q=K.transform(z.value,z);return Q instanceof Promise?Q.then((q=>(z.value=q,z))):(z.value=Q,z)}}));function _n(q){return new yn({type:"transform",transform:q})}const En=Y("ZodOptional",((q,K)=>{Di.init(q,K),Os.init(q,K),q.unwrap=()=>q._zod.def.innerType}));function wn(q){return new En({type:"optional",innerType:q})}const Tn=Y("ZodNullable",((q,K)=>{Ri.init(q,K),Os.init(q,K),q.unwrap=()=>q._zod.def.innerType}));function Sn(q){return new Tn({type:"nullable",innerType:q})}const An=Y("ZodDefault",((q,K)=>{Pi.init(q,K),Os.init(q,K),q.unwrap=()=>q._zod.def.innerType,q.removeDefault=q.unwrap}));const Cn=Y("ZodPrefault",((q,K)=>{Ni.init(q,K),Os.init(q,K),q.unwrap=()=>q._zod.def.innerType}));const On=Y("ZodNonOptional",((q,K)=>{xi.init(q,K),Os.init(q,K),q.unwrap=()=>q._zod.def.innerType}));const In=Y("ZodCatch",((q,K)=>{ki.init(q,K),Os.init(q,K),q.unwrap=()=>q._zod.def.innerType,q.removeCatch=q.unwrap}));const Dn=Y("ZodPipe",((q,K)=>{Bi.init(q,K),Os.init(q,K),q.in=K.in,q.out=K.out}));function Rn(q,K){return new Dn({type:"pipe",in:q,out:K})}const Pn=Y("ZodReadonly",((q,K)=>{Fi.init(q,K),Os.init(q,K),q.unwrap=()=>q._zod.def.innerType}));const Mn=Y("ZodLazy",((q,K)=>{ji.init(q,K),Os.init(q,K),q.unwrap=()=>q._zod.def.getter()}));function Nn(q){return new Mn({type:"lazy",getter:q})}const xn=Y("ZodCustom",((q,K)=>{$i.init(q,K),Os.init(q,K)}));var Ln;Ln||(Ln={}),J({localeError:Vi()})},6030:q=>{"use strict";q.exports=JSON.parse('{"normal-forest-1-pet-collection":{"data":{"name":"normal-forest-1-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":1}}]},"metadata":{"location":"forest"}},"normal-forest-2-pet-collection":{"data":{"name":"normal-forest-2-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":2}}]},"metadata":{"location":"forest"}},"normal-forest-3-pet-collection":{"data":{"name":"normal-forest-3-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":3}}]},"metadata":{"location":"forest"}},"normal-forest-4-pet-collection":{"data":{"name":"normal-forest-4-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":4}}]},"metadata":{"location":"forest"}},"normal-shiverchill-5-pet-collection":{"data":{"name":"normal-shiverchill-5-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":4}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-6-pet-collection":{"data":{"name":"normal-shiverchill-6-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":5}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-7-pet-collection":{"data":{"name":"normal-shiverchill-7-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":6}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-8-pet-collection":{"data":{"name":"normal-shiverchill-8-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":7}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-9-pet-collection":{"data":{"name":"normal-shiverchill-9-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":9}}]},"metadata":{"location":"shiverchill"}},"normal-bonfire-spire-10-pet-collection":{"data":{"name":"normal-bonfire-spire-10-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":9}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-11-pet-collection":{"data":{"name":"normal-bonfire-spire-11-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":10}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-12-pet-collection":{"data":{"name":"normal-bonfire-spire-12-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":11}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-13-pet-collection":{"data":{"name":"normal-bonfire-spire-13-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":12}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-14-pet-collection":{"data":{"name":"normal-bonfire-spire-14-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":14}}]},"metadata":{"location":"bonfire-spire"}},"normal-shipwreck-shore-15-pet-collection":{"data":{"name":"normal-shipwreck-shore-15-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":14}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-16-pet-collection":{"data":{"name":"normal-shipwreck-shore-16-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":15}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-17-pet-collection":{"data":{"name":"normal-shipwreck-shore-17-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":16}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-18-pet-collection":{"data":{"name":"normal-shipwreck-shore-18-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":17}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-19-pet-collection":{"data":{"name":"normal-shipwreck-shore-19-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":19}}]},"metadata":{"location":"shipwreck-shore"}},"normal-skywatch-20-pet-collection":{"data":{"name":"normal-skywatch-20-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":19}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-21-pet-collection":{"data":{"name":"normal-skywatch-21-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":20}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-22-pet-collection":{"data":{"name":"normal-skywatch-22-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":21}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-23-pet-collection":{"data":{"name":"normal-skywatch-23-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":22}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-24-pet-collection":{"data":{"name":"normal-skywatch-24-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":25}}]},"metadata":{"location":"skywatch"}},"normal-academy-25-pet-collection":{"data":{"name":"normal-academy-25-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":27}}]},"metadata":{"location":"academy"}},"normal-academy-26-pet-collection":{"data":{"name":"normal-academy-26-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":30}}]},"metadata":{"location":"academy"}},"normal-academy-27-pet-collection":{"data":{"name":"normal-academy-27-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":35}}]},"metadata":{"location":"academy"}},"normal-optional-wizard-28-pet-collection":{"data":{"name":"normal-optional-wizard-28-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":10}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-29-pet-collection":{"data":{"name":"normal-optional-wizard-29-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":20}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-30-pet-collection":{"data":{"name":"normal-optional-wizard-30-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":30}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-31-pet-collection":{"data":{"name":"normal-optional-wizard-31-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":40}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-32-pet-collection":{"data":{"name":"normal-optional-wizard-32-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":50}}]},"metadata":{"location":"optional-wizard"}},"hard-world-map-1-pet-collection":{"data":{"name":"hard-world-map-1-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":35}}]},"metadata":{"location":"world-map"}},"hard-forest-2-pet-collection":{"data":{"name":"hard-forest-2-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":37}}]},"metadata":{"location":"forest"}},"hard-forest-3-pet-collection":{"data":{"name":"hard-forest-3-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":39}}]},"metadata":{"location":"forest"}},"hard-forest-4-pet-collection":{"data":{"name":"hard-forest-4-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":42}}]},"metadata":{"location":"forest"}},"hard-forest-5-pet-collection":{"data":{"name":"hard-forest-5-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":46}}]},"metadata":{"location":"forest"}},"hard-shiverchill-6-pet-collection":{"data":{"name":"hard-shiverchill-6-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":48}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-7-pet-collection":{"data":{"name":"hard-shiverchill-7-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":50}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-8-pet-collection":{"data":{"name":"hard-shiverchill-8-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":52}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-9-pet-collection":{"data":{"name":"hard-shiverchill-9-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":55}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-10-pet-collection":{"data":{"name":"hard-shiverchill-10-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":59}}]},"metadata":{"location":"shiverchill"}},"hard-bonfire-spire-11-pet-collection":{"data":{"name":"hard-bonfire-spire-11-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":61}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-12-pet-collection":{"data":{"name":"hard-bonfire-spire-12-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":63}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-13-pet-collection":{"data":{"name":"hard-bonfire-spire-13-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":65}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-14-pet-collection":{"data":{"name":"hard-bonfire-spire-14-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":68}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-15-pet-collection":{"data":{"name":"hard-bonfire-spire-15-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":72}}]},"metadata":{"location":"bonfire-spire"}},"hard-shipwreck-shore-16-pet-collection":{"data":{"name":"hard-shipwreck-shore-16-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":74}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-17-pet-collection":{"data":{"name":"hard-shipwreck-shore-17-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":76}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-18-pet-collection":{"data":{"name":"hard-shipwreck-shore-18-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":78}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-19-pet-collection":{"data":{"name":"hard-shipwreck-shore-19-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":81}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-20-pet-collection":{"data":{"name":"hard-shipwreck-shore-20-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":85}}]},"metadata":{"location":"shipwreck-shore"}},"hard-skywatch-21-pet-collection":{"data":{"name":"hard-skywatch-21-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":87}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-22-pet-collection":{"data":{"name":"hard-skywatch-22-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":89}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-23-pet-collection":{"data":{"name":"hard-skywatch-23-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":91}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-24-pet-collection":{"data":{"name":"hard-skywatch-24-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":94}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-25-pet-collection":{"data":{"name":"hard-skywatch-25-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":98}}]},"metadata":{"location":"skywatch"}},"hard-academy-26-pet-collection":{"data":{"name":"hard-academy-26-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":100}}]},"metadata":{"location":"academy"}},"hard-academy-27-pet-collection":{"data":{"name":"hard-academy-27-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":105}}]},"metadata":{"location":"academy"}},"hard-academy-28-pet-collection":{"data":{"name":"hard-academy-28-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":110}}]},"metadata":{"location":"academy"}},"hard-optional-wizard-29-pet-collection":{"data":{"name":"hard-optional-wizard-29-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":50}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-30-pet-collection":{"data":{"name":"hard-optional-wizard-30-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":65}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-31-pet-collection":{"data":{"name":"hard-optional-wizard-31-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":85}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-32-pet-collection":{"data":{"name":"hard-optional-wizard-32-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":110}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-33-pet-collection":{"data":{"name":"hard-optional-wizard-33-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":130}}]},"metadata":{"location":"optional-wizard"}},"expert-world-map-1-pet-collection":{"data":{"name":"expert-world-map-1-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":115}}]},"metadata":{"location":"world-map"}},"expert-forest-2-pet-collection":{"data":{"name":"expert-forest-2-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":116}}]},"metadata":{"location":"forest"}},"expert-forest-3-pet-collection":{"data":{"name":"expert-forest-3-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":117}}]},"metadata":{"location":"forest"}},"expert-forest-4-pet-collection":{"data":{"name":"expert-forest-4-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":118}}]},"metadata":{"location":"forest"}},"expert-forest-5-pet-collection":{"data":{"name":"expert-forest-5-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":119}}]},"metadata":{"location":"forest"}},"expert-shiverchill-6-pet-collection":{"data":{"name":"expert-shiverchill-6-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":120}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-7-pet-collection":{"data":{"name":"expert-shiverchill-7-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":121}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-8-pet-collection":{"data":{"name":"expert-shiverchill-8-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":122}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-9-pet-collection":{"data":{"name":"expert-shiverchill-9-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":123}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-10-pet-collection":{"data":{"name":"expert-shiverchill-10-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":124}}]},"metadata":{"location":"shiverchill"}},"expert-bonfire-spire-11-pet-collection":{"data":{"name":"expert-bonfire-spire-11-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":125}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-12-pet-collection":{"data":{"name":"expert-bonfire-spire-12-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":126}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-13-pet-collection":{"data":{"name":"expert-bonfire-spire-13-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":127}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-14-pet-collection":{"data":{"name":"expert-bonfire-spire-14-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":128}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-15-pet-collection":{"data":{"name":"expert-bonfire-spire-15-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":129}}]},"metadata":{"location":"bonfire-spire"}},"expert-shipwreck-shore-16-pet-collection":{"data":{"name":"expert-shipwreck-shore-16-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":130}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-17-pet-collection":{"data":{"name":"expert-shipwreck-shore-17-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":131}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-18-pet-collection":{"data":{"name":"expert-shipwreck-shore-18-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":132}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-19-pet-collection":{"data":{"name":"expert-shipwreck-shore-19-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":133}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-20-pet-collection":{"data":{"name":"expert-shipwreck-shore-20-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":134}}]},"metadata":{"location":"shipwreck-shore"}},"expert-skywatch-21-pet-collection":{"data":{"name":"expert-skywatch-21-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":135}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-22-pet-collection":{"data":{"name":"expert-skywatch-22-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":136}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-23-pet-collection":{"data":{"name":"expert-skywatch-23-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":137}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-24-pet-collection":{"data":{"name":"expert-skywatch-24-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":138}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-25-pet-collection":{"data":{"name":"expert-skywatch-25-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":139}}]},"metadata":{"location":"skywatch"}},"expert-academy-26-pet-collection":{"data":{"name":"expert-academy-26-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":140}}]},"metadata":{"location":"academy"}},"expert-academy-27-pet-collection":{"data":{"name":"expert-academy-27-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":145}}]},"metadata":{"location":"academy"}},"expert-academy-28-pet-collection":{"data":{"name":"expert-academy-28-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":150}}]},"metadata":{"location":"academy"}},"expert-optional-wizard-29-pet-collection":{"data":{"name":"expert-optional-wizard-29-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":130}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-30-pet-collection":{"data":{"name":"expert-optional-wizard-30-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":145}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-31-pet-collection":{"data":{"name":"expert-optional-wizard-31-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":165}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-32-pet-collection":{"data":{"name":"expert-optional-wizard-32-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":190}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-33-pet-collection":{"data":{"name":"expert-optional-wizard-33-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":205}}]},"metadata":{"location":"optional-wizard"}}}')},94554:q=>{"use strict";q.exports=JSON.parse('{"spawnLevelChanceSame":1,"spawnLevelChanceHigher":0,"spawnLevelChanceLower":0,"benchLevelChanceSame":1,"benchLevelChanceLower":0,"benchLevelChanceLowest":0,"spawnCooldownDuration":120,"threatIndicatorLevel":2,"encounterRatesPerRarity":{"regular":{"0":0.5,"1":0.25,"2":0.15,"3":0.07,"4":0.03},"hard":{"0":0.1,"1":0.2,"2":0.5,"3":0.15,"4":0.05},"expert":{"0":0.06,"1":0.12,"2":0.42,"3":0.25,"4":0.15}},"encounterRatesPerEvolutionTier":{"regular":{"1":1.5,"2":1.25,"3":1,"4":0},"hard":{"1":1,"2":1.25,"3":1,"4":0},"expert":{"1":1,"2":1.15,"3":1.5,"4":0}}}')},93096:q=>{"use strict";q.exports=JSON.parse('{"bonfire_spire-A1-chest1":[{"type":"gold","N":200}],"bonfire_spire-A4-chestGuardian":[{"type":"key","ID":12},{"type":"item","ID":92}],"bonfire_spire-B5-chest4":[{"type":"gold","N":200}],"bonfire_spire-C6-chest5":[{"type":"weapon","ID":21}],"bonfire_spire-D2-chest2":[{"type":"hat","ID":34}],"bonfire_spire-D3-chest3":[{"type":"outfit","ID":27}],"bonfire_spire-E5-chest6":[{"type":"gold","N":200}],"shipwreck_shore-A3-chestA3":[{"type":"gold","N":800},{"type":"weapon","ID":93}],"shipwreck_shore-A5-chestA5":[{"type":"hat","ID":81}],"shipwreck_shore-B10-chestB10":[{"type":"gold","N":600},{"type":"boots","ID":31}],"shipwreck_shore-B13-chestB13":[{"type":"gold","N":200}],"shipwreck_shore-B5-chestB5":[{"type":"gold","N":200}],"shipwreck_shore-C10-chestBreathingBubble":[{"type":"key","ID":14}],"shiverchill-A2-chest3":[{"type":"item","ID":71}],"shiverchill-A5-chest4":[{"type":"outfit","ID":48}],"shiverchill-A9-chest6":[{"type":"weapon","ID":73}],"shiverchill-B6-chest1":[{"type":"item","ID":73},{"type":"gold","N":250},{"type":"item","ID":75}],"shiverchill-B8-chest2":[{"type":"hat","ID":55}],"shiverchill-B9-chest5":[{"type":"item","ID":2},{"type":"item","ID":5},{"type":"item","ID":6},{"type":"item","ID":7},{"type":"item","ID":15}],"skywatch-A0-chest1":[{"type":"gold","N":200}],"skywatch-B1-chest2":[{"type":"outfit","ID":41}],"skywatch-C3-chest3":[{"type":"gold","N":500}],"skywatch-D2-chest4":[{"type":"weapon","ID":69}],"skywatch-E3-chest5":[{"type":"hat","ID":45}],"forest-A5-chest3":[{"type":"outfit","ID":12}],"forest-B7-chest1":[{"type":"weapon","ID":1}],"forest-B8-chest4":[{"type":"gold","N":500}],"forest-C4-chest2":[{"type":"gold","N":250}],"forest-C7-chest5":[{"type":"gold","N":500}],"forest-A4-chest6":[{"type":"gold","N":100},{"type":"currency","ID":13,"N":50},{"type":"item","ID":179,"N":10}]}')},56351:q=>{"use strict";q.exports=JSON.parse('{"endgame-guardian-firefly":{"bossID":54,"puppetMasterPreBattleDialogue":[1429],"puppetMasterDialogueSequence":[1436],"backgroundImageKey":"Battle_forest_generic_bg","foregroundImageKey":"Battle_forest_generic_fg","npcHelperData":[{"entranceRound":2,"dialogueSequence":[1414,1415]}]},"endgame-guardian-shiverchill":{"bossID":55,"puppetMasterPreBattleDialogue":[1430,1434],"puppetMasterDialogueSequence":[1437],"backgroundImageKey":"Battle_shiverchill_inside_bg","foregroundImageKey":"Battle_shiverchill_inside_fg","displayShield":true,"npcHelperData":[{"entranceRound":2,"dialogueSequence":[1416,1417]}]},"endgame-guardian-bonfire":{"bossID":56,"puppetMasterPreBattleDialogue":[1431],"puppetMasterDialogueSequence":[1438],"backgroundImageKey":"Battle_bonfire_lava_bg","foregroundImageKey":"Battle_bonfire_lava_fg","npcHelperData":[{"entranceRound":3,"dialogueSequence":[1418,1419]}]},"endgame-guardian-shipwreck":{"bossID":57,"puppetMasterPreBattleDialogue":[1432],"puppetMasterDialogueSequence":[1439],"backgroundImageKey":"Battle_shipwreck_inside_bg","foregroundImageKey":"Battle_shipwreck_inside_fg","npcHelperData":[{"entranceRound":1,"dialogueSequence":[1420,1421]}]},"endgame-guardian-skywatch":{"bossID":58,"puppetMasterPreBattleDialogue":[1433],"puppetMasterDialogueSequence":[1440],"backgroundImageKey":"Battle_skywatch_outside_bg","foregroundImageKey":"Battle_skywatch_outside_fg","displayShield":true,"npcHelperData":[{"entranceRound":2,"dialogueSequence":[1422],"dialogueSequenceReprise":[1495]},{"entranceRound":3,"dialogueSequence":[1423,1424]}]}}')},79259:q=>{"use strict";q.exports=JSON.parse('{"battle-academy-classroom-icetower":"bf36ed9d-a1bd-4bc6-8e07-dc2e9deb9bc2","7d49da25-cd3e-454d-91ef-0a3b093d6797":"bf36ed9d-a1bd-4bc6-8e07-dc2e9deb9bc2","battle-academy-classroom":"c2efc300-2e72-48d8-b646-e7c14b85fd63","9fef2c8a-2ff5-4670-9588-7204f3c70691":"c2efc300-2e72-48d8-b646-e7c14b85fd63","battle-academy-gh":"b9aed696-a108-4316-8077-3defba917de6","battle-academy-gh-stairs":["8c3bf69a-1282-416d-90c1-57efca053c5f","ca4194f4-8626-4ff4-b1f1-4d84fa0f823b"],"1f3b1af5-5868-4801-b68b-5338e46c0014":["8c3bf69a-1282-416d-90c1-57efca053c5f","ca4194f4-8626-4ff4-b1f1-4d84fa0f823b"],"battle-academy-office-icetower":"5e70d317-5751-462f-98b7-e9f30afbe201","56774bcb-6165-4235-829e-d5558d1a231b":"5e70d317-5751-462f-98b7-e9f30afbe201","battle-academy-office":"dd1bdac4-6044-465f-8fbf-7daf26e2fe1e","7ce67cd8-aa5a-4efe-af8c-2fd128061016":"dd1bdac4-6044-465f-8fbf-7daf26e2fe1e","battle-archives":["41f23d64-af23-4ad2-8c33-0f3ccfeaf3b4","88182fd5-723a-4ac5-9c21-ae0de5cb8b1c"],"5d4d4526-8264-4db6-bd65-8d8be4868e2e":["41f23d64-af23-4ad2-8c33-0f3ccfeaf3b4","88182fd5-723a-4ac5-9c21-ae0de5cb8b1c"],"battle-bonfire-inside":["6ba91a53-b9f0-4e76-a99a-133121d1f163","b292329a-50c6-46e7-92fb-e3b6b4fb0694"],"4f9b4c38-36d4-4dcc-83c3-aa39e345fd6c":["6ba91a53-b9f0-4e76-a99a-133121d1f163","b292329a-50c6-46e7-92fb-e3b6b4fb0694"],"battle-bonfire-lava":["49f70191-39bb-4f25-832e-84f6c2b1149b","b95d2b2d-cd94-4e1f-beac-149c9f023809"],"545efb2b-e4e2-4797-927d-f5f0fadc1672":["49f70191-39bb-4f25-832e-84f6c2b1149b","b95d2b2d-cd94-4e1f-beac-149c9f023809"],"battle-bonfire-outside":["16b4a938-d5bc-41ea-9089-c308b24b7237","ace7fd1a-3c7c-42fc-8b11-471d19098b40"],"4908067d-bf10-48bd-9341-81ae43b755de":["16b4a938-d5bc-41ea-9089-c308b24b7237","ace7fd1a-3c7c-42fc-8b11-471d19098b40"],"battle-bonfire-titan":"4f9b4c38-36d4-4dcc-83c3-aa39e345fd6c","battle-forest-generic":["351db49c-f8f5-4076-b713-a6175f9c1c0e","f5e3e053-a0f4-471d-88e9-c10404d8da07"],"29f4ad28-df74-4133-958f-12bbde4cc27f":["351db49c-f8f5-4076-b713-a6175f9c1c0e","f5e3e053-a0f4-471d-88e9-c10404d8da07"],"battle-forest-outside":["325a0230-611d-4d79-8c9e-784703b77721","c376bd6d-ef20-4c13-a396-4085486ef68c"],"62ae1ab1-881c-472f-bc99-7eb63564e017":["325a0230-611d-4d79-8c9e-784703b77721","c376bd6d-ef20-4c13-a396-4085486ef68c"],"battle-lamplight-outside":["33d861e0-8416-4366-b640-75bd58a76419","8088a9e2-278a-48cc-a429-be02d472fbbc"],"f369358a-fdea-43c7-83e6-c1a5b1f3e467":["33d861e0-8416-4366-b640-75bd58a76419","8088a9e2-278a-48cc-a429-be02d472fbbc"],"battle-lamplight-outside-pumpkinfest":["83af8521-a111-4086-8412-90998096923b","e96058b9-7536-4dfd-9c4f-b89a9a6f312d"],"087fd393-236a-4749-bdd7-dca2b7708960":["83af8521-a111-4086-8412-90998096923b","e96058b9-7536-4dfd-9c4f-b89a9a6f312d"],"battle-lamplight-outside-pumpkinfest-night":["ebf28489-f1ca-4961-9c9a-b4833bfb8b5a","6f160c28-ca59-4b62-b5b8-ea9f0e5e9fe0"],"battle-lamplight-outside-springfest":["99a5fe98-a71a-4c17-a9b4-c85809f08d82","e636c55e-fde2-4c8d-870c-b7d8035fce92"],"battle-lamplight-outside-summerfest":["dc9e3505-30bd-4e74-9fc5-bc9147af52ce","25f0b480-cadc-43c3-835b-ffd6e60115ad"],"battle-lamplight-outside-starlight":["e666e7f9-6294-41e6-8a7a-45fdbc61a69b","654aa629-489e-4cb6-bf46-fed109a439ce"],"9d7b7d41-fa35-41a7-af78-87398d3eeff1":["e666e7f9-6294-41e6-8a7a-45fdbc61a69b","654aa629-489e-4cb6-bf46-fed109a439ce"],"battle-lamplight-outside-winterfest":["a24b5f19-0b31-47ae-ab9e-2be6854dfc5f","d133013e-92a7-467e-875b-c599d5fffff5"],"battle-moon":["bd6ba53d-dd8a-4a7f-a68c-26161c17f5df","aa0f953d-a092-4ba4-9ea6-3e017d4f8e77"],"battle-moonlight":["6b62b005-097a-4580-9701-061386e71920","dddabadb-b443-4499-a8e0-a896944e727f"],"e30f311b-73b7-409c-8850-46f8ae854b3c":["a24b5f19-0b31-47ae-ab9e-2be6854dfc5f","d133013e-92a7-467e-875b-c599d5fffff5"],"battle-shipwreck-inside":["510850d9-61d9-49ed-a600-4ba7f2b7f397","c547d4ff-e235-4bd4-be23-b503cb6cad72"],"510850d9-61d9-49ed-a600-4ba7f2b7f397":["510850d9-61d9-49ed-a600-4ba7f2b7f397","c547d4ff-e235-4bd4-be23-b503cb6cad72"],"battle-shipwreck-outside":["d502cd37-ef8c-46d6-81e8-7c548b66dc0d","bc6618a6-f008-446e-8ead-5391c4cce57d"],"19cbd9ec-281e-4fe3-80fc-72edfd2289ba":["d502cd37-ef8c-46d6-81e8-7c548b66dc0d","bc6618a6-f008-446e-8ead-5391c4cce57d"],"battle-shipwreck-underwater":["9e53b099-9941-466f-8ea8-e6e7d0126049","c883bf41-56ea-4415-bd75-1157fa748a67"],"ef6a2f9a-5d14-4afd-8767-e34ca09db5ee":["9e53b099-9941-466f-8ea8-e6e7d0126049","c883bf41-56ea-4415-bd75-1157fa748a67"],"battle-shiverchill-inside":["b7555e19-a333-47c4-ab5c-7eb5dc06893e","a5a80e5b-5680-4b3e-a53f-6155540dcc9c"],"9ee1391b-9efb-4898-ac14-7d0168d82825":["b7555e19-a333-47c4-ab5c-7eb5dc06893e","a5a80e5b-5680-4b3e-a53f-6155540dcc9c"],"battle-shiverchill-outside":["0d6c6911-c576-4200-8a99-7be16d46e7e8","c14e6f6f-83dd-48ac-970a-4d9cd6d30f59"],"d0e470ef-38cc-4dc7-8259-ab85abd2cf5a":["0d6c6911-c576-4200-8a99-7be16d46e7e8","c14e6f6f-83dd-48ac-970a-4d9cd6d30f59"],"battle-skywatch-inside":["bec82905-9385-4c6d-a27a-2027d27d9f0f","d87f5a6b-64e8-4afd-ac23-a9905ca5e2a0"],"9b95d790-0d89-48dc-a95d-add23a4d3885":["bec82905-9385-4c6d-a27a-2027d27d9f0f","d87f5a6b-64e8-4afd-ac23-a9905ca5e2a0"],"battle-skywatch-outside":["29189a36-c263-472b-9375-6340c7e5486a","858eb9e5-97cd-4d79-bd4a-66347b53f294"],"19a67124-2042-4cb6-a4b9-4a39c0d02002":["29189a36-c263-472b-9375-6340c7e5486a","858eb9e5-97cd-4d79-bd4a-66347b53f294"],"battle-tower-inside":["6689ef4f-ed14-4a10-b50b-7c51aeb172ef","d21d9862-1f9a-42e6-988b-efcd34f5f397"],"0a2117f2-2b4e-463b-b22d-00e4b9404e03":["6689ef4f-ed14-4a10-b50b-7c51aeb172ef","d21d9862-1f9a-42e6-988b-efcd34f5f397"],"battle-grotto":["e3602904-def2-4b94-ba3f-1f2e5ae65d83","211ad4ee-1450-4931-b4e4-4964e9e4199e"]}')},73792:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"tail":{"y":{"interval":10000,"frames":[6]},"frameName":{"interval":150,"frames":[0,1,2]}},"body":{"frameName":{"interval":150,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]}},"legs":{"visible":{"interval":10000,"frames":[false]}}},"walk":{"loop":true,"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":150,"frames":[0,1,2,3]}},"tail":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":150,"frames":[0,1]}}}}')},60675:q=>{"use strict";q.exports=JSON.parse('{"H":["CHAT_ALL_RIGHT","CHAT_ALL_GOOD","CHAT_ABRACADABRA","CHAT_ANIMALS","CHAT_ARE_YOU_COMING","CHAT_ARE_YOU_LEAVING","CHAT_ARE_YOU_STAYING","CHAT_ARE_YOU_HAVING_FUN","CHAT_BAD","CHAT_BUSY","CHAT_BYE","CHAT_BYE_BYE","CHAT_BORING","CHAT_BOUGHT_IT","CHAT_BUT","CHAT_BARELY","CHAT_BECAUSE","CHAT_CANT_RIGHT_NOW","CHAT_CHECK_IT_OUT","CHAT_COME_OVER_HERE","CHAT_CRUD","CHAT_DO_YOU_HAVE_A_MIN","CHAT_DO_YOU_HAVE","CHAT_DID_YOU_SEE_THAT","CHAT_DID_YOU_CATCH","CHAT_DONT_BOTHER","CHAT_DUDE","CHAT_DEPENDS","CHAT_EVERYONE_LOOK","CHAT_ELEMENTARY","CHAT_FOLLOW_ME","CHAT_FRIENDS","CHAT_FORGET_IT","CHAT_FUN","CHAT_FOUND_YOU","CHAT_FOUND_IT","CHAT_FUNDERFUL","CHAT_FREAKY","CHAT_GO_AWAY","CHAT_GOOD","CHAT_GOODBYE","CHAT_GREETINGS","CHAT_GOOD_MORNING","CHAT_GOOD_NIGHT","CHAT_GOOD_AFTERNOON","CHAT_GOOD_TO_KNOW","CHAT_GHOSTS","CHAT_GREAT","CHAT_GUESS_AGAIN","CHAT_GUESS","CHAT_GOLLY","CHAT_GOT_TO_GO","CHAT_HI","CHAT_HELLO","CHAT_HELLO_THERE","CHAT_HEY","CHAT_HOW_ARE_YOU","CHAT_HOW","CHAT_HAPPY","CHAT_HELP_ME","CHAT_I_CAUGHT_A","CHAT_I_GOT_A","CHAT_I_HAVE_TO_GO","CHAT_I_HAVE_TO_LEAVE","CHAT_I_LEVELED_UP","CHAT_I_LOVE_PRODIGY","CHAT_I_LIKE_YOUR_HAIR","CHAT_I_LIKE_YOUR_OUTFIT","CHAT_I_LIKE_YOUR_HAT","CHAT_I_LIKE_YOUR_WAND","CHAT_I_LIKE_YOU_PET","CHAT_I_LIKE_THIS_PLACE","CHAT_I_DONT_LIKE_IT_HERE","CHAT_I_LIKE_IT_HERE","CHAT_ITS_SPOOKY_HERE","CHAT_ITS_SUPER_RARE","CHAT_ITS_TIME","CHAT_IM_RICH","CHAT_JUST_KIDDING","CHAT_JUST_YOU_WAIT","CHAT_JOKING","CHAT_JEALOUS","CHAT_KEEP_GOING","CHAT_KEEP_IT_UP","CHAT_KEEP_WALKING","CHAT_LEAVE_ME_ALONE","CHAT_LOOK","CHAT_LOOK_AT_THIS","CHAT_LOVE_IT","CHAT_LETS_GO","CHAT_LETS_BATTLE","CHAT_LET_ME_SEE","CHAT_LOCKED","CHAT_MY_FAVOURITE_IS","CHAT_MY_FAVOURITE_ITEM_IS","CHAT_MY_FAVOURITE_PET_IS","CHAT_MAYBE","CHAT_MAKE_ME","CHAT_MADE_IT","CHAT_MANY_THANKS","CHAT_MADE_TONS_OF_GOLD","CHAT_NEAT","CHAT_NO","CHAT_NOT_RIGHT_NOW","CHAT_NOT_TODAY","CHAT_NEVER_MIND","CHAT_NAH","CHAT_NO_CAN_DO","CHAT_NEVER","CHAT_NOW_QUESTION","CHAT_NOW","CHAT_NO_WAY","CHAT_OVER","CHAT_OVER_HERE","CHAT_ONE_OF_THESE_IS","CHAT_OKAY","CHAT_OMINOUS","CHAT_PUYOY","CHAT_PERHAPS","CHAT_PARTY_TIME","CHAT_PRETTY_COOL","CHAT_PRACTICE","CHAT_QUACK_QUACK","CHAT_QUITE","CHAT_QUIET","CHAT_RIGHT","CHAT_RIGHT_BEHIND_YOU","CHAT_RIBBIT","CHAT_RIGHT_OVER_HERE","CHAT_RIGHT_THERE","CHAT_SEE_YOU_LATER","CHAT_SEE_YA","CHAT_SEE","CHAT_SORRY","CHAT_SAFE_AND_SOUND","CHAT_SHHH","CHAT_SOUNDS_LIKE","CHAT_SEEMS_LIKE_IT","CHAT_SOMEONE_SAID_SO","CHAT_SOMEDAY","CHAT_THANK_YOU","CHAT_THERE_YOU_ARE","CHAT_THINK_ABOUT_IT","CHAT_TIME_FOR_BED","CHAT_TIME_FOR_DINNER","CHAT_TIME_FOR_LUNCH","CHAT_TIME_FOR_SUPPER","CHAT_TIME_TO_GET_UP","CHAT_TIME_TO_GO","CHAT_TERRIBLE","CHAT_TELL_YOU_WHAT","CHAT_VERY_GOOD","CHAT_WHATS_UP","CHAT_WHO","CHAT_WHO_ARE_YOU","CHAT_WHY","CHAT_WHAT","CHAT_WHERE","CHAT_YES","CHAT_YOU_COMING","CHAT_YOU_LOOK_COOL","CHAT_YOU_STILL_THERE","CHAT_YOLO","CHAT_YOURE_WELCOME","CHAT_ZZZ","CHAT_DRAGONS","CHAT_DRAGONS_COMING","CHAT_DRAGONS_HERE","CHAT_DRAGONS_COOL","CHAT_DRAGONS_WANT","CHAT_DRAGONS_SEEN","CHAT_CHILL_CHAR_COOL","CHAT_TIDUS_COOL","CHAT_ECLIPSE_COOL","CHAT_LUMA_COOL","CHAT_CHILL_CHAR_FAVOURITE","CHAT_TIDUS_FAVOURITE","CHAT_ECLIPSE_FAVOURITE","CHAT_LUMA_FAVOURITE","CHAT_DRAGONS_LIKE","CHAT_ABRACA_DAB_RA","CHAT_FEEL_LIKE_DANCING","CHAT_LETS_DANCE","CHAT_SHOW_FUNNY_FACE","CHAT_ASK_PARENTS","CHAT_PARENTS_BEST","CHAT_MEMBER_AWESOME","CHAT_TEACHER_AWESOME","CHAT_BUNNIES_ARE_BEST","CHAT_I_LIKE_BUNNIES","CHAT_GO_BUNNY_BANDITS","CHAT_DO_YOU_LIKE_BUNNIES","CHAT_HIPPITY_HOP","CHAT_HOP_HOP","CHAT_HARRIET_HOOD_RULES","CHAT_FOXES_ARE_BEST","CHAT_I_LIKE_FOXES","CHAT_GO_FOX_KNIGHTS","CHAT_DO_YOU_LIKE_FOXES","CHAT_WHAT_DOES_FOX_SAY","CHAT_DON_ZORRO_FANTASTICO"]}')},7640:q=>{"use strict";q.exports=JSON.parse('{"noot":[{"textKey":"DIALOGUE_NOOT_0","face":2,"anim":4,"audio":{"tag":"voice-10-12","s":0,"d":1}},{"textKey":"DIALOGUE_NOOT_1","face":3,"anim":1,"audio":{"tag":"voice-10-12","s":1,"d":4}},{"textKey":"DIALOGUE_NOOT_2","face":0,"audio":{"tag":"voice-10-12","s":5,"d":7}},{"textKey":"DIALOGUE_NOOT_3","face":0,"anim":2,"audio":{"tag":"voice-10-13","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_4","face":1,"audio":{"tag":"voice-10-13","s":7,"d":6}},{"textKey":"DIALOGUE_NOOT_5","face":4,"audio":{"tag":"voice-10-13","s":13,"d":7}},{"textKey":"DIALOGUE_NOOT_6","face":4,"audio":{"tag":"voice-10-14","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_7","face":3,"anim":2,"audio":{"tag":"voice-10-14","s":6,"d":4}},{"textKey":"DIALOGUE_NOOT_8","face":0,"audio":{"tag":"voice-10-87","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_9","face":1,"audio":{"tag":"voice-10-1","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_10","face":0,"audio":{"tag":"voice-10-1","s":6,"d":3.5}},{"textKey":"DIALOGUE_NOOT_11","face":2,"anim":4,"audio":{"tag":"voice-10-2","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_12","face":3,"audio":{"tag":"voice-10-2","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_13","face":4,"audio":{"tag":"voice-10-4","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_14","face":0,"audio":{"tag":"voice-10-15","s":8,"d":6}},{"textKey":"DIALOGUE_NOOT_15","face":0,"audio":{"tag":"voice-10-5","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_16","face":4,"audio":{"tag":"voice-10-5","s":4,"d":4}},{"textKey":"DIALOGUE_NOOT_17","face":3,"audio":{"tag":"voice-10-5","s":8,"d":5}},{"textKey":"DIALOGUE_NOOT_18","face":2,"audio":{"tag":"voice-10-6","s":2.8,"d":3.2}},{"textKey":"DIALOGUE_NOOT_19","face":0,"audio":{"tag":"voice-10-7","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_20","face":4,"audio":{"tag":"voice-10-7","s":3,"d":3}},{"textKey":"DIALOGUE_NOOT_21","face":0,"audio":{"tag":"voice-10-7","s":6,"d":6}},{"textKey":"DIALOGUE_NOOT_22","face":1,"anim":1,"audio":{"tag":"voice-10-8","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_23","face":4,"audio":{"tag":"voice-10-8","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_24","face":3,"anim":2,"audio":{"tag":"voice-10-16","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_25","face":5,"anim":4,"audio":{"tag":"voice-10-16","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_26","face":4,"audio":{"tag":"voice-10-16","s":7,"d":8}},{"textKey":"DIALOGUE_NOOT_27","face":0,"audio":{"tag":"voice-10-15","s":0,"d":8}},{"textKey":"DIALOGUE_NOOT_28","face":1,"audio":{"tag":"voice-10-12","s":12,"d":5}},{"textKey":"DIALOGUE_NOOT_29","face":5,"anim":2,"audio":{"tag":"voice-10-17","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_30","face":2,"anim":4,"audio":{"tag":"voice-10-17","s":6,"d":8}},{"textKey":"DIALOGUE_NOOT_31","face":1,"audio":{"tag":"voice-10-17","s":14,"d":5}},{"textKey":"DIALOGUE_NOOT_32","face":3,"audio":{"tag":"voice-10-18","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_33","face":2,"anim":4,"audio":{"tag":"voice-10-18","s":5,"d":4}},{"textKey":"DIALOGUE_NOOT_34","face":0,"audio":{"tag":"voice-10-16","s":15,"d":6}},{"textKey":"DIALOGUE_NOOT_35","face":0,"audio":{"tag":"voice-10-19","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_36","face":2,"audio":{"tag":"voice-10-19","s":10,"d":5}},{"textKey":"DIALOGUE_NOOT_37","face":3,"anim":2,"audio":{"tag":"voice-10-19","s":6,"d":4}},{"textKey":"DIALOGUE_NOOT_38","face":3,"anim":2,"audio":{"tag":"voice-10-20","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_39","face":1,"audio":{"tag":"voice-10-20","s":3,"d":2}},{"textKey":"DIALOGUE_NOOT_40","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":5,"d":3}},{"textKey":"DIALOGUE_NOOT_41","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":8,"d":3}},{"textKey":"DIALOGUE_NOOT_42","face":0,"audio":{"tag":"voice-10-19","s":15,"d":7}},{"textKey":"DIALOGUE_NOOT_43","face":0,"audio":{"tag":"voice-10-19","s":22,"d":6}},{"textKey":"DIALOGUE_NOOT_44","face":0,"audio":{"tag":"voice-10-21","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_45","face":2,"audio":{"tag":"voice-10-21","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_46","face":3,"audio":{"tag":"voice-10-21","s":7,"d":4}},{"textKey":"DIALOGUE_NOOT_47","face":4,"audio":{"tag":"voice-10-21","s":11,"d":1}},{"textKey":"DIALOGUE_NOOT_48","face":1,"audio":{"tag":"voice-10-21","s":12,"d":1}},{"textKey":"DIALOGUE_NOOT_49","face":2,"audio":{"tag":"voice-10-21","s":13,"d":2}},{"textKey":"DIALOGUE_NOOT_50","face":3,"audio":{"tag":"voice-10-21","s":15,"d":2}},{"textKey":"DIALOGUE_NOOT_51","face":2,"anim":4,"audio":{"tag":"voice-10-21","s":17,"d":4}},{"textKey":"DIALOGUE_NOOT_52","face":1,"audio":{"tag":"voice-10-21","s":21,"d":4}},{"textKey":"DIALOGUE_NOOT_53","face":2,"anim":4,"audio":{"tag":"voice-10-22","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_54","face":2,"anim":4,"audio":{"tag":"voice-10-23","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_55","face":0,"audio":{"tag":"voice-10-23","s":6,"d":4}},{"textKey":"DIALOGUE_NOOT_56","face":1,"anim":2,"audio":{"tag":"voice-10-24","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_57","face":2,"audio":{"tag":"voice-10-24","s":4,"d":4}},{"textKey":"DIALOGUE_NOOT_58","face":4,"audio":{"tag":"voice-10-24","s":8,"d":7}},{"textKey":"DIALOGUE_NOOT_59","face":2,"anim":4,"audio":{"tag":"voice-10-25","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_60","face":5,"audio":{"tag":"voice-10-26","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_61","face":1,"audio":{"tag":"voice-10-27","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_62","face":3,"audio":{"tag":"voice-10-27","s":6,"d":2}},{"textKey":"DIALOGUE_NOOT_63","face":5,"audio":{"tag":"voice-10-27","s":8,"d":3}},{"textKey":"DIALOGUE_NOOT_64","face":2,"anim":4,"audio":{"tag":"voice-10-28","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_65","face":3,"audio":{"tag":"voice-10-28","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_66","face":1,"audio":{"tag":"voice-10-21","s":25,"d":3}},{"textKey":"DIALOGUE_NOOT_67","face":1,"anim":4,"audio":{"tag":"voice-10-29","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_68","face":1,"audio":{"tag":"voice-10-30","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_69","face":4,"audio":{"tag":"voice-10-31","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_70","face":5,"audio":{"tag":"voice-10-32","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_71","face":1,"audio":{"tag":"voice-10-33","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_72","face":4,"audio":{"tag":"voice-10-33","s":3,"d":7}},{"textKey":"DIALOGUE_NOOT_73","face":3,"anim":2,"audio":{"tag":"voice-10-34","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_74","face":1,"audio":{"tag":"voice-10-35","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_75","face":2,"anim":2,"audio":{"tag":"voice-10-35","s":5,"d":6}},{"textKey":"DIALOGUE_NOOT_76","face":1,"audio":{"tag":"voice-10-35","s":11,"d":4}},{"textKey":"DIALOGUE_NOOT_77","face":2,"anim":4,"audio":{"tag":"voice-10-36","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_78","face":2,"anim":4,"audio":{}},{"textKey":"DIALOGUE_NOOT_79","face":3},{"textKey":"DIALOGUE_NOOT_80","face":2,"anim":4,"audio":{"tag":"voice-10-37","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_81","face":2,"anim":4,"audio":{"tag":"voice-10-37","s":6,"d":5}},{"textKey":"DIALOGUE_NOOT_82","face":2,"anim":4,"audio":{"tag":"voice-10-37","s":11,"d":5}},{"textKey":"DIALOGUE_NOOT_83","face":2,"anim":4,"audio":{"tag":"voice-10-38","s":0,"d":8}},{"textKey":"DIALOGUE_NOOT_84","face":2,"anim":4,"audio":{"tag":"voice-10-38","s":8,"d":7}},{"textKey":"DIALOGUE_NOOT_85","face":2,"anim":4,"audio":{"tag":"voice-10-39","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_86","face":2,"anim":4,"audio":{"tag":"voice-10-39","s":5,"d":4}},{"textKey":"DIALOGUE_NOOT_87","face":2,"anim":4,"audio":{"tag":"voice-10-39","s":9,"d":6}},{"textKey":"DIALOGUE_NOOT_88","face":2,"anim":4,"audio":{"tag":"voice-10-40","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_89","face":2,"anim":4,"audio":{"tag":"voice-10-40","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_90","face":2,"anim":4,"audio":{"tag":"voice-10-40","s":9,"d":4}},{"textKey":"DIALOGUE_NOOT_91","face":2,"anim":4,"audio":{"tag":"voice-10-41","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_92","face":2,"anim":4,"audio":{"tag":"voice-10-41","s":4,"d":8}},{"textKey":"DIALOGUE_NOOT_93","face":2,"anim":4,"audio":{"tag":"voice-10-41","s":12,"d":6}},{"textKey":"DIALOGUE_NOOT_94","face":2,"anim":4,"audio":{"tag":"voice-10-42","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_95","face":5,"anim":1,"audio":{"tag":"voice-10-43","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_96","face":5,"anim":4,"audio":{"tag":"voice-10-43","s":4,"d":2}},{"textKey":"DIALOGUE_NOOT_97","face":1,"anim":2,"audio":{"tag":"voice-10-44","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_98","face":4,"anim":1,"audio":{"tag":"voice-10-45","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_99","face":1},{"textKey":"DIALOGUE_NOOT_100","face":5,"anim":4,"audio":{"tag":"voice-10-46","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_101","face":2,"anim":2,"audio":{"tag":"voice-10-47","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_102","face":3,"anim":4,"audio":{"tag":"voice-10-47","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_103","face":4,"anim":1,"audio":{"tag":"voice-10-50","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_104","face":5,"anim":1,"audio":{"tag":"voice-10-51","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_105","face":1,"anim":2,"audio":{"tag":"voice-10-51","s":2,"d":3}},{"textKey":"DIALOGUE_NOOT_106","face":4,"anim":2,"audio":{"tag":"voice-10-51","s":5,"d":3}},{"textKey":"DIALOGUE_NOOT_107","face":1,"anim":2,"audio":{"tag":"voice-10-52","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_108","face":3,"anim":4,"audio":{"tag":"voice-10-48","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_109","face":2,"anim":2,"audio":{"tag":"voice-10-49","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_110","face":3,"anim":4},{"textKey":"DIALOGUE_NOOT_111","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":9,"d":2}},{"textKey":"DIALOGUE_NOOT_112","face":1,"anim":4,"audio":{"tag":"voice-10-66","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_113","face":1,"anim":4,"audio":{"tag":"voice-10-66","s":6,"d":6}},{"textKey":"DIALOGUE_NOOT_114","face":4,"anim":4,"audio":{"tag":"voice-10-66","s":12,"d":5}},{"textKey":"DIALOGUE_NOOT_115","face":3,"anim":4,"audio":{"tag":"voice-10-66","s":17,"d":4}},{"textKey":"DIALOGUE_NOOT_116","face":3,"anim":4,"audio":{"tag":"voice-10-66","s":21,"d":3}},{"textKey":"DIALOGUE_NOOT_117","face":2},{"textKey":"DIALOGUE_NOOT_118","face":1,"audio":{"tag":"voice-10-53","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_119","face":5,"anim":2,"audio":{"tag":"voice-10-53","s":2,"d":2}},{"textKey":"DIALOGUE_NOOT_120","face":5,"anim":4,"audio":{"tag":"voice-10-53","s":6.4,"d":3.2}},{"textKey":"DIALOGUE_NOOT_121","face":2,"anim":4,"audio":{"tag":"voice-10-54","s":0,"d":1}},{"textKey":"DIALOGUE_NOOT_122","face":0,"anim":2,"audio":{"tag":"voice-10-54","s":3,"d":5}},{"textKey":"DIALOGUE_NOOT_123","face":1,"anim":2,"audio":{"tag":"voice-10-54","s":8,"d":1}},{"textKey":"DIALOGUE_NOOT_124","face":3,"anim":4,"audio":{"tag":"voice-10-55","s":0,"d":1}},{"textKey":"DIALOGUE_NOOT_125","face":2,"anim":2,"audio":{"tag":"voice-10-55","s":1,"d":1}},{"textKey":"DIALOGUE_NOOT_126","face":0,"anim":2,"audio":{"tag":"voice-10-55","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_127","face":1,"anim":3,"audio":{"tag":"voice-10-55","s":9,"d":5}},{"textKey":"DIALOGUE_NOOT_128","face":2,"anim":2,"audio":{"tag":"voice-10-56","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_129","face":4,"anim":2,"audio":{"tag":"voice-10-56","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_130","face":0,"anim":2,"audio":{"tag":"voice-10-56","s":9,"d":5}},{"textKey":"DIALOGUE_NOOT_131","face":2,"anim":2,"audio":{"tag":"voice-10-56","s":14,"d":2}},{"textKey":"DIALOGUE_NOOT_132","face":3,"anim":2,"audio":{"tag":"voice-10-57","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_133","face":2,"anim":2,"audio":{"tag":"voice-10-57","s":7,"d":5}},{"textKey":"DIALOGUE_NOOT_134","face":2,"anim":2,"audio":{"tag":"voice-10-57","s":12,"d":5}},{"textKey":"DIALOGUE_NOOT_135","face":0,"audio":{"tag":"voice-10-96","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_136","face":2,"anim":4,"audio":{"tag":"voice-10-57","s":22,"d":4}},{"textKey":"DIALOGUE_NOOT_137","face":4,"anim":3,"audio":{"tag":"voice-10-57","s":26,"d":3}},{"textKey":"DIALOGUE_NOOT_138","face":2,"anim":2,"audio":{"tag":"voice-10-57","s":29,"d":6}},{"textKey":"DIALOGUE_NOOT_139","face":0,"anim":2,"audio":{"tag":"voice-10-96","s":5,"d":6}},{"textKey":"DIALOGUE_NOOT_140","face":2,"anim":2,"audio":{"tag":"voice-10-58","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_141","face":5,"anim":2,"audio":{"tag":"voice-10-59","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_142","face":5,"anim":4,"audio":{"tag":"voice-10-60","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_143","face":2,"anim":2,"audio":{"tag":"voice-10-61","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_144","face":2,"anim":2,"audio":{"tag":"voice-10-61","s":5,"d":9}},{"textKey":"DIALOGUE_NOOT_145","face":1,"anim":3,"audio":{"tag":"voice-10-61","s":14,"d":1}},{"textKey":"DIALOGUE_NOOT_146","face":1,"anim":2,"audio":{"tag":"voice-10-61","s":15,"d":5}},{"textKey":"DIALOGUE_NOOT_147","face":1,"anim":1,"audio":{"tag":"voice-10-62","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_148","face":5,"anim":4,"audio":{"tag":"voice-10-62","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_149","face":5,"anim":2,"audio":{"tag":"voice-10-62","s":7,"d":3}},{"textKey":"DIALOGUE_NOOT_150","face":1,"anim":4,"audio":{"tag":"voice-10-63","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_151","face":2,"anim":2,"audio":{"tag":"voice-10-63","s":5,"d":3}},{"textKey":"DIALOGUE_NOOT_152","face":5,"anim":2,"audio":{"tag":"voice-10-63","s":8,"d":7}},{"textKey":"DIALOGUE_NOOT_153","face":1,"anim":3,"audio":{"tag":"voice-10-63","s":15,"d":3}},{"textKey":"DIALOGUE_NOOT_154","face":0,"anim":2,"audio":{"tag":"voice-10-64","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_155","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":7,"d":3}},{"textKey":"DIALOGUE_NOOT_156","face":3,"anim":4,"audio":{"tag":"voice-10-86","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_157","face":1,"anim":2,"audio":{"tag":"voice-10-64","s":15,"d":5}},{"textKey":"DIALOGUE_NOOT_158","face":3,"anim":2,"audio":{"tag":"voice-10-64","s":20,"d":4}},{"textKey":"DIALOGUE_NOOT_159","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":24,"d":5}},{"textKey":"DIALOGUE_NOOT_160","face":3,"anim":4,"audio":{"tag":"voice-10-64","s":29,"d":2}},{"textKey":"DIALOGUE_NOOT_161","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":31,"d":5}},{"textKey":"DIALOGUE_NOOT_162","face":0,"anim":4,"audio":{"tag":"voice-10-96","s":11,"d":4}},{"textKey":"DIALOGUE_NOOT_163","face":0,"anim":2,"audio":{"tag":"voice-10-64","s":40,"d":7}},{"textKey":"DIALOGUE_NOOT_164","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":47,"d":7}},{"textKey":"DIALOGUE_NOOT_165","face":2,"anim":4,"audio":{"tag":"voice-10-18","s":7,"d":1.6}},{"textKey":"DIALOGUE_NOOT_166","face":1},{"textKey":"DIALOGUE_NOOT_167","face":0,"anim":2,"audio":{"tag":"voice-25-1","s":0,"d":2.8}},{"textKey":"DIALOGUE_NOOT_168","face":1,"audio":{"tag":"voice-25-1","s":3,"d":5.5}},{"textKey":"DIALOGUE_NOOT_169","face":1,"audio":{"tag":"voice-25-1","s":9,"d":1.6}},{"textKey":"DIALOGUE_NOOT_170","face":0,"anim":2,"audio":{"tag":"voice-25-1","s":11,"d":3.1}},{"textKey":"DIALOGUE_NOOT_171","face":1,"anim":2,"audio":{"tag":"voice-25-1","s":15,"d":8}},{"textKey":"DIALOGUE_NOOT_172","face":1,"anim":4,"audio":{"tag":"voice-25-1","s":32,"d":7.3}},{"textKey":"DIALOGUE_NOOT_173","face":0,"anim":2,"audio":{"tag":"voice-25-1","s":40,"d":2.9}},{"textKey":"DIALOGUE_NOOT_174","face":1,"anim":2,"audio":{"tag":"voice-25-1","s":44,"d":5.4}},{"textKey":"DIALOGUE_NOOT_175","face":2,"anim":2,"audio":{"tag":"voice-25-1","s":50,"d":1.4}},{"textKey":"DIALOGUE_NOOT_176","face":4,"anim":2,"audio":{"tag":"voice-25-1","s":52,"d":2.74}},{"textKey":"DIALOGUE_NOOT_177","face":4,"anim":2,"audio":{"tag":"voice-10-65","s":0,"d":2.54}},{"textKey":"DIALOGUE_NOOT_178","face":3,"anim":4,"audio":{"tag":"voice-10-67","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_179","face":0,"anim":2,"audio":{"tag":"voice-10-67","s":5.5,"d":8.5}},{"textKey":"DIALOGUE_NOOT_180","face":0,"anim":2,"audio":{"tag":"voice-10-67","s":15,"d":3}},{"textKey":"DIALOGUE_NOOT_181","face":0,"audio":{"tag":"voice-10-67","s":19,"d":8}},{"textKey":"DIALOGUE_NOOT_182","face":3,"anim":2,"audio":{"tag":"voice-10-67","s":28,"d":5}},{"textKey":"DIALOGUE_NOOT_183","face":2,"anim":4,"audio":{"tag":"voice-10-67","s":33,"d":4}},{"textKey":"DIALOGUE_NOOT_184","face":0,"anim":4,"audio":{"tag":"voice-10-69","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_185","face":3,"anim":4,"audio":{"tag":"voice-10-70","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_186","face":3,"anim":4,"audio":{"tag":"voice-10-71","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_187","face":3,"anim":4,"audio":{"tag":"voice-10-72","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_188","face":3,"anim":4,"audio":{"tag":"voice-10-73","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_189","face":3,"anim":4,"audio":{"tag":"voice-10-74","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_190","face":3,"anim":4,"audio":{"tag":"voice-10-75","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_191","face":3,"anim":4,"audio":{"tag":"voice-10-76","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_192","face":3,"anim":4,"audio":{"tag":"voice-10-77","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_193","face":3,"anim":4,"audio":{"tag":"voice-10-78","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_194","face":3,"anim":4,"audio":{"tag":"voice-10-79","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_195","face":3,"anim":4,"audio":{"tag":"voice-10-80","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_196","face":3,"anim":4,"audio":{"tag":"voice-10-81","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_197","face":3,"anim":4,"audio":{"tag":"voice-10-82","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_198","face":3,"anim":4,"audio":{"tag":"voice-10-57","s":32.5,"d":2}},{"textKey":"DIALOGUE_NOOT_199","face":3,"anim":4,"audio":{"tag":"voice-10-16","s":0,"d":1.2}},{"textKey":"DIALOGUE_NOOT_200","face":4,"anim":4,"audio":{"tag":"voice-10-87","s":3,"d":5}},{"textKey":"DIALOGUE_NOOT_201","face":4,"anim":2,"audio":{"tag":"voice-10-87","s":8,"d":4}},{"textKey":"DIALOGUE_NOOT_202","face":0,"anim":4,"audio":{"tag":"voice-10-87","s":12,"d":6}},{"textKey":"DIALOGUE_NOOT_203","face":1,"anim":1,"audio":{"tag":"voice-10-87","s":18,"d":4}},{"textKey":"DIALOGUE_NOOT_204","face":4,"anim":2,"audio":{"tag":"voice-10-87","s":22,"d":4}},{"textKey":"DIALOGUE_NOOT_205","face":0,"anim":4,"audio":{"tag":"voice-10-87","s":26,"d":5}},{"textKey":"DIALOGUE_NOOT_206","face":2,"anim":2,"audio":{"tag":"voice-10-87","s":31,"d":4}},{"textKey":"DIALOGUE_NOOT_207","face":3,"anim":3,"audio":{"tag":"voice-10-87","s":35,"d":6}},{"textKey":"DIALOGUE_NOOT_208","face":1,"anim":2,"audio":{"tag":"voice-10-87","s":41,"d":6}},{"textKey":"DIALOGUE_NOOT_209","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":47,"d":7}},{"textKey":"DIALOGUE_NOOT_210","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":54,"d":4}},{"textKey":"DIALOGUE_NOOT_211","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":58,"d":5}},{"textKey":"DIALOGUE_NOOT_212","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":63,"d":4}},{"textKey":"DIALOGUE_NOOT_213","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":67,"d":4}},{"textKey":"DIALOGUE_NOOT_214","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":71,"d":6}},{"textKey":"DIALOGUE_NOOT_215","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":77,"d":3}},{"textKey":"DIALOGUE_NOOT_216","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":80,"d":5}},{"textKey":"DIALOGUE_NOOT_217","face":1,"anim":4,"audio":{"tag":"voice-10-87","s":85,"d":5}},{"textKey":"DIALOGUE_NOOT_218","face":0,"anim":2,"audio":{"tag":"voice-10-87","s":90,"d":4}},{"textKey":"DIALOGUE_NOOT_219","face":2,"anim":4,"audio":{"tag":"voice-10-87","s":94,"d":2}},{"textKey":"DIALOGUE_NOOT_220","face":0,"anim":2,"audio":{"tag":"voice-10-87","s":96,"d":6}},{"textKey":"DIALOGUE_NOOT_221","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":102,"d":3}},{"textKey":"DIALOGUE_NOOT_222","face":5,"anim":3,"audio":{"tag":"voice-10-88","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_223","face":1,"anim":4,"audio":{"tag":"voice-10-88","s":5,"d":9}},{"textKey":"DIALOGUE_NOOT_224","face":1,"anim":4,"audio":{"tag":"voice-10-88","s":15,"d":4}},{"textKey":"DIALOGUE_NOOT_225","face":5,"anim":2,"audio":{"tag":"voice-10-88","s":20,"d":4}},{"textKey":"DIALOGUE_NOOT_226","face":2,"anim":4,"audio":{"tag":"voice-10-88","s":25,"d":4}},{"textKey":"DIALOGUE_NOOT_227","face":2,"anim":4,"audio":{"tag":"voice-10-88","s":30,"d":9}},{"textKey":"DIALOGUE_NOOT_228","face":1,"anim":2,"audio":{"tag":"voice-10-88","s":40,"d":4}},{"textKey":"DIALOGUE_NOOT_229","face":3,"anim":2,"audio":{"tag":"voice-10-88","s":45,"d":4}},{"textKey":"DIALOGUE_NOOT_230","face":0,"anim":2,"audio":{"tag":"voice-10-88","s":50,"d":9}},{"textKey":"DIALOGUE_NOOT_231","face":0,"audio":{"tag":"voice-10-88","s":60,"d":4}},{"textKey":"DIALOGUE_NOOT_232","face":0,"audio":{"tag":"voice-10-88","s":65,"d":4}},{"textKey":"DIALOGUE_NOOT_233","face":4,"anim":2,"audio":{"tag":"voice-10-88","s":70,"d":9}},{"textKey":"DIALOGUE_NOOT_234","face":3,"anim":4,"audio":{"tag":"voice-10-88","s":80,"d":4}},{"textKey":"DIALOGUE_NOOT_235","face":0,"audio":{"tag":"voice-10-88","s":85,"d":4}},{"textKey":"DIALOGUE_NOOT_236","face":1,"anim":3,"audio":{"tag":"voice-10-90","s":0,"d":1.5}},{"textKey":"DIALOGUE_NOOT_237","face":4,"anim":2,"audio":{"tag":"voice-10-90","s":2,"d":1.5}},{"textKey":"DIALOGUE_NOOT_238","face":1,"anim":4,"audio":{"tag":"voice-10-90","s":4,"d":2.5}},{"textKey":"DIALOGUE_NOOT_239","face":2,"anim":4,"audio":{"tag":"voice-10-90","s":7,"d":3}},{"textKey":"DIALOGUE_NOOT_240","face":1,"anim":2,"audio":{"tag":"voice-10-90","s":11,"d":4}},{"textKey":"DIALOGUE_NOOT_241","face":5,"audio":{"tag":"voice-10-90","s":16,"d":4}},{"textKey":"DIALOGUE_NOOT_242","face":0,"anim":0,"audio":{"tag":"voice-10-90","s":21,"d":2}},{"textKey":"DIALOGUE_NOOT_243","face":0,"anim":2,"audio":{"tag":"voice-10-91","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_244","face":1,"anim":2,"audio":{"tag":"voice-10-91","s":7,"d":5}},{"textKey":"DIALOGUE_NOOT_245","face":2,"anim":4,"audio":{"tag":"voice-10-91","s":13,"d":3}},{"textKey":"DIALOGUE_NOOT_246","face":1,"anim":3,"audio":{"tag":"voice-10-91","s":16,"d":1.5}},{"textKey":"DIALOGUE_NOOT_247","face":3,"anim":4,"audio":{"tag":"voice-10-91","s":18,"d":2}},{"textKey":"DIALOGUE_NOOT_248","face":0,"anim":0,"audio":{"tag":"voice-10-91","s":20,"d":2}},{"textKey":"DIALOGUE_NOOT_249","face":1,"anim":4,"audio":{"tag":"voice-10-92","s":0,"d":2.5}},{"textKey":"DIALOGUE_NOOT_250","face":0,"anim":2,"audio":{"tag":"voice-10-92","s":3,"d":2.5}},{"textKey":"DIALOGUE_NOOT_251","face":4,"anim":0,"audio":{"tag":"voice-10-93","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_252","face":1,"anim":1,"audio":{"tag":"voice-10-94","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_253","face":5,"audio":{"tag":"voice-10-94","s":5,"d":5}},{"textKey":"DIALOGUE_NOOT_254","face":4,"anim":2,"audio":{"tag":"voice-10-94","s":10,"d":3}},{"textKey":"DIALOGUE_NOOT_255","face":1,"audio":{"tag":"voice-10-95","s":2,"d":3}},{"textKey":"DIALOGUE_NOOT_256","face":0,"anim":2,"audio":{"tag":"voice-10-95","s":6,"d":5}},{"textKey":"DIALOGUE_NOOT_257","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":9,"d":2}},{"textKey":"DIALOGUE_NOOT_258","face":0},{"textKey":"DIALOGUE_NOOT_259","face":0},{"textKey":"DIALOGUE_NOOT_260","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_261","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_262","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_263","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_264","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_265","face":1,"anim":0},{"textKey":"DIALOGUE_NOOT_266","face":4,"anim":0},{"textKey":"DIALOGUE_NOOT_267","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_268","face":2,"anim":1},{"textKey":"DIALOGUE_NOOT_269","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_270","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_271","face":3,"anim":0},{"textKey":"DIALOGUE_NOOT_272","face":1,"anim":0},{"textKey":"DIALOGUE_NOOT_273","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_274","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_275","face":0,"audio":{"tag":"voice-10-89","s":23,"d":6.5}},{"textKey":"DIALOGUE_NOOT_276","face":0,"audio":{"tag":"voice-10-89","s":30,"d":5.5}},{"textKey":"DIALOGUE_NOOT_277","face":0,"audio":{"tag":"voice-10-89","s":36,"d":3}},{"textKey":"DIALOGUE_NOOT_278","face":2,"anim":4,"audio":{"tag":"voice-10-89","s":0,"d":9}},{"textKey":"DIALOGUE_NOOT_279","face":0,"anim":2,"audio":{"tag":"voice-10-89","s":10,"d":3}},{"textKey":"DIALOGUE_NOOT_280","face":4,"anim":2,"audio":{"tag":"voice-10-89","s":13,"d":2}},{"textKey":"DIALOGUE_NOOT_281","face":0,"anim":2,"audio":{"tag":"voice-10-89","s":16,"d":6}},{"textKey":"DIALOGUE_NOOT_282","face":1,"anim":2},{"textKey":"DIALOGUE_NOOT_283","face":1,"anim":2,"audio":{"tag":"voice-10-97","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_284","face":1,"anim":2,"audio":{"tag":"voice-10-97","s":4,"d":8}},{"textKey":"DIALOGUE_NOOT_285","face":1,"anim":2},{"textKey":"DIALOGUE_NOOT_286","face":0,"anim":2},{"textKey":"DIALOGUE_NOOT_287","face":5},{"textKey":"DIALOGUE_NOOT_288","face":3,"anim":4},{"textKey":"DIALOGUE_NOOT_289","face":0,"anim":2},{"textKey":"DIALOGUE_POST_ENDGAME_NOOT_TITAN_INTRO_1","face":4,"audio":{"tag":"e907829b-e167-4a74-a007-43560ed75270","s":0,"d":3}},{"textKey":"DIALOGUE_POST_ENDGAME_NOOT_TITAN_INTRO_2","face":4,"audio":{"tag":"6ad06bed-0669-466a-b4e4-e31543f53f3f","s":0,"d":10}},{"textKey":"DIALOGUE_ENDGAME_NOOT_ACADEMY_INTRO","face":0,"audio":{"tag":"800500cb-684b-419e-b760-3509c1005d58","s":0,"d":6}}],"flora":[{"textKey":"DIALOGUE_FLORA_0","face":5,"anim":4,"audio":{"tag":"voice-8-1","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_1","face":3,"audio":{"tag":"voice-8-1","s":6,"d":6}},{"textKey":"DIALOGUE_FLORA_2","face":2,"audio":{"tag":"voice-8-1","s":12,"d":3}},{"textKey":"DIALOGUE_FLORA_3","face":6,"anim":2,"audio":{"tag":"voice-8-1","s":15,"d":5}},{"textKey":"DIALOGUE_FLORA_4","face":2,"audio":{"tag":"voice-8-2","s":0,"d":4}},{"textKey":"DIALOGUE_FLORA_5","face":1,"audio":{"tag":"voice-8-2","s":4,"d":8}},{"textKey":"DIALOGUE_FLORA_6","face":2,"audio":{"tag":"voice-8-2","s":12,"d":3}},{"textKey":"DIALOGUE_FLORA_7","face":1,"audio":{"tag":"voice-8-2","s":15,"d":2}},{"textKey":"DIALOGUE_FLORA_8","face":2,"audio":{"tag":"voice-8-3","s":2.1,"d":6}},{"textKey":"DIALOGUE_FLORA_9","face":5,"audio":{"tag":"voice-8-3","s":4,"d":6}},{"textKey":"DIALOGUE_FLORA_10","face":3,"audio":{"tag":"voice-8-3","s":10,"d":5}},{"textKey":"DIALOGUE_FLORA_11","face":4,"anim":4,"audio":{"tag":"voice-8-4","s":0,"d":7}},{"textKey":"DIALOGUE_FLORA_12","face":6,"audio":{"tag":"voice-8-4","s":7,"d":6}},{"textKey":"DIALOGUE_FLORA_13","face":7,"audio":{"tag":"voice-8-4","s":13,"d":3}},{"textKey":"DIALOGUE_FLORA_14","face":2,"audio":{"tag":"voice-8-5","s":0,"d":5}},{"textKey":"DIALOGUE_FLORA_15","face":0,"audio":{"tag":"voice-8-5","s":5,"d":3}},{"textKey":"DIALOGUE_FLORA_16","face":6,"anim":1,"audio":{"tag":"voice-8-6","s":0,"d":5}},{"textKey":"DIALOGUE_FLORA_17","face":6,"audio":{"tag":"voice-8-6","s":5,"d":8}},{"textKey":"DIALOGUE_FLORA_18","face":3,"audio":{"tag":"voice-8-7","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_19","face":6,"audio":{"tag":"voice-8-7","s":6,"d":5}},{"textKey":"DIALOGUE_FLORA_20","face":1,"audio":{"tag":"voice-8-7","s":11,"d":4}},{"textKey":"DIALOGUE_FLORA_21","face":6,"anim":4,"audio":{"tag":"voice-8-8","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_22","face":7,"audio":{"tag":"voice-8-8","s":6,"d":4}},{"textKey":"DIALOGUE_FLORA_23","face":6,"audio":{"tag":"voice-8-8","s":10,"d":5}},{"textKey":"DIALOGUE_FLORA_24","face":6,"anim":2,"audio":{"tag":"voice-8-9","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_25","face":2,"audio":{"tag":"voice-8-9","s":6,"d":6}},{"textKey":"DIALOGUE_FLORA_26","face":6,"anim":4,"audio":{"tag":"voice-8-9","s":12,"d":4}},{"textKey":"DIALOGUE_FLORA_27","face":2,"audio":{"tag":"voice-8-10","s":0,"d":7}},{"textKey":"DIALOGUE_FLORA_28","face":7,"audio":{"tag":"voice-8-10","s":7,"d":5}},{"textKey":"DIALOGUE_FLORA_29","face":0,"audio":{"tag":"voice-8-10","s":12,"d":4}},{"textKey":"DIALOGUE_FLORA_30","face":6,"anim":2,"audio":{"tag":"voice-8-10","s":16,"d":3}},{"textKey":"DIALOGUE_FLORA_31","face":6,"anim":4,"audio":{"tag":"voice-8-11","s":0,"d":9}},{"textKey":"DIALOGUE_FLORA_32","face":6,"audio":{"tag":"voice-8-11","s":9,"d":5}},{"textKey":"DIALOGUE_FLORA_33","face":3,"audio":{"tag":"voice-8-12","s":0,"d":4}},{"textKey":"DIALOGUE_FLORA_34","face":2,"audio":{"tag":"voice-8-12","s":4,"d":6}},{"textKey":"DIALOGUE_FLORA_35","face":4,"anim":4,"audio":{"tag":"voice-8-12","s":10,"d":6}},{"textKey":"DIALOGUE_FLORA_36","face":5,"audio":{"tag":"voice-8-13","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_37","face":4,"audio":{"tag":"voice-8-13","s":6,"d":3}},{"textKey":"DIALOGUE_FLORA_38","face":0,"anim":2,"audio":{"tag":"voice-8-14","s":0,"d":2}},{"textKey":"DIALOGUE_FLORA_39","face":4,"anim":2,"audio":{"tag":"voice-8-14","s":2,"d":2}}],"bok":[{"textKey":"DIALOGUE_BOK_0","face":0,"anim":4,"audio":{"tag":"voice-1-1","s":0,"d":5}},{"textKey":"DIALOGUE_BOK_1","face":7,"anim":2,"audio":{"tag":"voice-1-1","s":5,"d":8}},{"textKey":"DIALOGUE_BOK_2","face":2,"audio":{"tag":"voice-1-1","s":13,"d":1}},{"textKey":"DIALOGUE_BOK_3","face":1,"audio":{"tag":"voice-1-2","s":0,"d":8}},{"textKey":"DIALOGUE_BOK_4","face":6,"anim":1,"audio":{"tag":"voice-1-2","s":8,"d":8}},{"textKey":"DIALOGUE_BOK_5","face":3,"audio":{"tag":"voice-1-2","s":16,"d":6}},{"textKey":"DIALOGUE_BOK_6","face":4,"audio":{"tag":"voice-1-2","s":22,"d":7}},{"textKey":"DIALOGUE_BOK_7","face":8,"audio":{"tag":"voice-1-3","s":0,"d":8}},{"textKey":"DIALOGUE_BOK_8","face":6,"audio":{"tag":"voice-1-3","s":8,"d":8}},{"textKey":"DIALOGUE_BOK_9","face":3,"audio":{"tag":"voice-1-3","s":16,"d":6}},{"textKey":"DIALOGUE_BOK_10","face":0,"audio":{"tag":"voice-1-4","s":0,"d":5}},{"textKey":"DIALOGUE_BOK_11","face":1,"audio":{"tag":"voice-1-4","s":5,"d":6}},{"textKey":"DIALOGUE_BOK_12","face":5,"audio":{"tag":"voice-1-5","s":0,"d":9}},{"textKey":"DIALOGUE_BOK_13","face":0,"audio":{"tag":"voice-1-5","s":9,"d":9}},{"textKey":"DIALOGUE_BOK_14","face":3,"anim":2,"audio":{"tag":"voice-1-5","s":18,"d":6}},{"textKey":"DIALOGUE_BOK_15","face":8,"audio":{"tag":"voice-1-5","s":24,"d":10}},{"textKey":"DIALOGUE_BOK_16","face":5,"audio":{"tag":"voice-1-5","s":34,"d":12}},{"textKey":"DIALOGUE_BOK_17","face":4,"audio":{"tag":"voice-1-6","s":0,"d":11}},{"textKey":"DIALOGUE_BOK_18","face":8,"anim":2,"audio":{"tag":"voice-1-6","s":11,"d":8}},{"textKey":"DIALOGUE_BOK_19","face":3,"anim":4,"audio":{"tag":"voice-1-6","s":19,"d":2}},{"textKey":"DIALOGUE_BOK_20","face":0,"audio":{"tag":"voice-1-7","s":0,"d":7}},{"textKey":"DIALOGUE_BOK_21","face":8,"audio":{"tag":"voice-1-8","s":0,"d":7}},{"textKey":"DIALOGUE_BOK_22","face":0,"audio":{"tag":"voice-1-8","s":7,"d":5}},{"textKey":"DIALOGUE_BOK_23","face":5,"audio":{"tag":"voice-1-9","s":0,"d":6}},{"textKey":"DIALOGUE_BOK_24","face":1,"audio":{"tag":"voice-1-9","s":6,"d":7}},{"textKey":"DIALOGUE_BOK_25","face":8,"audio":{"tag":"voice-1-9","s":13,"d":7}},{"textKey":"DIALOGUE_BOK_26","face":3,"audio":{"tag":"voice-1-10","s":0,"d":9}},{"textKey":"DIALOGUE_BOK_27","face":0,"audio":{"tag":"voice-1-11","s":0,"d":10}},{"textKey":"DIALOGUE_BOK_28","face":4,"audio":{"tag":"voice-1-11","s":10,"d":7}},{"textKey":"DIALOGUE_BOK_29","face":6,"audio":{"tag":"voice-1-11","s":17,"d":8}},{"textKey":"DIALOGUE_BOK_30","face":0,"audio":{"tag":"voice-1-12","s":0,"d":3}},{"textKey":"DIALOGUE_BOK_31","face":3,"audio":{"tag":"voice-1-12","s":3,"d":5}},{"textKey":"DIALOGUE_BOK_32","face":5,"audio":{"tag":"voice-1-12","s":8,"d":5}},{"textKey":"DIALOGUE_BOK_33","face":1,"audio":{"tag":"voice-1-12","s":13,"d":8}},{"textKey":"DIALOGUE_BOK_34","face":3,"anim":4,"audio":{"tag":"voice-1-13","s":0,"d":7}},{"textKey":"DIALOGUE_BOK_35","face":4,"audio":{"tag":"voice-1-13","s":7,"d":4}},{"textKey":"DIALOGUE_BOK_36","face":1,"anim":4,"audio":{"tag":"voice-1-14","s":7,"d":6}},{"textKey":"DIALOGUE_BOK_37","face":5,"audio":{"tag":"voice-1-14","s":13,"d":9}},{"textKey":"DIALOGUE_BOK_38","face":7,"anim":4,"audio":{"tag":"voice-1-15","s":0,"d":8}},{"textKey":"DIALOGUE_BOK_39","face":5}],"merchant":[{"textKey":"DIALOGUE_MERCHANT_0","face":0,"anim":4,"audio":{"tag":"voice-11","s":0,"d":4}},{"textKey":"DIALOGUE_MERCHANT_1","face":0,"anim":2,"audio":{"tag":"voice-11","s":24,"d":3}},{"textKey":"DIALOGUE_MERCHANT_2","face":0,"anim":4,"audio":{"tag":"voice-11","s":6,"d":3}},{"textKey":"DIALOGUE_MERCHANT_3","face":0,"audio":{"tag":"voice-11","s":9,"d":5}},{"textKey":"DIALOGUE_MERCHANT_4","face":0,"audio":{"tag":"voice-11","s":19,"d":5}},{"textKey":"DIALOGUE_MERCHANT_5","face":0,"audio":{"tag":"voice-11","s":14,"d":5}},{"textKey":"DIALOGUE_MERCHANT_6","face":0,"audio":{"tag":"voice-11","s":4,"d":2}},{"textKey":"DIALOGUE_MERCHANT_7","face":0,"audio":{"tag":"voice-11-1","s":0,"d":6}},{"textKey":"DIALOGUE_MERCHANT_8","face":0,"audio":{"tag":"voice-11-1","s":6,"d":4}},{"textKey":"DIALOGUE_MERCHANT_9","face":0,"audio":{"tag":"voice-11-2","s":0,"d":4}},{"textKey":"DIALOGUE_MERCHANT_10","face":0,"audio":{"tag":"voice-11-2","s":4,"d":6}},{"textKey":"DIALOGUE_MERCHANT_11","face":0,"audio":{"tag":"voice-11-2","s":10,"d":4}},{"textKey":"DIALOGUE_MERCHANT_12","face":0,"audio":{"tag":"voice-11-2","s":14,"d":5}},{"textKey":"DIALOGUE_MERCHANT_13"},{"textKey":"DIALOGUE_MERCHANT_14"},{"textKey":"DIALOGUE_MERCHANT_15"},{"textKey":"DIALOGUE_MERCHANT_16"},{"textKey":"DIALOGUE_MERCHANT_17"},{"textKey":"DIALOGUE_MERCHANT_18","face":0},{"textKey":"DIALOGUE_MERCHANT_19","face":0},{"textKey":"DIALOGUE_MERCHANT_20","face":0},{"textKey":"DIALOGUE_MERCHANT_21","face":0},{"textKey":"DIALOGUE_MERCHANT_22","face":0},{"textKey":"DIALOGUE_MERCHANT_23","face":0},{"textKey":"DIALOGUE_MERCHANT_24","face":0},{"textKey":"DIALOGUE_MERCHANT_25","face":0},{"textKey":"DIALOGUE_MERCHANT_26","face":0},{"textKey":"DIALOGUE_MERCHANT_27","face":0},{"textKey":"DIALOGUE_MERCHANT_28","face":0},{"textKey":"DIALOGUE_MERCHANT_29","face":0},{"textKey":"DIALOGUE_MERCHANT_30","face":0},{"textKey":"DIALOGUE_MERCHANT_31","face":0},{"textKey":"DIALOGUE_MERCHANT_32","face":0},{"textKey":"DIALOGUE_MERCHANT_33","face":0},{"textKey":"DIALOGUE_MERCHANT_34","face":0},{"textKey":"DIALOGUE_MERCHANT_35","face":0},{"textKey":"DIALOGUE_MERCHANT_36","face":0},{"textKey":"DIALOGUE_MERCHANT_37","face":1,"anim":1,"audio":{"tag":"voice-11-3","s":0,"d":6}},{"textKey":"DIALOGUE_MERCHANT_38","face":1,"anim":2,"audio":{"tag":"voice-11-3","s":6,"d":4}},{"textKey":"DIALOGUE_MERCHANT_39","face":1,"audio":{"tag":"voice-11-3","s":10,"d":8}}],"winterfest":[{"textKey":"DIALOGUE_WINTERFEST_0","audio":{}},{"textKey":"DIALOGUE_WINTERFEST_1","audio":{}}],"benni":[{"textKey":"DIALOGUE_BENNI_0","face":7,"anim":4,"audio":{"tag":"voice-12-1","s":0,"d":2}},{"textKey":"DIALOGUE_BENNI_1","face":4,"anim":4,"audio":{"tag":"voice-12-1","s":2,"d":2}},{"textKey":"DIALOGUE_BENNI_2","face":1,"anim":2,"audio":{"tag":"voice-12-2","s":0,"d":5.05}},{"textKey":"DIALOGUE_BENNI_3","face":6,"anim":2,"audio":{"tag":"voice-12-2","s":5,"d":3}},{"textKey":"DIALOGUE_BENNI_4","face":10,"anim":2,"audio":{"tag":"voice-12-2","s":8,"d":2}},{"textKey":"DIALOGUE_BENNI_5","face":1,"anim":2,"audio":{"tag":"voice-12-2","s":10,"d":4}},{"textKey":"DIALOGUE_BENNI_6","face":6,"anim":1,"audio":{"tag":"voice-12-2","s":14,"d":6}},{"textKey":"DIALOGUE_BENNI_7","face":10,"anim":2,"audio":{"tag":"voice-12-2","s":20,"d":5}},{"textKey":"DIALOGUE_BENNI_8","face":0,"anim":4,"audio":{"tag":"voice-12-3","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_9","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":0,"d":6}},{"textKey":"DIALOGUE_BENNI_10","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":6,"d":10}},{"textKey":"DIALOGUE_BENNI_11","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":16,"d":3}},{"textKey":"DIALOGUE_BENNI_12","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":19,"d":6}},{"textKey":"DIALOGUE_BENNI_13","face":2,"audio":{"tag":"voice-12-5","s":0,"d":6}},{"textKey":"DIALOGUE_BENNI_14","face":2,"anim":2,"audio":{"tag":"voice-12-5","s":6,"d":4}},{"textKey":"DIALOGUE_BENNI_15","face":1,"anim":2,"audio":{"tag":"voice-12-5","s":10,"d":3}},{"textKey":"DIALOGUE_BENNI_16","face":0,"anim":2,"audio":{"tag":"voice-12-6","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_17","face":9,"audio":{"tag":"voice-12-6","s":5,"d":3}},{"textKey":"DIALOGUE_BENNI_18","face":1,"anim":1,"audio":{"tag":"voice-12-6","s":8,"d":9}},{"textKey":"DIALOGUE_BENNI_19","face":3,"audio":{"tag":"voice-12-7","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_20","face":8,"anim":2,"audio":{"tag":"voice-12-7","s":5,"d":5}},{"textKey":"DIALOGUE_BENNI_21","face":1,"anim":2,"audio":{"tag":"voice-12-7","s":10,"d":6}},{"textKey":"DIALOGUE_BENNI_22","face":0,"anim":2,"audio":{"tag":"voice-12-7","s":16,"d":4}},{"textKey":"DIALOGUE_BENNI_23","face":1,"anim":4,"audio":{"tag":"voice-12-8","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_24","face":5,"anim":2,"audio":{"tag":"voice-12-8","s":5,"d":2}},{"textKey":"DIALOGUE_BENNI_25","face":0,"anim":2,"audio":{"tag":"voice-12-9","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_26","face":4,"anim":4,"audio":{"tag":"voice-12-10","s":0,"d":4}},{"textKey":"DIALOGUE_BENNI_27","face":8,"anim":2,"audio":{"tag":"voice-12-10","s":4,"d":2}},{"textKey":"DIALOGUE_BENNI_28","face":1,"anim":2,"audio":{"tag":"voice-12-10","s":6,"d":6}},{"textKey":"DIALOGUE_BENNI_29","face":5,"anim":2,"audio":{"tag":"voice-12-11","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_30","face":0,"anim":2,"audio":{"tag":"voice-12-12","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_31","face":0,"anim":2,"audio":{"tag":"voice-12-13","s":0,"d":4}},{"textKey":"DIALOGUE_BENNI_32","face":8,"anim":2,"audio":{"tag":"voice-12-13","s":4,"d":3}},{"textKey":"DIALOGUE_BENNI_33","face":1,"anim":2,"audio":{"tag":"voice-12-13","s":7,"d":6}},{"textKey":"DIALOGUE_BENNI_34","face":9,"audio":{"tag":"voice-12-14","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_35","face":3,"anim":1,"audio":{"tag":"voice-12-14","s":3,"d":4}},{"textKey":"DIALOGUE_BENNI_36","face":5,"anim":2,"audio":{"tag":"voice-12-14","s":7,"d":4}},{"textKey":"DIALOGUE_BENNI_37","face":2,"anim":2,"audio":{"tag":"voice-12-15","s":0,"d":7}},{"textKey":"DIALOGUE_BENNI_38","face":6,"anim":2,"audio":{"tag":"voice-12-15","s":7,"d":2}},{"textKey":"DIALOGUE_BENNI_39","face":2,"anim":4,"audio":{"tag":"voice-12-16","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_40","face":6,"anim":1,"audio":{"tag":"voice-12-16","s":3,"d":3}},{"textKey":"DIALOGUE_BENNI_41","face":15,"anim":4,"audio":{"tag":"voice-12-16","s":6,"d":7}},{"textKey":"DIALOGUE_BENNI_42","face":0,"anim":2,"audio":{"tag":"voice-12-17","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_43","face":8,"anim":4,"audio":{"tag":"voice-12-17","s":5,"d":3}},{"textKey":"DIALOGUE_BENNI_44","face":4,"audio":{"tag":"voice-12-17","s":8,"d":3}},{"textKey":"DIALOGUE_BENNI_45","face":15,"anim":4,"audio":{"tag":"voice-12-17","s":11,"d":2}},{"textKey":"DIALOGUE_BENNI_46","face":4,"anim":2,"audio":{"tag":"voice-12-18","s":0,"d":3}}],"broccolina":[{"textKey":"DIALOGUE_BROCCOLINA_0","face":0,"anim":2,"audio":{"tag":"voice-13-1","s":0,"d":5}},{"textKey":"DIALOGUE_BROCCOLINA_1","face":3,"anim":2},{"textKey":"DIALOGUE_BROCCOLINA_2","face":3,"anim":2,"audio":{"tag":"voice-12-1","s":0,"d":2}}],"eugene":[{"textKey":"DIALOGUE_EUGENE_0","face":3,"anim":4,"audio":{"tag":"voice-14-1","s":0,"d":4}},{"textKey":"DIALOGUE_EUGENE_1","face":0,"anim":2,"audio":{"tag":"voice-14-2","s":0,"d":4}},{"textKey":"DIALOGUE_EUGENE_2","face":1,"anim":2,"audio":{"tag":"voice-14-2","s":4,"d":6}},{"textKey":"DIALOGUE_EUGENE_3","face":4,"anim":4,"audio":{"tag":"voice-14-2","s":10,"d":2}},{"textKey":"DIALOGUE_EUGENE_4","face":2,"anim":2,"audio":{"tag":"voice-14-2","s":12,"d":4}},{"textKey":"DIALOGUE_EUGENE_5","face":0,"anim":2,"audio":{"tag":"voice-14-2","s":16,"d":9}},{"textKey":"DIALOGUE_EUGENE_6","face":4,"anim":1,"audio":{"tag":"voice-14-2","s":25,"d":6}}],"cebollini":[{"textKey":"DIALOGUE_CEBOLLINI_0","face":0,"anim":2,"audio":{"tag":"voice-18-2","s":0,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_1","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":0,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_2","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":3,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_3","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":6,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_4","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":11,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_5","face":0,"anim":2,"audio":{"tag":"voice-18-4","s":0,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_6","face":0,"anim":2,"audio":{"tag":"voice-18-4","s":3,"d":7}},{"textKey":"DIALOGUE_CEBOLLINI_7","face":0,"anim":2,"audio":{"tag":"voice-18-4","s":10,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_8","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":0,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_9","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":5,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_10","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":10,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_11","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":13,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_12","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":17,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_13","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":20,"d":9}},{"textKey":"DIALOGUE_CEBOLLINI_14","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":29,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_15","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":33,"d":7}},{"textKey":"DIALOGUE_CEBOLLINI_16","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":0,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_17","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":5,"d":9}},{"textKey":"DIALOGUE_CEBOLLINI_18","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":14,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_19","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":17,"d":4}}],"slime_queen":[{"textKey":"DIALOGUE_SLIME_QUEEN_0","face":0,"anim":2,"audio":{"tag":"voice-16-3","s":0,"d":7}},{"textKey":"DIALOGUE_SLIME_QUEEN_1","face":1,"anim":2},{"textKey":"DIALOGUE_SLIME_QUEEN_2","face":5,"anim":1,"audio":{"tag":"voice-16-3","s":7,"d":4}},{"textKey":"DIALOGUE_SLIME_QUEEN_3","face":5,"anim":4,"audio":{"tag":"voice-16-3","s":11,"d":8}},{"textKey":"DIALOGUE_SLIME_QUEEN_4","face":5,"anim":1,"audio":{"tag":"voice-16-3","s":19,"d":7}},{"textKey":"DIALOGUE_SLIME_QUEEN_5","face":0,"anim":2,"audio":{"tag":"voice-16-1","s":0,"d":5}},{"textKey":"DIALOGUE_SLIME_QUEEN_6","face":0,"anim":2,"audio":{"tag":"voice-16-3","s":7.8,"d":0.85}},{"textKey":"DIALOGUE_SLIME_QUEEN_7","face":2,"anim":2,"audio":{"tag":"voice-16-1","s":5,"d":6}},{"textKey":"DIALOGUE_SLIME_QUEEN_8","face":0,"anim":2,"audio":{"tag":"voice-16-1","s":11,"d":8}},{"textKey":"DIALOGUE_SLIME_QUEEN_9","face":4,"anim":2,"audio":{"tag":"voice-16-1","s":19,"d":10}},{"textKey":"DIALOGUE_SLIME_QUEEN_10","face":4,"anim":1,"audio":{"tag":"voice-16-2","s":0,"d":5}}],"slime_guard":[{"textKey":"DIALOGUE_SLIME_GUARD_0","face":0,"anim":2,"audio":{"tag":"voice-17-3","s":0,"d":3}},{"textKey":"DIALOGUE_SLIME_GUARD_1","face":3,"anim":2,"audio":{"tag":"voice-17-4","s":0,"d":4}},{"textKey":"DIALOGUE_SLIME_GUARD_2","face":0,"anim":1,"audio":{"tag":"voice-17-4","s":4,"d":4}},{"textKey":"DIALOGUE_SLIME_GUARD_3","face":1,"anim":2,"audio":{"tag":"voice-17-4","s":8,"d":4}},{"textKey":"DIALOGUE_SLIME_GUARD_4","face":2,"anim":1,"audio":{"tag":"voice-17-4","s":12,"d":5}},{"textKey":"DIALOGUE_SLIME_GUARD_5","face":4,"anim":2,"audio":{"tag":"voice-17-2","s":0,"d":6}}],"slime_worker":[{"textKey":"DIALOGUE_SLIME_WORKER_0","face":3,"anim":1,"audio":{"tag":"voice-17-1","s":0,"d":4}},{"textKey":"DIALOGUE_SLIME_WORKER_1","face":2,"anim":2,"audio":{"tag":"voice-17-1","s":4,"d":6}}],"slurpy":[{"textKey":"DIALOGUE_SLURPY_0","face":1,"anim":2,"audio":{"tag":"voice-15-2","s":0,"d":3}},{"textKey":"DIALOGUE_SLURPY_1","face":1,"anim":4,"audio":{"tag":"voice-15-7","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_2","face":0,"anim":2,"audio":{"tag":"voice-15-1","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_3","face":4,"anim":4,"audio":{"tag":"voice-15-1","s":6,"d":7}},{"textKey":"DIALOGUE_SLURPY_4","face":0,"anim":2,"audio":{"tag":"voice-15-1","s":13,"d":5}},{"textKey":"DIALOGUE_SLURPY_5","face":4,"anim":2,"audio":{"tag":"voice-15-1","s":18,"d":5}},{"textKey":"DIALOGUE_SLURPY_6","face":1,"anim":4,"audio":{"tag":"voice-15-3","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_7","face":4,"anim":2,"audio":{"tag":"voice-15-3","s":4,"d":4}},{"textKey":"DIALOGUE_SLURPY_8","face":1,"anim":4,"audio":{"tag":"voice-15-4","s":0,"d":9}},{"textKey":"DIALOGUE_SLURPY_9","face":4,"anim":2,"audio":{"tag":"voice-15-4","s":9,"d":7}},{"textKey":"DIALOGUE_SLURPY_10","face":1,"anim":2,"audio":{"tag":"voice-15-5","s":0,"d":9}},{"textKey":"DIALOGUE_SLURPY_11","face":0,"anim":2,"audio":{"tag":"voice-15-5","s":9,"d":3}},{"textKey":"DIALOGUE_SLURPY_12","face":2,"anim":1,"audio":{"tag":"voice-15-5","s":12,"d":6}},{"textKey":"DIALOGUE_SLURPY_13","face":4,"anim":2,"audio":{"tag":"voice-15-6","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_14","face":0,"anim":2,"audio":{"tag":"voice-15-6","s":6,"d":3}},{"textKey":"DIALOGUE_SLURPY_15","face":1,"anim":4,"audio":{"tag":"voice-15-8","s":0,"d":7}},{"textKey":"DIALOGUE_SLURPY_16","face":2,"anim":1,"audio":{"tag":"voice-15-8","s":7,"d":6}},{"textKey":"DIALOGUE_SLURPY_17","face":3,"anim":4,"audio":{"tag":"voice-15-9","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_18","face":2,"anim":1,"audio":{"tag":"voice-15-9","s":6,"d":7}},{"textKey":"DIALOGUE_SLURPY_19","face":4,"anim":2,"audio":{"tag":"voice-15-9","s":13,"d":4}},{"textKey":"DIALOGUE_SLURPY_20","face":1,"anim":4,"audio":{"tag":"voice-15-9","s":17,"d":2}},{"textKey":"DIALOGUE_SLURPY_21","face":4,"anim":2,"audio":{"tag":"voice-15-9","s":19,"d":7}},{"textKey":"DIALOGUE_SLURPY_22","face":1,"anim":2,"audio":{"tag":"voice-15-10","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_23","face":4,"anim":2,"audio":{"tag":"voice-15-10","s":6,"d":6}},{"textKey":"DIALOGUE_SLURPY_24","face":0,"anim":2,"audio":{"tag":"voice-15-10","s":12,"d":2}},{"textKey":"DIALOGUE_SLURPY_25","face":2,"anim":1,"audio":{"tag":"voice-15-11","s":0,"d":7}},{"textKey":"DIALOGUE_SLURPY_26","face":0,"anim":2,"audio":{"tag":"voice-15-11","s":7,"d":6}},{"textKey":"DIALOGUE_SLURPY_27","face":1,"anim":4,"audio":{"tag":"voice-15-12","s":0,"d":10}},{"textKey":"DIALOGUE_SLURPY_28","face":4,"anim":2,"audio":{"tag":"voice-15-12","s":10,"d":5}},{"textKey":"DIALOGUE_SLURPY_29","face":3,"anim":4,"audio":{"tag":"voice-15-13","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_30","face":0,"anim":2},{"textKey":"DIALOGUE_SLURPY_31","face":0,"anim":2,"audio":{"tag":"voice-15-13","s":4,"d":5}},{"textKey":"DIALOGUE_SLURPY_32","face":0,"anim":2,"audio":{"tag":"voice-15-13","s":9,"d":6}},{"textKey":"DIALOGUE_SLURPY_33","face":4,"anim":2,"audio":{"tag":"voice-15-13","s":15,"d":8}},{"textKey":"DIALOGUE_SLURPY_34","face":4,"anim":2,"audio":{"tag":"voice-15-13","s":23,"d":4}},{"textKey":"DIALOGUE_SLURPY_35","face":4,"anim":2,"audio":{"tag":"voice-15-14","s":0,"d":3}},{"textKey":"DIALOGUE_SLURPY_36","face":0,"anim":2,"audio":{"tag":"voice-15-14","s":3,"d":5}},{"textKey":"DIALOGUE_SLURPY_37","face":0,"anim":2,"audio":{"tag":"voice-15-14","s":8,"d":6}},{"textKey":"DIALOGUE_SLURPY_38","face":3,"anim":1,"audio":{"tag":"voice-15-16","s":0,"d":8}},{"textKey":"DIALOGUE_SLURPY_39","face":4,"anim":4,"audio":{"tag":"voice-15-16","s":8,"d":2}},{"textKey":"DIALOGUE_SLURPY_40","face":0,"anim":2,"audio":{"tag":"voice-15-16","s":10,"d":6}},{"textKey":"DIALOGUE_SLURPY_41","face":1,"anim":4,"audio":{"tag":"voice-15-17","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_42","face":0,"anim":2,"audio":{"tag":"voice-15-17","s":4,"d":4}},{"textKey":"DIALOGUE_SLURPY_43","face":2,"anim":4,"audio":{"tag":"voice-15-17","s":8,"d":3}},{"textKey":"DIALOGUE_SLURPY_44","face":2,"anim":1,"audio":{"tag":"voice-15-17","s":11,"d":2}},{"textKey":"DIALOGUE_SLURPY_45","face":0,"anim":2,"audio":{"tag":"voice-15-17","s":13,"d":7}},{"textKey":"DIALOGUE_SLURPY_46","face":4,"anim":2,"audio":{"tag":"voice-15-17","s":20,"d":2}},{"textKey":"DIALOGUE_SLURPY_47","face":1,"anim":4,"audio":{"tag":"voice-15-17","s":22,"d":5}},{"textKey":"DIALOGUE_SLURPY_48","face":1,"anim":4,"audio":{"tag":"voice-15-18","s":0,"d":5}},{"textKey":"DIALOGUE_SLURPY_49","face":4,"anim":2,"audio":{"tag":"voice-15-18","s":5,"d":9}}],"puppetmaster":[{"textKey":"DIALOGUE_PUPPET_MASTER_0","face":0,"audio":{"tag":"voice-20-1","s":0,"d":10}},{"textKey":"DIALOGUE_PUPPET_MASTER_1","face":2,"anim":4,"audio":{"tag":"voice-20-1","s":10,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_2","face":0,"audio":{"tag":"voice-20-1","s":15,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_3","face":0,"audio":{"tag":"voice-20-1","s":20,"d":10}},{"textKey":"DIALOGUE_PUPPET_MASTER_4","face":2,"audio":{"tag":"voice-20-1","s":30,"d":3}},{"textKey":"DIALOGUE_PUPPET_MASTER_5","face":1,"anim":2,"audio":{"tag":"voice-20-1","s":33,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_6","face":3,"anim":1,"audio":{"tag":"voice-20-1","s":38,"d":3}},{"textKey":"DIALOGUE_PUPPET_MASTER_7","face":3,"anim":1,"audio":{"tag":"voice-20-1","s":41,"d":4.3}},{"textKey":"DIALOGUE_PUPPET_MASTER_8","face":1,"audio":{"tag":"voice-20-1","s":48,"d":2}},{"textKey":"DIALOGUE_PUPPET_MASTER_9","face":2,"anim":2,"audio":{"tag":"voice-20-1","s":50,"d":6}},{"textKey":"DIALOGUE_PUPPET_MASTER_10","face":2,"anim":2,"audio":{"tag":"voice-20-2","s":0,"d":8}},{"textKey":"DIALOGUE_PUPPET_MASTER_11","face":1,"anim":4,"audio":{"tag":"voice-20-2","s":9,"d":11}},{"textKey":"DIALOGUE_PUPPET_MASTER_12","face":0,"anim":4,"audio":{"tag":"voice-20-2","s":21,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_13","face":2,"anim":2,"audio":{"tag":"voice-20-2","s":26,"d":6}},{"textKey":"DIALOGUE_PUPPET_MASTER_14","face":2,"anim":2,"audio":{"tag":"voice-20-2","s":33,"d":6}}],"pippet":[{"textKey":"DIALOGUE_PIPPIT_0","face":1,"anim":2,"audio":{"tag":"voice-19-1","s":0,"d":5}},{"textKey":"DIALOGUE_PIPPIT_1","face":3,"anim":2,"audio":{"tag":"voice-19-1","s":5,"d":8}},{"textKey":"DIALOGUE_PIPPIT_2","face":4,"anim":2,"audio":{"tag":"voice-19-1","s":13,"d":8}},{"textKey":"DIALOGUE_PIPPIT_3","face":5,"anim":4,"audio":{"tag":"voice-28-1","s":0,"d":6}},{"textKey":"DIALOGUE_PIPPIT_4","face":3,"anim":2,"audio":{"tag":"voice-28-1","s":7,"d":4.5}},{"textKey":"DIALOGUE_PIPPIT_5","face":0,"anim":4,"audio":{"tag":"voice-28-1","s":12,"d":4}},{"textKey":"DIALOGUE_PIPPIT_6","face":5,"anim":2,"audio":{"tag":"voice-28-1","s":17,"d":6}},{"textKey":"DIALOGUE_PIPPIT_7","face":5,"anim":4,"audio":{"tag":"voice-28-1","s":25,"d":5}},{"textKey":"DIALOGUE_PIPPIT_8","face":0,"anim":2,"audio":{"tag":"voice-28-1","s":31,"d":7}},{"textKey":"DIALOGUE_PIPPIT_9","face":5,"anim":4}],"julia_ghoulia":[{"textKey":"DIALOGUE_JULIA_GHOULIA_0","face":0,"anim":2,"audio":{"tag":"voice-21-2","s":0,"d":6}},{"textKey":"DIALOGUE_JULIA_GHOULIA_1","face":0,"anim":4,"audio":{"tag":"voice-21-1","s":0,"d":3}},{"textKey":"DIALOGUE_JULIA_GHOULIA_2","face":0,"anim":2,"audio":{"tag":"voice-21-1","s":3,"d":7}},{"textKey":"DIALOGUE_JULIA_GHOULIA_3","face":0,"anim":2,"audio":{"tag":"voice-21-1","s":10,"d":5}},{"textKey":"DIALOGUE_JULIA_GHOULIA_4","face":0,"anim":2,"audio":{"tag":"voice-21-1","s":15,"d":11}},{"textKey":"DIALOGUE_JULIA_GHOULIA_5","face":0,"anim":4,"audio":{"tag":"voice-21-1","s":26,"d":7}}],"mama_star":[{"textKey":"DIALOGUE_MAMA_STAR_0","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":34,"d":5}},{"textKey":"DIALOGUE_MAMA_STAR_1","face":0,"anim":4,"audio":{"tag":"voice-22-1","s":37.4,"d":10}},{"textKey":"DIALOGUE_MAMA_STAR_2","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":49,"d":7}},{"textKey":"DIALOGUE_MAMA_STAR_3","face":0,"anim":4,"audio":{"tag":"voice-22-1","s":0,"d":6}},{"textKey":"DIALOGUE_MAMA_STAR_4","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":6,"d":5.4}},{"textKey":"DIALOGUE_MAMA_STAR_5","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":11.4,"d":4}},{"textKey":"DIALOGUE_MAMA_STAR_6","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":15.4,"d":9.6}},{"textKey":"DIALOGUE_MAMA_STAR_7","face":0,"anim":4,"audio":{"tag":"voice-22-1","s":25.4,"d":6.6}},{"textKey":"DIALOGUE_MAMA_STAR_8","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":0,"d":7}},{"textKey":"DIALOGUE_MAMA_STAR_9","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":7,"d":5}},{"textKey":"DIALOGUE_MAMA_STAR_10","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":12,"d":9}},{"textKey":"DIALOGUE_MAMA_STAR_11","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":21,"d":10}},{"textKey":"DIALOGUE_MAMA_STAR_12","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":31,"d":9}},{"textKey":"DIALOGUE_MAMA_STAR_13","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":40,"d":6}},{"textKey":"DIALOGUE_MAMA_STAR_14","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":46,"d":8}},{"textKey":"DIALOGUE_MAMA_STAR_15","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":54,"d":8}},{"textKey":"DIALOGUE_MAMA_STAR_16","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":62,"d":5}}],"toy":[{"textKey":"DIALOGUE_TOY_0","face":0,"audio":{"tag":"voice-23-1","s":0,"d":8}},{"textKey":"DIALOGUE_TOY_1","face":0,"audio":{"tag":"voice-23-1","s":8,"d":4}},{"textKey":"DIALOGUE_TOY_2","face":0,"audio":{"tag":"voice-23-1","s":8,"d":4}},{"textKey":"DIALOGUE_TOY_3","face":0,"audio":{"tag":"voice-23-2","s":12.6,"d":10.4}},{"textKey":"DIALOGUE_TOY_4","face":0,"audio":{"tag":"voice-23-2","s":23.1,"d":9}},{"textKey":"DIALOGUE_TOY_5","face":0,"audio":{"tag":"voice-23-2","s":32.4,"d":9.6}},{"textKey":"DIALOGUE_TOY_6","face":0,"audio":{"tag":"voice-23-2","s":42,"d":8}},{"textKey":"DIALOGUE_TOY_7","face":0,"audio":{"tag":"voice-23-2","s":50,"d":9}},{"textKey":"DIALOGUE_TOY_8","face":0,"audio":{"tag":"voice-23-2","s":59,"d":7.3}},{"textKey":"DIALOGUE_TOY_9","face":0,"audio":{"tag":"voice-23-2","s":67.5,"d":8.5}},{"textKey":"DIALOGUE_TOY_10","face":0,"audio":{"tag":"voice-23-2","s":0,"d":7}},{"textKey":"DIALOGUE_TOY_11","face":0,"audio":{"tag":"voice-23-2","s":7,"d":6}},{"textKey":"DIALOGUE_TOY_12","face":0},{"textKey":"DIALOGUE_TOY_13","face":0,"audio":{"tag":"voice-23-3","s":0,"d":5}},{"textKey":"DIALOGUE_TOY_14","face":0,"audio":{"tag":"voice-23-3","s":22,"d":9}},{"textKey":"DIALOGUE_TOY_15","face":0,"audio":{"tag":"voice-23-3","s":31,"d":6}},{"textKey":"DIALOGUE_TOY_16","face":0,"audio":{"tag":"voice-23-3","s":5,"d":9}},{"textKey":"DIALOGUE_TOY_17","face":0,"audio":{"tag":"voice-23-3","s":14,"d":8}}],"howard_cornelius":[{"textKey":"DIALOGUE_HOWARD_CORNELIUS_0","face":0,"anim":4,"audio":{"tag":"voice-24-1","s":21.9,"d":5.1}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_1","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":27,"d":2.25}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_2","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":29.25,"d":3.5}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_3","face":0,"anim":4,"audio":{"tag":"voice-24-1","s":0,"d":5}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_4","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":5.9,"d":8}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_5","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":13.9,"d":8}}],"sir-vey":[{"textKey":"DIALOGUE_SIR_VEY_0","anim":4,"face":0},{"textKey":"DIALOGUE_SIR_VEY_1","anim":4,"face":1}],"mozza-ella":[{"textKey":"DIALOGUE_MOZZA_ELLE_0","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_1","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_2","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_3","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_4","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_5","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_6","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_7","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_8","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_9","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_10","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_11","face":1}],"potion":[{"textKey":"DIALOGUE_POTION_0","face":1},{"textKey":"DIALOGUE_POTION_1","face":0},{"textKey":"DIALOGUE_POTION_2","face":1},{"textKey":"DIALOGUE_POTION_3","face":0},{"textKey":"DIALOGUE_POTION_4","face":0},{"textKey":"DIALOGUE_POTION_5","face":1},{"textKey":"DIALOGUE_POTION_6","face":0},{"textKey":"DIALOGUE_POTION_7","face":0}],"swoopy":[{"textKey":"DIALOGUE_SWOOPY_0","face":1},{"textKey":"DIALOGUE_SWOOPY_1","face":0},{"textKey":"DIALOGUE_SWOOPY_2","face":1},{"textKey":"DIALOGUE_SWOOPY_3","face":0},{"textKey":"DIALOGUE_SWOOPY_4","face":0}],"eve":[{"textKey":"DIALOGUE_EVE_0","face":1,"anim":4,"audio":{"tag":"voice-27-1","s":62,"d":3}},{"textKey":"DIALOGUE_EVE_1","face":3,"audio":{"tag":"voice-27-1","s":0,"d":1.2}},{"textKey":"DIALOGUE_EVE_2","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":2,"d":7}},{"textKey":"DIALOGUE_EVE_3","face":0,"audio":{"tag":"voice-27-1","s":11,"d":8.2}},{"textKey":"DIALOGUE_EVE_4","face":0,"audio":{"tag":"voice-27-1","s":20,"d":4.2}},{"textKey":"DIALOGUE_EVE_5","face":4,"audio":{"tag":"voice-27-1","s":25,"d":7.5}},{"textKey":"DIALOGUE_EVE_6","face":3,"anim":4,"audio":{"tag":"voice-27-1","s":34,"d":6}},{"textKey":"DIALOGUE_EVE_7","face":4,"audio":{"tag":"voice-27-1","s":41,"d":5.5}},{"textKey":"DIALOGUE_EVE_8","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":47,"d":5.5}},{"textKey":"DIALOGUE_EVE_9","face":0,"audio":{"tag":"voice-27-1","s":53,"d":7.5}},{"textKey":"DIALOGUE_EVE_10","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":66,"d":4}},{"textKey":"DIALOGUE_EVE_11","face":4,"audio":{"tag":"voice-27-1","s":71,"d":5.5}},{"textKey":"DIALOGUE_EVE_12","face":0,"audio":{"tag":"voice-27-1","s":77,"d":7}},{"textKey":"DIALOGUE_EVE_13","face":4,"audio":{"tag":"voice-27-1","s":85,"d":4.5}},{"textKey":"DIALOGUE_EVE_14","face":5,"anim":2,"audio":{"tag":"voice-25-1","s":24,"d":4.2}},{"textKey":"DIALOGUE_EVE_15","face":4,"audio":{"tag":"voice-27-1","s":90,"d":5}},{"textKey":"DIALOGUE_EVE_16","face":2,"anim":2,"audio":{"tag":"voice-27-1","s":96,"d":3.5}},{"textKey":"DIALOGUE_EVE_17","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":100,"d":5}},{"textKey":"DIALOGUE_EVE_18","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":106,"d":4.5}},{"textKey":"DIALOGUE_EVE_19","face":2,"audio":{"tag":"voice-27-1","s":111,"d":3}},{"textKey":"DIALOGUE_EVE_20","face":0,"audio":{"tag":"voice-27-1","s":115,"d":7}},{"textKey":"DIALOGUE_EVE_21","face":1,"anim":2,"audio":{"tag":"voice-27-1","s":123,"d":3.2}},{"textKey":"DIALOGUE_EVE_22","face":6,"anim":2,"audio":{"tag":"voice-25-1","s":29,"d":2.5}},{"textKey":"DIALOGUE_EVE_23","face":1,"audio":{"tag":"voice-27-1","s":127,"d":5.5}},{"textKey":"DIALOGUE_EVE_24","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":133,"d":4}},{"textKey":"DIALOGUE_EVE_25","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":138,"d":2}},{"textKey":"DIALOGUE_EVE_26","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":141,"d":7.5}},{"textKey":"DIALOGUE_EVE_27","face":3,"audio":{"tag":"voice-27-1","s":150,"d":6}},{"textKey":"DIALOGUE_EVE_28","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":157,"d":7.5}},{"textKey":"DIALOGUE_EVE_29","face":2,"anim":2,"audio":{"tag":"voice-27-1","s":165,"d":6}},{"textKey":"DIALOGUE_EVE_30","face":2,"audio":{"tag":"voice-27-1","s":172,"d":5.5}},{"textKey":"DIALOGUE_EVE_31","face":3,"audio":{"tag":"voice-27-1","s":178,"d":4}},{"textKey":"DIALOGUE_EVE_32","face":2,"anim":2,"audio":{"tag":"voice-27-1","s":182,"d":7}},{"textKey":"DIALOGUE_EVE_33","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":190,"d":7.5}},{"textKey":"DIALOGUE_EVE_34","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":198,"d":2.5}},{"textKey":"DIALOGUE_EVE_35","face":2,"anim":4,"audio":{"tag":"voice-27-1","s":201,"d":8.5}},{"textKey":"DIALOGUE_EVE_36","face":2,"audio":{"tag":"voice-27-1","s":210,"d":8}},{"textKey":"DIALOGUE_EVE_37","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":219,"d":8.5}},{"textKey":"DIALOGUE_EVE_38","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":228,"d":2}},{"textKey":"DIALOGUE_EVE_39","face":0,"audio":{"tag":"voice-27-1","s":231,"d":3.5}},{"textKey":"DIALOGUE_EVE_40","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":235,"d":10}},{"textKey":"DIALOGUE_EVE_41","face":3,"audio":{"tag":"voice-27-1","s":246,"d":5}},{"textKey":"DIALOGUE_EVE_42","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":253,"d":6}},{"textKey":"DIALOGUE_EVE_43","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":260,"d":2.5}},{"textKey":"DIALOGUE_EVE_44","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":265,"d":3.5}},{"textKey":"DIALOGUE_EVE_45","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":269,"d":4.5}}],"jim":[{"textKey":"DIALOGUE_JELLY_JIM_0","face":0,"anim":2,"audio":{"tag":"voice-26-1","s":0,"d":7.2}},{"textKey":"DIALOGUE_JELLY_JIM_1","face":1,"audio":{"tag":"voice-26-1","s":8,"d":9.2}},{"textKey":"DIALOGUE_JELLY_JIM_2","face":0,"audio":{"tag":"voice-26-1","s":18,"d":9.5}},{"textKey":"DIALOGUE_JELLY_JIM_3","face":1,"anim":2,"audio":{"tag":"voice-26-1","s":28,"d":4}},{"textKey":"DIALOGUE_JELLY_JIM_4","face":2,"anim":4,"audio":{"tag":"voice-26-1","s":33,"d":7.2}},{"textKey":"DIALOGUE_JELLY_JIM_5","face":0,"anim":2,"audio":{"tag":"voice-26-1","s":41,"d":5.7}},{"textKey":"DIALOGUE_JELLY_JIM_6","face":2,"anim":4,"audio":{"tag":"voice-26-1","s":47,"d":8.4}},{"textKey":"DIALOGUE_JELLY_JIM_7","face":2,"anim":4,"audio":{"tag":"voice-26-1","s":56,"d":10.3}}],"harvey":[{"textKey":"DIALOGUE_HARVEY_0","face":0,"anim":2,"audio":{"tag":"voice-29-1","s":0,"d":4}},{"textKey":"DIALOGUE_HARVEY_1","face":1,"audio":{"tag":"voice-29-1","s":5,"d":10}},{"textKey":"DIALOGUE_HARVEY_2","face":1,"audio":{"tag":"voice-29-1","s":16,"d":3}},{"textKey":"DIALOGUE_HARVEY_3","face":1,"anim":2,"audio":{"tag":"voice-29-1","s":20,"d":7}},{"textKey":"DIALOGUE_HARVEY_4","face":1,"anim":4,"audio":{"tag":"voice-29-1","s":28,"d":4}},{"textKey":"DIALOGUE_HARVEY_5","face":1}],"professor_scoog":[{"textKey":"DIALOGUE_PROFESSOR_SCOOG_0","face":1,"audio":{"tag":"voice-9","s":3,"d":2},"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_1","face":0,"audio":{"tag":"voice-9","s":7,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_2","face":2,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_3","face":1,"audio":{"tag":"voice-9","s":0,"d":3}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_4","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_5","face":2,"audio":{"tag":"voice-9","s":9,"d":2},"anim":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_6","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_7","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_8","face":1,"audio":{"tag":"voice-9","s":3,"d":2},"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_9","face":0,"audio":{"tag":"voice-9","s":11,"d":3}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_10","face":1,"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_11","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_12","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_13","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_14","anim":1,"face":2,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_15","anim":2,"face":1,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_16","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_17","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_18","face":1,"anim":3,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_19","anim":4,"face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_20","face":1,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_21","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_22","face":1,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_23","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_24","face":3,"anim":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_25","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_26","face":3,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_27","face":3,"anim":1,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_28","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_29","face":0,"anim":4,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_30","face":3,"anim":1,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_31","face":1,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_32","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_33","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_34","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_35","face":3,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_36","face":0,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_37","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_38","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_39","face":1,"anim":2,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_40","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_41","face":3,"anim":1,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_42","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_43","face":1,"anim":2,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_44","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_45","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_46","face":3,"anim":2,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_47","face":3,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_48","face":3,"anim":2,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_49","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_50","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_51","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_52","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_53","face":1,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_54","face":2,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_55","face":3,"anim":4,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_56","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_57","face":3,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_58","face":3,"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_59","face":1,"anim":4,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_60","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_61","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_62","face":1,"anim":2,"audio":{"tag":"voice-9","s":11,"d":3}}],"don-zorro":[{"textKey":"DIALOGUE_DON_ZORRO_0","face":2},{"textKey":"DIALOGUE_DON_ZORRO_1","face":1},{"textKey":"DIALOGUE_DON_ZORRO_2","face":1},{"textKey":"DIALOGUE_DON_ZORRO_3","face":1},{"textKey":"DIALOGUE_DON_ZORRO_4","face":0},{"textKey":"DIALOGUE_DON_ZORRO_5","face":0},{"textKey":"DIALOGUE_DON_ZORRO_6","face":2},{"textKey":"DIALOGUE_DON_ZORRO_7","face":1},{"textKey":"DIALOGUE_DON_ZORRO_8","face":0},{"textKey":"DIALOGUE_DON_ZORRO_9","face":2},{"textKey":"DIALOGUE_DON_ZORRO_10","face":1},{"textKey":"DIALOGUE_DON_ZORRO_11","face":0},{"textKey":"DIALOGUE_DON_ZORRO_12","face":1},{"textKey":"DIALOGUE_DON_ZORRO_13","face":2},{"textKey":"DIALOGUE_DON_ZORRO_14","face":0}],"harriet":[{"textKey":"DIALOGUE_HARRIET_0","face":1},{"textKey":"DIALOGUE_HARRIET_1","face":0},{"textKey":"DIALOGUE_HARRIET_2","face":2},{"textKey":"DIALOGUE_HARRIET_3","face":0},{"textKey":"DIALOGUE_HARRIET_4","face":1},{"textKey":"DIALOGUE_HARRIET_5","face":0},{"textKey":"DIALOGUE_HARRIET_6","face":2},{"textKey":"DIALOGUE_HARRIET_7","face":1},{"textKey":"DIALOGUE_HARRIET_8","face":0},{"textKey":"DIALOGUE_HARRIET_9","face":2},{"textKey":"DIALOGUE_HARRIET_10","face":2},{"textKey":"DIALOGUE_HARRIET_11","face":1},{"textKey":"DIALOGUE_HARRIET_12","face":0}],"verna":[{"textKey":"DIALOGUE_VERNA_0","face":0},{"textKey":"DIALOGUE_VERNA_1","face":2},{"textKey":"DIALOGUE_VERNA_2","face":0},{"textKey":"DIALOGUE_VERNA_3","face":1}],"bargo-bunny":[{"textKey":"DIALOGUE_BARGO_0","face":0},{"textKey":"DIALOGUE_BARGO_1","face":1},{"textKey":"DIALOGUE_BARGO_2","face":3},{"textKey":"DIALOGUE_BARGO_3","face":1},{"textKey":"DIALOGUE_BARGO_4","face":2}],"gale":[{"textKey":"DIALOGUE_GALE_0","face":1,"anim":4,"audio":{"tag":"voice-30-1","s":0,"d":2}},{"textKey":"DIALOGUE_GALE_1","face":1,"anim":0,"audio":{"tag":"voice-30-1","s":3,"d":5}},{"textKey":"DIALOGUE_GALE_2","face":3,"anim":3,"audio":{"tag":"voice-30-1","s":9,"d":6}},{"textKey":"DIALOGUE_GALE_3","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":16,"d":3}},{"textKey":"DIALOGUE_GALE_4","face":3,"anim":0,"audio":{"tag":"voice-30-1","s":20,"d":6}},{"textKey":"DIALOGUE_GALE_5","face":3,"anim":0,"audio":{"tag":"voice-30-1","s":27,"d":4}},{"textKey":"DIALOGUE_GALE_6","face":0,"anim":4,"audio":{"tag":"voice-30-1","s":32,"d":2}},{"textKey":"DIALOGUE_GALE_7","face":2,"anim":0,"audio":{"tag":"voice-30-1","s":35,"d":7}},{"textKey":"DIALOGUE_GALE_8","face":2,"anim":4,"audio":{"tag":"voice-30-1","s":43,"d":1}},{"textKey":"DIALOGUE_GALE_9","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":45,"d":6}},{"textKey":"DIALOGUE_GALE_10","face":3,"anim":0,"audio":{"tag":"voice-30-1","s":52,"d":8}},{"textKey":"DIALOGUE_GALE_11","face":3,"anim":3,"audio":{"tag":"voice-30-1","s":61,"d":10}},{"textKey":"DIALOGUE_GALE_12","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":72,"d":7}},{"textKey":"DIALOGUE_GALE_13","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":80,"d":5}},{"textKey":"DIALOGUE_GALE_14","face":2,"anim":4,"audio":{"tag":"voice-30-1","s":86,"d":3}},{"textKey":"DIALOGUE_GALE_15","face":3},{"textKey":"DIALOGUE_GALE_16","face":0,"anim":2}],"florian":[{"textKey":"DIALOGUE_FLORIAN_0","face":0,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":0,"d":2}},{"textKey":"DIALOGUE_FLORIAN_1","face":3,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":2,"d":9.5}},{"textKey":"DIALOGUE_FLORIAN_2","face":3,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":12,"d":7}},{"textKey":"DIALOGUE_FLORIAN_3","face":3,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":20,"d":4}},{"textKey":"DIALOGUE_FLORIAN_4","face":0,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-9","s":24,"d":6.5}},{"textKey":"DIALOGUE_FLORIAN_5","face":1,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":31,"d":3.5}},{"textKey":"DIALOGUE_FLORIAN_6","face":0,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-1","s":0,"d":4.5}},{"textKey":"DIALOGUE_FLORIAN_7","face":3,"anim":3,"dimmed":true,"audio":{"tag":"voice-31-1","s":5,"d":4.5}},{"textKey":"DIALOGUE_FLORIAN_8","face":1,"anim":4,"dimmed":true,"audio":{"tag":"voice-31-1","s":10,"d":1}},{"textKey":"DIALOGUE_FLORIAN_9","face":2,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-2","s":0,"d":3}},{"textKey":"DIALOGUE_FLORIAN_10","face":1,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-3","s":0,"d":9}},{"textKey":"DIALOGUE_FLORIAN_11","face":2,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-4","s":0,"d":7}},{"textKey":"DIALOGUE_FLORIAN_12","face":1,"anim":4,"dimmed":true,"audio":{"tag":"voice-31-5","s":0,"d":4.5}},{"textKey":"DIALOGUE_FLORIAN_13","face":3,"anim":1,"dimmed":true,"audio":{"tag":"voice-31-6","s":0,"d":7}},{"textKey":"DIALOGUE_FLORIAN_14","face":3,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-7","s":0,"d":8}},{"textKey":"DIALOGUE_FLORIAN_15","face":0,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-8","s":0,"d":7.5}},{"textKey":"DIALOGUE_FLORIAN_16","face":0,"anim":0,"audio":{"tag":"voice-31-10","s":0,"d":6}},{"textKey":"DIALOGUE_FLORIAN_17","face":3,"anim":1,"audio":{"tag":"voice-31-10","s":6,"d":7}},{"textKey":"DIALOGUE_FLORIAN_18","face":3,"audio":{"tag":"voice-31-10","s":13,"d":9}},{"textKey":"DIALOGUE_FLORIAN_19","face":1,"anim":2,"audio":{"tag":"voice-31-10","s":22,"d":9}},{"textKey":"DIALOGUE_FLORIAN_20","face":0,"anim":2,"audio":{"tag":"voice-31-10","s":32,"d":3}},{"textKey":"DIALOGUE_FLORIAN_21","face":0,"audio":{"tag":"voice-31-10","s":35,"d":4}},{"textKey":"DIALOGUE_FLORIAN_22","face":1,"anim":2,"audio":{"tag":"voice-31-10","s":39,"d":7}},{"textKey":"DIALOGUE_FLORIAN_23","face":0,"anim":2,"audio":{"tag":"voice-31-10","s":53,"d":6}},{"textKey":"DIALOGUE_FLORIAN_24","face":1,"anim":2,"audio":{"tag":"voice-31-10","s":60,"d":2}},{"textKey":"DIALOGUE_FLORIAN_25","face":2,"anim":0,"audio":{"tag":"voice-10-87","s":102,"d":3}},{"textKey":"DIALOGUE_FLORIAN_26","face":2,"anim":0,"audio":{"tag":"voice-31-11","s":0,"d":4.5}}]}')},34500:q=>{"use strict";q.exports=JSON.parse('{"stand":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.2,-1.4,-1.6,-1.8,-2,-2.2,-2.4,-2.6,-2.8,-3,-2.8,-2.6,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.15]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.15,-0.3,-0.45,-0.6,-0.75,-0.9,-1.05,-1.2,-1.35,-1.5,-1.65,-1.8,-1.95,-2.1,-2.25,-2.4,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.2,-0.1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"x":{"interval":93,"frames":[0,-0.1,-0.2,-0.3,-0.4,-0.5,-0.4,-0.3,-0.2,-0.1]},"y":{"interval":30,"frames":[0,-0.35,-0.7,-1.05,-1.4,-1.75,-2.1,-2.45,-2.8,-3.15,-3.5,-3.85,-4.2,-4.55,-4.9,-5.25,-5.25,-4.9,-4.55,-4.2,-3.85,-3.5,-3.15,-2.8,-2.45,-2.1,-1.75,-1.4,-1.05,-0.7,-0.35]},"angle":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-0.15,-0.3,-0.45,-0.6,-0.75,-0.9,-1.05,-1.2,-1.35,-1.5,-1.65,-1.8,-1.95,-2.1,-2.25,-2.4,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.2,-0.1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"standFloat":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.2,-1.4,-1.6,-1.8,-2,-2.2,-2.4,-2.6,-2.8,-3,-2.8,-2.6,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.15]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":10000,"frames":[3]},"y":{"interval":30,"frames":[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.9,0.85,0.8,0.75,0.7,0.65,0.6,0.55,0.5,0.45,0.4,0.35,0.3,0.25,0.2,0.15,0.1,0.05,0,-0.05,-0.05]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.15,-0.3,-0.45,-0.6,-0.75,-0.9,-1.05,-1.2,-1.35,-1.5,-1.65,-1.8,-1.95,-2.1,-2.25,-2.4,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.2,-0.1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"x":{"interval":93,"frames":[0,-0.1,-0.2,-0.3,-0.4,-0.5,-0.4,-0.3,-0.2,-0.1]},"y":{"interval":30,"frames":[0,-0.35,-0.7,-1.05,-1.4,-1.75,-2.1,-2.45,-2.8,-3.15,-3.5,-3.85,-4.2,-4.55,-4.9,-5.25,-5.25,-4.9,-4.55,-4.2,-3.85,-3.5,-3.15,-2.8,-2.45,-2.1,-1.75,-1.4,-1.05,-0.7,-0.35]},"angle":{"interval":10000,"frames":[0]}}},"walk":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-1,-2,-2.6,-2.4,-2.2,-2,-1.8,-0.5,0.2,1.2,1.4,1.5,1.6]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.4,-0.8,-1,-1.2,-1.5,-1.5,-1.6,-0.6,0.6,1.6,1.5,1.4,1.3]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[0,-0.7,-1.4,-1.9,-2.4,-2.8,-2.8,-2.7,-1.4,-0.1,1.2,1.3,1.4,1.5]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":80,"frames":[1,2,3,4]},"y":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-2.4,-4.8,-6,-7.2,-9,-9,-9.6,-3.6,1.8,9.6,9,8.4,7.8]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"walkmale":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-1,-2,-2.6,-2.4,-2.2,-2,-1.8,-0.5,0.2,1.2,1.4,1.5,1.6]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.4,-0.8,-1,-1.2,-1.5,-1.5,-1.6,-0.6,0.6,1.6,1.5,1.4,1.3]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[0,-0.7,-1.4,-1.9,-2.4,-2.8,-2.8,-2.7,-1.4,-0.1,1.2,1.3,1.4,1.5]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":80,"frames":[1,2,3,4]},"y":{"interval":10000,"frames":[2]},"x":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-2.4,-4.8,-6,-7.2,-9,-9,-9.6,-3.6,1.8,9.6,9,8.4,7.8]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"walkfemale":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-1,-2,-2.6,-2.4,-2.2,-2,-1.8,-0.5,0.2,1.2,1.4,1.5,1.6]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.4,-0.8,-1,-1.2,-1.5,-1.5,-1.6,-0.6,0.6,1.6,1.5,1.4,1.3]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[0,-0.7,-1.4,-1.9,-2.4,-2.8,-2.8,-2.7,-1.4,-0.1,1.2,1.3,1.4,1.5]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":80,"frames":[1,2,3,4]},"y":{"interval":10000,"frames":[4]},"x":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-2.4,-4.8,-6,-7.2,-9,-9,-9.6,-3.6,1.8,9.6,9,8.4,7.8]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"walkFloat":{"loop":true,"head":{"y":{"interval":30,"frames":[-0.4,0,0.5,1,1.4,1.9,2.3,2.1,2,1.8,1.2,0.6,0.4,0.2,0,0,-0.1,-0.2]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,-0.3,-0.6,-0.9,-1.2,-1.5,-1.8,-2.1,-1.9,-1.7,-1.5,-1.3,-1.1,-0.9,-0.7,-0.5,-0.3,-0.1]},"x":{"interval":10000,"frames":[0]},"frameName":{"interval":10000,"frames":[3]},"angle":{"interval":10000,"frames":[15]}}},"dig":{"loop":false,"head":{"x":{"interval":30,"frames":[-4.4,-1,2.2,5.6,5.4,5.2,5,4.9,4.7,4.5,4.4,4.2,4,3.9,3.8,3.6,2.8,1.4,0.6,-0.1,-0.9,-1.6,-2.4,-3.1,0]},"y":{"interval":30,"frames":[0.4,0.2,0.9,1.6,1.5,1.4,1.3,1.2,1,1,0.9,0.8,0.8,0.8,0.8,0.8,0.6,0.2,0,-0.2,-0.4,-0.6,-0.8,-1,0]},"angle":{"interval":30,"frames":[-4,0,2,6,10,9,9,9,9,9,9,9,9,9,9,9,8,6,5,4,3,2,1,0,0]}},"shirt":{"angle":{"interval":30,"frames":[0,5,11,17,16,16,15,15,15,14,14,14,13,13,13,12,11,10,9,8,7,6,4,2,0]},"x":{"interval":30,"frames":[0,0.9,1.8,2.7,2.5,2.5,2.4,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.2,1.1,1,0.9,0.8,0.7,0.6,0.4,0]},"y":{"interval":30,"frames":[0,0.5,1,1.5,1.5,1.4,1.3,1.3,1.2,1.1,1,1,0.9,0.8,0.8,0.7,0.6,0.5,0.5,0.4,0.3,0.3,0.2,0.1,0]}},"rightArm":{"angle":{"interval":30,"frames":[0,11,22,34,40,45,42,38,35,32,29,25,22,19,15,12,8,4,0,-4,-8,-12,-16,-20,-24]},"x":{"interval":30,"frames":[0,2.4,4.9,7.4,7,6.8,6.5,6.2,5.9,5.7,5.4,5.1,4.8,4.6,4.3,4,3.5,3.1,2.7,2.3,1.8,1.4,1,0.6,0.2]}},"leftArm":{"angle":{"interval":30,"frames":[0,5,10,15,15,20,18,16,16,15,13,12,10,9,6,3,0,-4,-7,-11,-14,-18,-22,-25,-29]},"x":{"interval":30,"frames":[0,2.4,4.6,6.8,6.6,6.4,6.2,6,5.8,5.6,5.4,5.2,5,4.9,4.7,4.5,4,3.7,3.3,2.9,2.6,2.2,1.7,1.4,0.9]},"y":{"interval":30,"frames":[0,1.2,2.4,3.9,3.7,3.6,3.5,3.3,3.2,3,2.9,2.8,2.6,2.5,2.4,2.3,2,1.8,1.5,1.3,1.1,0.9,0.7,0.5,0.2]}},"legs":{"frameName":{"interval":10000,"frames":[1]},"y":{"interval":10000,"frames":[0]}},"weapon":{"x":{"interval":30,"frames":[-25.2,-24.5,-23.8,-22.9,-23.5,-24.8,-24.6,-24.3,-24.2,-24,-23.8,-23.7,-23.5,-22.8,-22.1,-21.5,-20.9,-20.2,-19.6,-18.9,-18.3,-17.7,-17.1,-16.6,-16.2]},"y":{"interval":30,"frames":[0.4,0.1,-0.6,-1.3,-1.4,-3.4,-3.1,-2.8,-2.6,-2.3,-2,-1.8,-1.6,-1.4,-1,-0.6,-0.2,0,0.3,0.4,0.4,0.4,0.2,0,0,-0.5]},"angle":{"interval":30,"frames":[45,46,60,67,68,75,74,73,72,70,69,68,67,66,64,61,59,55,53,50,47,43,41,38,35,33]}}},"attack":{"loop":false,"head":{"y":{"interval":30,"frames":[0,-0.1,-0.1,-0.2,-0.2,-0.3,0.3,0.8,1.4,2.6,0,-2.7,-5.4,-8,-10.7,-13.5,-16.1,-18.8,-21.5,-24.2,-26,-28,-24.8,-21.5,-18.3,-15,-11.8,-8.6,-5.4,-2,1.5,2,2,1.8,1,0,-0.4,-0.8,-0.6,-0.4,-0.2,0,0,0,0,0,0,0,0,0]}},"shirt":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0,0,0,0,0,-2.2,-4.4,-6.6,-8.7,-10.9,-13.1,-15.3,-17.5,-19.7,-21.9,-24.1,-26.27,-23.3,-20.3,-17.4,-14.4,-11.5,-8.5,-5.5,-2.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"frameName":{"interval":30,"frames":[0,0,0,0,0,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"rightArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,28,36,44,52,60,68,76,84,92,100,93,86,79,72,65,58,51,44,37,30,23,16,8,0,0,0,0,0,0,0,0,0,0,0]}},"leftArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,0,-8,-16,-24,-32,-40,-48,-56,-64,-72,-80,-85,-90,-95,-100,-104,-107,-97,-87,-77,-67,-57,-47,-37,-27,-17,-7,-5,-3,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"weapon":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.9,0.2,-0.7,-1,8,-3,-7.7,-12.4,-17.13,-21.9,-26.6,-31.3,-35.8,-40.3,-44.5,-48.6,-48.3,-47.7,-41.6,-35.3,-28.9,-22.6,-16.5,-12.8,-9.1,-5.5,-1.8,0,-0.2,-0.6,-1,-1.4,-1.8,-2.3,-2.6,-3,-2.9,-2.8,-2.4,-2,-1.5,-1,-0.5,0]},"x":{"interval":30,"frames":[0,0,0,0,0,0,1.5,3,4.2,5.2,5.9,6.4,6.5,6.4,6,5.4,4.5,3.3,1.9,0.4,2.7,4.5,5.7,6.4,6.5,5.8,4.7,4.5,4.2,3.9,3.6,3.6,3.5,3.5,3.5,3.4,3.4,3.3,3.3,3.3,3.2,3.2,3.1,2.9,2.5,2,1.5,1,0.5,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,-8,-15,-23,-31,-37,-46,-54,-62,-69,-77,-84,-92,-100,-73,-58,-43,-28,-13,2,17,32,37,43,48,53,58,55,52,49,45,42,38,35,32,29,25,22,18,15,12,9,6,3,0]}},"transformedObject":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"attackFloat":{"loop":false,"head":{"y":{"interval":30,"frames":[0,-0.1,-0.1,-0.2,-0.2,-0.3,0.3,0.8,1.4,2.6,0,-2.7,-5.4,-8,-10.7,-13.5,-16.1,-18.8,-21.5,-24.2,-26,-28,-24.8,-21.5,-18.3,-15,-11.8,-8.6,-5.4,-2,1.5,2,2,1.8,1,0,-0.4,-0.8,-0.6,-0.4,-0.2,0,0,0,0,0,0,0,0,0]}},"shirt":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0,0,0,0,0,-2.2,-4.4,-6.6,-8.7,-10.9,-13.1,-15.3,-17.5,-19.7,-21.9,-24.1,-26.27,-23.3,-20.3,-17.4,-14.4,-11.5,-8.5,-5.5,-2.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"frameName":{"interval":10000,"frames":[3]},"angle":{"interval":30,"frames":[0,0,0,0,-1,-2,-3,-5,-8,-10,-12,-14,-16,-18,-20,-22,-24,-24,-24,-24,-24,-24,-24,-24,-24,-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0]}},"rightArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,28,36,44,52,60,68,76,84,92,100,93,86,79,72,65,58,51,44,37,30,23,16,8,0,0,0,0,0,0,0,0,0,0,0]}},"leftArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,0,-8,-16,-24,-32,-40,-48,-56,-64,-72,-80,-85,-90,-95,-100,-104,-107,-97,-87,-77,-67,-57,-47,-37,-27,-17,-7,-5,-3,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"weapon":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.9,0.2,-0.7,-1,8,-3,-7.7,-12.4,-17.13,-21.9,-26.6,-31.3,-35.8,-40.3,-44.5,-48.6,-48.3,-47.7,-41.6,-35.3,-28.9,-22.6,-16.5,-12.8,-9.1,-5.5,-1.8,0,-0.2,-0.6,-1,-1.4,-1.8,-2.3,-2.6,-3,-2.9,-2.8,-2.4,-2,-1.5,-1,-0.5,0]},"x":{"interval":30,"frames":[0,0,0,0,0,0,1.5,3,4.2,5.2,5.9,6.4,6.5,6.4,6,5.4,4.5,3.3,1.9,0.4,2.7,4.5,5.7,6.4,6.5,5.8,4.7,4.5,4.2,3.9,3.6,3.6,3.5,3.5,3.5,3.4,3.4,3.3,3.3,3.3,3.2,3.2,3.1,2.9,2.5,2,1.5,1,0.5,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,-8,-15,-23,-31,-37,-46,-54,-62,-69,-77,-84,-92,-100,-73,-58,-43,-28,-13,2,17,32,37,43,48,53,58,55,52,49,45,42,38,35,32,29,25,22,18,15,12,9,6,3,0]}}},"attackBig":{"loop":false,"head":{"y":{"interval":30,"frames":[0,-0.1,-0.1,-0.2,-0.2,-0.3,0.3,0.8,1.4,2.6,0,-2.7,-5.4,-8,-10.7,-13.5,-16.1,-18.8,-21.5,-24.2,-26,-28,-24.8,-21.5,-18.3,-15,-11.8,-8.6,-5.4,-2,1.5,2,2,1.8,1,0,-0.4,-0.8,-0.6,-0.4,-0.2,0,0,0,0,0,0,0,0,0]}},"shirt":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0,0,0,0,0,-2.2,-4.4,-6.6,-8.7,-10.9,-13.1,-15.3,-17.5,-19.7,-21.9,-24.1,-26.27,-23.3,-20.3,-17.4,-14.4,-11.5,-8.5,-5.5,-2.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"frameName":{"interval":30,"frames":[0,0,0,0,0,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"rightArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,28,36,44,52,60,68,76,84,92,100,93,86,79,72,65,58,51,44,37,30,23,16,8,0,0,0,0,0,0,0,0,0,0,0]}},"leftArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,0,-8,-16,-24,-32,-40,-48,-56,-64,-72,-80,-85,-90,-95,-100,-104,-107,-97,-87,-77,-67,-57,-47,-37,-27,-17,-7,-5,-3,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"weapon":{"angle":{"interval":30,"frames":[23,24,26,27,29,30,32,33,25,16,8,0,-8,-16,-25,-33,-29,-26,-20,-15,-9,-3,3,8.5,14,22,26,31,36,40,43,43,44,45,45,46,47,48,49,47,45,43,42,40,41,42,42,43,44,45]},"x":{"interval":30,"frames":[-26.1,-27.6,-29.2,-31,-32.7,-34.6,-36.6,-38.6,-35,-31.6,-28.7,-26.6,-25.1,-24,-23.5,-23.5,-23.5,-23.5,-23,-22.4,-22,-22,-21.4,-21.4,-21.7,-22.2,-24.1,-26,-28,-30.3,-32.7,-32,-33,-33,-33,-34,-34,-34.3,-34.6,-36.5,-38.5,-40.4,-42.3,-44.2,-38.2,-32.3,-27,-21,-16,-6]},"y":{"interval":30,"frames":[13.5,14.6,15.7,16.6,17.4,18,18.5,18.8,19.8,19.8,19.1,17,14.7,5.2,-4.2,-13.4,-21.5,-29.6,-36,-42.2,-37,-31.6,-26,-19.9,-13.6,-7.1,-2,3,8,12,15.8,15.2,15,15,15,15,15,14.7,14.6,14.5,14.3,14,14,13.4,15.2,16,16,15,15,12.4]}}},"moonwalkfemale":{"loop":true,"rightArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,2,1.5,1,0.5,0,0.4,0.9,1.5,2,1.5,1,0.5,0,0.4,1,1.5,2.1,1.6,1,0.4,-0.2,0.4,1,1.6,2.3,1.6,0.8,0,-0.9]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"character":{"x":{"interval":40,"frames":[0,-1.2,-2.4,-3.6,-4.8,-6,-7.2,-8.4,-9.6,-11.2,-12.4,-13.6,-14.8,-16,-17.2,-18.4,-19.6,-21.2,-22.4,-23.6,-24.8,-26,-27.2,-28.4,-29.6,-28.8,-27.6,-26.4,-25.2,-24,-22.8,-21.6,-20.4,-18.8,-17.6,-16.4,-15.2,-14,-12.8,-11.6,-10.4,-8.8,-7.6,-6.4,-5.2,-4,-2.8,-1.6,-0.4]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]}},"head":{"y":{"interval":40,"frames":[0,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":40,"frames":[0,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2]}},"leftArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"legs":{"frameName":{"interval":40,"frames":[3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4]}}},"moonwalkmale":{"loop":true,"rightArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,2,1.5,1,0.5,0,0.4,0.9,1.5,2,1.5,1,0.5,0,0.4,1,1.5,2.1,1.6,1,0.4,-0.2,0.4,1,1.6,2.3,1.6,0.8,0,-0.9]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"character":{"x":{"interval":40,"frames":[0,-1.2,-2.4,-3.6,-4.8,-6,-7.2,-8.4,-9.6,-11.2,-12.4,-13.6,-14.8,-16,-17.2,-18.4,-19.6,-21.2,-22.4,-23.6,-24.8,-26,-27.2,-28.4,-29.6,-28.8,-27.6,-26.4,-25.2,-24,-22.8,-21.6,-20.4,-18.8,-17.6,-16.4,-15.2,-14,-12.8,-11.6,-10.4,-8.8,-7.6,-6.4,-5.2,-4,-2.8,-1.6,-0.4]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]}},"head":{"y":{"interval":40,"frames":[0,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":40,"frames":[0,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2]}},"leftArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"legs":{"frameName":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4]}}},"runningMan":{"loop":true,"character":{"x":{"interval":40,"frames":[0,0,2.67,2.67,4.67,4.67,6.67,8.67,8.67,8.67,8.67,8.67,7.67,6.67,5.67,4.67,2.67,2.67,0,0,0,0]}},"leftArm":{"x":{"interval":10000,"frames":[-1.31]},"y":{"interval":10000,"frames":[1.52]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":40,"frames":[-18.45,-13.9,-9.4,-4.8,-0.3,-2.4,-5.3,-8.1,-10.9,-13.7,-16.5,-27.2,-36,-44.7,-53.5,-62.3,-59.3,-49.1,-38.9,-28.7]}},"rightArm":{"x":{"interval":10000,"frames":[-1]},"y":{"interval":10000,"frames":[-1]},"angle":{"interval":40,"frames":[0.39,-5.4,-11.3,-17.1,-23,-28.8,-26.8,-20,-13.2,-6.4,13.8,27.2,40.6,54,67.3,62.8,47.2,31.6,16,8]}},"head":{"y":{"interval":40,"frames":[-2,-1.5,-1.1,-0.6,-0.2,0.3,0.7,0.3,-0.4,-1.2,-1.9,-1.6,-1.1,-0.7,-0.2,0.2,0.7,0.3,-0.4,-1.2,-1.9]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":40,"frames":[-2,-1.7,-1.4,-1.1,-0.8,-0.5,-0.2,-0.5,-1,-1.4,-1.9,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-1.2,-1.8,-2.3,-2.9]}},"legs":{"frameName":{"interval":40,"frames":[1,1,2,2,2,2,3,3,3,4,4,1,1,2,2,2,3,3,3,3,4,4]}}},"hammermale":{"loop":true,"character":{"x":{"interval":40,"frames":[0,0.4,0.7,1.1,1.4,1.8,2.2,2.5,2.9,3.9,4.8,5.7,6.9,7.8,8.7,9.9,10.8,11.7,12.9,13.8,14.7,15.9,16.8,17.7,17.4,16.8,16.2,15.6,14.1,13.2,12.3,11.1,10.2,9.3,8.1,7.2,6.3,5.1,4.2,3.3,2.1,1.2,0.3,0,0,0]},"y":{"interval":10000,"frames":[0]}},"head":{"x":{"interval":40,"frames":[0,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4]},"y":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,-0.1,-0.1,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]},"angle":{"interval":40,"frames":[0,8.7,17.4,26,34.7,43.4,52.1,60.7,69.4,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,54.9,37.6,20.3,3]}},"leftArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.9,-13.8,-20.6,-27.5,-34.4,-41.3,-48.2,-55,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-43.6,-29.8,-16.1,-2.4]}},"legs":{"frameName":{"interval":40,"frames":[2,2,2,2,2,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,2,2,2,2,0,0,0,0,0,2,2,2,0,0,0,2,2,2,2,0,0,0,2,2,2,0,0,0,0]}}},"hammerfemale":{"loop":true,"character":{"x":{"interval":40,"frames":[0,0.4,0.7,1.1,1.4,1.8,2.2,2.5,2.9,3.9,4.8,5.7,6.9,7.8,8.7,9.9,10.8,11.7,12.9,13.8,14.7,15.9,16.8,17.7,17.4,16.8,16.2,15.6,14.1,13.2,12.3,11.1,10.2,9.3,8.1,7.2,6.3,5.1,4.2,3.3,2.1,1.2,0.3,0,0,0]},"y":{"interval":10000,"frames":[0]}},"head":{"x":{"interval":40,"frames":[0,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4]},"y":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,-0.1,-0.1,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]},"angle":{"interval":40,"frames":[0,8.7,17.4,26,34.7,43.4,52.1,60.7,69.4,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,54.9,37.6,20.3,3]}},"leftArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.9,-13.8,-20.6,-27.5,-34.4,-41.3,-48.2,-55,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-43.6,-29.8,-16.1,-2.4]}},"legs":{"frameName":{"interval":40,"frames":[1,1,1,1,1,1,3,3,3,4,4,4,3,3,3,3,4,4,4,3,3,3,4,4,4,4,1,1,1,1,1,3,3,3,4,4,4,3,3,3,3,4,4,4,3,3,3,4,4,4,4]}}},"shimmy":{"loop":true,"rightArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0.13,-17,-34.2,-51.4,-68.5,-103,-120.4,-118.4,-107.8,-97.1,-86.5,-93.9,-111.9,-129.9,-118.2,-100.6,-83.1,-68.4,-59.5,-50.6,-41.7,-51.9,-63.6,-75.3,-68.8,-58.5,-48.2,-37.9,-43,-58.4,-73.8,-64.6,-50,-35.4,-41.8,-53,-64.2,-75.3,-72.4,-67.5,-62.6,-57.7,-52.9,-48,-43.1,-38.2,-33.3,-28.5,-23.6,-18.7,-13.8,-8.9,-4]}},"leftArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-10.3,-20.6,-30.8,-41.1,-56.6,-61.8,-51.3,-38.2,-25.1,-12,-17.9,-36.9,-55.9,-45.1,-28.1,-11.1,-19.3,-32.9,-46.6,-60.2,-41.8,-21,-0.2,-7.5,-21.5,-35.5,-49.5,-42.2,-20.9,0.4,-14,-35.9,-57.7,-61,-57.1,-53.2,-49.3,-45.4,-41.5,-37.6,-33.8,-29.9,-26,-22.1,-18.2,-14.3,-10.4,-6.6,-2.7,1.2,5.1,9]}},"head":{"x":{"interval":10000,"frames":[0]},"y":{"interval":40,"frames":[0,0.4,0.8,1.2,1.7,1.2,0.4,0.7,1.3,2,2.6,2,0.8,-0.5,0.2,1.2,2.3,1.9,1.1,0.3,-0.5,0.4,1.5,2.5,2.1,1.3,0.6,-0.2,-0.1,0.7,1.5,1.4,1.1,0.8,1.1,1.5,1.9,2.4,2.3,2.1,2,1.8,1.7,1.5,1.4,1.3,1.1,1,0.8,0.7,0.5,0.4,0.2]},"angle":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]}},"legs":{"frameName":{"interval":40,"frames":[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0]}}},"dabfemale":{"loop":true,"character":{"xScale":{"interval":2040,"frames":[1,-1]}},"legs":{"frameName":{"interval":40,"frames":[4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]},"x":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6]}},"rightArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.7,-13.4,-20.2,-26.9,-33.6,-40.3,-47.1,-60.8,-70.5,-80.2,-90.9,-100.7,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120]}},"leftArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.1,-12.2,-18.4,-24.5,-30.6,-36.7,-42.9,-49,-55.1,-61.2,-67.3,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80]}},"head":{"x":{"interval":40,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.3,-1.5,-1.7,-1.9,-2.1,-2.3,-2.3,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12]},"y":{"interval":40,"frames":[0,-0.4,-0.7,-1.1,-1.5,-1.9,-2.2,-2.6,-3,-3,-3,-3,-3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},"angle":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94]}},"shirt":{"x":{"interval":10000,"frames":[0]},"y":{"interval":40,"frames":[0,-0.3,-0.5,-0.8,-1.1,-1.4,-1.6,-1.9,-2.2,-2.4,-2.7,-3,1,0.9,0.7,0.6,0.5,0.3,0.2,0,0.1,0.1,0.2,0.3,0.3,0.4,0.5,0.5,0.6,0.7,0.7,0.8,0.9,0.9,1,1.1,1,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0,0,0,0,0]}}},"dabmale":{"loop":true,"character":{"xScale":{"interval":2040,"frames":[1,-1]}},"legs":{"frameName":{"interval":40,"frames":[4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"rightArm":{"x":{"interval":10000,"frames":[-2]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.7,-13.4,-20.2,-26.9,-33.6,-40.3,-47.1,-60.8,-70.5,-80.2,-90.9,-100.7,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120]}},"leftArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.1,-12.2,-18.4,-24.5,-30.6,-36.7,-42.9,-49,-55.1,-61.2,-67.3,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80]}},"head":{"x":{"interval":40,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.3,-1.5,-1.7,-1.9,-2.1,-2.3,-2.3,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12]},"y":{"interval":40,"frames":[0,-0.4,-0.7,-1.1,-1.5,-1.9,-2.2,-2.6,-3,-3,-3,-3,-3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},"angle":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94]}},"shirt":{"x":{"interval":10000,"frames":[0]},"y":{"interval":40,"frames":[0,-0.3,-0.5,-0.8,-1.1,-1.4,-1.6,-1.9,-2.2,-2.4,-2.7,-3,1,0.9,0.7,0.6,0.5,0.3,0.2,0,0.1,0.1,0.2,0.3,0.3,0.4,0.5,0.5,0.6,0.7,0.7,0.8,0.9,0.9,1,1.1,1,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0,0,0,0,0]}}},"floatDig":{},"setup":{}}')},77628:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":80,"frames":["{birdTag}/walk/body-0","{birdTag}/walk/body-1","{birdTag}/walk/body-2","{birdTag}/walk/body-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":80,"frames":["{birdTag}/walk/body-0","{birdTag}/walk/body-1","{birdTag}/walk/body-2","{birdTag}/walk/body-3"]}}}}}')},60296:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["cactus-0/idle/body-0","cactus-0/idle/body-1","cactus-0/idle/body-2","cactus-0/idle/body-3"]}},"head":{"frameName":{"interval":150,"frames":["cactus-0/idle/flower-0","cactus-0/idle/flower-1","cactus-0/idle/flower-2","cactus-0/idle/flower-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["cactus-0/walk/body-0","cactus-0/walk/body-1","cactus-0/walk/body-2","cactus-0/walk/body-3"]}},"head":{"frameName":{"interval":150,"frames":["cactus-0/walk/flower-0","cactus-0/walk/flower-1","cactus-0/walk/flower-2","cactus-0/walk/flower-3"]}}}}}')},48687:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{catTag}/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"y":{"interval":10000,"frames":[6]},"frameName":{"interval":150,"frames":["{catTag}/idle/tail-0","{catTag}/idle/tail-1","{catTag}/idle/tail-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["{catTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{catTag}/walk/legs-0","{catTag}/walk/legs-1","{catTag}/walk/legs-2","{catTag}/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["{catTag}/walk/tail-0","{catTag}/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},24625:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{dogTag}/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"y":{"interval":10000,"frames":[6]},"frameName":{"interval":150,"frames":["{dogTag}/idle/tail-0","{dogTag}/idle/tail-1","{dogTag}/idle/tail-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["{dogTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{dogTag}/walk/legs-0","{dogTag}/walk/legs-1","{dogTag}/walk/legs-2","{dogTag}/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["{dogTag}/walk/tail-0","{dogTag}/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},57131:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["lizard-3/idle/body-0","lizard-3/idle/body-1","lizard-3/idle/body-2","lizard-3/idle/body-3"]}},"head":{"visible":{"interval":10000,"frames":[false]}},"tail":{"frameName":{"interval":150,"frames":["lizard-3/idle/tail-0","lizard-3/idle/tail-1","lizard-3/idle/tail-2","lizard-3/idle/tail-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["lizard-3/walk/body-0","lizard-3/walk/body-1","lizard-3/walk/body-2","lizard-3/walk/body-3"]}},"head":{"frameName":{"interval":10000,"frames":["lizard-3/walk/head-0"]},"y":{"interval":150,"frames":[0,1]}},"tail":{"y":{"interval":150,"frames":[0,-1]},"frameName":{"interval":150,"frames":["lizard-3/walk/tail-0","lizard-3/walk/tail-1"]}}}}}')},85218:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[-6]},"frameName":{"interval":150,"frames":["fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-1"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"frameName":{"interval":150,"frames":["fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-1"]},"y":{"interval":10000,"frames":[-1]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["fox-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["fox-0/walk/legs-0","fox-0/walk/legs-1","fox-0/walk/legs-2","fox-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["fox-0/walk/tail-0","fox-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},22967:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{lizardTag}/idle/body-0"]}},"head":{"visible":{"interval":10000,"frames":[false]}},"tail":{"frameName":{"interval":10000,"frames":["{lizardTag}/idle/tail-0"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["{lizardTag}/walk/body-0","{lizardTag}/walk/body-1","{lizardTag}/walk/body-2","{lizardTag}/walk/body-3"]}},"head":{"frameName":{"interval":10000,"frames":["{lizardTag}/walk/head-0"]},"y":{"interval":150,"frames":[0,1]}},"tail":{"y":{"interval":150,"frames":[0,-1]},"frameName":{"interval":150,"frames":["{lizardTag}/walk/tail-0","{lizardTag}/walk/tail-1"]}}}}}')},67987:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["panda-0/idle/body-0","panda-0/idle/body-1","panda-0/idle/body-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["panda-0/walk/body-0","panda-0/walk/body-1","panda-0/walk/body-2","panda-0/walk/body-3"]}}}}}')},11475:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["penguin-0/idle/body-0","penguin-0/idle/body-1","penguin-0/idle/body-2"]}},"head":{"x":{"interval":10000,"frames":[-3]},"frameName":{"interval":10000,"frames":["penguin-0/idle/head-0"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["penguin-0/walk/body-0","penguin-0/walk/body-1","penguin-0/walk/body-2","penguin-0/walk/body-3"]}},"head":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["penguin-0/walk/head-0"]}}}}}')},45221:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[4]},"frameName":{"interval":10000,"frames":["reindeer-0/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"y":{"interval":10000,"frames":[8]},"frameName":{"interval":150,"frames":["reindeer-0/idle/tail-0","reindeer-0/idle/tail-2","reindeer-0/idle/tail-1","reindeer-0/idle/tail-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["reindeer-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["reindeer-0/walk/legs-0","reindeer-0/walk/legs-1","reindeer-0/walk/legs-2","reindeer-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["reindeer-0/walk/tail-0","reindeer-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},88505:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-1"]}},"legs":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["{rodentTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{rodentTag}/walk/legs-0","{rodentTag}/walk/legs-1","{rodentTag}/walk/legs-2","{rodentTag}/walk/legs-3"]}}}}}')},43168:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":300,"frames":["sheep-0/idle/body-0","sheep-0/idle/body-1"]},"y":{"interval":150,"frames":[0,-1,0,1]}},"legs":{"frameName":{"interval":150,"frames":["sheep-0/idle/legs-0","sheep-0/idle/legs-1","sheep-0/idle/legs-2","sheep-0/idle/legs-3"]},"y":{"interval":10000,"frames":[-14]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["sheep-0/walk/body-0","sheep-0/walk/body-1"]},"y":{"interval":150,"frames":[0,-1,0,1]}},"legs":{"frameName":{"interval":10000,"frames":["sheep-0/walk/shadow-0"]}}}}}')},35002:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["snowman-0/idle/body-0","snowman-0/idle/body-1","snowman-0/idle/body-0","snowman-0/idle/body-1"]}},"head":{"y":{"interval":150,"frames":[-1,-2,-3,-2]},"frameName":{"interval":10000,"frames":["snowman-0/idle/head-0"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["snowman-0/walk/body-0","snowman-0/walk/body-1","snowman-0/walk/body-2","snowman-0/walk/body-3"]}},"head":{"x":{"interval":150,"frames":[0,1,2,1]},"y":{"interval":150,"frames":[0,-1,-1,0]},"frameName":{"interval":10000,"frames":["snowman-0/walk/head-0"]}}}}}')},74109:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[-12]},"frameName":{"interval":150,"frames":["sparkle-cat-0/idle/body-0","sparkle-cat-0/idle/body-1","sparkle-cat-0/idle/body-2","sparkle-cat-0/idle/body-3"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["sparkle-cat-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["sparkle-cat-0/walk/legs-0","sparkle-cat-0/walk/legs-1","sparkle-cat-0/walk/legs-2","sparkle-cat-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["sparkle-cat-0/walk/tail-0","sparkle-cat-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},67131:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[-12]},"frameName":{"interval":150,"frames":["sparkle-dog-0/idle/body-0","sparkle-dog-0/idle/body-1","sparkle-dog-0/idle/body-2","sparkle-dog-0/idle/body-3"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["sparkle-dog-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["sparkle-dog-0/walk/legs-0","sparkle-dog-0/walk/legs-1","sparkle-dog-0/walk/legs-2","sparkle-dog-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["sparkle-dog-0/walk/tail-0","sparkle-dog-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},98179:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["sparkle-rodent-0/idle/body-0","sparkle-rodent-0/idle/body-1","sparkle-rodent-0/idle/body-2","sparkle-rodent-0/idle/body-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["sparkle-rodent-0/walk/body-0","sparkle-rodent-0/walk/body-1","sparkle-rodent-0/walk/body-2","sparkle-rodent-0/walk/body-3"]}}}}}')},43081:q=>{"use strict";q.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{turtleTag}/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{turtleTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{turtleTag}/walk/legs-0","{turtleTag}/walk/legs-1","{turtleTag}/walk/legs-2","{turtleTag}/walk/legs-3"]}}}}}')}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(q){var K=__webpack_module_cache__[q];if(void 0!==K)return K.exports;var z=__webpack_module_cache__[q]={id:q,loaded:!1,exports:{}};return __webpack_modules__[q].call(z.exports,z,z.exports,__webpack_require__),z.loaded=!0,z.exports}__webpack_require__.n=q=>{var K=q&&q.__esModule?()=>q.default:()=>q;return __webpack_require__.d(K,{a:K}),K},getProto=Object.getPrototypeOf?q=>Object.getPrototypeOf(q):q=>q.__proto__,__webpack_require__.t=function(q,K){if(1&K&&(q=this(q)),8&K)return q;if("object"==typeof q&&q){if(4&K&&q.__esModule)return q;if(16&K&&"function"==typeof q.then)return q}var z=Object.create(null);__webpack_require__.r(z);var Y={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var Q=2&K&&q;"object"==typeof Q&&!~leafPrototypes.indexOf(Q);Q=getProto(Q))Object.getOwnPropertyNames(Q).forEach((K=>Y[K]=()=>q[K]));return Y.default=()=>q,__webpack_require__.d(z,Y),z},__webpack_require__.d=(q,K)=>{for(var z in K)__webpack_require__.o(K,z)&&!__webpack_require__.o(q,z)&&Object.defineProperty(q,z,{enumerable:!0,get:K[z]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(q,K)=>Object.prototype.hasOwnProperty.call(q,K),__webpack_require__.r=q=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(q,"__esModule",{value:!0})},__webpack_require__.nmd=q=>(q.paths=[],q.children||(q.children=[]),q),__webpack_require__(85409),__webpack_require__(3692);var __webpack_exports__=__webpack_require__(67820),__webpack_export_target__=window;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})(); //# sourceMappingURL=game.min.js.map -/** P-NP Patcher v4.3.0 — Suffix **/ +/** P-NP Patcher v4.4.1 — Suffix **/ /* ── 1. Immediate: Signal game script loaded ── */ SW.Load.decrementLoadSemaphore(); console.log("%cP-NP Patcher", "font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;"); -console.log("%cVersion 4.3.0", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); +console.log("%cVersion 4.4.1", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); console.image((e => e[Math.floor(Math.random() * e.length)])(["https://i.imgur.com/bPtAQ8I.png","https://i.imgur.com/EVbS5zG.png","https://i.imgur.com/ij1DgZi.png","https://i.imgur.com/lJTWDu2.png","https://i.imgur.com/EPAdHYN.png","https://i.imgur.com/5S5Tr1t.png","https://i.imgur.com/d3BGwnZ.png","https://i.imgur.com/Thdxszk.png","https://i.imgur.com/zpyv4TJ.png","https://i.imgur.com/lHztg3K.png","https://i.imgur.com/Odu0WDF.png","https://i.imgur.com/ExRgzlL.png","https://i.imgur.com/2tj8ArT.png","https://i.imgur.com/JMVR4wZ.png","https://i.imgur.com/QhybQ9J.png","https://i.imgur.com/sFdJp9c.png","https://i.imgur.com/N4XnUY6.png","https://i.imgur.com/0ivwtH8.png","https://i.imgur.com/qJJh7nf.png","https://i.imgur.com/BTnE99I.png","https://i.imgur.com/T0LEsCe.png","https://i.imgur.com/Nh20Jwl.png","https://i.imgur.com/MvV56er.png","https://i.imgur.com/Jyd6Uuy.png","https://i.imgur.com/a3Tfych.png","https://i.imgur.com/oNZIEhl.png","https://i.imgur.com/VEJxBcM.png","https://i.imgur.com/5UvWETx.png","https://i.imgur.com/Pt9u23U.png","https://i.imgur.com/Q5nVNus.png","https://i.imgur.com/bDtTVd4.png","https://i.imgur.com/0xAJCAy.png","https://i.imgur.com/2rm0eUH.png","https://i.imgur.com/lrbPvoc.png","https://i.imgur.com/2xz4muk.png","https://i.imgur.com/vURg371.png","https://i.imgur.com/woEnk7L.png","https://i.imgur.com/NX4pThk.png","https://i.imgur.com/qwIznNP.png","https://i.imgur.com/hwPeqbQ.png","https://i.imgur.com/c4kM2cV.png","https://i.imgur.com/k3CTGox.png","https://i.imgur.com/SidLEMT.png","https://i.imgur.com/C7uQ4mr.png","https://i.imgur.com/orHdDCF.png","https://i.imgur.com/caJF6R6.png","https://i.imgur.com/hPZtRjb.png","https://i.imgur.com/rwlTCpQ.png","https://i.imgur.com/r0gIjUt.png","https://i.imgur.com/k4YfiWs.png","https://i.imgur.com/R89VSXH.png","https://i.imgur.com/5X4tgvR.png","https://i.imgur.com/E79ZaFT.png","https://i.imgur.com/rZEGd27.png","https://i.imgur.com/v5pDXsL.png","https://i.imgur.com/VEHoaR9.png","https://i.imgur.com/qyKbB5L.png","https://i.imgur.com/NG0rZgL.png","https://i.imgur.com/l3UODvl.png","https://i.imgur.com/fQFxBi5.png","https://i.imgur.com/dybtFOP.png","https://i.imgur.com/iPua2Dg.png","https://i.imgur.com/pXK2yWH.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iLC5pQW.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iDM2afL.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/y2fa9gg.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/22a89fh.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/80ahwofi.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q29pgra.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/39ahfaai.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/19jamaa.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/a92upaaa.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q8r9pqh.png"])); /* ── 2. Setup P-NP properties (waits for lodash if needed) ── */ @@ -324,11 +324,18 @@ console.image((e => e[Math.floor(Math.random() * e.length)])(["https://i.imgur.c }, 500); })(); -/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */ +/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── + * URL is supplied by the extension via window.__ORIGIN_MENU_URL__. + * The extension resolves: popup override → manifest.defaultMenuUrl. */ setTimeout(() => (async () => { try { - eval(await (await fetch("https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js")).text()); + var url = window.__ORIGIN_MENU_URL__; + if (typeof url !== "string" || url.length === 0) { + console.warn("[Play Origin] No menu URL set (window.__ORIGIN_MENU_URL__ missing). Mod bundle skipped."); + return; + } + eval(await (await fetch(url)).text()); } catch(e) { console.error("[Play Origin] CheatGUI load failed:", e); } diff --git a/dist/manifest.json b/dist/manifest.json new file mode 100644 index 0000000..14ebe59 --- /dev/null +++ b/dist/manifest.json @@ -0,0 +1,58 @@ +{ + "schemaVersion": 1, + "patcherVersion": "4.4.1", + "hash": "aa3a3ec39939dbb0", + "rules": [ + { + "id": "singleton-exposure", + "description": "Expose the prodigy singleton on window.__PNP__ in its constructor", + "find": "(_instance=this\\),this\\._game=([A-Za-z_$][\\w$]*)\\}destroy\\(\\)\\{)", + "flags": "", + "replace": "_instance=this),window.__PNP__=this,this._game=$2}destroy(){", + "minMatches": 1 + }, + { + "id": "safe-bind", + "description": "Wrap every gameContainer.bind call with __pnp_safeBind for idempotent (re)binding", + "find": "([A-Za-z_$][\\w$]*\\.q\\.instance\\.prodigy\\.gameContainer)\\.bind\\(", + "flags": "g", + "replace": "window.__pnp_safeBind($1,", + "minMatches": 1 + }, + { + "id": "expose-constants", + "description": "Alias the constants map onto window.__PNP_CONSTANTS_RAW__", + "find": "([A-Za-z_$][\\w$]*)\\.constants=\\{\"GameConstants", + "flags": "", + "replace": "$1.constants=window.__PNP_CONSTANTS_RAW__={\"GameConstants", + "minMatches": 1 + }, + { + "id": "answer-question-bypass", + "description": "Inject auto-answer bypass before the isOpen check in answerQuestion()", + "find": "answerQuestion\\(\\)\\{if\\(!this\\._isOpen\\)", + "flags": "", + "replace": "answerQuestion(){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.onQuestionAnswered.dispatch(_w,0,null);_w?this.onQuestionAnsweredCorrectly.dispatch(0,null):this.onQuestionAnsweredIncorrectly.dispatch(0,null);return}if(!this._isOpen)", + "minMatches": 1 + }, + { + "id": "external-factory-bypass", + "description": "Inject auto-answer bypass before const X=this.findParameter(\"externalFactory\")", + "find": "(const [A-Za-z_$]=this\\.findParameter\\(\"externalFactory\"\\))", + "flags": "", + "replace": "if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.finish({answerCorrect:_w,responseTime:0});return}$1", + "minMatches": 1 + }, + { + "id": "open-question-bypass", + "description": "Inject early-return into openQuestionInterfaceThenEmitNotifications", + "find": "openQuestionInterfaceThenEmitNotifications\\(([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$])\\)\\{this\\._education", + "flags": "", + "replace": "openQuestionInterfaceThenEmitNotifications($1,$2,$3,$4,$5){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){$5&&$5(!0,10,1,!1,!1,{});return}this._education", + "minMatches": 1 + } + ], + "prefix": "\n/** P-NP Patcher v4.4.1 — Prefix **/\nconst _getBox=(o,t)=>({string:\"+\",style:\"font-size: 1px; padding: 0 \"+Math.floor(o/2)+\"px; line-height: \"+t+\"px;\"});\nconsole.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t);\nconsole.log(\"%c\"+n.string,n.style+\"background: url(\"+o+\"); background-size: \"+e.width*t+\"px \"\n+e.height*t+\"px; color: transparent;\")}),e.src=o});\nconst _pnpOldLog = console.log.bind(console);\nconsole.log = (...d) => {\n if (d && d.length && typeof d[0] === \"string\" && d[0].includes(\"This is a browser feature for developers only\")) return \"lol no\";\n if (new Error().stack?.split(\"\\n\").reverse()[0]?.includes(\"load-identity\")) return \"denied\";\n return _pnpOldLog(...d);\n};\n/** Ensure window._ exists before game code (lodash may load separately) **/\nif (typeof window._ === 'undefined' || window._ === null) window._ = {};\nwindow.__PNP_ORIG_UNDERSCORE__ = window._;\nwindow._.variables = Object.create(null);\n/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash\n * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/\nif (!window._.constants) {\n var _c = Object.create(null);\n _c.get = function(k) { return _c[k]; };\n _c.set = function(k, v) { _c[k] = v; return _c; };\n _c.has = function(k) { return k in _c; };\n _c.constants = _c;\n window._.constants = _c;\n}\n\n/** Fix Inversify duplicate binding errors (e.g. \"Ambiguous match: MathTower\").\n * Some installers bind services to the GLOBAL gameContainer and can fire more\n * than once in the patched execution context. We define a helper that the\n * game-code patch below uses to safely bind (rebind if already bound). */\nwindow.__pnp_safeBind = function(container, id) {\n try {\n var inv = container._inversifyContainer || container;\n if (typeof inv.isBound === 'function' && inv.isBound(id)) {\n return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id);\n }\n } catch(e) {}\n return container.bind(id);\n};\n\n/** Guard SW.Load.decrementLoadSemaphore against duplicate calls.\n * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second\n * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher\n * suffix calls it too → createGame() fires twice → all Inversify bind() calls\n * run twice on the same container → \"Ambiguous match found for MathTower\" crash.\n *\n * Fix: wrap the function so only the FIRST call triggers createGame().\n * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */\n/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing).\n * This replaces hardcoded service IDs that break every game update. */\nwindow.__pnp_discoverService = function(gc, shapeFn, label) {\n try {\n var map = gc._inversifyContainer._bindingDictionary._map;\n if (!map) return null;\n var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/;\n var iter = map.keys();\n var next = iter.next();\n while (!next.done) {\n var id = next.value;\n next = iter.next();\n if (typeof id !== 'string' || !hexPattern.test(id)) continue;\n try {\n var inst = gc.get(id);\n if (inst && shapeFn(inst)) {\n console.log(\"[Play Origin] Discovered \" + label + \" \\u2192 \" + id);\n return inst;\n }\n } catch(e) {}\n }\n } catch(e) {\n console.warn(\"[Play Origin] Discovery failed for \" + label + \":\", e);\n }\n return null;\n};\n\nif (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') {\n var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load);\n SW.Load.decrementLoadSemaphore = function() {\n if (window.__PNP_SEM_DECREMENTED__) {\n console.warn(\"[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()\");\n return;\n }\n window.__PNP_SEM_DECREMENTED__ = true;\n return _pnpOrigDecrement();\n };\n}\n", + "suffix": "\n/** P-NP Patcher v4.4.1 — Suffix **/\n\n/* ── 1. Immediate: Signal game script loaded ── */\nSW.Load.decrementLoadSemaphore();\nconsole.log(\"%cP-NP Patcher\", \"font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;\");\nconsole.log(\"%cVersion 4.4.1\", \"font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;\");\nconsole.image((e => e[Math.floor(Math.random() * e.length)])([\"https://i.imgur.com/bPtAQ8I.png\",\"https://i.imgur.com/EVbS5zG.png\",\"https://i.imgur.com/ij1DgZi.png\",\"https://i.imgur.com/lJTWDu2.png\",\"https://i.imgur.com/EPAdHYN.png\",\"https://i.imgur.com/5S5Tr1t.png\",\"https://i.imgur.com/d3BGwnZ.png\",\"https://i.imgur.com/Thdxszk.png\",\"https://i.imgur.com/zpyv4TJ.png\",\"https://i.imgur.com/lHztg3K.png\",\"https://i.imgur.com/Odu0WDF.png\",\"https://i.imgur.com/ExRgzlL.png\",\"https://i.imgur.com/2tj8ArT.png\",\"https://i.imgur.com/JMVR4wZ.png\",\"https://i.imgur.com/QhybQ9J.png\",\"https://i.imgur.com/sFdJp9c.png\",\"https://i.imgur.com/N4XnUY6.png\",\"https://i.imgur.com/0ivwtH8.png\",\"https://i.imgur.com/qJJh7nf.png\",\"https://i.imgur.com/BTnE99I.png\",\"https://i.imgur.com/T0LEsCe.png\",\"https://i.imgur.com/Nh20Jwl.png\",\"https://i.imgur.com/MvV56er.png\",\"https://i.imgur.com/Jyd6Uuy.png\",\"https://i.imgur.com/a3Tfych.png\",\"https://i.imgur.com/oNZIEhl.png\",\"https://i.imgur.com/VEJxBcM.png\",\"https://i.imgur.com/5UvWETx.png\",\"https://i.imgur.com/Pt9u23U.png\",\"https://i.imgur.com/Q5nVNus.png\",\"https://i.imgur.com/bDtTVd4.png\",\"https://i.imgur.com/0xAJCAy.png\",\"https://i.imgur.com/2rm0eUH.png\",\"https://i.imgur.com/lrbPvoc.png\",\"https://i.imgur.com/2xz4muk.png\",\"https://i.imgur.com/vURg371.png\",\"https://i.imgur.com/woEnk7L.png\",\"https://i.imgur.com/NX4pThk.png\",\"https://i.imgur.com/qwIznNP.png\",\"https://i.imgur.com/hwPeqbQ.png\",\"https://i.imgur.com/c4kM2cV.png\",\"https://i.imgur.com/k3CTGox.png\",\"https://i.imgur.com/SidLEMT.png\",\"https://i.imgur.com/C7uQ4mr.png\",\"https://i.imgur.com/orHdDCF.png\",\"https://i.imgur.com/caJF6R6.png\",\"https://i.imgur.com/hPZtRjb.png\",\"https://i.imgur.com/rwlTCpQ.png\",\"https://i.imgur.com/r0gIjUt.png\",\"https://i.imgur.com/k4YfiWs.png\",\"https://i.imgur.com/R89VSXH.png\",\"https://i.imgur.com/5X4tgvR.png\",\"https://i.imgur.com/E79ZaFT.png\",\"https://i.imgur.com/rZEGd27.png\",\"https://i.imgur.com/v5pDXsL.png\",\"https://i.imgur.com/VEHoaR9.png\",\"https://i.imgur.com/qyKbB5L.png\",\"https://i.imgur.com/NG0rZgL.png\",\"https://i.imgur.com/l3UODvl.png\",\"https://i.imgur.com/fQFxBi5.png\",\"https://i.imgur.com/dybtFOP.png\",\"https://i.imgur.com/iPua2Dg.png\",\"https://i.imgur.com/pXK2yWH.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iLC5pQW.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iDM2afL.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/y2fa9gg.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/22a89fh.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/80ahwofi.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q29pgra.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/39ahfaai.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/19jamaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/a92upaaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q8r9pqh.png\"]));\n\n/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */\n(function _pnpSetup() {\n function _applyProps() {\n const W = window;\n if (!W._) W._ = {};\n\n /* variables & functions namespaces */\n if (!W._.variables) W._.variables = Object.create(null);\n W._.functions = Object.create(null);\n\n /* _.instance → the prodigy singleton exposed by our constructor patch */\n Object.defineProperty(W._, \"instance\", {\n get: () => W.__PNP__,\n enumerable: true, configurable: true\n });\n\n /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants\n * WHY: cheatGUI uses _.constants.constants[\"GameConstants.X\"] = val (plain object writes)\n * patcher game-side bypasses use _.constants.get(\"GameConstants.X\") (Map-like reads)\n * Both must work on the same underlying storage. We make _.constants the raw object\n * and bolt on get/set/has methods + a .constants self-alias so every call site works. */\n if (W.__PNP_CONSTANTS_RAW__) {\n var raw = W.__PNP_CONSTANTS_RAW__;\n /* bolt Map-like API onto the plain object */\n raw.get = function(key) { return raw[key]; };\n raw.set = function(key, val) { raw[key] = val; return raw; };\n raw.has = function(key) { return key in raw; };\n /* self-alias: _.constants.constants[\"GameConstants.X\"] = val */\n raw.constants = raw;\n W._.constants = raw;\n }\n\n /* _.player → discovered dynamically from DI container by shape.\n * Cache the SERVICE (stable ref), not the player object (.player getter\n * returns a new object each call). */\n Object.defineProperty(W._, \"player\", {\n get: function() {\n if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var svc = W.__pnp_discoverService(gc, function(inst) {\n try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); }\n catch(e) { return false; }\n }, \"PlayerService\");\n if (svc) {\n W.__PNP_PLAYER_SVC__ = svc;\n return svc.player;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.gameData */\n Object.defineProperty(W._, \"gameData\", {\n get: () => {\n try { return W.__PNP__?.game?.state?.states?.get?.(\"Boot\")?._gameData; }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.localizer */\n Object.defineProperty(W._, \"localizer\", {\n get: () => {\n try { return W.__PNP__?.prodigy?.gameContainer?.get(\"LocalizationService\"); }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.network → discovered dynamically from DI container by shape */\n Object.defineProperty(W._, \"network\", {\n get: function() {\n if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var nm = W.__pnp_discoverService(gc, function(inst) {\n return typeof inst.getCharData === 'function'\n && ('processPlayer' in inst)\n && typeof inst.sendZoneEvent === 'function';\n }, \"NetworkManager\");\n if (nm && typeof nm === \"object\") {\n if (!nm.game) {\n Object.defineProperty(nm, \"game\", {\n get: function() { return W.__PNP__ && W.__PNP__.game; },\n enumerable: true, configurable: true\n });\n }\n W.__PNP_NETWORK__ = nm;\n return nm;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.hack → self-reference */\n Object.defineProperty(W._, \"hack\", {\n get: () => W._, enumerable: true, configurable: true\n });\n\n /* Escape battle helper — handles SecureBattleRevamp via BattleController */\n W._.functions.escapeBattle = () => {\n try {\n const g = W.__PNP__?.game;\n const currentState = g?.state?.current;\n if (currentState === \"PVP\") {\n g.state.states.PVP.endPVP();\n } else if (currentState === \"CoOp\") {\n W.__PNP__.prodigy.world.$(W._.player?.data?.zone);\n } else if (currentState === \"SecureBattleRevamp\") {\n const st = g.state.states.get(\"SecureBattleRevamp\");\n const bc = st?._battleController;\n if (bc?.escapeBattle) bc.escapeBattle();\n else g?.state?.callbackContext?.runAwayCallback();\n } else {\n g?.state?.callbackContext?.runAwayCallback();\n }\n } catch(e) { console.warn(\"[Play Origin] escapeBattle failed:\", e); }\n };\n\n /* _.membership → discovered by shape (isMember getter + hasFeatureAccess).\n * Service ID drifts per build; shape is stable. */\n Object.defineProperty(W._, \"membership\", {\n get: function() {\n if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var ms = W.__pnp_discoverService(gc, function(inst) {\n return inst && typeof inst.hasFeatureAccess === 'function'\n && 'isMember' in inst;\n }, \"MembershipService\");\n if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.functions.setMembership(bool) — deep membership override.\n memberTier is derived from three hasFeatureAccess checks, so forcing it to return\n true auto-promotes to Ultra tier. We snapshot the original _data on first call so\n disable restores it. */\n W._.functions.setMembership = function(active) {\n var ms = W._.membership;\n if (!ms) return false;\n if (!W.__PNP_MEMBERSHIP_ORIG__) {\n W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data };\n }\n if (active) {\n var start = new Date(Date.now() - 86400000).toISOString();\n var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString();\n ms._data = {\n active: true,\n features: [],\n membershipStartTs: start,\n membershipEndTs: end\n };\n Object.defineProperty(ms, \"hasFeatureAccess\", {\n value: function() { return true; },\n configurable: true, writable: true\n });\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {}\n } else {\n ms._data = W.__PNP_MEMBERSHIP_ORIG__.data;\n if (Object.getOwnPropertyDescriptor(ms, \"hasFeatureAccess\")) {\n delete ms.hasFeatureAccess;\n }\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n }\n try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {}\n return true;\n };\n\n if (!W.__PNP_PROPS_APPLIED__) {\n W.__PNP_PROPS_APPLIED__ = true;\n console.log(\"[Play Origin] Properties applied to window._\");\n }\n }\n\n /* Lodash loads as a SEPARATE script AFTER game.min.js.\n When it loads, it overwrites window._ entirely — and the game keeps\n reassigning window._ (chunks, runInContext, etc.) indefinitely.\n We PERMANENTLY poll and re-apply our properties whenever they're\n missing. The 500ms interval is negligible overhead. */\n _applyProps();\n\n setInterval(() => {\n try {\n const desc = Object.getOwnPropertyDescriptor(window._, 'instance');\n if (!desc || !desc.get || !window.__PNP__) {\n _applyProps();\n }\n /* Singleton auto-fix: the constructor may fire twice (onreset context).\n Our patch captures the first instance, but the REAL fully-initialized\n singleton (with #prodigy set) is stored on the class's static _instance.\n Detect the mismatch and update __PNP__ to the real one. */\n if (window.__PNP__ && !window.__PNP__.prodigy) {\n try {\n var ctor = Object.getPrototypeOf(window.__PNP__).constructor;\n if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) {\n window.__PNP__ = ctor._instance;\n console.log(\"[Play Origin] Singleton auto-fixed to real instance (prodigy available)\");\n }\n } catch(e) {}\n }\n /* Trigger lazy discovery for player and network via their getters */\n if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) {\n try { void window._.player; } catch(e) {}\n }\n if (!window.__PNP_NETWORK__ && window.__PNP__) {\n try { void window._.network; } catch(e) {}\n }\n } catch(e) { _applyProps(); }\n }, 500);\n})();\n\n/* ── 3. CheatGUI loader (delayed to ensure game is ready) ──\n * URL is supplied by the extension via window.__ORIGIN_MENU_URL__.\n * The extension resolves: popup override → manifest.defaultMenuUrl. */\nsetTimeout(() =>\n (async () => {\n try {\n var url = window.__ORIGIN_MENU_URL__;\n if (typeof url !== \"string\" || url.length === 0) {\n console.warn(\"[Play Origin] No menu URL set (window.__ORIGIN_MENU_URL__ missing). Mod bundle skipped.\");\n return;\n }\n eval(await (await fetch(url)).text());\n } catch(e) {\n console.error(\"[Play Origin] CheatGUI load failed:\", e);\n }\n })(), 15000);\nconsole.trace = () => {};\n", + "defaultMenuUrl": "https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js" +} diff --git a/dist/metadata.json b/dist/metadata.json index 7ba29ba..2cdf759 100644 --- a/dist/metadata.json +++ b/dist/metadata.json @@ -1,10 +1,19 @@ { - "generatedAt": "2026-05-25T19:39:06.899Z", - "patcherVersion": "4.3.0", + "generatedAt": "2026-05-25T20:58:13.440Z", + "patcherVersion": "4.4.1", "gameVersion": "2026.26.0", "publicGameHash": null, "loadGamePath": "/js/load-game-f2baaaba58.min.js", "patchDegraded": false, + "manifestHash": "aa3a3ec39939dbb0", + "perRuleCounts": { + "singleton-exposure": 1, + "safe-bind": 9, + "expose-constants": 1, + "answer-question-bypass": 1, + "external-factory-bypass": 1, + "open-question-bypass": 1 + }, "source": { "gameUrl": "https://code.prodigygame.com/code/2026.26.0/game.min.js?v=2026.26.0", "publicGameUrl": null, diff --git a/package.json b/package.json index 589cf9c..15c234b 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,14 @@ { "name": "p-np-patcher", - "version": "4.3.0", + "version": "4.4.1", "description": "Fetches and patches Prodigy game files for static hosting", "main": "./dist/patch.js", "type": "module", "scripts": { "build": "node build.mjs", - "patch": "node dist/patch.js" + "patch": "node dist/patch.js", + "test": "node --experimental-strip-types --test \"tests/**/*.test.ts\"", + "typecheck": "tsc --noEmit" }, "repository": { "type": "git", diff --git a/src/constants.ts b/src/constants.ts index 94c25ca..1b43d27 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,4 +1,4 @@ -export const VERSION = "4.3.0"; +export const VERSION = "4.4.1"; export const GUI_LINK = "https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js"; export const PRODIGY_LOAD_URL = "https://math.prodigygame.com/load"; export const PRODIGY_CODE_ORIGIN = "https://code.prodigygame.com"; diff --git a/src/manifest.ts b/src/manifest.ts new file mode 100644 index 0000000..cf630cb --- /dev/null +++ b/src/manifest.ts @@ -0,0 +1,38 @@ +import { createHash } from "node:crypto"; +import type { PatchRule } from "./patches.ts"; + +export type Manifest = { + schemaVersion: 1; + patcherVersion: string; + hash: string; + rules: ReadonlyArray; + prefix: string; + suffix: string; + defaultMenuUrl: string; +}; + +export const hashManifest = ( + rules: ReadonlyArray, + prefix: string, + suffix: string, + defaultMenuUrl: string +): string => { + const canonical = JSON.stringify({ rules, prefix, suffix, defaultMenuUrl }); + return createHash("sha256").update(canonical).digest("hex").slice(0, 16); +}; + +export const buildManifest = (input: { + patcherVersion: string; + rules: ReadonlyArray; + prefix: string; + suffix: string; + defaultMenuUrl: string; +}): Manifest => ({ + schemaVersion: 1, + patcherVersion: input.patcherVersion, + hash: hashManifest(input.rules, input.prefix, input.suffix, input.defaultMenuUrl), + rules: input.rules, + prefix: input.prefix, + suffix: input.suffix, + defaultMenuUrl: input.defaultMenuUrl +}); diff --git a/src/patch.ts b/src/patch.ts index cd960f5..242054e 100644 --- a/src/patch.ts +++ b/src/patch.ts @@ -4,12 +4,13 @@ import { fileURLToPath } from "node:url"; import { GUI_LINK, PRODIGY_CODE_ORIGIN, PRODIGY_LOAD_URL, VERSION } from "./constants.js"; import { displayImages } from "./displayImages.js"; +import { RULES, applyRules } from "./patches.js"; +import { buildPrefix, buildSuffix } from "./wrappers.js"; +import { buildManifest } from "./manifest.js"; const FETCH_TIMEOUT_MS = 30000; -type GameStatus = { - gameClientVersion: string; -}; +type GameStatus = { gameClientVersion: string }; export type PatchResult = { outputDir: string; @@ -17,24 +18,19 @@ export type PatchResult = { publicGameHash: string | null; loadGamePath: string; patchDegraded: boolean; + manifestHash: string; }; const parseGameStatus = (launcherHtml: string): GameStatus => { const match = launcherHtml.match(/gameStatusDataStr\s*=\s*'([^']+)'/); - if (!match?.[1]) { - throw new Error("Unable to find gameStatusDataStr in launcher HTML."); - } - + if (!match?.[1]) throw new Error("Unable to find gameStatusDataStr in launcher HTML."); return JSON.parse(match[1]) as GameStatus; }; const parseLoadGameUrl = (launcherHtml: string): string => { - const scriptMatch = launcherHtml.match(/https:\/\/code\.prodigygame\.com\/js\/load-game-[a-f0-9]+\.min\.js/i); - if (!scriptMatch?.[0]) { - throw new Error("Unable to locate load-game URL in launcher HTML."); - } - - return scriptMatch[0]; + const m = launcherHtml.match(/https:\/\/code\.prodigygame\.com\/js\/load-game-[a-f0-9]+\.min\.js/i); + if (!m?.[0]) throw new Error("Unable to locate load-game URL in launcher HTML."); + return m[0]; }; const parsePublicGameHash = (loadGameSource: string): string | null => { @@ -44,475 +40,31 @@ const parsePublicGameHash = (loadGameSource: string): string | null => { const isJavaScript = (content: string): boolean => { const trimmed = content.trim(); - if (trimmed.startsWith(" { - // ── Modern Webpack 5 Detection ── - // The game uses an arrow-function IIFE with __webpack_modules__ and exports to window. - // There are NO global app/game variables. Instead, an inversify singleton is used: - // X.q.instance.prodigy.gameContainer.get(serviceId) - // where X varies per module scope (N, Y, F, M, etc.). - - const patches: Array<[string | RegExp, string]> = []; - let corePatched = false; - - // ── 1. Singleton Exposure ── - // Find the main prodigy singleton constructor. It's the ONLY one that: - // - takes 1 arg (the Phaser game) - // - sets _instance and _game - // - is immediately followed by destroy() that nulls _prodigy - // Pattern: _instance=this),this._game=E}destroy(){ - const singletonPatched = source.replace( - /(_instance=this\),this\._game=([A-Za-z_$][\w$]*)\}destroy\(\)\{)/, - `_instance=this),window.__PNP__=this,this._game=$2}destroy(){` - ); - if (singletonPatched !== source) { - source = singletonPatched; - console.log(" ✓ Singleton exposure injected (window.__PNP__)"); - corePatched = true; - } else { - console.warn(" ✗ Could not find singleton constructor pattern"); - } - - // ── 2. hasMembership ── - // NOTE: We do NOT force hasMembership=true at the source level because that - // crashes the membership initialization flow (upgradeOptions is never set, - // causing TypeError at login). Instead, expose the membership service so the - // CheatGUI can toggle it dynamically AFTER the game finishes initializing. - // The service ID is "859-25be" and the property is .isMember. - - // ── 3. Fix duplicate Inversify bindings ── - // Replace all gameContainer.bind(X) with __pnp_safeBind(gameContainer, X) - // This is a global regex that catches every instance in the webpack bundle. - patches.push([ - /([A-Za-z_$][\w$]*\.q\.instance\.prodigy\.gameContainer)\.bind\(/g, - `window.__pnp_safeBind($1,` - ]); - - // ── 4. Expose Constants Map ── - // The game defines: .constants={"GameConstants.Build.VERSION":"2026.18.1",...} - // The minifier-assigned variable name drifts every build (A, f, M, ...), so we - // match any single identifier prefix rather than hardcoding one. - patches.push([ - /([A-Za-z_$][\w$]*)\.constants=\{"GameConstants/, - `$1.constants=window.__PNP_CONSTANTS_RAW__={"GameConstants` - ]); - - // ── 4. Answer Question Bypass (modern class method syntax) ── - // answerQuestion(){if(!this._isOpen){ → inject bypass before the if - patches.push([ - `answerQuestion(){if(!this._isOpen)`, - `answerQuestion(){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.onQuestionAnswered.dispatch(_w,0,null);_w?this.onQuestionAnsweredCorrectly.dispatch(0,null):this.onQuestionAnsweredIncorrectly.dispatch(0,null);return}if(!this._isOpen)` - ]); - - // ── 5. External Factory Bypass ── - // Inject before: const E=this.findParameter("externalFactory") - patches.push([ - /(const [A-Za-z_$]=this\.findParameter\("externalFactory"\))/, - `if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.finish({answerCorrect:_w,responseTime:0});return}$1` - ]); - - // ── 6. openQuestionInterfaceThenEmitNotifications bypass ── - patches.push([ - /openQuestionInterfaceThenEmitNotifications\(([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$])\)\{this\._education/, - `openQuestionInterfaceThenEmitNotifications($1,$2,$3,$4,$5){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){$5&&$5(!0,10,1,!1,!1,{});return}this._education` - ]); - - // ── Apply all search-replace patches ── - const patchedCore = patches.reduce((current, [searchValue, replacementValue], index) => { - const result = current.replace(searchValue, replacementValue); - if (result === current) { - console.warn(` ✗ Patch ${index + 1} did not match (non-critical)`); - } else { - console.log(` ✓ Patch ${index + 1} applied`); - } - return result; - }, source); - - if (!corePatched) { - console.warn("WARNING: Could not inject singleton exposure. Setting patchDegraded=true."); - ctx.patchDegraded = true; - } - - // ── Prefix: runs BEFORE game code ── - const prefix = ` -/** P-NP Patcher v${VERSION} — Prefix **/ -const _getBox=(o,t)=>({string:"+",style:"font-size: 1px; padding: 0 "+Math.floor(o/2)+"px; line-height: "+t+"px;"}); -console.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t); -console.log("%c"+n.string,n.style+"background: url("+o+"); background-size: "+e.width*t+"px " -+e.height*t+"px; color: transparent;")}),e.src=o}); -const _pnpOldLog = console.log.bind(console); -console.log = (...d) => { - if (d && d.length && typeof d[0] === "string" && d[0].includes("This is a browser feature for developers only")) return "lol no"; - if (new Error().stack?.split("\\n").reverse()[0]?.includes("load-identity")) return "denied"; - return _pnpOldLog(...d); -}; -/** Ensure window._ exists before game code (lodash may load separately) **/ -if (typeof window._ === 'undefined' || window._ === null) window._ = {}; -window.__PNP_ORIG_UNDERSCORE__ = window._; -window._.variables = Object.create(null); -/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash - * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/ -if (!window._.constants) { - var _c = Object.create(null); - _c.get = function(k) { return _c[k]; }; - _c.set = function(k, v) { _c[k] = v; return _c; }; - _c.has = function(k) { return k in _c; }; - _c.constants = _c; - window._.constants = _c; -} - -/** Fix Inversify duplicate binding errors (e.g. "Ambiguous match: MathTower"). - * Some installers bind services to the GLOBAL gameContainer and can fire more - * than once in the patched execution context. We define a helper that the - * game-code patch below uses to safely bind (rebind if already bound). */ -window.__pnp_safeBind = function(container, id) { - try { - var inv = container._inversifyContainer || container; - if (typeof inv.isBound === 'function' && inv.isBound(id)) { - return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id); - } - } catch(e) {} - return container.bind(id); -}; - -/** Guard SW.Load.decrementLoadSemaphore against duplicate calls. - * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second - * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher - * suffix calls it too → createGame() fires twice → all Inversify bind() calls - * run twice on the same container → "Ambiguous match found for MathTower" crash. - * - * Fix: wrap the function so only the FIRST call triggers createGame(). - * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */ -/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing). - * This replaces hardcoded service IDs that break every game update. */ -window.__pnp_discoverService = function(gc, shapeFn, label) { - try { - var map = gc._inversifyContainer._bindingDictionary._map; - if (!map) return null; - var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/; - var iter = map.keys(); - var next = iter.next(); - while (!next.done) { - var id = next.value; - next = iter.next(); - if (typeof id !== 'string' || !hexPattern.test(id)) continue; - try { - var inst = gc.get(id); - if (inst && shapeFn(inst)) { - console.log("[Play Origin] Discovered " + label + " \\u2192 " + id); - return inst; - } - } catch(e) {} - } - } catch(e) { - console.warn("[Play Origin] Discovery failed for " + label + ":", e); - } - return null; -}; - -if (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') { - var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load); - SW.Load.decrementLoadSemaphore = function() { - if (window.__PNP_SEM_DECREMENTED__) { - console.warn("[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()"); - return; - } - window.__PNP_SEM_DECREMENTED__ = true; - return _pnpOrigDecrement(); - }; -} -`; - - // ── Suffix: runs AFTER game code ── - const suffix = ` -/** P-NP Patcher v${VERSION} — Suffix **/ - -/* ── 1. Immediate: Signal game script loaded ── */ -SW.Load.decrementLoadSemaphore(); -console.log("%cP-NP Patcher", "font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;"); -console.log("%cVersion ${VERSION}", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); -console.image((e => e[Math.floor(Math.random() * e.length)])(${JSON.stringify(displayImages)})); - -/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */ -(function _pnpSetup() { - function _applyProps() { - const W = window; - if (!W._) W._ = {}; - - /* variables & functions namespaces */ - if (!W._.variables) W._.variables = Object.create(null); - W._.functions = Object.create(null); - - /* _.instance → the prodigy singleton exposed by our constructor patch */ - Object.defineProperty(W._, "instance", { - get: () => W.__PNP__, - enumerable: true, configurable: true - }); - - /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants - * WHY: cheatGUI uses _.constants.constants["GameConstants.X"] = val (plain object writes) - * patcher game-side bypasses use _.constants.get("GameConstants.X") (Map-like reads) - * Both must work on the same underlying storage. We make _.constants the raw object - * and bolt on get/set/has methods + a .constants self-alias so every call site works. */ - if (W.__PNP_CONSTANTS_RAW__) { - var raw = W.__PNP_CONSTANTS_RAW__; - /* bolt Map-like API onto the plain object */ - raw.get = function(key) { return raw[key]; }; - raw.set = function(key, val) { raw[key] = val; return raw; }; - raw.has = function(key) { return key in raw; }; - /* self-alias: _.constants.constants["GameConstants.X"] = val */ - raw.constants = raw; - W._.constants = raw; - } - - /* _.player → discovered dynamically from DI container by shape. - * Cache the SERVICE (stable ref), not the player object (.player getter - * returns a new object each call). */ - Object.defineProperty(W._, "player", { - get: function() { - if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player; - try { - var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; - if (!gc) return null; - var svc = W.__pnp_discoverService(gc, function(inst) { - try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); } - catch(e) { return false; } - }, "PlayerService"); - if (svc) { - W.__PNP_PLAYER_SVC__ = svc; - return svc.player; - } - } catch(e) {} - return null; - }, - enumerable: true, configurable: true - }); - - /* _.gameData */ - Object.defineProperty(W._, "gameData", { - get: () => { - try { return W.__PNP__?.game?.state?.states?.get?.("Boot")?._gameData; } - catch(e) { return null; } - }, - enumerable: true, configurable: true - }); - - /* _.localizer */ - Object.defineProperty(W._, "localizer", { - get: () => { - try { return W.__PNP__?.prodigy?.gameContainer?.get("LocalizationService"); } - catch(e) { return null; } - }, - enumerable: true, configurable: true - }); - - /* _.network → discovered dynamically from DI container by shape */ - Object.defineProperty(W._, "network", { - get: function() { - if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__; - try { - var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; - if (!gc) return null; - var nm = W.__pnp_discoverService(gc, function(inst) { - return typeof inst.getCharData === 'function' - && ('processPlayer' in inst) - && typeof inst.sendZoneEvent === 'function'; - }, "NetworkManager"); - if (nm && typeof nm === "object") { - if (!nm.game) { - Object.defineProperty(nm, "game", { - get: function() { return W.__PNP__ && W.__PNP__.game; }, - enumerable: true, configurable: true - }); - } - W.__PNP_NETWORK__ = nm; - return nm; - } - } catch(e) {} - return null; - }, - enumerable: true, configurable: true - }); - - /* _.hack → self-reference */ - Object.defineProperty(W._, "hack", { - get: () => W._, enumerable: true, configurable: true - }); - - /* Escape battle helper — handles SecureBattleRevamp via BattleController */ - W._.functions.escapeBattle = () => { - try { - const g = W.__PNP__?.game; - const currentState = g?.state?.current; - if (currentState === "PVP") { - g.state.states.PVP.endPVP(); - } else if (currentState === "CoOp") { - W.__PNP__.prodigy.world.$(W._.player?.data?.zone); - } else if (currentState === "SecureBattleRevamp") { - const st = g.state.states.get("SecureBattleRevamp"); - const bc = st?._battleController; - if (bc?.escapeBattle) bc.escapeBattle(); - else g?.state?.callbackContext?.runAwayCallback(); - } else { - g?.state?.callbackContext?.runAwayCallback(); - } - } catch(e) { console.warn("[Play Origin] escapeBattle failed:", e); } - }; - - /* _.membership → discovered by shape (isMember getter + hasFeatureAccess). - * Service ID drifts per build; shape is stable. */ - Object.defineProperty(W._, "membership", { - get: function() { - if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__; - try { - var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; - if (!gc) return null; - var ms = W.__pnp_discoverService(gc, function(inst) { - return inst && typeof inst.hasFeatureAccess === 'function' - && 'isMember' in inst; - }, "MembershipService"); - if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; } - } catch(e) {} - return null; - }, - enumerable: true, configurable: true - }); - - /* _.functions.setMembership(bool) — deep membership override. - memberTier is derived from three hasFeatureAccess checks, so forcing it to return - true auto-promotes to Ultra tier. We snapshot the original _data on first call so - disable restores it. */ - W._.functions.setMembership = function(active) { - var ms = W._.membership; - if (!ms) return false; - if (!W.__PNP_MEMBERSHIP_ORIG__) { - W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data }; - } - if (active) { - var start = new Date(Date.now() - 86400000).toISOString(); - var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString(); - ms._data = { - active: true, - features: [], - membershipStartTs: start, - membershipEndTs: end - }; - Object.defineProperty(ms, "hasFeatureAccess", { - value: function() { return true; }, - configurable: true, writable: true - }); - try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {} - try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {} - } else { - ms._data = W.__PNP_MEMBERSHIP_ORIG__.data; - if (Object.getOwnPropertyDescriptor(ms, "hasFeatureAccess")) { - delete ms.hasFeatureAccess; - } - try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {} - } - try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {} - return true; - }; - - if (!W.__PNP_PROPS_APPLIED__) { - W.__PNP_PROPS_APPLIED__ = true; - console.log("[Play Origin] Properties applied to window._"); - } - } - - /* Lodash loads as a SEPARATE script AFTER game.min.js. - When it loads, it overwrites window._ entirely — and the game keeps - reassigning window._ (chunks, runInContext, etc.) indefinitely. - We PERMANENTLY poll and re-apply our properties whenever they're - missing. The 500ms interval is negligible overhead. */ - _applyProps(); - - setInterval(() => { - try { - const desc = Object.getOwnPropertyDescriptor(window._, 'instance'); - if (!desc || !desc.get || !window.__PNP__) { - _applyProps(); - } - /* Singleton auto-fix: the constructor may fire twice (onreset context). - Our patch captures the first instance, but the REAL fully-initialized - singleton (with #prodigy set) is stored on the class's static _instance. - Detect the mismatch and update __PNP__ to the real one. */ - if (window.__PNP__ && !window.__PNP__.prodigy) { - try { - var ctor = Object.getPrototypeOf(window.__PNP__).constructor; - if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) { - window.__PNP__ = ctor._instance; - console.log("[Play Origin] Singleton auto-fixed to real instance (prodigy available)"); - } - } catch(e) {} - } - /* Trigger lazy discovery for player and network via their getters */ - if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) { - try { void window._.player; } catch(e) {} - } - if (!window.__PNP_NETWORK__ && window.__PNP__) { - try { void window._.network; } catch(e) {} - } - } catch(e) { _applyProps(); } - }, 500); -})(); - -/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */ -setTimeout(() => - (async () => { - try { - eval(await (await fetch("${GUI_LINK}")).text()); - } catch(e) { - console.error("[Play Origin] CheatGUI load failed:", e); - } - })(), 15000); -console.trace = () => {}; -`; - - return `${prefix}\n${patchedCore}\n${suffix}`; -}; - -const patchPublicGameFile = (source: string): string => { - return ` +const patchPublicGameFile = (source: string): string => ` (() => { const console = new Proxy({}, { get: () => () => {} }); ${source} })(); `; -}; const fetchText = async (url: string): Promise => { const controller = new AbortController(); const timeoutId = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS); - try { const response = await fetch(url, { signal: controller.signal }); - if (!response.ok) { - throw new Error(`Request failed for ${url} (${response.status} ${response.statusText}).`); - } - - const text = await response.text(); - return text; + if (!response.ok) throw new Error(`Request failed for ${url} (${response.status} ${response.statusText}).`); + return await response.text(); } finally { clearTimeout(timeoutId); } }; export const runPatch = async (outputDir = "patched-output"): Promise => { - const ctx: PatchContext = { patchDegraded: false }; - const launcherHtml = await fetchText(PRODIGY_LOAD_URL); const gameStatus = parseGameStatus(launcherHtml); const loadGameUrl = parseLoadGameUrl(launcherHtml); @@ -526,12 +78,8 @@ export const runPatch = async (outputDir = "patched-output"): Promise (perRuleCounts[r.id] ?? 0) < r.minMatches); + const patchDegraded = degraded.length > 0; + + for (const rule of RULES) { + const n = perRuleCounts[rule.id] ?? 0; + const ok = n >= rule.minMatches ? "✓" : "✗"; + console.log(` ${ok} rule "${rule.id}" matched ${n}x (min ${rule.minMatches})`); } - console.log("Applying patches..."); - const patchedGame = patchGameFile(gameSource, ctx); + if (patchDegraded) { + console.warn( + `[patcher] WARNING: ${degraded.length} rule(s) below minMatches — ` + + `setting patchDegraded=true. Extension will still apply the manifest as-is.` + ); + } + + // Build manifest + verification bundle. + const manifest = buildManifest({ + patcherVersion: VERSION, + rules: RULES, + prefix, + suffix, + defaultMenuUrl: GUI_LINK + }); + const verificationBundle = `${prefix}\n${patchedCore}\n${suffix}`; const patchedPublicGame = publicGameSource ? patchPublicGameFile(publicGameSource) : null; const resolvedOutputDir = path.resolve(outputDir); await mkdir(resolvedOutputDir, { recursive: true }); const writes: Array> = [ - writeFile(path.join(resolvedOutputDir, "game.min.js"), `// game.min.js v${gameVersion}\n\n${patchedGame}`, "utf8"), + writeFile( + path.join(resolvedOutputDir, "manifest.json"), + `${JSON.stringify(manifest, null, 2)}\n`, + "utf8" + ), + writeFile( + path.join(resolvedOutputDir, "game.min.js"), + `// game.min.js v${gameVersion} (verification copy — extension uses manifest.json)\n\n${verificationBundle}`, + "utf8" + ), writeFile( path.join(resolvedOutputDir, "metadata.json"), `${JSON.stringify( @@ -561,13 +149,10 @@ export const runPatch = async (outputDir = "patched-output"): Promise { console.log(`Patched files written to ${result.outputDir}`); console.log(`gameClientVersion=${result.gameClientVersion}`); - console.log(`publicGameHash=${result.publicGameHash}`); - console.log(`loadGamePath=${result.loadGamePath}`); - if (result.patchDegraded) { - console.warn(`WARNING: patchDegraded=true - some patches may not have been applied`); - } + console.log(`manifestHash=${result.manifestHash}`); + console.log(`patchDegraded=${result.patchDegraded}`); }) .catch((error: unknown) => { const message = error instanceof Error ? error.stack ?? error.message : String(error); diff --git a/src/patches.ts b/src/patches.ts new file mode 100644 index 0000000..86a5b4c --- /dev/null +++ b/src/patches.ts @@ -0,0 +1,100 @@ +import { createHash } from "node:crypto"; + +export type PatchRule = { + id: string; + description: string; + find: string; // RegExp source (no surrounding slashes) + flags: string; // RegExp flags ("" = first-match only; include "g" for replace-all) + replace: string; + minMatches: number; +}; + +// Ordered list of regex find/replace rules applied to game.min.js. +// All current Play Origin in-source patches converted to regex form, preserving +// first-match-vs-all semantics from the original patcher. +export const RULES: ReadonlyArray = [ + { + id: "singleton-exposure", + description: "Expose the prodigy singleton on window.__PNP__ in its constructor", + find: "(_instance=this\\),this\\._game=([A-Za-z_$][\\w$]*)\\}destroy\\(\\)\\{)", + flags: "", + replace: "_instance=this),window.__PNP__=this,this._game=$2}destroy(){", + minMatches: 1 + }, + { + id: "safe-bind", + description: "Wrap every gameContainer.bind call with __pnp_safeBind for idempotent (re)binding", + find: "([A-Za-z_$][\\w$]*\\.q\\.instance\\.prodigy\\.gameContainer)\\.bind\\(", + flags: "g", + replace: "window.__pnp_safeBind($1,", + minMatches: 1 + }, + { + id: "expose-constants", + description: "Alias the constants map onto window.__PNP_CONSTANTS_RAW__", + find: "([A-Za-z_$][\\w$]*)\\.constants=\\{\"GameConstants", + flags: "", + replace: "$1.constants=window.__PNP_CONSTANTS_RAW__={\"GameConstants", + minMatches: 1 + }, + { + id: "answer-question-bypass", + description: "Inject auto-answer bypass before the isOpen check in answerQuestion()", + find: "answerQuestion\\(\\)\\{if\\(!this\\._isOpen\\)", + flags: "", + replace: + "answerQuestion(){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.onQuestionAnswered.dispatch(_w,0,null);_w?this.onQuestionAnsweredCorrectly.dispatch(0,null):this.onQuestionAnsweredIncorrectly.dispatch(0,null);return}if(!this._isOpen)", + minMatches: 1 + }, + { + id: "external-factory-bypass", + description: "Inject auto-answer bypass before const X=this.findParameter(\"externalFactory\")", + find: "(const [A-Za-z_$]=this\\.findParameter\\(\"externalFactory\"\\))", + flags: "", + replace: + "if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.finish({answerCorrect:_w,responseTime:0});return}$1", + minMatches: 1 + }, + { + id: "open-question-bypass", + description: "Inject early-return into openQuestionInterfaceThenEmitNotifications", + find: "openQuestionInterfaceThenEmitNotifications\\(([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$])\\)\\{this\\._education", + flags: "", + replace: + "openQuestionInterfaceThenEmitNotifications($1,$2,$3,$4,$5){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){$5&&$5(!0,10,1,!1,!1,{});return}this._education", + minMatches: 1 + } +]; + +export type ApplyRulesOutcome = { + output: string; + perRuleCounts: Record; +}; + +export const applyRules = ( + source: string, + rules: ReadonlyArray +): ApplyRulesOutcome => { + const perRuleCounts: Record = {}; + let output = source; + for (const rule of rules) { + const re = new RegExp(rule.find, rule.flags); + let count = 0; + output = output.replace(re, (...args) => { + count += 1; + const groups = args.slice(1, -2); + let result = rule.replace; + groups.forEach((g, i) => { + result = result.replace(new RegExp("\\$" + (i + 1), "g"), g ?? ""); + }); + return result; + }); + perRuleCounts[rule.id] = count; + } + return { output, perRuleCounts }; +}; + +export const hashRules = (rules: ReadonlyArray): string => { + const canonical = JSON.stringify(rules); + return createHash("sha256").update(canonical).digest("hex").slice(0, 16); +}; diff --git a/src/wrappers.ts b/src/wrappers.ts new file mode 100644 index 0000000..b5f9a76 --- /dev/null +++ b/src/wrappers.ts @@ -0,0 +1,347 @@ +export const buildPrefix = (version: string): string => { + return ` +/** P-NP Patcher v${version} — Prefix **/ +const _getBox=(o,t)=>({string:"+",style:"font-size: 1px; padding: 0 "+Math.floor(o/2)+"px; line-height: "+t+"px;"}); +console.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t); +console.log("%c"+n.string,n.style+"background: url("+o+"); background-size: "+e.width*t+"px " ++e.height*t+"px; color: transparent;")}),e.src=o}); +const _pnpOldLog = console.log.bind(console); +console.log = (...d) => { + if (d && d.length && typeof d[0] === "string" && d[0].includes("This is a browser feature for developers only")) return "lol no"; + if (new Error().stack?.split("\\n").reverse()[0]?.includes("load-identity")) return "denied"; + return _pnpOldLog(...d); +}; +/** Ensure window._ exists before game code (lodash may load separately) **/ +if (typeof window._ === 'undefined' || window._ === null) window._ = {}; +window.__PNP_ORIG_UNDERSCORE__ = window._; +window._.variables = Object.create(null); +/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash + * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/ +if (!window._.constants) { + var _c = Object.create(null); + _c.get = function(k) { return _c[k]; }; + _c.set = function(k, v) { _c[k] = v; return _c; }; + _c.has = function(k) { return k in _c; }; + _c.constants = _c; + window._.constants = _c; +} + +/** Fix Inversify duplicate binding errors (e.g. "Ambiguous match: MathTower"). + * Some installers bind services to the GLOBAL gameContainer and can fire more + * than once in the patched execution context. We define a helper that the + * game-code patch below uses to safely bind (rebind if already bound). */ +window.__pnp_safeBind = function(container, id) { + try { + var inv = container._inversifyContainer || container; + if (typeof inv.isBound === 'function' && inv.isBound(id)) { + return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id); + } + } catch(e) {} + return container.bind(id); +}; + +/** Guard SW.Load.decrementLoadSemaphore against duplicate calls. + * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second + * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher + * suffix calls it too → createGame() fires twice → all Inversify bind() calls + * run twice on the same container → "Ambiguous match found for MathTower" crash. + * + * Fix: wrap the function so only the FIRST call triggers createGame(). + * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */ +/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing). + * This replaces hardcoded service IDs that break every game update. */ +window.__pnp_discoverService = function(gc, shapeFn, label) { + try { + var map = gc._inversifyContainer._bindingDictionary._map; + if (!map) return null; + var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/; + var iter = map.keys(); + var next = iter.next(); + while (!next.done) { + var id = next.value; + next = iter.next(); + if (typeof id !== 'string' || !hexPattern.test(id)) continue; + try { + var inst = gc.get(id); + if (inst && shapeFn(inst)) { + console.log("[Play Origin] Discovered " + label + " \\u2192 " + id); + return inst; + } + } catch(e) {} + } + } catch(e) { + console.warn("[Play Origin] Discovery failed for " + label + ":", e); + } + return null; +}; + +if (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') { + var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load); + SW.Load.decrementLoadSemaphore = function() { + if (window.__PNP_SEM_DECREMENTED__) { + console.warn("[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()"); + return; + } + window.__PNP_SEM_DECREMENTED__ = true; + return _pnpOrigDecrement(); + }; +} +`; +}; + +export const buildSuffix = ( + version: string, + displayImages: ReadonlyArray +): string => { + return ` +/** P-NP Patcher v${version} — Suffix **/ + +/* ── 1. Immediate: Signal game script loaded ── */ +SW.Load.decrementLoadSemaphore(); +console.log("%cP-NP Patcher", "font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;"); +console.log("%cVersion ${version}", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); +console.image((e => e[Math.floor(Math.random() * e.length)])(${JSON.stringify(displayImages)})); + +/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */ +(function _pnpSetup() { + function _applyProps() { + const W = window; + if (!W._) W._ = {}; + + /* variables & functions namespaces */ + if (!W._.variables) W._.variables = Object.create(null); + W._.functions = Object.create(null); + + /* _.instance → the prodigy singleton exposed by our constructor patch */ + Object.defineProperty(W._, "instance", { + get: () => W.__PNP__, + enumerable: true, configurable: true + }); + + /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants + * WHY: cheatGUI uses _.constants.constants["GameConstants.X"] = val (plain object writes) + * patcher game-side bypasses use _.constants.get("GameConstants.X") (Map-like reads) + * Both must work on the same underlying storage. We make _.constants the raw object + * and bolt on get/set/has methods + a .constants self-alias so every call site works. */ + if (W.__PNP_CONSTANTS_RAW__) { + var raw = W.__PNP_CONSTANTS_RAW__; + /* bolt Map-like API onto the plain object */ + raw.get = function(key) { return raw[key]; }; + raw.set = function(key, val) { raw[key] = val; return raw; }; + raw.has = function(key) { return key in raw; }; + /* self-alias: _.constants.constants["GameConstants.X"] = val */ + raw.constants = raw; + W._.constants = raw; + } + + /* _.player → discovered dynamically from DI container by shape. + * Cache the SERVICE (stable ref), not the player object (.player getter + * returns a new object each call). */ + Object.defineProperty(W._, "player", { + get: function() { + if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player; + try { + var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; + if (!gc) return null; + var svc = W.__pnp_discoverService(gc, function(inst) { + try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); } + catch(e) { return false; } + }, "PlayerService"); + if (svc) { + W.__PNP_PLAYER_SVC__ = svc; + return svc.player; + } + } catch(e) {} + return null; + }, + enumerable: true, configurable: true + }); + + /* _.gameData */ + Object.defineProperty(W._, "gameData", { + get: () => { + try { return W.__PNP__?.game?.state?.states?.get?.("Boot")?._gameData; } + catch(e) { return null; } + }, + enumerable: true, configurable: true + }); + + /* _.localizer */ + Object.defineProperty(W._, "localizer", { + get: () => { + try { return W.__PNP__?.prodigy?.gameContainer?.get("LocalizationService"); } + catch(e) { return null; } + }, + enumerable: true, configurable: true + }); + + /* _.network → discovered dynamically from DI container by shape */ + Object.defineProperty(W._, "network", { + get: function() { + if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__; + try { + var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; + if (!gc) return null; + var nm = W.__pnp_discoverService(gc, function(inst) { + return typeof inst.getCharData === 'function' + && ('processPlayer' in inst) + && typeof inst.sendZoneEvent === 'function'; + }, "NetworkManager"); + if (nm && typeof nm === "object") { + if (!nm.game) { + Object.defineProperty(nm, "game", { + get: function() { return W.__PNP__ && W.__PNP__.game; }, + enumerable: true, configurable: true + }); + } + W.__PNP_NETWORK__ = nm; + return nm; + } + } catch(e) {} + return null; + }, + enumerable: true, configurable: true + }); + + /* _.hack → self-reference */ + Object.defineProperty(W._, "hack", { + get: () => W._, enumerable: true, configurable: true + }); + + /* Escape battle helper — handles SecureBattleRevamp via BattleController */ + W._.functions.escapeBattle = () => { + try { + const g = W.__PNP__?.game; + const currentState = g?.state?.current; + if (currentState === "PVP") { + g.state.states.PVP.endPVP(); + } else if (currentState === "CoOp") { + W.__PNP__.prodigy.world.$(W._.player?.data?.zone); + } else if (currentState === "SecureBattleRevamp") { + const st = g.state.states.get("SecureBattleRevamp"); + const bc = st?._battleController; + if (bc?.escapeBattle) bc.escapeBattle(); + else g?.state?.callbackContext?.runAwayCallback(); + } else { + g?.state?.callbackContext?.runAwayCallback(); + } + } catch(e) { console.warn("[Play Origin] escapeBattle failed:", e); } + }; + + /* _.membership → discovered by shape (isMember getter + hasFeatureAccess). + * Service ID drifts per build; shape is stable. */ + Object.defineProperty(W._, "membership", { + get: function() { + if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__; + try { + var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; + if (!gc) return null; + var ms = W.__pnp_discoverService(gc, function(inst) { + return inst && typeof inst.hasFeatureAccess === 'function' + && 'isMember' in inst; + }, "MembershipService"); + if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; } + } catch(e) {} + return null; + }, + enumerable: true, configurable: true + }); + + /* _.functions.setMembership(bool) — deep membership override. + memberTier is derived from three hasFeatureAccess checks, so forcing it to return + true auto-promotes to Ultra tier. We snapshot the original _data on first call so + disable restores it. */ + W._.functions.setMembership = function(active) { + var ms = W._.membership; + if (!ms) return false; + if (!W.__PNP_MEMBERSHIP_ORIG__) { + W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data }; + } + if (active) { + var start = new Date(Date.now() - 86400000).toISOString(); + var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString(); + ms._data = { + active: true, + features: [], + membershipStartTs: start, + membershipEndTs: end + }; + Object.defineProperty(ms, "hasFeatureAccess", { + value: function() { return true; }, + configurable: true, writable: true + }); + try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {} + try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {} + } else { + ms._data = W.__PNP_MEMBERSHIP_ORIG__.data; + if (Object.getOwnPropertyDescriptor(ms, "hasFeatureAccess")) { + delete ms.hasFeatureAccess; + } + try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {} + } + try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {} + return true; + }; + + if (!W.__PNP_PROPS_APPLIED__) { + W.__PNP_PROPS_APPLIED__ = true; + console.log("[Play Origin] Properties applied to window._"); + } + } + + /* Lodash loads as a SEPARATE script AFTER game.min.js. + When it loads, it overwrites window._ entirely — and the game keeps + reassigning window._ (chunks, runInContext, etc.) indefinitely. + We PERMANENTLY poll and re-apply our properties whenever they're + missing. The 500ms interval is negligible overhead. */ + _applyProps(); + + setInterval(() => { + try { + const desc = Object.getOwnPropertyDescriptor(window._, 'instance'); + if (!desc || !desc.get || !window.__PNP__) { + _applyProps(); + } + /* Singleton auto-fix: the constructor may fire twice (onreset context). + Our patch captures the first instance, but the REAL fully-initialized + singleton (with #prodigy set) is stored on the class's static _instance. + Detect the mismatch and update __PNP__ to the real one. */ + if (window.__PNP__ && !window.__PNP__.prodigy) { + try { + var ctor = Object.getPrototypeOf(window.__PNP__).constructor; + if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) { + window.__PNP__ = ctor._instance; + console.log("[Play Origin] Singleton auto-fixed to real instance (prodigy available)"); + } + } catch(e) {} + } + /* Trigger lazy discovery for player and network via their getters */ + if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) { + try { void window._.player; } catch(e) {} + } + if (!window.__PNP_NETWORK__ && window.__PNP__) { + try { void window._.network; } catch(e) {} + } + } catch(e) { _applyProps(); } + }, 500); +})(); + +/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── + * URL is supplied by the extension via window.__ORIGIN_MENU_URL__. + * The extension resolves: popup override → manifest.defaultMenuUrl. */ +setTimeout(() => + (async () => { + try { + var url = window.__ORIGIN_MENU_URL__; + if (typeof url !== "string" || url.length === 0) { + console.warn("[Play Origin] No menu URL set (window.__ORIGIN_MENU_URL__ missing). Mod bundle skipped."); + return; + } + eval(await (await fetch(url)).text()); + } catch(e) { + console.error("[Play Origin] CheatGUI load failed:", e); + } + })(), 15000); +console.trace = () => {}; +`; +}; diff --git a/tests/integration.test.ts b/tests/integration.test.ts new file mode 100644 index 0000000..dae2a71 --- /dev/null +++ b/tests/integration.test.ts @@ -0,0 +1,70 @@ +import { describe, it, test } from "node:test"; +import assert from "node:assert/strict"; +import { RULES, applyRules } from "../src/patches.ts"; +import { buildPrefix, buildSuffix } from "../src/wrappers.ts"; +import { buildManifest } from "../src/manifest.ts"; +import { GUI_LINK } from "../src/constants.ts"; + +// Synthetic mini-bundle exhibiting all patch sites we care about. +const FIXTURE = ` +class Prodigy{constructor(E){_instance=this),this._game=E}destroy(){this._prodigy=null}} +class GC{thing(){return A.q.instance.prodigy.gameContainer.bind("MathTower").to(X);}} +var M={};M.constants={"GameConstants.Build.VERSION":"2026.18.1","GameConstants.Debug.EDUCATION_ENABLED":false}; +class Q{answerQuestion(){if(!this._isOpen){return this._dispatch();}}} +class EF{run(){const Z=this.findParameter("externalFactory");return Z();}} +class OQ{openQuestionInterfaceThenEmitNotifications(a,b,c,d,e){this._education.fire();}} +`; + +describe("integration — full pipeline on synthetic bundle", () => { + it("apply rules → wrap → manifest pipeline produces expected output", () => { + const { output: patched, perRuleCounts } = applyRules(FIXTURE, RULES); + + for (const rule of RULES) { + assert.ok( + (perRuleCounts[rule.id] ?? 0) >= rule.minMatches, + `rule ${rule.id} matched ${perRuleCounts[rule.id]} times, needs ${rule.minMatches}` + ); + } + + const prefix = buildPrefix("4.4.1"); + const suffix = buildSuffix("4.4.1", ["https://img/1.png"]); + const wrapped = `${prefix}\n${patched}\n${suffix}`; + + assert.ok(wrapped.includes("window.__PNP__=this")); + assert.ok(wrapped.includes("window.__pnp_safeBind")); + assert.ok(wrapped.includes("__PNP_CONSTANTS_RAW__")); + assert.ok(wrapped.includes("AUTO_ANSWER_CORRECT_PERCENT")); + assert.ok(wrapped.includes("P-NP Patcher v4.4.1 — Prefix")); + assert.ok(wrapped.includes("P-NP Patcher v4.4.1 — Suffix")); + + const manifest = buildManifest({ + patcherVersion: "4.4.1", + rules: RULES, + prefix, + suffix, + defaultMenuUrl: GUI_LINK + }); + + assert.equal(manifest.schemaVersion, 1); + assert.equal(manifest.patcherVersion, "4.4.1"); + assert.match(manifest.hash, /^[0-9a-f]{16}$/); + assert.equal(manifest.rules.length, RULES.length); + assert.equal(manifest.prefix, prefix); + assert.equal(manifest.suffix, suffix); + assert.equal(manifest.defaultMenuUrl, GUI_LINK); + }); +}); + +test("integration: manifest.defaultMenuUrl matches GUI_LINK", () => { + const prefix = buildPrefix("test"); + const suffix = buildSuffix("test", ["https://example.com/a.png"]); + const manifest = buildManifest({ + patcherVersion: "test", + rules: [], + prefix, + suffix, + defaultMenuUrl: GUI_LINK + }); + assert.equal(manifest.defaultMenuUrl, GUI_LINK); + assert.ok(!suffix.includes(GUI_LINK), "suffix must not contain GUI_LINK literal"); +}); diff --git a/tests/manifest.test.ts b/tests/manifest.test.ts new file mode 100644 index 0000000..f204779 --- /dev/null +++ b/tests/manifest.test.ts @@ -0,0 +1,39 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { buildManifest, hashManifest } from "../src/manifest.ts"; + +const RULE = { + id: "demo", + description: "demo rule", + find: "abc", + flags: "g", + replace: "xyz", + minMatches: 1 +}; + +test("buildManifest includes defaultMenuUrl", () => { + const m = buildManifest({ + patcherVersion: "9.9.9", + rules: [RULE], + prefix: "P", + suffix: "S", + defaultMenuUrl: "https://example.com/bundle.js" + }); + assert.equal(m.schemaVersion, 1); + assert.equal(m.patcherVersion, "9.9.9"); + assert.equal(m.defaultMenuUrl, "https://example.com/bundle.js"); + assert.equal(typeof m.hash, "string"); + assert.equal(m.hash.length, 16); +}); + +test("hashManifest changes when defaultMenuUrl changes", () => { + const a = hashManifest([RULE], "P", "S", "https://example.com/a.js"); + const b = hashManifest([RULE], "P", "S", "https://example.com/b.js"); + assert.notEqual(a, b, "hash must include defaultMenuUrl"); +}); + +test("hashManifest stable across equal inputs", () => { + const a = hashManifest([RULE], "P", "S", "https://example.com/x.js"); + const b = hashManifest([RULE], "P", "S", "https://example.com/x.js"); + assert.equal(a, b); +}); diff --git a/tests/patches.test.ts b/tests/patches.test.ts new file mode 100644 index 0000000..6722547 --- /dev/null +++ b/tests/patches.test.ts @@ -0,0 +1,101 @@ +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; +import { RULES, applyRules, hashRules, type PatchRule } from "../src/patches.ts"; + +describe("RULES shape", () => { + it("includes the singleton-exposure rule", () => { + const ids = RULES.map((r) => r.id); + assert.ok(ids.includes("singleton-exposure")); + }); + + it("every rule has the full PatchRule shape", () => { + for (const rule of RULES) { + assert.equal(typeof rule.id, "string"); + assert.equal(typeof rule.description, "string"); + assert.equal(typeof rule.find, "string"); + assert.equal(typeof rule.flags, "string"); + assert.equal(typeof rule.replace, "string"); + assert.equal(typeof rule.minMatches, "number"); + } + }); + + it("rule ids are unique", () => { + const ids = RULES.map((r) => r.id); + assert.equal(new Set(ids).size, ids.length); + }); +}); + +describe("applyRules — substitutions on synthetic bundle", () => { + it("singleton-exposure injects window.__PNP__", () => { + const input = `class X{constructor(){_instance=this),this._game=E}destroy(){}}`; + const { output, perRuleCounts } = applyRules(input, RULES); + assert.ok(output.includes("window.__PNP__=this")); + assert.ok((perRuleCounts["singleton-exposure"] ?? 0) >= 1); + }); + + it("safe-bind wraps gameContainer.bind calls", () => { + const input = `A.q.instance.prodigy.gameContainer.bind("MathTower")`; + const { output } = applyRules(input, RULES); + assert.ok(output.includes("window.__pnp_safeBind")); + assert.ok(!output.match(/[A-Za-z_$][\w$]*\.q\.instance\.prodigy\.gameContainer\.bind\(/)); + }); + + it("constants exposure aliases the constants map", () => { + const input = `var M={};M.constants={"GameConstants.Build.VERSION":"2026.18.1"}`; + const { output } = applyRules(input, RULES); + assert.ok(output.includes("__PNP_CONSTANTS_RAW__")); + }); + + it("answerQuestion bypass injects before the if-isOpen check", () => { + const input = `answerQuestion(){if(!this._isOpen){this._doStuff()}}`; + const { output, perRuleCounts } = applyRules(input, RULES); + assert.ok(output.includes("AUTO_ANSWER_CORRECT_PERCENT")); + assert.ok((perRuleCounts["answer-question-bypass"] ?? 0) >= 1); + }); + + it("externalFactory bypass wraps the findParameter call", () => { + const input = `function f(){const Q=this.findParameter("externalFactory");return Q.thing()}`; + const { output } = applyRules(input, RULES); + assert.ok(output.includes("EDUCATION_ENABLED")); + assert.ok(output.includes(`const Q=this.findParameter("externalFactory")`)); + }); + + it("openQuestionInterfaceThenEmitNotifications bypass injects the early return", () => { + const input = `class C{openQuestionInterfaceThenEmitNotifications(a,b,c,d,e){this._education.thing()}}`; + const { output, perRuleCounts } = applyRules(input, RULES); + assert.ok(output.includes("EDUCATION_ENABLED")); + assert.ok((perRuleCounts["open-question-bypass"] ?? 0) >= 1); + }); +}); + +describe("applyRules — counting + return shape", () => { + it("reports per-rule counts as numbers", () => { + const { perRuleCounts } = applyRules("nothing here", RULES); + for (const rule of RULES) { + assert.equal(typeof perRuleCounts[rule.id], "number"); + } + }); + + it("preserves source when no rule matches", () => { + const { output } = applyRules("just text", RULES); + assert.equal(output, "just text"); + }); +}); + +describe("hashRules", () => { + it("returns a 16-char hex string", () => { + const hash = hashRules(RULES); + assert.equal(hash.length, 16); + assert.match(hash, /^[0-9a-f]{16}$/); + }); + + it("is deterministic", () => { + assert.equal(hashRules(RULES), hashRules(RULES)); + }); + + it("changes when rules change", () => { + const a: PatchRule = { id: "x", description: "", find: "a", flags: "g", replace: "b", minMatches: 1 }; + const b: PatchRule = { id: "x", description: "", find: "a", flags: "g", replace: "c", minMatches: 1 }; + assert.notEqual(hashRules([a]), hashRules([b])); + }); +}); diff --git a/tests/smoke.test.ts b/tests/smoke.test.ts new file mode 100644 index 0000000..aa882d1 --- /dev/null +++ b/tests/smoke.test.ts @@ -0,0 +1,8 @@ +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; + +describe("smoke", () => { + it("test harness works", () => { + assert.equal(1 + 1, 2); + }); +}); diff --git a/tests/wrappers.test.ts b/tests/wrappers.test.ts new file mode 100644 index 0000000..298abfd --- /dev/null +++ b/tests/wrappers.test.ts @@ -0,0 +1,98 @@ +import { describe, it, test } from "node:test"; +import assert from "node:assert/strict"; +import { buildPrefix, buildSuffix } from "../src/wrappers.ts"; + +describe("buildPrefix", () => { + it("returns a string", () => { + assert.equal(typeof buildPrefix("9.9.9"), "string"); + }); + + it("interpolates the version into the patcher header", () => { + const out = buildPrefix("9.9.9"); + assert.ok(out.includes("P-NP Patcher v9.9.9 — Prefix")); + }); + + it("includes console.image helper", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("console.image")); + }); + + it("defines window.__pnp_safeBind", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("window.__pnp_safeBind")); + }); + + it("defines window.__pnp_discoverService", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("window.__pnp_discoverService")); + }); + + it("guards SW.Load.decrementLoadSemaphore against duplicate calls", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("__PNP_SEM_DECREMENTED__")); + }); + + it("pre-inits window._.constants with map-like API", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("window._.constants")); + }); +}); + +describe("buildSuffix", () => { + it("returns a string", () => { + assert.equal(typeof buildSuffix("4.4.0", ["https://img/1.png"]), "string"); + }); + + it("interpolates the version into the patcher header", () => { + const out = buildSuffix("4.4.0", []); + assert.ok(out.includes("P-NP Patcher v4.4.0 — Suffix")); + }); + + it("serializes displayImages as a JSON array literal in console.image", () => { + const out = buildSuffix("4.4.0", ["https://a/1.png", "https://b/2.png"]); + assert.ok(out.includes(JSON.stringify(["https://a/1.png", "https://b/2.png"]))); + }); + + it("calls SW.Load.decrementLoadSemaphore at the top", () => { + const out = buildSuffix("4.4.0", []); + assert.ok(out.includes("SW.Load.decrementLoadSemaphore()")); + }); + + it("schedules the CheatGUI loader via setTimeout(15000)", () => { + const out = buildSuffix("4.4.0", []); + assert.ok(/setTimeout\b/.test(out)); + assert.ok(/,\s*15000\)/.test(out)); + }); + + it("polls every 500ms to re-apply window._ properties", () => { + const out = buildSuffix("4.4.0", []); + assert.ok(/setInterval\b/.test(out)); + assert.ok(/,\s*500\)/.test(out)); + }); + + it("exposes _.player via discovery", () => { + const out = buildSuffix("4.4.0", []); + assert.ok(out.includes("PlayerService")); + assert.ok(out.includes("_.player") || out.includes('"player"')); + }); + + it("exposes _.membership via discovery + setMembership helper", () => { + const out = buildSuffix("4.4.0", []); + assert.ok(out.includes("MembershipService")); + assert.ok(out.includes("setMembership")); + }); + + test("buildSuffix references window.__ORIGIN_MENU_URL__ instead of baking a URL", () => { + const suffix = buildSuffix("4.4.1", ["https://example.com/img.png"]); + assert.match(suffix, /window\.__ORIGIN_MENU_URL__/); + assert.doesNotMatch(suffix, /raw\.githubusercontent\.com\/ProdigyPXP\/ProdigyOrigin/); + assert.doesNotMatch(suffix, /https?:\/\/[^"]*bundle\.js/); + }); + + test("buildSuffix interpolates version and displayImages", () => { + const suffix = buildSuffix("9.9.9", ["https://example.com/a.png", "https://example.com/b.png"]); + assert.match(suffix, /Version 9\.9\.9/); + assert.match(suffix, /https:\/\/example\.com\/a\.png/); + assert.match(suffix, /https:\/\/example\.com\/b\.png/); + }); +});